@tamagui/themes 1.89.26 → 1.89.27-1708112217600

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 (69) hide show
  1. package/dist/cjs/componentThemeDefinitions.native.js +77 -77
  2. package/dist/cjs/componentThemeDefinitions.native.js.map +3 -3
  3. package/dist/cjs/generated-new.native.js +40811 -5
  4. package/dist/cjs/generated-new.native.js.map +3 -3
  5. package/dist/cjs/generated-v2.native.js +39989 -5
  6. package/dist/cjs/generated-v2.native.js.map +3 -3
  7. package/dist/cjs/generated-v3.native.js +8004 -1988
  8. package/dist/cjs/generated-v3.native.js.map +3 -3
  9. package/dist/cjs/helpers.native.js +3 -1
  10. package/dist/cjs/helpers.native.js.map +3 -3
  11. package/dist/cjs/index.native.js.map +2 -2
  12. package/dist/cjs/masks.native.js +83 -35
  13. package/dist/cjs/masks.native.js.map +3 -3
  14. package/dist/cjs/palettes.native.js +75 -25
  15. package/dist/cjs/palettes.native.js.map +3 -3
  16. package/dist/cjs/shadows.native.js +1 -1
  17. package/dist/cjs/shadows.native.js.map +3 -3
  18. package/dist/cjs/templates.native.js +49 -26
  19. package/dist/cjs/templates.native.js.map +3 -3
  20. package/dist/cjs/themes-new.native.js +41 -31
  21. package/dist/cjs/themes-new.native.js.map +3 -3
  22. package/dist/cjs/themes-old.native.js +189 -101
  23. package/dist/cjs/themes-old.native.js.map +3 -3
  24. package/dist/cjs/themes.native.js.map +2 -2
  25. package/dist/cjs/tokens.native.js +90 -32
  26. package/dist/cjs/tokens.native.js.map +3 -3
  27. package/dist/cjs/v2-themes.native.js +287 -216
  28. package/dist/cjs/v2-themes.native.js.map +3 -3
  29. package/dist/cjs/v2.native.js +1 -2
  30. package/dist/cjs/v2.native.js.map +3 -3
  31. package/dist/cjs/v3-themes.native.js +214 -135
  32. package/dist/cjs/v3-themes.native.js.map +3 -3
  33. package/dist/cjs/v3.native.js +1 -2
  34. package/dist/cjs/v3.native.js.map +3 -3
  35. package/dist/esm/componentThemeDefinitions.native.js +77 -77
  36. package/dist/esm/componentThemeDefinitions.native.js.map +3 -3
  37. package/dist/esm/generated-new.native.js +40811 -5
  38. package/dist/esm/generated-new.native.js.map +3 -3
  39. package/dist/esm/generated-v2.native.js +39989 -5
  40. package/dist/esm/generated-v2.native.js.map +3 -3
  41. package/dist/esm/generated-v3.native.js +8004 -1988
  42. package/dist/esm/generated-v3.native.js.map +3 -3
  43. package/dist/esm/helpers.native.js +3 -1
  44. package/dist/esm/helpers.native.js.map +3 -3
  45. package/dist/esm/index.native.js.map +1 -1
  46. package/dist/esm/masks.native.js +84 -44
  47. package/dist/esm/masks.native.js.map +3 -3
  48. package/dist/esm/palettes.native.js +75 -25
  49. package/dist/esm/palettes.native.js.map +3 -3
  50. package/dist/esm/shadows.native.js +1 -1
  51. package/dist/esm/shadows.native.js.map +3 -3
  52. package/dist/esm/templates.native.js +49 -26
  53. package/dist/esm/templates.native.js.map +3 -3
  54. package/dist/esm/themes-new.native.js +41 -31
  55. package/dist/esm/themes-new.native.js.map +3 -3
  56. package/dist/esm/themes-old.native.js +190 -109
  57. package/dist/esm/themes-old.native.js.map +3 -3
  58. package/dist/esm/themes.native.js.map +3 -3
  59. package/dist/esm/tokens.native.js +91 -50
  60. package/dist/esm/tokens.native.js.map +3 -3
  61. package/dist/esm/v2-themes.native.js +288 -234
  62. package/dist/esm/v2-themes.native.js.map +3 -3
  63. package/dist/esm/v2.native.js +1 -1
  64. package/dist/esm/v2.native.js.map +3 -3
  65. package/dist/esm/v3-themes.native.js +215 -153
  66. package/dist/esm/v3-themes.native.js.map +3 -3
  67. package/dist/esm/v3.native.js +1 -1
  68. package/dist/esm/v3.native.js.map +3 -3
  69. package/package.json +7 -7
@@ -24,7 +24,102 @@ __export(v2_themes_exports, {
24
24
  });
25
25
  module.exports = __toCommonJS(v2_themes_exports);
26
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");
27
- const colorTokens = {
27
+ function _array_like_to_array(arr, len) {
28
+ (len == null || len > arr.length) && (len = arr.length);
29
+ for (var i = 0, arr2 = new Array(len); i < len; i++)
30
+ arr2[i] = arr[i];
31
+ return arr2;
32
+ }
33
+ function _array_with_holes(arr) {
34
+ if (Array.isArray(arr))
35
+ return arr;
36
+ }
37
+ function _array_without_holes(arr) {
38
+ if (Array.isArray(arr))
39
+ return _array_like_to_array(arr);
40
+ }
41
+ function _define_property(obj, key, value) {
42
+ return key in obj ? Object.defineProperty(obj, key, {
43
+ value,
44
+ enumerable: !0,
45
+ configurable: !0,
46
+ writable: !0
47
+ }) : obj[key] = value, obj;
48
+ }
49
+ function _iterable_to_array(iter) {
50
+ if (typeof Symbol < "u" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
51
+ return Array.from(iter);
52
+ }
53
+ function _iterable_to_array_limit(arr, i) {
54
+ var _i = arr == null ? null : typeof Symbol < "u" && arr[Symbol.iterator] || arr["@@iterator"];
55
+ if (_i != null) {
56
+ var _arr = [], _n = !0, _d = !1, _s, _e;
57
+ try {
58
+ for (_i = _i.call(arr); !(_n = (_s = _i.next()).done) && (_arr.push(_s.value), !(i && _arr.length === i)); _n = !0)
59
+ ;
60
+ } catch (err) {
61
+ _d = !0, _e = err;
62
+ } finally {
63
+ try {
64
+ !_n && _i.return != null && _i.return();
65
+ } finally {
66
+ if (_d)
67
+ throw _e;
68
+ }
69
+ }
70
+ return _arr;
71
+ }
72
+ }
73
+ function _non_iterable_rest() {
74
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
75
+ }
76
+ function _non_iterable_spread() {
77
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
78
+ }
79
+ function _object_spread(target) {
80
+ for (var i = 1; i < arguments.length; i++) {
81
+ var source = arguments[i] != null ? arguments[i] : {}, ownKeys2 = Object.keys(source);
82
+ typeof Object.getOwnPropertySymbols == "function" && (ownKeys2 = ownKeys2.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
83
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
84
+ }))), ownKeys2.forEach(function(key) {
85
+ _define_property(target, key, source[key]);
86
+ });
87
+ }
88
+ return target;
89
+ }
90
+ function ownKeys(object, enumerableOnly) {
91
+ var keys = Object.keys(object);
92
+ if (Object.getOwnPropertySymbols) {
93
+ var symbols = Object.getOwnPropertySymbols(object);
94
+ enumerableOnly && (symbols = symbols.filter(function(sym) {
95
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
96
+ })), keys.push.apply(keys, symbols);
97
+ }
98
+ return keys;
99
+ }
100
+ function _object_spread_props(target, source) {
101
+ return source = source ?? {}, Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) {
102
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
103
+ }), target;
104
+ }
105
+ function _sliced_to_array(arr, i) {
106
+ return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
107
+ }
108
+ function _to_consumable_array(arr) {
109
+ return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
110
+ }
111
+ function _unsupported_iterable_to_array(o, minLen) {
112
+ if (o) {
113
+ if (typeof o == "string")
114
+ return _array_like_to_array(o, minLen);
115
+ var n = Object.prototype.toString.call(o).slice(8, -1);
116
+ if (n === "Object" && o.constructor && (n = o.constructor.name), n === "Map" || n === "Set")
117
+ return Array.from(n);
118
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
119
+ return _array_like_to_array(o, minLen);
120
+ }
121
+ }
122
+ var colorTokens = {
28
123
  light: {
29
124
  blue: import_colors.blue,
30
125
  gray: import_colors.gray,
@@ -45,19 +140,21 @@ const colorTokens = {
45
140
  red: import_colors.redDark,
46
141
  yellow: import_colors.yellowDark
47
142
  }
48
- }, 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] = [
143
+ }, palettes = function() {
144
+ var lightTransparent = "rgba(255,255,255,0)", darkTransparent = "rgba(10,10,10,0)", transparent = function(hsl) {
145
+ var opacity = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
146
+ return hsl.replace("%)", "%, ".concat(opacity, ")")).replace("hsl(", "hsla(");
147
+ }, getColorPalette = function(colors) {
148
+ var color2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : colors[0], colorPalette = Object.values(colors), _ref = [
51
149
  colorPalette.slice(0, 6),
52
150
  colorPalette.slice(colorPalette.length - 5)
53
- ];
151
+ ], head = _ref[0], tail = _ref[1];
54
152
  return [
55
- transparent(colorPalette[0]),
56
- ...head,
57
- ...tail,
153
+ transparent(colorPalette[0])
154
+ ].concat(_to_consumable_array(head), _to_consumable_array(tail), [
58
155
  color2,
59
156
  transparent(colorPalette[colorPalette.length - 1])
60
- ];
157
+ ]);
61
158
  }, lightColor = "hsl(0, 0%, 9.0%)", lightPalette = [
62
159
  lightTransparent,
63
160
  "#fff",
@@ -88,24 +185,22 @@ const colorTokens = {
88
185
  "#a5a5a5",
89
186
  darkColor,
90
187
  lightTransparent
91
- ], lightPalettes = objectFromEntries(
92
- objectKeys(colorTokens.light).map(
93
- (key) => [`light_${key}`, getColorPalette(colorTokens.light[key], lightColor)]
94
- )
95
- ), darkPalettes = objectFromEntries(
96
- objectKeys(colorTokens.dark).map(
97
- (key) => [`dark_${key}`, getColorPalette(colorTokens.dark[key], darkColor)]
98
- )
99
- ), colorPalettes = {
100
- ...lightPalettes,
101
- ...darkPalettes
102
- };
103
- return {
188
+ ], lightPalettes = objectFromEntries(objectKeys(colorTokens.light).map(function(key) {
189
+ return [
190
+ "light_".concat(key),
191
+ getColorPalette(colorTokens.light[key], lightColor)
192
+ ];
193
+ })), darkPalettes = objectFromEntries(objectKeys(colorTokens.dark).map(function(key) {
194
+ return [
195
+ "dark_".concat(key),
196
+ getColorPalette(colorTokens.dark[key], darkColor)
197
+ ];
198
+ })), colorPalettes = _object_spread({}, lightPalettes, darkPalettes);
199
+ return _object_spread({
104
200
  light: lightPalette,
105
- dark: darkPalette,
106
- ...colorPalettes
107
- };
108
- })(), templateColorsSpecific = {
201
+ dark: darkPalette
202
+ }, colorPalettes);
203
+ }(), templateColorsSpecific = {
109
204
  color1: 1,
110
205
  color2: 2,
111
206
  color3: 3,
@@ -118,9 +213,8 @@ const colorTokens = {
118
213
  color10: 10,
119
214
  color11: 11,
120
215
  color12: 12
121
- }, templates = (() => {
122
- const template = {
123
- ...templateColorsSpecific,
216
+ }, templates = function() {
217
+ var template = _object_spread_props(_object_spread({}, templateColorsSpecific), {
124
218
  // the background, color, etc keys here work like generics - they make it so you
125
219
  // can publish components for others to use without mandating a specific color scale
126
220
  // the @tamagui/button Button component looks for `$background`, so you set the
@@ -143,60 +237,50 @@ const colorTokens = {
143
237
  placeholderColor: -4,
144
238
  // in the future this should be partially transparent
145
239
  outlineColor: 5
146
- };
240
+ });
147
241
  return {
148
242
  base: template,
149
- colorLight: {
150
- ...template,
243
+ colorLight: _object_spread_props(_object_spread({}, template), {
151
244
  // light color themes are a bit less sensitive
152
245
  borderColor: 4,
153
246
  borderColorHover: 5,
154
247
  borderColorFocus: 4,
155
248
  borderColorPress: 4
156
- }
249
+ })
157
250
  };
158
- })(), maskOptions = (() => {
159
- const shadows2 = {
251
+ }(), maskOptions = function() {
252
+ var shadows2 = {
160
253
  shadowColor: 0,
161
254
  shadowColorHover: 0,
162
255
  shadowColorPress: 0,
163
256
  shadowColorFocus: 0
164
- }, colors = {
165
- ...shadows2,
257
+ }, colors = _object_spread_props(_object_spread({}, shadows2), {
166
258
  color: 0,
167
259
  colorHover: 0,
168
260
  colorFocus: 0,
169
261
  colorPress: 0
170
- }, baseMaskOptions = {
262
+ }), baseMaskOptions = {
171
263
  override: shadows2,
172
264
  skip: shadows2,
173
265
  // avoids the transparent ends
174
266
  max: palettes.light.length - 2,
175
267
  min: 1
176
- }, skipShadowsAndSpecificColors = {
177
- ...shadows2,
178
- ...templateColorsSpecific
179
- };
268
+ }, skipShadowsAndSpecificColors = _object_spread({}, shadows2, templateColorsSpecific);
180
269
  return {
181
- component: {
182
- ...baseMaskOptions,
270
+ component: _object_spread_props(_object_spread({}, baseMaskOptions), {
183
271
  override: colors,
184
272
  skip: skipShadowsAndSpecificColors
185
- },
186
- alt: {
187
- ...baseMaskOptions
188
- },
189
- button: {
190
- ...baseMaskOptions,
191
- override: {
192
- ...colors,
273
+ }),
274
+ alt: _object_spread({}, baseMaskOptions),
275
+ button: _object_spread_props(_object_spread({}, baseMaskOptions), {
276
+ override: _object_spread_props(_object_spread({}, colors), {
193
277
  borderColor: "transparent",
194
278
  borderColorHover: "transparent"
195
- },
279
+ }),
196
280
  skip: skipShadowsAndSpecificColors
197
- }
281
+ })
198
282
  };
199
- })(), 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 = {
283
+ }(), 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 = {
200
284
  $0: 0,
201
285
  "$0.25": 2,
202
286
  "$0.5": 4,
@@ -226,38 +310,26 @@ const colorTokens = {
226
310
  $18: 244,
227
311
  $19: 264,
228
312
  $20: 284
229
- }, spaces = Object.entries(size).map(([k, v]) => [k, sizeToSpace(v)]), spacesNegative = spaces.slice(1).map(([k, v]) => [`-${k.slice(1)}`, -v]), space = {
230
- ...Object.fromEntries(spaces),
231
- ...Object.fromEntries(spacesNegative)
232
- }, zIndex = {
313
+ }, spaces = Object.entries(size).map(function(param) {
314
+ var _param = _sliced_to_array(param, 2), k = _param[0], v = _param[1];
315
+ return [
316
+ k,
317
+ sizeToSpace(v)
318
+ ];
319
+ }), spacesNegative = spaces.slice(1).map(function(param) {
320
+ var _param = _sliced_to_array(param, 2), k = _param[0], v = _param[1];
321
+ return [
322
+ "-".concat(k.slice(1)),
323
+ -v
324
+ ];
325
+ }), space = _object_spread({}, Object.fromEntries(spaces), Object.fromEntries(spacesNegative)), zIndex = {
233
326
  0: 0,
234
327
  1: 100,
235
328
  2: 200,
236
329
  3: 300,
237
330
  4: 400,
238
331
  5: 500
239
- }, darkColors = {
240
- ...colorTokens.dark.blue,
241
- ...colorTokens.dark.gray,
242
- ...colorTokens.dark.green,
243
- ...colorTokens.dark.orange,
244
- ...colorTokens.dark.pink,
245
- ...colorTokens.dark.purple,
246
- ...colorTokens.dark.red,
247
- ...colorTokens.dark.yellow
248
- }, lightColors = {
249
- ...colorTokens.light.blue,
250
- ...colorTokens.light.gray,
251
- ...colorTokens.light.green,
252
- ...colorTokens.light.orange,
253
- ...colorTokens.light.pink,
254
- ...colorTokens.light.purple,
255
- ...colorTokens.light.red,
256
- ...colorTokens.light.yellow
257
- }, color = {
258
- ...postfixObjKeys(lightColors, "Light"),
259
- ...postfixObjKeys(darkColors, "Dark")
260
- }, radius = {
332
+ }, darkColors = _object_spread({}, colorTokens.dark.blue, colorTokens.dark.gray, colorTokens.dark.green, colorTokens.dark.orange, colorTokens.dark.pink, colorTokens.dark.purple, colorTokens.dark.red, colorTokens.dark.yellow), lightColors = _object_spread({}, colorTokens.light.blue, colorTokens.light.gray, colorTokens.light.green, colorTokens.light.orange, colorTokens.light.pink, colorTokens.light.purple, colorTokens.light.red, colorTokens.light.yellow), color = _object_spread({}, postfixObjKeys(lightColors, "Light"), postfixObjKeys(darkColors, "Dark")), radius = {
261
333
  0: 0,
262
334
  1: 3,
263
335
  2: 5,
@@ -291,26 +363,22 @@ const colorTokens = {
291
363
  shadowColorPress: darkShadowColor,
292
364
  shadowColorFocus: darkShadowColor
293
365
  }
294
- }, colorThemeDefinition = (colorName) => [
295
- {
296
- parent: "light",
297
- palette: colorName,
298
- template: "colorLight"
299
- },
300
- {
301
- parent: "dark",
302
- palette: colorName,
303
- template: "base"
304
- }
305
- ], nonInherited = {
306
- light: {
307
- ...lightColors,
308
- ...shadows.light
309
- },
310
- dark: {
311
- ...darkColors,
312
- ...shadows.dark
313
- }
366
+ }, colorThemeDefinition = function(colorName) {
367
+ return [
368
+ {
369
+ parent: "light",
370
+ palette: colorName,
371
+ template: "colorLight"
372
+ },
373
+ {
374
+ parent: "dark",
375
+ palette: colorName,
376
+ template: "base"
377
+ }
378
+ ];
379
+ }, nonInherited = {
380
+ light: _object_spread({}, lightColors, shadows.light),
381
+ dark: _object_spread({}, darkColors, shadows.dark)
314
382
  }, overlayThemeDefinitions = [
315
383
  {
316
384
  parent: "light",
@@ -345,128 +413,131 @@ const colorTokens = {
345
413
  red: colorThemeDefinition("red"),
346
414
  gray: colorThemeDefinition("gray")
347
415
  }).addChildThemes({
348
- alt1: {
349
- mask: "soften",
350
- ...maskOptions.alt
351
- },
352
- alt2: {
353
- mask: "soften2Border1",
354
- ...maskOptions.alt
355
- },
416
+ alt1: _object_spread({
417
+ mask: "soften"
418
+ }, maskOptions.alt),
419
+ alt2: _object_spread({
420
+ mask: "soften2Border1"
421
+ }, maskOptions.alt),
356
422
  active: {
357
423
  mask: "soften3FlatBorder",
358
424
  skip: {
359
425
  color: 1
360
426
  }
361
427
  }
362
- }).addChildThemes(
363
- {
364
- ListItem: [
365
- {
366
- parent: "light",
367
- avoidNestingWithin: ["active"],
368
- mask: "identity",
369
- ...maskOptions.component
370
- },
371
- {
372
- parent: "dark",
373
- avoidNestingWithin: ["active"],
374
- mask: "identity",
375
- ...maskOptions.component
376
- }
377
- ],
378
- Card: {
379
- mask: "soften",
380
- avoidNestingWithin: ["active"],
381
- ...maskOptions.component
382
- },
383
- Button: {
384
- mask: "soften2Border1",
385
- ...maskOptions.component
386
- },
387
- Checkbox: {
388
- mask: "softenBorder2",
389
- ...maskOptions.component
390
- },
391
- Switch: {
392
- mask: "soften2Border1",
393
- ...maskOptions.component
394
- },
395
- SwitchThumb: {
396
- mask: "inverseStrengthen2",
397
- avoidNestingWithin: ["active"],
398
- ...maskOptions.component
399
- },
400
- TooltipContent: {
401
- mask: "soften2Border1",
402
- avoidNestingWithin: ["active"],
403
- ...maskOptions.component
404
- },
405
- DrawerFrame: {
406
- mask: "soften",
407
- avoidNestingWithin: ["active"],
408
- ...maskOptions.component
409
- },
410
- Progress: {
411
- mask: "soften",
412
- avoidNestingWithin: ["active"],
413
- ...maskOptions.component
414
- },
415
- RadioGroupItem: {
416
- mask: "softenBorder2",
417
- avoidNestingWithin: ["active"],
418
- ...maskOptions.component
419
- },
420
- TooltipArrow: {
421
- mask: "soften",
422
- avoidNestingWithin: ["active"],
423
- ...maskOptions.component
424
- },
425
- SliderTrackActive: {
426
- mask: "inverseSoften",
427
- ...maskOptions.component
428
- },
429
- SliderTrack: {
430
- mask: "soften2Border1",
431
- avoidNestingWithin: ["active"],
432
- ...maskOptions.component
433
- },
434
- SliderThumb: {
435
- mask: "inverse",
436
- avoidNestingWithin: ["active"],
437
- ...maskOptions.component
438
- },
439
- Tooltip: {
440
- mask: "inverse",
441
- avoidNestingWithin: ["active"],
442
- ...maskOptions.component
443
- },
444
- ProgressIndicator: {
445
- mask: "inverse",
446
- avoidNestingWithin: ["active"],
447
- ...maskOptions.component
448
- },
449
- SheetOverlay: overlayThemeDefinitions,
450
- DialogOverlay: overlayThemeDefinitions,
451
- ModalOverlay: overlayThemeDefinitions,
452
- Input: {
453
- mask: "softenBorder2",
454
- ...maskOptions.component
455
- },
456
- TextArea: {
457
- mask: "softenBorder2",
458
- ...maskOptions.component
459
- }
460
- },
461
- {
462
- // to save bundle size but make alt themes not work on components
463
- // avoidNestingWithin: ['alt1', 'alt2'],
464
- }
465
- ), themesIn = themeBuilder.build(), themes = themesIn;
428
+ }).addChildThemes({
429
+ ListItem: [
430
+ _object_spread({
431
+ parent: "light",
432
+ avoidNestingWithin: [
433
+ "active"
434
+ ],
435
+ mask: "identity"
436
+ }, maskOptions.component),
437
+ _object_spread({
438
+ parent: "dark",
439
+ avoidNestingWithin: [
440
+ "active"
441
+ ],
442
+ mask: "identity"
443
+ }, maskOptions.component)
444
+ ],
445
+ Card: _object_spread({
446
+ mask: "soften",
447
+ avoidNestingWithin: [
448
+ "active"
449
+ ]
450
+ }, maskOptions.component),
451
+ Button: _object_spread({
452
+ mask: "soften2Border1"
453
+ }, maskOptions.component),
454
+ Checkbox: _object_spread({
455
+ mask: "softenBorder2"
456
+ }, maskOptions.component),
457
+ Switch: _object_spread({
458
+ mask: "soften2Border1"
459
+ }, maskOptions.component),
460
+ SwitchThumb: _object_spread({
461
+ mask: "inverseStrengthen2",
462
+ avoidNestingWithin: [
463
+ "active"
464
+ ]
465
+ }, maskOptions.component),
466
+ TooltipContent: _object_spread({
467
+ mask: "soften2Border1",
468
+ avoidNestingWithin: [
469
+ "active"
470
+ ]
471
+ }, maskOptions.component),
472
+ DrawerFrame: _object_spread({
473
+ mask: "soften",
474
+ avoidNestingWithin: [
475
+ "active"
476
+ ]
477
+ }, maskOptions.component),
478
+ Progress: _object_spread({
479
+ mask: "soften",
480
+ avoidNestingWithin: [
481
+ "active"
482
+ ]
483
+ }, maskOptions.component),
484
+ RadioGroupItem: _object_spread({
485
+ mask: "softenBorder2",
486
+ avoidNestingWithin: [
487
+ "active"
488
+ ]
489
+ }, maskOptions.component),
490
+ TooltipArrow: _object_spread({
491
+ mask: "soften",
492
+ avoidNestingWithin: [
493
+ "active"
494
+ ]
495
+ }, maskOptions.component),
496
+ SliderTrackActive: _object_spread({
497
+ mask: "inverseSoften"
498
+ }, maskOptions.component),
499
+ SliderTrack: _object_spread({
500
+ mask: "soften2Border1",
501
+ avoidNestingWithin: [
502
+ "active"
503
+ ]
504
+ }, maskOptions.component),
505
+ SliderThumb: _object_spread({
506
+ mask: "inverse",
507
+ avoidNestingWithin: [
508
+ "active"
509
+ ]
510
+ }, maskOptions.component),
511
+ Tooltip: _object_spread({
512
+ mask: "inverse",
513
+ avoidNestingWithin: [
514
+ "active"
515
+ ]
516
+ }, maskOptions.component),
517
+ ProgressIndicator: _object_spread({
518
+ mask: "inverse",
519
+ avoidNestingWithin: [
520
+ "active"
521
+ ]
522
+ }, maskOptions.component),
523
+ SheetOverlay: overlayThemeDefinitions,
524
+ DialogOverlay: overlayThemeDefinitions,
525
+ ModalOverlay: overlayThemeDefinitions,
526
+ Input: _object_spread({
527
+ mask: "softenBorder2"
528
+ }, maskOptions.component),
529
+ TextArea: _object_spread({
530
+ mask: "softenBorder2"
531
+ }, maskOptions.component)
532
+ }, {}), themesIn = themeBuilder.build(), themes = themesIn;
466
533
  function postfixObjKeys(obj, postfix) {
467
- return Object.fromEntries(
468
- Object.entries(obj).map(([k, v]) => [`${k}${postfix}`, v])
469
- );
534
+ return Object.fromEntries(Object.entries(obj).map(function(param) {
535
+ var _param = _sliced_to_array(param, 2), k = _param[0], v = _param[1];
536
+ return [
537
+ "".concat(k).concat(postfix),
538
+ v
539
+ ];
540
+ }));
470
541
  }
471
542
  function sizeToSpace(v) {
472
543
  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);