index11.js 56 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068
  1. import { bo as T, bp as q, e as he, f as J, bn as Z, bm as z, h as M, cv as Q, d as f, _ as P, i as j, y as oe, g as re, m as se, r as le, cw as Se, u as ae, bd as ve, bU as ce, bf as be, cx as de, b as Ce, c as B, o as pe, P as x, cy as ye, bb as Ie, F as xe, t as we, cz as Pe, cA as De, l as Te } from "./index2.js";
  2. import { defineComponent as O, computed as v, createVNode as p, Fragment as ue, ref as ge, onUpdated as We } from "vue";
  3. import { u as ze } from "./useRefs.js";
  4. const Oe = ["normal", "exception", "active", "success"], F = () => ({
  5. prefixCls: String,
  6. type: T(),
  7. percent: Number,
  8. format: z(),
  9. status: T(),
  10. showInfo: Z(),
  11. strokeWidth: Number,
  12. strokeLinecap: T(),
  13. strokeColor: J(),
  14. trailColor: String,
  15. /** @deprecated Use `size` instead */
  16. width: Number,
  17. success: he(),
  18. gapDegree: Number,
  19. gapPosition: T(),
  20. size: q([String, Number, Array]),
  21. steps: Number,
  22. /** @deprecated Use `success` instead */
  23. successPercent: Number,
  24. title: String,
  25. progressStatus: T()
  26. });
  27. function X(e) {
  28. return !e || e < 0 ? 0 : e > 100 ? 100 : e;
  29. }
  30. function L(e) {
  31. let {
  32. success: t,
  33. successPercent: i
  34. } = e, n = i;
  35. return t && "progress" in t && (M(!1, "Progress", "`success.progress` is deprecated. Please use `success.percent` instead."), n = t.progress), t && "percent" in t && (n = t.percent), n;
  36. }
  37. function Xe(e) {
  38. let {
  39. percent: t,
  40. success: i,
  41. successPercent: n
  42. } = e;
  43. const o = X(L({
  44. success: i,
  45. successPercent: n
  46. }));
  47. return [o, X(X(t) - o)];
  48. }
  49. function _e(e) {
  50. let {
  51. success: t = {},
  52. strokeColor: i
  53. } = e;
  54. const {
  55. strokeColor: n
  56. } = t;
  57. return [n || Q.green, i || null];
  58. }
  59. const G = (e, t, i) => {
  60. var n, o, s, c;
  61. let l = -1, r = -1;
  62. if (t === "step") {
  63. const u = i.steps, m = i.strokeWidth;
  64. typeof e == "string" || typeof e == "undefined" ? (l = e === "small" ? 2 : 14, r = m != null ? m : 8) : typeof e == "number" ? [l, r] = [e, e] : [l = 14, r = 8] = e, l *= u;
  65. } else if (t === "line") {
  66. const u = i == null ? void 0 : i.strokeWidth;
  67. typeof e == "string" || typeof e == "undefined" ? r = u || (e === "small" ? 6 : 8) : typeof e == "number" ? [l, r] = [e, e] : [l = -1, r = 8] = e;
  68. } else (t === "circle" || t === "dashboard") && (typeof e == "string" || typeof e == "undefined" ? [l, r] = e === "small" ? [60, 60] : [120, 120] : typeof e == "number" ? [l, r] = [e, e] : (process.env.NODE_ENV !== "production" && M(!1, "Progress", 'Type "circle" and "dashboard" do not accept array as `size`, please use number or preset size instead.'), l = (o = (n = e[0]) !== null && n !== void 0 ? n : e[1]) !== null && o !== void 0 ? o : 120, r = (c = (s = e[0]) !== null && s !== void 0 ? s : e[1]) !== null && c !== void 0 ? c : 120));
  69. return {
  70. width: l,
  71. height: r
  72. };
  73. };
  74. var Ne = function(e, t) {
  75. var i = {};
  76. for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (i[n] = e[n]);
  77. if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var o = 0, n = Object.getOwnPropertySymbols(e); o < n.length; o++)
  78. t.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[o]) && (i[n[o]] = e[n[o]]);
  79. return i;
  80. };
  81. const Ee = () => f(f({}, F()), {
  82. strokeColor: J(),
  83. direction: T()
  84. }), He = (e) => {
  85. let t = [];
  86. return Object.keys(e).forEach((i) => {
  87. const n = parseFloat(i.replace(/%/g, ""));
  88. isNaN(n) || t.push({
  89. key: n,
  90. value: e[i]
  91. });
  92. }), t = t.sort((i, n) => i.key - n.key), t.map((i) => {
  93. let {
  94. key: n,
  95. value: o
  96. } = i;
  97. return `${o} ${n}%`;
  98. }).join(", ");
  99. }, Me = (e, t) => {
  100. const {
  101. from: i = Q.blue,
  102. to: n = Q.blue,
  103. direction: o = t === "rtl" ? "to left" : "to right"
  104. } = e, s = Ne(e, ["from", "to", "direction"]);
  105. if (Object.keys(s).length !== 0) {
  106. const c = He(s);
  107. return {
  108. backgroundImage: `linear-gradient(${o}, ${c})`
  109. };
  110. }
  111. return {
  112. backgroundImage: `linear-gradient(${o}, ${i}, ${n})`
  113. };
  114. }, Ae = O({
  115. compatConfig: {
  116. MODE: 3
  117. },
  118. name: "ProgressLine",
  119. inheritAttrs: !1,
  120. props: Ee(),
  121. setup(e, t) {
  122. let {
  123. slots: i,
  124. attrs: n
  125. } = t;
  126. const o = v(() => {
  127. const {
  128. strokeColor: d,
  129. direction: $
  130. } = e;
  131. return d && typeof d != "string" ? Me(d, $) : {
  132. backgroundColor: d
  133. };
  134. }), s = v(() => e.strokeLinecap === "square" || e.strokeLinecap === "butt" ? 0 : void 0), c = v(() => e.trailColor ? {
  135. backgroundColor: e.trailColor
  136. } : void 0), l = v(() => {
  137. var d;
  138. return (d = e.size) !== null && d !== void 0 ? d : [-1, e.strokeWidth || (e.size === "small" ? 6 : 8)];
  139. }), r = v(() => G(l.value, "line", {
  140. strokeWidth: e.strokeWidth
  141. }));
  142. process.env.NODE_ENV !== "production" && M("strokeWidth" in e, "Progress", "`strokeWidth` is deprecated. Please use `size` instead.");
  143. const u = v(() => {
  144. const {
  145. percent: d
  146. } = e;
  147. return f({
  148. width: `${X(d)}%`,
  149. height: `${r.value.height}px`,
  150. borderRadius: s.value
  151. }, o.value);
  152. }), m = v(() => L(e)), g = v(() => {
  153. const {
  154. success: d
  155. } = e;
  156. return {
  157. width: `${X(m.value)}%`,
  158. height: `${r.value.height}px`,
  159. borderRadius: s.value,
  160. backgroundColor: d == null ? void 0 : d.strokeColor
  161. };
  162. }), S = {
  163. width: r.value.width < 0 ? "100%" : r.value.width,
  164. height: `${r.value.height}px`
  165. };
  166. return () => {
  167. var d;
  168. return p(ue, null, [p("div", P(P({}, n), {}, {
  169. class: [`${e.prefixCls}-outer`, n.class],
  170. style: [n.style, S]
  171. }), [p("div", {
  172. class: `${e.prefixCls}-inner`,
  173. style: c.value
  174. }, [p("div", {
  175. class: `${e.prefixCls}-bg`,
  176. style: u.value
  177. }, null), m.value !== void 0 ? p("div", {
  178. class: `${e.prefixCls}-success-bg`,
  179. style: g.value
  180. }, null) : null])]), (d = i.default) === null || d === void 0 ? void 0 : d.call(i)]);
  181. };
  182. }
  183. }), Re = {
  184. percent: 0,
  185. prefixCls: "vc-progress",
  186. strokeColor: "#2db7f5",
  187. strokeLinecap: "round",
  188. strokeWidth: 1,
  189. trailColor: "#D9D9D9",
  190. trailWidth: 1
  191. }, Be = (e) => {
  192. const t = ge(null);
  193. return We(() => {
  194. const i = Date.now();
  195. let n = !1;
  196. e.value.forEach((o) => {
  197. const s = (o == null ? void 0 : o.$el) || o;
  198. if (!s)
  199. return;
  200. n = !0;
  201. const c = s.style;
  202. c.transitionDuration = ".3s, .3s, .3s, .06s", t.value && i - t.value < 100 && (c.transitionDuration = "0s, 0s");
  203. }), n && (t.value = Date.now());
  204. }), e;
  205. }, Le = {
  206. gapDegree: Number,
  207. gapPosition: {
  208. type: String
  209. },
  210. percent: {
  211. type: [Array, Number]
  212. },
  213. prefixCls: String,
  214. strokeColor: {
  215. type: [Object, String, Array]
  216. },
  217. strokeLinecap: {
  218. type: String
  219. },
  220. strokeWidth: Number,
  221. trailColor: String,
  222. trailWidth: Number,
  223. transition: String
  224. };
  225. var je = function(e, t) {
  226. var i = {};
  227. for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (i[n] = e[n]);
  228. if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var o = 0, n = Object.getOwnPropertySymbols(e); o < n.length; o++)
  229. t.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[o]) && (i[n[o]] = e[n[o]]);
  230. return i;
  231. };
  232. let k = 0;
  233. function ee(e) {
  234. return +e.replace("%", "");
  235. }
  236. function te(e) {
  237. return Array.isArray(e) ? e : [e];
  238. }
  239. function ie(e, t, i, n) {
  240. let o = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : 0, s = arguments.length > 5 ? arguments[5] : void 0;
  241. const c = 50 - n / 2;
  242. let l = 0, r = -c, u = 0, m = -2 * c;
  243. switch (s) {
  244. case "left":
  245. l = -c, r = 0, u = 2 * c, m = 0;
  246. break;
  247. case "right":
  248. l = c, r = 0, u = -2 * c, m = 0;
  249. break;
  250. case "bottom":
  251. r = c, m = 2 * c;
  252. break;
  253. }
  254. const g = `M 50,50 m ${l},${r}
  255. a ${c},${c} 0 1 1 ${u},${-m}
  256. a ${c},${c} 0 1 1 ${-u},${m}`, S = Math.PI * 2 * c, d = {
  257. stroke: i,
  258. strokeDasharray: `${t / 100 * (S - o)}px ${S}px`,
  259. strokeDashoffset: `-${o / 2 + e / 100 * (S - o)}px`,
  260. transition: "stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s"
  261. // eslint-disable-line
  262. };
  263. return {
  264. pathString: g,
  265. pathStyle: d
  266. };
  267. }
  268. const Fe = O({
  269. compatConfig: {
  270. MODE: 3
  271. },
  272. name: "VCCircle",
  273. props: j(Le, Re),
  274. setup(e) {
  275. k += 1;
  276. const t = ge(k), i = v(() => te(e.percent)), n = v(() => te(e.strokeColor)), [o, s] = ze();
  277. Be(s);
  278. const c = () => {
  279. const {
  280. prefixCls: l,
  281. strokeWidth: r,
  282. strokeLinecap: u,
  283. gapDegree: m,
  284. gapPosition: g
  285. } = e;
  286. let S = 0;
  287. return i.value.map((d, $) => {
  288. const a = n.value[$] || n.value[n.value.length - 1], C = Object.prototype.toString.call(a) === "[object Object]" ? `url(#${l}-gradient-${t.value})` : "", {
  289. pathString: I,
  290. pathStyle: b
  291. } = ie(S, d, a, r, m, g);
  292. S += d;
  293. const y = {
  294. key: $,
  295. d: I,
  296. stroke: C,
  297. "stroke-linecap": u,
  298. "stroke-width": r,
  299. opacity: d === 0 ? 0 : 1,
  300. "fill-opacity": "0",
  301. class: `${l}-circle-path`,
  302. style: b
  303. };
  304. return p("path", P({
  305. ref: o($)
  306. }, y), null);
  307. });
  308. };
  309. return () => {
  310. const {
  311. prefixCls: l,
  312. strokeWidth: r,
  313. trailWidth: u,
  314. gapDegree: m,
  315. gapPosition: g,
  316. trailColor: S,
  317. strokeLinecap: d,
  318. strokeColor: $
  319. } = e, a = je(e, ["prefixCls", "strokeWidth", "trailWidth", "gapDegree", "gapPosition", "trailColor", "strokeLinecap", "strokeColor"]), {
  320. pathString: C,
  321. pathStyle: I
  322. } = ie(0, 100, S, r, m, g);
  323. delete a.percent;
  324. const b = n.value.find((h) => Object.prototype.toString.call(h) === "[object Object]"), y = {
  325. d: C,
  326. stroke: S,
  327. "stroke-linecap": d,
  328. "stroke-width": u || r,
  329. "fill-opacity": "0",
  330. class: `${l}-circle-trail`,
  331. style: I
  332. };
  333. return p("svg", P({
  334. class: `${l}-circle`,
  335. viewBox: "0 0 100 100"
  336. }, a), [b && p("defs", null, [p("linearGradient", {
  337. id: `${l}-gradient-${t.value}`,
  338. x1: "100%",
  339. y1: "0%",
  340. x2: "0%",
  341. y2: "0%"
  342. }, [Object.keys(b).sort((h, w) => ee(h) - ee(w)).map((h, w) => p("stop", {
  343. key: w,
  344. offset: h,
  345. "stop-color": b[h]
  346. }, null))])]), p("path", y, null), c().reverse()]);
  347. };
  348. }
  349. }), Ge = () => f(f({}, F()), {
  350. strokeColor: J()
  351. }), Ke = 3, Ve = (e) => Ke / e * 100, Ye = O({
  352. compatConfig: {
  353. MODE: 3
  354. },
  355. name: "ProgressCircle",
  356. inheritAttrs: !1,
  357. props: j(Ge(), {
  358. trailColor: null
  359. }),
  360. setup(e, t) {
  361. let {
  362. slots: i,
  363. attrs: n
  364. } = t;
  365. const o = v(() => {
  366. var a;
  367. return (a = e.width) !== null && a !== void 0 ? a : 120;
  368. }), s = v(() => {
  369. var a;
  370. return (a = e.size) !== null && a !== void 0 ? a : [o.value, o.value];
  371. }), c = v(() => G(s.value, "circle")), l = v(() => {
  372. if (e.gapDegree || e.gapDegree === 0)
  373. return e.gapDegree;
  374. if (e.type === "dashboard")
  375. return 75;
  376. }), r = v(() => ({
  377. width: `${c.value.width}px`,
  378. height: `${c.value.height}px`,
  379. fontSize: `${c.value.width * 0.15 + 6}px`
  380. })), u = v(() => {
  381. var a;
  382. return (a = e.strokeWidth) !== null && a !== void 0 ? a : Math.max(Ve(c.value.width), 6);
  383. }), m = v(() => e.gapPosition || e.type === "dashboard" && "bottom" || void 0), g = v(() => Xe(e)), S = v(() => Object.prototype.toString.call(e.strokeColor) === "[object Object]"), d = v(() => _e({
  384. success: e.success,
  385. strokeColor: e.strokeColor
  386. })), $ = v(() => ({
  387. [`${e.prefixCls}-inner`]: !0,
  388. [`${e.prefixCls}-circle-gradient`]: S.value
  389. }));
  390. return () => {
  391. var a;
  392. const C = p(Fe, {
  393. percent: g.value,
  394. strokeWidth: u.value,
  395. trailWidth: u.value,
  396. strokeColor: d.value,
  397. strokeLinecap: e.strokeLinecap,
  398. trailColor: e.trailColor,
  399. prefixCls: e.prefixCls,
  400. gapDegree: l.value,
  401. gapPosition: m.value
  402. }, null);
  403. return p("div", P(P({}, n), {}, {
  404. class: [$.value, n.class],
  405. style: [n.style, r.value]
  406. }), [c.value.width <= 20 ? p(oe, null, {
  407. default: () => [p("span", null, [C])],
  408. title: i.default
  409. }) : p(ue, null, [C, (a = i.default) === null || a === void 0 ? void 0 : a.call(i)])]);
  410. };
  411. }
  412. }), Ue = () => f(f({}, F()), {
  413. steps: Number,
  414. strokeColor: q(),
  415. trailColor: String
  416. }), Qe = O({
  417. compatConfig: {
  418. MODE: 3
  419. },
  420. name: "Steps",
  421. props: Ue(),
  422. setup(e, t) {
  423. let {
  424. slots: i
  425. } = t;
  426. const n = v(() => Math.round(e.steps * ((e.percent || 0) / 100))), o = v(() => {
  427. var l;
  428. return (l = e.size) !== null && l !== void 0 ? l : [e.size === "small" ? 2 : 14, e.strokeWidth || 8];
  429. }), s = v(() => G(o.value, "step", {
  430. steps: e.steps,
  431. strokeWidth: e.strokeWidth || 8
  432. })), c = v(() => {
  433. const {
  434. steps: l,
  435. strokeColor: r,
  436. trailColor: u,
  437. prefixCls: m
  438. } = e, g = [];
  439. for (let S = 0; S < l; S += 1) {
  440. const d = Array.isArray(r) ? r[S] : r, $ = {
  441. [`${m}-steps-item`]: !0,
  442. [`${m}-steps-item-active`]: S <= n.value - 1
  443. };
  444. g.push(p("div", {
  445. key: S,
  446. class: $,
  447. style: {
  448. backgroundColor: S <= n.value - 1 ? d : u,
  449. width: `${s.value.width / l}px`,
  450. height: `${s.value.height}px`
  451. }
  452. }, null));
  453. }
  454. return g;
  455. });
  456. return () => {
  457. var l;
  458. return p("div", {
  459. class: `${e.prefixCls}-steps-outer`
  460. }, [c.value, (l = i.default) === null || l === void 0 ? void 0 : l.call(i)]);
  461. };
  462. }
  463. }), qe = new Se("antProgressActive", {
  464. "0%": {
  465. transform: "translateX(-100%) scaleX(0)",
  466. opacity: 0.1
  467. },
  468. "20%": {
  469. transform: "translateX(-100%) scaleX(0)",
  470. opacity: 0.5
  471. },
  472. to: {
  473. transform: "translateX(0) scaleX(1)",
  474. opacity: 0
  475. }
  476. }), Je = (e) => {
  477. const {
  478. componentCls: t,
  479. iconCls: i
  480. } = e;
  481. return {
  482. [t]: f(f({}, le(e)), {
  483. display: "inline-block",
  484. "&-rtl": {
  485. direction: "rtl"
  486. },
  487. "&-line": {
  488. position: "relative",
  489. width: "100%",
  490. fontSize: e.fontSize,
  491. marginInlineEnd: e.marginXS,
  492. marginBottom: e.marginXS
  493. },
  494. [`${t}-outer`]: {
  495. display: "inline-block",
  496. width: "100%"
  497. },
  498. [`&${t}-show-info`]: {
  499. [`${t}-outer`]: {
  500. marginInlineEnd: `calc(-2em - ${e.marginXS}px)`,
  501. paddingInlineEnd: `calc(2em + ${e.paddingXS}px)`
  502. }
  503. },
  504. [`${t}-inner`]: {
  505. position: "relative",
  506. display: "inline-block",
  507. width: "100%",
  508. overflow: "hidden",
  509. verticalAlign: "middle",
  510. backgroundColor: e.progressRemainingColor,
  511. borderRadius: e.progressLineRadius
  512. },
  513. [`${t}-inner:not(${t}-circle-gradient)`]: {
  514. [`${t}-circle-path`]: {
  515. stroke: e.colorInfo
  516. }
  517. },
  518. [`${t}-success-bg, ${t}-bg`]: {
  519. position: "relative",
  520. backgroundColor: e.colorInfo,
  521. borderRadius: e.progressLineRadius,
  522. transition: `all ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`
  523. },
  524. [`${t}-success-bg`]: {
  525. position: "absolute",
  526. insetBlockStart: 0,
  527. insetInlineStart: 0,
  528. backgroundColor: e.colorSuccess
  529. },
  530. [`${t}-text`]: {
  531. display: "inline-block",
  532. width: "2em",
  533. marginInlineStart: e.marginXS,
  534. color: e.progressInfoTextColor,
  535. lineHeight: 1,
  536. whiteSpace: "nowrap",
  537. textAlign: "start",
  538. verticalAlign: "middle",
  539. wordBreak: "normal",
  540. [i]: {
  541. fontSize: e.fontSize
  542. }
  543. },
  544. [`&${t}-status-active`]: {
  545. [`${t}-bg::before`]: {
  546. position: "absolute",
  547. inset: 0,
  548. backgroundColor: e.colorBgContainer,
  549. borderRadius: e.progressLineRadius,
  550. opacity: 0,
  551. animationName: qe,
  552. animationDuration: e.progressActiveMotionDuration,
  553. animationTimingFunction: e.motionEaseOutQuint,
  554. animationIterationCount: "infinite",
  555. content: '""'
  556. }
  557. },
  558. [`&${t}-status-exception`]: {
  559. [`${t}-bg`]: {
  560. backgroundColor: e.colorError
  561. },
  562. [`${t}-text`]: {
  563. color: e.colorError
  564. }
  565. },
  566. [`&${t}-status-exception ${t}-inner:not(${t}-circle-gradient)`]: {
  567. [`${t}-circle-path`]: {
  568. stroke: e.colorError
  569. }
  570. },
  571. [`&${t}-status-success`]: {
  572. [`${t}-bg`]: {
  573. backgroundColor: e.colorSuccess
  574. },
  575. [`${t}-text`]: {
  576. color: e.colorSuccess
  577. }
  578. },
  579. [`&${t}-status-success ${t}-inner:not(${t}-circle-gradient)`]: {
  580. [`${t}-circle-path`]: {
  581. stroke: e.colorSuccess
  582. }
  583. }
  584. })
  585. };
  586. }, Ze = (e) => {
  587. const {
  588. componentCls: t,
  589. iconCls: i
  590. } = e;
  591. return {
  592. [t]: {
  593. [`${t}-circle-trail`]: {
  594. stroke: e.progressRemainingColor
  595. },
  596. [`&${t}-circle ${t}-inner`]: {
  597. position: "relative",
  598. lineHeight: 1,
  599. backgroundColor: "transparent"
  600. },
  601. [`&${t}-circle ${t}-text`]: {
  602. position: "absolute",
  603. insetBlockStart: "50%",
  604. insetInlineStart: 0,
  605. width: "100%",
  606. margin: 0,
  607. padding: 0,
  608. color: e.colorText,
  609. lineHeight: 1,
  610. whiteSpace: "normal",
  611. textAlign: "center",
  612. transform: "translateY(-50%)",
  613. [i]: {
  614. fontSize: `${e.fontSize / e.fontSizeSM}em`
  615. }
  616. },
  617. [`${t}-circle&-status-exception`]: {
  618. [`${t}-text`]: {
  619. color: e.colorError
  620. }
  621. },
  622. [`${t}-circle&-status-success`]: {
  623. [`${t}-text`]: {
  624. color: e.colorSuccess
  625. }
  626. }
  627. },
  628. [`${t}-inline-circle`]: {
  629. lineHeight: 1,
  630. [`${t}-inner`]: {
  631. verticalAlign: "bottom"
  632. }
  633. }
  634. };
  635. }, ke = (e) => {
  636. const {
  637. componentCls: t
  638. } = e;
  639. return {
  640. [t]: {
  641. [`${t}-steps`]: {
  642. display: "inline-block",
  643. "&-outer": {
  644. display: "flex",
  645. flexDirection: "row",
  646. alignItems: "center"
  647. },
  648. "&-item": {
  649. flexShrink: 0,
  650. minWidth: e.progressStepMinWidth,
  651. marginInlineEnd: e.progressStepMarginInlineEnd,
  652. backgroundColor: e.progressRemainingColor,
  653. transition: `all ${e.motionDurationSlow}`,
  654. "&-active": {
  655. backgroundColor: e.colorInfo
  656. }
  657. }
  658. }
  659. }
  660. };
  661. }, et = (e) => {
  662. const {
  663. componentCls: t,
  664. iconCls: i
  665. } = e;
  666. return {
  667. [t]: {
  668. [`${t}-small&-line, ${t}-small&-line ${t}-text ${i}`]: {
  669. fontSize: e.fontSizeSM
  670. }
  671. }
  672. };
  673. }, tt = re("Progress", (e) => {
  674. const t = e.marginXXS / 2, i = se(e, {
  675. progressLineRadius: 100,
  676. progressInfoTextColor: e.colorText,
  677. progressDefaultColor: e.colorInfo,
  678. progressRemainingColor: e.colorFillSecondary,
  679. progressStepMarginInlineEnd: t,
  680. progressStepMinWidth: t,
  681. progressActiveMotionDuration: "2.4s"
  682. });
  683. return [Je(i), Ze(i), ke(i), et(i)];
  684. });
  685. var it = function(e, t) {
  686. var i = {};
  687. for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (i[n] = e[n]);
  688. if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var o = 0, n = Object.getOwnPropertySymbols(e); o < n.length; o++)
  689. t.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[o]) && (i[n[o]] = e[n[o]]);
  690. return i;
  691. };
  692. const nt = O({
  693. compatConfig: {
  694. MODE: 3
  695. },
  696. name: "AProgress",
  697. inheritAttrs: !1,
  698. props: j(F(), {
  699. type: "line",
  700. percent: 0,
  701. showInfo: !0,
  702. // null for different theme definition
  703. trailColor: null,
  704. size: "default",
  705. strokeLinecap: "round"
  706. }),
  707. slots: Object,
  708. setup(e, t) {
  709. let {
  710. slots: i,
  711. attrs: n
  712. } = t;
  713. const {
  714. prefixCls: o,
  715. direction: s
  716. } = ae("progress", e), [c, l] = tt(o);
  717. process.env.NODE_ENV !== "production" && (M("successPercent" in e, "Progress", "`successPercent` is deprecated. Please use `success.percent` instead."), M("width" in e, "Progress", "`width` is deprecated. Please use `size` instead."));
  718. const r = v(() => Array.isArray(e.strokeColor) ? e.strokeColor[0] : e.strokeColor), u = v(() => {
  719. const {
  720. percent: $ = 0
  721. } = e, a = L(e);
  722. return parseInt(a !== void 0 ? a.toString() : $.toString(), 10);
  723. }), m = v(() => {
  724. const {
  725. status: $
  726. } = e;
  727. return !Oe.includes($) && u.value >= 100 ? "success" : $ || "normal";
  728. }), g = v(() => {
  729. const {
  730. type: $,
  731. showInfo: a,
  732. size: C
  733. } = e, I = o.value;
  734. return {
  735. [I]: !0,
  736. [`${I}-inline-circle`]: $ === "circle" && G(C, "circle").width <= 20,
  737. [`${I}-${$ === "dashboard" && "circle" || $}`]: !0,
  738. [`${I}-status-${m.value}`]: !0,
  739. [`${I}-show-info`]: a,
  740. [`${I}-${C}`]: C,
  741. [`${I}-rtl`]: s.value === "rtl",
  742. [l.value]: !0
  743. };
  744. }), S = v(() => typeof e.strokeColor == "string" || Array.isArray(e.strokeColor) ? e.strokeColor : void 0), d = () => {
  745. const {
  746. showInfo: $,
  747. format: a,
  748. type: C,
  749. percent: I,
  750. title: b
  751. } = e, y = L(e);
  752. if (!$) return null;
  753. let h;
  754. const w = a || (i == null ? void 0 : i.format) || ((W) => `${W}%`), D = C === "line";
  755. return a || i != null && i.format || m.value !== "exception" && m.value !== "success" ? h = w(X(I), X(y)) : m.value === "exception" ? h = D ? p(ve, null, null) : p(ce, null, null) : m.value === "success" && (h = D ? p(be, null, null) : p(de, null, null)), p("span", {
  756. class: `${o.value}-text`,
  757. title: b === void 0 && typeof h == "string" ? h : void 0
  758. }, [h]);
  759. };
  760. return () => {
  761. const {
  762. type: $,
  763. steps: a,
  764. title: C
  765. } = e, {
  766. class: I
  767. } = n, b = it(n, ["class"]), y = d();
  768. let h;
  769. return $ === "line" ? h = a ? p(Qe, P(P({}, e), {}, {
  770. strokeColor: S.value,
  771. prefixCls: o.value,
  772. steps: a
  773. }), {
  774. default: () => [y]
  775. }) : p(Ae, P(P({}, e), {}, {
  776. strokeColor: r.value,
  777. prefixCls: o.value,
  778. direction: s.value
  779. }), {
  780. default: () => [y]
  781. }) : ($ === "circle" || $ === "dashboard") && (h = p(Ye, P(P({}, e), {}, {
  782. prefixCls: o.value,
  783. strokeColor: r.value,
  784. progressStatus: m.value
  785. }), {
  786. default: () => [y]
  787. })), c(p("div", P(P({
  788. role: "progressbar"
  789. }, b), {}, {
  790. class: [g.value, I],
  791. title: C
  792. }), [h]));
  793. };
  794. }
  795. }), ot = Ce(nt);
  796. function ne(e) {
  797. return typeof e == "string";
  798. }
  799. function rt() {
  800. }
  801. const me = () => ({
  802. prefixCls: String,
  803. itemWidth: String,
  804. active: {
  805. type: Boolean,
  806. default: void 0
  807. },
  808. disabled: {
  809. type: Boolean,
  810. default: void 0
  811. },
  812. status: T(),
  813. iconPrefix: String,
  814. icon: x.any,
  815. adjustMarginRight: String,
  816. stepNumber: Number,
  817. stepIndex: Number,
  818. description: x.any,
  819. title: x.any,
  820. subTitle: x.any,
  821. progressDot: ye(x.oneOfType([x.looseBool, x.func])),
  822. tailContent: x.any,
  823. icons: x.shape({
  824. finish: x.any,
  825. error: x.any
  826. }).loose,
  827. onClick: z(),
  828. onStepClick: z(),
  829. stepIcon: z(),
  830. itemRender: z(),
  831. __legacy: Z()
  832. }), fe = O({
  833. compatConfig: {
  834. MODE: 3
  835. },
  836. name: "Step",
  837. inheritAttrs: !1,
  838. props: me(),
  839. setup(e, t) {
  840. let {
  841. slots: i,
  842. emit: n,
  843. attrs: o
  844. } = t;
  845. const s = (l) => {
  846. n("click", l), n("stepClick", e.stepIndex);
  847. }, c = (l) => {
  848. let {
  849. icon: r,
  850. title: u,
  851. description: m
  852. } = l;
  853. const {
  854. prefixCls: g,
  855. stepNumber: S,
  856. status: d,
  857. iconPrefix: $,
  858. icons: a,
  859. progressDot: C = i.progressDot,
  860. stepIcon: I = i.stepIcon
  861. } = e;
  862. let b;
  863. const y = B(`${g}-icon`, `${$}icon`, {
  864. [`${$}icon-${r}`]: r && ne(r),
  865. [`${$}icon-check`]: !r && d === "finish" && (a && !a.finish || !a),
  866. [`${$}icon-cross`]: !r && d === "error" && (a && !a.error || !a)
  867. }), h = p("span", {
  868. class: `${g}-icon-dot`
  869. }, null);
  870. return C ? typeof C == "function" ? b = p("span", {
  871. class: `${g}-icon`
  872. }, [C({
  873. iconDot: h,
  874. index: S - 1,
  875. status: d,
  876. title: u,
  877. description: m,
  878. prefixCls: g
  879. })]) : b = p("span", {
  880. class: `${g}-icon`
  881. }, [h]) : r && !ne(r) ? b = p("span", {
  882. class: `${g}-icon`
  883. }, [r]) : a && a.finish && d === "finish" ? b = p("span", {
  884. class: `${g}-icon`
  885. }, [a.finish]) : a && a.error && d === "error" ? b = p("span", {
  886. class: `${g}-icon`
  887. }, [a.error]) : r || d === "finish" || d === "error" ? b = p("span", {
  888. class: y
  889. }, null) : b = p("span", {
  890. class: `${g}-icon`
  891. }, [S]), I && (b = I({
  892. index: S - 1,
  893. status: d,
  894. title: u,
  895. description: m,
  896. node: b
  897. })), b;
  898. };
  899. return () => {
  900. var l, r, u, m;
  901. const {
  902. prefixCls: g,
  903. itemWidth: S,
  904. active: d,
  905. status: $ = "wait",
  906. tailContent: a,
  907. adjustMarginRight: C,
  908. disabled: I,
  909. title: b = (l = i.title) === null || l === void 0 ? void 0 : l.call(i),
  910. description: y = (r = i.description) === null || r === void 0 ? void 0 : r.call(i),
  911. subTitle: h = (u = i.subTitle) === null || u === void 0 ? void 0 : u.call(i),
  912. icon: w = (m = i.icon) === null || m === void 0 ? void 0 : m.call(i),
  913. onClick: D,
  914. onStepClick: W
  915. } = e, _ = $ || "wait", K = B(`${g}-item`, `${g}-item-${_}`, {
  916. [`${g}-item-custom`]: w,
  917. [`${g}-item-active`]: d,
  918. [`${g}-item-disabled`]: I === !0
  919. }), N = {};
  920. S && (N.width = S), C && (N.marginRight = C);
  921. const E = {
  922. onClick: D || rt
  923. };
  924. W && !I && (E.role = "button", E.tabindex = 0, E.onClick = s);
  925. const A = p("div", P(P({}, pe(o, ["__legacy"])), {}, {
  926. class: [K, o.class],
  927. style: [o.style, N]
  928. }), [p("div", P(P({}, E), {}, {
  929. class: `${g}-item-container`
  930. }), [p("div", {
  931. class: `${g}-item-tail`
  932. }, [a]), p("div", {
  933. class: `${g}-item-icon`
  934. }, [c({
  935. icon: w,
  936. title: b,
  937. description: y
  938. })]), p("div", {
  939. class: `${g}-item-content`
  940. }, [p("div", {
  941. class: `${g}-item-title`
  942. }, [b, h && p("div", {
  943. title: typeof h == "string" ? h : void 0,
  944. class: `${g}-item-subtitle`
  945. }, [h])]), y && p("div", {
  946. class: `${g}-item-description`
  947. }, [y])])])]);
  948. return e.itemRender ? e.itemRender(A) : A;
  949. };
  950. }
  951. });
  952. var st = function(e, t) {
  953. var i = {};
  954. for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (i[n] = e[n]);
  955. if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var o = 0, n = Object.getOwnPropertySymbols(e); o < n.length; o++)
  956. t.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[o]) && (i[n[o]] = e[n[o]]);
  957. return i;
  958. };
  959. const lt = O({
  960. compatConfig: {
  961. MODE: 3
  962. },
  963. name: "Steps",
  964. props: {
  965. type: x.string.def("default"),
  966. prefixCls: x.string.def("vc-steps"),
  967. iconPrefix: x.string.def("vc"),
  968. direction: x.string.def("horizontal"),
  969. labelPlacement: x.string.def("horizontal"),
  970. status: T("process"),
  971. size: x.string.def(""),
  972. progressDot: x.oneOfType([x.looseBool, x.func]).def(void 0),
  973. initial: x.number.def(0),
  974. current: x.number.def(0),
  975. items: x.array.def(() => []),
  976. icons: x.shape({
  977. finish: x.any,
  978. error: x.any
  979. }).loose,
  980. stepIcon: z(),
  981. isInline: x.looseBool,
  982. itemRender: z()
  983. },
  984. emits: ["change"],
  985. setup(e, t) {
  986. let {
  987. slots: i,
  988. emit: n
  989. } = t;
  990. const o = (l) => {
  991. const {
  992. current: r
  993. } = e;
  994. r !== l && n("change", l);
  995. }, s = (l, r, u) => {
  996. const {
  997. prefixCls: m,
  998. iconPrefix: g,
  999. status: S,
  1000. current: d,
  1001. initial: $,
  1002. icons: a,
  1003. stepIcon: C = i.stepIcon,
  1004. isInline: I,
  1005. itemRender: b,
  1006. progressDot: y = i.progressDot
  1007. } = e, h = I || y, w = f(f({}, l), {
  1008. class: ""
  1009. }), D = $ + r, W = {
  1010. active: D === d,
  1011. stepNumber: D + 1,
  1012. stepIndex: D,
  1013. key: D,
  1014. prefixCls: m,
  1015. iconPrefix: g,
  1016. progressDot: h,
  1017. stepIcon: C,
  1018. icons: a,
  1019. onStepClick: o
  1020. };
  1021. return S === "error" && r === d - 1 && (w.class = `${m}-next-error`), w.status || (D === d ? w.status = S : D < d ? w.status = "finish" : w.status = "wait"), I && (w.icon = void 0, w.subTitle = void 0), u ? u(f(f({}, w), W)) : (b && (w.itemRender = (_) => b(w, _)), p(fe, P(P(P({}, w), W), {}, {
  1022. __legacy: !1
  1023. }), null));
  1024. }, c = (l, r) => s(f({}, l.props), r, (u) => xe(l, u));
  1025. return () => {
  1026. var l;
  1027. const {
  1028. prefixCls: r,
  1029. direction: u,
  1030. type: m,
  1031. labelPlacement: g,
  1032. iconPrefix: S,
  1033. status: d,
  1034. size: $,
  1035. current: a,
  1036. progressDot: C = i.progressDot,
  1037. initial: I,
  1038. icons: b,
  1039. items: y,
  1040. isInline: h,
  1041. itemRender: w
  1042. } = e, D = st(e, ["prefixCls", "direction", "type", "labelPlacement", "iconPrefix", "status", "size", "current", "progressDot", "initial", "icons", "items", "isInline", "itemRender"]), W = m === "navigation", _ = h || C, K = h ? "horizontal" : u, N = h ? void 0 : $, E = _ ? "vertical" : g, A = B(r, `${r}-${u}`, {
  1043. [`${r}-${N}`]: N,
  1044. [`${r}-label-${E}`]: K === "horizontal",
  1045. [`${r}-dot`]: !!_,
  1046. [`${r}-navigation`]: W,
  1047. [`${r}-inline`]: h
  1048. });
  1049. return p("div", P({
  1050. class: A
  1051. }, D), [y.filter((V) => V).map((V, $e) => s(V, $e)), Ie((l = i.default) === null || l === void 0 ? void 0 : l.call(i)).map(c)]);
  1052. };
  1053. }
  1054. }), at = (e) => {
  1055. const {
  1056. componentCls: t,
  1057. stepsIconCustomTop: i,
  1058. stepsIconCustomSize: n,
  1059. stepsIconCustomFontSize: o
  1060. } = e;
  1061. return {
  1062. [`${t}-item-custom`]: {
  1063. [`> ${t}-item-container > ${t}-item-icon`]: {
  1064. height: "auto",
  1065. background: "none",
  1066. border: 0,
  1067. [`> ${t}-icon`]: {
  1068. top: i,
  1069. width: n,
  1070. height: n,
  1071. fontSize: o,
  1072. lineHeight: `${n}px`
  1073. }
  1074. }
  1075. },
  1076. // Only adjust horizontal customize icon width
  1077. [`&:not(${t}-vertical)`]: {
  1078. [`${t}-item-custom`]: {
  1079. [`${t}-item-icon`]: {
  1080. width: "auto",
  1081. background: "none"
  1082. }
  1083. }
  1084. }
  1085. };
  1086. }, ct = (e) => {
  1087. const {
  1088. componentCls: t,
  1089. stepsIconSize: i,
  1090. lineHeight: n,
  1091. stepsSmallIconSize: o
  1092. } = e;
  1093. return {
  1094. [`&${t}-label-vertical`]: {
  1095. [`${t}-item`]: {
  1096. overflow: "visible",
  1097. "&-tail": {
  1098. marginInlineStart: i / 2 + e.controlHeightLG,
  1099. padding: `${e.paddingXXS}px ${e.paddingLG}px`
  1100. },
  1101. "&-content": {
  1102. display: "block",
  1103. width: (i / 2 + e.controlHeightLG) * 2,
  1104. marginTop: e.marginSM,
  1105. textAlign: "center"
  1106. },
  1107. "&-icon": {
  1108. display: "inline-block",
  1109. marginInlineStart: e.controlHeightLG
  1110. },
  1111. "&-title": {
  1112. paddingInlineEnd: 0,
  1113. paddingInlineStart: 0,
  1114. "&::after": {
  1115. display: "none"
  1116. }
  1117. },
  1118. "&-subtitle": {
  1119. display: "block",
  1120. marginBottom: e.marginXXS,
  1121. marginInlineStart: 0,
  1122. lineHeight: n
  1123. }
  1124. },
  1125. [`&${t}-small:not(${t}-dot)`]: {
  1126. [`${t}-item`]: {
  1127. "&-icon": {
  1128. marginInlineStart: e.controlHeightLG + (i - o) / 2
  1129. }
  1130. }
  1131. }
  1132. }
  1133. };
  1134. }, dt = (e) => {
  1135. const {
  1136. componentCls: t,
  1137. stepsNavContentMaxWidth: i,
  1138. stepsNavArrowColor: n,
  1139. stepsNavActiveColor: o,
  1140. motionDurationSlow: s
  1141. } = e;
  1142. return {
  1143. [`&${t}-navigation`]: {
  1144. paddingTop: e.paddingSM,
  1145. [`&${t}-small`]: {
  1146. [`${t}-item`]: {
  1147. "&-container": {
  1148. marginInlineStart: -e.marginSM
  1149. }
  1150. }
  1151. },
  1152. [`${t}-item`]: {
  1153. overflow: "visible",
  1154. textAlign: "center",
  1155. "&-container": {
  1156. display: "inline-block",
  1157. height: "100%",
  1158. marginInlineStart: -e.margin,
  1159. paddingBottom: e.paddingSM,
  1160. textAlign: "start",
  1161. transition: `opacity ${s}`,
  1162. [`${t}-item-content`]: {
  1163. maxWidth: i
  1164. },
  1165. [`${t}-item-title`]: f(f({
  1166. maxWidth: "100%",
  1167. paddingInlineEnd: 0
  1168. }, we), {
  1169. "&::after": {
  1170. display: "none"
  1171. }
  1172. })
  1173. },
  1174. [`&:not(${t}-item-active)`]: {
  1175. [`${t}-item-container[role='button']`]: {
  1176. cursor: "pointer",
  1177. "&:hover": {
  1178. opacity: 0.85
  1179. }
  1180. }
  1181. },
  1182. "&:last-child": {
  1183. flex: 1,
  1184. "&::after": {
  1185. display: "none"
  1186. }
  1187. },
  1188. "&::after": {
  1189. position: "absolute",
  1190. top: `calc(50% - ${e.paddingSM / 2}px)`,
  1191. insetInlineStart: "100%",
  1192. display: "inline-block",
  1193. width: e.fontSizeIcon,
  1194. height: e.fontSizeIcon,
  1195. borderTop: `${e.lineWidth}px ${e.lineType} ${n}`,
  1196. borderBottom: "none",
  1197. borderInlineStart: "none",
  1198. borderInlineEnd: `${e.lineWidth}px ${e.lineType} ${n}`,
  1199. transform: "translateY(-50%) translateX(-50%) rotate(45deg)",
  1200. content: '""'
  1201. },
  1202. "&::before": {
  1203. position: "absolute",
  1204. bottom: 0,
  1205. insetInlineStart: "50%",
  1206. display: "inline-block",
  1207. width: 0,
  1208. height: e.lineWidthBold,
  1209. backgroundColor: o,
  1210. transition: `width ${s}, inset-inline-start ${s}`,
  1211. transitionTimingFunction: "ease-out",
  1212. content: '""'
  1213. }
  1214. },
  1215. [`${t}-item${t}-item-active::before`]: {
  1216. insetInlineStart: 0,
  1217. width: "100%"
  1218. }
  1219. },
  1220. [`&${t}-navigation${t}-vertical`]: {
  1221. [`> ${t}-item`]: {
  1222. marginInlineEnd: 0,
  1223. "&::before": {
  1224. display: "none"
  1225. },
  1226. [`&${t}-item-active::before`]: {
  1227. top: 0,
  1228. insetInlineEnd: 0,
  1229. insetInlineStart: "unset",
  1230. display: "block",
  1231. width: e.lineWidth * 3,
  1232. height: `calc(100% - ${e.marginLG}px)`
  1233. },
  1234. "&::after": {
  1235. position: "relative",
  1236. insetInlineStart: "50%",
  1237. display: "block",
  1238. width: e.controlHeight * 0.25,
  1239. height: e.controlHeight * 0.25,
  1240. marginBottom: e.marginXS,
  1241. textAlign: "center",
  1242. transform: "translateY(-50%) translateX(-50%) rotate(135deg)"
  1243. },
  1244. [`> ${t}-item-container > ${t}-item-tail`]: {
  1245. visibility: "hidden"
  1246. }
  1247. }
  1248. },
  1249. [`&${t}-navigation${t}-horizontal`]: {
  1250. [`> ${t}-item > ${t}-item-container > ${t}-item-tail`]: {
  1251. visibility: "hidden"
  1252. }
  1253. }
  1254. };
  1255. }, pt = (e) => {
  1256. const {
  1257. antCls: t,
  1258. componentCls: i
  1259. } = e;
  1260. return {
  1261. [`&${i}-with-progress`]: {
  1262. [`${i}-item`]: {
  1263. paddingTop: e.paddingXXS,
  1264. [`&-process ${i}-item-container ${i}-item-icon ${i}-icon`]: {
  1265. color: e.processIconColor
  1266. }
  1267. },
  1268. [`&${i}-vertical > ${i}-item `]: {
  1269. paddingInlineStart: e.paddingXXS,
  1270. [`> ${i}-item-container > ${i}-item-tail`]: {
  1271. top: e.marginXXS,
  1272. insetInlineStart: e.stepsIconSize / 2 - e.lineWidth + e.paddingXXS
  1273. }
  1274. },
  1275. [`&, &${i}-small`]: {
  1276. [`&${i}-horizontal ${i}-item:first-child`]: {
  1277. paddingBottom: e.paddingXXS,
  1278. paddingInlineStart: e.paddingXXS
  1279. }
  1280. },
  1281. [`&${i}-small${i}-vertical > ${i}-item > ${i}-item-container > ${i}-item-tail`]: {
  1282. insetInlineStart: e.stepsSmallIconSize / 2 - e.lineWidth + e.paddingXXS
  1283. },
  1284. [`&${i}-label-vertical`]: {
  1285. [`${i}-item ${i}-item-tail`]: {
  1286. top: e.margin - 2 * e.lineWidth
  1287. }
  1288. },
  1289. [`${i}-item-icon`]: {
  1290. position: "relative",
  1291. [`${t}-progress`]: {
  1292. position: "absolute",
  1293. insetBlockStart: (e.stepsIconSize - e.stepsProgressSize - e.lineWidth * 2) / 2,
  1294. insetInlineStart: (e.stepsIconSize - e.stepsProgressSize - e.lineWidth * 2) / 2
  1295. }
  1296. }
  1297. }
  1298. };
  1299. }, ut = (e) => {
  1300. const {
  1301. componentCls: t,
  1302. descriptionWidth: i,
  1303. lineHeight: n,
  1304. stepsCurrentDotSize: o,
  1305. stepsDotSize: s,
  1306. motionDurationSlow: c
  1307. } = e;
  1308. return {
  1309. [`&${t}-dot, &${t}-dot${t}-small`]: {
  1310. [`${t}-item`]: {
  1311. "&-title": {
  1312. lineHeight: n
  1313. },
  1314. "&-tail": {
  1315. top: Math.floor((e.stepsDotSize - e.lineWidth * 3) / 2),
  1316. width: "100%",
  1317. marginTop: 0,
  1318. marginBottom: 0,
  1319. marginInline: `${i / 2}px 0`,
  1320. padding: 0,
  1321. "&::after": {
  1322. width: `calc(100% - ${e.marginSM * 2}px)`,
  1323. height: e.lineWidth * 3,
  1324. marginInlineStart: e.marginSM
  1325. }
  1326. },
  1327. "&-icon": {
  1328. width: s,
  1329. height: s,
  1330. marginInlineStart: (e.descriptionWidth - s) / 2,
  1331. paddingInlineEnd: 0,
  1332. lineHeight: `${s}px`,
  1333. background: "transparent",
  1334. border: 0,
  1335. [`${t}-icon-dot`]: {
  1336. position: "relative",
  1337. float: "left",
  1338. width: "100%",
  1339. height: "100%",
  1340. borderRadius: 100,
  1341. transition: `all ${c}`,
  1342. /* expand hover area */
  1343. "&::after": {
  1344. position: "absolute",
  1345. top: -e.marginSM,
  1346. insetInlineStart: (s - e.controlHeightLG * 1.5) / 2,
  1347. width: e.controlHeightLG * 1.5,
  1348. height: e.controlHeight,
  1349. background: "transparent",
  1350. content: '""'
  1351. }
  1352. }
  1353. },
  1354. "&-content": {
  1355. width: i
  1356. },
  1357. [`&-process ${t}-item-icon`]: {
  1358. position: "relative",
  1359. top: (s - o) / 2,
  1360. width: o,
  1361. height: o,
  1362. lineHeight: `${o}px`,
  1363. background: "none",
  1364. marginInlineStart: (e.descriptionWidth - o) / 2
  1365. },
  1366. [`&-process ${t}-icon`]: {
  1367. [`&:first-child ${t}-icon-dot`]: {
  1368. insetInlineStart: 0
  1369. }
  1370. }
  1371. }
  1372. },
  1373. [`&${t}-vertical${t}-dot`]: {
  1374. [`${t}-item-icon`]: {
  1375. marginTop: (e.controlHeight - s) / 2,
  1376. marginInlineStart: 0,
  1377. background: "none"
  1378. },
  1379. [`${t}-item-process ${t}-item-icon`]: {
  1380. marginTop: (e.controlHeight - o) / 2,
  1381. top: 0,
  1382. insetInlineStart: (s - o) / 2,
  1383. marginInlineStart: 0
  1384. },
  1385. // https://github.com/ant-design/ant-design/issues/18354
  1386. [`${t}-item > ${t}-item-container > ${t}-item-tail`]: {
  1387. top: (e.controlHeight - s) / 2,
  1388. insetInlineStart: 0,
  1389. margin: 0,
  1390. padding: `${s + e.paddingXS}px 0 ${e.paddingXS}px`,
  1391. "&::after": {
  1392. marginInlineStart: (s - e.lineWidth) / 2
  1393. }
  1394. },
  1395. [`&${t}-small`]: {
  1396. [`${t}-item-icon`]: {
  1397. marginTop: (e.controlHeightSM - s) / 2
  1398. },
  1399. [`${t}-item-process ${t}-item-icon`]: {
  1400. marginTop: (e.controlHeightSM - o) / 2
  1401. },
  1402. [`${t}-item > ${t}-item-container > ${t}-item-tail`]: {
  1403. top: (e.controlHeightSM - s) / 2
  1404. }
  1405. },
  1406. [`${t}-item:first-child ${t}-icon-dot`]: {
  1407. insetInlineStart: 0
  1408. },
  1409. [`${t}-item-content`]: {
  1410. width: "inherit"
  1411. }
  1412. }
  1413. };
  1414. }, gt = (e) => {
  1415. const {
  1416. componentCls: t
  1417. } = e;
  1418. return {
  1419. [`&${t}-rtl`]: {
  1420. direction: "rtl",
  1421. [`${t}-item`]: {
  1422. "&-subtitle": {
  1423. float: "left"
  1424. }
  1425. },
  1426. // nav
  1427. [`&${t}-navigation`]: {
  1428. [`${t}-item::after`]: {
  1429. transform: "rotate(-45deg)"
  1430. }
  1431. },
  1432. // vertical
  1433. [`&${t}-vertical`]: {
  1434. [`> ${t}-item`]: {
  1435. "&::after": {
  1436. transform: "rotate(225deg)"
  1437. },
  1438. [`${t}-item-icon`]: {
  1439. float: "right"
  1440. }
  1441. }
  1442. },
  1443. // progress-dot
  1444. [`&${t}-dot`]: {
  1445. [`${t}-item-icon ${t}-icon-dot, &${t}-small ${t}-item-icon ${t}-icon-dot`]: {
  1446. float: "right"
  1447. }
  1448. }
  1449. }
  1450. };
  1451. }, mt = (e) => {
  1452. const {
  1453. componentCls: t,
  1454. stepsSmallIconSize: i,
  1455. // stepsSmallIconMargin,
  1456. fontSizeSM: n,
  1457. fontSize: o,
  1458. colorTextDescription: s
  1459. } = e;
  1460. return {
  1461. [`&${t}-small`]: {
  1462. [`&${t}-horizontal:not(${t}-label-vertical) ${t}-item`]: {
  1463. paddingInlineStart: e.paddingSM,
  1464. "&:first-child": {
  1465. paddingInlineStart: 0
  1466. }
  1467. },
  1468. [`${t}-item-icon`]: {
  1469. width: i,
  1470. height: i,
  1471. // margin: stepsSmallIconMargin,
  1472. marginTop: 0,
  1473. marginBottom: 0,
  1474. marginInline: `0 ${e.marginXS}px`,
  1475. fontSize: n,
  1476. lineHeight: `${i}px`,
  1477. textAlign: "center",
  1478. borderRadius: i
  1479. },
  1480. [`${t}-item-title`]: {
  1481. paddingInlineEnd: e.paddingSM,
  1482. fontSize: o,
  1483. lineHeight: `${i}px`,
  1484. "&::after": {
  1485. top: i / 2
  1486. }
  1487. },
  1488. [`${t}-item-description`]: {
  1489. color: s,
  1490. fontSize: o
  1491. },
  1492. [`${t}-item-tail`]: {
  1493. top: i / 2 - e.paddingXXS
  1494. },
  1495. [`${t}-item-custom ${t}-item-icon`]: {
  1496. width: "inherit",
  1497. height: "inherit",
  1498. lineHeight: "inherit",
  1499. background: "none",
  1500. border: 0,
  1501. borderRadius: 0,
  1502. [`> ${t}-icon`]: {
  1503. fontSize: i,
  1504. lineHeight: `${i}px`,
  1505. transform: "none"
  1506. }
  1507. }
  1508. }
  1509. };
  1510. }, ft = (e) => {
  1511. const {
  1512. componentCls: t,
  1513. stepsSmallIconSize: i,
  1514. stepsIconSize: n
  1515. } = e;
  1516. return {
  1517. [`&${t}-vertical`]: {
  1518. display: "flex",
  1519. flexDirection: "column",
  1520. [`> ${t}-item`]: {
  1521. display: "block",
  1522. flex: "1 0 auto",
  1523. paddingInlineStart: 0,
  1524. overflow: "visible",
  1525. [`${t}-item-icon`]: {
  1526. float: "left",
  1527. marginInlineEnd: e.margin
  1528. },
  1529. [`${t}-item-content`]: {
  1530. display: "block",
  1531. minHeight: e.controlHeight * 1.5,
  1532. overflow: "hidden"
  1533. },
  1534. [`${t}-item-title`]: {
  1535. lineHeight: `${n}px`
  1536. },
  1537. [`${t}-item-description`]: {
  1538. paddingBottom: e.paddingSM
  1539. }
  1540. },
  1541. [`> ${t}-item > ${t}-item-container > ${t}-item-tail`]: {
  1542. position: "absolute",
  1543. top: 0,
  1544. insetInlineStart: e.stepsIconSize / 2 - e.lineWidth,
  1545. width: e.lineWidth,
  1546. height: "100%",
  1547. padding: `${n + e.marginXXS * 1.5}px 0 ${e.marginXXS * 1.5}px`,
  1548. "&::after": {
  1549. width: e.lineWidth,
  1550. height: "100%"
  1551. }
  1552. },
  1553. [`> ${t}-item:not(:last-child) > ${t}-item-container > ${t}-item-tail`]: {
  1554. display: "block"
  1555. },
  1556. [` > ${t}-item > ${t}-item-container > ${t}-item-content > ${t}-item-title`]: {
  1557. "&::after": {
  1558. display: "none"
  1559. }
  1560. },
  1561. [`&${t}-small ${t}-item-container`]: {
  1562. [`${t}-item-tail`]: {
  1563. position: "absolute",
  1564. top: 0,
  1565. insetInlineStart: e.stepsSmallIconSize / 2 - e.lineWidth,
  1566. padding: `${i + e.marginXXS * 1.5}px 0 ${e.marginXXS * 1.5}px`
  1567. },
  1568. [`${t}-item-title`]: {
  1569. lineHeight: `${i}px`
  1570. }
  1571. }
  1572. }
  1573. };
  1574. }, $t = (e) => {
  1575. const {
  1576. componentCls: t,
  1577. inlineDotSize: i,
  1578. inlineTitleColor: n,
  1579. inlineTailColor: o
  1580. } = e, s = e.paddingXS + e.lineWidth, c = {
  1581. [`${t}-item-container ${t}-item-content ${t}-item-title`]: {
  1582. color: n
  1583. }
  1584. };
  1585. return {
  1586. [`&${t}-inline`]: {
  1587. width: "auto",
  1588. display: "inline-flex",
  1589. [`${t}-item`]: {
  1590. flex: "none",
  1591. "&-container": {
  1592. padding: `${s}px ${e.paddingXXS}px 0`,
  1593. margin: `0 ${e.marginXXS / 2}px`,
  1594. borderRadius: e.borderRadiusSM,
  1595. cursor: "pointer",
  1596. transition: `background-color ${e.motionDurationMid}`,
  1597. "&:hover": {
  1598. background: e.controlItemBgHover
  1599. },
  1600. "&[role='button']:hover": {
  1601. opacity: 1
  1602. }
  1603. },
  1604. "&-icon": {
  1605. width: i,
  1606. height: i,
  1607. marginInlineStart: `calc(50% - ${i / 2}px)`,
  1608. [`> ${t}-icon`]: {
  1609. top: 0
  1610. },
  1611. [`${t}-icon-dot`]: {
  1612. borderRadius: e.fontSizeSM / 4
  1613. }
  1614. },
  1615. "&-content": {
  1616. width: "auto",
  1617. marginTop: e.marginXS - e.lineWidth
  1618. },
  1619. "&-title": {
  1620. color: n,
  1621. fontSize: e.fontSizeSM,
  1622. lineHeight: e.lineHeightSM,
  1623. fontWeight: "normal",
  1624. marginBottom: e.marginXXS / 2
  1625. },
  1626. "&-description": {
  1627. display: "none"
  1628. },
  1629. "&-tail": {
  1630. marginInlineStart: 0,
  1631. top: s + i / 2,
  1632. transform: "translateY(-50%)",
  1633. "&:after": {
  1634. width: "100%",
  1635. height: e.lineWidth,
  1636. borderRadius: 0,
  1637. marginInlineStart: 0,
  1638. background: o
  1639. }
  1640. },
  1641. [`&:first-child ${t}-item-tail`]: {
  1642. width: "50%",
  1643. marginInlineStart: "50%"
  1644. },
  1645. [`&:last-child ${t}-item-tail`]: {
  1646. display: "block",
  1647. width: "50%"
  1648. },
  1649. "&-wait": f({
  1650. [`${t}-item-icon ${t}-icon ${t}-icon-dot`]: {
  1651. backgroundColor: e.colorBorderBg,
  1652. border: `${e.lineWidth}px ${e.lineType} ${o}`
  1653. }
  1654. }, c),
  1655. "&-finish": f({
  1656. [`${t}-item-tail::after`]: {
  1657. backgroundColor: o
  1658. },
  1659. [`${t}-item-icon ${t}-icon ${t}-icon-dot`]: {
  1660. backgroundColor: o,
  1661. border: `${e.lineWidth}px ${e.lineType} ${o}`
  1662. }
  1663. }, c),
  1664. "&-error": c,
  1665. "&-active, &-process": f({
  1666. [`${t}-item-icon`]: {
  1667. width: i,
  1668. height: i,
  1669. marginInlineStart: `calc(50% - ${i / 2}px)`,
  1670. top: 0
  1671. }
  1672. }, c),
  1673. [`&:not(${t}-item-active) > ${t}-item-container[role='button']:hover`]: {
  1674. [`${t}-item-title`]: {
  1675. color: n
  1676. }
  1677. }
  1678. }
  1679. }
  1680. };
  1681. };
  1682. var H;
  1683. (function(e) {
  1684. e.wait = "wait", e.process = "process", e.finish = "finish", e.error = "error";
  1685. })(H || (H = {}));
  1686. const R = (e, t) => {
  1687. const i = `${t.componentCls}-item`, n = `${e}IconColor`, o = `${e}TitleColor`, s = `${e}DescriptionColor`, c = `${e}TailColor`, l = `${e}IconBgColor`, r = `${e}IconBorderColor`, u = `${e}DotColor`;
  1688. return {
  1689. [`${i}-${e} ${i}-icon`]: {
  1690. backgroundColor: t[l],
  1691. borderColor: t[r],
  1692. [`> ${t.componentCls}-icon`]: {
  1693. color: t[n],
  1694. [`${t.componentCls}-icon-dot`]: {
  1695. background: t[u]
  1696. }
  1697. }
  1698. },
  1699. [`${i}-${e}${i}-custom ${i}-icon`]: {
  1700. [`> ${t.componentCls}-icon`]: {
  1701. color: t[u]
  1702. }
  1703. },
  1704. [`${i}-${e} > ${i}-container > ${i}-content > ${i}-title`]: {
  1705. color: t[o],
  1706. "&::after": {
  1707. backgroundColor: t[c]
  1708. }
  1709. },
  1710. [`${i}-${e} > ${i}-container > ${i}-content > ${i}-description`]: {
  1711. color: t[s]
  1712. },
  1713. [`${i}-${e} > ${i}-container > ${i}-tail::after`]: {
  1714. backgroundColor: t[c]
  1715. }
  1716. };
  1717. }, ht = (e) => {
  1718. const {
  1719. componentCls: t,
  1720. motionDurationSlow: i
  1721. } = e, n = `${t}-item`;
  1722. return f(f(f(f(f(f({
  1723. [n]: {
  1724. position: "relative",
  1725. display: "inline-block",
  1726. flex: 1,
  1727. overflow: "hidden",
  1728. verticalAlign: "top",
  1729. "&:last-child": {
  1730. flex: "none",
  1731. [`> ${n}-container > ${n}-tail, > ${n}-container > ${n}-content > ${n}-title::after`]: {
  1732. display: "none"
  1733. }
  1734. }
  1735. },
  1736. [`${n}-container`]: {
  1737. outline: "none"
  1738. },
  1739. [`${n}-icon, ${n}-content`]: {
  1740. display: "inline-block",
  1741. verticalAlign: "top"
  1742. },
  1743. [`${n}-icon`]: {
  1744. width: e.stepsIconSize,
  1745. height: e.stepsIconSize,
  1746. marginTop: 0,
  1747. marginBottom: 0,
  1748. marginInlineStart: 0,
  1749. marginInlineEnd: e.marginXS,
  1750. fontSize: e.stepsIconFontSize,
  1751. fontFamily: e.fontFamily,
  1752. lineHeight: `${e.stepsIconSize}px`,
  1753. textAlign: "center",
  1754. borderRadius: e.stepsIconSize,
  1755. border: `${e.lineWidth}px ${e.lineType} transparent`,
  1756. transition: `background-color ${i}, border-color ${i}`,
  1757. [`${t}-icon`]: {
  1758. position: "relative",
  1759. top: e.stepsIconTop,
  1760. color: e.colorPrimary,
  1761. lineHeight: 1
  1762. }
  1763. },
  1764. [`${n}-tail`]: {
  1765. position: "absolute",
  1766. top: e.stepsIconSize / 2 - e.paddingXXS,
  1767. insetInlineStart: 0,
  1768. width: "100%",
  1769. "&::after": {
  1770. display: "inline-block",
  1771. width: "100%",
  1772. height: e.lineWidth,
  1773. background: e.colorSplit,
  1774. borderRadius: e.lineWidth,
  1775. transition: `background ${i}`,
  1776. content: '""'
  1777. }
  1778. },
  1779. [`${n}-title`]: {
  1780. position: "relative",
  1781. display: "inline-block",
  1782. paddingInlineEnd: e.padding,
  1783. color: e.colorText,
  1784. fontSize: e.fontSizeLG,
  1785. lineHeight: `${e.stepsTitleLineHeight}px`,
  1786. "&::after": {
  1787. position: "absolute",
  1788. top: e.stepsTitleLineHeight / 2,
  1789. insetInlineStart: "100%",
  1790. display: "block",
  1791. width: 9999,
  1792. height: e.lineWidth,
  1793. background: e.processTailColor,
  1794. content: '""'
  1795. }
  1796. },
  1797. [`${n}-subtitle`]: {
  1798. display: "inline",
  1799. marginInlineStart: e.marginXS,
  1800. color: e.colorTextDescription,
  1801. fontWeight: "normal",
  1802. fontSize: e.fontSize
  1803. },
  1804. [`${n}-description`]: {
  1805. color: e.colorTextDescription,
  1806. fontSize: e.fontSize
  1807. }
  1808. }, R(H.wait, e)), R(H.process, e)), {
  1809. [`${n}-process > ${n}-container > ${n}-title`]: {
  1810. fontWeight: e.fontWeightStrong
  1811. }
  1812. }), R(H.finish, e)), R(H.error, e)), {
  1813. [`${n}${t}-next-error > ${t}-item-title::after`]: {
  1814. background: e.colorError
  1815. },
  1816. [`${n}-disabled`]: {
  1817. cursor: "not-allowed"
  1818. }
  1819. });
  1820. }, St = (e) => {
  1821. const {
  1822. componentCls: t,
  1823. motionDurationSlow: i
  1824. } = e;
  1825. return {
  1826. [`& ${t}-item`]: {
  1827. [`&:not(${t}-item-active)`]: {
  1828. [`& > ${t}-item-container[role='button']`]: {
  1829. cursor: "pointer",
  1830. [`${t}-item`]: {
  1831. [`&-title, &-subtitle, &-description, &-icon ${t}-icon`]: {
  1832. transition: `color ${i}`
  1833. }
  1834. },
  1835. "&:hover": {
  1836. [`${t}-item`]: {
  1837. "&-title, &-subtitle, &-description": {
  1838. color: e.colorPrimary
  1839. }
  1840. }
  1841. }
  1842. },
  1843. [`&:not(${t}-item-process)`]: {
  1844. [`& > ${t}-item-container[role='button']:hover`]: {
  1845. [`${t}-item`]: {
  1846. "&-icon": {
  1847. borderColor: e.colorPrimary,
  1848. [`${t}-icon`]: {
  1849. color: e.colorPrimary
  1850. }
  1851. }
  1852. }
  1853. }
  1854. }
  1855. }
  1856. },
  1857. [`&${t}-horizontal:not(${t}-label-vertical)`]: {
  1858. [`${t}-item`]: {
  1859. paddingInlineStart: e.padding,
  1860. whiteSpace: "nowrap",
  1861. "&:first-child": {
  1862. paddingInlineStart: 0
  1863. },
  1864. [`&:last-child ${t}-item-title`]: {
  1865. paddingInlineEnd: 0
  1866. },
  1867. "&-tail": {
  1868. display: "none"
  1869. },
  1870. "&-description": {
  1871. maxWidth: e.descriptionWidth,
  1872. whiteSpace: "normal"
  1873. }
  1874. }
  1875. }
  1876. };
  1877. }, vt = (e) => {
  1878. const {
  1879. componentCls: t
  1880. } = e;
  1881. return {
  1882. [t]: f(f(f(f(f(f(f(f(f(f(f(f(f({}, le(e)), {
  1883. display: "flex",
  1884. width: "100%",
  1885. fontSize: 0,
  1886. textAlign: "initial"
  1887. }), ht(e)), St(e)), at(e)), mt(e)), ft(e)), ct(e)), ut(e)), dt(e)), gt(e)), pt(e)), $t(e))
  1888. };
  1889. }, bt = re("Steps", (e) => {
  1890. const {
  1891. wireframe: t,
  1892. colorTextDisabled: i,
  1893. fontSizeHeading3: n,
  1894. fontSize: o,
  1895. controlHeight: s,
  1896. controlHeightLG: c,
  1897. colorTextLightSolid: l,
  1898. colorText: r,
  1899. colorPrimary: u,
  1900. colorTextLabel: m,
  1901. colorTextDescription: g,
  1902. colorTextQuaternary: S,
  1903. colorFillContent: d,
  1904. controlItemBgActive: $,
  1905. colorError: a,
  1906. colorBgContainer: C,
  1907. colorBorderSecondary: I
  1908. } = e, b = e.controlHeight, y = e.colorSplit, h = se(e, {
  1909. // Steps variable default.less
  1910. processTailColor: y,
  1911. stepsNavArrowColor: i,
  1912. stepsIconSize: b,
  1913. stepsIconCustomSize: b,
  1914. stepsIconCustomTop: 0,
  1915. stepsIconCustomFontSize: c / 2,
  1916. stepsIconTop: -0.5,
  1917. stepsIconFontSize: o,
  1918. stepsTitleLineHeight: s,
  1919. stepsSmallIconSize: n,
  1920. stepsDotSize: s / 4,
  1921. stepsCurrentDotSize: c / 4,
  1922. stepsNavContentMaxWidth: "auto",
  1923. // Steps component less variable
  1924. processIconColor: l,
  1925. processTitleColor: r,
  1926. processDescriptionColor: r,
  1927. processIconBgColor: u,
  1928. processIconBorderColor: u,
  1929. processDotColor: u,
  1930. waitIconColor: t ? i : m,
  1931. waitTitleColor: g,
  1932. waitDescriptionColor: g,
  1933. waitTailColor: y,
  1934. waitIconBgColor: t ? C : d,
  1935. waitIconBorderColor: t ? i : "transparent",
  1936. waitDotColor: i,
  1937. finishIconColor: u,
  1938. finishTitleColor: r,
  1939. finishDescriptionColor: g,
  1940. finishTailColor: u,
  1941. finishIconBgColor: t ? C : $,
  1942. finishIconBorderColor: t ? u : $,
  1943. finishDotColor: u,
  1944. errorIconColor: l,
  1945. errorTitleColor: a,
  1946. errorDescriptionColor: a,
  1947. errorTailColor: y,
  1948. errorIconBgColor: a,
  1949. errorIconBorderColor: a,
  1950. errorDotColor: a,
  1951. stepsNavActiveColor: u,
  1952. stepsProgressSize: c,
  1953. // Steps inline variable
  1954. inlineDotSize: 6,
  1955. inlineTitleColor: S,
  1956. inlineTailColor: I
  1957. });
  1958. return [vt(h)];
  1959. }, {
  1960. descriptionWidth: 140
  1961. }), Ct = () => ({
  1962. prefixCls: String,
  1963. iconPrefix: String,
  1964. current: Number,
  1965. initial: Number,
  1966. percent: Number,
  1967. responsive: Z(),
  1968. items: Te(),
  1969. labelPlacement: T(),
  1970. status: T(),
  1971. size: T(),
  1972. direction: T(),
  1973. progressDot: q([Boolean, Function]),
  1974. type: T(),
  1975. onChange: z(),
  1976. "onUpdate:current": z()
  1977. }), Y = O({
  1978. compatConfig: {
  1979. MODE: 3
  1980. },
  1981. name: "ASteps",
  1982. inheritAttrs: !1,
  1983. props: j(Ct(), {
  1984. current: 0,
  1985. responsive: !0,
  1986. labelPlacement: "horizontal"
  1987. }),
  1988. slots: Object,
  1989. // emits: ['update:current', 'change'],
  1990. setup(e, t) {
  1991. let {
  1992. attrs: i,
  1993. slots: n,
  1994. emit: o
  1995. } = t;
  1996. const {
  1997. prefixCls: s,
  1998. direction: c,
  1999. configProvider: l
  2000. } = ae("steps", e), [r, u] = bt(s), [, m] = Pe(), g = De(), S = v(() => e.responsive && g.value.xs ? "vertical" : e.direction), d = v(() => l.getPrefixCls("", e.iconPrefix)), $ = (y) => {
  2001. o("update:current", y), o("change", y);
  2002. }, a = v(() => e.type === "inline"), C = v(() => a.value ? void 0 : e.percent), I = (y) => {
  2003. let {
  2004. node: h,
  2005. status: w
  2006. } = y;
  2007. if (w === "process" && e.percent !== void 0) {
  2008. const D = e.size === "small" ? m.value.controlHeight : m.value.controlHeightLG;
  2009. return p("div", {
  2010. class: `${s.value}-progress-icon`
  2011. }, [p(ot, {
  2012. type: "circle",
  2013. percent: C.value,
  2014. size: D,
  2015. strokeWidth: 4,
  2016. format: () => null
  2017. }, null), h]);
  2018. }
  2019. return h;
  2020. }, b = v(() => ({
  2021. finish: p(de, {
  2022. class: `${s.value}-finish-icon`
  2023. }, null),
  2024. error: p(ce, {
  2025. class: `${s.value}-error-icon`
  2026. }, null)
  2027. }));
  2028. return () => {
  2029. const y = B({
  2030. [`${s.value}-rtl`]: c.value === "rtl",
  2031. [`${s.value}-with-progress`]: C.value !== void 0
  2032. }, i.class, u.value), h = (w, D) => w.description ? p(oe, {
  2033. title: w.description
  2034. }, {
  2035. default: () => [D]
  2036. }) : D;
  2037. return r(p(lt, P(P(P({
  2038. icons: b.value
  2039. }, i), pe(e, ["percent", "responsive"])), {}, {
  2040. items: e.items,
  2041. direction: S.value,
  2042. prefixCls: s.value,
  2043. iconPrefix: d.value,
  2044. class: y,
  2045. onChange: $,
  2046. isInline: a.value,
  2047. itemRender: a.value ? h : void 0
  2048. }), f({
  2049. stepIcon: I
  2050. }, n)));
  2051. };
  2052. }
  2053. }), U = O(f(f({
  2054. compatConfig: {
  2055. MODE: 3
  2056. }
  2057. }, fe), {
  2058. name: "AStep",
  2059. props: me()
  2060. })), wt = f(Y, {
  2061. Step: U,
  2062. install: (e) => (e.component(Y.name, Y), e.component(U.name, U), e)
  2063. });
  2064. export {
  2065. ot as P,
  2066. U as S,
  2067. wt as _
  2068. };