gasp-components 1.0.10 → 1.0.11

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 (86) hide show
  1. package/dist/UploadOutlined-9WKjHsqa.js +878 -0
  2. package/dist/components/ag-grid-table/index.js +57877 -38314
  3. package/dist/components/button/index.js +18 -18
  4. package/dist/components/checklist/checklist-item.js +3 -3
  5. package/dist/components/checklist/index.js +5 -5
  6. package/dist/components/date-picker/index.js +9 -5022
  7. package/dist/components/dragger/index.js +28 -28
  8. package/dist/components/dropdown/index.js +10 -11
  9. package/dist/components/form/index.js +8 -9
  10. package/dist/components/form-item/index.js +10 -10
  11. package/dist/components/input/index.js +8 -8
  12. package/dist/components/modal/index.js +18 -20
  13. package/dist/components/password-input/index.js +2 -2
  14. package/dist/components/progress/index.js +16 -18
  15. package/dist/components/progress-circle/index.js +3 -3
  16. package/dist/components/radio-button/index.js +8 -8
  17. package/dist/components/result-popup/index.js +13 -14
  18. package/dist/components/select/index.js +1 -1
  19. package/dist/components/side-menu/index.js +2 -2
  20. package/dist/components/side-menu/menu-item.js +4 -6
  21. package/dist/components/steps/index.js +9 -9
  22. package/dist/components/table/index.js +16 -9298
  23. package/dist/components/tabs/index.js +10 -10
  24. package/dist/components/tabs/tab.js +7 -8
  25. package/dist/components/tag/index.js +9 -258
  26. package/dist/components/timeline-horizontal/index.js +7 -7
  27. package/dist/components/upload/index.js +62 -77
  28. package/dist/index-WlPrqxgY.js +87 -0
  29. package/dist/main.js +69 -457
  30. package/package.json +1 -1
  31. package/dist/CheckCircleFilled-xt-0R96Z.js +0 -16
  32. package/dist/CheckOutlined-EgxCAgj_.js +0 -16
  33. package/dist/CloseCircleFilled-bIgIULWb.js +0 -16
  34. package/dist/CloseOutlined-Q3kC3EZS.js +0 -16
  35. package/dist/Compact-fdEKV_mF.js +0 -180
  36. package/dist/ExclamationCircleFilled-XzDBEGmA.js +0 -16
  37. package/dist/KeyCode-qFRXB1-n.js +0 -517
  38. package/dist/LoadingOutlined-6Ipqn0og.js +0 -16
  39. package/dist/Overflow-JFdXKgCr.js +0 -231
  40. package/dist/PurePanel-hLGnXbul.js +0 -60
  41. package/dist/SearchOutlined-rJTFGXUi.js +0 -16
  42. package/dist/TextArea-n3dknzTq.js +0 -716
  43. package/dist/UploadOutlined-D8jfLEgv.js +0 -27
  44. package/dist/asyncToGenerator-t4sKr8R4.js +0 -340
  45. package/dist/button-LN5ZDad8.js +0 -819
  46. package/dist/collapse-ilv4Tji1.js +0 -20
  47. package/dist/colors-opGg9oSz.js +0 -25
  48. package/dist/compact-item-jjuVmDBH.js +0 -61
  49. package/dist/context-h3WSVDPz.js +0 -2087
  50. package/dist/createFormattedComponent-FcpICAm8.js +0 -3260
  51. package/dist/index--6VfGMUo.js +0 -402
  52. package/dist/index-0mpuHoS5.js +0 -996
  53. package/dist/index-1KQbTQJ2.js +0 -4405
  54. package/dist/index-5Uo03BMk.js +0 -681
  55. package/dist/index-BFgxz47K.js +0 -89
  56. package/dist/index-D3LMPWyJ.js +0 -1437
  57. package/dist/index-DVS_nWxv.js +0 -3026
  58. package/dist/index-ELHBhuK9.js +0 -100
  59. package/dist/index-Fn8q8B3V.js +0 -107
  60. package/dist/index-GgkQrebz.js +0 -950
  61. package/dist/index-L-MzVDcK.js +0 -616
  62. package/dist/index-M3WnMjiA.js +0 -230
  63. package/dist/index-NQd_zMf0.js +0 -69
  64. package/dist/index-ZT64Ec6u.js +0 -267
  65. package/dist/index-aawDqn9q.js +0 -3337
  66. package/dist/index-k04G4nlS.js +0 -1416
  67. package/dist/index-s3u4YBl4.js +0 -8
  68. package/dist/index-vtDVJV8q.js +0 -19571
  69. package/dist/isVisible-Qi9l15Ty.js +0 -232
  70. package/dist/motion-0ToOu81j.js +0 -226
  71. package/dist/motion-NQme0FJ_.js +0 -32
  72. package/dist/omit-ylWA0ZLZ.js +0 -10
  73. package/dist/pickAttrs-zaQzRTqh.js +0 -42
  74. package/dist/progress-a1_pwKVT.js +0 -722
  75. package/dist/reactNode-R20zZQk1.js +0 -18
  76. package/dist/responsiveObserver-V1_1G14X.js +0 -71
  77. package/dist/roundedArrow-p1Pmd9av.js +0 -64
  78. package/dist/row-sPFiFm0C.js +0 -230
  79. package/dist/slide-mFXPRHku.js +0 -265
  80. package/dist/styleChecker-pZ3k2IiY.js +0 -37
  81. package/dist/useCSSVarCls-GwZT_WiF.js +0 -9
  82. package/dist/useClosable-4G12n4Bp.js +0 -15
  83. package/dist/useLocale-eThlLZJw.js +0 -16
  84. package/dist/useMergedState-qUafLuUa.js +0 -23
  85. package/dist/useVariants-s0IcneBD.js +0 -25
  86. package/dist/zoom-Ps8y0jNW.js +0 -174
@@ -1,722 +0,0 @@
1
- import * as s from "react";
2
- import { useRef as ee, useEffect as ve } from "react";
3
- import { C as Ce } from "./CheckCircleFilled-xt-0R96Z.js";
4
- import { C as he } from "./CheckOutlined-EgxCAgj_.js";
5
- import { C as ye } from "./CloseCircleFilled-bIgIULWb.js";
6
- import { C as be } from "./CloseOutlined-Q3kC3EZS.js";
7
- import { c as G } from "./index-NQd_zMf0.js";
8
- import { o as Se } from "./omit-ylWA0ZLZ.js";
9
- import { f as $e, b as ke, g as T, _ as te, x as Ee, e as xe, a2 as Y, h as Pe, m as we, r as Ne, d as re, D as ae, C as Oe } from "./index-1KQbTQJ2.js";
10
- import { T as _e } from "./index-5Uo03BMk.js";
11
- import { K as De } from "./motion-0ToOu81j.js";
12
- var Ie = {
13
- percent: 0,
14
- prefixCls: "rc-progress",
15
- strokeColor: "#2db7f5",
16
- strokeLinecap: "round",
17
- strokeWidth: 1,
18
- trailColor: "#D9D9D9",
19
- trailWidth: 1,
20
- gapPosition: "bottom"
21
- }, je = function() {
22
- var t = ee([]), r = ee(null);
23
- return ve(function() {
24
- var o = Date.now(), n = !1;
25
- t.current.forEach(function(a) {
26
- if (a) {
27
- n = !0;
28
- var i = a.style;
29
- i.transitionDuration = ".3s, .3s, .3s, .06s", r.current && o - r.current < 100 && (i.transitionDuration = "0s, 0s");
30
- }
31
- }), n && (r.current = Date.now());
32
- }), t.current;
33
- };
34
- process.env.NODE_ENV;
35
- var oe = 0, We = process.env.NODE_ENV !== "test" && $e();
36
- function Le() {
37
- var e;
38
- return We ? (e = oe, oe += 1) : e = "TEST_OR_SSR", e;
39
- }
40
- const Ae = function(e) {
41
- var t = s.useState(), r = ke(t, 2), o = r[0], n = r[1];
42
- return s.useEffect(function() {
43
- n("rc_progress_".concat(Le()));
44
- }, []), e || o;
45
- };
46
- var ne = function(t) {
47
- var r = t.bg, o = t.children;
48
- return /* @__PURE__ */ s.createElement("div", {
49
- style: {
50
- width: "100%",
51
- height: "100%",
52
- background: r
53
- }
54
- }, o);
55
- };
56
- function se(e, t) {
57
- return Object.keys(e).map(function(r) {
58
- var o = parseFloat(r), n = "".concat(Math.floor(o * t), "%");
59
- return "".concat(e[r], " ").concat(n);
60
- });
61
- }
62
- var le = /* @__PURE__ */ s.forwardRef(function(e, t) {
63
- var r = e.prefixCls, o = e.color, n = e.gradientId, a = e.radius, i = e.style, c = e.ptg, l = e.strokeLinecap, u = e.strokeWidth, d = e.size, g = e.gapDegree, v = o && T(o) === "object", h = v ? "#FFF" : void 0, C = d / 2, m = /* @__PURE__ */ s.createElement("circle", {
64
- className: "".concat(r, "-circle-path"),
65
- r: a,
66
- cx: C,
67
- cy: C,
68
- stroke: h,
69
- strokeLinecap: l,
70
- strokeWidth: u,
71
- opacity: c === 0 ? 0 : 1,
72
- style: i,
73
- ref: t
74
- });
75
- if (!v)
76
- return m;
77
- var f = "".concat(n, "-conic"), k = g ? "".concat(180 + g / 2, "deg") : "0deg", b = se(o, (360 - g) / 360), S = se(o, 1), p = "conic-gradient(from ".concat(k, ", ").concat(b.join(", "), ")"), E = "linear-gradient(to ".concat(g ? "bottom" : "top", ", ").concat(S.join(", "), ")");
78
- return /* @__PURE__ */ s.createElement(s.Fragment, null, /* @__PURE__ */ s.createElement("mask", {
79
- id: f
80
- }, m), /* @__PURE__ */ s.createElement("foreignObject", {
81
- x: 0,
82
- y: 0,
83
- width: d,
84
- height: d,
85
- mask: "url(#".concat(f, ")")
86
- }, /* @__PURE__ */ s.createElement(ne, {
87
- bg: E
88
- }, /* @__PURE__ */ s.createElement(ne, {
89
- bg: p
90
- }))));
91
- });
92
- process.env.NODE_ENV !== "production" && (le.displayName = "PtgCircle");
93
- var F = 100, Q = function(t, r, o, n, a, i, c, l, u, d) {
94
- var g = arguments.length > 10 && arguments[10] !== void 0 ? arguments[10] : 0, v = o / 100 * 360 * ((360 - i) / 360), h = i === 0 ? 0 : {
95
- bottom: 0,
96
- top: 180,
97
- left: 90,
98
- right: -90
99
- }[c], C = (100 - n) / 100 * r;
100
- u === "round" && n !== 100 && (C += d / 2, C >= r && (C = r - 0.01));
101
- var m = F / 2;
102
- return {
103
- stroke: typeof l == "string" ? l : void 0,
104
- strokeDasharray: "".concat(r, "px ").concat(t),
105
- strokeDashoffset: C + g,
106
- transform: "rotate(".concat(a + v + h, "deg)"),
107
- transformOrigin: "".concat(m, "px ").concat(m, "px"),
108
- transition: "stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",
109
- fillOpacity: 0
110
- };
111
- }, Te = ["id", "prefixCls", "steps", "strokeWidth", "trailWidth", "gapDegree", "gapPosition", "trailColor", "strokeLinecap", "style", "className", "strokeColor", "percent"];
112
- function ie(e) {
113
- var t = e ?? [];
114
- return Array.isArray(t) ? t : [t];
115
- }
116
- var de = function(t) {
117
- var r = te(te({}, Ie), t), o = r.id, n = r.prefixCls, a = r.steps, i = r.strokeWidth, c = r.trailWidth, l = r.gapDegree, u = l === void 0 ? 0 : l, d = r.gapPosition, g = r.trailColor, v = r.strokeLinecap, h = r.style, C = r.className, m = r.strokeColor, f = r.percent, k = Ee(r, Te), b = F / 2, S = Ae(o), p = "".concat(S, "-gradient"), E = b - i / 2, _ = Math.PI * 2 * E, j = u > 0 ? 90 + u / 2 : -90, x = _ * ((360 - u) / 360), W = T(a) === "object" ? a : {
118
- count: a,
119
- space: 2
120
- }, N = W.count, D = W.space, R = ie(f), y = ie(m), $ = y.find(function(M) {
121
- return M && T(M) === "object";
122
- }), P = $ && T($) === "object", O = P ? "butt" : v, K = Q(_, x, 0, 100, j, u, d, g, O, i), Z = je(), ge = function() {
123
- var B = 0;
124
- return R.map(function(L, I) {
125
- var U = y[I] || y[y.length - 1], A = Q(_, x, B, L, j, u, d, U, O, i);
126
- return B += L, /* @__PURE__ */ s.createElement(le, {
127
- key: I,
128
- color: U,
129
- ptg: L,
130
- radius: E,
131
- prefixCls: n,
132
- gradientId: p,
133
- style: A,
134
- strokeLinecap: O,
135
- strokeWidth: i,
136
- gapDegree: u,
137
- ref: function(q) {
138
- Z[I] = q;
139
- },
140
- size: F
141
- });
142
- }).reverse();
143
- }, pe = function() {
144
- var B = Math.round(N * (R[0] / 100)), L = 100 / N, I = 0;
145
- return new Array(N).fill(null).map(function(U, A) {
146
- var X = A <= B - 1 ? y[0] : g, q = X && T(X) === "object" ? "url(#".concat(p, ")") : void 0, J = Q(_, x, I, L, j, u, d, X, "butt", i, D);
147
- return I += (x - J.strokeDashoffset + D) * 100 / x, /* @__PURE__ */ s.createElement("circle", {
148
- key: A,
149
- className: "".concat(n, "-circle-path"),
150
- r: E,
151
- cx: b,
152
- cy: b,
153
- stroke: q,
154
- strokeWidth: i,
155
- opacity: 1,
156
- style: J,
157
- ref: function(me) {
158
- Z[A] = me;
159
- }
160
- });
161
- });
162
- };
163
- return /* @__PURE__ */ s.createElement("svg", xe({
164
- className: G("".concat(n, "-circle"), C),
165
- viewBox: "0 0 ".concat(F, " ").concat(F),
166
- style: h,
167
- id: o,
168
- role: "presentation"
169
- }, k), !N && /* @__PURE__ */ s.createElement("circle", {
170
- className: "".concat(n, "-circle-trail"),
171
- r: E,
172
- cx: b,
173
- cy: b,
174
- stroke: g,
175
- strokeLinecap: O,
176
- strokeWidth: c || i,
177
- style: K
178
- }), N ? pe() : ge());
179
- };
180
- process.env.NODE_ENV !== "production" && (de.displayName = "Circle");
181
- function w(e) {
182
- return !e || e < 0 ? 0 : e > 100 ? 100 : e;
183
- }
184
- function V(e) {
185
- let {
186
- success: t,
187
- successPercent: r
188
- } = e, o = r;
189
- return t && "progress" in t && (o = t.progress), t && "percent" in t && (o = t.percent), o;
190
- }
191
- const Fe = (e) => {
192
- let {
193
- percent: t,
194
- success: r,
195
- successPercent: o
196
- } = e;
197
- const n = w(V({
198
- success: r,
199
- successPercent: o
200
- }));
201
- return [n, w(w(t) - n)];
202
- }, Re = (e) => {
203
- let {
204
- success: t = {},
205
- strokeColor: r
206
- } = e;
207
- const {
208
- strokeColor: o
209
- } = t;
210
- return [o || Y.green, r || null];
211
- }, H = (e, t, r) => {
212
- var o, n, a, i;
213
- let c = -1, l = -1;
214
- if (t === "step") {
215
- const u = r.steps, d = r.strokeWidth;
216
- typeof e == "string" || typeof e > "u" ? (c = e === "small" ? 2 : 14, l = d ?? 8) : typeof e == "number" ? [c, l] = [e, e] : [c = 14, l = 8] = e, c *= u;
217
- } else if (t === "line") {
218
- const u = r == null ? void 0 : r.strokeWidth;
219
- typeof e == "string" || typeof e > "u" ? l = u || (e === "small" ? 6 : 8) : typeof e == "number" ? [c, l] = [e, e] : [c = -1, l = 8] = e;
220
- } else
221
- (t === "circle" || t === "dashboard") && (typeof e == "string" || typeof e > "u" ? [c, l] = e === "small" ? [60, 60] : [120, 120] : typeof e == "number" ? [c, l] = [e, e] : (c = (n = (o = e[0]) !== null && o !== void 0 ? o : e[1]) !== null && n !== void 0 ? n : 120, l = (i = (a = e[0]) !== null && a !== void 0 ? a : e[1]) !== null && i !== void 0 ? i : 120));
222
- return [c, l];
223
- }, Me = 3, Be = (e) => Me / e * 100, Xe = (e) => {
224
- const {
225
- prefixCls: t,
226
- trailColor: r = null,
227
- strokeLinecap: o = "round",
228
- gapPosition: n,
229
- gapDegree: a,
230
- width: i = 120,
231
- type: c,
232
- children: l,
233
- success: u,
234
- size: d = i
235
- } = e, [g, v] = H(d, "circle");
236
- let {
237
- strokeWidth: h
238
- } = e;
239
- h === void 0 && (h = Math.max(Be(g), 6));
240
- const C = {
241
- width: g,
242
- height: v,
243
- fontSize: g * 0.15 + 6
244
- }, m = s.useMemo(() => {
245
- if (a || a === 0)
246
- return a;
247
- if (c === "dashboard")
248
- return 75;
249
- }, [a, c]), f = n || c === "dashboard" && "bottom" || void 0, k = Object.prototype.toString.call(e.strokeColor) === "[object Object]", b = Re({
250
- success: u,
251
- strokeColor: e.strokeColor
252
- }), S = G(`${t}-inner`, {
253
- [`${t}-circle-gradient`]: k
254
- }), p = /* @__PURE__ */ s.createElement(de, {
255
- percent: Fe(e),
256
- strokeWidth: h,
257
- trailWidth: h,
258
- strokeColor: b,
259
- strokeLinecap: o,
260
- trailColor: r,
261
- prefixCls: t,
262
- gapDegree: m,
263
- gapPosition: f
264
- });
265
- return /* @__PURE__ */ s.createElement("div", {
266
- className: S,
267
- style: C
268
- }, g <= 20 ? /* @__PURE__ */ s.createElement(_e, {
269
- title: l
270
- }, /* @__PURE__ */ s.createElement("span", null, p)) : /* @__PURE__ */ s.createElement(s.Fragment, null, p, l));
271
- }, Ve = Xe, z = "--progress-line-stroke-color", ue = "--progress-percent", ce = (e) => {
272
- const t = e ? "100%" : "-100%";
273
- return new De(`antProgress${e ? "RTL" : "LTR"}Active`, {
274
- "0%": {
275
- transform: `translateX(${t}) scaleX(0)`,
276
- opacity: 0.1
277
- },
278
- "20%": {
279
- transform: `translateX(${t}) scaleX(0)`,
280
- opacity: 0.5
281
- },
282
- to: {
283
- transform: "translateX(0) scaleX(1)",
284
- opacity: 0
285
- }
286
- });
287
- }, ze = (e) => {
288
- const {
289
- componentCls: t,
290
- iconCls: r
291
- } = e;
292
- return {
293
- [t]: Object.assign(Object.assign({}, Ne(e)), {
294
- display: "inline-block",
295
- "&-rtl": {
296
- direction: "rtl"
297
- },
298
- "&-line": {
299
- position: "relative",
300
- width: "100%",
301
- fontSize: e.fontSize,
302
- marginInlineEnd: e.marginXS,
303
- marginBottom: e.marginXS
304
- },
305
- [`${t}-outer`]: {
306
- display: "inline-block",
307
- width: "100%"
308
- },
309
- [`&${t}-show-info`]: {
310
- [`${t}-outer`]: {
311
- marginInlineEnd: `calc(-2em - ${re(e.marginXS)})`,
312
- paddingInlineEnd: `calc(2em + ${re(e.paddingXS)})`
313
- }
314
- },
315
- [`${t}-inner`]: {
316
- position: "relative",
317
- display: "inline-block",
318
- width: "100%",
319
- overflow: "hidden",
320
- verticalAlign: "middle",
321
- backgroundColor: e.remainingColor,
322
- borderRadius: e.lineBorderRadius
323
- },
324
- [`${t}-inner:not(${t}-circle-gradient)`]: {
325
- [`${t}-circle-path`]: {
326
- stroke: e.defaultColor
327
- }
328
- },
329
- [`${t}-success-bg, ${t}-bg`]: {
330
- position: "relative",
331
- background: e.defaultColor,
332
- borderRadius: e.lineBorderRadius,
333
- transition: `all ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`
334
- },
335
- [`${t}-bg`]: {
336
- overflow: "hidden",
337
- "&::after": {
338
- content: '""',
339
- background: {
340
- _multi_value_: !0,
341
- value: ["inherit", `var(${z})`]
342
- },
343
- height: "100%",
344
- width: `calc(1 / var(${ue}) * 100%)`,
345
- display: "block"
346
- }
347
- },
348
- [`${t}-success-bg`]: {
349
- position: "absolute",
350
- insetBlockStart: 0,
351
- insetInlineStart: 0,
352
- backgroundColor: e.colorSuccess
353
- },
354
- [`${t}-text`]: {
355
- display: "inline-block",
356
- width: "2em",
357
- marginInlineStart: e.marginXS,
358
- color: e.colorText,
359
- lineHeight: 1,
360
- whiteSpace: "nowrap",
361
- textAlign: "start",
362
- verticalAlign: "middle",
363
- wordBreak: "normal",
364
- [r]: {
365
- fontSize: e.fontSize
366
- }
367
- },
368
- [`&${t}-status-active`]: {
369
- [`${t}-bg::before`]: {
370
- position: "absolute",
371
- inset: 0,
372
- backgroundColor: e.colorBgContainer,
373
- borderRadius: e.lineBorderRadius,
374
- opacity: 0,
375
- animationName: ce(),
376
- animationDuration: e.progressActiveMotionDuration,
377
- animationTimingFunction: e.motionEaseOutQuint,
378
- animationIterationCount: "infinite",
379
- content: '""'
380
- }
381
- },
382
- [`&${t}-rtl${t}-status-active`]: {
383
- [`${t}-bg::before`]: {
384
- animationName: ce(!0)
385
- }
386
- },
387
- [`&${t}-status-exception`]: {
388
- [`${t}-bg`]: {
389
- backgroundColor: e.colorError
390
- },
391
- [`${t}-text`]: {
392
- color: e.colorError
393
- }
394
- },
395
- [`&${t}-status-exception ${t}-inner:not(${t}-circle-gradient)`]: {
396
- [`${t}-circle-path`]: {
397
- stroke: e.colorError
398
- }
399
- },
400
- [`&${t}-status-success`]: {
401
- [`${t}-bg`]: {
402
- backgroundColor: e.colorSuccess
403
- },
404
- [`${t}-text`]: {
405
- color: e.colorSuccess
406
- }
407
- },
408
- [`&${t}-status-success ${t}-inner:not(${t}-circle-gradient)`]: {
409
- [`${t}-circle-path`]: {
410
- stroke: e.colorSuccess
411
- }
412
- }
413
- })
414
- };
415
- }, Ge = (e) => {
416
- const {
417
- componentCls: t,
418
- iconCls: r
419
- } = e;
420
- return {
421
- [t]: {
422
- [`${t}-circle-trail`]: {
423
- stroke: e.remainingColor
424
- },
425
- [`&${t}-circle ${t}-inner`]: {
426
- position: "relative",
427
- lineHeight: 1,
428
- backgroundColor: "transparent"
429
- },
430
- [`&${t}-circle ${t}-text`]: {
431
- position: "absolute",
432
- insetBlockStart: "50%",
433
- insetInlineStart: 0,
434
- width: "100%",
435
- margin: 0,
436
- padding: 0,
437
- color: e.circleTextColor,
438
- fontSize: e.circleTextFontSize,
439
- lineHeight: 1,
440
- whiteSpace: "normal",
441
- textAlign: "center",
442
- transform: "translateY(-50%)",
443
- [r]: {
444
- fontSize: e.circleIconFontSize
445
- }
446
- },
447
- [`${t}-circle&-status-exception`]: {
448
- [`${t}-text`]: {
449
- color: e.colorError
450
- }
451
- },
452
- [`${t}-circle&-status-success`]: {
453
- [`${t}-text`]: {
454
- color: e.colorSuccess
455
- }
456
- }
457
- },
458
- [`${t}-inline-circle`]: {
459
- lineHeight: 1,
460
- [`${t}-inner`]: {
461
- verticalAlign: "bottom"
462
- }
463
- }
464
- };
465
- }, He = (e) => {
466
- const {
467
- componentCls: t
468
- } = e;
469
- return {
470
- [t]: {
471
- [`${t}-steps`]: {
472
- display: "inline-block",
473
- "&-outer": {
474
- display: "flex",
475
- flexDirection: "row",
476
- alignItems: "center"
477
- },
478
- "&-item": {
479
- flexShrink: 0,
480
- minWidth: e.progressStepMinWidth,
481
- marginInlineEnd: e.progressStepMarginInlineEnd,
482
- backgroundColor: e.remainingColor,
483
- transition: `all ${e.motionDurationSlow}`,
484
- "&-active": {
485
- backgroundColor: e.defaultColor
486
- }
487
- }
488
- }
489
- }
490
- };
491
- }, Ke = (e) => {
492
- const {
493
- componentCls: t,
494
- iconCls: r
495
- } = e;
496
- return {
497
- [t]: {
498
- [`${t}-small&-line, ${t}-small&-line ${t}-text ${r}`]: {
499
- fontSize: e.fontSizeSM
500
- }
501
- }
502
- };
503
- }, Ue = (e) => ({
504
- circleTextColor: e.colorText,
505
- defaultColor: e.colorInfo,
506
- remainingColor: e.colorFillSecondary,
507
- lineBorderRadius: 100,
508
- // magic for capsule shape, should be a very large number
509
- circleTextFontSize: "1em",
510
- circleIconFontSize: `${e.fontSize / e.fontSizeSM}em`
511
- }), qe = Pe("Progress", (e) => {
512
- const t = e.calc(e.marginXXS).div(2).equal(), r = we(e, {
513
- progressStepMarginInlineEnd: t,
514
- progressStepMinWidth: t,
515
- progressActiveMotionDuration: "2.4s"
516
- });
517
- return [ze(r), Ge(r), He(r), Ke(r)];
518
- }, Ue);
519
- var Qe = function(e, t) {
520
- var r = {};
521
- for (var o in e)
522
- Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (r[o] = e[o]);
523
- if (e != null && typeof Object.getOwnPropertySymbols == "function")
524
- for (var n = 0, o = Object.getOwnPropertySymbols(e); n < o.length; n++)
525
- t.indexOf(o[n]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[n]) && (r[o[n]] = e[o[n]]);
526
- return r;
527
- };
528
- const Ye = (e) => {
529
- let t = [];
530
- return Object.keys(e).forEach((r) => {
531
- const o = parseFloat(r.replace(/%/g, ""));
532
- isNaN(o) || t.push({
533
- key: o,
534
- value: e[r]
535
- });
536
- }), t = t.sort((r, o) => r.key - o.key), t.map((r) => {
537
- let {
538
- key: o,
539
- value: n
540
- } = r;
541
- return `${n} ${o}%`;
542
- }).join(", ");
543
- }, Ze = (e, t) => {
544
- const {
545
- from: r = Y.blue,
546
- to: o = Y.blue,
547
- direction: n = t === "rtl" ? "to left" : "to right"
548
- } = e, a = Qe(e, ["from", "to", "direction"]);
549
- if (Object.keys(a).length !== 0) {
550
- const c = Ye(a), l = `linear-gradient(${n}, ${c})`;
551
- return {
552
- background: l,
553
- [z]: l
554
- };
555
- }
556
- const i = `linear-gradient(${n}, ${r}, ${o})`;
557
- return {
558
- background: i,
559
- [z]: i
560
- };
561
- }, Je = (e) => {
562
- const {
563
- prefixCls: t,
564
- direction: r,
565
- percent: o,
566
- size: n,
567
- strokeWidth: a,
568
- strokeColor: i,
569
- strokeLinecap: c = "round",
570
- children: l,
571
- trailColor: u = null,
572
- success: d
573
- } = e, g = i && typeof i != "string" ? Ze(i, r) : {
574
- [z]: i,
575
- background: i
576
- }, v = c === "square" || c === "butt" ? 0 : void 0, h = n ?? [-1, a || (n === "small" ? 6 : 8)], [C, m] = H(h, "line", {
577
- strokeWidth: a
578
- });
579
- process.env.NODE_ENV !== "production" && ae("Progress").deprecated(!("strokeWidth" in e), "strokeWidth", "size");
580
- const f = {
581
- backgroundColor: u || void 0,
582
- borderRadius: v
583
- }, k = Object.assign(Object.assign({
584
- width: `${w(o)}%`,
585
- height: m,
586
- borderRadius: v
587
- }, g), {
588
- [ue]: w(o) / 100
589
- }), b = V(e), S = {
590
- width: `${w(b)}%`,
591
- height: m,
592
- borderRadius: v,
593
- backgroundColor: d == null ? void 0 : d.strokeColor
594
- }, p = {
595
- width: C < 0 ? "100%" : C,
596
- height: m
597
- };
598
- return /* @__PURE__ */ s.createElement(s.Fragment, null, /* @__PURE__ */ s.createElement("div", {
599
- className: `${t}-outer`,
600
- style: p
601
- }, /* @__PURE__ */ s.createElement("div", {
602
- className: `${t}-inner`,
603
- style: f
604
- }, /* @__PURE__ */ s.createElement("div", {
605
- className: `${t}-bg`,
606
- style: k
607
- }), b !== void 0 ? /* @__PURE__ */ s.createElement("div", {
608
- className: `${t}-success-bg`,
609
- style: S
610
- }) : null)), l);
611
- }, et = Je, tt = (e) => {
612
- const {
613
- size: t,
614
- steps: r,
615
- percent: o = 0,
616
- strokeWidth: n = 8,
617
- strokeColor: a,
618
- trailColor: i = null,
619
- prefixCls: c,
620
- children: l
621
- } = e, u = Math.round(r * (o / 100)), g = t ?? [t === "small" ? 2 : 14, n], [v, h] = H(g, "step", {
622
- steps: r,
623
- strokeWidth: n
624
- }), C = v / r, m = new Array(r);
625
- for (let f = 0; f < r; f++) {
626
- const k = Array.isArray(a) ? a[f] : a;
627
- m[f] = /* @__PURE__ */ s.createElement("div", {
628
- key: f,
629
- className: G(`${c}-steps-item`, {
630
- [`${c}-steps-item-active`]: f <= u - 1
631
- }),
632
- style: {
633
- backgroundColor: f <= u - 1 ? k : i,
634
- width: C,
635
- height: h
636
- }
637
- });
638
- }
639
- return /* @__PURE__ */ s.createElement("div", {
640
- className: `${c}-steps-outer`
641
- }, m, l);
642
- }, rt = tt;
643
- var ot = function(e, t) {
644
- var r = {};
645
- for (var o in e)
646
- Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (r[o] = e[o]);
647
- if (e != null && typeof Object.getOwnPropertySymbols == "function")
648
- for (var n = 0, o = Object.getOwnPropertySymbols(e); n < o.length; n++)
649
- t.indexOf(o[n]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[n]) && (r[o[n]] = e[o[n]]);
650
- return r;
651
- };
652
- const nt = ["normal", "exception", "active", "success"], fe = /* @__PURE__ */ s.forwardRef((e, t) => {
653
- const {
654
- prefixCls: r,
655
- className: o,
656
- rootClassName: n,
657
- steps: a,
658
- strokeColor: i,
659
- percent: c = 0,
660
- size: l = "default",
661
- showInfo: u = !0,
662
- type: d = "line",
663
- status: g,
664
- format: v,
665
- style: h
666
- } = e, C = ot(e, ["prefixCls", "className", "rootClassName", "steps", "strokeColor", "percent", "size", "showInfo", "type", "status", "format", "style"]), m = s.useMemo(() => {
667
- var y, $;
668
- const P = V(e);
669
- return parseInt(P !== void 0 ? (y = P ?? 0) === null || y === void 0 ? void 0 : y.toString() : ($ = c ?? 0) === null || $ === void 0 ? void 0 : $.toString(), 10);
670
- }, [c, e.success, e.successPercent]), f = s.useMemo(() => !nt.includes(g) && m >= 100 ? "success" : g || "normal", [g, m]), {
671
- getPrefixCls: k,
672
- direction: b,
673
- progress: S
674
- } = s.useContext(Oe), p = k("progress", r), [E, _, j] = qe(p), x = s.useMemo(() => {
675
- if (!u)
676
- return null;
677
- const y = V(e);
678
- let $;
679
- const P = v || ((K) => `${K}%`), O = d === "line";
680
- return v || f !== "exception" && f !== "success" ? $ = P(w(c), w(y)) : f === "exception" ? $ = O ? /* @__PURE__ */ s.createElement(ye, null) : /* @__PURE__ */ s.createElement(be, null) : f === "success" && ($ = O ? /* @__PURE__ */ s.createElement(Ce, null) : /* @__PURE__ */ s.createElement(he, null)), /* @__PURE__ */ s.createElement("span", {
681
- className: `${p}-text`,
682
- title: typeof $ == "string" ? $ : void 0
683
- }, $);
684
- }, [u, c, m, f, d, p, v]);
685
- if (process.env.NODE_ENV !== "production") {
686
- const y = ae("Progress");
687
- y.deprecated(!("successPercent" in e), "successPercent", "success.percent"), y.deprecated(!("width" in e), "width", "size"), (d === "circle" || d === "dashboard") && Array.isArray(l) && process.env.NODE_ENV !== "production" && y(!1, "usage", 'Type "circle" and "dashboard" do not accept array as `size`, please use number or preset size instead.'), e.success && "progress" in e.success && y.deprecated(!1, "success.progress", "success.percent");
688
- }
689
- const W = Array.isArray(i) ? i[0] : i, N = typeof i == "string" || Array.isArray(i) ? i : void 0;
690
- let D;
691
- d === "line" ? D = a ? /* @__PURE__ */ s.createElement(rt, Object.assign({}, e, {
692
- strokeColor: N,
693
- prefixCls: p,
694
- steps: a
695
- }), x) : /* @__PURE__ */ s.createElement(et, Object.assign({}, e, {
696
- strokeColor: W,
697
- prefixCls: p,
698
- direction: b
699
- }), x) : (d === "circle" || d === "dashboard") && (D = /* @__PURE__ */ s.createElement(Ve, Object.assign({}, e, {
700
- strokeColor: W,
701
- prefixCls: p,
702
- progressStatus: f
703
- }), x));
704
- const R = G(p, `${p}-status-${f}`, `${p}-${d === "dashboard" && "circle" || a && "steps" || d}`, {
705
- [`${p}-inline-circle`]: d === "circle" && H(l, "circle")[0] <= 20,
706
- [`${p}-show-info`]: u,
707
- [`${p}-${l}`]: typeof l == "string",
708
- [`${p}-rtl`]: b === "rtl"
709
- }, S == null ? void 0 : S.className, o, n, _, j);
710
- return E(/* @__PURE__ */ s.createElement("div", Object.assign({
711
- ref: t,
712
- style: Object.assign(Object.assign({}, S == null ? void 0 : S.style), h),
713
- className: R,
714
- role: "progressbar",
715
- "aria-valuenow": m
716
- }, Se(C, ["trailColor", "strokeWidth", "width", "gapDegree", "gapPosition", "strokeLinecap", "success", "successPercent"])), D));
717
- });
718
- process.env.NODE_ENV !== "production" && (fe.displayName = "Progress");
719
- const vt = fe;
720
- export {
721
- vt as P
722
- };