@tamagui/themes 1.74.10 → 1.74.12

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.
@@ -0,0 +1,167 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: !0 });
8
+ }, __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from == "object" || typeof from == "function")
10
+ for (let key of __getOwnPropNames(from))
11
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
15
+ var themes_v2_exports = {};
16
+ __export(themes_v2_exports, {
17
+ themes: () => themes
18
+ });
19
+ module.exports = __toCommonJS(themes_v2_exports);
20
+ var import_theme_builder = require("@tamagui/theme-builder"), import_componentThemeDefinitions = require("./componentThemeDefinitions"), import_masks = require("./masks"), import_palettes = require("./palettes"), import_shadows = require("./shadows"), import_templates = require("./templates"), import_tokens = require("./tokens");
21
+ const colorThemeDefinition = (colorName) => [
22
+ {
23
+ parent: "light",
24
+ palette: colorName,
25
+ template: "colorLight"
26
+ },
27
+ {
28
+ parent: "dark",
29
+ palette: colorName,
30
+ template: "base"
31
+ }
32
+ ], themesBuilder = (0, import_theme_builder.createThemeBuilder)().addPalettes(import_palettes.palettes).addTemplates(import_templates.templates).addMasks(import_masks.masks).addThemes({
33
+ light: {
34
+ template: "base",
35
+ palette: "light",
36
+ nonInheritedValues: {
37
+ ...import_tokens.lightColors,
38
+ ...import_shadows.shadows.light
39
+ }
40
+ },
41
+ dark: {
42
+ template: "base",
43
+ palette: "dark",
44
+ nonInheritedValues: {
45
+ ...import_tokens.darkColors,
46
+ ...import_shadows.shadows.dark
47
+ }
48
+ }
49
+ }).addChildThemes({
50
+ orange: colorThemeDefinition("orange"),
51
+ yellow: colorThemeDefinition("yellow"),
52
+ green: colorThemeDefinition("green"),
53
+ blue: colorThemeDefinition("blue"),
54
+ purple: colorThemeDefinition("purple"),
55
+ pink: colorThemeDefinition("pink"),
56
+ red: colorThemeDefinition("red")
57
+ }).addChildThemes({
58
+ alt1: {
59
+ mask: "soften",
60
+ ...import_templates.maskOptions.alt
61
+ },
62
+ alt2: {
63
+ mask: "soften2Border1",
64
+ ...import_templates.maskOptions.alt
65
+ },
66
+ active: {
67
+ mask: "soften3FlatBorder",
68
+ skip: {
69
+ color: 1
70
+ }
71
+ }
72
+ }).addChildThemes(
73
+ {
74
+ ListItem: [
75
+ {
76
+ parent: "light",
77
+ mask: "strengthen",
78
+ ...import_templates.maskOptions.component
79
+ },
80
+ {
81
+ parent: "dark",
82
+ mask: "identity",
83
+ ...import_templates.maskOptions.component
84
+ }
85
+ ],
86
+ Card: {
87
+ mask: "soften",
88
+ ...import_templates.maskOptions.component
89
+ },
90
+ Button: {
91
+ mask: "soften2Border1",
92
+ ...import_templates.maskOptions.component
93
+ },
94
+ Checkbox: {
95
+ mask: "softenBorder2",
96
+ ...import_templates.maskOptions.component
97
+ },
98
+ Switch: {
99
+ mask: "soften2Border1",
100
+ ...import_templates.maskOptions.component
101
+ },
102
+ SwitchThumb: {
103
+ mask: "inverseStrengthen2",
104
+ ...import_templates.maskOptions.component
105
+ },
106
+ TooltipContent: {
107
+ mask: "soften2Border1",
108
+ ...import_templates.maskOptions.component
109
+ },
110
+ DrawerFrame: {
111
+ mask: "soften",
112
+ ...import_templates.maskOptions.component
113
+ },
114
+ Progress: {
115
+ mask: "soften",
116
+ ...import_templates.maskOptions.component
117
+ },
118
+ RadioGroupItem: {
119
+ mask: "softenBorder2",
120
+ ...import_templates.maskOptions.component
121
+ },
122
+ TooltipArrow: {
123
+ mask: "soften",
124
+ ...import_templates.maskOptions.component
125
+ },
126
+ SliderTrackActive: {
127
+ mask: "inverseSoften",
128
+ ...import_templates.maskOptions.component
129
+ },
130
+ SliderTrack: {
131
+ mask: "soften2Border1",
132
+ ...import_templates.maskOptions.component
133
+ },
134
+ SliderThumb: {
135
+ mask: "inverse",
136
+ ...import_templates.maskOptions.component
137
+ },
138
+ Tooltip: {
139
+ mask: "inverse",
140
+ ...import_templates.maskOptions.component
141
+ },
142
+ ProgressIndicator: {
143
+ mask: "inverse",
144
+ ...import_templates.maskOptions.component
145
+ },
146
+ SheetOverlay: import_componentThemeDefinitions.overlayThemeDefinitions,
147
+ DialogOverlay: import_componentThemeDefinitions.overlayThemeDefinitions,
148
+ ModalOverlay: import_componentThemeDefinitions.overlayThemeDefinitions,
149
+ Input: {
150
+ mask: "softenBorder2",
151
+ ...import_templates.maskOptions.component
152
+ },
153
+ TextArea: {
154
+ mask: "softenBorder2",
155
+ ...import_templates.maskOptions.component
156
+ }
157
+ },
158
+ {
159
+ // to save bundle size but make alt themes not work on components
160
+ // avoidNestingWithin: ['alt1', 'alt2'],
161
+ }
162
+ ), themes = themesBuilder.build();
163
+ // Annotate the CommonJS export names for ESM import in node:
164
+ 0 && (module.exports = {
165
+ themes
166
+ });
167
+ //# sourceMappingURL=themes-v2.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/themes-v2.ts"],
4
+ "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,2BAAmC,mCAEnC,mCAAwC,wCACxC,eAAsB,oBACtB,kBAAyB,uBACzB,iBAAwB,sBACxB,mBAAuC,wBACvC,gBAAwC;AAExC,MAAM,uBAAuB,CAAC,cAAsB;AAAA,EAClD;AAAA,IACE,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,U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",
5
+ "names": []
6
+ }
@@ -0,0 +1,168 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ 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);
16
+ var themes_v2_exports = {};
17
+ __export(themes_v2_exports, {
18
+ themes: () => themes
19
+ });
20
+ module.exports = __toCommonJS(themes_v2_exports);
21
+ var import_theme_builder = require("@tamagui/theme-builder"), import_componentThemeDefinitions = require("./componentThemeDefinitions"), import_masks = require("./masks"), import_palettes = require("./palettes"), import_shadows = require("./shadows"), import_templates = require("./templates"), import_tokens = require("./tokens");
22
+ const colorThemeDefinition = (colorName) => [
23
+ {
24
+ parent: "light",
25
+ palette: colorName,
26
+ template: "colorLight"
27
+ },
28
+ {
29
+ parent: "dark",
30
+ palette: colorName,
31
+ template: "base"
32
+ }
33
+ ], themesBuilder = (0, import_theme_builder.createThemeBuilder)().addPalettes(import_palettes.palettes).addTemplates(import_templates.templates).addMasks(import_masks.masks).addThemes({
34
+ light: {
35
+ template: "base",
36
+ palette: "light",
37
+ nonInheritedValues: {
38
+ ...import_tokens.lightColors,
39
+ ...import_shadows.shadows.light
40
+ }
41
+ },
42
+ dark: {
43
+ template: "base",
44
+ palette: "dark",
45
+ nonInheritedValues: {
46
+ ...import_tokens.darkColors,
47
+ ...import_shadows.shadows.dark
48
+ }
49
+ }
50
+ }).addChildThemes({
51
+ orange: colorThemeDefinition("orange"),
52
+ yellow: colorThemeDefinition("yellow"),
53
+ green: colorThemeDefinition("green"),
54
+ blue: colorThemeDefinition("blue"),
55
+ purple: colorThemeDefinition("purple"),
56
+ pink: colorThemeDefinition("pink"),
57
+ red: colorThemeDefinition("red")
58
+ }).addChildThemes({
59
+ alt1: {
60
+ mask: "soften",
61
+ ...import_templates.maskOptions.alt
62
+ },
63
+ alt2: {
64
+ mask: "soften2Border1",
65
+ ...import_templates.maskOptions.alt
66
+ },
67
+ active: {
68
+ mask: "soften3FlatBorder",
69
+ skip: {
70
+ color: 1
71
+ }
72
+ }
73
+ }).addChildThemes(
74
+ {
75
+ ListItem: [
76
+ {
77
+ parent: "light",
78
+ mask: "strengthen",
79
+ ...import_templates.maskOptions.component
80
+ },
81
+ {
82
+ parent: "dark",
83
+ mask: "identity",
84
+ ...import_templates.maskOptions.component
85
+ }
86
+ ],
87
+ Card: {
88
+ mask: "soften",
89
+ ...import_templates.maskOptions.component
90
+ },
91
+ Button: {
92
+ mask: "soften2Border1",
93
+ ...import_templates.maskOptions.component
94
+ },
95
+ Checkbox: {
96
+ mask: "softenBorder2",
97
+ ...import_templates.maskOptions.component
98
+ },
99
+ Switch: {
100
+ mask: "soften2Border1",
101
+ ...import_templates.maskOptions.component
102
+ },
103
+ SwitchThumb: {
104
+ mask: "inverseStrengthen2",
105
+ ...import_templates.maskOptions.component
106
+ },
107
+ TooltipContent: {
108
+ mask: "soften2Border1",
109
+ ...import_templates.maskOptions.component
110
+ },
111
+ DrawerFrame: {
112
+ mask: "soften",
113
+ ...import_templates.maskOptions.component
114
+ },
115
+ Progress: {
116
+ mask: "soften",
117
+ ...import_templates.maskOptions.component
118
+ },
119
+ RadioGroupItem: {
120
+ mask: "softenBorder2",
121
+ ...import_templates.maskOptions.component
122
+ },
123
+ TooltipArrow: {
124
+ mask: "soften",
125
+ ...import_templates.maskOptions.component
126
+ },
127
+ SliderTrackActive: {
128
+ mask: "inverseSoften",
129
+ ...import_templates.maskOptions.component
130
+ },
131
+ SliderTrack: {
132
+ mask: "soften2Border1",
133
+ ...import_templates.maskOptions.component
134
+ },
135
+ SliderThumb: {
136
+ mask: "inverse",
137
+ ...import_templates.maskOptions.component
138
+ },
139
+ Tooltip: {
140
+ mask: "inverse",
141
+ ...import_templates.maskOptions.component
142
+ },
143
+ ProgressIndicator: {
144
+ mask: "inverse",
145
+ ...import_templates.maskOptions.component
146
+ },
147
+ SheetOverlay: import_componentThemeDefinitions.overlayThemeDefinitions,
148
+ DialogOverlay: import_componentThemeDefinitions.overlayThemeDefinitions,
149
+ ModalOverlay: import_componentThemeDefinitions.overlayThemeDefinitions,
150
+ Input: {
151
+ mask: "softenBorder2",
152
+ ...import_templates.maskOptions.component
153
+ },
154
+ TextArea: {
155
+ mask: "softenBorder2",
156
+ ...import_templates.maskOptions.component
157
+ }
158
+ },
159
+ {
160
+ // to save bundle size but make alt themes not work on components
161
+ // avoidNestingWithin: ['alt1', 'alt2'],
162
+ }
163
+ ), themes = themesBuilder.build();
164
+ // Annotate the CommonJS export names for ESM import in node:
165
+ 0 && (module.exports = {
166
+ themes
167
+ });
168
+ //# sourceMappingURL=themes-v2.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/themes-v2.ts"],
4
+ "mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,2BAAmC,mCAEnC,mCAAwC,wCACxC,eAAsB,oBACtB,kBAAyB,uBACzB,iBAAwB,sBACxB,mBAAuC,wBACvC,gBAAwC;AAExC,MAAM,uBAAuB,CAAC,cAAsB;AAAA,EAClD;AAAA,IACE,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,UAAU;AAAA,EACZ;AACF,GAEM,oBAAgB,yCAAmB,EACtC,YAAY,wBAAQ,EACpB,aAAa,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
+ import { overlayThemeDefinitions } from "./componentThemeDefinitions";
3
+ import { masks } from "./masks";
4
+ import { palettes } from "./palettes";
5
+ import { shadows } from "./shadows";
6
+ import { maskOptions, templates } from "./templates";
7
+ import { darkColors, lightColors } from "./tokens";
8
+ const colorThemeDefinition = (colorName) => [
9
+ {
10
+ parent: "light",
11
+ palette: colorName,
12
+ template: "colorLight"
13
+ },
14
+ {
15
+ parent: "dark",
16
+ palette: colorName,
17
+ template: "base"
18
+ }
19
+ ], themesBuilder = createThemeBuilder().addPalettes(palettes).addTemplates(templates).addMasks(masks).addThemes({
20
+ light: {
21
+ template: "base",
22
+ palette: "light",
23
+ nonInheritedValues: {
24
+ ...lightColors,
25
+ ...shadows.light
26
+ }
27
+ },
28
+ dark: {
29
+ template: "base",
30
+ palette: "dark",
31
+ nonInheritedValues: {
32
+ ...darkColors,
33
+ ...shadows.dark
34
+ }
35
+ }
36
+ }).addChildThemes({
37
+ orange: colorThemeDefinition("orange"),
38
+ yellow: colorThemeDefinition("yellow"),
39
+ green: colorThemeDefinition("green"),
40
+ blue: colorThemeDefinition("blue"),
41
+ purple: colorThemeDefinition("purple"),
42
+ pink: colorThemeDefinition("pink"),
43
+ red: colorThemeDefinition("red")
44
+ }).addChildThemes({
45
+ alt1: {
46
+ mask: "soften",
47
+ ...maskOptions.alt
48
+ },
49
+ alt2: {
50
+ mask: "soften2Border1",
51
+ ...maskOptions.alt
52
+ },
53
+ active: {
54
+ mask: "soften3FlatBorder",
55
+ skip: {
56
+ color: 1
57
+ }
58
+ }
59
+ }).addChildThemes(
60
+ {
61
+ ListItem: [
62
+ {
63
+ parent: "light",
64
+ mask: "strengthen",
65
+ ...maskOptions.component
66
+ },
67
+ {
68
+ parent: "dark",
69
+ mask: "identity",
70
+ ...maskOptions.component
71
+ }
72
+ ],
73
+ Card: {
74
+ mask: "soften",
75
+ ...maskOptions.component
76
+ },
77
+ Button: {
78
+ mask: "soften2Border1",
79
+ ...maskOptions.component
80
+ },
81
+ Checkbox: {
82
+ mask: "softenBorder2",
83
+ ...maskOptions.component
84
+ },
85
+ Switch: {
86
+ mask: "soften2Border1",
87
+ ...maskOptions.component
88
+ },
89
+ SwitchThumb: {
90
+ mask: "inverseStrengthen2",
91
+ ...maskOptions.component
92
+ },
93
+ TooltipContent: {
94
+ mask: "soften2Border1",
95
+ ...maskOptions.component
96
+ },
97
+ DrawerFrame: {
98
+ mask: "soften",
99
+ ...maskOptions.component
100
+ },
101
+ Progress: {
102
+ mask: "soften",
103
+ ...maskOptions.component
104
+ },
105
+ RadioGroupItem: {
106
+ mask: "softenBorder2",
107
+ ...maskOptions.component
108
+ },
109
+ TooltipArrow: {
110
+ mask: "soften",
111
+ ...maskOptions.component
112
+ },
113
+ SliderTrackActive: {
114
+ mask: "inverseSoften",
115
+ ...maskOptions.component
116
+ },
117
+ SliderTrack: {
118
+ mask: "soften2Border1",
119
+ ...maskOptions.component
120
+ },
121
+ SliderThumb: {
122
+ mask: "inverse",
123
+ ...maskOptions.component
124
+ },
125
+ Tooltip: {
126
+ mask: "inverse",
127
+ ...maskOptions.component
128
+ },
129
+ ProgressIndicator: {
130
+ mask: "inverse",
131
+ ...maskOptions.component
132
+ },
133
+ SheetOverlay: overlayThemeDefinitions,
134
+ DialogOverlay: overlayThemeDefinitions,
135
+ ModalOverlay: overlayThemeDefinitions,
136
+ Input: {
137
+ mask: "softenBorder2",
138
+ ...maskOptions.component
139
+ },
140
+ TextArea: {
141
+ mask: "softenBorder2",
142
+ ...maskOptions.component
143
+ }
144
+ },
145
+ {
146
+ // to save bundle size but make alt themes not work on components
147
+ // avoidNestingWithin: ['alt1', 'alt2'],
148
+ }
149
+ ), themes = themesBuilder.build();
150
+ export {
151
+ themes
152
+ };
153
+ //# sourceMappingURL=themes-v2.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/themes-v2.ts"],
4
+ "mappings": "AAAA,SAAS,0BAA0B;AAEnC,SAAS,+BAA+B;AACxC,SAAS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Ae;AAAA,IACf,cAAc;AAAA,IAEd,OAAO;AAAA,MACL,MAAM;AAAA,MACN,GAAG,YAAY;AAAA,IACjB;AAAA,IAEA,UAAU;AAAA,MACR,MAAM;AAAA,MACN,GAAG,YAAY;AAAA,IACjB;AAAA,EACF;AAAA,EACA;AAAA;AAAA;AAAA,EAGA;AACF,GAEW,SAAS,cAAc,MAAM;",
5
+ "names": []
6
+ }
@@ -0,0 +1,153 @@
1
+ import { createThemeBuilder } from "@tamagui/theme-builder";
2
+ import { overlayThemeDefinitions } from "./componentThemeDefinitions";
3
+ import { masks } from "./masks";
4
+ import { palettes } from "./palettes";
5
+ import { shadows } from "./shadows";
6
+ import { maskOptions, templates } from "./templates";
7
+ import { darkColors, lightColors } from "./tokens";
8
+ const colorThemeDefinition = (colorName) => [
9
+ {
10
+ parent: "light",
11
+ palette: colorName,
12
+ template: "colorLight"
13
+ },
14
+ {
15
+ parent: "dark",
16
+ palette: colorName,
17
+ template: "base"
18
+ }
19
+ ], themesBuilder = createThemeBuilder().addPalettes(palettes).addTemplates(templates).addMasks(masks).addThemes({
20
+ light: {
21
+ template: "base",
22
+ palette: "light",
23
+ nonInheritedValues: {
24
+ ...lightColors,
25
+ ...shadows.light
26
+ }
27
+ },
28
+ dark: {
29
+ template: "base",
30
+ palette: "dark",
31
+ nonInheritedValues: {
32
+ ...darkColors,
33
+ ...shadows.dark
34
+ }
35
+ }
36
+ }).addChildThemes({
37
+ orange: colorThemeDefinition("orange"),
38
+ yellow: colorThemeDefinition("yellow"),
39
+ green: colorThemeDefinition("green"),
40
+ blue: colorThemeDefinition("blue"),
41
+ purple: colorThemeDefinition("purple"),
42
+ pink: colorThemeDefinition("pink"),
43
+ red: colorThemeDefinition("red")
44
+ }).addChildThemes({
45
+ alt1: {
46
+ mask: "soften",
47
+ ...maskOptions.alt
48
+ },
49
+ alt2: {
50
+ mask: "soften2Border1",
51
+ ...maskOptions.alt
52
+ },
53
+ active: {
54
+ mask: "soften3FlatBorder",
55
+ skip: {
56
+ color: 1
57
+ }
58
+ }
59
+ }).addChildThemes(
60
+ {
61
+ ListItem: [
62
+ {
63
+ parent: "light",
64
+ mask: "strengthen",
65
+ ...maskOptions.component
66
+ },
67
+ {
68
+ parent: "dark",
69
+ mask: "identity",
70
+ ...maskOptions.component
71
+ }
72
+ ],
73
+ Card: {
74
+ mask: "soften",
75
+ ...maskOptions.component
76
+ },
77
+ Button: {
78
+ mask: "soften2Border1",
79
+ ...maskOptions.component
80
+ },
81
+ Checkbox: {
82
+ mask: "softenBorder2",
83
+ ...maskOptions.component
84
+ },
85
+ Switch: {
86
+ mask: "soften2Border1",
87
+ ...maskOptions.component
88
+ },
89
+ SwitchThumb: {
90
+ mask: "inverseStrengthen2",
91
+ ...maskOptions.component
92
+ },
93
+ TooltipContent: {
94
+ mask: "soften2Border1",
95
+ ...maskOptions.component
96
+ },
97
+ DrawerFrame: {
98
+ mask: "soften",
99
+ ...maskOptions.component
100
+ },
101
+ Progress: {
102
+ mask: "soften",
103
+ ...maskOptions.component
104
+ },
105
+ RadioGroupItem: {
106
+ mask: "softenBorder2",
107
+ ...maskOptions.component
108
+ },
109
+ TooltipArrow: {
110
+ mask: "soften",
111
+ ...maskOptions.component
112
+ },
113
+ SliderTrackActive: {
114
+ mask: "inverseSoften",
115
+ ...maskOptions.component
116
+ },
117
+ SliderTrack: {
118
+ mask: "soften2Border1",
119
+ ...maskOptions.component
120
+ },
121
+ SliderThumb: {
122
+ mask: "inverse",
123
+ ...maskOptions.component
124
+ },
125
+ Tooltip: {
126
+ mask: "inverse",
127
+ ...maskOptions.component
128
+ },
129
+ ProgressIndicator: {
130
+ mask: "inverse",
131
+ ...maskOptions.component
132
+ },
133
+ SheetOverlay: overlayThemeDefinitions,
134
+ DialogOverlay: overlayThemeDefinitions,
135
+ ModalOverlay: overlayThemeDefinitions,
136
+ Input: {
137
+ mask: "softenBorder2",
138
+ ...maskOptions.component
139
+ },
140
+ TextArea: {
141
+ mask: "softenBorder2",
142
+ ...maskOptions.component
143
+ }
144
+ },
145
+ {
146
+ // to save bundle size but make alt themes not work on components
147
+ // avoidNestingWithin: ['alt1', 'alt2'],
148
+ }
149
+ ), themes = themesBuilder.build();
150
+ export {
151
+ themes
152
+ };
153
+ //# sourceMappingURL=themes-v2.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/themes-v2.ts"],
4
+ "mappings": "AAAA,SAAS,0BAA0B;AAEnC,SAAS,+BAA+B;AACxC,SAAS,aAAa;AACtB,SAAS,gBAAgB;AACzB,SAAS,eAAe;AACxB,SAAS,aAAa,iBAAiB;AACvC,SAAS,YAAY,mBAAmB;AAExC,MAAM,uBAAuB,CAAC,cAAsB;AAAA,EAClD;AAAA,IACE,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,UAAU;AAAA,EACZ;AACF,GAEM,gBAAgB,mBAAmB,EACtC,YAAY,QAAQ,EACpB,aAAa,SAAS,EACtB,SAAS,KAAK,EACd,UAAU;AAAA,EACT,OAAO;AAAA,IACL,UAAU;AAAA,IACV,SAAS;AAAA,IACT,oBAAoB;AAAA,MAClB,GAAG;AAAA,MACH,GAAG,QAAQ;AAAA,IACb;AAAA,EACF;AAAA,EACA,MAAM;AAAA,IACJ,UAAU;AAAA,IACV,SAAS;AAAA,IACT,oBAAoB;AAAA,MAClB,GAAG;AAAA,MACH,GAAG,QAAQ;AAAA,IACb;AAAA,EACF;AACF,CAAC,EACA,eAAe;AAAA,EACd,QAAQ,qBAAqB,QAAQ;AAAA,EACrC,QAAQ,qBAAqB,QAAQ;AAAA,EACrC,OAAO,qBAAqB,OAAO;AAAA,EACnC,MAAM,qBAAqB,MAAM;AAAA,EACjC,QAAQ,qBAAqB,QAAQ;AAAA,EACrC,MAAM,qBAAqB,MAAM;AAAA,EACjC,KAAK,qBAAqB,KAAK;AACjC,CAAC,EACA,eAA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AA,IAEA,aAAa;AAAA,MACX,MAAM;AAAA,MACN,GAAG,YAAY;AAAA,IACjB;AAAA,IAEA,aAAa;AAAA,MACX,MAAM;AAAA,MACN,GAAG,YAAY;AAAA,IACjB;AAAA,IAEA,SAAS;AAAA,MACP,MAAM;AAAA,MACN,GAAG,YAAY;AAAA,IACjB;AAAA,IAEA,mBAAmB;AAAA,MACjB,MAAM;AAAA,MACN,GAAG,YAAY;AAAA,IACjB;AAAA,IAEA,cAAc;AAAA,IACd,eAAe;AAAA,IACf,cAAc;AAAA,IAEd,OAAO;AAAA,MACL,MAAM;AAAA,MACN,GAAG,YAAY;AAAA,IACjB;AAAA,IAEA,UAAU;AAAA,MACR,MAAM;AAAA,MACN,GAAG,YAAY;AAAA,IACjB;AAAA,EACF;AAAA,EACA;AAAA;AAAA;AAAA,EAGA;AACF,GAEW,SAAS,cAAc,MAAM;",
5
+ "names": []
6
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/themes",
3
- "version": "1.74.10",
3
+ "version": "1.74.12",
4
4
  "types": "./types/index.d.ts",
5
5
  "main": "dist/cjs",
6
6
  "module": "dist/esm",
@@ -45,14 +45,14 @@
45
45
  }
46
46
  },
47
47
  "dependencies": {
48
- "@tamagui/colors": "1.74.10",
49
- "@tamagui/create-theme": "1.74.10",
50
- "@tamagui/theme-builder": "1.74.10",
51
- "@tamagui/web": "1.74.10"
48
+ "@tamagui/colors": "1.74.12",
49
+ "@tamagui/create-theme": "1.74.12",
50
+ "@tamagui/theme-builder": "1.74.12",
51
+ "@tamagui/web": "1.74.12"
52
52
  },
53
53
  "devDependencies": {
54
- "@tamagui/build": "1.74.10",
55
- "@tamagui/cli": "1.74.10",
54
+ "@tamagui/build": "1.74.12",
55
+ "@tamagui/cli": "1.74.12",
56
56
  "vitest": "^0.34.3"
57
57
  },
58
58
  "publishConfig": {