@tamagui/config-default 2.7.7 → 3.0.0-beta.643.1

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,233 @@
1
+ "use strict";
2
+
3
+
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all) __defProp(target, name, {
10
+ get: all[name],
11
+ enumerable: true
12
+ });
13
+ };
14
+ var __copyProps = (to, from, except, desc) => {
15
+ if (from && typeof from === "object" || typeof from === "function") {
16
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
17
+ get: () => from[key],
18
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
+ });
20
+ }
21
+ return to;
22
+ };
23
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
24
+ var index_exports = {};
25
+ __export(index_exports, { getDefaultTamaguiConfig: () => getDefaultTamaguiConfig });
26
+ module.exports = __toCommonJS(index_exports);
27
+ var import_shorthands = require("@tamagui/shorthands");
28
+ var import_web = require("@tamagui/web");
29
+ var import_animations = require("./animations.native.js");
30
+ var import_animations2 = require("./animations.native.js");
31
+ function getDefaultTamaguiConfig() {
32
+ var platform = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "web";
33
+ var headingFont = (0, import_web.createFont)({
34
+ family: "Heading",
35
+ size: {
36
+ 1: 15,
37
+ 4: 15
38
+ },
39
+ lineHeight: {
40
+ 1: 15,
41
+ 4: 15
42
+ },
43
+ transform: {},
44
+ weight: { 1: "400" },
45
+ color: { 1: "color" },
46
+ letterSpacing: { 1: 0 }
47
+ });
48
+ var font = (0, import_web.createFont)({
49
+ family: "System",
50
+ size: {
51
+ 1: 15,
52
+ 4: 15
53
+ },
54
+ lineHeight: {
55
+ 1: 15,
56
+ 4: 15
57
+ },
58
+ transform: {},
59
+ weight: { 1: "400" },
60
+ color: { 1: "color" },
61
+ letterSpacing: { 1: 0 }
62
+ });
63
+ var size = {
64
+ 0: 0,
65
+ .25: 2,
66
+ .5: 4,
67
+ .75: 8,
68
+ 1: 20,
69
+ 1.5: 24,
70
+ 2: 28,
71
+ 2.5: 32,
72
+ 3: 36,
73
+ 3.5: 40,
74
+ 4: 44,
75
+ 4.5: 48,
76
+ 5: 52,
77
+ 5.5: 59,
78
+ 6: 64,
79
+ 6.5: 69,
80
+ 7: 74,
81
+ 7.6: 79,
82
+ 8: 84,
83
+ 8.5: 89,
84
+ 9: 94,
85
+ 9.5: 99,
86
+ 10: 104,
87
+ 11: 124,
88
+ 12: 144,
89
+ 13: 164,
90
+ 14: 184,
91
+ 15: 204,
92
+ 16: 224,
93
+ 17: 224,
94
+ 18: 244,
95
+ 19: 264,
96
+ 20: 284
97
+ };
98
+ var spaces = Object.entries(size).map(function(param) {
99
+ var [k, v] = param;
100
+ return [k, Math.max(0, v <= 16 ? Math.round(v * .333) : Math.floor(v * .7 - 12))];
101
+ });
102
+ var spacesNegative = spaces.slice(1).map(function(param) {
103
+ var [k, v] = param;
104
+ return [`-${k}`, -v];
105
+ });
106
+ var space = {
107
+ ...Object.fromEntries(spaces),
108
+ ...Object.fromEntries(spacesNegative)
109
+ };
110
+ var zIndex = {
111
+ 0: 0,
112
+ 1: 100,
113
+ 2: 200,
114
+ 3: 300,
115
+ 4: 400,
116
+ 5: 500
117
+ };
118
+ var radius = {
119
+ 0: 0,
120
+ 1: 3,
121
+ 2: 5,
122
+ 3: 7,
123
+ 4: 9,
124
+ 5: 10,
125
+ 6: 16,
126
+ 7: 19,
127
+ 8: 22,
128
+ 9: 26,
129
+ 10: 34,
130
+ 11: 42,
131
+ 12: 50
132
+ };
133
+ var tokens = (0, import_web.createTokens)({
134
+ color: {
135
+ white: "#fff",
136
+ black: "#000"
137
+ },
138
+ radius,
139
+ zIndex,
140
+ space,
141
+ size
142
+ });
143
+ var themes = {
144
+ light: {
145
+ background: tokens.color.white,
146
+ color: tokens.color.black
147
+ },
148
+ dark: {
149
+ background: tokens.color.black,
150
+ color: tokens.color.white
151
+ },
152
+ dark_blue: {
153
+ background: "blue",
154
+ color: "white"
155
+ },
156
+ dark_Card: {
157
+ background: "dark",
158
+ color: "card"
159
+ },
160
+ dark_Button: {
161
+ background: "dark",
162
+ color: "button"
163
+ },
164
+ dark_blue_Button: {
165
+ background: "blue",
166
+ color: "white"
167
+ },
168
+ dark_red: {
169
+ background: "darkred",
170
+ color: "white"
171
+ },
172
+ dark_red_alt1: {
173
+ background: "darkred",
174
+ color: "white"
175
+ },
176
+ dark_red_Button: {
177
+ background: "darkred",
178
+ color: "#ccc"
179
+ },
180
+ dark_yellow_Button: {
181
+ background: "brown",
182
+ color: "#ccc"
183
+ },
184
+ dark_red_active_ListItem: {
185
+ background: "darkred",
186
+ color: "red"
187
+ },
188
+ dark_red_alt2: {
189
+ background: "darkred",
190
+ color: "#555"
191
+ },
192
+ dark_red_alt2_Button: {
193
+ background: "darkred",
194
+ color: "#444"
195
+ },
196
+ red: {
197
+ background: "red",
198
+ color: "red"
199
+ }
200
+ };
201
+ var fonts = {
202
+ heading: headingFont,
203
+ body: font
204
+ };
205
+ var media = {
206
+ xs: { maxWidth: 660 },
207
+ sm: { maxWidth: 800 },
208
+ md: { maxWidth: 1020 },
209
+ lg: { maxWidth: 1280 },
210
+ xl: { maxWidth: 1420 },
211
+ xxl: { maxWidth: 1600 },
212
+ gtXs: { minWidth: 660 + 1 },
213
+ gtSm: { minWidth: 800 + 1 },
214
+ gtMd: { minWidth: 1020 + 1 },
215
+ gtLg: { minWidth: 1280 + 1 },
216
+ short: { maxHeight: 820 },
217
+ tall: { minHeight: 820 },
218
+ hoverNone: { hover: "none" },
219
+ pointerCoarse: { pointer: "coarse" }
220
+ };
221
+ return {
222
+ animations: platform === "web" ? import_animations.animations : import_animations2.animations,
223
+ shorthands: import_shorthands.shorthands,
224
+ fonts,
225
+ themes,
226
+ tokens,
227
+ media,
228
+ settings: {
229
+ shouldAddPrefersColorThemes: true,
230
+ defaultFont: "body"
231
+ }
232
+ };
233
+ }