@omnific/atelier 0.1.0 → 0.2.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/README.md +10 -1
- package/dist/box/Box.d.ts +7 -0
- package/dist/box/Box.js +28 -0
- package/dist/box/constants.js +8 -0
- package/dist/box/index.d.ts +3 -0
- package/dist/box/index.js +2 -0
- package/dist/box/types.d.ts +48 -0
- package/dist/button/Button.js +1 -1
- package/dist/button/LoadingIcon.js +1 -1
- package/dist/main.d.ts +4 -1
- package/dist/main.js +2 -1
- package/dist/styles.css +76 -80
- package/dist/system/create-system.d.ts +9 -0
- package/dist/system/create-system.js +21 -0
- package/dist/system/css-vars.d.ts +52 -0
- package/dist/system/css-vars.js +112 -0
- package/dist/system/default-system.d.ts +7 -0
- package/dist/system/default-system.js +9 -0
- package/dist/system/defaults/colors.d.ts +181 -0
- package/dist/system/defaults/colors.js +68 -0
- package/dist/system/defaults/control-heights.d.ts +16 -0
- package/dist/system/defaults/control-heights.js +11 -0
- package/dist/system/defaults/focus-rings.d.ts +10 -0
- package/dist/system/defaults/focus-rings.js +7 -0
- package/dist/system/defaults/font-sizes.d.ts +13 -0
- package/dist/system/defaults/font-sizes.js +10 -0
- package/dist/system/defaults/fonts.d.ts +10 -0
- package/dist/system/defaults/fonts.js +7 -0
- package/dist/system/defaults/index.d.ts +422 -0
- package/dist/system/defaults/index.js +28 -0
- package/dist/system/defaults/radii.d.ts +40 -0
- package/dist/system/defaults/radii.js +19 -0
- package/dist/system/defaults/shadows.d.ts +31 -0
- package/dist/system/defaults/shadows.js +16 -0
- package/dist/system/defaults/spacing.d.ts +112 -0
- package/dist/system/defaults/spacing.js +43 -0
- package/dist/system/define-tokens.d.ts +7 -0
- package/dist/system/define-tokens.js +7 -0
- package/dist/system/index.d.ts +17 -0
- package/dist/system/index.js +16 -0
- package/dist/system/merge-tokens.d.ts +20 -0
- package/dist/system/merge-tokens.js +27 -0
- package/dist/system/types.d.ts +73 -0
- package/dist/system/use-theme.d.ts +31 -0
- package/dist/system/use-theme.js +39 -0
- package/package.json +13 -3
|
@@ -0,0 +1,422 @@
|
|
|
1
|
+
import { TokenCategoryKeys } from "../types.js";
|
|
2
|
+
import { colors } from "./colors.js";
|
|
3
|
+
import { controlHeights } from "./control-heights.js";
|
|
4
|
+
import { focusRings } from "./focus-rings.js";
|
|
5
|
+
import { fontSizes } from "./font-sizes.js";
|
|
6
|
+
import { fonts } from "./fonts.js";
|
|
7
|
+
import { radii } from "./radii.js";
|
|
8
|
+
import { shadows } from "./shadows.js";
|
|
9
|
+
import { spacing } from "./spacing.js";
|
|
10
|
+
//#region system/defaults/index.d.ts
|
|
11
|
+
/**
|
|
12
|
+
* 库默认 tokens:结构 scale + 语义色(含 `colors`)。
|
|
13
|
+
*
|
|
14
|
+
* 构建与默认用法:`createSystem(defaultConfig)`、`createSystem('default', defaultConfig)`,或直接使用 `defaultSystem`。
|
|
15
|
+
* 业务覆盖:`createSystem('app', defaultConfig, customTokens)`。
|
|
16
|
+
*/
|
|
17
|
+
export declare const defaultConfig: {
|
|
18
|
+
readonly spacing: {
|
|
19
|
+
readonly 0: {
|
|
20
|
+
readonly value: "0";
|
|
21
|
+
};
|
|
22
|
+
readonly 0.5: {
|
|
23
|
+
readonly value: "2px";
|
|
24
|
+
};
|
|
25
|
+
readonly 1: {
|
|
26
|
+
readonly value: "4px";
|
|
27
|
+
};
|
|
28
|
+
readonly 1.5: {
|
|
29
|
+
readonly value: "6px";
|
|
30
|
+
};
|
|
31
|
+
readonly 2: {
|
|
32
|
+
readonly value: "8px";
|
|
33
|
+
};
|
|
34
|
+
readonly 2.5: {
|
|
35
|
+
readonly value: "10px";
|
|
36
|
+
};
|
|
37
|
+
readonly 3: {
|
|
38
|
+
readonly value: "12px";
|
|
39
|
+
};
|
|
40
|
+
readonly 3.5: {
|
|
41
|
+
readonly value: "14px";
|
|
42
|
+
};
|
|
43
|
+
readonly 4: {
|
|
44
|
+
readonly value: "16px";
|
|
45
|
+
};
|
|
46
|
+
readonly 4.5: {
|
|
47
|
+
readonly value: "18px";
|
|
48
|
+
};
|
|
49
|
+
readonly 5: {
|
|
50
|
+
readonly value: "20px";
|
|
51
|
+
};
|
|
52
|
+
readonly 6: {
|
|
53
|
+
readonly value: "24px";
|
|
54
|
+
};
|
|
55
|
+
readonly 7: {
|
|
56
|
+
readonly value: "28px";
|
|
57
|
+
};
|
|
58
|
+
readonly 8: {
|
|
59
|
+
readonly value: "32px";
|
|
60
|
+
};
|
|
61
|
+
readonly 9: {
|
|
62
|
+
readonly value: "36px";
|
|
63
|
+
};
|
|
64
|
+
readonly 10: {
|
|
65
|
+
readonly value: "40px";
|
|
66
|
+
};
|
|
67
|
+
readonly 11: {
|
|
68
|
+
readonly value: "44px";
|
|
69
|
+
};
|
|
70
|
+
readonly 12: {
|
|
71
|
+
readonly value: "48px";
|
|
72
|
+
};
|
|
73
|
+
readonly 14: {
|
|
74
|
+
readonly value: "56px";
|
|
75
|
+
};
|
|
76
|
+
readonly 16: {
|
|
77
|
+
readonly value: "64px";
|
|
78
|
+
};
|
|
79
|
+
readonly 20: {
|
|
80
|
+
readonly value: "80px";
|
|
81
|
+
};
|
|
82
|
+
readonly 24: {
|
|
83
|
+
readonly value: "96px";
|
|
84
|
+
};
|
|
85
|
+
readonly 28: {
|
|
86
|
+
readonly value: "112px";
|
|
87
|
+
};
|
|
88
|
+
readonly 32: {
|
|
89
|
+
readonly value: "128px";
|
|
90
|
+
};
|
|
91
|
+
readonly 36: {
|
|
92
|
+
readonly value: "144px";
|
|
93
|
+
};
|
|
94
|
+
readonly 40: {
|
|
95
|
+
readonly value: "160px";
|
|
96
|
+
};
|
|
97
|
+
readonly 44: {
|
|
98
|
+
readonly value: "176px";
|
|
99
|
+
};
|
|
100
|
+
readonly 48: {
|
|
101
|
+
readonly value: "192px";
|
|
102
|
+
};
|
|
103
|
+
readonly 52: {
|
|
104
|
+
readonly value: "208px";
|
|
105
|
+
};
|
|
106
|
+
readonly 56: {
|
|
107
|
+
readonly value: "224px";
|
|
108
|
+
};
|
|
109
|
+
readonly 60: {
|
|
110
|
+
readonly value: "240px";
|
|
111
|
+
};
|
|
112
|
+
readonly 64: {
|
|
113
|
+
readonly value: "256px";
|
|
114
|
+
};
|
|
115
|
+
readonly 72: {
|
|
116
|
+
readonly value: "288px";
|
|
117
|
+
};
|
|
118
|
+
readonly 80: {
|
|
119
|
+
readonly value: "320px";
|
|
120
|
+
};
|
|
121
|
+
readonly 96: {
|
|
122
|
+
readonly value: "384px";
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
readonly radii: {
|
|
126
|
+
readonly none: {
|
|
127
|
+
readonly value: "0";
|
|
128
|
+
};
|
|
129
|
+
readonly '2xs': {
|
|
130
|
+
readonly value: "1px";
|
|
131
|
+
};
|
|
132
|
+
readonly xs: {
|
|
133
|
+
readonly value: "2px";
|
|
134
|
+
};
|
|
135
|
+
readonly sm: {
|
|
136
|
+
readonly value: "4px";
|
|
137
|
+
};
|
|
138
|
+
readonly md: {
|
|
139
|
+
readonly value: "6px";
|
|
140
|
+
};
|
|
141
|
+
readonly lg: {
|
|
142
|
+
readonly value: "8px";
|
|
143
|
+
};
|
|
144
|
+
readonly xl: {
|
|
145
|
+
readonly value: "12px";
|
|
146
|
+
};
|
|
147
|
+
readonly '2xl': {
|
|
148
|
+
readonly value: "16px";
|
|
149
|
+
};
|
|
150
|
+
readonly '3xl': {
|
|
151
|
+
readonly value: "24px";
|
|
152
|
+
};
|
|
153
|
+
readonly '4xl': {
|
|
154
|
+
readonly value: "32px";
|
|
155
|
+
};
|
|
156
|
+
readonly full: {
|
|
157
|
+
readonly value: "9999px";
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
readonly shadows: {
|
|
161
|
+
readonly xs: {
|
|
162
|
+
readonly value: "0px 1px 2px rgb(24 24 27 / 0.1), 0px 0px 1px rgb(24 24 27 / 0.2)";
|
|
163
|
+
};
|
|
164
|
+
readonly sm: {
|
|
165
|
+
readonly value: "0px 2px 4px rgb(24 24 27 / 0.1), 0px 0px 1px rgb(24 24 27 / 0.3)";
|
|
166
|
+
};
|
|
167
|
+
readonly md: {
|
|
168
|
+
readonly value: "0px 4px 8px rgb(24 24 27 / 0.1), 0px 0px 1px rgb(24 24 27 / 0.3)";
|
|
169
|
+
};
|
|
170
|
+
readonly lg: {
|
|
171
|
+
readonly value: "0px 8px 16px rgb(24 24 27 / 0.1), 0px 0px 1px rgb(24 24 27 / 0.3)";
|
|
172
|
+
};
|
|
173
|
+
readonly xl: {
|
|
174
|
+
readonly value: "0px 16px 24px rgb(24 24 27 / 0.1), 0px 0px 1px rgb(24 24 27 / 0.3)";
|
|
175
|
+
};
|
|
176
|
+
readonly '2xl': {
|
|
177
|
+
readonly value: "0px 24px 40px rgb(24 24 27 / 0.16), 0px 0px 1px rgb(24 24 27 / 0.3)";
|
|
178
|
+
};
|
|
179
|
+
readonly inner: {
|
|
180
|
+
readonly value: "inset 0 2px 4px 0 rgb(9 9 11 / 0.05)";
|
|
181
|
+
};
|
|
182
|
+
readonly inset: {
|
|
183
|
+
readonly value: "inset 0 0 0 1px rgb(9 9 11 / 0.05)";
|
|
184
|
+
};
|
|
185
|
+
};
|
|
186
|
+
readonly fonts: {
|
|
187
|
+
readonly sans: {
|
|
188
|
+
readonly value: "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'";
|
|
189
|
+
};
|
|
190
|
+
};
|
|
191
|
+
readonly fontSizes: {
|
|
192
|
+
readonly md: {
|
|
193
|
+
readonly value: "14px";
|
|
194
|
+
};
|
|
195
|
+
readonly lg: {
|
|
196
|
+
readonly value: "16px";
|
|
197
|
+
};
|
|
198
|
+
};
|
|
199
|
+
readonly controlHeights: {
|
|
200
|
+
readonly sm: {
|
|
201
|
+
readonly value: "24px";
|
|
202
|
+
};
|
|
203
|
+
readonly md: {
|
|
204
|
+
readonly value: "32px";
|
|
205
|
+
};
|
|
206
|
+
readonly lg: {
|
|
207
|
+
readonly value: "40px";
|
|
208
|
+
};
|
|
209
|
+
};
|
|
210
|
+
readonly focusRings: {
|
|
211
|
+
readonly default: {
|
|
212
|
+
readonly value: "rgb(21 112 239 / 25%)";
|
|
213
|
+
};
|
|
214
|
+
};
|
|
215
|
+
readonly colors: {
|
|
216
|
+
readonly bg: {
|
|
217
|
+
readonly value: "#ffffff";
|
|
218
|
+
};
|
|
219
|
+
readonly 'bg.subtle': {
|
|
220
|
+
readonly value: "#fafafa";
|
|
221
|
+
};
|
|
222
|
+
readonly 'bg.muted': {
|
|
223
|
+
readonly value: "#f4f4f5";
|
|
224
|
+
};
|
|
225
|
+
readonly 'bg.emphasized': {
|
|
226
|
+
readonly value: "#e4e4e7";
|
|
227
|
+
};
|
|
228
|
+
readonly 'bg.inverted': {
|
|
229
|
+
readonly value: "#09090b";
|
|
230
|
+
};
|
|
231
|
+
readonly 'bg.panel': {
|
|
232
|
+
readonly value: "#ffffff";
|
|
233
|
+
};
|
|
234
|
+
readonly 'bg.disabled': {
|
|
235
|
+
readonly value: "rgb(239 239 239)";
|
|
236
|
+
};
|
|
237
|
+
readonly 'bg.error': {
|
|
238
|
+
readonly value: "#fef2f2";
|
|
239
|
+
};
|
|
240
|
+
readonly 'bg.warning': {
|
|
241
|
+
readonly value: "#fff7ed";
|
|
242
|
+
};
|
|
243
|
+
readonly 'bg.success': {
|
|
244
|
+
readonly value: "#f0fdf4";
|
|
245
|
+
};
|
|
246
|
+
readonly 'bg.info': {
|
|
247
|
+
readonly value: "#e6f4ff";
|
|
248
|
+
};
|
|
249
|
+
readonly fg: {
|
|
250
|
+
readonly value: "rgb(0 0 0 / 88%)";
|
|
251
|
+
};
|
|
252
|
+
readonly 'fg.muted': {
|
|
253
|
+
readonly value: "rgb(0 0 0 / 45%)";
|
|
254
|
+
};
|
|
255
|
+
readonly 'fg.subtle': {
|
|
256
|
+
readonly value: "rgb(0 0 0 / 25%)";
|
|
257
|
+
};
|
|
258
|
+
readonly 'fg.inverted': {
|
|
259
|
+
readonly value: "#ffffff";
|
|
260
|
+
};
|
|
261
|
+
readonly 'fg.disabled': {
|
|
262
|
+
readonly value: "rgb(0 0 0 / 25%)";
|
|
263
|
+
};
|
|
264
|
+
readonly 'fg.error': {
|
|
265
|
+
readonly value: "#ff4d4f";
|
|
266
|
+
};
|
|
267
|
+
readonly 'fg.warning': {
|
|
268
|
+
readonly value: "#faad14";
|
|
269
|
+
};
|
|
270
|
+
readonly 'fg.success': {
|
|
271
|
+
readonly value: "#52c41a";
|
|
272
|
+
};
|
|
273
|
+
readonly 'fg.info': {
|
|
274
|
+
readonly value: "#1677ff";
|
|
275
|
+
};
|
|
276
|
+
readonly border: {
|
|
277
|
+
readonly value: "#d9d9d9";
|
|
278
|
+
};
|
|
279
|
+
readonly 'border.muted': {
|
|
280
|
+
readonly value: "#f0f0f0";
|
|
281
|
+
};
|
|
282
|
+
readonly 'border.subtle': {
|
|
283
|
+
readonly value: "#fafafa";
|
|
284
|
+
};
|
|
285
|
+
readonly 'border.emphasized': {
|
|
286
|
+
readonly value: "#d9d9d9";
|
|
287
|
+
};
|
|
288
|
+
readonly 'border.inverted': {
|
|
289
|
+
readonly value: "#434343";
|
|
290
|
+
};
|
|
291
|
+
readonly 'border.error': {
|
|
292
|
+
readonly value: "#ff4d4f";
|
|
293
|
+
};
|
|
294
|
+
readonly 'border.warning': {
|
|
295
|
+
readonly value: "#faad14";
|
|
296
|
+
};
|
|
297
|
+
readonly 'border.success': {
|
|
298
|
+
readonly value: "#52c41a";
|
|
299
|
+
};
|
|
300
|
+
readonly 'border.info': {
|
|
301
|
+
readonly value: "#1677ff";
|
|
302
|
+
};
|
|
303
|
+
readonly 'gray.contrast': {
|
|
304
|
+
readonly value: "#ffffff";
|
|
305
|
+
};
|
|
306
|
+
readonly 'gray.fg': {
|
|
307
|
+
readonly value: "rgb(0 0 0 / 88%)";
|
|
308
|
+
};
|
|
309
|
+
readonly 'gray.subtle': {
|
|
310
|
+
readonly value: "#fafafa";
|
|
311
|
+
};
|
|
312
|
+
readonly 'gray.muted': {
|
|
313
|
+
readonly value: "#f5f5f5";
|
|
314
|
+
};
|
|
315
|
+
readonly 'gray.emphasized': {
|
|
316
|
+
readonly value: "#d9d9d9";
|
|
317
|
+
};
|
|
318
|
+
readonly 'gray.solid': {
|
|
319
|
+
readonly value: "#1f1f1f";
|
|
320
|
+
};
|
|
321
|
+
readonly 'gray.focus-ring': {
|
|
322
|
+
readonly value: "rgb(0 0 0 / 15%)";
|
|
323
|
+
};
|
|
324
|
+
readonly 'gray.border': {
|
|
325
|
+
readonly value: "#d9d9d9";
|
|
326
|
+
};
|
|
327
|
+
readonly 'blue.contrast': {
|
|
328
|
+
readonly value: "#ffffff";
|
|
329
|
+
};
|
|
330
|
+
readonly 'blue.fg': {
|
|
331
|
+
readonly value: "#1677ff";
|
|
332
|
+
};
|
|
333
|
+
readonly 'blue.subtle': {
|
|
334
|
+
readonly value: "#e6f4ff";
|
|
335
|
+
};
|
|
336
|
+
readonly 'blue.muted': {
|
|
337
|
+
readonly value: "#bae0ff";
|
|
338
|
+
};
|
|
339
|
+
readonly 'blue.emphasized': {
|
|
340
|
+
readonly value: "#69b1ff";
|
|
341
|
+
};
|
|
342
|
+
readonly 'blue.solid': {
|
|
343
|
+
readonly value: "#1677ff";
|
|
344
|
+
};
|
|
345
|
+
readonly 'blue.hover': {
|
|
346
|
+
readonly value: "#4096ff";
|
|
347
|
+
};
|
|
348
|
+
readonly 'blue.active': {
|
|
349
|
+
readonly value: "#0958d9";
|
|
350
|
+
};
|
|
351
|
+
readonly 'blue.focus-ring': {
|
|
352
|
+
readonly value: "rgb(21 112 239 / 25%)";
|
|
353
|
+
};
|
|
354
|
+
readonly 'blue.border': {
|
|
355
|
+
readonly value: "#1677ff";
|
|
356
|
+
};
|
|
357
|
+
readonly 'red.contrast': {
|
|
358
|
+
readonly value: "#ffffff";
|
|
359
|
+
};
|
|
360
|
+
readonly 'red.fg': {
|
|
361
|
+
readonly value: "#ff4d4f";
|
|
362
|
+
};
|
|
363
|
+
readonly 'red.subtle': {
|
|
364
|
+
readonly value: "#fff1f0";
|
|
365
|
+
};
|
|
366
|
+
readonly 'red.muted': {
|
|
367
|
+
readonly value: "#ffccc7";
|
|
368
|
+
};
|
|
369
|
+
readonly 'red.emphasized': {
|
|
370
|
+
readonly value: "#ffa39e";
|
|
371
|
+
};
|
|
372
|
+
readonly 'red.solid': {
|
|
373
|
+
readonly value: "#ff4d4f";
|
|
374
|
+
};
|
|
375
|
+
readonly 'red.hover': {
|
|
376
|
+
readonly value: "#ff7875";
|
|
377
|
+
};
|
|
378
|
+
readonly 'red.active': {
|
|
379
|
+
readonly value: "#d9363e";
|
|
380
|
+
};
|
|
381
|
+
readonly 'red.focus-ring': {
|
|
382
|
+
readonly value: "rgb(255 77 79 / 25%)";
|
|
383
|
+
};
|
|
384
|
+
readonly 'red.border': {
|
|
385
|
+
readonly value: "#ff4d4f";
|
|
386
|
+
};
|
|
387
|
+
};
|
|
388
|
+
};
|
|
389
|
+
/**
|
|
390
|
+
* 默认 `colors` 取值联合,供组件 props 引用。
|
|
391
|
+
*/
|
|
392
|
+
export type ColorToken = TokenCategoryKeys<typeof colors>;
|
|
393
|
+
/**
|
|
394
|
+
* 默认 `spacing` 取值联合,供组件 props 引用。
|
|
395
|
+
*/
|
|
396
|
+
export type SpacingToken = TokenCategoryKeys<typeof spacing>;
|
|
397
|
+
/**
|
|
398
|
+
* 默认 `radii` 取值联合,供组件 props 引用。
|
|
399
|
+
*/
|
|
400
|
+
export type RadiiToken = TokenCategoryKeys<typeof radii>;
|
|
401
|
+
/**
|
|
402
|
+
* 默认 `shadows` 取值联合,供组件 props 引用。
|
|
403
|
+
*/
|
|
404
|
+
export type ShadowToken = TokenCategoryKeys<typeof shadows>;
|
|
405
|
+
/**
|
|
406
|
+
* 默认 `fonts` 取值联合,供组件 props 引用。
|
|
407
|
+
*/
|
|
408
|
+
export type FontToken = TokenCategoryKeys<typeof fonts>;
|
|
409
|
+
/**
|
|
410
|
+
* 默认 `fontSizes` 取值联合,供组件 props 引用。
|
|
411
|
+
*/
|
|
412
|
+
export type FontSizeToken = TokenCategoryKeys<typeof fontSizes>;
|
|
413
|
+
/**
|
|
414
|
+
* 默认 `controlHeights` 取值联合,供组件 props 引用。
|
|
415
|
+
*/
|
|
416
|
+
export type ControlHeightToken = TokenCategoryKeys<typeof controlHeights>;
|
|
417
|
+
/**
|
|
418
|
+
* 默认 `focusRings` 取值联合,供组件 props 引用。
|
|
419
|
+
*/
|
|
420
|
+
export type FocusRingToken = TokenCategoryKeys<typeof focusRings>;
|
|
421
|
+
//#endregion
|
|
422
|
+
export { colors, controlHeights, focusRings, fontSizes, fonts, radii, shadows, spacing };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { colors } from "./colors.js";
|
|
2
|
+
import { controlHeights } from "./control-heights.js";
|
|
3
|
+
import { focusRings } from "./focus-rings.js";
|
|
4
|
+
import { fontSizes } from "./font-sizes.js";
|
|
5
|
+
import { fonts } from "./fonts.js";
|
|
6
|
+
import { radii } from "./radii.js";
|
|
7
|
+
import { shadows } from "./shadows.js";
|
|
8
|
+
import { spacing } from "./spacing.js";
|
|
9
|
+
import { defineTokens } from "../define-tokens.js";
|
|
10
|
+
//#region system/defaults/index.ts
|
|
11
|
+
/**
|
|
12
|
+
* 库默认 tokens:结构 scale + 语义色(含 `colors`)。
|
|
13
|
+
*
|
|
14
|
+
* 构建与默认用法:`createSystem(defaultConfig)`、`createSystem('default', defaultConfig)`,或直接使用 `defaultSystem`。
|
|
15
|
+
* 业务覆盖:`createSystem('app', defaultConfig, customTokens)`。
|
|
16
|
+
*/
|
|
17
|
+
const defaultConfig = defineTokens({
|
|
18
|
+
spacing,
|
|
19
|
+
radii,
|
|
20
|
+
shadows,
|
|
21
|
+
fonts,
|
|
22
|
+
fontSizes,
|
|
23
|
+
controlHeights,
|
|
24
|
+
focusRings,
|
|
25
|
+
colors
|
|
26
|
+
});
|
|
27
|
+
//#endregion
|
|
28
|
+
export { colors, controlHeights, defaultConfig, focusRings, fontSizes, fonts, radii, shadows, spacing };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
//#region system/defaults/radii.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* 默认圆角 scale(对齐 Chakra,值为 px)。
|
|
4
|
+
*/
|
|
5
|
+
export declare const radii: {
|
|
6
|
+
readonly none: {
|
|
7
|
+
readonly value: "0";
|
|
8
|
+
};
|
|
9
|
+
readonly '2xs': {
|
|
10
|
+
readonly value: "1px";
|
|
11
|
+
};
|
|
12
|
+
readonly xs: {
|
|
13
|
+
readonly value: "2px";
|
|
14
|
+
};
|
|
15
|
+
readonly sm: {
|
|
16
|
+
readonly value: "4px";
|
|
17
|
+
};
|
|
18
|
+
readonly md: {
|
|
19
|
+
readonly value: "6px";
|
|
20
|
+
};
|
|
21
|
+
readonly lg: {
|
|
22
|
+
readonly value: "8px";
|
|
23
|
+
};
|
|
24
|
+
readonly xl: {
|
|
25
|
+
readonly value: "12px";
|
|
26
|
+
};
|
|
27
|
+
readonly '2xl': {
|
|
28
|
+
readonly value: "16px";
|
|
29
|
+
};
|
|
30
|
+
readonly '3xl': {
|
|
31
|
+
readonly value: "24px";
|
|
32
|
+
};
|
|
33
|
+
readonly '4xl': {
|
|
34
|
+
readonly value: "32px";
|
|
35
|
+
};
|
|
36
|
+
readonly full: {
|
|
37
|
+
readonly value: "9999px";
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
//#endregion
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
//#region system/defaults/radii.ts
|
|
2
|
+
/**
|
|
3
|
+
* 默认圆角 scale(对齐 Chakra,值为 px)。
|
|
4
|
+
*/
|
|
5
|
+
const radii = {
|
|
6
|
+
none: { value: "0" },
|
|
7
|
+
"2xs": { value: "1px" },
|
|
8
|
+
xs: { value: "2px" },
|
|
9
|
+
sm: { value: "4px" },
|
|
10
|
+
md: { value: "6px" },
|
|
11
|
+
lg: { value: "8px" },
|
|
12
|
+
xl: { value: "12px" },
|
|
13
|
+
"2xl": { value: "16px" },
|
|
14
|
+
"3xl": { value: "24px" },
|
|
15
|
+
"4xl": { value: "32px" },
|
|
16
|
+
full: { value: "9999px" }
|
|
17
|
+
};
|
|
18
|
+
//#endregion
|
|
19
|
+
export { radii };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
//#region system/defaults/shadows.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* 默认阴影档位。
|
|
4
|
+
*/
|
|
5
|
+
export declare const shadows: {
|
|
6
|
+
readonly xs: {
|
|
7
|
+
readonly value: "0px 1px 2px rgb(24 24 27 / 0.1), 0px 0px 1px rgb(24 24 27 / 0.2)";
|
|
8
|
+
};
|
|
9
|
+
readonly sm: {
|
|
10
|
+
readonly value: "0px 2px 4px rgb(24 24 27 / 0.1), 0px 0px 1px rgb(24 24 27 / 0.3)";
|
|
11
|
+
};
|
|
12
|
+
readonly md: {
|
|
13
|
+
readonly value: "0px 4px 8px rgb(24 24 27 / 0.1), 0px 0px 1px rgb(24 24 27 / 0.3)";
|
|
14
|
+
};
|
|
15
|
+
readonly lg: {
|
|
16
|
+
readonly value: "0px 8px 16px rgb(24 24 27 / 0.1), 0px 0px 1px rgb(24 24 27 / 0.3)";
|
|
17
|
+
};
|
|
18
|
+
readonly xl: {
|
|
19
|
+
readonly value: "0px 16px 24px rgb(24 24 27 / 0.1), 0px 0px 1px rgb(24 24 27 / 0.3)";
|
|
20
|
+
};
|
|
21
|
+
readonly '2xl': {
|
|
22
|
+
readonly value: "0px 24px 40px rgb(24 24 27 / 0.16), 0px 0px 1px rgb(24 24 27 / 0.3)";
|
|
23
|
+
};
|
|
24
|
+
readonly inner: {
|
|
25
|
+
readonly value: "inset 0 2px 4px 0 rgb(9 9 11 / 0.05)";
|
|
26
|
+
};
|
|
27
|
+
readonly inset: {
|
|
28
|
+
readonly value: "inset 0 0 0 1px rgb(9 9 11 / 0.05)";
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
//#endregion
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
//#region system/defaults/shadows.ts
|
|
2
|
+
/**
|
|
3
|
+
* 默认阴影档位。
|
|
4
|
+
*/
|
|
5
|
+
const shadows = {
|
|
6
|
+
xs: { value: "0px 1px 2px rgb(24 24 27 / 0.1), 0px 0px 1px rgb(24 24 27 / 0.2)" },
|
|
7
|
+
sm: { value: "0px 2px 4px rgb(24 24 27 / 0.1), 0px 0px 1px rgb(24 24 27 / 0.3)" },
|
|
8
|
+
md: { value: "0px 4px 8px rgb(24 24 27 / 0.1), 0px 0px 1px rgb(24 24 27 / 0.3)" },
|
|
9
|
+
lg: { value: "0px 8px 16px rgb(24 24 27 / 0.1), 0px 0px 1px rgb(24 24 27 / 0.3)" },
|
|
10
|
+
xl: { value: "0px 16px 24px rgb(24 24 27 / 0.1), 0px 0px 1px rgb(24 24 27 / 0.3)" },
|
|
11
|
+
"2xl": { value: "0px 24px 40px rgb(24 24 27 / 0.16), 0px 0px 1px rgb(24 24 27 / 0.3)" },
|
|
12
|
+
inner: { value: "inset 0 2px 4px 0 rgb(9 9 11 / 0.05)" },
|
|
13
|
+
inset: { value: "inset 0 0 0 1px rgb(9 9 11 / 0.05)" }
|
|
14
|
+
};
|
|
15
|
+
//#endregion
|
|
16
|
+
export { shadows };
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
//#region system/defaults/spacing.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* 默认间距 scale(对齐 Chakra,值为 px)。
|
|
4
|
+
*/
|
|
5
|
+
export declare const spacing: {
|
|
6
|
+
readonly 0: {
|
|
7
|
+
readonly value: "0";
|
|
8
|
+
};
|
|
9
|
+
readonly 0.5: {
|
|
10
|
+
readonly value: "2px";
|
|
11
|
+
};
|
|
12
|
+
readonly 1: {
|
|
13
|
+
readonly value: "4px";
|
|
14
|
+
};
|
|
15
|
+
readonly 1.5: {
|
|
16
|
+
readonly value: "6px";
|
|
17
|
+
};
|
|
18
|
+
readonly 2: {
|
|
19
|
+
readonly value: "8px";
|
|
20
|
+
};
|
|
21
|
+
readonly 2.5: {
|
|
22
|
+
readonly value: "10px";
|
|
23
|
+
};
|
|
24
|
+
readonly 3: {
|
|
25
|
+
readonly value: "12px";
|
|
26
|
+
};
|
|
27
|
+
readonly 3.5: {
|
|
28
|
+
readonly value: "14px";
|
|
29
|
+
};
|
|
30
|
+
readonly 4: {
|
|
31
|
+
readonly value: "16px";
|
|
32
|
+
};
|
|
33
|
+
readonly 4.5: {
|
|
34
|
+
readonly value: "18px";
|
|
35
|
+
};
|
|
36
|
+
readonly 5: {
|
|
37
|
+
readonly value: "20px";
|
|
38
|
+
};
|
|
39
|
+
readonly 6: {
|
|
40
|
+
readonly value: "24px";
|
|
41
|
+
};
|
|
42
|
+
readonly 7: {
|
|
43
|
+
readonly value: "28px";
|
|
44
|
+
};
|
|
45
|
+
readonly 8: {
|
|
46
|
+
readonly value: "32px";
|
|
47
|
+
};
|
|
48
|
+
readonly 9: {
|
|
49
|
+
readonly value: "36px";
|
|
50
|
+
};
|
|
51
|
+
readonly 10: {
|
|
52
|
+
readonly value: "40px";
|
|
53
|
+
};
|
|
54
|
+
readonly 11: {
|
|
55
|
+
readonly value: "44px";
|
|
56
|
+
};
|
|
57
|
+
readonly 12: {
|
|
58
|
+
readonly value: "48px";
|
|
59
|
+
};
|
|
60
|
+
readonly 14: {
|
|
61
|
+
readonly value: "56px";
|
|
62
|
+
};
|
|
63
|
+
readonly 16: {
|
|
64
|
+
readonly value: "64px";
|
|
65
|
+
};
|
|
66
|
+
readonly 20: {
|
|
67
|
+
readonly value: "80px";
|
|
68
|
+
};
|
|
69
|
+
readonly 24: {
|
|
70
|
+
readonly value: "96px";
|
|
71
|
+
};
|
|
72
|
+
readonly 28: {
|
|
73
|
+
readonly value: "112px";
|
|
74
|
+
};
|
|
75
|
+
readonly 32: {
|
|
76
|
+
readonly value: "128px";
|
|
77
|
+
};
|
|
78
|
+
readonly 36: {
|
|
79
|
+
readonly value: "144px";
|
|
80
|
+
};
|
|
81
|
+
readonly 40: {
|
|
82
|
+
readonly value: "160px";
|
|
83
|
+
};
|
|
84
|
+
readonly 44: {
|
|
85
|
+
readonly value: "176px";
|
|
86
|
+
};
|
|
87
|
+
readonly 48: {
|
|
88
|
+
readonly value: "192px";
|
|
89
|
+
};
|
|
90
|
+
readonly 52: {
|
|
91
|
+
readonly value: "208px";
|
|
92
|
+
};
|
|
93
|
+
readonly 56: {
|
|
94
|
+
readonly value: "224px";
|
|
95
|
+
};
|
|
96
|
+
readonly 60: {
|
|
97
|
+
readonly value: "240px";
|
|
98
|
+
};
|
|
99
|
+
readonly 64: {
|
|
100
|
+
readonly value: "256px";
|
|
101
|
+
};
|
|
102
|
+
readonly 72: {
|
|
103
|
+
readonly value: "288px";
|
|
104
|
+
};
|
|
105
|
+
readonly 80: {
|
|
106
|
+
readonly value: "320px";
|
|
107
|
+
};
|
|
108
|
+
readonly 96: {
|
|
109
|
+
readonly value: "384px";
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
//#endregion
|