@codemonster-ru/vueforge 0.20.0 → 0.21.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 +22 -2
- package/dist/index.css +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.ts.mjs +860 -825
- package/dist/index.ts.umd.js +3 -3
- package/dist/package/components/__tests__/skeleton.test.d.ts +1 -0
- package/dist/package/components/skeleton.vue.d.ts +12 -0
- package/dist/package/config/theme-core.d.ts +10 -0
- package/dist/package/themes/default/components/skeleton.d.ts +10 -0
- package/dist/package/themes/default/index.d.ts +9 -0
- package/package.json +1 -1
package/dist/index.ts.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useRoute as
|
|
1
|
+
import { defineComponent as G, ref as I, computed as h, watch as te, resolveComponent as Xe, openBlock as g, createElementBlock as y, normalizeClass as D, renderSlot as L, Fragment as se, createTextVNode as Q, toDisplayString as O, createBlock as le, withCtx as ye, createCommentVNode as T, createElementVNode as F, renderList as ke, withKeys as U, withModifiers as Y, unref as xe, createVNode as qe, useSlots as Ue, nextTick as Ce, onMounted as Fe, onBeforeUnmount as we, Teleport as $e, withDirectives as ve, vShow as fe, provide as Ze, inject as We, reactive as lt, createSlots as nt, normalizeStyle as st } from "vue";
|
|
2
|
+
import { useRoute as it, useRouter as dt } from "vue-router";
|
|
3
3
|
import { CmIcon as Be } from "@codemonster-ru/vueiconify";
|
|
4
|
-
const
|
|
4
|
+
const ct = ["href", "aria-disabled", "tabindex"], Je = /* @__PURE__ */ G({
|
|
5
5
|
__name: "link",
|
|
6
6
|
props: {
|
|
7
7
|
to: { default: void 0 },
|
|
@@ -15,96 +15,96 @@ const dt = ["href", "aria-disabled", "tabindex"], Je = /* @__PURE__ */ U({
|
|
|
15
15
|
},
|
|
16
16
|
emits: ["click", "active", "update:active", "onActive"],
|
|
17
17
|
setup(t, { emit: e }) {
|
|
18
|
-
const r = e, o = t, a =
|
|
18
|
+
const r = e, o = t, a = it(), d = dt(), s = I(null), c = h(() => o.href ?? o.url), l = h(() => 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"), u = h(() => o.to), n = h(() => o.to ? d.resolve(o.to) : null), i = h(() => {
|
|
19
19
|
if (l.value !== "router-link")
|
|
20
20
|
return !1;
|
|
21
|
-
const
|
|
22
|
-
return
|
|
23
|
-
}), f = h(() => o.active === void 0 ?
|
|
21
|
+
const v = n.value;
|
|
22
|
+
return v ? v.name ? a.matched.some(({ name: _ }) => _ === v.name) : v.fullPath ? a.fullPath === v.fullPath : a.path === v.path : !1;
|
|
23
|
+
}), f = h(() => o.active === void 0 ? i.value : o.active), p = (v) => {
|
|
24
24
|
if (!o.disabled) {
|
|
25
|
-
r("click",
|
|
25
|
+
r("click", v);
|
|
26
26
|
return;
|
|
27
27
|
}
|
|
28
|
-
|
|
28
|
+
v.preventDefault(), v.stopPropagation();
|
|
29
29
|
};
|
|
30
|
-
return te(
|
|
31
|
-
|
|
32
|
-
}), (
|
|
30
|
+
return te(i, (v) => {
|
|
31
|
+
v && (r("active"), r("onActive")), r("update:active", v);
|
|
32
|
+
}), (v, _) => {
|
|
33
33
|
const m = Xe("router-link");
|
|
34
|
-
return l.value === "a" ? (g(),
|
|
34
|
+
return l.value === "a" ? (g(), y("a", {
|
|
35
35
|
key: 0,
|
|
36
36
|
href: c.value,
|
|
37
|
-
class: D(["vf-link", { "vf-link_active": f.value, "vf-link_disabled":
|
|
38
|
-
"aria-disabled":
|
|
39
|
-
tabindex:
|
|
37
|
+
class: D(["vf-link", { "vf-link_active": f.value, "vf-link_disabled": v.disabled }]),
|
|
38
|
+
"aria-disabled": v.disabled,
|
|
39
|
+
tabindex: v.disabled ? -1 : void 0,
|
|
40
40
|
onClick: p
|
|
41
41
|
}, [
|
|
42
|
-
|
|
43
|
-
Q(O(
|
|
42
|
+
v.$slots.default ? L(v.$slots, "default", { key: 0 }) : (g(), y(se, { key: 1 }, [
|
|
43
|
+
Q(O(v.label), 1)
|
|
44
44
|
], 64))
|
|
45
|
-
], 10,
|
|
45
|
+
], 10, ct)) : (g(), le(m, {
|
|
46
46
|
key: 1,
|
|
47
47
|
ref_key: "link",
|
|
48
|
-
ref:
|
|
49
|
-
to:
|
|
48
|
+
ref: s,
|
|
49
|
+
to: u.value,
|
|
50
50
|
class: D(["vf-link", { "vf-link_active": f.value }]),
|
|
51
|
-
"aria-disabled":
|
|
52
|
-
tabindex:
|
|
51
|
+
"aria-disabled": v.disabled,
|
|
52
|
+
tabindex: v.disabled ? -1 : void 0,
|
|
53
53
|
"active-class": "vf-link_partially-active",
|
|
54
54
|
"exact-active-class": "vf-link_active",
|
|
55
55
|
onClick: p
|
|
56
56
|
}, {
|
|
57
57
|
default: ye(() => [
|
|
58
|
-
|
|
59
|
-
Q(O(
|
|
58
|
+
v.$slots.default ? L(v.$slots, "default", { key: 0 }) : (g(), y(se, { key: 1 }, [
|
|
59
|
+
Q(O(v.label), 1)
|
|
60
60
|
], 64))
|
|
61
61
|
]),
|
|
62
62
|
_: 3
|
|
63
63
|
}, 8, ["to", "class", "aria-disabled", "tabindex"]));
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
|
-
}),
|
|
66
|
+
}), ut = (t, e) => {
|
|
67
67
|
const r = t.__vccOpts || t;
|
|
68
68
|
for (const [o, a] of e)
|
|
69
69
|
r[o] = a;
|
|
70
70
|
return r;
|
|
71
|
-
},
|
|
71
|
+
}, vt = {}, ft = { class: "vf-card" }, pt = {
|
|
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
|
+
}, gt = {
|
|
78
78
|
key: 2,
|
|
79
79
|
class: "vf-card__body"
|
|
80
|
-
},
|
|
80
|
+
}, mt = {
|
|
81
81
|
key: 3,
|
|
82
82
|
class: "vf-card__footer"
|
|
83
83
|
};
|
|
84
|
-
function
|
|
85
|
-
return g(),
|
|
86
|
-
t.$slots.default ? (g(),
|
|
84
|
+
function ht(t, e) {
|
|
85
|
+
return g(), y("div", ft, [
|
|
86
|
+
t.$slots.default ? (g(), y("div", pt, [
|
|
87
87
|
L(t.$slots, "default")
|
|
88
88
|
])) : T("", !0),
|
|
89
|
-
t.$slots.header ? (g(),
|
|
89
|
+
t.$slots.header ? (g(), y("div", bt, [
|
|
90
90
|
L(t.$slots, "header")
|
|
91
91
|
])) : T("", !0),
|
|
92
|
-
t.$slots.body ? (g(),
|
|
92
|
+
t.$slots.body ? (g(), y("div", gt, [
|
|
93
93
|
L(t.$slots, "body")
|
|
94
94
|
])) : T("", !0),
|
|
95
|
-
t.$slots.footer ? (g(),
|
|
95
|
+
t.$slots.footer ? (g(), y("div", mt, [
|
|
96
96
|
L(t.$slots, "footer")
|
|
97
97
|
])) : T("", !0)
|
|
98
98
|
]);
|
|
99
99
|
}
|
|
100
|
-
const
|
|
100
|
+
const yt = /* @__PURE__ */ ut(vt, [["render", ht]]), _t = {
|
|
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
|
-
},
|
|
107
|
+
}, Ct = ["aria-expanded", "onClick", "onKeydown"], Na = /* @__PURE__ */ G({
|
|
108
108
|
name: "VfMenu",
|
|
109
109
|
__name: "menu",
|
|
110
110
|
props: {
|
|
@@ -113,18 +113,18 @@ const ht = /* @__PURE__ */ ct(ut, [["render", mt]]), yt = {
|
|
|
113
113
|
},
|
|
114
114
|
emits: ["active", "onActive"],
|
|
115
115
|
setup(t, { emit: e }) {
|
|
116
|
-
const r = e, o = t, a = I([]),
|
|
117
|
-
...
|
|
118
|
-
items:
|
|
116
|
+
const r = e, o = t, a = I([]), d = (n, i) => `${n.label ?? n.to ?? n.href ?? n.url ?? "item"}_${i.toString()}`, s = (n) => n.to ? "router-link" : "a", c = (n) => n.map((i) => ({
|
|
117
|
+
...i,
|
|
118
|
+
items: i.items ? c(i.items) : void 0
|
|
119
119
|
})), l = (n) => {
|
|
120
|
-
n.items && n.items.length ? (a.value.map((
|
|
121
|
-
|
|
120
|
+
n.items && n.items.length ? (a.value.map((i) => {
|
|
121
|
+
i !== n && (i.subMenuVisible = !1);
|
|
122
122
|
}), n.subMenuVisible = !n.subMenuVisible) : Object.prototype.hasOwnProperty.call(n, "command") && typeof n.command == "function" && n.command();
|
|
123
|
-
},
|
|
124
|
-
var
|
|
123
|
+
}, u = (n) => {
|
|
124
|
+
var i;
|
|
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") && ((i = p.items) != null && i.some((v) => v === n) ? (p.active = !0, p.subMenuVisible = !0) : (p.active = !1, p.subMenuVisible = !1));
|
|
128
128
|
}
|
|
129
129
|
r("active", n), r("onActive", n);
|
|
130
130
|
};
|
|
@@ -134,30 +134,30 @@ const ht = /* @__PURE__ */ ct(ut, [["render", mt]]), yt = {
|
|
|
134
134
|
a.value = c(n);
|
|
135
135
|
},
|
|
136
136
|
{ deep: !0, immediate: !0 }
|
|
137
|
-
), (n,
|
|
137
|
+
), (n, i) => {
|
|
138
138
|
const f = Xe("VfMenu");
|
|
139
|
-
return g(),
|
|
139
|
+
return g(), y("div", {
|
|
140
140
|
class: D(["vf-menu", `vf-menu_${n.orientation}`])
|
|
141
141
|
}, [
|
|
142
|
-
F("ul",
|
|
143
|
-
(g(!0),
|
|
144
|
-
key:
|
|
142
|
+
F("ul", _t, [
|
|
143
|
+
(g(!0), y(se, null, ke(a.value, (p, v) => (g(), y("li", {
|
|
144
|
+
key: d(p, v),
|
|
145
145
|
class: "vf-menu__item",
|
|
146
146
|
role: "none"
|
|
147
147
|
}, [
|
|
148
|
-
n.$slots[
|
|
148
|
+
n.$slots[d(p, v)] ? L(n.$slots, d(p, v), {
|
|
149
149
|
key: 0,
|
|
150
150
|
item: { ...p, class: "vf-menu__link" }
|
|
151
|
-
}) : p.separator ? (g(),
|
|
151
|
+
}) : p.separator ? (g(), y("hr", kt)) : p.items && p.items.length ? (g(), y(se, { key: 2 }, [
|
|
152
152
|
F("div", {
|
|
153
153
|
class: D(["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",
|
|
157
|
-
onClick: (
|
|
157
|
+
onClick: (_) => l(p),
|
|
158
158
|
onKeydown: [
|
|
159
|
-
|
|
160
|
-
|
|
159
|
+
U(Y((_) => l(p), ["prevent"]), ["enter"]),
|
|
160
|
+
U(Y((_) => l(p), ["prevent"]), ["space"])
|
|
161
161
|
]
|
|
162
162
|
}, [
|
|
163
163
|
p.icon ? (g(), le(xe(Be), {
|
|
@@ -167,25 +167,25 @@ const ht = /* @__PURE__ */ ct(ut, [["render", mt]]), yt = {
|
|
|
167
167
|
}, null, 8, ["icon"])) : T("", !0),
|
|
168
168
|
Q(" " + O(p.label) + " ", 1),
|
|
169
169
|
qe(xe(Be), { icon: "chevronDown" })
|
|
170
|
-
], 42,
|
|
170
|
+
], 42, Ct),
|
|
171
171
|
p.items ? (g(), le(f, {
|
|
172
172
|
key: 0,
|
|
173
173
|
items: p.items,
|
|
174
174
|
class: D(["vf-menu__submenu", { "vf-menu__submenu_visible": p.subMenuVisible }]),
|
|
175
|
-
onOnActive:
|
|
175
|
+
onOnActive: u
|
|
176
176
|
}, null, 8, ["items", "class"])) : T("", !0)
|
|
177
177
|
], 64)) : (g(), le(Je, {
|
|
178
178
|
key: 3,
|
|
179
179
|
to: p.to,
|
|
180
180
|
href: p.href ?? p.url,
|
|
181
|
-
as:
|
|
181
|
+
as: s(p),
|
|
182
182
|
class: "vf-menu__link",
|
|
183
183
|
active: p.active,
|
|
184
184
|
disabled: p.disabled,
|
|
185
185
|
role: "menuitem",
|
|
186
186
|
"aria-disabled": p.disabled ? "true" : "false",
|
|
187
|
-
onClick: (
|
|
188
|
-
onActive: (
|
|
187
|
+
onClick: (_) => l(p),
|
|
188
|
+
onActive: (_) => u(p)
|
|
189
189
|
}, {
|
|
190
190
|
default: ye(() => [
|
|
191
191
|
p.icon ? (g(), le(xe(Be), {
|
|
@@ -202,7 +202,7 @@ const ht = /* @__PURE__ */ ct(ut, [["render", mt]]), yt = {
|
|
|
202
202
|
], 2);
|
|
203
203
|
};
|
|
204
204
|
}
|
|
205
|
-
}),
|
|
205
|
+
}), wt = ["type", "disabled"], Ya = /* @__PURE__ */ G({
|
|
206
206
|
__name: "button",
|
|
207
207
|
props: {
|
|
208
208
|
to: { default: void 0 },
|
|
@@ -221,13 +221,13 @@ const ht = /* @__PURE__ */ ct(ut, [["render", mt]]), yt = {
|
|
|
221
221
|
disabled: { type: Boolean, default: !1 }
|
|
222
222
|
},
|
|
223
223
|
setup(t) {
|
|
224
|
-
const e = t, r = ["button", "submit", "reset"], o = (n) => !!n && r.includes(n), a = h(() => e.as ? e.as === "button" : !(e.to || e.href || e.url || e.type && !o(e.type))),
|
|
224
|
+
const e = t, r = ["button", "submit", "reset"], o = (n) => !!n && r.includes(n), a = h(() => e.as ? e.as === "button" : !(e.to || e.href || e.url || e.type && !o(e.type))), d = h(() => o(e.type) ? e.type : "button"), s = h(() => 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"), c = h(() => {
|
|
225
225
|
let n = ["vf-button", `vf-button_${e.severity}`];
|
|
226
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 = h(() => ["vf-button__icon", `vf-button__icon_${e.iconPos}`]),
|
|
228
|
-
return (n,
|
|
227
|
+
}), l = h(() => ["vf-button__icon", `vf-button__icon_${e.iconPos}`]), u = h(() => ["vf-button__label"]);
|
|
228
|
+
return (n, i) => a.value ? (g(), y("button", {
|
|
229
229
|
key: 0,
|
|
230
|
-
type:
|
|
230
|
+
type: d.value,
|
|
231
231
|
class: D(c.value),
|
|
232
232
|
disabled: e.loading || e.disabled
|
|
233
233
|
}, [
|
|
@@ -242,20 +242,20 @@ const ht = /* @__PURE__ */ ct(ut, [["render", mt]]), yt = {
|
|
|
242
242
|
class: D(l.value),
|
|
243
243
|
spin: ""
|
|
244
244
|
}, null, 8, ["class"])) : T("", !0),
|
|
245
|
-
n.$slots.default ? (g(),
|
|
245
|
+
n.$slots.default ? (g(), y("span", {
|
|
246
246
|
key: 2,
|
|
247
|
-
class: D(
|
|
247
|
+
class: D(u.value)
|
|
248
248
|
}, [
|
|
249
249
|
L(n.$slots, "default")
|
|
250
|
-
], 2)) : n.label ? (g(),
|
|
250
|
+
], 2)) : n.label ? (g(), y("span", {
|
|
251
251
|
key: 3,
|
|
252
|
-
class: D(
|
|
252
|
+
class: D(u.value)
|
|
253
253
|
}, O(n.label), 3)) : T("", !0)
|
|
254
|
-
], 10,
|
|
254
|
+
], 10, wt)) : (g(), le(Je, {
|
|
255
255
|
key: 1,
|
|
256
256
|
to: e.to,
|
|
257
257
|
href: e.href ?? e.url,
|
|
258
|
-
as:
|
|
258
|
+
as: s.value,
|
|
259
259
|
class: D(c.value),
|
|
260
260
|
disabled: e.loading || e.disabled
|
|
261
261
|
}, {
|
|
@@ -265,26 +265,26 @@ const ht = /* @__PURE__ */ ct(ut, [["render", mt]]), yt = {
|
|
|
265
265
|
icon: e.icon,
|
|
266
266
|
class: D(l.value)
|
|
267
267
|
}, null, 8, ["icon", "class"])) : T("", !0),
|
|
268
|
-
n.$slots.default ? (g(),
|
|
268
|
+
n.$slots.default ? (g(), y("span", {
|
|
269
269
|
key: 1,
|
|
270
|
-
class: D(
|
|
270
|
+
class: D(u.value)
|
|
271
271
|
}, [
|
|
272
272
|
L(n.$slots, "default")
|
|
273
|
-
], 2)) : n.label ? (g(),
|
|
273
|
+
], 2)) : n.label ? (g(), y("span", {
|
|
274
274
|
key: 2,
|
|
275
|
-
class: D(
|
|
275
|
+
class: D(u.value)
|
|
276
276
|
}, O(n.label), 3)) : T("", !0)
|
|
277
277
|
]),
|
|
278
278
|
_: 3
|
|
279
279
|
}, 8, ["to", "href", "as", "class", "disabled"]));
|
|
280
280
|
}
|
|
281
|
-
}),
|
|
281
|
+
}), $t = {
|
|
282
282
|
key: 0,
|
|
283
283
|
class: "vf-input__prefix"
|
|
284
|
-
},
|
|
284
|
+
}, xt = ["type", "value", "placeholder", "disabled", "readonly"], Bt = {
|
|
285
285
|
key: 1,
|
|
286
286
|
class: "vf-input__suffix"
|
|
287
|
-
},
|
|
287
|
+
}, Ga = /* @__PURE__ */ G({
|
|
288
288
|
__name: "input",
|
|
289
289
|
props: {
|
|
290
290
|
modelValue: { default: "" },
|
|
@@ -298,40 +298,40 @@ const ht = /* @__PURE__ */ ct(ut, [["render", mt]]), yt = {
|
|
|
298
298
|
emits: ["update:modelValue", "input", "change", "focus", "blur"],
|
|
299
299
|
setup(t, { emit: e }) {
|
|
300
300
|
const r = e, o = t, a = h(() => {
|
|
301
|
-
const
|
|
302
|
-
return o.size !== "normal" &&
|
|
303
|
-
}),
|
|
304
|
-
const n =
|
|
305
|
-
r("update:modelValue", n.value), r("input",
|
|
306
|
-
},
|
|
307
|
-
return (
|
|
301
|
+
const u = ["vf-input", `vf-input_${o.variant}`];
|
|
302
|
+
return o.size !== "normal" && u.push(`vf-input_${o.size}`), o.disabled && u.push("vf-input_disabled"), u;
|
|
303
|
+
}), d = (u) => {
|
|
304
|
+
const n = u.target;
|
|
305
|
+
r("update:modelValue", n.value), r("input", u);
|
|
306
|
+
}, s = (u) => r("change", u), c = (u) => r("focus", u), l = (u) => r("blur", u);
|
|
307
|
+
return (u, n) => (g(), y("div", {
|
|
308
308
|
class: D(a.value)
|
|
309
309
|
}, [
|
|
310
|
-
|
|
311
|
-
L(
|
|
310
|
+
u.$slots.prefix ? (g(), y("span", $t, [
|
|
311
|
+
L(u.$slots, "prefix")
|
|
312
312
|
])) : T("", !0),
|
|
313
313
|
F("input", {
|
|
314
314
|
class: "vf-input__control",
|
|
315
|
-
type:
|
|
316
|
-
value:
|
|
317
|
-
placeholder:
|
|
318
|
-
disabled:
|
|
319
|
-
readonly:
|
|
320
|
-
onInput:
|
|
321
|
-
onChange:
|
|
315
|
+
type: u.type,
|
|
316
|
+
value: u.modelValue,
|
|
317
|
+
placeholder: u.placeholder,
|
|
318
|
+
disabled: u.disabled,
|
|
319
|
+
readonly: u.readonly,
|
|
320
|
+
onInput: d,
|
|
321
|
+
onChange: s,
|
|
322
322
|
onFocus: c,
|
|
323
323
|
onBlur: l
|
|
324
|
-
}, null, 40,
|
|
325
|
-
|
|
326
|
-
L(
|
|
324
|
+
}, null, 40, xt),
|
|
325
|
+
u.$slots.suffix ? (g(), y("span", Bt, [
|
|
326
|
+
L(u.$slots, "suffix")
|
|
327
327
|
])) : T("", !0)
|
|
328
328
|
], 2));
|
|
329
329
|
}
|
|
330
|
-
}),
|
|
330
|
+
}), zt = ["for"], Ft = {
|
|
331
331
|
key: 0,
|
|
332
332
|
class: "vf-form-field__required",
|
|
333
333
|
"aria-hidden": "true"
|
|
334
|
-
},
|
|
334
|
+
}, St = { class: "vf-form-field__control" }, Vt = ["id"], Lt = ["id"], ja = /* @__PURE__ */ G({
|
|
335
335
|
__name: "form-field",
|
|
336
336
|
props: {
|
|
337
337
|
id: { default: void 0 },
|
|
@@ -343,17 +343,17 @@ const ht = /* @__PURE__ */ ct(ut, [["render", mt]]), yt = {
|
|
|
343
343
|
size: { default: "normal" }
|
|
344
344
|
},
|
|
345
345
|
setup(t) {
|
|
346
|
-
const e = t, r = Ue(), o = `vf-form-field-${Math.random().toString(36).slice(2, 10)}`, a = h(() => e.id || o),
|
|
346
|
+
const e = t, r = Ue(), o = `vf-form-field-${Math.random().toString(36).slice(2, 10)}`, a = h(() => e.id || o), d = h(() => `${a.value}-hint`), s = h(() => `${a.value}-error`), c = h(() => !!e.label || !!r.label), l = h(() => !!e.hint || !!r.hint), u = h(() => !!e.error || !!r.error), n = h(() => {
|
|
347
347
|
const f = [];
|
|
348
|
-
return l.value && f.push(
|
|
349
|
-
}),
|
|
348
|
+
return l.value && f.push(d.value), u.value && f.push(s.value), f.length ? f.join(" ") : void 0;
|
|
349
|
+
}), i = h(() => {
|
|
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"), u.value && f.push("vf-form-field_invalid"), f;
|
|
352
352
|
});
|
|
353
|
-
return (f, p) => (g(),
|
|
354
|
-
class: D(
|
|
353
|
+
return (f, p) => (g(), y("div", {
|
|
354
|
+
class: D(i.value)
|
|
355
355
|
}, [
|
|
356
|
-
c.value ? (g(),
|
|
356
|
+
c.value ? (g(), y("label", {
|
|
357
357
|
key: 0,
|
|
358
358
|
class: "vf-form-field__label",
|
|
359
359
|
for: a.value
|
|
@@ -361,38 +361,38 @@ const ht = /* @__PURE__ */ ct(ut, [["render", mt]]), yt = {
|
|
|
361
361
|
L(f.$slots, "label", {}, () => [
|
|
362
362
|
Q(O(f.label), 1)
|
|
363
363
|
]),
|
|
364
|
-
f.required ? (g(),
|
|
365
|
-
], 8,
|
|
366
|
-
F("div",
|
|
364
|
+
f.required ? (g(), y("span", Ft, "*")) : T("", !0)
|
|
365
|
+
], 8, zt)) : T("", !0),
|
|
366
|
+
F("div", St, [
|
|
367
367
|
L(f.$slots, "default", {
|
|
368
368
|
id: a.value,
|
|
369
369
|
describedBy: n.value,
|
|
370
|
-
invalid:
|
|
370
|
+
invalid: u.value,
|
|
371
371
|
required: f.required
|
|
372
372
|
})
|
|
373
373
|
]),
|
|
374
|
-
l.value ? (g(),
|
|
374
|
+
l.value ? (g(), y("p", {
|
|
375
375
|
key: 1,
|
|
376
|
-
id:
|
|
376
|
+
id: d.value,
|
|
377
377
|
class: "vf-form-field__hint"
|
|
378
378
|
}, [
|
|
379
379
|
L(f.$slots, "hint", {}, () => [
|
|
380
380
|
Q(O(f.hint), 1)
|
|
381
381
|
])
|
|
382
|
-
], 8,
|
|
383
|
-
|
|
382
|
+
], 8, Vt)) : T("", !0),
|
|
383
|
+
u.value ? (g(), y("p", {
|
|
384
384
|
key: 2,
|
|
385
|
-
id:
|
|
385
|
+
id: s.value,
|
|
386
386
|
class: "vf-form-field__error",
|
|
387
387
|
role: "alert"
|
|
388
388
|
}, [
|
|
389
389
|
L(f.$slots, "error", {}, () => [
|
|
390
390
|
Q(O(f.error), 1)
|
|
391
391
|
])
|
|
392
|
-
], 8,
|
|
392
|
+
], 8, Lt)) : T("", !0)
|
|
393
393
|
], 2));
|
|
394
394
|
}
|
|
395
|
-
}),
|
|
395
|
+
}), Tt = ["value", "placeholder", "disabled", "readonly", "rows"], Xa = /* @__PURE__ */ G({
|
|
396
396
|
__name: "textarea",
|
|
397
397
|
props: {
|
|
398
398
|
modelValue: { default: "" },
|
|
@@ -406,27 +406,27 @@ const ht = /* @__PURE__ */ ct(ut, [["render", mt]]), yt = {
|
|
|
406
406
|
emits: ["update:modelValue", "input", "change", "focus", "blur"],
|
|
407
407
|
setup(t, { emit: e }) {
|
|
408
408
|
const r = e, o = t, a = h(() => {
|
|
409
|
-
const
|
|
410
|
-
return o.size !== "normal" &&
|
|
411
|
-
}),
|
|
412
|
-
const n =
|
|
413
|
-
r("update:modelValue", n.value), r("input",
|
|
414
|
-
},
|
|
415
|
-
return (
|
|
409
|
+
const u = ["vf-textarea", `vf-textarea_${o.variant}`];
|
|
410
|
+
return o.size !== "normal" && u.push(`vf-textarea_${o.size}`), o.disabled && u.push("vf-textarea_disabled"), u;
|
|
411
|
+
}), d = (u) => {
|
|
412
|
+
const n = u.target;
|
|
413
|
+
r("update:modelValue", n.value), r("input", u);
|
|
414
|
+
}, s = (u) => r("change", u), c = (u) => r("focus", u), l = (u) => r("blur", u);
|
|
415
|
+
return (u, n) => (g(), y("div", {
|
|
416
416
|
class: D(a.value)
|
|
417
417
|
}, [
|
|
418
418
|
F("textarea", {
|
|
419
419
|
class: "vf-textarea__control",
|
|
420
|
-
value:
|
|
421
|
-
placeholder:
|
|
422
|
-
disabled:
|
|
423
|
-
readonly:
|
|
424
|
-
rows:
|
|
425
|
-
onInput:
|
|
426
|
-
onChange:
|
|
420
|
+
value: u.modelValue,
|
|
421
|
+
placeholder: u.placeholder,
|
|
422
|
+
disabled: u.disabled,
|
|
423
|
+
readonly: u.readonly,
|
|
424
|
+
rows: u.rows,
|
|
425
|
+
onInput: d,
|
|
426
|
+
onChange: s,
|
|
427
427
|
onFocus: c,
|
|
428
428
|
onBlur: l
|
|
429
|
-
}, null, 40,
|
|
429
|
+
}, null, 40, Tt)
|
|
430
430
|
], 2));
|
|
431
431
|
}
|
|
432
432
|
}), Ne = [
|
|
@@ -452,16 +452,16 @@ const ht = /* @__PURE__ */ ct(ut, [["render", mt]]), yt = {
|
|
|
452
452
|
}
|
|
453
453
|
return t.scrollHeight > t.clientHeight || t.scrollWidth > t.clientWidth ? t : pe(t.parentNode);
|
|
454
454
|
};
|
|
455
|
-
function
|
|
455
|
+
function Rt(t) {
|
|
456
456
|
return typeof window > "u" ? !1 : window.getComputedStyle(t).position === "fixed";
|
|
457
457
|
}
|
|
458
|
-
const
|
|
459
|
-
const o = t.getBoundingClientRect(), a = e ? e.offsetParent : null,
|
|
460
|
-
if (a && !
|
|
461
|
-
const
|
|
458
|
+
const Pt = (t, e) => t.strategy ? t.strategy : Rt(e) ? "fixed" : "absolute", me = (t, e) => Pt(t, e) === "fixed", ie = (t, e, r = {}) => {
|
|
459
|
+
const o = t.getBoundingClientRect(), a = e ? e.offsetParent : null, d = e ? me(r, e) : !1;
|
|
460
|
+
if (a && !d) {
|
|
461
|
+
const s = a.getBoundingClientRect(), c = a.scrollLeft, l = a.scrollTop;
|
|
462
462
|
return {
|
|
463
|
-
left: o.left -
|
|
464
|
-
top: o.top -
|
|
463
|
+
left: o.left - s.left + c,
|
|
464
|
+
top: o.top - s.top + l,
|
|
465
465
|
width: o.width,
|
|
466
466
|
height: o.height
|
|
467
467
|
};
|
|
@@ -475,60 +475,60 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
475
475
|
}, _e = (t, e) => {
|
|
476
476
|
var r;
|
|
477
477
|
return (r = t.middleware) == null ? void 0 : r.find((o) => o.name === e);
|
|
478
|
-
}, Qe = (t, e) => !!_e(t, e),
|
|
478
|
+
}, Qe = (t, e) => !!_e(t, e), Mt = (t) => {
|
|
479
479
|
const e = pe(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
|
}, Re = (t) => t.scrollLeft + t.clientWidth, Pe = (t) => t.scrollTop + t.clientHeight, de = (t, e, r = null, o = {}, a) => {
|
|
483
483
|
if (r === null && typeof window < "u" && me(o, e))
|
|
484
484
|
return t;
|
|
485
|
-
let
|
|
485
|
+
let d = 0;
|
|
486
486
|
if (r === null) {
|
|
487
|
-
const
|
|
488
|
-
|
|
487
|
+
const s = pe(e);
|
|
488
|
+
d = s ? s.scrollTop : 0;
|
|
489
489
|
}
|
|
490
|
-
return t -
|
|
490
|
+
return t - d;
|
|
491
491
|
}, ce = (t, e, r = null, o = {}, a) => {
|
|
492
|
-
let
|
|
492
|
+
let d;
|
|
493
493
|
if (r === null && typeof window < "u" && me(o, e))
|
|
494
|
-
|
|
494
|
+
d = window.innerWidth;
|
|
495
495
|
else if (r === null) {
|
|
496
|
-
const
|
|
497
|
-
|
|
496
|
+
const s = pe(e);
|
|
497
|
+
d = s ? Re(s) : 0;
|
|
498
498
|
} else
|
|
499
|
-
|
|
500
|
-
return -(t + e.clientWidth -
|
|
499
|
+
d = r.getBoundingClientRect().width;
|
|
500
|
+
return -(t + e.clientWidth - d);
|
|
501
501
|
}, be = (t, e, r = null, o = {}, a) => {
|
|
502
|
-
let
|
|
502
|
+
let d;
|
|
503
503
|
if (r === null && typeof window < "u" && me(o, e))
|
|
504
|
-
|
|
504
|
+
d = window.innerHeight;
|
|
505
505
|
else if (r === null) {
|
|
506
|
-
const
|
|
507
|
-
|
|
506
|
+
const s = pe(e);
|
|
507
|
+
d = s ? Pe(s) : 0;
|
|
508
508
|
} else
|
|
509
|
-
|
|
510
|
-
return -(t + e.clientHeight -
|
|
509
|
+
d = r.getBoundingClientRect().height;
|
|
510
|
+
return -(t + e.clientHeight - d);
|
|
511
511
|
}, ue = (t, e, r = null, o = {}, a) => {
|
|
512
512
|
if (r === null && typeof window < "u" && me(o, e))
|
|
513
513
|
return t;
|
|
514
|
-
let
|
|
514
|
+
let d = 0;
|
|
515
515
|
if (r === null) {
|
|
516
|
-
const
|
|
517
|
-
|
|
516
|
+
const s = pe(e);
|
|
517
|
+
d = s ? s.scrollLeft : 0;
|
|
518
518
|
}
|
|
519
|
-
return t -
|
|
519
|
+
return t - d;
|
|
520
520
|
}, Ye = ({
|
|
521
521
|
options: t,
|
|
522
522
|
primaryX: e,
|
|
523
523
|
primaryY: r,
|
|
524
524
|
floating: o,
|
|
525
525
|
placement: a,
|
|
526
|
-
reference:
|
|
527
|
-
scrollDirection:
|
|
526
|
+
reference: d,
|
|
527
|
+
scrollDirection: s
|
|
528
528
|
}) => {
|
|
529
|
-
const c = Me(
|
|
529
|
+
const c = Me(d, o, a, t), l = _e(t, "offset");
|
|
530
530
|
if (l) {
|
|
531
|
-
const
|
|
531
|
+
const u = l.fn({
|
|
532
532
|
x: c.x,
|
|
533
533
|
y: c.y,
|
|
534
534
|
options: t,
|
|
@@ -536,12 +536,12 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
536
536
|
primaryY: r,
|
|
537
537
|
floating: o,
|
|
538
538
|
placement: a,
|
|
539
|
-
reference:
|
|
540
|
-
scrollDirection:
|
|
539
|
+
reference: d,
|
|
540
|
+
scrollDirection: s
|
|
541
541
|
});
|
|
542
|
-
c.x =
|
|
542
|
+
c.x = u.x, c.y = u.y;
|
|
543
543
|
}
|
|
544
|
-
return
|
|
544
|
+
return Zt(c, o, d, t) ? {
|
|
545
545
|
x: c.x,
|
|
546
546
|
y: c.y,
|
|
547
547
|
placement: a
|
|
@@ -554,21 +554,21 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
554
554
|
y: r,
|
|
555
555
|
options: o,
|
|
556
556
|
primaryX: a,
|
|
557
|
-
primaryY:
|
|
558
|
-
floating:
|
|
557
|
+
primaryY: d,
|
|
558
|
+
floating: s,
|
|
559
559
|
placement: c,
|
|
560
560
|
reference: l,
|
|
561
|
-
scrollDirection:
|
|
561
|
+
scrollDirection: u
|
|
562
562
|
}) => {
|
|
563
563
|
var n;
|
|
564
|
-
const
|
|
564
|
+
const i = {
|
|
565
565
|
x: e,
|
|
566
566
|
y: r,
|
|
567
567
|
placement: c
|
|
568
568
|
}, f = {
|
|
569
569
|
...o,
|
|
570
570
|
middleware: (n = o.middleware) == null ? void 0 : n.filter((S) => S.name !== "shift")
|
|
571
|
-
}, p = (t == null ? void 0 : t.placements) ?? Ne,
|
|
571
|
+
}, p = (t == null ? void 0 : t.placements) ?? Ne, v = !(t != null && t.placements), _ = v ? Ne : p;
|
|
572
572
|
let m = !1;
|
|
573
573
|
const C = (S) => {
|
|
574
574
|
if (m)
|
|
@@ -576,25 +576,25 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
576
576
|
const H = Ye({
|
|
577
577
|
options: f,
|
|
578
578
|
primaryX: a,
|
|
579
|
-
primaryY:
|
|
580
|
-
floating:
|
|
579
|
+
primaryY: d,
|
|
580
|
+
floating: s,
|
|
581
581
|
placement: S,
|
|
582
582
|
reference: l,
|
|
583
|
-
scrollDirection:
|
|
583
|
+
scrollDirection: u
|
|
584
584
|
});
|
|
585
|
-
H && (
|
|
586
|
-
}, M =
|
|
587
|
-
if (!
|
|
585
|
+
H && (i.x = H.x, i.y = H.y, i.placement = H.placement, m = !0);
|
|
586
|
+
}, M = Qt(l, s, f);
|
|
587
|
+
if (!v && p.includes(c) && C(c), m || _.forEach(C), !m) {
|
|
588
588
|
const S = p.reduce(
|
|
589
589
|
(H, R) => {
|
|
590
590
|
const P = Ye({
|
|
591
591
|
options: f,
|
|
592
592
|
primaryX: a,
|
|
593
|
-
primaryY:
|
|
594
|
-
floating:
|
|
593
|
+
primaryY: d,
|
|
594
|
+
floating: s,
|
|
595
595
|
placement: R,
|
|
596
596
|
reference: l,
|
|
597
|
-
scrollDirection:
|
|
597
|
+
scrollDirection: u
|
|
598
598
|
});
|
|
599
599
|
if (!P)
|
|
600
600
|
return H;
|
|
@@ -603,7 +603,7 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
603
603
|
},
|
|
604
604
|
null
|
|
605
605
|
);
|
|
606
|
-
S && (
|
|
606
|
+
S && (i.x = S.result.x, i.y = S.result.y, i.placement = S.result.placement, m = !0);
|
|
607
607
|
}
|
|
608
608
|
if (!m && p.length > 0) {
|
|
609
609
|
const S = ze(c);
|
|
@@ -612,55 +612,55 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
612
612
|
const k = ze(x), V = M[k];
|
|
613
613
|
V > R && (R = V, H = k);
|
|
614
614
|
});
|
|
615
|
-
const P =
|
|
615
|
+
const P = Jt(H, c, p), W = Me(l, s, P, f), z = _e(f, "offset");
|
|
616
616
|
if (z) {
|
|
617
617
|
const x = z.fn({
|
|
618
618
|
x: W.x,
|
|
619
619
|
y: W.y,
|
|
620
620
|
options: f,
|
|
621
621
|
primaryX: a,
|
|
622
|
-
primaryY:
|
|
623
|
-
floating:
|
|
622
|
+
primaryY: d,
|
|
623
|
+
floating: s,
|
|
624
624
|
placement: P,
|
|
625
625
|
reference: l,
|
|
626
|
-
scrollDirection:
|
|
626
|
+
scrollDirection: u
|
|
627
627
|
});
|
|
628
628
|
W.x = x.x, W.y = x.y;
|
|
629
629
|
}
|
|
630
|
-
|
|
630
|
+
i.x = W.x, i.y = W.y, i.placement = W.placement;
|
|
631
631
|
}
|
|
632
|
-
return
|
|
632
|
+
return i;
|
|
633
633
|
}
|
|
634
634
|
}), et = (t, e, r, o, a) => {
|
|
635
|
-
var
|
|
635
|
+
var d, s, c;
|
|
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 u = _e(e, "arrow"), n = _e(e, "shift");
|
|
639
|
+
if (u) {
|
|
640
|
+
const i = ((d = u.params) == null ? void 0 : d.arrow).getBoundingClientRect();
|
|
641
|
+
o.startsWith("right") ? l -= i.width / 2 : o.startsWith("left") && (l += i.width / 2);
|
|
642
642
|
}
|
|
643
|
-
if (Qe(e, "shift") &&
|
|
644
|
-
let
|
|
645
|
-
n && (
|
|
646
|
-
const p = (c =
|
|
647
|
-
f = p.getBoundingClientRect().width / 2, f +=
|
|
643
|
+
if (Qe(e, "shift") && u) {
|
|
644
|
+
let i = null, f = 0;
|
|
645
|
+
n && (i = (s = n.params) == null ? void 0 : s.parent);
|
|
646
|
+
const p = (c = u.params) == null ? void 0 : c.arrow;
|
|
647
|
+
f = p.getBoundingClientRect().width / 2, f += Dt(p), f -= t, o.startsWith("right") ? ce(r - l, a, i, e) <= t ? ce(r, a, i, e) > 0 ? l = t - ce(r, a, i, e) : l = t : ue(r - l - f, a, i, e) <= t && (ue(r - l - f, a, i, e) >= 0 ? (l = -t - (ue(r - l - f, a, i, e) + t), i && (l = -t)) : l = -t) : o.startsWith("left") ? ce(r - l + f, a, i, e) <= t ? (l = t + ce(r - f, a, i, e), l <= t && (l = t)) : ue(r - l, a, i, e) <= t && (l = -t + ue(r, a, i, e), l <= -t && (l = -t)) : ce(r - l, a, i, e) <= t ? ce(r - l, a, i, e) <= t && ce(r, a, i, e) > 0 ? l = t - ce(r, a, i, e) : l = t : ue(r - l, a, i, e) <= t && (ue(r - l, a, i, e) <= t && ue(r, a, i, e) > 0 ? l = -(t - ue(r, a, i, e)) : l = -t);
|
|
648
648
|
}
|
|
649
649
|
return l;
|
|
650
650
|
}, tt = (t, e, r, o, a) => {
|
|
651
|
-
var
|
|
651
|
+
var d, s, c;
|
|
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 u = _e(e, "arrow"), n = _e(e, "shift");
|
|
655
|
+
if (u) {
|
|
656
|
+
const i = ((d = u.params) == null ? void 0 : d.arrow).getBoundingClientRect();
|
|
657
|
+
o.startsWith("top") ? l += i.height / 2 : o.startsWith("bottom") && (l -= i.height / 2);
|
|
658
658
|
}
|
|
659
|
-
if (Qe(e, "shift") &&
|
|
660
|
-
let
|
|
661
|
-
n && (
|
|
662
|
-
const p = (c =
|
|
663
|
-
f = p.getBoundingClientRect().height / 2, f +=
|
|
659
|
+
if (Qe(e, "shift") && u) {
|
|
660
|
+
let i = null, f = 0;
|
|
661
|
+
n && (i = (s = n.params) == null ? void 0 : s.parent);
|
|
662
|
+
const p = (c = u.params) == null ? void 0 : c.arrow;
|
|
663
|
+
f = p.getBoundingClientRect().height / 2, f += Ot(p), f -= t, o.startsWith("top") ? de(r - l, a, i, e) <= t ? de(r, a, i, e) >= 0 ? l = -(t - de(r, a, i, e)) : l = -t : be(r - l + f, a, i, e) <= t && (l = t + be(r - f, a, i, e), l <= t && (l = t)) : o.startsWith("bottom") ? de(r - l - f, a, i, e) <= t ? de(r - l - f, a, i, e) >= 0 ? (l = -t - (de(r - l - f, a, i, e) + t), i && (l = -t)) : l = -t : be(r - l, a, i, e) <= t && (be(r, a, i, e) >= 0 ? l = t - be(r, a, i, e) : l = t) : de(r - l, a, i, e) <= t ? de(r - l, a, i, e) >= 0 ? l = -(t - de(r - l, a, i, e)) : l = -t : be(r - l, a, i, e) <= t && (be(r - l, a, i, e) >= 0 ? l = t - be(r - l, a, i, e) : l = t);
|
|
664
664
|
}
|
|
665
665
|
return l;
|
|
666
666
|
}, Ve = (t) => ({
|
|
@@ -671,15 +671,15 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
671
671
|
y: r,
|
|
672
672
|
options: o,
|
|
673
673
|
primaryX: a,
|
|
674
|
-
primaryY:
|
|
675
|
-
floating:
|
|
674
|
+
primaryY: d,
|
|
675
|
+
floating: s,
|
|
676
676
|
placement: c
|
|
677
677
|
}) => ({
|
|
678
|
-
x: e - et(t, o, a, c,
|
|
679
|
-
y: r - tt(t, o,
|
|
678
|
+
x: e - et(t, o, a, c, s),
|
|
679
|
+
y: r - tt(t, o, d, c, s),
|
|
680
680
|
placement: c
|
|
681
681
|
})
|
|
682
|
-
}),
|
|
682
|
+
}), It = (t) => ({
|
|
683
683
|
name: "shift",
|
|
684
684
|
params: t,
|
|
685
685
|
fn: ({
|
|
@@ -687,129 +687,129 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
687
687
|
y: r,
|
|
688
688
|
options: o,
|
|
689
689
|
primaryX: a,
|
|
690
|
-
primaryY:
|
|
691
|
-
floating:
|
|
690
|
+
primaryY: d,
|
|
691
|
+
floating: s,
|
|
692
692
|
placement: c,
|
|
693
693
|
reference: l
|
|
694
694
|
}) => {
|
|
695
|
-
var
|
|
695
|
+
var u;
|
|
696
696
|
const n = {
|
|
697
697
|
x: e,
|
|
698
698
|
y: r,
|
|
699
699
|
placement: c
|
|
700
|
-
},
|
|
700
|
+
}, i = o.middleware || [], f = i.findIndex((V) => V.name === "shift"), p = i.findIndex((V) => V.name === "offset"), v = p !== -1 && (f === -1 || p > f), _ = i.find((V) => V.name === "offset"), m = _ ? (u = _.params) == null ? void 0 : u.value : 0, C = v ? et(m, o, a, c, s) : 0, M = v ? tt(m, o, d, c, s) : 0, S = e - C, H = r - M;
|
|
701
701
|
let R = S, P = H;
|
|
702
|
-
const W =
|
|
703
|
-
if (me(o,
|
|
704
|
-
const V = z, K = window.innerWidth -
|
|
705
|
-
R < V ? R = V : R >
|
|
706
|
-
const ae = z, J = window.innerWidth -
|
|
702
|
+
const W = _ ? Math.abs(m) : 0, z = W, x = W;
|
|
703
|
+
if (me(o, s) && typeof window < "u") {
|
|
704
|
+
const V = z, K = window.innerWidth - s.clientWidth - z, j = K < V ? V : K, X = x, oe = window.innerHeight - s.clientHeight - x, q = oe < X ? X : oe;
|
|
705
|
+
R < V ? R = V : R > j && (R = j), P < X ? P = X : P > q && (P = q), v ? (n.x = e + (R - S), n.y = r + (P - H)) : (n.x = R, n.y = P);
|
|
706
|
+
const ae = z, J = window.innerWidth - s.clientWidth - z, ne = x, w = window.innerHeight - s.clientHeight - x, E = v ? ae + C : ae, A = v ? J + C : J, ee = v ? ne + M : ne, b = v ? w + M : w;
|
|
707
707
|
return n.x < E ? n.x = E : n.x > A && (n.x = A), n.y < ee ? n.y = ee : n.y > b && (n.y = b), n;
|
|
708
708
|
}
|
|
709
|
-
const k = pe(
|
|
709
|
+
const k = pe(s);
|
|
710
710
|
if (k !== null) {
|
|
711
|
-
const V = ie(l,
|
|
712
|
-
|
|
711
|
+
const V = ie(l, s, o), K = V.left, j = V.left + V.width, X = V.top, oe = V.top + V.height, q = k.scrollLeft + z, ae = Re(k) - s.clientWidth - z, J = ae < q ? q : ae, ne = k.scrollTop + x, w = Pe(k) - s.clientHeight - x, E = w < ne ? ne : w, A = k.scrollLeft, ee = Re(k), b = k.scrollTop, $ = Pe(k);
|
|
712
|
+
j <= A ? R = q : K >= ee && (R = J), oe <= b ? P = ne : X >= $ && (P = E), P < ne ? P = ne : P > E && (P = E), R < q ? R = q : R > J && (R = J);
|
|
713
713
|
}
|
|
714
|
-
if (
|
|
715
|
-
const V = k.scrollLeft + z, K = Re(k) -
|
|
716
|
-
n.x < oe ? n.x = oe : n.x >
|
|
714
|
+
if (v ? (n.x = e + (R - S), n.y = r + (P - H)) : (n.x = R, n.y = P), k !== null) {
|
|
715
|
+
const V = k.scrollLeft + z, K = Re(k) - s.clientWidth - z, j = k.scrollTop + x, X = Pe(k) - s.clientHeight - x, oe = v ? V + C : V, q = v ? K + C : K, ae = v ? j + M : j, J = v ? X + M : X;
|
|
716
|
+
n.x < oe ? n.x = oe : n.x > q && (n.x = q), n.y < ae ? n.y = ae : n.y > J && (n.y = J);
|
|
717
717
|
}
|
|
718
718
|
return n;
|
|
719
719
|
}
|
|
720
|
-
}),
|
|
720
|
+
}), Dt = (t) => t.getBoundingClientRect().width !== t.clientWidth ? (t.getBoundingClientRect().width - t.clientWidth) / 2 : 0, Ot = (t) => t.getBoundingClientRect().height !== t.clientHeight ? (t.getBoundingClientRect().height - t.clientHeight) / 2 : 0, Le = (t, e) => {
|
|
721
721
|
const r = pe(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));
|
|
725
725
|
}
|
|
726
726
|
if (typeof window < "u") {
|
|
727
|
-
const a = () => e(),
|
|
728
|
-
window.addEventListener("scroll", a, !1), window.addEventListener("resize",
|
|
727
|
+
const a = () => e(), d = () => e();
|
|
728
|
+
window.addEventListener("scroll", a, !1), window.addEventListener("resize", d, !1), o.push(() => window.removeEventListener("scroll", a, !1)), o.push(() => window.removeEventListener("resize", d, !1));
|
|
729
729
|
}
|
|
730
730
|
if (typeof ResizeObserver < "u" && t instanceof HTMLElement) {
|
|
731
731
|
const a = new ResizeObserver(() => e());
|
|
732
732
|
a.observe(t), o.push(() => a.disconnect());
|
|
733
733
|
}
|
|
734
734
|
return () => o.forEach((a) => a());
|
|
735
|
-
},
|
|
735
|
+
}, Et = (t, e, r = {}) => {
|
|
736
736
|
const o = ie(t, e, r);
|
|
737
737
|
return {
|
|
738
738
|
x: o.left - e.getBoundingClientRect().width / 2 + o.width / 2,
|
|
739
739
|
y: o.top - e.getBoundingClientRect().height,
|
|
740
740
|
placement: "top"
|
|
741
741
|
};
|
|
742
|
-
},
|
|
742
|
+
}, Wt = (t, e, r = {}) => {
|
|
743
743
|
const o = ie(t, e, r);
|
|
744
744
|
return {
|
|
745
745
|
x: o.left,
|
|
746
746
|
y: o.top - e.getBoundingClientRect().height,
|
|
747
747
|
placement: "top-start"
|
|
748
748
|
};
|
|
749
|
-
},
|
|
749
|
+
}, Ht = (t, e, r = {}) => {
|
|
750
750
|
const o = ie(t, e, r);
|
|
751
751
|
return {
|
|
752
752
|
x: o.left - e.getBoundingClientRect().width + o.width,
|
|
753
753
|
y: o.top - e.getBoundingClientRect().height,
|
|
754
754
|
placement: "top-end"
|
|
755
755
|
};
|
|
756
|
-
},
|
|
756
|
+
}, At = (t, e, r = {}) => {
|
|
757
757
|
const o = ie(t, e, r);
|
|
758
758
|
return {
|
|
759
759
|
x: o.left + o.width,
|
|
760
760
|
y: o.top - e.getBoundingClientRect().height / 2 + o.height / 2,
|
|
761
761
|
placement: "right"
|
|
762
762
|
};
|
|
763
|
-
},
|
|
763
|
+
}, Kt = (t, e, r = {}) => {
|
|
764
764
|
const o = ie(t, e, r);
|
|
765
765
|
return {
|
|
766
766
|
x: o.left + o.width,
|
|
767
767
|
y: o.top,
|
|
768
768
|
placement: "right-start"
|
|
769
769
|
};
|
|
770
|
-
},
|
|
770
|
+
}, Nt = (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
|
+
}, Yt = (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,
|
|
781
781
|
y: o.top + o.height,
|
|
782
782
|
placement: "bottom"
|
|
783
783
|
};
|
|
784
|
-
},
|
|
784
|
+
}, Gt = (t, e, r = {}) => {
|
|
785
785
|
const o = ie(t, e, r);
|
|
786
786
|
return {
|
|
787
787
|
x: o.left,
|
|
788
788
|
y: o.top + o.height,
|
|
789
789
|
placement: "bottom-start"
|
|
790
790
|
};
|
|
791
|
-
},
|
|
791
|
+
}, jt = (t, e, r = {}) => {
|
|
792
792
|
const o = ie(t, e, r);
|
|
793
793
|
return {
|
|
794
794
|
x: o.left - e.getBoundingClientRect().width + o.width,
|
|
795
795
|
y: o.top + o.height,
|
|
796
796
|
placement: "bottom-end"
|
|
797
797
|
};
|
|
798
|
-
},
|
|
798
|
+
}, Xt = (t, e, r = {}) => {
|
|
799
799
|
const o = ie(t, e, r);
|
|
800
800
|
return {
|
|
801
801
|
x: o.left - e.getBoundingClientRect().width,
|
|
802
802
|
y: o.top + o.height / 2 - e.getBoundingClientRect().height / 2,
|
|
803
803
|
placement: "left"
|
|
804
804
|
};
|
|
805
|
-
},
|
|
805
|
+
}, qt = (t, e, r = {}) => {
|
|
806
806
|
const o = ie(t, e, r);
|
|
807
807
|
return {
|
|
808
808
|
x: o.left - e.getBoundingClientRect().width,
|
|
809
809
|
y: o.top,
|
|
810
810
|
placement: "left-start"
|
|
811
811
|
};
|
|
812
|
-
},
|
|
812
|
+
}, Ut = (t, e, r = {}) => {
|
|
813
813
|
const o = ie(t, e, r);
|
|
814
814
|
return {
|
|
815
815
|
x: o.left - e.getBoundingClientRect().width,
|
|
@@ -819,29 +819,29 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
819
819
|
}, Me = (t, e, r, o = {}) => {
|
|
820
820
|
switch (r) {
|
|
821
821
|
case "top":
|
|
822
|
-
return Ot(t, e, o);
|
|
823
|
-
case "top-start":
|
|
824
822
|
return Et(t, e, o);
|
|
825
|
-
case "top-
|
|
823
|
+
case "top-start":
|
|
826
824
|
return Wt(t, e, o);
|
|
827
|
-
case "
|
|
825
|
+
case "top-end":
|
|
828
826
|
return Ht(t, e, o);
|
|
829
|
-
case "right
|
|
827
|
+
case "right":
|
|
830
828
|
return At(t, e, o);
|
|
831
|
-
case "right-
|
|
829
|
+
case "right-start":
|
|
832
830
|
return Kt(t, e, o);
|
|
833
|
-
case "
|
|
831
|
+
case "right-end":
|
|
834
832
|
return Nt(t, e, o);
|
|
835
|
-
case "bottom
|
|
833
|
+
case "bottom":
|
|
836
834
|
return Yt(t, e, o);
|
|
837
|
-
case "bottom-
|
|
835
|
+
case "bottom-start":
|
|
838
836
|
return Gt(t, e, o);
|
|
839
|
-
case "
|
|
837
|
+
case "bottom-end":
|
|
840
838
|
return jt(t, e, o);
|
|
841
|
-
case "left
|
|
839
|
+
case "left":
|
|
842
840
|
return Xt(t, e, o);
|
|
843
|
-
case "left-
|
|
841
|
+
case "left-start":
|
|
844
842
|
return qt(t, e, o);
|
|
843
|
+
case "left-end":
|
|
844
|
+
return Ut(t, e, o);
|
|
845
845
|
default:
|
|
846
846
|
return {
|
|
847
847
|
x: 0,
|
|
@@ -849,25 +849,25 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
849
849
|
placement: ""
|
|
850
850
|
};
|
|
851
851
|
}
|
|
852
|
-
},
|
|
852
|
+
}, Zt = (t, e, r, o = {}) => {
|
|
853
853
|
if (me(o, e)) {
|
|
854
854
|
if (typeof window > "u")
|
|
855
855
|
return !0;
|
|
856
|
-
const
|
|
857
|
-
return
|
|
856
|
+
const i = t.x, f = t.y, p = i + e.clientWidth, v = f + e.clientHeight;
|
|
857
|
+
return i >= 0 && f >= 0 && p <= window.innerWidth && v <= window.innerHeight;
|
|
858
858
|
}
|
|
859
859
|
if (pe(r) !== null)
|
|
860
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
|
-
const a = window.innerWidth,
|
|
864
|
-
if (
|
|
865
|
-
const
|
|
866
|
-
return f >= 0 && p >= 0 &&
|
|
863
|
+
const a = window.innerWidth, d = window.innerHeight, s = (r instanceof HTMLElement ? r.offsetParent : null) || e.offsetParent;
|
|
864
|
+
if (s) {
|
|
865
|
+
const i = s.getBoundingClientRect(), f = i.left + t.x, p = i.top + t.y, v = f + e.clientWidth, _ = p + e.clientHeight;
|
|
866
|
+
return f >= 0 && p >= 0 && v <= a && _ <= d;
|
|
867
867
|
}
|
|
868
|
-
const c = t.x, l = t.y,
|
|
869
|
-
return c >= 0 && l >= 0 &&
|
|
870
|
-
}, ze = (t) => t.startsWith("right") ? "right" : t.startsWith("left") ? "left" : t.startsWith("top") ? "top" : "bottom",
|
|
868
|
+
const c = t.x, l = t.y, u = c + e.clientWidth, n = l + e.clientHeight;
|
|
869
|
+
return c >= 0 && l >= 0 && u <= a && n <= d;
|
|
870
|
+
}, ze = (t) => t.startsWith("right") ? "right" : t.startsWith("left") ? "left" : t.startsWith("top") ? "top" : "bottom", Jt = (t, e, r) => ze(e) === t && r.includes(e) ? e : r.find((o) => ze(o) === t) ?? r[0], Qt = (t, e, r = {}) => {
|
|
871
871
|
if (typeof window > "u")
|
|
872
872
|
return {
|
|
873
873
|
top: 0,
|
|
@@ -875,51 +875,51 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
875
875
|
bottom: 0,
|
|
876
876
|
left: 0
|
|
877
877
|
};
|
|
878
|
-
const o = me(r, e) ? null : pe(t), a = t.getBoundingClientRect(),
|
|
878
|
+
const o = me(r, e) ? null : pe(t), a = t.getBoundingClientRect(), d = o ? o.getBoundingClientRect() : {
|
|
879
879
|
top: 0,
|
|
880
880
|
left: 0,
|
|
881
881
|
right: window.innerWidth,
|
|
882
882
|
bottom: window.innerHeight
|
|
883
883
|
};
|
|
884
884
|
return {
|
|
885
|
-
top: a.top -
|
|
886
|
-
right:
|
|
887
|
-
bottom:
|
|
888
|
-
left: a.left -
|
|
885
|
+
top: a.top - d.top,
|
|
886
|
+
right: d.right - a.right,
|
|
887
|
+
bottom: d.bottom - a.bottom,
|
|
888
|
+
left: a.left - d.left
|
|
889
889
|
};
|
|
890
890
|
}, Te = (t, e, r = {}) => new Promise((o) => {
|
|
891
|
-
var a,
|
|
892
|
-
const
|
|
891
|
+
var a, d;
|
|
892
|
+
const s = r.placement ? r.placement : "bottom", c = {
|
|
893
893
|
x: 0,
|
|
894
894
|
y: 0,
|
|
895
|
-
placement:
|
|
895
|
+
placement: s,
|
|
896
896
|
middlewareData: {}
|
|
897
|
-
}, l = Me(t, e,
|
|
897
|
+
}, l = Me(t, e, s, r);
|
|
898
898
|
c.x = l.x, c.y = l.y, c.placement = l.placement;
|
|
899
|
-
const
|
|
900
|
-
(a = r.middleware) == null || a.forEach((
|
|
901
|
-
const m =
|
|
899
|
+
const u = c.x, n = c.y, i = Mt(t);
|
|
900
|
+
(a = r.middleware) == null || a.forEach((_) => {
|
|
901
|
+
const m = _.fn({
|
|
902
902
|
x: c.x,
|
|
903
903
|
y: c.y,
|
|
904
904
|
options: r,
|
|
905
|
-
primaryX:
|
|
905
|
+
primaryX: u,
|
|
906
906
|
primaryY: n,
|
|
907
907
|
floating: e,
|
|
908
908
|
placement: c.placement,
|
|
909
909
|
reference: t,
|
|
910
|
-
scrollDirection:
|
|
910
|
+
scrollDirection: i
|
|
911
911
|
});
|
|
912
|
-
c.x = m.x, c.y = m.y, c.placement = m.placement,
|
|
912
|
+
c.x = m.x, c.y = m.y, c.placement = m.placement, _.name === "arrow" && (m.baseX = m.x, m.baseY = m.y, m.x = m.arrowX ?? m.x, m.y = m.arrowY ?? m.y), c.middlewareData[_.name] = m;
|
|
913
913
|
});
|
|
914
|
-
const f = Me(t, e, c.placement, r), p = _e(r, "offset"),
|
|
914
|
+
const f = Me(t, e, c.placement, r), p = _e(r, "offset"), v = p ? (d = p.params) == null ? void 0 : d.value : 0;
|
|
915
915
|
if (Number.isFinite(c.x) || (c.x = f.x), !Number.isFinite(c.y))
|
|
916
916
|
if (me(r, e)) {
|
|
917
|
-
const
|
|
918
|
-
c.placement.startsWith("top") ? c.y =
|
|
917
|
+
const _ = t.getBoundingClientRect(), m = e.getBoundingClientRect().height;
|
|
918
|
+
c.placement.startsWith("top") ? c.y = _.top - m - v : c.placement.startsWith("bottom") ? c.y = _.bottom + v : c.y = f.y;
|
|
919
919
|
} else
|
|
920
920
|
c.y = f.y;
|
|
921
921
|
o(c);
|
|
922
|
-
}),
|
|
922
|
+
}), eo = ["disabled", "aria-expanded", "onKeydown"], to = ["data-placement"], oo = ["disabled", "aria-selected", "onClick"], qa = /* @__PURE__ */ G({
|
|
923
923
|
__name: "select",
|
|
924
924
|
props: {
|
|
925
925
|
modelValue: { default: void 0 },
|
|
@@ -934,58 +934,58 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
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,
|
|
937
|
+
const o = e, a = t, d = I(null), s = I(null), c = I(null), l = I(!1), u = I("bottom"), n = I("bottom"), i = `vf-select-panel-${++r}`;
|
|
938
938
|
let f = null;
|
|
939
939
|
const p = h(() => a.options.map((k) => ({
|
|
940
940
|
label: k[a.optionLabel],
|
|
941
941
|
value: k[a.optionValue],
|
|
942
942
|
disabled: k.disabled
|
|
943
|
-
}))),
|
|
943
|
+
}))), v = h(() => p.value.find((k) => k.value === a.modelValue)), _ = h(() => {
|
|
944
944
|
var k;
|
|
945
|
-
return ((k =
|
|
945
|
+
return ((k = v.value) == null ? void 0 : k.label) ?? "";
|
|
946
946
|
}), m = h(() => {
|
|
947
947
|
const k = ["vf-select", `vf-select_${a.variant}`, l.value ? "vf-select_open" : ""];
|
|
948
948
|
return a.size !== "normal" && k.push(`vf-select_${a.size}`), a.disabled && k.push("vf-select_disabled"), k.filter(Boolean);
|
|
949
949
|
}), C = (k) => k.value === a.modelValue, M = (k) => {
|
|
950
950
|
k.disabled || (o("update:modelValue", k.value), o("change", k.value), R());
|
|
951
951
|
}, S = (k) => o("focus", k), H = (k) => o("blur", k), R = () => {
|
|
952
|
-
l.value = !1,
|
|
952
|
+
l.value = !1, u.value = "bottom", n.value = "bottom";
|
|
953
953
|
}, P = () => {
|
|
954
|
-
a.disabled || (l.value = !l.value, l.value && (
|
|
954
|
+
a.disabled || (l.value = !l.value, l.value && (u.value = "bottom", n.value = "bottom"));
|
|
955
955
|
}, W = async () => {
|
|
956
956
|
var k, V;
|
|
957
957
|
l.value || (l.value = !0, await Ce()), (V = (k = c.value) == null ? void 0 : k.querySelector(".vf-select__option:not(.is-disabled)")) == null || V.focus();
|
|
958
958
|
}, z = (k) => {
|
|
959
959
|
var K;
|
|
960
|
-
if (!l.value || !
|
|
960
|
+
if (!l.value || !d.value)
|
|
961
961
|
return;
|
|
962
962
|
const V = k.target;
|
|
963
|
-
|
|
963
|
+
d.value.contains(V) || (K = c.value) != null && K.contains(V) || R();
|
|
964
964
|
}, x = () => {
|
|
965
|
-
if (!
|
|
965
|
+
if (!s.value || !c.value)
|
|
966
966
|
return;
|
|
967
|
-
const k =
|
|
967
|
+
const k = s.value, V = c.value, K = async () => {
|
|
968
968
|
const {
|
|
969
|
-
x:
|
|
969
|
+
x: q,
|
|
970
970
|
y: ae,
|
|
971
971
|
placement: J
|
|
972
972
|
} = await Te(k, V, {
|
|
973
|
-
placement:
|
|
973
|
+
placement: u.value,
|
|
974
974
|
strategy: "fixed",
|
|
975
975
|
middleware: [Ve(2), Se({ placements: ["bottom", "top"] })]
|
|
976
976
|
});
|
|
977
|
-
n.value = J ??
|
|
978
|
-
},
|
|
977
|
+
n.value = J ?? u.value, V.style.minWidth = `${k.getBoundingClientRect().width}px`, V.style.left = `${q}px`, V.style.top = `${ae}px`;
|
|
978
|
+
}, j = async () => {
|
|
979
979
|
await K();
|
|
980
|
-
},
|
|
981
|
-
|
|
980
|
+
}, X = Le(k, () => {
|
|
981
|
+
j();
|
|
982
982
|
}), oe = () => {
|
|
983
|
-
|
|
983
|
+
j();
|
|
984
984
|
};
|
|
985
985
|
document.addEventListener("scroll", oe, !0), window.addEventListener("resize", oe, !1), f = {
|
|
986
|
-
update:
|
|
986
|
+
update: j,
|
|
987
987
|
destroy: () => {
|
|
988
|
-
|
|
988
|
+
X(), document.removeEventListener("scroll", oe, !0), window.removeEventListener("resize", oe, !1);
|
|
989
989
|
}
|
|
990
990
|
}, f.update();
|
|
991
991
|
};
|
|
@@ -1005,68 +1005,68 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
1005
1005
|
document.addEventListener("click", z);
|
|
1006
1006
|
}), we(() => {
|
|
1007
1007
|
document.removeEventListener("click", z), f == null || f.destroy(), f = null;
|
|
1008
|
-
}), (k, V) => (g(),
|
|
1008
|
+
}), (k, V) => (g(), y("div", {
|
|
1009
1009
|
ref_key: "root",
|
|
1010
|
-
ref:
|
|
1010
|
+
ref: d,
|
|
1011
1011
|
class: D(m.value)
|
|
1012
1012
|
}, [
|
|
1013
1013
|
F("button", {
|
|
1014
1014
|
ref_key: "trigger",
|
|
1015
|
-
ref:
|
|
1015
|
+
ref: s,
|
|
1016
1016
|
class: "vf-select__control",
|
|
1017
1017
|
type: "button",
|
|
1018
1018
|
disabled: k.disabled,
|
|
1019
1019
|
"aria-expanded": l.value,
|
|
1020
|
-
"aria-controls":
|
|
1020
|
+
"aria-controls": i,
|
|
1021
1021
|
"aria-haspopup": "listbox",
|
|
1022
1022
|
onClick: P,
|
|
1023
1023
|
onKeydown: [
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1024
|
+
U(Y(W, ["prevent"]), ["down"]),
|
|
1025
|
+
U(Y(P, ["prevent"]), ["enter"]),
|
|
1026
|
+
U(Y(R, ["prevent"]), ["esc"])
|
|
1027
1027
|
],
|
|
1028
1028
|
onFocus: S,
|
|
1029
1029
|
onBlur: H
|
|
1030
1030
|
}, [
|
|
1031
1031
|
F("span", {
|
|
1032
|
-
class: D(["vf-select__label", { "vf-select__label_placeholder": !
|
|
1033
|
-
}, O(
|
|
1032
|
+
class: D(["vf-select__label", { "vf-select__label_placeholder": !_.value }])
|
|
1033
|
+
}, O(_.value || k.placeholder), 3),
|
|
1034
1034
|
V[0] || (V[0] = F("span", {
|
|
1035
1035
|
class: "vf-select__chevron",
|
|
1036
1036
|
"aria-hidden": "true"
|
|
1037
1037
|
}, "▾", -1))
|
|
1038
|
-
], 40,
|
|
1038
|
+
], 40, eo),
|
|
1039
1039
|
(g(), le($e, { to: "body" }, [
|
|
1040
1040
|
ve(F("div", {
|
|
1041
|
-
id:
|
|
1041
|
+
id: i,
|
|
1042
1042
|
ref_key: "panel",
|
|
1043
1043
|
ref: c,
|
|
1044
1044
|
class: "vf-select__panel",
|
|
1045
1045
|
role: "listbox",
|
|
1046
1046
|
"data-placement": n.value
|
|
1047
1047
|
}, [
|
|
1048
|
-
(g(!0),
|
|
1048
|
+
(g(!0), y(se, null, ke(p.value, (K) => (g(), y("button", {
|
|
1049
1049
|
key: K.value,
|
|
1050
1050
|
class: D(["vf-select__option", { "is-active": C(K), "is-disabled": K.disabled }]),
|
|
1051
1051
|
type: "button",
|
|
1052
1052
|
role: "option",
|
|
1053
1053
|
disabled: K.disabled,
|
|
1054
1054
|
"aria-selected": C(K),
|
|
1055
|
-
onClick: (
|
|
1056
|
-
}, O(K.label), 11,
|
|
1057
|
-
], 8,
|
|
1055
|
+
onClick: (j) => M(K)
|
|
1056
|
+
}, O(K.label), 11, oo))), 128))
|
|
1057
|
+
], 8, to), [
|
|
1058
1058
|
[fe, l.value]
|
|
1059
1059
|
])
|
|
1060
1060
|
]))
|
|
1061
1061
|
], 2));
|
|
1062
1062
|
}
|
|
1063
|
-
}),
|
|
1063
|
+
}), ao = ["value", "placeholder", "disabled", "readonly", "aria-expanded", "aria-activedescendant", "onKeydown"], ro = ["disabled"], lo = ["data-placement"], no = {
|
|
1064
1064
|
key: 0,
|
|
1065
1065
|
class: "vf-autocomplete__loading"
|
|
1066
|
-
},
|
|
1066
|
+
}, so = ["id", "disabled", "aria-selected", "onClick"], io = {
|
|
1067
1067
|
key: 2,
|
|
1068
1068
|
class: "vf-autocomplete__empty"
|
|
1069
|
-
},
|
|
1069
|
+
}, Ua = /* @__PURE__ */ G({
|
|
1070
1070
|
__name: "autocomplete",
|
|
1071
1071
|
props: {
|
|
1072
1072
|
modelValue: { default: void 0 },
|
|
@@ -1086,17 +1086,17 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
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,
|
|
1090
|
-
let
|
|
1091
|
-
const
|
|
1089
|
+
const o = e, a = t, d = I(null), s = I(null), c = I(null), l = I(!1), u = I(""), n = I(-1), i = I("bottom"), f = I("bottom"), p = `vf-autocomplete-panel-${++r}`;
|
|
1090
|
+
let v = null;
|
|
1091
|
+
const _ = h(() => a.options.map((w) => ({
|
|
1092
1092
|
label: w[a.optionLabel],
|
|
1093
1093
|
value: w[a.optionValue],
|
|
1094
1094
|
disabled: w.disabled
|
|
1095
|
-
}))), m = h(() =>
|
|
1095
|
+
}))), m = h(() => _.value.find((w) => w.value === a.modelValue)), C = h(() => {
|
|
1096
1096
|
if (!a.filter)
|
|
1097
|
-
return
|
|
1098
|
-
const w =
|
|
1099
|
-
return w ?
|
|
1097
|
+
return _.value;
|
|
1098
|
+
const w = u.value.trim().toLowerCase();
|
|
1099
|
+
return w ? _.value.filter((E) => E.label.toLowerCase().includes(w)) : _.value;
|
|
1100
1100
|
}), M = h(() => {
|
|
1101
1101
|
if (!(!l.value || n.value < 0))
|
|
1102
1102
|
return H(n.value);
|
|
@@ -1118,9 +1118,9 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
1118
1118
|
}
|
|
1119
1119
|
n.value = -1;
|
|
1120
1120
|
}, z = () => {
|
|
1121
|
-
a.disabled || (l.value = !0,
|
|
1121
|
+
a.disabled || (l.value = !0, i.value = "bottom", f.value = "bottom", n.value < 0 && (n.value = P()));
|
|
1122
1122
|
}, x = () => {
|
|
1123
|
-
l.value = !1, n.value = -1,
|
|
1123
|
+
l.value = !1, n.value = -1, i.value = "bottom", f.value = "bottom";
|
|
1124
1124
|
}, k = () => {
|
|
1125
1125
|
if (l.value) {
|
|
1126
1126
|
x();
|
|
@@ -1128,13 +1128,13 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
1128
1128
|
}
|
|
1129
1129
|
z();
|
|
1130
1130
|
}, V = (w) => {
|
|
1131
|
-
w.disabled || (
|
|
1131
|
+
w.disabled || (u.value = w.label, o("update:modelValue", w.value), o("change", w.value), x());
|
|
1132
1132
|
}, K = (w) => {
|
|
1133
1133
|
const E = w.target;
|
|
1134
|
-
|
|
1135
|
-
}, G = (w) => {
|
|
1136
|
-
o("focus", w), z();
|
|
1134
|
+
u.value = E.value, o("search", E.value), z(), n.value = P();
|
|
1137
1135
|
}, j = (w) => {
|
|
1136
|
+
o("focus", w), z();
|
|
1137
|
+
}, X = (w) => {
|
|
1138
1138
|
o("blur", w);
|
|
1139
1139
|
}, oe = () => {
|
|
1140
1140
|
if (!l.value) {
|
|
@@ -1142,7 +1142,7 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
1142
1142
|
return;
|
|
1143
1143
|
}
|
|
1144
1144
|
W(1);
|
|
1145
|
-
},
|
|
1145
|
+
}, q = () => {
|
|
1146
1146
|
if (!l.value) {
|
|
1147
1147
|
z();
|
|
1148
1148
|
return;
|
|
@@ -1157,24 +1157,24 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
1157
1157
|
w && !w.disabled && V(w);
|
|
1158
1158
|
}, J = (w) => {
|
|
1159
1159
|
var A;
|
|
1160
|
-
if (!l.value || !
|
|
1160
|
+
if (!l.value || !d.value)
|
|
1161
1161
|
return;
|
|
1162
1162
|
const E = w.target;
|
|
1163
|
-
|
|
1163
|
+
d.value.contains(E) || (A = c.value) != null && A.contains(E) || x();
|
|
1164
1164
|
}, ne = () => {
|
|
1165
|
-
if (!
|
|
1165
|
+
if (!s.value || !c.value)
|
|
1166
1166
|
return;
|
|
1167
|
-
const w =
|
|
1167
|
+
const w = s.value, E = c.value, A = async () => {
|
|
1168
1168
|
const {
|
|
1169
1169
|
x: B,
|
|
1170
1170
|
y: N,
|
|
1171
1171
|
placement: re
|
|
1172
1172
|
} = await Te(w, E, {
|
|
1173
|
-
placement:
|
|
1173
|
+
placement: i.value,
|
|
1174
1174
|
strategy: "fixed",
|
|
1175
1175
|
middleware: [Ve(2), Se({ placements: ["bottom", "top"] })]
|
|
1176
1176
|
});
|
|
1177
|
-
f.value = re ??
|
|
1177
|
+
f.value = re ?? i.value, E.style.minWidth = `${w.getBoundingClientRect().width}px`, E.style.left = `${B}px`, E.style.top = `${N}px`;
|
|
1178
1178
|
}, ee = async () => {
|
|
1179
1179
|
await A();
|
|
1180
1180
|
}, b = Le(w, () => {
|
|
@@ -1182,51 +1182,51 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
1182
1182
|
}), $ = () => {
|
|
1183
1183
|
ee();
|
|
1184
1184
|
};
|
|
1185
|
-
document.addEventListener("scroll", $, !0), window.addEventListener("resize", $, !1),
|
|
1185
|
+
document.addEventListener("scroll", $, !0), window.addEventListener("resize", $, !1), v = {
|
|
1186
1186
|
update: ee,
|
|
1187
1187
|
destroy: () => {
|
|
1188
1188
|
b(), document.removeEventListener("scroll", $, !0), window.removeEventListener("resize", $, !1);
|
|
1189
1189
|
}
|
|
1190
|
-
},
|
|
1190
|
+
}, v.update();
|
|
1191
1191
|
};
|
|
1192
1192
|
return te(
|
|
1193
1193
|
() => a.modelValue,
|
|
1194
1194
|
() => {
|
|
1195
1195
|
var w;
|
|
1196
|
-
|
|
1196
|
+
u.value = ((w = m.value) == null ? void 0 : w.label) ?? "";
|
|
1197
1197
|
},
|
|
1198
1198
|
{ immediate: !0 }
|
|
1199
1199
|
), te(
|
|
1200
1200
|
() => a.options,
|
|
1201
1201
|
() => {
|
|
1202
1202
|
var w;
|
|
1203
|
-
l.value || (
|
|
1203
|
+
l.value || (u.value = ((w = m.value) == null ? void 0 : w.label) ?? ""), v == null || v.update();
|
|
1204
1204
|
},
|
|
1205
1205
|
{ deep: !0 }
|
|
1206
1206
|
), te(C, () => {
|
|
1207
1207
|
n.value >= C.value.length && (n.value = P());
|
|
1208
1208
|
}), te(l, async (w) => {
|
|
1209
1209
|
if (!w) {
|
|
1210
|
-
|
|
1210
|
+
v && (v.destroy(), v = null);
|
|
1211
1211
|
return;
|
|
1212
1212
|
}
|
|
1213
|
-
await Ce(),
|
|
1213
|
+
await Ce(), v || ne(), v == null || v.update();
|
|
1214
1214
|
}), Fe(() => {
|
|
1215
1215
|
document.addEventListener("click", J);
|
|
1216
1216
|
}), we(() => {
|
|
1217
|
-
document.removeEventListener("click", J),
|
|
1218
|
-
}), (w, E) => (g(),
|
|
1217
|
+
document.removeEventListener("click", J), v == null || v.destroy(), v = null;
|
|
1218
|
+
}), (w, E) => (g(), y("div", {
|
|
1219
1219
|
ref_key: "root",
|
|
1220
|
-
ref:
|
|
1220
|
+
ref: d,
|
|
1221
1221
|
class: D(S.value)
|
|
1222
1222
|
}, [
|
|
1223
1223
|
F("input", {
|
|
1224
1224
|
ref_key: "control",
|
|
1225
|
-
ref:
|
|
1225
|
+
ref: s,
|
|
1226
1226
|
class: "vf-autocomplete__control",
|
|
1227
1227
|
type: "text",
|
|
1228
1228
|
role: "combobox",
|
|
1229
|
-
value:
|
|
1229
|
+
value: u.value,
|
|
1230
1230
|
placeholder: w.placeholder,
|
|
1231
1231
|
disabled: w.disabled,
|
|
1232
1232
|
readonly: w.readonly,
|
|
@@ -1235,17 +1235,17 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
1235
1235
|
"aria-controls": p,
|
|
1236
1236
|
"aria-activedescendant": M.value,
|
|
1237
1237
|
onInput: K,
|
|
1238
|
-
onFocus:
|
|
1239
|
-
onBlur:
|
|
1238
|
+
onFocus: j,
|
|
1239
|
+
onBlur: X,
|
|
1240
1240
|
onClick: z,
|
|
1241
1241
|
onKeydown: [
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1242
|
+
U(Y(oe, ["prevent"]), ["down"]),
|
|
1243
|
+
U(Y(q, ["prevent"]), ["up"]),
|
|
1244
|
+
U(Y(ae, ["prevent"]), ["enter"]),
|
|
1245
|
+
U(Y(x, ["prevent"]), ["esc"]),
|
|
1246
|
+
U(x, ["tab"])
|
|
1247
1247
|
]
|
|
1248
|
-
}, null, 40,
|
|
1248
|
+
}, null, 40, ao),
|
|
1249
1249
|
F("button", {
|
|
1250
1250
|
class: "vf-autocomplete__chevron",
|
|
1251
1251
|
type: "button",
|
|
@@ -1255,7 +1255,7 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
1255
1255
|
onMousedown: E[0] || (E[0] = Y(() => {
|
|
1256
1256
|
}, ["prevent"])),
|
|
1257
1257
|
onClick: k
|
|
1258
|
-
}, " ▾ ", 40,
|
|
1258
|
+
}, " ▾ ", 40, ro),
|
|
1259
1259
|
(g(), le($e, { to: "body" }, [
|
|
1260
1260
|
ve(F("div", {
|
|
1261
1261
|
id: p,
|
|
@@ -1265,7 +1265,7 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
1265
1265
|
role: "listbox",
|
|
1266
1266
|
"data-placement": f.value
|
|
1267
1267
|
}, [
|
|
1268
|
-
w.loading ? (g(),
|
|
1268
|
+
w.loading ? (g(), y("div", no, O(w.loadingText), 1)) : C.value.length > 0 ? (g(!0), y(se, { key: 1 }, ke(C.value, (A, ee) => (g(), y("button", {
|
|
1269
1269
|
id: H(ee),
|
|
1270
1270
|
key: A.value,
|
|
1271
1271
|
class: D(["vf-autocomplete__option", {
|
|
@@ -1280,27 +1280,27 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
1280
1280
|
onMousedown: E[1] || (E[1] = Y(() => {
|
|
1281
1281
|
}, ["prevent"])),
|
|
1282
1282
|
onClick: (b) => V(A)
|
|
1283
|
-
}, O(A.label), 43,
|
|
1284
|
-
], 8,
|
|
1283
|
+
}, O(A.label), 43, so))), 128)) : (g(), y("div", io, O(w.emptyText), 1))
|
|
1284
|
+
], 8, lo), [
|
|
1285
1285
|
[fe, l.value]
|
|
1286
1286
|
])
|
|
1287
1287
|
]))
|
|
1288
1288
|
], 2));
|
|
1289
1289
|
}
|
|
1290
|
-
}),
|
|
1290
|
+
}), co = ["disabled", "aria-expanded", "onKeydown"], uo = ["data-placement"], vo = {
|
|
1291
1291
|
key: 0,
|
|
1292
1292
|
class: "vf-multiselect__search"
|
|
1293
|
-
},
|
|
1293
|
+
}, fo = ["value", "placeholder", "onKeydown"], po = {
|
|
1294
1294
|
key: 1,
|
|
1295
1295
|
class: "vf-multiselect__loading"
|
|
1296
|
-
},
|
|
1296
|
+
}, bo = ["id", "disabled", "aria-selected", "onClick"], go = { class: "vf-multiselect__option-label" }, mo = {
|
|
1297
1297
|
key: 0,
|
|
1298
1298
|
class: "vf-multiselect__option-check",
|
|
1299
1299
|
"aria-hidden": "true"
|
|
1300
|
-
},
|
|
1300
|
+
}, ho = {
|
|
1301
1301
|
key: 3,
|
|
1302
1302
|
class: "vf-multiselect__empty"
|
|
1303
|
-
},
|
|
1303
|
+
}, Za = /* @__PURE__ */ G({
|
|
1304
1304
|
__name: "multi-select",
|
|
1305
1305
|
props: {
|
|
1306
1306
|
modelValue: { default: () => [] },
|
|
@@ -1322,8 +1322,8 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
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,
|
|
1326
|
-
let
|
|
1325
|
+
const o = e, a = t, d = I(null), s = I(null), c = I(null), l = I(null), u = I(!1), n = I(""), i = I(-1), f = I("bottom"), p = I("bottom"), v = `vf-multiselect-panel-${++r}`;
|
|
1326
|
+
let _ = null;
|
|
1327
1327
|
const m = h(() => a.options.map((b) => ({
|
|
1328
1328
|
label: b[a.optionLabel],
|
|
1329
1329
|
value: b[a.optionValue],
|
|
@@ -1334,9 +1334,9 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
1334
1334
|
const b = n.value.trim().toLowerCase();
|
|
1335
1335
|
return b ? m.value.filter(($) => $.label.toLowerCase().includes(b)) : m.value;
|
|
1336
1336
|
}), S = h(() => m.value.filter((b) => C.value.includes(b.value))), H = h(() => S.value.length === 0 ? a.placeholder : S.value.map((b) => b.label).join(", ")), R = h(() => {
|
|
1337
|
-
const b = ["vf-multiselect", `vf-multiselect_${a.variant}`,
|
|
1337
|
+
const b = ["vf-multiselect", `vf-multiselect_${a.variant}`, u.value ? "vf-multiselect_open" : ""];
|
|
1338
1338
|
return a.size !== "normal" && b.push(`vf-multiselect_${a.size}`), a.disabled && b.push("vf-multiselect_disabled"), b.filter(Boolean);
|
|
1339
|
-
}), P = (b) => `${
|
|
1339
|
+
}), P = (b) => `${v}-option-${b}`, W = () => M.value.findIndex((b) => !b.disabled), z = (b) => C.value.includes(b.value), x = (b) => {
|
|
1340
1340
|
o("update:modelValue", b), o("change", b);
|
|
1341
1341
|
}, k = (b) => {
|
|
1342
1342
|
if (!(b.disabled || a.readonly)) {
|
|
@@ -1351,60 +1351,60 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
1351
1351
|
}, K = (b) => {
|
|
1352
1352
|
const $ = M.value;
|
|
1353
1353
|
if (!$.length) {
|
|
1354
|
-
|
|
1354
|
+
i.value = -1;
|
|
1355
1355
|
return;
|
|
1356
1356
|
}
|
|
1357
|
-
let B =
|
|
1357
|
+
let B = i.value;
|
|
1358
1358
|
(B < 0 || B >= $.length) && (B = b > 0 ? -1 : $.length);
|
|
1359
1359
|
for (let N = 0; N < $.length; N += 1)
|
|
1360
1360
|
if (B = (B + b + $.length) % $.length, !$[B].disabled) {
|
|
1361
|
-
|
|
1361
|
+
i.value = B;
|
|
1362
1362
|
return;
|
|
1363
1363
|
}
|
|
1364
|
-
|
|
1365
|
-
},
|
|
1364
|
+
i.value = -1;
|
|
1365
|
+
}, j = async () => {
|
|
1366
1366
|
var b;
|
|
1367
|
-
a.disabled || (
|
|
1368
|
-
},
|
|
1369
|
-
|
|
1367
|
+
a.disabled || (u.value = !0, f.value = "bottom", p.value = "bottom", i.value < 0 && (i.value = W()), a.filter && (await Ce(), (b = l.value) == null || b.focus()));
|
|
1368
|
+
}, X = () => {
|
|
1369
|
+
u.value = !1, i.value = -1, f.value = "bottom", p.value = "bottom", n.value = "";
|
|
1370
1370
|
}, oe = () => {
|
|
1371
|
-
if (
|
|
1372
|
-
|
|
1371
|
+
if (u.value) {
|
|
1372
|
+
X();
|
|
1373
1373
|
return;
|
|
1374
1374
|
}
|
|
1375
|
-
|
|
1376
|
-
},
|
|
1377
|
-
if (!
|
|
1378
|
-
|
|
1375
|
+
j();
|
|
1376
|
+
}, q = () => {
|
|
1377
|
+
if (!u.value) {
|
|
1378
|
+
j();
|
|
1379
1379
|
return;
|
|
1380
1380
|
}
|
|
1381
1381
|
K(1);
|
|
1382
1382
|
}, ae = () => {
|
|
1383
|
-
if (!
|
|
1384
|
-
|
|
1383
|
+
if (!u.value) {
|
|
1384
|
+
j();
|
|
1385
1385
|
return;
|
|
1386
1386
|
}
|
|
1387
1387
|
K(-1);
|
|
1388
1388
|
}, J = () => {
|
|
1389
|
-
if (!
|
|
1390
|
-
|
|
1389
|
+
if (!u.value) {
|
|
1390
|
+
j();
|
|
1391
1391
|
return;
|
|
1392
1392
|
}
|
|
1393
|
-
const b = M.value[
|
|
1393
|
+
const b = M.value[i.value];
|
|
1394
1394
|
b && !b.disabled && k(b);
|
|
1395
1395
|
}, ne = (b) => {
|
|
1396
1396
|
const $ = b.target;
|
|
1397
|
-
n.value = $.value, o("search", $.value),
|
|
1397
|
+
n.value = $.value, o("search", $.value), i.value = W();
|
|
1398
1398
|
}, w = (b) => o("focus", b), E = (b) => o("blur", b), A = (b) => {
|
|
1399
1399
|
var B;
|
|
1400
|
-
if (!
|
|
1400
|
+
if (!u.value || !d.value)
|
|
1401
1401
|
return;
|
|
1402
1402
|
const $ = b.target;
|
|
1403
|
-
|
|
1403
|
+
d.value.contains($) || (B = c.value) != null && B.contains($) || X();
|
|
1404
1404
|
}, ee = () => {
|
|
1405
|
-
if (!
|
|
1405
|
+
if (!s.value || !c.value)
|
|
1406
1406
|
return;
|
|
1407
|
-
const b =
|
|
1407
|
+
const b = s.value, $ = c.value, B = async () => {
|
|
1408
1408
|
const {
|
|
1409
1409
|
x: he,
|
|
1410
1410
|
y: De,
|
|
@@ -1422,51 +1422,51 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
1422
1422
|
}), Z = () => {
|
|
1423
1423
|
N();
|
|
1424
1424
|
};
|
|
1425
|
-
document.addEventListener("scroll", Z, !0), window.addEventListener("resize", Z, !1),
|
|
1425
|
+
document.addEventListener("scroll", Z, !0), window.addEventListener("resize", Z, !1), _ = {
|
|
1426
1426
|
update: N,
|
|
1427
1427
|
destroy: () => {
|
|
1428
1428
|
re(), document.removeEventListener("scroll", Z, !0), window.removeEventListener("resize", Z, !1);
|
|
1429
1429
|
}
|
|
1430
|
-
},
|
|
1430
|
+
}, _.update();
|
|
1431
1431
|
};
|
|
1432
1432
|
return te(
|
|
1433
1433
|
() => a.options,
|
|
1434
1434
|
() => {
|
|
1435
|
-
|
|
1435
|
+
i.value >= M.value.length && (i.value = W()), _ == null || _.update();
|
|
1436
1436
|
},
|
|
1437
1437
|
{ deep: !0 }
|
|
1438
|
-
), te(
|
|
1438
|
+
), te(u, async (b) => {
|
|
1439
1439
|
if (!b) {
|
|
1440
|
-
|
|
1440
|
+
_ && (_.destroy(), _ = null);
|
|
1441
1441
|
return;
|
|
1442
1442
|
}
|
|
1443
|
-
await Ce(),
|
|
1443
|
+
await Ce(), _ || ee(), _ == null || _.update();
|
|
1444
1444
|
}), te(M, () => {
|
|
1445
|
-
|
|
1445
|
+
i.value >= M.value.length && (i.value = W());
|
|
1446
1446
|
}), Fe(() => {
|
|
1447
1447
|
document.addEventListener("click", A);
|
|
1448
1448
|
}), we(() => {
|
|
1449
|
-
document.removeEventListener("click", A),
|
|
1450
|
-
}), (b, $) => (g(),
|
|
1449
|
+
document.removeEventListener("click", A), _ == null || _.destroy(), _ = null;
|
|
1450
|
+
}), (b, $) => (g(), y("div", {
|
|
1451
1451
|
ref_key: "root",
|
|
1452
|
-
ref:
|
|
1452
|
+
ref: d,
|
|
1453
1453
|
class: D(R.value)
|
|
1454
1454
|
}, [
|
|
1455
1455
|
F("button", {
|
|
1456
1456
|
ref_key: "trigger",
|
|
1457
|
-
ref:
|
|
1457
|
+
ref: s,
|
|
1458
1458
|
class: "vf-multiselect__control",
|
|
1459
1459
|
type: "button",
|
|
1460
1460
|
disabled: b.disabled,
|
|
1461
|
-
"aria-expanded":
|
|
1462
|
-
"aria-controls":
|
|
1461
|
+
"aria-expanded": u.value,
|
|
1462
|
+
"aria-controls": v,
|
|
1463
1463
|
"aria-haspopup": "listbox",
|
|
1464
1464
|
onClick: oe,
|
|
1465
1465
|
onKeydown: [
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1466
|
+
U(Y(q, ["prevent"]), ["down"]),
|
|
1467
|
+
U(Y(ae, ["prevent"]), ["up"]),
|
|
1468
|
+
U(Y(J, ["prevent"]), ["enter"]),
|
|
1469
|
+
U(Y(X, ["prevent"]), ["esc"])
|
|
1470
1470
|
],
|
|
1471
1471
|
onFocus: w,
|
|
1472
1472
|
onBlur: E
|
|
@@ -1478,8 +1478,8 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
1478
1478
|
class: "vf-multiselect__chevron",
|
|
1479
1479
|
"aria-hidden": "true"
|
|
1480
1480
|
}, "▾", -1))
|
|
1481
|
-
], 40,
|
|
1482
|
-
b.clearable && C.value.length > 0 && !b.disabled && !b.readonly ? (g(),
|
|
1481
|
+
], 40, co),
|
|
1482
|
+
b.clearable && C.value.length > 0 && !b.disabled && !b.readonly ? (g(), y("button", {
|
|
1483
1483
|
key: 0,
|
|
1484
1484
|
class: "vf-multiselect__clear",
|
|
1485
1485
|
type: "button",
|
|
@@ -1488,7 +1488,7 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
1488
1488
|
}, " ✕ ")) : T("", !0),
|
|
1489
1489
|
(g(), le($e, { to: "body" }, [
|
|
1490
1490
|
ve(F("div", {
|
|
1491
|
-
id:
|
|
1491
|
+
id: v,
|
|
1492
1492
|
ref_key: "panel",
|
|
1493
1493
|
ref: c,
|
|
1494
1494
|
class: "vf-multiselect__panel",
|
|
@@ -1496,7 +1496,7 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
1496
1496
|
"aria-multiselectable": "true",
|
|
1497
1497
|
"data-placement": p.value
|
|
1498
1498
|
}, [
|
|
1499
|
-
b.filter ? (g(),
|
|
1499
|
+
b.filter ? (g(), y("div", vo, [
|
|
1500
1500
|
F("input", {
|
|
1501
1501
|
ref_key: "searchInput",
|
|
1502
1502
|
ref: l,
|
|
@@ -1506,20 +1506,20 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
1506
1506
|
placeholder: b.searchPlaceholder,
|
|
1507
1507
|
onInput: ne,
|
|
1508
1508
|
onKeydown: [
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1509
|
+
U(Y(q, ["prevent"]), ["down"]),
|
|
1510
|
+
U(Y(ae, ["prevent"]), ["up"]),
|
|
1511
|
+
U(Y(J, ["prevent"]), ["enter"]),
|
|
1512
|
+
U(Y(X, ["prevent"]), ["esc"])
|
|
1513
1513
|
]
|
|
1514
|
-
}, null, 40,
|
|
1514
|
+
}, null, 40, fo)
|
|
1515
1515
|
])) : T("", !0),
|
|
1516
|
-
b.loading ? (g(),
|
|
1516
|
+
b.loading ? (g(), y("div", po, O(b.loadingText), 1)) : M.value.length > 0 ? (g(!0), y(se, { key: 2 }, ke(M.value, (B, N) => (g(), y("button", {
|
|
1517
1517
|
id: P(N),
|
|
1518
1518
|
key: B.value,
|
|
1519
1519
|
class: D(["vf-multiselect__option", {
|
|
1520
1520
|
"is-active": z(B),
|
|
1521
1521
|
"is-disabled": B.disabled,
|
|
1522
|
-
"is-highlighted": N ===
|
|
1522
|
+
"is-highlighted": N === i.value
|
|
1523
1523
|
}]),
|
|
1524
1524
|
type: "button",
|
|
1525
1525
|
role: "option",
|
|
@@ -1527,22 +1527,22 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
1527
1527
|
"aria-selected": z(B),
|
|
1528
1528
|
onClick: (re) => k(B)
|
|
1529
1529
|
}, [
|
|
1530
|
-
F("span",
|
|
1531
|
-
z(B) ? (g(),
|
|
1532
|
-
], 10,
|
|
1533
|
-
], 8,
|
|
1534
|
-
[fe,
|
|
1530
|
+
F("span", go, O(B.label), 1),
|
|
1531
|
+
z(B) ? (g(), y("span", mo, "✓")) : T("", !0)
|
|
1532
|
+
], 10, bo))), 128)) : (g(), y("div", ho, O(b.emptyText), 1))
|
|
1533
|
+
], 8, uo), [
|
|
1534
|
+
[fe, u.value]
|
|
1535
1535
|
])
|
|
1536
1536
|
]))
|
|
1537
1537
|
], 2));
|
|
1538
1538
|
}
|
|
1539
|
-
}),
|
|
1539
|
+
}), yo = ["disabled", "aria-expanded", "onKeydown"], _o = ["data-placement", "onKeydown"], ko = { class: "vf-datepicker__header" }, Co = { class: "vf-datepicker__month-label" }, wo = {
|
|
1540
1540
|
class: "vf-datepicker__weekdays",
|
|
1541
1541
|
role: "row"
|
|
1542
|
-
},
|
|
1542
|
+
}, $o = {
|
|
1543
1543
|
class: "vf-datepicker__days",
|
|
1544
1544
|
role: "grid"
|
|
1545
|
-
},
|
|
1545
|
+
}, xo = ["disabled", "data-date", "onClick"], Ja = /* @__PURE__ */ G({
|
|
1546
1546
|
__name: "datepicker",
|
|
1547
1547
|
props: {
|
|
1548
1548
|
modelValue: { default: void 0 },
|
|
@@ -1559,9 +1559,9 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
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,
|
|
1562
|
+
const o = e, a = t, d = I(null), s = I(null), c = I(null), l = I(!1), u = I("bottom"), n = I("bottom"), i = `vf-datepicker-panel-${++r}`, f = I(J(q(a.modelValue) ?? /* @__PURE__ */ new Date()));
|
|
1563
1563
|
let p = null;
|
|
1564
|
-
const
|
|
1564
|
+
const v = h(() => q(a.modelValue)), _ = h(() => q(a.min)), m = h(() => q(a.max)), C = h(() => v.value ? v.value.toLocaleDateString(a.locale, {
|
|
1565
1565
|
year: "numeric",
|
|
1566
1566
|
month: "short",
|
|
1567
1567
|
day: "numeric"
|
|
@@ -1575,7 +1575,7 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
1575
1575
|
return Z.setDate($.getDate() + re), b.format(Z);
|
|
1576
1576
|
});
|
|
1577
1577
|
}), H = h(() => {
|
|
1578
|
-
const b = E(f.value, a.firstDayOfWeek), $ =
|
|
1578
|
+
const b = E(f.value, a.firstDayOfWeek), $ = v.value ? A(v.value) : null, B = A(/* @__PURE__ */ new Date());
|
|
1579
1579
|
return Array.from({ length: 42 }, (N, re) => {
|
|
1580
1580
|
const Z = w(b, re), he = A(Z);
|
|
1581
1581
|
return {
|
|
@@ -1584,7 +1584,7 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
1584
1584
|
date: Z,
|
|
1585
1585
|
day: Z.getDate(),
|
|
1586
1586
|
inCurrentMonth: Z.getMonth() === f.value.getMonth(),
|
|
1587
|
-
isDisabled: ee(Z,
|
|
1587
|
+
isDisabled: ee(Z, _.value, m.value),
|
|
1588
1588
|
isSelected: $ === he,
|
|
1589
1589
|
isToday: he === B
|
|
1590
1590
|
};
|
|
@@ -1593,9 +1593,9 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
1593
1593
|
const b = ["vf-datepicker", `vf-datepicker_${a.variant}`, l.value ? "vf-datepicker_open" : ""];
|
|
1594
1594
|
return a.size !== "normal" && b.push(`vf-datepicker_${a.size}`), a.disabled && b.push("vf-datepicker_disabled"), b.filter(Boolean);
|
|
1595
1595
|
}), P = (b) => o("focus", b), W = (b) => o("blur", b), z = () => {
|
|
1596
|
-
a.disabled || a.readonly || (l.value = !0,
|
|
1596
|
+
a.disabled || a.readonly || (l.value = !0, u.value = "bottom", n.value = "bottom");
|
|
1597
1597
|
}, x = () => {
|
|
1598
|
-
l.value = !1,
|
|
1598
|
+
l.value = !1, u.value = "bottom", n.value = "bottom";
|
|
1599
1599
|
}, k = () => {
|
|
1600
1600
|
if (l.value) {
|
|
1601
1601
|
x();
|
|
@@ -1606,31 +1606,31 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
1606
1606
|
f.value = ne(f.value, -1);
|
|
1607
1607
|
}, K = () => {
|
|
1608
1608
|
f.value = ne(f.value, 1);
|
|
1609
|
-
},
|
|
1610
|
-
if (a.readonly || ee(b,
|
|
1609
|
+
}, j = (b) => {
|
|
1610
|
+
if (a.readonly || ee(b, _.value, m.value))
|
|
1611
1611
|
return;
|
|
1612
1612
|
const $ = A(b);
|
|
1613
1613
|
o("update:modelValue", $), o("change", $), x();
|
|
1614
|
-
},
|
|
1614
|
+
}, X = (b) => {
|
|
1615
1615
|
var B;
|
|
1616
|
-
if (!l.value || !
|
|
1616
|
+
if (!l.value || !d.value)
|
|
1617
1617
|
return;
|
|
1618
1618
|
const $ = b.target;
|
|
1619
|
-
|
|
1619
|
+
d.value.contains($) || (B = c.value) != null && B.contains($) || x();
|
|
1620
1620
|
}, oe = () => {
|
|
1621
|
-
if (!
|
|
1621
|
+
if (!s.value || !c.value)
|
|
1622
1622
|
return;
|
|
1623
|
-
const b =
|
|
1623
|
+
const b = s.value, $ = c.value, B = async () => {
|
|
1624
1624
|
const {
|
|
1625
1625
|
x: he,
|
|
1626
1626
|
y: De,
|
|
1627
1627
|
placement: Oe
|
|
1628
1628
|
} = await Te(b, $, {
|
|
1629
|
-
placement:
|
|
1629
|
+
placement: u.value,
|
|
1630
1630
|
strategy: "fixed",
|
|
1631
1631
|
middleware: [Ve(2), Se({ placements: ["bottom", "top"] })]
|
|
1632
1632
|
});
|
|
1633
|
-
n.value = Oe ??
|
|
1633
|
+
n.value = Oe ?? u.value, $.style.left = `${he}px`, $.style.top = `${De}px`;
|
|
1634
1634
|
}, N = async () => {
|
|
1635
1635
|
await B();
|
|
1636
1636
|
}, re = Le(b, () => {
|
|
@@ -1648,7 +1648,7 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
1648
1648
|
te(
|
|
1649
1649
|
() => a.modelValue,
|
|
1650
1650
|
(b) => {
|
|
1651
|
-
const $ =
|
|
1651
|
+
const $ = q(b);
|
|
1652
1652
|
$ && (f.value = J($));
|
|
1653
1653
|
},
|
|
1654
1654
|
{ immediate: !0 }
|
|
@@ -1664,11 +1664,11 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
1664
1664
|
}
|
|
1665
1665
|
await Ce(), p || oe(), p == null || p.update();
|
|
1666
1666
|
}), Fe(() => {
|
|
1667
|
-
document.addEventListener("click",
|
|
1667
|
+
document.addEventListener("click", X);
|
|
1668
1668
|
}), we(() => {
|
|
1669
|
-
document.removeEventListener("click",
|
|
1669
|
+
document.removeEventListener("click", X), p == null || p.destroy(), p = null;
|
|
1670
1670
|
});
|
|
1671
|
-
function
|
|
1671
|
+
function q(b) {
|
|
1672
1672
|
if (!b)
|
|
1673
1673
|
return null;
|
|
1674
1674
|
const $ = b.match(/^(\d{4})-(\d{2})-(\d{2})$/);
|
|
@@ -1701,55 +1701,55 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
1701
1701
|
const N = ae(b).getTime();
|
|
1702
1702
|
return !!($ && N < $.getTime() || B && N > B.getTime());
|
|
1703
1703
|
}
|
|
1704
|
-
return (b, $) => (g(),
|
|
1704
|
+
return (b, $) => (g(), y("div", {
|
|
1705
1705
|
ref_key: "root",
|
|
1706
|
-
ref:
|
|
1706
|
+
ref: d,
|
|
1707
1707
|
class: D(R.value)
|
|
1708
1708
|
}, [
|
|
1709
1709
|
F("button", {
|
|
1710
1710
|
ref_key: "control",
|
|
1711
|
-
ref:
|
|
1711
|
+
ref: s,
|
|
1712
1712
|
class: "vf-datepicker__control",
|
|
1713
1713
|
type: "button",
|
|
1714
1714
|
disabled: b.disabled,
|
|
1715
1715
|
"aria-expanded": l.value,
|
|
1716
|
-
"aria-controls":
|
|
1716
|
+
"aria-controls": i,
|
|
1717
1717
|
"aria-haspopup": "dialog",
|
|
1718
1718
|
onClick: k,
|
|
1719
1719
|
onKeydown: [
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1720
|
+
U(Y(z, ["prevent"]), ["down"]),
|
|
1721
|
+
U(Y(k, ["prevent"]), ["enter"]),
|
|
1722
|
+
U(Y(x, ["prevent"]), ["esc"])
|
|
1723
1723
|
],
|
|
1724
1724
|
onFocus: P,
|
|
1725
1725
|
onBlur: W
|
|
1726
1726
|
}, [
|
|
1727
1727
|
F("span", {
|
|
1728
|
-
class: D(["vf-datepicker__label", { "vf-datepicker__label_placeholder": !
|
|
1728
|
+
class: D(["vf-datepicker__label", { "vf-datepicker__label_placeholder": !v.value }])
|
|
1729
1729
|
}, O(C.value || b.placeholder), 3),
|
|
1730
1730
|
$[0] || ($[0] = F("span", {
|
|
1731
1731
|
class: "vf-datepicker__chevron",
|
|
1732
1732
|
"aria-hidden": "true"
|
|
1733
1733
|
}, "▾", -1))
|
|
1734
|
-
], 40,
|
|
1734
|
+
], 40, yo),
|
|
1735
1735
|
(g(), le($e, { to: "body" }, [
|
|
1736
1736
|
ve(F("div", {
|
|
1737
|
-
id:
|
|
1737
|
+
id: i,
|
|
1738
1738
|
ref_key: "panel",
|
|
1739
1739
|
ref: c,
|
|
1740
1740
|
class: "vf-datepicker__panel",
|
|
1741
1741
|
role: "dialog",
|
|
1742
1742
|
"data-placement": n.value,
|
|
1743
|
-
onKeydown:
|
|
1743
|
+
onKeydown: U(Y(x, ["prevent"]), ["esc"])
|
|
1744
1744
|
}, [
|
|
1745
|
-
F("div",
|
|
1745
|
+
F("div", ko, [
|
|
1746
1746
|
F("button", {
|
|
1747
1747
|
class: "vf-datepicker__nav",
|
|
1748
1748
|
type: "button",
|
|
1749
1749
|
"aria-label": "Previous month",
|
|
1750
1750
|
onClick: V
|
|
1751
1751
|
}, " ‹ "),
|
|
1752
|
-
F("span",
|
|
1752
|
+
F("span", Co, O(M.value), 1),
|
|
1753
1753
|
F("button", {
|
|
1754
1754
|
class: "vf-datepicker__nav",
|
|
1755
1755
|
type: "button",
|
|
@@ -1757,14 +1757,14 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
1757
1757
|
onClick: K
|
|
1758
1758
|
}, " › ")
|
|
1759
1759
|
]),
|
|
1760
|
-
F("div",
|
|
1761
|
-
(g(!0),
|
|
1760
|
+
F("div", wo, [
|
|
1761
|
+
(g(!0), y(se, null, ke(S.value, (B) => (g(), y("span", {
|
|
1762
1762
|
key: B,
|
|
1763
1763
|
class: "vf-datepicker__weekday"
|
|
1764
1764
|
}, O(B), 1))), 128))
|
|
1765
1765
|
]),
|
|
1766
|
-
F("div",
|
|
1767
|
-
(g(!0),
|
|
1766
|
+
F("div", $o, [
|
|
1767
|
+
(g(!0), y(se, null, ke(H.value, (B) => (g(), y("button", {
|
|
1768
1768
|
key: B.key,
|
|
1769
1769
|
class: D(["vf-datepicker__day", {
|
|
1770
1770
|
"is-outside": !B.inCurrentMonth,
|
|
@@ -1774,16 +1774,16 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
1774
1774
|
type: "button",
|
|
1775
1775
|
disabled: B.isDisabled,
|
|
1776
1776
|
"data-date": B.iso,
|
|
1777
|
-
onClick: (N) =>
|
|
1778
|
-
}, O(B.day), 11,
|
|
1777
|
+
onClick: (N) => j(B.date)
|
|
1778
|
+
}, O(B.day), 11, xo))), 128))
|
|
1779
1779
|
])
|
|
1780
|
-
], 40,
|
|
1780
|
+
], 40, _o), [
|
|
1781
1781
|
[fe, l.value]
|
|
1782
1782
|
])
|
|
1783
1783
|
]))
|
|
1784
1784
|
], 2));
|
|
1785
1785
|
}
|
|
1786
|
-
}),
|
|
1786
|
+
}), Bo = ["disabled"], zo = ["disabled", "aria-current", "aria-label", "onClick"], Fo = ["disabled"], Qa = /* @__PURE__ */ G({
|
|
1787
1787
|
__name: "pagination",
|
|
1788
1788
|
props: {
|
|
1789
1789
|
modelValue: { default: 1 },
|
|
@@ -1801,42 +1801,42 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
1801
1801
|
},
|
|
1802
1802
|
emits: ["update:modelValue", "change"],
|
|
1803
1803
|
setup(t, { emit: e }) {
|
|
1804
|
-
const r = t, o = e, a = (
|
|
1805
|
-
if (
|
|
1804
|
+
const r = t, o = e, a = (v, _, m) => Math.min(m, Math.max(_, v)), d = (v, _) => {
|
|
1805
|
+
if (_ < v)
|
|
1806
1806
|
return [];
|
|
1807
1807
|
const m = [];
|
|
1808
|
-
for (let C =
|
|
1808
|
+
for (let C = v; C <= _; C += 1)
|
|
1809
1809
|
m.push(C);
|
|
1810
1810
|
return m;
|
|
1811
|
-
},
|
|
1811
|
+
}, s = h(() => {
|
|
1812
1812
|
if (typeof r.totalPages == "number" && Number.isFinite(r.totalPages))
|
|
1813
1813
|
return Math.max(1, Math.floor(r.totalPages));
|
|
1814
|
-
const
|
|
1815
|
-
return Math.max(1, Math.ceil(Math.max(0, r.totalItems) /
|
|
1816
|
-
}), c = h(() => a(Math.floor(r.modelValue), 1,
|
|
1817
|
-
const
|
|
1818
|
-
if (
|
|
1819
|
-
return
|
|
1820
|
-
const H =
|
|
1814
|
+
const v = Math.max(1, Math.floor(r.pageSize));
|
|
1815
|
+
return Math.max(1, Math.ceil(Math.max(0, r.totalItems) / v));
|
|
1816
|
+
}), c = h(() => a(Math.floor(r.modelValue), 1, s.value)), l = h(() => c.value <= 1), u = h(() => c.value >= s.value), n = h(() => r.disabled || s.value <= 1), i = h(() => {
|
|
1817
|
+
const v = s.value, _ = c.value, m = Math.max(0, Math.floor(r.siblingCount)), C = Math.max(0, Math.floor(r.boundaryCount)), M = m * 2 + C * 2 + 3, S = [];
|
|
1818
|
+
if (v <= M)
|
|
1819
|
+
return d(1, v).map((z) => ({ key: `page-${z}`, type: "page", page: z }));
|
|
1820
|
+
const H = d(1, C), R = d(v - C + 1, v), P = Math.max(Math.min(_ - m, v - C - m * 2 - 1), C + 2), W = Math.min(Math.max(_ + m, C + m * 2 + 2), v - C - 1);
|
|
1821
1821
|
for (const z of H)
|
|
1822
1822
|
S.push({ key: `page-${z}`, type: "page", page: z });
|
|
1823
|
-
P > C + 2 ? S.push({ key: "ellipsis-start", type: "ellipsis", page: -1 }) : C + 1 <=
|
|
1824
|
-
for (const z of
|
|
1823
|
+
P > C + 2 ? S.push({ key: "ellipsis-start", type: "ellipsis", page: -1 }) : C + 1 <= v - C && S.push({ key: `page-${C + 1}`, type: "page", page: C + 1 });
|
|
1824
|
+
for (const z of d(P, W))
|
|
1825
1825
|
S.push({ key: `page-${z}`, type: "page", page: z });
|
|
1826
|
-
W <
|
|
1826
|
+
W < v - C - 1 ? S.push({ key: "ellipsis-end", type: "ellipsis", page: -2 }) : v - C > C && S.push({ key: `page-${v - C}`, type: "page", page: v - C });
|
|
1827
1827
|
for (const z of R)
|
|
1828
1828
|
S.push({ key: `page-${z}`, type: "page", page: z });
|
|
1829
1829
|
return S;
|
|
1830
1830
|
}), f = h(() => {
|
|
1831
|
-
const
|
|
1832
|
-
return r.size !== "normal" &&
|
|
1833
|
-
}), p = (
|
|
1831
|
+
const v = ["vf-pagination", `vf-pagination_${r.variant}`];
|
|
1832
|
+
return r.size !== "normal" && v.push(`vf-pagination_${r.size}`), r.disabled && v.push("vf-pagination_disabled"), v;
|
|
1833
|
+
}), p = (v, _) => {
|
|
1834
1834
|
if (n.value)
|
|
1835
1835
|
return;
|
|
1836
|
-
const m = a(
|
|
1837
|
-
m !== r.modelValue && (o("update:modelValue", m), o("change", m,
|
|
1836
|
+
const m = a(v, 1, s.value);
|
|
1837
|
+
m !== r.modelValue && (o("update:modelValue", m), o("change", m, _));
|
|
1838
1838
|
};
|
|
1839
|
-
return (
|
|
1839
|
+
return (v, _) => (g(), y("nav", {
|
|
1840
1840
|
class: D(f.value),
|
|
1841
1841
|
"aria-label": "Pagination"
|
|
1842
1842
|
}, [
|
|
@@ -1845,9 +1845,9 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
1845
1845
|
type: "button",
|
|
1846
1846
|
disabled: n.value || l.value,
|
|
1847
1847
|
"aria-label": "Previous page",
|
|
1848
|
-
onClick:
|
|
1849
|
-
}, O(
|
|
1850
|
-
(g(!0),
|
|
1848
|
+
onClick: _[0] || (_[0] = (m) => p(c.value - 1, m))
|
|
1849
|
+
}, O(v.prevLabel), 9, Bo),
|
|
1850
|
+
(g(!0), y(se, null, ke(i.value, (m) => (g(), y("button", {
|
|
1851
1851
|
key: m.key,
|
|
1852
1852
|
class: D(["vf-pagination__item", {
|
|
1853
1853
|
"is-current": m.type === "page" && m.page === c.value,
|
|
@@ -1859,25 +1859,25 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
1859
1859
|
"aria-label": m.type === "page" ? `Page ${m.page}` : void 0,
|
|
1860
1860
|
onClick: (C) => m.type === "page" && p(m.page, C)
|
|
1861
1861
|
}, [
|
|
1862
|
-
m.type === "page" ? (g(),
|
|
1862
|
+
m.type === "page" ? (g(), y(se, { key: 0 }, [
|
|
1863
1863
|
Q(O(m.page), 1)
|
|
1864
|
-
], 64)) : (g(),
|
|
1865
|
-
Q(O(
|
|
1864
|
+
], 64)) : (g(), y(se, { key: 1 }, [
|
|
1865
|
+
Q(O(v.ellipsisLabel), 1)
|
|
1866
1866
|
], 64))
|
|
1867
|
-
], 10,
|
|
1867
|
+
], 10, zo))), 128)),
|
|
1868
1868
|
F("button", {
|
|
1869
1869
|
class: "vf-pagination__item vf-pagination__item_nav",
|
|
1870
1870
|
type: "button",
|
|
1871
|
-
disabled: n.value ||
|
|
1871
|
+
disabled: n.value || u.value,
|
|
1872
1872
|
"aria-label": "Next page",
|
|
1873
|
-
onClick:
|
|
1874
|
-
}, O(
|
|
1873
|
+
onClick: _[1] || (_[1] = (m) => p(c.value + 1, m))
|
|
1874
|
+
}, O(v.nextLabel), 9, Fo)
|
|
1875
1875
|
], 2));
|
|
1876
1876
|
}
|
|
1877
|
-
}),
|
|
1877
|
+
}), So = ["checked", "disabled"], Vo = {
|
|
1878
1878
|
key: 0,
|
|
1879
1879
|
class: "vf-checkbox__label"
|
|
1880
|
-
},
|
|
1880
|
+
}, er = /* @__PURE__ */ G({
|
|
1881
1881
|
__name: "checkbox",
|
|
1882
1882
|
props: {
|
|
1883
1883
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -1888,31 +1888,31 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
1888
1888
|
emits: ["update:modelValue", "change"],
|
|
1889
1889
|
setup(t, { emit: e }) {
|
|
1890
1890
|
const r = e, o = t, a = h(() => {
|
|
1891
|
-
const
|
|
1892
|
-
return o.disabled &&
|
|
1893
|
-
}),
|
|
1894
|
-
const c =
|
|
1895
|
-
r("update:modelValue", c.checked), r("change",
|
|
1891
|
+
const s = ["vf-checkbox", `vf-checkbox_${o.variant}`];
|
|
1892
|
+
return o.disabled && s.push("vf-checkbox_disabled"), s;
|
|
1893
|
+
}), d = (s) => {
|
|
1894
|
+
const c = s.target;
|
|
1895
|
+
r("update:modelValue", c.checked), r("change", s);
|
|
1896
1896
|
};
|
|
1897
|
-
return (
|
|
1897
|
+
return (s, c) => (g(), y("label", {
|
|
1898
1898
|
class: D(a.value)
|
|
1899
1899
|
}, [
|
|
1900
1900
|
F("input", {
|
|
1901
1901
|
class: "vf-checkbox__control",
|
|
1902
1902
|
type: "checkbox",
|
|
1903
|
-
checked:
|
|
1904
|
-
disabled:
|
|
1905
|
-
onChange:
|
|
1906
|
-
}, null, 40,
|
|
1903
|
+
checked: s.modelValue,
|
|
1904
|
+
disabled: s.disabled,
|
|
1905
|
+
onChange: d
|
|
1906
|
+
}, null, 40, So),
|
|
1907
1907
|
c[0] || (c[0] = F("span", { class: "vf-checkbox__box" }, null, -1)),
|
|
1908
|
-
|
|
1909
|
-
L(
|
|
1910
|
-
Q(O(
|
|
1908
|
+
s.label || s.$slots.default ? (g(), y("span", Vo, [
|
|
1909
|
+
L(s.$slots, "default", {}, () => [
|
|
1910
|
+
Q(O(s.label), 1)
|
|
1911
1911
|
])
|
|
1912
1912
|
])) : T("", !0)
|
|
1913
1913
|
], 2));
|
|
1914
1914
|
}
|
|
1915
|
-
}), ot = Symbol("VueForgeRadioGroup"),
|
|
1915
|
+
}), ot = Symbol("VueForgeRadioGroup"), Lo = ["aria-disabled", "aria-label", "aria-labelledby"], tr = /* @__PURE__ */ G({
|
|
1916
1916
|
__name: "radio-group",
|
|
1917
1917
|
props: {
|
|
1918
1918
|
modelValue: { type: [String, Number, Boolean, null], default: void 0 },
|
|
@@ -1928,16 +1928,16 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
1928
1928
|
const r = e, o = t, a = h(() => {
|
|
1929
1929
|
const c = ["vf-radio-group"];
|
|
1930
1930
|
return o.direction === "horizontal" && c.push("vf-radio-group_horizontal"), c;
|
|
1931
|
-
}),
|
|
1931
|
+
}), d = (c, l) => {
|
|
1932
1932
|
r("update:modelValue", c), r("change", c, l);
|
|
1933
|
-
},
|
|
1933
|
+
}, s = {
|
|
1934
1934
|
name: h(() => o.name),
|
|
1935
1935
|
modelValue: h(() => o.modelValue),
|
|
1936
1936
|
disabled: h(() => o.disabled),
|
|
1937
1937
|
variant: h(() => o.variant),
|
|
1938
|
-
onChange:
|
|
1938
|
+
onChange: d
|
|
1939
1939
|
};
|
|
1940
|
-
return Ze(ot,
|
|
1940
|
+
return Ze(ot, s), (c, l) => (g(), y("div", {
|
|
1941
1941
|
class: D(a.value),
|
|
1942
1942
|
role: "radiogroup",
|
|
1943
1943
|
"aria-disabled": c.disabled || void 0,
|
|
@@ -1945,12 +1945,12 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
1945
1945
|
"aria-labelledby": c.ariaLabelledby || void 0
|
|
1946
1946
|
}, [
|
|
1947
1947
|
L(c.$slots, "default")
|
|
1948
|
-
], 10,
|
|
1948
|
+
], 10, Lo));
|
|
1949
1949
|
}
|
|
1950
|
-
}),
|
|
1950
|
+
}), To = ["name", "value", "checked", "disabled"], Ro = {
|
|
1951
1951
|
key: 0,
|
|
1952
1952
|
class: "vf-radio__label"
|
|
1953
|
-
},
|
|
1953
|
+
}, or = /* @__PURE__ */ G({
|
|
1954
1954
|
__name: "radio-button",
|
|
1955
1955
|
props: {
|
|
1956
1956
|
modelValue: { type: [String, Number, Boolean, null], default: void 0 },
|
|
@@ -1962,33 +1962,33 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
1962
1962
|
},
|
|
1963
1963
|
emits: ["update:modelValue", "change"],
|
|
1964
1964
|
setup(t, { emit: e }) {
|
|
1965
|
-
const r = e, o = t, a = We(ot, null),
|
|
1965
|
+
const r = e, o = t, a = We(ot, null), d = h(() => a ? a.modelValue.value : o.modelValue), s = h(() => a ? a.name.value : o.name), c = h(() => a ? a.variant.value : o.variant), l = h(() => (a ? a.disabled.value : !1) || o.disabled), u = h(() => d.value === o.value), n = h(() => {
|
|
1966
1966
|
const f = ["vf-radio", `vf-radio_${c.value}`];
|
|
1967
1967
|
return l.value && f.push("vf-radio_disabled"), f;
|
|
1968
|
-
}),
|
|
1968
|
+
}), i = (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) => (g(),
|
|
1971
|
+
return (f, p) => (g(), y("label", {
|
|
1972
1972
|
class: D(n.value)
|
|
1973
1973
|
}, [
|
|
1974
1974
|
F("input", {
|
|
1975
1975
|
class: "vf-radio__control",
|
|
1976
1976
|
type: "radio",
|
|
1977
|
-
name:
|
|
1977
|
+
name: s.value,
|
|
1978
1978
|
value: f.value,
|
|
1979
|
-
checked:
|
|
1979
|
+
checked: u.value,
|
|
1980
1980
|
disabled: l.value,
|
|
1981
|
-
onChange:
|
|
1982
|
-
}, null, 40,
|
|
1981
|
+
onChange: i
|
|
1982
|
+
}, null, 40, To),
|
|
1983
1983
|
p[0] || (p[0] = F("span", { class: "vf-radio__circle" }, null, -1)),
|
|
1984
|
-
f.label || f.$slots.default ? (g(),
|
|
1984
|
+
f.label || f.$slots.default ? (g(), y("span", Ro, [
|
|
1985
1985
|
L(f.$slots, "default", {}, () => [
|
|
1986
1986
|
Q(O(f.label), 1)
|
|
1987
1987
|
])
|
|
1988
1988
|
])) : T("", !0)
|
|
1989
1989
|
], 2));
|
|
1990
1990
|
}
|
|
1991
|
-
}), He = Symbol("VueForgeTabs"),
|
|
1991
|
+
}), He = Symbol("VueForgeTabs"), Po = ["aria-orientation", "aria-label", "aria-labelledby"], Mo = { class: "vf-tabs__panels" }, ar = /* @__PURE__ */ G({
|
|
1992
1992
|
__name: "tabs",
|
|
1993
1993
|
props: {
|
|
1994
1994
|
modelValue: { default: void 0 },
|
|
@@ -2000,34 +2000,34 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
2000
2000
|
emits: ["update:modelValue", "change"],
|
|
2001
2001
|
setup(t, { emit: e }) {
|
|
2002
2002
|
let r = 0;
|
|
2003
|
-
const o = e, a = t,
|
|
2004
|
-
const
|
|
2005
|
-
return a.orientation === "vertical" &&
|
|
2006
|
-
}), l = I(null),
|
|
2007
|
-
|
|
2008
|
-
},
|
|
2003
|
+
const o = e, a = t, d = ++r, s = (v) => String(v).toLowerCase().trim().replace(/\s+/g, "-").replace(/[^a-z0-9_-]/g, ""), c = h(() => {
|
|
2004
|
+
const v = ["vf-tabs"];
|
|
2005
|
+
return a.orientation === "vertical" && v.push("vf-tabs_vertical"), a.disabled && v.push("vf-tabs_disabled"), v;
|
|
2006
|
+
}), l = I(null), u = () => l.value ? Array.from(l.value.querySelectorAll('[role="tab"]:not([disabled])')) : [], n = (v) => {
|
|
2007
|
+
v && (v.focus(), v.click());
|
|
2008
|
+
}, i = (v) => {
|
|
2009
2009
|
if (a.disabled)
|
|
2010
2010
|
return;
|
|
2011
|
-
const
|
|
2011
|
+
const _ = a.orientation === "horizontal", m = v.key, C = _ ? ["ArrowRight"] : ["ArrowDown"], M = _ ? ["ArrowLeft"] : ["ArrowUp"];
|
|
2012
2012
|
if (![...C, ...M, "Home", "End"].includes(m))
|
|
2013
2013
|
return;
|
|
2014
|
-
const S =
|
|
2014
|
+
const S = u();
|
|
2015
2015
|
if (!S.length)
|
|
2016
2016
|
return;
|
|
2017
2017
|
const H = S.findIndex((z) => z.getAttribute("aria-selected") === "true"), R = S.findIndex((z) => z === document.activeElement), P = R >= 0 ? R : Math.max(H, 0);
|
|
2018
2018
|
let W = P;
|
|
2019
|
-
C.includes(m) ? W = (P + 1) % S.length : M.includes(m) ? W = (P - 1 + S.length) % S.length : m === "Home" ? W = 0 : m === "End" && (W = S.length - 1),
|
|
2020
|
-
}, f = (
|
|
2021
|
-
o("update:modelValue",
|
|
2019
|
+
C.includes(m) ? W = (P + 1) % S.length : M.includes(m) ? W = (P - 1 + S.length) % S.length : m === "Home" ? W = 0 : m === "End" && (W = S.length - 1), v.preventDefault(), n(S[W]);
|
|
2020
|
+
}, f = (v, _) => {
|
|
2021
|
+
o("update:modelValue", v), o("change", v, _);
|
|
2022
2022
|
}, p = {
|
|
2023
2023
|
activeValue: h(() => a.modelValue),
|
|
2024
2024
|
disabled: h(() => a.disabled),
|
|
2025
2025
|
orientation: h(() => a.orientation),
|
|
2026
2026
|
onChange: f,
|
|
2027
|
-
getTabId: (
|
|
2028
|
-
getPanelId: (
|
|
2027
|
+
getTabId: (v) => `vf-tab-${d}-${s(v)}`,
|
|
2028
|
+
getPanelId: (v) => `vf-tabpanel-${d}-${s(v)}`
|
|
2029
2029
|
};
|
|
2030
|
-
return Ze(He, p), (
|
|
2030
|
+
return Ze(He, p), (v, _) => (g(), y("div", {
|
|
2031
2031
|
class: D(c.value)
|
|
2032
2032
|
}, [
|
|
2033
2033
|
F("div", {
|
|
@@ -2035,19 +2035,19 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
2035
2035
|
ref: l,
|
|
2036
2036
|
class: "vf-tabs__list",
|
|
2037
2037
|
role: "tablist",
|
|
2038
|
-
"aria-orientation":
|
|
2039
|
-
"aria-label":
|
|
2040
|
-
"aria-labelledby":
|
|
2041
|
-
onKeydown:
|
|
2038
|
+
"aria-orientation": v.orientation,
|
|
2039
|
+
"aria-label": v.ariaLabel || void 0,
|
|
2040
|
+
"aria-labelledby": v.ariaLabelledby || void 0,
|
|
2041
|
+
onKeydown: i
|
|
2042
2042
|
}, [
|
|
2043
|
-
L(
|
|
2044
|
-
], 40,
|
|
2045
|
-
F("div",
|
|
2046
|
-
L(
|
|
2043
|
+
L(v.$slots, "tabs")
|
|
2044
|
+
], 40, Po),
|
|
2045
|
+
F("div", Mo, [
|
|
2046
|
+
L(v.$slots, "panels")
|
|
2047
2047
|
])
|
|
2048
2048
|
], 2));
|
|
2049
2049
|
}
|
|
2050
|
-
}),
|
|
2050
|
+
}), Io = ["id", "aria-selected", "aria-controls", "disabled", "tabindex"], rr = /* @__PURE__ */ G({
|
|
2051
2051
|
__name: "tab",
|
|
2052
2052
|
props: {
|
|
2053
2053
|
value: {},
|
|
@@ -2056,51 +2056,51 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
2056
2056
|
},
|
|
2057
2057
|
emits: ["change"],
|
|
2058
2058
|
setup(t, { emit: e }) {
|
|
2059
|
-
const r = e, o = t, a = We(He, null),
|
|
2060
|
-
!a ||
|
|
2059
|
+
const r = e, o = t, a = We(He, null), d = h(() => (a == null ? void 0 : a.activeValue.value) === o.value), s = h(() => ((a == null ? void 0 : a.disabled.value) ?? !1) || o.disabled), c = h(() => a ? a.getTabId(o.value) : void 0), l = h(() => a ? a.getPanelId(o.value) : void 0), u = h(() => s.value ? -1 : d.value ? 0 : -1), n = (i) => {
|
|
2060
|
+
!a || s.value || (a.onChange(o.value, i), r("change", o.value, i));
|
|
2061
2061
|
};
|
|
2062
|
-
return (
|
|
2062
|
+
return (i, f) => (g(), y("button", {
|
|
2063
2063
|
id: c.value,
|
|
2064
|
-
class: D(["vf-tab", { "vf-tab_active":
|
|
2064
|
+
class: D(["vf-tab", { "vf-tab_active": d.value, "vf-tab_disabled": s.value }]),
|
|
2065
2065
|
type: "button",
|
|
2066
2066
|
role: "tab",
|
|
2067
|
-
"aria-selected":
|
|
2067
|
+
"aria-selected": d.value,
|
|
2068
2068
|
"aria-controls": l.value,
|
|
2069
|
-
disabled:
|
|
2070
|
-
tabindex:
|
|
2069
|
+
disabled: s.value,
|
|
2070
|
+
tabindex: u.value,
|
|
2071
2071
|
onClick: n
|
|
2072
2072
|
}, [
|
|
2073
|
-
L(
|
|
2074
|
-
Q(O(
|
|
2073
|
+
L(i.$slots, "default", {}, () => [
|
|
2074
|
+
Q(O(i.label), 1)
|
|
2075
2075
|
])
|
|
2076
|
-
], 10,
|
|
2076
|
+
], 10, Io));
|
|
2077
2077
|
}
|
|
2078
|
-
}),
|
|
2078
|
+
}), Do = ["id", "aria-labelledby"], lr = /* @__PURE__ */ G({
|
|
2079
2079
|
__name: "tab-panel",
|
|
2080
2080
|
props: {
|
|
2081
2081
|
value: {}
|
|
2082
2082
|
},
|
|
2083
2083
|
setup(t) {
|
|
2084
|
-
const e = t, r = We(He, null), o = h(() => (r == null ? void 0 : r.activeValue.value) === e.value), a = h(() => r ? r.getTabId(e.value) : void 0),
|
|
2085
|
-
return (
|
|
2086
|
-
id:
|
|
2084
|
+
const e = t, r = We(He, null), o = h(() => (r == null ? void 0 : r.activeValue.value) === e.value), a = h(() => r ? r.getTabId(e.value) : void 0), d = h(() => r ? r.getPanelId(e.value) : void 0);
|
|
2085
|
+
return (s, c) => ve((g(), y("div", {
|
|
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
|
-
L(
|
|
2093
|
-
], 8,
|
|
2092
|
+
L(s.$slots, "default")
|
|
2093
|
+
], 8, Do)), [
|
|
2094
2094
|
[fe, o.value]
|
|
2095
2095
|
]);
|
|
2096
2096
|
}
|
|
2097
|
-
}),
|
|
2097
|
+
}), Oo = ["data-severity"], Eo = { class: "vf-toast__body" }, Wo = {
|
|
2098
2098
|
key: 0,
|
|
2099
2099
|
class: "vf-toast__title"
|
|
2100
|
-
},
|
|
2100
|
+
}, Ho = {
|
|
2101
2101
|
key: 1,
|
|
2102
2102
|
class: "vf-toast__message"
|
|
2103
|
-
},
|
|
2103
|
+
}, nr = /* @__PURE__ */ G({
|
|
2104
2104
|
__name: "toast",
|
|
2105
2105
|
props: {
|
|
2106
2106
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -2114,52 +2114,52 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
2114
2114
|
setup(t, { emit: e }) {
|
|
2115
2115
|
const r = e, o = t;
|
|
2116
2116
|
let a = null;
|
|
2117
|
-
const
|
|
2117
|
+
const d = () => {
|
|
2118
2118
|
a !== null && (clearTimeout(a), a = null);
|
|
2119
|
-
},
|
|
2120
|
-
|
|
2119
|
+
}, s = () => {
|
|
2120
|
+
d(), !(!o.modelValue || o.duration <= 0) && (a = window.setTimeout(() => {
|
|
2121
2121
|
r("update:modelValue", !1), r("close");
|
|
2122
2122
|
}, o.duration));
|
|
2123
2123
|
}, c = () => {
|
|
2124
|
-
|
|
2124
|
+
d(), r("update:modelValue", !1), r("close");
|
|
2125
2125
|
};
|
|
2126
2126
|
return te(
|
|
2127
2127
|
() => o.modelValue,
|
|
2128
2128
|
(l) => {
|
|
2129
|
-
l && r("open"),
|
|
2129
|
+
l && r("open"), s();
|
|
2130
2130
|
},
|
|
2131
2131
|
{ immediate: !0 }
|
|
2132
2132
|
), we(() => {
|
|
2133
|
-
|
|
2134
|
-
}), (l,
|
|
2133
|
+
d();
|
|
2134
|
+
}), (l, u) => ve((g(), y("div", {
|
|
2135
2135
|
class: "vf-toast",
|
|
2136
2136
|
role: "status",
|
|
2137
2137
|
"aria-live": "polite",
|
|
2138
2138
|
"data-severity": l.severity
|
|
2139
2139
|
}, [
|
|
2140
|
-
F("div",
|
|
2141
|
-
l.title ? (g(),
|
|
2142
|
-
l.message || l.$slots.default ? (g(),
|
|
2140
|
+
F("div", Eo, [
|
|
2141
|
+
l.title ? (g(), y("div", Wo, O(l.title), 1)) : T("", !0),
|
|
2142
|
+
l.message || l.$slots.default ? (g(), y("div", Ho, [
|
|
2143
2143
|
L(l.$slots, "default", {}, () => [
|
|
2144
2144
|
Q(O(l.message), 1)
|
|
2145
2145
|
])
|
|
2146
2146
|
])) : T("", !0)
|
|
2147
2147
|
]),
|
|
2148
|
-
l.closable ? (g(),
|
|
2148
|
+
l.closable ? (g(), y("button", {
|
|
2149
2149
|
key: 0,
|
|
2150
2150
|
class: "vf-toast__close",
|
|
2151
2151
|
type: "button",
|
|
2152
2152
|
onClick: c
|
|
2153
2153
|
}, [
|
|
2154
2154
|
L(l.$slots, "close", {}, () => [
|
|
2155
|
-
|
|
2155
|
+
u[0] || (u[0] = Q("×"))
|
|
2156
2156
|
])
|
|
2157
2157
|
])) : T("", !0)
|
|
2158
|
-
], 8,
|
|
2158
|
+
], 8, Oo)), [
|
|
2159
2159
|
[fe, l.modelValue]
|
|
2160
2160
|
]);
|
|
2161
2161
|
}
|
|
2162
|
-
}),
|
|
2162
|
+
}), sr = /* @__PURE__ */ G({
|
|
2163
2163
|
__name: "toast-container",
|
|
2164
2164
|
props: {
|
|
2165
2165
|
position: { default: "top-right" }
|
|
@@ -2176,20 +2176,20 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
2176
2176
|
], 2)
|
|
2177
2177
|
]));
|
|
2178
2178
|
}
|
|
2179
|
-
}),
|
|
2179
|
+
}), Ao = ["data-severity"], Ko = {
|
|
2180
2180
|
key: 0,
|
|
2181
2181
|
class: "vf-alert__icon",
|
|
2182
2182
|
"aria-hidden": "true"
|
|
2183
|
-
},
|
|
2183
|
+
}, No = { class: "vf-alert__body" }, Yo = {
|
|
2184
2184
|
key: 0,
|
|
2185
2185
|
class: "vf-alert__title"
|
|
2186
|
-
},
|
|
2186
|
+
}, Go = {
|
|
2187
2187
|
key: 1,
|
|
2188
2188
|
class: "vf-alert__message"
|
|
2189
|
-
},
|
|
2189
|
+
}, jo = {
|
|
2190
2190
|
key: 1,
|
|
2191
2191
|
class: "vf-alert__actions"
|
|
2192
|
-
},
|
|
2192
|
+
}, ir = /* @__PURE__ */ G({
|
|
2193
2193
|
__name: "alert",
|
|
2194
2194
|
props: {
|
|
2195
2195
|
modelValue: { type: Boolean },
|
|
@@ -2201,7 +2201,7 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
2201
2201
|
},
|
|
2202
2202
|
emits: ["update:modelValue", "close"],
|
|
2203
2203
|
setup(t, { emit: e }) {
|
|
2204
|
-
const r = e, o = t, a = I(!0),
|
|
2204
|
+
const r = e, o = t, a = I(!0), d = h(() => typeof o.modelValue == "boolean"), s = h(() => d.value ? o.modelValue : a.value);
|
|
2205
2205
|
te(
|
|
2206
2206
|
() => o.modelValue,
|
|
2207
2207
|
(l) => {
|
|
@@ -2210,34 +2210,34 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
2210
2210
|
{ immediate: !0 }
|
|
2211
2211
|
);
|
|
2212
2212
|
const c = () => {
|
|
2213
|
-
|
|
2213
|
+
d.value ? r("update:modelValue", !1) : a.value = !1, r("close");
|
|
2214
2214
|
};
|
|
2215
|
-
return (l,
|
|
2215
|
+
return (l, u) => ve((g(), y("div", {
|
|
2216
2216
|
class: "vf-alert",
|
|
2217
2217
|
role: "alert",
|
|
2218
2218
|
"data-severity": l.severity
|
|
2219
2219
|
}, [
|
|
2220
|
-
l.$slots.icon || l.icon ? (g(),
|
|
2220
|
+
l.$slots.icon || l.icon ? (g(), y("div", Ko, [
|
|
2221
2221
|
L(l.$slots, "icon", {}, () => [
|
|
2222
2222
|
Q(O(l.icon), 1)
|
|
2223
2223
|
])
|
|
2224
2224
|
])) : T("", !0),
|
|
2225
|
-
F("div",
|
|
2226
|
-
l.title || l.$slots.title ? (g(),
|
|
2225
|
+
F("div", No, [
|
|
2226
|
+
l.title || l.$slots.title ? (g(), y("div", Yo, [
|
|
2227
2227
|
L(l.$slots, "title", {}, () => [
|
|
2228
2228
|
Q(O(l.title), 1)
|
|
2229
2229
|
])
|
|
2230
2230
|
])) : T("", !0),
|
|
2231
|
-
l.message || l.$slots.default ? (g(),
|
|
2231
|
+
l.message || l.$slots.default ? (g(), y("div", Go, [
|
|
2232
2232
|
L(l.$slots, "default", {}, () => [
|
|
2233
2233
|
Q(O(l.message), 1)
|
|
2234
2234
|
])
|
|
2235
2235
|
])) : T("", !0)
|
|
2236
2236
|
]),
|
|
2237
|
-
l.$slots.actions ? (g(),
|
|
2237
|
+
l.$slots.actions ? (g(), y("div", jo, [
|
|
2238
2238
|
L(l.$slots, "actions")
|
|
2239
2239
|
])) : T("", !0),
|
|
2240
|
-
l.closable ? (g(),
|
|
2240
|
+
l.closable ? (g(), y("button", {
|
|
2241
2241
|
key: 2,
|
|
2242
2242
|
class: "vf-alert__close",
|
|
2243
2243
|
type: "button",
|
|
@@ -2245,17 +2245,17 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
2245
2245
|
onClick: c
|
|
2246
2246
|
}, [
|
|
2247
2247
|
L(l.$slots, "close", {}, () => [
|
|
2248
|
-
|
|
2248
|
+
u[0] || (u[0] = Q("×"))
|
|
2249
2249
|
])
|
|
2250
2250
|
])) : T("", !0)
|
|
2251
|
-
], 8,
|
|
2252
|
-
[fe,
|
|
2251
|
+
], 8, Ao)), [
|
|
2252
|
+
[fe, s.value]
|
|
2253
2253
|
]);
|
|
2254
2254
|
}
|
|
2255
|
-
}),
|
|
2255
|
+
}), Xo = ["checked", "disabled"], qo = {
|
|
2256
2256
|
key: 0,
|
|
2257
2257
|
class: "vf-switch__label"
|
|
2258
|
-
},
|
|
2258
|
+
}, dr = /* @__PURE__ */ G({
|
|
2259
2259
|
__name: "switch",
|
|
2260
2260
|
props: {
|
|
2261
2261
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -2265,59 +2265,59 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
2265
2265
|
emits: ["update:modelValue", "change"],
|
|
2266
2266
|
setup(t, { emit: e }) {
|
|
2267
2267
|
const r = e, o = t, a = h(() => {
|
|
2268
|
-
const
|
|
2269
|
-
return o.disabled &&
|
|
2270
|
-
}),
|
|
2271
|
-
const c =
|
|
2272
|
-
r("update:modelValue", c.checked), r("change",
|
|
2268
|
+
const s = ["vf-switch"];
|
|
2269
|
+
return o.disabled && s.push("vf-switch_disabled"), s;
|
|
2270
|
+
}), d = (s) => {
|
|
2271
|
+
const c = s.target;
|
|
2272
|
+
r("update:modelValue", c.checked), r("change", s);
|
|
2273
2273
|
};
|
|
2274
|
-
return (
|
|
2274
|
+
return (s, c) => (g(), y("label", {
|
|
2275
2275
|
class: D(a.value)
|
|
2276
2276
|
}, [
|
|
2277
2277
|
F("input", {
|
|
2278
2278
|
class: "vf-switch__control",
|
|
2279
2279
|
type: "checkbox",
|
|
2280
|
-
checked:
|
|
2281
|
-
disabled:
|
|
2282
|
-
onChange:
|
|
2283
|
-
}, null, 40,
|
|
2280
|
+
checked: s.modelValue,
|
|
2281
|
+
disabled: s.disabled,
|
|
2282
|
+
onChange: d
|
|
2283
|
+
}, null, 40, Xo),
|
|
2284
2284
|
c[0] || (c[0] = F("span", { class: "vf-switch__track" }, [
|
|
2285
2285
|
F("span", { class: "vf-switch__thumb" })
|
|
2286
2286
|
], -1)),
|
|
2287
|
-
|
|
2288
|
-
L(
|
|
2289
|
-
Q(O(
|
|
2287
|
+
s.label || s.$slots.default ? (g(), y("span", qo, [
|
|
2288
|
+
L(s.$slots, "default", {}, () => [
|
|
2289
|
+
Q(O(s.label), 1)
|
|
2290
2290
|
])
|
|
2291
2291
|
])) : T("", !0)
|
|
2292
2292
|
], 2));
|
|
2293
2293
|
}
|
|
2294
|
-
}),
|
|
2294
|
+
}), Uo = { class: "vf-popover" }, Zo = ["aria-expanded", "onKeydown"], cr = /* @__PURE__ */ G({
|
|
2295
2295
|
__name: "popover",
|
|
2296
2296
|
emits: ["click", "onClick"],
|
|
2297
2297
|
setup(t, { expose: e, emit: r }) {
|
|
2298
2298
|
const o = r, a = lt({ visible: !1 });
|
|
2299
|
-
let
|
|
2300
|
-
const
|
|
2301
|
-
|
|
2299
|
+
let d = 0;
|
|
2300
|
+
const s = `vf-popover-panel-${++d}`, c = () => a.visible = !0, l = () => a.visible = !1, u = () => a.visible = !a.visible, n = () => {
|
|
2301
|
+
u(), o("click"), o("onClick");
|
|
2302
2302
|
};
|
|
2303
|
-
return e({ show: c, hide: l, toggle:
|
|
2303
|
+
return e({ show: c, hide: l, toggle: u }), (i, f) => (g(), y("div", Uo, [
|
|
2304
2304
|
F("div", {
|
|
2305
2305
|
class: "vf-popover__button",
|
|
2306
2306
|
role: "button",
|
|
2307
2307
|
tabindex: "0",
|
|
2308
2308
|
"aria-haspopup": "dialog",
|
|
2309
2309
|
"aria-expanded": a.visible,
|
|
2310
|
-
"aria-controls":
|
|
2310
|
+
"aria-controls": s,
|
|
2311
2311
|
onClick: n,
|
|
2312
2312
|
onKeydown: [
|
|
2313
|
-
|
|
2314
|
-
|
|
2313
|
+
U(Y(n, ["prevent"]), ["enter"]),
|
|
2314
|
+
U(Y(n, ["prevent"]), ["space"])
|
|
2315
2315
|
]
|
|
2316
2316
|
}, [
|
|
2317
|
-
L(
|
|
2318
|
-
], 40,
|
|
2319
|
-
ve(qe(
|
|
2320
|
-
id:
|
|
2317
|
+
L(i.$slots, "button")
|
|
2318
|
+
], 40, Zo),
|
|
2319
|
+
ve(qe(yt, {
|
|
2320
|
+
id: s,
|
|
2321
2321
|
class: "vf-popover__wrapper"
|
|
2322
2322
|
}, nt({
|
|
2323
2323
|
default: ye(() => [
|
|
@@ -2325,34 +2325,34 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
2325
2325
|
]),
|
|
2326
2326
|
_: 2
|
|
2327
2327
|
}, [
|
|
2328
|
-
|
|
2328
|
+
i.$slots.default ? {
|
|
2329
2329
|
name: "default",
|
|
2330
2330
|
fn: ye(() => [
|
|
2331
|
-
L(
|
|
2331
|
+
L(i.$slots, "default")
|
|
2332
2332
|
]),
|
|
2333
2333
|
key: "0"
|
|
2334
2334
|
} : void 0,
|
|
2335
|
-
|
|
2335
|
+
i.$slots.header || i.$slots.popoverHeader ? {
|
|
2336
2336
|
name: "header",
|
|
2337
2337
|
fn: ye(() => [
|
|
2338
|
-
L(
|
|
2339
|
-
|
|
2338
|
+
L(i.$slots, "header"),
|
|
2339
|
+
i.$slots.header ? T("", !0) : L(i.$slots, "popoverHeader", { key: 0 })
|
|
2340
2340
|
]),
|
|
2341
2341
|
key: "1"
|
|
2342
2342
|
} : void 0,
|
|
2343
|
-
|
|
2343
|
+
i.$slots.body || i.$slots.popoverBody ? {
|
|
2344
2344
|
name: "body",
|
|
2345
2345
|
fn: ye(() => [
|
|
2346
|
-
L(
|
|
2347
|
-
|
|
2346
|
+
L(i.$slots, "body"),
|
|
2347
|
+
i.$slots.body ? T("", !0) : L(i.$slots, "popoverBody", { key: 0 })
|
|
2348
2348
|
]),
|
|
2349
2349
|
key: "2"
|
|
2350
2350
|
} : void 0,
|
|
2351
|
-
|
|
2351
|
+
i.$slots.footer || i.$slots.popoverFooter ? {
|
|
2352
2352
|
name: "footer",
|
|
2353
2353
|
fn: ye(() => [
|
|
2354
|
-
L(
|
|
2355
|
-
|
|
2354
|
+
L(i.$slots, "footer"),
|
|
2355
|
+
i.$slots.footer ? T("", !0) : L(i.$slots, "popoverFooter", { key: 0 })
|
|
2356
2356
|
]),
|
|
2357
2357
|
key: "3"
|
|
2358
2358
|
} : void 0
|
|
@@ -2361,16 +2361,16 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
2361
2361
|
])
|
|
2362
2362
|
]));
|
|
2363
2363
|
}
|
|
2364
|
-
}),
|
|
2364
|
+
}), Jo = ["aria-labelledby", "aria-describedby"], Qo = {
|
|
2365
2365
|
key: 0,
|
|
2366
2366
|
class: "vf-modal__header"
|
|
2367
|
-
},
|
|
2367
|
+
}, ea = {
|
|
2368
2368
|
key: 0,
|
|
2369
2369
|
class: "vf-modal__title"
|
|
2370
|
-
},
|
|
2370
|
+
}, ta = {
|
|
2371
2371
|
key: 3,
|
|
2372
2372
|
class: "vf-modal__footer"
|
|
2373
|
-
},
|
|
2373
|
+
}, ur = /* @__PURE__ */ G({
|
|
2374
2374
|
__name: "modal",
|
|
2375
2375
|
props: {
|
|
2376
2376
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -2384,8 +2384,8 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
2384
2384
|
emits: ["update:modelValue", "open", "close"],
|
|
2385
2385
|
setup(t, { expose: e, emit: r }) {
|
|
2386
2386
|
const o = r, a = t;
|
|
2387
|
-
let
|
|
2388
|
-
const
|
|
2387
|
+
let d = 0, s = 0, c = "", l = null;
|
|
2388
|
+
const u = I(null), n = Ue(), i = `vf-modal-title-${++d}`, f = `vf-modal-body-${d}`, p = h(() => !!a.title || !!n.header), v = h(() => !!n.body || !!n.default), _ = h(() => {
|
|
2389
2389
|
const x = ["vf-modal"];
|
|
2390
2390
|
return a.size !== "md" && x.push(`vf-modal_${a.size}`), x;
|
|
2391
2391
|
}), m = () => o("update:modelValue", !0), C = () => {
|
|
@@ -2394,29 +2394,29 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
2394
2394
|
a.closeOnOverlay && C();
|
|
2395
2395
|
}, S = (x) => {
|
|
2396
2396
|
!a.modelValue || !a.closeOnEsc || x.key === "Escape" && (x.preventDefault(), C());
|
|
2397
|
-
}, H = () =>
|
|
2397
|
+
}, H = () => u.value ? Array.from(u.value.querySelectorAll('a[href],button:not([disabled]),textarea:not([disabled]),input:not([disabled]),select:not([disabled]),[tabindex]:not([tabindex="-1"])')).filter((k) => !k.hasAttribute("disabled") && !k.getAttribute("aria-hidden")) : [], R = () => {
|
|
2398
2398
|
var k;
|
|
2399
2399
|
const x = H();
|
|
2400
|
-
x.length ? x[0].focus() : (k =
|
|
2400
|
+
x.length ? x[0].focus() : (k = u.value) == null || k.focus();
|
|
2401
2401
|
}, P = (x) => {
|
|
2402
|
-
var
|
|
2402
|
+
var X;
|
|
2403
2403
|
if (x.key !== "Tab")
|
|
2404
2404
|
return;
|
|
2405
2405
|
const k = H();
|
|
2406
2406
|
if (!k.length) {
|
|
2407
|
-
x.preventDefault(), (
|
|
2407
|
+
x.preventDefault(), (X = u.value) == null || X.focus();
|
|
2408
2408
|
return;
|
|
2409
2409
|
}
|
|
2410
|
-
const V = k[0], K = k[k.length - 1],
|
|
2411
|
-
if (x.shiftKey &&
|
|
2410
|
+
const V = k[0], K = k[k.length - 1], j = document.activeElement;
|
|
2411
|
+
if (x.shiftKey && j === V) {
|
|
2412
2412
|
x.preventDefault(), K.focus();
|
|
2413
2413
|
return;
|
|
2414
2414
|
}
|
|
2415
|
-
!x.shiftKey &&
|
|
2415
|
+
!x.shiftKey && j === K && (x.preventDefault(), V.focus());
|
|
2416
2416
|
}, W = () => {
|
|
2417
|
-
!a.lockScroll || typeof document > "u" || (
|
|
2417
|
+
!a.lockScroll || typeof document > "u" || (s === 0 && (c = document.body.style.overflow, document.body.style.overflow = "hidden"), s += 1);
|
|
2418
2418
|
}, z = () => {
|
|
2419
|
-
!a.lockScroll || typeof document > "u" || (
|
|
2419
|
+
!a.lockScroll || typeof document > "u" || (s = Math.max(0, s - 1), s === 0 && (document.body.style.overflow = c));
|
|
2420
2420
|
};
|
|
2421
2421
|
return te(
|
|
2422
2422
|
() => a.modelValue,
|
|
@@ -2428,7 +2428,7 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
2428
2428
|
z(), typeof document < "u" && document.removeEventListener("keydown", S);
|
|
2429
2429
|
}), e({ open: m, close: C }), (x, k) => (g(), le($e, { to: "body" }, [
|
|
2430
2430
|
ve(F("div", {
|
|
2431
|
-
class: D(
|
|
2431
|
+
class: D(_.value),
|
|
2432
2432
|
role: "presentation"
|
|
2433
2433
|
}, [
|
|
2434
2434
|
F("div", {
|
|
@@ -2437,22 +2437,22 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
2437
2437
|
}),
|
|
2438
2438
|
F("div", {
|
|
2439
2439
|
ref_key: "panel",
|
|
2440
|
-
ref:
|
|
2440
|
+
ref: u,
|
|
2441
2441
|
class: "vf-modal__panel",
|
|
2442
2442
|
role: "dialog",
|
|
2443
2443
|
"aria-modal": "true",
|
|
2444
|
-
"aria-labelledby": p.value ?
|
|
2445
|
-
"aria-describedby":
|
|
2444
|
+
"aria-labelledby": p.value ? i : void 0,
|
|
2445
|
+
"aria-describedby": v.value ? f : void 0,
|
|
2446
2446
|
tabindex: "-1",
|
|
2447
2447
|
onKeydown: P
|
|
2448
2448
|
}, [
|
|
2449
|
-
p.value ? (g(),
|
|
2449
|
+
p.value ? (g(), y("div", Qo, [
|
|
2450
2450
|
F("div", {
|
|
2451
|
-
id:
|
|
2451
|
+
id: i,
|
|
2452
2452
|
class: "vf-modal__header-content"
|
|
2453
2453
|
}, [
|
|
2454
2454
|
L(x.$slots, "header", {}, () => [
|
|
2455
|
-
x.title ? (g(),
|
|
2455
|
+
x.title ? (g(), y("h3", ea, O(x.title), 1)) : T("", !0)
|
|
2456
2456
|
])
|
|
2457
2457
|
])
|
|
2458
2458
|
])) : T("", !0),
|
|
@@ -2467,7 +2467,7 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
2467
2467
|
onClick: C
|
|
2468
2468
|
}, "×")
|
|
2469
2469
|
]) : T("", !0),
|
|
2470
|
-
x.$slots.body || x.$slots.default ? (g(),
|
|
2470
|
+
x.$slots.body || x.$slots.default ? (g(), y("div", {
|
|
2471
2471
|
key: 2,
|
|
2472
2472
|
id: f,
|
|
2473
2473
|
class: "vf-modal__body"
|
|
@@ -2475,20 +2475,20 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
2475
2475
|
L(x.$slots, "body"),
|
|
2476
2476
|
x.$slots.body ? T("", !0) : L(x.$slots, "default", { key: 0 })
|
|
2477
2477
|
])) : T("", !0),
|
|
2478
|
-
x.$slots.footer ? (g(),
|
|
2478
|
+
x.$slots.footer ? (g(), y("div", ta, [
|
|
2479
2479
|
L(x.$slots, "footer")
|
|
2480
2480
|
])) : T("", !0)
|
|
2481
|
-
], 40,
|
|
2481
|
+
], 40, Jo)
|
|
2482
2482
|
], 2), [
|
|
2483
2483
|
[fe, x.modelValue]
|
|
2484
2484
|
])
|
|
2485
2485
|
]));
|
|
2486
2486
|
}
|
|
2487
|
-
}),
|
|
2487
|
+
}), oa = ["data-placement"], aa = { class: "vf-tooltip__content" }, ra = {
|
|
2488
2488
|
key: 0,
|
|
2489
2489
|
class: "vf-tooltip__arrow",
|
|
2490
2490
|
"aria-hidden": "true"
|
|
2491
|
-
},
|
|
2491
|
+
}, vr = /* @__PURE__ */ G({
|
|
2492
2492
|
__name: "tooltip",
|
|
2493
2493
|
props: {
|
|
2494
2494
|
text: { default: "" },
|
|
@@ -2499,28 +2499,28 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
2499
2499
|
setup(t) {
|
|
2500
2500
|
const e = t;
|
|
2501
2501
|
let r = 0;
|
|
2502
|
-
const o = I(null), a = I(null),
|
|
2502
|
+
const o = I(null), a = I(null), d = I(!1), s = I("top"), c = `vf-tooltip-${++r}`;
|
|
2503
2503
|
let l = null;
|
|
2504
|
-
const
|
|
2505
|
-
e.disabled || (
|
|
2504
|
+
const u = () => {
|
|
2505
|
+
e.disabled || (d.value = !0);
|
|
2506
2506
|
}, n = () => {
|
|
2507
|
-
|
|
2508
|
-
},
|
|
2507
|
+
d.value = !1;
|
|
2508
|
+
}, i = () => {
|
|
2509
2509
|
if (!o.value || !a.value)
|
|
2510
2510
|
return;
|
|
2511
|
-
const p = o.value,
|
|
2511
|
+
const p = o.value, v = a.value, _ = async () => {
|
|
2512
2512
|
const {
|
|
2513
2513
|
x: S,
|
|
2514
2514
|
y: H,
|
|
2515
2515
|
placement: R
|
|
2516
|
-
} = await Te(p,
|
|
2516
|
+
} = await Te(p, v, {
|
|
2517
2517
|
placement: e.placement,
|
|
2518
2518
|
strategy: "fixed",
|
|
2519
|
-
middleware: [Ve(8), Se(),
|
|
2519
|
+
middleware: [Ve(8), Se(), It()]
|
|
2520
2520
|
});
|
|
2521
|
-
|
|
2521
|
+
s.value = R ?? e.placement, v.style.left = `${S}px`, v.style.top = `${H}px`;
|
|
2522
2522
|
}, m = async () => {
|
|
2523
|
-
await
|
|
2523
|
+
await _();
|
|
2524
2524
|
}, C = Le(p, () => {
|
|
2525
2525
|
m();
|
|
2526
2526
|
}), M = () => {
|
|
@@ -2533,29 +2533,29 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
2533
2533
|
}
|
|
2534
2534
|
}, l.update();
|
|
2535
2535
|
};
|
|
2536
|
-
te(
|
|
2536
|
+
te(d, async (p) => {
|
|
2537
2537
|
if (!p) {
|
|
2538
2538
|
l && (l.destroy(), l = null);
|
|
2539
2539
|
return;
|
|
2540
2540
|
}
|
|
2541
|
-
l ||
|
|
2541
|
+
l || i(), l == null || l.update();
|
|
2542
2542
|
}), Fe(() => {
|
|
2543
|
-
|
|
2543
|
+
d.value && i();
|
|
2544
2544
|
}), we(() => {
|
|
2545
2545
|
l == null || l.destroy(), l = null;
|
|
2546
2546
|
});
|
|
2547
2547
|
const f = h(() => !!e.text || !!(a.value && a.value.textContent));
|
|
2548
2548
|
return te(f, (p) => {
|
|
2549
|
-
p || (
|
|
2550
|
-
}), (p,
|
|
2549
|
+
p || (d.value = !1);
|
|
2550
|
+
}), (p, v) => (g(), y(se, null, [
|
|
2551
2551
|
F("span", {
|
|
2552
2552
|
ref_key: "trigger",
|
|
2553
2553
|
ref: o,
|
|
2554
2554
|
class: "vf-tooltip__trigger",
|
|
2555
2555
|
"aria-describedby": c,
|
|
2556
|
-
onMouseenter:
|
|
2556
|
+
onMouseenter: u,
|
|
2557
2557
|
onMouseleave: n,
|
|
2558
|
-
onFocus:
|
|
2558
|
+
onFocus: u,
|
|
2559
2559
|
onBlur: n
|
|
2560
2560
|
}, [
|
|
2561
2561
|
L(p.$slots, "default")
|
|
@@ -2567,25 +2567,50 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
2567
2567
|
ref: a,
|
|
2568
2568
|
class: "vf-tooltip",
|
|
2569
2569
|
role: "tooltip",
|
|
2570
|
-
"data-placement":
|
|
2570
|
+
"data-placement": s.value
|
|
2571
2571
|
}, [
|
|
2572
|
-
F("span",
|
|
2572
|
+
F("span", aa, [
|
|
2573
2573
|
L(p.$slots, "content", {}, () => [
|
|
2574
2574
|
Q(O(p.text), 1)
|
|
2575
2575
|
])
|
|
2576
2576
|
]),
|
|
2577
|
-
p.arrow ? (g(),
|
|
2578
|
-
], 8,
|
|
2579
|
-
[fe,
|
|
2577
|
+
p.arrow ? (g(), y("span", ra)) : T("", !0)
|
|
2578
|
+
], 8, oa), [
|
|
2579
|
+
[fe, d.value]
|
|
2580
2580
|
])
|
|
2581
2581
|
]))
|
|
2582
2582
|
], 64));
|
|
2583
2583
|
}
|
|
2584
|
-
}),
|
|
2584
|
+
}), fr = /* @__PURE__ */ G({
|
|
2585
|
+
__name: "skeleton",
|
|
2586
|
+
props: {
|
|
2587
|
+
width: {},
|
|
2588
|
+
height: {},
|
|
2589
|
+
variant: { default: "text" },
|
|
2590
|
+
animated: { type: Boolean, default: !0 }
|
|
2591
|
+
},
|
|
2592
|
+
setup(t) {
|
|
2593
|
+
const e = t, r = (d) => {
|
|
2594
|
+
if (!(d == null || d === ""))
|
|
2595
|
+
return typeof d == "number" ? `${d}px` : d;
|
|
2596
|
+
}, o = h(() => {
|
|
2597
|
+
const d = r(e.width), s = r(e.height), c = {};
|
|
2598
|
+
return d && (c.width = d), s && (c.height = s), e.variant === "circle" && (!d && s && (c.width = s), !s && d && (c.height = d)), c;
|
|
2599
|
+
}), a = h(() => {
|
|
2600
|
+
const d = ["vf-skeleton", `vf-skeleton_${e.variant}`];
|
|
2601
|
+
return e.animated && d.push("vf-skeleton_animated"), d;
|
|
2602
|
+
});
|
|
2603
|
+
return (d, s) => (g(), y("div", {
|
|
2604
|
+
class: D(a.value),
|
|
2605
|
+
style: st(o.value),
|
|
2606
|
+
"aria-hidden": "true"
|
|
2607
|
+
}, null, 6));
|
|
2608
|
+
}
|
|
2609
|
+
}), la = ["dark", "light", "theme", "preset", "colors", "components", "colorScheme"], na = (t) => {
|
|
2585
2610
|
const e = t.replace(/([A-Z])/g, "-$1");
|
|
2586
2611
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
2587
|
-
},
|
|
2588
|
-
if (!
|
|
2612
|
+
}, sa = (t) => t.filter((e) => !la.includes(e)).map((e) => na(e)).join("-").toLowerCase(), Ee = (t) => t.join("."), ia = (t) => /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(t), Ae = (t) => {
|
|
2613
|
+
if (!ia(t))
|
|
2589
2614
|
return null;
|
|
2590
2615
|
if (t.length === 4) {
|
|
2591
2616
|
const e = t[1], r = t[2], o = t[3];
|
|
@@ -2596,52 +2621,52 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
2596
2621
|
const e = Ae(t);
|
|
2597
2622
|
if (!e)
|
|
2598
2623
|
return [0, 0, 0];
|
|
2599
|
-
const r = parseInt(e.slice(1), 16), o = r >> 16 & 255, a = r >> 8 & 255,
|
|
2600
|
-
return [o, a,
|
|
2624
|
+
const r = parseInt(e.slice(1), 16), o = r >> 16 & 255, a = r >> 8 & 255, d = r & 255;
|
|
2625
|
+
return [o, a, d];
|
|
2601
2626
|
}, Ge = (t) => {
|
|
2602
2627
|
const [e, r, o] = at(t);
|
|
2603
2628
|
return `${e}, ${r}, ${o}`;
|
|
2604
|
-
},
|
|
2605
|
-
const o = t / 255, a = e / 255,
|
|
2606
|
-
let
|
|
2607
|
-
const
|
|
2629
|
+
}, da = (t, e, r) => {
|
|
2630
|
+
const o = t / 255, a = e / 255, d = r / 255, s = Math.max(o, a, d), c = Math.min(o, a, d), l = s - c;
|
|
2631
|
+
let u = 0, n = 0;
|
|
2632
|
+
const i = (s + c) / 2;
|
|
2608
2633
|
if (l !== 0) {
|
|
2609
|
-
switch (n = l / (1 - Math.abs(2 *
|
|
2634
|
+
switch (n = l / (1 - Math.abs(2 * i - 1)), s) {
|
|
2610
2635
|
case o:
|
|
2611
|
-
|
|
2636
|
+
u = (a - d) / l % 6;
|
|
2612
2637
|
break;
|
|
2613
2638
|
case a:
|
|
2614
|
-
|
|
2639
|
+
u = (d - o) / l + 2;
|
|
2615
2640
|
break;
|
|
2616
|
-
case
|
|
2617
|
-
|
|
2641
|
+
case d:
|
|
2642
|
+
u = (o - a) / l + 4;
|
|
2618
2643
|
break;
|
|
2619
2644
|
}
|
|
2620
|
-
|
|
2645
|
+
u *= 60, u < 0 && (u += 360);
|
|
2621
2646
|
}
|
|
2622
|
-
return [
|
|
2623
|
-
},
|
|
2624
|
-
const o = e / 100, a = r / 100,
|
|
2625
|
-
let l = 0,
|
|
2626
|
-
t >= 0 && t < 60 ? (l =
|
|
2627
|
-
const
|
|
2628
|
-
return [
|
|
2629
|
-
},
|
|
2647
|
+
return [u, n * 100, i * 100];
|
|
2648
|
+
}, ca = (t, e, r) => {
|
|
2649
|
+
const o = e / 100, a = r / 100, d = (1 - Math.abs(2 * a - 1)) * o, s = d * (1 - Math.abs(t / 60 % 2 - 1)), c = a - d / 2;
|
|
2650
|
+
let l = 0, u = 0, n = 0;
|
|
2651
|
+
t >= 0 && t < 60 ? (l = d, u = s, n = 0) : t >= 60 && t < 120 ? (l = s, u = d, n = 0) : t >= 120 && t < 180 ? (l = 0, u = d, n = s) : t >= 180 && t < 240 ? (l = 0, u = s, n = d) : t >= 240 && t < 300 ? (l = s, u = 0, n = d) : (l = d, u = 0, n = s);
|
|
2652
|
+
const i = Math.round((l + c) * 255), f = Math.round((u + c) * 255), p = Math.round((n + c) * 255);
|
|
2653
|
+
return [i, f, p];
|
|
2654
|
+
}, ua = (t, e, r) => `#${[t, e, r].map((o) => o.toString(16).padStart(2, "0")).join("")}`, va = (t, e, r) => Math.min(r, Math.max(e, t)), fa = (t, e) => {
|
|
2630
2655
|
const r = Ae(t);
|
|
2631
2656
|
if (!r)
|
|
2632
2657
|
return t;
|
|
2633
|
-
const [o, a,
|
|
2634
|
-
return
|
|
2658
|
+
const [o, a, d] = at(r), [s, c, l] = da(o, a, d), n = (e - 5) * 7, i = va(l + n, 0, 100), [f, p, v] = ca(s, c, i);
|
|
2659
|
+
return ua(f, p, v);
|
|
2635
2660
|
}, Ie = (t) => !!t && typeof t == "object" && !Array.isArray(t), Ke = (t, e) => {
|
|
2636
2661
|
if (!e)
|
|
2637
2662
|
return { ...t };
|
|
2638
2663
|
const r = { ...t };
|
|
2639
2664
|
for (const o in e) {
|
|
2640
|
-
const a = e[o],
|
|
2641
|
-
Ie(
|
|
2665
|
+
const a = e[o], d = t[o];
|
|
2666
|
+
Ie(d) && Ie(a) ? r[o] = Ke(d, a) : r[o] = a;
|
|
2642
2667
|
}
|
|
2643
2668
|
return r;
|
|
2644
|
-
},
|
|
2669
|
+
}, pa = (t) => {
|
|
2645
2670
|
if (!t)
|
|
2646
2671
|
return null;
|
|
2647
2672
|
if (Ie(t) && "preset" in t) {
|
|
@@ -2655,42 +2680,42 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
2655
2680
|
};
|
|
2656
2681
|
}
|
|
2657
2682
|
return { preset: t };
|
|
2658
|
-
},
|
|
2659
|
-
const e = [], r = [], o = [], a = [],
|
|
2683
|
+
}, ba = (t) => {
|
|
2684
|
+
const e = [], r = [], o = [], a = [], d = (l) => o.push(l), s = (l) => a.push(l), c = (l, u) => {
|
|
2660
2685
|
if (!(!l || typeof l != "object"))
|
|
2661
2686
|
for (const n in l) {
|
|
2662
|
-
const
|
|
2663
|
-
if (Ie(
|
|
2664
|
-
c(
|
|
2687
|
+
const i = l[n], f = u.concat([n]);
|
|
2688
|
+
if (Ie(i)) {
|
|
2689
|
+
c(i, f);
|
|
2665
2690
|
continue;
|
|
2666
2691
|
}
|
|
2667
|
-
if (
|
|
2668
|
-
|
|
2692
|
+
if (i && typeof i == "object") {
|
|
2693
|
+
s(`Theme value "${Ee(f)}" is not a plain object or string and will be ignored.`);
|
|
2669
2694
|
continue;
|
|
2670
2695
|
}
|
|
2671
|
-
if (typeof
|
|
2672
|
-
|
|
2696
|
+
if (typeof i != "string") {
|
|
2697
|
+
s(`Theme value "${Ee(f)}" is not a string and will be ignored.`);
|
|
2673
2698
|
continue;
|
|
2674
2699
|
}
|
|
2675
|
-
const
|
|
2676
|
-
if (
|
|
2677
|
-
const m = Ae(
|
|
2700
|
+
const v = f.includes("colorScheme") && f.includes("dark") ? r : e, _ = sa(f);
|
|
2701
|
+
if (v.push(`--vf-${_}: ${i}`), f.includes("colors")) {
|
|
2702
|
+
const m = Ae(i);
|
|
2678
2703
|
if (!m) {
|
|
2679
|
-
|
|
2704
|
+
d(
|
|
2680
2705
|
`Theme color "${Ee(f)}" is not hex. Shade variables will not be generated for it.`
|
|
2681
2706
|
);
|
|
2682
2707
|
continue;
|
|
2683
2708
|
}
|
|
2684
|
-
if (
|
|
2709
|
+
if (v.push(`--vf-${_}-rgb: ${Ge(m)}`), n !== "white")
|
|
2685
2710
|
for (let C = 1; C < 10; ++C) {
|
|
2686
|
-
const M =
|
|
2687
|
-
|
|
2711
|
+
const M = fa(m, C);
|
|
2712
|
+
v.push(`--vf-${_}-${C}00: ${M}`), v.push(`--vf-${_}-${C}00-rgb: ${Ge(M)}`);
|
|
2688
2713
|
}
|
|
2689
2714
|
}
|
|
2690
2715
|
}
|
|
2691
2716
|
};
|
|
2692
2717
|
return c(t, []), { baseVars: e, darkVars: r, warnings: o, errors: a };
|
|
2693
|
-
},
|
|
2718
|
+
}, ga = (t) => {
|
|
2694
2719
|
if (typeof document > "u")
|
|
2695
2720
|
return null;
|
|
2696
2721
|
const e = document.getElementById(t);
|
|
@@ -2698,11 +2723,11 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
2698
2723
|
return e;
|
|
2699
2724
|
const r = document.createElement("style");
|
|
2700
2725
|
return r.id = t, document.head.appendChild(r), r;
|
|
2701
|
-
},
|
|
2726
|
+
}, ma = (t) => ({
|
|
2702
2727
|
selector: t.selector ?? ":root",
|
|
2703
2728
|
darkSelector: t.darkSelector ?? ":root[data-theme=dark]"
|
|
2704
|
-
}),
|
|
2705
|
-
const { baseVars: a, darkVars:
|
|
2729
|
+
}), ha = (t, e, r, o) => {
|
|
2730
|
+
const { baseVars: a, darkVars: d, warnings: s, errors: c } = ba(t), l = ga("vueforge-theme");
|
|
2706
2731
|
if (!l)
|
|
2707
2732
|
return;
|
|
2708
2733
|
if (c.length) {
|
|
@@ -2711,21 +2736,21 @@ const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", me
|
|
|
2711
2736
|
for (const n of c)
|
|
2712
2737
|
console.warn(`[VueForge] ${n}`);
|
|
2713
2738
|
}
|
|
2714
|
-
if (
|
|
2715
|
-
for (const n of
|
|
2739
|
+
if (s.length)
|
|
2740
|
+
for (const n of s)
|
|
2716
2741
|
console.warn(`[VueForge] ${n}`);
|
|
2717
|
-
const
|
|
2718
|
-
a.length &&
|
|
2742
|
+
const u = [];
|
|
2743
|
+
a.length && u.push(`${e} { ${a.join(";")} }`), d.length && u.push(`${r} { ${d.join(";")} }`), l.textContent = u.join(`
|
|
2719
2744
|
`);
|
|
2720
2745
|
};
|
|
2721
2746
|
let ge = null;
|
|
2722
2747
|
const rt = (t) => {
|
|
2723
|
-
const e =
|
|
2748
|
+
const e = pa(t);
|
|
2724
2749
|
if (!e)
|
|
2725
2750
|
return;
|
|
2726
|
-
const r = Ke(e.preset, e.overrides), { selector: o, darkSelector: a } =
|
|
2727
|
-
ge = { ...e },
|
|
2728
|
-
},
|
|
2751
|
+
const r = Ke(e.preset, e.overrides), { selector: o, darkSelector: a } = ma(e);
|
|
2752
|
+
ge = { ...e }, ha(r, o, a, e.strict);
|
|
2753
|
+
}, pr = (t) => {
|
|
2729
2754
|
if (!ge)
|
|
2730
2755
|
return;
|
|
2731
2756
|
const e = t.overrides === void 0 ? ge.overrides : Ke(ge.overrides ?? {}, t.overrides ?? {}), r = {
|
|
@@ -2735,7 +2760,7 @@ const rt = (t) => {
|
|
|
2735
2760
|
darkSelector: t.darkSelector ?? ge.darkSelector
|
|
2736
2761
|
};
|
|
2737
2762
|
rt(r);
|
|
2738
|
-
},
|
|
2763
|
+
}, br = () => ge ? { ...ge } : null, gr = {
|
|
2739
2764
|
install(t, e = {}) {
|
|
2740
2765
|
e.theme && rt(e.theme);
|
|
2741
2766
|
}
|
|
@@ -2802,7 +2827,7 @@ const rt = (t) => {
|
|
|
2802
2827
|
dividerColor: "#2e2e32"
|
|
2803
2828
|
}
|
|
2804
2829
|
}
|
|
2805
|
-
},
|
|
2830
|
+
}, ya = {
|
|
2806
2831
|
fontSize: "var(--vf-typography-font-size)",
|
|
2807
2832
|
padding: "var(--vf-controls-padding-y) var(--vf-controls-padding-x)",
|
|
2808
2833
|
borderRadius: "var(--vf-radii-md)",
|
|
@@ -2944,11 +2969,11 @@ const rt = (t) => {
|
|
|
2944
2969
|
}
|
|
2945
2970
|
}
|
|
2946
2971
|
}
|
|
2947
|
-
},
|
|
2972
|
+
}, _a = {
|
|
2948
2973
|
padding: "12px",
|
|
2949
2974
|
borderColor: "var(--vf-border-color)",
|
|
2950
2975
|
borderRadius: "var(--vf-radii-md)"
|
|
2951
|
-
},
|
|
2976
|
+
}, ka = {
|
|
2952
2977
|
gap: "0.5rem",
|
|
2953
2978
|
fontSize: "var(--vf-typography-font-size)",
|
|
2954
2979
|
padding: "var(--vf-controls-padding-y) var(--vf-controls-padding-x)",
|
|
@@ -2969,7 +2994,7 @@ const rt = (t) => {
|
|
|
2969
2994
|
padding: "var(--vf-sizes-lg-padding-y) var(--vf-sizes-lg-padding-x)",
|
|
2970
2995
|
fontSize: "var(--vf-sizes-lg-font-size)"
|
|
2971
2996
|
}
|
|
2972
|
-
},
|
|
2997
|
+
}, Ca = {
|
|
2973
2998
|
gap: "0.375rem",
|
|
2974
2999
|
textColor: "var(--vf-text-color)",
|
|
2975
3000
|
labelFontSize: "0.875rem",
|
|
@@ -2989,7 +3014,7 @@ const rt = (t) => {
|
|
|
2989
3014
|
labelFontSize: "0.9375rem",
|
|
2990
3015
|
hintFontSize: "0.875rem"
|
|
2991
3016
|
}
|
|
2992
|
-
},
|
|
3017
|
+
}, wa = {
|
|
2993
3018
|
gap: "0.5rem",
|
|
2994
3019
|
fontSize: "var(--vf-typography-font-size)",
|
|
2995
3020
|
padding: "var(--vf-controls-padding-y) var(--vf-controls-padding-x)",
|
|
@@ -3012,10 +3037,10 @@ const rt = (t) => {
|
|
|
3012
3037
|
padding: "var(--vf-sizes-lg-padding-y) var(--vf-sizes-lg-padding-x)",
|
|
3013
3038
|
fontSize: "var(--vf-sizes-lg-font-size)"
|
|
3014
3039
|
}
|
|
3015
|
-
},
|
|
3040
|
+
}, $a = {
|
|
3016
3041
|
hoverColor: "var(--vf-blue)",
|
|
3017
3042
|
activeColor: "var(--vf-blue)"
|
|
3018
|
-
},
|
|
3043
|
+
}, xa = {
|
|
3019
3044
|
iconGap: "6px",
|
|
3020
3045
|
submenuOffset: "12px",
|
|
3021
3046
|
separatorThickness: "1px",
|
|
@@ -3035,7 +3060,7 @@ const rt = (t) => {
|
|
|
3035
3060
|
marginBottom: "0.5rem",
|
|
3036
3061
|
marginLeft: "0.5rem"
|
|
3037
3062
|
}
|
|
3038
|
-
},
|
|
3063
|
+
}, Ba = {
|
|
3039
3064
|
width: "90vw",
|
|
3040
3065
|
maxWidth: "520px",
|
|
3041
3066
|
maxHeight: "80vh",
|
|
@@ -3062,9 +3087,9 @@ const rt = (t) => {
|
|
|
3062
3087
|
closeColor: "var(--vf-text-color)",
|
|
3063
3088
|
closeFontSize: "1.25rem",
|
|
3064
3089
|
closeHoverBackgroundColor: "rgba(0, 0, 0, 0.06)"
|
|
3065
|
-
}, Ba = {
|
|
3066
|
-
backgroundColor: "var(--vf-bg-color)"
|
|
3067
3090
|
}, za = {
|
|
3091
|
+
backgroundColor: "var(--vf-bg-color)"
|
|
3092
|
+
}, Fa = {
|
|
3068
3093
|
minWidth: "12rem",
|
|
3069
3094
|
fontSize: "var(--vf-typography-font-size)",
|
|
3070
3095
|
controlGap: "0.75rem",
|
|
@@ -3097,7 +3122,7 @@ const rt = (t) => {
|
|
|
3097
3122
|
padding: "var(--vf-sizes-lg-padding-y) var(--vf-sizes-lg-padding-x)",
|
|
3098
3123
|
fontSize: "var(--vf-sizes-lg-font-size)"
|
|
3099
3124
|
}
|
|
3100
|
-
},
|
|
3125
|
+
}, Sa = {
|
|
3101
3126
|
minWidth: "12rem",
|
|
3102
3127
|
fontSize: "var(--vf-typography-font-size)",
|
|
3103
3128
|
controlGap: "0.5rem",
|
|
@@ -3136,7 +3161,7 @@ const rt = (t) => {
|
|
|
3136
3161
|
padding: "var(--vf-sizes-lg-padding-y) var(--vf-sizes-lg-padding-x)",
|
|
3137
3162
|
fontSize: "var(--vf-sizes-lg-font-size)"
|
|
3138
3163
|
}
|
|
3139
|
-
},
|
|
3164
|
+
}, Va = {
|
|
3140
3165
|
minWidth: "12rem",
|
|
3141
3166
|
fontSize: "var(--vf-typography-font-size)",
|
|
3142
3167
|
controlGap: "0.5rem",
|
|
@@ -3181,7 +3206,7 @@ const rt = (t) => {
|
|
|
3181
3206
|
padding: "var(--vf-sizes-lg-padding-y) var(--vf-sizes-lg-padding-x)",
|
|
3182
3207
|
fontSize: "var(--vf-sizes-lg-font-size)"
|
|
3183
3208
|
}
|
|
3184
|
-
},
|
|
3209
|
+
}, La = {
|
|
3185
3210
|
minWidth: "12rem",
|
|
3186
3211
|
fontSize: "var(--vf-typography-font-size)",
|
|
3187
3212
|
controlGap: "0.75rem",
|
|
@@ -3231,7 +3256,7 @@ const rt = (t) => {
|
|
|
3231
3256
|
fontSize: "var(--vf-sizes-lg-font-size)",
|
|
3232
3257
|
daySize: "2.2rem"
|
|
3233
3258
|
}
|
|
3234
|
-
},
|
|
3259
|
+
}, Ta = {
|
|
3235
3260
|
gap: "0.4rem",
|
|
3236
3261
|
itemMinWidth: "2rem",
|
|
3237
3262
|
fontSize: "var(--vf-typography-font-size)",
|
|
@@ -3256,7 +3281,7 @@ const rt = (t) => {
|
|
|
3256
3281
|
fontSize: "var(--vf-sizes-lg-font-size)",
|
|
3257
3282
|
padding: "0.45rem 0.8rem"
|
|
3258
3283
|
}
|
|
3259
|
-
},
|
|
3284
|
+
}, Ra = {
|
|
3260
3285
|
size: "1rem",
|
|
3261
3286
|
gap: "0.5rem",
|
|
3262
3287
|
borderRadius: "var(--vf-radii-sm)",
|
|
@@ -3268,7 +3293,7 @@ const rt = (t) => {
|
|
|
3268
3293
|
checkColor: "#ffffff",
|
|
3269
3294
|
textColor: "var(--vf-text-color)",
|
|
3270
3295
|
disabledOpacity: "var(--vf-states-disabled-opacity)"
|
|
3271
|
-
},
|
|
3296
|
+
}, Pa = {
|
|
3272
3297
|
size: "1rem",
|
|
3273
3298
|
dotSize: "0.45rem",
|
|
3274
3299
|
gap: "0.5rem",
|
|
@@ -3282,7 +3307,7 @@ const rt = (t) => {
|
|
|
3282
3307
|
dotColor: "#ffffff",
|
|
3283
3308
|
textColor: "var(--vf-text-color)",
|
|
3284
3309
|
disabledOpacity: "var(--vf-states-disabled-opacity)"
|
|
3285
|
-
},
|
|
3310
|
+
}, Ma = {
|
|
3286
3311
|
width: "2.25rem",
|
|
3287
3312
|
height: "1.25rem",
|
|
3288
3313
|
thumbSize: "1rem",
|
|
@@ -3294,7 +3319,7 @@ const rt = (t) => {
|
|
|
3294
3319
|
thumbColor: "#ffffff",
|
|
3295
3320
|
textColor: "var(--vf-text-color)",
|
|
3296
3321
|
disabledOpacity: "var(--vf-states-disabled-opacity)"
|
|
3297
|
-
},
|
|
3322
|
+
}, Ia = {
|
|
3298
3323
|
gap: "0.75rem",
|
|
3299
3324
|
listGap: "0.5rem",
|
|
3300
3325
|
listBorderWidth: "1px",
|
|
@@ -3315,7 +3340,7 @@ const rt = (t) => {
|
|
|
3315
3340
|
panelBackgroundColor: "transparent",
|
|
3316
3341
|
panelTextColor: "var(--vf-text-color)",
|
|
3317
3342
|
disabledOpacity: "var(--vf-states-disabled-opacity)"
|
|
3318
|
-
},
|
|
3343
|
+
}, Da = {
|
|
3319
3344
|
padding: "0.35rem 0.6rem",
|
|
3320
3345
|
borderRadius: "8px",
|
|
3321
3346
|
backgroundColor: "rgba(0, 0, 0, 0.8)",
|
|
@@ -3326,7 +3351,15 @@ const rt = (t) => {
|
|
|
3326
3351
|
zIndex: "120",
|
|
3327
3352
|
maxWidth: "240px",
|
|
3328
3353
|
arrowSize: "8px"
|
|
3329
|
-
},
|
|
3354
|
+
}, Oa = {
|
|
3355
|
+
width: "100%",
|
|
3356
|
+
height: "1rem",
|
|
3357
|
+
lineHeight: "0.9rem",
|
|
3358
|
+
borderRadius: "var(--vf-radii-md)",
|
|
3359
|
+
backgroundColor: "var(--vf-gutter-color)",
|
|
3360
|
+
shimmerColor: "var(--vf-bg-color)",
|
|
3361
|
+
animationDuration: "2s"
|
|
3362
|
+
}, Ea = {
|
|
3330
3363
|
gap: "0.75rem",
|
|
3331
3364
|
padding: "0.75rem 0.9rem",
|
|
3332
3365
|
borderRadius: "var(--vf-radii-md)",
|
|
@@ -3365,7 +3398,7 @@ const rt = (t) => {
|
|
|
3365
3398
|
borderColor: "rgba(var(--vf-red-600-rgb), 0.45)",
|
|
3366
3399
|
textColor: "var(--vf-text-color)"
|
|
3367
3400
|
}
|
|
3368
|
-
},
|
|
3401
|
+
}, Wa = {
|
|
3369
3402
|
gap: "0.75rem",
|
|
3370
3403
|
padding: "0.75rem 0.9rem",
|
|
3371
3404
|
borderRadius: "var(--vf-radii-md)",
|
|
@@ -3403,62 +3436,64 @@ const rt = (t) => {
|
|
|
3403
3436
|
borderColor: "rgba(var(--vf-red-600-rgb), 0.45)",
|
|
3404
3437
|
textColor: "var(--vf-text-color)"
|
|
3405
3438
|
}
|
|
3406
|
-
},
|
|
3439
|
+
}, mr = {
|
|
3407
3440
|
...je,
|
|
3408
3441
|
components: {
|
|
3409
3442
|
base: je,
|
|
3410
|
-
button:
|
|
3411
|
-
card:
|
|
3412
|
-
input:
|
|
3413
|
-
formField:
|
|
3414
|
-
textarea:
|
|
3415
|
-
link:
|
|
3416
|
-
menu:
|
|
3417
|
-
modal:
|
|
3418
|
-
popover:
|
|
3419
|
-
select:
|
|
3420
|
-
autocomplete:
|
|
3421
|
-
multiselect:
|
|
3422
|
-
datepicker:
|
|
3423
|
-
pagination:
|
|
3424
|
-
checkbox:
|
|
3425
|
-
radio:
|
|
3426
|
-
switch:
|
|
3427
|
-
tabs:
|
|
3428
|
-
tooltip:
|
|
3429
|
-
|
|
3430
|
-
|
|
3443
|
+
button: ya,
|
|
3444
|
+
card: _a,
|
|
3445
|
+
input: ka,
|
|
3446
|
+
formField: Ca,
|
|
3447
|
+
textarea: wa,
|
|
3448
|
+
link: $a,
|
|
3449
|
+
menu: xa,
|
|
3450
|
+
modal: Ba,
|
|
3451
|
+
popover: za,
|
|
3452
|
+
select: Fa,
|
|
3453
|
+
autocomplete: Sa,
|
|
3454
|
+
multiselect: Va,
|
|
3455
|
+
datepicker: La,
|
|
3456
|
+
pagination: Ta,
|
|
3457
|
+
checkbox: Ra,
|
|
3458
|
+
radio: Pa,
|
|
3459
|
+
switch: Ma,
|
|
3460
|
+
tabs: Ia,
|
|
3461
|
+
tooltip: Da,
|
|
3462
|
+
skeleton: Oa,
|
|
3463
|
+
toast: Ea,
|
|
3464
|
+
alert: Wa
|
|
3431
3465
|
}
|
|
3432
3466
|
};
|
|
3433
3467
|
export {
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3468
|
+
ir as Alert,
|
|
3469
|
+
Ua as Autocomplete,
|
|
3470
|
+
Ya as Button,
|
|
3471
|
+
yt as Card,
|
|
3472
|
+
er as Checkbox,
|
|
3473
|
+
Ja as DatePicker,
|
|
3474
|
+
mr as DefaultTheme,
|
|
3475
|
+
ja as FormField,
|
|
3476
|
+
Ga as Input,
|
|
3443
3477
|
Je as Link,
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3478
|
+
Na as Menu,
|
|
3479
|
+
ur as Modal,
|
|
3480
|
+
Za as MultiSelect,
|
|
3481
|
+
Qa as Pagination,
|
|
3482
|
+
cr as Popover,
|
|
3483
|
+
or as RadioButton,
|
|
3484
|
+
tr as RadioGroup,
|
|
3485
|
+
qa as Select,
|
|
3486
|
+
fr as Skeleton,
|
|
3487
|
+
dr as Switch,
|
|
3488
|
+
rr as Tab,
|
|
3489
|
+
lr as TabPanel,
|
|
3490
|
+
ar as Tabs,
|
|
3491
|
+
Xa as Textarea,
|
|
3492
|
+
nr as Toast,
|
|
3493
|
+
sr as ToastContainer,
|
|
3494
|
+
vr as Tooltip,
|
|
3495
|
+
gr as VueForge,
|
|
3496
|
+
br as getTheme,
|
|
3462
3497
|
rt as setTheme,
|
|
3463
|
-
|
|
3498
|
+
pr as updateTheme
|
|
3464
3499
|
};
|