@rainbow-oh/yee-c 0.8.6 → 0.8.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rainbow-oh/yee-c",
3
- "version": "0.8.6",
3
+ "version": "0.8.8",
4
4
  "description": "yee basic components",
5
5
  "keywords": [
6
6
  "react",
@@ -8,7 +8,7 @@
8
8
  width: 100%;
9
9
  padding: var(--yee-input-padding, 2px 8px);
10
10
  font-size: var(--yee-input-font-size);
11
- line-height: var(--yee-input-line-height);
11
+ // line-height: var(--yee-input-line-height);
12
12
  background-color: var(--yee-input-content-bg-color);
13
13
  border: var(--yee-input-border-width) solid var(--yee-input-border-color);
14
14
  border-radius: var(--yee-input-border-radius, 4px);
@@ -49,7 +49,7 @@
49
49
  &-inner {
50
50
  width: 100%;
51
51
  font-family: var(--yee-font-family);
52
- line-height: var(--yee-input-line-height);
52
+ // line-height: var(--yee-input-line-height);
53
53
  background-color: inherit;
54
54
  border: none;
55
55
  outline: none;
@@ -246,7 +246,18 @@ const Selector = React.forwardRef(
246
246
  return null;
247
247
  }
248
248
  return (
249
- <span className={`${prefixCls}-clear`} onClick={handleClear}>
249
+ <span
250
+ className={`${prefixCls}-clear`}
251
+ role="button"
252
+ aria-label="clear"
253
+ tabIndex={0}
254
+ onClick={handleClear}
255
+ onKeyDown={(e) => {
256
+ if (e.key === 'Enter') {
257
+ handleClear(e as unknown as React.MouseEvent<HTMLSpanElement>);
258
+ }
259
+ }}
260
+ >
250
261
  <X size={12} strokeWidth={1} />
251
262
  </span>
252
263
  );
@@ -49,12 +49,12 @@ export default function useFilter({
49
49
  return handled.find((o) => {
50
50
  if (Array.isArray(o.value)) {
51
51
  return o.value.some((v) => {
52
- const t = item[o.dataIndex];
52
+ const t = item[o.dataIndex] || '';
53
53
  return (t as string).toLowerCase() === v.toLowerCase();
54
54
  });
55
55
  } else {
56
56
  const v = o.value.toLowerCase();
57
- const t = item[o.dataIndex];
57
+ const t = item[o.dataIndex] || '';
58
58
  return (t as string).toLowerCase().includes(v);
59
59
  }
60
60
  });
@@ -175,7 +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}
178
+ variant={selectNodes.length || searchValue ? 'filled' : undefined}
179
179
  type="text"
180
180
  size="small"
181
181
  />
package/src/version.ts CHANGED
@@ -4,7 +4,7 @@ declare global {
4
4
  }
5
5
  }
6
6
 
7
- export const version = "0.8.6";
7
+ export const version = "0.8.8";
8
8
 
9
9
  if (typeof window !== 'undefined') {
10
10
  window.__yee_c_version__ = version;