fancy-plugins-components 1.0.7 → 1.0.8

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.
@@ -0,0 +1,22 @@
1
+ import { defineComponent as e, createBlock as o, openBlock as n, unref as r, withCtx as p, createTextVNode as a } from "vue";
2
+ import { ElButton as s } from "element-plus";
3
+ const f = /* @__PURE__ */ e({
4
+ name: "FancyButton",
5
+ __name: "button",
6
+ props: {
7
+ type: {},
8
+ size: {},
9
+ loading: {}
10
+ },
11
+ setup(u) {
12
+ return (m, t) => (n(), o(r(s), { class: "test_btn" }, {
13
+ default: p(() => [...t[0] || (t[0] = [
14
+ a("123", -1)
15
+ ])]),
16
+ _: 1
17
+ }));
18
+ }
19
+ });
20
+ export {
21
+ f as default
22
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./button.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,4 @@
1
+ import { default as o } from "./Button/button.vue.js";
2
+ export {
3
+ o as FancyButton
4
+ };
@@ -0,0 +1,6 @@
1
+ import { default as r } from "./Button/button.vue.js";
2
+ import { installer as e } from "./installer.js";
3
+ export {
4
+ r as FancyButton,
5
+ e as installer
6
+ };
@@ -0,0 +1,12 @@
1
+ import * as n from "./components.js";
2
+ const c = {
3
+ install(t) {
4
+ Object.keys(n).forEach((e) => {
5
+ const o = n[e];
6
+ o && o.name && t.component(o.name, o);
7
+ });
8
+ }
9
+ };
10
+ export {
11
+ c as installer
12
+ };
package/package.json CHANGED
@@ -1,17 +1,15 @@
1
1
  {
2
2
  "name": "fancy-plugins-components",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "",
5
- "main": "./dist/fancy-components.js",
6
- "module": "./dist/fancy-components.js",
7
- "types": "./dist/fancy-components.d.ts",
5
+ "main": "./dist/es/index.js",
6
+ "module": "./dist/es/index.js",
7
+ "types": "./dist/es/index.d.ts",
8
8
  "exports": {
9
9
  ".": {
10
- "types": "./dist/fancy-components.d.ts",
11
- "import": "./dist/fancy-components.js",
12
- "require": "./dist/fancy-components.umd.cjs"
13
- },
14
- "./dist/styles/*": "./dist/styles/*"
10
+ "types": "./dist/es/index.d.ts",
11
+ "import": "./dist/es/index.js"
12
+ }
15
13
  },
16
14
  "files": [
17
15
  "dist"
@@ -1,2 +0,0 @@
1
- export * from './index'
2
- export {}
@@ -1,1057 +0,0 @@
1
- import { getCurrentInstance as Z, inject as w, ref as R, computed as h, unref as v, warn as Mt, defineComponent as V, createElementBlock as P, openBlock as _, mergeProps as ft, renderSlot as I, createElementVNode as Nt, watch as $t, useSlots as Bt, Text as At, createBlock as H, resolveDynamicComponent as G, withCtx as z, createCommentVNode as tt, Fragment as Et, normalizeClass as W, provide as Ht, reactive as It, toRef as et, createTextVNode as Rt } from "vue";
2
- const Pt = /* @__PURE__ */ Symbol(), D = "el", Vt = "is-", $ = (t, r, e, n, a) => {
3
- let o = `${t}-${r}`;
4
- return e && (o += `-${e}`), n && (o += `__${n}`), a && (o += `--${a}`), o;
5
- }, Ct = /* @__PURE__ */ Symbol("namespaceContextKey"), Ot = (t) => {
6
- const r = Z() ? w(Ct, R(D)) : R(D);
7
- return h(() => v(r) || D);
8
- }, F = (t, r) => {
9
- const e = Ot();
10
- return {
11
- namespace: e,
12
- b: (c = "") => $(e.value, t, c, "", ""),
13
- e: (c) => c ? $(e.value, t, "", c, "") : "",
14
- m: (c) => c ? $(e.value, t, "", "", c) : "",
15
- be: (c, d) => c && d ? $(e.value, t, c, d, "") : "",
16
- em: (c, d) => c && d ? $(e.value, t, "", c, d) : "",
17
- bm: (c, d) => c && d ? $(e.value, t, c, "", d) : "",
18
- bem: (c, d, u) => c && d && u ? $(e.value, t, c, d, u) : "",
19
- is: (c, ...d) => {
20
- const u = d.length >= 1 ? d[0] : !0;
21
- return c && u ? `${Vt}${c}` : "";
22
- },
23
- cssVar: (c) => {
24
- const d = {};
25
- for (const u in c)
26
- c[u] && (d[`--${e.value}-${u}`] = c[u]);
27
- return d;
28
- },
29
- cssVarName: (c) => `--${e.value}-${c}`,
30
- cssVarBlock: (c) => {
31
- const d = {};
32
- for (const u in c)
33
- c[u] && (d[`--${e.value}-${t}-${u}`] = c[u]);
34
- return d;
35
- },
36
- cssVarBlockName: (c) => `--${e.value}-${t}-${c}`
37
- };
38
- };
39
- process.env.NODE_ENV !== "production" && Object.freeze({});
40
- process.env.NODE_ENV !== "production" && Object.freeze([]);
41
- const Tt = () => {
42
- }, zt = Object.prototype.hasOwnProperty, rt = (t, r) => zt.call(t, r), Y = (t) => typeof t == "string", dt = (t) => t !== null && typeof t == "object";
43
- function Ft(t) {
44
- for (var r = -1, e = t == null ? 0 : t.length, n = {}; ++r < e; ) {
45
- var a = t[r];
46
- n[a[0]] = a[1];
47
- }
48
- return n;
49
- }
50
- const jt = (t) => typeof t == "number", Gt = (t) => Y(t) ? !Number.isNaN(Number(t)) : !1;
51
- class Dt extends Error {
52
- constructor(r) {
53
- super(r), this.name = "ElementPlusError";
54
- }
55
- }
56
- function ht(t, r) {
57
- if (process.env.NODE_ENV !== "production") {
58
- const e = Y(t) ? new Dt(`[${t}] ${r}`) : t;
59
- console.warn(e);
60
- }
61
- }
62
- const gt = "__epPropKey", j = (t) => t, Kt = (t) => dt(t) && !!t[gt], vt = (t, r) => {
63
- if (!dt(t) || Kt(t))
64
- return t;
65
- const { values: e, required: n, default: a, type: o, validator: i } = t, f = {
66
- type: o,
67
- required: !!n,
68
- validator: e || i ? (m) => {
69
- let g = !1, S = [];
70
- if (e && (S = Array.from(e), rt(t, "default") && S.push(a), g || (g = S.includes(m))), i && (g || (g = i(m))), !g && S.length > 0) {
71
- const A = [...new Set(S)].map((E) => JSON.stringify(E)).join(", ");
72
- Mt(
73
- `Invalid prop: validation failed${r ? ` for prop "${r}"` : ""}. Expected one of [${A}], got value ${JSON.stringify(
74
- m
75
- )}.`
76
- );
77
- }
78
- return g;
79
- } : void 0,
80
- [gt]: !0
81
- };
82
- return rt(t, "default") && (f.default = a), f;
83
- }, pt = (t) => Ft(
84
- Object.entries(t).map(([r, e]) => [
85
- r,
86
- vt(e, r)
87
- ])
88
- ), Lt = ["", "default", "small", "large"], qt = vt({
89
- type: String,
90
- values: Lt,
91
- required: !1
92
- }), Wt = /* @__PURE__ */ Symbol("size"), Ut = () => {
93
- const t = w(Wt, {});
94
- return h(() => v(t.size) || "");
95
- }, nt = R();
96
- function Jt(t, r = void 0) {
97
- const e = Z() ? w(Pt, nt) : nt;
98
- return h(() => {
99
- var n, a;
100
- return (a = (n = e.value) == null ? void 0 : n[t]) != null ? a : r;
101
- });
102
- }
103
- var Q = (t, r) => {
104
- const e = t.__vccOpts || t;
105
- for (const [n, a] of r)
106
- e[n] = a;
107
- return e;
108
- };
109
- const bt = (t, r) => {
110
- if (t.install = (e) => {
111
- for (const n of [t, ...Object.values(r ?? {})])
112
- e.component(n.name, n);
113
- }, r)
114
- for (const [e, n] of Object.entries(r))
115
- t[e] = n;
116
- return t;
117
- }, Zt = (t) => (t.install = Tt, t), Yt = "utils/dom/style";
118
- function Qt(t, r = "px") {
119
- if (!t && t !== 0)
120
- return "";
121
- if (jt(t) || Gt(t))
122
- return `${t}${r}`;
123
- if (Y(t))
124
- return t;
125
- ht(Yt, "binding value must be a string or number");
126
- }
127
- const Xt = pt({
128
- size: {
129
- type: j([Number, String])
130
- },
131
- color: {
132
- type: String
133
- }
134
- }), te = V({
135
- name: "ElIcon",
136
- inheritAttrs: !1,
137
- __name: "icon",
138
- props: Xt,
139
- setup(t) {
140
- const r = t, e = F("icon"), n = h(() => {
141
- const { size: a, color: o } = r, i = Qt(a);
142
- return !i && !o ? {} : {
143
- fontSize: i,
144
- "--color": o
145
- };
146
- });
147
- return (a, o) => (_(), P(
148
- "i",
149
- ft({
150
- class: v(e).b(),
151
- style: n.value
152
- }, a.$attrs),
153
- [
154
- I(a.$slots, "default")
155
- ],
156
- 16
157
- ));
158
- }
159
- });
160
- var ee = /* @__PURE__ */ Q(te, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/icon/src/icon.vue"]]);
161
- const at = bt(ee);
162
- var re = /* @__PURE__ */ V({
163
- name: "Loading",
164
- __name: "loading",
165
- setup(t) {
166
- return (r, e) => (_(), P("svg", {
167
- xmlns: "http://www.w3.org/2000/svg",
168
- viewBox: "0 0 1024 1024"
169
- }, [
170
- Nt("path", {
171
- fill: "currentColor",
172
- d: "M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248m452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248M828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0"
173
- })
174
- ]));
175
- }
176
- }), ne = re;
177
- const ot = j([
178
- String,
179
- Object,
180
- Function
181
- ]), X = /* @__PURE__ */ Symbol("formContextKey"), mt = /* @__PURE__ */ Symbol("formItemContextKey"), ae = () => {
182
- const t = w(X, void 0), r = w(mt, void 0);
183
- return {
184
- form: t,
185
- formItem: r
186
- };
187
- }, yt = (t) => {
188
- const r = Z();
189
- return h(() => {
190
- var e, n;
191
- return (n = (e = r?.proxy) == null ? void 0 : e.$props) == null ? void 0 : n[t];
192
- });
193
- }, oe = (t, r = {}) => {
194
- const e = R(void 0), n = r.prop ? e : yt("size"), a = r.global ? e : Ut(), o = r.form ? { size: void 0 } : w(X, void 0), i = r.formItem ? { size: void 0 } : w(mt, void 0);
195
- return h(
196
- () => n.value || v(t) || i?.size || o?.size || a.value || ""
197
- );
198
- }, St = (t) => {
199
- const r = yt("disabled"), e = w(X, void 0);
200
- return h(() => {
201
- var n, a, o;
202
- return (o = (a = (n = r.value) != null ? n : v(t)) != null ? a : e?.disabled) != null ? o : !1;
203
- });
204
- }, xt = /* @__PURE__ */ Symbol(
205
- "buttonGroupContextKey"
206
- ), ie = ({ from: t, replacement: r, scope: e, version: n, ref: a, type: o = "API" }, i) => {
207
- $t(
208
- () => v(i),
209
- (s) => {
210
- s && ht(
211
- e,
212
- `[${o}] ${t} is about to be deprecated in version ${n}, please use ${r} instead.
213
- For more detail, please visit: ${a}
214
- `
215
- );
216
- },
217
- {
218
- immediate: !0
219
- }
220
- );
221
- }, se = (t, r) => {
222
- ie(
223
- {
224
- from: "type.text",
225
- replacement: "link",
226
- version: "3.0.0",
227
- scope: "props",
228
- ref: "https://element-plus.org/en-US/component/button.html#button-attributes"
229
- },
230
- h(() => t.type === "text")
231
- );
232
- const e = w(xt, void 0), n = Jt("button"), { form: a } = ae(), o = oe(h(() => e?.size)), i = St(), s = R(), f = Bt(), m = h(
233
- () => {
234
- var u;
235
- return t.type || e?.type || ((u = n.value) == null ? void 0 : u.type) || "";
236
- }
237
- ), g = h(
238
- () => {
239
- var u, l, b;
240
- return (b = (l = t.autoInsertSpace) != null ? l : (u = n.value) == null ? void 0 : u.autoInsertSpace) != null ? b : !1;
241
- }
242
- ), S = h(
243
- () => {
244
- var u, l, b;
245
- return (b = (l = t.plain) != null ? l : (u = n.value) == null ? void 0 : u.plain) != null ? b : !1;
246
- }
247
- ), A = h(
248
- () => {
249
- var u, l, b;
250
- return (b = (l = t.round) != null ? l : (u = n.value) == null ? void 0 : u.round) != null ? b : !1;
251
- }
252
- ), E = h(() => {
253
- var u, l, b;
254
- return (b = (l = t.text) != null ? l : (u = n.value) == null ? void 0 : u.text) != null ? b : !1;
255
- }), C = h(() => t.tag === "button" ? {
256
- ariaDisabled: i.value || t.loading,
257
- disabled: i.value || t.loading,
258
- autofocus: t.autofocus,
259
- type: t.nativeType
260
- } : {}), c = h(() => {
261
- var u;
262
- const l = (u = f.default) == null ? void 0 : u.call(f);
263
- if (g.value && l?.length === 1) {
264
- const b = l[0];
265
- if (b?.type === At) {
266
- const wt = b.children;
267
- return new RegExp("^\\p{Unified_Ideograph}{2}$", "u").test(wt.trim());
268
- }
269
- }
270
- return !1;
271
- });
272
- return {
273
- _disabled: i,
274
- _size: o,
275
- _type: m,
276
- _ref: s,
277
- _props: C,
278
- _plain: S,
279
- _round: A,
280
- _text: E,
281
- shouldAddSpace: c,
282
- handleClick: (u) => {
283
- if (i.value || t.loading) {
284
- u.stopPropagation();
285
- return;
286
- }
287
- t.nativeType === "reset" && a?.resetFields(), r("click", u);
288
- }
289
- };
290
- }, ce = [
291
- "default",
292
- "primary",
293
- "success",
294
- "warning",
295
- "info",
296
- "danger",
297
- "text",
298
- ""
299
- ], ue = ["button", "submit", "reset"], U = pt({
300
- size: qt,
301
- disabled: {
302
- type: Boolean,
303
- default: void 0
304
- },
305
- type: {
306
- type: String,
307
- values: ce,
308
- default: ""
309
- },
310
- icon: {
311
- type: ot
312
- },
313
- nativeType: {
314
- type: String,
315
- values: ue,
316
- default: "button"
317
- },
318
- loading: Boolean,
319
- loadingIcon: {
320
- type: ot,
321
- default: () => ne
322
- },
323
- plain: {
324
- type: Boolean,
325
- default: void 0
326
- },
327
- text: {
328
- type: Boolean,
329
- default: void 0
330
- },
331
- link: Boolean,
332
- bg: Boolean,
333
- autofocus: Boolean,
334
- round: {
335
- type: Boolean,
336
- default: void 0
337
- },
338
- circle: Boolean,
339
- color: String,
340
- dark: Boolean,
341
- autoInsertSpace: {
342
- type: Boolean,
343
- default: void 0
344
- },
345
- tag: {
346
- type: j([String, Object]),
347
- default: "button"
348
- }
349
- }), le = {
350
- click: (t) => t instanceof MouseEvent
351
- };
352
- function p(t, r) {
353
- fe(t) && (t = "100%");
354
- var e = de(t);
355
- return t = r === 360 ? t : Math.min(r, Math.max(0, parseFloat(t))), e && (t = parseInt(String(t * r), 10) / 100), Math.abs(t - r) < 1e-6 ? 1 : (r === 360 ? t = (t < 0 ? t % r + r : t % r) / parseFloat(String(r)) : t = t % r / parseFloat(String(r)), t);
356
- }
357
- function O(t) {
358
- return Math.min(1, Math.max(0, t));
359
- }
360
- function fe(t) {
361
- return typeof t == "string" && t.indexOf(".") !== -1 && parseFloat(t) === 1;
362
- }
363
- function de(t) {
364
- return typeof t == "string" && t.indexOf("%") !== -1;
365
- }
366
- function _t(t) {
367
- return t = parseFloat(t), (isNaN(t) || t < 0 || t > 1) && (t = 1), t;
368
- }
369
- function T(t) {
370
- return t <= 1 ? "".concat(Number(t) * 100, "%") : t;
371
- }
372
- function B(t) {
373
- return t.length === 1 ? "0" + t : String(t);
374
- }
375
- function he(t, r, e) {
376
- return {
377
- r: p(t, 255) * 255,
378
- g: p(r, 255) * 255,
379
- b: p(e, 255) * 255
380
- };
381
- }
382
- function it(t, r, e) {
383
- t = p(t, 255), r = p(r, 255), e = p(e, 255);
384
- var n = Math.max(t, r, e), a = Math.min(t, r, e), o = 0, i = 0, s = (n + a) / 2;
385
- if (n === a)
386
- i = 0, o = 0;
387
- else {
388
- var f = n - a;
389
- switch (i = s > 0.5 ? f / (2 - n - a) : f / (n + a), n) {
390
- case t:
391
- o = (r - e) / f + (r < e ? 6 : 0);
392
- break;
393
- case r:
394
- o = (e - t) / f + 2;
395
- break;
396
- case e:
397
- o = (t - r) / f + 4;
398
- break;
399
- }
400
- o /= 6;
401
- }
402
- return { h: o, s: i, l: s };
403
- }
404
- function K(t, r, e) {
405
- return e < 0 && (e += 1), e > 1 && (e -= 1), e < 1 / 6 ? t + (r - t) * (6 * e) : e < 1 / 2 ? r : e < 2 / 3 ? t + (r - t) * (2 / 3 - e) * 6 : t;
406
- }
407
- function ge(t, r, e) {
408
- var n, a, o;
409
- if (t = p(t, 360), r = p(r, 100), e = p(e, 100), r === 0)
410
- a = e, o = e, n = e;
411
- else {
412
- var i = e < 0.5 ? e * (1 + r) : e + r - e * r, s = 2 * e - i;
413
- n = K(s, i, t + 1 / 3), a = K(s, i, t), o = K(s, i, t - 1 / 3);
414
- }
415
- return { r: n * 255, g: a * 255, b: o * 255 };
416
- }
417
- function st(t, r, e) {
418
- t = p(t, 255), r = p(r, 255), e = p(e, 255);
419
- var n = Math.max(t, r, e), a = Math.min(t, r, e), o = 0, i = n, s = n - a, f = n === 0 ? 0 : s / n;
420
- if (n === a)
421
- o = 0;
422
- else {
423
- switch (n) {
424
- case t:
425
- o = (r - e) / s + (r < e ? 6 : 0);
426
- break;
427
- case r:
428
- o = (e - t) / s + 2;
429
- break;
430
- case e:
431
- o = (t - r) / s + 4;
432
- break;
433
- }
434
- o /= 6;
435
- }
436
- return { h: o, s: f, v: i };
437
- }
438
- function ve(t, r, e) {
439
- t = p(t, 360) * 6, r = p(r, 100), e = p(e, 100);
440
- var n = Math.floor(t), a = t - n, o = e * (1 - r), i = e * (1 - a * r), s = e * (1 - (1 - a) * r), f = n % 6, m = [e, i, o, o, s, e][f], g = [s, e, e, i, o, o][f], S = [o, o, s, e, e, i][f];
441
- return { r: m * 255, g: g * 255, b: S * 255 };
442
- }
443
- function ct(t, r, e, n) {
444
- var a = [
445
- B(Math.round(t).toString(16)),
446
- B(Math.round(r).toString(16)),
447
- B(Math.round(e).toString(16))
448
- ];
449
- return n && a[0].startsWith(a[0].charAt(1)) && a[1].startsWith(a[1].charAt(1)) && a[2].startsWith(a[2].charAt(1)) ? a[0].charAt(0) + a[1].charAt(0) + a[2].charAt(0) : a.join("");
450
- }
451
- function pe(t, r, e, n, a) {
452
- var o = [
453
- B(Math.round(t).toString(16)),
454
- B(Math.round(r).toString(16)),
455
- B(Math.round(e).toString(16)),
456
- B(be(n))
457
- ];
458
- return a && o[0].startsWith(o[0].charAt(1)) && o[1].startsWith(o[1].charAt(1)) && o[2].startsWith(o[2].charAt(1)) && o[3].startsWith(o[3].charAt(1)) ? o[0].charAt(0) + o[1].charAt(0) + o[2].charAt(0) + o[3].charAt(0) : o.join("");
459
- }
460
- function be(t) {
461
- return Math.round(parseFloat(t) * 255).toString(16);
462
- }
463
- function ut(t) {
464
- return y(t) / 255;
465
- }
466
- function y(t) {
467
- return parseInt(t, 16);
468
- }
469
- function me(t) {
470
- return {
471
- r: t >> 16,
472
- g: (t & 65280) >> 8,
473
- b: t & 255
474
- };
475
- }
476
- var J = {
477
- aliceblue: "#f0f8ff",
478
- antiquewhite: "#faebd7",
479
- aqua: "#00ffff",
480
- aquamarine: "#7fffd4",
481
- azure: "#f0ffff",
482
- beige: "#f5f5dc",
483
- bisque: "#ffe4c4",
484
- black: "#000000",
485
- blanchedalmond: "#ffebcd",
486
- blue: "#0000ff",
487
- blueviolet: "#8a2be2",
488
- brown: "#a52a2a",
489
- burlywood: "#deb887",
490
- cadetblue: "#5f9ea0",
491
- chartreuse: "#7fff00",
492
- chocolate: "#d2691e",
493
- coral: "#ff7f50",
494
- cornflowerblue: "#6495ed",
495
- cornsilk: "#fff8dc",
496
- crimson: "#dc143c",
497
- cyan: "#00ffff",
498
- darkblue: "#00008b",
499
- darkcyan: "#008b8b",
500
- darkgoldenrod: "#b8860b",
501
- darkgray: "#a9a9a9",
502
- darkgreen: "#006400",
503
- darkgrey: "#a9a9a9",
504
- darkkhaki: "#bdb76b",
505
- darkmagenta: "#8b008b",
506
- darkolivegreen: "#556b2f",
507
- darkorange: "#ff8c00",
508
- darkorchid: "#9932cc",
509
- darkred: "#8b0000",
510
- darksalmon: "#e9967a",
511
- darkseagreen: "#8fbc8f",
512
- darkslateblue: "#483d8b",
513
- darkslategray: "#2f4f4f",
514
- darkslategrey: "#2f4f4f",
515
- darkturquoise: "#00ced1",
516
- darkviolet: "#9400d3",
517
- deeppink: "#ff1493",
518
- deepskyblue: "#00bfff",
519
- dimgray: "#696969",
520
- dimgrey: "#696969",
521
- dodgerblue: "#1e90ff",
522
- firebrick: "#b22222",
523
- floralwhite: "#fffaf0",
524
- forestgreen: "#228b22",
525
- fuchsia: "#ff00ff",
526
- gainsboro: "#dcdcdc",
527
- ghostwhite: "#f8f8ff",
528
- goldenrod: "#daa520",
529
- gold: "#ffd700",
530
- gray: "#808080",
531
- green: "#008000",
532
- greenyellow: "#adff2f",
533
- grey: "#808080",
534
- honeydew: "#f0fff0",
535
- hotpink: "#ff69b4",
536
- indianred: "#cd5c5c",
537
- indigo: "#4b0082",
538
- ivory: "#fffff0",
539
- khaki: "#f0e68c",
540
- lavenderblush: "#fff0f5",
541
- lavender: "#e6e6fa",
542
- lawngreen: "#7cfc00",
543
- lemonchiffon: "#fffacd",
544
- lightblue: "#add8e6",
545
- lightcoral: "#f08080",
546
- lightcyan: "#e0ffff",
547
- lightgoldenrodyellow: "#fafad2",
548
- lightgray: "#d3d3d3",
549
- lightgreen: "#90ee90",
550
- lightgrey: "#d3d3d3",
551
- lightpink: "#ffb6c1",
552
- lightsalmon: "#ffa07a",
553
- lightseagreen: "#20b2aa",
554
- lightskyblue: "#87cefa",
555
- lightslategray: "#778899",
556
- lightslategrey: "#778899",
557
- lightsteelblue: "#b0c4de",
558
- lightyellow: "#ffffe0",
559
- lime: "#00ff00",
560
- limegreen: "#32cd32",
561
- linen: "#faf0e6",
562
- magenta: "#ff00ff",
563
- maroon: "#800000",
564
- mediumaquamarine: "#66cdaa",
565
- mediumblue: "#0000cd",
566
- mediumorchid: "#ba55d3",
567
- mediumpurple: "#9370db",
568
- mediumseagreen: "#3cb371",
569
- mediumslateblue: "#7b68ee",
570
- mediumspringgreen: "#00fa9a",
571
- mediumturquoise: "#48d1cc",
572
- mediumvioletred: "#c71585",
573
- midnightblue: "#191970",
574
- mintcream: "#f5fffa",
575
- mistyrose: "#ffe4e1",
576
- moccasin: "#ffe4b5",
577
- navajowhite: "#ffdead",
578
- navy: "#000080",
579
- oldlace: "#fdf5e6",
580
- olive: "#808000",
581
- olivedrab: "#6b8e23",
582
- orange: "#ffa500",
583
- orangered: "#ff4500",
584
- orchid: "#da70d6",
585
- palegoldenrod: "#eee8aa",
586
- palegreen: "#98fb98",
587
- paleturquoise: "#afeeee",
588
- palevioletred: "#db7093",
589
- papayawhip: "#ffefd5",
590
- peachpuff: "#ffdab9",
591
- peru: "#cd853f",
592
- pink: "#ffc0cb",
593
- plum: "#dda0dd",
594
- powderblue: "#b0e0e6",
595
- purple: "#800080",
596
- rebeccapurple: "#663399",
597
- red: "#ff0000",
598
- rosybrown: "#bc8f8f",
599
- royalblue: "#4169e1",
600
- saddlebrown: "#8b4513",
601
- salmon: "#fa8072",
602
- sandybrown: "#f4a460",
603
- seagreen: "#2e8b57",
604
- seashell: "#fff5ee",
605
- sienna: "#a0522d",
606
- silver: "#c0c0c0",
607
- skyblue: "#87ceeb",
608
- slateblue: "#6a5acd",
609
- slategray: "#708090",
610
- slategrey: "#708090",
611
- snow: "#fffafa",
612
- springgreen: "#00ff7f",
613
- steelblue: "#4682b4",
614
- tan: "#d2b48c",
615
- teal: "#008080",
616
- thistle: "#d8bfd8",
617
- tomato: "#ff6347",
618
- turquoise: "#40e0d0",
619
- violet: "#ee82ee",
620
- wheat: "#f5deb3",
621
- white: "#ffffff",
622
- whitesmoke: "#f5f5f5",
623
- yellow: "#ffff00",
624
- yellowgreen: "#9acd32"
625
- };
626
- function ye(t) {
627
- var r = { r: 0, g: 0, b: 0 }, e = 1, n = null, a = null, o = null, i = !1, s = !1;
628
- return typeof t == "string" && (t = _e(t)), typeof t == "object" && (k(t.r) && k(t.g) && k(t.b) ? (r = he(t.r, t.g, t.b), i = !0, s = String(t.r).substr(-1) === "%" ? "prgb" : "rgb") : k(t.h) && k(t.s) && k(t.v) ? (n = T(t.s), a = T(t.v), r = ve(t.h, n, a), i = !0, s = "hsv") : k(t.h) && k(t.s) && k(t.l) && (n = T(t.s), o = T(t.l), r = ge(t.h, n, o), i = !0, s = "hsl"), Object.prototype.hasOwnProperty.call(t, "a") && (e = t.a)), e = _t(e), {
629
- ok: i,
630
- format: t.format || s,
631
- r: Math.min(255, Math.max(r.r, 0)),
632
- g: Math.min(255, Math.max(r.g, 0)),
633
- b: Math.min(255, Math.max(r.b, 0)),
634
- a: e
635
- };
636
- }
637
- var Se = "[-\\+]?\\d+%?", xe = "[-\\+]?\\d*\\.\\d+%?", N = "(?:".concat(xe, ")|(?:").concat(Se, ")"), L = "[\\s|\\(]+(".concat(N, ")[,|\\s]+(").concat(N, ")[,|\\s]+(").concat(N, ")\\s*\\)?"), q = "[\\s|\\(]+(".concat(N, ")[,|\\s]+(").concat(N, ")[,|\\s]+(").concat(N, ")[,|\\s]+(").concat(N, ")\\s*\\)?"), x = {
638
- CSS_UNIT: new RegExp(N),
639
- rgb: new RegExp("rgb" + L),
640
- rgba: new RegExp("rgba" + q),
641
- hsl: new RegExp("hsl" + L),
642
- hsla: new RegExp("hsla" + q),
643
- hsv: new RegExp("hsv" + L),
644
- hsva: new RegExp("hsva" + q),
645
- hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
646
- hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
647
- hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
648
- hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
649
- };
650
- function _e(t) {
651
- if (t = t.trim().toLowerCase(), t.length === 0)
652
- return !1;
653
- var r = !1;
654
- if (J[t])
655
- t = J[t], r = !0;
656
- else if (t === "transparent")
657
- return { r: 0, g: 0, b: 0, a: 0, format: "name" };
658
- var e = x.rgb.exec(t);
659
- return e ? { r: e[1], g: e[2], b: e[3] } : (e = x.rgba.exec(t), e ? { r: e[1], g: e[2], b: e[3], a: e[4] } : (e = x.hsl.exec(t), e ? { h: e[1], s: e[2], l: e[3] } : (e = x.hsla.exec(t), e ? { h: e[1], s: e[2], l: e[3], a: e[4] } : (e = x.hsv.exec(t), e ? { h: e[1], s: e[2], v: e[3] } : (e = x.hsva.exec(t), e ? { h: e[1], s: e[2], v: e[3], a: e[4] } : (e = x.hex8.exec(t), e ? {
660
- r: y(e[1]),
661
- g: y(e[2]),
662
- b: y(e[3]),
663
- a: ut(e[4]),
664
- format: r ? "name" : "hex8"
665
- } : (e = x.hex6.exec(t), e ? {
666
- r: y(e[1]),
667
- g: y(e[2]),
668
- b: y(e[3]),
669
- format: r ? "name" : "hex"
670
- } : (e = x.hex4.exec(t), e ? {
671
- r: y(e[1] + e[1]),
672
- g: y(e[2] + e[2]),
673
- b: y(e[3] + e[3]),
674
- a: ut(e[4] + e[4]),
675
- format: r ? "name" : "hex8"
676
- } : (e = x.hex3.exec(t), e ? {
677
- r: y(e[1] + e[1]),
678
- g: y(e[2] + e[2]),
679
- b: y(e[3] + e[3]),
680
- format: r ? "name" : "hex"
681
- } : !1)))))))));
682
- }
683
- function k(t) {
684
- return !!x.CSS_UNIT.exec(String(t));
685
- }
686
- var ke = (
687
- /** @class */
688
- (function() {
689
- function t(r, e) {
690
- r === void 0 && (r = ""), e === void 0 && (e = {});
691
- var n;
692
- if (r instanceof t)
693
- return r;
694
- typeof r == "number" && (r = me(r)), this.originalInput = r;
695
- var a = ye(r);
696
- this.originalInput = r, this.r = a.r, this.g = a.g, this.b = a.b, this.a = a.a, this.roundA = Math.round(100 * this.a) / 100, this.format = (n = e.format) !== null && n !== void 0 ? n : a.format, this.gradientType = e.gradientType, this.r < 1 && (this.r = Math.round(this.r)), this.g < 1 && (this.g = Math.round(this.g)), this.b < 1 && (this.b = Math.round(this.b)), this.isValid = a.ok;
697
- }
698
- return t.prototype.isDark = function() {
699
- return this.getBrightness() < 128;
700
- }, t.prototype.isLight = function() {
701
- return !this.isDark();
702
- }, t.prototype.getBrightness = function() {
703
- var r = this.toRgb();
704
- return (r.r * 299 + r.g * 587 + r.b * 114) / 1e3;
705
- }, t.prototype.getLuminance = function() {
706
- var r = this.toRgb(), e, n, a, o = r.r / 255, i = r.g / 255, s = r.b / 255;
707
- return o <= 0.03928 ? e = o / 12.92 : e = Math.pow((o + 0.055) / 1.055, 2.4), i <= 0.03928 ? n = i / 12.92 : n = Math.pow((i + 0.055) / 1.055, 2.4), s <= 0.03928 ? a = s / 12.92 : a = Math.pow((s + 0.055) / 1.055, 2.4), 0.2126 * e + 0.7152 * n + 0.0722 * a;
708
- }, t.prototype.getAlpha = function() {
709
- return this.a;
710
- }, t.prototype.setAlpha = function(r) {
711
- return this.a = _t(r), this.roundA = Math.round(100 * this.a) / 100, this;
712
- }, t.prototype.isMonochrome = function() {
713
- var r = this.toHsl().s;
714
- return r === 0;
715
- }, t.prototype.toHsv = function() {
716
- var r = st(this.r, this.g, this.b);
717
- return { h: r.h * 360, s: r.s, v: r.v, a: this.a };
718
- }, t.prototype.toHsvString = function() {
719
- var r = st(this.r, this.g, this.b), e = Math.round(r.h * 360), n = Math.round(r.s * 100), a = Math.round(r.v * 100);
720
- return this.a === 1 ? "hsv(".concat(e, ", ").concat(n, "%, ").concat(a, "%)") : "hsva(".concat(e, ", ").concat(n, "%, ").concat(a, "%, ").concat(this.roundA, ")");
721
- }, t.prototype.toHsl = function() {
722
- var r = it(this.r, this.g, this.b);
723
- return { h: r.h * 360, s: r.s, l: r.l, a: this.a };
724
- }, t.prototype.toHslString = function() {
725
- var r = it(this.r, this.g, this.b), e = Math.round(r.h * 360), n = Math.round(r.s * 100), a = Math.round(r.l * 100);
726
- return this.a === 1 ? "hsl(".concat(e, ", ").concat(n, "%, ").concat(a, "%)") : "hsla(".concat(e, ", ").concat(n, "%, ").concat(a, "%, ").concat(this.roundA, ")");
727
- }, t.prototype.toHex = function(r) {
728
- return r === void 0 && (r = !1), ct(this.r, this.g, this.b, r);
729
- }, t.prototype.toHexString = function(r) {
730
- return r === void 0 && (r = !1), "#" + this.toHex(r);
731
- }, t.prototype.toHex8 = function(r) {
732
- return r === void 0 && (r = !1), pe(this.r, this.g, this.b, this.a, r);
733
- }, t.prototype.toHex8String = function(r) {
734
- return r === void 0 && (r = !1), "#" + this.toHex8(r);
735
- }, t.prototype.toHexShortString = function(r) {
736
- return r === void 0 && (r = !1), this.a === 1 ? this.toHexString(r) : this.toHex8String(r);
737
- }, t.prototype.toRgb = function() {
738
- return {
739
- r: Math.round(this.r),
740
- g: Math.round(this.g),
741
- b: Math.round(this.b),
742
- a: this.a
743
- };
744
- }, t.prototype.toRgbString = function() {
745
- var r = Math.round(this.r), e = Math.round(this.g), n = Math.round(this.b);
746
- return this.a === 1 ? "rgb(".concat(r, ", ").concat(e, ", ").concat(n, ")") : "rgba(".concat(r, ", ").concat(e, ", ").concat(n, ", ").concat(this.roundA, ")");
747
- }, t.prototype.toPercentageRgb = function() {
748
- var r = function(e) {
749
- return "".concat(Math.round(p(e, 255) * 100), "%");
750
- };
751
- return {
752
- r: r(this.r),
753
- g: r(this.g),
754
- b: r(this.b),
755
- a: this.a
756
- };
757
- }, t.prototype.toPercentageRgbString = function() {
758
- var r = function(e) {
759
- return Math.round(p(e, 255) * 100);
760
- };
761
- return this.a === 1 ? "rgb(".concat(r(this.r), "%, ").concat(r(this.g), "%, ").concat(r(this.b), "%)") : "rgba(".concat(r(this.r), "%, ").concat(r(this.g), "%, ").concat(r(this.b), "%, ").concat(this.roundA, ")");
762
- }, t.prototype.toName = function() {
763
- if (this.a === 0)
764
- return "transparent";
765
- if (this.a < 1)
766
- return !1;
767
- for (var r = "#" + ct(this.r, this.g, this.b, !1), e = 0, n = Object.entries(J); e < n.length; e++) {
768
- var a = n[e], o = a[0], i = a[1];
769
- if (r === i)
770
- return o;
771
- }
772
- return !1;
773
- }, t.prototype.toString = function(r) {
774
- var e = !!r;
775
- r = r ?? this.format;
776
- var n = !1, a = this.a < 1 && this.a >= 0, o = !e && a && (r.startsWith("hex") || r === "name");
777
- return o ? r === "name" && this.a === 0 ? this.toName() : this.toRgbString() : (r === "rgb" && (n = this.toRgbString()), r === "prgb" && (n = this.toPercentageRgbString()), (r === "hex" || r === "hex6") && (n = this.toHexString()), r === "hex3" && (n = this.toHexString(!0)), r === "hex4" && (n = this.toHex8String(!0)), r === "hex8" && (n = this.toHex8String()), r === "name" && (n = this.toName()), r === "hsl" && (n = this.toHslString()), r === "hsv" && (n = this.toHsvString()), n || this.toHexString());
778
- }, t.prototype.toNumber = function() {
779
- return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b);
780
- }, t.prototype.clone = function() {
781
- return new t(this.toString());
782
- }, t.prototype.lighten = function(r) {
783
- r === void 0 && (r = 10);
784
- var e = this.toHsl();
785
- return e.l += r / 100, e.l = O(e.l), new t(e);
786
- }, t.prototype.brighten = function(r) {
787
- r === void 0 && (r = 10);
788
- var e = this.toRgb();
789
- return e.r = Math.max(0, Math.min(255, e.r - Math.round(255 * -(r / 100)))), e.g = Math.max(0, Math.min(255, e.g - Math.round(255 * -(r / 100)))), e.b = Math.max(0, Math.min(255, e.b - Math.round(255 * -(r / 100)))), new t(e);
790
- }, t.prototype.darken = function(r) {
791
- r === void 0 && (r = 10);
792
- var e = this.toHsl();
793
- return e.l -= r / 100, e.l = O(e.l), new t(e);
794
- }, t.prototype.tint = function(r) {
795
- return r === void 0 && (r = 10), this.mix("white", r);
796
- }, t.prototype.shade = function(r) {
797
- return r === void 0 && (r = 10), this.mix("black", r);
798
- }, t.prototype.desaturate = function(r) {
799
- r === void 0 && (r = 10);
800
- var e = this.toHsl();
801
- return e.s -= r / 100, e.s = O(e.s), new t(e);
802
- }, t.prototype.saturate = function(r) {
803
- r === void 0 && (r = 10);
804
- var e = this.toHsl();
805
- return e.s += r / 100, e.s = O(e.s), new t(e);
806
- }, t.prototype.greyscale = function() {
807
- return this.desaturate(100);
808
- }, t.prototype.spin = function(r) {
809
- var e = this.toHsl(), n = (e.h + r) % 360;
810
- return e.h = n < 0 ? 360 + n : n, new t(e);
811
- }, t.prototype.mix = function(r, e) {
812
- e === void 0 && (e = 50);
813
- var n = this.toRgb(), a = new t(r).toRgb(), o = e / 100, i = {
814
- r: (a.r - n.r) * o + n.r,
815
- g: (a.g - n.g) * o + n.g,
816
- b: (a.b - n.b) * o + n.b,
817
- a: (a.a - n.a) * o + n.a
818
- };
819
- return new t(i);
820
- }, t.prototype.analogous = function(r, e) {
821
- r === void 0 && (r = 6), e === void 0 && (e = 30);
822
- var n = this.toHsl(), a = 360 / e, o = [this];
823
- for (n.h = (n.h - (a * r >> 1) + 720) % 360; --r; )
824
- n.h = (n.h + a) % 360, o.push(new t(n));
825
- return o;
826
- }, t.prototype.complement = function() {
827
- var r = this.toHsl();
828
- return r.h = (r.h + 180) % 360, new t(r);
829
- }, t.prototype.monochromatic = function(r) {
830
- r === void 0 && (r = 6);
831
- for (var e = this.toHsv(), n = e.h, a = e.s, o = e.v, i = [], s = 1 / r; r--; )
832
- i.push(new t({ h: n, s: a, v: o })), o = (o + s) % 1;
833
- return i;
834
- }, t.prototype.splitcomplement = function() {
835
- var r = this.toHsl(), e = r.h;
836
- return [
837
- this,
838
- new t({ h: (e + 72) % 360, s: r.s, l: r.l }),
839
- new t({ h: (e + 216) % 360, s: r.s, l: r.l })
840
- ];
841
- }, t.prototype.onBackground = function(r) {
842
- var e = this.toRgb(), n = new t(r).toRgb(), a = e.a + n.a * (1 - e.a);
843
- return new t({
844
- r: (e.r * e.a + n.r * n.a * (1 - e.a)) / a,
845
- g: (e.g * e.a + n.g * n.a * (1 - e.a)) / a,
846
- b: (e.b * e.a + n.b * n.a * (1 - e.a)) / a,
847
- a
848
- });
849
- }, t.prototype.triad = function() {
850
- return this.polyad(3);
851
- }, t.prototype.tetrad = function() {
852
- return this.polyad(4);
853
- }, t.prototype.polyad = function(r) {
854
- for (var e = this.toHsl(), n = e.h, a = [this], o = 360 / r, i = 1; i < r; i++)
855
- a.push(new t({ h: (n + i * o) % 360, s: e.s, l: e.l }));
856
- return a;
857
- }, t.prototype.equals = function(r) {
858
- return this.toRgbString() === new t(r).toRgbString();
859
- }, t;
860
- })()
861
- );
862
- function M(t, r = 20) {
863
- return t.mix("#141414", r).toString();
864
- }
865
- function we(t) {
866
- const r = St(), e = F("button");
867
- return h(() => {
868
- let n = {}, a = t.color;
869
- if (a) {
870
- const o = a.match(/var\((.*?)\)/);
871
- o && (a = window.getComputedStyle(window.document.documentElement).getPropertyValue(o[1]));
872
- const i = new ke(a), s = t.dark ? i.tint(20).toString() : M(i, 20);
873
- if (t.plain)
874
- n = e.cssVarBlock({
875
- "bg-color": t.dark ? M(i, 90) : i.tint(90).toString(),
876
- "text-color": a,
877
- "border-color": t.dark ? M(i, 50) : i.tint(50).toString(),
878
- "hover-text-color": `var(${e.cssVarName("color-white")})`,
879
- "hover-bg-color": a,
880
- "hover-border-color": a,
881
- "active-bg-color": s,
882
- "active-text-color": `var(${e.cssVarName("color-white")})`,
883
- "active-border-color": s
884
- }), r.value && (n[e.cssVarBlockName("disabled-bg-color")] = t.dark ? M(i, 90) : i.tint(90).toString(), n[e.cssVarBlockName("disabled-text-color")] = t.dark ? M(i, 50) : i.tint(50).toString(), n[e.cssVarBlockName("disabled-border-color")] = t.dark ? M(i, 80) : i.tint(80).toString());
885
- else {
886
- const f = t.dark ? M(i, 30) : i.tint(30).toString(), m = i.isDark() ? `var(${e.cssVarName("color-white")})` : `var(${e.cssVarName("color-black")})`;
887
- if (n = e.cssVarBlock({
888
- "bg-color": a,
889
- "text-color": m,
890
- "border-color": a,
891
- "hover-bg-color": f,
892
- "hover-text-color": m,
893
- "hover-border-color": f,
894
- "active-bg-color": s,
895
- "active-border-color": s
896
- }), r.value) {
897
- const g = t.dark ? M(i, 50) : i.tint(50).toString();
898
- n[e.cssVarBlockName("disabled-bg-color")] = g, n[e.cssVarBlockName("disabled-text-color")] = t.dark ? "rgba(255, 255, 255, 0.5)" : `var(${e.cssVarName("color-white")})`, n[e.cssVarBlockName("disabled-border-color")] = g;
899
- }
900
- }
901
- }
902
- return n;
903
- });
904
- }
905
- const Me = V({
906
- name: "ElButton",
907
- __name: "button",
908
- props: U,
909
- emits: le,
910
- setup(t, { expose: r, emit: e }) {
911
- const n = t, a = e, o = we(n), i = F("button"), {
912
- _ref: s,
913
- _size: f,
914
- _type: m,
915
- _disabled: g,
916
- _props: S,
917
- _plain: A,
918
- _round: E,
919
- _text: C,
920
- shouldAddSpace: c,
921
- handleClick: d
922
- } = se(n, a), u = h(() => [
923
- i.b(),
924
- i.m(m.value),
925
- i.m(f.value),
926
- i.is("disabled", g.value),
927
- i.is("loading", n.loading),
928
- i.is("plain", A.value),
929
- i.is("round", E.value),
930
- i.is("circle", n.circle),
931
- i.is("text", C.value),
932
- i.is("link", n.link),
933
- i.is("has-bg", n.bg)
934
- ]);
935
- return r({
936
- ref: s,
937
- size: f,
938
- type: m,
939
- disabled: g,
940
- shouldAddSpace: c
941
- }), (l, b) => (_(), H(G(l.tag), ft({
942
- ref_key: "_ref",
943
- ref: s
944
- }, v(S), {
945
- class: u.value,
946
- style: v(o),
947
- onClick: v(d)
948
- }), {
949
- default: z(() => [
950
- l.loading ? (_(), P(
951
- Et,
952
- { key: 0 },
953
- [
954
- l.$slots.loading ? I(l.$slots, "loading", { key: 0 }) : (_(), H(v(at), {
955
- key: 1,
956
- class: W(v(i).is("loading"))
957
- }, {
958
- default: z(() => [
959
- (_(), H(G(l.loadingIcon)))
960
- ]),
961
- _: 1
962
- }, 8, ["class"]))
963
- ],
964
- 64
965
- )) : l.icon || l.$slots.icon ? (_(), H(v(at), { key: 1 }, {
966
- default: z(() => [
967
- l.icon ? (_(), H(G(l.icon), { key: 0 })) : I(l.$slots, "icon", { key: 1 })
968
- ]),
969
- _: 3
970
- })) : tt("v-if", !0),
971
- l.$slots.default ? (_(), P(
972
- "span",
973
- {
974
- key: 2,
975
- class: W({ [v(i).em("text", "expand")]: v(c) })
976
- },
977
- [
978
- I(l.$slots, "default")
979
- ],
980
- 2
981
- )) : tt("v-if", !0)
982
- ]),
983
- _: 3
984
- }, 16, ["class", "style", "onClick"]));
985
- }
986
- });
987
- var Ne = /* @__PURE__ */ Q(Me, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/button/src/button.vue"]]);
988
- const $e = {
989
- size: U.size,
990
- type: U.type,
991
- direction: {
992
- type: j(String),
993
- values: ["horizontal", "vertical"],
994
- default: "horizontal"
995
- }
996
- }, Be = V({
997
- name: "ElButtonGroup",
998
- __name: "button-group",
999
- props: $e,
1000
- setup(t) {
1001
- const r = t;
1002
- Ht(
1003
- xt,
1004
- It({
1005
- size: et(r, "size"),
1006
- type: et(r, "type")
1007
- })
1008
- );
1009
- const e = F("button");
1010
- return (n, a) => (_(), P(
1011
- "div",
1012
- {
1013
- class: W([v(e).b("group"), v(e).bm("group", r.direction)])
1014
- },
1015
- [
1016
- I(n.$slots, "default")
1017
- ],
1018
- 2
1019
- ));
1020
- }
1021
- });
1022
- var kt = /* @__PURE__ */ Q(Be, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/button/src/button-group.vue"]]);
1023
- const Ae = bt(Ne, {
1024
- ButtonGroup: kt
1025
- });
1026
- Zt(kt);
1027
- const Ee = /* @__PURE__ */ V({
1028
- name: "FancyButton",
1029
- __name: "button",
1030
- props: {
1031
- type: {},
1032
- size: {},
1033
- loading: {}
1034
- },
1035
- setup(t) {
1036
- return (r, e) => (_(), H(v(Ae), { class: "test_btn" }, {
1037
- default: z(() => [...e[0] || (e[0] = [
1038
- Rt("123", -1)
1039
- ])]),
1040
- _: 1
1041
- }));
1042
- }
1043
- }), lt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1044
- __proto__: null,
1045
- FancyButton: Ee
1046
- }, Symbol.toStringTag, { value: "Module" })), Ie = {
1047
- install(t) {
1048
- Object.keys(lt).forEach((r) => {
1049
- const e = lt[r];
1050
- e && e.name && t.component(e.name, e);
1051
- });
1052
- }
1053
- };
1054
- export {
1055
- Ee as FancyButton,
1056
- Ie as installer
1057
- };
@@ -1,3 +0,0 @@
1
- (function(x,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],a):(x=typeof globalThis<"u"?globalThis:x||self,a(x.FancyComponents={},x.Vue))})(this,(function(x,a){"use strict";const ut=Symbol(),T="el",dt="is-",B=(t,n,e,r,o)=>{let i=`${t}-${n}`;return e&&(i+=`-${e}`),r&&(i+=`__${r}`),o&&(i+=`--${o}`),i},ht=Symbol("namespaceContextKey"),pt=t=>{const n=a.getCurrentInstance()?a.inject(ht,a.ref(T)):a.ref(T);return a.computed(()=>a.unref(n)||T)},C=(t,n)=>{const e=pt();return{namespace:e,b:(l="")=>B(e.value,t,l,"",""),e:l=>l?B(e.value,t,"",l,""):"",m:l=>l?B(e.value,t,"","",l):"",be:(l,h)=>l&&h?B(e.value,t,l,h,""):"",em:(l,h)=>l&&h?B(e.value,t,"",l,h):"",bm:(l,h)=>l&&h?B(e.value,t,l,"",h):"",bem:(l,h,f)=>l&&h&&f?B(e.value,t,l,h,f):"",is:(l,...h)=>{const f=h.length>=1?h[0]:!0;return l&&f?`${dt}${l}`:""},cssVar:l=>{const h={};for(const f in l)l[f]&&(h[`--${e.value}-${f}`]=l[f]);return h},cssVarName:l=>`--${e.value}-${l}`,cssVarBlock:l=>{const h={};for(const f in l)l[f]&&(h[`--${e.value}-${t}-${f}`]=l[f]);return h},cssVarBlockName:l=>`--${e.value}-${t}-${l}`}};process.env.NODE_ENV!=="production"&&Object.freeze({}),process.env.NODE_ENV!=="production"&&Object.freeze([]);const gt=()=>{},bt=Object.prototype.hasOwnProperty,D=(t,n)=>bt.call(t,n),P=t=>typeof t=="string",K=t=>t!==null&&typeof t=="object";function mt(t){for(var n=-1,e=t==null?0:t.length,r={};++n<e;){var o=t[n];r[o[0]]=o[1]}return r}const vt=t=>typeof t=="number",yt=t=>P(t)?!Number.isNaN(Number(t)):!1;class kt extends Error{constructor(n){super(n),this.name="ElementPlusError"}}function q(t,n){if(process.env.NODE_ENV!=="production"){const e=P(t)?new kt(`[${t}] ${n}`):t;console.warn(e)}}const L="__epPropKey",A=t=>t,St=t=>K(t)&&!!t[L],W=(t,n)=>{if(!K(t)||St(t))return t;const{values:e,required:r,default:o,type:i,validator:s}=t,d={type:i,required:!!r,validator:e||s?m=>{let g=!1,y=[];if(e&&(y=Array.from(e),D(t,"default")&&y.push(o),g||(g=y.includes(m))),s&&(g||(g=s(m))),!g&&y.length>0){const N=[...new Set(y)].map($=>JSON.stringify($)).join(", ");a.warn(`Invalid prop: validation failed${n?` for prop "${n}"`:""}. Expected one of [${N}], got value ${JSON.stringify(m)}.`)}return g}:void 0,[L]:!0};return D(t,"default")&&(d.default=o),d},U=t=>mt(Object.entries(t).map(([n,e])=>[n,W(e,n)])),xt=W({type:String,values:["","default","small","large"],required:!1}),_t=Symbol("size"),wt=()=>{const t=a.inject(_t,{});return a.computed(()=>a.unref(t.size)||"")},J=a.ref();function Bt(t,n=void 0){const e=a.getCurrentInstance()?a.inject(ut,J):J;return a.computed(()=>{var r,o;return(o=(r=e.value)==null?void 0:r[t])!=null?o:n})}var R=(t,n)=>{const e=t.__vccOpts||t;for(const[r,o]of n)e[r]=o;return e};const Z=(t,n)=>{if(t.install=e=>{for(const r of[t,...Object.values(n??{})])e.component(r.name,r)},n)for(const[e,r]of Object.entries(n))t[e]=r;return t},Mt=t=>(t.install=gt,t),Nt="utils/dom/style";function $t(t,n="px"){if(!t&&t!==0)return"";if(vt(t)||yt(t))return`${t}${n}`;if(P(t))return t;q(Nt,"binding value must be a string or number")}const Ct=U({size:{type:A([Number,String])},color:{type:String}}),At=a.defineComponent({name:"ElIcon",inheritAttrs:!1,__name:"icon",props:Ct,setup(t){const n=t,e=C("icon"),r=a.computed(()=>{const{size:o,color:i}=n,s=$t(o);return!s&&!i?{}:{fontSize:s,"--color":i}});return(o,i)=>(a.openBlock(),a.createElementBlock("i",a.mergeProps({class:a.unref(e).b(),style:r.value},o.$attrs),[a.renderSlot(o.$slots,"default")],16))}});var Et=R(At,[["__file","/home/runner/work/element-plus/element-plus/packages/components/icon/src/icon.vue"]]);const Y=Z(Et);var Ht=a.defineComponent({name:"Loading",__name:"loading",setup(t){return(n,e)=>(a.openBlock(),a.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248m452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248M828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0"})]))}}),It=Ht;const Q=A([String,Object,Function]),V=Symbol("formContextKey"),X=Symbol("formItemContextKey"),Tt=()=>{const t=a.inject(V,void 0),n=a.inject(X,void 0);return{form:t,formItem:n}},tt=t=>{const n=a.getCurrentInstance();return a.computed(()=>{var e,r;return(r=(e=n?.proxy)==null?void 0:e.$props)==null?void 0:r[t]})},Pt=(t,n={})=>{const e=a.ref(void 0),r=n.prop?e:tt("size"),o=n.global?e:wt(),i=n.form?{size:void 0}:a.inject(V,void 0),s=n.formItem?{size:void 0}:a.inject(X,void 0);return a.computed(()=>r.value||a.unref(t)||s?.size||i?.size||o.value||"")},et=t=>{const n=tt("disabled"),e=a.inject(V,void 0);return a.computed(()=>{var r,o,i;return(i=(o=(r=n.value)!=null?r:a.unref(t))!=null?o:e?.disabled)!=null?i:!1})},nt=Symbol("buttonGroupContextKey"),Rt=({from:t,replacement:n,scope:e,version:r,ref:o,type:i="API"},s)=>{a.watch(()=>a.unref(s),c=>{c&&q(e,`[${i}] ${t} is about to be deprecated in version ${r}, please use ${n} instead.
2
- For more detail, please visit: ${o}
3
- `)},{immediate:!0})},Vt=(t,n)=>{Rt({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},a.computed(()=>t.type==="text"));const e=a.inject(nt,void 0),r=Bt("button"),{form:o}=Tt(),i=Pt(a.computed(()=>e?.size)),s=et(),c=a.ref(),d=a.useSlots(),m=a.computed(()=>{var f;return t.type||e?.type||((f=r.value)==null?void 0:f.type)||""}),g=a.computed(()=>{var f,u,b;return(b=(u=t.autoInsertSpace)!=null?u:(f=r.value)==null?void 0:f.autoInsertSpace)!=null?b:!1}),y=a.computed(()=>{var f,u,b;return(b=(u=t.plain)!=null?u:(f=r.value)==null?void 0:f.plain)!=null?b:!1}),N=a.computed(()=>{var f,u,b;return(b=(u=t.round)!=null?u:(f=r.value)==null?void 0:f.round)!=null?b:!1}),$=a.computed(()=>{var f,u,b;return(b=(u=t.text)!=null?u:(f=r.value)==null?void 0:f.text)!=null?b:!1}),I=a.computed(()=>t.tag==="button"?{ariaDisabled:s.value||t.loading,disabled:s.value||t.loading,autofocus:t.autofocus,type:t.nativeType}:{}),l=a.computed(()=>{var f;const u=(f=d.default)==null?void 0:f.call(d);if(g.value&&u?.length===1){const b=u[0];if(b?.type===a.Text){const ae=b.children;return new RegExp("^\\p{Unified_Ideograph}{2}$","u").test(ae.trim())}}return!1});return{_disabled:s,_size:i,_type:m,_ref:c,_props:I,_plain:y,_round:N,_text:$,shouldAddSpace:l,handleClick:f=>{if(s.value||t.loading){f.stopPropagation();return}t.nativeType==="reset"&&o?.resetFields(),n("click",f)}}},z=U({size:xt,disabled:{type:Boolean,default:void 0},type:{type:String,values:["default","primary","success","warning","info","danger","text",""],default:""},icon:{type:Q},nativeType:{type:String,values:["button","submit","reset"],default:"button"},loading:Boolean,loadingIcon:{type:Q,default:()=>It},plain:{type:Boolean,default:void 0},text:{type:Boolean,default:void 0},link:Boolean,bg:Boolean,autofocus:Boolean,round:{type:Boolean,default:void 0},circle:Boolean,color:String,dark:Boolean,autoInsertSpace:{type:Boolean,default:void 0},tag:{type:A([String,Object]),default:"button"}}),zt={click:t=>t instanceof MouseEvent};function p(t,n){Ot(t)&&(t="100%");var e=Ft(t);return t=n===360?t:Math.min(n,Math.max(0,parseFloat(t))),e&&(t=parseInt(String(t*n),10)/100),Math.abs(t-n)<1e-6?1:(n===360?t=(t<0?t%n+n:t%n)/parseFloat(String(n)):t=t%n/parseFloat(String(n)),t)}function E(t){return Math.min(1,Math.max(0,t))}function Ot(t){return typeof t=="string"&&t.indexOf(".")!==-1&&parseFloat(t)===1}function Ft(t){return typeof t=="string"&&t.indexOf("%")!==-1}function rt(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function H(t){return t<=1?"".concat(Number(t)*100,"%"):t}function M(t){return t.length===1?"0"+t:String(t)}function jt(t,n,e){return{r:p(t,255)*255,g:p(n,255)*255,b:p(e,255)*255}}function ot(t,n,e){t=p(t,255),n=p(n,255),e=p(e,255);var r=Math.max(t,n,e),o=Math.min(t,n,e),i=0,s=0,c=(r+o)/2;if(r===o)s=0,i=0;else{var d=r-o;switch(s=c>.5?d/(2-r-o):d/(r+o),r){case t:i=(n-e)/d+(n<e?6:0);break;case n:i=(e-t)/d+2;break;case e:i=(t-n)/d+4;break}i/=6}return{h:i,s,l:c}}function O(t,n,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?t+(n-t)*(6*e):e<1/2?n:e<2/3?t+(n-t)*(2/3-e)*6:t}function Gt(t,n,e){var r,o,i;if(t=p(t,360),n=p(n,100),e=p(e,100),n===0)o=e,i=e,r=e;else{var s=e<.5?e*(1+n):e+n-e*n,c=2*e-s;r=O(c,s,t+1/3),o=O(c,s,t),i=O(c,s,t-1/3)}return{r:r*255,g:o*255,b:i*255}}function at(t,n,e){t=p(t,255),n=p(n,255),e=p(e,255);var r=Math.max(t,n,e),o=Math.min(t,n,e),i=0,s=r,c=r-o,d=r===0?0:c/r;if(r===o)i=0;else{switch(r){case t:i=(n-e)/c+(n<e?6:0);break;case n:i=(e-t)/c+2;break;case e:i=(t-n)/c+4;break}i/=6}return{h:i,s:d,v:s}}function Dt(t,n,e){t=p(t,360)*6,n=p(n,100),e=p(e,100);var r=Math.floor(t),o=t-r,i=e*(1-n),s=e*(1-o*n),c=e*(1-(1-o)*n),d=r%6,m=[e,s,i,i,c,e][d],g=[c,e,e,s,i,i][d],y=[i,i,c,e,e,s][d];return{r:m*255,g:g*255,b:y*255}}function it(t,n,e,r){var o=[M(Math.round(t).toString(16)),M(Math.round(n).toString(16)),M(Math.round(e).toString(16))];return r&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function Kt(t,n,e,r,o){var i=[M(Math.round(t).toString(16)),M(Math.round(n).toString(16)),M(Math.round(e).toString(16)),M(qt(r))];return o&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))&&i[3].startsWith(i[3].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}function qt(t){return Math.round(parseFloat(t)*255).toString(16)}function st(t){return v(t)/255}function v(t){return parseInt(t,16)}function Lt(t){return{r:t>>16,g:(t&65280)>>8,b:t&255}}var F={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function Wt(t){var n={r:0,g:0,b:0},e=1,r=null,o=null,i=null,s=!1,c=!1;return typeof t=="string"&&(t=Zt(t)),typeof t=="object"&&(S(t.r)&&S(t.g)&&S(t.b)?(n=jt(t.r,t.g,t.b),s=!0,c=String(t.r).substr(-1)==="%"?"prgb":"rgb"):S(t.h)&&S(t.s)&&S(t.v)?(r=H(t.s),o=H(t.v),n=Dt(t.h,r,o),s=!0,c="hsv"):S(t.h)&&S(t.s)&&S(t.l)&&(r=H(t.s),i=H(t.l),n=Gt(t.h,r,i),s=!0,c="hsl"),Object.prototype.hasOwnProperty.call(t,"a")&&(e=t.a)),e=rt(e),{ok:s,format:t.format||c,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a:e}}var Ut="[-\\+]?\\d+%?",Jt="[-\\+]?\\d*\\.\\d+%?",_="(?:".concat(Jt,")|(?:").concat(Ut,")"),j="[\\s|\\(]+(".concat(_,")[,|\\s]+(").concat(_,")[,|\\s]+(").concat(_,")\\s*\\)?"),G="[\\s|\\(]+(".concat(_,")[,|\\s]+(").concat(_,")[,|\\s]+(").concat(_,")[,|\\s]+(").concat(_,")\\s*\\)?"),k={CSS_UNIT:new RegExp(_),rgb:new RegExp("rgb"+j),rgba:new RegExp("rgba"+G),hsl:new RegExp("hsl"+j),hsla:new RegExp("hsla"+G),hsv:new RegExp("hsv"+j),hsva:new RegExp("hsva"+G),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function Zt(t){if(t=t.trim().toLowerCase(),t.length===0)return!1;var n=!1;if(F[t])t=F[t],n=!0;else if(t==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var e=k.rgb.exec(t);return e?{r:e[1],g:e[2],b:e[3]}:(e=k.rgba.exec(t),e?{r:e[1],g:e[2],b:e[3],a:e[4]}:(e=k.hsl.exec(t),e?{h:e[1],s:e[2],l:e[3]}:(e=k.hsla.exec(t),e?{h:e[1],s:e[2],l:e[3],a:e[4]}:(e=k.hsv.exec(t),e?{h:e[1],s:e[2],v:e[3]}:(e=k.hsva.exec(t),e?{h:e[1],s:e[2],v:e[3],a:e[4]}:(e=k.hex8.exec(t),e?{r:v(e[1]),g:v(e[2]),b:v(e[3]),a:st(e[4]),format:n?"name":"hex8"}:(e=k.hex6.exec(t),e?{r:v(e[1]),g:v(e[2]),b:v(e[3]),format:n?"name":"hex"}:(e=k.hex4.exec(t),e?{r:v(e[1]+e[1]),g:v(e[2]+e[2]),b:v(e[3]+e[3]),a:st(e[4]+e[4]),format:n?"name":"hex8"}:(e=k.hex3.exec(t),e?{r:v(e[1]+e[1]),g:v(e[2]+e[2]),b:v(e[3]+e[3]),format:n?"name":"hex"}:!1)))))))))}function S(t){return!!k.CSS_UNIT.exec(String(t))}var Yt=(function(){function t(n,e){n===void 0&&(n=""),e===void 0&&(e={});var r;if(n instanceof t)return n;typeof n=="number"&&(n=Lt(n)),this.originalInput=n;var o=Wt(n);this.originalInput=n,this.r=o.r,this.g=o.g,this.b=o.b,this.a=o.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=e.format)!==null&&r!==void 0?r:o.format,this.gradientType=e.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=o.ok}return t.prototype.isDark=function(){return this.getBrightness()<128},t.prototype.isLight=function(){return!this.isDark()},t.prototype.getBrightness=function(){var n=this.toRgb();return(n.r*299+n.g*587+n.b*114)/1e3},t.prototype.getLuminance=function(){var n=this.toRgb(),e,r,o,i=n.r/255,s=n.g/255,c=n.b/255;return i<=.03928?e=i/12.92:e=Math.pow((i+.055)/1.055,2.4),s<=.03928?r=s/12.92:r=Math.pow((s+.055)/1.055,2.4),c<=.03928?o=c/12.92:o=Math.pow((c+.055)/1.055,2.4),.2126*e+.7152*r+.0722*o},t.prototype.getAlpha=function(){return this.a},t.prototype.setAlpha=function(n){return this.a=rt(n),this.roundA=Math.round(100*this.a)/100,this},t.prototype.isMonochrome=function(){var n=this.toHsl().s;return n===0},t.prototype.toHsv=function(){var n=at(this.r,this.g,this.b);return{h:n.h*360,s:n.s,v:n.v,a:this.a}},t.prototype.toHsvString=function(){var n=at(this.r,this.g,this.b),e=Math.round(n.h*360),r=Math.round(n.s*100),o=Math.round(n.v*100);return this.a===1?"hsv(".concat(e,", ").concat(r,"%, ").concat(o,"%)"):"hsva(".concat(e,", ").concat(r,"%, ").concat(o,"%, ").concat(this.roundA,")")},t.prototype.toHsl=function(){var n=ot(this.r,this.g,this.b);return{h:n.h*360,s:n.s,l:n.l,a:this.a}},t.prototype.toHslString=function(){var n=ot(this.r,this.g,this.b),e=Math.round(n.h*360),r=Math.round(n.s*100),o=Math.round(n.l*100);return this.a===1?"hsl(".concat(e,", ").concat(r,"%, ").concat(o,"%)"):"hsla(".concat(e,", ").concat(r,"%, ").concat(o,"%, ").concat(this.roundA,")")},t.prototype.toHex=function(n){return n===void 0&&(n=!1),it(this.r,this.g,this.b,n)},t.prototype.toHexString=function(n){return n===void 0&&(n=!1),"#"+this.toHex(n)},t.prototype.toHex8=function(n){return n===void 0&&(n=!1),Kt(this.r,this.g,this.b,this.a,n)},t.prototype.toHex8String=function(n){return n===void 0&&(n=!1),"#"+this.toHex8(n)},t.prototype.toHexShortString=function(n){return n===void 0&&(n=!1),this.a===1?this.toHexString(n):this.toHex8String(n)},t.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},t.prototype.toRgbString=function(){var n=Math.round(this.r),e=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(n,", ").concat(e,", ").concat(r,")"):"rgba(".concat(n,", ").concat(e,", ").concat(r,", ").concat(this.roundA,")")},t.prototype.toPercentageRgb=function(){var n=function(e){return"".concat(Math.round(p(e,255)*100),"%")};return{r:n(this.r),g:n(this.g),b:n(this.b),a:this.a}},t.prototype.toPercentageRgbString=function(){var n=function(e){return Math.round(p(e,255)*100)};return this.a===1?"rgb(".concat(n(this.r),"%, ").concat(n(this.g),"%, ").concat(n(this.b),"%)"):"rgba(".concat(n(this.r),"%, ").concat(n(this.g),"%, ").concat(n(this.b),"%, ").concat(this.roundA,")")},t.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var n="#"+it(this.r,this.g,this.b,!1),e=0,r=Object.entries(F);e<r.length;e++){var o=r[e],i=o[0],s=o[1];if(n===s)return i}return!1},t.prototype.toString=function(n){var e=!!n;n=n??this.format;var r=!1,o=this.a<1&&this.a>=0,i=!e&&o&&(n.startsWith("hex")||n==="name");return i?n==="name"&&this.a===0?this.toName():this.toRgbString():(n==="rgb"&&(r=this.toRgbString()),n==="prgb"&&(r=this.toPercentageRgbString()),(n==="hex"||n==="hex6")&&(r=this.toHexString()),n==="hex3"&&(r=this.toHexString(!0)),n==="hex4"&&(r=this.toHex8String(!0)),n==="hex8"&&(r=this.toHex8String()),n==="name"&&(r=this.toName()),n==="hsl"&&(r=this.toHslString()),n==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},t.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},t.prototype.clone=function(){return new t(this.toString())},t.prototype.lighten=function(n){n===void 0&&(n=10);var e=this.toHsl();return e.l+=n/100,e.l=E(e.l),new t(e)},t.prototype.brighten=function(n){n===void 0&&(n=10);var e=this.toRgb();return e.r=Math.max(0,Math.min(255,e.r-Math.round(255*-(n/100)))),e.g=Math.max(0,Math.min(255,e.g-Math.round(255*-(n/100)))),e.b=Math.max(0,Math.min(255,e.b-Math.round(255*-(n/100)))),new t(e)},t.prototype.darken=function(n){n===void 0&&(n=10);var e=this.toHsl();return e.l-=n/100,e.l=E(e.l),new t(e)},t.prototype.tint=function(n){return n===void 0&&(n=10),this.mix("white",n)},t.prototype.shade=function(n){return n===void 0&&(n=10),this.mix("black",n)},t.prototype.desaturate=function(n){n===void 0&&(n=10);var e=this.toHsl();return e.s-=n/100,e.s=E(e.s),new t(e)},t.prototype.saturate=function(n){n===void 0&&(n=10);var e=this.toHsl();return e.s+=n/100,e.s=E(e.s),new t(e)},t.prototype.greyscale=function(){return this.desaturate(100)},t.prototype.spin=function(n){var e=this.toHsl(),r=(e.h+n)%360;return e.h=r<0?360+r:r,new t(e)},t.prototype.mix=function(n,e){e===void 0&&(e=50);var r=this.toRgb(),o=new t(n).toRgb(),i=e/100,s={r:(o.r-r.r)*i+r.r,g:(o.g-r.g)*i+r.g,b:(o.b-r.b)*i+r.b,a:(o.a-r.a)*i+r.a};return new t(s)},t.prototype.analogous=function(n,e){n===void 0&&(n=6),e===void 0&&(e=30);var r=this.toHsl(),o=360/e,i=[this];for(r.h=(r.h-(o*n>>1)+720)%360;--n;)r.h=(r.h+o)%360,i.push(new t(r));return i},t.prototype.complement=function(){var n=this.toHsl();return n.h=(n.h+180)%360,new t(n)},t.prototype.monochromatic=function(n){n===void 0&&(n=6);for(var e=this.toHsv(),r=e.h,o=e.s,i=e.v,s=[],c=1/n;n--;)s.push(new t({h:r,s:o,v:i})),i=(i+c)%1;return s},t.prototype.splitcomplement=function(){var n=this.toHsl(),e=n.h;return[this,new t({h:(e+72)%360,s:n.s,l:n.l}),new t({h:(e+216)%360,s:n.s,l:n.l})]},t.prototype.onBackground=function(n){var e=this.toRgb(),r=new t(n).toRgb(),o=e.a+r.a*(1-e.a);return new t({r:(e.r*e.a+r.r*r.a*(1-e.a))/o,g:(e.g*e.a+r.g*r.a*(1-e.a))/o,b:(e.b*e.a+r.b*r.a*(1-e.a))/o,a:o})},t.prototype.triad=function(){return this.polyad(3)},t.prototype.tetrad=function(){return this.polyad(4)},t.prototype.polyad=function(n){for(var e=this.toHsl(),r=e.h,o=[this],i=360/n,s=1;s<n;s++)o.push(new t({h:(r+s*i)%360,s:e.s,l:e.l}));return o},t.prototype.equals=function(n){return this.toRgbString()===new t(n).toRgbString()},t})();function w(t,n=20){return t.mix("#141414",n).toString()}function Qt(t){const n=et(),e=C("button");return a.computed(()=>{let r={},o=t.color;if(o){const i=o.match(/var\((.*?)\)/);i&&(o=window.getComputedStyle(window.document.documentElement).getPropertyValue(i[1]));const s=new Yt(o),c=t.dark?s.tint(20).toString():w(s,20);if(t.plain)r=e.cssVarBlock({"bg-color":t.dark?w(s,90):s.tint(90).toString(),"text-color":o,"border-color":t.dark?w(s,50):s.tint(50).toString(),"hover-text-color":`var(${e.cssVarName("color-white")})`,"hover-bg-color":o,"hover-border-color":o,"active-bg-color":c,"active-text-color":`var(${e.cssVarName("color-white")})`,"active-border-color":c}),n.value&&(r[e.cssVarBlockName("disabled-bg-color")]=t.dark?w(s,90):s.tint(90).toString(),r[e.cssVarBlockName("disabled-text-color")]=t.dark?w(s,50):s.tint(50).toString(),r[e.cssVarBlockName("disabled-border-color")]=t.dark?w(s,80):s.tint(80).toString());else{const d=t.dark?w(s,30):s.tint(30).toString(),m=s.isDark()?`var(${e.cssVarName("color-white")})`:`var(${e.cssVarName("color-black")})`;if(r=e.cssVarBlock({"bg-color":o,"text-color":m,"border-color":o,"hover-bg-color":d,"hover-text-color":m,"hover-border-color":d,"active-bg-color":c,"active-border-color":c}),n.value){const g=t.dark?w(s,50):s.tint(50).toString();r[e.cssVarBlockName("disabled-bg-color")]=g,r[e.cssVarBlockName("disabled-text-color")]=t.dark?"rgba(255, 255, 255, 0.5)":`var(${e.cssVarName("color-white")})`,r[e.cssVarBlockName("disabled-border-color")]=g}}}return r})}const Xt=a.defineComponent({name:"ElButton",__name:"button",props:z,emits:zt,setup(t,{expose:n,emit:e}){const r=t,o=e,i=Qt(r),s=C("button"),{_ref:c,_size:d,_type:m,_disabled:g,_props:y,_plain:N,_round:$,_text:I,shouldAddSpace:l,handleClick:h}=Vt(r,o),f=a.computed(()=>[s.b(),s.m(m.value),s.m(d.value),s.is("disabled",g.value),s.is("loading",r.loading),s.is("plain",N.value),s.is("round",$.value),s.is("circle",r.circle),s.is("text",I.value),s.is("link",r.link),s.is("has-bg",r.bg)]);return n({ref:c,size:d,type:m,disabled:g,shouldAddSpace:l}),(u,b)=>(a.openBlock(),a.createBlock(a.resolveDynamicComponent(u.tag),a.mergeProps({ref_key:"_ref",ref:c},a.unref(y),{class:f.value,style:a.unref(i),onClick:a.unref(h)}),{default:a.withCtx(()=>[u.loading?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[u.$slots.loading?a.renderSlot(u.$slots,"loading",{key:0}):(a.openBlock(),a.createBlock(a.unref(Y),{key:1,class:a.normalizeClass(a.unref(s).is("loading"))},{default:a.withCtx(()=>[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(u.loadingIcon)))]),_:1},8,["class"]))],64)):u.icon||u.$slots.icon?(a.openBlock(),a.createBlock(a.unref(Y),{key:1},{default:a.withCtx(()=>[u.icon?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(u.icon),{key:0})):a.renderSlot(u.$slots,"icon",{key:1})]),_:3})):a.createCommentVNode("v-if",!0),u.$slots.default?(a.openBlock(),a.createElementBlock("span",{key:2,class:a.normalizeClass({[a.unref(s).em("text","expand")]:a.unref(l)})},[a.renderSlot(u.$slots,"default")],2)):a.createCommentVNode("v-if",!0)]),_:3},16,["class","style","onClick"]))}});var te=R(Xt,[["__file","/home/runner/work/element-plus/element-plus/packages/components/button/src/button.vue"]]);const ee={size:z.size,type:z.type,direction:{type:A(String),values:["horizontal","vertical"],default:"horizontal"}},ne=a.defineComponent({name:"ElButtonGroup",__name:"button-group",props:ee,setup(t){const n=t;a.provide(nt,a.reactive({size:a.toRef(n,"size"),type:a.toRef(n,"type")}));const e=C("button");return(r,o)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass([a.unref(e).b("group"),a.unref(e).bm("group",n.direction)])},[a.renderSlot(r.$slots,"default")],2))}});var ct=R(ne,[["__file","/home/runner/work/element-plus/element-plus/packages/components/button/src/button-group.vue"]]);const re=Z(te,{ButtonGroup:ct});Mt(ct);const lt=a.defineComponent({name:"FancyButton",__name:"button",props:{type:{},size:{},loading:{}},setup(t){return(n,e)=>(a.openBlock(),a.createBlock(a.unref(re),{class:"test_btn"},{default:a.withCtx(()=>[...e[0]||(e[0]=[a.createTextVNode("123",-1)])]),_:1}))}}),ft=Object.freeze(Object.defineProperty({__proto__:null,FancyButton:lt},Symbol.toStringTag,{value:"Module"})),oe={install(t){Object.keys(ft).forEach(n=>{const e=ft[n];e&&e.name&&t.component(e.name,e)})}};x.FancyButton=lt,x.installer=oe,Object.defineProperty(x,Symbol.toStringTag,{value:"Module"})}));
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes