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