@douyinfe/semi-foundation 2.1.3 → 2.2.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 -1
- package/cascader/constants.ts +4 -0
- package/cascader/foundation.ts +29 -15
- package/cascader/util.ts +13 -0
- package/checkbox/checkbox.scss +25 -1
- package/checkbox/checkboxFoundation.ts +15 -4
- package/checkbox/variables.scss +6 -1
- package/datePicker/datePicker.scss +18 -0
- package/datePicker/monthsGridFoundation.ts +101 -8
- package/lib/cjs/cascader/cascader.css +2 -2
- package/lib/cjs/cascader/cascader.scss +1 -1
- package/lib/cjs/cascader/constants.d.ts +3 -0
- package/lib/cjs/cascader/constants.js +6 -1
- package/lib/cjs/cascader/foundation.d.ts +4 -1
- package/lib/cjs/cascader/foundation.js +24 -11
- package/lib/cjs/cascader/util.d.ts +1 -0
- package/lib/cjs/cascader/util.js +17 -0
- package/lib/cjs/checkbox/checkbox.css +21 -2
- package/lib/cjs/checkbox/checkbox.scss +25 -1
- package/lib/cjs/checkbox/checkboxFoundation.d.ts +11 -4
- package/lib/cjs/checkbox/checkboxFoundation.js +7 -0
- package/lib/cjs/checkbox/variables.scss +6 -1
- package/lib/cjs/datePicker/datePicker.css +6 -0
- package/lib/cjs/datePicker/datePicker.scss +18 -0
- package/lib/cjs/datePicker/monthsGridFoundation.d.ts +35 -3
- package/lib/cjs/datePicker/monthsGridFoundation.js +139 -6
- package/lib/cjs/modal/modal.css +1 -1
- package/lib/cjs/modal/modalFoundation.d.ts +2 -2
- package/lib/cjs/modal/variables.scss +1 -1
- package/lib/cjs/radio/radio.css +33 -2
- package/lib/cjs/radio/radio.scss +44 -1
- package/lib/cjs/radio/variables.scss +12 -2
- package/lib/cjs/rating/rating.css +3 -0
- package/lib/cjs/rating/rating.scss +4 -0
- package/lib/cjs/select/select.scss +1 -1
- package/lib/cjs/sideSheet/sideSheet.css +1 -1
- package/lib/cjs/sideSheet/variables.scss +1 -1
- package/lib/cjs/table/table.css +2 -2
- package/lib/cjs/table/table.scss +2 -2
- package/lib/cjs/table/variables.scss +3 -0
- package/lib/cjs/timeline/timeline.css +3 -0
- package/lib/cjs/timeline/timeline.scss +5 -1
- package/lib/cjs/tree/treeUtil.js +14 -14
- package/lib/cjs/upload/foundation.d.ts +1 -0
- package/lib/cjs/upload/foundation.js +106 -0
- package/lib/cjs/upload/rtl.scss +0 -4
- package/lib/cjs/upload/upload.css +31 -19
- package/lib/cjs/upload/upload.scss +31 -8
- package/lib/cjs/upload/variables.scss +6 -2
- package/lib/es/cascader/cascader.css +2 -2
- package/lib/es/cascader/cascader.scss +1 -1
- package/lib/es/cascader/constants.d.ts +3 -0
- package/lib/es/cascader/constants.js +6 -1
- package/lib/es/cascader/foundation.d.ts +4 -1
- package/lib/es/cascader/foundation.js +24 -12
- package/lib/es/cascader/util.d.ts +1 -0
- package/lib/es/cascader/util.js +14 -0
- package/lib/es/checkbox/checkbox.css +21 -2
- package/lib/es/checkbox/checkbox.scss +25 -1
- package/lib/es/checkbox/checkboxFoundation.d.ts +11 -4
- package/lib/es/checkbox/checkboxFoundation.js +7 -0
- package/lib/es/checkbox/variables.scss +6 -1
- package/lib/es/datePicker/datePicker.css +6 -0
- package/lib/es/datePicker/datePicker.scss +18 -0
- package/lib/es/datePicker/monthsGridFoundation.d.ts +35 -3
- package/lib/es/datePicker/monthsGridFoundation.js +139 -6
- package/lib/es/modal/modal.css +1 -1
- package/lib/es/modal/modalFoundation.d.ts +2 -2
- package/lib/es/modal/variables.scss +1 -1
- package/lib/es/radio/radio.css +33 -2
- package/lib/es/radio/radio.scss +44 -1
- package/lib/es/radio/variables.scss +12 -2
- package/lib/es/rating/rating.css +3 -0
- package/lib/es/rating/rating.scss +4 -0
- package/lib/es/select/select.scss +1 -1
- package/lib/es/sideSheet/sideSheet.css +1 -1
- package/lib/es/sideSheet/variables.scss +1 -1
- package/lib/es/table/table.css +2 -2
- package/lib/es/table/table.scss +2 -2
- package/lib/es/table/variables.scss +3 -0
- package/lib/es/timeline/timeline.css +3 -0
- package/lib/es/timeline/timeline.scss +5 -1
- package/lib/es/tree/treeUtil.js +13 -12
- package/lib/es/upload/foundation.d.ts +1 -0
- package/lib/es/upload/foundation.js +107 -0
- package/lib/es/upload/rtl.scss +0 -4
- package/lib/es/upload/upload.css +31 -19
- package/lib/es/upload/upload.scss +31 -8
- package/lib/es/upload/variables.scss +6 -2
- package/modal/modalFoundation.ts +2 -2
- package/modal/variables.scss +1 -1
- package/package.json +3 -3
- package/radio/radio.scss +44 -1
- package/radio/variables.scss +12 -2
- package/rating/rating.scss +4 -0
- package/select/select.scss +1 -1
- package/sideSheet/variables.scss +1 -1
- package/table/table.scss +2 -2
- package/table/variables.scss +3 -0
- package/timeline/timeline.scss +5 -1
- package/tree/treeUtil.ts +6 -2
- package/tsconfig.json +2 -1
- package/upload/foundation.ts +81 -0
- package/upload/rtl.scss +0 -4
- package/upload/upload.scss +31 -8
- package/upload/variables.scss +6 -2
package/radio/variables.scss
CHANGED
|
@@ -3,6 +3,8 @@ $color-radio_default-bg-default: transparent; // 默认态背景颜色
|
|
|
3
3
|
$color-radio_default-bg-hover: var(--semi-color-fill-0); // 悬浮态背景颜色
|
|
4
4
|
$color-radio_default-bg-active: var(--semi-color-fill-1); // 按下态背景颜色
|
|
5
5
|
$color-radio_default-border-hover: var(--semi-color-focus-border); // 悬浮态描边颜色
|
|
6
|
+
$color-radio_checked-border-hover: var(--semi-color-primary-hover); // 选中时悬浮态描边颜色
|
|
7
|
+
$color-radio_checked-border-active: var(--semi-color-primary-active); // 选中时按下态描边颜色
|
|
6
8
|
|
|
7
9
|
$color-radio_default-text-default: var(--semi-color-text-0); // 选项文本颜色
|
|
8
10
|
$color-radio_extra-text-default: var(--semi-color-text-2); // 辅助文本颜色
|
|
@@ -14,7 +16,8 @@ $color-radio_primary-bg-default: var(--semi-color-primary); // 选中项背景
|
|
|
14
16
|
$color-radio_primary-text-default: white; // 选中项原点颜色
|
|
15
17
|
|
|
16
18
|
$color-radio_checked-bg-disabled: var(--semi-color-primary-disabled); // 选中项禁用态背景颜色
|
|
17
|
-
$color-
|
|
19
|
+
$color-radio_default-border-disabled: var(--semi-color-border); // 禁用态描边颜色
|
|
20
|
+
$color-radio_checked-border-disabled: var(--semi-color-primary-disabled); // 选中项禁用态描边颜色
|
|
18
21
|
|
|
19
22
|
$color-radio_disabled-bg-default: var(--semi-color-disabled-fill); // 禁用态背景颜色
|
|
20
23
|
$color-radio_disabled-bg-hover: transparent;
|
|
@@ -30,11 +33,17 @@ $color-radio_addon_buttonRadio-bg-hover: var(--semi-color-fill-1); // 按钮样
|
|
|
30
33
|
$color-radio_addon_buttonRadio-text-checked: var(--semi-color-primary); // 按钮样式单选选中项文字颜色
|
|
31
34
|
$color-radio_addon_buttonRadio-bg-checked: var(--semi-color-bg-3); // 按钮样式单选选中项背景颜色
|
|
32
35
|
$color-radio_cardRadioGroup-bg-checked: var(--semi-color-primary-light-default); // 卡片样式单选选中态背景色
|
|
36
|
+
$color-radio_cardRadioGroup_disabled-bg-checked: var(--semi-color-primary-light-default); // 卡片样式单选选中且禁用时的背景色
|
|
33
37
|
$color-radio_cardRadioGroup-bg-hover: var(--semi-color-fill-0); // 卡片样式单选悬浮态背景色
|
|
34
38
|
$color-radio_cardRadioGroup-bg-active: var(--semi-color-fill-1); // 卡片样式单选按下态背景色
|
|
35
|
-
$color-radio_cardRadioGroup_border-active: var(--semi-color-
|
|
39
|
+
$color-radio_cardRadioGroup_border-active: var(--semi-color-primary); // 卡片样式单选选中态描边颜色
|
|
40
|
+
$color-radio_cardRadioGroup_checked_border-active: var(--semi-color-primary-active); // 卡片样式单选选中态描边颜色 - 按下态
|
|
41
|
+
$color-radio_cardRadioGroup_checked_border-hover: var(--semi-color-primary-hover); // 卡片样式单选选中态描边颜色 - 悬浮态
|
|
42
|
+
$color-radio_cardRadioGroup_border_disabled-active: var(--semi-color-primary-disabled); // 卡片样式单选选中且禁用时的描边颜色
|
|
36
43
|
$color-radio_cardRadioGroup_addon-text-default: var(--semi-color-text-0); // 卡片样式单选标题文字颜色
|
|
37
44
|
$color-radio_cardRadioGroup_extra-text-default: var(--semi-color-text-2); // 卡片样式单选辅助文字颜色
|
|
45
|
+
$color-radio_cardRadioGroup_checked_disabled-border-default: var(--semi-color-primary-disabled); // 卡片样式选中项禁用态描边颜色 - 默认态
|
|
46
|
+
$color-radio_cardRadioGroup_checked_disabled-border-hover: var(--semi-color-primary-disabled); // 卡片样式选中项禁用态描边颜色 - 悬浮态
|
|
38
47
|
$color-radio_card-bg-hover: var(--semi-color-white); // 单选圆点颜色
|
|
39
48
|
$color-radio_card-bg-active: var(--semi-color-white); // 单选圆点颜色 - 按下态
|
|
40
49
|
$color-radio_card-bg-default: var(--semi-color-white); // 单选圆点颜色 - 悬浮态
|
|
@@ -44,6 +53,7 @@ $radius-radio_addon_buttonRadio: var(--semi-border-radius-small); // 按钮式
|
|
|
44
53
|
$radius-radio_buttonRadio: var(--semi-border-radius-small); // 按钮式单选圆角大小
|
|
45
54
|
|
|
46
55
|
$width-radio_cardRadioGroup_checked-border: 1px; // 卡片式单选描边宽度
|
|
56
|
+
$width-radio_cardRadioGroup_checked_disabled-border: 1px; // 卡片式单选选中且禁用时的描边宽度
|
|
47
57
|
$width-radio_hover-border: $border-thickness-control; // 描边宽度 - 悬浮态
|
|
48
58
|
$width-radio_disabled-border: $border-thickness-control; // 描边宽度 - 禁用态
|
|
49
59
|
$width-radio_innder-border: $border-thickness-control; // 描边宽度 - 禁用态
|
package/rating/rating.scss
CHANGED
package/select/select.scss
CHANGED
package/sideSheet/variables.scss
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Color
|
|
2
|
-
$color-sideSheet_mask-bg: var(--semi-overlay-bg); // 侧边栏打开后蒙层颜色
|
|
2
|
+
$color-sideSheet_mask-bg: var(--semi-color-overlay-bg); // 侧边栏打开后蒙层颜色
|
|
3
3
|
$color-sideSheet-bg: var(--semi-color-bg-2); // 侧边栏背景颜色
|
|
4
4
|
$color-sideSheet_main-text: var(--semi-color-text-0); // 侧边栏默认文本颜色
|
|
5
5
|
|
package/table/table.scss
CHANGED
|
@@ -104,7 +104,7 @@ $module: #{$prefix}-table;
|
|
|
104
104
|
|
|
105
105
|
&-left,
|
|
106
106
|
&-right {
|
|
107
|
-
z-index:
|
|
107
|
+
z-index: $z-table_fixed_column;
|
|
108
108
|
position: sticky;
|
|
109
109
|
background-color: $color-table-bg-default;
|
|
110
110
|
|
|
@@ -247,7 +247,7 @@ $module: #{$prefix}-table;
|
|
|
247
247
|
|
|
248
248
|
&-left,
|
|
249
249
|
&-right {
|
|
250
|
-
z-index:
|
|
250
|
+
z-index: $z-table_fixed_column;;
|
|
251
251
|
position: sticky;
|
|
252
252
|
background-color: $color-table-bg-default;
|
|
253
253
|
}
|
package/table/variables.scss
CHANGED
|
@@ -82,3 +82,6 @@ $shadow-table_right: 3px 0 0 0 $color-table_shadow-bg-default; // 表格滚动
|
|
|
82
82
|
$border-table: #{$width-table_base_border} #{$border-table_base-borderStyle} $color-table-border-default; // 表格默认描边
|
|
83
83
|
$border-table_head-bottom: #{$width-table_header_border} #{$border-table_base-borderStyle} $color-table_th-border-default; // 表头单元格描边 - 底部
|
|
84
84
|
$border-table_resizer: $width-table_resizer_border solid $color-table_resizer-bg-default; // 表格拉伸标识描边
|
|
85
|
+
|
|
86
|
+
$z-table-fixed: 101!default; // fixed列的zIndex值
|
|
87
|
+
$z-table_fixed_column: $z-table-fixed; // fixed列的zIndex值
|
package/timeline/timeline.scss
CHANGED
|
@@ -120,7 +120,11 @@ $module: #{$prefix}-timeline;
|
|
|
120
120
|
&-head-custom {
|
|
121
121
|
left: $spacing-timeline_item_head_custom-left;
|
|
122
122
|
}
|
|
123
|
-
|
|
123
|
+
&-head{
|
|
124
|
+
&.#{$module}-item-head-custom{
|
|
125
|
+
margin-left: 0;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
124
128
|
&-head {
|
|
125
129
|
margin-left: $spacing-timeline_item_head-marginLeft;
|
|
126
130
|
}
|
package/tree/treeUtil.ts
CHANGED
|
@@ -427,7 +427,7 @@ export function normalizedArr(val: any) {
|
|
|
427
427
|
}
|
|
428
428
|
|
|
429
429
|
export function normalizeKeyList(keyList: any, keyEntities: KeyEntities, leafOnly = false) {
|
|
430
|
-
|
|
430
|
+
const res: string[] = [];
|
|
431
431
|
const keyListSet = new Set(keyList);
|
|
432
432
|
if (!leafOnly) {
|
|
433
433
|
keyList.forEach((key: string) => {
|
|
@@ -441,7 +441,11 @@ export function normalizeKeyList(keyList: any, keyEntities: KeyEntities, leafOnl
|
|
|
441
441
|
res.push(key);
|
|
442
442
|
});
|
|
443
443
|
} else {
|
|
444
|
-
|
|
444
|
+
keyList.forEach(key => {
|
|
445
|
+
if (keyEntities[key] && !isValid(keyEntities[key].children)) {
|
|
446
|
+
res.push(key);
|
|
447
|
+
}
|
|
448
|
+
});
|
|
445
449
|
}
|
|
446
450
|
return res;
|
|
447
451
|
}
|
package/tsconfig.json
CHANGED
package/upload/foundation.ts
CHANGED
|
@@ -320,6 +320,87 @@ class UploadFoundation<P = Record<string, any>, S = Record<string, any>> extends
|
|
|
320
320
|
});
|
|
321
321
|
}
|
|
322
322
|
|
|
323
|
+
// 插入多个文件到指定位置
|
|
324
|
+
// Insert files to the specified location
|
|
325
|
+
insertFileToList(files: Array<CustomFile>, index:number): void {
|
|
326
|
+
const { limit, transformFile, accept, uploadTrigger } = this.getProps();
|
|
327
|
+
const { fileList } = this.getStates();
|
|
328
|
+
|
|
329
|
+
const unAcceptFileList = [];
|
|
330
|
+
|
|
331
|
+
// 当次选中的文件
|
|
332
|
+
// current selected file
|
|
333
|
+
let currentFileList = Array.from(files);
|
|
334
|
+
if (typeof accept !== 'undefined') {
|
|
335
|
+
currentFileList = currentFileList.filter(item => {
|
|
336
|
+
const isValid = this.checkFileFormat(accept, item);
|
|
337
|
+
if (!isValid) {
|
|
338
|
+
unAcceptFileList.push(item);
|
|
339
|
+
}
|
|
340
|
+
return isValid;
|
|
341
|
+
});
|
|
342
|
+
if (unAcceptFileList.length !== 0) {
|
|
343
|
+
this._adapter.notifyAcceptInvalid(unAcceptFileList);
|
|
344
|
+
}
|
|
345
|
+
if (currentFileList.length === 0) {
|
|
346
|
+
return;
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
currentFileList = currentFileList.map(file => {
|
|
350
|
+
if (!file.uid) {
|
|
351
|
+
file.uid = getUuidv4();
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
if (this.checkFileSize(file)) {
|
|
355
|
+
file._sizeInvalid = true;
|
|
356
|
+
file.status = FILE_STATUS_VALID_FAIL;
|
|
357
|
+
this._adapter.notifySizeError(file, fileList);
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
if (transformFile) {
|
|
361
|
+
file = transformFile(file);
|
|
362
|
+
}
|
|
363
|
+
return file;
|
|
364
|
+
});
|
|
365
|
+
const total = fileList.length + currentFileList.length;
|
|
366
|
+
if (typeof limit !== 'undefined') {
|
|
367
|
+
// 判断是否超出限制
|
|
368
|
+
// Determine whether the limit is exceeded
|
|
369
|
+
if (total > limit) {
|
|
370
|
+
if (limit === 1) {
|
|
371
|
+
// 使用最后面的文件对当前文件进行替换
|
|
372
|
+
// Use the last file to replace the current file
|
|
373
|
+
currentFileList = currentFileList.slice(-1);
|
|
374
|
+
this._adapter.notifyFileSelect(currentFileList);
|
|
375
|
+
this._adapter.resetInput();
|
|
376
|
+
this.replaceFileList(currentFileList);
|
|
377
|
+
return;
|
|
378
|
+
}
|
|
379
|
+
// 如果超出了限制,则计算还能添加几个文件,将剩余的文件继续上传
|
|
380
|
+
// If the limit is exceeded, several files can be added to the calculation, and the remaining files will continue to be uploaded
|
|
381
|
+
const restNum = limit - fileList.length;
|
|
382
|
+
currentFileList = currentFileList.slice(0, restNum);
|
|
383
|
+
this._adapter.notifyExceed(currentFileList);
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
const fileItemList = currentFileList.map(file => this.buildFileItem(file, uploadTrigger));
|
|
388
|
+
const newFileList = fileList.slice();
|
|
389
|
+
if (typeof index !== 'undefined') {
|
|
390
|
+
newFileList.splice(index, 0, ...fileItemList);
|
|
391
|
+
} else {
|
|
392
|
+
newFileList.push(...fileItemList);
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
this._adapter.notifyFileSelect(currentFileList);
|
|
396
|
+
this._adapter.notifyChange({ fileList: newFileList, currentFile: null });
|
|
397
|
+
this._adapter.updateFileList(newFileList, () => {
|
|
398
|
+
if (uploadTrigger === TRIGGER_AUTO) {
|
|
399
|
+
this.startUpload(fileItemList);
|
|
400
|
+
}
|
|
401
|
+
});
|
|
402
|
+
}
|
|
403
|
+
|
|
323
404
|
manualUpload(): void {
|
|
324
405
|
// find the list of files that have not been uploaded
|
|
325
406
|
const waitToUploadFileList = this.getState('fileList').filter((item: BaseFileItem) => item.status === FILE_STATUS_WAIT_UPLOAD);
|
package/upload/rtl.scss
CHANGED
|
@@ -22,8 +22,6 @@ $module: #{$prefix}-upload;
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
&-file-card {
|
|
25
|
-
margin-right: 0;
|
|
26
|
-
margin-left: $spacing-upload_picture_file_card-marginRight;
|
|
27
25
|
|
|
28
26
|
&-info {
|
|
29
27
|
|
|
@@ -53,8 +51,6 @@ $module: #{$prefix}-upload;
|
|
|
53
51
|
&-picture {
|
|
54
52
|
|
|
55
53
|
&-file-card {
|
|
56
|
-
margin-right: 0;
|
|
57
|
-
margin-left: $spacing-upload_picture_file_card-marginRight;
|
|
58
54
|
|
|
59
55
|
&-close {
|
|
60
56
|
right: auto;
|
package/upload/upload.scss
CHANGED
|
@@ -99,6 +99,8 @@ $module: #{$prefix}-upload;
|
|
|
99
99
|
display: flex;
|
|
100
100
|
flex-wrap: wrap;
|
|
101
101
|
flex-shrink: 0;
|
|
102
|
+
gap: $spacing-upload_picture_file_card-gap;
|
|
103
|
+
margin-bottom: $spacing-upload_picture_file_card-marginBottom;
|
|
102
104
|
|
|
103
105
|
p {
|
|
104
106
|
@include ver-center;
|
|
@@ -130,8 +132,6 @@ $module: #{$prefix}-upload;
|
|
|
130
132
|
justify-content: space-between;
|
|
131
133
|
height: $height-upload_file_card;
|
|
132
134
|
width: $width-upload_file_card;
|
|
133
|
-
margin-right: $spacing-tight;
|
|
134
|
-
margin-bottom: $spacing-tight;
|
|
135
135
|
background-color: $color-upload_card-bg;
|
|
136
136
|
cursor: pointer;
|
|
137
137
|
|
|
@@ -292,21 +292,21 @@ $module: #{$prefix}-upload;
|
|
|
292
292
|
flex-direction: column;
|
|
293
293
|
|
|
294
294
|
.#{$module}-prompt {
|
|
295
|
-
order:
|
|
295
|
+
order: 1;
|
|
296
296
|
}
|
|
297
297
|
|
|
298
298
|
.#{$module}-add {
|
|
299
|
-
order:
|
|
299
|
+
order: 0;
|
|
300
300
|
}
|
|
301
301
|
}
|
|
302
302
|
|
|
303
303
|
&[x-prompt-pos="right"] {
|
|
304
304
|
.#{$module}-prompt {
|
|
305
|
-
order:
|
|
305
|
+
order: 1;
|
|
306
306
|
}
|
|
307
307
|
|
|
308
308
|
.#{$module}-add {
|
|
309
|
-
order:
|
|
309
|
+
order: 0;
|
|
310
310
|
}
|
|
311
311
|
}
|
|
312
312
|
|
|
@@ -353,11 +353,14 @@ $module: #{$prefix}-upload;
|
|
|
353
353
|
}
|
|
354
354
|
|
|
355
355
|
&-file-card {
|
|
356
|
+
display: flex;
|
|
357
|
+
align-items: center;
|
|
358
|
+
justify-content: center;
|
|
356
359
|
height: $height-upload_file_pic_card;
|
|
357
360
|
width: $width-upload_file_pic_card;
|
|
361
|
+
border-radius: $radius-upload_picture_file_card_img;
|
|
358
362
|
position: relative;
|
|
359
|
-
|
|
360
|
-
margin-bottom: $spacing-upload_picture_file_card-marginBottom;
|
|
363
|
+
overflow: hidden;
|
|
361
364
|
|
|
362
365
|
img {
|
|
363
366
|
height: $width-upload_picture_file_card_img;
|
|
@@ -429,6 +432,22 @@ $module: #{$prefix}-upload;
|
|
|
429
432
|
color: $color-upload_replace-text;
|
|
430
433
|
transform: translate3D(-50%, -50%, 0);
|
|
431
434
|
}
|
|
435
|
+
&-pic-info {
|
|
436
|
+
display: inline-flex;
|
|
437
|
+
box-sizing: border-box;
|
|
438
|
+
justify-content: space-between;
|
|
439
|
+
align-items: center;
|
|
440
|
+
position: absolute;
|
|
441
|
+
width: 100%;
|
|
442
|
+
height: 24px;
|
|
443
|
+
padding: 0 10px;
|
|
444
|
+
bottom: 0;
|
|
445
|
+
left: 0;
|
|
446
|
+
color: $color-upload_picture_file_card_pic_info-text;
|
|
447
|
+
font-size: $font-upload_picture_file_card_pic_info-fontSize;
|
|
448
|
+
font-weight: $font-upload_picture_file_card_pic_info-fontWeight;
|
|
449
|
+
background: linear-gradient(0deg, rgba(22, 22, 26, 0.3) 0%, rgba(22, 22, 26, 0) 77.08%);
|
|
450
|
+
}
|
|
432
451
|
|
|
433
452
|
&-icon-loading,
|
|
434
453
|
&-icon-error {
|
|
@@ -445,6 +464,10 @@ $module: #{$prefix}-upload;
|
|
|
445
464
|
&-show-pointer {
|
|
446
465
|
cursor: pointer;
|
|
447
466
|
}
|
|
467
|
+
|
|
468
|
+
&-error {
|
|
469
|
+
outline: 1px solid $color-upload_picture_file_card_error-border;
|
|
470
|
+
}
|
|
448
471
|
}
|
|
449
472
|
}
|
|
450
473
|
|
package/upload/variables.scss
CHANGED
|
@@ -22,8 +22,10 @@ $color-upload-icon: var(--semi-color-tertiary); // 图片墙上传图标加号
|
|
|
22
22
|
$color-upload_pic_add-bg-active: var(--semi-color-fill-2); // 图片墙上传背景色 - 按下
|
|
23
23
|
$color-upload_pic_add-bg-hover: var(--semi-color-fill-1); // 图片墙上传背景色 - 悬浮
|
|
24
24
|
$color-upload_pic_add-bg: var(--semi-color-fill-0); // 图片墙上传背景色 - 默认
|
|
25
|
-
$color-upload_pic_remove-bg: var(--semi-overlay-bg); // 图片墙上传移除图标颜色
|
|
25
|
+
$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
|
+
$color-upload_picture_file_card_error-border: var(--semi-color-danger); // 图片墙上传移除图标颜色
|
|
28
|
+
$color-upload_picture_file_card_pic_info-text: var(--semi-color-white); // 图片墙图片信息(序号)文字颜色
|
|
27
29
|
$color-upload_preview-icon: var(--semi-color-text-2); // 上传文件卡片文本颜色
|
|
28
30
|
$color-upload_retry-text: var(--semi-color-primary); // 上传文件卡片重新上传按钮文本颜色
|
|
29
31
|
$color-upload_replace-text: var(--semi-color-white); // 上传文件卡片重新替换按钮文本颜色
|
|
@@ -56,7 +58,7 @@ $spacing-upload_file_card_info_progress-marginTop: 4px; // 上传文件卡片进
|
|
|
56
58
|
$spacing-upload_file_card_close-marginLeft: $spacing-tight; // 上传文件卡片删除按钮左侧外边距
|
|
57
59
|
$spacing-upload_file_card_close-marginRight: $spacing-tight; // 上传文件卡片删除按钮右侧外边距
|
|
58
60
|
$spacing-upload_file_card_icon-marginRight: $spacing-super-tight; // 上传文件卡片图标右侧外边距
|
|
59
|
-
$spacing-upload_picture_file_card-
|
|
61
|
+
$spacing-upload_picture_file_card-gap: $spacing-tight; // 图片墙卡片之间边距
|
|
60
62
|
$spacing-upload_picture_file_card-marginBottom: $spacing-tight; // 图片墙上传卡片底部外边距
|
|
61
63
|
$spacing-upload_picture_file_card_close-top: 8px; // 图片墙上传卡片删除按钮顶部位置
|
|
62
64
|
$spacing-upload_picture_file_card_close-right: 8px; // 图片墙上传卡片删除右侧位置
|
|
@@ -79,3 +81,5 @@ $radius-upload_drag_area: var(--semi-border-radius-small); // 可拖拽上传拖
|
|
|
79
81
|
$font-upload_file_card_info_name-fontWeight: $font-weight-bold; // 上传文件卡片文件名字重
|
|
80
82
|
$font-upload_file_card_info_size-fontWeight: $font-weight-regular; // 上传文件卡片文件尺寸字重
|
|
81
83
|
$font-upload_drag_area_tips-fontWeight: 600; // 可拖拽上传提示文本字重
|
|
84
|
+
$font-upload_picture_file_card_pic_info-fontSize: 12px; // 图片墙图片信息字体大小
|
|
85
|
+
$font-upload_picture_file_card_pic_info-fontWeight: 600; // 图片墙图片信息文本字重
|