@react-native-styled-system/core 2.1.2 → 2.2.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/bin/theme-gen.js +19 -23
- package/lib/commonjs/@types/ThemedDict.js +1 -398
- package/lib/commonjs/@types/ThemedDict.js.map +1 -1
- package/lib/commonjs/index.js +0 -11
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/provider/StyledSystemProvider.js +2 -2
- package/lib/commonjs/provider/StyledSystemProvider.js.map +1 -1
- package/lib/module/@types/ThemedDict.js +0 -396
- package/lib/module/@types/ThemedDict.js.map +1 -1
- package/lib/module/index.js +0 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/provider/StyledSystemProvider.js +1 -1
- package/lib/module/provider/StyledSystemProvider.js.map +1 -1
- package/lib/typescript/src/@types/ThemedDict.d.ts +0 -24
- package/lib/typescript/src/@types/ThemedDict.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +0 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/provider/StyledSystemProvider.d.ts.map +1 -1
- package/package.json +5 -3
- package/src/@types/ThemedDict.ts +1 -413
- package/src/index.ts +0 -1
- package/src/provider/StyledSystemProvider.tsx +1 -1
- package/lib/commonjs/util/createTheme.js +0 -43
- package/lib/commonjs/util/createTheme.js.map +0 -1
- package/lib/module/util/createTheme.js +0 -37
- package/lib/module/util/createTheme.js.map +0 -1
- package/lib/typescript/src/util/createTheme.d.ts +0 -4
- package/lib/typescript/src/util/createTheme.d.ts.map +0 -1
- package/src/util/createTheme.test.ts +0 -126
- package/src/util/createTheme.ts +0 -29
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Theme type from developer
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
1
|
export const emptyThemedDict = {
|
|
6
2
|
space: {},
|
|
7
3
|
colors: {},
|
|
@@ -10,396 +6,4 @@ export const emptyThemedDict = {
|
|
|
10
6
|
typography: {},
|
|
11
7
|
breakpoints: []
|
|
12
8
|
};
|
|
13
|
-
const defaultSpace = {
|
|
14
|
-
'0': 0,
|
|
15
|
-
'px': 1,
|
|
16
|
-
'0.5': 2,
|
|
17
|
-
'1': 4,
|
|
18
|
-
'2': 8,
|
|
19
|
-
'3': 12,
|
|
20
|
-
'4': 16,
|
|
21
|
-
'5': 20,
|
|
22
|
-
'6': 24,
|
|
23
|
-
'7': 28,
|
|
24
|
-
'8': 32,
|
|
25
|
-
'9': 36,
|
|
26
|
-
'10': 40,
|
|
27
|
-
'12': 48,
|
|
28
|
-
'14': 56,
|
|
29
|
-
'16': 64,
|
|
30
|
-
'20': 80,
|
|
31
|
-
'24': 96,
|
|
32
|
-
'32': 128,
|
|
33
|
-
'40': 160,
|
|
34
|
-
'48': 192
|
|
35
|
-
};
|
|
36
|
-
const defaultColors = {
|
|
37
|
-
'white': '#FFFFFF',
|
|
38
|
-
'black': '#000000',
|
|
39
|
-
'transparent': 'transparent',
|
|
40
|
-
'slate.50': '#f8fafc',
|
|
41
|
-
'slate.100': '#f1f5f9',
|
|
42
|
-
'slate.200': '#e2e8f0',
|
|
43
|
-
'slate.300': '#cad5e2',
|
|
44
|
-
'slate.400': '#90a1b9',
|
|
45
|
-
'slate.500': '#62748e',
|
|
46
|
-
'slate.600': '#45556c',
|
|
47
|
-
'slate.700': '#314158',
|
|
48
|
-
'slate.800': '#1d293d',
|
|
49
|
-
'slate.900': '#0f172b',
|
|
50
|
-
'slate.950': '#020618',
|
|
51
|
-
'gray.50': '#f9fafb',
|
|
52
|
-
'gray.100': '#f3f4f6',
|
|
53
|
-
'gray.200': '#e5e7eb',
|
|
54
|
-
'gray.300': '#d1d5dc',
|
|
55
|
-
'gray.400': '#99a1af',
|
|
56
|
-
'gray.500': '#6a7282',
|
|
57
|
-
'gray.600': '#4a5565',
|
|
58
|
-
'gray.700': '#364153',
|
|
59
|
-
'gray.800': '#1e2939',
|
|
60
|
-
'gray.900': '#101828',
|
|
61
|
-
'gray.950': '#030712',
|
|
62
|
-
'zinc.50': '#fafafa',
|
|
63
|
-
'zinc.100': '#f4f4f5',
|
|
64
|
-
'zinc.200': '#e4e4e7',
|
|
65
|
-
'zinc.300': '#d4d4d8',
|
|
66
|
-
'zinc.400': '#9f9fa9',
|
|
67
|
-
'zinc.500': '#71717b',
|
|
68
|
-
'zinc.600': '#52525c',
|
|
69
|
-
'zinc.700': '#3f3f46',
|
|
70
|
-
'zinc.800': '#27272a',
|
|
71
|
-
'zinc.900': '#18181b',
|
|
72
|
-
'zinc.950': '#09090b',
|
|
73
|
-
'neutral.50': '#fafafa',
|
|
74
|
-
'neutral.100': '#f5f5f5',
|
|
75
|
-
'neutral.200': '#e5e5e5',
|
|
76
|
-
'neutral.300': '#d4d4d4',
|
|
77
|
-
'neutral.400': '#a1a1a1',
|
|
78
|
-
'neutral.500': '#737373',
|
|
79
|
-
'neutral.600': '#525252',
|
|
80
|
-
'neutral.700': '#404040',
|
|
81
|
-
'neutral.800': '#262626',
|
|
82
|
-
'neutral.900': '#171717',
|
|
83
|
-
'neutral.950': '#0a0a0a',
|
|
84
|
-
'stone.50': '#fafaf9',
|
|
85
|
-
'stone.100': '#f5f5f4',
|
|
86
|
-
'stone.200': '#e7e5e4',
|
|
87
|
-
'stone.300': '#d7d3d1',
|
|
88
|
-
'stone.400': '#a6a09b',
|
|
89
|
-
'stone.500': '#79716b',
|
|
90
|
-
'stone.600': '#57534d',
|
|
91
|
-
'stone.700': '#44403b',
|
|
92
|
-
'stone.800': '#292524',
|
|
93
|
-
'stone.900': '#1c1917',
|
|
94
|
-
'stone.950': '#0c0a09',
|
|
95
|
-
'red.50': '#fef2f2',
|
|
96
|
-
'red.100': '#ffe2e2',
|
|
97
|
-
'red.200': '#ffc9c9',
|
|
98
|
-
'red.300': '#ffa2a2',
|
|
99
|
-
'red.400': '#ff6467',
|
|
100
|
-
'red.500': '#fb2c36',
|
|
101
|
-
'red.600': '#e7000b',
|
|
102
|
-
'red.700': '#c10007',
|
|
103
|
-
'red.800': '#9f0712',
|
|
104
|
-
'red.900': '#82181a',
|
|
105
|
-
'red.950': '#460809',
|
|
106
|
-
'orange.50': '#fff7ed',
|
|
107
|
-
'orange.100': '#ffedd4',
|
|
108
|
-
'orange.200': '#ffd6a7',
|
|
109
|
-
'orange.300': '#ffb869',
|
|
110
|
-
'orange.400': '#ff8903',
|
|
111
|
-
'orange.500': '#ff6900',
|
|
112
|
-
'orange.600': '#f54900',
|
|
113
|
-
'orange.700': '#ca3500',
|
|
114
|
-
'orange.800': '#9f2d00',
|
|
115
|
-
'orange.900': '#7e2a0c',
|
|
116
|
-
'orange.950': '#441306',
|
|
117
|
-
'amber.50': '#fffbeb',
|
|
118
|
-
'amber.100': '#fef3c6',
|
|
119
|
-
'amber.200': '#fee685',
|
|
120
|
-
'amber.300': '#ffd230',
|
|
121
|
-
'amber.400': '#ffb900',
|
|
122
|
-
'amber.500': '#fe9a00',
|
|
123
|
-
'amber.600': '#e17100',
|
|
124
|
-
'amber.700': '#bb4d00',
|
|
125
|
-
'amber.800': '#973c00',
|
|
126
|
-
'amber.900': '#7b3306',
|
|
127
|
-
'amber.950': '#461901',
|
|
128
|
-
'yellow.50': '#fefce8',
|
|
129
|
-
'yellow.100': '#fef9c2',
|
|
130
|
-
'yellow.200': '#fff085',
|
|
131
|
-
'yellow.300': '#ffdf20',
|
|
132
|
-
'yellow.400': '#fdc700',
|
|
133
|
-
'yellow.500': '#f0b100',
|
|
134
|
-
'yellow.600': '#d08700',
|
|
135
|
-
'yellow.700': '#a65f00',
|
|
136
|
-
'yellow.800': '#894b00',
|
|
137
|
-
'yellow.900': '#733e0a',
|
|
138
|
-
'yellow.950': '#432004',
|
|
139
|
-
'lime.50': '#f7fee7',
|
|
140
|
-
'lime.100': '#ecfcca',
|
|
141
|
-
'lime.200': '#d8f999',
|
|
142
|
-
'lime.300': '#bbf451',
|
|
143
|
-
'lime.400': '#9ae600',
|
|
144
|
-
'lime.500': '#7ccf00',
|
|
145
|
-
'lime.600': '#5ea500',
|
|
146
|
-
'lime.700': '#497d00',
|
|
147
|
-
'lime.800': '#3d6300',
|
|
148
|
-
'lime.900': '#35530e',
|
|
149
|
-
'lime.950': '#192e03',
|
|
150
|
-
'green.50': '#f0fdf4',
|
|
151
|
-
'green.100': '#dcfce7',
|
|
152
|
-
'green.200': '#b9f8cf',
|
|
153
|
-
'green.300': '#7bf1a7',
|
|
154
|
-
'green.400': '#06df72',
|
|
155
|
-
'green.500': '#00c950',
|
|
156
|
-
'green.600': '#00a63e',
|
|
157
|
-
'green.700': '#008235',
|
|
158
|
-
'green.800': '#026630',
|
|
159
|
-
'green.900': '#0d542b',
|
|
160
|
-
'green.950': '#032e15',
|
|
161
|
-
'emerald.50': '#ecfdf5',
|
|
162
|
-
'emerald.100': '#d0fae5',
|
|
163
|
-
'emerald.200': '#a4f4cf',
|
|
164
|
-
'emerald.300': '#5ee9b5',
|
|
165
|
-
'emerald.400': '#00d492',
|
|
166
|
-
'emerald.500': '#00bc7d',
|
|
167
|
-
'emerald.600': '#009966',
|
|
168
|
-
'emerald.700': '#007a55',
|
|
169
|
-
'emerald.800': '#006045',
|
|
170
|
-
'emerald.900': '#004f3b',
|
|
171
|
-
'emerald.950': '#002c22',
|
|
172
|
-
'teal.50': '#f0fdfa',
|
|
173
|
-
'teal.100': '#cbfbf1',
|
|
174
|
-
'teal.200': '#96f7e4',
|
|
175
|
-
'teal.300': '#46ecd4',
|
|
176
|
-
'teal.400': '#00d5bd',
|
|
177
|
-
'teal.500': '#00bba7',
|
|
178
|
-
'teal.600': '#009689',
|
|
179
|
-
'teal.700': '#00786f',
|
|
180
|
-
'teal.800': '#005f5a',
|
|
181
|
-
'teal.900': '#0b4f4a',
|
|
182
|
-
'teal.950': '#022f2e',
|
|
183
|
-
'cyan.50': '#ecfeff',
|
|
184
|
-
'cyan.100': '#cefafe',
|
|
185
|
-
'cyan.200': '#a2f4fd',
|
|
186
|
-
'cyan.300': '#53eafd',
|
|
187
|
-
'cyan.400': '#00d3f2',
|
|
188
|
-
'cyan.500': '#00b8db',
|
|
189
|
-
'cyan.600': '#0092b8',
|
|
190
|
-
'cyan.700': '#007595',
|
|
191
|
-
'cyan.800': '#005f78',
|
|
192
|
-
'cyan.900': '#104e64',
|
|
193
|
-
'cyan.950': '#053345',
|
|
194
|
-
'sky.50': '#f0f9ff',
|
|
195
|
-
'sky.100': '#dff2fe',
|
|
196
|
-
'sky.200': '#b8e6fe',
|
|
197
|
-
'sky.300': '#74d4ff',
|
|
198
|
-
'sky.400': '#00bcff',
|
|
199
|
-
'sky.500': '#00a6f4',
|
|
200
|
-
'sky.600': '#0084d1',
|
|
201
|
-
'sky.700': '#0069a8',
|
|
202
|
-
'sky.800': '#00598a',
|
|
203
|
-
'sky.900': '#024a70',
|
|
204
|
-
'sky.950': '#052f4a',
|
|
205
|
-
'blue.50': '#eff6ff',
|
|
206
|
-
'blue.100': '#dbeafe',
|
|
207
|
-
'blue.200': '#bedbff',
|
|
208
|
-
'blue.300': '#8ec5ff',
|
|
209
|
-
'blue.400': '#51a2ff',
|
|
210
|
-
'blue.500': '#2b7fff',
|
|
211
|
-
'blue.600': '#155dfb',
|
|
212
|
-
'blue.700': '#1447e6',
|
|
213
|
-
'blue.800': '#193cb8',
|
|
214
|
-
'blue.900': '#1c398e',
|
|
215
|
-
'blue.950': '#162556',
|
|
216
|
-
'indigo.50': '#eef2ff',
|
|
217
|
-
'indigo.100': '#e0e7ff',
|
|
218
|
-
'indigo.200': '#c7d2ff',
|
|
219
|
-
'indigo.300': '#a3b3ff',
|
|
220
|
-
'indigo.400': '#7c86ff',
|
|
221
|
-
'indigo.500': '#615fff',
|
|
222
|
-
'indigo.600': '#4f39f6',
|
|
223
|
-
'indigo.700': '#432dd7',
|
|
224
|
-
'indigo.800': '#372aac',
|
|
225
|
-
'indigo.900': '#312c85',
|
|
226
|
-
'indigo.950': '#1e1a4d',
|
|
227
|
-
'violet.50': '#f5f3ff',
|
|
228
|
-
'violet.100': '#ede9fe',
|
|
229
|
-
'violet.200': '#ddd6ff',
|
|
230
|
-
'violet.300': '#c4b4ff',
|
|
231
|
-
'violet.400': '#a684ff',
|
|
232
|
-
'violet.500': '#8e51ff',
|
|
233
|
-
'violet.600': '#7f22fe',
|
|
234
|
-
'violet.700': '#7008e7',
|
|
235
|
-
'violet.800': '#5d0ec0',
|
|
236
|
-
'violet.900': '#4d179a',
|
|
237
|
-
'violet.950': '#2f0d68',
|
|
238
|
-
'purple.50': '#faf5ff',
|
|
239
|
-
'purple.100': '#f3e8ff',
|
|
240
|
-
'purple.200': '#e9d4ff',
|
|
241
|
-
'purple.300': '#dab2ff',
|
|
242
|
-
'purple.400': '#c27aff',
|
|
243
|
-
'purple.500': '#ad46ff',
|
|
244
|
-
'purple.600': '#9810fa',
|
|
245
|
-
'purple.700': '#8200db',
|
|
246
|
-
'purple.800': '#6e11b0',
|
|
247
|
-
'purple.900': '#59168b',
|
|
248
|
-
'purple.950': '#3c0366',
|
|
249
|
-
'fuchsia.50': '#fdf4ff',
|
|
250
|
-
'fuchsia.100': '#fae8ff',
|
|
251
|
-
'fuchsia.200': '#f6cfff',
|
|
252
|
-
'fuchsia.300': '#f4a8ff',
|
|
253
|
-
'fuchsia.400': '#ed6aff',
|
|
254
|
-
'fuchsia.500': '#e12afb',
|
|
255
|
-
'fuchsia.600': '#c800de',
|
|
256
|
-
'fuchsia.700': '#a800b7',
|
|
257
|
-
'fuchsia.800': '#8a0194',
|
|
258
|
-
'fuchsia.900': '#721378',
|
|
259
|
-
'fuchsia.950': '#4b004f',
|
|
260
|
-
'pink.50': '#fdf2f8',
|
|
261
|
-
'pink.100': '#fce7f3',
|
|
262
|
-
'pink.200': '#fccee8',
|
|
263
|
-
'pink.300': '#fea5d5',
|
|
264
|
-
'pink.400': '#fb64b6',
|
|
265
|
-
'pink.500': '#f6339a',
|
|
266
|
-
'pink.600': '#e60076',
|
|
267
|
-
'pink.700': '#c6005b',
|
|
268
|
-
'pink.800': '#a3004c',
|
|
269
|
-
'pink.900': '#861043',
|
|
270
|
-
'pink.950': '#510424',
|
|
271
|
-
'rose.50': '#fff1f2',
|
|
272
|
-
'rose.100': '#ffe4e6',
|
|
273
|
-
'rose.200': '#ffccd2',
|
|
274
|
-
'rose.300': '#ffa1ad',
|
|
275
|
-
'rose.400': '#ff637e',
|
|
276
|
-
'rose.500': '#ff2056',
|
|
277
|
-
'rose.600': '#ec003f',
|
|
278
|
-
'rose.700': '#c70036',
|
|
279
|
-
'rose.800': '#a50036',
|
|
280
|
-
'rose.900': '#8b0836',
|
|
281
|
-
'rose.950': '#4d0218'
|
|
282
|
-
};
|
|
283
|
-
const defaultRadii = {
|
|
284
|
-
'none': 0,
|
|
285
|
-
'sm': 4,
|
|
286
|
-
'md': 8,
|
|
287
|
-
'lg': 12,
|
|
288
|
-
'xl': 16,
|
|
289
|
-
'2xl': 24,
|
|
290
|
-
'full': 9999
|
|
291
|
-
};
|
|
292
|
-
const defaultTypography = {
|
|
293
|
-
h1: {
|
|
294
|
-
fontSize: 32,
|
|
295
|
-
fontWeight: 'bold',
|
|
296
|
-
lineHeight: 40
|
|
297
|
-
},
|
|
298
|
-
h2: {
|
|
299
|
-
fontSize: 24,
|
|
300
|
-
fontWeight: 'bold',
|
|
301
|
-
lineHeight: 32
|
|
302
|
-
},
|
|
303
|
-
h3: {
|
|
304
|
-
fontSize: 20,
|
|
305
|
-
fontWeight: '600',
|
|
306
|
-
lineHeight: 28
|
|
307
|
-
},
|
|
308
|
-
body: {
|
|
309
|
-
fontSize: 16,
|
|
310
|
-
lineHeight: 24
|
|
311
|
-
},
|
|
312
|
-
caption: {
|
|
313
|
-
fontSize: 14,
|
|
314
|
-
lineHeight: 20
|
|
315
|
-
},
|
|
316
|
-
small: {
|
|
317
|
-
fontSize: 12,
|
|
318
|
-
lineHeight: 16
|
|
319
|
-
}
|
|
320
|
-
};
|
|
321
|
-
const grayScales = ['slate', 'gray', 'zinc', 'neutral', 'stone'];
|
|
322
|
-
export const createThemeColors = ({
|
|
323
|
-
base,
|
|
324
|
-
theme
|
|
325
|
-
}) => {
|
|
326
|
-
const b = shade => defaultColors[`${base}.${shade}`];
|
|
327
|
-
const t = shade => defaultColors[`${theme}.${shade}`];
|
|
328
|
-
const isGray = grayScales.includes(theme);
|
|
329
|
-
const light = {
|
|
330
|
-
'background': '#FFFFFF',
|
|
331
|
-
'foreground': b(950),
|
|
332
|
-
'card': '#FFFFFF',
|
|
333
|
-
'card-foreground': b(950),
|
|
334
|
-
'popover': '#FFFFFF',
|
|
335
|
-
'popover-foreground': b(950),
|
|
336
|
-
'primary': isGray ? t(900) : t(600),
|
|
337
|
-
'primary-foreground': isGray ? t(50) : '#FFFFFF',
|
|
338
|
-
'secondary': b(100),
|
|
339
|
-
'secondary-foreground': b(900),
|
|
340
|
-
'muted': b(100),
|
|
341
|
-
'muted-foreground': b(500),
|
|
342
|
-
'accent': b(100),
|
|
343
|
-
'accent-foreground': b(900),
|
|
344
|
-
'destructive': defaultColors['red.600'],
|
|
345
|
-
'destructive-foreground': b(50),
|
|
346
|
-
'border': b(200),
|
|
347
|
-
'input': b(200),
|
|
348
|
-
'ring': isGray ? b(400) : t(400),
|
|
349
|
-
'chart-1': defaultColors['orange.600'],
|
|
350
|
-
'chart-2': defaultColors['teal.600'],
|
|
351
|
-
'chart-3': defaultColors['cyan.900'],
|
|
352
|
-
'chart-4': defaultColors['amber.400'],
|
|
353
|
-
'chart-5': defaultColors['amber.500']
|
|
354
|
-
};
|
|
355
|
-
const dark = {
|
|
356
|
-
'background': b(950),
|
|
357
|
-
'foreground': b(50),
|
|
358
|
-
'card': b(900),
|
|
359
|
-
'card-foreground': b(50),
|
|
360
|
-
'popover': b(900),
|
|
361
|
-
'popover-foreground': b(50),
|
|
362
|
-
'primary': isGray ? t(200) : t(500),
|
|
363
|
-
'primary-foreground': isGray ? t(900) : '#FFFFFF',
|
|
364
|
-
'secondary': b(800),
|
|
365
|
-
'secondary-foreground': b(50),
|
|
366
|
-
'muted': b(800),
|
|
367
|
-
'muted-foreground': b(400),
|
|
368
|
-
'accent': b(800),
|
|
369
|
-
'accent-foreground': b(50),
|
|
370
|
-
'destructive': defaultColors['red.400'],
|
|
371
|
-
'destructive-foreground': b(50),
|
|
372
|
-
'border': b(800),
|
|
373
|
-
'input': b(800),
|
|
374
|
-
'ring': isGray ? b(500) : t(500),
|
|
375
|
-
'chart-1': defaultColors['blue.700'],
|
|
376
|
-
'chart-2': defaultColors['emerald.500'],
|
|
377
|
-
'chart-3': defaultColors['amber.500'],
|
|
378
|
-
'chart-4': defaultColors['purple.500'],
|
|
379
|
-
'chart-5': defaultColors['rose.500']
|
|
380
|
-
};
|
|
381
|
-
return {
|
|
382
|
-
light,
|
|
383
|
-
dark
|
|
384
|
-
};
|
|
385
|
-
};
|
|
386
|
-
const defaultSemanticColors = createThemeColors({
|
|
387
|
-
base: 'neutral',
|
|
388
|
-
theme: 'neutral'
|
|
389
|
-
});
|
|
390
|
-
export const defaultTheme = {
|
|
391
|
-
space: defaultSpace,
|
|
392
|
-
sizes: {
|
|
393
|
-
...defaultSpace,
|
|
394
|
-
full: '100%',
|
|
395
|
-
half: '50%'
|
|
396
|
-
},
|
|
397
|
-
colors: {
|
|
398
|
-
...defaultColors,
|
|
399
|
-
...defaultSemanticColors.light
|
|
400
|
-
},
|
|
401
|
-
radii: defaultRadii,
|
|
402
|
-
typography: defaultTypography,
|
|
403
|
-
breakpoints: [480, 768, 1024]
|
|
404
|
-
};
|
|
405
9
|
//# sourceMappingURL=ThemedDict.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["emptyThemedDict","space","colors","sizes","radii","typography","breakpoints"
|
|
1
|
+
{"version":3,"names":["emptyThemedDict","space","colors","sizes","radii","typography","breakpoints"],"sourceRoot":"../../../src","sources":["@types/ThemedDict.ts"],"mappings":"AAWA,OAAO,MAAMA,eAAe,GAAG;EAC7BC,KAAK,EAAE,CAAC,CAAC;EACTC,MAAM,EAAE,CAAC,CAAC;EACVC,KAAK,EAAE,CAAC,CAAC;EACTC,KAAK,EAAE,CAAC,CAAC;EACTC,UAAU,EAAE,CAAC,CAAC;EACdC,WAAW,EAAE;AACf,CAAsB","ignoreList":[]}
|
package/lib/module/index.js
CHANGED
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../src","sources":["index.ts"],"mappings":"AAAA,cAAc,qBAAqB;AACnC,cAAc,kBAAkB;AAChC,cAAc,qBAAqB;AACnC,cAAc,wBAAwB;AACtC,cAAc,cAAc;AAC5B,cAAc,mBAAmB;AACjC,cAAc,oBAAoB;AAClC,cAAc,iCAAiC;AAC/C,cAAc,2BAA2B;AACzC,cAAc,0BAA0B
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../src","sources":["index.ts"],"mappings":"AAAA,cAAc,qBAAqB;AACnC,cAAc,kBAAkB;AAChC,cAAc,qBAAqB;AACnC,cAAc,wBAAwB;AACtC,cAAc,cAAc;AAC5B,cAAc,mBAAmB;AACjC,cAAc,oBAAoB;AAClC,cAAc,iCAAiC;AAC/C,cAAc,2BAA2B;AACzC,cAAc,0BAA0B","ignoreList":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useWindowDimensions } from 'react-native';
|
|
3
|
+
import { createTheme } from '@react-native-styled-system/util';
|
|
3
4
|
import { emptyThemedDict } from '../@types/ThemedDict';
|
|
4
|
-
import { createTheme } from '../util/createTheme';
|
|
5
5
|
export const StyledSystemContext = /*#__PURE__*/React.createContext({
|
|
6
6
|
theme: emptyThemedDict,
|
|
7
7
|
screenWidth: 0
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useWindowDimensions","
|
|
1
|
+
{"version":3,"names":["React","useWindowDimensions","createTheme","emptyThemedDict","StyledSystemContext","createContext","theme","screenWidth","StyledSystemProviderInner","children","width","resolvedScreenWidth","createElement","Provider","value","StyledSystemProvider"],"sourceRoot":"../../../src","sources":["provider/StyledSystemProvider.tsx"],"mappings":"AACA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,mBAAmB,QAAQ,cAAc;AAClD,SAASC,WAAW,QAAQ,kCAAkC;AAG9D,SAASC,eAAe,QAAQ,sBAAsB;AAOtD,OAAO,MAAMC,mBAAmB,gBAAGJ,KAAK,CAACK,aAAa,CAA2B;EAC/EC,KAAK,EAAEH,eAAe;EACtBI,WAAW,EAAE;AACf,CAAC,CAAC;AAGF,MAAMC,yBAAyB,GAAGA,CAAC;EAAEC,QAAQ;EAAEH,KAAK;EAAEC;AAAmB,CAAC,KAAK;EAC7E,MAAM;IAAEG;EAAM,CAAC,GAAGT,mBAAmB,CAAC,CAAC;EACvC,MAAMU,mBAAmB,GAAGJ,WAAW,IAAIG,KAAK;EAEhD,oBACEV,KAAA,CAAAY,aAAA,CAACR,mBAAmB,CAACS,QAAQ;IAC3BC,KAAK,EAAE;MAAER,KAAK,EAAEJ,WAAW,CAACI,KAAK,CAAC;MAAEC,WAAW,EAAEI;IAAoB;EAAE,GAEtEF,QAC2B,CAAC;AAEnC,CAAC;AAED,OAAO,MAAMM,oBAAoB,GAAGP,yBAAyB","ignoreList":[]}
|
|
@@ -15,28 +15,4 @@ export declare const emptyThemedDict: {
|
|
|
15
15
|
typography: {};
|
|
16
16
|
breakpoints: never[];
|
|
17
17
|
};
|
|
18
|
-
declare const grayScales: readonly ["slate", "gray", "zinc", "neutral", "stone"];
|
|
19
|
-
export type BaseColor = (typeof grayScales)[number];
|
|
20
|
-
export type ThemeColor = BaseColor | 'red' | 'orange' | 'amber' | 'yellow' | 'lime' | 'green' | 'emerald' | 'teal' | 'cyan' | 'sky' | 'blue' | 'indigo' | 'violet' | 'purple' | 'fuchsia' | 'pink' | 'rose';
|
|
21
|
-
export declare const createThemeColors: ({ base, theme }: {
|
|
22
|
-
base: BaseColor;
|
|
23
|
-
theme: ThemeColor;
|
|
24
|
-
}) => {
|
|
25
|
-
light: Record<string, string>;
|
|
26
|
-
dark: Record<string, string>;
|
|
27
|
-
};
|
|
28
|
-
export declare const defaultTheme: {
|
|
29
|
-
space: Record<string, SpaceValue>;
|
|
30
|
-
sizes: {
|
|
31
|
-
full: "100%";
|
|
32
|
-
half: "50%";
|
|
33
|
-
};
|
|
34
|
-
colors: {
|
|
35
|
-
[x: string]: string;
|
|
36
|
-
};
|
|
37
|
-
radii: Record<string, number>;
|
|
38
|
-
typography: Record<string, TypographyValue>;
|
|
39
|
-
breakpoints: number[];
|
|
40
|
-
};
|
|
41
|
-
export {};
|
|
42
18
|
//# sourceMappingURL=ThemedDict.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemedDict.d.ts","sourceRoot":"","sources":["../../../../src/@types/ThemedDict.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"ThemedDict.d.ts","sourceRoot":"","sources":["../../../../src/@types/ThemedDict.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAEhG,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC,MAAM,GAAG,MAAM,EAAE,UAAU,CAAC,CAAC;IAC3C,KAAK,EAAE,MAAM,CAAC,MAAM,GAAG,MAAM,EAAE,UAAU,CAAC,CAAC;IAC3C,MAAM,EAAE,MAAM,CAAC,MAAM,GAAG,MAAM,EAAE,WAAW,CAAC,CAAC;IAC7C,KAAK,EAAE,MAAM,CAAC,MAAM,GAAG,MAAM,EAAE,UAAU,CAAC,CAAC;IAC3C,UAAU,EAAE,MAAM,CAAC,MAAM,GAAG,MAAM,EAAE,eAAe,CAAC,CAAC;IACrD,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CACxB;AAED,eAAO,MAAM,eAAe;;;;;;;CAON,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iCAAiC,CAAC;AAChD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iCAAiC,CAAC;AAChD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StyledSystemProvider.d.ts","sourceRoot":"","sources":["../../../../src/provider/StyledSystemProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"StyledSystemProvider.d.ts","sourceRoot":"","sources":["../../../../src/provider/StyledSystemProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAGvD,MAAM,MAAM,wBAAwB,GAAG;IACrC,KAAK,EAAE,UAAU,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,mBAAmB,yCAG9B,CAAC;AACH,KAAK,KAAK,GAAG,iBAAiB,CAAC;IAAE,KAAK,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAerF,eAAO,MAAM,oBAAoB,qCAboC,KAAK,sBAab,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-native-styled-system/core",
|
|
3
|
-
"version": "2.1
|
|
3
|
+
"version": "2.2.1",
|
|
4
4
|
"description": "React Native Styled System",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"types": "lib/typescript/src/index.d.ts",
|
|
@@ -14,9 +14,10 @@
|
|
|
14
14
|
"type": "git",
|
|
15
15
|
"url": "https://github.com/mym0404/react-native-styled-system"
|
|
16
16
|
},
|
|
17
|
-
"author": "
|
|
17
|
+
"author": "MJ Studio <mym0404@gmail.com>",
|
|
18
18
|
"license": "MIT",
|
|
19
19
|
"devDependencies": {
|
|
20
|
+
"@react-native-styled-system/cli": "2.2.1",
|
|
20
21
|
"@testing-library/react-native": "^13.3.3",
|
|
21
22
|
"@types/invariant": "^2.2.37",
|
|
22
23
|
"@types/react": "^19",
|
|
@@ -41,6 +42,7 @@
|
|
|
41
42
|
],
|
|
42
43
|
"dependencies": {
|
|
43
44
|
"@mj-studio/js-util": "1.0.34",
|
|
45
|
+
"@react-native-styled-system/util": "^2.2.1",
|
|
44
46
|
"invariant": "^2.2.4",
|
|
45
47
|
"object-hash": "^3.0.0"
|
|
46
48
|
},
|
|
@@ -65,5 +67,5 @@
|
|
|
65
67
|
],
|
|
66
68
|
"exclude": "**/*.test.*"
|
|
67
69
|
},
|
|
68
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "018502a8248ed6d35cd06a74b521107d727c3f6c"
|
|
69
71
|
}
|