@tamagui/theme-base 1.0.1-beta.56 → 1.0.1-beta.57
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 +30 -35
- package/dist/cjs/themes.js.map +2 -2
- package/dist/esm/themes.js +30 -35
- package/dist/esm/themes.js.map +2 -2
- package/dist/jsx/themes.js +30 -35
- package/package.json +4 -4
- package/types/themes.d.ts +197 -244
- package/types/themes.d.ts.map +1 -1
package/dist/cjs/themes.js
CHANGED
|
@@ -52,7 +52,7 @@ function createThemesFrom(name, getTheme, props) {
|
|
|
52
52
|
let themeEntries = [[name, theme]];
|
|
53
53
|
const altThemes = alternates.map((alt) => [
|
|
54
54
|
`${name}_alt${alt}`,
|
|
55
|
-
getTheme(alt + (props.isLight ?
|
|
55
|
+
getTheme(alt + (props.isLight ? 0 : 0) + shift, props)
|
|
56
56
|
]);
|
|
57
57
|
const altThemes2 = alternates.map((alt) => [
|
|
58
58
|
`${name}_alt${alt}`,
|
|
@@ -212,37 +212,6 @@ const darkThemes = createThemesFrom("dark", themeCreator, {
|
|
|
212
212
|
});
|
|
213
213
|
const light = (0, import_core.createTheme)(__spreadValues(__spreadValues({}, import_tokens.lightColors), lightThemes.light));
|
|
214
214
|
const dark = (0, import_core.createTheme)(__spreadValues(__spreadValues({}, import_tokens.darkColors), darkThemes.dark));
|
|
215
|
-
const darkEntries = Object.entries(dark);
|
|
216
|
-
const lightEntries = Object.entries(light);
|
|
217
|
-
function findColors(prefix, dark2 = false) {
|
|
218
|
-
return Object.fromEntries((dark2 ? darkEntries : lightEntries).filter(([k]) => k.startsWith(prefix)));
|
|
219
|
-
}
|
|
220
|
-
__name(findColors, "findColors");
|
|
221
|
-
const colorSchemes = [
|
|
222
|
-
{ name: "blue", colors: findColors("blue"), darkColors: findColors("blue", true) },
|
|
223
|
-
{ name: "gray", colors: findColors("gray"), darkColors: findColors("gray", true) },
|
|
224
|
-
{ name: "green", colors: findColors("green"), darkColors: findColors("green", true) },
|
|
225
|
-
{ name: "orange", colors: findColors("orange"), darkColors: findColors("orange", true) },
|
|
226
|
-
{ name: "pink", colors: findColors("pink"), darkColors: findColors("pink", true) },
|
|
227
|
-
{ name: "purple", colors: findColors("purple"), darkColors: findColors("purple", true) },
|
|
228
|
-
{ name: "red", colors: findColors("red"), darkColors: findColors("red", true) },
|
|
229
|
-
{ name: "violet", colors: findColors("violet"), darkColors: findColors("violet", true) },
|
|
230
|
-
{ name: "yellow", colors: findColors("yellow"), darkColors: findColors("yellow", true) },
|
|
231
|
-
{ name: "teal", colors: findColors("teal"), darkColors: findColors("teal", true) }
|
|
232
|
-
];
|
|
233
|
-
const colorNames = [
|
|
234
|
-
"blue",
|
|
235
|
-
"gray",
|
|
236
|
-
"green",
|
|
237
|
-
"indigo",
|
|
238
|
-
"orange",
|
|
239
|
-
"pink",
|
|
240
|
-
"purple",
|
|
241
|
-
"red",
|
|
242
|
-
"violet",
|
|
243
|
-
"yellow",
|
|
244
|
-
"teal"
|
|
245
|
-
];
|
|
246
215
|
const baseThemes = __spreadProps(__spreadValues(__spreadProps(__spreadValues({}, lightThemes), {
|
|
247
216
|
light,
|
|
248
217
|
light_active: makeActiveTheme(lightThemes.light),
|
|
@@ -273,6 +242,34 @@ function makeActiveTheme(theme) {
|
|
|
273
242
|
return res;
|
|
274
243
|
}
|
|
275
244
|
__name(makeActiveTheme, "makeActiveTheme");
|
|
245
|
+
const darkEntries = Object.entries(dark);
|
|
246
|
+
const lightEntries = Object.entries(light);
|
|
247
|
+
function findColors(prefix, dark2 = false) {
|
|
248
|
+
return Object.fromEntries((dark2 ? darkEntries : lightEntries).filter(([k]) => k.startsWith(prefix)));
|
|
249
|
+
}
|
|
250
|
+
__name(findColors, "findColors");
|
|
251
|
+
const colorSchemes = [
|
|
252
|
+
{ name: "blue", colors: findColors("blue"), darkColors: findColors("blue", true) },
|
|
253
|
+
{ name: "gray", colors: findColors("gray"), darkColors: findColors("gray", true) },
|
|
254
|
+
{ name: "green", colors: findColors("green"), darkColors: findColors("green", true) },
|
|
255
|
+
{ name: "orange", colors: findColors("orange"), darkColors: findColors("orange", true) },
|
|
256
|
+
{ name: "pink", colors: findColors("pink"), darkColors: findColors("pink", true) },
|
|
257
|
+
{ name: "purple", colors: findColors("purple"), darkColors: findColors("purple", true) },
|
|
258
|
+
{ name: "red", colors: findColors("red"), darkColors: findColors("red", true) },
|
|
259
|
+
{ name: "yellow", colors: findColors("yellow"), darkColors: findColors("yellow", true) },
|
|
260
|
+
{ name: "teal", colors: findColors("teal"), darkColors: findColors("teal", true) }
|
|
261
|
+
];
|
|
262
|
+
const colorNames = [
|
|
263
|
+
"blue",
|
|
264
|
+
"gray",
|
|
265
|
+
"green",
|
|
266
|
+
"orange",
|
|
267
|
+
"pink",
|
|
268
|
+
"purple",
|
|
269
|
+
"red",
|
|
270
|
+
"yellow",
|
|
271
|
+
"teal"
|
|
272
|
+
];
|
|
276
273
|
const colorThemeEntries = colorSchemes.flatMap(({ name, colors, darkColors: darkColors2 }) => {
|
|
277
274
|
const [altLightThemes, altDarkThemes] = [
|
|
278
275
|
{ colors: darkColors2, backgrounds: colors },
|
|
@@ -286,8 +283,6 @@ const colorThemeEntries = colorSchemes.flatMap(({ name, colors, darkColors: dark
|
|
|
286
283
|
];
|
|
287
284
|
const scheme = isLight ? "light" : "dark";
|
|
288
285
|
const shift = isLight ? 0 : 1;
|
|
289
|
-
if (!isLight) {
|
|
290
|
-
}
|
|
291
286
|
const themeWithAlts = createThemesFrom(name, themeCreator, {
|
|
292
287
|
colors: colors2,
|
|
293
288
|
backgrounds,
|
|
@@ -296,7 +291,7 @@ const colorThemeEntries = colorSchemes.flatMap(({ name, colors, darkColors: dark
|
|
|
296
291
|
shift,
|
|
297
292
|
isBase: false,
|
|
298
293
|
offsets: {
|
|
299
|
-
background: isLight ? [
|
|
294
|
+
background: isLight ? [2, 2, 2, 2, 2, 2] : null,
|
|
300
295
|
borderColor: isLight ? [2, 2, 2, 3, 2] : null,
|
|
301
296
|
color: isLight ? [0, 0, -1, -2, -3, -3, -4] : [-1, -1, -1, -1, -1, -1]
|
|
302
297
|
}
|
package/dist/cjs/themes.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/themes.tsx"],
|
|
4
|
-
"sourcesContent": ["import { Variable, createTheme, getVariableValue } from '@tamagui/core'\n\nimport { setColorAlpha } from './colorUtils'\nimport { darkColors, lightColors, tokens } from './tokens'\n\nconst { color } = tokens\n\n// spaghetti ahead\n\ntype ThemeCreatorProps = {\n shift?: number\n backgrounds: (string | Variable)[]\n backgroundStrong?: string | Variable\n borderColors?: (string | Variable)[]\n colors?: (string | Variable)[]\n offsets?: {\n color?: number[] | null\n background?: number[] | null\n borderColor?: number[] | null\n }\n isLight?: boolean\n isBase?: boolean\n}\n\n// helpers\n\nconst alternates = [1, 2, 3, 4] as const\nconst alts = [1, 2, 3] as const\ntype AltKeys = 1 | 2 | 3\ntype AltName<Name extends string, Keys extends string | number> = `${Name}_alt${Keys}`\ntype ThemeCreator<A = any> = (str: number, props: ThemeCreatorProps) => A\n\nfunction createThemesFrom<Name extends string, GetTheme extends ThemeCreator = ThemeCreator>(\n name: Name,\n getTheme: GetTheme,\n props: ThemeCreatorProps\n): {\n [key in `${Name}_alt${AltKeys}` | `${Name}` | `${Name}_darker`]: GetTheme extends ThemeCreator<\n infer Theme\n >\n ? Theme\n : never\n} {\n const { shift = 0 } = props\n const theme = getTheme(0 + shift, props)\n let themeEntries: any[] = [[name, theme]]\n\n // generate alternates (for use in other themes), but keep just alts\n const altThemes: any[] = alternates.map((alt) => [\n `${name}_alt${alt}`,\n getTheme(alt + (props.isLight ? 1 : 0) + shift, props),\n ])\n const altThemes2: any[] = alternates.map((alt) => [\n `${name}_alt${alt}`,\n getTheme(alt + shift, props),\n ])\n const altButtonThemes: any[] = alternates.map((_, i) => {\n const [bName, bTheme] = [altThemes2[i][0], (altThemes2[i + 1] || altThemes2[i])[1]]\n return [`${bName}_Button` as any, bTheme]\n })\n // add these after alts since we rely on positioning\n const darkerTheme = getTheme(Math.max(0, shift + (props.isLight ? 1 : -1)), props)\n const activeTheme = makeActiveTheme(theme)\n\n // TODO can be de-duped\n const inverted = altThemes.map(([_name, theme]) => {\n return {\n ...theme,\n background: theme.color,\n backgroundHover: theme.colorHover,\n backgroundFocus: theme.colorFocus,\n backgroundPress: theme.colorPress,\n color: theme.background,\n colorHover: theme.backgroundHover,\n colorFocus: theme.backgroundFocus,\n colorPress: theme.backgroundPress,\n }\n })\n\n themeEntries = [\n ...themeEntries,\n // keep just alts\n ...altThemes.slice(0, alts.length),\n ...altButtonThemes.slice(0, alts.length),\n [`${name}_Button`, altThemes2[1][1]],\n [`${name}_DrawerFrame`, altThemes2[1][1]],\n [`${name}_SliderTrack`, altThemes[1][1]],\n [`${name}_SliderTrackActive`, altThemes[3][1]],\n [`${name}_SliderThumb`, inverted[2]],\n [`${name}_Progress`, altThemes[2][1]],\n [`${name}_ProgressIndicator`, inverted[2]],\n [`${name}_Switch`, altThemes[0][1]],\n [`${name}_SwitchThumb`, inverted[2]],\n [`${name}_TooltipArrow`, altThemes[1][1]],\n [`${name}_TooltipContent`, altThemes[1][1]],\n [`${name}_darker`, darkerTheme],\n [`${name}_active`, activeTheme],\n ]\n const themes = Object.fromEntries(themeEntries)\n // if (props.isLight) {\n // console.log('themes', themes)\n // }\n return themes as any\n}\n\nconst themeCreator = (\n str = 1,\n {\n backgrounds,\n isLight = true,\n isBase = false,\n colors = [...backgrounds].reverse(),\n borderColors = isLight ? colors : backgrounds,\n backgroundStrong,\n offsets: offsetsProp,\n }: ThemeCreatorProps\n) => {\n const offsets = {\n borderColor: offsetsProp?.borderColor ?? offsetsProp?.background ?? [0, 0, 0, 0],\n background: offsetsProp?.background ?? [0, 0, 0, 0],\n color: offsetsProp?.color ?? [0, 0, 0, 0],\n }\n const darkColors = isLight ? colors : backgrounds\n const lighterDir = isLight ? -1 : 1\n const darkerDir = -lighterDir\n const strongerDir = isLight ? darkerDir : lighterDir\n const softerDir = -strongerDir\n const get = (arr: any[], index: number, name = 'background') => {\n return arr[Math.max(0, Math.min(index + (offsets[name][str] || 0), arr.length - 1))]\n }\n\n const colorTranslucent = setColorAlpha(getVariableValue(get(colors, 0 + str, 'color')), 0.5)\n\n let theme = {\n background: get(backgrounds, str),\n backgroundStrong: backgroundStrong || get(backgrounds, str + strongerDir * 2),\n backgroundSoft: get(backgrounds, str + softerDir * 2),\n backgroundHover: get(backgrounds, str + lighterDir),\n backgroundPress: get(backgrounds, str + darkerDir),\n backgroundFocus: get(backgrounds, str + darkerDir * 2),\n backgroundTransparent: color.grayA1Light,\n color: get(colors, 0 + str, 'color'),\n colorHover: get(colors, 1 + str, 'color'),\n colorPress: get(colors, 2 + str, 'color'),\n colorFocus: get(colors, 3 + str, 'color'),\n colorTranslucent,\n colorMid: (isLight ? colors : backgrounds)[Math.floor(colors.length / 2)],\n shadowColor: isLight ? color.grayA2Light : color.grayA8Light,\n shadowColorHover: darkColors[!isLight ? 1 : 8],\n shadowColorPress: darkColors[!isLight ? 1 : 8],\n shadowColorFocus: darkColors[!isLight ? 1 : 8],\n borderColor: null as any as string | Variable,\n borderColorHover: null as any as string | Variable,\n borderColorPress: null as any as string | Variable,\n borderColorFocus: null as any as string | Variable,\n }\n\n if (isBase) {\n Object.assign(theme, {\n borderColor: isLight\n ? get(colors, 8 - str, 'borderColor')\n : get(backgrounds, 2 + str, 'borderColor'),\n borderColorHover: isLight\n ? get(colors, 6 - str, 'borderColor')\n : get(backgrounds, 3 + str, 'borderColor'),\n borderColorPress: isLight\n ? get(colors, 5 - str, 'borderColor')\n : get(backgrounds, 1 + str, 'borderColor'),\n borderColorFocus: isLight\n ? get(colors, 4 - str, 'borderColor')\n : get(backgrounds, 3 + str, 'borderColor'),\n })\n } else {\n Object.assign(theme, {\n borderColor: get(borderColors, 1 + strongerDir, 'borderColor'),\n borderColorHover: get(borderColors, 2 + strongerDir, 'borderColor'),\n borderColorPress: get(borderColors, 3 + strongerDir, 'borderColor'),\n borderColorFocus: get(borderColors, 4 + strongerDir, 'borderColor'),\n })\n }\n\n return theme\n}\n\nconst themeColors = {\n light: [\n '#fff',\n '#f4f4f4',\n color.gray1Light,\n color.gray2Light,\n color.gray3Light,\n color.gray4Light,\n color.gray5Light,\n color.gray6Light,\n color.gray7Light,\n color.gray8Light,\n color.gray9Light,\n color.gray10Light,\n color.gray11Light,\n color.gray12Light,\n ],\n dark: [\n '#111111',\n '#151515',\n '#191919',\n '#232323',\n '#282828',\n '#323232',\n '#383838',\n '#424242',\n '#494949',\n '#545454',\n '#626262',\n '#777777',\n ],\n}\n\nconst lightThemes = createThemesFrom('light', themeCreator, {\n backgrounds: themeColors.light,\n // isBase: true,\n backgroundStrong: '#fafafa',\n borderColors: themeColors.light.slice(2),\n isLight: true,\n})\n\nconst darkThemes = createThemesFrom('dark', themeCreator, {\n backgrounds: themeColors.dark,\n colors: themeColors.light.slice(2),\n backgroundStrong: '#111',\n isBase: true,\n isLight: false,\n shift: 1,\n offsets: {\n color: [0, 4, 5, 5, 5, 5],\n },\n})\n\nconst light = createTheme({\n ...lightColors,\n ...lightThemes.light,\n})\n\nconst dark = createTheme({\n ...darkColors,\n ...darkThemes.dark,\n})\n\nconst darkEntries = Object.entries(dark)\nconst lightEntries = Object.entries(light)\nfunction findColors(prefix: string, dark = false) {\n return Object.fromEntries(\n (dark ? darkEntries : lightEntries).filter(([k]) => k.startsWith(prefix))\n )\n}\n\nexport const colorSchemes = [\n { name: 'blue', colors: findColors('blue'), darkColors: findColors('blue', true) },\n { name: 'gray', colors: findColors('gray'), darkColors: findColors('gray', true) },\n { name: 'green', colors: findColors('green'), darkColors: findColors('green', true) },\n { name: 'orange', colors: findColors('orange'), darkColors: findColors('orange', true) },\n { name: 'pink', colors: findColors('pink'), darkColors: findColors('pink', true) },\n { name: 'purple', colors: findColors('purple'), darkColors: findColors('purple', true) },\n { name: 'red', colors: findColors('red'), darkColors: findColors('red', true) },\n { name: 'violet', colors: findColors('violet'), darkColors: findColors('violet', true) },\n { name: 'yellow', colors: findColors('yellow'), darkColors: findColors('yellow', true) },\n { name: 'teal', colors: findColors('teal'), darkColors: findColors('teal', true) },\n] as const\n\nexport type ColorNames = typeof colorSchemes[number]['name']\n\n// nice and flat\nexport const colorNames = [\n 'blue',\n 'gray',\n 'green',\n 'indigo',\n 'orange',\n 'pink',\n 'purple',\n 'red',\n 'violet',\n 'yellow',\n 'teal',\n] as const\n\nconst baseThemes = {\n // light\n ...lightThemes,\n light,\n light_active: makeActiveTheme(lightThemes.light),\n light_Card: lightThemes.light,\n light_Button: lightThemes.light,\n light_SliderTrack: lightThemes.light_alt1,\n light_SliderTrackActive: lightThemes.light_alt2,\n light_Switch: lightThemes.light,\n light_SwitchThumb: lightThemes.light_alt1,\n light_DrawerFrame: lightThemes.light_alt1,\n\n // dark\n ...darkThemes,\n dark,\n dark_active: makeActiveTheme(darkThemes.dark),\n dark_Card: darkThemes.dark,\n dark_DrawerFrame: darkThemes.dark_alt1,\n dark_SliderTrack: darkThemes.dark_darker,\n dark_SliderTrackActive: darkThemes.dark_alt1,\n dark_Switch: darkThemes.dark_darker,\n dark_SwitchThumb: darkThemes.dark_alt1,\n dark_Button: darkThemes.dark_alt1,\n}\n\nfunction makeActiveTheme(theme: any) {\n const res = { ...theme }\n res.backgroundHover = res.background\n res.colorHover = res.color\n res.backgroundPress = res.background\n res.colorPress = res.color\n return res\n}\n\ntype ColorThemeNames =\n | ColorNames\n | AltName<`light_${ColorNames}`, AltKeys>\n | AltName<`dark_${ColorNames}`, AltKeys>\n\nconst colorThemeEntries = colorSchemes.flatMap(({ name, colors, darkColors }) => {\n const [altLightThemes, altDarkThemes] = [\n { colors: darkColors, backgrounds: colors },\n { colors, backgrounds: darkColors },\n ].map((props, i) => {\n const isLight = i === 0\n const colorsBase = Object.values(props.colors).slice(2)\n const [backgrounds, colors] = [\n Object.values(props.backgrounds),\n isLight ? colorsBase : [colorsBase[0], '#ccc', ...colorsBase.slice(1)],\n ] as const\n\n const scheme = isLight ? 'light' : 'dark'\n const shift = isLight ? 0 : 1\n\n if (!isLight) {\n // const [_, h, sp, lp] = backgrounds[0].match(/hsl\\(([0-9\\.]+), ([0-9\\.]+)\\%, ([0-9\\.]+)\\%\\)/)!\n // backgrounds.unshift(`hsl(${h}, ${sp}%, ${parseFloat(lp) / 2}%)`)\n }\n\n const themeWithAlts = createThemesFrom(name, themeCreator, {\n colors,\n backgrounds,\n borderColors: backgrounds,\n isLight,\n shift,\n isBase: false,\n offsets: {\n background: isLight ? [1, 1, 1, 1, 1, 1] : null,\n borderColor: isLight ? [2, 2, 2, 3, 2] : null,\n color: isLight ? [0, 0, -1, -2, -3, -3, -4] : [-1, -1, -1, -1, -1, -1],\n },\n })\n\n return Object.entries(themeWithAlts).map(([k, v]) => [`${scheme}_${k}`, v])\n })\n return [...altLightThemes, ...altDarkThemes]\n})\n\ntype MyThemeBase = typeof baseThemes['light_alt1']\n\nconst colorThemes: {\n [key in ColorThemeNames]: MyThemeBase\n} = Object.fromEntries(colorThemeEntries) as any\n\nconst allThemes = {\n ...baseThemes,\n ...colorThemes,\n} as const\n\nexport const themes: {\n [key in keyof typeof allThemes]: typeof baseThemes['light']\n} = allThemes as any\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,
|
|
4
|
+
"sourcesContent": ["import { Variable, createTheme, createVariable, getVariableValue } from '@tamagui/core'\n\nimport { setColorAlpha } from './colorUtils'\nimport { darkColors, lightColors, tokens } from './tokens'\n\nconst { color } = tokens\n\n// spaghetti ahead\n\ntype ThemeCreatorProps = {\n shift?: number\n backgrounds: (string | Variable)[]\n backgroundStrong?: string | Variable\n borderColors?: (string | Variable)[]\n colors?: (string | Variable)[]\n offsets?: {\n color?: number[] | null\n background?: number[] | null\n borderColor?: number[] | null\n }\n isLight?: boolean\n isBase?: boolean\n}\n\n// helpers\n\nconst alternates = [1, 2, 3, 4] as const\nconst alts = [1, 2, 3] as const\ntype AltKeys = 1 | 2 | 3\ntype AltName<Name extends string, Keys extends string | number> = `${Name}_alt${Keys}`\ntype ThemeCreator<A = any> = (str: number, props: ThemeCreatorProps) => A\n\nfunction createThemesFrom<Name extends string, GetTheme extends ThemeCreator = ThemeCreator>(\n name: Name,\n getTheme: GetTheme,\n props: ThemeCreatorProps\n): {\n [key in `${Name}_alt${AltKeys}` | `${Name}` | `${Name}_darker`]: GetTheme extends ThemeCreator<\n infer Theme\n >\n ? Theme\n : never\n} {\n const { shift = 0 } = props\n const theme = getTheme(0 + shift, props)\n let themeEntries: any[] = [[name, theme]]\n\n // generate alternates (for use in other themes), but keep just alts\n const altThemes: any[] = alternates.map((alt) => [\n `${name}_alt${alt}`,\n getTheme(alt + (props.isLight ? 0 : 0) + shift, props),\n ])\n const altThemes2: any[] = alternates.map((alt) => [\n `${name}_alt${alt}`,\n getTheme(alt + shift, props),\n ])\n const altButtonThemes: any[] = alternates.map((_, i) => {\n const [bName, bTheme] = [altThemes2[i][0], (altThemes2[i + 1] || altThemes2[i])[1]]\n return [`${bName}_Button` as any, bTheme]\n })\n // add these after alts since we rely on positioning\n const darkerTheme = getTheme(Math.max(0, shift + (props.isLight ? 1 : -1)), props)\n const activeTheme = makeActiveTheme(theme)\n\n // TODO can be de-duped\n const inverted = altThemes.map(([_name, theme]) => {\n return {\n ...theme,\n background: theme.color,\n backgroundHover: theme.colorHover,\n backgroundFocus: theme.colorFocus,\n backgroundPress: theme.colorPress,\n color: theme.background,\n colorHover: theme.backgroundHover,\n colorFocus: theme.backgroundFocus,\n colorPress: theme.backgroundPress,\n }\n })\n\n themeEntries = [\n ...themeEntries,\n // keep just alts\n ...altThemes.slice(0, alts.length),\n ...altButtonThemes.slice(0, alts.length),\n [`${name}_Button`, altThemes2[1][1]],\n [`${name}_DrawerFrame`, altThemes2[1][1]],\n [`${name}_SliderTrack`, altThemes[1][1]],\n [`${name}_SliderTrackActive`, altThemes[3][1]],\n [`${name}_SliderThumb`, inverted[2]],\n [`${name}_Progress`, altThemes[2][1]],\n [`${name}_ProgressIndicator`, inverted[2]],\n [`${name}_Switch`, altThemes[0][1]],\n [`${name}_SwitchThumb`, inverted[2]],\n [`${name}_TooltipArrow`, altThemes[1][1]],\n [`${name}_TooltipContent`, altThemes[1][1]],\n [`${name}_darker`, darkerTheme],\n [`${name}_active`, activeTheme],\n ]\n const themes = Object.fromEntries(themeEntries)\n // if (props.isLight) {\n // console.log('themes', themes)\n // }\n return themes as any\n}\n\nconst themeCreator = (\n str = 1,\n {\n backgrounds,\n isLight = true,\n isBase = false,\n colors = [...backgrounds].reverse(),\n borderColors = isLight ? colors : backgrounds,\n backgroundStrong,\n offsets: offsetsProp,\n }: ThemeCreatorProps\n) => {\n const offsets = {\n borderColor: offsetsProp?.borderColor ?? offsetsProp?.background ?? [0, 0, 0, 0],\n background: offsetsProp?.background ?? [0, 0, 0, 0],\n color: offsetsProp?.color ?? [0, 0, 0, 0],\n }\n const darkColors = isLight ? colors : backgrounds\n const lighterDir = isLight ? -1 : 1\n const darkerDir = -lighterDir\n const strongerDir = isLight ? darkerDir : lighterDir\n const softerDir = -strongerDir\n const get = (arr: any[], index: number, name = 'background') => {\n return arr[Math.max(0, Math.min(index + (offsets[name][str] || 0), arr.length - 1))]\n }\n\n const colorTranslucent = setColorAlpha(getVariableValue(get(colors, 0 + str, 'color')), 0.5)\n\n let theme = {\n background: get(backgrounds, str),\n backgroundStrong: backgroundStrong || get(backgrounds, str + strongerDir * 2),\n backgroundSoft: get(backgrounds, str + softerDir * 2),\n backgroundHover: get(backgrounds, str + lighterDir),\n backgroundPress: get(backgrounds, str + darkerDir),\n backgroundFocus: get(backgrounds, str + darkerDir * 2),\n backgroundTransparent: color.grayA1Light,\n color: get(colors, 0 + str, 'color'),\n colorHover: get(colors, 1 + str, 'color'),\n colorPress: get(colors, 2 + str, 'color'),\n colorFocus: get(colors, 3 + str, 'color'),\n colorTranslucent,\n colorMid: (isLight ? colors : backgrounds)[Math.floor(colors.length / 2)],\n shadowColor: isLight ? color.grayA2Light : color.grayA8Light,\n shadowColorHover: darkColors[!isLight ? 1 : 8],\n shadowColorPress: darkColors[!isLight ? 1 : 8],\n shadowColorFocus: darkColors[!isLight ? 1 : 8],\n borderColor: null as any as string | Variable,\n borderColorHover: null as any as string | Variable,\n borderColorPress: null as any as string | Variable,\n borderColorFocus: null as any as string | Variable,\n }\n\n if (isBase) {\n Object.assign(theme, {\n borderColor: isLight\n ? get(colors, 8 - str, 'borderColor')\n : get(backgrounds, 2 + str, 'borderColor'),\n borderColorHover: isLight\n ? get(colors, 6 - str, 'borderColor')\n : get(backgrounds, 3 + str, 'borderColor'),\n borderColorPress: isLight\n ? get(colors, 5 - str, 'borderColor')\n : get(backgrounds, 1 + str, 'borderColor'),\n borderColorFocus: isLight\n ? get(colors, 4 - str, 'borderColor')\n : get(backgrounds, 3 + str, 'borderColor'),\n })\n } else {\n Object.assign(theme, {\n borderColor: get(borderColors, 1 + strongerDir, 'borderColor'),\n borderColorHover: get(borderColors, 2 + strongerDir, 'borderColor'),\n borderColorPress: get(borderColors, 3 + strongerDir, 'borderColor'),\n borderColorFocus: get(borderColors, 4 + strongerDir, 'borderColor'),\n })\n }\n\n return theme\n}\n\nconst themeColors = {\n light: [\n '#fff',\n '#f4f4f4',\n color.gray1Light,\n color.gray2Light,\n color.gray3Light,\n color.gray4Light,\n color.gray5Light,\n color.gray6Light,\n color.gray7Light,\n color.gray8Light,\n color.gray9Light,\n color.gray10Light,\n color.gray11Light,\n color.gray12Light,\n ],\n dark: [\n '#111111',\n '#151515',\n '#191919',\n '#232323',\n '#282828',\n '#323232',\n '#383838',\n '#424242',\n '#494949',\n '#545454',\n '#626262',\n '#777777',\n ],\n}\n\nconst lightThemes = createThemesFrom('light', themeCreator, {\n backgrounds: themeColors.light,\n // isBase: true,\n backgroundStrong: '#fafafa',\n borderColors: themeColors.light.slice(2),\n isLight: true,\n})\n\nconst darkThemes = createThemesFrom('dark', themeCreator, {\n backgrounds: themeColors.dark,\n colors: themeColors.light.slice(2),\n backgroundStrong: '#111',\n isBase: true,\n isLight: false,\n shift: 1,\n offsets: {\n color: [0, 4, 5, 5, 5, 5],\n },\n})\n\nconst light = createTheme({\n ...lightColors,\n ...lightThemes.light,\n})\n\nconst dark = createTheme({\n ...darkColors,\n ...darkThemes.dark,\n})\n\ntype ThemeBase = {\n [Key in keyof typeof dark]: string\n}\n\nconst baseThemes = {\n // light\n ...lightThemes,\n light,\n light_active: makeActiveTheme(lightThemes.light),\n light_Card: lightThemes.light,\n light_Button: lightThemes.light,\n light_SliderTrack: lightThemes.light_alt1,\n light_SliderTrackActive: lightThemes.light_alt2,\n light_Switch: lightThemes.light,\n light_SwitchThumb: lightThemes.light_alt1,\n light_DrawerFrame: lightThemes.light_alt1,\n\n // dark\n ...darkThemes,\n dark,\n dark_active: makeActiveTheme(darkThemes.dark),\n dark_Card: darkThemes.dark,\n dark_DrawerFrame: darkThemes.dark_alt1,\n dark_SliderTrack: darkThemes.dark_darker,\n dark_SliderTrackActive: darkThemes.dark_alt1,\n dark_Switch: darkThemes.dark_darker,\n dark_SwitchThumb: darkThemes.dark_alt1,\n dark_Button: darkThemes.dark_alt1,\n}\n\nfunction makeActiveTheme(theme: any) {\n const res = { ...theme }\n res.backgroundHover = res.background\n res.colorHover = res.color\n res.backgroundPress = res.background\n res.colorPress = res.color\n return res\n}\n\nconst darkEntries = Object.entries(dark)\nconst lightEntries = Object.entries(light)\nfunction findColors(prefix: string, dark = false): ThemeBase {\n return Object.fromEntries(\n (dark ? darkEntries : lightEntries).filter(([k]) => k.startsWith(prefix))\n ) as any\n}\n\nexport const colorSchemes = [\n { name: 'blue', colors: findColors('blue'), darkColors: findColors('blue', true) },\n { name: 'gray', colors: findColors('gray'), darkColors: findColors('gray', true) },\n { name: 'green', colors: findColors('green'), darkColors: findColors('green', true) },\n { name: 'orange', colors: findColors('orange'), darkColors: findColors('orange', true) },\n { name: 'pink', colors: findColors('pink'), darkColors: findColors('pink', true) },\n { name: 'purple', colors: findColors('purple'), darkColors: findColors('purple', true) },\n { name: 'red', colors: findColors('red'), darkColors: findColors('red', true) },\n { name: 'yellow', colors: findColors('yellow'), darkColors: findColors('yellow', true) },\n { name: 'teal', colors: findColors('teal'), darkColors: findColors('teal', true) },\n] as const\n\nexport type ColorNames = typeof colorSchemes[number]['name']\n\n// nice and flat\nexport const colorNames: ColorNames[] = [\n 'blue',\n 'gray',\n 'green',\n 'orange',\n 'pink',\n 'purple',\n 'red',\n 'yellow',\n 'teal',\n]\n\ntype ColorThemeNames =\n | ColorNames\n | AltName<`light_${ColorNames}`, AltKeys>\n | AltName<`dark_${ColorNames}`, AltKeys>\n\nconst colorThemeEntries = colorSchemes.flatMap(({ name, colors, darkColors }) => {\n const [altLightThemes, altDarkThemes] = [\n { colors: darkColors, backgrounds: colors },\n { colors, backgrounds: darkColors },\n ].map((props, i) => {\n const isLight = i === 0\n const colorsBase = Object.values(props.colors).slice(2)\n const [backgrounds, colors] = [\n Object.values(props.backgrounds),\n isLight ? colorsBase : [colorsBase[0], '#ccc', ...colorsBase.slice(1)],\n ] as const\n\n const scheme = isLight ? 'light' : 'dark'\n const shift = isLight ? 0 : 1\n\n // if (!isLight) {\n // const [_, h, sp, lp] = backgrounds[0].match(/hsl\\(([0-9\\.]+), ([0-9\\.]+)\\%, ([0-9\\.]+)\\%\\)/)!\n // backgrounds.unshift(`hsl(${h}, ${sp}%, ${parseFloat(lp) / 2}%)`)\n // }\n\n const themeWithAlts = createThemesFrom(name, themeCreator, {\n colors,\n backgrounds,\n borderColors: backgrounds,\n isLight,\n shift,\n isBase: false,\n offsets: {\n background: isLight ? [2, 2, 2, 2, 2, 2] : null,\n borderColor: isLight ? [2, 2, 2, 3, 2] : null,\n color: isLight ? [0, 0, -1, -2, -3, -3, -4] : [-1, -1, -1, -1, -1, -1],\n },\n })\n\n return Object.entries(themeWithAlts).map(([k, v]) => [`${scheme}_${k}`, v])\n })\n return [...altLightThemes, ...altDarkThemes]\n})\n\ntype MyThemeBase = typeof baseThemes['light_alt1']\n\nconst colorThemes: {\n [key in ColorThemeNames]: MyThemeBase\n} = Object.fromEntries(colorThemeEntries) as any\n\nconst allThemes = {\n ...baseThemes,\n ...colorThemes,\n} as const\n\nexport const themes: {\n [key in keyof typeof allThemes]: typeof baseThemes['light']\n} = allThemes as any\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAwE;AAExE,wBAA8B;AAC9B,oBAAgD;AAEhD,MAAM,EAAE,UAAU;AAqBlB,MAAM,aAAa,CAAC,GAAG,GAAG,GAAG,CAAC;AAC9B,MAAM,OAAO,CAAC,GAAG,GAAG,CAAC;AAKrB,0BACE,MACA,UACA,OAOA;AACA,QAAM,EAAE,QAAQ,MAAM;AACtB,QAAM,QAAQ,SAAS,IAAI,OAAO,KAAK;AACvC,MAAI,eAAsB,CAAC,CAAC,MAAM,KAAK,CAAC;AAGxC,QAAM,YAAmB,WAAW,IAAI,CAAC,QAAQ;AAAA,IAC/C,GAAG,WAAW;AAAA,IACd,SAAS,MAAO,OAAM,UAAU,IAAI,KAAK,OAAO,KAAK;AAAA,EACvD,CAAC;AACD,QAAM,aAAoB,WAAW,IAAI,CAAC,QAAQ;AAAA,IAChD,GAAG,WAAW;AAAA,IACd,SAAS,MAAM,OAAO,KAAK;AAAA,EAC7B,CAAC;AACD,QAAM,kBAAyB,WAAW,IAAI,CAAC,GAAG,MAAM;AACtD,UAAM,CAAC,OAAO,UAAU,CAAC,WAAW,GAAG,IAAK,YAAW,IAAI,MAAM,WAAW,IAAI,EAAE;AAClF,WAAO,CAAC,GAAG,gBAAuB,MAAM;AAAA,EAC1C,CAAC;AAED,QAAM,cAAc,SAAS,KAAK,IAA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IACF,CAAC;AAED,WAAO,OAAO,QAAQ,aAAa,EAAE,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,GAAG,UAAU,KAAK,CAAC,CAAC;AAAA,EAC5E,CAAC;AACD,SAAO,CAAC,GAAG,gBAAgB,GAAG,aAAa;AAC7C,CAAC;AAID,MAAM,cAEF,OAAO,YAAY,iBAAiB;AAExC,MAAM,YAAY,kCACb,aACA;AAGE,MAAM,SAET;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/themes.js
CHANGED
|
@@ -12,7 +12,7 @@ function createThemesFrom(name, getTheme, props) {
|
|
|
12
12
|
let themeEntries = [[name, theme]];
|
|
13
13
|
const altThemes = alternates.map((alt) => [
|
|
14
14
|
`${name}_alt${alt}`,
|
|
15
|
-
getTheme(alt + (props.isLight ?
|
|
15
|
+
getTheme(alt + (props.isLight ? 0 : 0) + shift, props)
|
|
16
16
|
]);
|
|
17
17
|
const altThemes2 = alternates.map((alt) => [
|
|
18
18
|
`${name}_alt${alt}`,
|
|
@@ -180,37 +180,6 @@ const dark = createTheme({
|
|
|
180
180
|
...darkColors,
|
|
181
181
|
...darkThemes.dark
|
|
182
182
|
});
|
|
183
|
-
const darkEntries = Object.entries(dark);
|
|
184
|
-
const lightEntries = Object.entries(light);
|
|
185
|
-
function findColors(prefix, dark2 = false) {
|
|
186
|
-
return Object.fromEntries((dark2 ? darkEntries : lightEntries).filter(([k]) => k.startsWith(prefix)));
|
|
187
|
-
}
|
|
188
|
-
__name(findColors, "findColors");
|
|
189
|
-
const colorSchemes = [
|
|
190
|
-
{ name: "blue", colors: findColors("blue"), darkColors: findColors("blue", true) },
|
|
191
|
-
{ name: "gray", colors: findColors("gray"), darkColors: findColors("gray", true) },
|
|
192
|
-
{ name: "green", colors: findColors("green"), darkColors: findColors("green", true) },
|
|
193
|
-
{ name: "orange", colors: findColors("orange"), darkColors: findColors("orange", true) },
|
|
194
|
-
{ name: "pink", colors: findColors("pink"), darkColors: findColors("pink", true) },
|
|
195
|
-
{ name: "purple", colors: findColors("purple"), darkColors: findColors("purple", true) },
|
|
196
|
-
{ name: "red", colors: findColors("red"), darkColors: findColors("red", true) },
|
|
197
|
-
{ name: "violet", colors: findColors("violet"), darkColors: findColors("violet", true) },
|
|
198
|
-
{ name: "yellow", colors: findColors("yellow"), darkColors: findColors("yellow", true) },
|
|
199
|
-
{ name: "teal", colors: findColors("teal"), darkColors: findColors("teal", true) }
|
|
200
|
-
];
|
|
201
|
-
const colorNames = [
|
|
202
|
-
"blue",
|
|
203
|
-
"gray",
|
|
204
|
-
"green",
|
|
205
|
-
"indigo",
|
|
206
|
-
"orange",
|
|
207
|
-
"pink",
|
|
208
|
-
"purple",
|
|
209
|
-
"red",
|
|
210
|
-
"violet",
|
|
211
|
-
"yellow",
|
|
212
|
-
"teal"
|
|
213
|
-
];
|
|
214
183
|
const baseThemes = {
|
|
215
184
|
...lightThemes,
|
|
216
185
|
light,
|
|
@@ -242,6 +211,34 @@ function makeActiveTheme(theme) {
|
|
|
242
211
|
return res;
|
|
243
212
|
}
|
|
244
213
|
__name(makeActiveTheme, "makeActiveTheme");
|
|
214
|
+
const darkEntries = Object.entries(dark);
|
|
215
|
+
const lightEntries = Object.entries(light);
|
|
216
|
+
function findColors(prefix, dark2 = false) {
|
|
217
|
+
return Object.fromEntries((dark2 ? darkEntries : lightEntries).filter(([k]) => k.startsWith(prefix)));
|
|
218
|
+
}
|
|
219
|
+
__name(findColors, "findColors");
|
|
220
|
+
const colorSchemes = [
|
|
221
|
+
{ name: "blue", colors: findColors("blue"), darkColors: findColors("blue", true) },
|
|
222
|
+
{ name: "gray", colors: findColors("gray"), darkColors: findColors("gray", true) },
|
|
223
|
+
{ name: "green", colors: findColors("green"), darkColors: findColors("green", true) },
|
|
224
|
+
{ name: "orange", colors: findColors("orange"), darkColors: findColors("orange", true) },
|
|
225
|
+
{ name: "pink", colors: findColors("pink"), darkColors: findColors("pink", true) },
|
|
226
|
+
{ name: "purple", colors: findColors("purple"), darkColors: findColors("purple", true) },
|
|
227
|
+
{ name: "red", colors: findColors("red"), darkColors: findColors("red", true) },
|
|
228
|
+
{ name: "yellow", colors: findColors("yellow"), darkColors: findColors("yellow", true) },
|
|
229
|
+
{ name: "teal", colors: findColors("teal"), darkColors: findColors("teal", true) }
|
|
230
|
+
];
|
|
231
|
+
const colorNames = [
|
|
232
|
+
"blue",
|
|
233
|
+
"gray",
|
|
234
|
+
"green",
|
|
235
|
+
"orange",
|
|
236
|
+
"pink",
|
|
237
|
+
"purple",
|
|
238
|
+
"red",
|
|
239
|
+
"yellow",
|
|
240
|
+
"teal"
|
|
241
|
+
];
|
|
245
242
|
const colorThemeEntries = colorSchemes.flatMap(({ name, colors, darkColors: darkColors2 }) => {
|
|
246
243
|
const [altLightThemes, altDarkThemes] = [
|
|
247
244
|
{ colors: darkColors2, backgrounds: colors },
|
|
@@ -255,8 +252,6 @@ const colorThemeEntries = colorSchemes.flatMap(({ name, colors, darkColors: dark
|
|
|
255
252
|
];
|
|
256
253
|
const scheme = isLight ? "light" : "dark";
|
|
257
254
|
const shift = isLight ? 0 : 1;
|
|
258
|
-
if (!isLight) {
|
|
259
|
-
}
|
|
260
255
|
const themeWithAlts = createThemesFrom(name, themeCreator, {
|
|
261
256
|
colors: colors2,
|
|
262
257
|
backgrounds,
|
|
@@ -265,7 +260,7 @@ const colorThemeEntries = colorSchemes.flatMap(({ name, colors, darkColors: dark
|
|
|
265
260
|
shift,
|
|
266
261
|
isBase: false,
|
|
267
262
|
offsets: {
|
|
268
|
-
background: isLight ? [
|
|
263
|
+
background: isLight ? [2, 2, 2, 2, 2, 2] : null,
|
|
269
264
|
borderColor: isLight ? [2, 2, 2, 3, 2] : null,
|
|
270
265
|
color: isLight ? [0, 0, -1, -2, -3, -3, -4] : [-1, -1, -1, -1, -1, -1]
|
|
271
266
|
}
|
package/dist/esm/themes.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/themes.tsx"],
|
|
4
|
-
"sourcesContent": ["import { Variable, createTheme, getVariableValue } from '@tamagui/core'\n\nimport { setColorAlpha } from './colorUtils'\nimport { darkColors, lightColors, tokens } from './tokens'\n\nconst { color } = tokens\n\n// spaghetti ahead\n\ntype ThemeCreatorProps = {\n shift?: number\n backgrounds: (string | Variable)[]\n backgroundStrong?: string | Variable\n borderColors?: (string | Variable)[]\n colors?: (string | Variable)[]\n offsets?: {\n color?: number[] | null\n background?: number[] | null\n borderColor?: number[] | null\n }\n isLight?: boolean\n isBase?: boolean\n}\n\n// helpers\n\nconst alternates = [1, 2, 3, 4] as const\nconst alts = [1, 2, 3] as const\ntype AltKeys = 1 | 2 | 3\ntype AltName<Name extends string, Keys extends string | number> = `${Name}_alt${Keys}`\ntype ThemeCreator<A = any> = (str: number, props: ThemeCreatorProps) => A\n\nfunction createThemesFrom<Name extends string, GetTheme extends ThemeCreator = ThemeCreator>(\n name: Name,\n getTheme: GetTheme,\n props: ThemeCreatorProps\n): {\n [key in `${Name}_alt${AltKeys}` | `${Name}` | `${Name}_darker`]: GetTheme extends ThemeCreator<\n infer Theme\n >\n ? Theme\n : never\n} {\n const { shift = 0 } = props\n const theme = getTheme(0 + shift, props)\n let themeEntries: any[] = [[name, theme]]\n\n // generate alternates (for use in other themes), but keep just alts\n const altThemes: any[] = alternates.map((alt) => [\n `${name}_alt${alt}`,\n getTheme(alt + (props.isLight ? 1 : 0) + shift, props),\n ])\n const altThemes2: any[] = alternates.map((alt) => [\n `${name}_alt${alt}`,\n getTheme(alt + shift, props),\n ])\n const altButtonThemes: any[] = alternates.map((_, i) => {\n const [bName, bTheme] = [altThemes2[i][0], (altThemes2[i + 1] || altThemes2[i])[1]]\n return [`${bName}_Button` as any, bTheme]\n })\n // add these after alts since we rely on positioning\n const darkerTheme = getTheme(Math.max(0, shift + (props.isLight ? 1 : -1)), props)\n const activeTheme = makeActiveTheme(theme)\n\n // TODO can be de-duped\n const inverted = altThemes.map(([_name, theme]) => {\n return {\n ...theme,\n background: theme.color,\n backgroundHover: theme.colorHover,\n backgroundFocus: theme.colorFocus,\n backgroundPress: theme.colorPress,\n color: theme.background,\n colorHover: theme.backgroundHover,\n colorFocus: theme.backgroundFocus,\n colorPress: theme.backgroundPress,\n }\n })\n\n themeEntries = [\n ...themeEntries,\n // keep just alts\n ...altThemes.slice(0, alts.length),\n ...altButtonThemes.slice(0, alts.length),\n [`${name}_Button`, altThemes2[1][1]],\n [`${name}_DrawerFrame`, altThemes2[1][1]],\n [`${name}_SliderTrack`, altThemes[1][1]],\n [`${name}_SliderTrackActive`, altThemes[3][1]],\n [`${name}_SliderThumb`, inverted[2]],\n [`${name}_Progress`, altThemes[2][1]],\n [`${name}_ProgressIndicator`, inverted[2]],\n [`${name}_Switch`, altThemes[0][1]],\n [`${name}_SwitchThumb`, inverted[2]],\n [`${name}_TooltipArrow`, altThemes[1][1]],\n [`${name}_TooltipContent`, altThemes[1][1]],\n [`${name}_darker`, darkerTheme],\n [`${name}_active`, activeTheme],\n ]\n const themes = Object.fromEntries(themeEntries)\n // if (props.isLight) {\n // console.log('themes', themes)\n // }\n return themes as any\n}\n\nconst themeCreator = (\n str = 1,\n {\n backgrounds,\n isLight = true,\n isBase = false,\n colors = [...backgrounds].reverse(),\n borderColors = isLight ? colors : backgrounds,\n backgroundStrong,\n offsets: offsetsProp,\n }: ThemeCreatorProps\n) => {\n const offsets = {\n borderColor: offsetsProp?.borderColor ?? offsetsProp?.background ?? [0, 0, 0, 0],\n background: offsetsProp?.background ?? [0, 0, 0, 0],\n color: offsetsProp?.color ?? [0, 0, 0, 0],\n }\n const darkColors = isLight ? colors : backgrounds\n const lighterDir = isLight ? -1 : 1\n const darkerDir = -lighterDir\n const strongerDir = isLight ? darkerDir : lighterDir\n const softerDir = -strongerDir\n const get = (arr: any[], index: number, name = 'background') => {\n return arr[Math.max(0, Math.min(index + (offsets[name][str] || 0), arr.length - 1))]\n }\n\n const colorTranslucent = setColorAlpha(getVariableValue(get(colors, 0 + str, 'color')), 0.5)\n\n let theme = {\n background: get(backgrounds, str),\n backgroundStrong: backgroundStrong || get(backgrounds, str + strongerDir * 2),\n backgroundSoft: get(backgrounds, str + softerDir * 2),\n backgroundHover: get(backgrounds, str + lighterDir),\n backgroundPress: get(backgrounds, str + darkerDir),\n backgroundFocus: get(backgrounds, str + darkerDir * 2),\n backgroundTransparent: color.grayA1Light,\n color: get(colors, 0 + str, 'color'),\n colorHover: get(colors, 1 + str, 'color'),\n colorPress: get(colors, 2 + str, 'color'),\n colorFocus: get(colors, 3 + str, 'color'),\n colorTranslucent,\n colorMid: (isLight ? colors : backgrounds)[Math.floor(colors.length / 2)],\n shadowColor: isLight ? color.grayA2Light : color.grayA8Light,\n shadowColorHover: darkColors[!isLight ? 1 : 8],\n shadowColorPress: darkColors[!isLight ? 1 : 8],\n shadowColorFocus: darkColors[!isLight ? 1 : 8],\n borderColor: null as any as string | Variable,\n borderColorHover: null as any as string | Variable,\n borderColorPress: null as any as string | Variable,\n borderColorFocus: null as any as string | Variable,\n }\n\n if (isBase) {\n Object.assign(theme, {\n borderColor: isLight\n ? get(colors, 8 - str, 'borderColor')\n : get(backgrounds, 2 + str, 'borderColor'),\n borderColorHover: isLight\n ? get(colors, 6 - str, 'borderColor')\n : get(backgrounds, 3 + str, 'borderColor'),\n borderColorPress: isLight\n ? get(colors, 5 - str, 'borderColor')\n : get(backgrounds, 1 + str, 'borderColor'),\n borderColorFocus: isLight\n ? get(colors, 4 - str, 'borderColor')\n : get(backgrounds, 3 + str, 'borderColor'),\n })\n } else {\n Object.assign(theme, {\n borderColor: get(borderColors, 1 + strongerDir, 'borderColor'),\n borderColorHover: get(borderColors, 2 + strongerDir, 'borderColor'),\n borderColorPress: get(borderColors, 3 + strongerDir, 'borderColor'),\n borderColorFocus: get(borderColors, 4 + strongerDir, 'borderColor'),\n })\n }\n\n return theme\n}\n\nconst themeColors = {\n light: [\n '#fff',\n '#f4f4f4',\n color.gray1Light,\n color.gray2Light,\n color.gray3Light,\n color.gray4Light,\n color.gray5Light,\n color.gray6Light,\n color.gray7Light,\n color.gray8Light,\n color.gray9Light,\n color.gray10Light,\n color.gray11Light,\n color.gray12Light,\n ],\n dark: [\n '#111111',\n '#151515',\n '#191919',\n '#232323',\n '#282828',\n '#323232',\n '#383838',\n '#424242',\n '#494949',\n '#545454',\n '#626262',\n '#777777',\n ],\n}\n\nconst lightThemes = createThemesFrom('light', themeCreator, {\n backgrounds: themeColors.light,\n // isBase: true,\n backgroundStrong: '#fafafa',\n borderColors: themeColors.light.slice(2),\n isLight: true,\n})\n\nconst darkThemes = createThemesFrom('dark', themeCreator, {\n backgrounds: themeColors.dark,\n colors: themeColors.light.slice(2),\n backgroundStrong: '#111',\n isBase: true,\n isLight: false,\n shift: 1,\n offsets: {\n color: [0, 4, 5, 5, 5, 5],\n },\n})\n\nconst light = createTheme({\n ...lightColors,\n ...lightThemes.light,\n})\n\nconst dark = createTheme({\n ...darkColors,\n ...darkThemes.dark,\n})\n\nconst darkEntries = Object.entries(dark)\nconst lightEntries = Object.entries(light)\nfunction findColors(prefix: string, dark = false) {\n return Object.fromEntries(\n (dark ? darkEntries : lightEntries).filter(([k]) => k.startsWith(prefix))\n )\n}\n\nexport const colorSchemes = [\n { name: 'blue', colors: findColors('blue'), darkColors: findColors('blue', true) },\n { name: 'gray', colors: findColors('gray'), darkColors: findColors('gray', true) },\n { name: 'green', colors: findColors('green'), darkColors: findColors('green', true) },\n { name: 'orange', colors: findColors('orange'), darkColors: findColors('orange', true) },\n { name: 'pink', colors: findColors('pink'), darkColors: findColors('pink', true) },\n { name: 'purple', colors: findColors('purple'), darkColors: findColors('purple', true) },\n { name: 'red', colors: findColors('red'), darkColors: findColors('red', true) },\n { name: 'violet', colors: findColors('violet'), darkColors: findColors('violet', true) },\n { name: 'yellow', colors: findColors('yellow'), darkColors: findColors('yellow', true) },\n { name: 'teal', colors: findColors('teal'), darkColors: findColors('teal', true) },\n] as const\n\nexport type ColorNames = typeof colorSchemes[number]['name']\n\n// nice and flat\nexport const colorNames = [\n 'blue',\n 'gray',\n 'green',\n 'indigo',\n 'orange',\n 'pink',\n 'purple',\n 'red',\n 'violet',\n 'yellow',\n 'teal',\n] as const\n\nconst baseThemes = {\n // light\n ...lightThemes,\n light,\n light_active: makeActiveTheme(lightThemes.light),\n light_Card: lightThemes.light,\n light_Button: lightThemes.light,\n light_SliderTrack: lightThemes.light_alt1,\n light_SliderTrackActive: lightThemes.light_alt2,\n light_Switch: lightThemes.light,\n light_SwitchThumb: lightThemes.light_alt1,\n light_DrawerFrame: lightThemes.light_alt1,\n\n // dark\n ...darkThemes,\n dark,\n dark_active: makeActiveTheme(darkThemes.dark),\n dark_Card: darkThemes.dark,\n dark_DrawerFrame: darkThemes.dark_alt1,\n dark_SliderTrack: darkThemes.dark_darker,\n dark_SliderTrackActive: darkThemes.dark_alt1,\n dark_Switch: darkThemes.dark_darker,\n dark_SwitchThumb: darkThemes.dark_alt1,\n dark_Button: darkThemes.dark_alt1,\n}\n\nfunction makeActiveTheme(theme: any) {\n const res = { ...theme }\n res.backgroundHover = res.background\n res.colorHover = res.color\n res.backgroundPress = res.background\n res.colorPress = res.color\n return res\n}\n\ntype ColorThemeNames =\n | ColorNames\n | AltName<`light_${ColorNames}`, AltKeys>\n | AltName<`dark_${ColorNames}`, AltKeys>\n\nconst colorThemeEntries = colorSchemes.flatMap(({ name, colors, darkColors }) => {\n const [altLightThemes, altDarkThemes] = [\n { colors: darkColors, backgrounds: colors },\n { colors, backgrounds: darkColors },\n ].map((props, i) => {\n const isLight = i === 0\n const colorsBase = Object.values(props.colors).slice(2)\n const [backgrounds, colors] = [\n Object.values(props.backgrounds),\n isLight ? colorsBase : [colorsBase[0], '#ccc', ...colorsBase.slice(1)],\n ] as const\n\n const scheme = isLight ? 'light' : 'dark'\n const shift = isLight ? 0 : 1\n\n if (!isLight) {\n // const [_, h, sp, lp] = backgrounds[0].match(/hsl\\(([0-9\\.]+), ([0-9\\.]+)\\%, ([0-9\\.]+)\\%\\)/)!\n // backgrounds.unshift(`hsl(${h}, ${sp}%, ${parseFloat(lp) / 2}%)`)\n }\n\n const themeWithAlts = createThemesFrom(name, themeCreator, {\n colors,\n backgrounds,\n borderColors: backgrounds,\n isLight,\n shift,\n isBase: false,\n offsets: {\n background: isLight ? [1, 1, 1, 1, 1, 1] : null,\n borderColor: isLight ? [2, 2, 2, 3, 2] : null,\n color: isLight ? [0, 0, -1, -2, -3, -3, -4] : [-1, -1, -1, -1, -1, -1],\n },\n })\n\n return Object.entries(themeWithAlts).map(([k, v]) => [`${scheme}_${k}`, v])\n })\n return [...altLightThemes, ...altDarkThemes]\n})\n\ntype MyThemeBase = typeof baseThemes['light_alt1']\n\nconst colorThemes: {\n [key in ColorThemeNames]: MyThemeBase\n} = Object.fromEntries(colorThemeEntries) as any\n\nconst allThemes = {\n ...baseThemes,\n ...colorThemes,\n} as const\n\nexport const themes: {\n [key in keyof typeof allThemes]: typeof baseThemes['light']\n} = allThemes as any\n"],
|
|
5
|
-
"mappings": ";;AAAA;AAEA;AACA;AAEA,MAAM,EAAE,UAAU;AAqBlB,MAAM,aAAa,CAAC,GAAG,GAAG,GAAG,CAAC;AAC9B,MAAM,OAAO,CAAC,GAAG,GAAG,CAAC;AAKrB,0BACE,MACA,UACA,OAOA;AACA,QAAM,EAAE,QAAQ,MAAM;AACtB,QAAM,QAAQ,SAAS,IAAI,OAAO,KAAK;AACvC,MAAI,eAAsB,CAAC,CAAC,MAAM,KAAK,CAAC;AAGxC,QAAM,YAAmB,WAAW,IAAI,CAAC,QAAQ;AAAA,IAC/C,GAAG,WAAW;AAAA,IACd,SAAS,MAAO,OAAM,UAAU,IAAI,KAAK,OAAO,KAAK;AAAA,EACvD,CAAC;AACD,QAAM,aAAoB,WAAW,IAAI,CAAC,QAAQ;AAAA,IAChD,GAAG,WAAW;AAAA,IACd,SAAS,MAAM,OAAO,KAAK;AAAA,EAC7B,CAAC;AACD,QAAM,kBAAyB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ent": ["import { Variable, createTheme, createVariable, getVariableValue } from '@tamagui/core'\n\nimport { setColorAlpha } from './colorUtils'\nimport { darkColors, lightColors, tokens } from './tokens'\n\nconst { color } = tokens\n\n// spaghetti ahead\n\ntype ThemeCreatorProps = {\n shift?: number\n backgrounds: (string | Variable)[]\n backgroundStrong?: string | Variable\n borderColors?: (string | Variable)[]\n colors?: (string | Variable)[]\n offsets?: {\n color?: number[] | null\n background?: number[] | null\n borderColor?: number[] | null\n }\n isLight?: boolean\n isBase?: boolean\n}\n\n// helpers\n\nconst alternates = [1, 2, 3, 4] as const\nconst alts = [1, 2, 3] as const\ntype AltKeys = 1 | 2 | 3\ntype AltName<Name extends string, Keys extends string | number> = `${Name}_alt${Keys}`\ntype ThemeCreator<A = any> = (str: number, props: ThemeCreatorProps) => A\n\nfunction createThemesFrom<Name extends string, GetTheme extends ThemeCreator = ThemeCreator>(\n name: Name,\n getTheme: GetTheme,\n props: ThemeCreatorProps\n): {\n [key in `${Name}_alt${AltKeys}` | `${Name}` | `${Name}_darker`]: GetTheme extends ThemeCreator<\n infer Theme\n >\n ? Theme\n : never\n} {\n const { shift = 0 } = props\n const theme = getTheme(0 + shift, props)\n let themeEntries: any[] = [[name, theme]]\n\n // generate alternates (for use in other themes), but keep just alts\n const altThemes: any[] = alternates.map((alt) => [\n `${name}_alt${alt}`,\n getTheme(alt + (props.isLight ? 0 : 0) + shift, props),\n ])\n const altThemes2: any[] = alternates.map((alt) => [\n `${name}_alt${alt}`,\n getTheme(alt + shift, props),\n ])\n const altButtonThemes: any[] = alternates.map((_, i) => {\n const [bName, bTheme] = [altThemes2[i][0], (altThemes2[i + 1] || altThemes2[i])[1]]\n return [`${bName}_Button` as any, bTheme]\n })\n // add these after alts since we rely on positioning\n const darkerTheme = getTheme(Math.max(0, shift + (props.isLight ? 1 : -1)), props)\n const activeTheme = makeActiveTheme(theme)\n\n // TODO can be de-duped\n const inverted = altThemes.map(([_name, theme]) => {\n return {\n ...theme,\n background: theme.color,\n backgroundHover: theme.colorHover,\n backgroundFocus: theme.colorFocus,\n backgroundPress: theme.colorPress,\n color: theme.background,\n colorHover: theme.backgroundHover,\n colorFocus: theme.backgroundFocus,\n colorPress: theme.backgroundPress,\n }\n })\n\n themeEntries = [\n ...themeEntries,\n // keep just alts\n ...altThemes.slice(0, alts.length),\n ...altButtonThemes.slice(0, alts.length),\n [`${name}_Button`, altThemes2[1][1]],\n [`${name}_DrawerFrame`, altThemes2[1][1]],\n [`${name}_SliderTrack`, altThemes[1][1]],\n [`${name}_SliderTrackActive`, altThemes[3][1]],\n [`${name}_SliderThumb`, inverted[2]],\n [`${name}_Progress`, altThemes[2][1]],\n [`${name}_ProgressIndicator`, inverted[2]],\n [`${name}_Switch`, altThemes[0][1]],\n [`${name}_SwitchThumb`, inverted[2]],\n [`${name}_TooltipArrow`, altThemes[1][1]],\n [`${name}_TooltipContent`, altThemes[1][1]],\n [`${name}_darker`, darkerTheme],\n [`${name}_active`, activeTheme],\n ]\n const themes = Object.fromEntries(themeEntries)\n // if (props.isLight) {\n // console.log('themes', themes)\n // }\n return themes as any\n}\n\nconst themeCreator = (\n str = 1,\n {\n backgrounds,\n isLight = true,\n isBase = false,\n colors = [...backgrounds].reverse(),\n borderColors = isLight ? colors : backgrounds,\n backgroundStrong,\n offsets: offsetsProp,\n }: ThemeCreatorProps\n) => {\n const offsets = {\n borderColor: offsetsProp?.borderColor ?? offsetsProp?.background ?? [0, 0, 0, 0],\n background: offsetsProp?.background ?? [0, 0, 0, 0],\n color: offsetsProp?.color ?? [0, 0, 0, 0],\n }\n const darkColors = isLight ? colors : backgrounds\n const lighterDir = isLight ? -1 : 1\n const darkerDir = -lighterDir\n const strongerDir = isLight ? darkerDir : lighterDir\n const softerDir = -strongerDir\n const get = (arr: any[], index: number, name = 'background') => {\n return arr[Math.max(0, Math.min(index + (offsets[name][str] || 0), arr.length - 1))]\n }\n\n const colorTranslucent = setColorAlpha(getVariableValue(get(colors, 0 + str, 'color')), 0.5)\n\n let theme = {\n background: get(backgrounds, str),\n backgroundStrong: backgroundStrong || get(backgrounds, str + strongerDir * 2),\n backgroundSoft: get(backgrounds, str + softerDir * 2),\n backgroundHover: get(backgrounds, str + lighterDir),\n backgroundPress: get(backgrounds, str + darkerDir),\n backgroundFocus: get(backgrounds, str + darkerDir * 2),\n backgroundTransparent: color.grayA1Light,\n color: get(colors, 0 + str, 'color'),\n colorHover: get(colors, 1 + str, 'color'),\n colorPress: get(colors, 2 + str, 'color'),\n colorFocus: get(colors, 3 + str, 'color'),\n colorTranslucent,\n colorMid: (isLight ? colors : backgrounds)[Math.floor(colors.length / 2)],\n shadowColor: isLight ? color.grayA2Light : color.grayA8Light,\n shadowColorHover: darkColors[!isLight ? 1 : 8],\n shadowColorPress: darkColors[!isLight ? 1 : 8],\n shadowColorFocus: darkColors[!isLight ? 1 : 8],\n borderColor: null as any as string | Variable,\n borderColorHover: null as any as string | Variable,\n borderColorPress: null as any as string | Variable,\n borderColorFocus: null as any as string | Variable,\n }\n\n if (isBase) {\n Object.assign(theme, {\n borderColor: isLight\n ? get(colors, 8 - str, 'borderColor')\n : get(backgrounds, 2 + str, 'borderColor'),\n borderColorHover: isLight\n ? get(colors, 6 - str, 'borderColor')\n : get(backgrounds, 3 + str, 'borderColor'),\n borderColorPress: isLight\n ? get(colors, 5 - str, 'borderColor')\n : get(backgrounds, 1 + str, 'borderColor'),\n borderColorFocus: isLight\n ? get(colors, 4 - str, 'borderColor')\n : get(backgrounds, 3 + str, 'borderColor'),\n })\n } else {\n Object.assign(theme, {\n borderColor: get(borderColors, 1 + strongerDir, 'borderColor'),\n borderColorHover: get(borderColors, 2 + strongerDir, 'borderColor'),\n borderColorPress: get(borderColors, 3 + strongerDir, 'borderColor'),\n borderColorFocus: get(borderColors, 4 + strongerDir, 'borderColor'),\n })\n }\n\n return theme\n}\n\nconst themeColors = {\n light: [\n '#fff',\n '#f4f4f4',\n color.gray1Light,\n color.gray2Light,\n color.gray3Light,\n color.gray4Light,\n color.gray5Light,\n color.gray6Light,\n color.gray7Light,\n color.gray8Light,\n color.gray9Light,\n color.gray10Light,\n color.gray11Light,\n color.gray12Light,\n ],\n dark: [\n '#111111',\n '#151515',\n '#191919',\n '#232323',\n '#282828',\n '#323232',\n '#383838',\n '#424242',\n '#494949',\n '#545454',\n '#626262',\n '#777777',\n ],\n}\n\nconst lightThemes = createThemesFrom('light', themeCreator, {\n backgrounds: themeColors.light,\n // isBase: true,\n backgroundStrong: '#fafafa',\n borderColors: themeColors.light.slice(2),\n isLight: true,\n})\n\nconst darkThemes = createThemesFrom('dark', themeCreator, {\n backgrounds: themeColors.dark,\n colors: themeColors.light.slice(2),\n backgroundStrong: '#111',\n isBase: true,\n isLight: false,\n shift: 1,\n offsets: {\n color: [0, 4, 5, 5, 5, 5],\n },\n})\n\nconst light = createTheme({\n ...lightColors,\n ...lightThemes.light,\n})\n\nconst dark = createTheme({\n ...darkColors,\n ...darkThemes.dark,\n})\n\ntype ThemeBase = {\n [Key in keyof typeof dark]: string\n}\n\nconst baseThemes = {\n // light\n ...lightThemes,\n light,\n light_active: makeActiveTheme(lightThemes.light),\n light_Card: lightThemes.light,\n light_Button: lightThemes.light,\n light_SliderTrack: lightThemes.light_alt1,\n light_SliderTrackActive: lightThemes.light_alt2,\n light_Switch: lightThemes.light,\n light_SwitchThumb: lightThemes.light_alt1,\n light_DrawerFrame: lightThemes.light_alt1,\n\n // dark\n ...darkThemes,\n dark,\n dark_active: makeActiveTheme(darkThemes.dark),\n dark_Card: darkThemes.dark,\n dark_DrawerFrame: darkThemes.dark_alt1,\n dark_SliderTrack: darkThemes.dark_darker,\n dark_SliderTrackActive: darkThemes.dark_alt1,\n dark_Switch: darkThemes.dark_darker,\n dark_SwitchThumb: darkThemes.dark_alt1,\n dark_Button: darkThemes.dark_alt1,\n}\n\nfunction makeActiveTheme(theme: any) {\n const res = { ...theme }\n res.backgroundHover = res.background\n res.colorHover = res.color\n res.backgroundPress = res.background\n res.colorPress = res.color\n return res\n}\n\nconst darkEntries = Object.entries(dark)\nconst lightEntries = Object.entries(light)\nfunction findColors(prefix: string, dark = false): ThemeBase {\n return Object.fromEntries(\n (dark ? darkEntries : lightEntries).filter(([k]) => k.startsWith(prefix))\n ) as any\n}\n\nexport const colorSchemes = [\n { name: 'blue', colors: findColors('blue'), darkColors: findColors('blue', true) },\n { name: 'gray', colors: findColors('gray'), darkColors: findColors('gray', true) },\n { name: 'green', colors: findColors('green'), darkColors: findColors('green', true) },\n { name: 'orange', colors: findColors('orange'), darkColors: findColors('orange', true) },\n { name: 'pink', colors: findColors('pink'), darkColors: findColors('pink', true) },\n { name: 'purple', colors: findColors('purple'), darkColors: findColors('purple', true) },\n { name: 'red', colors: findColors('red'), darkColors: findColors('red', true) },\n { name: 'yellow', colors: findColors('yellow'), darkColors: findColors('yellow', true) },\n { name: 'teal', colors: findColors('teal'), darkColors: findColors('teal', true) },\n] as const\n\nexport type ColorNames = typeof colorSchemes[number]['name']\n\n// nice and flat\nexport const colorNames: ColorNames[] = [\n 'blue',\n 'gray',\n 'green',\n 'orange',\n 'pink',\n 'purple',\n 'red',\n 'yellow',\n 'teal',\n]\n\ntype ColorThemeNames =\n | ColorNames\n | AltName<`light_${ColorNames}`, AltKeys>\n | AltName<`dark_${ColorNames}`, AltKeys>\n\nconst colorThemeEntries = colorSchemes.flatMap(({ name, colors, darkColors }) => {\n const [altLightThemes, altDarkThemes] = [\n { colors: darkColors, backgrounds: colors },\n { colors, backgrounds: darkColors },\n ].map((props, i) => {\n const isLight = i === 0\n const colorsBase = Object.values(props.colors).slice(2)\n const [backgrounds, colors] = [\n Object.values(props.backgrounds),\n isLight ? colorsBase : [colorsBase[0], '#ccc', ...colorsBase.slice(1)],\n ] as const\n\n const scheme = isLight ? 'light' : 'dark'\n const shift = isLight ? 0 : 1\n\n // if (!isLight) {\n // const [_, h, sp, lp] = backgrounds[0].match(/hsl\\(([0-9\\.]+), ([0-9\\.]+)\\%, ([0-9\\.]+)\\%\\)/)!\n // backgrounds.unshift(`hsl(${h}, ${sp}%, ${parseFloat(lp) / 2}%)`)\n // }\n\n const themeWithAlts = createThemesFrom(name, themeCreator, {\n colors,\n backgrounds,\n borderColors: backgrounds,\n isLight,\n shift,\n isBase: false,\n offsets: {\n background: isLight ? [2, 2, 2, 2, 2, 2] : null,\n borderColor: isLight ? [2, 2, 2, 3, 2] : null,\n color: isLight ? [0, 0, -1, -2, -3, -3, -4] : [-1, -1, -1, -1, -1, -1],\n },\n })\n\n return Object.entries(themeWithAlts).map(([k, v]) => [`${scheme}_${k}`, v])\n })\n return [...altLightThemes, ...altDarkThemes]\n})\n\ntype MyThemeBase = typeof baseThemes['light_alt1']\n\nconst colorThemes: {\n [key in ColorThemeNames]: MyThemeBase\n} = Object.fromEntries(colorThemeEntries) as any\n\nconst allThemes = {\n ...baseThemes,\n ...colorThemes,\n} as const\n\nexport const themes: {\n [key in keyof typeof allThemes]: typeof baseThemes['light']\n} = allThemes as any\n"],
|
|
5
|
+
"mappings": ";;AAAA;AAEA;AACA;AAEA,MAAM,EAAE,UAAU;AAqBlB,MAAM,aAAa,CAAC,GAAG,GAAG,GAAG,CAAC;AAC9B,MAAM,OAAO,CAAC,GAAG,GAAG,CAAC;AAKrB,0BACE,MACA,UACA,OAOA;AACA,QAAM,EAAE,QAAQ,MAAM;AACtB,QAAM,QAAQ,SAAS,IAAI,OAAO,KAAK;AACvC,MAAI,eAAsB,CAAC,CAAC,MAAM,KAAK,CAAC;AAGxC,QAAM,YAAmB,WAAW,IAAI,CAAC,QAAQ;AAAA,IAC/C,GAAG,WAAW;AAAA,IACd,SAAS,MAAO,OAAM,UAAU,IAAI,KAAK,OAAO,KAAK;AAAA,EACvD,CAAC;AACD,QAAM,aAAoB,WAAW,IAAI,CAAC,QAAQ;AAAA,IAChD,GAAG,WAAW;AAAA,IACd,SAAS,MAAM,OAAO,KAAK;AAAA,EAC7B,CAAC;AACD,QAAM,kBAAyB,WAAW,IAAI,CAAC,GAAG,MAAM;AACtD,UAAM,C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AAAA,QACP,YAAY,UAAU,CAAC,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC,IAAI;AAAA,QAC3C,aAAa,UAAU,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,IAAI;AAAA,QACzC,OAAO,UAAU,CAAC,GAAG,GAAG,IAAI,IAAI,IAAI,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,IAAI,IAAI,IAAI,EAAE;AAAA,MACvE;AAAA,IACF,CAAC;AAED,WAAO,OAAO,QAAQ,aAAa,EAAE,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,GAAG,UAAU,KAAK,CAAC,CAAC;AAAA,EAC5E,CAAC;AACD,SAAO,CAAC,GAAG,gBAAgB,GAAG,aAAa;AAC7C,CAAC;AAID,MAAM,cAEF,OAAO,YAAY,iBAAiB;AAExC,MAAM,YAAY;AAAA,EAChB,GAAG;AAAA,EACH,GAAG;AACL;AAEO,MAAM,SAET;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/jsx/themes.js
CHANGED
|
@@ -12,7 +12,7 @@ function createThemesFrom(name, getTheme, props) {
|
|
|
12
12
|
let themeEntries = [[name, theme]];
|
|
13
13
|
const altThemes = alternates.map((alt) => [
|
|
14
14
|
`${name}_alt${alt}`,
|
|
15
|
-
getTheme(alt + (props.isLight ?
|
|
15
|
+
getTheme(alt + (props.isLight ? 0 : 0) + shift, props)
|
|
16
16
|
]);
|
|
17
17
|
const altThemes2 = alternates.map((alt) => [
|
|
18
18
|
`${name}_alt${alt}`,
|
|
@@ -180,37 +180,6 @@ const dark = createTheme({
|
|
|
180
180
|
...darkColors,
|
|
181
181
|
...darkThemes.dark
|
|
182
182
|
});
|
|
183
|
-
const darkEntries = Object.entries(dark);
|
|
184
|
-
const lightEntries = Object.entries(light);
|
|
185
|
-
function findColors(prefix, dark2 = false) {
|
|
186
|
-
return Object.fromEntries((dark2 ? darkEntries : lightEntries).filter(([k]) => k.startsWith(prefix)));
|
|
187
|
-
}
|
|
188
|
-
__name(findColors, "findColors");
|
|
189
|
-
const colorSchemes = [
|
|
190
|
-
{ name: "blue", colors: findColors("blue"), darkColors: findColors("blue", true) },
|
|
191
|
-
{ name: "gray", colors: findColors("gray"), darkColors: findColors("gray", true) },
|
|
192
|
-
{ name: "green", colors: findColors("green"), darkColors: findColors("green", true) },
|
|
193
|
-
{ name: "orange", colors: findColors("orange"), darkColors: findColors("orange", true) },
|
|
194
|
-
{ name: "pink", colors: findColors("pink"), darkColors: findColors("pink", true) },
|
|
195
|
-
{ name: "purple", colors: findColors("purple"), darkColors: findColors("purple", true) },
|
|
196
|
-
{ name: "red", colors: findColors("red"), darkColors: findColors("red", true) },
|
|
197
|
-
{ name: "violet", colors: findColors("violet"), darkColors: findColors("violet", true) },
|
|
198
|
-
{ name: "yellow", colors: findColors("yellow"), darkColors: findColors("yellow", true) },
|
|
199
|
-
{ name: "teal", colors: findColors("teal"), darkColors: findColors("teal", true) }
|
|
200
|
-
];
|
|
201
|
-
const colorNames = [
|
|
202
|
-
"blue",
|
|
203
|
-
"gray",
|
|
204
|
-
"green",
|
|
205
|
-
"indigo",
|
|
206
|
-
"orange",
|
|
207
|
-
"pink",
|
|
208
|
-
"purple",
|
|
209
|
-
"red",
|
|
210
|
-
"violet",
|
|
211
|
-
"yellow",
|
|
212
|
-
"teal"
|
|
213
|
-
];
|
|
214
183
|
const baseThemes = {
|
|
215
184
|
...lightThemes,
|
|
216
185
|
light,
|
|
@@ -242,6 +211,34 @@ function makeActiveTheme(theme) {
|
|
|
242
211
|
return res;
|
|
243
212
|
}
|
|
244
213
|
__name(makeActiveTheme, "makeActiveTheme");
|
|
214
|
+
const darkEntries = Object.entries(dark);
|
|
215
|
+
const lightEntries = Object.entries(light);
|
|
216
|
+
function findColors(prefix, dark2 = false) {
|
|
217
|
+
return Object.fromEntries((dark2 ? darkEntries : lightEntries).filter(([k]) => k.startsWith(prefix)));
|
|
218
|
+
}
|
|
219
|
+
__name(findColors, "findColors");
|
|
220
|
+
const colorSchemes = [
|
|
221
|
+
{ name: "blue", colors: findColors("blue"), darkColors: findColors("blue", true) },
|
|
222
|
+
{ name: "gray", colors: findColors("gray"), darkColors: findColors("gray", true) },
|
|
223
|
+
{ name: "green", colors: findColors("green"), darkColors: findColors("green", true) },
|
|
224
|
+
{ name: "orange", colors: findColors("orange"), darkColors: findColors("orange", true) },
|
|
225
|
+
{ name: "pink", colors: findColors("pink"), darkColors: findColors("pink", true) },
|
|
226
|
+
{ name: "purple", colors: findColors("purple"), darkColors: findColors("purple", true) },
|
|
227
|
+
{ name: "red", colors: findColors("red"), darkColors: findColors("red", true) },
|
|
228
|
+
{ name: "yellow", colors: findColors("yellow"), darkColors: findColors("yellow", true) },
|
|
229
|
+
{ name: "teal", colors: findColors("teal"), darkColors: findColors("teal", true) }
|
|
230
|
+
];
|
|
231
|
+
const colorNames = [
|
|
232
|
+
"blue",
|
|
233
|
+
"gray",
|
|
234
|
+
"green",
|
|
235
|
+
"orange",
|
|
236
|
+
"pink",
|
|
237
|
+
"purple",
|
|
238
|
+
"red",
|
|
239
|
+
"yellow",
|
|
240
|
+
"teal"
|
|
241
|
+
];
|
|
245
242
|
const colorThemeEntries = colorSchemes.flatMap(({ name, colors, darkColors: darkColors2 }) => {
|
|
246
243
|
const [altLightThemes, altDarkThemes] = [
|
|
247
244
|
{ colors: darkColors2, backgrounds: colors },
|
|
@@ -255,8 +252,6 @@ const colorThemeEntries = colorSchemes.flatMap(({ name, colors, darkColors: dark
|
|
|
255
252
|
];
|
|
256
253
|
const scheme = isLight ? "light" : "dark";
|
|
257
254
|
const shift = isLight ? 0 : 1;
|
|
258
|
-
if (!isLight) {
|
|
259
|
-
}
|
|
260
255
|
const themeWithAlts = createThemesFrom(name, themeCreator, {
|
|
261
256
|
colors: colors2,
|
|
262
257
|
backgrounds,
|
|
@@ -265,7 +260,7 @@ const colorThemeEntries = colorSchemes.flatMap(({ name, colors, darkColors: dark
|
|
|
265
260
|
shift,
|
|
266
261
|
isBase: false,
|
|
267
262
|
offsets: {
|
|
268
|
-
background: isLight ? [
|
|
263
|
+
background: isLight ? [2, 2, 2, 2, 2, 2] : null,
|
|
269
264
|
borderColor: isLight ? [2, 2, 2, 3, 2] : null,
|
|
270
265
|
color: isLight ? [0, 0, -1, -2, -3, -3, -4] : [-1, -1, -1, -1, -1, -1]
|
|
271
266
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/theme-base",
|
|
3
|
-
"version": "1.0.1-beta.
|
|
3
|
+
"version": "1.0.1-beta.57",
|
|
4
4
|
"types": "./types/index.d.ts",
|
|
5
5
|
"main": "dist/cjs",
|
|
6
6
|
"module": "dist/esm",
|
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
"clean:build": "tamagui-build clean:build"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@tamagui/colors": "^1.0.1-beta.
|
|
20
|
-
"@tamagui/core": "^1.0.1-beta.
|
|
19
|
+
"@tamagui/colors": "^1.0.1-beta.57",
|
|
20
|
+
"@tamagui/core": "^1.0.1-beta.57"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@tamagui/build": "^1.0.1-beta.
|
|
23
|
+
"@tamagui/build": "^1.0.1-beta.57"
|
|
24
24
|
},
|
|
25
25
|
"publishConfig": {
|
|
26
26
|
"access": "public"
|
package/types/themes.d.ts
CHANGED
|
@@ -1,87 +1,162 @@
|
|
|
1
1
|
import { Variable } from '@tamagui/core';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
2
|
+
declare const dark: {
|
|
3
|
+
background: any;
|
|
4
|
+
backgroundStrong: any;
|
|
5
|
+
backgroundSoft: any;
|
|
6
|
+
backgroundHover: any;
|
|
7
|
+
backgroundPress: any;
|
|
8
|
+
backgroundFocus: any;
|
|
9
|
+
backgroundTransparent: string | Variable<any>;
|
|
10
|
+
color: any;
|
|
11
|
+
colorHover: any;
|
|
12
|
+
colorPress: any;
|
|
13
|
+
colorFocus: any;
|
|
14
|
+
colorTranslucent: string | Variable<any>;
|
|
15
|
+
colorMid: string | Variable<any>;
|
|
16
|
+
shadowColor: string | Variable<any>;
|
|
17
|
+
shadowColorHover: string | Variable<any>;
|
|
18
|
+
shadowColorPress: string | Variable<any>;
|
|
19
|
+
shadowColorFocus: string | Variable<any>;
|
|
20
|
+
borderColor: string | Variable<any>;
|
|
21
|
+
borderColorHover: string | Variable<any>;
|
|
22
|
+
borderColorPress: string | Variable<any>;
|
|
23
|
+
borderColorFocus: string | Variable<any>;
|
|
24
|
+
teal1: string | Variable<any>;
|
|
25
|
+
teal2: string | Variable<any>;
|
|
26
|
+
teal3: string | Variable<any>;
|
|
27
|
+
teal4: string | Variable<any>;
|
|
28
|
+
teal5: string | Variable<any>;
|
|
29
|
+
teal6: string | Variable<any>;
|
|
30
|
+
teal7: string | Variable<any>;
|
|
31
|
+
teal8: string | Variable<any>;
|
|
32
|
+
teal9: string | Variable<any>;
|
|
33
|
+
teal10: string | Variable<any>;
|
|
34
|
+
teal11: string | Variable<any>;
|
|
35
|
+
teal12: string | Variable<any>;
|
|
36
|
+
yellow1: string | Variable<any>;
|
|
37
|
+
yellow2: string | Variable<any>;
|
|
38
|
+
yellow3: string | Variable<any>;
|
|
39
|
+
yellow4: string | Variable<any>;
|
|
40
|
+
yellow5: string | Variable<any>;
|
|
41
|
+
yellow6: string | Variable<any>;
|
|
42
|
+
yellow7: string | Variable<any>;
|
|
43
|
+
yellow8: string | Variable<any>;
|
|
44
|
+
yellow9: string | Variable<any>;
|
|
45
|
+
yellow10: string | Variable<any>;
|
|
46
|
+
yellow11: string | Variable<any>;
|
|
47
|
+
yellow12: string | Variable<any>;
|
|
48
|
+
violet1: string | Variable<any>;
|
|
49
|
+
violet2: string | Variable<any>;
|
|
50
|
+
violet3: string | Variable<any>;
|
|
51
|
+
violet4: string | Variable<any>;
|
|
52
|
+
violet5: string | Variable<any>;
|
|
53
|
+
violet6: string | Variable<any>;
|
|
54
|
+
violet7: string | Variable<any>;
|
|
55
|
+
violet8: string | Variable<any>;
|
|
56
|
+
violet9: string | Variable<any>;
|
|
57
|
+
violet10: string | Variable<any>;
|
|
58
|
+
violet11: string | Variable<any>;
|
|
59
|
+
violet12: string | Variable<any>;
|
|
60
|
+
red1: string | Variable<any>;
|
|
61
|
+
red2: string | Variable<any>;
|
|
62
|
+
red3: string | Variable<any>;
|
|
63
|
+
red4: string | Variable<any>;
|
|
64
|
+
red5: string | Variable<any>;
|
|
65
|
+
red6: string | Variable<any>;
|
|
66
|
+
red7: string | Variable<any>;
|
|
67
|
+
red8: string | Variable<any>;
|
|
68
|
+
red9: string | Variable<any>;
|
|
69
|
+
red10: string | Variable<any>;
|
|
70
|
+
red11: string | Variable<any>;
|
|
71
|
+
red12: string | Variable<any>;
|
|
72
|
+
purple1: string | Variable<any>;
|
|
73
|
+
purple2: string | Variable<any>;
|
|
74
|
+
purple3: string | Variable<any>;
|
|
75
|
+
purple4: string | Variable<any>;
|
|
76
|
+
purple5: string | Variable<any>;
|
|
77
|
+
purple6: string | Variable<any>;
|
|
78
|
+
purple7: string | Variable<any>;
|
|
79
|
+
purple8: string | Variable<any>;
|
|
80
|
+
purple9: string | Variable<any>;
|
|
81
|
+
purple10: string | Variable<any>;
|
|
82
|
+
purple11: string | Variable<any>;
|
|
83
|
+
purple12: string | Variable<any>;
|
|
84
|
+
pink1: string | Variable<any>;
|
|
85
|
+
pink2: string | Variable<any>;
|
|
86
|
+
pink3: string | Variable<any>;
|
|
87
|
+
pink4: string | Variable<any>;
|
|
88
|
+
pink5: string | Variable<any>;
|
|
89
|
+
pink6: string | Variable<any>;
|
|
90
|
+
pink7: string | Variable<any>;
|
|
91
|
+
pink8: string | Variable<any>;
|
|
92
|
+
pink9: string | Variable<any>;
|
|
93
|
+
pink10: string | Variable<any>;
|
|
94
|
+
pink11: string | Variable<any>;
|
|
95
|
+
pink12: string | Variable<any>;
|
|
96
|
+
orange1: string | Variable<any>;
|
|
97
|
+
orange2: string | Variable<any>;
|
|
98
|
+
orange3: string | Variable<any>;
|
|
99
|
+
orange4: string | Variable<any>;
|
|
100
|
+
orange5: string | Variable<any>;
|
|
101
|
+
orange6: string | Variable<any>;
|
|
102
|
+
orange7: string | Variable<any>;
|
|
103
|
+
orange8: string | Variable<any>;
|
|
104
|
+
orange9: string | Variable<any>;
|
|
105
|
+
orange10: string | Variable<any>;
|
|
106
|
+
orange11: string | Variable<any>;
|
|
107
|
+
orange12: string | Variable<any>;
|
|
108
|
+
green1: string | Variable<any>;
|
|
109
|
+
green2: string | Variable<any>;
|
|
110
|
+
green3: string | Variable<any>;
|
|
111
|
+
green4: string | Variable<any>;
|
|
112
|
+
green5: string | Variable<any>;
|
|
113
|
+
green6: string | Variable<any>;
|
|
114
|
+
green7: string | Variable<any>;
|
|
115
|
+
green8: string | Variable<any>;
|
|
116
|
+
green9: string | Variable<any>;
|
|
117
|
+
green10: string | Variable<any>;
|
|
118
|
+
green11: string | Variable<any>;
|
|
119
|
+
green12: string | Variable<any>;
|
|
120
|
+
grayA1: string | Variable<any>;
|
|
121
|
+
grayA2: string | Variable<any>;
|
|
122
|
+
grayA3: string | Variable<any>;
|
|
123
|
+
grayA4: string | Variable<any>;
|
|
124
|
+
grayA5: string | Variable<any>;
|
|
125
|
+
grayA6: string | Variable<any>;
|
|
126
|
+
grayA7: string | Variable<any>;
|
|
127
|
+
grayA8: string | Variable<any>;
|
|
128
|
+
grayA9: string | Variable<any>;
|
|
129
|
+
grayA10: string | Variable<any>;
|
|
130
|
+
grayA11: string | Variable<any>;
|
|
131
|
+
grayA12: string | Variable<any>;
|
|
132
|
+
gray1: string | Variable<any>;
|
|
133
|
+
gray2: string | Variable<any>;
|
|
134
|
+
gray3: string | Variable<any>;
|
|
135
|
+
gray4: string | Variable<any>;
|
|
136
|
+
gray5: string | Variable<any>;
|
|
137
|
+
gray6: string | Variable<any>;
|
|
138
|
+
gray7: string | Variable<any>;
|
|
139
|
+
gray8: string | Variable<any>;
|
|
140
|
+
gray9: string | Variable<any>;
|
|
141
|
+
gray10: string | Variable<any>;
|
|
142
|
+
gray11: string | Variable<any>;
|
|
143
|
+
gray12: string | Variable<any>;
|
|
144
|
+
blue1: string | Variable<any>;
|
|
145
|
+
blue2: string | Variable<any>;
|
|
146
|
+
blue3: string | Variable<any>;
|
|
147
|
+
blue4: string | Variable<any>;
|
|
148
|
+
blue5: string | Variable<any>;
|
|
149
|
+
blue6: string | Variable<any>;
|
|
150
|
+
blue7: string | Variable<any>;
|
|
151
|
+
blue8: string | Variable<any>;
|
|
152
|
+
blue9: string | Variable<any>;
|
|
153
|
+
blue10: string | Variable<any>;
|
|
154
|
+
blue11: string | Variable<any>;
|
|
155
|
+
blue12: string | Variable<any>;
|
|
156
|
+
};
|
|
157
|
+
declare type ThemeBase = {
|
|
158
|
+
[Key in keyof typeof dark]: string;
|
|
159
|
+
};
|
|
85
160
|
declare const baseThemes: {
|
|
86
161
|
dark: {
|
|
87
162
|
background: any;
|
|
@@ -902,6 +977,45 @@ declare const baseThemes: {
|
|
|
902
977
|
borderColorFocus: string | Variable<any>;
|
|
903
978
|
};
|
|
904
979
|
};
|
|
980
|
+
export declare const colorSchemes: readonly [{
|
|
981
|
+
readonly name: "blue";
|
|
982
|
+
readonly colors: ThemeBase;
|
|
983
|
+
readonly darkColors: ThemeBase;
|
|
984
|
+
}, {
|
|
985
|
+
readonly name: "gray";
|
|
986
|
+
readonly colors: ThemeBase;
|
|
987
|
+
readonly darkColors: ThemeBase;
|
|
988
|
+
}, {
|
|
989
|
+
readonly name: "green";
|
|
990
|
+
readonly colors: ThemeBase;
|
|
991
|
+
readonly darkColors: ThemeBase;
|
|
992
|
+
}, {
|
|
993
|
+
readonly name: "orange";
|
|
994
|
+
readonly colors: ThemeBase;
|
|
995
|
+
readonly darkColors: ThemeBase;
|
|
996
|
+
}, {
|
|
997
|
+
readonly name: "pink";
|
|
998
|
+
readonly colors: ThemeBase;
|
|
999
|
+
readonly darkColors: ThemeBase;
|
|
1000
|
+
}, {
|
|
1001
|
+
readonly name: "purple";
|
|
1002
|
+
readonly colors: ThemeBase;
|
|
1003
|
+
readonly darkColors: ThemeBase;
|
|
1004
|
+
}, {
|
|
1005
|
+
readonly name: "red";
|
|
1006
|
+
readonly colors: ThemeBase;
|
|
1007
|
+
readonly darkColors: ThemeBase;
|
|
1008
|
+
}, {
|
|
1009
|
+
readonly name: "yellow";
|
|
1010
|
+
readonly colors: ThemeBase;
|
|
1011
|
+
readonly darkColors: ThemeBase;
|
|
1012
|
+
}, {
|
|
1013
|
+
readonly name: "teal";
|
|
1014
|
+
readonly colors: ThemeBase;
|
|
1015
|
+
readonly darkColors: ThemeBase;
|
|
1016
|
+
}];
|
|
1017
|
+
export declare type ColorNames = typeof colorSchemes[number]['name'];
|
|
1018
|
+
export declare const colorNames: ColorNames[];
|
|
905
1019
|
declare const allThemes: {
|
|
906
1020
|
readonly blue: {
|
|
907
1021
|
background: any;
|
|
@@ -1064,29 +1178,6 @@ declare const allThemes: {
|
|
|
1064
1178
|
borderColorPress: string | Variable<any>;
|
|
1065
1179
|
borderColorFocus: string | Variable<any>;
|
|
1066
1180
|
};
|
|
1067
|
-
readonly violet: {
|
|
1068
|
-
background: any;
|
|
1069
|
-
backgroundStrong: any;
|
|
1070
|
-
backgroundSoft: any;
|
|
1071
|
-
backgroundHover: any;
|
|
1072
|
-
backgroundPress: any;
|
|
1073
|
-
backgroundFocus: any;
|
|
1074
|
-
backgroundTransparent: Variable<any>;
|
|
1075
|
-
color: any;
|
|
1076
|
-
colorHover: any;
|
|
1077
|
-
colorPress: any;
|
|
1078
|
-
colorFocus: any;
|
|
1079
|
-
colorTranslucent: string;
|
|
1080
|
-
colorMid: string | Variable<any>;
|
|
1081
|
-
shadowColor: Variable<any>;
|
|
1082
|
-
shadowColorHover: string | Variable<any>;
|
|
1083
|
-
shadowColorPress: string | Variable<any>;
|
|
1084
|
-
shadowColorFocus: string | Variable<any>;
|
|
1085
|
-
borderColor: string | Variable<any>;
|
|
1086
|
-
borderColorHover: string | Variable<any>;
|
|
1087
|
-
borderColorPress: string | Variable<any>;
|
|
1088
|
-
borderColorFocus: string | Variable<any>;
|
|
1089
|
-
};
|
|
1090
1181
|
readonly yellow: {
|
|
1091
1182
|
background: any;
|
|
1092
1183
|
backgroundStrong: any;
|
|
@@ -1616,75 +1707,6 @@ declare const allThemes: {
|
|
|
1616
1707
|
borderColorPress: string | Variable<any>;
|
|
1617
1708
|
borderColorFocus: string | Variable<any>;
|
|
1618
1709
|
};
|
|
1619
|
-
readonly light_violet_alt1: {
|
|
1620
|
-
background: any;
|
|
1621
|
-
backgroundStrong: any;
|
|
1622
|
-
backgroundSoft: any;
|
|
1623
|
-
backgroundHover: any;
|
|
1624
|
-
backgroundPress: any;
|
|
1625
|
-
backgroundFocus: any;
|
|
1626
|
-
backgroundTransparent: Variable<any>;
|
|
1627
|
-
color: any;
|
|
1628
|
-
colorHover: any;
|
|
1629
|
-
colorPress: any;
|
|
1630
|
-
colorFocus: any;
|
|
1631
|
-
colorTranslucent: string;
|
|
1632
|
-
colorMid: string | Variable<any>;
|
|
1633
|
-
shadowColor: Variable<any>;
|
|
1634
|
-
shadowColorHover: string | Variable<any>;
|
|
1635
|
-
shadowColorPress: string | Variable<any>;
|
|
1636
|
-
shadowColorFocus: string | Variable<any>;
|
|
1637
|
-
borderColor: string | Variable<any>;
|
|
1638
|
-
borderColorHover: string | Variable<any>;
|
|
1639
|
-
borderColorPress: string | Variable<any>;
|
|
1640
|
-
borderColorFocus: string | Variable<any>;
|
|
1641
|
-
};
|
|
1642
|
-
readonly light_violet_alt2: {
|
|
1643
|
-
background: any;
|
|
1644
|
-
backgroundStrong: any;
|
|
1645
|
-
backgroundSoft: any;
|
|
1646
|
-
backgroundHover: any;
|
|
1647
|
-
backgroundPress: any;
|
|
1648
|
-
backgroundFocus: any;
|
|
1649
|
-
backgroundTransparent: Variable<any>;
|
|
1650
|
-
color: any;
|
|
1651
|
-
colorHover: any;
|
|
1652
|
-
colorPress: any;
|
|
1653
|
-
colorFocus: any;
|
|
1654
|
-
colorTranslucent: string;
|
|
1655
|
-
colorMid: string | Variable<any>;
|
|
1656
|
-
shadowColor: Variable<any>;
|
|
1657
|
-
shadowColorHover: string | Variable<any>;
|
|
1658
|
-
shadowColorPress: string | Variable<any>;
|
|
1659
|
-
shadowColorFocus: string | Variable<any>;
|
|
1660
|
-
borderColor: string | Variable<any>;
|
|
1661
|
-
borderColorHover: string | Variable<any>;
|
|
1662
|
-
borderColorPress: string | Variable<any>;
|
|
1663
|
-
borderColorFocus: string | Variable<any>;
|
|
1664
|
-
};
|
|
1665
|
-
readonly light_violet_alt3: {
|
|
1666
|
-
background: any;
|
|
1667
|
-
backgroundStrong: any;
|
|
1668
|
-
backgroundSoft: any;
|
|
1669
|
-
backgroundHover: any;
|
|
1670
|
-
backgroundPress: any;
|
|
1671
|
-
backgroundFocus: any;
|
|
1672
|
-
backgroundTransparent: Variable<any>;
|
|
1673
|
-
color: any;
|
|
1674
|
-
colorHover: any;
|
|
1675
|
-
colorPress: any;
|
|
1676
|
-
colorFocus: any;
|
|
1677
|
-
colorTranslucent: string;
|
|
1678
|
-
colorMid: string | Variable<any>;
|
|
1679
|
-
shadowColor: Variable<any>;
|
|
1680
|
-
shadowColorHover: string | Variable<any>;
|
|
1681
|
-
shadowColorPress: string | Variable<any>;
|
|
1682
|
-
shadowColorFocus: string | Variable<any>;
|
|
1683
|
-
borderColor: string | Variable<any>;
|
|
1684
|
-
borderColorHover: string | Variable<any>;
|
|
1685
|
-
borderColorPress: string | Variable<any>;
|
|
1686
|
-
borderColorFocus: string | Variable<any>;
|
|
1687
|
-
};
|
|
1688
1710
|
readonly light_yellow_alt1: {
|
|
1689
1711
|
background: any;
|
|
1690
1712
|
backgroundStrong: any;
|
|
@@ -2306,75 +2328,6 @@ declare const allThemes: {
|
|
|
2306
2328
|
borderColorPress: string | Variable<any>;
|
|
2307
2329
|
borderColorFocus: string | Variable<any>;
|
|
2308
2330
|
};
|
|
2309
|
-
readonly dark_violet_alt1: {
|
|
2310
|
-
background: any;
|
|
2311
|
-
backgroundStrong: any;
|
|
2312
|
-
backgroundSoft: any;
|
|
2313
|
-
backgroundHover: any;
|
|
2314
|
-
backgroundPress: any;
|
|
2315
|
-
backgroundFocus: any;
|
|
2316
|
-
backgroundTransparent: Variable<any>;
|
|
2317
|
-
color: any;
|
|
2318
|
-
colorHover: any;
|
|
2319
|
-
colorPress: any;
|
|
2320
|
-
colorFocus: any;
|
|
2321
|
-
colorTranslucent: string;
|
|
2322
|
-
colorMid: string | Variable<any>;
|
|
2323
|
-
shadowColor: Variable<any>;
|
|
2324
|
-
shadowColorHover: string | Variable<any>;
|
|
2325
|
-
shadowColorPress: string | Variable<any>;
|
|
2326
|
-
shadowColorFocus: string | Variable<any>;
|
|
2327
|
-
borderColor: string | Variable<any>;
|
|
2328
|
-
borderColorHover: string | Variable<any>;
|
|
2329
|
-
borderColorPress: string | Variable<any>;
|
|
2330
|
-
borderColorFocus: string | Variable<any>;
|
|
2331
|
-
};
|
|
2332
|
-
readonly dark_violet_alt2: {
|
|
2333
|
-
background: any;
|
|
2334
|
-
backgroundStrong: any;
|
|
2335
|
-
backgroundSoft: any;
|
|
2336
|
-
backgroundHover: any;
|
|
2337
|
-
backgroundPress: any;
|
|
2338
|
-
backgroundFocus: any;
|
|
2339
|
-
backgroundTransparent: Variable<any>;
|
|
2340
|
-
color: any;
|
|
2341
|
-
colorHover: any;
|
|
2342
|
-
colorPress: any;
|
|
2343
|
-
colorFocus: any;
|
|
2344
|
-
colorTranslucent: string;
|
|
2345
|
-
colorMid: string | Variable<any>;
|
|
2346
|
-
shadowColor: Variable<any>;
|
|
2347
|
-
shadowColorHover: string | Variable<any>;
|
|
2348
|
-
shadowColorPress: string | Variable<any>;
|
|
2349
|
-
shadowColorFocus: string | Variable<any>;
|
|
2350
|
-
borderColor: string | Variable<any>;
|
|
2351
|
-
borderColorHover: string | Variable<any>;
|
|
2352
|
-
borderColorPress: string | Variable<any>;
|
|
2353
|
-
borderColorFocus: string | Variable<any>;
|
|
2354
|
-
};
|
|
2355
|
-
readonly dark_violet_alt3: {
|
|
2356
|
-
background: any;
|
|
2357
|
-
backgroundStrong: any;
|
|
2358
|
-
backgroundSoft: any;
|
|
2359
|
-
backgroundHover: any;
|
|
2360
|
-
backgroundPress: any;
|
|
2361
|
-
backgroundFocus: any;
|
|
2362
|
-
backgroundTransparent: Variable<any>;
|
|
2363
|
-
color: any;
|
|
2364
|
-
colorHover: any;
|
|
2365
|
-
colorPress: any;
|
|
2366
|
-
colorFocus: any;
|
|
2367
|
-
colorTranslucent: string;
|
|
2368
|
-
colorMid: string | Variable<any>;
|
|
2369
|
-
shadowColor: Variable<any>;
|
|
2370
|
-
shadowColorHover: string | Variable<any>;
|
|
2371
|
-
shadowColorPress: string | Variable<any>;
|
|
2372
|
-
shadowColorFocus: string | Variable<any>;
|
|
2373
|
-
borderColor: string | Variable<any>;
|
|
2374
|
-
borderColorHover: string | Variable<any>;
|
|
2375
|
-
borderColorPress: string | Variable<any>;
|
|
2376
|
-
borderColorFocus: string | Variable<any>;
|
|
2377
|
-
};
|
|
2378
2331
|
readonly dark_yellow_alt1: {
|
|
2379
2332
|
background: any;
|
|
2380
2333
|
backgroundStrong: any;
|
package/types/themes.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"themes.d.ts","sourceRoot":"","sources":["../src/themes.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"themes.d.ts","sourceRoot":"","sources":["../src/themes.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAiD,MAAM,eAAe,CAAA;AAkPvF,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGR,CAAA;AAEF,aAAK,SAAS,GAAG;KACd,GAAG,IAAI,MAAM,OAAO,IAAI,GAAG,MAAM;CACnC,CAAA;AAED,QAAA,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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