@layers.digital/layers-design-system-vue3 1.0.2 → 1.0.4
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/dist/components/LSwitch/LSwitch.vue.d.ts +357 -0
- package/dist/index.d.ts +1 -1
- package/dist/layers-design-system-vue3.cjs +1 -1
- package/dist/layers-design-system-vue3.js +14 -15
- package/dist/layers-design-system-vue310.cjs +1 -1
- package/dist/layers-design-system-vue310.js +44 -2
- package/dist/layers-design-system-vue311.cjs +1 -1
- package/dist/layers-design-system-vue311.js +2 -44
- package/dist/layers-design-system-vue312.cjs +1 -1
- package/dist/layers-design-system-vue312.js +7 -2
- package/dist/layers-design-system-vue313.cjs +1 -1
- package/dist/layers-design-system-vue313.js +40 -7
- package/dist/layers-design-system-vue314.cjs +1 -1
- package/dist/layers-design-system-vue314.js +2 -40
- package/dist/layers-design-system-vue315.cjs +1 -1
- package/dist/layers-design-system-vue315.js +46 -2
- package/dist/layers-design-system-vue316.cjs +1 -1
- package/dist/layers-design-system-vue316.js +2 -46
- package/dist/layers-design-system-vue317.cjs +1 -1
- package/dist/layers-design-system-vue317.js +2 -2
- package/dist/layers-design-system-vue318.cjs +1 -1
- package/dist/layers-design-system-vue318.js +1 -1
- package/dist/layers-design-system-vue319.cjs +1 -1
- package/dist/layers-design-system-vue319.js +24 -2
- package/dist/layers-design-system-vue32.cjs +1 -1
- package/dist/layers-design-system-vue32.js +3 -3
- package/dist/layers-design-system-vue320.cjs +1 -1
- package/dist/layers-design-system-vue320.js +2 -24
- package/dist/layers-design-system-vue321.cjs +1 -1
- package/dist/layers-design-system-vue321.js +2 -2
- package/dist/layers-design-system-vue322.cjs +1 -1
- package/dist/layers-design-system-vue322.js +25 -2
- package/dist/layers-design-system-vue323.cjs +1 -1
- package/dist/layers-design-system-vue323.js +2 -3
- package/dist/layers-design-system-vue326.cjs +3 -3
- package/dist/layers-design-system-vue326.js +98 -99
- package/dist/layers-design-system-vue327.cjs +1 -1
- package/dist/layers-design-system-vue327.js +209 -793
- package/dist/layers-design-system-vue328.cjs +12 -1
- package/dist/layers-design-system-vue328.js +1091 -2015
- package/dist/layers-design-system-vue329.cjs +13 -9
- package/dist/layers-design-system-vue329.js +1971 -526
- package/dist/layers-design-system-vue33.cjs +1 -1
- package/dist/layers-design-system-vue33.js +3 -3
- package/dist/layers-design-system-vue330.cjs +1 -12
- package/dist/layers-design-system-vue330.js +8 -1172
- package/dist/layers-design-system-vue331.cjs +1 -5
- package/dist/layers-design-system-vue331.js +1706 -979
- package/dist/layers-design-system-vue332.cjs +1 -13
- package/dist/layers-design-system-vue332.js +1994 -1878
- package/dist/layers-design-system-vue333.cjs +9 -1
- package/dist/layers-design-system-vue333.js +536 -2
- package/dist/layers-design-system-vue334.cjs +5 -1
- package/dist/layers-design-system-vue334.js +1010 -2
- package/dist/layers-design-system-vue335.cjs +1 -1
- package/dist/layers-design-system-vue335.js +2 -2
- package/dist/layers-design-system-vue338.cjs +1 -1
- package/dist/layers-design-system-vue338.js +2 -9
- package/dist/layers-design-system-vue339.cjs +1 -1
- package/dist/layers-design-system-vue339.js +2 -1737
- package/dist/layers-design-system-vue34.cjs +1 -1
- package/dist/layers-design-system-vue34.js +3 -3
- package/dist/layers-design-system-vue340.cjs +1 -1
- package/dist/layers-design-system-vue340.js +2 -2
- package/dist/layers-design-system-vue341.cjs +1 -1
- package/dist/layers-design-system-vue341.js +2 -2
- package/dist/layers-design-system-vue342.cjs +1 -1
- package/dist/layers-design-system-vue342.js +824 -2
- package/dist/layers-design-system-vue343.js +2 -2
- package/dist/layers-design-system-vue344.cjs +1 -1
- package/dist/layers-design-system-vue344.js +2 -2
- package/dist/layers-design-system-vue345.cjs +1 -1
- package/dist/layers-design-system-vue345.js +2 -113
- package/dist/layers-design-system-vue346.cjs +1 -1
- package/dist/layers-design-system-vue346.js +113 -2
- package/dist/layers-design-system-vue347.cjs +1 -1
- package/dist/layers-design-system-vue347.js +2 -240
- package/dist/layers-design-system-vue348.cjs +1 -1
- package/dist/layers-design-system-vue348.js +2 -2
- package/dist/layers-design-system-vue35.cjs +1 -1
- package/dist/layers-design-system-vue35.js +9 -9
- package/dist/layers-design-system-vue350.cjs +1 -0
- package/dist/layers-design-system-vue350.js +4 -0
- package/dist/layers-design-system-vue36.cjs +1 -1
- package/dist/layers-design-system-vue36.js +8 -8
- package/dist/layers-design-system-vue37.cjs +1 -1
- package/dist/layers-design-system-vue37.js +3 -3
- package/dist/layers-design-system-vue38.cjs +1 -1
- package/dist/layers-design-system-vue38.js +2 -2
- package/dist/layers-design-system-vue39.cjs +1 -1
- package/dist/layers-design-system-vue39.js +5 -21
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/components/LLinearProgress/LLinearProgress.vue.d.ts +0 -29
|
@@ -1,826 +1,242 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import { defineComponent as te, ref as ee, reactive as Be, computed as V, watch as se, onMounted as Xe, onUpdated as et, openBlock as x, createElementBlock as O, normalizeClass as U, unref as t, withModifiers as ce, withDirectives as Le, withKeys as ve, createVNode as de, withCtx as ge, createBlock as Z, createCommentVNode as ne, toRefs as Ee, normalizeStyle as le, createElementVNode as ae, toDisplayString as tt, h as lt, provide as nt, Fragment as fe, renderList as we, nextTick as ye, shallowRef as at, inject as rt } from "vue";
|
|
7
|
-
var ot = 100, ut = 600, Me = {
|
|
8
|
-
beforeMount(e, l) {
|
|
9
|
-
const o = l.value, { interval: a = ot, delay: c = ut } = Ce(o) ? {} : o;
|
|
10
|
-
let i, u;
|
|
11
|
-
const d = () => Ce(o) ? o() : o.handler(), y = () => {
|
|
12
|
-
u && (clearTimeout(u), u = void 0), i && (clearInterval(i), i = void 0);
|
|
13
|
-
};
|
|
14
|
-
e.addEventListener("mousedown", (v) => {
|
|
15
|
-
v.button === 0 && (y(), d(), document.addEventListener("mouseup", () => y(), {
|
|
16
|
-
once: !0
|
|
17
|
-
}), u = setTimeout(() => {
|
|
18
|
-
i = setInterval(() => {
|
|
19
|
-
d();
|
|
20
|
-
}, a);
|
|
21
|
-
}, c));
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
}, it = he({
|
|
25
|
-
id: {
|
|
26
|
-
type: String,
|
|
27
|
-
default: void 0
|
|
28
|
-
},
|
|
29
|
-
step: {
|
|
30
|
-
type: Number,
|
|
31
|
-
default: 1
|
|
32
|
-
},
|
|
33
|
-
stepStrictly: Boolean,
|
|
34
|
-
max: {
|
|
35
|
-
type: Number,
|
|
36
|
-
default: Number.POSITIVE_INFINITY
|
|
37
|
-
},
|
|
38
|
-
min: {
|
|
39
|
-
type: Number,
|
|
40
|
-
default: Number.NEGATIVE_INFINITY
|
|
41
|
-
},
|
|
42
|
-
modelValue: Number,
|
|
43
|
-
readonly: Boolean,
|
|
1
|
+
import { useId as O, useFormItem as W, useFormItemInputId as J, useSizeProp as z, UPDATE_MODEL_EVENT as k, CHANGE_EVENT as Q, useFormSize as X, useFormDisabled as Y } from "./layers-design-system-vue328.js";
|
|
2
|
+
import { buildProps as E, useNamespace as B, debugWarn as Z, withInstall as x, withNoopInstall as C, isString as h, isNumber as N, isBoolean as w, _export_sfc as I } from "./layers-design-system-vue329.js";
|
|
3
|
+
import { defineComponent as y, openBlock as V, createElementBlock as _, normalizeClass as f, unref as e, createElementVNode as g, withDirectives as $, isRef as F, vModelRadio as P, withModifiers as D, renderSlot as G, createTextVNode as T, toDisplayString as A, computed as c, normalizeStyle as ee, ref as R, onMounted as oe, provide as ae, reactive as le, toRefs as re, watch as ne, inject as te, nextTick as K } from "vue";
|
|
4
|
+
var M = E({
|
|
5
|
+
size: z,
|
|
44
6
|
disabled: Boolean,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
7
|
+
label: {
|
|
8
|
+
type: [String, Number, Boolean],
|
|
9
|
+
default: ""
|
|
10
|
+
}
|
|
11
|
+
}), ie = E({
|
|
12
|
+
...M,
|
|
13
|
+
modelValue: {
|
|
14
|
+
type: [String, Number, Boolean],
|
|
15
|
+
default: ""
|
|
49
16
|
},
|
|
50
|
-
|
|
17
|
+
name: {
|
|
51
18
|
type: String,
|
|
52
|
-
default: ""
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
},
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
},
|
|
78
|
-
name: "
|
|
79
|
-
}),
|
|
80
|
-
...
|
|
81
|
-
props:
|
|
82
|
-
emits:
|
|
83
|
-
setup(
|
|
84
|
-
const a =
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
return me(a.precision) ? Math.max(Y(a.modelValue), n) : (n > a.precision, a.precision);
|
|
90
|
-
}), C = V(() => a.controls && a.controlsPosition === "right"), F = Ke(), T = je(), z = V(() => {
|
|
91
|
-
if (d.userInput !== null)
|
|
92
|
-
return d.userInput;
|
|
93
|
-
let n = d.currentValue;
|
|
94
|
-
if (ie(n))
|
|
95
|
-
return "";
|
|
96
|
-
if (X(n)) {
|
|
97
|
-
if (Number.isNaN(n))
|
|
98
|
-
return "";
|
|
99
|
-
me(a.precision) || (n = n.toFixed(a.precision));
|
|
100
|
-
}
|
|
101
|
-
return n;
|
|
102
|
-
}), _ = (n, r) => {
|
|
103
|
-
if (me(r) && (r = s.value), r === 0)
|
|
104
|
-
return Math.round(n);
|
|
105
|
-
let b = String(n);
|
|
106
|
-
const N = b.indexOf(".");
|
|
107
|
-
if (N === -1 || !b.replace(".", "").split("")[N + r])
|
|
108
|
-
return n;
|
|
109
|
-
const M = b.length;
|
|
110
|
-
return b.charAt(M - 1) === "5" && (b = `${b.slice(0, Math.max(0, M - 1))}6`), Number.parseFloat(Number(b).toFixed(r));
|
|
111
|
-
}, Y = (n) => {
|
|
112
|
-
if (ie(n))
|
|
113
|
-
return 0;
|
|
114
|
-
const r = n.toString(), b = r.indexOf(".");
|
|
115
|
-
let N = 0;
|
|
116
|
-
return b !== -1 && (N = r.length - b - 1), N;
|
|
117
|
-
}, L = (n, r = 1) => X(n) ? _(n + a.step * r) : d.currentValue, K = () => {
|
|
118
|
-
if (a.readonly || T.value || h.value)
|
|
119
|
-
return;
|
|
120
|
-
const n = Number(z.value) || 0, r = L(n);
|
|
121
|
-
w(r), o(D, d.currentValue);
|
|
122
|
-
}, P = () => {
|
|
123
|
-
if (a.readonly || T.value || v.value)
|
|
124
|
-
return;
|
|
125
|
-
const n = Number(z.value) || 0, r = L(n, -1);
|
|
126
|
-
w(r), o(D, d.currentValue);
|
|
127
|
-
}, p = (n, r) => {
|
|
128
|
-
const { max: b, min: N, step: S, precision: B, stepStrictly: M, valueOnClear: A } = a;
|
|
129
|
-
b < N && Ye("InputNumber", "min should not be greater than max.");
|
|
130
|
-
let E = Number(n);
|
|
131
|
-
if (ie(n) || Number.isNaN(E))
|
|
132
|
-
return null;
|
|
133
|
-
if (n === "") {
|
|
134
|
-
if (A === null)
|
|
135
|
-
return null;
|
|
136
|
-
E = ke(A) ? { min: N, max: b }[A] : A;
|
|
137
|
-
}
|
|
138
|
-
return M && (E = _(Math.round(E / S) * S, B)), me(B) || (E = _(E, B)), (E > b || E < N) && (E = E > b ? b : N, r && o(H, E)), E;
|
|
139
|
-
}, w = (n, r = !0) => {
|
|
19
|
+
default: ""
|
|
20
|
+
},
|
|
21
|
+
border: Boolean
|
|
22
|
+
}), L = {
|
|
23
|
+
[k]: (r) => h(r) || N(r) || w(r),
|
|
24
|
+
[Q]: (r) => h(r) || N(r) || w(r)
|
|
25
|
+
}, U = Symbol("radioGroupKey"), j = (r, m) => {
|
|
26
|
+
const n = R(), a = te(U, void 0), d = c(() => !!a), v = c({
|
|
27
|
+
get() {
|
|
28
|
+
return d.value ? a.modelValue : r.modelValue;
|
|
29
|
+
},
|
|
30
|
+
set(s) {
|
|
31
|
+
d.value ? a.changeEvent(s) : m && m(k, s), n.value.checked = r.modelValue === r.label;
|
|
32
|
+
}
|
|
33
|
+
}), i = X(c(() => a == null ? void 0 : a.size)), u = Y(c(() => a == null ? void 0 : a.disabled)), l = R(!1), p = c(() => u.value || d.value && v.value !== r.label ? -1 : 0);
|
|
34
|
+
return {
|
|
35
|
+
radioRef: n,
|
|
36
|
+
isGroup: d,
|
|
37
|
+
radioGroup: a,
|
|
38
|
+
focus: l,
|
|
39
|
+
size: i,
|
|
40
|
+
disabled: u,
|
|
41
|
+
tabIndex: p,
|
|
42
|
+
modelValue: v
|
|
43
|
+
};
|
|
44
|
+
}, se = ["value", "name", "disabled"], de = y({
|
|
45
|
+
name: "ElRadio"
|
|
46
|
+
}), ue = /* @__PURE__ */ y({
|
|
47
|
+
...de,
|
|
48
|
+
props: ie,
|
|
49
|
+
emits: L,
|
|
50
|
+
setup(r, { emit: m }) {
|
|
51
|
+
const n = r, a = B("radio"), { radioRef: d, radioGroup: v, focus: i, size: u, disabled: l, modelValue: p } = j(n, m);
|
|
52
|
+
function s() {
|
|
53
|
+
K(() => m("change", p.value));
|
|
54
|
+
}
|
|
55
|
+
return (o, t) => {
|
|
140
56
|
var b;
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
o(D, r), w(r, !1);
|
|
151
|
-
}, J = (n) => {
|
|
152
|
-
const r = n !== "" ? Number(n) : "";
|
|
153
|
-
(X(r) && !Number.isNaN(r) || n === "") && w(r), d.userInput = null;
|
|
154
|
-
}, W = () => {
|
|
155
|
-
var n, r;
|
|
156
|
-
(r = (n = u.value) == null ? void 0 : n.focus) == null || r.call(n);
|
|
157
|
-
}, G = () => {
|
|
158
|
-
var n, r;
|
|
159
|
-
(r = (n = u.value) == null ? void 0 : n.blur) == null || r.call(n);
|
|
160
|
-
}, g = (n) => {
|
|
161
|
-
o("focus", n);
|
|
162
|
-
}, k = (n) => {
|
|
163
|
-
var r;
|
|
164
|
-
o("blur", n), a.validateEvent && ((r = y == null ? void 0 : y.validate) == null || r.call(y, "blur").catch((b) => be()));
|
|
165
|
-
};
|
|
166
|
-
return se(() => a.modelValue, (n) => {
|
|
167
|
-
const r = p(d.userInput), b = p(n, !0);
|
|
168
|
-
!X(r) && (!r || r !== b) && (d.currentValue = b, d.userInput = null);
|
|
169
|
-
}, { immediate: !0 }), Xe(() => {
|
|
170
|
-
var n;
|
|
171
|
-
const { min: r, max: b, modelValue: N } = a, S = (n = u.value) == null ? void 0 : n.input;
|
|
172
|
-
if (S.setAttribute("role", "spinbutton"), Number.isFinite(b) ? S.setAttribute("aria-valuemax", String(b)) : S.removeAttribute("aria-valuemax"), Number.isFinite(r) ? S.setAttribute("aria-valuemin", String(r)) : S.removeAttribute("aria-valuemin"), S.setAttribute("aria-valuenow", String(d.currentValue)), S.setAttribute("aria-disabled", String(T.value)), !X(N) && N != null) {
|
|
173
|
-
let B = Number(N);
|
|
174
|
-
Number.isNaN(B) && (B = null), o(H, B);
|
|
175
|
-
}
|
|
176
|
-
}), et(() => {
|
|
177
|
-
var n;
|
|
178
|
-
const r = (n = u.value) == null ? void 0 : n.input;
|
|
179
|
-
r == null || r.setAttribute("aria-valuenow", `${d.currentValue}`);
|
|
180
|
-
}), l({
|
|
181
|
-
focus: W,
|
|
182
|
-
blur: G
|
|
183
|
-
}), (n, r) => (x(), O("div", {
|
|
184
|
-
class: U([
|
|
185
|
-
t(i).b(),
|
|
186
|
-
t(i).m(t(F)),
|
|
187
|
-
t(i).is("disabled", t(T)),
|
|
188
|
-
t(i).is("without-controls", !n.controls),
|
|
189
|
-
t(i).is("controls-right", t(C))
|
|
190
|
-
]),
|
|
191
|
-
onDragstart: r[1] || (r[1] = ce(() => {
|
|
192
|
-
}, ["prevent"]))
|
|
193
|
-
}, [
|
|
194
|
-
n.controls ? Le((x(), O("span", {
|
|
195
|
-
key: 0,
|
|
196
|
-
role: "button",
|
|
197
|
-
"aria-label": t(c)("el.inputNumber.decrease"),
|
|
198
|
-
class: U([t(i).e("decrease"), t(i).is("disabled", t(v))]),
|
|
199
|
-
onKeydown: ve(P, ["enter"])
|
|
57
|
+
return V(), _("label", {
|
|
58
|
+
class: f([
|
|
59
|
+
e(a).b(),
|
|
60
|
+
e(a).is("disabled", e(l)),
|
|
61
|
+
e(a).is("focus", e(i)),
|
|
62
|
+
e(a).is("bordered", o.border),
|
|
63
|
+
e(a).is("checked", e(p) === o.label),
|
|
64
|
+
e(a).m(e(u))
|
|
65
|
+
])
|
|
200
66
|
}, [
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
67
|
+
g("span", {
|
|
68
|
+
class: f([
|
|
69
|
+
e(a).e("input"),
|
|
70
|
+
e(a).is("disabled", e(l)),
|
|
71
|
+
e(a).is("checked", e(p) === o.label)
|
|
72
|
+
])
|
|
73
|
+
}, [
|
|
74
|
+
$(g("input", {
|
|
75
|
+
ref_key: "radioRef",
|
|
76
|
+
ref: d,
|
|
77
|
+
"onUpdate:modelValue": t[0] || (t[0] = (S) => F(p) ? p.value = S : null),
|
|
78
|
+
class: f(e(a).e("original")),
|
|
79
|
+
value: o.label,
|
|
80
|
+
name: o.name || ((b = e(v)) == null ? void 0 : b.name),
|
|
81
|
+
disabled: e(l),
|
|
82
|
+
type: "radio",
|
|
83
|
+
onFocus: t[1] || (t[1] = (S) => i.value = !0),
|
|
84
|
+
onBlur: t[2] || (t[2] = (S) => i.value = !1),
|
|
85
|
+
onChange: s
|
|
86
|
+
}, null, 42, se), [
|
|
87
|
+
[P, e(p)]
|
|
204
88
|
]),
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
89
|
+
g("span", {
|
|
90
|
+
class: f(e(a).e("inner"))
|
|
91
|
+
}, null, 2)
|
|
92
|
+
], 2),
|
|
93
|
+
g("span", {
|
|
94
|
+
class: f(e(a).e("label")),
|
|
95
|
+
onKeydown: t[3] || (t[3] = D(() => {
|
|
96
|
+
}, ["stop"]))
|
|
97
|
+
}, [
|
|
98
|
+
G(o.$slots, "default", {}, () => [
|
|
99
|
+
T(A(o.label), 1)
|
|
100
|
+
])
|
|
101
|
+
], 34)
|
|
102
|
+
], 2);
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
}), pe = /* @__PURE__ */ I(ue, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/radio/src/radio.vue"]]), me = E({
|
|
106
|
+
...M,
|
|
107
|
+
name: {
|
|
108
|
+
type: String,
|
|
109
|
+
default: ""
|
|
110
|
+
}
|
|
111
|
+
}), ve = ["value", "name", "disabled"], fe = y({
|
|
112
|
+
name: "ElRadioButton"
|
|
113
|
+
}), be = /* @__PURE__ */ y({
|
|
114
|
+
...fe,
|
|
115
|
+
props: me,
|
|
116
|
+
setup(r) {
|
|
117
|
+
const m = r, n = B("radio"), { radioRef: a, focus: d, size: v, disabled: i, modelValue: u, radioGroup: l } = j(m), p = c(() => ({
|
|
118
|
+
backgroundColor: (l == null ? void 0 : l.fill) || "",
|
|
119
|
+
borderColor: (l == null ? void 0 : l.fill) || "",
|
|
120
|
+
boxShadow: l != null && l.fill ? `-1px 0 0 0 ${l.fill}` : "",
|
|
121
|
+
color: (l == null ? void 0 : l.textColor) || ""
|
|
122
|
+
}));
|
|
123
|
+
return (s, o) => {
|
|
124
|
+
var t;
|
|
125
|
+
return V(), _("label", {
|
|
126
|
+
class: f([
|
|
127
|
+
e(n).b("button"),
|
|
128
|
+
e(n).is("active", e(u) === s.label),
|
|
129
|
+
e(n).is("disabled", e(i)),
|
|
130
|
+
e(n).is("focus", e(d)),
|
|
131
|
+
e(n).bm("button", e(v))
|
|
132
|
+
])
|
|
216
133
|
}, [
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
]),
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
}, ["prevent"])),
|
|
244
|
-
onKeydown: [
|
|
245
|
-
ve(ce(K, ["prevent"]), ["up"]),
|
|
246
|
-
ve(ce(P, ["prevent"]), ["down"])
|
|
247
|
-
],
|
|
248
|
-
onBlur: k,
|
|
249
|
-
onFocus: g,
|
|
250
|
-
onInput: q,
|
|
251
|
-
onChange: J
|
|
252
|
-
}, null, 8, ["id", "step", "model-value", "placeholder", "readonly", "disabled", "size", "max", "min", "name", "label", "onKeydown"])
|
|
253
|
-
], 34));
|
|
134
|
+
$(g("input", {
|
|
135
|
+
ref_key: "radioRef",
|
|
136
|
+
ref: a,
|
|
137
|
+
"onUpdate:modelValue": o[0] || (o[0] = (b) => F(u) ? u.value = b : null),
|
|
138
|
+
class: f(e(n).be("button", "original-radio")),
|
|
139
|
+
value: s.label,
|
|
140
|
+
type: "radio",
|
|
141
|
+
name: s.name || ((t = e(l)) == null ? void 0 : t.name),
|
|
142
|
+
disabled: e(i),
|
|
143
|
+
onFocus: o[1] || (o[1] = (b) => d.value = !0),
|
|
144
|
+
onBlur: o[2] || (o[2] = (b) => d.value = !1)
|
|
145
|
+
}, null, 42, ve), [
|
|
146
|
+
[P, e(u)]
|
|
147
|
+
]),
|
|
148
|
+
g("span", {
|
|
149
|
+
class: f(e(n).be("button", "inner")),
|
|
150
|
+
style: ee(e(u) === s.label ? e(p) : {}),
|
|
151
|
+
onKeydown: o[3] || (o[3] = D(() => {
|
|
152
|
+
}, ["stop"]))
|
|
153
|
+
}, [
|
|
154
|
+
G(s.$slots, "default", {}, () => [
|
|
155
|
+
T(A(s.label), 1)
|
|
156
|
+
])
|
|
157
|
+
], 38)
|
|
158
|
+
], 2);
|
|
159
|
+
};
|
|
254
160
|
}
|
|
255
|
-
}),
|
|
256
|
-
modelValue: {
|
|
257
|
-
type: ue([Number, Array]),
|
|
258
|
-
default: 0
|
|
259
|
-
},
|
|
161
|
+
}), q = /* @__PURE__ */ I(be, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/radio/src/radio-button.vue"]]), ce = E({
|
|
260
162
|
id: {
|
|
261
163
|
type: String,
|
|
262
164
|
default: void 0
|
|
263
165
|
},
|
|
264
|
-
|
|
265
|
-
type: Number,
|
|
266
|
-
default: 0
|
|
267
|
-
},
|
|
268
|
-
max: {
|
|
269
|
-
type: Number,
|
|
270
|
-
default: 100
|
|
271
|
-
},
|
|
272
|
-
step: {
|
|
273
|
-
type: Number,
|
|
274
|
-
default: 1
|
|
275
|
-
},
|
|
276
|
-
showInput: Boolean,
|
|
277
|
-
showInputControls: {
|
|
278
|
-
type: Boolean,
|
|
279
|
-
default: !0
|
|
280
|
-
},
|
|
281
|
-
size: Ne,
|
|
282
|
-
inputSize: Ne,
|
|
283
|
-
showStops: Boolean,
|
|
284
|
-
showTooltip: {
|
|
285
|
-
type: Boolean,
|
|
286
|
-
default: !0
|
|
287
|
-
},
|
|
288
|
-
formatTooltip: {
|
|
289
|
-
type: ue(Function),
|
|
290
|
-
default: void 0
|
|
291
|
-
},
|
|
166
|
+
size: z,
|
|
292
167
|
disabled: Boolean,
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
debounce: {
|
|
297
|
-
type: Number,
|
|
298
|
-
default: 300
|
|
168
|
+
modelValue: {
|
|
169
|
+
type: [String, Number, Boolean],
|
|
170
|
+
default: ""
|
|
299
171
|
},
|
|
300
|
-
|
|
172
|
+
fill: {
|
|
301
173
|
type: String,
|
|
302
|
-
default:
|
|
174
|
+
default: ""
|
|
303
175
|
},
|
|
304
|
-
|
|
176
|
+
label: {
|
|
305
177
|
type: String,
|
|
306
178
|
default: void 0
|
|
307
179
|
},
|
|
308
|
-
|
|
180
|
+
textColor: {
|
|
309
181
|
type: String,
|
|
310
|
-
default:
|
|
311
|
-
},
|
|
312
|
-
formatValueText: {
|
|
313
|
-
type: ue(Function),
|
|
314
|
-
default: void 0
|
|
182
|
+
default: ""
|
|
315
183
|
},
|
|
316
|
-
|
|
184
|
+
name: {
|
|
317
185
|
type: String,
|
|
318
186
|
default: void 0
|
|
319
187
|
},
|
|
320
|
-
placement: {
|
|
321
|
-
type: String,
|
|
322
|
-
values: ze,
|
|
323
|
-
default: "top"
|
|
324
|
-
},
|
|
325
|
-
marks: {
|
|
326
|
-
type: ue(Object)
|
|
327
|
-
},
|
|
328
188
|
validateEvent: {
|
|
329
189
|
type: Boolean,
|
|
330
190
|
default: !0
|
|
331
191
|
}
|
|
332
|
-
}),
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
}, ht = (e) => V(() => e.marks ? Object.keys(e.marks).map(Number.parseFloat).sort((o, a) => o - a).filter((o) => o <= e.max && o >= e.min).map((o) => ({
|
|
344
|
-
point: o,
|
|
345
|
-
position: (o - e.min) * 100 / (e.max - e.min),
|
|
346
|
-
mark: e.marks[o]
|
|
347
|
-
})) : []), pt = (e, l, o) => {
|
|
348
|
-
const { form: a, formItem: c } = _e(), i = at(), u = ee(), d = ee(), y = {
|
|
349
|
-
firstButton: u,
|
|
350
|
-
secondButton: d
|
|
351
|
-
}, v = V(() => e.disabled || (a == null ? void 0 : a.disabled) || !1), h = V(() => Math.min(l.firstValue, l.secondValue)), s = V(() => Math.max(l.firstValue, l.secondValue)), C = V(() => e.range ? `${100 * (s.value - h.value) / (e.max - e.min)}%` : `${100 * (l.firstValue - e.min) / (e.max - e.min)}%`), F = V(() => e.range ? `${100 * (h.value - e.min) / (e.max - e.min)}%` : "0%"), T = V(() => e.vertical ? { height: e.height } : {}), z = V(() => e.vertical ? {
|
|
352
|
-
height: C.value,
|
|
353
|
-
bottom: F.value
|
|
354
|
-
} : {
|
|
355
|
-
width: C.value,
|
|
356
|
-
left: F.value
|
|
357
|
-
}), _ = () => {
|
|
358
|
-
i.value && (l.sliderSize = i.value[`client${e.vertical ? "Height" : "Width"}`]);
|
|
359
|
-
}, Y = (g) => {
|
|
360
|
-
const k = e.min + g * (e.max - e.min) / 100;
|
|
361
|
-
if (!e.range)
|
|
362
|
-
return u;
|
|
363
|
-
let n;
|
|
364
|
-
return Math.abs(h.value - k) < Math.abs(s.value - k) ? n = l.firstValue < l.secondValue ? "firstButton" : "secondButton" : n = l.firstValue > l.secondValue ? "firstButton" : "secondButton", y[n];
|
|
365
|
-
}, L = (g) => {
|
|
366
|
-
const k = Y(g);
|
|
367
|
-
return k.value.setPosition(g), k;
|
|
368
|
-
}, K = (g) => {
|
|
369
|
-
l.firstValue = g, p(e.range ? [h.value, s.value] : g);
|
|
370
|
-
}, P = (g) => {
|
|
371
|
-
l.secondValue = g, e.range && p([h.value, s.value]);
|
|
372
|
-
}, p = (g) => {
|
|
373
|
-
o(H, g), o(D, g);
|
|
374
|
-
}, w = async () => {
|
|
375
|
-
await ye(), o(Ve, e.range ? [h.value, s.value] : e.modelValue);
|
|
376
|
-
}, q = (g) => {
|
|
377
|
-
var k, n, r, b, N, S;
|
|
378
|
-
if (v.value || l.dragging)
|
|
379
|
-
return;
|
|
380
|
-
_();
|
|
381
|
-
let B = 0;
|
|
382
|
-
if (e.vertical) {
|
|
383
|
-
const M = (r = (n = (k = g.touches) == null ? void 0 : k.item(0)) == null ? void 0 : n.clientY) != null ? r : g.clientY;
|
|
384
|
-
B = (i.value.getBoundingClientRect().bottom - M) / l.sliderSize * 100;
|
|
385
|
-
} else {
|
|
386
|
-
const M = (S = (N = (b = g.touches) == null ? void 0 : b.item(0)) == null ? void 0 : N.clientX) != null ? S : g.clientX, A = i.value.getBoundingClientRect().left;
|
|
387
|
-
B = (M - A) / l.sliderSize * 100;
|
|
388
|
-
}
|
|
389
|
-
if (!(B < 0 || B > 100))
|
|
390
|
-
return L(B);
|
|
391
|
-
};
|
|
392
|
-
return {
|
|
393
|
-
elFormItem: c,
|
|
394
|
-
slider: i,
|
|
395
|
-
firstButton: u,
|
|
396
|
-
secondButton: d,
|
|
397
|
-
sliderDisabled: v,
|
|
398
|
-
minValue: h,
|
|
399
|
-
maxValue: s,
|
|
400
|
-
runwayStyle: T,
|
|
401
|
-
barStyle: z,
|
|
402
|
-
resetSize: _,
|
|
403
|
-
setPosition: L,
|
|
404
|
-
emitChange: w,
|
|
405
|
-
onSliderWrapperPrevent: (g) => {
|
|
406
|
-
var k, n;
|
|
407
|
-
((k = y.firstButton.value) != null && k.dragging || (n = y.secondButton.value) != null && n.dragging) && g.preventDefault();
|
|
408
|
-
},
|
|
409
|
-
onSliderClick: (g) => {
|
|
410
|
-
q(g) && w();
|
|
411
|
-
},
|
|
412
|
-
onSliderDown: async (g) => {
|
|
413
|
-
const k = q(g);
|
|
414
|
-
k && (await ye(), k.value.onButtonDown(g));
|
|
415
|
-
},
|
|
416
|
-
setFirstValue: K,
|
|
417
|
-
setSecondValue: P
|
|
418
|
-
};
|
|
419
|
-
}, { left: wt, down: St, right: Nt, up: kt, home: Et, end: It, pageUp: Bt, pageDown: xt } = We, Pt = (e, l, o) => {
|
|
420
|
-
const a = ee(), c = ee(!1), i = V(() => l.value instanceof Function), u = V(() => i.value && l.value(e.modelValue) || e.modelValue), d = Te(() => {
|
|
421
|
-
o.value && (c.value = !0);
|
|
422
|
-
}, 50), y = Te(() => {
|
|
423
|
-
o.value && (c.value = !1);
|
|
424
|
-
}, 50);
|
|
425
|
-
return {
|
|
426
|
-
tooltip: a,
|
|
427
|
-
tooltipVisible: c,
|
|
428
|
-
formatValue: u,
|
|
429
|
-
displayTooltip: d,
|
|
430
|
-
hideTooltip: y
|
|
431
|
-
};
|
|
432
|
-
}, Ct = (e, l, o) => {
|
|
433
|
-
const {
|
|
434
|
-
disabled: a,
|
|
435
|
-
min: c,
|
|
436
|
-
max: i,
|
|
437
|
-
step: u,
|
|
438
|
-
showTooltip: d,
|
|
439
|
-
precision: y,
|
|
440
|
-
sliderSize: v,
|
|
441
|
-
formatTooltip: h,
|
|
442
|
-
emitChange: s,
|
|
443
|
-
resetSize: C,
|
|
444
|
-
updateDragging: F
|
|
445
|
-
} = rt(Oe), { tooltip: T, tooltipVisible: z, formatValue: _, displayTooltip: Y, hideTooltip: L } = Pt(e, h, d), K = ee(), P = V(() => `${(e.modelValue - c.value) / (i.value - c.value) * 100}%`), p = V(() => e.vertical ? { bottom: P.value } : { left: P.value }), w = () => {
|
|
446
|
-
l.hovering = !0, Y();
|
|
447
|
-
}, q = () => {
|
|
448
|
-
l.hovering = !1, l.dragging || L();
|
|
449
|
-
}, J = (m) => {
|
|
450
|
-
a.value || (m.preventDefault(), B(m), window.addEventListener("mousemove", M), window.addEventListener("touchmove", M), window.addEventListener("mouseup", A), window.addEventListener("touchend", A), window.addEventListener("contextmenu", A), K.value.focus());
|
|
451
|
-
}, W = (m) => {
|
|
452
|
-
a.value || (l.newPosition = Number.parseFloat(P.value) + m / (i.value - c.value) * 100, E(l.newPosition), s());
|
|
453
|
-
}, G = () => {
|
|
454
|
-
W(-u.value);
|
|
455
|
-
}, g = () => {
|
|
456
|
-
W(u.value);
|
|
457
|
-
}, k = () => {
|
|
458
|
-
W(-u.value * 4);
|
|
459
|
-
}, n = () => {
|
|
460
|
-
W(u.value * 4);
|
|
461
|
-
}, r = () => {
|
|
462
|
-
a.value || (E(0), s());
|
|
463
|
-
}, b = () => {
|
|
464
|
-
a.value || (E(100), s());
|
|
465
|
-
}, N = (m) => {
|
|
466
|
-
let I = !0;
|
|
467
|
-
[wt, St].includes(m.key) ? G() : [Nt, kt].includes(m.key) ? g() : m.key === Et ? r() : m.key === It ? b() : m.key === xt ? k() : m.key === Bt ? n() : I = !1, I && m.preventDefault();
|
|
468
|
-
}, S = (m) => {
|
|
469
|
-
let I, $;
|
|
470
|
-
return m.type.startsWith("touch") ? ($ = m.touches[0].clientY, I = m.touches[0].clientX) : ($ = m.clientY, I = m.clientX), {
|
|
471
|
-
clientX: I,
|
|
472
|
-
clientY: $
|
|
192
|
+
}), ge = L, ye = ["id", "aria-label", "aria-labelledby"], Ee = y({
|
|
193
|
+
name: "ElRadioGroup"
|
|
194
|
+
}), Se = /* @__PURE__ */ y({
|
|
195
|
+
...Ee,
|
|
196
|
+
props: ce,
|
|
197
|
+
emits: ge,
|
|
198
|
+
setup(r, { emit: m }) {
|
|
199
|
+
const n = r, a = B("radio"), d = O(), v = R(), { formItem: i } = W(), { inputId: u, isLabeledByFormItem: l } = J(n, {
|
|
200
|
+
formItemContext: i
|
|
201
|
+
}), p = (o) => {
|
|
202
|
+
m(k, o), K(() => m("change", o));
|
|
473
203
|
};
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
const I = 100 / ((i.value - c.value) / u.value);
|
|
494
|
-
let Q = Math.round(m / I) * I * (i.value - c.value) * 0.01 + c.value;
|
|
495
|
-
Q = Number.parseFloat(Q.toFixed(y.value)), Q !== e.modelValue && o(H, Q), !l.dragging && e.modelValue !== l.oldValue && (l.oldValue = e.modelValue), await ye(), l.dragging && Y(), T.value.updatePopper();
|
|
496
|
-
};
|
|
497
|
-
return se(() => l.dragging, (m) => {
|
|
498
|
-
F(m);
|
|
499
|
-
}), {
|
|
500
|
-
disabled: a,
|
|
501
|
-
button: K,
|
|
502
|
-
tooltip: T,
|
|
503
|
-
tooltipVisible: z,
|
|
504
|
-
showTooltip: d,
|
|
505
|
-
wrapperStyle: p,
|
|
506
|
-
formatValue: _,
|
|
507
|
-
handleMouseEnter: w,
|
|
508
|
-
handleMouseLeave: q,
|
|
509
|
-
onButtonDown: J,
|
|
510
|
-
onKeyDown: N,
|
|
511
|
-
setPosition: E
|
|
512
|
-
};
|
|
513
|
-
}, Tt = (e, l, o, a) => ({
|
|
514
|
-
stops: V(() => {
|
|
515
|
-
if (!e.showStops || e.min > e.max)
|
|
516
|
-
return [];
|
|
517
|
-
if (e.step === 0)
|
|
518
|
-
return [];
|
|
519
|
-
const u = (e.max - e.min) / e.step, d = 100 * e.step / (e.max - e.min), y = Array.from({ length: u - 1 }).map((v, h) => (h + 1) * d);
|
|
520
|
-
return e.range ? y.filter((v) => v < 100 * (o.value - e.min) / (e.max - e.min) || v > 100 * (a.value - e.min) / (e.max - e.min)) : y.filter((v) => v > 100 * (l.firstValue - e.min) / (e.max - e.min));
|
|
521
|
-
}),
|
|
522
|
-
getStopStyle: (u) => e.vertical ? { bottom: `${u}%` } : { left: `${u}%` }
|
|
523
|
-
}), Lt = (e, l, o, a, c, i) => {
|
|
524
|
-
const u = (v) => {
|
|
525
|
-
c(H, v), c(D, v);
|
|
526
|
-
}, d = () => e.range ? ![o.value, a.value].every((v, h) => v === l.oldValue[h]) : e.modelValue !== l.oldValue, y = () => {
|
|
527
|
-
var v, h;
|
|
528
|
-
e.min > e.max && Ye("Slider", "min should not be greater than max.");
|
|
529
|
-
const s = e.modelValue;
|
|
530
|
-
e.range && Array.isArray(s) ? s[1] < e.min ? u([e.min, e.min]) : s[0] > e.max ? u([e.max, e.max]) : s[0] < e.min ? u([e.min, s[1]]) : s[1] > e.max ? u([s[0], e.max]) : (l.firstValue = s[0], l.secondValue = s[1], d() && (e.validateEvent && ((v = i == null ? void 0 : i.validate) == null || v.call(i, "change").catch((C) => be())), l.oldValue = s.slice())) : !e.range && typeof s == "number" && !Number.isNaN(s) && (s < e.min ? u(e.min) : s > e.max ? u(e.max) : (l.firstValue = s, d() && (e.validateEvent && ((h = i == null ? void 0 : i.validate) == null || h.call(i, "change").catch((C) => be())), l.oldValue = s)));
|
|
531
|
-
};
|
|
532
|
-
y(), se(() => l.dragging, (v) => {
|
|
533
|
-
v || y();
|
|
534
|
-
}), se(() => e.modelValue, (v, h) => {
|
|
535
|
-
l.dragging || Array.isArray(v) && Array.isArray(h) && v.every((s, C) => s === h[C]) && l.firstValue === v[0] && l.secondValue === v[1] || y();
|
|
536
|
-
}, {
|
|
537
|
-
deep: !0
|
|
538
|
-
}), se(() => [e.min, e.max], () => {
|
|
539
|
-
y();
|
|
540
|
-
});
|
|
541
|
-
}, Mt = he({
|
|
542
|
-
modelValue: {
|
|
543
|
-
type: Number,
|
|
544
|
-
default: 0
|
|
545
|
-
},
|
|
546
|
-
vertical: Boolean,
|
|
547
|
-
tooltipClass: String,
|
|
548
|
-
placement: {
|
|
549
|
-
type: String,
|
|
550
|
-
values: ze,
|
|
551
|
-
default: "top"
|
|
552
|
-
}
|
|
553
|
-
}), At = {
|
|
554
|
-
[H]: (e) => X(e)
|
|
555
|
-
}, Ft = ["tabindex"], zt = te({
|
|
556
|
-
name: "ElSliderButton"
|
|
557
|
-
}), _t = /* @__PURE__ */ te({
|
|
558
|
-
...zt,
|
|
559
|
-
props: Mt,
|
|
560
|
-
emits: At,
|
|
561
|
-
setup(e, { expose: l, emit: o }) {
|
|
562
|
-
const a = e, c = pe("slider"), i = Be({
|
|
563
|
-
hovering: !1,
|
|
564
|
-
dragging: !1,
|
|
565
|
-
isClick: !1,
|
|
566
|
-
startX: 0,
|
|
567
|
-
currentX: 0,
|
|
568
|
-
startY: 0,
|
|
569
|
-
currentY: 0,
|
|
570
|
-
startPosition: 0,
|
|
571
|
-
newPosition: 0,
|
|
572
|
-
oldValue: a.modelValue
|
|
573
|
-
}), {
|
|
574
|
-
disabled: u,
|
|
575
|
-
button: d,
|
|
576
|
-
tooltip: y,
|
|
577
|
-
showTooltip: v,
|
|
578
|
-
tooltipVisible: h,
|
|
579
|
-
wrapperStyle: s,
|
|
580
|
-
formatValue: C,
|
|
581
|
-
handleMouseEnter: F,
|
|
582
|
-
handleMouseLeave: T,
|
|
583
|
-
onButtonDown: z,
|
|
584
|
-
onKeyDown: _,
|
|
585
|
-
setPosition: Y
|
|
586
|
-
} = Ct(a, i, o), { hovering: L, dragging: K } = Ee(i);
|
|
587
|
-
return l({
|
|
588
|
-
onButtonDown: z,
|
|
589
|
-
onKeyDown: _,
|
|
590
|
-
setPosition: Y,
|
|
591
|
-
hovering: L,
|
|
592
|
-
dragging: K
|
|
593
|
-
}), (P, p) => (x(), O("div", {
|
|
594
|
-
ref_key: "button",
|
|
595
|
-
ref: d,
|
|
596
|
-
class: U([t(c).e("button-wrapper"), { hover: t(L), dragging: t(K) }]),
|
|
597
|
-
style: le(t(s)),
|
|
598
|
-
tabindex: t(u) ? -1 : 0,
|
|
599
|
-
onMouseenter: p[0] || (p[0] = (...w) => t(F) && t(F)(...w)),
|
|
600
|
-
onMouseleave: p[1] || (p[1] = (...w) => t(T) && t(T)(...w)),
|
|
601
|
-
onMousedown: p[2] || (p[2] = (...w) => t(z) && t(z)(...w)),
|
|
602
|
-
onTouchstart: p[3] || (p[3] = (...w) => t(z) && t(z)(...w)),
|
|
603
|
-
onFocus: p[4] || (p[4] = (...w) => t(F) && t(F)(...w)),
|
|
604
|
-
onBlur: p[5] || (p[5] = (...w) => t(T) && t(T)(...w)),
|
|
605
|
-
onKeydown: p[6] || (p[6] = (...w) => t(_) && t(_)(...w))
|
|
204
|
+
oe(() => {
|
|
205
|
+
const o = v.value.querySelectorAll("[type=radio]"), t = o[0];
|
|
206
|
+
!Array.from(o).some((b) => b.checked) && t && (t.tabIndex = 0);
|
|
207
|
+
});
|
|
208
|
+
const s = c(() => n.name || d.value);
|
|
209
|
+
return ae(U, le({
|
|
210
|
+
...re(n),
|
|
211
|
+
changeEvent: p,
|
|
212
|
+
name: s
|
|
213
|
+
})), ne(() => n.modelValue, () => {
|
|
214
|
+
n.validateEvent && (i == null || i.validate("change").catch((o) => Z()));
|
|
215
|
+
}), (o, t) => (V(), _("div", {
|
|
216
|
+
id: e(u),
|
|
217
|
+
ref_key: "radioGroupRef",
|
|
218
|
+
ref: v,
|
|
219
|
+
class: f(e(a).b("group")),
|
|
220
|
+
role: "radiogroup",
|
|
221
|
+
"aria-label": e(l) ? void 0 : o.label || "radio-group",
|
|
222
|
+
"aria-labelledby": e(l) ? e(i).labelId : void 0
|
|
606
223
|
}, [
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
ref: y,
|
|
610
|
-
visible: t(h),
|
|
611
|
-
placement: P.placement,
|
|
612
|
-
"fallback-placements": ["top", "bottom", "right", "left"],
|
|
613
|
-
"stop-popper-mouse-event": !1,
|
|
614
|
-
"popper-class": P.tooltipClass,
|
|
615
|
-
disabled: !t(v),
|
|
616
|
-
persistent: ""
|
|
617
|
-
}, {
|
|
618
|
-
content: ge(() => [
|
|
619
|
-
ae("span", null, tt(t(C)), 1)
|
|
620
|
-
]),
|
|
621
|
-
default: ge(() => [
|
|
622
|
-
ae("div", {
|
|
623
|
-
class: U([t(c).e("button"), { hover: t(L), dragging: t(K) }])
|
|
624
|
-
}, null, 2)
|
|
625
|
-
]),
|
|
626
|
-
_: 1
|
|
627
|
-
}, 8, ["visible", "placement", "popper-class", "disabled"])
|
|
628
|
-
], 46, Ft));
|
|
629
|
-
}
|
|
630
|
-
}), Ae = /* @__PURE__ */ Ie(_t, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/slider/src/button.vue"]]), Kt = he({
|
|
631
|
-
mark: {
|
|
632
|
-
type: ue([String, Object]),
|
|
633
|
-
default: void 0
|
|
634
|
-
}
|
|
635
|
-
}), Rt = te({
|
|
636
|
-
name: "ElSliderMarker",
|
|
637
|
-
props: Kt,
|
|
638
|
-
setup(e) {
|
|
639
|
-
const l = pe("slider"), o = V(() => ke(e.mark) ? e.mark : e.mark.label), a = V(() => ke(e.mark) ? void 0 : e.mark.style);
|
|
640
|
-
return () => lt("div", {
|
|
641
|
-
class: l.e("marks-text"),
|
|
642
|
-
style: a.value
|
|
643
|
-
}, o.value);
|
|
644
|
-
}
|
|
645
|
-
}), Yt = ["id", "role", "aria-label", "aria-labelledby"], Xt = { key: 1 }, Ot = te({
|
|
646
|
-
name: "ElSlider"
|
|
647
|
-
}), Ut = /* @__PURE__ */ te({
|
|
648
|
-
...Ot,
|
|
649
|
-
props: gt,
|
|
650
|
-
emits: yt,
|
|
651
|
-
setup(e, { expose: l, emit: o }) {
|
|
652
|
-
const a = e, c = pe("slider"), { t: i } = Fe(), u = Be({
|
|
653
|
-
firstValue: 0,
|
|
654
|
-
secondValue: 0,
|
|
655
|
-
oldValue: 0,
|
|
656
|
-
dragging: !1,
|
|
657
|
-
sliderSize: 1
|
|
658
|
-
}), {
|
|
659
|
-
elFormItem: d,
|
|
660
|
-
slider: y,
|
|
661
|
-
firstButton: v,
|
|
662
|
-
secondButton: h,
|
|
663
|
-
sliderDisabled: s,
|
|
664
|
-
minValue: C,
|
|
665
|
-
maxValue: F,
|
|
666
|
-
runwayStyle: T,
|
|
667
|
-
barStyle: z,
|
|
668
|
-
resetSize: _,
|
|
669
|
-
emitChange: Y,
|
|
670
|
-
onSliderWrapperPrevent: L,
|
|
671
|
-
onSliderClick: K,
|
|
672
|
-
onSliderDown: P,
|
|
673
|
-
setFirstValue: p,
|
|
674
|
-
setSecondValue: w
|
|
675
|
-
} = pt(a, u, o), { stops: q, getStopStyle: J } = Tt(a, u, C, F), { inputId: W, isLabeledByFormItem: G } = He(a, {
|
|
676
|
-
formItemContext: d
|
|
677
|
-
}), g = Ke(), k = V(() => a.inputSize || g.value), n = V(() => a.label || i("el.slider.defaultLabel", {
|
|
678
|
-
min: a.min,
|
|
679
|
-
max: a.max
|
|
680
|
-
})), r = V(() => a.range ? a.rangeStartLabel || i("el.slider.defaultRangeStartLabel") : n.value), b = V(() => a.formatValueText ? a.formatValueText(m.value) : `${m.value}`), N = V(() => a.rangeEndLabel || i("el.slider.defaultRangeEndLabel")), S = V(() => a.formatValueText ? a.formatValueText(I.value) : `${I.value}`), B = V(() => [
|
|
681
|
-
c.b(),
|
|
682
|
-
c.m(g.value),
|
|
683
|
-
c.is("vertical", a.vertical),
|
|
684
|
-
{ [c.m("with-input")]: a.showInput }
|
|
685
|
-
]), M = ht(a);
|
|
686
|
-
Lt(a, u, C, F, o, d);
|
|
687
|
-
const A = V(() => {
|
|
688
|
-
const f = [a.min, a.max, a.step].map((j) => {
|
|
689
|
-
const re = `${j}`.split(".")[1];
|
|
690
|
-
return re ? re.length : 0;
|
|
691
|
-
});
|
|
692
|
-
return Math.max.apply(null, f);
|
|
693
|
-
}), { sliderWrapper: E } = Vt(a, u, _), { firstValue: m, secondValue: I, sliderSize: $ } = Ee(u), Q = (f) => {
|
|
694
|
-
u.dragging = f;
|
|
695
|
-
};
|
|
696
|
-
return nt(Oe, {
|
|
697
|
-
...Ee(a),
|
|
698
|
-
sliderSize: $,
|
|
699
|
-
disabled: s,
|
|
700
|
-
precision: A,
|
|
701
|
-
emitChange: Y,
|
|
702
|
-
resetSize: _,
|
|
703
|
-
updateDragging: Q
|
|
704
|
-
}), l({
|
|
705
|
-
onSliderClick: K
|
|
706
|
-
}), (f, j) => {
|
|
707
|
-
var re, xe;
|
|
708
|
-
return x(), O("div", {
|
|
709
|
-
id: f.range ? t(W) : void 0,
|
|
710
|
-
ref_key: "sliderWrapper",
|
|
711
|
-
ref: E,
|
|
712
|
-
class: U(t(B)),
|
|
713
|
-
role: f.range ? "group" : void 0,
|
|
714
|
-
"aria-label": f.range && !t(G) ? t(n) : void 0,
|
|
715
|
-
"aria-labelledby": f.range && t(G) ? (re = t(d)) == null ? void 0 : re.labelId : void 0,
|
|
716
|
-
onTouchstart: j[2] || (j[2] = (...R) => t(L) && t(L)(...R)),
|
|
717
|
-
onTouchmove: j[3] || (j[3] = (...R) => t(L) && t(L)(...R))
|
|
718
|
-
}, [
|
|
719
|
-
ae("div", {
|
|
720
|
-
ref_key: "slider",
|
|
721
|
-
ref: y,
|
|
722
|
-
class: U([
|
|
723
|
-
t(c).e("runway"),
|
|
724
|
-
{ "show-input": f.showInput && !f.range },
|
|
725
|
-
t(c).is("disabled", t(s))
|
|
726
|
-
]),
|
|
727
|
-
style: le(t(T)),
|
|
728
|
-
onMousedown: j[0] || (j[0] = (...R) => t(P) && t(P)(...R)),
|
|
729
|
-
onTouchstart: j[1] || (j[1] = (...R) => t(P) && t(P)(...R))
|
|
730
|
-
}, [
|
|
731
|
-
ae("div", {
|
|
732
|
-
class: U(t(c).e("bar")),
|
|
733
|
-
style: le(t(z))
|
|
734
|
-
}, null, 6),
|
|
735
|
-
de(Ae, {
|
|
736
|
-
id: f.range ? void 0 : t(W),
|
|
737
|
-
ref_key: "firstButton",
|
|
738
|
-
ref: v,
|
|
739
|
-
"model-value": t(m),
|
|
740
|
-
vertical: f.vertical,
|
|
741
|
-
"tooltip-class": f.tooltipClass,
|
|
742
|
-
placement: f.placement,
|
|
743
|
-
role: "slider",
|
|
744
|
-
"aria-label": f.range || !t(G) ? t(r) : void 0,
|
|
745
|
-
"aria-labelledby": !f.range && t(G) ? (xe = t(d)) == null ? void 0 : xe.labelId : void 0,
|
|
746
|
-
"aria-valuemin": f.min,
|
|
747
|
-
"aria-valuemax": f.range ? t(I) : f.max,
|
|
748
|
-
"aria-valuenow": t(m),
|
|
749
|
-
"aria-valuetext": t(b),
|
|
750
|
-
"aria-orientation": f.vertical ? "vertical" : "horizontal",
|
|
751
|
-
"aria-disabled": t(s),
|
|
752
|
-
"onUpdate:modelValue": t(p)
|
|
753
|
-
}, null, 8, ["id", "model-value", "vertical", "tooltip-class", "placement", "aria-label", "aria-labelledby", "aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-valuetext", "aria-orientation", "aria-disabled", "onUpdate:modelValue"]),
|
|
754
|
-
f.range ? (x(), Z(Ae, {
|
|
755
|
-
key: 0,
|
|
756
|
-
ref_key: "secondButton",
|
|
757
|
-
ref: h,
|
|
758
|
-
"model-value": t(I),
|
|
759
|
-
vertical: f.vertical,
|
|
760
|
-
"tooltip-class": f.tooltipClass,
|
|
761
|
-
placement: f.placement,
|
|
762
|
-
role: "slider",
|
|
763
|
-
"aria-label": t(N),
|
|
764
|
-
"aria-valuemin": t(m),
|
|
765
|
-
"aria-valuemax": f.max,
|
|
766
|
-
"aria-valuenow": t(I),
|
|
767
|
-
"aria-valuetext": t(S),
|
|
768
|
-
"aria-orientation": f.vertical ? "vertical" : "horizontal",
|
|
769
|
-
"aria-disabled": t(s),
|
|
770
|
-
"onUpdate:modelValue": t(w)
|
|
771
|
-
}, null, 8, ["model-value", "vertical", "tooltip-class", "placement", "aria-label", "aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-valuetext", "aria-orientation", "aria-disabled", "onUpdate:modelValue"])) : ne("v-if", !0),
|
|
772
|
-
f.showStops ? (x(), O("div", Xt, [
|
|
773
|
-
(x(!0), O(fe, null, we(t(q), (R, oe) => (x(), O("div", {
|
|
774
|
-
key: oe,
|
|
775
|
-
class: U(t(c).e("stop")),
|
|
776
|
-
style: le(t(J)(R))
|
|
777
|
-
}, null, 6))), 128))
|
|
778
|
-
])) : ne("v-if", !0),
|
|
779
|
-
t(M).length > 0 ? (x(), O(fe, { key: 2 }, [
|
|
780
|
-
ae("div", null, [
|
|
781
|
-
(x(!0), O(fe, null, we(t(M), (R, oe) => (x(), O("div", {
|
|
782
|
-
key: oe,
|
|
783
|
-
style: le(t(J)(R.position)),
|
|
784
|
-
class: U([t(c).e("stop"), t(c).e("marks-stop")])
|
|
785
|
-
}, null, 6))), 128))
|
|
786
|
-
]),
|
|
787
|
-
ae("div", {
|
|
788
|
-
class: U(t(c).e("marks"))
|
|
789
|
-
}, [
|
|
790
|
-
(x(!0), O(fe, null, we(t(M), (R, oe) => (x(), Z(t(Rt), {
|
|
791
|
-
key: oe,
|
|
792
|
-
mark: R.mark,
|
|
793
|
-
style: le(t(J)(R.position))
|
|
794
|
-
}, null, 8, ["mark", "style"]))), 128))
|
|
795
|
-
], 2)
|
|
796
|
-
], 64)) : ne("v-if", !0)
|
|
797
|
-
], 38),
|
|
798
|
-
f.showInput && !f.range ? (x(), Z(t(bt), {
|
|
799
|
-
key: 0,
|
|
800
|
-
ref: "input",
|
|
801
|
-
"model-value": t(m),
|
|
802
|
-
class: U(t(c).e("input")),
|
|
803
|
-
step: f.step,
|
|
804
|
-
disabled: t(s),
|
|
805
|
-
controls: f.showInputControls,
|
|
806
|
-
min: f.min,
|
|
807
|
-
max: f.max,
|
|
808
|
-
debounce: f.debounce,
|
|
809
|
-
size: t(k),
|
|
810
|
-
"onUpdate:modelValue": t(p),
|
|
811
|
-
onChange: t(Y)
|
|
812
|
-
}, null, 8, ["model-value", "class", "step", "disabled", "controls", "min", "max", "debounce", "size", "onUpdate:modelValue", "onChange"])) : ne("v-if", !0)
|
|
813
|
-
], 42, Yt);
|
|
814
|
-
};
|
|
224
|
+
G(o.$slots, "default")
|
|
225
|
+
], 10, ye));
|
|
815
226
|
}
|
|
816
|
-
}),
|
|
227
|
+
}), H = /* @__PURE__ */ I(Se, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/radio/src/radio-group.vue"]]), Ie = x(pe, {
|
|
228
|
+
RadioButton: q,
|
|
229
|
+
RadioGroup: H
|
|
230
|
+
}), Ve = C(H);
|
|
231
|
+
C(q);
|
|
817
232
|
export {
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
233
|
+
Ie as ElRadio,
|
|
234
|
+
Ve as ElRadioGroup,
|
|
235
|
+
me as radioButtonProps,
|
|
236
|
+
L as radioEmits,
|
|
237
|
+
ge as radioGroupEmits,
|
|
238
|
+
U as radioGroupKey,
|
|
239
|
+
ce as radioGroupProps,
|
|
240
|
+
ie as radioProps,
|
|
241
|
+
M as radioPropsBase
|
|
826
242
|
};
|