@react-native-styled-system/util 2.1.2
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/LICENSE +21 -0
- package/lib/commonjs/createTheme.js +44 -0
- package/lib/commonjs/createTheme.js.map +1 -0
- package/lib/commonjs/defaultTheme.js +412 -0
- package/lib/commonjs/defaultTheme.js.map +1 -0
- package/lib/commonjs/index.js +20 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/types.js +6 -0
- package/lib/commonjs/types.js.map +1 -0
- package/lib/module/createTheme.js +37 -0
- package/lib/module/createTheme.js.map +1 -0
- package/lib/module/defaultTheme.js +405 -0
- package/lib/module/defaultTheme.js.map +1 -0
- package/lib/module/index.js +3 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/types.js +2 -0
- package/lib/module/types.js.map +1 -0
- package/lib/typescript/src/createTheme.d.ts +8 -0
- package/lib/typescript/src/createTheme.d.ts.map +1 -0
- package/lib/typescript/src/defaultTheme.d.ts +42 -0
- package/lib/typescript/src/defaultTheme.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +4 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/types.d.ts +23 -0
- package/lib/typescript/src/types.d.ts.map +1 -0
- package/package.json +51 -0
- package/src/createTheme.test.ts +125 -0
- package/src/createTheme.ts +32 -0
- package/src/defaultTheme.ts +431 -0
- package/src/index.ts +3 -0
- package/src/types.ts +24 -0
|
@@ -0,0 +1,405 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Theme type from developer
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
export const emptyThemedDict = {
|
|
6
|
+
space: {},
|
|
7
|
+
colors: {},
|
|
8
|
+
sizes: {},
|
|
9
|
+
radii: {},
|
|
10
|
+
typography: {},
|
|
11
|
+
breakpoints: []
|
|
12
|
+
};
|
|
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
|
+
//# sourceMappingURL=defaultTheme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["emptyThemedDict","space","colors","sizes","radii","typography","breakpoints","defaultSpace","defaultColors","defaultRadii","defaultTypography","h1","fontSize","fontWeight","lineHeight","h2","h3","body","caption","small","grayScales","createThemeColors","base","theme","b","shade","t","isGray","includes","light","dark","defaultSemanticColors","defaultTheme","full","half"],"sourceRoot":"../../src","sources":["defaultTheme.ts"],"mappings":"AAEA;AACA;AACA;;AASA,OAAO,MAAMA,eAAe,GAAG;EAC7BC,KAAK,EAAE,CAAC,CAAC;EACTC,MAAM,EAAE,CAAC,CAAC;EACVC,KAAK,EAAE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AC,GAAGE,CAAC,CAAC,GAAG,CAAC;IAChC,SAAS,EAAElB,aAAa,CAAC,UAAU,CAAE;IACrC,SAAS,EAAEA,aAAa,CAAC,aAAa,CAAE;IACxC,SAAS,EAAEA,aAAa,CAAC,WAAW,CAAE;IACtC,SAAS,EAAEA,aAAa,CAAC,YAAY,CAAE;IACvC,SAAS,EAAEA,aAAa,CAAC,UAAU;EACrC,CAAC;EAED,OAAO;IAAEqB,KAAK;IAAEC;EAAK,CAAC;AACxB,CAAC;AAED,MAAMC,qBAAqB,GAAGV,iBAAiB,CAAC;EAAEC,IAAI,EAAE,SAAS;EAAEC,KAAK,EAAE;AAAU,CAAC,CAAC;AAEtF,OAAO,MAAMS,YAAY,GAAG;EAC1B/B,KAAK,EAAEM,YAAY;EACnBJ,KAAK,EAAE;IAAE,GAAGI,YAAY;IAAE0B,IAAI,EAAE,MAAe;IAAEC,IAAI,EAAE;EAAe,CAAC;EACvEhC,MAAM,EAAE;IAAE,GAAGM,aAAa;IAAE,GAAGuB,qBAAqB,CAACF;EAAM,CAAC;EAC5DzB,KAAK,EAAEK,YAAY;EACnBJ,UAAU,EAAEK,iBAAiB;EAC7BJ,WAAW,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI;AAC9B,CAAsB","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createTheme","defaultTheme"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":"AAAA,SAASA,WAAW,QAAQ,eAAe;AAC3C,SAASC,YAAY,QAAQ,gBAAgB","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../src","sources":["types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Theme } from './types';
|
|
2
|
+
type CreateThemeType = {
|
|
3
|
+
(config?: Partial<Theme>): Theme;
|
|
4
|
+
(base: Theme, overrides: Partial<Theme>): Theme;
|
|
5
|
+
};
|
|
6
|
+
export declare const createTheme: CreateThemeType;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=createTheme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createTheme.d.ts","sourceRoot":"","sources":["../../../src/createTheme.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC,KAAK,eAAe,GAAG;IACrB,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;IACjC,CAAC,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;CACjD,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,eAwBzB,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { ColorsValue, RadiiValue, SizesValue, SpaceValue, TypographyValue } from './types';
|
|
2
|
+
export interface ThemedDict {
|
|
3
|
+
space: Record<string | number, SpaceValue>;
|
|
4
|
+
sizes: Record<string | number, SizesValue>;
|
|
5
|
+
colors: Record<string | number, ColorsValue>;
|
|
6
|
+
radii: Record<string | number, RadiiValue>;
|
|
7
|
+
typography: Record<string | number, TypographyValue>;
|
|
8
|
+
breakpoints?: number[];
|
|
9
|
+
}
|
|
10
|
+
export declare const emptyThemedDict: {
|
|
11
|
+
space: {};
|
|
12
|
+
colors: {};
|
|
13
|
+
sizes: {};
|
|
14
|
+
radii: {};
|
|
15
|
+
typography: {};
|
|
16
|
+
breakpoints: never[];
|
|
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
|
+
//# sourceMappingURL=defaultTheme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaultTheme.d.ts","sourceRoot":"","sources":["../../../src/defaultTheme.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAKhG,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;AACD,eAAO,MAAM,eAAe;;;;;;;CAON,CAAC;AA2TvB,QAAA,MAAM,UAAU,wDAAyD,CAAC;AAE1E,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC;AAEpD,MAAM,MAAM,UAAU,GAClB,SAAS,GACT,KAAK,GACL,QAAQ,GACR,OAAO,GACP,QAAQ,GACR,MAAM,GACN,OAAO,GACP,SAAS,GACT,MAAM,GACN,MAAM,GACN,KAAK,GACL,MAAM,GACN,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,MAAM,GACN,MAAM,CAAC;AAEX,eAAO,MAAM,iBAAiB,GAAI,iBAAiB;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,UAAU,CAAA;CAAE;;;CA4DxF,CAAC;AAIF,eAAO,MAAM,YAAY;;;;;;;;;;;;CAOH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { TextStyle } from 'react-native';
|
|
2
|
+
export type SpaceValue = number | 'auto' | `${number}%` | null;
|
|
3
|
+
export type SizesValue = number | 'auto' | `${number}%` | null;
|
|
4
|
+
export type ColorsValue = string;
|
|
5
|
+
export type RadiiValue = number;
|
|
6
|
+
export type TypographyValue = {
|
|
7
|
+
fontFamily?: TextStyle['fontFamily'];
|
|
8
|
+
fontSize?: TextStyle['fontSize'];
|
|
9
|
+
fontWeight?: TextStyle['fontWeight'];
|
|
10
|
+
lineHeight?: TextStyle['lineHeight'];
|
|
11
|
+
letterSpacing?: TextStyle['letterSpacing'];
|
|
12
|
+
textAlign?: TextStyle['textAlign'];
|
|
13
|
+
fontStyle?: TextStyle['fontStyle'];
|
|
14
|
+
};
|
|
15
|
+
export type Theme = {
|
|
16
|
+
space: Record<string | number, SpaceValue>;
|
|
17
|
+
sizes: Record<string | number, SizesValue>;
|
|
18
|
+
colors: Record<string | number, ColorsValue>;
|
|
19
|
+
radii: Record<string | number, RadiiValue>;
|
|
20
|
+
typography: Record<string | number, TypographyValue>;
|
|
21
|
+
breakpoints?: number[];
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,GAAG,MAAM,GAAG,GAAG,IAAI,CAAC;AAC/D,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,GAAG,MAAM,GAAG,GAAG,IAAI,CAAC;AAC/D,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC;AACjC,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC;AAChC,MAAM,MAAM,eAAe,GAAG;IAC5B,UAAU,CAAC,EAAE,SAAS,CAAC,YAAY,CAAC,CAAC;IACrC,QAAQ,CAAC,EAAE,SAAS,CAAC,UAAU,CAAC,CAAC;IACjC,UAAU,CAAC,EAAE,SAAS,CAAC,YAAY,CAAC,CAAC;IACrC,UAAU,CAAC,EAAE,SAAS,CAAC,YAAY,CAAC,CAAC;IACrC,aAAa,CAAC,EAAE,SAAS,CAAC,eAAe,CAAC,CAAC;IAC3C,SAAS,CAAC,EAAE,SAAS,CAAC,WAAW,CAAC,CAAC;IACnC,SAAS,CAAC,EAAE,SAAS,CAAC,WAAW,CAAC,CAAC;CACpC,CAAC;AAEF,MAAM,MAAM,KAAK,GAAG;IAClB,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,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@react-native-styled-system/util",
|
|
3
|
+
"version": "2.1.2",
|
|
4
|
+
"description": "Theme utilities for React Native Styled System",
|
|
5
|
+
"main": "lib/commonjs/index.js",
|
|
6
|
+
"types": "lib/typescript/src/index.d.ts",
|
|
7
|
+
"homepage": "https://github.com/mym0404/react-native-styled-system",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"prepack": "bob build",
|
|
10
|
+
"test": "jest"
|
|
11
|
+
},
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "https://github.com/mym0404/react-native-styled-system"
|
|
15
|
+
},
|
|
16
|
+
"author": "MJ Studio <mym0404@gmail.com>",
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"publishConfig": {
|
|
19
|
+
"access": "public"
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"src",
|
|
23
|
+
"lib",
|
|
24
|
+
"!**/__tests__",
|
|
25
|
+
"!**/__fixtures__",
|
|
26
|
+
"!**/__mocks__"
|
|
27
|
+
],
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"react-native-builder-bob": "^0.23.2",
|
|
30
|
+
"typescript": "^5.2.2"
|
|
31
|
+
},
|
|
32
|
+
"react-native": "src/index.ts",
|
|
33
|
+
"source": "src/index.ts",
|
|
34
|
+
"module": "lib/module/index.js",
|
|
35
|
+
"react-native-builder-bob": {
|
|
36
|
+
"source": "src",
|
|
37
|
+
"output": "lib",
|
|
38
|
+
"targets": [
|
|
39
|
+
"commonjs",
|
|
40
|
+
"module",
|
|
41
|
+
[
|
|
42
|
+
"typescript",
|
|
43
|
+
{
|
|
44
|
+
"project": "tsconfig.build.json"
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
],
|
|
48
|
+
"exclude": "**/*.test.*"
|
|
49
|
+
},
|
|
50
|
+
"gitHead": "aebc0f221338c622c711290ea669ba4696b2c76c"
|
|
51
|
+
}
|