@aura-react-comp/ui 0.0.0-stage → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +67 -2
- package/esm/alert/index.d.ts +28 -0
- package/esm/alert/index.js +76 -0
- package/esm/alert/index.less +172 -0
- package/esm/avatar/index.d.ts +41 -0
- package/esm/avatar/index.js +117 -0
- package/esm/avatar/index.less +163 -0
- package/esm/badge/index.d.ts +29 -0
- package/esm/badge/index.js +84 -0
- package/esm/badge/index.less +215 -0
- package/esm/breadcrumb/index.d.ts +31 -0
- package/esm/breadcrumb/index.js +91 -0
- package/esm/breadcrumb/index.less +107 -0
- package/esm/button/index.d.ts +28 -0
- package/esm/button/index.js +59 -0
- package/esm/button/index.less +191 -0
- package/esm/card/index.d.ts +67 -0
- package/esm/card/index.js +156 -0
- package/esm/card/index.less +231 -0
- package/esm/checkbox/index.d.ts +35 -0
- package/esm/checkbox/index.js +118 -0
- package/esm/checkbox/index.less +175 -0
- package/esm/collapse/index.d.ts +45 -0
- package/esm/collapse/index.js +157 -0
- package/esm/collapse/index.less +144 -0
- package/esm/divider/index.d.ts +16 -0
- package/esm/divider/index.js +37 -0
- package/esm/divider/index.less +115 -0
- package/esm/dropdown/index.d.ts +38 -0
- package/esm/dropdown/index.js +108 -0
- package/esm/dropdown/index.less +247 -0
- package/esm/empty/index.d.ts +35 -0
- package/esm/empty/index.js +87 -0
- package/esm/empty/index.less +67 -0
- package/esm/flex/index.d.ts +24 -0
- package/esm/flex/index.js +64 -0
- package/esm/flex/index.less +9 -0
- package/esm/form/index.d.ts +121 -0
- package/esm/form/index.js +443 -0
- package/esm/form/index.less +258 -0
- package/esm/global.d.ts +6 -0
- package/esm/index.d.ts +78 -0
- package/esm/index.js +41 -0
- package/esm/input/index.d.ts +51 -0
- package/esm/input/index.js +217 -0
- package/esm/input/index.less +369 -0
- package/esm/layout/index.d.ts +46 -0
- package/esm/layout/index.js +135 -0
- package/esm/layout/index.less +132 -0
- package/esm/menu/index.d.ts +91 -0
- package/esm/menu/index.js +294 -0
- package/esm/menu/index.less +340 -0
- package/esm/message/index.d.ts +33 -0
- package/esm/message/index.js +199 -0
- package/esm/message/index.less +118 -0
- package/esm/notification/index.d.ts +33 -0
- package/esm/notification/index.js +229 -0
- package/esm/notification/index.less +175 -0
- package/esm/pagination/index.d.ts +38 -0
- package/esm/pagination/index.js +182 -0
- package/esm/pagination/index.less +230 -0
- package/esm/popconfirm/index.d.ts +37 -0
- package/esm/popconfirm/index.js +115 -0
- package/esm/popconfirm/index.less +229 -0
- package/esm/radio/index.d.ts +33 -0
- package/esm/radio/index.js +122 -0
- package/esm/radio/index.less +155 -0
- package/esm/rate/index.d.ts +30 -0
- package/esm/rate/index.js +143 -0
- package/esm/rate/index.less +87 -0
- package/esm/result/index.d.ts +19 -0
- package/esm/result/index.js +69 -0
- package/esm/result/index.less +104 -0
- package/esm/scrollbar/index.d.ts +18 -0
- package/esm/scrollbar/index.js +35 -0
- package/esm/scrollbar/index.less +67 -0
- package/esm/select/index.d.ts +63 -0
- package/esm/select/index.js +358 -0
- package/esm/select/index.less +471 -0
- package/esm/slider/index.d.ts +36 -0
- package/esm/slider/index.js +255 -0
- package/esm/slider/index.less +154 -0
- package/esm/space/index.d.ts +16 -0
- package/esm/space/index.js +34 -0
- package/esm/space/index.less +34 -0
- package/esm/spin/index.d.ts +44 -0
- package/esm/spin/index.js +152 -0
- package/esm/spin/index.less +179 -0
- package/esm/steps/index.d.ts +55 -0
- package/esm/steps/index.js +165 -0
- package/esm/steps/index.less +394 -0
- package/esm/switch/index.d.ts +30 -0
- package/esm/switch/index.js +56 -0
- package/esm/switch/index.less +160 -0
- package/esm/tabs/index.d.ts +45 -0
- package/esm/tabs/index.js +170 -0
- package/esm/tabs/index.less +228 -0
- package/esm/tag/index.d.ts +52 -0
- package/esm/tag/index.js +120 -0
- package/esm/tag/index.less +227 -0
- package/esm/textarea/index.d.ts +27 -0
- package/esm/textarea/index.js +84 -0
- package/esm/textarea/index.less +226 -0
- package/esm/theme/ThemeProvider.d.ts +15 -0
- package/esm/theme/ThemeProvider.js +32 -0
- package/esm/theme/index.d.ts +2 -0
- package/esm/theme/index.js +1 -0
- package/esm/theme/tokens.css +183 -0
- package/esm/theme/useTheme.d.ts +1 -0
- package/esm/theme/useTheme.js +1 -0
- package/esm/tooltip/index.d.ts +38 -0
- package/esm/tooltip/index.js +149 -0
- package/esm/tooltip/index.less +244 -0
- package/esm/typography/index.d.ts +26 -0
- package/esm/typography/index.js +92 -0
- package/esm/typography/index.less +107 -0
- package/esm/upload/index.d.ts +68 -0
- package/esm/upload/index.js +447 -0
- package/esm/upload/index.less +376 -0
- package/esm/upload/request.d.ts +26 -0
- package/esm/upload/request.js +38 -0
- package/package.json +56 -3
|
@@ -0,0 +1,471 @@
|
|
|
1
|
+
.aura-select {
|
|
2
|
+
position: relative;
|
|
3
|
+
display: inline-block;
|
|
4
|
+
width: 100%;
|
|
5
|
+
max-width: 100%;
|
|
6
|
+
box-sizing: border-box;
|
|
7
|
+
min-width: 160px;
|
|
8
|
+
|
|
9
|
+
&-selector {
|
|
10
|
+
display: flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
width: 100%;
|
|
13
|
+
padding: 8px 32px 8px 12px;
|
|
14
|
+
font-size: var(--aura-font-size-md);
|
|
15
|
+
font-family: inherit;
|
|
16
|
+
line-height: 1.5;
|
|
17
|
+
border: 1px solid var(--aura-border);
|
|
18
|
+
border-radius: var(--aura-radius-md);
|
|
19
|
+
background: var(--aura-bg);
|
|
20
|
+
color: var(--aura-text);
|
|
21
|
+
cursor: pointer;
|
|
22
|
+
transition: all var(--aura-duration-normal) var(--aura-easing);
|
|
23
|
+
position: relative;
|
|
24
|
+
min-height: 38px;
|
|
25
|
+
box-sizing: border-box;
|
|
26
|
+
|
|
27
|
+
&:hover {
|
|
28
|
+
border-color: var(--aura-primary-700);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&:focus-visible {
|
|
32
|
+
outline: none;
|
|
33
|
+
box-shadow: 0 0 0 2px var(--aura-primary-200);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// 箭头区域
|
|
38
|
+
&-arrow {
|
|
39
|
+
position: absolute;
|
|
40
|
+
right: 10px;
|
|
41
|
+
top: 50%;
|
|
42
|
+
transform: translateY(-50%);
|
|
43
|
+
display: flex;
|
|
44
|
+
align-items: center;
|
|
45
|
+
color: var(--aura-text-tertiary);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&-arrow-icon {
|
|
49
|
+
display: inline-block;
|
|
50
|
+
width: 0;
|
|
51
|
+
height: 0;
|
|
52
|
+
border-left: 4px solid transparent;
|
|
53
|
+
border-right: 4px solid transparent;
|
|
54
|
+
border-top: 5px solid currentColor;
|
|
55
|
+
transition: transform var(--aura-duration-normal) var(--aura-easing);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// 展开状态
|
|
59
|
+
&&-open {
|
|
60
|
+
.aura-select-selector {
|
|
61
|
+
border-color: var(--aura-primary-700);
|
|
62
|
+
box-shadow: 0 0 0 2px var(--aura-primary-200);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.aura-select-arrow-icon {
|
|
66
|
+
transform: rotate(180deg);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// 禁用状态
|
|
71
|
+
&&-disabled {
|
|
72
|
+
.aura-select-selector {
|
|
73
|
+
opacity: 0.5;
|
|
74
|
+
cursor: not-allowed;
|
|
75
|
+
background: var(--aura-bg-secondary);
|
|
76
|
+
|
|
77
|
+
&:hover {
|
|
78
|
+
border-color: var(--aura-border);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// 占位文本
|
|
84
|
+
&-placeholder {
|
|
85
|
+
color: var(--aura-text-tertiary);
|
|
86
|
+
user-select: none;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// 选中项显示
|
|
90
|
+
&-selection-item {
|
|
91
|
+
display: block;
|
|
92
|
+
overflow: hidden;
|
|
93
|
+
text-overflow: ellipsis;
|
|
94
|
+
white-space: nowrap;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// 清除按钮
|
|
98
|
+
&-clear {
|
|
99
|
+
display: inline-flex;
|
|
100
|
+
align-items: center;
|
|
101
|
+
justify-content: center;
|
|
102
|
+
width: 16px;
|
|
103
|
+
height: 16px;
|
|
104
|
+
font-size: 14px;
|
|
105
|
+
line-height: 1;
|
|
106
|
+
cursor: pointer;
|
|
107
|
+
color: var(--aura-text-tertiary);
|
|
108
|
+
border-radius: var(--aura-radius-full);
|
|
109
|
+
|
|
110
|
+
&:hover {
|
|
111
|
+
color: var(--aura-text-secondary);
|
|
112
|
+
background: var(--aura-bg-tertiary);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// 搜索输入框
|
|
117
|
+
&-search-input {
|
|
118
|
+
flex: 1;
|
|
119
|
+
border: none;
|
|
120
|
+
outline: none;
|
|
121
|
+
background: transparent;
|
|
122
|
+
font-size: inherit;
|
|
123
|
+
font-family: inherit;
|
|
124
|
+
color: var(--aura-text);
|
|
125
|
+
padding: 0;
|
|
126
|
+
line-height: inherit;
|
|
127
|
+
|
|
128
|
+
&::placeholder {
|
|
129
|
+
color: var(--aura-text-tertiary);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// 多选标签
|
|
134
|
+
&-multiple &-selector {
|
|
135
|
+
flex-wrap: wrap;
|
|
136
|
+
gap: var(--aura-spacing-1);
|
|
137
|
+
padding: 4px 32px 4px 8px;
|
|
138
|
+
min-height: 38px;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
&-tags {
|
|
142
|
+
display: flex;
|
|
143
|
+
flex-wrap: wrap;
|
|
144
|
+
gap: var(--aura-spacing-1);
|
|
145
|
+
flex: 1;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
&-tag {
|
|
149
|
+
display: inline-flex;
|
|
150
|
+
align-items: center;
|
|
151
|
+
gap: 2px;
|
|
152
|
+
padding: 1px 6px;
|
|
153
|
+
font-size: var(--aura-font-size-xs);
|
|
154
|
+
line-height: 1.6;
|
|
155
|
+
background: var(--aura-primary-100);
|
|
156
|
+
color: var(--aura-primary-800);
|
|
157
|
+
border-radius: var(--aura-radius-sm);
|
|
158
|
+
user-select: none;
|
|
159
|
+
max-width: 100%;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
&-tag-close {
|
|
163
|
+
display: inline-flex;
|
|
164
|
+
align-items: center;
|
|
165
|
+
justify-content: center;
|
|
166
|
+
font-size: 12px;
|
|
167
|
+
cursor: pointer;
|
|
168
|
+
margin-left: 2px;
|
|
169
|
+
border-radius: var(--aura-radius-full);
|
|
170
|
+
|
|
171
|
+
&:hover {
|
|
172
|
+
color: var(--aura-primary-900);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// 下拉面板
|
|
177
|
+
&-dropdown {
|
|
178
|
+
position: absolute;
|
|
179
|
+
top: calc(100% + 4px);
|
|
180
|
+
left: 0;
|
|
181
|
+
width: 100%;
|
|
182
|
+
max-height: 256px;
|
|
183
|
+
overflow-y: auto;
|
|
184
|
+
background: var(--aura-bg);
|
|
185
|
+
border: 1px solid var(--aura-border);
|
|
186
|
+
border-radius: var(--aura-radius-md);
|
|
187
|
+
box-shadow: var(--aura-shadow-lg);
|
|
188
|
+
z-index: 1000;
|
|
189
|
+
padding: var(--aura-spacing-1) 0;
|
|
190
|
+
animation: aura-dropdown-in 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
191
|
+
transform-origin: top center;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
// 选项
|
|
195
|
+
&-option {
|
|
196
|
+
display: flex;
|
|
197
|
+
align-items: center;
|
|
198
|
+
gap: var(--aura-spacing-2);
|
|
199
|
+
padding: 8px 12px;
|
|
200
|
+
font-size: var(--aura-font-size-md);
|
|
201
|
+
color: var(--aura-text);
|
|
202
|
+
cursor: pointer;
|
|
203
|
+
transition: all 0.15s var(--aura-easing);
|
|
204
|
+
|
|
205
|
+
&:hover,
|
|
206
|
+
&&-active {
|
|
207
|
+
background: var(--aura-bg-secondary);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
&&-selected {
|
|
211
|
+
color: var(--aura-primary-700);
|
|
212
|
+
font-weight: 500;
|
|
213
|
+
background: var(--aura-primary-50);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
&&-disabled {
|
|
217
|
+
opacity: 0.4;
|
|
218
|
+
cursor: not-allowed;
|
|
219
|
+
|
|
220
|
+
&:hover {
|
|
221
|
+
background: transparent;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
&-option-label {
|
|
227
|
+
flex: 1;
|
|
228
|
+
overflow: hidden;
|
|
229
|
+
text-overflow: ellipsis;
|
|
230
|
+
white-space: nowrap;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
// 多选勾选框
|
|
234
|
+
&-option-checkbox {
|
|
235
|
+
display: inline-flex;
|
|
236
|
+
align-items: center;
|
|
237
|
+
justify-content: center;
|
|
238
|
+
width: 16px;
|
|
239
|
+
height: 16px;
|
|
240
|
+
border: 1px solid var(--aura-border);
|
|
241
|
+
border-radius: var(--aura-radius-sm);
|
|
242
|
+
flex-shrink: 0;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
&-option-check {
|
|
246
|
+
display: block;
|
|
247
|
+
width: 8px;
|
|
248
|
+
height: 8px;
|
|
249
|
+
background: var(--aura-primary-700);
|
|
250
|
+
border-radius: 2px;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
// 单选对勾
|
|
254
|
+
&-option-tick {
|
|
255
|
+
display: inline-flex;
|
|
256
|
+
align-items: center;
|
|
257
|
+
justify-content: center;
|
|
258
|
+
width: 16px;
|
|
259
|
+
height: 16px;
|
|
260
|
+
|
|
261
|
+
&::after {
|
|
262
|
+
content: '';
|
|
263
|
+
display: block;
|
|
264
|
+
width: 6px;
|
|
265
|
+
height: 10px;
|
|
266
|
+
border: solid var(--aura-primary-700);
|
|
267
|
+
border-width: 0 2px 2px 0;
|
|
268
|
+
transform: rotate(45deg) translateY(-1px);
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
// 加载状态
|
|
273
|
+
&-loading {
|
|
274
|
+
display: flex;
|
|
275
|
+
align-items: center;
|
|
276
|
+
justify-content: center;
|
|
277
|
+
gap: var(--aura-spacing-2);
|
|
278
|
+
padding: var(--aura-spacing-4);
|
|
279
|
+
color: var(--aura-text-secondary);
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
&-loading-icon {
|
|
283
|
+
display: inline-block;
|
|
284
|
+
width: 14px;
|
|
285
|
+
height: 14px;
|
|
286
|
+
border: 2px solid var(--aura-border);
|
|
287
|
+
border-right-color: transparent;
|
|
288
|
+
border-radius: 50%;
|
|
289
|
+
animation: aura-select-spin 0.6s linear infinite;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
// 空状态
|
|
293
|
+
&-empty {
|
|
294
|
+
padding: var(--aura-spacing-4);
|
|
295
|
+
text-align: center;
|
|
296
|
+
color: var(--aura-text-tertiary);
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
// Variants
|
|
300
|
+
&&-filled {
|
|
301
|
+
.aura-select-selector {
|
|
302
|
+
background: var(--aura-primary-50);
|
|
303
|
+
border: 2px solid transparent;
|
|
304
|
+
border-bottom-color: var(--aura-primary-200);
|
|
305
|
+
border-radius: var(--aura-radius-md);
|
|
306
|
+
box-shadow: none;
|
|
307
|
+
|
|
308
|
+
&:hover {
|
|
309
|
+
border-bottom-color: var(--aura-primary-400);
|
|
310
|
+
box-shadow: none;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
&:focus-visible {
|
|
314
|
+
box-shadow: none;
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
&.aura-select-open .aura-select-selector {
|
|
319
|
+
border-bottom-color: var(--aura-primary-700);
|
|
320
|
+
box-shadow: none;
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
&&-bordered {
|
|
325
|
+
.aura-select-selector {
|
|
326
|
+
border: 2px solid var(--aura-border);
|
|
327
|
+
border-radius: var(--aura-radius-lg);
|
|
328
|
+
|
|
329
|
+
&:hover {
|
|
330
|
+
border-color: var(--aura-primary-400);
|
|
331
|
+
box-shadow: 0 0 0 3px var(--aura-primary-100);
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
&.aura-select-open .aura-select-selector {
|
|
336
|
+
border-color: var(--aura-primary-700);
|
|
337
|
+
box-shadow: 0 0 0 4px var(--aura-primary-100);
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
// Sizes
|
|
342
|
+
&&-sm {
|
|
343
|
+
.aura-select-selector {
|
|
344
|
+
padding: 4px 28px 4px 8px;
|
|
345
|
+
font-size: var(--aura-font-size-sm);
|
|
346
|
+
min-height: 30px;
|
|
347
|
+
border-radius: var(--aura-radius-sm);
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
.aura-select-option {
|
|
351
|
+
padding: 6px 8px;
|
|
352
|
+
font-size: var(--aura-font-size-sm);
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
&&-lg {
|
|
357
|
+
.aura-select-selector {
|
|
358
|
+
padding: 10px 36px 10px 14px;
|
|
359
|
+
font-size: var(--aura-font-size-lg);
|
|
360
|
+
min-height: 46px;
|
|
361
|
+
border-radius: var(--aura-radius-lg);
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
.aura-select-option {
|
|
365
|
+
padding: 10px 14px;
|
|
366
|
+
font-size: var(--aura-font-size-lg);
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
@keyframes aura-select-spin {
|
|
372
|
+
from {
|
|
373
|
+
transform: rotate(0deg);
|
|
374
|
+
}
|
|
375
|
+
to {
|
|
376
|
+
transform: rotate(360deg);
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
// 暗色模式
|
|
381
|
+
[data-theme='dark'] {
|
|
382
|
+
.aura-select {
|
|
383
|
+
&-selector:focus-visible {
|
|
384
|
+
box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.2);
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
&-tag {
|
|
388
|
+
background: rgba(124, 58, 237, 0.2);
|
|
389
|
+
color: var(--aura-primary-600);
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
&-option-selected {
|
|
393
|
+
background: rgba(124, 58, 237, 0.1);
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
.aura-select-filled {
|
|
398
|
+
.aura-select-selector {
|
|
399
|
+
background: rgba(124, 58, 237, 0.08);
|
|
400
|
+
border-bottom-color: rgba(124, 58, 237, 0.2);
|
|
401
|
+
|
|
402
|
+
&:hover {
|
|
403
|
+
border-bottom-color: var(--aura-primary-500);
|
|
404
|
+
box-shadow: none;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
&:focus-visible {
|
|
408
|
+
box-shadow: none;
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
&.aura-select-open .aura-select-selector {
|
|
413
|
+
border-bottom-color: var(--aura-primary-400);
|
|
414
|
+
box-shadow: none;
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
.aura-select-bordered {
|
|
419
|
+
.aura-select-selector {
|
|
420
|
+
&:hover {
|
|
421
|
+
border-color: var(--aura-primary-500);
|
|
422
|
+
box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
&.aura-select-open .aura-select-selector {
|
|
427
|
+
border-color: var(--aura-primary-400);
|
|
428
|
+
box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.15);
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
/* ===== 尺寸 ===== */
|
|
434
|
+
/* 说明:`size` prop 必然输出 aura-select-{size} 类名,此前样式缺失导致该 prop 无效。
|
|
435
|
+
md 为默认尺寸(基础样式),这里仅定义 sm / lg 的覆盖。 */
|
|
436
|
+
.aura-select-sm {
|
|
437
|
+
min-width: 96px;
|
|
438
|
+
|
|
439
|
+
.aura-select-selector {
|
|
440
|
+
min-height: 28px;
|
|
441
|
+
padding: 3px 24px 3px 8px;
|
|
442
|
+
font-size: var(--aura-font-size-sm);
|
|
443
|
+
border-radius: var(--aura-radius-sm);
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
.aura-select-arrow {
|
|
447
|
+
right: 6px;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
.aura-select-option {
|
|
451
|
+
padding: 5px 8px;
|
|
452
|
+
font-size: var(--aura-font-size-sm);
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
.aura-select-lg {
|
|
457
|
+
.aura-select-selector {
|
|
458
|
+
min-height: 44px;
|
|
459
|
+
padding: 10px 34px 10px 14px;
|
|
460
|
+
font-size: var(--aura-font-size-md);
|
|
461
|
+
border-radius: var(--aura-radius-md);
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
.aura-select-arrow {
|
|
465
|
+
right: 12px;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
.aura-select-option {
|
|
469
|
+
padding: 10px 14px;
|
|
470
|
+
}
|
|
471
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface SliderProps extends React.AriaAttributes {
|
|
3
|
+
/** 最小值
|
|
4
|
+
* @default 0
|
|
5
|
+
*/
|
|
6
|
+
min?: number;
|
|
7
|
+
/** 最大值
|
|
8
|
+
* @default 100
|
|
9
|
+
*/
|
|
10
|
+
max?: number;
|
|
11
|
+
/** 步长
|
|
12
|
+
* @default 1
|
|
13
|
+
*/
|
|
14
|
+
step?: number;
|
|
15
|
+
/** 当前值(受控) */
|
|
16
|
+
value?: number | [number, number];
|
|
17
|
+
/** 默认值(非受控)
|
|
18
|
+
* @default 0
|
|
19
|
+
*/
|
|
20
|
+
defaultValue?: number | [number, number];
|
|
21
|
+
/** 是否禁用 */
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
/** 标记 */
|
|
24
|
+
marks?: Record<number, React.ReactNode>;
|
|
25
|
+
/** 是否为范围滑块 */
|
|
26
|
+
range?: boolean;
|
|
27
|
+
/** 值变化回调(拖拽 / 点击 / 键盘调节过程中持续触发) */
|
|
28
|
+
onChange?: (value: number | [number, number]) => void;
|
|
29
|
+
/** 一次调节结束后的回调(松开拖拽、轨道点击、单次键盘调节) */
|
|
30
|
+
onChangeComplete?: (value: number | [number, number]) => void;
|
|
31
|
+
/** 自定义类名 */
|
|
32
|
+
className?: string;
|
|
33
|
+
/** 自定义样式 */
|
|
34
|
+
style?: React.CSSProperties;
|
|
35
|
+
}
|
|
36
|
+
export declare const Slider: React.ForwardRefExoticComponent<SliderProps & React.RefAttributes<HTMLDivElement>>;
|