@tamagui/themes 1.52.5 → 1.52.7
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/generated-new.js.map +1 -1
- package/dist/cjs/templates.js +89 -95
- package/dist/cjs/templates.js.map +2 -2
- package/dist/esm/generated-new.js.map +1 -1
- package/dist/esm/templates.js +89 -95
- package/dist/esm/templates.js.map +2 -2
- package/package.json +6 -6
- package/src/generated-new.ts +1 -1
- package/src/templates.tsx +92 -99
- package/types/componentThemeDefinitions.d.ts +19 -0
- package/types/componentThemeDefinitions.d.ts.map +1 -1
- package/types/templates.d.ts +5 -1
- package/types/templates.d.ts.map +1 -1
- package/types/themes-old.d.ts +4536 -4536
package/dist/cjs/templates.js
CHANGED
|
@@ -23,103 +23,97 @@ __export(templates_exports, {
|
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(templates_exports);
|
|
25
25
|
var import_palettes = require("./palettes");
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
26
|
+
const templateColorsSpecific = {
|
|
27
|
+
color1: 1,
|
|
28
|
+
color2: 2,
|
|
29
|
+
color3: 3,
|
|
30
|
+
color4: 4,
|
|
31
|
+
color5: 5,
|
|
32
|
+
color6: 6,
|
|
33
|
+
color7: 7,
|
|
34
|
+
color8: 8,
|
|
35
|
+
color9: 9,
|
|
36
|
+
color10: 10,
|
|
37
|
+
color11: 11,
|
|
38
|
+
color12: 12
|
|
39
|
+
};
|
|
40
|
+
const template = {
|
|
41
|
+
...templateColorsSpecific,
|
|
42
|
+
// the background, color, etc keys here work like generics - they make it so you
|
|
43
|
+
// can publish components for others to use without mandating a specific color scale
|
|
44
|
+
// the @tamagui/button Button component looks for `$background`, so you set the
|
|
45
|
+
// dark_red_Button theme to have a stronger background than the dark_red theme.
|
|
46
|
+
background: 2,
|
|
47
|
+
backgroundHover: 3,
|
|
48
|
+
backgroundPress: 4,
|
|
49
|
+
backgroundFocus: 5,
|
|
50
|
+
backgroundStrong: 1,
|
|
51
|
+
backgroundTransparent: 0,
|
|
52
|
+
color: -1,
|
|
53
|
+
colorHover: -2,
|
|
54
|
+
colorPress: -1,
|
|
55
|
+
colorFocus: -2,
|
|
56
|
+
colorTransparent: -0,
|
|
57
|
+
borderColor: 5,
|
|
58
|
+
borderColorHover: 6,
|
|
59
|
+
borderColorFocus: 4,
|
|
60
|
+
borderColorPress: 5,
|
|
61
|
+
placeholderColor: -4
|
|
62
|
+
};
|
|
63
|
+
const templates = {
|
|
64
|
+
base: template,
|
|
65
|
+
colorLight: {
|
|
66
|
+
...template,
|
|
67
|
+
// light color themes are a bit less sensitive
|
|
68
|
+
borderColor: 4,
|
|
69
|
+
borderColorHover: 5,
|
|
60
70
|
borderColorFocus: 4,
|
|
61
|
-
borderColorPress:
|
|
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
|
-
skip: skipShadowsAndSpecificColors
|
|
104
|
-
},
|
|
105
|
-
alt: {
|
|
106
|
-
...baseMaskOptions
|
|
71
|
+
borderColorPress: 4
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
const shadows = {
|
|
75
|
+
shadowColor: 0,
|
|
76
|
+
shadowColorHover: 0,
|
|
77
|
+
shadowColorPress: 0,
|
|
78
|
+
shadowColorFocus: 0
|
|
79
|
+
};
|
|
80
|
+
const colors = {
|
|
81
|
+
...shadows,
|
|
82
|
+
color: 0,
|
|
83
|
+
colorHover: 0,
|
|
84
|
+
colorFocus: 0,
|
|
85
|
+
colorPress: 0
|
|
86
|
+
};
|
|
87
|
+
const baseMaskOptions = {
|
|
88
|
+
override: shadows,
|
|
89
|
+
skip: shadows,
|
|
90
|
+
// avoids the transparent ends
|
|
91
|
+
max: import_palettes.palettes.light.length - 2,
|
|
92
|
+
min: 1
|
|
93
|
+
};
|
|
94
|
+
const skipShadowsAndSpecificColors = {
|
|
95
|
+
...shadows,
|
|
96
|
+
...templateColorsSpecific
|
|
97
|
+
};
|
|
98
|
+
const maskOptions = {
|
|
99
|
+
component: {
|
|
100
|
+
...baseMaskOptions,
|
|
101
|
+
override: colors,
|
|
102
|
+
skip: skipShadowsAndSpecificColors
|
|
103
|
+
},
|
|
104
|
+
alt: {
|
|
105
|
+
...baseMaskOptions
|
|
106
|
+
},
|
|
107
|
+
button: {
|
|
108
|
+
...baseMaskOptions,
|
|
109
|
+
override: {
|
|
110
|
+
...colors,
|
|
111
|
+
borderColor: "transparent",
|
|
112
|
+
borderColorHover: "transparent"
|
|
107
113
|
},
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
...overrideWithColors,
|
|
112
|
-
borderColor: "transparent",
|
|
113
|
-
borderColorHover: "transparent"
|
|
114
|
-
},
|
|
115
|
-
skip: skipShadowsAndSpecificColors
|
|
116
|
-
}
|
|
117
|
-
};
|
|
118
|
-
return {
|
|
119
|
-
templates: templates2,
|
|
120
|
-
maskOptions: maskOptions2
|
|
121
|
-
};
|
|
122
|
-
})();
|
|
114
|
+
skip: skipShadowsAndSpecificColors
|
|
115
|
+
}
|
|
116
|
+
};
|
|
123
117
|
// Annotate the CommonJS export names for ESM import in node:
|
|
124
118
|
0 && (module.exports = {
|
|
125
119
|
maskOptions,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/templates.tsx"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,sBAAyB;
|
|
5
|
-
"names": [
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,sBAAyB;AAEzB,MAAM,yBAAyB;AAAA,EAC7B,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AACX;AAIA,MAAM,WAAW;AAAA,EACf,GAAG;AAAA;AAAA;AAAA;AAAA;AAAA,EAKH,YAAY;AAAA,EACZ,iBAAiB;AAAA,EACjB,iBAAiB;AAAA,EACjB,iBAAiB;AAAA,EACjB,kBAAkB;AAAA,EAClB,uBAAuB;AAAA,EACvB,OAAO;AAAA,EACP,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,kBAAkB;AAAA,EAClB,aAAa;AAAA,EACb,kBAAkB;AAAA,EAClB,kBAAkB;AAAA,EAClB,kB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