@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
@@ -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
  * */
@@ -9,5 +9,11 @@ export default (function () {
9
9
  variant: "ring"
10
10
  }), /*#__PURE__*/React.createElement("span", null, "ring")), /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Spin, {
11
11
  variant: "spokes"
12
- }), /*#__PURE__*/React.createElement("span", null, "spokes")));
12
+ }), /*#__PURE__*/React.createElement("span", null, "spokes")), /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Spin, {
13
+ variant: "bounce"
14
+ }), /*#__PURE__*/React.createElement("span", null, "bounce")), /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Spin, {
15
+ variant: "pulse"
16
+ }), /*#__PURE__*/React.createElement("span", null, "pulse")), /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Spin, {
17
+ variant: "wheel"
18
+ }), /*#__PURE__*/React.createElement("span", null, "wheel")));
13
19
  });
@@ -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;
@@ -56,7 +56,8 @@ var SpokesSpinner = function SpokesSpinner(props) {
56
56
  classNames = props.classNames,
57
57
  styles = props.styles,
58
58
  width = props.width,
59
- height = props.height;
59
+ height = props.height,
60
+ color = props.color;
60
61
  var containerSize = sizeMap[size];
61
62
  var count = 8;
62
63
  return /*#__PURE__*/React.createElement("div", {
@@ -75,7 +76,8 @@ var SpokesSpinner = function SpokesSpinner(props) {
75
76
  className: "".concat(prefixCls, "-spokes-line"),
76
77
  style: {
77
78
  transform: "rotate(".concat(i * (360 / count), "deg)"),
78
- animationDelay: "".concat(i * 1 / count, "s")
79
+ animationDelay: "".concat(i * 1 / count, "s"),
80
+ backgroundColor: color
79
81
  }
80
82
  });
81
83
  })));
@@ -139,6 +141,134 @@ var DotSpinner = function DotSpinner(props) {
139
141
  });
140
142
  })), /*#__PURE__*/React.createElement("style", null, "\n @keyframes spinner-rotate {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n\n @keyframes spinner-pulse {\n 0%, 100% {\n transform: scale(1);\n opacity: 1;\n }\n 50% {\n transform: scale(0.6);\n opacity: 0.7;\n }\n }\n "));
141
143
  };
144
+
145
+ /**
146
+ * Bounce spinner - three dots that bounce up and down sequentially
147
+ */
148
+ var BounceSpinner = function BounceSpinner(props) {
149
+ var _props$prefixCls4 = props.prefixCls,
150
+ prefixCls = _props$prefixCls4 === void 0 ? 'yee-spin' : _props$prefixCls4,
151
+ _props$size4 = props.size,
152
+ size = _props$size4 === void 0 ? 'default' : _props$size4,
153
+ classNames = props.classNames,
154
+ styles = props.styles,
155
+ width = props.width,
156
+ height = props.height,
157
+ color = props.color;
158
+ var containerSize = sizeMap[size];
159
+ var dotSizeMap = {
160
+ small: 4,
161
+ default: 6,
162
+ large: 10
163
+ };
164
+ var dotSize = dotSizeMap[size];
165
+ return /*#__PURE__*/React.createElement("div", {
166
+ className: clsx("".concat(prefixCls, "-indicator"), "".concat(prefixCls, "-indicator-bounce"), classNames === null || classNames === void 0 ? void 0 : classNames.indicator),
167
+ style: _objectSpread({
168
+ width: width || containerSize,
169
+ height: height || containerSize
170
+ }, styles === null || styles === void 0 ? void 0 : styles.indicator)
171
+ }, /*#__PURE__*/React.createElement("div", {
172
+ className: "".concat(prefixCls, "-bounce")
173
+ }, [0, 1, 2].map(function (i) {
174
+ return /*#__PURE__*/React.createElement("span", {
175
+ key: i,
176
+ className: "".concat(prefixCls, "-bounce-dot"),
177
+ style: {
178
+ width: dotSize,
179
+ height: dotSize,
180
+ animationDelay: "".concat(i * 0.15, "s"),
181
+ backgroundColor: color
182
+ }
183
+ });
184
+ })));
185
+ };
186
+
187
+ /**
188
+ * Pulse spinner - a circle that pulses (scales up and fades out) repeatedly
189
+ */
190
+ var PulseSpinner = function PulseSpinner(props) {
191
+ var _props$prefixCls5 = props.prefixCls,
192
+ prefixCls = _props$prefixCls5 === void 0 ? 'yee-spin' : _props$prefixCls5,
193
+ _props$size5 = props.size,
194
+ size = _props$size5 === void 0 ? 'default' : _props$size5,
195
+ classNames = props.classNames,
196
+ styles = props.styles,
197
+ width = props.width,
198
+ height = props.height,
199
+ color = props.color;
200
+ var containerSize = sizeMap[size];
201
+ return /*#__PURE__*/React.createElement("div", {
202
+ className: clsx("".concat(prefixCls, "-indicator"), "".concat(prefixCls, "-indicator-pulse"), classNames === null || classNames === void 0 ? void 0 : classNames.indicator),
203
+ style: _objectSpread({
204
+ width: width || containerSize,
205
+ height: height || containerSize
206
+ }, styles === null || styles === void 0 ? void 0 : styles.indicator)
207
+ }, /*#__PURE__*/React.createElement("span", {
208
+ className: "".concat(prefixCls, "-pulse-circle"),
209
+ style: {
210
+ backgroundColor: color
211
+ }
212
+ }), /*#__PURE__*/React.createElement("span", {
213
+ className: "".concat(prefixCls, "-pulse-circle ").concat(prefixCls, "-pulse-circle-delay"),
214
+ style: {
215
+ backgroundColor: color
216
+ }
217
+ }));
218
+ };
219
+
220
+ /**
221
+ * Wheel spinner - similar to spokes but each line is offset from center,
222
+ * creating a visible hollow circle in the middle
223
+ */
224
+ var WheelSpinner = function WheelSpinner(props) {
225
+ var _props$prefixCls6 = props.prefixCls,
226
+ prefixCls = _props$prefixCls6 === void 0 ? 'yee-spin' : _props$prefixCls6,
227
+ _props$size6 = props.size,
228
+ size = _props$size6 === void 0 ? 'default' : _props$size6,
229
+ classNames = props.classNames,
230
+ styles = props.styles,
231
+ width = props.width,
232
+ height = props.height,
233
+ color = props.color;
234
+ var containerSize = sizeMap[size];
235
+ var count = 10;
236
+ var innerRadius = 0.38; // start at 38% from center (larger hollow area)
237
+ var spokeLength = containerSize * 0.22;
238
+ return /*#__PURE__*/React.createElement("div", {
239
+ className: clsx("".concat(prefixCls, "-indicator"), "".concat(prefixCls, "-indicator-wheel"), classNames === null || classNames === void 0 ? void 0 : classNames.indicator),
240
+ style: _objectSpread({
241
+ width: width || containerSize,
242
+ height: height || containerSize
243
+ }, styles === null || styles === void 0 ? void 0 : styles.indicator)
244
+ }, /*#__PURE__*/React.createElement("div", {
245
+ className: "".concat(prefixCls, "-wheel-spokes")
246
+ }, Array.from({
247
+ length: count
248
+ }, function (_, i) {
249
+ var angle = i * 360 / count;
250
+ var rad = angle * Math.PI / 180;
251
+ // Position each spoke: starts at innerRadius from center
252
+ var cx = containerSize / 2;
253
+ var cy = containerSize / 2;
254
+ var x = cx + innerRadius * containerSize * Math.sin(rad);
255
+ var y = cy - innerRadius * containerSize * Math.cos(rad);
256
+ return /*#__PURE__*/React.createElement("div", {
257
+ key: i,
258
+ className: "".concat(prefixCls, "-wheel-spoke"),
259
+ style: {
260
+ top: y,
261
+ left: x,
262
+ height: spokeLength,
263
+ marginLeft: -1,
264
+ transform: "rotate(".concat(angle, "deg)"),
265
+ transformOrigin: 'top center',
266
+ animationDelay: "".concat(i * 1.2 / count, "s"),
267
+ backgroundColor: color
268
+ }
269
+ });
270
+ })));
271
+ };
142
272
  var Indicator = function Indicator(_ref) {
143
273
  var _ref$variant = _ref.variant,
144
274
  variant = _ref$variant === void 0 ? 'dot' : _ref$variant,
@@ -149,6 +279,15 @@ var Indicator = function Indicator(_ref) {
149
279
  if (variant === 'spokes') {
150
280
  return /*#__PURE__*/React.createElement(SpokesSpinner, props);
151
281
  }
282
+ if (variant === 'bounce') {
283
+ return /*#__PURE__*/React.createElement(BounceSpinner, props);
284
+ }
285
+ if (variant === 'pulse') {
286
+ return /*#__PURE__*/React.createElement(PulseSpinner, props);
287
+ }
288
+ if (variant === 'wheel') {
289
+ return /*#__PURE__*/React.createElement(WheelSpinner, props);
290
+ }
152
291
  return /*#__PURE__*/React.createElement(DotSpinner, props);
153
292
  };
154
293
  export 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";
@@ -1,4 +1,4 @@
1
- export var version = "0.8.13";
1
+ export var version = "0.8.15";
2
2
  if (typeof window !== 'undefined') {
3
3
  window.__yee_c_version__ = version;
4
4
  }