@douyinfe/semi-foundation 2.40.0-alpha.0 → 2.40.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/anchor/foundation.ts +0 -2
- package/anchor/linkFoundation.ts +0 -1
- package/autoComplete/foundation.ts +0 -1
- package/autoComplete/optionFoundation.ts +0 -2
- package/avatar/constants.ts +21 -4
- package/avatar/foundation.ts +3 -3
- package/base/foundation.ts +0 -1
- package/breadcrumb/foundation.ts +0 -1
- package/button/button.scss +0 -1
- package/calendar/eventUtil.ts +0 -2
- package/calendar/foundation.ts +0 -1
- package/cascader/foundation.ts +0 -5
- package/checkbox/checkbox.scss +0 -1
- package/checkbox/checkboxFoundation.ts +1 -2
- package/checkbox/checkboxGroupFoundation.ts +0 -1
- package/datePicker/foundation.ts +1 -4
- package/datePicker/inputFoundation.ts +0 -3
- package/datePicker/monthFoundation.ts +0 -1
- package/datePicker/monthsGridFoundation.ts +0 -2
- package/datePicker/yearAndMonthFoundation.ts +0 -2
- package/form/foundation.ts +12 -10
- package/form/interface.ts +4 -5
- package/form/utils.ts +0 -3
- package/image/image.scss +8 -4
- package/image/previewImageFoundation.ts +1 -1
- package/image/previewInnerFoundation.ts +11 -7
- package/image/variables.scss +1 -1
- package/input/foundation.ts +0 -2
- package/input/textareaFoundation.ts +0 -2
- package/inputNumber/foundation.ts +0 -5
- package/lib/cjs/anchor/foundation.js +0 -2
- package/lib/cjs/anchor/linkFoundation.js +0 -1
- package/lib/cjs/autoComplete/foundation.js +0 -2
- package/lib/cjs/autoComplete/optionFoundation.js +0 -2
- package/lib/cjs/avatar/constants.js +0 -1
- package/lib/cjs/avatar/foundation.js +2 -2
- package/lib/cjs/breadcrumb/foundation.js +0 -2
- package/lib/cjs/button/button.css +0 -1
- package/lib/cjs/button/button.scss +0 -1
- package/lib/cjs/calendar/eventUtil.js +0 -2
- package/lib/cjs/calendar/foundation.js +0 -1
- package/lib/cjs/cascader/foundation.js +0 -5
- package/lib/cjs/checkbox/checkbox.css +0 -1
- package/lib/cjs/checkbox/checkbox.scss +0 -1
- package/lib/cjs/checkbox/checkboxFoundation.js +0 -1
- package/lib/cjs/checkbox/checkboxGroupFoundation.js +0 -1
- package/lib/cjs/datePicker/foundation.js +0 -5
- package/lib/cjs/datePicker/inputFoundation.js +0 -4
- package/lib/cjs/datePicker/monthFoundation.js +0 -1
- package/lib/cjs/datePicker/monthsGridFoundation.js +0 -3
- package/lib/cjs/datePicker/yearAndMonthFoundation.js +0 -2
- package/lib/cjs/form/foundation.d.ts +4 -4
- package/lib/cjs/form/foundation.js +9 -8
- package/lib/cjs/form/interface.d.ts +4 -4
- package/lib/cjs/form/utils.js +0 -3
- package/lib/cjs/image/image.css +3 -1
- package/lib/cjs/image/image.scss +8 -4
- package/lib/cjs/image/previewInnerFoundation.d.ts +4 -2
- package/lib/cjs/image/previewInnerFoundation.js +2 -1
- package/lib/cjs/image/variables.scss +1 -1
- package/lib/cjs/input/foundation.js +0 -2
- package/lib/cjs/input/textareaFoundation.js +0 -2
- package/lib/cjs/inputNumber/foundation.js +0 -6
- package/lib/cjs/navigation/NavItem.js +0 -2
- package/lib/cjs/navigation/foundation.js +1 -4
- package/lib/cjs/navigation/itemFoundation.js +0 -1
- package/lib/cjs/navigation/subNavFoundation.js +1 -2
- package/lib/cjs/notification/notificationListFoundation.js +0 -2
- package/lib/cjs/pagination/foundation.d.ts +2 -0
- package/lib/cjs/pagination/foundation.js +16 -4
- package/lib/cjs/popconfirm/popconfirmFoundation.js +0 -2
- package/lib/cjs/radio/radio.css +1 -0
- package/lib/cjs/radio/radio.scss +1 -0
- package/lib/cjs/radio/radioGroupFoundation.js +0 -1
- package/lib/cjs/radio/radioInnerFoundation.js +0 -1
- package/lib/cjs/radio/variables.scss +1 -0
- package/lib/cjs/rating/foundation.js +0 -2
- package/lib/cjs/select/foundation.js +0 -5
- package/lib/cjs/select/optionFoundation.js +0 -2
- package/lib/cjs/select/select.css +0 -35
- package/lib/cjs/select/select.scss +11 -63
- package/lib/cjs/select/variables.scss +0 -10
- package/lib/cjs/skeleton/skeleton.css +2 -2
- package/lib/cjs/skeleton/variables.scss +2 -2
- package/lib/cjs/slider/foundation.js +0 -8
- package/lib/cjs/switch/foundation.js +0 -1
- package/lib/cjs/table/bodyFoundation.js +0 -1
- package/lib/cjs/table/constants.js +0 -2
- package/lib/cjs/table/foundation.js +0 -9
- package/lib/cjs/table/tableRowFoundation.js +0 -1
- package/lib/cjs/table/utils.js +0 -4
- package/lib/cjs/tag/constants.js +0 -2
- package/lib/cjs/tagInput/foundation.js +0 -2
- package/lib/cjs/timePicker/foundation.js +6 -8
- package/lib/cjs/timePicker/inputFoundation.js +0 -2
- package/lib/cjs/timePicker/utils/index.js +2 -2
- package/lib/cjs/tooltip/foundation.js +0 -11
- package/lib/cjs/transfer/foundation.js +0 -1
- package/lib/cjs/tree/foundation.js +0 -1
- package/lib/cjs/tree/treeUtil.js +0 -9
- package/lib/cjs/treeSelect/foundation.js +0 -1
- package/lib/cjs/upload/foundation.js +3 -1
- package/lib/cjs/utils/Event.js +0 -1
- package/lib/cjs/utils/date-fns-extra.js +0 -3
- package/lib/cjs/utils/function.js +0 -1
- package/lib/cjs/utils/object.js +0 -4
- package/lib/es/anchor/foundation.js +0 -2
- package/lib/es/anchor/linkFoundation.js +0 -1
- package/lib/es/autoComplete/foundation.js +0 -1
- package/lib/es/autoComplete/optionFoundation.js +0 -2
- package/lib/es/avatar/constants.js +0 -1
- package/lib/es/avatar/foundation.js +2 -2
- package/lib/es/breadcrumb/foundation.js +0 -1
- package/lib/es/button/button.css +0 -1
- package/lib/es/button/button.scss +0 -1
- package/lib/es/calendar/eventUtil.js +0 -2
- package/lib/es/calendar/foundation.js +0 -1
- package/lib/es/cascader/foundation.js +0 -5
- package/lib/es/checkbox/checkbox.css +0 -1
- package/lib/es/checkbox/checkbox.scss +0 -1
- package/lib/es/checkbox/checkboxFoundation.js +0 -1
- package/lib/es/checkbox/checkboxGroupFoundation.js +0 -1
- package/lib/es/datePicker/foundation.js +0 -4
- package/lib/es/datePicker/inputFoundation.js +0 -3
- package/lib/es/datePicker/monthFoundation.js +0 -1
- package/lib/es/datePicker/monthsGridFoundation.js +0 -2
- package/lib/es/datePicker/yearAndMonthFoundation.js +0 -2
- package/lib/es/form/foundation.d.ts +4 -4
- package/lib/es/form/foundation.js +9 -7
- package/lib/es/form/interface.d.ts +4 -4
- package/lib/es/form/utils.js +0 -3
- package/lib/es/image/image.css +3 -1
- package/lib/es/image/image.scss +8 -4
- package/lib/es/image/previewInnerFoundation.d.ts +4 -2
- package/lib/es/image/previewInnerFoundation.js +2 -1
- package/lib/es/image/variables.scss +1 -1
- package/lib/es/input/foundation.js +0 -2
- package/lib/es/input/textareaFoundation.js +0 -2
- package/lib/es/inputNumber/foundation.js +0 -5
- package/lib/es/navigation/NavItem.js +0 -2
- package/lib/es/navigation/foundation.js +1 -3
- package/lib/es/navigation/itemFoundation.js +0 -1
- package/lib/es/navigation/subNavFoundation.js +1 -2
- package/lib/es/notification/notificationListFoundation.js +0 -1
- package/lib/es/pagination/foundation.d.ts +2 -0
- package/lib/es/pagination/foundation.js +16 -3
- package/lib/es/popconfirm/popconfirmFoundation.js +0 -1
- package/lib/es/radio/radio.css +1 -0
- package/lib/es/radio/radio.scss +1 -0
- package/lib/es/radio/radioGroupFoundation.js +0 -1
- package/lib/es/radio/radioInnerFoundation.js +0 -1
- package/lib/es/radio/variables.scss +1 -0
- package/lib/es/rating/foundation.js +0 -1
- package/lib/es/select/foundation.js +0 -5
- package/lib/es/select/optionFoundation.js +0 -2
- package/lib/es/select/select.css +0 -35
- package/lib/es/select/select.scss +11 -63
- package/lib/es/select/variables.scss +0 -10
- package/lib/es/skeleton/skeleton.css +2 -2
- package/lib/es/skeleton/variables.scss +2 -2
- package/lib/es/slider/foundation.js +0 -7
- package/lib/es/switch/foundation.js +0 -1
- package/lib/es/table/bodyFoundation.js +0 -1
- package/lib/es/table/constants.js +0 -1
- package/lib/es/table/foundation.js +0 -8
- package/lib/es/table/tableRowFoundation.js +0 -1
- package/lib/es/table/utils.js +0 -3
- package/lib/es/tag/constants.js +0 -1
- package/lib/es/tagInput/foundation.js +0 -2
- package/lib/es/timePicker/foundation.js +6 -7
- package/lib/es/timePicker/inputFoundation.js +0 -2
- package/lib/es/timePicker/utils/index.js +2 -1
- package/lib/es/tooltip/foundation.js +0 -10
- package/lib/es/transfer/foundation.js +0 -1
- package/lib/es/tree/foundation.js +0 -1
- package/lib/es/tree/treeUtil.js +0 -9
- package/lib/es/treeSelect/foundation.js +0 -1
- package/lib/es/upload/foundation.js +3 -1
- package/lib/es/utils/Event.js +0 -1
- package/lib/es/utils/date-fns-extra.js +0 -2
- package/lib/es/utils/function.js +0 -1
- package/lib/es/utils/object.js +0 -3
- package/modal/modalFoundation.ts +3 -4
- package/navigation/NavItem.ts +0 -2
- package/navigation/foundation.ts +1 -3
- package/navigation/itemFoundation.ts +0 -1
- package/navigation/subNavFoundation.ts +1 -2
- package/notification/notificationListFoundation.ts +0 -2
- package/package.json +3 -3
- package/pagination/foundation.ts +13 -3
- package/popconfirm/popconfirmFoundation.ts +0 -1
- package/radio/radio.scss +1 -0
- package/radio/radioGroupFoundation.ts +0 -1
- package/radio/radioInnerFoundation.ts +0 -1
- package/radio/variables.scss +1 -0
- package/rating/foundation.ts +0 -1
- package/select/foundation.ts +0 -5
- package/select/optionFoundation.ts +0 -2
- package/select/select.scss +11 -63
- package/select/variables.scss +0 -10
- package/skeleton/variables.scss +2 -2
- package/slider/foundation.ts +0 -7
- package/switch/foundation.ts +0 -1
- package/table/bodyFoundation.ts +0 -1
- package/table/constants.ts +0 -1
- package/table/foundation.ts +0 -8
- package/table/tableRowFoundation.ts +0 -1
- package/table/utils.ts +0 -3
- package/tag/constants.ts +19 -2
- package/tagInput/foundation.ts +0 -2
- package/timePicker/foundation.ts +7 -8
- package/timePicker/inputFoundation.ts +0 -2
- package/timePicker/utils/index.ts +2 -1
- package/toast/toastFoundation.ts +1 -4
- package/toast/toastListFoundation.ts +0 -1
- package/tooltip/foundation.ts +0 -10
- package/transfer/foundation.ts +0 -1
- package/tree/foundation.ts +0 -1
- package/tree/treeUtil.ts +1 -10
- package/treeSelect/foundation.ts +0 -1
- package/upload/foundation.ts +3 -1
- package/utils/Event.ts +0 -1
- package/utils/date-fns-extra.ts +0 -2
- package/utils/function.ts +0 -1
- package/utils/object.ts +0 -3
|
@@ -5,6 +5,7 @@ export interface PaginationAdapter<P = Record<string, any>, S = Record<string, a
|
|
|
5
5
|
updateTotal: (total: number) => void;
|
|
6
6
|
updatePageSize: (pageSize: number) => void;
|
|
7
7
|
updateQuickJumpPage: (quickJumpPage: string | number) => void;
|
|
8
|
+
updateAllPageNumbers: (allPageNumbers: number[]) => void;
|
|
8
9
|
setCurrentPage: (pageIndex: number) => void;
|
|
9
10
|
registerKeyDownHandler: (handler: KeyDownHandler) => void;
|
|
10
11
|
unregisterKeyDownHandler: (handler: KeyDownHandler) => void;
|
|
@@ -33,6 +34,7 @@ declare class PaginationFoundation<P = Record<string, any>, S = Record<string, a
|
|
|
33
34
|
}): void;
|
|
34
35
|
goPage(targetPageIndex: number | '...'): void;
|
|
35
36
|
updatePage(targetPageIndex?: number, total?: number, pageSize?: number): void;
|
|
37
|
+
updateAllPageNumbers(total: number, pageSize: number): void;
|
|
36
38
|
goPrev(): void;
|
|
37
39
|
goNext(): void;
|
|
38
40
|
_updatePageList(pageListInfo: {
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/* eslint-disable max-len */
|
|
2
|
-
/* eslint-disable no-param-reassign */
|
|
3
1
|
import BaseFoundation from '../base/foundation';
|
|
4
2
|
import { numbers } from './constants';
|
|
5
3
|
class PaginationFoundation extends BaseFoundation {
|
|
@@ -98,6 +96,22 @@ class PaginationFoundation extends BaseFoundation {
|
|
|
98
96
|
this._adapter.setCurrentPage(targetPageIndex);
|
|
99
97
|
this._adapter.updatePageSize(pageSize);
|
|
100
98
|
}
|
|
99
|
+
updateAllPageNumbers(total, pageSize) {
|
|
100
|
+
// only need to update in small size
|
|
101
|
+
const {
|
|
102
|
+
size,
|
|
103
|
+
hoverShowPageSelect,
|
|
104
|
+
disabled
|
|
105
|
+
} = this.getProps();
|
|
106
|
+
if (size !== 'small' || !hoverShowPageSelect || disabled) {
|
|
107
|
+
return;
|
|
108
|
+
} else {
|
|
109
|
+
const pageNumbers = Array.from({
|
|
110
|
+
length: Math.ceil(total / pageSize)
|
|
111
|
+
}, (v, i) => i + 1);
|
|
112
|
+
this._adapter.updateAllPageNumbers(pageNumbers);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
101
115
|
goPrev() {
|
|
102
116
|
const {
|
|
103
117
|
currentPage
|
|
@@ -227,7 +241,6 @@ class PaginationFoundation extends BaseFoundation {
|
|
|
227
241
|
this._adapter.notifyChange(newCurrentPage, newPageSize);
|
|
228
242
|
}
|
|
229
243
|
// TODO handle tab/enter events
|
|
230
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
231
244
|
handleKeyDown() {}
|
|
232
245
|
// If pageSize is not in the Opts array, insert it
|
|
233
246
|
pageSizeInOpts() {
|
package/lib/es/radio/radio.css
CHANGED
package/lib/es/radio/radio.scss
CHANGED
|
@@ -77,6 +77,7 @@ $spacing-radio_addon_buttonRadio_middle-paddingX: $spacing-base; // 中尺寸按
|
|
|
77
77
|
$spacing-radio_addon_buttonRadio_middle-paddingY: $spacing-extra-tight; // 中尺寸按钮式单选按钮垂直内边距
|
|
78
78
|
$spacing-radio_addon_buttonRadio_marginLeft: $spacing-none; // 按钮式单选按钮左侧外边距
|
|
79
79
|
$spacing-radio_extra-paddingLeft: $width-radio_inner + $spacing-tight; // 单选副标题左侧内边距
|
|
80
|
+
$spacing-radio_content-rowGap: 4px; // 内容行间距
|
|
80
81
|
|
|
81
82
|
$spacing-radio_group_vertical-marginBottom: $spacing-base-tight; // 垂直布局单选框组底部外边距
|
|
82
83
|
$spacing-radio_card_group_vertical-marginBottom: $spacing-base; // 垂直布局卡片式单选框组底部外边距
|
|
@@ -10,8 +10,6 @@ var __rest = this && this.__rest || function (s, e) {
|
|
|
10
10
|
}
|
|
11
11
|
return t;
|
|
12
12
|
};
|
|
13
|
-
/* argus-disable unPkgSensitiveInfo */
|
|
14
|
-
/* eslint-disable max-len */
|
|
15
13
|
import BaseFoundation from '../base/foundation';
|
|
16
14
|
import KeyCode, { ENTER_KEY } from '../utils/keyCode';
|
|
17
15
|
import warning from '../utils/warning';
|
|
@@ -22,7 +20,6 @@ export default class SelectFoundation extends BaseFoundation {
|
|
|
22
20
|
constructor(adapter) {
|
|
23
21
|
super(Object.assign({}, adapter));
|
|
24
22
|
// keyboard event listner
|
|
25
|
-
// eslint-disable-next-line @typescript-eslint/member-ordering
|
|
26
23
|
this._keydownHandler = null;
|
|
27
24
|
}
|
|
28
25
|
init() {
|
|
@@ -891,7 +888,6 @@ export default class SelectFoundation extends BaseFoundation {
|
|
|
891
888
|
index = index - 1;
|
|
892
889
|
targetLabel = keys[index];
|
|
893
890
|
targetItem = selections.get(targetLabel);
|
|
894
|
-
// eslint-disable-next-line
|
|
895
891
|
if (index == 0 && targetItem.disabled) {
|
|
896
892
|
isAllDisabled = true;
|
|
897
893
|
}
|
|
@@ -931,7 +927,6 @@ export default class SelectFoundation extends BaseFoundation {
|
|
|
931
927
|
}
|
|
932
928
|
}
|
|
933
929
|
_removeInternalKey(option) {
|
|
934
|
-
// eslint-disable-next-line
|
|
935
930
|
let newOption = Object.assign({}, option);
|
|
936
931
|
delete newOption._parentGroup;
|
|
937
932
|
delete newOption._show;
|
|
@@ -3,9 +3,7 @@ export default class OptionFoundation extends BaseFoundation {
|
|
|
3
3
|
constructor(adapter) {
|
|
4
4
|
super(Object.assign({}, adapter));
|
|
5
5
|
}
|
|
6
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
7
6
|
init() {}
|
|
8
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
9
7
|
destroy() {}
|
|
10
8
|
onOptionClick(option) {
|
|
11
9
|
const isDisabled = this._isDisabled();
|
package/lib/es/select/select.css
CHANGED
|
@@ -445,44 +445,9 @@
|
|
|
445
445
|
.semi-select-borderless:not(:focus-within):not(:hover) .semi-select-arrow {
|
|
446
446
|
opacity: 0;
|
|
447
447
|
}
|
|
448
|
-
.semi-select-borderless:not(:focus-within):not(:hover).semi-select-borderless-arrow .semi-select-arrow {
|
|
449
|
-
opacity: 1;
|
|
450
|
-
}
|
|
451
|
-
.semi-select-borderless:hover {
|
|
452
|
-
background-color: var(--semi-color-fill-1);
|
|
453
|
-
border: 1px solid transparent;
|
|
454
|
-
}
|
|
455
|
-
.semi-select-borderless:focus {
|
|
456
|
-
border: 1px solid var(--semi-color-focus-border);
|
|
457
|
-
background-color: var(--semi-color-fill-0);
|
|
458
|
-
outline: 0;
|
|
459
|
-
}
|
|
460
|
-
.semi-select-borderless:active {
|
|
461
|
-
background-color: var(--semi-color-fill-2);
|
|
462
|
-
}
|
|
463
448
|
.semi-select-borderless:focus-within:not(:active) {
|
|
464
449
|
background-color: transparent;
|
|
465
450
|
}
|
|
466
|
-
.semi-select-borderless.semi-select-disabled {
|
|
467
|
-
background-color: var(--semi-color-disabled-fill);
|
|
468
|
-
}
|
|
469
|
-
.semi-select-borderless.semi-select-disabled:hover {
|
|
470
|
-
background-color: var(--semi-color-disabled-fill);
|
|
471
|
-
}
|
|
472
|
-
.semi-select-borderless.semi-select-disabled .semi-select-selection,
|
|
473
|
-
.semi-select-borderless.semi-select-disabled .semi-select-selection-placeholder {
|
|
474
|
-
color: var(--semi-color-disabled-text);
|
|
475
|
-
}
|
|
476
|
-
.semi-select-borderless.semi-select-disabled .semi-select-prefix,
|
|
477
|
-
.semi-select-borderless.semi-select-disabled .semi-select-suffix {
|
|
478
|
-
color: var(--semi-color-disabled-text);
|
|
479
|
-
}
|
|
480
|
-
.semi-select-borderless.semi-select-disabled .semi-select-arrow {
|
|
481
|
-
color: var(--semi-color-disabled-text);
|
|
482
|
-
}
|
|
483
|
-
.semi-select-borderless.semi-select-disabled .semi-tag {
|
|
484
|
-
color: var(--semi-color-disabled-text);
|
|
485
|
-
}
|
|
486
451
|
.semi-select-borderless.semi-select-error:not(:focus-within) {
|
|
487
452
|
border-color: var(--semi-color-danger);
|
|
488
453
|
}
|
|
@@ -40,7 +40,7 @@ $overflowList: #{$prefix}-overflow-list;
|
|
|
40
40
|
outline: 0;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
&:active
|
|
43
|
+
&:active{
|
|
44
44
|
background-color: $color-select-bg-active;
|
|
45
45
|
}
|
|
46
46
|
|
|
@@ -52,7 +52,6 @@ $overflowList: #{$prefix}-overflow-list;
|
|
|
52
52
|
&-large {
|
|
53
53
|
min-height: $height-select_large;
|
|
54
54
|
line-height: $height-select_large;
|
|
55
|
-
|
|
56
55
|
.#{$module}-selection {
|
|
57
56
|
@include font-size-header-6;
|
|
58
57
|
}
|
|
@@ -197,7 +196,6 @@ $overflowList: #{$prefix}-overflow-list;
|
|
|
197
196
|
|
|
198
197
|
.#{$prefix}-tag-group {
|
|
199
198
|
height: inherit;
|
|
200
|
-
|
|
201
199
|
.#{$prefix}-tag {
|
|
202
200
|
@include select-tag-margin;
|
|
203
201
|
}
|
|
@@ -328,7 +326,6 @@ $overflowList: #{$prefix}-overflow-list;
|
|
|
328
326
|
width: $width-select_clear-icon;
|
|
329
327
|
color: $color-select_clearBtn-text-default;
|
|
330
328
|
flex-shrink: 0;
|
|
331
|
-
|
|
332
329
|
&:hover {
|
|
333
330
|
color: $color-select_clearBtn-text-hover;
|
|
334
331
|
}
|
|
@@ -438,7 +435,6 @@ $overflowList: #{$prefix}-overflow-list;
|
|
|
438
435
|
.#{$module}-option-list {
|
|
439
436
|
overflow-x: hidden;
|
|
440
437
|
overflow-y: auto;
|
|
441
|
-
|
|
442
438
|
&-chosen {
|
|
443
439
|
.#{$module}-option-icon {
|
|
444
440
|
display: flex;
|
|
@@ -479,84 +475,36 @@ $overflowList: #{$prefix}-overflow-list;
|
|
|
479
475
|
|
|
480
476
|
.#{$module}-borderless {
|
|
481
477
|
|
|
482
|
-
&:not(:focus-within):not(:hover)
|
|
483
|
-
background-color:
|
|
484
|
-
border-color:
|
|
485
|
-
|
|
478
|
+
&:not(:focus-within):not(:hover){
|
|
479
|
+
background-color:transparent;
|
|
480
|
+
border-color: transparent;
|
|
486
481
|
.#{$module}-arrow {
|
|
487
482
|
opacity: 0;
|
|
488
483
|
}
|
|
489
|
-
|
|
490
|
-
&.#{$module}-borderless-arrow {
|
|
491
|
-
.#{$module}-arrow {
|
|
492
|
-
opacity: 1;
|
|
493
|
-
}
|
|
494
|
-
}
|
|
495
484
|
}
|
|
496
485
|
|
|
497
|
-
&:
|
|
498
|
-
background-color:
|
|
499
|
-
border: $width-select-border-hover solid $color-select_borderless-border-hover;
|
|
500
|
-
}
|
|
501
|
-
|
|
502
|
-
&:focus {
|
|
503
|
-
border: $width-select-border-focus solid $color-select_borderless-border-focus;
|
|
504
|
-
background-color: $color-select_borderless-bg-focus;
|
|
505
|
-
outline: 0;
|
|
506
|
-
}
|
|
507
|
-
|
|
508
|
-
&:active {
|
|
509
|
-
background-color: $color-select_borderless-bg-active;
|
|
510
|
-
}
|
|
511
|
-
|
|
512
|
-
&:focus-within:not(:active) {
|
|
513
|
-
background-color: transparent;
|
|
514
|
-
}
|
|
515
|
-
|
|
516
|
-
&.#{$module}-disabled {
|
|
517
|
-
background-color: $color-select_borderless_input_disabled-bg;
|
|
518
|
-
|
|
519
|
-
&:hover {
|
|
520
|
-
background-color: $color-select_borderless_input_disabled-bg;
|
|
521
|
-
}
|
|
522
|
-
|
|
523
|
-
.#{$module}-selection,
|
|
524
|
-
.#{$module}-selection-placeholder {
|
|
525
|
-
color: $color-select_borderless_input_disabled-text;
|
|
526
|
-
}
|
|
527
|
-
|
|
528
|
-
.#{$module}-prefix,
|
|
529
|
-
.#{$module}-suffix {
|
|
530
|
-
color: $color-select_borderless_input_disabled-text;
|
|
531
|
-
}
|
|
532
|
-
|
|
533
|
-
.#{$module}-arrow {
|
|
534
|
-
color: $color-select_borderless_input_disabled-text;
|
|
535
|
-
}
|
|
536
|
-
|
|
537
|
-
.#{$prefix}-tag {
|
|
538
|
-
color: $color-select_borderless_input_disabled-text;
|
|
539
|
-
}
|
|
486
|
+
&:focus-within:not(:active){
|
|
487
|
+
background-color:transparent;
|
|
540
488
|
}
|
|
541
489
|
|
|
542
490
|
// split style into not and normal to avoid style override
|
|
543
|
-
&.#{$module}-error:not(:focus-within)
|
|
491
|
+
&.#{$module}-error:not(:focus-within){
|
|
544
492
|
border-color: $color-select_danger-border-focus;
|
|
545
493
|
}
|
|
546
494
|
|
|
547
|
-
&.#{$module}-warning:not(:focus-within)
|
|
495
|
+
&.#{$module}-warning:not(:focus-within){
|
|
548
496
|
border-color: $color-select_warning-border-focus;
|
|
549
497
|
}
|
|
550
498
|
|
|
551
|
-
&.#{$module}-error:focus-within
|
|
499
|
+
&.#{$module}-error:focus-within{
|
|
552
500
|
border-color: $color-select_danger-border-focus;
|
|
553
501
|
}
|
|
554
502
|
|
|
555
|
-
&.#{$module}-warning:focus-within
|
|
503
|
+
&.#{$module}-warning:focus-within{
|
|
556
504
|
border-color: $color-select_warning-border-focus;
|
|
557
505
|
}
|
|
558
506
|
|
|
559
507
|
}
|
|
560
508
|
|
|
561
509
|
|
|
562
|
-
@import './rtl.scss';
|
|
510
|
+
@import './rtl.scss';
|
|
@@ -47,16 +47,6 @@ $color-select_option-border-default: var(--semi-color-border); // 分组选择
|
|
|
47
47
|
$color-select_inset_label-text: var(--semi-color-text-2); // 分组选择器菜单项辅助文本颜色
|
|
48
48
|
$color-select_create_tips-text: var(--semi-color-text-2); // 分组选择器菜单项提示文本颜色
|
|
49
49
|
$color-select_group-text: var(--semi-color-text-2); // 分组选择器菜单项分组标题文本颜色
|
|
50
|
-
$color-select_borderless-bg-default: transparent; // borderless 选择器输入框背景色 - 默认态
|
|
51
|
-
$color-select_borderless-bg-hover: var(--semi-color-fill-1); // borderless 选择器输入框背景色 - 悬停态
|
|
52
|
-
$color-select_borderless-bg-active: var(--semi-color-fill-2); // borderless 选择器输入框背景色 - 按下态
|
|
53
|
-
$color-select_borderless-bg-focus: var(--semi-color-fill-0); // borderless 选择器输入框背景色 - 聚焦态
|
|
54
|
-
$color-select_borderless-border-default: transparent; // borderless 选择器输入框边框颜色 - 默认态
|
|
55
|
-
$color-select_borderless-border-hover: $color-select-border-default; // borderless 选择器输入框边框颜色 - 悬停态
|
|
56
|
-
$color-select_borderless-border-active: var(--semi-color-focus-border); // borderless 选择器输入框边框颜色 - 按下态
|
|
57
|
-
$color-select_borderless-border-focus: $color-select-border-active; // borderless 选择器输入框边框颜色 - 聚焦态
|
|
58
|
-
$color-select_borderless_input_disabled-text: var(--semi-color-disabled-text); // borderless 选择器输入框文本颜色 - 禁用态
|
|
59
|
-
$color-select_borderless_input_disabled-bg: var(--semi-color-disabled-fill); // borderless 禁用选择器输入框背景色 - 禁用态
|
|
60
50
|
|
|
61
51
|
// Width/Height
|
|
62
52
|
$width-select_icon_right: ($width-icon-medium + $spacing-tight * 2); // 选择器右侧图标大小
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/* spacing */
|
|
4
4
|
.semi-skeleton-avatar, .semi-skeleton-image, .semi-skeleton-title, .semi-skeleton-button {
|
|
5
5
|
background: var(--semi-color-fill-0);
|
|
6
|
-
border-radius:
|
|
6
|
+
border-radius: var(--semi-border-radius-small);
|
|
7
7
|
}
|
|
8
8
|
.semi-skeleton-avatar-circle {
|
|
9
9
|
border-radius: 50%;
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
}
|
|
40
40
|
.semi-skeleton-paragraph li {
|
|
41
41
|
background: var(--semi-color-fill-0);
|
|
42
|
-
border-radius:
|
|
42
|
+
border-radius: var(--semi-border-radius-small);
|
|
43
43
|
width: 100%;
|
|
44
44
|
height: 16px;
|
|
45
45
|
margin-bottom: 10px;
|
|
@@ -15,6 +15,6 @@ $height-skeleton_button: $height-control-default; // 按钮骨架屏高度
|
|
|
15
15
|
|
|
16
16
|
$spacing-skeleton_li-marginBottom: 10px; // 按钮骨架屏高度
|
|
17
17
|
|
|
18
|
-
$radius-skeleton_item:
|
|
19
|
-
$radius-skeleton_li:
|
|
18
|
+
$radius-skeleton_item: var(--semi-border-radius-small); // 骨架屏圆角
|
|
19
|
+
$radius-skeleton_li: var(--semi-border-radius-small); // 骨架屏圆角
|
|
20
20
|
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/* eslint-disable no-param-reassign */
|
|
2
|
-
/* eslint-disable max-len */
|
|
3
|
-
/* eslint-disable no-nested-ternary */
|
|
4
1
|
import BaseFoundation from '../base/foundation';
|
|
5
2
|
import touchEventPolyfill from '../utils/touchPolyfill';
|
|
6
3
|
import warning from '../utils/warning';
|
|
@@ -157,7 +154,6 @@ export default class SliderFoundation extends BaseFoundation {
|
|
|
157
154
|
startPos = vertical ? sliderY : sliderX;
|
|
158
155
|
}
|
|
159
156
|
// startPos = chooseMovePos === 'max' && isDrag ? currentPos[0] : startPos;
|
|
160
|
-
// eslint-disable-next-line one-var
|
|
161
157
|
let endPos;
|
|
162
158
|
if (vertical && verticalReverse) {
|
|
163
159
|
endPos = sliderY;
|
|
@@ -213,8 +209,6 @@ export default class SliderFoundation extends BaseFoundation {
|
|
|
213
209
|
} else {
|
|
214
210
|
stepValue = (pos - startPos) / len * (max - min) + min;
|
|
215
211
|
}
|
|
216
|
-
// debugger
|
|
217
|
-
// eslint-disable-next-line one-var
|
|
218
212
|
let compareValue;
|
|
219
213
|
if (range) {
|
|
220
214
|
compareValue = isMin ? currentValue[0] : currentValue[1];
|
|
@@ -617,7 +611,6 @@ export default class SliderFoundation extends BaseFoundation {
|
|
|
617
611
|
handlePrevent(event);
|
|
618
612
|
}
|
|
619
613
|
};
|
|
620
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
621
614
|
this.onFocus = (e, handler) => {
|
|
622
615
|
handlePrevent(e);
|
|
623
616
|
const {
|
|
@@ -23,7 +23,6 @@ export default class TableBodyFoundation extends BaseFoundation {
|
|
|
23
23
|
this._adapter.setCachedExpandBtnShouldInRow(cachedExpandBtnShouldInRow);
|
|
24
24
|
if (!_isObject(newExpandRelatedProps) && !newExpandRelatedProps) {
|
|
25
25
|
const expandRelatedProps = strings.EXPAND_RELATED_PROPS;
|
|
26
|
-
// eslint-disable-next-line no-param-reassign
|
|
27
26
|
newExpandRelatedProps = expandRelatedProps.map(key => _get(props, key, undefined));
|
|
28
27
|
}
|
|
29
28
|
this._adapter.setCachedExpandRelatedProps(newExpandRelatedProps);
|
|
@@ -11,13 +11,6 @@ import _each from "lodash/each";
|
|
|
11
11
|
import _isFunction from "lodash/isFunction";
|
|
12
12
|
import _merge from "lodash/merge";
|
|
13
13
|
import _get from "lodash/get";
|
|
14
|
-
/* eslint-disable prefer-destructuring */
|
|
15
|
-
/* eslint-disable max-depth */
|
|
16
|
-
/* eslint-disable max-nested-callbacks */
|
|
17
|
-
/* eslint-disable max-len */
|
|
18
|
-
/* eslint-disable no-param-reassign */
|
|
19
|
-
/* eslint-disable eqeqeq */
|
|
20
|
-
/* eslint-disable @typescript-eslint/no-empty-function */
|
|
21
14
|
import memoizeOne from 'memoize-one';
|
|
22
15
|
import BaseFoundation from '../base/foundation';
|
|
23
16
|
import { strings, numbers } from './constants';
|
|
@@ -832,7 +825,6 @@ class TableFoundation extends BaseFoundation {
|
|
|
832
825
|
toggleShowFilter(dataIndex, visible) {
|
|
833
826
|
let filterObj = this.getQuery(dataIndex);
|
|
834
827
|
const filterDropdownVisible = visible;
|
|
835
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
836
828
|
filterObj = Object.assign(Object.assign({}, filterObj), {
|
|
837
829
|
filterDropdownVisible
|
|
838
830
|
});
|
package/lib/es/table/utils.js
CHANGED
|
@@ -8,9 +8,6 @@ import _find from "lodash/find";
|
|
|
8
8
|
import _filter from "lodash/filter";
|
|
9
9
|
import _get from "lodash/get";
|
|
10
10
|
import _isEqualWith from "lodash/isEqualWith";
|
|
11
|
-
/* eslint-disable max-len */
|
|
12
|
-
/* eslint-disable no-param-reassign */
|
|
13
|
-
/* eslint-disable eqeqeq */
|
|
14
11
|
import { strings, numbers } from './constants';
|
|
15
12
|
import isNullOrUndefined from '../utils/isNullOrUndefined';
|
|
16
13
|
import Logger from '../utils/Logger';
|
package/lib/es/tag/constants.js
CHANGED
|
@@ -89,10 +89,8 @@ class TagInputFoundation extends BaseFoundation {
|
|
|
89
89
|
const maxLen = Math.max(valueArr.length, inputArr.length);
|
|
90
90
|
for (let i = 0; i < maxLen; i++) {
|
|
91
91
|
// When the input length is increasing
|
|
92
|
-
// eslint-disable-next-line max-len
|
|
93
92
|
if (!_isUndefined(valueArr[i]) && (_isUndefined(inputArr[i]) || valueArr[i].length > inputArr[i].length)) {
|
|
94
93
|
// When the input length exceeds maxLength
|
|
95
|
-
// eslint-disable-next-line max-depth
|
|
96
94
|
if (valueArr[i].length > maxLength) {
|
|
97
95
|
allowChange = false;
|
|
98
96
|
_isFunction(onInputExceed) && onInputExceed(value);
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import _isUndefined from "lodash/isUndefined";
|
|
2
2
|
import _split from "lodash/split";
|
|
3
|
-
/* eslint-disable max-len */
|
|
4
3
|
import { strings } from './constants';
|
|
5
4
|
import BaseFoundation from '../base/foundation';
|
|
6
5
|
import { formatToString, parseToDate, hourIsDisabled, minuteIsDisabled, secondIsDisabled, transformToArray, isTimeFormatLike } from './utils';
|
|
@@ -159,13 +158,13 @@ class TimePickerFoundation extends BaseFoundation {
|
|
|
159
158
|
if (this.isValidTimeZone(timeZone)) {
|
|
160
159
|
dates = dates.map(date => utcToZonedTime(this.isValidTimeZone(__prevTimeZone) ? zonedTimeToUtc(date, __prevTimeZone) : date, timeZone));
|
|
161
160
|
}
|
|
162
|
-
const inputValue = this.formatValue(dates);
|
|
163
|
-
this.setState({
|
|
164
|
-
value: dates,
|
|
165
|
-
invalid,
|
|
166
|
-
inputValue
|
|
167
|
-
});
|
|
168
161
|
}
|
|
162
|
+
const inputValue = this.formatValue(dates);
|
|
163
|
+
this.setState({
|
|
164
|
+
value: dates,
|
|
165
|
+
invalid,
|
|
166
|
+
inputValue
|
|
167
|
+
});
|
|
169
168
|
}
|
|
170
169
|
handleFocus(e) {
|
|
171
170
|
if (!this.getState('open')) {
|
|
@@ -4,9 +4,7 @@ class TimePickerFoundation extends BaseFoundation {
|
|
|
4
4
|
constructor(adapter) {
|
|
5
5
|
super(Object.assign({}, adapter));
|
|
6
6
|
}
|
|
7
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
8
7
|
init() {}
|
|
9
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
10
8
|
destroy() {}
|
|
11
9
|
handleFocus(e) {
|
|
12
10
|
this.storeCursor();
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import _toNumber from "lodash/toNumber";
|
|
2
|
-
/* eslint-disable max-len */
|
|
3
2
|
import { format, parse } from 'date-fns';
|
|
4
3
|
import { strings } from '../constants';
|
|
5
4
|
import isNullOrUndefined from '../../utils/isNullOrUndefined';
|
|
@@ -26,6 +25,8 @@ export const parseToDate = function (input) {
|
|
|
26
25
|
});
|
|
27
26
|
// console.log(curDate, formatToken);
|
|
28
27
|
return curDate;
|
|
28
|
+
} else if (typeof input === 'undefined') {
|
|
29
|
+
return undefined;
|
|
29
30
|
}
|
|
30
31
|
return new Date();
|
|
31
32
|
};
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import _isEmpty from "lodash/isEmpty";
|
|
2
2
|
import _get from "lodash/get";
|
|
3
|
-
/* eslint-disable no-param-reassign */
|
|
4
|
-
/* eslint-disable prefer-destructuring, max-lines-per-function, one-var, max-len, @typescript-eslint/restrict-plus-operands */
|
|
5
|
-
/* argus-disable unPkgSensitiveInfo */
|
|
6
3
|
import BaseFoundation from '../base/foundation';
|
|
7
4
|
import { handlePrevent } from '../utils/a11y';
|
|
8
5
|
const REGS = {
|
|
@@ -78,7 +75,6 @@ export default class Tooltip extends BaseFoundation {
|
|
|
78
75
|
top: -9999
|
|
79
76
|
}); // offscreen rendering
|
|
80
77
|
if (trigger === 'custom') {
|
|
81
|
-
// eslint-disable-next-line
|
|
82
78
|
this._adapter.registerClickOutsideHandler(() => {});
|
|
83
79
|
}
|
|
84
80
|
/**
|
|
@@ -396,7 +392,6 @@ export default class Tooltip extends BaseFoundation {
|
|
|
396
392
|
return pixel;
|
|
397
393
|
}
|
|
398
394
|
calcTransformOrigin(position, triggerRect, translateX, translateY) {
|
|
399
|
-
// eslint-disable-next-line
|
|
400
395
|
if (position && triggerRect && translateX != null && translateY != null) {
|
|
401
396
|
if (this.getProp('transformFromCenter')) {
|
|
402
397
|
if (['topLeft', 'bottomLeft'].includes(position)) {
|
|
@@ -427,9 +422,7 @@ export default class Tooltip extends BaseFoundation {
|
|
|
427
422
|
const triggerRect = (_isEmpty(props.triggerRect) ? props.triggerRect : this._adapter.getTriggerBounding()) || Object.assign({}, defaultRect);
|
|
428
423
|
const containerRect = (_isEmpty(props.containerRect) ? props.containerRect : this._adapter.getPopupContainerRect()) || Object.assign({}, defaultRect);
|
|
429
424
|
const wrapperRect = (_isEmpty(props.wrapperRect) ? props.wrapperRect : this._adapter.getWrapperBounding()) || Object.assign({}, defaultRect);
|
|
430
|
-
// eslint-disable-next-line
|
|
431
425
|
const position = props.position != null ? props.position : this.getProp('position');
|
|
432
|
-
// eslint-disable-next-line
|
|
433
426
|
const SPACING = spacing != null ? spacing : this.getProp('spacing');
|
|
434
427
|
const {
|
|
435
428
|
arrowPointAtCenter,
|
|
@@ -607,7 +600,6 @@ export default class Tooltip extends BaseFoundation {
|
|
|
607
600
|
top: this._roundPixel(top)
|
|
608
601
|
};
|
|
609
602
|
let transform = '';
|
|
610
|
-
// eslint-disable-next-line
|
|
611
603
|
if (translateX != null) {
|
|
612
604
|
transform += `translateX(${translateX * 100}%) `;
|
|
613
605
|
Object.defineProperty(style, 'translateX', {
|
|
@@ -615,7 +607,6 @@ export default class Tooltip extends BaseFoundation {
|
|
|
615
607
|
value: translateX
|
|
616
608
|
});
|
|
617
609
|
}
|
|
618
|
-
// eslint-disable-next-line
|
|
619
610
|
if (translateY != null) {
|
|
620
611
|
transform += `translateY(${translateY * 100}%) `;
|
|
621
612
|
Object.defineProperty(style, 'translateY', {
|
|
@@ -623,7 +614,6 @@ export default class Tooltip extends BaseFoundation {
|
|
|
623
614
|
value: translateY
|
|
624
615
|
});
|
|
625
616
|
}
|
|
626
|
-
// eslint-disable-next-line
|
|
627
617
|
if (transformOrigin != null) {
|
|
628
618
|
style.transformOrigin = transformOrigin;
|
|
629
619
|
}
|
|
@@ -3,7 +3,6 @@ import BaseFoundation from '../base/foundation';
|
|
|
3
3
|
import { strings } from './constants';
|
|
4
4
|
import { _generateGroupedData, _generateTreeData } from './transferUtils';
|
|
5
5
|
import arrayMove from '../utils/arrayMove';
|
|
6
|
-
// eslint-disable-next-line max-len
|
|
7
6
|
export default class TransferFoundation extends BaseFoundation {
|
|
8
7
|
constructor(adapter) {
|
|
9
8
|
super(Object.assign({}, adapter));
|