@codemonster-ru/vueforge 0.29.0 → 0.30.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/README.md +36 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.ts.mjs +1135 -1003
- package/dist/index.ts.umd.js +3 -3
- package/dist/package/components/__tests__/number-input.test.d.ts +1 -0
- package/dist/package/components/accordion.vue.d.ts +2 -0
- package/dist/package/components/data-table.vue.d.ts +1 -1
- package/dist/package/components/number-input.vue.d.ts +59 -0
- package/dist/package/components/progress.vue.d.ts +1 -0
- package/dist/package/components/radio-button.vue.d.ts +1 -0
- package/dist/package/components/radio-group.vue.d.ts +3 -0
- package/dist/package/components/skeleton.vue.d.ts +2 -0
- package/dist/package/components/slider.vue.d.ts +1 -0
- package/dist/package/components/tabs.vue.d.ts +2 -0
- package/dist/package/config/theme-core.d.ts +35 -0
- package/dist/package/themes/default/components/number-input.d.ts +35 -0
- package/dist/package/themes/default/index.d.ts +34 -0
- package/package.json +1 -1
package/dist/index.ts.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as j, ref as K, computed as m, watch as oe, resolveComponent as Qe, openBlock as
|
|
1
|
+
import { defineComponent as j, ref as K, computed as m, watch as oe, resolveComponent as Qe, openBlock as b, createElementBlock as h, normalizeClass as I, renderSlot as F, Fragment as re, createTextVNode as U, toDisplayString as O, createBlock as se, withCtx as be, createCommentVNode as L, createElementVNode as z, renderList as de, withKeys as te, withModifiers as Q, unref as ze, createVNode as Ne, useSlots as De, nextTick as ke, onMounted as Fe, onBeforeUnmount as we, Teleport as xe, withDirectives as ue, vShow as ce, provide as Ke, inject as Ee, reactive as nt, createSlots as it, Transition as dt, normalizeStyle as me } from "vue";
|
|
2
2
|
import { useRoute as ut, useRouter as ct } from "vue-router";
|
|
3
3
|
import { CmIcon as Be } from "@codemonster-ru/vueiconify";
|
|
4
4
|
const vt = ["href", "aria-disabled", "tabindex"], Ge = /* @__PURE__ */ j({
|
|
@@ -31,7 +31,7 @@ const vt = ["href", "aria-disabled", "tabindex"], Ge = /* @__PURE__ */ j({
|
|
|
31
31
|
v && (r("active"), r("onActive")), r("update:active", v);
|
|
32
32
|
}), (v, w) => {
|
|
33
33
|
const k = Qe("router-link");
|
|
34
|
-
return l.value === "a" ? (
|
|
34
|
+
return l.value === "a" ? (b(), h("a", {
|
|
35
35
|
key: 0,
|
|
36
36
|
href: c.value,
|
|
37
37
|
class: I(["vf-link", { "vf-link_active": f.value, "vf-link_disabled": v.disabled }]),
|
|
@@ -39,10 +39,10 @@ const vt = ["href", "aria-disabled", "tabindex"], Ge = /* @__PURE__ */ j({
|
|
|
39
39
|
tabindex: v.disabled ? -1 : void 0,
|
|
40
40
|
onClick: p
|
|
41
41
|
}, [
|
|
42
|
-
v.$slots.default ? F(v.$slots, "default", { key: 0 }) : (
|
|
42
|
+
v.$slots.default ? F(v.$slots, "default", { key: 0 }) : (b(), h(re, { key: 1 }, [
|
|
43
43
|
U(O(v.label), 1)
|
|
44
44
|
], 64))
|
|
45
|
-
], 10, vt)) : (
|
|
45
|
+
], 10, vt)) : (b(), se(k, {
|
|
46
46
|
key: 1,
|
|
47
47
|
ref_key: "link",
|
|
48
48
|
ref: n,
|
|
@@ -55,7 +55,7 @@ const vt = ["href", "aria-disabled", "tabindex"], Ge = /* @__PURE__ */ j({
|
|
|
55
55
|
onClick: p
|
|
56
56
|
}, {
|
|
57
57
|
default: be(() => [
|
|
58
|
-
v.$slots.default ? F(v.$slots, "default", { key: 0 }) : (
|
|
58
|
+
v.$slots.default ? F(v.$slots, "default", { key: 0 }) : (b(), h(re, { key: 1 }, [
|
|
59
59
|
U(O(v.label), 1)
|
|
60
60
|
], 64))
|
|
61
61
|
]),
|
|
@@ -68,10 +68,10 @@ const vt = ["href", "aria-disabled", "tabindex"], Ge = /* @__PURE__ */ j({
|
|
|
68
68
|
for (const [t, o] of e)
|
|
69
69
|
r[t] = o;
|
|
70
70
|
return r;
|
|
71
|
-
}, pt = {}, bt = { class: "vf-card" },
|
|
71
|
+
}, pt = {}, bt = { class: "vf-card" }, mt = {
|
|
72
72
|
key: 0,
|
|
73
73
|
class: "vf-card__default"
|
|
74
|
-
},
|
|
74
|
+
}, gt = {
|
|
75
75
|
key: 1,
|
|
76
76
|
class: "vf-card__header"
|
|
77
77
|
}, ht = {
|
|
@@ -82,29 +82,29 @@ const vt = ["href", "aria-disabled", "tabindex"], Ge = /* @__PURE__ */ j({
|
|
|
82
82
|
class: "vf-card__footer"
|
|
83
83
|
};
|
|
84
84
|
function _t(a, e) {
|
|
85
|
-
return
|
|
86
|
-
a.$slots.default ? (
|
|
85
|
+
return b(), h("div", bt, [
|
|
86
|
+
a.$slots.default ? (b(), h("div", mt, [
|
|
87
87
|
F(a.$slots, "default")
|
|
88
|
-
])) :
|
|
89
|
-
a.$slots.header ? (
|
|
88
|
+
])) : L("", !0),
|
|
89
|
+
a.$slots.header ? (b(), h("div", gt, [
|
|
90
90
|
F(a.$slots, "header")
|
|
91
|
-
])) :
|
|
92
|
-
a.$slots.body ? (
|
|
91
|
+
])) : L("", !0),
|
|
92
|
+
a.$slots.body ? (b(), h("div", ht, [
|
|
93
93
|
F(a.$slots, "body")
|
|
94
|
-
])) :
|
|
95
|
-
a.$slots.footer ? (
|
|
94
|
+
])) : L("", !0),
|
|
95
|
+
a.$slots.footer ? (b(), h("div", yt, [
|
|
96
96
|
F(a.$slots, "footer")
|
|
97
|
-
])) :
|
|
97
|
+
])) : L("", !0)
|
|
98
98
|
]);
|
|
99
99
|
}
|
|
100
100
|
const Ct = /* @__PURE__ */ ft(pt, [["render", _t]]), kt = {
|
|
101
101
|
class: "vf-menu__list",
|
|
102
102
|
role: "menu"
|
|
103
|
-
},
|
|
103
|
+
}, $t = {
|
|
104
104
|
key: 1,
|
|
105
105
|
class: "vf-menu__separator",
|
|
106
106
|
role: "separator"
|
|
107
|
-
},
|
|
107
|
+
}, wt = ["aria-expanded", "onClick", "onKeydown"], Ur = /* @__PURE__ */ j({
|
|
108
108
|
name: "VfMenu",
|
|
109
109
|
__name: "menu",
|
|
110
110
|
props: {
|
|
@@ -136,11 +136,11 @@ const Ct = /* @__PURE__ */ ft(pt, [["render", _t]]), kt = {
|
|
|
136
136
|
{ deep: !0, immediate: !0 }
|
|
137
137
|
), (i, s) => {
|
|
138
138
|
const f = Qe("VfMenu");
|
|
139
|
-
return
|
|
139
|
+
return b(), h("div", {
|
|
140
140
|
class: I(["vf-menu", `vf-menu_${i.orientation}`])
|
|
141
141
|
}, [
|
|
142
142
|
z("ul", kt, [
|
|
143
|
-
(
|
|
143
|
+
(b(!0), h(re, null, de(o.value, (p, v) => (b(), h("li", {
|
|
144
144
|
key: d(p, v),
|
|
145
145
|
class: "vf-menu__item",
|
|
146
146
|
role: "none"
|
|
@@ -148,7 +148,7 @@ const Ct = /* @__PURE__ */ ft(pt, [["render", _t]]), kt = {
|
|
|
148
148
|
i.$slots[d(p, v)] ? F(i.$slots, d(p, v), {
|
|
149
149
|
key: 0,
|
|
150
150
|
item: { ...p, class: "vf-menu__link" }
|
|
151
|
-
}) : p.separator ? (
|
|
151
|
+
}) : p.separator ? (b(), h("hr", $t)) : p.items && p.items.length ? (b(), h(re, { key: 2 }, [
|
|
152
152
|
z("div", {
|
|
153
153
|
class: I(["vf-menu__parent", { "vf-menu__parent_active": p.active }]),
|
|
154
154
|
role: "menuitem",
|
|
@@ -160,21 +160,21 @@ const Ct = /* @__PURE__ */ ft(pt, [["render", _t]]), kt = {
|
|
|
160
160
|
te(Q((w) => l(p), ["prevent"]), ["space"])
|
|
161
161
|
]
|
|
162
162
|
}, [
|
|
163
|
-
p.icon ? (
|
|
163
|
+
p.icon ? (b(), se(ze(Be), {
|
|
164
164
|
key: 0,
|
|
165
165
|
icon: p.icon,
|
|
166
166
|
class: "vf-menu__icon"
|
|
167
|
-
}, null, 8, ["icon"])) :
|
|
167
|
+
}, null, 8, ["icon"])) : L("", !0),
|
|
168
168
|
U(" " + O(p.label) + " ", 1),
|
|
169
|
-
|
|
170
|
-
], 42,
|
|
171
|
-
p.items ? (
|
|
169
|
+
Ne(ze(Be), { icon: "chevronDown" })
|
|
170
|
+
], 42, wt),
|
|
171
|
+
p.items ? (b(), se(f, {
|
|
172
172
|
key: 0,
|
|
173
173
|
items: p.items,
|
|
174
174
|
class: I(["vf-menu__submenu", { "vf-menu__submenu_visible": p.subMenuVisible }]),
|
|
175
175
|
onOnActive: u
|
|
176
|
-
}, null, 8, ["items", "class"])) :
|
|
177
|
-
], 64)) : (
|
|
176
|
+
}, null, 8, ["items", "class"])) : L("", !0)
|
|
177
|
+
], 64)) : (b(), se(Ge, {
|
|
178
178
|
key: 3,
|
|
179
179
|
to: p.to,
|
|
180
180
|
href: p.href ?? p.url,
|
|
@@ -188,11 +188,11 @@ const Ct = /* @__PURE__ */ ft(pt, [["render", _t]]), kt = {
|
|
|
188
188
|
onActive: (w) => u(p)
|
|
189
189
|
}, {
|
|
190
190
|
default: be(() => [
|
|
191
|
-
p.icon ? (
|
|
191
|
+
p.icon ? (b(), se(ze(Be), {
|
|
192
192
|
key: 0,
|
|
193
193
|
icon: p.icon,
|
|
194
194
|
class: "vf-menu__icon"
|
|
195
|
-
}, null, 8, ["icon"])) :
|
|
195
|
+
}, null, 8, ["icon"])) : L("", !0),
|
|
196
196
|
U(" " + O(p.label), 1)
|
|
197
197
|
]),
|
|
198
198
|
_: 2
|
|
@@ -202,7 +202,7 @@ const Ct = /* @__PURE__ */ ft(pt, [["render", _t]]), kt = {
|
|
|
202
202
|
], 2);
|
|
203
203
|
};
|
|
204
204
|
}
|
|
205
|
-
}), xt = ["type", "disabled"],
|
|
205
|
+
}), xt = ["type", "disabled"], Zr = /* @__PURE__ */ j({
|
|
206
206
|
__name: "button",
|
|
207
207
|
props: {
|
|
208
208
|
to: { default: void 0 },
|
|
@@ -225,33 +225,33 @@ const Ct = /* @__PURE__ */ ft(pt, [["render", _t]]), kt = {
|
|
|
225
225
|
let i = ["vf-button", `vf-button_${e.severity}`];
|
|
226
226
|
return ["top", "bottom"].includes(e.iconPos) && i.push("vf-button_vertical"), e.variant === "text" && i.push("vf-button_text"), e.variant === "outlined" && i.push("vf-button_outlined"), ["small", "large"].indexOf(e.size) > -1 && i.push(`vf-button_${e.size}`), (e.loading || e.disabled) && i.push("vf-button_disabled"), e.rounded && i.push("vf-button_rounded"), i;
|
|
227
227
|
}), l = m(() => ["vf-button__icon", `vf-button__icon_${e.iconPos}`]), u = m(() => ["vf-button__label"]);
|
|
228
|
-
return (i, s) => o.value ? (
|
|
228
|
+
return (i, s) => o.value ? (b(), h("button", {
|
|
229
229
|
key: 0,
|
|
230
230
|
type: d.value,
|
|
231
231
|
class: I(c.value),
|
|
232
232
|
disabled: e.loading || e.disabled
|
|
233
233
|
}, [
|
|
234
|
-
e.icon && !e.loading ? (
|
|
234
|
+
e.icon && !e.loading ? (b(), se(ze(Be), {
|
|
235
235
|
key: 0,
|
|
236
236
|
icon: e.icon,
|
|
237
237
|
class: I(l.value)
|
|
238
|
-
}, null, 8, ["icon", "class"])) :
|
|
239
|
-
e.loading ? (
|
|
238
|
+
}, null, 8, ["icon", "class"])) : L("", !0),
|
|
239
|
+
e.loading ? (b(), se(ze(Be), {
|
|
240
240
|
key: 1,
|
|
241
241
|
icon: "circleNotch",
|
|
242
242
|
class: I(l.value),
|
|
243
243
|
spin: ""
|
|
244
|
-
}, null, 8, ["class"])) :
|
|
245
|
-
i.$slots.default ? (
|
|
244
|
+
}, null, 8, ["class"])) : L("", !0),
|
|
245
|
+
i.$slots.default ? (b(), h("span", {
|
|
246
246
|
key: 2,
|
|
247
247
|
class: I(u.value)
|
|
248
248
|
}, [
|
|
249
249
|
F(i.$slots, "default")
|
|
250
|
-
], 2)) : i.label ? (
|
|
250
|
+
], 2)) : i.label ? (b(), h("span", {
|
|
251
251
|
key: 3,
|
|
252
252
|
class: I(u.value)
|
|
253
|
-
}, O(i.label), 3)) :
|
|
254
|
-
], 10, xt)) : (
|
|
253
|
+
}, O(i.label), 3)) : L("", !0)
|
|
254
|
+
], 10, xt)) : (b(), se(Ge, {
|
|
255
255
|
key: 1,
|
|
256
256
|
to: e.to,
|
|
257
257
|
href: e.href ?? e.url,
|
|
@@ -260,20 +260,20 @@ const Ct = /* @__PURE__ */ ft(pt, [["render", _t]]), kt = {
|
|
|
260
260
|
disabled: e.loading || e.disabled
|
|
261
261
|
}, {
|
|
262
262
|
default: be(() => [
|
|
263
|
-
e.icon ? (
|
|
263
|
+
e.icon ? (b(), se(ze(Be), {
|
|
264
264
|
key: 0,
|
|
265
265
|
icon: e.icon,
|
|
266
266
|
class: I(l.value)
|
|
267
|
-
}, null, 8, ["icon", "class"])) :
|
|
268
|
-
i.$slots.default ? (
|
|
267
|
+
}, null, 8, ["icon", "class"])) : L("", !0),
|
|
268
|
+
i.$slots.default ? (b(), h("span", {
|
|
269
269
|
key: 1,
|
|
270
270
|
class: I(u.value)
|
|
271
271
|
}, [
|
|
272
272
|
F(i.$slots, "default")
|
|
273
|
-
], 2)) : i.label ? (
|
|
273
|
+
], 2)) : i.label ? (b(), h("span", {
|
|
274
274
|
key: 2,
|
|
275
275
|
class: I(u.value)
|
|
276
|
-
}, O(i.label), 3)) :
|
|
276
|
+
}, O(i.label), 3)) : L("", !0)
|
|
277
277
|
]),
|
|
278
278
|
_: 3
|
|
279
279
|
}, 8, ["to", "href", "as", "class", "disabled"]));
|
|
@@ -284,7 +284,7 @@ const Ct = /* @__PURE__ */ ft(pt, [["render", _t]]), kt = {
|
|
|
284
284
|
}, Bt = ["type", "value", "placeholder", "disabled", "readonly"], St = {
|
|
285
285
|
key: 1,
|
|
286
286
|
class: "vf-input__suffix"
|
|
287
|
-
},
|
|
287
|
+
}, Jr = /* @__PURE__ */ j({
|
|
288
288
|
__name: "input",
|
|
289
289
|
props: {
|
|
290
290
|
modelValue: { default: "" },
|
|
@@ -304,12 +304,12 @@ const Ct = /* @__PURE__ */ ft(pt, [["render", _t]]), kt = {
|
|
|
304
304
|
const i = u.target;
|
|
305
305
|
r("update:modelValue", i.value), r("input", u);
|
|
306
306
|
}, n = (u) => r("change", u), c = (u) => r("focus", u), l = (u) => r("blur", u);
|
|
307
|
-
return (u, i) => (
|
|
307
|
+
return (u, i) => (b(), h("div", {
|
|
308
308
|
class: I(o.value)
|
|
309
309
|
}, [
|
|
310
|
-
u.$slots.prefix ? (
|
|
310
|
+
u.$slots.prefix ? (b(), h("span", zt, [
|
|
311
311
|
F(u.$slots, "prefix")
|
|
312
|
-
])) :
|
|
312
|
+
])) : L("", !0),
|
|
313
313
|
z("input", {
|
|
314
314
|
class: "vf-input__control",
|
|
315
315
|
type: u.type,
|
|
@@ -322,16 +322,113 @@ const Ct = /* @__PURE__ */ ft(pt, [["render", _t]]), kt = {
|
|
|
322
322
|
onFocus: c,
|
|
323
323
|
onBlur: l
|
|
324
324
|
}, null, 40, Bt),
|
|
325
|
-
u.$slots.suffix ? (
|
|
325
|
+
u.$slots.suffix ? (b(), h("span", St, [
|
|
326
326
|
F(u.$slots, "suffix")
|
|
327
|
-
])) :
|
|
327
|
+
])) : L("", !0)
|
|
328
328
|
], 2));
|
|
329
329
|
}
|
|
330
|
-
}), Ft =
|
|
330
|
+
}), Ft = {
|
|
331
|
+
key: 0,
|
|
332
|
+
class: "vf-number-input__prefix"
|
|
333
|
+
}, Vt = ["value", "min", "max", "step", "placeholder", "disabled", "readonly", "aria-label"], Lt = {
|
|
334
|
+
key: 1,
|
|
335
|
+
class: "vf-number-input__controls"
|
|
336
|
+
}, Tt = ["disabled"], Rt = ["disabled"], Pt = {
|
|
337
|
+
key: 2,
|
|
338
|
+
class: "vf-number-input__suffix"
|
|
339
|
+
}, Qr = /* @__PURE__ */ j({
|
|
340
|
+
__name: "number-input",
|
|
341
|
+
props: {
|
|
342
|
+
modelValue: { default: null },
|
|
343
|
+
min: { default: void 0 },
|
|
344
|
+
max: { default: void 0 },
|
|
345
|
+
step: { default: 1 },
|
|
346
|
+
precision: { default: void 0 },
|
|
347
|
+
placeholder: { default: "" },
|
|
348
|
+
disabled: { type: Boolean, default: !1 },
|
|
349
|
+
readonly: { type: Boolean, default: !1 },
|
|
350
|
+
size: { default: "normal" },
|
|
351
|
+
variant: { default: "filled" },
|
|
352
|
+
controls: { type: Boolean, default: !0 },
|
|
353
|
+
ariaLabel: { default: "Number input" }
|
|
354
|
+
},
|
|
355
|
+
emits: ["update:modelValue", "input", "change", "focus", "blur"],
|
|
356
|
+
setup(a, { emit: e }) {
|
|
357
|
+
const r = e, t = a, o = m(() => typeof t.min == "number" && Number.isFinite(t.min) ? t.min : void 0), d = m(() => typeof t.max == "number" && Number.isFinite(t.max) ? t.max : void 0), n = m(() => t.step && t.step > 0 ? t.step : 1), c = ($) => (typeof o.value == "number" && ($ = Math.max(o.value, $)), typeof d.value == "number" && ($ = Math.min(d.value, $)), $), l = ($) => {
|
|
358
|
+
if (typeof t.precision != "number" || !Number.isFinite(t.precision))
|
|
359
|
+
return $;
|
|
360
|
+
const E = Math.max(0, Math.floor(t.precision));
|
|
361
|
+
return Number.parseFloat($.toFixed(E));
|
|
362
|
+
}, u = ($) => {
|
|
363
|
+
if (!$.trim())
|
|
364
|
+
return null;
|
|
365
|
+
const E = Number($);
|
|
366
|
+
return Number.isFinite(E) ? l(c(E)) : null;
|
|
367
|
+
}, i = m(() => t.modelValue === null || t.modelValue === void 0 || !Number.isFinite(t.modelValue) ? "" : `${t.modelValue}`), s = m(() => {
|
|
368
|
+
const $ = ["vf-number-input", `vf-number-input_${t.variant}`];
|
|
369
|
+
return t.size !== "normal" && $.push(`vf-number-input_${t.size}`), t.disabled && $.push("vf-number-input_disabled"), t.controls && $.push("vf-number-input_controls"), $;
|
|
370
|
+
}), f = ($) => {
|
|
371
|
+
const E = $.target, M = u(E.value);
|
|
372
|
+
r("update:modelValue", M), r("input", $);
|
|
373
|
+
}, p = ($) => r("change", $), v = ($) => r("focus", $), w = ($) => r("blur", $), k = () => Number.isFinite(t.modelValue) ? t.modelValue : typeof o.value == "number" ? o.value : 0, B = () => {
|
|
374
|
+
if (t.disabled || t.readonly)
|
|
375
|
+
return;
|
|
376
|
+
const $ = l(c(k() + n.value));
|
|
377
|
+
r("update:modelValue", $);
|
|
378
|
+
}, A = () => {
|
|
379
|
+
if (t.disabled || t.readonly)
|
|
380
|
+
return;
|
|
381
|
+
const $ = l(c(k() - n.value));
|
|
382
|
+
r("update:modelValue", $);
|
|
383
|
+
};
|
|
384
|
+
return ($, E) => (b(), h("div", {
|
|
385
|
+
class: I(s.value)
|
|
386
|
+
}, [
|
|
387
|
+
$.$slots.prefix ? (b(), h("span", Ft, [
|
|
388
|
+
F($.$slots, "prefix")
|
|
389
|
+
])) : L("", !0),
|
|
390
|
+
z("input", {
|
|
391
|
+
class: "vf-number-input__control",
|
|
392
|
+
type: "number",
|
|
393
|
+
value: i.value,
|
|
394
|
+
min: o.value,
|
|
395
|
+
max: d.value,
|
|
396
|
+
step: n.value,
|
|
397
|
+
placeholder: $.placeholder,
|
|
398
|
+
disabled: $.disabled,
|
|
399
|
+
readonly: $.readonly,
|
|
400
|
+
"aria-label": $.ariaLabel,
|
|
401
|
+
onInput: f,
|
|
402
|
+
onChange: p,
|
|
403
|
+
onFocus: v,
|
|
404
|
+
onBlur: w
|
|
405
|
+
}, null, 40, Vt),
|
|
406
|
+
$.controls ? (b(), h("div", Lt, [
|
|
407
|
+
z("button", {
|
|
408
|
+
class: "vf-number-input__step",
|
|
409
|
+
type: "button",
|
|
410
|
+
disabled: $.disabled || $.readonly,
|
|
411
|
+
"aria-label": "Increment",
|
|
412
|
+
onClick: B
|
|
413
|
+
}, " + ", 8, Tt),
|
|
414
|
+
z("button", {
|
|
415
|
+
class: "vf-number-input__step",
|
|
416
|
+
type: "button",
|
|
417
|
+
disabled: $.disabled || $.readonly,
|
|
418
|
+
"aria-label": "Decrement",
|
|
419
|
+
onClick: A
|
|
420
|
+
}, " - ", 8, Rt)
|
|
421
|
+
])) : L("", !0),
|
|
422
|
+
$.$slots.suffix ? (b(), h("span", Pt, [
|
|
423
|
+
F($.$slots, "suffix")
|
|
424
|
+
])) : L("", !0)
|
|
425
|
+
], 2));
|
|
426
|
+
}
|
|
427
|
+
}), It = ["for"], Ot = {
|
|
331
428
|
key: 0,
|
|
332
429
|
class: "vf-form-field__required",
|
|
333
430
|
"aria-hidden": "true"
|
|
334
|
-
},
|
|
431
|
+
}, Mt = { class: "vf-form-field__control" }, Dt = ["id"], Et = ["id"], el = /* @__PURE__ */ j({
|
|
335
432
|
__name: "form-field",
|
|
336
433
|
props: {
|
|
337
434
|
id: { default: void 0 },
|
|
@@ -350,10 +447,10 @@ const Ct = /* @__PURE__ */ ft(pt, [["render", _t]]), kt = {
|
|
|
350
447
|
const f = ["vf-form-field"];
|
|
351
448
|
return e.size !== "normal" && f.push(`vf-form-field_${e.size}`), e.disabled && f.push("vf-form-field_disabled"), u.value && f.push("vf-form-field_invalid"), f;
|
|
352
449
|
});
|
|
353
|
-
return (f, p) => (
|
|
450
|
+
return (f, p) => (b(), h("div", {
|
|
354
451
|
class: I(s.value)
|
|
355
452
|
}, [
|
|
356
|
-
c.value ? (
|
|
453
|
+
c.value ? (b(), h("label", {
|
|
357
454
|
key: 0,
|
|
358
455
|
class: "vf-form-field__label",
|
|
359
456
|
for: o.value
|
|
@@ -361,9 +458,9 @@ const Ct = /* @__PURE__ */ ft(pt, [["render", _t]]), kt = {
|
|
|
361
458
|
F(f.$slots, "label", {}, () => [
|
|
362
459
|
U(O(f.label), 1)
|
|
363
460
|
]),
|
|
364
|
-
f.required ? (
|
|
365
|
-
], 8,
|
|
366
|
-
z("div",
|
|
461
|
+
f.required ? (b(), h("span", Ot, "*")) : L("", !0)
|
|
462
|
+
], 8, It)) : L("", !0),
|
|
463
|
+
z("div", Mt, [
|
|
367
464
|
F(f.$slots, "default", {
|
|
368
465
|
id: o.value,
|
|
369
466
|
describedBy: i.value,
|
|
@@ -371,7 +468,7 @@ const Ct = /* @__PURE__ */ ft(pt, [["render", _t]]), kt = {
|
|
|
371
468
|
required: f.required
|
|
372
469
|
})
|
|
373
470
|
]),
|
|
374
|
-
l.value ? (
|
|
471
|
+
l.value ? (b(), h("p", {
|
|
375
472
|
key: 1,
|
|
376
473
|
id: d.value,
|
|
377
474
|
class: "vf-form-field__hint"
|
|
@@ -379,8 +476,8 @@ const Ct = /* @__PURE__ */ ft(pt, [["render", _t]]), kt = {
|
|
|
379
476
|
F(f.$slots, "hint", {}, () => [
|
|
380
477
|
U(O(f.hint), 1)
|
|
381
478
|
])
|
|
382
|
-
], 8,
|
|
383
|
-
u.value ? (
|
|
479
|
+
], 8, Dt)) : L("", !0),
|
|
480
|
+
u.value ? (b(), h("p", {
|
|
384
481
|
key: 2,
|
|
385
482
|
id: n.value,
|
|
386
483
|
class: "vf-form-field__error",
|
|
@@ -389,10 +486,10 @@ const Ct = /* @__PURE__ */ ft(pt, [["render", _t]]), kt = {
|
|
|
389
486
|
F(f.$slots, "error", {}, () => [
|
|
390
487
|
U(O(f.error), 1)
|
|
391
488
|
])
|
|
392
|
-
], 8,
|
|
489
|
+
], 8, Et)) : L("", !0)
|
|
393
490
|
], 2));
|
|
394
491
|
}
|
|
395
|
-
}),
|
|
492
|
+
}), At = ["value", "placeholder", "disabled", "readonly", "rows"], tl = /* @__PURE__ */ j({
|
|
396
493
|
__name: "textarea",
|
|
397
494
|
props: {
|
|
398
495
|
modelValue: { default: "" },
|
|
@@ -412,7 +509,7 @@ const Ct = /* @__PURE__ */ ft(pt, [["render", _t]]), kt = {
|
|
|
412
509
|
const i = u.target;
|
|
413
510
|
r("update:modelValue", i.value), r("input", u);
|
|
414
511
|
}, n = (u) => r("change", u), c = (u) => r("focus", u), l = (u) => r("blur", u);
|
|
415
|
-
return (u, i) => (
|
|
512
|
+
return (u, i) => (b(), h("div", {
|
|
416
513
|
class: I(o.value)
|
|
417
514
|
}, [
|
|
418
515
|
z("textarea", {
|
|
@@ -426,7 +523,7 @@ const Ct = /* @__PURE__ */ ft(pt, [["render", _t]]), kt = {
|
|
|
426
523
|
onChange: n,
|
|
427
524
|
onFocus: c,
|
|
428
525
|
onBlur: l
|
|
429
|
-
}, null, 40,
|
|
526
|
+
}, null, 40, At)
|
|
430
527
|
], 2));
|
|
431
528
|
}
|
|
432
529
|
}), qe = [
|
|
@@ -442,7 +539,7 @@ const Ct = /* @__PURE__ */ ft(pt, [["render", _t]]), kt = {
|
|
|
442
539
|
"left",
|
|
443
540
|
"left-start",
|
|
444
541
|
"left-end"
|
|
445
|
-
],
|
|
542
|
+
], ge = (a) => {
|
|
446
543
|
if (a == null || !(a instanceof HTMLElement))
|
|
447
544
|
return null;
|
|
448
545
|
if (typeof window < "u") {
|
|
@@ -450,12 +547,12 @@ const Ct = /* @__PURE__ */ ft(pt, [["render", _t]]), kt = {
|
|
|
450
547
|
if (/(auto|scroll|overlay)/.test(r))
|
|
451
548
|
return a;
|
|
452
549
|
}
|
|
453
|
-
return a.scrollHeight > a.clientHeight || a.scrollWidth > a.clientWidth ? a :
|
|
550
|
+
return a.scrollHeight > a.clientHeight || a.scrollWidth > a.clientWidth ? a : ge(a.parentNode);
|
|
454
551
|
};
|
|
455
|
-
function
|
|
552
|
+
function Wt(a) {
|
|
456
553
|
return typeof window > "u" ? !1 : window.getComputedStyle(a).position === "fixed";
|
|
457
554
|
}
|
|
458
|
-
const
|
|
555
|
+
const Ht = (a, e) => a.strategy ? a.strategy : Wt(e) ? "fixed" : "absolute", _e = (a, e) => Ht(a, e) === "fixed", ie = (a, e, r = {}) => {
|
|
459
556
|
const t = a.getBoundingClientRect(), o = e ? e.offsetParent : null, d = e ? _e(r, e) : !1;
|
|
460
557
|
if (o && !d) {
|
|
461
558
|
const n = o.getBoundingClientRect(), c = o.scrollLeft, l = o.scrollTop;
|
|
@@ -472,11 +569,11 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
472
569
|
width: t.width,
|
|
473
570
|
height: t.height
|
|
474
571
|
};
|
|
475
|
-
},
|
|
572
|
+
}, $e = (a, e) => {
|
|
476
573
|
var r;
|
|
477
574
|
return (r = a.middleware) == null ? void 0 : r.find((t) => t.name === e);
|
|
478
|
-
}, et = (a, e) =>
|
|
479
|
-
const e =
|
|
575
|
+
}, et = (a, e) => !!$e(a, e), Nt = (a) => {
|
|
576
|
+
const e = ge(a);
|
|
480
577
|
let r = "";
|
|
481
578
|
return e !== null && ((e.dataset.scrollTop === void 0 || e.scrollTop === +e.dataset.scrollTop) && (e.dataset.scrollTop = "0"), (e.dataset.scrollLeft === void 0 || e.scrollLeft === +e.dataset.scrollLeft) && (e.dataset.scrollLeft = "0"), e.scrollTop > +e.dataset.scrollTop ? r = "bottom" : e.scrollTop < +e.dataset.scrollTop ? r = "top" : e.scrollLeft > +e.dataset.scrollLeft ? r = "right" : e.scrollLeft < +e.dataset.scrollLeft && (r = "left"), e.dataset.scrollTop = e.scrollTop <= 0 ? "0" : e.scrollTop.toString(), e.dataset.scrollLeft = e.scrollLeft <= 0 ? "0" : e.scrollLeft.toString()), r;
|
|
482
579
|
}, Pe = (a) => a.scrollLeft + a.clientWidth, Ie = (a) => a.scrollTop + a.clientHeight, ve = (a, e, r = null, t = {}, o) => {
|
|
@@ -484,7 +581,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
484
581
|
return a;
|
|
485
582
|
let d = 0;
|
|
486
583
|
if (r === null) {
|
|
487
|
-
const n =
|
|
584
|
+
const n = ge(e);
|
|
488
585
|
d = n ? n.scrollTop : 0;
|
|
489
586
|
}
|
|
490
587
|
return a - d;
|
|
@@ -493,7 +590,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
493
590
|
if (r === null && typeof window < "u" && _e(t, e))
|
|
494
591
|
d = window.innerWidth;
|
|
495
592
|
else if (r === null) {
|
|
496
|
-
const n =
|
|
593
|
+
const n = ge(e);
|
|
497
594
|
d = n ? Pe(n) : 0;
|
|
498
595
|
} else
|
|
499
596
|
d = r.getBoundingClientRect().width;
|
|
@@ -503,7 +600,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
503
600
|
if (r === null && typeof window < "u" && _e(t, e))
|
|
504
601
|
d = window.innerHeight;
|
|
505
602
|
else if (r === null) {
|
|
506
|
-
const n =
|
|
603
|
+
const n = ge(e);
|
|
507
604
|
d = n ? Ie(n) : 0;
|
|
508
605
|
} else
|
|
509
606
|
d = r.getBoundingClientRect().height;
|
|
@@ -513,7 +610,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
513
610
|
return a;
|
|
514
611
|
let d = 0;
|
|
515
612
|
if (r === null) {
|
|
516
|
-
const n =
|
|
613
|
+
const n = ge(e);
|
|
517
614
|
d = n ? n.scrollLeft : 0;
|
|
518
615
|
}
|
|
519
616
|
return a - d;
|
|
@@ -526,7 +623,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
526
623
|
reference: d,
|
|
527
624
|
scrollDirection: n
|
|
528
625
|
}) => {
|
|
529
|
-
const c = Oe(d, t, o, a), l =
|
|
626
|
+
const c = Oe(d, t, o, a), l = $e(a, "offset");
|
|
530
627
|
if (l) {
|
|
531
628
|
const u = l.fn({
|
|
532
629
|
x: c.x,
|
|
@@ -541,7 +638,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
541
638
|
});
|
|
542
639
|
c.x = u.x, c.y = u.y;
|
|
543
640
|
}
|
|
544
|
-
return
|
|
641
|
+
return la(c, t, d, a) ? {
|
|
545
642
|
x: c.x,
|
|
546
643
|
y: c.y,
|
|
547
644
|
placement: o
|
|
@@ -567,67 +664,67 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
567
664
|
placement: c
|
|
568
665
|
}, f = {
|
|
569
666
|
...t,
|
|
570
|
-
middleware: (i = t.middleware) == null ? void 0 : i.filter((
|
|
667
|
+
middleware: (i = t.middleware) == null ? void 0 : i.filter(($) => $.name !== "shift")
|
|
571
668
|
}, p = (a == null ? void 0 : a.placements) ?? qe, v = !(a != null && a.placements), w = v ? qe : p;
|
|
572
669
|
let k = !1;
|
|
573
|
-
const
|
|
670
|
+
const B = ($) => {
|
|
574
671
|
if (k)
|
|
575
672
|
return;
|
|
576
|
-
const
|
|
673
|
+
const E = Ue({
|
|
577
674
|
options: f,
|
|
578
675
|
primaryX: o,
|
|
579
676
|
primaryY: d,
|
|
580
677
|
floating: n,
|
|
581
|
-
placement:
|
|
678
|
+
placement: $,
|
|
582
679
|
reference: l,
|
|
583
680
|
scrollDirection: u
|
|
584
681
|
});
|
|
585
|
-
|
|
586
|
-
}, A =
|
|
587
|
-
if (!v && p.includes(c) &&
|
|
588
|
-
const
|
|
589
|
-
(
|
|
590
|
-
const
|
|
682
|
+
E && (s.x = E.x, s.y = E.y, s.placement = E.placement, k = !0);
|
|
683
|
+
}, A = na(l, n, f);
|
|
684
|
+
if (!v && p.includes(c) && B(c), k || w.forEach(B), !k) {
|
|
685
|
+
const $ = p.reduce(
|
|
686
|
+
(E, M) => {
|
|
687
|
+
const D = Ue({
|
|
591
688
|
options: f,
|
|
592
689
|
primaryX: o,
|
|
593
690
|
primaryY: d,
|
|
594
691
|
floating: n,
|
|
595
|
-
placement:
|
|
692
|
+
placement: M,
|
|
596
693
|
reference: l,
|
|
597
694
|
scrollDirection: u
|
|
598
695
|
});
|
|
599
|
-
if (!
|
|
600
|
-
return
|
|
601
|
-
const
|
|
602
|
-
return !
|
|
696
|
+
if (!D)
|
|
697
|
+
return E;
|
|
698
|
+
const G = Se(M), T = A[G];
|
|
699
|
+
return !E || T > E.space ? { result: D, space: T } : E;
|
|
603
700
|
},
|
|
604
701
|
null
|
|
605
702
|
);
|
|
606
|
-
|
|
703
|
+
$ && (s.x = $.result.x, s.y = $.result.y, s.placement = $.result.placement, k = !0);
|
|
607
704
|
}
|
|
608
705
|
if (!k && p.length > 0) {
|
|
609
|
-
const
|
|
610
|
-
let
|
|
611
|
-
p.forEach((
|
|
612
|
-
const C = Se(
|
|
613
|
-
|
|
706
|
+
const $ = Se(c);
|
|
707
|
+
let E = $, M = A[$];
|
|
708
|
+
p.forEach((g) => {
|
|
709
|
+
const C = Se(g), y = A[C];
|
|
710
|
+
y > M && (M = y, E = C);
|
|
614
711
|
});
|
|
615
|
-
const
|
|
616
|
-
if (
|
|
617
|
-
const
|
|
618
|
-
x:
|
|
619
|
-
y:
|
|
712
|
+
const D = sa(E, c, p), G = Oe(l, n, D, f), T = $e(f, "offset");
|
|
713
|
+
if (T) {
|
|
714
|
+
const g = T.fn({
|
|
715
|
+
x: G.x,
|
|
716
|
+
y: G.y,
|
|
620
717
|
options: f,
|
|
621
718
|
primaryX: o,
|
|
622
719
|
primaryY: d,
|
|
623
720
|
floating: n,
|
|
624
|
-
placement:
|
|
721
|
+
placement: D,
|
|
625
722
|
reference: l,
|
|
626
723
|
scrollDirection: u
|
|
627
724
|
});
|
|
628
|
-
|
|
725
|
+
G.x = g.x, G.y = g.y;
|
|
629
726
|
}
|
|
630
|
-
s.x =
|
|
727
|
+
s.x = G.x, s.y = G.y, s.placement = G.placement;
|
|
631
728
|
}
|
|
632
729
|
return s;
|
|
633
730
|
}
|
|
@@ -635,7 +732,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
635
732
|
var d, n, c;
|
|
636
733
|
let l = 0;
|
|
637
734
|
t.startsWith("right") ? l = -a : t.startsWith("left") && (l = a);
|
|
638
|
-
const u =
|
|
735
|
+
const u = $e(e, "arrow"), i = $e(e, "shift");
|
|
639
736
|
if (u) {
|
|
640
737
|
const s = ((d = u.params) == null ? void 0 : d.arrow).getBoundingClientRect();
|
|
641
738
|
t.startsWith("right") ? l -= s.width / 2 : t.startsWith("left") && (l += s.width / 2);
|
|
@@ -644,14 +741,14 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
644
741
|
let s = null, f = 0;
|
|
645
742
|
i && (s = (n = i.params) == null ? void 0 : n.parent);
|
|
646
743
|
const p = (c = u.params) == null ? void 0 : c.arrow;
|
|
647
|
-
f = p.getBoundingClientRect().width / 2, f +=
|
|
744
|
+
f = p.getBoundingClientRect().width / 2, f += Gt(p), f -= a, t.startsWith("right") ? fe(r - l, o, s, e) <= a ? fe(r, o, s, e) > 0 ? l = a - fe(r, o, s, e) : l = a : pe(r - l - f, o, s, e) <= a && (pe(r - l - f, o, s, e) >= 0 ? (l = -a - (pe(r - l - f, o, s, e) + a), s && (l = -a)) : l = -a) : t.startsWith("left") ? fe(r - l + f, o, s, e) <= a ? (l = a + fe(r - f, o, s, e), l <= a && (l = a)) : pe(r - l, o, s, e) <= a && (l = -a + pe(r, o, s, e), l <= -a && (l = -a)) : fe(r - l, o, s, e) <= a ? fe(r - l, o, s, e) <= a && fe(r, o, s, e) > 0 ? l = a - fe(r, o, s, e) : l = a : pe(r - l, o, s, e) <= a && (pe(r - l, o, s, e) <= a && pe(r, o, s, e) > 0 ? l = -(a - pe(r, o, s, e)) : l = -a);
|
|
648
745
|
}
|
|
649
746
|
return l;
|
|
650
747
|
}, at = (a, e, r, t, o) => {
|
|
651
748
|
var d, n, c;
|
|
652
749
|
let l = 0;
|
|
653
750
|
t.startsWith("top") ? l = a : t.startsWith("bottom") && (l = -a);
|
|
654
|
-
const u =
|
|
751
|
+
const u = $e(e, "arrow"), i = $e(e, "shift");
|
|
655
752
|
if (u) {
|
|
656
753
|
const s = ((d = u.params) == null ? void 0 : d.arrow).getBoundingClientRect();
|
|
657
754
|
t.startsWith("top") ? l += s.height / 2 : t.startsWith("bottom") && (l -= s.height / 2);
|
|
@@ -660,7 +757,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
660
757
|
let s = null, f = 0;
|
|
661
758
|
i && (s = (n = i.params) == null ? void 0 : n.parent);
|
|
662
759
|
const p = (c = u.params) == null ? void 0 : c.arrow;
|
|
663
|
-
f = p.getBoundingClientRect().height / 2, f +=
|
|
760
|
+
f = p.getBoundingClientRect().height / 2, f += Yt(p), f -= a, t.startsWith("top") ? ve(r - l, o, s, e) <= a ? ve(r, o, s, e) >= 0 ? l = -(a - ve(r, o, s, e)) : l = -a : he(r - l + f, o, s, e) <= a && (l = a + he(r - f, o, s, e), l <= a && (l = a)) : t.startsWith("bottom") ? ve(r - l - f, o, s, e) <= a ? ve(r - l - f, o, s, e) >= 0 ? (l = -a - (ve(r - l - f, o, s, e) + a), s && (l = -a)) : l = -a : he(r - l, o, s, e) <= a && (he(r, o, s, e) >= 0 ? l = a - he(r, o, s, e) : l = a) : ve(r - l, o, s, e) <= a ? ve(r - l, o, s, e) >= 0 ? l = -(a - ve(r - l, o, s, e)) : l = -a : he(r - l, o, s, e) <= a && (he(r - l, o, s, e) >= 0 ? l = a - he(r - l, o, s, e) : l = a);
|
|
664
761
|
}
|
|
665
762
|
return l;
|
|
666
763
|
}, Le = (a) => ({
|
|
@@ -679,7 +776,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
679
776
|
y: r - at(a, t, d, c, n),
|
|
680
777
|
placement: c
|
|
681
778
|
})
|
|
682
|
-
}),
|
|
779
|
+
}), Kt = (a) => ({
|
|
683
780
|
name: "shift",
|
|
684
781
|
params: a,
|
|
685
782
|
fn: ({
|
|
@@ -697,28 +794,28 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
697
794
|
x: e,
|
|
698
795
|
y: r,
|
|
699
796
|
placement: c
|
|
700
|
-
}, s = t.middleware || [], f = s.findIndex((
|
|
701
|
-
let
|
|
702
|
-
const
|
|
797
|
+
}, s = t.middleware || [], f = s.findIndex((y) => y.name === "shift"), p = s.findIndex((y) => y.name === "offset"), v = p !== -1 && (f === -1 || p > f), w = s.find((y) => y.name === "offset"), k = w ? (u = w.params) == null ? void 0 : u.value : 0, B = v ? tt(k, t, o, c, n) : 0, A = v ? at(k, t, d, c, n) : 0, $ = e - B, E = r - A;
|
|
798
|
+
let M = $, D = E;
|
|
799
|
+
const G = w ? Math.abs(k) : 0, T = G, g = G;
|
|
703
800
|
if (_e(t, n) && typeof window < "u") {
|
|
704
|
-
const
|
|
705
|
-
|
|
706
|
-
const le =
|
|
707
|
-
return i.x <
|
|
801
|
+
const y = T, R = window.innerWidth - n.clientWidth - T, H = R < y ? y : R, q = g, ee = window.innerHeight - n.clientHeight - g, X = ee < q ? q : ee;
|
|
802
|
+
M < y ? M = y : M > H && (M = H), D < q ? D = q : D > X && (D = X), v ? (i.x = e + (M - $), i.y = r + (D - E)) : (i.x = M, i.y = D);
|
|
803
|
+
const le = T, V = window.innerWidth - n.clientWidth - T, W = g, x = window.innerHeight - n.clientHeight - g, N = v ? le + B : le, Y = v ? V + B : V, J = v ? W + A : W, _ = v ? x + A : x;
|
|
804
|
+
return i.x < N ? i.x = N : i.x > Y && (i.x = Y), i.y < J ? i.y = J : i.y > _ && (i.y = _), i;
|
|
708
805
|
}
|
|
709
|
-
const C =
|
|
806
|
+
const C = ge(n);
|
|
710
807
|
if (C !== null) {
|
|
711
|
-
const
|
|
712
|
-
|
|
808
|
+
const y = ie(l, n, t), R = y.left, H = y.left + y.width, q = y.top, ee = y.top + y.height, X = C.scrollLeft + T, le = Pe(C) - n.clientWidth - T, V = le < X ? X : le, W = C.scrollTop + g, x = Ie(C) - n.clientHeight - g, N = x < W ? W : x, Y = C.scrollLeft, J = Pe(C), _ = C.scrollTop, S = Ie(C);
|
|
809
|
+
H <= Y ? M = X : R >= J && (M = V), ee <= _ ? D = W : q >= S && (D = N), D < W ? D = W : D > N && (D = N), M < X ? M = X : M > V && (M = V);
|
|
713
810
|
}
|
|
714
|
-
if (v ? (i.x = e + (
|
|
715
|
-
const
|
|
716
|
-
i.x < ee ? i.x = ee : i.x > X && (i.x = X), i.y < le ? i.y = le : i.y >
|
|
811
|
+
if (v ? (i.x = e + (M - $), i.y = r + (D - E)) : (i.x = M, i.y = D), C !== null) {
|
|
812
|
+
const y = C.scrollLeft + T, R = Pe(C) - n.clientWidth - T, H = C.scrollTop + g, q = Ie(C) - n.clientHeight - g, ee = v ? y + B : y, X = v ? R + B : R, le = v ? H + A : H, V = v ? q + A : q;
|
|
813
|
+
i.x < ee ? i.x = ee : i.x > X && (i.x = X), i.y < le ? i.y = le : i.y > V && (i.y = V);
|
|
717
814
|
}
|
|
718
815
|
return i;
|
|
719
816
|
}
|
|
720
|
-
}),
|
|
721
|
-
const r =
|
|
817
|
+
}), Gt = (a) => a.getBoundingClientRect().width !== a.clientWidth ? (a.getBoundingClientRect().width - a.clientWidth) / 2 : 0, Yt = (a) => a.getBoundingClientRect().height !== a.clientHeight ? (a.getBoundingClientRect().height - a.clientHeight) / 2 : 0, Te = (a, e) => {
|
|
818
|
+
const r = ge(a), t = [];
|
|
722
819
|
if (r !== null) {
|
|
723
820
|
const o = () => e();
|
|
724
821
|
r.addEventListener("scroll", o, !1), t.push(() => r.removeEventListener("scroll", o, !1));
|
|
@@ -732,84 +829,84 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
732
829
|
o.observe(a), t.push(() => o.disconnect());
|
|
733
830
|
}
|
|
734
831
|
return () => t.forEach((o) => o());
|
|
735
|
-
},
|
|
832
|
+
}, jt = (a, e, r = {}) => {
|
|
736
833
|
const t = ie(a, e, r);
|
|
737
834
|
return {
|
|
738
835
|
x: t.left - e.getBoundingClientRect().width / 2 + t.width / 2,
|
|
739
836
|
y: t.top - e.getBoundingClientRect().height,
|
|
740
837
|
placement: "top"
|
|
741
838
|
};
|
|
742
|
-
},
|
|
839
|
+
}, Xt = (a, e, r = {}) => {
|
|
743
840
|
const t = ie(a, e, r);
|
|
744
841
|
return {
|
|
745
842
|
x: t.left,
|
|
746
843
|
y: t.top - e.getBoundingClientRect().height,
|
|
747
844
|
placement: "top-start"
|
|
748
845
|
};
|
|
749
|
-
},
|
|
846
|
+
}, qt = (a, e, r = {}) => {
|
|
750
847
|
const t = ie(a, e, r);
|
|
751
848
|
return {
|
|
752
849
|
x: t.left - e.getBoundingClientRect().width + t.width,
|
|
753
850
|
y: t.top - e.getBoundingClientRect().height,
|
|
754
851
|
placement: "top-end"
|
|
755
852
|
};
|
|
756
|
-
},
|
|
853
|
+
}, Ut = (a, e, r = {}) => {
|
|
757
854
|
const t = ie(a, e, r);
|
|
758
855
|
return {
|
|
759
856
|
x: t.left + t.width,
|
|
760
857
|
y: t.top - e.getBoundingClientRect().height / 2 + t.height / 2,
|
|
761
858
|
placement: "right"
|
|
762
859
|
};
|
|
763
|
-
},
|
|
860
|
+
}, Zt = (a, e, r = {}) => {
|
|
764
861
|
const t = ie(a, e, r);
|
|
765
862
|
return {
|
|
766
863
|
x: t.left + t.width,
|
|
767
864
|
y: t.top,
|
|
768
865
|
placement: "right-start"
|
|
769
866
|
};
|
|
770
|
-
},
|
|
867
|
+
}, Jt = (a, e, r = {}) => {
|
|
771
868
|
const t = ie(a, e, r);
|
|
772
869
|
return {
|
|
773
870
|
x: t.left + t.width,
|
|
774
871
|
y: t.top + t.height - e.getBoundingClientRect().height,
|
|
775
872
|
placement: "right-end"
|
|
776
873
|
};
|
|
777
|
-
},
|
|
874
|
+
}, Qt = (a, e, r = {}) => {
|
|
778
875
|
const t = ie(a, e, r);
|
|
779
876
|
return {
|
|
780
877
|
x: t.left + t.width / 2 - e.getBoundingClientRect().width / 2,
|
|
781
878
|
y: t.top + t.height,
|
|
782
879
|
placement: "bottom"
|
|
783
880
|
};
|
|
784
|
-
},
|
|
881
|
+
}, ea = (a, e, r = {}) => {
|
|
785
882
|
const t = ie(a, e, r);
|
|
786
883
|
return {
|
|
787
884
|
x: t.left,
|
|
788
885
|
y: t.top + t.height,
|
|
789
886
|
placement: "bottom-start"
|
|
790
887
|
};
|
|
791
|
-
},
|
|
888
|
+
}, ta = (a, e, r = {}) => {
|
|
792
889
|
const t = ie(a, e, r);
|
|
793
890
|
return {
|
|
794
891
|
x: t.left - e.getBoundingClientRect().width + t.width,
|
|
795
892
|
y: t.top + t.height,
|
|
796
893
|
placement: "bottom-end"
|
|
797
894
|
};
|
|
798
|
-
},
|
|
895
|
+
}, aa = (a, e, r = {}) => {
|
|
799
896
|
const t = ie(a, e, r);
|
|
800
897
|
return {
|
|
801
898
|
x: t.left - e.getBoundingClientRect().width,
|
|
802
899
|
y: t.top + t.height / 2 - e.getBoundingClientRect().height / 2,
|
|
803
900
|
placement: "left"
|
|
804
901
|
};
|
|
805
|
-
},
|
|
902
|
+
}, oa = (a, e, r = {}) => {
|
|
806
903
|
const t = ie(a, e, r);
|
|
807
904
|
return {
|
|
808
905
|
x: t.left - e.getBoundingClientRect().width,
|
|
809
906
|
y: t.top,
|
|
810
907
|
placement: "left-start"
|
|
811
908
|
};
|
|
812
|
-
},
|
|
909
|
+
}, ra = (a, e, r = {}) => {
|
|
813
910
|
const t = ie(a, e, r);
|
|
814
911
|
return {
|
|
815
912
|
x: t.left - e.getBoundingClientRect().width,
|
|
@@ -819,29 +916,29 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
819
916
|
}, Oe = (a, e, r, t = {}) => {
|
|
820
917
|
switch (r) {
|
|
821
918
|
case "top":
|
|
822
|
-
return
|
|
919
|
+
return jt(a, e, t);
|
|
823
920
|
case "top-start":
|
|
824
|
-
return
|
|
921
|
+
return Xt(a, e, t);
|
|
825
922
|
case "top-end":
|
|
826
|
-
return
|
|
923
|
+
return qt(a, e, t);
|
|
827
924
|
case "right":
|
|
828
|
-
return
|
|
925
|
+
return Ut(a, e, t);
|
|
829
926
|
case "right-start":
|
|
830
|
-
return
|
|
927
|
+
return Zt(a, e, t);
|
|
831
928
|
case "right-end":
|
|
832
|
-
return
|
|
929
|
+
return Jt(a, e, t);
|
|
833
930
|
case "bottom":
|
|
834
|
-
return
|
|
931
|
+
return Qt(a, e, t);
|
|
835
932
|
case "bottom-start":
|
|
836
|
-
return
|
|
933
|
+
return ea(a, e, t);
|
|
837
934
|
case "bottom-end":
|
|
838
|
-
return
|
|
935
|
+
return ta(a, e, t);
|
|
839
936
|
case "left":
|
|
840
|
-
return
|
|
937
|
+
return aa(a, e, t);
|
|
841
938
|
case "left-start":
|
|
842
|
-
return
|
|
939
|
+
return oa(a, e, t);
|
|
843
940
|
case "left-end":
|
|
844
|
-
return
|
|
941
|
+
return ra(a, e, t);
|
|
845
942
|
default:
|
|
846
943
|
return {
|
|
847
944
|
x: 0,
|
|
@@ -849,14 +946,14 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
849
946
|
placement: ""
|
|
850
947
|
};
|
|
851
948
|
}
|
|
852
|
-
},
|
|
949
|
+
}, la = (a, e, r, t = {}) => {
|
|
853
950
|
if (_e(t, e)) {
|
|
854
951
|
if (typeof window > "u")
|
|
855
952
|
return !0;
|
|
856
953
|
const s = a.x, f = a.y, p = s + e.clientWidth, v = f + e.clientHeight;
|
|
857
954
|
return s >= 0 && f >= 0 && p <= window.innerWidth && v <= window.innerHeight;
|
|
858
955
|
}
|
|
859
|
-
if (
|
|
956
|
+
if (ge(r) !== null)
|
|
860
957
|
return ve(a.y, e, null, t) > 0 && fe(a.x, e, null, t) > 0 && he(a.y, e, null, t) > 0 && pe(a.x, e, null, t) > 0;
|
|
861
958
|
if (typeof window > "u")
|
|
862
959
|
return !0;
|
|
@@ -867,7 +964,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
867
964
|
}
|
|
868
965
|
const c = a.x, l = a.y, u = c + e.clientWidth, i = l + e.clientHeight;
|
|
869
966
|
return c >= 0 && l >= 0 && u <= o && i <= d;
|
|
870
|
-
}, Se = (a) => a.startsWith("right") ? "right" : a.startsWith("left") ? "left" : a.startsWith("top") ? "top" : "bottom",
|
|
967
|
+
}, Se = (a) => a.startsWith("right") ? "right" : a.startsWith("left") ? "left" : a.startsWith("top") ? "top" : "bottom", sa = (a, e, r) => Se(e) === a && r.includes(e) ? e : r.find((t) => Se(t) === a) ?? r[0], na = (a, e, r = {}) => {
|
|
871
968
|
if (typeof window > "u")
|
|
872
969
|
return {
|
|
873
970
|
top: 0,
|
|
@@ -875,7 +972,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
875
972
|
bottom: 0,
|
|
876
973
|
left: 0
|
|
877
974
|
};
|
|
878
|
-
const t = _e(r, e) ? null :
|
|
975
|
+
const t = _e(r, e) ? null : ge(a), o = a.getBoundingClientRect(), d = t ? t.getBoundingClientRect() : {
|
|
879
976
|
top: 0,
|
|
880
977
|
left: 0,
|
|
881
978
|
right: window.innerWidth,
|
|
@@ -896,7 +993,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
896
993
|
middlewareData: {}
|
|
897
994
|
}, l = Oe(a, e, n, r);
|
|
898
995
|
c.x = l.x, c.y = l.y, c.placement = l.placement;
|
|
899
|
-
const u = c.x, i = c.y, s =
|
|
996
|
+
const u = c.x, i = c.y, s = Nt(a);
|
|
900
997
|
(o = r.middleware) == null || o.forEach((w) => {
|
|
901
998
|
const k = w.fn({
|
|
902
999
|
x: c.x,
|
|
@@ -911,7 +1008,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
911
1008
|
});
|
|
912
1009
|
c.x = k.x, c.y = k.y, c.placement = k.placement, w.name === "arrow" && (k.baseX = k.x, k.baseY = k.y, k.x = k.arrowX ?? k.x, k.y = k.arrowY ?? k.y), c.middlewareData[w.name] = k;
|
|
913
1010
|
});
|
|
914
|
-
const f = Oe(a, e, c.placement, r), p =
|
|
1011
|
+
const f = Oe(a, e, c.placement, r), p = $e(r, "offset"), v = p ? (d = p.params) == null ? void 0 : d.value : 0;
|
|
915
1012
|
if (Number.isFinite(c.x) || (c.x = f.x), !Number.isFinite(c.y))
|
|
916
1013
|
if (_e(r, e)) {
|
|
917
1014
|
const w = a.getBoundingClientRect(), k = e.getBoundingClientRect().height;
|
|
@@ -919,7 +1016,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
919
1016
|
} else
|
|
920
1017
|
c.y = f.y;
|
|
921
1018
|
t(c);
|
|
922
|
-
}),
|
|
1019
|
+
}), ia = ["disabled", "aria-expanded", "onKeydown"], da = ["data-placement"], ua = ["disabled", "aria-selected", "onClick"], al = /* @__PURE__ */ j({
|
|
923
1020
|
__name: "select",
|
|
924
1021
|
props: {
|
|
925
1022
|
modelValue: { default: void 0 },
|
|
@@ -946,44 +1043,44 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
946
1043
|
}), k = m(() => {
|
|
947
1044
|
const C = ["vf-select", `vf-select_${o.variant}`, l.value ? "vf-select_open" : ""];
|
|
948
1045
|
return o.size !== "normal" && C.push(`vf-select_${o.size}`), o.disabled && C.push("vf-select_disabled"), C.filter(Boolean);
|
|
949
|
-
}),
|
|
950
|
-
C.disabled || (t("update:modelValue", C.value), t("change", C.value),
|
|
951
|
-
},
|
|
1046
|
+
}), B = (C) => C.value === o.modelValue, A = (C) => {
|
|
1047
|
+
C.disabled || (t("update:modelValue", C.value), t("change", C.value), M());
|
|
1048
|
+
}, $ = (C) => t("focus", C), E = (C) => t("blur", C), M = () => {
|
|
952
1049
|
l.value = !1, u.value = "bottom", i.value = "bottom";
|
|
953
|
-
},
|
|
1050
|
+
}, D = () => {
|
|
954
1051
|
o.disabled || (l.value = !l.value, l.value && (u.value = "bottom", i.value = "bottom"));
|
|
955
|
-
},
|
|
956
|
-
var C,
|
|
957
|
-
l.value || (l.value = !0, await ke()), (
|
|
958
|
-
},
|
|
1052
|
+
}, G = async () => {
|
|
1053
|
+
var C, y;
|
|
1054
|
+
l.value || (l.value = !0, await ke()), (y = (C = c.value) == null ? void 0 : C.querySelector(".vf-select__option:not(.is-disabled)")) == null || y.focus();
|
|
1055
|
+
}, T = (C) => {
|
|
959
1056
|
var R;
|
|
960
1057
|
if (!l.value || !d.value)
|
|
961
1058
|
return;
|
|
962
|
-
const
|
|
963
|
-
d.value.contains(
|
|
964
|
-
},
|
|
1059
|
+
const y = C.target;
|
|
1060
|
+
d.value.contains(y) || (R = c.value) != null && R.contains(y) || M();
|
|
1061
|
+
}, g = () => {
|
|
965
1062
|
if (!n.value || !c.value)
|
|
966
1063
|
return;
|
|
967
|
-
const C = n.value,
|
|
1064
|
+
const C = n.value, y = c.value, R = async () => {
|
|
968
1065
|
const {
|
|
969
1066
|
x: X,
|
|
970
1067
|
y: le,
|
|
971
|
-
placement:
|
|
972
|
-
} = await Re(C,
|
|
1068
|
+
placement: V
|
|
1069
|
+
} = await Re(C, y, {
|
|
973
1070
|
placement: u.value,
|
|
974
1071
|
strategy: "fixed",
|
|
975
1072
|
middleware: [Le(2), Ve({ placements: ["bottom", "top"] })]
|
|
976
1073
|
});
|
|
977
|
-
i.value =
|
|
978
|
-
},
|
|
1074
|
+
i.value = V ?? u.value, y.style.minWidth = `${C.getBoundingClientRect().width}px`, y.style.left = `${X}px`, y.style.top = `${le}px`;
|
|
1075
|
+
}, H = async () => {
|
|
979
1076
|
await R();
|
|
980
1077
|
}, q = Te(C, () => {
|
|
981
|
-
|
|
1078
|
+
H();
|
|
982
1079
|
}), ee = () => {
|
|
983
|
-
|
|
1080
|
+
H();
|
|
984
1081
|
};
|
|
985
1082
|
document.addEventListener("scroll", ee, !0), window.addEventListener("resize", ee, !1), f = {
|
|
986
|
-
update:
|
|
1083
|
+
update: H,
|
|
987
1084
|
destroy: () => {
|
|
988
1085
|
q(), document.removeEventListener("scroll", ee, !0), window.removeEventListener("resize", ee, !1);
|
|
989
1086
|
}
|
|
@@ -994,7 +1091,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
994
1091
|
f && (f.destroy(), f = null);
|
|
995
1092
|
return;
|
|
996
1093
|
}
|
|
997
|
-
await ke(), f ||
|
|
1094
|
+
await ke(), f || g(), f == null || f.update();
|
|
998
1095
|
}), oe(
|
|
999
1096
|
() => o.options,
|
|
1000
1097
|
() => {
|
|
@@ -1002,10 +1099,10 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1002
1099
|
},
|
|
1003
1100
|
{ deep: !0 }
|
|
1004
1101
|
), Fe(() => {
|
|
1005
|
-
document.addEventListener("click",
|
|
1006
|
-
}),
|
|
1007
|
-
document.removeEventListener("click",
|
|
1008
|
-
}), (C,
|
|
1102
|
+
document.addEventListener("click", T);
|
|
1103
|
+
}), we(() => {
|
|
1104
|
+
document.removeEventListener("click", T), f == null || f.destroy(), f = null;
|
|
1105
|
+
}), (C, y) => (b(), h("div", {
|
|
1009
1106
|
ref_key: "root",
|
|
1010
1107
|
ref: d,
|
|
1011
1108
|
class: I(k.value)
|
|
@@ -1019,24 +1116,24 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1019
1116
|
"aria-expanded": l.value,
|
|
1020
1117
|
"aria-controls": s,
|
|
1021
1118
|
"aria-haspopup": "listbox",
|
|
1022
|
-
onClick:
|
|
1119
|
+
onClick: D,
|
|
1023
1120
|
onKeydown: [
|
|
1024
|
-
te(Q(
|
|
1025
|
-
te(Q(
|
|
1026
|
-
te(Q(
|
|
1121
|
+
te(Q(G, ["prevent"]), ["down"]),
|
|
1122
|
+
te(Q(D, ["prevent"]), ["enter"]),
|
|
1123
|
+
te(Q(M, ["prevent"]), ["esc"])
|
|
1027
1124
|
],
|
|
1028
|
-
onFocus:
|
|
1029
|
-
onBlur:
|
|
1125
|
+
onFocus: $,
|
|
1126
|
+
onBlur: E
|
|
1030
1127
|
}, [
|
|
1031
1128
|
z("span", {
|
|
1032
1129
|
class: I(["vf-select__label", { "vf-select__label_placeholder": !w.value }])
|
|
1033
1130
|
}, O(w.value || C.placeholder), 3),
|
|
1034
|
-
|
|
1131
|
+
y[0] || (y[0] = z("span", {
|
|
1035
1132
|
class: "vf-select__chevron",
|
|
1036
1133
|
"aria-hidden": "true"
|
|
1037
1134
|
}, "▾", -1))
|
|
1038
|
-
], 40,
|
|
1039
|
-
(
|
|
1135
|
+
], 40, ia),
|
|
1136
|
+
(b(), se(xe, { to: "body" }, [
|
|
1040
1137
|
ue(z("div", {
|
|
1041
1138
|
id: s,
|
|
1042
1139
|
ref_key: "panel",
|
|
@@ -1045,28 +1142,28 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1045
1142
|
role: "listbox",
|
|
1046
1143
|
"data-placement": i.value
|
|
1047
1144
|
}, [
|
|
1048
|
-
(
|
|
1145
|
+
(b(!0), h(re, null, de(p.value, (R) => (b(), h("button", {
|
|
1049
1146
|
key: R.value,
|
|
1050
|
-
class: I(["vf-select__option", { "is-active":
|
|
1147
|
+
class: I(["vf-select__option", { "is-active": B(R), "is-disabled": R.disabled }]),
|
|
1051
1148
|
type: "button",
|
|
1052
1149
|
role: "option",
|
|
1053
1150
|
disabled: R.disabled,
|
|
1054
|
-
"aria-selected":
|
|
1055
|
-
onClick: (
|
|
1056
|
-
}, O(R.label), 11,
|
|
1057
|
-
], 8,
|
|
1151
|
+
"aria-selected": B(R),
|
|
1152
|
+
onClick: (H) => A(R)
|
|
1153
|
+
}, O(R.label), 11, ua))), 128))
|
|
1154
|
+
], 8, da), [
|
|
1058
1155
|
[ce, l.value]
|
|
1059
1156
|
])
|
|
1060
1157
|
]))
|
|
1061
1158
|
], 2));
|
|
1062
1159
|
}
|
|
1063
|
-
}),
|
|
1160
|
+
}), ca = ["value", "placeholder", "disabled", "readonly", "aria-expanded", "aria-activedescendant", "onKeydown"], va = ["disabled"], fa = ["data-placement"], pa = {
|
|
1064
1161
|
key: 0,
|
|
1065
1162
|
class: "vf-autocomplete__loading"
|
|
1066
|
-
},
|
|
1163
|
+
}, ba = ["id", "disabled", "aria-selected", "onClick"], ma = {
|
|
1067
1164
|
key: 2,
|
|
1068
1165
|
class: "vf-autocomplete__empty"
|
|
1069
|
-
},
|
|
1166
|
+
}, ol = /* @__PURE__ */ j({
|
|
1070
1167
|
__name: "autocomplete",
|
|
1071
1168
|
props: {
|
|
1072
1169
|
modelValue: { default: void 0 },
|
|
@@ -1088,137 +1185,137 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1088
1185
|
let r = 0;
|
|
1089
1186
|
const t = e, o = a, d = K(null), n = K(null), c = K(null), l = K(!1), u = K(""), i = K(-1), s = K("bottom"), f = K("bottom"), p = `vf-autocomplete-panel-${++r}`;
|
|
1090
1187
|
let v = null;
|
|
1091
|
-
const w = m(() => o.options.map((
|
|
1092
|
-
label:
|
|
1093
|
-
value:
|
|
1094
|
-
disabled:
|
|
1095
|
-
}))), k = m(() => w.value.find((
|
|
1188
|
+
const w = m(() => o.options.map((x) => ({
|
|
1189
|
+
label: x[o.optionLabel],
|
|
1190
|
+
value: x[o.optionValue],
|
|
1191
|
+
disabled: x.disabled
|
|
1192
|
+
}))), k = m(() => w.value.find((x) => x.value === o.modelValue)), B = m(() => {
|
|
1096
1193
|
if (!o.filter)
|
|
1097
1194
|
return w.value;
|
|
1098
|
-
const
|
|
1099
|
-
return
|
|
1195
|
+
const x = u.value.trim().toLowerCase();
|
|
1196
|
+
return x ? w.value.filter((N) => N.label.toLowerCase().includes(x)) : w.value;
|
|
1100
1197
|
}), A = m(() => {
|
|
1101
1198
|
if (!(!l.value || i.value < 0))
|
|
1102
|
-
return
|
|
1103
|
-
}),
|
|
1104
|
-
const
|
|
1105
|
-
return o.size !== "normal" &&
|
|
1106
|
-
}),
|
|
1107
|
-
const
|
|
1108
|
-
if (!
|
|
1199
|
+
return E(i.value);
|
|
1200
|
+
}), $ = m(() => {
|
|
1201
|
+
const x = ["vf-autocomplete", `vf-autocomplete_${o.variant}`, l.value ? "vf-autocomplete_open" : ""];
|
|
1202
|
+
return o.size !== "normal" && x.push(`vf-autocomplete_${o.size}`), o.disabled && x.push("vf-autocomplete_disabled"), x.filter(Boolean);
|
|
1203
|
+
}), E = (x) => `${p}-option-${x}`, M = (x) => x.value === o.modelValue, D = () => B.value.findIndex((x) => !x.disabled), G = (x) => {
|
|
1204
|
+
const N = B.value;
|
|
1205
|
+
if (!N.length) {
|
|
1109
1206
|
i.value = -1;
|
|
1110
1207
|
return;
|
|
1111
1208
|
}
|
|
1112
1209
|
let Y = i.value;
|
|
1113
|
-
(Y < 0 || Y >=
|
|
1114
|
-
for (let J = 0; J <
|
|
1115
|
-
if (Y = (Y +
|
|
1210
|
+
(Y < 0 || Y >= N.length) && (Y = x > 0 ? -1 : N.length);
|
|
1211
|
+
for (let J = 0; J < N.length; J += 1)
|
|
1212
|
+
if (Y = (Y + x + N.length) % N.length, !N[Y].disabled) {
|
|
1116
1213
|
i.value = Y;
|
|
1117
1214
|
return;
|
|
1118
1215
|
}
|
|
1119
1216
|
i.value = -1;
|
|
1120
|
-
},
|
|
1121
|
-
o.disabled || (l.value = !0, s.value = "bottom", f.value = "bottom", i.value < 0 && (i.value =
|
|
1122
|
-
},
|
|
1217
|
+
}, T = () => {
|
|
1218
|
+
o.disabled || (l.value = !0, s.value = "bottom", f.value = "bottom", i.value < 0 && (i.value = D()));
|
|
1219
|
+
}, g = () => {
|
|
1123
1220
|
l.value = !1, i.value = -1, s.value = "bottom", f.value = "bottom";
|
|
1124
1221
|
}, C = () => {
|
|
1125
1222
|
if (l.value) {
|
|
1126
|
-
|
|
1223
|
+
g();
|
|
1127
1224
|
return;
|
|
1128
1225
|
}
|
|
1129
|
-
|
|
1130
|
-
},
|
|
1131
|
-
|
|
1132
|
-
}, R = (
|
|
1133
|
-
const
|
|
1134
|
-
u.value =
|
|
1135
|
-
},
|
|
1136
|
-
t("focus",
|
|
1137
|
-
}, q = (
|
|
1138
|
-
t("blur",
|
|
1226
|
+
T();
|
|
1227
|
+
}, y = (x) => {
|
|
1228
|
+
x.disabled || (u.value = x.label, t("update:modelValue", x.value), t("change", x.value), g());
|
|
1229
|
+
}, R = (x) => {
|
|
1230
|
+
const N = x.target;
|
|
1231
|
+
u.value = N.value, t("search", N.value), T(), i.value = D();
|
|
1232
|
+
}, H = (x) => {
|
|
1233
|
+
t("focus", x), T();
|
|
1234
|
+
}, q = (x) => {
|
|
1235
|
+
t("blur", x);
|
|
1139
1236
|
}, ee = () => {
|
|
1140
1237
|
if (!l.value) {
|
|
1141
|
-
|
|
1238
|
+
T();
|
|
1142
1239
|
return;
|
|
1143
1240
|
}
|
|
1144
|
-
|
|
1241
|
+
G(1);
|
|
1145
1242
|
}, X = () => {
|
|
1146
1243
|
if (!l.value) {
|
|
1147
|
-
|
|
1244
|
+
T();
|
|
1148
1245
|
return;
|
|
1149
1246
|
}
|
|
1150
|
-
|
|
1247
|
+
G(-1);
|
|
1151
1248
|
}, le = () => {
|
|
1152
1249
|
if (!l.value) {
|
|
1153
|
-
|
|
1250
|
+
T();
|
|
1154
1251
|
return;
|
|
1155
1252
|
}
|
|
1156
|
-
const
|
|
1157
|
-
|
|
1158
|
-
},
|
|
1253
|
+
const x = B.value[i.value];
|
|
1254
|
+
x && !x.disabled && y(x);
|
|
1255
|
+
}, V = (x) => {
|
|
1159
1256
|
var Y;
|
|
1160
1257
|
if (!l.value || !d.value)
|
|
1161
1258
|
return;
|
|
1162
|
-
const
|
|
1163
|
-
d.value.contains(
|
|
1164
|
-
},
|
|
1259
|
+
const N = x.target;
|
|
1260
|
+
d.value.contains(N) || (Y = c.value) != null && Y.contains(N) || g();
|
|
1261
|
+
}, W = () => {
|
|
1165
1262
|
if (!n.value || !c.value)
|
|
1166
1263
|
return;
|
|
1167
|
-
const
|
|
1264
|
+
const x = n.value, N = c.value, Y = async () => {
|
|
1168
1265
|
const {
|
|
1169
1266
|
x: P,
|
|
1170
1267
|
y: Z,
|
|
1171
1268
|
placement: ne
|
|
1172
|
-
} = await Re(
|
|
1269
|
+
} = await Re(x, N, {
|
|
1173
1270
|
placement: s.value,
|
|
1174
1271
|
strategy: "fixed",
|
|
1175
1272
|
middleware: [Le(2), Ve({ placements: ["bottom", "top"] })]
|
|
1176
1273
|
});
|
|
1177
|
-
f.value = ne ?? s.value,
|
|
1274
|
+
f.value = ne ?? s.value, N.style.minWidth = `${x.getBoundingClientRect().width}px`, N.style.left = `${P}px`, N.style.top = `${Z}px`;
|
|
1178
1275
|
}, J = async () => {
|
|
1179
1276
|
await Y();
|
|
1180
|
-
},
|
|
1277
|
+
}, _ = Te(x, () => {
|
|
1181
1278
|
J();
|
|
1182
|
-
}),
|
|
1279
|
+
}), S = () => {
|
|
1183
1280
|
J();
|
|
1184
1281
|
};
|
|
1185
|
-
document.addEventListener("scroll",
|
|
1282
|
+
document.addEventListener("scroll", S, !0), window.addEventListener("resize", S, !1), v = {
|
|
1186
1283
|
update: J,
|
|
1187
1284
|
destroy: () => {
|
|
1188
|
-
|
|
1285
|
+
_(), document.removeEventListener("scroll", S, !0), window.removeEventListener("resize", S, !1);
|
|
1189
1286
|
}
|
|
1190
1287
|
}, v.update();
|
|
1191
1288
|
};
|
|
1192
1289
|
return oe(
|
|
1193
1290
|
() => o.modelValue,
|
|
1194
1291
|
() => {
|
|
1195
|
-
var
|
|
1196
|
-
u.value = ((
|
|
1292
|
+
var x;
|
|
1293
|
+
u.value = ((x = k.value) == null ? void 0 : x.label) ?? "";
|
|
1197
1294
|
},
|
|
1198
1295
|
{ immediate: !0 }
|
|
1199
1296
|
), oe(
|
|
1200
1297
|
() => o.options,
|
|
1201
1298
|
() => {
|
|
1202
|
-
var
|
|
1203
|
-
l.value || (u.value = ((
|
|
1299
|
+
var x;
|
|
1300
|
+
l.value || (u.value = ((x = k.value) == null ? void 0 : x.label) ?? ""), v == null || v.update();
|
|
1204
1301
|
},
|
|
1205
1302
|
{ deep: !0 }
|
|
1206
|
-
), oe(
|
|
1207
|
-
i.value >=
|
|
1208
|
-
}), oe(l, async (
|
|
1209
|
-
if (
|
|
1303
|
+
), oe(B, () => {
|
|
1304
|
+
i.value >= B.value.length && (i.value = D());
|
|
1305
|
+
}), oe(l, async (x) => {
|
|
1306
|
+
if (!x) {
|
|
1210
1307
|
v && (v.destroy(), v = null);
|
|
1211
1308
|
return;
|
|
1212
1309
|
}
|
|
1213
|
-
await ke(), v ||
|
|
1310
|
+
await ke(), v || W(), v == null || v.update();
|
|
1214
1311
|
}), Fe(() => {
|
|
1215
|
-
document.addEventListener("click",
|
|
1216
|
-
}),
|
|
1217
|
-
document.removeEventListener("click",
|
|
1218
|
-
}), (
|
|
1312
|
+
document.addEventListener("click", V);
|
|
1313
|
+
}), we(() => {
|
|
1314
|
+
document.removeEventListener("click", V), v == null || v.destroy(), v = null;
|
|
1315
|
+
}), (x, N) => (b(), h("div", {
|
|
1219
1316
|
ref_key: "root",
|
|
1220
1317
|
ref: d,
|
|
1221
|
-
class: I(
|
|
1318
|
+
class: I($.value)
|
|
1222
1319
|
}, [
|
|
1223
1320
|
z("input", {
|
|
1224
1321
|
ref_key: "control",
|
|
@@ -1227,36 +1324,36 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1227
1324
|
type: "text",
|
|
1228
1325
|
role: "combobox",
|
|
1229
1326
|
value: u.value,
|
|
1230
|
-
placeholder:
|
|
1231
|
-
disabled:
|
|
1232
|
-
readonly:
|
|
1327
|
+
placeholder: x.placeholder,
|
|
1328
|
+
disabled: x.disabled,
|
|
1329
|
+
readonly: x.readonly,
|
|
1233
1330
|
"aria-expanded": l.value,
|
|
1234
1331
|
"aria-autocomplete": "list",
|
|
1235
1332
|
"aria-controls": p,
|
|
1236
1333
|
"aria-activedescendant": A.value,
|
|
1237
1334
|
onInput: R,
|
|
1238
|
-
onFocus:
|
|
1335
|
+
onFocus: H,
|
|
1239
1336
|
onBlur: q,
|
|
1240
|
-
onClick:
|
|
1337
|
+
onClick: T,
|
|
1241
1338
|
onKeydown: [
|
|
1242
1339
|
te(Q(ee, ["prevent"]), ["down"]),
|
|
1243
1340
|
te(Q(X, ["prevent"]), ["up"]),
|
|
1244
1341
|
te(Q(le, ["prevent"]), ["enter"]),
|
|
1245
|
-
te(Q(
|
|
1246
|
-
te(
|
|
1342
|
+
te(Q(g, ["prevent"]), ["esc"]),
|
|
1343
|
+
te(g, ["tab"])
|
|
1247
1344
|
]
|
|
1248
|
-
}, null, 40,
|
|
1345
|
+
}, null, 40, ca),
|
|
1249
1346
|
z("button", {
|
|
1250
1347
|
class: "vf-autocomplete__chevron",
|
|
1251
1348
|
type: "button",
|
|
1252
|
-
disabled:
|
|
1349
|
+
disabled: x.disabled,
|
|
1253
1350
|
"aria-hidden": "true",
|
|
1254
1351
|
tabindex: "-1",
|
|
1255
|
-
onMousedown:
|
|
1352
|
+
onMousedown: N[0] || (N[0] = Q(() => {
|
|
1256
1353
|
}, ["prevent"])),
|
|
1257
1354
|
onClick: C
|
|
1258
|
-
}, " ▾ ", 40,
|
|
1259
|
-
(
|
|
1355
|
+
}, " ▾ ", 40, va),
|
|
1356
|
+
(b(), se(xe, { to: "body" }, [
|
|
1260
1357
|
ue(z("div", {
|
|
1261
1358
|
id: p,
|
|
1262
1359
|
ref_key: "panel",
|
|
@@ -1265,42 +1362,42 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1265
1362
|
role: "listbox",
|
|
1266
1363
|
"data-placement": f.value
|
|
1267
1364
|
}, [
|
|
1268
|
-
|
|
1269
|
-
id:
|
|
1365
|
+
x.loading ? (b(), h("div", pa, O(x.loadingText), 1)) : B.value.length > 0 ? (b(!0), h(re, { key: 1 }, de(B.value, (Y, J) => (b(), h("button", {
|
|
1366
|
+
id: E(J),
|
|
1270
1367
|
key: Y.value,
|
|
1271
1368
|
class: I(["vf-autocomplete__option", {
|
|
1272
|
-
"is-active":
|
|
1369
|
+
"is-active": M(Y),
|
|
1273
1370
|
"is-disabled": Y.disabled,
|
|
1274
1371
|
"is-highlighted": J === i.value
|
|
1275
1372
|
}]),
|
|
1276
1373
|
type: "button",
|
|
1277
1374
|
role: "option",
|
|
1278
1375
|
disabled: Y.disabled,
|
|
1279
|
-
"aria-selected":
|
|
1280
|
-
onMousedown:
|
|
1376
|
+
"aria-selected": M(Y),
|
|
1377
|
+
onMousedown: N[1] || (N[1] = Q(() => {
|
|
1281
1378
|
}, ["prevent"])),
|
|
1282
|
-
onClick: (
|
|
1283
|
-
}, O(Y.label), 43,
|
|
1284
|
-
], 8,
|
|
1379
|
+
onClick: (_) => y(Y)
|
|
1380
|
+
}, O(Y.label), 43, ba))), 128)) : (b(), h("div", ma, O(x.emptyText), 1))
|
|
1381
|
+
], 8, fa), [
|
|
1285
1382
|
[ce, l.value]
|
|
1286
1383
|
])
|
|
1287
1384
|
]))
|
|
1288
1385
|
], 2));
|
|
1289
1386
|
}
|
|
1290
|
-
}),
|
|
1387
|
+
}), ga = ["disabled", "aria-expanded", "onKeydown"], ha = ["data-placement"], ya = {
|
|
1291
1388
|
key: 0,
|
|
1292
1389
|
class: "vf-multiselect__search"
|
|
1293
|
-
},
|
|
1390
|
+
}, _a = ["value", "placeholder", "onKeydown"], Ca = {
|
|
1294
1391
|
key: 1,
|
|
1295
1392
|
class: "vf-multiselect__loading"
|
|
1296
|
-
},
|
|
1393
|
+
}, ka = ["id", "disabled", "aria-selected", "onClick"], $a = { class: "vf-multiselect__option-label" }, wa = {
|
|
1297
1394
|
key: 0,
|
|
1298
1395
|
class: "vf-multiselect__option-check",
|
|
1299
1396
|
"aria-hidden": "true"
|
|
1300
|
-
},
|
|
1397
|
+
}, xa = {
|
|
1301
1398
|
key: 3,
|
|
1302
1399
|
class: "vf-multiselect__empty"
|
|
1303
|
-
},
|
|
1400
|
+
}, rl = /* @__PURE__ */ j({
|
|
1304
1401
|
__name: "multi-select",
|
|
1305
1402
|
props: {
|
|
1306
1403
|
modelValue: { default: () => [] },
|
|
@@ -1324,47 +1421,47 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1324
1421
|
let r = 0;
|
|
1325
1422
|
const t = e, o = a, d = K(null), n = K(null), c = K(null), l = K(null), u = K(!1), i = K(""), s = K(-1), f = K("bottom"), p = K("bottom"), v = `vf-multiselect-panel-${++r}`;
|
|
1326
1423
|
let w = null;
|
|
1327
|
-
const k = m(() => o.options.map((
|
|
1328
|
-
label:
|
|
1329
|
-
value:
|
|
1330
|
-
disabled:
|
|
1331
|
-
}))),
|
|
1424
|
+
const k = m(() => o.options.map((_) => ({
|
|
1425
|
+
label: _[o.optionLabel],
|
|
1426
|
+
value: _[o.optionValue],
|
|
1427
|
+
disabled: _.disabled
|
|
1428
|
+
}))), B = m(() => Array.isArray(o.modelValue) ? o.modelValue : []), A = m(() => {
|
|
1332
1429
|
if (!o.filter)
|
|
1333
1430
|
return k.value;
|
|
1334
|
-
const
|
|
1335
|
-
return
|
|
1336
|
-
}),
|
|
1337
|
-
const
|
|
1338
|
-
return o.size !== "normal" &&
|
|
1339
|
-
}),
|
|
1340
|
-
t("update:modelValue",
|
|
1341
|
-
}, C = (
|
|
1342
|
-
if (!(
|
|
1343
|
-
if (
|
|
1344
|
-
|
|
1431
|
+
const _ = i.value.trim().toLowerCase();
|
|
1432
|
+
return _ ? k.value.filter((S) => S.label.toLowerCase().includes(_)) : k.value;
|
|
1433
|
+
}), $ = m(() => k.value.filter((_) => B.value.includes(_.value))), E = m(() => $.value.length === 0 ? o.placeholder : $.value.map((_) => _.label).join(", ")), M = m(() => {
|
|
1434
|
+
const _ = ["vf-multiselect", `vf-multiselect_${o.variant}`, u.value ? "vf-multiselect_open" : ""];
|
|
1435
|
+
return o.size !== "normal" && _.push(`vf-multiselect_${o.size}`), o.disabled && _.push("vf-multiselect_disabled"), _.filter(Boolean);
|
|
1436
|
+
}), D = (_) => `${v}-option-${_}`, G = () => A.value.findIndex((_) => !_.disabled), T = (_) => B.value.includes(_.value), g = (_) => {
|
|
1437
|
+
t("update:modelValue", _), t("change", _);
|
|
1438
|
+
}, C = (_) => {
|
|
1439
|
+
if (!(_.disabled || o.readonly)) {
|
|
1440
|
+
if (T(_)) {
|
|
1441
|
+
g(B.value.filter((S) => S !== _.value));
|
|
1345
1442
|
return;
|
|
1346
1443
|
}
|
|
1347
|
-
|
|
1444
|
+
g([...B.value, _.value]);
|
|
1348
1445
|
}
|
|
1349
|
-
},
|
|
1350
|
-
o.readonly ||
|
|
1351
|
-
}, R = (
|
|
1352
|
-
const
|
|
1353
|
-
if (!
|
|
1446
|
+
}, y = () => {
|
|
1447
|
+
o.readonly || g([]);
|
|
1448
|
+
}, R = (_) => {
|
|
1449
|
+
const S = A.value;
|
|
1450
|
+
if (!S.length) {
|
|
1354
1451
|
s.value = -1;
|
|
1355
1452
|
return;
|
|
1356
1453
|
}
|
|
1357
1454
|
let P = s.value;
|
|
1358
|
-
(P < 0 || P >=
|
|
1359
|
-
for (let Z = 0; Z <
|
|
1360
|
-
if (P = (P +
|
|
1455
|
+
(P < 0 || P >= S.length) && (P = _ > 0 ? -1 : S.length);
|
|
1456
|
+
for (let Z = 0; Z < S.length; Z += 1)
|
|
1457
|
+
if (P = (P + _ + S.length) % S.length, !S[P].disabled) {
|
|
1361
1458
|
s.value = P;
|
|
1362
1459
|
return;
|
|
1363
1460
|
}
|
|
1364
1461
|
s.value = -1;
|
|
1365
|
-
},
|
|
1366
|
-
var
|
|
1367
|
-
o.disabled || (u.value = !0, f.value = "bottom", p.value = "bottom", s.value < 0 && (s.value =
|
|
1462
|
+
}, H = async () => {
|
|
1463
|
+
var _;
|
|
1464
|
+
o.disabled || (u.value = !0, f.value = "bottom", p.value = "bottom", s.value < 0 && (s.value = G()), o.filter && (await ke(), (_ = l.value) == null || _.focus()));
|
|
1368
1465
|
}, q = () => {
|
|
1369
1466
|
u.value = !1, s.value = -1, f.value = "bottom", p.value = "bottom", i.value = "";
|
|
1370
1467
|
}, ee = () => {
|
|
@@ -1372,52 +1469,52 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1372
1469
|
q();
|
|
1373
1470
|
return;
|
|
1374
1471
|
}
|
|
1375
|
-
|
|
1472
|
+
H();
|
|
1376
1473
|
}, X = () => {
|
|
1377
1474
|
if (!u.value) {
|
|
1378
|
-
|
|
1475
|
+
H();
|
|
1379
1476
|
return;
|
|
1380
1477
|
}
|
|
1381
1478
|
R(1);
|
|
1382
1479
|
}, le = () => {
|
|
1383
1480
|
if (!u.value) {
|
|
1384
|
-
|
|
1481
|
+
H();
|
|
1385
1482
|
return;
|
|
1386
1483
|
}
|
|
1387
1484
|
R(-1);
|
|
1388
|
-
},
|
|
1485
|
+
}, V = () => {
|
|
1389
1486
|
if (!u.value) {
|
|
1390
|
-
|
|
1487
|
+
H();
|
|
1391
1488
|
return;
|
|
1392
1489
|
}
|
|
1393
|
-
const
|
|
1394
|
-
|
|
1395
|
-
},
|
|
1396
|
-
const
|
|
1397
|
-
i.value =
|
|
1398
|
-
},
|
|
1490
|
+
const _ = A.value[s.value];
|
|
1491
|
+
_ && !_.disabled && C(_);
|
|
1492
|
+
}, W = (_) => {
|
|
1493
|
+
const S = _.target;
|
|
1494
|
+
i.value = S.value, t("search", S.value), s.value = G();
|
|
1495
|
+
}, x = (_) => t("focus", _), N = (_) => t("blur", _), Y = (_) => {
|
|
1399
1496
|
var P;
|
|
1400
1497
|
if (!u.value || !d.value)
|
|
1401
1498
|
return;
|
|
1402
|
-
const
|
|
1403
|
-
d.value.contains(
|
|
1499
|
+
const S = _.target;
|
|
1500
|
+
d.value.contains(S) || (P = c.value) != null && P.contains(S) || q();
|
|
1404
1501
|
}, J = () => {
|
|
1405
1502
|
if (!n.value || !c.value)
|
|
1406
1503
|
return;
|
|
1407
|
-
const
|
|
1504
|
+
const _ = n.value, S = c.value, P = async () => {
|
|
1408
1505
|
const {
|
|
1409
1506
|
x: Ce,
|
|
1410
1507
|
y: Ae,
|
|
1411
1508
|
placement: We
|
|
1412
|
-
} = await Re(
|
|
1509
|
+
} = await Re(_, S, {
|
|
1413
1510
|
placement: f.value,
|
|
1414
1511
|
strategy: "fixed",
|
|
1415
1512
|
middleware: [Le(2), Ve({ placements: ["bottom", "top"] })]
|
|
1416
1513
|
});
|
|
1417
|
-
p.value = We ?? f.value,
|
|
1514
|
+
p.value = We ?? f.value, S.style.minWidth = `${_.getBoundingClientRect().width}px`, S.style.left = `${Ce}px`, S.style.top = `${Ae}px`;
|
|
1418
1515
|
}, Z = async () => {
|
|
1419
1516
|
await P();
|
|
1420
|
-
}, ne = Te(
|
|
1517
|
+
}, ne = Te(_, () => {
|
|
1421
1518
|
Z();
|
|
1422
1519
|
}), ae = () => {
|
|
1423
1520
|
Z();
|
|
@@ -1432,32 +1529,32 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1432
1529
|
return oe(
|
|
1433
1530
|
() => o.options,
|
|
1434
1531
|
() => {
|
|
1435
|
-
s.value >= A.value.length && (s.value =
|
|
1532
|
+
s.value >= A.value.length && (s.value = G()), w == null || w.update();
|
|
1436
1533
|
},
|
|
1437
1534
|
{ deep: !0 }
|
|
1438
|
-
), oe(u, async (
|
|
1439
|
-
if (!
|
|
1535
|
+
), oe(u, async (_) => {
|
|
1536
|
+
if (!_) {
|
|
1440
1537
|
w && (w.destroy(), w = null);
|
|
1441
1538
|
return;
|
|
1442
1539
|
}
|
|
1443
1540
|
await ke(), w || J(), w == null || w.update();
|
|
1444
1541
|
}), oe(A, () => {
|
|
1445
|
-
s.value >= A.value.length && (s.value =
|
|
1542
|
+
s.value >= A.value.length && (s.value = G());
|
|
1446
1543
|
}), Fe(() => {
|
|
1447
1544
|
document.addEventListener("click", Y);
|
|
1448
|
-
}),
|
|
1545
|
+
}), we(() => {
|
|
1449
1546
|
document.removeEventListener("click", Y), w == null || w.destroy(), w = null;
|
|
1450
|
-
}), (
|
|
1547
|
+
}), (_, S) => (b(), h("div", {
|
|
1451
1548
|
ref_key: "root",
|
|
1452
1549
|
ref: d,
|
|
1453
|
-
class: I(
|
|
1550
|
+
class: I(M.value)
|
|
1454
1551
|
}, [
|
|
1455
1552
|
z("button", {
|
|
1456
1553
|
ref_key: "trigger",
|
|
1457
1554
|
ref: n,
|
|
1458
1555
|
class: "vf-multiselect__control",
|
|
1459
1556
|
type: "button",
|
|
1460
|
-
disabled:
|
|
1557
|
+
disabled: _.disabled,
|
|
1461
1558
|
"aria-expanded": u.value,
|
|
1462
1559
|
"aria-controls": v,
|
|
1463
1560
|
"aria-haspopup": "listbox",
|
|
@@ -1465,28 +1562,28 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1465
1562
|
onKeydown: [
|
|
1466
1563
|
te(Q(X, ["prevent"]), ["down"]),
|
|
1467
1564
|
te(Q(le, ["prevent"]), ["up"]),
|
|
1468
|
-
te(Q(
|
|
1565
|
+
te(Q(V, ["prevent"]), ["enter"]),
|
|
1469
1566
|
te(Q(q, ["prevent"]), ["esc"])
|
|
1470
1567
|
],
|
|
1471
|
-
onFocus:
|
|
1472
|
-
onBlur:
|
|
1568
|
+
onFocus: x,
|
|
1569
|
+
onBlur: N
|
|
1473
1570
|
}, [
|
|
1474
1571
|
z("span", {
|
|
1475
|
-
class: I(["vf-multiselect__label", { "vf-multiselect__label_placeholder":
|
|
1476
|
-
}, O(
|
|
1477
|
-
|
|
1572
|
+
class: I(["vf-multiselect__label", { "vf-multiselect__label_placeholder": B.value.length === 0 }])
|
|
1573
|
+
}, O(E.value), 3),
|
|
1574
|
+
S[0] || (S[0] = z("span", {
|
|
1478
1575
|
class: "vf-multiselect__chevron",
|
|
1479
1576
|
"aria-hidden": "true"
|
|
1480
1577
|
}, "▾", -1))
|
|
1481
|
-
], 40,
|
|
1482
|
-
|
|
1578
|
+
], 40, ga),
|
|
1579
|
+
_.clearable && B.value.length > 0 && !_.disabled && !_.readonly ? (b(), h("button", {
|
|
1483
1580
|
key: 0,
|
|
1484
1581
|
class: "vf-multiselect__clear",
|
|
1485
1582
|
type: "button",
|
|
1486
1583
|
"aria-label": "Clear selection",
|
|
1487
|
-
onClick: Q(
|
|
1488
|
-
}, " ✕ ")) :
|
|
1489
|
-
(
|
|
1584
|
+
onClick: Q(y, ["stop"])
|
|
1585
|
+
}, " ✕ ")) : L("", !0),
|
|
1586
|
+
(b(), se(xe, { to: "body" }, [
|
|
1490
1587
|
ue(z("div", {
|
|
1491
1588
|
id: v,
|
|
1492
1589
|
ref_key: "panel",
|
|
@@ -1496,53 +1593,53 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1496
1593
|
"aria-multiselectable": "true",
|
|
1497
1594
|
"data-placement": p.value
|
|
1498
1595
|
}, [
|
|
1499
|
-
|
|
1596
|
+
_.filter ? (b(), h("div", ya, [
|
|
1500
1597
|
z("input", {
|
|
1501
1598
|
ref_key: "searchInput",
|
|
1502
1599
|
ref: l,
|
|
1503
1600
|
class: "vf-multiselect__search-control",
|
|
1504
1601
|
type: "text",
|
|
1505
1602
|
value: i.value,
|
|
1506
|
-
placeholder:
|
|
1507
|
-
onInput:
|
|
1603
|
+
placeholder: _.searchPlaceholder,
|
|
1604
|
+
onInput: W,
|
|
1508
1605
|
onKeydown: [
|
|
1509
1606
|
te(Q(X, ["prevent"]), ["down"]),
|
|
1510
1607
|
te(Q(le, ["prevent"]), ["up"]),
|
|
1511
|
-
te(Q(
|
|
1608
|
+
te(Q(V, ["prevent"]), ["enter"]),
|
|
1512
1609
|
te(Q(q, ["prevent"]), ["esc"])
|
|
1513
1610
|
]
|
|
1514
|
-
}, null, 40,
|
|
1515
|
-
])) :
|
|
1516
|
-
|
|
1517
|
-
id:
|
|
1611
|
+
}, null, 40, _a)
|
|
1612
|
+
])) : L("", !0),
|
|
1613
|
+
_.loading ? (b(), h("div", Ca, O(_.loadingText), 1)) : A.value.length > 0 ? (b(!0), h(re, { key: 2 }, de(A.value, (P, Z) => (b(), h("button", {
|
|
1614
|
+
id: D(Z),
|
|
1518
1615
|
key: P.value,
|
|
1519
1616
|
class: I(["vf-multiselect__option", {
|
|
1520
|
-
"is-active":
|
|
1617
|
+
"is-active": T(P),
|
|
1521
1618
|
"is-disabled": P.disabled,
|
|
1522
1619
|
"is-highlighted": Z === s.value
|
|
1523
1620
|
}]),
|
|
1524
1621
|
type: "button",
|
|
1525
1622
|
role: "option",
|
|
1526
1623
|
disabled: P.disabled,
|
|
1527
|
-
"aria-selected":
|
|
1624
|
+
"aria-selected": T(P),
|
|
1528
1625
|
onClick: (ne) => C(P)
|
|
1529
1626
|
}, [
|
|
1530
|
-
z("span",
|
|
1531
|
-
|
|
1532
|
-
], 10,
|
|
1533
|
-
], 8,
|
|
1627
|
+
z("span", $a, O(P.label), 1),
|
|
1628
|
+
T(P) ? (b(), h("span", wa, "✓")) : L("", !0)
|
|
1629
|
+
], 10, ka))), 128)) : (b(), h("div", xa, O(_.emptyText), 1))
|
|
1630
|
+
], 8, ha), [
|
|
1534
1631
|
[ce, u.value]
|
|
1535
1632
|
])
|
|
1536
1633
|
]))
|
|
1537
1634
|
], 2));
|
|
1538
1635
|
}
|
|
1539
|
-
}),
|
|
1636
|
+
}), za = ["disabled", "aria-expanded", "onKeydown"], Ba = ["data-placement", "onKeydown"], Sa = { class: "vf-datepicker__header" }, Fa = { class: "vf-datepicker__month-label" }, Va = {
|
|
1540
1637
|
class: "vf-datepicker__weekdays",
|
|
1541
1638
|
role: "row"
|
|
1542
|
-
},
|
|
1639
|
+
}, La = {
|
|
1543
1640
|
class: "vf-datepicker__days",
|
|
1544
1641
|
role: "grid"
|
|
1545
|
-
},
|
|
1642
|
+
}, Ta = ["disabled", "data-date", "onClick"], ll = /* @__PURE__ */ j({
|
|
1546
1643
|
__name: "datepicker",
|
|
1547
1644
|
props: {
|
|
1548
1645
|
modelValue: { default: void 0 },
|
|
@@ -1559,25 +1656,25 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1559
1656
|
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
1560
1657
|
setup(a, { emit: e }) {
|
|
1561
1658
|
let r = 0;
|
|
1562
|
-
const t = e, o = a, d = K(null), n = K(null), c = K(null), l = K(!1), u = K("bottom"), i = K("bottom"), s = `vf-datepicker-panel-${++r}`, f = K(
|
|
1659
|
+
const t = e, o = a, d = K(null), n = K(null), c = K(null), l = K(!1), u = K("bottom"), i = K("bottom"), s = `vf-datepicker-panel-${++r}`, f = K(V(X(o.modelValue) ?? /* @__PURE__ */ new Date()));
|
|
1563
1660
|
let p = null;
|
|
1564
|
-
const v = m(() => X(o.modelValue)), w = m(() => X(o.min)), k = m(() => X(o.max)),
|
|
1661
|
+
const v = m(() => X(o.modelValue)), w = m(() => X(o.min)), k = m(() => X(o.max)), B = m(() => v.value ? v.value.toLocaleDateString(o.locale, {
|
|
1565
1662
|
year: "numeric",
|
|
1566
1663
|
month: "short",
|
|
1567
1664
|
day: "numeric"
|
|
1568
1665
|
}) : ""), A = m(() => f.value.toLocaleDateString(o.locale, {
|
|
1569
1666
|
year: "numeric",
|
|
1570
1667
|
month: "long"
|
|
1571
|
-
})),
|
|
1572
|
-
const
|
|
1668
|
+
})), $ = m(() => {
|
|
1669
|
+
const _ = new Intl.DateTimeFormat(o.locale, { weekday: "short" }), S = new Date(2026, 0, 4);
|
|
1573
1670
|
return Array.from({ length: 7 }, (P, Z) => {
|
|
1574
|
-
const ne = (Z + o.firstDayOfWeek) % 7, ae = new Date(
|
|
1575
|
-
return ae.setDate(
|
|
1671
|
+
const ne = (Z + o.firstDayOfWeek) % 7, ae = new Date(S);
|
|
1672
|
+
return ae.setDate(S.getDate() + ne), _.format(ae);
|
|
1576
1673
|
});
|
|
1577
|
-
}),
|
|
1578
|
-
const
|
|
1674
|
+
}), E = m(() => {
|
|
1675
|
+
const _ = N(f.value, o.firstDayOfWeek), S = v.value ? Y(v.value) : null, P = Y(/* @__PURE__ */ new Date());
|
|
1579
1676
|
return Array.from({ length: 42 }, (Z, ne) => {
|
|
1580
|
-
const ae =
|
|
1677
|
+
const ae = x(_, ne), Ce = Y(ae);
|
|
1581
1678
|
return {
|
|
1582
1679
|
key: `${Ce}-${ne}`,
|
|
1583
1680
|
iso: Ce,
|
|
@@ -1585,55 +1682,55 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1585
1682
|
day: ae.getDate(),
|
|
1586
1683
|
inCurrentMonth: ae.getMonth() === f.value.getMonth(),
|
|
1587
1684
|
isDisabled: J(ae, w.value, k.value),
|
|
1588
|
-
isSelected:
|
|
1685
|
+
isSelected: S === Ce,
|
|
1589
1686
|
isToday: Ce === P
|
|
1590
1687
|
};
|
|
1591
1688
|
});
|
|
1592
|
-
}),
|
|
1593
|
-
const
|
|
1594
|
-
return o.size !== "normal" &&
|
|
1595
|
-
}),
|
|
1689
|
+
}), M = m(() => {
|
|
1690
|
+
const _ = ["vf-datepicker", `vf-datepicker_${o.variant}`, l.value ? "vf-datepicker_open" : ""];
|
|
1691
|
+
return o.size !== "normal" && _.push(`vf-datepicker_${o.size}`), o.disabled && _.push("vf-datepicker_disabled"), _.filter(Boolean);
|
|
1692
|
+
}), D = (_) => t("focus", _), G = (_) => t("blur", _), T = () => {
|
|
1596
1693
|
o.disabled || o.readonly || (l.value = !0, u.value = "bottom", i.value = "bottom");
|
|
1597
|
-
},
|
|
1694
|
+
}, g = () => {
|
|
1598
1695
|
l.value = !1, u.value = "bottom", i.value = "bottom";
|
|
1599
1696
|
}, C = () => {
|
|
1600
1697
|
if (l.value) {
|
|
1601
|
-
|
|
1698
|
+
g();
|
|
1602
1699
|
return;
|
|
1603
1700
|
}
|
|
1604
|
-
|
|
1605
|
-
},
|
|
1606
|
-
f.value =
|
|
1701
|
+
T();
|
|
1702
|
+
}, y = () => {
|
|
1703
|
+
f.value = W(f.value, -1);
|
|
1607
1704
|
}, R = () => {
|
|
1608
|
-
f.value =
|
|
1609
|
-
},
|
|
1610
|
-
if (o.readonly || J(
|
|
1705
|
+
f.value = W(f.value, 1);
|
|
1706
|
+
}, H = (_) => {
|
|
1707
|
+
if (o.readonly || J(_, w.value, k.value))
|
|
1611
1708
|
return;
|
|
1612
|
-
const
|
|
1613
|
-
t("update:modelValue",
|
|
1614
|
-
}, q = (
|
|
1709
|
+
const S = Y(_);
|
|
1710
|
+
t("update:modelValue", S), t("change", S), g();
|
|
1711
|
+
}, q = (_) => {
|
|
1615
1712
|
var P;
|
|
1616
1713
|
if (!l.value || !d.value)
|
|
1617
1714
|
return;
|
|
1618
|
-
const
|
|
1619
|
-
d.value.contains(
|
|
1715
|
+
const S = _.target;
|
|
1716
|
+
d.value.contains(S) || (P = c.value) != null && P.contains(S) || g();
|
|
1620
1717
|
}, ee = () => {
|
|
1621
1718
|
if (!n.value || !c.value)
|
|
1622
1719
|
return;
|
|
1623
|
-
const
|
|
1720
|
+
const _ = n.value, S = c.value, P = async () => {
|
|
1624
1721
|
const {
|
|
1625
1722
|
x: Ce,
|
|
1626
1723
|
y: Ae,
|
|
1627
1724
|
placement: We
|
|
1628
|
-
} = await Re(
|
|
1725
|
+
} = await Re(_, S, {
|
|
1629
1726
|
placement: u.value,
|
|
1630
1727
|
strategy: "fixed",
|
|
1631
1728
|
middleware: [Le(2), Ve({ placements: ["bottom", "top"] })]
|
|
1632
1729
|
});
|
|
1633
|
-
i.value = We ?? u.value,
|
|
1730
|
+
i.value = We ?? u.value, S.style.left = `${Ce}px`, S.style.top = `${Ae}px`;
|
|
1634
1731
|
}, Z = async () => {
|
|
1635
1732
|
await P();
|
|
1636
|
-
}, ne = Te(
|
|
1733
|
+
}, ne = Te(_, () => {
|
|
1637
1734
|
Z();
|
|
1638
1735
|
}), ae = () => {
|
|
1639
1736
|
Z();
|
|
@@ -1647,9 +1744,9 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1647
1744
|
};
|
|
1648
1745
|
oe(
|
|
1649
1746
|
() => o.modelValue,
|
|
1650
|
-
(
|
|
1651
|
-
const
|
|
1652
|
-
|
|
1747
|
+
(_) => {
|
|
1748
|
+
const S = X(_);
|
|
1749
|
+
S && (f.value = V(S));
|
|
1653
1750
|
},
|
|
1654
1751
|
{ immediate: !0 }
|
|
1655
1752
|
), oe(
|
|
@@ -1657,82 +1754,82 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1657
1754
|
() => {
|
|
1658
1755
|
p == null || p.update();
|
|
1659
1756
|
}
|
|
1660
|
-
), oe(l, async (
|
|
1661
|
-
if (!
|
|
1757
|
+
), oe(l, async (_) => {
|
|
1758
|
+
if (!_) {
|
|
1662
1759
|
p && (p.destroy(), p = null);
|
|
1663
1760
|
return;
|
|
1664
1761
|
}
|
|
1665
1762
|
await ke(), p || ee(), p == null || p.update();
|
|
1666
1763
|
}), Fe(() => {
|
|
1667
1764
|
document.addEventListener("click", q);
|
|
1668
|
-
}),
|
|
1765
|
+
}), we(() => {
|
|
1669
1766
|
document.removeEventListener("click", q), p == null || p.destroy(), p = null;
|
|
1670
1767
|
});
|
|
1671
|
-
function X(
|
|
1672
|
-
if (!
|
|
1768
|
+
function X(_) {
|
|
1769
|
+
if (!_)
|
|
1673
1770
|
return null;
|
|
1674
|
-
const
|
|
1675
|
-
if (!
|
|
1771
|
+
const S = _.match(/^(\d{4})-(\d{2})-(\d{2})$/);
|
|
1772
|
+
if (!S)
|
|
1676
1773
|
return null;
|
|
1677
|
-
const P = Number(
|
|
1774
|
+
const P = Number(S[1]), Z = Number(S[2]) - 1, ne = Number(S[3]), ae = new Date(P, Z, ne);
|
|
1678
1775
|
return ae.getFullYear() !== P || ae.getMonth() !== Z || ae.getDate() !== ne ? null : le(ae);
|
|
1679
1776
|
}
|
|
1680
|
-
function le(
|
|
1681
|
-
return new Date(
|
|
1777
|
+
function le(_) {
|
|
1778
|
+
return new Date(_.getFullYear(), _.getMonth(), _.getDate());
|
|
1682
1779
|
}
|
|
1683
|
-
function
|
|
1684
|
-
return new Date(
|
|
1780
|
+
function V(_) {
|
|
1781
|
+
return new Date(_.getFullYear(), _.getMonth(), 1);
|
|
1685
1782
|
}
|
|
1686
|
-
function
|
|
1687
|
-
return new Date(
|
|
1783
|
+
function W(_, S) {
|
|
1784
|
+
return new Date(_.getFullYear(), _.getMonth() + S, 1);
|
|
1688
1785
|
}
|
|
1689
|
-
function
|
|
1690
|
-
return new Date(
|
|
1786
|
+
function x(_, S) {
|
|
1787
|
+
return new Date(_.getFullYear(), _.getMonth(), _.getDate() + S);
|
|
1691
1788
|
}
|
|
1692
|
-
function
|
|
1693
|
-
const P =
|
|
1694
|
-
return
|
|
1789
|
+
function N(_, S) {
|
|
1790
|
+
const P = V(_), ne = (P.getDay() - S + 7) % 7;
|
|
1791
|
+
return x(P, -ne);
|
|
1695
1792
|
}
|
|
1696
|
-
function Y(
|
|
1697
|
-
const
|
|
1698
|
-
return `${
|
|
1793
|
+
function Y(_) {
|
|
1794
|
+
const S = _.getFullYear(), P = `${_.getMonth() + 1}`.padStart(2, "0"), Z = `${_.getDate()}`.padStart(2, "0");
|
|
1795
|
+
return `${S}-${P}-${Z}`;
|
|
1699
1796
|
}
|
|
1700
|
-
function J(
|
|
1701
|
-
const Z = le(
|
|
1702
|
-
return !!(
|
|
1797
|
+
function J(_, S, P) {
|
|
1798
|
+
const Z = le(_).getTime();
|
|
1799
|
+
return !!(S && Z < S.getTime() || P && Z > P.getTime());
|
|
1703
1800
|
}
|
|
1704
|
-
return (
|
|
1801
|
+
return (_, S) => (b(), h("div", {
|
|
1705
1802
|
ref_key: "root",
|
|
1706
1803
|
ref: d,
|
|
1707
|
-
class: I(
|
|
1804
|
+
class: I(M.value)
|
|
1708
1805
|
}, [
|
|
1709
1806
|
z("button", {
|
|
1710
1807
|
ref_key: "control",
|
|
1711
1808
|
ref: n,
|
|
1712
1809
|
class: "vf-datepicker__control",
|
|
1713
1810
|
type: "button",
|
|
1714
|
-
disabled:
|
|
1811
|
+
disabled: _.disabled,
|
|
1715
1812
|
"aria-expanded": l.value,
|
|
1716
1813
|
"aria-controls": s,
|
|
1717
1814
|
"aria-haspopup": "dialog",
|
|
1718
1815
|
onClick: C,
|
|
1719
1816
|
onKeydown: [
|
|
1720
|
-
te(Q(
|
|
1817
|
+
te(Q(T, ["prevent"]), ["down"]),
|
|
1721
1818
|
te(Q(C, ["prevent"]), ["enter"]),
|
|
1722
|
-
te(Q(
|
|
1819
|
+
te(Q(g, ["prevent"]), ["esc"])
|
|
1723
1820
|
],
|
|
1724
|
-
onFocus:
|
|
1725
|
-
onBlur:
|
|
1821
|
+
onFocus: D,
|
|
1822
|
+
onBlur: G
|
|
1726
1823
|
}, [
|
|
1727
1824
|
z("span", {
|
|
1728
1825
|
class: I(["vf-datepicker__label", { "vf-datepicker__label_placeholder": !v.value }])
|
|
1729
|
-
}, O(
|
|
1730
|
-
|
|
1826
|
+
}, O(B.value || _.placeholder), 3),
|
|
1827
|
+
S[0] || (S[0] = z("span", {
|
|
1731
1828
|
class: "vf-datepicker__chevron",
|
|
1732
1829
|
"aria-hidden": "true"
|
|
1733
1830
|
}, "▾", -1))
|
|
1734
|
-
], 40,
|
|
1735
|
-
(
|
|
1831
|
+
], 40, za),
|
|
1832
|
+
(b(), se(xe, { to: "body" }, [
|
|
1736
1833
|
ue(z("div", {
|
|
1737
1834
|
id: s,
|
|
1738
1835
|
ref_key: "panel",
|
|
@@ -1740,16 +1837,16 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1740
1837
|
class: "vf-datepicker__panel",
|
|
1741
1838
|
role: "dialog",
|
|
1742
1839
|
"data-placement": i.value,
|
|
1743
|
-
onKeydown: te(Q(
|
|
1840
|
+
onKeydown: te(Q(g, ["prevent"]), ["esc"])
|
|
1744
1841
|
}, [
|
|
1745
|
-
z("div",
|
|
1842
|
+
z("div", Sa, [
|
|
1746
1843
|
z("button", {
|
|
1747
1844
|
class: "vf-datepicker__nav",
|
|
1748
1845
|
type: "button",
|
|
1749
1846
|
"aria-label": "Previous month",
|
|
1750
|
-
onClick:
|
|
1847
|
+
onClick: y
|
|
1751
1848
|
}, " ‹ "),
|
|
1752
|
-
z("span",
|
|
1849
|
+
z("span", Fa, O(A.value), 1),
|
|
1753
1850
|
z("button", {
|
|
1754
1851
|
class: "vf-datepicker__nav",
|
|
1755
1852
|
type: "button",
|
|
@@ -1757,14 +1854,14 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1757
1854
|
onClick: R
|
|
1758
1855
|
}, " › ")
|
|
1759
1856
|
]),
|
|
1760
|
-
z("div",
|
|
1761
|
-
(
|
|
1857
|
+
z("div", Va, [
|
|
1858
|
+
(b(!0), h(re, null, de($.value, (P) => (b(), h("span", {
|
|
1762
1859
|
key: P,
|
|
1763
1860
|
class: "vf-datepicker__weekday"
|
|
1764
1861
|
}, O(P), 1))), 128))
|
|
1765
1862
|
]),
|
|
1766
|
-
z("div",
|
|
1767
|
-
(
|
|
1863
|
+
z("div", La, [
|
|
1864
|
+
(b(!0), h(re, null, de(E.value, (P) => (b(), h("button", {
|
|
1768
1865
|
key: P.key,
|
|
1769
1866
|
class: I(["vf-datepicker__day", {
|
|
1770
1867
|
"is-outside": !P.inCurrentMonth,
|
|
@@ -1774,16 +1871,16 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1774
1871
|
type: "button",
|
|
1775
1872
|
disabled: P.isDisabled,
|
|
1776
1873
|
"data-date": P.iso,
|
|
1777
|
-
onClick: (Z) =>
|
|
1778
|
-
}, O(P.day), 11,
|
|
1874
|
+
onClick: (Z) => H(P.date)
|
|
1875
|
+
}, O(P.day), 11, Ta))), 128))
|
|
1779
1876
|
])
|
|
1780
|
-
], 40,
|
|
1877
|
+
], 40, Ba), [
|
|
1781
1878
|
[ce, l.value]
|
|
1782
1879
|
])
|
|
1783
1880
|
]))
|
|
1784
1881
|
], 2));
|
|
1785
1882
|
}
|
|
1786
|
-
}),
|
|
1883
|
+
}), Ra = ["disabled"], Pa = ["disabled", "aria-current", "aria-label", "onClick"], Ia = ["disabled"], sl = /* @__PURE__ */ j({
|
|
1787
1884
|
__name: "pagination",
|
|
1788
1885
|
props: {
|
|
1789
1886
|
modelValue: { default: 1 },
|
|
@@ -1805,8 +1902,8 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1805
1902
|
if (w < v)
|
|
1806
1903
|
return [];
|
|
1807
1904
|
const k = [];
|
|
1808
|
-
for (let
|
|
1809
|
-
k.push(
|
|
1905
|
+
for (let B = v; B <= w; B += 1)
|
|
1906
|
+
k.push(B);
|
|
1810
1907
|
return k;
|
|
1811
1908
|
}, n = m(() => {
|
|
1812
1909
|
if (typeof r.totalPages == "number" && Number.isFinite(r.totalPages))
|
|
@@ -1814,19 +1911,19 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1814
1911
|
const v = Math.max(1, Math.floor(r.pageSize));
|
|
1815
1912
|
return Math.max(1, Math.ceil(Math.max(0, r.totalItems) / v));
|
|
1816
1913
|
}), c = m(() => o(Math.floor(r.modelValue), 1, n.value)), l = m(() => c.value <= 1), u = m(() => c.value >= n.value), i = m(() => r.disabled || n.value <= 1), s = m(() => {
|
|
1817
|
-
const v = n.value, w = c.value, k = Math.max(0, Math.floor(r.siblingCount)),
|
|
1914
|
+
const v = n.value, w = c.value, k = Math.max(0, Math.floor(r.siblingCount)), B = Math.max(0, Math.floor(r.boundaryCount)), A = k * 2 + B * 2 + 3, $ = [];
|
|
1818
1915
|
if (v <= A)
|
|
1819
|
-
return d(1, v).map((
|
|
1820
|
-
const
|
|
1821
|
-
for (const
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
for (const
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
for (const
|
|
1828
|
-
|
|
1829
|
-
return
|
|
1916
|
+
return d(1, v).map((T) => ({ key: `page-${T}`, type: "page", page: T }));
|
|
1917
|
+
const E = d(1, B), M = d(v - B + 1, v), D = Math.max(Math.min(w - k, v - B - k * 2 - 1), B + 2), G = Math.min(Math.max(w + k, B + k * 2 + 2), v - B - 1);
|
|
1918
|
+
for (const T of E)
|
|
1919
|
+
$.push({ key: `page-${T}`, type: "page", page: T });
|
|
1920
|
+
D > B + 2 ? $.push({ key: "ellipsis-start", type: "ellipsis", page: -1 }) : B + 1 <= v - B && $.push({ key: `page-${B + 1}`, type: "page", page: B + 1 });
|
|
1921
|
+
for (const T of d(D, G))
|
|
1922
|
+
$.push({ key: `page-${T}`, type: "page", page: T });
|
|
1923
|
+
G < v - B - 1 ? $.push({ key: "ellipsis-end", type: "ellipsis", page: -2 }) : v - B > B && $.push({ key: `page-${v - B}`, type: "page", page: v - B });
|
|
1924
|
+
for (const T of M)
|
|
1925
|
+
$.push({ key: `page-${T}`, type: "page", page: T });
|
|
1926
|
+
return $;
|
|
1830
1927
|
}), f = m(() => {
|
|
1831
1928
|
const v = ["vf-pagination", `vf-pagination_${r.variant}`];
|
|
1832
1929
|
return r.size !== "normal" && v.push(`vf-pagination_${r.size}`), r.disabled && v.push("vf-pagination_disabled"), v;
|
|
@@ -1836,7 +1933,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1836
1933
|
const k = o(v, 1, n.value);
|
|
1837
1934
|
k !== r.modelValue && (t("update:modelValue", k), t("change", k, w));
|
|
1838
1935
|
};
|
|
1839
|
-
return (v, w) => (
|
|
1936
|
+
return (v, w) => (b(), h("nav", {
|
|
1840
1937
|
class: I(f.value),
|
|
1841
1938
|
"aria-label": "Pagination"
|
|
1842
1939
|
}, [
|
|
@@ -1846,8 +1943,8 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1846
1943
|
disabled: i.value || l.value,
|
|
1847
1944
|
"aria-label": "Previous page",
|
|
1848
1945
|
onClick: w[0] || (w[0] = (k) => p(c.value - 1, k))
|
|
1849
|
-
}, O(v.prevLabel), 9,
|
|
1850
|
-
(
|
|
1946
|
+
}, O(v.prevLabel), 9, Ra),
|
|
1947
|
+
(b(!0), h(re, null, de(s.value, (k) => (b(), h("button", {
|
|
1851
1948
|
key: k.key,
|
|
1852
1949
|
class: I(["vf-pagination__item", {
|
|
1853
1950
|
"is-current": k.type === "page" && k.page === c.value,
|
|
@@ -1857,27 +1954,27 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1857
1954
|
disabled: i.value || k.type === "ellipsis",
|
|
1858
1955
|
"aria-current": k.type === "page" && k.page === c.value ? "page" : void 0,
|
|
1859
1956
|
"aria-label": k.type === "page" ? `Page ${k.page}` : void 0,
|
|
1860
|
-
onClick: (
|
|
1957
|
+
onClick: (B) => k.type === "page" && p(k.page, B)
|
|
1861
1958
|
}, [
|
|
1862
|
-
k.type === "page" ? (
|
|
1959
|
+
k.type === "page" ? (b(), h(re, { key: 0 }, [
|
|
1863
1960
|
U(O(k.page), 1)
|
|
1864
|
-
], 64)) : (
|
|
1961
|
+
], 64)) : (b(), h(re, { key: 1 }, [
|
|
1865
1962
|
U(O(v.ellipsisLabel), 1)
|
|
1866
1963
|
], 64))
|
|
1867
|
-
], 10,
|
|
1964
|
+
], 10, Pa))), 128)),
|
|
1868
1965
|
z("button", {
|
|
1869
1966
|
class: "vf-pagination__item vf-pagination__item_nav",
|
|
1870
1967
|
type: "button",
|
|
1871
1968
|
disabled: i.value || u.value,
|
|
1872
1969
|
"aria-label": "Next page",
|
|
1873
1970
|
onClick: w[1] || (w[1] = (k) => p(c.value + 1, k))
|
|
1874
|
-
}, O(v.nextLabel), 9,
|
|
1971
|
+
}, O(v.nextLabel), 9, Ia)
|
|
1875
1972
|
], 2));
|
|
1876
1973
|
}
|
|
1877
|
-
}),
|
|
1974
|
+
}), Oa = ["checked", "disabled"], Ma = {
|
|
1878
1975
|
key: 0,
|
|
1879
1976
|
class: "vf-checkbox__label"
|
|
1880
|
-
},
|
|
1977
|
+
}, nl = /* @__PURE__ */ j({
|
|
1881
1978
|
__name: "checkbox",
|
|
1882
1979
|
props: {
|
|
1883
1980
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -1894,7 +1991,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1894
1991
|
const c = n.target;
|
|
1895
1992
|
r("update:modelValue", c.checked), r("change", n);
|
|
1896
1993
|
};
|
|
1897
|
-
return (n, c) => (
|
|
1994
|
+
return (n, c) => (b(), h("label", {
|
|
1898
1995
|
class: I(o.value)
|
|
1899
1996
|
}, [
|
|
1900
1997
|
z("input", {
|
|
@@ -1903,25 +2000,25 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1903
2000
|
checked: n.modelValue,
|
|
1904
2001
|
disabled: n.disabled,
|
|
1905
2002
|
onChange: d
|
|
1906
|
-
}, null, 40,
|
|
2003
|
+
}, null, 40, Oa),
|
|
1907
2004
|
c[0] || (c[0] = z("span", { class: "vf-checkbox__box" }, null, -1)),
|
|
1908
|
-
n.label || n.$slots.default ? (
|
|
2005
|
+
n.label || n.$slots.default ? (b(), h("span", Ma, [
|
|
1909
2006
|
F(n.$slots, "default", {}, () => [
|
|
1910
2007
|
U(O(n.label), 1)
|
|
1911
2008
|
])
|
|
1912
|
-
])) :
|
|
2009
|
+
])) : L("", !0)
|
|
1913
2010
|
], 2));
|
|
1914
2011
|
}
|
|
1915
|
-
}), ot = Symbol("VueForgeRadioGroup"),
|
|
2012
|
+
}), ot = Symbol("VueForgeRadioGroup"), Da = ["aria-disabled", "aria-label", "aria-labelledby"], il = /* @__PURE__ */ j({
|
|
1916
2013
|
__name: "radio-group",
|
|
1917
2014
|
props: {
|
|
1918
2015
|
modelValue: { type: [String, Number, Boolean, null], default: void 0 },
|
|
1919
|
-
name: {},
|
|
2016
|
+
name: { default: "" },
|
|
1920
2017
|
disabled: { type: Boolean, default: !1 },
|
|
1921
2018
|
variant: { default: "filled" },
|
|
1922
2019
|
direction: { default: "vertical" },
|
|
1923
|
-
ariaLabel: {},
|
|
1924
|
-
ariaLabelledby: {}
|
|
2020
|
+
ariaLabel: { default: "" },
|
|
2021
|
+
ariaLabelledby: { default: "" }
|
|
1925
2022
|
},
|
|
1926
2023
|
emits: ["update:modelValue", "change"],
|
|
1927
2024
|
setup(a, { emit: e }) {
|
|
@@ -1937,7 +2034,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1937
2034
|
variant: m(() => t.variant),
|
|
1938
2035
|
onChange: d
|
|
1939
2036
|
};
|
|
1940
|
-
return
|
|
2037
|
+
return Ke(ot, n), (c, l) => (b(), h("div", {
|
|
1941
2038
|
class: I(o.value),
|
|
1942
2039
|
role: "radiogroup",
|
|
1943
2040
|
"aria-disabled": c.disabled || void 0,
|
|
@@ -1945,19 +2042,19 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1945
2042
|
"aria-labelledby": c.ariaLabelledby || void 0
|
|
1946
2043
|
}, [
|
|
1947
2044
|
F(c.$slots, "default")
|
|
1948
|
-
], 10,
|
|
2045
|
+
], 10, Da));
|
|
1949
2046
|
}
|
|
1950
|
-
}),
|
|
2047
|
+
}), Ea = ["name", "value", "checked", "disabled"], Aa = {
|
|
1951
2048
|
key: 0,
|
|
1952
2049
|
class: "vf-radio__label"
|
|
1953
|
-
},
|
|
2050
|
+
}, dl = /* @__PURE__ */ j({
|
|
1954
2051
|
__name: "radio-button",
|
|
1955
2052
|
props: {
|
|
1956
2053
|
modelValue: { type: [String, Number, Boolean, null], default: void 0 },
|
|
1957
2054
|
value: { type: [String, Number, Boolean, null], default: void 0 },
|
|
1958
2055
|
label: { default: "" },
|
|
1959
2056
|
disabled: { type: Boolean, default: !1 },
|
|
1960
|
-
name: {},
|
|
2057
|
+
name: { default: "" },
|
|
1961
2058
|
variant: { default: "filled" }
|
|
1962
2059
|
},
|
|
1963
2060
|
emits: ["update:modelValue", "change"],
|
|
@@ -1968,7 +2065,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1968
2065
|
}), s = (f) => {
|
|
1969
2066
|
l.value || (o ? o.onChange(t.value, f) : r("update:modelValue", t.value), r("change", t.value, f));
|
|
1970
2067
|
};
|
|
1971
|
-
return (f, p) => (
|
|
2068
|
+
return (f, p) => (b(), h("label", {
|
|
1972
2069
|
class: I(i.value)
|
|
1973
2070
|
}, [
|
|
1974
2071
|
z("input", {
|
|
@@ -1979,23 +2076,23 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1979
2076
|
checked: u.value,
|
|
1980
2077
|
disabled: l.value,
|
|
1981
2078
|
onChange: s
|
|
1982
|
-
}, null, 40,
|
|
2079
|
+
}, null, 40, Ea),
|
|
1983
2080
|
p[0] || (p[0] = z("span", { class: "vf-radio__circle" }, null, -1)),
|
|
1984
|
-
f.label || f.$slots.default ? (
|
|
2081
|
+
f.label || f.$slots.default ? (b(), h("span", Aa, [
|
|
1985
2082
|
F(f.$slots, "default", {}, () => [
|
|
1986
2083
|
U(O(f.label), 1)
|
|
1987
2084
|
])
|
|
1988
|
-
])) :
|
|
2085
|
+
])) : L("", !0)
|
|
1989
2086
|
], 2));
|
|
1990
2087
|
}
|
|
1991
|
-
}), Ye = Symbol("VueForgeTabs"),
|
|
2088
|
+
}), Ye = Symbol("VueForgeTabs"), Wa = ["aria-orientation", "aria-label", "aria-labelledby"], Ha = { class: "vf-tabs__panels" }, ul = /* @__PURE__ */ j({
|
|
1992
2089
|
__name: "tabs",
|
|
1993
2090
|
props: {
|
|
1994
2091
|
modelValue: { default: void 0 },
|
|
1995
2092
|
disabled: { type: Boolean, default: !1 },
|
|
1996
2093
|
orientation: { default: "horizontal" },
|
|
1997
|
-
ariaLabel: {},
|
|
1998
|
-
ariaLabelledby: {}
|
|
2094
|
+
ariaLabel: { default: "" },
|
|
2095
|
+
ariaLabelledby: { default: "" }
|
|
1999
2096
|
},
|
|
2000
2097
|
emits: ["update:modelValue", "change"],
|
|
2001
2098
|
setup(a, { emit: e }) {
|
|
@@ -2008,15 +2105,15 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2008
2105
|
}, s = (v) => {
|
|
2009
2106
|
if (o.disabled)
|
|
2010
2107
|
return;
|
|
2011
|
-
const w = o.orientation === "horizontal", k = v.key,
|
|
2012
|
-
if (![...
|
|
2108
|
+
const w = o.orientation === "horizontal", k = v.key, B = w ? ["ArrowRight"] : ["ArrowDown"], A = w ? ["ArrowLeft"] : ["ArrowUp"];
|
|
2109
|
+
if (![...B, ...A, "Home", "End"].includes(k))
|
|
2013
2110
|
return;
|
|
2014
|
-
const
|
|
2015
|
-
if (
|
|
2111
|
+
const $ = u();
|
|
2112
|
+
if (!$.length)
|
|
2016
2113
|
return;
|
|
2017
|
-
const
|
|
2018
|
-
let
|
|
2019
|
-
|
|
2114
|
+
const E = $.findIndex((T) => T.getAttribute("aria-selected") === "true"), M = $.findIndex((T) => T === document.activeElement), D = M >= 0 ? M : Math.max(E, 0);
|
|
2115
|
+
let G = D;
|
|
2116
|
+
B.includes(k) ? G = (D + 1) % $.length : A.includes(k) ? G = (D - 1 + $.length) % $.length : k === "Home" ? G = 0 : k === "End" && (G = $.length - 1), v.preventDefault(), i($[G]);
|
|
2020
2117
|
}, f = (v, w) => {
|
|
2021
2118
|
t("update:modelValue", v), t("change", v, w);
|
|
2022
2119
|
}, p = {
|
|
@@ -2027,7 +2124,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2027
2124
|
getTabId: (v) => `vf-tab-${d}-${n(v)}`,
|
|
2028
2125
|
getPanelId: (v) => `vf-tabpanel-${d}-${n(v)}`
|
|
2029
2126
|
};
|
|
2030
|
-
return
|
|
2127
|
+
return Ke(Ye, p), (v, w) => (b(), h("div", {
|
|
2031
2128
|
class: I(c.value)
|
|
2032
2129
|
}, [
|
|
2033
2130
|
z("div", {
|
|
@@ -2041,13 +2138,13 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2041
2138
|
onKeydown: s
|
|
2042
2139
|
}, [
|
|
2043
2140
|
F(v.$slots, "tabs")
|
|
2044
|
-
], 40,
|
|
2045
|
-
z("div",
|
|
2141
|
+
], 40, Wa),
|
|
2142
|
+
z("div", Ha, [
|
|
2046
2143
|
F(v.$slots, "panels")
|
|
2047
2144
|
])
|
|
2048
2145
|
], 2));
|
|
2049
2146
|
}
|
|
2050
|
-
}),
|
|
2147
|
+
}), Na = ["id", "aria-selected", "aria-controls", "disabled", "tabindex"], cl = /* @__PURE__ */ j({
|
|
2051
2148
|
__name: "tab",
|
|
2052
2149
|
props: {
|
|
2053
2150
|
value: {},
|
|
@@ -2059,7 +2156,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2059
2156
|
const r = e, t = a, o = Ee(Ye, null), d = m(() => (o == null ? void 0 : o.activeValue.value) === t.value), n = m(() => ((o == null ? void 0 : o.disabled.value) ?? !1) || t.disabled), c = m(() => o ? o.getTabId(t.value) : void 0), l = m(() => o ? o.getPanelId(t.value) : void 0), u = m(() => n.value ? -1 : d.value ? 0 : -1), i = (s) => {
|
|
2060
2157
|
!o || n.value || (o.onChange(t.value, s), r("change", t.value, s));
|
|
2061
2158
|
};
|
|
2062
|
-
return (s, f) => (
|
|
2159
|
+
return (s, f) => (b(), h("button", {
|
|
2063
2160
|
id: c.value,
|
|
2064
2161
|
class: I(["vf-tab", { "vf-tab_active": d.value, "vf-tab_disabled": n.value }]),
|
|
2065
2162
|
type: "button",
|
|
@@ -2073,16 +2170,16 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2073
2170
|
F(s.$slots, "default", {}, () => [
|
|
2074
2171
|
U(O(s.label), 1)
|
|
2075
2172
|
])
|
|
2076
|
-
], 10,
|
|
2173
|
+
], 10, Na));
|
|
2077
2174
|
}
|
|
2078
|
-
}),
|
|
2175
|
+
}), Ka = ["id", "aria-labelledby"], vl = /* @__PURE__ */ j({
|
|
2079
2176
|
__name: "tab-panel",
|
|
2080
2177
|
props: {
|
|
2081
2178
|
value: {}
|
|
2082
2179
|
},
|
|
2083
2180
|
setup(a) {
|
|
2084
2181
|
const e = a, r = Ee(Ye, null), t = m(() => (r == null ? void 0 : r.activeValue.value) === e.value), o = m(() => r ? r.getTabId(e.value) : void 0), d = m(() => r ? r.getPanelId(e.value) : void 0);
|
|
2085
|
-
return (n, c) => ue((
|
|
2182
|
+
return (n, c) => ue((b(), h("div", {
|
|
2086
2183
|
id: d.value,
|
|
2087
2184
|
class: "vf-tab-panel",
|
|
2088
2185
|
role: "tabpanel",
|
|
@@ -2090,11 +2187,11 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2090
2187
|
"aria-labelledby": o.value
|
|
2091
2188
|
}, [
|
|
2092
2189
|
F(n.$slots, "default")
|
|
2093
|
-
], 8,
|
|
2190
|
+
], 8, Ka)), [
|
|
2094
2191
|
[ce, t.value]
|
|
2095
2192
|
]);
|
|
2096
2193
|
}
|
|
2097
|
-
}), rt = Symbol("VueForgeAccordion"),
|
|
2194
|
+
}), rt = Symbol("VueForgeAccordion"), Ga = ["aria-label", "aria-labelledby"], fl = /* @__PURE__ */ j({
|
|
2098
2195
|
__name: "accordion",
|
|
2099
2196
|
props: {
|
|
2100
2197
|
modelValue: { default: void 0 },
|
|
@@ -2102,8 +2199,8 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2102
2199
|
disabled: { type: Boolean, default: !1 },
|
|
2103
2200
|
variant: { default: "filled" },
|
|
2104
2201
|
size: { default: "normal" },
|
|
2105
|
-
ariaLabel: {},
|
|
2106
|
-
ariaLabelledby: {}
|
|
2202
|
+
ariaLabel: { default: "" },
|
|
2203
|
+
ariaLabelledby: { default: "" }
|
|
2107
2204
|
},
|
|
2108
2205
|
emits: ["update:modelValue", "change"],
|
|
2109
2206
|
setup(a, { emit: e }) {
|
|
@@ -2115,7 +2212,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2115
2212
|
if (o.disabled)
|
|
2116
2213
|
return;
|
|
2117
2214
|
if (o.multiple) {
|
|
2118
|
-
const v = l(o.modelValue), k = v.includes(s) ? v.filter((
|
|
2215
|
+
const v = l(o.modelValue), k = v.includes(s) ? v.filter((B) => B !== s) : [...v, s];
|
|
2119
2216
|
t("update:modelValue", k), t("change", k, f);
|
|
2120
2217
|
return;
|
|
2121
2218
|
}
|
|
@@ -2131,15 +2228,15 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2131
2228
|
getHeaderId: (s) => `vf-accordion-header-${d}-${n(s)}`,
|
|
2132
2229
|
getPanelId: (s) => `vf-accordion-panel-${d}-${n(s)}`
|
|
2133
2230
|
};
|
|
2134
|
-
return
|
|
2231
|
+
return Ke(rt, i), (s, f) => (b(), h("div", {
|
|
2135
2232
|
class: I(c.value),
|
|
2136
2233
|
"aria-label": s.ariaLabel || void 0,
|
|
2137
2234
|
"aria-labelledby": s.ariaLabelledby || void 0
|
|
2138
2235
|
}, [
|
|
2139
2236
|
F(s.$slots, "default")
|
|
2140
|
-
], 10,
|
|
2237
|
+
], 10, Ga));
|
|
2141
2238
|
}
|
|
2142
|
-
}),
|
|
2239
|
+
}), Ya = ["id", "disabled", "aria-expanded", "aria-controls"], ja = { class: "vf-accordion__title" }, Xa = ["id", "aria-labelledby", "aria-hidden"], qa = { class: "vf-accordion__panel-inner" }, pl = /* @__PURE__ */ j({
|
|
2143
2240
|
__name: "accordion-item",
|
|
2144
2241
|
props: {
|
|
2145
2242
|
value: {},
|
|
@@ -2159,7 +2256,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2159
2256
|
}), u = (i) => {
|
|
2160
2257
|
!r || o.value || r.onToggle(e.value, i);
|
|
2161
2258
|
};
|
|
2162
|
-
return (i, s) => (
|
|
2259
|
+
return (i, s) => (b(), h("div", {
|
|
2163
2260
|
class: I(l.value)
|
|
2164
2261
|
}, [
|
|
2165
2262
|
z("button", {
|
|
@@ -2171,7 +2268,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2171
2268
|
"aria-controls": n.value,
|
|
2172
2269
|
onClick: u
|
|
2173
2270
|
}, [
|
|
2174
|
-
z("span",
|
|
2271
|
+
z("span", ja, [
|
|
2175
2272
|
F(i.$slots, "title", {}, () => [
|
|
2176
2273
|
U(O(i.title), 1)
|
|
2177
2274
|
])
|
|
@@ -2180,8 +2277,8 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2180
2277
|
class: "vf-accordion__icon",
|
|
2181
2278
|
"aria-hidden": "true"
|
|
2182
2279
|
}, null, -1))
|
|
2183
|
-
], 8,
|
|
2184
|
-
c.value ? (
|
|
2280
|
+
], 8, Ya),
|
|
2281
|
+
c.value ? (b(), h("div", {
|
|
2185
2282
|
key: 0,
|
|
2186
2283
|
id: n.value,
|
|
2187
2284
|
class: I(["vf-accordion__panel", { "vf-accordion__panel_open": t.value }]),
|
|
@@ -2189,19 +2286,19 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2189
2286
|
"aria-labelledby": d.value,
|
|
2190
2287
|
"aria-hidden": t.value ? void 0 : "true"
|
|
2191
2288
|
}, [
|
|
2192
|
-
z("div",
|
|
2289
|
+
z("div", qa, [
|
|
2193
2290
|
F(i.$slots, "default")
|
|
2194
2291
|
])
|
|
2195
|
-
], 10,
|
|
2292
|
+
], 10, Xa)) : L("", !0)
|
|
2196
2293
|
], 2));
|
|
2197
2294
|
}
|
|
2198
|
-
}),
|
|
2295
|
+
}), Ua = ["data-severity"], Za = { class: "vf-toast__body" }, Ja = {
|
|
2199
2296
|
key: 0,
|
|
2200
2297
|
class: "vf-toast__title"
|
|
2201
|
-
},
|
|
2298
|
+
}, Qa = {
|
|
2202
2299
|
key: 1,
|
|
2203
2300
|
class: "vf-toast__message"
|
|
2204
|
-
},
|
|
2301
|
+
}, bl = /* @__PURE__ */ j({
|
|
2205
2302
|
__name: "toast",
|
|
2206
2303
|
props: {
|
|
2207
2304
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -2230,23 +2327,23 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2230
2327
|
l && r("open"), n();
|
|
2231
2328
|
},
|
|
2232
2329
|
{ immediate: !0 }
|
|
2233
|
-
),
|
|
2330
|
+
), we(() => {
|
|
2234
2331
|
d();
|
|
2235
|
-
}), (l, u) => ue((
|
|
2332
|
+
}), (l, u) => ue((b(), h("div", {
|
|
2236
2333
|
class: "vf-toast",
|
|
2237
2334
|
role: "status",
|
|
2238
2335
|
"aria-live": "polite",
|
|
2239
2336
|
"data-severity": l.severity
|
|
2240
2337
|
}, [
|
|
2241
|
-
z("div",
|
|
2242
|
-
l.title ? (
|
|
2243
|
-
l.message || l.$slots.default ? (
|
|
2338
|
+
z("div", Za, [
|
|
2339
|
+
l.title ? (b(), h("div", Ja, O(l.title), 1)) : L("", !0),
|
|
2340
|
+
l.message || l.$slots.default ? (b(), h("div", Qa, [
|
|
2244
2341
|
F(l.$slots, "default", {}, () => [
|
|
2245
2342
|
U(O(l.message), 1)
|
|
2246
2343
|
])
|
|
2247
|
-
])) :
|
|
2344
|
+
])) : L("", !0)
|
|
2248
2345
|
]),
|
|
2249
|
-
l.closable ? (
|
|
2346
|
+
l.closable ? (b(), h("button", {
|
|
2250
2347
|
key: 0,
|
|
2251
2348
|
class: "vf-toast__close",
|
|
2252
2349
|
type: "button",
|
|
@@ -2255,19 +2352,19 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2255
2352
|
F(l.$slots, "close", {}, () => [
|
|
2256
2353
|
u[0] || (u[0] = U("×"))
|
|
2257
2354
|
])
|
|
2258
|
-
])) :
|
|
2259
|
-
], 8,
|
|
2355
|
+
])) : L("", !0)
|
|
2356
|
+
], 8, Ua)), [
|
|
2260
2357
|
[ce, l.modelValue]
|
|
2261
2358
|
]);
|
|
2262
2359
|
}
|
|
2263
|
-
}),
|
|
2360
|
+
}), ml = /* @__PURE__ */ j({
|
|
2264
2361
|
__name: "toast-container",
|
|
2265
2362
|
props: {
|
|
2266
2363
|
position: { default: "top-right" }
|
|
2267
2364
|
},
|
|
2268
2365
|
setup(a) {
|
|
2269
2366
|
const e = a, r = m(() => `vf-toast-container_${e.position}`);
|
|
2270
|
-
return (t, o) => (
|
|
2367
|
+
return (t, o) => (b(), se(xe, { to: "body" }, [
|
|
2271
2368
|
z("div", {
|
|
2272
2369
|
class: I(["vf-toast-container", r.value]),
|
|
2273
2370
|
role: "region",
|
|
@@ -2277,20 +2374,20 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2277
2374
|
], 2)
|
|
2278
2375
|
]));
|
|
2279
2376
|
}
|
|
2280
|
-
}),
|
|
2377
|
+
}), eo = ["data-severity"], to = {
|
|
2281
2378
|
key: 0,
|
|
2282
2379
|
class: "vf-alert__icon",
|
|
2283
2380
|
"aria-hidden": "true"
|
|
2284
|
-
},
|
|
2381
|
+
}, ao = { class: "vf-alert__body" }, oo = {
|
|
2285
2382
|
key: 0,
|
|
2286
2383
|
class: "vf-alert__title"
|
|
2287
|
-
},
|
|
2384
|
+
}, ro = {
|
|
2288
2385
|
key: 1,
|
|
2289
2386
|
class: "vf-alert__message"
|
|
2290
|
-
},
|
|
2387
|
+
}, lo = {
|
|
2291
2388
|
key: 1,
|
|
2292
2389
|
class: "vf-alert__actions"
|
|
2293
|
-
},
|
|
2390
|
+
}, gl = /* @__PURE__ */ j({
|
|
2294
2391
|
__name: "alert",
|
|
2295
2392
|
props: {
|
|
2296
2393
|
modelValue: { type: Boolean },
|
|
@@ -2313,32 +2410,32 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2313
2410
|
const c = () => {
|
|
2314
2411
|
d.value ? r("update:modelValue", !1) : o.value = !1, r("close");
|
|
2315
2412
|
};
|
|
2316
|
-
return (l, u) => ue((
|
|
2413
|
+
return (l, u) => ue((b(), h("div", {
|
|
2317
2414
|
class: "vf-alert",
|
|
2318
2415
|
role: "alert",
|
|
2319
2416
|
"data-severity": l.severity
|
|
2320
2417
|
}, [
|
|
2321
|
-
l.$slots.icon || l.icon ? (
|
|
2418
|
+
l.$slots.icon || l.icon ? (b(), h("div", to, [
|
|
2322
2419
|
F(l.$slots, "icon", {}, () => [
|
|
2323
2420
|
U(O(l.icon), 1)
|
|
2324
2421
|
])
|
|
2325
|
-
])) :
|
|
2326
|
-
z("div",
|
|
2327
|
-
l.title || l.$slots.title ? (
|
|
2422
|
+
])) : L("", !0),
|
|
2423
|
+
z("div", ao, [
|
|
2424
|
+
l.title || l.$slots.title ? (b(), h("div", oo, [
|
|
2328
2425
|
F(l.$slots, "title", {}, () => [
|
|
2329
2426
|
U(O(l.title), 1)
|
|
2330
2427
|
])
|
|
2331
|
-
])) :
|
|
2332
|
-
l.message || l.$slots.default ? (
|
|
2428
|
+
])) : L("", !0),
|
|
2429
|
+
l.message || l.$slots.default ? (b(), h("div", ro, [
|
|
2333
2430
|
F(l.$slots, "default", {}, () => [
|
|
2334
2431
|
U(O(l.message), 1)
|
|
2335
2432
|
])
|
|
2336
|
-
])) :
|
|
2433
|
+
])) : L("", !0)
|
|
2337
2434
|
]),
|
|
2338
|
-
l.$slots.actions ? (
|
|
2435
|
+
l.$slots.actions ? (b(), h("div", lo, [
|
|
2339
2436
|
F(l.$slots, "actions")
|
|
2340
|
-
])) :
|
|
2341
|
-
l.closable ? (
|
|
2437
|
+
])) : L("", !0),
|
|
2438
|
+
l.closable ? (b(), h("button", {
|
|
2342
2439
|
key: 2,
|
|
2343
2440
|
class: "vf-alert__close",
|
|
2344
2441
|
type: "button",
|
|
@@ -2348,15 +2445,15 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2348
2445
|
F(l.$slots, "close", {}, () => [
|
|
2349
2446
|
u[0] || (u[0] = U("×"))
|
|
2350
2447
|
])
|
|
2351
|
-
])) :
|
|
2352
|
-
], 8,
|
|
2448
|
+
])) : L("", !0)
|
|
2449
|
+
], 8, eo)), [
|
|
2353
2450
|
[ce, n.value]
|
|
2354
2451
|
]);
|
|
2355
2452
|
}
|
|
2356
|
-
}),
|
|
2453
|
+
}), so = ["checked", "disabled"], no = {
|
|
2357
2454
|
key: 0,
|
|
2358
2455
|
class: "vf-switch__label"
|
|
2359
|
-
},
|
|
2456
|
+
}, hl = /* @__PURE__ */ j({
|
|
2360
2457
|
__name: "switch",
|
|
2361
2458
|
props: {
|
|
2362
2459
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -2372,7 +2469,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2372
2469
|
const c = n.target;
|
|
2373
2470
|
r("update:modelValue", c.checked), r("change", n);
|
|
2374
2471
|
};
|
|
2375
|
-
return (n, c) => (
|
|
2472
|
+
return (n, c) => (b(), h("label", {
|
|
2376
2473
|
class: I(o.value)
|
|
2377
2474
|
}, [
|
|
2378
2475
|
z("input", {
|
|
@@ -2381,18 +2478,18 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2381
2478
|
checked: n.modelValue,
|
|
2382
2479
|
disabled: n.disabled,
|
|
2383
2480
|
onChange: d
|
|
2384
|
-
}, null, 40,
|
|
2481
|
+
}, null, 40, so),
|
|
2385
2482
|
c[0] || (c[0] = z("span", { class: "vf-switch__track" }, [
|
|
2386
2483
|
z("span", { class: "vf-switch__thumb" })
|
|
2387
2484
|
], -1)),
|
|
2388
|
-
n.label || n.$slots.default ? (
|
|
2485
|
+
n.label || n.$slots.default ? (b(), h("span", no, [
|
|
2389
2486
|
F(n.$slots, "default", {}, () => [
|
|
2390
2487
|
U(O(n.label), 1)
|
|
2391
2488
|
])
|
|
2392
|
-
])) :
|
|
2489
|
+
])) : L("", !0)
|
|
2393
2490
|
], 2));
|
|
2394
2491
|
}
|
|
2395
|
-
}),
|
|
2492
|
+
}), io = { class: "vf-popover" }, uo = ["aria-expanded", "onKeydown"], yl = /* @__PURE__ */ j({
|
|
2396
2493
|
__name: "popover",
|
|
2397
2494
|
emits: ["click", "onClick"],
|
|
2398
2495
|
setup(a, { expose: e, emit: r }) {
|
|
@@ -2401,7 +2498,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2401
2498
|
const n = `vf-popover-panel-${++d}`, c = () => o.visible = !0, l = () => o.visible = !1, u = () => o.visible = !o.visible, i = () => {
|
|
2402
2499
|
u(), t("click"), t("onClick");
|
|
2403
2500
|
};
|
|
2404
|
-
return e({ show: c, hide: l, toggle: u }), (s, f) => (
|
|
2501
|
+
return e({ show: c, hide: l, toggle: u }), (s, f) => (b(), h("div", io, [
|
|
2405
2502
|
z("div", {
|
|
2406
2503
|
class: "vf-popover__button",
|
|
2407
2504
|
role: "button",
|
|
@@ -2416,8 +2513,8 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2416
2513
|
]
|
|
2417
2514
|
}, [
|
|
2418
2515
|
F(s.$slots, "button")
|
|
2419
|
-
], 40,
|
|
2420
|
-
ue(
|
|
2516
|
+
], 40, uo),
|
|
2517
|
+
ue(Ne(Ct, {
|
|
2421
2518
|
id: n,
|
|
2422
2519
|
class: "vf-popover__wrapper"
|
|
2423
2520
|
}, it({
|
|
@@ -2437,7 +2534,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2437
2534
|
name: "header",
|
|
2438
2535
|
fn: be(() => [
|
|
2439
2536
|
F(s.$slots, "header"),
|
|
2440
|
-
s.$slots.header ?
|
|
2537
|
+
s.$slots.header ? L("", !0) : F(s.$slots, "popoverHeader", { key: 0 })
|
|
2441
2538
|
]),
|
|
2442
2539
|
key: "1"
|
|
2443
2540
|
} : void 0,
|
|
@@ -2445,7 +2542,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2445
2542
|
name: "body",
|
|
2446
2543
|
fn: be(() => [
|
|
2447
2544
|
F(s.$slots, "body"),
|
|
2448
|
-
s.$slots.body ?
|
|
2545
|
+
s.$slots.body ? L("", !0) : F(s.$slots, "popoverBody", { key: 0 })
|
|
2449
2546
|
]),
|
|
2450
2547
|
key: "2"
|
|
2451
2548
|
} : void 0,
|
|
@@ -2453,7 +2550,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2453
2550
|
name: "footer",
|
|
2454
2551
|
fn: be(() => [
|
|
2455
2552
|
F(s.$slots, "footer"),
|
|
2456
|
-
s.$slots.footer ?
|
|
2553
|
+
s.$slots.footer ? L("", !0) : F(s.$slots, "popoverFooter", { key: 0 })
|
|
2457
2554
|
]),
|
|
2458
2555
|
key: "3"
|
|
2459
2556
|
} : void 0
|
|
@@ -2462,16 +2559,16 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2462
2559
|
])
|
|
2463
2560
|
]));
|
|
2464
2561
|
}
|
|
2465
|
-
}),
|
|
2562
|
+
}), co = ["aria-labelledby", "aria-describedby"], vo = {
|
|
2466
2563
|
key: 0,
|
|
2467
2564
|
class: "vf-modal__header"
|
|
2468
|
-
},
|
|
2565
|
+
}, fo = {
|
|
2469
2566
|
key: 0,
|
|
2470
2567
|
class: "vf-modal__title"
|
|
2471
|
-
},
|
|
2568
|
+
}, po = {
|
|
2472
2569
|
key: 3,
|
|
2473
2570
|
class: "vf-modal__footer"
|
|
2474
|
-
},
|
|
2571
|
+
}, _l = /* @__PURE__ */ j({
|
|
2475
2572
|
__name: "modal",
|
|
2476
2573
|
props: {
|
|
2477
2574
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -2487,47 +2584,47 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2487
2584
|
const t = r, o = a;
|
|
2488
2585
|
let d = 0, n = 0, c = "", l = null;
|
|
2489
2586
|
const u = K(null), i = De(), s = `vf-modal-title-${++d}`, f = `vf-modal-body-${d}`, p = m(() => !!o.title || !!i.header), v = m(() => !!i.body || !!i.default), w = m(() => {
|
|
2490
|
-
const
|
|
2491
|
-
return o.size !== "md" &&
|
|
2492
|
-
}), k = () => t("update:modelValue", !0),
|
|
2587
|
+
const g = ["vf-modal"];
|
|
2588
|
+
return o.size !== "md" && g.push(`vf-modal_${o.size}`), g;
|
|
2589
|
+
}), k = () => t("update:modelValue", !0), B = () => {
|
|
2493
2590
|
t("update:modelValue", !1), t("close");
|
|
2494
2591
|
}, A = () => {
|
|
2495
|
-
o.closeOnOverlay &&
|
|
2496
|
-
},
|
|
2497
|
-
!o.modelValue || !o.closeOnEsc ||
|
|
2498
|
-
},
|
|
2592
|
+
o.closeOnOverlay && B();
|
|
2593
|
+
}, $ = (g) => {
|
|
2594
|
+
!o.modelValue || !o.closeOnEsc || g.key === "Escape" && (g.preventDefault(), B());
|
|
2595
|
+
}, E = () => u.value ? Array.from(u.value.querySelectorAll('a[href],button:not([disabled]),textarea:not([disabled]),input:not([disabled]),select:not([disabled]),[tabindex]:not([tabindex="-1"])')).filter((C) => !C.hasAttribute("disabled") && !C.getAttribute("aria-hidden")) : [], M = () => {
|
|
2499
2596
|
var C;
|
|
2500
|
-
const
|
|
2501
|
-
|
|
2502
|
-
},
|
|
2597
|
+
const g = E();
|
|
2598
|
+
g.length ? g[0].focus() : (C = u.value) == null || C.focus();
|
|
2599
|
+
}, D = (g) => {
|
|
2503
2600
|
var q;
|
|
2504
|
-
if (
|
|
2601
|
+
if (g.key !== "Tab")
|
|
2505
2602
|
return;
|
|
2506
|
-
const C =
|
|
2603
|
+
const C = E();
|
|
2507
2604
|
if (!C.length) {
|
|
2508
|
-
|
|
2605
|
+
g.preventDefault(), (q = u.value) == null || q.focus();
|
|
2509
2606
|
return;
|
|
2510
2607
|
}
|
|
2511
|
-
const
|
|
2512
|
-
if (
|
|
2513
|
-
|
|
2608
|
+
const y = C[0], R = C[C.length - 1], H = document.activeElement;
|
|
2609
|
+
if (g.shiftKey && H === y) {
|
|
2610
|
+
g.preventDefault(), R.focus();
|
|
2514
2611
|
return;
|
|
2515
2612
|
}
|
|
2516
|
-
!
|
|
2517
|
-
},
|
|
2613
|
+
!g.shiftKey && H === R && (g.preventDefault(), y.focus());
|
|
2614
|
+
}, G = () => {
|
|
2518
2615
|
!o.lockScroll || typeof document > "u" || (n === 0 && (c = document.body.style.overflow, document.body.style.overflow = "hidden"), n += 1);
|
|
2519
|
-
},
|
|
2616
|
+
}, T = () => {
|
|
2520
2617
|
!o.lockScroll || typeof document > "u" || (n = Math.max(0, n - 1), n === 0 && (document.body.style.overflow = c));
|
|
2521
2618
|
};
|
|
2522
2619
|
return oe(
|
|
2523
2620
|
() => o.modelValue,
|
|
2524
|
-
async (
|
|
2525
|
-
|
|
2621
|
+
async (g) => {
|
|
2622
|
+
g ? (typeof document < "u" && (l = document.activeElement), G(), t("open"), await ke(), M(), typeof document < "u" && document.addEventListener("keydown", $)) : (T(), typeof document < "u" && (document.removeEventListener("keydown", $), l == null || l.focus()));
|
|
2526
2623
|
},
|
|
2527
2624
|
{ immediate: !0 }
|
|
2528
|
-
),
|
|
2529
|
-
|
|
2530
|
-
}), e({ open: k, close:
|
|
2625
|
+
), we(() => {
|
|
2626
|
+
T(), typeof document < "u" && document.removeEventListener("keydown", $);
|
|
2627
|
+
}), e({ open: k, close: B }), (g, C) => (b(), se(xe, { to: "body" }, [
|
|
2531
2628
|
ue(z("div", {
|
|
2532
2629
|
class: I(w.value),
|
|
2533
2630
|
role: "presentation"
|
|
@@ -2545,56 +2642,56 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2545
2642
|
"aria-labelledby": p.value ? s : void 0,
|
|
2546
2643
|
"aria-describedby": v.value ? f : void 0,
|
|
2547
2644
|
tabindex: "-1",
|
|
2548
|
-
onKeydown:
|
|
2645
|
+
onKeydown: D
|
|
2549
2646
|
}, [
|
|
2550
|
-
p.value ? (
|
|
2647
|
+
p.value ? (b(), h("div", vo, [
|
|
2551
2648
|
z("div", {
|
|
2552
2649
|
id: s,
|
|
2553
2650
|
class: "vf-modal__header-content"
|
|
2554
2651
|
}, [
|
|
2555
|
-
F(
|
|
2556
|
-
|
|
2652
|
+
F(g.$slots, "header", {}, () => [
|
|
2653
|
+
g.title ? (b(), h("h3", fo, O(g.title), 1)) : L("", !0)
|
|
2557
2654
|
])
|
|
2558
2655
|
])
|
|
2559
|
-
])) :
|
|
2560
|
-
|
|
2656
|
+
])) : L("", !0),
|
|
2657
|
+
g.showClose ? F(g.$slots, "close", {
|
|
2561
2658
|
key: 1,
|
|
2562
|
-
close:
|
|
2659
|
+
close: B
|
|
2563
2660
|
}, () => [
|
|
2564
2661
|
z("button", {
|
|
2565
2662
|
type: "button",
|
|
2566
2663
|
class: "vf-modal__close",
|
|
2567
2664
|
"aria-label": "Close",
|
|
2568
|
-
onClick:
|
|
2665
|
+
onClick: B
|
|
2569
2666
|
}, "×")
|
|
2570
|
-
]) :
|
|
2571
|
-
|
|
2667
|
+
]) : L("", !0),
|
|
2668
|
+
g.$slots.body || g.$slots.default ? (b(), h("div", {
|
|
2572
2669
|
key: 2,
|
|
2573
2670
|
id: f,
|
|
2574
2671
|
class: "vf-modal__body"
|
|
2575
2672
|
}, [
|
|
2576
|
-
F(
|
|
2577
|
-
|
|
2578
|
-
])) :
|
|
2579
|
-
|
|
2580
|
-
F(
|
|
2581
|
-
])) :
|
|
2582
|
-
], 40,
|
|
2673
|
+
F(g.$slots, "body"),
|
|
2674
|
+
g.$slots.body ? L("", !0) : F(g.$slots, "default", { key: 0 })
|
|
2675
|
+
])) : L("", !0),
|
|
2676
|
+
g.$slots.footer ? (b(), h("div", po, [
|
|
2677
|
+
F(g.$slots, "footer")
|
|
2678
|
+
])) : L("", !0)
|
|
2679
|
+
], 40, co)
|
|
2583
2680
|
], 2), [
|
|
2584
|
-
[ce,
|
|
2681
|
+
[ce, g.modelValue]
|
|
2585
2682
|
])
|
|
2586
2683
|
]));
|
|
2587
2684
|
}
|
|
2588
|
-
}),
|
|
2685
|
+
}), bo = ["aria-labelledby", "aria-describedby"], mo = {
|
|
2589
2686
|
key: 0,
|
|
2590
2687
|
class: "vf-drawer__header"
|
|
2591
|
-
},
|
|
2688
|
+
}, go = {
|
|
2592
2689
|
key: 0,
|
|
2593
2690
|
class: "vf-drawer__title"
|
|
2594
|
-
},
|
|
2691
|
+
}, ho = {
|
|
2595
2692
|
key: 3,
|
|
2596
2693
|
class: "vf-drawer__footer"
|
|
2597
|
-
},
|
|
2694
|
+
}, Cl = /* @__PURE__ */ j({
|
|
2598
2695
|
__name: "drawer",
|
|
2599
2696
|
props: {
|
|
2600
2697
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -2625,64 +2722,64 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2625
2722
|
return "translate3d(100%, 0, 0)";
|
|
2626
2723
|
}
|
|
2627
2724
|
}), k = m(() => {
|
|
2628
|
-
const
|
|
2629
|
-
return o.size !== "md" &&
|
|
2630
|
-
}),
|
|
2725
|
+
const y = ["vf-drawer", `vf-drawer_${o.position}`];
|
|
2726
|
+
return o.size !== "md" && y.push(`vf-drawer_${o.size}`), y;
|
|
2727
|
+
}), B = m(() => ({
|
|
2631
2728
|
"--vf-drawer-transform-from": w.value
|
|
2632
|
-
})), A = () => t("update:modelValue", !0),
|
|
2729
|
+
})), A = () => t("update:modelValue", !0), $ = () => {
|
|
2633
2730
|
t("update:modelValue", !1), t("close");
|
|
2634
|
-
},
|
|
2635
|
-
o.overlay && o.closeOnOverlay &&
|
|
2636
|
-
},
|
|
2637
|
-
!o.modelValue || !o.closeOnEsc ||
|
|
2638
|
-
},
|
|
2731
|
+
}, E = () => {
|
|
2732
|
+
o.overlay && o.closeOnOverlay && $();
|
|
2733
|
+
}, M = (y) => {
|
|
2734
|
+
!o.modelValue || !o.closeOnEsc || y.key === "Escape" && (y.preventDefault(), $());
|
|
2735
|
+
}, D = () => u.value ? Array.from(u.value.querySelectorAll('a[href],button:not([disabled]),textarea:not([disabled]),input:not([disabled]),select:not([disabled]),[tabindex]:not([tabindex="-1"])')).filter((R) => !R.hasAttribute("disabled") && !R.getAttribute("aria-hidden")) : [], G = () => {
|
|
2639
2736
|
var R;
|
|
2640
|
-
const
|
|
2641
|
-
|
|
2642
|
-
},
|
|
2737
|
+
const y = D();
|
|
2738
|
+
y.length ? y[0].focus() : (R = u.value) == null || R.focus();
|
|
2739
|
+
}, T = (y) => {
|
|
2643
2740
|
var X;
|
|
2644
|
-
if (
|
|
2741
|
+
if (y.key !== "Tab")
|
|
2645
2742
|
return;
|
|
2646
|
-
const R =
|
|
2743
|
+
const R = D();
|
|
2647
2744
|
if (!R.length) {
|
|
2648
|
-
|
|
2745
|
+
y.preventDefault(), (X = u.value) == null || X.focus();
|
|
2649
2746
|
return;
|
|
2650
2747
|
}
|
|
2651
|
-
const
|
|
2652
|
-
if (
|
|
2653
|
-
|
|
2748
|
+
const H = R[0], q = R[R.length - 1], ee = document.activeElement;
|
|
2749
|
+
if (y.shiftKey && ee === H) {
|
|
2750
|
+
y.preventDefault(), q.focus();
|
|
2654
2751
|
return;
|
|
2655
2752
|
}
|
|
2656
|
-
!
|
|
2657
|
-
},
|
|
2753
|
+
!y.shiftKey && ee === q && (y.preventDefault(), H.focus());
|
|
2754
|
+
}, g = () => {
|
|
2658
2755
|
!o.lockScroll || typeof document > "u" || (n === 0 && (c = document.body.style.overflow, document.body.style.overflow = "hidden"), n += 1);
|
|
2659
2756
|
}, C = () => {
|
|
2660
2757
|
!o.lockScroll || typeof document > "u" || (n = Math.max(0, n - 1), n === 0 && (document.body.style.overflow = c));
|
|
2661
2758
|
};
|
|
2662
2759
|
return oe(
|
|
2663
2760
|
() => o.modelValue,
|
|
2664
|
-
async (
|
|
2665
|
-
|
|
2761
|
+
async (y) => {
|
|
2762
|
+
y ? (typeof document < "u" && (l = document.activeElement), g(), t("open"), await ke(), G(), typeof document < "u" && document.addEventListener("keydown", M)) : (C(), typeof document < "u" && (document.removeEventListener("keydown", M), l == null || l.focus()));
|
|
2666
2763
|
},
|
|
2667
2764
|
{ immediate: !0 }
|
|
2668
|
-
),
|
|
2669
|
-
C(), typeof document < "u" && document.removeEventListener("keydown",
|
|
2670
|
-
}), e({ open: A, close:
|
|
2671
|
-
|
|
2765
|
+
), we(() => {
|
|
2766
|
+
C(), typeof document < "u" && document.removeEventListener("keydown", M);
|
|
2767
|
+
}), e({ open: A, close: $ }), (y, R) => (b(), se(xe, { to: "body" }, [
|
|
2768
|
+
Ne(dt, {
|
|
2672
2769
|
name: "vf-drawer",
|
|
2673
2770
|
duration: { enter: 320, leave: 320 }
|
|
2674
2771
|
}, {
|
|
2675
2772
|
default: be(() => [
|
|
2676
2773
|
ue(z("div", {
|
|
2677
2774
|
class: I(k.value),
|
|
2678
|
-
style:
|
|
2775
|
+
style: me(B.value),
|
|
2679
2776
|
role: "presentation"
|
|
2680
2777
|
}, [
|
|
2681
|
-
|
|
2778
|
+
y.overlay ? (b(), h("div", {
|
|
2682
2779
|
key: 0,
|
|
2683
2780
|
class: "vf-drawer__overlay",
|
|
2684
|
-
onClick:
|
|
2685
|
-
})) :
|
|
2781
|
+
onClick: E
|
|
2782
|
+
})) : L("", !0),
|
|
2686
2783
|
z("div", {
|
|
2687
2784
|
ref_key: "panel",
|
|
2688
2785
|
ref: u,
|
|
@@ -2692,54 +2789,54 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2692
2789
|
"aria-labelledby": p.value ? s : void 0,
|
|
2693
2790
|
"aria-describedby": v.value ? f : void 0,
|
|
2694
2791
|
tabindex: "-1",
|
|
2695
|
-
onKeydown:
|
|
2792
|
+
onKeydown: T
|
|
2696
2793
|
}, [
|
|
2697
|
-
p.value ? (
|
|
2794
|
+
p.value ? (b(), h("div", mo, [
|
|
2698
2795
|
z("div", {
|
|
2699
2796
|
id: s,
|
|
2700
2797
|
class: "vf-drawer__header-content"
|
|
2701
2798
|
}, [
|
|
2702
|
-
F(
|
|
2703
|
-
|
|
2799
|
+
F(y.$slots, "header", {}, () => [
|
|
2800
|
+
y.title ? (b(), h("h3", go, O(y.title), 1)) : L("", !0)
|
|
2704
2801
|
])
|
|
2705
2802
|
])
|
|
2706
|
-
])) :
|
|
2707
|
-
|
|
2803
|
+
])) : L("", !0),
|
|
2804
|
+
y.showClose ? F(y.$slots, "close", {
|
|
2708
2805
|
key: 1,
|
|
2709
|
-
close:
|
|
2806
|
+
close: $
|
|
2710
2807
|
}, () => [
|
|
2711
2808
|
z("button", {
|
|
2712
2809
|
type: "button",
|
|
2713
2810
|
class: "vf-drawer__close",
|
|
2714
2811
|
"aria-label": "Close",
|
|
2715
|
-
onClick:
|
|
2812
|
+
onClick: $
|
|
2716
2813
|
}, " × ")
|
|
2717
|
-
]) :
|
|
2718
|
-
|
|
2814
|
+
]) : L("", !0),
|
|
2815
|
+
y.$slots.body || y.$slots.default ? (b(), h("div", {
|
|
2719
2816
|
key: 2,
|
|
2720
2817
|
id: f,
|
|
2721
2818
|
class: "vf-drawer__body"
|
|
2722
2819
|
}, [
|
|
2723
|
-
F(
|
|
2724
|
-
|
|
2725
|
-
])) :
|
|
2726
|
-
|
|
2727
|
-
F(
|
|
2728
|
-
])) :
|
|
2729
|
-
], 40,
|
|
2820
|
+
F(y.$slots, "body"),
|
|
2821
|
+
y.$slots.body ? L("", !0) : F(y.$slots, "default", { key: 0 })
|
|
2822
|
+
])) : L("", !0),
|
|
2823
|
+
y.$slots.footer ? (b(), h("div", ho, [
|
|
2824
|
+
F(y.$slots, "footer")
|
|
2825
|
+
])) : L("", !0)
|
|
2826
|
+
], 40, bo)
|
|
2730
2827
|
], 6), [
|
|
2731
|
-
[ce,
|
|
2828
|
+
[ce, y.modelValue]
|
|
2732
2829
|
])
|
|
2733
2830
|
]),
|
|
2734
2831
|
_: 3
|
|
2735
2832
|
})
|
|
2736
2833
|
]));
|
|
2737
2834
|
}
|
|
2738
|
-
}),
|
|
2835
|
+
}), yo = ["data-placement"], _o = { class: "vf-tooltip__content" }, Co = {
|
|
2739
2836
|
key: 0,
|
|
2740
2837
|
class: "vf-tooltip__arrow",
|
|
2741
2838
|
"aria-hidden": "true"
|
|
2742
|
-
},
|
|
2839
|
+
}, kl = /* @__PURE__ */ j({
|
|
2743
2840
|
__name: "tooltip",
|
|
2744
2841
|
props: {
|
|
2745
2842
|
text: { default: "" },
|
|
@@ -2761,18 +2858,18 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2761
2858
|
return;
|
|
2762
2859
|
const p = t.value, v = o.value, w = async () => {
|
|
2763
2860
|
const {
|
|
2764
|
-
x:
|
|
2765
|
-
y:
|
|
2766
|
-
placement:
|
|
2861
|
+
x: $,
|
|
2862
|
+
y: E,
|
|
2863
|
+
placement: M
|
|
2767
2864
|
} = await Re(p, v, {
|
|
2768
2865
|
placement: e.placement,
|
|
2769
2866
|
strategy: "fixed",
|
|
2770
|
-
middleware: [Le(8), Ve(),
|
|
2867
|
+
middleware: [Le(8), Ve(), Kt()]
|
|
2771
2868
|
});
|
|
2772
|
-
n.value =
|
|
2869
|
+
n.value = M ?? e.placement, v.style.left = `${$}px`, v.style.top = `${E}px`;
|
|
2773
2870
|
}, k = async () => {
|
|
2774
2871
|
await w();
|
|
2775
|
-
},
|
|
2872
|
+
}, B = Te(p, () => {
|
|
2776
2873
|
k();
|
|
2777
2874
|
}), A = () => {
|
|
2778
2875
|
k();
|
|
@@ -2780,7 +2877,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2780
2877
|
document.addEventListener("scroll", A, !0), window.addEventListener("resize", A, !1), l = {
|
|
2781
2878
|
update: k,
|
|
2782
2879
|
destroy: () => {
|
|
2783
|
-
|
|
2880
|
+
B(), document.removeEventListener("scroll", A, !0), window.removeEventListener("resize", A, !1);
|
|
2784
2881
|
}
|
|
2785
2882
|
}, l.update();
|
|
2786
2883
|
};
|
|
@@ -2792,13 +2889,13 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2792
2889
|
l || s(), l == null || l.update();
|
|
2793
2890
|
}), Fe(() => {
|
|
2794
2891
|
d.value && s();
|
|
2795
|
-
}),
|
|
2892
|
+
}), we(() => {
|
|
2796
2893
|
l == null || l.destroy(), l = null;
|
|
2797
2894
|
});
|
|
2798
2895
|
const f = m(() => !!e.text || !!(o.value && o.value.textContent));
|
|
2799
2896
|
return oe(f, (p) => {
|
|
2800
2897
|
p || (d.value = !1);
|
|
2801
|
-
}), (p, v) => (
|
|
2898
|
+
}), (p, v) => (b(), h(re, null, [
|
|
2802
2899
|
z("span", {
|
|
2803
2900
|
ref_key: "trigger",
|
|
2804
2901
|
ref: t,
|
|
@@ -2811,7 +2908,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2811
2908
|
}, [
|
|
2812
2909
|
F(p.$slots, "default")
|
|
2813
2910
|
], 544),
|
|
2814
|
-
(
|
|
2911
|
+
(b(), se(xe, { to: "body" }, [
|
|
2815
2912
|
ue(z("div", {
|
|
2816
2913
|
id: c,
|
|
2817
2914
|
ref_key: "panel",
|
|
@@ -2820,23 +2917,23 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2820
2917
|
role: "tooltip",
|
|
2821
2918
|
"data-placement": n.value
|
|
2822
2919
|
}, [
|
|
2823
|
-
z("span",
|
|
2920
|
+
z("span", _o, [
|
|
2824
2921
|
F(p.$slots, "content", {}, () => [
|
|
2825
2922
|
U(O(p.text), 1)
|
|
2826
2923
|
])
|
|
2827
2924
|
]),
|
|
2828
|
-
p.arrow ? (
|
|
2829
|
-
], 8,
|
|
2925
|
+
p.arrow ? (b(), h("span", Co)) : L("", !0)
|
|
2926
|
+
], 8, yo), [
|
|
2830
2927
|
[ce, d.value]
|
|
2831
2928
|
])
|
|
2832
2929
|
]))
|
|
2833
2930
|
], 64));
|
|
2834
2931
|
}
|
|
2835
|
-
}),
|
|
2932
|
+
}), $l = /* @__PURE__ */ j({
|
|
2836
2933
|
__name: "skeleton",
|
|
2837
2934
|
props: {
|
|
2838
|
-
width: {},
|
|
2839
|
-
height: {},
|
|
2935
|
+
width: { default: "" },
|
|
2936
|
+
height: { default: "" },
|
|
2840
2937
|
variant: { default: "text" },
|
|
2841
2938
|
animated: { type: Boolean, default: !0 }
|
|
2842
2939
|
},
|
|
@@ -2851,29 +2948,29 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2851
2948
|
const d = ["vf-skeleton", `vf-skeleton_${e.variant}`];
|
|
2852
2949
|
return e.animated && d.push("vf-skeleton_animated"), d;
|
|
2853
2950
|
});
|
|
2854
|
-
return (d, n) => (
|
|
2951
|
+
return (d, n) => (b(), h("div", {
|
|
2855
2952
|
class: I(o.value),
|
|
2856
|
-
style:
|
|
2953
|
+
style: me(t.value),
|
|
2857
2954
|
"aria-hidden": "true"
|
|
2858
2955
|
}, null, 6));
|
|
2859
2956
|
}
|
|
2860
|
-
}),
|
|
2957
|
+
}), ko = ["aria-label", "aria-valuenow", "data-severity"], $o = {
|
|
2861
2958
|
key: 0,
|
|
2862
2959
|
class: "vf-progress__track"
|
|
2863
|
-
},
|
|
2960
|
+
}, wo = {
|
|
2864
2961
|
key: 1,
|
|
2865
2962
|
class: "vf-progress__circle"
|
|
2866
|
-
},
|
|
2963
|
+
}, xo = {
|
|
2867
2964
|
viewBox: "0 0 100 100",
|
|
2868
2965
|
class: "vf-progress__svg",
|
|
2869
2966
|
"aria-hidden": "true"
|
|
2870
|
-
},
|
|
2967
|
+
}, zo = {
|
|
2871
2968
|
key: 2,
|
|
2872
2969
|
class: "vf-progress__label"
|
|
2873
|
-
},
|
|
2970
|
+
}, wl = /* @__PURE__ */ j({
|
|
2874
2971
|
__name: "progress",
|
|
2875
2972
|
props: {
|
|
2876
|
-
value: {},
|
|
2973
|
+
value: { default: null },
|
|
2877
2974
|
variant: { default: "linear" },
|
|
2878
2975
|
size: { default: "normal" },
|
|
2879
2976
|
label: { default: "" },
|
|
@@ -2900,7 +2997,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2900
2997
|
strokeDashoffset: `${p}px`
|
|
2901
2998
|
};
|
|
2902
2999
|
});
|
|
2903
|
-
return (p, v) => (
|
|
3000
|
+
return (p, v) => (b(), h("div", {
|
|
2904
3001
|
class: I(u.value),
|
|
2905
3002
|
role: "progressbar",
|
|
2906
3003
|
"aria-label": p.ariaLabel || void 0,
|
|
@@ -2909,13 +3006,13 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2909
3006
|
"aria-valuenow": n.value,
|
|
2910
3007
|
"data-severity": p.severity
|
|
2911
3008
|
}, [
|
|
2912
|
-
p.variant === "linear" ? (
|
|
3009
|
+
p.variant === "linear" ? (b(), h("div", $o, [
|
|
2913
3010
|
z("div", {
|
|
2914
3011
|
class: "vf-progress__bar",
|
|
2915
|
-
style:
|
|
3012
|
+
style: me(i.value)
|
|
2916
3013
|
}, null, 4)
|
|
2917
|
-
])) : (
|
|
2918
|
-
(
|
|
3014
|
+
])) : (b(), h("div", wo, [
|
|
3015
|
+
(b(), h("svg", xo, [
|
|
2919
3016
|
v[0] || (v[0] = z("circle", {
|
|
2920
3017
|
class: "vf-progress__circle-track",
|
|
2921
3018
|
cx: "50",
|
|
@@ -2927,18 +3024,18 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2927
3024
|
cx: "50",
|
|
2928
3025
|
cy: "50",
|
|
2929
3026
|
r: "45",
|
|
2930
|
-
style:
|
|
3027
|
+
style: me(f.value)
|
|
2931
3028
|
}, null, 4)
|
|
2932
3029
|
]))
|
|
2933
3030
|
])),
|
|
2934
|
-
l.value || c.value ? (
|
|
3031
|
+
l.value || c.value ? (b(), h("span", zo, [
|
|
2935
3032
|
F(p.$slots, "default", {}, () => [
|
|
2936
3033
|
U(O(l.value), 1)
|
|
2937
3034
|
])
|
|
2938
|
-
])) :
|
|
2939
|
-
], 10,
|
|
3035
|
+
])) : L("", !0)
|
|
3036
|
+
], 10, ko));
|
|
2940
3037
|
}
|
|
2941
|
-
}),
|
|
3038
|
+
}), Bo = ["data-variant", "data-severity", "aria-label"], xl = /* @__PURE__ */ j({
|
|
2942
3039
|
__name: "badge",
|
|
2943
3040
|
props: {
|
|
2944
3041
|
label: { default: "" },
|
|
@@ -2949,7 +3046,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2949
3046
|
},
|
|
2950
3047
|
setup(a) {
|
|
2951
3048
|
const e = a, r = m(() => [`vf-badge_size-${e.size}`]);
|
|
2952
|
-
return (t, o) => (
|
|
3049
|
+
return (t, o) => (b(), h("span", {
|
|
2953
3050
|
class: I(["vf-badge", r.value]),
|
|
2954
3051
|
"data-variant": t.variant,
|
|
2955
3052
|
"data-severity": t.severity,
|
|
@@ -2959,12 +3056,12 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2959
3056
|
F(t.$slots, "default", {}, () => [
|
|
2960
3057
|
U(O(t.label), 1)
|
|
2961
3058
|
])
|
|
2962
|
-
], 10,
|
|
3059
|
+
], 10, Bo));
|
|
2963
3060
|
}
|
|
2964
|
-
}),
|
|
3061
|
+
}), So = ["data-status", "aria-label"], Fo = { class: "vf-avatar__content" }, Vo = ["src", "alt"], Lo = {
|
|
2965
3062
|
key: 1,
|
|
2966
3063
|
class: "vf-avatar__initials"
|
|
2967
|
-
},
|
|
3064
|
+
}, To = ["data-status"], zl = /* @__PURE__ */ j({
|
|
2968
3065
|
__name: "avatar",
|
|
2969
3066
|
props: {
|
|
2970
3067
|
src: { default: "" },
|
|
@@ -2994,44 +3091,44 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2994
3091
|
() => {
|
|
2995
3092
|
r.value = !1;
|
|
2996
3093
|
}
|
|
2997
|
-
), (u, i) => (
|
|
3094
|
+
), (u, i) => (b(), h("div", {
|
|
2998
3095
|
class: I(["vf-avatar", c.value]),
|
|
2999
3096
|
"data-status": u.status || void 0,
|
|
3000
3097
|
role: "img",
|
|
3001
3098
|
"aria-label": n.value
|
|
3002
3099
|
}, [
|
|
3003
|
-
z("div",
|
|
3100
|
+
z("div", Fo, [
|
|
3004
3101
|
F(u.$slots, "default", {}, () => [
|
|
3005
|
-
d.value ? (
|
|
3102
|
+
d.value ? (b(), h("img", {
|
|
3006
3103
|
key: 0,
|
|
3007
3104
|
class: "vf-avatar__image",
|
|
3008
3105
|
src: u.src,
|
|
3009
3106
|
alt: u.alt || u.name || "",
|
|
3010
3107
|
onError: l
|
|
3011
|
-
}, null, 40,
|
|
3108
|
+
}, null, 40, Vo)) : (b(), h("span", Lo, O(o.value), 1))
|
|
3012
3109
|
])
|
|
3013
3110
|
]),
|
|
3014
|
-
u.status ? (
|
|
3111
|
+
u.status ? (b(), h("span", {
|
|
3015
3112
|
key: 0,
|
|
3016
3113
|
class: "vf-avatar__status",
|
|
3017
3114
|
"data-status": u.status,
|
|
3018
3115
|
"aria-hidden": "true"
|
|
3019
|
-
}, null, 8,
|
|
3020
|
-
], 10,
|
|
3116
|
+
}, null, 8, To)) : L("", !0)
|
|
3117
|
+
], 10, So));
|
|
3021
3118
|
}
|
|
3022
|
-
}),
|
|
3119
|
+
}), Ro = ["aria-label"], Po = {
|
|
3023
3120
|
key: 0,
|
|
3024
3121
|
class: "vf-datatable__head"
|
|
3025
|
-
},
|
|
3122
|
+
}, Io = { class: "vf-datatable__row" }, Oo = ["aria-sort"], Mo = ["onClick"], Do = { class: "vf-datatable__header-text" }, Eo = {
|
|
3026
3123
|
key: 1,
|
|
3027
3124
|
class: "vf-datatable__header-text"
|
|
3028
|
-
},
|
|
3125
|
+
}, Ao = { class: "vf-datatable__body" }, Wo = {
|
|
3029
3126
|
key: 0,
|
|
3030
3127
|
class: "vf-datatable__row vf-datatable__row_state"
|
|
3031
|
-
},
|
|
3128
|
+
}, Ho = ["colspan"], No = {
|
|
3032
3129
|
key: 1,
|
|
3033
3130
|
class: "vf-datatable__row vf-datatable__row_state"
|
|
3034
|
-
},
|
|
3131
|
+
}, Ko = ["colspan"], Go = ["onClick"], Bl = /* @__PURE__ */ j({
|
|
3035
3132
|
__name: "data-table",
|
|
3036
3133
|
props: {
|
|
3037
3134
|
rows: { default: () => [] },
|
|
@@ -3055,160 +3152,160 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
3055
3152
|
const r = a, t = e, o = K(r.sortField ?? null), d = K(r.sortOrder ?? null);
|
|
3056
3153
|
oe(
|
|
3057
3154
|
() => r.sortField,
|
|
3058
|
-
(
|
|
3059
|
-
o.value =
|
|
3155
|
+
(g) => {
|
|
3156
|
+
o.value = g ?? null;
|
|
3060
3157
|
}
|
|
3061
3158
|
), oe(
|
|
3062
3159
|
() => r.sortOrder,
|
|
3063
|
-
(
|
|
3064
|
-
d.value =
|
|
3160
|
+
(g) => {
|
|
3161
|
+
d.value = g ?? null;
|
|
3065
3162
|
}
|
|
3066
3163
|
);
|
|
3067
|
-
const n = m(() => o.value), c = m(() => d.value), l = m(() => Math.max(1, r.columns.length)), u = (
|
|
3068
|
-
const
|
|
3069
|
-
return !C || !
|
|
3070
|
-
const q = R == null ? void 0 : R[C], ee =
|
|
3071
|
-
return
|
|
3164
|
+
const n = m(() => o.value), c = m(() => d.value), l = m(() => Math.max(1, r.columns.length)), u = (g) => g.sortable === !1 ? !1 : g.sortable === !0 ? !0 : r.sortable, i = (g, C) => g == null && C == null ? 0 : g == null ? -1 : C == null ? 1 : typeof g == "number" && typeof C == "number" ? g - C : String(g).localeCompare(String(C)), s = m(() => {
|
|
3165
|
+
const g = r.rows ?? [], C = n.value, y = c.value;
|
|
3166
|
+
return !C || !y ? g : [...g].sort((R, H) => {
|
|
3167
|
+
const q = R == null ? void 0 : R[C], ee = H == null ? void 0 : H[C], X = i(q, ee);
|
|
3168
|
+
return y === "asc" ? X : -X;
|
|
3072
3169
|
});
|
|
3073
3170
|
}), f = m(() => {
|
|
3074
|
-
const
|
|
3075
|
-
return r.size !== "normal" &&
|
|
3076
|
-
}), p = (
|
|
3171
|
+
const g = ["vf-datatable", `vf-datatable_${r.variant}`];
|
|
3172
|
+
return r.size !== "normal" && g.push(`vf-datatable_${r.size}`), r.striped && g.push("vf-datatable_striped"), r.hover && g.push("vf-datatable_hover"), g;
|
|
3173
|
+
}), p = (g, C) => {
|
|
3077
3174
|
if (typeof r.rowKey == "function")
|
|
3078
|
-
return r.rowKey(
|
|
3175
|
+
return r.rowKey(g, C);
|
|
3079
3176
|
if (r.rowKey && typeof r.rowKey == "string") {
|
|
3080
|
-
const
|
|
3081
|
-
return typeof
|
|
3177
|
+
const y = g == null ? void 0 : g[r.rowKey];
|
|
3178
|
+
return typeof y == "string" || typeof y == "number" ? y : C;
|
|
3082
3179
|
}
|
|
3083
3180
|
return C;
|
|
3084
|
-
}, v = (
|
|
3085
|
-
const
|
|
3086
|
-
return C.formatter ? C.formatter(
|
|
3087
|
-
}, k = (
|
|
3088
|
-
if (!u(
|
|
3181
|
+
}, v = (g, C) => g == null ? void 0 : g[C.field], w = (g, C) => {
|
|
3182
|
+
const y = v(g, C);
|
|
3183
|
+
return C.formatter ? C.formatter(g, y, C) : y ?? "";
|
|
3184
|
+
}, k = (g) => {
|
|
3185
|
+
if (!u(g))
|
|
3089
3186
|
return;
|
|
3090
|
-
let C =
|
|
3091
|
-
n.value ===
|
|
3092
|
-
},
|
|
3093
|
-
if (u(
|
|
3094
|
-
return n.value !==
|
|
3095
|
-
},
|
|
3187
|
+
let C = g.field, y = "asc";
|
|
3188
|
+
n.value === g.field && (c.value === "asc" ? y = "desc" : c.value === "desc" ? (C = null, y = null) : y = "asc"), o.value = C, d.value = y, t("update:sortField", C), t("update:sortOrder", y), t("sort", C, y);
|
|
3189
|
+
}, B = (g) => n.value !== g.field ? "↕" : c.value === "asc" ? "↑" : "↓", A = (g) => n.value !== g.field ? "" : "is-active", $ = (g) => {
|
|
3190
|
+
if (u(g))
|
|
3191
|
+
return n.value !== g.field ? "none" : c.value === "asc" ? "ascending" : "descending";
|
|
3192
|
+
}, E = (g) => {
|
|
3096
3193
|
const C = [];
|
|
3097
|
-
return r.striped &&
|
|
3098
|
-
},
|
|
3194
|
+
return r.striped && g % 2 === 1 && C.push("vf-datatable__row_striped"), C;
|
|
3195
|
+
}, M = (g) => {
|
|
3099
3196
|
const C = [];
|
|
3100
|
-
return
|
|
3101
|
-
},
|
|
3197
|
+
return g.align && C.push(`vf-datatable__cell_${g.align}`), u(g) && C.push("vf-datatable__header_sortable"), C;
|
|
3198
|
+
}, D = (g) => {
|
|
3102
3199
|
const C = [];
|
|
3103
|
-
return
|
|
3104
|
-
},
|
|
3200
|
+
return g.align && C.push(`vf-datatable__cell_${g.align}`), C;
|
|
3201
|
+
}, G = (g) => {
|
|
3105
3202
|
const C = {};
|
|
3106
|
-
return
|
|
3107
|
-
},
|
|
3108
|
-
t("rowClick",
|
|
3203
|
+
return g.width && (C.width = g.width), g.minWidth && (C.minWidth = g.minWidth), C;
|
|
3204
|
+
}, T = (g, C, y) => {
|
|
3205
|
+
t("rowClick", g, C, y);
|
|
3109
3206
|
};
|
|
3110
|
-
return (
|
|
3207
|
+
return (g, C) => (b(), h("div", {
|
|
3111
3208
|
class: I(f.value)
|
|
3112
3209
|
}, [
|
|
3113
3210
|
z("table", {
|
|
3114
3211
|
class: "vf-datatable__table",
|
|
3115
|
-
"aria-label":
|
|
3212
|
+
"aria-label": g.ariaLabel
|
|
3116
3213
|
}, [
|
|
3117
|
-
|
|
3118
|
-
z("tr",
|
|
3119
|
-
(
|
|
3120
|
-
key:
|
|
3121
|
-
class: I(["vf-datatable__header",
|
|
3122
|
-
style:
|
|
3123
|
-
"aria-sort":
|
|
3214
|
+
g.showHeader ? (b(), h("thead", Po, [
|
|
3215
|
+
z("tr", Io, [
|
|
3216
|
+
(b(!0), h(re, null, de(g.columns, (y) => (b(), h("th", {
|
|
3217
|
+
key: y.field,
|
|
3218
|
+
class: I(["vf-datatable__header", M(y)]),
|
|
3219
|
+
style: me(G(y)),
|
|
3220
|
+
"aria-sort": $(y),
|
|
3124
3221
|
scope: "col"
|
|
3125
3222
|
}, [
|
|
3126
|
-
u(
|
|
3223
|
+
u(y) ? (b(), h("button", {
|
|
3127
3224
|
key: 0,
|
|
3128
3225
|
type: "button",
|
|
3129
3226
|
class: "vf-datatable__sort-button",
|
|
3130
|
-
onClick: (R) => k(
|
|
3227
|
+
onClick: (R) => k(y)
|
|
3131
3228
|
}, [
|
|
3132
|
-
z("span",
|
|
3133
|
-
|
|
3229
|
+
z("span", Do, [
|
|
3230
|
+
g.$slots[`header-${y.field}`] ? F(g.$slots, `header-${y.field}`, {
|
|
3134
3231
|
key: 0,
|
|
3135
|
-
column:
|
|
3136
|
-
}) : (
|
|
3137
|
-
U(O(
|
|
3232
|
+
column: y
|
|
3233
|
+
}) : (b(), h(re, { key: 1 }, [
|
|
3234
|
+
U(O(y.header ?? y.field), 1)
|
|
3138
3235
|
], 64))
|
|
3139
3236
|
]),
|
|
3140
3237
|
z("span", {
|
|
3141
|
-
class: I(["vf-datatable__sort-icon", A(
|
|
3142
|
-
}, O(
|
|
3143
|
-
], 8,
|
|
3144
|
-
|
|
3238
|
+
class: I(["vf-datatable__sort-icon", A(y)])
|
|
3239
|
+
}, O(B(y)), 3)
|
|
3240
|
+
], 8, Mo)) : (b(), h("span", Eo, [
|
|
3241
|
+
g.$slots[`header-${y.field}`] ? F(g.$slots, `header-${y.field}`, {
|
|
3145
3242
|
key: 0,
|
|
3146
|
-
column:
|
|
3147
|
-
}) : (
|
|
3148
|
-
U(O(
|
|
3243
|
+
column: y
|
|
3244
|
+
}) : (b(), h(re, { key: 1 }, [
|
|
3245
|
+
U(O(y.header ?? y.field), 1)
|
|
3149
3246
|
], 64))
|
|
3150
3247
|
]))
|
|
3151
|
-
], 14,
|
|
3248
|
+
], 14, Oo))), 128))
|
|
3152
3249
|
])
|
|
3153
|
-
])) :
|
|
3154
|
-
z("tbody",
|
|
3155
|
-
|
|
3250
|
+
])) : L("", !0),
|
|
3251
|
+
z("tbody", Ao, [
|
|
3252
|
+
g.loading ? (b(), h("tr", Wo, [
|
|
3156
3253
|
z("td", {
|
|
3157
3254
|
class: "vf-datatable__cell vf-datatable__cell_state",
|
|
3158
3255
|
colspan: l.value
|
|
3159
3256
|
}, [
|
|
3160
|
-
F(
|
|
3161
|
-
U(O(
|
|
3257
|
+
F(g.$slots, "loading", {}, () => [
|
|
3258
|
+
U(O(g.loadingText), 1)
|
|
3162
3259
|
])
|
|
3163
|
-
], 8,
|
|
3164
|
-
])) : s.value.length ? (
|
|
3165
|
-
key: p(
|
|
3166
|
-
class: I(["vf-datatable__row",
|
|
3167
|
-
onClick: (
|
|
3260
|
+
], 8, Ho)
|
|
3261
|
+
])) : s.value.length ? (b(!0), h(re, { key: 2 }, de(s.value, (y, R) => (b(), h("tr", {
|
|
3262
|
+
key: p(y, R),
|
|
3263
|
+
class: I(["vf-datatable__row", E(R)]),
|
|
3264
|
+
onClick: (H) => T(y, R, H)
|
|
3168
3265
|
}, [
|
|
3169
|
-
(
|
|
3170
|
-
key:
|
|
3171
|
-
class: I(["vf-datatable__cell",
|
|
3172
|
-
style:
|
|
3266
|
+
(b(!0), h(re, null, de(g.columns, (H) => (b(), h("td", {
|
|
3267
|
+
key: H.field,
|
|
3268
|
+
class: I(["vf-datatable__cell", D(H)]),
|
|
3269
|
+
style: me(G(H))
|
|
3173
3270
|
}, [
|
|
3174
|
-
|
|
3271
|
+
g.$slots[`cell-${H.field}`] ? F(g.$slots, `cell-${H.field}`, {
|
|
3175
3272
|
key: 0,
|
|
3176
|
-
row:
|
|
3177
|
-
column:
|
|
3178
|
-
value: v(
|
|
3273
|
+
row: y,
|
|
3274
|
+
column: H,
|
|
3275
|
+
value: v(y, H),
|
|
3179
3276
|
index: R
|
|
3180
|
-
}) : (
|
|
3181
|
-
U(O(w(
|
|
3277
|
+
}) : (b(), h(re, { key: 1 }, [
|
|
3278
|
+
U(O(w(y, H)), 1)
|
|
3182
3279
|
], 64))
|
|
3183
3280
|
], 6))), 128))
|
|
3184
|
-
], 10,
|
|
3281
|
+
], 10, Go))), 128)) : (b(), h("tr", No, [
|
|
3185
3282
|
z("td", {
|
|
3186
3283
|
class: "vf-datatable__cell vf-datatable__cell_state",
|
|
3187
3284
|
colspan: l.value
|
|
3188
3285
|
}, [
|
|
3189
|
-
F(
|
|
3190
|
-
U(O(
|
|
3286
|
+
F(g.$slots, "empty", {}, () => [
|
|
3287
|
+
U(O(g.emptyText), 1)
|
|
3191
3288
|
])
|
|
3192
|
-
], 8,
|
|
3289
|
+
], 8, Ko)
|
|
3193
3290
|
]))
|
|
3194
3291
|
])
|
|
3195
|
-
], 8,
|
|
3292
|
+
], 8, Ro)
|
|
3196
3293
|
], 2));
|
|
3197
3294
|
}
|
|
3198
|
-
}),
|
|
3295
|
+
}), Yo = { class: "vf-slider__control" }, jo = ["min", "max", "step", "value", "disabled", "aria-label"], Xo = ["min", "max", "step", "value", "disabled", "aria-label"], qo = {
|
|
3199
3296
|
key: 0,
|
|
3200
3297
|
class: "vf-slider__marks"
|
|
3201
|
-
},
|
|
3298
|
+
}, Uo = {
|
|
3202
3299
|
key: 0,
|
|
3203
3300
|
class: "vf-slider__mark-label"
|
|
3204
|
-
},
|
|
3301
|
+
}, Zo = {
|
|
3205
3302
|
key: 1,
|
|
3206
3303
|
class: "vf-slider__value"
|
|
3207
|
-
},
|
|
3304
|
+
}, Sl = /* @__PURE__ */ j({
|
|
3208
3305
|
name: "VfSlider",
|
|
3209
3306
|
__name: "slider",
|
|
3210
3307
|
props: {
|
|
3211
|
-
modelValue: {},
|
|
3308
|
+
modelValue: { default: void 0 },
|
|
3212
3309
|
min: { default: 0 },
|
|
3213
3310
|
max: { default: 100 },
|
|
3214
3311
|
step: { default: 1 },
|
|
@@ -3224,73 +3321,73 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
3224
3321
|
},
|
|
3225
3322
|
emits: ["update:modelValue", "input", "change", "focus", "blur"],
|
|
3226
3323
|
setup(a, { emit: e }) {
|
|
3227
|
-
const r = e, t = a, o = m(() => t.range || Array.isArray(t.modelValue)), d = m(() => Number.isFinite(t.min) ? t.min : 0), n = m(() => Number.isFinite(t.max) ? t.max : 100), c = m(() => t.step && t.step > 0 ? t.step : 1), l = (
|
|
3228
|
-
const
|
|
3229
|
-
return
|
|
3230
|
-
}, u = (
|
|
3231
|
-
const
|
|
3232
|
-
return Number.parseFloat(
|
|
3324
|
+
const r = e, t = a, o = m(() => t.range || Array.isArray(t.modelValue)), d = m(() => Number.isFinite(t.min) ? t.min : 0), n = m(() => Number.isFinite(t.max) ? t.max : 100), c = m(() => t.step && t.step > 0 ? t.step : 1), l = (V) => {
|
|
3325
|
+
const W = V.toString();
|
|
3326
|
+
return W.includes(".") ? W.split(".")[1].length : 0;
|
|
3327
|
+
}, u = (V) => Math.min(n.value, Math.max(d.value, V)), i = (V) => {
|
|
3328
|
+
const W = Number(V), x = d.value, N = Number.isFinite(W) ? W : x, Y = u(N), J = c.value, _ = l(J), S = Math.round((Y - d.value) / J) * J + d.value;
|
|
3329
|
+
return Number.parseFloat(S.toFixed(_));
|
|
3233
3330
|
}, s = m(() => {
|
|
3234
3331
|
if (!o.value) {
|
|
3235
|
-
const
|
|
3236
|
-
return [
|
|
3332
|
+
const N = i(t.modelValue ?? d.value);
|
|
3333
|
+
return [N, N];
|
|
3237
3334
|
}
|
|
3238
|
-
const
|
|
3239
|
-
let
|
|
3240
|
-
return
|
|
3335
|
+
const V = Array.isArray(t.modelValue) ? t.modelValue : [d.value, n.value];
|
|
3336
|
+
let W = i(V[0]), x = i(V[1]);
|
|
3337
|
+
return W > x && ([W, x] = [x, W]), [W, x];
|
|
3241
3338
|
}), f = m(
|
|
3242
3339
|
() => o.value ? s.value[0] : i(t.modelValue ?? d.value)
|
|
3243
|
-
), p = m(() => o.value ? s.value[1] : i(t.modelValue ?? d.value)), v = (
|
|
3244
|
-
const
|
|
3245
|
-
return
|
|
3246
|
-
}, w = m(() => o.value ? v(f.value) : 0), k = m(() => v(o.value ? p.value : f.value)),
|
|
3340
|
+
), p = m(() => o.value ? s.value[1] : i(t.modelValue ?? d.value)), v = (V) => {
|
|
3341
|
+
const W = n.value - d.value;
|
|
3342
|
+
return W <= 0 ? 0 : (V - d.value) / W * 100;
|
|
3343
|
+
}, w = m(() => o.value ? v(f.value) : 0), k = m(() => v(o.value ? p.value : f.value)), B = m(() => ({
|
|
3247
3344
|
"--vf-slider-start": `${w.value}%`,
|
|
3248
3345
|
"--vf-slider-end": `${k.value}%`
|
|
3249
3346
|
})), A = m(() => {
|
|
3250
|
-
const
|
|
3251
|
-
return t.size !== "normal" &&
|
|
3252
|
-
}),
|
|
3347
|
+
const V = ["vf-slider", `vf-slider_${t.variant}`];
|
|
3348
|
+
return t.size !== "normal" && V.push(`vf-slider_${t.size}`), t.disabled && V.push("vf-slider_disabled"), o.value && V.push("vf-slider_range"), V;
|
|
3349
|
+
}), $ = m(() => ({
|
|
3253
3350
|
zIndex: o.value && w.value > 50 ? 4 : 3
|
|
3254
|
-
})),
|
|
3351
|
+
})), E = m(() => ({
|
|
3255
3352
|
zIndex: o.value && w.value > 50 ? 3 : 4
|
|
3256
|
-
})),
|
|
3353
|
+
})), M = (V, W, x) => {
|
|
3257
3354
|
if (t.disabled)
|
|
3258
3355
|
return;
|
|
3259
|
-
const
|
|
3260
|
-
r("update:modelValue",
|
|
3261
|
-
},
|
|
3356
|
+
const N = i(Number(V));
|
|
3357
|
+
r("update:modelValue", N), r(x, W);
|
|
3358
|
+
}, D = (V, W, x, N) => {
|
|
3262
3359
|
if (t.disabled)
|
|
3263
3360
|
return;
|
|
3264
|
-
const Y = i(Number(
|
|
3265
|
-
let [J,
|
|
3266
|
-
|
|
3267
|
-
},
|
|
3268
|
-
const
|
|
3361
|
+
const Y = i(Number(V));
|
|
3362
|
+
let [J, _] = s.value;
|
|
3363
|
+
W === "start" ? J = Math.min(Y, _) : _ = Math.max(Y, J), r("update:modelValue", [J, _]), r(N, x);
|
|
3364
|
+
}, G = (V) => {
|
|
3365
|
+
const W = V.target;
|
|
3269
3366
|
if (o.value) {
|
|
3270
|
-
|
|
3367
|
+
D(W.value, "start", V, "input");
|
|
3271
3368
|
return;
|
|
3272
3369
|
}
|
|
3273
|
-
|
|
3274
|
-
},
|
|
3275
|
-
const
|
|
3276
|
-
|
|
3277
|
-
},
|
|
3278
|
-
const
|
|
3370
|
+
M(W.value, V, "input");
|
|
3371
|
+
}, T = (V) => {
|
|
3372
|
+
const W = V.target;
|
|
3373
|
+
D(W.value, "end", V, "input");
|
|
3374
|
+
}, g = (V) => {
|
|
3375
|
+
const W = V.target;
|
|
3279
3376
|
if (o.value) {
|
|
3280
|
-
|
|
3377
|
+
D(W.value, "start", V, "change");
|
|
3281
3378
|
return;
|
|
3282
3379
|
}
|
|
3283
|
-
|
|
3284
|
-
}, C = (
|
|
3285
|
-
const
|
|
3286
|
-
|
|
3287
|
-
},
|
|
3288
|
-
return (
|
|
3380
|
+
M(W.value, V, "change");
|
|
3381
|
+
}, C = (V) => {
|
|
3382
|
+
const W = V.target;
|
|
3383
|
+
D(W.value, "end", V, "change");
|
|
3384
|
+
}, y = (V) => r("focus", V), R = (V) => r("blur", V), H = m(() => t.marks ?? []), q = (V) => ({ left: `${v(u(V))}%` }), ee = m(() => o.value ? `${s.value[0]} - ${s.value[1]}` : `${f.value}`), X = m(() => o.value ? t.ariaLabelStart : t.ariaLabel), le = m(() => o.value ? t.ariaLabelEnd : t.ariaLabel);
|
|
3385
|
+
return (V, W) => (b(), h("div", {
|
|
3289
3386
|
class: I(A.value),
|
|
3290
|
-
style:
|
|
3387
|
+
style: me(B.value)
|
|
3291
3388
|
}, [
|
|
3292
|
-
z("div",
|
|
3293
|
-
|
|
3389
|
+
z("div", Yo, [
|
|
3390
|
+
W[0] || (W[0] = z("div", { class: "vf-slider__track" }, [
|
|
3294
3391
|
z("div", { class: "vf-slider__fill" })
|
|
3295
3392
|
], -1)),
|
|
3296
3393
|
z("input", {
|
|
@@ -3300,15 +3397,15 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
3300
3397
|
max: n.value,
|
|
3301
3398
|
step: c.value,
|
|
3302
3399
|
value: f.value,
|
|
3303
|
-
disabled:
|
|
3400
|
+
disabled: V.disabled,
|
|
3304
3401
|
"aria-label": X.value,
|
|
3305
|
-
style:
|
|
3306
|
-
onInput:
|
|
3307
|
-
onChange:
|
|
3308
|
-
onFocus:
|
|
3402
|
+
style: me($.value),
|
|
3403
|
+
onInput: G,
|
|
3404
|
+
onChange: g,
|
|
3405
|
+
onFocus: y,
|
|
3309
3406
|
onBlur: R
|
|
3310
|
-
}, null, 44,
|
|
3311
|
-
o.value ? (
|
|
3407
|
+
}, null, 44, jo),
|
|
3408
|
+
o.value ? (b(), h("input", {
|
|
3312
3409
|
key: 0,
|
|
3313
3410
|
class: "vf-slider__input vf-slider__input_end",
|
|
3314
3411
|
type: "range",
|
|
@@ -3316,36 +3413,36 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
3316
3413
|
max: n.value,
|
|
3317
3414
|
step: c.value,
|
|
3318
3415
|
value: p.value,
|
|
3319
|
-
disabled:
|
|
3416
|
+
disabled: V.disabled,
|
|
3320
3417
|
"aria-label": le.value,
|
|
3321
|
-
style:
|
|
3322
|
-
onInput:
|
|
3418
|
+
style: me(E.value),
|
|
3419
|
+
onInput: T,
|
|
3323
3420
|
onChange: C,
|
|
3324
|
-
onFocus:
|
|
3421
|
+
onFocus: y,
|
|
3325
3422
|
onBlur: R
|
|
3326
|
-
}, null, 44,
|
|
3423
|
+
}, null, 44, Xo)) : L("", !0)
|
|
3327
3424
|
]),
|
|
3328
|
-
|
|
3329
|
-
(
|
|
3330
|
-
key:
|
|
3425
|
+
H.value.length ? (b(), h("div", qo, [
|
|
3426
|
+
(b(!0), h(re, null, de(H.value, (x) => (b(), h("span", {
|
|
3427
|
+
key: x.value,
|
|
3331
3428
|
class: "vf-slider__mark",
|
|
3332
|
-
style:
|
|
3429
|
+
style: me(q(x.value))
|
|
3333
3430
|
}, [
|
|
3334
|
-
|
|
3431
|
+
x.label ? (b(), h("span", Uo, O(x.label), 1)) : L("", !0)
|
|
3335
3432
|
], 4))), 128))
|
|
3336
|
-
])) :
|
|
3337
|
-
|
|
3433
|
+
])) : L("", !0),
|
|
3434
|
+
V.showValue ? (b(), h("div", Zo, O(ee.value), 1)) : L("", !0)
|
|
3338
3435
|
], 6));
|
|
3339
3436
|
}
|
|
3340
|
-
}),
|
|
3437
|
+
}), Jo = ["aria-label"], Qo = { class: "vf-breadcrumbs__list" }, er = {
|
|
3341
3438
|
key: 0,
|
|
3342
3439
|
class: "vf-breadcrumbs__current",
|
|
3343
3440
|
"aria-current": "page"
|
|
3344
|
-
},
|
|
3441
|
+
}, tr = {
|
|
3345
3442
|
key: 0,
|
|
3346
3443
|
class: "vf-breadcrumbs__separator",
|
|
3347
3444
|
"aria-hidden": "true"
|
|
3348
|
-
},
|
|
3445
|
+
}, Fl = /* @__PURE__ */ j({
|
|
3349
3446
|
name: "VfBreadcrumbs",
|
|
3350
3447
|
__name: "breadcrumbs",
|
|
3351
3448
|
props: {
|
|
@@ -3355,12 +3452,12 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
3355
3452
|
},
|
|
3356
3453
|
setup(a) {
|
|
3357
3454
|
const e = a, r = m(() => e.items ?? []), t = m(() => r.value.some((n) => n.active !== void 0)), o = (n, c) => t.value ? n.active === !0 : c === r.value.length - 1, d = (n, c) => `${n.label ?? n.to ?? n.href ?? n.url ?? "crumb"}_${c.toString()}`;
|
|
3358
|
-
return (n, c) => (
|
|
3455
|
+
return (n, c) => (b(), h("nav", {
|
|
3359
3456
|
class: "vf-breadcrumbs",
|
|
3360
3457
|
"aria-label": n.ariaLabel
|
|
3361
3458
|
}, [
|
|
3362
|
-
z("ol",
|
|
3363
|
-
(
|
|
3459
|
+
z("ol", Qo, [
|
|
3460
|
+
(b(!0), h(re, null, de(r.value, (l, u) => (b(), h(re, {
|
|
3364
3461
|
key: d(l, u)
|
|
3365
3462
|
}, [
|
|
3366
3463
|
z("li", {
|
|
@@ -3372,7 +3469,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
3372
3469
|
isLast: u === r.value.length - 1,
|
|
3373
3470
|
active: o(l, u)
|
|
3374
3471
|
}, () => [
|
|
3375
|
-
o(l, u) ? (
|
|
3472
|
+
o(l, u) ? (b(), h("span", er, O(l.label), 1)) : (b(), se(Ge, {
|
|
3376
3473
|
key: 1,
|
|
3377
3474
|
class: "vf-breadcrumbs__link",
|
|
3378
3475
|
to: l.to,
|
|
@@ -3386,20 +3483,20 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
3386
3483
|
}, 1032, ["to", "href", "disabled"]))
|
|
3387
3484
|
])
|
|
3388
3485
|
], 2),
|
|
3389
|
-
u < r.value.length - 1 ? (
|
|
3486
|
+
u < r.value.length - 1 ? (b(), h("li", tr, [
|
|
3390
3487
|
F(n.$slots, "separator", { separator: n.separator }, () => [
|
|
3391
3488
|
U(O(n.separator), 1)
|
|
3392
3489
|
])
|
|
3393
|
-
])) :
|
|
3490
|
+
])) : L("", !0)
|
|
3394
3491
|
], 64))), 128))
|
|
3395
3492
|
])
|
|
3396
|
-
], 8,
|
|
3493
|
+
], 8, Jo));
|
|
3397
3494
|
}
|
|
3398
|
-
}),
|
|
3495
|
+
}), ar = ["dark", "light", "theme", "preset", "colors", "components", "colorScheme"], or = (a) => {
|
|
3399
3496
|
const e = a.replace(/([A-Z])/g, "-$1");
|
|
3400
3497
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
3401
|
-
},
|
|
3402
|
-
if (!
|
|
3498
|
+
}, rr = (a) => a.filter((e) => !ar.includes(e)).map((e) => or(e)).join("-").toLowerCase(), He = (a) => a.join("."), lr = (a) => /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(a), je = (a) => {
|
|
3499
|
+
if (!lr(a))
|
|
3403
3500
|
return null;
|
|
3404
3501
|
if (a.length === 4) {
|
|
3405
3502
|
const e = a[1], r = a[2], t = a[3];
|
|
@@ -3415,7 +3512,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
3415
3512
|
}, Ze = (a) => {
|
|
3416
3513
|
const [e, r, t] = lt(a);
|
|
3417
3514
|
return `${e}, ${r}, ${t}`;
|
|
3418
|
-
},
|
|
3515
|
+
}, sr = (a, e, r) => {
|
|
3419
3516
|
const t = a / 255, o = e / 255, d = r / 255, n = Math.max(t, o, d), c = Math.min(t, o, d), l = n - c;
|
|
3420
3517
|
let u = 0, i = 0;
|
|
3421
3518
|
const s = (n + c) / 2;
|
|
@@ -3434,18 +3531,18 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
3434
3531
|
u *= 60, u < 0 && (u += 360);
|
|
3435
3532
|
}
|
|
3436
3533
|
return [u, i * 100, s * 100];
|
|
3437
|
-
},
|
|
3534
|
+
}, nr = (a, e, r) => {
|
|
3438
3535
|
const t = e / 100, o = r / 100, d = (1 - Math.abs(2 * o - 1)) * t, n = d * (1 - Math.abs(a / 60 % 2 - 1)), c = o - d / 2;
|
|
3439
3536
|
let l = 0, u = 0, i = 0;
|
|
3440
3537
|
a >= 0 && a < 60 ? (l = d, u = n, i = 0) : a >= 60 && a < 120 ? (l = n, u = d, i = 0) : a >= 120 && a < 180 ? (l = 0, u = d, i = n) : a >= 180 && a < 240 ? (l = 0, u = n, i = d) : a >= 240 && a < 300 ? (l = n, u = 0, i = d) : (l = d, u = 0, i = n);
|
|
3441
3538
|
const s = Math.round((l + c) * 255), f = Math.round((u + c) * 255), p = Math.round((i + c) * 255);
|
|
3442
3539
|
return [s, f, p];
|
|
3443
|
-
},
|
|
3540
|
+
}, ir = (a, e, r) => `#${[a, e, r].map((t) => t.toString(16).padStart(2, "0")).join("")}`, dr = (a, e, r) => Math.min(r, Math.max(e, a)), ur = (a, e) => {
|
|
3444
3541
|
const r = je(a);
|
|
3445
3542
|
if (!r)
|
|
3446
3543
|
return a;
|
|
3447
|
-
const [t, o, d] = lt(r), [n, c, l] =
|
|
3448
|
-
return
|
|
3544
|
+
const [t, o, d] = lt(r), [n, c, l] = sr(t, o, d), i = (e - 5) * 7, s = dr(l + i, 0, 100), [f, p, v] = nr(n, c, s);
|
|
3545
|
+
return ir(f, p, v);
|
|
3449
3546
|
}, Me = (a) => !!a && typeof a == "object" && !Array.isArray(a), Xe = (a, e) => {
|
|
3450
3547
|
if (!e)
|
|
3451
3548
|
return { ...a };
|
|
@@ -3455,7 +3552,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
3455
3552
|
Me(d) && Me(o) ? r[t] = Xe(d, o) : r[t] = o;
|
|
3456
3553
|
}
|
|
3457
3554
|
return r;
|
|
3458
|
-
},
|
|
3555
|
+
}, cr = (a) => {
|
|
3459
3556
|
if (!a)
|
|
3460
3557
|
return null;
|
|
3461
3558
|
if (Me(a) && "preset" in a) {
|
|
@@ -3469,7 +3566,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
3469
3566
|
};
|
|
3470
3567
|
}
|
|
3471
3568
|
return { preset: a };
|
|
3472
|
-
},
|
|
3569
|
+
}, vr = (a) => {
|
|
3473
3570
|
const e = [], r = [], t = [], o = [], d = (l) => t.push(l), n = (l) => o.push(l), c = (l, u) => {
|
|
3474
3571
|
if (!(!l || typeof l != "object"))
|
|
3475
3572
|
for (const i in l) {
|
|
@@ -3486,7 +3583,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
3486
3583
|
n(`Theme value "${He(f)}" is not a string and will be ignored.`);
|
|
3487
3584
|
continue;
|
|
3488
3585
|
}
|
|
3489
|
-
const v = f.includes("colorScheme") && f.includes("dark") ? r : e, w =
|
|
3586
|
+
const v = f.includes("colorScheme") && f.includes("dark") ? r : e, w = rr(f);
|
|
3490
3587
|
if (v.push(`--vf-${w}: ${s}`), f.includes("colors")) {
|
|
3491
3588
|
const k = je(s);
|
|
3492
3589
|
if (!k) {
|
|
@@ -3496,15 +3593,15 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
3496
3593
|
continue;
|
|
3497
3594
|
}
|
|
3498
3595
|
if (v.push(`--vf-${w}-rgb: ${Ze(k)}`), i !== "white")
|
|
3499
|
-
for (let
|
|
3500
|
-
const A =
|
|
3501
|
-
v.push(`--vf-${w}-${
|
|
3596
|
+
for (let B = 1; B < 10; ++B) {
|
|
3597
|
+
const A = ur(k, B);
|
|
3598
|
+
v.push(`--vf-${w}-${B}00: ${A}`), v.push(`--vf-${w}-${B}00-rgb: ${Ze(A)}`);
|
|
3502
3599
|
}
|
|
3503
3600
|
}
|
|
3504
3601
|
}
|
|
3505
3602
|
};
|
|
3506
3603
|
return c(a, []), { baseVars: e, darkVars: r, warnings: t, errors: o };
|
|
3507
|
-
},
|
|
3604
|
+
}, fr = (a) => {
|
|
3508
3605
|
if (typeof document > "u")
|
|
3509
3606
|
return null;
|
|
3510
3607
|
const e = document.getElementById(a);
|
|
@@ -3512,11 +3609,11 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
3512
3609
|
return e;
|
|
3513
3610
|
const r = document.createElement("style");
|
|
3514
3611
|
return r.id = a, document.head.appendChild(r), r;
|
|
3515
|
-
},
|
|
3612
|
+
}, pr = (a) => ({
|
|
3516
3613
|
selector: a.selector ?? ":root",
|
|
3517
3614
|
darkSelector: a.darkSelector ?? ":root[data-theme=dark]"
|
|
3518
|
-
}),
|
|
3519
|
-
const { baseVars: o, darkVars: d, warnings: n, errors: c } =
|
|
3615
|
+
}), br = (a, e, r, t) => {
|
|
3616
|
+
const { baseVars: o, darkVars: d, warnings: n, errors: c } = vr(a), l = fr("vueforge-theme");
|
|
3520
3617
|
if (!l)
|
|
3521
3618
|
return;
|
|
3522
3619
|
if (c.length) {
|
|
@@ -3534,12 +3631,12 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
3534
3631
|
};
|
|
3535
3632
|
let ye = null;
|
|
3536
3633
|
const st = (a) => {
|
|
3537
|
-
const e =
|
|
3634
|
+
const e = cr(a);
|
|
3538
3635
|
if (!e)
|
|
3539
3636
|
return;
|
|
3540
|
-
const r = Xe(e.preset, e.overrides), { selector: t, darkSelector: o } =
|
|
3541
|
-
ye = { ...e },
|
|
3542
|
-
},
|
|
3637
|
+
const r = Xe(e.preset, e.overrides), { selector: t, darkSelector: o } = pr(e);
|
|
3638
|
+
ye = { ...e }, br(r, t, o, e.strict);
|
|
3639
|
+
}, Vl = (a) => {
|
|
3543
3640
|
if (!ye)
|
|
3544
3641
|
return;
|
|
3545
3642
|
const e = a.overrides === void 0 ? ye.overrides : Xe(ye.overrides ?? {}, a.overrides ?? {}), r = {
|
|
@@ -3549,7 +3646,7 @@ const st = (a) => {
|
|
|
3549
3646
|
darkSelector: a.darkSelector ?? ye.darkSelector
|
|
3550
3647
|
};
|
|
3551
3648
|
st(r);
|
|
3552
|
-
},
|
|
3649
|
+
}, Ll = () => ye ? { ...ye } : null, Tl = {
|
|
3553
3650
|
install(a, e = {}) {
|
|
3554
3651
|
e.theme && st(e.theme);
|
|
3555
3652
|
}
|
|
@@ -3616,7 +3713,7 @@ const st = (a) => {
|
|
|
3616
3713
|
dividerColor: "#2e2e32"
|
|
3617
3714
|
}
|
|
3618
3715
|
}
|
|
3619
|
-
},
|
|
3716
|
+
}, mr = {
|
|
3620
3717
|
fontSize: "var(--vf-typography-font-size)",
|
|
3621
3718
|
padding: "var(--vf-controls-padding-y) var(--vf-controls-padding-x)",
|
|
3622
3719
|
borderRadius: "var(--vf-radii-md)",
|
|
@@ -3758,11 +3855,11 @@ const st = (a) => {
|
|
|
3758
3855
|
}
|
|
3759
3856
|
}
|
|
3760
3857
|
}
|
|
3761
|
-
},
|
|
3858
|
+
}, gr = {
|
|
3762
3859
|
padding: "12px",
|
|
3763
3860
|
borderColor: "var(--vf-border-color)",
|
|
3764
3861
|
borderRadius: "var(--vf-radii-md)"
|
|
3765
|
-
},
|
|
3862
|
+
}, hr = {
|
|
3766
3863
|
gap: "0.5rem",
|
|
3767
3864
|
fontSize: "var(--vf-typography-font-size)",
|
|
3768
3865
|
padding: "var(--vf-controls-padding-y) var(--vf-controls-padding-x)",
|
|
@@ -3783,7 +3880,40 @@ const st = (a) => {
|
|
|
3783
3880
|
padding: "var(--vf-sizes-lg-padding-y) var(--vf-sizes-lg-padding-x)",
|
|
3784
3881
|
fontSize: "var(--vf-sizes-lg-font-size)"
|
|
3785
3882
|
}
|
|
3786
|
-
},
|
|
3883
|
+
}, yr = {
|
|
3884
|
+
gap: "0.5rem",
|
|
3885
|
+
fontSize: "var(--vf-typography-font-size)",
|
|
3886
|
+
padding: "var(--vf-controls-padding-y) var(--vf-controls-padding-x)",
|
|
3887
|
+
borderRadius: "var(--vf-radii-md)",
|
|
3888
|
+
borderColor: "var(--vf-border-color)",
|
|
3889
|
+
backgroundColor: "var(--vf-controls-background-color)",
|
|
3890
|
+
textColor: "var(--vf-text-color)",
|
|
3891
|
+
placeholderColor: "var(--vf-secondary-text-color)",
|
|
3892
|
+
focusBorderColor: "var(--vf-blue-600)",
|
|
3893
|
+
focusRingShadow: "var(--vf-states-focus-ring-shadow)",
|
|
3894
|
+
hoverBorderColor: "var(--vf-blue-500)",
|
|
3895
|
+
disabledOpacity: "var(--vf-states-disabled-opacity)",
|
|
3896
|
+
controlWidth: "1.5rem",
|
|
3897
|
+
controlGap: "0.1rem",
|
|
3898
|
+
controlFontSize: "0.7rem",
|
|
3899
|
+
controlRadius: "var(--vf-radii-sm)",
|
|
3900
|
+
controlBackgroundColor: "transparent",
|
|
3901
|
+
controlHoverBackgroundColor: "var(--vf-gutter-color)",
|
|
3902
|
+
controlTextColor: "var(--vf-text-color)",
|
|
3903
|
+
controlBorderColor: "var(--vf-border-color)",
|
|
3904
|
+
small: {
|
|
3905
|
+
padding: "var(--vf-sizes-sm-padding-y) var(--vf-sizes-sm-padding-x)",
|
|
3906
|
+
fontSize: "var(--vf-sizes-sm-font-size)",
|
|
3907
|
+
controlWidth: "1.25rem",
|
|
3908
|
+
controlFontSize: "0.6rem"
|
|
3909
|
+
},
|
|
3910
|
+
large: {
|
|
3911
|
+
padding: "var(--vf-sizes-lg-padding-y) var(--vf-sizes-lg-padding-x)",
|
|
3912
|
+
fontSize: "var(--vf-sizes-lg-font-size)",
|
|
3913
|
+
controlWidth: "1.75rem",
|
|
3914
|
+
controlFontSize: "0.8rem"
|
|
3915
|
+
}
|
|
3916
|
+
}, _r = {
|
|
3787
3917
|
gap: "0.375rem",
|
|
3788
3918
|
textColor: "var(--vf-text-color)",
|
|
3789
3919
|
labelFontSize: "0.875rem",
|
|
@@ -3803,7 +3933,7 @@ const st = (a) => {
|
|
|
3803
3933
|
labelFontSize: "0.9375rem",
|
|
3804
3934
|
hintFontSize: "0.875rem"
|
|
3805
3935
|
}
|
|
3806
|
-
},
|
|
3936
|
+
}, Cr = {
|
|
3807
3937
|
gap: "0.5rem",
|
|
3808
3938
|
fontSize: "var(--vf-typography-font-size)",
|
|
3809
3939
|
padding: "var(--vf-controls-padding-y) var(--vf-controls-padding-x)",
|
|
@@ -3826,10 +3956,10 @@ const st = (a) => {
|
|
|
3826
3956
|
padding: "var(--vf-sizes-lg-padding-y) var(--vf-sizes-lg-padding-x)",
|
|
3827
3957
|
fontSize: "var(--vf-sizes-lg-font-size)"
|
|
3828
3958
|
}
|
|
3829
|
-
},
|
|
3959
|
+
}, kr = {
|
|
3830
3960
|
hoverColor: "var(--vf-blue)",
|
|
3831
3961
|
activeColor: "var(--vf-blue)"
|
|
3832
|
-
},
|
|
3962
|
+
}, $r = {
|
|
3833
3963
|
gap: "0.35rem",
|
|
3834
3964
|
fontSize: "var(--vf-typography-font-size)",
|
|
3835
3965
|
textColor: "var(--vf-secondary-text-color)",
|
|
@@ -3837,7 +3967,7 @@ const st = (a) => {
|
|
|
3837
3967
|
activeColor: "var(--vf-text-color)",
|
|
3838
3968
|
separatorColor: "var(--vf-divider-color)",
|
|
3839
3969
|
disabledOpacity: "var(--vf-states-disabled-opacity)"
|
|
3840
|
-
},
|
|
3970
|
+
}, wr = {
|
|
3841
3971
|
iconGap: "6px",
|
|
3842
3972
|
submenuOffset: "12px",
|
|
3843
3973
|
separatorThickness: "1px",
|
|
@@ -3857,7 +3987,7 @@ const st = (a) => {
|
|
|
3857
3987
|
marginBottom: "0.5rem",
|
|
3858
3988
|
marginLeft: "0.5rem"
|
|
3859
3989
|
}
|
|
3860
|
-
},
|
|
3990
|
+
}, xr = {
|
|
3861
3991
|
width: "90vw",
|
|
3862
3992
|
maxWidth: "520px",
|
|
3863
3993
|
maxHeight: "80vh",
|
|
@@ -3884,7 +4014,7 @@ const st = (a) => {
|
|
|
3884
4014
|
closeColor: "var(--vf-text-color)",
|
|
3885
4015
|
closeFontSize: "1.25rem",
|
|
3886
4016
|
closeHoverBackgroundColor: "rgba(0, 0, 0, 0.06)"
|
|
3887
|
-
},
|
|
4017
|
+
}, zr = {
|
|
3888
4018
|
width: "320px",
|
|
3889
4019
|
widthSm: "260px",
|
|
3890
4020
|
widthLg: "420px",
|
|
@@ -3910,9 +4040,9 @@ const st = (a) => {
|
|
|
3910
4040
|
closeColor: "var(--vf-text-color)",
|
|
3911
4041
|
closeFontSize: "1.25rem",
|
|
3912
4042
|
closeHoverBackgroundColor: "rgba(0, 0, 0, 0.06)"
|
|
3913
|
-
},
|
|
4043
|
+
}, Br = {
|
|
3914
4044
|
backgroundColor: "var(--vf-bg-color)"
|
|
3915
|
-
},
|
|
4045
|
+
}, Sr = {
|
|
3916
4046
|
minWidth: "12rem",
|
|
3917
4047
|
fontSize: "var(--vf-typography-font-size)",
|
|
3918
4048
|
controlGap: "0.75rem",
|
|
@@ -3945,7 +4075,7 @@ const st = (a) => {
|
|
|
3945
4075
|
padding: "var(--vf-sizes-lg-padding-y) var(--vf-sizes-lg-padding-x)",
|
|
3946
4076
|
fontSize: "var(--vf-sizes-lg-font-size)"
|
|
3947
4077
|
}
|
|
3948
|
-
},
|
|
4078
|
+
}, Fr = {
|
|
3949
4079
|
minWidth: "12rem",
|
|
3950
4080
|
fontSize: "var(--vf-typography-font-size)",
|
|
3951
4081
|
controlGap: "0.5rem",
|
|
@@ -3984,7 +4114,7 @@ const st = (a) => {
|
|
|
3984
4114
|
padding: "var(--vf-sizes-lg-padding-y) var(--vf-sizes-lg-padding-x)",
|
|
3985
4115
|
fontSize: "var(--vf-sizes-lg-font-size)"
|
|
3986
4116
|
}
|
|
3987
|
-
},
|
|
4117
|
+
}, Vr = {
|
|
3988
4118
|
minWidth: "12rem",
|
|
3989
4119
|
fontSize: "var(--vf-typography-font-size)",
|
|
3990
4120
|
controlGap: "0.5rem",
|
|
@@ -4029,7 +4159,7 @@ const st = (a) => {
|
|
|
4029
4159
|
padding: "var(--vf-sizes-lg-padding-y) var(--vf-sizes-lg-padding-x)",
|
|
4030
4160
|
fontSize: "var(--vf-sizes-lg-font-size)"
|
|
4031
4161
|
}
|
|
4032
|
-
},
|
|
4162
|
+
}, Lr = {
|
|
4033
4163
|
minWidth: "12rem",
|
|
4034
4164
|
fontSize: "var(--vf-typography-font-size)",
|
|
4035
4165
|
controlGap: "0.75rem",
|
|
@@ -4079,7 +4209,7 @@ const st = (a) => {
|
|
|
4079
4209
|
fontSize: "var(--vf-sizes-lg-font-size)",
|
|
4080
4210
|
daySize: "2.2rem"
|
|
4081
4211
|
}
|
|
4082
|
-
},
|
|
4212
|
+
}, Tr = {
|
|
4083
4213
|
gap: "0.4rem",
|
|
4084
4214
|
itemMinWidth: "2rem",
|
|
4085
4215
|
fontSize: "var(--vf-typography-font-size)",
|
|
@@ -4104,7 +4234,7 @@ const st = (a) => {
|
|
|
4104
4234
|
fontSize: "var(--vf-sizes-lg-font-size)",
|
|
4105
4235
|
padding: "0.45rem 0.8rem"
|
|
4106
4236
|
}
|
|
4107
|
-
},
|
|
4237
|
+
}, Rr = {
|
|
4108
4238
|
size: "1rem",
|
|
4109
4239
|
gap: "0.5rem",
|
|
4110
4240
|
borderRadius: "var(--vf-radii-sm)",
|
|
@@ -4116,7 +4246,7 @@ const st = (a) => {
|
|
|
4116
4246
|
checkColor: "#ffffff",
|
|
4117
4247
|
textColor: "var(--vf-text-color)",
|
|
4118
4248
|
disabledOpacity: "var(--vf-states-disabled-opacity)"
|
|
4119
|
-
},
|
|
4249
|
+
}, Pr = {
|
|
4120
4250
|
size: "1rem",
|
|
4121
4251
|
dotSize: "0.45rem",
|
|
4122
4252
|
gap: "0.5rem",
|
|
@@ -4130,7 +4260,7 @@ const st = (a) => {
|
|
|
4130
4260
|
dotColor: "#ffffff",
|
|
4131
4261
|
textColor: "var(--vf-text-color)",
|
|
4132
4262
|
disabledOpacity: "var(--vf-states-disabled-opacity)"
|
|
4133
|
-
},
|
|
4263
|
+
}, Ir = {
|
|
4134
4264
|
width: "2.25rem",
|
|
4135
4265
|
height: "1.25rem",
|
|
4136
4266
|
thumbSize: "1rem",
|
|
@@ -4142,7 +4272,7 @@ const st = (a) => {
|
|
|
4142
4272
|
thumbColor: "#ffffff",
|
|
4143
4273
|
textColor: "var(--vf-text-color)",
|
|
4144
4274
|
disabledOpacity: "var(--vf-states-disabled-opacity)"
|
|
4145
|
-
},
|
|
4275
|
+
}, Or = {
|
|
4146
4276
|
gap: "0.75rem",
|
|
4147
4277
|
listGap: "0.5rem",
|
|
4148
4278
|
listBorderWidth: "1px",
|
|
@@ -4163,7 +4293,7 @@ const st = (a) => {
|
|
|
4163
4293
|
panelBackgroundColor: "transparent",
|
|
4164
4294
|
panelTextColor: "var(--vf-text-color)",
|
|
4165
4295
|
disabledOpacity: "var(--vf-states-disabled-opacity)"
|
|
4166
|
-
},
|
|
4296
|
+
}, Mr = {
|
|
4167
4297
|
gap: "0.75rem",
|
|
4168
4298
|
borderRadius: "var(--vf-radii-md)",
|
|
4169
4299
|
borderColor: "var(--vf-border-color)",
|
|
@@ -4194,7 +4324,7 @@ const st = (a) => {
|
|
|
4194
4324
|
headerFontSize: "1rem",
|
|
4195
4325
|
contentPadding: "0.9rem 1.1rem"
|
|
4196
4326
|
}
|
|
4197
|
-
},
|
|
4327
|
+
}, Dr = {
|
|
4198
4328
|
padding: "0.35rem 0.6rem",
|
|
4199
4329
|
borderRadius: "8px",
|
|
4200
4330
|
backgroundColor: "rgba(0, 0, 0, 0.8)",
|
|
@@ -4205,7 +4335,7 @@ const st = (a) => {
|
|
|
4205
4335
|
zIndex: "120",
|
|
4206
4336
|
maxWidth: "240px",
|
|
4207
4337
|
arrowSize: "8px"
|
|
4208
|
-
},
|
|
4338
|
+
}, Er = {
|
|
4209
4339
|
width: "100%",
|
|
4210
4340
|
height: "1rem",
|
|
4211
4341
|
lineHeight: "0.9rem",
|
|
@@ -4213,7 +4343,7 @@ const st = (a) => {
|
|
|
4213
4343
|
backgroundColor: "var(--vf-gutter-color)",
|
|
4214
4344
|
shimmerColor: "var(--vf-bg-color)",
|
|
4215
4345
|
animationDuration: "2s"
|
|
4216
|
-
},
|
|
4346
|
+
}, Ar = {
|
|
4217
4347
|
borderColor: "var(--vf-border-color)",
|
|
4218
4348
|
borderRadius: "var(--vf-radii-md)",
|
|
4219
4349
|
backgroundColor: "var(--vf-bg-color)",
|
|
@@ -4244,7 +4374,7 @@ const st = (a) => {
|
|
|
4244
4374
|
fontSize: "var(--vf-sizes-lg-font-size)",
|
|
4245
4375
|
cellPadding: "0.75rem 0.9rem"
|
|
4246
4376
|
}
|
|
4247
|
-
},
|
|
4377
|
+
}, Wr = {
|
|
4248
4378
|
gap: "0.75rem",
|
|
4249
4379
|
padding: "0.75rem 0.9rem",
|
|
4250
4380
|
borderRadius: "var(--vf-radii-md)",
|
|
@@ -4283,7 +4413,7 @@ const st = (a) => {
|
|
|
4283
4413
|
borderColor: "rgba(var(--vf-red-600-rgb), 0.45)",
|
|
4284
4414
|
textColor: "var(--vf-text-color)"
|
|
4285
4415
|
}
|
|
4286
|
-
},
|
|
4416
|
+
}, Hr = {
|
|
4287
4417
|
gap: "0.75rem",
|
|
4288
4418
|
padding: "0.75rem 0.9rem",
|
|
4289
4419
|
borderRadius: "var(--vf-radii-md)",
|
|
@@ -4321,7 +4451,7 @@ const st = (a) => {
|
|
|
4321
4451
|
borderColor: "rgba(var(--vf-red-600-rgb), 0.45)",
|
|
4322
4452
|
textColor: "var(--vf-text-color)"
|
|
4323
4453
|
}
|
|
4324
|
-
},
|
|
4454
|
+
}, Nr = {
|
|
4325
4455
|
width: "100%",
|
|
4326
4456
|
height: "0.5rem",
|
|
4327
4457
|
borderRadius: "999px",
|
|
@@ -4357,7 +4487,7 @@ const st = (a) => {
|
|
|
4357
4487
|
circularSize: "3.25rem",
|
|
4358
4488
|
circularThickness: "7"
|
|
4359
4489
|
}
|
|
4360
|
-
},
|
|
4490
|
+
}, Kr = {
|
|
4361
4491
|
fontSize: "0.75rem",
|
|
4362
4492
|
lineHeight: "1",
|
|
4363
4493
|
paddingX: "0.5rem",
|
|
@@ -4422,7 +4552,7 @@ const st = (a) => {
|
|
|
4422
4552
|
paddingX: "0.65rem",
|
|
4423
4553
|
paddingY: "0.3rem"
|
|
4424
4554
|
}
|
|
4425
|
-
},
|
|
4555
|
+
}, Gr = {
|
|
4426
4556
|
size: "2.5rem",
|
|
4427
4557
|
fontSize: "0.9rem",
|
|
4428
4558
|
fontWeight: "600",
|
|
@@ -4448,7 +4578,7 @@ const st = (a) => {
|
|
|
4448
4578
|
fontSize: "1rem",
|
|
4449
4579
|
statusSize: "0.75rem"
|
|
4450
4580
|
}
|
|
4451
|
-
},
|
|
4581
|
+
}, Yr = {
|
|
4452
4582
|
width: "100%",
|
|
4453
4583
|
gap: "0.5rem",
|
|
4454
4584
|
textColor: "var(--vf-text-color)",
|
|
@@ -4480,81 +4610,83 @@ const st = (a) => {
|
|
|
4480
4610
|
thumbSize: "1.25rem",
|
|
4481
4611
|
valueFontSize: "1rem"
|
|
4482
4612
|
}
|
|
4483
|
-
},
|
|
4613
|
+
}, Rl = {
|
|
4484
4614
|
...Je,
|
|
4485
4615
|
components: {
|
|
4486
4616
|
base: Je,
|
|
4487
|
-
button:
|
|
4488
|
-
card:
|
|
4489
|
-
input:
|
|
4490
|
-
|
|
4491
|
-
|
|
4492
|
-
|
|
4493
|
-
|
|
4494
|
-
|
|
4495
|
-
|
|
4496
|
-
|
|
4497
|
-
|
|
4498
|
-
|
|
4499
|
-
|
|
4500
|
-
|
|
4501
|
-
|
|
4502
|
-
|
|
4503
|
-
|
|
4504
|
-
|
|
4505
|
-
|
|
4506
|
-
|
|
4507
|
-
|
|
4508
|
-
|
|
4509
|
-
|
|
4510
|
-
|
|
4511
|
-
|
|
4512
|
-
|
|
4513
|
-
|
|
4514
|
-
|
|
4515
|
-
|
|
4516
|
-
|
|
4617
|
+
button: mr,
|
|
4618
|
+
card: gr,
|
|
4619
|
+
input: hr,
|
|
4620
|
+
numberInput: yr,
|
|
4621
|
+
formField: _r,
|
|
4622
|
+
textarea: Cr,
|
|
4623
|
+
link: kr,
|
|
4624
|
+
breadcrumbs: $r,
|
|
4625
|
+
menu: wr,
|
|
4626
|
+
modal: xr,
|
|
4627
|
+
drawer: zr,
|
|
4628
|
+
popover: Br,
|
|
4629
|
+
select: Sr,
|
|
4630
|
+
autocomplete: Fr,
|
|
4631
|
+
multiselect: Vr,
|
|
4632
|
+
datepicker: Lr,
|
|
4633
|
+
pagination: Tr,
|
|
4634
|
+
checkbox: Rr,
|
|
4635
|
+
radio: Pr,
|
|
4636
|
+
switch: Ir,
|
|
4637
|
+
tabs: Or,
|
|
4638
|
+
accordion: Mr,
|
|
4639
|
+
tooltip: Dr,
|
|
4640
|
+
skeleton: Er,
|
|
4641
|
+
datatable: Ar,
|
|
4642
|
+
toast: Wr,
|
|
4643
|
+
alert: Hr,
|
|
4644
|
+
progress: Nr,
|
|
4645
|
+
badge: Kr,
|
|
4646
|
+
avatar: Gr,
|
|
4647
|
+
slider: Yr
|
|
4517
4648
|
}
|
|
4518
4649
|
};
|
|
4519
4650
|
export {
|
|
4520
|
-
|
|
4521
|
-
|
|
4522
|
-
|
|
4523
|
-
|
|
4524
|
-
|
|
4525
|
-
|
|
4526
|
-
|
|
4527
|
-
|
|
4651
|
+
fl as Accordion,
|
|
4652
|
+
pl as AccordionItem,
|
|
4653
|
+
gl as Alert,
|
|
4654
|
+
ol as Autocomplete,
|
|
4655
|
+
zl as Avatar,
|
|
4656
|
+
xl as Badge,
|
|
4657
|
+
Fl as Breadcrumbs,
|
|
4658
|
+
Zr as Button,
|
|
4528
4659
|
Ct as Card,
|
|
4529
|
-
|
|
4530
|
-
|
|
4531
|
-
|
|
4532
|
-
|
|
4533
|
-
|
|
4534
|
-
|
|
4535
|
-
|
|
4660
|
+
nl as Checkbox,
|
|
4661
|
+
Bl as DataTable,
|
|
4662
|
+
ll as DatePicker,
|
|
4663
|
+
Rl as DefaultTheme,
|
|
4664
|
+
Cl as Drawer,
|
|
4665
|
+
el as FormField,
|
|
4666
|
+
Jr as Input,
|
|
4536
4667
|
Ge as Link,
|
|
4537
|
-
|
|
4538
|
-
|
|
4539
|
-
|
|
4540
|
-
|
|
4541
|
-
|
|
4542
|
-
|
|
4543
|
-
|
|
4544
|
-
|
|
4545
|
-
|
|
4546
|
-
|
|
4547
|
-
|
|
4548
|
-
|
|
4549
|
-
|
|
4550
|
-
|
|
4551
|
-
|
|
4552
|
-
|
|
4553
|
-
|
|
4554
|
-
|
|
4555
|
-
|
|
4556
|
-
|
|
4557
|
-
|
|
4668
|
+
Ur as Menu,
|
|
4669
|
+
_l as Modal,
|
|
4670
|
+
rl as MultiSelect,
|
|
4671
|
+
Qr as NumberInput,
|
|
4672
|
+
sl as Pagination,
|
|
4673
|
+
yl as Popover,
|
|
4674
|
+
wl as Progress,
|
|
4675
|
+
dl as RadioButton,
|
|
4676
|
+
il as RadioGroup,
|
|
4677
|
+
al as Select,
|
|
4678
|
+
$l as Skeleton,
|
|
4679
|
+
Sl as Slider,
|
|
4680
|
+
hl as Switch,
|
|
4681
|
+
cl as Tab,
|
|
4682
|
+
vl as TabPanel,
|
|
4683
|
+
ul as Tabs,
|
|
4684
|
+
tl as Textarea,
|
|
4685
|
+
bl as Toast,
|
|
4686
|
+
ml as ToastContainer,
|
|
4687
|
+
kl as Tooltip,
|
|
4688
|
+
Tl as VueForge,
|
|
4689
|
+
Ll as getTheme,
|
|
4558
4690
|
st as setTheme,
|
|
4559
|
-
|
|
4691
|
+
Vl as updateTheme
|
|
4560
4692
|
};
|