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