@das-fed/ui 6.4.0-hot.1 → 6.4.0-hot.3

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 (113) hide show
  1. package/package.json +5 -5
  2. package/packages/business-components/app-container/index.js +255 -46
  3. package/packages/business-components/app-container/index.js.gz +0 -0
  4. package/packages/business-components/change-enterprises/index.js +298 -89
  5. package/packages/business-components/change-enterprises/index.js.gz +0 -0
  6. package/packages/business-components/device-panel/index.js +28123 -23289
  7. package/packages/business-components/device-panel/index.js.gz +0 -0
  8. package/packages/business-components/process-form/index.js +1010 -801
  9. package/packages/business-components/process-form/index.js.gz +0 -0
  10. package/packages/business-components/process-log/index.js +3669 -331
  11. package/packages/business-components/process-log/index.js.gz +0 -0
  12. package/packages/business-components/urgent-panel/index.js +2338 -1553
  13. package/packages/business-components/urgent-panel/index.js.gz +0 -0
  14. package/packages/components/alert/index.js +3418 -51
  15. package/packages/components/alert/index.js.gz +0 -0
  16. package/packages/components/autocomplete/index.js +2875 -456
  17. package/packages/components/autocomplete/index.js.gz +0 -0
  18. package/packages/components/breadcrumb/index.js +271 -47
  19. package/packages/components/breadcrumb/index.js.gz +0 -0
  20. package/packages/components/button/index.js +9800 -211
  21. package/packages/components/button/index.js.gz +0 -0
  22. package/packages/components/cascader/index.js +6406 -139
  23. package/packages/components/cascader/index.js.gz +0 -0
  24. package/packages/components/checkbox/index.js +3837 -179
  25. package/packages/components/checkbox/index.js.gz +0 -0
  26. package/packages/components/collapse-panel/index.js +3624 -30
  27. package/packages/components/collapse-panel/index.js.gz +0 -0
  28. package/packages/components/collaspe/index.js +3624 -30
  29. package/packages/components/collaspe/index.js.gz +0 -0
  30. package/packages/components/color-picker/index.js +5346 -106
  31. package/packages/components/color-picker/index.js.gz +0 -0
  32. package/packages/components/date-picker/index.js +13993 -529
  33. package/packages/components/date-picker/index.js.gz +0 -0
  34. package/packages/components/dialog/index.js +1835 -186
  35. package/packages/components/dialog/index.js.gz +0 -0
  36. package/packages/components/drawer/index.js +1614 -38
  37. package/packages/components/drawer/index.js.gz +0 -0
  38. package/packages/components/dropdown/index.js +4615 -54
  39. package/packages/components/dropdown/index.js.gz +0 -0
  40. package/packages/components/empty/index.js +800 -39
  41. package/packages/components/empty/index.js.gz +0 -0
  42. package/packages/components/image-preview/index.js +1283 -34
  43. package/packages/components/image-preview/index.js.gz +0 -0
  44. package/packages/components/image-upload/index.js +11722 -111
  45. package/packages/components/image-upload/index.js.gz +0 -0
  46. package/packages/components/image-viewer/index.js +13168 -386
  47. package/packages/components/image-viewer/index.js.gz +0 -0
  48. package/packages/components/input/index.js +1086 -157
  49. package/packages/components/input/index.js.gz +0 -0
  50. package/packages/components/input-number/index.js +1831 -145
  51. package/packages/components/input-number/index.js.gz +0 -0
  52. package/packages/components/live-player/index.js +3669 -2883
  53. package/packages/components/live-player/index.js.gz +0 -0
  54. package/packages/components/map/index.js +5214 -1190
  55. package/packages/components/map/index.js.gz +0 -0
  56. package/packages/components/menu-aside/index.js +8297 -603
  57. package/packages/components/menu-aside/index.js.gz +0 -0
  58. package/packages/components/menu-header/index.js +10077 -38
  59. package/packages/components/menu-header/index.js.gz +0 -0
  60. package/packages/components/message/index.js +1289 -53
  61. package/packages/components/message/index.js.gz +0 -0
  62. package/packages/components/notification/index.js +3269 -47
  63. package/packages/components/notification/index.js.gz +0 -0
  64. package/packages/components/pagination/index.js +8025 -148
  65. package/packages/components/pagination/index.js.gz +0 -0
  66. package/packages/components/popover/index.js +2495 -44
  67. package/packages/components/popover/index.js.gz +0 -0
  68. package/packages/components/progress/index.js +517 -107
  69. package/packages/components/progress/index.js.gz +0 -0
  70. package/packages/components/radio/index.js +3724 -159
  71. package/packages/components/radio/index.js.gz +0 -0
  72. package/packages/components/scrollbar/index.js +1442 -915
  73. package/packages/components/scrollbar/index.js.gz +0 -0
  74. package/packages/components/search/index.js +5261 -89
  75. package/packages/components/search/index.js.gz +0 -0
  76. package/packages/components/search-form/index.js +1010 -920
  77. package/packages/components/search-form/index.js.gz +0 -0
  78. package/packages/components/select/index.js +10505 -379
  79. package/packages/components/select/index.js.gz +0 -0
  80. package/packages/components/select-list/index.js +1433 -1173
  81. package/packages/components/select-list/index.js.gz +0 -0
  82. package/packages/components/special-range-picker-month/index.js +2645 -196
  83. package/packages/components/special-range-picker-month/index.js.gz +0 -0
  84. package/packages/components/special-range-picker-year/index.js +2710 -259
  85. package/packages/components/special-range-picker-year/index.js.gz +0 -0
  86. package/packages/components/spin/index.js +3534 -48
  87. package/packages/components/spin/index.js.gz +0 -0
  88. package/packages/components/step/index.js +4085 -28
  89. package/packages/components/step/index.js.gz +0 -0
  90. package/packages/components/steps/index.js +4070 -14
  91. package/packages/components/steps/index.js.gz +0 -0
  92. package/packages/components/switch/index.js +547 -31
  93. package/packages/components/switch/index.js.gz +0 -0
  94. package/packages/components/table/index.js +17503 -5201
  95. package/packages/components/table/index.js.gz +0 -0
  96. package/packages/components/tabs/index.js +12630 -172
  97. package/packages/components/tabs/index.js.gz +0 -0
  98. package/packages/components/tag/index.js +325 -55
  99. package/packages/components/tag/index.js.gz +0 -0
  100. package/packages/components/time-line/index.js +3397 -60
  101. package/packages/components/time-line/index.js.gz +0 -0
  102. package/packages/components/tooltip/index.js +2174 -65
  103. package/packages/components/tooltip/index.js.gz +0 -0
  104. package/packages/components/tree/index.js +6747 -1881
  105. package/packages/components/tree/index.js.gz +0 -0
  106. package/packages/components/tree-select/index.js +2778 -358
  107. package/packages/components/tree-select/index.js.gz +0 -0
  108. package/packages/components/upload/index.js +11726 -115
  109. package/packages/components/upload/index.js.gz +0 -0
  110. package/packages/components/virtual-tree/index.js +2928 -86
  111. package/packages/components/virtual-tree/index.js.gz +0 -0
  112. package/packages/components/watermark/index.js +368 -17
  113. package/packages/components/watermark/index.js.gz +0 -0
@@ -1,58 +1,468 @@
1
1
  import '@das-fed/ui/packages/components/progress/style.css';
2
- import { withInstall as L } from "@das-fed/utils/with-install/index";
3
- import { ElIcon as A, ElProgress as M } from "element-plus/es";
4
- import "element-plus/es/components/base/style/css";
5
- import "element-plus/es/components/progress/style/css";
6
- import "element-plus/es/components/icon/style/css";
7
- import { defineComponent as h, openBlock as s, createElementBlock as o, createElementVNode as d, useCssVars as N, computed as a, ref as W, normalizeStyle as T, createVNode as x, mergeProps as D, withCtx as B, renderSlot as F, Fragment as O, toDisplayString as c, createCommentVNode as l, createBlock as _, unref as g, normalizeClass as V, pushScopeId as R, popScopeId as j } from "vue";
8
- import { DasIcon as b } from "@das-fed/ui/packages/components/icon/index";
9
- import { getVarValue as q, getVar as G, setThemeRule as H } from "@das-fed/web/packages/theme/index";
2
+ import { withInstall as Z } from "@das-fed/utils/with-install/index";
3
+ import "element-plus/theme-chalk/base.css";
4
+ import "element-plus/theme-chalk/el-progress.css";
5
+ import "element-plus/theme-chalk/el-icon.css";
6
+ import { defineComponent as w, openBlock as c, createElementBlock as u, createElementVNode as v, warn as ee, getCurrentInstance as te, inject as se, ref as F, computed as p, unref as l, mergeProps as q, renderSlot as M, normalizeClass as x, normalizeStyle as C, toDisplayString as T, createCommentVNode as _, createBlock as O, withCtx as W, resolveDynamicComponent as re, useCssVars as ae, createVNode as j, Fragment as oe, pushScopeId as ne, popScopeId as le } from "vue";
7
+ import { DasIcon as K } from "@das-fed/ui/packages/components/icon/index";
8
+ import { getVarValue as ce, getVar as ie, setThemeRule as ue } from "@das-fed/web/packages/theme/index";
9
+ /**
10
+ * @vue/shared v3.4.35
11
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
12
+ * @license MIT
13
+ **/
14
+ process.env.NODE_ENV !== "production" && Object.freeze({});
15
+ process.env.NODE_ENV !== "production" && Object.freeze([]);
16
+ const pe = Object.prototype.hasOwnProperty, U = (e, s) => pe.call(e, s), de = (e) => typeof e == "function", z = (e) => typeof e == "string", J = (e) => e !== null && typeof e == "object";
17
+ function ve(e) {
18
+ for (var s = -1, t = e == null ? 0 : e.length, o = {}; ++s < t; ) {
19
+ var i = e[s];
20
+ o[i[0]] = i[1];
21
+ }
22
+ return o;
23
+ }
24
+ const fe = (e) => e === void 0, _e = (e) => typeof e == "number", he = (e) => z(e) ? !Number.isNaN(Number(e)) : !1;
25
+ class ge extends Error {
26
+ constructor(s) {
27
+ super(s), this.name = "ElementPlusError";
28
+ }
29
+ }
30
+ function me(e, s) {
31
+ if (process.env.NODE_ENV !== "production") {
32
+ const t = z(e) ? new ge(`[${e}] ${s}`) : e;
33
+ }
34
+ }
35
+ const ye = "utils/dom/style";
36
+ function we(e, s = "px") {
37
+ if (!e)
38
+ return "";
39
+ if (_e(e) || he(e))
40
+ return `${e}${s}`;
41
+ if (z(e))
42
+ return e;
43
+ me(ye, "binding value must be a string or number");
44
+ }
10
45
  /*! Element Plus Icons Vue v2.3.1 */
11
- var J = /* @__PURE__ */ h({
46
+ var ke = /* @__PURE__ */ w({
47
+ name: "Check",
48
+ __name: "check",
49
+ setup(e) {
50
+ return (s, t) => (c(), u("svg", {
51
+ xmlns: "http://www.w3.org/2000/svg",
52
+ viewBox: "0 0 1024 1024"
53
+ }, [
54
+ v("path", {
55
+ fill: "currentColor",
56
+ d: "M406.656 706.944 195.84 496.256a32 32 0 1 0-45.248 45.248l256 256 512-512a32 32 0 0 0-45.248-45.248L406.592 706.944z"
57
+ })
58
+ ]));
59
+ }
60
+ }), $e = ke, be = /* @__PURE__ */ w({
61
+ name: "CircleCheck",
62
+ __name: "circle-check",
63
+ setup(e) {
64
+ return (s, t) => (c(), u("svg", {
65
+ xmlns: "http://www.w3.org/2000/svg",
66
+ viewBox: "0 0 1024 1024"
67
+ }, [
68
+ v("path", {
69
+ fill: "currentColor",
70
+ d: "M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"
71
+ }),
72
+ v("path", {
73
+ fill: "currentColor",
74
+ d: "M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752l265.344-265.408z"
75
+ })
76
+ ]));
77
+ }
78
+ }), xe = be, Te = /* @__PURE__ */ w({
79
+ name: "CircleClose",
80
+ __name: "circle-close",
81
+ setup(e) {
82
+ return (s, t) => (c(), u("svg", {
83
+ xmlns: "http://www.w3.org/2000/svg",
84
+ viewBox: "0 0 1024 1024"
85
+ }, [
86
+ v("path", {
87
+ fill: "currentColor",
88
+ d: "m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248z"
89
+ }),
90
+ v("path", {
91
+ fill: "currentColor",
92
+ d: "M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"
93
+ })
94
+ ]));
95
+ }
96
+ }), Ne = Te, Pe = /* @__PURE__ */ w({
12
97
  name: "CloseBold",
13
98
  __name: "close-bold",
14
- setup(u) {
15
- return (v, t) => (s(), o("svg", {
99
+ setup(e) {
100
+ return (s, t) => (c(), u("svg", {
16
101
  xmlns: "http://www.w3.org/2000/svg",
17
102
  viewBox: "0 0 1024 1024"
18
103
  }, [
19
- d("path", {
104
+ v("path", {
20
105
  fill: "currentColor",
21
106
  d: "M195.2 195.2a64 64 0 0 1 90.496 0L512 421.504 738.304 195.2a64 64 0 0 1 90.496 90.496L602.496 512 828.8 738.304a64 64 0 0 1-90.496 90.496L512 602.496 285.696 828.8a64 64 0 0 1-90.496-90.496L421.504 512 195.2 285.696a64 64 0 0 1 0-90.496z"
22
107
  })
23
108
  ]));
24
109
  }
25
- }), K = J, Q = /* @__PURE__ */ h({
110
+ }), Ce = Pe, Be = /* @__PURE__ */ w({
111
+ name: "Close",
112
+ __name: "close",
113
+ setup(e) {
114
+ return (s, t) => (c(), u("svg", {
115
+ xmlns: "http://www.w3.org/2000/svg",
116
+ viewBox: "0 0 1024 1024"
117
+ }, [
118
+ v("path", {
119
+ fill: "currentColor",
120
+ d: "M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"
121
+ })
122
+ ]));
123
+ }
124
+ }), Ve = Be, Se = /* @__PURE__ */ w({
26
125
  name: "Select",
27
126
  __name: "select",
28
- setup(u) {
29
- return (v, t) => (s(), o("svg", {
127
+ setup(e) {
128
+ return (s, t) => (c(), u("svg", {
30
129
  xmlns: "http://www.w3.org/2000/svg",
31
130
  viewBox: "0 0 1024 1024"
32
131
  }, [
33
- d("path", {
132
+ v("path", {
34
133
  fill: "currentColor",
35
134
  d: "M77.248 415.04a64 64 0 0 1 90.496 0l226.304 226.304L846.528 188.8a64 64 0 1 1 90.56 90.496l-543.04 543.04-316.8-316.8a64 64 0 0 1 0-90.496z"
36
135
  })
37
136
  ]));
38
137
  }
39
- }), U = Q;
40
- const X = (u) => (R("data-v-19bd4676"), u = u(), j(), u), Y = {
138
+ }), Ee = Se, Ie = /* @__PURE__ */ w({
139
+ name: "WarningFilled",
140
+ __name: "warning-filled",
141
+ setup(e) {
142
+ return (s, t) => (c(), u("svg", {
143
+ xmlns: "http://www.w3.org/2000/svg",
144
+ viewBox: "0 0 1024 1024"
145
+ }, [
146
+ v("path", {
147
+ fill: "currentColor",
148
+ d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 192a58.432 58.432 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.432 58.432 0 0 0 512 256m0 512a51.2 51.2 0 1 0 0-102.4 51.2 51.2 0 0 0 0 102.4"
149
+ })
150
+ ]));
151
+ }
152
+ }), Oe = Ie;
153
+ const R = "__epPropKey", D = (e) => e, ze = (e) => J(e) && !!e[R], Le = (e, s) => {
154
+ if (!J(e) || ze(e))
155
+ return e;
156
+ const { values: t, required: o, default: i, type: f, validator: d } = e, k = {
157
+ type: f,
158
+ required: !!o,
159
+ validator: t || d ? (g) => {
160
+ let m = !1, $ = [];
161
+ if (t && ($ = Array.from(t), U(e, "default") && $.push(i), m || (m = $.includes(g))), d && (m || (m = d(g))), !m && $.length > 0) {
162
+ const S = [...new Set($)].map((b) => JSON.stringify(b)).join(", ");
163
+ ee(`Invalid prop: validation failed${s ? ` for prop "${s}"` : ""}. Expected one of [${S}], got value ${JSON.stringify(g)}.`);
164
+ }
165
+ return m;
166
+ } : void 0,
167
+ [R]: !0
168
+ };
169
+ return U(e, "default") && (k.default = i), k;
170
+ }, G = (e) => ve(Object.entries(e).map(([s, t]) => [
171
+ s,
172
+ Le(t, s)
173
+ ])), H = (e, s) => (e.install = (t) => {
174
+ for (const o of [e, ...Object.values({})])
175
+ t.component(o.name, o);
176
+ }, e), A = "el", De = "is-", B = (e, s, t, o, i) => {
177
+ let f = `${e}-${s}`;
178
+ return t && (f += `-${t}`), o && (f += `__${o}`), i && (f += `--${i}`), f;
179
+ }, Me = Symbol("namespaceContextKey"), Ae = (e) => {
180
+ const s = te() ? se(Me, F(A)) : F(A);
181
+ return p(() => l(s) || A);
182
+ }, Q = (e, s) => {
183
+ const t = Ae();
184
+ return {
185
+ namespace: t,
186
+ b: (n = "") => B(t.value, e, n, "", ""),
187
+ e: (n) => n ? B(t.value, e, "", n, "") : "",
188
+ m: (n) => n ? B(t.value, e, "", "", n) : "",
189
+ be: (n, r) => n && r ? B(t.value, e, n, r, "") : "",
190
+ em: (n, r) => n && r ? B(t.value, e, "", n, r) : "",
191
+ bm: (n, r) => n && r ? B(t.value, e, n, "", r) : "",
192
+ bem: (n, r, h) => n && r && h ? B(t.value, e, n, r, h) : "",
193
+ is: (n, ...r) => {
194
+ const h = r.length >= 1 ? r[0] : !0;
195
+ return n && h ? `${De}${n}` : "";
196
+ },
197
+ cssVar: (n) => {
198
+ const r = {};
199
+ for (const h in n)
200
+ n[h] && (r[`--${t.value}-${h}`] = n[h]);
201
+ return r;
202
+ },
203
+ cssVarName: (n) => `--${t.value}-${n}`,
204
+ cssVarBlock: (n) => {
205
+ const r = {};
206
+ for (const h in n)
207
+ n[h] && (r[`--${t.value}-${e}-${h}`] = n[h]);
208
+ return r;
209
+ },
210
+ cssVarBlockName: (n) => `--${t.value}-${e}-${n}`
211
+ };
212
+ };
213
+ var X = (e, s) => {
214
+ const t = e.__vccOpts || e;
215
+ for (const [o, i] of s)
216
+ t[o] = i;
217
+ return t;
218
+ };
219
+ const Fe = G({
220
+ size: {
221
+ type: D([Number, String])
222
+ },
223
+ color: {
224
+ type: String
225
+ }
226
+ }), We = w({
227
+ name: "ElIcon",
228
+ inheritAttrs: !1
229
+ }), je = /* @__PURE__ */ w({
230
+ ...We,
231
+ props: Fe,
232
+ setup(e) {
233
+ const s = e, t = Q("icon"), o = p(() => {
234
+ const { size: i, color: f } = s;
235
+ return !i && !f ? {} : {
236
+ fontSize: fe(i) ? void 0 : we(i),
237
+ "--color": f
238
+ };
239
+ });
240
+ return (i, f) => (c(), u("i", q({
241
+ class: l(t).b(),
242
+ style: l(o)
243
+ }, i.$attrs), [
244
+ M(i.$slots, "default")
245
+ ], 16));
246
+ }
247
+ });
248
+ var Ke = /* @__PURE__ */ X(je, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/icon/src/icon.vue"]]);
249
+ const Y = H(Ke), Ue = G({
250
+ type: {
251
+ type: String,
252
+ default: "line",
253
+ values: ["line", "circle", "dashboard"]
254
+ },
255
+ percentage: {
256
+ type: Number,
257
+ default: 0,
258
+ validator: (e) => e >= 0 && e <= 100
259
+ },
260
+ status: {
261
+ type: String,
262
+ default: "",
263
+ values: ["", "success", "exception", "warning"]
264
+ },
265
+ indeterminate: {
266
+ type: Boolean,
267
+ default: !1
268
+ },
269
+ duration: {
270
+ type: Number,
271
+ default: 3
272
+ },
273
+ strokeWidth: {
274
+ type: Number,
275
+ default: 6
276
+ },
277
+ strokeLinecap: {
278
+ type: D(String),
279
+ default: "round"
280
+ },
281
+ textInside: {
282
+ type: Boolean,
283
+ default: !1
284
+ },
285
+ width: {
286
+ type: Number,
287
+ default: 126
288
+ },
289
+ showText: {
290
+ type: Boolean,
291
+ default: !0
292
+ },
293
+ color: {
294
+ type: D([
295
+ String,
296
+ Array,
297
+ Function
298
+ ]),
299
+ default: ""
300
+ },
301
+ striped: Boolean,
302
+ stripedFlow: Boolean,
303
+ format: {
304
+ type: D(Function),
305
+ default: (e) => `${e}%`
306
+ }
307
+ }), qe = ["aria-valuenow"], Je = { viewBox: "0 0 100 100" }, Re = ["d", "stroke", "stroke-linecap", "stroke-width"], Ge = ["d", "stroke", "opacity", "stroke-linecap", "stroke-width"], He = { key: 0 }, Qe = w({
308
+ name: "ElProgress"
309
+ }), Xe = /* @__PURE__ */ w({
310
+ ...Qe,
311
+ props: Ue,
312
+ setup(e) {
313
+ const s = e, t = {
314
+ success: "#13ce66",
315
+ exception: "#ff4949",
316
+ warning: "#e6a23c",
317
+ default: "#20a0ff"
318
+ }, o = Q("progress"), i = p(() => ({
319
+ width: `${s.percentage}%`,
320
+ animationDuration: `${s.duration}s`,
321
+ backgroundColor: L(s.percentage)
322
+ })), f = p(() => (s.strokeWidth / s.width * 100).toFixed(1)), d = p(() => ["circle", "dashboard"].includes(s.type) ? Number.parseInt(`${50 - Number.parseFloat(f.value) / 2}`, 10) : 0), V = p(() => {
323
+ const a = d.value, y = s.type === "dashboard";
324
+ return `
325
+ M 50 50
326
+ m 0 ${y ? "" : "-"}${a}
327
+ a ${a} ${a} 0 1 1 0 ${y ? "-" : ""}${a * 2}
328
+ a ${a} ${a} 0 1 1 0 ${y ? "" : "-"}${a * 2}
329
+ `;
330
+ }), k = p(() => 2 * Math.PI * d.value), g = p(() => s.type === "dashboard" ? 0.75 : 1), m = p(() => `${-1 * k.value * (1 - g.value) / 2}px`), $ = p(() => ({
331
+ strokeDasharray: `${k.value * g.value}px, ${k.value}px`,
332
+ strokeDashoffset: m.value
333
+ })), S = p(() => ({
334
+ strokeDasharray: `${k.value * g.value * (s.percentage / 100)}px, ${k.value}px`,
335
+ strokeDashoffset: m.value,
336
+ transition: "stroke-dasharray 0.6s ease 0s, stroke 0.6s ease, opacity ease 0.6s"
337
+ })), b = p(() => {
338
+ let a;
339
+ return s.color ? a = L(s.percentage) : a = t[s.status] || t.default, a;
340
+ }), P = p(() => s.status === "warning" ? Oe : s.type === "line" ? s.status === "success" ? xe : Ne : s.status === "success" ? $e : Ve), n = p(() => s.type === "line" ? 12 + s.strokeWidth * 0.4 : s.width * 0.111111 + 2), r = p(() => s.format(s.percentage));
341
+ function h(a) {
342
+ const y = 100 / a.length;
343
+ return a.map((N, I) => z(N) ? {
344
+ color: N,
345
+ percentage: (I + 1) * y
346
+ } : N).sort((N, I) => N.percentage - I.percentage);
347
+ }
348
+ const L = (a) => {
349
+ var y;
350
+ const { color: E } = s;
351
+ if (de(E))
352
+ return E(a);
353
+ if (z(E))
354
+ return E;
355
+ {
356
+ const N = h(E);
357
+ for (const I of N)
358
+ if (I.percentage > a)
359
+ return I.color;
360
+ return (y = N[N.length - 1]) == null ? void 0 : y.color;
361
+ }
362
+ };
363
+ return (a, y) => (c(), u("div", {
364
+ class: x([
365
+ l(o).b(),
366
+ l(o).m(a.type),
367
+ l(o).is(a.status),
368
+ {
369
+ [l(o).m("without-text")]: !a.showText,
370
+ [l(o).m("text-inside")]: a.textInside
371
+ }
372
+ ]),
373
+ role: "progressbar",
374
+ "aria-valuenow": a.percentage,
375
+ "aria-valuemin": "0",
376
+ "aria-valuemax": "100"
377
+ }, [
378
+ a.type === "line" ? (c(), u("div", {
379
+ key: 0,
380
+ class: x(l(o).b("bar"))
381
+ }, [
382
+ v("div", {
383
+ class: x(l(o).be("bar", "outer")),
384
+ style: C({ height: `${a.strokeWidth}px` })
385
+ }, [
386
+ v("div", {
387
+ class: x([
388
+ l(o).be("bar", "inner"),
389
+ { [l(o).bem("bar", "inner", "indeterminate")]: a.indeterminate },
390
+ { [l(o).bem("bar", "inner", "striped")]: a.striped },
391
+ { [l(o).bem("bar", "inner", "striped-flow")]: a.stripedFlow }
392
+ ]),
393
+ style: C(l(i))
394
+ }, [
395
+ (a.showText || a.$slots.default) && a.textInside ? (c(), u("div", {
396
+ key: 0,
397
+ class: x(l(o).be("bar", "innerText"))
398
+ }, [
399
+ M(a.$slots, "default", { percentage: a.percentage }, () => [
400
+ v("span", null, T(l(r)), 1)
401
+ ])
402
+ ], 2)) : _("v-if", !0)
403
+ ], 6)
404
+ ], 6)
405
+ ], 2)) : (c(), u("div", {
406
+ key: 1,
407
+ class: x(l(o).b("circle")),
408
+ style: C({ height: `${a.width}px`, width: `${a.width}px` })
409
+ }, [
410
+ (c(), u("svg", Je, [
411
+ v("path", {
412
+ class: x(l(o).be("circle", "track")),
413
+ d: l(V),
414
+ stroke: `var(${l(o).cssVarName("fill-color-light")}, #e5e9f2)`,
415
+ "stroke-linecap": a.strokeLinecap,
416
+ "stroke-width": l(f),
417
+ fill: "none",
418
+ style: C(l($))
419
+ }, null, 14, Re),
420
+ v("path", {
421
+ class: x(l(o).be("circle", "path")),
422
+ d: l(V),
423
+ stroke: l(b),
424
+ fill: "none",
425
+ opacity: a.percentage ? 1 : 0,
426
+ "stroke-linecap": a.strokeLinecap,
427
+ "stroke-width": l(f),
428
+ style: C(l(S))
429
+ }, null, 14, Ge)
430
+ ]))
431
+ ], 6)),
432
+ (a.showText || a.$slots.default) && !a.textInside ? (c(), u("div", {
433
+ key: 2,
434
+ class: x(l(o).e("text")),
435
+ style: C({ fontSize: `${l(n)}px` })
436
+ }, [
437
+ M(a.$slots, "default", { percentage: a.percentage }, () => [
438
+ a.status ? (c(), O(l(Y), { key: 1 }, {
439
+ default: W(() => [
440
+ (c(), O(re(l(P))))
441
+ ]),
442
+ _: 1
443
+ })) : (c(), u("span", He, T(l(r)), 1))
444
+ ])
445
+ ], 6)) : _("v-if", !0)
446
+ ], 10, qe));
447
+ }
448
+ });
449
+ var Ye = /* @__PURE__ */ X(Xe, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/progress/src/progress.vue"]]);
450
+ const Ze = H(Ye), et = (e) => (ne("data-v-19bd4676"), e = e(), le(), e), tt = {
41
451
  key: 0,
42
452
  class: "percentage-color"
43
- }, Z = { key: 0 }, ee = { class: "percentage-value" }, te = /* @__PURE__ */ X(() => /* @__PURE__ */ d("span", null, "%", -1)), se = { key: 1 }, re = { class: "percentage-value" }, oe = { key: 1 }, le = {
453
+ }, st = { key: 0 }, rt = { class: "percentage-value" }, at = /* @__PURE__ */ et(() => /* @__PURE__ */ v("span", null, "%", -1)), ot = { key: 1 }, nt = { class: "percentage-value" }, lt = { key: 1 }, ct = {
44
454
  key: 0,
45
455
  class: "end-text"
46
- }, ae = {
456
+ }, it = {
47
457
  key: 1,
48
458
  class: "end-text"
49
- }, ne = {
459
+ }, ut = {
50
460
  key: 0,
51
461
  class: "line-left"
52
- }, ue = { key: 1 }, ie = { key: 2 }, ce = {
462
+ }, pt = { key: 1 }, dt = { key: 2 }, vt = {
53
463
  key: 1,
54
464
  class: "tip-circle"
55
- }, pe = /* @__PURE__ */ h({
465
+ }, ft = /* @__PURE__ */ w({
56
466
  __name: "Index",
57
467
  props: {
58
468
  modelValue: { default: 0 },
@@ -70,131 +480,131 @@ const X = (u) => (R("data-v-19bd4676"), u = u(), j(), u), Y = {
70
480
  showEndText: { type: Boolean, default: !1 },
71
481
  singleTipPosition: { default: "" }
72
482
  },
73
- setup(u, { expose: v }) {
74
- N((e) => ({
75
- fd69366e: z.value
483
+ setup(e, { expose: s }) {
484
+ ae((r) => ({
485
+ fd69366e: m.value
76
486
  }));
77
- const t = u, i = a(() => t.tipType === "percentage" ? 100 : t.percentages), n = a(() => {
78
- let e = t.modelValue;
79
- return e < 0 && (e = 0), e > i.value && (e = i.value), e;
80
- }), P = a(() => t.tipType === "percentage" ? n.value : n.value !== 0 ? Number(n.value / i.value) * 100 : 0), r = a(() => !t.status || t.status === "normal" ? i.value > 0 && n.value === i.value ? "success" : "normal" : t.status), C = a(() => {
487
+ const t = e, o = p(() => t.tipType === "percentage" ? 100 : t.percentages), i = p(() => {
488
+ let r = t.modelValue;
489
+ return r < 0 && (r = 0), r > o.value && (r = o.value), r;
490
+ }), f = p(() => t.tipType === "percentage" ? i.value : i.value !== 0 ? Number(i.value / o.value) * 100 : 0), d = p(() => !t.status || t.status === "normal" ? o.value > 0 && i.value === o.value ? "success" : "normal" : t.status), V = p(() => {
81
491
  if (t.strokeWidth)
82
492
  return t.strokeWidth;
83
493
  if (t.type === "line") return 8;
84
494
  if (t.type === "circle") return 4;
85
- }), I = a(() => {
495
+ }), k = p(() => {
86
496
  if (t.showText)
87
497
  return t.showText;
88
498
  if (t.type === "line") return !1;
89
499
  if (t.type === "circle") return !0;
90
- }), y = a(() => q(`--das-ui-progress-${r.value}`).value || ""), z = a(() => {
91
- let e = "";
92
- return r.value === "normal" ? e = "--das-ui-progress-percentage-tip" : e = `--das-ui-progress-${r.value}`, G(e);
93
- }), m = a(() => {
94
- let e = 1;
95
- return r.value === "normal" && (e = 0), r.value === "exception" && (e = 1), r.value === "success" && (e = 2), t.textMap[e];
96
- }), E = a(() => {
97
- if (["success", "exception"].includes(r.value)) return "center";
98
- if (f.value && p.value) return "";
500
+ }), g = p(() => ce(`--das-ui-progress-${d.value}`).value || ""), m = p(() => {
501
+ let r = "";
502
+ return d.value === "normal" ? r = "--das-ui-progress-percentage-tip" : r = `--das-ui-progress-${d.value}`, ie(r);
503
+ }), $ = p(() => {
504
+ let r = 1;
505
+ return d.value === "normal" && (r = 0), d.value === "exception" && (r = 1), d.value === "success" && (r = 2), t.textMap[r];
506
+ }), S = p(() => {
507
+ if (["success", "exception"].includes(d.value)) return "center";
508
+ if (P.value && b.value) return "";
99
509
  if (t.singleTipPosition) return t.singleTipPosition;
100
- if (!f.value && p.value) return "right";
101
- if (f.value && !p.value) return "left";
102
- }), p = a(() => ["success", "exception"].includes(r.value) ? !1 : t.showProcessTip), f = a(() => t.showTextTip), w = W(null);
103
- return v({
104
- $progress: w
105
- }), (e, _e) => {
106
- const S = A, $ = M;
107
- return s(), o("div", {
510
+ if (!P.value && b.value) return "right";
511
+ if (P.value && !b.value) return "left";
512
+ }), b = p(() => ["success", "exception"].includes(d.value) ? !1 : t.showProcessTip), P = p(() => t.showTextTip), n = F(null);
513
+ return s({
514
+ $progress: n
515
+ }), (r, h) => {
516
+ const L = Y, a = Ze;
517
+ return c(), u("div", {
108
518
  class: "das-ui-progress",
109
- style: T({ display: e.type == "circle" ? "inline-block" : "block" })
519
+ style: C({ display: r.type == "circle" ? "inline-block" : "block" })
110
520
  }, [
111
- d("div", {
521
+ v("div", {
112
522
  class: "percentage-graph",
113
- style: T({ width: e.type == "circle" ? e.width + "px" : "100%" })
523
+ style: C({ width: r.type == "circle" ? r.width + "px" : "100%" })
114
524
  }, [
115
- x($, D({
525
+ j(a, q({
116
526
  ref_key: "$progress",
117
- ref: w,
527
+ ref: n,
118
528
  class: {
119
- showLoading: t.showAnimation && t.type === "line" && r.value === "normal" && !e.$attrs.indeterminate
529
+ showLoading: t.showAnimation && t.type === "line" && d.value === "normal" && !r.$attrs.indeterminate
120
530
  },
121
- type: e.type
122
- }, e.$attrs, {
123
- color: y.value,
124
- percentage: P.value,
125
- width: e.width,
126
- "stroke-width": C.value,
127
- "show-text": I.value
531
+ type: r.type
532
+ }, r.$attrs, {
533
+ color: g.value,
534
+ percentage: f.value,
535
+ width: r.width,
536
+ "stroke-width": V.value,
537
+ "show-text": k.value
128
538
  }), {
129
- default: B(({ percentage: k }) => [
130
- F(e.$slots, "default", { percentage: k }, () => [
131
- t.type === "circle" ? (s(), o(O, { key: 0 }, [
132
- r.value === "normal" ? (s(), o("div", Y, [
133
- e.tipType === "percentage" ? (s(), o("div", Z, [
134
- d("span", ee, c(k), 1),
135
- te
136
- ])) : l("", !0),
137
- e.tipType === "score" ? (s(), o("div", se, [
138
- d("span", re, c(n.value + "/" + i.value), 1)
139
- ])) : l("", !0)
140
- ])) : (s(), o("div", oe, [
141
- x(S, { size: 40 }, {
142
- default: B(() => [
143
- r.value === "success" ? (s(), _(g(U), {
539
+ default: W(({ percentage: y }) => [
540
+ M(r.$slots, "default", { percentage: y }, () => [
541
+ t.type === "circle" ? (c(), u(oe, { key: 0 }, [
542
+ d.value === "normal" ? (c(), u("div", tt, [
543
+ r.tipType === "percentage" ? (c(), u("div", st, [
544
+ v("span", rt, T(y), 1),
545
+ at
546
+ ])) : _("", !0),
547
+ r.tipType === "score" ? (c(), u("div", ot, [
548
+ v("span", nt, T(i.value + "/" + o.value), 1)
549
+ ])) : _("", !0)
550
+ ])) : (c(), u("div", lt, [
551
+ j(L, { size: 40 }, {
552
+ default: W(() => [
553
+ d.value === "success" ? (c(), O(l(Ee), {
144
554
  key: 0,
145
- color: y.value
146
- }, null, 8, ["color"])) : l("", !0),
147
- r.value === "exception" ? (s(), _(g(K), {
555
+ color: g.value
556
+ }, null, 8, ["color"])) : _("", !0),
557
+ d.value === "exception" ? (c(), O(l(Ce), {
148
558
  key: 1,
149
- color: y.value
150
- }, null, 8, ["color"])) : l("", !0)
559
+ color: g.value
560
+ }, null, 8, ["color"])) : _("", !0)
151
561
  ]),
152
562
  _: 1
153
563
  })
154
564
  ]))
155
- ], 64)) : l("", !0)
565
+ ], 64)) : _("", !0)
156
566
  ], !0)
157
567
  ]),
158
568
  _: 3
159
569
  }, 16, ["class", "type", "color", "percentage", "width", "stroke-width", "show-text"]),
160
- t.type === "line" ? (s(), o("div", {
570
+ t.type === "line" ? (c(), u("div", {
161
571
  key: 0,
162
- class: V(["line-icon", r.value])
572
+ class: x(["line-icon", d.value])
163
573
  }, [
164
- e.tipType === "percentage" && e.showEndText && r.value === "normal" ? (s(), o("span", le, c(n.value) + "%", 1)) : l("", !0),
165
- e.tipType === "score" && e.showEndText && r.value === "normal" ? (s(), o("span", ae, c(n.value + "/" + i.value), 1)) : l("", !0),
166
- r.value === "success" ? (s(), _(g(b), {
574
+ r.tipType === "percentage" && r.showEndText && d.value === "normal" ? (c(), u("span", ct, T(i.value) + "%", 1)) : _("", !0),
575
+ r.tipType === "score" && r.showEndText && d.value === "normal" ? (c(), u("span", it, T(i.value + "/" + o.value), 1)) : _("", !0),
576
+ d.value === "success" ? (c(), O(l(K), {
167
577
  key: 2,
168
578
  icon: "success",
169
579
  "icon-color": "#12AA53",
170
580
  "custom-size": "14px"
171
- })) : l("", !0),
172
- r.value === "exception" ? (s(), _(g(b), {
581
+ })) : _("", !0),
582
+ d.value === "exception" ? (c(), O(l(K), {
173
583
  key: 3,
174
584
  icon: "reload",
175
585
  "icon-color": "red",
176
586
  "custom-size": "16px"
177
- })) : l("", !0)
178
- ], 2)) : l("", !0)
587
+ })) : _("", !0)
588
+ ], 2)) : _("", !0)
179
589
  ], 4),
180
- t.type === "line" && (f.value || p.value) ? (s(), o("div", {
590
+ t.type === "line" && (P.value || b.value) ? (c(), u("div", {
181
591
  key: 0,
182
- class: V(["tip-line", E.value])
592
+ class: x(["tip-line", S.value])
183
593
  }, [
184
- f.value ? (s(), o("div", ne, c(m.value), 1)) : l("", !0),
185
- e.tipType === "percentage" && p.value ? (s(), o("div", ue, c(n.value) + "%", 1)) : l("", !0),
186
- e.tipType === "score" && p.value ? (s(), o("div", ie, c(n.value + "/" + i.value), 1)) : l("", !0)
187
- ], 2)) : l("", !0),
188
- t.type === "circle" ? (s(), o("div", ce, c(m.value), 1)) : l("", !0)
594
+ P.value ? (c(), u("div", ut, T($.value), 1)) : _("", !0),
595
+ r.tipType === "percentage" && b.value ? (c(), u("div", pt, T(i.value) + "%", 1)) : _("", !0),
596
+ r.tipType === "score" && b.value ? (c(), u("div", dt, T(i.value + "/" + o.value), 1)) : _("", !0)
597
+ ], 2)) : _("", !0),
598
+ t.type === "circle" ? (c(), u("div", vt, T($.value), 1)) : _("", !0)
189
599
  ], 4);
190
600
  };
191
601
  }
192
- }), de = (u, v) => {
193
- const t = u.__vccOpts || u;
194
- for (const [i, n] of v)
195
- t[i] = n;
602
+ }), _t = (e, s) => {
603
+ const t = e.__vccOpts || e;
604
+ for (const [o, i] of s)
605
+ t[o] = i;
196
606
  return t;
197
- }, ve = /* @__PURE__ */ de(pe, [["__scopeId", "data-v-19bd4676"]]), fe = {
607
+ }, ht = /* @__PURE__ */ _t(ft, [["__scopeId", "data-v-19bd4676"]]), gt = {
198
608
  "--das-ui-progress-normal": "#5582F3",
199
609
  "--das-ui-progress-success": "#1BA854",
200
610
  "--das-ui-progress-exception": "#FB2323",
@@ -203,9 +613,9 @@ const X = (u) => (R("data-v-19bd4676"), u = u(), j(), u), Y = {
203
613
  "--das-ui-progress-loading-start": "#64abff",
204
614
  "--das-ui-progress-loading-end": "#276ff5"
205
615
  };
206
- H(fe);
207
- const Be = L(ve);
616
+ ue(gt);
617
+ const Tt = Z(ht);
208
618
  export {
209
- Be as DasProgress,
210
- Be as default
619
+ Tt as DasProgress,
620
+ Tt as default
211
621
  };