st-comp 0.0.148 → 0.0.150
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.
- package/components.d.ts +3 -0
- package/es/ChartLayout.cjs +1 -1
- package/es/ChartLayout.js +5 -4
- package/es/Dialog.cjs +1 -1
- package/es/Dialog.js +28 -24
- package/es/FactorWarning.cjs +1 -1
- package/es/FactorWarning.js +577 -631
- package/es/Kline.cjs +1 -0
- package/es/Kline.js +1903 -0
- package/es/KlineBasic.cjs +1 -1
- package/es/KlineBasic.js +677 -1428
- package/es/KlineNew.cjs +1 -3
- package/es/KlineNew.js +316 -2740
- package/es/Pagination.cjs +1 -1
- package/es/Pagination.js +60 -58
- package/es/PasswordPrompt.cjs +1 -0
- package/es/PasswordPrompt.js +13 -0
- package/es/Table.cjs +1 -1
- package/es/Table.js +102 -98
- package/es/User.cjs +1 -1
- package/es/User.js +397 -373
- package/es/VarietySearch.cjs +1 -1
- package/es/VarietySearch.js +2395 -1
- package/es/VirtualTable.cjs +5 -5
- package/es/VirtualTable.js +154 -151
- package/es/_initCloneObject-47814efa.cjs +1 -0
- package/es/{_initCloneObject-ec5c9523.js → _initCloneObject-e3d8a9ab.js} +13 -13
- package/es/base-0ca7c43a.cjs +5 -0
- package/es/base-19787dfb.js +303 -0
- package/es/{castArray-c770910d.js → castArray-8405000b.js} +1 -1
- package/es/castArray-a78ae889.cjs +1 -0
- package/es/{config-provider-feed0e8a.js → config-provider-0f6672af.js} +3 -3
- package/es/{config-provider-c87e277f.cjs → config-provider-cfbb9cd8.cjs} +1 -1
- package/es/{debounce-c64fb3b5.js → debounce-6cb0781f.js} +29 -29
- package/es/debounce-cf26af24.cjs +1 -0
- package/es/{dropdown-c9272ca3.js → dropdown-17b3ef6a.js} +4 -4
- package/es/{dropdown-6bdb3cf4.cjs → dropdown-790d31ea.cjs} +1 -1
- package/es/el-button-0bf1d532.js +236 -0
- package/es/el-button-62966947.cjs +1 -0
- package/es/el-checkbox-group-45247bbf.cjs +1 -0
- package/es/el-checkbox-group-d53bc316.js +67 -0
- package/es/el-empty-2ece1134.cjs +1 -0
- package/es/{el-empty-89a523ed.js → el-empty-bd5343a7.js} +10 -9
- package/es/{el-form-item-55d36086.js → el-form-item-05c0e335.js} +82 -81
- package/es/el-form-item-47e255d4.cjs +12 -0
- package/es/{el-input-cb528574.js → el-input-1e309239.js} +46 -45
- package/es/el-input-6a3805c5.cjs +1 -0
- package/es/{el-input-number-ce30bfa8.js → el-input-number-60ebc58f.js} +50 -48
- package/es/el-input-number-96ff2e47.cjs +1 -0
- package/es/el-menu-item-4c9eb7ad.cjs +1 -0
- package/es/el-menu-item-6c6236a1.js +772 -0
- package/es/{el-message-d51d032b.js → el-message-7d927756.js} +56 -55
- package/es/el-message-d5ed7a4f.cjs +1 -0
- package/es/el-overlay-26bf0945.js +521 -0
- package/es/el-overlay-41994f67.cjs +1 -0
- package/es/el-popover-17e2e66c.js +140 -0
- package/es/el-popover-7bd8a7c3.cjs +1 -0
- package/es/el-popper-7adbf1c6.cjs +1 -0
- package/es/{el-popper-f4b01f85.js → el-popper-b6527ae2.js} +217 -216
- package/es/{el-scrollbar-e8e93751.js → el-scrollbar-29bcab5f.js} +22 -22
- package/es/el-scrollbar-ac525239.cjs +1 -0
- package/es/el-select-31f8ac8a.cjs +1 -0
- package/es/{el-select-e71af2e6.js → el-select-7395562b.js} +42 -40
- package/es/el-table-column-47d80736.js +3804 -0
- package/es/el-table-column-bdc46568.cjs +14 -0
- package/es/{el-tag-d65768f4.js → el-tag-7414e0c7.js} +59 -58
- package/es/el-tag-9732314f.cjs +1 -0
- package/es/{index-da646183.cjs → index-1d85ba4b.cjs} +1 -1
- package/es/{index-92ba4292.js → index-273822d1.js} +26 -25
- package/es/index-2f958e56.cjs +3 -0
- package/es/index-375e8de4.cjs +5 -0
- package/es/{index-121e2861.js → index-621b092b.js} +3 -3
- package/es/index-657047bb.js +513 -0
- package/es/{index-18416440.cjs → index-65b4113e.cjs} +1 -1
- package/es/index-70372cdb.js +519 -0
- package/es/{use-form-common-props-4d37077d.js → index-72151b24.js} +151 -312
- package/es/index-9e6e8d03.cjs +1 -0
- package/es/index-ab96bbf4.js +156 -0
- package/es/index-afc88a4b.cjs +1 -0
- package/es/index-c066fe0d.js +82 -0
- package/es/index-ce3223db.cjs +1 -0
- package/es/{index-709675d5.js → index-dc22ffe4.js} +18 -18
- package/es/index-eea0bcb3.cjs +1 -0
- package/es/index.esm-8d9a2abe.js +2432 -0
- package/es/index.esm-94a95a2a.cjs +3 -0
- package/es/{raf-f55e0daa.js → raf-a532c514.js} +1 -1
- package/es/{raf-2d77cbbe.cjs → raf-f46caea0.cjs} +1 -1
- package/es/{scroll-c8ac196e.cjs → scroll-339681d4.cjs} +1 -1
- package/es/{scroll-ca84f80a.js → scroll-d787d648.js} +1 -1
- package/es/style.css +1 -1
- package/es/use-form-common-props-5ff2f51b.js +171 -0
- package/es/use-form-common-props-74a96df2.cjs +2 -0
- package/es/vnode-6a0c7411.js +14 -0
- package/es/vnode-b15eb11b.cjs +1 -0
- package/es/{zh-cn-414d7f0c.cjs → zh-cn-36f34912.cjs} +1 -1
- package/es/{zh-cn-23c8e0d1.js → zh-cn-f37255ae.js} +2 -2
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +206 -206
- package/lib/{index-ffeb163e.js → index-d0cb2fa2.js} +33754 -31705
- package/lib/{python-0ec8f68c.js → python-050ba5a4.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/packages/Kline/components/Contextmenu/index.vue +110 -0
- package/packages/Kline/components/Tips/index.vue +40 -0
- package/packages/Kline/componentsNew/KlineSlide/index.vue +155 -0
- package/packages/Kline/componentsNew/KlineSub/index.vue +297 -0
- package/packages/Kline/componentsNew/KlineTips/index.vue +66 -0
- package/packages/Kline/componentsNew/KlineUtils/index.vue +84 -0
- package/packages/Kline/componentsNew/Tips/index.vue +33 -0
- package/packages/Kline/formatKlineData.ts +109 -0
- package/packages/Kline/images/buy.svg +1 -0
- package/packages/Kline/images/pen.png +0 -0
- package/packages/Kline/images/sell.svg +1 -0
- package/packages/Kline/images/t.svg +1 -0
- package/packages/Kline/index.ts +16 -0
- package/packages/Kline/index.vue +891 -0
- package/packages/Kline/option.ts +539 -0
- package/packages/Kline/type.d.ts +219 -0
- package/packages/Kline/utils.ts +682 -0
- package/packages/PasswordPrompt/index.ts +8 -0
- package/packages/PasswordPrompt/index.vue +266 -0
- package/packages/User/index.vue +97 -58
- package/packages/index.ts +4 -0
- package/src/pages/Kline/index.vue +12 -0
- package/src/pages/PasswordPrompt/index.vue +12 -0
- package/src/router/routes.ts +10 -0
- package/es/_initCloneObject-476b02ce.cjs +0 -1
- package/es/base-6ccc8fc2.cjs +0 -9
- package/es/base-950bac7e.js +0 -816
- package/es/castArray-374558a5.cjs +0 -1
- package/es/debounce-a6b4f91b.cjs +0 -1
- package/es/el-button-b8f71c7d.cjs +0 -1
- package/es/el-button-d7b6eebd.js +0 -745
- package/es/el-empty-12eece57.cjs +0 -1
- package/es/el-form-item-ebbf096d.cjs +0 -12
- package/es/el-input-2c7e70a3.cjs +0 -1
- package/es/el-input-number-8e168e83.cjs +0 -1
- package/es/el-message-612c2346.cjs +0 -1
- package/es/el-overlay-07414277.js +0 -526
- package/es/el-overlay-fb255b83.cjs +0 -1
- package/es/el-popper-8360bd91.cjs +0 -1
- package/es/el-scrollbar-271142ad.cjs +0 -1
- package/es/el-select-2e71d4af.cjs +0 -1
- package/es/el-table-column-9fe79f05.cjs +0 -14
- package/es/el-table-column-dc562f14.js +0 -3933
- package/es/el-tag-930e7b32.cjs +0 -1
- package/es/index-0ed86daf.cjs +0 -3
- package/es/index-674d2fd7.cjs +0 -1
- package/es/index-aece600c.js +0 -81
- package/es/use-form-common-props-c1960844.cjs +0 -2
package/es/el-button-d7b6eebd.js
DELETED
|
@@ -1,745 +0,0 @@
|
|
|
1
|
-
import { computed as m, inject as rt, ref as at, useSlots as nt, Text as it, defineComponent as _, openBlock as y, createBlock as B, resolveDynamicComponent as F, mergeProps as ot, unref as d, withCtx as N, createElementBlock as P, Fragment as st, renderSlot as R, normalizeClass as V, createCommentVNode as D, provide as ft, reactive as ut, toRef as O } from "vue";
|
|
2
|
-
import { e as ct, b as ht, f as J, u as lt, i as W, y as dt, E as U } from "./use-form-common-props-4d37077d.js";
|
|
3
|
-
import { a as gt, b as bt } from "./index-aece600c.js";
|
|
4
|
-
import { b as vt, d as pt, u as z, _ as Q, w as yt, R as mt } from "./base-950bac7e.js";
|
|
5
|
-
const X = Symbol("buttonGroupContextKey"), kt = (r, e) => {
|
|
6
|
-
gt({
|
|
7
|
-
from: "type.text",
|
|
8
|
-
replacement: "link",
|
|
9
|
-
version: "3.0.0",
|
|
10
|
-
scope: "props",
|
|
11
|
-
ref: "https://element-plus.org/en-US/component/button.html#button-attributes"
|
|
12
|
-
}, m(() => r.type === "text"));
|
|
13
|
-
const t = rt(X, void 0), a = bt("button"), { form: n } = ct(), i = ht(m(() => t == null ? void 0 : t.size)), o = J(), s = at(), u = nt(), g = m(() => r.type || (t == null ? void 0 : t.type) || ""), v = m(() => {
|
|
14
|
-
var f, x, w;
|
|
15
|
-
return (w = (x = r.autoInsertSpace) != null ? x : (f = a.value) == null ? void 0 : f.autoInsertSpace) != null ? w : !1;
|
|
16
|
-
}), M = m(() => r.tag === "button" ? {
|
|
17
|
-
ariaDisabled: o.value || r.loading,
|
|
18
|
-
disabled: o.value || r.loading,
|
|
19
|
-
autofocus: r.autofocus,
|
|
20
|
-
type: r.nativeType
|
|
21
|
-
} : {}), T = m(() => {
|
|
22
|
-
var f;
|
|
23
|
-
const x = (f = u.default) == null ? void 0 : f.call(u);
|
|
24
|
-
if (v.value && (x == null ? void 0 : x.length) === 1) {
|
|
25
|
-
const w = x[0];
|
|
26
|
-
if ((w == null ? void 0 : w.type) === it) {
|
|
27
|
-
const et = w.children;
|
|
28
|
-
return /^\p{Unified_Ideograph}{2}$/u.test(et.trim());
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
return !1;
|
|
32
|
-
});
|
|
33
|
-
return {
|
|
34
|
-
_disabled: o,
|
|
35
|
-
_size: i,
|
|
36
|
-
_type: g,
|
|
37
|
-
_ref: s,
|
|
38
|
-
_props: M,
|
|
39
|
-
shouldAddSpace: T,
|
|
40
|
-
handleClick: (f) => {
|
|
41
|
-
if (o.value || r.loading) {
|
|
42
|
-
f.stopPropagation();
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
r.nativeType === "reset" && (n == null || n.resetFields()), e("click", f);
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
}, xt = [
|
|
49
|
-
"default",
|
|
50
|
-
"primary",
|
|
51
|
-
"success",
|
|
52
|
-
"warning",
|
|
53
|
-
"info",
|
|
54
|
-
"danger",
|
|
55
|
-
"text",
|
|
56
|
-
""
|
|
57
|
-
], St = ["button", "submit", "reset"], $ = vt({
|
|
58
|
-
size: lt,
|
|
59
|
-
disabled: Boolean,
|
|
60
|
-
type: {
|
|
61
|
-
type: String,
|
|
62
|
-
values: xt,
|
|
63
|
-
default: ""
|
|
64
|
-
},
|
|
65
|
-
icon: {
|
|
66
|
-
type: W
|
|
67
|
-
},
|
|
68
|
-
nativeType: {
|
|
69
|
-
type: String,
|
|
70
|
-
values: St,
|
|
71
|
-
default: "button"
|
|
72
|
-
},
|
|
73
|
-
loading: Boolean,
|
|
74
|
-
loadingIcon: {
|
|
75
|
-
type: W,
|
|
76
|
-
default: () => dt
|
|
77
|
-
},
|
|
78
|
-
plain: Boolean,
|
|
79
|
-
text: Boolean,
|
|
80
|
-
link: Boolean,
|
|
81
|
-
bg: Boolean,
|
|
82
|
-
autofocus: Boolean,
|
|
83
|
-
round: Boolean,
|
|
84
|
-
circle: Boolean,
|
|
85
|
-
color: String,
|
|
86
|
-
dark: Boolean,
|
|
87
|
-
autoInsertSpace: {
|
|
88
|
-
type: Boolean,
|
|
89
|
-
default: void 0
|
|
90
|
-
},
|
|
91
|
-
tag: {
|
|
92
|
-
type: pt([String, Object]),
|
|
93
|
-
default: "button"
|
|
94
|
-
}
|
|
95
|
-
}), Mt = {
|
|
96
|
-
click: (r) => r instanceof MouseEvent
|
|
97
|
-
};
|
|
98
|
-
function c(r, e) {
|
|
99
|
-
wt(r) && (r = "100%");
|
|
100
|
-
var t = Bt(r);
|
|
101
|
-
return r = e === 360 ? r : Math.min(e, Math.max(0, parseFloat(r))), t && (r = parseInt(String(r * e), 10) / 100), Math.abs(r - e) < 1e-6 ? 1 : (e === 360 ? r = (r < 0 ? r % e + e : r % e) / parseFloat(String(e)) : r = r % e / parseFloat(String(e)), r);
|
|
102
|
-
}
|
|
103
|
-
function A(r) {
|
|
104
|
-
return Math.min(1, Math.max(0, r));
|
|
105
|
-
}
|
|
106
|
-
function wt(r) {
|
|
107
|
-
return typeof r == "string" && r.indexOf(".") !== -1 && parseFloat(r) === 1;
|
|
108
|
-
}
|
|
109
|
-
function Bt(r) {
|
|
110
|
-
return typeof r == "string" && r.indexOf("%") !== -1;
|
|
111
|
-
}
|
|
112
|
-
function Y(r) {
|
|
113
|
-
return r = parseFloat(r), (isNaN(r) || r < 0 || r > 1) && (r = 1), r;
|
|
114
|
-
}
|
|
115
|
-
function H(r) {
|
|
116
|
-
return r <= 1 ? "".concat(Number(r) * 100, "%") : r;
|
|
117
|
-
}
|
|
118
|
-
function S(r) {
|
|
119
|
-
return r.length === 1 ? "0" + r : String(r);
|
|
120
|
-
}
|
|
121
|
-
function At(r, e, t) {
|
|
122
|
-
return {
|
|
123
|
-
r: c(r, 255) * 255,
|
|
124
|
-
g: c(e, 255) * 255,
|
|
125
|
-
b: c(t, 255) * 255
|
|
126
|
-
};
|
|
127
|
-
}
|
|
128
|
-
function q(r, e, t) {
|
|
129
|
-
r = c(r, 255), e = c(e, 255), t = c(t, 255);
|
|
130
|
-
var a = Math.max(r, e, t), n = Math.min(r, e, t), i = 0, o = 0, s = (a + n) / 2;
|
|
131
|
-
if (a === n)
|
|
132
|
-
o = 0, i = 0;
|
|
133
|
-
else {
|
|
134
|
-
var u = a - n;
|
|
135
|
-
switch (o = s > 0.5 ? u / (2 - a - n) : u / (a + n), a) {
|
|
136
|
-
case r:
|
|
137
|
-
i = (e - t) / u + (e < t ? 6 : 0);
|
|
138
|
-
break;
|
|
139
|
-
case e:
|
|
140
|
-
i = (t - r) / u + 2;
|
|
141
|
-
break;
|
|
142
|
-
case t:
|
|
143
|
-
i = (r - e) / u + 4;
|
|
144
|
-
break;
|
|
145
|
-
}
|
|
146
|
-
i /= 6;
|
|
147
|
-
}
|
|
148
|
-
return { h: i, s: o, l: s };
|
|
149
|
-
}
|
|
150
|
-
function I(r, e, t) {
|
|
151
|
-
return t < 0 && (t += 1), t > 1 && (t -= 1), t < 1 / 6 ? r + (e - r) * (6 * t) : t < 1 / 2 ? e : t < 2 / 3 ? r + (e - r) * (2 / 3 - t) * 6 : r;
|
|
152
|
-
}
|
|
153
|
-
function Ht(r, e, t) {
|
|
154
|
-
var a, n, i;
|
|
155
|
-
if (r = c(r, 360), e = c(e, 100), t = c(t, 100), e === 0)
|
|
156
|
-
n = t, i = t, a = t;
|
|
157
|
-
else {
|
|
158
|
-
var o = t < 0.5 ? t * (1 + e) : t + e - t * e, s = 2 * t - o;
|
|
159
|
-
a = I(s, o, r + 1 / 3), n = I(s, o, r), i = I(s, o, r - 1 / 3);
|
|
160
|
-
}
|
|
161
|
-
return { r: a * 255, g: n * 255, b: i * 255 };
|
|
162
|
-
}
|
|
163
|
-
function K(r, e, t) {
|
|
164
|
-
r = c(r, 255), e = c(e, 255), t = c(t, 255);
|
|
165
|
-
var a = Math.max(r, e, t), n = Math.min(r, e, t), i = 0, o = a, s = a - n, u = a === 0 ? 0 : s / a;
|
|
166
|
-
if (a === n)
|
|
167
|
-
i = 0;
|
|
168
|
-
else {
|
|
169
|
-
switch (a) {
|
|
170
|
-
case r:
|
|
171
|
-
i = (e - t) / s + (e < t ? 6 : 0);
|
|
172
|
-
break;
|
|
173
|
-
case e:
|
|
174
|
-
i = (t - r) / s + 2;
|
|
175
|
-
break;
|
|
176
|
-
case t:
|
|
177
|
-
i = (r - e) / s + 4;
|
|
178
|
-
break;
|
|
179
|
-
}
|
|
180
|
-
i /= 6;
|
|
181
|
-
}
|
|
182
|
-
return { h: i, s: u, v: o };
|
|
183
|
-
}
|
|
184
|
-
function Rt(r, e, t) {
|
|
185
|
-
r = c(r, 360) * 6, e = c(e, 100), t = c(t, 100);
|
|
186
|
-
var a = Math.floor(r), n = r - a, i = t * (1 - e), o = t * (1 - n * e), s = t * (1 - (1 - n) * e), u = a % 6, g = [t, o, i, i, s, t][u], v = [s, t, t, o, i, i][u], M = [i, i, s, t, t, o][u];
|
|
187
|
-
return { r: g * 255, g: v * 255, b: M * 255 };
|
|
188
|
-
}
|
|
189
|
-
function L(r, e, t, a) {
|
|
190
|
-
var n = [
|
|
191
|
-
S(Math.round(r).toString(16)),
|
|
192
|
-
S(Math.round(e).toString(16)),
|
|
193
|
-
S(Math.round(t).toString(16))
|
|
194
|
-
];
|
|
195
|
-
return a && n[0].startsWith(n[0].charAt(1)) && n[1].startsWith(n[1].charAt(1)) && n[2].startsWith(n[2].charAt(1)) ? n[0].charAt(0) + n[1].charAt(0) + n[2].charAt(0) : n.join("");
|
|
196
|
-
}
|
|
197
|
-
function _t(r, e, t, a, n) {
|
|
198
|
-
var i = [
|
|
199
|
-
S(Math.round(r).toString(16)),
|
|
200
|
-
S(Math.round(e).toString(16)),
|
|
201
|
-
S(Math.round(t).toString(16)),
|
|
202
|
-
S(Tt(a))
|
|
203
|
-
];
|
|
204
|
-
return n && 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("");
|
|
205
|
-
}
|
|
206
|
-
function Tt(r) {
|
|
207
|
-
return Math.round(parseFloat(r) * 255).toString(16);
|
|
208
|
-
}
|
|
209
|
-
function Z(r) {
|
|
210
|
-
return h(r) / 255;
|
|
211
|
-
}
|
|
212
|
-
function h(r) {
|
|
213
|
-
return parseInt(r, 16);
|
|
214
|
-
}
|
|
215
|
-
function Ft(r) {
|
|
216
|
-
return {
|
|
217
|
-
r: r >> 16,
|
|
218
|
-
g: (r & 65280) >> 8,
|
|
219
|
-
b: r & 255
|
|
220
|
-
};
|
|
221
|
-
}
|
|
222
|
-
var G = {
|
|
223
|
-
aliceblue: "#f0f8ff",
|
|
224
|
-
antiquewhite: "#faebd7",
|
|
225
|
-
aqua: "#00ffff",
|
|
226
|
-
aquamarine: "#7fffd4",
|
|
227
|
-
azure: "#f0ffff",
|
|
228
|
-
beige: "#f5f5dc",
|
|
229
|
-
bisque: "#ffe4c4",
|
|
230
|
-
black: "#000000",
|
|
231
|
-
blanchedalmond: "#ffebcd",
|
|
232
|
-
blue: "#0000ff",
|
|
233
|
-
blueviolet: "#8a2be2",
|
|
234
|
-
brown: "#a52a2a",
|
|
235
|
-
burlywood: "#deb887",
|
|
236
|
-
cadetblue: "#5f9ea0",
|
|
237
|
-
chartreuse: "#7fff00",
|
|
238
|
-
chocolate: "#d2691e",
|
|
239
|
-
coral: "#ff7f50",
|
|
240
|
-
cornflowerblue: "#6495ed",
|
|
241
|
-
cornsilk: "#fff8dc",
|
|
242
|
-
crimson: "#dc143c",
|
|
243
|
-
cyan: "#00ffff",
|
|
244
|
-
darkblue: "#00008b",
|
|
245
|
-
darkcyan: "#008b8b",
|
|
246
|
-
darkgoldenrod: "#b8860b",
|
|
247
|
-
darkgray: "#a9a9a9",
|
|
248
|
-
darkgreen: "#006400",
|
|
249
|
-
darkgrey: "#a9a9a9",
|
|
250
|
-
darkkhaki: "#bdb76b",
|
|
251
|
-
darkmagenta: "#8b008b",
|
|
252
|
-
darkolivegreen: "#556b2f",
|
|
253
|
-
darkorange: "#ff8c00",
|
|
254
|
-
darkorchid: "#9932cc",
|
|
255
|
-
darkred: "#8b0000",
|
|
256
|
-
darksalmon: "#e9967a",
|
|
257
|
-
darkseagreen: "#8fbc8f",
|
|
258
|
-
darkslateblue: "#483d8b",
|
|
259
|
-
darkslategray: "#2f4f4f",
|
|
260
|
-
darkslategrey: "#2f4f4f",
|
|
261
|
-
darkturquoise: "#00ced1",
|
|
262
|
-
darkviolet: "#9400d3",
|
|
263
|
-
deeppink: "#ff1493",
|
|
264
|
-
deepskyblue: "#00bfff",
|
|
265
|
-
dimgray: "#696969",
|
|
266
|
-
dimgrey: "#696969",
|
|
267
|
-
dodgerblue: "#1e90ff",
|
|
268
|
-
firebrick: "#b22222",
|
|
269
|
-
floralwhite: "#fffaf0",
|
|
270
|
-
forestgreen: "#228b22",
|
|
271
|
-
fuchsia: "#ff00ff",
|
|
272
|
-
gainsboro: "#dcdcdc",
|
|
273
|
-
ghostwhite: "#f8f8ff",
|
|
274
|
-
goldenrod: "#daa520",
|
|
275
|
-
gold: "#ffd700",
|
|
276
|
-
gray: "#808080",
|
|
277
|
-
green: "#008000",
|
|
278
|
-
greenyellow: "#adff2f",
|
|
279
|
-
grey: "#808080",
|
|
280
|
-
honeydew: "#f0fff0",
|
|
281
|
-
hotpink: "#ff69b4",
|
|
282
|
-
indianred: "#cd5c5c",
|
|
283
|
-
indigo: "#4b0082",
|
|
284
|
-
ivory: "#fffff0",
|
|
285
|
-
khaki: "#f0e68c",
|
|
286
|
-
lavenderblush: "#fff0f5",
|
|
287
|
-
lavender: "#e6e6fa",
|
|
288
|
-
lawngreen: "#7cfc00",
|
|
289
|
-
lemonchiffon: "#fffacd",
|
|
290
|
-
lightblue: "#add8e6",
|
|
291
|
-
lightcoral: "#f08080",
|
|
292
|
-
lightcyan: "#e0ffff",
|
|
293
|
-
lightgoldenrodyellow: "#fafad2",
|
|
294
|
-
lightgray: "#d3d3d3",
|
|
295
|
-
lightgreen: "#90ee90",
|
|
296
|
-
lightgrey: "#d3d3d3",
|
|
297
|
-
lightpink: "#ffb6c1",
|
|
298
|
-
lightsalmon: "#ffa07a",
|
|
299
|
-
lightseagreen: "#20b2aa",
|
|
300
|
-
lightskyblue: "#87cefa",
|
|
301
|
-
lightslategray: "#778899",
|
|
302
|
-
lightslategrey: "#778899",
|
|
303
|
-
lightsteelblue: "#b0c4de",
|
|
304
|
-
lightyellow: "#ffffe0",
|
|
305
|
-
lime: "#00ff00",
|
|
306
|
-
limegreen: "#32cd32",
|
|
307
|
-
linen: "#faf0e6",
|
|
308
|
-
magenta: "#ff00ff",
|
|
309
|
-
maroon: "#800000",
|
|
310
|
-
mediumaquamarine: "#66cdaa",
|
|
311
|
-
mediumblue: "#0000cd",
|
|
312
|
-
mediumorchid: "#ba55d3",
|
|
313
|
-
mediumpurple: "#9370db",
|
|
314
|
-
mediumseagreen: "#3cb371",
|
|
315
|
-
mediumslateblue: "#7b68ee",
|
|
316
|
-
mediumspringgreen: "#00fa9a",
|
|
317
|
-
mediumturquoise: "#48d1cc",
|
|
318
|
-
mediumvioletred: "#c71585",
|
|
319
|
-
midnightblue: "#191970",
|
|
320
|
-
mintcream: "#f5fffa",
|
|
321
|
-
mistyrose: "#ffe4e1",
|
|
322
|
-
moccasin: "#ffe4b5",
|
|
323
|
-
navajowhite: "#ffdead",
|
|
324
|
-
navy: "#000080",
|
|
325
|
-
oldlace: "#fdf5e6",
|
|
326
|
-
olive: "#808000",
|
|
327
|
-
olivedrab: "#6b8e23",
|
|
328
|
-
orange: "#ffa500",
|
|
329
|
-
orangered: "#ff4500",
|
|
330
|
-
orchid: "#da70d6",
|
|
331
|
-
palegoldenrod: "#eee8aa",
|
|
332
|
-
palegreen: "#98fb98",
|
|
333
|
-
paleturquoise: "#afeeee",
|
|
334
|
-
palevioletred: "#db7093",
|
|
335
|
-
papayawhip: "#ffefd5",
|
|
336
|
-
peachpuff: "#ffdab9",
|
|
337
|
-
peru: "#cd853f",
|
|
338
|
-
pink: "#ffc0cb",
|
|
339
|
-
plum: "#dda0dd",
|
|
340
|
-
powderblue: "#b0e0e6",
|
|
341
|
-
purple: "#800080",
|
|
342
|
-
rebeccapurple: "#663399",
|
|
343
|
-
red: "#ff0000",
|
|
344
|
-
rosybrown: "#bc8f8f",
|
|
345
|
-
royalblue: "#4169e1",
|
|
346
|
-
saddlebrown: "#8b4513",
|
|
347
|
-
salmon: "#fa8072",
|
|
348
|
-
sandybrown: "#f4a460",
|
|
349
|
-
seagreen: "#2e8b57",
|
|
350
|
-
seashell: "#fff5ee",
|
|
351
|
-
sienna: "#a0522d",
|
|
352
|
-
silver: "#c0c0c0",
|
|
353
|
-
skyblue: "#87ceeb",
|
|
354
|
-
slateblue: "#6a5acd",
|
|
355
|
-
slategray: "#708090",
|
|
356
|
-
slategrey: "#708090",
|
|
357
|
-
snow: "#fffafa",
|
|
358
|
-
springgreen: "#00ff7f",
|
|
359
|
-
steelblue: "#4682b4",
|
|
360
|
-
tan: "#d2b48c",
|
|
361
|
-
teal: "#008080",
|
|
362
|
-
thistle: "#d8bfd8",
|
|
363
|
-
tomato: "#ff6347",
|
|
364
|
-
turquoise: "#40e0d0",
|
|
365
|
-
violet: "#ee82ee",
|
|
366
|
-
wheat: "#f5deb3",
|
|
367
|
-
white: "#ffffff",
|
|
368
|
-
whitesmoke: "#f5f5f5",
|
|
369
|
-
yellow: "#ffff00",
|
|
370
|
-
yellowgreen: "#9acd32"
|
|
371
|
-
};
|
|
372
|
-
function Nt(r) {
|
|
373
|
-
var e = { r: 0, g: 0, b: 0 }, t = 1, a = null, n = null, i = null, o = !1, s = !1;
|
|
374
|
-
return typeof r == "string" && (r = Ct(r)), typeof r == "object" && (b(r.r) && b(r.g) && b(r.b) ? (e = At(r.r, r.g, r.b), o = !0, s = String(r.r).substr(-1) === "%" ? "prgb" : "rgb") : b(r.h) && b(r.s) && b(r.v) ? (a = H(r.s), n = H(r.v), e = Rt(r.h, a, n), o = !0, s = "hsv") : b(r.h) && b(r.s) && b(r.l) && (a = H(r.s), i = H(r.l), e = Ht(r.h, a, i), o = !0, s = "hsl"), Object.prototype.hasOwnProperty.call(r, "a") && (t = r.a)), t = Y(t), {
|
|
375
|
-
ok: o,
|
|
376
|
-
format: r.format || s,
|
|
377
|
-
r: Math.min(255, Math.max(e.r, 0)),
|
|
378
|
-
g: Math.min(255, Math.max(e.g, 0)),
|
|
379
|
-
b: Math.min(255, Math.max(e.b, 0)),
|
|
380
|
-
a: t
|
|
381
|
-
};
|
|
382
|
-
}
|
|
383
|
-
var It = "[-\\+]?\\d+%?", Et = "[-\\+]?\\d*\\.\\d+%?", k = "(?:".concat(Et, ")|(?:").concat(It, ")"), E = "[\\s|\\(]+(".concat(k, ")[,|\\s]+(").concat(k, ")[,|\\s]+(").concat(k, ")\\s*\\)?"), C = "[\\s|\\(]+(".concat(k, ")[,|\\s]+(").concat(k, ")[,|\\s]+(").concat(k, ")[,|\\s]+(").concat(k, ")\\s*\\)?"), l = {
|
|
384
|
-
CSS_UNIT: new RegExp(k),
|
|
385
|
-
rgb: new RegExp("rgb" + E),
|
|
386
|
-
rgba: new RegExp("rgba" + C),
|
|
387
|
-
hsl: new RegExp("hsl" + E),
|
|
388
|
-
hsla: new RegExp("hsla" + C),
|
|
389
|
-
hsv: new RegExp("hsv" + E),
|
|
390
|
-
hsva: new RegExp("hsva" + C),
|
|
391
|
-
hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
|
|
392
|
-
hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
|
|
393
|
-
hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
|
|
394
|
-
hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
|
|
395
|
-
};
|
|
396
|
-
function Ct(r) {
|
|
397
|
-
if (r = r.trim().toLowerCase(), r.length === 0)
|
|
398
|
-
return !1;
|
|
399
|
-
var e = !1;
|
|
400
|
-
if (G[r])
|
|
401
|
-
r = G[r], e = !0;
|
|
402
|
-
else if (r === "transparent")
|
|
403
|
-
return { r: 0, g: 0, b: 0, a: 0, format: "name" };
|
|
404
|
-
var t = l.rgb.exec(r);
|
|
405
|
-
return t ? { r: t[1], g: t[2], b: t[3] } : (t = l.rgba.exec(r), t ? { r: t[1], g: t[2], b: t[3], a: t[4] } : (t = l.hsl.exec(r), t ? { h: t[1], s: t[2], l: t[3] } : (t = l.hsla.exec(r), t ? { h: t[1], s: t[2], l: t[3], a: t[4] } : (t = l.hsv.exec(r), t ? { h: t[1], s: t[2], v: t[3] } : (t = l.hsva.exec(r), t ? { h: t[1], s: t[2], v: t[3], a: t[4] } : (t = l.hex8.exec(r), t ? {
|
|
406
|
-
r: h(t[1]),
|
|
407
|
-
g: h(t[2]),
|
|
408
|
-
b: h(t[3]),
|
|
409
|
-
a: Z(t[4]),
|
|
410
|
-
format: e ? "name" : "hex8"
|
|
411
|
-
} : (t = l.hex6.exec(r), t ? {
|
|
412
|
-
r: h(t[1]),
|
|
413
|
-
g: h(t[2]),
|
|
414
|
-
b: h(t[3]),
|
|
415
|
-
format: e ? "name" : "hex"
|
|
416
|
-
} : (t = l.hex4.exec(r), t ? {
|
|
417
|
-
r: h(t[1] + t[1]),
|
|
418
|
-
g: h(t[2] + t[2]),
|
|
419
|
-
b: h(t[3] + t[3]),
|
|
420
|
-
a: Z(t[4] + t[4]),
|
|
421
|
-
format: e ? "name" : "hex8"
|
|
422
|
-
} : (t = l.hex3.exec(r), t ? {
|
|
423
|
-
r: h(t[1] + t[1]),
|
|
424
|
-
g: h(t[2] + t[2]),
|
|
425
|
-
b: h(t[3] + t[3]),
|
|
426
|
-
format: e ? "name" : "hex"
|
|
427
|
-
} : !1)))))))));
|
|
428
|
-
}
|
|
429
|
-
function b(r) {
|
|
430
|
-
return !!l.CSS_UNIT.exec(String(r));
|
|
431
|
-
}
|
|
432
|
-
var Pt = (
|
|
433
|
-
/** @class */
|
|
434
|
-
function() {
|
|
435
|
-
function r(e, t) {
|
|
436
|
-
e === void 0 && (e = ""), t === void 0 && (t = {});
|
|
437
|
-
var a;
|
|
438
|
-
if (e instanceof r)
|
|
439
|
-
return e;
|
|
440
|
-
typeof e == "number" && (e = Ft(e)), this.originalInput = e;
|
|
441
|
-
var n = Nt(e);
|
|
442
|
-
this.originalInput = e, this.r = n.r, this.g = n.g, this.b = n.b, this.a = n.a, this.roundA = Math.round(100 * this.a) / 100, this.format = (a = t.format) !== null && a !== void 0 ? a : n.format, this.gradientType = t.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 = n.ok;
|
|
443
|
-
}
|
|
444
|
-
return r.prototype.isDark = function() {
|
|
445
|
-
return this.getBrightness() < 128;
|
|
446
|
-
}, r.prototype.isLight = function() {
|
|
447
|
-
return !this.isDark();
|
|
448
|
-
}, r.prototype.getBrightness = function() {
|
|
449
|
-
var e = this.toRgb();
|
|
450
|
-
return (e.r * 299 + e.g * 587 + e.b * 114) / 1e3;
|
|
451
|
-
}, r.prototype.getLuminance = function() {
|
|
452
|
-
var e = this.toRgb(), t, a, n, i = e.r / 255, o = e.g / 255, s = e.b / 255;
|
|
453
|
-
return i <= 0.03928 ? t = i / 12.92 : t = Math.pow((i + 0.055) / 1.055, 2.4), o <= 0.03928 ? a = o / 12.92 : a = Math.pow((o + 0.055) / 1.055, 2.4), s <= 0.03928 ? n = s / 12.92 : n = Math.pow((s + 0.055) / 1.055, 2.4), 0.2126 * t + 0.7152 * a + 0.0722 * n;
|
|
454
|
-
}, r.prototype.getAlpha = function() {
|
|
455
|
-
return this.a;
|
|
456
|
-
}, r.prototype.setAlpha = function(e) {
|
|
457
|
-
return this.a = Y(e), this.roundA = Math.round(100 * this.a) / 100, this;
|
|
458
|
-
}, r.prototype.isMonochrome = function() {
|
|
459
|
-
var e = this.toHsl().s;
|
|
460
|
-
return e === 0;
|
|
461
|
-
}, r.prototype.toHsv = function() {
|
|
462
|
-
var e = K(this.r, this.g, this.b);
|
|
463
|
-
return { h: e.h * 360, s: e.s, v: e.v, a: this.a };
|
|
464
|
-
}, r.prototype.toHsvString = function() {
|
|
465
|
-
var e = K(this.r, this.g, this.b), t = Math.round(e.h * 360), a = Math.round(e.s * 100), n = Math.round(e.v * 100);
|
|
466
|
-
return this.a === 1 ? "hsv(".concat(t, ", ").concat(a, "%, ").concat(n, "%)") : "hsva(".concat(t, ", ").concat(a, "%, ").concat(n, "%, ").concat(this.roundA, ")");
|
|
467
|
-
}, r.prototype.toHsl = function() {
|
|
468
|
-
var e = q(this.r, this.g, this.b);
|
|
469
|
-
return { h: e.h * 360, s: e.s, l: e.l, a: this.a };
|
|
470
|
-
}, r.prototype.toHslString = function() {
|
|
471
|
-
var e = q(this.r, this.g, this.b), t = Math.round(e.h * 360), a = Math.round(e.s * 100), n = Math.round(e.l * 100);
|
|
472
|
-
return this.a === 1 ? "hsl(".concat(t, ", ").concat(a, "%, ").concat(n, "%)") : "hsla(".concat(t, ", ").concat(a, "%, ").concat(n, "%, ").concat(this.roundA, ")");
|
|
473
|
-
}, r.prototype.toHex = function(e) {
|
|
474
|
-
return e === void 0 && (e = !1), L(this.r, this.g, this.b, e);
|
|
475
|
-
}, r.prototype.toHexString = function(e) {
|
|
476
|
-
return e === void 0 && (e = !1), "#" + this.toHex(e);
|
|
477
|
-
}, r.prototype.toHex8 = function(e) {
|
|
478
|
-
return e === void 0 && (e = !1), _t(this.r, this.g, this.b, this.a, e);
|
|
479
|
-
}, r.prototype.toHex8String = function(e) {
|
|
480
|
-
return e === void 0 && (e = !1), "#" + this.toHex8(e);
|
|
481
|
-
}, r.prototype.toHexShortString = function(e) {
|
|
482
|
-
return e === void 0 && (e = !1), this.a === 1 ? this.toHexString(e) : this.toHex8String(e);
|
|
483
|
-
}, r.prototype.toRgb = function() {
|
|
484
|
-
return {
|
|
485
|
-
r: Math.round(this.r),
|
|
486
|
-
g: Math.round(this.g),
|
|
487
|
-
b: Math.round(this.b),
|
|
488
|
-
a: this.a
|
|
489
|
-
};
|
|
490
|
-
}, r.prototype.toRgbString = function() {
|
|
491
|
-
var e = Math.round(this.r), t = Math.round(this.g), a = Math.round(this.b);
|
|
492
|
-
return this.a === 1 ? "rgb(".concat(e, ", ").concat(t, ", ").concat(a, ")") : "rgba(".concat(e, ", ").concat(t, ", ").concat(a, ", ").concat(this.roundA, ")");
|
|
493
|
-
}, r.prototype.toPercentageRgb = function() {
|
|
494
|
-
var e = function(t) {
|
|
495
|
-
return "".concat(Math.round(c(t, 255) * 100), "%");
|
|
496
|
-
};
|
|
497
|
-
return {
|
|
498
|
-
r: e(this.r),
|
|
499
|
-
g: e(this.g),
|
|
500
|
-
b: e(this.b),
|
|
501
|
-
a: this.a
|
|
502
|
-
};
|
|
503
|
-
}, r.prototype.toPercentageRgbString = function() {
|
|
504
|
-
var e = function(t) {
|
|
505
|
-
return Math.round(c(t, 255) * 100);
|
|
506
|
-
};
|
|
507
|
-
return this.a === 1 ? "rgb(".concat(e(this.r), "%, ").concat(e(this.g), "%, ").concat(e(this.b), "%)") : "rgba(".concat(e(this.r), "%, ").concat(e(this.g), "%, ").concat(e(this.b), "%, ").concat(this.roundA, ")");
|
|
508
|
-
}, r.prototype.toName = function() {
|
|
509
|
-
if (this.a === 0)
|
|
510
|
-
return "transparent";
|
|
511
|
-
if (this.a < 1)
|
|
512
|
-
return !1;
|
|
513
|
-
for (var e = "#" + L(this.r, this.g, this.b, !1), t = 0, a = Object.entries(G); t < a.length; t++) {
|
|
514
|
-
var n = a[t], i = n[0], o = n[1];
|
|
515
|
-
if (e === o)
|
|
516
|
-
return i;
|
|
517
|
-
}
|
|
518
|
-
return !1;
|
|
519
|
-
}, r.prototype.toString = function(e) {
|
|
520
|
-
var t = !!e;
|
|
521
|
-
e = e ?? this.format;
|
|
522
|
-
var a = !1, n = this.a < 1 && this.a >= 0, i = !t && n && (e.startsWith("hex") || e === "name");
|
|
523
|
-
return i ? e === "name" && this.a === 0 ? this.toName() : this.toRgbString() : (e === "rgb" && (a = this.toRgbString()), e === "prgb" && (a = this.toPercentageRgbString()), (e === "hex" || e === "hex6") && (a = this.toHexString()), e === "hex3" && (a = this.toHexString(!0)), e === "hex4" && (a = this.toHex8String(!0)), e === "hex8" && (a = this.toHex8String()), e === "name" && (a = this.toName()), e === "hsl" && (a = this.toHslString()), e === "hsv" && (a = this.toHsvString()), a || this.toHexString());
|
|
524
|
-
}, r.prototype.toNumber = function() {
|
|
525
|
-
return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b);
|
|
526
|
-
}, r.prototype.clone = function() {
|
|
527
|
-
return new r(this.toString());
|
|
528
|
-
}, r.prototype.lighten = function(e) {
|
|
529
|
-
e === void 0 && (e = 10);
|
|
530
|
-
var t = this.toHsl();
|
|
531
|
-
return t.l += e / 100, t.l = A(t.l), new r(t);
|
|
532
|
-
}, r.prototype.brighten = function(e) {
|
|
533
|
-
e === void 0 && (e = 10);
|
|
534
|
-
var t = this.toRgb();
|
|
535
|
-
return t.r = Math.max(0, Math.min(255, t.r - Math.round(255 * -(e / 100)))), t.g = Math.max(0, Math.min(255, t.g - Math.round(255 * -(e / 100)))), t.b = Math.max(0, Math.min(255, t.b - Math.round(255 * -(e / 100)))), new r(t);
|
|
536
|
-
}, r.prototype.darken = function(e) {
|
|
537
|
-
e === void 0 && (e = 10);
|
|
538
|
-
var t = this.toHsl();
|
|
539
|
-
return t.l -= e / 100, t.l = A(t.l), new r(t);
|
|
540
|
-
}, r.prototype.tint = function(e) {
|
|
541
|
-
return e === void 0 && (e = 10), this.mix("white", e);
|
|
542
|
-
}, r.prototype.shade = function(e) {
|
|
543
|
-
return e === void 0 && (e = 10), this.mix("black", e);
|
|
544
|
-
}, r.prototype.desaturate = function(e) {
|
|
545
|
-
e === void 0 && (e = 10);
|
|
546
|
-
var t = this.toHsl();
|
|
547
|
-
return t.s -= e / 100, t.s = A(t.s), new r(t);
|
|
548
|
-
}, r.prototype.saturate = function(e) {
|
|
549
|
-
e === void 0 && (e = 10);
|
|
550
|
-
var t = this.toHsl();
|
|
551
|
-
return t.s += e / 100, t.s = A(t.s), new r(t);
|
|
552
|
-
}, r.prototype.greyscale = function() {
|
|
553
|
-
return this.desaturate(100);
|
|
554
|
-
}, r.prototype.spin = function(e) {
|
|
555
|
-
var t = this.toHsl(), a = (t.h + e) % 360;
|
|
556
|
-
return t.h = a < 0 ? 360 + a : a, new r(t);
|
|
557
|
-
}, r.prototype.mix = function(e, t) {
|
|
558
|
-
t === void 0 && (t = 50);
|
|
559
|
-
var a = this.toRgb(), n = new r(e).toRgb(), i = t / 100, o = {
|
|
560
|
-
r: (n.r - a.r) * i + a.r,
|
|
561
|
-
g: (n.g - a.g) * i + a.g,
|
|
562
|
-
b: (n.b - a.b) * i + a.b,
|
|
563
|
-
a: (n.a - a.a) * i + a.a
|
|
564
|
-
};
|
|
565
|
-
return new r(o);
|
|
566
|
-
}, r.prototype.analogous = function(e, t) {
|
|
567
|
-
e === void 0 && (e = 6), t === void 0 && (t = 30);
|
|
568
|
-
var a = this.toHsl(), n = 360 / t, i = [this];
|
|
569
|
-
for (a.h = (a.h - (n * e >> 1) + 720) % 360; --e; )
|
|
570
|
-
a.h = (a.h + n) % 360, i.push(new r(a));
|
|
571
|
-
return i;
|
|
572
|
-
}, r.prototype.complement = function() {
|
|
573
|
-
var e = this.toHsl();
|
|
574
|
-
return e.h = (e.h + 180) % 360, new r(e);
|
|
575
|
-
}, r.prototype.monochromatic = function(e) {
|
|
576
|
-
e === void 0 && (e = 6);
|
|
577
|
-
for (var t = this.toHsv(), a = t.h, n = t.s, i = t.v, o = [], s = 1 / e; e--; )
|
|
578
|
-
o.push(new r({ h: a, s: n, v: i })), i = (i + s) % 1;
|
|
579
|
-
return o;
|
|
580
|
-
}, r.prototype.splitcomplement = function() {
|
|
581
|
-
var e = this.toHsl(), t = e.h;
|
|
582
|
-
return [
|
|
583
|
-
this,
|
|
584
|
-
new r({ h: (t + 72) % 360, s: e.s, l: e.l }),
|
|
585
|
-
new r({ h: (t + 216) % 360, s: e.s, l: e.l })
|
|
586
|
-
];
|
|
587
|
-
}, r.prototype.onBackground = function(e) {
|
|
588
|
-
var t = this.toRgb(), a = new r(e).toRgb(), n = t.a + a.a * (1 - t.a);
|
|
589
|
-
return new r({
|
|
590
|
-
r: (t.r * t.a + a.r * a.a * (1 - t.a)) / n,
|
|
591
|
-
g: (t.g * t.a + a.g * a.a * (1 - t.a)) / n,
|
|
592
|
-
b: (t.b * t.a + a.b * a.a * (1 - t.a)) / n,
|
|
593
|
-
a: n
|
|
594
|
-
});
|
|
595
|
-
}, r.prototype.triad = function() {
|
|
596
|
-
return this.polyad(3);
|
|
597
|
-
}, r.prototype.tetrad = function() {
|
|
598
|
-
return this.polyad(4);
|
|
599
|
-
}, r.prototype.polyad = function(e) {
|
|
600
|
-
for (var t = this.toHsl(), a = t.h, n = [this], i = 360 / e, o = 1; o < e; o++)
|
|
601
|
-
n.push(new r({ h: (a + o * i) % 360, s: t.s, l: t.l }));
|
|
602
|
-
return n;
|
|
603
|
-
}, r.prototype.equals = function(e) {
|
|
604
|
-
return this.toRgbString() === new r(e).toRgbString();
|
|
605
|
-
}, r;
|
|
606
|
-
}()
|
|
607
|
-
);
|
|
608
|
-
function p(r, e = 20) {
|
|
609
|
-
return r.mix("#141414", e).toString();
|
|
610
|
-
}
|
|
611
|
-
function Vt(r) {
|
|
612
|
-
const e = J(), t = z("button");
|
|
613
|
-
return m(() => {
|
|
614
|
-
let a = {}, n = r.color;
|
|
615
|
-
if (n) {
|
|
616
|
-
const i = n.match(/var\((.*?)\)/);
|
|
617
|
-
i && (n = window.getComputedStyle(window.document.documentElement).getPropertyValue(i[1]));
|
|
618
|
-
const o = new Pt(n), s = r.dark ? o.tint(20).toString() : p(o, 20);
|
|
619
|
-
if (r.plain)
|
|
620
|
-
a = t.cssVarBlock({
|
|
621
|
-
"bg-color": r.dark ? p(o, 90) : o.tint(90).toString(),
|
|
622
|
-
"text-color": n,
|
|
623
|
-
"border-color": r.dark ? p(o, 50) : o.tint(50).toString(),
|
|
624
|
-
"hover-text-color": `var(${t.cssVarName("color-white")})`,
|
|
625
|
-
"hover-bg-color": n,
|
|
626
|
-
"hover-border-color": n,
|
|
627
|
-
"active-bg-color": s,
|
|
628
|
-
"active-text-color": `var(${t.cssVarName("color-white")})`,
|
|
629
|
-
"active-border-color": s
|
|
630
|
-
}), e.value && (a[t.cssVarBlockName("disabled-bg-color")] = r.dark ? p(o, 90) : o.tint(90).toString(), a[t.cssVarBlockName("disabled-text-color")] = r.dark ? p(o, 50) : o.tint(50).toString(), a[t.cssVarBlockName("disabled-border-color")] = r.dark ? p(o, 80) : o.tint(80).toString());
|
|
631
|
-
else {
|
|
632
|
-
const u = r.dark ? p(o, 30) : o.tint(30).toString(), g = o.isDark() ? `var(${t.cssVarName("color-white")})` : `var(${t.cssVarName("color-black")})`;
|
|
633
|
-
if (a = t.cssVarBlock({
|
|
634
|
-
"bg-color": n,
|
|
635
|
-
"text-color": g,
|
|
636
|
-
"border-color": n,
|
|
637
|
-
"hover-bg-color": u,
|
|
638
|
-
"hover-text-color": g,
|
|
639
|
-
"hover-border-color": u,
|
|
640
|
-
"active-bg-color": s,
|
|
641
|
-
"active-border-color": s
|
|
642
|
-
}), e.value) {
|
|
643
|
-
const v = r.dark ? p(o, 50) : o.tint(50).toString();
|
|
644
|
-
a[t.cssVarBlockName("disabled-bg-color")] = v, a[t.cssVarBlockName("disabled-text-color")] = r.dark ? "rgba(255, 255, 255, 0.5)" : `var(${t.cssVarName("color-white")})`, a[t.cssVarBlockName("disabled-border-color")] = v;
|
|
645
|
-
}
|
|
646
|
-
}
|
|
647
|
-
}
|
|
648
|
-
return a;
|
|
649
|
-
});
|
|
650
|
-
}
|
|
651
|
-
const $t = _({
|
|
652
|
-
name: "ElButton"
|
|
653
|
-
}), Gt = /* @__PURE__ */ _({
|
|
654
|
-
...$t,
|
|
655
|
-
props: $,
|
|
656
|
-
emits: Mt,
|
|
657
|
-
setup(r, { expose: e, emit: t }) {
|
|
658
|
-
const a = r, n = Vt(a), i = z("button"), { _ref: o, _size: s, _type: u, _disabled: g, _props: v, shouldAddSpace: M, handleClick: T } = kt(a, t), j = m(() => [
|
|
659
|
-
i.b(),
|
|
660
|
-
i.m(u.value),
|
|
661
|
-
i.m(s.value),
|
|
662
|
-
i.is("disabled", g.value),
|
|
663
|
-
i.is("loading", a.loading),
|
|
664
|
-
i.is("plain", a.plain),
|
|
665
|
-
i.is("round", a.round),
|
|
666
|
-
i.is("circle", a.circle),
|
|
667
|
-
i.is("text", a.text),
|
|
668
|
-
i.is("link", a.link),
|
|
669
|
-
i.is("has-bg", a.bg)
|
|
670
|
-
]);
|
|
671
|
-
return e({
|
|
672
|
-
ref: o,
|
|
673
|
-
size: s,
|
|
674
|
-
type: u,
|
|
675
|
-
disabled: g,
|
|
676
|
-
shouldAddSpace: M
|
|
677
|
-
}), (f, x) => (y(), B(F(f.tag), ot({
|
|
678
|
-
ref_key: "_ref",
|
|
679
|
-
ref: o
|
|
680
|
-
}, d(v), {
|
|
681
|
-
class: d(j),
|
|
682
|
-
style: d(n),
|
|
683
|
-
onClick: d(T)
|
|
684
|
-
}), {
|
|
685
|
-
default: N(() => [
|
|
686
|
-
f.loading ? (y(), P(st, { key: 0 }, [
|
|
687
|
-
f.$slots.loading ? R(f.$slots, "loading", { key: 0 }) : (y(), B(d(U), {
|
|
688
|
-
key: 1,
|
|
689
|
-
class: V(d(i).is("loading"))
|
|
690
|
-
}, {
|
|
691
|
-
default: N(() => [
|
|
692
|
-
(y(), B(F(f.loadingIcon)))
|
|
693
|
-
]),
|
|
694
|
-
_: 1
|
|
695
|
-
}, 8, ["class"]))
|
|
696
|
-
], 64)) : f.icon || f.$slots.icon ? (y(), B(d(U), { key: 1 }, {
|
|
697
|
-
default: N(() => [
|
|
698
|
-
f.icon ? (y(), B(F(f.icon), { key: 0 })) : R(f.$slots, "icon", { key: 1 })
|
|
699
|
-
]),
|
|
700
|
-
_: 3
|
|
701
|
-
})) : D("v-if", !0),
|
|
702
|
-
f.$slots.default ? (y(), P("span", {
|
|
703
|
-
key: 2,
|
|
704
|
-
class: V({ [d(i).em("text", "expand")]: d(M) })
|
|
705
|
-
}, [
|
|
706
|
-
R(f.$slots, "default")
|
|
707
|
-
], 2)) : D("v-if", !0)
|
|
708
|
-
]),
|
|
709
|
-
_: 3
|
|
710
|
-
}, 16, ["class", "style", "onClick"]));
|
|
711
|
-
}
|
|
712
|
-
});
|
|
713
|
-
var zt = /* @__PURE__ */ Q(Gt, [["__file", "button.vue"]]);
|
|
714
|
-
const jt = {
|
|
715
|
-
size: $.size,
|
|
716
|
-
type: $.type
|
|
717
|
-
}, Dt = _({
|
|
718
|
-
name: "ElButtonGroup"
|
|
719
|
-
}), Ot = /* @__PURE__ */ _({
|
|
720
|
-
...Dt,
|
|
721
|
-
props: jt,
|
|
722
|
-
setup(r) {
|
|
723
|
-
const e = r;
|
|
724
|
-
ft(X, ut({
|
|
725
|
-
size: O(e, "size"),
|
|
726
|
-
type: O(e, "type")
|
|
727
|
-
}));
|
|
728
|
-
const t = z("button");
|
|
729
|
-
return (a, n) => (y(), P("div", {
|
|
730
|
-
class: V(d(t).b("group"))
|
|
731
|
-
}, [
|
|
732
|
-
R(a.$slots, "default")
|
|
733
|
-
], 2));
|
|
734
|
-
}
|
|
735
|
-
});
|
|
736
|
-
var tt = /* @__PURE__ */ Q(Ot, [["__file", "button-group.vue"]]);
|
|
737
|
-
const Lt = yt(zt, {
|
|
738
|
-
ButtonGroup: tt
|
|
739
|
-
});
|
|
740
|
-
mt(tt);
|
|
741
|
-
export {
|
|
742
|
-
Lt as E,
|
|
743
|
-
Pt as T,
|
|
744
|
-
xt as b
|
|
745
|
-
};
|