@tamagui/theme-base 1.0.0-beta.153 → 1.0.0-beta.16
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/colorUtils.js +5 -0
- package/dist/cjs/themes.js +61 -38
- package/dist/cjs/themes.js.map +2 -2
- package/dist/cjs/tokens.js +18 -17
- package/dist/cjs/tokens.js.map +2 -2
- package/dist/esm/themes.js +54 -41
- package/dist/esm/themes.js.map +2 -2
- package/dist/esm/tokens.js +9 -17
- package/dist/esm/tokens.js.map +2 -2
- package/dist/jsx/themes.js +54 -41
- package/dist/jsx/tokens.js +9 -17
- package/package.json +5 -5
- package/types/themes.d.ts +678 -632
- package/types/themes.d.ts.map +1 -1
- package/types/tokens.d.ts +3 -15
- package/types/tokens.d.ts.map +1 -1
- package/LICENSE +0 -21
- package/dist/cjs/colors.js +0 -64
- package/dist/cjs/colors.js.map +0 -7
- package/dist/cjs/firaFont.js +0 -54
- package/dist/cjs/firaFont.js.map +0 -7
- package/dist/cjs/fonts.js +0 -19
- package/dist/cjs/fonts.js.map +0 -7
- package/dist/cjs/interFont.js +0 -80
- package/dist/cjs/interFont.js.map +0 -7
- package/dist/cjs/silkscreenFont.js +0 -54
- package/dist/cjs/silkscreenFont.js.map +0 -7
- package/dist/esm/colors.js +0 -54
- package/dist/esm/colors.js.map +0 -7
- package/dist/esm/firaFont.js +0 -35
- package/dist/esm/firaFont.js.map +0 -7
- package/dist/esm/fonts.js +0 -3
- package/dist/esm/fonts.js.map +0 -7
- package/dist/esm/interFont.js +0 -61
- package/dist/esm/interFont.js.map +0 -7
- package/dist/esm/silkscreenFont.js +0 -35
- package/dist/esm/silkscreenFont.js.map +0 -7
- package/dist/jsx/colors.js +0 -53
- package/dist/jsx/firaFont.js +0 -34
- package/dist/jsx/fonts.js +0 -2
- package/dist/jsx/interFont.js +0 -60
- package/dist/jsx/silkscreenFont.js +0 -34
- package/types/colors.d.ts +0 -444
- package/types/colors.d.ts.map +0 -1
- package/types/firaFont.d.ts +0 -47
- package/types/firaFont.d.ts.map +0 -1
- package/types/fonts.d.ts +0 -3
- package/types/fonts.d.ts.map +0 -1
- package/types/interFont.d.ts +0 -57
- package/types/interFont.d.ts.map +0 -1
- package/types/silkscreenFont.d.ts +0 -48
- package/types/silkscreenFont.d.ts.map +0 -1
package/dist/cjs/colorUtils.js
CHANGED
|
@@ -57,4 +57,9 @@ const getAlphaFloat = /* @__PURE__ */ __name((a, alpha = 1) => {
|
|
|
57
57
|
}
|
|
58
58
|
return alpha;
|
|
59
59
|
}, "getAlphaFloat");
|
|
60
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
61
|
+
0 && (module.exports = {
|
|
62
|
+
hexToRGBA,
|
|
63
|
+
setColorAlpha
|
|
64
|
+
});
|
|
60
65
|
//# sourceMappingURL=colorUtils.js.map
|
package/dist/cjs/themes.js
CHANGED
|
@@ -79,7 +79,10 @@ __name(createThemesFrom, "createThemesFrom");
|
|
|
79
79
|
const createTheme = /* @__PURE__ */ __name((str = 1, {
|
|
80
80
|
backgrounds,
|
|
81
81
|
isLight = true,
|
|
82
|
+
isBase = false,
|
|
82
83
|
colors = [...backgrounds].reverse(),
|
|
84
|
+
borderColors = isLight ? colors : backgrounds,
|
|
85
|
+
backgroundStronger,
|
|
83
86
|
offsets: offsetsProp
|
|
84
87
|
}) => {
|
|
85
88
|
const offsets = {
|
|
@@ -95,29 +98,45 @@ const createTheme = /* @__PURE__ */ __name((str = 1, {
|
|
|
95
98
|
return arr[Math.max(0, Math.min(index + (offsets[name][str] || 0), arr.length - 1))];
|
|
96
99
|
}, "get");
|
|
97
100
|
const colorTranslucent = (0, import_colorUtils.setColorAlpha)((0, import_core.getVariableValue)(get(colors, 0 + str, "color")), 0.5);
|
|
98
|
-
|
|
101
|
+
let theme = {
|
|
99
102
|
background: get(backgrounds, str),
|
|
100
|
-
backgroundStronger: get(backgrounds, str + strongerDir),
|
|
103
|
+
backgroundStronger: backgroundStronger || get(backgrounds, str + strongerDir),
|
|
101
104
|
backgroundSoft: get(backgrounds, str + 3),
|
|
102
|
-
backgroundHover: get(backgrounds, str +
|
|
105
|
+
backgroundHover: get(backgrounds, str + strongerDir),
|
|
103
106
|
backgroundPress: get(backgrounds, str + darkerDir * 1),
|
|
104
107
|
backgroundFocus: get(backgrounds, str + darkerDir * 2),
|
|
105
108
|
backgroundTransparent: import_tokens.color.grayA1,
|
|
106
|
-
borderColor: isLight ? get(colors, 8 - str, "borderColor") : get(backgrounds, 2 + str, "borderColor"),
|
|
107
|
-
borderColorHover: isLight ? get(colors, 6 - str, "borderColor") : get(backgrounds, 3 + str, "borderColor"),
|
|
108
|
-
borderColorPress: isLight ? get(colors, 5 - str, "borderColor") : get(backgrounds, 1 + str, "borderColor"),
|
|
109
|
-
borderColorFocus: isLight ? get(colors, 4 - str, "borderColor") : get(backgrounds, 3 + str, "borderColor"),
|
|
110
109
|
color: get(colors, 0 + str, "color"),
|
|
111
110
|
colorHover: get(colors, 1 + str, "color"),
|
|
112
111
|
colorPress: get(colors, 2 + str, "color"),
|
|
113
112
|
colorFocus: get(colors, 3 + str, "color"),
|
|
114
113
|
colorTranslucent,
|
|
115
114
|
colorMid: colors[Math.floor(colors.length / 2)],
|
|
116
|
-
shadowColor: isLight ? import_tokens.color.
|
|
115
|
+
shadowColor: isLight ? import_tokens.color.grayA2 : import_tokens.color.grayA8,
|
|
117
116
|
shadowColorHover: darkColors[!isLight ? 1 : 8],
|
|
118
117
|
shadowColorPress: darkColors[!isLight ? 1 : 8],
|
|
119
|
-
shadowColorFocus: darkColors[!isLight ? 1 : 8]
|
|
118
|
+
shadowColorFocus: darkColors[!isLight ? 1 : 8],
|
|
119
|
+
borderColor: null,
|
|
120
|
+
borderColorHover: null,
|
|
121
|
+
borderColorPress: null,
|
|
122
|
+
borderColorFocus: null
|
|
120
123
|
};
|
|
124
|
+
if (isBase) {
|
|
125
|
+
Object.assign(theme, {
|
|
126
|
+
borderColor: isLight ? get(colors, 8 - str, "borderColor") : get(backgrounds, 2 + str, "borderColor"),
|
|
127
|
+
borderColorHover: isLight ? get(colors, 6 - str, "borderColor") : get(backgrounds, 3 + str, "borderColor"),
|
|
128
|
+
borderColorPress: isLight ? get(colors, 5 - str, "borderColor") : get(backgrounds, 1 + str, "borderColor"),
|
|
129
|
+
borderColorFocus: isLight ? get(colors, 4 - str, "borderColor") : get(backgrounds, 3 + str, "borderColor")
|
|
130
|
+
});
|
|
131
|
+
} else {
|
|
132
|
+
Object.assign(theme, {
|
|
133
|
+
borderColor: get(borderColors, 1 + strongerDir, "borderColor"),
|
|
134
|
+
borderColorHover: get(borderColors, 2 + strongerDir, "borderColor"),
|
|
135
|
+
borderColorPress: get(borderColors, 3 + strongerDir, "borderColor"),
|
|
136
|
+
borderColorFocus: get(borderColors, 4 + strongerDir, "borderColor")
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
return theme;
|
|
121
140
|
}, "createTheme");
|
|
122
141
|
const colorSchemes = [
|
|
123
142
|
{ name: "blue", colors: Colors.blue, darkColors: Colors.blueDark },
|
|
@@ -166,26 +185,32 @@ const darkGradient = [
|
|
|
166
185
|
];
|
|
167
186
|
const lightThemes = createThemesFrom("light", createTheme, {
|
|
168
187
|
backgrounds: lightGradient,
|
|
188
|
+
backgroundStronger: "#fcfcfc",
|
|
189
|
+
borderColors: lightGradient.slice(2),
|
|
169
190
|
isLight: true
|
|
170
191
|
});
|
|
171
192
|
const darkThemes = createThemesFrom("dark", createTheme, {
|
|
172
193
|
backgrounds: darkGradient,
|
|
173
|
-
colors: lightGradient,
|
|
194
|
+
colors: lightGradient.slice(2),
|
|
195
|
+
backgroundStronger: "#111",
|
|
196
|
+
isBase: true,
|
|
174
197
|
isLight: false,
|
|
175
198
|
shift: 1,
|
|
176
199
|
offsets: {
|
|
177
|
-
color: [0,
|
|
200
|
+
color: [0, 4, 5, 5, 5, 5]
|
|
178
201
|
}
|
|
179
202
|
});
|
|
180
203
|
const baseThemes = __spreadProps(__spreadValues(__spreadProps(__spreadValues({}, lightThemes), {
|
|
181
204
|
light: __spreadValues(__spreadValues({}, import_colors.allLightColors), lightThemes.light),
|
|
182
205
|
light_active: makeActiveTheme(lightThemes.light),
|
|
183
206
|
light_Card: lightThemes.light,
|
|
207
|
+
light_DrawerFrame: lightThemes.light_alt1,
|
|
184
208
|
light_Button: lightThemes.light_alt1
|
|
185
209
|
}), darkThemes), {
|
|
186
210
|
dark: __spreadValues(__spreadValues({}, import_colors.allDarkColors), darkThemes.dark),
|
|
187
211
|
dark_active: makeActiveTheme(darkThemes.dark),
|
|
188
212
|
dark_Card: darkThemes.dark_alt1,
|
|
213
|
+
dark_DrawerFrame: darkThemes.dark_alt2,
|
|
189
214
|
dark_Button: darkThemes.dark_alt1
|
|
190
215
|
});
|
|
191
216
|
function makeActiveTheme(theme) {
|
|
@@ -198,23 +223,31 @@ function makeActiveTheme(theme) {
|
|
|
198
223
|
}
|
|
199
224
|
__name(makeActiveTheme, "makeActiveTheme");
|
|
200
225
|
const colorThemeEntries = colorSchemes.flatMap(({ name, colors, darkColors }) => {
|
|
201
|
-
const [altLightThemes, altDarkThemes] = [
|
|
226
|
+
const [altLightThemes, altDarkThemes] = [
|
|
227
|
+
{ colors: darkColors, backgrounds: colors },
|
|
228
|
+
{ colors, backgrounds: darkColors }
|
|
229
|
+
].map((props, i) => {
|
|
202
230
|
const isLight = i === 0;
|
|
231
|
+
const [backgrounds, colors2] = [
|
|
232
|
+
Object.values(props.backgrounds),
|
|
233
|
+
Object.values(props.colors).slice(isLight ? 2 : 2)
|
|
234
|
+
];
|
|
203
235
|
const scheme = isLight ? "light" : "dark";
|
|
204
236
|
const shift = isLight ? 0 : 1;
|
|
205
|
-
let backgrounds = Object.values(colors2);
|
|
206
237
|
if (!isLight) {
|
|
207
238
|
const [_, h, sp, lp] = backgrounds[0].match(/hsl\(([0-9\.]+), ([0-9\.]+)\%, ([0-9\.]+)\%\)/);
|
|
208
239
|
backgrounds.unshift(`hsl(${h}, ${sp}%, ${parseFloat(lp) / 2}%)`);
|
|
209
240
|
}
|
|
210
241
|
const themeWithAlts = createThemesFrom(name, createTheme, {
|
|
242
|
+
colors: colors2,
|
|
211
243
|
backgrounds,
|
|
244
|
+
borderColors: backgrounds,
|
|
212
245
|
isLight,
|
|
213
246
|
shift,
|
|
214
247
|
isBase: false,
|
|
215
248
|
offsets: {
|
|
216
|
-
background: isLight ? [1, 1, 1,
|
|
217
|
-
borderColor: isLight ? [
|
|
249
|
+
background: isLight ? [1, 1, 1, 1, 1, 1] : null,
|
|
250
|
+
borderColor: isLight ? [2, 2, 2, 3, 2] : null,
|
|
218
251
|
color: isLight ? [0, 0, -1, -2, -3, -3, -4] : [-1, -1, -1, -1, -1, -1]
|
|
219
252
|
}
|
|
220
253
|
});
|
|
@@ -225,32 +258,22 @@ const colorThemeEntries = colorSchemes.flatMap(({ name, colors, darkColors }) =>
|
|
|
225
258
|
return [
|
|
226
259
|
...altLightThemes,
|
|
227
260
|
[`${lightButtonTheme[0]}_Button`, altLightThemes[2][1]],
|
|
261
|
+
[`${lightButtonTheme[0]}_Card`, altLightThemes[2][1]],
|
|
262
|
+
[`${lightButtonTheme[0]}_DrawerFrame`, altLightThemes[2][1]],
|
|
228
263
|
...altDarkThemes,
|
|
229
|
-
[`${darkButtonTheme[0]}_Button`, altDarkThemes[2][1]]
|
|
264
|
+
[`${darkButtonTheme[0]}_Button`, altDarkThemes[2][1]],
|
|
265
|
+
[`${darkButtonTheme[0]}_Card`, altDarkThemes[2][1]],
|
|
266
|
+
[`${darkButtonTheme[0]}_DrawerFrame`, altDarkThemes[2][1]]
|
|
230
267
|
];
|
|
231
268
|
});
|
|
232
|
-
const transparent = {
|
|
233
|
-
background: "transparent",
|
|
234
|
-
backgroundSoft: "transparent",
|
|
235
|
-
backgroundHover: "transparent",
|
|
236
|
-
backgroundPress: "transparent",
|
|
237
|
-
backgroundFocus: "transparent",
|
|
238
|
-
backgroundTransparent: "transparent",
|
|
239
|
-
shadowColor: "transparent",
|
|
240
|
-
shadowColorHover: "transparent",
|
|
241
|
-
shadowColorPress: "transparent",
|
|
242
|
-
shadowColorFocus: "transparent"
|
|
243
|
-
};
|
|
244
|
-
const dark_outline = __spreadValues(__spreadProps(__spreadValues({}, baseThemes.dark), {
|
|
245
|
-
borderColor: "#fff"
|
|
246
|
-
}), transparent);
|
|
247
|
-
const light_outline = __spreadValues(__spreadProps(__spreadValues({}, baseThemes.light), {
|
|
248
|
-
borderColor: "#000"
|
|
249
|
-
}), transparent);
|
|
250
269
|
const colorThemes = Object.fromEntries(colorThemeEntries);
|
|
251
|
-
const allThemes =
|
|
252
|
-
dark_outline,
|
|
253
|
-
light_outline
|
|
254
|
-
});
|
|
270
|
+
const allThemes = __spreadValues(__spreadValues({}, baseThemes), colorThemes);
|
|
255
271
|
const themes = allThemes;
|
|
272
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
273
|
+
0 && (module.exports = {
|
|
274
|
+
colorSchemes,
|
|
275
|
+
darkGradient,
|
|
276
|
+
lightGradient,
|
|
277
|
+
themes
|
|
278
|
+
});
|
|
256
279
|
//# sourceMappingURL=themes.js.map
|
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 * as Colors from '@tamagui/colors'\nimport { allDarkColors, allLightColors } from '@tamagui/colors'\nimport { Variable, getVariableValue } from '@tamagui/core'\n\nimport { setColorAlpha } from './colorUtils'\nimport { color } from './tokens'\n\ntype ThemeCreatorProps = {\n shift?: number\n backgrounds: (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\ntype AltKeys = 1 | 2 | 3 | 4 // one less for dark_darker\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 const altThemes: 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] = [altThemes[i][0], (altThemes[i + 1] || altThemes[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 themeEntries = [\n ...themeEntries,\n ...altThemes,\n ...altButtonThemes,\n [`${name}_Button`, altThemes[0][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 createTheme = (\n str = 1,\n {\n backgrounds,\n isLight = true,\n // isBase = false,\n colors = [...backgrounds].reverse(),\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 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 return {\n background: get(backgrounds, str),\n backgroundStronger: get(backgrounds, str + strongerDir),\n backgroundSoft: get(backgrounds, str + 3),\n backgroundHover: get(backgrounds, str + lighterDir),\n backgroundPress: get(backgrounds, str + darkerDir * 1),\n backgroundFocus: get(backgrounds, str + darkerDir * 2),\n backgroundTransparent: color.grayA1,\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 // colorStronger: get(colors, str + strongerDir),\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: colors[Math.floor(colors.length / 2)],\n shadowColor: isLight ? color.grayA3 : color.grayA8,\n shadowColorHover: darkColors[!isLight ? 1 : 8],\n shadowColorPress: darkColors[!isLight ? 1 : 8],\n shadowColorFocus: darkColors[!isLight ? 1 : 8],\n }\n}\n\nexport const colorSchemes = [\n { name: 'blue', colors: Colors.blue, darkColors: Colors.blueDark },\n { name: 'gray', colors: Colors.gray, darkColors: Colors.grayDark },\n { name: 'green', colors: Colors.green, darkColors: Colors.greenDark },\n { name: 'indigo', colors: Colors.indigo, darkColors: Colors.indigoDark },\n { name: 'orange', colors: Colors.orange, darkColors: Colors.orangeDark },\n { name: 'pink', colors: Colors.pink, darkColors: Colors.pinkDark },\n { name: 'purple', colors: Colors.purple, darkColors: Colors.purpleDark },\n { name: 'red', colors: Colors.red, darkColors: Colors.redDark },\n { name: 'violet', colors: Colors.violet, darkColors: Colors.violetDark },\n { name: 'yellow', colors: Colors.yellow, darkColors: Colors.yellowDark },\n { name: 'teal', colors: Colors.teal, darkColors: Colors.tealDark },\n { name: 'lime', colors: Colors.lime, darkColors: Colors.limeDark },\n { name: 'brown', colors: Colors.brown, darkColors: Colors.brownDark },\n] as const\n\nexport type ColorNames = typeof colorSchemes[number]['name']\n\nexport const lightGradient = [\n '#fff',\n '#f4f4f4',\n color.gray1,\n color.gray2,\n color.gray3,\n color.gray4,\n color.gray5,\n color.gray6,\n color.gray7,\n color.gray8,\n color.gray9,\n color.gray10,\n color.gray11,\n color.gray12,\n]\n\nexport const darkGradient = [\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\nconst lightThemes = createThemesFrom('light', createTheme, {\n backgrounds: lightGradient,\n isLight: true,\n})\n\nconst darkThemes = createThemesFrom('dark', createTheme, {\n backgrounds: darkGradient,\n colors: lightGradient,\n isLight: false,\n shift: 1,\n offsets: {\n color: [0, 6, 7, 7, 7, 7],\n },\n})\n\nconst baseThemes = {\n // light\n ...lightThemes,\n light: {\n ...allLightColors,\n ...lightThemes.light,\n },\n light_active: makeActiveTheme(lightThemes.light),\n light_Card: lightThemes.light,\n light_Button: lightThemes.light_alt1,\n\n // dark\n ...darkThemes,\n dark: {\n ...allDarkColors,\n ...darkThemes.dark,\n },\n dark_active: makeActiveTheme(darkThemes.dark),\n dark_Card: 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] = [colors, darkColors].map((colors, i) => {\n const isLight = i === 0\n const scheme = isLight ? 'light' : 'dark'\n const shift = isLight ? 0 : 1\n\n let backgrounds = Object.values(colors) as any[]\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, createTheme, {\n backgrounds,\n isLight,\n shift,\n isBase: false,\n offsets: {\n background: isLight ? [1, 1, 1, 0, 0, 0] : null,\n borderColor: isLight ? [0, 1, 1, 2, 2, -2] : null,\n color: isLight ? [0, 0, -1, -2, -3, -3, -4] : [-1, -1, -1, -1, -1, -1],\n },\n })\n return Object.entries(themeWithAlts).map(([k, v]) => [`${scheme}_${k}`, v])\n })\n const lightButtonTheme = altLightThemes[0]\n const darkButtonTheme = altDarkThemes[0]\n return [\n ...altLightThemes,\n [`${lightButtonTheme[0]}_Button`, altLightThemes[2][1]],\n ...altDarkThemes,\n [`${darkButtonTheme[0]}_Button`, altDarkThemes[2][1]],\n ]\n})\n\nconst transparent = {\n background: 'transparent',\n backgroundSoft: 'transparent',\n backgroundHover: 'transparent',\n backgroundPress: 'transparent',\n backgroundFocus: 'transparent',\n backgroundTransparent: 'transparent',\n shadowColor: 'transparent',\n shadowColorHover: 'transparent',\n shadowColorPress: 'transparent',\n shadowColorFocus: 'transparent',\n}\n\ntype MyThemeBase = typeof baseThemes['light_alt1']\n\n// @ts-ignore\nconst dark_outline: MyThemeBase = {\n ...baseThemes.dark,\n borderColor: '#fff',\n ...transparent,\n}\n\n// @ts-ignore\nconst light_outline: MyThemeBase = {\n ...baseThemes.light,\n borderColor: '#000',\n ...transparent,\n}\n\nconst colorThemes: {\n [key in ColorThemeNames]: MyThemeBase\n} = Object.fromEntries(colorThemeEntries) as any\n\nconst allThemes = {\n ...baseThemes,\n ...colorThemes,\n dark_outline,\n light_outline,\n} as const\n\nexport const themes: {\n [key in keyof typeof allThemes]: typeof baseThemes['light']\n} = allThemes as any\n\n// TODO\n// export function createThemes(props: {\n// colors?:\n// | 'amber'\n// | 'blue'\n// | 'bronze'\n// | 'brown'\n// | 'crimson'\n// | 'cyan'\n// | 'gold'\n// | 'grass'\n// | 'gray'\n// | 'green'\n// | 'indigo'\n// | 'lime'\n// | 'mint'\n// | 'olive'\n// | 'orange'\n// | 'pink'\n// | 'plum'\n// | 'purple'\n// | 'mauve'\n// | 'red'\n// | 'sage'\n// | 'sand'\n// | 'sky'\n// | 'slate'\n// | 'teal'\n// | 'tomato'\n// | 'violet'\n// | 'yellow'\n// alternates?: number\n// }) {}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAAwB;AACxB,oBAA8C;AAC9C,kBAA2C;AAE3C,wBAA8B;AAC9B,oBAAsB;
|
|
4
|
+
"sourcesContent": ["import * as Colors from '@tamagui/colors'\nimport { allDarkColors, allLightColors } from '@tamagui/colors'\nimport { Variable, getVariableValue } from '@tamagui/core'\n\nimport { setColorAlpha } from './colorUtils'\nimport { color } from './tokens'\n\n// spaghetti ahead\n\ntype ThemeCreatorProps = {\n shift?: number\n backgrounds: (string | Variable)[]\n backgroundStronger?: 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\ntype AltKeys = 1 | 2 | 3 | 4 // one less for dark_darker\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 const altThemes: 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] = [altThemes[i][0], (altThemes[i + 1] || altThemes[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 themeEntries = [\n ...themeEntries,\n ...altThemes,\n ...altButtonThemes,\n [`${name}_Button`, altThemes[0][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 createTheme = (\n str = 1,\n {\n backgrounds,\n isLight = true,\n isBase = false,\n colors = [...backgrounds].reverse(),\n borderColors = isLight ? colors : backgrounds,\n backgroundStronger,\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 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 backgroundStronger: backgroundStronger || get(backgrounds, str + strongerDir),\n backgroundSoft: get(backgrounds, str + 3),\n backgroundHover: get(backgrounds, str + strongerDir),\n backgroundPress: get(backgrounds, str + darkerDir * 1),\n backgroundFocus: get(backgrounds, str + darkerDir * 2),\n backgroundTransparent: color.grayA1,\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: colors[Math.floor(colors.length / 2)],\n shadowColor: isLight ? color.grayA2 : color.grayA8,\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\nexport const colorSchemes = [\n { name: 'blue', colors: Colors.blue, darkColors: Colors.blueDark },\n { name: 'gray', colors: Colors.gray, darkColors: Colors.grayDark },\n { name: 'green', colors: Colors.green, darkColors: Colors.greenDark },\n { name: 'indigo', colors: Colors.indigo, darkColors: Colors.indigoDark },\n { name: 'orange', colors: Colors.orange, darkColors: Colors.orangeDark },\n { name: 'pink', colors: Colors.pink, darkColors: Colors.pinkDark },\n { name: 'purple', colors: Colors.purple, darkColors: Colors.purpleDark },\n { name: 'red', colors: Colors.red, darkColors: Colors.redDark },\n { name: 'violet', colors: Colors.violet, darkColors: Colors.violetDark },\n { name: 'yellow', colors: Colors.yellow, darkColors: Colors.yellowDark },\n { name: 'teal', colors: Colors.teal, darkColors: Colors.tealDark },\n { name: 'lime', colors: Colors.lime, darkColors: Colors.limeDark },\n { name: 'brown', colors: Colors.brown, darkColors: Colors.brownDark },\n] as const\n\nexport type ColorNames = typeof colorSchemes[number]['name']\n\nexport const lightGradient = [\n '#fff',\n '#f4f4f4',\n color.gray1,\n color.gray2,\n color.gray3,\n color.gray4,\n color.gray5,\n color.gray6,\n color.gray7,\n color.gray8,\n color.gray9,\n color.gray10,\n color.gray11,\n color.gray12,\n]\n\nexport const darkGradient = [\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\nconst lightThemes = createThemesFrom('light', createTheme, {\n backgrounds: lightGradient,\n // isBase: true,\n backgroundStronger: '#fcfcfc',\n borderColors: lightGradient.slice(2),\n isLight: true,\n})\n\nconst darkThemes = createThemesFrom('dark', createTheme, {\n backgrounds: darkGradient,\n colors: lightGradient.slice(2),\n backgroundStronger: '#111',\n isBase: true,\n isLight: false,\n shift: 1,\n offsets: {\n color: [0, 4, 5, 5, 5, 5],\n },\n})\n\nconst baseThemes = {\n // light\n ...lightThemes,\n light: {\n ...allLightColors,\n ...lightThemes.light,\n },\n light_active: makeActiveTheme(lightThemes.light),\n light_Card: lightThemes.light,\n light_DrawerFrame: lightThemes.light_alt1,\n light_Button: lightThemes.light_alt1,\n\n // dark\n ...darkThemes,\n dark: {\n ...allDarkColors,\n ...darkThemes.dark,\n },\n dark_active: makeActiveTheme(darkThemes.dark),\n dark_Card: darkThemes.dark_alt1,\n dark_DrawerFrame: darkThemes.dark_alt2,\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 [backgrounds, colors] = [\n Object.values(props.backgrounds),\n Object.values(props.colors).slice(isLight ? 2 : 2),\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, createTheme, {\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 const lightButtonTheme = altLightThemes[0]\n const darkButtonTheme = altDarkThemes[0]\n return [\n ...altLightThemes,\n [`${lightButtonTheme[0]}_Button`, altLightThemes[2][1]],\n [`${lightButtonTheme[0]}_Card`, altLightThemes[2][1]],\n [`${lightButtonTheme[0]}_DrawerFrame`, altLightThemes[2][1]],\n ...altDarkThemes,\n [`${darkButtonTheme[0]}_Button`, altDarkThemes[2][1]],\n [`${darkButtonTheme[0]}_Card`, altDarkThemes[2][1]],\n [`${darkButtonTheme[0]}_DrawerFrame`, altDarkThemes[2][1]],\n ]\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\n// TODO\n// export function createThemes(props: {\n// colors?:\n// | 'amber'\n// | 'blue'\n// | 'bronze'\n// | 'brown'\n// | 'crimson'\n// | 'cyan'\n// | 'gold'\n// | 'grass'\n// | 'gray'\n// | 'green'\n// | 'indigo'\n// | 'lime'\n// | 'mint'\n// | 'olive'\n// | 'orange'\n// | 'pink'\n// | 'plum'\n// | 'purple'\n// | 'mauve'\n// | 'red'\n// | 'sage'\n// | 'sand'\n// | 'sky'\n// | 'slate'\n// | 'teal'\n// | 'tomato'\n// | 'violet'\n// | 'yellow'\n// alternates?: number\n// }) {}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAAwB;AACxB,oBAA8C;AAC9C,kBAA2C;AAE3C,wBAA8B;AAC9B,oBAAsB;AAqBtB,MAAM,aAAa,CAAC,GAAG,GAAG,GAAG,CAAC;AAK9B,0BACE,MACA,UACA,OAOA;AACA,QAAM,EAAE,QAAQ,MAAM;AACtB,QAAM,QAAQ,SAAS,IAAI,OAAO,KAAK;AACvC,MAAI,eAAsB,CAAC,CAAC,MAAM,KAAK,CAAC;AACxC,QAAM,YAAmB,WAAW,IAAI,CAAC,QAAQ;AAAA,IAC/C,GAAG,WAAW;AAAA,IACd,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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,QAAM,mBAAmB,eAAe;AACxC,QAAM,kBAAkB,cAAc;AACtC,SAAO;AAAA,IACL,GAAG;AAAA,IACH,CAAC,GAAG,iBAAiB,aAAa,eAAe,GAAG,EAAE;AAAA,IACtD,CAAC,GAAG,iBAAiB,WAAW,eAAe,GAAG,EAAE;AAAA,IACpD,CAAC,GAAG,iBAAiB,kBAAkB,eAAe,GAAG,EAAE;AAAA,IAC3D,GAAG;AAAA,IACH,CAAC,GAAG,gBAAgB,aAAa,cAAc,GAAG,EAAE;AAAA,IACpD,CAAC,GAAG,gBAAgB,WAAW,cAAc,GAAG,EAAE;AAAA,IAClD,CAAC,GAAG,gBAAgB,kBAAkB,cAAc,GAAG,EAAE;AAAA,EAC3D;AACF,CAAC;AAID,MAAM,cAEF,OAAO,YAAY,iBAAiB;AAExC,MAAM,YAAY,kCACb,aACA;AAGE,MAAM,SAET;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/tokens.js
CHANGED
|
@@ -16,6 +16,7 @@ var __spreadValues = (a, b) => {
|
|
|
16
16
|
}
|
|
17
17
|
return a;
|
|
18
18
|
};
|
|
19
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
19
20
|
var __export = (target, all) => {
|
|
20
21
|
for (var name in all)
|
|
21
22
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -32,30 +33,20 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
32
33
|
var tokens_exports = {};
|
|
33
34
|
__export(tokens_exports, {
|
|
34
35
|
color: () => color,
|
|
36
|
+
getSizeAt: () => getSizeAt,
|
|
35
37
|
radius: () => radius,
|
|
36
38
|
size: () => size,
|
|
39
|
+
sizeKeys: () => sizeKeys,
|
|
37
40
|
space: () => space,
|
|
38
41
|
zIndex: () => zIndex
|
|
39
42
|
});
|
|
40
43
|
module.exports = __toCommonJS(tokens_exports);
|
|
41
44
|
var import_colors = require("@tamagui/colors");
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
"
|
|
46
|
-
|
|
47
|
-
2: 10,
|
|
48
|
-
3: 15,
|
|
49
|
-
4: 20,
|
|
50
|
-
5: 25,
|
|
51
|
-
6: 30,
|
|
52
|
-
7: 40,
|
|
53
|
-
8: 50,
|
|
54
|
-
9: 65,
|
|
55
|
-
10: 75,
|
|
56
|
-
11: 85,
|
|
57
|
-
12: 100
|
|
58
|
-
};
|
|
45
|
+
const sizeKeys = ["true", "0", "0.25", "0.5", "1", "1.5", "2", "2.5", "3", "3.5", "4", "4.5", "5", "5.5", "6", "6.5", "7", "7.5", "8", "9", "10", "11", "12", "13", "14"];
|
|
46
|
+
const getSizeAt = /* @__PURE__ */ __name((index) => index === 0 ? 0 : Math.round(Math.pow(1.6, index)) + Math.floor(3 * index), "getSizeAt");
|
|
47
|
+
const size = Object.fromEntries(sizeKeys.map((key) => {
|
|
48
|
+
return [key, getSizeAt(key === "true" ? 4 : +key)];
|
|
49
|
+
}));
|
|
59
50
|
const space = __spreadValues(__spreadValues({}, size), Object.fromEntries(Object.entries(size).map(([k, v]) => [`-${k}`, -v])));
|
|
60
51
|
const zIndex = {
|
|
61
52
|
0: 0,
|
|
@@ -78,4 +69,14 @@ const radius = {
|
|
|
78
69
|
8: 20,
|
|
79
70
|
9: 30
|
|
80
71
|
};
|
|
72
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
73
|
+
0 && (module.exports = {
|
|
74
|
+
color,
|
|
75
|
+
getSizeAt,
|
|
76
|
+
radius,
|
|
77
|
+
size,
|
|
78
|
+
sizeKeys,
|
|
79
|
+
space,
|
|
80
|
+
zIndex
|
|
81
|
+
});
|
|
81
82
|
//# sourceMappingURL=tokens.js.map
|
package/dist/cjs/tokens.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/tokens.tsx"],
|
|
4
|
-
"sourcesContent": ["import { allLightColors, darkColorsPostfixed } from '@tamagui/colors'\n\
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import { allLightColors, darkColorsPostfixed } from '@tamagui/colors'\n\n// acknowledge you need more granularity at the smaller sizes with .5s\n// prettier-ignore\nexport const sizeKeys = ['true', '0', '0.25', '0.5', '1', '1.5', '2', '2.5', '3', '3.5', '4', '4.5', '5', '5.5', '6', '6.5', '7', '7.5', '8', '9', '10', '11', '12', '13', '14'] as const\n\n// slightly more than double every 2 indices apart\nexport const getSizeAt = (index: number) =>\n index === 0 ? 0 : Math.round(Math.pow(1.6, index)) + Math.floor(3 * index)\n\nexport const size: {\n [key in typeof sizeKeys[any]]: number\n} = Object.fromEntries(\n sizeKeys.map((key) => {\n return [key, getSizeAt(key === 'true' ? 4 : +key)]\n })\n) as any\n\ntype Sizes = typeof size\ntype SizeKeys = keyof Sizes\n\nexport const space: {\n [Key in `-${SizeKeys}` | SizeKeys]: Key extends keyof Sizes ? Sizes[Key] : number\n} = {\n ...size,\n ...Object.fromEntries(Object.entries(size).map(([k, v]) => [`-${k}`, -v])),\n} as any\n\nexport const zIndex = {\n 0: 0,\n 1: 100,\n 2: 200,\n 3: 300,\n 4: 400,\n 5: 500,\n}\n\nexport const color = {\n ...allLightColors,\n ...darkColorsPostfixed,\n}\n\nexport const radius = {\n 0: 0,\n 1: 3,\n 2: 5,\n 3: 7,\n 4: 9,\n 5: 10,\n 6: 12,\n 7: 16,\n 8: 20,\n 9: 30,\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAoD;AAI7C,MAAM,WAAW,CAAC,QAAQ,KAAK,QAAQ,OAAO,KAAK,OAAO,KAAK,OAAO,KAAK,OAAO,KAAK,OAAO,KAAK,OAAO,KAAK,OAAO,KAAK,OAAO,KAAK,KAAK,MAAM,MAAM,MAAM,MAAM,IAAI;AAGxK,MAAM,YAAY,wBAAC,UACxB,UAAU,IAAI,IAAI,KAAK,MAAM,KAAK,IAAI,KAAK,KAAK,CAAC,IAAI,KAAK,MAAM,IAAI,KAAK,GADlD;AAGlB,MAAM,OAET,OAAO,YACT,SAAS,IAAI,CAAC,QAAQ;AACpB,SAAO,CAAC,KAAK,UAAU,QAAQ,SAAS,IAAI,CAAC,GAAG,CAAC;AACnD,CAAC,CACH;AAKO,MAAM,QAET,kCACC,OACA,OAAO,YAAY,OAAO,QAAQ,IAAI,EAAE,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC;AAGpE,MAAM,SAAS;AAAA,EACpB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAEO,MAAM,QAAQ,kCAChB,+BACA;AAGE,MAAM,SAAS;AAAA,EACpB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/themes.js
CHANGED
|
@@ -35,7 +35,10 @@ __name(createThemesFrom, "createThemesFrom");
|
|
|
35
35
|
const createTheme = /* @__PURE__ */ __name((str = 1, {
|
|
36
36
|
backgrounds,
|
|
37
37
|
isLight = true,
|
|
38
|
+
isBase = false,
|
|
38
39
|
colors = [...backgrounds].reverse(),
|
|
40
|
+
borderColors = isLight ? colors : backgrounds,
|
|
41
|
+
backgroundStronger,
|
|
39
42
|
offsets: offsetsProp
|
|
40
43
|
}) => {
|
|
41
44
|
var _a, _b, _c, _d;
|
|
@@ -52,29 +55,45 @@ const createTheme = /* @__PURE__ */ __name((str = 1, {
|
|
|
52
55
|
return arr[Math.max(0, Math.min(index + (offsets[name][str] || 0), arr.length - 1))];
|
|
53
56
|
}, "get");
|
|
54
57
|
const colorTranslucent = setColorAlpha(getVariableValue(get(colors, 0 + str, "color")), 0.5);
|
|
55
|
-
|
|
58
|
+
let theme = {
|
|
56
59
|
background: get(backgrounds, str),
|
|
57
|
-
backgroundStronger: get(backgrounds, str + strongerDir),
|
|
60
|
+
backgroundStronger: backgroundStronger || get(backgrounds, str + strongerDir),
|
|
58
61
|
backgroundSoft: get(backgrounds, str + 3),
|
|
59
|
-
backgroundHover: get(backgrounds, str +
|
|
62
|
+
backgroundHover: get(backgrounds, str + strongerDir),
|
|
60
63
|
backgroundPress: get(backgrounds, str + darkerDir * 1),
|
|
61
64
|
backgroundFocus: get(backgrounds, str + darkerDir * 2),
|
|
62
65
|
backgroundTransparent: color.grayA1,
|
|
63
|
-
borderColor: isLight ? get(colors, 8 - str, "borderColor") : get(backgrounds, 2 + str, "borderColor"),
|
|
64
|
-
borderColorHover: isLight ? get(colors, 6 - str, "borderColor") : get(backgrounds, 3 + str, "borderColor"),
|
|
65
|
-
borderColorPress: isLight ? get(colors, 5 - str, "borderColor") : get(backgrounds, 1 + str, "borderColor"),
|
|
66
|
-
borderColorFocus: isLight ? get(colors, 4 - str, "borderColor") : get(backgrounds, 3 + str, "borderColor"),
|
|
67
66
|
color: get(colors, 0 + str, "color"),
|
|
68
67
|
colorHover: get(colors, 1 + str, "color"),
|
|
69
68
|
colorPress: get(colors, 2 + str, "color"),
|
|
70
69
|
colorFocus: get(colors, 3 + str, "color"),
|
|
71
70
|
colorTranslucent,
|
|
72
71
|
colorMid: colors[Math.floor(colors.length / 2)],
|
|
73
|
-
shadowColor: isLight ? color.
|
|
72
|
+
shadowColor: isLight ? color.grayA2 : color.grayA8,
|
|
74
73
|
shadowColorHover: darkColors[!isLight ? 1 : 8],
|
|
75
74
|
shadowColorPress: darkColors[!isLight ? 1 : 8],
|
|
76
|
-
shadowColorFocus: darkColors[!isLight ? 1 : 8]
|
|
75
|
+
shadowColorFocus: darkColors[!isLight ? 1 : 8],
|
|
76
|
+
borderColor: null,
|
|
77
|
+
borderColorHover: null,
|
|
78
|
+
borderColorPress: null,
|
|
79
|
+
borderColorFocus: null
|
|
77
80
|
};
|
|
81
|
+
if (isBase) {
|
|
82
|
+
Object.assign(theme, {
|
|
83
|
+
borderColor: isLight ? get(colors, 8 - str, "borderColor") : get(backgrounds, 2 + str, "borderColor"),
|
|
84
|
+
borderColorHover: isLight ? get(colors, 6 - str, "borderColor") : get(backgrounds, 3 + str, "borderColor"),
|
|
85
|
+
borderColorPress: isLight ? get(colors, 5 - str, "borderColor") : get(backgrounds, 1 + str, "borderColor"),
|
|
86
|
+
borderColorFocus: isLight ? get(colors, 4 - str, "borderColor") : get(backgrounds, 3 + str, "borderColor")
|
|
87
|
+
});
|
|
88
|
+
} else {
|
|
89
|
+
Object.assign(theme, {
|
|
90
|
+
borderColor: get(borderColors, 1 + strongerDir, "borderColor"),
|
|
91
|
+
borderColorHover: get(borderColors, 2 + strongerDir, "borderColor"),
|
|
92
|
+
borderColorPress: get(borderColors, 3 + strongerDir, "borderColor"),
|
|
93
|
+
borderColorFocus: get(borderColors, 4 + strongerDir, "borderColor")
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
return theme;
|
|
78
97
|
}, "createTheme");
|
|
79
98
|
const colorSchemes = [
|
|
80
99
|
{ name: "blue", colors: Colors.blue, darkColors: Colors.blueDark },
|
|
@@ -123,15 +142,19 @@ const darkGradient = [
|
|
|
123
142
|
];
|
|
124
143
|
const lightThemes = createThemesFrom("light", createTheme, {
|
|
125
144
|
backgrounds: lightGradient,
|
|
145
|
+
backgroundStronger: "#fcfcfc",
|
|
146
|
+
borderColors: lightGradient.slice(2),
|
|
126
147
|
isLight: true
|
|
127
148
|
});
|
|
128
149
|
const darkThemes = createThemesFrom("dark", createTheme, {
|
|
129
150
|
backgrounds: darkGradient,
|
|
130
|
-
colors: lightGradient,
|
|
151
|
+
colors: lightGradient.slice(2),
|
|
152
|
+
backgroundStronger: "#111",
|
|
153
|
+
isBase: true,
|
|
131
154
|
isLight: false,
|
|
132
155
|
shift: 1,
|
|
133
156
|
offsets: {
|
|
134
|
-
color: [0,
|
|
157
|
+
color: [0, 4, 5, 5, 5, 5]
|
|
135
158
|
}
|
|
136
159
|
});
|
|
137
160
|
const baseThemes = {
|
|
@@ -142,6 +165,7 @@ const baseThemes = {
|
|
|
142
165
|
},
|
|
143
166
|
light_active: makeActiveTheme(lightThemes.light),
|
|
144
167
|
light_Card: lightThemes.light,
|
|
168
|
+
light_DrawerFrame: lightThemes.light_alt1,
|
|
145
169
|
light_Button: lightThemes.light_alt1,
|
|
146
170
|
...darkThemes,
|
|
147
171
|
dark: {
|
|
@@ -150,6 +174,7 @@ const baseThemes = {
|
|
|
150
174
|
},
|
|
151
175
|
dark_active: makeActiveTheme(darkThemes.dark),
|
|
152
176
|
dark_Card: darkThemes.dark_alt1,
|
|
177
|
+
dark_DrawerFrame: darkThemes.dark_alt2,
|
|
153
178
|
dark_Button: darkThemes.dark_alt1
|
|
154
179
|
};
|
|
155
180
|
function makeActiveTheme(theme) {
|
|
@@ -162,23 +187,31 @@ function makeActiveTheme(theme) {
|
|
|
162
187
|
}
|
|
163
188
|
__name(makeActiveTheme, "makeActiveTheme");
|
|
164
189
|
const colorThemeEntries = colorSchemes.flatMap(({ name, colors, darkColors }) => {
|
|
165
|
-
const [altLightThemes, altDarkThemes] = [
|
|
190
|
+
const [altLightThemes, altDarkThemes] = [
|
|
191
|
+
{ colors: darkColors, backgrounds: colors },
|
|
192
|
+
{ colors, backgrounds: darkColors }
|
|
193
|
+
].map((props, i) => {
|
|
166
194
|
const isLight = i === 0;
|
|
195
|
+
const [backgrounds, colors2] = [
|
|
196
|
+
Object.values(props.backgrounds),
|
|
197
|
+
Object.values(props.colors).slice(isLight ? 2 : 2)
|
|
198
|
+
];
|
|
167
199
|
const scheme = isLight ? "light" : "dark";
|
|
168
200
|
const shift = isLight ? 0 : 1;
|
|
169
|
-
let backgrounds = Object.values(colors2);
|
|
170
201
|
if (!isLight) {
|
|
171
202
|
const [_, h, sp, lp] = backgrounds[0].match(/hsl\(([0-9\.]+), ([0-9\.]+)\%, ([0-9\.]+)\%\)/);
|
|
172
203
|
backgrounds.unshift(`hsl(${h}, ${sp}%, ${parseFloat(lp) / 2}%)`);
|
|
173
204
|
}
|
|
174
205
|
const themeWithAlts = createThemesFrom(name, createTheme, {
|
|
206
|
+
colors: colors2,
|
|
175
207
|
backgrounds,
|
|
208
|
+
borderColors: backgrounds,
|
|
176
209
|
isLight,
|
|
177
210
|
shift,
|
|
178
211
|
isBase: false,
|
|
179
212
|
offsets: {
|
|
180
|
-
background: isLight ? [1, 1, 1,
|
|
181
|
-
borderColor: isLight ? [
|
|
213
|
+
background: isLight ? [1, 1, 1, 1, 1, 1] : null,
|
|
214
|
+
borderColor: isLight ? [2, 2, 2, 3, 2] : null,
|
|
182
215
|
color: isLight ? [0, 0, -1, -2, -3, -3, -4] : [-1, -1, -1, -1, -1, -1]
|
|
183
216
|
}
|
|
184
217
|
});
|
|
@@ -189,38 +222,18 @@ const colorThemeEntries = colorSchemes.flatMap(({ name, colors, darkColors }) =>
|
|
|
189
222
|
return [
|
|
190
223
|
...altLightThemes,
|
|
191
224
|
[`${lightButtonTheme[0]}_Button`, altLightThemes[2][1]],
|
|
225
|
+
[`${lightButtonTheme[0]}_Card`, altLightThemes[2][1]],
|
|
226
|
+
[`${lightButtonTheme[0]}_DrawerFrame`, altLightThemes[2][1]],
|
|
192
227
|
...altDarkThemes,
|
|
193
|
-
[`${darkButtonTheme[0]}_Button`, altDarkThemes[2][1]]
|
|
228
|
+
[`${darkButtonTheme[0]}_Button`, altDarkThemes[2][1]],
|
|
229
|
+
[`${darkButtonTheme[0]}_Card`, altDarkThemes[2][1]],
|
|
230
|
+
[`${darkButtonTheme[0]}_DrawerFrame`, altDarkThemes[2][1]]
|
|
194
231
|
];
|
|
195
232
|
});
|
|
196
|
-
const transparent = {
|
|
197
|
-
background: "transparent",
|
|
198
|
-
backgroundSoft: "transparent",
|
|
199
|
-
backgroundHover: "transparent",
|
|
200
|
-
backgroundPress: "transparent",
|
|
201
|
-
backgroundFocus: "transparent",
|
|
202
|
-
backgroundTransparent: "transparent",
|
|
203
|
-
shadowColor: "transparent",
|
|
204
|
-
shadowColorHover: "transparent",
|
|
205
|
-
shadowColorPress: "transparent",
|
|
206
|
-
shadowColorFocus: "transparent"
|
|
207
|
-
};
|
|
208
|
-
const dark_outline = {
|
|
209
|
-
...baseThemes.dark,
|
|
210
|
-
borderColor: "#fff",
|
|
211
|
-
...transparent
|
|
212
|
-
};
|
|
213
|
-
const light_outline = {
|
|
214
|
-
...baseThemes.light,
|
|
215
|
-
borderColor: "#000",
|
|
216
|
-
...transparent
|
|
217
|
-
};
|
|
218
233
|
const colorThemes = Object.fromEntries(colorThemeEntries);
|
|
219
234
|
const allThemes = {
|
|
220
235
|
...baseThemes,
|
|
221
|
-
...colorThemes
|
|
222
|
-
dark_outline,
|
|
223
|
-
light_outline
|
|
236
|
+
...colorThemes
|
|
224
237
|
};
|
|
225
238
|
const themes = allThemes;
|
|
226
239
|
export {
|