@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.
@@ -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
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: !0 });
9
- }, __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from == "object" || typeof from == "function")
11
- for (let key of __getOwnPropNames(from))
12
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
- return to;
14
- };
15
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
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"), getTemplates = function() {
22
- var lightTemplates = getBaseTemplates("light"), darkTemplates = getBaseTemplates("dark"), templates = {
23
- ...(0, import_helpers.objectFromEntries)((0, import_helpers.objectKeys)(lightTemplates).map(function(name) {
24
- return [
25
- `light_${name}`,
26
- lightTemplates[name]
27
- ];
28
- })),
29
- ...(0, import_helpers.objectFromEntries)((0, import_helpers.objectKeys)(darkTemplates).map(function(name) {
30
- return [
31
- `dark_${name}`,
32
- darkTemplates[name]
33
- ];
34
- }))
35
- };
36
- return templates;
37
- }, getBaseTemplates = function(scheme) {
38
- var isLight = scheme === "light", bgIndex = 6, lighten = isLight ? -1 : 1, darken = -lighten, borderColor = bgIndex + 3, baseColors = {
39
- color: -bgIndex,
40
- colorHover: -bgIndex - 1,
41
- colorPress: -bgIndex,
42
- colorFocus: -bgIndex - 1,
43
- placeholderColor: -bgIndex - 3,
44
- outlineColor: -2
45
- }, base = {
46
- accentBackground: 0,
47
- accentColor: -0,
48
- background0: 1,
49
- background02: 2,
50
- background04: 3,
51
- background06: 4,
52
- background08: 5,
53
- color1: bgIndex,
54
- color2: bgIndex + 1,
55
- color3: bgIndex + 2,
56
- color4: bgIndex + 3,
57
- color5: bgIndex + 4,
58
- color6: bgIndex + 5,
59
- color7: bgIndex + 6,
60
- color8: bgIndex + 7,
61
- color9: bgIndex + 8,
62
- color10: bgIndex + 9,
63
- color11: bgIndex + 10,
64
- color12: bgIndex + 11,
65
- color0: -1,
66
- color02: -2,
67
- color04: -3,
68
- color06: -4,
69
- color08: -5,
70
- // the background, color, etc keys here work like generics - they make it so you
71
- // can publish components for others to use without mandating a specific color scale
72
- // the @tamagui/button Button component looks for `$background`, so you set the
73
- // dark_red_Button theme to have a stronger background than the dark_red theme.
74
- background: bgIndex,
75
- backgroundHover: bgIndex + lighten,
76
- // always lighten on hover no matter the scheme
77
- backgroundPress: bgIndex + darken,
78
- // always darken on press no matter the theme
79
- backgroundFocus: bgIndex + darken,
80
- borderColor,
81
- borderColorHover: borderColor + lighten,
82
- borderColorPress: borderColor + darken,
83
- borderColorFocus: borderColor,
84
- ...baseColors,
85
- colorTransparent: -1
86
- }, surface1 = {
87
- ...baseColors,
88
- background: base.background + 1,
89
- backgroundHover: base.backgroundHover + 1,
90
- backgroundPress: base.backgroundPress + 1,
91
- backgroundFocus: base.backgroundFocus + 1,
92
- borderColor: base.borderColor + 1,
93
- borderColorHover: base.borderColorHover + 1,
94
- borderColorFocus: base.borderColorFocus + 1,
95
- borderColorPress: base.borderColorPress + 1
96
- }, surface2 = {
97
- ...baseColors,
98
- background: base.background + 2,
99
- backgroundHover: base.backgroundHover + 2,
100
- backgroundPress: base.backgroundPress + 2,
101
- backgroundFocus: base.backgroundFocus + 2,
102
- borderColor: base.borderColor + 2,
103
- borderColorHover: base.borderColorHover + 2,
104
- borderColorFocus: base.borderColorFocus + 2,
105
- borderColorPress: base.borderColorPress + 2
106
- }, surface3 = {
107
- ...baseColors,
108
- background: base.background + 3,
109
- backgroundHover: base.backgroundHover + 3,
110
- backgroundPress: base.backgroundPress + 3,
111
- backgroundFocus: base.backgroundFocus + 3,
112
- borderColor: base.borderColor + 3,
113
- borderColorHover: base.borderColorHover + 3,
114
- borderColorFocus: base.borderColorFocus + 3,
115
- borderColorPress: base.borderColorPress + 3
116
- }, alt1 = {
117
- color: base.color - 1,
118
- colorHover: base.colorHover - 1,
119
- colorPress: base.colorPress - 1,
120
- colorFocus: base.colorFocus - 1
121
- }, alt2 = {
122
- color: base.color - 2,
123
- colorHover: base.colorHover - 2,
124
- colorPress: base.colorPress - 2,
125
- colorFocus: base.colorFocus - 2
126
- }, inverse = Object.fromEntries(Object.entries(base).map(function(param) {
127
- var [key, index] = param;
128
- return [
129
- key,
130
- -index
131
- ];
132
- }));
133
- return {
134
- base,
135
- surface1,
136
- surface2,
137
- surface3,
138
- alt1,
139
- alt2,
140
- inverse
141
- };
142
- }, defaultTemplates = getTemplates();
143
- // Annotate the CommonJS export names for ESM import in node:
144
- 0 && (module.exports = {
145
- defaultTemplates
146
- });
147
- //# sourceMappingURL=defaultTemplates.js.map
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,SAAS,IAAI;AAAA,QACb,eAAe,IAAI;AAAA,MACvB;AAAA,IACJ,CAAC,CAAC;AAAA,IACF,OAAG,sCAAkB,2BAAW,aAAa,EAAE,IAAI,SAAS,MAAM;AAC9D,aAAO;AAAA,QACH,QAAQ,IAAI;AAAA,QACZ,cAAc,IAAI;AAAA,MACtB;AAAA,IACJ,CAAC,CAAC;AAAA,EACN;AACA,SAAO;AACX,GACI,mBAAmB,SAAS,QAAQ;AACpC,MAAI,UAAU,WAAW,SAGrB,UAAU,GACV,UAAU,UAAU,KAAK,GACzB,SAAS,CAAC,SACV,cAAc,UAAU,GACxB,aAAa;AAAA,IACb,OAAO,CAAC;AAAA,IACR,YAAY,CAAC,UAAU;AAAA,IACvB,YAAY,CAAC;AAAA,IACb,YAAY,CAAC,UAAU;AAAA,IACvB,kBAAkB,CAAC,UAAU;AAAA,IAC7B,cAAc;AAAA,EAClB,GAGI,OAAO;AAAA,IACP,kBAAkB;AAAA,IAClB,aAAa;AAAA,IACb,aAAa;AAAA,IACb,cAAc;AAAA,IACd,cAAc;AAAA,IACd,cAAc;AAAA,IACd,cAAc;AAAA,IACd,QAAQ;AAAA,IACR,QAAQ,UAAU;AAAA,IAClB,QAAQ,UAAU;AAAA,IAClB,QAAQ,UAAU;AAAA,IAClB,QAAQ,UAAU;A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,KAAK,kBAAkB;AAAA,IACxC,iBAAiB,KAAK,kBAAkB;AAAA,IACxC,iBAAiB,KAAK,kBAAkB;AAAA,IACxC,aAAa,KAAK,cAAc;AAAA,IAChC,kBAAkB,KAAK,mBAAmB;AAAA,IAC1C,kBAAkB,KAAK,mBAAmB;AAAA,IAC1C,kBAAkB,KAAK,mBAAmB;AAAA,EAC9C,GACI,OAAO;AAAA,IACP,OAAO,KAAK,QAAQ;AAAA,IACpB,YAAY,KAAK,aAAa;AAAA,IAC9B,YAAY,KAAK,aAAa;AAAA,IAC9B,YAAY,KAAK,aAAa;AAAA,EAClC,GACI,OAAO;AAAA,IACP,OAAO,KAAK,QAAQ;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,YAAAA,CAAA;IACzB,IAAAC,cAAM,GAAAC,gBAAiB,QAAiB;MAAOC,aACzC,GAAAD,gBAAgB,OAAiB;MAAME,SAAA;QAa7C,KAZkB,EAAAN,cAAA,CAAAO,iBAAA,MAAAP,cAAA,CAAAQ,UAAA,EAAAL,cAAA,EAAAM,GAAA,WAAAC,IAAA;UAChB,OAAG,UACDA,IAAA,IACEP,cAAW,CAAAO,IAAA,CAAS,CACtB;QACF;QACA,OAAGV,cAAA,CAAAO,iBAAA,MAAAP,cAAA,CAAAQ,UAAA,EAAAH,aAAA,EAAAI,GAAA,WAAAC,IAAA;UAAA,OACD,CACE,QAACA,IAAU,IACbL,aAAA,CAAAK,IAAA,EACF;QACF;MAEF,CAEM;IACJ,OAAMJ,SAAU;EASG;EAAAF,gBACT,YAAAA,CAAAO,MAAA;IAAA,IACRC,OAAA,GAAYD,MAAC,KAAU;MAAAE,OAAA;MAAAC,OAAA,GAAAF,OAAA;MAAAG,MAAA,IAAAD,OAAA;MAAAE,WAAA,GAAAH,OAAA;MAAAI,UAAA;QACvBC,KAAA,GAAAL,OAAa;QACbM,UAAA,EAAY,CAACN,OAAA,GAAU;QACvBO,UAAA,GAAAP,OAAmB;QACnBQ,UAAA,GAAAR,OAAc;QAChBS,gBAIa,GAAAT,OAAA;QACXU,YAAA;MAAkB;MAClBC,IAAA;Q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GAAa;QAChCC,UAEM,EAAUI,IAAA,CAAAJ,UAAO;QACrBC,UAAO,EAAAG,IAAQ,CAAAH,UAAY;MAG7B;MAAAyC,OAAA,GAAAC,MAAA,CAAAC,WAAA,CAAAD,MAAA,CAAAE,OAAA,CAAAzC,IAAA,EAAAf,GAAA,WAAAyD,KAAA;QAEA,KAAOC,GAAA,EAAAC,KAAA,IAAAF,KAAA;QACL,QACAC,GAAA,EACA,CAAAC,KAAA,CACA;MAAA,EACA;IAAA,OACA;MACA5C,IAAA;MACFiC,QAAA;MAGWC,QAAA","ignoreList":[]}
@@ -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
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: !0 });
9
- }, __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from == "object" || typeof from == "function")
11
- for (let key of __getOwnPropNames(from))
12
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
- return to;
14
- };
15
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
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"), getTemplates = function() {
22
- var lightTemplates = getBaseTemplates("light"), darkTemplates = getBaseTemplates("dark"), templates = {
23
- ...(0, import_helpers.objectFromEntries)((0, import_helpers.objectKeys)(lightTemplates).map(function(name) {
24
- return [
25
- `light_${name}`,
26
- lightTemplates[name]
27
- ];
28
- })),
29
- ...(0, import_helpers.objectFromEntries)((0, import_helpers.objectKeys)(darkTemplates).map(function(name) {
30
- return [
31
- `dark_${name}`,
32
- darkTemplates[name]
33
- ];
34
- }))
35
- };
36
- return templates;
37
- }, getBaseTemplates = function(scheme) {
38
- var isLight = scheme === "light", bgIndex = 6, lighten = isLight ? -1 : 1, darken = -lighten, borderColor = bgIndex + 3, baseColors = {
39
- color: -bgIndex,
40
- colorHover: -bgIndex - 1,
41
- colorPress: -bgIndex,
42
- colorFocus: -bgIndex - 1,
43
- placeholderColor: -bgIndex - 3,
44
- outlineColor: -2
45
- }, base = {
46
- accentBackground: 0,
47
- accentColor: -0,
48
- background0: 1,
49
- background02: 2,
50
- background04: 3,
51
- background06: 4,
52
- background08: 5,
53
- color1: bgIndex,
54
- color2: bgIndex + 1,
55
- color3: bgIndex + 2,
56
- color4: bgIndex + 3,
57
- color5: bgIndex + 4,
58
- color6: bgIndex + 5,
59
- color7: bgIndex + 6,
60
- color8: bgIndex + 7,
61
- color9: bgIndex + 8,
62
- color10: bgIndex + 9,
63
- color11: bgIndex + 10,
64
- color12: bgIndex + 11,
65
- color0: -1,
66
- color02: -2,
67
- color04: -3,
68
- color06: -4,
69
- color08: -5,
70
- // the background, color, etc keys here work like generics - they make it so you
71
- // can publish components for others to use without mandating a specific color scale
72
- // the @tamagui/button Button component looks for `$background`, so you set the
73
- // dark_red_Button theme to have a stronger background than the dark_red theme.
74
- background: bgIndex,
75
- backgroundHover: bgIndex + lighten,
76
- // always lighten on hover no matter the scheme
77
- backgroundPress: bgIndex + darken,
78
- // always darken on press no matter the theme
79
- backgroundFocus: bgIndex + darken,
80
- borderColor,
81
- borderColorHover: borderColor + lighten,
82
- borderColorPress: borderColor + darken,
83
- borderColorFocus: borderColor,
84
- ...baseColors,
85
- colorTransparent: -1
86
- }, surface1 = {
87
- ...baseColors,
88
- background: base.background + 2,
89
- backgroundHover: base.backgroundHover + 2,
90
- backgroundPress: base.backgroundPress + 2,
91
- backgroundFocus: base.backgroundFocus + 2,
92
- borderColor: base.borderColor + 2,
93
- borderColorHover: base.borderColorHover + 2,
94
- borderColorFocus: base.borderColorFocus + 2,
95
- borderColorPress: base.borderColorPress + 2
96
- }, surface2 = {
97
- ...baseColors,
98
- background: base.background + 3,
99
- backgroundHover: base.backgroundHover + 3,
100
- backgroundPress: base.backgroundPress + 3,
101
- backgroundFocus: base.backgroundFocus + 3,
102
- borderColor: base.borderColor + 3,
103
- borderColorHover: base.borderColorHover + 3,
104
- borderColorFocus: base.borderColorFocus + 3,
105
- borderColorPress: base.borderColorPress + 3
106
- }, surface3 = {
107
- ...baseColors,
108
- background: base.background + 4,
109
- backgroundHover: base.backgroundHover + 4,
110
- backgroundPress: base.backgroundPress + 4,
111
- backgroundFocus: base.backgroundFocus + 4,
112
- borderColor: base.borderColor + 4,
113
- borderColorHover: base.borderColorHover + 4,
114
- borderColorFocus: base.borderColorFocus + 4,
115
- borderColorPress: base.borderColorPress + 4
116
- }, alt1 = {
117
- color: base.color - 1,
118
- colorHover: base.colorHover - 1,
119
- colorPress: base.colorPress - 1,
120
- colorFocus: base.colorFocus - 1
121
- }, alt2 = {
122
- color: base.color - 2,
123
- colorHover: base.colorHover - 2,
124
- colorPress: base.colorPress - 2,
125
- colorFocus: base.colorFocus - 2
126
- }, inverse = Object.fromEntries(Object.entries(base).map(function(param) {
127
- var [key, index] = param;
128
- return [
129
- key,
130
- -index
131
- ];
132
- }));
133
- return {
134
- base,
135
- surface1,
136
- surface2,
137
- surface3,
138
- alt1,
139
- alt2,
140
- inverse
141
- };
142
- }, defaultTemplatesStronger = getTemplates();
143
- // Annotate the CommonJS export names for ESM import in node:
144
- 0 && (module.exports = {
145
- defaultTemplatesStronger
146
- });
147
- //# sourceMappingURL=defaultTemplatesStronger.js.map
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