@kingsoft-ai/design 0.1.19 → 0.2.6
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.cjs +3150 -2478
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +7430 -6241
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/DesignThemeProvider.d.ts +25 -20
- package/dist/types/button/Button.d.ts +4 -19
- package/dist/types/button/Button.style.d.ts +4 -35
- package/dist/types/button/IconButton.d.ts +4 -5
- package/dist/types/button/IconButton.style.d.ts +4 -7
- package/dist/types/button/styled-tokens.d.ts +582 -0
- package/dist/types/button/tokens.d.ts +1 -1
- package/dist/types/button/tokens.types.d.ts +190 -0
- package/dist/types/card/Card.d.ts +0 -6
- package/dist/types/card/Card.style.d.ts +4 -7
- package/dist/types/card/styled-tokens.d.ts +130 -0
- package/dist/types/card/tokens.d.ts +1 -1
- package/dist/types/card/tokens.types.d.ts +48 -0
- package/dist/types/checkbox/Checkbox.d.ts +0 -7
- package/dist/types/checkbox/Checkbox.style.d.ts +29 -7
- package/dist/types/checkbox/CheckboxButton.d.ts +0 -16
- package/dist/types/checkbox/CheckboxButton.style.d.ts +24 -12
- package/dist/types/checkbox/styled-tokens.d.ts +122 -0
- package/dist/types/checkbox/tokens.d.ts +1 -1
- package/dist/types/checkbox/tokens.types.d.ts +39 -0
- package/dist/types/collapse/Collapse.d.ts +2 -34
- package/dist/types/collapse/Collapse.style.d.ts +4 -43
- package/dist/types/collapse/styled-tokens.d.ts +77 -0
- package/dist/types/collapse/tokens.d.ts +1 -1
- package/dist/types/collapse/tokens.types.d.ts +28 -0
- package/dist/types/context/ThemeContext.d.ts +24 -0
- package/dist/types/context/index.d.ts +2 -0
- package/dist/types/floatButton/FloatButton.d.ts +0 -21
- package/dist/types/floatButton/FloatButton.style.d.ts +0 -31
- package/dist/types/floatButton/styled-tokens.d.ts +127 -0
- package/dist/types/floatButton/tokens.d.ts +1 -1
- package/dist/types/floatButton/tokens.types.d.ts +66 -0
- package/dist/types/index.d.ts +5 -4
- package/dist/types/input/Input.d.ts +4 -22
- package/dist/types/input/Input.style.d.ts +4 -48
- package/dist/types/input/styled-tokens.d.ts +147 -0
- package/dist/types/input/tokens.d.ts +1 -1
- package/dist/types/input/tokens.types.d.ts +46 -0
- package/dist/types/link/Link.d.ts +4 -0
- package/dist/types/link/Link.style.d.ts +4 -10
- package/dist/types/link/styled-tokens.d.ts +107 -0
- package/dist/types/link/tokens.d.ts +1 -1
- package/dist/types/link/tokens.types.d.ts +39 -0
- package/dist/types/menu/Menu.d.ts +0 -25
- package/dist/types/menu/Menu.style.d.ts +4 -43
- package/dist/types/menu/MenuItem.d.ts +0 -6
- package/dist/types/menu/styled-tokens.d.ts +217 -0
- package/dist/types/menu/tokens.d.ts +1 -1
- package/dist/types/menu/tokens.types.d.ts +79 -0
- package/dist/types/modal/Modal.d.ts +0 -8
- package/dist/types/modal/Modal.style.d.ts +4 -11
- package/dist/types/modal/styled-tokens.d.ts +370 -0
- package/dist/types/modal/tokens.d.ts +1 -1
- package/dist/types/modal/tokens.types.d.ts +107 -0
- package/dist/types/numberInput/NumberInput.d.ts +2 -22
- package/dist/types/numberInput/NumberInput.style.d.ts +4 -7
- package/dist/types/numberInput/styled-tokens.d.ts +192 -0
- package/dist/types/numberInput/tokens.d.ts +1 -1
- package/dist/types/numberInput/tokens.types.d.ts +65 -0
- package/dist/types/progress/Progress.d.ts +4 -27
- package/dist/types/progress/Progress.style.d.ts +4 -43
- package/dist/types/progress/styled-tokens.d.ts +137 -0
- package/dist/types/progress/tokens.d.ts +3 -0
- package/dist/types/progress/tokens.types.d.ts +52 -0
- package/dist/types/radio/Radio.d.ts +4 -0
- package/dist/types/radio/Radio.style.d.ts +9 -28
- package/dist/types/radio/styled-tokens.d.ts +122 -0
- package/dist/types/radio/tokens.d.ts +1 -1
- package/dist/types/radio/tokens.types.d.ts +41 -0
- package/dist/types/select/Select.style.d.ts +4 -7
- package/dist/types/select/styled-tokens.d.ts +237 -0
- package/dist/types/select/tokens.d.ts +1 -1
- package/dist/types/select/tokens.types.d.ts +72 -0
- package/dist/types/skeleton/Skeleton.style.d.ts +0 -25
- package/dist/types/skeleton/styled-tokens.d.ts +82 -0
- package/dist/types/skeleton/tokens.d.ts +1 -1
- package/dist/types/skeleton/tokens.types.d.ts +31 -0
- package/dist/types/slider/Slider.d.ts +74 -0
- package/dist/types/slider/Slider.style.d.ts +125 -0
- package/dist/types/slider/__tests__/Slider.test.d.ts +13 -0
- package/dist/types/slider/index.d.ts +2 -0
- package/dist/types/slider/styled-tokens.d.ts +252 -0
- package/dist/types/slider/tokens.d.ts +3 -0
- package/dist/types/slider/tokens.types.d.ts +121 -0
- package/dist/types/stepper/Stepper.d.ts +3 -0
- package/dist/types/stepper/Stepper.style.d.ts +4 -7
- package/dist/types/stepper/styled-tokens.d.ts +157 -0
- package/dist/types/stepper/tokens.d.ts +1 -1
- package/dist/types/stepper/tokens.types.d.ts +68 -0
- package/dist/types/switch/Switch.d.ts +4 -35
- package/dist/types/switch/Switch.style.d.ts +4 -56
- package/dist/types/switch/styled-tokens.d.ts +132 -0
- package/dist/types/switch/tokens.d.ts +1 -1
- package/dist/types/switch/tokens.types.d.ts +45 -0
- package/dist/types/table/Table.d.ts +2 -0
- package/dist/types/table/Table.style.d.ts +4 -7
- package/dist/types/table/styled-tokens.d.ts +182 -0
- package/dist/types/table/tokens.d.ts +3 -0
- package/dist/types/table/tokens.types.d.ts +43 -0
- package/dist/types/tag/Tag.d.ts +4 -36
- package/dist/types/tag/Tag.style.d.ts +5 -41
- package/dist/types/tag/styled-tokens.d.ts +140 -0
- package/dist/types/tag/tokens.d.ts +1 -1
- package/dist/types/tag/tokens.types.d.ts +76 -0
- package/dist/types/theme.d.ts +1 -2
- package/dist/types/tooltip/Tooltip.d.ts +0 -18
- package/dist/types/tooltip/Tooltip.style.d.ts +0 -19
- package/dist/types/tooltip/styled-tokens.d.ts +72 -0
- package/dist/types/tooltip/tokens.d.ts +1 -1
- package/dist/types/tooltip/tokens.types.d.ts +21 -0
- package/dist/types/transfer/Transfer.d.ts +0 -20
- package/dist/types/transfer/Transfer.style.d.ts +0 -10
- package/dist/types/transfer/styled-tokens.d.ts +252 -0
- package/dist/types/transfer/tokens.d.ts +1 -1
- package/dist/types/transfer/tokens.types.d.ts +79 -0
- package/dist/types/types/index.d.ts +64 -4
- package/dist/types/upload/Upload.d.ts +2 -21
- package/dist/types/upload/Upload.style.d.ts +4 -64
- package/dist/types/upload/styled-tokens.d.ts +227 -0
- package/dist/types/upload/tokens.d.ts +3 -0
- package/dist/types/upload/tokens.types.d.ts +66 -0
- package/dist/types/utils/index.d.ts +4 -0
- package/dist/types/utils/styled-token.d.ts +117 -0
- package/package.json +5 -4
- package/dist/styles.css +0 -1
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Transfer Styled Tokens
|
|
3
|
+
*
|
|
4
|
+
* 将 Transfer 的 JS tokens 与 CSS 变量映射,实现:
|
|
5
|
+
* - 有 ThemeProvider 时:使用 JS token 值(可被用户自定义)
|
|
6
|
+
* - 无 ThemeProvider 时:fallback 到 CSS 变量(基础样式)
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Transfer 组件的 Styled Tokens
|
|
10
|
+
*/
|
|
11
|
+
export declare const $transfer: {
|
|
12
|
+
readonly containerGap: (props: {
|
|
13
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
14
|
+
_useCSSVariables?: boolean;
|
|
15
|
+
};
|
|
16
|
+
}) => string;
|
|
17
|
+
readonly panelWidth: (props: {
|
|
18
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
19
|
+
_useCSSVariables?: boolean;
|
|
20
|
+
};
|
|
21
|
+
}) => string;
|
|
22
|
+
readonly panelHeight: (props: {
|
|
23
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
24
|
+
_useCSSVariables?: boolean;
|
|
25
|
+
};
|
|
26
|
+
}) => string;
|
|
27
|
+
readonly panelBg: (props: {
|
|
28
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
29
|
+
_useCSSVariables?: boolean;
|
|
30
|
+
};
|
|
31
|
+
}) => string;
|
|
32
|
+
readonly panelBorder: (props: {
|
|
33
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
34
|
+
_useCSSVariables?: boolean;
|
|
35
|
+
};
|
|
36
|
+
}) => string;
|
|
37
|
+
readonly panelBorderRadius: (props: {
|
|
38
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
39
|
+
_useCSSVariables?: boolean;
|
|
40
|
+
};
|
|
41
|
+
}) => string;
|
|
42
|
+
readonly headerHeight: (props: {
|
|
43
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
44
|
+
_useCSSVariables?: boolean;
|
|
45
|
+
};
|
|
46
|
+
}) => string;
|
|
47
|
+
readonly headerPadding: (props: {
|
|
48
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
49
|
+
_useCSSVariables?: boolean;
|
|
50
|
+
};
|
|
51
|
+
}) => string;
|
|
52
|
+
readonly headerFontSize: (props: {
|
|
53
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
54
|
+
_useCSSVariables?: boolean;
|
|
55
|
+
};
|
|
56
|
+
}) => string;
|
|
57
|
+
readonly headerColor: (props: {
|
|
58
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
59
|
+
_useCSSVariables?: boolean;
|
|
60
|
+
};
|
|
61
|
+
}) => string;
|
|
62
|
+
readonly headerBg: (props: {
|
|
63
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
64
|
+
_useCSSVariables?: boolean;
|
|
65
|
+
};
|
|
66
|
+
}) => string;
|
|
67
|
+
readonly listHeight: (props: {
|
|
68
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
69
|
+
_useCSSVariables?: boolean;
|
|
70
|
+
};
|
|
71
|
+
}) => string;
|
|
72
|
+
readonly listGap: (props: {
|
|
73
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
74
|
+
_useCSSVariables?: boolean;
|
|
75
|
+
};
|
|
76
|
+
}) => string;
|
|
77
|
+
readonly listPadding: (props: {
|
|
78
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
79
|
+
_useCSSVariables?: boolean;
|
|
80
|
+
};
|
|
81
|
+
}) => string;
|
|
82
|
+
readonly itemHeight: (props: {
|
|
83
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
84
|
+
_useCSSVariables?: boolean;
|
|
85
|
+
};
|
|
86
|
+
}) => string;
|
|
87
|
+
readonly itemFontSize: (props: {
|
|
88
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
89
|
+
_useCSSVariables?: boolean;
|
|
90
|
+
};
|
|
91
|
+
}) => string;
|
|
92
|
+
readonly itemBorderRadius: (props: {
|
|
93
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
94
|
+
_useCSSVariables?: boolean;
|
|
95
|
+
};
|
|
96
|
+
}) => string;
|
|
97
|
+
readonly itemGap: (props: {
|
|
98
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
99
|
+
_useCSSVariables?: boolean;
|
|
100
|
+
};
|
|
101
|
+
}) => string;
|
|
102
|
+
readonly itemPadding: (props: {
|
|
103
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
104
|
+
_useCSSVariables?: boolean;
|
|
105
|
+
};
|
|
106
|
+
}) => string;
|
|
107
|
+
readonly itemText: (props: {
|
|
108
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
109
|
+
_useCSSVariables?: boolean;
|
|
110
|
+
};
|
|
111
|
+
}) => string;
|
|
112
|
+
readonly itemTextSelected: (props: {
|
|
113
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
114
|
+
_useCSSVariables?: boolean;
|
|
115
|
+
};
|
|
116
|
+
}) => string;
|
|
117
|
+
readonly itemTextDisabled: (props: {
|
|
118
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
119
|
+
_useCSSVariables?: boolean;
|
|
120
|
+
};
|
|
121
|
+
}) => string;
|
|
122
|
+
readonly itemCheckboxSize: (props: {
|
|
123
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
124
|
+
_useCSSVariables?: boolean;
|
|
125
|
+
};
|
|
126
|
+
}) => string;
|
|
127
|
+
readonly operationsGap: (props: {
|
|
128
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
129
|
+
_useCSSVariables?: boolean;
|
|
130
|
+
};
|
|
131
|
+
}) => string;
|
|
132
|
+
readonly operationsBorderRadius: (props: {
|
|
133
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
134
|
+
_useCSSVariables?: boolean;
|
|
135
|
+
};
|
|
136
|
+
}) => string;
|
|
137
|
+
readonly operationsWidth: (props: {
|
|
138
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
139
|
+
_useCSSVariables?: boolean;
|
|
140
|
+
};
|
|
141
|
+
}) => string;
|
|
142
|
+
readonly operationsHeight: (props: {
|
|
143
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
144
|
+
_useCSSVariables?: boolean;
|
|
145
|
+
};
|
|
146
|
+
}) => string;
|
|
147
|
+
readonly operationsIconSize: (props: {
|
|
148
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
149
|
+
_useCSSVariables?: boolean;
|
|
150
|
+
};
|
|
151
|
+
}) => string;
|
|
152
|
+
readonly operationsBorder: (props: {
|
|
153
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
154
|
+
_useCSSVariables?: boolean;
|
|
155
|
+
};
|
|
156
|
+
}) => string;
|
|
157
|
+
readonly operationsBorderDisabled: (props: {
|
|
158
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
159
|
+
_useCSSVariables?: boolean;
|
|
160
|
+
};
|
|
161
|
+
}) => string;
|
|
162
|
+
readonly operationsBorderActive: (props: {
|
|
163
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
164
|
+
_useCSSVariables?: boolean;
|
|
165
|
+
};
|
|
166
|
+
}) => string;
|
|
167
|
+
readonly operationsBg: (props: {
|
|
168
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
169
|
+
_useCSSVariables?: boolean;
|
|
170
|
+
};
|
|
171
|
+
}) => string;
|
|
172
|
+
readonly operationsBgDisabled: (props: {
|
|
173
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
174
|
+
_useCSSVariables?: boolean;
|
|
175
|
+
};
|
|
176
|
+
}) => string;
|
|
177
|
+
readonly operationsBgActive: (props: {
|
|
178
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
179
|
+
_useCSSVariables?: boolean;
|
|
180
|
+
};
|
|
181
|
+
}) => string;
|
|
182
|
+
readonly operationsIcon: (props: {
|
|
183
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
184
|
+
_useCSSVariables?: boolean;
|
|
185
|
+
};
|
|
186
|
+
}) => string;
|
|
187
|
+
readonly operationsIconDisabled: (props: {
|
|
188
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
189
|
+
_useCSSVariables?: boolean;
|
|
190
|
+
};
|
|
191
|
+
}) => string;
|
|
192
|
+
readonly operationsIconActive: (props: {
|
|
193
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
194
|
+
_useCSSVariables?: boolean;
|
|
195
|
+
};
|
|
196
|
+
}) => string;
|
|
197
|
+
readonly footerHeight: (props: {
|
|
198
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
199
|
+
_useCSSVariables?: boolean;
|
|
200
|
+
};
|
|
201
|
+
}) => string;
|
|
202
|
+
readonly footerPaddingInline: (props: {
|
|
203
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
204
|
+
_useCSSVariables?: boolean;
|
|
205
|
+
};
|
|
206
|
+
}) => string;
|
|
207
|
+
readonly footerFontSize: (props: {
|
|
208
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
209
|
+
_useCSSVariables?: boolean;
|
|
210
|
+
};
|
|
211
|
+
}) => string;
|
|
212
|
+
readonly footerColor: (props: {
|
|
213
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
214
|
+
_useCSSVariables?: boolean;
|
|
215
|
+
};
|
|
216
|
+
}) => string;
|
|
217
|
+
readonly footerBorderTop: (props: {
|
|
218
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
219
|
+
_useCSSVariables?: boolean;
|
|
220
|
+
};
|
|
221
|
+
}) => string;
|
|
222
|
+
readonly footerMarginTop: (props: {
|
|
223
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
224
|
+
_useCSSVariables?: boolean;
|
|
225
|
+
};
|
|
226
|
+
}) => string;
|
|
227
|
+
readonly emptyColor: (props: {
|
|
228
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
229
|
+
_useCSSVariables?: boolean;
|
|
230
|
+
};
|
|
231
|
+
}) => string;
|
|
232
|
+
readonly emptyFontSize: (props: {
|
|
233
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
234
|
+
_useCSSVariables?: boolean;
|
|
235
|
+
};
|
|
236
|
+
}) => string;
|
|
237
|
+
readonly searchWidth: (props: {
|
|
238
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
239
|
+
_useCSSVariables?: boolean;
|
|
240
|
+
};
|
|
241
|
+
}) => string;
|
|
242
|
+
readonly searchIconColor: (props: {
|
|
243
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
244
|
+
_useCSSVariables?: boolean;
|
|
245
|
+
};
|
|
246
|
+
}) => string;
|
|
247
|
+
readonly transition: (props: {
|
|
248
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
249
|
+
_useCSSVariables?: boolean;
|
|
250
|
+
};
|
|
251
|
+
}) => string;
|
|
252
|
+
};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Transfer 组件 Token 类型定义
|
|
3
|
+
*/
|
|
4
|
+
export interface TransferTokens {
|
|
5
|
+
container: {
|
|
6
|
+
gap: string;
|
|
7
|
+
};
|
|
8
|
+
panel: {
|
|
9
|
+
width: string;
|
|
10
|
+
height: string;
|
|
11
|
+
background: string;
|
|
12
|
+
border: string;
|
|
13
|
+
borderRadius: string;
|
|
14
|
+
};
|
|
15
|
+
header: {
|
|
16
|
+
height: string;
|
|
17
|
+
padding: string;
|
|
18
|
+
fontSize: string;
|
|
19
|
+
color: string;
|
|
20
|
+
background: string;
|
|
21
|
+
};
|
|
22
|
+
list: {
|
|
23
|
+
height: string;
|
|
24
|
+
gap: string;
|
|
25
|
+
padding: string;
|
|
26
|
+
};
|
|
27
|
+
item: {
|
|
28
|
+
height: string;
|
|
29
|
+
padding: string;
|
|
30
|
+
fontSize: string;
|
|
31
|
+
borderRadius: string;
|
|
32
|
+
gap: string;
|
|
33
|
+
text: {
|
|
34
|
+
default: string;
|
|
35
|
+
selected: string;
|
|
36
|
+
disabled: string;
|
|
37
|
+
};
|
|
38
|
+
checkboxSize: string;
|
|
39
|
+
};
|
|
40
|
+
operations: {
|
|
41
|
+
gap: string;
|
|
42
|
+
borderRadius: string;
|
|
43
|
+
borderColor: {
|
|
44
|
+
default: string;
|
|
45
|
+
disabled: string;
|
|
46
|
+
active: string;
|
|
47
|
+
};
|
|
48
|
+
backgroundColor?: {
|
|
49
|
+
default: string;
|
|
50
|
+
disabled: string;
|
|
51
|
+
active: string;
|
|
52
|
+
};
|
|
53
|
+
width: string;
|
|
54
|
+
height: string;
|
|
55
|
+
iconSize: string;
|
|
56
|
+
iconColor: {
|
|
57
|
+
default: string;
|
|
58
|
+
disabled: string;
|
|
59
|
+
active: string;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
search?: {
|
|
63
|
+
width: string;
|
|
64
|
+
iconColor: string;
|
|
65
|
+
};
|
|
66
|
+
footer: {
|
|
67
|
+
height: string;
|
|
68
|
+
paddingInline: string;
|
|
69
|
+
fontSize: string;
|
|
70
|
+
color: string;
|
|
71
|
+
borderTop: string;
|
|
72
|
+
marginTop: string;
|
|
73
|
+
};
|
|
74
|
+
empty: {
|
|
75
|
+
color: string;
|
|
76
|
+
fontSize: string;
|
|
77
|
+
};
|
|
78
|
+
transition: string;
|
|
79
|
+
}
|
|
@@ -1,6 +1,66 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Design Token 类型定义 - 统一导出
|
|
3
|
+
*
|
|
4
|
+
* 从各组件目录 re-export 所有 Token 类型
|
|
3
5
|
*/
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
6
|
+
export type { ButtonTokens, IconButtonTokens } from '../button/tokens.types';
|
|
7
|
+
export type { FloatButtonTokens } from '../floatButton/tokens.types';
|
|
8
|
+
export type { CheckboxTokens } from '../checkbox/tokens.types';
|
|
9
|
+
export type { RadioTokens } from '../radio/tokens.types';
|
|
10
|
+
export type { SwitchTokens } from '../switch/tokens.types';
|
|
11
|
+
export type { InputTokens } from '../input/tokens.types';
|
|
12
|
+
export type { NumberFieldTokens } from '../numberInput/tokens.types';
|
|
13
|
+
export type { SelectTokens } from '../select/tokens.types';
|
|
14
|
+
export type { CollapseTokens } from '../collapse/tokens.types';
|
|
15
|
+
export type { MenuTokens } from '../menu/tokens.types';
|
|
16
|
+
export type { LinkTokens } from '../link/tokens.types';
|
|
17
|
+
export type { TagTokens, TagColorTokens } from '../tag/tokens.types';
|
|
18
|
+
export type { SkeletonTokens } from '../skeleton/tokens.types';
|
|
19
|
+
export type { StepperTokens } from '../stepper/tokens.types';
|
|
20
|
+
export type { CardTokens } from '../card/tokens.types';
|
|
21
|
+
export type { TooltipTokens } from '../tooltip/tokens.types';
|
|
22
|
+
export type { SliderTokens } from '../slider/tokens.types';
|
|
23
|
+
export type { ModalTokens } from '../modal/tokens.types';
|
|
24
|
+
export type { TransferTokens } from '../transfer/tokens.types';
|
|
25
|
+
export type { ThemeContext, TokenGenerator, DeepPartial } from './theme-utils';
|
|
26
|
+
import type { ButtonTokens, IconButtonTokens } from '../button/tokens.types';
|
|
27
|
+
import type { FloatButtonTokens } from '../floatButton/tokens.types';
|
|
28
|
+
import type { CheckboxTokens } from '../checkbox/tokens.types';
|
|
29
|
+
import type { RadioTokens } from '../radio/tokens.types';
|
|
30
|
+
import type { SwitchTokens } from '../switch/tokens.types';
|
|
31
|
+
import type { InputTokens } from '../input/tokens.types';
|
|
32
|
+
import type { NumberFieldTokens } from '../numberInput/tokens.types';
|
|
33
|
+
import type { SelectTokens } from '../select/tokens.types';
|
|
34
|
+
import type { CollapseTokens } from '../collapse/tokens.types';
|
|
35
|
+
import type { MenuTokens } from '../menu/tokens.types';
|
|
36
|
+
import type { LinkTokens } from '../link/tokens.types';
|
|
37
|
+
import type { TagTokens } from '../tag/tokens.types';
|
|
38
|
+
import type { SkeletonTokens } from '../skeleton/tokens.types';
|
|
39
|
+
import type { StepperTokens } from '../stepper/tokens.types';
|
|
40
|
+
import type { CardTokens } from '../card/tokens.types';
|
|
41
|
+
import type { TooltipTokens } from '../tooltip/tokens.types';
|
|
42
|
+
import type { ModalTokens } from '../modal/tokens.types';
|
|
43
|
+
import type { TransferTokens } from '../transfer/tokens.types';
|
|
44
|
+
import type { SliderTokens } from '../slider/tokens.types';
|
|
45
|
+
export interface ComponentTokens {
|
|
46
|
+
button: ButtonTokens;
|
|
47
|
+
floatButton: FloatButtonTokens;
|
|
48
|
+
iconButton: IconButtonTokens;
|
|
49
|
+
checkbox: CheckboxTokens;
|
|
50
|
+
radio: RadioTokens;
|
|
51
|
+
switch: SwitchTokens;
|
|
52
|
+
input: InputTokens;
|
|
53
|
+
select: SelectTokens;
|
|
54
|
+
collapse: CollapseTokens;
|
|
55
|
+
tag: TagTokens;
|
|
56
|
+
skeleton: SkeletonTokens;
|
|
57
|
+
stepper: StepperTokens;
|
|
58
|
+
numberfield: NumberFieldTokens;
|
|
59
|
+
menu: MenuTokens;
|
|
60
|
+
link: LinkTokens;
|
|
61
|
+
transfer: TransferTokens;
|
|
62
|
+
modal: ModalTokens;
|
|
63
|
+
card: CardTokens;
|
|
64
|
+
tooltip: TooltipTokens;
|
|
65
|
+
slider: SliderTokens;
|
|
66
|
+
}
|
|
@@ -1,18 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Upload 上传组件
|
|
3
|
-
*
|
|
4
|
-
* 基于 react-aria 实现无障碍访问的上传组件
|
|
5
|
-
* 完全符合 Figma 设计稿规范
|
|
6
|
-
*
|
|
7
|
-
* @example
|
|
8
|
-
* ```tsx
|
|
9
|
-
* <Upload
|
|
10
|
-
* accept=".xls,.xlsx"
|
|
11
|
-
* maxSize={5 * 1024 * 1024}
|
|
12
|
-
* onChange={(files) => console.log(files)}
|
|
13
|
-
* />
|
|
14
|
-
* ```
|
|
15
|
-
*/
|
|
16
1
|
import { type ReactNode } from 'react';
|
|
17
2
|
import { type UploadStatus } from './Upload.style';
|
|
18
3
|
export declare const STATUSES: readonly ["idle", "uploading", "success", "error"];
|
|
@@ -68,13 +53,9 @@ export type UploadProps = {
|
|
|
68
53
|
onDownloadTemplate?: () => void;
|
|
69
54
|
/** 自定义类名 */
|
|
70
55
|
className?: string;
|
|
56
|
+
/** 自定义样式(支持 CSS 变量定制) */
|
|
57
|
+
style?: React.CSSProperties;
|
|
71
58
|
/** 自定义上传图标 */
|
|
72
59
|
icon?: ReactNode;
|
|
73
60
|
};
|
|
74
|
-
/**
|
|
75
|
-
* Upload 上传组件
|
|
76
|
-
*
|
|
77
|
-
* 基于 Figma 设计规范实现的上传组件,支持拖拽上传和点击上传
|
|
78
|
-
* 使用 react-aria 保证无障碍访问性
|
|
79
|
-
*/
|
|
80
61
|
export declare const Upload: import("react").ForwardRefExoticComponent<UploadProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,25 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Upload
|
|
2
|
+
* Upload Styled Components
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* -
|
|
6
|
-
* -
|
|
7
|
-
* - Tier 3 (Component): 组件专用 Token
|
|
8
|
-
*
|
|
9
|
-
* 完全还原 Figma 设计稿规范
|
|
4
|
+
* 使用 Styled Token System 实现样式:
|
|
5
|
+
* - JS Token 优先(来自 ThemeProvider,支持用户自定义)
|
|
6
|
+
* - CSS 变量作为 fallback(无 Provider 时的兜底)
|
|
10
7
|
*/
|
|
11
8
|
export declare const uploadStatuses: readonly ["idle", "uploading", "success", "error"];
|
|
12
9
|
export type UploadStatus = (typeof uploadStatuses)[number];
|
|
13
|
-
/**
|
|
14
|
-
* 上传区域容器
|
|
15
|
-
*/
|
|
16
10
|
export declare const UploadRoot: import("@emotion/styled").StyledComponent<{
|
|
17
11
|
theme?: import("@emotion/react").Theme;
|
|
18
12
|
as?: React.ElementType;
|
|
19
13
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
20
|
-
/**
|
|
21
|
-
* 拖拽区域
|
|
22
|
-
*/
|
|
23
14
|
export declare const UploadDropzone: import("@emotion/styled").StyledComponent<{
|
|
24
15
|
theme?: import("@emotion/react").Theme;
|
|
25
16
|
as?: React.ElementType;
|
|
@@ -27,131 +18,80 @@ export declare const UploadDropzone: import("@emotion/styled").StyledComponent<{
|
|
|
27
18
|
isDragActive: boolean;
|
|
28
19
|
isDisabled: boolean;
|
|
29
20
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
30
|
-
/**
|
|
31
|
-
* 上传图标容器
|
|
32
|
-
*/
|
|
33
21
|
export declare const UploadIconWrapper: import("@emotion/styled").StyledComponent<{
|
|
34
22
|
theme?: import("@emotion/react").Theme;
|
|
35
23
|
as?: React.ElementType;
|
|
36
24
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
37
|
-
/**
|
|
38
|
-
* 上传提示文本容器
|
|
39
|
-
*/
|
|
40
25
|
export declare const UploadTextWrapper: import("@emotion/styled").StyledComponent<{
|
|
41
26
|
theme?: import("@emotion/react").Theme;
|
|
42
27
|
as?: React.ElementType;
|
|
43
28
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
44
|
-
/**
|
|
45
|
-
* 主要提示文本
|
|
46
|
-
*/
|
|
47
29
|
export declare const UploadMainText: import("@emotion/styled").StyledComponent<{
|
|
48
30
|
theme?: import("@emotion/react").Theme;
|
|
49
31
|
as?: React.ElementType;
|
|
50
32
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
51
|
-
/**
|
|
52
|
-
* 次要提示文本
|
|
53
|
-
*/
|
|
54
33
|
export declare const UploadSecondaryText: import("@emotion/styled").StyledComponent<{
|
|
55
34
|
theme?: import("@emotion/react").Theme;
|
|
56
35
|
as?: React.ElementType;
|
|
57
36
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, {}>;
|
|
58
|
-
/**
|
|
59
|
-
* 链接文本
|
|
60
|
-
*/
|
|
61
37
|
export declare const UploadLink: import("@emotion/styled").StyledComponent<{
|
|
62
38
|
theme?: import("@emotion/react").Theme;
|
|
63
39
|
as?: React.ElementType;
|
|
64
40
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
65
|
-
/**
|
|
66
|
-
* 文件列表容器
|
|
67
|
-
*/
|
|
68
41
|
export declare const FileList: import("@emotion/styled").StyledComponent<{
|
|
69
42
|
theme?: import("@emotion/react").Theme;
|
|
70
43
|
as?: React.ElementType;
|
|
71
44
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
72
|
-
/**
|
|
73
|
-
* 文件项容器
|
|
74
|
-
*/
|
|
75
45
|
export declare const FileItem: import("@emotion/styled").StyledComponent<{
|
|
76
46
|
theme?: import("@emotion/react").Theme;
|
|
77
47
|
as?: React.ElementType;
|
|
78
48
|
} & {
|
|
79
49
|
status: UploadStatus;
|
|
80
50
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
81
|
-
/**
|
|
82
|
-
* 文件信息行
|
|
83
|
-
*/
|
|
84
51
|
export declare const FileInfoRow: import("@emotion/styled").StyledComponent<{
|
|
85
52
|
theme?: import("@emotion/react").Theme;
|
|
86
53
|
as?: React.ElementType;
|
|
87
54
|
} & {
|
|
88
55
|
status: UploadStatus;
|
|
89
56
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
90
|
-
/**
|
|
91
|
-
* 文件图标
|
|
92
|
-
*/
|
|
93
57
|
export declare const FileIcon: import("@emotion/styled").StyledComponent<{
|
|
94
58
|
theme?: import("@emotion/react").Theme;
|
|
95
59
|
as?: React.ElementType;
|
|
96
60
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
97
|
-
/**
|
|
98
|
-
* 文件名
|
|
99
|
-
*/
|
|
100
61
|
export declare const FileName: import("@emotion/styled").StyledComponent<{
|
|
101
62
|
theme?: import("@emotion/react").Theme;
|
|
102
63
|
as?: React.ElementType;
|
|
103
64
|
} & {
|
|
104
65
|
status: UploadStatus;
|
|
105
66
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
106
|
-
/**
|
|
107
|
-
* 状态图标
|
|
108
|
-
*/
|
|
109
67
|
export declare const StatusIcon: import("@emotion/styled").StyledComponent<{
|
|
110
68
|
theme?: import("@emotion/react").Theme;
|
|
111
69
|
as?: React.ElementType;
|
|
112
70
|
} & {
|
|
113
71
|
status: UploadStatus;
|
|
114
72
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
115
|
-
/**
|
|
116
|
-
* 删除按钮
|
|
117
|
-
*/
|
|
118
73
|
export declare const DeleteButton: import("@emotion/styled").StyledComponent<{
|
|
119
74
|
theme?: import("@emotion/react").Theme;
|
|
120
75
|
as?: React.ElementType;
|
|
121
76
|
}, import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {}>;
|
|
122
|
-
/**
|
|
123
|
-
* 进度条容器
|
|
124
|
-
*/
|
|
125
77
|
export declare const ProgressWrapper: import("@emotion/styled").StyledComponent<{
|
|
126
78
|
theme?: import("@emotion/react").Theme;
|
|
127
79
|
as?: React.ElementType;
|
|
128
80
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
129
|
-
/**
|
|
130
|
-
* 进度条轨道
|
|
131
|
-
*/
|
|
132
81
|
export declare const ProgressTrack: import("@emotion/styled").StyledComponent<{
|
|
133
82
|
theme?: import("@emotion/react").Theme;
|
|
134
83
|
as?: React.ElementType;
|
|
135
84
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
136
|
-
/**
|
|
137
|
-
* 进度条填充
|
|
138
|
-
*/
|
|
139
85
|
export declare const ProgressBar: import("@emotion/styled").StyledComponent<{
|
|
140
86
|
theme?: import("@emotion/react").Theme;
|
|
141
87
|
as?: React.ElementType;
|
|
142
88
|
} & {
|
|
143
89
|
percent: number;
|
|
144
90
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
145
|
-
/**
|
|
146
|
-
* 进度百分比文本
|
|
147
|
-
*/
|
|
148
91
|
export declare const ProgressText: import("@emotion/styled").StyledComponent<{
|
|
149
92
|
theme?: import("@emotion/react").Theme;
|
|
150
93
|
as?: React.ElementType;
|
|
151
94
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
152
|
-
/**
|
|
153
|
-
* 隐藏的文件输入框
|
|
154
|
-
*/
|
|
155
95
|
export declare const HiddenInput: import("@emotion/styled").StyledComponent<{
|
|
156
96
|
theme?: import("@emotion/react").Theme;
|
|
157
97
|
as?: React.ElementType;
|