@tamagui/theme-base 1.0.1-beta.141 → 1.0.1-beta.142
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/themes.js +27 -30
- package/dist/cjs/themes.js.map +2 -2
- package/dist/cjs/tokens.js +4 -16
- package/dist/cjs/tokens.js.map +2 -2
- package/dist/esm/themes.js +28 -31
- package/dist/esm/themes.js.map +2 -2
- package/dist/esm/tokens.js +4 -22
- package/dist/esm/tokens.js.map +2 -2
- package/package.json +12 -5
- package/src/themes.tsx +28 -32
- package/src/tokens.tsx +0 -18
- package/types/themes.d.ts +0 -29
- package/types/tokens.d.ts +0 -144
- package/dist/jsx/colorUtils.js +0 -40
- package/dist/jsx/colorUtils.js.map +0 -7
- package/dist/jsx/index.js +0 -4
- package/dist/jsx/index.js.map +0 -7
- package/dist/jsx/themes.js +0 -307
- package/dist/jsx/themes.js.map +0 -7
- package/dist/jsx/tokens.js +0 -167
- package/dist/jsx/tokens.js.map +0 -7
package/dist/esm/tokens.js
CHANGED
|
@@ -2,9 +2,7 @@ import {
|
|
|
2
2
|
blue,
|
|
3
3
|
blueDark,
|
|
4
4
|
gray,
|
|
5
|
-
grayA,
|
|
6
5
|
grayDark,
|
|
7
|
-
grayDarkA,
|
|
8
6
|
green,
|
|
9
7
|
greenDark,
|
|
10
8
|
orange,
|
|
@@ -15,10 +13,6 @@ import {
|
|
|
15
13
|
purpleDark,
|
|
16
14
|
red,
|
|
17
15
|
redDark,
|
|
18
|
-
teal,
|
|
19
|
-
tealDark,
|
|
20
|
-
violet,
|
|
21
|
-
violetDark,
|
|
22
16
|
yellow,
|
|
23
17
|
yellowDark
|
|
24
18
|
} from "@tamagui/colors";
|
|
@@ -80,55 +74,43 @@ const colorTokens = {
|
|
|
80
74
|
light: {
|
|
81
75
|
blue,
|
|
82
76
|
gray,
|
|
83
|
-
grayA,
|
|
84
77
|
green,
|
|
85
78
|
orange,
|
|
86
79
|
pink,
|
|
87
80
|
purple,
|
|
88
81
|
red,
|
|
89
|
-
|
|
90
|
-
yellow,
|
|
91
|
-
teal
|
|
82
|
+
yellow
|
|
92
83
|
},
|
|
93
84
|
dark: {
|
|
94
85
|
blue: blueDark,
|
|
95
86
|
gray: grayDark,
|
|
96
|
-
grayA: grayDarkA,
|
|
97
87
|
green: greenDark,
|
|
98
88
|
orange: orangeDark,
|
|
99
89
|
pink: pinkDark,
|
|
100
90
|
purple: purpleDark,
|
|
101
91
|
red: redDark,
|
|
102
|
-
|
|
103
|
-
yellow: yellowDark,
|
|
104
|
-
teal: tealDark
|
|
92
|
+
yellow: yellowDark
|
|
105
93
|
}
|
|
106
94
|
};
|
|
107
95
|
const darkColors = {
|
|
108
96
|
...colorTokens.dark.blue,
|
|
109
97
|
...colorTokens.dark.gray,
|
|
110
|
-
...colorTokens.dark.grayA,
|
|
111
98
|
...colorTokens.dark.green,
|
|
112
99
|
...colorTokens.dark.orange,
|
|
113
100
|
...colorTokens.dark.pink,
|
|
114
101
|
...colorTokens.dark.purple,
|
|
115
102
|
...colorTokens.dark.red,
|
|
116
|
-
...colorTokens.dark.
|
|
117
|
-
...colorTokens.dark.yellow,
|
|
118
|
-
...colorTokens.dark.teal
|
|
103
|
+
...colorTokens.dark.yellow
|
|
119
104
|
};
|
|
120
105
|
const lightColors = {
|
|
121
106
|
...colorTokens.light.blue,
|
|
122
107
|
...colorTokens.light.gray,
|
|
123
|
-
...colorTokens.light.grayA,
|
|
124
108
|
...colorTokens.light.green,
|
|
125
109
|
...colorTokens.light.orange,
|
|
126
110
|
...colorTokens.light.pink,
|
|
127
111
|
...colorTokens.light.purple,
|
|
128
112
|
...colorTokens.light.red,
|
|
129
|
-
...colorTokens.light.
|
|
130
|
-
...colorTokens.light.yellow,
|
|
131
|
-
...colorTokens.light.teal
|
|
113
|
+
...colorTokens.light.yellow
|
|
132
114
|
};
|
|
133
115
|
const allColors = {
|
|
134
116
|
...postfixObjKeys(lightColors, "Light"),
|
package/dist/esm/tokens.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/tokens.tsx"],
|
|
4
|
-
"sourcesContent": ["import {\n blue,\n blueDark,\n gray,\n
|
|
5
|
-
"mappings": "AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;
|
|
4
|
+
"sourcesContent": ["import {\n blue,\n blueDark,\n gray,\n grayDark,\n green,\n greenDark,\n orange,\n orangeDark,\n pink,\n pinkDark,\n purple,\n purpleDark,\n red,\n redDark,\n yellow,\n yellowDark,\n} from '@tamagui/colors'\nimport { Variable, createTokens } from '@tamagui/core'\n\n// should roughly map to button/input etc height at each level\n// fonts should match that height/lineHeight at each stop\n// so these are really non-linear on purpose\n// why?\n// - at sizes <1, used for fine grained things (borders, smallest paddingY)\n// - so smallest padY should be roughly 1-4px so it can join with lineHeight\n// - at sizes >=1, have to consider \"pressability\" (jumps up)\n// - after that it should go upwards somewhat naturally\n// - H1 / headings top out at 10 naturally, so after 10 we can go upwards faster\n// but also one more wrinkle...\n// space is used in conjunction with size\n// i'm setting space to generally just a fixed fraction of size (~1/3-2/3 still fine tuning)\nconst size = {\n 0: 0,\n 0.25: 2,\n 0.5: 4,\n 0.75: 8,\n 1: 20,\n 1.5: 24,\n 2: 28,\n 2.5: 32,\n 3: 36,\n 3.5: 40,\n 4: 44,\n true: 44,\n 4.5: 48,\n 5: 52,\n 5.5: 59,\n 6: 64,\n 6.5: 69,\n 7: 74,\n 7.6: 79,\n 8: 84,\n 8.5: 89,\n 9: 94,\n 9.5: 99,\n 10: 104,\n 11: 124,\n 12: 144,\n 13: 164,\n 14: 184,\n 15: 204,\n 16: 224,\n 17: 224,\n 18: 244,\n 19: 264,\n 20: 284,\n}\n\ntype Sizes = typeof size\ntype SizeKeys = `${keyof Sizes}`\n\nconst spaces = Object.entries(size).map(([k, v]) => [\n k,\n Math.max(0, v <= 16 ? Math.round(v * 0.333) : Math.floor(v * 0.7 - 12)),\n])\n\nconst spacesNegative = spaces.map(([k, v]) => [`-${k}`, -v])\n\nconst space: {\n [Key in `-${SizeKeys}` | SizeKeys]: Key extends keyof Sizes ? Sizes[Key] : number\n} = {\n ...Object.fromEntries(spaces),\n ...Object.fromEntries(spacesNegative),\n} as any\n\nconst zIndex = {\n 0: 0,\n 1: 100,\n 2: 200,\n 3: 300,\n 4: 400,\n 5: 500,\n}\n\nconst colorTokens = {\n light: {\n blue: blue,\n gray: gray,\n green: green,\n orange: orange,\n pink: pink,\n purple: purple,\n red: red,\n yellow: yellow,\n },\n dark: {\n blue: blueDark,\n gray: grayDark,\n green: greenDark,\n orange: orangeDark,\n pink: pinkDark,\n purple: purpleDark,\n red: redDark,\n yellow: yellowDark,\n },\n}\n\nexport const darkColors = {\n ...colorTokens.dark.blue,\n ...colorTokens.dark.gray,\n ...colorTokens.dark.green,\n ...colorTokens.dark.orange,\n ...colorTokens.dark.pink,\n ...colorTokens.dark.purple,\n ...colorTokens.dark.red,\n ...colorTokens.dark.yellow,\n}\n\nexport const lightColors = {\n ...colorTokens.light.blue,\n ...colorTokens.light.gray,\n ...colorTokens.light.green,\n ...colorTokens.light.orange,\n ...colorTokens.light.pink,\n ...colorTokens.light.purple,\n ...colorTokens.light.red,\n ...colorTokens.light.yellow,\n}\n\nconst allColors = {\n ...postfixObjKeys(lightColors, 'Light'),\n ...postfixObjKeys(darkColors, 'Dark'),\n}\n\nfunction postfixObjKeys<A extends { [key: string]: Variable<string> | string }, B extends string>(\n obj: A,\n postfix: B\n): {\n [Key in `${keyof A extends string ? keyof A : never}${B}`]: Variable<string> | string\n} {\n return Object.fromEntries(Object.entries(obj).map(([k, v]) => [`${k}${postfix}`, v])) as any\n}\n\nconst radius = {\n 0: 0,\n 1: 3,\n 2: 5,\n 3: 7,\n 4: 9,\n 5: 10,\n 6: 16,\n 7: 19,\n 8: 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;AAAA,EACb,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAEO,MAAM,SAAS,aAAa;AAAA,EACjC,OAAO;AAAA,EACP;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/theme-base",
|
|
3
|
-
"version": "1.0.1-beta.
|
|
3
|
+
"version": "1.0.1-beta.142",
|
|
4
4
|
"types": "./types/index.d.ts",
|
|
5
5
|
"main": "dist/cjs",
|
|
6
6
|
"module": "dist/esm",
|
|
7
|
-
"
|
|
7
|
+
"sideEffects": false,
|
|
8
8
|
"files": [
|
|
9
9
|
"src",
|
|
10
10
|
"types",
|
|
@@ -18,12 +18,19 @@
|
|
|
18
18
|
"clean": "tamagui-build clean",
|
|
19
19
|
"clean:build": "tamagui-build clean:build"
|
|
20
20
|
},
|
|
21
|
+
"exports": {
|
|
22
|
+
"./package.json": "./package.json",
|
|
23
|
+
".": {
|
|
24
|
+
"import": "./dist/esm/index.js",
|
|
25
|
+
"require": "./dist/cjs/index.js"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
21
28
|
"dependencies": {
|
|
22
|
-
"@tamagui/colors": "^1.0.1-beta.
|
|
23
|
-
"@tamagui/core": "^1.0.1-beta.
|
|
29
|
+
"@tamagui/colors": "^1.0.1-beta.142",
|
|
30
|
+
"@tamagui/core": "^1.0.1-beta.142"
|
|
24
31
|
},
|
|
25
32
|
"devDependencies": {
|
|
26
|
-
"@tamagui/build": "^1.0.1-beta.
|
|
33
|
+
"@tamagui/build": "^1.0.1-beta.142"
|
|
27
34
|
},
|
|
28
35
|
"publishConfig": {
|
|
29
36
|
"access": "public"
|
package/src/themes.tsx
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { Variable, createTheme, getVariableValue, isWeb } from '@tamagui/core'
|
|
2
2
|
|
|
3
3
|
import { setColorAlpha } from './colorUtils'
|
|
4
|
-
import { darkColors, lightColors
|
|
5
|
-
|
|
6
|
-
const { color } = tokens
|
|
4
|
+
import { darkColors, lightColors } from './tokens'
|
|
7
5
|
|
|
8
6
|
// spaghetti ahead
|
|
9
7
|
|
|
@@ -25,9 +23,9 @@ type ThemeCreatorProps = {
|
|
|
25
23
|
|
|
26
24
|
// helpers
|
|
27
25
|
|
|
28
|
-
const alternates = [1, 2, 3
|
|
29
|
-
const alts = [1, 2
|
|
30
|
-
type AltKeys = 1 | 2
|
|
26
|
+
const alternates = [1, 2, 3] as const
|
|
27
|
+
const alts = [1, 2] as const
|
|
28
|
+
type AltKeys = 1 | 2
|
|
31
29
|
type AltName<Name extends string, Keys extends string | number> = `${Name}_alt${Keys}`
|
|
32
30
|
type ThemeCreator<A = any> = (str: number, props: ThemeCreatorProps) => A
|
|
33
31
|
|
|
@@ -115,8 +113,8 @@ function createThemesFrom<Name extends string, GetTheme extends ThemeCreator = T
|
|
|
115
113
|
...altButtonThemes.slice(0, alts.length),
|
|
116
114
|
[`${name}_Button`, altThemes2[1][1]],
|
|
117
115
|
[`${name}_DrawerFrame`, altThemes2[1][1]],
|
|
118
|
-
[`${name}_SliderTrack`, altThemes[
|
|
119
|
-
[`${name}_SliderTrackActive`, altThemes[
|
|
116
|
+
[`${name}_SliderTrack`, altThemes[0][1]],
|
|
117
|
+
[`${name}_SliderTrackActive`, altThemes[2][1]],
|
|
120
118
|
[`${name}_SliderThumb`, inverted[2]],
|
|
121
119
|
[`${name}_Progress`, altThemes[2][1]],
|
|
122
120
|
[`${name}_ProgressIndicator`, inverted[2]],
|
|
@@ -169,14 +167,14 @@ const themeCreator = (
|
|
|
169
167
|
backgroundHover: get(backgrounds, str + lighterDir),
|
|
170
168
|
backgroundPress: get(backgrounds, str + darkerDir),
|
|
171
169
|
backgroundFocus: get(backgrounds, str + darkerDir * 2),
|
|
172
|
-
backgroundTransparent:
|
|
170
|
+
backgroundTransparent: 'hsla(0, 0%, 0%, 0.012)',
|
|
173
171
|
color: get(colors, 0 + str, 'color'),
|
|
174
172
|
colorHover: get(colors, 1 + str, 'color'),
|
|
175
173
|
colorPress: get(colors, 2 + str, 'color'),
|
|
176
174
|
colorFocus: get(colors, 3 + str, 'color'),
|
|
177
175
|
colorTranslucent,
|
|
178
176
|
colorMid: (isLight ? colors : backgrounds)[Math.floor(colors.length / 2)],
|
|
179
|
-
shadowColor: isLight ?
|
|
177
|
+
shadowColor: isLight ? 'hsla(0, 0%, 0%, 0.03)' : 'hsla(0, 0%, 0%, 0.2)',
|
|
180
178
|
shadowColorHover: darkColors[!isLight ? 1 : 8],
|
|
181
179
|
shadowColorPress: darkColors[!isLight ? 1 : 8],
|
|
182
180
|
shadowColorFocus: darkColors[!isLight ? 1 : 8],
|
|
@@ -234,18 +232,18 @@ const themeColors = {
|
|
|
234
232
|
light: [
|
|
235
233
|
'#fff',
|
|
236
234
|
'#f4f4f4',
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
235
|
+
'hsl(0, 0%, 99.0%)',
|
|
236
|
+
'hsl(0, 0%, 97.3%)',
|
|
237
|
+
'hsl(0, 0%, 95.1%)',
|
|
238
|
+
'hsl(0, 0%, 93.0%)',
|
|
239
|
+
'hsl(0, 0%, 90.9%)',
|
|
240
|
+
'hsl(0, 0%, 88.7%)',
|
|
241
|
+
'hsl(0, 0%, 85.8%)',
|
|
242
|
+
'hsl(0, 0%, 78.0%)',
|
|
243
|
+
'hsl(0, 0%, 56.1%)',
|
|
244
|
+
'hsl(0, 0%, 52.3%)',
|
|
245
|
+
'hsl(0, 0%, 43.5%)',
|
|
246
|
+
'hsl(0, 0%, 9.0%)',
|
|
249
247
|
],
|
|
250
248
|
dark: [
|
|
251
249
|
'#111111',
|
|
@@ -310,9 +308,9 @@ const baseThemes = {
|
|
|
310
308
|
// reserving in types, updating later
|
|
311
309
|
light_active: lightThemes.light,
|
|
312
310
|
light_Card: lightThemes.light,
|
|
313
|
-
light_SliderTrack: lightThemes.
|
|
314
|
-
light_SliderTrackActive: lightThemes.
|
|
315
|
-
light_Switch: lightThemes.
|
|
311
|
+
light_SliderTrack: lightThemes.light_alt1,
|
|
312
|
+
light_SliderTrackActive: lightThemes.light_alt2,
|
|
313
|
+
light_Switch: lightThemes.light_alt2,
|
|
316
314
|
light_SwitchThumb: lightThemes.light,
|
|
317
315
|
light_DrawerFrame: lightThemes.light_alt1,
|
|
318
316
|
|
|
@@ -322,10 +320,10 @@ const baseThemes = {
|
|
|
322
320
|
// reserving in types, updating later
|
|
323
321
|
dark_active: darkThemes.dark,
|
|
324
322
|
dark_Card: darkThemes.dark,
|
|
325
|
-
dark_DrawerFrame: darkThemes.
|
|
323
|
+
dark_DrawerFrame: darkThemes.dark_alt1,
|
|
326
324
|
dark_SliderTrack: darkThemes.dark_darker,
|
|
327
|
-
dark_SliderTrackActive: darkThemes.
|
|
328
|
-
dark_Switch: darkThemes.
|
|
325
|
+
dark_SliderTrackActive: darkThemes.dark_alt2,
|
|
326
|
+
dark_Switch: darkThemes.dark_alt2,
|
|
329
327
|
dark_SwitchThumb: darkThemes.dark_darker,
|
|
330
328
|
dark_Button: darkThemes.dark_alt1,
|
|
331
329
|
}
|
|
@@ -347,7 +345,6 @@ export const colorSchemes = [
|
|
|
347
345
|
{ name: 'purple', colors: findColors('purple'), darkColors: findColors('purple', true) },
|
|
348
346
|
{ name: 'red', colors: findColors('red'), darkColors: findColors('red', true) },
|
|
349
347
|
{ name: 'yellow', colors: findColors('yellow'), darkColors: findColors('yellow', true) },
|
|
350
|
-
{ name: 'teal', colors: findColors('teal'), darkColors: findColors('teal', true) },
|
|
351
348
|
] as const
|
|
352
349
|
|
|
353
350
|
export type ColorNames = typeof colorSchemes[number]['name']
|
|
@@ -355,14 +352,13 @@ export type ColorNames = typeof colorSchemes[number]['name']
|
|
|
355
352
|
// nice and flat
|
|
356
353
|
export const colorNames: ColorNames[] = [
|
|
357
354
|
'blue',
|
|
358
|
-
'gray',
|
|
359
355
|
'green',
|
|
360
356
|
'orange',
|
|
361
357
|
'pink',
|
|
362
358
|
'purple',
|
|
363
359
|
'red',
|
|
364
360
|
'yellow',
|
|
365
|
-
'
|
|
361
|
+
'gray',
|
|
366
362
|
]
|
|
367
363
|
|
|
368
364
|
type ColorThemeNames =
|
|
@@ -424,7 +420,7 @@ const colorThemes: {
|
|
|
424
420
|
|
|
425
421
|
// add in base _active themes
|
|
426
422
|
baseThemes.dark_active = {
|
|
427
|
-
...colorThemes.
|
|
423
|
+
...colorThemes.dark_blue_alt2,
|
|
428
424
|
background: darkColors.blue10,
|
|
429
425
|
backgroundHover: darkColors.blue11,
|
|
430
426
|
backgroundPress: darkColors.blue9,
|
package/src/tokens.tsx
CHANGED
|
@@ -2,9 +2,7 @@ import {
|
|
|
2
2
|
blue,
|
|
3
3
|
blueDark,
|
|
4
4
|
gray,
|
|
5
|
-
grayA,
|
|
6
5
|
grayDark,
|
|
7
|
-
grayDarkA,
|
|
8
6
|
green,
|
|
9
7
|
greenDark,
|
|
10
8
|
orange,
|
|
@@ -15,10 +13,6 @@ import {
|
|
|
15
13
|
purpleDark,
|
|
16
14
|
red,
|
|
17
15
|
redDark,
|
|
18
|
-
teal,
|
|
19
|
-
tealDark,
|
|
20
|
-
violet,
|
|
21
|
-
violetDark,
|
|
22
16
|
yellow,
|
|
23
17
|
yellowDark,
|
|
24
18
|
} from '@tamagui/colors'
|
|
@@ -103,57 +97,45 @@ const colorTokens = {
|
|
|
103
97
|
light: {
|
|
104
98
|
blue: blue,
|
|
105
99
|
gray: gray,
|
|
106
|
-
grayA: grayA,
|
|
107
100
|
green: green,
|
|
108
101
|
orange: orange,
|
|
109
102
|
pink: pink,
|
|
110
103
|
purple: purple,
|
|
111
104
|
red: red,
|
|
112
|
-
violet: violet,
|
|
113
105
|
yellow: yellow,
|
|
114
|
-
teal: teal,
|
|
115
106
|
},
|
|
116
107
|
dark: {
|
|
117
108
|
blue: blueDark,
|
|
118
109
|
gray: grayDark,
|
|
119
|
-
grayA: grayDarkA,
|
|
120
110
|
green: greenDark,
|
|
121
111
|
orange: orangeDark,
|
|
122
112
|
pink: pinkDark,
|
|
123
113
|
purple: purpleDark,
|
|
124
114
|
red: redDark,
|
|
125
|
-
violet: violetDark,
|
|
126
115
|
yellow: yellowDark,
|
|
127
|
-
teal: tealDark,
|
|
128
116
|
},
|
|
129
117
|
}
|
|
130
118
|
|
|
131
119
|
export const darkColors = {
|
|
132
120
|
...colorTokens.dark.blue,
|
|
133
121
|
...colorTokens.dark.gray,
|
|
134
|
-
...colorTokens.dark.grayA,
|
|
135
122
|
...colorTokens.dark.green,
|
|
136
123
|
...colorTokens.dark.orange,
|
|
137
124
|
...colorTokens.dark.pink,
|
|
138
125
|
...colorTokens.dark.purple,
|
|
139
126
|
...colorTokens.dark.red,
|
|
140
|
-
...colorTokens.dark.violet,
|
|
141
127
|
...colorTokens.dark.yellow,
|
|
142
|
-
...colorTokens.dark.teal,
|
|
143
128
|
}
|
|
144
129
|
|
|
145
130
|
export const lightColors = {
|
|
146
131
|
...colorTokens.light.blue,
|
|
147
132
|
...colorTokens.light.gray,
|
|
148
|
-
...colorTokens.light.grayA,
|
|
149
133
|
...colorTokens.light.green,
|
|
150
134
|
...colorTokens.light.orange,
|
|
151
135
|
...colorTokens.light.pink,
|
|
152
136
|
...colorTokens.light.purple,
|
|
153
137
|
...colorTokens.light.red,
|
|
154
|
-
...colorTokens.light.violet,
|
|
155
138
|
...colorTokens.light.yellow,
|
|
156
|
-
...colorTokens.light.teal,
|
|
157
139
|
}
|
|
158
140
|
|
|
159
141
|
const allColors = {
|
package/types/themes.d.ts
CHANGED
|
@@ -59,10 +59,6 @@ export declare const colorSchemes: readonly [{
|
|
|
59
59
|
readonly name: "yellow";
|
|
60
60
|
readonly colors: BaseTheme;
|
|
61
61
|
readonly darkColors: BaseTheme;
|
|
62
|
-
}, {
|
|
63
|
-
readonly name: "teal";
|
|
64
|
-
readonly colors: BaseTheme;
|
|
65
|
-
readonly darkColors: BaseTheme;
|
|
66
62
|
}];
|
|
67
63
|
export declare type ColorNames = typeof colorSchemes[number]['name'];
|
|
68
64
|
export declare const colorNames: ColorNames[];
|
|
@@ -79,61 +75,38 @@ declare const allThemes: {
|
|
|
79
75
|
readonly purple: SubTheme;
|
|
80
76
|
readonly red: SubTheme;
|
|
81
77
|
readonly yellow: SubTheme;
|
|
82
|
-
readonly teal: SubTheme;
|
|
83
78
|
readonly light_blue_alt1: SubTheme;
|
|
84
79
|
readonly light_blue_alt2: SubTheme;
|
|
85
|
-
readonly light_blue_alt3: SubTheme;
|
|
86
80
|
readonly light_gray_alt1: SubTheme;
|
|
87
81
|
readonly light_gray_alt2: SubTheme;
|
|
88
|
-
readonly light_gray_alt3: SubTheme;
|
|
89
82
|
readonly light_green_alt1: SubTheme;
|
|
90
83
|
readonly light_green_alt2: SubTheme;
|
|
91
|
-
readonly light_green_alt3: SubTheme;
|
|
92
84
|
readonly light_orange_alt1: SubTheme;
|
|
93
85
|
readonly light_orange_alt2: SubTheme;
|
|
94
|
-
readonly light_orange_alt3: SubTheme;
|
|
95
86
|
readonly light_pink_alt1: SubTheme;
|
|
96
87
|
readonly light_pink_alt2: SubTheme;
|
|
97
|
-
readonly light_pink_alt3: SubTheme;
|
|
98
88
|
readonly light_purple_alt1: SubTheme;
|
|
99
89
|
readonly light_purple_alt2: SubTheme;
|
|
100
|
-
readonly light_purple_alt3: SubTheme;
|
|
101
90
|
readonly light_red_alt1: SubTheme;
|
|
102
91
|
readonly light_red_alt2: SubTheme;
|
|
103
|
-
readonly light_red_alt3: SubTheme;
|
|
104
92
|
readonly light_yellow_alt1: SubTheme;
|
|
105
93
|
readonly light_yellow_alt2: SubTheme;
|
|
106
|
-
readonly light_yellow_alt3: SubTheme;
|
|
107
|
-
readonly light_teal_alt1: SubTheme;
|
|
108
|
-
readonly light_teal_alt2: SubTheme;
|
|
109
|
-
readonly light_teal_alt3: SubTheme;
|
|
110
94
|
readonly dark_blue_alt1: SubTheme;
|
|
111
95
|
readonly dark_blue_alt2: SubTheme;
|
|
112
|
-
readonly dark_blue_alt3: SubTheme;
|
|
113
96
|
readonly dark_gray_alt1: SubTheme;
|
|
114
97
|
readonly dark_gray_alt2: SubTheme;
|
|
115
|
-
readonly dark_gray_alt3: SubTheme;
|
|
116
98
|
readonly dark_green_alt1: SubTheme;
|
|
117
99
|
readonly dark_green_alt2: SubTheme;
|
|
118
|
-
readonly dark_green_alt3: SubTheme;
|
|
119
100
|
readonly dark_orange_alt1: SubTheme;
|
|
120
101
|
readonly dark_orange_alt2: SubTheme;
|
|
121
|
-
readonly dark_orange_alt3: SubTheme;
|
|
122
102
|
readonly dark_pink_alt1: SubTheme;
|
|
123
103
|
readonly dark_pink_alt2: SubTheme;
|
|
124
|
-
readonly dark_pink_alt3: SubTheme;
|
|
125
104
|
readonly dark_purple_alt1: SubTheme;
|
|
126
105
|
readonly dark_purple_alt2: SubTheme;
|
|
127
|
-
readonly dark_purple_alt3: SubTheme;
|
|
128
106
|
readonly dark_red_alt1: SubTheme;
|
|
129
107
|
readonly dark_red_alt2: SubTheme;
|
|
130
|
-
readonly dark_red_alt3: SubTheme;
|
|
131
108
|
readonly dark_yellow_alt1: SubTheme;
|
|
132
109
|
readonly dark_yellow_alt2: SubTheme;
|
|
133
|
-
readonly dark_yellow_alt3: SubTheme;
|
|
134
|
-
readonly dark_teal_alt1: SubTheme;
|
|
135
|
-
readonly dark_teal_alt2: SubTheme;
|
|
136
|
-
readonly dark_teal_alt3: SubTheme;
|
|
137
110
|
readonly dark: BaseTheme;
|
|
138
111
|
readonly dark_active: SubTheme;
|
|
139
112
|
readonly dark_Card: SubTheme;
|
|
@@ -145,7 +118,6 @@ declare const allThemes: {
|
|
|
145
118
|
readonly dark_Button: SubTheme;
|
|
146
119
|
readonly dark_alt1: SubTheme;
|
|
147
120
|
readonly dark_alt2: SubTheme;
|
|
148
|
-
readonly dark_alt3: SubTheme;
|
|
149
121
|
readonly dark_darker: SubTheme;
|
|
150
122
|
readonly light: BaseTheme;
|
|
151
123
|
readonly light_active: SubTheme;
|
|
@@ -157,7 +129,6 @@ declare const allThemes: {
|
|
|
157
129
|
readonly light_DrawerFrame: SubTheme;
|
|
158
130
|
readonly light_alt1: SubTheme;
|
|
159
131
|
readonly light_alt2: SubTheme;
|
|
160
|
-
readonly light_alt3: SubTheme;
|
|
161
132
|
readonly light_darker: SubTheme;
|
|
162
133
|
};
|
|
163
134
|
export declare const themes: TypedThemes;
|