@bobbykim/mcl-forms 0.8.2 → 0.9.0
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/index.d.ts +282 -738
- package/dist/mcl-forms.js +1458 -373
- package/dist/mcl-forms.umd.cjs +2 -2
- package/package.json +13 -12
package/dist/mcl-forms.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import
|
|
4
|
-
import { useResizeObserver as
|
|
5
|
-
const
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode('.switch[data-v-07d209bd]{width:var(--switch-width);height:var(--switch-height)}.slider[data-v-07d209bd]:before{content:"";height:var(--slider-size);width:var(--slider-size);left:var(--gutter-size);bottom:var(--gutter-size)}input:checked+.slider[data-v-07d209bd]:before{transform:translate(var(--slider-size))}.options-enter-active[data-v-f80afd47],.options-leave-active[data-v-f80afd47]{opacity:1;transition:opacity .3s linear,transform .3s linear}.options-enter-from[data-v-f80afd47],.options-leave-to[data-v-f80afd47]{opacity:0;transform:translateY(-10px)}')),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
+
import { defineComponent as q, useSlots as je, computed as R, openBlock as A, createElementBlock as V, createElementVNode as O, renderSlot as de, normalizeClass as S, toDisplayString as fe, mergeModels as X, useModel as ae, ref as T, unref as W, createCommentVNode as pe, normalizeStyle as We, withDirectives as re, vModelCheckbox as qe, vModelDynamic as ut, createBlock as Ue, shallowRef as dt, watch as ne, getCurrentScope as ft, onScopeDispose as pt, shallowReadonly as oe, withKeys as be, vModelText as Xe, createVNode as ht, Transition as gt, withCtx as mt, Fragment as vt, renderList as bt } from "vue";
|
|
3
|
+
import x, { vClickOutside as yt } from "@bobbykim/manguito-theme";
|
|
4
|
+
import { useResizeObserver as wt } from "@vueuse/core";
|
|
5
|
+
const xt = ["for"], Ro = /* @__PURE__ */ q({
|
|
6
6
|
__name: "MclFormGroup",
|
|
7
7
|
props: {
|
|
8
8
|
labelFor: {},
|
|
@@ -11,35 +11,33 @@ const ne = ["for"], Te = /* @__PURE__ */ R({
|
|
|
11
11
|
textBold: { type: Boolean, default: !1 },
|
|
12
12
|
label: {}
|
|
13
13
|
},
|
|
14
|
-
setup(
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
const
|
|
18
|
-
const { textColor:
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
setup(e) {
|
|
15
|
+
const t = e;
|
|
16
|
+
je();
|
|
17
|
+
const o = R(() => {
|
|
18
|
+
const { textColor: n, textSize: l, textBold: i } = t, r = [
|
|
19
|
+
x("TEXTCOLOR", n),
|
|
20
|
+
x("BODYTEXT", l)
|
|
21
21
|
];
|
|
22
|
-
return
|
|
22
|
+
return i && r.push("font-bold"), r.join(" ");
|
|
23
23
|
});
|
|
24
|
-
return (
|
|
25
|
-
|
|
26
|
-
for:
|
|
24
|
+
return (n, l) => (A(), V("div", null, [
|
|
25
|
+
O("label", {
|
|
26
|
+
for: n.labelFor,
|
|
27
27
|
class: "inline-block"
|
|
28
28
|
}, [
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
class:
|
|
32
|
-
},
|
|
29
|
+
de(n.$slots, "label", {}, () => [
|
|
30
|
+
O("p", {
|
|
31
|
+
class: S(["mb-2xs", o.value])
|
|
32
|
+
}, fe(n.label), 3)
|
|
33
33
|
])
|
|
34
|
-
], 8,
|
|
35
|
-
|
|
34
|
+
], 8, xt),
|
|
35
|
+
de(n.$slots, "default")
|
|
36
36
|
]));
|
|
37
37
|
}
|
|
38
|
-
}),
|
|
39
|
-
ue
|
|
40
|
-
], ze = /* @__PURE__ */ R({
|
|
38
|
+
}), kt = { class: "shrink-0 my-3xs ml-3xs mr-xs" }, Ct = ["id", "required", "accept"], Oo = /* @__PURE__ */ q({
|
|
41
39
|
__name: "MclInputFile",
|
|
42
|
-
props: /* @__PURE__ */
|
|
40
|
+
props: /* @__PURE__ */ X({
|
|
43
41
|
id: {},
|
|
44
42
|
displayBorder: { type: Boolean, default: !1 },
|
|
45
43
|
borderColor: { default: "light-4" },
|
|
@@ -58,69 +56,71 @@ const ne = ["for"], Te = /* @__PURE__ */ R({
|
|
|
58
56
|
modelModifiers: {}
|
|
59
57
|
}),
|
|
60
58
|
emits: ["update:modelValue"],
|
|
61
|
-
setup(
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
},
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
-
},
|
|
68
|
-
|
|
69
|
-
},
|
|
70
|
-
const { rounded:
|
|
71
|
-
return
|
|
72
|
-
}),
|
|
73
|
-
const { textColor:
|
|
74
|
-
return [
|
|
75
|
-
}),
|
|
76
|
-
const { buttonColor:
|
|
77
|
-
|
|
78
|
-
|
|
59
|
+
setup(e) {
|
|
60
|
+
const t = e, o = ae(e, "modelValue"), n = T(), l = T(0), i = () => {
|
|
61
|
+
n.value.click();
|
|
62
|
+
}, r = (c) => {
|
|
63
|
+
const d = c.target.files[0];
|
|
64
|
+
o.value = d;
|
|
65
|
+
}, a = () => {
|
|
66
|
+
o.value = null, l.value++;
|
|
67
|
+
}, f = R(() => {
|
|
68
|
+
const { rounded: c, displayBorder: d, borderColor: g, displayShadow: v, bgColor: y } = t, m = [x("BGCOLOR", y)];
|
|
69
|
+
return c && m.push("rounded-md"), d && (m.push("border-2"), m.push(x("BORDER", g))), v && m.push("shadow-md"), m.join(" ");
|
|
70
|
+
}), u = R(() => {
|
|
71
|
+
const { textColor: c } = t;
|
|
72
|
+
return [x("TEXTCOLOR", c)].join(" ");
|
|
73
|
+
}), p = R(() => {
|
|
74
|
+
const { buttonColor: c, buttonTextColor: d, rounded: g } = t, v = [
|
|
75
|
+
x("BGCOLOR", c),
|
|
76
|
+
x("TEXTCOLOR", d)
|
|
79
77
|
];
|
|
80
|
-
return
|
|
81
|
-
}),
|
|
82
|
-
const { buttonColor:
|
|
83
|
-
return
|
|
78
|
+
return g && v.push("rounded-l-md"), v.join(" ");
|
|
79
|
+
}), s = R(() => {
|
|
80
|
+
const { buttonColor: c, rounded: d } = t, g = [x("BGCOLOR", c)];
|
|
81
|
+
return d && g.push("rounded-r-md"), g.join(" ");
|
|
84
82
|
});
|
|
85
|
-
return (
|
|
86
|
-
class:
|
|
83
|
+
return (c, d) => (A(), V("div", {
|
|
84
|
+
class: S(["flex items-center overflow-hidden", f.value])
|
|
87
85
|
}, [
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
class:
|
|
91
|
-
onClick:
|
|
92
|
-
},
|
|
86
|
+
O("div", kt, [
|
|
87
|
+
O("button", {
|
|
88
|
+
class: S(["px-xs py-2xs hover:bg-opacity-70 transition-all duration-200 ease-linear max-w-full", p.value]),
|
|
89
|
+
onClick: i
|
|
90
|
+
}, fe(c.buttonText), 3)
|
|
93
91
|
]),
|
|
94
|
-
(
|
|
92
|
+
(A(), V("input", {
|
|
95
93
|
type: "file",
|
|
96
|
-
id:
|
|
94
|
+
id: c.id,
|
|
97
95
|
ref_key: "inputRef",
|
|
98
|
-
ref:
|
|
99
|
-
class:
|
|
100
|
-
required:
|
|
101
|
-
accept:
|
|
102
|
-
key:
|
|
103
|
-
onChange:
|
|
104
|
-
}, null, 42,
|
|
105
|
-
|
|
96
|
+
ref: n,
|
|
97
|
+
class: S(["file:hidden w-full bg-transparent", [u.value]]),
|
|
98
|
+
required: c.isRequired,
|
|
99
|
+
accept: c.accept,
|
|
100
|
+
key: l.value,
|
|
101
|
+
onChange: r
|
|
102
|
+
}, null, 42, Ct)),
|
|
103
|
+
c.displayClear ? (A(), V("div", {
|
|
106
104
|
key: 0,
|
|
107
105
|
class: "self-stretch my-3xs mr-3xs",
|
|
108
|
-
onClick:
|
|
106
|
+
onClick: a
|
|
109
107
|
}, [
|
|
110
|
-
|
|
111
|
-
class:
|
|
108
|
+
O("button", {
|
|
109
|
+
class: S(["px-xs py-2xs h-full flex items-center hover:bg-opacity-70 transition-all duration-200 ease-linear", [s.value]]),
|
|
112
110
|
"aria-label": "clear"
|
|
113
111
|
}, [
|
|
114
|
-
(
|
|
112
|
+
(A(), V("svg", {
|
|
115
113
|
xmlns: "http://www.w3.org/2000/svg",
|
|
116
114
|
viewBox: "0 0 384 512",
|
|
117
|
-
class:
|
|
118
|
-
},
|
|
115
|
+
class: S(["h-xs", W(x)("SVGFILL", c.buttonTextColor)])
|
|
116
|
+
}, d[0] || (d[0] = [
|
|
117
|
+
O("path", { d: "M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z" }, null, -1)
|
|
118
|
+
]), 2))
|
|
119
119
|
], 2)
|
|
120
|
-
])) :
|
|
120
|
+
])) : pe("", !0)
|
|
121
121
|
], 2));
|
|
122
122
|
}
|
|
123
|
-
}),
|
|
123
|
+
}), Rt = { class: "flex items-center" }, Ot = ["id", "value", "checked"], Bo = /* @__PURE__ */ q({
|
|
124
124
|
__name: "MclInputRadio",
|
|
125
125
|
props: {
|
|
126
126
|
id: {},
|
|
@@ -132,46 +132,46 @@ const ne = ["for"], Te = /* @__PURE__ */ R({
|
|
|
132
132
|
checked: { type: Boolean, default: !1 }
|
|
133
133
|
},
|
|
134
134
|
emits: ["change"],
|
|
135
|
-
setup(
|
|
136
|
-
const
|
|
137
|
-
var
|
|
138
|
-
(
|
|
139
|
-
},
|
|
140
|
-
const { radioSize:
|
|
141
|
-
return
|
|
142
|
-
}),
|
|
143
|
-
const { radioSize:
|
|
144
|
-
return
|
|
145
|
-
}),
|
|
146
|
-
const { bgColor:
|
|
147
|
-
|
|
148
|
-
|
|
135
|
+
setup(e, { emit: t }) {
|
|
136
|
+
const o = e, n = T(), l = t, i = () => {
|
|
137
|
+
var p;
|
|
138
|
+
(p = n.value) == null || p.click();
|
|
139
|
+
}, r = R(() => {
|
|
140
|
+
const { radioSize: p } = o;
|
|
141
|
+
return p === "sm" ? "h-xs w-xs" : p === "lg" ? "h-md w-md" : "h-sm w-sm";
|
|
142
|
+
}), a = R(() => {
|
|
143
|
+
const { radioSize: p } = o;
|
|
144
|
+
return p === "sm" ? "peer-checked:before:h-2xs peer-checked:before:w-2xs" : p === "lg" ? "peer-checked:before:h-xs peer-checked:before:w-xs" : "peer-checked:before:h-[12px] peer-checked:before:w-[12px]";
|
|
145
|
+
}), f = R(() => {
|
|
146
|
+
const { bgColor: p, checkedColor: s, displayShadow: c } = o, d = [
|
|
147
|
+
x("BGCOLOR", p),
|
|
148
|
+
x("BEFOREBG", s)
|
|
149
149
|
];
|
|
150
|
-
return
|
|
151
|
-
}),
|
|
152
|
-
const
|
|
153
|
-
|
|
150
|
+
return c && d.push("drop-shadow-md"), d.join(" ");
|
|
151
|
+
}), u = (p) => {
|
|
152
|
+
const s = p.target.value;
|
|
153
|
+
l("change", p, s);
|
|
154
154
|
};
|
|
155
|
-
return (
|
|
156
|
-
|
|
157
|
-
id:
|
|
155
|
+
return (p, s) => (A(), V("div", Rt, [
|
|
156
|
+
O("input", {
|
|
157
|
+
id: p.id,
|
|
158
158
|
type: "radio",
|
|
159
159
|
class: "appearance-none peer",
|
|
160
160
|
ref_key: "radioRef",
|
|
161
|
-
ref:
|
|
162
|
-
value:
|
|
163
|
-
checked:
|
|
164
|
-
onChange:
|
|
165
|
-
}, null, 40,
|
|
166
|
-
|
|
167
|
-
class:
|
|
168
|
-
onClick:
|
|
161
|
+
ref: n,
|
|
162
|
+
value: p.value,
|
|
163
|
+
checked: p.checked,
|
|
164
|
+
onChange: u
|
|
165
|
+
}, null, 40, Ot),
|
|
166
|
+
O("span", {
|
|
167
|
+
class: S(["rounded-full inline-block relative before:absolute before:rounded-full before:top-1/2 before:left-1/2 before:-translate-x-1/2 before:-translate-y-1/2", [r.value, a.value, f.value]]),
|
|
168
|
+
onClick: i
|
|
169
169
|
}, null, 2)
|
|
170
170
|
]));
|
|
171
171
|
}
|
|
172
|
-
}),
|
|
172
|
+
}), Bt = ["id"], Lt = /* @__PURE__ */ q({
|
|
173
173
|
__name: "MclInputSwitch",
|
|
174
|
-
props: /* @__PURE__ */
|
|
174
|
+
props: /* @__PURE__ */ X({
|
|
175
175
|
id: {},
|
|
176
176
|
sliderColor: { default: "light-1" },
|
|
177
177
|
onColor: { default: "success" },
|
|
@@ -183,8 +183,8 @@ const ne = ["for"], Te = /* @__PURE__ */ R({
|
|
|
183
183
|
modelModifiers: {}
|
|
184
184
|
}),
|
|
185
185
|
emits: ["update:modelValue"],
|
|
186
|
-
setup(
|
|
187
|
-
const
|
|
186
|
+
setup(e) {
|
|
187
|
+
const t = e, o = ae(e, "modelValue"), n = T(), l = {
|
|
188
188
|
primary: "peer-checked/input:bg-primary",
|
|
189
189
|
secondary: "peer-checked/input:bg-secondary",
|
|
190
190
|
success: "peer-checked/input:bg-success",
|
|
@@ -202,15 +202,15 @@ const ne = ["for"], Te = /* @__PURE__ */ R({
|
|
|
202
202
|
transparent: "peer-checked/input:bg-transparent",
|
|
203
203
|
black: "peer-checked/input:bg-black",
|
|
204
204
|
white: "peer-checked/input:bg-white"
|
|
205
|
-
},
|
|
206
|
-
var
|
|
207
|
-
(
|
|
208
|
-
},
|
|
205
|
+
}, i = () => {
|
|
206
|
+
var f;
|
|
207
|
+
(f = n.value) == null || f.click();
|
|
208
|
+
}, r = R(() => t.switchSize === "sm" ? {
|
|
209
209
|
"--switch-width": "30px",
|
|
210
210
|
"--switch-height": "17px",
|
|
211
211
|
"--slider-size": "13px",
|
|
212
212
|
"--gutter-size": "2px"
|
|
213
|
-
} :
|
|
213
|
+
} : t.switchSize === "lg" ? {
|
|
214
214
|
"--switch-width": "60px",
|
|
215
215
|
"--switch-height": "34px",
|
|
216
216
|
"--slider-size": "26px",
|
|
@@ -220,61 +220,61 @@ const ne = ["for"], Te = /* @__PURE__ */ R({
|
|
|
220
220
|
"--switch-height": "25.5px",
|
|
221
221
|
"--slider-size": "19.5px",
|
|
222
222
|
"--gutter-size": "3px"
|
|
223
|
-
}),
|
|
224
|
-
const { sliderColor:
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
223
|
+
}), a = R(() => {
|
|
224
|
+
const { sliderColor: f, onColor: u, offColor: p, rounded: s } = t, c = [
|
|
225
|
+
x("BGCOLOR", p),
|
|
226
|
+
x("BEFOREBG", f),
|
|
227
|
+
l[u]
|
|
228
228
|
];
|
|
229
|
-
return
|
|
229
|
+
return s && c.push("rounded-full before:rounded-full"), c.join(" ");
|
|
230
230
|
});
|
|
231
|
-
return (
|
|
231
|
+
return (f, u) => (A(), V("div", {
|
|
232
232
|
class: "switch relative",
|
|
233
|
-
style:
|
|
234
|
-
onClick:
|
|
233
|
+
style: We(r.value),
|
|
234
|
+
onClick: i
|
|
235
235
|
}, [
|
|
236
|
-
|
|
237
|
-
id:
|
|
236
|
+
re(O("input", {
|
|
237
|
+
id: f.id,
|
|
238
238
|
class: "hidden peer/input",
|
|
239
|
-
"onUpdate:modelValue":
|
|
239
|
+
"onUpdate:modelValue": u[0] || (u[0] = (p) => o.value = p),
|
|
240
240
|
ref_key: "inputRef",
|
|
241
|
-
ref:
|
|
241
|
+
ref: n,
|
|
242
242
|
type: "checkbox"
|
|
243
|
-
}, null, 8,
|
|
244
|
-
[
|
|
243
|
+
}, null, 8, Bt), [
|
|
244
|
+
[qe, o.value]
|
|
245
245
|
]),
|
|
246
|
-
|
|
247
|
-
class:
|
|
246
|
+
O("span", {
|
|
247
|
+
class: S(["slider absolute inset-0 cursor-pointer transition-all duration-300 before:absolute before:transition-all before:duration-300", a.value])
|
|
248
248
|
}, null, 2)
|
|
249
249
|
], 4));
|
|
250
250
|
}
|
|
251
|
-
}),
|
|
252
|
-
const
|
|
253
|
-
for (const [
|
|
254
|
-
|
|
255
|
-
return
|
|
256
|
-
},
|
|
251
|
+
}), Ke = (e, t) => {
|
|
252
|
+
const o = e.__vccOpts || e;
|
|
253
|
+
for (const [n, l] of t)
|
|
254
|
+
o[n] = l;
|
|
255
|
+
return o;
|
|
256
|
+
}, Lo = /* @__PURE__ */ Ke(Lt, [["__scopeId", "data-v-07d209bd"]]), Ye = /* @__PURE__ */ q({
|
|
257
257
|
__name: "InputHighlight",
|
|
258
258
|
props: {
|
|
259
259
|
color: { default: "primary" },
|
|
260
260
|
rounded: { type: Boolean, default: !1 },
|
|
261
261
|
offset: { default: 1 }
|
|
262
262
|
},
|
|
263
|
-
setup(
|
|
264
|
-
const
|
|
263
|
+
setup(e) {
|
|
264
|
+
const t = e, o = {
|
|
265
265
|
1: "-top-1",
|
|
266
266
|
2.5: "-top-2.5"
|
|
267
|
-
},
|
|
268
|
-
const
|
|
269
|
-
return
|
|
267
|
+
}, n = R(() => {
|
|
268
|
+
const l = [x("BEFOREBG", t.color)];
|
|
269
|
+
return t.rounded && l.push("rounded-b-md"), l.push(o[t.offset]), l.join(" ");
|
|
270
270
|
});
|
|
271
|
-
return (
|
|
272
|
-
class:
|
|
271
|
+
return (l, i) => (A(), V("div", {
|
|
272
|
+
class: S(["relative h-3xs overflow-hidden before:absolute before:bottom-0 before:left-0 before:h-full before:w-0 peer-focus:before:w-full before:transition-[width] before:duration-300 before:ease-linear", n.value])
|
|
273
273
|
}, null, 2));
|
|
274
274
|
}
|
|
275
|
-
}),
|
|
275
|
+
}), St = ["id", "type", "placeholder", "required", "minlength", "maxlength", "pattern"], At = { class: "peer-valid/validation:hidden peer-inavlid/validation:block ml-3xs" }, Et = { class: "text-xs text-danger" }, So = /* @__PURE__ */ q({
|
|
276
276
|
__name: "MclInputText",
|
|
277
|
-
props: /* @__PURE__ */
|
|
277
|
+
props: /* @__PURE__ */ X({
|
|
278
278
|
id: {},
|
|
279
279
|
displayBorder: { type: Boolean, default: !1 },
|
|
280
280
|
borderColor: { default: "light-4" },
|
|
@@ -296,60 +296,1084 @@ const ne = ["for"], Te = /* @__PURE__ */ R({
|
|
|
296
296
|
modelModifiers: {}
|
|
297
297
|
}),
|
|
298
298
|
emits: ["update:modelValue"],
|
|
299
|
-
setup(
|
|
300
|
-
const
|
|
299
|
+
setup(e) {
|
|
300
|
+
const t = e, o = ae(e, "modelValue"), n = R(() => {
|
|
301
301
|
const {
|
|
302
|
-
bgColor:
|
|
303
|
-
displayBorder:
|
|
304
|
-
borderColor:
|
|
305
|
-
displayHighlight:
|
|
306
|
-
displayShadow:
|
|
307
|
-
rounded:
|
|
308
|
-
textcolor:
|
|
309
|
-
} =
|
|
310
|
-
|
|
311
|
-
|
|
302
|
+
bgColor: l,
|
|
303
|
+
displayBorder: i,
|
|
304
|
+
borderColor: r,
|
|
305
|
+
displayHighlight: a,
|
|
306
|
+
displayShadow: f,
|
|
307
|
+
rounded: u,
|
|
308
|
+
textcolor: p
|
|
309
|
+
} = t, s = [
|
|
310
|
+
x("BGCOLOR", l),
|
|
311
|
+
x("TEXTCOLOR", p)
|
|
312
312
|
];
|
|
313
|
-
return
|
|
313
|
+
return i && (s.push("border-2"), s.push(x("BORDER", r))), a || (s.push(
|
|
314
314
|
"focus:ring-4 ring-offset-2 transition-all duration-300 ease-linear"
|
|
315
|
-
),
|
|
315
|
+
), s.push(x("FOCUSRING", r))), f && s.push("shadow-md"), u && s.push("rounded-md"), s.join(" ");
|
|
316
316
|
});
|
|
317
|
-
return (
|
|
318
|
-
|
|
319
|
-
id:
|
|
320
|
-
type:
|
|
321
|
-
class:
|
|
322
|
-
"onUpdate:modelValue":
|
|
323
|
-
placeholder:
|
|
324
|
-
required:
|
|
325
|
-
minlength:
|
|
326
|
-
maxlength:
|
|
327
|
-
pattern:
|
|
328
|
-
}, null, 10,
|
|
329
|
-
[
|
|
317
|
+
return (l, i) => (A(), V("div", null, [
|
|
318
|
+
re(O("input", {
|
|
319
|
+
id: l.id,
|
|
320
|
+
type: l.type,
|
|
321
|
+
class: S(["w-full p-2xs outline-none peer peer/validation", n.value]),
|
|
322
|
+
"onUpdate:modelValue": i[0] || (i[0] = (r) => o.value = r),
|
|
323
|
+
placeholder: l.placeholder,
|
|
324
|
+
required: l.required,
|
|
325
|
+
minlength: l.minLength,
|
|
326
|
+
maxlength: l.maxLength,
|
|
327
|
+
pattern: l.pattern
|
|
328
|
+
}, null, 10, St), [
|
|
329
|
+
[ut, o.value]
|
|
330
330
|
]),
|
|
331
|
-
|
|
331
|
+
l.displayHighlight ? (A(), Ue(Ye, {
|
|
332
332
|
key: 0,
|
|
333
|
-
color:
|
|
334
|
-
rounded:
|
|
335
|
-
}, null, 8, ["color", "rounded"])) :
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
333
|
+
color: l.highlightColor,
|
|
334
|
+
rounded: l.rounded
|
|
335
|
+
}, null, 8, ["color", "rounded"])) : pe("", !0),
|
|
336
|
+
O("div", At, [
|
|
337
|
+
de(l.$slots, "invalid-feedback", {}, () => [
|
|
338
|
+
O("span", Et, fe(l.invalidFeedback), 1)
|
|
339
339
|
])
|
|
340
340
|
])
|
|
341
341
|
]));
|
|
342
342
|
}
|
|
343
|
-
}),
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
343
|
+
}), we = Math.min, J = Math.max, xe = Math.round, ye = Math.floor, P = (e) => ({
|
|
344
|
+
x: e,
|
|
345
|
+
y: e
|
|
346
|
+
}), Tt = {
|
|
347
|
+
left: "right",
|
|
348
|
+
right: "left",
|
|
349
|
+
bottom: "top",
|
|
350
|
+
top: "bottom"
|
|
351
|
+
}, Vt = {
|
|
352
|
+
start: "end",
|
|
353
|
+
end: "start"
|
|
354
|
+
};
|
|
355
|
+
function Ie(e, t, o) {
|
|
356
|
+
return J(e, we(t, o));
|
|
357
|
+
}
|
|
358
|
+
function Re(e, t) {
|
|
359
|
+
return typeof e == "function" ? e(t) : e;
|
|
360
|
+
}
|
|
361
|
+
function Q(e) {
|
|
362
|
+
return e.split("-")[0];
|
|
363
|
+
}
|
|
364
|
+
function Oe(e) {
|
|
365
|
+
return e.split("-")[1];
|
|
366
|
+
}
|
|
367
|
+
function Je(e) {
|
|
368
|
+
return e === "x" ? "y" : "x";
|
|
369
|
+
}
|
|
370
|
+
function Qe(e) {
|
|
371
|
+
return e === "y" ? "height" : "width";
|
|
372
|
+
}
|
|
373
|
+
function ie(e) {
|
|
374
|
+
return ["top", "bottom"].includes(Q(e)) ? "y" : "x";
|
|
375
|
+
}
|
|
376
|
+
function Ze(e) {
|
|
377
|
+
return Je(ie(e));
|
|
378
|
+
}
|
|
379
|
+
function Mt(e, t, o) {
|
|
380
|
+
o === void 0 && (o = !1);
|
|
381
|
+
const n = Oe(e), l = Ze(e), i = Qe(l);
|
|
382
|
+
let r = l === "x" ? n === (o ? "end" : "start") ? "right" : "left" : n === "start" ? "bottom" : "top";
|
|
383
|
+
return t.reference[i] > t.floating[i] && (r = ke(r)), [r, ke(r)];
|
|
384
|
+
}
|
|
385
|
+
function Dt(e) {
|
|
386
|
+
const t = ke(e);
|
|
387
|
+
return [Ee(e), t, Ee(t)];
|
|
388
|
+
}
|
|
389
|
+
function Ee(e) {
|
|
390
|
+
return e.replace(/start|end/g, (t) => Vt[t]);
|
|
391
|
+
}
|
|
392
|
+
function Ft(e, t, o) {
|
|
393
|
+
const n = ["left", "right"], l = ["right", "left"], i = ["top", "bottom"], r = ["bottom", "top"];
|
|
394
|
+
switch (e) {
|
|
395
|
+
case "top":
|
|
396
|
+
case "bottom":
|
|
397
|
+
return o ? t ? l : n : t ? n : l;
|
|
398
|
+
case "left":
|
|
399
|
+
case "right":
|
|
400
|
+
return t ? i : r;
|
|
401
|
+
default:
|
|
402
|
+
return [];
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
function $t(e, t, o, n) {
|
|
406
|
+
const l = Oe(e);
|
|
407
|
+
let i = Ft(Q(e), o === "start", n);
|
|
408
|
+
return l && (i = i.map((r) => r + "-" + l), t && (i = i.concat(i.map(Ee)))), i;
|
|
409
|
+
}
|
|
410
|
+
function ke(e) {
|
|
411
|
+
return e.replace(/left|right|bottom|top/g, (t) => Tt[t]);
|
|
412
|
+
}
|
|
413
|
+
function It(e) {
|
|
414
|
+
return {
|
|
415
|
+
top: 0,
|
|
416
|
+
right: 0,
|
|
417
|
+
bottom: 0,
|
|
418
|
+
left: 0,
|
|
419
|
+
...e
|
|
420
|
+
};
|
|
421
|
+
}
|
|
422
|
+
function zt(e) {
|
|
423
|
+
return typeof e != "number" ? It(e) : {
|
|
424
|
+
top: e,
|
|
425
|
+
right: e,
|
|
426
|
+
bottom: e,
|
|
427
|
+
left: e
|
|
428
|
+
};
|
|
429
|
+
}
|
|
430
|
+
function Ce(e) {
|
|
431
|
+
const {
|
|
432
|
+
x: t,
|
|
433
|
+
y: o,
|
|
434
|
+
width: n,
|
|
435
|
+
height: l
|
|
436
|
+
} = e;
|
|
437
|
+
return {
|
|
438
|
+
width: n,
|
|
439
|
+
height: l,
|
|
440
|
+
top: o,
|
|
441
|
+
left: t,
|
|
442
|
+
right: t + n,
|
|
443
|
+
bottom: o + l,
|
|
444
|
+
x: t,
|
|
445
|
+
y: o
|
|
446
|
+
};
|
|
447
|
+
}
|
|
448
|
+
function ze(e, t, o) {
|
|
449
|
+
let {
|
|
450
|
+
reference: n,
|
|
451
|
+
floating: l
|
|
452
|
+
} = e;
|
|
453
|
+
const i = ie(t), r = Ze(t), a = Qe(r), f = Q(t), u = i === "y", p = n.x + n.width / 2 - l.width / 2, s = n.y + n.height / 2 - l.height / 2, c = n[a] / 2 - l[a] / 2;
|
|
454
|
+
let d;
|
|
455
|
+
switch (f) {
|
|
456
|
+
case "top":
|
|
457
|
+
d = {
|
|
458
|
+
x: p,
|
|
459
|
+
y: n.y - l.height
|
|
460
|
+
};
|
|
461
|
+
break;
|
|
462
|
+
case "bottom":
|
|
463
|
+
d = {
|
|
464
|
+
x: p,
|
|
465
|
+
y: n.y + n.height
|
|
466
|
+
};
|
|
467
|
+
break;
|
|
468
|
+
case "right":
|
|
469
|
+
d = {
|
|
470
|
+
x: n.x + n.width,
|
|
471
|
+
y: s
|
|
472
|
+
};
|
|
473
|
+
break;
|
|
474
|
+
case "left":
|
|
475
|
+
d = {
|
|
476
|
+
x: n.x - l.width,
|
|
477
|
+
y: s
|
|
478
|
+
};
|
|
479
|
+
break;
|
|
480
|
+
default:
|
|
481
|
+
d = {
|
|
482
|
+
x: n.x,
|
|
483
|
+
y: n.y
|
|
484
|
+
};
|
|
485
|
+
}
|
|
486
|
+
switch (Oe(t)) {
|
|
487
|
+
case "start":
|
|
488
|
+
d[r] -= c * (o && u ? -1 : 1);
|
|
489
|
+
break;
|
|
490
|
+
case "end":
|
|
491
|
+
d[r] += c * (o && u ? -1 : 1);
|
|
492
|
+
break;
|
|
493
|
+
}
|
|
494
|
+
return d;
|
|
495
|
+
}
|
|
496
|
+
const _t = async (e, t, o) => {
|
|
497
|
+
const {
|
|
498
|
+
placement: n = "bottom",
|
|
499
|
+
strategy: l = "absolute",
|
|
500
|
+
middleware: i = [],
|
|
501
|
+
platform: r
|
|
502
|
+
} = o, a = i.filter(Boolean), f = await (r.isRTL == null ? void 0 : r.isRTL(t));
|
|
503
|
+
let u = await r.getElementRects({
|
|
504
|
+
reference: e,
|
|
505
|
+
floating: t,
|
|
506
|
+
strategy: l
|
|
507
|
+
}), {
|
|
508
|
+
x: p,
|
|
509
|
+
y: s
|
|
510
|
+
} = ze(u, n, f), c = n, d = {}, g = 0;
|
|
511
|
+
for (let v = 0; v < a.length; v++) {
|
|
512
|
+
const {
|
|
513
|
+
name: y,
|
|
514
|
+
fn: m
|
|
515
|
+
} = a[v], {
|
|
516
|
+
x: w,
|
|
517
|
+
y: C,
|
|
518
|
+
data: E,
|
|
519
|
+
reset: B
|
|
520
|
+
} = await m({
|
|
521
|
+
x: p,
|
|
522
|
+
y: s,
|
|
523
|
+
initialPlacement: n,
|
|
524
|
+
placement: c,
|
|
525
|
+
strategy: l,
|
|
526
|
+
middlewareData: d,
|
|
527
|
+
rects: u,
|
|
528
|
+
platform: r,
|
|
529
|
+
elements: {
|
|
530
|
+
reference: e,
|
|
531
|
+
floating: t
|
|
532
|
+
}
|
|
533
|
+
});
|
|
534
|
+
p = w ?? p, s = C ?? s, d = {
|
|
535
|
+
...d,
|
|
536
|
+
[y]: {
|
|
537
|
+
...d[y],
|
|
538
|
+
...E
|
|
539
|
+
}
|
|
540
|
+
}, B && g <= 50 && (g++, typeof B == "object" && (B.placement && (c = B.placement), B.rects && (u = B.rects === !0 ? await r.getElementRects({
|
|
541
|
+
reference: e,
|
|
542
|
+
floating: t,
|
|
543
|
+
strategy: l
|
|
544
|
+
}) : B.rects), {
|
|
545
|
+
x: p,
|
|
546
|
+
y: s
|
|
547
|
+
} = ze(u, c, f)), v = -1);
|
|
548
|
+
}
|
|
549
|
+
return {
|
|
550
|
+
x: p,
|
|
551
|
+
y: s,
|
|
552
|
+
placement: c,
|
|
553
|
+
strategy: l,
|
|
554
|
+
middlewareData: d
|
|
555
|
+
};
|
|
556
|
+
};
|
|
557
|
+
async function et(e, t) {
|
|
558
|
+
var o;
|
|
559
|
+
t === void 0 && (t = {});
|
|
560
|
+
const {
|
|
561
|
+
x: n,
|
|
562
|
+
y: l,
|
|
563
|
+
platform: i,
|
|
564
|
+
rects: r,
|
|
565
|
+
elements: a,
|
|
566
|
+
strategy: f
|
|
567
|
+
} = e, {
|
|
568
|
+
boundary: u = "clippingAncestors",
|
|
569
|
+
rootBoundary: p = "viewport",
|
|
570
|
+
elementContext: s = "floating",
|
|
571
|
+
altBoundary: c = !1,
|
|
572
|
+
padding: d = 0
|
|
573
|
+
} = Re(t, e), g = zt(d), y = a[c ? s === "floating" ? "reference" : "floating" : s], m = Ce(await i.getClippingRect({
|
|
574
|
+
element: (o = await (i.isElement == null ? void 0 : i.isElement(y))) == null || o ? y : y.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(a.floating)),
|
|
575
|
+
boundary: u,
|
|
576
|
+
rootBoundary: p,
|
|
577
|
+
strategy: f
|
|
578
|
+
})), w = s === "floating" ? {
|
|
579
|
+
x: n,
|
|
580
|
+
y: l,
|
|
581
|
+
width: r.floating.width,
|
|
582
|
+
height: r.floating.height
|
|
583
|
+
} : r.reference, C = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(a.floating)), E = await (i.isElement == null ? void 0 : i.isElement(C)) ? await (i.getScale == null ? void 0 : i.getScale(C)) || {
|
|
584
|
+
x: 1,
|
|
585
|
+
y: 1
|
|
586
|
+
} : {
|
|
587
|
+
x: 1,
|
|
588
|
+
y: 1
|
|
589
|
+
}, B = Ce(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
590
|
+
elements: a,
|
|
591
|
+
rect: w,
|
|
592
|
+
offsetParent: C,
|
|
593
|
+
strategy: f
|
|
594
|
+
}) : w);
|
|
595
|
+
return {
|
|
596
|
+
top: (m.top - B.top + g.top) / E.y,
|
|
597
|
+
bottom: (B.bottom - m.bottom + g.bottom) / E.y,
|
|
598
|
+
left: (m.left - B.left + g.left) / E.x,
|
|
599
|
+
right: (B.right - m.right + g.right) / E.x
|
|
600
|
+
};
|
|
601
|
+
}
|
|
602
|
+
const Pt = function(e) {
|
|
603
|
+
return e === void 0 && (e = {}), {
|
|
604
|
+
name: "flip",
|
|
605
|
+
options: e,
|
|
606
|
+
async fn(t) {
|
|
607
|
+
var o, n;
|
|
608
|
+
const {
|
|
609
|
+
placement: l,
|
|
610
|
+
middlewareData: i,
|
|
611
|
+
rects: r,
|
|
612
|
+
initialPlacement: a,
|
|
613
|
+
platform: f,
|
|
614
|
+
elements: u
|
|
615
|
+
} = t, {
|
|
616
|
+
mainAxis: p = !0,
|
|
617
|
+
crossAxis: s = !0,
|
|
618
|
+
fallbackPlacements: c,
|
|
619
|
+
fallbackStrategy: d = "bestFit",
|
|
620
|
+
fallbackAxisSideDirection: g = "none",
|
|
621
|
+
flipAlignment: v = !0,
|
|
622
|
+
...y
|
|
623
|
+
} = Re(e, t);
|
|
624
|
+
if ((o = i.arrow) != null && o.alignmentOffset)
|
|
625
|
+
return {};
|
|
626
|
+
const m = Q(l), w = ie(a), C = Q(a) === a, E = await (f.isRTL == null ? void 0 : f.isRTL(u.floating)), B = c || (C || !v ? [ke(a)] : Dt(a)), I = g !== "none";
|
|
627
|
+
!c && I && B.push(...$t(a, v, g, E));
|
|
628
|
+
const L = [a, ...B], D = await et(t, y), G = [];
|
|
629
|
+
let Y = ((n = i.flip) == null ? void 0 : n.overflows) || [];
|
|
630
|
+
if (p && G.push(D[m]), s) {
|
|
631
|
+
const j = Mt(l, r, E);
|
|
632
|
+
G.push(D[j[0]], D[j[1]]);
|
|
633
|
+
}
|
|
634
|
+
if (Y = [...Y, {
|
|
635
|
+
placement: l,
|
|
636
|
+
overflows: G
|
|
637
|
+
}], !G.every((j) => j <= 0)) {
|
|
638
|
+
var U, ce;
|
|
639
|
+
const j = (((U = i.flip) == null ? void 0 : U.index) || 0) + 1, ve = L[j];
|
|
640
|
+
if (ve)
|
|
641
|
+
return {
|
|
642
|
+
data: {
|
|
643
|
+
index: j,
|
|
644
|
+
overflows: Y
|
|
645
|
+
},
|
|
646
|
+
reset: {
|
|
647
|
+
placement: ve
|
|
648
|
+
}
|
|
649
|
+
};
|
|
650
|
+
let h = (ce = Y.filter((b) => b.overflows[0] <= 0).sort((b, k) => b.overflows[1] - k.overflows[1])[0]) == null ? void 0 : ce.placement;
|
|
651
|
+
if (!h)
|
|
652
|
+
switch (d) {
|
|
653
|
+
case "bestFit": {
|
|
654
|
+
var me;
|
|
655
|
+
const b = (me = Y.filter((k) => {
|
|
656
|
+
if (I) {
|
|
657
|
+
const M = ie(k.placement);
|
|
658
|
+
return M === w || // Create a bias to the `y` side axis due to horizontal
|
|
659
|
+
// reading directions favoring greater width.
|
|
660
|
+
M === "y";
|
|
661
|
+
}
|
|
662
|
+
return !0;
|
|
663
|
+
}).map((k) => [k.placement, k.overflows.filter((M) => M > 0).reduce((M, $) => M + $, 0)]).sort((k, M) => k[1] - M[1])[0]) == null ? void 0 : me[0];
|
|
664
|
+
b && (h = b);
|
|
665
|
+
break;
|
|
666
|
+
}
|
|
667
|
+
case "initialPlacement":
|
|
668
|
+
h = a;
|
|
669
|
+
break;
|
|
670
|
+
}
|
|
671
|
+
if (l !== h)
|
|
672
|
+
return {
|
|
673
|
+
reset: {
|
|
674
|
+
placement: h
|
|
675
|
+
}
|
|
676
|
+
};
|
|
677
|
+
}
|
|
678
|
+
return {};
|
|
679
|
+
}
|
|
680
|
+
};
|
|
681
|
+
};
|
|
682
|
+
async function Ht(e, t) {
|
|
683
|
+
const {
|
|
684
|
+
placement: o,
|
|
685
|
+
platform: n,
|
|
686
|
+
elements: l
|
|
687
|
+
} = e, i = await (n.isRTL == null ? void 0 : n.isRTL(l.floating)), r = Q(o), a = Oe(o), f = ie(o) === "y", u = ["left", "top"].includes(r) ? -1 : 1, p = i && f ? -1 : 1, s = Re(t, e);
|
|
688
|
+
let {
|
|
689
|
+
mainAxis: c,
|
|
690
|
+
crossAxis: d,
|
|
691
|
+
alignmentAxis: g
|
|
692
|
+
} = typeof s == "number" ? {
|
|
693
|
+
mainAxis: s,
|
|
694
|
+
crossAxis: 0,
|
|
695
|
+
alignmentAxis: null
|
|
696
|
+
} : {
|
|
697
|
+
mainAxis: s.mainAxis || 0,
|
|
698
|
+
crossAxis: s.crossAxis || 0,
|
|
699
|
+
alignmentAxis: s.alignmentAxis
|
|
700
|
+
};
|
|
701
|
+
return a && typeof g == "number" && (d = a === "end" ? g * -1 : g), f ? {
|
|
702
|
+
x: d * p,
|
|
703
|
+
y: c * u
|
|
704
|
+
} : {
|
|
705
|
+
x: c * u,
|
|
706
|
+
y: d * p
|
|
707
|
+
};
|
|
708
|
+
}
|
|
709
|
+
const Nt = function(e) {
|
|
710
|
+
return e === void 0 && (e = 0), {
|
|
711
|
+
name: "offset",
|
|
712
|
+
options: e,
|
|
713
|
+
async fn(t) {
|
|
714
|
+
var o, n;
|
|
715
|
+
const {
|
|
716
|
+
x: l,
|
|
717
|
+
y: i,
|
|
718
|
+
placement: r,
|
|
719
|
+
middlewareData: a
|
|
720
|
+
} = t, f = await Ht(t, e);
|
|
721
|
+
return r === ((o = a.offset) == null ? void 0 : o.placement) && (n = a.arrow) != null && n.alignmentOffset ? {} : {
|
|
722
|
+
x: l + f.x,
|
|
723
|
+
y: i + f.y,
|
|
724
|
+
data: {
|
|
725
|
+
...f,
|
|
726
|
+
placement: r
|
|
727
|
+
}
|
|
728
|
+
};
|
|
729
|
+
}
|
|
730
|
+
};
|
|
731
|
+
}, Gt = function(e) {
|
|
732
|
+
return e === void 0 && (e = {}), {
|
|
733
|
+
name: "shift",
|
|
734
|
+
options: e,
|
|
735
|
+
async fn(t) {
|
|
736
|
+
const {
|
|
737
|
+
x: o,
|
|
738
|
+
y: n,
|
|
739
|
+
placement: l
|
|
740
|
+
} = t, {
|
|
741
|
+
mainAxis: i = !0,
|
|
742
|
+
crossAxis: r = !1,
|
|
743
|
+
limiter: a = {
|
|
744
|
+
fn: (y) => {
|
|
745
|
+
let {
|
|
746
|
+
x: m,
|
|
747
|
+
y: w
|
|
748
|
+
} = y;
|
|
749
|
+
return {
|
|
750
|
+
x: m,
|
|
751
|
+
y: w
|
|
752
|
+
};
|
|
753
|
+
}
|
|
754
|
+
},
|
|
755
|
+
...f
|
|
756
|
+
} = Re(e, t), u = {
|
|
757
|
+
x: o,
|
|
758
|
+
y: n
|
|
759
|
+
}, p = await et(t, f), s = ie(Q(l)), c = Je(s);
|
|
760
|
+
let d = u[c], g = u[s];
|
|
761
|
+
if (i) {
|
|
762
|
+
const y = c === "y" ? "top" : "left", m = c === "y" ? "bottom" : "right", w = d + p[y], C = d - p[m];
|
|
763
|
+
d = Ie(w, d, C);
|
|
764
|
+
}
|
|
765
|
+
if (r) {
|
|
766
|
+
const y = s === "y" ? "top" : "left", m = s === "y" ? "bottom" : "right", w = g + p[y], C = g - p[m];
|
|
767
|
+
g = Ie(w, g, C);
|
|
768
|
+
}
|
|
769
|
+
const v = a.fn({
|
|
770
|
+
...t,
|
|
771
|
+
[c]: d,
|
|
772
|
+
[s]: g
|
|
773
|
+
});
|
|
774
|
+
return {
|
|
775
|
+
...v,
|
|
776
|
+
data: {
|
|
777
|
+
x: v.x - o,
|
|
778
|
+
y: v.y - n,
|
|
779
|
+
enabled: {
|
|
780
|
+
[c]: i,
|
|
781
|
+
[s]: r
|
|
782
|
+
}
|
|
783
|
+
}
|
|
784
|
+
};
|
|
785
|
+
}
|
|
786
|
+
};
|
|
787
|
+
};
|
|
788
|
+
function Be() {
|
|
789
|
+
return typeof window < "u";
|
|
790
|
+
}
|
|
791
|
+
function ee(e) {
|
|
792
|
+
return Ve(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
793
|
+
}
|
|
794
|
+
function F(e) {
|
|
795
|
+
var t;
|
|
796
|
+
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
797
|
+
}
|
|
798
|
+
function N(e) {
|
|
799
|
+
var t;
|
|
800
|
+
return (t = (Ve(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
801
|
+
}
|
|
802
|
+
function Ve(e) {
|
|
803
|
+
return Be() ? e instanceof Node || e instanceof F(e).Node : !1;
|
|
804
|
+
}
|
|
805
|
+
function z(e) {
|
|
806
|
+
return Be() ? e instanceof Element || e instanceof F(e).Element : !1;
|
|
807
|
+
}
|
|
808
|
+
function H(e) {
|
|
809
|
+
return Be() ? e instanceof HTMLElement || e instanceof F(e).HTMLElement : !1;
|
|
810
|
+
}
|
|
811
|
+
function _e(e) {
|
|
812
|
+
return !Be() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof F(e).ShadowRoot;
|
|
813
|
+
}
|
|
814
|
+
function ge(e) {
|
|
815
|
+
const {
|
|
816
|
+
overflow: t,
|
|
817
|
+
overflowX: o,
|
|
818
|
+
overflowY: n,
|
|
819
|
+
display: l
|
|
820
|
+
} = _(e);
|
|
821
|
+
return /auto|scroll|overlay|hidden|clip/.test(t + n + o) && !["inline", "contents"].includes(l);
|
|
822
|
+
}
|
|
823
|
+
function jt(e) {
|
|
824
|
+
return ["table", "td", "th"].includes(ee(e));
|
|
825
|
+
}
|
|
826
|
+
function Le(e) {
|
|
827
|
+
return [":popover-open", ":modal"].some((t) => {
|
|
828
|
+
try {
|
|
829
|
+
return e.matches(t);
|
|
830
|
+
} catch {
|
|
831
|
+
return !1;
|
|
832
|
+
}
|
|
833
|
+
});
|
|
834
|
+
}
|
|
835
|
+
function Me(e) {
|
|
836
|
+
const t = De(), o = z(e) ? _(e) : e;
|
|
837
|
+
return o.transform !== "none" || o.perspective !== "none" || (o.containerType ? o.containerType !== "normal" : !1) || !t && (o.backdropFilter ? o.backdropFilter !== "none" : !1) || !t && (o.filter ? o.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((n) => (o.willChange || "").includes(n)) || ["paint", "layout", "strict", "content"].some((n) => (o.contain || "").includes(n));
|
|
838
|
+
}
|
|
839
|
+
function Wt(e) {
|
|
840
|
+
let t = K(e);
|
|
841
|
+
for (; H(t) && !se(t); ) {
|
|
842
|
+
if (Me(t))
|
|
843
|
+
return t;
|
|
844
|
+
if (Le(t))
|
|
845
|
+
return null;
|
|
846
|
+
t = K(t);
|
|
847
|
+
}
|
|
848
|
+
return null;
|
|
849
|
+
}
|
|
850
|
+
function De() {
|
|
851
|
+
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
852
|
+
}
|
|
853
|
+
function se(e) {
|
|
854
|
+
return ["html", "body", "#document"].includes(ee(e));
|
|
855
|
+
}
|
|
856
|
+
function _(e) {
|
|
857
|
+
return F(e).getComputedStyle(e);
|
|
858
|
+
}
|
|
859
|
+
function Se(e) {
|
|
860
|
+
return z(e) ? {
|
|
861
|
+
scrollLeft: e.scrollLeft,
|
|
862
|
+
scrollTop: e.scrollTop
|
|
863
|
+
} : {
|
|
864
|
+
scrollLeft: e.scrollX,
|
|
865
|
+
scrollTop: e.scrollY
|
|
866
|
+
};
|
|
867
|
+
}
|
|
868
|
+
function K(e) {
|
|
869
|
+
if (ee(e) === "html")
|
|
870
|
+
return e;
|
|
871
|
+
const t = (
|
|
872
|
+
// Step into the shadow DOM of the parent of a slotted node.
|
|
873
|
+
e.assignedSlot || // DOM Element detected.
|
|
874
|
+
e.parentNode || // ShadowRoot detected.
|
|
875
|
+
_e(e) && e.host || // Fallback.
|
|
876
|
+
N(e)
|
|
877
|
+
);
|
|
878
|
+
return _e(t) ? t.host : t;
|
|
879
|
+
}
|
|
880
|
+
function tt(e) {
|
|
881
|
+
const t = K(e);
|
|
882
|
+
return se(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : H(t) && ge(t) ? t : tt(t);
|
|
883
|
+
}
|
|
884
|
+
function he(e, t, o) {
|
|
885
|
+
var n;
|
|
886
|
+
t === void 0 && (t = []), o === void 0 && (o = !0);
|
|
887
|
+
const l = tt(e), i = l === ((n = e.ownerDocument) == null ? void 0 : n.body), r = F(l);
|
|
888
|
+
if (i) {
|
|
889
|
+
const a = Te(r);
|
|
890
|
+
return t.concat(r, r.visualViewport || [], ge(l) ? l : [], a && o ? he(a) : []);
|
|
891
|
+
}
|
|
892
|
+
return t.concat(l, he(l, [], o));
|
|
893
|
+
}
|
|
894
|
+
function Te(e) {
|
|
895
|
+
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
896
|
+
}
|
|
897
|
+
function ot(e) {
|
|
898
|
+
const t = _(e);
|
|
899
|
+
let o = parseFloat(t.width) || 0, n = parseFloat(t.height) || 0;
|
|
900
|
+
const l = H(e), i = l ? e.offsetWidth : o, r = l ? e.offsetHeight : n, a = xe(o) !== i || xe(n) !== r;
|
|
901
|
+
return a && (o = i, n = r), {
|
|
902
|
+
width: o,
|
|
903
|
+
height: n,
|
|
904
|
+
$: a
|
|
905
|
+
};
|
|
906
|
+
}
|
|
907
|
+
function Fe(e) {
|
|
908
|
+
return z(e) ? e : e.contextElement;
|
|
909
|
+
}
|
|
910
|
+
function le(e) {
|
|
911
|
+
const t = Fe(e);
|
|
912
|
+
if (!H(t))
|
|
913
|
+
return P(1);
|
|
914
|
+
const o = t.getBoundingClientRect(), {
|
|
915
|
+
width: n,
|
|
916
|
+
height: l,
|
|
917
|
+
$: i
|
|
918
|
+
} = ot(t);
|
|
919
|
+
let r = (i ? xe(o.width) : o.width) / n, a = (i ? xe(o.height) : o.height) / l;
|
|
920
|
+
return (!r || !Number.isFinite(r)) && (r = 1), (!a || !Number.isFinite(a)) && (a = 1), {
|
|
921
|
+
x: r,
|
|
922
|
+
y: a
|
|
923
|
+
};
|
|
924
|
+
}
|
|
925
|
+
const qt = /* @__PURE__ */ P(0);
|
|
926
|
+
function nt(e) {
|
|
927
|
+
const t = F(e);
|
|
928
|
+
return !De() || !t.visualViewport ? qt : {
|
|
929
|
+
x: t.visualViewport.offsetLeft,
|
|
930
|
+
y: t.visualViewport.offsetTop
|
|
931
|
+
};
|
|
932
|
+
}
|
|
933
|
+
function Ut(e, t, o) {
|
|
934
|
+
return t === void 0 && (t = !1), !o || t && o !== F(e) ? !1 : t;
|
|
935
|
+
}
|
|
936
|
+
function Z(e, t, o, n) {
|
|
937
|
+
t === void 0 && (t = !1), o === void 0 && (o = !1);
|
|
938
|
+
const l = e.getBoundingClientRect(), i = Fe(e);
|
|
939
|
+
let r = P(1);
|
|
940
|
+
t && (n ? z(n) && (r = le(n)) : r = le(e));
|
|
941
|
+
const a = Ut(i, o, n) ? nt(i) : P(0);
|
|
942
|
+
let f = (l.left + a.x) / r.x, u = (l.top + a.y) / r.y, p = l.width / r.x, s = l.height / r.y;
|
|
943
|
+
if (i) {
|
|
944
|
+
const c = F(i), d = n && z(n) ? F(n) : n;
|
|
945
|
+
let g = c, v = Te(g);
|
|
946
|
+
for (; v && n && d !== g; ) {
|
|
947
|
+
const y = le(v), m = v.getBoundingClientRect(), w = _(v), C = m.left + (v.clientLeft + parseFloat(w.paddingLeft)) * y.x, E = m.top + (v.clientTop + parseFloat(w.paddingTop)) * y.y;
|
|
948
|
+
f *= y.x, u *= y.y, p *= y.x, s *= y.y, f += C, u += E, g = F(v), v = Te(g);
|
|
949
|
+
}
|
|
950
|
+
}
|
|
951
|
+
return Ce({
|
|
952
|
+
width: p,
|
|
953
|
+
height: s,
|
|
954
|
+
x: f,
|
|
955
|
+
y: u
|
|
956
|
+
});
|
|
957
|
+
}
|
|
958
|
+
function $e(e, t) {
|
|
959
|
+
const o = Se(e).scrollLeft;
|
|
960
|
+
return t ? t.left + o : Z(N(e)).left + o;
|
|
961
|
+
}
|
|
962
|
+
function lt(e, t, o) {
|
|
963
|
+
o === void 0 && (o = !1);
|
|
964
|
+
const n = e.getBoundingClientRect(), l = n.left + t.scrollLeft - (o ? 0 : (
|
|
965
|
+
// RTL <body> scrollbar.
|
|
966
|
+
$e(e, n)
|
|
967
|
+
)), i = n.top + t.scrollTop;
|
|
968
|
+
return {
|
|
969
|
+
x: l,
|
|
970
|
+
y: i
|
|
971
|
+
};
|
|
972
|
+
}
|
|
973
|
+
function Xt(e) {
|
|
974
|
+
let {
|
|
975
|
+
elements: t,
|
|
976
|
+
rect: o,
|
|
977
|
+
offsetParent: n,
|
|
978
|
+
strategy: l
|
|
979
|
+
} = e;
|
|
980
|
+
const i = l === "fixed", r = N(n), a = t ? Le(t.floating) : !1;
|
|
981
|
+
if (n === r || a && i)
|
|
982
|
+
return o;
|
|
983
|
+
let f = {
|
|
984
|
+
scrollLeft: 0,
|
|
985
|
+
scrollTop: 0
|
|
986
|
+
}, u = P(1);
|
|
987
|
+
const p = P(0), s = H(n);
|
|
988
|
+
if ((s || !s && !i) && ((ee(n) !== "body" || ge(r)) && (f = Se(n)), H(n))) {
|
|
989
|
+
const d = Z(n);
|
|
990
|
+
u = le(n), p.x = d.x + n.clientLeft, p.y = d.y + n.clientTop;
|
|
991
|
+
}
|
|
992
|
+
const c = r && !s && !i ? lt(r, f, !0) : P(0);
|
|
993
|
+
return {
|
|
994
|
+
width: o.width * u.x,
|
|
995
|
+
height: o.height * u.y,
|
|
996
|
+
x: o.x * u.x - f.scrollLeft * u.x + p.x + c.x,
|
|
997
|
+
y: o.y * u.y - f.scrollTop * u.y + p.y + c.y
|
|
998
|
+
};
|
|
999
|
+
}
|
|
1000
|
+
function Kt(e) {
|
|
1001
|
+
return Array.from(e.getClientRects());
|
|
1002
|
+
}
|
|
1003
|
+
function Yt(e) {
|
|
1004
|
+
const t = N(e), o = Se(e), n = e.ownerDocument.body, l = J(t.scrollWidth, t.clientWidth, n.scrollWidth, n.clientWidth), i = J(t.scrollHeight, t.clientHeight, n.scrollHeight, n.clientHeight);
|
|
1005
|
+
let r = -o.scrollLeft + $e(e);
|
|
1006
|
+
const a = -o.scrollTop;
|
|
1007
|
+
return _(n).direction === "rtl" && (r += J(t.clientWidth, n.clientWidth) - l), {
|
|
1008
|
+
width: l,
|
|
1009
|
+
height: i,
|
|
1010
|
+
x: r,
|
|
1011
|
+
y: a
|
|
1012
|
+
};
|
|
1013
|
+
}
|
|
1014
|
+
function Jt(e, t) {
|
|
1015
|
+
const o = F(e), n = N(e), l = o.visualViewport;
|
|
1016
|
+
let i = n.clientWidth, r = n.clientHeight, a = 0, f = 0;
|
|
1017
|
+
if (l) {
|
|
1018
|
+
i = l.width, r = l.height;
|
|
1019
|
+
const u = De();
|
|
1020
|
+
(!u || u && t === "fixed") && (a = l.offsetLeft, f = l.offsetTop);
|
|
1021
|
+
}
|
|
1022
|
+
return {
|
|
1023
|
+
width: i,
|
|
1024
|
+
height: r,
|
|
1025
|
+
x: a,
|
|
1026
|
+
y: f
|
|
1027
|
+
};
|
|
1028
|
+
}
|
|
1029
|
+
function Qt(e, t) {
|
|
1030
|
+
const o = Z(e, !0, t === "fixed"), n = o.top + e.clientTop, l = o.left + e.clientLeft, i = H(e) ? le(e) : P(1), r = e.clientWidth * i.x, a = e.clientHeight * i.y, f = l * i.x, u = n * i.y;
|
|
1031
|
+
return {
|
|
1032
|
+
width: r,
|
|
1033
|
+
height: a,
|
|
1034
|
+
x: f,
|
|
1035
|
+
y: u
|
|
1036
|
+
};
|
|
1037
|
+
}
|
|
1038
|
+
function Pe(e, t, o) {
|
|
1039
|
+
let n;
|
|
1040
|
+
if (t === "viewport")
|
|
1041
|
+
n = Jt(e, o);
|
|
1042
|
+
else if (t === "document")
|
|
1043
|
+
n = Yt(N(e));
|
|
1044
|
+
else if (z(t))
|
|
1045
|
+
n = Qt(t, o);
|
|
1046
|
+
else {
|
|
1047
|
+
const l = nt(e);
|
|
1048
|
+
n = {
|
|
1049
|
+
x: t.x - l.x,
|
|
1050
|
+
y: t.y - l.y,
|
|
1051
|
+
width: t.width,
|
|
1052
|
+
height: t.height
|
|
1053
|
+
};
|
|
1054
|
+
}
|
|
1055
|
+
return Ce(n);
|
|
1056
|
+
}
|
|
1057
|
+
function rt(e, t) {
|
|
1058
|
+
const o = K(e);
|
|
1059
|
+
return o === t || !z(o) || se(o) ? !1 : _(o).position === "fixed" || rt(o, t);
|
|
1060
|
+
}
|
|
1061
|
+
function Zt(e, t) {
|
|
1062
|
+
const o = t.get(e);
|
|
1063
|
+
if (o)
|
|
1064
|
+
return o;
|
|
1065
|
+
let n = he(e, [], !1).filter((a) => z(a) && ee(a) !== "body"), l = null;
|
|
1066
|
+
const i = _(e).position === "fixed";
|
|
1067
|
+
let r = i ? K(e) : e;
|
|
1068
|
+
for (; z(r) && !se(r); ) {
|
|
1069
|
+
const a = _(r), f = Me(r);
|
|
1070
|
+
!f && a.position === "fixed" && (l = null), (i ? !f && !l : !f && a.position === "static" && !!l && ["absolute", "fixed"].includes(l.position) || ge(r) && !f && rt(e, r)) ? n = n.filter((p) => p !== r) : l = a, r = K(r);
|
|
1071
|
+
}
|
|
1072
|
+
return t.set(e, n), n;
|
|
1073
|
+
}
|
|
1074
|
+
function eo(e) {
|
|
1075
|
+
let {
|
|
1076
|
+
element: t,
|
|
1077
|
+
boundary: o,
|
|
1078
|
+
rootBoundary: n,
|
|
1079
|
+
strategy: l
|
|
1080
|
+
} = e;
|
|
1081
|
+
const r = [...o === "clippingAncestors" ? Le(t) ? [] : Zt(t, this._c) : [].concat(o), n], a = r[0], f = r.reduce((u, p) => {
|
|
1082
|
+
const s = Pe(t, p, l);
|
|
1083
|
+
return u.top = J(s.top, u.top), u.right = we(s.right, u.right), u.bottom = we(s.bottom, u.bottom), u.left = J(s.left, u.left), u;
|
|
1084
|
+
}, Pe(t, a, l));
|
|
1085
|
+
return {
|
|
1086
|
+
width: f.right - f.left,
|
|
1087
|
+
height: f.bottom - f.top,
|
|
1088
|
+
x: f.left,
|
|
1089
|
+
y: f.top
|
|
1090
|
+
};
|
|
1091
|
+
}
|
|
1092
|
+
function to(e) {
|
|
1093
|
+
const {
|
|
1094
|
+
width: t,
|
|
1095
|
+
height: o
|
|
1096
|
+
} = ot(e);
|
|
1097
|
+
return {
|
|
1098
|
+
width: t,
|
|
1099
|
+
height: o
|
|
1100
|
+
};
|
|
1101
|
+
}
|
|
1102
|
+
function oo(e, t, o) {
|
|
1103
|
+
const n = H(t), l = N(t), i = o === "fixed", r = Z(e, !0, i, t);
|
|
1104
|
+
let a = {
|
|
1105
|
+
scrollLeft: 0,
|
|
1106
|
+
scrollTop: 0
|
|
1107
|
+
};
|
|
1108
|
+
const f = P(0);
|
|
1109
|
+
if (n || !n && !i)
|
|
1110
|
+
if ((ee(t) !== "body" || ge(l)) && (a = Se(t)), n) {
|
|
1111
|
+
const c = Z(t, !0, i, t);
|
|
1112
|
+
f.x = c.x + t.clientLeft, f.y = c.y + t.clientTop;
|
|
1113
|
+
} else l && (f.x = $e(l));
|
|
1114
|
+
const u = l && !n && !i ? lt(l, a) : P(0), p = r.left + a.scrollLeft - f.x - u.x, s = r.top + a.scrollTop - f.y - u.y;
|
|
1115
|
+
return {
|
|
1116
|
+
x: p,
|
|
1117
|
+
y: s,
|
|
1118
|
+
width: r.width,
|
|
1119
|
+
height: r.height
|
|
1120
|
+
};
|
|
1121
|
+
}
|
|
1122
|
+
function Ae(e) {
|
|
1123
|
+
return _(e).position === "static";
|
|
1124
|
+
}
|
|
1125
|
+
function He(e, t) {
|
|
1126
|
+
if (!H(e) || _(e).position === "fixed")
|
|
1127
|
+
return null;
|
|
1128
|
+
if (t)
|
|
1129
|
+
return t(e);
|
|
1130
|
+
let o = e.offsetParent;
|
|
1131
|
+
return N(e) === o && (o = o.ownerDocument.body), o;
|
|
1132
|
+
}
|
|
1133
|
+
function it(e, t) {
|
|
1134
|
+
const o = F(e);
|
|
1135
|
+
if (Le(e))
|
|
1136
|
+
return o;
|
|
1137
|
+
if (!H(e)) {
|
|
1138
|
+
let l = K(e);
|
|
1139
|
+
for (; l && !se(l); ) {
|
|
1140
|
+
if (z(l) && !Ae(l))
|
|
1141
|
+
return l;
|
|
1142
|
+
l = K(l);
|
|
1143
|
+
}
|
|
1144
|
+
return o;
|
|
1145
|
+
}
|
|
1146
|
+
let n = He(e, t);
|
|
1147
|
+
for (; n && jt(n) && Ae(n); )
|
|
1148
|
+
n = He(n, t);
|
|
1149
|
+
return n && se(n) && Ae(n) && !Me(n) ? o : n || Wt(e) || o;
|
|
1150
|
+
}
|
|
1151
|
+
const no = async function(e) {
|
|
1152
|
+
const t = this.getOffsetParent || it, o = this.getDimensions, n = await o(e.floating);
|
|
1153
|
+
return {
|
|
1154
|
+
reference: oo(e.reference, await t(e.floating), e.strategy),
|
|
1155
|
+
floating: {
|
|
1156
|
+
x: 0,
|
|
1157
|
+
y: 0,
|
|
1158
|
+
width: n.width,
|
|
1159
|
+
height: n.height
|
|
1160
|
+
}
|
|
1161
|
+
};
|
|
1162
|
+
};
|
|
1163
|
+
function lo(e) {
|
|
1164
|
+
return _(e).direction === "rtl";
|
|
1165
|
+
}
|
|
1166
|
+
const ro = {
|
|
1167
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: Xt,
|
|
1168
|
+
getDocumentElement: N,
|
|
1169
|
+
getClippingRect: eo,
|
|
1170
|
+
getOffsetParent: it,
|
|
1171
|
+
getElementRects: no,
|
|
1172
|
+
getClientRects: Kt,
|
|
1173
|
+
getDimensions: to,
|
|
1174
|
+
getScale: le,
|
|
1175
|
+
isElement: z,
|
|
1176
|
+
isRTL: lo
|
|
1177
|
+
};
|
|
1178
|
+
function io(e, t) {
|
|
1179
|
+
let o = null, n;
|
|
1180
|
+
const l = N(e);
|
|
1181
|
+
function i() {
|
|
1182
|
+
var a;
|
|
1183
|
+
clearTimeout(n), (a = o) == null || a.disconnect(), o = null;
|
|
1184
|
+
}
|
|
1185
|
+
function r(a, f) {
|
|
1186
|
+
a === void 0 && (a = !1), f === void 0 && (f = 1), i();
|
|
1187
|
+
const {
|
|
1188
|
+
left: u,
|
|
1189
|
+
top: p,
|
|
1190
|
+
width: s,
|
|
1191
|
+
height: c
|
|
1192
|
+
} = e.getBoundingClientRect();
|
|
1193
|
+
if (a || t(), !s || !c)
|
|
1194
|
+
return;
|
|
1195
|
+
const d = ye(p), g = ye(l.clientWidth - (u + s)), v = ye(l.clientHeight - (p + c)), y = ye(u), w = {
|
|
1196
|
+
rootMargin: -d + "px " + -g + "px " + -v + "px " + -y + "px",
|
|
1197
|
+
threshold: J(0, we(1, f)) || 1
|
|
1198
|
+
};
|
|
1199
|
+
let C = !0;
|
|
1200
|
+
function E(B) {
|
|
1201
|
+
const I = B[0].intersectionRatio;
|
|
1202
|
+
if (I !== f) {
|
|
1203
|
+
if (!C)
|
|
1204
|
+
return r();
|
|
1205
|
+
I ? r(!1, I) : n = setTimeout(() => {
|
|
1206
|
+
r(!1, 1e-7);
|
|
1207
|
+
}, 1e3);
|
|
1208
|
+
}
|
|
1209
|
+
C = !1;
|
|
1210
|
+
}
|
|
1211
|
+
try {
|
|
1212
|
+
o = new IntersectionObserver(E, {
|
|
1213
|
+
...w,
|
|
1214
|
+
// Handle <iframe>s
|
|
1215
|
+
root: l.ownerDocument
|
|
1216
|
+
});
|
|
1217
|
+
} catch {
|
|
1218
|
+
o = new IntersectionObserver(E, w);
|
|
1219
|
+
}
|
|
1220
|
+
o.observe(e);
|
|
1221
|
+
}
|
|
1222
|
+
return r(!0), i;
|
|
1223
|
+
}
|
|
1224
|
+
function so(e, t, o, n) {
|
|
1225
|
+
n === void 0 && (n = {});
|
|
1226
|
+
const {
|
|
1227
|
+
ancestorScroll: l = !0,
|
|
1228
|
+
ancestorResize: i = !0,
|
|
1229
|
+
elementResize: r = typeof ResizeObserver == "function",
|
|
1230
|
+
layoutShift: a = typeof IntersectionObserver == "function",
|
|
1231
|
+
animationFrame: f = !1
|
|
1232
|
+
} = n, u = Fe(e), p = l || i ? [...u ? he(u) : [], ...he(t)] : [];
|
|
1233
|
+
p.forEach((m) => {
|
|
1234
|
+
l && m.addEventListener("scroll", o, {
|
|
1235
|
+
passive: !0
|
|
1236
|
+
}), i && m.addEventListener("resize", o);
|
|
1237
|
+
});
|
|
1238
|
+
const s = u && a ? io(u, o) : null;
|
|
1239
|
+
let c = -1, d = null;
|
|
1240
|
+
r && (d = new ResizeObserver((m) => {
|
|
1241
|
+
let [w] = m;
|
|
1242
|
+
w && w.target === u && d && (d.unobserve(t), cancelAnimationFrame(c), c = requestAnimationFrame(() => {
|
|
1243
|
+
var C;
|
|
1244
|
+
(C = d) == null || C.observe(t);
|
|
1245
|
+
})), o();
|
|
1246
|
+
}), u && !f && d.observe(u), d.observe(t));
|
|
1247
|
+
let g, v = f ? Z(e) : null;
|
|
1248
|
+
f && y();
|
|
1249
|
+
function y() {
|
|
1250
|
+
const m = Z(e);
|
|
1251
|
+
v && (m.x !== v.x || m.y !== v.y || m.width !== v.width || m.height !== v.height) && o(), v = m, g = requestAnimationFrame(y);
|
|
1252
|
+
}
|
|
1253
|
+
return o(), () => {
|
|
1254
|
+
var m;
|
|
1255
|
+
p.forEach((w) => {
|
|
1256
|
+
l && w.removeEventListener("scroll", o), i && w.removeEventListener("resize", o);
|
|
1257
|
+
}), s == null || s(), (m = d) == null || m.disconnect(), d = null, f && cancelAnimationFrame(g);
|
|
1258
|
+
};
|
|
1259
|
+
}
|
|
1260
|
+
const ao = Nt, co = Gt, uo = Pt, fo = (e, t, o) => {
|
|
1261
|
+
const n = /* @__PURE__ */ new Map(), l = {
|
|
1262
|
+
platform: ro,
|
|
1263
|
+
...o
|
|
1264
|
+
}, i = {
|
|
1265
|
+
...l.platform,
|
|
1266
|
+
_c: n
|
|
1267
|
+
};
|
|
1268
|
+
return _t(e, t, {
|
|
1269
|
+
...l,
|
|
1270
|
+
platform: i
|
|
1271
|
+
});
|
|
1272
|
+
};
|
|
1273
|
+
function po(e) {
|
|
1274
|
+
return e != null && typeof e == "object" && "$el" in e;
|
|
1275
|
+
}
|
|
1276
|
+
function Ne(e) {
|
|
1277
|
+
if (po(e)) {
|
|
1278
|
+
const t = e.$el;
|
|
1279
|
+
return Ve(t) && ee(t) === "#comment" ? null : t;
|
|
1280
|
+
}
|
|
1281
|
+
return e;
|
|
1282
|
+
}
|
|
1283
|
+
function ue(e) {
|
|
1284
|
+
return typeof e == "function" ? e() : W(e);
|
|
1285
|
+
}
|
|
1286
|
+
function st(e) {
|
|
1287
|
+
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
1288
|
+
}
|
|
1289
|
+
function Ge(e, t) {
|
|
1290
|
+
const o = st(e);
|
|
1291
|
+
return Math.round(t * o) / o;
|
|
1292
|
+
}
|
|
1293
|
+
function ho(e, t, o) {
|
|
1294
|
+
o === void 0 && (o = {});
|
|
1295
|
+
const n = o.whileElementsMounted, l = R(() => {
|
|
1296
|
+
var L;
|
|
1297
|
+
return (L = ue(o.open)) != null ? L : !0;
|
|
1298
|
+
}), i = R(() => ue(o.middleware)), r = R(() => {
|
|
1299
|
+
var L;
|
|
1300
|
+
return (L = ue(o.placement)) != null ? L : "bottom";
|
|
1301
|
+
}), a = R(() => {
|
|
1302
|
+
var L;
|
|
1303
|
+
return (L = ue(o.strategy)) != null ? L : "absolute";
|
|
1304
|
+
}), f = R(() => {
|
|
1305
|
+
var L;
|
|
1306
|
+
return (L = ue(o.transform)) != null ? L : !0;
|
|
1307
|
+
}), u = R(() => Ne(e.value)), p = R(() => Ne(t.value)), s = T(0), c = T(0), d = T(a.value), g = T(r.value), v = dt({}), y = T(!1), m = R(() => {
|
|
1308
|
+
const L = {
|
|
1309
|
+
position: d.value,
|
|
1310
|
+
left: "0",
|
|
1311
|
+
top: "0"
|
|
1312
|
+
};
|
|
1313
|
+
if (!p.value)
|
|
1314
|
+
return L;
|
|
1315
|
+
const D = Ge(p.value, s.value), G = Ge(p.value, c.value);
|
|
1316
|
+
return f.value ? {
|
|
1317
|
+
...L,
|
|
1318
|
+
transform: "translate(" + D + "px, " + G + "px)",
|
|
1319
|
+
...st(p.value) >= 1.5 && {
|
|
1320
|
+
willChange: "transform"
|
|
1321
|
+
}
|
|
1322
|
+
} : {
|
|
1323
|
+
position: d.value,
|
|
1324
|
+
left: D + "px",
|
|
1325
|
+
top: G + "px"
|
|
1326
|
+
};
|
|
1327
|
+
});
|
|
1328
|
+
let w;
|
|
1329
|
+
function C() {
|
|
1330
|
+
if (u.value == null || p.value == null)
|
|
1331
|
+
return;
|
|
1332
|
+
const L = l.value;
|
|
1333
|
+
fo(u.value, p.value, {
|
|
1334
|
+
middleware: i.value,
|
|
1335
|
+
placement: r.value,
|
|
1336
|
+
strategy: a.value
|
|
1337
|
+
}).then((D) => {
|
|
1338
|
+
s.value = D.x, c.value = D.y, d.value = D.strategy, g.value = D.placement, v.value = D.middlewareData, y.value = L !== !1;
|
|
1339
|
+
});
|
|
1340
|
+
}
|
|
1341
|
+
function E() {
|
|
1342
|
+
typeof w == "function" && (w(), w = void 0);
|
|
1343
|
+
}
|
|
1344
|
+
function B() {
|
|
1345
|
+
if (E(), n === void 0) {
|
|
1346
|
+
C();
|
|
1347
|
+
return;
|
|
1348
|
+
}
|
|
1349
|
+
if (u.value != null && p.value != null) {
|
|
1350
|
+
w = n(u.value, p.value, C);
|
|
1351
|
+
return;
|
|
1352
|
+
}
|
|
1353
|
+
}
|
|
1354
|
+
function I() {
|
|
1355
|
+
l.value || (y.value = !1);
|
|
1356
|
+
}
|
|
1357
|
+
return ne([i, r, a, l], C, {
|
|
1358
|
+
flush: "sync"
|
|
1359
|
+
}), ne([u, p], B, {
|
|
1360
|
+
flush: "sync"
|
|
1361
|
+
}), ne(l, I, {
|
|
1362
|
+
flush: "sync"
|
|
1363
|
+
}), ft() && pt(E), {
|
|
1364
|
+
x: oe(s),
|
|
1365
|
+
y: oe(c),
|
|
1366
|
+
strategy: oe(d),
|
|
1367
|
+
placement: oe(g),
|
|
1368
|
+
middlewareData: oe(v),
|
|
1369
|
+
isPositioned: oe(y),
|
|
1370
|
+
floatingStyles: m,
|
|
1371
|
+
update: C
|
|
1372
|
+
};
|
|
1373
|
+
}
|
|
1374
|
+
const go = ["id", "placeholder", "aria-expanded"], mo = ["onClick", "onMouseenter"], vo = /* @__PURE__ */ q({
|
|
351
1375
|
__name: "MclSelect",
|
|
352
|
-
props: /* @__PURE__ */
|
|
1376
|
+
props: /* @__PURE__ */ X({
|
|
353
1377
|
id: {},
|
|
354
1378
|
displayBorder: { type: Boolean, default: !1 },
|
|
355
1379
|
borderColor: { default: "light-4" },
|
|
@@ -366,150 +1390,211 @@ const ne = ["for"], Te = /* @__PURE__ */ R({
|
|
|
366
1390
|
selectColor: { default: "primary" },
|
|
367
1391
|
invalidFeedback: { default: "No match." }
|
|
368
1392
|
}, {
|
|
369
|
-
modelValue: {},
|
|
1393
|
+
modelValue: { default: null },
|
|
370
1394
|
modelModifiers: {}
|
|
371
1395
|
}),
|
|
372
|
-
emits: ["update:modelValue"],
|
|
373
|
-
setup(
|
|
374
|
-
const
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
d.value =
|
|
390
|
-
},
|
|
1396
|
+
emits: /* @__PURE__ */ X(["open", "close", "clear", "changed", "select"], ["update:modelValue"]),
|
|
1397
|
+
setup(e, { emit: t }) {
|
|
1398
|
+
const o = e;
|
|
1399
|
+
je();
|
|
1400
|
+
const n = t, l = ae(e, "modelValue"), i = T(), r = T(), a = T(), f = T(
|
|
1401
|
+
[]
|
|
1402
|
+
), u = T(null), p = T(), s = T(!1), c = T(""), d = T(0), g = () => {
|
|
1403
|
+
s.value = !0;
|
|
1404
|
+
}, v = () => {
|
|
1405
|
+
var h;
|
|
1406
|
+
c.value = "", s.value = !1, u.value = null, (h = r.value) == null || h.blur(), l.value = "";
|
|
1407
|
+
}, y = () => {
|
|
1408
|
+
s.value = !1, d.value = 0;
|
|
1409
|
+
}, m = () => {
|
|
1410
|
+
var h;
|
|
1411
|
+
s.value = !s.value, d.value = 0, s.value === !0 && ((h = r.value) == null || h.focus());
|
|
1412
|
+
}, w = (h) => {
|
|
1413
|
+
h.preventDefault(), c.value !== "" && (c.value = ""), d.value = 0, l.value = "", n("clear");
|
|
1414
|
+
}, C = (h, b) => {
|
|
1415
|
+
f.value[b] = h;
|
|
1416
|
+
}, E = (h) => {
|
|
1417
|
+
h.style.pointerEvents = "none";
|
|
1418
|
+
}, B = (h) => {
|
|
1419
|
+
h.style.pointerEvents = "auto";
|
|
1420
|
+
}, I = (h) => {
|
|
1421
|
+
d.value = h;
|
|
1422
|
+
}, L = (h, b) => {
|
|
1423
|
+
h.preventDefault(), c.value = typeof b == "string" ? b : b.text;
|
|
1424
|
+
const k = typeof b == "string" ? b : b.value;
|
|
1425
|
+
l.value = k, s.value = !1, n("select", k);
|
|
1426
|
+
}, D = R(() => {
|
|
391
1427
|
const {
|
|
392
|
-
bgColor:
|
|
393
|
-
displayBorder:
|
|
394
|
-
borderColor:
|
|
395
|
-
displayHighlight:
|
|
396
|
-
displayShadow:
|
|
397
|
-
rounded:
|
|
398
|
-
textcolor:
|
|
399
|
-
} =
|
|
400
|
-
|
|
401
|
-
|
|
1428
|
+
bgColor: h,
|
|
1429
|
+
displayBorder: b,
|
|
1430
|
+
borderColor: k,
|
|
1431
|
+
displayHighlight: M,
|
|
1432
|
+
displayShadow: $,
|
|
1433
|
+
rounded: at,
|
|
1434
|
+
textcolor: ct
|
|
1435
|
+
} = o, te = [
|
|
1436
|
+
x("BGCOLOR", h),
|
|
1437
|
+
x("TEXTCOLOR", ct)
|
|
402
1438
|
];
|
|
403
|
-
return
|
|
404
|
-
}),
|
|
405
|
-
const
|
|
406
|
-
return
|
|
407
|
-
},
|
|
408
|
-
const { displayHighlight:
|
|
409
|
-
|
|
410
|
-
|
|
1439
|
+
return b && (te.push("border-2"), te.push(x("BORDER", k))), M || te.push("ring-offset-2 transition-all duration-300 ease-linear"), $ && te.push("shadow-md"), at && te.push("rounded-md"), te.join(" ");
|
|
1440
|
+
}), G = R(() => {
|
|
1441
|
+
const { highlightColor: h, rounded: b } = o, k = [x("BEFOREBG", h)];
|
|
1442
|
+
return b && k.push("rounded-b-md"), k.join(" ");
|
|
1443
|
+
}), Y = R(() => {
|
|
1444
|
+
const { displayHighlight: h, bgColor: b, borderColor: k, rounded: M } = o, $ = [
|
|
1445
|
+
x("BGCOLOR", b),
|
|
1446
|
+
x("BORDER", k)
|
|
411
1447
|
];
|
|
412
|
-
return
|
|
413
|
-
}),
|
|
414
|
-
const
|
|
415
|
-
return typeof
|
|
416
|
-
})),
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
1448
|
+
return h || $.push("mt-2xs"), M && $.push("rounded-md"), $.join(" ");
|
|
1449
|
+
}), U = R(() => c.value === "" ? o.options : o.options.filter((b) => {
|
|
1450
|
+
const k = new RegExp(`${c.value}`, "gi");
|
|
1451
|
+
return typeof b == "string" ? b.match(k) : b.text.match(k);
|
|
1452
|
+
})), ce = (h) => {
|
|
1453
|
+
s.value && (h === "up" && d.value > 0 && d.value--, h === "down" && d.value < U.value.length - 1 && d.value++);
|
|
1454
|
+
}, me = () => {
|
|
1455
|
+
if (!s.value) return;
|
|
1456
|
+
const h = U.value[d.value];
|
|
1457
|
+
let b;
|
|
1458
|
+
typeof h == "string" ? (c.value = h, b = h) : (c.value = h.text, b = h.value), l.value = b, s.value = !1, n("select", b);
|
|
1459
|
+
}, j = R(() => ({ width: `${p.value}px` })), { floatingStyles: ve } = ho(i, a, {
|
|
1460
|
+
whileElementsMounted: so,
|
|
1461
|
+
strategy: "absolute",
|
|
1462
|
+
open: s,
|
|
1463
|
+
transform: !1,
|
|
1464
|
+
placement: "bottom",
|
|
1465
|
+
middleware: [uo(), ao(-2.2), co()]
|
|
1466
|
+
});
|
|
1467
|
+
return wt(i, () => {
|
|
1468
|
+
i.value && (p.value = i.value.clientWidth);
|
|
1469
|
+
}), ne(s, (h) => {
|
|
1470
|
+
n(h === !0 ? "open" : "close");
|
|
1471
|
+
}), ne(l, (h) => {
|
|
1472
|
+
if (h === null) {
|
|
1473
|
+
s.value = !1, u.value = null;
|
|
1474
|
+
return;
|
|
1475
|
+
}
|
|
1476
|
+
n("changed", h);
|
|
1477
|
+
}), ne(d, () => {
|
|
1478
|
+
u.value = f.value[d.value], u.value && u.value.scrollIntoView && u.value.scrollIntoView({ block: "nearest" });
|
|
1479
|
+
}), (h, b) => re((A(), V("div", {
|
|
1480
|
+
onKeyup: [
|
|
1481
|
+
be(v, ["esc"]),
|
|
1482
|
+
b[1] || (b[1] = be((k) => ce("down"), ["down"])),
|
|
1483
|
+
b[2] || (b[2] = be((k) => ce("up"), ["up"])),
|
|
1484
|
+
be(me, ["enter"])
|
|
1485
|
+
],
|
|
421
1486
|
ref_key: "componentRef",
|
|
422
|
-
ref:
|
|
1487
|
+
ref: i,
|
|
1488
|
+
class: "relative"
|
|
423
1489
|
}, [
|
|
424
|
-
|
|
425
|
-
class:
|
|
426
|
-
!
|
|
427
|
-
|
|
1490
|
+
O("div", {
|
|
1491
|
+
class: S(["p-2xs flex relative gap-3xs", [
|
|
1492
|
+
!h.displayHighlight && s.value && W(x)("RINGCOLOR", h.borderColor) + " ring-4",
|
|
1493
|
+
D.value
|
|
428
1494
|
]])
|
|
429
1495
|
}, [
|
|
430
|
-
|
|
431
|
-
id:
|
|
1496
|
+
re(O("input", {
|
|
1497
|
+
id: h.id,
|
|
432
1498
|
type: "text",
|
|
433
1499
|
class: "w-full bg-transparent outline-none",
|
|
434
|
-
"onUpdate:modelValue":
|
|
1500
|
+
"onUpdate:modelValue": b[0] || (b[0] = (k) => c.value = k),
|
|
435
1501
|
ref_key: "inputBox",
|
|
436
|
-
ref:
|
|
1502
|
+
ref: r,
|
|
437
1503
|
role: "combobox",
|
|
438
|
-
|
|
1504
|
+
autocomplete: "off",
|
|
1505
|
+
placeholder: h.placeholder,
|
|
439
1506
|
"aria-autocomplete": "list",
|
|
440
|
-
"aria-expanded":
|
|
441
|
-
onFocus:
|
|
442
|
-
}, null, 40,
|
|
443
|
-
[
|
|
1507
|
+
"aria-expanded": s.value,
|
|
1508
|
+
onFocus: g
|
|
1509
|
+
}, null, 40, go), [
|
|
1510
|
+
[Xe, c.value]
|
|
444
1511
|
]),
|
|
445
|
-
|
|
446
|
-
class:
|
|
447
|
-
|
|
1512
|
+
O("div", {
|
|
1513
|
+
class: S(["flex items-center px-3xs", [
|
|
1514
|
+
c.value === "" ? "hidden cursor-text" : "block cursor-pointer"
|
|
448
1515
|
]]),
|
|
449
|
-
onClick:
|
|
1516
|
+
onClick: w
|
|
450
1517
|
}, [
|
|
451
|
-
(
|
|
1518
|
+
(A(), V("svg", {
|
|
452
1519
|
xmlns: "http://www.w3.org/2000/svg",
|
|
453
1520
|
viewBox: "0 0 384 512",
|
|
454
|
-
class:
|
|
455
|
-
},
|
|
1521
|
+
class: S(["h-xs opacity-70", [W(x)("SVGFILL", h.iconColor)]])
|
|
1522
|
+
}, b[3] || (b[3] = [
|
|
1523
|
+
O("path", { d: "M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z" }, null, -1)
|
|
1524
|
+
]), 2))
|
|
456
1525
|
], 2),
|
|
457
|
-
|
|
1526
|
+
O("div", {
|
|
458
1527
|
class: "flex items-center px-3xs",
|
|
459
|
-
onClick:
|
|
1528
|
+
onClick: m
|
|
460
1529
|
}, [
|
|
461
|
-
(
|
|
1530
|
+
(A(), V("svg", {
|
|
462
1531
|
xmlns: "http://www.w3.org/2000/svg",
|
|
463
1532
|
viewBox: "0 0 320 512",
|
|
464
|
-
class:
|
|
465
|
-
|
|
1533
|
+
class: S(["h-xs", [
|
|
1534
|
+
s.value ? "rotate-180" : "rotate-0",
|
|
466
1535
|
"transition-transform duration-300 ease-in",
|
|
467
|
-
|
|
1536
|
+
W(x)("SVGFILL", h.iconColor)
|
|
468
1537
|
]])
|
|
469
|
-
},
|
|
1538
|
+
}, b[4] || (b[4] = [
|
|
1539
|
+
O("path", { d: "M137.4 374.6c12.5 12.5 32.8 12.5 45.3 0l128-128c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8L32 192c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l128 128z" }, null, -1)
|
|
1540
|
+
]), 2))
|
|
470
1541
|
])
|
|
471
1542
|
], 2),
|
|
472
|
-
|
|
1543
|
+
h.displayHighlight ? (A(), V("div", {
|
|
473
1544
|
key: 0,
|
|
474
|
-
class:
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
1545
|
+
class: S(["relative h-3xs overflow-hidden before:absolute before:bottom-0 before:left-0 before:h-full before:w-0 before:transition-[width] before:duration-300 before:ease-linear -top-1", [s.value ? "before:w-full" : "before:w-0", G.value]])
|
|
1546
|
+
}, null, 2)) : pe("", !0),
|
|
1547
|
+
ht(gt, {
|
|
1548
|
+
name: "options",
|
|
1549
|
+
onBeforeLeave: E,
|
|
1550
|
+
onEnter: B
|
|
1551
|
+
}, {
|
|
1552
|
+
default: mt(() => [
|
|
1553
|
+
s.value ? (A(), V("ul", {
|
|
1554
|
+
key: 0,
|
|
1555
|
+
class: S([[Y.value], "max-h-[200px] overflow-y-auto border-2"]),
|
|
1556
|
+
style: We({ ...j.value, ...W(ve) }),
|
|
1557
|
+
role: "listbox",
|
|
1558
|
+
ref_key: "dropdownRef",
|
|
1559
|
+
ref: a
|
|
1560
|
+
}, [
|
|
1561
|
+
U.value.length > 0 ? de(h.$slots, "dropdown", {
|
|
1562
|
+
key: 0,
|
|
1563
|
+
optionClick: L,
|
|
1564
|
+
options: U.value,
|
|
1565
|
+
activeIndex: d.value,
|
|
1566
|
+
setRef: C,
|
|
1567
|
+
hover: I
|
|
1568
|
+
}, () => [
|
|
1569
|
+
(A(!0), V(vt, null, bt(U.value, (k, M) => (A(), V("li", {
|
|
1570
|
+
key: M,
|
|
1571
|
+
class: S(["p-2xs cursor-pointer", [
|
|
1572
|
+
d.value === M && W(x)("BGCOLOR", h.highlightColor)
|
|
1573
|
+
]]),
|
|
490
1574
|
role: "option",
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
1575
|
+
ref_for: !0,
|
|
1576
|
+
ref: ($) => C($, M),
|
|
1577
|
+
onClick: ($) => L($, k),
|
|
1578
|
+
onMouseenter: ($) => I(M)
|
|
1579
|
+
}, fe(typeof k == "string" ? k : k.text), 43, mo))), 128))
|
|
1580
|
+
], !0) : de(h.$slots, "no-match", { key: 1 }, () => [
|
|
1581
|
+
O("li", {
|
|
1582
|
+
class: S(["p-2xs cursor-pointer", [W(x)("HVBGCOLOR", h.selectColor)]])
|
|
496
1583
|
}, [
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
], 6)
|
|
502
|
-
])) : $("", !0)
|
|
1584
|
+
O("span", null, fe(h.invalidFeedback), 1)
|
|
1585
|
+
], 2)
|
|
1586
|
+
], !0)
|
|
1587
|
+
], 6)) : pe("", !0)
|
|
503
1588
|
]),
|
|
504
1589
|
_: 3
|
|
505
1590
|
})
|
|
506
1591
|
], 32)), [
|
|
507
|
-
[
|
|
1592
|
+
[W(yt), y]
|
|
508
1593
|
]);
|
|
509
1594
|
}
|
|
510
|
-
}),
|
|
1595
|
+
}), Ao = /* @__PURE__ */ Ke(vo, [["__scopeId", "data-v-f80afd47"]]), bo = ["id", "placeholder", "required", "rows"], Eo = /* @__PURE__ */ q({
|
|
511
1596
|
__name: "MclTextArea",
|
|
512
|
-
props: /* @__PURE__ */
|
|
1597
|
+
props: /* @__PURE__ */ X({
|
|
513
1598
|
id: {},
|
|
514
1599
|
displayBorder: { type: Boolean, default: !1 },
|
|
515
1600
|
borderColor: { default: "light-4" },
|
|
@@ -527,46 +1612,46 @@ const ne = ["for"], Te = /* @__PURE__ */ R({
|
|
|
527
1612
|
modelModifiers: {}
|
|
528
1613
|
}),
|
|
529
1614
|
emits: ["update:modelValue"],
|
|
530
|
-
setup(
|
|
531
|
-
const
|
|
1615
|
+
setup(e) {
|
|
1616
|
+
const t = e, o = ae(e, "modelValue"), n = R(() => {
|
|
532
1617
|
const {
|
|
533
|
-
bgColor:
|
|
534
|
-
displayBorder:
|
|
535
|
-
borderColor:
|
|
536
|
-
displayHighlight:
|
|
537
|
-
displayShadow:
|
|
538
|
-
rounded:
|
|
539
|
-
textcolor:
|
|
540
|
-
} =
|
|
541
|
-
|
|
542
|
-
|
|
1618
|
+
bgColor: l,
|
|
1619
|
+
displayBorder: i,
|
|
1620
|
+
borderColor: r,
|
|
1621
|
+
displayHighlight: a,
|
|
1622
|
+
displayShadow: f,
|
|
1623
|
+
rounded: u,
|
|
1624
|
+
textcolor: p
|
|
1625
|
+
} = t, s = [
|
|
1626
|
+
x("BGCOLOR", l),
|
|
1627
|
+
x("TEXTCOLOR", p)
|
|
543
1628
|
];
|
|
544
|
-
return
|
|
1629
|
+
return i && (s.push("border-2"), s.push(x("BORDER", r))), a || (s.push(
|
|
545
1630
|
"focus:ring-4 ring-offset-2 transition-all duration-300 ease-linear"
|
|
546
|
-
),
|
|
1631
|
+
), s.push(x("FOCUSRING", r))), f && s.push("shadow-md"), u && s.push("rounded-md"), s.join(" ");
|
|
547
1632
|
});
|
|
548
|
-
return (
|
|
549
|
-
|
|
550
|
-
id:
|
|
551
|
-
class:
|
|
552
|
-
"onUpdate:modelValue":
|
|
553
|
-
placeholder:
|
|
554
|
-
required:
|
|
555
|
-
rows:
|
|
556
|
-
}, null, 10,
|
|
557
|
-
[
|
|
1633
|
+
return (l, i) => (A(), V("div", null, [
|
|
1634
|
+
re(O("textarea", {
|
|
1635
|
+
id: l.id,
|
|
1636
|
+
class: S(["w-full p-2xs outline-none input__text peer", n.value]),
|
|
1637
|
+
"onUpdate:modelValue": i[0] || (i[0] = (r) => o.value = r),
|
|
1638
|
+
placeholder: l.placeholder,
|
|
1639
|
+
required: l.required,
|
|
1640
|
+
rows: l.rows
|
|
1641
|
+
}, null, 10, bo), [
|
|
1642
|
+
[Xe, o.value]
|
|
558
1643
|
]),
|
|
559
|
-
|
|
1644
|
+
l.displayHighlight ? (A(), Ue(Ye, {
|
|
560
1645
|
key: 0,
|
|
561
|
-
color:
|
|
562
|
-
rounded:
|
|
1646
|
+
color: l.highlightColor,
|
|
1647
|
+
rounded: l.rounded,
|
|
563
1648
|
offset: 2.5
|
|
564
|
-
}, null, 8, ["color", "rounded"])) :
|
|
1649
|
+
}, null, 8, ["color", "rounded"])) : pe("", !0)
|
|
565
1650
|
]));
|
|
566
1651
|
}
|
|
567
|
-
}),
|
|
1652
|
+
}), yo = { class: "relative" }, wo = ["id", "value", "checked"], To = /* @__PURE__ */ q({
|
|
568
1653
|
__name: "MclCheckbox",
|
|
569
|
-
props: /* @__PURE__ */
|
|
1654
|
+
props: /* @__PURE__ */ X({
|
|
570
1655
|
id: {},
|
|
571
1656
|
inputSize: { default: "md" },
|
|
572
1657
|
bgColor: { default: "light-1" },
|
|
@@ -581,9 +1666,9 @@ const ne = ["for"], Te = /* @__PURE__ */ R({
|
|
|
581
1666
|
modelValue: { type: Boolean },
|
|
582
1667
|
modelModifiers: {}
|
|
583
1668
|
}),
|
|
584
|
-
emits: /* @__PURE__ */
|
|
585
|
-
setup(
|
|
586
|
-
const
|
|
1669
|
+
emits: /* @__PURE__ */ X(["checkbox-click"], ["update:modelValue"]),
|
|
1670
|
+
setup(e, { emit: t }) {
|
|
1671
|
+
const o = {
|
|
587
1672
|
primary: "peer-checked/input:bg-primary",
|
|
588
1673
|
secondary: "peer-checked/input:bg-secondary",
|
|
589
1674
|
success: "peer-checked/input:bg-success",
|
|
@@ -601,7 +1686,7 @@ const ne = ["for"], Te = /* @__PURE__ */ R({
|
|
|
601
1686
|
transparent: "peer-checked/input:bg-transparent",
|
|
602
1687
|
black: "peer-checked/input:bg-black",
|
|
603
1688
|
white: "peer-checked/input:bg-white"
|
|
604
|
-
},
|
|
1689
|
+
}, n = {
|
|
605
1690
|
primary: "before:text-primary",
|
|
606
1691
|
secondary: "before:text-secondary",
|
|
607
1692
|
success: "before:text-success",
|
|
@@ -619,65 +1704,65 @@ const ne = ["for"], Te = /* @__PURE__ */ R({
|
|
|
619
1704
|
transparent: "before:text-transparent",
|
|
620
1705
|
black: "before:text-black",
|
|
621
1706
|
white: "before:text-white"
|
|
622
|
-
},
|
|
623
|
-
var
|
|
624
|
-
(
|
|
625
|
-
},
|
|
626
|
-
var
|
|
627
|
-
const
|
|
628
|
-
|
|
1707
|
+
}, l = e, i = ae(e, "modelValue"), r = T(), a = t, f = () => {
|
|
1708
|
+
var c;
|
|
1709
|
+
(c = r.value) == null || c.click();
|
|
1710
|
+
}, u = (c) => {
|
|
1711
|
+
var g;
|
|
1712
|
+
const d = c.target.value;
|
|
1713
|
+
a(
|
|
629
1714
|
"checkbox-click",
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
(
|
|
1715
|
+
c,
|
|
1716
|
+
r.value.checked,
|
|
1717
|
+
(g = r.value) != null && g.checked ? d : ""
|
|
633
1718
|
);
|
|
634
|
-
},
|
|
635
|
-
const { inputSize:
|
|
636
|
-
return
|
|
637
|
-
}),
|
|
1719
|
+
}, p = R(() => {
|
|
1720
|
+
const { inputSize: c } = l;
|
|
1721
|
+
return c === "sm" ? "h-xs w-xs" : c === "lg" ? "h-md w-md" : "h-sm w-sm";
|
|
1722
|
+
}), s = R(() => {
|
|
638
1723
|
const {
|
|
639
|
-
bgColor:
|
|
640
|
-
borderColor:
|
|
641
|
-
displayShadow:
|
|
642
|
-
rounded:
|
|
643
|
-
checkedBgColor:
|
|
644
|
-
checkColor:
|
|
645
|
-
} =
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
1724
|
+
bgColor: c,
|
|
1725
|
+
borderColor: d,
|
|
1726
|
+
displayShadow: g,
|
|
1727
|
+
rounded: v,
|
|
1728
|
+
checkedBgColor: y,
|
|
1729
|
+
checkColor: m
|
|
1730
|
+
} = l, w = [
|
|
1731
|
+
x("BGCOLOR", c),
|
|
1732
|
+
x("BORDER", d),
|
|
1733
|
+
n[m],
|
|
1734
|
+
o[y]
|
|
650
1735
|
];
|
|
651
|
-
return
|
|
1736
|
+
return g && w.push("drop-shadow-md"), v && w.push("rounded-md"), w.join(" ");
|
|
652
1737
|
});
|
|
653
|
-
return (
|
|
654
|
-
|
|
655
|
-
id:
|
|
1738
|
+
return (c, d) => (A(), V("div", yo, [
|
|
1739
|
+
re(O("input", {
|
|
1740
|
+
id: c.id,
|
|
656
1741
|
ref_key: "checkboxRef",
|
|
657
|
-
ref:
|
|
1742
|
+
ref: r,
|
|
658
1743
|
type: "checkbox",
|
|
659
|
-
value:
|
|
660
|
-
checked:
|
|
661
|
-
"onUpdate:modelValue":
|
|
1744
|
+
value: c.value,
|
|
1745
|
+
checked: c.checked,
|
|
1746
|
+
"onUpdate:modelValue": d[0] || (d[0] = (g) => i.value = g),
|
|
662
1747
|
class: "appearance-none peer/input",
|
|
663
|
-
onChange:
|
|
664
|
-
}, null, 40,
|
|
665
|
-
[
|
|
1748
|
+
onChange: u
|
|
1749
|
+
}, null, 40, wo), [
|
|
1750
|
+
[qe, i.value]
|
|
666
1751
|
]),
|
|
667
|
-
|
|
668
|
-
class:
|
|
669
|
-
onClick:
|
|
1752
|
+
O("span", {
|
|
1753
|
+
class: S(["relative border peer-checked/input:border-2 inline-block p-3xs hover:bg-opacity-60 peer-checked/input:hover:bg-opacity-60 peer-checked/input:before:content-['\\2713'] peer-checked/input:before:inline-block peer-checked/input:before:absolute before:top-1/2 before:-translate-y-1/2 before:left-1/2 before:-translate-x-1/2 transition-colors duration-200 ease-linear", [s.value, p.value]]),
|
|
1754
|
+
onClick: f
|
|
670
1755
|
}, null, 2)
|
|
671
1756
|
]));
|
|
672
1757
|
}
|
|
673
1758
|
});
|
|
674
1759
|
export {
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
1760
|
+
To as MclCheckbox,
|
|
1761
|
+
Ro as MclFormGroup,
|
|
1762
|
+
Oo as MclInputFile,
|
|
1763
|
+
Bo as MclInputRadio,
|
|
1764
|
+
Lo as MclInputSwitch,
|
|
1765
|
+
So as MclInputText,
|
|
1766
|
+
Ao as MclSelect,
|
|
1767
|
+
Eo as MclTextArea
|
|
683
1768
|
};
|