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