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