@douyinfe/semi-foundation 2.31.4 → 2.32.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.
Files changed (97) hide show
  1. package/autoComplete/autoComplete.scss +2 -0
  2. package/cascader/foundation.ts +8 -1
  3. package/datePicker/_utils/getDefaultFormatToken.ts +1 -0
  4. package/datePicker/_utils/getInsetInputFormatToken.ts +1 -0
  5. package/datePicker/_utils/getInsetInputValueFromInsetInputStr.ts +1 -0
  6. package/datePicker/constants.ts +1 -1
  7. package/datePicker/datePicker.scss +33 -6
  8. package/datePicker/foundation.ts +132 -74
  9. package/datePicker/inputFoundation.ts +9 -3
  10. package/datePicker/variables.scss +6 -4
  11. package/datePicker/yearAndMonthFoundation.ts +65 -18
  12. package/lib/cjs/autoComplete/autoComplete.css +1 -0
  13. package/lib/cjs/autoComplete/autoComplete.scss +2 -0
  14. package/lib/cjs/cascader/foundation.d.ts +2 -0
  15. package/lib/cjs/datePicker/_utils/getDefaultFormatToken.d.ts +1 -0
  16. package/lib/cjs/datePicker/_utils/getDefaultFormatToken.js +2 -1
  17. package/lib/cjs/datePicker/_utils/getInsetInputFormatToken.js +1 -0
  18. package/lib/cjs/datePicker/_utils/getInsetInputValueFromInsetInputStr.js +1 -0
  19. package/lib/cjs/datePicker/constants.d.ts +1 -1
  20. package/lib/cjs/datePicker/constants.js +1 -1
  21. package/lib/cjs/datePicker/datePicker.css +29 -11
  22. package/lib/cjs/datePicker/datePicker.scss +33 -6
  23. package/lib/cjs/datePicker/foundation.d.ts +34 -6
  24. package/lib/cjs/datePicker/foundation.js +145 -69
  25. package/lib/cjs/datePicker/inputFoundation.d.ts +1 -1
  26. package/lib/cjs/datePicker/inputFoundation.js +13 -1
  27. package/lib/cjs/datePicker/variables.scss +6 -4
  28. package/lib/cjs/datePicker/yearAndMonthFoundation.d.ts +66 -13
  29. package/lib/cjs/datePicker/yearAndMonthFoundation.js +55 -14
  30. package/lib/cjs/modal/modal.css +1 -0
  31. package/lib/cjs/modal/modal.scss +1 -0
  32. package/lib/cjs/modal/variables.scss +1 -0
  33. package/lib/cjs/sideSheet/sideSheet.css +10 -0
  34. package/lib/cjs/sideSheet/sideSheet.scss +15 -0
  35. package/lib/cjs/sideSheet/variables.scss +6 -0
  36. package/lib/cjs/spin/spin.css +1 -0
  37. package/lib/cjs/spin/spin.scss +1 -0
  38. package/lib/cjs/table/table.css +4 -3
  39. package/lib/cjs/table/table.scss +6 -3
  40. package/lib/cjs/table/utils.d.ts +52 -3
  41. package/lib/cjs/table/utils.js +1 -48
  42. package/lib/cjs/table/variables.scss +2 -0
  43. package/lib/cjs/tree/tree.css +1 -0
  44. package/lib/cjs/tree/tree.scss +1 -0
  45. package/lib/cjs/treeSelect/foundation.d.ts +3 -0
  46. package/lib/cjs/treeSelect/foundation.js +3 -2
  47. package/lib/cjs/upload/upload.css +3 -0
  48. package/lib/cjs/upload/upload.scss +1 -0
  49. package/lib/es/autoComplete/autoComplete.css +1 -0
  50. package/lib/es/autoComplete/autoComplete.scss +2 -0
  51. package/lib/es/cascader/foundation.d.ts +2 -0
  52. package/lib/es/datePicker/_utils/getDefaultFormatToken.d.ts +1 -0
  53. package/lib/es/datePicker/_utils/getDefaultFormatToken.js +2 -1
  54. package/lib/es/datePicker/_utils/getInsetInputFormatToken.js +1 -0
  55. package/lib/es/datePicker/_utils/getInsetInputValueFromInsetInputStr.js +1 -0
  56. package/lib/es/datePicker/constants.d.ts +1 -1
  57. package/lib/es/datePicker/constants.js +1 -1
  58. package/lib/es/datePicker/datePicker.css +29 -11
  59. package/lib/es/datePicker/datePicker.scss +33 -6
  60. package/lib/es/datePicker/foundation.d.ts +34 -6
  61. package/lib/es/datePicker/foundation.js +145 -69
  62. package/lib/es/datePicker/inputFoundation.d.ts +1 -1
  63. package/lib/es/datePicker/inputFoundation.js +13 -1
  64. package/lib/es/datePicker/variables.scss +6 -4
  65. package/lib/es/datePicker/yearAndMonthFoundation.d.ts +66 -13
  66. package/lib/es/datePicker/yearAndMonthFoundation.js +58 -14
  67. package/lib/es/modal/modal.css +1 -0
  68. package/lib/es/modal/modal.scss +1 -0
  69. package/lib/es/modal/variables.scss +1 -0
  70. package/lib/es/sideSheet/sideSheet.css +10 -0
  71. package/lib/es/sideSheet/sideSheet.scss +15 -0
  72. package/lib/es/sideSheet/variables.scss +6 -0
  73. package/lib/es/spin/spin.css +1 -0
  74. package/lib/es/spin/spin.scss +1 -0
  75. package/lib/es/table/table.css +4 -3
  76. package/lib/es/table/table.scss +6 -3
  77. package/lib/es/table/utils.d.ts +52 -3
  78. package/lib/es/table/utils.js +1 -43
  79. package/lib/es/table/variables.scss +2 -0
  80. package/lib/es/tree/tree.css +1 -0
  81. package/lib/es/tree/tree.scss +1 -0
  82. package/lib/es/treeSelect/foundation.d.ts +3 -0
  83. package/lib/es/treeSelect/foundation.js +3 -2
  84. package/lib/es/upload/upload.css +3 -0
  85. package/lib/es/upload/upload.scss +1 -0
  86. package/modal/modal.scss +1 -0
  87. package/modal/variables.scss +1 -0
  88. package/package.json +2 -2
  89. package/sideSheet/sideSheet.scss +15 -0
  90. package/sideSheet/variables.scss +6 -0
  91. package/spin/spin.scss +1 -0
  92. package/table/table.scss +6 -3
  93. package/table/utils.ts +1 -43
  94. package/table/variables.scss +2 -0
  95. package/tree/tree.scss +1 -0
  96. package/treeSelect/foundation.ts +6 -3
  97. package/upload/upload.scss +1 -0
@@ -76,12 +76,22 @@
76
76
  align-items: flex-start;
77
77
  padding: 24px;
78
78
  padding-bottom: 20px;
79
+ border-bottom: 0px solid var(--semi-color-border);
79
80
  }
80
81
  .semi-sidesheet-body {
81
82
  padding: 0 24px;
82
83
  flex: 1;
83
84
  overflow: auto;
84
85
  }
86
+ .semi-sidesheet-size-small {
87
+ width: 448px;
88
+ }
89
+ .semi-sidesheet-size-medium {
90
+ width: 684px;
91
+ }
92
+ .semi-sidesheet-size-large {
93
+ width: 920px;
94
+ }
85
95
  .semi-sidesheet-content {
86
96
  height: 100%;
87
97
  display: flex;
@@ -95,6 +95,7 @@ $module: #{$prefix}-sidesheet;
95
95
  align-items: flex-start;
96
96
  padding: $spacing-sideSheet_header-padding;
97
97
  padding-bottom: $spacing-sideSheet_header-paddingBottom;
98
+ border-bottom: $width-sideSheet_header-borderBottom solid $color-sideSheet_header-borderBottom;
98
99
  }
99
100
 
100
101
  &-body {
@@ -103,6 +104,20 @@ $module: #{$prefix}-sidesheet;
103
104
  overflow: auto;
104
105
  }
105
106
 
107
+ &-size-small {
108
+ width: $width-sideSheet_size-small;
109
+ }
110
+
111
+ &-size-medium {
112
+ width: $width-sideSheet_size-medium;
113
+ }
114
+
115
+ &-size-large {
116
+ width: $width-sideSheet_size-large;
117
+ }
118
+
119
+
120
+
106
121
  &-content {
107
122
  height: 100%;
108
123
  display: flex;
@@ -2,6 +2,7 @@
2
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
+ $color-sideSheet_header-borderBottom: var(--semi-color-border); // 侧边栏 header 底部边框颜色
5
6
 
6
7
  // Spacing
7
8
  $spacing-sideSheet-margin: 0; // 侧边栏整体外边距
@@ -12,6 +13,11 @@ $spacing-sideSheet_body-paddingY: 0; // 侧边栏 body 垂直内边距
12
13
  $spacing-sideSheet_body-paddingX: $spacing-loose; // 侧边栏 body 水平内边距
13
14
  $spacing-sideSheet_footer-padding: $spacing-loose; // 侧边栏 footer 内边距
14
15
 
16
+ $width-sideSheet_header-borderBottom: 0px; // 侧边栏 header 底部边框宽度
17
+ $width-sideSheet_size-small: 448px; // 小尺寸侧边栏宽度
18
+ $width-sideSheet_size-medium: 684px; // 中尺寸侧边栏宽度
19
+ $width-sideSheet_size-large: 920px; // 大尺寸侧边栏宽度
20
+
15
21
  // Font
16
22
  $font-sideSheet_title-fontWeight: $font-weight-bold; // 侧边栏标题文本字重
17
23
  $font-sideSheet_title-fontSize: $font-size-header-5; // 侧边栏标题文本字号
@@ -26,6 +26,7 @@
26
26
  .semi-spin-wrapper > svg {
27
27
  animation: 600ms linear infinite semi-animation-rotate;
28
28
  animation-fill-mode: forwards;
29
+ vertical-align: top;
29
30
  width: 20px;
30
31
  height: 20px;
31
32
  }
@@ -29,6 +29,7 @@ $module: #{$prefix}-spin;
29
29
  & > svg {
30
30
  animation: $animation_duration-spin_wrapper-spin linear infinite #{$prefix}-animation-rotate;
31
31
  animation-fill-mode: forwards;
32
+ vertical-align: top;
32
33
  @include size($width-spin_middle);
33
34
  }
34
35
  }
@@ -201,12 +201,14 @@
201
201
  }
202
202
  .semi-table-tbody > .semi-table-row {
203
203
  display: table-row;
204
+ background-color: var(--semi-color-bg-1);
204
205
  }
205
206
  .semi-table-tbody > .semi-table-row:hover > .semi-table-row-cell {
206
- background-color: var(--semi-color-fill-0);
207
+ background-image: linear-gradient(0deg, var(--semi-color-fill-0), var(--semi-color-fill-0));
208
+ background-color: var(--semi-color-bg-0);
207
209
  }
208
210
  .semi-table-tbody > .semi-table-row:hover > .semi-table-row-cell.semi-table-cell-fixed-left, .semi-table-tbody > .semi-table-row:hover > .semi-table-row-cell.semi-table-cell-fixed-right {
209
- background-color: var(--semi-color-bg-1);
211
+ background-image: linear-gradient(0deg, var(--semi-color-bg-1), var(--semi-color-bg-1));
210
212
  }
211
213
  .semi-table-tbody > .semi-table-row:hover > .semi-table-row-cell.semi-table-cell-fixed-left::before, .semi-table-tbody > .semi-table-row:hover > .semi-table-row-cell.semi-table-cell-fixed-right::before {
212
214
  background-color: var(--semi-color-fill-0);
@@ -230,7 +232,6 @@
230
232
  box-sizing: border-box;
231
233
  position: relative;
232
234
  vertical-align: middle;
233
- background-color: var(--semi-color-bg-1);
234
235
  }
235
236
  .semi-table-tbody > .semi-table-row > .semi-table-row-cell.resizing {
236
237
  border-right: 2px solid var(--semi-color-primary);
@@ -209,15 +209,19 @@ $module: #{$prefix}-table;
209
209
  display: table-row-group;
210
210
  & > .#{$module}-row {
211
211
  display: table-row;
212
+ background-color: $color-table_body-bg-default;
212
213
 
213
214
  &:hover {
214
215
  & > .#{$module}-row-cell {
215
- background-color: $color-table_body-bg-hover;
216
+ // $color-table_body-bg-hover has transparency,will reveal the background color $color-table_body-bg-default\
217
+ // combine background-image and background-color to make the non-fixed column color does not show through the bottom color
218
+ background-image: linear-gradient(0deg, $color-table_body-bg-hover, $color-table_body-bg-hover);
219
+ background-color: $color-table_cell-bg-hover;
216
220
 
217
221
  &.#{$module}-cell-fixed {
218
222
  &-left,
219
223
  &-right {
220
- background-color: $color-table_body-bg-default;
224
+ background-image: linear-gradient(0deg, $color-table_body-bg-default, $color-table_body-bg-default);
221
225
 
222
226
  &::before {
223
227
  background-color: $color-table_body-bg-hover;
@@ -246,7 +250,6 @@ $module: #{$prefix}-table;
246
250
  box-sizing: border-box;
247
251
  position: relative;
248
252
  vertical-align: middle;
249
- background-color: $color-table_body-bg-default;
250
253
 
251
254
  &.resizing {
252
255
  border-right: $width-table_resizer_border solid $color-table_resizer-bg-default;
@@ -1,8 +1,6 @@
1
1
  import { strings } from './constants';
2
- export declare function cloneDeep(value: any, customizer?: (v: any) => any): any;
3
2
  export declare function equalWith(value: any, other: any, customizer?: (...args: any[]) => boolean): boolean;
4
3
  export declare function getColumnKey(column: any, keyPropNames: any[]): any;
5
- export declare function mergeColumns(oldColumns?: any[], newColumns?: any[], keyPropNames?: any[], deep?: boolean): any[];
6
4
  /**
7
5
  *
8
6
  * @param {Array<number>} arr
@@ -81,7 +79,58 @@ export declare function mergeQueries(query: Record<string, any>, queries?: Recor
81
79
  * @param {Object[]} columns columns retain the column width after resize
82
80
  * @param {Object[]} newColumns
83
81
  */
84
- export declare function withResizeWidth(columns: Record<string, any>[], newColumns: Record<string, any>[]): any;
82
+ export declare function withResizeWidth(columns: Record<string, any>[], newColumns: Record<string, any>[]): {
83
+ [x: number]: Record<string, any>;
84
+ length: number;
85
+ toString(): string;
86
+ toLocaleString(): string;
87
+ pop(): Record<string, any>;
88
+ push(...items: Record<string, any>[]): number;
89
+ concat(...items: ConcatArray<Record<string, any>>[]): Record<string, any>[];
90
+ concat(...items: (Record<string, any> | ConcatArray<Record<string, any>>)[]): Record<string, any>[];
91
+ join(separator?: string): string;
92
+ reverse(): Record<string, any>[];
93
+ shift(): Record<string, any>;
94
+ slice(start?: number, end?: number): Record<string, any>[];
95
+ sort(compareFn?: (a: Record<string, any>, b: Record<string, any>) => number): Record<string, any>[];
96
+ splice(start: number, deleteCount?: number): Record<string, any>[];
97
+ splice(start: number, deleteCount: number, ...items: Record<string, any>[]): Record<string, any>[];
98
+ unshift(...items: Record<string, any>[]): number;
99
+ indexOf(searchElement: Record<string, any>, fromIndex?: number): number;
100
+ lastIndexOf(searchElement: Record<string, any>, fromIndex?: number): number;
101
+ every<S extends Record<string, any>>(predicate: (value: Record<string, any>, index: number, array: Record<string, any>[]) => value is S, thisArg?: any): this is S[];
102
+ every(predicate: (value: Record<string, any>, index: number, array: Record<string, any>[]) => unknown, thisArg?: any): boolean;
103
+ some(predicate: (value: Record<string, any>, index: number, array: Record<string, any>[]) => unknown, thisArg?: any): boolean;
104
+ forEach(callbackfn: (value: Record<string, any>, index: number, array: Record<string, any>[]) => void, thisArg?: any): void;
105
+ map<U>(callbackfn: (value: Record<string, any>, index: number, array: Record<string, any>[]) => U, thisArg?: any): U[];
106
+ filter<S_1 extends Record<string, any>>(predicate: (value: Record<string, any>, index: number, array: Record<string, any>[]) => value is S_1, thisArg?: any): S_1[];
107
+ filter(predicate: (value: Record<string, any>, index: number, array: Record<string, any>[]) => unknown, thisArg?: any): Record<string, any>[];
108
+ reduce(callbackfn: (previousValue: Record<string, any>, currentValue: Record<string, any>, currentIndex: number, array: Record<string, any>[]) => Record<string, any>): Record<string, any>;
109
+ reduce(callbackfn: (previousValue: Record<string, any>, currentValue: Record<string, any>, currentIndex: number, array: Record<string, any>[]) => Record<string, any>, initialValue: Record<string, any>): Record<string, any>;
110
+ reduce<U_1>(callbackfn: (previousValue: U_1, currentValue: Record<string, any>, currentIndex: number, array: Record<string, any>[]) => U_1, initialValue: U_1): U_1;
111
+ reduceRight(callbackfn: (previousValue: Record<string, any>, currentValue: Record<string, any>, currentIndex: number, array: Record<string, any>[]) => Record<string, any>): Record<string, any>;
112
+ reduceRight(callbackfn: (previousValue: Record<string, any>, currentValue: Record<string, any>, currentIndex: number, array: Record<string, any>[]) => Record<string, any>, initialValue: Record<string, any>): Record<string, any>;
113
+ reduceRight<U_2>(callbackfn: (previousValue: U_2, currentValue: Record<string, any>, currentIndex: number, array: Record<string, any>[]) => U_2, initialValue: U_2): U_2;
114
+ find<S_2 extends Record<string, any>>(predicate: (this: void, value: Record<string, any>, index: number, obj: Record<string, any>[]) => value is S_2, thisArg?: any): S_2;
115
+ find(predicate: (value: Record<string, any>, index: number, obj: Record<string, any>[]) => unknown, thisArg?: any): Record<string, any>;
116
+ findIndex(predicate: (value: Record<string, any>, index: number, obj: Record<string, any>[]) => unknown, thisArg?: any): number;
117
+ fill(value: Record<string, any>, start?: number, end?: number): Record<string, any>[];
118
+ copyWithin(target: number, start: number, end?: number): Record<string, any>[];
119
+ entries(): IterableIterator<[number, Record<string, any>]>;
120
+ keys(): IterableIterator<number>;
121
+ values(): IterableIterator<Record<string, any>>;
122
+ includes(searchElement: Record<string, any>, fromIndex?: number): boolean;
123
+ [Symbol.iterator](): IterableIterator<Record<string, any>>;
124
+ [Symbol.unscopables](): {
125
+ copyWithin: boolean;
126
+ entries: boolean;
127
+ fill: boolean;
128
+ find: boolean;
129
+ findIndex: boolean;
130
+ keys: boolean;
131
+ values: boolean;
132
+ };
133
+ };
85
134
  /**
86
135
  * Pure function version of the same function in table foundation
87
136
  * This is not accessible in getDerivedStateFromProps, so fork one out
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.arrayAdd = arrayAdd;
7
7
  exports.assignColumnKeys = assignColumnKeys;
8
- exports.cloneDeep = cloneDeep;
9
8
  exports.equalWith = equalWith;
10
9
  exports.expandBtnShouldInRow = expandBtnShouldInRow;
11
10
  exports.filterColumns = filterColumns;
@@ -38,7 +37,6 @@ exports.isScrollbarColumn = isScrollbarColumn;
38
37
  exports.isSelected = isSelected;
39
38
  exports.isSelectionColumn = isSelectionColumn;
40
39
  exports.isTreeTable = isTreeTable;
41
- exports.mergeColumns = mergeColumns;
42
40
  exports.mergeQueries = mergeQueries;
43
41
  exports.sliceColumnsByLevel = sliceColumnsByLevel;
44
42
  exports.warnIfNoDataIndex = warnIfNoDataIndex;
@@ -56,10 +54,6 @@ var _findIndex2 = _interopRequireDefault(require("lodash/findIndex"));
56
54
 
57
55
  var _each2 = _interopRequireDefault(require("lodash/each"));
58
56
 
59
- var _clone2 = _interopRequireDefault(require("lodash/clone"));
60
-
61
- var _map2 = _interopRequireDefault(require("lodash/map"));
62
-
63
57
  var _find2 = _interopRequireDefault(require("lodash/find"));
64
58
 
65
59
  var _filter2 = _interopRequireDefault(require("lodash/filter"));
@@ -68,8 +62,6 @@ var _get2 = _interopRequireDefault(require("lodash/get"));
68
62
 
69
63
  var _isEqualWith2 = _interopRequireDefault(require("lodash/isEqualWith"));
70
64
 
71
- var _cloneDeepWith2 = _interopRequireDefault(require("lodash/cloneDeepWith"));
72
-
73
65
  var _constants = require("./constants");
74
66
 
75
67
  var _isNullOrUndefined = _interopRequireDefault(require("../utils/isNullOrUndefined"));
@@ -78,18 +70,6 @@ var _Logger = _interopRequireDefault(require("../utils/Logger"));
78
70
 
79
71
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
80
72
 
81
- function cloneDeep(value, customizer) {
82
- return (0, _cloneDeepWith2.default)(value, v => {
83
- if (typeof v === 'function') {
84
- return v;
85
- } else if (typeof customizer === 'function') {
86
- return customizer(v);
87
- }
88
-
89
- return undefined;
90
- });
91
- }
92
-
93
73
  function equalWith(value, other, customizer) {
94
74
  return (0, _isEqualWith2.default)(value, other, function (objVal, othVal) {
95
75
  if (typeof objVal === 'function' && typeof othVal === 'function') {
@@ -123,33 +103,6 @@ function getColumnKey(column, keyPropNames) {
123
103
  });
124
104
  return key;
125
105
  }
126
-
127
- function mergeColumns() {
128
- let oldColumns = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
129
- let newColumns = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
130
- let keyPropNames = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
131
- let deep = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
132
- const finalColumns = [];
133
- const clone = deep ? cloneDeep : _clone2.default;
134
-
135
- if (deep) {
136
- const logger = new _Logger.default('[@douyinfe/semi-ui Table]');
137
- logger.warn('Should not deep merge columns from foundation since columns may have react elements. Merge columns deep from semi-ui');
138
- }
139
-
140
- (0, _map2.default)(newColumns, newColumn => {
141
- newColumn = Object.assign({}, newColumn);
142
- const key = getColumnKey(newColumn, keyPropNames);
143
- const oldColumn = key != null && (0, _find2.default)(oldColumns, item => getColumnKey(item, keyPropNames) === key);
144
-
145
- if (oldColumn) {
146
- finalColumns.push(clone(Object.assign(Object.assign({}, oldColumn), newColumn)));
147
- } else {
148
- finalColumns.push(clone(newColumn));
149
- }
150
- });
151
- return finalColumns;
152
- }
153
106
  /**
154
107
  *
155
108
  * @param {Array<number>} arr
@@ -529,7 +482,7 @@ function mergeQueries(query) {
529
482
 
530
483
 
531
484
  function withResizeWidth(columns, newColumns) {
532
- const _newColumns = cloneDeep(newColumns);
485
+ const _newColumns = Object.assign({}, newColumns);
533
486
 
534
487
  for (const column of columns) {
535
488
  if (!(0, _isNullOrUndefined.default)(column.width)) {
@@ -75,6 +75,8 @@ $color-table_resizer-bg-default: var(--semi-color-primary); // 表格拉伸标
75
75
  $color-table_selection-bg-default: rgba(var(--semi-grey-0), 1); // 表格分组背景色
76
76
  $color-table_placeholder-text-default: var(--semi-color-text-2); // 表格空数据文本颜色
77
77
 
78
+ $color-table_cell-bg-hover: var(--semi-color-bg-0); // 让表格在 hover 时正确显示 $color-table_body-bg-hover 颜色,如无必要不要修改
79
+
78
80
  // Other
79
81
  $font-table_base-fontSize: 14px; // 表格默认文本字号
80
82
  $border-table_base-borderStyle: solid; // 表格描边样式
@@ -278,6 +278,7 @@
278
278
  }
279
279
  .semi-tree-option-list-block .semi-tree-option-spin-icon {
280
280
  display: flex;
281
+ line-height: 0;
281
282
  color: var(--semi-color-primary);
282
283
  }
283
284
  .semi-tree-option-list-block .semi-tree-option-spin-icon svg {
@@ -302,6 +302,7 @@ $module: #{$prefix}-tree;
302
302
 
303
303
  &-spin-icon {
304
304
  display: flex;
305
+ line-height: 0; // make the spin icon in the center
305
306
  & svg {
306
307
  width: $width-tree_spinIcon;
307
308
  height: $width-tree_spinIcon;
@@ -20,6 +20,8 @@ export interface BasicTriggerRenderProps {
20
20
  placeholder: string;
21
21
  value: BasicTreeNodeData[];
22
22
  onClear: (e: any) => void;
23
+ onSearch: (inputValue: string) => void;
24
+ onRemove: (key: string) => void;
23
25
  }
24
26
  export declare type BasicOnChangeWithObject = (node: BasicTreeNodeData[] | BasicTreeNodeData, e: any) => void;
25
27
  export declare type BasicOnChangeWithBasic = (value: BasicTreeNodeData['value'], node: BasicTreeNodeData[] | BasicTreeNodeData, e: any) => void;
@@ -59,6 +61,7 @@ export interface BasicTreeSelectProps extends Pick<BasicTreeProps, 'virtualize'
59
61
  loadedKeys?: string[];
60
62
  showRestTagsPopover?: boolean;
61
63
  restTagsPopoverProps?: any;
64
+ clickTriggerToHide?: boolean;
62
65
  loadData?: (data: BasicTreeNodeData) => Promise<void>;
63
66
  onSelect?: (selectedKeys: string, selected: boolean, selectedNode: BasicTreeNodeData) => void;
64
67
  searchRender?: (inputProps: any) => any;
@@ -386,7 +386,8 @@ class TreeSelectFoundation extends _foundation.default {
386
386
  isFocus
387
387
  } = this.getStates();
388
388
  const {
389
- searchPosition
389
+ searchPosition,
390
+ clickTriggerToHide
390
391
  } = this.getProps();
391
392
 
392
393
  if (isDisabled) {
@@ -401,7 +402,7 @@ class TreeSelectFoundation extends _foundation.default {
401
402
  return;
402
403
  }
403
404
 
404
- this.close(e);
405
+ clickTriggerToHide && this.close(e);
405
406
  } else {
406
407
  this.open();
407
408
  }
@@ -214,6 +214,9 @@
214
214
  position: relative;
215
215
  top: -1px;
216
216
  }
217
+ .semi-upload-file-card-icon-loading {
218
+ line-height: 0;
219
+ }
217
220
  .semi-upload-file-card-icon-loading .semi-spin-wrapper svg {
218
221
  height: 11px;
219
222
  width: 11px;
@@ -258,6 +258,7 @@ $module: #{$prefix}-upload;
258
258
  }
259
259
 
260
260
  &-loading {
261
+ line-height: 0; // make the spin icon in the center
261
262
  .#{$prefix}-spin-wrapper svg {
262
263
  height: $width-upload_file_card-icon;
263
264
  width: $width-upload_file_card-icon;
@@ -94,6 +94,7 @@
94
94
  padding-top: 8px;
95
95
  padding-bottom: 8px;
96
96
  cursor: not-allowed;
97
+ height: 20px;
97
98
  }
98
99
  .semi-autocomplete-loading-wrapper .semi-spin {
99
100
  width: 100%;
@@ -27,6 +27,8 @@ $module: #{$prefix}-autocomplete;
27
27
  padding-top: $spacing-autoComplete_loading_wrapper-paddingTop;
28
28
  padding-bottom: $spacing-autoComplete_loading_wrapper-paddingBottom;
29
29
  cursor: not-allowed;
30
+ // make sure that spin align vertical, no need to make 20px as a spacing token here
31
+ height: 20px;
30
32
  // height: $spacing-extra-loose;
31
33
  // @include all-center;
32
34
  .#{$prefix}-spin {
@@ -47,8 +47,10 @@ export interface BasicTriggerRenderProps {
47
47
  * should call this function when the value of the Input component
48
48
  * customized by triggerRender is updated to synchronize the state
49
49
  * with Cascader. */
50
+ onSearch: (inputValue: string) => void;
50
51
  onChange: (inputValue: string) => void;
51
52
  onClear: (e: any) => void;
53
+ onRemove: (key: string) => void;
52
54
  }
53
55
  export interface BasicScrollPanelProps {
54
56
  panelIndex: number;
@@ -4,6 +4,7 @@ declare const getDefaultFormatToken: (type: string) => {
4
4
  readonly dateRange: "yyyy-MM-dd";
5
5
  readonly dateTimeRange: "yyyy-MM-dd HH:mm:ss";
6
6
  readonly month: "yyyy-MM";
7
+ readonly monthRange: "yyyy-MM";
7
8
  };
8
9
  export declare function getDefaultFormatTokenByType(type: string): any;
9
10
  export default getDefaultFormatToken;
@@ -4,7 +4,8 @@ const defaultFormatTokens = {
4
4
  dateTime: strings.FORMAT_DATE_TIME,
5
5
  dateRange: strings.FORMAT_FULL_DATE,
6
6
  dateTimeRange: strings.FORMAT_DATE_TIME,
7
- month: strings.FORMAT_YEAR_MONTH
7
+ month: strings.FORMAT_YEAR_MONTH,
8
+ monthRange: strings.FORMAT_YEAR_MONTH
8
9
  };
9
10
 
10
11
  const getDefaultFormatToken = type => defaultFormatTokens;
@@ -34,6 +34,7 @@ export default function getInsetInputFormatToken(options) {
34
34
 
35
35
  case 'date':
36
36
  case 'month':
37
+ case 'monthRange':
37
38
  case 'dateRange':
38
39
  default:
39
40
  const dateResult = dateReg.exec(format);
@@ -36,6 +36,7 @@ export default function getInsetInputValueFromInsetInputStr(options) {
36
36
  switch (type) {
37
37
  case 'date':
38
38
  case 'month':
39
+ case 'monthRange':
39
40
  insetInputValue.monthLeft.dateInput = inputValue;
40
41
  break;
41
42
 
@@ -35,7 +35,7 @@ declare const strings: {
35
35
  readonly DEFAULT_SEPARATOR_MULTIPLE: ",";
36
36
  readonly DEFAULT_SEPARATOR_RANGE: " ~ ";
37
37
  readonly SIZE_SET: readonly ["small", "default", "large"];
38
- readonly TYPE_SET: readonly ["date", "dateRange", "year", "month", "dateTime", "dateTimeRange"];
38
+ readonly TYPE_SET: readonly ["date", "dateRange", "year", "month", "monthRange", "dateTime", "dateTimeRange"];
39
39
  readonly PRESET_POSITION_SET: readonly ["left", "right", "top", "bottom"];
40
40
  readonly DENSITY_SET: readonly ["default", "compact"];
41
41
  readonly PANEL_TYPE_LEFT: "left";
@@ -41,7 +41,7 @@ const strings = Object.assign({
41
41
  DEFAULT_SEPARATOR_MULTIPLE: ',',
42
42
  DEFAULT_SEPARATOR_RANGE: ' ~ ',
43
43
  SIZE_SET: ['small', 'default', 'large'],
44
- TYPE_SET: ['date', 'dateRange', 'year', 'month', 'dateTime', 'dateTimeRange'],
44
+ TYPE_SET: ['date', 'dateRange', 'year', 'month', 'monthRange', 'dateTime', 'dateTimeRange'],
45
45
  PRESET_POSITION_SET: ['left', 'right', 'top', 'bottom'],
46
46
  DENSITY_SET: ['default', 'compact'],
47
47
  PANEL_TYPE_LEFT: 'left',
@@ -118,6 +118,15 @@
118
118
  .semi-datepicker-panel-yam {
119
119
  max-width: 484px;
120
120
  }
121
+ .semi-datepicker-panel-yam[x-type=monthRange] {
122
+ max-width: 584px;
123
+ }
124
+ .semi-datepicker-panel-yam .semi-datepicker-yearmonth-body {
125
+ display: flex;
126
+ }
127
+ .semi-datepicker-panel-yam .semi-datepicker-yearmonth-body .semi-scrolllist:nth-child(2) {
128
+ border-left: 1px solid var(--semi-color-border);
129
+ }
121
130
  .semi-datepicker-panel-yam .semi-scrolllist {
122
131
  box-shadow: none;
123
132
  height: 266px;
@@ -132,10 +141,7 @@
132
141
  padding: 0;
133
142
  overflow: hidden;
134
143
  }
135
- .semi-datepicker-panel-yam .semi-scrolllist-body .semi-scrolllist-item-wheel {
136
- border: none;
137
- }
138
- .semi-datepicker-panel-yam .semi-scrolllist-body .semi-scrolllist-item {
144
+ .semi-datepicker-panel-yam .semi-scrolllist-body .semi-scrolllist-item-wheel:not(#neverExistElement) {
139
145
  border: none;
140
146
  }
141
147
  .semi-datepicker-footer {
@@ -456,16 +462,16 @@
456
462
  .semi-datepicker-quick-control-top-month-content, .semi-datepicker-quick-control-bottom-month-content {
457
463
  box-sizing: border-box;
458
464
  display: grid;
459
- grid-template-columns: repeat(2, minmax(65.5px, 73px));
465
+ grid-template-columns: repeat(2, minmax(51px, 58.5px));
460
466
  grid-gap: 8px;
461
467
  align-content: flex-start;
462
468
  padding: 8px 20px;
463
469
  }
464
470
  .semi-datepicker-quick-control-top-month-content-item, .semi-datepicker-quick-control-bottom-month-content-item {
465
- max-width: 73px;
471
+ max-width: 58.5px;
466
472
  }
467
473
  .semi-datepicker-quick-control-top-month-content-item-ellipsis, .semi-datepicker-quick-control-bottom-month-content-item-ellipsis {
468
- max-width: 57px;
474
+ max-width: 42.5px;
469
475
  color: var(--semi-color-primary);
470
476
  }
471
477
  .semi-datepicker-quick-control-month {
@@ -555,7 +561,10 @@
555
561
  width: 568px;
556
562
  }
557
563
  .semi-datepicker-inset-input-wrapper[x-type=month] {
558
- width: 204px;
564
+ width: 165px;
565
+ }
566
+ .semi-datepicker-inset-input-wrapper[x-type=monthRange] {
567
+ width: 331px;
559
568
  }
560
569
  .semi-datepicker-inset-input-wrapper .semi-input-wrapper {
561
570
  flex: 1;
@@ -585,6 +594,9 @@
585
594
  .semi-datepicker-range-input:active {
586
595
  border-color: transparent;
587
596
  }
597
+ .semi-datepicker-range-input .semi-datepicker-monthRange-input {
598
+ background-color: transparent;
599
+ }
588
600
  .semi-datepicker-range-input-wrapper {
589
601
  box-sizing: border-box;
590
602
  background-color: transparent;
@@ -754,6 +766,12 @@
754
766
  height: 48px;
755
767
  padding: 12px;
756
768
  }
769
+ .semi-datepicker-compact .semi-datepicker-month-grid .semi-datepicker-yearmonth-body {
770
+ display: flex;
771
+ }
772
+ .semi-datepicker-compact .semi-datepicker-month-grid .semi-datepicker-yearmonth-body .semi-scrolllist:nth-child(2) {
773
+ border: 1px solid var(--semi-color-border);
774
+ }
757
775
  .semi-datepicker-compact .semi-datepicker-month-grid .semi-scrolllist {
758
776
  font-size: 12px;
759
777
  line-height: 16px;
@@ -955,16 +973,16 @@
955
973
  }
956
974
  .semi-datepicker-compact .semi-datepicker-quick-control-top-month-content, .semi-datepicker-compact .semi-datepicker-quick-control-bottom-month-content {
957
975
  display: grid;
958
- grid-template-columns: repeat(2, minmax(75.5px, 83px));
976
+ grid-template-columns: repeat(2, minmax(61px, 68.5px));
959
977
  grid-gap: 8px;
960
978
  align-content: flex-start;
961
979
  padding: 8px 10px;
962
980
  }
963
981
  .semi-datepicker-compact .semi-datepicker-quick-control-top-month-content-item, .semi-datepicker-compact .semi-datepicker-quick-control-bottom-month-content-item {
964
- max-width: 83px;
982
+ max-width: 68.5px;
965
983
  }
966
984
  .semi-datepicker-compact .semi-datepicker-quick-control-top-month-content-item-ellipsis, .semi-datepicker-compact .semi-datepicker-quick-control-bottom-month-content-item-ellipsis {
967
- max-width: 67px;
985
+ max-width: 52.5px;
968
986
  font-size: 12px;
969
987
  color: var(--semi-color-primary);
970
988
  }