Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .pnp.cjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions ui-admin/theme/src/properties/typography.css.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// TODO: Remove legacy typography sprinkles after components are refactored to @atls-ui/theme typography.
import { defineProperties } from 'rainbow-sprinkles'

import { vars } from '../theme.css.js'
Expand Down
4 changes: 3 additions & 1 deletion ui-admin/theme/src/tokens/contract/colors.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export type ColorsTokens = Record<keyof typeof colorsContract, string>

export const colorsContract = {
export const legacyColorsContract = {
blue: null,
blueProtective: null,
white: null,
Expand Down Expand Up @@ -42,3 +42,5 @@ export const colorsContract = {

'icons.placeholder': null,
}

export const colorsContract = legacyColorsContract
1 change: 1 addition & 0 deletions ui-admin/theme/src/tokens/contract/font-sizes.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// TODO: Remove legacy typography tokens after components are refactored to @atls-ui/theme typography.
export type FontSizesTokens = Record<keyof typeof fontSizesContract, string>

export const fontSizesContract = {
Expand Down
1 change: 1 addition & 0 deletions ui-admin/theme/src/tokens/contract/font-weights.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// TODO: Remove legacy typography tokens after components are refactored to @atls-ui/theme typography.
export type FontWeightsTokens = Record<keyof typeof fontWeightsContract, string>

export const fontWeightsContract = {
Expand Down
1 change: 1 addition & 0 deletions ui-admin/theme/src/tokens/contract/fonts.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// TODO: Remove legacy typography tokens after components are refactored to @atls-ui/theme typography.
export type FontsTokens = Record<keyof typeof fontsContract, string>

export const fontsContract = {
Expand Down
1 change: 1 addition & 0 deletions ui-admin/theme/src/tokens/contract/line-heights.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// TODO: Remove legacy typography tokens after components are refactored to @atls-ui/theme typography.
export type LineHeightsTokens = Record<keyof typeof lineHeightsContract, string>

export const lineHeightsContract = {
Expand Down
4 changes: 3 additions & 1 deletion ui-admin/theme/src/tokens/dark/colors.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { ColorsTokens } from '../contract/index.js'

export const colors: ColorsTokens = {
export const legacyColors: ColorsTokens = {
blue: 'rgba(65, 109, 223, 1)',
blueProtective: 'rgba(24, 144 ,255, 1)',
white: 'rgba(0, 0, 0, 1)',
Expand Down Expand Up @@ -42,3 +42,5 @@ export const colors: ColorsTokens = {

'icons.placeholder': 'rgba(104, 110, 130, 1)',
}

export const colors = legacyColors
1 change: 1 addition & 0 deletions ui-admin/theme/src/tokens/dark/font-sizes.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// TODO: Remove legacy typography tokens after components are refactored to @atls-ui/theme typography.
import type { FontSizesTokens } from '../index.js'

export const fontSizes: FontSizesTokens = {
Expand Down
1 change: 1 addition & 0 deletions ui-admin/theme/src/tokens/dark/font-weights.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// TODO: Remove legacy typography tokens after components are refactored to @atls-ui/theme typography.
import type { FontWeightsTokens } from '../index.js'

export const fontWeights: FontWeightsTokens = {
Expand Down
1 change: 1 addition & 0 deletions ui-admin/theme/src/tokens/dark/fonts.css.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// TODO: Remove legacy typography tokens after components are refactored to @atls-ui/theme typography.
import type { FontsTokens } from '../index.js'

import { globalFontFace } from '@vanilla-extract/css'
Expand Down
1 change: 1 addition & 0 deletions ui-admin/theme/src/tokens/dark/line-heights.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// TODO: Remove legacy typography tokens after components are refactored to @atls-ui/theme typography.
import type { LineHeightsTokens } from '../index.js'

export const lineHeights: LineHeightsTokens = {
Expand Down
4 changes: 3 additions & 1 deletion ui-admin/theme/src/tokens/light/colors.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const colors = {
export const legacyColors = {
blue: 'rgba(65, 109, 223, 1)',
blueProtective: 'rgba(24, 144 ,255, 1)',
white: 'rgba(255, 255, 255, 1)',
Expand Down Expand Up @@ -40,3 +40,5 @@ export const colors = {

'icons.placeholder': 'rgba(161, 170, 199, 1)',
}

export const colors = legacyColors
1 change: 1 addition & 0 deletions ui-admin/theme/src/tokens/light/font-sizes.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// TODO: Remove legacy typography tokens after components are refactored to @atls-ui/theme typography.
import type { FontSizesTokens } from '../index.js'

export const fontSizes: FontSizesTokens = {
Expand Down
1 change: 1 addition & 0 deletions ui-admin/theme/src/tokens/light/font-weights.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// TODO: Remove legacy typography tokens after components are refactored to @atls-ui/theme typography.
import type { FontWeightsTokens } from '../index.js'

export const fontWeights: FontWeightsTokens = {
Expand Down
1 change: 1 addition & 0 deletions ui-admin/theme/src/tokens/light/fonts.css.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// TODO: Remove legacy typography tokens after components are refactored to @atls-ui/theme typography.
import type { FontsTokens } from '../index.js'

import { globalFontFace } from '@vanilla-extract/css'
Expand Down
1 change: 1 addition & 0 deletions ui-admin/theme/src/tokens/light/line-heights.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// TODO: Remove legacy typography tokens after components are refactored to @atls-ui/theme typography.
import type { LineHeightsTokens } from '../index.js'

export const lineHeights: LineHeightsTokens = {
Expand Down
1 change: 1 addition & 0 deletions ui-parts/theme/src/properties/typography.css.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// TODO: Remove legacy typography sprinkles after components are refactored to @atls-ui/theme typography.
import { defineProperties } from 'rainbow-sprinkles'

import { vars } from '../theme.css.js'
Expand Down
4 changes: 3 additions & 1 deletion ui-parts/theme/src/tokens/colors.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const colors = {
export const legacyColors = {
blue: 'rgba(65, 109, 223, 1)',
blueProtective: 'rgba(24, 144 ,255, 1)',
white: 'rgba(255, 255, 255, 1)',
Expand Down Expand Up @@ -85,3 +85,5 @@ export const colors = {
'text.softBlue': 'rgba(65, 109, 223, 1)',
'text.green': 'rgba(52, 197, 29, 1)',
}

export const colors = legacyColors
1 change: 1 addition & 0 deletions ui-parts/theme/src/tokens/font-sizes.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// TODO: Remove legacy typography tokens after components are refactored to @atls-ui/theme typography.
export const fontSizes = {
inherit: 'inherit',
max: '100%',
Expand Down
1 change: 1 addition & 0 deletions ui-parts/theme/src/tokens/font-weights.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// TODO: Remove legacy typography tokens after components are refactored to @atls-ui/theme typography.
export const fontWeights = {
inherit: 'inherit',
light: '300',
Expand Down
1 change: 1 addition & 0 deletions ui-parts/theme/src/tokens/fonts.css.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// TODO: Remove legacy typography tokens after components are refactored to @atls-ui/theme typography.
import { globalFontFace } from '@vanilla-extract/css'

const nunitoSans = 'Nunito Sans'
Expand Down
1 change: 1 addition & 0 deletions ui-parts/theme/src/tokens/line-heights.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// TODO: Remove legacy typography tokens after components are refactored to @atls-ui/theme typography.
export const lineHeights = {
micro: '0.5',
extraMicro: '0.8',
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
8 changes: 8 additions & 0 deletions ui/theme/licenses/science-gothic/AUTHORS.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This is the official list of project authors for copyright purposes.
# This file is distinct from the CONTRIBUTORS.txt file.
# See the latter for an explanation.
#
# Names should be added to this file as:
# Name or Organization <email address>

Google LLC
95 changes: 95 additions & 0 deletions ui/theme/licenses/science-gothic/OFL.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
Copyright 2024 Font Detective LLC <https://github.com/googlefonts/science-gothic/OFL.txt>

This Font Software is licensed under the SIL Open Font License, Version 1.1,
with no Reserved Font Name.
This license is copied below, and is also available with a FAQ at:
https://openfontlicense.org/

ADDITIONAL non-font source files are licensed to others under the Apache 2.0 open source license (https://www.apache.org/licenses/LICENSE-2.0).

-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------

PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.

The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.

DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.

"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).

"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).

"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.

"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.

PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:

1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.

2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.

3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.

4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.

5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.

TERMINATION
This license becomes null and void if any of the above conditions are
not met.

DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
7 changes: 6 additions & 1 deletion ui/theme/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,18 @@
},
"main": "./src/index.ts",
"files": [
"dist"
"assets",
"dist",
"licenses"
],
"scripts": {
"build": "yarn library build",
"prepack": "yarn run build",
"postpack": "rm -rf dist"
},
"dependencies": {
"csstype": "3.2.3"
},
"publishConfig": {
"access": "public",
"exports": {
Expand Down
1 change: 1 addition & 0 deletions ui/theme/src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from './theme.js'
export * from './tokens/index.js'
21 changes: 21 additions & 0 deletions ui/theme/src/theme.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import type { Colors } from './tokens/index.js'
import type { TypographyTokens } from './tokens/index.js'

import { darkColors } from './tokens/index.js'
import { lightColors } from './tokens/index.js'
import { typography } from './tokens/index.js'

export interface Theme {
colors: Colors
typography: TypographyTokens
}

export const lightTheme: Theme = {
colors: lightColors,
typography,
}

export const darkTheme: Theme = {
colors: darkColors,
typography,
}
37 changes: 37 additions & 0 deletions ui/theme/src/tokens/colors/dark.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import type { Colors } from './interfaces.js'

export const darkColors: Colors = {
action: {
base: '#5F8FFF',
hover: '#7AA7FF',
pressed: '#3F74FF',
disabled: '#5F8FFF',
subtle: '#394A6B',
},
surface: {
base: '#111111',
subtle: '#171717',
muted: '#1F1F1F',
soft: '#FFFFFF',
inverse: '#F8F9FF',
},
text: {
primary: '#F2F4F7',
secondary: '#C9D0DA',
tertiary: '#9AA3B2',
muted: '#6B7485',
inverse: '#121417',
},
status: {
success: '#4AD27F',
warning: '#F2B84B',
error: '#FF5C5C',
info: '#5B8CFF',
},
elevation: {
xs: '#00000059',
sm: '#00000066',
md: '#00000073',
lg: '#00000099',
},
}
3 changes: 3 additions & 0 deletions ui/theme/src/tokens/colors/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export * from './dark.js'
export type * from './interfaces.js'
export * from './light.js'
45 changes: 45 additions & 0 deletions ui/theme/src/tokens/colors/interfaces.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
export interface Colors {
action: ActionColors
surface: SurfaceColors
text: TextColors
status: StatusColors
elevation: ElevationColors
}

export interface ActionColors {
base: string
hover: string
pressed: string
disabled: string
subtle: string
}

export interface SurfaceColors {
base: string
subtle: string
muted: string
soft: string
inverse: string
}

export interface TextColors {
primary: string
secondary: string
tertiary: string
muted: string
inverse: string
}

export interface StatusColors {
success: string
warning: string
error: string
info: string
}

export interface ElevationColors {
xs: string
sm: string
md: string
lg: string
}
Loading
Loading