@kingsoft-ai/design 0.1.18 → 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 +7211 -7849
- 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 +14 -13
- package/dist/styles.css +0 -1
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Slider Styled Tokens
|
|
3
|
+
*
|
|
4
|
+
* 将 Slider 的 JS tokens 与 CSS 变量映射,实现:
|
|
5
|
+
* - 有 ThemeProvider 时:使用 JS token 值(可被用户自定义)
|
|
6
|
+
* - 无 ThemeProvider 时:fallback 到 CSS 变量(基础样式)
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Slider 组件的 Styled Tokens
|
|
10
|
+
*/
|
|
11
|
+
export declare const $slider: {
|
|
12
|
+
readonly trackBg: (props: {
|
|
13
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
14
|
+
_useCSSVariables?: boolean;
|
|
15
|
+
};
|
|
16
|
+
}) => string;
|
|
17
|
+
readonly trackBgDisabled: (props: {
|
|
18
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
19
|
+
_useCSSVariables?: boolean;
|
|
20
|
+
};
|
|
21
|
+
}) => string;
|
|
22
|
+
readonly trackBorder: (props: {
|
|
23
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
24
|
+
_useCSSVariables?: boolean;
|
|
25
|
+
};
|
|
26
|
+
}) => string;
|
|
27
|
+
readonly trackHeightSm: (props: {
|
|
28
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
29
|
+
_useCSSVariables?: boolean;
|
|
30
|
+
};
|
|
31
|
+
}) => string;
|
|
32
|
+
readonly trackHeightMd: (props: {
|
|
33
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
34
|
+
_useCSSVariables?: boolean;
|
|
35
|
+
};
|
|
36
|
+
}) => string;
|
|
37
|
+
readonly trackHeightLg: (props: {
|
|
38
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
39
|
+
_useCSSVariables?: boolean;
|
|
40
|
+
};
|
|
41
|
+
}) => string;
|
|
42
|
+
readonly fillBg: (props: {
|
|
43
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
44
|
+
_useCSSVariables?: boolean;
|
|
45
|
+
};
|
|
46
|
+
}) => string;
|
|
47
|
+
readonly fillBgHover: (props: {
|
|
48
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
49
|
+
_useCSSVariables?: boolean;
|
|
50
|
+
};
|
|
51
|
+
}) => string;
|
|
52
|
+
readonly fillBgDisabled: (props: {
|
|
53
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
54
|
+
_useCSSVariables?: boolean;
|
|
55
|
+
};
|
|
56
|
+
}) => string;
|
|
57
|
+
readonly thumbBg: (props: {
|
|
58
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
59
|
+
_useCSSVariables?: boolean;
|
|
60
|
+
};
|
|
61
|
+
}) => string;
|
|
62
|
+
readonly thumbBgHover: (props: {
|
|
63
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
64
|
+
_useCSSVariables?: boolean;
|
|
65
|
+
};
|
|
66
|
+
}) => string;
|
|
67
|
+
readonly thumbBgActive: (props: {
|
|
68
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
69
|
+
_useCSSVariables?: boolean;
|
|
70
|
+
};
|
|
71
|
+
}) => string;
|
|
72
|
+
readonly thumbBgDisabled: (props: {
|
|
73
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
74
|
+
_useCSSVariables?: boolean;
|
|
75
|
+
};
|
|
76
|
+
}) => string;
|
|
77
|
+
readonly thumbBorder: (props: {
|
|
78
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
79
|
+
_useCSSVariables?: boolean;
|
|
80
|
+
};
|
|
81
|
+
}) => string;
|
|
82
|
+
readonly thumbBorderHover: (props: {
|
|
83
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
84
|
+
_useCSSVariables?: boolean;
|
|
85
|
+
};
|
|
86
|
+
}) => string;
|
|
87
|
+
readonly thumbBorderActive: (props: {
|
|
88
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
89
|
+
_useCSSVariables?: boolean;
|
|
90
|
+
};
|
|
91
|
+
}) => string;
|
|
92
|
+
readonly thumbBorderDisabled: (props: {
|
|
93
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
94
|
+
_useCSSVariables?: boolean;
|
|
95
|
+
};
|
|
96
|
+
}) => string;
|
|
97
|
+
readonly thumbShadow: (props: {
|
|
98
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
99
|
+
_useCSSVariables?: boolean;
|
|
100
|
+
};
|
|
101
|
+
}) => string;
|
|
102
|
+
readonly thumbShadowHover: (props: {
|
|
103
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
104
|
+
_useCSSVariables?: boolean;
|
|
105
|
+
};
|
|
106
|
+
}) => string;
|
|
107
|
+
readonly thumbShadowActive: (props: {
|
|
108
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
109
|
+
_useCSSVariables?: boolean;
|
|
110
|
+
};
|
|
111
|
+
}) => string;
|
|
112
|
+
readonly thumbSizeSm: (props: {
|
|
113
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
114
|
+
_useCSSVariables?: boolean;
|
|
115
|
+
};
|
|
116
|
+
}) => string;
|
|
117
|
+
readonly thumbSizeMd: (props: {
|
|
118
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
119
|
+
_useCSSVariables?: boolean;
|
|
120
|
+
};
|
|
121
|
+
}) => string;
|
|
122
|
+
readonly thumbSizeLg: (props: {
|
|
123
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
124
|
+
_useCSSVariables?: boolean;
|
|
125
|
+
};
|
|
126
|
+
}) => string;
|
|
127
|
+
readonly labelColor: (props: {
|
|
128
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
129
|
+
_useCSSVariables?: boolean;
|
|
130
|
+
};
|
|
131
|
+
}) => string;
|
|
132
|
+
readonly labelColorDisabled: (props: {
|
|
133
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
134
|
+
_useCSSVariables?: boolean;
|
|
135
|
+
};
|
|
136
|
+
}) => string;
|
|
137
|
+
readonly labelFontSize: (props: {
|
|
138
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
139
|
+
_useCSSVariables?: boolean;
|
|
140
|
+
};
|
|
141
|
+
}) => string;
|
|
142
|
+
readonly labelFontWeight: (props: {
|
|
143
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
144
|
+
_useCSSVariables?: boolean;
|
|
145
|
+
};
|
|
146
|
+
}) => string;
|
|
147
|
+
readonly valueColor: (props: {
|
|
148
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
149
|
+
_useCSSVariables?: boolean;
|
|
150
|
+
};
|
|
151
|
+
}) => string;
|
|
152
|
+
readonly valueColorDisabled: (props: {
|
|
153
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
154
|
+
_useCSSVariables?: boolean;
|
|
155
|
+
};
|
|
156
|
+
}) => string;
|
|
157
|
+
readonly valueFontSize: (props: {
|
|
158
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
159
|
+
_useCSSVariables?: boolean;
|
|
160
|
+
};
|
|
161
|
+
}) => string;
|
|
162
|
+
readonly markDotSize: (props: {
|
|
163
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
164
|
+
_useCSSVariables?: boolean;
|
|
165
|
+
};
|
|
166
|
+
}) => string;
|
|
167
|
+
readonly markDotBg: (props: {
|
|
168
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
169
|
+
_useCSSVariables?: boolean;
|
|
170
|
+
};
|
|
171
|
+
}) => string;
|
|
172
|
+
readonly markDotBgActive: (props: {
|
|
173
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
174
|
+
_useCSSVariables?: boolean;
|
|
175
|
+
};
|
|
176
|
+
}) => string;
|
|
177
|
+
readonly markLabelColor: (props: {
|
|
178
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
179
|
+
_useCSSVariables?: boolean;
|
|
180
|
+
};
|
|
181
|
+
}) => string;
|
|
182
|
+
readonly markLabelColorActive: (props: {
|
|
183
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
184
|
+
_useCSSVariables?: boolean;
|
|
185
|
+
};
|
|
186
|
+
}) => string;
|
|
187
|
+
readonly markLabelFontSize: (props: {
|
|
188
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
189
|
+
_useCSSVariables?: boolean;
|
|
190
|
+
};
|
|
191
|
+
}) => string;
|
|
192
|
+
readonly tooltipBg: (props: {
|
|
193
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
194
|
+
_useCSSVariables?: boolean;
|
|
195
|
+
};
|
|
196
|
+
}) => string;
|
|
197
|
+
readonly tooltipText: (props: {
|
|
198
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
199
|
+
_useCSSVariables?: boolean;
|
|
200
|
+
};
|
|
201
|
+
}) => string;
|
|
202
|
+
readonly tooltipFontSize: (props: {
|
|
203
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
204
|
+
_useCSSVariables?: boolean;
|
|
205
|
+
};
|
|
206
|
+
}) => string;
|
|
207
|
+
readonly tooltipBorderRadius: (props: {
|
|
208
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
209
|
+
_useCSSVariables?: boolean;
|
|
210
|
+
};
|
|
211
|
+
}) => string;
|
|
212
|
+
readonly tooltipPadding: (props: {
|
|
213
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
214
|
+
_useCSSVariables?: boolean;
|
|
215
|
+
};
|
|
216
|
+
}) => string;
|
|
217
|
+
readonly tooltipShadow: (props: {
|
|
218
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
219
|
+
_useCSSVariables?: boolean;
|
|
220
|
+
};
|
|
221
|
+
}) => string;
|
|
222
|
+
readonly focusRingColor: (props: {
|
|
223
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
224
|
+
_useCSSVariables?: boolean;
|
|
225
|
+
};
|
|
226
|
+
}) => string;
|
|
227
|
+
readonly focusRingWidth: (props: {
|
|
228
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
229
|
+
_useCSSVariables?: boolean;
|
|
230
|
+
};
|
|
231
|
+
}) => string;
|
|
232
|
+
readonly focusRingOffset: (props: {
|
|
233
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
234
|
+
_useCSSVariables?: boolean;
|
|
235
|
+
};
|
|
236
|
+
}) => string;
|
|
237
|
+
readonly borderRadius: (props: {
|
|
238
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
239
|
+
_useCSSVariables?: boolean;
|
|
240
|
+
};
|
|
241
|
+
}) => string;
|
|
242
|
+
readonly transition: (props: {
|
|
243
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
244
|
+
_useCSSVariables?: boolean;
|
|
245
|
+
};
|
|
246
|
+
}) => string;
|
|
247
|
+
readonly disabledOpacity: (props: {
|
|
248
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
249
|
+
_useCSSVariables?: boolean;
|
|
250
|
+
};
|
|
251
|
+
}) => string;
|
|
252
|
+
};
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Slider 组件 Token 类型定义
|
|
3
|
+
*/
|
|
4
|
+
export interface SliderTokens {
|
|
5
|
+
/** 轨道样式 */
|
|
6
|
+
track: {
|
|
7
|
+
/** 背景色 */
|
|
8
|
+
background: {
|
|
9
|
+
default: string;
|
|
10
|
+
disabled: string;
|
|
11
|
+
};
|
|
12
|
+
/** 边框 */
|
|
13
|
+
border: {
|
|
14
|
+
default: string;
|
|
15
|
+
};
|
|
16
|
+
/** 尺寸 */
|
|
17
|
+
height: {
|
|
18
|
+
sm: string;
|
|
19
|
+
md: string;
|
|
20
|
+
lg: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
/** 已填充区域样式 */
|
|
24
|
+
fill: {
|
|
25
|
+
/** 背景色 */
|
|
26
|
+
background: {
|
|
27
|
+
default: string;
|
|
28
|
+
hover: string;
|
|
29
|
+
disabled: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
/** 滑块(拖动按钮)样式 */
|
|
33
|
+
thumb: {
|
|
34
|
+
/** 背景色 */
|
|
35
|
+
background: {
|
|
36
|
+
default: string;
|
|
37
|
+
hover: string;
|
|
38
|
+
active: string;
|
|
39
|
+
disabled: string;
|
|
40
|
+
};
|
|
41
|
+
/** 边框 */
|
|
42
|
+
border: {
|
|
43
|
+
default: string;
|
|
44
|
+
hover: string;
|
|
45
|
+
active: string;
|
|
46
|
+
disabled: string;
|
|
47
|
+
};
|
|
48
|
+
/** 阴影 */
|
|
49
|
+
shadow: {
|
|
50
|
+
default: string;
|
|
51
|
+
hover: string;
|
|
52
|
+
active: string;
|
|
53
|
+
};
|
|
54
|
+
/** 尺寸 */
|
|
55
|
+
size: {
|
|
56
|
+
sm: string;
|
|
57
|
+
md: string;
|
|
58
|
+
lg: string;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
/** 标签样式 */
|
|
62
|
+
label: {
|
|
63
|
+
/** 文字颜色 */
|
|
64
|
+
color: {
|
|
65
|
+
default: string;
|
|
66
|
+
disabled: string;
|
|
67
|
+
};
|
|
68
|
+
/** 字体大小 */
|
|
69
|
+
fontSize: string;
|
|
70
|
+
/** 字体粗细 */
|
|
71
|
+
fontWeight: number;
|
|
72
|
+
};
|
|
73
|
+
/** 数值显示样式 */
|
|
74
|
+
value: {
|
|
75
|
+
/** 文字颜色 */
|
|
76
|
+
color: {
|
|
77
|
+
default: string;
|
|
78
|
+
disabled: string;
|
|
79
|
+
};
|
|
80
|
+
/** 字体大小 */
|
|
81
|
+
fontSize: string;
|
|
82
|
+
};
|
|
83
|
+
/** 刻度标记样式 */
|
|
84
|
+
mark: {
|
|
85
|
+
/** 点标记 */
|
|
86
|
+
dot: {
|
|
87
|
+
size: string;
|
|
88
|
+
background: {
|
|
89
|
+
default: string;
|
|
90
|
+
active: string;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
/** 标记文字 */
|
|
94
|
+
label: {
|
|
95
|
+
color: {
|
|
96
|
+
default: string;
|
|
97
|
+
active: string;
|
|
98
|
+
};
|
|
99
|
+
fontSize: string;
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
/** Tooltip 样式 */
|
|
103
|
+
tooltip: {
|
|
104
|
+
background: string;
|
|
105
|
+
text: string;
|
|
106
|
+
fontSize: string;
|
|
107
|
+
borderRadius: string;
|
|
108
|
+
padding: string;
|
|
109
|
+
shadow: string;
|
|
110
|
+
};
|
|
111
|
+
/** 焦点环 */
|
|
112
|
+
focusRing: {
|
|
113
|
+
color: string;
|
|
114
|
+
width: string;
|
|
115
|
+
offset: string;
|
|
116
|
+
};
|
|
117
|
+
/** 通用属性 */
|
|
118
|
+
borderRadius: string;
|
|
119
|
+
transition: string;
|
|
120
|
+
disabledOpacity: number;
|
|
121
|
+
}
|
|
@@ -13,7 +13,10 @@ export interface StepperProps {
|
|
|
13
13
|
variant?: StepperVariant;
|
|
14
14
|
/** Children (Step components) */
|
|
15
15
|
children: ReactNode;
|
|
16
|
+
/** Custom class name */
|
|
16
17
|
className?: string;
|
|
18
|
+
/** Custom style (supports CSS variable customization) */
|
|
19
|
+
style?: React.CSSProperties;
|
|
17
20
|
/** Callback when step is clicked */
|
|
18
21
|
onChange?: (index: number) => void;
|
|
19
22
|
}
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Stepper
|
|
2
|
+
* Stepper Styled Components
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* -
|
|
6
|
-
* -
|
|
7
|
-
* - Tier 3 (Component): 组件专用 Token --ksd-stepper-*
|
|
8
|
-
*
|
|
9
|
-
* 无需 ThemeProvider,直接使用 CSS 变量
|
|
4
|
+
* 使用 Styled Token System 实现样式:
|
|
5
|
+
* - JS Token 优先(来自 ThemeProvider,支持用户自定义)
|
|
6
|
+
* - CSS 变量作为 fallback(无 Provider 时的兜底)
|
|
10
7
|
*/
|
|
11
8
|
export type StepperOrientation = 'horizontal' | 'vertical';
|
|
12
9
|
export type StepperLabelPlacement = 'right' | 'bottom';
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stepper Styled Tokens
|
|
3
|
+
*
|
|
4
|
+
* 将 Stepper 的 JS tokens 与 CSS 变量映射,实现:
|
|
5
|
+
* - 有 ThemeProvider 时:使用 JS token 值(可被用户自定义)
|
|
6
|
+
* - 无 ThemeProvider 时:fallback 到 CSS 变量(基础样式)
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Stepper 组件的 Styled Tokens
|
|
10
|
+
*/
|
|
11
|
+
export declare const $stepper: {
|
|
12
|
+
readonly gap: (props: {
|
|
13
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
14
|
+
_useCSSVariables?: boolean;
|
|
15
|
+
};
|
|
16
|
+
}) => string;
|
|
17
|
+
readonly circleMdSize: (props: {
|
|
18
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
19
|
+
_useCSSVariables?: boolean;
|
|
20
|
+
};
|
|
21
|
+
}) => string;
|
|
22
|
+
readonly circleSmSize: (props: {
|
|
23
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
24
|
+
_useCSSVariables?: boolean;
|
|
25
|
+
};
|
|
26
|
+
}) => string;
|
|
27
|
+
readonly circleMdFontSize: (props: {
|
|
28
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
29
|
+
_useCSSVariables?: boolean;
|
|
30
|
+
};
|
|
31
|
+
}) => string;
|
|
32
|
+
readonly circleSmFontSize: (props: {
|
|
33
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
34
|
+
_useCSSVariables?: boolean;
|
|
35
|
+
};
|
|
36
|
+
}) => string;
|
|
37
|
+
readonly circleMdIconSize: (props: {
|
|
38
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
39
|
+
_useCSSVariables?: boolean;
|
|
40
|
+
};
|
|
41
|
+
}) => string;
|
|
42
|
+
readonly circleSmIconSize: (props: {
|
|
43
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
44
|
+
_useCSSVariables?: boolean;
|
|
45
|
+
};
|
|
46
|
+
}) => string;
|
|
47
|
+
readonly dotMdSize: (props: {
|
|
48
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
49
|
+
_useCSSVariables?: boolean;
|
|
50
|
+
};
|
|
51
|
+
}) => string;
|
|
52
|
+
readonly dotSmSize: (props: {
|
|
53
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
54
|
+
_useCSSVariables?: boolean;
|
|
55
|
+
};
|
|
56
|
+
}) => string;
|
|
57
|
+
readonly dotPulseColor: (props: {
|
|
58
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
59
|
+
_useCSSVariables?: boolean;
|
|
60
|
+
};
|
|
61
|
+
}) => string;
|
|
62
|
+
readonly lineColor: (props: {
|
|
63
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
64
|
+
_useCSSVariables?: boolean;
|
|
65
|
+
};
|
|
66
|
+
}) => string;
|
|
67
|
+
readonly lineColorActive: (props: {
|
|
68
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
69
|
+
_useCSSVariables?: boolean;
|
|
70
|
+
};
|
|
71
|
+
}) => string;
|
|
72
|
+
readonly lineSize: (props: {
|
|
73
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
74
|
+
_useCSSVariables?: boolean;
|
|
75
|
+
};
|
|
76
|
+
}) => string;
|
|
77
|
+
readonly titleColor: (props: {
|
|
78
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
79
|
+
_useCSSVariables?: boolean;
|
|
80
|
+
};
|
|
81
|
+
}) => string;
|
|
82
|
+
readonly titleColorActive: (props: {
|
|
83
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
84
|
+
_useCSSVariables?: boolean;
|
|
85
|
+
};
|
|
86
|
+
}) => string;
|
|
87
|
+
readonly titleColorError: (props: {
|
|
88
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
89
|
+
_useCSSVariables?: boolean;
|
|
90
|
+
};
|
|
91
|
+
}) => string;
|
|
92
|
+
readonly titleColorWaiting: (props: {
|
|
93
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
94
|
+
_useCSSVariables?: boolean;
|
|
95
|
+
};
|
|
96
|
+
}) => string;
|
|
97
|
+
readonly titleFontWeight: (props: {
|
|
98
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
99
|
+
_useCSSVariables?: boolean;
|
|
100
|
+
};
|
|
101
|
+
}) => string;
|
|
102
|
+
readonly titleFontSize: (props: {
|
|
103
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
104
|
+
_useCSSVariables?: boolean;
|
|
105
|
+
};
|
|
106
|
+
}) => string;
|
|
107
|
+
readonly descriptionColor: (props: {
|
|
108
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
109
|
+
_useCSSVariables?: boolean;
|
|
110
|
+
};
|
|
111
|
+
}) => string;
|
|
112
|
+
readonly descriptionFontSize: (props: {
|
|
113
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
114
|
+
_useCSSVariables?: boolean;
|
|
115
|
+
};
|
|
116
|
+
}) => string;
|
|
117
|
+
readonly processColor: (props: {
|
|
118
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
119
|
+
_useCSSVariables?: boolean;
|
|
120
|
+
};
|
|
121
|
+
}) => string;
|
|
122
|
+
readonly processBg: (props: {
|
|
123
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
124
|
+
_useCSSVariables?: boolean;
|
|
125
|
+
};
|
|
126
|
+
}) => string;
|
|
127
|
+
readonly waitColor: (props: {
|
|
128
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
129
|
+
_useCSSVariables?: boolean;
|
|
130
|
+
};
|
|
131
|
+
}) => string;
|
|
132
|
+
readonly waitBg: (props: {
|
|
133
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
134
|
+
_useCSSVariables?: boolean;
|
|
135
|
+
};
|
|
136
|
+
}) => string;
|
|
137
|
+
readonly finishColor: (props: {
|
|
138
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
139
|
+
_useCSSVariables?: boolean;
|
|
140
|
+
};
|
|
141
|
+
}) => string;
|
|
142
|
+
readonly finishBg: (props: {
|
|
143
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
144
|
+
_useCSSVariables?: boolean;
|
|
145
|
+
};
|
|
146
|
+
}) => string;
|
|
147
|
+
readonly errorColor: (props: {
|
|
148
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
149
|
+
_useCSSVariables?: boolean;
|
|
150
|
+
};
|
|
151
|
+
}) => string;
|
|
152
|
+
readonly errorBg: (props: {
|
|
153
|
+
theme?: import("@kingsoft-ai/theme").Theme & {
|
|
154
|
+
_useCSSVariables?: boolean;
|
|
155
|
+
};
|
|
156
|
+
}) => string;
|
|
157
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stepper 组件 Token 类型定义
|
|
3
|
+
*/
|
|
4
|
+
export interface StepperTokens {
|
|
5
|
+
circle: {
|
|
6
|
+
size: {
|
|
7
|
+
md: string;
|
|
8
|
+
sm: string;
|
|
9
|
+
};
|
|
10
|
+
fontSize: {
|
|
11
|
+
md: string;
|
|
12
|
+
sm: string;
|
|
13
|
+
};
|
|
14
|
+
iconSize: {
|
|
15
|
+
md: string;
|
|
16
|
+
sm: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
dot: {
|
|
20
|
+
size: {
|
|
21
|
+
md: string;
|
|
22
|
+
sm: string;
|
|
23
|
+
};
|
|
24
|
+
pulseColor: string;
|
|
25
|
+
};
|
|
26
|
+
line: {
|
|
27
|
+
color: {
|
|
28
|
+
default: string;
|
|
29
|
+
active: string;
|
|
30
|
+
};
|
|
31
|
+
size: string;
|
|
32
|
+
};
|
|
33
|
+
text: {
|
|
34
|
+
title: {
|
|
35
|
+
color: {
|
|
36
|
+
default: string;
|
|
37
|
+
active: string;
|
|
38
|
+
error: string;
|
|
39
|
+
waiting: string;
|
|
40
|
+
};
|
|
41
|
+
fontWeight: number;
|
|
42
|
+
fontSize: string;
|
|
43
|
+
};
|
|
44
|
+
description: {
|
|
45
|
+
color: string;
|
|
46
|
+
fontSize: string;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
state: {
|
|
50
|
+
process: {
|
|
51
|
+
color: string;
|
|
52
|
+
bg: string;
|
|
53
|
+
};
|
|
54
|
+
wait: {
|
|
55
|
+
color: string;
|
|
56
|
+
bg: string;
|
|
57
|
+
};
|
|
58
|
+
finish: {
|
|
59
|
+
color: string;
|
|
60
|
+
bg: string;
|
|
61
|
+
};
|
|
62
|
+
error: {
|
|
63
|
+
color: string;
|
|
64
|
+
bg: string;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
gap: string;
|
|
68
|
+
}
|