@tamagui/themes 1.89.0-1706483140977 → 1.89.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.
Files changed (58) hide show
  1. package/dist/cjs/generated-v3.js +1545 -1
  2. package/dist/cjs/generated-v3.js.map +1 -1
  3. package/dist/cjs/generated-v3.native.js +1545 -1
  4. package/dist/cjs/generated-v3.native.js.map +1 -1
  5. package/dist/cjs/v3-themes.js +373 -285
  6. package/dist/cjs/v3-themes.js.map +2 -2
  7. package/dist/cjs/v3-themes.native.js +384 -288
  8. package/dist/cjs/v3-themes.native.js.map +2 -2
  9. package/dist/esm/componentThemeDefinitions.native.js +22 -44
  10. package/dist/esm/componentThemeDefinitions.native.js.map +1 -1
  11. package/dist/esm/generated-new.native.js +2 -1430
  12. package/dist/esm/generated-new.native.js.map +1 -1
  13. package/dist/esm/generated-v2.native.js +2 -1408
  14. package/dist/esm/generated-v2.native.js.map +1 -1
  15. package/dist/esm/generated-v3.js +1545 -1
  16. package/dist/esm/generated-v3.js.map +1 -1
  17. package/dist/esm/generated-v3.native.js +1547 -1607
  18. package/dist/esm/generated-v3.native.js.map +1 -1
  19. package/dist/esm/helpers.native.js +2 -25
  20. package/dist/esm/helpers.native.js.map +1 -1
  21. package/dist/esm/index.native.js +8 -33
  22. package/dist/esm/index.native.js.map +1 -1
  23. package/dist/esm/masks.native.js +34 -47
  24. package/dist/esm/masks.native.js.map +1 -1
  25. package/dist/esm/palettes.native.js +10 -30
  26. package/dist/esm/palettes.native.js.map +1 -1
  27. package/dist/esm/shadows.native.js +2 -23
  28. package/dist/esm/shadows.native.js.map +1 -1
  29. package/dist/esm/templates.native.js +4 -26
  30. package/dist/esm/templates.native.js.map +1 -1
  31. package/dist/esm/themes-new.native.js +17 -32
  32. package/dist/esm/themes-new.native.js.map +1 -1
  33. package/dist/esm/themes-old.native.js +25 -38
  34. package/dist/esm/themes-old.native.js.map +1 -1
  35. package/dist/esm/themes.native.js +3 -32
  36. package/dist/esm/themes.native.js.map +1 -1
  37. package/dist/esm/tokens.native.js +38 -49
  38. package/dist/esm/tokens.native.js.map +1 -1
  39. package/dist/esm/v2-themes.native.js +43 -48
  40. package/dist/esm/v2-themes.native.js.map +2 -2
  41. package/dist/esm/v2.native.js +12 -49
  42. package/dist/esm/v2.native.js.map +2 -2
  43. package/dist/esm/v3-themes.js +373 -287
  44. package/dist/esm/v3-themes.js.map +2 -2
  45. package/dist/esm/v3-themes.mjs +309 -258
  46. package/dist/esm/v3-themes.native.js +411 -330
  47. package/dist/esm/v3-themes.native.js.map +2 -2
  48. package/dist/esm/v3.native.js +12 -49
  49. package/dist/esm/v3.native.js.map +2 -2
  50. package/package.json +20 -7
  51. package/src/generated-v3.ts +3847 -0
  52. package/src/v3-themes.ts +703 -0
  53. package/src/v3.tsx +14 -0
  54. package/types/generated-v3.d.ts +1717 -0
  55. package/types/generated-v3.d.ts.map +1 -1
  56. package/types/v3-themes.d.ts +59730 -0
  57. package/types/v3-themes.d.ts.map +1 -1
  58. package/types/v3.d.ts +12 -0
@@ -15,15 +15,23 @@ var __export = (target, all) => {
15
15
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
16
16
  var v3_themes_exports = {};
17
17
  __export(v3_themes_exports, {
18
- maskOptions: () => maskOptions,
19
- masks: () => import_masks2.masks,
18
+ objectFromEntries: () => objectFromEntries,
19
+ objectKeys: () => objectKeys,
20
20
  palettes: () => palettes,
21
+ postfixObjKeys: () => postfixObjKeys,
22
+ radius: () => radius,
23
+ size: () => size,
24
+ sizeToSpace: () => sizeToSpace,
25
+ space: () => space,
26
+ spaces: () => spaces,
27
+ spacesNegative: () => spacesNegative,
21
28
  templates: () => templates,
22
29
  themes: () => themes,
23
- tokens: () => tokens
30
+ tokens: () => tokens,
31
+ zIndex: () => zIndex
24
32
  });
25
33
  module.exports = __toCommonJS(v3_themes_exports);
26
- var import_theme_builder = require("@tamagui/theme-builder"), import_colors = require("@tamagui/colors"), import_web = require("@tamagui/web"), import_masks = require("./masks"), import_masks2 = require("./masks");
34
+ var import_colors = require("@tamagui/colors"), import_theme_builder = require("@tamagui/theme-builder"), import_web = require("@tamagui/web");
27
35
  const colorTokens = {
28
36
  light: {
29
37
  blue: import_colors.blue,
@@ -45,56 +53,122 @@ const colorTokens = {
45
53
  red: import_colors.redDark,
46
54
  yellow: import_colors.yellowDark
47
55
  }
56
+ }, lightShadowColor = "rgba(0,0,0,0.04)", lightShadowColorStrong = "rgba(0,0,0,0.085)", darkShadowColor = "rgba(0,0,0,0.2)", darkShadowColorStrong = "rgba(0,0,0,0.3)", darkColors = {
57
+ ...colorTokens.dark.blue,
58
+ ...colorTokens.dark.gray,
59
+ ...colorTokens.dark.green,
60
+ ...colorTokens.dark.orange,
61
+ ...colorTokens.dark.pink,
62
+ ...colorTokens.dark.purple,
63
+ ...colorTokens.dark.red,
64
+ ...colorTokens.dark.yellow
65
+ }, lightColors = {
66
+ ...colorTokens.light.blue,
67
+ ...colorTokens.light.gray,
68
+ ...colorTokens.light.green,
69
+ ...colorTokens.light.orange,
70
+ ...colorTokens.light.pink,
71
+ ...colorTokens.light.purple,
72
+ ...colorTokens.light.red,
73
+ ...colorTokens.light.yellow
74
+ }, color = {
75
+ white0: "rgba(255,255,255,0)",
76
+ white075: "rgba(255,255,255,0.75)",
77
+ white05: "rgba(255,255,255,0.5)",
78
+ white025: "rgba(255,255,255,0.25)",
79
+ black0: "rgba(10,10,10,0)",
80
+ black075: "rgba(10,10,10,0.75)",
81
+ black05: "rgba(10,10,10,0.5)",
82
+ black025: "rgba(10,10,10,0.25)",
83
+ white1: "#fff",
84
+ white2: "#f8f8f8",
85
+ white3: "hsl(0, 0%, 96.3%)",
86
+ white4: "hsl(0, 0%, 94.1%)",
87
+ white5: "hsl(0, 0%, 92.0%)",
88
+ white6: "hsl(0, 0%, 90.0%)",
89
+ white7: "hsl(0, 0%, 88.5%)",
90
+ white8: "hsl(0, 0%, 81.0%)",
91
+ white9: "hsl(0, 0%, 56.1%)",
92
+ white10: "hsl(0, 0%, 50.3%)",
93
+ white11: "hsl(0, 0%, 42.5%)",
94
+ white12: "hsl(0, 0%, 9.0%)",
95
+ black1: "#050505",
96
+ black2: "#151515",
97
+ black3: "#191919",
98
+ black4: "#232323",
99
+ black5: "#282828",
100
+ black6: "#323232",
101
+ black7: "#424242",
102
+ black8: "#494949",
103
+ black9: "#545454",
104
+ black10: "#626262",
105
+ black11: "#a5a5a5",
106
+ black12: "#fff",
107
+ ...postfixObjKeys(lightColors, "Light"),
108
+ ...postfixObjKeys(darkColors, "Dark")
48
109
  }, palettes = (() => {
49
- const lightTransparent = "rgba(255,255,255,0)", darkTransparent = "rgba(10,10,10,0)", transparent = (hsl, opacity = 0) => hsl.replace("%)", `%, ${opacity})`).replace("hsl(", "hsla("), getColorPalette = (colors, color2 = colors[0]) => {
50
- const colorPalette = Object.values(colors), [head, tail] = [
51
- colorPalette.slice(0, 6),
52
- colorPalette.slice(colorPalette.length - 5)
53
- ];
110
+ const transparent = (hsl, opacity = 0) => hsl.replace("%)", `%, ${opacity})`).replace("hsl(", "hsla("), getColorPalette = (colors) => {
111
+ const colorPalette = Object.values(colors), colorI = colorPalette.length - 4;
54
112
  return [
55
- transparent(colorPalette[0]),
56
- ...head,
57
- ...tail,
58
- color2,
59
- transparent(colorPalette[colorPalette.length - 1])
113
+ transparent(colorPalette[0], 0),
114
+ transparent(colorPalette[0], 0.25),
115
+ transparent(colorPalette[0], 0.5),
116
+ transparent(colorPalette[0], 0.75),
117
+ ...colorPalette,
118
+ transparent(colorPalette[colorI], 0.75),
119
+ transparent(colorPalette[colorI], 0.5),
120
+ transparent(colorPalette[colorI], 0.25),
121
+ transparent(colorPalette[colorI], 0)
60
122
  ];
61
- }, lightColor = "hsl(0, 0%, 9.0%)", lightPalette = [
62
- lightTransparent,
63
- "#fff",
64
- "#f8f8f8",
65
- "hsl(0, 0%, 96.3%)",
66
- "hsl(0, 0%, 94.1%)",
67
- "hsl(0, 0%, 92.0%)",
68
- "hsl(0, 0%, 90.0%)",
69
- "hsl(0, 0%, 88.5%)",
70
- "hsl(0, 0%, 81.0%)",
71
- "hsl(0, 0%, 56.1%)",
72
- "hsl(0, 0%, 50.3%)",
73
- "hsl(0, 0%, 42.5%)",
74
- lightColor,
75
- darkTransparent
76
- ], darkColor = "#fff", darkPalette = [
77
- darkTransparent,
78
- "#050505",
79
- "#151515",
80
- "#191919",
81
- "#232323",
82
- "#282828",
83
- "#323232",
84
- "#424242",
85
- "#494949",
86
- "#545454",
87
- "#626262",
88
- "#a5a5a5",
89
- darkColor,
90
- lightTransparent
123
+ }, lightPalette = [
124
+ color.white0,
125
+ color.white075,
126
+ color.white05,
127
+ color.white025,
128
+ color.white1,
129
+ color.white2,
130
+ color.white3,
131
+ color.white4,
132
+ color.white5,
133
+ color.white6,
134
+ color.white7,
135
+ color.white8,
136
+ color.white9,
137
+ color.white10,
138
+ color.white11,
139
+ color.white12,
140
+ color.black075,
141
+ color.black05,
142
+ color.black025,
143
+ color.black0
144
+ ], darkPalette = [
145
+ color.black0,
146
+ color.black075,
147
+ color.black05,
148
+ color.black025,
149
+ color.black1,
150
+ color.black2,
151
+ color.black3,
152
+ color.black4,
153
+ color.black5,
154
+ color.black6,
155
+ color.black7,
156
+ color.black8,
157
+ color.black9,
158
+ color.black10,
159
+ color.black11,
160
+ color.black12,
161
+ color.white075,
162
+ color.white05,
163
+ color.white025,
164
+ color.white0
91
165
  ], lightPalettes = objectFromEntries(
92
166
  objectKeys(colorTokens.light).map(
93
- (key) => [`light_${key}`, getColorPalette(colorTokens.light[key], lightColor)]
167
+ (key) => [`light_${key}`, getColorPalette(colorTokens.light[key])]
94
168
  )
95
169
  ), darkPalettes = objectFromEntries(
96
170
  objectKeys(colorTokens.dark).map(
97
- (key) => [`dark_${key}`, getColorPalette(colorTokens.dark[key], darkColor)]
171
+ (key) => [`dark_${key}`, getColorPalette(colorTokens.dark[key])]
98
172
  )
99
173
  ), colorPalettes = {
100
174
  ...lightPalettes,
@@ -105,126 +179,291 @@ const colorTokens = {
105
179
  dark: darkPalette,
106
180
  ...colorPalettes
107
181
  };
108
- })(), templateColorsSpecific = {
109
- color1: 1,
110
- color2: 2,
111
- color3: 3,
112
- color4: 4,
113
- color5: 5,
114
- color6: 6,
115
- color7: 7,
116
- color8: 8,
117
- color9: 9,
118
- color10: 10,
119
- color11: 11,
120
- color12: 12
121
- }, templates = (() => {
182
+ })(), templates = (() => {
122
183
  const base = {
123
- ...templateColorsSpecific,
184
+ background0: 0,
185
+ background025: 1,
186
+ background05: 2,
187
+ background075: 3,
188
+ color1: 4,
189
+ color2: 5,
190
+ color3: 6,
191
+ color4: 7,
192
+ color5: 8,
193
+ color6: 9,
194
+ color7: 10,
195
+ color8: 11,
196
+ color9: 12,
197
+ color10: 13,
198
+ color11: 14,
199
+ color12: 15,
200
+ color0: -0,
201
+ color025: -1,
202
+ color05: -2,
203
+ color075: -3,
124
204
  // the background, color, etc keys here work like generics - they make it so you
125
205
  // can publish components for others to use without mandating a specific color scale
126
206
  // the @tamagui/button Button component looks for `$background`, so you set the
127
207
  // dark_red_Button theme to have a stronger background than the dark_red theme.
128
- background: 2,
129
- backgroundHover: 3,
130
- backgroundPress: 4,
131
- backgroundFocus: 5,
132
- backgroundStrong: 1,
133
- backgroundTransparent: 0,
134
- color: -1,
135
- colorHover: -2,
136
- colorPress: -1,
137
- colorFocus: -2,
208
+ background: 4,
209
+ backgroundHover: 5,
210
+ backgroundPress: 6,
211
+ backgroundFocus: 4,
212
+ borderColor: 7,
213
+ borderColorHover: 8,
214
+ borderColorFocus: 5,
215
+ borderColorPress: 7,
216
+ color: -4,
217
+ colorHover: -5,
218
+ colorPress: -4,
219
+ colorFocus: -5,
138
220
  colorTransparent: -0,
139
- borderColor: 5,
140
- borderColorHover: 6,
141
- borderColorFocus: 4,
142
- borderColorPress: 5,
143
- placeholderColor: -4,
144
- // in the future this should be partially transparent
145
- outlineColor: 5
146
- }, surface1 = {
221
+ placeholderColor: -7,
222
+ outlineColor: -1
223
+ }, surface12 = {
147
224
  background: base.background + 1,
148
225
  backgroundHover: base.backgroundHover + 1,
149
226
  backgroundPress: base.backgroundPress + 1,
150
227
  backgroundFocus: base.backgroundFocus + 1,
151
- backgroundStrong: base.backgroundStrong + 1,
152
228
  borderColor: base.borderColor + 1,
153
229
  borderColorHover: base.borderColorHover + 1,
154
230
  borderColorFocus: base.borderColorFocus + 1,
155
- borderColorPress: base.borderColorPress + 1,
156
- outlineColor: base.outlineColor + 1
157
- }, surface2 = {
231
+ borderColorPress: base.borderColorPress + 1
232
+ }, surface22 = {
158
233
  background: base.background + 2,
159
234
  backgroundHover: base.backgroundHover + 2,
160
235
  backgroundPress: base.backgroundPress + 2,
161
236
  backgroundFocus: base.backgroundFocus + 2,
162
- backgroundStrong: base.backgroundStrong + 2,
163
237
  borderColor: base.borderColor + 2,
164
238
  borderColorHover: base.borderColorHover + 2,
165
239
  borderColorFocus: base.borderColorFocus + 2,
166
- borderColorPress: base.borderColorPress + 2,
167
- outlineColor: base.outlineColor + 2
168
- }, surface3 = {
240
+ borderColorPress: base.borderColorPress + 2
241
+ }, surface32 = {
169
242
  background: base.background + 3,
170
243
  backgroundHover: base.backgroundHover + 3,
171
244
  backgroundPress: base.backgroundPress + 3,
172
245
  backgroundFocus: base.backgroundFocus + 3,
173
- backgroundStrong: base.backgroundStrong + 3,
174
246
  borderColor: base.borderColor + 3,
175
247
  borderColorHover: base.borderColorHover + 3,
176
248
  borderColorFocus: base.borderColorFocus + 3,
177
- borderColorPress: base.borderColorPress + 3,
178
- outlineColor: base.outlineColor + 3
249
+ borderColorPress: base.borderColorPress + 3
250
+ }, surfaceActive = {
251
+ background: base.background + 5,
252
+ backgroundHover: base.background + 5,
253
+ backgroundPress: base.backgroundPress + 5,
254
+ backgroundFocus: base.backgroundFocus + 5,
255
+ borderColor: base.borderColor + 5,
256
+ borderColorHover: base.borderColor + 5,
257
+ borderColorFocus: base.borderColorFocus + 5,
258
+ borderColorPress: base.borderColorPress + 5
259
+ }, inverseSurface12 = {
260
+ color: surface12.background,
261
+ colorHover: surface12.backgroundHover,
262
+ colorPress: surface12.backgroundPress,
263
+ colorFocus: surface12.backgroundFocus,
264
+ background: base.color,
265
+ backgroundHover: base.colorHover,
266
+ backgroundPress: base.colorPress,
267
+ backgroundFocus: base.colorFocus,
268
+ borderColor: base.color - 2,
269
+ borderColorHover: base.color - 3,
270
+ borderColorFocus: base.color - 4,
271
+ borderColorPress: base.color - 5
272
+ }, inverseActive = {
273
+ ...inverseSurface12,
274
+ background: base.color - 2,
275
+ backgroundHover: base.colorHover - 2,
276
+ backgroundPress: base.colorPress - 2,
277
+ backgroundFocus: base.colorFocus - 2,
278
+ borderColor: base.color - 2 - 2,
279
+ borderColorHover: base.color - 3 - 2,
280
+ borderColorFocus: base.color - 4 - 2,
281
+ borderColorPress: base.color - 5 - 2
282
+ }, alt1 = {
283
+ color: base.color - 1,
284
+ colorHover: base.colorHover - 1,
285
+ colorPress: base.colorPress - 1,
286
+ colorFocus: base.colorFocus - 1
287
+ }, alt2 = {
288
+ color: base.color - 2,
289
+ colorHover: base.colorHover - 2,
290
+ colorPress: base.colorPress - 2,
291
+ colorFocus: base.colorFocus - 2
179
292
  };
180
293
  return {
181
294
  base,
182
- surface1,
183
- surface2,
184
- surface3
295
+ alt1,
296
+ alt2,
297
+ surface1: surface12,
298
+ surface2: surface22,
299
+ surface3: surface32,
300
+ inverseSurface1: inverseSurface12,
301
+ inverseActive,
302
+ surfaceActive
185
303
  };
186
- })(), maskOptions = (() => {
187
- const shadows2 = {
188
- shadowColor: 0,
189
- shadowColorHover: 0,
190
- shadowColorPress: 0,
191
- shadowColorFocus: 0
192
- }, colors = {
193
- ...shadows2,
194
- color: 0,
195
- colorHover: 0,
196
- colorFocus: 0,
197
- colorPress: 0
198
- }, baseMaskOptions = {
199
- override: shadows2,
200
- skip: shadows2,
201
- // avoids the transparent ends
202
- max: palettes.light.length - 2,
203
- min: 1
204
- }, skipShadowsAndSpecificColors = {
205
- ...shadows2,
206
- ...templateColorsSpecific
207
- };
208
- return {
209
- component: {
210
- ...baseMaskOptions,
211
- override: colors,
212
- skip: skipShadowsAndSpecificColors
304
+ })(), shadows = {
305
+ light: {
306
+ shadowColor: lightShadowColorStrong,
307
+ shadowColorHover: lightShadowColorStrong,
308
+ shadowColorPress: lightShadowColor,
309
+ shadowColorFocus: lightShadowColor
310
+ },
311
+ dark: {
312
+ shadowColor: darkShadowColorStrong,
313
+ shadowColorHover: darkShadowColorStrong,
314
+ shadowColorPress: darkShadowColor,
315
+ shadowColorFocus: darkShadowColor
316
+ }
317
+ }, nonInherited = {
318
+ light: {
319
+ ...lightColors,
320
+ ...shadows.light
321
+ },
322
+ dark: {
323
+ ...darkColors,
324
+ ...shadows.dark
325
+ }
326
+ }, overlayThemeDefinitions = [
327
+ {
328
+ parent: "light",
329
+ theme: {
330
+ background: "rgba(0,0,0,0.5)"
331
+ }
332
+ },
333
+ {
334
+ parent: "dark",
335
+ theme: {
336
+ background: "rgba(0,0,0,0.9)"
337
+ }
338
+ }
339
+ ], inverseSurface1 = [
340
+ {
341
+ parent: "active",
342
+ template: "inverseActive"
343
+ },
344
+ {
345
+ parent: "",
346
+ template: "inverseSurface1"
347
+ }
348
+ ], surface1 = [
349
+ {
350
+ parent: "active",
351
+ template: "surfaceActive"
352
+ },
353
+ {
354
+ parent: "",
355
+ template: "surface1"
356
+ }
357
+ ], surface2 = [
358
+ {
359
+ parent: "active",
360
+ template: "surfaceActive"
361
+ },
362
+ {
363
+ parent: "",
364
+ template: "surface2"
365
+ }
366
+ ], surface3 = [
367
+ {
368
+ parent: "active",
369
+ template: "surfaceActive"
370
+ },
371
+ {
372
+ parent: "",
373
+ template: "surface3"
374
+ }
375
+ ], themeBuilder = (0, import_theme_builder.createThemeBuilder)().addPalettes(palettes).addTemplates(templates).addThemes({
376
+ light: {
377
+ template: "base",
378
+ palette: "light",
379
+ nonInheritedValues: nonInherited.light
380
+ },
381
+ dark: {
382
+ template: "base",
383
+ palette: "dark",
384
+ nonInheritedValues: nonInherited.dark
385
+ }
386
+ }).addChildThemes({
387
+ orange: {
388
+ palette: "orange",
389
+ template: "base"
390
+ },
391
+ yellow: {
392
+ palette: "yellow",
393
+ template: "base"
394
+ },
395
+ green: {
396
+ palette: "green",
397
+ template: "base"
398
+ },
399
+ blue: {
400
+ palette: "blue",
401
+ template: "base"
402
+ },
403
+ purple: {
404
+ palette: "purple",
405
+ template: "base"
406
+ },
407
+ pink: {
408
+ palette: "pink",
409
+ template: "base"
410
+ },
411
+ red: {
412
+ palette: "red",
413
+ template: "base"
414
+ },
415
+ gray: {
416
+ palette: "gray",
417
+ template: "base"
418
+ }
419
+ }).addChildThemes({
420
+ alt1: {
421
+ template: "alt1"
422
+ },
423
+ alt2: {
424
+ template: "alt2"
425
+ },
426
+ active: {
427
+ template: "surface3"
428
+ }
429
+ }).addChildThemes(
430
+ {
431
+ ListItem: {
432
+ template: "surface1"
213
433
  },
214
- alt: {
215
- ...baseMaskOptions
434
+ SelectTrigger: surface1,
435
+ Card: surface1,
436
+ Button: surface3,
437
+ Checkbox: surface2,
438
+ Switch: surface2,
439
+ SwitchThumb: inverseSurface1,
440
+ TooltipContent: surface2,
441
+ Progress: {
442
+ template: "surface1"
216
443
  },
217
- button: {
218
- ...baseMaskOptions,
219
- override: {
220
- ...colors,
221
- borderColor: "transparent",
222
- borderColorHover: "transparent"
223
- },
224
- skip: skipShadowsAndSpecificColors
225
- }
226
- };
227
- })(), lightShadowColor = "rgba(0,0,0,0.04)", lightShadowColorStrong = "rgba(0,0,0,0.085)", darkShadowColor = "rgba(0,0,0,0.2)", darkShadowColorStrong = "rgba(0,0,0,0.3)", size = {
444
+ RadioGroupItem: surface2,
445
+ TooltipArrow: {
446
+ template: "surface1"
447
+ },
448
+ SliderTrackActive: {
449
+ template: "surface3"
450
+ },
451
+ SliderTrack: {
452
+ template: "surface1"
453
+ },
454
+ SliderThumb: inverseSurface1,
455
+ Tooltip: inverseSurface1,
456
+ ProgressIndicator: inverseSurface1,
457
+ SheetOverlay: overlayThemeDefinitions,
458
+ DialogOverlay: overlayThemeDefinitions,
459
+ ModalOverlay: overlayThemeDefinitions,
460
+ Input: surface1,
461
+ TextArea: surface1
462
+ },
463
+ {
464
+ avoidNestingWithin: ["alt1", "alt2"]
465
+ }
466
+ ), themesIn = themeBuilder.build(), themes = themesIn, size = {
228
467
  $0: 0,
229
468
  "$0.25": 2,
230
469
  "$0.5": 4,
@@ -264,27 +503,6 @@ const colorTokens = {
264
503
  3: 300,
265
504
  4: 400,
266
505
  5: 500
267
- }, darkColors = {
268
- ...colorTokens.dark.blue,
269
- ...colorTokens.dark.gray,
270
- ...colorTokens.dark.green,
271
- ...colorTokens.dark.orange,
272
- ...colorTokens.dark.pink,
273
- ...colorTokens.dark.purple,
274
- ...colorTokens.dark.red,
275
- ...colorTokens.dark.yellow
276
- }, lightColors = {
277
- ...colorTokens.light.blue,
278
- ...colorTokens.light.gray,
279
- ...colorTokens.light.green,
280
- ...colorTokens.light.orange,
281
- ...colorTokens.light.pink,
282
- ...colorTokens.light.purple,
283
- ...colorTokens.light.red,
284
- ...colorTokens.light.yellow
285
- }, color = {
286
- ...postfixObjKeys(lightColors, "Light"),
287
- ...postfixObjKeys(darkColors, "Dark")
288
506
  }, radius = {
289
507
  0: 0,
290
508
  1: 3,
@@ -306,137 +524,7 @@ const colorTokens = {
306
524
  zIndex,
307
525
  space,
308
526
  size
309
- }), shadows = {
310
- light: {
311
- shadowColor: lightShadowColorStrong,
312
- shadowColorHover: lightShadowColorStrong,
313
- shadowColorPress: lightShadowColor,
314
- shadowColorFocus: lightShadowColor
315
- },
316
- dark: {
317
- shadowColor: darkShadowColorStrong,
318
- shadowColorHover: darkShadowColorStrong,
319
- shadowColorPress: darkShadowColor,
320
- shadowColorFocus: darkShadowColor
321
- }
322
- }, colorThemeDefinition = (colorName) => ({
323
- palette: colorName,
324
- template: "base"
325
- }), nonInherited = {
326
- light: {
327
- ...lightColors,
328
- ...shadows.light
329
- },
330
- dark: {
331
- ...darkColors,
332
- ...shadows.dark
333
- }
334
- }, overlayThemeDefinitions = [
335
- {
336
- parent: "light",
337
- theme: {
338
- background: "rgba(0,0,0,0.5)"
339
- }
340
- },
341
- {
342
- parent: "dark",
343
- theme: {
344
- background: "rgba(0,0,0,0.9)"
345
- }
346
- }
347
- ], themeBuilder = (0, import_theme_builder.createThemeBuilder)().addPalettes(palettes).addTemplates(templates).addMasks(import_masks.masks).addThemes({
348
- light: {
349
- template: "base",
350
- palette: "light",
351
- nonInheritedValues: nonInherited.light
352
- },
353
- dark: {
354
- template: "base",
355
- palette: "dark",
356
- nonInheritedValues: nonInherited.dark
357
- }
358
- }).addChildThemes({
359
- orange: colorThemeDefinition("orange"),
360
- yellow: colorThemeDefinition("yellow"),
361
- green: colorThemeDefinition("green"),
362
- blue: colorThemeDefinition("blue"),
363
- purple: colorThemeDefinition("purple"),
364
- pink: colorThemeDefinition("pink"),
365
- red: colorThemeDefinition("red"),
366
- gray: colorThemeDefinition("gray")
367
- }).addChildThemes({
368
- alt1: {
369
- template: "surface1"
370
- },
371
- alt2: {
372
- template: "surface2"
373
- },
374
- active: {
375
- template: "surface3"
376
- }
377
- }).addChildThemes({
378
- ListItem: {
379
- template: "surface1"
380
- },
381
- Card: {
382
- template: "surface1"
383
- },
384
- Button: {
385
- template: "surface2"
386
- },
387
- Checkbox: {
388
- template: "surface2"
389
- },
390
- Switch: {
391
- template: "surface2"
392
- },
393
- SwitchThumb: {
394
- mask: "inverse",
395
- ...maskOptions.component
396
- },
397
- TooltipContent: {
398
- template: "surface2"
399
- },
400
- DrawerFrame: {
401
- template: "surface1"
402
- },
403
- Progress: {
404
- template: "surface1"
405
- },
406
- RadioGroupItem: {
407
- template: "surface2"
408
- },
409
- TooltipArrow: {
410
- template: "surface1"
411
- },
412
- SliderTrackActive: {
413
- template: "surface3"
414
- },
415
- SliderTrack: {
416
- template: "surface1"
417
- },
418
- SliderThumb: {
419
- mask: "inverse",
420
- ...maskOptions.component
421
- },
422
- Tooltip: {
423
- mask: "inverse",
424
- ...maskOptions.component
425
- },
426
- ProgressIndicator: {
427
- mask: "inverse",
428
- ...maskOptions.component
429
- },
430
- SheetOverlay: overlayThemeDefinitions,
431
- DialogOverlay: overlayThemeDefinitions,
432
- ModalOverlay: overlayThemeDefinitions,
433
- Input: {
434
- template: "surface2"
435
- },
436
- TextArea: {
437
- template: "surface2"
438
- }
439
- }), themesIn = themeBuilder.build(), themes = themesIn;
527
+ });
440
528
  function postfixObjKeys(obj, postfix) {
441
529
  return Object.fromEntries(
442
530
  Object.entries(obj).map(([k, v]) => [`${k}${postfix}`, v])
@@ -453,11 +541,19 @@ function objectKeys(obj) {
453
541
  }
454
542
  // Annotate the CommonJS export names for ESM import in node:
455
543
  0 && (module.exports = {
456
- maskOptions,
457
- masks,
544
+ objectFromEntries,
545
+ objectKeys,
458
546
  palettes,
547
+ postfixObjKeys,
548
+ radius,
549
+ size,
550
+ sizeToSpace,
551
+ space,
552
+ spaces,
553
+ spacesNegative,
459
554
  templates,
460
555
  themes,
461
- tokens
556
+ tokens,
557
+ zIndex
462
558
  });
463
559
  //# sourceMappingURL=v3-themes.js.map