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