@rainbow-oh/yee-c 0.8.13 → 0.8.15

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 (49) hide show
  1. package/dist/cjs/Pagination/style/index.less +4 -0
  2. package/dist/cjs/Progress/circle.js +1 -1
  3. package/dist/cjs/Progress/line.js +1 -1
  4. package/dist/cjs/Progress/progress.js +2 -0
  5. package/dist/cjs/Progress/steps.js +1 -1
  6. package/dist/cjs/Search/search.js +45 -16
  7. package/dist/cjs/Select/interface.d.ts +2 -1
  8. package/dist/cjs/Spin/demo/types.js +1 -1
  9. package/dist/cjs/Spin/indicator.d.ts +1 -1
  10. package/dist/cjs/Spin/indicator.js +148 -2
  11. package/dist/cjs/Spin/interface.d.ts +1 -1
  12. package/dist/cjs/Spin/style/index.less +88 -8
  13. package/dist/cjs/style/themes.css +1 -1
  14. package/dist/cjs/style/variables.css +1 -1
  15. package/dist/cjs/version.d.ts +1 -1
  16. package/dist/cjs/version.js +1 -1
  17. package/dist/esm/Pagination/style/index.less +4 -0
  18. package/dist/esm/Progress/circle.js +2 -1
  19. package/dist/esm/Progress/line.js +2 -1
  20. package/dist/esm/Progress/progress.js +2 -0
  21. package/dist/esm/Progress/steps.js +6 -1
  22. package/dist/esm/Search/search.js +31 -7
  23. package/dist/esm/Select/interface.d.ts +2 -1
  24. package/dist/esm/Spin/demo/types.js +7 -1
  25. package/dist/esm/Spin/indicator.d.ts +1 -1
  26. package/dist/esm/Spin/indicator.js +141 -2
  27. package/dist/esm/Spin/interface.d.ts +1 -1
  28. package/dist/esm/Spin/style/index.less +88 -8
  29. package/dist/esm/style/themes.css +1 -1
  30. package/dist/esm/style/variables.css +1 -1
  31. package/dist/esm/version.d.ts +1 -1
  32. package/dist/esm/version.js +1 -1
  33. package/dist/umd/yee-c.min.css +1 -1
  34. package/dist/umd/yee-c.min.js +1 -1
  35. package/package.json +1 -1
  36. package/src/Pagination/style/index.less +4 -0
  37. package/src/Progress/circle.tsx +1 -1
  38. package/src/Progress/line.tsx +1 -1
  39. package/src/Progress/progress.tsx +2 -0
  40. package/src/Progress/steps.tsx +3 -1
  41. package/src/Search/search.tsx +33 -4
  42. package/src/Select/interface.ts +2 -1
  43. package/src/Spin/demo/types.tsx +15 -0
  44. package/src/Spin/index.en-US.md +7 -10
  45. package/src/Spin/index.zh-CN.md +7 -10
  46. package/src/Spin/indicator.tsx +167 -1
  47. package/src/Spin/interface.ts +1 -1
  48. package/src/Spin/style/index.less +88 -8
  49. package/src/version.ts +1 -1
@@ -30,6 +30,10 @@
30
30
  margin-right: 0;
31
31
  }
32
32
 
33
+ &-total {
34
+ white-space: nowrap;
35
+ }
36
+
33
37
  &-prev,
34
38
  &-next {
35
39
  // border: var(--yee-pagination-item-border-width) solid var(--yee-pagination-item-border-color);
@@ -148,7 +148,7 @@ var Circle = import_react.default.forwardRef((props, ref) => {
148
148
  style: { width, height: width },
149
149
  ref
150
150
  },
151
- /* @__PURE__ */ import_react.default.createElement("svg", { className: `${prefixCls}-circle`, viewBox: "0 0 120 120" }, /* @__PURE__ */ import_react.default.createElement(
151
+ /* @__PURE__ */ import_react.default.createElement("svg", { className: `${prefixCls}-circle`, viewBox: "0 0 120 120", "aria-hidden": "true" }, /* @__PURE__ */ import_react.default.createElement(
152
152
  "circle",
153
153
  {
154
154
  className: `${prefixCls}-circle-trail`,
@@ -72,7 +72,7 @@ var Line = import_react.default.forwardRef((props, ref) => {
72
72
  };
73
73
  }
74
74
  }
75
- return /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefixCls}-outer`, ref }, /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefixCls}-inner`, style: { height: strokeWidth } }, /* @__PURE__ */ import_react.default.createElement(
75
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefixCls}-outer`, ref }, /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefixCls}-inner`, style: { height: strokeWidth }, "aria-hidden": "true" }, /* @__PURE__ */ import_react.default.createElement(
76
76
  "div",
77
77
  {
78
78
  className: `${prefixCls}-bg`,
@@ -158,6 +158,8 @@ var Progress = import_react.default.forwardRef(
158
158
  "aria-valuenow": percent,
159
159
  "aria-valuemin": 0,
160
160
  "aria-valuemax": 100,
161
+ "aria-valuetext": `${percent}%`,
162
+ "aria-label": status === "error" ? `Progress: ${percent}%, error` : `Progress: ${percent}%`,
161
163
  ref
162
164
  }, dataAttrs),
163
165
  progress
@@ -75,7 +75,7 @@ var Steps = import_react.default.forwardRef((props, ref) => {
75
75
  );
76
76
  });
77
77
  };
78
- return /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefixCls}-steps`, ref }, renderSteps(), showInfo && /* @__PURE__ */ import_react.default.createElement("span", { className: `${prefixCls}-text` }, children));
78
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefixCls}-steps`, ref }, /* @__PURE__ */ import_react.default.createElement("div", { "aria-hidden": "true", style: { display: "contents" } }, renderSteps()), showInfo && /* @__PURE__ */ import_react.default.createElement("span", { className: `${prefixCls}-text` }, children));
79
79
  });
80
80
  Steps.displayName = "Steps";
81
81
  var steps_default = Steps;
@@ -128,6 +128,7 @@ var Search = import_react.default.forwardRef(
128
128
  });
129
129
  const [open, setOpen] = (0, import_react.useState)(false);
130
130
  const popupRef = (0, import_react.useRef)(void 0);
131
+ const listboxId = (0, import_react.useId)();
131
132
  const { focusedKey, onKeyDown } = (0, import_useSelectKeyboard.default)({
132
133
  open,
133
134
  options: options || suggestions,
@@ -187,9 +188,18 @@ var Search = import_react.default.forwardRef(
187
188
  {
188
189
  className: (0, import_clsx.default)(`${prefixCls}-clear-icon`, classNames == null ? void 0 : classNames.clear),
189
190
  style: styles == null ? void 0 : styles.clear,
190
- onClick: handleClear
191
+ onClick: handleClear,
192
+ role: "button",
193
+ "aria-label": "Clear search",
194
+ tabIndex: 0,
195
+ onKeyDown: (e) => {
196
+ if (e.key === "Enter" || e.key === " ") {
197
+ e.preventDefault();
198
+ handleClear(e);
199
+ }
200
+ }
191
201
  },
192
- /* @__PURE__ */ import_react.default.createElement(import_lucide_react.X, { size: 14 })
202
+ /* @__PURE__ */ import_react.default.createElement(import_lucide_react.X, { size: 14, "aria-hidden": "true" })
193
203
  ), suffix);
194
204
  };
195
205
  const renderPrefix = () => {
@@ -220,7 +230,8 @@ var Search = import_react.default.forwardRef(
220
230
  className
221
231
  );
222
232
  };
223
- const popup = /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefixCls}-popup`, tabIndex: 0 }, Array.isArray(options) ? /* @__PURE__ */ import_react.default.createElement(
233
+ const hasPopup = Array.isArray(options) || Array.isArray(suggestions);
234
+ const popup = /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefixCls}-popup`, tabIndex: 0, id: listboxId, role: "listbox" }, Array.isArray(options) ? /* @__PURE__ */ import_react.default.createElement(
224
235
  import_List.default,
225
236
  {
226
237
  focusedKey,
@@ -237,19 +248,37 @@ var Search = import_react.default.forwardRef(
237
248
  onClick: onChange
238
249
  }
239
250
  ) : null);
240
- return /* @__PURE__ */ import_react.default.createElement(import_Trigger.default, { popup, open, onOpenChange: setOpen }, /* @__PURE__ */ import_react.default.createElement("div", { className: getRootClassName(), style }, renderPrefix(), /* @__PURE__ */ import_react.default.createElement(
241
- "input",
242
- __spreadProps(__spreadValues({}, rest), {
243
- ref,
244
- value: searchValue,
245
- className: getInputClassName(),
246
- style: styles == null ? void 0 : styles.input,
247
- disabled,
248
- placeholder,
249
- onChange: handleChange,
250
- onKeyDown
251
- })
252
- ), loading ? /* @__PURE__ */ import_react.default.createElement(import_Spin.default, { variant: "ring", size: "small" }) : renderSuffix()));
251
+ return /* @__PURE__ */ import_react.default.createElement(import_Trigger.default, { popup, open, onOpenChange: setOpen }, /* @__PURE__ */ import_react.default.createElement(
252
+ "div",
253
+ {
254
+ className: getRootClassName(),
255
+ style,
256
+ role: "combobox",
257
+ "aria-expanded": hasPopup ? open : void 0,
258
+ "aria-haspopup": hasPopup ? "listbox" : void 0,
259
+ "aria-owns": hasPopup && open ? listboxId : void 0,
260
+ "aria-disabled": disabled || void 0
261
+ },
262
+ renderPrefix(),
263
+ /* @__PURE__ */ import_react.default.createElement(
264
+ "input",
265
+ __spreadProps(__spreadValues({}, rest), {
266
+ ref,
267
+ value: searchValue,
268
+ className: getInputClassName(),
269
+ style: styles == null ? void 0 : styles.input,
270
+ disabled,
271
+ placeholder,
272
+ onChange: handleChange,
273
+ onKeyDown,
274
+ role: "searchbox",
275
+ "aria-autocomplete": hasPopup ? "list" : void 0,
276
+ "aria-controls": hasPopup && open ? listboxId : void 0,
277
+ "aria-activedescendant": hasPopup && open && focusedKey != null ? String(focusedKey) : void 0
278
+ })
279
+ ),
280
+ loading ? /* @__PURE__ */ import_react.default.createElement(import_Spin.default, { variant: "ring", size: "small", "aria-label": "Loading" }) : renderSuffix()
281
+ ));
253
282
  }
254
283
  );
255
284
  var search_default = Search;
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ import type { TriggerProps } from '../Trigger';
2
3
  import type { SelectorProps } from '../Selector';
3
4
  import type { DataAttributeProps } from '../utils/types';
4
5
  export type Option = {
@@ -23,7 +24,7 @@ export type Option = {
23
24
  */
24
25
  [prop: string]: any;
25
26
  };
26
- export interface SelectProps extends DataAttributeProps, Pick<SelectorProps, 'size'> {
27
+ export interface SelectProps extends DataAttributeProps, Pick<SelectorProps, 'size'>, Omit<TriggerProps, 'popup' | 'children'> {
27
28
  /**
28
29
  * Custom class name prefix
29
30
  * */
@@ -35,5 +35,5 @@ module.exports = __toCommonJS(types_exports);
35
35
  var import_yee_c = require("../..");
36
36
  var import_react = __toESM(require("react"));
37
37
  var types_default = () => {
38
- return /* @__PURE__ */ import_react.default.createElement(import_yee_c.Space, { direction: "vertical" }, /* @__PURE__ */ import_react.default.createElement(import_yee_c.Space, null, /* @__PURE__ */ import_react.default.createElement(import_yee_c.Spin, { variant: "dot" }), /* @__PURE__ */ import_react.default.createElement("span", null, "dot")), /* @__PURE__ */ import_react.default.createElement(import_yee_c.Space, null, /* @__PURE__ */ import_react.default.createElement(import_yee_c.Spin, { variant: "ring" }), /* @__PURE__ */ import_react.default.createElement("span", null, "ring")), /* @__PURE__ */ import_react.default.createElement(import_yee_c.Space, null, /* @__PURE__ */ import_react.default.createElement(import_yee_c.Spin, { variant: "spokes" }), /* @__PURE__ */ import_react.default.createElement("span", null, "spokes")));
38
+ return /* @__PURE__ */ import_react.default.createElement(import_yee_c.Space, { direction: "vertical" }, /* @__PURE__ */ import_react.default.createElement(import_yee_c.Space, null, /* @__PURE__ */ import_react.default.createElement(import_yee_c.Spin, { variant: "dot" }), /* @__PURE__ */ import_react.default.createElement("span", null, "dot")), /* @__PURE__ */ import_react.default.createElement(import_yee_c.Space, null, /* @__PURE__ */ import_react.default.createElement(import_yee_c.Spin, { variant: "ring" }), /* @__PURE__ */ import_react.default.createElement("span", null, "ring")), /* @__PURE__ */ import_react.default.createElement(import_yee_c.Space, null, /* @__PURE__ */ import_react.default.createElement(import_yee_c.Spin, { variant: "spokes" }), /* @__PURE__ */ import_react.default.createElement("span", null, "spokes")), /* @__PURE__ */ import_react.default.createElement(import_yee_c.Space, null, /* @__PURE__ */ import_react.default.createElement(import_yee_c.Spin, { variant: "bounce" }), /* @__PURE__ */ import_react.default.createElement("span", null, "bounce")), /* @__PURE__ */ import_react.default.createElement(import_yee_c.Space, null, /* @__PURE__ */ import_react.default.createElement(import_yee_c.Spin, { variant: "pulse" }), /* @__PURE__ */ import_react.default.createElement("span", null, "pulse")), /* @__PURE__ */ import_react.default.createElement(import_yee_c.Space, null, /* @__PURE__ */ import_react.default.createElement(import_yee_c.Spin, { variant: "wheel" }), /* @__PURE__ */ import_react.default.createElement("span", null, "wheel")));
39
39
  };
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { SpinProps } from './interface';
3
3
  interface IndicatorProps extends SpinProps {
4
- variant?: 'dot' | 'ring' | 'spokes';
4
+ variant?: 'dot' | 'ring' | 'spokes' | 'bounce' | 'pulse' | 'wheel';
5
5
  }
6
6
  declare const Indicator: React.FC<IndicatorProps>;
7
7
  export default Indicator;
@@ -109,7 +109,8 @@ var SpokesSpinner = (props) => {
109
109
  classNames,
110
110
  styles,
111
111
  width,
112
- height
112
+ height,
113
+ color
113
114
  } = props;
114
115
  const containerSize = sizeMap[size];
115
116
  const count = 8;
@@ -133,7 +134,8 @@ var SpokesSpinner = (props) => {
133
134
  className: `${prefixCls}-spokes-line`,
134
135
  style: {
135
136
  transform: `rotate(${i * (360 / count)}deg)`,
136
- animationDelay: `${i * 1 / count}s`
137
+ animationDelay: `${i * 1 / count}s`,
138
+ backgroundColor: color
137
139
  }
138
140
  }
139
141
  )))
@@ -225,6 +227,141 @@ var DotSpinner = (props) => {
225
227
  `)
226
228
  );
227
229
  };
230
+ var BounceSpinner = (props) => {
231
+ const {
232
+ prefixCls = "yee-spin",
233
+ size = "default",
234
+ classNames,
235
+ styles,
236
+ width,
237
+ height,
238
+ color
239
+ } = props;
240
+ const containerSize = sizeMap[size];
241
+ const dotSizeMap = { small: 4, default: 6, large: 10 };
242
+ const dotSize = dotSizeMap[size];
243
+ return /* @__PURE__ */ import_react.default.createElement(
244
+ "div",
245
+ {
246
+ className: (0, import_clsx.default)(
247
+ `${prefixCls}-indicator`,
248
+ `${prefixCls}-indicator-bounce`,
249
+ classNames == null ? void 0 : classNames.indicator
250
+ ),
251
+ style: __spreadValues({
252
+ width: width || containerSize,
253
+ height: height || containerSize
254
+ }, styles == null ? void 0 : styles.indicator)
255
+ },
256
+ /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefixCls}-bounce` }, [0, 1, 2].map((i) => /* @__PURE__ */ import_react.default.createElement(
257
+ "span",
258
+ {
259
+ key: i,
260
+ className: `${prefixCls}-bounce-dot`,
261
+ style: {
262
+ width: dotSize,
263
+ height: dotSize,
264
+ animationDelay: `${i * 0.15}s`,
265
+ backgroundColor: color
266
+ }
267
+ }
268
+ )))
269
+ );
270
+ };
271
+ var PulseSpinner = (props) => {
272
+ const {
273
+ prefixCls = "yee-spin",
274
+ size = "default",
275
+ classNames,
276
+ styles,
277
+ width,
278
+ height,
279
+ color
280
+ } = props;
281
+ const containerSize = sizeMap[size];
282
+ return /* @__PURE__ */ import_react.default.createElement(
283
+ "div",
284
+ {
285
+ className: (0, import_clsx.default)(
286
+ `${prefixCls}-indicator`,
287
+ `${prefixCls}-indicator-pulse`,
288
+ classNames == null ? void 0 : classNames.indicator
289
+ ),
290
+ style: __spreadValues({
291
+ width: width || containerSize,
292
+ height: height || containerSize
293
+ }, styles == null ? void 0 : styles.indicator)
294
+ },
295
+ /* @__PURE__ */ import_react.default.createElement(
296
+ "span",
297
+ {
298
+ className: `${prefixCls}-pulse-circle`,
299
+ style: { backgroundColor: color }
300
+ }
301
+ ),
302
+ /* @__PURE__ */ import_react.default.createElement(
303
+ "span",
304
+ {
305
+ className: `${prefixCls}-pulse-circle ${prefixCls}-pulse-circle-delay`,
306
+ style: { backgroundColor: color }
307
+ }
308
+ )
309
+ );
310
+ };
311
+ var WheelSpinner = (props) => {
312
+ const {
313
+ prefixCls = "yee-spin",
314
+ size = "default",
315
+ classNames,
316
+ styles,
317
+ width,
318
+ height,
319
+ color
320
+ } = props;
321
+ const containerSize = sizeMap[size];
322
+ const count = 10;
323
+ const innerRadius = 0.38;
324
+ const spokeLength = containerSize * 0.22;
325
+ return /* @__PURE__ */ import_react.default.createElement(
326
+ "div",
327
+ {
328
+ className: (0, import_clsx.default)(
329
+ `${prefixCls}-indicator`,
330
+ `${prefixCls}-indicator-wheel`,
331
+ classNames == null ? void 0 : classNames.indicator
332
+ ),
333
+ style: __spreadValues({
334
+ width: width || containerSize,
335
+ height: height || containerSize
336
+ }, styles == null ? void 0 : styles.indicator)
337
+ },
338
+ /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefixCls}-wheel-spokes` }, Array.from({ length: count }, (_, i) => {
339
+ const angle = i * 360 / count;
340
+ const rad = angle * Math.PI / 180;
341
+ const cx = containerSize / 2;
342
+ const cy = containerSize / 2;
343
+ const x = cx + innerRadius * containerSize * Math.sin(rad);
344
+ const y = cy - innerRadius * containerSize * Math.cos(rad);
345
+ return /* @__PURE__ */ import_react.default.createElement(
346
+ "div",
347
+ {
348
+ key: i,
349
+ className: `${prefixCls}-wheel-spoke`,
350
+ style: {
351
+ top: y,
352
+ left: x,
353
+ height: spokeLength,
354
+ marginLeft: -1,
355
+ transform: `rotate(${angle}deg)`,
356
+ transformOrigin: "top center",
357
+ animationDelay: `${i * 1.2 / count}s`,
358
+ backgroundColor: color
359
+ }
360
+ }
361
+ );
362
+ }))
363
+ );
364
+ };
228
365
  var Indicator = (_a) => {
229
366
  var _b = _a, { variant = "dot" } = _b, props = __objRest(_b, ["variant"]);
230
367
  if (variant === "ring") {
@@ -233,6 +370,15 @@ var Indicator = (_a) => {
233
370
  if (variant === "spokes") {
234
371
  return /* @__PURE__ */ import_react.default.createElement(SpokesSpinner, __spreadValues({}, props));
235
372
  }
373
+ if (variant === "bounce") {
374
+ return /* @__PURE__ */ import_react.default.createElement(BounceSpinner, __spreadValues({}, props));
375
+ }
376
+ if (variant === "pulse") {
377
+ return /* @__PURE__ */ import_react.default.createElement(PulseSpinner, __spreadValues({}, props));
378
+ }
379
+ if (variant === "wheel") {
380
+ return /* @__PURE__ */ import_react.default.createElement(WheelSpinner, __spreadValues({}, props));
381
+ }
236
382
  return /* @__PURE__ */ import_react.default.createElement(DotSpinner, __spreadValues({}, props));
237
383
  };
238
384
  var indicator_default = Indicator;
@@ -66,7 +66,7 @@ export type SpinProps = DataAttributeProps & {
66
66
  /**
67
67
  * Indicator variant
68
68
  * */
69
- variant?: 'dot' | 'ring' | 'spokes';
69
+ variant?: 'dot' | 'ring' | 'spokes' | 'bounce' | 'pulse' | 'wheel';
70
70
  /**
71
71
  * Loading indicator
72
72
  */
@@ -43,10 +43,7 @@
43
43
  display: block;
44
44
  border-style: solid;
45
45
  border-color: var(--yee-color-bg-layout, rgba(0, 0, 0, 8%));
46
- border-top-color: var(
47
- --yee-spin-default-color,
48
- var(--yee-color-primary, #1677ff)
49
- );
46
+ border-top-color: var(--m-indicator-dot-bg-color);
50
47
  border-radius: 50%;
51
48
  animation: yee-spin-ring-rotate 0.8s linear infinite;
52
49
  }
@@ -67,10 +64,65 @@
67
64
  height: 40%;
68
65
  margin-left: -1px;
69
66
  transform-origin: center bottom;
70
- background-color: var(
71
- --yee-spin-default-color,
72
- var(--yee-color-primary, #1677ff)
73
- );
67
+ background-color: var(--m-indicator-dot-bg-color);
68
+ border-radius: 1px;
69
+ animation: yee-spin-spokes-fade 1.2s linear infinite;
70
+ }
71
+ }
72
+
73
+ &-bounce {
74
+ @{pls}-bounce {
75
+ display: flex;
76
+ align-items: center;
77
+ justify-content: center;
78
+ width: 100%;
79
+ height: 100%;
80
+ gap: 3px;
81
+ }
82
+
83
+ @{pls}-bounce-dot {
84
+ display: inline-block;
85
+ background-color: var(--m-indicator-dot-bg-color);
86
+ border-radius: 50%;
87
+ animation: yee-spin-bounce 0.6s ease-in-out infinite alternate;
88
+ }
89
+ }
90
+
91
+ &-pulse {
92
+ @{pls}-pulse-circle {
93
+ position: absolute;
94
+ top: 0;
95
+ left: 0;
96
+ width: 100%;
97
+ height: 100%;
98
+ border-radius: 50%;
99
+ background-color: var(--m-indicator-dot-bg-color);
100
+ opacity: 0.6;
101
+ animation: yee-spin-pulse 1.5s ease-in-out infinite;
102
+
103
+ &-delay {
104
+ animation-delay: 0.5s;
105
+ }
106
+ }
107
+ }
108
+
109
+ &-wheel {
110
+ @{pls}-wheel-hub {
111
+ display: none;
112
+ }
113
+
114
+ @{pls}-wheel-spokes {
115
+ position: relative;
116
+ width: 100%;
117
+ height: 100%;
118
+ }
119
+
120
+ @{pls}-wheel-spoke {
121
+ position: absolute;
122
+ left: 50%;
123
+ width: 2px;
124
+ margin-left: -1px;
125
+ background-color: var(--m-indicator-dot-bg-color);
74
126
  border-radius: 1px;
75
127
  animation: yee-spin-spokes-fade 1.2s linear infinite;
76
128
  }
@@ -174,3 +226,31 @@
174
226
  opacity: 0.15;
175
227
  }
176
228
  }
229
+
230
+ @keyframes yee-spin-bounce {
231
+ 0% {
232
+ transform: translateY(25%);
233
+ opacity: 0.4;
234
+ }
235
+
236
+ 100% {
237
+ transform: translateY(-25%);
238
+ opacity: 1;
239
+ }
240
+ }
241
+
242
+ @keyframes yee-spin-pulse {
243
+ 0% {
244
+ transform: scale(0);
245
+ opacity: 0.6;
246
+ }
247
+
248
+ 50% {
249
+ opacity: 0.3;
250
+ }
251
+
252
+ 100% {
253
+ transform: scale(1);
254
+ opacity: 0;
255
+ }
256
+ }
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * @rainbow-oh/yee-c CSS Variables
3
3
  * Auto-generated, do not edit manually
4
- * Generated on 2026-07-30T06:25:23.552Z
4
+ * Generated on 2026-07-31T06:58:34.574Z
5
5
  */
6
6
 
7
7
  /* ========== color.blue.css ========== */
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * @rainbow-oh/yee-c CSS Variables
3
3
  * Auto-generated, do not edit manually
4
- * Generated on 2026-07-30T06:25:23.552Z
4
+ * Generated on 2026-07-31T06:58:34.574Z
5
5
  */
6
6
 
7
7
  /* ========== color.css ========== */
@@ -3,4 +3,4 @@ declare global {
3
3
  __yee_c_version__: string;
4
4
  }
5
5
  }
6
- export declare const version = "0.8.13";
6
+ export declare const version = "0.8.15";
@@ -22,7 +22,7 @@ __export(version_exports, {
22
22
  version: () => version
23
23
  });
24
24
  module.exports = __toCommonJS(version_exports);
25
- var version = "0.8.13";
25
+ var version = "0.8.15";
26
26
  if (typeof window !== "undefined") {
27
27
  window.__yee_c_version__ = version;
28
28
  }
@@ -30,6 +30,10 @@
30
30
  margin-right: 0;
31
31
  }
32
32
 
33
+ &-total {
34
+ white-space: nowrap;
35
+ }
36
+
33
37
  &-prev,
34
38
  &-next {
35
39
  // border: var(--yee-pagination-item-border-width) solid var(--yee-pagination-item-border-color);
@@ -103,7 +103,8 @@ var Circle = /*#__PURE__*/React.forwardRef(function (props, ref) {
103
103
  ref: ref
104
104
  }, /*#__PURE__*/React.createElement("svg", {
105
105
  className: "".concat(prefixCls, "-circle"),
106
- viewBox: "0 0 120 120"
106
+ viewBox: "0 0 120 120",
107
+ "aria-hidden": "true"
107
108
  }, /*#__PURE__*/React.createElement("circle", {
108
109
  className: "".concat(prefixCls, "-circle-trail"),
109
110
  cx: "60",
@@ -39,7 +39,8 @@ var Line = /*#__PURE__*/React.forwardRef(function (props, ref) {
39
39
  className: "".concat(prefixCls, "-inner"),
40
40
  style: {
41
41
  height: strokeWidth
42
- }
42
+ },
43
+ "aria-hidden": "true"
43
44
  }, /*#__PURE__*/React.createElement("div", {
44
45
  className: "".concat(prefixCls, "-bg"),
45
46
  style: _objectSpread({
@@ -90,6 +90,8 @@ var Progress = /*#__PURE__*/React.forwardRef(function (baseprops, ref) {
90
90
  "aria-valuenow": percent,
91
91
  "aria-valuemin": 0,
92
92
  "aria-valuemax": 100,
93
+ "aria-valuetext": "".concat(percent, "%"),
94
+ "aria-label": status === 'error' ? "Progress: ".concat(percent, "%, error") : "Progress: ".concat(percent, "%"),
93
95
  ref: ref
94
96
  }, dataAttrs), progress);
95
97
  });
@@ -43,7 +43,12 @@ var Steps = /*#__PURE__*/React.forwardRef(function (props, ref) {
43
43
  return /*#__PURE__*/React.createElement("div", {
44
44
  className: "".concat(prefixCls, "-steps"),
45
45
  ref: ref
46
- }, renderSteps(), showInfo && /*#__PURE__*/React.createElement("span", {
46
+ }, /*#__PURE__*/React.createElement("div", {
47
+ "aria-hidden": "true",
48
+ style: {
49
+ display: 'contents'
50
+ }
51
+ }, renderSteps()), showInfo && /*#__PURE__*/React.createElement("span", {
47
52
  className: "".concat(prefixCls, "-text")
48
53
  }, children));
49
54
  });
@@ -14,7 +14,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
14
14
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
15
15
  import clsx from 'clsx';
16
16
  import { X } from 'lucide-react';
17
- import React, { startTransition, useContext, useEffect, useRef, useState } from 'react';
17
+ import React, { startTransition, useContext, useEffect, useId, useRef, useState } from 'react';
18
18
  import { GlobalContext } from "../Config-Provider";
19
19
  import useMergedState from "../hooks/useMergedState";
20
20
  import List from "../List";
@@ -65,6 +65,7 @@ var Search = /*#__PURE__*/React.forwardRef(function (baseProps, ref) {
65
65
  open = _useState2[0],
66
66
  setOpen = _useState2[1];
67
67
  var popupRef = useRef(undefined);
68
+ var listboxId = useId();
68
69
  var _useSelectKeyboard = useSelectKeyboard({
69
70
  open: open,
70
71
  options: options || suggestions,
@@ -127,9 +128,19 @@ var Search = /*#__PURE__*/React.forwardRef(function (baseProps, ref) {
127
128
  }, showClearIcon && /*#__PURE__*/React.createElement("span", {
128
129
  className: clsx("".concat(prefixCls, "-clear-icon"), classNames === null || classNames === void 0 ? void 0 : classNames.clear),
129
130
  style: styles === null || styles === void 0 ? void 0 : styles.clear,
130
- onClick: handleClear
131
+ onClick: handleClear,
132
+ role: "button",
133
+ "aria-label": "Clear search",
134
+ tabIndex: 0,
135
+ onKeyDown: function onKeyDown(e) {
136
+ if (e.key === 'Enter' || e.key === ' ') {
137
+ e.preventDefault();
138
+ handleClear(e);
139
+ }
140
+ }
131
141
  }, /*#__PURE__*/React.createElement(X, {
132
- size: 14
142
+ size: 14,
143
+ "aria-hidden": "true"
133
144
  })), suffix);
134
145
  };
135
146
  var renderPrefix = function renderPrefix() {
@@ -145,9 +156,12 @@ var Search = /*#__PURE__*/React.forwardRef(function (baseProps, ref) {
145
156
  var getRootClassName = function getRootClassName() {
146
157
  return clsx(prefixCls, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-disabled"), disabled), "".concat(prefixCls, "-borderless"), !bordered), "".concat(prefixCls, "-small"), size === 'small'), "".concat(prefixCls, "-large"), size === 'large'), className);
147
158
  };
159
+ var hasPopup = Array.isArray(options) || Array.isArray(suggestions);
148
160
  var popup = /*#__PURE__*/React.createElement("div", {
149
161
  className: "".concat(prefixCls, "-popup"),
150
- tabIndex: 0
162
+ tabIndex: 0,
163
+ id: listboxId,
164
+ role: "listbox"
151
165
  }, Array.isArray(options) ? /*#__PURE__*/React.createElement(List, {
152
166
  focusedKey: focusedKey,
153
167
  items: options,
@@ -165,7 +179,12 @@ var Search = /*#__PURE__*/React.forwardRef(function (baseProps, ref) {
165
179
  onOpenChange: setOpen
166
180
  }, /*#__PURE__*/React.createElement("div", {
167
181
  className: getRootClassName(),
168
- style: style
182
+ style: style,
183
+ role: "combobox",
184
+ "aria-expanded": hasPopup ? open : undefined,
185
+ "aria-haspopup": hasPopup ? 'listbox' : undefined,
186
+ "aria-owns": hasPopup && open ? listboxId : undefined,
187
+ "aria-disabled": disabled || undefined
169
188
  }, renderPrefix(), /*#__PURE__*/React.createElement("input", _extends({}, rest, {
170
189
  ref: ref,
171
190
  value: searchValue,
@@ -174,10 +193,15 @@ var Search = /*#__PURE__*/React.forwardRef(function (baseProps, ref) {
174
193
  disabled: disabled,
175
194
  placeholder: placeholder,
176
195
  onChange: handleChange,
177
- onKeyDown: onKeyDown
196
+ onKeyDown: onKeyDown,
197
+ role: "searchbox",
198
+ "aria-autocomplete": hasPopup ? 'list' : undefined,
199
+ "aria-controls": hasPopup && open ? listboxId : undefined,
200
+ "aria-activedescendant": hasPopup && open && focusedKey != null ? String(focusedKey) : undefined
178
201
  })), loading ? /*#__PURE__*/React.createElement(Spin, {
179
202
  variant: "ring",
180
- size: "small"
203
+ size: "small",
204
+ "aria-label": "Loading"
181
205
  }) : renderSuffix()));
182
206
  });
183
207
  export default Search;