@douyinfe/semi-foundation 2.45.0-beta.0 → 2.45.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -73,7 +73,7 @@ $multiple: #{$module}-multiple;
73
73
 
74
74
  &-selected {
75
75
  font-weight: $font-weight-bold;
76
-
76
+ background: $color-select-option-bg-selected;
77
77
  .#{$module}-option-icon {
78
78
  color: $color-select_option-icon-active;
79
79
  }
@@ -61,6 +61,7 @@
61
61
  }
62
62
  .semi-select-option-selected {
63
63
  font-weight: 600;
64
+ background: transparent;
64
65
  }
65
66
  .semi-select-option-selected .semi-select-option-icon {
66
67
  color: var(--semi-color-text-2);
@@ -44,6 +44,7 @@ $color-select_option_disabled-text: var(--semi-color-disabled-text); // 禁用
44
44
  $color-select_option_disabled-bg: transparent; // 禁用选择器菜单选项背景颜色
45
45
  $color-select_option-icon-active: var(--semi-color-text-2); // 禁用选择器菜单选项图标颜色 - 选中态
46
46
  $color-select_option-border-default: var(--semi-color-border); // 分组选择器菜单项描边颜色
47
+ $color-select-option-bg-selected: transparent; // 选择器菜单选项背景颜色 - 选中态
47
48
  $color-select_inset_label-text: var(--semi-color-text-2); // 分组选择器菜单项辅助文本颜色
48
49
  $color-select_create_tips-text: var(--semi-color-text-2); // 分组选择器菜单项提示文本颜色
49
50
  $color-select_group-text: var(--semi-color-text-2); // 分组选择器菜单项分组标题文本颜色
@@ -80,58 +80,7 @@ export declare function mergeQueries(query: Record<string, any>, queries?: Recor
80
80
  * @param {Object[]} columns columns retain the column width after resize
81
81
  * @param {Object[]} newColumns
82
82
  */
83
- export declare function withResizeWidth(columns: Record<string, any>[], newColumns: Record<string, any>[]): {
84
- [x: number]: Record<string, any>;
85
- length: number;
86
- toString(): string;
87
- toLocaleString(): string;
88
- pop(): Record<string, any>;
89
- push(...items: Record<string, any>[]): number;
90
- concat(...items: ConcatArray<Record<string, any>>[]): Record<string, any>[];
91
- concat(...items: (Record<string, any> | ConcatArray<Record<string, any>>)[]): Record<string, any>[];
92
- join(separator?: string): string;
93
- reverse(): Record<string, any>[];
94
- shift(): Record<string, any>;
95
- slice(start?: number, end?: number): Record<string, any>[];
96
- sort(compareFn?: (a: Record<string, any>, b: Record<string, any>) => number): Record<string, any>[];
97
- splice(start: number, deleteCount?: number): Record<string, any>[];
98
- splice(start: number, deleteCount: number, ...items: Record<string, any>[]): Record<string, any>[];
99
- unshift(...items: Record<string, any>[]): number;
100
- indexOf(searchElement: Record<string, any>, fromIndex?: number): number;
101
- lastIndexOf(searchElement: Record<string, any>, fromIndex?: number): number;
102
- 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[];
103
- every(predicate: (value: Record<string, any>, index: number, array: Record<string, any>[]) => unknown, thisArg?: any): boolean;
104
- some(predicate: (value: Record<string, any>, index: number, array: Record<string, any>[]) => unknown, thisArg?: any): boolean;
105
- forEach(callbackfn: (value: Record<string, any>, index: number, array: Record<string, any>[]) => void, thisArg?: any): void;
106
- map<U>(callbackfn: (value: Record<string, any>, index: number, array: Record<string, any>[]) => U, thisArg?: any): U[];
107
- 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[];
108
- filter(predicate: (value: Record<string, any>, index: number, array: Record<string, any>[]) => unknown, thisArg?: any): Record<string, any>[];
109
- reduce(callbackfn: (previousValue: Record<string, any>, currentValue: Record<string, any>, currentIndex: number, array: Record<string, any>[]) => Record<string, any>): Record<string, any>;
110
- 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>;
111
- reduce<U_1>(callbackfn: (previousValue: U_1, currentValue: Record<string, any>, currentIndex: number, array: Record<string, any>[]) => U_1, initialValue: U_1): U_1;
112
- reduceRight(callbackfn: (previousValue: Record<string, any>, currentValue: Record<string, any>, currentIndex: number, array: Record<string, any>[]) => Record<string, any>): Record<string, any>;
113
- 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>;
114
- reduceRight<U_2>(callbackfn: (previousValue: U_2, currentValue: Record<string, any>, currentIndex: number, array: Record<string, any>[]) => U_2, initialValue: U_2): U_2;
115
- 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;
116
- find(predicate: (value: Record<string, any>, index: number, obj: Record<string, any>[]) => unknown, thisArg?: any): Record<string, any>;
117
- findIndex(predicate: (value: Record<string, any>, index: number, obj: Record<string, any>[]) => unknown, thisArg?: any): number;
118
- fill(value: Record<string, any>, start?: number, end?: number): Record<string, any>[];
119
- copyWithin(target: number, start: number, end?: number): Record<string, any>[];
120
- entries(): IterableIterator<[number, Record<string, any>]>;
121
- keys(): IterableIterator<number>;
122
- values(): IterableIterator<Record<string, any>>;
123
- includes(searchElement: Record<string, any>, fromIndex?: number): boolean;
124
- [Symbol.iterator](): IterableIterator<Record<string, any>>;
125
- [Symbol.unscopables](): {
126
- copyWithin: boolean;
127
- entries: boolean;
128
- fill: boolean;
129
- find: boolean;
130
- findIndex: boolean;
131
- keys: boolean;
132
- values: boolean;
133
- };
134
- };
83
+ export declare function withResizeWidth(columns: Record<string, any>[], newColumns: Record<string, any>[]): Record<string, any>[];
135
84
  /**
136
85
  * Pure function version of the same function in table foundation
137
86
  * This is not accessible in getDerivedStateFromProps, so fork one out
@@ -388,7 +388,7 @@ function mergeQueries(query) {
388
388
  * @param {Object[]} newColumns
389
389
  */
390
390
  function withResizeWidth(columns, newColumns) {
391
- const _newColumns = Object.assign({}, newColumns);
391
+ const _newColumns = [...newColumns];
392
392
  for (const column of columns) {
393
393
  if (!(0, _isNullOrUndefined.default)(column.width)) {
394
394
  const currentColumn = column.key;
@@ -73,7 +73,7 @@ $multiple: #{$module}-multiple;
73
73
 
74
74
  &-selected {
75
75
  font-weight: $font-weight-bold;
76
-
76
+ background: $color-select-option-bg-selected;
77
77
  .#{$module}-option-icon {
78
78
  color: $color-select_option-icon-active;
79
79
  }
@@ -61,6 +61,7 @@
61
61
  }
62
62
  .semi-select-option-selected {
63
63
  font-weight: 600;
64
+ background: transparent;
64
65
  }
65
66
  .semi-select-option-selected .semi-select-option-icon {
66
67
  color: var(--semi-color-text-2);
@@ -44,6 +44,7 @@ $color-select_option_disabled-text: var(--semi-color-disabled-text); // 禁用
44
44
  $color-select_option_disabled-bg: transparent; // 禁用选择器菜单选项背景颜色
45
45
  $color-select_option-icon-active: var(--semi-color-text-2); // 禁用选择器菜单选项图标颜色 - 选中态
46
46
  $color-select_option-border-default: var(--semi-color-border); // 分组选择器菜单项描边颜色
47
+ $color-select-option-bg-selected: transparent; // 选择器菜单选项背景颜色 - 选中态
47
48
  $color-select_inset_label-text: var(--semi-color-text-2); // 分组选择器菜单项辅助文本颜色
48
49
  $color-select_create_tips-text: var(--semi-color-text-2); // 分组选择器菜单项提示文本颜色
49
50
  $color-select_group-text: var(--semi-color-text-2); // 分组选择器菜单项分组标题文本颜色
@@ -80,58 +80,7 @@ export declare function mergeQueries(query: Record<string, any>, queries?: Recor
80
80
  * @param {Object[]} columns columns retain the column width after resize
81
81
  * @param {Object[]} newColumns
82
82
  */
83
- export declare function withResizeWidth(columns: Record<string, any>[], newColumns: Record<string, any>[]): {
84
- [x: number]: Record<string, any>;
85
- length: number;
86
- toString(): string;
87
- toLocaleString(): string;
88
- pop(): Record<string, any>;
89
- push(...items: Record<string, any>[]): number;
90
- concat(...items: ConcatArray<Record<string, any>>[]): Record<string, any>[];
91
- concat(...items: (Record<string, any> | ConcatArray<Record<string, any>>)[]): Record<string, any>[];
92
- join(separator?: string): string;
93
- reverse(): Record<string, any>[];
94
- shift(): Record<string, any>;
95
- slice(start?: number, end?: number): Record<string, any>[];
96
- sort(compareFn?: (a: Record<string, any>, b: Record<string, any>) => number): Record<string, any>[];
97
- splice(start: number, deleteCount?: number): Record<string, any>[];
98
- splice(start: number, deleteCount: number, ...items: Record<string, any>[]): Record<string, any>[];
99
- unshift(...items: Record<string, any>[]): number;
100
- indexOf(searchElement: Record<string, any>, fromIndex?: number): number;
101
- lastIndexOf(searchElement: Record<string, any>, fromIndex?: number): number;
102
- 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[];
103
- every(predicate: (value: Record<string, any>, index: number, array: Record<string, any>[]) => unknown, thisArg?: any): boolean;
104
- some(predicate: (value: Record<string, any>, index: number, array: Record<string, any>[]) => unknown, thisArg?: any): boolean;
105
- forEach(callbackfn: (value: Record<string, any>, index: number, array: Record<string, any>[]) => void, thisArg?: any): void;
106
- map<U>(callbackfn: (value: Record<string, any>, index: number, array: Record<string, any>[]) => U, thisArg?: any): U[];
107
- 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[];
108
- filter(predicate: (value: Record<string, any>, index: number, array: Record<string, any>[]) => unknown, thisArg?: any): Record<string, any>[];
109
- reduce(callbackfn: (previousValue: Record<string, any>, currentValue: Record<string, any>, currentIndex: number, array: Record<string, any>[]) => Record<string, any>): Record<string, any>;
110
- 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>;
111
- reduce<U_1>(callbackfn: (previousValue: U_1, currentValue: Record<string, any>, currentIndex: number, array: Record<string, any>[]) => U_1, initialValue: U_1): U_1;
112
- reduceRight(callbackfn: (previousValue: Record<string, any>, currentValue: Record<string, any>, currentIndex: number, array: Record<string, any>[]) => Record<string, any>): Record<string, any>;
113
- 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>;
114
- reduceRight<U_2>(callbackfn: (previousValue: U_2, currentValue: Record<string, any>, currentIndex: number, array: Record<string, any>[]) => U_2, initialValue: U_2): U_2;
115
- 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;
116
- find(predicate: (value: Record<string, any>, index: number, obj: Record<string, any>[]) => unknown, thisArg?: any): Record<string, any>;
117
- findIndex(predicate: (value: Record<string, any>, index: number, obj: Record<string, any>[]) => unknown, thisArg?: any): number;
118
- fill(value: Record<string, any>, start?: number, end?: number): Record<string, any>[];
119
- copyWithin(target: number, start: number, end?: number): Record<string, any>[];
120
- entries(): IterableIterator<[number, Record<string, any>]>;
121
- keys(): IterableIterator<number>;
122
- values(): IterableIterator<Record<string, any>>;
123
- includes(searchElement: Record<string, any>, fromIndex?: number): boolean;
124
- [Symbol.iterator](): IterableIterator<Record<string, any>>;
125
- [Symbol.unscopables](): {
126
- copyWithin: boolean;
127
- entries: boolean;
128
- fill: boolean;
129
- find: boolean;
130
- findIndex: boolean;
131
- keys: boolean;
132
- values: boolean;
133
- };
134
- };
83
+ export declare function withResizeWidth(columns: Record<string, any>[], newColumns: Record<string, any>[]): Record<string, any>[];
135
84
  /**
136
85
  * Pure function version of the same function in table foundation
137
86
  * This is not accessible in getDerivedStateFromProps, so fork one out
@@ -343,7 +343,7 @@ export function mergeQueries(query) {
343
343
  * @param {Object[]} newColumns
344
344
  */
345
345
  export function withResizeWidth(columns, newColumns) {
346
- const _newColumns = Object.assign({}, newColumns);
346
+ const _newColumns = [...newColumns];
347
347
  for (const column of columns) {
348
348
  if (!isNullOrUndefined(column.width)) {
349
349
  const currentColumn = column.key;
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@douyinfe/semi-foundation",
3
- "version": "2.45.0-beta.0",
3
+ "version": "2.45.1",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "build:lib": "node ./scripts/compileLib.js",
7
7
  "prepublishOnly": "npm run build:lib"
8
8
  },
9
9
  "dependencies": {
10
- "@douyinfe/semi-animation": "2.45.0-beta.0",
10
+ "@douyinfe/semi-animation": "2.45.1",
11
11
  "async-validator": "^3.5.0",
12
12
  "classnames": "^2.2.6",
13
13
  "date-fns": "^2.29.3",
@@ -23,7 +23,7 @@
23
23
  "*.scss",
24
24
  "*.css"
25
25
  ],
26
- "gitHead": "7a93b57c88a43db5c47b649741a9b6ba861560f4",
26
+ "gitHead": "6ab2e8c858c718b40b6bf366e9b7c4a4992801c6",
27
27
  "devDependencies": {
28
28
  "@babel/plugin-transform-runtime": "^7.15.8",
29
29
  "@babel/preset-env": "^7.15.8",
@@ -73,7 +73,7 @@ $multiple: #{$module}-multiple;
73
73
 
74
74
  &-selected {
75
75
  font-weight: $font-weight-bold;
76
-
76
+ background: $color-select-option-bg-selected;
77
77
  .#{$module}-option-icon {
78
78
  color: $color-select_option-icon-active;
79
79
  }
@@ -44,6 +44,7 @@ $color-select_option_disabled-text: var(--semi-color-disabled-text); // 禁用
44
44
  $color-select_option_disabled-bg: transparent; // 禁用选择器菜单选项背景颜色
45
45
  $color-select_option-icon-active: var(--semi-color-text-2); // 禁用选择器菜单选项图标颜色 - 选中态
46
46
  $color-select_option-border-default: var(--semi-color-border); // 分组选择器菜单项描边颜色
47
+ $color-select-option-bg-selected: transparent; // 选择器菜单选项背景颜色 - 选中态
47
48
  $color-select_inset_label-text: var(--semi-color-text-2); // 分组选择器菜单项辅助文本颜色
48
49
  $color-select_create_tips-text: var(--semi-color-text-2); // 分组选择器菜单项提示文本颜色
49
50
  $color-select_group-text: var(--semi-color-text-2); // 分组选择器菜单项分组标题文本颜色
package/table/utils.ts CHANGED
@@ -393,7 +393,7 @@ export function mergeQueries(query: Record<string, any>, queries: Record<string,
393
393
  * @param {Object[]} newColumns
394
394
  */
395
395
  export function withResizeWidth(columns: Record<string, any>[], newColumns: Record<string, any>[]) {
396
- const _newColumns = { ...newColumns };
396
+ const _newColumns = [ ...newColumns ];
397
397
  for (const column of columns) {
398
398
  if (!isNullOrUndefined(column.width)) {
399
399
  const currentColumn = column.key;