@douyinfe/semi-foundation 2.4.1 → 2.5.0-beta.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/cascader/cascader.scss +1 -0
- package/cascader/variables.scss +4 -2
- package/lib/cjs/autoComplete/constants.d.ts +1 -1
- package/lib/cjs/cascader/cascader.css +1 -0
- package/lib/cjs/cascader/cascader.scss +1 -0
- package/lib/cjs/cascader/variables.scss +4 -2
- package/lib/cjs/dropdown/constants.d.ts +1 -1
- package/lib/cjs/select/constants.d.ts +1 -1
- package/lib/cjs/select/optionFoundation.d.ts +1 -1
- package/lib/cjs/select/optionFoundation.js +3 -3
- package/lib/cjs/slider/foundation.js +2 -2
- package/lib/cjs/table/foundation.d.ts +2 -0
- package/lib/cjs/table/foundation.js +16 -4
- package/lib/cjs/tooltip/constants.d.ts +1 -1
- package/lib/cjs/tooltip/constants.js +1 -1
- package/lib/cjs/tooltip/foundation.js +65 -4
- package/lib/cjs/tree/foundation.d.ts +4 -1
- package/lib/cjs/tree/foundation.js +69 -20
- package/lib/cjs/treeSelect/foundation.d.ts +3 -3
- package/lib/cjs/treeSelect/foundation.js +103 -35
- package/lib/cjs/upload/upload.css +49 -27
- package/lib/cjs/upload/upload.scss +66 -41
- package/lib/cjs/upload/variables.scss +3 -1
- package/lib/es/autoComplete/constants.d.ts +1 -1
- package/lib/es/cascader/cascader.css +1 -0
- package/lib/es/cascader/cascader.scss +1 -0
- package/lib/es/cascader/variables.scss +4 -2
- package/lib/es/dropdown/constants.d.ts +1 -1
- package/lib/es/select/constants.d.ts +1 -1
- package/lib/es/select/optionFoundation.d.ts +1 -1
- package/lib/es/select/optionFoundation.js +3 -3
- package/lib/es/slider/foundation.js +2 -2
- package/lib/es/table/foundation.d.ts +2 -0
- package/lib/es/table/foundation.js +16 -4
- package/lib/es/tooltip/constants.d.ts +1 -1
- package/lib/es/tooltip/constants.js +1 -1
- package/lib/es/tooltip/foundation.js +65 -4
- package/lib/es/tree/foundation.d.ts +4 -1
- package/lib/es/tree/foundation.js +69 -20
- package/lib/es/treeSelect/foundation.d.ts +3 -3
- package/lib/es/treeSelect/foundation.js +102 -35
- package/lib/es/upload/upload.css +49 -27
- package/lib/es/upload/upload.scss +66 -41
- package/lib/es/upload/variables.scss +3 -1
- package/package.json +3 -3
- package/select/optionFoundation.ts +3 -3
- package/slider/foundation.ts +2 -2
- package/table/foundation.ts +23 -10
- package/tooltip/constants.ts +2 -0
- package/tooltip/foundation.ts +52 -4
- package/tree/foundation.ts +56 -17
- package/treeSelect/foundation.ts +89 -41
- package/upload/upload.scss +66 -41
- package/upload/variables.scss +3 -1
|
@@ -158,6 +158,7 @@ class TreeSelectFoundation extends _foundation.default {
|
|
|
158
158
|
selectedKeys = [],
|
|
159
159
|
checkedKeys = new _set.default([]),
|
|
160
160
|
halfCheckedKeys = new _set.default([]),
|
|
161
|
+
realCheckedKeys = new _set.default([]),
|
|
161
162
|
keyEntities = {},
|
|
162
163
|
filteredKeys = new _set.default([]),
|
|
163
164
|
inputValue = '',
|
|
@@ -167,13 +168,26 @@ class TreeSelectFoundation extends _foundation.default {
|
|
|
167
168
|
disabledKeys = new _set.default([])
|
|
168
169
|
} = this.getStates();
|
|
169
170
|
const {
|
|
170
|
-
treeNodeFilterProp
|
|
171
|
+
treeNodeFilterProp,
|
|
172
|
+
checkRelation
|
|
171
173
|
} = this.getProps();
|
|
172
174
|
const entity = keyEntities[key];
|
|
173
175
|
const notExist = !entity;
|
|
174
176
|
|
|
175
177
|
if (notExist) {
|
|
176
178
|
return null;
|
|
179
|
+
} // if checkRelation is invalid, the checked status of node will be false
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
let realChecked = false;
|
|
183
|
+
let realHalfChecked = false;
|
|
184
|
+
|
|
185
|
+
if (checkRelation === 'related') {
|
|
186
|
+
realChecked = checkedKeys.has(key);
|
|
187
|
+
realHalfChecked = halfCheckedKeys.has(key);
|
|
188
|
+
} else if (checkRelation === 'unRelated') {
|
|
189
|
+
realChecked = realCheckedKeys.has(key);
|
|
190
|
+
realHalfChecked = false;
|
|
177
191
|
}
|
|
178
192
|
|
|
179
193
|
const isSearching = Boolean(inputValue);
|
|
@@ -181,8 +195,8 @@ class TreeSelectFoundation extends _foundation.default {
|
|
|
181
195
|
eventKey: key,
|
|
182
196
|
expanded: isSearching ? filteredExpandedKeys.has(key) : expandedKeys.has(key),
|
|
183
197
|
selected: (0, _includes.default)(selectedKeys).call(selectedKeys, key),
|
|
184
|
-
checked:
|
|
185
|
-
halfChecked:
|
|
198
|
+
checked: realChecked,
|
|
199
|
+
halfChecked: realHalfChecked,
|
|
186
200
|
pos: String(entity ? entity.pos : ''),
|
|
187
201
|
level: entity.level,
|
|
188
202
|
filtered: filteredKeys.has(key),
|
|
@@ -248,9 +262,17 @@ class TreeSelectFoundation extends _foundation.default {
|
|
|
248
262
|
keyEntities
|
|
249
263
|
} = this.getStates();
|
|
250
264
|
const {
|
|
251
|
-
leafOnly
|
|
265
|
+
leafOnly,
|
|
266
|
+
checkRelation
|
|
252
267
|
} = this.getProps();
|
|
253
|
-
|
|
268
|
+
let keyList = [];
|
|
269
|
+
|
|
270
|
+
if (checkRelation === 'related') {
|
|
271
|
+
keyList = (0, _treeUtil.normalizeKeyList)(key, keyEntities, leafOnly);
|
|
272
|
+
} else if (checkRelation === 'unRelated') {
|
|
273
|
+
keyList = key;
|
|
274
|
+
}
|
|
275
|
+
|
|
254
276
|
const nodes = (0, _map.default)(keyList).call(keyList, i => keyEntities[i].data);
|
|
255
277
|
|
|
256
278
|
if (this.getProp('onChangeWithObject')) {
|
|
@@ -376,7 +398,8 @@ class TreeSelectFoundation extends _foundation.default {
|
|
|
376
398
|
this._adapter.updateState({
|
|
377
399
|
selectedKeys: [],
|
|
378
400
|
checkedKeys: new _set.default(),
|
|
379
|
-
halfCheckedKeys: new _set.default()
|
|
401
|
+
halfCheckedKeys: new _set.default(),
|
|
402
|
+
realCheckedKeys: new _set.default([])
|
|
380
403
|
});
|
|
381
404
|
} // When triggerSearch, clicking the clear button will trigger to clear Input
|
|
382
405
|
|
|
@@ -404,11 +427,13 @@ class TreeSelectFoundation extends _foundation.default {
|
|
|
404
427
|
|
|
405
428
|
removeTag(eventKey) {
|
|
406
429
|
const {
|
|
407
|
-
disableStrictly
|
|
430
|
+
disableStrictly,
|
|
431
|
+
checkRelation
|
|
408
432
|
} = this.getProps();
|
|
409
433
|
const {
|
|
410
434
|
keyEntities,
|
|
411
|
-
disabledKeys
|
|
435
|
+
disabledKeys,
|
|
436
|
+
realCheckedKeys
|
|
412
437
|
} = this.getStates();
|
|
413
438
|
const item = keyEntities[eventKey].data;
|
|
414
439
|
|
|
@@ -416,20 +441,35 @@ class TreeSelectFoundation extends _foundation.default {
|
|
|
416
441
|
return;
|
|
417
442
|
}
|
|
418
443
|
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
} = this.calcCheckedKeys(eventKey, false);
|
|
444
|
+
if (checkRelation === 'unRelated') {
|
|
445
|
+
const newRealCheckedKeys = new _set.default(realCheckedKeys);
|
|
446
|
+
newRealCheckedKeys.delete(eventKey);
|
|
423
447
|
|
|
424
|
-
|
|
448
|
+
this._notifyChange([...newRealCheckedKeys], null);
|
|
425
449
|
|
|
426
|
-
|
|
427
|
-
|
|
450
|
+
if (!this._isControlledComponent()) {
|
|
451
|
+
this._adapter.updateState({
|
|
452
|
+
realCheckedKeys: newRealCheckedKeys
|
|
453
|
+
});
|
|
454
|
+
|
|
455
|
+
this._adapter.rePositionDropdown();
|
|
456
|
+
}
|
|
457
|
+
} else if (checkRelation === 'related') {
|
|
458
|
+
const {
|
|
428
459
|
checkedKeys,
|
|
429
460
|
halfCheckedKeys
|
|
430
|
-
});
|
|
461
|
+
} = this.calcCheckedKeys(eventKey, false);
|
|
431
462
|
|
|
432
|
-
this.
|
|
463
|
+
this._notifyChange([...checkedKeys], null);
|
|
464
|
+
|
|
465
|
+
if (!this._isControlledComponent()) {
|
|
466
|
+
this._adapter.updateState({
|
|
467
|
+
checkedKeys,
|
|
468
|
+
halfCheckedKeys
|
|
469
|
+
});
|
|
470
|
+
|
|
471
|
+
this._adapter.rePositionDropdown();
|
|
472
|
+
}
|
|
433
473
|
}
|
|
434
474
|
|
|
435
475
|
this._adapter.notifySelect(eventKey, false, item); // reposition dropdown when selected values change
|
|
@@ -576,39 +616,67 @@ class TreeSelectFoundation extends _foundation.default {
|
|
|
576
616
|
handleMultipleSelect(e, treeNode) {
|
|
577
617
|
const {
|
|
578
618
|
searchPosition,
|
|
579
|
-
disableStrictly
|
|
619
|
+
disableStrictly,
|
|
620
|
+
checkRelation
|
|
580
621
|
} = this.getProps();
|
|
581
622
|
const {
|
|
582
|
-
inputValue
|
|
623
|
+
inputValue,
|
|
624
|
+
realCheckedKeys
|
|
583
625
|
} = this.getStates();
|
|
584
626
|
const {
|
|
585
627
|
checked,
|
|
586
628
|
eventKey,
|
|
587
629
|
data
|
|
588
630
|
} = treeNode;
|
|
589
|
-
const targetStatus = disableStrictly ? this.calcChekcedStatus(!checked, eventKey) : !checked;
|
|
590
|
-
const {
|
|
591
|
-
checkedKeys,
|
|
592
|
-
halfCheckedKeys
|
|
593
|
-
} = disableStrictly ? this.calcNonDisabedCheckedKeys(eventKey, targetStatus) : this.calcCheckedKeys(eventKey, targetStatus);
|
|
594
631
|
|
|
595
|
-
|
|
632
|
+
if (checkRelation === 'related') {
|
|
633
|
+
const targetStatus = disableStrictly ? this.calcChekcedStatus(!checked, eventKey) : !checked;
|
|
634
|
+
const {
|
|
635
|
+
checkedKeys,
|
|
636
|
+
halfCheckedKeys
|
|
637
|
+
} = disableStrictly ? this.calcNonDisabedCheckedKeys(eventKey, targetStatus) : this.calcCheckedKeys(eventKey, targetStatus);
|
|
596
638
|
|
|
597
|
-
|
|
639
|
+
this._adapter.notifySelect(eventKey, targetStatus, data);
|
|
598
640
|
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
641
|
+
this._notifyChange([...checkedKeys], e);
|
|
642
|
+
|
|
643
|
+
if (!this._isControlledComponent()) {
|
|
644
|
+
this._adapter.updateState({
|
|
645
|
+
checkedKeys,
|
|
646
|
+
halfCheckedKeys
|
|
647
|
+
});
|
|
648
|
+
|
|
649
|
+
this._adapter.rePositionDropdown();
|
|
650
|
+
}
|
|
651
|
+
} else if (checkRelation === 'unRelated') {
|
|
652
|
+
const newRealCheckedKeys = new _set.default(realCheckedKeys);
|
|
653
|
+
let targetStatus;
|
|
654
|
+
|
|
655
|
+
if (realCheckedKeys.has(eventKey)) {
|
|
656
|
+
newRealCheckedKeys.delete(eventKey);
|
|
657
|
+
targetStatus = false;
|
|
658
|
+
} else {
|
|
659
|
+
newRealCheckedKeys.add(eventKey);
|
|
660
|
+
targetStatus = true;
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
this._adapter.notifySelect(eventKey, targetStatus, data);
|
|
664
|
+
|
|
665
|
+
this._notifyChange([...newRealCheckedKeys], e);
|
|
666
|
+
|
|
667
|
+
if (!this._isControlledComponent()) {
|
|
668
|
+
this._adapter.updateState({
|
|
669
|
+
realCheckedKeys: newRealCheckedKeys
|
|
670
|
+
});
|
|
671
|
+
|
|
672
|
+
this._adapter.rePositionDropdown();
|
|
673
|
+
}
|
|
603
674
|
}
|
|
604
675
|
|
|
605
|
-
if (
|
|
676
|
+
if (searchPosition === _constants.strings.SEARCH_POSITION_TRIGGER && inputValue !== '') {
|
|
606
677
|
this._adapter.updateState({
|
|
607
|
-
|
|
608
|
-
halfCheckedKeys
|
|
678
|
+
inputValue: ''
|
|
609
679
|
});
|
|
610
|
-
|
|
611
|
-
this._adapter.rePositionDropdown();
|
|
612
680
|
}
|
|
613
681
|
}
|
|
614
682
|
|
|
@@ -53,11 +53,10 @@
|
|
|
53
53
|
}
|
|
54
54
|
.semi-upload[x-prompt-pos=left] .semi-upload-add {
|
|
55
55
|
display: inline-flex;
|
|
56
|
-
order: 2;
|
|
57
56
|
}
|
|
58
57
|
.semi-upload[x-prompt-pos=left] .semi-upload-prompt {
|
|
59
58
|
display: inline-flex;
|
|
60
|
-
order: 1;
|
|
59
|
+
order: -1;
|
|
61
60
|
}
|
|
62
61
|
.semi-upload[x-prompt-pos=left] .semi-upload-file-list {
|
|
63
62
|
order: 2;
|
|
@@ -237,15 +236,9 @@
|
|
|
237
236
|
.semi-upload-picture[x-prompt-pos=bottom] .semi-upload-prompt {
|
|
238
237
|
order: 1;
|
|
239
238
|
}
|
|
240
|
-
.semi-upload-picture[x-prompt-pos=bottom] .semi-upload-add {
|
|
241
|
-
order: 0;
|
|
242
|
-
}
|
|
243
239
|
.semi-upload-picture[x-prompt-pos=right] .semi-upload-prompt {
|
|
244
240
|
order: 1;
|
|
245
241
|
}
|
|
246
|
-
.semi-upload-picture[x-prompt-pos=right] .semi-upload-add {
|
|
247
|
-
order: 0;
|
|
248
|
-
}
|
|
249
242
|
.semi-upload-picture-add {
|
|
250
243
|
background-color: var(--semi-color-fill-0);
|
|
251
244
|
height: 96px;
|
|
@@ -257,7 +250,6 @@
|
|
|
257
250
|
border: 2px dashed var(--semi-color-border);
|
|
258
251
|
color: var(--semi-color-tertiary);
|
|
259
252
|
border-radius: var(--semi-border-radius-small);
|
|
260
|
-
order: 2;
|
|
261
253
|
cursor: pointer;
|
|
262
254
|
}
|
|
263
255
|
.semi-upload-picture-add:hover {
|
|
@@ -297,35 +289,32 @@
|
|
|
297
289
|
border-radius: var(--semi-border-radius-small);
|
|
298
290
|
}
|
|
299
291
|
.semi-upload-picture-file-card-close {
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
background-color: var(--semi-color-overlay-bg);
|
|
292
|
+
visibility: hidden;
|
|
293
|
+
display: inline-flex;
|
|
303
294
|
position: absolute;
|
|
304
295
|
top: 8px;
|
|
305
296
|
right: 8px;
|
|
306
|
-
display: flex;
|
|
307
|
-
justify-content: center;
|
|
308
|
-
align-items: center;
|
|
309
|
-
display: none;
|
|
310
297
|
border-radius: var(--semi-border-radius-circle);
|
|
311
|
-
color: white;
|
|
312
298
|
cursor: pointer;
|
|
313
299
|
transition: all 0s;
|
|
314
300
|
}
|
|
315
|
-
.semi-upload-picture-file-card
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
.semi-upload-picture-file-card:hover .semi-upload-picture-file-card-replace {
|
|
319
|
-
visibility: visible;
|
|
301
|
+
.semi-upload-picture-file-card-icon-close {
|
|
302
|
+
font-size: 16px;
|
|
303
|
+
color: var(--semi-color-white);
|
|
320
304
|
}
|
|
321
|
-
.semi-upload-picture-file-card
|
|
305
|
+
.semi-upload-picture-file-card::before {
|
|
306
|
+
visibility: hidden;
|
|
307
|
+
background-color: var(--semi-color-overlay-bg);
|
|
308
|
+
content: "";
|
|
322
309
|
position: absolute;
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
310
|
+
left: 0;
|
|
311
|
+
right: 0;
|
|
312
|
+
top: 0;
|
|
313
|
+
bottom: 0;
|
|
326
314
|
}
|
|
327
315
|
.semi-upload-picture-file-card-retry {
|
|
328
|
-
|
|
316
|
+
visibility: hidden;
|
|
317
|
+
background-color: var(--semi-color-white);
|
|
329
318
|
width: 24px;
|
|
330
319
|
height: 24px;
|
|
331
320
|
position: absolute;
|
|
@@ -353,6 +342,15 @@
|
|
|
353
342
|
color: var(--semi-color-white);
|
|
354
343
|
transform: translate3D(-50%, -50%, 0);
|
|
355
344
|
}
|
|
345
|
+
.semi-upload-picture-file-card-preview {
|
|
346
|
+
visibility: hidden;
|
|
347
|
+
display: inline-flex;
|
|
348
|
+
position: absolute;
|
|
349
|
+
cursor: pointer;
|
|
350
|
+
top: 50%;
|
|
351
|
+
left: 50%;
|
|
352
|
+
transform: translate3D(-50%, -50%, 0);
|
|
353
|
+
}
|
|
356
354
|
.semi-upload-picture-file-card-pic-info {
|
|
357
355
|
display: inline-flex;
|
|
358
356
|
box-sizing: border-box;
|
|
@@ -384,6 +382,30 @@
|
|
|
384
382
|
.semi-upload-picture-file-card-error {
|
|
385
383
|
outline: 1px solid var(--semi-color-danger);
|
|
386
384
|
}
|
|
385
|
+
.semi-upload-picture-file-card:hover::before {
|
|
386
|
+
visibility: visible;
|
|
387
|
+
}
|
|
388
|
+
.semi-upload-picture-file-card:hover .semi-upload-picture-file-card-close {
|
|
389
|
+
visibility: visible;
|
|
390
|
+
}
|
|
391
|
+
.semi-upload-picture-file-card:hover .semi-upload-picture-file-card-replace {
|
|
392
|
+
visibility: visible;
|
|
393
|
+
}
|
|
394
|
+
.semi-upload-picture-file-card:hover .semi-upload-picture-file-card-retry {
|
|
395
|
+
visibility: visible;
|
|
396
|
+
}
|
|
397
|
+
.semi-upload-picture-file-card:hover .semi-upload-picture-file-card-preview {
|
|
398
|
+
visibility: visible;
|
|
399
|
+
}
|
|
400
|
+
.semi-upload-picture-file-card-uploading::before {
|
|
401
|
+
visibility: visible;
|
|
402
|
+
}
|
|
403
|
+
.semi-upload-picture-file-card .semi-progress-circle {
|
|
404
|
+
position: absolute;
|
|
405
|
+
top: 50%;
|
|
406
|
+
left: 50%;
|
|
407
|
+
transform: translate(-50%, -50%);
|
|
408
|
+
}
|
|
387
409
|
.semi-upload-drag-area {
|
|
388
410
|
border-radius: var(--semi-border-radius-small);
|
|
389
411
|
border: 2px dashed var(--semi-color-border);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@import
|
|
1
|
+
@import './variables.scss';
|
|
2
2
|
|
|
3
3
|
$module: #{$prefix}-upload;
|
|
4
4
|
|
|
@@ -47,7 +47,7 @@ $module: #{$prefix}-upload;
|
|
|
47
47
|
align-items: center;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
&[x-prompt-pos=
|
|
50
|
+
&[x-prompt-pos='right'] {
|
|
51
51
|
.#{$module}-add {
|
|
52
52
|
display: inline-flex;
|
|
53
53
|
}
|
|
@@ -57,7 +57,7 @@ $module: #{$prefix}-upload;
|
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
&[x-prompt-pos=
|
|
60
|
+
&[x-prompt-pos='bottom'] {
|
|
61
61
|
.#{$module}-add {
|
|
62
62
|
display: flex;
|
|
63
63
|
}
|
|
@@ -72,15 +72,14 @@ $module: #{$prefix}-upload;
|
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
&[x-prompt-pos=
|
|
75
|
+
&[x-prompt-pos='left'] {
|
|
76
76
|
.#{$module}-add {
|
|
77
77
|
display: inline-flex;
|
|
78
|
-
order: 2;
|
|
79
78
|
}
|
|
80
79
|
|
|
81
80
|
.#{$module}-prompt {
|
|
82
81
|
display: inline-flex;
|
|
83
|
-
order: 1;
|
|
82
|
+
order: -1;
|
|
84
83
|
}
|
|
85
84
|
|
|
86
85
|
.#{$module}-file-list {
|
|
@@ -247,7 +246,6 @@ $module: #{$prefix}-upload;
|
|
|
247
246
|
}
|
|
248
247
|
|
|
249
248
|
&-icon {
|
|
250
|
-
|
|
251
249
|
&-loading,
|
|
252
250
|
&-error {
|
|
253
251
|
font-size: $width-upload_file_card-icon;
|
|
@@ -275,7 +273,6 @@ $module: #{$prefix}-upload;
|
|
|
275
273
|
}
|
|
276
274
|
|
|
277
275
|
.#{$module}-file-card {
|
|
278
|
-
|
|
279
276
|
&-info-validate-message {
|
|
280
277
|
color: $color-upload_file_card_fail_info-text;
|
|
281
278
|
}
|
|
@@ -288,26 +285,18 @@ $module: #{$prefix}-upload;
|
|
|
288
285
|
&-picture {
|
|
289
286
|
display: flex;
|
|
290
287
|
|
|
291
|
-
&[x-prompt-pos=
|
|
288
|
+
&[x-prompt-pos='bottom'] {
|
|
292
289
|
flex-direction: column;
|
|
293
290
|
|
|
294
291
|
.#{$module}-prompt {
|
|
295
292
|
order: 1;
|
|
296
293
|
}
|
|
297
|
-
|
|
298
|
-
.#{$module}-add {
|
|
299
|
-
order: 0;
|
|
300
|
-
}
|
|
301
294
|
}
|
|
302
295
|
|
|
303
|
-
&[x-prompt-pos=
|
|
296
|
+
&[x-prompt-pos='right'] {
|
|
304
297
|
.#{$module}-prompt {
|
|
305
298
|
order: 1;
|
|
306
299
|
}
|
|
307
|
-
|
|
308
|
-
.#{$module}-add {
|
|
309
|
-
order: 0;
|
|
310
|
-
}
|
|
311
300
|
}
|
|
312
301
|
|
|
313
302
|
&-add {
|
|
@@ -321,7 +310,6 @@ $module: #{$prefix}-upload;
|
|
|
321
310
|
border: $width-upload_picture_add-border dashed $color-upload-border;
|
|
322
311
|
color: $color-upload-icon;
|
|
323
312
|
border-radius: $radius-upload_picture_add;
|
|
324
|
-
order: 2;
|
|
325
313
|
cursor: pointer;
|
|
326
314
|
|
|
327
315
|
&:hover {
|
|
@@ -370,38 +358,32 @@ $module: #{$prefix}-upload;
|
|
|
370
358
|
}
|
|
371
359
|
|
|
372
360
|
&-close {
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
background-color: $color-upload_pic_remove-bg;
|
|
361
|
+
visibility: hidden;
|
|
362
|
+
display: inline-flex;
|
|
376
363
|
position: absolute;
|
|
377
364
|
top: $spacing-upload_picture_file_card_close-top;
|
|
378
365
|
right: $spacing-upload_picture_file_card_close-right;
|
|
379
|
-
@include all-center;
|
|
380
|
-
display: none;
|
|
381
366
|
border-radius: $radius-upload_picture_file_card_close;
|
|
382
|
-
color: white;
|
|
383
367
|
cursor: pointer;
|
|
384
368
|
transition: all 0s;
|
|
385
369
|
}
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
display: flex;
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
.#{$module}-picture-file-card-replace {
|
|
393
|
-
visibility: visible;
|
|
394
|
-
}
|
|
370
|
+
&-icon-close {
|
|
371
|
+
font-size: $width-upload_picture_file_card_close;
|
|
372
|
+
color: $color-upload_picture_file_card_close-icon;
|
|
395
373
|
}
|
|
396
374
|
|
|
397
|
-
|
|
375
|
+
&::before {
|
|
376
|
+
visibility: hidden;
|
|
377
|
+
background-color: $color-upload_picture_file_card_hover-bg;
|
|
378
|
+
content: '';
|
|
398
379
|
position: absolute;
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
380
|
+
left: 0;
|
|
381
|
+
right: 0;
|
|
382
|
+
top: 0;
|
|
383
|
+
bottom: 0;
|
|
402
384
|
}
|
|
403
|
-
|
|
404
385
|
&-retry {
|
|
386
|
+
visibility: hidden;
|
|
405
387
|
background-color: $color-upload_file_card_retry-bg;
|
|
406
388
|
width: $width-upload_file_card_retry;
|
|
407
389
|
height: $width-upload_file_card_retry;
|
|
@@ -416,7 +398,6 @@ $module: #{$prefix}-upload;
|
|
|
416
398
|
justify-content: center;
|
|
417
399
|
cursor: pointer;
|
|
418
400
|
}
|
|
419
|
-
|
|
420
401
|
&-icon-retry {
|
|
421
402
|
transform: scale(-1, 1);
|
|
422
403
|
font-size: $width-upload_file_card_retry-icon;
|
|
@@ -432,6 +413,17 @@ $module: #{$prefix}-upload;
|
|
|
432
413
|
color: $color-upload_replace-text;
|
|
433
414
|
transform: translate3D(-50%, -50%, 0);
|
|
434
415
|
}
|
|
416
|
+
|
|
417
|
+
&-preview {
|
|
418
|
+
visibility: hidden;
|
|
419
|
+
display: inline-flex;
|
|
420
|
+
position: absolute;
|
|
421
|
+
cursor: pointer;
|
|
422
|
+
top: 50%;
|
|
423
|
+
left: 50%;
|
|
424
|
+
transform: translate3D(-50%, -50%, 0);
|
|
425
|
+
}
|
|
426
|
+
|
|
435
427
|
&-pic-info {
|
|
436
428
|
display: inline-flex;
|
|
437
429
|
box-sizing: border-box;
|
|
@@ -468,6 +460,39 @@ $module: #{$prefix}-upload;
|
|
|
468
460
|
&-error {
|
|
469
461
|
outline: 1px solid $color-upload_picture_file_card_error-border;
|
|
470
462
|
}
|
|
463
|
+
|
|
464
|
+
&:hover {
|
|
465
|
+
&::before {
|
|
466
|
+
visibility: visible;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
.#{$module}-picture-file-card-close {
|
|
470
|
+
visibility: visible;
|
|
471
|
+
}
|
|
472
|
+
.#{$module}-picture-file-card-replace {
|
|
473
|
+
visibility: visible;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
.#{$module}-picture-file-card-retry {
|
|
477
|
+
visibility: visible;
|
|
478
|
+
}
|
|
479
|
+
.#{$module}-picture-file-card-preview {
|
|
480
|
+
visibility: visible;
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
&-uploading {
|
|
485
|
+
&::before {
|
|
486
|
+
visibility: visible;
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
.#{$prefix}-progress-circle {
|
|
491
|
+
position: absolute;
|
|
492
|
+
top: 50%;
|
|
493
|
+
left: 50%;
|
|
494
|
+
transform: translate(-50%, -50%);
|
|
495
|
+
}
|
|
471
496
|
}
|
|
472
497
|
}
|
|
473
498
|
|
|
@@ -542,4 +567,4 @@ $module: #{$prefix}-upload;
|
|
|
542
567
|
}
|
|
543
568
|
}
|
|
544
569
|
|
|
545
|
-
@import
|
|
570
|
+
@import './rtl.scss';
|
|
@@ -16,7 +16,7 @@ $color-upload_drag_area_tips-text: var(--semi-color-primary); // 上传可拖拽
|
|
|
16
16
|
$color-upload_file_card_fail_info-text: var(--semi-color-danger); // 上传文件卡片失败提示信息文本颜色
|
|
17
17
|
$color-upload_file_card_preview_placeholder-bg: rgba(var(--semi-grey-3), 1); // 文件卡片默认预览背景颜色
|
|
18
18
|
$color-upload_file_card_preview_placeholder-text: rgba(var(--semi-white), 1); // 文件卡片默认预览图颜色
|
|
19
|
-
$color-upload_file_card_retry-bg:
|
|
19
|
+
$color-upload_file_card_retry-bg: var(--semi-color-white); // 重新上传按钮背景颜色
|
|
20
20
|
$color-upload_file_card_retry-text: var(--semi-color-primary); // 重新上传按钮文本颜色
|
|
21
21
|
$color-upload-icon: var(--semi-color-tertiary); // 图片墙上传图标加号颜色
|
|
22
22
|
$color-upload_pic_add-bg-active: var(--semi-color-fill-2); // 图片墙上传背景色 - 按下
|
|
@@ -26,6 +26,8 @@ $color-upload_pic_remove-bg: var(--semi-color-overlay-bg); // 图片墙上传移
|
|
|
26
26
|
$color-upload_picture_file_card_loading_error-icon: var(--semi-color-danger); // 图片墙上传移除图标颜色
|
|
27
27
|
$color-upload_picture_file_card_error-border: var(--semi-color-danger); // 图片墙上传移除图标颜色
|
|
28
28
|
$color-upload_picture_file_card_pic_info-text: var(--semi-color-white); // 图片墙图片信息(序号)文字颜色
|
|
29
|
+
$color-upload_picture_file_card_close-icon: var(--semi-color-white); // 图片墙关闭图标颜色
|
|
30
|
+
$color-upload_picture_file_card_hover-bg: var(--semi-color-overlay-bg); // 图片墙预览悬浮背景色
|
|
29
31
|
$color-upload_preview-icon: var(--semi-color-text-2); // 上传文件卡片文本颜色
|
|
30
32
|
$color-upload_retry-text: var(--semi-color-primary); // 上传文件卡片重新上传按钮文本颜色
|
|
31
33
|
$color-upload_replace-text: var(--semi-color-white); // 上传文件卡片重新替换按钮文本颜色
|
|
@@ -3,7 +3,7 @@ declare const cssClasses: {
|
|
|
3
3
|
};
|
|
4
4
|
declare const strings: {
|
|
5
5
|
readonly SIZE: readonly ["small", "large", "default"];
|
|
6
|
-
readonly POSITION: readonly ["top", "topLeft", "topRight", "left", "leftTop", "leftBottom", "right", "rightTop", "rightBottom", "bottom", "bottomLeft", "bottomRight", "leftTopOver", "rightTopOver"];
|
|
6
|
+
readonly POSITION: readonly ["top", "topLeft", "topRight", "left", "leftTop", "leftBottom", "right", "rightTop", "rightBottom", "bottom", "bottomLeft", "bottomRight", "leftTopOver", "rightTopOver", "leftBottomOver", "rightBottomOver"];
|
|
7
7
|
readonly OPTIONS: readonly ["children", "value"];
|
|
8
8
|
readonly STATUS: readonly ["default", "error", "warning", "success"];
|
|
9
9
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
$radius-cascader: var(--semi-border-radius-small); // 级联选择菜单圆角
|
|
2
2
|
|
|
3
|
-
$color-cascader_default-border-default: transparent; // 级联选择描边颜色
|
|
3
|
+
$color-cascader_default-border-default: transparent; // 级联选择描边颜色 - 默认
|
|
4
|
+
$color-cascader_default-border-hover: transparent; // 级联选择描边颜色 - 悬浮
|
|
5
|
+
$color-cascader_default-border-focus: var(--semi-color-focus-border); // 级联选择描边颜色 - 选中
|
|
4
6
|
$color-cascader_default-bg-default: var(--semi-color-fill-0); // 级联选择菜单项背景颜色 - 默认
|
|
5
7
|
$color-cascader_default-bg-hover: var(--semi-color-fill-1); // 级联选择菜单项背景颜色 - 悬浮
|
|
6
|
-
$color-cascader_default-border-focus: var(--semi-color-focus-border); // 级联选择描边颜色 - 选中
|
|
7
8
|
$color-cascader_option_list-border-default: var(--semi-color-fill-0); // 级联选择各级菜单分割线颜色
|
|
8
9
|
$color-cascader_option_main-text-default: var(--semi-color-text-0); // 级联选择菜单项文字颜色
|
|
9
10
|
$color-cascader_option-bg-hover: var(--semi-color-fill-0); // 级联选择菜单项背景颜色 - 悬浮
|
|
@@ -83,6 +84,7 @@ $width-cascader: 80px; // 级联选择触发器最小宽度
|
|
|
83
84
|
$height-cascader_default: $height-control-default; // 级联选择触发器高度 - 默认
|
|
84
85
|
$height-cascader_small: $height-control-small; // 级联选择触发器高度 - 小尺寸
|
|
85
86
|
$height-cascader_large: $height-control-large; // 级联选择触发器高度 - 大尺寸
|
|
87
|
+
$width-cascader_hover-border: $width-cascader-border; // 级联选择触发器描边宽度 - 悬浮
|
|
86
88
|
$width-cascader_focus-border: $border-thickness-control-focus; // 级联选择触发器描边宽度 - 选中态
|
|
87
89
|
$width-cascader_search-border: 1px; // 级联选择触搜索描边宽度
|
|
88
90
|
$width-cascader-icon: 16px; // 级联选择图标尺寸
|
|
@@ -4,7 +4,7 @@ declare const cssClasses: {
|
|
|
4
4
|
DISABLED: string;
|
|
5
5
|
};
|
|
6
6
|
declare const strings: {
|
|
7
|
-
POSITION_SET: readonly ["top", "topLeft", "topRight", "left", "leftTop", "leftBottom", "right", "rightTop", "rightBottom", "bottom", "bottomLeft", "bottomRight", "leftTopOver", "rightTopOver"];
|
|
7
|
+
POSITION_SET: readonly ["top", "topLeft", "topRight", "left", "leftTop", "leftBottom", "right", "rightTop", "rightBottom", "bottom", "bottomLeft", "bottomRight", "leftTopOver", "rightTopOver", "leftBottomOver", "rightBottomOver"];
|
|
8
8
|
TRIGGER_SET: string[];
|
|
9
9
|
DEFAULT_LEAVE_DELAY: number;
|
|
10
10
|
ITEM_TYPE: string[];
|
|
@@ -5,7 +5,7 @@ declare const cssClasses: {
|
|
|
5
5
|
};
|
|
6
6
|
declare const strings: {
|
|
7
7
|
readonly SIZE_SET: readonly ["small", "large", "default"];
|
|
8
|
-
readonly POSITION_SET: readonly ["top", "topLeft", "topRight", "left", "leftTop", "leftBottom", "right", "rightTop", "rightBottom", "bottom", "bottomLeft", "bottomRight", "leftTopOver", "rightTopOver"];
|
|
8
|
+
readonly POSITION_SET: readonly ["top", "topLeft", "topRight", "left", "leftTop", "leftBottom", "right", "rightTop", "rightBottom", "bottom", "bottomLeft", "bottomRight", "leftTopOver", "rightTopOver", "leftBottomOver", "rightBottomOver"];
|
|
9
9
|
readonly MODE_SELECT: "select";
|
|
10
10
|
readonly MODE_AUTOCOMPLETE: "autoComplete";
|
|
11
11
|
readonly STATUS: readonly ["default", "error", "warning", "success"];
|