@tamagui/themes 1.114.3 → 1.115.0
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/componentThemeDefinitions.cjs +124 -0
- package/dist/cjs/generated-new.cjs +3425 -0
- package/dist/cjs/generated-v2.cjs +3327 -0
- package/dist/cjs/generated-v3.cjs +1995 -0
- package/dist/cjs/helpers.cjs +34 -0
- package/dist/cjs/index.cjs +25 -0
- package/dist/cjs/{masks.js → masks.cjs} +54 -26
- package/dist/cjs/palettes.cjs +52 -0
- package/dist/cjs/shadows.cjs +43 -0
- package/dist/cjs/templates.cjs +118 -0
- package/dist/cjs/themes-new.cjs +86 -0
- package/dist/cjs/themes-old.cjs +284 -0
- package/dist/cjs/{themes.js → themes.cjs} +22 -14
- package/dist/cjs/tokens.cjs +155 -0
- package/dist/cjs/v2-themes.cjs +466 -0
- package/dist/cjs/{v2.js → v2.cjs} +32 -15
- package/dist/cjs/v3-themes.cjs +556 -0
- package/dist/cjs/{v3.js → v3.cjs} +32 -15
- package/package.json +13 -12
- package/dist/cjs/componentThemeDefinitions.js +0 -123
- package/dist/cjs/generated-new.js +0 -1806
- package/dist/cjs/generated-v2.js +0 -1788
- package/dist/cjs/generated-v3.js +0 -3564
- package/dist/cjs/helpers.js +0 -29
- package/dist/cjs/index.js +0 -22
- package/dist/cjs/palettes.js +0 -82
- package/dist/cjs/shadows.js +0 -34
- package/dist/cjs/templates.js +0 -106
- package/dist/cjs/themes-new.js +0 -76
- package/dist/cjs/themes-old.js +0 -266
- package/dist/cjs/tokens.js +0 -143
- package/dist/cjs/v2-themes.js +0 -479
- package/dist/cjs/v3-themes.js +0 -594
- /package/dist/cjs/{componentThemeDefinitions.js.map → componentThemeDefinitions.cjs.map} +0 -0
- /package/dist/cjs/{generated-new.js.map → generated-new.cjs.map} +0 -0
- /package/dist/cjs/{generated-v2.js.map → generated-v2.cjs.map} +0 -0
- /package/dist/cjs/{generated-v3.js.map → generated-v3.cjs.map} +0 -0
- /package/dist/cjs/{helpers.js.map → helpers.cjs.map} +0 -0
- /package/dist/cjs/{index.js.map → index.cjs.map} +0 -0
- /package/dist/cjs/{masks.js.map → masks.cjs.map} +0 -0
- /package/dist/cjs/{palettes.js.map → palettes.cjs.map} +0 -0
- /package/dist/cjs/{shadows.js.map → shadows.cjs.map} +0 -0
- /package/dist/cjs/{templates.js.map → templates.cjs.map} +0 -0
- /package/dist/cjs/{themes-new.js.map → themes-new.cjs.map} +0 -0
- /package/dist/cjs/{themes-old.js.map → themes-old.cjs.map} +0 -0
- /package/dist/cjs/{themes.js.map → themes.cjs.map} +0 -0
- /package/dist/cjs/{tokens.js.map → tokens.cjs.map} +0 -0
- /package/dist/cjs/{v2-themes.js.map → v2-themes.cjs.map} +0 -0
- /package/dist/cjs/{v2.js.map → v2.cjs.map} +0 -0
- /package/dist/cjs/{v3-themes.js.map → v3-themes.cjs.map} +0 -0
- /package/dist/cjs/{v3.js.map → v3.cjs.map} +0 -0
|
@@ -0,0 +1,466 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: !0
|
|
9
|
+
});
|
|
10
|
+
},
|
|
11
|
+
__copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
13
|
+
get: () => from[key],
|
|
14
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
|
+
});
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
19
|
+
value: !0
|
|
20
|
+
}), mod);
|
|
21
|
+
var v2_themes_exports = {};
|
|
22
|
+
__export(v2_themes_exports, {
|
|
23
|
+
maskOptions: () => maskOptions,
|
|
24
|
+
masks: () => import_masks2.masks,
|
|
25
|
+
palettes: () => palettes,
|
|
26
|
+
templates: () => templates,
|
|
27
|
+
themes: () => themes,
|
|
28
|
+
tokens: () => tokens
|
|
29
|
+
});
|
|
30
|
+
module.exports = __toCommonJS(v2_themes_exports);
|
|
31
|
+
var import_theme_builder = require("@tamagui/theme-builder"),
|
|
32
|
+
import_colors = require("@tamagui/colors"),
|
|
33
|
+
import_web = require("@tamagui/web"),
|
|
34
|
+
import_masks = require("./masks.cjs"),
|
|
35
|
+
import_masks2 = require("./masks.cjs");
|
|
36
|
+
const colorTokens = {
|
|
37
|
+
light: {
|
|
38
|
+
blue: import_colors.blue,
|
|
39
|
+
gray: import_colors.gray,
|
|
40
|
+
green: import_colors.green,
|
|
41
|
+
orange: import_colors.orange,
|
|
42
|
+
pink: import_colors.pink,
|
|
43
|
+
purple: import_colors.purple,
|
|
44
|
+
red: import_colors.red,
|
|
45
|
+
yellow: import_colors.yellow
|
|
46
|
+
},
|
|
47
|
+
dark: {
|
|
48
|
+
blue: import_colors.blueDark,
|
|
49
|
+
gray: import_colors.grayDark,
|
|
50
|
+
green: import_colors.greenDark,
|
|
51
|
+
orange: import_colors.orangeDark,
|
|
52
|
+
pink: import_colors.pinkDark,
|
|
53
|
+
purple: import_colors.purpleDark,
|
|
54
|
+
red: import_colors.redDark,
|
|
55
|
+
yellow: import_colors.yellowDark
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
palettes = (() => {
|
|
59
|
+
const lightTransparent = "rgba(255,255,255,0)",
|
|
60
|
+
darkTransparent = "rgba(10,10,10,0)",
|
|
61
|
+
transparent = (hsl, opacity = 0) => hsl.replace("%)", `%, ${opacity})`).replace("hsl(", "hsla("),
|
|
62
|
+
getColorPalette = (colors, color2 = colors[0]) => {
|
|
63
|
+
const colorPalette = Object.values(colors),
|
|
64
|
+
[head, tail] = [colorPalette.slice(0, 6), colorPalette.slice(colorPalette.length - 5)];
|
|
65
|
+
return [transparent(colorPalette[0]), ...head, ...tail, color2, transparent(colorPalette[colorPalette.length - 1])];
|
|
66
|
+
},
|
|
67
|
+
lightColor = "hsl(0, 0%, 9.0%)",
|
|
68
|
+
lightPalette = [lightTransparent, "#fff", "#f8f8f8", "hsl(0, 0%, 96.3%)", "hsl(0, 0%, 94.1%)", "hsl(0, 0%, 92.0%)", "hsl(0, 0%, 90.0%)", "hsl(0, 0%, 88.5%)", "hsl(0, 0%, 81.0%)", "hsl(0, 0%, 56.1%)", "hsl(0, 0%, 50.3%)", "hsl(0, 0%, 42.5%)", lightColor, darkTransparent],
|
|
69
|
+
darkColor = "#fff",
|
|
70
|
+
darkPalette = [darkTransparent, "#050505", "#151515", "#191919", "#232323", "#282828", "#323232", "#424242", "#494949", "#545454", "#626262", "#a5a5a5", darkColor, lightTransparent],
|
|
71
|
+
lightPalettes = objectFromEntries(objectKeys(colorTokens.light).map(key => [`light_${key}`, getColorPalette(colorTokens.light[key], lightColor)])),
|
|
72
|
+
darkPalettes = objectFromEntries(objectKeys(colorTokens.dark).map(key => [`dark_${key}`, getColorPalette(colorTokens.dark[key], darkColor)])),
|
|
73
|
+
colorPalettes = {
|
|
74
|
+
...lightPalettes,
|
|
75
|
+
...darkPalettes
|
|
76
|
+
};
|
|
77
|
+
return {
|
|
78
|
+
light: lightPalette,
|
|
79
|
+
dark: darkPalette,
|
|
80
|
+
...colorPalettes
|
|
81
|
+
};
|
|
82
|
+
})(),
|
|
83
|
+
templateColorsSpecific = {
|
|
84
|
+
color1: 1,
|
|
85
|
+
color2: 2,
|
|
86
|
+
color3: 3,
|
|
87
|
+
color4: 4,
|
|
88
|
+
color5: 5,
|
|
89
|
+
color6: 6,
|
|
90
|
+
color7: 7,
|
|
91
|
+
color8: 8,
|
|
92
|
+
color9: 9,
|
|
93
|
+
color10: 10,
|
|
94
|
+
color11: 11,
|
|
95
|
+
color12: 12
|
|
96
|
+
},
|
|
97
|
+
templates = (() => {
|
|
98
|
+
const template = {
|
|
99
|
+
...templateColorsSpecific,
|
|
100
|
+
// the background, color, etc keys here work like generics - they make it so you
|
|
101
|
+
// can publish components for others to use without mandating a specific color scale
|
|
102
|
+
// the @tamagui/button Button component looks for `$background`, so you set the
|
|
103
|
+
// dark_red_Button theme to have a stronger background than the dark_red theme.
|
|
104
|
+
background: 2,
|
|
105
|
+
backgroundHover: 3,
|
|
106
|
+
backgroundPress: 4,
|
|
107
|
+
backgroundFocus: 5,
|
|
108
|
+
backgroundStrong: 1,
|
|
109
|
+
backgroundTransparent: 0,
|
|
110
|
+
color: -1,
|
|
111
|
+
colorHover: -2,
|
|
112
|
+
colorPress: -1,
|
|
113
|
+
colorFocus: -2,
|
|
114
|
+
colorTransparent: -0,
|
|
115
|
+
borderColor: 5,
|
|
116
|
+
borderColorHover: 6,
|
|
117
|
+
borderColorFocus: 4,
|
|
118
|
+
borderColorPress: 5,
|
|
119
|
+
placeholderColor: -4,
|
|
120
|
+
// in the future this should be partially transparent
|
|
121
|
+
outlineColor: 5
|
|
122
|
+
};
|
|
123
|
+
return {
|
|
124
|
+
base: template,
|
|
125
|
+
colorLight: {
|
|
126
|
+
...template,
|
|
127
|
+
// light color themes are a bit less sensitive
|
|
128
|
+
borderColor: 4,
|
|
129
|
+
borderColorHover: 5,
|
|
130
|
+
borderColorFocus: 4,
|
|
131
|
+
borderColorPress: 4
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
})(),
|
|
135
|
+
maskOptions = (() => {
|
|
136
|
+
const shadows2 = {
|
|
137
|
+
shadowColor: 0,
|
|
138
|
+
shadowColorHover: 0,
|
|
139
|
+
shadowColorPress: 0,
|
|
140
|
+
shadowColorFocus: 0
|
|
141
|
+
},
|
|
142
|
+
colors = {
|
|
143
|
+
...shadows2,
|
|
144
|
+
color: 0,
|
|
145
|
+
colorHover: 0,
|
|
146
|
+
colorFocus: 0,
|
|
147
|
+
colorPress: 0
|
|
148
|
+
},
|
|
149
|
+
baseMaskOptions = {
|
|
150
|
+
override: shadows2,
|
|
151
|
+
skip: shadows2,
|
|
152
|
+
// avoids the transparent ends
|
|
153
|
+
max: palettes.light.length - 2,
|
|
154
|
+
min: 1
|
|
155
|
+
},
|
|
156
|
+
skipShadowsAndSpecificColors = {
|
|
157
|
+
...shadows2,
|
|
158
|
+
...templateColorsSpecific
|
|
159
|
+
};
|
|
160
|
+
return {
|
|
161
|
+
component: {
|
|
162
|
+
...baseMaskOptions,
|
|
163
|
+
override: colors,
|
|
164
|
+
skip: skipShadowsAndSpecificColors
|
|
165
|
+
},
|
|
166
|
+
alt: {
|
|
167
|
+
...baseMaskOptions
|
|
168
|
+
},
|
|
169
|
+
button: {
|
|
170
|
+
...baseMaskOptions,
|
|
171
|
+
override: {
|
|
172
|
+
...colors,
|
|
173
|
+
borderColor: "transparent",
|
|
174
|
+
borderColorHover: "transparent"
|
|
175
|
+
},
|
|
176
|
+
skip: skipShadowsAndSpecificColors
|
|
177
|
+
}
|
|
178
|
+
};
|
|
179
|
+
})(),
|
|
180
|
+
lightShadowColor = "rgba(0,0,0,0.04)",
|
|
181
|
+
lightShadowColorStrong = "rgba(0,0,0,0.085)",
|
|
182
|
+
darkShadowColor = "rgba(0,0,0,0.2)",
|
|
183
|
+
darkShadowColorStrong = "rgba(0,0,0,0.3)",
|
|
184
|
+
size = {
|
|
185
|
+
$0: 0,
|
|
186
|
+
"$0.25": 2,
|
|
187
|
+
"$0.5": 4,
|
|
188
|
+
"$0.75": 8,
|
|
189
|
+
$1: 20,
|
|
190
|
+
"$1.5": 24,
|
|
191
|
+
$2: 28,
|
|
192
|
+
"$2.5": 32,
|
|
193
|
+
$3: 36,
|
|
194
|
+
"$3.5": 40,
|
|
195
|
+
$4: 44,
|
|
196
|
+
$true: 44,
|
|
197
|
+
"$4.5": 48,
|
|
198
|
+
$5: 52,
|
|
199
|
+
$6: 64,
|
|
200
|
+
$7: 74,
|
|
201
|
+
$8: 84,
|
|
202
|
+
$9: 94,
|
|
203
|
+
$10: 104,
|
|
204
|
+
$11: 124,
|
|
205
|
+
$12: 144,
|
|
206
|
+
$13: 164,
|
|
207
|
+
$14: 184,
|
|
208
|
+
$15: 204,
|
|
209
|
+
$16: 224,
|
|
210
|
+
$17: 224,
|
|
211
|
+
$18: 244,
|
|
212
|
+
$19: 264,
|
|
213
|
+
$20: 284
|
|
214
|
+
},
|
|
215
|
+
spaces = Object.entries(size).map(([k, v]) => [k, sizeToSpace(v)]),
|
|
216
|
+
spacesNegative = spaces.slice(1).map(([k, v]) => [`-${k.slice(1)}`, -v]),
|
|
217
|
+
space = {
|
|
218
|
+
...Object.fromEntries(spaces),
|
|
219
|
+
...Object.fromEntries(spacesNegative)
|
|
220
|
+
},
|
|
221
|
+
zIndex = {
|
|
222
|
+
0: 0,
|
|
223
|
+
1: 100,
|
|
224
|
+
2: 200,
|
|
225
|
+
3: 300,
|
|
226
|
+
4: 400,
|
|
227
|
+
5: 500
|
|
228
|
+
},
|
|
229
|
+
darkColors = {
|
|
230
|
+
...colorTokens.dark.blue,
|
|
231
|
+
...colorTokens.dark.gray,
|
|
232
|
+
...colorTokens.dark.green,
|
|
233
|
+
...colorTokens.dark.orange,
|
|
234
|
+
...colorTokens.dark.pink,
|
|
235
|
+
...colorTokens.dark.purple,
|
|
236
|
+
...colorTokens.dark.red,
|
|
237
|
+
...colorTokens.dark.yellow
|
|
238
|
+
},
|
|
239
|
+
lightColors = {
|
|
240
|
+
...colorTokens.light.blue,
|
|
241
|
+
...colorTokens.light.gray,
|
|
242
|
+
...colorTokens.light.green,
|
|
243
|
+
...colorTokens.light.orange,
|
|
244
|
+
...colorTokens.light.pink,
|
|
245
|
+
...colorTokens.light.purple,
|
|
246
|
+
...colorTokens.light.red,
|
|
247
|
+
...colorTokens.light.yellow
|
|
248
|
+
},
|
|
249
|
+
color = {
|
|
250
|
+
...postfixObjKeys(lightColors, "Light"),
|
|
251
|
+
...postfixObjKeys(darkColors, "Dark")
|
|
252
|
+
},
|
|
253
|
+
radius = {
|
|
254
|
+
0: 0,
|
|
255
|
+
1: 3,
|
|
256
|
+
2: 5,
|
|
257
|
+
3: 7,
|
|
258
|
+
4: 9,
|
|
259
|
+
true: 9,
|
|
260
|
+
5: 10,
|
|
261
|
+
6: 16,
|
|
262
|
+
7: 19,
|
|
263
|
+
8: 22,
|
|
264
|
+
9: 26,
|
|
265
|
+
10: 34,
|
|
266
|
+
11: 42,
|
|
267
|
+
12: 50
|
|
268
|
+
},
|
|
269
|
+
tokens = (0, import_web.createTokens)({
|
|
270
|
+
color,
|
|
271
|
+
radius,
|
|
272
|
+
zIndex,
|
|
273
|
+
space,
|
|
274
|
+
size
|
|
275
|
+
}),
|
|
276
|
+
shadows = {
|
|
277
|
+
light: {
|
|
278
|
+
shadowColor: lightShadowColorStrong,
|
|
279
|
+
shadowColorHover: lightShadowColorStrong,
|
|
280
|
+
shadowColorPress: lightShadowColor,
|
|
281
|
+
shadowColorFocus: lightShadowColor
|
|
282
|
+
},
|
|
283
|
+
dark: {
|
|
284
|
+
shadowColor: darkShadowColorStrong,
|
|
285
|
+
shadowColorHover: darkShadowColorStrong,
|
|
286
|
+
shadowColorPress: darkShadowColor,
|
|
287
|
+
shadowColorFocus: darkShadowColor
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
colorThemeDefinition = colorName => [{
|
|
291
|
+
parent: "light",
|
|
292
|
+
palette: colorName,
|
|
293
|
+
template: "colorLight"
|
|
294
|
+
}, {
|
|
295
|
+
parent: "dark",
|
|
296
|
+
palette: colorName,
|
|
297
|
+
template: "base"
|
|
298
|
+
}],
|
|
299
|
+
nonInherited = {
|
|
300
|
+
light: {
|
|
301
|
+
...lightColors,
|
|
302
|
+
...shadows.light
|
|
303
|
+
},
|
|
304
|
+
dark: {
|
|
305
|
+
...darkColors,
|
|
306
|
+
...shadows.dark
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
overlayThemeDefinitions = [{
|
|
310
|
+
parent: "light",
|
|
311
|
+
theme: {
|
|
312
|
+
background: "rgba(0,0,0,0.5)"
|
|
313
|
+
}
|
|
314
|
+
}, {
|
|
315
|
+
parent: "dark",
|
|
316
|
+
theme: {
|
|
317
|
+
background: "rgba(0,0,0,0.9)"
|
|
318
|
+
}
|
|
319
|
+
}],
|
|
320
|
+
themeBuilder = (0, import_theme_builder.createThemeBuilder)().addPalettes(palettes).addTemplates(templates).addMasks(import_masks.masks).addThemes({
|
|
321
|
+
light: {
|
|
322
|
+
template: "base",
|
|
323
|
+
palette: "light",
|
|
324
|
+
nonInheritedValues: nonInherited.light
|
|
325
|
+
},
|
|
326
|
+
dark: {
|
|
327
|
+
template: "base",
|
|
328
|
+
palette: "dark",
|
|
329
|
+
nonInheritedValues: nonInherited.dark
|
|
330
|
+
}
|
|
331
|
+
}).addChildThemes({
|
|
332
|
+
orange: colorThemeDefinition("orange"),
|
|
333
|
+
yellow: colorThemeDefinition("yellow"),
|
|
334
|
+
green: colorThemeDefinition("green"),
|
|
335
|
+
blue: colorThemeDefinition("blue"),
|
|
336
|
+
purple: colorThemeDefinition("purple"),
|
|
337
|
+
pink: colorThemeDefinition("pink"),
|
|
338
|
+
red: colorThemeDefinition("red"),
|
|
339
|
+
gray: colorThemeDefinition("gray")
|
|
340
|
+
}).addChildThemes({
|
|
341
|
+
alt1: {
|
|
342
|
+
mask: "soften",
|
|
343
|
+
...maskOptions.alt
|
|
344
|
+
},
|
|
345
|
+
alt2: {
|
|
346
|
+
mask: "soften2Border1",
|
|
347
|
+
...maskOptions.alt
|
|
348
|
+
},
|
|
349
|
+
active: {
|
|
350
|
+
mask: "soften3FlatBorder",
|
|
351
|
+
skip: {
|
|
352
|
+
color: 1
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
}).addComponentThemes({
|
|
356
|
+
ListItem: [{
|
|
357
|
+
parent: "light",
|
|
358
|
+
avoidNestingWithin: ["active"],
|
|
359
|
+
mask: "identity",
|
|
360
|
+
...maskOptions.component
|
|
361
|
+
}, {
|
|
362
|
+
parent: "dark",
|
|
363
|
+
avoidNestingWithin: ["active"],
|
|
364
|
+
mask: "identity",
|
|
365
|
+
...maskOptions.component
|
|
366
|
+
}],
|
|
367
|
+
Card: {
|
|
368
|
+
mask: "soften",
|
|
369
|
+
avoidNestingWithin: ["active"],
|
|
370
|
+
...maskOptions.component
|
|
371
|
+
},
|
|
372
|
+
Button: {
|
|
373
|
+
mask: "soften2Border1",
|
|
374
|
+
...maskOptions.component
|
|
375
|
+
},
|
|
376
|
+
Checkbox: {
|
|
377
|
+
mask: "softenBorder2",
|
|
378
|
+
...maskOptions.component
|
|
379
|
+
},
|
|
380
|
+
Switch: {
|
|
381
|
+
mask: "soften2Border1",
|
|
382
|
+
...maskOptions.component
|
|
383
|
+
},
|
|
384
|
+
SwitchThumb: {
|
|
385
|
+
mask: "inverseStrengthen2",
|
|
386
|
+
avoidNestingWithin: ["active"],
|
|
387
|
+
...maskOptions.component
|
|
388
|
+
},
|
|
389
|
+
TooltipContent: {
|
|
390
|
+
mask: "soften2Border1",
|
|
391
|
+
avoidNestingWithin: ["active"],
|
|
392
|
+
...maskOptions.component
|
|
393
|
+
},
|
|
394
|
+
DrawerFrame: {
|
|
395
|
+
mask: "soften",
|
|
396
|
+
avoidNestingWithin: ["active"],
|
|
397
|
+
...maskOptions.component
|
|
398
|
+
},
|
|
399
|
+
Progress: {
|
|
400
|
+
mask: "soften",
|
|
401
|
+
avoidNestingWithin: ["active"],
|
|
402
|
+
...maskOptions.component
|
|
403
|
+
},
|
|
404
|
+
RadioGroupItem: {
|
|
405
|
+
mask: "softenBorder2",
|
|
406
|
+
avoidNestingWithin: ["active"],
|
|
407
|
+
...maskOptions.component
|
|
408
|
+
},
|
|
409
|
+
TooltipArrow: {
|
|
410
|
+
mask: "soften",
|
|
411
|
+
avoidNestingWithin: ["active"],
|
|
412
|
+
...maskOptions.component
|
|
413
|
+
},
|
|
414
|
+
SliderTrackActive: {
|
|
415
|
+
mask: "inverseSoften",
|
|
416
|
+
...maskOptions.component
|
|
417
|
+
},
|
|
418
|
+
SliderTrack: {
|
|
419
|
+
mask: "soften2Border1",
|
|
420
|
+
avoidNestingWithin: ["active"],
|
|
421
|
+
...maskOptions.component
|
|
422
|
+
},
|
|
423
|
+
SliderThumb: {
|
|
424
|
+
mask: "inverse",
|
|
425
|
+
avoidNestingWithin: ["active"],
|
|
426
|
+
...maskOptions.component
|
|
427
|
+
},
|
|
428
|
+
Tooltip: {
|
|
429
|
+
mask: "inverse",
|
|
430
|
+
avoidNestingWithin: ["active"],
|
|
431
|
+
...maskOptions.component
|
|
432
|
+
},
|
|
433
|
+
ProgressIndicator: {
|
|
434
|
+
mask: "inverse",
|
|
435
|
+
avoidNestingWithin: ["active"],
|
|
436
|
+
...maskOptions.component
|
|
437
|
+
},
|
|
438
|
+
SheetOverlay: overlayThemeDefinitions,
|
|
439
|
+
DialogOverlay: overlayThemeDefinitions,
|
|
440
|
+
ModalOverlay: overlayThemeDefinitions,
|
|
441
|
+
Input: {
|
|
442
|
+
mask: "softenBorder2",
|
|
443
|
+
...maskOptions.component
|
|
444
|
+
},
|
|
445
|
+
TextArea: {
|
|
446
|
+
mask: "softenBorder2",
|
|
447
|
+
...maskOptions.component
|
|
448
|
+
}
|
|
449
|
+
}, {
|
|
450
|
+
// to save bundle size but make alt themes not work on components
|
|
451
|
+
// avoidNestingWithin: ['alt1', 'alt2'],
|
|
452
|
+
}),
|
|
453
|
+
themesIn = themeBuilder.build(),
|
|
454
|
+
themes = themesIn;
|
|
455
|
+
function postfixObjKeys(obj, postfix) {
|
|
456
|
+
return Object.fromEntries(Object.entries(obj).map(([k, v]) => [`${k}${postfix}`, v]));
|
|
457
|
+
}
|
|
458
|
+
function sizeToSpace(v) {
|
|
459
|
+
return v === 0 ? 0 : v === 2 ? 0.5 : v === 4 ? 1 : v === 8 ? 1.5 : v <= 16 ? Math.round(v * 0.333) : Math.floor(v * 0.7 - 12);
|
|
460
|
+
}
|
|
461
|
+
function objectFromEntries(arr) {
|
|
462
|
+
return Object.fromEntries(arr);
|
|
463
|
+
}
|
|
464
|
+
function objectKeys(obj) {
|
|
465
|
+
return Object.keys(obj);
|
|
466
|
+
}
|
|
@@ -2,24 +2,33 @@ var __create = Object.create;
|
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf,
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf,
|
|
6
|
+
__hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
7
|
var __export = (target, all) => {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: !0
|
|
11
|
+
});
|
|
12
|
+
},
|
|
13
|
+
__copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
15
|
+
get: () => from[key],
|
|
16
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
+
});
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
15
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
16
21
|
// If the importer is in node compatibility mode or this is not an ESM
|
|
17
22
|
// file that has been converted to a CommonJS file using a Babel-
|
|
18
23
|
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
19
24
|
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
21
|
-
|
|
22
|
-
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
26
|
+
value: mod,
|
|
27
|
+
enumerable: !0
|
|
28
|
+
}) : target, mod)),
|
|
29
|
+
__toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
30
|
+
value: !0
|
|
31
|
+
}), mod);
|
|
23
32
|
var v2_exports = {};
|
|
24
33
|
__export(v2_exports, {
|
|
25
34
|
blue: () => import_colors.blue,
|
|
@@ -42,6 +51,14 @@ __export(v2_exports, {
|
|
|
42
51
|
yellowDark: () => import_colors5.yellowDark
|
|
43
52
|
});
|
|
44
53
|
module.exports = __toCommonJS(v2_exports);
|
|
45
|
-
var generatedThemes = __toESM(require("./generated-v2")),
|
|
46
|
-
|
|
47
|
-
|
|
54
|
+
var generatedThemes = __toESM(require("./generated-v2.cjs")),
|
|
55
|
+
import_tokens = require("./tokens.cjs"),
|
|
56
|
+
import_colors = require("@tamagui/colors"),
|
|
57
|
+
import_colors2 = require("@tamagui/colors"),
|
|
58
|
+
import_colors3 = require("@tamagui/colors"),
|
|
59
|
+
import_colors4 = require("@tamagui/colors"),
|
|
60
|
+
import_colors5 = require("@tamagui/colors"),
|
|
61
|
+
import_colors6 = require("@tamagui/colors"),
|
|
62
|
+
import_colors7 = require("@tamagui/colors"),
|
|
63
|
+
import_colors8 = require("@tamagui/colors");
|
|
64
|
+
const themes = generatedThemes;
|