@tamagui/themes 1.15.12 → 1.15.14
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 +5 -5
- package/dist/cjs/themes.js.map +2 -2
- package/dist/esm/themes.js +5 -5
- package/dist/esm/themes.js.map +2 -2
- package/dist/esm/themes.mjs +5 -5
- package/dist/esm/themes.mjs.map +2 -2
- package/package.json +5 -5
- package/src/themes.tsx +8 -5
- package/types/themes.d.ts +5904 -3456
- package/types/themes.d.ts.map +1 -1
package/dist/cjs/themes.js
CHANGED
|
@@ -102,7 +102,7 @@ const template = {
|
|
|
102
102
|
// dark_red_Button theme to have a stronger background than the dark_red theme.
|
|
103
103
|
background: 2,
|
|
104
104
|
backgroundHover: 3,
|
|
105
|
-
backgroundPress:
|
|
105
|
+
backgroundPress: 4,
|
|
106
106
|
backgroundFocus: 2,
|
|
107
107
|
backgroundStrong: 1,
|
|
108
108
|
backgroundTransparent: 0,
|
|
@@ -135,6 +135,9 @@ const darkShadows = {
|
|
|
135
135
|
};
|
|
136
136
|
const lightTemplate = {
|
|
137
137
|
...template,
|
|
138
|
+
background: 2,
|
|
139
|
+
backgroundHover: 2,
|
|
140
|
+
backgroundPress: 3,
|
|
138
141
|
// our light color palette is... a bit unique
|
|
139
142
|
borderColor: 6,
|
|
140
143
|
borderColorHover: 7,
|
|
@@ -234,10 +237,6 @@ function getAltThemes({
|
|
|
234
237
|
};
|
|
235
238
|
const alt1 = (0, import_create_theme.applyMask)(theme, masks.weaker, maskOptionsAlt);
|
|
236
239
|
const alt2 = (0, import_create_theme.applyMask)(alt1, masks.weaker, maskOptionsAlt);
|
|
237
|
-
const stronger = (0, import_create_theme.applyMask)(theme, masks.stronger, {
|
|
238
|
-
...maskOptionsAlt,
|
|
239
|
-
strength: 3
|
|
240
|
-
});
|
|
241
240
|
const active = activeTheme ?? (process.env.ACTIVE_THEME_INVERSE ? inverse : (() => {
|
|
242
241
|
return (0, import_create_theme.applyMask)(theme, masks.weaker, {
|
|
243
242
|
...maskOptions,
|
|
@@ -275,6 +274,7 @@ function getComponentThemes(theme, inverse, isLight) {
|
|
|
275
274
|
borderColorFocus: weaker1.borderColorFocus
|
|
276
275
|
};
|
|
277
276
|
return {
|
|
277
|
+
ListItem: stronger1,
|
|
278
278
|
Card: weaker1,
|
|
279
279
|
Button: weaker2,
|
|
280
280
|
Checkbox: weaker2,
|
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 {\n MaskOptions,\n addChildren,\n applyMask,\n createStrengthenMask,\n createTheme,\n createWeakenMask,\n skipMask,\n} from '@tamagui/create-theme'\n\nimport { colorTokens, darkColors, lightColors, tokens } from './tokens'\n\ntype ColorName = keyof typeof colorTokens.dark\n\nconst lightTransparent = 'rgba(255,255,255,0)'\nconst darkTransparent = 'rgba(10,10,10,0)'\n\n// background => foreground\nconst palettes = {\n dark: [\n darkTransparent,\n '#050505',\n '#151515',\n '#191919',\n '#232323',\n '#282828',\n '#323232',\n '#424242',\n '#494949',\n '#545454',\n '#626262',\n '#a5a5a5',\n '#fff',\n lightTransparent,\n ],\n light: [\n lightTransparent,\n '#fff',\n '#f9f9f9',\n 'hsl(0, 0%, 97.3%)',\n 'hsl(0, 0%, 95.1%)',\n 'hsl(0, 0%, 94.0%)',\n 'hsl(0, 0%, 92.0%)',\n 'hsl(0, 0%, 89.5%)',\n 'hsl(0, 0%, 81.0%)',\n 'hsl(0, 0%, 56.1%)',\n 'hsl(0, 0%, 50.3%)',\n 'hsl(0, 0%, 42.5%)',\n 'hsl(0, 0%, 9.0%)',\n darkTransparent,\n ],\n}\n\nconst templateColors = {\n color1: 1,\n color2: 2,\n color3: 3,\n color4: 4,\n color5: 5,\n color6: 6,\n color7: 7,\n color8: 8,\n color9: 9,\n color10: 10,\n color11: 11,\n color12: 12,\n}\n\nconst templateShadows = {\n shadowColor: 1,\n shadowColorHover: 1,\n shadowColorPress: 2,\n shadowColorFocus: 2,\n}\n\n// we can use subset of our template as a \"override\" so it doesn't get adjusted with masks\n// we want to skip over templateColor + templateShadows\nconst toSkip = {\n ...templateColors,\n ...templateShadows,\n}\n\nconst override = Object.fromEntries(Object.entries(toSkip).map(([k]) => [k, 0]))\nconst overrideShadows = Object.fromEntries(\n Object.entries(templateShadows).map(([k]) => [k, 0])\n)\nconst overrideWithColors = {\n ...override,\n color: 0,\n colorHover: 0,\n colorFocus: 0,\n colorPress: 0,\n}\n\n// templates use the palette and specify index\n// negative goes backwards from end so -1 is the last item\nconst template = {\n ...toSkip,\n // the background, color, etc keys here work like generics - they make it so you\n // can publish components for others to use without mandating a specific color scale\n // the @tamagui/button Button component looks for `$background`, so you set the\n // dark_red_Button theme to have a stronger background than the dark_red theme.\n background: 2,\n backgroundHover: 3,\n backgroundPress:
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAQO;AAEP,oBAA6D;AAI7D,MAAM,mBAAmB;AACzB,MAAM,kBAAkB;AAGxB,MAAM,WAAW;AAAA,EACf,MAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,OAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AAEA,MAAM,iBAAiB;AAAA,EACrB,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AA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aAAa;AAAA,EACb,kBAAkB;AAAA,EAClB,kBAAkB;AAAA,EAClB,kBAAkB;AACpB;AAEA,MAAM,gBAAgB;AAAA,EACpB,GAAG;AAAA;AAAA,
|
|
4
|
+
"sourcesContent": ["import {\n MaskOptions,\n addChildren,\n applyMask,\n createStrengthenMask,\n createTheme,\n createWeakenMask,\n skipMask,\n} from '@tamagui/create-theme'\n\nimport { colorTokens, darkColors, lightColors, tokens } from './tokens'\n\ntype ColorName = keyof typeof colorTokens.dark\n\nconst lightTransparent = 'rgba(255,255,255,0)'\nconst darkTransparent = 'rgba(10,10,10,0)'\n\n// background => foreground\nconst palettes = {\n dark: [\n darkTransparent,\n '#050505',\n '#151515',\n '#191919',\n '#232323',\n '#282828',\n '#323232',\n '#424242',\n '#494949',\n '#545454',\n '#626262',\n '#a5a5a5',\n '#fff',\n lightTransparent,\n ],\n light: [\n lightTransparent,\n '#fff',\n '#f9f9f9',\n 'hsl(0, 0%, 97.3%)',\n 'hsl(0, 0%, 95.1%)',\n 'hsl(0, 0%, 94.0%)',\n 'hsl(0, 0%, 92.0%)',\n 'hsl(0, 0%, 89.5%)',\n 'hsl(0, 0%, 81.0%)',\n 'hsl(0, 0%, 56.1%)',\n 'hsl(0, 0%, 50.3%)',\n 'hsl(0, 0%, 42.5%)',\n 'hsl(0, 0%, 9.0%)',\n darkTransparent,\n ],\n}\n\nconst templateColors = {\n color1: 1,\n color2: 2,\n color3: 3,\n color4: 4,\n color5: 5,\n color6: 6,\n color7: 7,\n color8: 8,\n color9: 9,\n color10: 10,\n color11: 11,\n color12: 12,\n}\n\nconst templateShadows = {\n shadowColor: 1,\n shadowColorHover: 1,\n shadowColorPress: 2,\n shadowColorFocus: 2,\n}\n\n// we can use subset of our template as a \"override\" so it doesn't get adjusted with masks\n// we want to skip over templateColor + templateShadows\nconst toSkip = {\n ...templateColors,\n ...templateShadows,\n}\n\nconst override = Object.fromEntries(Object.entries(toSkip).map(([k]) => [k, 0]))\nconst overrideShadows = Object.fromEntries(\n Object.entries(templateShadows).map(([k]) => [k, 0])\n)\nconst overrideWithColors = {\n ...override,\n color: 0,\n colorHover: 0,\n colorFocus: 0,\n colorPress: 0,\n}\n\n// templates use the palette and specify index\n// negative goes backwards from end so -1 is the last item\nconst template = {\n ...toSkip,\n // the background, color, etc keys here work like generics - they make it so you\n // can publish components for others to use without mandating a specific color scale\n // the @tamagui/button Button component looks for `$background`, so you set the\n // dark_red_Button theme to have a stronger background than the dark_red theme.\n background: 2,\n backgroundHover: 3,\n backgroundPress: 4,\n backgroundFocus: 2,\n backgroundStrong: 1,\n backgroundTransparent: 0,\n color: -1,\n colorHover: -2,\n colorPress: -1,\n colorFocus: -2,\n colorTransparent: -0,\n borderColor: 4,\n borderColorHover: 5,\n borderColorPress: 3,\n borderColorFocus: 4,\n placeholderColor: -4,\n}\n\nconst lightShadowColor = 'rgba(0,0,0,0.02)'\nconst lightShadowColorStrong = 'rgba(0,0,0,0.066)'\nconst darkShadowColor = 'rgba(0,0,0,0.2)'\nconst darkShadowColorStrong = 'rgba(0,0,0,0.3)'\n\nconst lightShadows = {\n shadowColor: lightShadowColorStrong,\n shadowColorHover: lightShadowColorStrong,\n shadowColorPress: lightShadowColor,\n shadowColorFocus: lightShadowColor,\n}\n\nconst darkShadows = {\n shadowColor: darkShadowColorStrong,\n shadowColorHover: darkShadowColorStrong,\n shadowColorPress: darkShadowColor,\n shadowColorFocus: darkShadowColor,\n}\n\nconst lightTemplate = {\n ...template,\n\n background: 2,\n backgroundHover: 2,\n backgroundPress: 3,\n\n // our light color palette is... a bit unique\n borderColor: 6,\n borderColorHover: 7,\n borderColorFocus: 5,\n borderColorPress: 6,\n ...lightShadows,\n}\n\nconst darkTemplate = { ...template, ...darkShadows }\n\nconst light = createTheme(palettes.light, lightTemplate)\nconst dark = createTheme(palettes.dark, darkTemplate)\n\ntype SubTheme = typeof light\n\nconst baseThemes: {\n light: SubTheme\n dark: SubTheme\n} = {\n light,\n dark,\n}\n\nconst masks = {\n skip: skipMask,\n weaker: createWeakenMask(),\n stronger: createStrengthenMask(),\n}\n\n// default mask options for most uses\nconst maskOptions: MaskOptions = {\n override,\n skip: toSkip,\n // avoids the transparent ends\n max: palettes.light.length - 2,\n min: 1,\n}\n\nconst transparent = (hsl: string, opacity = 0) =>\n hsl.replace(`%)`, `%, ${opacity})`).replace(`hsl(`, `hsla(`)\n\n// setup colorThemes and their inverses\nconst [lightColorThemes, darkColorThemes] = [colorTokens.light, colorTokens.dark].map(\n (colorSet, i) => {\n const isLight = i === 0\n const theme = baseThemes[isLight ? 'light' : 'dark']\n\n return Object.fromEntries(\n Object.keys(colorSet).map((color) => {\n const colorPalette = Object.values(colorSet[color]) as string[]\n // were re-ordering these\n const [head, tail] = [\n colorPalette.slice(0, 6),\n colorPalette.slice(colorPalette.length - 5),\n ]\n // add our transparent colors first/last\n // and make sure the last (foreground) color is white/black rather than colorful\n // this is mostly for consistency with the older theme-base\n const palette = [\n transparent(colorPalette[0]),\n ...head,\n ...tail,\n theme.color,\n transparent(colorPalette[colorPalette.length - 1]),\n ]\n\n const colorTheme = createTheme(\n palette,\n isLight\n ? {\n ...lightTemplate,\n // light color themes are a bit less sensitive\n borderColor: 4,\n borderColorHover: 5,\n borderColorFocus: 4,\n borderColorPress: 4,\n }\n : darkTemplate\n )\n\n return [color, colorTheme]\n })\n ) as Record<ColorName, SubTheme>\n }\n)\n\nconst allThemes = addChildren(baseThemes, (name, theme) => {\n const isLight = name === 'light'\n const inverseName = isLight ? 'dark' : 'light'\n const inverseTheme = baseThemes[inverseName]\n const colorThemes = isLight ? lightColorThemes : darkColorThemes\n const inverseColorThemes = isLight ? darkColorThemes : lightColorThemes\n\n const allColorThemes = addChildren(colorThemes, (colorName, colorTheme) => {\n const inverse = inverseColorThemes[colorName]\n return {\n ...getAltThemes({\n theme: colorTheme,\n inverse,\n isLight,\n }),\n ...getComponentThemes(colorTheme, inverse, isLight),\n }\n })\n\n const baseSubThemes = {\n ...getAltThemes({ theme, inverse: inverseTheme, isLight }),\n ...getComponentThemes(theme, inverseTheme, isLight),\n }\n\n return {\n ...baseSubThemes,\n ...allColorThemes,\n }\n})\n\nfunction getAltThemes({\n theme,\n inverse,\n isLight,\n activeTheme,\n}: {\n theme: SubTheme\n inverse: SubTheme\n isLight: boolean\n activeTheme?: SubTheme\n}) {\n const maskOptionsAlt = {\n ...maskOptions,\n override: overrideShadows,\n }\n const alt1 = applyMask(theme, masks.weaker, maskOptionsAlt)\n const alt2 = applyMask(alt1, masks.weaker, maskOptionsAlt)\n\n const active =\n activeTheme ??\n (process.env.ACTIVE_THEME_INVERSE\n ? inverse\n : (() => {\n return applyMask(theme, masks.weaker, {\n ...maskOptions,\n strength: 3,\n skip: {\n ...maskOptions.skip,\n color: 1,\n },\n })\n })())\n\n return addChildren({ alt1, alt2, active }, (_, subTheme) => {\n return getComponentThemes(subTheme, subTheme === inverse ? theme : inverse, isLight)\n })\n}\n\nfunction getComponentThemes(theme: SubTheme, inverse: SubTheme, isLight: boolean) {\n const weaker1 = applyMask(theme, masks.weaker, maskOptions)\n const weaker2 = applyMask(weaker1, masks.weaker, {\n ...maskOptions,\n override: overrideWithColors,\n })\n const stronger1 = applyMask(theme, masks.stronger, maskOptions)\n const inverse1 = applyMask(inverse, masks.weaker, maskOptions)\n const inverse2 = applyMask(inverse1, masks.weaker, maskOptions)\n const strongerBorderLighterBackground: SubTheme = isLight\n ? {\n ...stronger1,\n borderColor: weaker1.borderColor,\n borderColorHover: weaker1.borderColorHover,\n borderColorPress: weaker1.borderColorPress,\n borderColorFocus: weaker1.borderColorFocus,\n }\n : {\n ...applyMask(theme, masks.skip, maskOptions),\n borderColor: weaker1.borderColor,\n borderColorHover: weaker1.borderColorHover,\n borderColorPress: weaker1.borderColorPress,\n borderColorFocus: weaker1.borderColorFocus,\n }\n\n return {\n ListItem: stronger1,\n Card: weaker1,\n Button: weaker2,\n Checkbox: weaker2,\n DrawerFrame: weaker1,\n SliderTrack: stronger1,\n SliderTrackActive: weaker2,\n SliderThumb: inverse1,\n Progress: weaker1,\n ProgressIndicator: inverse,\n Switch: weaker2,\n SwitchThumb: inverse2,\n TooltipArrow: weaker1,\n TooltipContent: weaker2,\n Input: strongerBorderLighterBackground,\n TextArea: strongerBorderLighterBackground,\n Tooltip: inverse1,\n }\n}\n\nexport const themes = {\n ...allThemes,\n // bring back the full type, the rest use a subset to avoid clogging up ts,\n // tamagui will be smart and use the top level themes as the type for useTheme() etc\n light: createTheme(palettes.light, lightTemplate, { nonInheritedValues: lightColors }),\n dark: createTheme(palettes.dark, darkTemplate, { nonInheritedValues: darkColors }),\n}\n\n// if (process.env.NODE_ENV === 'development') {\n// console.log(JSON.stringify(themes).length)\n// }\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAQO;AAEP,oBAA6D;AAI7D,MAAM,mBAAmB;AACzB,MAAM,kBAAkB;AAGxB,MAAM,WAAW;AAAA,EACf,MAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,OAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AAEA,MAAM,iBAAiB;AAAA,EACrB,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AACX;AAEA,MAAM,kBAAkB;AAAA,EACtB,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OAAO;AAAA,IACP,UAAU;AAAA,IACV,SAAS;AAAA,EACX;AACF;AAEO,MAAM,SAAS;AAAA,EACpB,GAAG;AAAA;AAAA;AAAA,EAGH,WAAO,iCAAY,SAAS,OAAO,eAAe,EAAE,oBAAoB,0BAAY,CAAC;AAAA,EACrF,UAAM,iCAAY,SAAS,MAAM,cAAc,EAAE,oBAAoB,yBAAW,CAAC;AACnF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/themes.js
CHANGED
|
@@ -86,7 +86,7 @@ const template = {
|
|
|
86
86
|
// dark_red_Button theme to have a stronger background than the dark_red theme.
|
|
87
87
|
background: 2,
|
|
88
88
|
backgroundHover: 3,
|
|
89
|
-
backgroundPress:
|
|
89
|
+
backgroundPress: 4,
|
|
90
90
|
backgroundFocus: 2,
|
|
91
91
|
backgroundStrong: 1,
|
|
92
92
|
backgroundTransparent: 0,
|
|
@@ -119,6 +119,9 @@ const darkShadows = {
|
|
|
119
119
|
};
|
|
120
120
|
const lightTemplate = {
|
|
121
121
|
...template,
|
|
122
|
+
background: 2,
|
|
123
|
+
backgroundHover: 2,
|
|
124
|
+
backgroundPress: 3,
|
|
122
125
|
// our light color palette is... a bit unique
|
|
123
126
|
borderColor: 6,
|
|
124
127
|
borderColorHover: 7,
|
|
@@ -218,10 +221,6 @@ function getAltThemes({
|
|
|
218
221
|
};
|
|
219
222
|
const alt1 = applyMask(theme, masks.weaker, maskOptionsAlt);
|
|
220
223
|
const alt2 = applyMask(alt1, masks.weaker, maskOptionsAlt);
|
|
221
|
-
const stronger = applyMask(theme, masks.stronger, {
|
|
222
|
-
...maskOptionsAlt,
|
|
223
|
-
strength: 3
|
|
224
|
-
});
|
|
225
224
|
const active = activeTheme ?? (process.env.ACTIVE_THEME_INVERSE ? inverse : (() => {
|
|
226
225
|
return applyMask(theme, masks.weaker, {
|
|
227
226
|
...maskOptions,
|
|
@@ -259,6 +258,7 @@ function getComponentThemes(theme, inverse, isLight) {
|
|
|
259
258
|
borderColorFocus: weaker1.borderColorFocus
|
|
260
259
|
};
|
|
261
260
|
return {
|
|
261
|
+
ListItem: stronger1,
|
|
262
262
|
Card: weaker1,
|
|
263
263
|
Button: weaker2,
|
|
264
264
|
Checkbox: weaker2,
|
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 {\n MaskOptions,\n addChildren,\n applyMask,\n createStrengthenMask,\n createTheme,\n createWeakenMask,\n skipMask,\n} from '@tamagui/create-theme'\n\nimport { colorTokens, darkColors, lightColors, tokens } from './tokens'\n\ntype ColorName = keyof typeof colorTokens.dark\n\nconst lightTransparent = 'rgba(255,255,255,0)'\nconst darkTransparent = 'rgba(10,10,10,0)'\n\n// background => foreground\nconst palettes = {\n dark: [\n darkTransparent,\n '#050505',\n '#151515',\n '#191919',\n '#232323',\n '#282828',\n '#323232',\n '#424242',\n '#494949',\n '#545454',\n '#626262',\n '#a5a5a5',\n '#fff',\n lightTransparent,\n ],\n light: [\n lightTransparent,\n '#fff',\n '#f9f9f9',\n 'hsl(0, 0%, 97.3%)',\n 'hsl(0, 0%, 95.1%)',\n 'hsl(0, 0%, 94.0%)',\n 'hsl(0, 0%, 92.0%)',\n 'hsl(0, 0%, 89.5%)',\n 'hsl(0, 0%, 81.0%)',\n 'hsl(0, 0%, 56.1%)',\n 'hsl(0, 0%, 50.3%)',\n 'hsl(0, 0%, 42.5%)',\n 'hsl(0, 0%, 9.0%)',\n darkTransparent,\n ],\n}\n\nconst templateColors = {\n color1: 1,\n color2: 2,\n color3: 3,\n color4: 4,\n color5: 5,\n color6: 6,\n color7: 7,\n color8: 8,\n color9: 9,\n color10: 10,\n color11: 11,\n color12: 12,\n}\n\nconst templateShadows = {\n shadowColor: 1,\n shadowColorHover: 1,\n shadowColorPress: 2,\n shadowColorFocus: 2,\n}\n\n// we can use subset of our template as a \"override\" so it doesn't get adjusted with masks\n// we want to skip over templateColor + templateShadows\nconst toSkip = {\n ...templateColors,\n ...templateShadows,\n}\n\nconst override = Object.fromEntries(Object.entries(toSkip).map(([k]) => [k, 0]))\nconst overrideShadows = Object.fromEntries(\n Object.entries(templateShadows).map(([k]) => [k, 0])\n)\nconst overrideWithColors = {\n ...override,\n color: 0,\n colorHover: 0,\n colorFocus: 0,\n colorPress: 0,\n}\n\n// templates use the palette and specify index\n// negative goes backwards from end so -1 is the last item\nconst template = {\n ...toSkip,\n // the background, color, etc keys here work like generics - they make it so you\n // can publish components for others to use without mandating a specific color scale\n // the @tamagui/button Button component looks for `$background`, so you set the\n // dark_red_Button theme to have a stronger background than the dark_red theme.\n background: 2,\n backgroundHover: 3,\n backgroundPress:
|
|
5
|
-
"mappings": "AAAA;AAAA,EAEE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,aAAa,YAAY,mBAA2B;AAI7D,MAAM,mBAAmB;AACzB,MAAM,kBAAkB;AAGxB,MAAM,WAAW;AAAA,EACf,MAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,OAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AAEA,MAAM,iBAAiB;AAAA,EACrB,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,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A,MAAM,gBAAgB;AAAA,EACpB,GAAG;AAAA;AAAA,
|
|
4
|
+
"sourcesContent": ["import {\n MaskOptions,\n addChildren,\n applyMask,\n createStrengthenMask,\n createTheme,\n createWeakenMask,\n skipMask,\n} from '@tamagui/create-theme'\n\nimport { colorTokens, darkColors, lightColors, tokens } from './tokens'\n\ntype ColorName = keyof typeof colorTokens.dark\n\nconst lightTransparent = 'rgba(255,255,255,0)'\nconst darkTransparent = 'rgba(10,10,10,0)'\n\n// background => foreground\nconst palettes = {\n dark: [\n darkTransparent,\n '#050505',\n '#151515',\n '#191919',\n '#232323',\n '#282828',\n '#323232',\n '#424242',\n '#494949',\n '#545454',\n '#626262',\n '#a5a5a5',\n '#fff',\n lightTransparent,\n ],\n light: [\n lightTransparent,\n '#fff',\n '#f9f9f9',\n 'hsl(0, 0%, 97.3%)',\n 'hsl(0, 0%, 95.1%)',\n 'hsl(0, 0%, 94.0%)',\n 'hsl(0, 0%, 92.0%)',\n 'hsl(0, 0%, 89.5%)',\n 'hsl(0, 0%, 81.0%)',\n 'hsl(0, 0%, 56.1%)',\n 'hsl(0, 0%, 50.3%)',\n 'hsl(0, 0%, 42.5%)',\n 'hsl(0, 0%, 9.0%)',\n darkTransparent,\n ],\n}\n\nconst templateColors = {\n color1: 1,\n color2: 2,\n color3: 3,\n color4: 4,\n color5: 5,\n color6: 6,\n color7: 7,\n color8: 8,\n color9: 9,\n color10: 10,\n color11: 11,\n color12: 12,\n}\n\nconst templateShadows = {\n shadowColor: 1,\n shadowColorHover: 1,\n shadowColorPress: 2,\n shadowColorFocus: 2,\n}\n\n// we can use subset of our template as a \"override\" so it doesn't get adjusted with masks\n// we want to skip over templateColor + templateShadows\nconst toSkip = {\n ...templateColors,\n ...templateShadows,\n}\n\nconst override = Object.fromEntries(Object.entries(toSkip).map(([k]) => [k, 0]))\nconst overrideShadows = Object.fromEntries(\n Object.entries(templateShadows).map(([k]) => [k, 0])\n)\nconst overrideWithColors = {\n ...override,\n color: 0,\n colorHover: 0,\n colorFocus: 0,\n colorPress: 0,\n}\n\n// templates use the palette and specify index\n// negative goes backwards from end so -1 is the last item\nconst template = {\n ...toSkip,\n // the background, color, etc keys here work like generics - they make it so you\n // can publish components for others to use without mandating a specific color scale\n // the @tamagui/button Button component looks for `$background`, so you set the\n // dark_red_Button theme to have a stronger background than the dark_red theme.\n background: 2,\n backgroundHover: 3,\n backgroundPress: 4,\n backgroundFocus: 2,\n backgroundStrong: 1,\n backgroundTransparent: 0,\n color: -1,\n colorHover: -2,\n colorPress: -1,\n colorFocus: -2,\n colorTransparent: -0,\n borderColor: 4,\n borderColorHover: 5,\n borderColorPress: 3,\n borderColorFocus: 4,\n placeholderColor: -4,\n}\n\nconst lightShadowColor = 'rgba(0,0,0,0.02)'\nconst lightShadowColorStrong = 'rgba(0,0,0,0.066)'\nconst darkShadowColor = 'rgba(0,0,0,0.2)'\nconst darkShadowColorStrong = 'rgba(0,0,0,0.3)'\n\nconst lightShadows = {\n shadowColor: lightShadowColorStrong,\n shadowColorHover: lightShadowColorStrong,\n shadowColorPress: lightShadowColor,\n shadowColorFocus: lightShadowColor,\n}\n\nconst darkShadows = {\n shadowColor: darkShadowColorStrong,\n shadowColorHover: darkShadowColorStrong,\n shadowColorPress: darkShadowColor,\n shadowColorFocus: darkShadowColor,\n}\n\nconst lightTemplate = {\n ...template,\n\n background: 2,\n backgroundHover: 2,\n backgroundPress: 3,\n\n // our light color palette is... a bit unique\n borderColor: 6,\n borderColorHover: 7,\n borderColorFocus: 5,\n borderColorPress: 6,\n ...lightShadows,\n}\n\nconst darkTemplate = { ...template, ...darkShadows }\n\nconst light = createTheme(palettes.light, lightTemplate)\nconst dark = createTheme(palettes.dark, darkTemplate)\n\ntype SubTheme = typeof light\n\nconst baseThemes: {\n light: SubTheme\n dark: SubTheme\n} = {\n light,\n dark,\n}\n\nconst masks = {\n skip: skipMask,\n weaker: createWeakenMask(),\n stronger: createStrengthenMask(),\n}\n\n// default mask options for most uses\nconst maskOptions: MaskOptions = {\n override,\n skip: toSkip,\n // avoids the transparent ends\n max: palettes.light.length - 2,\n min: 1,\n}\n\nconst transparent = (hsl: string, opacity = 0) =>\n hsl.replace(`%)`, `%, ${opacity})`).replace(`hsl(`, `hsla(`)\n\n// setup colorThemes and their inverses\nconst [lightColorThemes, darkColorThemes] = [colorTokens.light, colorTokens.dark].map(\n (colorSet, i) => {\n const isLight = i === 0\n const theme = baseThemes[isLight ? 'light' : 'dark']\n\n return Object.fromEntries(\n Object.keys(colorSet).map((color) => {\n const colorPalette = Object.values(colorSet[color]) as string[]\n // were re-ordering these\n const [head, tail] = [\n colorPalette.slice(0, 6),\n colorPalette.slice(colorPalette.length - 5),\n ]\n // add our transparent colors first/last\n // and make sure the last (foreground) color is white/black rather than colorful\n // this is mostly for consistency with the older theme-base\n const palette = [\n transparent(colorPalette[0]),\n ...head,\n ...tail,\n theme.color,\n transparent(colorPalette[colorPalette.length - 1]),\n ]\n\n const colorTheme = createTheme(\n palette,\n isLight\n ? {\n ...lightTemplate,\n // light color themes are a bit less sensitive\n borderColor: 4,\n borderColorHover: 5,\n borderColorFocus: 4,\n borderColorPress: 4,\n }\n : darkTemplate\n )\n\n return [color, colorTheme]\n })\n ) as Record<ColorName, SubTheme>\n }\n)\n\nconst allThemes = addChildren(baseThemes, (name, theme) => {\n const isLight = name === 'light'\n const inverseName = isLight ? 'dark' : 'light'\n const inverseTheme = baseThemes[inverseName]\n const colorThemes = isLight ? lightColorThemes : darkColorThemes\n const inverseColorThemes = isLight ? darkColorThemes : lightColorThemes\n\n const allColorThemes = addChildren(colorThemes, (colorName, colorTheme) => {\n const inverse = inverseColorThemes[colorName]\n return {\n ...getAltThemes({\n theme: colorTheme,\n inverse,\n isLight,\n }),\n ...getComponentThemes(colorTheme, inverse, isLight),\n }\n })\n\n const baseSubThemes = {\n ...getAltThemes({ theme, inverse: inverseTheme, isLight }),\n ...getComponentThemes(theme, inverseTheme, isLight),\n }\n\n return {\n ...baseSubThemes,\n ...allColorThemes,\n }\n})\n\nfunction getAltThemes({\n theme,\n inverse,\n isLight,\n activeTheme,\n}: {\n theme: SubTheme\n inverse: SubTheme\n isLight: boolean\n activeTheme?: SubTheme\n}) {\n const maskOptionsAlt = {\n ...maskOptions,\n override: overrideShadows,\n }\n const alt1 = applyMask(theme, masks.weaker, maskOptionsAlt)\n const alt2 = applyMask(alt1, masks.weaker, maskOptionsAlt)\n\n const active =\n activeTheme ??\n (process.env.ACTIVE_THEME_INVERSE\n ? inverse\n : (() => {\n return applyMask(theme, masks.weaker, {\n ...maskOptions,\n strength: 3,\n skip: {\n ...maskOptions.skip,\n color: 1,\n },\n })\n })())\n\n return addChildren({ alt1, alt2, active }, (_, subTheme) => {\n return getComponentThemes(subTheme, subTheme === inverse ? theme : inverse, isLight)\n })\n}\n\nfunction getComponentThemes(theme: SubTheme, inverse: SubTheme, isLight: boolean) {\n const weaker1 = applyMask(theme, masks.weaker, maskOptions)\n const weaker2 = applyMask(weaker1, masks.weaker, {\n ...maskOptions,\n override: overrideWithColors,\n })\n const stronger1 = applyMask(theme, masks.stronger, maskOptions)\n const inverse1 = applyMask(inverse, masks.weaker, maskOptions)\n const inverse2 = applyMask(inverse1, masks.weaker, maskOptions)\n const strongerBorderLighterBackground: SubTheme = isLight\n ? {\n ...stronger1,\n borderColor: weaker1.borderColor,\n borderColorHover: weaker1.borderColorHover,\n borderColorPress: weaker1.borderColorPress,\n borderColorFocus: weaker1.borderColorFocus,\n }\n : {\n ...applyMask(theme, masks.skip, maskOptions),\n borderColor: weaker1.borderColor,\n borderColorHover: weaker1.borderColorHover,\n borderColorPress: weaker1.borderColorPress,\n borderColorFocus: weaker1.borderColorFocus,\n }\n\n return {\n ListItem: stronger1,\n Card: weaker1,\n Button: weaker2,\n Checkbox: weaker2,\n DrawerFrame: weaker1,\n SliderTrack: stronger1,\n SliderTrackActive: weaker2,\n SliderThumb: inverse1,\n Progress: weaker1,\n ProgressIndicator: inverse,\n Switch: weaker2,\n SwitchThumb: inverse2,\n TooltipArrow: weaker1,\n TooltipContent: weaker2,\n Input: strongerBorderLighterBackground,\n TextArea: strongerBorderLighterBackground,\n Tooltip: inverse1,\n }\n}\n\nexport const themes = {\n ...allThemes,\n // bring back the full type, the rest use a subset to avoid clogging up ts,\n // tamagui will be smart and use the top level themes as the type for useTheme() etc\n light: createTheme(palettes.light, lightTemplate, { nonInheritedValues: lightColors }),\n dark: createTheme(palettes.dark, darkTemplate, { nonInheritedValues: darkColors }),\n}\n\n// if (process.env.NODE_ENV === 'development') {\n// console.log(JSON.stringify(themes).length)\n// }\n"],
|
|
5
|
+
"mappings": "AAAA;AAAA,EAEE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,aAAa,YAAY,mBAA2B;AAI7D,MAAM,mBAAmB;AACzB,MAAM,kBAAkB;AAGxB,MAAM,WAAW;AAAA,EACf,MAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,OAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AAEA,MAAM,iBAAiB;AAAA,EACrB,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AACX;AAEA,MAAM,kBAAkB;AAAA,EACtB,aAAa;AAAA,EACb,kBAAkB;AAAA,EAClB,kB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AAM,SAAS;AAAA,EACpB,GAAG;AAAA;AAAA;AAAA,EAGH,OAAO,YAAY,SAAS,OAAO,eAAe,EAAE,oBAAoB,YAAY,CAAC;AAAA,EACrF,MAAM,YAAY,SAAS,MAAM,cAAc,EAAE,oBAAoB,WAAW,CAAC;AACnF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/themes.mjs
CHANGED
|
@@ -86,7 +86,7 @@ const template = {
|
|
|
86
86
|
// dark_red_Button theme to have a stronger background than the dark_red theme.
|
|
87
87
|
background: 2,
|
|
88
88
|
backgroundHover: 3,
|
|
89
|
-
backgroundPress:
|
|
89
|
+
backgroundPress: 4,
|
|
90
90
|
backgroundFocus: 2,
|
|
91
91
|
backgroundStrong: 1,
|
|
92
92
|
backgroundTransparent: 0,
|
|
@@ -119,6 +119,9 @@ const darkShadows = {
|
|
|
119
119
|
};
|
|
120
120
|
const lightTemplate = {
|
|
121
121
|
...template,
|
|
122
|
+
background: 2,
|
|
123
|
+
backgroundHover: 2,
|
|
124
|
+
backgroundPress: 3,
|
|
122
125
|
// our light color palette is... a bit unique
|
|
123
126
|
borderColor: 6,
|
|
124
127
|
borderColorHover: 7,
|
|
@@ -218,10 +221,6 @@ function getAltThemes({
|
|
|
218
221
|
};
|
|
219
222
|
const alt1 = applyMask(theme, masks.weaker, maskOptionsAlt);
|
|
220
223
|
const alt2 = applyMask(alt1, masks.weaker, maskOptionsAlt);
|
|
221
|
-
const stronger = applyMask(theme, masks.stronger, {
|
|
222
|
-
...maskOptionsAlt,
|
|
223
|
-
strength: 3
|
|
224
|
-
});
|
|
225
224
|
const active = activeTheme ?? (process.env.ACTIVE_THEME_INVERSE ? inverse : (() => {
|
|
226
225
|
return applyMask(theme, masks.weaker, {
|
|
227
226
|
...maskOptions,
|
|
@@ -259,6 +258,7 @@ function getComponentThemes(theme, inverse, isLight) {
|
|
|
259
258
|
borderColorFocus: weaker1.borderColorFocus
|
|
260
259
|
};
|
|
261
260
|
return {
|
|
261
|
+
ListItem: stronger1,
|
|
262
262
|
Card: weaker1,
|
|
263
263
|
Button: weaker2,
|
|
264
264
|
Checkbox: weaker2,
|
package/dist/esm/themes.mjs.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/themes.tsx"],
|
|
4
|
-
"sourcesContent": ["import {\n MaskOptions,\n addChildren,\n applyMask,\n createStrengthenMask,\n createTheme,\n createWeakenMask,\n skipMask,\n} from '@tamagui/create-theme'\n\nimport { colorTokens, darkColors, lightColors, tokens } from './tokens'\n\ntype ColorName = keyof typeof colorTokens.dark\n\nconst lightTransparent = 'rgba(255,255,255,0)'\nconst darkTransparent = 'rgba(10,10,10,0)'\n\n// background => foreground\nconst palettes = {\n dark: [\n darkTransparent,\n '#050505',\n '#151515',\n '#191919',\n '#232323',\n '#282828',\n '#323232',\n '#424242',\n '#494949',\n '#545454',\n '#626262',\n '#a5a5a5',\n '#fff',\n lightTransparent,\n ],\n light: [\n lightTransparent,\n '#fff',\n '#f9f9f9',\n 'hsl(0, 0%, 97.3%)',\n 'hsl(0, 0%, 95.1%)',\n 'hsl(0, 0%, 94.0%)',\n 'hsl(0, 0%, 92.0%)',\n 'hsl(0, 0%, 89.5%)',\n 'hsl(0, 0%, 81.0%)',\n 'hsl(0, 0%, 56.1%)',\n 'hsl(0, 0%, 50.3%)',\n 'hsl(0, 0%, 42.5%)',\n 'hsl(0, 0%, 9.0%)',\n darkTransparent,\n ],\n}\n\nconst templateColors = {\n color1: 1,\n color2: 2,\n color3: 3,\n color4: 4,\n color5: 5,\n color6: 6,\n color7: 7,\n color8: 8,\n color9: 9,\n color10: 10,\n color11: 11,\n color12: 12,\n}\n\nconst templateShadows = {\n shadowColor: 1,\n shadowColorHover: 1,\n shadowColorPress: 2,\n shadowColorFocus: 2,\n}\n\n// we can use subset of our template as a \"override\" so it doesn't get adjusted with masks\n// we want to skip over templateColor + templateShadows\nconst toSkip = {\n ...templateColors,\n ...templateShadows,\n}\n\nconst override = Object.fromEntries(Object.entries(toSkip).map(([k]) => [k, 0]))\nconst overrideShadows = Object.fromEntries(\n Object.entries(templateShadows).map(([k]) => [k, 0])\n)\nconst overrideWithColors = {\n ...override,\n color: 0,\n colorHover: 0,\n colorFocus: 0,\n colorPress: 0,\n}\n\n// templates use the palette and specify index\n// negative goes backwards from end so -1 is the last item\nconst template = {\n ...toSkip,\n // the background, color, etc keys here work like generics - they make it so you\n // can publish components for others to use without mandating a specific color scale\n // the @tamagui/button Button component looks for `$background`, so you set the\n // dark_red_Button theme to have a stronger background than the dark_red theme.\n background: 2,\n backgroundHover: 3,\n backgroundPress:
|
|
5
|
-
"mappings": "AAAA;AAAA,EAEE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,aAAa,YAAY,mBAA2B;AAI7D,MAAM,mBAAmB;AACzB,MAAM,kBAAkB;AAGxB,MAAM,WAAW;AAAA,EACf,MAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,OAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AAEA,MAAM,iBAAiB;AAAA,EACrB,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AACX;AAEA,MAAM,k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ourcesContent": ["import {\n MaskOptions,\n addChildren,\n applyMask,\n createStrengthenMask,\n createTheme,\n createWeakenMask,\n skipMask,\n} from '@tamagui/create-theme'\n\nimport { colorTokens, darkColors, lightColors, tokens } from './tokens'\n\ntype ColorName = keyof typeof colorTokens.dark\n\nconst lightTransparent = 'rgba(255,255,255,0)'\nconst darkTransparent = 'rgba(10,10,10,0)'\n\n// background => foreground\nconst palettes = {\n dark: [\n darkTransparent,\n '#050505',\n '#151515',\n '#191919',\n '#232323',\n '#282828',\n '#323232',\n '#424242',\n '#494949',\n '#545454',\n '#626262',\n '#a5a5a5',\n '#fff',\n lightTransparent,\n ],\n light: [\n lightTransparent,\n '#fff',\n '#f9f9f9',\n 'hsl(0, 0%, 97.3%)',\n 'hsl(0, 0%, 95.1%)',\n 'hsl(0, 0%, 94.0%)',\n 'hsl(0, 0%, 92.0%)',\n 'hsl(0, 0%, 89.5%)',\n 'hsl(0, 0%, 81.0%)',\n 'hsl(0, 0%, 56.1%)',\n 'hsl(0, 0%, 50.3%)',\n 'hsl(0, 0%, 42.5%)',\n 'hsl(0, 0%, 9.0%)',\n darkTransparent,\n ],\n}\n\nconst templateColors = {\n color1: 1,\n color2: 2,\n color3: 3,\n color4: 4,\n color5: 5,\n color6: 6,\n color7: 7,\n color8: 8,\n color9: 9,\n color10: 10,\n color11: 11,\n color12: 12,\n}\n\nconst templateShadows = {\n shadowColor: 1,\n shadowColorHover: 1,\n shadowColorPress: 2,\n shadowColorFocus: 2,\n}\n\n// we can use subset of our template as a \"override\" so it doesn't get adjusted with masks\n// we want to skip over templateColor + templateShadows\nconst toSkip = {\n ...templateColors,\n ...templateShadows,\n}\n\nconst override = Object.fromEntries(Object.entries(toSkip).map(([k]) => [k, 0]))\nconst overrideShadows = Object.fromEntries(\n Object.entries(templateShadows).map(([k]) => [k, 0])\n)\nconst overrideWithColors = {\n ...override,\n color: 0,\n colorHover: 0,\n colorFocus: 0,\n colorPress: 0,\n}\n\n// templates use the palette and specify index\n// negative goes backwards from end so -1 is the last item\nconst template = {\n ...toSkip,\n // the background, color, etc keys here work like generics - they make it so you\n // can publish components for others to use without mandating a specific color scale\n // the @tamagui/button Button component looks for `$background`, so you set the\n // dark_red_Button theme to have a stronger background than the dark_red theme.\n background: 2,\n backgroundHover: 3,\n backgroundPress: 4,\n backgroundFocus: 2,\n backgroundStrong: 1,\n backgroundTransparent: 0,\n color: -1,\n colorHover: -2,\n colorPress: -1,\n colorFocus: -2,\n colorTransparent: -0,\n borderColor: 4,\n borderColorHover: 5,\n borderColorPress: 3,\n borderColorFocus: 4,\n placeholderColor: -4,\n}\n\nconst lightShadowColor = 'rgba(0,0,0,0.02)'\nconst lightShadowColorStrong = 'rgba(0,0,0,0.066)'\nconst darkShadowColor = 'rgba(0,0,0,0.2)'\nconst darkShadowColorStrong = 'rgba(0,0,0,0.3)'\n\nconst lightShadows = {\n shadowColor: lightShadowColorStrong,\n shadowColorHover: lightShadowColorStrong,\n shadowColorPress: lightShadowColor,\n shadowColorFocus: lightShadowColor,\n}\n\nconst darkShadows = {\n shadowColor: darkShadowColorStrong,\n shadowColorHover: darkShadowColorStrong,\n shadowColorPress: darkShadowColor,\n shadowColorFocus: darkShadowColor,\n}\n\nconst lightTemplate = {\n ...template,\n\n background: 2,\n backgroundHover: 2,\n backgroundPress: 3,\n\n // our light color palette is... a bit unique\n borderColor: 6,\n borderColorHover: 7,\n borderColorFocus: 5,\n borderColorPress: 6,\n ...lightShadows,\n}\n\nconst darkTemplate = { ...template, ...darkShadows }\n\nconst light = createTheme(palettes.light, lightTemplate)\nconst dark = createTheme(palettes.dark, darkTemplate)\n\ntype SubTheme = typeof light\n\nconst baseThemes: {\n light: SubTheme\n dark: SubTheme\n} = {\n light,\n dark,\n}\n\nconst masks = {\n skip: skipMask,\n weaker: createWeakenMask(),\n stronger: createStrengthenMask(),\n}\n\n// default mask options for most uses\nconst maskOptions: MaskOptions = {\n override,\n skip: toSkip,\n // avoids the transparent ends\n max: palettes.light.length - 2,\n min: 1,\n}\n\nconst transparent = (hsl: string, opacity = 0) =>\n hsl.replace(`%)`, `%, ${opacity})`).replace(`hsl(`, `hsla(`)\n\n// setup colorThemes and their inverses\nconst [lightColorThemes, darkColorThemes] = [colorTokens.light, colorTokens.dark].map(\n (colorSet, i) => {\n const isLight = i === 0\n const theme = baseThemes[isLight ? 'light' : 'dark']\n\n return Object.fromEntries(\n Object.keys(colorSet).map((color) => {\n const colorPalette = Object.values(colorSet[color]) as string[]\n // were re-ordering these\n const [head, tail] = [\n colorPalette.slice(0, 6),\n colorPalette.slice(colorPalette.length - 5),\n ]\n // add our transparent colors first/last\n // and make sure the last (foreground) color is white/black rather than colorful\n // this is mostly for consistency with the older theme-base\n const palette = [\n transparent(colorPalette[0]),\n ...head,\n ...tail,\n theme.color,\n transparent(colorPalette[colorPalette.length - 1]),\n ]\n\n const colorTheme = createTheme(\n palette,\n isLight\n ? {\n ...lightTemplate,\n // light color themes are a bit less sensitive\n borderColor: 4,\n borderColorHover: 5,\n borderColorFocus: 4,\n borderColorPress: 4,\n }\n : darkTemplate\n )\n\n return [color, colorTheme]\n })\n ) as Record<ColorName, SubTheme>\n }\n)\n\nconst allThemes = addChildren(baseThemes, (name, theme) => {\n const isLight = name === 'light'\n const inverseName = isLight ? 'dark' : 'light'\n const inverseTheme = baseThemes[inverseName]\n const colorThemes = isLight ? lightColorThemes : darkColorThemes\n const inverseColorThemes = isLight ? darkColorThemes : lightColorThemes\n\n const allColorThemes = addChildren(colorThemes, (colorName, colorTheme) => {\n const inverse = inverseColorThemes[colorName]\n return {\n ...getAltThemes({\n theme: colorTheme,\n inverse,\n isLight,\n }),\n ...getComponentThemes(colorTheme, inverse, isLight),\n }\n })\n\n const baseSubThemes = {\n ...getAltThemes({ theme, inverse: inverseTheme, isLight }),\n ...getComponentThemes(theme, inverseTheme, isLight),\n }\n\n return {\n ...baseSubThemes,\n ...allColorThemes,\n }\n})\n\nfunction getAltThemes({\n theme,\n inverse,\n isLight,\n activeTheme,\n}: {\n theme: SubTheme\n inverse: SubTheme\n isLight: boolean\n activeTheme?: SubTheme\n}) {\n const maskOptionsAlt = {\n ...maskOptions,\n override: overrideShadows,\n }\n const alt1 = applyMask(theme, masks.weaker, maskOptionsAlt)\n const alt2 = applyMask(alt1, masks.weaker, maskOptionsAlt)\n\n const active =\n activeTheme ??\n (process.env.ACTIVE_THEME_INVERSE\n ? inverse\n : (() => {\n return applyMask(theme, masks.weaker, {\n ...maskOptions,\n strength: 3,\n skip: {\n ...maskOptions.skip,\n color: 1,\n },\n })\n })())\n\n return addChildren({ alt1, alt2, active }, (_, subTheme) => {\n return getComponentThemes(subTheme, subTheme === inverse ? theme : inverse, isLight)\n })\n}\n\nfunction getComponentThemes(theme: SubTheme, inverse: SubTheme, isLight: boolean) {\n const weaker1 = applyMask(theme, masks.weaker, maskOptions)\n const weaker2 = applyMask(weaker1, masks.weaker, {\n ...maskOptions,\n override: overrideWithColors,\n })\n const stronger1 = applyMask(theme, masks.stronger, maskOptions)\n const inverse1 = applyMask(inverse, masks.weaker, maskOptions)\n const inverse2 = applyMask(inverse1, masks.weaker, maskOptions)\n const strongerBorderLighterBackground: SubTheme = isLight\n ? {\n ...stronger1,\n borderColor: weaker1.borderColor,\n borderColorHover: weaker1.borderColorHover,\n borderColorPress: weaker1.borderColorPress,\n borderColorFocus: weaker1.borderColorFocus,\n }\n : {\n ...applyMask(theme, masks.skip, maskOptions),\n borderColor: weaker1.borderColor,\n borderColorHover: weaker1.borderColorHover,\n borderColorPress: weaker1.borderColorPress,\n borderColorFocus: weaker1.borderColorFocus,\n }\n\n return {\n ListItem: stronger1,\n Card: weaker1,\n Button: weaker2,\n Checkbox: weaker2,\n DrawerFrame: weaker1,\n SliderTrack: stronger1,\n SliderTrackActive: weaker2,\n SliderThumb: inverse1,\n Progress: weaker1,\n ProgressIndicator: inverse,\n Switch: weaker2,\n SwitchThumb: inverse2,\n TooltipArrow: weaker1,\n TooltipContent: weaker2,\n Input: strongerBorderLighterBackground,\n TextArea: strongerBorderLighterBackground,\n Tooltip: inverse1,\n }\n}\n\nexport const themes = {\n ...allThemes,\n // bring back the full type, the rest use a subset to avoid clogging up ts,\n // tamagui will be smart and use the top level themes as the type for useTheme() etc\n light: createTheme(palettes.light, lightTemplate, { nonInheritedValues: lightColors }),\n dark: createTheme(palettes.dark, darkTemplate, { nonInheritedValues: darkColors }),\n}\n\n// if (process.env.NODE_ENV === 'development') {\n// console.log(JSON.stringify(themes).length)\n// }\n"],
|
|
5
|
+
"mappings": "AAAA;AAAA,EAEE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,aAAa,YAAY,mBAA2B;AAI7D,MAAM,mBAAmB;AACzB,MAAM,kBAAkB;AAGxB,MAAM,WAAW;AAAA,EACf,MAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,OAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AAEA,MAAM,iBAAiB;AAAA,EACrB,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AACX;AAEA,MAAM,kBAAkB;AAAA,EACtB,aAAa;AAAA,EACb,kBAAkB;AAAA,EAClB,kBAAkB;AAAA,EAClB,kBAAkB;AACpB;AAIA,MAAM,SAAS;AAAA,EACb,G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Y,SAAS,OAAO,eAAe,EAAE,oBAAoB,YAAY,CAAC;AAAA,EACrF,MAAM,YAAY,SAAS,MAAM,cAAc,EAAE,oBAAoB,WAAW,CAAC;AACnF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/themes",
|
|
3
|
-
"version": "1.15.
|
|
3
|
+
"version": "1.15.14",
|
|
4
4
|
"types": "./types/index.d.ts",
|
|
5
5
|
"main": "dist/cjs",
|
|
6
6
|
"module": "dist/esm",
|
|
@@ -33,12 +33,12 @@
|
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@tamagui/colors": "1.15.
|
|
37
|
-
"@tamagui/create-theme": "1.15.
|
|
38
|
-
"@tamagui/web": "1.15.
|
|
36
|
+
"@tamagui/colors": "1.15.14",
|
|
37
|
+
"@tamagui/create-theme": "1.15.14",
|
|
38
|
+
"@tamagui/web": "1.15.14"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@tamagui/build": "1.15.
|
|
41
|
+
"@tamagui/build": "1.15.14"
|
|
42
42
|
},
|
|
43
43
|
"publishConfig": {
|
|
44
44
|
"access": "public"
|
package/src/themes.tsx
CHANGED
|
@@ -102,7 +102,7 @@ const template = {
|
|
|
102
102
|
// dark_red_Button theme to have a stronger background than the dark_red theme.
|
|
103
103
|
background: 2,
|
|
104
104
|
backgroundHover: 3,
|
|
105
|
-
backgroundPress:
|
|
105
|
+
backgroundPress: 4,
|
|
106
106
|
backgroundFocus: 2,
|
|
107
107
|
backgroundStrong: 1,
|
|
108
108
|
backgroundTransparent: 0,
|
|
@@ -139,6 +139,11 @@ const darkShadows = {
|
|
|
139
139
|
|
|
140
140
|
const lightTemplate = {
|
|
141
141
|
...template,
|
|
142
|
+
|
|
143
|
+
background: 2,
|
|
144
|
+
backgroundHover: 2,
|
|
145
|
+
backgroundPress: 3,
|
|
146
|
+
|
|
142
147
|
// our light color palette is... a bit unique
|
|
143
148
|
borderColor: 6,
|
|
144
149
|
borderColorHover: 7,
|
|
@@ -272,10 +277,7 @@ function getAltThemes({
|
|
|
272
277
|
}
|
|
273
278
|
const alt1 = applyMask(theme, masks.weaker, maskOptionsAlt)
|
|
274
279
|
const alt2 = applyMask(alt1, masks.weaker, maskOptionsAlt)
|
|
275
|
-
|
|
276
|
-
...maskOptionsAlt,
|
|
277
|
-
strength: 3,
|
|
278
|
-
})
|
|
280
|
+
|
|
279
281
|
const active =
|
|
280
282
|
activeTheme ??
|
|
281
283
|
(process.env.ACTIVE_THEME_INVERSE
|
|
@@ -322,6 +324,7 @@ function getComponentThemes(theme: SubTheme, inverse: SubTheme, isLight: boolean
|
|
|
322
324
|
}
|
|
323
325
|
|
|
324
326
|
return {
|
|
327
|
+
ListItem: stronger1,
|
|
325
328
|
Card: weaker1,
|
|
326
329
|
Button: weaker2,
|
|
327
330
|
Checkbox: weaker2,
|