@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,13 +1,101 @@
|
|
|
1
|
-
import {
|
|
2
|
-
addChildren,
|
|
3
|
-
applyMask,
|
|
4
|
-
createStrengthenMask,
|
|
5
|
-
createTheme,
|
|
6
|
-
createWeakenMask,
|
|
7
|
-
skipMask
|
|
8
|
-
} from "@tamagui/create-theme";
|
|
1
|
+
import { addChildren, applyMask, createStrengthenMask, createTheme, createWeakenMask, skipMask } from "@tamagui/create-theme";
|
|
9
2
|
import { colorTokens, darkColors, lightColors } from "./tokens";
|
|
10
|
-
|
|
3
|
+
function _array_like_to_array(arr, len) {
|
|
4
|
+
(len == null || len > arr.length) && (len = arr.length);
|
|
5
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
6
|
+
arr2[i] = arr[i];
|
|
7
|
+
return arr2;
|
|
8
|
+
}
|
|
9
|
+
function _array_with_holes(arr) {
|
|
10
|
+
if (Array.isArray(arr))
|
|
11
|
+
return arr;
|
|
12
|
+
}
|
|
13
|
+
function _array_without_holes(arr) {
|
|
14
|
+
if (Array.isArray(arr))
|
|
15
|
+
return _array_like_to_array(arr);
|
|
16
|
+
}
|
|
17
|
+
function _define_property(obj, key, value) {
|
|
18
|
+
return key in obj ? Object.defineProperty(obj, key, {
|
|
19
|
+
value,
|
|
20
|
+
enumerable: !0,
|
|
21
|
+
configurable: !0,
|
|
22
|
+
writable: !0
|
|
23
|
+
}) : obj[key] = value, obj;
|
|
24
|
+
}
|
|
25
|
+
function _iterable_to_array(iter) {
|
|
26
|
+
if (typeof Symbol < "u" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
|
|
27
|
+
return Array.from(iter);
|
|
28
|
+
}
|
|
29
|
+
function _iterable_to_array_limit(arr, i) {
|
|
30
|
+
var _i = arr == null ? null : typeof Symbol < "u" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
31
|
+
if (_i != null) {
|
|
32
|
+
var _arr = [], _n = !0, _d = !1, _s, _e;
|
|
33
|
+
try {
|
|
34
|
+
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done) && (_arr.push(_s.value), !(i && _arr.length === i)); _n = !0)
|
|
35
|
+
;
|
|
36
|
+
} catch (err) {
|
|
37
|
+
_d = !0, _e = err;
|
|
38
|
+
} finally {
|
|
39
|
+
try {
|
|
40
|
+
!_n && _i.return != null && _i.return();
|
|
41
|
+
} finally {
|
|
42
|
+
if (_d)
|
|
43
|
+
throw _e;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return _arr;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
function _non_iterable_rest() {
|
|
50
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
51
|
+
}
|
|
52
|
+
function _non_iterable_spread() {
|
|
53
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
54
|
+
}
|
|
55
|
+
function _object_spread(target) {
|
|
56
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
57
|
+
var source = arguments[i] != null ? arguments[i] : {}, ownKeys2 = Object.keys(source);
|
|
58
|
+
typeof Object.getOwnPropertySymbols == "function" && (ownKeys2 = ownKeys2.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
59
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
60
|
+
}))), ownKeys2.forEach(function(key) {
|
|
61
|
+
_define_property(target, key, source[key]);
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
return target;
|
|
65
|
+
}
|
|
66
|
+
function ownKeys(object, enumerableOnly) {
|
|
67
|
+
var keys = Object.keys(object);
|
|
68
|
+
if (Object.getOwnPropertySymbols) {
|
|
69
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
70
|
+
enumerableOnly && (symbols = symbols.filter(function(sym) {
|
|
71
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
72
|
+
})), keys.push.apply(keys, symbols);
|
|
73
|
+
}
|
|
74
|
+
return keys;
|
|
75
|
+
}
|
|
76
|
+
function _object_spread_props(target, source) {
|
|
77
|
+
return source = source ?? {}, Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) {
|
|
78
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
79
|
+
}), target;
|
|
80
|
+
}
|
|
81
|
+
function _sliced_to_array(arr, i) {
|
|
82
|
+
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
83
|
+
}
|
|
84
|
+
function _to_consumable_array(arr) {
|
|
85
|
+
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
|
|
86
|
+
}
|
|
87
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
88
|
+
if (o) {
|
|
89
|
+
if (typeof o == "string")
|
|
90
|
+
return _array_like_to_array(o, minLen);
|
|
91
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
92
|
+
if (n === "Object" && o.constructor && (n = o.constructor.name), n === "Map" || n === "Set")
|
|
93
|
+
return Array.from(n);
|
|
94
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
|
95
|
+
return _array_like_to_array(o, minLen);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
var lightTransparent = "rgba(255,255,255,0)", darkTransparent = "rgba(10,10,10,0)", palettes = {
|
|
11
99
|
dark: [
|
|
12
100
|
darkTransparent,
|
|
13
101
|
"#050505",
|
|
@@ -58,19 +146,24 @@ const lightTransparent = "rgba(255,255,255,0)", darkTransparent = "rgba(10,10,10
|
|
|
58
146
|
shadowColorHover: 1,
|
|
59
147
|
shadowColorPress: 2,
|
|
60
148
|
shadowColorFocus: 2
|
|
61
|
-
}, toSkip = {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
149
|
+
}, toSkip = _object_spread({}, templateShadows), override = Object.fromEntries(Object.entries(toSkip).map(function(param) {
|
|
150
|
+
var _param = _sliced_to_array(param, 1), k = _param[0];
|
|
151
|
+
return [
|
|
152
|
+
k,
|
|
153
|
+
0
|
|
154
|
+
];
|
|
155
|
+
})), overrideShadows = Object.fromEntries(Object.entries(templateShadows).map(function(param) {
|
|
156
|
+
var _param = _sliced_to_array(param, 1), k = _param[0];
|
|
157
|
+
return [
|
|
158
|
+
k,
|
|
159
|
+
0
|
|
160
|
+
];
|
|
161
|
+
})), overrideWithColors = _object_spread_props(_object_spread({}, override), {
|
|
67
162
|
color: 0,
|
|
68
163
|
colorHover: 0,
|
|
69
164
|
colorFocus: 0,
|
|
70
165
|
colorPress: 0
|
|
71
|
-
}, template = {
|
|
72
|
-
...templateColors,
|
|
73
|
-
...toSkip,
|
|
166
|
+
}), template = _object_spread_props(_object_spread({}, templateColors, toSkip), {
|
|
74
167
|
// the background, color, etc keys here work like generics - they make it so you
|
|
75
168
|
// can publish components for others to use without mandating a specific color scale
|
|
76
169
|
// the @tamagui/button Button component looks for `$background`, so you set the
|
|
@@ -91,7 +184,7 @@ const lightTransparent = "rgba(255,255,255,0)", darkTransparent = "rgba(10,10,10
|
|
|
91
184
|
borderColorPress: 3,
|
|
92
185
|
borderColorFocus: 4,
|
|
93
186
|
placeholderColor: -4
|
|
94
|
-
}, lightShadowColor = "rgba(0,0,0,0.02)", lightShadowColorStrong = "rgba(0,0,0,0.066)", darkShadowColor = "rgba(0,0,0,0.2)", darkShadowColorStrong = "rgba(0,0,0,0.3)", lightShadows = {
|
|
187
|
+
}), lightShadowColor = "rgba(0,0,0,0.02)", lightShadowColorStrong = "rgba(0,0,0,0.066)", darkShadowColor = "rgba(0,0,0,0.2)", darkShadowColorStrong = "rgba(0,0,0,0.3)", lightShadows = {
|
|
95
188
|
shadowColor: lightShadowColorStrong,
|
|
96
189
|
shadowColorHover: lightShadowColorStrong,
|
|
97
190
|
shadowColorPress: lightShadowColor,
|
|
@@ -101,8 +194,7 @@ const lightTransparent = "rgba(255,255,255,0)", darkTransparent = "rgba(10,10,10
|
|
|
101
194
|
shadowColorHover: darkShadowColorStrong,
|
|
102
195
|
shadowColorPress: darkShadowColor,
|
|
103
196
|
shadowColorFocus: darkShadowColor
|
|
104
|
-
}, lightTemplate = {
|
|
105
|
-
...template,
|
|
197
|
+
}, lightTemplate = _object_spread(_object_spread_props(_object_spread({}, template), {
|
|
106
198
|
background: 2,
|
|
107
199
|
backgroundHover: 3,
|
|
108
200
|
backgroundPress: 4,
|
|
@@ -110,9 +202,8 @@ const lightTransparent = "rgba(255,255,255,0)", darkTransparent = "rgba(10,10,10
|
|
|
110
202
|
borderColor: 6,
|
|
111
203
|
borderColorHover: 7,
|
|
112
204
|
borderColorFocus: 5,
|
|
113
|
-
borderColorPress: 6
|
|
114
|
-
|
|
115
|
-
}, darkTemplate = { ...template, ...darkShadows }, light = createTheme(palettes.light, lightTemplate), dark = createTheme(palettes.dark, darkTemplate), baseThemes = {
|
|
205
|
+
borderColorPress: 6
|
|
206
|
+
}), lightShadows), darkTemplate = _object_spread({}, template, darkShadows), light = createTheme(palettes.light, lightTemplate), dark = createTheme(palettes.dark, darkTemplate), baseThemes = {
|
|
116
207
|
light,
|
|
117
208
|
dark
|
|
118
209
|
}, masks = {
|
|
@@ -125,102 +216,89 @@ const lightTransparent = "rgba(255,255,255,0)", darkTransparent = "rgba(10,10,10
|
|
|
125
216
|
// avoids the transparent ends
|
|
126
217
|
max: palettes.light.length - 2,
|
|
127
218
|
min: 1
|
|
128
|
-
}, transparent = (hsl
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
}
|
|
157
|
-
), allThemes = addChildren(baseThemes, (name, theme)
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
return {
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
...getAltThemes({ theme, inverse: inverseTheme, isLight }),
|
|
172
|
-
...getComponentThemes(theme, inverseTheme, isLight)
|
|
173
|
-
},
|
|
174
|
-
...allColorThemes
|
|
175
|
-
};
|
|
219
|
+
}, transparent = function(hsl) {
|
|
220
|
+
var opacity = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
|
|
221
|
+
return hsl.replace("%)", "%, ".concat(opacity, ")")).replace("hsl(", "hsla(");
|
|
222
|
+
}, _map = _sliced_to_array([
|
|
223
|
+
colorTokens.light,
|
|
224
|
+
colorTokens.dark
|
|
225
|
+
].map(function(colorSet, i) {
|
|
226
|
+
var isLight = i === 0, theme = baseThemes[isLight ? "light" : "dark"];
|
|
227
|
+
return Object.fromEntries(Object.keys(colorSet).map(function(color) {
|
|
228
|
+
var colorPalette = Object.values(colorSet[color]), _ref = [
|
|
229
|
+
colorPalette.slice(0, 6),
|
|
230
|
+
colorPalette.slice(colorPalette.length - 5)
|
|
231
|
+
], head = _ref[0], tail = _ref[1], palette = [
|
|
232
|
+
transparent(colorPalette[0])
|
|
233
|
+
].concat(_to_consumable_array(head), _to_consumable_array(tail), [
|
|
234
|
+
theme.color,
|
|
235
|
+
transparent(colorPalette[colorPalette.length - 1])
|
|
236
|
+
]), colorTheme = createTheme(palette, isLight ? _object_spread_props(_object_spread({}, lightTemplate), {
|
|
237
|
+
// light color themes are a bit less sensitive
|
|
238
|
+
borderColor: 4,
|
|
239
|
+
borderColorHover: 5,
|
|
240
|
+
borderColorFocus: 4,
|
|
241
|
+
borderColorPress: 4
|
|
242
|
+
}) : darkTemplate);
|
|
243
|
+
return [
|
|
244
|
+
color,
|
|
245
|
+
colorTheme
|
|
246
|
+
];
|
|
247
|
+
}));
|
|
248
|
+
}), 2), lightColorThemes = _map[0], darkColorThemes = _map[1], allThemes = addChildren(baseThemes, function(name, theme) {
|
|
249
|
+
var isLight = name === "light", inverseName = isLight ? "dark" : "light", inverseTheme = baseThemes[inverseName], colorThemes = isLight ? lightColorThemes : darkColorThemes, inverseColorThemes = isLight ? darkColorThemes : lightColorThemes, allColorThemes = addChildren(colorThemes, function(colorName, colorTheme) {
|
|
250
|
+
var inverse = inverseColorThemes[colorName];
|
|
251
|
+
return _object_spread({}, getAltThemes({
|
|
252
|
+
theme: colorTheme,
|
|
253
|
+
inverse,
|
|
254
|
+
isLight
|
|
255
|
+
}), getComponentThemes(colorTheme, inverse, isLight));
|
|
256
|
+
}), baseSubThemes = _object_spread({}, getAltThemes({
|
|
257
|
+
theme,
|
|
258
|
+
inverse: inverseTheme,
|
|
259
|
+
isLight
|
|
260
|
+
}), getComponentThemes(theme, inverseTheme, isLight));
|
|
261
|
+
return _object_spread({}, baseSubThemes, allColorThemes);
|
|
176
262
|
});
|
|
177
|
-
function getAltThemes({
|
|
178
|
-
theme,
|
|
179
|
-
inverse,
|
|
180
|
-
isLight,
|
|
181
|
-
activeTheme
|
|
182
|
-
}) {
|
|
183
|
-
const maskOptionsAlt = {
|
|
184
|
-
...maskOptions,
|
|
263
|
+
function getAltThemes(param) {
|
|
264
|
+
var theme = param.theme, inverse = param.inverse, isLight = param.isLight, activeTheme = param.activeTheme, maskOptionsAlt = _object_spread_props(_object_spread({}, maskOptions), {
|
|
185
265
|
override: overrideShadows
|
|
186
|
-
}, alt1 = applyMask(theme, masks.weaker, maskOptionsAlt), alt2 = applyMask(alt1, masks.weaker, maskOptionsAlt), active = activeTheme ?? (process.env.ACTIVE_THEME_INVERSE ? inverse :
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
}
|
|
193
|
-
}));
|
|
194
|
-
return addChildren({
|
|
266
|
+
}), alt1 = applyMask(theme, masks.weaker, maskOptionsAlt), alt2 = applyMask(alt1, masks.weaker, maskOptionsAlt), active = activeTheme ?? (process.env.ACTIVE_THEME_INVERSE ? inverse : function() {
|
|
267
|
+
return applyMask(theme, masks.weaker, _object_spread_props(_object_spread({}, maskOptions), {
|
|
268
|
+
strength: 3,
|
|
269
|
+
skip: _object_spread_props(_object_spread({}, maskOptions.skip), {
|
|
270
|
+
color: 1
|
|
271
|
+
})
|
|
272
|
+
}));
|
|
273
|
+
}());
|
|
274
|
+
return addChildren({
|
|
275
|
+
alt1,
|
|
276
|
+
alt2,
|
|
277
|
+
active
|
|
278
|
+
}, function(_, subTheme) {
|
|
279
|
+
return getComponentThemes(subTheme, subTheme === inverse ? theme : inverse, isLight);
|
|
280
|
+
});
|
|
195
281
|
}
|
|
196
282
|
function getComponentThemes(theme, inverse, isLight) {
|
|
197
|
-
|
|
198
|
-
...maskOptions,
|
|
283
|
+
var componentMaskOptions = _object_spread_props(_object_spread({}, maskOptions), {
|
|
199
284
|
override: overrideWithColors,
|
|
200
|
-
skip: {
|
|
201
|
-
|
|
202
|
-
// skip colors too just for component sub themes
|
|
203
|
-
...templateColors
|
|
204
|
-
}
|
|
205
|
-
}, weaker1 = applyMask(theme, masks.weaker, componentMaskOptions), base = applyMask(weaker1, masks.stronger, componentMaskOptions), weaker2 = applyMask(weaker1, masks.weaker, componentMaskOptions), stronger1 = applyMask(theme, masks.stronger, componentMaskOptions), inverse1 = applyMask(inverse, masks.weaker, componentMaskOptions), inverse2 = applyMask(inverse1, masks.weaker, componentMaskOptions), strongerBorderLighterBackground = isLight ? {
|
|
206
|
-
...stronger1,
|
|
285
|
+
skip: _object_spread({}, maskOptions.skip, templateColors)
|
|
286
|
+
}), weaker1 = applyMask(theme, masks.weaker, componentMaskOptions), base = applyMask(weaker1, masks.stronger, componentMaskOptions), weaker2 = applyMask(weaker1, masks.weaker, componentMaskOptions), stronger1 = applyMask(theme, masks.stronger, componentMaskOptions), inverse1 = applyMask(inverse, masks.weaker, componentMaskOptions), inverse2 = applyMask(inverse1, masks.weaker, componentMaskOptions), strongerBorderLighterBackground = isLight ? _object_spread_props(_object_spread({}, stronger1), {
|
|
207
287
|
borderColor: weaker1.borderColor,
|
|
208
288
|
borderColorHover: weaker1.borderColorHover,
|
|
209
289
|
borderColorPress: weaker1.borderColorPress,
|
|
210
290
|
borderColorFocus: weaker1.borderColorFocus
|
|
211
|
-
} : {
|
|
212
|
-
...applyMask(theme, masks.skip, componentMaskOptions),
|
|
291
|
+
}) : _object_spread_props(_object_spread({}, applyMask(theme, masks.skip, componentMaskOptions)), {
|
|
213
292
|
borderColor: weaker1.borderColor,
|
|
214
293
|
borderColorHover: weaker1.borderColorHover,
|
|
215
294
|
borderColorPress: weaker1.borderColorPress,
|
|
216
295
|
borderColorFocus: weaker1.borderColorFocus
|
|
217
|
-
}, overlayTheme = {
|
|
296
|
+
}), overlayTheme = {
|
|
218
297
|
background: isLight ? "rgba(0,0,0,0.5)" : "rgba(0,0,0,0.9)"
|
|
219
|
-
}, weaker2WithoutBorder = {
|
|
220
|
-
...weaker2,
|
|
298
|
+
}, weaker2WithoutBorder = _object_spread_props(_object_spread({}, weaker2), {
|
|
221
299
|
borderColor: "transparent",
|
|
222
300
|
borderColorHover: "transparent"
|
|
223
|
-
};
|
|
301
|
+
});
|
|
224
302
|
return {
|
|
225
303
|
ListItem: isLight ? stronger1 : base,
|
|
226
304
|
Card: weaker1,
|
|
@@ -245,13 +323,16 @@ function getComponentThemes(theme, inverse, isLight) {
|
|
|
245
323
|
ModalOverlay: overlayTheme
|
|
246
324
|
};
|
|
247
325
|
}
|
|
248
|
-
|
|
249
|
-
...allThemes,
|
|
326
|
+
var themes = _object_spread_props(_object_spread({}, allThemes), {
|
|
250
327
|
// bring back the full type, the rest use a subset to avoid clogging up ts,
|
|
251
328
|
// tamagui will be smart and use the top level themes as the type for useTheme() etc
|
|
252
|
-
light: createTheme(palettes.light, lightTemplate, {
|
|
253
|
-
|
|
254
|
-
}
|
|
329
|
+
light: createTheme(palettes.light, lightTemplate, {
|
|
330
|
+
nonInheritedValues: lightColors
|
|
331
|
+
}),
|
|
332
|
+
dark: createTheme(palettes.dark, darkTemplate, {
|
|
333
|
+
nonInheritedValues: darkColors
|
|
334
|
+
})
|
|
335
|
+
});
|
|
255
336
|
export {
|
|
256
337
|
themes
|
|
257
338
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/themes-old.tsx"],
|
|
4
|
-
"mappings": "AACA
|
|
5
|
-
"names": []
|
|
3
|
+
"sources": ["../../src/Users/n8/tamagui/packages/themes/src/themes-old.tsx"],
|
|
4
|
+
"mappings": "AACA,SACEA,aACAC,WACAC,sBACAC,aACAC,kBACAC,gBACK;AAEP,SAASC,aAAaC,YAAYC,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIrD,IAAMC,mBAAmB,uBACnBC,kBAAkB,oBAGlBC,WAAW;EACfC,MAAM;IACJF;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACAD;;EAEFI,OAAO;IACLJ;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACAC;;AAEJ,GAEMI,iBAAiB;EACrBC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,SAAS;EACTC,SAAS;EACTC,SAAS;AACX,GAEMC,kBAAkB;EACtBC,aAAa;EACbC,kBAAkB;EAClBC,kBAAkB;EAClBC,kBAAkB;AACpB,GAIMC,SAAS,eAAA,CAAA,GACVL,eAAAA,GAGCM,WAAWC,OAAOC,YAAYD,OAAOE,QAAQJ,MAAAA,EAAQK,IAAI,SAAA,OAAA;2CAAEC,IAAAA,OAAAA,CAAAA;SAAO;IAACA;IAAG;;KACtEC,kBAAkBL,OAAOC,YAC7BD,OAAOE,QAAQT,eAAAA,EAAiBU,IAAI,SAAA,OAAA;2CAAEC,IAAA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AAUlB;IACVmB,SAASrB;;IAETsB,cAAcnB;IACdoB,eAAepB;IACfqB,cAAcrB;EAChB;AACF;AAEO,IAAMsB,SAAS,qBAAA,eAAA,CAAA,GACjBrD,SAAAA,GAAAA;;;EAGHhF,OAAOV,YAAYQ,SAASE,OAAOmD,eAAe;IAAEmF,oBAAoB3I;EAAY,CAAA;EACpFI,MAAMT,YAAYQ,SAASC,MAAMqD,cAAc;IAAEkF,oBAAoB5I;EAAW,CAAA;;",
|
|
5
|
+
"names": ["addChildren", "applyMask", "createStrengthenMask", "createTheme", "createWeakenMask", "skipMask", "colorTokens", "darkColors", "lightColors", "lightTransparent", "darkTransparent", "palettes", "dark", "light", "templateColors", "color1", "color2", "color3", "color4", "color5", "color6", "color7", "color8", "color9", "color10", "color11", "color12", "templateShadows", "shadowColor", "shadowColorHover", "shadowColorPress", "shadowColorFocus", "toSkip", "override", "Object", "fromEntries", "entries", "map", "k", "overrideShadows", "overrideWithColors", "color", "colorHover", "colorFocus", "colorPress", "template", "background", "backgroundHover", "backgroundPress", "backgroundFocus", "backgroundStrong", "backgroundTransparent", "colorTransparent", "borderColor", "borderColorHover", "borderColorPress", "borderColorFocus", "placeholderColor", "lightShadowColor", "lightShadowColorStrong", "darkShadowColor", "darkShadowColorStrong", "lightShadows", "darkShadows", "lightTemplate", "darkTemplate", "baseThemes", "masks", "skip", "weaker", "stronger", "maskOptions", "max", "length", "min", "transparent", "hsl", "opacity", "replace", "colorSet", "i", "isLight", "theme", "keys", "colorPalette", "values", "slice", "head", "tail", "palette", "colorTheme", "lightColorThemes", "darkColorThemes", "allThemes", "name", "inverseName", "inverseTheme", "colorThemes", "inverseColorThemes", "allColorThemes", "colorName", "inverse", "getAltThemes", "getComponentThemes", "baseSubThemes", "activeTheme", "maskOptionsAlt", "alt1", "alt2", "active", "process", "env", "ACTIVE_THEME_INVERSE", "strength", "_", "subTheme", "componentMaskOptions", "weaker1", "base", "weaker2", "stronger1", "inverse1", "inverse2", "strongerBorderLighterBackground", "overlayTheme", "weaker2WithoutBorder", "ListItem", "Card", "Button", "Checkbox", "DrawerFrame", "SliderTrack", "SliderTrackActive", "SliderThumb", "Progress", "ProgressIndicator", "Switch", "SwitchThumb", "TooltipArrow", "TooltipContent", "Input", "TextArea", "Tooltip", "SheetOverlay", "DialogOverlay", "ModalOverlay", "themes", "nonInheritedValues"]
|
|
6
6
|
}
|
|
@@ -1,23 +1,72 @@
|
|
|
1
|
-
import {
|
|
2
|
-
blue,
|
|
3
|
-
blueDark,
|
|
4
|
-
gray,
|
|
5
|
-
grayDark,
|
|
6
|
-
green,
|
|
7
|
-
greenDark,
|
|
8
|
-
orange,
|
|
9
|
-
orangeDark,
|
|
10
|
-
pink,
|
|
11
|
-
pinkDark,
|
|
12
|
-
purple,
|
|
13
|
-
purpleDark,
|
|
14
|
-
red,
|
|
15
|
-
redDark,
|
|
16
|
-
yellow,
|
|
17
|
-
yellowDark
|
|
18
|
-
} from "@tamagui/colors";
|
|
1
|
+
import { blue, blueDark, gray, grayDark, green, greenDark, orange, orangeDark, pink, pinkDark, purple, purpleDark, red, redDark, yellow, yellowDark } from "@tamagui/colors";
|
|
19
2
|
import { createTokens } from "@tamagui/web";
|
|
20
|
-
|
|
3
|
+
function _array_like_to_array(arr, len) {
|
|
4
|
+
(len == null || len > arr.length) && (len = arr.length);
|
|
5
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
6
|
+
arr2[i] = arr[i];
|
|
7
|
+
return arr2;
|
|
8
|
+
}
|
|
9
|
+
function _array_with_holes(arr) {
|
|
10
|
+
if (Array.isArray(arr))
|
|
11
|
+
return arr;
|
|
12
|
+
}
|
|
13
|
+
function _define_property(obj, key, value) {
|
|
14
|
+
return key in obj ? Object.defineProperty(obj, key, {
|
|
15
|
+
value,
|
|
16
|
+
enumerable: !0,
|
|
17
|
+
configurable: !0,
|
|
18
|
+
writable: !0
|
|
19
|
+
}) : obj[key] = value, obj;
|
|
20
|
+
}
|
|
21
|
+
function _iterable_to_array_limit(arr, i) {
|
|
22
|
+
var _i = arr == null ? null : typeof Symbol < "u" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
23
|
+
if (_i != null) {
|
|
24
|
+
var _arr = [], _n = !0, _d = !1, _s, _e;
|
|
25
|
+
try {
|
|
26
|
+
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done) && (_arr.push(_s.value), !(i && _arr.length === i)); _n = !0)
|
|
27
|
+
;
|
|
28
|
+
} catch (err) {
|
|
29
|
+
_d = !0, _e = err;
|
|
30
|
+
} finally {
|
|
31
|
+
try {
|
|
32
|
+
!_n && _i.return != null && _i.return();
|
|
33
|
+
} finally {
|
|
34
|
+
if (_d)
|
|
35
|
+
throw _e;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return _arr;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
function _non_iterable_rest() {
|
|
42
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
43
|
+
}
|
|
44
|
+
function _object_spread(target) {
|
|
45
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
46
|
+
var source = arguments[i] != null ? arguments[i] : {}, ownKeys = Object.keys(source);
|
|
47
|
+
typeof Object.getOwnPropertySymbols == "function" && (ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
48
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
49
|
+
}))), ownKeys.forEach(function(key) {
|
|
50
|
+
_define_property(target, key, source[key]);
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
return target;
|
|
54
|
+
}
|
|
55
|
+
function _sliced_to_array(arr, i) {
|
|
56
|
+
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
57
|
+
}
|
|
58
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
59
|
+
if (o) {
|
|
60
|
+
if (typeof o == "string")
|
|
61
|
+
return _array_like_to_array(o, minLen);
|
|
62
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
63
|
+
if (n === "Object" && o.constructor && (n = o.constructor.name), n === "Map" || n === "Set")
|
|
64
|
+
return Array.from(n);
|
|
65
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
|
66
|
+
return _array_like_to_array(o, minLen);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
var size = {
|
|
21
70
|
$0: 0,
|
|
22
71
|
"$0.25": 2,
|
|
23
72
|
"$0.5": 4,
|
|
@@ -47,14 +96,23 @@ const size = {
|
|
|
47
96
|
$18: 244,
|
|
48
97
|
$19: 264,
|
|
49
98
|
$20: 284
|
|
50
|
-
}, spaces = Object.entries(size).map((
|
|
99
|
+
}, spaces = Object.entries(size).map(function(param) {
|
|
100
|
+
var _param = _sliced_to_array(param, 2), k = _param[0], v = _param[1];
|
|
101
|
+
return [
|
|
102
|
+
k,
|
|
103
|
+
sizeToSpace(v)
|
|
104
|
+
];
|
|
105
|
+
});
|
|
51
106
|
function sizeToSpace(v) {
|
|
52
107
|
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);
|
|
53
108
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
109
|
+
var spacesNegative = spaces.slice(1).map(function(param) {
|
|
110
|
+
var _param = _sliced_to_array(param, 2), k = _param[0], v = _param[1];
|
|
111
|
+
return [
|
|
112
|
+
"-".concat(k.slice(1)),
|
|
113
|
+
-v
|
|
114
|
+
];
|
|
115
|
+
}), space = _object_spread({}, Object.fromEntries(spaces), Object.fromEntries(spacesNegative)), zIndex = {
|
|
58
116
|
0: 0,
|
|
59
117
|
1: 100,
|
|
60
118
|
2: 200,
|
|
@@ -82,34 +140,17 @@ const spacesNegative = spaces.slice(1).map(([k, v]) => [`-${k.slice(1)}`, -v]),
|
|
|
82
140
|
red: redDark,
|
|
83
141
|
yellow: yellowDark
|
|
84
142
|
}
|
|
85
|
-
}, darkColors = {
|
|
86
|
-
...colorTokens.dark.blue,
|
|
87
|
-
...colorTokens.dark.gray,
|
|
88
|
-
...colorTokens.dark.green,
|
|
89
|
-
...colorTokens.dark.orange,
|
|
90
|
-
...colorTokens.dark.pink,
|
|
91
|
-
...colorTokens.dark.purple,
|
|
92
|
-
...colorTokens.dark.red,
|
|
93
|
-
...colorTokens.dark.yellow
|
|
94
|
-
}, lightColors = {
|
|
95
|
-
...colorTokens.light.blue,
|
|
96
|
-
...colorTokens.light.gray,
|
|
97
|
-
...colorTokens.light.green,
|
|
98
|
-
...colorTokens.light.orange,
|
|
99
|
-
...colorTokens.light.pink,
|
|
100
|
-
...colorTokens.light.purple,
|
|
101
|
-
...colorTokens.light.red,
|
|
102
|
-
...colorTokens.light.yellow
|
|
103
|
-
}, color = {
|
|
104
|
-
...postfixObjKeys(lightColors, "Light"),
|
|
105
|
-
...postfixObjKeys(darkColors, "Dark")
|
|
106
|
-
};
|
|
143
|
+
}, 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"));
|
|
107
144
|
function postfixObjKeys(obj, postfix) {
|
|
108
|
-
return Object.fromEntries(
|
|
109
|
-
|
|
110
|
-
|
|
145
|
+
return Object.fromEntries(Object.entries(obj).map(function(param) {
|
|
146
|
+
var _param = _sliced_to_array(param, 2), k = _param[0], v = _param[1];
|
|
147
|
+
return [
|
|
148
|
+
"".concat(k).concat(postfix),
|
|
149
|
+
v
|
|
150
|
+
];
|
|
151
|
+
}));
|
|
111
152
|
}
|
|
112
|
-
|
|
153
|
+
var radius = {
|
|
113
154
|
0: 0,
|
|
114
155
|
1: 3,
|
|
115
156
|
2: 5,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/tokens.tsx"],
|
|
4
|
-
"mappings": "AAAA
|
|
5
|
-
"names": []
|
|
3
|
+
"sources": ["../../src/Users/n8/tamagui/packages/themes/src/tokens.tsx"],
|
|
4
|
+
"mappings": "AAAA,SACEA,MACAC,UACAC,MACAC,UACAC,OACAC,WACAC,QACAC,YACAC,MACAC,UACAC,QACAC,YACAC,KACAC,SACAC,QACAC,kBACK;AAEP,SAASC,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AActB,IAAMC,OAAO;EAClBC,IAAI;EACJ,SAAS;EACT,QAAQ;EACR,SAAS;EACTC,IAAI;EACJ,QAAQ;EACRC,IAAI;EACJ,QAAQ;EACRC,IAAI;EACJ,QAAQ;EACRC,IAAI;EACJC,OAAO;EACP,QAAQ;EACRC,IAAI;EACJC,IAAI;EACJC,IAAI;EACJC,IAAI;EACJC,IAAI;EACJC,KAAK;EACLC,KAAK;EACLC,KAAK;EACLC,KAAK;EACLC,KAAK;EACLC,KAAK;EACLC,KAAK;EACLC,KAAK;EACLC,KAAK;EACLC,KAAK;EACLC,KAAK;AACP,GAQMC,SAASC,OAAOC,QAAQzB,IAAAA,EAAM0B,IAAI,SAAA,OAAA;2CAAEC,IAAAA,OAAAA,CAAAA,GAAGC,IAAAA,OAAAA,CAAAA;AAC3C,SAAO;IAACD;IAAGE,YAAYD,CAAAA;;AACzB,CAAA;AAGA,SAASC,YAAYD,GAAS;AAC5B,SAAIA,MAAM,IAAU,IAChBA,MAAM,IAAU,MACh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AAA,CAAA;AAGhC,SAASG,eAIPC,KACAC,SAAU;AAIV,SAAOtB,OAAOY,YACZZ,OAAOC,QAAQoB,GAAAA,EAAKnB,IAAI,SAAA,OAAA;6CAAEC,IAAAA,OAAAA,CAAAA,GAAGC,IAAAA,OAAAA,CAAAA;WAAO;MAAE,GAAMkB,OAAJnB,CAAAA,EAAY,OAARmB,OAAAA;MAAWlB;;;AAE3D;AAEO,IAAMmB,SAAS;EACpB,GAAG;EACH,GAAG;EACH,GAAG;EACH,GAAG;EACH,GAAG;EACHC,MAAM;EACN,GAAG;EACH,GAAG;EACH,GAAG;EACH,GAAG;EACH,GAAG;EACH,IAAI;EACJ,IAAI;EACJ,IAAI;AACN,GAEaC,SAASlD,aAAa;EACjC4C;EACAI;EACAV;EACAF;EACAnC;AACF,CAAA;",
|
|
5
|
+
"names": ["blue", "blueDark", "gray", "grayDark", "green", "greenDark", "orange", "orangeDark", "pink", "pinkDark", "purple", "purpleDark", "red", "redDark", "yellow", "yellowDark", "createTokens", "size", "$0", "$1", "$2", "$3", "$4", "$true", "$5", "$6", "$7", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$16", "$17", "$18", "$19", "$20", "spaces", "Object", "entries", "map", "k", "v", "sizeToSpace", "Math", "round", "floor", "spacesNegative", "slice", "space", "fromEntries", "zIndex", "colorTokens", "light", "dark", "darkColors", "lightColors", "color", "postfixObjKeys", "obj", "postfix", "radius", "true", "tokens"]
|
|
6
6
|
}
|