@tamagui/themes 1.50.3 → 1.52.0

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,179 @@
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: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var themes_v2_exports = {};
20
+ __export(themes_v2_exports, {
21
+ themes: () => themes
22
+ });
23
+ module.exports = __toCommonJS(themes_v2_exports);
24
+ var import_theme_builder = require("@tamagui/theme-builder");
25
+ var import_componentThemeDefinitions = require("./componentThemeDefinitions");
26
+ var import_masks = require("./masks");
27
+ var import_palettes = require("./palettes");
28
+ var import_shadows = require("./shadows");
29
+ var import_templates = require("./templates");
30
+ var import_tokens = require("./tokens");
31
+ const colorThemeDefinition = (colorName) => [
32
+ {
33
+ parent: "light",
34
+ palette: colorName,
35
+ template: "colorLight"
36
+ },
37
+ {
38
+ parent: "dark",
39
+ palette: colorName,
40
+ template: "base"
41
+ }
42
+ ];
43
+ const themesBuilder = (0, import_theme_builder.createThemeBuilder)().addPalettes(import_palettes.palettes).addTemplates(import_templates.templates).addMasks(import_masks.masks).addThemes({
44
+ light: {
45
+ template: "base",
46
+ palette: "light",
47
+ nonInheritedValues: {
48
+ ...import_tokens.lightColors,
49
+ ...import_shadows.shadows.light
50
+ }
51
+ },
52
+ dark: {
53
+ template: "base",
54
+ palette: "dark",
55
+ nonInheritedValues: {
56
+ ...import_tokens.darkColors,
57
+ ...import_shadows.shadows.dark
58
+ }
59
+ }
60
+ }).addChildThemes({
61
+ orange: colorThemeDefinition("orange"),
62
+ yellow: colorThemeDefinition("yellow"),
63
+ green: colorThemeDefinition("green"),
64
+ blue: colorThemeDefinition("blue"),
65
+ purple: colorThemeDefinition("purple"),
66
+ pink: colorThemeDefinition("pink"),
67
+ red: colorThemeDefinition("red")
68
+ }).addChildThemes({
69
+ alt1: {
70
+ mask: "soften",
71
+ ...import_templates.maskOptions.alt
72
+ },
73
+ alt2: {
74
+ mask: "soften2Border1",
75
+ ...import_templates.maskOptions.alt
76
+ },
77
+ active: {
78
+ mask: "soften3FlatBorder",
79
+ skip: {
80
+ color: 1
81
+ }
82
+ }
83
+ }).addChildThemes(
84
+ {
85
+ ListItem: [
86
+ {
87
+ parent: "light",
88
+ mask: "strengthen",
89
+ ...import_templates.maskOptions.component
90
+ },
91
+ {
92
+ parent: "dark",
93
+ mask: "identity",
94
+ ...import_templates.maskOptions.component
95
+ }
96
+ ],
97
+ Card: {
98
+ mask: "soften",
99
+ ...import_templates.maskOptions.component
100
+ },
101
+ Button: {
102
+ mask: "soften2Border1",
103
+ ...import_templates.maskOptions.component
104
+ },
105
+ Checkbox: {
106
+ mask: "softenBorder2",
107
+ ...import_templates.maskOptions.component
108
+ },
109
+ Switch: {
110
+ mask: "soften2Border1",
111
+ ...import_templates.maskOptions.component
112
+ },
113
+ SwitchThumb: {
114
+ mask: "inverseStrengthen2",
115
+ ...import_templates.maskOptions.component
116
+ },
117
+ TooltipContent: {
118
+ mask: "soften2Border1",
119
+ ...import_templates.maskOptions.component
120
+ },
121
+ DrawerFrame: {
122
+ mask: "soften",
123
+ ...import_templates.maskOptions.component
124
+ },
125
+ Progress: {
126
+ mask: "soften",
127
+ ...import_templates.maskOptions.component
128
+ },
129
+ RadioGroupItem: {
130
+ mask: "softenBorder2",
131
+ ...import_templates.maskOptions.component
132
+ },
133
+ TooltipArrow: {
134
+ mask: "soften",
135
+ ...import_templates.maskOptions.component
136
+ },
137
+ SliderTrackActive: {
138
+ mask: "inverseSoften",
139
+ ...import_templates.maskOptions.component
140
+ },
141
+ SliderTrack: {
142
+ mask: "soften2Border1",
143
+ ...import_templates.maskOptions.component
144
+ },
145
+ SliderThumb: {
146
+ mask: "inverse",
147
+ ...import_templates.maskOptions.component
148
+ },
149
+ Tooltip: {
150
+ mask: "inverse",
151
+ ...import_templates.maskOptions.component
152
+ },
153
+ ProgressIndicator: {
154
+ mask: "inverse",
155
+ ...import_templates.maskOptions.component
156
+ },
157
+ SheetOverlay: import_componentThemeDefinitions.overlayThemeDefinitions,
158
+ DialogOverlay: import_componentThemeDefinitions.overlayThemeDefinitions,
159
+ ModalOverlay: import_componentThemeDefinitions.overlayThemeDefinitions,
160
+ Input: {
161
+ mask: "softenBorder2",
162
+ ...import_templates.maskOptions.component
163
+ },
164
+ TextArea: {
165
+ mask: "softenBorder2",
166
+ ...import_templates.maskOptions.component
167
+ }
168
+ },
169
+ {
170
+ // to save bundle size but make alt themes not work on components
171
+ // avoidNestingWithin: ['alt1', 'alt2'],
172
+ }
173
+ );
174
+ const themes = themesBuilder.build();
175
+ // Annotate the CommonJS export names for ESM import in node:
176
+ 0 && (module.exports = {
177
+ themes
178
+ });
179
+ //# 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;AAEnC,uCAAwC;AACxC,mBAAsB;AACtB,sBAAyB;AACzB,qBAAwB;AACxB,uBAAuC;AACvC,oBAAwC;AAExC,MAAM,uBAAuB,CAAC,cAAsB;AAAA,EAClD;AAAA,IACE,QAAQ;AAAA,IACR,SAAS;AAAA,IAC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AA,IACjB;AAAA,EACF;AAAA,EACA;AAAA;AAAA;AAAA,EAGA;AACF;AAEK,MAAM,SAAS,cAAc,MAAM;",
5
+ "names": []
6
+ }
package/dist/cjs/v2.js ADDED
@@ -0,0 +1,92 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
21
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
+ // If the importer is in node compatibility mode or this is not an ESM
23
+ // file that has been converted to a CommonJS file using a Babel-
24
+ // compatible transform (i.e. "__esModule" has not been set), then set
25
+ // "default" to the CommonJS "module.exports" for node compatibility.
26
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
+ mod
28
+ ));
29
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
+ var v2_exports = {};
31
+ __export(v2_exports, {
32
+ blue: () => import_colors.blue,
33
+ blueDark: () => import_colors.blueDark,
34
+ gray: () => import_colors8.gray,
35
+ grayDark: () => import_colors8.grayDark,
36
+ green: () => import_colors2.green,
37
+ greenDark: () => import_colors2.greenDark,
38
+ orange: () => import_colors4.orange,
39
+ orangeDark: () => import_colors4.orangeDark,
40
+ pink: () => import_colors6.pink,
41
+ pinkDark: () => import_colors6.pinkDark,
42
+ purple: () => import_colors7.purple,
43
+ purpleDark: () => import_colors7.purpleDark,
44
+ red: () => import_colors3.red,
45
+ redDark: () => import_colors3.redDark,
46
+ themes: () => themes,
47
+ yellow: () => import_colors5.yellow,
48
+ yellowDark: () => import_colors5.yellowDark
49
+ });
50
+ module.exports = __toCommonJS(v2_exports);
51
+ var themes = __toESM(require("./generated-v2"));
52
+ __reExport(v2_exports, require("./tokens"), module.exports);
53
+ __reExport(v2_exports, require("./masks"), module.exports);
54
+ __reExport(v2_exports, require("./componentThemeDefinitions"), module.exports);
55
+ __reExport(v2_exports, require("./palettes"), module.exports);
56
+ __reExport(v2_exports, require("./templates"), module.exports);
57
+ __reExport(v2_exports, require("./shadows"), module.exports);
58
+ var import_colors = require("@tamagui/colors");
59
+ var import_colors2 = require("@tamagui/colors");
60
+ var import_colors3 = require("@tamagui/colors");
61
+ var import_colors4 = require("@tamagui/colors");
62
+ var import_colors5 = require("@tamagui/colors");
63
+ var import_colors6 = require("@tamagui/colors");
64
+ var import_colors7 = require("@tamagui/colors");
65
+ var import_colors8 = require("@tamagui/colors");
66
+ // Annotate the CommonJS export names for ESM import in node:
67
+ 0 && (module.exports = {
68
+ blue,
69
+ blueDark,
70
+ gray,
71
+ grayDark,
72
+ green,
73
+ greenDark,
74
+ orange,
75
+ orangeDark,
76
+ pink,
77
+ pinkDark,
78
+ purple,
79
+ purpleDark,
80
+ red,
81
+ redDark,
82
+ themes,
83
+ yellow,
84
+ yellowDark,
85
+ ...require("./tokens"),
86
+ ...require("./masks"),
87
+ ...require("./componentThemeDefinitions"),
88
+ ...require("./palettes"),
89
+ ...require("./templates"),
90
+ ...require("./shadows")
91
+ });
92
+ //# sourceMappingURL=v2.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/v2.tsx"],
4
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAAwB;AAKxB,uBAAc,qBALd;AAMA,uBAAc,oBANd;AAOA,uBAAc,wCAPd;AAQA,uBAAc,uBARd;AASA,uBAAc,wBATd;AAUA,uBAAc,sBAVd;AAaA,oBAA+B;AAC/B,IAAAA,iBAAiC;AACjC,IAAAA,iBAA6B;AAC7B,IAAAA,iBAAmC;AACnC,IAAAA,iBAAmC;AACnC,IAAAA,iBAA+B;AAC/B,IAAAA,iBAAmC;AACnC,IAAAA,iBAA+B;",
5
+ "names": ["import_colors"]
6
+ }