@wandox/sdk 0.1.37 → 0.1.38

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 (109) hide show
  1. package/dist/{V1Workbench-CqWNz8eg.js → V1Workbench-CX2TY1nY.js} +5 -6
  2. package/dist/{V1Workbench-UL6m_GSU.cjs → V1Workbench-D4MDOCK8.cjs} +3 -3
  3. package/dist/V2Workbench-3OIxKrwT.cjs +2 -0
  4. package/dist/V2Workbench-B9hpG29_.js +2674 -0
  5. package/dist/{WorkbenchRuntime-BPjLWyHy.cjs → WorkbenchRuntime-CcgVGiw7.cjs} +2 -2
  6. package/dist/{WorkbenchRuntime-kI4h_Boi.js → WorkbenchRuntime-DFoqujXl.js} +4 -4
  7. package/dist/{arc-B5N4v9Jv.cjs → arc-BoXgqEyE.cjs} +1 -1
  8. package/dist/{arc-BRgfV2vT.js → arc-DRkZQWMH.js} +1 -1
  9. package/dist/{architectureDiagram-3BPJPVTR-DUgD63Rt.js → architectureDiagram-3BPJPVTR-Cvjm2RUg.js} +3 -3
  10. package/dist/{architectureDiagram-3BPJPVTR-DjM6oFEx.cjs → architectureDiagram-3BPJPVTR-JB1cjWXS.cjs} +1 -1
  11. package/dist/{blockDiagram-GPEHLZMM-Bbk0DebD.cjs → blockDiagram-GPEHLZMM-BMrbXpB3.cjs} +1 -1
  12. package/dist/{blockDiagram-GPEHLZMM-6EI7pONG.js → blockDiagram-GPEHLZMM-LAE7xfhz.js} +3 -3
  13. package/dist/{c4Diagram-AAUBKEIU-CPATCWpo.js → c4Diagram-AAUBKEIU-CZcPU-n2.js} +2 -2
  14. package/dist/{c4Diagram-AAUBKEIU-UW4tUuYO.cjs → c4Diagram-AAUBKEIU-T_tWuHKf.cjs} +1 -1
  15. package/dist/{channel-BOuHczM9.js → channel-B8LPCyPH.js} +1 -1
  16. package/dist/{channel-BPVKsQR4.cjs → channel-BaiWA2t8.cjs} +1 -1
  17. package/dist/{chunk-2J33WTMH-JkZNZ2FQ.cjs → chunk-2J33WTMH-BibdqHFp.cjs} +1 -1
  18. package/dist/{chunk-2J33WTMH-BMA-WoY7.js → chunk-2J33WTMH-C5be9lBd.js} +1 -1
  19. package/dist/{chunk-4BX2VUAB-DJjQ2iym.cjs → chunk-4BX2VUAB-D0KvmKPe.cjs} +1 -1
  20. package/dist/{chunk-4BX2VUAB-CoubCo12.js → chunk-4BX2VUAB-DMFsq4KZ.js} +1 -1
  21. package/dist/{chunk-55IACEB6-k8m2Tb0O.cjs → chunk-55IACEB6-CqaRoYMg.cjs} +1 -1
  22. package/dist/{chunk-55IACEB6-B8_bbLHJ.js → chunk-55IACEB6-DmSQDD1d.js} +1 -1
  23. package/dist/{chunk-727SXJPM-Dk4Qx6Cj.cjs → chunk-727SXJPM-slxRZHEn.cjs} +1 -1
  24. package/dist/{chunk-727SXJPM-w5uqNLUJ.js → chunk-727SXJPM-zPDeBLwO.js} +5 -5
  25. package/dist/{chunk-AQP2D5EJ-BC_iX9X6.js → chunk-AQP2D5EJ-CAbt8thT.js} +3 -3
  26. package/dist/{chunk-AQP2D5EJ-rJ3mY-t4.cjs → chunk-AQP2D5EJ-DInpQ3Bk.cjs} +1 -1
  27. package/dist/{chunk-FMBD7UC4-C_CgBQVs.cjs → chunk-FMBD7UC4-7r_t9A1F.cjs} +1 -1
  28. package/dist/{chunk-FMBD7UC4-DZlFTSR3.js → chunk-FMBD7UC4-IX1Bs9Jl.js} +1 -1
  29. package/dist/{chunk-ND2GUHAM-SOVIggp_.js → chunk-ND2GUHAM-BDBw_eej.js} +1 -1
  30. package/dist/{chunk-ND2GUHAM-rYKw1ewI.cjs → chunk-ND2GUHAM-BKWetS2i.cjs} +1 -1
  31. package/dist/{chunk-QZHKN3VN-D_n03X4c.cjs → chunk-QZHKN3VN-CaXwA0Ch.cjs} +1 -1
  32. package/dist/{chunk-QZHKN3VN-BzYA6_MS.js → chunk-QZHKN3VN-DYLGrKqP.js} +1 -1
  33. package/dist/{classDiagram-4FO5ZUOK-yY-LWEE5.js → classDiagram-4FO5ZUOK-BfPbGLow.js} +2 -2
  34. package/dist/{classDiagram-4FO5ZUOK-Cus7V0-B.cjs → classDiagram-4FO5ZUOK-C8Col58-.cjs} +1 -1
  35. package/dist/{classDiagram-v2-Q7XG4LA2-D_2oVIAG.js → classDiagram-v2-Q7XG4LA2-BBAMvpEX.js} +2 -2
  36. package/dist/{classDiagram-v2-Q7XG4LA2-Cus7V0-B.cjs → classDiagram-v2-Q7XG4LA2-C8Col58-.cjs} +1 -1
  37. package/dist/{cose-bilkent-S5V4N54A-C8A50UJc.cjs → cose-bilkent-S5V4N54A-BAGhd7Pv.cjs} +1 -1
  38. package/dist/{cose-bilkent-S5V4N54A-DtK_d2nt.js → cose-bilkent-S5V4N54A-BWdSLpNe.js} +2 -2
  39. package/dist/{dagre-BM42HDAG-B9o52kSq.js → dagre-BM42HDAG-BeqXhsH3.js} +1 -1
  40. package/dist/{dagre-BM42HDAG-CctSzO0L.cjs → dagre-BM42HDAG-Bx9eEuWz.cjs} +1 -1
  41. package/dist/{diagram-2AECGRRQ-DeefcALf.cjs → diagram-2AECGRRQ-C1_rnEMZ.cjs} +1 -1
  42. package/dist/{diagram-2AECGRRQ-DEOJdLIi.js → diagram-2AECGRRQ-CD5HRvtt.js} +2 -2
  43. package/dist/{diagram-5GNKFQAL-C9cD2jn6.cjs → diagram-5GNKFQAL-BGP7CKfK.cjs} +1 -1
  44. package/dist/{diagram-5GNKFQAL-DyxjjnMI.js → diagram-5GNKFQAL-hnwUnNop.js} +3 -3
  45. package/dist/{diagram-KO2AKTUF-4juRrpvB.js → diagram-KO2AKTUF-C-lTMkbh.js} +2 -2
  46. package/dist/{diagram-KO2AKTUF-Mo7XhFrv.cjs → diagram-KO2AKTUF-Cj5RbuFk.cjs} +1 -1
  47. package/dist/{diagram-LMA3HP47-CxL8EBEI.js → diagram-LMA3HP47-DNNxuzUF.js} +2 -2
  48. package/dist/{diagram-LMA3HP47-BFs_xRRv.cjs → diagram-LMA3HP47-qynJFlE9.cjs} +1 -1
  49. package/dist/{diagram-OG6HWLK6-CB1fsChK.cjs → diagram-OG6HWLK6-BEw06BpQ.cjs} +1 -1
  50. package/dist/{diagram-OG6HWLK6-BX-585Ye.js → diagram-OG6HWLK6-D-mFnPam.js} +3 -3
  51. package/dist/{erDiagram-TEJ5UH35-DC0Ho0nI.js → erDiagram-TEJ5UH35-DlHPKqjs.js} +4 -4
  52. package/dist/{erDiagram-TEJ5UH35-vPdDZRYq.cjs → erDiagram-TEJ5UH35-ihaFG4EG.cjs} +1 -1
  53. package/dist/{flowDiagram-I6XJVG4X-7BW5uO8c.js → flowDiagram-I6XJVG4X-D7D28W3h.js} +6 -6
  54. package/dist/{flowDiagram-I6XJVG4X-BiRLUlz2.cjs → flowDiagram-I6XJVG4X-Rn9cXbM4.cjs} +1 -1
  55. package/dist/{ganttDiagram-6RSMTGT7-BMrijLIp.cjs → ganttDiagram-6RSMTGT7-BpYlzTOm.cjs} +1 -1
  56. package/dist/{ganttDiagram-6RSMTGT7-Bhohg83R.js → ganttDiagram-6RSMTGT7-C3CGnJzh.js} +3 -3
  57. package/dist/{gitGraphDiagram-PVQCEYII-CwSJFsFx.js → gitGraphDiagram-PVQCEYII-CM_EMfS6.js} +3 -3
  58. package/dist/{gitGraphDiagram-PVQCEYII-Bq_8mOSi.cjs → gitGraphDiagram-PVQCEYII-DR7ogqPB.cjs} +1 -1
  59. package/dist/index-B86Di0kD.js +2820 -0
  60. package/dist/index-Mn9BkUmO.cjs +1 -0
  61. package/dist/{index-dISfYziG.cjs → index-OiJ3pN8N.cjs} +6 -6
  62. package/dist/{index-Dhd78ysx.js → index-RR6eNszd.js} +8 -8
  63. package/dist/{infoDiagram-5YYISTIA-B-PYR74F.cjs → infoDiagram-5YYISTIA-CIxPF8Ny.cjs} +1 -1
  64. package/dist/{infoDiagram-5YYISTIA-BNytnCXI.js → infoDiagram-5YYISTIA-DeiTjOtd.js} +1 -1
  65. package/dist/{ishikawaDiagram-YF4QCWOH-4OKBUv_s.cjs → ishikawaDiagram-YF4QCWOH-1xm7obKK.cjs} +1 -1
  66. package/dist/{ishikawaDiagram-YF4QCWOH-BG80wXBr.js → ishikawaDiagram-YF4QCWOH-D5sHNiN0.js} +1 -1
  67. package/dist/{journeyDiagram-JHISSGLW-g82mk2Fe.js → journeyDiagram-JHISSGLW-B7vkaR-O.js} +4 -4
  68. package/dist/{journeyDiagram-JHISSGLW-yt60VGMo.cjs → journeyDiagram-JHISSGLW-Bj3pR1r8.cjs} +1 -1
  69. package/dist/{kanban-definition-UN3LZRKU-BFH_hAyY.cjs → kanban-definition-UN3LZRKU-C2BvNLvg.cjs} +1 -1
  70. package/dist/{kanban-definition-UN3LZRKU-BmK56MSs.js → kanban-definition-UN3LZRKU-SSN_awCf.js} +2 -2
  71. package/dist/{linear-zILWiTVq.cjs → linear-BPGTGVZF.cjs} +1 -1
  72. package/dist/{linear-BpsU0HcQ.js → linear-CrtlOpJC.js} +1 -1
  73. package/dist/{mermaid.core-NivSZeQG.js → mermaid.core-BMFdNVmT.js} +35 -35
  74. package/dist/{mermaid.core-BvN-J_AM.cjs → mermaid.core-CzUM8ZFm.cjs} +3 -3
  75. package/dist/{mindmap-definition-RKZ34NQL-C3LWrNPx.cjs → mindmap-definition-RKZ34NQL-BzoMooEA.cjs} +1 -1
  76. package/dist/{mindmap-definition-RKZ34NQL-BXoEIZmG.js → mindmap-definition-RKZ34NQL-CQ_AvUYl.js} +3 -3
  77. package/dist/{pieDiagram-4H26LBE5-CN01uXEU.cjs → pieDiagram-4H26LBE5--B008aOr.cjs} +1 -1
  78. package/dist/{pieDiagram-4H26LBE5-y5XnB67r.js → pieDiagram-4H26LBE5-DZA6EYmY.js} +3 -3
  79. package/dist/{quadrantDiagram-W4KKPZXB-BdWRtxg8.cjs → quadrantDiagram-W4KKPZXB-CUgU7n5W.cjs} +1 -1
  80. package/dist/{quadrantDiagram-W4KKPZXB-DoHOsDDM.js → quadrantDiagram-W4KKPZXB-DkJ_1r5Q.js} +2 -2
  81. package/dist/{requirementDiagram-4Y6WPE33-B6ltwG99.cjs → requirementDiagram-4Y6WPE33-C9c_OdBu.cjs} +1 -1
  82. package/dist/{requirementDiagram-4Y6WPE33-BUqcv09v.js → requirementDiagram-4Y6WPE33-D-Rhgay0.js} +3 -3
  83. package/dist/{sankeyDiagram-5OEKKPKP-Dw_I3L5w.cjs → sankeyDiagram-5OEKKPKP-CjqPY4DA.cjs} +1 -1
  84. package/dist/{sankeyDiagram-5OEKKPKP-D3yaTkog.js → sankeyDiagram-5OEKKPKP-D4c7ZW3L.js} +1 -1
  85. package/dist/{sequenceDiagram-3UESZ5HK-Dlw7AYVR.js → sequenceDiagram-3UESZ5HK-BFZ_dS_o.js} +3 -3
  86. package/dist/{sequenceDiagram-3UESZ5HK-Dw-Oo3gQ.cjs → sequenceDiagram-3UESZ5HK-CvSm5Cdr.cjs} +1 -1
  87. package/dist/{stateDiagram-AJRCARHV-G5aGpm4h.js → stateDiagram-AJRCARHV-_zVtg-ny.js} +2 -2
  88. package/dist/{stateDiagram-AJRCARHV-RlkILcfR.cjs → stateDiagram-AJRCARHV-l6UNFX0d.cjs} +1 -1
  89. package/dist/{stateDiagram-v2-BHNVJYJU-B5MqneJj.cjs → stateDiagram-v2-BHNVJYJU-RSGFy9G6.cjs} +1 -1
  90. package/dist/{stateDiagram-v2-BHNVJYJU-U7btkN-c.js → stateDiagram-v2-BHNVJYJU-eyWoWwdr.js} +2 -2
  91. package/dist/{timeline-definition-PNZ67QCA-I1bAZF32.js → timeline-definition-PNZ67QCA-B9ePHeNX.js} +2 -2
  92. package/dist/{timeline-definition-PNZ67QCA-DZWO25QG.cjs → timeline-definition-PNZ67QCA-Dz0DlRBT.cjs} +1 -1
  93. package/dist/{vennDiagram-CIIHVFJN-OMVDPAYS.cjs → vennDiagram-CIIHVFJN-DB7dFqUU.cjs} +1 -1
  94. package/dist/{vennDiagram-CIIHVFJN-GqC6bKPW.js → vennDiagram-CIIHVFJN-DTMVqRLj.js} +1 -1
  95. package/dist/wandox.cjs +1 -1
  96. package/dist/wandox.css +1 -1
  97. package/dist/wandox.js +1 -1
  98. package/dist/wandox.umd.js +627 -627
  99. package/dist/{wardleyDiagram-YWT4CUSO-B_ri0S8_.js → wardleyDiagram-YWT4CUSO-CLgLoevL.js} +2 -2
  100. package/dist/{wardleyDiagram-YWT4CUSO-BS6EQ76K.cjs → wardleyDiagram-YWT4CUSO-llCStOjH.cjs} +1 -1
  101. package/dist/{xychartDiagram-2RQKCTM6-VaspgPkc.js → xychartDiagram-2RQKCTM6-B9AnuRIT.js} +2 -2
  102. package/dist/{xychartDiagram-2RQKCTM6-BIi1O5Px.cjs → xychartDiagram-2RQKCTM6-Co8C1pBL.cjs} +1 -1
  103. package/package.json +1 -1
  104. package/dist/V2Workbench-a7fIKHSI.js +0 -2352
  105. package/dist/V2Workbench-tUL0KmKo.cjs +0 -2
  106. package/dist/index-Bl0cgfIz.cjs +0 -1
  107. package/dist/index-BygO8jcH.cjs +0 -1
  108. package/dist/index-CQYJcpLn.js +0 -2520
  109. package/dist/index-RmIugmM4.js +0 -307
@@ -1,2520 +0,0 @@
1
- import { dt as r, dZ as Je, dl as Ce, b$ as C, d$ as Ie, em as et, e4 as tt, aY as ce, j as Be, e3 as Oe, aU as ot, dY as Te, e5 as De, dX as nt, dm as Le, bA as it, cr as _e, d5 as Ge, dS as q, cq as rt, e1 as at, e9 as lt, c3 as st, eg as ct, e6 as mt, e0 as dt, u as pt, en as ut, cR as ke, s as gt, ak as Ae, cp as X, dL as ft, dw as ht, ed as $t, dV as bt, bG as vt, bL as St, bQ as xt, a_ as yt, b2 as Ct } from "./index-Dhd78ysx.js";
2
- const Fe = /* @__PURE__ */ r.createContext(null), Ue = /* @__PURE__ */ r.createContext({});
3
- function Ee() {
4
- return Ee = Object.assign ? Object.assign.bind() : function(e) {
5
- for (var t = 1; t < arguments.length; t++) {
6
- var o = arguments[t];
7
- for (var i in o)
8
- Object.prototype.hasOwnProperty.call(o, i) && (e[i] = o[i]);
9
- }
10
- return e;
11
- }, Ee.apply(this, arguments);
12
- }
13
- const wt = (e) => {
14
- const {
15
- prefixCls: t,
16
- className: o,
17
- containerRef: i,
18
- ...l
19
- } = e, {
20
- panel: c
21
- } = r.useContext(Ue), s = Je(c, i);
22
- return /* @__PURE__ */ r.createElement("div", Ee({
23
- className: C(`${t}-section`, o),
24
- role: "dialog",
25
- ref: s
26
- }, Ce(e, {
27
- aria: !0
28
- }), {
29
- "aria-modal": "true"
30
- }, l));
31
- };
32
- function zt(e) {
33
- const {
34
- prefixCls: t,
35
- direction: o,
36
- className: i,
37
- style: l,
38
- maxSize: c,
39
- containerRef: s,
40
- currentSize: h,
41
- onResize: g,
42
- onResizeEnd: m,
43
- onResizeStart: a
44
- } = e, [p, f] = r.useState(!1), [d, v] = r.useState(0), [D, S] = r.useState(0), w = o === "left" || o === "right", N = Ie((I) => {
45
- I.preventDefault(), I.stopPropagation(), f(!0), v(w ? I.clientX : I.clientY);
46
- let x;
47
- if (typeof h == "number")
48
- x = h;
49
- else if (s != null && s.current) {
50
- const y = s.current.getBoundingClientRect();
51
- x = w ? y.width : y.height;
52
- }
53
- S(x), a == null || a(x);
54
- }), u = Ie((I) => {
55
- if (!p) return;
56
- let y = (w ? I.clientX : I.clientY) - d;
57
- (o === "right" || o === "bottom") && (y = -y);
58
- let E = D + y;
59
- E < 0 && (E = 0), c && E > c && (E = c), g == null || g(E);
60
- }), n = r.useCallback(() => {
61
- if (p && (f(!1), s != null && s.current)) {
62
- const I = s.current.getBoundingClientRect(), x = w ? I.width : I.height;
63
- m == null || m(x);
64
- }
65
- }, [p, s, m, w]);
66
- return r.useEffect(() => {
67
- if (p)
68
- return document.addEventListener("mousemove", u), document.addEventListener("mouseup", n), () => {
69
- document.removeEventListener("mousemove", u), document.removeEventListener("mouseup", n);
70
- };
71
- }, [p, u, n]), {
72
- dragElementProps: {
73
- className: C(`${t}-dragger`, `${t}-dragger-${o}`, {
74
- [`${t}-dragger-dragging`]: p,
75
- [`${t}-dragger-horizontal`]: w,
76
- [`${t}-dragger-vertical`]: !w
77
- }, i),
78
- style: l,
79
- onMouseDown: N
80
- },
81
- isDragging: p
82
- };
83
- }
84
- function we(e) {
85
- if (typeof e == "string") {
86
- const t = Number(e.replace(/px$/i, ""));
87
- if (parseFloat(e) === t && et(!1, "Invalid value type of `width` or `height` which should be number type instead."), !Number.isNaN(t))
88
- return t;
89
- }
90
- return e;
91
- }
92
- function It(e, t, o, i, l) {
93
- const c = i ?? l !== !1, [s] = tt(t && c, e);
94
- return ce.useEffect(() => {
95
- var h;
96
- t && o === !0 && ((h = e()) == null || h.focus({
97
- preventScroll: !0
98
- }));
99
- }, [t]), s;
100
- }
101
- function de() {
102
- return de = Object.assign ? Object.assign.bind() : function(e) {
103
- for (var t = 1; t < arguments.length; t++) {
104
- var o = arguments[t];
105
- for (var i in o)
106
- Object.prototype.hasOwnProperty.call(o, i) && (e[i] = o[i]);
107
- }
108
- return e;
109
- }, de.apply(this, arguments);
110
- }
111
- const Et = (e, t) => {
112
- const {
113
- prefixCls: o,
114
- open: i,
115
- placement: l,
116
- inline: c,
117
- push: s,
118
- forceRender: h,
119
- // Focus
120
- autoFocus: g,
121
- focusTrap: m,
122
- // classNames
123
- classNames: a,
124
- // Root
125
- rootClassName: p,
126
- rootStyle: f,
127
- zIndex: d,
128
- // Drawer
129
- className: v,
130
- id: D,
131
- style: S,
132
- motion: w,
133
- width: N,
134
- height: u,
135
- size: n,
136
- maxSize: $,
137
- children: I,
138
- // Mask
139
- mask: x,
140
- maskClosable: y,
141
- maskMotion: E,
142
- maskClassName: R,
143
- maskStyle: b,
144
- // Events
145
- afterOpenChange: L,
146
- onClose: j,
147
- onMouseEnter: O,
148
- onMouseOver: H,
149
- onMouseLeave: W,
150
- onClick: P,
151
- onKeyDown: _,
152
- onKeyUp: K,
153
- styles: T,
154
- drawerRender: Z,
155
- resizable: G,
156
- defaultSize: A
157
- } = e, k = r.useRef(null);
158
- r.useImperativeHandle(t, () => k.current);
159
- const B = It(() => k.current, i, g, m, x), [ae, te] = r.useState(!1), M = r.useContext(Fe);
160
- let U;
161
- typeof s == "boolean" ? U = s ? {} : {
162
- distance: 0
163
- } : U = s || {};
164
- const V = (U == null ? void 0 : U.distance) ?? (M == null ? void 0 : M.pushDistance) ?? 180, Q = r.useMemo(() => ({
165
- pushDistance: V,
166
- push: () => {
167
- te(!0);
168
- },
169
- pull: () => {
170
- te(!1);
171
- }
172
- }), [V]);
173
- r.useEffect(() => {
174
- var z, F;
175
- i ? (z = M == null ? void 0 : M.push) == null || z.call(M) : (F = M == null ? void 0 : M.pull) == null || F.call(M);
176
- }, [i]), r.useEffect(() => () => {
177
- var z;
178
- (z = M == null ? void 0 : M.pull) == null || z.call(M);
179
- }, []);
180
- const pe = /* @__PURE__ */ r.createElement(Be, de({
181
- key: "mask"
182
- }, E, {
183
- visible: x && i
184
- }), ({
185
- className: z,
186
- style: F
187
- }, se) => /* @__PURE__ */ r.createElement("div", {
188
- className: C(`${o}-mask`, z, a == null ? void 0 : a.mask, R),
189
- style: {
190
- ...F,
191
- ...b,
192
- ...T == null ? void 0 : T.mask
193
- },
194
- onClick: y && i ? j : void 0,
195
- ref: se
196
- })), le = typeof w == "function" ? w(l) : w, [me, ue] = r.useState(), oe = l === "left" || l === "right", ie = r.useMemo(() => we(n ?? (oe ? N : u) ?? me ?? A ?? (oe ? 378 : void 0)), [n, N, u, A, oe, me]), ne = r.useMemo(() => {
197
- const z = {};
198
- if (ae && V)
199
- switch (l) {
200
- case "top":
201
- z.transform = `translateY(${V}px)`;
202
- break;
203
- case "bottom":
204
- z.transform = `translateY(${-V}px)`;
205
- break;
206
- case "left":
207
- z.transform = `translateX(${V}px)`;
208
- break;
209
- default:
210
- z.transform = `translateX(${-V}px)`;
211
- break;
212
- }
213
- return oe ? z.width = we(ie) : z.height = we(ie), z;
214
- }, [ae, V, l, oe, ie]), ee = r.useRef(null), J = !!G, Y = typeof G == "object" && G || {}, re = Ie((z) => {
215
- var F;
216
- ue(z), (F = Y.onResize) == null || F.call(Y, z);
217
- }), {
218
- dragElementProps: fe,
219
- isDragging: he
220
- } = zt({
221
- prefixCls: `${o}-resizable`,
222
- direction: l,
223
- className: a == null ? void 0 : a.dragger,
224
- style: T == null ? void 0 : T.dragger,
225
- maxSize: $,
226
- containerRef: ee,
227
- currentSize: ie,
228
- onResize: re,
229
- onResizeStart: Y.onResizeStart,
230
- onResizeEnd: Y.onResizeEnd
231
- }), $e = {
232
- onMouseEnter: O,
233
- onMouseOver: H,
234
- onMouseLeave: W,
235
- onClick: P,
236
- onKeyDown: _,
237
- onKeyUp: K,
238
- onFocus: (z) => {
239
- B(z.target);
240
- }
241
- }, be = /* @__PURE__ */ r.createElement(Be, de({
242
- key: "panel"
243
- }, le, {
244
- visible: i,
245
- forceRender: h,
246
- onVisibleChanged: L,
247
- removeOnLeave: !1,
248
- leavedClassName: `${o}-content-wrapper-hidden`
249
- }), ({
250
- className: z,
251
- style: F
252
- }, se) => {
253
- const We = /* @__PURE__ */ r.createElement(wt, de({
254
- id: D,
255
- containerRef: se,
256
- prefixCls: o,
257
- className: C(v, a == null ? void 0 : a.section),
258
- style: {
259
- ...S,
260
- ...T == null ? void 0 : T.section
261
- }
262
- }, Ce(e, {
263
- aria: !0
264
- }), $e), I);
265
- return /* @__PURE__ */ r.createElement("div", de({
266
- ref: ee,
267
- className: C(`${o}-content-wrapper`, he && `${o}-content-wrapper-dragging`, a == null ? void 0 : a.wrapper, !he && z),
268
- style: {
269
- ...F,
270
- ...ne,
271
- ...T == null ? void 0 : T.wrapper
272
- }
273
- }, Ce(e, {
274
- data: !0
275
- })), J && /* @__PURE__ */ r.createElement("div", fe), Z ? Z(We) : We);
276
- }), ge = {
277
- ...f
278
- };
279
- return d && (ge.zIndex = d), /* @__PURE__ */ r.createElement(Fe.Provider, {
280
- value: Q
281
- }, /* @__PURE__ */ r.createElement("div", {
282
- className: C(o, `${o}-${l}`, p, {
283
- [`${o}-open`]: i,
284
- [`${o}-inline`]: c
285
- }),
286
- style: ge,
287
- tabIndex: -1,
288
- ref: k
289
- }, pe, be));
290
- }, Nt = /* @__PURE__ */ r.forwardRef(Et), Rt = (e) => {
291
- const {
292
- open: t = !1,
293
- prefixCls: o = "rc-drawer",
294
- placement: i = "right",
295
- autoFocus: l = !0,
296
- keyboard: c = !0,
297
- width: s,
298
- height: h,
299
- size: g,
300
- maxSize: m,
301
- mask: a = !0,
302
- maskClosable: p = !0,
303
- getContainer: f,
304
- forceRender: d,
305
- afterOpenChange: v,
306
- destroyOnHidden: D,
307
- onMouseEnter: S,
308
- onMouseOver: w,
309
- onMouseLeave: N,
310
- onClick: u,
311
- onKeyDown: n,
312
- onKeyUp: $,
313
- onClose: I,
314
- resizable: x,
315
- defaultSize: y,
316
- focusTriggerAfterClose: E,
317
- // Refs
318
- panelRef: R
319
- } = e, [b, L] = r.useState(!1), [j, O] = r.useState(!1);
320
- Oe(() => {
321
- O(!0);
322
- }, []);
323
- const H = j ? t : !1, W = r.useRef(null), P = r.useRef(null);
324
- Oe(() => {
325
- H && (P.current = document.activeElement);
326
- }, [H]);
327
- const _ = (A) => {
328
- var k, B;
329
- L(A), v == null || v(A), !A && E !== !1 && P.current && !((k = W.current) != null && k.contains(P.current)) && ((B = P.current) == null || B.focus({
330
- preventScroll: !0
331
- }));
332
- }, K = r.useMemo(() => ({
333
- panel: R
334
- }), [R]);
335
- if (!d && !b && !H && D)
336
- return null;
337
- const Z = {
338
- ...e,
339
- open: H,
340
- prefixCls: o,
341
- placement: i,
342
- autoFocus: l,
343
- keyboard: c,
344
- width: s,
345
- height: h,
346
- size: g,
347
- maxSize: m,
348
- defaultSize: y,
349
- mask: a,
350
- maskClosable: p,
351
- inline: f === !1,
352
- afterOpenChange: _,
353
- ref: W,
354
- resizable: x,
355
- ...{
356
- onMouseEnter: S,
357
- onMouseOver: w,
358
- onMouseLeave: N,
359
- onClick: u,
360
- onKeyDown: n,
361
- onKeyUp: $
362
- }
363
- }, G = ({
364
- top: A,
365
- event: k
366
- }) => {
367
- A && c && (k.stopPropagation(), I == null || I(k));
368
- };
369
- return /* @__PURE__ */ r.createElement(Ue.Provider, {
370
- value: K
371
- }, /* @__PURE__ */ r.createElement(ot, {
372
- open: H || d || b,
373
- autoDestroy: !1,
374
- getContainer: f,
375
- autoLock: a && (H || b),
376
- onEsc: G
377
- }, /* @__PURE__ */ r.createElement(Nt, Z)));
378
- }, Ye = (e) => {
379
- const {
380
- prefixCls: t,
381
- ariaId: o,
382
- title: i,
383
- footer: l,
384
- extra: c,
385
- closable: s,
386
- loading: h,
387
- onClose: g,
388
- headerStyle: m,
389
- bodyStyle: a,
390
- footerStyle: p,
391
- children: f,
392
- classNames: d,
393
- styles: v
394
- } = e, D = Te("drawer"), {
395
- classNames: S,
396
- styles: w,
397
- closable: N
398
- } = D, [u, n] = De([S, d], [w, v], {
399
- props: {
400
- ...e,
401
- closable: s ?? N
402
- }
403
- }), $ = r.useMemo(() => {
404
- const b = s ?? N;
405
- if (b !== !1)
406
- return typeof b == "object" && (b == null ? void 0 : b.placement) === "end" ? "end" : "start";
407
- }, [s, N]), I = r.useCallback((b) => /* @__PURE__ */ r.createElement("button", {
408
- type: "button",
409
- onClick: g,
410
- className: C(`${t}-close`, {
411
- [`${t}-close-${$}`]: $ === "end"
412
- }, u.close),
413
- style: n.close
414
- }, b), [g, t, $, u.close, n.close]), [x, y] = nt(Le(e), Le(D), {
415
- closable: !0,
416
- closeIconRender: I
417
- }), E = () => !i && !x ? null : /* @__PURE__ */ r.createElement("div", {
418
- style: {
419
- ...n.header,
420
- ...m
421
- },
422
- className: C(`${t}-header`, u.header, {
423
- [`${t}-header-close-only`]: x && !i && !c
424
- })
425
- }, /* @__PURE__ */ r.createElement("div", {
426
- className: `${t}-header-title`
427
- }, $ === "start" && y, i && /* @__PURE__ */ r.createElement("div", {
428
- className: C(`${t}-title`, u.title),
429
- style: n.title,
430
- id: o
431
- }, i)), c && /* @__PURE__ */ r.createElement("div", {
432
- className: C(`${t}-extra`, u.extra),
433
- style: n.extra
434
- }, c), $ === "end" && y), R = () => l ? /* @__PURE__ */ r.createElement("div", {
435
- className: C(`${t}-footer`, u.footer),
436
- style: {
437
- ...n.footer,
438
- ...p
439
- }
440
- }, l) : null;
441
- return /* @__PURE__ */ r.createElement(r.Fragment, null, E(), /* @__PURE__ */ r.createElement("div", {
442
- className: C(`${t}-body`, u.body),
443
- style: {
444
- ...n.body,
445
- ...a
446
- }
447
- }, h ? /* @__PURE__ */ r.createElement(it, {
448
- active: !0,
449
- title: !1,
450
- paragraph: {
451
- rows: 5
452
- },
453
- className: `${t}-body-skeleton`
454
- }) : f), R());
455
- }, Pt = (e) => {
456
- const t = "100%";
457
- return {
458
- left: `translateX(-${t})`,
459
- right: `translateX(${t})`,
460
- top: `translateY(-${t})`,
461
- bottom: `translateY(${t})`
462
- }[e];
463
- }, Ve = (e, t) => ({
464
- "&-enter, &-appear": {
465
- ...e,
466
- "&-active": t
467
- },
468
- "&-leave": {
469
- ...t,
470
- "&-active": e
471
- }
472
- }), Ke = (e, t) => ({
473
- "&-enter, &-appear, &-leave": {
474
- "&-start": {
475
- transition: "none"
476
- },
477
- "&-active": {
478
- transition: `all ${t}`
479
- }
480
- },
481
- ...Ve({
482
- opacity: e
483
- }, {
484
- opacity: 1
485
- })
486
- }), Tt = (e, t) => [Ke(0.7, t), Ve({
487
- transform: Pt(e)
488
- }, {
489
- transform: "none"
490
- })], Dt = (e) => {
491
- const {
492
- componentCls: t,
493
- motionDurationSlow: o
494
- } = e;
495
- return {
496
- [t]: {
497
- // ======================== Mask ========================
498
- [`${t}-mask-motion`]: Ke(0, o),
499
- // ======================= Panel ========================
500
- [`${t}-panel-motion`]: ["left", "right", "top", "bottom"].reduce((i, l) => ({
501
- ...i,
502
- [`&-${l}`]: Tt(l, o)
503
- }), {})
504
- }
505
- };
506
- }, Mt = (e) => {
507
- const {
508
- borderRadiusSM: t,
509
- componentCls: o,
510
- zIndexPopup: i,
511
- colorBgMask: l,
512
- colorBgElevated: c,
513
- motionDurationSlow: s,
514
- motionDurationMid: h,
515
- paddingXS: g,
516
- padding: m,
517
- paddingLG: a,
518
- fontSizeLG: p,
519
- lineHeightLG: f,
520
- lineWidth: d,
521
- lineType: v,
522
- colorSplit: D,
523
- marginXS: S,
524
- colorIcon: w,
525
- colorIconHover: N,
526
- colorBgTextHover: u,
527
- colorBgTextActive: n,
528
- colorText: $,
529
- fontWeightStrong: I,
530
- footerPaddingBlock: x,
531
- footerPaddingInline: y,
532
- draggerSize: E,
533
- calc: R
534
- } = e, b = `${o}-content-wrapper`, L = `${o}-resizable-dragger`;
535
- return {
536
- [o]: {
537
- position: "fixed",
538
- inset: 0,
539
- zIndex: i,
540
- pointerEvents: "none",
541
- color: $,
542
- "&-pure": {
543
- position: "relative",
544
- background: c,
545
- display: "flex",
546
- flexDirection: "column",
547
- pointerEvents: "auto",
548
- [`&${o}-left`]: {
549
- boxShadow: e.boxShadowDrawerLeft
550
- },
551
- [`&${o}-right`]: {
552
- boxShadow: e.boxShadowDrawerRight
553
- },
554
- [`&${o}-top`]: {
555
- boxShadow: e.boxShadowDrawerUp
556
- },
557
- [`&${o}-bottom`]: {
558
- boxShadow: e.boxShadowDrawerDown
559
- }
560
- },
561
- "&-inline": {
562
- position: "absolute"
563
- },
564
- // ====================== Mask ======================
565
- [`${o}-mask`]: {
566
- position: "absolute",
567
- inset: 0,
568
- zIndex: i,
569
- background: l,
570
- pointerEvents: "auto",
571
- [`&${o}-mask-blur`]: {
572
- backdropFilter: "blur(4px)"
573
- }
574
- },
575
- // ==================== Content =====================
576
- [b]: {
577
- position: "absolute",
578
- zIndex: i,
579
- maxWidth: "100vw",
580
- transition: `all ${s}`,
581
- "&-hidden": {
582
- display: "none"
583
- }
584
- },
585
- // Placement
586
- [`&-left > ${b}`]: {
587
- top: 0,
588
- bottom: 0,
589
- left: {
590
- _skip_check_: !0,
591
- value: 0
592
- },
593
- boxShadow: e.boxShadowDrawerLeft
594
- },
595
- [`&-right > ${b}`]: {
596
- top: 0,
597
- right: {
598
- _skip_check_: !0,
599
- value: 0
600
- },
601
- bottom: 0,
602
- boxShadow: e.boxShadowDrawerRight
603
- },
604
- [`&-top > ${b}`]: {
605
- top: 0,
606
- insetInline: 0,
607
- boxShadow: e.boxShadowDrawerUp
608
- },
609
- [`&-bottom > ${b}`]: {
610
- bottom: 0,
611
- insetInline: 0,
612
- boxShadow: e.boxShadowDrawerDown
613
- },
614
- [`${o}-section`]: {
615
- display: "flex",
616
- flexDirection: "column",
617
- width: "100%",
618
- height: "100%",
619
- overflow: "auto",
620
- background: c,
621
- pointerEvents: "auto"
622
- },
623
- // Header
624
- [`${o}-header`]: {
625
- display: "flex",
626
- flex: 0,
627
- alignItems: "center",
628
- padding: `${q(m)} ${q(a)}`,
629
- fontSize: p,
630
- lineHeight: f,
631
- borderBottom: `${q(d)} ${v} ${D}`,
632
- "&-title": {
633
- display: "flex",
634
- flex: 1,
635
- alignItems: "center",
636
- minWidth: 0,
637
- minHeight: 0
638
- }
639
- },
640
- [`${o}-extra`]: {
641
- flex: "none"
642
- },
643
- [`${o}-close`]: {
644
- display: "inline-flex",
645
- width: R(p).add(g).equal(),
646
- height: R(p).add(g).equal(),
647
- borderRadius: t,
648
- justifyContent: "center",
649
- alignItems: "center",
650
- color: w,
651
- fontWeight: I,
652
- fontSize: p,
653
- fontStyle: "normal",
654
- lineHeight: 1,
655
- textAlign: "center",
656
- textTransform: "none",
657
- textDecoration: "none",
658
- background: "transparent",
659
- border: 0,
660
- cursor: "pointer",
661
- transition: `all ${h}`,
662
- textRendering: "auto",
663
- [`&${o}-close-end`]: {
664
- marginInlineStart: S
665
- },
666
- [`&:not(${o}-close-end)`]: {
667
- marginInlineEnd: S
668
- },
669
- "&:hover": {
670
- color: N,
671
- backgroundColor: u,
672
- textDecoration: "none"
673
- },
674
- "&:active": {
675
- backgroundColor: n
676
- },
677
- ...rt(e)
678
- },
679
- [`${o}-title`]: {
680
- flex: 1,
681
- margin: 0,
682
- fontWeight: e.fontWeightStrong,
683
- fontSize: p,
684
- lineHeight: f
685
- },
686
- // Body
687
- [`${o}-body`]: {
688
- flex: 1,
689
- minWidth: 0,
690
- minHeight: 0,
691
- padding: a,
692
- overflow: "auto",
693
- [`${o}-body-skeleton`]: {
694
- width: "100%",
695
- height: "100%",
696
- display: "flex",
697
- justifyContent: "center"
698
- }
699
- },
700
- // Footer
701
- [`${o}-footer`]: {
702
- flexShrink: 0,
703
- padding: `${q(x)} ${q(y)}`,
704
- borderTop: `${q(d)} ${v} ${D}`
705
- },
706
- // ==================== Resizable ===================
707
- [L]: {
708
- position: "absolute",
709
- zIndex: 1,
710
- backgroundColor: "transparent",
711
- userSelect: "none",
712
- pointerEvents: "auto",
713
- "&:hover": {
714
- backgroundColor: e.colorPrimary,
715
- opacity: 0.2
716
- },
717
- "&-dragging": {
718
- backgroundColor: e.colorPrimary,
719
- opacity: 0.3
720
- }
721
- },
722
- [`${L}-left`]: {
723
- top: 0,
724
- bottom: 0,
725
- insetInlineEnd: 0,
726
- width: E,
727
- cursor: "col-resize"
728
- },
729
- [`${L}-right`]: {
730
- top: 0,
731
- bottom: 0,
732
- insetInlineStart: 0,
733
- width: E,
734
- cursor: "col-resize"
735
- },
736
- [`${L}-top`]: {
737
- insetInline: 0,
738
- bottom: 0,
739
- height: E,
740
- cursor: "row-resize"
741
- },
742
- [`${L}-bottom`]: {
743
- insetInline: 0,
744
- top: 0,
745
- height: E,
746
- cursor: "row-resize"
747
- },
748
- // Wrapper dragging state - disable transitions for smooth dragging
749
- [`${b}-dragging`]: {
750
- userSelect: "none",
751
- transition: "none",
752
- willChange: "width, height",
753
- [`${o}-content`]: {
754
- pointerEvents: "none"
755
- },
756
- [`${o}-section`]: {
757
- pointerEvents: "none"
758
- }
759
- },
760
- // ====================== RTL =======================
761
- "&-rtl": {
762
- direction: "rtl"
763
- }
764
- }
765
- };
766
- }, Ht = (e) => ({
767
- zIndexPopup: e.zIndexPopupBase,
768
- footerPaddingBlock: e.paddingXS,
769
- footerPaddingInline: e.padding,
770
- draggerSize: 4
771
- }), Ze = _e("Drawer", (e) => {
772
- const t = Ge(e, {});
773
- return [Mt(t), Dt(t)];
774
- }, Ht), Wt = {
775
- distance: 180
776
- }, Xe = 378, Bt = (e) => {
777
- const {
778
- rootClassName: t,
779
- size: o,
780
- defaultSize: i = Xe,
781
- height: l,
782
- width: c,
783
- mask: s,
784
- push: h = Wt,
785
- open: g,
786
- afterOpenChange: m,
787
- onClose: a,
788
- prefixCls: p,
789
- getContainer: f,
790
- panelRef: d = null,
791
- style: v,
792
- className: D,
793
- resizable: S,
794
- "aria-labelledby": w,
795
- // Focus
796
- focusable: N,
797
- // Deprecated
798
- maskStyle: u,
799
- drawerStyle: n,
800
- contentWrapperStyle: $,
801
- destroyOnClose: I,
802
- destroyOnHidden: x,
803
- ...y
804
- } = e, {
805
- placement: E
806
- } = y, R = at(), b = y.title ? R : void 0, {
807
- getPopupContainer: L,
808
- getPrefixCls: j,
809
- direction: O,
810
- className: H,
811
- style: W,
812
- classNames: P,
813
- styles: _,
814
- mask: K
815
- } = Te("drawer"), T = j("drawer", p), [Z, G] = Ze(T), A = (
816
- // 有可能为 false,所以不能直接判断
817
- f === void 0 && L ? () => L(document.body) : f
818
- ), k = r.useMemo(() => typeof o == "number" ? o : o === "large" ? 736 : o === "default" ? Xe : typeof o == "string" ? /^\d+(\.\d+)?$/.test(o) ? Number(o) : o : !E || E === "left" || E === "right" ? c : l, [o, E, c, l]), B = {
819
- motionName: ke(T, "mask-motion"),
820
- motionAppear: !0,
821
- motionEnter: !0,
822
- motionLeave: !0,
823
- motionDeadline: 500
824
- }, ae = (Y) => ({
825
- motionName: ke(T, `panel-motion-${Y}`),
826
- motionAppear: !0,
827
- motionEnter: !0,
828
- motionLeave: !0,
829
- motionDeadline: 500
830
- }), te = lt(), M = st(d, te), [U, V] = ct("Drawer", y.zIndex), [Q, pe] = mt(s, K, T), le = dt(N, A !== !1 && Q), {
831
- classNames: me,
832
- styles: ue,
833
- rootStyle: oe
834
- } = y, ie = {
835
- ...e,
836
- zIndex: U,
837
- panelRef: d,
838
- mask: Q,
839
- defaultSize: i,
840
- push: h,
841
- focusable: le
842
- }, [ne, ee] = De([P, me], [_, ue], {
843
- props: ie
844
- }), J = C({
845
- "no-mask": !Q,
846
- [`${T}-rtl`]: O === "rtl"
847
- }, t, Z, G, ne.root);
848
- return /* @__PURE__ */ r.createElement(pt, {
849
- form: !0,
850
- space: !0
851
- }, /* @__PURE__ */ r.createElement(ut.Provider, {
852
- value: V
853
- }, /* @__PURE__ */ r.createElement(Rt, {
854
- prefixCls: T,
855
- onClose: a,
856
- maskMotion: B,
857
- motion: ae,
858
- ...y,
859
- classNames: {
860
- mask: C(ne.mask, pe.mask),
861
- section: ne.section,
862
- wrapper: ne.wrapper,
863
- dragger: ne.dragger
864
- },
865
- styles: {
866
- mask: {
867
- ...ee.mask,
868
- ...u
869
- },
870
- section: {
871
- ...ee.section,
872
- ...n
873
- },
874
- wrapper: {
875
- ...ee.wrapper,
876
- ...$
877
- },
878
- dragger: ee.dragger
879
- },
880
- open: g,
881
- mask: Q,
882
- push: h,
883
- size: k,
884
- defaultSize: i,
885
- style: {
886
- ...W,
887
- ...v
888
- },
889
- rootStyle: {
890
- ...oe,
891
- ...ee.root
892
- },
893
- className: C(H, D),
894
- rootClassName: J,
895
- getContainer: A,
896
- afterOpenChange: m,
897
- panelRef: M,
898
- zIndex: U,
899
- ...S ? {
900
- resizable: S
901
- } : {},
902
- "aria-labelledby": w ?? b,
903
- destroyOnHidden: x ?? I,
904
- // Focusable
905
- focusTriggerAfterClose: le.focusTriggerAfterClose,
906
- focusTrap: le.trap
907
- }, /* @__PURE__ */ r.createElement(Ye, {
908
- prefixCls: T,
909
- size: o,
910
- ...y,
911
- ariaId: b,
912
- onClose: a
913
- }))));
914
- }, Ot = (e) => {
915
- const {
916
- prefixCls: t,
917
- style: o,
918
- className: i,
919
- placement: l = "right",
920
- ...c
921
- } = e, {
922
- getPrefixCls: s
923
- } = r.useContext(gt), h = s("drawer", t), [g, m] = Ze(h), a = C(h, `${h}-pure`, `${h}-${l}`, g, m, i);
924
- return /* @__PURE__ */ r.createElement("div", {
925
- className: a,
926
- style: o
927
- }, /* @__PURE__ */ r.createElement(Ye, {
928
- prefixCls: h,
929
- ...c
930
- }));
931
- };
932
- Bt._InternalPanelDoNotUseOrYouWillBeFired = Ot;
933
- function Lt(e) {
934
- const {
935
- prefixCls: t,
936
- className: o,
937
- style: i,
938
- status: l
939
- } = e, c = `${t}-rail`;
940
- return /* @__PURE__ */ r.createElement("div", {
941
- className: C(c, `${c}-${l}`, o),
942
- style: i
943
- });
944
- }
945
- const kt = /* @__PURE__ */ r.createContext({}), Me = /* @__PURE__ */ r.createContext(null);
946
- function Ne() {
947
- return Ne = Object.assign ? Object.assign.bind() : function(e) {
948
- for (var t = 1; t < arguments.length; t++) {
949
- var o = arguments[t];
950
- for (var i in o)
951
- Object.prototype.hasOwnProperty.call(o, i) && (e[i] = o[i]);
952
- }
953
- return e;
954
- }, Ne.apply(this, arguments);
955
- }
956
- const Qe = /* @__PURE__ */ r.createContext({}), qe = /* @__PURE__ */ r.forwardRef((e, t) => {
957
- const {
958
- className: o,
959
- style: i,
960
- children: l,
961
- ...c
962
- } = e, {
963
- prefixCls: s,
964
- classNames: h,
965
- styles: g
966
- } = r.useContext(Me), {
967
- className: m,
968
- style: a
969
- } = r.useContext(Qe), p = `${s}-item`;
970
- return /* @__PURE__ */ r.createElement("div", Ne({}, Ce(c, !1), {
971
- ref: t,
972
- className: C(`${p}-icon`, h.itemIcon, m, o),
973
- style: {
974
- ...g.itemIcon,
975
- ...a,
976
- ...i
977
- }
978
- }), l);
979
- });
980
- function Re() {
981
- return Re = Object.assign ? Object.assign.bind() : function(e) {
982
- for (var t = 1; t < arguments.length; t++) {
983
- var o = arguments[t];
984
- for (var i in o)
985
- Object.prototype.hasOwnProperty.call(o, i) && (e[i] = o[i]);
986
- }
987
- return e;
988
- }, Re.apply(this, arguments);
989
- }
990
- function ze(e) {
991
- return e != null;
992
- }
993
- function At(e) {
994
- const {
995
- // style
996
- prefixCls: t,
997
- classNames: o,
998
- styles: i,
999
- // data
1000
- data: l,
1001
- last: c,
1002
- nextStatus: s,
1003
- active: h,
1004
- index: g,
1005
- // render
1006
- itemRender: m,
1007
- iconRender: a,
1008
- itemWrapperRender: p,
1009
- // events
1010
- onClick: f
1011
- } = e, d = `${t}-item`, {
1012
- railFollowPrevStatus: v
1013
- } = r.useContext(kt), {
1014
- ItemComponent: D
1015
- } = r.useContext(Me), {
1016
- onClick: S,
1017
- title: w,
1018
- subTitle: N,
1019
- content: u,
1020
- description: n,
1021
- disabled: $,
1022
- icon: I,
1023
- status: x,
1024
- className: y,
1025
- style: E,
1026
- classNames: R = {},
1027
- styles: b = {},
1028
- ...L
1029
- } = l, j = u ?? n, O = {
1030
- item: {
1031
- ...l,
1032
- content: j
1033
- },
1034
- index: g,
1035
- active: h
1036
- }, H = !!(f || S) && !$, W = {};
1037
- H && (W.role = "button", W.tabIndex = 0, W.onClick = (k) => {
1038
- S == null || S(k), f(g);
1039
- }, W.onKeyDown = (k) => {
1040
- const {
1041
- which: B
1042
- } = k;
1043
- (B === Ae.ENTER || B === Ae.SPACE) && f(g);
1044
- });
1045
- const P = x || "wait", _ = ze(w), K = ze(N), T = C(d, `${d}-${P}`, {
1046
- [`${d}-custom`]: I,
1047
- [`${d}-active`]: h,
1048
- [`${d}-disabled`]: $ === !0,
1049
- [`${d}-empty-header`]: !_ && !K
1050
- }, y, o.item, R.root);
1051
- let Z = /* @__PURE__ */ r.createElement(qe, null);
1052
- a && (Z = a(Z, {
1053
- ...O,
1054
- components: {
1055
- Icon: qe
1056
- }
1057
- }));
1058
- const G = /* @__PURE__ */ r.createElement("div", {
1059
- className: C(`${d}-wrapper`, o.itemWrapper, R.wrapper),
1060
- style: {
1061
- ...i.itemWrapper,
1062
- ...b.wrapper
1063
- }
1064
- }, /* @__PURE__ */ r.createElement(Qe.Provider, {
1065
- value: {
1066
- className: R.icon,
1067
- style: b.icon
1068
- }
1069
- }, Z), /* @__PURE__ */ r.createElement("div", {
1070
- className: C(`${d}-section`, o.itemSection, R.section),
1071
- style: {
1072
- ...i.itemSection,
1073
- ...b.section
1074
- }
1075
- }, /* @__PURE__ */ r.createElement("div", {
1076
- className: C(`${d}-header`, o.itemHeader, R.header),
1077
- style: {
1078
- ...i.itemHeader,
1079
- ...b.header
1080
- }
1081
- }, _ && /* @__PURE__ */ r.createElement("div", {
1082
- className: C(`${d}-title`, o.itemTitle, R.title),
1083
- style: {
1084
- ...i.itemTitle,
1085
- ...b.title
1086
- }
1087
- }, w), K && /* @__PURE__ */ r.createElement("div", {
1088
- title: typeof N == "string" ? N : void 0,
1089
- className: C(`${d}-subtitle`, o.itemSubtitle, R.subtitle),
1090
- style: {
1091
- ...i.itemSubtitle,
1092
- ...b.subtitle
1093
- }
1094
- }, N), !c && /* @__PURE__ */ r.createElement(Lt, {
1095
- prefixCls: d,
1096
- className: C(o.itemRail, R.rail),
1097
- style: {
1098
- ...i.itemRail,
1099
- ...b.rail
1100
- },
1101
- status: v ? x : s
1102
- })), ze(j) && /* @__PURE__ */ r.createElement("div", {
1103
- className: C(`${d}-content`, o.itemContent, R.content),
1104
- style: {
1105
- ...i.itemContent,
1106
- ...b.content
1107
- }
1108
- }, j)));
1109
- let A = /* @__PURE__ */ r.createElement(D, Re({}, L, W, {
1110
- className: T,
1111
- style: {
1112
- ...i.item,
1113
- ...b.root,
1114
- ...E
1115
- }
1116
- }), p ? p(G) : G);
1117
- return m && (A = m(A, O) || null), A;
1118
- }
1119
- function Pe() {
1120
- return Pe = Object.assign ? Object.assign.bind() : function(e) {
1121
- for (var t = 1; t < arguments.length; t++) {
1122
- var o = arguments[t];
1123
- for (var i in o)
1124
- Object.prototype.hasOwnProperty.call(o, i) && (e[i] = o[i]);
1125
- }
1126
- return e;
1127
- }, Pe.apply(this, arguments);
1128
- }
1129
- const je = {};
1130
- function Ft(e) {
1131
- const {
1132
- // style
1133
- prefixCls: t = "rc-steps",
1134
- style: o,
1135
- className: i,
1136
- classNames: l = je,
1137
- styles: c = je,
1138
- rootClassName: s,
1139
- // layout
1140
- orientation: h,
1141
- titlePlacement: g,
1142
- components: m,
1143
- // data
1144
- status: a = "process",
1145
- current: p = 0,
1146
- initial: f = 0,
1147
- onChange: d,
1148
- items: v,
1149
- // render
1150
- iconRender: D,
1151
- itemRender: S,
1152
- itemWrapperRender: w,
1153
- ...N
1154
- } = e, u = h === "vertical", n = u ? "vertical" : "horizontal", $ = !u && g === "vertical" ? "vertical" : "horizontal", I = C(t, `${t}-${n}`, `${t}-title-${$}`, s, i, l.root), x = ce.useMemo(() => (v || []).filter(Boolean), [v]), y = ce.useMemo(() => x.map(({
1155
- status: O
1156
- }, H) => {
1157
- const W = f + H;
1158
- return O || (W === p ? a : W < p ? "finish" : "wait");
1159
- }), [x, a, p, f]), E = (O) => {
1160
- d && p !== O && d(O);
1161
- }, {
1162
- root: R = "div",
1163
- item: b = "div"
1164
- } = m || {}, L = ce.useMemo(() => ({
1165
- prefixCls: t,
1166
- classNames: l,
1167
- styles: c,
1168
- ItemComponent: b
1169
- }), [t, l, c, b]), j = (O, H) => {
1170
- const W = f + H, P = y[H], _ = y[H + 1], K = {
1171
- ...O,
1172
- status: P
1173
- };
1174
- return /* @__PURE__ */ ce.createElement(At, {
1175
- key: W,
1176
- prefixCls: t,
1177
- classNames: l,
1178
- styles: c,
1179
- data: K,
1180
- nextStatus: _,
1181
- active: W === p,
1182
- index: W,
1183
- last: x.length - 1 === H,
1184
- iconRender: D,
1185
- itemRender: S,
1186
- itemWrapperRender: w,
1187
- onClick: d && E
1188
- });
1189
- };
1190
- return /* @__PURE__ */ ce.createElement(R, Pe({
1191
- className: I,
1192
- style: {
1193
- ...o,
1194
- ...c == null ? void 0 : c.root
1195
- }
1196
- }, N), /* @__PURE__ */ ce.createElement(Me.Provider, {
1197
- value: L
1198
- }, x.map(j)));
1199
- }
1200
- const Xt = /* @__PURE__ */ r.createContext(null), qt = (e) => {
1201
- const {
1202
- prefixCls: t
1203
- } = e;
1204
- return /* @__PURE__ */ r.createElement("svg", {
1205
- className: `${t}-panel-arrow`,
1206
- viewBox: "0 0 100 100",
1207
- xmlns: "http://www.w3.org/2000/svg",
1208
- preserveAspectRatio: "none"
1209
- }, /* @__PURE__ */ r.createElement("title", null, "Arrow"), /* @__PURE__ */ r.createElement("path", {
1210
- d: "M 0 0 L 100 50 L 0 100"
1211
- }));
1212
- }, jt = (e) => {
1213
- const {
1214
- prefixCls: t,
1215
- rootPrefixCls: o,
1216
- children: i,
1217
- percent: l
1218
- } = e, c = `${t}-item-progress-icon`, s = `${c}-circle`, [, h] = X(o, "cmp-steps"), g = `calc(${h("progress-radius")} * 2 * ${Math.PI * l / 100}) 9999`;
1219
- return /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement("svg", {
1220
- className: `${c}-svg`,
1221
- viewBox: "0 0 100 100",
1222
- width: "100%",
1223
- height: "100%",
1224
- xmlns: "http://www.w3.org/2000/svg",
1225
- "aria-valuemax": 100,
1226
- "aria-valuemin": 0,
1227
- "aria-valuenow": l
1228
- }, /* @__PURE__ */ r.createElement("title", null, "Progress"), /* @__PURE__ */ r.createElement("circle", {
1229
- className: C(s, `${s}-rail`)
1230
- }), /* @__PURE__ */ r.createElement("circle", {
1231
- className: C(s, `${s}-ptg`),
1232
- strokeDasharray: g,
1233
- transform: "rotate(-90 50 50)"
1234
- })), i);
1235
- }, _t = (e) => {
1236
- const {
1237
- componentCls: t,
1238
- antCls: o
1239
- } = e, i = `${t}-item`, [l, c] = X(o, "cmp-steps");
1240
- return {
1241
- [`${t}-horizontal`]: {
1242
- [`> ${i}`]: {
1243
- flex: "1 1 auto",
1244
- minWidth: e.iconSize,
1245
- [`${i}-rail`]: {
1246
- [l("horizontal-rail-margin")]: `calc(${c("icon-size-max")} / 2 + ${c("item-wrapper-padding-top")})`,
1247
- position: "static",
1248
- marginTop: c("horizontal-rail-margin"),
1249
- width: "auto",
1250
- borderBlockStartWidth: c("rail-size"),
1251
- flex: 1,
1252
- minWidth: 0,
1253
- alignSelf: "flex-start",
1254
- transform: "translateY(-50%)"
1255
- }
1256
- }
1257
- }
1258
- };
1259
- }, Gt = (e) => {
1260
- const {
1261
- componentCls: t,
1262
- customIconFontSize: o,
1263
- motionDurationSlow: i,
1264
- iconSize: l,
1265
- lineWidth: c,
1266
- lineType: s,
1267
- antCls: h
1268
- } = e, g = `${t}-item`, [m, a] = X(h, "cmp-steps");
1269
- return {
1270
- [t]: {
1271
- [m("icon-size")]: l,
1272
- [m("icon-border-width")]: c,
1273
- [`${g}-icon`]: {
1274
- width: a("icon-size"),
1275
- height: a("icon-size"),
1276
- margin: 0,
1277
- flex: "none",
1278
- display: "flex",
1279
- alignItems: "center",
1280
- justifyContent: "center",
1281
- fontSize: e.iconFontSize,
1282
- fontFamily: e.fontFamily,
1283
- lineHeight: a("icon-size"),
1284
- textAlign: "center",
1285
- borderRadius: a("icon-size"),
1286
- border: `${a("icon-border-width")} ${s} transparent`,
1287
- transition: ["background-color", "border", "color", "inset", "transform"].map((p) => `${p} ${i}`).join(", "),
1288
- zIndex: 1
1289
- },
1290
- // ==================== Custom ====================
1291
- [`${g}-custom ${g}-icon`]: {
1292
- background: "none",
1293
- border: 0,
1294
- fontSize: o
1295
- }
1296
- }
1297
- };
1298
- }, Ut = (e) => {
1299
- const {
1300
- componentCls: t,
1301
- inlineDotSize: o,
1302
- paddingXS: i,
1303
- lineWidth: l,
1304
- antCls: c,
1305
- calc: s
1306
- } = e, h = s(i).add(l).equal(), g = `${t}-item`, [m, a] = X(c, "cmp-steps");
1307
- return {
1308
- [`${t}-inline`]: {
1309
- [m("items-offset")]: "0",
1310
- [m("item-wrapper-padding-top")]: h,
1311
- display: "inline-flex",
1312
- "&:before": {
1313
- content: '""',
1314
- flex: a("items-offset")
1315
- },
1316
- [g]: {
1317
- // ========================= Variable =========================
1318
- // Item
1319
- [m("title-vertical-row-gap")]: i,
1320
- // Icon
1321
- [m("icon-size")]: o,
1322
- [m("icon-size-active")]: o,
1323
- // Title
1324
- [m("title-font-size")]: e.fontSizeSM,
1325
- [m("title-line-height")]: e.lineHeightSM,
1326
- [m("item-title-color")]: e.colorTextSecondary,
1327
- [m("subtitle-font-size")]: e.fontSizeSM,
1328
- [m("subtitle-line-height")]: e.lineHeightSM,
1329
- [m("item-subtitle-color")]: e.colorTextQuaternary,
1330
- // Rail
1331
- [m("rail-size")]: e.lineWidth,
1332
- [m("title-horizontal-rail-gap")]: "0px",
1333
- // ========================== Styles ==========================
1334
- flex: 1,
1335
- "&-wrapper": {
1336
- paddingInline: e.paddingXXS,
1337
- marginInline: e.calc(e.marginXXS).div(2).equal(),
1338
- borderRadius: e.borderRadiusSM,
1339
- cursor: "pointer",
1340
- transition: `background-color ${e.motionDurationMid}`,
1341
- "&:hover": {
1342
- background: e.controlItemBgHover
1343
- }
1344
- },
1345
- // Icon
1346
- "&-icon": {
1347
- [`${g}-icon-dot`]: {
1348
- "&:after": {
1349
- display: "none"
1350
- }
1351
- }
1352
- },
1353
- // Header
1354
- "&-title": {
1355
- fontWeight: "normal",
1356
- whiteSpace: "nowrap"
1357
- },
1358
- "&-content": {
1359
- display: "none"
1360
- }
1361
- }
1362
- }
1363
- };
1364
- };
1365
- function Yt(e) {
1366
- return (e || "--ant-not-exist").replace(/var\((.*)\)/, "$1");
1367
- }
1368
- const He = (e, t, o) => {
1369
- const {
1370
- calc: i,
1371
- componentCls: l,
1372
- descriptionMaxWidth: c,
1373
- antCls: s
1374
- } = e, h = `${l}-item`, [, g] = X(s, "cmp-steps");
1375
- return {
1376
- [`@container style(${Yt(c)})`]: [{
1377
- // Icon
1378
- [`${h}-icon`]: {
1379
- marginInlineStart: i(c).sub(g("icon-size")).div(2).equal()
1380
- },
1381
- // >>> Rail
1382
- [`${h}-rail`]: {
1383
- width: "auto",
1384
- insetInlineStart: i(c).add(g("icon-size")).div(2).add(t).equal(),
1385
- insetInlineEnd: i(c).sub(g("icon-size")).div(2).sub(t).mul(-1).equal()
1386
- }
1387
- }, o]
1388
- };
1389
- }, Vt = (e) => {
1390
- const {
1391
- componentCls: t,
1392
- descriptionMaxWidth: o,
1393
- marginXS: i,
1394
- fontHeightLG: l,
1395
- margin: c,
1396
- paddingSM: s,
1397
- marginXXS: h,
1398
- antCls: g,
1399
- calc: m
1400
- } = e, a = `${t}-item`, [p, f] = X(g, "cmp-steps");
1401
- return {
1402
- // ====================== Shared ======================
1403
- [t]: {
1404
- // Dot Steps active icon size is 2px larger than the default icon size
1405
- [p("icon-size-max")]: `max(${f("icon-size")}, ${f("icon-size-active", f("icon-size"))})`,
1406
- // Icon
1407
- [`${a}-icon`]: {
1408
- marginBlockStart: `calc((${f("heading-height")} - ${f("icon-size")}) / 2)`
1409
- }
1410
- },
1411
- // ==================== Horizontal ====================
1412
- [`${t}-title-horizontal`]: {
1413
- [p("title-horizontal-item-margin")]: c,
1414
- [p("title-horizontal-rail-margin")]: c,
1415
- [p("title-horizontal-title-height")]: l,
1416
- [p("heading-height")]: `max(${f("icon-size")}, ${f("title-horizontal-title-height")})`,
1417
- // Horizontal only
1418
- [`&${t}-horizontal, &${t}-horizontal-alternate`]: {
1419
- [`${a}:not(:first-child)`]: {
1420
- marginInlineStart: f("title-horizontal-item-margin")
1421
- },
1422
- [`${a}:last-child`]: {
1423
- flex: "0 1 auto"
1424
- },
1425
- [`${a}-wrapper`]: {
1426
- columnGap: e.marginXS
1427
- }
1428
- },
1429
- // Vertical only
1430
- [`&${t}-vertical`]: {
1431
- [`${a}-wrapper`]: {
1432
- columnGap: e.margin
1433
- },
1434
- [`${a}-empty-header`]: {
1435
- [`${a}-header`]: {
1436
- minHeight: "auto"
1437
- },
1438
- [`${a}-content`]: {
1439
- marginTop: m(f("heading-height")).sub(e.fontHeight).div(2).equal()
1440
- }
1441
- }
1442
- },
1443
- // Shared
1444
- [`${a}-section`]: {
1445
- flex: 1,
1446
- minWidth: 0
1447
- },
1448
- [`${a}-header`]: {
1449
- minHeight: f("heading-height")
1450
- },
1451
- [`${a}-title`]: {
1452
- flex: "0 1 auto"
1453
- },
1454
- [`${a}-content`]: {
1455
- maxWidth: o
1456
- },
1457
- [`${a}-subtitle`]: {
1458
- flex: "0 9999 auto"
1459
- },
1460
- [`&${t}-horizontal ${a}-rail`]: {
1461
- [p("item-wrapper-padding-top")]: "0px",
1462
- flex: "1 1 0%",
1463
- marginInlineStart: f("title-horizontal-rail-margin")
1464
- }
1465
- },
1466
- // ===================== Vertical =====================
1467
- [`${t}-title-vertical`]: {
1468
- [p("title-vertical-row-gap")]: s,
1469
- [p("title-horizontal-rail-gap")]: h,
1470
- [p("heading-height")]: f("icon-size-max"),
1471
- [`> ${a}`]: {
1472
- flex: "1 1 0%",
1473
- [`${a}-wrapper`]: {
1474
- flexDirection: "column",
1475
- rowGap: f("title-vertical-row-gap"),
1476
- alignItems: "center"
1477
- },
1478
- // Section
1479
- [`${a}-section`]: {
1480
- alignSelf: "stretch"
1481
- },
1482
- // Header
1483
- [`${a}-header`]: {
1484
- flexDirection: "column",
1485
- alignItems: "center"
1486
- },
1487
- // >>> title & subtitle & Content
1488
- [`${a}-title, ${a}-subtitle, ${a}-content`]: {
1489
- textAlign: "center",
1490
- maxWidth: "100%"
1491
- },
1492
- [`${a}-subtitle`]: {
1493
- margin: 0
1494
- },
1495
- // >>> rail
1496
- [`${a}-rail`]: {
1497
- position: "absolute",
1498
- top: 0,
1499
- width: `calc(100% - ${f("icon-size")} - ${f("title-horizontal-rail-gap")} * 2)`,
1500
- insetInlineStart: `calc(50% + ${f("icon-size")} / 2 + ${f("title-horizontal-rail-gap")})`
1501
- }
1502
- },
1503
- // With descriptionMaxWidth
1504
- ...He(e, i, {
1505
- [`${a}:last-child`]: {
1506
- flex: "none"
1507
- },
1508
- // Icon
1509
- [`${a}-icon`]: {
1510
- alignSelf: "flex-start"
1511
- },
1512
- // Section
1513
- [`${a}-section`]: {
1514
- width: o
1515
- }
1516
- })
1517
- }
1518
- };
1519
- }, Kt = (e) => {
1520
- const {
1521
- componentCls: t,
1522
- fontSizeIcon: o,
1523
- navContentMaxWidth: i,
1524
- navArrowColor: l,
1525
- colorPrimary: c,
1526
- motionDurationSlow: s,
1527
- antCls: h,
1528
- calc: g
1529
- } = e, m = `${t}-item`, a = c, [p, f] = X(h, "cmp-steps");
1530
- return {
1531
- [`${t}${t}-navigation`]: {
1532
- // ==========================================================
1533
- // == Shared ==
1534
- // ==========================================================
1535
- // ========================== Item ==========================
1536
- [m.repeat(4)]: {
1537
- display: "flex",
1538
- justifyContent: "center",
1539
- position: "relative",
1540
- flex: 1,
1541
- marginInlineStart: 0,
1542
- [`${m}-wrapper`]: {
1543
- paddingBlock: e.paddingSM
1544
- },
1545
- // Section
1546
- [`${m}-section`]: {
1547
- maxWidth: i
1548
- },
1549
- // Rail
1550
- [`${m}-rail`]: {
1551
- display: "none"
1552
- },
1553
- // ======================== Active ========================
1554
- "&:before": {
1555
- position: "absolute",
1556
- display: "block",
1557
- backgroundColor: a,
1558
- transition: `all ${s}`,
1559
- transitionTimingFunction: "ease-out",
1560
- content: '""'
1561
- },
1562
- "&:not(:last-child):after": {
1563
- position: "absolute",
1564
- display: "block",
1565
- borderTop: `${q(e.lineWidth)} ${e.lineType} ${l}`,
1566
- borderBottom: "none",
1567
- borderInlineStart: "none",
1568
- borderInlineEnd: `${q(e.lineWidth)} ${e.lineType} ${l}`,
1569
- content: '""'
1570
- },
1571
- // Reset active item style to same as default
1572
- [`&${m}-active`]: {
1573
- [p("item-content-active-color")]: f("item-content-color"),
1574
- [p("item-icon-active-bg-color")]: f("item-icon-bg-color"),
1575
- [p("item-icon-active-border-color")]: f("item-icon-border-color"),
1576
- [p("item-icon-active-text-color")]: f("item-icon-text-color")
1577
- }
1578
- },
1579
- // ==========================================================
1580
- // == Horizontal ==
1581
- // ==========================================================
1582
- [`&${t}-horizontal`]: {
1583
- [m]: {
1584
- "&:before": {
1585
- bottom: 0,
1586
- insetInlineStart: "50%",
1587
- width: 0,
1588
- height: e.lineWidthBold
1589
- },
1590
- [`&${m}-active:before`]: {
1591
- insetInlineStart: 0,
1592
- width: "100%"
1593
- },
1594
- "&:not(:last-child):after": {
1595
- top: "50%",
1596
- insetInlineStart: g(o).div(2).mul(-1).add("100%").equal(),
1597
- width: o,
1598
- height: o,
1599
- transform: "translateY(-50%) rotate(45deg)"
1600
- }
1601
- }
1602
- },
1603
- // ==========================================================
1604
- // == Vertical ==
1605
- // ==========================================================
1606
- [`&${t}-vertical`]: {
1607
- [m.repeat(4)]: {
1608
- [`${m}-content`]: {
1609
- padding: 0
1610
- },
1611
- "&:before": {
1612
- insetInlineEnd: 0,
1613
- top: "50%",
1614
- width: e.lineWidthBold,
1615
- height: 0
1616
- },
1617
- [`&${m}-active::before`]: {
1618
- top: 0,
1619
- height: "100%"
1620
- },
1621
- "&:not(:last-child):after": {
1622
- left: {
1623
- _skip_check_: !0,
1624
- value: "50%"
1625
- },
1626
- top: "100%",
1627
- width: g(o).div(3).mul(2).equal(),
1628
- height: g(o).div(3).mul(2).equal(),
1629
- transform: "translateY(-50%) translateX(-50%) rotate(135deg)"
1630
- }
1631
- }
1632
- }
1633
- // ========================= Legacy =========================
1634
- }
1635
- };
1636
- }, Zt = (e) => {
1637
- const {
1638
- componentCls: t,
1639
- lineWidthBold: o,
1640
- borderRadius: i,
1641
- borderRadiusSM: l,
1642
- motionDurationMid: c,
1643
- paddingXS: s,
1644
- lineType: h,
1645
- paddingSM: g,
1646
- antCls: m,
1647
- calc: a
1648
- } = e, p = `${t}-item`, [f, d] = X(m, "cmp-steps"), v = `${q(o)} ${h} ${d("panel-border-color")}`;
1649
- return {
1650
- [`${t}${t}-panel`]: [
1651
- // ==========================================================
1652
- // == Clean up ==
1653
- // ==========================================================
1654
- {
1655
- // ====================== Shared ======================
1656
- [`${p}-rail`]: {
1657
- display: "none"
1658
- },
1659
- // ==================== Horizontal ====================
1660
- [`&${t}-horizontal`]: {
1661
- alignItems: "stretch",
1662
- [p]: {
1663
- flex: 1,
1664
- margin: 0
1665
- }
1666
- }
1667
- },
1668
- // ==========================================================
1669
- // == Template ==
1670
- // ==========================================================
1671
- {
1672
- "&": {
1673
- [f("panel-padding")]: g,
1674
- [f("item-border-radius")]: i,
1675
- [p]: {
1676
- // Panel background
1677
- [f("panel-bg-color")]: d("item-icon-bg-color"),
1678
- [f("panel-border-color")]: d("item-icon-border-color"),
1679
- [f("panel-active-bg-color")]: d("item-icon-active-bg-color"),
1680
- [f("panel-active-border-color")]: d("item-icon-active-border-color"),
1681
- [f("panel-title-height")]: `calc(${d("title-font-size")} * ${d("title-line-height")})`,
1682
- // Base height = padding * 2 + iconSize + contentHeight
1683
- [f("item-base-height")]: a(d("panel-padding")).mul(2).add(d("icon-size")).add(d("panel-title-height")).equal(),
1684
- [f("item-base-width")]: `calc(${d("item-base-height")} * 0.7071)`,
1685
- transition: `background-color ${c}`
1686
- }
1687
- },
1688
- // ======================= Icon =======================
1689
- [`${p}-icon`]: {
1690
- display: "none"
1691
- },
1692
- // ====================== Header ======================
1693
- [`${p}-header`]: {
1694
- minHeight: "auto"
1695
- },
1696
- // ====================== Arrow =======================
1697
- [`${t}-panel-arrow`]: {
1698
- position: "absolute",
1699
- top: a(o).mul(-1).equal(),
1700
- insetInlineStart: "100%",
1701
- zIndex: 1,
1702
- height: a(o).mul(2).add("100%").equal(),
1703
- width: d("item-base-width"),
1704
- overflow: "visible",
1705
- strokeLinecap: "round",
1706
- path: {
1707
- fill: d("panel-bg-color"),
1708
- stroke: d("panel-border-color"),
1709
- strokeWidth: o,
1710
- vectorEffect: "non-scaling-stroke",
1711
- transition: `fill ${c}`
1712
- }
1713
- },
1714
- [`${p}:last-child ${t}-panel-arrow`]: {
1715
- display: "none"
1716
- },
1717
- // ======================= Item =======================
1718
- [p]: {
1719
- padding: d("panel-padding"),
1720
- background: d("panel-bg-color"),
1721
- position: "relative",
1722
- borderBlock: v,
1723
- "&:not(:first-child)": {
1724
- paddingInlineStart: `calc(${d("panel-padding")} + ${d("item-base-width")})`
1725
- },
1726
- "&:first-child": {
1727
- borderInlineStart: v,
1728
- borderStartStartRadius: d("item-border-radius"),
1729
- borderEndStartRadius: d("item-border-radius")
1730
- },
1731
- "&:last-child": {
1732
- borderInlineEnd: v,
1733
- borderStartEndRadius: d("item-border-radius"),
1734
- borderEndEndRadius: d("item-border-radius")
1735
- },
1736
- "&-active": {
1737
- background: d("panel-active-bg-color"),
1738
- borderColor: d("panel-active-border-color"),
1739
- [`${t}-panel-arrow`]: {
1740
- path: {
1741
- fill: d("panel-active-bg-color"),
1742
- stroke: d("panel-active-border-color")
1743
- }
1744
- },
1745
- [`${p}-title, ${p}-subtitle, ${p}-content`]: {
1746
- color: d("item-icon-active-text-color")
1747
- }
1748
- }
1749
- }
1750
- },
1751
- // ==========================================================
1752
- // == Size ==
1753
- // ==========================================================
1754
- {
1755
- [`&${t}-small`]: {
1756
- [f("panel-padding")]: s,
1757
- [f("item-border-radius")]: l
1758
- }
1759
- },
1760
- // ==========================================================
1761
- // == Filled ==
1762
- // ==========================================================
1763
- {
1764
- [`&${t}-filled`]: {
1765
- [p]: {
1766
- "&:not(:first-child)": {
1767
- clipPath: `polygon(${[`${q(o)} 0`, `calc(100% + ${d("item-base-width")}) 0`, `calc(100% + ${d("item-base-width")}) 100%`, `${q(o)} 100%`, `calc(${d("item-base-width")} + ${q(o)}) 50%`].join(",")})`
1768
- }
1769
- }
1770
- }
1771
- },
1772
- // ==========================================================
1773
- // == Outlined ==
1774
- // ==========================================================
1775
- {
1776
- [`&${t}-outlined`]: {
1777
- [`${t}-panel-arrow`]: {
1778
- top: a(o).div(2).mul(-1).equal(),
1779
- height: a(o).add("100%").equal()
1780
- }
1781
- }
1782
- }
1783
- ]
1784
- };
1785
- }, Qt = (e) => {
1786
- const {
1787
- calc: t,
1788
- antCls: o,
1789
- componentCls: i,
1790
- lineWidthBold: l,
1791
- motionDurationSlow: c
1792
- } = e, s = `${i}-item`, [h, g] = X(o, "cmp-steps"), m = t(l).add(l).equal();
1793
- return {
1794
- [`${i}${i}-with-progress`]: {
1795
- [h("item-wrapper-padding-top")]: m,
1796
- [`${s}${s}-process`]: {
1797
- [`${s}-icon`]: {
1798
- position: "relative"
1799
- }
1800
- },
1801
- [`${s}-progress-icon`]: {
1802
- "&-svg": {
1803
- [h("svg-size")]: t(m).mul(2).add(g("icon-size")).equal(),
1804
- [h("icon-size-ptg-unitless")]: `calc(100 / tan(atan2(${g("svg-size")}, 1px)))`,
1805
- fontSize: g("svg-size"),
1806
- lineHeight: g("icon-size-ptg-unitless"),
1807
- position: "absolute",
1808
- inset: t(m).mul(-1).equal(),
1809
- width: "auto",
1810
- height: "auto"
1811
- },
1812
- "&-circle": {
1813
- lineHeight: g("icon-size-ptg-unitless"),
1814
- strokeWidth: t(g("icon-size-ptg-unitless")).mul(l).equal(),
1815
- [h("progress-radius")]: t(g("svg-size")).sub(l).mul(g("icon-size-ptg-unitless")).div(2).equal(),
1816
- r: g("progress-radius"),
1817
- fill: "none",
1818
- cx: 50,
1819
- cy: 50,
1820
- transition: `all ${c} ease-in-out`,
1821
- "&-rail": {
1822
- stroke: e.colorSplit
1823
- },
1824
- "&-ptg": {
1825
- stroke: e.colorPrimary
1826
- }
1827
- }
1828
- }
1829
- }
1830
- };
1831
- }, Jt = (e) => {
1832
- const {
1833
- componentCls: t,
1834
- iconSize: o,
1835
- dotSize: i,
1836
- dotCurrentSize: l,
1837
- marginXXS: c,
1838
- lineWidthBold: s,
1839
- fontSizeSM: h,
1840
- antCls: g
1841
- } = e, m = `${t}-item`, [a, p] = X(g, "cmp-steps");
1842
- return {
1843
- [`${t}${t}-dot`]: {
1844
- [a("icon-size-active")]: l,
1845
- [a("icon-size")]: i,
1846
- [a("dot-icon-size")]: i,
1847
- [a("dot-icon-border-width")]: s,
1848
- [a("rail-size")]: s,
1849
- [a("icon-border-width")]: s,
1850
- // ========================= Shared ==========================
1851
- // Icon
1852
- [`${m}-custom ${m}-icon`]: {
1853
- fontSize: h
1854
- },
1855
- [`${m}-icon`]: {
1856
- position: "relative",
1857
- "&:after": {
1858
- content: '""',
1859
- width: o,
1860
- height: o,
1861
- display: "block",
1862
- position: "absolute",
1863
- top: "50%",
1864
- left: {
1865
- _skip_check_: !0,
1866
- value: "50%"
1867
- },
1868
- transform: "translate(-50%, -50%)"
1869
- }
1870
- },
1871
- // // >>> active
1872
- [`${m}-active ${m}-icon`]: {
1873
- [a("icon-size")]: p("icon-size-active")
1874
- },
1875
- // ======================= Horizontal ========================
1876
- [`&${t}-horizontal`]: {
1877
- // With descriptionMaxWidth
1878
- [`&, &${t}-small`]: He(e, c)
1879
- }
1880
- }
1881
- };
1882
- }, eo = (e) => {
1883
- const {
1884
- componentCls: t,
1885
- lineWidthBold: o,
1886
- antCls: i
1887
- } = e, l = `${t}-item`, [, c] = X(i, "cmp-steps");
1888
- return {
1889
- [`${t}${t}-rtl`]: {
1890
- direction: "rtl",
1891
- // nav
1892
- [`&${t}-navigation${t}-horizontal`]: {
1893
- [`${l}:after`]: {
1894
- transform: "translateY(-50%) rotate(-45deg)"
1895
- }
1896
- },
1897
- // panel
1898
- [`&${t}-panel`]: {
1899
- [`${t}-panel-arrow`]: {
1900
- transform: "scaleX(-1)"
1901
- },
1902
- [`&${t}-filled`]: {
1903
- [l]: {
1904
- "&:not(:first-child)": {
1905
- clipPath: `polygon(${[`calc(0px - ${c("item-base-width")}) 0px`, `calc(100% - ${q(o)}) 0px`, `calc(100% - ${c("item-base-width")} - ${q(o)}) 50%`, `calc(100% - ${q(o)}) 100%`, `calc(0px - ${c("item-base-width")}) 100%`].join(",")})`
1906
- }
1907
- }
1908
- }
1909
- }
1910
- }
1911
- };
1912
- }, to = (e) => {
1913
- const {
1914
- componentCls: t,
1915
- iconSizeSM: o,
1916
- fontSize: i,
1917
- lineHeight: l,
1918
- marginXS: c,
1919
- fontHeight: s,
1920
- marginSM: h,
1921
- paddingXS: g,
1922
- antCls: m
1923
- } = e, [a] = X(m, "cmp-steps");
1924
- return {
1925
- [`${t}${t}-small`]: {
1926
- [a("icon-size")]: o,
1927
- [a("title-horizontal-item-margin")]: h,
1928
- [a("title-vertical-row-gap")]: g,
1929
- [a("title-font-size")]: i,
1930
- [a("title-line-height")]: l,
1931
- [a("title-horizontal-rail-margin")]: c,
1932
- [a("title-horizontal-title-height")]: s,
1933
- // Horizontal: label vertical
1934
- [`&${t}-horizontal${t}-title-vertical`]: He(e, c)
1935
- }
1936
- };
1937
- }, ve = "wait", Se = "process", xe = "finish", ye = "error", oo = (e) => {
1938
- const {
1939
- componentCls: t,
1940
- colorTextDisabled: o,
1941
- colorTextLightSolid: i,
1942
- colorPrimary: l,
1943
- colorTextLabel: c,
1944
- colorError: s,
1945
- colorErrorHover: h,
1946
- colorErrorBgFilledHover: g,
1947
- colorFillTertiary: m,
1948
- colorErrorBg: a,
1949
- colorPrimaryBgHover: p,
1950
- colorPrimaryBg: f,
1951
- colorText: d,
1952
- colorTextDescription: v,
1953
- colorBgContainer: D,
1954
- colorPrimaryHover: S,
1955
- lineType: w,
1956
- antCls: N
1957
- } = e, u = `${t}-item`, [n, $] = X(N, "cmp-steps");
1958
- return {
1959
- [t]: [{
1960
- // ========================= Variable =========================
1961
- [u]: {
1962
- // Normal
1963
- // >>> line
1964
- [n("item-solid-line-color")]: "#000",
1965
- // >>> text
1966
- [n("item-title-color")]: "#000",
1967
- [n("item-content-color")]: "#000",
1968
- [n("item-subtitle-color")]: $("item-content-color"),
1969
- // >>> icon
1970
- [n("item-icon-custom-color")]: "#000",
1971
- [n("item-icon-bg-color")]: "#000",
1972
- [n("item-icon-border-color")]: "#000",
1973
- [n("item-icon-text-color")]: "#fff",
1974
- // >>> dot
1975
- [n("item-icon-dot-color")]: "#000",
1976
- [n("item-icon-dot-bg-color")]: $("item-icon-dot-color"),
1977
- [n("item-icon-dot-border-color")]: $("item-icon-dot-color"),
1978
- // Hover
1979
- // >>> text
1980
- [n("item-text-hover-color")]: "#000",
1981
- // >>> icon
1982
- [n("item-icon-bg-hover-color")]: $("item-icon-bg-color"),
1983
- [n("item-icon-border-hover-color")]: $("item-icon-border-color"),
1984
- [n("item-icon-text-hover-color")]: $("item-icon-text-color"),
1985
- // Active
1986
- // >>> text
1987
- [n("item-content-active-color")]: $("item-content-color"),
1988
- // >>> icon
1989
- [n("item-icon-active-bg-color")]: $("item-icon-bg-color"),
1990
- [n("item-icon-active-border-color")]: $("item-icon-border-color"),
1991
- [n("item-icon-active-text-color")]: $("item-icon-text-color"),
1992
- // Status
1993
- [n("item-process-rail-line-style")]: w
1994
- },
1995
- // ========================= Template =========================
1996
- // Normal
1997
- // >>> line
1998
- [`${u}-rail`]: {
1999
- borderColor: $("item-solid-line-color")
2000
- },
2001
- // >>> icon
2002
- [`${u}-custom ${u}-icon`]: {
2003
- color: $("item-icon-custom-color")
2004
- },
2005
- // >>> text
2006
- [`${u}-title`]: {
2007
- color: $("item-title-color")
2008
- },
2009
- [`${u}-subtitle`]: {
2010
- color: $("item-subtitle-color")
2011
- },
2012
- [`${u}-content`]: {
2013
- color: $("item-content-color")
2014
- },
2015
- // Active
2016
- // >>> icon
2017
- [`${u}-active ${u}-icon`]: {
2018
- //
2019
- },
2020
- // >>> text
2021
- [`${u}-active ${u}-content`]: {
2022
- color: $("item-content-active-color")
2023
- },
2024
- // Hover
2025
- // >>> text
2026
- [`${u}[role='button']:not(${u}-active):hover`]: {
2027
- [`${u}-title, ${u}-content`]: {
2028
- color: $("item-text-hover-color")
2029
- }
2030
- },
2031
- // Not dot
2032
- [`&:not(${t}-dot)`]: {
2033
- [`${u}:not(${u}-custom)`]: {
2034
- [`${u}-icon`]: {
2035
- background: $("item-icon-bg-color"),
2036
- borderColor: $("item-icon-border-color"),
2037
- color: $("item-icon-text-color")
2038
- },
2039
- // Hover
2040
- [`&[role='button']:not(${u}-active):hover`]: {
2041
- [`${u}-icon`]: {
2042
- background: $("item-icon-bg-hover-color"),
2043
- borderColor: $("item-icon-border-hover-color"),
2044
- color: $("item-icon-text-hover-color")
2045
- }
2046
- },
2047
- // Active
2048
- [`&${u}-active`]: {
2049
- [`${u}-icon`]: {
2050
- background: $("item-icon-active-bg-color"),
2051
- borderColor: $("item-icon-active-border-color"),
2052
- color: $("item-icon-active-text-color")
2053
- }
2054
- }
2055
- }
2056
- },
2057
- // Dot
2058
- [`&${t}-dot`]: {
2059
- [`${u}-icon`]: {
2060
- background: $("item-icon-dot-bg-color"),
2061
- borderColor: $("item-icon-dot-border-color"),
2062
- color: $("item-icon-dot-color"),
2063
- [`&${u}-icon-dot-custom`]: {
2064
- background: "transparent",
2065
- border: "none"
2066
- }
2067
- }
2068
- }
2069
- }, {
2070
- // ========================== Shared ==========================
2071
- // Wait
2072
- [`${u}-${ve}`]: {
2073
- [n("item-icon-custom-color")]: o,
2074
- [n("item-title-color")]: v,
2075
- [n("item-content-color")]: v,
2076
- [n("item-content-active-color")]: d,
2077
- [n("item-text-hover-color")]: S
2078
- },
2079
- [`${u}-rail-${ve}`]: {
2080
- [n("item-solid-line-color")]: o
2081
- },
2082
- // Process
2083
- [`${u}-${Se}`]: {
2084
- [n("item-icon-custom-color")]: l,
2085
- [n("item-title-color")]: d,
2086
- [n("item-content-color")]: v,
2087
- [n("item-content-active-color")]: d,
2088
- [n("item-text-hover-color")]: S
2089
- },
2090
- [`${u}-rail-${Se}`]: {
2091
- [n("item-solid-line-color")]: l,
2092
- // Special for Timeline usage
2093
- [n("rail-line-style")]: $("item-process-rail-line-style")
2094
- },
2095
- // Finish
2096
- [`${u}-${xe}`]: {
2097
- [n("item-icon-custom-color")]: l,
2098
- [n("item-title-color")]: d,
2099
- [n("item-content-color")]: v,
2100
- [n("item-content-active-color")]: d,
2101
- [n("item-text-hover-color")]: S
2102
- },
2103
- [`${u}-rail-${xe}`]: {
2104
- [n("item-solid-line-color")]: l
2105
- },
2106
- // Error
2107
- [`${u}-${ye}`]: {
2108
- [n("item-icon-custom-color")]: s,
2109
- [n("item-title-color")]: s,
2110
- [n("item-content-color")]: s,
2111
- [n("item-content-active-color")]: s,
2112
- [n("item-text-hover-color")]: h
2113
- },
2114
- [`${u}-rail-${ye}`]: {
2115
- [n("item-solid-line-color")]: s
2116
- }
2117
- }, {
2118
- // ========================== Filled ==========================
2119
- [`&${t}-filled`]: {
2120
- [u]: {
2121
- [n("item-icon-dot-border-color")]: "transparent"
2122
- },
2123
- // Wait
2124
- [`${u}-${ve}`]: {
2125
- [n("item-icon-bg-color")]: m,
2126
- [n("item-icon-border-color")]: "transparent",
2127
- [n("item-icon-text-color")]: c,
2128
- [n("item-icon-dot-bg-color")]: o,
2129
- // Hover
2130
- [n("item-icon-bg-hover-color")]: p,
2131
- [n("item-icon-border-hover-color")]: "transparent",
2132
- [n("item-icon-text-hover-color")]: l,
2133
- // Active
2134
- [n("item-icon-active-bg-color")]: l,
2135
- [n("item-icon-active-border-color")]: "transparent",
2136
- [n("item-icon-active-text-color")]: i
2137
- },
2138
- // Finish & Process
2139
- [`${u}-${Se}, ${u}-${xe}`]: {
2140
- [n("item-icon-bg-color")]: f,
2141
- [n("item-icon-border-color")]: "transparent",
2142
- [n("item-icon-text-color")]: l,
2143
- [n("item-icon-dot-bg-color")]: l,
2144
- // Hover
2145
- [n("item-icon-bg-hover-color")]: p,
2146
- [n("item-icon-border-hover-color")]: "transparent",
2147
- [n("item-icon-text-hover-color")]: l,
2148
- // Active
2149
- [n("item-icon-active-bg-color")]: l,
2150
- [n("item-icon-active-border-color")]: "transparent",
2151
- [n("item-icon-active-text-color")]: i
2152
- },
2153
- // Error
2154
- [`${u}-${ye}`]: {
2155
- [n("item-icon-bg-color")]: a,
2156
- [n("item-icon-border-color")]: "transparent",
2157
- [n("item-icon-text-color")]: s,
2158
- [n("item-icon-dot-bg-color")]: s,
2159
- // Hover
2160
- [n("item-icon-bg-hover-color")]: g,
2161
- [n("item-icon-border-hover-color")]: "transparent",
2162
- [n("item-icon-text-hover-color")]: s,
2163
- // Active
2164
- [n("item-icon-active-bg-color")]: s,
2165
- [n("item-icon-active-border-color")]: "transparent",
2166
- [n("item-icon-active-text-color")]: i
2167
- }
2168
- }
2169
- }, {
2170
- // ========================= Outlined =========================
2171
- [`&${t}-outlined`]: {
2172
- [u]: {
2173
- [n("item-icon-dot-bg-color")]: "transparent"
2174
- },
2175
- // Wait
2176
- [`${u}-${ve}`]: {
2177
- [n("item-icon-bg-color")]: D,
2178
- [n("item-icon-border-color")]: o,
2179
- [n("item-icon-text-color")]: o,
2180
- [n("item-icon-dot-color")]: o,
2181
- // Hover
2182
- [n("item-icon-bg-hover-color")]: "transparent",
2183
- [n("item-icon-border-hover-color")]: S,
2184
- [n("item-icon-text-hover-color")]: S,
2185
- // Active
2186
- [n("item-icon-active-bg-color")]: m
2187
- },
2188
- // Finish & Process
2189
- [`${u}-${Se}, ${u}-${xe}`]: {
2190
- [n("item-icon-bg-color")]: D,
2191
- [n("item-icon-border-color")]: l,
2192
- [n("item-icon-text-color")]: l,
2193
- [n("item-icon-dot-color")]: l,
2194
- // Hover
2195
- [n("item-icon-bg-hover-color")]: "transparent",
2196
- [n("item-icon-border-hover-color")]: S,
2197
- [n("item-icon-text-hover-color")]: S,
2198
- // Active
2199
- [n("item-icon-active-bg-color")]: f
2200
- },
2201
- // Error
2202
- [`${u}-${ye}`]: {
2203
- [n("item-icon-bg-color")]: D,
2204
- [n("item-icon-border-color")]: s,
2205
- [n("item-icon-text-color")]: s,
2206
- [n("item-icon-dot-color")]: s,
2207
- // Hover
2208
- [n("item-icon-bg-hover-color")]: "transparent",
2209
- [n("item-icon-border-hover-color")]: h,
2210
- [n("item-icon-text-hover-color")]: h,
2211
- // Active
2212
- [n("item-icon-active-bg-color")]: a
2213
- }
2214
- }
2215
- }]
2216
- };
2217
- }, no = (e) => {
2218
- const {
2219
- componentCls: t,
2220
- marginXXS: o,
2221
- paddingSM: i,
2222
- controlHeight: l,
2223
- antCls: c,
2224
- calc: s
2225
- } = e, h = `${t}-item`, [g, m] = X(c, "cmp-steps");
2226
- return {
2227
- [`${t}-vertical`]: {
2228
- [g("vertical-rail-margin")]: s(o).mul(1.5).equal(),
2229
- flexDirection: "column",
2230
- alignItems: "stretch",
2231
- // Item
2232
- [`> ${h}`]: {
2233
- minHeight: s(l).mul(1.5).equal(),
2234
- paddingBottom: i,
2235
- "&:last-child": {
2236
- paddingBottom: 0
2237
- },
2238
- // Icon
2239
- [`${h}-icon`]: {
2240
- marginInlineStart: `calc((${m("icon-size-max")} - ${m("icon-size")}) / 2)`
2241
- },
2242
- // >>> Rail
2243
- [`${h}-rail`]: {
2244
- [g("rail-offset")]: s(m("heading-height")).sub(m("icon-size")).div(2).equal(),
2245
- borderInlineStartWidth: m("rail-size"),
2246
- position: "absolute",
2247
- top: s(m("icon-size")).add(m("item-wrapper-padding-top")).add(m("rail-offset")).add(m("vertical-rail-margin")).equal(),
2248
- insetInlineStart: s(m("icon-size-max")).div(2).equal(),
2249
- bottom: s(m("vertical-rail-margin")).sub(m("rail-offset")).equal(),
2250
- marginInlineStart: `calc(${m("rail-size")} / -2)`
2251
- }
2252
- }
2253
- }
2254
- };
2255
- }, io = (e) => {
2256
- const {
2257
- componentCls: t,
2258
- antCls: o
2259
- } = e, i = `${t}-item`, [l, c] = X(o, "cmp-steps");
2260
- return {
2261
- [t]: {
2262
- [l("title-font-size")]: e.fontSizeLG,
2263
- [l("title-line-height")]: e.lineHeightLG,
2264
- [l("subtitle-font-size")]: e.fontSize,
2265
- [l("subtitle-line-height")]: e.lineHeight,
2266
- [l("item-wrapper-padding-top")]: "0px",
2267
- [l("rail-size")]: e.lineWidth,
2268
- [l("rail-line-style")]: e.lineType,
2269
- ...ht(e),
2270
- display: "flex",
2271
- flexWrap: "nowrap",
2272
- alignItems: "flex-start",
2273
- [i]: {
2274
- flex: "none",
2275
- position: "relative"
2276
- },
2277
- [`${i}-wrapper`]: {
2278
- display: "flex",
2279
- flexWrap: "nowrap",
2280
- paddingTop: c("item-wrapper-padding-top")
2281
- },
2282
- // Icon
2283
- // Check `./icon.ts`
2284
- // Header
2285
- [`${i}-header`]: {
2286
- display: "flex",
2287
- flexWrap: "nowrap",
2288
- alignItems: "center"
2289
- },
2290
- // >>> Title
2291
- [`${i}-title`]: {
2292
- color: e.colorText,
2293
- fontSize: c("title-font-size"),
2294
- lineHeight: c("title-line-height"),
2295
- wordBreak: "break-word"
2296
- },
2297
- // >>> Sub Title
2298
- [`${i}-subtitle`]: {
2299
- color: e.colorTextDescription,
2300
- fontWeight: "normal",
2301
- fontSize: c("subtitle-font-size"),
2302
- lineHeight: c("subtitle-line-height"),
2303
- marginInlineStart: e.marginXS,
2304
- wordBreak: "break-word"
2305
- },
2306
- // Content
2307
- [`${i}-content`]: {
2308
- color: e.colorTextDescription,
2309
- fontSize: e.fontSize,
2310
- lineHeight: e.lineHeight,
2311
- wordBreak: "break-word"
2312
- },
2313
- // Rail
2314
- [`${i}-rail`]: {
2315
- borderStyle: c("rail-line-style"),
2316
- borderWidth: 0
2317
- },
2318
- // Motion
2319
- [`${i}-title, ${i}-subtitle, ${i}-content, ${i}-rail`]: {
2320
- transition: `all ${e.motionDurationSlow}`
2321
- },
2322
- // ========================== Ellipsis ==========================
2323
- [`&${t}-ellipsis`]: {
2324
- [`${i}-title, ${i}-subtitle, ${i}-content`]: ft
2325
- },
2326
- // ========================= Clickable ==========================
2327
- [`${i}[role='button']:not(${i}-active):hover`]: {
2328
- cursor: "pointer"
2329
- }
2330
- }
2331
- };
2332
- }, ro = (e) => ({
2333
- titleLineHeight: e.controlHeight,
2334
- customIconSize: e.controlHeight,
2335
- customIconTop: 0,
2336
- customIconFontSize: e.controlHeightSM,
2337
- iconSize: e.controlHeight,
2338
- iconTop: -0.5,
2339
- // magic for ui experience
2340
- iconFontSize: e.fontSize,
2341
- iconSizeSM: e.fontSizeHeading3,
2342
- dotSize: e.controlHeight / 4,
2343
- dotCurrentSize: e.controlHeightLG / 4,
2344
- navArrowColor: e.colorTextDisabled,
2345
- navContentMaxWidth: "unset",
2346
- descriptionMaxWidth: void 0,
2347
- // should be `undefined` to create css var
2348
- waitIconColor: e.wireframe ? e.colorTextDisabled : e.colorTextLabel,
2349
- waitIconBgColor: e.wireframe ? e.colorBgContainer : e.colorFillContent,
2350
- waitIconBorderColor: e.wireframe ? e.colorTextDisabled : "transparent",
2351
- finishIconBgColor: e.wireframe ? e.colorBgContainer : e.controlItemBgActive,
2352
- finishIconBorderColor: e.wireframe ? e.colorPrimary : e.controlItemBgActive
2353
- }), ao = _e("Steps", (e) => {
2354
- const t = Ge(e, {
2355
- inlineDotSize: 6
2356
- });
2357
- return [io(t), Gt(t), no(t), _t(t), Vt(t), to(t), Jt(t), oo(t), Kt(t), Zt(t), Ut(t), Qt(t), eo(t)];
2358
- }, ro), lo = {
2359
- itemIcon: vt
2360
- }, co = (e) => {
2361
- const {
2362
- // Style
2363
- size: t,
2364
- className: o,
2365
- rootClassName: i,
2366
- style: l,
2367
- variant: c = "filled",
2368
- type: s,
2369
- classNames: h,
2370
- styles: g,
2371
- // Layout
2372
- direction: m,
2373
- orientation: a,
2374
- responsive: p = !0,
2375
- progressDot: f,
2376
- labelPlacement: d,
2377
- titlePlacement: v,
2378
- ellipsis: D,
2379
- offset: S = 0,
2380
- // Data
2381
- items: w,
2382
- percent: N,
2383
- current: u = 0,
2384
- onChange: n,
2385
- // Render
2386
- iconRender: $,
2387
- // MISC
2388
- ...I
2389
- } = e, x = r.useContext(Xt), y = Te("steps"), {
2390
- getPrefixCls: E,
2391
- direction: R,
2392
- className: b,
2393
- style: L
2394
- } = y;
2395
- let j, O, H = {};
2396
- x ? H = {
2397
- root: x.rootComponent,
2398
- item: x.itemComponent
2399
- } : {
2400
- classNames: j,
2401
- styles: O
2402
- } = y;
2403
- const W = E(), P = E("steps", e.prefixCls), _ = `${P}-item-icon`, [K, T] = ao(P), [Z] = X(W, "cmp-steps"), G = $t(t), A = r.useMemo(() => (w || []).filter(Boolean), [w]), {
2404
- xs: k
2405
- } = bt(p), B = r.useMemo(() => s && s !== "default" ? s : f ? "dot" : s, [f, s]), ae = B === "inline", te = B === "dot" || B === "inline", M = r.useMemo(() => B === "dot" && typeof f == "function" ? f : void 0, [B, f]), U = r.useMemo(() => {
2406
- const J = a || m;
2407
- return B === "panel" ? "horizontal" : p && k || J === "vertical" ? "vertical" : "horizontal";
2408
- }, [a, m, B, p, k]), V = r.useMemo(() => te || U === "vertical" ? U === "vertical" ? "horizontal" : "vertical" : s === "navigation" ? "horizontal" : v || d || "horizontal", [te, d, U, v, s]), Q = ae ? void 0 : N, pe = {
2409
- ...e,
2410
- variant: c,
2411
- size: G,
2412
- type: B,
2413
- orientation: U,
2414
- titlePlacement: V,
2415
- current: u,
2416
- percent: Q,
2417
- responsive: p,
2418
- offset: S
2419
- }, [le, me] = De([lo, j, h], [O, g], {
2420
- props: pe
2421
- }), ue = (J, Y) => {
2422
- const {
2423
- item: re,
2424
- index: fe,
2425
- active: he,
2426
- components: {
2427
- Icon: $e
2428
- }
2429
- } = Y, {
2430
- status: be,
2431
- icon: ge
2432
- } = re;
2433
- let z = null;
2434
- if (te || ge)
2435
- z = ge;
2436
- else
2437
- switch (be) {
2438
- case "finish":
2439
- z = /* @__PURE__ */ r.createElement(Ct, {
2440
- className: `${_}-finish`
2441
- });
2442
- break;
2443
- case "error":
2444
- z = /* @__PURE__ */ r.createElement(yt, {
2445
- className: `${_}-error`
2446
- });
2447
- break;
2448
- default: {
2449
- let se = /* @__PURE__ */ r.createElement("span", {
2450
- className: `${_}-number`
2451
- }, Y.index + 1);
2452
- be === "process" && Q !== void 0 && (se = /* @__PURE__ */ r.createElement(jt, {
2453
- prefixCls: P,
2454
- rootPrefixCls: W,
2455
- percent: Q
2456
- }, se)), z = se;
2457
- }
2458
- }
2459
- let F = /* @__PURE__ */ r.createElement($e, null, z);
2460
- return $ ? F = $(F, {
2461
- index: fe,
2462
- active: he,
2463
- item: re,
2464
- components: {
2465
- Icon: $e
2466
- }
2467
- }) : typeof M == "function" && (F = M(F, {
2468
- index: fe,
2469
- ...re
2470
- })), F;
2471
- }, oe = (J, Y) => {
2472
- let re = J;
2473
- return ae && Y.item.content && (re = /* @__PURE__ */ r.createElement(St, {
2474
- destroyOnHidden: !0,
2475
- title: Y.item.content
2476
- }, J)), /* @__PURE__ */ r.createElement(xt, {
2477
- component: "Steps",
2478
- disabled: Y.item.disabled || !n,
2479
- colorSource: c === "filled" ? "color" : null
2480
- }, re);
2481
- }, ie = B === "panel" ? (J) => /* @__PURE__ */ r.createElement(r.Fragment, null, J, /* @__PURE__ */ r.createElement(qt, {
2482
- prefixCls: P
2483
- })) : void 0, ne = {
2484
- [Z("items-offset")]: `${S}`,
2485
- ...L,
2486
- ...l
2487
- }, ee = C(b, `${P}-${c}`, {
2488
- [`${P}-${B}`]: B !== "dot" ? B : !1,
2489
- [`${P}-rtl`]: R === "rtl",
2490
- [`${P}-dot`]: te,
2491
- [`${P}-ellipsis`]: D,
2492
- [`${P}-with-progress`]: Q !== void 0,
2493
- [`${P}-${G}`]: G
2494
- }, o, i, K, T);
2495
- return /* @__PURE__ */ r.createElement(Ft, {
2496
- ...I,
2497
- // Style
2498
- prefixCls: P,
2499
- className: ee,
2500
- style: ne,
2501
- classNames: le,
2502
- styles: me,
2503
- // Layout
2504
- orientation: U,
2505
- titlePlacement: V,
2506
- components: H,
2507
- // Data
2508
- current: u,
2509
- items: A,
2510
- onChange: n,
2511
- // Render
2512
- iconRender: ue,
2513
- itemRender: oe,
2514
- itemWrapperRender: ie
2515
- });
2516
- };
2517
- export {
2518
- Bt as D,
2519
- co as S
2520
- };