@codemonster-ru/vueforge 0.28.0 → 0.29.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 +962 -894
- package/dist/index.ts.umd.js +3 -3
- package/dist/package/components/__tests__/breadcrumbs.test.d.ts +1 -0
- package/dist/package/components/breadcrumbs.vue.d.ts +43 -0
- package/dist/package/config/theme-core.d.ts +10 -0
- package/dist/package/themes/default/components/breadcrumbs.d.ts +10 -0
- package/dist/package/themes/default/index.d.ts +9 -0
- package/package.json +1 -1
package/dist/index.ts.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as j, ref as K, computed as
|
|
1
|
+
import { defineComponent as j, ref as K, computed as m, watch as oe, resolveComponent as Qe, openBlock as g, createElementBlock as _, normalizeClass as I, renderSlot as F, Fragment as re, createTextVNode as U, toDisplayString as O, createBlock as se, withCtx as be, createCommentVNode as T, createElementVNode as z, renderList as de, withKeys as te, withModifiers as Q, unref as ze, createVNode as Ke, useSlots as De, nextTick as ke, onMounted as Fe, onBeforeUnmount as $e, Teleport as xe, withDirectives as ue, vShow as ce, provide as Ne, inject as Ee, reactive as nt, createSlots as it, Transition as dt, normalizeStyle as ge } 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
|
-
const vt = ["href", "aria-disabled", "tabindex"],
|
|
4
|
+
const vt = ["href", "aria-disabled", "tabindex"], Ge = /* @__PURE__ */ j({
|
|
5
5
|
__name: "link",
|
|
6
6
|
props: {
|
|
7
7
|
to: { default: void 0 },
|
|
@@ -15,12 +15,12 @@ const vt = ["href", "aria-disabled", "tabindex"], Qe = /* @__PURE__ */ j({
|
|
|
15
15
|
},
|
|
16
16
|
emits: ["click", "active", "update:active", "onActive"],
|
|
17
17
|
setup(a, { emit: e }) {
|
|
18
|
-
const r = e, t = a, o = ut(),
|
|
18
|
+
const r = e, t = a, o = ut(), d = ct(), n = K(null), c = m(() => t.href ?? t.url), l = m(() => t.as ? t.as === "router-link" && !t.to ? "a" : t.as : t.type === "router-link" || t.type === "a" ? t.type === "router-link" && !t.to ? "a" : t.type : t.to ? "router-link" : "a"), u = m(() => t.to), i = m(() => t.to ? d.resolve(t.to) : null), s = m(() => {
|
|
19
19
|
if (l.value !== "router-link")
|
|
20
20
|
return !1;
|
|
21
|
-
const v =
|
|
21
|
+
const v = i.value;
|
|
22
22
|
return v ? v.name ? o.matched.some(({ name: w }) => w === v.name) : v.fullPath ? o.fullPath === v.fullPath : o.path === v.path : !1;
|
|
23
|
-
}), f =
|
|
23
|
+
}), f = m(() => t.active === void 0 ? s.value : t.active), p = (v) => {
|
|
24
24
|
if (!t.disabled) {
|
|
25
25
|
r("click", v);
|
|
26
26
|
return;
|
|
@@ -30,8 +30,8 @@ const vt = ["href", "aria-disabled", "tabindex"], Qe = /* @__PURE__ */ j({
|
|
|
30
30
|
return oe(s, (v) => {
|
|
31
31
|
v && (r("active"), r("onActive")), r("update:active", v);
|
|
32
32
|
}), (v, w) => {
|
|
33
|
-
const k =
|
|
34
|
-
return l.value === "a" ? (
|
|
33
|
+
const k = Qe("router-link");
|
|
34
|
+
return l.value === "a" ? (g(), _("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,13 +39,13 @@ const vt = ["href", "aria-disabled", "tabindex"], Qe = /* @__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 }) : (
|
|
43
|
-
|
|
42
|
+
v.$slots.default ? F(v.$slots, "default", { key: 0 }) : (g(), _(re, { key: 1 }, [
|
|
43
|
+
U(O(v.label), 1)
|
|
44
44
|
], 64))
|
|
45
|
-
], 10, vt)) : (
|
|
45
|
+
], 10, vt)) : (g(), se(k, {
|
|
46
46
|
key: 1,
|
|
47
47
|
ref_key: "link",
|
|
48
|
-
ref:
|
|
48
|
+
ref: n,
|
|
49
49
|
to: u.value,
|
|
50
50
|
class: I(["vf-link", { "vf-link_active": f.value }]),
|
|
51
51
|
"aria-disabled": v.disabled,
|
|
@@ -54,9 +54,9 @@ const vt = ["href", "aria-disabled", "tabindex"], Qe = /* @__PURE__ */ j({
|
|
|
54
54
|
"exact-active-class": "vf-link_active",
|
|
55
55
|
onClick: p
|
|
56
56
|
}, {
|
|
57
|
-
default:
|
|
58
|
-
v.$slots.default ? F(v.$slots, "default", { key: 0 }) : (
|
|
59
|
-
|
|
57
|
+
default: be(() => [
|
|
58
|
+
v.$slots.default ? F(v.$slots, "default", { key: 0 }) : (g(), _(re, { key: 1 }, [
|
|
59
|
+
U(O(v.label), 1)
|
|
60
60
|
], 64))
|
|
61
61
|
]),
|
|
62
62
|
_: 3
|
|
@@ -82,17 +82,17 @@ const vt = ["href", "aria-disabled", "tabindex"], Qe = /* @__PURE__ */ j({
|
|
|
82
82
|
class: "vf-card__footer"
|
|
83
83
|
};
|
|
84
84
|
function _t(a, e) {
|
|
85
|
-
return
|
|
86
|
-
a.$slots.default ? (
|
|
85
|
+
return g(), _("div", bt, [
|
|
86
|
+
a.$slots.default ? (g(), _("div", gt, [
|
|
87
87
|
F(a.$slots, "default")
|
|
88
88
|
])) : T("", !0),
|
|
89
|
-
a.$slots.header ? (
|
|
89
|
+
a.$slots.header ? (g(), _("div", mt, [
|
|
90
90
|
F(a.$slots, "header")
|
|
91
91
|
])) : T("", !0),
|
|
92
|
-
a.$slots.body ? (
|
|
92
|
+
a.$slots.body ? (g(), _("div", ht, [
|
|
93
93
|
F(a.$slots, "body")
|
|
94
94
|
])) : T("", !0),
|
|
95
|
-
a.$slots.footer ? (
|
|
95
|
+
a.$slots.footer ? (g(), _("div", yt, [
|
|
96
96
|
F(a.$slots, "footer")
|
|
97
97
|
])) : T("", !0)
|
|
98
98
|
]);
|
|
@@ -104,7 +104,7 @@ const Ct = /* @__PURE__ */ ft(pt, [["render", _t]]), kt = {
|
|
|
104
104
|
key: 1,
|
|
105
105
|
class: "vf-menu__separator",
|
|
106
106
|
role: "separator"
|
|
107
|
-
}, $t = ["aria-expanded", "onClick", "onKeydown"],
|
|
107
|
+
}, $t = ["aria-expanded", "onClick", "onKeydown"], Kr = /* @__PURE__ */ j({
|
|
108
108
|
name: "VfMenu",
|
|
109
109
|
__name: "menu",
|
|
110
110
|
props: {
|
|
@@ -113,42 +113,42 @@ const Ct = /* @__PURE__ */ ft(pt, [["render", _t]]), kt = {
|
|
|
113
113
|
},
|
|
114
114
|
emits: ["active", "onActive"],
|
|
115
115
|
setup(a, { emit: e }) {
|
|
116
|
-
const r = e, t = a, o = K([]),
|
|
116
|
+
const r = e, t = a, o = K([]), d = (i, s) => `${i.label ?? i.to ?? i.href ?? i.url ?? "item"}_${s.toString()}`, n = (i) => i.to ? "router-link" : "a", c = (i) => i.map((s) => ({
|
|
117
117
|
...s,
|
|
118
118
|
items: s.items ? c(s.items) : void 0
|
|
119
|
-
})), l = (
|
|
120
|
-
|
|
121
|
-
s !==
|
|
122
|
-
}),
|
|
123
|
-
}, u = (
|
|
119
|
+
})), l = (i) => {
|
|
120
|
+
i.items && i.items.length ? (o.value.map((s) => {
|
|
121
|
+
s !== i && (s.subMenuVisible = !1);
|
|
122
|
+
}), i.subMenuVisible = !i.subMenuVisible) : Object.prototype.hasOwnProperty.call(i, "command") && typeof i.command == "function" && i.command();
|
|
123
|
+
}, u = (i) => {
|
|
124
124
|
var s;
|
|
125
125
|
for (const f in o.value) {
|
|
126
126
|
const p = o.value[f];
|
|
127
|
-
Object.prototype.hasOwnProperty.call(p, "items") && ((s = p.items) != null && s.some((v) => v ===
|
|
127
|
+
Object.prototype.hasOwnProperty.call(p, "items") && ((s = p.items) != null && s.some((v) => v === i) ? (p.active = !0, p.subMenuVisible = !0) : (p.active = !1, p.subMenuVisible = !1));
|
|
128
128
|
}
|
|
129
|
-
r("active",
|
|
129
|
+
r("active", i), r("onActive", i);
|
|
130
130
|
};
|
|
131
131
|
return oe(
|
|
132
132
|
() => t.items,
|
|
133
|
-
(
|
|
134
|
-
o.value = c(
|
|
133
|
+
(i) => {
|
|
134
|
+
o.value = c(i);
|
|
135
135
|
},
|
|
136
136
|
{ deep: !0, immediate: !0 }
|
|
137
|
-
), (
|
|
138
|
-
const f =
|
|
139
|
-
return
|
|
140
|
-
class: I(["vf-menu", `vf-menu_${
|
|
137
|
+
), (i, s) => {
|
|
138
|
+
const f = Qe("VfMenu");
|
|
139
|
+
return g(), _("div", {
|
|
140
|
+
class: I(["vf-menu", `vf-menu_${i.orientation}`])
|
|
141
141
|
}, [
|
|
142
142
|
z("ul", kt, [
|
|
143
|
-
(
|
|
144
|
-
key:
|
|
143
|
+
(g(!0), _(re, null, de(o.value, (p, v) => (g(), _("li", {
|
|
144
|
+
key: d(p, v),
|
|
145
145
|
class: "vf-menu__item",
|
|
146
146
|
role: "none"
|
|
147
147
|
}, [
|
|
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 ? (g(), _("hr", wt)) : p.items && p.items.length ? (g(), _(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,25 +160,25 @@ 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 ? (g(), se(ze(Be), {
|
|
164
164
|
key: 0,
|
|
165
165
|
icon: p.icon,
|
|
166
166
|
class: "vf-menu__icon"
|
|
167
167
|
}, null, 8, ["icon"])) : T("", !0),
|
|
168
|
-
|
|
168
|
+
U(" " + O(p.label) + " ", 1),
|
|
169
169
|
Ke(ze(Be), { icon: "chevronDown" })
|
|
170
170
|
], 42, $t),
|
|
171
|
-
p.items ? (
|
|
171
|
+
p.items ? (g(), 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
176
|
}, null, 8, ["items", "class"])) : T("", !0)
|
|
177
|
-
], 64)) : (
|
|
177
|
+
], 64)) : (g(), se(Ge, {
|
|
178
178
|
key: 3,
|
|
179
179
|
to: p.to,
|
|
180
180
|
href: p.href ?? p.url,
|
|
181
|
-
as:
|
|
181
|
+
as: n(p),
|
|
182
182
|
class: "vf-menu__link",
|
|
183
183
|
active: p.active,
|
|
184
184
|
disabled: p.disabled,
|
|
@@ -187,13 +187,13 @@ const Ct = /* @__PURE__ */ ft(pt, [["render", _t]]), kt = {
|
|
|
187
187
|
onClick: (w) => l(p),
|
|
188
188
|
onActive: (w) => u(p)
|
|
189
189
|
}, {
|
|
190
|
-
default:
|
|
191
|
-
p.icon ? (
|
|
190
|
+
default: be(() => [
|
|
191
|
+
p.icon ? (g(), se(ze(Be), {
|
|
192
192
|
key: 0,
|
|
193
193
|
icon: p.icon,
|
|
194
194
|
class: "vf-menu__icon"
|
|
195
195
|
}, null, 8, ["icon"])) : T("", !0),
|
|
196
|
-
|
|
196
|
+
U(" " + O(p.label), 1)
|
|
197
197
|
]),
|
|
198
198
|
_: 2
|
|
199
199
|
}, 1032, ["to", "href", "as", "active", "disabled", "aria-disabled", "onClick", "onActive"]))
|
|
@@ -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"], Nr = /* @__PURE__ */ j({
|
|
206
206
|
__name: "button",
|
|
207
207
|
props: {
|
|
208
208
|
to: { default: void 0 },
|
|
@@ -221,59 +221,59 @@ const Ct = /* @__PURE__ */ ft(pt, [["render", _t]]), kt = {
|
|
|
221
221
|
disabled: { type: Boolean, default: !1 }
|
|
222
222
|
},
|
|
223
223
|
setup(a) {
|
|
224
|
-
const e = a, r = ["button", "submit", "reset"], t = (
|
|
225
|
-
let
|
|
226
|
-
return ["top", "bottom"].includes(e.iconPos) &&
|
|
227
|
-
}), l =
|
|
228
|
-
return (
|
|
224
|
+
const e = a, r = ["button", "submit", "reset"], t = (i) => !!i && r.includes(i), o = m(() => e.as ? e.as === "button" : !(e.to || e.href || e.url || e.type && !t(e.type))), d = m(() => t(e.type) ? e.type : "button"), n = m(() => e.as === "link" ? e.to ? "router-link" : "a" : e.type && !t(e.type) ? e.type === "router-link" && e.to ? "router-link" : "a" : e.to ? "router-link" : "a"), c = m(() => {
|
|
225
|
+
let i = ["vf-button", `vf-button_${e.severity}`];
|
|
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
|
+
}), l = m(() => ["vf-button__icon", `vf-button__icon_${e.iconPos}`]), u = m(() => ["vf-button__label"]);
|
|
228
|
+
return (i, s) => o.value ? (g(), _("button", {
|
|
229
229
|
key: 0,
|
|
230
|
-
type:
|
|
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 ? (g(), se(ze(Be), {
|
|
235
235
|
key: 0,
|
|
236
236
|
icon: e.icon,
|
|
237
237
|
class: I(l.value)
|
|
238
238
|
}, null, 8, ["icon", "class"])) : T("", !0),
|
|
239
|
-
e.loading ? (
|
|
239
|
+
e.loading ? (g(), se(ze(Be), {
|
|
240
240
|
key: 1,
|
|
241
241
|
icon: "circleNotch",
|
|
242
242
|
class: I(l.value),
|
|
243
243
|
spin: ""
|
|
244
244
|
}, null, 8, ["class"])) : T("", !0),
|
|
245
|
-
|
|
245
|
+
i.$slots.default ? (g(), _("span", {
|
|
246
246
|
key: 2,
|
|
247
247
|
class: I(u.value)
|
|
248
248
|
}, [
|
|
249
|
-
F(
|
|
250
|
-
], 2)) :
|
|
249
|
+
F(i.$slots, "default")
|
|
250
|
+
], 2)) : i.label ? (g(), _("span", {
|
|
251
251
|
key: 3,
|
|
252
252
|
class: I(u.value)
|
|
253
|
-
},
|
|
254
|
-
], 10, xt)) : (
|
|
253
|
+
}, O(i.label), 3)) : T("", !0)
|
|
254
|
+
], 10, xt)) : (g(), se(Ge, {
|
|
255
255
|
key: 1,
|
|
256
256
|
to: e.to,
|
|
257
257
|
href: e.href ?? e.url,
|
|
258
|
-
as:
|
|
258
|
+
as: n.value,
|
|
259
259
|
class: I(c.value),
|
|
260
260
|
disabled: e.loading || e.disabled
|
|
261
261
|
}, {
|
|
262
|
-
default:
|
|
263
|
-
e.icon ? (
|
|
262
|
+
default: be(() => [
|
|
263
|
+
e.icon ? (g(), se(ze(Be), {
|
|
264
264
|
key: 0,
|
|
265
265
|
icon: e.icon,
|
|
266
266
|
class: I(l.value)
|
|
267
267
|
}, null, 8, ["icon", "class"])) : T("", !0),
|
|
268
|
-
|
|
268
|
+
i.$slots.default ? (g(), _("span", {
|
|
269
269
|
key: 1,
|
|
270
270
|
class: I(u.value)
|
|
271
271
|
}, [
|
|
272
|
-
F(
|
|
273
|
-
], 2)) :
|
|
272
|
+
F(i.$slots, "default")
|
|
273
|
+
], 2)) : i.label ? (g(), _("span", {
|
|
274
274
|
key: 2,
|
|
275
275
|
class: I(u.value)
|
|
276
|
-
},
|
|
276
|
+
}, O(i.label), 3)) : T("", !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
|
+
}, Gr = /* @__PURE__ */ j({
|
|
288
288
|
__name: "input",
|
|
289
289
|
props: {
|
|
290
290
|
modelValue: { default: "" },
|
|
@@ -297,17 +297,17 @@ const Ct = /* @__PURE__ */ ft(pt, [["render", _t]]), kt = {
|
|
|
297
297
|
},
|
|
298
298
|
emits: ["update:modelValue", "input", "change", "focus", "blur"],
|
|
299
299
|
setup(a, { emit: e }) {
|
|
300
|
-
const r = e, t = a, o =
|
|
300
|
+
const r = e, t = a, o = m(() => {
|
|
301
301
|
const u = ["vf-input", `vf-input_${t.variant}`];
|
|
302
302
|
return t.size !== "normal" && u.push(`vf-input_${t.size}`), t.disabled && u.push("vf-input_disabled"), u;
|
|
303
|
-
}),
|
|
304
|
-
const
|
|
305
|
-
r("update:modelValue",
|
|
306
|
-
},
|
|
307
|
-
return (u,
|
|
303
|
+
}), d = (u) => {
|
|
304
|
+
const i = u.target;
|
|
305
|
+
r("update:modelValue", i.value), r("input", u);
|
|
306
|
+
}, n = (u) => r("change", u), c = (u) => r("focus", u), l = (u) => r("blur", u);
|
|
307
|
+
return (u, i) => (g(), _("div", {
|
|
308
308
|
class: I(o.value)
|
|
309
309
|
}, [
|
|
310
|
-
u.$slots.prefix ? (
|
|
310
|
+
u.$slots.prefix ? (g(), _("span", zt, [
|
|
311
311
|
F(u.$slots, "prefix")
|
|
312
312
|
])) : T("", !0),
|
|
313
313
|
z("input", {
|
|
@@ -317,12 +317,12 @@ const Ct = /* @__PURE__ */ ft(pt, [["render", _t]]), kt = {
|
|
|
317
317
|
placeholder: u.placeholder,
|
|
318
318
|
disabled: u.disabled,
|
|
319
319
|
readonly: u.readonly,
|
|
320
|
-
onInput:
|
|
321
|
-
onChange:
|
|
320
|
+
onInput: d,
|
|
321
|
+
onChange: n,
|
|
322
322
|
onFocus: c,
|
|
323
323
|
onBlur: l
|
|
324
324
|
}, null, 40, Bt),
|
|
325
|
-
u.$slots.suffix ? (
|
|
325
|
+
u.$slots.suffix ? (g(), _("span", St, [
|
|
326
326
|
F(u.$slots, "suffix")
|
|
327
327
|
])) : T("", !0)
|
|
328
328
|
], 2));
|
|
@@ -331,7 +331,7 @@ const Ct = /* @__PURE__ */ ft(pt, [["render", _t]]), kt = {
|
|
|
331
331
|
key: 0,
|
|
332
332
|
class: "vf-form-field__required",
|
|
333
333
|
"aria-hidden": "true"
|
|
334
|
-
}, Lt = { class: "vf-form-field__control" }, Tt = ["id"], Rt = ["id"],
|
|
334
|
+
}, Lt = { class: "vf-form-field__control" }, Tt = ["id"], Rt = ["id"], Yr = /* @__PURE__ */ j({
|
|
335
335
|
__name: "form-field",
|
|
336
336
|
props: {
|
|
337
337
|
id: { default: void 0 },
|
|
@@ -343,56 +343,56 @@ const Ct = /* @__PURE__ */ ft(pt, [["render", _t]]), kt = {
|
|
|
343
343
|
size: { default: "normal" }
|
|
344
344
|
},
|
|
345
345
|
setup(a) {
|
|
346
|
-
const e = a, r = De(), t = `vf-form-field-${Math.random().toString(36).slice(2, 10)}`, o =
|
|
346
|
+
const e = a, r = De(), t = `vf-form-field-${Math.random().toString(36).slice(2, 10)}`, o = m(() => e.id || t), d = m(() => `${o.value}-hint`), n = m(() => `${o.value}-error`), c = m(() => !!e.label || !!r.label), l = m(() => !!e.hint || !!r.hint), u = m(() => !!e.error || !!r.error), i = m(() => {
|
|
347
347
|
const f = [];
|
|
348
|
-
return l.value && f.push(
|
|
349
|
-
}), s =
|
|
348
|
+
return l.value && f.push(d.value), u.value && f.push(n.value), f.length ? f.join(" ") : void 0;
|
|
349
|
+
}), s = m(() => {
|
|
350
350
|
const f = ["vf-form-field"];
|
|
351
351
|
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
352
|
});
|
|
353
|
-
return (f, p) => (
|
|
353
|
+
return (f, p) => (g(), _("div", {
|
|
354
354
|
class: I(s.value)
|
|
355
355
|
}, [
|
|
356
|
-
c.value ? (
|
|
356
|
+
c.value ? (g(), _("label", {
|
|
357
357
|
key: 0,
|
|
358
358
|
class: "vf-form-field__label",
|
|
359
359
|
for: o.value
|
|
360
360
|
}, [
|
|
361
361
|
F(f.$slots, "label", {}, () => [
|
|
362
|
-
|
|
362
|
+
U(O(f.label), 1)
|
|
363
363
|
]),
|
|
364
|
-
f.required ? (
|
|
364
|
+
f.required ? (g(), _("span", Vt, "*")) : T("", !0)
|
|
365
365
|
], 8, Ft)) : T("", !0),
|
|
366
366
|
z("div", Lt, [
|
|
367
367
|
F(f.$slots, "default", {
|
|
368
368
|
id: o.value,
|
|
369
|
-
describedBy:
|
|
369
|
+
describedBy: i.value,
|
|
370
370
|
invalid: u.value,
|
|
371
371
|
required: f.required
|
|
372
372
|
})
|
|
373
373
|
]),
|
|
374
|
-
l.value ? (
|
|
374
|
+
l.value ? (g(), _("p", {
|
|
375
375
|
key: 1,
|
|
376
|
-
id:
|
|
376
|
+
id: d.value,
|
|
377
377
|
class: "vf-form-field__hint"
|
|
378
378
|
}, [
|
|
379
379
|
F(f.$slots, "hint", {}, () => [
|
|
380
|
-
|
|
380
|
+
U(O(f.hint), 1)
|
|
381
381
|
])
|
|
382
382
|
], 8, Tt)) : T("", !0),
|
|
383
|
-
u.value ? (
|
|
383
|
+
u.value ? (g(), _("p", {
|
|
384
384
|
key: 2,
|
|
385
|
-
id:
|
|
385
|
+
id: n.value,
|
|
386
386
|
class: "vf-form-field__error",
|
|
387
387
|
role: "alert"
|
|
388
388
|
}, [
|
|
389
389
|
F(f.$slots, "error", {}, () => [
|
|
390
|
-
|
|
390
|
+
U(O(f.error), 1)
|
|
391
391
|
])
|
|
392
392
|
], 8, Rt)) : T("", !0)
|
|
393
393
|
], 2));
|
|
394
394
|
}
|
|
395
|
-
}), Pt = ["value", "placeholder", "disabled", "readonly", "rows"],
|
|
395
|
+
}), Pt = ["value", "placeholder", "disabled", "readonly", "rows"], jr = /* @__PURE__ */ j({
|
|
396
396
|
__name: "textarea",
|
|
397
397
|
props: {
|
|
398
398
|
modelValue: { default: "" },
|
|
@@ -405,14 +405,14 @@ const Ct = /* @__PURE__ */ ft(pt, [["render", _t]]), kt = {
|
|
|
405
405
|
},
|
|
406
406
|
emits: ["update:modelValue", "input", "change", "focus", "blur"],
|
|
407
407
|
setup(a, { emit: e }) {
|
|
408
|
-
const r = e, t = a, o =
|
|
408
|
+
const r = e, t = a, o = m(() => {
|
|
409
409
|
const u = ["vf-textarea", `vf-textarea_${t.variant}`];
|
|
410
410
|
return t.size !== "normal" && u.push(`vf-textarea_${t.size}`), t.disabled && u.push("vf-textarea_disabled"), u;
|
|
411
|
-
}),
|
|
412
|
-
const
|
|
413
|
-
r("update:modelValue",
|
|
414
|
-
},
|
|
415
|
-
return (u,
|
|
411
|
+
}), d = (u) => {
|
|
412
|
+
const i = u.target;
|
|
413
|
+
r("update:modelValue", i.value), r("input", u);
|
|
414
|
+
}, n = (u) => r("change", u), c = (u) => r("focus", u), l = (u) => r("blur", u);
|
|
415
|
+
return (u, i) => (g(), _("div", {
|
|
416
416
|
class: I(o.value)
|
|
417
417
|
}, [
|
|
418
418
|
z("textarea", {
|
|
@@ -422,14 +422,14 @@ const Ct = /* @__PURE__ */ ft(pt, [["render", _t]]), kt = {
|
|
|
422
422
|
disabled: u.disabled,
|
|
423
423
|
readonly: u.readonly,
|
|
424
424
|
rows: u.rows,
|
|
425
|
-
onInput:
|
|
426
|
-
onChange:
|
|
425
|
+
onInput: d,
|
|
426
|
+
onChange: n,
|
|
427
427
|
onFocus: c,
|
|
428
428
|
onBlur: l
|
|
429
429
|
}, null, 40, Pt)
|
|
430
430
|
], 2));
|
|
431
431
|
}
|
|
432
|
-
}),
|
|
432
|
+
}), qe = [
|
|
433
433
|
"top",
|
|
434
434
|
"top-start",
|
|
435
435
|
"top-end",
|
|
@@ -442,7 +442,7 @@ const Ct = /* @__PURE__ */ ft(pt, [["render", _t]]), kt = {
|
|
|
442
442
|
"left",
|
|
443
443
|
"left-start",
|
|
444
444
|
"left-end"
|
|
445
|
-
],
|
|
445
|
+
], me = (a) => {
|
|
446
446
|
if (a == null || !(a instanceof HTMLElement))
|
|
447
447
|
return null;
|
|
448
448
|
if (typeof window < "u") {
|
|
@@ -450,18 +450,18 @@ const Ct = /* @__PURE__ */ ft(pt, [["render", _t]]), kt = {
|
|
|
450
450
|
if (/(auto|scroll|overlay)/.test(r))
|
|
451
451
|
return a;
|
|
452
452
|
}
|
|
453
|
-
return a.scrollHeight > a.clientHeight || a.scrollWidth > a.clientWidth ? a :
|
|
453
|
+
return a.scrollHeight > a.clientHeight || a.scrollWidth > a.clientWidth ? a : me(a.parentNode);
|
|
454
454
|
};
|
|
455
455
|
function It(a) {
|
|
456
456
|
return typeof window > "u" ? !1 : window.getComputedStyle(a).position === "fixed";
|
|
457
457
|
}
|
|
458
458
|
const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e = (a, e) => Ot(a, e) === "fixed", ie = (a, e, r = {}) => {
|
|
459
|
-
const t = a.getBoundingClientRect(), o = e ? e.offsetParent : null,
|
|
460
|
-
if (o && !
|
|
461
|
-
const
|
|
459
|
+
const t = a.getBoundingClientRect(), o = e ? e.offsetParent : null, d = e ? _e(r, e) : !1;
|
|
460
|
+
if (o && !d) {
|
|
461
|
+
const n = o.getBoundingClientRect(), c = o.scrollLeft, l = o.scrollTop;
|
|
462
462
|
return {
|
|
463
|
-
left: t.left -
|
|
464
|
-
top: t.top -
|
|
463
|
+
left: t.left - n.left + c,
|
|
464
|
+
top: t.top - n.top + l,
|
|
465
465
|
width: t.width,
|
|
466
466
|
height: t.height
|
|
467
467
|
};
|
|
@@ -476,57 +476,57 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
476
476
|
var r;
|
|
477
477
|
return (r = a.middleware) == null ? void 0 : r.find((t) => t.name === e);
|
|
478
478
|
}, et = (a, e) => !!we(a, e), Mt = (a) => {
|
|
479
|
-
const e =
|
|
479
|
+
const e = me(a);
|
|
480
480
|
let r = "";
|
|
481
481
|
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
482
|
}, Pe = (a) => a.scrollLeft + a.clientWidth, Ie = (a) => a.scrollTop + a.clientHeight, ve = (a, e, r = null, t = {}, o) => {
|
|
483
483
|
if (r === null && typeof window < "u" && _e(t, e))
|
|
484
484
|
return a;
|
|
485
|
-
let
|
|
485
|
+
let d = 0;
|
|
486
486
|
if (r === null) {
|
|
487
|
-
const
|
|
488
|
-
|
|
487
|
+
const n = me(e);
|
|
488
|
+
d = n ? n.scrollTop : 0;
|
|
489
489
|
}
|
|
490
|
-
return a -
|
|
490
|
+
return a - d;
|
|
491
491
|
}, fe = (a, e, r = null, t = {}, o) => {
|
|
492
|
-
let
|
|
492
|
+
let d;
|
|
493
493
|
if (r === null && typeof window < "u" && _e(t, e))
|
|
494
|
-
|
|
494
|
+
d = window.innerWidth;
|
|
495
495
|
else if (r === null) {
|
|
496
|
-
const
|
|
497
|
-
|
|
496
|
+
const n = me(e);
|
|
497
|
+
d = n ? Pe(n) : 0;
|
|
498
498
|
} else
|
|
499
|
-
|
|
500
|
-
return -(a + e.clientWidth -
|
|
501
|
-
},
|
|
502
|
-
let
|
|
499
|
+
d = r.getBoundingClientRect().width;
|
|
500
|
+
return -(a + e.clientWidth - d);
|
|
501
|
+
}, he = (a, e, r = null, t = {}, o) => {
|
|
502
|
+
let d;
|
|
503
503
|
if (r === null && typeof window < "u" && _e(t, e))
|
|
504
|
-
|
|
504
|
+
d = window.innerHeight;
|
|
505
505
|
else if (r === null) {
|
|
506
|
-
const
|
|
507
|
-
|
|
506
|
+
const n = me(e);
|
|
507
|
+
d = n ? Ie(n) : 0;
|
|
508
508
|
} else
|
|
509
|
-
|
|
510
|
-
return -(a + e.clientHeight -
|
|
509
|
+
d = r.getBoundingClientRect().height;
|
|
510
|
+
return -(a + e.clientHeight - d);
|
|
511
511
|
}, pe = (a, e, r = null, t = {}, o) => {
|
|
512
512
|
if (r === null && typeof window < "u" && _e(t, e))
|
|
513
513
|
return a;
|
|
514
|
-
let
|
|
514
|
+
let d = 0;
|
|
515
515
|
if (r === null) {
|
|
516
|
-
const
|
|
517
|
-
|
|
516
|
+
const n = me(e);
|
|
517
|
+
d = n ? n.scrollLeft : 0;
|
|
518
518
|
}
|
|
519
|
-
return a -
|
|
520
|
-
},
|
|
519
|
+
return a - d;
|
|
520
|
+
}, Ue = ({
|
|
521
521
|
options: a,
|
|
522
522
|
primaryX: e,
|
|
523
523
|
primaryY: r,
|
|
524
524
|
floating: t,
|
|
525
525
|
placement: o,
|
|
526
|
-
reference:
|
|
527
|
-
scrollDirection:
|
|
526
|
+
reference: d,
|
|
527
|
+
scrollDirection: n
|
|
528
528
|
}) => {
|
|
529
|
-
const c = Oe(
|
|
529
|
+
const c = Oe(d, t, o, a), l = we(a, "offset");
|
|
530
530
|
if (l) {
|
|
531
531
|
const u = l.fn({
|
|
532
532
|
x: c.x,
|
|
@@ -536,12 +536,12 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
536
536
|
primaryY: r,
|
|
537
537
|
floating: t,
|
|
538
538
|
placement: o,
|
|
539
|
-
reference:
|
|
540
|
-
scrollDirection:
|
|
539
|
+
reference: d,
|
|
540
|
+
scrollDirection: n
|
|
541
541
|
});
|
|
542
542
|
c.x = u.x, c.y = u.y;
|
|
543
543
|
}
|
|
544
|
-
return Qt(c, t,
|
|
544
|
+
return Qt(c, t, d, a) ? {
|
|
545
545
|
x: c.x,
|
|
546
546
|
y: c.y,
|
|
547
547
|
placement: o
|
|
@@ -554,52 +554,52 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
554
554
|
y: r,
|
|
555
555
|
options: t,
|
|
556
556
|
primaryX: o,
|
|
557
|
-
primaryY:
|
|
558
|
-
floating:
|
|
557
|
+
primaryY: d,
|
|
558
|
+
floating: n,
|
|
559
559
|
placement: c,
|
|
560
560
|
reference: l,
|
|
561
561
|
scrollDirection: u
|
|
562
562
|
}) => {
|
|
563
|
-
var
|
|
563
|
+
var i;
|
|
564
564
|
const s = {
|
|
565
565
|
x: e,
|
|
566
566
|
y: r,
|
|
567
567
|
placement: c
|
|
568
568
|
}, f = {
|
|
569
569
|
...t,
|
|
570
|
-
middleware: (
|
|
571
|
-
}, p = (a == null ? void 0 : a.placements) ??
|
|
570
|
+
middleware: (i = t.middleware) == null ? void 0 : i.filter((V) => V.name !== "shift")
|
|
571
|
+
}, p = (a == null ? void 0 : a.placements) ?? qe, v = !(a != null && a.placements), w = v ? qe : p;
|
|
572
572
|
let k = !1;
|
|
573
573
|
const x = (V) => {
|
|
574
574
|
if (k)
|
|
575
575
|
return;
|
|
576
|
-
const G =
|
|
576
|
+
const G = Ue({
|
|
577
577
|
options: f,
|
|
578
578
|
primaryX: o,
|
|
579
|
-
primaryY:
|
|
580
|
-
floating:
|
|
579
|
+
primaryY: d,
|
|
580
|
+
floating: n,
|
|
581
581
|
placement: V,
|
|
582
582
|
reference: l,
|
|
583
583
|
scrollDirection: u
|
|
584
584
|
});
|
|
585
585
|
G && (s.x = G.x, s.y = G.y, s.placement = G.placement, k = !0);
|
|
586
|
-
}, A = ta(l,
|
|
586
|
+
}, A = ta(l, n, f);
|
|
587
587
|
if (!v && p.includes(c) && x(c), k || w.forEach(x), !k) {
|
|
588
588
|
const V = p.reduce(
|
|
589
589
|
(G, D) => {
|
|
590
|
-
const
|
|
590
|
+
const M = Ue({
|
|
591
591
|
options: f,
|
|
592
592
|
primaryX: o,
|
|
593
|
-
primaryY:
|
|
594
|
-
floating:
|
|
593
|
+
primaryY: d,
|
|
594
|
+
floating: n,
|
|
595
595
|
placement: D,
|
|
596
596
|
reference: l,
|
|
597
597
|
scrollDirection: u
|
|
598
598
|
});
|
|
599
|
-
if (!
|
|
599
|
+
if (!M)
|
|
600
600
|
return G;
|
|
601
601
|
const N = Se(D), L = A[N];
|
|
602
|
-
return !G || L > G.space ? { result:
|
|
602
|
+
return !G || L > G.space ? { result: M, space: L } : G;
|
|
603
603
|
},
|
|
604
604
|
null
|
|
605
605
|
);
|
|
@@ -609,19 +609,19 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
609
609
|
const V = Se(c);
|
|
610
610
|
let G = V, D = A[V];
|
|
611
611
|
p.forEach((b) => {
|
|
612
|
-
const
|
|
613
|
-
h > D && (D = h, G =
|
|
612
|
+
const C = Se(b), h = A[C];
|
|
613
|
+
h > D && (D = h, G = C);
|
|
614
614
|
});
|
|
615
|
-
const
|
|
615
|
+
const M = ea(G, c, p), N = Oe(l, n, M, f), L = we(f, "offset");
|
|
616
616
|
if (L) {
|
|
617
617
|
const b = L.fn({
|
|
618
618
|
x: N.x,
|
|
619
619
|
y: N.y,
|
|
620
620
|
options: f,
|
|
621
621
|
primaryX: o,
|
|
622
|
-
primaryY:
|
|
623
|
-
floating:
|
|
624
|
-
placement:
|
|
622
|
+
primaryY: d,
|
|
623
|
+
floating: n,
|
|
624
|
+
placement: M,
|
|
625
625
|
reference: l,
|
|
626
626
|
scrollDirection: u
|
|
627
627
|
});
|
|
@@ -632,35 +632,35 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
632
632
|
return s;
|
|
633
633
|
}
|
|
634
634
|
}), tt = (a, e, r, t, o) => {
|
|
635
|
-
var
|
|
635
|
+
var d, n, c;
|
|
636
636
|
let l = 0;
|
|
637
637
|
t.startsWith("right") ? l = -a : t.startsWith("left") && (l = a);
|
|
638
|
-
const u = we(e, "arrow"),
|
|
638
|
+
const u = we(e, "arrow"), i = we(e, "shift");
|
|
639
639
|
if (u) {
|
|
640
|
-
const s = ((
|
|
640
|
+
const s = ((d = u.params) == null ? void 0 : d.arrow).getBoundingClientRect();
|
|
641
641
|
t.startsWith("right") ? l -= s.width / 2 : t.startsWith("left") && (l += s.width / 2);
|
|
642
642
|
}
|
|
643
643
|
if (et(e, "shift") && u) {
|
|
644
644
|
let s = null, f = 0;
|
|
645
|
-
|
|
645
|
+
i && (s = (n = i.params) == null ? void 0 : n.parent);
|
|
646
646
|
const p = (c = u.params) == null ? void 0 : c.arrow;
|
|
647
647
|
f = p.getBoundingClientRect().width / 2, f += Et(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
648
|
}
|
|
649
649
|
return l;
|
|
650
650
|
}, at = (a, e, r, t, o) => {
|
|
651
|
-
var
|
|
651
|
+
var d, n, c;
|
|
652
652
|
let l = 0;
|
|
653
653
|
t.startsWith("top") ? l = a : t.startsWith("bottom") && (l = -a);
|
|
654
|
-
const u = we(e, "arrow"),
|
|
654
|
+
const u = we(e, "arrow"), i = we(e, "shift");
|
|
655
655
|
if (u) {
|
|
656
|
-
const s = ((
|
|
656
|
+
const s = ((d = u.params) == null ? void 0 : d.arrow).getBoundingClientRect();
|
|
657
657
|
t.startsWith("top") ? l += s.height / 2 : t.startsWith("bottom") && (l -= s.height / 2);
|
|
658
658
|
}
|
|
659
659
|
if (et(e, "shift") && u) {
|
|
660
660
|
let s = null, f = 0;
|
|
661
|
-
|
|
661
|
+
i && (s = (n = i.params) == null ? void 0 : n.parent);
|
|
662
662
|
const p = (c = u.params) == null ? void 0 : c.arrow;
|
|
663
|
-
f = p.getBoundingClientRect().height / 2, f += At(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 :
|
|
663
|
+
f = p.getBoundingClientRect().height / 2, f += At(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
664
|
}
|
|
665
665
|
return l;
|
|
666
666
|
}, Le = (a) => ({
|
|
@@ -671,12 +671,12 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
671
671
|
y: r,
|
|
672
672
|
options: t,
|
|
673
673
|
primaryX: o,
|
|
674
|
-
primaryY:
|
|
675
|
-
floating:
|
|
674
|
+
primaryY: d,
|
|
675
|
+
floating: n,
|
|
676
676
|
placement: c
|
|
677
677
|
}) => ({
|
|
678
|
-
x: e - tt(a, t, o, c,
|
|
679
|
-
y: r - at(a, t,
|
|
678
|
+
x: e - tt(a, t, o, c, n),
|
|
679
|
+
y: r - at(a, t, d, c, n),
|
|
680
680
|
placement: c
|
|
681
681
|
})
|
|
682
682
|
}), Dt = (a) => ({
|
|
@@ -687,45 +687,45 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
687
687
|
y: r,
|
|
688
688
|
options: t,
|
|
689
689
|
primaryX: o,
|
|
690
|
-
primaryY:
|
|
691
|
-
floating:
|
|
690
|
+
primaryY: d,
|
|
691
|
+
floating: n,
|
|
692
692
|
placement: c,
|
|
693
693
|
reference: l
|
|
694
694
|
}) => {
|
|
695
695
|
var u;
|
|
696
|
-
const
|
|
696
|
+
const i = {
|
|
697
697
|
x: e,
|
|
698
698
|
y: r,
|
|
699
699
|
placement: c
|
|
700
|
-
}, s = t.middleware || [], f = s.findIndex((h) => h.name === "shift"), p = s.findIndex((h) => h.name === "offset"), v = p !== -1 && (f === -1 || p > f), w = s.find((h) => h.name === "offset"), k = w ? (u = w.params) == null ? void 0 : u.value : 0, x = v ? tt(k, t, o, c,
|
|
701
|
-
let D = V,
|
|
700
|
+
}, s = t.middleware || [], f = s.findIndex((h) => h.name === "shift"), p = s.findIndex((h) => h.name === "offset"), v = p !== -1 && (f === -1 || p > f), w = s.find((h) => h.name === "offset"), k = w ? (u = w.params) == null ? void 0 : u.value : 0, x = v ? tt(k, t, o, c, n) : 0, A = v ? at(k, t, d, c, n) : 0, V = e - x, G = r - A;
|
|
701
|
+
let D = V, M = G;
|
|
702
702
|
const N = w ? Math.abs(k) : 0, L = N, b = N;
|
|
703
|
-
if (_e(t,
|
|
704
|
-
const h = L, R = window.innerWidth -
|
|
705
|
-
D < h ? D = h : D > W && (D = W),
|
|
706
|
-
const
|
|
707
|
-
return
|
|
703
|
+
if (_e(t, n) && typeof window < "u") {
|
|
704
|
+
const h = L, R = window.innerWidth - n.clientWidth - L, W = R < h ? h : R, q = b, ee = window.innerHeight - n.clientHeight - b, X = ee < q ? q : ee;
|
|
705
|
+
D < h ? D = h : D > W && (D = W), M < q ? M = q : M > X && (M = X), v ? (i.x = e + (D - V), i.y = r + (M - G)) : (i.x = D, i.y = M);
|
|
706
|
+
const le = L, S = window.innerWidth - n.clientWidth - L, E = b, $ = window.innerHeight - n.clientHeight - b, H = v ? le + x : le, Y = v ? S + x : S, J = v ? E + A : E, y = v ? $ + A : $;
|
|
707
|
+
return i.x < H ? i.x = H : i.x > Y && (i.x = Y), i.y < J ? i.y = J : i.y > y && (i.y = y), i;
|
|
708
708
|
}
|
|
709
|
-
const
|
|
710
|
-
if (
|
|
711
|
-
const h = ie(l,
|
|
712
|
-
W <= Y ? D = X : R >= J && (D = S), ee <= y ?
|
|
709
|
+
const C = me(n);
|
|
710
|
+
if (C !== null) {
|
|
711
|
+
const h = ie(l, n, t), R = h.left, W = h.left + h.width, q = h.top, ee = h.top + h.height, X = C.scrollLeft + L, le = Pe(C) - n.clientWidth - L, S = le < X ? X : le, E = C.scrollTop + b, $ = Ie(C) - n.clientHeight - b, H = $ < E ? E : $, Y = C.scrollLeft, J = Pe(C), y = C.scrollTop, B = Ie(C);
|
|
712
|
+
W <= Y ? D = X : R >= J && (D = S), ee <= y ? M = E : q >= B && (M = H), M < E ? M = E : M > H && (M = H), D < X ? D = X : D > S && (D = S);
|
|
713
713
|
}
|
|
714
|
-
if (v ? (
|
|
715
|
-
const h =
|
|
716
|
-
|
|
714
|
+
if (v ? (i.x = e + (D - V), i.y = r + (M - G)) : (i.x = D, i.y = M), C !== null) {
|
|
715
|
+
const h = C.scrollLeft + L, R = Pe(C) - n.clientWidth - L, W = C.scrollTop + b, q = Ie(C) - n.clientHeight - b, ee = v ? h + x : h, X = v ? R + x : R, le = v ? W + A : W, S = v ? q + A : q;
|
|
716
|
+
i.x < ee ? i.x = ee : i.x > X && (i.x = X), i.y < le ? i.y = le : i.y > S && (i.y = S);
|
|
717
717
|
}
|
|
718
|
-
return
|
|
718
|
+
return i;
|
|
719
719
|
}
|
|
720
720
|
}), Et = (a) => a.getBoundingClientRect().width !== a.clientWidth ? (a.getBoundingClientRect().width - a.clientWidth) / 2 : 0, At = (a) => a.getBoundingClientRect().height !== a.clientHeight ? (a.getBoundingClientRect().height - a.clientHeight) / 2 : 0, Te = (a, e) => {
|
|
721
|
-
const r =
|
|
721
|
+
const r = me(a), t = [];
|
|
722
722
|
if (r !== null) {
|
|
723
723
|
const o = () => e();
|
|
724
724
|
r.addEventListener("scroll", o, !1), t.push(() => r.removeEventListener("scroll", o, !1));
|
|
725
725
|
}
|
|
726
726
|
if (typeof window < "u") {
|
|
727
|
-
const o = () => e(),
|
|
728
|
-
window.addEventListener("scroll", o, !1), window.addEventListener("resize",
|
|
727
|
+
const o = () => e(), d = () => e();
|
|
728
|
+
window.addEventListener("scroll", o, !1), window.addEventListener("resize", d, !1), t.push(() => window.removeEventListener("scroll", o, !1)), t.push(() => window.removeEventListener("resize", d, !1));
|
|
729
729
|
}
|
|
730
730
|
if (typeof ResizeObserver < "u" && a instanceof HTMLElement) {
|
|
731
731
|
const o = new ResizeObserver(() => e());
|
|
@@ -856,17 +856,17 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
856
856
|
const s = a.x, f = a.y, p = s + e.clientWidth, v = f + e.clientHeight;
|
|
857
857
|
return s >= 0 && f >= 0 && p <= window.innerWidth && v <= window.innerHeight;
|
|
858
858
|
}
|
|
859
|
-
if (
|
|
860
|
-
return ve(a.y, e, null, t) > 0 && fe(a.x, e, null, t) > 0 &&
|
|
859
|
+
if (me(r) !== null)
|
|
860
|
+
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
861
|
if (typeof window > "u")
|
|
862
862
|
return !0;
|
|
863
|
-
const o = window.innerWidth,
|
|
864
|
-
if (
|
|
865
|
-
const s =
|
|
866
|
-
return f >= 0 && p >= 0 && v <= o && w <=
|
|
863
|
+
const o = window.innerWidth, d = window.innerHeight, n = (r instanceof HTMLElement ? r.offsetParent : null) || e.offsetParent;
|
|
864
|
+
if (n) {
|
|
865
|
+
const s = n.getBoundingClientRect(), f = s.left + a.x, p = s.top + a.y, v = f + e.clientWidth, w = p + e.clientHeight;
|
|
866
|
+
return f >= 0 && p >= 0 && v <= o && w <= d;
|
|
867
867
|
}
|
|
868
|
-
const c = a.x, l = a.y, u = c + e.clientWidth,
|
|
869
|
-
return c >= 0 && l >= 0 && u <= o &&
|
|
868
|
+
const c = a.x, l = a.y, u = c + e.clientWidth, i = l + e.clientHeight;
|
|
869
|
+
return c >= 0 && l >= 0 && u <= o && i <= d;
|
|
870
870
|
}, Se = (a) => a.startsWith("right") ? "right" : a.startsWith("left") ? "left" : a.startsWith("top") ? "top" : "bottom", ea = (a, e, r) => Se(e) === a && r.includes(e) ? e : r.find((t) => Se(t) === a) ?? r[0], ta = (a, e, r = {}) => {
|
|
871
871
|
if (typeof window > "u")
|
|
872
872
|
return {
|
|
@@ -875,35 +875,35 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
875
875
|
bottom: 0,
|
|
876
876
|
left: 0
|
|
877
877
|
};
|
|
878
|
-
const t = _e(r, e) ? null :
|
|
878
|
+
const t = _e(r, e) ? null : me(a), o = a.getBoundingClientRect(), d = t ? t.getBoundingClientRect() : {
|
|
879
879
|
top: 0,
|
|
880
880
|
left: 0,
|
|
881
881
|
right: window.innerWidth,
|
|
882
882
|
bottom: window.innerHeight
|
|
883
883
|
};
|
|
884
884
|
return {
|
|
885
|
-
top: o.top -
|
|
886
|
-
right:
|
|
887
|
-
bottom:
|
|
888
|
-
left: o.left -
|
|
885
|
+
top: o.top - d.top,
|
|
886
|
+
right: d.right - o.right,
|
|
887
|
+
bottom: d.bottom - o.bottom,
|
|
888
|
+
left: o.left - d.left
|
|
889
889
|
};
|
|
890
890
|
}, Re = (a, e, r = {}) => new Promise((t) => {
|
|
891
|
-
var o,
|
|
892
|
-
const
|
|
891
|
+
var o, d;
|
|
892
|
+
const n = r.placement ? r.placement : "bottom", c = {
|
|
893
893
|
x: 0,
|
|
894
894
|
y: 0,
|
|
895
|
-
placement:
|
|
895
|
+
placement: n,
|
|
896
896
|
middlewareData: {}
|
|
897
|
-
}, l = Oe(a, e,
|
|
897
|
+
}, l = Oe(a, e, n, r);
|
|
898
898
|
c.x = l.x, c.y = l.y, c.placement = l.placement;
|
|
899
|
-
const u = c.x,
|
|
899
|
+
const u = c.x, i = c.y, s = Mt(a);
|
|
900
900
|
(o = r.middleware) == null || o.forEach((w) => {
|
|
901
901
|
const k = w.fn({
|
|
902
902
|
x: c.x,
|
|
903
903
|
y: c.y,
|
|
904
904
|
options: r,
|
|
905
905
|
primaryX: u,
|
|
906
|
-
primaryY:
|
|
906
|
+
primaryY: i,
|
|
907
907
|
floating: e,
|
|
908
908
|
placement: c.placement,
|
|
909
909
|
reference: a,
|
|
@@ -911,7 +911,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
911
911
|
});
|
|
912
912
|
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
913
|
});
|
|
914
|
-
const f = Oe(a, e, c.placement, r), p = we(r, "offset"), v = p ? (
|
|
914
|
+
const f = Oe(a, e, c.placement, r), p = we(r, "offset"), v = p ? (d = p.params) == null ? void 0 : d.value : 0;
|
|
915
915
|
if (Number.isFinite(c.x) || (c.x = f.x), !Number.isFinite(c.y))
|
|
916
916
|
if (_e(r, e)) {
|
|
917
917
|
const w = a.getBoundingClientRect(), k = e.getBoundingClientRect().height;
|
|
@@ -919,7 +919,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
919
919
|
} else
|
|
920
920
|
c.y = f.y;
|
|
921
921
|
t(c);
|
|
922
|
-
}), aa = ["disabled", "aria-expanded", "onKeydown"], oa = ["data-placement"], ra = ["disabled", "aria-selected", "onClick"],
|
|
922
|
+
}), aa = ["disabled", "aria-expanded", "onKeydown"], oa = ["data-placement"], ra = ["disabled", "aria-selected", "onClick"], Xr = /* @__PURE__ */ j({
|
|
923
923
|
__name: "select",
|
|
924
924
|
props: {
|
|
925
925
|
modelValue: { default: void 0 },
|
|
@@ -934,50 +934,50 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
934
934
|
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
935
935
|
setup(a, { emit: e }) {
|
|
936
936
|
let r = 0;
|
|
937
|
-
const t = e, o = a,
|
|
937
|
+
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-select-panel-${++r}`;
|
|
938
938
|
let f = null;
|
|
939
|
-
const p =
|
|
940
|
-
label:
|
|
941
|
-
value:
|
|
942
|
-
disabled:
|
|
943
|
-
}))), v =
|
|
944
|
-
var
|
|
945
|
-
return ((
|
|
946
|
-
}), k =
|
|
947
|
-
const
|
|
948
|
-
return o.size !== "normal" &&
|
|
949
|
-
}), x = (
|
|
950
|
-
|
|
951
|
-
}, V = (
|
|
952
|
-
l.value = !1, u.value = "bottom",
|
|
953
|
-
},
|
|
954
|
-
o.disabled || (l.value = !l.value, l.value && (u.value = "bottom",
|
|
939
|
+
const p = m(() => o.options.map((C) => ({
|
|
940
|
+
label: C[o.optionLabel],
|
|
941
|
+
value: C[o.optionValue],
|
|
942
|
+
disabled: C.disabled
|
|
943
|
+
}))), v = m(() => p.value.find((C) => C.value === o.modelValue)), w = m(() => {
|
|
944
|
+
var C;
|
|
945
|
+
return ((C = v.value) == null ? void 0 : C.label) ?? "";
|
|
946
|
+
}), k = m(() => {
|
|
947
|
+
const C = ["vf-select", `vf-select_${o.variant}`, l.value ? "vf-select_open" : ""];
|
|
948
|
+
return o.size !== "normal" && C.push(`vf-select_${o.size}`), o.disabled && C.push("vf-select_disabled"), C.filter(Boolean);
|
|
949
|
+
}), x = (C) => C.value === o.modelValue, A = (C) => {
|
|
950
|
+
C.disabled || (t("update:modelValue", C.value), t("change", C.value), D());
|
|
951
|
+
}, V = (C) => t("focus", C), G = (C) => t("blur", C), D = () => {
|
|
952
|
+
l.value = !1, u.value = "bottom", i.value = "bottom";
|
|
953
|
+
}, M = () => {
|
|
954
|
+
o.disabled || (l.value = !l.value, l.value && (u.value = "bottom", i.value = "bottom"));
|
|
955
955
|
}, N = async () => {
|
|
956
|
-
var
|
|
957
|
-
l.value || (l.value = !0, await ke()), (h = (
|
|
958
|
-
}, L = (
|
|
956
|
+
var C, h;
|
|
957
|
+
l.value || (l.value = !0, await ke()), (h = (C = c.value) == null ? void 0 : C.querySelector(".vf-select__option:not(.is-disabled)")) == null || h.focus();
|
|
958
|
+
}, L = (C) => {
|
|
959
959
|
var R;
|
|
960
|
-
if (!l.value || !
|
|
960
|
+
if (!l.value || !d.value)
|
|
961
961
|
return;
|
|
962
|
-
const h =
|
|
963
|
-
|
|
962
|
+
const h = C.target;
|
|
963
|
+
d.value.contains(h) || (R = c.value) != null && R.contains(h) || D();
|
|
964
964
|
}, b = () => {
|
|
965
|
-
if (!
|
|
965
|
+
if (!n.value || !c.value)
|
|
966
966
|
return;
|
|
967
|
-
const
|
|
967
|
+
const C = n.value, h = c.value, R = async () => {
|
|
968
968
|
const {
|
|
969
969
|
x: X,
|
|
970
|
-
y:
|
|
970
|
+
y: le,
|
|
971
971
|
placement: S
|
|
972
|
-
} = await Re(
|
|
972
|
+
} = await Re(C, h, {
|
|
973
973
|
placement: u.value,
|
|
974
974
|
strategy: "fixed",
|
|
975
975
|
middleware: [Le(2), Ve({ placements: ["bottom", "top"] })]
|
|
976
976
|
});
|
|
977
|
-
|
|
977
|
+
i.value = S ?? u.value, h.style.minWidth = `${C.getBoundingClientRect().width}px`, h.style.left = `${X}px`, h.style.top = `${le}px`;
|
|
978
978
|
}, W = async () => {
|
|
979
979
|
await R();
|
|
980
|
-
}, q = Te(
|
|
980
|
+
}, q = Te(C, () => {
|
|
981
981
|
W();
|
|
982
982
|
}), ee = () => {
|
|
983
983
|
W();
|
|
@@ -989,8 +989,8 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
989
989
|
}
|
|
990
990
|
}, f.update();
|
|
991
991
|
};
|
|
992
|
-
return oe(l, async (
|
|
993
|
-
if (!
|
|
992
|
+
return oe(l, async (C) => {
|
|
993
|
+
if (!C) {
|
|
994
994
|
f && (f.destroy(), f = null);
|
|
995
995
|
return;
|
|
996
996
|
}
|
|
@@ -1005,24 +1005,24 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1005
1005
|
document.addEventListener("click", L);
|
|
1006
1006
|
}), $e(() => {
|
|
1007
1007
|
document.removeEventListener("click", L), f == null || f.destroy(), f = null;
|
|
1008
|
-
}), (
|
|
1008
|
+
}), (C, h) => (g(), _("div", {
|
|
1009
1009
|
ref_key: "root",
|
|
1010
|
-
ref:
|
|
1010
|
+
ref: d,
|
|
1011
1011
|
class: I(k.value)
|
|
1012
1012
|
}, [
|
|
1013
1013
|
z("button", {
|
|
1014
1014
|
ref_key: "trigger",
|
|
1015
|
-
ref:
|
|
1015
|
+
ref: n,
|
|
1016
1016
|
class: "vf-select__control",
|
|
1017
1017
|
type: "button",
|
|
1018
|
-
disabled:
|
|
1018
|
+
disabled: C.disabled,
|
|
1019
1019
|
"aria-expanded": l.value,
|
|
1020
1020
|
"aria-controls": s,
|
|
1021
1021
|
"aria-haspopup": "listbox",
|
|
1022
|
-
onClick:
|
|
1022
|
+
onClick: M,
|
|
1023
1023
|
onKeydown: [
|
|
1024
1024
|
te(Q(N, ["prevent"]), ["down"]),
|
|
1025
|
-
te(Q(
|
|
1025
|
+
te(Q(M, ["prevent"]), ["enter"]),
|
|
1026
1026
|
te(Q(D, ["prevent"]), ["esc"])
|
|
1027
1027
|
],
|
|
1028
1028
|
onFocus: V,
|
|
@@ -1030,22 +1030,22 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1030
1030
|
}, [
|
|
1031
1031
|
z("span", {
|
|
1032
1032
|
class: I(["vf-select__label", { "vf-select__label_placeholder": !w.value }])
|
|
1033
|
-
},
|
|
1033
|
+
}, O(w.value || C.placeholder), 3),
|
|
1034
1034
|
h[0] || (h[0] = z("span", {
|
|
1035
1035
|
class: "vf-select__chevron",
|
|
1036
1036
|
"aria-hidden": "true"
|
|
1037
1037
|
}, "▾", -1))
|
|
1038
1038
|
], 40, aa),
|
|
1039
|
-
(
|
|
1039
|
+
(g(), se(xe, { to: "body" }, [
|
|
1040
1040
|
ue(z("div", {
|
|
1041
1041
|
id: s,
|
|
1042
1042
|
ref_key: "panel",
|
|
1043
1043
|
ref: c,
|
|
1044
1044
|
class: "vf-select__panel",
|
|
1045
1045
|
role: "listbox",
|
|
1046
|
-
"data-placement":
|
|
1046
|
+
"data-placement": i.value
|
|
1047
1047
|
}, [
|
|
1048
|
-
(
|
|
1048
|
+
(g(!0), _(re, null, de(p.value, (R) => (g(), _("button", {
|
|
1049
1049
|
key: R.value,
|
|
1050
1050
|
class: I(["vf-select__option", { "is-active": x(R), "is-disabled": R.disabled }]),
|
|
1051
1051
|
type: "button",
|
|
@@ -1053,7 +1053,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1053
1053
|
disabled: R.disabled,
|
|
1054
1054
|
"aria-selected": x(R),
|
|
1055
1055
|
onClick: (W) => A(R)
|
|
1056
|
-
},
|
|
1056
|
+
}, O(R.label), 11, ra))), 128))
|
|
1057
1057
|
], 8, oa), [
|
|
1058
1058
|
[ce, l.value]
|
|
1059
1059
|
])
|
|
@@ -1066,7 +1066,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1066
1066
|
}, da = ["id", "disabled", "aria-selected", "onClick"], ua = {
|
|
1067
1067
|
key: 2,
|
|
1068
1068
|
class: "vf-autocomplete__empty"
|
|
1069
|
-
},
|
|
1069
|
+
}, qr = /* @__PURE__ */ j({
|
|
1070
1070
|
__name: "autocomplete",
|
|
1071
1071
|
props: {
|
|
1072
1072
|
modelValue: { default: void 0 },
|
|
@@ -1086,42 +1086,42 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1086
1086
|
emits: ["update:modelValue", "change", "focus", "blur", "search"],
|
|
1087
1087
|
setup(a, { emit: e }) {
|
|
1088
1088
|
let r = 0;
|
|
1089
|
-
const t = e, o = a,
|
|
1089
|
+
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
1090
|
let v = null;
|
|
1091
|
-
const w =
|
|
1091
|
+
const w = m(() => o.options.map(($) => ({
|
|
1092
1092
|
label: $[o.optionLabel],
|
|
1093
1093
|
value: $[o.optionValue],
|
|
1094
1094
|
disabled: $.disabled
|
|
1095
|
-
}))), k =
|
|
1095
|
+
}))), k = m(() => w.value.find(($) => $.value === o.modelValue)), x = m(() => {
|
|
1096
1096
|
if (!o.filter)
|
|
1097
1097
|
return w.value;
|
|
1098
1098
|
const $ = u.value.trim().toLowerCase();
|
|
1099
1099
|
return $ ? w.value.filter((H) => H.label.toLowerCase().includes($)) : w.value;
|
|
1100
|
-
}), A =
|
|
1101
|
-
if (!(!l.value ||
|
|
1102
|
-
return G(
|
|
1103
|
-
}), V =
|
|
1100
|
+
}), A = m(() => {
|
|
1101
|
+
if (!(!l.value || i.value < 0))
|
|
1102
|
+
return G(i.value);
|
|
1103
|
+
}), V = m(() => {
|
|
1104
1104
|
const $ = ["vf-autocomplete", `vf-autocomplete_${o.variant}`, l.value ? "vf-autocomplete_open" : ""];
|
|
1105
1105
|
return o.size !== "normal" && $.push(`vf-autocomplete_${o.size}`), o.disabled && $.push("vf-autocomplete_disabled"), $.filter(Boolean);
|
|
1106
|
-
}), G = ($) => `${p}-option-${$}`, D = ($) => $.value === o.modelValue,
|
|
1106
|
+
}), G = ($) => `${p}-option-${$}`, D = ($) => $.value === o.modelValue, M = () => x.value.findIndex(($) => !$.disabled), N = ($) => {
|
|
1107
1107
|
const H = x.value;
|
|
1108
1108
|
if (!H.length) {
|
|
1109
|
-
|
|
1109
|
+
i.value = -1;
|
|
1110
1110
|
return;
|
|
1111
1111
|
}
|
|
1112
|
-
let Y =
|
|
1112
|
+
let Y = i.value;
|
|
1113
1113
|
(Y < 0 || Y >= H.length) && (Y = $ > 0 ? -1 : H.length);
|
|
1114
1114
|
for (let J = 0; J < H.length; J += 1)
|
|
1115
1115
|
if (Y = (Y + $ + H.length) % H.length, !H[Y].disabled) {
|
|
1116
|
-
|
|
1116
|
+
i.value = Y;
|
|
1117
1117
|
return;
|
|
1118
1118
|
}
|
|
1119
|
-
|
|
1119
|
+
i.value = -1;
|
|
1120
1120
|
}, L = () => {
|
|
1121
|
-
o.disabled || (l.value = !0, s.value = "bottom", f.value = "bottom",
|
|
1121
|
+
o.disabled || (l.value = !0, s.value = "bottom", f.value = "bottom", i.value < 0 && (i.value = M()));
|
|
1122
1122
|
}, b = () => {
|
|
1123
|
-
l.value = !1,
|
|
1124
|
-
},
|
|
1123
|
+
l.value = !1, i.value = -1, s.value = "bottom", f.value = "bottom";
|
|
1124
|
+
}, C = () => {
|
|
1125
1125
|
if (l.value) {
|
|
1126
1126
|
b();
|
|
1127
1127
|
return;
|
|
@@ -1131,7 +1131,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1131
1131
|
$.disabled || (u.value = $.label, t("update:modelValue", $.value), t("change", $.value), b());
|
|
1132
1132
|
}, R = ($) => {
|
|
1133
1133
|
const H = $.target;
|
|
1134
|
-
u.value = H.value, t("search", H.value), L(),
|
|
1134
|
+
u.value = H.value, t("search", H.value), L(), i.value = M();
|
|
1135
1135
|
}, W = ($) => {
|
|
1136
1136
|
t("focus", $), L();
|
|
1137
1137
|
}, q = ($) => {
|
|
@@ -1148,33 +1148,33 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1148
1148
|
return;
|
|
1149
1149
|
}
|
|
1150
1150
|
N(-1);
|
|
1151
|
-
},
|
|
1151
|
+
}, le = () => {
|
|
1152
1152
|
if (!l.value) {
|
|
1153
1153
|
L();
|
|
1154
1154
|
return;
|
|
1155
1155
|
}
|
|
1156
|
-
const $ = x.value[
|
|
1156
|
+
const $ = x.value[i.value];
|
|
1157
1157
|
$ && !$.disabled && h($);
|
|
1158
1158
|
}, S = ($) => {
|
|
1159
1159
|
var Y;
|
|
1160
|
-
if (!l.value || !
|
|
1160
|
+
if (!l.value || !d.value)
|
|
1161
1161
|
return;
|
|
1162
1162
|
const H = $.target;
|
|
1163
|
-
|
|
1163
|
+
d.value.contains(H) || (Y = c.value) != null && Y.contains(H) || b();
|
|
1164
1164
|
}, E = () => {
|
|
1165
|
-
if (!
|
|
1165
|
+
if (!n.value || !c.value)
|
|
1166
1166
|
return;
|
|
1167
|
-
const $ =
|
|
1167
|
+
const $ = n.value, H = c.value, Y = async () => {
|
|
1168
1168
|
const {
|
|
1169
1169
|
x: P,
|
|
1170
|
-
y:
|
|
1170
|
+
y: Z,
|
|
1171
1171
|
placement: ne
|
|
1172
1172
|
} = await Re($, H, {
|
|
1173
1173
|
placement: s.value,
|
|
1174
1174
|
strategy: "fixed",
|
|
1175
1175
|
middleware: [Le(2), Ve({ placements: ["bottom", "top"] })]
|
|
1176
1176
|
});
|
|
1177
|
-
f.value = ne ?? s.value, H.style.minWidth = `${$.getBoundingClientRect().width}px`, H.style.left = `${P}px`, H.style.top = `${
|
|
1177
|
+
f.value = ne ?? s.value, H.style.minWidth = `${$.getBoundingClientRect().width}px`, H.style.left = `${P}px`, H.style.top = `${Z}px`;
|
|
1178
1178
|
}, J = async () => {
|
|
1179
1179
|
await Y();
|
|
1180
1180
|
}, y = Te($, () => {
|
|
@@ -1204,7 +1204,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1204
1204
|
},
|
|
1205
1205
|
{ deep: !0 }
|
|
1206
1206
|
), oe(x, () => {
|
|
1207
|
-
|
|
1207
|
+
i.value >= x.value.length && (i.value = M());
|
|
1208
1208
|
}), oe(l, async ($) => {
|
|
1209
1209
|
if (!$) {
|
|
1210
1210
|
v && (v.destroy(), v = null);
|
|
@@ -1215,14 +1215,14 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1215
1215
|
document.addEventListener("click", S);
|
|
1216
1216
|
}), $e(() => {
|
|
1217
1217
|
document.removeEventListener("click", S), v == null || v.destroy(), v = null;
|
|
1218
|
-
}), ($, H) => (
|
|
1218
|
+
}), ($, H) => (g(), _("div", {
|
|
1219
1219
|
ref_key: "root",
|
|
1220
|
-
ref:
|
|
1220
|
+
ref: d,
|
|
1221
1221
|
class: I(V.value)
|
|
1222
1222
|
}, [
|
|
1223
1223
|
z("input", {
|
|
1224
1224
|
ref_key: "control",
|
|
1225
|
-
ref:
|
|
1225
|
+
ref: n,
|
|
1226
1226
|
class: "vf-autocomplete__control",
|
|
1227
1227
|
type: "text",
|
|
1228
1228
|
role: "combobox",
|
|
@@ -1241,7 +1241,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1241
1241
|
onKeydown: [
|
|
1242
1242
|
te(Q(ee, ["prevent"]), ["down"]),
|
|
1243
1243
|
te(Q(X, ["prevent"]), ["up"]),
|
|
1244
|
-
te(Q(
|
|
1244
|
+
te(Q(le, ["prevent"]), ["enter"]),
|
|
1245
1245
|
te(Q(b, ["prevent"]), ["esc"]),
|
|
1246
1246
|
te(b, ["tab"])
|
|
1247
1247
|
]
|
|
@@ -1254,9 +1254,9 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1254
1254
|
tabindex: "-1",
|
|
1255
1255
|
onMousedown: H[0] || (H[0] = Q(() => {
|
|
1256
1256
|
}, ["prevent"])),
|
|
1257
|
-
onClick:
|
|
1257
|
+
onClick: C
|
|
1258
1258
|
}, " ▾ ", 40, sa),
|
|
1259
|
-
(
|
|
1259
|
+
(g(), se(xe, { to: "body" }, [
|
|
1260
1260
|
ue(z("div", {
|
|
1261
1261
|
id: p,
|
|
1262
1262
|
ref_key: "panel",
|
|
@@ -1265,13 +1265,13 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1265
1265
|
role: "listbox",
|
|
1266
1266
|
"data-placement": f.value
|
|
1267
1267
|
}, [
|
|
1268
|
-
$.loading ? (
|
|
1268
|
+
$.loading ? (g(), _("div", ia, O($.loadingText), 1)) : x.value.length > 0 ? (g(!0), _(re, { key: 1 }, de(x.value, (Y, J) => (g(), _("button", {
|
|
1269
1269
|
id: G(J),
|
|
1270
1270
|
key: Y.value,
|
|
1271
1271
|
class: I(["vf-autocomplete__option", {
|
|
1272
1272
|
"is-active": D(Y),
|
|
1273
1273
|
"is-disabled": Y.disabled,
|
|
1274
|
-
"is-highlighted": J ===
|
|
1274
|
+
"is-highlighted": J === i.value
|
|
1275
1275
|
}]),
|
|
1276
1276
|
type: "button",
|
|
1277
1277
|
role: "option",
|
|
@@ -1280,7 +1280,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1280
1280
|
onMousedown: H[1] || (H[1] = Q(() => {
|
|
1281
1281
|
}, ["prevent"])),
|
|
1282
1282
|
onClick: (y) => h(Y)
|
|
1283
|
-
},
|
|
1283
|
+
}, O(Y.label), 43, da))), 128)) : (g(), _("div", ua, O($.emptyText), 1))
|
|
1284
1284
|
], 8, na), [
|
|
1285
1285
|
[ce, l.value]
|
|
1286
1286
|
])
|
|
@@ -1300,7 +1300,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1300
1300
|
}, ya = {
|
|
1301
1301
|
key: 3,
|
|
1302
1302
|
class: "vf-multiselect__empty"
|
|
1303
|
-
},
|
|
1303
|
+
}, Ur = /* @__PURE__ */ j({
|
|
1304
1304
|
__name: "multi-select",
|
|
1305
1305
|
props: {
|
|
1306
1306
|
modelValue: { default: () => [] },
|
|
@@ -1322,23 +1322,23 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1322
1322
|
emits: ["update:modelValue", "change", "search", "focus", "blur"],
|
|
1323
1323
|
setup(a, { emit: e }) {
|
|
1324
1324
|
let r = 0;
|
|
1325
|
-
const t = e, o = a,
|
|
1325
|
+
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
1326
|
let w = null;
|
|
1327
|
-
const k =
|
|
1327
|
+
const k = m(() => o.options.map((y) => ({
|
|
1328
1328
|
label: y[o.optionLabel],
|
|
1329
1329
|
value: y[o.optionValue],
|
|
1330
1330
|
disabled: y.disabled
|
|
1331
|
-
}))), x =
|
|
1331
|
+
}))), x = m(() => Array.isArray(o.modelValue) ? o.modelValue : []), A = m(() => {
|
|
1332
1332
|
if (!o.filter)
|
|
1333
1333
|
return k.value;
|
|
1334
|
-
const y =
|
|
1334
|
+
const y = i.value.trim().toLowerCase();
|
|
1335
1335
|
return y ? k.value.filter((B) => B.label.toLowerCase().includes(y)) : k.value;
|
|
1336
|
-
}), V =
|
|
1336
|
+
}), V = m(() => k.value.filter((y) => x.value.includes(y.value))), G = m(() => V.value.length === 0 ? o.placeholder : V.value.map((y) => y.label).join(", ")), D = m(() => {
|
|
1337
1337
|
const y = ["vf-multiselect", `vf-multiselect_${o.variant}`, u.value ? "vf-multiselect_open" : ""];
|
|
1338
1338
|
return o.size !== "normal" && y.push(`vf-multiselect_${o.size}`), o.disabled && y.push("vf-multiselect_disabled"), y.filter(Boolean);
|
|
1339
|
-
}),
|
|
1339
|
+
}), M = (y) => `${v}-option-${y}`, N = () => A.value.findIndex((y) => !y.disabled), L = (y) => x.value.includes(y.value), b = (y) => {
|
|
1340
1340
|
t("update:modelValue", y), t("change", y);
|
|
1341
|
-
},
|
|
1341
|
+
}, C = (y) => {
|
|
1342
1342
|
if (!(y.disabled || o.readonly)) {
|
|
1343
1343
|
if (L(y)) {
|
|
1344
1344
|
b(x.value.filter((B) => B !== y.value));
|
|
@@ -1356,7 +1356,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1356
1356
|
}
|
|
1357
1357
|
let P = s.value;
|
|
1358
1358
|
(P < 0 || P >= B.length) && (P = y > 0 ? -1 : B.length);
|
|
1359
|
-
for (let
|
|
1359
|
+
for (let Z = 0; Z < B.length; Z += 1)
|
|
1360
1360
|
if (P = (P + y + B.length) % B.length, !B[P].disabled) {
|
|
1361
1361
|
s.value = P;
|
|
1362
1362
|
return;
|
|
@@ -1366,7 +1366,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1366
1366
|
var y;
|
|
1367
1367
|
o.disabled || (u.value = !0, f.value = "bottom", p.value = "bottom", s.value < 0 && (s.value = N()), o.filter && (await ke(), (y = l.value) == null || y.focus()));
|
|
1368
1368
|
}, q = () => {
|
|
1369
|
-
u.value = !1, s.value = -1, f.value = "bottom", p.value = "bottom",
|
|
1369
|
+
u.value = !1, s.value = -1, f.value = "bottom", p.value = "bottom", i.value = "";
|
|
1370
1370
|
}, ee = () => {
|
|
1371
1371
|
if (u.value) {
|
|
1372
1372
|
q();
|
|
@@ -1379,7 +1379,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1379
1379
|
return;
|
|
1380
1380
|
}
|
|
1381
1381
|
R(1);
|
|
1382
|
-
},
|
|
1382
|
+
}, le = () => {
|
|
1383
1383
|
if (!u.value) {
|
|
1384
1384
|
W();
|
|
1385
1385
|
return;
|
|
@@ -1391,20 +1391,20 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1391
1391
|
return;
|
|
1392
1392
|
}
|
|
1393
1393
|
const y = A.value[s.value];
|
|
1394
|
-
y && !y.disabled &&
|
|
1394
|
+
y && !y.disabled && C(y);
|
|
1395
1395
|
}, E = (y) => {
|
|
1396
1396
|
const B = y.target;
|
|
1397
|
-
|
|
1397
|
+
i.value = B.value, t("search", B.value), s.value = N();
|
|
1398
1398
|
}, $ = (y) => t("focus", y), H = (y) => t("blur", y), Y = (y) => {
|
|
1399
1399
|
var P;
|
|
1400
|
-
if (!u.value || !
|
|
1400
|
+
if (!u.value || !d.value)
|
|
1401
1401
|
return;
|
|
1402
1402
|
const B = y.target;
|
|
1403
|
-
|
|
1403
|
+
d.value.contains(B) || (P = c.value) != null && P.contains(B) || q();
|
|
1404
1404
|
}, J = () => {
|
|
1405
|
-
if (!
|
|
1405
|
+
if (!n.value || !c.value)
|
|
1406
1406
|
return;
|
|
1407
|
-
const y =
|
|
1407
|
+
const y = n.value, B = c.value, P = async () => {
|
|
1408
1408
|
const {
|
|
1409
1409
|
x: Ce,
|
|
1410
1410
|
y: Ae,
|
|
@@ -1415,15 +1415,15 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1415
1415
|
middleware: [Le(2), Ve({ placements: ["bottom", "top"] })]
|
|
1416
1416
|
});
|
|
1417
1417
|
p.value = We ?? f.value, B.style.minWidth = `${y.getBoundingClientRect().width}px`, B.style.left = `${Ce}px`, B.style.top = `${Ae}px`;
|
|
1418
|
-
},
|
|
1418
|
+
}, Z = async () => {
|
|
1419
1419
|
await P();
|
|
1420
1420
|
}, ne = Te(y, () => {
|
|
1421
|
-
|
|
1421
|
+
Z();
|
|
1422
1422
|
}), ae = () => {
|
|
1423
|
-
|
|
1423
|
+
Z();
|
|
1424
1424
|
};
|
|
1425
1425
|
document.addEventListener("scroll", ae, !0), window.addEventListener("resize", ae, !1), w = {
|
|
1426
|
-
update:
|
|
1426
|
+
update: Z,
|
|
1427
1427
|
destroy: () => {
|
|
1428
1428
|
ne(), document.removeEventListener("scroll", ae, !0), window.removeEventListener("resize", ae, !1);
|
|
1429
1429
|
}
|
|
@@ -1447,14 +1447,14 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1447
1447
|
document.addEventListener("click", Y);
|
|
1448
1448
|
}), $e(() => {
|
|
1449
1449
|
document.removeEventListener("click", Y), w == null || w.destroy(), w = null;
|
|
1450
|
-
}), (y, B) => (
|
|
1450
|
+
}), (y, B) => (g(), _("div", {
|
|
1451
1451
|
ref_key: "root",
|
|
1452
|
-
ref:
|
|
1452
|
+
ref: d,
|
|
1453
1453
|
class: I(D.value)
|
|
1454
1454
|
}, [
|
|
1455
1455
|
z("button", {
|
|
1456
1456
|
ref_key: "trigger",
|
|
1457
|
-
ref:
|
|
1457
|
+
ref: n,
|
|
1458
1458
|
class: "vf-multiselect__control",
|
|
1459
1459
|
type: "button",
|
|
1460
1460
|
disabled: y.disabled,
|
|
@@ -1464,7 +1464,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1464
1464
|
onClick: ee,
|
|
1465
1465
|
onKeydown: [
|
|
1466
1466
|
te(Q(X, ["prevent"]), ["down"]),
|
|
1467
|
-
te(Q(
|
|
1467
|
+
te(Q(le, ["prevent"]), ["up"]),
|
|
1468
1468
|
te(Q(S, ["prevent"]), ["enter"]),
|
|
1469
1469
|
te(Q(q, ["prevent"]), ["esc"])
|
|
1470
1470
|
],
|
|
@@ -1473,20 +1473,20 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1473
1473
|
}, [
|
|
1474
1474
|
z("span", {
|
|
1475
1475
|
class: I(["vf-multiselect__label", { "vf-multiselect__label_placeholder": x.value.length === 0 }])
|
|
1476
|
-
},
|
|
1476
|
+
}, O(G.value), 3),
|
|
1477
1477
|
B[0] || (B[0] = z("span", {
|
|
1478
1478
|
class: "vf-multiselect__chevron",
|
|
1479
1479
|
"aria-hidden": "true"
|
|
1480
1480
|
}, "▾", -1))
|
|
1481
1481
|
], 40, ca),
|
|
1482
|
-
y.clearable && x.value.length > 0 && !y.disabled && !y.readonly ? (
|
|
1482
|
+
y.clearable && x.value.length > 0 && !y.disabled && !y.readonly ? (g(), _("button", {
|
|
1483
1483
|
key: 0,
|
|
1484
1484
|
class: "vf-multiselect__clear",
|
|
1485
1485
|
type: "button",
|
|
1486
1486
|
"aria-label": "Clear selection",
|
|
1487
1487
|
onClick: Q(h, ["stop"])
|
|
1488
1488
|
}, " ✕ ")) : T("", !0),
|
|
1489
|
-
(
|
|
1489
|
+
(g(), se(xe, { to: "body" }, [
|
|
1490
1490
|
ue(z("div", {
|
|
1491
1491
|
id: v,
|
|
1492
1492
|
ref_key: "panel",
|
|
@@ -1496,40 +1496,40 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1496
1496
|
"aria-multiselectable": "true",
|
|
1497
1497
|
"data-placement": p.value
|
|
1498
1498
|
}, [
|
|
1499
|
-
y.filter ? (
|
|
1499
|
+
y.filter ? (g(), _("div", fa, [
|
|
1500
1500
|
z("input", {
|
|
1501
1501
|
ref_key: "searchInput",
|
|
1502
1502
|
ref: l,
|
|
1503
1503
|
class: "vf-multiselect__search-control",
|
|
1504
1504
|
type: "text",
|
|
1505
|
-
value:
|
|
1505
|
+
value: i.value,
|
|
1506
1506
|
placeholder: y.searchPlaceholder,
|
|
1507
1507
|
onInput: E,
|
|
1508
1508
|
onKeydown: [
|
|
1509
1509
|
te(Q(X, ["prevent"]), ["down"]),
|
|
1510
|
-
te(Q(
|
|
1510
|
+
te(Q(le, ["prevent"]), ["up"]),
|
|
1511
1511
|
te(Q(S, ["prevent"]), ["enter"]),
|
|
1512
1512
|
te(Q(q, ["prevent"]), ["esc"])
|
|
1513
1513
|
]
|
|
1514
1514
|
}, null, 40, pa)
|
|
1515
1515
|
])) : T("", !0),
|
|
1516
|
-
y.loading ? (
|
|
1517
|
-
id:
|
|
1516
|
+
y.loading ? (g(), _("div", ba, O(y.loadingText), 1)) : A.value.length > 0 ? (g(!0), _(re, { key: 2 }, de(A.value, (P, Z) => (g(), _("button", {
|
|
1517
|
+
id: M(Z),
|
|
1518
1518
|
key: P.value,
|
|
1519
1519
|
class: I(["vf-multiselect__option", {
|
|
1520
1520
|
"is-active": L(P),
|
|
1521
1521
|
"is-disabled": P.disabled,
|
|
1522
|
-
"is-highlighted":
|
|
1522
|
+
"is-highlighted": Z === s.value
|
|
1523
1523
|
}]),
|
|
1524
1524
|
type: "button",
|
|
1525
1525
|
role: "option",
|
|
1526
1526
|
disabled: P.disabled,
|
|
1527
1527
|
"aria-selected": L(P),
|
|
1528
|
-
onClick: (ne) =>
|
|
1528
|
+
onClick: (ne) => C(P)
|
|
1529
1529
|
}, [
|
|
1530
|
-
z("span", ma,
|
|
1531
|
-
L(P) ? (
|
|
1532
|
-
], 10, ga))), 128)) : (
|
|
1530
|
+
z("span", ma, O(P.label), 1),
|
|
1531
|
+
L(P) ? (g(), _("span", ha, "✓")) : T("", !0)
|
|
1532
|
+
], 10, ga))), 128)) : (g(), _("div", ya, O(y.emptyText), 1))
|
|
1533
1533
|
], 8, va), [
|
|
1534
1534
|
[ce, u.value]
|
|
1535
1535
|
])
|
|
@@ -1542,7 +1542,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1542
1542
|
}, xa = {
|
|
1543
1543
|
class: "vf-datepicker__days",
|
|
1544
1544
|
role: "grid"
|
|
1545
|
-
}, za = ["disabled", "data-date", "onClick"],
|
|
1545
|
+
}, za = ["disabled", "data-date", "onClick"], Zr = /* @__PURE__ */ j({
|
|
1546
1546
|
__name: "datepicker",
|
|
1547
1547
|
props: {
|
|
1548
1548
|
modelValue: { default: void 0 },
|
|
@@ -1559,24 +1559,24 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1559
1559
|
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
1560
1560
|
setup(a, { emit: e }) {
|
|
1561
1561
|
let r = 0;
|
|
1562
|
-
const t = e, o = a,
|
|
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(S(X(o.modelValue) ?? /* @__PURE__ */ new Date()));
|
|
1563
1563
|
let p = null;
|
|
1564
|
-
const v =
|
|
1564
|
+
const v = m(() => X(o.modelValue)), w = m(() => X(o.min)), k = m(() => X(o.max)), x = m(() => v.value ? v.value.toLocaleDateString(o.locale, {
|
|
1565
1565
|
year: "numeric",
|
|
1566
1566
|
month: "short",
|
|
1567
1567
|
day: "numeric"
|
|
1568
|
-
}) : ""), A =
|
|
1568
|
+
}) : ""), A = m(() => f.value.toLocaleDateString(o.locale, {
|
|
1569
1569
|
year: "numeric",
|
|
1570
1570
|
month: "long"
|
|
1571
|
-
})), V =
|
|
1571
|
+
})), V = m(() => {
|
|
1572
1572
|
const y = new Intl.DateTimeFormat(o.locale, { weekday: "short" }), B = new Date(2026, 0, 4);
|
|
1573
|
-
return Array.from({ length: 7 }, (P,
|
|
1574
|
-
const ne = (
|
|
1573
|
+
return Array.from({ length: 7 }, (P, Z) => {
|
|
1574
|
+
const ne = (Z + o.firstDayOfWeek) % 7, ae = new Date(B);
|
|
1575
1575
|
return ae.setDate(B.getDate() + ne), y.format(ae);
|
|
1576
1576
|
});
|
|
1577
|
-
}), G =
|
|
1577
|
+
}), G = m(() => {
|
|
1578
1578
|
const y = H(f.value, o.firstDayOfWeek), B = v.value ? Y(v.value) : null, P = Y(/* @__PURE__ */ new Date());
|
|
1579
|
-
return Array.from({ length: 42 }, (
|
|
1579
|
+
return Array.from({ length: 42 }, (Z, ne) => {
|
|
1580
1580
|
const ae = $(y, ne), Ce = Y(ae);
|
|
1581
1581
|
return {
|
|
1582
1582
|
key: `${Ce}-${ne}`,
|
|
@@ -1589,14 +1589,14 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1589
1589
|
isToday: Ce === P
|
|
1590
1590
|
};
|
|
1591
1591
|
});
|
|
1592
|
-
}), D =
|
|
1592
|
+
}), D = m(() => {
|
|
1593
1593
|
const y = ["vf-datepicker", `vf-datepicker_${o.variant}`, l.value ? "vf-datepicker_open" : ""];
|
|
1594
1594
|
return o.size !== "normal" && y.push(`vf-datepicker_${o.size}`), o.disabled && y.push("vf-datepicker_disabled"), y.filter(Boolean);
|
|
1595
|
-
}),
|
|
1596
|
-
o.disabled || o.readonly || (l.value = !0, u.value = "bottom",
|
|
1595
|
+
}), M = (y) => t("focus", y), N = (y) => t("blur", y), L = () => {
|
|
1596
|
+
o.disabled || o.readonly || (l.value = !0, u.value = "bottom", i.value = "bottom");
|
|
1597
1597
|
}, b = () => {
|
|
1598
|
-
l.value = !1, u.value = "bottom",
|
|
1599
|
-
},
|
|
1598
|
+
l.value = !1, u.value = "bottom", i.value = "bottom";
|
|
1599
|
+
}, C = () => {
|
|
1600
1600
|
if (l.value) {
|
|
1601
1601
|
b();
|
|
1602
1602
|
return;
|
|
@@ -1613,14 +1613,14 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1613
1613
|
t("update:modelValue", B), t("change", B), b();
|
|
1614
1614
|
}, q = (y) => {
|
|
1615
1615
|
var P;
|
|
1616
|
-
if (!l.value || !
|
|
1616
|
+
if (!l.value || !d.value)
|
|
1617
1617
|
return;
|
|
1618
1618
|
const B = y.target;
|
|
1619
|
-
|
|
1619
|
+
d.value.contains(B) || (P = c.value) != null && P.contains(B) || b();
|
|
1620
1620
|
}, ee = () => {
|
|
1621
|
-
if (!
|
|
1621
|
+
if (!n.value || !c.value)
|
|
1622
1622
|
return;
|
|
1623
|
-
const y =
|
|
1623
|
+
const y = n.value, B = c.value, P = async () => {
|
|
1624
1624
|
const {
|
|
1625
1625
|
x: Ce,
|
|
1626
1626
|
y: Ae,
|
|
@@ -1630,16 +1630,16 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1630
1630
|
strategy: "fixed",
|
|
1631
1631
|
middleware: [Le(2), Ve({ placements: ["bottom", "top"] })]
|
|
1632
1632
|
});
|
|
1633
|
-
|
|
1634
|
-
},
|
|
1633
|
+
i.value = We ?? u.value, B.style.left = `${Ce}px`, B.style.top = `${Ae}px`;
|
|
1634
|
+
}, Z = async () => {
|
|
1635
1635
|
await P();
|
|
1636
1636
|
}, ne = Te(y, () => {
|
|
1637
|
-
|
|
1637
|
+
Z();
|
|
1638
1638
|
}), ae = () => {
|
|
1639
|
-
|
|
1639
|
+
Z();
|
|
1640
1640
|
};
|
|
1641
1641
|
document.addEventListener("scroll", ae, !0), window.addEventListener("resize", ae, !1), p = {
|
|
1642
|
-
update:
|
|
1642
|
+
update: Z,
|
|
1643
1643
|
destroy: () => {
|
|
1644
1644
|
ne(), document.removeEventListener("scroll", ae, !0), window.removeEventListener("resize", ae, !1);
|
|
1645
1645
|
}
|
|
@@ -1674,10 +1674,10 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1674
1674
|
const B = y.match(/^(\d{4})-(\d{2})-(\d{2})$/);
|
|
1675
1675
|
if (!B)
|
|
1676
1676
|
return null;
|
|
1677
|
-
const P = Number(B[1]),
|
|
1678
|
-
return ae.getFullYear() !== P || ae.getMonth() !==
|
|
1677
|
+
const P = Number(B[1]), Z = Number(B[2]) - 1, ne = Number(B[3]), ae = new Date(P, Z, ne);
|
|
1678
|
+
return ae.getFullYear() !== P || ae.getMonth() !== Z || ae.getDate() !== ne ? null : le(ae);
|
|
1679
1679
|
}
|
|
1680
|
-
function
|
|
1680
|
+
function le(y) {
|
|
1681
1681
|
return new Date(y.getFullYear(), y.getMonth(), y.getDate());
|
|
1682
1682
|
}
|
|
1683
1683
|
function S(y) {
|
|
@@ -1694,52 +1694,52 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1694
1694
|
return $(P, -ne);
|
|
1695
1695
|
}
|
|
1696
1696
|
function Y(y) {
|
|
1697
|
-
const B = y.getFullYear(), P = `${y.getMonth() + 1}`.padStart(2, "0"),
|
|
1698
|
-
return `${B}-${P}-${
|
|
1697
|
+
const B = y.getFullYear(), P = `${y.getMonth() + 1}`.padStart(2, "0"), Z = `${y.getDate()}`.padStart(2, "0");
|
|
1698
|
+
return `${B}-${P}-${Z}`;
|
|
1699
1699
|
}
|
|
1700
1700
|
function J(y, B, P) {
|
|
1701
|
-
const
|
|
1702
|
-
return !!(B &&
|
|
1701
|
+
const Z = le(y).getTime();
|
|
1702
|
+
return !!(B && Z < B.getTime() || P && Z > P.getTime());
|
|
1703
1703
|
}
|
|
1704
|
-
return (y, B) => (
|
|
1704
|
+
return (y, B) => (g(), _("div", {
|
|
1705
1705
|
ref_key: "root",
|
|
1706
|
-
ref:
|
|
1706
|
+
ref: d,
|
|
1707
1707
|
class: I(D.value)
|
|
1708
1708
|
}, [
|
|
1709
1709
|
z("button", {
|
|
1710
1710
|
ref_key: "control",
|
|
1711
|
-
ref:
|
|
1711
|
+
ref: n,
|
|
1712
1712
|
class: "vf-datepicker__control",
|
|
1713
1713
|
type: "button",
|
|
1714
1714
|
disabled: y.disabled,
|
|
1715
1715
|
"aria-expanded": l.value,
|
|
1716
1716
|
"aria-controls": s,
|
|
1717
1717
|
"aria-haspopup": "dialog",
|
|
1718
|
-
onClick:
|
|
1718
|
+
onClick: C,
|
|
1719
1719
|
onKeydown: [
|
|
1720
1720
|
te(Q(L, ["prevent"]), ["down"]),
|
|
1721
|
-
te(Q(
|
|
1721
|
+
te(Q(C, ["prevent"]), ["enter"]),
|
|
1722
1722
|
te(Q(b, ["prevent"]), ["esc"])
|
|
1723
1723
|
],
|
|
1724
|
-
onFocus:
|
|
1724
|
+
onFocus: M,
|
|
1725
1725
|
onBlur: N
|
|
1726
1726
|
}, [
|
|
1727
1727
|
z("span", {
|
|
1728
1728
|
class: I(["vf-datepicker__label", { "vf-datepicker__label_placeholder": !v.value }])
|
|
1729
|
-
},
|
|
1729
|
+
}, O(x.value || y.placeholder), 3),
|
|
1730
1730
|
B[0] || (B[0] = z("span", {
|
|
1731
1731
|
class: "vf-datepicker__chevron",
|
|
1732
1732
|
"aria-hidden": "true"
|
|
1733
1733
|
}, "▾", -1))
|
|
1734
1734
|
], 40, _a),
|
|
1735
|
-
(
|
|
1735
|
+
(g(), se(xe, { to: "body" }, [
|
|
1736
1736
|
ue(z("div", {
|
|
1737
1737
|
id: s,
|
|
1738
1738
|
ref_key: "panel",
|
|
1739
1739
|
ref: c,
|
|
1740
1740
|
class: "vf-datepicker__panel",
|
|
1741
1741
|
role: "dialog",
|
|
1742
|
-
"data-placement":
|
|
1742
|
+
"data-placement": i.value,
|
|
1743
1743
|
onKeydown: te(Q(b, ["prevent"]), ["esc"])
|
|
1744
1744
|
}, [
|
|
1745
1745
|
z("div", ka, [
|
|
@@ -1749,7 +1749,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1749
1749
|
"aria-label": "Previous month",
|
|
1750
1750
|
onClick: h
|
|
1751
1751
|
}, " ‹ "),
|
|
1752
|
-
z("span", wa,
|
|
1752
|
+
z("span", wa, O(A.value), 1),
|
|
1753
1753
|
z("button", {
|
|
1754
1754
|
class: "vf-datepicker__nav",
|
|
1755
1755
|
type: "button",
|
|
@@ -1758,13 +1758,13 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1758
1758
|
}, " › ")
|
|
1759
1759
|
]),
|
|
1760
1760
|
z("div", $a, [
|
|
1761
|
-
(
|
|
1761
|
+
(g(!0), _(re, null, de(V.value, (P) => (g(), _("span", {
|
|
1762
1762
|
key: P,
|
|
1763
1763
|
class: "vf-datepicker__weekday"
|
|
1764
|
-
},
|
|
1764
|
+
}, O(P), 1))), 128))
|
|
1765
1765
|
]),
|
|
1766
1766
|
z("div", xa, [
|
|
1767
|
-
(
|
|
1767
|
+
(g(!0), _(re, null, de(G.value, (P) => (g(), _("button", {
|
|
1768
1768
|
key: P.key,
|
|
1769
1769
|
class: I(["vf-datepicker__day", {
|
|
1770
1770
|
"is-outside": !P.inCurrentMonth,
|
|
@@ -1774,8 +1774,8 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1774
1774
|
type: "button",
|
|
1775
1775
|
disabled: P.isDisabled,
|
|
1776
1776
|
"data-date": P.iso,
|
|
1777
|
-
onClick: (
|
|
1778
|
-
},
|
|
1777
|
+
onClick: (Z) => W(P.date)
|
|
1778
|
+
}, O(P.day), 11, za))), 128))
|
|
1779
1779
|
])
|
|
1780
1780
|
], 40, Ca), [
|
|
1781
1781
|
[ce, l.value]
|
|
@@ -1783,7 +1783,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1783
1783
|
]))
|
|
1784
1784
|
], 2));
|
|
1785
1785
|
}
|
|
1786
|
-
}), Ba = ["disabled"], Sa = ["disabled", "aria-current", "aria-label", "onClick"], Fa = ["disabled"],
|
|
1786
|
+
}), Ba = ["disabled"], Sa = ["disabled", "aria-current", "aria-label", "onClick"], Fa = ["disabled"], Jr = /* @__PURE__ */ j({
|
|
1787
1787
|
__name: "pagination",
|
|
1788
1788
|
props: {
|
|
1789
1789
|
modelValue: { default: 1 },
|
|
@@ -1801,83 +1801,83 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1801
1801
|
},
|
|
1802
1802
|
emits: ["update:modelValue", "change"],
|
|
1803
1803
|
setup(a, { emit: e }) {
|
|
1804
|
-
const r = a, t = e, o = (v, w, k) => Math.min(k, Math.max(w, v)),
|
|
1804
|
+
const r = a, t = e, o = (v, w, k) => Math.min(k, Math.max(w, v)), d = (v, w) => {
|
|
1805
1805
|
if (w < v)
|
|
1806
1806
|
return [];
|
|
1807
1807
|
const k = [];
|
|
1808
1808
|
for (let x = v; x <= w; x += 1)
|
|
1809
1809
|
k.push(x);
|
|
1810
1810
|
return k;
|
|
1811
|
-
},
|
|
1811
|
+
}, n = m(() => {
|
|
1812
1812
|
if (typeof r.totalPages == "number" && Number.isFinite(r.totalPages))
|
|
1813
1813
|
return Math.max(1, Math.floor(r.totalPages));
|
|
1814
1814
|
const v = Math.max(1, Math.floor(r.pageSize));
|
|
1815
1815
|
return Math.max(1, Math.ceil(Math.max(0, r.totalItems) / v));
|
|
1816
|
-
}), c =
|
|
1817
|
-
const v =
|
|
1816
|
+
}), 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)), x = Math.max(0, Math.floor(r.boundaryCount)), A = k * 2 + x * 2 + 3, V = [];
|
|
1818
1818
|
if (v <= A)
|
|
1819
|
-
return
|
|
1820
|
-
const G =
|
|
1819
|
+
return d(1, v).map((L) => ({ key: `page-${L}`, type: "page", page: L }));
|
|
1820
|
+
const G = d(1, x), D = d(v - x + 1, v), M = Math.max(Math.min(w - k, v - x - k * 2 - 1), x + 2), N = Math.min(Math.max(w + k, x + k * 2 + 2), v - x - 1);
|
|
1821
1821
|
for (const L of G)
|
|
1822
1822
|
V.push({ key: `page-${L}`, type: "page", page: L });
|
|
1823
|
-
|
|
1824
|
-
for (const L of
|
|
1823
|
+
M > x + 2 ? V.push({ key: "ellipsis-start", type: "ellipsis", page: -1 }) : x + 1 <= v - x && V.push({ key: `page-${x + 1}`, type: "page", page: x + 1 });
|
|
1824
|
+
for (const L of d(M, N))
|
|
1825
1825
|
V.push({ key: `page-${L}`, type: "page", page: L });
|
|
1826
1826
|
N < v - x - 1 ? V.push({ key: "ellipsis-end", type: "ellipsis", page: -2 }) : v - x > x && V.push({ key: `page-${v - x}`, type: "page", page: v - x });
|
|
1827
1827
|
for (const L of D)
|
|
1828
1828
|
V.push({ key: `page-${L}`, type: "page", page: L });
|
|
1829
1829
|
return V;
|
|
1830
|
-
}), f =
|
|
1830
|
+
}), f = m(() => {
|
|
1831
1831
|
const v = ["vf-pagination", `vf-pagination_${r.variant}`];
|
|
1832
1832
|
return r.size !== "normal" && v.push(`vf-pagination_${r.size}`), r.disabled && v.push("vf-pagination_disabled"), v;
|
|
1833
1833
|
}), p = (v, w) => {
|
|
1834
|
-
if (
|
|
1834
|
+
if (i.value)
|
|
1835
1835
|
return;
|
|
1836
|
-
const k = o(v, 1,
|
|
1836
|
+
const k = o(v, 1, n.value);
|
|
1837
1837
|
k !== r.modelValue && (t("update:modelValue", k), t("change", k, w));
|
|
1838
1838
|
};
|
|
1839
|
-
return (v, w) => (
|
|
1839
|
+
return (v, w) => (g(), _("nav", {
|
|
1840
1840
|
class: I(f.value),
|
|
1841
1841
|
"aria-label": "Pagination"
|
|
1842
1842
|
}, [
|
|
1843
1843
|
z("button", {
|
|
1844
1844
|
class: "vf-pagination__item vf-pagination__item_nav",
|
|
1845
1845
|
type: "button",
|
|
1846
|
-
disabled:
|
|
1846
|
+
disabled: i.value || l.value,
|
|
1847
1847
|
"aria-label": "Previous page",
|
|
1848
1848
|
onClick: w[0] || (w[0] = (k) => p(c.value - 1, k))
|
|
1849
|
-
},
|
|
1850
|
-
(
|
|
1849
|
+
}, O(v.prevLabel), 9, Ba),
|
|
1850
|
+
(g(!0), _(re, null, de(s.value, (k) => (g(), _("button", {
|
|
1851
1851
|
key: k.key,
|
|
1852
1852
|
class: I(["vf-pagination__item", {
|
|
1853
1853
|
"is-current": k.type === "page" && k.page === c.value,
|
|
1854
1854
|
"is-ellipsis": k.type === "ellipsis"
|
|
1855
1855
|
}]),
|
|
1856
1856
|
type: "button",
|
|
1857
|
-
disabled:
|
|
1857
|
+
disabled: i.value || k.type === "ellipsis",
|
|
1858
1858
|
"aria-current": k.type === "page" && k.page === c.value ? "page" : void 0,
|
|
1859
1859
|
"aria-label": k.type === "page" ? `Page ${k.page}` : void 0,
|
|
1860
1860
|
onClick: (x) => k.type === "page" && p(k.page, x)
|
|
1861
1861
|
}, [
|
|
1862
|
-
k.type === "page" ? (
|
|
1863
|
-
|
|
1864
|
-
], 64)) : (
|
|
1865
|
-
|
|
1862
|
+
k.type === "page" ? (g(), _(re, { key: 0 }, [
|
|
1863
|
+
U(O(k.page), 1)
|
|
1864
|
+
], 64)) : (g(), _(re, { key: 1 }, [
|
|
1865
|
+
U(O(v.ellipsisLabel), 1)
|
|
1866
1866
|
], 64))
|
|
1867
1867
|
], 10, Sa))), 128)),
|
|
1868
1868
|
z("button", {
|
|
1869
1869
|
class: "vf-pagination__item vf-pagination__item_nav",
|
|
1870
1870
|
type: "button",
|
|
1871
|
-
disabled:
|
|
1871
|
+
disabled: i.value || u.value,
|
|
1872
1872
|
"aria-label": "Next page",
|
|
1873
1873
|
onClick: w[1] || (w[1] = (k) => p(c.value + 1, k))
|
|
1874
|
-
},
|
|
1874
|
+
}, O(v.nextLabel), 9, Fa)
|
|
1875
1875
|
], 2));
|
|
1876
1876
|
}
|
|
1877
1877
|
}), Va = ["checked", "disabled"], La = {
|
|
1878
1878
|
key: 0,
|
|
1879
1879
|
class: "vf-checkbox__label"
|
|
1880
|
-
},
|
|
1880
|
+
}, Qr = /* @__PURE__ */ j({
|
|
1881
1881
|
__name: "checkbox",
|
|
1882
1882
|
props: {
|
|
1883
1883
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -1887,32 +1887,32 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1887
1887
|
},
|
|
1888
1888
|
emits: ["update:modelValue", "change"],
|
|
1889
1889
|
setup(a, { emit: e }) {
|
|
1890
|
-
const r = e, t = a, o =
|
|
1891
|
-
const
|
|
1892
|
-
return t.disabled &&
|
|
1893
|
-
}),
|
|
1894
|
-
const c =
|
|
1895
|
-
r("update:modelValue", c.checked), r("change",
|
|
1890
|
+
const r = e, t = a, o = m(() => {
|
|
1891
|
+
const n = ["vf-checkbox", `vf-checkbox_${t.variant}`];
|
|
1892
|
+
return t.disabled && n.push("vf-checkbox_disabled"), n;
|
|
1893
|
+
}), d = (n) => {
|
|
1894
|
+
const c = n.target;
|
|
1895
|
+
r("update:modelValue", c.checked), r("change", n);
|
|
1896
1896
|
};
|
|
1897
|
-
return (
|
|
1897
|
+
return (n, c) => (g(), _("label", {
|
|
1898
1898
|
class: I(o.value)
|
|
1899
1899
|
}, [
|
|
1900
1900
|
z("input", {
|
|
1901
1901
|
class: "vf-checkbox__control",
|
|
1902
1902
|
type: "checkbox",
|
|
1903
|
-
checked:
|
|
1904
|
-
disabled:
|
|
1905
|
-
onChange:
|
|
1903
|
+
checked: n.modelValue,
|
|
1904
|
+
disabled: n.disabled,
|
|
1905
|
+
onChange: d
|
|
1906
1906
|
}, null, 40, Va),
|
|
1907
1907
|
c[0] || (c[0] = z("span", { class: "vf-checkbox__box" }, null, -1)),
|
|
1908
|
-
|
|
1909
|
-
F(
|
|
1910
|
-
|
|
1908
|
+
n.label || n.$slots.default ? (g(), _("span", La, [
|
|
1909
|
+
F(n.$slots, "default", {}, () => [
|
|
1910
|
+
U(O(n.label), 1)
|
|
1911
1911
|
])
|
|
1912
1912
|
])) : T("", !0)
|
|
1913
1913
|
], 2));
|
|
1914
1914
|
}
|
|
1915
|
-
}), ot = Symbol("VueForgeRadioGroup"), Ta = ["aria-disabled", "aria-label", "aria-labelledby"],
|
|
1915
|
+
}), ot = Symbol("VueForgeRadioGroup"), Ta = ["aria-disabled", "aria-label", "aria-labelledby"], el = /* @__PURE__ */ j({
|
|
1916
1916
|
__name: "radio-group",
|
|
1917
1917
|
props: {
|
|
1918
1918
|
modelValue: { type: [String, Number, Boolean, null], default: void 0 },
|
|
@@ -1925,19 +1925,19 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1925
1925
|
},
|
|
1926
1926
|
emits: ["update:modelValue", "change"],
|
|
1927
1927
|
setup(a, { emit: e }) {
|
|
1928
|
-
const r = e, t = a, o =
|
|
1928
|
+
const r = e, t = a, o = m(() => {
|
|
1929
1929
|
const c = ["vf-radio-group"];
|
|
1930
1930
|
return t.direction === "horizontal" && c.push("vf-radio-group_horizontal"), c;
|
|
1931
|
-
}),
|
|
1931
|
+
}), d = (c, l) => {
|
|
1932
1932
|
r("update:modelValue", c), r("change", c, l);
|
|
1933
|
-
},
|
|
1934
|
-
name:
|
|
1935
|
-
modelValue:
|
|
1936
|
-
disabled:
|
|
1937
|
-
variant:
|
|
1938
|
-
onChange:
|
|
1933
|
+
}, n = {
|
|
1934
|
+
name: m(() => t.name),
|
|
1935
|
+
modelValue: m(() => t.modelValue),
|
|
1936
|
+
disabled: m(() => t.disabled),
|
|
1937
|
+
variant: m(() => t.variant),
|
|
1938
|
+
onChange: d
|
|
1939
1939
|
};
|
|
1940
|
-
return Ne(ot,
|
|
1940
|
+
return Ne(ot, n), (c, l) => (g(), _("div", {
|
|
1941
1941
|
class: I(o.value),
|
|
1942
1942
|
role: "radiogroup",
|
|
1943
1943
|
"aria-disabled": c.disabled || void 0,
|
|
@@ -1950,7 +1950,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1950
1950
|
}), Ra = ["name", "value", "checked", "disabled"], Pa = {
|
|
1951
1951
|
key: 0,
|
|
1952
1952
|
class: "vf-radio__label"
|
|
1953
|
-
},
|
|
1953
|
+
}, tl = /* @__PURE__ */ j({
|
|
1954
1954
|
__name: "radio-button",
|
|
1955
1955
|
props: {
|
|
1956
1956
|
modelValue: { type: [String, Number, Boolean, null], default: void 0 },
|
|
@@ -1962,33 +1962,33 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
1962
1962
|
},
|
|
1963
1963
|
emits: ["update:modelValue", "change"],
|
|
1964
1964
|
setup(a, { emit: e }) {
|
|
1965
|
-
const r = e, t = a, o = Ee(ot, null),
|
|
1965
|
+
const r = e, t = a, o = Ee(ot, null), d = m(() => o ? o.modelValue.value : t.modelValue), n = m(() => o ? o.name.value : t.name), c = m(() => o ? o.variant.value : t.variant), l = m(() => (o ? o.disabled.value : !1) || t.disabled), u = m(() => d.value === t.value), i = m(() => {
|
|
1966
1966
|
const f = ["vf-radio", `vf-radio_${c.value}`];
|
|
1967
1967
|
return l.value && f.push("vf-radio_disabled"), f;
|
|
1968
1968
|
}), s = (f) => {
|
|
1969
1969
|
l.value || (o ? o.onChange(t.value, f) : r("update:modelValue", t.value), r("change", t.value, f));
|
|
1970
1970
|
};
|
|
1971
|
-
return (f, p) => (
|
|
1972
|
-
class: I(
|
|
1971
|
+
return (f, p) => (g(), _("label", {
|
|
1972
|
+
class: I(i.value)
|
|
1973
1973
|
}, [
|
|
1974
1974
|
z("input", {
|
|
1975
1975
|
class: "vf-radio__control",
|
|
1976
1976
|
type: "radio",
|
|
1977
|
-
name:
|
|
1977
|
+
name: n.value,
|
|
1978
1978
|
value: f.value,
|
|
1979
1979
|
checked: u.value,
|
|
1980
1980
|
disabled: l.value,
|
|
1981
1981
|
onChange: s
|
|
1982
1982
|
}, null, 40, Ra),
|
|
1983
1983
|
p[0] || (p[0] = z("span", { class: "vf-radio__circle" }, null, -1)),
|
|
1984
|
-
f.label || f.$slots.default ? (
|
|
1984
|
+
f.label || f.$slots.default ? (g(), _("span", Pa, [
|
|
1985
1985
|
F(f.$slots, "default", {}, () => [
|
|
1986
|
-
|
|
1986
|
+
U(O(f.label), 1)
|
|
1987
1987
|
])
|
|
1988
1988
|
])) : T("", !0)
|
|
1989
1989
|
], 2));
|
|
1990
1990
|
}
|
|
1991
|
-
}),
|
|
1991
|
+
}), Ye = Symbol("VueForgeTabs"), Ia = ["aria-orientation", "aria-label", "aria-labelledby"], Oa = { class: "vf-tabs__panels" }, al = /* @__PURE__ */ j({
|
|
1992
1992
|
__name: "tabs",
|
|
1993
1993
|
props: {
|
|
1994
1994
|
modelValue: { default: void 0 },
|
|
@@ -2000,10 +2000,10 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2000
2000
|
emits: ["update:modelValue", "change"],
|
|
2001
2001
|
setup(a, { emit: e }) {
|
|
2002
2002
|
let r = 0;
|
|
2003
|
-
const t = e, o = a,
|
|
2003
|
+
const t = e, o = a, d = ++r, n = (v) => String(v).toLowerCase().trim().replace(/\s+/g, "-").replace(/[^a-z0-9_-]/g, ""), c = m(() => {
|
|
2004
2004
|
const v = ["vf-tabs"];
|
|
2005
2005
|
return o.orientation === "vertical" && v.push("vf-tabs_vertical"), o.disabled && v.push("vf-tabs_disabled"), v;
|
|
2006
|
-
}), l = K(null), u = () => l.value ? Array.from(l.value.querySelectorAll('[role="tab"]:not([disabled])')) : [],
|
|
2006
|
+
}), l = K(null), u = () => l.value ? Array.from(l.value.querySelectorAll('[role="tab"]:not([disabled])')) : [], i = (v) => {
|
|
2007
2007
|
v && (v.focus(), v.click());
|
|
2008
2008
|
}, s = (v) => {
|
|
2009
2009
|
if (o.disabled)
|
|
@@ -2014,20 +2014,20 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2014
2014
|
const V = u();
|
|
2015
2015
|
if (!V.length)
|
|
2016
2016
|
return;
|
|
2017
|
-
const G = V.findIndex((L) => L.getAttribute("aria-selected") === "true"), D = V.findIndex((L) => L === document.activeElement),
|
|
2018
|
-
let N =
|
|
2019
|
-
x.includes(k) ? N = (
|
|
2017
|
+
const G = V.findIndex((L) => L.getAttribute("aria-selected") === "true"), D = V.findIndex((L) => L === document.activeElement), M = D >= 0 ? D : Math.max(G, 0);
|
|
2018
|
+
let N = M;
|
|
2019
|
+
x.includes(k) ? N = (M + 1) % V.length : A.includes(k) ? N = (M - 1 + V.length) % V.length : k === "Home" ? N = 0 : k === "End" && (N = V.length - 1), v.preventDefault(), i(V[N]);
|
|
2020
2020
|
}, f = (v, w) => {
|
|
2021
2021
|
t("update:modelValue", v), t("change", v, w);
|
|
2022
2022
|
}, p = {
|
|
2023
|
-
activeValue:
|
|
2024
|
-
disabled:
|
|
2025
|
-
orientation:
|
|
2023
|
+
activeValue: m(() => o.modelValue),
|
|
2024
|
+
disabled: m(() => o.disabled),
|
|
2025
|
+
orientation: m(() => o.orientation),
|
|
2026
2026
|
onChange: f,
|
|
2027
|
-
getTabId: (v) => `vf-tab-${
|
|
2028
|
-
getPanelId: (v) => `vf-tabpanel-${
|
|
2027
|
+
getTabId: (v) => `vf-tab-${d}-${n(v)}`,
|
|
2028
|
+
getPanelId: (v) => `vf-tabpanel-${d}-${n(v)}`
|
|
2029
2029
|
};
|
|
2030
|
-
return Ne(
|
|
2030
|
+
return Ne(Ye, p), (v, w) => (g(), _("div", {
|
|
2031
2031
|
class: I(c.value)
|
|
2032
2032
|
}, [
|
|
2033
2033
|
z("div", {
|
|
@@ -2047,7 +2047,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2047
2047
|
])
|
|
2048
2048
|
], 2));
|
|
2049
2049
|
}
|
|
2050
|
-
}), Ma = ["id", "aria-selected", "aria-controls", "disabled", "tabindex"],
|
|
2050
|
+
}), Ma = ["id", "aria-selected", "aria-controls", "disabled", "tabindex"], ol = /* @__PURE__ */ j({
|
|
2051
2051
|
__name: "tab",
|
|
2052
2052
|
props: {
|
|
2053
2053
|
value: {},
|
|
@@ -2056,45 +2056,45 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2056
2056
|
},
|
|
2057
2057
|
emits: ["change"],
|
|
2058
2058
|
setup(a, { emit: e }) {
|
|
2059
|
-
const r = e, t = a, o = Ee(
|
|
2060
|
-
!o ||
|
|
2059
|
+
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
|
+
!o || n.value || (o.onChange(t.value, s), r("change", t.value, s));
|
|
2061
2061
|
};
|
|
2062
|
-
return (s, f) => (
|
|
2062
|
+
return (s, f) => (g(), _("button", {
|
|
2063
2063
|
id: c.value,
|
|
2064
|
-
class: I(["vf-tab", { "vf-tab_active":
|
|
2064
|
+
class: I(["vf-tab", { "vf-tab_active": d.value, "vf-tab_disabled": n.value }]),
|
|
2065
2065
|
type: "button",
|
|
2066
2066
|
role: "tab",
|
|
2067
|
-
"aria-selected":
|
|
2067
|
+
"aria-selected": d.value,
|
|
2068
2068
|
"aria-controls": l.value,
|
|
2069
|
-
disabled:
|
|
2069
|
+
disabled: n.value,
|
|
2070
2070
|
tabindex: u.value,
|
|
2071
|
-
onClick:
|
|
2071
|
+
onClick: i
|
|
2072
2072
|
}, [
|
|
2073
2073
|
F(s.$slots, "default", {}, () => [
|
|
2074
|
-
|
|
2074
|
+
U(O(s.label), 1)
|
|
2075
2075
|
])
|
|
2076
2076
|
], 10, Ma));
|
|
2077
2077
|
}
|
|
2078
|
-
}), Da = ["id", "aria-labelledby"],
|
|
2078
|
+
}), Da = ["id", "aria-labelledby"], rl = /* @__PURE__ */ j({
|
|
2079
2079
|
__name: "tab-panel",
|
|
2080
2080
|
props: {
|
|
2081
2081
|
value: {}
|
|
2082
2082
|
},
|
|
2083
2083
|
setup(a) {
|
|
2084
|
-
const e = a, r = Ee(
|
|
2085
|
-
return (
|
|
2086
|
-
id:
|
|
2084
|
+
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((g(), _("div", {
|
|
2086
|
+
id: d.value,
|
|
2087
2087
|
class: "vf-tab-panel",
|
|
2088
2088
|
role: "tabpanel",
|
|
2089
2089
|
tabindex: "0",
|
|
2090
2090
|
"aria-labelledby": o.value
|
|
2091
2091
|
}, [
|
|
2092
|
-
F(
|
|
2092
|
+
F(n.$slots, "default")
|
|
2093
2093
|
], 8, Da)), [
|
|
2094
2094
|
[ce, t.value]
|
|
2095
2095
|
]);
|
|
2096
2096
|
}
|
|
2097
|
-
}), rt = Symbol("VueForgeAccordion"), Ea = ["aria-label", "aria-labelledby"],
|
|
2097
|
+
}), rt = Symbol("VueForgeAccordion"), Ea = ["aria-label", "aria-labelledby"], ll = /* @__PURE__ */ j({
|
|
2098
2098
|
__name: "accordion",
|
|
2099
2099
|
props: {
|
|
2100
2100
|
modelValue: { default: void 0 },
|
|
@@ -2108,7 +2108,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2108
2108
|
emits: ["update:modelValue", "change"],
|
|
2109
2109
|
setup(a, { emit: e }) {
|
|
2110
2110
|
let r = 0;
|
|
2111
|
-
const t = e, o = a,
|
|
2111
|
+
const t = e, o = a, d = ++r, n = (s) => String(s).toLowerCase().trim().replace(/\s+/g, "-").replace(/[^a-z0-9_-]/g, ""), c = m(() => {
|
|
2112
2112
|
const s = ["vf-accordion", `vf-accordion_${o.variant}`];
|
|
2113
2113
|
return o.size !== "normal" && s.push(`vf-accordion_${o.size}`), o.disabled && s.push("vf-accordion_disabled"), s;
|
|
2114
2114
|
}), l = (s) => Array.isArray(s) ? s : s == null ? [] : [s], u = (s, f) => {
|
|
@@ -2121,17 +2121,17 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2121
2121
|
}
|
|
2122
2122
|
const p = o.modelValue === s ? void 0 : s;
|
|
2123
2123
|
t("update:modelValue", p), t("change", p, f);
|
|
2124
|
-
},
|
|
2125
|
-
modelValue:
|
|
2126
|
-
multiple:
|
|
2127
|
-
disabled:
|
|
2128
|
-
variant:
|
|
2129
|
-
size:
|
|
2124
|
+
}, i = {
|
|
2125
|
+
modelValue: m(() => o.modelValue),
|
|
2126
|
+
multiple: m(() => o.multiple),
|
|
2127
|
+
disabled: m(() => o.disabled),
|
|
2128
|
+
variant: m(() => o.variant),
|
|
2129
|
+
size: m(() => o.size),
|
|
2130
2130
|
onToggle: u,
|
|
2131
|
-
getHeaderId: (s) => `vf-accordion-header-${
|
|
2132
|
-
getPanelId: (s) => `vf-accordion-panel-${
|
|
2131
|
+
getHeaderId: (s) => `vf-accordion-header-${d}-${n(s)}`,
|
|
2132
|
+
getPanelId: (s) => `vf-accordion-panel-${d}-${n(s)}`
|
|
2133
2133
|
};
|
|
2134
|
-
return Ne(rt,
|
|
2134
|
+
return Ne(rt, i), (s, f) => (g(), _("div", {
|
|
2135
2135
|
class: I(c.value),
|
|
2136
2136
|
"aria-label": s.ariaLabel || void 0,
|
|
2137
2137
|
"aria-labelledby": s.ariaLabelledby || void 0
|
|
@@ -2139,7 +2139,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2139
2139
|
F(s.$slots, "default")
|
|
2140
2140
|
], 10, Ea));
|
|
2141
2141
|
}
|
|
2142
|
-
}), Aa = ["id", "disabled", "aria-expanded", "aria-controls"], Wa = { class: "vf-accordion__title" }, Ha = ["id", "aria-labelledby", "aria-hidden"], Ka = { class: "vf-accordion__panel-inner" },
|
|
2142
|
+
}), Aa = ["id", "disabled", "aria-expanded", "aria-controls"], Wa = { class: "vf-accordion__title" }, Ha = ["id", "aria-labelledby", "aria-hidden"], Ka = { class: "vf-accordion__panel-inner" }, sl = /* @__PURE__ */ j({
|
|
2143
2143
|
__name: "accordion-item",
|
|
2144
2144
|
props: {
|
|
2145
2145
|
value: {},
|
|
@@ -2148,32 +2148,32 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2148
2148
|
unmount: { type: Boolean, default: !1 }
|
|
2149
2149
|
},
|
|
2150
2150
|
setup(a) {
|
|
2151
|
-
const e = a, r = Ee(rt, null), t =
|
|
2151
|
+
const e = a, r = Ee(rt, null), t = m(() => {
|
|
2152
2152
|
if (!r)
|
|
2153
2153
|
return !1;
|
|
2154
|
-
const
|
|
2155
|
-
return Array.isArray(
|
|
2156
|
-
}), o =
|
|
2157
|
-
const
|
|
2158
|
-
return t.value &&
|
|
2159
|
-
}), u = (
|
|
2160
|
-
!r || o.value || r.onToggle(e.value,
|
|
2154
|
+
const i = r.modelValue.value;
|
|
2155
|
+
return Array.isArray(i) ? i.includes(e.value) : i === e.value;
|
|
2156
|
+
}), o = m(() => ((r == null ? void 0 : r.disabled.value) ?? !1) || e.disabled), d = m(() => r ? r.getHeaderId(e.value) : void 0), n = m(() => r ? r.getPanelId(e.value) : void 0), c = m(() => e.unmount ? t.value : !0), l = m(() => {
|
|
2157
|
+
const i = ["vf-accordion-item"];
|
|
2158
|
+
return t.value && i.push("vf-accordion-item_open"), o.value && i.push("vf-accordion-item_disabled"), i;
|
|
2159
|
+
}), u = (i) => {
|
|
2160
|
+
!r || o.value || r.onToggle(e.value, i);
|
|
2161
2161
|
};
|
|
2162
|
-
return (
|
|
2162
|
+
return (i, s) => (g(), _("div", {
|
|
2163
2163
|
class: I(l.value)
|
|
2164
2164
|
}, [
|
|
2165
2165
|
z("button", {
|
|
2166
|
-
id:
|
|
2166
|
+
id: d.value,
|
|
2167
2167
|
class: "vf-accordion__header",
|
|
2168
2168
|
type: "button",
|
|
2169
2169
|
disabled: o.value,
|
|
2170
2170
|
"aria-expanded": t.value,
|
|
2171
|
-
"aria-controls":
|
|
2171
|
+
"aria-controls": n.value,
|
|
2172
2172
|
onClick: u
|
|
2173
2173
|
}, [
|
|
2174
2174
|
z("span", Wa, [
|
|
2175
|
-
F(
|
|
2176
|
-
|
|
2175
|
+
F(i.$slots, "title", {}, () => [
|
|
2176
|
+
U(O(i.title), 1)
|
|
2177
2177
|
])
|
|
2178
2178
|
]),
|
|
2179
2179
|
s[0] || (s[0] = z("span", {
|
|
@@ -2181,16 +2181,16 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2181
2181
|
"aria-hidden": "true"
|
|
2182
2182
|
}, null, -1))
|
|
2183
2183
|
], 8, Aa),
|
|
2184
|
-
c.value ? (
|
|
2184
|
+
c.value ? (g(), _("div", {
|
|
2185
2185
|
key: 0,
|
|
2186
|
-
id:
|
|
2186
|
+
id: n.value,
|
|
2187
2187
|
class: I(["vf-accordion__panel", { "vf-accordion__panel_open": t.value }]),
|
|
2188
2188
|
role: "region",
|
|
2189
|
-
"aria-labelledby":
|
|
2189
|
+
"aria-labelledby": d.value,
|
|
2190
2190
|
"aria-hidden": t.value ? void 0 : "true"
|
|
2191
2191
|
}, [
|
|
2192
2192
|
z("div", Ka, [
|
|
2193
|
-
F(
|
|
2193
|
+
F(i.$slots, "default")
|
|
2194
2194
|
])
|
|
2195
2195
|
], 10, Ha)) : T("", !0)
|
|
2196
2196
|
], 2));
|
|
@@ -2201,7 +2201,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2201
2201
|
}, ja = {
|
|
2202
2202
|
key: 1,
|
|
2203
2203
|
class: "vf-toast__message"
|
|
2204
|
-
},
|
|
2204
|
+
}, nl = /* @__PURE__ */ j({
|
|
2205
2205
|
__name: "toast",
|
|
2206
2206
|
props: {
|
|
2207
2207
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -2215,59 +2215,59 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2215
2215
|
setup(a, { emit: e }) {
|
|
2216
2216
|
const r = e, t = a;
|
|
2217
2217
|
let o = null;
|
|
2218
|
-
const
|
|
2218
|
+
const d = () => {
|
|
2219
2219
|
o !== null && (clearTimeout(o), o = null);
|
|
2220
|
-
},
|
|
2221
|
-
|
|
2220
|
+
}, n = () => {
|
|
2221
|
+
d(), !(!t.modelValue || t.duration <= 0) && (o = window.setTimeout(() => {
|
|
2222
2222
|
r("update:modelValue", !1), r("close");
|
|
2223
2223
|
}, t.duration));
|
|
2224
2224
|
}, c = () => {
|
|
2225
|
-
|
|
2225
|
+
d(), r("update:modelValue", !1), r("close");
|
|
2226
2226
|
};
|
|
2227
2227
|
return oe(
|
|
2228
2228
|
() => t.modelValue,
|
|
2229
2229
|
(l) => {
|
|
2230
|
-
l && r("open"),
|
|
2230
|
+
l && r("open"), n();
|
|
2231
2231
|
},
|
|
2232
2232
|
{ immediate: !0 }
|
|
2233
2233
|
), $e(() => {
|
|
2234
|
-
|
|
2235
|
-
}), (l, u) => ue((
|
|
2234
|
+
d();
|
|
2235
|
+
}), (l, u) => ue((g(), _("div", {
|
|
2236
2236
|
class: "vf-toast",
|
|
2237
2237
|
role: "status",
|
|
2238
2238
|
"aria-live": "polite",
|
|
2239
2239
|
"data-severity": l.severity
|
|
2240
2240
|
}, [
|
|
2241
2241
|
z("div", Ga, [
|
|
2242
|
-
l.title ? (
|
|
2243
|
-
l.message || l.$slots.default ? (
|
|
2242
|
+
l.title ? (g(), _("div", Ya, O(l.title), 1)) : T("", !0),
|
|
2243
|
+
l.message || l.$slots.default ? (g(), _("div", ja, [
|
|
2244
2244
|
F(l.$slots, "default", {}, () => [
|
|
2245
|
-
|
|
2245
|
+
U(O(l.message), 1)
|
|
2246
2246
|
])
|
|
2247
2247
|
])) : T("", !0)
|
|
2248
2248
|
]),
|
|
2249
|
-
l.closable ? (
|
|
2249
|
+
l.closable ? (g(), _("button", {
|
|
2250
2250
|
key: 0,
|
|
2251
2251
|
class: "vf-toast__close",
|
|
2252
2252
|
type: "button",
|
|
2253
2253
|
onClick: c
|
|
2254
2254
|
}, [
|
|
2255
2255
|
F(l.$slots, "close", {}, () => [
|
|
2256
|
-
u[0] || (u[0] =
|
|
2256
|
+
u[0] || (u[0] = U("×"))
|
|
2257
2257
|
])
|
|
2258
2258
|
])) : T("", !0)
|
|
2259
2259
|
], 8, Na)), [
|
|
2260
2260
|
[ce, l.modelValue]
|
|
2261
2261
|
]);
|
|
2262
2262
|
}
|
|
2263
|
-
}),
|
|
2263
|
+
}), il = /* @__PURE__ */ j({
|
|
2264
2264
|
__name: "toast-container",
|
|
2265
2265
|
props: {
|
|
2266
2266
|
position: { default: "top-right" }
|
|
2267
2267
|
},
|
|
2268
2268
|
setup(a) {
|
|
2269
|
-
const e = a, r =
|
|
2270
|
-
return (t, o) => (
|
|
2269
|
+
const e = a, r = m(() => `vf-toast-container_${e.position}`);
|
|
2270
|
+
return (t, o) => (g(), se(xe, { to: "body" }, [
|
|
2271
2271
|
z("div", {
|
|
2272
2272
|
class: I(["vf-toast-container", r.value]),
|
|
2273
2273
|
role: "region",
|
|
@@ -2290,7 +2290,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2290
2290
|
}, Qa = {
|
|
2291
2291
|
key: 1,
|
|
2292
2292
|
class: "vf-alert__actions"
|
|
2293
|
-
},
|
|
2293
|
+
}, dl = /* @__PURE__ */ j({
|
|
2294
2294
|
__name: "alert",
|
|
2295
2295
|
props: {
|
|
2296
2296
|
modelValue: { type: Boolean },
|
|
@@ -2302,7 +2302,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2302
2302
|
},
|
|
2303
2303
|
emits: ["update:modelValue", "close"],
|
|
2304
2304
|
setup(a, { emit: e }) {
|
|
2305
|
-
const r = e, t = a, o = K(!0),
|
|
2305
|
+
const r = e, t = a, o = K(!0), d = m(() => typeof t.modelValue == "boolean"), n = m(() => d.value ? t.modelValue : o.value);
|
|
2306
2306
|
oe(
|
|
2307
2307
|
() => t.modelValue,
|
|
2308
2308
|
(l) => {
|
|
@@ -2311,34 +2311,34 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2311
2311
|
{ immediate: !0 }
|
|
2312
2312
|
);
|
|
2313
2313
|
const c = () => {
|
|
2314
|
-
|
|
2314
|
+
d.value ? r("update:modelValue", !1) : o.value = !1, r("close");
|
|
2315
2315
|
};
|
|
2316
|
-
return (l, u) => ue((
|
|
2316
|
+
return (l, u) => ue((g(), _("div", {
|
|
2317
2317
|
class: "vf-alert",
|
|
2318
2318
|
role: "alert",
|
|
2319
2319
|
"data-severity": l.severity
|
|
2320
2320
|
}, [
|
|
2321
|
-
l.$slots.icon || l.icon ? (
|
|
2321
|
+
l.$slots.icon || l.icon ? (g(), _("div", qa, [
|
|
2322
2322
|
F(l.$slots, "icon", {}, () => [
|
|
2323
|
-
|
|
2323
|
+
U(O(l.icon), 1)
|
|
2324
2324
|
])
|
|
2325
2325
|
])) : T("", !0),
|
|
2326
2326
|
z("div", Ua, [
|
|
2327
|
-
l.title || l.$slots.title ? (
|
|
2327
|
+
l.title || l.$slots.title ? (g(), _("div", Za, [
|
|
2328
2328
|
F(l.$slots, "title", {}, () => [
|
|
2329
|
-
|
|
2329
|
+
U(O(l.title), 1)
|
|
2330
2330
|
])
|
|
2331
2331
|
])) : T("", !0),
|
|
2332
|
-
l.message || l.$slots.default ? (
|
|
2332
|
+
l.message || l.$slots.default ? (g(), _("div", Ja, [
|
|
2333
2333
|
F(l.$slots, "default", {}, () => [
|
|
2334
|
-
|
|
2334
|
+
U(O(l.message), 1)
|
|
2335
2335
|
])
|
|
2336
2336
|
])) : T("", !0)
|
|
2337
2337
|
]),
|
|
2338
|
-
l.$slots.actions ? (
|
|
2338
|
+
l.$slots.actions ? (g(), _("div", Qa, [
|
|
2339
2339
|
F(l.$slots, "actions")
|
|
2340
2340
|
])) : T("", !0),
|
|
2341
|
-
l.closable ? (
|
|
2341
|
+
l.closable ? (g(), _("button", {
|
|
2342
2342
|
key: 2,
|
|
2343
2343
|
class: "vf-alert__close",
|
|
2344
2344
|
type: "button",
|
|
@@ -2346,17 +2346,17 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2346
2346
|
onClick: c
|
|
2347
2347
|
}, [
|
|
2348
2348
|
F(l.$slots, "close", {}, () => [
|
|
2349
|
-
u[0] || (u[0] =
|
|
2349
|
+
u[0] || (u[0] = U("×"))
|
|
2350
2350
|
])
|
|
2351
2351
|
])) : T("", !0)
|
|
2352
2352
|
], 8, Xa)), [
|
|
2353
|
-
[ce,
|
|
2353
|
+
[ce, n.value]
|
|
2354
2354
|
]);
|
|
2355
2355
|
}
|
|
2356
2356
|
}), eo = ["checked", "disabled"], to = {
|
|
2357
2357
|
key: 0,
|
|
2358
2358
|
class: "vf-switch__label"
|
|
2359
|
-
},
|
|
2359
|
+
}, ul = /* @__PURE__ */ j({
|
|
2360
2360
|
__name: "switch",
|
|
2361
2361
|
props: {
|
|
2362
2362
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -2365,77 +2365,77 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2365
2365
|
},
|
|
2366
2366
|
emits: ["update:modelValue", "change"],
|
|
2367
2367
|
setup(a, { emit: e }) {
|
|
2368
|
-
const r = e, t = a, o =
|
|
2369
|
-
const
|
|
2370
|
-
return t.disabled &&
|
|
2371
|
-
}),
|
|
2372
|
-
const c =
|
|
2373
|
-
r("update:modelValue", c.checked), r("change",
|
|
2368
|
+
const r = e, t = a, o = m(() => {
|
|
2369
|
+
const n = ["vf-switch"];
|
|
2370
|
+
return t.disabled && n.push("vf-switch_disabled"), n;
|
|
2371
|
+
}), d = (n) => {
|
|
2372
|
+
const c = n.target;
|
|
2373
|
+
r("update:modelValue", c.checked), r("change", n);
|
|
2374
2374
|
};
|
|
2375
|
-
return (
|
|
2375
|
+
return (n, c) => (g(), _("label", {
|
|
2376
2376
|
class: I(o.value)
|
|
2377
2377
|
}, [
|
|
2378
2378
|
z("input", {
|
|
2379
2379
|
class: "vf-switch__control",
|
|
2380
2380
|
type: "checkbox",
|
|
2381
|
-
checked:
|
|
2382
|
-
disabled:
|
|
2383
|
-
onChange:
|
|
2381
|
+
checked: n.modelValue,
|
|
2382
|
+
disabled: n.disabled,
|
|
2383
|
+
onChange: d
|
|
2384
2384
|
}, null, 40, eo),
|
|
2385
2385
|
c[0] || (c[0] = z("span", { class: "vf-switch__track" }, [
|
|
2386
2386
|
z("span", { class: "vf-switch__thumb" })
|
|
2387
2387
|
], -1)),
|
|
2388
|
-
|
|
2389
|
-
F(
|
|
2390
|
-
|
|
2388
|
+
n.label || n.$slots.default ? (g(), _("span", to, [
|
|
2389
|
+
F(n.$slots, "default", {}, () => [
|
|
2390
|
+
U(O(n.label), 1)
|
|
2391
2391
|
])
|
|
2392
2392
|
])) : T("", !0)
|
|
2393
2393
|
], 2));
|
|
2394
2394
|
}
|
|
2395
|
-
}), ao = { class: "vf-popover" }, oo = ["aria-expanded", "onKeydown"],
|
|
2395
|
+
}), ao = { class: "vf-popover" }, oo = ["aria-expanded", "onKeydown"], cl = /* @__PURE__ */ j({
|
|
2396
2396
|
__name: "popover",
|
|
2397
2397
|
emits: ["click", "onClick"],
|
|
2398
2398
|
setup(a, { expose: e, emit: r }) {
|
|
2399
2399
|
const t = r, o = nt({ visible: !1 });
|
|
2400
|
-
let
|
|
2401
|
-
const
|
|
2400
|
+
let d = 0;
|
|
2401
|
+
const n = `vf-popover-panel-${++d}`, c = () => o.visible = !0, l = () => o.visible = !1, u = () => o.visible = !o.visible, i = () => {
|
|
2402
2402
|
u(), t("click"), t("onClick");
|
|
2403
2403
|
};
|
|
2404
|
-
return e({ show: c, hide: l, toggle: u }), (s, f) => (
|
|
2404
|
+
return e({ show: c, hide: l, toggle: u }), (s, f) => (g(), _("div", ao, [
|
|
2405
2405
|
z("div", {
|
|
2406
2406
|
class: "vf-popover__button",
|
|
2407
2407
|
role: "button",
|
|
2408
2408
|
tabindex: "0",
|
|
2409
2409
|
"aria-haspopup": "dialog",
|
|
2410
2410
|
"aria-expanded": o.visible,
|
|
2411
|
-
"aria-controls":
|
|
2412
|
-
onClick:
|
|
2411
|
+
"aria-controls": n,
|
|
2412
|
+
onClick: i,
|
|
2413
2413
|
onKeydown: [
|
|
2414
|
-
te(Q(
|
|
2415
|
-
te(Q(
|
|
2414
|
+
te(Q(i, ["prevent"]), ["enter"]),
|
|
2415
|
+
te(Q(i, ["prevent"]), ["space"])
|
|
2416
2416
|
]
|
|
2417
2417
|
}, [
|
|
2418
2418
|
F(s.$slots, "button")
|
|
2419
2419
|
], 40, oo),
|
|
2420
2420
|
ue(Ke(Ct, {
|
|
2421
|
-
id:
|
|
2421
|
+
id: n,
|
|
2422
2422
|
class: "vf-popover__wrapper"
|
|
2423
2423
|
}, it({
|
|
2424
|
-
default:
|
|
2424
|
+
default: be(() => [
|
|
2425
2425
|
f[0] || (f[0] = z("div", { class: "vf-popover__arrow" }, null, -1))
|
|
2426
2426
|
]),
|
|
2427
2427
|
_: 2
|
|
2428
2428
|
}, [
|
|
2429
2429
|
s.$slots.default ? {
|
|
2430
2430
|
name: "default",
|
|
2431
|
-
fn:
|
|
2431
|
+
fn: be(() => [
|
|
2432
2432
|
F(s.$slots, "default")
|
|
2433
2433
|
]),
|
|
2434
2434
|
key: "0"
|
|
2435
2435
|
} : void 0,
|
|
2436
2436
|
s.$slots.header || s.$slots.popoverHeader ? {
|
|
2437
2437
|
name: "header",
|
|
2438
|
-
fn:
|
|
2438
|
+
fn: be(() => [
|
|
2439
2439
|
F(s.$slots, "header"),
|
|
2440
2440
|
s.$slots.header ? T("", !0) : F(s.$slots, "popoverHeader", { key: 0 })
|
|
2441
2441
|
]),
|
|
@@ -2443,7 +2443,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2443
2443
|
} : void 0,
|
|
2444
2444
|
s.$slots.body || s.$slots.popoverBody ? {
|
|
2445
2445
|
name: "body",
|
|
2446
|
-
fn:
|
|
2446
|
+
fn: be(() => [
|
|
2447
2447
|
F(s.$slots, "body"),
|
|
2448
2448
|
s.$slots.body ? T("", !0) : F(s.$slots, "popoverBody", { key: 0 })
|
|
2449
2449
|
]),
|
|
@@ -2451,7 +2451,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2451
2451
|
} : void 0,
|
|
2452
2452
|
s.$slots.footer || s.$slots.popoverFooter ? {
|
|
2453
2453
|
name: "footer",
|
|
2454
|
-
fn:
|
|
2454
|
+
fn: be(() => [
|
|
2455
2455
|
F(s.$slots, "footer"),
|
|
2456
2456
|
s.$slots.footer ? T("", !0) : F(s.$slots, "popoverFooter", { key: 0 })
|
|
2457
2457
|
]),
|
|
@@ -2471,7 +2471,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2471
2471
|
}, no = {
|
|
2472
2472
|
key: 3,
|
|
2473
2473
|
class: "vf-modal__footer"
|
|
2474
|
-
},
|
|
2474
|
+
}, vl = /* @__PURE__ */ j({
|
|
2475
2475
|
__name: "modal",
|
|
2476
2476
|
props: {
|
|
2477
2477
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -2485,8 +2485,8 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2485
2485
|
emits: ["update:modelValue", "open", "close"],
|
|
2486
2486
|
setup(a, { expose: e, emit: r }) {
|
|
2487
2487
|
const t = r, o = a;
|
|
2488
|
-
let
|
|
2489
|
-
const u = K(null),
|
|
2488
|
+
let d = 0, n = 0, c = "", l = null;
|
|
2489
|
+
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
2490
|
const b = ["vf-modal"];
|
|
2491
2491
|
return o.size !== "md" && b.push(`vf-modal_${o.size}`), b;
|
|
2492
2492
|
}), k = () => t("update:modelValue", !0), x = () => {
|
|
@@ -2495,29 +2495,29 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2495
2495
|
o.closeOnOverlay && x();
|
|
2496
2496
|
}, V = (b) => {
|
|
2497
2497
|
!o.modelValue || !o.closeOnEsc || b.key === "Escape" && (b.preventDefault(), x());
|
|
2498
|
-
}, G = () => 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((
|
|
2499
|
-
var
|
|
2498
|
+
}, G = () => 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")) : [], D = () => {
|
|
2499
|
+
var C;
|
|
2500
2500
|
const b = G();
|
|
2501
|
-
b.length ? b[0].focus() : (
|
|
2502
|
-
},
|
|
2501
|
+
b.length ? b[0].focus() : (C = u.value) == null || C.focus();
|
|
2502
|
+
}, M = (b) => {
|
|
2503
2503
|
var q;
|
|
2504
2504
|
if (b.key !== "Tab")
|
|
2505
2505
|
return;
|
|
2506
|
-
const
|
|
2507
|
-
if (!
|
|
2506
|
+
const C = G();
|
|
2507
|
+
if (!C.length) {
|
|
2508
2508
|
b.preventDefault(), (q = u.value) == null || q.focus();
|
|
2509
2509
|
return;
|
|
2510
2510
|
}
|
|
2511
|
-
const h =
|
|
2511
|
+
const h = C[0], R = C[C.length - 1], W = document.activeElement;
|
|
2512
2512
|
if (b.shiftKey && W === h) {
|
|
2513
2513
|
b.preventDefault(), R.focus();
|
|
2514
2514
|
return;
|
|
2515
2515
|
}
|
|
2516
2516
|
!b.shiftKey && W === R && (b.preventDefault(), h.focus());
|
|
2517
2517
|
}, N = () => {
|
|
2518
|
-
!o.lockScroll || typeof document > "u" || (
|
|
2518
|
+
!o.lockScroll || typeof document > "u" || (n === 0 && (c = document.body.style.overflow, document.body.style.overflow = "hidden"), n += 1);
|
|
2519
2519
|
}, L = () => {
|
|
2520
|
-
!o.lockScroll || typeof document > "u" || (
|
|
2520
|
+
!o.lockScroll || typeof document > "u" || (n = Math.max(0, n - 1), n === 0 && (document.body.style.overflow = c));
|
|
2521
2521
|
};
|
|
2522
2522
|
return oe(
|
|
2523
2523
|
() => o.modelValue,
|
|
@@ -2527,7 +2527,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2527
2527
|
{ immediate: !0 }
|
|
2528
2528
|
), $e(() => {
|
|
2529
2529
|
L(), typeof document < "u" && document.removeEventListener("keydown", V);
|
|
2530
|
-
}), e({ open: k, close: x }), (b,
|
|
2530
|
+
}), e({ open: k, close: x }), (b, C) => (g(), se(xe, { to: "body" }, [
|
|
2531
2531
|
ue(z("div", {
|
|
2532
2532
|
class: I(w.value),
|
|
2533
2533
|
role: "presentation"
|
|
@@ -2545,15 +2545,15 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2545
2545
|
"aria-labelledby": p.value ? s : void 0,
|
|
2546
2546
|
"aria-describedby": v.value ? f : void 0,
|
|
2547
2547
|
tabindex: "-1",
|
|
2548
|
-
onKeydown:
|
|
2548
|
+
onKeydown: M
|
|
2549
2549
|
}, [
|
|
2550
|
-
p.value ? (
|
|
2550
|
+
p.value ? (g(), _("div", lo, [
|
|
2551
2551
|
z("div", {
|
|
2552
2552
|
id: s,
|
|
2553
2553
|
class: "vf-modal__header-content"
|
|
2554
2554
|
}, [
|
|
2555
2555
|
F(b.$slots, "header", {}, () => [
|
|
2556
|
-
b.title ? (
|
|
2556
|
+
b.title ? (g(), _("h3", so, O(b.title), 1)) : T("", !0)
|
|
2557
2557
|
])
|
|
2558
2558
|
])
|
|
2559
2559
|
])) : T("", !0),
|
|
@@ -2568,7 +2568,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2568
2568
|
onClick: x
|
|
2569
2569
|
}, "×")
|
|
2570
2570
|
]) : T("", !0),
|
|
2571
|
-
b.$slots.body || b.$slots.default ? (
|
|
2571
|
+
b.$slots.body || b.$slots.default ? (g(), _("div", {
|
|
2572
2572
|
key: 2,
|
|
2573
2573
|
id: f,
|
|
2574
2574
|
class: "vf-modal__body"
|
|
@@ -2576,7 +2576,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2576
2576
|
F(b.$slots, "body"),
|
|
2577
2577
|
b.$slots.body ? T("", !0) : F(b.$slots, "default", { key: 0 })
|
|
2578
2578
|
])) : T("", !0),
|
|
2579
|
-
b.$slots.footer ? (
|
|
2579
|
+
b.$slots.footer ? (g(), _("div", no, [
|
|
2580
2580
|
F(b.$slots, "footer")
|
|
2581
2581
|
])) : T("", !0)
|
|
2582
2582
|
], 40, ro)
|
|
@@ -2594,7 +2594,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2594
2594
|
}, vo = {
|
|
2595
2595
|
key: 3,
|
|
2596
2596
|
class: "vf-drawer__footer"
|
|
2597
|
-
},
|
|
2597
|
+
}, fl = /* @__PURE__ */ j({
|
|
2598
2598
|
__name: "drawer",
|
|
2599
2599
|
props: {
|
|
2600
2600
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -2610,8 +2610,8 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2610
2610
|
emits: ["update:modelValue", "open", "close"],
|
|
2611
2611
|
setup(a, { expose: e, emit: r }) {
|
|
2612
2612
|
const t = r, o = a;
|
|
2613
|
-
let
|
|
2614
|
-
const u = K(null),
|
|
2613
|
+
let d = 0, n = 0, c = "", l = null;
|
|
2614
|
+
const u = K(null), i = De(), s = `vf-drawer-title-${++d}`, f = `vf-drawer-body-${d}`, p = m(() => !!o.title || !!i.header), v = m(() => !!i.body || !!i.default), w = m(() => {
|
|
2615
2615
|
switch (o.position) {
|
|
2616
2616
|
case "left":
|
|
2617
2617
|
return "translate3d(-100%, 0, 0)";
|
|
@@ -2624,10 +2624,10 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2624
2624
|
default:
|
|
2625
2625
|
return "translate3d(100%, 0, 0)";
|
|
2626
2626
|
}
|
|
2627
|
-
}), k =
|
|
2627
|
+
}), k = m(() => {
|
|
2628
2628
|
const h = ["vf-drawer", `vf-drawer_${o.position}`];
|
|
2629
2629
|
return o.size !== "md" && h.push(`vf-drawer_${o.size}`), h;
|
|
2630
|
-
}), x =
|
|
2630
|
+
}), x = m(() => ({
|
|
2631
2631
|
"--vf-drawer-transform-from": w.value
|
|
2632
2632
|
})), A = () => t("update:modelValue", !0), V = () => {
|
|
2633
2633
|
t("update:modelValue", !1), t("close");
|
|
@@ -2635,15 +2635,15 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2635
2635
|
o.overlay && o.closeOnOverlay && V();
|
|
2636
2636
|
}, D = (h) => {
|
|
2637
2637
|
!o.modelValue || !o.closeOnEsc || h.key === "Escape" && (h.preventDefault(), V());
|
|
2638
|
-
},
|
|
2638
|
+
}, M = () => 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")) : [], N = () => {
|
|
2639
2639
|
var R;
|
|
2640
|
-
const h =
|
|
2640
|
+
const h = M();
|
|
2641
2641
|
h.length ? h[0].focus() : (R = u.value) == null || R.focus();
|
|
2642
2642
|
}, L = (h) => {
|
|
2643
2643
|
var X;
|
|
2644
2644
|
if (h.key !== "Tab")
|
|
2645
2645
|
return;
|
|
2646
|
-
const R =
|
|
2646
|
+
const R = M();
|
|
2647
2647
|
if (!R.length) {
|
|
2648
2648
|
h.preventDefault(), (X = u.value) == null || X.focus();
|
|
2649
2649
|
return;
|
|
@@ -2655,30 +2655,30 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2655
2655
|
}
|
|
2656
2656
|
!h.shiftKey && ee === q && (h.preventDefault(), W.focus());
|
|
2657
2657
|
}, b = () => {
|
|
2658
|
-
!o.lockScroll || typeof document > "u" || (
|
|
2659
|
-
},
|
|
2660
|
-
!o.lockScroll || typeof document > "u" || (
|
|
2658
|
+
!o.lockScroll || typeof document > "u" || (n === 0 && (c = document.body.style.overflow, document.body.style.overflow = "hidden"), n += 1);
|
|
2659
|
+
}, C = () => {
|
|
2660
|
+
!o.lockScroll || typeof document > "u" || (n = Math.max(0, n - 1), n === 0 && (document.body.style.overflow = c));
|
|
2661
2661
|
};
|
|
2662
2662
|
return oe(
|
|
2663
2663
|
() => o.modelValue,
|
|
2664
2664
|
async (h) => {
|
|
2665
|
-
h ? (typeof document < "u" && (l = document.activeElement), b(), t("open"), await ke(), N(), typeof document < "u" && document.addEventListener("keydown", D)) : (
|
|
2665
|
+
h ? (typeof document < "u" && (l = document.activeElement), b(), t("open"), await ke(), N(), typeof document < "u" && document.addEventListener("keydown", D)) : (C(), typeof document < "u" && (document.removeEventListener("keydown", D), l == null || l.focus()));
|
|
2666
2666
|
},
|
|
2667
2667
|
{ immediate: !0 }
|
|
2668
2668
|
), $e(() => {
|
|
2669
|
-
|
|
2670
|
-
}), e({ open: A, close: V }), (h, R) => (
|
|
2669
|
+
C(), typeof document < "u" && document.removeEventListener("keydown", D);
|
|
2670
|
+
}), e({ open: A, close: V }), (h, R) => (g(), se(xe, { to: "body" }, [
|
|
2671
2671
|
Ke(dt, {
|
|
2672
2672
|
name: "vf-drawer",
|
|
2673
2673
|
duration: { enter: 320, leave: 320 }
|
|
2674
2674
|
}, {
|
|
2675
|
-
default:
|
|
2675
|
+
default: be(() => [
|
|
2676
2676
|
ue(z("div", {
|
|
2677
2677
|
class: I(k.value),
|
|
2678
|
-
style:
|
|
2678
|
+
style: ge(x.value),
|
|
2679
2679
|
role: "presentation"
|
|
2680
2680
|
}, [
|
|
2681
|
-
h.overlay ? (
|
|
2681
|
+
h.overlay ? (g(), _("div", {
|
|
2682
2682
|
key: 0,
|
|
2683
2683
|
class: "vf-drawer__overlay",
|
|
2684
2684
|
onClick: G
|
|
@@ -2694,13 +2694,13 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2694
2694
|
tabindex: "-1",
|
|
2695
2695
|
onKeydown: L
|
|
2696
2696
|
}, [
|
|
2697
|
-
p.value ? (
|
|
2697
|
+
p.value ? (g(), _("div", uo, [
|
|
2698
2698
|
z("div", {
|
|
2699
2699
|
id: s,
|
|
2700
2700
|
class: "vf-drawer__header-content"
|
|
2701
2701
|
}, [
|
|
2702
2702
|
F(h.$slots, "header", {}, () => [
|
|
2703
|
-
h.title ? (
|
|
2703
|
+
h.title ? (g(), _("h3", co, O(h.title), 1)) : T("", !0)
|
|
2704
2704
|
])
|
|
2705
2705
|
])
|
|
2706
2706
|
])) : T("", !0),
|
|
@@ -2715,7 +2715,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2715
2715
|
onClick: V
|
|
2716
2716
|
}, " × ")
|
|
2717
2717
|
]) : T("", !0),
|
|
2718
|
-
h.$slots.body || h.$slots.default ? (
|
|
2718
|
+
h.$slots.body || h.$slots.default ? (g(), _("div", {
|
|
2719
2719
|
key: 2,
|
|
2720
2720
|
id: f,
|
|
2721
2721
|
class: "vf-drawer__body"
|
|
@@ -2723,7 +2723,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2723
2723
|
F(h.$slots, "body"),
|
|
2724
2724
|
h.$slots.body ? T("", !0) : F(h.$slots, "default", { key: 0 })
|
|
2725
2725
|
])) : T("", !0),
|
|
2726
|
-
h.$slots.footer ? (
|
|
2726
|
+
h.$slots.footer ? (g(), _("div", vo, [
|
|
2727
2727
|
F(h.$slots, "footer")
|
|
2728
2728
|
])) : T("", !0)
|
|
2729
2729
|
], 40, io)
|
|
@@ -2739,7 +2739,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2739
2739
|
key: 0,
|
|
2740
2740
|
class: "vf-tooltip__arrow",
|
|
2741
2741
|
"aria-hidden": "true"
|
|
2742
|
-
},
|
|
2742
|
+
}, pl = /* @__PURE__ */ j({
|
|
2743
2743
|
__name: "tooltip",
|
|
2744
2744
|
props: {
|
|
2745
2745
|
text: { default: "" },
|
|
@@ -2750,12 +2750,12 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2750
2750
|
setup(a) {
|
|
2751
2751
|
const e = a;
|
|
2752
2752
|
let r = 0;
|
|
2753
|
-
const t = K(null), o = K(null),
|
|
2753
|
+
const t = K(null), o = K(null), d = K(!1), n = K("top"), c = `vf-tooltip-${++r}`;
|
|
2754
2754
|
let l = null;
|
|
2755
2755
|
const u = () => {
|
|
2756
|
-
e.disabled || (
|
|
2757
|
-
},
|
|
2758
|
-
|
|
2756
|
+
e.disabled || (d.value = !0);
|
|
2757
|
+
}, i = () => {
|
|
2758
|
+
d.value = !1;
|
|
2759
2759
|
}, s = () => {
|
|
2760
2760
|
if (!t.value || !o.value)
|
|
2761
2761
|
return;
|
|
@@ -2769,7 +2769,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2769
2769
|
strategy: "fixed",
|
|
2770
2770
|
middleware: [Le(8), Ve(), Dt()]
|
|
2771
2771
|
});
|
|
2772
|
-
|
|
2772
|
+
n.value = D ?? e.placement, v.style.left = `${V}px`, v.style.top = `${G}px`;
|
|
2773
2773
|
}, k = async () => {
|
|
2774
2774
|
await w();
|
|
2775
2775
|
}, x = Te(p, () => {
|
|
@@ -2784,55 +2784,55 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2784
2784
|
}
|
|
2785
2785
|
}, l.update();
|
|
2786
2786
|
};
|
|
2787
|
-
oe(
|
|
2787
|
+
oe(d, async (p) => {
|
|
2788
2788
|
if (!p) {
|
|
2789
2789
|
l && (l.destroy(), l = null);
|
|
2790
2790
|
return;
|
|
2791
2791
|
}
|
|
2792
2792
|
l || s(), l == null || l.update();
|
|
2793
2793
|
}), Fe(() => {
|
|
2794
|
-
|
|
2794
|
+
d.value && s();
|
|
2795
2795
|
}), $e(() => {
|
|
2796
2796
|
l == null || l.destroy(), l = null;
|
|
2797
2797
|
});
|
|
2798
|
-
const f =
|
|
2798
|
+
const f = m(() => !!e.text || !!(o.value && o.value.textContent));
|
|
2799
2799
|
return oe(f, (p) => {
|
|
2800
|
-
p || (
|
|
2801
|
-
}), (p, v) => (
|
|
2800
|
+
p || (d.value = !1);
|
|
2801
|
+
}), (p, v) => (g(), _(re, null, [
|
|
2802
2802
|
z("span", {
|
|
2803
2803
|
ref_key: "trigger",
|
|
2804
2804
|
ref: t,
|
|
2805
2805
|
class: "vf-tooltip__trigger",
|
|
2806
2806
|
"aria-describedby": c,
|
|
2807
2807
|
onMouseenter: u,
|
|
2808
|
-
onMouseleave:
|
|
2808
|
+
onMouseleave: i,
|
|
2809
2809
|
onFocus: u,
|
|
2810
|
-
onBlur:
|
|
2810
|
+
onBlur: i
|
|
2811
2811
|
}, [
|
|
2812
2812
|
F(p.$slots, "default")
|
|
2813
2813
|
], 544),
|
|
2814
|
-
(
|
|
2814
|
+
(g(), se(xe, { to: "body" }, [
|
|
2815
2815
|
ue(z("div", {
|
|
2816
2816
|
id: c,
|
|
2817
2817
|
ref_key: "panel",
|
|
2818
2818
|
ref: o,
|
|
2819
2819
|
class: "vf-tooltip",
|
|
2820
2820
|
role: "tooltip",
|
|
2821
|
-
"data-placement":
|
|
2821
|
+
"data-placement": n.value
|
|
2822
2822
|
}, [
|
|
2823
2823
|
z("span", po, [
|
|
2824
2824
|
F(p.$slots, "content", {}, () => [
|
|
2825
|
-
|
|
2825
|
+
U(O(p.text), 1)
|
|
2826
2826
|
])
|
|
2827
2827
|
]),
|
|
2828
|
-
p.arrow ? (
|
|
2828
|
+
p.arrow ? (g(), _("span", bo)) : T("", !0)
|
|
2829
2829
|
], 8, fo), [
|
|
2830
|
-
[ce,
|
|
2830
|
+
[ce, d.value]
|
|
2831
2831
|
])
|
|
2832
2832
|
]))
|
|
2833
2833
|
], 64));
|
|
2834
2834
|
}
|
|
2835
|
-
}),
|
|
2835
|
+
}), bl = /* @__PURE__ */ j({
|
|
2836
2836
|
__name: "skeleton",
|
|
2837
2837
|
props: {
|
|
2838
2838
|
width: {},
|
|
@@ -2841,19 +2841,19 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2841
2841
|
animated: { type: Boolean, default: !0 }
|
|
2842
2842
|
},
|
|
2843
2843
|
setup(a) {
|
|
2844
|
-
const e = a, r = (
|
|
2845
|
-
if (!(
|
|
2846
|
-
return typeof
|
|
2847
|
-
}, t =
|
|
2848
|
-
const
|
|
2849
|
-
return
|
|
2850
|
-
}), o =
|
|
2851
|
-
const
|
|
2852
|
-
return e.animated &&
|
|
2844
|
+
const e = a, r = (d) => {
|
|
2845
|
+
if (!(d == null || d === ""))
|
|
2846
|
+
return typeof d == "number" ? `${d}px` : d;
|
|
2847
|
+
}, t = m(() => {
|
|
2848
|
+
const d = r(e.width), n = r(e.height), c = {};
|
|
2849
|
+
return d && (c.width = d), n && (c.height = n), e.variant === "circle" && (!d && n && (c.width = n), !n && d && (c.height = d)), c;
|
|
2850
|
+
}), o = m(() => {
|
|
2851
|
+
const d = ["vf-skeleton", `vf-skeleton_${e.variant}`];
|
|
2852
|
+
return e.animated && d.push("vf-skeleton_animated"), d;
|
|
2853
2853
|
});
|
|
2854
|
-
return (
|
|
2854
|
+
return (d, n) => (g(), _("div", {
|
|
2855
2855
|
class: I(o.value),
|
|
2856
|
-
style:
|
|
2856
|
+
style: ge(t.value),
|
|
2857
2857
|
"aria-hidden": "true"
|
|
2858
2858
|
}, null, 6));
|
|
2859
2859
|
}
|
|
@@ -2870,7 +2870,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2870
2870
|
}, _o = {
|
|
2871
2871
|
key: 2,
|
|
2872
2872
|
class: "vf-progress__label"
|
|
2873
|
-
},
|
|
2873
|
+
}, gl = /* @__PURE__ */ j({
|
|
2874
2874
|
__name: "progress",
|
|
2875
2875
|
props: {
|
|
2876
2876
|
value: {},
|
|
@@ -2882,40 +2882,40 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2882
2882
|
ariaLabel: { default: "" }
|
|
2883
2883
|
},
|
|
2884
2884
|
setup(a) {
|
|
2885
|
-
const e = a, r = De(), t = (p) => Math.min(100, Math.max(0, p)), o =
|
|
2885
|
+
const e = a, r = De(), t = (p) => Math.min(100, Math.max(0, p)), o = m(() => e.value === void 0 || e.value === null || Number.isNaN(e.value)), d = m(() => o.value ? 0 : t(Number(e.value))), n = m(() => o.value ? void 0 : d.value), c = m(() => !!r.default), l = m(() => e.label ? e.label : e.showValue && !o.value ? `${Math.round(d.value)}%` : ""), u = m(() => {
|
|
2886
2886
|
const p = ["vf-progress", `vf-progress_${e.variant}`, `vf-progress_size-${e.size}`];
|
|
2887
2887
|
return o.value && p.push("vf-progress_indeterminate"), p;
|
|
2888
|
-
}),
|
|
2888
|
+
}), i = m(() => {
|
|
2889
2889
|
if (!o.value)
|
|
2890
|
-
return { width: `${
|
|
2891
|
-
}), s = 2 * Math.PI * 45, f =
|
|
2890
|
+
return { width: `${d.value}%` };
|
|
2891
|
+
}), s = 2 * Math.PI * 45, f = m(() => {
|
|
2892
2892
|
if (o.value)
|
|
2893
2893
|
return {
|
|
2894
2894
|
strokeDasharray: `${s}px`,
|
|
2895
2895
|
strokeDashoffset: `${s * 0.75}px`
|
|
2896
2896
|
};
|
|
2897
|
-
const p = s -
|
|
2897
|
+
const p = s - d.value / 100 * s;
|
|
2898
2898
|
return {
|
|
2899
2899
|
strokeDasharray: `${s}px`,
|
|
2900
2900
|
strokeDashoffset: `${p}px`
|
|
2901
2901
|
};
|
|
2902
2902
|
});
|
|
2903
|
-
return (p, v) => (
|
|
2903
|
+
return (p, v) => (g(), _("div", {
|
|
2904
2904
|
class: I(u.value),
|
|
2905
2905
|
role: "progressbar",
|
|
2906
2906
|
"aria-label": p.ariaLabel || void 0,
|
|
2907
2907
|
"aria-valuemin": "0",
|
|
2908
2908
|
"aria-valuemax": "100",
|
|
2909
|
-
"aria-valuenow":
|
|
2909
|
+
"aria-valuenow": n.value,
|
|
2910
2910
|
"data-severity": p.severity
|
|
2911
2911
|
}, [
|
|
2912
|
-
p.variant === "linear" ? (
|
|
2912
|
+
p.variant === "linear" ? (g(), _("div", mo, [
|
|
2913
2913
|
z("div", {
|
|
2914
2914
|
class: "vf-progress__bar",
|
|
2915
|
-
style:
|
|
2915
|
+
style: ge(i.value)
|
|
2916
2916
|
}, null, 4)
|
|
2917
|
-
])) : (
|
|
2918
|
-
(
|
|
2917
|
+
])) : (g(), _("div", ho, [
|
|
2918
|
+
(g(), _("svg", yo, [
|
|
2919
2919
|
v[0] || (v[0] = z("circle", {
|
|
2920
2920
|
class: "vf-progress__circle-track",
|
|
2921
2921
|
cx: "50",
|
|
@@ -2927,18 +2927,18 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2927
2927
|
cx: "50",
|
|
2928
2928
|
cy: "50",
|
|
2929
2929
|
r: "45",
|
|
2930
|
-
style:
|
|
2930
|
+
style: ge(f.value)
|
|
2931
2931
|
}, null, 4)
|
|
2932
2932
|
]))
|
|
2933
2933
|
])),
|
|
2934
|
-
l.value || c.value ? (
|
|
2934
|
+
l.value || c.value ? (g(), _("span", _o, [
|
|
2935
2935
|
F(p.$slots, "default", {}, () => [
|
|
2936
|
-
|
|
2936
|
+
U(O(l.value), 1)
|
|
2937
2937
|
])
|
|
2938
2938
|
])) : T("", !0)
|
|
2939
2939
|
], 10, go));
|
|
2940
2940
|
}
|
|
2941
|
-
}), Co = ["data-variant", "data-severity", "aria-label"],
|
|
2941
|
+
}), Co = ["data-variant", "data-severity", "aria-label"], ml = /* @__PURE__ */ j({
|
|
2942
2942
|
__name: "badge",
|
|
2943
2943
|
props: {
|
|
2944
2944
|
label: { default: "" },
|
|
@@ -2948,8 +2948,8 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2948
2948
|
ariaLabel: { default: "" }
|
|
2949
2949
|
},
|
|
2950
2950
|
setup(a) {
|
|
2951
|
-
const e = a, r =
|
|
2952
|
-
return (t, o) => (
|
|
2951
|
+
const e = a, r = m(() => [`vf-badge_size-${e.size}`]);
|
|
2952
|
+
return (t, o) => (g(), _("span", {
|
|
2953
2953
|
class: I(["vf-badge", r.value]),
|
|
2954
2954
|
"data-variant": t.variant,
|
|
2955
2955
|
"data-severity": t.severity,
|
|
@@ -2957,14 +2957,14 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2957
2957
|
"aria-label": t.ariaLabel || void 0
|
|
2958
2958
|
}, [
|
|
2959
2959
|
F(t.$slots, "default", {}, () => [
|
|
2960
|
-
|
|
2960
|
+
U(O(t.label), 1)
|
|
2961
2961
|
])
|
|
2962
2962
|
], 10, Co));
|
|
2963
2963
|
}
|
|
2964
2964
|
}), ko = ["data-status", "aria-label"], wo = { class: "vf-avatar__content" }, $o = ["src", "alt"], xo = {
|
|
2965
2965
|
key: 1,
|
|
2966
2966
|
class: "vf-avatar__initials"
|
|
2967
|
-
}, zo = ["data-status"],
|
|
2967
|
+
}, zo = ["data-status"], hl = /* @__PURE__ */ j({
|
|
2968
2968
|
__name: "avatar",
|
|
2969
2969
|
props: {
|
|
2970
2970
|
src: { default: "" },
|
|
@@ -2976,17 +2976,17 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2976
2976
|
},
|
|
2977
2977
|
setup(a) {
|
|
2978
2978
|
const e = a, r = K(!1), t = (u) => {
|
|
2979
|
-
const
|
|
2980
|
-
if (!
|
|
2979
|
+
const i = u.trim();
|
|
2980
|
+
if (!i)
|
|
2981
2981
|
return "";
|
|
2982
|
-
const s =
|
|
2982
|
+
const s = i.split(/\s+/).filter(Boolean);
|
|
2983
2983
|
return s.length === 1 ? s[0].slice(0, 2).toUpperCase() : `${s[0][0]}${s[1][0]}`.toUpperCase();
|
|
2984
|
-
}, o =
|
|
2984
|
+
}, o = m(() => t(e.name || e.alt || "")), d = m(() => !!(e.src && !r.value)), n = m(() => {
|
|
2985
2985
|
if (e.alt)
|
|
2986
2986
|
return e.alt;
|
|
2987
2987
|
if (e.name)
|
|
2988
2988
|
return e.name;
|
|
2989
|
-
}), c =
|
|
2989
|
+
}), c = m(() => [`vf-avatar_size-${e.size}`, `vf-avatar_shape-${e.shape}`]), l = () => {
|
|
2990
2990
|
r.value = !0;
|
|
2991
2991
|
};
|
|
2992
2992
|
return oe(
|
|
@@ -2994,24 +2994,24 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
2994
2994
|
() => {
|
|
2995
2995
|
r.value = !1;
|
|
2996
2996
|
}
|
|
2997
|
-
), (u,
|
|
2997
|
+
), (u, i) => (g(), _("div", {
|
|
2998
2998
|
class: I(["vf-avatar", c.value]),
|
|
2999
2999
|
"data-status": u.status || void 0,
|
|
3000
3000
|
role: "img",
|
|
3001
|
-
"aria-label":
|
|
3001
|
+
"aria-label": n.value
|
|
3002
3002
|
}, [
|
|
3003
3003
|
z("div", wo, [
|
|
3004
3004
|
F(u.$slots, "default", {}, () => [
|
|
3005
|
-
|
|
3005
|
+
d.value ? (g(), _("img", {
|
|
3006
3006
|
key: 0,
|
|
3007
3007
|
class: "vf-avatar__image",
|
|
3008
3008
|
src: u.src,
|
|
3009
3009
|
alt: u.alt || u.name || "",
|
|
3010
3010
|
onError: l
|
|
3011
|
-
}, null, 40, $o)) : (
|
|
3011
|
+
}, null, 40, $o)) : (g(), _("span", xo, O(o.value), 1))
|
|
3012
3012
|
])
|
|
3013
3013
|
]),
|
|
3014
|
-
u.status ? (
|
|
3014
|
+
u.status ? (g(), _("span", {
|
|
3015
3015
|
key: 0,
|
|
3016
3016
|
class: "vf-avatar__status",
|
|
3017
3017
|
"data-status": u.status,
|
|
@@ -3031,7 +3031,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
3031
3031
|
}, Oo = ["colspan"], Mo = {
|
|
3032
3032
|
key: 1,
|
|
3033
3033
|
class: "vf-datatable__row vf-datatable__row_state"
|
|
3034
|
-
}, Do = ["colspan"], Eo = ["onClick"],
|
|
3034
|
+
}, Do = ["colspan"], Eo = ["onClick"], yl = /* @__PURE__ */ j({
|
|
3035
3035
|
__name: "data-table",
|
|
3036
3036
|
props: {
|
|
3037
3037
|
rows: { default: () => [] },
|
|
@@ -3052,7 +3052,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
3052
3052
|
},
|
|
3053
3053
|
emits: ["update:sortField", "update:sortOrder", "sort", "rowClick"],
|
|
3054
3054
|
setup(a, { emit: e }) {
|
|
3055
|
-
const r = a, t = e, o = K(r.sortField ?? null),
|
|
3055
|
+
const r = a, t = e, o = K(r.sortField ?? null), d = K(r.sortOrder ?? null);
|
|
3056
3056
|
oe(
|
|
3057
3057
|
() => r.sortField,
|
|
3058
3058
|
(b) => {
|
|
@@ -3061,69 +3061,69 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
3061
3061
|
), oe(
|
|
3062
3062
|
() => r.sortOrder,
|
|
3063
3063
|
(b) => {
|
|
3064
|
-
|
|
3064
|
+
d.value = b ?? null;
|
|
3065
3065
|
}
|
|
3066
3066
|
);
|
|
3067
|
-
const
|
|
3068
|
-
const b = r.rows ?? [],
|
|
3069
|
-
return !
|
|
3070
|
-
const q = R == null ? void 0 : R[
|
|
3067
|
+
const n = m(() => o.value), c = m(() => d.value), l = m(() => Math.max(1, r.columns.length)), u = (b) => b.sortable === !1 ? !1 : b.sortable === !0 ? !0 : r.sortable, i = (b, C) => b == null && C == null ? 0 : b == null ? -1 : C == null ? 1 : typeof b == "number" && typeof C == "number" ? b - C : String(b).localeCompare(String(C)), s = m(() => {
|
|
3068
|
+
const b = r.rows ?? [], C = n.value, h = c.value;
|
|
3069
|
+
return !C || !h ? b : [...b].sort((R, W) => {
|
|
3070
|
+
const q = R == null ? void 0 : R[C], ee = W == null ? void 0 : W[C], X = i(q, ee);
|
|
3071
3071
|
return h === "asc" ? X : -X;
|
|
3072
3072
|
});
|
|
3073
|
-
}), f =
|
|
3073
|
+
}), f = m(() => {
|
|
3074
3074
|
const b = ["vf-datatable", `vf-datatable_${r.variant}`];
|
|
3075
3075
|
return r.size !== "normal" && b.push(`vf-datatable_${r.size}`), r.striped && b.push("vf-datatable_striped"), r.hover && b.push("vf-datatable_hover"), b;
|
|
3076
|
-
}), p = (b,
|
|
3076
|
+
}), p = (b, C) => {
|
|
3077
3077
|
if (typeof r.rowKey == "function")
|
|
3078
|
-
return r.rowKey(b,
|
|
3078
|
+
return r.rowKey(b, C);
|
|
3079
3079
|
if (r.rowKey && typeof r.rowKey == "string") {
|
|
3080
3080
|
const h = b == null ? void 0 : b[r.rowKey];
|
|
3081
|
-
return typeof h == "string" || typeof h == "number" ? h :
|
|
3081
|
+
return typeof h == "string" || typeof h == "number" ? h : C;
|
|
3082
3082
|
}
|
|
3083
|
-
return
|
|
3084
|
-
}, v = (b,
|
|
3085
|
-
const h = v(b,
|
|
3086
|
-
return
|
|
3083
|
+
return C;
|
|
3084
|
+
}, v = (b, C) => b == null ? void 0 : b[C.field], w = (b, C) => {
|
|
3085
|
+
const h = v(b, C);
|
|
3086
|
+
return C.formatter ? C.formatter(b, h, C) : h ?? "";
|
|
3087
3087
|
}, k = (b) => {
|
|
3088
3088
|
if (!u(b))
|
|
3089
3089
|
return;
|
|
3090
|
-
let
|
|
3091
|
-
|
|
3092
|
-
}, x = (b) =>
|
|
3090
|
+
let C = b.field, h = "asc";
|
|
3091
|
+
n.value === b.field && (c.value === "asc" ? h = "desc" : c.value === "desc" ? (C = null, h = null) : h = "asc"), o.value = C, d.value = h, t("update:sortField", C), t("update:sortOrder", h), t("sort", C, h);
|
|
3092
|
+
}, x = (b) => n.value !== b.field ? "↕" : c.value === "asc" ? "↑" : "↓", A = (b) => n.value !== b.field ? "" : "is-active", V = (b) => {
|
|
3093
3093
|
if (u(b))
|
|
3094
|
-
return
|
|
3094
|
+
return n.value !== b.field ? "none" : c.value === "asc" ? "ascending" : "descending";
|
|
3095
3095
|
}, G = (b) => {
|
|
3096
|
-
const
|
|
3097
|
-
return r.striped && b % 2 === 1 &&
|
|
3096
|
+
const C = [];
|
|
3097
|
+
return r.striped && b % 2 === 1 && C.push("vf-datatable__row_striped"), C;
|
|
3098
3098
|
}, D = (b) => {
|
|
3099
|
-
const
|
|
3100
|
-
return b.align &&
|
|
3101
|
-
},
|
|
3102
|
-
const
|
|
3103
|
-
return b.align &&
|
|
3099
|
+
const C = [];
|
|
3100
|
+
return b.align && C.push(`vf-datatable__cell_${b.align}`), u(b) && C.push("vf-datatable__header_sortable"), C;
|
|
3101
|
+
}, M = (b) => {
|
|
3102
|
+
const C = [];
|
|
3103
|
+
return b.align && C.push(`vf-datatable__cell_${b.align}`), C;
|
|
3104
3104
|
}, N = (b) => {
|
|
3105
|
-
const
|
|
3106
|
-
return b.width && (
|
|
3107
|
-
}, L = (b,
|
|
3108
|
-
t("rowClick", b,
|
|
3105
|
+
const C = {};
|
|
3106
|
+
return b.width && (C.width = b.width), b.minWidth && (C.minWidth = b.minWidth), C;
|
|
3107
|
+
}, L = (b, C, h) => {
|
|
3108
|
+
t("rowClick", b, C, h);
|
|
3109
3109
|
};
|
|
3110
|
-
return (b,
|
|
3110
|
+
return (b, C) => (g(), _("div", {
|
|
3111
3111
|
class: I(f.value)
|
|
3112
3112
|
}, [
|
|
3113
3113
|
z("table", {
|
|
3114
3114
|
class: "vf-datatable__table",
|
|
3115
3115
|
"aria-label": b.ariaLabel
|
|
3116
3116
|
}, [
|
|
3117
|
-
b.showHeader ? (
|
|
3117
|
+
b.showHeader ? (g(), _("thead", So, [
|
|
3118
3118
|
z("tr", Fo, [
|
|
3119
|
-
(
|
|
3119
|
+
(g(!0), _(re, null, de(b.columns, (h) => (g(), _("th", {
|
|
3120
3120
|
key: h.field,
|
|
3121
3121
|
class: I(["vf-datatable__header", D(h)]),
|
|
3122
|
-
style:
|
|
3122
|
+
style: ge(N(h)),
|
|
3123
3123
|
"aria-sort": V(h),
|
|
3124
3124
|
scope: "col"
|
|
3125
3125
|
}, [
|
|
3126
|
-
u(h) ? (
|
|
3126
|
+
u(h) ? (g(), _("button", {
|
|
3127
3127
|
key: 0,
|
|
3128
3128
|
type: "button",
|
|
3129
3129
|
class: "vf-datatable__sort-button",
|
|
@@ -3133,43 +3133,43 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
3133
3133
|
b.$slots[`header-${h.field}`] ? F(b.$slots, `header-${h.field}`, {
|
|
3134
3134
|
key: 0,
|
|
3135
3135
|
column: h
|
|
3136
|
-
}) : (
|
|
3137
|
-
|
|
3136
|
+
}) : (g(), _(re, { key: 1 }, [
|
|
3137
|
+
U(O(h.header ?? h.field), 1)
|
|
3138
3138
|
], 64))
|
|
3139
3139
|
]),
|
|
3140
3140
|
z("span", {
|
|
3141
3141
|
class: I(["vf-datatable__sort-icon", A(h)])
|
|
3142
|
-
},
|
|
3143
|
-
], 8, Lo)) : (
|
|
3142
|
+
}, O(x(h)), 3)
|
|
3143
|
+
], 8, Lo)) : (g(), _("span", Ro, [
|
|
3144
3144
|
b.$slots[`header-${h.field}`] ? F(b.$slots, `header-${h.field}`, {
|
|
3145
3145
|
key: 0,
|
|
3146
3146
|
column: h
|
|
3147
|
-
}) : (
|
|
3148
|
-
|
|
3147
|
+
}) : (g(), _(re, { key: 1 }, [
|
|
3148
|
+
U(O(h.header ?? h.field), 1)
|
|
3149
3149
|
], 64))
|
|
3150
3150
|
]))
|
|
3151
3151
|
], 14, Vo))), 128))
|
|
3152
3152
|
])
|
|
3153
3153
|
])) : T("", !0),
|
|
3154
3154
|
z("tbody", Po, [
|
|
3155
|
-
b.loading ? (
|
|
3155
|
+
b.loading ? (g(), _("tr", Io, [
|
|
3156
3156
|
z("td", {
|
|
3157
3157
|
class: "vf-datatable__cell vf-datatable__cell_state",
|
|
3158
3158
|
colspan: l.value
|
|
3159
3159
|
}, [
|
|
3160
3160
|
F(b.$slots, "loading", {}, () => [
|
|
3161
|
-
|
|
3161
|
+
U(O(b.loadingText), 1)
|
|
3162
3162
|
])
|
|
3163
3163
|
], 8, Oo)
|
|
3164
|
-
])) : s.value.length ? (
|
|
3164
|
+
])) : s.value.length ? (g(!0), _(re, { key: 2 }, de(s.value, (h, R) => (g(), _("tr", {
|
|
3165
3165
|
key: p(h, R),
|
|
3166
3166
|
class: I(["vf-datatable__row", G(R)]),
|
|
3167
3167
|
onClick: (W) => L(h, R, W)
|
|
3168
3168
|
}, [
|
|
3169
|
-
(
|
|
3169
|
+
(g(!0), _(re, null, de(b.columns, (W) => (g(), _("td", {
|
|
3170
3170
|
key: W.field,
|
|
3171
|
-
class: I(["vf-datatable__cell",
|
|
3172
|
-
style:
|
|
3171
|
+
class: I(["vf-datatable__cell", M(W)]),
|
|
3172
|
+
style: ge(N(W))
|
|
3173
3173
|
}, [
|
|
3174
3174
|
b.$slots[`cell-${W.field}`] ? F(b.$slots, `cell-${W.field}`, {
|
|
3175
3175
|
key: 0,
|
|
@@ -3177,17 +3177,17 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
3177
3177
|
column: W,
|
|
3178
3178
|
value: v(h, W),
|
|
3179
3179
|
index: R
|
|
3180
|
-
}) : (
|
|
3181
|
-
|
|
3180
|
+
}) : (g(), _(re, { key: 1 }, [
|
|
3181
|
+
U(O(w(h, W)), 1)
|
|
3182
3182
|
], 64))
|
|
3183
3183
|
], 6))), 128))
|
|
3184
|
-
], 10, Eo))), 128)) : (
|
|
3184
|
+
], 10, Eo))), 128)) : (g(), _("tr", Mo, [
|
|
3185
3185
|
z("td", {
|
|
3186
3186
|
class: "vf-datatable__cell vf-datatable__cell_state",
|
|
3187
3187
|
colspan: l.value
|
|
3188
3188
|
}, [
|
|
3189
3189
|
F(b.$slots, "empty", {}, () => [
|
|
3190
|
-
|
|
3190
|
+
U(O(b.emptyText), 1)
|
|
3191
3191
|
])
|
|
3192
3192
|
], 8, Do)
|
|
3193
3193
|
]))
|
|
@@ -3204,7 +3204,7 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
3204
3204
|
}, Go = {
|
|
3205
3205
|
key: 1,
|
|
3206
3206
|
class: "vf-slider__value"
|
|
3207
|
-
},
|
|
3207
|
+
}, _l = /* @__PURE__ */ j({
|
|
3208
3208
|
name: "VfSlider",
|
|
3209
3209
|
__name: "slider",
|
|
3210
3210
|
props: {
|
|
@@ -3224,70 +3224,70 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
3224
3224
|
},
|
|
3225
3225
|
emits: ["update:modelValue", "input", "change", "focus", "blur"],
|
|
3226
3226
|
setup(a, { emit: e }) {
|
|
3227
|
-
const r = e, t = a, o =
|
|
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 = (S) => {
|
|
3228
3228
|
const E = S.toString();
|
|
3229
3229
|
return E.includes(".") ? E.split(".")[1].length : 0;
|
|
3230
|
-
}, u = (S) => Math.min(
|
|
3231
|
-
const E = Number(S), $ =
|
|
3230
|
+
}, u = (S) => Math.min(n.value, Math.max(d.value, S)), i = (S) => {
|
|
3231
|
+
const E = Number(S), $ = d.value, H = Number.isFinite(E) ? E : $, Y = u(H), J = c.value, y = l(J), B = Math.round((Y - d.value) / J) * J + d.value;
|
|
3232
3232
|
return Number.parseFloat(B.toFixed(y));
|
|
3233
|
-
}, s =
|
|
3233
|
+
}, s = m(() => {
|
|
3234
3234
|
if (!o.value) {
|
|
3235
|
-
const H =
|
|
3235
|
+
const H = i(t.modelValue ?? d.value);
|
|
3236
3236
|
return [H, H];
|
|
3237
3237
|
}
|
|
3238
|
-
const S = Array.isArray(t.modelValue) ? t.modelValue : [
|
|
3239
|
-
let E =
|
|
3238
|
+
const S = Array.isArray(t.modelValue) ? t.modelValue : [d.value, n.value];
|
|
3239
|
+
let E = i(S[0]), $ = i(S[1]);
|
|
3240
3240
|
return E > $ && ([E, $] = [$, E]), [E, $];
|
|
3241
|
-
}), f =
|
|
3242
|
-
() => o.value ? s.value[0] :
|
|
3243
|
-
), p =
|
|
3244
|
-
const E =
|
|
3245
|
-
return E <= 0 ? 0 : (S -
|
|
3246
|
-
}, w =
|
|
3241
|
+
}), f = m(
|
|
3242
|
+
() => o.value ? s.value[0] : i(t.modelValue ?? d.value)
|
|
3243
|
+
), p = m(() => o.value ? s.value[1] : i(t.modelValue ?? d.value)), v = (S) => {
|
|
3244
|
+
const E = n.value - d.value;
|
|
3245
|
+
return E <= 0 ? 0 : (S - d.value) / E * 100;
|
|
3246
|
+
}, w = m(() => o.value ? v(f.value) : 0), k = m(() => v(o.value ? p.value : f.value)), x = m(() => ({
|
|
3247
3247
|
"--vf-slider-start": `${w.value}%`,
|
|
3248
3248
|
"--vf-slider-end": `${k.value}%`
|
|
3249
|
-
})), A =
|
|
3249
|
+
})), A = m(() => {
|
|
3250
3250
|
const S = ["vf-slider", `vf-slider_${t.variant}`];
|
|
3251
3251
|
return t.size !== "normal" && S.push(`vf-slider_${t.size}`), t.disabled && S.push("vf-slider_disabled"), o.value && S.push("vf-slider_range"), S;
|
|
3252
|
-
}), V =
|
|
3252
|
+
}), V = m(() => ({
|
|
3253
3253
|
zIndex: o.value && w.value > 50 ? 4 : 3
|
|
3254
|
-
})), G =
|
|
3254
|
+
})), G = m(() => ({
|
|
3255
3255
|
zIndex: o.value && w.value > 50 ? 3 : 4
|
|
3256
3256
|
})), D = (S, E, $) => {
|
|
3257
3257
|
if (t.disabled)
|
|
3258
3258
|
return;
|
|
3259
|
-
const H =
|
|
3259
|
+
const H = i(Number(S));
|
|
3260
3260
|
r("update:modelValue", H), r($, E);
|
|
3261
|
-
},
|
|
3261
|
+
}, M = (S, E, $, H) => {
|
|
3262
3262
|
if (t.disabled)
|
|
3263
3263
|
return;
|
|
3264
|
-
const Y =
|
|
3264
|
+
const Y = i(Number(S));
|
|
3265
3265
|
let [J, y] = s.value;
|
|
3266
3266
|
E === "start" ? J = Math.min(Y, y) : y = Math.max(Y, J), r("update:modelValue", [J, y]), r(H, $);
|
|
3267
3267
|
}, N = (S) => {
|
|
3268
3268
|
const E = S.target;
|
|
3269
3269
|
if (o.value) {
|
|
3270
|
-
|
|
3270
|
+
M(E.value, "start", S, "input");
|
|
3271
3271
|
return;
|
|
3272
3272
|
}
|
|
3273
3273
|
D(E.value, S, "input");
|
|
3274
3274
|
}, L = (S) => {
|
|
3275
3275
|
const E = S.target;
|
|
3276
|
-
|
|
3276
|
+
M(E.value, "end", S, "input");
|
|
3277
3277
|
}, b = (S) => {
|
|
3278
3278
|
const E = S.target;
|
|
3279
3279
|
if (o.value) {
|
|
3280
|
-
|
|
3280
|
+
M(E.value, "start", S, "change");
|
|
3281
3281
|
return;
|
|
3282
3282
|
}
|
|
3283
3283
|
D(E.value, S, "change");
|
|
3284
|
-
},
|
|
3284
|
+
}, C = (S) => {
|
|
3285
3285
|
const E = S.target;
|
|
3286
|
-
|
|
3287
|
-
}, h = (S) => r("focus", S), R = (S) => r("blur", S), W =
|
|
3288
|
-
return (S, E) => (
|
|
3286
|
+
M(E.value, "end", S, "change");
|
|
3287
|
+
}, h = (S) => r("focus", S), R = (S) => r("blur", S), W = m(() => t.marks ?? []), q = (S) => ({ left: `${v(u(S))}%` }), 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);
|
|
3288
|
+
return (S, E) => (g(), _("div", {
|
|
3289
3289
|
class: I(A.value),
|
|
3290
|
-
style:
|
|
3290
|
+
style: ge(x.value)
|
|
3291
3291
|
}, [
|
|
3292
3292
|
z("div", Ao, [
|
|
3293
3293
|
E[0] || (E[0] = z("div", { class: "vf-slider__track" }, [
|
|
@@ -3296,52 +3296,110 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
3296
3296
|
z("input", {
|
|
3297
3297
|
class: "vf-slider__input vf-slider__input_start",
|
|
3298
3298
|
type: "range",
|
|
3299
|
-
min:
|
|
3300
|
-
max:
|
|
3299
|
+
min: d.value,
|
|
3300
|
+
max: n.value,
|
|
3301
3301
|
step: c.value,
|
|
3302
3302
|
value: f.value,
|
|
3303
3303
|
disabled: S.disabled,
|
|
3304
3304
|
"aria-label": X.value,
|
|
3305
|
-
style:
|
|
3305
|
+
style: ge(V.value),
|
|
3306
3306
|
onInput: N,
|
|
3307
3307
|
onChange: b,
|
|
3308
3308
|
onFocus: h,
|
|
3309
3309
|
onBlur: R
|
|
3310
3310
|
}, null, 44, Wo),
|
|
3311
|
-
o.value ? (
|
|
3311
|
+
o.value ? (g(), _("input", {
|
|
3312
3312
|
key: 0,
|
|
3313
3313
|
class: "vf-slider__input vf-slider__input_end",
|
|
3314
3314
|
type: "range",
|
|
3315
|
-
min:
|
|
3316
|
-
max:
|
|
3315
|
+
min: d.value,
|
|
3316
|
+
max: n.value,
|
|
3317
3317
|
step: c.value,
|
|
3318
3318
|
value: p.value,
|
|
3319
3319
|
disabled: S.disabled,
|
|
3320
|
-
"aria-label":
|
|
3321
|
-
style:
|
|
3320
|
+
"aria-label": le.value,
|
|
3321
|
+
style: ge(G.value),
|
|
3322
3322
|
onInput: L,
|
|
3323
|
-
onChange:
|
|
3323
|
+
onChange: C,
|
|
3324
3324
|
onFocus: h,
|
|
3325
3325
|
onBlur: R
|
|
3326
3326
|
}, null, 44, Ho)) : T("", !0)
|
|
3327
3327
|
]),
|
|
3328
|
-
W.value.length ? (
|
|
3329
|
-
(
|
|
3328
|
+
W.value.length ? (g(), _("div", Ko, [
|
|
3329
|
+
(g(!0), _(re, null, de(W.value, ($) => (g(), _("span", {
|
|
3330
3330
|
key: $.value,
|
|
3331
3331
|
class: "vf-slider__mark",
|
|
3332
|
-
style:
|
|
3332
|
+
style: ge(q($.value))
|
|
3333
3333
|
}, [
|
|
3334
|
-
$.label ? (
|
|
3334
|
+
$.label ? (g(), _("span", No, O($.label), 1)) : T("", !0)
|
|
3335
3335
|
], 4))), 128))
|
|
3336
3336
|
])) : T("", !0),
|
|
3337
|
-
S.showValue ? (
|
|
3337
|
+
S.showValue ? (g(), _("div", Go, O(ee.value), 1)) : T("", !0)
|
|
3338
3338
|
], 6));
|
|
3339
3339
|
}
|
|
3340
|
-
}), Yo = ["
|
|
3340
|
+
}), Yo = ["aria-label"], jo = { class: "vf-breadcrumbs__list" }, Xo = {
|
|
3341
|
+
key: 0,
|
|
3342
|
+
class: "vf-breadcrumbs__current",
|
|
3343
|
+
"aria-current": "page"
|
|
3344
|
+
}, qo = {
|
|
3345
|
+
key: 0,
|
|
3346
|
+
class: "vf-breadcrumbs__separator",
|
|
3347
|
+
"aria-hidden": "true"
|
|
3348
|
+
}, Cl = /* @__PURE__ */ j({
|
|
3349
|
+
name: "VfBreadcrumbs",
|
|
3350
|
+
__name: "breadcrumbs",
|
|
3351
|
+
props: {
|
|
3352
|
+
items: { default: () => [] },
|
|
3353
|
+
separator: { default: "/" },
|
|
3354
|
+
ariaLabel: { default: "Breadcrumbs" }
|
|
3355
|
+
},
|
|
3356
|
+
setup(a) {
|
|
3357
|
+
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) => (g(), _("nav", {
|
|
3359
|
+
class: "vf-breadcrumbs",
|
|
3360
|
+
"aria-label": n.ariaLabel
|
|
3361
|
+
}, [
|
|
3362
|
+
z("ol", jo, [
|
|
3363
|
+
(g(!0), _(re, null, de(r.value, (l, u) => (g(), _(re, {
|
|
3364
|
+
key: d(l, u)
|
|
3365
|
+
}, [
|
|
3366
|
+
z("li", {
|
|
3367
|
+
class: I(["vf-breadcrumbs__item", { "is-current": o(l, u), "is-disabled": l.disabled }])
|
|
3368
|
+
}, [
|
|
3369
|
+
F(n.$slots, "item", {
|
|
3370
|
+
item: l,
|
|
3371
|
+
index: u,
|
|
3372
|
+
isLast: u === r.value.length - 1,
|
|
3373
|
+
active: o(l, u)
|
|
3374
|
+
}, () => [
|
|
3375
|
+
o(l, u) ? (g(), _("span", Xo, O(l.label), 1)) : (g(), se(Ge, {
|
|
3376
|
+
key: 1,
|
|
3377
|
+
class: "vf-breadcrumbs__link",
|
|
3378
|
+
to: l.to,
|
|
3379
|
+
href: l.href ?? l.url,
|
|
3380
|
+
disabled: l.disabled
|
|
3381
|
+
}, {
|
|
3382
|
+
default: be(() => [
|
|
3383
|
+
U(O(l.label), 1)
|
|
3384
|
+
]),
|
|
3385
|
+
_: 2
|
|
3386
|
+
}, 1032, ["to", "href", "disabled"]))
|
|
3387
|
+
])
|
|
3388
|
+
], 2),
|
|
3389
|
+
u < r.value.length - 1 ? (g(), _("li", qo, [
|
|
3390
|
+
F(n.$slots, "separator", { separator: n.separator }, () => [
|
|
3391
|
+
U(O(n.separator), 1)
|
|
3392
|
+
])
|
|
3393
|
+
])) : T("", !0)
|
|
3394
|
+
], 64))), 128))
|
|
3395
|
+
])
|
|
3396
|
+
], 8, Yo));
|
|
3397
|
+
}
|
|
3398
|
+
}), Uo = ["dark", "light", "theme", "preset", "colors", "components", "colorScheme"], Zo = (a) => {
|
|
3341
3399
|
const e = a.replace(/([A-Z])/g, "-$1");
|
|
3342
3400
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
3343
|
-
},
|
|
3344
|
-
if (!
|
|
3401
|
+
}, Jo = (a) => a.filter((e) => !Uo.includes(e)).map((e) => Zo(e)).join("-").toLowerCase(), He = (a) => a.join("."), Qo = (a) => /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(a), je = (a) => {
|
|
3402
|
+
if (!Qo(a))
|
|
3345
3403
|
return null;
|
|
3346
3404
|
if (a.length === 4) {
|
|
3347
3405
|
const e = a[1], r = a[2], t = a[3];
|
|
@@ -3349,55 +3407,55 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
3349
3407
|
}
|
|
3350
3408
|
return a.toLowerCase();
|
|
3351
3409
|
}, lt = (a) => {
|
|
3352
|
-
const e =
|
|
3410
|
+
const e = je(a);
|
|
3353
3411
|
if (!e)
|
|
3354
3412
|
return [0, 0, 0];
|
|
3355
|
-
const r = parseInt(e.slice(1), 16), t = r >> 16 & 255, o = r >> 8 & 255,
|
|
3356
|
-
return [t, o,
|
|
3357
|
-
},
|
|
3413
|
+
const r = parseInt(e.slice(1), 16), t = r >> 16 & 255, o = r >> 8 & 255, d = r & 255;
|
|
3414
|
+
return [t, o, d];
|
|
3415
|
+
}, Ze = (a) => {
|
|
3358
3416
|
const [e, r, t] = lt(a);
|
|
3359
3417
|
return `${e}, ${r}, ${t}`;
|
|
3360
|
-
},
|
|
3361
|
-
const t = a / 255, o = e / 255,
|
|
3362
|
-
let u = 0,
|
|
3363
|
-
const s = (
|
|
3418
|
+
}, er = (a, e, r) => {
|
|
3419
|
+
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
|
+
let u = 0, i = 0;
|
|
3421
|
+
const s = (n + c) / 2;
|
|
3364
3422
|
if (l !== 0) {
|
|
3365
|
-
switch (
|
|
3423
|
+
switch (i = l / (1 - Math.abs(2 * s - 1)), n) {
|
|
3366
3424
|
case t:
|
|
3367
|
-
u = (o -
|
|
3425
|
+
u = (o - d) / l % 6;
|
|
3368
3426
|
break;
|
|
3369
3427
|
case o:
|
|
3370
|
-
u = (
|
|
3428
|
+
u = (d - t) / l + 2;
|
|
3371
3429
|
break;
|
|
3372
|
-
case
|
|
3430
|
+
case d:
|
|
3373
3431
|
u = (t - o) / l + 4;
|
|
3374
3432
|
break;
|
|
3375
3433
|
}
|
|
3376
3434
|
u *= 60, u < 0 && (u += 360);
|
|
3377
3435
|
}
|
|
3378
|
-
return [u,
|
|
3379
|
-
},
|
|
3380
|
-
const t = e / 100, o = r / 100,
|
|
3381
|
-
let l = 0, u = 0,
|
|
3382
|
-
a >= 0 && a < 60 ? (l =
|
|
3383
|
-
const s = Math.round((l + c) * 255), f = Math.round((u + c) * 255), p = Math.round((
|
|
3436
|
+
return [u, i * 100, s * 100];
|
|
3437
|
+
}, tr = (a, e, r) => {
|
|
3438
|
+
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
|
+
let l = 0, u = 0, i = 0;
|
|
3440
|
+
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
|
+
const s = Math.round((l + c) * 255), f = Math.round((u + c) * 255), p = Math.round((i + c) * 255);
|
|
3384
3442
|
return [s, f, p];
|
|
3385
|
-
},
|
|
3386
|
-
const r =
|
|
3443
|
+
}, ar = (a, e, r) => `#${[a, e, r].map((t) => t.toString(16).padStart(2, "0")).join("")}`, or = (a, e, r) => Math.min(r, Math.max(e, a)), rr = (a, e) => {
|
|
3444
|
+
const r = je(a);
|
|
3387
3445
|
if (!r)
|
|
3388
3446
|
return a;
|
|
3389
|
-
const [t, o,
|
|
3390
|
-
return
|
|
3391
|
-
}, Me = (a) => !!a && typeof a == "object" && !Array.isArray(a),
|
|
3447
|
+
const [t, o, d] = lt(r), [n, c, l] = er(t, o, d), i = (e - 5) * 7, s = or(l + i, 0, 100), [f, p, v] = tr(n, c, s);
|
|
3448
|
+
return ar(f, p, v);
|
|
3449
|
+
}, Me = (a) => !!a && typeof a == "object" && !Array.isArray(a), Xe = (a, e) => {
|
|
3392
3450
|
if (!e)
|
|
3393
3451
|
return { ...a };
|
|
3394
3452
|
const r = { ...a };
|
|
3395
3453
|
for (const t in e) {
|
|
3396
|
-
const o = e[t],
|
|
3397
|
-
Me(
|
|
3454
|
+
const o = e[t], d = a[t];
|
|
3455
|
+
Me(d) && Me(o) ? r[t] = Xe(d, o) : r[t] = o;
|
|
3398
3456
|
}
|
|
3399
3457
|
return r;
|
|
3400
|
-
},
|
|
3458
|
+
}, lr = (a) => {
|
|
3401
3459
|
if (!a)
|
|
3402
3460
|
return null;
|
|
3403
3461
|
if (Me(a) && "preset" in a) {
|
|
@@ -3411,42 +3469,42 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
3411
3469
|
};
|
|
3412
3470
|
}
|
|
3413
3471
|
return { preset: a };
|
|
3414
|
-
},
|
|
3415
|
-
const e = [], r = [], t = [], o = [],
|
|
3472
|
+
}, sr = (a) => {
|
|
3473
|
+
const e = [], r = [], t = [], o = [], d = (l) => t.push(l), n = (l) => o.push(l), c = (l, u) => {
|
|
3416
3474
|
if (!(!l || typeof l != "object"))
|
|
3417
|
-
for (const
|
|
3418
|
-
const s = l[
|
|
3475
|
+
for (const i in l) {
|
|
3476
|
+
const s = l[i], f = u.concat([i]);
|
|
3419
3477
|
if (Me(s)) {
|
|
3420
3478
|
c(s, f);
|
|
3421
3479
|
continue;
|
|
3422
3480
|
}
|
|
3423
3481
|
if (s && typeof s == "object") {
|
|
3424
|
-
|
|
3482
|
+
n(`Theme value "${He(f)}" is not a plain object or string and will be ignored.`);
|
|
3425
3483
|
continue;
|
|
3426
3484
|
}
|
|
3427
3485
|
if (typeof s != "string") {
|
|
3428
|
-
|
|
3486
|
+
n(`Theme value "${He(f)}" is not a string and will be ignored.`);
|
|
3429
3487
|
continue;
|
|
3430
3488
|
}
|
|
3431
|
-
const v = f.includes("colorScheme") && f.includes("dark") ? r : e, w =
|
|
3489
|
+
const v = f.includes("colorScheme") && f.includes("dark") ? r : e, w = Jo(f);
|
|
3432
3490
|
if (v.push(`--vf-${w}: ${s}`), f.includes("colors")) {
|
|
3433
|
-
const k =
|
|
3491
|
+
const k = je(s);
|
|
3434
3492
|
if (!k) {
|
|
3435
|
-
|
|
3493
|
+
d(
|
|
3436
3494
|
`Theme color "${He(f)}" is not hex. Shade variables will not be generated for it.`
|
|
3437
3495
|
);
|
|
3438
3496
|
continue;
|
|
3439
3497
|
}
|
|
3440
|
-
if (v.push(`--vf-${w}-rgb: ${
|
|
3498
|
+
if (v.push(`--vf-${w}-rgb: ${Ze(k)}`), i !== "white")
|
|
3441
3499
|
for (let x = 1; x < 10; ++x) {
|
|
3442
|
-
const A =
|
|
3443
|
-
v.push(`--vf-${w}-${x}00: ${A}`), v.push(`--vf-${w}-${x}00-rgb: ${
|
|
3500
|
+
const A = rr(k, x);
|
|
3501
|
+
v.push(`--vf-${w}-${x}00: ${A}`), v.push(`--vf-${w}-${x}00-rgb: ${Ze(A)}`);
|
|
3444
3502
|
}
|
|
3445
3503
|
}
|
|
3446
3504
|
}
|
|
3447
3505
|
};
|
|
3448
3506
|
return c(a, []), { baseVars: e, darkVars: r, warnings: t, errors: o };
|
|
3449
|
-
},
|
|
3507
|
+
}, nr = (a) => {
|
|
3450
3508
|
if (typeof document > "u")
|
|
3451
3509
|
return null;
|
|
3452
3510
|
const e = document.getElementById(a);
|
|
@@ -3454,48 +3512,48 @@ const Ot = (a, e) => a.strategy ? a.strategy : It(e) ? "fixed" : "absolute", _e
|
|
|
3454
3512
|
return e;
|
|
3455
3513
|
const r = document.createElement("style");
|
|
3456
3514
|
return r.id = a, document.head.appendChild(r), r;
|
|
3457
|
-
},
|
|
3515
|
+
}, ir = (a) => ({
|
|
3458
3516
|
selector: a.selector ?? ":root",
|
|
3459
3517
|
darkSelector: a.darkSelector ?? ":root[data-theme=dark]"
|
|
3460
|
-
}),
|
|
3461
|
-
const { baseVars: o, darkVars:
|
|
3518
|
+
}), dr = (a, e, r, t) => {
|
|
3519
|
+
const { baseVars: o, darkVars: d, warnings: n, errors: c } = sr(a), l = nr("vueforge-theme");
|
|
3462
3520
|
if (!l)
|
|
3463
3521
|
return;
|
|
3464
3522
|
if (c.length) {
|
|
3465
3523
|
if (t)
|
|
3466
3524
|
throw new Error(`[VueForge] ${c.join(" ")}`);
|
|
3467
|
-
for (const
|
|
3468
|
-
console.warn(`[VueForge] ${
|
|
3525
|
+
for (const i of c)
|
|
3526
|
+
console.warn(`[VueForge] ${i}`);
|
|
3469
3527
|
}
|
|
3470
|
-
if (
|
|
3471
|
-
for (const
|
|
3472
|
-
console.warn(`[VueForge] ${
|
|
3528
|
+
if (n.length)
|
|
3529
|
+
for (const i of n)
|
|
3530
|
+
console.warn(`[VueForge] ${i}`);
|
|
3473
3531
|
const u = [];
|
|
3474
|
-
o.length && u.push(`${e} { ${o.join(";")} }`),
|
|
3532
|
+
o.length && u.push(`${e} { ${o.join(";")} }`), d.length && u.push(`${r} { ${d.join(";")} }`), l.textContent = u.join(`
|
|
3475
3533
|
`);
|
|
3476
3534
|
};
|
|
3477
|
-
let
|
|
3535
|
+
let ye = null;
|
|
3478
3536
|
const st = (a) => {
|
|
3479
|
-
const e =
|
|
3537
|
+
const e = lr(a);
|
|
3480
3538
|
if (!e)
|
|
3481
3539
|
return;
|
|
3482
|
-
const r =
|
|
3483
|
-
|
|
3484
|
-
},
|
|
3485
|
-
if (!
|
|
3540
|
+
const r = Xe(e.preset, e.overrides), { selector: t, darkSelector: o } = ir(e);
|
|
3541
|
+
ye = { ...e }, dr(r, t, o, e.strict);
|
|
3542
|
+
}, kl = (a) => {
|
|
3543
|
+
if (!ye)
|
|
3486
3544
|
return;
|
|
3487
|
-
const e = a.overrides === void 0 ?
|
|
3488
|
-
preset: a.preset ??
|
|
3545
|
+
const e = a.overrides === void 0 ? ye.overrides : Xe(ye.overrides ?? {}, a.overrides ?? {}), r = {
|
|
3546
|
+
preset: a.preset ?? ye.preset,
|
|
3489
3547
|
overrides: e,
|
|
3490
|
-
selector: a.selector ??
|
|
3491
|
-
darkSelector: a.darkSelector ??
|
|
3548
|
+
selector: a.selector ?? ye.selector,
|
|
3549
|
+
darkSelector: a.darkSelector ?? ye.darkSelector
|
|
3492
3550
|
};
|
|
3493
3551
|
st(r);
|
|
3494
|
-
},
|
|
3552
|
+
}, wl = () => ye ? { ...ye } : null, $l = {
|
|
3495
3553
|
install(a, e = {}) {
|
|
3496
3554
|
e.theme && st(e.theme);
|
|
3497
3555
|
}
|
|
3498
|
-
},
|
|
3556
|
+
}, Je = {
|
|
3499
3557
|
colors: {
|
|
3500
3558
|
white: "#ffffff",
|
|
3501
3559
|
green: "#0cbc87",
|
|
@@ -3558,7 +3616,7 @@ const st = (a) => {
|
|
|
3558
3616
|
dividerColor: "#2e2e32"
|
|
3559
3617
|
}
|
|
3560
3618
|
}
|
|
3561
|
-
},
|
|
3619
|
+
}, ur = {
|
|
3562
3620
|
fontSize: "var(--vf-typography-font-size)",
|
|
3563
3621
|
padding: "var(--vf-controls-padding-y) var(--vf-controls-padding-x)",
|
|
3564
3622
|
borderRadius: "var(--vf-radii-md)",
|
|
@@ -3700,11 +3758,11 @@ const st = (a) => {
|
|
|
3700
3758
|
}
|
|
3701
3759
|
}
|
|
3702
3760
|
}
|
|
3703
|
-
},
|
|
3761
|
+
}, cr = {
|
|
3704
3762
|
padding: "12px",
|
|
3705
3763
|
borderColor: "var(--vf-border-color)",
|
|
3706
3764
|
borderRadius: "var(--vf-radii-md)"
|
|
3707
|
-
},
|
|
3765
|
+
}, vr = {
|
|
3708
3766
|
gap: "0.5rem",
|
|
3709
3767
|
fontSize: "var(--vf-typography-font-size)",
|
|
3710
3768
|
padding: "var(--vf-controls-padding-y) var(--vf-controls-padding-x)",
|
|
@@ -3725,7 +3783,7 @@ const st = (a) => {
|
|
|
3725
3783
|
padding: "var(--vf-sizes-lg-padding-y) var(--vf-sizes-lg-padding-x)",
|
|
3726
3784
|
fontSize: "var(--vf-sizes-lg-font-size)"
|
|
3727
3785
|
}
|
|
3728
|
-
},
|
|
3786
|
+
}, fr = {
|
|
3729
3787
|
gap: "0.375rem",
|
|
3730
3788
|
textColor: "var(--vf-text-color)",
|
|
3731
3789
|
labelFontSize: "0.875rem",
|
|
@@ -3745,7 +3803,7 @@ const st = (a) => {
|
|
|
3745
3803
|
labelFontSize: "0.9375rem",
|
|
3746
3804
|
hintFontSize: "0.875rem"
|
|
3747
3805
|
}
|
|
3748
|
-
},
|
|
3806
|
+
}, pr = {
|
|
3749
3807
|
gap: "0.5rem",
|
|
3750
3808
|
fontSize: "var(--vf-typography-font-size)",
|
|
3751
3809
|
padding: "var(--vf-controls-padding-y) var(--vf-controls-padding-x)",
|
|
@@ -3768,10 +3826,18 @@ const st = (a) => {
|
|
|
3768
3826
|
padding: "var(--vf-sizes-lg-padding-y) var(--vf-sizes-lg-padding-x)",
|
|
3769
3827
|
fontSize: "var(--vf-sizes-lg-font-size)"
|
|
3770
3828
|
}
|
|
3771
|
-
},
|
|
3829
|
+
}, br = {
|
|
3772
3830
|
hoverColor: "var(--vf-blue)",
|
|
3773
3831
|
activeColor: "var(--vf-blue)"
|
|
3774
|
-
},
|
|
3832
|
+
}, gr = {
|
|
3833
|
+
gap: "0.35rem",
|
|
3834
|
+
fontSize: "var(--vf-typography-font-size)",
|
|
3835
|
+
textColor: "var(--vf-secondary-text-color)",
|
|
3836
|
+
hoverColor: "var(--vf-text-color)",
|
|
3837
|
+
activeColor: "var(--vf-text-color)",
|
|
3838
|
+
separatorColor: "var(--vf-divider-color)",
|
|
3839
|
+
disabledOpacity: "var(--vf-states-disabled-opacity)"
|
|
3840
|
+
}, mr = {
|
|
3775
3841
|
iconGap: "6px",
|
|
3776
3842
|
submenuOffset: "12px",
|
|
3777
3843
|
separatorThickness: "1px",
|
|
@@ -3791,7 +3857,7 @@ const st = (a) => {
|
|
|
3791
3857
|
marginBottom: "0.5rem",
|
|
3792
3858
|
marginLeft: "0.5rem"
|
|
3793
3859
|
}
|
|
3794
|
-
},
|
|
3860
|
+
}, hr = {
|
|
3795
3861
|
width: "90vw",
|
|
3796
3862
|
maxWidth: "520px",
|
|
3797
3863
|
maxHeight: "80vh",
|
|
@@ -3818,7 +3884,7 @@ const st = (a) => {
|
|
|
3818
3884
|
closeColor: "var(--vf-text-color)",
|
|
3819
3885
|
closeFontSize: "1.25rem",
|
|
3820
3886
|
closeHoverBackgroundColor: "rgba(0, 0, 0, 0.06)"
|
|
3821
|
-
},
|
|
3887
|
+
}, yr = {
|
|
3822
3888
|
width: "320px",
|
|
3823
3889
|
widthSm: "260px",
|
|
3824
3890
|
widthLg: "420px",
|
|
@@ -3844,9 +3910,9 @@ const st = (a) => {
|
|
|
3844
3910
|
closeColor: "var(--vf-text-color)",
|
|
3845
3911
|
closeFontSize: "1.25rem",
|
|
3846
3912
|
closeHoverBackgroundColor: "rgba(0, 0, 0, 0.06)"
|
|
3847
|
-
},
|
|
3913
|
+
}, _r = {
|
|
3848
3914
|
backgroundColor: "var(--vf-bg-color)"
|
|
3849
|
-
},
|
|
3915
|
+
}, Cr = {
|
|
3850
3916
|
minWidth: "12rem",
|
|
3851
3917
|
fontSize: "var(--vf-typography-font-size)",
|
|
3852
3918
|
controlGap: "0.75rem",
|
|
@@ -3879,7 +3945,7 @@ const st = (a) => {
|
|
|
3879
3945
|
padding: "var(--vf-sizes-lg-padding-y) var(--vf-sizes-lg-padding-x)",
|
|
3880
3946
|
fontSize: "var(--vf-sizes-lg-font-size)"
|
|
3881
3947
|
}
|
|
3882
|
-
},
|
|
3948
|
+
}, kr = {
|
|
3883
3949
|
minWidth: "12rem",
|
|
3884
3950
|
fontSize: "var(--vf-typography-font-size)",
|
|
3885
3951
|
controlGap: "0.5rem",
|
|
@@ -3918,7 +3984,7 @@ const st = (a) => {
|
|
|
3918
3984
|
padding: "var(--vf-sizes-lg-padding-y) var(--vf-sizes-lg-padding-x)",
|
|
3919
3985
|
fontSize: "var(--vf-sizes-lg-font-size)"
|
|
3920
3986
|
}
|
|
3921
|
-
},
|
|
3987
|
+
}, wr = {
|
|
3922
3988
|
minWidth: "12rem",
|
|
3923
3989
|
fontSize: "var(--vf-typography-font-size)",
|
|
3924
3990
|
controlGap: "0.5rem",
|
|
@@ -3963,7 +4029,7 @@ const st = (a) => {
|
|
|
3963
4029
|
padding: "var(--vf-sizes-lg-padding-y) var(--vf-sizes-lg-padding-x)",
|
|
3964
4030
|
fontSize: "var(--vf-sizes-lg-font-size)"
|
|
3965
4031
|
}
|
|
3966
|
-
},
|
|
4032
|
+
}, $r = {
|
|
3967
4033
|
minWidth: "12rem",
|
|
3968
4034
|
fontSize: "var(--vf-typography-font-size)",
|
|
3969
4035
|
controlGap: "0.75rem",
|
|
@@ -4013,7 +4079,7 @@ const st = (a) => {
|
|
|
4013
4079
|
fontSize: "var(--vf-sizes-lg-font-size)",
|
|
4014
4080
|
daySize: "2.2rem"
|
|
4015
4081
|
}
|
|
4016
|
-
},
|
|
4082
|
+
}, xr = {
|
|
4017
4083
|
gap: "0.4rem",
|
|
4018
4084
|
itemMinWidth: "2rem",
|
|
4019
4085
|
fontSize: "var(--vf-typography-font-size)",
|
|
@@ -4038,7 +4104,7 @@ const st = (a) => {
|
|
|
4038
4104
|
fontSize: "var(--vf-sizes-lg-font-size)",
|
|
4039
4105
|
padding: "0.45rem 0.8rem"
|
|
4040
4106
|
}
|
|
4041
|
-
},
|
|
4107
|
+
}, zr = {
|
|
4042
4108
|
size: "1rem",
|
|
4043
4109
|
gap: "0.5rem",
|
|
4044
4110
|
borderRadius: "var(--vf-radii-sm)",
|
|
@@ -4050,7 +4116,7 @@ const st = (a) => {
|
|
|
4050
4116
|
checkColor: "#ffffff",
|
|
4051
4117
|
textColor: "var(--vf-text-color)",
|
|
4052
4118
|
disabledOpacity: "var(--vf-states-disabled-opacity)"
|
|
4053
|
-
},
|
|
4119
|
+
}, Br = {
|
|
4054
4120
|
size: "1rem",
|
|
4055
4121
|
dotSize: "0.45rem",
|
|
4056
4122
|
gap: "0.5rem",
|
|
@@ -4064,7 +4130,7 @@ const st = (a) => {
|
|
|
4064
4130
|
dotColor: "#ffffff",
|
|
4065
4131
|
textColor: "var(--vf-text-color)",
|
|
4066
4132
|
disabledOpacity: "var(--vf-states-disabled-opacity)"
|
|
4067
|
-
},
|
|
4133
|
+
}, Sr = {
|
|
4068
4134
|
width: "2.25rem",
|
|
4069
4135
|
height: "1.25rem",
|
|
4070
4136
|
thumbSize: "1rem",
|
|
@@ -4076,7 +4142,7 @@ const st = (a) => {
|
|
|
4076
4142
|
thumbColor: "#ffffff",
|
|
4077
4143
|
textColor: "var(--vf-text-color)",
|
|
4078
4144
|
disabledOpacity: "var(--vf-states-disabled-opacity)"
|
|
4079
|
-
},
|
|
4145
|
+
}, Fr = {
|
|
4080
4146
|
gap: "0.75rem",
|
|
4081
4147
|
listGap: "0.5rem",
|
|
4082
4148
|
listBorderWidth: "1px",
|
|
@@ -4097,7 +4163,7 @@ const st = (a) => {
|
|
|
4097
4163
|
panelBackgroundColor: "transparent",
|
|
4098
4164
|
panelTextColor: "var(--vf-text-color)",
|
|
4099
4165
|
disabledOpacity: "var(--vf-states-disabled-opacity)"
|
|
4100
|
-
},
|
|
4166
|
+
}, Vr = {
|
|
4101
4167
|
gap: "0.75rem",
|
|
4102
4168
|
borderRadius: "var(--vf-radii-md)",
|
|
4103
4169
|
borderColor: "var(--vf-border-color)",
|
|
@@ -4128,7 +4194,7 @@ const st = (a) => {
|
|
|
4128
4194
|
headerFontSize: "1rem",
|
|
4129
4195
|
contentPadding: "0.9rem 1.1rem"
|
|
4130
4196
|
}
|
|
4131
|
-
},
|
|
4197
|
+
}, Lr = {
|
|
4132
4198
|
padding: "0.35rem 0.6rem",
|
|
4133
4199
|
borderRadius: "8px",
|
|
4134
4200
|
backgroundColor: "rgba(0, 0, 0, 0.8)",
|
|
@@ -4139,7 +4205,7 @@ const st = (a) => {
|
|
|
4139
4205
|
zIndex: "120",
|
|
4140
4206
|
maxWidth: "240px",
|
|
4141
4207
|
arrowSize: "8px"
|
|
4142
|
-
},
|
|
4208
|
+
}, Tr = {
|
|
4143
4209
|
width: "100%",
|
|
4144
4210
|
height: "1rem",
|
|
4145
4211
|
lineHeight: "0.9rem",
|
|
@@ -4147,7 +4213,7 @@ const st = (a) => {
|
|
|
4147
4213
|
backgroundColor: "var(--vf-gutter-color)",
|
|
4148
4214
|
shimmerColor: "var(--vf-bg-color)",
|
|
4149
4215
|
animationDuration: "2s"
|
|
4150
|
-
},
|
|
4216
|
+
}, Rr = {
|
|
4151
4217
|
borderColor: "var(--vf-border-color)",
|
|
4152
4218
|
borderRadius: "var(--vf-radii-md)",
|
|
4153
4219
|
backgroundColor: "var(--vf-bg-color)",
|
|
@@ -4178,7 +4244,7 @@ const st = (a) => {
|
|
|
4178
4244
|
fontSize: "var(--vf-sizes-lg-font-size)",
|
|
4179
4245
|
cellPadding: "0.75rem 0.9rem"
|
|
4180
4246
|
}
|
|
4181
|
-
},
|
|
4247
|
+
}, Pr = {
|
|
4182
4248
|
gap: "0.75rem",
|
|
4183
4249
|
padding: "0.75rem 0.9rem",
|
|
4184
4250
|
borderRadius: "var(--vf-radii-md)",
|
|
@@ -4217,7 +4283,7 @@ const st = (a) => {
|
|
|
4217
4283
|
borderColor: "rgba(var(--vf-red-600-rgb), 0.45)",
|
|
4218
4284
|
textColor: "var(--vf-text-color)"
|
|
4219
4285
|
}
|
|
4220
|
-
},
|
|
4286
|
+
}, Ir = {
|
|
4221
4287
|
gap: "0.75rem",
|
|
4222
4288
|
padding: "0.75rem 0.9rem",
|
|
4223
4289
|
borderRadius: "var(--vf-radii-md)",
|
|
@@ -4255,7 +4321,7 @@ const st = (a) => {
|
|
|
4255
4321
|
borderColor: "rgba(var(--vf-red-600-rgb), 0.45)",
|
|
4256
4322
|
textColor: "var(--vf-text-color)"
|
|
4257
4323
|
}
|
|
4258
|
-
},
|
|
4324
|
+
}, Or = {
|
|
4259
4325
|
width: "100%",
|
|
4260
4326
|
height: "0.5rem",
|
|
4261
4327
|
borderRadius: "999px",
|
|
@@ -4291,7 +4357,7 @@ const st = (a) => {
|
|
|
4291
4357
|
circularSize: "3.25rem",
|
|
4292
4358
|
circularThickness: "7"
|
|
4293
4359
|
}
|
|
4294
|
-
},
|
|
4360
|
+
}, Mr = {
|
|
4295
4361
|
fontSize: "0.75rem",
|
|
4296
4362
|
lineHeight: "1",
|
|
4297
4363
|
paddingX: "0.5rem",
|
|
@@ -4356,7 +4422,7 @@ const st = (a) => {
|
|
|
4356
4422
|
paddingX: "0.65rem",
|
|
4357
4423
|
paddingY: "0.3rem"
|
|
4358
4424
|
}
|
|
4359
|
-
},
|
|
4425
|
+
}, Dr = {
|
|
4360
4426
|
size: "2.5rem",
|
|
4361
4427
|
fontSize: "0.9rem",
|
|
4362
4428
|
fontWeight: "600",
|
|
@@ -4382,7 +4448,7 @@ const st = (a) => {
|
|
|
4382
4448
|
fontSize: "1rem",
|
|
4383
4449
|
statusSize: "0.75rem"
|
|
4384
4450
|
}
|
|
4385
|
-
},
|
|
4451
|
+
}, Er = {
|
|
4386
4452
|
width: "100%",
|
|
4387
4453
|
gap: "0.5rem",
|
|
4388
4454
|
textColor: "var(--vf-text-color)",
|
|
@@ -4414,79 +4480,81 @@ const st = (a) => {
|
|
|
4414
4480
|
thumbSize: "1.25rem",
|
|
4415
4481
|
valueFontSize: "1rem"
|
|
4416
4482
|
}
|
|
4417
|
-
},
|
|
4418
|
-
...
|
|
4483
|
+
}, xl = {
|
|
4484
|
+
...Je,
|
|
4419
4485
|
components: {
|
|
4420
|
-
base:
|
|
4421
|
-
button:
|
|
4422
|
-
card:
|
|
4423
|
-
input:
|
|
4424
|
-
formField:
|
|
4425
|
-
textarea:
|
|
4426
|
-
link:
|
|
4427
|
-
|
|
4428
|
-
|
|
4429
|
-
|
|
4430
|
-
|
|
4431
|
-
|
|
4432
|
-
|
|
4433
|
-
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
4444
|
-
|
|
4445
|
-
|
|
4446
|
-
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
|
|
4486
|
+
base: Je,
|
|
4487
|
+
button: ur,
|
|
4488
|
+
card: cr,
|
|
4489
|
+
input: vr,
|
|
4490
|
+
formField: fr,
|
|
4491
|
+
textarea: pr,
|
|
4492
|
+
link: br,
|
|
4493
|
+
breadcrumbs: gr,
|
|
4494
|
+
menu: mr,
|
|
4495
|
+
modal: hr,
|
|
4496
|
+
drawer: yr,
|
|
4497
|
+
popover: _r,
|
|
4498
|
+
select: Cr,
|
|
4499
|
+
autocomplete: kr,
|
|
4500
|
+
multiselect: wr,
|
|
4501
|
+
datepicker: $r,
|
|
4502
|
+
pagination: xr,
|
|
4503
|
+
checkbox: zr,
|
|
4504
|
+
radio: Br,
|
|
4505
|
+
switch: Sr,
|
|
4506
|
+
tabs: Fr,
|
|
4507
|
+
accordion: Vr,
|
|
4508
|
+
tooltip: Lr,
|
|
4509
|
+
skeleton: Tr,
|
|
4510
|
+
datatable: Rr,
|
|
4511
|
+
toast: Pr,
|
|
4512
|
+
alert: Ir,
|
|
4513
|
+
progress: Or,
|
|
4514
|
+
badge: Mr,
|
|
4515
|
+
avatar: Dr,
|
|
4516
|
+
slider: Er
|
|
4450
4517
|
}
|
|
4451
4518
|
};
|
|
4452
4519
|
export {
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
|
|
4459
|
-
|
|
4520
|
+
ll as Accordion,
|
|
4521
|
+
sl as AccordionItem,
|
|
4522
|
+
dl as Alert,
|
|
4523
|
+
qr as Autocomplete,
|
|
4524
|
+
hl as Avatar,
|
|
4525
|
+
ml as Badge,
|
|
4526
|
+
Cl as Breadcrumbs,
|
|
4527
|
+
Nr as Button,
|
|
4460
4528
|
Ct as Card,
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
|
|
4465
|
-
|
|
4466
|
-
|
|
4467
|
-
|
|
4468
|
-
|
|
4469
|
-
|
|
4470
|
-
|
|
4471
|
-
|
|
4472
|
-
|
|
4473
|
-
|
|
4474
|
-
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
|
|
4478
|
-
|
|
4479
|
-
|
|
4480
|
-
|
|
4481
|
-
|
|
4482
|
-
|
|
4483
|
-
|
|
4484
|
-
|
|
4485
|
-
|
|
4486
|
-
|
|
4487
|
-
|
|
4488
|
-
|
|
4489
|
-
|
|
4529
|
+
Qr as Checkbox,
|
|
4530
|
+
yl as DataTable,
|
|
4531
|
+
Zr as DatePicker,
|
|
4532
|
+
xl as DefaultTheme,
|
|
4533
|
+
fl as Drawer,
|
|
4534
|
+
Yr as FormField,
|
|
4535
|
+
Gr as Input,
|
|
4536
|
+
Ge as Link,
|
|
4537
|
+
Kr as Menu,
|
|
4538
|
+
vl as Modal,
|
|
4539
|
+
Ur as MultiSelect,
|
|
4540
|
+
Jr as Pagination,
|
|
4541
|
+
cl as Popover,
|
|
4542
|
+
gl as Progress,
|
|
4543
|
+
tl as RadioButton,
|
|
4544
|
+
el as RadioGroup,
|
|
4545
|
+
Xr as Select,
|
|
4546
|
+
bl as Skeleton,
|
|
4547
|
+
_l as Slider,
|
|
4548
|
+
ul as Switch,
|
|
4549
|
+
ol as Tab,
|
|
4550
|
+
rl as TabPanel,
|
|
4551
|
+
al as Tabs,
|
|
4552
|
+
jr as Textarea,
|
|
4553
|
+
nl as Toast,
|
|
4554
|
+
il as ToastContainer,
|
|
4555
|
+
pl as Tooltip,
|
|
4556
|
+
$l as VueForge,
|
|
4557
|
+
wl as getTheme,
|
|
4490
4558
|
st as setTheme,
|
|
4491
|
-
|
|
4559
|
+
kl as updateTheme
|
|
4492
4560
|
};
|