@rainbow-oh/yee-c 0.4.3 → 0.4.4

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 (96) hide show
  1. package/dist/cjs/Cascader/cascader.js +53 -62
  2. package/dist/cjs/Cascader/interface.d.ts +19 -2
  3. package/dist/cjs/Cascader/node.js +11 -6
  4. package/dist/cjs/Cascader/search-list.js +2 -1
  5. package/dist/cjs/Cascader/utils/index.d.ts +58 -14
  6. package/dist/cjs/Cascader/utils/index.js +57 -73
  7. package/dist/cjs/Input/style/index.less +19 -0
  8. package/dist/cjs/Popover/style/index.less +1 -0
  9. package/dist/cjs/Select/interface.d.ts +77 -0
  10. package/dist/cjs/Select/option.d.ts +2 -1
  11. package/dist/cjs/Select/option.js +6 -3
  12. package/dist/cjs/Select/options.d.ts +3 -2
  13. package/dist/cjs/Select/options.js +53 -47
  14. package/dist/cjs/Select/select.js +1 -1
  15. package/dist/cjs/Select/style/index.less +8 -0
  16. package/dist/cjs/Selector/interface.d.ts +4 -0
  17. package/dist/cjs/Selector/selector.js +3 -0
  18. package/dist/cjs/Selector/style/index.less +135 -116
  19. package/dist/cjs/Table/hooks/useFilter.js +1 -1
  20. package/dist/cjs/Table/interface.d.ts +4 -0
  21. package/dist/cjs/Table/style/index.less +2 -0
  22. package/dist/cjs/Table/theader/filter.js +2 -1
  23. package/dist/cjs/Tabs/demo/basic.js +8 -1
  24. package/dist/cjs/Tabs/tabs.js +3 -1
  25. package/dist/cjs/Tag/demo/checkable.js +1 -0
  26. package/dist/cjs/Tag/tag.js +1 -1
  27. package/dist/cjs/Trigger/trigger.js +1 -1
  28. package/dist/cjs/style/color.css +1 -1
  29. package/dist/cjs/style/size.css +10 -2
  30. package/dist/cjs/style/themes.css +1 -1
  31. package/dist/cjs/style/variables.css +12 -4
  32. package/dist/cjs/version.d.ts +1 -1
  33. package/dist/cjs/version.js +1 -1
  34. package/dist/esm/Cascader/cascader.js +49 -56
  35. package/dist/esm/Cascader/interface.d.ts +19 -2
  36. package/dist/esm/Cascader/node.js +8 -11
  37. package/dist/esm/Cascader/search-list.js +2 -1
  38. package/dist/esm/Cascader/utils/index.d.ts +58 -14
  39. package/dist/esm/Cascader/utils/index.js +124 -75
  40. package/dist/esm/Input/style/index.less +19 -0
  41. package/dist/esm/Popover/style/index.less +1 -0
  42. package/dist/esm/Select/interface.d.ts +77 -0
  43. package/dist/esm/Select/option.d.ts +2 -1
  44. package/dist/esm/Select/option.js +11 -2
  45. package/dist/esm/Select/options.d.ts +3 -2
  46. package/dist/esm/Select/options.js +3 -1
  47. package/dist/esm/Select/select.js +1 -3
  48. package/dist/esm/Select/style/index.less +8 -0
  49. package/dist/esm/Selector/interface.d.ts +4 -0
  50. package/dist/esm/Selector/selector.js +4 -2
  51. package/dist/esm/Selector/style/index.less +135 -116
  52. package/dist/esm/Table/hooks/useFilter.js +1 -1
  53. package/dist/esm/Table/interface.d.ts +4 -0
  54. package/dist/esm/Table/style/index.less +2 -0
  55. package/dist/esm/Table/theader/filter.js +3 -4
  56. package/dist/esm/Tabs/demo/basic.js +4 -1
  57. package/dist/esm/Tabs/tabs.js +3 -1
  58. package/dist/esm/Tag/demo/checkable.js +1 -0
  59. package/dist/esm/Tag/tag.js +1 -1
  60. package/dist/esm/Trigger/trigger.js +1 -1
  61. package/dist/esm/style/color.css +1 -1
  62. package/dist/esm/style/size.css +10 -2
  63. package/dist/esm/style/themes.css +1 -1
  64. package/dist/esm/style/variables.css +12 -4
  65. package/dist/esm/version.d.ts +1 -1
  66. package/dist/esm/version.js +1 -1
  67. package/dist/umd/yee-c.min.css +2 -2
  68. package/dist/umd/yee-c.min.js +1 -1
  69. package/package.json +1 -1
  70. package/src/Cascader/cascader.tsx +65 -62
  71. package/src/Cascader/interface.ts +19 -2
  72. package/src/Cascader/node.tsx +12 -7
  73. package/src/Cascader/search-list.tsx +1 -1
  74. package/src/Cascader/utils/index.ts +130 -68
  75. package/src/Input/style/index.less +19 -0
  76. package/src/Popover/style/index.less +1 -0
  77. package/src/Select/interface.ts +87 -0
  78. package/src/Select/option.tsx +13 -4
  79. package/src/Select/options.tsx +49 -43
  80. package/src/Select/select.tsx +5 -2
  81. package/src/Select/style/index.less +8 -0
  82. package/src/Selector/interface.ts +4 -0
  83. package/src/Selector/selector.tsx +2 -0
  84. package/src/Selector/style/index.less +135 -116
  85. package/src/Table/hooks/useFilter.ts +1 -1
  86. package/src/Table/interface.ts +4 -0
  87. package/src/Table/style/index.less +2 -0
  88. package/src/Table/theader/filter.tsx +2 -2
  89. package/src/Tabs/demo/basic.tsx +7 -1
  90. package/src/Tabs/tabs.tsx +3 -2
  91. package/src/Tag/demo/checkable.tsx +1 -0
  92. package/src/Tag/tag.tsx +1 -1
  93. package/src/Trigger/trigger.tsx +1 -1
  94. package/src/style/color.css +1 -1
  95. package/src/style/size.css +10 -2
  96. package/src/version.ts +1 -1
@@ -69,6 +69,25 @@
69
69
  }
70
70
  }
71
71
 
72
+ // size
73
+ &-small {
74
+ height: var(--yee-input-small-height, 24px);
75
+ padding: var(--yee-input-small-padding, 0 6px);
76
+ font-size: var(--yee-input-small-font-size);
77
+ line-height: var(--yee-input-small-line-height);
78
+
79
+ &::placeholder {
80
+ font-size: var(--yee-input-small-font-size);
81
+ }
82
+ }
83
+
84
+ &-large {
85
+ height: var(--yee-input-large-height, 40px);
86
+ padding: var(--yee-input-large-padding, 4px 12px);
87
+ font-size: var(--yee-input-large-font-size);
88
+ line-height: var(--yee-input-large-line-height);
89
+ }
90
+
72
91
  &-password {
73
92
  flex: 1;
74
93
  outline: none;
@@ -6,6 +6,7 @@
6
6
  color: var(--yee-color-text);
7
7
  background-color: var(--yee-popover-bg-color);
8
8
  border-radius: var(--yee-popover-border-radius);
9
+ overflow: hidden;
9
10
 
10
11
  &-header {
11
12
  margin-bottom: var(--yee-popover-header-margin-bottom);
@@ -105,3 +105,90 @@ export interface SelectProps extends DataAttributeProps {
105
105
  */
106
106
  onFilter?: (value: string, options: Array<Option>) => Array<Option>;
107
107
  }
108
+
109
+ /**
110
+ * Props for the internal Option component (renders a single dropdown option).
111
+ */
112
+ export interface OptionProps {
113
+ /**
114
+ * Display label
115
+ */
116
+ label: string;
117
+ /**
118
+ * Value
119
+ */
120
+ value: string | number;
121
+ /**
122
+ * Whether disabled
123
+ */
124
+ disabled?: boolean;
125
+ /**
126
+ * Native title attribute
127
+ */
128
+ title?: string;
129
+ /**
130
+ * Test id forwarded to the option element
131
+ */
132
+ dataTestId?: string;
133
+ }
134
+
135
+ /**
136
+ * Context value shared between Options and each Option.
137
+ */
138
+ export interface OptionsContextValue {
139
+ prefixCls: string;
140
+ selectedKeys: Array<string | number>;
141
+ focusedKey: string | number;
142
+ multiple: boolean;
143
+ onSelect: (
144
+ key: string | number,
145
+ e?: React.MouseEvent | React.KeyboardEvent,
146
+ ) => void;
147
+ }
148
+
149
+ /**
150
+ * Props for the internal Options (popup list) component.
151
+ */
152
+ export interface OptionsProps
153
+ extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onSelect'> {
154
+ /**
155
+ * Custom class name prefix
156
+ */
157
+ prefixCls: string;
158
+ /**
159
+ * Dropdown options
160
+ */
161
+ options: Array<Option>;
162
+ /**
163
+ * Popup container class name
164
+ */
165
+ popupClassName?: string;
166
+ /**
167
+ * Popup container inline style
168
+ */
169
+ popupStyle?: React.CSSProperties;
170
+ /**
171
+ * Selected option values
172
+ */
173
+ selectedKeys: Array<string | number>;
174
+ /**
175
+ * Currently focused option value
176
+ */
177
+ focusedKey: string | number;
178
+ /**
179
+ * Test id prefix used to generate each option's test id.
180
+ * Accepts any `data-*` attribute value (see DataAttributeProps).
181
+ */
182
+ dataTestId?: string | number | boolean;
183
+ /**
184
+ * Whether multiple selection mode is active
185
+ */
186
+ multiple: boolean;
187
+ /**
188
+ * Callback when an option is selected
189
+ */
190
+ onSelect: (
191
+ key: string | number,
192
+ e?: React.MouseEvent | React.KeyboardEvent,
193
+ ) => void;
194
+ }
@@ -1,11 +1,13 @@
1
1
  import clsx from 'clsx';
2
+ import { Check } from 'lucide-react';
2
3
  import React, { useContext } from 'react';
3
4
 
5
+ import type { OptionProps } from './interface';
4
6
  import { OptionsCtx } from './options';
5
7
 
6
- const Option = (props: any) => {
8
+ const Option = (props: OptionProps) => {
7
9
  const { label, value, disabled, title, dataTestId } = props;
8
- const { prefixCls, selectedKeys, focusedKey, onSelect } =
10
+ const { prefixCls, selectedKeys, focusedKey, multiple, onSelect } =
9
11
  useContext(OptionsCtx);
10
12
 
11
13
  const handleClick = (e: React.MouseEvent | React.KeyboardEvent) => {
@@ -20,10 +22,12 @@ const Option = (props: any) => {
20
22
  ? label
21
23
  : undefined;
22
24
 
25
+ const selected = selectedKeys.includes(value);
26
+
23
27
  return (
24
28
  <div
25
29
  className={clsx(`${prefixCls}-option`, {
26
- [`${prefixCls}-option-selected`]: selectedKeys.includes(value),
30
+ [`${prefixCls}-option-selected`]: selected,
27
31
  [`${prefixCls}-option-focused`]: focusedKey === value,
28
32
  [`${prefixCls}-option-disabled`]: disabled,
29
33
  })}
@@ -39,7 +43,12 @@ const Option = (props: any) => {
39
43
  title={htmlTitle}
40
44
  data-testid={dataTestId}
41
45
  >
42
- {label}
46
+ <div className={`${prefixCls}-option-content`}>{label}</div>
47
+ {multiple && selected && (
48
+ <span className={`${prefixCls}-option-state`}>
49
+ <Check size={16} />
50
+ </span>
51
+ )}
43
52
  </div>
44
53
  );
45
54
  };
@@ -1,54 +1,60 @@
1
1
  import clsx from 'clsx';
2
2
  import React, { createContext, forwardRef, useRef } from 'react';
3
3
  import { useLocale } from '../locale';
4
+ import type { OptionsContextValue, OptionsProps } from './interface';
4
5
  import Option from './option';
5
6
 
6
- export const OptionsCtx = createContext({} as any);
7
+ export const OptionsCtx = createContext<OptionsContextValue>(
8
+ {} as OptionsContextValue,
9
+ );
7
10
 
8
- const Options = forwardRef((props: any, ref: React.Ref<HTMLDivElement>) => {
9
- const { locale } = useLocale();
10
- const { select } = locale;
11
+ const Options = forwardRef<HTMLDivElement, OptionsProps>(
12
+ (props, ref: React.Ref<HTMLDivElement>) => {
13
+ const { locale } = useLocale();
14
+ const { select } = locale;
11
15
 
12
- const {
13
- prefixCls,
14
- options,
15
- popupClassName,
16
- popupStyle,
17
- selectedKeys,
18
- focusedKey,
19
- dataTestId,
20
- onSelect,
21
- ...rest
22
- } = props;
16
+ const {
17
+ prefixCls,
18
+ options,
19
+ popupClassName,
20
+ popupStyle,
21
+ selectedKeys,
22
+ focusedKey,
23
+ dataTestId,
24
+ multiple,
25
+ onSelect,
26
+ ...rest
27
+ } = props;
23
28
 
24
- // eslint-disable-next-line react-hooks/rules-of-hooks
25
- const componentRef = ref || useRef<HTMLDivElement>(null);
29
+ // eslint-disable-next-line react-hooks/rules-of-hooks
30
+ const componentRef = ref || useRef<HTMLDivElement>(null);
26
31
 
27
- return (
28
- <div
29
- {...rest}
30
- className={clsx(`${prefixCls}-popup`, popupClassName)}
31
- style={popupStyle}
32
- ref={componentRef}
33
- tabIndex={-1}
34
- >
35
- {options.length === 0 ? (
36
- <div className={`${prefixCls}-empty`}>{select.noData}</div>
37
- ) : (
38
- <OptionsCtx.Provider
39
- value={{ prefixCls, selectedKeys, focusedKey, onSelect }}
40
- >
41
- {options.map((option: any, index: number) => (
42
- <Option
43
- {...option}
44
- key={option.value}
45
- dataTestId={`${dataTestId}-${index}`}
46
- />
47
- ))}
48
- </OptionsCtx.Provider>
49
- )}
50
- </div>
51
- );
52
- });
32
+ return (
33
+ <div
34
+ {...rest}
35
+ className={clsx(`${prefixCls}-popup`, popupClassName)}
36
+ style={popupStyle}
37
+ ref={componentRef}
38
+ tabIndex={-1}
39
+ >
40
+ {options.length === 0 ? (
41
+ <div className={`${prefixCls}-empty`}>{select.noData}</div>
42
+ ) : (
43
+ <OptionsCtx.Provider
44
+ value={{ prefixCls, selectedKeys, focusedKey, multiple, onSelect }}
45
+ >
46
+ {options.map((option, index: number) => (
47
+ <Option
48
+ {...option}
49
+ key={option.value}
50
+ dataTestId={`${dataTestId}-${index}`}
51
+ />
52
+ ))}
53
+ </OptionsCtx.Provider>
54
+ )}
55
+ </div>
56
+ );
57
+ },
58
+ );
53
59
 
54
60
  export default Options;
@@ -65,7 +65,10 @@ const Select = (baseprops: SelectProps) => {
65
65
  return options.find((opt) => opt.value === keys);
66
66
  };
67
67
 
68
- const handleSelect = (key: string | number, e?: React.MouseEvent) => {
68
+ const handleSelect = (
69
+ key: string | number,
70
+ e?: React.MouseEvent | React.KeyboardEvent,
71
+ ) => {
69
72
  let keys;
70
73
  if (single) {
71
74
  setMergedValue([key]);
@@ -137,12 +140,12 @@ const Select = (baseprops: SelectProps) => {
137
140
  const popup = (
138
141
  <Options
139
142
  prefixCls={prefixCls}
143
+ multiple={mode === 'multiple' || mode === 'tags'}
140
144
  options={filteredOpts}
141
145
  focusedKey={focusedKey}
142
146
  selectedKeys={mergedValue}
143
147
  dataTestId={rest['data-testid']}
144
148
  onSelect={handleSelect}
145
- onClose={() => setOpen(false)}
146
149
  ref={popupRef}
147
150
  />
148
151
  );
@@ -9,12 +9,20 @@
9
9
  }
10
10
 
11
11
  &-option {
12
+ display: flex;
12
13
  padding: var(--yee-select-option-padding);
13
14
  overflow: hidden;
14
15
  white-space: nowrap;
15
16
  text-overflow: ellipsis;
16
17
  cursor: pointer;
17
18
 
19
+ &-content {
20
+ flex: 1;
21
+ overflow: hidden;
22
+ white-space: nowrap;
23
+ text-overflow: ellipsis;
24
+ }
25
+
18
26
  &:not(&-disabled):hover {
19
27
  background-color: var(--yee-select-option-hover-bg-color);
20
28
  }
@@ -39,6 +39,10 @@ export interface PureSelectorProps {
39
39
  * In multiple or tags mode, the maximum number of selectable items
40
40
  */
41
41
  maxCount?: number;
42
+ /**
43
+ * size
44
+ * */
45
+ size?: 'small' | 'default' | 'large';
42
46
  /**
43
47
  * Selection mode
44
48
  */
@@ -44,6 +44,7 @@ const Selector = React.forwardRef(
44
44
  value,
45
45
  open,
46
46
  loading,
47
+ size = 'default',
47
48
  onSearch,
48
49
  onRemove,
49
50
  onClear,
@@ -104,6 +105,7 @@ const Selector = React.forwardRef(
104
105
 
105
106
  const cls = clsx(
106
107
  prefixCls,
108
+ [`${prefixCls}-${size}`],
107
109
  [`${prefixCls}-searchable`],
108
110
  [`${prefixCls}-${mode || 'single'}`],
109
111
  {
@@ -9,6 +9,14 @@
9
9
  var(--yee-selector-border-color);
10
10
  border-radius: var(--yee-selector-border-radius);
11
11
 
12
+ &-small {
13
+ padding: var(--yee-selector-small-padding);
14
+ }
15
+
16
+ &-large {
17
+ padding: var(--yee-selector-large-padding);
18
+ }
19
+
12
20
  &:focus-visible {
13
21
  outline: none;
14
22
  }
@@ -31,6 +39,13 @@
31
39
  line-height: var(--yee-selector-input-line-height);
32
40
  }
33
41
 
42
+ @{pls}-selection-item {
43
+ white-space: nowrap;
44
+ overflow: hidden;
45
+ text-overflow: ellipsis;
46
+ padding-right: 16px;
47
+ }
48
+
34
49
  &:focus-within,
35
50
  &:focus {
36
51
  @{pls}-input-wrapper {
@@ -39,6 +54,10 @@
39
54
 
40
55
  &.with-input-value {
41
56
  opacity: 1;
57
+
58
+ & + @{pls}-selection-item {
59
+ opacity: 0;
60
+ }
42
61
  }
43
62
  }
44
63
 
@@ -188,122 +207,122 @@
188
207
  }
189
208
  }
190
209
 
191
- .yee-tags-searchable {
192
- cursor: text;
193
-
194
- .yee-tags-input-wrapper {
195
- width: 100%;
196
- padding: 0;
197
- border: none;
198
- outline: none;
199
-
200
- &:focus {
201
- border: none;
202
- box-shadow: none;
203
- }
204
- }
205
-
206
- .yee-tags-icon {
207
- width: auto;
208
- }
209
- }
210
-
211
- .yee-tags-single-mode {
212
- height: var(--yee-tags-height);
213
-
214
- .yee-tags-input-container {
215
- position: absolute;
216
- z-index: -1;
217
- width: 100%;
218
- font-size: var(--yee-tags-input-font-size);
219
- line-height: var(--yee-tags-input-line-height);
220
-
221
- input {
222
- width: 100%;
223
- }
224
- }
225
-
226
- &.yee-tags-searchable {
227
- .yee-tags-single-option {
228
- width: 100%;
229
- }
230
-
231
- .yee-tags-container {
232
- &:focus-within,
233
- &:focus {
234
- .yee-tags-input-container {
235
- z-index: 1;
236
- opacity: var(--yee-tags-input-focus-opacity);
237
-
238
- &.has-value {
239
- opacity: 1;
240
-
241
- + .yee-tags-single-option {
242
- display: none;
243
- }
244
- }
245
- }
246
-
247
- .yee-tags-single-option {
248
- opacity: var(--yee-tags-single-option-focus-opacity);
249
- }
250
- }
251
- }
252
- }
253
- }
254
-
255
- .yee-tags-multi-mode {
256
- height: auto;
257
- min-height: var(--yee-tags-multi-min-height);
258
-
259
- &.yee-tags-searchable {
260
- .yee-tag {
261
- max-width: var(--yee-tags-multi-tag-max-width);
262
- height: var(--yee-tags-multi-tag-height);
263
- }
264
- }
265
-
266
- .yee-tags-container {
267
- flex-wrap: wrap;
268
- }
269
-
270
- .yee-tags-input-container {
271
- display: inline-grid;
272
- // color: var(--yee-tags-input-container-font-color);
273
- flex: 1 1 auto;
274
- grid-area: 1 / 1 / 2 / 3;
275
- grid-template-columns: 0 min-content;
276
- box-sizing: border-box;
277
- height: var(--yee-tags-multi-input-height);
278
-
279
- &::after {
280
- grid-area: 1 / 2 / auto / auto;
281
- min-width: var(--yee-tags-multi-input-after-min-width);
282
- margin: 0;
283
- padding: 0;
284
- font: inherit;
285
- white-space: pre;
286
- border: 0;
287
- outline: 0;
288
- visibility: hidden;
289
- content: attr(data-value) ' ';
290
- }
291
-
292
- & > input {
293
- grid-area: 1 / 2 / auto / auto;
294
- width: 100%;
295
- min-width: var(--yee-tags-multi-input-min-width);
296
- height: var(--yee-tags-multi-input-height);
297
- margin: 0;
298
- padding: 0;
299
- font: inherit;
300
- background-color: transparent;
301
- border: 0;
302
- outline: 0;
303
- opacity: 1;
304
- }
305
- }
306
- }
210
+ // .yee-tags-searchable {
211
+ // cursor: text;
212
+
213
+ // .yee-tags-input-wrapper {
214
+ // width: 100%;
215
+ // padding: 0;
216
+ // border: none;
217
+ // outline: none;
218
+
219
+ // &:focus {
220
+ // border: none;
221
+ // box-shadow: none;
222
+ // }
223
+ // }
224
+
225
+ // .yee-tags-icon {
226
+ // width: auto;
227
+ // }
228
+ // }
229
+
230
+ // .yee-tags-single-mode {
231
+ // height: var(--yee-tags-height);
232
+
233
+ // .yee-tags-input-container {
234
+ // position: absolute;
235
+ // z-index: -1;
236
+ // width: 100%;
237
+ // font-size: var(--yee-tags-input-font-size);
238
+ // line-height: var(--yee-tags-input-line-height);
239
+
240
+ // input {
241
+ // width: 100%;
242
+ // }
243
+ // }
244
+
245
+ // &.yee-tags-searchable {
246
+ // .yee-tags-single-option {
247
+ // width: 100%;
248
+ // }
249
+
250
+ // .yee-tags-container {
251
+ // &:focus-within,
252
+ // &:focus {
253
+ // .yee-tags-input-container {
254
+ // z-index: 1;
255
+ // opacity: var(--yee-tags-input-focus-opacity);
256
+
257
+ // &.has-value {
258
+ // opacity: 1;
259
+
260
+ // + .yee-tags-single-option {
261
+ // display: none;
262
+ // }
263
+ // }
264
+ // }
265
+
266
+ // .yee-tags-single-option {
267
+ // opacity: var(--yee-tags-single-option-focus-opacity);
268
+ // }
269
+ // }
270
+ // }
271
+ // }
272
+ // }
273
+
274
+ // .yee-tags-multi-mode {
275
+ // height: auto;
276
+ // min-height: var(--yee-tags-multi-min-height);
277
+
278
+ // &.yee-tags-searchable {
279
+ // .yee-tag {
280
+ // max-width: var(--yee-tags-multi-tag-max-width);
281
+ // height: var(--yee-tags-multi-tag-height);
282
+ // }
283
+ // }
284
+
285
+ // .yee-tags-container {
286
+ // flex-wrap: wrap;
287
+ // }
288
+
289
+ // .yee-tags-input-container {
290
+ // display: inline-grid;
291
+ // // color: var(--yee-tags-input-container-font-color);
292
+ // flex: 1 1 auto;
293
+ // grid-area: 1 / 1 / 2 / 3;
294
+ // grid-template-columns: 0 min-content;
295
+ // box-sizing: border-box;
296
+ // height: var(--yee-tags-multi-input-height);
297
+
298
+ // &::after {
299
+ // grid-area: 1 / 2 / auto / auto;
300
+ // min-width: var(--yee-tags-multi-input-after-min-width);
301
+ // margin: 0;
302
+ // padding: 0;
303
+ // font: inherit;
304
+ // white-space: pre;
305
+ // border: 0;
306
+ // outline: 0;
307
+ // visibility: hidden;
308
+ // content: attr(data-value) ' ';
309
+ // }
310
+
311
+ // & > input {
312
+ // grid-area: 1 / 2 / auto / auto;
313
+ // width: 100%;
314
+ // min-width: var(--yee-tags-multi-input-min-width);
315
+ // height: var(--yee-tags-multi-input-height);
316
+ // margin: 0;
317
+ // padding: 0;
318
+ // font: inherit;
319
+ // background-color: transparent;
320
+ // border: 0;
321
+ // outline: 0;
322
+ // opacity: 1;
323
+ // }
324
+ // }
325
+ // }
307
326
 
308
327
  // form error status
309
328
  .yee-form-item-error {
@@ -18,7 +18,7 @@ export default function useFilter({
18
18
  const [filterRecords, setFilterRecords] = useState<Array<FilterRecord>>([]);
19
19
  const onFilter = ({ value, dataIndex }: FilterOptions) => {
20
20
  let newFilterMap = [...filterRecords];
21
- if (!value) {
21
+ if (!value || (Array.isArray(value) && !value.length)) {
22
22
  newFilterMap = newFilterMap.filter(
23
23
  (item) => item.dataIndex !== dataIndex,
24
24
  );
@@ -520,6 +520,10 @@ export interface TableProps
520
520
  * Row class name, unlike classNames, this prop can be set dynamically via a function
521
521
  */
522
522
  rowClassName?: (record: object) => string;
523
+ /**
524
+ * Row style, unlike styles, this prop can be set dynamically via a function
525
+ */
526
+ rowStyle?: (record: object) => React.CSSProperties;
523
527
  /**
524
528
  * Pagination config
525
529
  */
@@ -47,6 +47,8 @@
47
47
  }
48
48
 
49
49
  &-filter {
50
+ padding: var(--yee-table-filter-popup-padding);
51
+
50
52
  &-trigger {
51
53
  display: inline-flex;
52
54
  cursor: pointer;
@@ -175,8 +175,7 @@ const HeaderFilter = React.memo((props: any) => {
175
175
  <Search size={14} strokeWidth={1.5} />
176
176
  )
177
177
  }
178
- // variant={selectNodes.length ? 'filled' : undefined}
179
- color="info"
178
+ variant={selectNodes.length ? 'filled' : undefined}
180
179
  type="text"
181
180
  size="small"
182
181
  />
@@ -188,6 +187,7 @@ const HeaderFilter = React.memo((props: any) => {
188
187
  <Popover
189
188
  trigger="click"
190
189
  placement="bottomRight"
190
+ className={clsx(`${prefixCls}-filter`)}
191
191
  content={popup}
192
192
  arrow
193
193
  open={open}