@tamagui/theme-builder 1.135.2 → 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/dist/cjs/ThemeBuilder.native.js +173 -171
- package/dist/cjs/ThemeBuilder.native.js.map +1 -6
- package/dist/cjs/createStudioThemes.native.js +24 -16
- package/dist/cjs/createStudioThemes.native.js.map +1 -6
- package/dist/cjs/createThemes.native.js +170 -177
- package/dist/cjs/createThemes.native.js.map +1 -6
- package/dist/cjs/defaultComponentThemes.native.js +17 -14
- package/dist/cjs/defaultComponentThemes.native.js.map +1 -6
- package/dist/cjs/defaultTemplates.native.js +147 -136
- package/dist/cjs/defaultTemplates.native.js.map +1 -6
- package/dist/cjs/defaultTemplatesStronger.native.js +147 -136
- package/dist/cjs/defaultTemplatesStronger.native.js.map +1 -6
- package/dist/cjs/defaultTemplatesStrongest.native.js +147 -136
- package/dist/cjs/defaultTemplatesStrongest.native.js.map +1 -6
- package/dist/cjs/getThemeSuitePalettes.native.js +62 -66
- package/dist/cjs/getThemeSuitePalettes.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 +25 -25
- package/dist/cjs/index.native.js.map +1 -6
- package/dist/cjs/masks.native.js +103 -94
- package/dist/cjs/masks.native.js.map +1 -6
- package/dist/cjs/types.native.js +9 -5
- package/dist/cjs/types.native.js.map +1 -6
- package/package.json +5 -4
|
@@ -1,147 +1,158 @@
|
|
|
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 defaultTemplates_exports = {};
|
|
17
24
|
__export(defaultTemplates_exports, {
|
|
18
25
|
defaultTemplates: () => defaultTemplates
|
|
19
26
|
});
|
|
20
27
|
module.exports = __toCommonJS(defaultTemplates_exports);
|
|
21
|
-
var import_helpers = require("./helpers"),
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
lightTemplates
|
|
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
|
-
|
|
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
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
28
|
+
var import_helpers = require("./helpers.native.js"),
|
|
29
|
+
getTemplates = function () {
|
|
30
|
+
var lightTemplates = getBaseTemplates("light"),
|
|
31
|
+
darkTemplates = getBaseTemplates("dark"),
|
|
32
|
+
templates = {
|
|
33
|
+
...(0, import_helpers.objectFromEntries)((0, import_helpers.objectKeys)(lightTemplates).map(function (name) {
|
|
34
|
+
return [`light_${name}`, lightTemplates[name]];
|
|
35
|
+
})),
|
|
36
|
+
...(0, import_helpers.objectFromEntries)((0, import_helpers.objectKeys)(darkTemplates).map(function (name) {
|
|
37
|
+
return [`dark_${name}`, darkTemplates[name]];
|
|
38
|
+
}))
|
|
39
|
+
};
|
|
40
|
+
return templates;
|
|
41
|
+
},
|
|
42
|
+
getBaseTemplates = function (scheme) {
|
|
43
|
+
var isLight = scheme === "light",
|
|
44
|
+
bgIndex = 6,
|
|
45
|
+
lighten = isLight ? -1 : 1,
|
|
46
|
+
darken = -lighten,
|
|
47
|
+
borderColor = bgIndex + 3,
|
|
48
|
+
baseColors = {
|
|
49
|
+
color: -bgIndex,
|
|
50
|
+
colorHover: -bgIndex - 1,
|
|
51
|
+
colorPress: -bgIndex,
|
|
52
|
+
colorFocus: -bgIndex - 1,
|
|
53
|
+
placeholderColor: -bgIndex - 3,
|
|
54
|
+
outlineColor: -2
|
|
55
|
+
},
|
|
56
|
+
base = {
|
|
57
|
+
accentBackground: 0,
|
|
58
|
+
accentColor: -0,
|
|
59
|
+
background0: 1,
|
|
60
|
+
background02: 2,
|
|
61
|
+
background04: 3,
|
|
62
|
+
background06: 4,
|
|
63
|
+
background08: 5,
|
|
64
|
+
color1: bgIndex,
|
|
65
|
+
color2: bgIndex + 1,
|
|
66
|
+
color3: bgIndex + 2,
|
|
67
|
+
color4: bgIndex + 3,
|
|
68
|
+
color5: bgIndex + 4,
|
|
69
|
+
color6: bgIndex + 5,
|
|
70
|
+
color7: bgIndex + 6,
|
|
71
|
+
color8: bgIndex + 7,
|
|
72
|
+
color9: bgIndex + 8,
|
|
73
|
+
color10: bgIndex + 9,
|
|
74
|
+
color11: bgIndex + 10,
|
|
75
|
+
color12: bgIndex + 11,
|
|
76
|
+
color0: -1,
|
|
77
|
+
color02: -2,
|
|
78
|
+
color04: -3,
|
|
79
|
+
color06: -4,
|
|
80
|
+
color08: -5,
|
|
81
|
+
// the background, color, etc keys here work like generics - they make it so you
|
|
82
|
+
// can publish components for others to use without mandating a specific color scale
|
|
83
|
+
// the @tamagui/button Button component looks for `$background`, so you set the
|
|
84
|
+
// dark_red_Button theme to have a stronger background than the dark_red theme.
|
|
85
|
+
background: bgIndex,
|
|
86
|
+
backgroundHover: bgIndex + lighten,
|
|
87
|
+
// always lighten on hover no matter the scheme
|
|
88
|
+
backgroundPress: bgIndex + darken,
|
|
89
|
+
// always darken on press no matter the theme
|
|
90
|
+
backgroundFocus: bgIndex + darken,
|
|
91
|
+
borderColor,
|
|
92
|
+
borderColorHover: borderColor + lighten,
|
|
93
|
+
borderColorPress: borderColor + darken,
|
|
94
|
+
borderColorFocus: borderColor,
|
|
95
|
+
...baseColors,
|
|
96
|
+
colorTransparent: -1
|
|
97
|
+
},
|
|
98
|
+
surface1 = {
|
|
99
|
+
...baseColors,
|
|
100
|
+
background: base.background + 1,
|
|
101
|
+
backgroundHover: base.backgroundHover + 1,
|
|
102
|
+
backgroundPress: base.backgroundPress + 1,
|
|
103
|
+
backgroundFocus: base.backgroundFocus + 1,
|
|
104
|
+
borderColor: base.borderColor + 1,
|
|
105
|
+
borderColorHover: base.borderColorHover + 1,
|
|
106
|
+
borderColorFocus: base.borderColorFocus + 1,
|
|
107
|
+
borderColorPress: base.borderColorPress + 1
|
|
108
|
+
},
|
|
109
|
+
surface2 = {
|
|
110
|
+
...baseColors,
|
|
111
|
+
background: base.background + 2,
|
|
112
|
+
backgroundHover: base.backgroundHover + 2,
|
|
113
|
+
backgroundPress: base.backgroundPress + 2,
|
|
114
|
+
backgroundFocus: base.backgroundFocus + 2,
|
|
115
|
+
borderColor: base.borderColor + 2,
|
|
116
|
+
borderColorHover: base.borderColorHover + 2,
|
|
117
|
+
borderColorFocus: base.borderColorFocus + 2,
|
|
118
|
+
borderColorPress: base.borderColorPress + 2
|
|
119
|
+
},
|
|
120
|
+
surface3 = {
|
|
121
|
+
...baseColors,
|
|
122
|
+
background: base.background + 3,
|
|
123
|
+
backgroundHover: base.backgroundHover + 3,
|
|
124
|
+
backgroundPress: base.backgroundPress + 3,
|
|
125
|
+
backgroundFocus: base.backgroundFocus + 3,
|
|
126
|
+
borderColor: base.borderColor + 3,
|
|
127
|
+
borderColorHover: base.borderColorHover + 3,
|
|
128
|
+
borderColorFocus: base.borderColorFocus + 3,
|
|
129
|
+
borderColorPress: base.borderColorPress + 3
|
|
130
|
+
},
|
|
131
|
+
alt1 = {
|
|
132
|
+
color: base.color - 1,
|
|
133
|
+
colorHover: base.colorHover - 1,
|
|
134
|
+
colorPress: base.colorPress - 1,
|
|
135
|
+
colorFocus: base.colorFocus - 1
|
|
136
|
+
},
|
|
137
|
+
alt2 = {
|
|
138
|
+
color: base.color - 2,
|
|
139
|
+
colorHover: base.colorHover - 2,
|
|
140
|
+
colorPress: base.colorPress - 2,
|
|
141
|
+
colorFocus: base.colorFocus - 2
|
|
142
|
+
},
|
|
143
|
+
inverse = Object.fromEntries(Object.entries(base).map(function (param) {
|
|
144
|
+
var [key, index] = param;
|
|
145
|
+
return [key, -index];
|
|
146
|
+
}));
|
|
147
|
+
return {
|
|
148
|
+
base,
|
|
149
|
+
surface1,
|
|
150
|
+
surface2,
|
|
151
|
+
surface3,
|
|
152
|
+
alt1,
|
|
153
|
+
alt2,
|
|
154
|
+
inverse
|
|
155
|
+
};
|
|
156
|
+
},
|
|
157
|
+
defaultTemplates = getTemplates();
|
|
158
|
+
//# sourceMappingURL=defaultTemplates.native.js.map
|
|
@@ -1,6 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/defaultTemplates.ts"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAA8C,sBAC1C,eAAe,WAAW;AAC1B,MAAI,iBAAiB,iBAAiB,OAAO,GACzC,gBAAgB,iBAAiB,MAAM,GACvC,YAAY;AAAA,IACZ,OAAG,sCAAkB,2BAAW,cAAc,EAAE,IAAI,SAAS,MAAM;AAC/D,aAAO;AAAA,QACH,SA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AAAA,IACpB,YAAY,KAAK,aAAa;AAAA,IAC9B,YAAY,KAAK,aAAa;AAAA,IAC9B,YAAY,KAAK,aAAa;AAAA,EAClC,GACI,UAAU,OAAO,YAAY,OAAO,QAAQ,IAAI,EAAE,IAAI,SAAS,OAAO;AACtE,QAAI,CAAC,KAAK,KAAK,IAAI;AACnB,WAAO;AAAA,MACH;AAAA,MACA,CAAC;AAAA,IACL;AAAA,EACJ,CAAC,CAAC;AACF,SAAO;AAAA,IACH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACJ;AACJ,GACW,mBAAmB,aAAa;",
|
|
5
|
-
"names": []
|
|
6
|
-
}
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","defaultTemplates_exports","__export","defaultTemplates","module","exports","import_helpers","require","getTemplates","lightTemplates","getBaseTemplates","darkTemplates","templates","objectFromEntries","objectKeys","map","name","scheme","isLight","bgIndex","lighten","darken","borderColor","baseColors","color","colorHover","colorPress","colorFocus","placeholderColor","outlineColor","base","accentBackground","accentColor","background0","background02","background04","background06","background08","color1","color2","color3","color4","color5","color6","color7","color8","color9","color10","color11","color12","color0","color02","color04","color06","color08","background","backgroundHover","backgroundPress","backgroundFocus","borderColorHover","borderColorPress","borderColorFocus","colorTransparent","surface1","surface2","surface3","alt1","alt2","inverse","Object","fromEntries","entries","param","key","index"],"sources":["../../src/defaultTemplates.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,wBAAA;AAAAC,QAAA,CAAAD,wBAAA;EAAAE,gBAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAT,YAA8C,CAAAK,wBAAA;AAG9C,IAAAK,cAAM,GAAeC,OAAM;EAAAC,YAAA,Y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
|
"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 defaultTemplatesStronger_exports = {};
|
|
17
24
|
__export(defaultTemplatesStronger_exports, {
|
|
18
25
|
defaultTemplatesStronger: () => defaultTemplatesStronger
|
|
19
26
|
});
|
|
20
27
|
module.exports = __toCommonJS(defaultTemplatesStronger_exports);
|
|
21
|
-
var import_helpers = require("./helpers"),
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
lightTemplates
|
|
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
|
-
|
|
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
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
28
|
+
var import_helpers = require("./helpers.native.js"),
|
|
29
|
+
getTemplates = function () {
|
|
30
|
+
var lightTemplates = getBaseTemplates("light"),
|
|
31
|
+
darkTemplates = getBaseTemplates("dark"),
|
|
32
|
+
templates = {
|
|
33
|
+
...(0, import_helpers.objectFromEntries)((0, import_helpers.objectKeys)(lightTemplates).map(function (name) {
|
|
34
|
+
return [`light_${name}`, lightTemplates[name]];
|
|
35
|
+
})),
|
|
36
|
+
...(0, import_helpers.objectFromEntries)((0, import_helpers.objectKeys)(darkTemplates).map(function (name) {
|
|
37
|
+
return [`dark_${name}`, darkTemplates[name]];
|
|
38
|
+
}))
|
|
39
|
+
};
|
|
40
|
+
return templates;
|
|
41
|
+
},
|
|
42
|
+
getBaseTemplates = function (scheme) {
|
|
43
|
+
var isLight = scheme === "light",
|
|
44
|
+
bgIndex = 6,
|
|
45
|
+
lighten = isLight ? -1 : 1,
|
|
46
|
+
darken = -lighten,
|
|
47
|
+
borderColor = bgIndex + 3,
|
|
48
|
+
baseColors = {
|
|
49
|
+
color: -bgIndex,
|
|
50
|
+
colorHover: -bgIndex - 1,
|
|
51
|
+
colorPress: -bgIndex,
|
|
52
|
+
colorFocus: -bgIndex - 1,
|
|
53
|
+
placeholderColor: -bgIndex - 3,
|
|
54
|
+
outlineColor: -2
|
|
55
|
+
},
|
|
56
|
+
base = {
|
|
57
|
+
accentBackground: 0,
|
|
58
|
+
accentColor: -0,
|
|
59
|
+
background0: 1,
|
|
60
|
+
background02: 2,
|
|
61
|
+
background04: 3,
|
|
62
|
+
background06: 4,
|
|
63
|
+
background08: 5,
|
|
64
|
+
color1: bgIndex,
|
|
65
|
+
color2: bgIndex + 1,
|
|
66
|
+
color3: bgIndex + 2,
|
|
67
|
+
color4: bgIndex + 3,
|
|
68
|
+
color5: bgIndex + 4,
|
|
69
|
+
color6: bgIndex + 5,
|
|
70
|
+
color7: bgIndex + 6,
|
|
71
|
+
color8: bgIndex + 7,
|
|
72
|
+
color9: bgIndex + 8,
|
|
73
|
+
color10: bgIndex + 9,
|
|
74
|
+
color11: bgIndex + 10,
|
|
75
|
+
color12: bgIndex + 11,
|
|
76
|
+
color0: -1,
|
|
77
|
+
color02: -2,
|
|
78
|
+
color04: -3,
|
|
79
|
+
color06: -4,
|
|
80
|
+
color08: -5,
|
|
81
|
+
// the background, color, etc keys here work like generics - they make it so you
|
|
82
|
+
// can publish components for others to use without mandating a specific color scale
|
|
83
|
+
// the @tamagui/button Button component looks for `$background`, so you set the
|
|
84
|
+
// dark_red_Button theme to have a stronger background than the dark_red theme.
|
|
85
|
+
background: bgIndex,
|
|
86
|
+
backgroundHover: bgIndex + lighten,
|
|
87
|
+
// always lighten on hover no matter the scheme
|
|
88
|
+
backgroundPress: bgIndex + darken,
|
|
89
|
+
// always darken on press no matter the theme
|
|
90
|
+
backgroundFocus: bgIndex + darken,
|
|
91
|
+
borderColor,
|
|
92
|
+
borderColorHover: borderColor + lighten,
|
|
93
|
+
borderColorPress: borderColor + darken,
|
|
94
|
+
borderColorFocus: borderColor,
|
|
95
|
+
...baseColors,
|
|
96
|
+
colorTransparent: -1
|
|
97
|
+
},
|
|
98
|
+
surface1 = {
|
|
99
|
+
...baseColors,
|
|
100
|
+
background: base.background + 2,
|
|
101
|
+
backgroundHover: base.backgroundHover + 2,
|
|
102
|
+
backgroundPress: base.backgroundPress + 2,
|
|
103
|
+
backgroundFocus: base.backgroundFocus + 2,
|
|
104
|
+
borderColor: base.borderColor + 2,
|
|
105
|
+
borderColorHover: base.borderColorHover + 2,
|
|
106
|
+
borderColorFocus: base.borderColorFocus + 2,
|
|
107
|
+
borderColorPress: base.borderColorPress + 2
|
|
108
|
+
},
|
|
109
|
+
surface2 = {
|
|
110
|
+
...baseColors,
|
|
111
|
+
background: base.background + 3,
|
|
112
|
+
backgroundHover: base.backgroundHover + 3,
|
|
113
|
+
backgroundPress: base.backgroundPress + 3,
|
|
114
|
+
backgroundFocus: base.backgroundFocus + 3,
|
|
115
|
+
borderColor: base.borderColor + 3,
|
|
116
|
+
borderColorHover: base.borderColorHover + 3,
|
|
117
|
+
borderColorFocus: base.borderColorFocus + 3,
|
|
118
|
+
borderColorPress: base.borderColorPress + 3
|
|
119
|
+
},
|
|
120
|
+
surface3 = {
|
|
121
|
+
...baseColors,
|
|
122
|
+
background: base.background + 4,
|
|
123
|
+
backgroundHover: base.backgroundHover + 4,
|
|
124
|
+
backgroundPress: base.backgroundPress + 4,
|
|
125
|
+
backgroundFocus: base.backgroundFocus + 4,
|
|
126
|
+
borderColor: base.borderColor + 4,
|
|
127
|
+
borderColorHover: base.borderColorHover + 4,
|
|
128
|
+
borderColorFocus: base.borderColorFocus + 4,
|
|
129
|
+
borderColorPress: base.borderColorPress + 4
|
|
130
|
+
},
|
|
131
|
+
alt1 = {
|
|
132
|
+
color: base.color - 1,
|
|
133
|
+
colorHover: base.colorHover - 1,
|
|
134
|
+
colorPress: base.colorPress - 1,
|
|
135
|
+
colorFocus: base.colorFocus - 1
|
|
136
|
+
},
|
|
137
|
+
alt2 = {
|
|
138
|
+
color: base.color - 2,
|
|
139
|
+
colorHover: base.colorHover - 2,
|
|
140
|
+
colorPress: base.colorPress - 2,
|
|
141
|
+
colorFocus: base.colorFocus - 2
|
|
142
|
+
},
|
|
143
|
+
inverse = Object.fromEntries(Object.entries(base).map(function (param) {
|
|
144
|
+
var [key, index] = param;
|
|
145
|
+
return [key, -index];
|
|
146
|
+
}));
|
|
147
|
+
return {
|
|
148
|
+
base,
|
|
149
|
+
surface1,
|
|
150
|
+
surface2,
|
|
151
|
+
surface3,
|
|
152
|
+
alt1,
|
|
153
|
+
alt2,
|
|
154
|
+
inverse
|
|
155
|
+
};
|
|
156
|
+
},
|
|
157
|
+
defaultTemplatesStronger = getTemplates();
|
|
158
|
+
//# sourceMappingURL=defaultTemplatesStronger.native.js.map
|