@codemonster-ru/vueforge 0.24.0 → 0.26.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 +72 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.ts.mjs +1280 -1104
- package/dist/index.ts.umd.js +3 -3
- package/dist/package/components/avatar.vue.d.ts +35 -0
- package/dist/package/components/badge.vue.d.ts +33 -0
- package/dist/package/config/theme-core.d.ts +69 -0
- package/dist/package/themes/default/components/avatar.d.ts +28 -0
- package/dist/package/themes/default/components/badge.d.ts +67 -0
- package/dist/package/themes/default/index.d.ts +93 -0
- package/package.json +1 -1
package/dist/index.ts.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as Y, ref as O, computed as y, watch as Q, resolveComponent as Ze, openBlock as b, createElementBlock as _, normalizeClass as L, renderSlot as S, Fragment as ae, createTextVNode as j, toDisplayString as R, createBlock as se, withCtx as _e, createCommentVNode as P, createElementVNode as B, renderList as ve, withKeys as Z, withModifiers as U, unref as xe, createVNode as Je, useSlots as He, nextTick as ke, onMounted as Fe, onBeforeUnmount as $e, Teleport as we, withDirectives as fe, vShow as pe, provide as Ke, inject as De, reactive as nt, createSlots as it, normalizeStyle as Se } from "vue";
|
|
2
2
|
import { useRoute as dt, useRouter as ct } from "vue-router";
|
|
3
3
|
import { CmIcon as ze } from "@codemonster-ru/vueiconify";
|
|
4
|
-
const ut = ["href", "aria-disabled", "tabindex"], Qe = /* @__PURE__ */
|
|
4
|
+
const ut = ["href", "aria-disabled", "tabindex"], Qe = /* @__PURE__ */ Y({
|
|
5
5
|
__name: "link",
|
|
6
6
|
props: {
|
|
7
7
|
to: { default: void 0 },
|
|
@@ -15,39 +15,39 @@ const ut = ["href", "aria-disabled", "tabindex"], Qe = /* @__PURE__ */ G({
|
|
|
15
15
|
},
|
|
16
16
|
emits: ["click", "active", "update:active", "onActive"],
|
|
17
17
|
setup(t, { emit: e }) {
|
|
18
|
-
const r = e, o = t, a = dt(), d = ct(), i = O(null),
|
|
18
|
+
const r = e, o = t, a = dt(), d = ct(), i = O(null), u = y(() => o.href ?? o.url), l = y(() => o.as ? o.as === "router-link" && !o.to ? "a" : o.as : o.type === "router-link" || o.type === "a" ? o.type === "router-link" && !o.to ? "a" : o.type : o.to ? "router-link" : "a"), c = y(() => o.to), n = y(() => o.to ? d.resolve(o.to) : null), s = y(() => {
|
|
19
19
|
if (l.value !== "router-link")
|
|
20
20
|
return !1;
|
|
21
|
-
const v =
|
|
21
|
+
const v = n.value;
|
|
22
22
|
return v ? v.name ? a.matched.some(({ name: $ }) => $ === v.name) : v.fullPath ? a.fullPath === v.fullPath : a.path === v.path : !1;
|
|
23
|
-
}), f = y(() => o.active === void 0 ?
|
|
23
|
+
}), f = y(() => o.active === void 0 ? s.value : o.active), p = (v) => {
|
|
24
24
|
if (!o.disabled) {
|
|
25
25
|
r("click", v);
|
|
26
26
|
return;
|
|
27
27
|
}
|
|
28
28
|
v.preventDefault(), v.stopPropagation();
|
|
29
29
|
};
|
|
30
|
-
return
|
|
30
|
+
return Q(s, (v) => {
|
|
31
31
|
v && (r("active"), r("onActive")), r("update:active", v);
|
|
32
32
|
}), (v, $) => {
|
|
33
|
-
const
|
|
34
|
-
return l.value === "a" ? (
|
|
33
|
+
const C = Ze("router-link");
|
|
34
|
+
return l.value === "a" ? (b(), _("a", {
|
|
35
35
|
key: 0,
|
|
36
|
-
href:
|
|
37
|
-
class:
|
|
36
|
+
href: u.value,
|
|
37
|
+
class: L(["vf-link", { "vf-link_active": f.value, "vf-link_disabled": v.disabled }]),
|
|
38
38
|
"aria-disabled": v.disabled,
|
|
39
39
|
tabindex: v.disabled ? -1 : void 0,
|
|
40
40
|
onClick: p
|
|
41
41
|
}, [
|
|
42
|
-
v.$slots.default ?
|
|
43
|
-
|
|
42
|
+
v.$slots.default ? S(v.$slots, "default", { key: 0 }) : (b(), _(ae, { key: 1 }, [
|
|
43
|
+
j(R(v.label), 1)
|
|
44
44
|
], 64))
|
|
45
|
-
], 10, ut)) : (
|
|
45
|
+
], 10, ut)) : (b(), se(C, {
|
|
46
46
|
key: 1,
|
|
47
47
|
ref_key: "link",
|
|
48
48
|
ref: i,
|
|
49
|
-
to:
|
|
50
|
-
class:
|
|
49
|
+
to: c.value,
|
|
50
|
+
class: L(["vf-link", { "vf-link_active": f.value }]),
|
|
51
51
|
"aria-disabled": v.disabled,
|
|
52
52
|
tabindex: v.disabled ? -1 : void 0,
|
|
53
53
|
"active-class": "vf-link_partially-active",
|
|
@@ -55,8 +55,8 @@ const ut = ["href", "aria-disabled", "tabindex"], Qe = /* @__PURE__ */ G({
|
|
|
55
55
|
onClick: p
|
|
56
56
|
}, {
|
|
57
57
|
default: _e(() => [
|
|
58
|
-
v.$slots.default ?
|
|
59
|
-
|
|
58
|
+
v.$slots.default ? S(v.$slots, "default", { key: 0 }) : (b(), _(ae, { key: 1 }, [
|
|
59
|
+
j(R(v.label), 1)
|
|
60
60
|
], 64))
|
|
61
61
|
]),
|
|
62
62
|
_: 3
|
|
@@ -68,10 +68,10 @@ const ut = ["href", "aria-disabled", "tabindex"], Qe = /* @__PURE__ */ G({
|
|
|
68
68
|
for (const [o, a] of e)
|
|
69
69
|
r[o] = a;
|
|
70
70
|
return r;
|
|
71
|
-
}, ft = {}, pt = { class: "vf-card" },
|
|
71
|
+
}, ft = {}, pt = { class: "vf-card" }, gt = {
|
|
72
72
|
key: 0,
|
|
73
73
|
class: "vf-card__default"
|
|
74
|
-
},
|
|
74
|
+
}, bt = {
|
|
75
75
|
key: 1,
|
|
76
76
|
class: "vf-card__header"
|
|
77
77
|
}, mt = {
|
|
@@ -82,29 +82,29 @@ const ut = ["href", "aria-disabled", "tabindex"], Qe = /* @__PURE__ */ G({
|
|
|
82
82
|
class: "vf-card__footer"
|
|
83
83
|
};
|
|
84
84
|
function yt(t, e) {
|
|
85
|
-
return
|
|
86
|
-
t.$slots.default ? (
|
|
87
|
-
|
|
85
|
+
return b(), _("div", pt, [
|
|
86
|
+
t.$slots.default ? (b(), _("div", gt, [
|
|
87
|
+
S(t.$slots, "default")
|
|
88
88
|
])) : P("", !0),
|
|
89
|
-
t.$slots.header ? (
|
|
90
|
-
|
|
89
|
+
t.$slots.header ? (b(), _("div", bt, [
|
|
90
|
+
S(t.$slots, "header")
|
|
91
91
|
])) : P("", !0),
|
|
92
|
-
t.$slots.body ? (
|
|
93
|
-
|
|
92
|
+
t.$slots.body ? (b(), _("div", mt, [
|
|
93
|
+
S(t.$slots, "body")
|
|
94
94
|
])) : P("", !0),
|
|
95
|
-
t.$slots.footer ? (
|
|
96
|
-
|
|
95
|
+
t.$slots.footer ? (b(), _("div", ht, [
|
|
96
|
+
S(t.$slots, "footer")
|
|
97
97
|
])) : P("", !0)
|
|
98
98
|
]);
|
|
99
99
|
}
|
|
100
|
-
const _t = /* @__PURE__ */ vt(ft, [["render", yt]]),
|
|
100
|
+
const _t = /* @__PURE__ */ vt(ft, [["render", yt]]), Ct = {
|
|
101
101
|
class: "vf-menu__list",
|
|
102
102
|
role: "menu"
|
|
103
|
-
},
|
|
103
|
+
}, 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"], xr = /* @__PURE__ */ Y({
|
|
108
108
|
name: "VfMenu",
|
|
109
109
|
__name: "menu",
|
|
110
110
|
props: {
|
|
@@ -113,44 +113,44 @@ const _t = /* @__PURE__ */ vt(ft, [["render", yt]]), kt = {
|
|
|
113
113
|
},
|
|
114
114
|
emits: ["active", "onActive"],
|
|
115
115
|
setup(t, { emit: e }) {
|
|
116
|
-
const r = e, o = t, a = O([]), d = (
|
|
117
|
-
...
|
|
118
|
-
items:
|
|
119
|
-
})), l = (
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
}),
|
|
123
|
-
},
|
|
124
|
-
var
|
|
116
|
+
const r = e, o = t, a = O([]), d = (n, s) => `${n.label ?? n.to ?? n.href ?? n.url ?? "item"}_${s.toString()}`, i = (n) => n.to ? "router-link" : "a", u = (n) => n.map((s) => ({
|
|
117
|
+
...s,
|
|
118
|
+
items: s.items ? u(s.items) : void 0
|
|
119
|
+
})), l = (n) => {
|
|
120
|
+
n.items && n.items.length ? (a.value.map((s) => {
|
|
121
|
+
s !== n && (s.subMenuVisible = !1);
|
|
122
|
+
}), n.subMenuVisible = !n.subMenuVisible) : Object.prototype.hasOwnProperty.call(n, "command") && typeof n.command == "function" && n.command();
|
|
123
|
+
}, c = (n) => {
|
|
124
|
+
var s;
|
|
125
125
|
for (const f in a.value) {
|
|
126
126
|
const p = a.value[f];
|
|
127
|
-
Object.prototype.hasOwnProperty.call(p, "items") && ((
|
|
127
|
+
Object.prototype.hasOwnProperty.call(p, "items") && ((s = p.items) != null && s.some((v) => v === n) ? (p.active = !0, p.subMenuVisible = !0) : (p.active = !1, p.subMenuVisible = !1));
|
|
128
128
|
}
|
|
129
|
-
r("active",
|
|
129
|
+
r("active", n), r("onActive", n);
|
|
130
130
|
};
|
|
131
|
-
return
|
|
131
|
+
return Q(
|
|
132
132
|
() => o.items,
|
|
133
|
-
(
|
|
134
|
-
a.value =
|
|
133
|
+
(n) => {
|
|
134
|
+
a.value = u(n);
|
|
135
135
|
},
|
|
136
136
|
{ deep: !0, immediate: !0 }
|
|
137
|
-
), (
|
|
137
|
+
), (n, s) => {
|
|
138
138
|
const f = Ze("VfMenu");
|
|
139
|
-
return
|
|
140
|
-
class:
|
|
139
|
+
return b(), _("div", {
|
|
140
|
+
class: L(["vf-menu", `vf-menu_${n.orientation}`])
|
|
141
141
|
}, [
|
|
142
|
-
B("ul",
|
|
143
|
-
(
|
|
142
|
+
B("ul", Ct, [
|
|
143
|
+
(b(!0), _(ae, null, ve(a.value, (p, v) => (b(), _("li", {
|
|
144
144
|
key: d(p, v),
|
|
145
145
|
class: "vf-menu__item",
|
|
146
146
|
role: "none"
|
|
147
147
|
}, [
|
|
148
|
-
|
|
148
|
+
n.$slots[d(p, v)] ? S(n.$slots, d(p, v), {
|
|
149
149
|
key: 0,
|
|
150
150
|
item: { ...p, class: "vf-menu__link" }
|
|
151
|
-
}) : p.separator ? (
|
|
151
|
+
}) : p.separator ? (b(), _("hr", kt)) : p.items && p.items.length ? (b(), _(ae, { key: 2 }, [
|
|
152
152
|
B("div", {
|
|
153
|
-
class:
|
|
153
|
+
class: L(["vf-menu__parent", { "vf-menu__parent_active": p.active }]),
|
|
154
154
|
role: "menuitem",
|
|
155
155
|
tabindex: "0",
|
|
156
156
|
"aria-expanded": p.subMenuVisible ? "true" : "false",
|
|
@@ -160,21 +160,21 @@ const _t = /* @__PURE__ */ vt(ft, [["render", yt]]), kt = {
|
|
|
160
160
|
Z(U(($) => l(p), ["prevent"]), ["space"])
|
|
161
161
|
]
|
|
162
162
|
}, [
|
|
163
|
-
p.icon ? (
|
|
163
|
+
p.icon ? (b(), se(xe(ze), {
|
|
164
164
|
key: 0,
|
|
165
165
|
icon: p.icon,
|
|
166
166
|
class: "vf-menu__icon"
|
|
167
167
|
}, null, 8, ["icon"])) : P("", !0),
|
|
168
|
-
|
|
168
|
+
j(" " + R(p.label) + " ", 1),
|
|
169
169
|
Je(xe(ze), { icon: "chevronDown" })
|
|
170
170
|
], 42, $t),
|
|
171
|
-
p.items ? (
|
|
171
|
+
p.items ? (b(), se(f, {
|
|
172
172
|
key: 0,
|
|
173
173
|
items: p.items,
|
|
174
|
-
class:
|
|
175
|
-
onOnActive:
|
|
174
|
+
class: L(["vf-menu__submenu", { "vf-menu__submenu_visible": p.subMenuVisible }]),
|
|
175
|
+
onOnActive: c
|
|
176
176
|
}, null, 8, ["items", "class"])) : P("", !0)
|
|
177
|
-
], 64)) : (
|
|
177
|
+
], 64)) : (b(), se(Qe, {
|
|
178
178
|
key: 3,
|
|
179
179
|
to: p.to,
|
|
180
180
|
href: p.href ?? p.url,
|
|
@@ -185,15 +185,15 @@ const _t = /* @__PURE__ */ vt(ft, [["render", yt]]), kt = {
|
|
|
185
185
|
role: "menuitem",
|
|
186
186
|
"aria-disabled": p.disabled ? "true" : "false",
|
|
187
187
|
onClick: ($) => l(p),
|
|
188
|
-
onActive: ($) =>
|
|
188
|
+
onActive: ($) => c(p)
|
|
189
189
|
}, {
|
|
190
190
|
default: _e(() => [
|
|
191
|
-
p.icon ? (
|
|
191
|
+
p.icon ? (b(), se(xe(ze), {
|
|
192
192
|
key: 0,
|
|
193
193
|
icon: p.icon,
|
|
194
194
|
class: "vf-menu__icon"
|
|
195
195
|
}, null, 8, ["icon"])) : P("", !0),
|
|
196
|
-
|
|
196
|
+
j(" " + R(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 _t = /* @__PURE__ */ vt(ft, [["render", yt]]), kt = {
|
|
|
202
202
|
], 2);
|
|
203
203
|
};
|
|
204
204
|
}
|
|
205
|
-
}), wt = ["type", "disabled"],
|
|
205
|
+
}), wt = ["type", "disabled"], zr = /* @__PURE__ */ Y({
|
|
206
206
|
__name: "button",
|
|
207
207
|
props: {
|
|
208
208
|
to: { default: void 0 },
|
|
@@ -221,59 +221,59 @@ const _t = /* @__PURE__ */ vt(ft, [["render", yt]]), kt = {
|
|
|
221
221
|
disabled: { type: Boolean, default: !1 }
|
|
222
222
|
},
|
|
223
223
|
setup(t) {
|
|
224
|
-
const e = t, r = ["button", "submit", "reset"], o = (
|
|
225
|
-
let
|
|
226
|
-
return ["top", "bottom"].includes(e.iconPos) &&
|
|
227
|
-
}), l = y(() => ["vf-button__icon", `vf-button__icon_${e.iconPos}`]),
|
|
228
|
-
return (
|
|
224
|
+
const e = t, r = ["button", "submit", "reset"], o = (n) => !!n && r.includes(n), a = y(() => e.as ? e.as === "button" : !(e.to || e.href || e.url || e.type && !o(e.type))), d = y(() => o(e.type) ? e.type : "button"), i = y(() => e.as === "link" ? e.to ? "router-link" : "a" : e.type && !o(e.type) ? e.type === "router-link" && e.to ? "router-link" : "a" : e.to ? "router-link" : "a"), u = y(() => {
|
|
225
|
+
let n = ["vf-button", `vf-button_${e.severity}`];
|
|
226
|
+
return ["top", "bottom"].includes(e.iconPos) && n.push("vf-button_vertical"), e.variant === "text" && n.push("vf-button_text"), e.variant === "outlined" && n.push("vf-button_outlined"), ["small", "large"].indexOf(e.size) > -1 && n.push(`vf-button_${e.size}`), (e.loading || e.disabled) && n.push("vf-button_disabled"), e.rounded && n.push("vf-button_rounded"), n;
|
|
227
|
+
}), l = y(() => ["vf-button__icon", `vf-button__icon_${e.iconPos}`]), c = y(() => ["vf-button__label"]);
|
|
228
|
+
return (n, s) => a.value ? (b(), _("button", {
|
|
229
229
|
key: 0,
|
|
230
230
|
type: d.value,
|
|
231
|
-
class:
|
|
231
|
+
class: L(u.value),
|
|
232
232
|
disabled: e.loading || e.disabled
|
|
233
233
|
}, [
|
|
234
|
-
e.icon && !e.loading ? (
|
|
234
|
+
e.icon && !e.loading ? (b(), se(xe(ze), {
|
|
235
235
|
key: 0,
|
|
236
236
|
icon: e.icon,
|
|
237
|
-
class:
|
|
237
|
+
class: L(l.value)
|
|
238
238
|
}, null, 8, ["icon", "class"])) : P("", !0),
|
|
239
|
-
e.loading ? (
|
|
239
|
+
e.loading ? (b(), se(xe(ze), {
|
|
240
240
|
key: 1,
|
|
241
241
|
icon: "circleNotch",
|
|
242
|
-
class:
|
|
242
|
+
class: L(l.value),
|
|
243
243
|
spin: ""
|
|
244
244
|
}, null, 8, ["class"])) : P("", !0),
|
|
245
|
-
|
|
245
|
+
n.$slots.default ? (b(), _("span", {
|
|
246
246
|
key: 2,
|
|
247
|
-
class:
|
|
247
|
+
class: L(c.value)
|
|
248
248
|
}, [
|
|
249
|
-
|
|
250
|
-
], 2)) :
|
|
249
|
+
S(n.$slots, "default")
|
|
250
|
+
], 2)) : n.label ? (b(), _("span", {
|
|
251
251
|
key: 3,
|
|
252
|
-
class:
|
|
253
|
-
}, R(
|
|
254
|
-
], 10, wt)) : (
|
|
252
|
+
class: L(c.value)
|
|
253
|
+
}, R(n.label), 3)) : P("", !0)
|
|
254
|
+
], 10, wt)) : (b(), se(Qe, {
|
|
255
255
|
key: 1,
|
|
256
256
|
to: e.to,
|
|
257
257
|
href: e.href ?? e.url,
|
|
258
258
|
as: i.value,
|
|
259
|
-
class:
|
|
259
|
+
class: L(u.value),
|
|
260
260
|
disabled: e.loading || e.disabled
|
|
261
261
|
}, {
|
|
262
262
|
default: _e(() => [
|
|
263
|
-
e.icon ? (
|
|
263
|
+
e.icon ? (b(), se(xe(ze), {
|
|
264
264
|
key: 0,
|
|
265
265
|
icon: e.icon,
|
|
266
|
-
class:
|
|
266
|
+
class: L(l.value)
|
|
267
267
|
}, null, 8, ["icon", "class"])) : P("", !0),
|
|
268
|
-
|
|
268
|
+
n.$slots.default ? (b(), _("span", {
|
|
269
269
|
key: 1,
|
|
270
|
-
class:
|
|
270
|
+
class: L(c.value)
|
|
271
271
|
}, [
|
|
272
|
-
|
|
273
|
-
], 2)) :
|
|
272
|
+
S(n.$slots, "default")
|
|
273
|
+
], 2)) : n.label ? (b(), _("span", {
|
|
274
274
|
key: 2,
|
|
275
|
-
class:
|
|
276
|
-
}, R(
|
|
275
|
+
class: L(c.value)
|
|
276
|
+
}, R(n.label), 3)) : P("", !0)
|
|
277
277
|
]),
|
|
278
278
|
_: 3
|
|
279
279
|
}, 8, ["to", "href", "as", "class", "disabled"]));
|
|
@@ -284,7 +284,7 @@ const _t = /* @__PURE__ */ vt(ft, [["render", yt]]), kt = {
|
|
|
284
284
|
}, zt = ["type", "value", "placeholder", "disabled", "readonly"], Bt = {
|
|
285
285
|
key: 1,
|
|
286
286
|
class: "vf-input__suffix"
|
|
287
|
-
},
|
|
287
|
+
}, Br = /* @__PURE__ */ Y({
|
|
288
288
|
__name: "input",
|
|
289
289
|
props: {
|
|
290
290
|
modelValue: { default: "" },
|
|
@@ -298,40 +298,40 @@ const _t = /* @__PURE__ */ vt(ft, [["render", yt]]), kt = {
|
|
|
298
298
|
emits: ["update:modelValue", "input", "change", "focus", "blur"],
|
|
299
299
|
setup(t, { emit: e }) {
|
|
300
300
|
const r = e, o = t, a = y(() => {
|
|
301
|
-
const
|
|
302
|
-
return o.size !== "normal" &&
|
|
303
|
-
}), d = (
|
|
304
|
-
const
|
|
305
|
-
r("update:modelValue",
|
|
306
|
-
}, i = (
|
|
307
|
-
return (
|
|
308
|
-
class:
|
|
301
|
+
const c = ["vf-input", `vf-input_${o.variant}`];
|
|
302
|
+
return o.size !== "normal" && c.push(`vf-input_${o.size}`), o.disabled && c.push("vf-input_disabled"), c;
|
|
303
|
+
}), d = (c) => {
|
|
304
|
+
const n = c.target;
|
|
305
|
+
r("update:modelValue", n.value), r("input", c);
|
|
306
|
+
}, i = (c) => r("change", c), u = (c) => r("focus", c), l = (c) => r("blur", c);
|
|
307
|
+
return (c, n) => (b(), _("div", {
|
|
308
|
+
class: L(a.value)
|
|
309
309
|
}, [
|
|
310
|
-
|
|
311
|
-
|
|
310
|
+
c.$slots.prefix ? (b(), _("span", xt, [
|
|
311
|
+
S(c.$slots, "prefix")
|
|
312
312
|
])) : P("", !0),
|
|
313
313
|
B("input", {
|
|
314
314
|
class: "vf-input__control",
|
|
315
|
-
type:
|
|
316
|
-
value:
|
|
317
|
-
placeholder:
|
|
318
|
-
disabled:
|
|
319
|
-
readonly:
|
|
315
|
+
type: c.type,
|
|
316
|
+
value: c.modelValue,
|
|
317
|
+
placeholder: c.placeholder,
|
|
318
|
+
disabled: c.disabled,
|
|
319
|
+
readonly: c.readonly,
|
|
320
320
|
onInput: d,
|
|
321
321
|
onChange: i,
|
|
322
|
-
onFocus:
|
|
322
|
+
onFocus: u,
|
|
323
323
|
onBlur: l
|
|
324
324
|
}, null, 40, zt),
|
|
325
|
-
|
|
326
|
-
|
|
325
|
+
c.$slots.suffix ? (b(), _("span", Bt, [
|
|
326
|
+
S(c.$slots, "suffix")
|
|
327
327
|
])) : P("", !0)
|
|
328
328
|
], 2));
|
|
329
329
|
}
|
|
330
|
-
}),
|
|
330
|
+
}), St = ["for"], Ft = {
|
|
331
331
|
key: 0,
|
|
332
332
|
class: "vf-form-field__required",
|
|
333
333
|
"aria-hidden": "true"
|
|
334
|
-
}, Vt = { class: "vf-form-field__control" },
|
|
334
|
+
}, Vt = { class: "vf-form-field__control" }, Tt = ["id"], Lt = ["id"], Sr = /* @__PURE__ */ Y({
|
|
335
335
|
__name: "form-field",
|
|
336
336
|
props: {
|
|
337
337
|
id: { default: void 0 },
|
|
@@ -343,56 +343,56 @@ const _t = /* @__PURE__ */ vt(ft, [["render", yt]]), kt = {
|
|
|
343
343
|
size: { default: "normal" }
|
|
344
344
|
},
|
|
345
345
|
setup(t) {
|
|
346
|
-
const e = t, r = He(), o = `vf-form-field-${Math.random().toString(36).slice(2, 10)}`, a = y(() => e.id || o), d = y(() => `${a.value}-hint`), i = y(() => `${a.value}-error`),
|
|
346
|
+
const e = t, r = He(), o = `vf-form-field-${Math.random().toString(36).slice(2, 10)}`, a = y(() => e.id || o), d = y(() => `${a.value}-hint`), i = y(() => `${a.value}-error`), u = y(() => !!e.label || !!r.label), l = y(() => !!e.hint || !!r.hint), c = y(() => !!e.error || !!r.error), n = y(() => {
|
|
347
347
|
const f = [];
|
|
348
|
-
return l.value && f.push(d.value),
|
|
349
|
-
}),
|
|
348
|
+
return l.value && f.push(d.value), c.value && f.push(i.value), f.length ? f.join(" ") : void 0;
|
|
349
|
+
}), s = y(() => {
|
|
350
350
|
const f = ["vf-form-field"];
|
|
351
|
-
return e.size !== "normal" && f.push(`vf-form-field_${e.size}`), e.disabled && f.push("vf-form-field_disabled"),
|
|
351
|
+
return e.size !== "normal" && f.push(`vf-form-field_${e.size}`), e.disabled && f.push("vf-form-field_disabled"), c.value && f.push("vf-form-field_invalid"), f;
|
|
352
352
|
});
|
|
353
|
-
return (f, p) => (
|
|
354
|
-
class:
|
|
353
|
+
return (f, p) => (b(), _("div", {
|
|
354
|
+
class: L(s.value)
|
|
355
355
|
}, [
|
|
356
|
-
|
|
356
|
+
u.value ? (b(), _("label", {
|
|
357
357
|
key: 0,
|
|
358
358
|
class: "vf-form-field__label",
|
|
359
359
|
for: a.value
|
|
360
360
|
}, [
|
|
361
|
-
|
|
362
|
-
|
|
361
|
+
S(f.$slots, "label", {}, () => [
|
|
362
|
+
j(R(f.label), 1)
|
|
363
363
|
]),
|
|
364
|
-
f.required ? (
|
|
365
|
-
], 8,
|
|
364
|
+
f.required ? (b(), _("span", Ft, "*")) : P("", !0)
|
|
365
|
+
], 8, St)) : P("", !0),
|
|
366
366
|
B("div", Vt, [
|
|
367
|
-
|
|
367
|
+
S(f.$slots, "default", {
|
|
368
368
|
id: a.value,
|
|
369
|
-
describedBy:
|
|
370
|
-
invalid:
|
|
369
|
+
describedBy: n.value,
|
|
370
|
+
invalid: c.value,
|
|
371
371
|
required: f.required
|
|
372
372
|
})
|
|
373
373
|
]),
|
|
374
|
-
l.value ? (
|
|
374
|
+
l.value ? (b(), _("p", {
|
|
375
375
|
key: 1,
|
|
376
376
|
id: d.value,
|
|
377
377
|
class: "vf-form-field__hint"
|
|
378
378
|
}, [
|
|
379
|
-
|
|
380
|
-
|
|
379
|
+
S(f.$slots, "hint", {}, () => [
|
|
380
|
+
j(R(f.hint), 1)
|
|
381
381
|
])
|
|
382
|
-
], 8,
|
|
383
|
-
|
|
382
|
+
], 8, Tt)) : P("", !0),
|
|
383
|
+
c.value ? (b(), _("p", {
|
|
384
384
|
key: 2,
|
|
385
385
|
id: i.value,
|
|
386
386
|
class: "vf-form-field__error",
|
|
387
387
|
role: "alert"
|
|
388
388
|
}, [
|
|
389
|
-
|
|
390
|
-
|
|
389
|
+
S(f.$slots, "error", {}, () => [
|
|
390
|
+
j(R(f.error), 1)
|
|
391
391
|
])
|
|
392
|
-
], 8,
|
|
392
|
+
], 8, Lt)) : P("", !0)
|
|
393
393
|
], 2));
|
|
394
394
|
}
|
|
395
|
-
}), Rt = ["value", "placeholder", "disabled", "readonly", "rows"],
|
|
395
|
+
}), Rt = ["value", "placeholder", "disabled", "readonly", "rows"], Fr = /* @__PURE__ */ Y({
|
|
396
396
|
__name: "textarea",
|
|
397
397
|
props: {
|
|
398
398
|
modelValue: { default: "" },
|
|
@@ -406,25 +406,25 @@ const _t = /* @__PURE__ */ vt(ft, [["render", yt]]), kt = {
|
|
|
406
406
|
emits: ["update:modelValue", "input", "change", "focus", "blur"],
|
|
407
407
|
setup(t, { emit: e }) {
|
|
408
408
|
const r = e, o = t, a = y(() => {
|
|
409
|
-
const
|
|
410
|
-
return o.size !== "normal" &&
|
|
411
|
-
}), d = (
|
|
412
|
-
const
|
|
413
|
-
r("update:modelValue",
|
|
414
|
-
}, i = (
|
|
415
|
-
return (
|
|
416
|
-
class:
|
|
409
|
+
const c = ["vf-textarea", `vf-textarea_${o.variant}`];
|
|
410
|
+
return o.size !== "normal" && c.push(`vf-textarea_${o.size}`), o.disabled && c.push("vf-textarea_disabled"), c;
|
|
411
|
+
}), d = (c) => {
|
|
412
|
+
const n = c.target;
|
|
413
|
+
r("update:modelValue", n.value), r("input", c);
|
|
414
|
+
}, i = (c) => r("change", c), u = (c) => r("focus", c), l = (c) => r("blur", c);
|
|
415
|
+
return (c, n) => (b(), _("div", {
|
|
416
|
+
class: L(a.value)
|
|
417
417
|
}, [
|
|
418
418
|
B("textarea", {
|
|
419
419
|
class: "vf-textarea__control",
|
|
420
|
-
value:
|
|
421
|
-
placeholder:
|
|
422
|
-
disabled:
|
|
423
|
-
readonly:
|
|
424
|
-
rows:
|
|
420
|
+
value: c.modelValue,
|
|
421
|
+
placeholder: c.placeholder,
|
|
422
|
+
disabled: c.disabled,
|
|
423
|
+
readonly: c.readonly,
|
|
424
|
+
rows: c.rows,
|
|
425
425
|
onInput: d,
|
|
426
426
|
onChange: i,
|
|
427
|
-
onFocus:
|
|
427
|
+
onFocus: u,
|
|
428
428
|
onBlur: l
|
|
429
429
|
}, null, 40, Rt)
|
|
430
430
|
], 2));
|
|
@@ -442,7 +442,7 @@ const _t = /* @__PURE__ */ vt(ft, [["render", yt]]), kt = {
|
|
|
442
442
|
"left",
|
|
443
443
|
"left-start",
|
|
444
444
|
"left-end"
|
|
445
|
-
],
|
|
445
|
+
], ge = (t) => {
|
|
446
446
|
if (t == null || !(t instanceof HTMLElement))
|
|
447
447
|
return null;
|
|
448
448
|
if (typeof window < "u") {
|
|
@@ -450,7 +450,7 @@ const _t = /* @__PURE__ */ vt(ft, [["render", yt]]), kt = {
|
|
|
450
450
|
if (/(auto|scroll|overlay)/.test(r))
|
|
451
451
|
return t;
|
|
452
452
|
}
|
|
453
|
-
return t.scrollHeight > t.clientHeight || t.scrollWidth > t.clientWidth ? t :
|
|
453
|
+
return t.scrollHeight > t.clientHeight || t.scrollWidth > t.clientWidth ? t : ge(t.parentNode);
|
|
454
454
|
};
|
|
455
455
|
function Pt(t) {
|
|
456
456
|
return typeof window > "u" ? !1 : window.getComputedStyle(t).position === "fixed";
|
|
@@ -458,9 +458,9 @@ function Pt(t) {
|
|
|
458
458
|
const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he = (t, e) => It(t, e) === "fixed", ie = (t, e, r = {}) => {
|
|
459
459
|
const o = t.getBoundingClientRect(), a = e ? e.offsetParent : null, d = e ? he(r, e) : !1;
|
|
460
460
|
if (a && !d) {
|
|
461
|
-
const i = a.getBoundingClientRect(),
|
|
461
|
+
const i = a.getBoundingClientRect(), u = a.scrollLeft, l = a.scrollTop;
|
|
462
462
|
return {
|
|
463
|
-
left: o.left - i.left +
|
|
463
|
+
left: o.left - i.left + u,
|
|
464
464
|
top: o.top - i.top + l,
|
|
465
465
|
width: o.width,
|
|
466
466
|
height: o.height
|
|
@@ -472,11 +472,11 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
472
472
|
width: o.width,
|
|
473
473
|
height: o.height
|
|
474
474
|
};
|
|
475
|
-
},
|
|
475
|
+
}, Ce = (t, e) => {
|
|
476
476
|
var r;
|
|
477
477
|
return (r = t.middleware) == null ? void 0 : r.find((o) => o.name === e);
|
|
478
|
-
}, et = (t, e) => !!
|
|
479
|
-
const e =
|
|
478
|
+
}, et = (t, e) => !!Ce(t, e), Mt = (t) => {
|
|
479
|
+
const e = ge(t);
|
|
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 = (t) => t.scrollLeft + t.clientWidth, Ie = (t) => t.scrollTop + t.clientHeight, de = (t, e, r = null, o = {}, a) => {
|
|
@@ -484,7 +484,7 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
484
484
|
return t;
|
|
485
485
|
let d = 0;
|
|
486
486
|
if (r === null) {
|
|
487
|
-
const i =
|
|
487
|
+
const i = ge(e);
|
|
488
488
|
d = i ? i.scrollTop : 0;
|
|
489
489
|
}
|
|
490
490
|
return t - d;
|
|
@@ -493,17 +493,17 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
493
493
|
if (r === null && typeof window < "u" && he(o, e))
|
|
494
494
|
d = window.innerWidth;
|
|
495
495
|
else if (r === null) {
|
|
496
|
-
const i =
|
|
496
|
+
const i = ge(e);
|
|
497
497
|
d = i ? Pe(i) : 0;
|
|
498
498
|
} else
|
|
499
499
|
d = r.getBoundingClientRect().width;
|
|
500
500
|
return -(t + e.clientWidth - d);
|
|
501
|
-
},
|
|
501
|
+
}, be = (t, e, r = null, o = {}, a) => {
|
|
502
502
|
let d;
|
|
503
503
|
if (r === null && typeof window < "u" && he(o, e))
|
|
504
504
|
d = window.innerHeight;
|
|
505
505
|
else if (r === null) {
|
|
506
|
-
const i =
|
|
506
|
+
const i = ge(e);
|
|
507
507
|
d = i ? Ie(i) : 0;
|
|
508
508
|
} else
|
|
509
509
|
d = r.getBoundingClientRect().height;
|
|
@@ -513,7 +513,7 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
513
513
|
return t;
|
|
514
514
|
let d = 0;
|
|
515
515
|
if (r === null) {
|
|
516
|
-
const i =
|
|
516
|
+
const i = ge(e);
|
|
517
517
|
d = i ? i.scrollLeft : 0;
|
|
518
518
|
}
|
|
519
519
|
return t - d;
|
|
@@ -526,11 +526,11 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
526
526
|
reference: d,
|
|
527
527
|
scrollDirection: i
|
|
528
528
|
}) => {
|
|
529
|
-
const
|
|
529
|
+
const u = Me(d, o, a, t), l = Ce(t, "offset");
|
|
530
530
|
if (l) {
|
|
531
|
-
const
|
|
532
|
-
x:
|
|
533
|
-
y:
|
|
531
|
+
const c = l.fn({
|
|
532
|
+
x: u.x,
|
|
533
|
+
y: u.y,
|
|
534
534
|
options: t,
|
|
535
535
|
primaryX: e,
|
|
536
536
|
primaryY: r,
|
|
@@ -539,11 +539,11 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
539
539
|
reference: d,
|
|
540
540
|
scrollDirection: i
|
|
541
541
|
});
|
|
542
|
-
|
|
542
|
+
u.x = c.x, u.y = c.y;
|
|
543
543
|
}
|
|
544
|
-
return Jt(
|
|
545
|
-
x:
|
|
546
|
-
y:
|
|
544
|
+
return Jt(u, o, d, t) ? {
|
|
545
|
+
x: u.x,
|
|
546
|
+
y: u.y,
|
|
547
547
|
placement: a
|
|
548
548
|
} : !1;
|
|
549
549
|
}, Ve = (t) => ({
|
|
@@ -556,36 +556,36 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
556
556
|
primaryX: a,
|
|
557
557
|
primaryY: d,
|
|
558
558
|
floating: i,
|
|
559
|
-
placement:
|
|
559
|
+
placement: u,
|
|
560
560
|
reference: l,
|
|
561
|
-
scrollDirection:
|
|
561
|
+
scrollDirection: c
|
|
562
562
|
}) => {
|
|
563
|
-
var
|
|
564
|
-
const
|
|
563
|
+
var n;
|
|
564
|
+
const s = {
|
|
565
565
|
x: e,
|
|
566
566
|
y: r,
|
|
567
|
-
placement:
|
|
567
|
+
placement: u
|
|
568
568
|
}, f = {
|
|
569
569
|
...o,
|
|
570
|
-
middleware: (
|
|
570
|
+
middleware: (n = o.middleware) == null ? void 0 : n.filter((T) => T.name !== "shift")
|
|
571
571
|
}, p = (t == null ? void 0 : t.placements) ?? je, v = !(t != null && t.placements), $ = v ? je : p;
|
|
572
|
-
let
|
|
573
|
-
const w = (
|
|
574
|
-
if (
|
|
572
|
+
let C = !1;
|
|
573
|
+
const w = (T) => {
|
|
574
|
+
if (C)
|
|
575
575
|
return;
|
|
576
576
|
const H = Xe({
|
|
577
577
|
options: f,
|
|
578
578
|
primaryX: a,
|
|
579
579
|
primaryY: d,
|
|
580
580
|
floating: i,
|
|
581
|
-
placement:
|
|
581
|
+
placement: T,
|
|
582
582
|
reference: l,
|
|
583
|
-
scrollDirection:
|
|
583
|
+
scrollDirection: c
|
|
584
584
|
});
|
|
585
|
-
H && (
|
|
585
|
+
H && (s.x = H.x, s.y = H.y, s.placement = H.placement, C = !0);
|
|
586
586
|
}, D = eo(l, i, f);
|
|
587
|
-
if (!v && p.includes(
|
|
588
|
-
const
|
|
587
|
+
if (!v && p.includes(u) && w(u), C || $.forEach(w), !C) {
|
|
588
|
+
const T = p.reduce(
|
|
589
589
|
(H, I) => {
|
|
590
590
|
const M = Xe({
|
|
591
591
|
options: f,
|
|
@@ -594,27 +594,27 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
594
594
|
floating: i,
|
|
595
595
|
placement: I,
|
|
596
596
|
reference: l,
|
|
597
|
-
scrollDirection:
|
|
597
|
+
scrollDirection: c
|
|
598
598
|
});
|
|
599
599
|
if (!M)
|
|
600
600
|
return H;
|
|
601
|
-
const E = Be(I),
|
|
602
|
-
return !H ||
|
|
601
|
+
const E = Be(I), F = D[E];
|
|
602
|
+
return !H || F > H.space ? { result: M, space: F } : H;
|
|
603
603
|
},
|
|
604
604
|
null
|
|
605
605
|
);
|
|
606
|
-
|
|
606
|
+
T && (s.x = T.result.x, s.y = T.result.y, s.placement = T.result.placement, C = !0);
|
|
607
607
|
}
|
|
608
|
-
if (!
|
|
609
|
-
const
|
|
610
|
-
let H =
|
|
611
|
-
p.forEach((
|
|
612
|
-
const h = Be(
|
|
613
|
-
|
|
608
|
+
if (!C && p.length > 0) {
|
|
609
|
+
const T = Be(u);
|
|
610
|
+
let H = T, I = D[T];
|
|
611
|
+
p.forEach((g) => {
|
|
612
|
+
const h = Be(g), k = D[h];
|
|
613
|
+
k > I && (I = k, H = h);
|
|
614
614
|
});
|
|
615
|
-
const M = Qt(H,
|
|
616
|
-
if (
|
|
617
|
-
const
|
|
615
|
+
const M = Qt(H, u, p), E = Me(l, i, M, f), F = Ce(f, "offset");
|
|
616
|
+
if (F) {
|
|
617
|
+
const g = F.fn({
|
|
618
618
|
x: E.x,
|
|
619
619
|
y: E.y,
|
|
620
620
|
options: f,
|
|
@@ -623,47 +623,47 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
623
623
|
floating: i,
|
|
624
624
|
placement: M,
|
|
625
625
|
reference: l,
|
|
626
|
-
scrollDirection:
|
|
626
|
+
scrollDirection: c
|
|
627
627
|
});
|
|
628
|
-
E.x =
|
|
628
|
+
E.x = g.x, E.y = g.y;
|
|
629
629
|
}
|
|
630
|
-
|
|
630
|
+
s.x = E.x, s.y = E.y, s.placement = E.placement;
|
|
631
631
|
}
|
|
632
|
-
return
|
|
632
|
+
return s;
|
|
633
633
|
}
|
|
634
634
|
}), tt = (t, e, r, o, a) => {
|
|
635
|
-
var d, i,
|
|
635
|
+
var d, i, u;
|
|
636
636
|
let l = 0;
|
|
637
637
|
o.startsWith("right") ? l = -t : o.startsWith("left") && (l = t);
|
|
638
|
-
const
|
|
639
|
-
if (
|
|
640
|
-
const
|
|
641
|
-
o.startsWith("right") ? l -=
|
|
638
|
+
const c = Ce(e, "arrow"), n = Ce(e, "shift");
|
|
639
|
+
if (c) {
|
|
640
|
+
const s = ((d = c.params) == null ? void 0 : d.arrow).getBoundingClientRect();
|
|
641
|
+
o.startsWith("right") ? l -= s.width / 2 : o.startsWith("left") && (l += s.width / 2);
|
|
642
642
|
}
|
|
643
|
-
if (et(e, "shift") &&
|
|
644
|
-
let
|
|
645
|
-
|
|
646
|
-
const p = (
|
|
647
|
-
f = p.getBoundingClientRect().width / 2, f +=
|
|
643
|
+
if (et(e, "shift") && c) {
|
|
644
|
+
let s = null, f = 0;
|
|
645
|
+
n && (s = (i = n.params) == null ? void 0 : i.parent);
|
|
646
|
+
const p = (u = c.params) == null ? void 0 : u.arrow;
|
|
647
|
+
f = p.getBoundingClientRect().width / 2, f += Dt(p), f -= t, o.startsWith("right") ? ce(r - l, a, s, e) <= t ? ce(r, a, s, e) > 0 ? l = t - ce(r, a, s, e) : l = t : ue(r - l - f, a, s, e) <= t && (ue(r - l - f, a, s, e) >= 0 ? (l = -t - (ue(r - l - f, a, s, e) + t), s && (l = -t)) : l = -t) : o.startsWith("left") ? ce(r - l + f, a, s, e) <= t ? (l = t + ce(r - f, a, s, e), l <= t && (l = t)) : ue(r - l, a, s, e) <= t && (l = -t + ue(r, a, s, e), l <= -t && (l = -t)) : ce(r - l, a, s, e) <= t ? ce(r - l, a, s, e) <= t && ce(r, a, s, e) > 0 ? l = t - ce(r, a, s, e) : l = t : ue(r - l, a, s, e) <= t && (ue(r - l, a, s, e) <= t && ue(r, a, s, e) > 0 ? l = -(t - ue(r, a, s, e)) : l = -t);
|
|
648
648
|
}
|
|
649
649
|
return l;
|
|
650
650
|
}, ot = (t, e, r, o, a) => {
|
|
651
|
-
var d, i,
|
|
651
|
+
var d, i, u;
|
|
652
652
|
let l = 0;
|
|
653
653
|
o.startsWith("top") ? l = t : o.startsWith("bottom") && (l = -t);
|
|
654
|
-
const
|
|
655
|
-
if (
|
|
656
|
-
const
|
|
657
|
-
o.startsWith("top") ? l +=
|
|
654
|
+
const c = Ce(e, "arrow"), n = Ce(e, "shift");
|
|
655
|
+
if (c) {
|
|
656
|
+
const s = ((d = c.params) == null ? void 0 : d.arrow).getBoundingClientRect();
|
|
657
|
+
o.startsWith("top") ? l += s.height / 2 : o.startsWith("bottom") && (l -= s.height / 2);
|
|
658
658
|
}
|
|
659
|
-
if (et(e, "shift") &&
|
|
660
|
-
let
|
|
661
|
-
|
|
662
|
-
const p = (
|
|
663
|
-
f = p.getBoundingClientRect().height / 2, f += Wt(p), f -= t, o.startsWith("top") ? de(r - l, a,
|
|
659
|
+
if (et(e, "shift") && c) {
|
|
660
|
+
let s = null, f = 0;
|
|
661
|
+
n && (s = (i = n.params) == null ? void 0 : i.parent);
|
|
662
|
+
const p = (u = c.params) == null ? void 0 : u.arrow;
|
|
663
|
+
f = p.getBoundingClientRect().height / 2, f += Wt(p), f -= t, o.startsWith("top") ? de(r - l, a, s, e) <= t ? de(r, a, s, e) >= 0 ? l = -(t - de(r, a, s, e)) : l = -t : be(r - l + f, a, s, e) <= t && (l = t + be(r - f, a, s, e), l <= t && (l = t)) : o.startsWith("bottom") ? de(r - l - f, a, s, e) <= t ? de(r - l - f, a, s, e) >= 0 ? (l = -t - (de(r - l - f, a, s, e) + t), s && (l = -t)) : l = -t : be(r - l, a, s, e) <= t && (be(r, a, s, e) >= 0 ? l = t - be(r, a, s, e) : l = t) : de(r - l, a, s, e) <= t ? de(r - l, a, s, e) >= 0 ? l = -(t - de(r - l, a, s, e)) : l = -t : be(r - l, a, s, e) <= t && (be(r - l, a, s, e) >= 0 ? l = t - be(r - l, a, s, e) : l = t);
|
|
664
664
|
}
|
|
665
665
|
return l;
|
|
666
|
-
},
|
|
666
|
+
}, Te = (t) => ({
|
|
667
667
|
name: "offset",
|
|
668
668
|
params: { value: t },
|
|
669
669
|
fn: ({
|
|
@@ -673,13 +673,13 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
673
673
|
primaryX: a,
|
|
674
674
|
primaryY: d,
|
|
675
675
|
floating: i,
|
|
676
|
-
placement:
|
|
676
|
+
placement: u
|
|
677
677
|
}) => ({
|
|
678
|
-
x: e - tt(t, o, a,
|
|
679
|
-
y: r - ot(t, o, d,
|
|
680
|
-
placement:
|
|
678
|
+
x: e - tt(t, o, a, u, i),
|
|
679
|
+
y: r - ot(t, o, d, u, i),
|
|
680
|
+
placement: u
|
|
681
681
|
})
|
|
682
|
-
}),
|
|
682
|
+
}), Ot = (t) => ({
|
|
683
683
|
name: "shift",
|
|
684
684
|
params: t,
|
|
685
685
|
fn: ({
|
|
@@ -689,36 +689,36 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
689
689
|
primaryX: a,
|
|
690
690
|
primaryY: d,
|
|
691
691
|
floating: i,
|
|
692
|
-
placement:
|
|
692
|
+
placement: u,
|
|
693
693
|
reference: l
|
|
694
694
|
}) => {
|
|
695
|
-
var
|
|
696
|
-
const
|
|
695
|
+
var c;
|
|
696
|
+
const n = {
|
|
697
697
|
x: e,
|
|
698
698
|
y: r,
|
|
699
|
-
placement:
|
|
700
|
-
},
|
|
701
|
-
let I =
|
|
702
|
-
const E = $ ? Math.abs(
|
|
699
|
+
placement: u
|
|
700
|
+
}, s = o.middleware || [], f = s.findIndex((k) => k.name === "shift"), p = s.findIndex((k) => k.name === "offset"), v = p !== -1 && (f === -1 || p > f), $ = s.find((k) => k.name === "offset"), C = $ ? (c = $.params) == null ? void 0 : c.value : 0, w = v ? tt(C, o, a, u, i) : 0, D = v ? ot(C, o, d, u, i) : 0, T = e - w, H = r - D;
|
|
701
|
+
let I = T, M = H;
|
|
702
|
+
const E = $ ? Math.abs(C) : 0, F = E, g = E;
|
|
703
703
|
if (he(o, i) && typeof window < "u") {
|
|
704
|
-
const
|
|
705
|
-
I <
|
|
706
|
-
const re =
|
|
707
|
-
return
|
|
704
|
+
const k = F, W = window.innerWidth - i.clientWidth - F, A = W < k ? k : W, q = g, te = window.innerHeight - i.clientHeight - g, X = te < q ? q : te;
|
|
705
|
+
I < k ? I = k : I > A && (I = A), M < q ? M = q : M > X && (M = X), v ? (n.x = e + (I - T), n.y = r + (M - H)) : (n.x = I, n.y = M);
|
|
706
|
+
const re = F, ee = window.innerWidth - i.clientWidth - F, ne = g, x = window.innerHeight - i.clientHeight - g, K = v ? re + w : re, N = v ? ee + w : ee, oe = v ? ne + D : ne, m = v ? x + D : x;
|
|
707
|
+
return n.x < K ? n.x = K : n.x > N && (n.x = N), n.y < oe ? n.y = oe : n.y > m && (n.y = m), n;
|
|
708
708
|
}
|
|
709
|
-
const h =
|
|
709
|
+
const h = ge(i);
|
|
710
710
|
if (h !== null) {
|
|
711
|
-
const
|
|
712
|
-
A <= N ? I =
|
|
711
|
+
const k = ie(l, i, o), W = k.left, A = k.left + k.width, q = k.top, te = k.top + k.height, X = h.scrollLeft + F, re = Pe(h) - i.clientWidth - F, ee = re < X ? X : re, ne = h.scrollTop + g, x = Ie(h) - i.clientHeight - g, K = x < ne ? ne : x, N = h.scrollLeft, oe = Pe(h), m = h.scrollTop, z = Ie(h);
|
|
712
|
+
A <= N ? I = X : W >= oe && (I = ee), te <= m ? M = ne : q >= z && (M = K), M < ne ? M = ne : M > K && (M = K), I < X ? I = X : I > ee && (I = ee);
|
|
713
713
|
}
|
|
714
|
-
if (v ? (
|
|
715
|
-
const
|
|
716
|
-
|
|
714
|
+
if (v ? (n.x = e + (I - T), n.y = r + (M - H)) : (n.x = I, n.y = M), h !== null) {
|
|
715
|
+
const k = h.scrollLeft + F, W = Pe(h) - i.clientWidth - F, A = h.scrollTop + g, q = Ie(h) - i.clientHeight - g, te = v ? k + w : k, X = v ? W + w : W, re = v ? A + D : A, ee = v ? q + D : q;
|
|
716
|
+
n.x < te ? n.x = te : n.x > X && (n.x = X), n.y < re ? n.y = re : n.y > ee && (n.y = ee);
|
|
717
717
|
}
|
|
718
|
-
return
|
|
718
|
+
return n;
|
|
719
719
|
}
|
|
720
|
-
}),
|
|
721
|
-
const r =
|
|
720
|
+
}), Dt = (t) => t.getBoundingClientRect().width !== t.clientWidth ? (t.getBoundingClientRect().width - t.clientWidth) / 2 : 0, Wt = (t) => t.getBoundingClientRect().height !== t.clientHeight ? (t.getBoundingClientRect().height - t.clientHeight) / 2 : 0, Le = (t, e) => {
|
|
721
|
+
const r = ge(t), o = [];
|
|
722
722
|
if (r !== null) {
|
|
723
723
|
const a = () => e();
|
|
724
724
|
r.addEventListener("scroll", a, !1), o.push(() => r.removeEventListener("scroll", a, !1));
|
|
@@ -767,14 +767,14 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
767
767
|
y: o.top,
|
|
768
768
|
placement: "right-start"
|
|
769
769
|
};
|
|
770
|
-
},
|
|
770
|
+
}, Yt = (t, e, r = {}) => {
|
|
771
771
|
const o = ie(t, e, r);
|
|
772
772
|
return {
|
|
773
773
|
x: o.left + o.width,
|
|
774
774
|
y: o.top + o.height - e.getBoundingClientRect().height,
|
|
775
775
|
placement: "right-end"
|
|
776
776
|
};
|
|
777
|
-
},
|
|
777
|
+
}, Gt = (t, e, r = {}) => {
|
|
778
778
|
const o = ie(t, e, r);
|
|
779
779
|
return {
|
|
780
780
|
x: o.left + o.width / 2 - e.getBoundingClientRect().width / 2,
|
|
@@ -829,9 +829,9 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
829
829
|
case "right-start":
|
|
830
830
|
return Nt(t, e, o);
|
|
831
831
|
case "right-end":
|
|
832
|
-
return Gt(t, e, o);
|
|
833
|
-
case "bottom":
|
|
834
832
|
return Yt(t, e, o);
|
|
833
|
+
case "bottom":
|
|
834
|
+
return Gt(t, e, o);
|
|
835
835
|
case "bottom-start":
|
|
836
836
|
return jt(t, e, o);
|
|
837
837
|
case "bottom-end":
|
|
@@ -853,20 +853,20 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
853
853
|
if (he(o, e)) {
|
|
854
854
|
if (typeof window > "u")
|
|
855
855
|
return !0;
|
|
856
|
-
const
|
|
857
|
-
return
|
|
856
|
+
const s = t.x, f = t.y, p = s + e.clientWidth, v = f + e.clientHeight;
|
|
857
|
+
return s >= 0 && f >= 0 && p <= window.innerWidth && v <= window.innerHeight;
|
|
858
858
|
}
|
|
859
|
-
if (
|
|
860
|
-
return de(t.y, e, null, o) > 0 && ce(t.x, e, null, o) > 0 &&
|
|
859
|
+
if (ge(r) !== null)
|
|
860
|
+
return de(t.y, e, null, o) > 0 && ce(t.x, e, null, o) > 0 && be(t.y, e, null, o) > 0 && ue(t.x, e, null, o) > 0;
|
|
861
861
|
if (typeof window > "u")
|
|
862
862
|
return !0;
|
|
863
863
|
const a = window.innerWidth, d = window.innerHeight, i = (r instanceof HTMLElement ? r.offsetParent : null) || e.offsetParent;
|
|
864
864
|
if (i) {
|
|
865
|
-
const
|
|
865
|
+
const s = i.getBoundingClientRect(), f = s.left + t.x, p = s.top + t.y, v = f + e.clientWidth, $ = p + e.clientHeight;
|
|
866
866
|
return f >= 0 && p >= 0 && v <= a && $ <= d;
|
|
867
867
|
}
|
|
868
|
-
const
|
|
869
|
-
return
|
|
868
|
+
const u = t.x, l = t.y, c = u + e.clientWidth, n = l + e.clientHeight;
|
|
869
|
+
return u >= 0 && l >= 0 && c <= a && n <= d;
|
|
870
870
|
}, Be = (t) => t.startsWith("right") ? "right" : t.startsWith("left") ? "left" : t.startsWith("top") ? "top" : "bottom", Qt = (t, e, r) => Be(e) === t && r.includes(e) ? e : r.find((o) => Be(o) === t) ?? r[0], eo = (t, e, r = {}) => {
|
|
871
871
|
if (typeof window > "u")
|
|
872
872
|
return {
|
|
@@ -875,7 +875,7 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
875
875
|
bottom: 0,
|
|
876
876
|
left: 0
|
|
877
877
|
};
|
|
878
|
-
const o = he(r, e) ? null :
|
|
878
|
+
const o = he(r, e) ? null : ge(t), a = t.getBoundingClientRect(), d = o ? o.getBoundingClientRect() : {
|
|
879
879
|
top: 0,
|
|
880
880
|
left: 0,
|
|
881
881
|
right: window.innerWidth,
|
|
@@ -889,37 +889,37 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
889
889
|
};
|
|
890
890
|
}, Re = (t, e, r = {}) => new Promise((o) => {
|
|
891
891
|
var a, d;
|
|
892
|
-
const i = r.placement ? r.placement : "bottom",
|
|
892
|
+
const i = r.placement ? r.placement : "bottom", u = {
|
|
893
893
|
x: 0,
|
|
894
894
|
y: 0,
|
|
895
895
|
placement: i,
|
|
896
896
|
middlewareData: {}
|
|
897
897
|
}, l = Me(t, e, i, r);
|
|
898
|
-
|
|
899
|
-
const
|
|
898
|
+
u.x = l.x, u.y = l.y, u.placement = l.placement;
|
|
899
|
+
const c = u.x, n = u.y, s = Mt(t);
|
|
900
900
|
(a = r.middleware) == null || a.forEach(($) => {
|
|
901
|
-
const
|
|
902
|
-
x:
|
|
903
|
-
y:
|
|
901
|
+
const C = $.fn({
|
|
902
|
+
x: u.x,
|
|
903
|
+
y: u.y,
|
|
904
904
|
options: r,
|
|
905
|
-
primaryX:
|
|
906
|
-
primaryY:
|
|
905
|
+
primaryX: c,
|
|
906
|
+
primaryY: n,
|
|
907
907
|
floating: e,
|
|
908
|
-
placement:
|
|
908
|
+
placement: u.placement,
|
|
909
909
|
reference: t,
|
|
910
|
-
scrollDirection:
|
|
910
|
+
scrollDirection: s
|
|
911
911
|
});
|
|
912
|
-
|
|
912
|
+
u.x = C.x, u.y = C.y, u.placement = C.placement, $.name === "arrow" && (C.baseX = C.x, C.baseY = C.y, C.x = C.arrowX ?? C.x, C.y = C.arrowY ?? C.y), u.middlewareData[$.name] = C;
|
|
913
913
|
});
|
|
914
|
-
const f = Me(t, e,
|
|
915
|
-
if (Number.isFinite(
|
|
914
|
+
const f = Me(t, e, u.placement, r), p = Ce(r, "offset"), v = p ? (d = p.params) == null ? void 0 : d.value : 0;
|
|
915
|
+
if (Number.isFinite(u.x) || (u.x = f.x), !Number.isFinite(u.y))
|
|
916
916
|
if (he(r, e)) {
|
|
917
|
-
const $ = t.getBoundingClientRect(),
|
|
918
|
-
|
|
917
|
+
const $ = t.getBoundingClientRect(), C = e.getBoundingClientRect().height;
|
|
918
|
+
u.placement.startsWith("top") ? u.y = $.top - C - v : u.placement.startsWith("bottom") ? u.y = $.bottom + v : u.y = f.y;
|
|
919
919
|
} else
|
|
920
|
-
|
|
921
|
-
o(
|
|
922
|
-
}), to = ["disabled", "aria-expanded", "onKeydown"], oo = ["data-placement"], ao = ["disabled", "aria-selected", "onClick"],
|
|
920
|
+
u.y = f.y;
|
|
921
|
+
o(u);
|
|
922
|
+
}), to = ["disabled", "aria-expanded", "onKeydown"], oo = ["data-placement"], ao = ["disabled", "aria-selected", "onClick"], Vr = /* @__PURE__ */ Y({
|
|
923
923
|
__name: "select",
|
|
924
924
|
props: {
|
|
925
925
|
modelValue: { default: void 0 },
|
|
@@ -934,7 +934,7 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
934
934
|
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
935
935
|
setup(t, { emit: e }) {
|
|
936
936
|
let r = 0;
|
|
937
|
-
const o = e, a = t, d = O(null), i = O(null),
|
|
937
|
+
const o = e, a = t, d = O(null), i = O(null), u = O(null), l = O(!1), c = O("bottom"), n = O("bottom"), s = `vf-select-panel-${++r}`;
|
|
938
938
|
let f = null;
|
|
939
939
|
const p = y(() => a.options.map((h) => ({
|
|
940
940
|
label: h[a.optionLabel],
|
|
@@ -943,41 +943,41 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
943
943
|
}))), v = y(() => p.value.find((h) => h.value === a.modelValue)), $ = y(() => {
|
|
944
944
|
var h;
|
|
945
945
|
return ((h = v.value) == null ? void 0 : h.label) ?? "";
|
|
946
|
-
}),
|
|
946
|
+
}), C = y(() => {
|
|
947
947
|
const h = ["vf-select", `vf-select_${a.variant}`, l.value ? "vf-select_open" : ""];
|
|
948
948
|
return a.size !== "normal" && h.push(`vf-select_${a.size}`), a.disabled && h.push("vf-select_disabled"), h.filter(Boolean);
|
|
949
949
|
}), w = (h) => h.value === a.modelValue, D = (h) => {
|
|
950
950
|
h.disabled || (o("update:modelValue", h.value), o("change", h.value), I());
|
|
951
|
-
},
|
|
952
|
-
l.value = !1,
|
|
951
|
+
}, T = (h) => o("focus", h), H = (h) => o("blur", h), I = () => {
|
|
952
|
+
l.value = !1, c.value = "bottom", n.value = "bottom";
|
|
953
953
|
}, M = () => {
|
|
954
|
-
a.disabled || (l.value = !l.value, l.value && (
|
|
954
|
+
a.disabled || (l.value = !l.value, l.value && (c.value = "bottom", n.value = "bottom"));
|
|
955
955
|
}, E = async () => {
|
|
956
|
-
var h,
|
|
957
|
-
l.value || (l.value = !0, await
|
|
958
|
-
},
|
|
956
|
+
var h, k;
|
|
957
|
+
l.value || (l.value = !0, await ke()), (k = (h = u.value) == null ? void 0 : h.querySelector(".vf-select__option:not(.is-disabled)")) == null || k.focus();
|
|
958
|
+
}, F = (h) => {
|
|
959
959
|
var W;
|
|
960
960
|
if (!l.value || !d.value)
|
|
961
961
|
return;
|
|
962
|
-
const
|
|
963
|
-
d.value.contains(
|
|
964
|
-
},
|
|
965
|
-
if (!i.value || !
|
|
962
|
+
const k = h.target;
|
|
963
|
+
d.value.contains(k) || (W = u.value) != null && W.contains(k) || I();
|
|
964
|
+
}, g = () => {
|
|
965
|
+
if (!i.value || !u.value)
|
|
966
966
|
return;
|
|
967
|
-
const h = i.value,
|
|
967
|
+
const h = i.value, k = u.value, W = async () => {
|
|
968
968
|
const {
|
|
969
|
-
x:
|
|
969
|
+
x: X,
|
|
970
970
|
y: re,
|
|
971
|
-
placement:
|
|
972
|
-
} = await Re(h,
|
|
973
|
-
placement:
|
|
971
|
+
placement: ee
|
|
972
|
+
} = await Re(h, k, {
|
|
973
|
+
placement: c.value,
|
|
974
974
|
strategy: "fixed",
|
|
975
|
-
middleware: [
|
|
975
|
+
middleware: [Te(2), Ve({ placements: ["bottom", "top"] })]
|
|
976
976
|
});
|
|
977
|
-
|
|
977
|
+
n.value = ee ?? c.value, k.style.minWidth = `${h.getBoundingClientRect().width}px`, k.style.left = `${X}px`, k.style.top = `${re}px`;
|
|
978
978
|
}, A = async () => {
|
|
979
979
|
await W();
|
|
980
|
-
}, q =
|
|
980
|
+
}, q = Le(h, () => {
|
|
981
981
|
A();
|
|
982
982
|
}), te = () => {
|
|
983
983
|
A();
|
|
@@ -989,26 +989,26 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
989
989
|
}
|
|
990
990
|
}, f.update();
|
|
991
991
|
};
|
|
992
|
-
return
|
|
992
|
+
return Q(l, async (h) => {
|
|
993
993
|
if (!h) {
|
|
994
994
|
f && (f.destroy(), f = null);
|
|
995
995
|
return;
|
|
996
996
|
}
|
|
997
|
-
await
|
|
998
|
-
}),
|
|
997
|
+
await ke(), f || g(), f == null || f.update();
|
|
998
|
+
}), Q(
|
|
999
999
|
() => a.options,
|
|
1000
1000
|
() => {
|
|
1001
1001
|
f == null || f.update();
|
|
1002
1002
|
},
|
|
1003
1003
|
{ deep: !0 }
|
|
1004
|
-
),
|
|
1005
|
-
document.addEventListener("click",
|
|
1004
|
+
), Fe(() => {
|
|
1005
|
+
document.addEventListener("click", F);
|
|
1006
1006
|
}), $e(() => {
|
|
1007
|
-
document.removeEventListener("click",
|
|
1008
|
-
}), (h,
|
|
1007
|
+
document.removeEventListener("click", F), f == null || f.destroy(), f = null;
|
|
1008
|
+
}), (h, k) => (b(), _("div", {
|
|
1009
1009
|
ref_key: "root",
|
|
1010
1010
|
ref: d,
|
|
1011
|
-
class:
|
|
1011
|
+
class: L(C.value)
|
|
1012
1012
|
}, [
|
|
1013
1013
|
B("button", {
|
|
1014
1014
|
ref_key: "trigger",
|
|
@@ -1017,7 +1017,7 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
1017
1017
|
type: "button",
|
|
1018
1018
|
disabled: h.disabled,
|
|
1019
1019
|
"aria-expanded": l.value,
|
|
1020
|
-
"aria-controls":
|
|
1020
|
+
"aria-controls": s,
|
|
1021
1021
|
"aria-haspopup": "listbox",
|
|
1022
1022
|
onClick: M,
|
|
1023
1023
|
onKeydown: [
|
|
@@ -1025,29 +1025,29 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
1025
1025
|
Z(U(M, ["prevent"]), ["enter"]),
|
|
1026
1026
|
Z(U(I, ["prevent"]), ["esc"])
|
|
1027
1027
|
],
|
|
1028
|
-
onFocus:
|
|
1028
|
+
onFocus: T,
|
|
1029
1029
|
onBlur: H
|
|
1030
1030
|
}, [
|
|
1031
1031
|
B("span", {
|
|
1032
|
-
class:
|
|
1032
|
+
class: L(["vf-select__label", { "vf-select__label_placeholder": !$.value }])
|
|
1033
1033
|
}, R($.value || h.placeholder), 3),
|
|
1034
|
-
|
|
1034
|
+
k[0] || (k[0] = B("span", {
|
|
1035
1035
|
class: "vf-select__chevron",
|
|
1036
1036
|
"aria-hidden": "true"
|
|
1037
1037
|
}, "▾", -1))
|
|
1038
1038
|
], 40, to),
|
|
1039
|
-
(
|
|
1039
|
+
(b(), se(we, { to: "body" }, [
|
|
1040
1040
|
fe(B("div", {
|
|
1041
|
-
id:
|
|
1041
|
+
id: s,
|
|
1042
1042
|
ref_key: "panel",
|
|
1043
|
-
ref:
|
|
1043
|
+
ref: u,
|
|
1044
1044
|
class: "vf-select__panel",
|
|
1045
1045
|
role: "listbox",
|
|
1046
|
-
"data-placement":
|
|
1046
|
+
"data-placement": n.value
|
|
1047
1047
|
}, [
|
|
1048
|
-
(
|
|
1048
|
+
(b(!0), _(ae, null, ve(p.value, (W) => (b(), _("button", {
|
|
1049
1049
|
key: W.value,
|
|
1050
|
-
class:
|
|
1050
|
+
class: L(["vf-select__option", { "is-active": w(W), "is-disabled": W.disabled }]),
|
|
1051
1051
|
type: "button",
|
|
1052
1052
|
role: "option",
|
|
1053
1053
|
disabled: W.disabled,
|
|
@@ -1060,13 +1060,13 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
1060
1060
|
]))
|
|
1061
1061
|
], 2));
|
|
1062
1062
|
}
|
|
1063
|
-
}), ro = ["value", "placeholder", "disabled", "readonly", "aria-expanded", "aria-activedescendant", "onKeydown"], lo = ["disabled"],
|
|
1063
|
+
}), ro = ["value", "placeholder", "disabled", "readonly", "aria-expanded", "aria-activedescendant", "onKeydown"], lo = ["disabled"], so = ["data-placement"], no = {
|
|
1064
1064
|
key: 0,
|
|
1065
1065
|
class: "vf-autocomplete__loading"
|
|
1066
1066
|
}, io = ["id", "disabled", "aria-selected", "onClick"], co = {
|
|
1067
1067
|
key: 2,
|
|
1068
1068
|
class: "vf-autocomplete__empty"
|
|
1069
|
-
},
|
|
1069
|
+
}, Tr = /* @__PURE__ */ Y({
|
|
1070
1070
|
__name: "autocomplete",
|
|
1071
1071
|
props: {
|
|
1072
1072
|
modelValue: { default: void 0 },
|
|
@@ -1086,98 +1086,98 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
1086
1086
|
emits: ["update:modelValue", "change", "focus", "blur", "search"],
|
|
1087
1087
|
setup(t, { emit: e }) {
|
|
1088
1088
|
let r = 0;
|
|
1089
|
-
const o = e, a = t, d = O(null), i = O(null),
|
|
1089
|
+
const o = e, a = t, d = O(null), i = O(null), u = O(null), l = O(!1), c = O(""), n = O(-1), s = O("bottom"), f = O("bottom"), p = `vf-autocomplete-panel-${++r}`;
|
|
1090
1090
|
let v = null;
|
|
1091
1091
|
const $ = y(() => a.options.map((x) => ({
|
|
1092
1092
|
label: x[a.optionLabel],
|
|
1093
1093
|
value: x[a.optionValue],
|
|
1094
1094
|
disabled: x.disabled
|
|
1095
|
-
}))),
|
|
1095
|
+
}))), C = y(() => $.value.find((x) => x.value === a.modelValue)), w = y(() => {
|
|
1096
1096
|
if (!a.filter)
|
|
1097
1097
|
return $.value;
|
|
1098
|
-
const x =
|
|
1098
|
+
const x = c.value.trim().toLowerCase();
|
|
1099
1099
|
return x ? $.value.filter((K) => K.label.toLowerCase().includes(x)) : $.value;
|
|
1100
1100
|
}), D = y(() => {
|
|
1101
|
-
if (!(!l.value ||
|
|
1102
|
-
return H(
|
|
1103
|
-
}),
|
|
1101
|
+
if (!(!l.value || n.value < 0))
|
|
1102
|
+
return H(n.value);
|
|
1103
|
+
}), T = y(() => {
|
|
1104
1104
|
const x = ["vf-autocomplete", `vf-autocomplete_${a.variant}`, l.value ? "vf-autocomplete_open" : ""];
|
|
1105
1105
|
return a.size !== "normal" && x.push(`vf-autocomplete_${a.size}`), a.disabled && x.push("vf-autocomplete_disabled"), x.filter(Boolean);
|
|
1106
1106
|
}), H = (x) => `${p}-option-${x}`, I = (x) => x.value === a.modelValue, M = () => w.value.findIndex((x) => !x.disabled), E = (x) => {
|
|
1107
1107
|
const K = w.value;
|
|
1108
1108
|
if (!K.length) {
|
|
1109
|
-
|
|
1109
|
+
n.value = -1;
|
|
1110
1110
|
return;
|
|
1111
1111
|
}
|
|
1112
|
-
let N =
|
|
1112
|
+
let N = n.value;
|
|
1113
1113
|
(N < 0 || N >= K.length) && (N = x > 0 ? -1 : K.length);
|
|
1114
1114
|
for (let oe = 0; oe < K.length; oe += 1)
|
|
1115
1115
|
if (N = (N + x + K.length) % K.length, !K[N].disabled) {
|
|
1116
|
-
|
|
1116
|
+
n.value = N;
|
|
1117
1117
|
return;
|
|
1118
1118
|
}
|
|
1119
|
-
|
|
1120
|
-
},
|
|
1121
|
-
a.disabled || (l.value = !0,
|
|
1122
|
-
},
|
|
1123
|
-
l.value = !1,
|
|
1119
|
+
n.value = -1;
|
|
1120
|
+
}, F = () => {
|
|
1121
|
+
a.disabled || (l.value = !0, s.value = "bottom", f.value = "bottom", n.value < 0 && (n.value = M()));
|
|
1122
|
+
}, g = () => {
|
|
1123
|
+
l.value = !1, n.value = -1, s.value = "bottom", f.value = "bottom";
|
|
1124
1124
|
}, h = () => {
|
|
1125
1125
|
if (l.value) {
|
|
1126
|
-
|
|
1126
|
+
g();
|
|
1127
1127
|
return;
|
|
1128
1128
|
}
|
|
1129
|
-
|
|
1130
|
-
},
|
|
1131
|
-
x.disabled || (
|
|
1129
|
+
F();
|
|
1130
|
+
}, k = (x) => {
|
|
1131
|
+
x.disabled || (c.value = x.label, o("update:modelValue", x.value), o("change", x.value), g());
|
|
1132
1132
|
}, W = (x) => {
|
|
1133
1133
|
const K = x.target;
|
|
1134
|
-
|
|
1134
|
+
c.value = K.value, o("search", K.value), F(), n.value = M();
|
|
1135
1135
|
}, A = (x) => {
|
|
1136
|
-
o("focus", x),
|
|
1136
|
+
o("focus", x), F();
|
|
1137
1137
|
}, q = (x) => {
|
|
1138
1138
|
o("blur", x);
|
|
1139
1139
|
}, te = () => {
|
|
1140
1140
|
if (!l.value) {
|
|
1141
|
-
|
|
1141
|
+
F();
|
|
1142
1142
|
return;
|
|
1143
1143
|
}
|
|
1144
1144
|
E(1);
|
|
1145
|
-
},
|
|
1145
|
+
}, X = () => {
|
|
1146
1146
|
if (!l.value) {
|
|
1147
|
-
|
|
1147
|
+
F();
|
|
1148
1148
|
return;
|
|
1149
1149
|
}
|
|
1150
1150
|
E(-1);
|
|
1151
1151
|
}, re = () => {
|
|
1152
1152
|
if (!l.value) {
|
|
1153
|
-
|
|
1153
|
+
F();
|
|
1154
1154
|
return;
|
|
1155
1155
|
}
|
|
1156
|
-
const x = w.value[
|
|
1157
|
-
x && !x.disabled &&
|
|
1158
|
-
},
|
|
1156
|
+
const x = w.value[n.value];
|
|
1157
|
+
x && !x.disabled && k(x);
|
|
1158
|
+
}, ee = (x) => {
|
|
1159
1159
|
var N;
|
|
1160
1160
|
if (!l.value || !d.value)
|
|
1161
1161
|
return;
|
|
1162
1162
|
const K = x.target;
|
|
1163
|
-
d.value.contains(K) || (N =
|
|
1164
|
-
},
|
|
1165
|
-
if (!i.value || !
|
|
1163
|
+
d.value.contains(K) || (N = u.value) != null && N.contains(K) || g();
|
|
1164
|
+
}, ne = () => {
|
|
1165
|
+
if (!i.value || !u.value)
|
|
1166
1166
|
return;
|
|
1167
|
-
const x = i.value, K =
|
|
1167
|
+
const x = i.value, K = u.value, N = async () => {
|
|
1168
1168
|
const {
|
|
1169
1169
|
x: V,
|
|
1170
|
-
y:
|
|
1170
|
+
y: G,
|
|
1171
1171
|
placement: le
|
|
1172
1172
|
} = await Re(x, K, {
|
|
1173
|
-
placement:
|
|
1173
|
+
placement: s.value,
|
|
1174
1174
|
strategy: "fixed",
|
|
1175
|
-
middleware: [
|
|
1175
|
+
middleware: [Te(2), Ve({ placements: ["bottom", "top"] })]
|
|
1176
1176
|
});
|
|
1177
|
-
f.value = le ??
|
|
1177
|
+
f.value = le ?? s.value, K.style.minWidth = `${x.getBoundingClientRect().width}px`, K.style.left = `${V}px`, K.style.top = `${G}px`;
|
|
1178
1178
|
}, oe = async () => {
|
|
1179
1179
|
await N();
|
|
1180
|
-
},
|
|
1180
|
+
}, m = Le(x, () => {
|
|
1181
1181
|
oe();
|
|
1182
1182
|
}), z = () => {
|
|
1183
1183
|
oe();
|
|
@@ -1185,40 +1185,40 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
1185
1185
|
document.addEventListener("scroll", z, !0), window.addEventListener("resize", z, !1), v = {
|
|
1186
1186
|
update: oe,
|
|
1187
1187
|
destroy: () => {
|
|
1188
|
-
|
|
1188
|
+
m(), document.removeEventListener("scroll", z, !0), window.removeEventListener("resize", z, !1);
|
|
1189
1189
|
}
|
|
1190
1190
|
}, v.update();
|
|
1191
1191
|
};
|
|
1192
|
-
return
|
|
1192
|
+
return Q(
|
|
1193
1193
|
() => a.modelValue,
|
|
1194
1194
|
() => {
|
|
1195
1195
|
var x;
|
|
1196
|
-
|
|
1196
|
+
c.value = ((x = C.value) == null ? void 0 : x.label) ?? "";
|
|
1197
1197
|
},
|
|
1198
1198
|
{ immediate: !0 }
|
|
1199
|
-
),
|
|
1199
|
+
), Q(
|
|
1200
1200
|
() => a.options,
|
|
1201
1201
|
() => {
|
|
1202
1202
|
var x;
|
|
1203
|
-
l.value || (
|
|
1203
|
+
l.value || (c.value = ((x = C.value) == null ? void 0 : x.label) ?? ""), v == null || v.update();
|
|
1204
1204
|
},
|
|
1205
1205
|
{ deep: !0 }
|
|
1206
|
-
),
|
|
1207
|
-
|
|
1208
|
-
}),
|
|
1206
|
+
), Q(w, () => {
|
|
1207
|
+
n.value >= w.value.length && (n.value = M());
|
|
1208
|
+
}), Q(l, async (x) => {
|
|
1209
1209
|
if (!x) {
|
|
1210
1210
|
v && (v.destroy(), v = null);
|
|
1211
1211
|
return;
|
|
1212
1212
|
}
|
|
1213
|
-
await
|
|
1214
|
-
}),
|
|
1215
|
-
document.addEventListener("click",
|
|
1213
|
+
await ke(), v || ne(), v == null || v.update();
|
|
1214
|
+
}), Fe(() => {
|
|
1215
|
+
document.addEventListener("click", ee);
|
|
1216
1216
|
}), $e(() => {
|
|
1217
|
-
document.removeEventListener("click",
|
|
1218
|
-
}), (x, K) => (
|
|
1217
|
+
document.removeEventListener("click", ee), v == null || v.destroy(), v = null;
|
|
1218
|
+
}), (x, K) => (b(), _("div", {
|
|
1219
1219
|
ref_key: "root",
|
|
1220
1220
|
ref: d,
|
|
1221
|
-
class: T
|
|
1221
|
+
class: L(T.value)
|
|
1222
1222
|
}, [
|
|
1223
1223
|
B("input", {
|
|
1224
1224
|
ref_key: "control",
|
|
@@ -1226,7 +1226,7 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
1226
1226
|
class: "vf-autocomplete__control",
|
|
1227
1227
|
type: "text",
|
|
1228
1228
|
role: "combobox",
|
|
1229
|
-
value:
|
|
1229
|
+
value: c.value,
|
|
1230
1230
|
placeholder: x.placeholder,
|
|
1231
1231
|
disabled: x.disabled,
|
|
1232
1232
|
readonly: x.readonly,
|
|
@@ -1237,13 +1237,13 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
1237
1237
|
onInput: W,
|
|
1238
1238
|
onFocus: A,
|
|
1239
1239
|
onBlur: q,
|
|
1240
|
-
onClick:
|
|
1240
|
+
onClick: F,
|
|
1241
1241
|
onKeydown: [
|
|
1242
1242
|
Z(U(te, ["prevent"]), ["down"]),
|
|
1243
|
-
Z(U(
|
|
1243
|
+
Z(U(X, ["prevent"]), ["up"]),
|
|
1244
1244
|
Z(U(re, ["prevent"]), ["enter"]),
|
|
1245
|
-
Z(U(
|
|
1246
|
-
Z(
|
|
1245
|
+
Z(U(g, ["prevent"]), ["esc"]),
|
|
1246
|
+
Z(g, ["tab"])
|
|
1247
1247
|
]
|
|
1248
1248
|
}, null, 40, ro),
|
|
1249
1249
|
B("button", {
|
|
@@ -1256,22 +1256,22 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
1256
1256
|
}, ["prevent"])),
|
|
1257
1257
|
onClick: h
|
|
1258
1258
|
}, " ▾ ", 40, lo),
|
|
1259
|
-
(
|
|
1259
|
+
(b(), se(we, { to: "body" }, [
|
|
1260
1260
|
fe(B("div", {
|
|
1261
1261
|
id: p,
|
|
1262
1262
|
ref_key: "panel",
|
|
1263
|
-
ref:
|
|
1263
|
+
ref: u,
|
|
1264
1264
|
class: "vf-autocomplete__panel",
|
|
1265
1265
|
role: "listbox",
|
|
1266
1266
|
"data-placement": f.value
|
|
1267
1267
|
}, [
|
|
1268
|
-
x.loading ? (
|
|
1268
|
+
x.loading ? (b(), _("div", no, R(x.loadingText), 1)) : w.value.length > 0 ? (b(!0), _(ae, { key: 1 }, ve(w.value, (N, oe) => (b(), _("button", {
|
|
1269
1269
|
id: H(oe),
|
|
1270
1270
|
key: N.value,
|
|
1271
|
-
class:
|
|
1271
|
+
class: L(["vf-autocomplete__option", {
|
|
1272
1272
|
"is-active": I(N),
|
|
1273
1273
|
"is-disabled": N.disabled,
|
|
1274
|
-
"is-highlighted": oe ===
|
|
1274
|
+
"is-highlighted": oe === n.value
|
|
1275
1275
|
}]),
|
|
1276
1276
|
type: "button",
|
|
1277
1277
|
role: "option",
|
|
@@ -1279,9 +1279,9 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
1279
1279
|
"aria-selected": I(N),
|
|
1280
1280
|
onMousedown: K[1] || (K[1] = U(() => {
|
|
1281
1281
|
}, ["prevent"])),
|
|
1282
|
-
onClick: (
|
|
1283
|
-
}, R(N.label), 43, io))), 128)) : (
|
|
1284
|
-
], 8,
|
|
1282
|
+
onClick: (m) => k(N)
|
|
1283
|
+
}, R(N.label), 43, io))), 128)) : (b(), _("div", co, R(x.emptyText), 1))
|
|
1284
|
+
], 8, so), [
|
|
1285
1285
|
[pe, l.value]
|
|
1286
1286
|
])
|
|
1287
1287
|
]))
|
|
@@ -1290,17 +1290,17 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
1290
1290
|
}), uo = ["disabled", "aria-expanded", "onKeydown"], vo = ["data-placement"], fo = {
|
|
1291
1291
|
key: 0,
|
|
1292
1292
|
class: "vf-multiselect__search"
|
|
1293
|
-
}, po = ["value", "placeholder", "onKeydown"],
|
|
1293
|
+
}, po = ["value", "placeholder", "onKeydown"], go = {
|
|
1294
1294
|
key: 1,
|
|
1295
1295
|
class: "vf-multiselect__loading"
|
|
1296
|
-
},
|
|
1296
|
+
}, bo = ["id", "disabled", "aria-selected", "onClick"], mo = { class: "vf-multiselect__option-label" }, ho = {
|
|
1297
1297
|
key: 0,
|
|
1298
1298
|
class: "vf-multiselect__option-check",
|
|
1299
1299
|
"aria-hidden": "true"
|
|
1300
1300
|
}, yo = {
|
|
1301
1301
|
key: 3,
|
|
1302
1302
|
class: "vf-multiselect__empty"
|
|
1303
|
-
},
|
|
1303
|
+
}, Lr = /* @__PURE__ */ Y({
|
|
1304
1304
|
__name: "multi-select",
|
|
1305
1305
|
props: {
|
|
1306
1306
|
modelValue: { default: () => [] },
|
|
@@ -1322,227 +1322,227 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
1322
1322
|
emits: ["update:modelValue", "change", "search", "focus", "blur"],
|
|
1323
1323
|
setup(t, { emit: e }) {
|
|
1324
1324
|
let r = 0;
|
|
1325
|
-
const o = e, a = t, d = O(null), i = O(null),
|
|
1325
|
+
const o = e, a = t, d = O(null), i = O(null), u = O(null), l = O(null), c = O(!1), n = O(""), s = O(-1), f = O("bottom"), p = O("bottom"), v = `vf-multiselect-panel-${++r}`;
|
|
1326
1326
|
let $ = null;
|
|
1327
|
-
const
|
|
1328
|
-
label:
|
|
1329
|
-
value:
|
|
1330
|
-
disabled:
|
|
1327
|
+
const C = y(() => a.options.map((m) => ({
|
|
1328
|
+
label: m[a.optionLabel],
|
|
1329
|
+
value: m[a.optionValue],
|
|
1330
|
+
disabled: m.disabled
|
|
1331
1331
|
}))), w = y(() => Array.isArray(a.modelValue) ? a.modelValue : []), D = y(() => {
|
|
1332
1332
|
if (!a.filter)
|
|
1333
|
-
return
|
|
1334
|
-
const
|
|
1335
|
-
return
|
|
1336
|
-
}),
|
|
1337
|
-
const
|
|
1338
|
-
return a.size !== "normal" &&
|
|
1339
|
-
}), M = (
|
|
1340
|
-
o("update:modelValue",
|
|
1341
|
-
}, h = (
|
|
1342
|
-
if (!(
|
|
1343
|
-
if (
|
|
1344
|
-
|
|
1333
|
+
return C.value;
|
|
1334
|
+
const m = n.value.trim().toLowerCase();
|
|
1335
|
+
return m ? C.value.filter((z) => z.label.toLowerCase().includes(m)) : C.value;
|
|
1336
|
+
}), T = y(() => C.value.filter((m) => w.value.includes(m.value))), H = y(() => T.value.length === 0 ? a.placeholder : T.value.map((m) => m.label).join(", ")), I = y(() => {
|
|
1337
|
+
const m = ["vf-multiselect", `vf-multiselect_${a.variant}`, c.value ? "vf-multiselect_open" : ""];
|
|
1338
|
+
return a.size !== "normal" && m.push(`vf-multiselect_${a.size}`), a.disabled && m.push("vf-multiselect_disabled"), m.filter(Boolean);
|
|
1339
|
+
}), M = (m) => `${v}-option-${m}`, E = () => D.value.findIndex((m) => !m.disabled), F = (m) => w.value.includes(m.value), g = (m) => {
|
|
1340
|
+
o("update:modelValue", m), o("change", m);
|
|
1341
|
+
}, h = (m) => {
|
|
1342
|
+
if (!(m.disabled || a.readonly)) {
|
|
1343
|
+
if (F(m)) {
|
|
1344
|
+
g(w.value.filter((z) => z !== m.value));
|
|
1345
1345
|
return;
|
|
1346
1346
|
}
|
|
1347
|
-
|
|
1347
|
+
g([...w.value, m.value]);
|
|
1348
1348
|
}
|
|
1349
|
-
},
|
|
1350
|
-
a.readonly ||
|
|
1351
|
-
}, W = (
|
|
1349
|
+
}, k = () => {
|
|
1350
|
+
a.readonly || g([]);
|
|
1351
|
+
}, W = (m) => {
|
|
1352
1352
|
const z = D.value;
|
|
1353
1353
|
if (!z.length) {
|
|
1354
|
-
|
|
1354
|
+
s.value = -1;
|
|
1355
1355
|
return;
|
|
1356
1356
|
}
|
|
1357
|
-
let V =
|
|
1358
|
-
(V < 0 || V >= z.length) && (V =
|
|
1359
|
-
for (let
|
|
1360
|
-
if (V = (V +
|
|
1361
|
-
|
|
1357
|
+
let V = s.value;
|
|
1358
|
+
(V < 0 || V >= z.length) && (V = m > 0 ? -1 : z.length);
|
|
1359
|
+
for (let G = 0; G < z.length; G += 1)
|
|
1360
|
+
if (V = (V + m + z.length) % z.length, !z[V].disabled) {
|
|
1361
|
+
s.value = V;
|
|
1362
1362
|
return;
|
|
1363
1363
|
}
|
|
1364
|
-
|
|
1364
|
+
s.value = -1;
|
|
1365
1365
|
}, A = async () => {
|
|
1366
|
-
var
|
|
1367
|
-
a.disabled || (
|
|
1366
|
+
var m;
|
|
1367
|
+
a.disabled || (c.value = !0, f.value = "bottom", p.value = "bottom", s.value < 0 && (s.value = E()), a.filter && (await ke(), (m = l.value) == null || m.focus()));
|
|
1368
1368
|
}, q = () => {
|
|
1369
|
-
|
|
1369
|
+
c.value = !1, s.value = -1, f.value = "bottom", p.value = "bottom", n.value = "";
|
|
1370
1370
|
}, te = () => {
|
|
1371
|
-
if (
|
|
1371
|
+
if (c.value) {
|
|
1372
1372
|
q();
|
|
1373
1373
|
return;
|
|
1374
1374
|
}
|
|
1375
1375
|
A();
|
|
1376
|
-
},
|
|
1377
|
-
if (!
|
|
1376
|
+
}, X = () => {
|
|
1377
|
+
if (!c.value) {
|
|
1378
1378
|
A();
|
|
1379
1379
|
return;
|
|
1380
1380
|
}
|
|
1381
1381
|
W(1);
|
|
1382
1382
|
}, re = () => {
|
|
1383
|
-
if (!
|
|
1383
|
+
if (!c.value) {
|
|
1384
1384
|
A();
|
|
1385
1385
|
return;
|
|
1386
1386
|
}
|
|
1387
1387
|
W(-1);
|
|
1388
|
-
},
|
|
1389
|
-
if (!
|
|
1388
|
+
}, ee = () => {
|
|
1389
|
+
if (!c.value) {
|
|
1390
1390
|
A();
|
|
1391
1391
|
return;
|
|
1392
1392
|
}
|
|
1393
|
-
const
|
|
1394
|
-
|
|
1395
|
-
},
|
|
1396
|
-
const z =
|
|
1397
|
-
|
|
1398
|
-
}, x = (
|
|
1393
|
+
const m = D.value[s.value];
|
|
1394
|
+
m && !m.disabled && h(m);
|
|
1395
|
+
}, ne = (m) => {
|
|
1396
|
+
const z = m.target;
|
|
1397
|
+
n.value = z.value, o("search", z.value), s.value = E();
|
|
1398
|
+
}, x = (m) => o("focus", m), K = (m) => o("blur", m), N = (m) => {
|
|
1399
1399
|
var V;
|
|
1400
|
-
if (!
|
|
1400
|
+
if (!c.value || !d.value)
|
|
1401
1401
|
return;
|
|
1402
|
-
const z =
|
|
1403
|
-
d.value.contains(z) || (V =
|
|
1402
|
+
const z = m.target;
|
|
1403
|
+
d.value.contains(z) || (V = u.value) != null && V.contains(z) || q();
|
|
1404
1404
|
}, oe = () => {
|
|
1405
|
-
if (!i.value || !
|
|
1405
|
+
if (!i.value || !u.value)
|
|
1406
1406
|
return;
|
|
1407
|
-
const
|
|
1407
|
+
const m = i.value, z = u.value, V = async () => {
|
|
1408
1408
|
const {
|
|
1409
1409
|
x: ye,
|
|
1410
1410
|
y: We,
|
|
1411
1411
|
placement: Ae
|
|
1412
|
-
} = await Re(
|
|
1412
|
+
} = await Re(m, z, {
|
|
1413
1413
|
placement: f.value,
|
|
1414
1414
|
strategy: "fixed",
|
|
1415
|
-
middleware: [
|
|
1415
|
+
middleware: [Te(2), Ve({ placements: ["bottom", "top"] })]
|
|
1416
1416
|
});
|
|
1417
|
-
p.value = Ae ?? f.value, z.style.minWidth = `${
|
|
1418
|
-
},
|
|
1417
|
+
p.value = Ae ?? f.value, z.style.minWidth = `${m.getBoundingClientRect().width}px`, z.style.left = `${ye}px`, z.style.top = `${We}px`;
|
|
1418
|
+
}, G = async () => {
|
|
1419
1419
|
await V();
|
|
1420
|
-
}, le =
|
|
1421
|
-
|
|
1420
|
+
}, le = Le(m, () => {
|
|
1421
|
+
G();
|
|
1422
1422
|
}), J = () => {
|
|
1423
|
-
|
|
1423
|
+
G();
|
|
1424
1424
|
};
|
|
1425
1425
|
document.addEventListener("scroll", J, !0), window.addEventListener("resize", J, !1), $ = {
|
|
1426
|
-
update:
|
|
1426
|
+
update: G,
|
|
1427
1427
|
destroy: () => {
|
|
1428
1428
|
le(), document.removeEventListener("scroll", J, !0), window.removeEventListener("resize", J, !1);
|
|
1429
1429
|
}
|
|
1430
1430
|
}, $.update();
|
|
1431
1431
|
};
|
|
1432
|
-
return
|
|
1432
|
+
return Q(
|
|
1433
1433
|
() => a.options,
|
|
1434
1434
|
() => {
|
|
1435
|
-
|
|
1435
|
+
s.value >= D.value.length && (s.value = E()), $ == null || $.update();
|
|
1436
1436
|
},
|
|
1437
1437
|
{ deep: !0 }
|
|
1438
|
-
),
|
|
1439
|
-
if (!
|
|
1438
|
+
), Q(c, async (m) => {
|
|
1439
|
+
if (!m) {
|
|
1440
1440
|
$ && ($.destroy(), $ = null);
|
|
1441
1441
|
return;
|
|
1442
1442
|
}
|
|
1443
|
-
await
|
|
1444
|
-
}),
|
|
1445
|
-
|
|
1446
|
-
}),
|
|
1443
|
+
await ke(), $ || oe(), $ == null || $.update();
|
|
1444
|
+
}), Q(D, () => {
|
|
1445
|
+
s.value >= D.value.length && (s.value = E());
|
|
1446
|
+
}), Fe(() => {
|
|
1447
1447
|
document.addEventListener("click", N);
|
|
1448
1448
|
}), $e(() => {
|
|
1449
1449
|
document.removeEventListener("click", N), $ == null || $.destroy(), $ = null;
|
|
1450
|
-
}), (
|
|
1450
|
+
}), (m, z) => (b(), _("div", {
|
|
1451
1451
|
ref_key: "root",
|
|
1452
1452
|
ref: d,
|
|
1453
|
-
class:
|
|
1453
|
+
class: L(I.value)
|
|
1454
1454
|
}, [
|
|
1455
1455
|
B("button", {
|
|
1456
1456
|
ref_key: "trigger",
|
|
1457
1457
|
ref: i,
|
|
1458
1458
|
class: "vf-multiselect__control",
|
|
1459
1459
|
type: "button",
|
|
1460
|
-
disabled:
|
|
1461
|
-
"aria-expanded":
|
|
1460
|
+
disabled: m.disabled,
|
|
1461
|
+
"aria-expanded": c.value,
|
|
1462
1462
|
"aria-controls": v,
|
|
1463
1463
|
"aria-haspopup": "listbox",
|
|
1464
1464
|
onClick: te,
|
|
1465
1465
|
onKeydown: [
|
|
1466
|
-
Z(U(
|
|
1466
|
+
Z(U(X, ["prevent"]), ["down"]),
|
|
1467
1467
|
Z(U(re, ["prevent"]), ["up"]),
|
|
1468
|
-
Z(U(
|
|
1468
|
+
Z(U(ee, ["prevent"]), ["enter"]),
|
|
1469
1469
|
Z(U(q, ["prevent"]), ["esc"])
|
|
1470
1470
|
],
|
|
1471
1471
|
onFocus: x,
|
|
1472
1472
|
onBlur: K
|
|
1473
1473
|
}, [
|
|
1474
1474
|
B("span", {
|
|
1475
|
-
class:
|
|
1475
|
+
class: L(["vf-multiselect__label", { "vf-multiselect__label_placeholder": w.value.length === 0 }])
|
|
1476
1476
|
}, R(H.value), 3),
|
|
1477
1477
|
z[0] || (z[0] = B("span", {
|
|
1478
1478
|
class: "vf-multiselect__chevron",
|
|
1479
1479
|
"aria-hidden": "true"
|
|
1480
1480
|
}, "▾", -1))
|
|
1481
1481
|
], 40, uo),
|
|
1482
|
-
|
|
1482
|
+
m.clearable && w.value.length > 0 && !m.disabled && !m.readonly ? (b(), _("button", {
|
|
1483
1483
|
key: 0,
|
|
1484
1484
|
class: "vf-multiselect__clear",
|
|
1485
1485
|
type: "button",
|
|
1486
1486
|
"aria-label": "Clear selection",
|
|
1487
|
-
onClick: U(
|
|
1487
|
+
onClick: U(k, ["stop"])
|
|
1488
1488
|
}, " ✕ ")) : P("", !0),
|
|
1489
|
-
(
|
|
1489
|
+
(b(), se(we, { to: "body" }, [
|
|
1490
1490
|
fe(B("div", {
|
|
1491
1491
|
id: v,
|
|
1492
1492
|
ref_key: "panel",
|
|
1493
|
-
ref:
|
|
1493
|
+
ref: u,
|
|
1494
1494
|
class: "vf-multiselect__panel",
|
|
1495
1495
|
role: "listbox",
|
|
1496
1496
|
"aria-multiselectable": "true",
|
|
1497
1497
|
"data-placement": p.value
|
|
1498
1498
|
}, [
|
|
1499
|
-
|
|
1499
|
+
m.filter ? (b(), _("div", fo, [
|
|
1500
1500
|
B("input", {
|
|
1501
1501
|
ref_key: "searchInput",
|
|
1502
1502
|
ref: l,
|
|
1503
1503
|
class: "vf-multiselect__search-control",
|
|
1504
1504
|
type: "text",
|
|
1505
|
-
value:
|
|
1506
|
-
placeholder:
|
|
1507
|
-
onInput:
|
|
1505
|
+
value: n.value,
|
|
1506
|
+
placeholder: m.searchPlaceholder,
|
|
1507
|
+
onInput: ne,
|
|
1508
1508
|
onKeydown: [
|
|
1509
|
-
Z(U(
|
|
1509
|
+
Z(U(X, ["prevent"]), ["down"]),
|
|
1510
1510
|
Z(U(re, ["prevent"]), ["up"]),
|
|
1511
|
-
Z(U(
|
|
1511
|
+
Z(U(ee, ["prevent"]), ["enter"]),
|
|
1512
1512
|
Z(U(q, ["prevent"]), ["esc"])
|
|
1513
1513
|
]
|
|
1514
1514
|
}, null, 40, po)
|
|
1515
1515
|
])) : P("", !0),
|
|
1516
|
-
|
|
1517
|
-
id: M(
|
|
1516
|
+
m.loading ? (b(), _("div", go, R(m.loadingText), 1)) : D.value.length > 0 ? (b(!0), _(ae, { key: 2 }, ve(D.value, (V, G) => (b(), _("button", {
|
|
1517
|
+
id: M(G),
|
|
1518
1518
|
key: V.value,
|
|
1519
|
-
class:
|
|
1520
|
-
"is-active":
|
|
1519
|
+
class: L(["vf-multiselect__option", {
|
|
1520
|
+
"is-active": F(V),
|
|
1521
1521
|
"is-disabled": V.disabled,
|
|
1522
|
-
"is-highlighted":
|
|
1522
|
+
"is-highlighted": G === s.value
|
|
1523
1523
|
}]),
|
|
1524
1524
|
type: "button",
|
|
1525
1525
|
role: "option",
|
|
1526
1526
|
disabled: V.disabled,
|
|
1527
|
-
"aria-selected":
|
|
1527
|
+
"aria-selected": F(V),
|
|
1528
1528
|
onClick: (le) => h(V)
|
|
1529
1529
|
}, [
|
|
1530
1530
|
B("span", mo, R(V.label), 1),
|
|
1531
|
-
|
|
1532
|
-
], 10,
|
|
1531
|
+
F(V) ? (b(), _("span", ho, "✓")) : P("", !0)
|
|
1532
|
+
], 10, bo))), 128)) : (b(), _("div", yo, R(m.emptyText), 1))
|
|
1533
1533
|
], 8, vo), [
|
|
1534
|
-
[pe,
|
|
1534
|
+
[pe, c.value]
|
|
1535
1535
|
])
|
|
1536
1536
|
]))
|
|
1537
1537
|
], 2));
|
|
1538
1538
|
}
|
|
1539
|
-
}), _o = ["disabled", "aria-expanded", "onKeydown"],
|
|
1539
|
+
}), _o = ["disabled", "aria-expanded", "onKeydown"], Co = ["data-placement", "onKeydown"], ko = { class: "vf-datepicker__header" }, $o = { class: "vf-datepicker__month-label" }, wo = {
|
|
1540
1540
|
class: "vf-datepicker__weekdays",
|
|
1541
1541
|
role: "row"
|
|
1542
1542
|
}, xo = {
|
|
1543
1543
|
class: "vf-datepicker__days",
|
|
1544
1544
|
role: "grid"
|
|
1545
|
-
}, zo = ["disabled", "data-date", "onClick"],
|
|
1545
|
+
}, zo = ["disabled", "data-date", "onClick"], Rr = /* @__PURE__ */ Y({
|
|
1546
1546
|
__name: "datepicker",
|
|
1547
1547
|
props: {
|
|
1548
1548
|
modelValue: { default: void 0 },
|
|
@@ -1559,195 +1559,195 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
1559
1559
|
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
1560
1560
|
setup(t, { emit: e }) {
|
|
1561
1561
|
let r = 0;
|
|
1562
|
-
const o = e, a = t, d = O(null), i = O(null),
|
|
1562
|
+
const o = e, a = t, d = O(null), i = O(null), u = O(null), l = O(!1), c = O("bottom"), n = O("bottom"), s = `vf-datepicker-panel-${++r}`, f = O(ee(X(a.modelValue) ?? /* @__PURE__ */ new Date()));
|
|
1563
1563
|
let p = null;
|
|
1564
|
-
const v = y(() =>
|
|
1564
|
+
const v = y(() => X(a.modelValue)), $ = y(() => X(a.min)), C = y(() => X(a.max)), w = y(() => v.value ? v.value.toLocaleDateString(a.locale, {
|
|
1565
1565
|
year: "numeric",
|
|
1566
1566
|
month: "short",
|
|
1567
1567
|
day: "numeric"
|
|
1568
1568
|
}) : ""), D = y(() => f.value.toLocaleDateString(a.locale, {
|
|
1569
1569
|
year: "numeric",
|
|
1570
1570
|
month: "long"
|
|
1571
|
-
})),
|
|
1572
|
-
const
|
|
1573
|
-
return Array.from({ length: 7 }, (V,
|
|
1574
|
-
const le = (
|
|
1575
|
-
return J.setDate(z.getDate() + le),
|
|
1571
|
+
})), T = y(() => {
|
|
1572
|
+
const m = new Intl.DateTimeFormat(a.locale, { weekday: "short" }), z = new Date(2026, 0, 4);
|
|
1573
|
+
return Array.from({ length: 7 }, (V, G) => {
|
|
1574
|
+
const le = (G + a.firstDayOfWeek) % 7, J = new Date(z);
|
|
1575
|
+
return J.setDate(z.getDate() + le), m.format(J);
|
|
1576
1576
|
});
|
|
1577
1577
|
}), H = y(() => {
|
|
1578
|
-
const
|
|
1579
|
-
return Array.from({ length: 42 }, (
|
|
1580
|
-
const J = x(
|
|
1578
|
+
const m = K(f.value, a.firstDayOfWeek), z = v.value ? N(v.value) : null, V = N(/* @__PURE__ */ new Date());
|
|
1579
|
+
return Array.from({ length: 42 }, (G, le) => {
|
|
1580
|
+
const J = x(m, le), ye = N(J);
|
|
1581
1581
|
return {
|
|
1582
1582
|
key: `${ye}-${le}`,
|
|
1583
1583
|
iso: ye,
|
|
1584
1584
|
date: J,
|
|
1585
1585
|
day: J.getDate(),
|
|
1586
1586
|
inCurrentMonth: J.getMonth() === f.value.getMonth(),
|
|
1587
|
-
isDisabled: oe(J, $.value,
|
|
1587
|
+
isDisabled: oe(J, $.value, C.value),
|
|
1588
1588
|
isSelected: z === ye,
|
|
1589
1589
|
isToday: ye === V
|
|
1590
1590
|
};
|
|
1591
1591
|
});
|
|
1592
1592
|
}), I = y(() => {
|
|
1593
|
-
const
|
|
1594
|
-
return a.size !== "normal" &&
|
|
1595
|
-
}), M = (
|
|
1596
|
-
a.disabled || a.readonly || (l.value = !0,
|
|
1597
|
-
},
|
|
1598
|
-
l.value = !1,
|
|
1593
|
+
const m = ["vf-datepicker", `vf-datepicker_${a.variant}`, l.value ? "vf-datepicker_open" : ""];
|
|
1594
|
+
return a.size !== "normal" && m.push(`vf-datepicker_${a.size}`), a.disabled && m.push("vf-datepicker_disabled"), m.filter(Boolean);
|
|
1595
|
+
}), M = (m) => o("focus", m), E = (m) => o("blur", m), F = () => {
|
|
1596
|
+
a.disabled || a.readonly || (l.value = !0, c.value = "bottom", n.value = "bottom");
|
|
1597
|
+
}, g = () => {
|
|
1598
|
+
l.value = !1, c.value = "bottom", n.value = "bottom";
|
|
1599
1599
|
}, h = () => {
|
|
1600
1600
|
if (l.value) {
|
|
1601
|
-
|
|
1601
|
+
g();
|
|
1602
1602
|
return;
|
|
1603
1603
|
}
|
|
1604
|
-
|
|
1605
|
-
},
|
|
1606
|
-
f.value =
|
|
1604
|
+
F();
|
|
1605
|
+
}, k = () => {
|
|
1606
|
+
f.value = ne(f.value, -1);
|
|
1607
1607
|
}, W = () => {
|
|
1608
|
-
f.value =
|
|
1609
|
-
}, A = (
|
|
1610
|
-
if (a.readonly || oe(
|
|
1608
|
+
f.value = ne(f.value, 1);
|
|
1609
|
+
}, A = (m) => {
|
|
1610
|
+
if (a.readonly || oe(m, $.value, C.value))
|
|
1611
1611
|
return;
|
|
1612
|
-
const z = N(
|
|
1613
|
-
o("update:modelValue", z), o("change", z),
|
|
1614
|
-
}, q = (
|
|
1612
|
+
const z = N(m);
|
|
1613
|
+
o("update:modelValue", z), o("change", z), g();
|
|
1614
|
+
}, q = (m) => {
|
|
1615
1615
|
var V;
|
|
1616
1616
|
if (!l.value || !d.value)
|
|
1617
1617
|
return;
|
|
1618
|
-
const z =
|
|
1619
|
-
d.value.contains(z) || (V =
|
|
1618
|
+
const z = m.target;
|
|
1619
|
+
d.value.contains(z) || (V = u.value) != null && V.contains(z) || g();
|
|
1620
1620
|
}, te = () => {
|
|
1621
|
-
if (!i.value || !
|
|
1621
|
+
if (!i.value || !u.value)
|
|
1622
1622
|
return;
|
|
1623
|
-
const
|
|
1623
|
+
const m = i.value, z = u.value, V = async () => {
|
|
1624
1624
|
const {
|
|
1625
1625
|
x: ye,
|
|
1626
1626
|
y: We,
|
|
1627
1627
|
placement: Ae
|
|
1628
|
-
} = await Re(
|
|
1629
|
-
placement:
|
|
1628
|
+
} = await Re(m, z, {
|
|
1629
|
+
placement: c.value,
|
|
1630
1630
|
strategy: "fixed",
|
|
1631
|
-
middleware: [
|
|
1631
|
+
middleware: [Te(2), Ve({ placements: ["bottom", "top"] })]
|
|
1632
1632
|
});
|
|
1633
|
-
|
|
1634
|
-
},
|
|
1633
|
+
n.value = Ae ?? c.value, z.style.left = `${ye}px`, z.style.top = `${We}px`;
|
|
1634
|
+
}, G = async () => {
|
|
1635
1635
|
await V();
|
|
1636
|
-
}, le =
|
|
1637
|
-
|
|
1636
|
+
}, le = Le(m, () => {
|
|
1637
|
+
G();
|
|
1638
1638
|
}), J = () => {
|
|
1639
|
-
|
|
1639
|
+
G();
|
|
1640
1640
|
};
|
|
1641
1641
|
document.addEventListener("scroll", J, !0), window.addEventListener("resize", J, !1), p = {
|
|
1642
|
-
update:
|
|
1642
|
+
update: G,
|
|
1643
1643
|
destroy: () => {
|
|
1644
1644
|
le(), document.removeEventListener("scroll", J, !0), window.removeEventListener("resize", J, !1);
|
|
1645
1645
|
}
|
|
1646
1646
|
}, p.update();
|
|
1647
1647
|
};
|
|
1648
|
-
|
|
1648
|
+
Q(
|
|
1649
1649
|
() => a.modelValue,
|
|
1650
|
-
(
|
|
1651
|
-
const z =
|
|
1652
|
-
z && (f.value =
|
|
1650
|
+
(m) => {
|
|
1651
|
+
const z = X(m);
|
|
1652
|
+
z && (f.value = ee(z));
|
|
1653
1653
|
},
|
|
1654
1654
|
{ immediate: !0 }
|
|
1655
|
-
),
|
|
1655
|
+
), Q(
|
|
1656
1656
|
() => [a.min, a.max],
|
|
1657
1657
|
() => {
|
|
1658
1658
|
p == null || p.update();
|
|
1659
1659
|
}
|
|
1660
|
-
),
|
|
1661
|
-
if (!
|
|
1660
|
+
), Q(l, async (m) => {
|
|
1661
|
+
if (!m) {
|
|
1662
1662
|
p && (p.destroy(), p = null);
|
|
1663
1663
|
return;
|
|
1664
1664
|
}
|
|
1665
|
-
await
|
|
1666
|
-
}),
|
|
1665
|
+
await ke(), p || te(), p == null || p.update();
|
|
1666
|
+
}), Fe(() => {
|
|
1667
1667
|
document.addEventListener("click", q);
|
|
1668
1668
|
}), $e(() => {
|
|
1669
1669
|
document.removeEventListener("click", q), p == null || p.destroy(), p = null;
|
|
1670
1670
|
});
|
|
1671
|
-
function
|
|
1672
|
-
if (!
|
|
1671
|
+
function X(m) {
|
|
1672
|
+
if (!m)
|
|
1673
1673
|
return null;
|
|
1674
|
-
const z =
|
|
1674
|
+
const z = m.match(/^(\d{4})-(\d{2})-(\d{2})$/);
|
|
1675
1675
|
if (!z)
|
|
1676
1676
|
return null;
|
|
1677
|
-
const V = Number(z[1]),
|
|
1678
|
-
return J.getFullYear() !== V || J.getMonth() !==
|
|
1677
|
+
const V = Number(z[1]), G = Number(z[2]) - 1, le = Number(z[3]), J = new Date(V, G, le);
|
|
1678
|
+
return J.getFullYear() !== V || J.getMonth() !== G || J.getDate() !== le ? null : re(J);
|
|
1679
1679
|
}
|
|
1680
|
-
function re(
|
|
1681
|
-
return new Date(
|
|
1680
|
+
function re(m) {
|
|
1681
|
+
return new Date(m.getFullYear(), m.getMonth(), m.getDate());
|
|
1682
1682
|
}
|
|
1683
|
-
function
|
|
1684
|
-
return new Date(
|
|
1683
|
+
function ee(m) {
|
|
1684
|
+
return new Date(m.getFullYear(), m.getMonth(), 1);
|
|
1685
1685
|
}
|
|
1686
|
-
function
|
|
1687
|
-
return new Date(
|
|
1686
|
+
function ne(m, z) {
|
|
1687
|
+
return new Date(m.getFullYear(), m.getMonth() + z, 1);
|
|
1688
1688
|
}
|
|
1689
|
-
function x(
|
|
1690
|
-
return new Date(
|
|
1689
|
+
function x(m, z) {
|
|
1690
|
+
return new Date(m.getFullYear(), m.getMonth(), m.getDate() + z);
|
|
1691
1691
|
}
|
|
1692
|
-
function K(
|
|
1693
|
-
const V =
|
|
1692
|
+
function K(m, z) {
|
|
1693
|
+
const V = ee(m), le = (V.getDay() - z + 7) % 7;
|
|
1694
1694
|
return x(V, -le);
|
|
1695
1695
|
}
|
|
1696
|
-
function N(
|
|
1697
|
-
const z =
|
|
1698
|
-
return `${z}-${V}-${
|
|
1696
|
+
function N(m) {
|
|
1697
|
+
const z = m.getFullYear(), V = `${m.getMonth() + 1}`.padStart(2, "0"), G = `${m.getDate()}`.padStart(2, "0");
|
|
1698
|
+
return `${z}-${V}-${G}`;
|
|
1699
1699
|
}
|
|
1700
|
-
function oe(
|
|
1701
|
-
const
|
|
1702
|
-
return !!(z &&
|
|
1700
|
+
function oe(m, z, V) {
|
|
1701
|
+
const G = re(m).getTime();
|
|
1702
|
+
return !!(z && G < z.getTime() || V && G > V.getTime());
|
|
1703
1703
|
}
|
|
1704
|
-
return (
|
|
1704
|
+
return (m, z) => (b(), _("div", {
|
|
1705
1705
|
ref_key: "root",
|
|
1706
1706
|
ref: d,
|
|
1707
|
-
class:
|
|
1707
|
+
class: L(I.value)
|
|
1708
1708
|
}, [
|
|
1709
1709
|
B("button", {
|
|
1710
1710
|
ref_key: "control",
|
|
1711
1711
|
ref: i,
|
|
1712
1712
|
class: "vf-datepicker__control",
|
|
1713
1713
|
type: "button",
|
|
1714
|
-
disabled:
|
|
1714
|
+
disabled: m.disabled,
|
|
1715
1715
|
"aria-expanded": l.value,
|
|
1716
|
-
"aria-controls":
|
|
1716
|
+
"aria-controls": s,
|
|
1717
1717
|
"aria-haspopup": "dialog",
|
|
1718
1718
|
onClick: h,
|
|
1719
1719
|
onKeydown: [
|
|
1720
|
-
Z(U(
|
|
1720
|
+
Z(U(F, ["prevent"]), ["down"]),
|
|
1721
1721
|
Z(U(h, ["prevent"]), ["enter"]),
|
|
1722
|
-
Z(U(
|
|
1722
|
+
Z(U(g, ["prevent"]), ["esc"])
|
|
1723
1723
|
],
|
|
1724
1724
|
onFocus: M,
|
|
1725
1725
|
onBlur: E
|
|
1726
1726
|
}, [
|
|
1727
1727
|
B("span", {
|
|
1728
|
-
class:
|
|
1729
|
-
}, R(w.value ||
|
|
1728
|
+
class: L(["vf-datepicker__label", { "vf-datepicker__label_placeholder": !v.value }])
|
|
1729
|
+
}, R(w.value || m.placeholder), 3),
|
|
1730
1730
|
z[0] || (z[0] = B("span", {
|
|
1731
1731
|
class: "vf-datepicker__chevron",
|
|
1732
1732
|
"aria-hidden": "true"
|
|
1733
1733
|
}, "▾", -1))
|
|
1734
1734
|
], 40, _o),
|
|
1735
|
-
(
|
|
1735
|
+
(b(), se(we, { to: "body" }, [
|
|
1736
1736
|
fe(B("div", {
|
|
1737
|
-
id:
|
|
1737
|
+
id: s,
|
|
1738
1738
|
ref_key: "panel",
|
|
1739
|
-
ref:
|
|
1739
|
+
ref: u,
|
|
1740
1740
|
class: "vf-datepicker__panel",
|
|
1741
1741
|
role: "dialog",
|
|
1742
|
-
"data-placement":
|
|
1743
|
-
onKeydown: Z(U(
|
|
1742
|
+
"data-placement": n.value,
|
|
1743
|
+
onKeydown: Z(U(g, ["prevent"]), ["esc"])
|
|
1744
1744
|
}, [
|
|
1745
|
-
B("div",
|
|
1745
|
+
B("div", ko, [
|
|
1746
1746
|
B("button", {
|
|
1747
1747
|
class: "vf-datepicker__nav",
|
|
1748
1748
|
type: "button",
|
|
1749
1749
|
"aria-label": "Previous month",
|
|
1750
|
-
onClick:
|
|
1750
|
+
onClick: k
|
|
1751
1751
|
}, " ‹ "),
|
|
1752
1752
|
B("span", $o, R(D.value), 1),
|
|
1753
1753
|
B("button", {
|
|
@@ -1758,15 +1758,15 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
1758
1758
|
}, " › ")
|
|
1759
1759
|
]),
|
|
1760
1760
|
B("div", wo, [
|
|
1761
|
-
(
|
|
1761
|
+
(b(!0), _(ae, null, ve(T.value, (V) => (b(), _("span", {
|
|
1762
1762
|
key: V,
|
|
1763
1763
|
class: "vf-datepicker__weekday"
|
|
1764
1764
|
}, R(V), 1))), 128))
|
|
1765
1765
|
]),
|
|
1766
1766
|
B("div", xo, [
|
|
1767
|
-
(
|
|
1767
|
+
(b(!0), _(ae, null, ve(H.value, (V) => (b(), _("button", {
|
|
1768
1768
|
key: V.key,
|
|
1769
|
-
class:
|
|
1769
|
+
class: L(["vf-datepicker__day", {
|
|
1770
1770
|
"is-outside": !V.inCurrentMonth,
|
|
1771
1771
|
"is-selected": V.isSelected,
|
|
1772
1772
|
"is-today": V.isToday
|
|
@@ -1774,16 +1774,16 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
1774
1774
|
type: "button",
|
|
1775
1775
|
disabled: V.isDisabled,
|
|
1776
1776
|
"data-date": V.iso,
|
|
1777
|
-
onClick: (
|
|
1777
|
+
onClick: (G) => A(V.date)
|
|
1778
1778
|
}, R(V.day), 11, zo))), 128))
|
|
1779
1779
|
])
|
|
1780
|
-
], 40,
|
|
1780
|
+
], 40, Co), [
|
|
1781
1781
|
[pe, l.value]
|
|
1782
1782
|
])
|
|
1783
1783
|
]))
|
|
1784
1784
|
], 2));
|
|
1785
1785
|
}
|
|
1786
|
-
}), Bo = ["disabled"],
|
|
1786
|
+
}), Bo = ["disabled"], So = ["disabled", "aria-current", "aria-label", "onClick"], Fo = ["disabled"], Pr = /* @__PURE__ */ Y({
|
|
1787
1787
|
__name: "pagination",
|
|
1788
1788
|
props: {
|
|
1789
1789
|
modelValue: { default: 1 },
|
|
@@ -1801,83 +1801,83 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
1801
1801
|
},
|
|
1802
1802
|
emits: ["update:modelValue", "change"],
|
|
1803
1803
|
setup(t, { emit: e }) {
|
|
1804
|
-
const r = t, o = e, a = (v, $,
|
|
1804
|
+
const r = t, o = e, a = (v, $, C) => Math.min(C, Math.max($, v)), d = (v, $) => {
|
|
1805
1805
|
if ($ < v)
|
|
1806
1806
|
return [];
|
|
1807
|
-
const
|
|
1807
|
+
const C = [];
|
|
1808
1808
|
for (let w = v; w <= $; w += 1)
|
|
1809
|
-
|
|
1810
|
-
return
|
|
1809
|
+
C.push(w);
|
|
1810
|
+
return C;
|
|
1811
1811
|
}, i = y(() => {
|
|
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
|
-
}),
|
|
1817
|
-
const v = i.value, $ =
|
|
1816
|
+
}), u = y(() => a(Math.floor(r.modelValue), 1, i.value)), l = y(() => u.value <= 1), c = y(() => u.value >= i.value), n = y(() => r.disabled || i.value <= 1), s = y(() => {
|
|
1817
|
+
const v = i.value, $ = u.value, C = Math.max(0, Math.floor(r.siblingCount)), w = Math.max(0, Math.floor(r.boundaryCount)), D = C * 2 + w * 2 + 3, T = [];
|
|
1818
1818
|
if (v <= D)
|
|
1819
|
-
return d(1, v).map((
|
|
1820
|
-
const H = d(1, w), I = d(v - w + 1, v), M = Math.max(Math.min($ -
|
|
1821
|
-
for (const
|
|
1822
|
-
|
|
1823
|
-
M > w + 2 ?
|
|
1824
|
-
for (const
|
|
1825
|
-
|
|
1826
|
-
E < v - w - 1 ?
|
|
1827
|
-
for (const
|
|
1828
|
-
|
|
1829
|
-
return
|
|
1819
|
+
return d(1, v).map((F) => ({ key: `page-${F}`, type: "page", page: F }));
|
|
1820
|
+
const H = d(1, w), I = d(v - w + 1, v), M = Math.max(Math.min($ - C, v - w - C * 2 - 1), w + 2), E = Math.min(Math.max($ + C, w + C * 2 + 2), v - w - 1);
|
|
1821
|
+
for (const F of H)
|
|
1822
|
+
T.push({ key: `page-${F}`, type: "page", page: F });
|
|
1823
|
+
M > w + 2 ? T.push({ key: "ellipsis-start", type: "ellipsis", page: -1 }) : w + 1 <= v - w && T.push({ key: `page-${w + 1}`, type: "page", page: w + 1 });
|
|
1824
|
+
for (const F of d(M, E))
|
|
1825
|
+
T.push({ key: `page-${F}`, type: "page", page: F });
|
|
1826
|
+
E < v - w - 1 ? T.push({ key: "ellipsis-end", type: "ellipsis", page: -2 }) : v - w > w && T.push({ key: `page-${v - w}`, type: "page", page: v - w });
|
|
1827
|
+
for (const F of I)
|
|
1828
|
+
T.push({ key: `page-${F}`, type: "page", page: F });
|
|
1829
|
+
return T;
|
|
1830
1830
|
}), f = y(() => {
|
|
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, $) => {
|
|
1834
|
-
if (
|
|
1834
|
+
if (n.value)
|
|
1835
1835
|
return;
|
|
1836
|
-
const
|
|
1837
|
-
|
|
1836
|
+
const C = a(v, 1, i.value);
|
|
1837
|
+
C !== r.modelValue && (o("update:modelValue", C), o("change", C, $));
|
|
1838
1838
|
};
|
|
1839
|
-
return (v, $) => (
|
|
1840
|
-
class:
|
|
1839
|
+
return (v, $) => (b(), _("nav", {
|
|
1840
|
+
class: L(f.value),
|
|
1841
1841
|
"aria-label": "Pagination"
|
|
1842
1842
|
}, [
|
|
1843
1843
|
B("button", {
|
|
1844
1844
|
class: "vf-pagination__item vf-pagination__item_nav",
|
|
1845
1845
|
type: "button",
|
|
1846
|
-
disabled:
|
|
1846
|
+
disabled: n.value || l.value,
|
|
1847
1847
|
"aria-label": "Previous page",
|
|
1848
|
-
onClick: $[0] || ($[0] = (
|
|
1848
|
+
onClick: $[0] || ($[0] = (C) => p(u.value - 1, C))
|
|
1849
1849
|
}, R(v.prevLabel), 9, Bo),
|
|
1850
|
-
(
|
|
1851
|
-
key:
|
|
1852
|
-
class:
|
|
1853
|
-
"is-current":
|
|
1854
|
-
"is-ellipsis":
|
|
1850
|
+
(b(!0), _(ae, null, ve(s.value, (C) => (b(), _("button", {
|
|
1851
|
+
key: C.key,
|
|
1852
|
+
class: L(["vf-pagination__item", {
|
|
1853
|
+
"is-current": C.type === "page" && C.page === u.value,
|
|
1854
|
+
"is-ellipsis": C.type === "ellipsis"
|
|
1855
1855
|
}]),
|
|
1856
1856
|
type: "button",
|
|
1857
|
-
disabled:
|
|
1858
|
-
"aria-current":
|
|
1859
|
-
"aria-label":
|
|
1860
|
-
onClick: (w) =>
|
|
1857
|
+
disabled: n.value || C.type === "ellipsis",
|
|
1858
|
+
"aria-current": C.type === "page" && C.page === u.value ? "page" : void 0,
|
|
1859
|
+
"aria-label": C.type === "page" ? `Page ${C.page}` : void 0,
|
|
1860
|
+
onClick: (w) => C.type === "page" && p(C.page, w)
|
|
1861
1861
|
}, [
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
], 64)) : (
|
|
1865
|
-
|
|
1862
|
+
C.type === "page" ? (b(), _(ae, { key: 0 }, [
|
|
1863
|
+
j(R(C.page), 1)
|
|
1864
|
+
], 64)) : (b(), _(ae, { key: 1 }, [
|
|
1865
|
+
j(R(v.ellipsisLabel), 1)
|
|
1866
1866
|
], 64))
|
|
1867
|
-
], 10,
|
|
1867
|
+
], 10, So))), 128)),
|
|
1868
1868
|
B("button", {
|
|
1869
1869
|
class: "vf-pagination__item vf-pagination__item_nav",
|
|
1870
1870
|
type: "button",
|
|
1871
|
-
disabled:
|
|
1871
|
+
disabled: n.value || c.value,
|
|
1872
1872
|
"aria-label": "Next page",
|
|
1873
|
-
onClick: $[1] || ($[1] = (
|
|
1874
|
-
}, R(v.nextLabel), 9,
|
|
1873
|
+
onClick: $[1] || ($[1] = (C) => p(u.value + 1, C))
|
|
1874
|
+
}, R(v.nextLabel), 9, Fo)
|
|
1875
1875
|
], 2));
|
|
1876
1876
|
}
|
|
1877
|
-
}), Vo = ["checked", "disabled"],
|
|
1877
|
+
}), Vo = ["checked", "disabled"], To = {
|
|
1878
1878
|
key: 0,
|
|
1879
1879
|
class: "vf-checkbox__label"
|
|
1880
|
-
},
|
|
1880
|
+
}, Ir = /* @__PURE__ */ Y({
|
|
1881
1881
|
__name: "checkbox",
|
|
1882
1882
|
props: {
|
|
1883
1883
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -1891,11 +1891,11 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
1891
1891
|
const i = ["vf-checkbox", `vf-checkbox_${o.variant}`];
|
|
1892
1892
|
return o.disabled && i.push("vf-checkbox_disabled"), i;
|
|
1893
1893
|
}), d = (i) => {
|
|
1894
|
-
const
|
|
1895
|
-
r("update:modelValue",
|
|
1894
|
+
const u = i.target;
|
|
1895
|
+
r("update:modelValue", u.checked), r("change", i);
|
|
1896
1896
|
};
|
|
1897
|
-
return (i,
|
|
1898
|
-
class:
|
|
1897
|
+
return (i, u) => (b(), _("label", {
|
|
1898
|
+
class: L(a.value)
|
|
1899
1899
|
}, [
|
|
1900
1900
|
B("input", {
|
|
1901
1901
|
class: "vf-checkbox__control",
|
|
@@ -1904,15 +1904,15 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
1904
1904
|
disabled: i.disabled,
|
|
1905
1905
|
onChange: d
|
|
1906
1906
|
}, null, 40, Vo),
|
|
1907
|
-
|
|
1908
|
-
i.label || i.$slots.default ? (
|
|
1909
|
-
|
|
1910
|
-
|
|
1907
|
+
u[0] || (u[0] = B("span", { class: "vf-checkbox__box" }, null, -1)),
|
|
1908
|
+
i.label || i.$slots.default ? (b(), _("span", To, [
|
|
1909
|
+
S(i.$slots, "default", {}, () => [
|
|
1910
|
+
j(R(i.label), 1)
|
|
1911
1911
|
])
|
|
1912
1912
|
])) : P("", !0)
|
|
1913
1913
|
], 2));
|
|
1914
1914
|
}
|
|
1915
|
-
}), at = Symbol("VueForgeRadioGroup"),
|
|
1915
|
+
}), at = Symbol("VueForgeRadioGroup"), Lo = ["aria-disabled", "aria-label", "aria-labelledby"], Mr = /* @__PURE__ */ Y({
|
|
1916
1916
|
__name: "radio-group",
|
|
1917
1917
|
props: {
|
|
1918
1918
|
modelValue: { type: [String, Number, Boolean, null], default: void 0 },
|
|
@@ -1926,10 +1926,10 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
1926
1926
|
emits: ["update:modelValue", "change"],
|
|
1927
1927
|
setup(t, { emit: e }) {
|
|
1928
1928
|
const r = e, o = t, a = y(() => {
|
|
1929
|
-
const
|
|
1930
|
-
return o.direction === "horizontal" &&
|
|
1931
|
-
}), d = (
|
|
1932
|
-
r("update:modelValue",
|
|
1929
|
+
const u = ["vf-radio-group"];
|
|
1930
|
+
return o.direction === "horizontal" && u.push("vf-radio-group_horizontal"), u;
|
|
1931
|
+
}), d = (u, l) => {
|
|
1932
|
+
r("update:modelValue", u), r("change", u, l);
|
|
1933
1933
|
}, i = {
|
|
1934
1934
|
name: y(() => o.name),
|
|
1935
1935
|
modelValue: y(() => o.modelValue),
|
|
@@ -1937,20 +1937,20 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
1937
1937
|
variant: y(() => o.variant),
|
|
1938
1938
|
onChange: d
|
|
1939
1939
|
};
|
|
1940
|
-
return Ke(at, i), (
|
|
1941
|
-
class:
|
|
1940
|
+
return Ke(at, i), (u, l) => (b(), _("div", {
|
|
1941
|
+
class: L(a.value),
|
|
1942
1942
|
role: "radiogroup",
|
|
1943
|
-
"aria-disabled":
|
|
1944
|
-
"aria-label":
|
|
1945
|
-
"aria-labelledby":
|
|
1943
|
+
"aria-disabled": u.disabled || void 0,
|
|
1944
|
+
"aria-label": u.ariaLabel || void 0,
|
|
1945
|
+
"aria-labelledby": u.ariaLabelledby || void 0
|
|
1946
1946
|
}, [
|
|
1947
|
-
|
|
1948
|
-
], 10,
|
|
1947
|
+
S(u.$slots, "default")
|
|
1948
|
+
], 10, Lo));
|
|
1949
1949
|
}
|
|
1950
1950
|
}), Ro = ["name", "value", "checked", "disabled"], Po = {
|
|
1951
1951
|
key: 0,
|
|
1952
1952
|
class: "vf-radio__label"
|
|
1953
|
-
},
|
|
1953
|
+
}, Or = /* @__PURE__ */ Y({
|
|
1954
1954
|
__name: "radio-button",
|
|
1955
1955
|
props: {
|
|
1956
1956
|
modelValue: { type: [String, Number, Boolean, null], default: void 0 },
|
|
@@ -1962,33 +1962,33 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
1962
1962
|
},
|
|
1963
1963
|
emits: ["update:modelValue", "change"],
|
|
1964
1964
|
setup(t, { emit: e }) {
|
|
1965
|
-
const r = e, o = t, a =
|
|
1966
|
-
const f = ["vf-radio", `vf-radio_${
|
|
1965
|
+
const r = e, o = t, a = De(at, null), d = y(() => a ? a.modelValue.value : o.modelValue), i = y(() => a ? a.name.value : o.name), u = y(() => a ? a.variant.value : o.variant), l = y(() => (a ? a.disabled.value : !1) || o.disabled), c = y(() => d.value === o.value), n = y(() => {
|
|
1966
|
+
const f = ["vf-radio", `vf-radio_${u.value}`];
|
|
1967
1967
|
return l.value && f.push("vf-radio_disabled"), f;
|
|
1968
|
-
}),
|
|
1968
|
+
}), s = (f) => {
|
|
1969
1969
|
l.value || (a ? a.onChange(o.value, f) : r("update:modelValue", o.value), r("change", o.value, f));
|
|
1970
1970
|
};
|
|
1971
|
-
return (f, p) => (
|
|
1972
|
-
class:
|
|
1971
|
+
return (f, p) => (b(), _("label", {
|
|
1972
|
+
class: L(n.value)
|
|
1973
1973
|
}, [
|
|
1974
1974
|
B("input", {
|
|
1975
1975
|
class: "vf-radio__control",
|
|
1976
1976
|
type: "radio",
|
|
1977
1977
|
name: i.value,
|
|
1978
1978
|
value: f.value,
|
|
1979
|
-
checked:
|
|
1979
|
+
checked: c.value,
|
|
1980
1980
|
disabled: l.value,
|
|
1981
|
-
onChange:
|
|
1981
|
+
onChange: s
|
|
1982
1982
|
}, null, 40, Ro),
|
|
1983
1983
|
p[0] || (p[0] = B("span", { class: "vf-radio__circle" }, null, -1)),
|
|
1984
|
-
f.label || f.$slots.default ? (
|
|
1985
|
-
|
|
1986
|
-
|
|
1984
|
+
f.label || f.$slots.default ? (b(), _("span", Po, [
|
|
1985
|
+
S(f.$slots, "default", {}, () => [
|
|
1986
|
+
j(R(f.label), 1)
|
|
1987
1987
|
])
|
|
1988
1988
|
])) : P("", !0)
|
|
1989
1989
|
], 2));
|
|
1990
1990
|
}
|
|
1991
|
-
}), Ne = Symbol("VueForgeTabs"), Io = ["aria-orientation", "aria-label", "aria-labelledby"], Mo = { class: "vf-tabs__panels" },
|
|
1991
|
+
}), Ne = Symbol("VueForgeTabs"), Io = ["aria-orientation", "aria-label", "aria-labelledby"], Mo = { class: "vf-tabs__panels" }, Dr = /* @__PURE__ */ Y({
|
|
1992
1992
|
__name: "tabs",
|
|
1993
1993
|
props: {
|
|
1994
1994
|
modelValue: { default: void 0 },
|
|
@@ -2000,23 +2000,23 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
2000
2000
|
emits: ["update:modelValue", "change"],
|
|
2001
2001
|
setup(t, { emit: e }) {
|
|
2002
2002
|
let r = 0;
|
|
2003
|
-
const o = e, a = t, d = ++r, i = (v) => String(v).toLowerCase().trim().replace(/\s+/g, "-").replace(/[^a-z0-9_-]/g, ""),
|
|
2003
|
+
const o = e, a = t, d = ++r, i = (v) => String(v).toLowerCase().trim().replace(/\s+/g, "-").replace(/[^a-z0-9_-]/g, ""), u = y(() => {
|
|
2004
2004
|
const v = ["vf-tabs"];
|
|
2005
2005
|
return a.orientation === "vertical" && v.push("vf-tabs_vertical"), a.disabled && v.push("vf-tabs_disabled"), v;
|
|
2006
|
-
}), l = O(null),
|
|
2006
|
+
}), l = O(null), c = () => l.value ? Array.from(l.value.querySelectorAll('[role="tab"]:not([disabled])')) : [], n = (v) => {
|
|
2007
2007
|
v && (v.focus(), v.click());
|
|
2008
|
-
},
|
|
2008
|
+
}, s = (v) => {
|
|
2009
2009
|
if (a.disabled)
|
|
2010
2010
|
return;
|
|
2011
|
-
const $ = a.orientation === "horizontal",
|
|
2012
|
-
if (![...w, ...D, "Home", "End"].includes(
|
|
2011
|
+
const $ = a.orientation === "horizontal", C = v.key, w = $ ? ["ArrowRight"] : ["ArrowDown"], D = $ ? ["ArrowLeft"] : ["ArrowUp"];
|
|
2012
|
+
if (![...w, ...D, "Home", "End"].includes(C))
|
|
2013
2013
|
return;
|
|
2014
|
-
const
|
|
2015
|
-
if (!
|
|
2014
|
+
const T = c();
|
|
2015
|
+
if (!T.length)
|
|
2016
2016
|
return;
|
|
2017
|
-
const H =
|
|
2017
|
+
const H = T.findIndex((F) => F.getAttribute("aria-selected") === "true"), I = T.findIndex((F) => F === document.activeElement), M = I >= 0 ? I : Math.max(H, 0);
|
|
2018
2018
|
let E = M;
|
|
2019
|
-
w.includes(
|
|
2019
|
+
w.includes(C) ? E = (M + 1) % T.length : D.includes(C) ? E = (M - 1 + T.length) % T.length : C === "Home" ? E = 0 : C === "End" && (E = T.length - 1), v.preventDefault(), n(T[E]);
|
|
2020
2020
|
}, f = (v, $) => {
|
|
2021
2021
|
o("update:modelValue", v), o("change", v, $);
|
|
2022
2022
|
}, p = {
|
|
@@ -2027,8 +2027,8 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
2027
2027
|
getTabId: (v) => `vf-tab-${d}-${i(v)}`,
|
|
2028
2028
|
getPanelId: (v) => `vf-tabpanel-${d}-${i(v)}`
|
|
2029
2029
|
};
|
|
2030
|
-
return Ke(Ne, p), (v, $) => (
|
|
2031
|
-
class:
|
|
2030
|
+
return Ke(Ne, p), (v, $) => (b(), _("div", {
|
|
2031
|
+
class: L(u.value)
|
|
2032
2032
|
}, [
|
|
2033
2033
|
B("div", {
|
|
2034
2034
|
ref_key: "list",
|
|
@@ -2038,16 +2038,16 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
2038
2038
|
"aria-orientation": v.orientation,
|
|
2039
2039
|
"aria-label": v.ariaLabel || void 0,
|
|
2040
2040
|
"aria-labelledby": v.ariaLabelledby || void 0,
|
|
2041
|
-
onKeydown:
|
|
2041
|
+
onKeydown: s
|
|
2042
2042
|
}, [
|
|
2043
|
-
|
|
2043
|
+
S(v.$slots, "tabs")
|
|
2044
2044
|
], 40, Io),
|
|
2045
2045
|
B("div", Mo, [
|
|
2046
|
-
|
|
2046
|
+
S(v.$slots, "panels")
|
|
2047
2047
|
])
|
|
2048
2048
|
], 2));
|
|
2049
2049
|
}
|
|
2050
|
-
}),
|
|
2050
|
+
}), Oo = ["id", "aria-selected", "aria-controls", "disabled", "tabindex"], Wr = /* @__PURE__ */ Y({
|
|
2051
2051
|
__name: "tab",
|
|
2052
2052
|
props: {
|
|
2053
2053
|
value: {},
|
|
@@ -2056,45 +2056,45 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
2056
2056
|
},
|
|
2057
2057
|
emits: ["change"],
|
|
2058
2058
|
setup(t, { emit: e }) {
|
|
2059
|
-
const r = e, o = t, a =
|
|
2060
|
-
!a || i.value || (a.onChange(o.value,
|
|
2059
|
+
const r = e, o = t, a = De(Ne, null), d = y(() => (a == null ? void 0 : a.activeValue.value) === o.value), i = y(() => ((a == null ? void 0 : a.disabled.value) ?? !1) || o.disabled), u = y(() => a ? a.getTabId(o.value) : void 0), l = y(() => a ? a.getPanelId(o.value) : void 0), c = y(() => i.value ? -1 : d.value ? 0 : -1), n = (s) => {
|
|
2060
|
+
!a || i.value || (a.onChange(o.value, s), r("change", o.value, s));
|
|
2061
2061
|
};
|
|
2062
|
-
return (
|
|
2063
|
-
id:
|
|
2064
|
-
class:
|
|
2062
|
+
return (s, f) => (b(), _("button", {
|
|
2063
|
+
id: u.value,
|
|
2064
|
+
class: L(["vf-tab", { "vf-tab_active": d.value, "vf-tab_disabled": i.value }]),
|
|
2065
2065
|
type: "button",
|
|
2066
2066
|
role: "tab",
|
|
2067
2067
|
"aria-selected": d.value,
|
|
2068
2068
|
"aria-controls": l.value,
|
|
2069
2069
|
disabled: i.value,
|
|
2070
|
-
tabindex:
|
|
2071
|
-
onClick:
|
|
2070
|
+
tabindex: c.value,
|
|
2071
|
+
onClick: n
|
|
2072
2072
|
}, [
|
|
2073
|
-
|
|
2074
|
-
|
|
2073
|
+
S(s.$slots, "default", {}, () => [
|
|
2074
|
+
j(R(s.label), 1)
|
|
2075
2075
|
])
|
|
2076
|
-
], 10,
|
|
2076
|
+
], 10, Oo));
|
|
2077
2077
|
}
|
|
2078
|
-
}),
|
|
2078
|
+
}), Do = ["id", "aria-labelledby"], Ar = /* @__PURE__ */ Y({
|
|
2079
2079
|
__name: "tab-panel",
|
|
2080
2080
|
props: {
|
|
2081
2081
|
value: {}
|
|
2082
2082
|
},
|
|
2083
2083
|
setup(t) {
|
|
2084
|
-
const e = t, r =
|
|
2085
|
-
return (i,
|
|
2084
|
+
const e = t, r = De(Ne, null), o = y(() => (r == null ? void 0 : r.activeValue.value) === e.value), a = y(() => r ? r.getTabId(e.value) : void 0), d = y(() => r ? r.getPanelId(e.value) : void 0);
|
|
2085
|
+
return (i, u) => fe((b(), _("div", {
|
|
2086
2086
|
id: d.value,
|
|
2087
2087
|
class: "vf-tab-panel",
|
|
2088
2088
|
role: "tabpanel",
|
|
2089
2089
|
tabindex: "0",
|
|
2090
2090
|
"aria-labelledby": a.value
|
|
2091
2091
|
}, [
|
|
2092
|
-
|
|
2093
|
-
], 8,
|
|
2092
|
+
S(i.$slots, "default")
|
|
2093
|
+
], 8, Do)), [
|
|
2094
2094
|
[pe, o.value]
|
|
2095
2095
|
]);
|
|
2096
2096
|
}
|
|
2097
|
-
}), rt = Symbol("VueForgeAccordion"), Wo = ["aria-label", "aria-labelledby"],
|
|
2097
|
+
}), rt = Symbol("VueForgeAccordion"), Wo = ["aria-label", "aria-labelledby"], Er = /* @__PURE__ */ Y({
|
|
2098
2098
|
__name: "accordion",
|
|
2099
2099
|
props: {
|
|
2100
2100
|
modelValue: { default: void 0 },
|
|
@@ -2108,38 +2108,38 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
2108
2108
|
emits: ["update:modelValue", "change"],
|
|
2109
2109
|
setup(t, { emit: e }) {
|
|
2110
2110
|
let r = 0;
|
|
2111
|
-
const o = e, a = t, d = ++r, i = (
|
|
2112
|
-
const
|
|
2113
|
-
return a.size !== "normal" &&
|
|
2114
|
-
}), l = (
|
|
2111
|
+
const o = e, a = t, d = ++r, i = (s) => String(s).toLowerCase().trim().replace(/\s+/g, "-").replace(/[^a-z0-9_-]/g, ""), u = y(() => {
|
|
2112
|
+
const s = ["vf-accordion", `vf-accordion_${a.variant}`];
|
|
2113
|
+
return a.size !== "normal" && s.push(`vf-accordion_${a.size}`), a.disabled && s.push("vf-accordion_disabled"), s;
|
|
2114
|
+
}), l = (s) => Array.isArray(s) ? s : s == null ? [] : [s], c = (s, f) => {
|
|
2115
2115
|
if (a.disabled)
|
|
2116
2116
|
return;
|
|
2117
2117
|
if (a.multiple) {
|
|
2118
|
-
const v = l(a.modelValue),
|
|
2119
|
-
o("update:modelValue",
|
|
2118
|
+
const v = l(a.modelValue), C = v.includes(s) ? v.filter((w) => w !== s) : [...v, s];
|
|
2119
|
+
o("update:modelValue", C), o("change", C, f);
|
|
2120
2120
|
return;
|
|
2121
2121
|
}
|
|
2122
|
-
const p = a.modelValue ===
|
|
2122
|
+
const p = a.modelValue === s ? void 0 : s;
|
|
2123
2123
|
o("update:modelValue", p), o("change", p, f);
|
|
2124
|
-
},
|
|
2124
|
+
}, n = {
|
|
2125
2125
|
modelValue: y(() => a.modelValue),
|
|
2126
2126
|
multiple: y(() => a.multiple),
|
|
2127
2127
|
disabled: y(() => a.disabled),
|
|
2128
2128
|
variant: y(() => a.variant),
|
|
2129
2129
|
size: y(() => a.size),
|
|
2130
|
-
onToggle:
|
|
2131
|
-
getHeaderId: (
|
|
2132
|
-
getPanelId: (
|
|
2130
|
+
onToggle: c,
|
|
2131
|
+
getHeaderId: (s) => `vf-accordion-header-${d}-${i(s)}`,
|
|
2132
|
+
getPanelId: (s) => `vf-accordion-panel-${d}-${i(s)}`
|
|
2133
2133
|
};
|
|
2134
|
-
return Ke(rt,
|
|
2135
|
-
class:
|
|
2136
|
-
"aria-label":
|
|
2137
|
-
"aria-labelledby":
|
|
2134
|
+
return Ke(rt, n), (s, f) => (b(), _("div", {
|
|
2135
|
+
class: L(u.value),
|
|
2136
|
+
"aria-label": s.ariaLabel || void 0,
|
|
2137
|
+
"aria-labelledby": s.ariaLabelledby || void 0
|
|
2138
2138
|
}, [
|
|
2139
|
-
|
|
2139
|
+
S(s.$slots, "default")
|
|
2140
2140
|
], 10, Wo));
|
|
2141
2141
|
}
|
|
2142
|
-
}), Ao = ["id", "disabled", "aria-expanded", "aria-controls"], Eo = { class: "vf-accordion__title" }, Ho = ["id", "aria-labelledby", "aria-hidden"], Ko = { class: "vf-accordion__panel-inner" },
|
|
2142
|
+
}), Ao = ["id", "disabled", "aria-expanded", "aria-controls"], Eo = { class: "vf-accordion__title" }, Ho = ["id", "aria-labelledby", "aria-hidden"], Ko = { class: "vf-accordion__panel-inner" }, Hr = /* @__PURE__ */ Y({
|
|
2143
2143
|
__name: "accordion-item",
|
|
2144
2144
|
props: {
|
|
2145
2145
|
value: {},
|
|
@@ -2148,19 +2148,19 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
2148
2148
|
unmount: { type: Boolean, default: !1 }
|
|
2149
2149
|
},
|
|
2150
2150
|
setup(t) {
|
|
2151
|
-
const e = t, r =
|
|
2151
|
+
const e = t, r = De(rt, null), o = y(() => {
|
|
2152
2152
|
if (!r)
|
|
2153
2153
|
return !1;
|
|
2154
|
-
const
|
|
2155
|
-
return Array.isArray(
|
|
2156
|
-
}), a = y(() => ((r == null ? void 0 : r.disabled.value) ?? !1) || e.disabled), d = y(() => r ? r.getHeaderId(e.value) : void 0), i = y(() => r ? r.getPanelId(e.value) : void 0),
|
|
2157
|
-
const
|
|
2158
|
-
return o.value &&
|
|
2159
|
-
}),
|
|
2160
|
-
!r || a.value || r.onToggle(e.value,
|
|
2154
|
+
const n = r.modelValue.value;
|
|
2155
|
+
return Array.isArray(n) ? n.includes(e.value) : n === e.value;
|
|
2156
|
+
}), a = y(() => ((r == null ? void 0 : r.disabled.value) ?? !1) || e.disabled), d = y(() => r ? r.getHeaderId(e.value) : void 0), i = y(() => r ? r.getPanelId(e.value) : void 0), u = y(() => e.unmount ? o.value : !0), l = y(() => {
|
|
2157
|
+
const n = ["vf-accordion-item"];
|
|
2158
|
+
return o.value && n.push("vf-accordion-item_open"), a.value && n.push("vf-accordion-item_disabled"), n;
|
|
2159
|
+
}), c = (n) => {
|
|
2160
|
+
!r || a.value || r.onToggle(e.value, n);
|
|
2161
2161
|
};
|
|
2162
|
-
return (
|
|
2163
|
-
class:
|
|
2162
|
+
return (n, s) => (b(), _("div", {
|
|
2163
|
+
class: L(l.value)
|
|
2164
2164
|
}, [
|
|
2165
2165
|
B("button", {
|
|
2166
2166
|
id: d.value,
|
|
@@ -2169,39 +2169,39 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
2169
2169
|
disabled: a.value,
|
|
2170
2170
|
"aria-expanded": o.value,
|
|
2171
2171
|
"aria-controls": i.value,
|
|
2172
|
-
onClick:
|
|
2172
|
+
onClick: c
|
|
2173
2173
|
}, [
|
|
2174
2174
|
B("span", Eo, [
|
|
2175
|
-
|
|
2176
|
-
|
|
2175
|
+
S(n.$slots, "title", {}, () => [
|
|
2176
|
+
j(R(n.title), 1)
|
|
2177
2177
|
])
|
|
2178
2178
|
]),
|
|
2179
|
-
|
|
2179
|
+
s[0] || (s[0] = B("span", {
|
|
2180
2180
|
class: "vf-accordion__icon",
|
|
2181
2181
|
"aria-hidden": "true"
|
|
2182
2182
|
}, null, -1))
|
|
2183
2183
|
], 8, Ao),
|
|
2184
|
-
|
|
2184
|
+
u.value ? (b(), _("div", {
|
|
2185
2185
|
key: 0,
|
|
2186
2186
|
id: i.value,
|
|
2187
|
-
class:
|
|
2187
|
+
class: L(["vf-accordion__panel", { "vf-accordion__panel_open": o.value }]),
|
|
2188
2188
|
role: "region",
|
|
2189
2189
|
"aria-labelledby": d.value,
|
|
2190
2190
|
"aria-hidden": o.value ? void 0 : "true"
|
|
2191
2191
|
}, [
|
|
2192
2192
|
B("div", Ko, [
|
|
2193
|
-
|
|
2193
|
+
S(n.$slots, "default")
|
|
2194
2194
|
])
|
|
2195
2195
|
], 10, Ho)) : P("", !0)
|
|
2196
2196
|
], 2));
|
|
2197
2197
|
}
|
|
2198
|
-
}), No = ["data-severity"],
|
|
2198
|
+
}), No = ["data-severity"], Yo = { class: "vf-toast__body" }, Go = {
|
|
2199
2199
|
key: 0,
|
|
2200
2200
|
class: "vf-toast__title"
|
|
2201
2201
|
}, jo = {
|
|
2202
2202
|
key: 1,
|
|
2203
2203
|
class: "vf-toast__message"
|
|
2204
|
-
},
|
|
2204
|
+
}, Kr = /* @__PURE__ */ Y({
|
|
2205
2205
|
__name: "toast",
|
|
2206
2206
|
props: {
|
|
2207
2207
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -2221,10 +2221,10 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
2221
2221
|
d(), !(!o.modelValue || o.duration <= 0) && (a = window.setTimeout(() => {
|
|
2222
2222
|
r("update:modelValue", !1), r("close");
|
|
2223
2223
|
}, o.duration));
|
|
2224
|
-
},
|
|
2224
|
+
}, u = () => {
|
|
2225
2225
|
d(), r("update:modelValue", !1), r("close");
|
|
2226
2226
|
};
|
|
2227
|
-
return
|
|
2227
|
+
return Q(
|
|
2228
2228
|
() => o.modelValue,
|
|
2229
2229
|
(l) => {
|
|
2230
2230
|
l && r("open"), i();
|
|
@@ -2232,48 +2232,48 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
2232
2232
|
{ immediate: !0 }
|
|
2233
2233
|
), $e(() => {
|
|
2234
2234
|
d();
|
|
2235
|
-
}), (l,
|
|
2235
|
+
}), (l, c) => fe((b(), _("div", {
|
|
2236
2236
|
class: "vf-toast",
|
|
2237
2237
|
role: "status",
|
|
2238
2238
|
"aria-live": "polite",
|
|
2239
2239
|
"data-severity": l.severity
|
|
2240
2240
|
}, [
|
|
2241
|
-
B("div",
|
|
2242
|
-
l.title ? (
|
|
2243
|
-
l.message || l.$slots.default ? (
|
|
2244
|
-
|
|
2245
|
-
|
|
2241
|
+
B("div", Yo, [
|
|
2242
|
+
l.title ? (b(), _("div", Go, R(l.title), 1)) : P("", !0),
|
|
2243
|
+
l.message || l.$slots.default ? (b(), _("div", jo, [
|
|
2244
|
+
S(l.$slots, "default", {}, () => [
|
|
2245
|
+
j(R(l.message), 1)
|
|
2246
2246
|
])
|
|
2247
2247
|
])) : P("", !0)
|
|
2248
2248
|
]),
|
|
2249
|
-
l.closable ? (
|
|
2249
|
+
l.closable ? (b(), _("button", {
|
|
2250
2250
|
key: 0,
|
|
2251
2251
|
class: "vf-toast__close",
|
|
2252
2252
|
type: "button",
|
|
2253
|
-
onClick:
|
|
2253
|
+
onClick: u
|
|
2254
2254
|
}, [
|
|
2255
|
-
|
|
2256
|
-
|
|
2255
|
+
S(l.$slots, "close", {}, () => [
|
|
2256
|
+
c[0] || (c[0] = j("×"))
|
|
2257
2257
|
])
|
|
2258
2258
|
])) : P("", !0)
|
|
2259
2259
|
], 8, No)), [
|
|
2260
2260
|
[pe, l.modelValue]
|
|
2261
2261
|
]);
|
|
2262
2262
|
}
|
|
2263
|
-
}),
|
|
2263
|
+
}), Nr = /* @__PURE__ */ Y({
|
|
2264
2264
|
__name: "toast-container",
|
|
2265
2265
|
props: {
|
|
2266
2266
|
position: { default: "top-right" }
|
|
2267
2267
|
},
|
|
2268
2268
|
setup(t) {
|
|
2269
2269
|
const e = t, r = y(() => `vf-toast-container_${e.position}`);
|
|
2270
|
-
return (o, a) => (
|
|
2270
|
+
return (o, a) => (b(), se(we, { to: "body" }, [
|
|
2271
2271
|
B("div", {
|
|
2272
|
-
class:
|
|
2272
|
+
class: L(["vf-toast-container", r.value]),
|
|
2273
2273
|
role: "region",
|
|
2274
2274
|
"aria-live": "polite"
|
|
2275
2275
|
}, [
|
|
2276
|
-
|
|
2276
|
+
S(o.$slots, "default")
|
|
2277
2277
|
], 2)
|
|
2278
2278
|
]));
|
|
2279
2279
|
}
|
|
@@ -2290,7 +2290,7 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
2290
2290
|
}, Qo = {
|
|
2291
2291
|
key: 1,
|
|
2292
2292
|
class: "vf-alert__actions"
|
|
2293
|
-
},
|
|
2293
|
+
}, Yr = /* @__PURE__ */ Y({
|
|
2294
2294
|
__name: "alert",
|
|
2295
2295
|
props: {
|
|
2296
2296
|
modelValue: { type: Boolean },
|
|
@@ -2303,50 +2303,50 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
2303
2303
|
emits: ["update:modelValue", "close"],
|
|
2304
2304
|
setup(t, { emit: e }) {
|
|
2305
2305
|
const r = e, o = t, a = O(!0), d = y(() => typeof o.modelValue == "boolean"), i = y(() => d.value ? o.modelValue : a.value);
|
|
2306
|
-
|
|
2306
|
+
Q(
|
|
2307
2307
|
() => o.modelValue,
|
|
2308
2308
|
(l) => {
|
|
2309
2309
|
typeof l == "boolean" && (a.value = l);
|
|
2310
2310
|
},
|
|
2311
2311
|
{ immediate: !0 }
|
|
2312
2312
|
);
|
|
2313
|
-
const
|
|
2313
|
+
const u = () => {
|
|
2314
2314
|
d.value ? r("update:modelValue", !1) : a.value = !1, r("close");
|
|
2315
2315
|
};
|
|
2316
|
-
return (l,
|
|
2316
|
+
return (l, c) => fe((b(), _("div", {
|
|
2317
2317
|
class: "vf-alert",
|
|
2318
2318
|
role: "alert",
|
|
2319
2319
|
"data-severity": l.severity
|
|
2320
2320
|
}, [
|
|
2321
|
-
l.$slots.icon || l.icon ? (
|
|
2322
|
-
|
|
2323
|
-
|
|
2321
|
+
l.$slots.icon || l.icon ? (b(), _("div", qo, [
|
|
2322
|
+
S(l.$slots, "icon", {}, () => [
|
|
2323
|
+
j(R(l.icon), 1)
|
|
2324
2324
|
])
|
|
2325
2325
|
])) : P("", !0),
|
|
2326
2326
|
B("div", Uo, [
|
|
2327
|
-
l.title || l.$slots.title ? (
|
|
2328
|
-
|
|
2329
|
-
|
|
2327
|
+
l.title || l.$slots.title ? (b(), _("div", Zo, [
|
|
2328
|
+
S(l.$slots, "title", {}, () => [
|
|
2329
|
+
j(R(l.title), 1)
|
|
2330
2330
|
])
|
|
2331
2331
|
])) : P("", !0),
|
|
2332
|
-
l.message || l.$slots.default ? (
|
|
2333
|
-
|
|
2334
|
-
|
|
2332
|
+
l.message || l.$slots.default ? (b(), _("div", Jo, [
|
|
2333
|
+
S(l.$slots, "default", {}, () => [
|
|
2334
|
+
j(R(l.message), 1)
|
|
2335
2335
|
])
|
|
2336
2336
|
])) : P("", !0)
|
|
2337
2337
|
]),
|
|
2338
|
-
l.$slots.actions ? (
|
|
2339
|
-
|
|
2338
|
+
l.$slots.actions ? (b(), _("div", Qo, [
|
|
2339
|
+
S(l.$slots, "actions")
|
|
2340
2340
|
])) : P("", !0),
|
|
2341
|
-
l.closable ? (
|
|
2341
|
+
l.closable ? (b(), _("button", {
|
|
2342
2342
|
key: 2,
|
|
2343
2343
|
class: "vf-alert__close",
|
|
2344
2344
|
type: "button",
|
|
2345
2345
|
"aria-label": "Close",
|
|
2346
|
-
onClick:
|
|
2346
|
+
onClick: u
|
|
2347
2347
|
}, [
|
|
2348
|
-
|
|
2349
|
-
|
|
2348
|
+
S(l.$slots, "close", {}, () => [
|
|
2349
|
+
c[0] || (c[0] = j("×"))
|
|
2350
2350
|
])
|
|
2351
2351
|
])) : P("", !0)
|
|
2352
2352
|
], 8, Xo)), [
|
|
@@ -2356,7 +2356,7 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
2356
2356
|
}), ea = ["checked", "disabled"], ta = {
|
|
2357
2357
|
key: 0,
|
|
2358
2358
|
class: "vf-switch__label"
|
|
2359
|
-
},
|
|
2359
|
+
}, Gr = /* @__PURE__ */ Y({
|
|
2360
2360
|
__name: "switch",
|
|
2361
2361
|
props: {
|
|
2362
2362
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -2369,11 +2369,11 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
2369
2369
|
const i = ["vf-switch"];
|
|
2370
2370
|
return o.disabled && i.push("vf-switch_disabled"), i;
|
|
2371
2371
|
}), d = (i) => {
|
|
2372
|
-
const
|
|
2373
|
-
r("update:modelValue",
|
|
2372
|
+
const u = i.target;
|
|
2373
|
+
r("update:modelValue", u.checked), r("change", i);
|
|
2374
2374
|
};
|
|
2375
|
-
return (i,
|
|
2376
|
-
class:
|
|
2375
|
+
return (i, u) => (b(), _("label", {
|
|
2376
|
+
class: L(a.value)
|
|
2377
2377
|
}, [
|
|
2378
2378
|
B("input", {
|
|
2379
2379
|
class: "vf-switch__control",
|
|
@@ -2382,26 +2382,26 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
2382
2382
|
disabled: i.disabled,
|
|
2383
2383
|
onChange: d
|
|
2384
2384
|
}, null, 40, ea),
|
|
2385
|
-
|
|
2385
|
+
u[0] || (u[0] = B("span", { class: "vf-switch__track" }, [
|
|
2386
2386
|
B("span", { class: "vf-switch__thumb" })
|
|
2387
2387
|
], -1)),
|
|
2388
|
-
i.label || i.$slots.default ? (
|
|
2389
|
-
|
|
2390
|
-
|
|
2388
|
+
i.label || i.$slots.default ? (b(), _("span", ta, [
|
|
2389
|
+
S(i.$slots, "default", {}, () => [
|
|
2390
|
+
j(R(i.label), 1)
|
|
2391
2391
|
])
|
|
2392
2392
|
])) : P("", !0)
|
|
2393
2393
|
], 2));
|
|
2394
2394
|
}
|
|
2395
|
-
}), oa = { class: "vf-popover" }, aa = ["aria-expanded", "onKeydown"],
|
|
2395
|
+
}), oa = { class: "vf-popover" }, aa = ["aria-expanded", "onKeydown"], jr = /* @__PURE__ */ Y({
|
|
2396
2396
|
__name: "popover",
|
|
2397
2397
|
emits: ["click", "onClick"],
|
|
2398
2398
|
setup(t, { expose: e, emit: r }) {
|
|
2399
|
-
const o = r, a =
|
|
2399
|
+
const o = r, a = nt({ visible: !1 });
|
|
2400
2400
|
let d = 0;
|
|
2401
|
-
const i = `vf-popover-panel-${++d}`,
|
|
2402
|
-
|
|
2401
|
+
const i = `vf-popover-panel-${++d}`, u = () => a.visible = !0, l = () => a.visible = !1, c = () => a.visible = !a.visible, n = () => {
|
|
2402
|
+
c(), o("click"), o("onClick");
|
|
2403
2403
|
};
|
|
2404
|
-
return e({ show:
|
|
2404
|
+
return e({ show: u, hide: l, toggle: c }), (s, f) => (b(), _("div", oa, [
|
|
2405
2405
|
B("div", {
|
|
2406
2406
|
class: "vf-popover__button",
|
|
2407
2407
|
role: "button",
|
|
@@ -2409,13 +2409,13 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
2409
2409
|
"aria-haspopup": "dialog",
|
|
2410
2410
|
"aria-expanded": a.visible,
|
|
2411
2411
|
"aria-controls": i,
|
|
2412
|
-
onClick:
|
|
2412
|
+
onClick: n,
|
|
2413
2413
|
onKeydown: [
|
|
2414
|
-
Z(U(
|
|
2415
|
-
Z(U(
|
|
2414
|
+
Z(U(n, ["prevent"]), ["enter"]),
|
|
2415
|
+
Z(U(n, ["prevent"]), ["space"])
|
|
2416
2416
|
]
|
|
2417
2417
|
}, [
|
|
2418
|
-
|
|
2418
|
+
S(s.$slots, "button")
|
|
2419
2419
|
], 40, aa),
|
|
2420
2420
|
fe(Je(_t, {
|
|
2421
2421
|
id: i,
|
|
@@ -2426,34 +2426,34 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
2426
2426
|
]),
|
|
2427
2427
|
_: 2
|
|
2428
2428
|
}, [
|
|
2429
|
-
|
|
2429
|
+
s.$slots.default ? {
|
|
2430
2430
|
name: "default",
|
|
2431
2431
|
fn: _e(() => [
|
|
2432
|
-
|
|
2432
|
+
S(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
2438
|
fn: _e(() => [
|
|
2439
|
-
|
|
2440
|
-
|
|
2439
|
+
S(s.$slots, "header"),
|
|
2440
|
+
s.$slots.header ? P("", !0) : S(s.$slots, "popoverHeader", { key: 0 })
|
|
2441
2441
|
]),
|
|
2442
2442
|
key: "1"
|
|
2443
2443
|
} : void 0,
|
|
2444
|
-
|
|
2444
|
+
s.$slots.body || s.$slots.popoverBody ? {
|
|
2445
2445
|
name: "body",
|
|
2446
2446
|
fn: _e(() => [
|
|
2447
|
-
|
|
2448
|
-
|
|
2447
|
+
S(s.$slots, "body"),
|
|
2448
|
+
s.$slots.body ? P("", !0) : S(s.$slots, "popoverBody", { key: 0 })
|
|
2449
2449
|
]),
|
|
2450
2450
|
key: "2"
|
|
2451
2451
|
} : void 0,
|
|
2452
|
-
|
|
2452
|
+
s.$slots.footer || s.$slots.popoverFooter ? {
|
|
2453
2453
|
name: "footer",
|
|
2454
2454
|
fn: _e(() => [
|
|
2455
|
-
|
|
2456
|
-
|
|
2455
|
+
S(s.$slots, "footer"),
|
|
2456
|
+
s.$slots.footer ? P("", !0) : S(s.$slots, "popoverFooter", { key: 0 })
|
|
2457
2457
|
]),
|
|
2458
2458
|
key: "3"
|
|
2459
2459
|
} : void 0
|
|
@@ -2465,13 +2465,13 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
2465
2465
|
}), ra = ["aria-labelledby", "aria-describedby"], la = {
|
|
2466
2466
|
key: 0,
|
|
2467
2467
|
class: "vf-modal__header"
|
|
2468
|
-
},
|
|
2468
|
+
}, sa = {
|
|
2469
2469
|
key: 0,
|
|
2470
2470
|
class: "vf-modal__title"
|
|
2471
|
-
},
|
|
2471
|
+
}, na = {
|
|
2472
2472
|
key: 3,
|
|
2473
2473
|
class: "vf-modal__footer"
|
|
2474
|
-
},
|
|
2474
|
+
}, Xr = /* @__PURE__ */ Y({
|
|
2475
2475
|
__name: "modal",
|
|
2476
2476
|
props: {
|
|
2477
2477
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -2485,51 +2485,51 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
2485
2485
|
emits: ["update:modelValue", "open", "close"],
|
|
2486
2486
|
setup(t, { expose: e, emit: r }) {
|
|
2487
2487
|
const o = r, a = t;
|
|
2488
|
-
let d = 0, i = 0,
|
|
2489
|
-
const
|
|
2490
|
-
const
|
|
2491
|
-
return a.size !== "md" &&
|
|
2492
|
-
}),
|
|
2488
|
+
let d = 0, i = 0, u = "", l = null;
|
|
2489
|
+
const c = O(null), n = He(), s = `vf-modal-title-${++d}`, f = `vf-modal-body-${d}`, p = y(() => !!a.title || !!n.header), v = y(() => !!n.body || !!n.default), $ = y(() => {
|
|
2490
|
+
const g = ["vf-modal"];
|
|
2491
|
+
return a.size !== "md" && g.push(`vf-modal_${a.size}`), g;
|
|
2492
|
+
}), C = () => o("update:modelValue", !0), w = () => {
|
|
2493
2493
|
o("update:modelValue", !1), o("close");
|
|
2494
2494
|
}, D = () => {
|
|
2495
2495
|
a.closeOnOverlay && w();
|
|
2496
|
-
},
|
|
2497
|
-
!a.modelValue || !a.closeOnEsc ||
|
|
2498
|
-
}, H = () =>
|
|
2496
|
+
}, T = (g) => {
|
|
2497
|
+
!a.modelValue || !a.closeOnEsc || g.key === "Escape" && (g.preventDefault(), w());
|
|
2498
|
+
}, H = () => c.value ? Array.from(c.value.querySelectorAll('a[href],button:not([disabled]),textarea:not([disabled]),input:not([disabled]),select:not([disabled]),[tabindex]:not([tabindex="-1"])')).filter((h) => !h.hasAttribute("disabled") && !h.getAttribute("aria-hidden")) : [], I = () => {
|
|
2499
2499
|
var h;
|
|
2500
|
-
const
|
|
2501
|
-
|
|
2502
|
-
}, M = (
|
|
2500
|
+
const g = H();
|
|
2501
|
+
g.length ? g[0].focus() : (h = c.value) == null || h.focus();
|
|
2502
|
+
}, M = (g) => {
|
|
2503
2503
|
var q;
|
|
2504
|
-
if (
|
|
2504
|
+
if (g.key !== "Tab")
|
|
2505
2505
|
return;
|
|
2506
2506
|
const h = H();
|
|
2507
2507
|
if (!h.length) {
|
|
2508
|
-
|
|
2508
|
+
g.preventDefault(), (q = c.value) == null || q.focus();
|
|
2509
2509
|
return;
|
|
2510
2510
|
}
|
|
2511
|
-
const
|
|
2512
|
-
if (
|
|
2513
|
-
|
|
2511
|
+
const k = h[0], W = h[h.length - 1], A = document.activeElement;
|
|
2512
|
+
if (g.shiftKey && A === k) {
|
|
2513
|
+
g.preventDefault(), W.focus();
|
|
2514
2514
|
return;
|
|
2515
2515
|
}
|
|
2516
|
-
!
|
|
2516
|
+
!g.shiftKey && A === W && (g.preventDefault(), k.focus());
|
|
2517
2517
|
}, E = () => {
|
|
2518
|
-
!a.lockScroll || typeof document > "u" || (i === 0 && (
|
|
2519
|
-
},
|
|
2520
|
-
!a.lockScroll || typeof document > "u" || (i = Math.max(0, i - 1), i === 0 && (document.body.style.overflow =
|
|
2518
|
+
!a.lockScroll || typeof document > "u" || (i === 0 && (u = document.body.style.overflow, document.body.style.overflow = "hidden"), i += 1);
|
|
2519
|
+
}, F = () => {
|
|
2520
|
+
!a.lockScroll || typeof document > "u" || (i = Math.max(0, i - 1), i === 0 && (document.body.style.overflow = u));
|
|
2521
2521
|
};
|
|
2522
|
-
return
|
|
2522
|
+
return Q(
|
|
2523
2523
|
() => a.modelValue,
|
|
2524
|
-
async (
|
|
2525
|
-
|
|
2524
|
+
async (g) => {
|
|
2525
|
+
g ? (typeof document < "u" && (l = document.activeElement), E(), o("open"), await ke(), I(), typeof document < "u" && document.addEventListener("keydown", T)) : (F(), typeof document < "u" && (document.removeEventListener("keydown", T), l == null || l.focus()));
|
|
2526
2526
|
},
|
|
2527
2527
|
{ immediate: !0 }
|
|
2528
2528
|
), $e(() => {
|
|
2529
|
-
|
|
2530
|
-
}), e({ open:
|
|
2529
|
+
F(), typeof document < "u" && document.removeEventListener("keydown", T);
|
|
2530
|
+
}), e({ open: C, close: w }), (g, h) => (b(), se(we, { to: "body" }, [
|
|
2531
2531
|
fe(B("div", {
|
|
2532
|
-
class:
|
|
2532
|
+
class: L($.value),
|
|
2533
2533
|
role: "presentation"
|
|
2534
2534
|
}, [
|
|
2535
2535
|
B("div", {
|
|
@@ -2538,26 +2538,26 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
2538
2538
|
}),
|
|
2539
2539
|
B("div", {
|
|
2540
2540
|
ref_key: "panel",
|
|
2541
|
-
ref:
|
|
2541
|
+
ref: c,
|
|
2542
2542
|
class: "vf-modal__panel",
|
|
2543
2543
|
role: "dialog",
|
|
2544
2544
|
"aria-modal": "true",
|
|
2545
|
-
"aria-labelledby": p.value ?
|
|
2545
|
+
"aria-labelledby": p.value ? s : void 0,
|
|
2546
2546
|
"aria-describedby": v.value ? f : void 0,
|
|
2547
2547
|
tabindex: "-1",
|
|
2548
2548
|
onKeydown: M
|
|
2549
2549
|
}, [
|
|
2550
|
-
p.value ? (
|
|
2550
|
+
p.value ? (b(), _("div", la, [
|
|
2551
2551
|
B("div", {
|
|
2552
|
-
id:
|
|
2552
|
+
id: s,
|
|
2553
2553
|
class: "vf-modal__header-content"
|
|
2554
2554
|
}, [
|
|
2555
|
-
|
|
2556
|
-
|
|
2555
|
+
S(g.$slots, "header", {}, () => [
|
|
2556
|
+
g.title ? (b(), _("h3", sa, R(g.title), 1)) : P("", !0)
|
|
2557
2557
|
])
|
|
2558
2558
|
])
|
|
2559
2559
|
])) : P("", !0),
|
|
2560
|
-
|
|
2560
|
+
g.showClose ? S(g.$slots, "close", {
|
|
2561
2561
|
key: 1,
|
|
2562
2562
|
close: w
|
|
2563
2563
|
}, () => [
|
|
@@ -2568,20 +2568,20 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
2568
2568
|
onClick: w
|
|
2569
2569
|
}, "×")
|
|
2570
2570
|
]) : P("", !0),
|
|
2571
|
-
|
|
2571
|
+
g.$slots.body || g.$slots.default ? (b(), _("div", {
|
|
2572
2572
|
key: 2,
|
|
2573
2573
|
id: f,
|
|
2574
2574
|
class: "vf-modal__body"
|
|
2575
2575
|
}, [
|
|
2576
|
-
|
|
2577
|
-
|
|
2576
|
+
S(g.$slots, "body"),
|
|
2577
|
+
g.$slots.body ? P("", !0) : S(g.$slots, "default", { key: 0 })
|
|
2578
2578
|
])) : P("", !0),
|
|
2579
|
-
|
|
2580
|
-
|
|
2579
|
+
g.$slots.footer ? (b(), _("div", na, [
|
|
2580
|
+
S(g.$slots, "footer")
|
|
2581
2581
|
])) : P("", !0)
|
|
2582
2582
|
], 40, ra)
|
|
2583
2583
|
], 2), [
|
|
2584
|
-
[pe,
|
|
2584
|
+
[pe, g.modelValue]
|
|
2585
2585
|
])
|
|
2586
2586
|
]));
|
|
2587
2587
|
}
|
|
@@ -2589,7 +2589,7 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
2589
2589
|
key: 0,
|
|
2590
2590
|
class: "vf-tooltip__arrow",
|
|
2591
2591
|
"aria-hidden": "true"
|
|
2592
|
-
},
|
|
2592
|
+
}, qr = /* @__PURE__ */ Y({
|
|
2593
2593
|
__name: "tooltip",
|
|
2594
2594
|
props: {
|
|
2595
2595
|
text: { default: "" },
|
|
@@ -2600,70 +2600,70 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
2600
2600
|
setup(t) {
|
|
2601
2601
|
const e = t;
|
|
2602
2602
|
let r = 0;
|
|
2603
|
-
const o = O(null), a = O(null), d = O(!1), i = O("top"),
|
|
2603
|
+
const o = O(null), a = O(null), d = O(!1), i = O("top"), u = `vf-tooltip-${++r}`;
|
|
2604
2604
|
let l = null;
|
|
2605
|
-
const
|
|
2605
|
+
const c = () => {
|
|
2606
2606
|
e.disabled || (d.value = !0);
|
|
2607
|
-
}, s = () => {
|
|
2608
|
-
d.value = !1;
|
|
2609
2607
|
}, n = () => {
|
|
2608
|
+
d.value = !1;
|
|
2609
|
+
}, s = () => {
|
|
2610
2610
|
if (!o.value || !a.value)
|
|
2611
2611
|
return;
|
|
2612
2612
|
const p = o.value, v = a.value, $ = async () => {
|
|
2613
2613
|
const {
|
|
2614
|
-
x:
|
|
2614
|
+
x: T,
|
|
2615
2615
|
y: H,
|
|
2616
2616
|
placement: I
|
|
2617
2617
|
} = await Re(p, v, {
|
|
2618
2618
|
placement: e.placement,
|
|
2619
2619
|
strategy: "fixed",
|
|
2620
|
-
middleware: [
|
|
2620
|
+
middleware: [Te(8), Ve(), Ot()]
|
|
2621
2621
|
});
|
|
2622
|
-
i.value = I ?? e.placement, v.style.left = `${
|
|
2623
|
-
},
|
|
2622
|
+
i.value = I ?? e.placement, v.style.left = `${T}px`, v.style.top = `${H}px`;
|
|
2623
|
+
}, C = async () => {
|
|
2624
2624
|
await $();
|
|
2625
|
-
}, w =
|
|
2626
|
-
|
|
2625
|
+
}, w = Le(p, () => {
|
|
2626
|
+
C();
|
|
2627
2627
|
}), D = () => {
|
|
2628
|
-
|
|
2628
|
+
C();
|
|
2629
2629
|
};
|
|
2630
2630
|
document.addEventListener("scroll", D, !0), window.addEventListener("resize", D, !1), l = {
|
|
2631
|
-
update:
|
|
2631
|
+
update: C,
|
|
2632
2632
|
destroy: () => {
|
|
2633
2633
|
w(), document.removeEventListener("scroll", D, !0), window.removeEventListener("resize", D, !1);
|
|
2634
2634
|
}
|
|
2635
2635
|
}, l.update();
|
|
2636
2636
|
};
|
|
2637
|
-
|
|
2637
|
+
Q(d, async (p) => {
|
|
2638
2638
|
if (!p) {
|
|
2639
2639
|
l && (l.destroy(), l = null);
|
|
2640
2640
|
return;
|
|
2641
2641
|
}
|
|
2642
|
-
l ||
|
|
2643
|
-
}),
|
|
2644
|
-
d.value &&
|
|
2642
|
+
l || s(), l == null || l.update();
|
|
2643
|
+
}), Fe(() => {
|
|
2644
|
+
d.value && s();
|
|
2645
2645
|
}), $e(() => {
|
|
2646
2646
|
l == null || l.destroy(), l = null;
|
|
2647
2647
|
});
|
|
2648
2648
|
const f = y(() => !!e.text || !!(a.value && a.value.textContent));
|
|
2649
|
-
return
|
|
2649
|
+
return Q(f, (p) => {
|
|
2650
2650
|
p || (d.value = !1);
|
|
2651
|
-
}), (p, v) => (
|
|
2651
|
+
}), (p, v) => (b(), _(ae, null, [
|
|
2652
2652
|
B("span", {
|
|
2653
2653
|
ref_key: "trigger",
|
|
2654
2654
|
ref: o,
|
|
2655
2655
|
class: "vf-tooltip__trigger",
|
|
2656
|
-
"aria-describedby":
|
|
2657
|
-
onMouseenter:
|
|
2658
|
-
onMouseleave:
|
|
2659
|
-
onFocus:
|
|
2660
|
-
onBlur:
|
|
2656
|
+
"aria-describedby": u,
|
|
2657
|
+
onMouseenter: c,
|
|
2658
|
+
onMouseleave: n,
|
|
2659
|
+
onFocus: c,
|
|
2660
|
+
onBlur: n
|
|
2661
2661
|
}, [
|
|
2662
|
-
|
|
2662
|
+
S(p.$slots, "default")
|
|
2663
2663
|
], 544),
|
|
2664
|
-
(
|
|
2664
|
+
(b(), se(we, { to: "body" }, [
|
|
2665
2665
|
fe(B("div", {
|
|
2666
|
-
id:
|
|
2666
|
+
id: u,
|
|
2667
2667
|
ref_key: "panel",
|
|
2668
2668
|
ref: a,
|
|
2669
2669
|
class: "vf-tooltip",
|
|
@@ -2671,18 +2671,18 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
2671
2671
|
"data-placement": i.value
|
|
2672
2672
|
}, [
|
|
2673
2673
|
B("span", da, [
|
|
2674
|
-
|
|
2675
|
-
|
|
2674
|
+
S(p.$slots, "content", {}, () => [
|
|
2675
|
+
j(R(p.text), 1)
|
|
2676
2676
|
])
|
|
2677
2677
|
]),
|
|
2678
|
-
p.arrow ? (
|
|
2678
|
+
p.arrow ? (b(), _("span", ca)) : P("", !0)
|
|
2679
2679
|
], 8, ia), [
|
|
2680
2680
|
[pe, d.value]
|
|
2681
2681
|
])
|
|
2682
2682
|
]))
|
|
2683
2683
|
], 64));
|
|
2684
2684
|
}
|
|
2685
|
-
}),
|
|
2685
|
+
}), Ur = /* @__PURE__ */ Y({
|
|
2686
2686
|
__name: "skeleton",
|
|
2687
2687
|
props: {
|
|
2688
2688
|
width: {},
|
|
@@ -2695,15 +2695,15 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
2695
2695
|
if (!(d == null || d === ""))
|
|
2696
2696
|
return typeof d == "number" ? `${d}px` : d;
|
|
2697
2697
|
}, o = y(() => {
|
|
2698
|
-
const d = r(e.width), i = r(e.height),
|
|
2699
|
-
return d && (
|
|
2698
|
+
const d = r(e.width), i = r(e.height), u = {};
|
|
2699
|
+
return d && (u.width = d), i && (u.height = i), e.variant === "circle" && (!d && i && (u.width = i), !i && d && (u.height = d)), u;
|
|
2700
2700
|
}), a = y(() => {
|
|
2701
2701
|
const d = ["vf-skeleton", `vf-skeleton_${e.variant}`];
|
|
2702
2702
|
return e.animated && d.push("vf-skeleton_animated"), d;
|
|
2703
2703
|
});
|
|
2704
|
-
return (d, i) => (
|
|
2705
|
-
class:
|
|
2706
|
-
style:
|
|
2704
|
+
return (d, i) => (b(), _("div", {
|
|
2705
|
+
class: L(a.value),
|
|
2706
|
+
style: Se(o.value),
|
|
2707
2707
|
"aria-hidden": "true"
|
|
2708
2708
|
}, null, 6));
|
|
2709
2709
|
}
|
|
@@ -2717,10 +2717,10 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
2717
2717
|
viewBox: "0 0 100 100",
|
|
2718
2718
|
class: "vf-progress__svg",
|
|
2719
2719
|
"aria-hidden": "true"
|
|
2720
|
-
},
|
|
2720
|
+
}, ga = {
|
|
2721
2721
|
key: 2,
|
|
2722
2722
|
class: "vf-progress__label"
|
|
2723
|
-
},
|
|
2723
|
+
}, Zr = /* @__PURE__ */ Y({
|
|
2724
2724
|
__name: "progress",
|
|
2725
2725
|
props: {
|
|
2726
2726
|
value: {},
|
|
@@ -2732,26 +2732,26 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
2732
2732
|
ariaLabel: { default: "" }
|
|
2733
2733
|
},
|
|
2734
2734
|
setup(t) {
|
|
2735
|
-
const e = t, r = He(), o = (p) => Math.min(100, Math.max(0, p)), a = y(() => e.value === void 0 || e.value === null || Number.isNaN(e.value)), d = y(() => a.value ? 0 : o(Number(e.value))), i = y(() => a.value ? void 0 : d.value),
|
|
2735
|
+
const e = t, r = He(), o = (p) => Math.min(100, Math.max(0, p)), a = y(() => e.value === void 0 || e.value === null || Number.isNaN(e.value)), d = y(() => a.value ? 0 : o(Number(e.value))), i = y(() => a.value ? void 0 : d.value), u = y(() => !!r.default), l = y(() => e.label ? e.label : e.showValue && !a.value ? `${Math.round(d.value)}%` : ""), c = y(() => {
|
|
2736
2736
|
const p = ["vf-progress", `vf-progress_${e.variant}`, `vf-progress_size-${e.size}`];
|
|
2737
2737
|
return a.value && p.push("vf-progress_indeterminate"), p;
|
|
2738
|
-
}),
|
|
2738
|
+
}), n = y(() => {
|
|
2739
2739
|
if (!a.value)
|
|
2740
2740
|
return { width: `${d.value}%` };
|
|
2741
|
-
}),
|
|
2741
|
+
}), s = 2 * Math.PI * 45, f = y(() => {
|
|
2742
2742
|
if (a.value)
|
|
2743
2743
|
return {
|
|
2744
|
-
strokeDasharray: `${
|
|
2745
|
-
strokeDashoffset: `${
|
|
2744
|
+
strokeDasharray: `${s}px`,
|
|
2745
|
+
strokeDashoffset: `${s * 0.75}px`
|
|
2746
2746
|
};
|
|
2747
|
-
const p =
|
|
2747
|
+
const p = s - d.value / 100 * s;
|
|
2748
2748
|
return {
|
|
2749
|
-
strokeDasharray: `${
|
|
2749
|
+
strokeDasharray: `${s}px`,
|
|
2750
2750
|
strokeDashoffset: `${p}px`
|
|
2751
2751
|
};
|
|
2752
2752
|
});
|
|
2753
|
-
return (p, v) => (
|
|
2754
|
-
class:
|
|
2753
|
+
return (p, v) => (b(), _("div", {
|
|
2754
|
+
class: L(c.value),
|
|
2755
2755
|
role: "progressbar",
|
|
2756
2756
|
"aria-label": p.ariaLabel || void 0,
|
|
2757
2757
|
"aria-valuemin": "0",
|
|
@@ -2759,13 +2759,13 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
2759
2759
|
"aria-valuenow": i.value,
|
|
2760
2760
|
"data-severity": p.severity
|
|
2761
2761
|
}, [
|
|
2762
|
-
p.variant === "linear" ? (
|
|
2762
|
+
p.variant === "linear" ? (b(), _("div", va, [
|
|
2763
2763
|
B("div", {
|
|
2764
2764
|
class: "vf-progress__bar",
|
|
2765
|
-
style:
|
|
2765
|
+
style: Se(n.value)
|
|
2766
2766
|
}, null, 4)
|
|
2767
|
-
])) : (
|
|
2768
|
-
(
|
|
2767
|
+
])) : (b(), _("div", fa, [
|
|
2768
|
+
(b(), _("svg", pa, [
|
|
2769
2769
|
v[0] || (v[0] = B("circle", {
|
|
2770
2770
|
class: "vf-progress__circle-track",
|
|
2771
2771
|
cx: "50",
|
|
@@ -2777,30 +2777,111 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
2777
2777
|
cx: "50",
|
|
2778
2778
|
cy: "50",
|
|
2779
2779
|
r: "45",
|
|
2780
|
-
style:
|
|
2780
|
+
style: Se(f.value)
|
|
2781
2781
|
}, null, 4)
|
|
2782
2782
|
]))
|
|
2783
2783
|
])),
|
|
2784
|
-
l.value ||
|
|
2785
|
-
|
|
2786
|
-
|
|
2784
|
+
l.value || u.value ? (b(), _("span", ga, [
|
|
2785
|
+
S(p.$slots, "default", {}, () => [
|
|
2786
|
+
j(R(l.value), 1)
|
|
2787
2787
|
])
|
|
2788
2788
|
])) : P("", !0)
|
|
2789
2789
|
], 10, ua));
|
|
2790
2790
|
}
|
|
2791
|
-
}),
|
|
2791
|
+
}), ba = ["data-variant", "data-severity", "aria-label"], Jr = /* @__PURE__ */ Y({
|
|
2792
|
+
__name: "badge",
|
|
2793
|
+
props: {
|
|
2794
|
+
label: { default: "" },
|
|
2795
|
+
size: { default: "normal" },
|
|
2796
|
+
variant: { default: "soft" },
|
|
2797
|
+
severity: { default: "neutral" },
|
|
2798
|
+
ariaLabel: { default: "" }
|
|
2799
|
+
},
|
|
2800
|
+
setup(t) {
|
|
2801
|
+
const e = t, r = y(() => [`vf-badge_size-${e.size}`]);
|
|
2802
|
+
return (o, a) => (b(), _("span", {
|
|
2803
|
+
class: L(["vf-badge", r.value]),
|
|
2804
|
+
"data-variant": o.variant,
|
|
2805
|
+
"data-severity": o.severity,
|
|
2806
|
+
role: "status",
|
|
2807
|
+
"aria-label": o.ariaLabel || void 0
|
|
2808
|
+
}, [
|
|
2809
|
+
S(o.$slots, "default", {}, () => [
|
|
2810
|
+
j(R(o.label), 1)
|
|
2811
|
+
])
|
|
2812
|
+
], 10, ba));
|
|
2813
|
+
}
|
|
2814
|
+
}), ma = ["data-status", "aria-label"], ha = { class: "vf-avatar__content" }, ya = ["src", "alt"], _a = {
|
|
2815
|
+
key: 1,
|
|
2816
|
+
class: "vf-avatar__initials"
|
|
2817
|
+
}, Ca = ["data-status"], Qr = /* @__PURE__ */ Y({
|
|
2818
|
+
__name: "avatar",
|
|
2819
|
+
props: {
|
|
2820
|
+
src: { default: "" },
|
|
2821
|
+
alt: { default: "" },
|
|
2822
|
+
name: { default: "" },
|
|
2823
|
+
size: { default: "normal" },
|
|
2824
|
+
shape: { default: "circle" },
|
|
2825
|
+
status: { default: void 0 }
|
|
2826
|
+
},
|
|
2827
|
+
setup(t) {
|
|
2828
|
+
const e = t, r = O(!1), o = (c) => {
|
|
2829
|
+
const n = c.trim();
|
|
2830
|
+
if (!n)
|
|
2831
|
+
return "";
|
|
2832
|
+
const s = n.split(/\s+/).filter(Boolean);
|
|
2833
|
+
return s.length === 1 ? s[0].slice(0, 2).toUpperCase() : `${s[0][0]}${s[1][0]}`.toUpperCase();
|
|
2834
|
+
}, a = y(() => o(e.name || e.alt || "")), d = y(() => !!(e.src && !r.value)), i = y(() => {
|
|
2835
|
+
if (e.alt)
|
|
2836
|
+
return e.alt;
|
|
2837
|
+
if (e.name)
|
|
2838
|
+
return e.name;
|
|
2839
|
+
}), u = y(() => [`vf-avatar_size-${e.size}`, `vf-avatar_shape-${e.shape}`]), l = () => {
|
|
2840
|
+
r.value = !0;
|
|
2841
|
+
};
|
|
2842
|
+
return Q(
|
|
2843
|
+
() => e.src,
|
|
2844
|
+
() => {
|
|
2845
|
+
r.value = !1;
|
|
2846
|
+
}
|
|
2847
|
+
), (c, n) => (b(), _("div", {
|
|
2848
|
+
class: L(["vf-avatar", u.value]),
|
|
2849
|
+
"data-status": c.status || void 0,
|
|
2850
|
+
role: "img",
|
|
2851
|
+
"aria-label": i.value
|
|
2852
|
+
}, [
|
|
2853
|
+
B("div", ha, [
|
|
2854
|
+
S(c.$slots, "default", {}, () => [
|
|
2855
|
+
d.value ? (b(), _("img", {
|
|
2856
|
+
key: 0,
|
|
2857
|
+
class: "vf-avatar__image",
|
|
2858
|
+
src: c.src,
|
|
2859
|
+
alt: c.alt || c.name || "",
|
|
2860
|
+
onError: l
|
|
2861
|
+
}, null, 40, ya)) : (b(), _("span", _a, R(a.value), 1))
|
|
2862
|
+
])
|
|
2863
|
+
]),
|
|
2864
|
+
c.status ? (b(), _("span", {
|
|
2865
|
+
key: 0,
|
|
2866
|
+
class: "vf-avatar__status",
|
|
2867
|
+
"data-status": c.status,
|
|
2868
|
+
"aria-hidden": "true"
|
|
2869
|
+
}, null, 8, Ca)) : P("", !0)
|
|
2870
|
+
], 10, ma));
|
|
2871
|
+
}
|
|
2872
|
+
}), ka = ["aria-label"], $a = {
|
|
2792
2873
|
key: 0,
|
|
2793
2874
|
class: "vf-datatable__head"
|
|
2794
|
-
},
|
|
2875
|
+
}, wa = { class: "vf-datatable__row" }, xa = ["aria-sort"], za = ["onClick"], Ba = { class: "vf-datatable__header-text" }, Sa = {
|
|
2795
2876
|
key: 1,
|
|
2796
2877
|
class: "vf-datatable__header-text"
|
|
2797
|
-
},
|
|
2878
|
+
}, Fa = { class: "vf-datatable__body" }, Va = {
|
|
2798
2879
|
key: 0,
|
|
2799
2880
|
class: "vf-datatable__row vf-datatable__row_state"
|
|
2800
|
-
},
|
|
2881
|
+
}, Ta = ["colspan"], La = {
|
|
2801
2882
|
key: 1,
|
|
2802
2883
|
class: "vf-datatable__row vf-datatable__row_state"
|
|
2803
|
-
},
|
|
2884
|
+
}, Ra = ["colspan"], Pa = ["onClick"], el = /* @__PURE__ */ Y({
|
|
2804
2885
|
__name: "data-table",
|
|
2805
2886
|
props: {
|
|
2806
2887
|
rows: { default: () => [] },
|
|
@@ -2822,153 +2903,153 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
2822
2903
|
emits: ["update:sortField", "update:sortOrder", "sort", "rowClick"],
|
|
2823
2904
|
setup(t, { emit: e }) {
|
|
2824
2905
|
const r = t, o = e, a = O(r.sortField ?? null), d = O(r.sortOrder ?? null);
|
|
2825
|
-
|
|
2906
|
+
Q(
|
|
2826
2907
|
() => r.sortField,
|
|
2827
|
-
(
|
|
2828
|
-
a.value =
|
|
2908
|
+
(g) => {
|
|
2909
|
+
a.value = g ?? null;
|
|
2829
2910
|
}
|
|
2830
|
-
),
|
|
2911
|
+
), Q(
|
|
2831
2912
|
() => r.sortOrder,
|
|
2832
|
-
(
|
|
2833
|
-
d.value =
|
|
2913
|
+
(g) => {
|
|
2914
|
+
d.value = g ?? null;
|
|
2834
2915
|
}
|
|
2835
2916
|
);
|
|
2836
|
-
const i = y(() => a.value),
|
|
2837
|
-
const
|
|
2838
|
-
return !h || !
|
|
2839
|
-
const q = W == null ? void 0 : W[h], te = A == null ? void 0 : A[h],
|
|
2840
|
-
return
|
|
2917
|
+
const i = y(() => a.value), u = y(() => d.value), l = y(() => Math.max(1, r.columns.length)), c = (g) => g.sortable === !1 ? !1 : g.sortable === !0 ? !0 : r.sortable, n = (g, h) => g == null && h == null ? 0 : g == null ? -1 : h == null ? 1 : typeof g == "number" && typeof h == "number" ? g - h : String(g).localeCompare(String(h)), s = y(() => {
|
|
2918
|
+
const g = r.rows ?? [], h = i.value, k = u.value;
|
|
2919
|
+
return !h || !k ? g : [...g].sort((W, A) => {
|
|
2920
|
+
const q = W == null ? void 0 : W[h], te = A == null ? void 0 : A[h], X = n(q, te);
|
|
2921
|
+
return k === "asc" ? X : -X;
|
|
2841
2922
|
});
|
|
2842
2923
|
}), f = y(() => {
|
|
2843
|
-
const
|
|
2844
|
-
return r.size !== "normal" &&
|
|
2845
|
-
}), p = (
|
|
2924
|
+
const g = ["vf-datatable", `vf-datatable_${r.variant}`];
|
|
2925
|
+
return r.size !== "normal" && g.push(`vf-datatable_${r.size}`), r.striped && g.push("vf-datatable_striped"), r.hover && g.push("vf-datatable_hover"), g;
|
|
2926
|
+
}), p = (g, h) => {
|
|
2846
2927
|
if (typeof r.rowKey == "function")
|
|
2847
|
-
return r.rowKey(
|
|
2928
|
+
return r.rowKey(g, h);
|
|
2848
2929
|
if (r.rowKey && typeof r.rowKey == "string") {
|
|
2849
|
-
const
|
|
2850
|
-
return typeof
|
|
2930
|
+
const k = g == null ? void 0 : g[r.rowKey];
|
|
2931
|
+
return typeof k == "string" || typeof k == "number" ? k : h;
|
|
2851
2932
|
}
|
|
2852
2933
|
return h;
|
|
2853
|
-
}, v = (
|
|
2854
|
-
const
|
|
2855
|
-
return h.formatter ? h.formatter(
|
|
2856
|
-
},
|
|
2857
|
-
if (!
|
|
2934
|
+
}, v = (g, h) => g == null ? void 0 : g[h.field], $ = (g, h) => {
|
|
2935
|
+
const k = v(g, h);
|
|
2936
|
+
return h.formatter ? h.formatter(g, k, h) : k ?? "";
|
|
2937
|
+
}, C = (g) => {
|
|
2938
|
+
if (!c(g))
|
|
2858
2939
|
return;
|
|
2859
|
-
let h =
|
|
2860
|
-
i.value ===
|
|
2861
|
-
}, w = (
|
|
2862
|
-
if (
|
|
2863
|
-
return i.value !==
|
|
2864
|
-
}, H = (
|
|
2940
|
+
let h = g.field, k = "asc";
|
|
2941
|
+
i.value === g.field && (u.value === "asc" ? k = "desc" : u.value === "desc" ? (h = null, k = null) : k = "asc"), a.value = h, d.value = k, o("update:sortField", h), o("update:sortOrder", k), o("sort", h, k);
|
|
2942
|
+
}, w = (g) => i.value !== g.field ? "↕" : u.value === "asc" ? "↑" : "↓", D = (g) => i.value !== g.field ? "" : "is-active", T = (g) => {
|
|
2943
|
+
if (c(g))
|
|
2944
|
+
return i.value !== g.field ? "none" : u.value === "asc" ? "ascending" : "descending";
|
|
2945
|
+
}, H = (g) => {
|
|
2865
2946
|
const h = [];
|
|
2866
|
-
return r.striped &&
|
|
2867
|
-
}, I = (
|
|
2947
|
+
return r.striped && g % 2 === 1 && h.push("vf-datatable__row_striped"), h;
|
|
2948
|
+
}, I = (g) => {
|
|
2868
2949
|
const h = [];
|
|
2869
|
-
return
|
|
2870
|
-
}, M = (
|
|
2950
|
+
return g.align && h.push(`vf-datatable__cell_${g.align}`), c(g) && h.push("vf-datatable__header_sortable"), h;
|
|
2951
|
+
}, M = (g) => {
|
|
2871
2952
|
const h = [];
|
|
2872
|
-
return
|
|
2873
|
-
}, E = (
|
|
2953
|
+
return g.align && h.push(`vf-datatable__cell_${g.align}`), h;
|
|
2954
|
+
}, E = (g) => {
|
|
2874
2955
|
const h = {};
|
|
2875
|
-
return
|
|
2876
|
-
},
|
|
2877
|
-
o("rowClick",
|
|
2956
|
+
return g.width && (h.width = g.width), g.minWidth && (h.minWidth = g.minWidth), h;
|
|
2957
|
+
}, F = (g, h, k) => {
|
|
2958
|
+
o("rowClick", g, h, k);
|
|
2878
2959
|
};
|
|
2879
|
-
return (
|
|
2880
|
-
class:
|
|
2960
|
+
return (g, h) => (b(), _("div", {
|
|
2961
|
+
class: L(f.value)
|
|
2881
2962
|
}, [
|
|
2882
2963
|
B("table", {
|
|
2883
2964
|
class: "vf-datatable__table",
|
|
2884
|
-
"aria-label":
|
|
2965
|
+
"aria-label": g.ariaLabel
|
|
2885
2966
|
}, [
|
|
2886
|
-
|
|
2887
|
-
B("tr",
|
|
2888
|
-
(
|
|
2889
|
-
key:
|
|
2890
|
-
class:
|
|
2891
|
-
style:
|
|
2892
|
-
"aria-sort":
|
|
2967
|
+
g.showHeader ? (b(), _("thead", $a, [
|
|
2968
|
+
B("tr", wa, [
|
|
2969
|
+
(b(!0), _(ae, null, ve(g.columns, (k) => (b(), _("th", {
|
|
2970
|
+
key: k.field,
|
|
2971
|
+
class: L(["vf-datatable__header", I(k)]),
|
|
2972
|
+
style: Se(E(k)),
|
|
2973
|
+
"aria-sort": T(k),
|
|
2893
2974
|
scope: "col"
|
|
2894
2975
|
}, [
|
|
2895
|
-
|
|
2976
|
+
c(k) ? (b(), _("button", {
|
|
2896
2977
|
key: 0,
|
|
2897
2978
|
type: "button",
|
|
2898
2979
|
class: "vf-datatable__sort-button",
|
|
2899
|
-
onClick: (W) => k
|
|
2980
|
+
onClick: (W) => C(k)
|
|
2900
2981
|
}, [
|
|
2901
|
-
B("span",
|
|
2902
|
-
|
|
2982
|
+
B("span", Ba, [
|
|
2983
|
+
g.$slots[`header-${k.field}`] ? S(g.$slots, `header-${k.field}`, {
|
|
2903
2984
|
key: 0,
|
|
2904
|
-
column:
|
|
2905
|
-
}) : (
|
|
2906
|
-
|
|
2985
|
+
column: k
|
|
2986
|
+
}) : (b(), _(ae, { key: 1 }, [
|
|
2987
|
+
j(R(k.header ?? k.field), 1)
|
|
2907
2988
|
], 64))
|
|
2908
2989
|
]),
|
|
2909
2990
|
B("span", {
|
|
2910
|
-
class:
|
|
2911
|
-
}, R(w(
|
|
2912
|
-
], 8,
|
|
2913
|
-
|
|
2991
|
+
class: L(["vf-datatable__sort-icon", D(k)])
|
|
2992
|
+
}, R(w(k)), 3)
|
|
2993
|
+
], 8, za)) : (b(), _("span", Sa, [
|
|
2994
|
+
g.$slots[`header-${k.field}`] ? S(g.$slots, `header-${k.field}`, {
|
|
2914
2995
|
key: 0,
|
|
2915
|
-
column:
|
|
2916
|
-
}) : (
|
|
2917
|
-
|
|
2996
|
+
column: k
|
|
2997
|
+
}) : (b(), _(ae, { key: 1 }, [
|
|
2998
|
+
j(R(k.header ?? k.field), 1)
|
|
2918
2999
|
], 64))
|
|
2919
3000
|
]))
|
|
2920
|
-
], 14,
|
|
3001
|
+
], 14, xa))), 128))
|
|
2921
3002
|
])
|
|
2922
3003
|
])) : P("", !0),
|
|
2923
|
-
B("tbody",
|
|
2924
|
-
|
|
3004
|
+
B("tbody", Fa, [
|
|
3005
|
+
g.loading ? (b(), _("tr", Va, [
|
|
2925
3006
|
B("td", {
|
|
2926
3007
|
class: "vf-datatable__cell vf-datatable__cell_state",
|
|
2927
3008
|
colspan: l.value
|
|
2928
3009
|
}, [
|
|
2929
|
-
|
|
2930
|
-
|
|
3010
|
+
S(g.$slots, "loading", {}, () => [
|
|
3011
|
+
j(R(g.loadingText), 1)
|
|
2931
3012
|
])
|
|
2932
|
-
], 8,
|
|
2933
|
-
])) :
|
|
2934
|
-
key: p(
|
|
2935
|
-
class:
|
|
2936
|
-
onClick: (A) =>
|
|
3013
|
+
], 8, Ta)
|
|
3014
|
+
])) : s.value.length ? (b(!0), _(ae, { key: 2 }, ve(s.value, (k, W) => (b(), _("tr", {
|
|
3015
|
+
key: p(k, W),
|
|
3016
|
+
class: L(["vf-datatable__row", H(W)]),
|
|
3017
|
+
onClick: (A) => F(k, W, A)
|
|
2937
3018
|
}, [
|
|
2938
|
-
(
|
|
3019
|
+
(b(!0), _(ae, null, ve(g.columns, (A) => (b(), _("td", {
|
|
2939
3020
|
key: A.field,
|
|
2940
|
-
class:
|
|
2941
|
-
style:
|
|
3021
|
+
class: L(["vf-datatable__cell", M(A)]),
|
|
3022
|
+
style: Se(E(A))
|
|
2942
3023
|
}, [
|
|
2943
|
-
|
|
3024
|
+
g.$slots[`cell-${A.field}`] ? S(g.$slots, `cell-${A.field}`, {
|
|
2944
3025
|
key: 0,
|
|
2945
|
-
row:
|
|
3026
|
+
row: k,
|
|
2946
3027
|
column: A,
|
|
2947
|
-
value: v(
|
|
3028
|
+
value: v(k, A),
|
|
2948
3029
|
index: W
|
|
2949
|
-
}) : (
|
|
2950
|
-
|
|
3030
|
+
}) : (b(), _(ae, { key: 1 }, [
|
|
3031
|
+
j(R($(k, A)), 1)
|
|
2951
3032
|
], 64))
|
|
2952
3033
|
], 6))), 128))
|
|
2953
|
-
], 10,
|
|
3034
|
+
], 10, Pa))), 128)) : (b(), _("tr", La, [
|
|
2954
3035
|
B("td", {
|
|
2955
3036
|
class: "vf-datatable__cell vf-datatable__cell_state",
|
|
2956
3037
|
colspan: l.value
|
|
2957
3038
|
}, [
|
|
2958
|
-
|
|
2959
|
-
|
|
3039
|
+
S(g.$slots, "empty", {}, () => [
|
|
3040
|
+
j(R(g.emptyText), 1)
|
|
2960
3041
|
])
|
|
2961
|
-
], 8,
|
|
3042
|
+
], 8, Ra)
|
|
2962
3043
|
]))
|
|
2963
3044
|
])
|
|
2964
|
-
], 8,
|
|
3045
|
+
], 8, ka)
|
|
2965
3046
|
], 2));
|
|
2966
3047
|
}
|
|
2967
|
-
}),
|
|
3048
|
+
}), Ia = ["dark", "light", "theme", "preset", "colors", "components", "colorScheme"], Ma = (t) => {
|
|
2968
3049
|
const e = t.replace(/([A-Z])/g, "-$1");
|
|
2969
3050
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
2970
|
-
},
|
|
2971
|
-
if (!
|
|
3051
|
+
}, Oa = (t) => t.filter((e) => !Ia.includes(e)).map((e) => Ma(e)).join("-").toLowerCase(), Ee = (t) => t.join("."), Da = (t) => /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(t), Ye = (t) => {
|
|
3052
|
+
if (!Da(t))
|
|
2972
3053
|
return null;
|
|
2973
3054
|
if (t.length === 4) {
|
|
2974
3055
|
const e = t[1], r = t[2], o = t[3];
|
|
@@ -2976,7 +3057,7 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
2976
3057
|
}
|
|
2977
3058
|
return t.toLowerCase();
|
|
2978
3059
|
}, lt = (t) => {
|
|
2979
|
-
const e =
|
|
3060
|
+
const e = Ye(t);
|
|
2980
3061
|
if (!e)
|
|
2981
3062
|
return [0, 0, 0];
|
|
2982
3063
|
const r = parseInt(e.slice(1), 16), o = r >> 16 & 255, a = r >> 8 & 255, d = r & 255;
|
|
@@ -2984,50 +3065,50 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
2984
3065
|
}, qe = (t) => {
|
|
2985
3066
|
const [e, r, o] = lt(t);
|
|
2986
3067
|
return `${e}, ${r}, ${o}`;
|
|
2987
|
-
},
|
|
2988
|
-
const o = t / 255, a = e / 255, d = r / 255, i = Math.max(o, a, d),
|
|
2989
|
-
let
|
|
2990
|
-
const
|
|
3068
|
+
}, Wa = (t, e, r) => {
|
|
3069
|
+
const o = t / 255, a = e / 255, d = r / 255, i = Math.max(o, a, d), u = Math.min(o, a, d), l = i - u;
|
|
3070
|
+
let c = 0, n = 0;
|
|
3071
|
+
const s = (i + u) / 2;
|
|
2991
3072
|
if (l !== 0) {
|
|
2992
|
-
switch (
|
|
3073
|
+
switch (n = l / (1 - Math.abs(2 * s - 1)), i) {
|
|
2993
3074
|
case o:
|
|
2994
|
-
|
|
3075
|
+
c = (a - d) / l % 6;
|
|
2995
3076
|
break;
|
|
2996
3077
|
case a:
|
|
2997
|
-
|
|
3078
|
+
c = (d - o) / l + 2;
|
|
2998
3079
|
break;
|
|
2999
3080
|
case d:
|
|
3000
|
-
|
|
3081
|
+
c = (o - a) / l + 4;
|
|
3001
3082
|
break;
|
|
3002
3083
|
}
|
|
3003
|
-
|
|
3004
|
-
}
|
|
3005
|
-
return [
|
|
3006
|
-
},
|
|
3007
|
-
const o = e / 100, a = r / 100, d = (1 - Math.abs(2 * a - 1)) * o, i = d * (1 - Math.abs(t / 60 % 2 - 1)),
|
|
3008
|
-
let l = 0,
|
|
3009
|
-
t >= 0 && t < 60 ? (l = d,
|
|
3010
|
-
const
|
|
3011
|
-
return [
|
|
3012
|
-
},
|
|
3013
|
-
const r =
|
|
3084
|
+
c *= 60, c < 0 && (c += 360);
|
|
3085
|
+
}
|
|
3086
|
+
return [c, n * 100, s * 100];
|
|
3087
|
+
}, Aa = (t, e, r) => {
|
|
3088
|
+
const o = e / 100, a = r / 100, d = (1 - Math.abs(2 * a - 1)) * o, i = d * (1 - Math.abs(t / 60 % 2 - 1)), u = a - d / 2;
|
|
3089
|
+
let l = 0, c = 0, n = 0;
|
|
3090
|
+
t >= 0 && t < 60 ? (l = d, c = i, n = 0) : t >= 60 && t < 120 ? (l = i, c = d, n = 0) : t >= 120 && t < 180 ? (l = 0, c = d, n = i) : t >= 180 && t < 240 ? (l = 0, c = i, n = d) : t >= 240 && t < 300 ? (l = i, c = 0, n = d) : (l = d, c = 0, n = i);
|
|
3091
|
+
const s = Math.round((l + u) * 255), f = Math.round((c + u) * 255), p = Math.round((n + u) * 255);
|
|
3092
|
+
return [s, f, p];
|
|
3093
|
+
}, Ea = (t, e, r) => `#${[t, e, r].map((o) => o.toString(16).padStart(2, "0")).join("")}`, Ha = (t, e, r) => Math.min(r, Math.max(e, t)), Ka = (t, e) => {
|
|
3094
|
+
const r = Ye(t);
|
|
3014
3095
|
if (!r)
|
|
3015
3096
|
return t;
|
|
3016
|
-
const [o, a, d] = lt(r), [i,
|
|
3017
|
-
return
|
|
3018
|
-
},
|
|
3097
|
+
const [o, a, d] = lt(r), [i, u, l] = Wa(o, a, d), n = (e - 5) * 7, s = Ha(l + n, 0, 100), [f, p, v] = Aa(i, u, s);
|
|
3098
|
+
return Ea(f, p, v);
|
|
3099
|
+
}, Oe = (t) => !!t && typeof t == "object" && !Array.isArray(t), Ge = (t, e) => {
|
|
3019
3100
|
if (!e)
|
|
3020
3101
|
return { ...t };
|
|
3021
3102
|
const r = { ...t };
|
|
3022
3103
|
for (const o in e) {
|
|
3023
3104
|
const a = e[o], d = t[o];
|
|
3024
|
-
|
|
3105
|
+
Oe(d) && Oe(a) ? r[o] = Ge(d, a) : r[o] = a;
|
|
3025
3106
|
}
|
|
3026
3107
|
return r;
|
|
3027
|
-
},
|
|
3108
|
+
}, Na = (t) => {
|
|
3028
3109
|
if (!t)
|
|
3029
3110
|
return null;
|
|
3030
|
-
if (
|
|
3111
|
+
if (Oe(t) && "preset" in t) {
|
|
3031
3112
|
const e = t;
|
|
3032
3113
|
return {
|
|
3033
3114
|
preset: e.preset ?? {},
|
|
@@ -3038,42 +3119,42 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
3038
3119
|
};
|
|
3039
3120
|
}
|
|
3040
3121
|
return { preset: t };
|
|
3041
|
-
},
|
|
3042
|
-
const e = [], r = [], o = [], a = [], d = (l) => o.push(l), i = (l) => a.push(l),
|
|
3122
|
+
}, Ya = (t) => {
|
|
3123
|
+
const e = [], r = [], o = [], a = [], d = (l) => o.push(l), i = (l) => a.push(l), u = (l, c) => {
|
|
3043
3124
|
if (!(!l || typeof l != "object"))
|
|
3044
|
-
for (const
|
|
3045
|
-
const
|
|
3046
|
-
if (
|
|
3047
|
-
|
|
3125
|
+
for (const n in l) {
|
|
3126
|
+
const s = l[n], f = c.concat([n]);
|
|
3127
|
+
if (Oe(s)) {
|
|
3128
|
+
u(s, f);
|
|
3048
3129
|
continue;
|
|
3049
3130
|
}
|
|
3050
|
-
if (
|
|
3131
|
+
if (s && typeof s == "object") {
|
|
3051
3132
|
i(`Theme value "${Ee(f)}" is not a plain object or string and will be ignored.`);
|
|
3052
3133
|
continue;
|
|
3053
3134
|
}
|
|
3054
|
-
if (typeof
|
|
3135
|
+
if (typeof s != "string") {
|
|
3055
3136
|
i(`Theme value "${Ee(f)}" is not a string and will be ignored.`);
|
|
3056
3137
|
continue;
|
|
3057
3138
|
}
|
|
3058
|
-
const v = f.includes("colorScheme") && f.includes("dark") ? r : e, $ =
|
|
3059
|
-
if (v.push(`--vf-${$}: ${
|
|
3060
|
-
const
|
|
3061
|
-
if (!
|
|
3139
|
+
const v = f.includes("colorScheme") && f.includes("dark") ? r : e, $ = Oa(f);
|
|
3140
|
+
if (v.push(`--vf-${$}: ${s}`), f.includes("colors")) {
|
|
3141
|
+
const C = Ye(s);
|
|
3142
|
+
if (!C) {
|
|
3062
3143
|
d(
|
|
3063
3144
|
`Theme color "${Ee(f)}" is not hex. Shade variables will not be generated for it.`
|
|
3064
3145
|
);
|
|
3065
3146
|
continue;
|
|
3066
3147
|
}
|
|
3067
|
-
if (v.push(`--vf-${$}-rgb: ${qe(
|
|
3148
|
+
if (v.push(`--vf-${$}-rgb: ${qe(C)}`), n !== "white")
|
|
3068
3149
|
for (let w = 1; w < 10; ++w) {
|
|
3069
|
-
const D =
|
|
3150
|
+
const D = Ka(C, w);
|
|
3070
3151
|
v.push(`--vf-${$}-${w}00: ${D}`), v.push(`--vf-${$}-${w}00-rgb: ${qe(D)}`);
|
|
3071
3152
|
}
|
|
3072
3153
|
}
|
|
3073
3154
|
}
|
|
3074
3155
|
};
|
|
3075
|
-
return
|
|
3076
|
-
},
|
|
3156
|
+
return u(t, []), { baseVars: e, darkVars: r, warnings: o, errors: a };
|
|
3157
|
+
}, Ga = (t) => {
|
|
3077
3158
|
if (typeof document > "u")
|
|
3078
3159
|
return null;
|
|
3079
3160
|
const e = document.getElementById(t);
|
|
@@ -3081,46 +3162,46 @@ const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he
|
|
|
3081
3162
|
return e;
|
|
3082
3163
|
const r = document.createElement("style");
|
|
3083
3164
|
return r.id = t, document.head.appendChild(r), r;
|
|
3084
|
-
},
|
|
3165
|
+
}, ja = (t) => ({
|
|
3085
3166
|
selector: t.selector ?? ":root",
|
|
3086
3167
|
darkSelector: t.darkSelector ?? ":root[data-theme=dark]"
|
|
3087
|
-
}),
|
|
3088
|
-
const { baseVars: a, darkVars: d, warnings: i, errors:
|
|
3168
|
+
}), Xa = (t, e, r, o) => {
|
|
3169
|
+
const { baseVars: a, darkVars: d, warnings: i, errors: u } = Ya(t), l = Ga("vueforge-theme");
|
|
3089
3170
|
if (!l)
|
|
3090
3171
|
return;
|
|
3091
|
-
if (
|
|
3172
|
+
if (u.length) {
|
|
3092
3173
|
if (o)
|
|
3093
|
-
throw new Error(`[VueForge] ${
|
|
3094
|
-
for (const
|
|
3095
|
-
console.warn(`[VueForge] ${
|
|
3174
|
+
throw new Error(`[VueForge] ${u.join(" ")}`);
|
|
3175
|
+
for (const n of u)
|
|
3176
|
+
console.warn(`[VueForge] ${n}`);
|
|
3096
3177
|
}
|
|
3097
3178
|
if (i.length)
|
|
3098
|
-
for (const
|
|
3099
|
-
console.warn(`[VueForge] ${
|
|
3100
|
-
const
|
|
3101
|
-
a.length &&
|
|
3179
|
+
for (const n of i)
|
|
3180
|
+
console.warn(`[VueForge] ${n}`);
|
|
3181
|
+
const c = [];
|
|
3182
|
+
a.length && c.push(`${e} { ${a.join(";")} }`), d.length && c.push(`${r} { ${d.join(";")} }`), l.textContent = c.join(`
|
|
3102
3183
|
`);
|
|
3103
3184
|
};
|
|
3104
3185
|
let me = null;
|
|
3105
|
-
const
|
|
3106
|
-
const e =
|
|
3186
|
+
const st = (t) => {
|
|
3187
|
+
const e = Na(t);
|
|
3107
3188
|
if (!e)
|
|
3108
3189
|
return;
|
|
3109
|
-
const r =
|
|
3110
|
-
me = { ...e },
|
|
3111
|
-
},
|
|
3190
|
+
const r = Ge(e.preset, e.overrides), { selector: o, darkSelector: a } = ja(e);
|
|
3191
|
+
me = { ...e }, Xa(r, o, a, e.strict);
|
|
3192
|
+
}, tl = (t) => {
|
|
3112
3193
|
if (!me)
|
|
3113
3194
|
return;
|
|
3114
|
-
const e = t.overrides === void 0 ? me.overrides :
|
|
3195
|
+
const e = t.overrides === void 0 ? me.overrides : Ge(me.overrides ?? {}, t.overrides ?? {}), r = {
|
|
3115
3196
|
preset: t.preset ?? me.preset,
|
|
3116
3197
|
overrides: e,
|
|
3117
3198
|
selector: t.selector ?? me.selector,
|
|
3118
3199
|
darkSelector: t.darkSelector ?? me.darkSelector
|
|
3119
3200
|
};
|
|
3120
|
-
|
|
3121
|
-
},
|
|
3201
|
+
st(r);
|
|
3202
|
+
}, ol = () => me ? { ...me } : null, al = {
|
|
3122
3203
|
install(t, e = {}) {
|
|
3123
|
-
e.theme &&
|
|
3204
|
+
e.theme && st(e.theme);
|
|
3124
3205
|
}
|
|
3125
3206
|
}, Ue = {
|
|
3126
3207
|
colors: {
|
|
@@ -3185,7 +3266,7 @@ const nt = (t) => {
|
|
|
3185
3266
|
dividerColor: "#2e2e32"
|
|
3186
3267
|
}
|
|
3187
3268
|
}
|
|
3188
|
-
},
|
|
3269
|
+
}, qa = {
|
|
3189
3270
|
fontSize: "var(--vf-typography-font-size)",
|
|
3190
3271
|
padding: "var(--vf-controls-padding-y) var(--vf-controls-padding-x)",
|
|
3191
3272
|
borderRadius: "var(--vf-radii-md)",
|
|
@@ -3327,11 +3408,11 @@ const nt = (t) => {
|
|
|
3327
3408
|
}
|
|
3328
3409
|
}
|
|
3329
3410
|
}
|
|
3330
|
-
},
|
|
3411
|
+
}, Ua = {
|
|
3331
3412
|
padding: "12px",
|
|
3332
3413
|
borderColor: "var(--vf-border-color)",
|
|
3333
3414
|
borderRadius: "var(--vf-radii-md)"
|
|
3334
|
-
},
|
|
3415
|
+
}, Za = {
|
|
3335
3416
|
gap: "0.5rem",
|
|
3336
3417
|
fontSize: "var(--vf-typography-font-size)",
|
|
3337
3418
|
padding: "var(--vf-controls-padding-y) var(--vf-controls-padding-x)",
|
|
@@ -3352,7 +3433,7 @@ const nt = (t) => {
|
|
|
3352
3433
|
padding: "var(--vf-sizes-lg-padding-y) var(--vf-sizes-lg-padding-x)",
|
|
3353
3434
|
fontSize: "var(--vf-sizes-lg-font-size)"
|
|
3354
3435
|
}
|
|
3355
|
-
},
|
|
3436
|
+
}, Ja = {
|
|
3356
3437
|
gap: "0.375rem",
|
|
3357
3438
|
textColor: "var(--vf-text-color)",
|
|
3358
3439
|
labelFontSize: "0.875rem",
|
|
@@ -3372,7 +3453,7 @@ const nt = (t) => {
|
|
|
3372
3453
|
labelFontSize: "0.9375rem",
|
|
3373
3454
|
hintFontSize: "0.875rem"
|
|
3374
3455
|
}
|
|
3375
|
-
},
|
|
3456
|
+
}, Qa = {
|
|
3376
3457
|
gap: "0.5rem",
|
|
3377
3458
|
fontSize: "var(--vf-typography-font-size)",
|
|
3378
3459
|
padding: "var(--vf-controls-padding-y) var(--vf-controls-padding-x)",
|
|
@@ -3395,10 +3476,10 @@ const nt = (t) => {
|
|
|
3395
3476
|
padding: "var(--vf-sizes-lg-padding-y) var(--vf-sizes-lg-padding-x)",
|
|
3396
3477
|
fontSize: "var(--vf-sizes-lg-font-size)"
|
|
3397
3478
|
}
|
|
3398
|
-
},
|
|
3479
|
+
}, er = {
|
|
3399
3480
|
hoverColor: "var(--vf-blue)",
|
|
3400
3481
|
activeColor: "var(--vf-blue)"
|
|
3401
|
-
},
|
|
3482
|
+
}, tr = {
|
|
3402
3483
|
iconGap: "6px",
|
|
3403
3484
|
submenuOffset: "12px",
|
|
3404
3485
|
separatorThickness: "1px",
|
|
@@ -3418,7 +3499,7 @@ const nt = (t) => {
|
|
|
3418
3499
|
marginBottom: "0.5rem",
|
|
3419
3500
|
marginLeft: "0.5rem"
|
|
3420
3501
|
}
|
|
3421
|
-
},
|
|
3502
|
+
}, or = {
|
|
3422
3503
|
width: "90vw",
|
|
3423
3504
|
maxWidth: "520px",
|
|
3424
3505
|
maxHeight: "80vh",
|
|
@@ -3445,9 +3526,9 @@ const nt = (t) => {
|
|
|
3445
3526
|
closeColor: "var(--vf-text-color)",
|
|
3446
3527
|
closeFontSize: "1.25rem",
|
|
3447
3528
|
closeHoverBackgroundColor: "rgba(0, 0, 0, 0.06)"
|
|
3448
|
-
},
|
|
3529
|
+
}, ar = {
|
|
3449
3530
|
backgroundColor: "var(--vf-bg-color)"
|
|
3450
|
-
},
|
|
3531
|
+
}, rr = {
|
|
3451
3532
|
minWidth: "12rem",
|
|
3452
3533
|
fontSize: "var(--vf-typography-font-size)",
|
|
3453
3534
|
controlGap: "0.75rem",
|
|
@@ -3480,7 +3561,7 @@ const nt = (t) => {
|
|
|
3480
3561
|
padding: "var(--vf-sizes-lg-padding-y) var(--vf-sizes-lg-padding-x)",
|
|
3481
3562
|
fontSize: "var(--vf-sizes-lg-font-size)"
|
|
3482
3563
|
}
|
|
3483
|
-
},
|
|
3564
|
+
}, lr = {
|
|
3484
3565
|
minWidth: "12rem",
|
|
3485
3566
|
fontSize: "var(--vf-typography-font-size)",
|
|
3486
3567
|
controlGap: "0.5rem",
|
|
@@ -3519,7 +3600,7 @@ const nt = (t) => {
|
|
|
3519
3600
|
padding: "var(--vf-sizes-lg-padding-y) var(--vf-sizes-lg-padding-x)",
|
|
3520
3601
|
fontSize: "var(--vf-sizes-lg-font-size)"
|
|
3521
3602
|
}
|
|
3522
|
-
},
|
|
3603
|
+
}, sr = {
|
|
3523
3604
|
minWidth: "12rem",
|
|
3524
3605
|
fontSize: "var(--vf-typography-font-size)",
|
|
3525
3606
|
controlGap: "0.5rem",
|
|
@@ -3564,7 +3645,7 @@ const nt = (t) => {
|
|
|
3564
3645
|
padding: "var(--vf-sizes-lg-padding-y) var(--vf-sizes-lg-padding-x)",
|
|
3565
3646
|
fontSize: "var(--vf-sizes-lg-font-size)"
|
|
3566
3647
|
}
|
|
3567
|
-
},
|
|
3648
|
+
}, nr = {
|
|
3568
3649
|
minWidth: "12rem",
|
|
3569
3650
|
fontSize: "var(--vf-typography-font-size)",
|
|
3570
3651
|
controlGap: "0.75rem",
|
|
@@ -3614,7 +3695,7 @@ const nt = (t) => {
|
|
|
3614
3695
|
fontSize: "var(--vf-sizes-lg-font-size)",
|
|
3615
3696
|
daySize: "2.2rem"
|
|
3616
3697
|
}
|
|
3617
|
-
},
|
|
3698
|
+
}, ir = {
|
|
3618
3699
|
gap: "0.4rem",
|
|
3619
3700
|
itemMinWidth: "2rem",
|
|
3620
3701
|
fontSize: "var(--vf-typography-font-size)",
|
|
@@ -3639,7 +3720,7 @@ const nt = (t) => {
|
|
|
3639
3720
|
fontSize: "var(--vf-sizes-lg-font-size)",
|
|
3640
3721
|
padding: "0.45rem 0.8rem"
|
|
3641
3722
|
}
|
|
3642
|
-
},
|
|
3723
|
+
}, dr = {
|
|
3643
3724
|
size: "1rem",
|
|
3644
3725
|
gap: "0.5rem",
|
|
3645
3726
|
borderRadius: "var(--vf-radii-sm)",
|
|
@@ -3651,7 +3732,7 @@ const nt = (t) => {
|
|
|
3651
3732
|
checkColor: "#ffffff",
|
|
3652
3733
|
textColor: "var(--vf-text-color)",
|
|
3653
3734
|
disabledOpacity: "var(--vf-states-disabled-opacity)"
|
|
3654
|
-
},
|
|
3735
|
+
}, cr = {
|
|
3655
3736
|
size: "1rem",
|
|
3656
3737
|
dotSize: "0.45rem",
|
|
3657
3738
|
gap: "0.5rem",
|
|
@@ -3665,7 +3746,7 @@ const nt = (t) => {
|
|
|
3665
3746
|
dotColor: "#ffffff",
|
|
3666
3747
|
textColor: "var(--vf-text-color)",
|
|
3667
3748
|
disabledOpacity: "var(--vf-states-disabled-opacity)"
|
|
3668
|
-
},
|
|
3749
|
+
}, ur = {
|
|
3669
3750
|
width: "2.25rem",
|
|
3670
3751
|
height: "1.25rem",
|
|
3671
3752
|
thumbSize: "1rem",
|
|
@@ -3677,7 +3758,7 @@ const nt = (t) => {
|
|
|
3677
3758
|
thumbColor: "#ffffff",
|
|
3678
3759
|
textColor: "var(--vf-text-color)",
|
|
3679
3760
|
disabledOpacity: "var(--vf-states-disabled-opacity)"
|
|
3680
|
-
},
|
|
3761
|
+
}, vr = {
|
|
3681
3762
|
gap: "0.75rem",
|
|
3682
3763
|
listGap: "0.5rem",
|
|
3683
3764
|
listBorderWidth: "1px",
|
|
@@ -3698,7 +3779,7 @@ const nt = (t) => {
|
|
|
3698
3779
|
panelBackgroundColor: "transparent",
|
|
3699
3780
|
panelTextColor: "var(--vf-text-color)",
|
|
3700
3781
|
disabledOpacity: "var(--vf-states-disabled-opacity)"
|
|
3701
|
-
},
|
|
3782
|
+
}, fr = {
|
|
3702
3783
|
gap: "0.75rem",
|
|
3703
3784
|
borderRadius: "var(--vf-radii-md)",
|
|
3704
3785
|
borderColor: "var(--vf-border-color)",
|
|
@@ -3729,7 +3810,7 @@ const nt = (t) => {
|
|
|
3729
3810
|
headerFontSize: "1rem",
|
|
3730
3811
|
contentPadding: "0.9rem 1.1rem"
|
|
3731
3812
|
}
|
|
3732
|
-
},
|
|
3813
|
+
}, pr = {
|
|
3733
3814
|
padding: "0.35rem 0.6rem",
|
|
3734
3815
|
borderRadius: "8px",
|
|
3735
3816
|
backgroundColor: "rgba(0, 0, 0, 0.8)",
|
|
@@ -3740,7 +3821,7 @@ const nt = (t) => {
|
|
|
3740
3821
|
zIndex: "120",
|
|
3741
3822
|
maxWidth: "240px",
|
|
3742
3823
|
arrowSize: "8px"
|
|
3743
|
-
},
|
|
3824
|
+
}, gr = {
|
|
3744
3825
|
width: "100%",
|
|
3745
3826
|
height: "1rem",
|
|
3746
3827
|
lineHeight: "0.9rem",
|
|
@@ -3748,7 +3829,7 @@ const nt = (t) => {
|
|
|
3748
3829
|
backgroundColor: "var(--vf-gutter-color)",
|
|
3749
3830
|
shimmerColor: "var(--vf-bg-color)",
|
|
3750
3831
|
animationDuration: "2s"
|
|
3751
|
-
},
|
|
3832
|
+
}, br = {
|
|
3752
3833
|
borderColor: "var(--vf-border-color)",
|
|
3753
3834
|
borderRadius: "var(--vf-radii-md)",
|
|
3754
3835
|
backgroundColor: "var(--vf-bg-color)",
|
|
@@ -3779,7 +3860,7 @@ const nt = (t) => {
|
|
|
3779
3860
|
fontSize: "var(--vf-sizes-lg-font-size)",
|
|
3780
3861
|
cellPadding: "0.75rem 0.9rem"
|
|
3781
3862
|
}
|
|
3782
|
-
},
|
|
3863
|
+
}, mr = {
|
|
3783
3864
|
gap: "0.75rem",
|
|
3784
3865
|
padding: "0.75rem 0.9rem",
|
|
3785
3866
|
borderRadius: "var(--vf-radii-md)",
|
|
@@ -3818,7 +3899,7 @@ const nt = (t) => {
|
|
|
3818
3899
|
borderColor: "rgba(var(--vf-red-600-rgb), 0.45)",
|
|
3819
3900
|
textColor: "var(--vf-text-color)"
|
|
3820
3901
|
}
|
|
3821
|
-
},
|
|
3902
|
+
}, hr = {
|
|
3822
3903
|
gap: "0.75rem",
|
|
3823
3904
|
padding: "0.75rem 0.9rem",
|
|
3824
3905
|
borderRadius: "var(--vf-radii-md)",
|
|
@@ -3856,7 +3937,7 @@ const nt = (t) => {
|
|
|
3856
3937
|
borderColor: "rgba(var(--vf-red-600-rgb), 0.45)",
|
|
3857
3938
|
textColor: "var(--vf-text-color)"
|
|
3858
3939
|
}
|
|
3859
|
-
},
|
|
3940
|
+
}, yr = {
|
|
3860
3941
|
width: "100%",
|
|
3861
3942
|
height: "0.5rem",
|
|
3862
3943
|
borderRadius: "999px",
|
|
@@ -3892,71 +3973,166 @@ const nt = (t) => {
|
|
|
3892
3973
|
circularSize: "3.25rem",
|
|
3893
3974
|
circularThickness: "7"
|
|
3894
3975
|
}
|
|
3895
|
-
},
|
|
3976
|
+
}, _r = {
|
|
3977
|
+
fontSize: "0.75rem",
|
|
3978
|
+
lineHeight: "1",
|
|
3979
|
+
paddingX: "0.5rem",
|
|
3980
|
+
paddingY: "0.2rem",
|
|
3981
|
+
borderRadius: "999px",
|
|
3982
|
+
gap: "0.35rem",
|
|
3983
|
+
backgroundColor: "var(--vf-gutter-color)",
|
|
3984
|
+
textColor: "var(--vf-secondary-text-color)",
|
|
3985
|
+
borderColor: "var(--vf-gutter-color)",
|
|
3986
|
+
softBackgroundColor: "rgba(var(--vf-gray-500-rgb), 0.16)",
|
|
3987
|
+
softTextColor: "var(--vf-secondary-text-color)",
|
|
3988
|
+
softBorderColor: "rgba(var(--vf-gray-500-rgb), 0.18)",
|
|
3989
|
+
outlineTextColor: "var(--vf-secondary-text-color)",
|
|
3990
|
+
outlineBorderColor: "rgba(var(--vf-gray-500-rgb), 0.35)",
|
|
3991
|
+
info: {
|
|
3992
|
+
backgroundColor: "var(--vf-sky-600)",
|
|
3993
|
+
textColor: "var(--vf-white)",
|
|
3994
|
+
borderColor: "var(--vf-sky-600)",
|
|
3995
|
+
softBackgroundColor: "rgba(var(--vf-sky-500-rgb), 0.18)",
|
|
3996
|
+
softTextColor: "var(--vf-sky-700)",
|
|
3997
|
+
softBorderColor: "rgba(var(--vf-sky-500-rgb), 0.3)",
|
|
3998
|
+
outlineTextColor: "var(--vf-sky-600)",
|
|
3999
|
+
outlineBorderColor: "rgba(var(--vf-sky-600-rgb), 0.45)"
|
|
4000
|
+
},
|
|
4001
|
+
success: {
|
|
4002
|
+
backgroundColor: "var(--vf-green-600)",
|
|
4003
|
+
textColor: "var(--vf-white)",
|
|
4004
|
+
borderColor: "var(--vf-green-600)",
|
|
4005
|
+
softBackgroundColor: "rgba(var(--vf-green-500-rgb), 0.2)",
|
|
4006
|
+
softTextColor: "var(--vf-green-700)",
|
|
4007
|
+
softBorderColor: "rgba(var(--vf-green-500-rgb), 0.32)",
|
|
4008
|
+
outlineTextColor: "var(--vf-green-600)",
|
|
4009
|
+
outlineBorderColor: "rgba(var(--vf-green-600-rgb), 0.45)"
|
|
4010
|
+
},
|
|
4011
|
+
warn: {
|
|
4012
|
+
backgroundColor: "var(--vf-yellow-600)",
|
|
4013
|
+
textColor: "rgba(0, 0, 0, 0.82)",
|
|
4014
|
+
borderColor: "var(--vf-yellow-600)",
|
|
4015
|
+
softBackgroundColor: "rgba(var(--vf-yellow-500-rgb), 0.22)",
|
|
4016
|
+
softTextColor: "rgba(0, 0, 0, 0.78)",
|
|
4017
|
+
softBorderColor: "rgba(var(--vf-yellow-500-rgb), 0.4)",
|
|
4018
|
+
outlineTextColor: "var(--vf-yellow-700)",
|
|
4019
|
+
outlineBorderColor: "rgba(var(--vf-yellow-600-rgb), 0.55)"
|
|
4020
|
+
},
|
|
4021
|
+
danger: {
|
|
4022
|
+
backgroundColor: "var(--vf-red-600)",
|
|
4023
|
+
textColor: "var(--vf-white)",
|
|
4024
|
+
borderColor: "var(--vf-red-600)",
|
|
4025
|
+
softBackgroundColor: "rgba(var(--vf-red-500-rgb), 0.2)",
|
|
4026
|
+
softTextColor: "var(--vf-red-700)",
|
|
4027
|
+
softBorderColor: "rgba(var(--vf-red-500-rgb), 0.32)",
|
|
4028
|
+
outlineTextColor: "var(--vf-red-600)",
|
|
4029
|
+
outlineBorderColor: "rgba(var(--vf-red-600-rgb), 0.45)"
|
|
4030
|
+
},
|
|
4031
|
+
small: {
|
|
4032
|
+
fontSize: "0.6875rem",
|
|
4033
|
+
paddingX: "0.4rem",
|
|
4034
|
+
paddingY: "0.15rem"
|
|
4035
|
+
},
|
|
4036
|
+
large: {
|
|
4037
|
+
fontSize: "0.875rem",
|
|
4038
|
+
paddingX: "0.65rem",
|
|
4039
|
+
paddingY: "0.3rem"
|
|
4040
|
+
}
|
|
4041
|
+
}, Cr = {
|
|
4042
|
+
size: "2.5rem",
|
|
4043
|
+
fontSize: "0.9rem",
|
|
4044
|
+
fontWeight: "600",
|
|
4045
|
+
backgroundColor: "var(--vf-gutter-color)",
|
|
4046
|
+
textColor: "var(--vf-secondary-text-color)",
|
|
4047
|
+
borderColor: "rgba(var(--vf-gray-500-rgb), 0.2)",
|
|
4048
|
+
borderWidth: "1px",
|
|
4049
|
+
borderRadius: "var(--vf-radii-md)",
|
|
4050
|
+
statusSize: "0.6rem",
|
|
4051
|
+
statusBorderWidth: "2px",
|
|
4052
|
+
statusBorderColor: "var(--vf-bg-color)",
|
|
4053
|
+
statusOnlineColor: "var(--vf-green-500)",
|
|
4054
|
+
statusOfflineColor: "var(--vf-gray-400)",
|
|
4055
|
+
statusBusyColor: "var(--vf-red-500)",
|
|
4056
|
+
statusAwayColor: "var(--vf-yellow-500)",
|
|
4057
|
+
small: {
|
|
4058
|
+
size: "2rem",
|
|
4059
|
+
fontSize: "0.75rem",
|
|
4060
|
+
statusSize: "0.5rem"
|
|
4061
|
+
},
|
|
4062
|
+
large: {
|
|
4063
|
+
size: "3rem",
|
|
4064
|
+
fontSize: "1rem",
|
|
4065
|
+
statusSize: "0.75rem"
|
|
4066
|
+
}
|
|
4067
|
+
}, rl = {
|
|
3896
4068
|
...Ue,
|
|
3897
4069
|
components: {
|
|
3898
4070
|
base: Ue,
|
|
3899
|
-
button:
|
|
3900
|
-
card:
|
|
3901
|
-
input:
|
|
3902
|
-
formField:
|
|
3903
|
-
textarea:
|
|
3904
|
-
link:
|
|
3905
|
-
menu:
|
|
3906
|
-
modal:
|
|
3907
|
-
popover:
|
|
3908
|
-
select:
|
|
3909
|
-
autocomplete:
|
|
3910
|
-
multiselect:
|
|
3911
|
-
datepicker:
|
|
3912
|
-
pagination:
|
|
3913
|
-
checkbox:
|
|
3914
|
-
radio:
|
|
3915
|
-
switch:
|
|
3916
|
-
tabs:
|
|
3917
|
-
accordion:
|
|
3918
|
-
tooltip:
|
|
3919
|
-
skeleton:
|
|
3920
|
-
datatable:
|
|
3921
|
-
toast:
|
|
3922
|
-
alert:
|
|
3923
|
-
progress:
|
|
4071
|
+
button: qa,
|
|
4072
|
+
card: Ua,
|
|
4073
|
+
input: Za,
|
|
4074
|
+
formField: Ja,
|
|
4075
|
+
textarea: Qa,
|
|
4076
|
+
link: er,
|
|
4077
|
+
menu: tr,
|
|
4078
|
+
modal: or,
|
|
4079
|
+
popover: ar,
|
|
4080
|
+
select: rr,
|
|
4081
|
+
autocomplete: lr,
|
|
4082
|
+
multiselect: sr,
|
|
4083
|
+
datepicker: nr,
|
|
4084
|
+
pagination: ir,
|
|
4085
|
+
checkbox: dr,
|
|
4086
|
+
radio: cr,
|
|
4087
|
+
switch: ur,
|
|
4088
|
+
tabs: vr,
|
|
4089
|
+
accordion: fr,
|
|
4090
|
+
tooltip: pr,
|
|
4091
|
+
skeleton: gr,
|
|
4092
|
+
datatable: br,
|
|
4093
|
+
toast: mr,
|
|
4094
|
+
alert: hr,
|
|
4095
|
+
progress: yr,
|
|
4096
|
+
badge: _r,
|
|
4097
|
+
avatar: Cr
|
|
3924
4098
|
}
|
|
3925
4099
|
};
|
|
3926
4100
|
export {
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
4101
|
+
Er as Accordion,
|
|
4102
|
+
Hr as AccordionItem,
|
|
4103
|
+
Yr as Alert,
|
|
4104
|
+
Tr as Autocomplete,
|
|
4105
|
+
Qr as Avatar,
|
|
4106
|
+
Jr as Badge,
|
|
4107
|
+
zr as Button,
|
|
3932
4108
|
_t as Card,
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
|
|
4109
|
+
Ir as Checkbox,
|
|
4110
|
+
el as DataTable,
|
|
4111
|
+
Rr as DatePicker,
|
|
4112
|
+
rl as DefaultTheme,
|
|
4113
|
+
Sr as FormField,
|
|
4114
|
+
Br as Input,
|
|
3939
4115
|
Qe as Link,
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
|
|
3954
|
-
|
|
3955
|
-
|
|
3956
|
-
|
|
3957
|
-
|
|
3958
|
-
|
|
3959
|
-
|
|
3960
|
-
|
|
3961
|
-
|
|
4116
|
+
xr as Menu,
|
|
4117
|
+
Xr as Modal,
|
|
4118
|
+
Lr as MultiSelect,
|
|
4119
|
+
Pr as Pagination,
|
|
4120
|
+
jr as Popover,
|
|
4121
|
+
Zr as Progress,
|
|
4122
|
+
Or as RadioButton,
|
|
4123
|
+
Mr as RadioGroup,
|
|
4124
|
+
Vr as Select,
|
|
4125
|
+
Ur as Skeleton,
|
|
4126
|
+
Gr as Switch,
|
|
4127
|
+
Wr as Tab,
|
|
4128
|
+
Ar as TabPanel,
|
|
4129
|
+
Dr as Tabs,
|
|
4130
|
+
Fr as Textarea,
|
|
4131
|
+
Kr as Toast,
|
|
4132
|
+
Nr as ToastContainer,
|
|
4133
|
+
qr as Tooltip,
|
|
4134
|
+
al as VueForge,
|
|
4135
|
+
ol as getTheme,
|
|
4136
|
+
st as setTheme,
|
|
4137
|
+
tl as updateTheme
|
|
3962
4138
|
};
|