st-comp 0.0.279 → 0.0.280
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/es/ChartLayout.cjs +1 -1
- package/es/ChartLayout.js +13 -14
- package/es/CustomFunction.cjs +2 -2
- package/es/CustomFunction.js +342 -547
- package/es/FactorWarning.cjs +1 -1
- package/es/FactorWarning.js +294 -294
- package/es/Kline.cjs +1 -1
- package/es/Kline.js +19 -19
- package/es/KlineBasic.cjs +1 -1
- package/es/KlineBasic.js +253 -253
- package/es/KlineConfig.cjs +1 -1
- package/es/KlineConfig.js +579 -553
- package/es/KlineNew.cjs +1 -1
- package/es/KlineNew.js +17 -17
- package/es/KlinePlus.cjs +2 -2
- package/es/KlinePlus.js +23 -24
- package/es/MonacoEditor.cjs +1 -1
- package/es/MonacoEditor.js +30 -29
- package/es/Pagination.cjs +1 -1
- package/es/Pagination.js +517 -425
- package/es/PasswordPrompt.cjs +1 -1
- package/es/PasswordPrompt.js +3 -3
- package/es/Table.cjs +1 -1
- package/es/Table.js +46 -46
- package/es/User.cjs +1 -1
- package/es/User.js +898 -866
- package/es/VarSelectDialog.cjs +3 -3
- package/es/VarSelectDialog.js +110 -109
- package/es/VarietyAiHelper.cjs +7 -7
- package/es/VarietyAiHelper.js +605 -443
- package/es/VarietyAutoComplete.cjs +1 -1
- package/es/VarietyAutoComplete.js +11 -11
- package/es/VarietySearch.cjs +18 -18
- package/es/VarietySearch.js +3079 -2913
- package/es/{VarietySelect-d58eee29.cjs → VarietySelect-aa082a9c.cjs} +1 -1
- package/es/{VarietySelect-41daac7b.js → VarietySelect-c402bade.js} +5 -5
- package/es/VarietyTextCopy.cjs +3 -3
- package/es/VarietyTextCopy.js +51 -51
- package/es/VirtualTable.cjs +13 -1
- package/es/VirtualTable.js +1929 -2261
- package/es/_baseClone-10bdb989.cjs +1 -0
- package/es/_baseClone-98af8b33.js +210 -0
- package/es/base-d987e5c9.cjs +5 -0
- package/es/base-dd156b8e.js +790 -0
- package/es/{castArray-7741a212.js → castArray-18eb6a41.js} +1 -1
- package/es/{castArray-35947698.cjs → castArray-d9ffe84a.cjs} +1 -1
- package/es/clamp-17c4d8aa.cjs +1 -0
- package/es/clamp-c7512966.js +10 -0
- package/es/config-provider-33a127c4.cjs +1 -0
- package/es/config-provider-563023c9.js +86 -0
- package/es/debounce-0a98a9c6.js +57 -0
- package/es/debounce-37b17615.cjs +1 -0
- package/es/dropdown-ce7496c7.cjs +1 -0
- package/es/dropdown-feea8702.js +178 -0
- package/es/el-autocomplete-d9253bba.cjs +1 -0
- package/es/el-autocomplete-eac54f9f.js +434 -0
- package/es/el-button-8259594b.cjs +1 -0
- package/es/el-button-8a9721f8.js +343 -0
- package/es/el-checkbox-6303fc92.cjs +1 -0
- package/es/el-checkbox-c328b097.js +566 -0
- package/es/el-dialog-67536fac.js +252 -0
- package/es/el-dialog-8788bcc1.cjs +1 -0
- package/es/el-divider-3f0320be.cjs +1 -0
- package/es/el-divider-c5d72961.js +51 -0
- package/es/el-empty-552baf04.js +159 -0
- package/es/el-empty-58bc2a10.cjs +1 -0
- package/es/el-form-item-8efcf2c3.js +1265 -0
- package/es/el-form-item-95e68669.cjs +12 -0
- package/es/el-input-c8a9bb71.cjs +1 -0
- package/es/el-input-e66500b7.js +761 -0
- package/es/el-input-number-68ee0d65.js +390 -0
- package/es/el-input-number-d7a81922.cjs +1 -0
- package/es/el-loading-62132db2.cjs +1 -0
- package/es/el-loading-db4c6d13.js +190 -0
- package/es/el-menu-item-4b8e7794.cjs +1 -0
- package/es/el-menu-item-c2523d82.js +824 -0
- package/es/el-message-box-7c13546c.js +481 -0
- package/es/el-message-box-fed174f0.cjs +1 -0
- package/es/el-overlay-17299785.cjs +1 -0
- package/es/el-overlay-36f223e9.js +444 -0
- package/es/el-popconfirm-520b2928.cjs +1 -0
- package/es/el-popconfirm-a857c54a.js +190 -0
- package/es/el-popper-852446fd.js +2235 -0
- package/es/el-popper-f824c63b.cjs +1 -0
- package/es/{el-scrollbar-323542e7.js → el-scrollbar-0a42c1d0.js} +4 -9
- package/es/{el-scrollbar-bc3f790d.cjs → el-scrollbar-225c6c9e.cjs} +1 -1
- package/es/el-segmented-45dcc036.cjs +1 -0
- package/es/el-segmented-bf08279f.js +168 -0
- package/es/el-select-a34348e1.js +1535 -0
- package/es/el-select-d2958ae8.cjs +1 -0
- package/es/el-table-column-ad70ee0e.cjs +14 -0
- package/es/el-table-column-e2be313e.js +3651 -0
- package/es/el-tag-527f06f0.cjs +1 -0
- package/es/el-tag-9bcfae32.js +77 -0
- package/es/el-text-f9379288.js +84 -0
- package/es/el-text-fc345ffd.cjs +1 -0
- package/es/index-2419d69a.js +468 -0
- package/es/index-3806160e.js +710 -0
- package/es/index-3a0a7c36.cjs +1 -0
- package/es/index-3e7d5ffb.cjs +1 -0
- package/es/index-3ed0c678.cjs +1 -0
- package/es/index-47d30a52.js +372 -0
- package/es/index-5dec535a.cjs +1 -0
- package/es/index-5e76a22d.cjs +1 -0
- package/es/{index-eb96e074.js → index-60900c6c.js} +223 -254
- package/es/{index-a33b2fb8.js → index-69d2353a.js} +5090 -5090
- package/es/index-71ba4c28.cjs +1 -0
- package/es/index-7711aa69.cjs +1 -0
- package/es/index-7c4d8f5d.js +47 -0
- package/es/index-86678b72.js +131 -0
- package/es/index-99bb359f.cjs +1 -0
- package/es/index-99d4335d.cjs +1 -0
- package/es/index-a0522466.js +413 -0
- package/es/index-a181f161.js +429 -0
- package/es/index-b9a26e7f.js +141 -0
- package/es/{index-a9246d17.cjs → index-bb0bc131.cjs} +109 -109
- package/es/index-d372e68f.cjs +5 -0
- package/es/index-de9ad85c.js +12 -0
- package/es/{index-44a382a5.js → index-dfb34e00.js} +12 -12
- package/es/index-f5474dcc.cjs +3 -0
- package/es/{python-8a1664e6.js → python-6eafa04b.js} +32 -31
- package/es/{python-a3db9620.cjs → python-922eca89.cjs} +1 -1
- package/es/{raf-8249652f.cjs → raf-735cc598.cjs} +1 -1
- package/es/{raf-80ef0c0a.js → raf-b4fd1e12.js} +1 -1
- package/es/scroll-07bade1e.cjs +1 -0
- package/es/scroll-70271cb1.js +35 -0
- package/es/style.css +1 -1
- package/es/toNumber-b47ceb68.cjs +1 -0
- package/es/toNumber-f077c66a.js +31 -0
- package/es/use-form-item-0a831287.cjs +2 -0
- package/es/use-form-item-187cd7db.js +422 -0
- package/es/use-global-config-17dafd40.js +71 -0
- package/es/use-global-config-c90c91f7.cjs +1 -0
- package/es/{validator-c60a8956.js → validator-800ed2ba.js} +1 -1
- package/es/validator-ee5bc3eb.cjs +1 -0
- package/es/vnode-6f7b84f0.cjs +1 -0
- package/es/vnode-8ee9bf4e.js +12 -0
- package/es/{zh-cn-b59a0910.js → zh-cn-26cc7233.js} +36 -33
- package/es/zh-cn-a22a6792.cjs +1 -0
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +271 -252
- package/lib/{index-62fa175a.js → index-74ed48c6.js} +54107 -52151
- package/lib/{python-4a48fa39.js → python-7aaa84e4.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/es/_initCloneObject-5e73c9c8.js +0 -81
- package/es/_initCloneObject-a5832933.cjs +0 -1
- package/es/base-a5af3db3.js +0 -288
- package/es/base-ef747d02.cjs +0 -5
- package/es/config-provider-06ea6b42.cjs +0 -1
- package/es/config-provider-88b637a8.js +0 -59
- package/es/dayjs.min-2c20abe6.cjs +0 -1
- package/es/dayjs.min-8313b006.js +0 -299
- package/es/debounce-62f5b6e8.cjs +0 -1
- package/es/debounce-8d53f4dd.js +0 -83
- package/es/dropdown-4ce4c3e2.cjs +0 -1
- package/es/dropdown-72fbc15d.js +0 -178
- package/es/el-autocomplete-6cafcdf1.js +0 -329
- package/es/el-autocomplete-e0857c5b.cjs +0 -1
- package/es/el-button-613e0bb2.cjs +0 -1
- package/es/el-button-94d3de38.js +0 -272
- package/es/el-checkbox-6d4cb393.js +0 -459
- package/es/el-checkbox-e90762df.cjs +0 -1
- package/es/el-dialog-02942e22.cjs +0 -1
- package/es/el-dialog-5e30161f.js +0 -276
- package/es/el-divider-4713d74c.cjs +0 -1
- package/es/el-divider-4e059794.js +0 -45
- package/es/el-empty-1697ded8.cjs +0 -1
- package/es/el-empty-33cb66f1.js +0 -183
- package/es/el-form-item-44f060d8.cjs +0 -12
- package/es/el-form-item-9e8969ea.js +0 -1269
- package/es/el-input-342b2def.js +0 -531
- package/es/el-input-9a9a7f7f.cjs +0 -1
- package/es/el-input-number-65c847d6.cjs +0 -1
- package/es/el-input-number-c22b803a.js +0 -311
- package/es/el-loading-8179b497.cjs +0 -1
- package/es/el-loading-bcc51e3d.js +0 -203
- package/es/el-menu-item-339baf6d.js +0 -768
- package/es/el-menu-item-83186444.cjs +0 -1
- package/es/el-message-box-035b699c.js +0 -489
- package/es/el-message-box-c62d3217.cjs +0 -1
- package/es/el-overlay-3e17604b.js +0 -324
- package/es/el-overlay-8f1da9e8.cjs +0 -1
- package/es/el-popconfirm-4e32ec1b.cjs +0 -1
- package/es/el-popconfirm-f8a86e2c.js +0 -162
- package/es/el-popper-a4f3ae4d.cjs +0 -1
- package/es/el-popper-fbd0dcea.js +0 -2094
- package/es/el-segmented-56bd58a8.js +0 -142
- package/es/el-segmented-833ac177.cjs +0 -1
- package/es/el-select-44fa547d.js +0 -1256
- package/es/el-select-70806166.cjs +0 -1
- package/es/el-table-column-3e2cdfca.cjs +0 -14
- package/es/el-table-column-b74a857d.js +0 -3432
- package/es/el-tag-66c83156.js +0 -117
- package/es/el-tag-9c2f329f.cjs +0 -1
- package/es/el-text-034bd3f4.js +0 -67
- package/es/el-text-6b2374bb.cjs +0 -1
- package/es/index-00f6ca75.cjs +0 -1
- package/es/index-185792a7.cjs +0 -1
- package/es/index-1e2a38ab.js +0 -113
- package/es/index-2e331d74.js +0 -10
- package/es/index-3153c1db.cjs +0 -1
- package/es/index-5216d5f5.js +0 -406
- package/es/index-5c0dd943.cjs +0 -1
- package/es/index-657047bb.js +0 -513
- package/es/index-870b6c9d.cjs +0 -1
- package/es/index-8c2d7e05.js +0 -368
- package/es/index-960806da.js +0 -314
- package/es/index-9780a537.cjs +0 -1
- package/es/index-9d16cea8.cjs +0 -1
- package/es/index-ac8dc53d.cjs +0 -1
- package/es/index-bb833443.cjs +0 -1
- package/es/index-c5f2d372.js +0 -326
- package/es/index-c6584658.js +0 -163
- package/es/index-d77a7336.js +0 -204
- package/es/index-eea0bcb3.cjs +0 -1
- package/es/index-f034b910.js +0 -60
- package/es/index-f1c702f6.cjs +0 -1
- package/es/index-f58b2920.cjs +0 -1
- package/es/scroll-679bd6bf.js +0 -35
- package/es/scroll-b108dabd.cjs +0 -1
- package/es/use-form-common-props-ac666630.cjs +0 -1
- package/es/use-form-common-props-ed72e914.js +0 -364
- package/es/use-global-config-23472471.cjs +0 -1
- package/es/use-global-config-ee406d58.js +0 -72
- package/es/validator-366dbf39.cjs +0 -1
- package/es/vnode-5ddb7ed1.js +0 -14
- package/es/vnode-b906ae6d.cjs +0 -1
- package/es/zh-cn-c21d12d8.cjs +0 -1
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
import { b as O, c as G, u as I, w as R, n as q } from "./base-dd156b8e.js";
|
|
2
|
+
import { l as H, E as T } from "./index-60900c6c.js";
|
|
3
|
+
import { h as J, i as P, d as L, e as Q, g as K } from "./use-form-item-187cd7db.js";
|
|
4
|
+
import { u as W } from "./index-de9ad85c.js";
|
|
5
|
+
import { a as X } from "./use-global-config-17dafd40.js";
|
|
6
|
+
import { computed as i, inject as Y, ref as Z, useSlots as ee, Text as te, defineComponent as j, openBlock as f, createBlock as k, resolveDynamicComponent as V, mergeProps as oe, unref as d, withCtx as N, createElementBlock as w, Fragment as ae, renderSlot as h, normalizeClass as z, createCommentVNode as D, provide as ne, reactive as le, toRef as F } from "vue";
|
|
7
|
+
import { T as re } from "./index-3806160e.js";
|
|
8
|
+
const se = [
|
|
9
|
+
"default",
|
|
10
|
+
"primary",
|
|
11
|
+
"success",
|
|
12
|
+
"warning",
|
|
13
|
+
"info",
|
|
14
|
+
"danger",
|
|
15
|
+
"text",
|
|
16
|
+
""
|
|
17
|
+
], ie = [
|
|
18
|
+
"button",
|
|
19
|
+
"submit",
|
|
20
|
+
"reset"
|
|
21
|
+
], $ = O({
|
|
22
|
+
/**
|
|
23
|
+
* @description button size
|
|
24
|
+
*/
|
|
25
|
+
size: J,
|
|
26
|
+
/**
|
|
27
|
+
* @description disable the button
|
|
28
|
+
*/
|
|
29
|
+
disabled: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: void 0
|
|
32
|
+
},
|
|
33
|
+
/**
|
|
34
|
+
* @description button type
|
|
35
|
+
*/
|
|
36
|
+
type: {
|
|
37
|
+
type: String,
|
|
38
|
+
values: se,
|
|
39
|
+
default: ""
|
|
40
|
+
},
|
|
41
|
+
/**
|
|
42
|
+
* @description icon component
|
|
43
|
+
*/
|
|
44
|
+
icon: { type: P },
|
|
45
|
+
/**
|
|
46
|
+
* @description native button type
|
|
47
|
+
*/
|
|
48
|
+
nativeType: {
|
|
49
|
+
type: String,
|
|
50
|
+
values: ie,
|
|
51
|
+
default: "button"
|
|
52
|
+
},
|
|
53
|
+
/**
|
|
54
|
+
* @description determine whether it's loading
|
|
55
|
+
*/
|
|
56
|
+
loading: Boolean,
|
|
57
|
+
/**
|
|
58
|
+
* @description customize loading icon component
|
|
59
|
+
*/
|
|
60
|
+
loadingIcon: {
|
|
61
|
+
type: P,
|
|
62
|
+
default: () => H
|
|
63
|
+
},
|
|
64
|
+
/**
|
|
65
|
+
* @description determine whether it's a plain button
|
|
66
|
+
*/
|
|
67
|
+
plain: {
|
|
68
|
+
type: Boolean,
|
|
69
|
+
default: void 0
|
|
70
|
+
},
|
|
71
|
+
/**
|
|
72
|
+
* @description determine whether it's a text button
|
|
73
|
+
*/
|
|
74
|
+
text: {
|
|
75
|
+
type: Boolean,
|
|
76
|
+
default: void 0
|
|
77
|
+
},
|
|
78
|
+
/**
|
|
79
|
+
* @description determine whether it's a link button
|
|
80
|
+
*/
|
|
81
|
+
link: Boolean,
|
|
82
|
+
/**
|
|
83
|
+
* @description determine whether the text button background color is always on
|
|
84
|
+
*/
|
|
85
|
+
bg: Boolean,
|
|
86
|
+
/**
|
|
87
|
+
* @description native button autofocus
|
|
88
|
+
*/
|
|
89
|
+
autofocus: Boolean,
|
|
90
|
+
/**
|
|
91
|
+
* @description determine whether it's a round button
|
|
92
|
+
*/
|
|
93
|
+
round: {
|
|
94
|
+
type: Boolean,
|
|
95
|
+
default: void 0
|
|
96
|
+
},
|
|
97
|
+
/**
|
|
98
|
+
* @description determine whether it's a circle button
|
|
99
|
+
*/
|
|
100
|
+
circle: Boolean,
|
|
101
|
+
/**
|
|
102
|
+
* @description determine whether it's a dashed button
|
|
103
|
+
*/
|
|
104
|
+
dashed: {
|
|
105
|
+
type: Boolean,
|
|
106
|
+
default: void 0
|
|
107
|
+
},
|
|
108
|
+
/**
|
|
109
|
+
* @description custom button color, automatically calculate `hover` and `active` color
|
|
110
|
+
*/
|
|
111
|
+
color: String,
|
|
112
|
+
/**
|
|
113
|
+
* @description dark mode, which automatically converts `color` to dark mode colors
|
|
114
|
+
*/
|
|
115
|
+
dark: Boolean,
|
|
116
|
+
/**
|
|
117
|
+
* @description automatically insert a space between two chinese characters
|
|
118
|
+
*/
|
|
119
|
+
autoInsertSpace: {
|
|
120
|
+
type: Boolean,
|
|
121
|
+
default: void 0
|
|
122
|
+
},
|
|
123
|
+
/**
|
|
124
|
+
* @description custom element tag
|
|
125
|
+
*/
|
|
126
|
+
tag: {
|
|
127
|
+
type: G([String, Object]),
|
|
128
|
+
default: "button"
|
|
129
|
+
}
|
|
130
|
+
}), ce = { click: (e) => e instanceof MouseEvent }, A = Symbol("buttonGroupContextKey"), ue = (e, r) => {
|
|
131
|
+
W({
|
|
132
|
+
from: "type.text",
|
|
133
|
+
replacement: "link",
|
|
134
|
+
version: "3.0.0",
|
|
135
|
+
scope: "props",
|
|
136
|
+
ref: "https://element-plus.org/en-US/component/button.html#button-attributes"
|
|
137
|
+
}, i(() => e.type === "text"));
|
|
138
|
+
const o = Y(A, void 0), a = X("button"), { form: l } = L(), g = Q(i(() => o == null ? void 0 : o.size)), t = K(), c = Z(), s = ee(), b = i(() => {
|
|
139
|
+
var n;
|
|
140
|
+
return e.type || (o == null ? void 0 : o.type) || ((n = a.value) == null ? void 0 : n.type) || "";
|
|
141
|
+
}), m = i(() => {
|
|
142
|
+
var n;
|
|
143
|
+
return e.autoInsertSpace ?? ((n = a.value) == null ? void 0 : n.autoInsertSpace) ?? !1;
|
|
144
|
+
}), B = i(() => {
|
|
145
|
+
var n;
|
|
146
|
+
return e.plain ?? ((n = a.value) == null ? void 0 : n.plain) ?? !1;
|
|
147
|
+
}), _ = i(() => {
|
|
148
|
+
var n;
|
|
149
|
+
return e.round ?? ((n = a.value) == null ? void 0 : n.round) ?? !1;
|
|
150
|
+
}), S = i(() => {
|
|
151
|
+
var n;
|
|
152
|
+
return e.text ?? ((n = a.value) == null ? void 0 : n.text) ?? !1;
|
|
153
|
+
}), x = i(() => {
|
|
154
|
+
var n;
|
|
155
|
+
return e.dashed ?? ((n = a.value) == null ? void 0 : n.dashed) ?? !1;
|
|
156
|
+
}), C = i(() => e.tag === "button" ? {
|
|
157
|
+
ariaDisabled: t.value || e.loading,
|
|
158
|
+
disabled: t.value || e.loading,
|
|
159
|
+
autofocus: e.autofocus,
|
|
160
|
+
type: e.nativeType
|
|
161
|
+
} : {}), p = i(() => {
|
|
162
|
+
var v;
|
|
163
|
+
const n = (v = s.default) == null ? void 0 : v.call(s);
|
|
164
|
+
if (m.value && (n == null ? void 0 : n.length) === 1) {
|
|
165
|
+
const y = n[0];
|
|
166
|
+
if ((y == null ? void 0 : y.type) === te) {
|
|
167
|
+
const M = y.children;
|
|
168
|
+
return /^\p{Unified_Ideograph}{2}$/u.test(M.trim());
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
return !1;
|
|
172
|
+
});
|
|
173
|
+
return {
|
|
174
|
+
_disabled: t,
|
|
175
|
+
_size: g,
|
|
176
|
+
_type: b,
|
|
177
|
+
_ref: c,
|
|
178
|
+
_props: C,
|
|
179
|
+
_plain: B,
|
|
180
|
+
_round: _,
|
|
181
|
+
_text: S,
|
|
182
|
+
_dashed: x,
|
|
183
|
+
shouldAddSpace: p,
|
|
184
|
+
handleClick: (n) => {
|
|
185
|
+
if (t.value || e.loading) {
|
|
186
|
+
n.stopPropagation();
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
e.nativeType === "reset" && (l == null || l.resetFields()), r("click", n);
|
|
190
|
+
}
|
|
191
|
+
};
|
|
192
|
+
};
|
|
193
|
+
function u(e, r = 20) {
|
|
194
|
+
return e.mix("#141414", r).toString();
|
|
195
|
+
}
|
|
196
|
+
function de(e) {
|
|
197
|
+
const r = K(), o = I("button");
|
|
198
|
+
return i(() => {
|
|
199
|
+
let a = {}, l = e.color;
|
|
200
|
+
if (l) {
|
|
201
|
+
const g = l.match(/var\((.*?)\)/);
|
|
202
|
+
g && (l = window.getComputedStyle(window.document.documentElement).getPropertyValue(g[1]));
|
|
203
|
+
const t = new re(l), c = e.dark ? t.tint(20).toString() : u(t, 20);
|
|
204
|
+
if (e.plain)
|
|
205
|
+
a = o.cssVarBlock({
|
|
206
|
+
"bg-color": e.dark ? u(t, 90) : t.tint(90).toString(),
|
|
207
|
+
"text-color": l,
|
|
208
|
+
"border-color": e.dark ? u(t, 50) : t.tint(50).toString(),
|
|
209
|
+
"hover-text-color": `var(${o.cssVarName("color-white")})`,
|
|
210
|
+
"hover-bg-color": l,
|
|
211
|
+
"hover-border-color": l,
|
|
212
|
+
"active-bg-color": c,
|
|
213
|
+
"active-text-color": `var(${o.cssVarName("color-white")})`,
|
|
214
|
+
"active-border-color": c
|
|
215
|
+
}), r.value && (a[o.cssVarBlockName("disabled-bg-color")] = e.dark ? u(t, 90) : t.tint(90).toString(), a[o.cssVarBlockName("disabled-text-color")] = e.dark ? u(t, 50) : t.tint(50).toString(), a[o.cssVarBlockName("disabled-border-color")] = e.dark ? u(t, 80) : t.tint(80).toString());
|
|
216
|
+
else if (e.link || e.text) {
|
|
217
|
+
const s = e.dark ? u(t, 30) : t.tint(30).toString();
|
|
218
|
+
if (a = o.cssVarBlock({
|
|
219
|
+
"text-color": l,
|
|
220
|
+
"hover-text-color": s,
|
|
221
|
+
"active-text-color": c
|
|
222
|
+
}), e.link && (a[o.cssVarBlockName("hover-link-text-color")] = s, a[o.cssVarBlockName("active-color")] = c), r.value) {
|
|
223
|
+
const b = e.dark ? u(t, 50) : t.tint(50).toString();
|
|
224
|
+
a[o.cssVarBlockName("disabled-bg-color")] = "transparent", a[o.cssVarBlockName("disabled-text-color")] = b, a[o.cssVarBlockName("disabled-border-color")] = "transparent";
|
|
225
|
+
}
|
|
226
|
+
} else {
|
|
227
|
+
const s = e.dark ? u(t, 30) : t.tint(30).toString(), b = t.isDark() ? `var(${o.cssVarName("color-white")})` : `var(${o.cssVarName("color-black")})`;
|
|
228
|
+
if (a = o.cssVarBlock({
|
|
229
|
+
"bg-color": l,
|
|
230
|
+
"text-color": b,
|
|
231
|
+
"border-color": l,
|
|
232
|
+
"hover-bg-color": s,
|
|
233
|
+
"hover-text-color": b,
|
|
234
|
+
"hover-border-color": s,
|
|
235
|
+
"active-bg-color": c,
|
|
236
|
+
"active-border-color": c
|
|
237
|
+
}), r.value) {
|
|
238
|
+
const m = e.dark ? u(t, 50) : t.tint(50).toString();
|
|
239
|
+
a[o.cssVarBlockName("disabled-bg-color")] = m, a[o.cssVarBlockName("disabled-text-color")] = e.dark ? "rgba(255, 255, 255, 0.5)" : `var(${o.cssVarName("color-white")})`, a[o.cssVarBlockName("disabled-border-color")] = m;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
return a;
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
var be = /* @__PURE__ */ j({
|
|
247
|
+
name: "ElButton",
|
|
248
|
+
__name: "button",
|
|
249
|
+
props: $,
|
|
250
|
+
emits: ce,
|
|
251
|
+
setup(e, { expose: r, emit: o }) {
|
|
252
|
+
const a = e, l = o, g = de(a), t = I("button"), { _ref: c, _size: s, _type: b, _disabled: m, _props: B, _plain: _, _round: S, _text: x, _dashed: C, shouldAddSpace: p, handleClick: E } = ue(a, l), n = i(() => [
|
|
253
|
+
t.b(),
|
|
254
|
+
t.m(b.value),
|
|
255
|
+
t.m(s.value),
|
|
256
|
+
t.is("disabled", m.value),
|
|
257
|
+
t.is("loading", a.loading),
|
|
258
|
+
t.is("plain", _.value),
|
|
259
|
+
t.is("round", S.value),
|
|
260
|
+
t.is("circle", a.circle),
|
|
261
|
+
t.is("text", x.value),
|
|
262
|
+
t.is("dashed", C.value),
|
|
263
|
+
t.is("link", a.link),
|
|
264
|
+
t.is("has-bg", a.bg)
|
|
265
|
+
]);
|
|
266
|
+
return r({
|
|
267
|
+
/** @description button html element */
|
|
268
|
+
ref: c,
|
|
269
|
+
/** @description button size */
|
|
270
|
+
size: s,
|
|
271
|
+
/** @description button type */
|
|
272
|
+
type: b,
|
|
273
|
+
/** @description button disabled */
|
|
274
|
+
disabled: m,
|
|
275
|
+
/** @description whether adding space */
|
|
276
|
+
shouldAddSpace: p
|
|
277
|
+
}), (v, y) => (f(), k(V(e.tag), oe({
|
|
278
|
+
ref_key: "_ref",
|
|
279
|
+
ref: c
|
|
280
|
+
}, d(B), {
|
|
281
|
+
class: n.value,
|
|
282
|
+
style: d(g),
|
|
283
|
+
onClick: d(E)
|
|
284
|
+
}), {
|
|
285
|
+
default: N(() => [e.loading ? (f(), w(ae, { key: 0 }, [v.$slots.loading ? h(v.$slots, "loading", { key: 0 }) : (f(), k(d(T), {
|
|
286
|
+
key: 1,
|
|
287
|
+
class: z(d(t).is("loading"))
|
|
288
|
+
}, {
|
|
289
|
+
default: N(() => [(f(), k(V(e.loadingIcon)))]),
|
|
290
|
+
_: 1
|
|
291
|
+
}, 8, ["class"]))], 64)) : e.icon || v.$slots.icon ? (f(), k(d(T), { key: 1 }, {
|
|
292
|
+
default: N(() => [e.icon ? (f(), k(V(e.icon), { key: 0 })) : h(v.$slots, "icon", { key: 1 })]),
|
|
293
|
+
_: 3
|
|
294
|
+
})) : D("v-if", !0), v.$slots.default ? (f(), w("span", {
|
|
295
|
+
key: 2,
|
|
296
|
+
class: z({ [d(t).em("text", "expand")]: d(p) })
|
|
297
|
+
}, [h(v.$slots, "default")], 2)) : D("v-if", !0)]),
|
|
298
|
+
_: 3
|
|
299
|
+
}, 16, [
|
|
300
|
+
"class",
|
|
301
|
+
"style",
|
|
302
|
+
"onClick"
|
|
303
|
+
]));
|
|
304
|
+
}
|
|
305
|
+
}), ve = be;
|
|
306
|
+
const fe = {
|
|
307
|
+
/**
|
|
308
|
+
* @description control the size of buttons in this button-group
|
|
309
|
+
*/
|
|
310
|
+
size: $.size,
|
|
311
|
+
/**
|
|
312
|
+
* @description control the type of buttons in this button-group
|
|
313
|
+
*/
|
|
314
|
+
type: $.type,
|
|
315
|
+
/**
|
|
316
|
+
* @description display direction
|
|
317
|
+
*/
|
|
318
|
+
direction: {
|
|
319
|
+
type: G(String),
|
|
320
|
+
values: ["horizontal", "vertical"],
|
|
321
|
+
default: "horizontal"
|
|
322
|
+
}
|
|
323
|
+
};
|
|
324
|
+
var me = /* @__PURE__ */ j({
|
|
325
|
+
name: "ElButtonGroup",
|
|
326
|
+
__name: "button-group",
|
|
327
|
+
props: fe,
|
|
328
|
+
setup(e) {
|
|
329
|
+
const r = e;
|
|
330
|
+
ne(A, le({
|
|
331
|
+
size: F(r, "size"),
|
|
332
|
+
type: F(r, "type")
|
|
333
|
+
}));
|
|
334
|
+
const o = I("button");
|
|
335
|
+
return (a, l) => (f(), w("div", { class: z([d(o).b("group"), d(o).bm("group", r.direction)]) }, [h(a.$slots, "default")], 2));
|
|
336
|
+
}
|
|
337
|
+
}), U = me;
|
|
338
|
+
const Se = R(ve, { ButtonGroup: U });
|
|
339
|
+
q(U);
|
|
340
|
+
export {
|
|
341
|
+
Se as E,
|
|
342
|
+
se as b
|
|
343
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const i=require("./base-d987e5c9.cjs"),C=require("./el-popper-f824c63b.cjs"),h=require("./use-form-item-0a831287.cjs"),L=require("./index-f5474dcc.cjs"),e=require("vue"),P=require("./index-3ed0c678.cjs"),E=require("./index-d372e68f.cjs"),B=require("./_baseClone-10bdb989.cjs");function _(t,l,n){var u=-1,a=t.length;l<0&&(l=-l>a?0:a+l),n=n>a?a:n,n<0&&(n+=a),a=l>n?0:n-l>>>0,l>>>=0;for(var r=Array(a);++u<a;)r[u]=t[u+l];return r}function T(t){var l=t==null?0:t.length;return l?t[l-1]:void 0}function $(t,l){return l.length<2?t:E.baseGet(t,_(l,0,-1))}var M=Object.prototype,U=M.hasOwnProperty;function q(t,l){l=E.castPath(l,t);var n=-1,u=l.length;if(!u)return!0;for(;++n<u;){var a=E.toKey(l[n]);if(a==="__proto__"&&!U.call(t,"__proto__")||(a==="constructor"||a==="prototype")&&n<u-1)return!1}var r=$(t,l);return r==null||delete r[E.toKey(T(l))]}function j(t){return i.isPlainObject(t)?void 0:t}var K=1,R=2,H=4,Y=C.flatRest(function(t,l){var n={};if(t==null)return n;var u=!1;l=E.arrayMap(l,function(r){return r=E.castPath(r,t),u||(u=r.length>1),r}),B.copyObject(t,B.getAllKeysIn(t),n),u&&(n=B.baseClone(n,K|R|H,j));for(var a=l.length;a--;)q(n,l[a]);return n});const D=Y,I={modelValue:{type:[Number,String,Boolean],default:void 0},label:{type:[String,Boolean,Number,Object],default:void 0},value:{type:[String,Boolean,Number,Object],default:void 0},indeterminate:Boolean,disabled:{type:Boolean,default:void 0},checked:Boolean,name:{type:String,default:void 0},trueValue:{type:[String,Number],default:void 0},falseValue:{type:[String,Number],default:void 0},trueLabel:{type:[String,Number],default:void 0},falseLabel:{type:[String,Number],default:void 0},id:{type:String,default:void 0},border:Boolean,size:h.useSizeProp,tabindex:[String,Number],validateEvent:{type:Boolean,default:!0},ariaLabel:String,...C.useAriaProps(["ariaControls"])},A={[C.UPDATE_MODEL_EVENT]:t=>i.isString(t)||i.isNumber(t)||i.isBoolean(t),change:t=>i.isString(t)||i.isNumber(t)||i.isBoolean(t)},V=Symbol("checkboxGroupContextKey"),J=i.buildProps({modelValue:{type:i.definePropType(Array),default:()=>[]},disabled:{type:Boolean,default:void 0},min:Number,max:Number,size:h.useSizeProp,fill:String,textColor:String,tag:{type:String,default:"div"},validateEvent:{type:Boolean,default:!0},options:{type:i.definePropType(Array)},props:{type:i.definePropType(Object),default:()=>F},type:{type:String,values:["checkbox","button"],default:"checkbox"},...C.useAriaProps(["ariaLabel"])}),Q={[C.UPDATE_MODEL_EVENT]:t=>i.isArray(t),change:t=>i.isArray(t)},F={label:"label",value:"value",disabled:"disabled"},W=({model:t,isChecked:l})=>{const n=e.inject(V,void 0),u=e.inject(h.formContextKey,void 0),a=e.computed(()=>{var s,v;const r=(s=n==null?void 0:n.max)==null?void 0:s.value,d=(v=n==null?void 0:n.min)==null?void 0:v.value;return!i.isUndefined(r)&&t.value.length>=r&&!l.value||!i.isUndefined(d)&&t.value.length<=d&&l.value});return{isDisabled:h.useFormDisabled(e.computed(()=>{var r;return n===void 0?(u==null?void 0:u.disabled)??a.value:((r=n.disabled)==null?void 0:r.value)||a.value})),isLimitDisabled:a}},X=(t,{model:l,isLimitExceeded:n,hasOwnLabel:u,isDisabled:a,isLabeledByFormItem:r})=>{const d=e.inject(V,void 0),{formItem:s}=h.useFormItem(),{emit:v}=e.getCurrentInstance();function m(o){return[!0,t.trueValue,t.trueLabel].includes(o)?t.trueValue??t.trueLabel??!0:t.falseValue??t.falseLabel??!1}function f(o,c){v(C.CHANGE_EVENT,m(o),c)}function b(o){if(n.value)return;const c=o.target;v(C.CHANGE_EVENT,m(c.checked),o)}async function k(o){n.value||!u.value&&!a.value&&r.value&&(o.composedPath().some(c=>c.tagName==="LABEL")||(l.value=m([!1,t.falseValue,t.falseLabel].includes(l.value)),await e.nextTick(),f(l.value,o)))}const x=e.computed(()=>(d==null?void 0:d.validateEvent)||t.validateEvent);return e.watch(()=>t.modelValue,()=>{x.value&&(s==null||s.validate("change").catch(i.NOOP))}),{handleChange:b,onClickRoot:k}},Z=t=>{const l=e.ref(!1),{emit:n,vnode:u}=e.getCurrentInstance(),a=e.inject(V,void 0),r=e.computed(()=>i.isUndefined(a)===!1),d=e.ref(!1),s=e.computed(()=>{const m=u.props??{};return"modelValue"in m||"model-value"in m}),v=e.computed({get(){var m;return r.value?(m=a==null?void 0:a.modelValue)==null?void 0:m.value:s.value?t.modelValue:l.value},set(m){var f,b;r.value&&i.isArray(m)?(d.value=((f=a==null?void 0:a.max)==null?void 0:f.value)!==void 0&&m.length>(a==null?void 0:a.max.value)&&m.length>v.value.length,d.value===!1&&((b=a==null?void 0:a.changeEvent)==null||b.call(a,m))):(n(C.UPDATE_MODEL_EVENT,m),l.value=m)}});return{model:v,isGroup:r,isLimitExceeded:d}},G=(t,l,{model:n})=>{const u=e.inject(V,void 0),a=e.ref(!1),r=e.computed(()=>i.isPropAbsent(t.value)?t.label:t.value),d=e.computed(()=>{const s=n.value;return i.isBoolean(s)?s:i.isArray(s)?i.isObject(r.value)?s.map(e.toRaw).some(v=>P.isEqual(v,r.value)):s.map(e.toRaw).includes(r.value):s!=null?s===t.trueValue||s===t.trueLabel:!!s});return{checkboxButtonSize:h.useFormSize(e.computed(()=>{var s;return(s=u==null?void 0:u.size)==null?void 0:s.value}),{prop:!0}),isChecked:d,isFocused:a,checkboxSize:h.useFormSize(e.computed(()=>{var s;return(s=u==null?void 0:u.size)==null?void 0:s.value})),hasOwnLabel:e.computed(()=>!!l.default||!i.isPropAbsent(r.value)),actualValue:r}},O=(t,l)=>{const{formItem:n}=h.useFormItem(),{model:u,isGroup:a,isLimitExceeded:r}=Z(t),{isFocused:d,isChecked:s,checkboxButtonSize:v,checkboxSize:m,hasOwnLabel:f,actualValue:b}=G(t,l,{model:u}),{isDisabled:k}=W({model:u,isChecked:s}),{inputId:x,isLabeledByFormItem:o}=h.useFormItemInputId(t,{formItemContext:n,disableIdGeneration:f,disableIdManagement:a}),{handleChange:c,onClickRoot:p}=X(t,{model:u,isLimitExceeded:r,hasOwnLabel:f,isDisabled:k,isLabeledByFormItem:o});return(()=>{function g(){i.isArray(u.value)&&!u.value.includes(b.value)?u.value.push(b.value):u.value=t.trueValue??t.trueLabel??!0}t.checked&&g()})(),L.useDeprecated({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},e.computed(()=>a.value&&i.isPropAbsent(t.value))),L.useDeprecated({from:"true-label",replacement:"true-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},e.computed(()=>!!t.trueLabel)),L.useDeprecated({from:"false-label",replacement:"false-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},e.computed(()=>!!t.falseLabel)),{inputId:x,isLabeledByFormItem:o,isChecked:s,isDisabled:k,isFocused:d,checkboxButtonSize:v,checkboxSize:m,hasOwnLabel:f,model:u,actualValue:b,handleChange:c,onClickRoot:p}},ee=["id","indeterminate","name","tabindex","disabled"];var te=e.defineComponent({name:"ElCheckbox",__name:"checkbox",props:I,emits:A,setup(t){const l=t,{inputId:n,isLabeledByFormItem:u,isChecked:a,isDisabled:r,isFocused:d,checkboxSize:s,hasOwnLabel:v,model:m,actualValue:f,handleChange:b,onClickRoot:k}=O(l,e.useSlots()),x=e.computed(()=>l.trueValue||l.falseValue||l.trueLabel||l.falseLabel?{"true-value":l.trueValue??l.trueLabel??!0,"false-value":l.falseValue??l.falseLabel??!1}:{value:f.value}),o=i.useNamespace("checkbox"),c=e.computed(()=>[o.b(),o.m(s.value),o.is("disabled",r.value),o.is("bordered",l.border),o.is("checked",a.value)]),p=e.computed(()=>[o.e("input"),o.is("disabled",r.value),o.is("checked",a.value),o.is("indeterminate",l.indeterminate),o.is("focus",d.value)]);return(y,g)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(!e.unref(v)&&e.unref(u)?"span":"label"),{for:!e.unref(v)&&e.unref(u)?null:e.unref(n),class:e.normalizeClass(c.value),"aria-controls":t.indeterminate?t.ariaControls:null,"aria-checked":t.indeterminate?"mixed":void 0,"aria-label":t.ariaLabel,onClick:e.unref(k)},{default:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass(p.value)},[e.withDirectives(e.createElementVNode("input",e.mergeProps({id:e.unref(n),"onUpdate:modelValue":g[0]||(g[0]=S=>e.isRef(m)?m.value=S:null),class:e.unref(o).e("original"),type:"checkbox",indeterminate:t.indeterminate,name:t.name,tabindex:t.tabindex,disabled:e.unref(r)},x.value,{onChange:g[1]||(g[1]=(...S)=>e.unref(b)&&e.unref(b)(...S)),onFocus:g[2]||(g[2]=S=>d.value=!0),onBlur:g[3]||(g[3]=S=>d.value=!1),onClick:g[4]||(g[4]=e.withModifiers(()=>{},["stop"]))}),null,16,ee),[[e.vModelCheckbox,e.unref(m)]]),e.createElementVNode("span",{class:e.normalizeClass(e.unref(o).e("inner"))},null,2)],2),e.unref(v)?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(o).e("label"))},[e.renderSlot(y.$slots,"default"),y.$slots.default?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(t.label),1)],64))],2)):e.createCommentVNode("v-if",!0)]),_:3},8,["for","class","aria-controls","aria-checked","aria-label","onClick"]))}}),w=te;const le=["name","tabindex","disabled"];var ne=e.defineComponent({name:"ElCheckboxButton",__name:"checkbox-button",props:I,emits:A,setup(t){const l=t,{isFocused:n,isChecked:u,isDisabled:a,checkboxButtonSize:r,model:d,actualValue:s,handleChange:v}=O(l,e.useSlots()),m=e.computed(()=>l.trueValue||l.falseValue||l.trueLabel||l.falseLabel?{"true-value":l.trueValue??l.trueLabel??!0,"false-value":l.falseValue??l.falseLabel??!1}:{value:s.value}),f=e.inject(V,void 0),b=i.useNamespace("checkbox"),k=e.computed(()=>{var c,p;const o=((c=f==null?void 0:f.fill)==null?void 0:c.value)??"";return{backgroundColor:o,borderColor:o,color:((p=f==null?void 0:f.textColor)==null?void 0:p.value)??"",boxShadow:o?`-1px 0 0 0 ${o}`:void 0}}),x=e.computed(()=>[b.b("button"),b.bm("button",r.value),b.is("disabled",a.value),b.is("checked",u.value),b.is("focus",n.value)]);return(o,c)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(x.value)},[e.withDirectives(e.createElementVNode("input",e.mergeProps({"onUpdate:modelValue":c[0]||(c[0]=p=>e.isRef(d)?d.value=p:null),class:e.unref(b).be("button","original"),type:"checkbox",name:t.name,tabindex:t.tabindex,disabled:e.unref(a)},m.value,{onChange:c[1]||(c[1]=(...p)=>e.unref(v)&&e.unref(v)(...p)),onFocus:c[2]||(c[2]=p=>n.value=!0),onBlur:c[3]||(c[3]=p=>n.value=!1),onClick:c[4]||(c[4]=e.withModifiers(()=>{},["stop"]))}),null,16,le),[[e.vModelCheckbox,e.unref(d)]]),o.$slots.default||t.label?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(b).be("button","inner")),style:e.normalizeStyle(e.unref(u)?k.value:void 0)},[e.renderSlot(o.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)])],6)):e.createCommentVNode("v-if",!0)],2))}}),N=ne,ae=e.defineComponent({name:"ElCheckboxGroup",__name:"checkbox-group",props:J,emits:Q,setup(t,{emit:l}){const n=t,u=l,a=i.useNamespace("checkbox"),r=h.useFormDisabled(),{formItem:d}=h.useFormItem(),{inputId:s,isLabeledByFormItem:v}=h.useFormItemInputId(n,{formItemContext:d}),m=async o=>{u(C.UPDATE_MODEL_EVENT,o),await e.nextTick(),u(C.CHANGE_EVENT,o)},f=e.computed({get(){return n.modelValue},set(o){m(o)}}),b=e.computed(()=>({...F,...n.props})),k=o=>{const{label:c,value:p,disabled:y}=b.value,g={label:o[c],value:o[p],disabled:o[y]};return{...D(o,[c,p,y]),...g}},x=e.computed(()=>n.type==="button"?N:w);return e.provide(V,{...C.pick(e.toRefs(n),["size","min","max","validateEvent","fill","textColor"]),disabled:r,modelValue:f,changeEvent:m}),e.watch(()=>n.modelValue,(o,c)=>{n.validateEvent&&!P.isEqual(o,c)&&(d==null||d.validate("change").catch(i.NOOP))}),(o,c)=>{var p;return e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.tag),{id:e.unref(s),class:e.normalizeClass(e.unref(a).b("group")),role:"group","aria-label":e.unref(v)?void 0:t.ariaLabel||"checkbox-group","aria-labelledby":e.unref(v)?(p=e.unref(d))==null?void 0:p.labelId:void 0},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default",{},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,(y,g)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(x.value),e.mergeProps({key:g},{ref_for:!0},k(y)),null,16))),128))])]),_:3},8,["id","class","aria-label","aria-labelledby"])}}}),z=ae;const oe=i.withInstall(w,{CheckboxButton:N,CheckboxGroup:z});i.withNoopInstall(N);const ue=i.withNoopInstall(z);exports.ElCheckbox=oe;exports.ElCheckboxGroup=ue;exports.omit=D;
|