@codemonster-ru/vueforge 0.21.0 → 0.23.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 +136 -3
- package/dist/index.css +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.ts.mjs +1670 -1326
- package/dist/index.ts.umd.js +3 -3
- package/dist/package/components/__tests__/accordion.test.d.ts +1 -0
- package/dist/package/components/__tests__/data-table.test.d.ts +1 -0
- package/dist/package/components/accordion-context.d.ts +15 -0
- package/dist/package/components/accordion-item.vue.d.ts +29 -0
- package/dist/package/components/accordion.vue.d.ts +39 -0
- package/dist/package/components/data-table.vue.d.ts +83 -0
- package/dist/package/config/theme-core.d.ts +66 -0
- package/dist/package/themes/default/components/accordion.d.ts +33 -0
- package/dist/package/themes/default/components/datatable.d.ts +33 -0
- package/dist/package/themes/default/index.d.ts +64 -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 Y, ref as D, computed as y, watch as ee, resolveComponent as Ue, openBlock as h, createElementBlock as _, normalizeClass as T, renderSlot as V, Fragment as ae, createTextVNode as U, toDisplayString as R, createBlock as ne, withCtx as _e, createCommentVNode as P, createElementVNode as z, renderList as ve, withKeys as Z, withModifiers as q, unref as xe, createVNode as Ze, useSlots as Je, nextTick as ke, onMounted as Fe, onBeforeUnmount as we, Teleport as $e, withDirectives as fe, vShow as pe, provide as He, inject as Me, reactive as st, createSlots as it, normalizeStyle as Ee } from "vue";
|
|
2
|
+
import { useRoute as dt, useRouter as ct } from "vue-router";
|
|
3
3
|
import { CmIcon as Be } from "@codemonster-ru/vueiconify";
|
|
4
|
-
const
|
|
4
|
+
const ut = ["href", "aria-disabled", "tabindex"], Qe = /* @__PURE__ */ Y({
|
|
5
5
|
__name: "link",
|
|
6
6
|
props: {
|
|
7
7
|
to: { default: void 0 },
|
|
@@ -15,96 +15,96 @@ const ct = ["href", "aria-disabled", "tabindex"], Je = /* @__PURE__ */ G({
|
|
|
15
15
|
},
|
|
16
16
|
emits: ["click", "active", "update:active", "onActive"],
|
|
17
17
|
setup(t, { emit: e }) {
|
|
18
|
-
const r = e, o = t, a =
|
|
18
|
+
const r = e, o = t, a = dt(), d = ct(), i = D(null), c = y(() => o.href ?? o.url), l = y(() => o.as ? o.as === "router-link" && !o.to ? "a" : o.as : o.type === "router-link" || o.type === "a" ? o.type === "router-link" && !o.to ? "a" : o.type : o.to ? "router-link" : "a"), u = y(() => o.to), s = y(() => o.to ? d.resolve(o.to) : null), n = y(() => {
|
|
19
19
|
if (l.value !== "router-link")
|
|
20
20
|
return !1;
|
|
21
|
-
const v =
|
|
22
|
-
return v ? v.name ? a.matched.some(({ name:
|
|
23
|
-
}), f =
|
|
21
|
+
const v = s.value;
|
|
22
|
+
return v ? v.name ? a.matched.some(({ name: w }) => w === v.name) : v.fullPath ? a.fullPath === v.fullPath : a.path === v.path : !1;
|
|
23
|
+
}), f = y(() => o.active === void 0 ? n.value : o.active), b = (v) => {
|
|
24
24
|
if (!o.disabled) {
|
|
25
25
|
r("click", v);
|
|
26
26
|
return;
|
|
27
27
|
}
|
|
28
28
|
v.preventDefault(), v.stopPropagation();
|
|
29
29
|
};
|
|
30
|
-
return
|
|
30
|
+
return ee(n, (v) => {
|
|
31
31
|
v && (r("active"), r("onActive")), r("update:active", v);
|
|
32
|
-
}), (v,
|
|
33
|
-
const
|
|
34
|
-
return l.value === "a" ? (
|
|
32
|
+
}), (v, w) => {
|
|
33
|
+
const C = Ue("router-link");
|
|
34
|
+
return l.value === "a" ? (h(), _("a", {
|
|
35
35
|
key: 0,
|
|
36
36
|
href: c.value,
|
|
37
|
-
class:
|
|
37
|
+
class: T(["vf-link", { "vf-link_active": f.value, "vf-link_disabled": v.disabled }]),
|
|
38
38
|
"aria-disabled": v.disabled,
|
|
39
39
|
tabindex: v.disabled ? -1 : void 0,
|
|
40
|
-
onClick:
|
|
40
|
+
onClick: b
|
|
41
41
|
}, [
|
|
42
|
-
v.$slots.default ?
|
|
43
|
-
|
|
42
|
+
v.$slots.default ? V(v.$slots, "default", { key: 0 }) : (h(), _(ae, { key: 1 }, [
|
|
43
|
+
U(R(v.label), 1)
|
|
44
44
|
], 64))
|
|
45
|
-
], 10,
|
|
45
|
+
], 10, ut)) : (h(), ne(C, {
|
|
46
46
|
key: 1,
|
|
47
47
|
ref_key: "link",
|
|
48
|
-
ref:
|
|
48
|
+
ref: i,
|
|
49
49
|
to: u.value,
|
|
50
|
-
class:
|
|
50
|
+
class: T(["vf-link", { "vf-link_active": f.value }]),
|
|
51
51
|
"aria-disabled": v.disabled,
|
|
52
52
|
tabindex: v.disabled ? -1 : void 0,
|
|
53
53
|
"active-class": "vf-link_partially-active",
|
|
54
54
|
"exact-active-class": "vf-link_active",
|
|
55
|
-
onClick:
|
|
55
|
+
onClick: b
|
|
56
56
|
}, {
|
|
57
|
-
default:
|
|
58
|
-
v.$slots.default ?
|
|
59
|
-
|
|
57
|
+
default: _e(() => [
|
|
58
|
+
v.$slots.default ? V(v.$slots, "default", { key: 0 }) : (h(), _(ae, { key: 1 }, [
|
|
59
|
+
U(R(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
|
+
}), vt = (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
|
+
}, ft = {}, pt = { class: "vf-card" }, bt = {
|
|
72
72
|
key: 0,
|
|
73
73
|
class: "vf-card__default"
|
|
74
|
-
},
|
|
74
|
+
}, gt = {
|
|
75
75
|
key: 1,
|
|
76
76
|
class: "vf-card__header"
|
|
77
|
-
},
|
|
77
|
+
}, mt = {
|
|
78
78
|
key: 2,
|
|
79
79
|
class: "vf-card__body"
|
|
80
|
-
},
|
|
80
|
+
}, ht = {
|
|
81
81
|
key: 3,
|
|
82
82
|
class: "vf-card__footer"
|
|
83
83
|
};
|
|
84
|
-
function
|
|
85
|
-
return
|
|
86
|
-
t.$slots.default ? (
|
|
87
|
-
|
|
88
|
-
])) :
|
|
89
|
-
t.$slots.header ? (
|
|
90
|
-
|
|
91
|
-
])) :
|
|
92
|
-
t.$slots.body ? (
|
|
93
|
-
|
|
94
|
-
])) :
|
|
95
|
-
t.$slots.footer ? (
|
|
96
|
-
|
|
97
|
-
])) :
|
|
84
|
+
function yt(t, e) {
|
|
85
|
+
return h(), _("div", pt, [
|
|
86
|
+
t.$slots.default ? (h(), _("div", bt, [
|
|
87
|
+
V(t.$slots, "default")
|
|
88
|
+
])) : P("", !0),
|
|
89
|
+
t.$slots.header ? (h(), _("div", gt, [
|
|
90
|
+
V(t.$slots, "header")
|
|
91
|
+
])) : P("", !0),
|
|
92
|
+
t.$slots.body ? (h(), _("div", mt, [
|
|
93
|
+
V(t.$slots, "body")
|
|
94
|
+
])) : P("", !0),
|
|
95
|
+
t.$slots.footer ? (h(), _("div", ht, [
|
|
96
|
+
V(t.$slots, "footer")
|
|
97
|
+
])) : P("", !0)
|
|
98
98
|
]);
|
|
99
99
|
}
|
|
100
|
-
const
|
|
100
|
+
const _t = /* @__PURE__ */ vt(ft, [["render", yt]]), Ct = {
|
|
101
101
|
class: "vf-menu__list",
|
|
102
102
|
role: "menu"
|
|
103
103
|
}, kt = {
|
|
104
104
|
key: 1,
|
|
105
105
|
class: "vf-menu__separator",
|
|
106
106
|
role: "separator"
|
|
107
|
-
},
|
|
107
|
+
}, wt = ["aria-expanded", "onClick", "onKeydown"], ur = /* @__PURE__ */ Y({
|
|
108
108
|
name: "VfMenu",
|
|
109
109
|
__name: "menu",
|
|
110
110
|
props: {
|
|
@@ -113,87 +113,87 @@ const yt = /* @__PURE__ */ ut(vt, [["render", ht]]), _t = {
|
|
|
113
113
|
},
|
|
114
114
|
emits: ["active", "onActive"],
|
|
115
115
|
setup(t, { emit: e }) {
|
|
116
|
-
const r = e, o = t, a =
|
|
117
|
-
...
|
|
118
|
-
items:
|
|
119
|
-
})), l = (
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
}),
|
|
123
|
-
}, u = (
|
|
124
|
-
var
|
|
116
|
+
const r = e, o = t, a = D([]), d = (s, n) => `${s.label ?? s.to ?? s.href ?? s.url ?? "item"}_${n.toString()}`, i = (s) => s.to ? "router-link" : "a", c = (s) => s.map((n) => ({
|
|
117
|
+
...n,
|
|
118
|
+
items: n.items ? c(n.items) : void 0
|
|
119
|
+
})), l = (s) => {
|
|
120
|
+
s.items && s.items.length ? (a.value.map((n) => {
|
|
121
|
+
n !== s && (n.subMenuVisible = !1);
|
|
122
|
+
}), s.subMenuVisible = !s.subMenuVisible) : Object.prototype.hasOwnProperty.call(s, "command") && typeof s.command == "function" && s.command();
|
|
123
|
+
}, u = (s) => {
|
|
124
|
+
var n;
|
|
125
125
|
for (const f in a.value) {
|
|
126
|
-
const
|
|
127
|
-
Object.prototype.hasOwnProperty.call(
|
|
126
|
+
const b = a.value[f];
|
|
127
|
+
Object.prototype.hasOwnProperty.call(b, "items") && ((n = b.items) != null && n.some((v) => v === s) ? (b.active = !0, b.subMenuVisible = !0) : (b.active = !1, b.subMenuVisible = !1));
|
|
128
128
|
}
|
|
129
|
-
r("active",
|
|
129
|
+
r("active", s), r("onActive", s);
|
|
130
130
|
};
|
|
131
|
-
return
|
|
131
|
+
return ee(
|
|
132
132
|
() => o.items,
|
|
133
|
-
(
|
|
134
|
-
a.value = c(
|
|
133
|
+
(s) => {
|
|
134
|
+
a.value = c(s);
|
|
135
135
|
},
|
|
136
136
|
{ deep: !0, immediate: !0 }
|
|
137
|
-
), (
|
|
138
|
-
const f =
|
|
139
|
-
return
|
|
140
|
-
class:
|
|
137
|
+
), (s, n) => {
|
|
138
|
+
const f = Ue("VfMenu");
|
|
139
|
+
return h(), _("div", {
|
|
140
|
+
class: T(["vf-menu", `vf-menu_${s.orientation}`])
|
|
141
141
|
}, [
|
|
142
|
-
|
|
143
|
-
(
|
|
144
|
-
key: d(
|
|
142
|
+
z("ul", Ct, [
|
|
143
|
+
(h(!0), _(ae, null, ve(a.value, (b, v) => (h(), _("li", {
|
|
144
|
+
key: d(b, v),
|
|
145
145
|
class: "vf-menu__item",
|
|
146
146
|
role: "none"
|
|
147
147
|
}, [
|
|
148
|
-
|
|
148
|
+
s.$slots[d(b, v)] ? V(s.$slots, d(b, v), {
|
|
149
149
|
key: 0,
|
|
150
|
-
item: { ...
|
|
151
|
-
}) :
|
|
152
|
-
|
|
153
|
-
class:
|
|
150
|
+
item: { ...b, class: "vf-menu__link" }
|
|
151
|
+
}) : b.separator ? (h(), _("hr", kt)) : b.items && b.items.length ? (h(), _(ae, { key: 2 }, [
|
|
152
|
+
z("div", {
|
|
153
|
+
class: T(["vf-menu__parent", { "vf-menu__parent_active": b.active }]),
|
|
154
154
|
role: "menuitem",
|
|
155
155
|
tabindex: "0",
|
|
156
|
-
"aria-expanded":
|
|
157
|
-
onClick: (
|
|
156
|
+
"aria-expanded": b.subMenuVisible ? "true" : "false",
|
|
157
|
+
onClick: (w) => l(b),
|
|
158
158
|
onKeydown: [
|
|
159
|
-
|
|
160
|
-
|
|
159
|
+
Z(q((w) => l(b), ["prevent"]), ["enter"]),
|
|
160
|
+
Z(q((w) => l(b), ["prevent"]), ["space"])
|
|
161
161
|
]
|
|
162
162
|
}, [
|
|
163
|
-
|
|
163
|
+
b.icon ? (h(), ne(xe(Be), {
|
|
164
164
|
key: 0,
|
|
165
|
-
icon:
|
|
165
|
+
icon: b.icon,
|
|
166
166
|
class: "vf-menu__icon"
|
|
167
|
-
}, null, 8, ["icon"])) :
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
], 42,
|
|
171
|
-
|
|
167
|
+
}, null, 8, ["icon"])) : P("", !0),
|
|
168
|
+
U(" " + R(b.label) + " ", 1),
|
|
169
|
+
Ze(xe(Be), { icon: "chevronDown" })
|
|
170
|
+
], 42, wt),
|
|
171
|
+
b.items ? (h(), ne(f, {
|
|
172
172
|
key: 0,
|
|
173
|
-
items:
|
|
174
|
-
class:
|
|
173
|
+
items: b.items,
|
|
174
|
+
class: T(["vf-menu__submenu", { "vf-menu__submenu_visible": b.subMenuVisible }]),
|
|
175
175
|
onOnActive: u
|
|
176
|
-
}, null, 8, ["items", "class"])) :
|
|
177
|
-
], 64)) : (
|
|
176
|
+
}, null, 8, ["items", "class"])) : P("", !0)
|
|
177
|
+
], 64)) : (h(), ne(Qe, {
|
|
178
178
|
key: 3,
|
|
179
|
-
to:
|
|
180
|
-
href:
|
|
181
|
-
as:
|
|
179
|
+
to: b.to,
|
|
180
|
+
href: b.href ?? b.url,
|
|
181
|
+
as: i(b),
|
|
182
182
|
class: "vf-menu__link",
|
|
183
|
-
active:
|
|
184
|
-
disabled:
|
|
183
|
+
active: b.active,
|
|
184
|
+
disabled: b.disabled,
|
|
185
185
|
role: "menuitem",
|
|
186
|
-
"aria-disabled":
|
|
187
|
-
onClick: (
|
|
188
|
-
onActive: (
|
|
186
|
+
"aria-disabled": b.disabled ? "true" : "false",
|
|
187
|
+
onClick: (w) => l(b),
|
|
188
|
+
onActive: (w) => u(b)
|
|
189
189
|
}, {
|
|
190
|
-
default:
|
|
191
|
-
|
|
190
|
+
default: _e(() => [
|
|
191
|
+
b.icon ? (h(), ne(xe(Be), {
|
|
192
192
|
key: 0,
|
|
193
|
-
icon:
|
|
193
|
+
icon: b.icon,
|
|
194
194
|
class: "vf-menu__icon"
|
|
195
|
-
}, null, 8, ["icon"])) :
|
|
196
|
-
|
|
195
|
+
}, null, 8, ["icon"])) : P("", !0),
|
|
196
|
+
U(" " + R(b.label), 1)
|
|
197
197
|
]),
|
|
198
198
|
_: 2
|
|
199
199
|
}, 1032, ["to", "href", "as", "active", "disabled", "aria-disabled", "onClick", "onActive"]))
|
|
@@ -202,7 +202,7 @@ const yt = /* @__PURE__ */ ut(vt, [["render", ht]]), _t = {
|
|
|
202
202
|
], 2);
|
|
203
203
|
};
|
|
204
204
|
}
|
|
205
|
-
}),
|
|
205
|
+
}), $t = ["type", "disabled"], vr = /* @__PURE__ */ Y({
|
|
206
206
|
__name: "button",
|
|
207
207
|
props: {
|
|
208
208
|
to: { default: void 0 },
|
|
@@ -221,70 +221,70 @@ const yt = /* @__PURE__ */ ut(vt, [["render", ht]]), _t = {
|
|
|
221
221
|
disabled: { type: Boolean, default: !1 }
|
|
222
222
|
},
|
|
223
223
|
setup(t) {
|
|
224
|
-
const e = t, r = ["button", "submit", "reset"], o = (
|
|
225
|
-
let
|
|
226
|
-
return ["top", "bottom"].includes(e.iconPos) &&
|
|
227
|
-
}), l =
|
|
228
|
-
return (
|
|
224
|
+
const e = t, r = ["button", "submit", "reset"], o = (s) => !!s && r.includes(s), a = y(() => e.as ? e.as === "button" : !(e.to || e.href || e.url || e.type && !o(e.type))), d = y(() => o(e.type) ? e.type : "button"), i = y(() => e.as === "link" ? e.to ? "router-link" : "a" : e.type && !o(e.type) ? e.type === "router-link" && e.to ? "router-link" : "a" : e.to ? "router-link" : "a"), c = y(() => {
|
|
225
|
+
let s = ["vf-button", `vf-button_${e.severity}`];
|
|
226
|
+
return ["top", "bottom"].includes(e.iconPos) && s.push("vf-button_vertical"), e.variant === "text" && s.push("vf-button_text"), e.variant === "outlined" && s.push("vf-button_outlined"), ["small", "large"].indexOf(e.size) > -1 && s.push(`vf-button_${e.size}`), (e.loading || e.disabled) && s.push("vf-button_disabled"), e.rounded && s.push("vf-button_rounded"), s;
|
|
227
|
+
}), l = y(() => ["vf-button__icon", `vf-button__icon_${e.iconPos}`]), u = y(() => ["vf-button__label"]);
|
|
228
|
+
return (s, n) => a.value ? (h(), _("button", {
|
|
229
229
|
key: 0,
|
|
230
230
|
type: d.value,
|
|
231
|
-
class:
|
|
231
|
+
class: T(c.value),
|
|
232
232
|
disabled: e.loading || e.disabled
|
|
233
233
|
}, [
|
|
234
|
-
e.icon && !e.loading ? (
|
|
234
|
+
e.icon && !e.loading ? (h(), ne(xe(Be), {
|
|
235
235
|
key: 0,
|
|
236
236
|
icon: e.icon,
|
|
237
|
-
class:
|
|
238
|
-
}, null, 8, ["icon", "class"])) :
|
|
239
|
-
e.loading ? (
|
|
237
|
+
class: T(l.value)
|
|
238
|
+
}, null, 8, ["icon", "class"])) : P("", !0),
|
|
239
|
+
e.loading ? (h(), ne(xe(Be), {
|
|
240
240
|
key: 1,
|
|
241
241
|
icon: "circleNotch",
|
|
242
|
-
class:
|
|
242
|
+
class: T(l.value),
|
|
243
243
|
spin: ""
|
|
244
|
-
}, null, 8, ["class"])) :
|
|
245
|
-
|
|
244
|
+
}, null, 8, ["class"])) : P("", !0),
|
|
245
|
+
s.$slots.default ? (h(), _("span", {
|
|
246
246
|
key: 2,
|
|
247
|
-
class:
|
|
247
|
+
class: T(u.value)
|
|
248
248
|
}, [
|
|
249
|
-
|
|
250
|
-
], 2)) :
|
|
249
|
+
V(s.$slots, "default")
|
|
250
|
+
], 2)) : s.label ? (h(), _("span", {
|
|
251
251
|
key: 3,
|
|
252
|
-
class:
|
|
253
|
-
},
|
|
254
|
-
], 10,
|
|
252
|
+
class: T(u.value)
|
|
253
|
+
}, R(s.label), 3)) : P("", !0)
|
|
254
|
+
], 10, $t)) : (h(), ne(Qe, {
|
|
255
255
|
key: 1,
|
|
256
256
|
to: e.to,
|
|
257
257
|
href: e.href ?? e.url,
|
|
258
|
-
as:
|
|
259
|
-
class:
|
|
258
|
+
as: i.value,
|
|
259
|
+
class: T(c.value),
|
|
260
260
|
disabled: e.loading || e.disabled
|
|
261
261
|
}, {
|
|
262
|
-
default:
|
|
263
|
-
e.icon ? (
|
|
262
|
+
default: _e(() => [
|
|
263
|
+
e.icon ? (h(), ne(xe(Be), {
|
|
264
264
|
key: 0,
|
|
265
265
|
icon: e.icon,
|
|
266
|
-
class:
|
|
267
|
-
}, null, 8, ["icon", "class"])) :
|
|
268
|
-
|
|
266
|
+
class: T(l.value)
|
|
267
|
+
}, null, 8, ["icon", "class"])) : P("", !0),
|
|
268
|
+
s.$slots.default ? (h(), _("span", {
|
|
269
269
|
key: 1,
|
|
270
|
-
class:
|
|
270
|
+
class: T(u.value)
|
|
271
271
|
}, [
|
|
272
|
-
|
|
273
|
-
], 2)) :
|
|
272
|
+
V(s.$slots, "default")
|
|
273
|
+
], 2)) : s.label ? (h(), _("span", {
|
|
274
274
|
key: 2,
|
|
275
|
-
class:
|
|
276
|
-
},
|
|
275
|
+
class: T(u.value)
|
|
276
|
+
}, R(s.label), 3)) : P("", !0)
|
|
277
277
|
]),
|
|
278
278
|
_: 3
|
|
279
279
|
}, 8, ["to", "href", "as", "class", "disabled"]));
|
|
280
280
|
}
|
|
281
|
-
}),
|
|
281
|
+
}), xt = {
|
|
282
282
|
key: 0,
|
|
283
283
|
class: "vf-input__prefix"
|
|
284
|
-
},
|
|
284
|
+
}, Bt = ["type", "value", "placeholder", "disabled", "readonly"], zt = {
|
|
285
285
|
key: 1,
|
|
286
286
|
class: "vf-input__suffix"
|
|
287
|
-
},
|
|
287
|
+
}, fr = /* @__PURE__ */ Y({
|
|
288
288
|
__name: "input",
|
|
289
289
|
props: {
|
|
290
290
|
modelValue: { default: "" },
|
|
@@ -297,20 +297,20 @@ const yt = /* @__PURE__ */ ut(vt, [["render", ht]]), _t = {
|
|
|
297
297
|
},
|
|
298
298
|
emits: ["update:modelValue", "input", "change", "focus", "blur"],
|
|
299
299
|
setup(t, { emit: e }) {
|
|
300
|
-
const r = e, o = t, a =
|
|
300
|
+
const r = e, o = t, a = y(() => {
|
|
301
301
|
const u = ["vf-input", `vf-input_${o.variant}`];
|
|
302
302
|
return o.size !== "normal" && u.push(`vf-input_${o.size}`), o.disabled && u.push("vf-input_disabled"), u;
|
|
303
303
|
}), d = (u) => {
|
|
304
|
-
const
|
|
305
|
-
r("update:modelValue",
|
|
306
|
-
},
|
|
307
|
-
return (u,
|
|
308
|
-
class:
|
|
304
|
+
const s = u.target;
|
|
305
|
+
r("update:modelValue", s.value), r("input", u);
|
|
306
|
+
}, i = (u) => r("change", u), c = (u) => r("focus", u), l = (u) => r("blur", u);
|
|
307
|
+
return (u, s) => (h(), _("div", {
|
|
308
|
+
class: T(a.value)
|
|
309
309
|
}, [
|
|
310
|
-
u.$slots.prefix ? (
|
|
311
|
-
|
|
312
|
-
])) :
|
|
313
|
-
|
|
310
|
+
u.$slots.prefix ? (h(), _("span", xt, [
|
|
311
|
+
V(u.$slots, "prefix")
|
|
312
|
+
])) : P("", !0),
|
|
313
|
+
z("input", {
|
|
314
314
|
class: "vf-input__control",
|
|
315
315
|
type: u.type,
|
|
316
316
|
value: u.modelValue,
|
|
@@ -318,20 +318,20 @@ const yt = /* @__PURE__ */ ut(vt, [["render", ht]]), _t = {
|
|
|
318
318
|
disabled: u.disabled,
|
|
319
319
|
readonly: u.readonly,
|
|
320
320
|
onInput: d,
|
|
321
|
-
onChange:
|
|
321
|
+
onChange: i,
|
|
322
322
|
onFocus: c,
|
|
323
323
|
onBlur: l
|
|
324
|
-
}, null, 40,
|
|
325
|
-
u.$slots.suffix ? (
|
|
326
|
-
|
|
327
|
-
])) :
|
|
324
|
+
}, null, 40, Bt),
|
|
325
|
+
u.$slots.suffix ? (h(), _("span", zt, [
|
|
326
|
+
V(u.$slots, "suffix")
|
|
327
|
+
])) : P("", !0)
|
|
328
328
|
], 2));
|
|
329
329
|
}
|
|
330
|
-
}),
|
|
330
|
+
}), Ft = ["for"], St = {
|
|
331
331
|
key: 0,
|
|
332
332
|
class: "vf-form-field__required",
|
|
333
333
|
"aria-hidden": "true"
|
|
334
|
-
},
|
|
334
|
+
}, Vt = { class: "vf-form-field__control" }, Lt = ["id"], Tt = ["id"], pr = /* @__PURE__ */ Y({
|
|
335
335
|
__name: "form-field",
|
|
336
336
|
props: {
|
|
337
337
|
id: { default: void 0 },
|
|
@@ -343,56 +343,56 @@ const yt = /* @__PURE__ */ ut(vt, [["render", ht]]), _t = {
|
|
|
343
343
|
size: { default: "normal" }
|
|
344
344
|
},
|
|
345
345
|
setup(t) {
|
|
346
|
-
const e = t, r =
|
|
346
|
+
const e = t, r = Je(), o = `vf-form-field-${Math.random().toString(36).slice(2, 10)}`, a = y(() => e.id || o), d = y(() => `${a.value}-hint`), i = y(() => `${a.value}-error`), c = y(() => !!e.label || !!r.label), l = y(() => !!e.hint || !!r.hint), u = y(() => !!e.error || !!r.error), s = y(() => {
|
|
347
347
|
const f = [];
|
|
348
|
-
return l.value && f.push(d.value), u.value && f.push(
|
|
349
|
-
}),
|
|
348
|
+
return l.value && f.push(d.value), u.value && f.push(i.value), f.length ? f.join(" ") : void 0;
|
|
349
|
+
}), n = y(() => {
|
|
350
350
|
const f = ["vf-form-field"];
|
|
351
351
|
return e.size !== "normal" && f.push(`vf-form-field_${e.size}`), e.disabled && f.push("vf-form-field_disabled"), u.value && f.push("vf-form-field_invalid"), f;
|
|
352
352
|
});
|
|
353
|
-
return (f,
|
|
354
|
-
class:
|
|
353
|
+
return (f, b) => (h(), _("div", {
|
|
354
|
+
class: T(n.value)
|
|
355
355
|
}, [
|
|
356
|
-
c.value ? (
|
|
356
|
+
c.value ? (h(), _("label", {
|
|
357
357
|
key: 0,
|
|
358
358
|
class: "vf-form-field__label",
|
|
359
359
|
for: a.value
|
|
360
360
|
}, [
|
|
361
|
-
|
|
362
|
-
|
|
361
|
+
V(f.$slots, "label", {}, () => [
|
|
362
|
+
U(R(f.label), 1)
|
|
363
363
|
]),
|
|
364
|
-
f.required ? (
|
|
365
|
-
], 8,
|
|
366
|
-
|
|
367
|
-
|
|
364
|
+
f.required ? (h(), _("span", St, "*")) : P("", !0)
|
|
365
|
+
], 8, Ft)) : P("", !0),
|
|
366
|
+
z("div", Vt, [
|
|
367
|
+
V(f.$slots, "default", {
|
|
368
368
|
id: a.value,
|
|
369
|
-
describedBy:
|
|
369
|
+
describedBy: s.value,
|
|
370
370
|
invalid: u.value,
|
|
371
371
|
required: f.required
|
|
372
372
|
})
|
|
373
373
|
]),
|
|
374
|
-
l.value ? (
|
|
374
|
+
l.value ? (h(), _("p", {
|
|
375
375
|
key: 1,
|
|
376
376
|
id: d.value,
|
|
377
377
|
class: "vf-form-field__hint"
|
|
378
378
|
}, [
|
|
379
|
-
|
|
380
|
-
|
|
379
|
+
V(f.$slots, "hint", {}, () => [
|
|
380
|
+
U(R(f.hint), 1)
|
|
381
381
|
])
|
|
382
|
-
], 8,
|
|
383
|
-
u.value ? (
|
|
382
|
+
], 8, Lt)) : P("", !0),
|
|
383
|
+
u.value ? (h(), _("p", {
|
|
384
384
|
key: 2,
|
|
385
|
-
id:
|
|
385
|
+
id: i.value,
|
|
386
386
|
class: "vf-form-field__error",
|
|
387
387
|
role: "alert"
|
|
388
388
|
}, [
|
|
389
|
-
|
|
390
|
-
|
|
389
|
+
V(f.$slots, "error", {}, () => [
|
|
390
|
+
U(R(f.error), 1)
|
|
391
391
|
])
|
|
392
|
-
], 8,
|
|
392
|
+
], 8, Tt)) : P("", !0)
|
|
393
393
|
], 2));
|
|
394
394
|
}
|
|
395
|
-
}),
|
|
395
|
+
}), Rt = ["value", "placeholder", "disabled", "readonly", "rows"], br = /* @__PURE__ */ Y({
|
|
396
396
|
__name: "textarea",
|
|
397
397
|
props: {
|
|
398
398
|
modelValue: { default: "" },
|
|
@@ -405,17 +405,17 @@ const yt = /* @__PURE__ */ ut(vt, [["render", ht]]), _t = {
|
|
|
405
405
|
},
|
|
406
406
|
emits: ["update:modelValue", "input", "change", "focus", "blur"],
|
|
407
407
|
setup(t, { emit: e }) {
|
|
408
|
-
const r = e, o = t, a =
|
|
408
|
+
const r = e, o = t, a = y(() => {
|
|
409
409
|
const u = ["vf-textarea", `vf-textarea_${o.variant}`];
|
|
410
410
|
return o.size !== "normal" && u.push(`vf-textarea_${o.size}`), o.disabled && u.push("vf-textarea_disabled"), u;
|
|
411
411
|
}), d = (u) => {
|
|
412
|
-
const
|
|
413
|
-
r("update:modelValue",
|
|
414
|
-
},
|
|
415
|
-
return (u,
|
|
416
|
-
class:
|
|
412
|
+
const s = u.target;
|
|
413
|
+
r("update:modelValue", s.value), r("input", u);
|
|
414
|
+
}, i = (u) => r("change", u), c = (u) => r("focus", u), l = (u) => r("blur", u);
|
|
415
|
+
return (u, s) => (h(), _("div", {
|
|
416
|
+
class: T(a.value)
|
|
417
417
|
}, [
|
|
418
|
-
|
|
418
|
+
z("textarea", {
|
|
419
419
|
class: "vf-textarea__control",
|
|
420
420
|
value: u.modelValue,
|
|
421
421
|
placeholder: u.placeholder,
|
|
@@ -423,13 +423,13 @@ const yt = /* @__PURE__ */ ut(vt, [["render", ht]]), _t = {
|
|
|
423
423
|
readonly: u.readonly,
|
|
424
424
|
rows: u.rows,
|
|
425
425
|
onInput: d,
|
|
426
|
-
onChange:
|
|
426
|
+
onChange: i,
|
|
427
427
|
onFocus: c,
|
|
428
428
|
onBlur: l
|
|
429
|
-
}, null, 40,
|
|
429
|
+
}, null, 40, Rt)
|
|
430
430
|
], 2));
|
|
431
431
|
}
|
|
432
|
-
}),
|
|
432
|
+
}), Ye = [
|
|
433
433
|
"top",
|
|
434
434
|
"top-start",
|
|
435
435
|
"top-end",
|
|
@@ -442,7 +442,7 @@ const yt = /* @__PURE__ */ ut(vt, [["render", ht]]), _t = {
|
|
|
442
442
|
"left",
|
|
443
443
|
"left-start",
|
|
444
444
|
"left-end"
|
|
445
|
-
],
|
|
445
|
+
], be = (t) => {
|
|
446
446
|
if (t == null || !(t instanceof HTMLElement))
|
|
447
447
|
return null;
|
|
448
448
|
if (typeof window < "u") {
|
|
@@ -450,18 +450,18 @@ const yt = /* @__PURE__ */ ut(vt, [["render", ht]]), _t = {
|
|
|
450
450
|
if (/(auto|scroll|overlay)/.test(r))
|
|
451
451
|
return t;
|
|
452
452
|
}
|
|
453
|
-
return t.scrollHeight > t.clientHeight || t.scrollWidth > t.clientWidth ? t :
|
|
453
|
+
return t.scrollHeight > t.clientHeight || t.scrollWidth > t.clientWidth ? t : be(t.parentNode);
|
|
454
454
|
};
|
|
455
|
-
function
|
|
455
|
+
function Pt(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, d = e ?
|
|
458
|
+
const It = (t, e) => t.strategy ? t.strategy : Pt(e) ? "fixed" : "absolute", he = (t, e) => It(t, e) === "fixed", ie = (t, e, r = {}) => {
|
|
459
|
+
const o = t.getBoundingClientRect(), a = e ? e.offsetParent : null, d = e ? he(r, e) : !1;
|
|
460
460
|
if (a && !d) {
|
|
461
|
-
const
|
|
461
|
+
const i = a.getBoundingClientRect(), c = a.scrollLeft, l = a.scrollTop;
|
|
462
462
|
return {
|
|
463
|
-
left: o.left -
|
|
464
|
-
top: o.top -
|
|
463
|
+
left: o.left - i.left + c,
|
|
464
|
+
top: o.top - i.top + l,
|
|
465
465
|
width: o.width,
|
|
466
466
|
height: o.height
|
|
467
467
|
};
|
|
@@ -472,61 +472,61 @@ const Pt = (t, e) => t.strategy ? t.strategy : Rt(e) ? "fixed" : "absolute", me
|
|
|
472
472
|
width: o.width,
|
|
473
473
|
height: o.height
|
|
474
474
|
};
|
|
475
|
-
},
|
|
475
|
+
}, Ce = (t, e) => {
|
|
476
476
|
var r;
|
|
477
477
|
return (r = t.middleware) == null ? void 0 : r.find((o) => o.name === e);
|
|
478
|
-
},
|
|
479
|
-
const e =
|
|
478
|
+
}, et = (t, e) => !!Ce(t, e), Ot = (t) => {
|
|
479
|
+
const e = be(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
|
-
if (r === null && typeof window < "u" &&
|
|
483
|
+
if (r === null && typeof window < "u" && he(o, e))
|
|
484
484
|
return t;
|
|
485
485
|
let d = 0;
|
|
486
486
|
if (r === null) {
|
|
487
|
-
const
|
|
488
|
-
d =
|
|
487
|
+
const i = be(e);
|
|
488
|
+
d = i ? i.scrollTop : 0;
|
|
489
489
|
}
|
|
490
490
|
return t - d;
|
|
491
491
|
}, ce = (t, e, r = null, o = {}, a) => {
|
|
492
492
|
let d;
|
|
493
|
-
if (r === null && typeof window < "u" &&
|
|
493
|
+
if (r === null && typeof window < "u" && he(o, e))
|
|
494
494
|
d = window.innerWidth;
|
|
495
495
|
else if (r === null) {
|
|
496
|
-
const
|
|
497
|
-
d =
|
|
496
|
+
const i = be(e);
|
|
497
|
+
d = i ? Re(i) : 0;
|
|
498
498
|
} else
|
|
499
499
|
d = r.getBoundingClientRect().width;
|
|
500
500
|
return -(t + e.clientWidth - d);
|
|
501
|
-
},
|
|
501
|
+
}, ge = (t, e, r = null, o = {}, a) => {
|
|
502
502
|
let d;
|
|
503
|
-
if (r === null && typeof window < "u" &&
|
|
503
|
+
if (r === null && typeof window < "u" && he(o, e))
|
|
504
504
|
d = window.innerHeight;
|
|
505
505
|
else if (r === null) {
|
|
506
|
-
const
|
|
507
|
-
d =
|
|
506
|
+
const i = be(e);
|
|
507
|
+
d = i ? Pe(i) : 0;
|
|
508
508
|
} else
|
|
509
509
|
d = r.getBoundingClientRect().height;
|
|
510
510
|
return -(t + e.clientHeight - d);
|
|
511
511
|
}, ue = (t, e, r = null, o = {}, a) => {
|
|
512
|
-
if (r === null && typeof window < "u" &&
|
|
512
|
+
if (r === null && typeof window < "u" && he(o, e))
|
|
513
513
|
return t;
|
|
514
514
|
let d = 0;
|
|
515
515
|
if (r === null) {
|
|
516
|
-
const
|
|
517
|
-
d =
|
|
516
|
+
const i = be(e);
|
|
517
|
+
d = i ? i.scrollLeft : 0;
|
|
518
518
|
}
|
|
519
519
|
return t - d;
|
|
520
|
-
},
|
|
520
|
+
}, je = ({
|
|
521
521
|
options: t,
|
|
522
522
|
primaryX: e,
|
|
523
523
|
primaryY: r,
|
|
524
524
|
floating: o,
|
|
525
525
|
placement: a,
|
|
526
526
|
reference: d,
|
|
527
|
-
scrollDirection:
|
|
527
|
+
scrollDirection: i
|
|
528
528
|
}) => {
|
|
529
|
-
const c =
|
|
529
|
+
const c = Ie(d, o, a, t), l = Ce(t, "offset");
|
|
530
530
|
if (l) {
|
|
531
531
|
const u = l.fn({
|
|
532
532
|
x: c.x,
|
|
@@ -537,11 +537,11 @@ const Pt = (t, e) => t.strategy ? t.strategy : Rt(e) ? "fixed" : "absolute", me
|
|
|
537
537
|
floating: o,
|
|
538
538
|
placement: a,
|
|
539
539
|
reference: d,
|
|
540
|
-
scrollDirection:
|
|
540
|
+
scrollDirection: i
|
|
541
541
|
});
|
|
542
542
|
c.x = u.x, c.y = u.y;
|
|
543
543
|
}
|
|
544
|
-
return
|
|
544
|
+
return Jt(c, o, d, t) ? {
|
|
545
545
|
x: c.x,
|
|
546
546
|
y: c.y,
|
|
547
547
|
placement: a
|
|
@@ -555,112 +555,112 @@ const Pt = (t, e) => t.strategy ? t.strategy : Rt(e) ? "fixed" : "absolute", me
|
|
|
555
555
|
options: o,
|
|
556
556
|
primaryX: a,
|
|
557
557
|
primaryY: d,
|
|
558
|
-
floating:
|
|
558
|
+
floating: i,
|
|
559
559
|
placement: c,
|
|
560
560
|
reference: l,
|
|
561
561
|
scrollDirection: u
|
|
562
562
|
}) => {
|
|
563
|
-
var
|
|
564
|
-
const
|
|
563
|
+
var s;
|
|
564
|
+
const n = {
|
|
565
565
|
x: e,
|
|
566
566
|
y: r,
|
|
567
567
|
placement: c
|
|
568
568
|
}, f = {
|
|
569
569
|
...o,
|
|
570
|
-
middleware: (
|
|
571
|
-
},
|
|
572
|
-
let
|
|
573
|
-
const
|
|
574
|
-
if (
|
|
570
|
+
middleware: (s = o.middleware) == null ? void 0 : s.filter((L) => L.name !== "shift")
|
|
571
|
+
}, b = (t == null ? void 0 : t.placements) ?? Ye, v = !(t != null && t.placements), w = v ? Ye : b;
|
|
572
|
+
let C = !1;
|
|
573
|
+
const $ = (L) => {
|
|
574
|
+
if (C)
|
|
575
575
|
return;
|
|
576
|
-
const H =
|
|
576
|
+
const H = je({
|
|
577
577
|
options: f,
|
|
578
578
|
primaryX: a,
|
|
579
579
|
primaryY: d,
|
|
580
|
-
floating:
|
|
581
|
-
placement:
|
|
580
|
+
floating: i,
|
|
581
|
+
placement: L,
|
|
582
582
|
reference: l,
|
|
583
583
|
scrollDirection: u
|
|
584
584
|
});
|
|
585
|
-
H && (
|
|
586
|
-
}, M =
|
|
587
|
-
if (!v &&
|
|
588
|
-
const
|
|
589
|
-
(H,
|
|
590
|
-
const
|
|
585
|
+
H && (n.x = H.x, n.y = H.y, n.placement = H.placement, C = !0);
|
|
586
|
+
}, M = eo(l, i, f);
|
|
587
|
+
if (!v && b.includes(c) && $(c), C || w.forEach($), !C) {
|
|
588
|
+
const L = b.reduce(
|
|
589
|
+
(H, I) => {
|
|
590
|
+
const O = je({
|
|
591
591
|
options: f,
|
|
592
592
|
primaryX: a,
|
|
593
593
|
primaryY: d,
|
|
594
|
-
floating:
|
|
595
|
-
placement:
|
|
594
|
+
floating: i,
|
|
595
|
+
placement: I,
|
|
596
596
|
reference: l,
|
|
597
597
|
scrollDirection: u
|
|
598
598
|
});
|
|
599
|
-
if (!
|
|
599
|
+
if (!O)
|
|
600
600
|
return H;
|
|
601
|
-
const
|
|
602
|
-
return !H ||
|
|
601
|
+
const E = ze(I), F = M[E];
|
|
602
|
+
return !H || F > H.space ? { result: O, space: F } : H;
|
|
603
603
|
},
|
|
604
604
|
null
|
|
605
605
|
);
|
|
606
|
-
|
|
606
|
+
L && (n.x = L.result.x, n.y = L.result.y, n.placement = L.result.placement, C = !0);
|
|
607
607
|
}
|
|
608
|
-
if (!
|
|
609
|
-
const
|
|
610
|
-
let H =
|
|
611
|
-
|
|
612
|
-
const
|
|
613
|
-
|
|
608
|
+
if (!C && b.length > 0) {
|
|
609
|
+
const L = ze(c);
|
|
610
|
+
let H = L, I = M[L];
|
|
611
|
+
b.forEach((p) => {
|
|
612
|
+
const m = ze(p), k = M[m];
|
|
613
|
+
k > I && (I = k, H = m);
|
|
614
614
|
});
|
|
615
|
-
const
|
|
616
|
-
if (
|
|
617
|
-
const
|
|
618
|
-
x:
|
|
619
|
-
y:
|
|
615
|
+
const O = Qt(H, c, b), E = Ie(l, i, O, f), F = Ce(f, "offset");
|
|
616
|
+
if (F) {
|
|
617
|
+
const p = F.fn({
|
|
618
|
+
x: E.x,
|
|
619
|
+
y: E.y,
|
|
620
620
|
options: f,
|
|
621
621
|
primaryX: a,
|
|
622
622
|
primaryY: d,
|
|
623
|
-
floating:
|
|
624
|
-
placement:
|
|
623
|
+
floating: i,
|
|
624
|
+
placement: O,
|
|
625
625
|
reference: l,
|
|
626
626
|
scrollDirection: u
|
|
627
627
|
});
|
|
628
|
-
|
|
628
|
+
E.x = p.x, E.y = p.y;
|
|
629
629
|
}
|
|
630
|
-
|
|
630
|
+
n.x = E.x, n.y = E.y, n.placement = E.placement;
|
|
631
631
|
}
|
|
632
|
-
return
|
|
632
|
+
return n;
|
|
633
633
|
}
|
|
634
|
-
}),
|
|
635
|
-
var d,
|
|
634
|
+
}), tt = (t, e, r, o, a) => {
|
|
635
|
+
var d, i, c;
|
|
636
636
|
let l = 0;
|
|
637
637
|
o.startsWith("right") ? l = -t : o.startsWith("left") && (l = t);
|
|
638
|
-
const u =
|
|
638
|
+
const u = Ce(e, "arrow"), s = Ce(e, "shift");
|
|
639
639
|
if (u) {
|
|
640
|
-
const
|
|
641
|
-
o.startsWith("right") ? l -=
|
|
640
|
+
const n = ((d = u.params) == null ? void 0 : d.arrow).getBoundingClientRect();
|
|
641
|
+
o.startsWith("right") ? l -= n.width / 2 : o.startsWith("left") && (l += n.width / 2);
|
|
642
642
|
}
|
|
643
|
-
if (
|
|
644
|
-
let
|
|
645
|
-
|
|
646
|
-
const
|
|
647
|
-
f =
|
|
643
|
+
if (et(e, "shift") && u) {
|
|
644
|
+
let n = null, f = 0;
|
|
645
|
+
s && (n = (i = s.params) == null ? void 0 : i.parent);
|
|
646
|
+
const b = (c = u.params) == null ? void 0 : c.arrow;
|
|
647
|
+
f = b.getBoundingClientRect().width / 2, f += Dt(b), f -= t, o.startsWith("right") ? ce(r - l, a, n, e) <= t ? ce(r, a, n, e) > 0 ? l = t - ce(r, a, n, e) : l = t : ue(r - l - f, a, n, e) <= t && (ue(r - l - f, a, n, e) >= 0 ? (l = -t - (ue(r - l - f, a, n, e) + t), n && (l = -t)) : l = -t) : o.startsWith("left") ? ce(r - l + f, a, n, e) <= t ? (l = t + ce(r - f, a, n, e), l <= t && (l = t)) : ue(r - l, a, n, e) <= t && (l = -t + ue(r, a, n, e), l <= -t && (l = -t)) : ce(r - l, a, n, e) <= t ? ce(r - l, a, n, e) <= t && ce(r, a, n, e) > 0 ? l = t - ce(r, a, n, e) : l = t : ue(r - l, a, n, e) <= t && (ue(r - l, a, n, e) <= t && ue(r, a, n, e) > 0 ? l = -(t - ue(r, a, n, e)) : l = -t);
|
|
648
648
|
}
|
|
649
649
|
return l;
|
|
650
|
-
},
|
|
651
|
-
var d,
|
|
650
|
+
}, ot = (t, e, r, o, a) => {
|
|
651
|
+
var d, i, c;
|
|
652
652
|
let l = 0;
|
|
653
653
|
o.startsWith("top") ? l = t : o.startsWith("bottom") && (l = -t);
|
|
654
|
-
const u =
|
|
654
|
+
const u = Ce(e, "arrow"), s = Ce(e, "shift");
|
|
655
655
|
if (u) {
|
|
656
|
-
const
|
|
657
|
-
o.startsWith("top") ? l +=
|
|
656
|
+
const n = ((d = u.params) == null ? void 0 : d.arrow).getBoundingClientRect();
|
|
657
|
+
o.startsWith("top") ? l += n.height / 2 : o.startsWith("bottom") && (l -= n.height / 2);
|
|
658
658
|
}
|
|
659
|
-
if (
|
|
660
|
-
let
|
|
661
|
-
|
|
662
|
-
const
|
|
663
|
-
f =
|
|
659
|
+
if (et(e, "shift") && u) {
|
|
660
|
+
let n = null, f = 0;
|
|
661
|
+
s && (n = (i = s.params) == null ? void 0 : i.parent);
|
|
662
|
+
const b = (c = u.params) == null ? void 0 : c.arrow;
|
|
663
|
+
f = b.getBoundingClientRect().height / 2, f += Wt(b), f -= t, o.startsWith("top") ? de(r - l, a, n, e) <= t ? de(r, a, n, e) >= 0 ? l = -(t - de(r, a, n, e)) : l = -t : ge(r - l + f, a, n, e) <= t && (l = t + ge(r - f, a, n, e), l <= t && (l = t)) : o.startsWith("bottom") ? de(r - l - f, a, n, e) <= t ? de(r - l - f, a, n, e) >= 0 ? (l = -t - (de(r - l - f, a, n, e) + t), n && (l = -t)) : l = -t : ge(r - l, a, n, e) <= t && (ge(r, a, n, e) >= 0 ? l = t - ge(r, a, n, e) : l = t) : de(r - l, a, n, e) <= t ? de(r - l, a, n, e) >= 0 ? l = -(t - de(r - l, a, n, e)) : l = -t : ge(r - l, a, n, e) <= t && (ge(r - l, a, n, e) >= 0 ? l = t - ge(r - l, a, n, e) : l = t);
|
|
664
664
|
}
|
|
665
665
|
return l;
|
|
666
666
|
}, Ve = (t) => ({
|
|
@@ -672,14 +672,14 @@ const Pt = (t, e) => t.strategy ? t.strategy : Rt(e) ? "fixed" : "absolute", me
|
|
|
672
672
|
options: o,
|
|
673
673
|
primaryX: a,
|
|
674
674
|
primaryY: d,
|
|
675
|
-
floating:
|
|
675
|
+
floating: i,
|
|
676
676
|
placement: c
|
|
677
677
|
}) => ({
|
|
678
|
-
x: e -
|
|
679
|
-
y: r -
|
|
678
|
+
x: e - tt(t, o, a, c, i),
|
|
679
|
+
y: r - ot(t, o, d, c, i),
|
|
680
680
|
placement: c
|
|
681
681
|
})
|
|
682
|
-
}),
|
|
682
|
+
}), Mt = (t) => ({
|
|
683
683
|
name: "shift",
|
|
684
684
|
params: t,
|
|
685
685
|
fn: ({
|
|
@@ -688,37 +688,37 @@ const Pt = (t, e) => t.strategy ? t.strategy : Rt(e) ? "fixed" : "absolute", me
|
|
|
688
688
|
options: o,
|
|
689
689
|
primaryX: a,
|
|
690
690
|
primaryY: d,
|
|
691
|
-
floating:
|
|
691
|
+
floating: i,
|
|
692
692
|
placement: c,
|
|
693
693
|
reference: l
|
|
694
694
|
}) => {
|
|
695
695
|
var u;
|
|
696
|
-
const
|
|
696
|
+
const s = {
|
|
697
697
|
x: e,
|
|
698
698
|
y: r,
|
|
699
699
|
placement: c
|
|
700
|
-
},
|
|
701
|
-
let
|
|
702
|
-
const
|
|
703
|
-
if (
|
|
704
|
-
const
|
|
705
|
-
|
|
706
|
-
const
|
|
707
|
-
return
|
|
700
|
+
}, n = o.middleware || [], f = n.findIndex((k) => k.name === "shift"), b = n.findIndex((k) => k.name === "offset"), v = b !== -1 && (f === -1 || b > f), w = n.find((k) => k.name === "offset"), C = w ? (u = w.params) == null ? void 0 : u.value : 0, $ = v ? tt(C, o, a, c, i) : 0, M = v ? ot(C, o, d, c, i) : 0, L = e - $, H = r - M;
|
|
701
|
+
let I = L, O = H;
|
|
702
|
+
const E = w ? Math.abs(C) : 0, F = E, p = E;
|
|
703
|
+
if (he(o, i) && typeof window < "u") {
|
|
704
|
+
const k = F, W = window.innerWidth - i.clientWidth - F, A = W < k ? k : W, X = p, te = window.innerHeight - i.clientHeight - p, j = te < X ? X : te;
|
|
705
|
+
I < k ? I = k : I > A && (I = A), O < X ? O = X : O > j && (O = j), v ? (s.x = e + (I - L), s.y = r + (O - H)) : (s.x = I, s.y = O);
|
|
706
|
+
const re = F, Q = window.innerWidth - i.clientWidth - F, se = p, x = window.innerHeight - i.clientHeight - p, K = v ? re + $ : re, N = v ? Q + $ : Q, oe = v ? se + M : se, g = v ? x + M : x;
|
|
707
|
+
return s.x < K ? s.x = K : s.x > N && (s.x = N), s.y < oe ? s.y = oe : s.y > g && (s.y = g), s;
|
|
708
708
|
}
|
|
709
|
-
const
|
|
710
|
-
if (
|
|
711
|
-
const
|
|
712
|
-
|
|
709
|
+
const m = be(i);
|
|
710
|
+
if (m !== null) {
|
|
711
|
+
const k = ie(l, i, o), W = k.left, A = k.left + k.width, X = k.top, te = k.top + k.height, j = m.scrollLeft + F, re = Re(m) - i.clientWidth - F, Q = re < j ? j : re, se = m.scrollTop + p, x = Pe(m) - i.clientHeight - p, K = x < se ? se : x, N = m.scrollLeft, oe = Re(m), g = m.scrollTop, B = Pe(m);
|
|
712
|
+
A <= N ? I = j : W >= oe && (I = Q), te <= g ? O = se : X >= B && (O = K), O < se ? O = se : O > K && (O = K), I < j ? I = j : I > Q && (I = Q);
|
|
713
713
|
}
|
|
714
|
-
if (v ? (
|
|
715
|
-
const
|
|
716
|
-
|
|
714
|
+
if (v ? (s.x = e + (I - L), s.y = r + (O - H)) : (s.x = I, s.y = O), m !== null) {
|
|
715
|
+
const k = m.scrollLeft + F, W = Re(m) - i.clientWidth - F, A = m.scrollTop + p, X = Pe(m) - i.clientHeight - p, te = v ? k + $ : k, j = v ? W + $ : W, re = v ? A + M : A, Q = v ? X + M : X;
|
|
716
|
+
s.x < te ? s.x = te : s.x > j && (s.x = j), s.y < re ? s.y = re : s.y > Q && (s.y = Q);
|
|
717
717
|
}
|
|
718
|
-
return
|
|
718
|
+
return s;
|
|
719
719
|
}
|
|
720
|
-
}), Dt = (t) => t.getBoundingClientRect().width !== t.clientWidth ? (t.getBoundingClientRect().width - t.clientWidth) / 2 : 0,
|
|
721
|
-
const r =
|
|
720
|
+
}), Dt = (t) => t.getBoundingClientRect().width !== t.clientWidth ? (t.getBoundingClientRect().width - t.clientWidth) / 2 : 0, Wt = (t) => t.getBoundingClientRect().height !== t.clientHeight ? (t.getBoundingClientRect().height - t.clientHeight) / 2 : 0, Le = (t, e) => {
|
|
721
|
+
const r = be(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));
|
|
@@ -732,14 +732,14 @@ const Pt = (t, e) => t.strategy ? t.strategy : Rt(e) ? "fixed" : "absolute", me
|
|
|
732
732
|
a.observe(t), o.push(() => a.disconnect());
|
|
733
733
|
}
|
|
734
734
|
return () => o.forEach((a) => a());
|
|
735
|
-
},
|
|
735
|
+
}, At = (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
|
+
}, Et = (t, e, r = {}) => {
|
|
743
743
|
const o = ie(t, e, r);
|
|
744
744
|
return {
|
|
745
745
|
x: o.left,
|
|
@@ -753,21 +753,21 @@ const Pt = (t, e) => t.strategy ? t.strategy : Rt(e) ? "fixed" : "absolute", me
|
|
|
753
753
|
y: o.top - e.getBoundingClientRect().height,
|
|
754
754
|
placement: "top-end"
|
|
755
755
|
};
|
|
756
|
-
},
|
|
756
|
+
}, Kt = (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
|
+
}, Nt = (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
|
+
}, Gt = (t, e, r = {}) => {
|
|
771
771
|
const o = ie(t, e, r);
|
|
772
772
|
return {
|
|
773
773
|
x: o.left + o.width,
|
|
@@ -781,67 +781,67 @@ const Pt = (t, e) => t.strategy ? t.strategy : Rt(e) ? "fixed" : "absolute", me
|
|
|
781
781
|
y: o.top + o.height,
|
|
782
782
|
placement: "bottom"
|
|
783
783
|
};
|
|
784
|
-
},
|
|
784
|
+
}, jt = (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
|
+
}, Xt = (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
|
+
}, qt = (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
|
+
}, Ut = (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
|
+
}, Zt = (t, e, r = {}) => {
|
|
813
813
|
const o = ie(t, e, r);
|
|
814
814
|
return {
|
|
815
815
|
x: o.left - e.getBoundingClientRect().width,
|
|
816
816
|
y: o.top + o.height - e.getBoundingClientRect().height,
|
|
817
817
|
placement: "left-end"
|
|
818
818
|
};
|
|
819
|
-
},
|
|
819
|
+
}, Ie = (t, e, r, o = {}) => {
|
|
820
820
|
switch (r) {
|
|
821
821
|
case "top":
|
|
822
|
-
return
|
|
822
|
+
return At(t, e, o);
|
|
823
823
|
case "top-start":
|
|
824
|
-
return
|
|
824
|
+
return Et(t, e, o);
|
|
825
825
|
case "top-end":
|
|
826
826
|
return Ht(t, e, o);
|
|
827
827
|
case "right":
|
|
828
|
-
return At(t, e, o);
|
|
829
|
-
case "right-start":
|
|
830
828
|
return Kt(t, e, o);
|
|
831
|
-
case "right-
|
|
829
|
+
case "right-start":
|
|
832
830
|
return Nt(t, e, o);
|
|
831
|
+
case "right-end":
|
|
832
|
+
return Gt(t, e, o);
|
|
833
833
|
case "bottom":
|
|
834
834
|
return Yt(t, e, o);
|
|
835
835
|
case "bottom-start":
|
|
836
|
-
return Gt(t, e, o);
|
|
837
|
-
case "bottom-end":
|
|
838
836
|
return jt(t, e, o);
|
|
839
|
-
case "
|
|
837
|
+
case "bottom-end":
|
|
840
838
|
return Xt(t, e, o);
|
|
841
|
-
case "left
|
|
839
|
+
case "left":
|
|
842
840
|
return qt(t, e, o);
|
|
843
|
-
case "left-
|
|
841
|
+
case "left-start":
|
|
844
842
|
return Ut(t, e, o);
|
|
843
|
+
case "left-end":
|
|
844
|
+
return Zt(t, e, o);
|
|
845
845
|
default:
|
|
846
846
|
return {
|
|
847
847
|
x: 0,
|
|
@@ -849,25 +849,25 @@ const Pt = (t, e) => t.strategy ? t.strategy : Rt(e) ? "fixed" : "absolute", me
|
|
|
849
849
|
placement: ""
|
|
850
850
|
};
|
|
851
851
|
}
|
|
852
|
-
},
|
|
853
|
-
if (
|
|
852
|
+
}, Jt = (t, e, r, o = {}) => {
|
|
853
|
+
if (he(o, e)) {
|
|
854
854
|
if (typeof window > "u")
|
|
855
855
|
return !0;
|
|
856
|
-
const
|
|
857
|
-
return
|
|
856
|
+
const n = t.x, f = t.y, b = n + e.clientWidth, v = f + e.clientHeight;
|
|
857
|
+
return n >= 0 && f >= 0 && b <= window.innerWidth && v <= window.innerHeight;
|
|
858
858
|
}
|
|
859
|
-
if (
|
|
860
|
-
return de(t.y, e, null, o) > 0 && ce(t.x, e, null, o) > 0 &&
|
|
859
|
+
if (be(r) !== null)
|
|
860
|
+
return de(t.y, e, null, o) > 0 && ce(t.x, e, null, o) > 0 && ge(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, d = window.innerHeight,
|
|
864
|
-
if (
|
|
865
|
-
const
|
|
866
|
-
return f >= 0 &&
|
|
867
|
-
}
|
|
868
|
-
const c = t.x, l = t.y, u = c + e.clientWidth,
|
|
869
|
-
return c >= 0 && l >= 0 && u <= a &&
|
|
870
|
-
}, ze = (t) => t.startsWith("right") ? "right" : t.startsWith("left") ? "left" : t.startsWith("top") ? "top" : "bottom",
|
|
863
|
+
const a = window.innerWidth, d = window.innerHeight, i = (r instanceof HTMLElement ? r.offsetParent : null) || e.offsetParent;
|
|
864
|
+
if (i) {
|
|
865
|
+
const n = i.getBoundingClientRect(), f = n.left + t.x, b = n.top + t.y, v = f + e.clientWidth, w = b + e.clientHeight;
|
|
866
|
+
return f >= 0 && b >= 0 && v <= a && w <= d;
|
|
867
|
+
}
|
|
868
|
+
const c = t.x, l = t.y, u = c + e.clientWidth, s = l + e.clientHeight;
|
|
869
|
+
return c >= 0 && l >= 0 && u <= a && s <= d;
|
|
870
|
+
}, ze = (t) => t.startsWith("right") ? "right" : t.startsWith("left") ? "left" : t.startsWith("top") ? "top" : "bottom", Qt = (t, e, r) => ze(e) === t && r.includes(e) ? e : r.find((o) => ze(o) === t) ?? r[0], eo = (t, e, r = {}) => {
|
|
871
871
|
if (typeof window > "u")
|
|
872
872
|
return {
|
|
873
873
|
top: 0,
|
|
@@ -875,7 +875,7 @@ const Pt = (t, e) => t.strategy ? t.strategy : Rt(e) ? "fixed" : "absolute", me
|
|
|
875
875
|
bottom: 0,
|
|
876
876
|
left: 0
|
|
877
877
|
};
|
|
878
|
-
const o =
|
|
878
|
+
const o = he(r, e) ? null : be(t), a = t.getBoundingClientRect(), d = o ? o.getBoundingClientRect() : {
|
|
879
879
|
top: 0,
|
|
880
880
|
left: 0,
|
|
881
881
|
right: window.innerWidth,
|
|
@@ -889,37 +889,37 @@ const Pt = (t, e) => t.strategy ? t.strategy : Rt(e) ? "fixed" : "absolute", me
|
|
|
889
889
|
};
|
|
890
890
|
}, Te = (t, e, r = {}) => new Promise((o) => {
|
|
891
891
|
var a, d;
|
|
892
|
-
const
|
|
892
|
+
const i = r.placement ? r.placement : "bottom", c = {
|
|
893
893
|
x: 0,
|
|
894
894
|
y: 0,
|
|
895
|
-
placement:
|
|
895
|
+
placement: i,
|
|
896
896
|
middlewareData: {}
|
|
897
|
-
}, l =
|
|
897
|
+
}, l = Ie(t, e, i, r);
|
|
898
898
|
c.x = l.x, c.y = l.y, c.placement = l.placement;
|
|
899
|
-
const u = c.x,
|
|
900
|
-
(a = r.middleware) == null || a.forEach((
|
|
901
|
-
const
|
|
899
|
+
const u = c.x, s = c.y, n = Ot(t);
|
|
900
|
+
(a = r.middleware) == null || a.forEach((w) => {
|
|
901
|
+
const C = w.fn({
|
|
902
902
|
x: c.x,
|
|
903
903
|
y: c.y,
|
|
904
904
|
options: r,
|
|
905
905
|
primaryX: u,
|
|
906
|
-
primaryY:
|
|
906
|
+
primaryY: s,
|
|
907
907
|
floating: e,
|
|
908
908
|
placement: c.placement,
|
|
909
909
|
reference: t,
|
|
910
|
-
scrollDirection:
|
|
910
|
+
scrollDirection: n
|
|
911
911
|
});
|
|
912
|
-
c.x =
|
|
912
|
+
c.x = C.x, c.y = C.y, c.placement = C.placement, w.name === "arrow" && (C.baseX = C.x, C.baseY = C.y, C.x = C.arrowX ?? C.x, C.y = C.arrowY ?? C.y), c.middlewareData[w.name] = C;
|
|
913
913
|
});
|
|
914
|
-
const f =
|
|
914
|
+
const f = Ie(t, e, c.placement, r), b = Ce(r, "offset"), v = b ? (d = b.params) == null ? void 0 : d.value : 0;
|
|
915
915
|
if (Number.isFinite(c.x) || (c.x = f.x), !Number.isFinite(c.y))
|
|
916
|
-
if (
|
|
917
|
-
const
|
|
918
|
-
c.placement.startsWith("top") ? c.y =
|
|
916
|
+
if (he(r, e)) {
|
|
917
|
+
const w = t.getBoundingClientRect(), C = e.getBoundingClientRect().height;
|
|
918
|
+
c.placement.startsWith("top") ? c.y = w.top - C - v : c.placement.startsWith("bottom") ? c.y = w.bottom + v : c.y = f.y;
|
|
919
919
|
} else
|
|
920
920
|
c.y = f.y;
|
|
921
921
|
o(c);
|
|
922
|
-
}),
|
|
922
|
+
}), to = ["disabled", "aria-expanded", "onKeydown"], oo = ["data-placement"], ao = ["disabled", "aria-selected", "onClick"], gr = /* @__PURE__ */ Y({
|
|
923
923
|
__name: "select",
|
|
924
924
|
props: {
|
|
925
925
|
modelValue: { default: void 0 },
|
|
@@ -934,139 +934,139 @@ const Pt = (t, e) => t.strategy ? t.strategy : Rt(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, d =
|
|
937
|
+
const o = e, a = t, d = D(null), i = D(null), c = D(null), l = D(!1), u = D("bottom"), s = D("bottom"), n = `vf-select-panel-${++r}`;
|
|
938
938
|
let f = null;
|
|
939
|
-
const
|
|
940
|
-
label:
|
|
941
|
-
value:
|
|
942
|
-
disabled:
|
|
943
|
-
}))), v =
|
|
944
|
-
var
|
|
945
|
-
return ((
|
|
946
|
-
}),
|
|
947
|
-
const
|
|
948
|
-
return a.size !== "normal" &&
|
|
949
|
-
}),
|
|
950
|
-
|
|
951
|
-
},
|
|
952
|
-
l.value = !1, u.value = "bottom",
|
|
953
|
-
},
|
|
954
|
-
a.disabled || (l.value = !l.value, l.value && (u.value = "bottom",
|
|
955
|
-
},
|
|
956
|
-
var
|
|
957
|
-
l.value || (l.value = !0, await
|
|
958
|
-
},
|
|
959
|
-
var
|
|
939
|
+
const b = y(() => a.options.map((m) => ({
|
|
940
|
+
label: m[a.optionLabel],
|
|
941
|
+
value: m[a.optionValue],
|
|
942
|
+
disabled: m.disabled
|
|
943
|
+
}))), v = y(() => b.value.find((m) => m.value === a.modelValue)), w = y(() => {
|
|
944
|
+
var m;
|
|
945
|
+
return ((m = v.value) == null ? void 0 : m.label) ?? "";
|
|
946
|
+
}), C = y(() => {
|
|
947
|
+
const m = ["vf-select", `vf-select_${a.variant}`, l.value ? "vf-select_open" : ""];
|
|
948
|
+
return a.size !== "normal" && m.push(`vf-select_${a.size}`), a.disabled && m.push("vf-select_disabled"), m.filter(Boolean);
|
|
949
|
+
}), $ = (m) => m.value === a.modelValue, M = (m) => {
|
|
950
|
+
m.disabled || (o("update:modelValue", m.value), o("change", m.value), I());
|
|
951
|
+
}, L = (m) => o("focus", m), H = (m) => o("blur", m), I = () => {
|
|
952
|
+
l.value = !1, u.value = "bottom", s.value = "bottom";
|
|
953
|
+
}, O = () => {
|
|
954
|
+
a.disabled || (l.value = !l.value, l.value && (u.value = "bottom", s.value = "bottom"));
|
|
955
|
+
}, E = async () => {
|
|
956
|
+
var m, k;
|
|
957
|
+
l.value || (l.value = !0, await ke()), (k = (m = c.value) == null ? void 0 : m.querySelector(".vf-select__option:not(.is-disabled)")) == null || k.focus();
|
|
958
|
+
}, F = (m) => {
|
|
959
|
+
var W;
|
|
960
960
|
if (!l.value || !d.value)
|
|
961
961
|
return;
|
|
962
|
-
const
|
|
963
|
-
d.value.contains(
|
|
964
|
-
},
|
|
965
|
-
if (!
|
|
962
|
+
const k = m.target;
|
|
963
|
+
d.value.contains(k) || (W = c.value) != null && W.contains(k) || I();
|
|
964
|
+
}, p = () => {
|
|
965
|
+
if (!i.value || !c.value)
|
|
966
966
|
return;
|
|
967
|
-
const
|
|
967
|
+
const m = i.value, k = c.value, W = async () => {
|
|
968
968
|
const {
|
|
969
|
-
x:
|
|
970
|
-
y:
|
|
971
|
-
placement:
|
|
972
|
-
} = await Te(
|
|
969
|
+
x: j,
|
|
970
|
+
y: re,
|
|
971
|
+
placement: Q
|
|
972
|
+
} = await Te(m, k, {
|
|
973
973
|
placement: u.value,
|
|
974
974
|
strategy: "fixed",
|
|
975
975
|
middleware: [Ve(2), Se({ placements: ["bottom", "top"] })]
|
|
976
976
|
});
|
|
977
|
-
|
|
978
|
-
},
|
|
979
|
-
await
|
|
980
|
-
}, X = Le(
|
|
981
|
-
|
|
982
|
-
}),
|
|
983
|
-
|
|
977
|
+
s.value = Q ?? u.value, k.style.minWidth = `${m.getBoundingClientRect().width}px`, k.style.left = `${j}px`, k.style.top = `${re}px`;
|
|
978
|
+
}, A = async () => {
|
|
979
|
+
await W();
|
|
980
|
+
}, X = Le(m, () => {
|
|
981
|
+
A();
|
|
982
|
+
}), te = () => {
|
|
983
|
+
A();
|
|
984
984
|
};
|
|
985
|
-
document.addEventListener("scroll",
|
|
986
|
-
update:
|
|
985
|
+
document.addEventListener("scroll", te, !0), window.addEventListener("resize", te, !1), f = {
|
|
986
|
+
update: A,
|
|
987
987
|
destroy: () => {
|
|
988
|
-
X(), document.removeEventListener("scroll",
|
|
988
|
+
X(), document.removeEventListener("scroll", te, !0), window.removeEventListener("resize", te, !1);
|
|
989
989
|
}
|
|
990
990
|
}, f.update();
|
|
991
991
|
};
|
|
992
|
-
return
|
|
993
|
-
if (!
|
|
992
|
+
return ee(l, async (m) => {
|
|
993
|
+
if (!m) {
|
|
994
994
|
f && (f.destroy(), f = null);
|
|
995
995
|
return;
|
|
996
996
|
}
|
|
997
|
-
await
|
|
998
|
-
}),
|
|
997
|
+
await ke(), f || p(), f == null || f.update();
|
|
998
|
+
}), ee(
|
|
999
999
|
() => a.options,
|
|
1000
1000
|
() => {
|
|
1001
1001
|
f == null || f.update();
|
|
1002
1002
|
},
|
|
1003
1003
|
{ deep: !0 }
|
|
1004
1004
|
), Fe(() => {
|
|
1005
|
-
document.addEventListener("click",
|
|
1005
|
+
document.addEventListener("click", F);
|
|
1006
1006
|
}), we(() => {
|
|
1007
|
-
document.removeEventListener("click",
|
|
1008
|
-
}), (
|
|
1007
|
+
document.removeEventListener("click", F), f == null || f.destroy(), f = null;
|
|
1008
|
+
}), (m, k) => (h(), _("div", {
|
|
1009
1009
|
ref_key: "root",
|
|
1010
1010
|
ref: d,
|
|
1011
|
-
class:
|
|
1011
|
+
class: T(C.value)
|
|
1012
1012
|
}, [
|
|
1013
|
-
|
|
1013
|
+
z("button", {
|
|
1014
1014
|
ref_key: "trigger",
|
|
1015
|
-
ref:
|
|
1015
|
+
ref: i,
|
|
1016
1016
|
class: "vf-select__control",
|
|
1017
1017
|
type: "button",
|
|
1018
|
-
disabled:
|
|
1018
|
+
disabled: m.disabled,
|
|
1019
1019
|
"aria-expanded": l.value,
|
|
1020
|
-
"aria-controls":
|
|
1020
|
+
"aria-controls": n,
|
|
1021
1021
|
"aria-haspopup": "listbox",
|
|
1022
|
-
onClick:
|
|
1022
|
+
onClick: O,
|
|
1023
1023
|
onKeydown: [
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1024
|
+
Z(q(E, ["prevent"]), ["down"]),
|
|
1025
|
+
Z(q(O, ["prevent"]), ["enter"]),
|
|
1026
|
+
Z(q(I, ["prevent"]), ["esc"])
|
|
1027
1027
|
],
|
|
1028
|
-
onFocus:
|
|
1028
|
+
onFocus: L,
|
|
1029
1029
|
onBlur: H
|
|
1030
1030
|
}, [
|
|
1031
|
-
|
|
1032
|
-
class:
|
|
1033
|
-
},
|
|
1034
|
-
|
|
1031
|
+
z("span", {
|
|
1032
|
+
class: T(["vf-select__label", { "vf-select__label_placeholder": !w.value }])
|
|
1033
|
+
}, R(w.value || m.placeholder), 3),
|
|
1034
|
+
k[0] || (k[0] = z("span", {
|
|
1035
1035
|
class: "vf-select__chevron",
|
|
1036
1036
|
"aria-hidden": "true"
|
|
1037
1037
|
}, "▾", -1))
|
|
1038
|
-
], 40,
|
|
1039
|
-
(
|
|
1040
|
-
|
|
1041
|
-
id:
|
|
1038
|
+
], 40, to),
|
|
1039
|
+
(h(), ne($e, { to: "body" }, [
|
|
1040
|
+
fe(z("div", {
|
|
1041
|
+
id: n,
|
|
1042
1042
|
ref_key: "panel",
|
|
1043
1043
|
ref: c,
|
|
1044
1044
|
class: "vf-select__panel",
|
|
1045
1045
|
role: "listbox",
|
|
1046
|
-
"data-placement":
|
|
1046
|
+
"data-placement": s.value
|
|
1047
1047
|
}, [
|
|
1048
|
-
(
|
|
1049
|
-
key:
|
|
1050
|
-
class:
|
|
1048
|
+
(h(!0), _(ae, null, ve(b.value, (W) => (h(), _("button", {
|
|
1049
|
+
key: W.value,
|
|
1050
|
+
class: T(["vf-select__option", { "is-active": $(W), "is-disabled": W.disabled }]),
|
|
1051
1051
|
type: "button",
|
|
1052
1052
|
role: "option",
|
|
1053
|
-
disabled:
|
|
1054
|
-
"aria-selected":
|
|
1055
|
-
onClick: (
|
|
1056
|
-
},
|
|
1057
|
-
], 8,
|
|
1058
|
-
[
|
|
1053
|
+
disabled: W.disabled,
|
|
1054
|
+
"aria-selected": $(W),
|
|
1055
|
+
onClick: (A) => M(W)
|
|
1056
|
+
}, R(W.label), 11, ao))), 128))
|
|
1057
|
+
], 8, oo), [
|
|
1058
|
+
[pe, l.value]
|
|
1059
1059
|
])
|
|
1060
1060
|
]))
|
|
1061
1061
|
], 2));
|
|
1062
1062
|
}
|
|
1063
|
-
}),
|
|
1063
|
+
}), ro = ["value", "placeholder", "disabled", "readonly", "aria-expanded", "aria-activedescendant", "onKeydown"], lo = ["disabled"], no = ["data-placement"], so = {
|
|
1064
1064
|
key: 0,
|
|
1065
1065
|
class: "vf-autocomplete__loading"
|
|
1066
|
-
},
|
|
1066
|
+
}, io = ["id", "disabled", "aria-selected", "onClick"], co = {
|
|
1067
1067
|
key: 2,
|
|
1068
1068
|
class: "vf-autocomplete__empty"
|
|
1069
|
-
},
|
|
1069
|
+
}, mr = /* @__PURE__ */ Y({
|
|
1070
1070
|
__name: "autocomplete",
|
|
1071
1071
|
props: {
|
|
1072
1072
|
modelValue: { default: void 0 },
|
|
@@ -1086,221 +1086,221 @@ const Pt = (t, e) => t.strategy ? t.strategy : Rt(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, d =
|
|
1089
|
+
const o = e, a = t, d = D(null), i = D(null), c = D(null), l = D(!1), u = D(""), s = D(-1), n = D("bottom"), f = D("bottom"), b = `vf-autocomplete-panel-${++r}`;
|
|
1090
1090
|
let v = null;
|
|
1091
|
-
const
|
|
1092
|
-
label:
|
|
1093
|
-
value:
|
|
1094
|
-
disabled:
|
|
1095
|
-
}))),
|
|
1091
|
+
const w = y(() => a.options.map((x) => ({
|
|
1092
|
+
label: x[a.optionLabel],
|
|
1093
|
+
value: x[a.optionValue],
|
|
1094
|
+
disabled: x.disabled
|
|
1095
|
+
}))), C = y(() => w.value.find((x) => x.value === a.modelValue)), $ = y(() => {
|
|
1096
1096
|
if (!a.filter)
|
|
1097
|
-
return
|
|
1098
|
-
const
|
|
1099
|
-
return
|
|
1100
|
-
}), M =
|
|
1101
|
-
if (!(!l.value ||
|
|
1102
|
-
return H(
|
|
1103
|
-
}),
|
|
1104
|
-
const
|
|
1105
|
-
return a.size !== "normal" &&
|
|
1106
|
-
}), H = (
|
|
1107
|
-
const
|
|
1108
|
-
if (!
|
|
1109
|
-
|
|
1097
|
+
return w.value;
|
|
1098
|
+
const x = u.value.trim().toLowerCase();
|
|
1099
|
+
return x ? w.value.filter((K) => K.label.toLowerCase().includes(x)) : w.value;
|
|
1100
|
+
}), M = y(() => {
|
|
1101
|
+
if (!(!l.value || s.value < 0))
|
|
1102
|
+
return H(s.value);
|
|
1103
|
+
}), L = y(() => {
|
|
1104
|
+
const x = ["vf-autocomplete", `vf-autocomplete_${a.variant}`, l.value ? "vf-autocomplete_open" : ""];
|
|
1105
|
+
return a.size !== "normal" && x.push(`vf-autocomplete_${a.size}`), a.disabled && x.push("vf-autocomplete_disabled"), x.filter(Boolean);
|
|
1106
|
+
}), H = (x) => `${b}-option-${x}`, I = (x) => x.value === a.modelValue, O = () => $.value.findIndex((x) => !x.disabled), E = (x) => {
|
|
1107
|
+
const K = $.value;
|
|
1108
|
+
if (!K.length) {
|
|
1109
|
+
s.value = -1;
|
|
1110
1110
|
return;
|
|
1111
1111
|
}
|
|
1112
|
-
let
|
|
1113
|
-
(
|
|
1114
|
-
for (let
|
|
1115
|
-
if (
|
|
1116
|
-
|
|
1112
|
+
let N = s.value;
|
|
1113
|
+
(N < 0 || N >= K.length) && (N = x > 0 ? -1 : K.length);
|
|
1114
|
+
for (let oe = 0; oe < K.length; oe += 1)
|
|
1115
|
+
if (N = (N + x + K.length) % K.length, !K[N].disabled) {
|
|
1116
|
+
s.value = N;
|
|
1117
1117
|
return;
|
|
1118
1118
|
}
|
|
1119
|
-
|
|
1120
|
-
},
|
|
1121
|
-
a.disabled || (l.value = !0,
|
|
1122
|
-
},
|
|
1123
|
-
l.value = !1,
|
|
1124
|
-
},
|
|
1119
|
+
s.value = -1;
|
|
1120
|
+
}, F = () => {
|
|
1121
|
+
a.disabled || (l.value = !0, n.value = "bottom", f.value = "bottom", s.value < 0 && (s.value = O()));
|
|
1122
|
+
}, p = () => {
|
|
1123
|
+
l.value = !1, s.value = -1, n.value = "bottom", f.value = "bottom";
|
|
1124
|
+
}, m = () => {
|
|
1125
1125
|
if (l.value) {
|
|
1126
|
-
|
|
1126
|
+
p();
|
|
1127
1127
|
return;
|
|
1128
1128
|
}
|
|
1129
|
-
|
|
1130
|
-
},
|
|
1131
|
-
|
|
1132
|
-
},
|
|
1133
|
-
const
|
|
1134
|
-
u.value =
|
|
1135
|
-
},
|
|
1136
|
-
o("focus",
|
|
1137
|
-
}, X = (
|
|
1138
|
-
o("blur",
|
|
1139
|
-
},
|
|
1129
|
+
F();
|
|
1130
|
+
}, k = (x) => {
|
|
1131
|
+
x.disabled || (u.value = x.label, o("update:modelValue", x.value), o("change", x.value), p());
|
|
1132
|
+
}, W = (x) => {
|
|
1133
|
+
const K = x.target;
|
|
1134
|
+
u.value = K.value, o("search", K.value), F(), s.value = O();
|
|
1135
|
+
}, A = (x) => {
|
|
1136
|
+
o("focus", x), F();
|
|
1137
|
+
}, X = (x) => {
|
|
1138
|
+
o("blur", x);
|
|
1139
|
+
}, te = () => {
|
|
1140
1140
|
if (!l.value) {
|
|
1141
|
-
|
|
1141
|
+
F();
|
|
1142
1142
|
return;
|
|
1143
1143
|
}
|
|
1144
|
-
|
|
1145
|
-
},
|
|
1144
|
+
E(1);
|
|
1145
|
+
}, j = () => {
|
|
1146
1146
|
if (!l.value) {
|
|
1147
|
-
|
|
1147
|
+
F();
|
|
1148
1148
|
return;
|
|
1149
1149
|
}
|
|
1150
|
-
|
|
1151
|
-
},
|
|
1150
|
+
E(-1);
|
|
1151
|
+
}, re = () => {
|
|
1152
1152
|
if (!l.value) {
|
|
1153
|
-
|
|
1153
|
+
F();
|
|
1154
1154
|
return;
|
|
1155
1155
|
}
|
|
1156
|
-
const
|
|
1157
|
-
|
|
1158
|
-
},
|
|
1159
|
-
var
|
|
1156
|
+
const x = $.value[s.value];
|
|
1157
|
+
x && !x.disabled && k(x);
|
|
1158
|
+
}, Q = (x) => {
|
|
1159
|
+
var N;
|
|
1160
1160
|
if (!l.value || !d.value)
|
|
1161
1161
|
return;
|
|
1162
|
-
const
|
|
1163
|
-
d.value.contains(
|
|
1164
|
-
},
|
|
1165
|
-
if (!
|
|
1162
|
+
const K = x.target;
|
|
1163
|
+
d.value.contains(K) || (N = c.value) != null && N.contains(K) || p();
|
|
1164
|
+
}, se = () => {
|
|
1165
|
+
if (!i.value || !c.value)
|
|
1166
1166
|
return;
|
|
1167
|
-
const
|
|
1167
|
+
const x = i.value, K = c.value, N = async () => {
|
|
1168
1168
|
const {
|
|
1169
|
-
x:
|
|
1170
|
-
y:
|
|
1171
|
-
placement:
|
|
1172
|
-
} = await Te(
|
|
1173
|
-
placement:
|
|
1169
|
+
x: S,
|
|
1170
|
+
y: G,
|
|
1171
|
+
placement: le
|
|
1172
|
+
} = await Te(x, K, {
|
|
1173
|
+
placement: n.value,
|
|
1174
1174
|
strategy: "fixed",
|
|
1175
1175
|
middleware: [Ve(2), Se({ placements: ["bottom", "top"] })]
|
|
1176
1176
|
});
|
|
1177
|
-
f.value =
|
|
1178
|
-
},
|
|
1179
|
-
await
|
|
1180
|
-
},
|
|
1181
|
-
|
|
1182
|
-
}),
|
|
1183
|
-
|
|
1177
|
+
f.value = le ?? n.value, K.style.minWidth = `${x.getBoundingClientRect().width}px`, K.style.left = `${S}px`, K.style.top = `${G}px`;
|
|
1178
|
+
}, oe = async () => {
|
|
1179
|
+
await N();
|
|
1180
|
+
}, g = Le(x, () => {
|
|
1181
|
+
oe();
|
|
1182
|
+
}), B = () => {
|
|
1183
|
+
oe();
|
|
1184
1184
|
};
|
|
1185
|
-
document.addEventListener("scroll",
|
|
1186
|
-
update:
|
|
1185
|
+
document.addEventListener("scroll", B, !0), window.addEventListener("resize", B, !1), v = {
|
|
1186
|
+
update: oe,
|
|
1187
1187
|
destroy: () => {
|
|
1188
|
-
|
|
1188
|
+
g(), document.removeEventListener("scroll", B, !0), window.removeEventListener("resize", B, !1);
|
|
1189
1189
|
}
|
|
1190
1190
|
}, v.update();
|
|
1191
1191
|
};
|
|
1192
|
-
return
|
|
1192
|
+
return ee(
|
|
1193
1193
|
() => a.modelValue,
|
|
1194
1194
|
() => {
|
|
1195
|
-
var
|
|
1196
|
-
u.value = ((
|
|
1195
|
+
var x;
|
|
1196
|
+
u.value = ((x = C.value) == null ? void 0 : x.label) ?? "";
|
|
1197
1197
|
},
|
|
1198
1198
|
{ immediate: !0 }
|
|
1199
|
-
),
|
|
1199
|
+
), ee(
|
|
1200
1200
|
() => a.options,
|
|
1201
1201
|
() => {
|
|
1202
|
-
var
|
|
1203
|
-
l.value || (u.value = ((
|
|
1202
|
+
var x;
|
|
1203
|
+
l.value || (u.value = ((x = C.value) == null ? void 0 : x.label) ?? ""), v == null || v.update();
|
|
1204
1204
|
},
|
|
1205
1205
|
{ deep: !0 }
|
|
1206
|
-
),
|
|
1207
|
-
|
|
1208
|
-
}),
|
|
1209
|
-
if (!
|
|
1206
|
+
), ee($, () => {
|
|
1207
|
+
s.value >= $.value.length && (s.value = O());
|
|
1208
|
+
}), ee(l, async (x) => {
|
|
1209
|
+
if (!x) {
|
|
1210
1210
|
v && (v.destroy(), v = null);
|
|
1211
1211
|
return;
|
|
1212
1212
|
}
|
|
1213
|
-
await
|
|
1213
|
+
await ke(), v || se(), v == null || v.update();
|
|
1214
1214
|
}), Fe(() => {
|
|
1215
|
-
document.addEventListener("click",
|
|
1215
|
+
document.addEventListener("click", Q);
|
|
1216
1216
|
}), we(() => {
|
|
1217
|
-
document.removeEventListener("click",
|
|
1218
|
-
}), (
|
|
1217
|
+
document.removeEventListener("click", Q), v == null || v.destroy(), v = null;
|
|
1218
|
+
}), (x, K) => (h(), _("div", {
|
|
1219
1219
|
ref_key: "root",
|
|
1220
1220
|
ref: d,
|
|
1221
|
-
class:
|
|
1221
|
+
class: T(L.value)
|
|
1222
1222
|
}, [
|
|
1223
|
-
|
|
1223
|
+
z("input", {
|
|
1224
1224
|
ref_key: "control",
|
|
1225
|
-
ref:
|
|
1225
|
+
ref: i,
|
|
1226
1226
|
class: "vf-autocomplete__control",
|
|
1227
1227
|
type: "text",
|
|
1228
1228
|
role: "combobox",
|
|
1229
1229
|
value: u.value,
|
|
1230
|
-
placeholder:
|
|
1231
|
-
disabled:
|
|
1232
|
-
readonly:
|
|
1230
|
+
placeholder: x.placeholder,
|
|
1231
|
+
disabled: x.disabled,
|
|
1232
|
+
readonly: x.readonly,
|
|
1233
1233
|
"aria-expanded": l.value,
|
|
1234
1234
|
"aria-autocomplete": "list",
|
|
1235
|
-
"aria-controls":
|
|
1235
|
+
"aria-controls": b,
|
|
1236
1236
|
"aria-activedescendant": M.value,
|
|
1237
|
-
onInput:
|
|
1238
|
-
onFocus:
|
|
1237
|
+
onInput: W,
|
|
1238
|
+
onFocus: A,
|
|
1239
1239
|
onBlur: X,
|
|
1240
|
-
onClick:
|
|
1240
|
+
onClick: F,
|
|
1241
1241
|
onKeydown: [
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1242
|
+
Z(q(te, ["prevent"]), ["down"]),
|
|
1243
|
+
Z(q(j, ["prevent"]), ["up"]),
|
|
1244
|
+
Z(q(re, ["prevent"]), ["enter"]),
|
|
1245
|
+
Z(q(p, ["prevent"]), ["esc"]),
|
|
1246
|
+
Z(p, ["tab"])
|
|
1247
1247
|
]
|
|
1248
|
-
}, null, 40,
|
|
1249
|
-
|
|
1248
|
+
}, null, 40, ro),
|
|
1249
|
+
z("button", {
|
|
1250
1250
|
class: "vf-autocomplete__chevron",
|
|
1251
1251
|
type: "button",
|
|
1252
|
-
disabled:
|
|
1252
|
+
disabled: x.disabled,
|
|
1253
1253
|
"aria-hidden": "true",
|
|
1254
1254
|
tabindex: "-1",
|
|
1255
|
-
onMousedown:
|
|
1255
|
+
onMousedown: K[0] || (K[0] = q(() => {
|
|
1256
1256
|
}, ["prevent"])),
|
|
1257
|
-
onClick:
|
|
1258
|
-
}, " ▾ ", 40,
|
|
1259
|
-
(
|
|
1260
|
-
|
|
1261
|
-
id:
|
|
1257
|
+
onClick: m
|
|
1258
|
+
}, " ▾ ", 40, lo),
|
|
1259
|
+
(h(), ne($e, { to: "body" }, [
|
|
1260
|
+
fe(z("div", {
|
|
1261
|
+
id: b,
|
|
1262
1262
|
ref_key: "panel",
|
|
1263
1263
|
ref: c,
|
|
1264
1264
|
class: "vf-autocomplete__panel",
|
|
1265
1265
|
role: "listbox",
|
|
1266
1266
|
"data-placement": f.value
|
|
1267
1267
|
}, [
|
|
1268
|
-
|
|
1269
|
-
id: H(
|
|
1270
|
-
key:
|
|
1271
|
-
class:
|
|
1272
|
-
"is-active":
|
|
1273
|
-
"is-disabled":
|
|
1274
|
-
"is-highlighted":
|
|
1268
|
+
x.loading ? (h(), _("div", so, R(x.loadingText), 1)) : $.value.length > 0 ? (h(!0), _(ae, { key: 1 }, ve($.value, (N, oe) => (h(), _("button", {
|
|
1269
|
+
id: H(oe),
|
|
1270
|
+
key: N.value,
|
|
1271
|
+
class: T(["vf-autocomplete__option", {
|
|
1272
|
+
"is-active": I(N),
|
|
1273
|
+
"is-disabled": N.disabled,
|
|
1274
|
+
"is-highlighted": oe === s.value
|
|
1275
1275
|
}]),
|
|
1276
1276
|
type: "button",
|
|
1277
1277
|
role: "option",
|
|
1278
|
-
disabled:
|
|
1279
|
-
"aria-selected":
|
|
1280
|
-
onMousedown:
|
|
1278
|
+
disabled: N.disabled,
|
|
1279
|
+
"aria-selected": I(N),
|
|
1280
|
+
onMousedown: K[1] || (K[1] = q(() => {
|
|
1281
1281
|
}, ["prevent"])),
|
|
1282
|
-
onClick: (
|
|
1283
|
-
},
|
|
1284
|
-
], 8,
|
|
1285
|
-
[
|
|
1282
|
+
onClick: (g) => k(N)
|
|
1283
|
+
}, R(N.label), 43, io))), 128)) : (h(), _("div", co, R(x.emptyText), 1))
|
|
1284
|
+
], 8, no), [
|
|
1285
|
+
[pe, l.value]
|
|
1286
1286
|
])
|
|
1287
1287
|
]))
|
|
1288
1288
|
], 2));
|
|
1289
1289
|
}
|
|
1290
|
-
}),
|
|
1290
|
+
}), uo = ["disabled", "aria-expanded", "onKeydown"], vo = ["data-placement"], fo = {
|
|
1291
1291
|
key: 0,
|
|
1292
1292
|
class: "vf-multiselect__search"
|
|
1293
|
-
},
|
|
1293
|
+
}, po = ["value", "placeholder", "onKeydown"], bo = {
|
|
1294
1294
|
key: 1,
|
|
1295
1295
|
class: "vf-multiselect__loading"
|
|
1296
|
-
},
|
|
1296
|
+
}, go = ["id", "disabled", "aria-selected", "onClick"], mo = { class: "vf-multiselect__option-label" }, ho = {
|
|
1297
1297
|
key: 0,
|
|
1298
1298
|
class: "vf-multiselect__option-check",
|
|
1299
1299
|
"aria-hidden": "true"
|
|
1300
|
-
},
|
|
1300
|
+
}, yo = {
|
|
1301
1301
|
key: 3,
|
|
1302
1302
|
class: "vf-multiselect__empty"
|
|
1303
|
-
},
|
|
1303
|
+
}, hr = /* @__PURE__ */ Y({
|
|
1304
1304
|
__name: "multi-select",
|
|
1305
1305
|
props: {
|
|
1306
1306
|
modelValue: { default: () => [] },
|
|
@@ -1322,227 +1322,227 @@ const Pt = (t, e) => t.strategy ? t.strategy : Rt(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, d =
|
|
1326
|
-
let
|
|
1327
|
-
const
|
|
1328
|
-
label:
|
|
1329
|
-
value:
|
|
1330
|
-
disabled:
|
|
1331
|
-
}))),
|
|
1325
|
+
const o = e, a = t, d = D(null), i = D(null), c = D(null), l = D(null), u = D(!1), s = D(""), n = D(-1), f = D("bottom"), b = D("bottom"), v = `vf-multiselect-panel-${++r}`;
|
|
1326
|
+
let w = null;
|
|
1327
|
+
const C = y(() => a.options.map((g) => ({
|
|
1328
|
+
label: g[a.optionLabel],
|
|
1329
|
+
value: g[a.optionValue],
|
|
1330
|
+
disabled: g.disabled
|
|
1331
|
+
}))), $ = y(() => Array.isArray(a.modelValue) ? a.modelValue : []), M = y(() => {
|
|
1332
1332
|
if (!a.filter)
|
|
1333
|
-
return
|
|
1334
|
-
const
|
|
1335
|
-
return
|
|
1336
|
-
}),
|
|
1337
|
-
const
|
|
1338
|
-
return a.size !== "normal" &&
|
|
1339
|
-
}),
|
|
1340
|
-
o("update:modelValue",
|
|
1341
|
-
},
|
|
1342
|
-
if (!(
|
|
1343
|
-
if (
|
|
1344
|
-
|
|
1333
|
+
return C.value;
|
|
1334
|
+
const g = s.value.trim().toLowerCase();
|
|
1335
|
+
return g ? C.value.filter((B) => B.label.toLowerCase().includes(g)) : C.value;
|
|
1336
|
+
}), L = y(() => C.value.filter((g) => $.value.includes(g.value))), H = y(() => L.value.length === 0 ? a.placeholder : L.value.map((g) => g.label).join(", ")), I = y(() => {
|
|
1337
|
+
const g = ["vf-multiselect", `vf-multiselect_${a.variant}`, u.value ? "vf-multiselect_open" : ""];
|
|
1338
|
+
return a.size !== "normal" && g.push(`vf-multiselect_${a.size}`), a.disabled && g.push("vf-multiselect_disabled"), g.filter(Boolean);
|
|
1339
|
+
}), O = (g) => `${v}-option-${g}`, E = () => M.value.findIndex((g) => !g.disabled), F = (g) => $.value.includes(g.value), p = (g) => {
|
|
1340
|
+
o("update:modelValue", g), o("change", g);
|
|
1341
|
+
}, m = (g) => {
|
|
1342
|
+
if (!(g.disabled || a.readonly)) {
|
|
1343
|
+
if (F(g)) {
|
|
1344
|
+
p($.value.filter((B) => B !== g.value));
|
|
1345
1345
|
return;
|
|
1346
1346
|
}
|
|
1347
|
-
|
|
1347
|
+
p([...$.value, g.value]);
|
|
1348
1348
|
}
|
|
1349
|
-
},
|
|
1350
|
-
a.readonly ||
|
|
1351
|
-
},
|
|
1352
|
-
const
|
|
1353
|
-
if (
|
|
1354
|
-
|
|
1349
|
+
}, k = () => {
|
|
1350
|
+
a.readonly || p([]);
|
|
1351
|
+
}, W = (g) => {
|
|
1352
|
+
const B = M.value;
|
|
1353
|
+
if (!B.length) {
|
|
1354
|
+
n.value = -1;
|
|
1355
1355
|
return;
|
|
1356
1356
|
}
|
|
1357
|
-
let
|
|
1358
|
-
(
|
|
1359
|
-
for (let
|
|
1360
|
-
if (
|
|
1361
|
-
|
|
1357
|
+
let S = n.value;
|
|
1358
|
+
(S < 0 || S >= B.length) && (S = g > 0 ? -1 : B.length);
|
|
1359
|
+
for (let G = 0; G < B.length; G += 1)
|
|
1360
|
+
if (S = (S + g + B.length) % B.length, !B[S].disabled) {
|
|
1361
|
+
n.value = S;
|
|
1362
1362
|
return;
|
|
1363
1363
|
}
|
|
1364
|
-
|
|
1365
|
-
},
|
|
1366
|
-
var
|
|
1367
|
-
a.disabled || (u.value = !0, f.value = "bottom",
|
|
1364
|
+
n.value = -1;
|
|
1365
|
+
}, A = async () => {
|
|
1366
|
+
var g;
|
|
1367
|
+
a.disabled || (u.value = !0, f.value = "bottom", b.value = "bottom", n.value < 0 && (n.value = E()), a.filter && (await ke(), (g = l.value) == null || g.focus()));
|
|
1368
1368
|
}, X = () => {
|
|
1369
|
-
u.value = !1,
|
|
1370
|
-
},
|
|
1369
|
+
u.value = !1, n.value = -1, f.value = "bottom", b.value = "bottom", s.value = "";
|
|
1370
|
+
}, te = () => {
|
|
1371
1371
|
if (u.value) {
|
|
1372
1372
|
X();
|
|
1373
1373
|
return;
|
|
1374
1374
|
}
|
|
1375
|
-
|
|
1376
|
-
},
|
|
1375
|
+
A();
|
|
1376
|
+
}, j = () => {
|
|
1377
1377
|
if (!u.value) {
|
|
1378
|
-
|
|
1378
|
+
A();
|
|
1379
1379
|
return;
|
|
1380
1380
|
}
|
|
1381
|
-
|
|
1382
|
-
},
|
|
1381
|
+
W(1);
|
|
1382
|
+
}, re = () => {
|
|
1383
1383
|
if (!u.value) {
|
|
1384
|
-
|
|
1384
|
+
A();
|
|
1385
1385
|
return;
|
|
1386
1386
|
}
|
|
1387
|
-
|
|
1388
|
-
},
|
|
1387
|
+
W(-1);
|
|
1388
|
+
}, Q = () => {
|
|
1389
1389
|
if (!u.value) {
|
|
1390
|
-
|
|
1390
|
+
A();
|
|
1391
1391
|
return;
|
|
1392
1392
|
}
|
|
1393
|
-
const
|
|
1394
|
-
|
|
1395
|
-
},
|
|
1396
|
-
const
|
|
1397
|
-
|
|
1398
|
-
},
|
|
1399
|
-
var
|
|
1393
|
+
const g = M.value[n.value];
|
|
1394
|
+
g && !g.disabled && m(g);
|
|
1395
|
+
}, se = (g) => {
|
|
1396
|
+
const B = g.target;
|
|
1397
|
+
s.value = B.value, o("search", B.value), n.value = E();
|
|
1398
|
+
}, x = (g) => o("focus", g), K = (g) => o("blur", g), N = (g) => {
|
|
1399
|
+
var S;
|
|
1400
1400
|
if (!u.value || !d.value)
|
|
1401
1401
|
return;
|
|
1402
|
-
const
|
|
1403
|
-
d.value.contains(
|
|
1404
|
-
},
|
|
1405
|
-
if (!
|
|
1402
|
+
const B = g.target;
|
|
1403
|
+
d.value.contains(B) || (S = c.value) != null && S.contains(B) || X();
|
|
1404
|
+
}, oe = () => {
|
|
1405
|
+
if (!i.value || !c.value)
|
|
1406
1406
|
return;
|
|
1407
|
-
const
|
|
1407
|
+
const g = i.value, B = c.value, S = async () => {
|
|
1408
1408
|
const {
|
|
1409
|
-
x:
|
|
1409
|
+
x: ye,
|
|
1410
1410
|
y: De,
|
|
1411
|
-
placement:
|
|
1412
|
-
} = await Te(
|
|
1411
|
+
placement: We
|
|
1412
|
+
} = await Te(g, B, {
|
|
1413
1413
|
placement: f.value,
|
|
1414
1414
|
strategy: "fixed",
|
|
1415
1415
|
middleware: [Ve(2), Se({ placements: ["bottom", "top"] })]
|
|
1416
1416
|
});
|
|
1417
|
-
|
|
1418
|
-
},
|
|
1419
|
-
await
|
|
1420
|
-
},
|
|
1421
|
-
|
|
1422
|
-
}),
|
|
1423
|
-
|
|
1417
|
+
b.value = We ?? f.value, B.style.minWidth = `${g.getBoundingClientRect().width}px`, B.style.left = `${ye}px`, B.style.top = `${De}px`;
|
|
1418
|
+
}, G = async () => {
|
|
1419
|
+
await S();
|
|
1420
|
+
}, le = Le(g, () => {
|
|
1421
|
+
G();
|
|
1422
|
+
}), J = () => {
|
|
1423
|
+
G();
|
|
1424
1424
|
};
|
|
1425
|
-
document.addEventListener("scroll",
|
|
1426
|
-
update:
|
|
1425
|
+
document.addEventListener("scroll", J, !0), window.addEventListener("resize", J, !1), w = {
|
|
1426
|
+
update: G,
|
|
1427
1427
|
destroy: () => {
|
|
1428
|
-
|
|
1428
|
+
le(), document.removeEventListener("scroll", J, !0), window.removeEventListener("resize", J, !1);
|
|
1429
1429
|
}
|
|
1430
|
-
},
|
|
1430
|
+
}, w.update();
|
|
1431
1431
|
};
|
|
1432
|
-
return
|
|
1432
|
+
return ee(
|
|
1433
1433
|
() => a.options,
|
|
1434
1434
|
() => {
|
|
1435
|
-
|
|
1435
|
+
n.value >= M.value.length && (n.value = E()), w == null || w.update();
|
|
1436
1436
|
},
|
|
1437
1437
|
{ deep: !0 }
|
|
1438
|
-
),
|
|
1439
|
-
if (!
|
|
1440
|
-
|
|
1438
|
+
), ee(u, async (g) => {
|
|
1439
|
+
if (!g) {
|
|
1440
|
+
w && (w.destroy(), w = null);
|
|
1441
1441
|
return;
|
|
1442
1442
|
}
|
|
1443
|
-
await
|
|
1444
|
-
}),
|
|
1445
|
-
|
|
1443
|
+
await ke(), w || oe(), w == null || w.update();
|
|
1444
|
+
}), ee(M, () => {
|
|
1445
|
+
n.value >= M.value.length && (n.value = E());
|
|
1446
1446
|
}), Fe(() => {
|
|
1447
|
-
document.addEventListener("click",
|
|
1447
|
+
document.addEventListener("click", N);
|
|
1448
1448
|
}), we(() => {
|
|
1449
|
-
document.removeEventListener("click",
|
|
1450
|
-
}), (
|
|
1449
|
+
document.removeEventListener("click", N), w == null || w.destroy(), w = null;
|
|
1450
|
+
}), (g, B) => (h(), _("div", {
|
|
1451
1451
|
ref_key: "root",
|
|
1452
1452
|
ref: d,
|
|
1453
|
-
class:
|
|
1453
|
+
class: T(I.value)
|
|
1454
1454
|
}, [
|
|
1455
|
-
|
|
1455
|
+
z("button", {
|
|
1456
1456
|
ref_key: "trigger",
|
|
1457
|
-
ref:
|
|
1457
|
+
ref: i,
|
|
1458
1458
|
class: "vf-multiselect__control",
|
|
1459
1459
|
type: "button",
|
|
1460
|
-
disabled:
|
|
1460
|
+
disabled: g.disabled,
|
|
1461
1461
|
"aria-expanded": u.value,
|
|
1462
1462
|
"aria-controls": v,
|
|
1463
1463
|
"aria-haspopup": "listbox",
|
|
1464
|
-
onClick:
|
|
1464
|
+
onClick: te,
|
|
1465
1465
|
onKeydown: [
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1466
|
+
Z(q(j, ["prevent"]), ["down"]),
|
|
1467
|
+
Z(q(re, ["prevent"]), ["up"]),
|
|
1468
|
+
Z(q(Q, ["prevent"]), ["enter"]),
|
|
1469
|
+
Z(q(X, ["prevent"]), ["esc"])
|
|
1470
1470
|
],
|
|
1471
|
-
onFocus:
|
|
1472
|
-
onBlur:
|
|
1471
|
+
onFocus: x,
|
|
1472
|
+
onBlur: K
|
|
1473
1473
|
}, [
|
|
1474
|
-
|
|
1475
|
-
class:
|
|
1476
|
-
},
|
|
1477
|
-
|
|
1474
|
+
z("span", {
|
|
1475
|
+
class: T(["vf-multiselect__label", { "vf-multiselect__label_placeholder": $.value.length === 0 }])
|
|
1476
|
+
}, R(H.value), 3),
|
|
1477
|
+
B[0] || (B[0] = z("span", {
|
|
1478
1478
|
class: "vf-multiselect__chevron",
|
|
1479
1479
|
"aria-hidden": "true"
|
|
1480
1480
|
}, "▾", -1))
|
|
1481
|
-
], 40,
|
|
1482
|
-
|
|
1481
|
+
], 40, uo),
|
|
1482
|
+
g.clearable && $.value.length > 0 && !g.disabled && !g.readonly ? (h(), _("button", {
|
|
1483
1483
|
key: 0,
|
|
1484
1484
|
class: "vf-multiselect__clear",
|
|
1485
1485
|
type: "button",
|
|
1486
1486
|
"aria-label": "Clear selection",
|
|
1487
|
-
onClick:
|
|
1488
|
-
}, " ✕ ")) :
|
|
1489
|
-
(
|
|
1490
|
-
|
|
1487
|
+
onClick: q(k, ["stop"])
|
|
1488
|
+
}, " ✕ ")) : P("", !0),
|
|
1489
|
+
(h(), ne($e, { to: "body" }, [
|
|
1490
|
+
fe(z("div", {
|
|
1491
1491
|
id: v,
|
|
1492
1492
|
ref_key: "panel",
|
|
1493
1493
|
ref: c,
|
|
1494
1494
|
class: "vf-multiselect__panel",
|
|
1495
1495
|
role: "listbox",
|
|
1496
1496
|
"aria-multiselectable": "true",
|
|
1497
|
-
"data-placement":
|
|
1497
|
+
"data-placement": b.value
|
|
1498
1498
|
}, [
|
|
1499
|
-
|
|
1500
|
-
|
|
1499
|
+
g.filter ? (h(), _("div", fo, [
|
|
1500
|
+
z("input", {
|
|
1501
1501
|
ref_key: "searchInput",
|
|
1502
1502
|
ref: l,
|
|
1503
1503
|
class: "vf-multiselect__search-control",
|
|
1504
1504
|
type: "text",
|
|
1505
|
-
value:
|
|
1506
|
-
placeholder:
|
|
1507
|
-
onInput:
|
|
1505
|
+
value: s.value,
|
|
1506
|
+
placeholder: g.searchPlaceholder,
|
|
1507
|
+
onInput: se,
|
|
1508
1508
|
onKeydown: [
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1509
|
+
Z(q(j, ["prevent"]), ["down"]),
|
|
1510
|
+
Z(q(re, ["prevent"]), ["up"]),
|
|
1511
|
+
Z(q(Q, ["prevent"]), ["enter"]),
|
|
1512
|
+
Z(q(X, ["prevent"]), ["esc"])
|
|
1513
1513
|
]
|
|
1514
|
-
}, null, 40,
|
|
1515
|
-
])) :
|
|
1516
|
-
|
|
1517
|
-
id:
|
|
1518
|
-
key:
|
|
1519
|
-
class:
|
|
1520
|
-
"is-active":
|
|
1521
|
-
"is-disabled":
|
|
1522
|
-
"is-highlighted":
|
|
1514
|
+
}, null, 40, po)
|
|
1515
|
+
])) : P("", !0),
|
|
1516
|
+
g.loading ? (h(), _("div", bo, R(g.loadingText), 1)) : M.value.length > 0 ? (h(!0), _(ae, { key: 2 }, ve(M.value, (S, G) => (h(), _("button", {
|
|
1517
|
+
id: O(G),
|
|
1518
|
+
key: S.value,
|
|
1519
|
+
class: T(["vf-multiselect__option", {
|
|
1520
|
+
"is-active": F(S),
|
|
1521
|
+
"is-disabled": S.disabled,
|
|
1522
|
+
"is-highlighted": G === n.value
|
|
1523
1523
|
}]),
|
|
1524
1524
|
type: "button",
|
|
1525
1525
|
role: "option",
|
|
1526
|
-
disabled:
|
|
1527
|
-
"aria-selected":
|
|
1528
|
-
onClick: (
|
|
1526
|
+
disabled: S.disabled,
|
|
1527
|
+
"aria-selected": F(S),
|
|
1528
|
+
onClick: (le) => m(S)
|
|
1529
1529
|
}, [
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
], 10,
|
|
1533
|
-
], 8,
|
|
1534
|
-
[
|
|
1530
|
+
z("span", mo, R(S.label), 1),
|
|
1531
|
+
F(S) ? (h(), _("span", ho, "✓")) : P("", !0)
|
|
1532
|
+
], 10, go))), 128)) : (h(), _("div", yo, R(g.emptyText), 1))
|
|
1533
|
+
], 8, vo), [
|
|
1534
|
+
[pe, u.value]
|
|
1535
1535
|
])
|
|
1536
1536
|
]))
|
|
1537
1537
|
], 2));
|
|
1538
1538
|
}
|
|
1539
|
-
}),
|
|
1539
|
+
}), _o = ["disabled", "aria-expanded", "onKeydown"], Co = ["data-placement", "onKeydown"], ko = { class: "vf-datepicker__header" }, wo = { class: "vf-datepicker__month-label" }, $o = {
|
|
1540
1540
|
class: "vf-datepicker__weekdays",
|
|
1541
1541
|
role: "row"
|
|
1542
|
-
},
|
|
1542
|
+
}, xo = {
|
|
1543
1543
|
class: "vf-datepicker__days",
|
|
1544
1544
|
role: "grid"
|
|
1545
|
-
},
|
|
1545
|
+
}, Bo = ["disabled", "data-date", "onClick"], yr = /* @__PURE__ */ Y({
|
|
1546
1546
|
__name: "datepicker",
|
|
1547
1547
|
props: {
|
|
1548
1548
|
modelValue: { default: void 0 },
|
|
@@ -1559,231 +1559,231 @@ const Pt = (t, e) => t.strategy ? t.strategy : Rt(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, d =
|
|
1563
|
-
let
|
|
1564
|
-
const v =
|
|
1562
|
+
const o = e, a = t, d = D(null), i = D(null), c = D(null), l = D(!1), u = D("bottom"), s = D("bottom"), n = `vf-datepicker-panel-${++r}`, f = D(Q(j(a.modelValue) ?? /* @__PURE__ */ new Date()));
|
|
1563
|
+
let b = null;
|
|
1564
|
+
const v = y(() => j(a.modelValue)), w = y(() => j(a.min)), C = y(() => j(a.max)), $ = y(() => v.value ? v.value.toLocaleDateString(a.locale, {
|
|
1565
1565
|
year: "numeric",
|
|
1566
1566
|
month: "short",
|
|
1567
1567
|
day: "numeric"
|
|
1568
|
-
}) : ""), M =
|
|
1568
|
+
}) : ""), M = y(() => f.value.toLocaleDateString(a.locale, {
|
|
1569
1569
|
year: "numeric",
|
|
1570
1570
|
month: "long"
|
|
1571
|
-
})),
|
|
1572
|
-
const
|
|
1573
|
-
return Array.from({ length: 7 }, (
|
|
1574
|
-
const
|
|
1575
|
-
return
|
|
1571
|
+
})), L = y(() => {
|
|
1572
|
+
const g = new Intl.DateTimeFormat(a.locale, { weekday: "short" }), B = new Date(2026, 0, 4);
|
|
1573
|
+
return Array.from({ length: 7 }, (S, G) => {
|
|
1574
|
+
const le = (G + a.firstDayOfWeek) % 7, J = new Date(B);
|
|
1575
|
+
return J.setDate(B.getDate() + le), g.format(J);
|
|
1576
1576
|
});
|
|
1577
|
-
}), H =
|
|
1578
|
-
const
|
|
1579
|
-
return Array.from({ length: 42 }, (
|
|
1580
|
-
const
|
|
1577
|
+
}), H = y(() => {
|
|
1578
|
+
const g = K(f.value, a.firstDayOfWeek), B = v.value ? N(v.value) : null, S = N(/* @__PURE__ */ new Date());
|
|
1579
|
+
return Array.from({ length: 42 }, (G, le) => {
|
|
1580
|
+
const J = x(g, le), ye = N(J);
|
|
1581
1581
|
return {
|
|
1582
|
-
key: `${
|
|
1583
|
-
iso:
|
|
1584
|
-
date:
|
|
1585
|
-
day:
|
|
1586
|
-
inCurrentMonth:
|
|
1587
|
-
isDisabled:
|
|
1588
|
-
isSelected:
|
|
1589
|
-
isToday:
|
|
1582
|
+
key: `${ye}-${le}`,
|
|
1583
|
+
iso: ye,
|
|
1584
|
+
date: J,
|
|
1585
|
+
day: J.getDate(),
|
|
1586
|
+
inCurrentMonth: J.getMonth() === f.value.getMonth(),
|
|
1587
|
+
isDisabled: oe(J, w.value, C.value),
|
|
1588
|
+
isSelected: B === ye,
|
|
1589
|
+
isToday: ye === S
|
|
1590
1590
|
};
|
|
1591
1591
|
});
|
|
1592
|
-
}),
|
|
1593
|
-
const
|
|
1594
|
-
return a.size !== "normal" &&
|
|
1595
|
-
}),
|
|
1596
|
-
a.disabled || a.readonly || (l.value = !0, u.value = "bottom",
|
|
1597
|
-
},
|
|
1598
|
-
l.value = !1, u.value = "bottom",
|
|
1599
|
-
},
|
|
1592
|
+
}), I = y(() => {
|
|
1593
|
+
const g = ["vf-datepicker", `vf-datepicker_${a.variant}`, l.value ? "vf-datepicker_open" : ""];
|
|
1594
|
+
return a.size !== "normal" && g.push(`vf-datepicker_${a.size}`), a.disabled && g.push("vf-datepicker_disabled"), g.filter(Boolean);
|
|
1595
|
+
}), O = (g) => o("focus", g), E = (g) => o("blur", g), F = () => {
|
|
1596
|
+
a.disabled || a.readonly || (l.value = !0, u.value = "bottom", s.value = "bottom");
|
|
1597
|
+
}, p = () => {
|
|
1598
|
+
l.value = !1, u.value = "bottom", s.value = "bottom";
|
|
1599
|
+
}, m = () => {
|
|
1600
1600
|
if (l.value) {
|
|
1601
|
-
|
|
1601
|
+
p();
|
|
1602
1602
|
return;
|
|
1603
1603
|
}
|
|
1604
|
-
|
|
1605
|
-
},
|
|
1606
|
-
f.value =
|
|
1607
|
-
},
|
|
1608
|
-
f.value =
|
|
1609
|
-
},
|
|
1610
|
-
if (a.readonly ||
|
|
1604
|
+
F();
|
|
1605
|
+
}, k = () => {
|
|
1606
|
+
f.value = se(f.value, -1);
|
|
1607
|
+
}, W = () => {
|
|
1608
|
+
f.value = se(f.value, 1);
|
|
1609
|
+
}, A = (g) => {
|
|
1610
|
+
if (a.readonly || oe(g, w.value, C.value))
|
|
1611
1611
|
return;
|
|
1612
|
-
const
|
|
1613
|
-
o("update:modelValue",
|
|
1614
|
-
}, X = (
|
|
1615
|
-
var
|
|
1612
|
+
const B = N(g);
|
|
1613
|
+
o("update:modelValue", B), o("change", B), p();
|
|
1614
|
+
}, X = (g) => {
|
|
1615
|
+
var S;
|
|
1616
1616
|
if (!l.value || !d.value)
|
|
1617
1617
|
return;
|
|
1618
|
-
const
|
|
1619
|
-
d.value.contains(
|
|
1620
|
-
},
|
|
1621
|
-
if (!
|
|
1618
|
+
const B = g.target;
|
|
1619
|
+
d.value.contains(B) || (S = c.value) != null && S.contains(B) || p();
|
|
1620
|
+
}, te = () => {
|
|
1621
|
+
if (!i.value || !c.value)
|
|
1622
1622
|
return;
|
|
1623
|
-
const
|
|
1623
|
+
const g = i.value, B = c.value, S = async () => {
|
|
1624
1624
|
const {
|
|
1625
|
-
x:
|
|
1625
|
+
x: ye,
|
|
1626
1626
|
y: De,
|
|
1627
|
-
placement:
|
|
1628
|
-
} = await Te(
|
|
1627
|
+
placement: We
|
|
1628
|
+
} = await Te(g, B, {
|
|
1629
1629
|
placement: u.value,
|
|
1630
1630
|
strategy: "fixed",
|
|
1631
1631
|
middleware: [Ve(2), Se({ placements: ["bottom", "top"] })]
|
|
1632
1632
|
});
|
|
1633
|
-
|
|
1634
|
-
},
|
|
1635
|
-
await
|
|
1636
|
-
},
|
|
1637
|
-
|
|
1638
|
-
}),
|
|
1639
|
-
|
|
1633
|
+
s.value = We ?? u.value, B.style.left = `${ye}px`, B.style.top = `${De}px`;
|
|
1634
|
+
}, G = async () => {
|
|
1635
|
+
await S();
|
|
1636
|
+
}, le = Le(g, () => {
|
|
1637
|
+
G();
|
|
1638
|
+
}), J = () => {
|
|
1639
|
+
G();
|
|
1640
1640
|
};
|
|
1641
|
-
document.addEventListener("scroll",
|
|
1642
|
-
update:
|
|
1641
|
+
document.addEventListener("scroll", J, !0), window.addEventListener("resize", J, !1), b = {
|
|
1642
|
+
update: G,
|
|
1643
1643
|
destroy: () => {
|
|
1644
|
-
|
|
1644
|
+
le(), document.removeEventListener("scroll", J, !0), window.removeEventListener("resize", J, !1);
|
|
1645
1645
|
}
|
|
1646
|
-
},
|
|
1646
|
+
}, b.update();
|
|
1647
1647
|
};
|
|
1648
|
-
|
|
1648
|
+
ee(
|
|
1649
1649
|
() => a.modelValue,
|
|
1650
|
-
(
|
|
1651
|
-
const
|
|
1652
|
-
|
|
1650
|
+
(g) => {
|
|
1651
|
+
const B = j(g);
|
|
1652
|
+
B && (f.value = Q(B));
|
|
1653
1653
|
},
|
|
1654
1654
|
{ immediate: !0 }
|
|
1655
|
-
),
|
|
1655
|
+
), ee(
|
|
1656
1656
|
() => [a.min, a.max],
|
|
1657
1657
|
() => {
|
|
1658
|
-
|
|
1658
|
+
b == null || b.update();
|
|
1659
1659
|
}
|
|
1660
|
-
),
|
|
1661
|
-
if (!
|
|
1662
|
-
|
|
1660
|
+
), ee(l, async (g) => {
|
|
1661
|
+
if (!g) {
|
|
1662
|
+
b && (b.destroy(), b = null);
|
|
1663
1663
|
return;
|
|
1664
1664
|
}
|
|
1665
|
-
await
|
|
1665
|
+
await ke(), b || te(), b == null || b.update();
|
|
1666
1666
|
}), Fe(() => {
|
|
1667
1667
|
document.addEventListener("click", X);
|
|
1668
1668
|
}), we(() => {
|
|
1669
|
-
document.removeEventListener("click", X),
|
|
1669
|
+
document.removeEventListener("click", X), b == null || b.destroy(), b = null;
|
|
1670
1670
|
});
|
|
1671
|
-
function
|
|
1672
|
-
if (!
|
|
1671
|
+
function j(g) {
|
|
1672
|
+
if (!g)
|
|
1673
1673
|
return null;
|
|
1674
|
-
const
|
|
1675
|
-
if (
|
|
1674
|
+
const B = g.match(/^(\d{4})-(\d{2})-(\d{2})$/);
|
|
1675
|
+
if (!B)
|
|
1676
1676
|
return null;
|
|
1677
|
-
const
|
|
1678
|
-
return
|
|
1677
|
+
const S = Number(B[1]), G = Number(B[2]) - 1, le = Number(B[3]), J = new Date(S, G, le);
|
|
1678
|
+
return J.getFullYear() !== S || J.getMonth() !== G || J.getDate() !== le ? null : re(J);
|
|
1679
1679
|
}
|
|
1680
|
-
function
|
|
1681
|
-
return new Date(
|
|
1680
|
+
function re(g) {
|
|
1681
|
+
return new Date(g.getFullYear(), g.getMonth(), g.getDate());
|
|
1682
1682
|
}
|
|
1683
|
-
function
|
|
1684
|
-
return new Date(
|
|
1683
|
+
function Q(g) {
|
|
1684
|
+
return new Date(g.getFullYear(), g.getMonth(), 1);
|
|
1685
1685
|
}
|
|
1686
|
-
function
|
|
1687
|
-
return new Date(
|
|
1686
|
+
function se(g, B) {
|
|
1687
|
+
return new Date(g.getFullYear(), g.getMonth() + B, 1);
|
|
1688
1688
|
}
|
|
1689
|
-
function
|
|
1690
|
-
return new Date(
|
|
1689
|
+
function x(g, B) {
|
|
1690
|
+
return new Date(g.getFullYear(), g.getMonth(), g.getDate() + B);
|
|
1691
1691
|
}
|
|
1692
|
-
function
|
|
1693
|
-
const
|
|
1694
|
-
return
|
|
1692
|
+
function K(g, B) {
|
|
1693
|
+
const S = Q(g), le = (S.getDay() - B + 7) % 7;
|
|
1694
|
+
return x(S, -le);
|
|
1695
1695
|
}
|
|
1696
|
-
function
|
|
1697
|
-
const
|
|
1698
|
-
return `${
|
|
1696
|
+
function N(g) {
|
|
1697
|
+
const B = g.getFullYear(), S = `${g.getMonth() + 1}`.padStart(2, "0"), G = `${g.getDate()}`.padStart(2, "0");
|
|
1698
|
+
return `${B}-${S}-${G}`;
|
|
1699
1699
|
}
|
|
1700
|
-
function
|
|
1701
|
-
const
|
|
1702
|
-
return !!(
|
|
1700
|
+
function oe(g, B, S) {
|
|
1701
|
+
const G = re(g).getTime();
|
|
1702
|
+
return !!(B && G < B.getTime() || S && G > S.getTime());
|
|
1703
1703
|
}
|
|
1704
|
-
return (
|
|
1704
|
+
return (g, B) => (h(), _("div", {
|
|
1705
1705
|
ref_key: "root",
|
|
1706
1706
|
ref: d,
|
|
1707
|
-
class:
|
|
1707
|
+
class: T(I.value)
|
|
1708
1708
|
}, [
|
|
1709
|
-
|
|
1709
|
+
z("button", {
|
|
1710
1710
|
ref_key: "control",
|
|
1711
|
-
ref:
|
|
1711
|
+
ref: i,
|
|
1712
1712
|
class: "vf-datepicker__control",
|
|
1713
1713
|
type: "button",
|
|
1714
|
-
disabled:
|
|
1714
|
+
disabled: g.disabled,
|
|
1715
1715
|
"aria-expanded": l.value,
|
|
1716
|
-
"aria-controls":
|
|
1716
|
+
"aria-controls": n,
|
|
1717
1717
|
"aria-haspopup": "dialog",
|
|
1718
|
-
onClick:
|
|
1718
|
+
onClick: m,
|
|
1719
1719
|
onKeydown: [
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1720
|
+
Z(q(F, ["prevent"]), ["down"]),
|
|
1721
|
+
Z(q(m, ["prevent"]), ["enter"]),
|
|
1722
|
+
Z(q(p, ["prevent"]), ["esc"])
|
|
1723
1723
|
],
|
|
1724
|
-
onFocus:
|
|
1725
|
-
onBlur:
|
|
1724
|
+
onFocus: O,
|
|
1725
|
+
onBlur: E
|
|
1726
1726
|
}, [
|
|
1727
|
-
|
|
1728
|
-
class:
|
|
1729
|
-
},
|
|
1730
|
-
|
|
1727
|
+
z("span", {
|
|
1728
|
+
class: T(["vf-datepicker__label", { "vf-datepicker__label_placeholder": !v.value }])
|
|
1729
|
+
}, R($.value || g.placeholder), 3),
|
|
1730
|
+
B[0] || (B[0] = z("span", {
|
|
1731
1731
|
class: "vf-datepicker__chevron",
|
|
1732
1732
|
"aria-hidden": "true"
|
|
1733
1733
|
}, "▾", -1))
|
|
1734
|
-
], 40,
|
|
1735
|
-
(
|
|
1736
|
-
|
|
1737
|
-
id:
|
|
1734
|
+
], 40, _o),
|
|
1735
|
+
(h(), ne($e, { to: "body" }, [
|
|
1736
|
+
fe(z("div", {
|
|
1737
|
+
id: n,
|
|
1738
1738
|
ref_key: "panel",
|
|
1739
1739
|
ref: c,
|
|
1740
1740
|
class: "vf-datepicker__panel",
|
|
1741
1741
|
role: "dialog",
|
|
1742
|
-
"data-placement":
|
|
1743
|
-
onKeydown:
|
|
1742
|
+
"data-placement": s.value,
|
|
1743
|
+
onKeydown: Z(q(p, ["prevent"]), ["esc"])
|
|
1744
1744
|
}, [
|
|
1745
|
-
|
|
1746
|
-
|
|
1745
|
+
z("div", ko, [
|
|
1746
|
+
z("button", {
|
|
1747
1747
|
class: "vf-datepicker__nav",
|
|
1748
1748
|
type: "button",
|
|
1749
1749
|
"aria-label": "Previous month",
|
|
1750
|
-
onClick:
|
|
1750
|
+
onClick: k
|
|
1751
1751
|
}, " ‹ "),
|
|
1752
|
-
|
|
1753
|
-
|
|
1752
|
+
z("span", wo, R(M.value), 1),
|
|
1753
|
+
z("button", {
|
|
1754
1754
|
class: "vf-datepicker__nav",
|
|
1755
1755
|
type: "button",
|
|
1756
1756
|
"aria-label": "Next month",
|
|
1757
|
-
onClick:
|
|
1757
|
+
onClick: W
|
|
1758
1758
|
}, " › ")
|
|
1759
1759
|
]),
|
|
1760
|
-
|
|
1761
|
-
(
|
|
1762
|
-
key:
|
|
1760
|
+
z("div", $o, [
|
|
1761
|
+
(h(!0), _(ae, null, ve(L.value, (S) => (h(), _("span", {
|
|
1762
|
+
key: S,
|
|
1763
1763
|
class: "vf-datepicker__weekday"
|
|
1764
|
-
},
|
|
1764
|
+
}, R(S), 1))), 128))
|
|
1765
1765
|
]),
|
|
1766
|
-
|
|
1767
|
-
(
|
|
1768
|
-
key:
|
|
1769
|
-
class:
|
|
1770
|
-
"is-outside": !
|
|
1771
|
-
"is-selected":
|
|
1772
|
-
"is-today":
|
|
1766
|
+
z("div", xo, [
|
|
1767
|
+
(h(!0), _(ae, null, ve(H.value, (S) => (h(), _("button", {
|
|
1768
|
+
key: S.key,
|
|
1769
|
+
class: T(["vf-datepicker__day", {
|
|
1770
|
+
"is-outside": !S.inCurrentMonth,
|
|
1771
|
+
"is-selected": S.isSelected,
|
|
1772
|
+
"is-today": S.isToday
|
|
1773
1773
|
}]),
|
|
1774
1774
|
type: "button",
|
|
1775
|
-
disabled:
|
|
1776
|
-
"data-date":
|
|
1777
|
-
onClick: (
|
|
1778
|
-
},
|
|
1775
|
+
disabled: S.isDisabled,
|
|
1776
|
+
"data-date": S.iso,
|
|
1777
|
+
onClick: (G) => A(S.date)
|
|
1778
|
+
}, R(S.day), 11, Bo))), 128))
|
|
1779
1779
|
])
|
|
1780
|
-
], 40,
|
|
1781
|
-
[
|
|
1780
|
+
], 40, Co), [
|
|
1781
|
+
[pe, l.value]
|
|
1782
1782
|
])
|
|
1783
1783
|
]))
|
|
1784
1784
|
], 2));
|
|
1785
1785
|
}
|
|
1786
|
-
}),
|
|
1786
|
+
}), zo = ["disabled"], Fo = ["disabled", "aria-current", "aria-label", "onClick"], So = ["disabled"], _r = /* @__PURE__ */ Y({
|
|
1787
1787
|
__name: "pagination",
|
|
1788
1788
|
props: {
|
|
1789
1789
|
modelValue: { default: 1 },
|
|
@@ -1801,83 +1801,83 @@ const Pt = (t, e) => t.strategy ? t.strategy : Rt(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 = (v,
|
|
1805
|
-
if (
|
|
1804
|
+
const r = t, o = e, a = (v, w, C) => Math.min(C, Math.max(w, v)), d = (v, w) => {
|
|
1805
|
+
if (w < v)
|
|
1806
1806
|
return [];
|
|
1807
|
-
const
|
|
1808
|
-
for (let
|
|
1809
|
-
|
|
1810
|
-
return
|
|
1811
|
-
},
|
|
1807
|
+
const C = [];
|
|
1808
|
+
for (let $ = v; $ <= w; $ += 1)
|
|
1809
|
+
C.push($);
|
|
1810
|
+
return C;
|
|
1811
|
+
}, i = y(() => {
|
|
1812
1812
|
if (typeof r.totalPages == "number" && Number.isFinite(r.totalPages))
|
|
1813
1813
|
return Math.max(1, Math.floor(r.totalPages));
|
|
1814
1814
|
const v = Math.max(1, Math.floor(r.pageSize));
|
|
1815
1815
|
return Math.max(1, Math.ceil(Math.max(0, r.totalItems) / v));
|
|
1816
|
-
}), c =
|
|
1817
|
-
const v =
|
|
1816
|
+
}), c = y(() => a(Math.floor(r.modelValue), 1, i.value)), l = y(() => c.value <= 1), u = y(() => c.value >= i.value), s = y(() => r.disabled || i.value <= 1), n = y(() => {
|
|
1817
|
+
const v = i.value, w = c.value, C = Math.max(0, Math.floor(r.siblingCount)), $ = Math.max(0, Math.floor(r.boundaryCount)), M = C * 2 + $ * 2 + 3, L = [];
|
|
1818
1818
|
if (v <= M)
|
|
1819
|
-
return d(1, v).map((
|
|
1820
|
-
const H = d(1,
|
|
1821
|
-
for (const
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
for (const
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
for (const
|
|
1828
|
-
|
|
1829
|
-
return
|
|
1830
|
-
}), f =
|
|
1819
|
+
return d(1, v).map((F) => ({ key: `page-${F}`, type: "page", page: F }));
|
|
1820
|
+
const H = d(1, $), I = d(v - $ + 1, v), O = Math.max(Math.min(w - C, v - $ - C * 2 - 1), $ + 2), E = Math.min(Math.max(w + C, $ + C * 2 + 2), v - $ - 1);
|
|
1821
|
+
for (const F of H)
|
|
1822
|
+
L.push({ key: `page-${F}`, type: "page", page: F });
|
|
1823
|
+
O > $ + 2 ? L.push({ key: "ellipsis-start", type: "ellipsis", page: -1 }) : $ + 1 <= v - $ && L.push({ key: `page-${$ + 1}`, type: "page", page: $ + 1 });
|
|
1824
|
+
for (const F of d(O, E))
|
|
1825
|
+
L.push({ key: `page-${F}`, type: "page", page: F });
|
|
1826
|
+
E < v - $ - 1 ? L.push({ key: "ellipsis-end", type: "ellipsis", page: -2 }) : v - $ > $ && L.push({ key: `page-${v - $}`, type: "page", page: v - $ });
|
|
1827
|
+
for (const F of I)
|
|
1828
|
+
L.push({ key: `page-${F}`, type: "page", page: F });
|
|
1829
|
+
return L;
|
|
1830
|
+
}), f = y(() => {
|
|
1831
1831
|
const v = ["vf-pagination", `vf-pagination_${r.variant}`];
|
|
1832
1832
|
return r.size !== "normal" && v.push(`vf-pagination_${r.size}`), r.disabled && v.push("vf-pagination_disabled"), v;
|
|
1833
|
-
}),
|
|
1834
|
-
if (
|
|
1833
|
+
}), b = (v, w) => {
|
|
1834
|
+
if (s.value)
|
|
1835
1835
|
return;
|
|
1836
|
-
const
|
|
1837
|
-
|
|
1836
|
+
const C = a(v, 1, i.value);
|
|
1837
|
+
C !== r.modelValue && (o("update:modelValue", C), o("change", C, w));
|
|
1838
1838
|
};
|
|
1839
|
-
return (v,
|
|
1840
|
-
class:
|
|
1839
|
+
return (v, w) => (h(), _("nav", {
|
|
1840
|
+
class: T(f.value),
|
|
1841
1841
|
"aria-label": "Pagination"
|
|
1842
1842
|
}, [
|
|
1843
|
-
|
|
1843
|
+
z("button", {
|
|
1844
1844
|
class: "vf-pagination__item vf-pagination__item_nav",
|
|
1845
1845
|
type: "button",
|
|
1846
|
-
disabled:
|
|
1846
|
+
disabled: s.value || l.value,
|
|
1847
1847
|
"aria-label": "Previous page",
|
|
1848
|
-
onClick:
|
|
1849
|
-
},
|
|
1850
|
-
(
|
|
1851
|
-
key:
|
|
1852
|
-
class:
|
|
1853
|
-
"is-current":
|
|
1854
|
-
"is-ellipsis":
|
|
1848
|
+
onClick: w[0] || (w[0] = (C) => b(c.value - 1, C))
|
|
1849
|
+
}, R(v.prevLabel), 9, zo),
|
|
1850
|
+
(h(!0), _(ae, null, ve(n.value, (C) => (h(), _("button", {
|
|
1851
|
+
key: C.key,
|
|
1852
|
+
class: T(["vf-pagination__item", {
|
|
1853
|
+
"is-current": C.type === "page" && C.page === c.value,
|
|
1854
|
+
"is-ellipsis": C.type === "ellipsis"
|
|
1855
1855
|
}]),
|
|
1856
1856
|
type: "button",
|
|
1857
|
-
disabled:
|
|
1858
|
-
"aria-current":
|
|
1859
|
-
"aria-label":
|
|
1860
|
-
onClick: (
|
|
1857
|
+
disabled: s.value || C.type === "ellipsis",
|
|
1858
|
+
"aria-current": C.type === "page" && C.page === c.value ? "page" : void 0,
|
|
1859
|
+
"aria-label": C.type === "page" ? `Page ${C.page}` : void 0,
|
|
1860
|
+
onClick: ($) => C.type === "page" && b(C.page, $)
|
|
1861
1861
|
}, [
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
], 64)) : (
|
|
1865
|
-
|
|
1862
|
+
C.type === "page" ? (h(), _(ae, { key: 0 }, [
|
|
1863
|
+
U(R(C.page), 1)
|
|
1864
|
+
], 64)) : (h(), _(ae, { key: 1 }, [
|
|
1865
|
+
U(R(v.ellipsisLabel), 1)
|
|
1866
1866
|
], 64))
|
|
1867
|
-
], 10,
|
|
1868
|
-
|
|
1867
|
+
], 10, Fo))), 128)),
|
|
1868
|
+
z("button", {
|
|
1869
1869
|
class: "vf-pagination__item vf-pagination__item_nav",
|
|
1870
1870
|
type: "button",
|
|
1871
|
-
disabled:
|
|
1871
|
+
disabled: s.value || u.value,
|
|
1872
1872
|
"aria-label": "Next page",
|
|
1873
|
-
onClick:
|
|
1874
|
-
},
|
|
1873
|
+
onClick: w[1] || (w[1] = (C) => b(c.value + 1, C))
|
|
1874
|
+
}, R(v.nextLabel), 9, So)
|
|
1875
1875
|
], 2));
|
|
1876
1876
|
}
|
|
1877
|
-
}),
|
|
1877
|
+
}), Vo = ["checked", "disabled"], Lo = {
|
|
1878
1878
|
key: 0,
|
|
1879
1879
|
class: "vf-checkbox__label"
|
|
1880
|
-
},
|
|
1880
|
+
}, Cr = /* @__PURE__ */ Y({
|
|
1881
1881
|
__name: "checkbox",
|
|
1882
1882
|
props: {
|
|
1883
1883
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -1887,32 +1887,32 @@ const Pt = (t, e) => t.strategy ? t.strategy : Rt(e) ? "fixed" : "absolute", me
|
|
|
1887
1887
|
},
|
|
1888
1888
|
emits: ["update:modelValue", "change"],
|
|
1889
1889
|
setup(t, { emit: e }) {
|
|
1890
|
-
const r = e, o = t, a =
|
|
1891
|
-
const
|
|
1892
|
-
return o.disabled &&
|
|
1893
|
-
}), d = (
|
|
1894
|
-
const c =
|
|
1895
|
-
r("update:modelValue", c.checked), r("change",
|
|
1890
|
+
const r = e, o = t, a = y(() => {
|
|
1891
|
+
const i = ["vf-checkbox", `vf-checkbox_${o.variant}`];
|
|
1892
|
+
return o.disabled && i.push("vf-checkbox_disabled"), i;
|
|
1893
|
+
}), d = (i) => {
|
|
1894
|
+
const c = i.target;
|
|
1895
|
+
r("update:modelValue", c.checked), r("change", i);
|
|
1896
1896
|
};
|
|
1897
|
-
return (
|
|
1898
|
-
class:
|
|
1897
|
+
return (i, c) => (h(), _("label", {
|
|
1898
|
+
class: T(a.value)
|
|
1899
1899
|
}, [
|
|
1900
|
-
|
|
1900
|
+
z("input", {
|
|
1901
1901
|
class: "vf-checkbox__control",
|
|
1902
1902
|
type: "checkbox",
|
|
1903
|
-
checked:
|
|
1904
|
-
disabled:
|
|
1903
|
+
checked: i.modelValue,
|
|
1904
|
+
disabled: i.disabled,
|
|
1905
1905
|
onChange: d
|
|
1906
|
-
}, null, 40,
|
|
1907
|
-
c[0] || (c[0] =
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1906
|
+
}, null, 40, Vo),
|
|
1907
|
+
c[0] || (c[0] = z("span", { class: "vf-checkbox__box" }, null, -1)),
|
|
1908
|
+
i.label || i.$slots.default ? (h(), _("span", Lo, [
|
|
1909
|
+
V(i.$slots, "default", {}, () => [
|
|
1910
|
+
U(R(i.label), 1)
|
|
1911
1911
|
])
|
|
1912
|
-
])) :
|
|
1912
|
+
])) : P("", !0)
|
|
1913
1913
|
], 2));
|
|
1914
1914
|
}
|
|
1915
|
-
}),
|
|
1915
|
+
}), at = Symbol("VueForgeRadioGroup"), To = ["aria-disabled", "aria-label", "aria-labelledby"], kr = /* @__PURE__ */ Y({
|
|
1916
1916
|
__name: "radio-group",
|
|
1917
1917
|
props: {
|
|
1918
1918
|
modelValue: { type: [String, Number, Boolean, null], default: void 0 },
|
|
@@ -1925,32 +1925,32 @@ const Pt = (t, e) => t.strategy ? t.strategy : Rt(e) ? "fixed" : "absolute", me
|
|
|
1925
1925
|
},
|
|
1926
1926
|
emits: ["update:modelValue", "change"],
|
|
1927
1927
|
setup(t, { emit: e }) {
|
|
1928
|
-
const r = e, o = t, a =
|
|
1928
|
+
const r = e, o = t, a = y(() => {
|
|
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
|
-
},
|
|
1934
|
-
name:
|
|
1935
|
-
modelValue:
|
|
1936
|
-
disabled:
|
|
1937
|
-
variant:
|
|
1933
|
+
}, i = {
|
|
1934
|
+
name: y(() => o.name),
|
|
1935
|
+
modelValue: y(() => o.modelValue),
|
|
1936
|
+
disabled: y(() => o.disabled),
|
|
1937
|
+
variant: y(() => o.variant),
|
|
1938
1938
|
onChange: d
|
|
1939
1939
|
};
|
|
1940
|
-
return
|
|
1941
|
-
class:
|
|
1940
|
+
return He(at, i), (c, l) => (h(), _("div", {
|
|
1941
|
+
class: T(a.value),
|
|
1942
1942
|
role: "radiogroup",
|
|
1943
1943
|
"aria-disabled": c.disabled || void 0,
|
|
1944
1944
|
"aria-label": c.ariaLabel || void 0,
|
|
1945
1945
|
"aria-labelledby": c.ariaLabelledby || void 0
|
|
1946
1946
|
}, [
|
|
1947
|
-
|
|
1948
|
-
], 10,
|
|
1947
|
+
V(c.$slots, "default")
|
|
1948
|
+
], 10, To));
|
|
1949
1949
|
}
|
|
1950
|
-
}),
|
|
1950
|
+
}), Ro = ["name", "value", "checked", "disabled"], Po = {
|
|
1951
1951
|
key: 0,
|
|
1952
1952
|
class: "vf-radio__label"
|
|
1953
|
-
},
|
|
1953
|
+
}, wr = /* @__PURE__ */ Y({
|
|
1954
1954
|
__name: "radio-button",
|
|
1955
1955
|
props: {
|
|
1956
1956
|
modelValue: { type: [String, Number, Boolean, null], default: void 0 },
|
|
@@ -1962,33 +1962,33 @@ const Pt = (t, e) => t.strategy ? t.strategy : Rt(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 =
|
|
1965
|
+
const r = e, o = t, a = Me(at, null), d = y(() => a ? a.modelValue.value : o.modelValue), i = y(() => a ? a.name.value : o.name), c = y(() => a ? a.variant.value : o.variant), l = y(() => (a ? a.disabled.value : !1) || o.disabled), u = y(() => d.value === o.value), s = y(() => {
|
|
1966
1966
|
const f = ["vf-radio", `vf-radio_${c.value}`];
|
|
1967
1967
|
return l.value && f.push("vf-radio_disabled"), f;
|
|
1968
|
-
}),
|
|
1968
|
+
}), n = (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,
|
|
1972
|
-
class:
|
|
1971
|
+
return (f, b) => (h(), _("label", {
|
|
1972
|
+
class: T(s.value)
|
|
1973
1973
|
}, [
|
|
1974
|
-
|
|
1974
|
+
z("input", {
|
|
1975
1975
|
class: "vf-radio__control",
|
|
1976
1976
|
type: "radio",
|
|
1977
|
-
name:
|
|
1977
|
+
name: i.value,
|
|
1978
1978
|
value: f.value,
|
|
1979
1979
|
checked: u.value,
|
|
1980
1980
|
disabled: l.value,
|
|
1981
|
-
onChange:
|
|
1982
|
-
}, null, 40,
|
|
1983
|
-
|
|
1984
|
-
f.label || f.$slots.default ? (
|
|
1985
|
-
|
|
1986
|
-
|
|
1981
|
+
onChange: n
|
|
1982
|
+
}, null, 40, Ro),
|
|
1983
|
+
b[0] || (b[0] = z("span", { class: "vf-radio__circle" }, null, -1)),
|
|
1984
|
+
f.label || f.$slots.default ? (h(), _("span", Po, [
|
|
1985
|
+
V(f.$slots, "default", {}, () => [
|
|
1986
|
+
U(R(f.label), 1)
|
|
1987
1987
|
])
|
|
1988
|
-
])) :
|
|
1988
|
+
])) : P("", !0)
|
|
1989
1989
|
], 2));
|
|
1990
1990
|
}
|
|
1991
|
-
}),
|
|
1991
|
+
}), Ke = Symbol("VueForgeTabs"), Io = ["aria-orientation", "aria-label", "aria-labelledby"], Oo = { class: "vf-tabs__panels" }, $r = /* @__PURE__ */ Y({
|
|
1992
1992
|
__name: "tabs",
|
|
1993
1993
|
props: {
|
|
1994
1994
|
modelValue: { default: void 0 },
|
|
@@ -2000,37 +2000,37 @@ const Pt = (t, e) => t.strategy ? t.strategy : Rt(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, d = ++r,
|
|
2003
|
+
const o = e, a = t, d = ++r, i = (v) => String(v).toLowerCase().trim().replace(/\s+/g, "-").replace(/[^a-z0-9_-]/g, ""), c = y(() => {
|
|
2004
2004
|
const v = ["vf-tabs"];
|
|
2005
2005
|
return a.orientation === "vertical" && v.push("vf-tabs_vertical"), a.disabled && v.push("vf-tabs_disabled"), v;
|
|
2006
|
-
}), l =
|
|
2006
|
+
}), l = D(null), u = () => l.value ? Array.from(l.value.querySelectorAll('[role="tab"]:not([disabled])')) : [], s = (v) => {
|
|
2007
2007
|
v && (v.focus(), v.click());
|
|
2008
|
-
},
|
|
2008
|
+
}, n = (v) => {
|
|
2009
2009
|
if (a.disabled)
|
|
2010
2010
|
return;
|
|
2011
|
-
const
|
|
2012
|
-
if (![
|
|
2011
|
+
const w = a.orientation === "horizontal", C = v.key, $ = w ? ["ArrowRight"] : ["ArrowDown"], M = w ? ["ArrowLeft"] : ["ArrowUp"];
|
|
2012
|
+
if (![...$, ...M, "Home", "End"].includes(C))
|
|
2013
2013
|
return;
|
|
2014
|
-
const
|
|
2015
|
-
if (!
|
|
2014
|
+
const L = u();
|
|
2015
|
+
if (!L.length)
|
|
2016
2016
|
return;
|
|
2017
|
-
const H =
|
|
2018
|
-
let
|
|
2019
|
-
|
|
2020
|
-
}, f = (v,
|
|
2021
|
-
o("update:modelValue", v), o("change", v,
|
|
2022
|
-
},
|
|
2023
|
-
activeValue:
|
|
2024
|
-
disabled:
|
|
2025
|
-
orientation:
|
|
2017
|
+
const H = L.findIndex((F) => F.getAttribute("aria-selected") === "true"), I = L.findIndex((F) => F === document.activeElement), O = I >= 0 ? I : Math.max(H, 0);
|
|
2018
|
+
let E = O;
|
|
2019
|
+
$.includes(C) ? E = (O + 1) % L.length : M.includes(C) ? E = (O - 1 + L.length) % L.length : C === "Home" ? E = 0 : C === "End" && (E = L.length - 1), v.preventDefault(), s(L[E]);
|
|
2020
|
+
}, f = (v, w) => {
|
|
2021
|
+
o("update:modelValue", v), o("change", v, w);
|
|
2022
|
+
}, b = {
|
|
2023
|
+
activeValue: y(() => a.modelValue),
|
|
2024
|
+
disabled: y(() => a.disabled),
|
|
2025
|
+
orientation: y(() => a.orientation),
|
|
2026
2026
|
onChange: f,
|
|
2027
|
-
getTabId: (v) => `vf-tab-${d}-${
|
|
2028
|
-
getPanelId: (v) => `vf-tabpanel-${d}-${
|
|
2027
|
+
getTabId: (v) => `vf-tab-${d}-${i(v)}`,
|
|
2028
|
+
getPanelId: (v) => `vf-tabpanel-${d}-${i(v)}`
|
|
2029
2029
|
};
|
|
2030
|
-
return
|
|
2031
|
-
class:
|
|
2030
|
+
return He(Ke, b), (v, w) => (h(), _("div", {
|
|
2031
|
+
class: T(c.value)
|
|
2032
2032
|
}, [
|
|
2033
|
-
|
|
2033
|
+
z("div", {
|
|
2034
2034
|
ref_key: "list",
|
|
2035
2035
|
ref: l,
|
|
2036
2036
|
class: "vf-tabs__list",
|
|
@@ -2038,16 +2038,16 @@ const Pt = (t, e) => t.strategy ? t.strategy : Rt(e) ? "fixed" : "absolute", me
|
|
|
2038
2038
|
"aria-orientation": v.orientation,
|
|
2039
2039
|
"aria-label": v.ariaLabel || void 0,
|
|
2040
2040
|
"aria-labelledby": v.ariaLabelledby || void 0,
|
|
2041
|
-
onKeydown:
|
|
2041
|
+
onKeydown: n
|
|
2042
2042
|
}, [
|
|
2043
|
-
|
|
2044
|
-
], 40,
|
|
2045
|
-
|
|
2046
|
-
|
|
2043
|
+
V(v.$slots, "tabs")
|
|
2044
|
+
], 40, Io),
|
|
2045
|
+
z("div", Oo, [
|
|
2046
|
+
V(v.$slots, "panels")
|
|
2047
2047
|
])
|
|
2048
2048
|
], 2));
|
|
2049
2049
|
}
|
|
2050
|
-
}),
|
|
2050
|
+
}), Mo = ["id", "aria-selected", "aria-controls", "disabled", "tabindex"], xr = /* @__PURE__ */ Y({
|
|
2051
2051
|
__name: "tab",
|
|
2052
2052
|
props: {
|
|
2053
2053
|
value: {},
|
|
@@ -2056,51 +2056,152 @@ const Pt = (t, e) => t.strategy ? t.strategy : Rt(e) ? "fixed" : "absolute", me
|
|
|
2056
2056
|
},
|
|
2057
2057
|
emits: ["change"],
|
|
2058
2058
|
setup(t, { emit: e }) {
|
|
2059
|
-
const r = e, o = t, a =
|
|
2060
|
-
!a ||
|
|
2059
|
+
const r = e, o = t, a = Me(Ke, null), d = y(() => (a == null ? void 0 : a.activeValue.value) === o.value), i = y(() => ((a == null ? void 0 : a.disabled.value) ?? !1) || o.disabled), c = y(() => a ? a.getTabId(o.value) : void 0), l = y(() => a ? a.getPanelId(o.value) : void 0), u = y(() => i.value ? -1 : d.value ? 0 : -1), s = (n) => {
|
|
2060
|
+
!a || i.value || (a.onChange(o.value, n), r("change", o.value, n));
|
|
2061
2061
|
};
|
|
2062
|
-
return (
|
|
2062
|
+
return (n, f) => (h(), _("button", {
|
|
2063
2063
|
id: c.value,
|
|
2064
|
-
class:
|
|
2064
|
+
class: T(["vf-tab", { "vf-tab_active": d.value, "vf-tab_disabled": i.value }]),
|
|
2065
2065
|
type: "button",
|
|
2066
2066
|
role: "tab",
|
|
2067
2067
|
"aria-selected": d.value,
|
|
2068
2068
|
"aria-controls": l.value,
|
|
2069
|
-
disabled:
|
|
2069
|
+
disabled: i.value,
|
|
2070
2070
|
tabindex: u.value,
|
|
2071
|
-
onClick:
|
|
2071
|
+
onClick: s
|
|
2072
2072
|
}, [
|
|
2073
|
-
|
|
2074
|
-
|
|
2073
|
+
V(n.$slots, "default", {}, () => [
|
|
2074
|
+
U(R(n.label), 1)
|
|
2075
2075
|
])
|
|
2076
|
-
], 10,
|
|
2076
|
+
], 10, Mo));
|
|
2077
2077
|
}
|
|
2078
|
-
}), Do = ["id", "aria-labelledby"],
|
|
2078
|
+
}), Do = ["id", "aria-labelledby"], Br = /* @__PURE__ */ Y({
|
|
2079
2079
|
__name: "tab-panel",
|
|
2080
2080
|
props: {
|
|
2081
2081
|
value: {}
|
|
2082
2082
|
},
|
|
2083
2083
|
setup(t) {
|
|
2084
|
-
const e = t, r =
|
|
2085
|
-
return (
|
|
2084
|
+
const e = t, r = Me(Ke, null), o = y(() => (r == null ? void 0 : r.activeValue.value) === e.value), a = y(() => r ? r.getTabId(e.value) : void 0), d = y(() => r ? r.getPanelId(e.value) : void 0);
|
|
2085
|
+
return (i, c) => fe((h(), _("div", {
|
|
2086
2086
|
id: d.value,
|
|
2087
2087
|
class: "vf-tab-panel",
|
|
2088
2088
|
role: "tabpanel",
|
|
2089
2089
|
tabindex: "0",
|
|
2090
2090
|
"aria-labelledby": a.value
|
|
2091
2091
|
}, [
|
|
2092
|
-
|
|
2092
|
+
V(i.$slots, "default")
|
|
2093
2093
|
], 8, Do)), [
|
|
2094
|
-
[
|
|
2094
|
+
[pe, o.value]
|
|
2095
2095
|
]);
|
|
2096
2096
|
}
|
|
2097
|
-
}),
|
|
2097
|
+
}), rt = Symbol("VueForgeAccordion"), Wo = ["aria-label", "aria-labelledby"], zr = /* @__PURE__ */ Y({
|
|
2098
|
+
__name: "accordion",
|
|
2099
|
+
props: {
|
|
2100
|
+
modelValue: { default: void 0 },
|
|
2101
|
+
multiple: { type: Boolean, default: !1 },
|
|
2102
|
+
disabled: { type: Boolean, default: !1 },
|
|
2103
|
+
variant: { default: "filled" },
|
|
2104
|
+
size: { default: "normal" },
|
|
2105
|
+
ariaLabel: {},
|
|
2106
|
+
ariaLabelledby: {}
|
|
2107
|
+
},
|
|
2108
|
+
emits: ["update:modelValue", "change"],
|
|
2109
|
+
setup(t, { emit: e }) {
|
|
2110
|
+
let r = 0;
|
|
2111
|
+
const o = e, a = t, d = ++r, i = (n) => String(n).toLowerCase().trim().replace(/\s+/g, "-").replace(/[^a-z0-9_-]/g, ""), c = y(() => {
|
|
2112
|
+
const n = ["vf-accordion", `vf-accordion_${a.variant}`];
|
|
2113
|
+
return a.size !== "normal" && n.push(`vf-accordion_${a.size}`), a.disabled && n.push("vf-accordion_disabled"), n;
|
|
2114
|
+
}), l = (n) => Array.isArray(n) ? n : n == null ? [] : [n], u = (n, f) => {
|
|
2115
|
+
if (a.disabled)
|
|
2116
|
+
return;
|
|
2117
|
+
if (a.multiple) {
|
|
2118
|
+
const v = l(a.modelValue), C = v.includes(n) ? v.filter(($) => $ !== n) : [...v, n];
|
|
2119
|
+
o("update:modelValue", C), o("change", C, f);
|
|
2120
|
+
return;
|
|
2121
|
+
}
|
|
2122
|
+
const b = a.modelValue === n ? void 0 : n;
|
|
2123
|
+
o("update:modelValue", b), o("change", b, f);
|
|
2124
|
+
}, s = {
|
|
2125
|
+
modelValue: y(() => a.modelValue),
|
|
2126
|
+
multiple: y(() => a.multiple),
|
|
2127
|
+
disabled: y(() => a.disabled),
|
|
2128
|
+
variant: y(() => a.variant),
|
|
2129
|
+
size: y(() => a.size),
|
|
2130
|
+
onToggle: u,
|
|
2131
|
+
getHeaderId: (n) => `vf-accordion-header-${d}-${i(n)}`,
|
|
2132
|
+
getPanelId: (n) => `vf-accordion-panel-${d}-${i(n)}`
|
|
2133
|
+
};
|
|
2134
|
+
return He(rt, s), (n, f) => (h(), _("div", {
|
|
2135
|
+
class: T(c.value),
|
|
2136
|
+
"aria-label": n.ariaLabel || void 0,
|
|
2137
|
+
"aria-labelledby": n.ariaLabelledby || void 0
|
|
2138
|
+
}, [
|
|
2139
|
+
V(n.$slots, "default")
|
|
2140
|
+
], 10, Wo));
|
|
2141
|
+
}
|
|
2142
|
+
}), Ao = ["id", "disabled", "aria-expanded", "aria-controls"], Eo = { class: "vf-accordion__title" }, Ho = ["id", "aria-labelledby", "aria-hidden"], Ko = { class: "vf-accordion__panel-inner" }, Fr = /* @__PURE__ */ Y({
|
|
2143
|
+
__name: "accordion-item",
|
|
2144
|
+
props: {
|
|
2145
|
+
value: {},
|
|
2146
|
+
title: { default: "" },
|
|
2147
|
+
disabled: { type: Boolean, default: !1 },
|
|
2148
|
+
unmount: { type: Boolean, default: !1 }
|
|
2149
|
+
},
|
|
2150
|
+
setup(t) {
|
|
2151
|
+
const e = t, r = Me(rt, null), o = y(() => {
|
|
2152
|
+
if (!r)
|
|
2153
|
+
return !1;
|
|
2154
|
+
const s = r.modelValue.value;
|
|
2155
|
+
return Array.isArray(s) ? s.includes(e.value) : s === e.value;
|
|
2156
|
+
}), a = y(() => ((r == null ? void 0 : r.disabled.value) ?? !1) || e.disabled), d = y(() => r ? r.getHeaderId(e.value) : void 0), i = y(() => r ? r.getPanelId(e.value) : void 0), c = y(() => e.unmount ? o.value : !0), l = y(() => {
|
|
2157
|
+
const s = ["vf-accordion-item"];
|
|
2158
|
+
return o.value && s.push("vf-accordion-item_open"), a.value && s.push("vf-accordion-item_disabled"), s;
|
|
2159
|
+
}), u = (s) => {
|
|
2160
|
+
!r || a.value || r.onToggle(e.value, s);
|
|
2161
|
+
};
|
|
2162
|
+
return (s, n) => (h(), _("div", {
|
|
2163
|
+
class: T(l.value)
|
|
2164
|
+
}, [
|
|
2165
|
+
z("button", {
|
|
2166
|
+
id: d.value,
|
|
2167
|
+
class: "vf-accordion__header",
|
|
2168
|
+
type: "button",
|
|
2169
|
+
disabled: a.value,
|
|
2170
|
+
"aria-expanded": o.value,
|
|
2171
|
+
"aria-controls": i.value,
|
|
2172
|
+
onClick: u
|
|
2173
|
+
}, [
|
|
2174
|
+
z("span", Eo, [
|
|
2175
|
+
V(s.$slots, "title", {}, () => [
|
|
2176
|
+
U(R(s.title), 1)
|
|
2177
|
+
])
|
|
2178
|
+
]),
|
|
2179
|
+
n[0] || (n[0] = z("span", {
|
|
2180
|
+
class: "vf-accordion__icon",
|
|
2181
|
+
"aria-hidden": "true"
|
|
2182
|
+
}, null, -1))
|
|
2183
|
+
], 8, Ao),
|
|
2184
|
+
c.value ? (h(), _("div", {
|
|
2185
|
+
key: 0,
|
|
2186
|
+
id: i.value,
|
|
2187
|
+
class: T(["vf-accordion__panel", { "vf-accordion__panel_open": o.value }]),
|
|
2188
|
+
role: "region",
|
|
2189
|
+
"aria-labelledby": d.value,
|
|
2190
|
+
"aria-hidden": o.value ? void 0 : "true"
|
|
2191
|
+
}, [
|
|
2192
|
+
z("div", Ko, [
|
|
2193
|
+
V(s.$slots, "default")
|
|
2194
|
+
])
|
|
2195
|
+
], 10, Ho)) : P("", !0)
|
|
2196
|
+
], 2));
|
|
2197
|
+
}
|
|
2198
|
+
}), No = ["data-severity"], Go = { class: "vf-toast__body" }, Yo = {
|
|
2098
2199
|
key: 0,
|
|
2099
2200
|
class: "vf-toast__title"
|
|
2100
|
-
},
|
|
2201
|
+
}, jo = {
|
|
2101
2202
|
key: 1,
|
|
2102
2203
|
class: "vf-toast__message"
|
|
2103
|
-
},
|
|
2204
|
+
}, Sr = /* @__PURE__ */ Y({
|
|
2104
2205
|
__name: "toast",
|
|
2105
2206
|
props: {
|
|
2106
2207
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -2116,80 +2217,80 @@ const Pt = (t, e) => t.strategy ? t.strategy : Rt(e) ? "fixed" : "absolute", me
|
|
|
2116
2217
|
let a = null;
|
|
2117
2218
|
const d = () => {
|
|
2118
2219
|
a !== null && (clearTimeout(a), a = null);
|
|
2119
|
-
},
|
|
2220
|
+
}, i = () => {
|
|
2120
2221
|
d(), !(!o.modelValue || o.duration <= 0) && (a = window.setTimeout(() => {
|
|
2121
2222
|
r("update:modelValue", !1), r("close");
|
|
2122
2223
|
}, o.duration));
|
|
2123
2224
|
}, c = () => {
|
|
2124
2225
|
d(), r("update:modelValue", !1), r("close");
|
|
2125
2226
|
};
|
|
2126
|
-
return
|
|
2227
|
+
return ee(
|
|
2127
2228
|
() => o.modelValue,
|
|
2128
2229
|
(l) => {
|
|
2129
|
-
l && r("open"),
|
|
2230
|
+
l && r("open"), i();
|
|
2130
2231
|
},
|
|
2131
2232
|
{ immediate: !0 }
|
|
2132
2233
|
), we(() => {
|
|
2133
2234
|
d();
|
|
2134
|
-
}), (l, u) =>
|
|
2235
|
+
}), (l, u) => fe((h(), _("div", {
|
|
2135
2236
|
class: "vf-toast",
|
|
2136
2237
|
role: "status",
|
|
2137
2238
|
"aria-live": "polite",
|
|
2138
2239
|
"data-severity": l.severity
|
|
2139
2240
|
}, [
|
|
2140
|
-
|
|
2141
|
-
l.title ? (
|
|
2142
|
-
l.message || l.$slots.default ? (
|
|
2143
|
-
|
|
2144
|
-
|
|
2241
|
+
z("div", Go, [
|
|
2242
|
+
l.title ? (h(), _("div", Yo, R(l.title), 1)) : P("", !0),
|
|
2243
|
+
l.message || l.$slots.default ? (h(), _("div", jo, [
|
|
2244
|
+
V(l.$slots, "default", {}, () => [
|
|
2245
|
+
U(R(l.message), 1)
|
|
2145
2246
|
])
|
|
2146
|
-
])) :
|
|
2247
|
+
])) : P("", !0)
|
|
2147
2248
|
]),
|
|
2148
|
-
l.closable ? (
|
|
2249
|
+
l.closable ? (h(), _("button", {
|
|
2149
2250
|
key: 0,
|
|
2150
2251
|
class: "vf-toast__close",
|
|
2151
2252
|
type: "button",
|
|
2152
2253
|
onClick: c
|
|
2153
2254
|
}, [
|
|
2154
|
-
|
|
2155
|
-
u[0] || (u[0] =
|
|
2255
|
+
V(l.$slots, "close", {}, () => [
|
|
2256
|
+
u[0] || (u[0] = U("×"))
|
|
2156
2257
|
])
|
|
2157
|
-
])) :
|
|
2158
|
-
], 8,
|
|
2159
|
-
[
|
|
2258
|
+
])) : P("", !0)
|
|
2259
|
+
], 8, No)), [
|
|
2260
|
+
[pe, l.modelValue]
|
|
2160
2261
|
]);
|
|
2161
2262
|
}
|
|
2162
|
-
}),
|
|
2263
|
+
}), Vr = /* @__PURE__ */ Y({
|
|
2163
2264
|
__name: "toast-container",
|
|
2164
2265
|
props: {
|
|
2165
2266
|
position: { default: "top-right" }
|
|
2166
2267
|
},
|
|
2167
2268
|
setup(t) {
|
|
2168
|
-
const e = t, r =
|
|
2169
|
-
return (o, a) => (
|
|
2170
|
-
|
|
2171
|
-
class:
|
|
2269
|
+
const e = t, r = y(() => `vf-toast-container_${e.position}`);
|
|
2270
|
+
return (o, a) => (h(), ne($e, { to: "body" }, [
|
|
2271
|
+
z("div", {
|
|
2272
|
+
class: T(["vf-toast-container", r.value]),
|
|
2172
2273
|
role: "region",
|
|
2173
2274
|
"aria-live": "polite"
|
|
2174
2275
|
}, [
|
|
2175
|
-
|
|
2276
|
+
V(o.$slots, "default")
|
|
2176
2277
|
], 2)
|
|
2177
2278
|
]));
|
|
2178
2279
|
}
|
|
2179
|
-
}),
|
|
2280
|
+
}), Xo = ["data-severity"], qo = {
|
|
2180
2281
|
key: 0,
|
|
2181
2282
|
class: "vf-alert__icon",
|
|
2182
2283
|
"aria-hidden": "true"
|
|
2183
|
-
},
|
|
2284
|
+
}, Uo = { class: "vf-alert__body" }, Zo = {
|
|
2184
2285
|
key: 0,
|
|
2185
2286
|
class: "vf-alert__title"
|
|
2186
|
-
},
|
|
2287
|
+
}, Jo = {
|
|
2187
2288
|
key: 1,
|
|
2188
2289
|
class: "vf-alert__message"
|
|
2189
|
-
},
|
|
2290
|
+
}, Qo = {
|
|
2190
2291
|
key: 1,
|
|
2191
2292
|
class: "vf-alert__actions"
|
|
2192
|
-
},
|
|
2293
|
+
}, Lr = /* @__PURE__ */ Y({
|
|
2193
2294
|
__name: "alert",
|
|
2194
2295
|
props: {
|
|
2195
2296
|
modelValue: { type: Boolean },
|
|
@@ -2201,8 +2302,8 @@ const Pt = (t, e) => t.strategy ? t.strategy : Rt(e) ? "fixed" : "absolute", me
|
|
|
2201
2302
|
},
|
|
2202
2303
|
emits: ["update:modelValue", "close"],
|
|
2203
2304
|
setup(t, { emit: e }) {
|
|
2204
|
-
const r = e, o = t, a =
|
|
2205
|
-
|
|
2305
|
+
const r = e, o = t, a = D(!0), d = y(() => typeof o.modelValue == "boolean"), i = y(() => d.value ? o.modelValue : a.value);
|
|
2306
|
+
ee(
|
|
2206
2307
|
() => o.modelValue,
|
|
2207
2308
|
(l) => {
|
|
2208
2309
|
typeof l == "boolean" && (a.value = l);
|
|
@@ -2212,50 +2313,50 @@ const Pt = (t, e) => t.strategy ? t.strategy : Rt(e) ? "fixed" : "absolute", me
|
|
|
2212
2313
|
const c = () => {
|
|
2213
2314
|
d.value ? r("update:modelValue", !1) : a.value = !1, r("close");
|
|
2214
2315
|
};
|
|
2215
|
-
return (l, u) =>
|
|
2316
|
+
return (l, u) => fe((h(), _("div", {
|
|
2216
2317
|
class: "vf-alert",
|
|
2217
2318
|
role: "alert",
|
|
2218
2319
|
"data-severity": l.severity
|
|
2219
2320
|
}, [
|
|
2220
|
-
l.$slots.icon || l.icon ? (
|
|
2221
|
-
|
|
2222
|
-
|
|
2321
|
+
l.$slots.icon || l.icon ? (h(), _("div", qo, [
|
|
2322
|
+
V(l.$slots, "icon", {}, () => [
|
|
2323
|
+
U(R(l.icon), 1)
|
|
2223
2324
|
])
|
|
2224
|
-
])) :
|
|
2225
|
-
|
|
2226
|
-
l.title || l.$slots.title ? (
|
|
2227
|
-
|
|
2228
|
-
|
|
2325
|
+
])) : P("", !0),
|
|
2326
|
+
z("div", Uo, [
|
|
2327
|
+
l.title || l.$slots.title ? (h(), _("div", Zo, [
|
|
2328
|
+
V(l.$slots, "title", {}, () => [
|
|
2329
|
+
U(R(l.title), 1)
|
|
2229
2330
|
])
|
|
2230
|
-
])) :
|
|
2231
|
-
l.message || l.$slots.default ? (
|
|
2232
|
-
|
|
2233
|
-
|
|
2331
|
+
])) : P("", !0),
|
|
2332
|
+
l.message || l.$slots.default ? (h(), _("div", Jo, [
|
|
2333
|
+
V(l.$slots, "default", {}, () => [
|
|
2334
|
+
U(R(l.message), 1)
|
|
2234
2335
|
])
|
|
2235
|
-
])) :
|
|
2336
|
+
])) : P("", !0)
|
|
2236
2337
|
]),
|
|
2237
|
-
l.$slots.actions ? (
|
|
2238
|
-
|
|
2239
|
-
])) :
|
|
2240
|
-
l.closable ? (
|
|
2338
|
+
l.$slots.actions ? (h(), _("div", Qo, [
|
|
2339
|
+
V(l.$slots, "actions")
|
|
2340
|
+
])) : P("", !0),
|
|
2341
|
+
l.closable ? (h(), _("button", {
|
|
2241
2342
|
key: 2,
|
|
2242
2343
|
class: "vf-alert__close",
|
|
2243
2344
|
type: "button",
|
|
2244
2345
|
"aria-label": "Close",
|
|
2245
2346
|
onClick: c
|
|
2246
2347
|
}, [
|
|
2247
|
-
|
|
2248
|
-
u[0] || (u[0] =
|
|
2348
|
+
V(l.$slots, "close", {}, () => [
|
|
2349
|
+
u[0] || (u[0] = U("×"))
|
|
2249
2350
|
])
|
|
2250
|
-
])) :
|
|
2251
|
-
], 8,
|
|
2252
|
-
[
|
|
2351
|
+
])) : P("", !0)
|
|
2352
|
+
], 8, Xo)), [
|
|
2353
|
+
[pe, i.value]
|
|
2253
2354
|
]);
|
|
2254
2355
|
}
|
|
2255
|
-
}),
|
|
2356
|
+
}), ea = ["checked", "disabled"], ta = {
|
|
2256
2357
|
key: 0,
|
|
2257
2358
|
class: "vf-switch__label"
|
|
2258
|
-
},
|
|
2359
|
+
}, Tr = /* @__PURE__ */ Y({
|
|
2259
2360
|
__name: "switch",
|
|
2260
2361
|
props: {
|
|
2261
2362
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -2264,113 +2365,113 @@ const Pt = (t, e) => t.strategy ? t.strategy : Rt(e) ? "fixed" : "absolute", me
|
|
|
2264
2365
|
},
|
|
2265
2366
|
emits: ["update:modelValue", "change"],
|
|
2266
2367
|
setup(t, { emit: e }) {
|
|
2267
|
-
const r = e, o = t, a =
|
|
2268
|
-
const
|
|
2269
|
-
return o.disabled &&
|
|
2270
|
-
}), d = (
|
|
2271
|
-
const c =
|
|
2272
|
-
r("update:modelValue", c.checked), r("change",
|
|
2368
|
+
const r = e, o = t, a = y(() => {
|
|
2369
|
+
const i = ["vf-switch"];
|
|
2370
|
+
return o.disabled && i.push("vf-switch_disabled"), i;
|
|
2371
|
+
}), d = (i) => {
|
|
2372
|
+
const c = i.target;
|
|
2373
|
+
r("update:modelValue", c.checked), r("change", i);
|
|
2273
2374
|
};
|
|
2274
|
-
return (
|
|
2275
|
-
class:
|
|
2375
|
+
return (i, c) => (h(), _("label", {
|
|
2376
|
+
class: T(a.value)
|
|
2276
2377
|
}, [
|
|
2277
|
-
|
|
2378
|
+
z("input", {
|
|
2278
2379
|
class: "vf-switch__control",
|
|
2279
2380
|
type: "checkbox",
|
|
2280
|
-
checked:
|
|
2281
|
-
disabled:
|
|
2381
|
+
checked: i.modelValue,
|
|
2382
|
+
disabled: i.disabled,
|
|
2282
2383
|
onChange: d
|
|
2283
|
-
}, null, 40,
|
|
2284
|
-
c[0] || (c[0] =
|
|
2285
|
-
|
|
2384
|
+
}, null, 40, ea),
|
|
2385
|
+
c[0] || (c[0] = z("span", { class: "vf-switch__track" }, [
|
|
2386
|
+
z("span", { class: "vf-switch__thumb" })
|
|
2286
2387
|
], -1)),
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2388
|
+
i.label || i.$slots.default ? (h(), _("span", ta, [
|
|
2389
|
+
V(i.$slots, "default", {}, () => [
|
|
2390
|
+
U(R(i.label), 1)
|
|
2290
2391
|
])
|
|
2291
|
-
])) :
|
|
2392
|
+
])) : P("", !0)
|
|
2292
2393
|
], 2));
|
|
2293
2394
|
}
|
|
2294
|
-
}),
|
|
2395
|
+
}), oa = { class: "vf-popover" }, aa = ["aria-expanded", "onKeydown"], Rr = /* @__PURE__ */ Y({
|
|
2295
2396
|
__name: "popover",
|
|
2296
2397
|
emits: ["click", "onClick"],
|
|
2297
2398
|
setup(t, { expose: e, emit: r }) {
|
|
2298
|
-
const o = r, a =
|
|
2399
|
+
const o = r, a = st({ visible: !1 });
|
|
2299
2400
|
let d = 0;
|
|
2300
|
-
const
|
|
2401
|
+
const i = `vf-popover-panel-${++d}`, c = () => a.visible = !0, l = () => a.visible = !1, u = () => a.visible = !a.visible, s = () => {
|
|
2301
2402
|
u(), o("click"), o("onClick");
|
|
2302
2403
|
};
|
|
2303
|
-
return e({ show: c, hide: l, toggle: u }), (
|
|
2304
|
-
|
|
2404
|
+
return e({ show: c, hide: l, toggle: u }), (n, f) => (h(), _("div", oa, [
|
|
2405
|
+
z("div", {
|
|
2305
2406
|
class: "vf-popover__button",
|
|
2306
2407
|
role: "button",
|
|
2307
2408
|
tabindex: "0",
|
|
2308
2409
|
"aria-haspopup": "dialog",
|
|
2309
2410
|
"aria-expanded": a.visible,
|
|
2310
|
-
"aria-controls":
|
|
2311
|
-
onClick:
|
|
2411
|
+
"aria-controls": i,
|
|
2412
|
+
onClick: s,
|
|
2312
2413
|
onKeydown: [
|
|
2313
|
-
|
|
2314
|
-
|
|
2414
|
+
Z(q(s, ["prevent"]), ["enter"]),
|
|
2415
|
+
Z(q(s, ["prevent"]), ["space"])
|
|
2315
2416
|
]
|
|
2316
2417
|
}, [
|
|
2317
|
-
|
|
2318
|
-
], 40,
|
|
2319
|
-
|
|
2320
|
-
id:
|
|
2418
|
+
V(n.$slots, "button")
|
|
2419
|
+
], 40, aa),
|
|
2420
|
+
fe(Ze(_t, {
|
|
2421
|
+
id: i,
|
|
2321
2422
|
class: "vf-popover__wrapper"
|
|
2322
|
-
},
|
|
2323
|
-
default:
|
|
2324
|
-
f[0] || (f[0] =
|
|
2423
|
+
}, it({
|
|
2424
|
+
default: _e(() => [
|
|
2425
|
+
f[0] || (f[0] = z("div", { class: "vf-popover__arrow" }, null, -1))
|
|
2325
2426
|
]),
|
|
2326
2427
|
_: 2
|
|
2327
2428
|
}, [
|
|
2328
|
-
|
|
2429
|
+
n.$slots.default ? {
|
|
2329
2430
|
name: "default",
|
|
2330
|
-
fn:
|
|
2331
|
-
|
|
2431
|
+
fn: _e(() => [
|
|
2432
|
+
V(n.$slots, "default")
|
|
2332
2433
|
]),
|
|
2333
2434
|
key: "0"
|
|
2334
2435
|
} : void 0,
|
|
2335
|
-
|
|
2436
|
+
n.$slots.header || n.$slots.popoverHeader ? {
|
|
2336
2437
|
name: "header",
|
|
2337
|
-
fn:
|
|
2338
|
-
|
|
2339
|
-
|
|
2438
|
+
fn: _e(() => [
|
|
2439
|
+
V(n.$slots, "header"),
|
|
2440
|
+
n.$slots.header ? P("", !0) : V(n.$slots, "popoverHeader", { key: 0 })
|
|
2340
2441
|
]),
|
|
2341
2442
|
key: "1"
|
|
2342
2443
|
} : void 0,
|
|
2343
|
-
|
|
2444
|
+
n.$slots.body || n.$slots.popoverBody ? {
|
|
2344
2445
|
name: "body",
|
|
2345
|
-
fn:
|
|
2346
|
-
|
|
2347
|
-
|
|
2446
|
+
fn: _e(() => [
|
|
2447
|
+
V(n.$slots, "body"),
|
|
2448
|
+
n.$slots.body ? P("", !0) : V(n.$slots, "popoverBody", { key: 0 })
|
|
2348
2449
|
]),
|
|
2349
2450
|
key: "2"
|
|
2350
2451
|
} : void 0,
|
|
2351
|
-
|
|
2452
|
+
n.$slots.footer || n.$slots.popoverFooter ? {
|
|
2352
2453
|
name: "footer",
|
|
2353
|
-
fn:
|
|
2354
|
-
|
|
2355
|
-
|
|
2454
|
+
fn: _e(() => [
|
|
2455
|
+
V(n.$slots, "footer"),
|
|
2456
|
+
n.$slots.footer ? P("", !0) : V(n.$slots, "popoverFooter", { key: 0 })
|
|
2356
2457
|
]),
|
|
2357
2458
|
key: "3"
|
|
2358
2459
|
} : void 0
|
|
2359
2460
|
]), 1536), [
|
|
2360
|
-
[
|
|
2461
|
+
[pe, a.visible]
|
|
2361
2462
|
])
|
|
2362
2463
|
]));
|
|
2363
2464
|
}
|
|
2364
|
-
}),
|
|
2465
|
+
}), ra = ["aria-labelledby", "aria-describedby"], la = {
|
|
2365
2466
|
key: 0,
|
|
2366
2467
|
class: "vf-modal__header"
|
|
2367
|
-
},
|
|
2468
|
+
}, na = {
|
|
2368
2469
|
key: 0,
|
|
2369
2470
|
class: "vf-modal__title"
|
|
2370
|
-
},
|
|
2471
|
+
}, sa = {
|
|
2371
2472
|
key: 3,
|
|
2372
2473
|
class: "vf-modal__footer"
|
|
2373
|
-
},
|
|
2474
|
+
}, Pr = /* @__PURE__ */ Y({
|
|
2374
2475
|
__name: "modal",
|
|
2375
2476
|
props: {
|
|
2376
2477
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -2384,111 +2485,111 @@ const Pt = (t, e) => t.strategy ? t.strategy : Rt(e) ? "fixed" : "absolute", me
|
|
|
2384
2485
|
emits: ["update:modelValue", "open", "close"],
|
|
2385
2486
|
setup(t, { expose: e, emit: r }) {
|
|
2386
2487
|
const o = r, a = t;
|
|
2387
|
-
let d = 0,
|
|
2388
|
-
const u =
|
|
2389
|
-
const
|
|
2390
|
-
return a.size !== "md" &&
|
|
2391
|
-
}),
|
|
2488
|
+
let d = 0, i = 0, c = "", l = null;
|
|
2489
|
+
const u = D(null), s = Je(), n = `vf-modal-title-${++d}`, f = `vf-modal-body-${d}`, b = y(() => !!a.title || !!s.header), v = y(() => !!s.body || !!s.default), w = y(() => {
|
|
2490
|
+
const p = ["vf-modal"];
|
|
2491
|
+
return a.size !== "md" && p.push(`vf-modal_${a.size}`), p;
|
|
2492
|
+
}), C = () => o("update:modelValue", !0), $ = () => {
|
|
2392
2493
|
o("update:modelValue", !1), o("close");
|
|
2393
2494
|
}, M = () => {
|
|
2394
|
-
a.closeOnOverlay &&
|
|
2395
|
-
},
|
|
2396
|
-
!a.modelValue || !a.closeOnEsc ||
|
|
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((
|
|
2398
|
-
var
|
|
2399
|
-
const
|
|
2400
|
-
|
|
2401
|
-
},
|
|
2495
|
+
a.closeOnOverlay && $();
|
|
2496
|
+
}, L = (p) => {
|
|
2497
|
+
!a.modelValue || !a.closeOnEsc || p.key === "Escape" && (p.preventDefault(), $());
|
|
2498
|
+
}, 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((m) => !m.hasAttribute("disabled") && !m.getAttribute("aria-hidden")) : [], I = () => {
|
|
2499
|
+
var m;
|
|
2500
|
+
const p = H();
|
|
2501
|
+
p.length ? p[0].focus() : (m = u.value) == null || m.focus();
|
|
2502
|
+
}, O = (p) => {
|
|
2402
2503
|
var X;
|
|
2403
|
-
if (
|
|
2504
|
+
if (p.key !== "Tab")
|
|
2404
2505
|
return;
|
|
2405
|
-
const
|
|
2406
|
-
if (!
|
|
2407
|
-
|
|
2506
|
+
const m = H();
|
|
2507
|
+
if (!m.length) {
|
|
2508
|
+
p.preventDefault(), (X = u.value) == null || X.focus();
|
|
2408
2509
|
return;
|
|
2409
2510
|
}
|
|
2410
|
-
const
|
|
2411
|
-
if (
|
|
2412
|
-
|
|
2511
|
+
const k = m[0], W = m[m.length - 1], A = document.activeElement;
|
|
2512
|
+
if (p.shiftKey && A === k) {
|
|
2513
|
+
p.preventDefault(), W.focus();
|
|
2413
2514
|
return;
|
|
2414
2515
|
}
|
|
2415
|
-
!
|
|
2416
|
-
},
|
|
2417
|
-
!a.lockScroll || typeof document > "u" || (
|
|
2418
|
-
},
|
|
2419
|
-
!a.lockScroll || typeof document > "u" || (
|
|
2516
|
+
!p.shiftKey && A === W && (p.preventDefault(), k.focus());
|
|
2517
|
+
}, E = () => {
|
|
2518
|
+
!a.lockScroll || typeof document > "u" || (i === 0 && (c = document.body.style.overflow, document.body.style.overflow = "hidden"), i += 1);
|
|
2519
|
+
}, F = () => {
|
|
2520
|
+
!a.lockScroll || typeof document > "u" || (i = Math.max(0, i - 1), i === 0 && (document.body.style.overflow = c));
|
|
2420
2521
|
};
|
|
2421
|
-
return
|
|
2522
|
+
return ee(
|
|
2422
2523
|
() => a.modelValue,
|
|
2423
|
-
async (
|
|
2424
|
-
|
|
2524
|
+
async (p) => {
|
|
2525
|
+
p ? (typeof document < "u" && (l = document.activeElement), E(), o("open"), await ke(), I(), typeof document < "u" && document.addEventListener("keydown", L)) : (F(), typeof document < "u" && (document.removeEventListener("keydown", L), l == null || l.focus()));
|
|
2425
2526
|
},
|
|
2426
2527
|
{ immediate: !0 }
|
|
2427
2528
|
), we(() => {
|
|
2428
|
-
|
|
2429
|
-
}), e({ open:
|
|
2430
|
-
|
|
2431
|
-
class:
|
|
2529
|
+
F(), typeof document < "u" && document.removeEventListener("keydown", L);
|
|
2530
|
+
}), e({ open: C, close: $ }), (p, m) => (h(), ne($e, { to: "body" }, [
|
|
2531
|
+
fe(z("div", {
|
|
2532
|
+
class: T(w.value),
|
|
2432
2533
|
role: "presentation"
|
|
2433
2534
|
}, [
|
|
2434
|
-
|
|
2535
|
+
z("div", {
|
|
2435
2536
|
class: "vf-modal__overlay",
|
|
2436
2537
|
onClick: M
|
|
2437
2538
|
}),
|
|
2438
|
-
|
|
2539
|
+
z("div", {
|
|
2439
2540
|
ref_key: "panel",
|
|
2440
2541
|
ref: u,
|
|
2441
2542
|
class: "vf-modal__panel",
|
|
2442
2543
|
role: "dialog",
|
|
2443
2544
|
"aria-modal": "true",
|
|
2444
|
-
"aria-labelledby":
|
|
2545
|
+
"aria-labelledby": b.value ? n : void 0,
|
|
2445
2546
|
"aria-describedby": v.value ? f : void 0,
|
|
2446
2547
|
tabindex: "-1",
|
|
2447
|
-
onKeydown:
|
|
2548
|
+
onKeydown: O
|
|
2448
2549
|
}, [
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
id:
|
|
2550
|
+
b.value ? (h(), _("div", la, [
|
|
2551
|
+
z("div", {
|
|
2552
|
+
id: n,
|
|
2452
2553
|
class: "vf-modal__header-content"
|
|
2453
2554
|
}, [
|
|
2454
|
-
|
|
2455
|
-
|
|
2555
|
+
V(p.$slots, "header", {}, () => [
|
|
2556
|
+
p.title ? (h(), _("h3", na, R(p.title), 1)) : P("", !0)
|
|
2456
2557
|
])
|
|
2457
2558
|
])
|
|
2458
|
-
])) :
|
|
2459
|
-
|
|
2559
|
+
])) : P("", !0),
|
|
2560
|
+
p.showClose ? V(p.$slots, "close", {
|
|
2460
2561
|
key: 1,
|
|
2461
|
-
close:
|
|
2562
|
+
close: $
|
|
2462
2563
|
}, () => [
|
|
2463
|
-
|
|
2564
|
+
z("button", {
|
|
2464
2565
|
type: "button",
|
|
2465
2566
|
class: "vf-modal__close",
|
|
2466
2567
|
"aria-label": "Close",
|
|
2467
|
-
onClick:
|
|
2568
|
+
onClick: $
|
|
2468
2569
|
}, "×")
|
|
2469
|
-
]) :
|
|
2470
|
-
|
|
2570
|
+
]) : P("", !0),
|
|
2571
|
+
p.$slots.body || p.$slots.default ? (h(), _("div", {
|
|
2471
2572
|
key: 2,
|
|
2472
2573
|
id: f,
|
|
2473
2574
|
class: "vf-modal__body"
|
|
2474
2575
|
}, [
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
])) :
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
])) :
|
|
2481
|
-
], 40,
|
|
2576
|
+
V(p.$slots, "body"),
|
|
2577
|
+
p.$slots.body ? P("", !0) : V(p.$slots, "default", { key: 0 })
|
|
2578
|
+
])) : P("", !0),
|
|
2579
|
+
p.$slots.footer ? (h(), _("div", sa, [
|
|
2580
|
+
V(p.$slots, "footer")
|
|
2581
|
+
])) : P("", !0)
|
|
2582
|
+
], 40, ra)
|
|
2482
2583
|
], 2), [
|
|
2483
|
-
[
|
|
2584
|
+
[pe, p.modelValue]
|
|
2484
2585
|
])
|
|
2485
2586
|
]));
|
|
2486
2587
|
}
|
|
2487
|
-
}),
|
|
2588
|
+
}), ia = ["data-placement"], da = { class: "vf-tooltip__content" }, ca = {
|
|
2488
2589
|
key: 0,
|
|
2489
2590
|
class: "vf-tooltip__arrow",
|
|
2490
2591
|
"aria-hidden": "true"
|
|
2491
|
-
},
|
|
2592
|
+
}, Ir = /* @__PURE__ */ Y({
|
|
2492
2593
|
__name: "tooltip",
|
|
2493
2594
|
props: {
|
|
2494
2595
|
text: { default: "" },
|
|
@@ -2499,89 +2600,89 @@ const Pt = (t, e) => t.strategy ? t.strategy : Rt(e) ? "fixed" : "absolute", me
|
|
|
2499
2600
|
setup(t) {
|
|
2500
2601
|
const e = t;
|
|
2501
2602
|
let r = 0;
|
|
2502
|
-
const o =
|
|
2603
|
+
const o = D(null), a = D(null), d = D(!1), i = D("top"), c = `vf-tooltip-${++r}`;
|
|
2503
2604
|
let l = null;
|
|
2504
2605
|
const u = () => {
|
|
2505
2606
|
e.disabled || (d.value = !0);
|
|
2506
|
-
},
|
|
2607
|
+
}, s = () => {
|
|
2507
2608
|
d.value = !1;
|
|
2508
|
-
},
|
|
2609
|
+
}, n = () => {
|
|
2509
2610
|
if (!o.value || !a.value)
|
|
2510
2611
|
return;
|
|
2511
|
-
const
|
|
2612
|
+
const b = o.value, v = a.value, w = async () => {
|
|
2512
2613
|
const {
|
|
2513
|
-
x:
|
|
2614
|
+
x: L,
|
|
2514
2615
|
y: H,
|
|
2515
|
-
placement:
|
|
2516
|
-
} = await Te(
|
|
2616
|
+
placement: I
|
|
2617
|
+
} = await Te(b, v, {
|
|
2517
2618
|
placement: e.placement,
|
|
2518
2619
|
strategy: "fixed",
|
|
2519
|
-
middleware: [Ve(8), Se(),
|
|
2620
|
+
middleware: [Ve(8), Se(), Mt()]
|
|
2520
2621
|
});
|
|
2521
|
-
|
|
2522
|
-
},
|
|
2523
|
-
await
|
|
2524
|
-
},
|
|
2525
|
-
|
|
2622
|
+
i.value = I ?? e.placement, v.style.left = `${L}px`, v.style.top = `${H}px`;
|
|
2623
|
+
}, C = async () => {
|
|
2624
|
+
await w();
|
|
2625
|
+
}, $ = Le(b, () => {
|
|
2626
|
+
C();
|
|
2526
2627
|
}), M = () => {
|
|
2527
|
-
|
|
2628
|
+
C();
|
|
2528
2629
|
};
|
|
2529
2630
|
document.addEventListener("scroll", M, !0), window.addEventListener("resize", M, !1), l = {
|
|
2530
|
-
update:
|
|
2631
|
+
update: C,
|
|
2531
2632
|
destroy: () => {
|
|
2532
|
-
|
|
2633
|
+
$(), document.removeEventListener("scroll", M, !0), window.removeEventListener("resize", M, !1);
|
|
2533
2634
|
}
|
|
2534
2635
|
}, l.update();
|
|
2535
2636
|
};
|
|
2536
|
-
|
|
2537
|
-
if (!
|
|
2637
|
+
ee(d, async (b) => {
|
|
2638
|
+
if (!b) {
|
|
2538
2639
|
l && (l.destroy(), l = null);
|
|
2539
2640
|
return;
|
|
2540
2641
|
}
|
|
2541
|
-
l ||
|
|
2642
|
+
l || n(), l == null || l.update();
|
|
2542
2643
|
}), Fe(() => {
|
|
2543
|
-
d.value &&
|
|
2644
|
+
d.value && n();
|
|
2544
2645
|
}), we(() => {
|
|
2545
2646
|
l == null || l.destroy(), l = null;
|
|
2546
2647
|
});
|
|
2547
|
-
const f =
|
|
2548
|
-
return
|
|
2549
|
-
|
|
2550
|
-
}), (
|
|
2551
|
-
|
|
2648
|
+
const f = y(() => !!e.text || !!(a.value && a.value.textContent));
|
|
2649
|
+
return ee(f, (b) => {
|
|
2650
|
+
b || (d.value = !1);
|
|
2651
|
+
}), (b, v) => (h(), _(ae, null, [
|
|
2652
|
+
z("span", {
|
|
2552
2653
|
ref_key: "trigger",
|
|
2553
2654
|
ref: o,
|
|
2554
2655
|
class: "vf-tooltip__trigger",
|
|
2555
2656
|
"aria-describedby": c,
|
|
2556
2657
|
onMouseenter: u,
|
|
2557
|
-
onMouseleave:
|
|
2658
|
+
onMouseleave: s,
|
|
2558
2659
|
onFocus: u,
|
|
2559
|
-
onBlur:
|
|
2660
|
+
onBlur: s
|
|
2560
2661
|
}, [
|
|
2561
|
-
|
|
2662
|
+
V(b.$slots, "default")
|
|
2562
2663
|
], 544),
|
|
2563
|
-
(
|
|
2564
|
-
|
|
2664
|
+
(h(), ne($e, { to: "body" }, [
|
|
2665
|
+
fe(z("div", {
|
|
2565
2666
|
id: c,
|
|
2566
2667
|
ref_key: "panel",
|
|
2567
2668
|
ref: a,
|
|
2568
2669
|
class: "vf-tooltip",
|
|
2569
2670
|
role: "tooltip",
|
|
2570
|
-
"data-placement":
|
|
2671
|
+
"data-placement": i.value
|
|
2571
2672
|
}, [
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2673
|
+
z("span", da, [
|
|
2674
|
+
V(b.$slots, "content", {}, () => [
|
|
2675
|
+
U(R(b.text), 1)
|
|
2575
2676
|
])
|
|
2576
2677
|
]),
|
|
2577
|
-
|
|
2578
|
-
], 8,
|
|
2579
|
-
[
|
|
2678
|
+
b.arrow ? (h(), _("span", ca)) : P("", !0)
|
|
2679
|
+
], 8, ia), [
|
|
2680
|
+
[pe, d.value]
|
|
2580
2681
|
])
|
|
2581
2682
|
]))
|
|
2582
2683
|
], 64));
|
|
2583
2684
|
}
|
|
2584
|
-
}),
|
|
2685
|
+
}), Or = /* @__PURE__ */ Y({
|
|
2585
2686
|
__name: "skeleton",
|
|
2586
2687
|
props: {
|
|
2587
2688
|
width: {},
|
|
@@ -2593,45 +2694,221 @@ const Pt = (t, e) => t.strategy ? t.strategy : Rt(e) ? "fixed" : "absolute", me
|
|
|
2593
2694
|
const e = t, r = (d) => {
|
|
2594
2695
|
if (!(d == null || d === ""))
|
|
2595
2696
|
return typeof d == "number" ? `${d}px` : d;
|
|
2596
|
-
}, o =
|
|
2597
|
-
const d = r(e.width),
|
|
2598
|
-
return d && (c.width = d),
|
|
2599
|
-
}), a =
|
|
2697
|
+
}, o = y(() => {
|
|
2698
|
+
const d = r(e.width), i = r(e.height), c = {};
|
|
2699
|
+
return d && (c.width = d), i && (c.height = i), e.variant === "circle" && (!d && i && (c.width = i), !i && d && (c.height = d)), c;
|
|
2700
|
+
}), a = y(() => {
|
|
2600
2701
|
const d = ["vf-skeleton", `vf-skeleton_${e.variant}`];
|
|
2601
2702
|
return e.animated && d.push("vf-skeleton_animated"), d;
|
|
2602
2703
|
});
|
|
2603
|
-
return (d,
|
|
2604
|
-
class:
|
|
2605
|
-
style:
|
|
2704
|
+
return (d, i) => (h(), _("div", {
|
|
2705
|
+
class: T(a.value),
|
|
2706
|
+
style: Ee(o.value),
|
|
2606
2707
|
"aria-hidden": "true"
|
|
2607
2708
|
}, null, 6));
|
|
2608
2709
|
}
|
|
2609
|
-
}),
|
|
2710
|
+
}), ua = ["aria-label"], va = {
|
|
2711
|
+
key: 0,
|
|
2712
|
+
class: "vf-datatable__head"
|
|
2713
|
+
}, fa = { class: "vf-datatable__row" }, pa = ["aria-sort"], ba = ["onClick"], ga = { class: "vf-datatable__header-text" }, ma = {
|
|
2714
|
+
key: 1,
|
|
2715
|
+
class: "vf-datatable__header-text"
|
|
2716
|
+
}, ha = { class: "vf-datatable__body" }, ya = {
|
|
2717
|
+
key: 0,
|
|
2718
|
+
class: "vf-datatable__row vf-datatable__row_state"
|
|
2719
|
+
}, _a = ["colspan"], Ca = {
|
|
2720
|
+
key: 1,
|
|
2721
|
+
class: "vf-datatable__row vf-datatable__row_state"
|
|
2722
|
+
}, ka = ["colspan"], wa = ["onClick"], Mr = /* @__PURE__ */ Y({
|
|
2723
|
+
__name: "data-table",
|
|
2724
|
+
props: {
|
|
2725
|
+
rows: { default: () => [] },
|
|
2726
|
+
columns: { default: () => [] },
|
|
2727
|
+
rowKey: { type: [String, Function], default: "id" },
|
|
2728
|
+
sortable: { type: Boolean, default: !1 },
|
|
2729
|
+
sortField: { default: null },
|
|
2730
|
+
sortOrder: { default: null },
|
|
2731
|
+
loading: { type: Boolean, default: !1 },
|
|
2732
|
+
loadingText: { default: "Loading..." },
|
|
2733
|
+
emptyText: { default: "No data" },
|
|
2734
|
+
striped: { type: Boolean, default: !1 },
|
|
2735
|
+
hover: { type: Boolean, default: !0 },
|
|
2736
|
+
size: { default: "normal" },
|
|
2737
|
+
variant: { default: "filled" },
|
|
2738
|
+
showHeader: { type: Boolean, default: !0 },
|
|
2739
|
+
ariaLabel: { default: "Data table" }
|
|
2740
|
+
},
|
|
2741
|
+
emits: ["update:sortField", "update:sortOrder", "sort", "rowClick"],
|
|
2742
|
+
setup(t, { emit: e }) {
|
|
2743
|
+
const r = t, o = e, a = D(r.sortField ?? null), d = D(r.sortOrder ?? null);
|
|
2744
|
+
ee(
|
|
2745
|
+
() => r.sortField,
|
|
2746
|
+
(p) => {
|
|
2747
|
+
a.value = p ?? null;
|
|
2748
|
+
}
|
|
2749
|
+
), ee(
|
|
2750
|
+
() => r.sortOrder,
|
|
2751
|
+
(p) => {
|
|
2752
|
+
d.value = p ?? null;
|
|
2753
|
+
}
|
|
2754
|
+
);
|
|
2755
|
+
const i = y(() => a.value), c = y(() => d.value), l = y(() => Math.max(1, r.columns.length)), u = (p) => p.sortable === !1 ? !1 : p.sortable === !0 ? !0 : r.sortable, s = (p, m) => p == null && m == null ? 0 : p == null ? -1 : m == null ? 1 : typeof p == "number" && typeof m == "number" ? p - m : String(p).localeCompare(String(m)), n = y(() => {
|
|
2756
|
+
const p = r.rows ?? [], m = i.value, k = c.value;
|
|
2757
|
+
return !m || !k ? p : [...p].sort((W, A) => {
|
|
2758
|
+
const X = W == null ? void 0 : W[m], te = A == null ? void 0 : A[m], j = s(X, te);
|
|
2759
|
+
return k === "asc" ? j : -j;
|
|
2760
|
+
});
|
|
2761
|
+
}), f = y(() => {
|
|
2762
|
+
const p = ["vf-datatable", `vf-datatable_${r.variant}`];
|
|
2763
|
+
return r.size !== "normal" && p.push(`vf-datatable_${r.size}`), r.striped && p.push("vf-datatable_striped"), r.hover && p.push("vf-datatable_hover"), p;
|
|
2764
|
+
}), b = (p, m) => {
|
|
2765
|
+
if (typeof r.rowKey == "function")
|
|
2766
|
+
return r.rowKey(p, m);
|
|
2767
|
+
if (r.rowKey && typeof r.rowKey == "string") {
|
|
2768
|
+
const k = p == null ? void 0 : p[r.rowKey];
|
|
2769
|
+
return typeof k == "string" || typeof k == "number" ? k : m;
|
|
2770
|
+
}
|
|
2771
|
+
return m;
|
|
2772
|
+
}, v = (p, m) => p == null ? void 0 : p[m.field], w = (p, m) => {
|
|
2773
|
+
const k = v(p, m);
|
|
2774
|
+
return m.formatter ? m.formatter(p, k, m) : k ?? "";
|
|
2775
|
+
}, C = (p) => {
|
|
2776
|
+
if (!u(p))
|
|
2777
|
+
return;
|
|
2778
|
+
let m = p.field, k = "asc";
|
|
2779
|
+
i.value === p.field && (c.value === "asc" ? k = "desc" : c.value === "desc" ? (m = null, k = null) : k = "asc"), a.value = m, d.value = k, o("update:sortField", m), o("update:sortOrder", k), o("sort", m, k);
|
|
2780
|
+
}, $ = (p) => i.value !== p.field ? "↕" : c.value === "asc" ? "↑" : "↓", M = (p) => i.value !== p.field ? "" : "is-active", L = (p) => {
|
|
2781
|
+
if (u(p))
|
|
2782
|
+
return i.value !== p.field ? "none" : c.value === "asc" ? "ascending" : "descending";
|
|
2783
|
+
}, H = (p) => {
|
|
2784
|
+
const m = [];
|
|
2785
|
+
return r.striped && p % 2 === 1 && m.push("vf-datatable__row_striped"), m;
|
|
2786
|
+
}, I = (p) => {
|
|
2787
|
+
const m = [];
|
|
2788
|
+
return p.align && m.push(`vf-datatable__cell_${p.align}`), u(p) && m.push("vf-datatable__header_sortable"), m;
|
|
2789
|
+
}, O = (p) => {
|
|
2790
|
+
const m = [];
|
|
2791
|
+
return p.align && m.push(`vf-datatable__cell_${p.align}`), m;
|
|
2792
|
+
}, E = (p) => {
|
|
2793
|
+
const m = {};
|
|
2794
|
+
return p.width && (m.width = p.width), p.minWidth && (m.minWidth = p.minWidth), m;
|
|
2795
|
+
}, F = (p, m, k) => {
|
|
2796
|
+
o("rowClick", p, m, k);
|
|
2797
|
+
};
|
|
2798
|
+
return (p, m) => (h(), _("div", {
|
|
2799
|
+
class: T(f.value)
|
|
2800
|
+
}, [
|
|
2801
|
+
z("table", {
|
|
2802
|
+
class: "vf-datatable__table",
|
|
2803
|
+
"aria-label": p.ariaLabel
|
|
2804
|
+
}, [
|
|
2805
|
+
p.showHeader ? (h(), _("thead", va, [
|
|
2806
|
+
z("tr", fa, [
|
|
2807
|
+
(h(!0), _(ae, null, ve(p.columns, (k) => (h(), _("th", {
|
|
2808
|
+
key: k.field,
|
|
2809
|
+
class: T(["vf-datatable__header", I(k)]),
|
|
2810
|
+
style: Ee(E(k)),
|
|
2811
|
+
"aria-sort": L(k),
|
|
2812
|
+
scope: "col"
|
|
2813
|
+
}, [
|
|
2814
|
+
u(k) ? (h(), _("button", {
|
|
2815
|
+
key: 0,
|
|
2816
|
+
type: "button",
|
|
2817
|
+
class: "vf-datatable__sort-button",
|
|
2818
|
+
onClick: (W) => C(k)
|
|
2819
|
+
}, [
|
|
2820
|
+
z("span", ga, [
|
|
2821
|
+
p.$slots[`header-${k.field}`] ? V(p.$slots, `header-${k.field}`, {
|
|
2822
|
+
key: 0,
|
|
2823
|
+
column: k
|
|
2824
|
+
}) : (h(), _(ae, { key: 1 }, [
|
|
2825
|
+
U(R(k.header ?? k.field), 1)
|
|
2826
|
+
], 64))
|
|
2827
|
+
]),
|
|
2828
|
+
z("span", {
|
|
2829
|
+
class: T(["vf-datatable__sort-icon", M(k)])
|
|
2830
|
+
}, R($(k)), 3)
|
|
2831
|
+
], 8, ba)) : (h(), _("span", ma, [
|
|
2832
|
+
p.$slots[`header-${k.field}`] ? V(p.$slots, `header-${k.field}`, {
|
|
2833
|
+
key: 0,
|
|
2834
|
+
column: k
|
|
2835
|
+
}) : (h(), _(ae, { key: 1 }, [
|
|
2836
|
+
U(R(k.header ?? k.field), 1)
|
|
2837
|
+
], 64))
|
|
2838
|
+
]))
|
|
2839
|
+
], 14, pa))), 128))
|
|
2840
|
+
])
|
|
2841
|
+
])) : P("", !0),
|
|
2842
|
+
z("tbody", ha, [
|
|
2843
|
+
p.loading ? (h(), _("tr", ya, [
|
|
2844
|
+
z("td", {
|
|
2845
|
+
class: "vf-datatable__cell vf-datatable__cell_state",
|
|
2846
|
+
colspan: l.value
|
|
2847
|
+
}, [
|
|
2848
|
+
V(p.$slots, "loading", {}, () => [
|
|
2849
|
+
U(R(p.loadingText), 1)
|
|
2850
|
+
])
|
|
2851
|
+
], 8, _a)
|
|
2852
|
+
])) : n.value.length ? (h(!0), _(ae, { key: 2 }, ve(n.value, (k, W) => (h(), _("tr", {
|
|
2853
|
+
key: b(k, W),
|
|
2854
|
+
class: T(["vf-datatable__row", H(W)]),
|
|
2855
|
+
onClick: (A) => F(k, W, A)
|
|
2856
|
+
}, [
|
|
2857
|
+
(h(!0), _(ae, null, ve(p.columns, (A) => (h(), _("td", {
|
|
2858
|
+
key: A.field,
|
|
2859
|
+
class: T(["vf-datatable__cell", O(A)]),
|
|
2860
|
+
style: Ee(E(A))
|
|
2861
|
+
}, [
|
|
2862
|
+
p.$slots[`cell-${A.field}`] ? V(p.$slots, `cell-${A.field}`, {
|
|
2863
|
+
key: 0,
|
|
2864
|
+
row: k,
|
|
2865
|
+
column: A,
|
|
2866
|
+
value: v(k, A),
|
|
2867
|
+
index: W
|
|
2868
|
+
}) : (h(), _(ae, { key: 1 }, [
|
|
2869
|
+
U(R(w(k, A)), 1)
|
|
2870
|
+
], 64))
|
|
2871
|
+
], 6))), 128))
|
|
2872
|
+
], 10, wa))), 128)) : (h(), _("tr", Ca, [
|
|
2873
|
+
z("td", {
|
|
2874
|
+
class: "vf-datatable__cell vf-datatable__cell_state",
|
|
2875
|
+
colspan: l.value
|
|
2876
|
+
}, [
|
|
2877
|
+
V(p.$slots, "empty", {}, () => [
|
|
2878
|
+
U(R(p.emptyText), 1)
|
|
2879
|
+
])
|
|
2880
|
+
], 8, ka)
|
|
2881
|
+
]))
|
|
2882
|
+
])
|
|
2883
|
+
], 8, ua)
|
|
2884
|
+
], 2));
|
|
2885
|
+
}
|
|
2886
|
+
}), $a = ["dark", "light", "theme", "preset", "colors", "components", "colorScheme"], xa = (t) => {
|
|
2610
2887
|
const e = t.replace(/([A-Z])/g, "-$1");
|
|
2611
2888
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
2612
|
-
},
|
|
2613
|
-
if (!
|
|
2889
|
+
}, Ba = (t) => t.filter((e) => !$a.includes(e)).map((e) => xa(e)).join("-").toLowerCase(), Ae = (t) => t.join("."), za = (t) => /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(t), Ne = (t) => {
|
|
2890
|
+
if (!za(t))
|
|
2614
2891
|
return null;
|
|
2615
2892
|
if (t.length === 4) {
|
|
2616
2893
|
const e = t[1], r = t[2], o = t[3];
|
|
2617
2894
|
return `#${e}${e}${r}${r}${o}${o}`;
|
|
2618
2895
|
}
|
|
2619
2896
|
return t.toLowerCase();
|
|
2620
|
-
},
|
|
2621
|
-
const e =
|
|
2897
|
+
}, lt = (t) => {
|
|
2898
|
+
const e = Ne(t);
|
|
2622
2899
|
if (!e)
|
|
2623
2900
|
return [0, 0, 0];
|
|
2624
2901
|
const r = parseInt(e.slice(1), 16), o = r >> 16 & 255, a = r >> 8 & 255, d = r & 255;
|
|
2625
2902
|
return [o, a, d];
|
|
2626
|
-
},
|
|
2627
|
-
const [e, r, o] =
|
|
2903
|
+
}, Xe = (t) => {
|
|
2904
|
+
const [e, r, o] = lt(t);
|
|
2628
2905
|
return `${e}, ${r}, ${o}`;
|
|
2629
|
-
},
|
|
2630
|
-
const o = t / 255, a = e / 255, d = r / 255,
|
|
2631
|
-
let u = 0,
|
|
2632
|
-
const
|
|
2906
|
+
}, Fa = (t, e, r) => {
|
|
2907
|
+
const o = t / 255, a = e / 255, d = r / 255, i = Math.max(o, a, d), c = Math.min(o, a, d), l = i - c;
|
|
2908
|
+
let u = 0, s = 0;
|
|
2909
|
+
const n = (i + c) / 2;
|
|
2633
2910
|
if (l !== 0) {
|
|
2634
|
-
switch (
|
|
2911
|
+
switch (s = l / (1 - Math.abs(2 * n - 1)), i) {
|
|
2635
2912
|
case o:
|
|
2636
2913
|
u = (a - d) / l % 6;
|
|
2637
2914
|
break;
|
|
@@ -2644,32 +2921,32 @@ const Pt = (t, e) => t.strategy ? t.strategy : Rt(e) ? "fixed" : "absolute", me
|
|
|
2644
2921
|
}
|
|
2645
2922
|
u *= 60, u < 0 && (u += 360);
|
|
2646
2923
|
}
|
|
2647
|
-
return [u,
|
|
2648
|
-
},
|
|
2649
|
-
const o = e / 100, a = r / 100, d = (1 - Math.abs(2 * a - 1)) * o,
|
|
2650
|
-
let l = 0, u = 0,
|
|
2651
|
-
t >= 0 && t < 60 ? (l = d, u =
|
|
2652
|
-
const
|
|
2653
|
-
return [
|
|
2654
|
-
},
|
|
2655
|
-
const r =
|
|
2924
|
+
return [u, s * 100, n * 100];
|
|
2925
|
+
}, Sa = (t, e, r) => {
|
|
2926
|
+
const o = e / 100, a = r / 100, d = (1 - Math.abs(2 * a - 1)) * o, i = d * (1 - Math.abs(t / 60 % 2 - 1)), c = a - d / 2;
|
|
2927
|
+
let l = 0, u = 0, s = 0;
|
|
2928
|
+
t >= 0 && t < 60 ? (l = d, u = i, s = 0) : t >= 60 && t < 120 ? (l = i, u = d, s = 0) : t >= 120 && t < 180 ? (l = 0, u = d, s = i) : t >= 180 && t < 240 ? (l = 0, u = i, s = d) : t >= 240 && t < 300 ? (l = i, u = 0, s = d) : (l = d, u = 0, s = i);
|
|
2929
|
+
const n = Math.round((l + c) * 255), f = Math.round((u + c) * 255), b = Math.round((s + c) * 255);
|
|
2930
|
+
return [n, f, b];
|
|
2931
|
+
}, Va = (t, e, r) => `#${[t, e, r].map((o) => o.toString(16).padStart(2, "0")).join("")}`, La = (t, e, r) => Math.min(r, Math.max(e, t)), Ta = (t, e) => {
|
|
2932
|
+
const r = Ne(t);
|
|
2656
2933
|
if (!r)
|
|
2657
2934
|
return t;
|
|
2658
|
-
const [o, a, d] =
|
|
2659
|
-
return
|
|
2660
|
-
},
|
|
2935
|
+
const [o, a, d] = lt(r), [i, c, l] = Fa(o, a, d), s = (e - 5) * 7, n = La(l + s, 0, 100), [f, b, v] = Sa(i, c, n);
|
|
2936
|
+
return Va(f, b, v);
|
|
2937
|
+
}, Oe = (t) => !!t && typeof t == "object" && !Array.isArray(t), Ge = (t, e) => {
|
|
2661
2938
|
if (!e)
|
|
2662
2939
|
return { ...t };
|
|
2663
2940
|
const r = { ...t };
|
|
2664
2941
|
for (const o in e) {
|
|
2665
2942
|
const a = e[o], d = t[o];
|
|
2666
|
-
|
|
2943
|
+
Oe(d) && Oe(a) ? r[o] = Ge(d, a) : r[o] = a;
|
|
2667
2944
|
}
|
|
2668
2945
|
return r;
|
|
2669
|
-
},
|
|
2946
|
+
}, Ra = (t) => {
|
|
2670
2947
|
if (!t)
|
|
2671
2948
|
return null;
|
|
2672
|
-
if (
|
|
2949
|
+
if (Oe(t) && "preset" in t) {
|
|
2673
2950
|
const e = t;
|
|
2674
2951
|
return {
|
|
2675
2952
|
preset: e.preset ?? {},
|
|
@@ -2680,42 +2957,42 @@ const Pt = (t, e) => t.strategy ? t.strategy : Rt(e) ? "fixed" : "absolute", me
|
|
|
2680
2957
|
};
|
|
2681
2958
|
}
|
|
2682
2959
|
return { preset: t };
|
|
2683
|
-
},
|
|
2684
|
-
const e = [], r = [], o = [], a = [], d = (l) => o.push(l),
|
|
2960
|
+
}, Pa = (t) => {
|
|
2961
|
+
const e = [], r = [], o = [], a = [], d = (l) => o.push(l), i = (l) => a.push(l), c = (l, u) => {
|
|
2685
2962
|
if (!(!l || typeof l != "object"))
|
|
2686
|
-
for (const
|
|
2687
|
-
const
|
|
2688
|
-
if (
|
|
2689
|
-
c(
|
|
2963
|
+
for (const s in l) {
|
|
2964
|
+
const n = l[s], f = u.concat([s]);
|
|
2965
|
+
if (Oe(n)) {
|
|
2966
|
+
c(n, f);
|
|
2690
2967
|
continue;
|
|
2691
2968
|
}
|
|
2692
|
-
if (
|
|
2693
|
-
|
|
2969
|
+
if (n && typeof n == "object") {
|
|
2970
|
+
i(`Theme value "${Ae(f)}" is not a plain object or string and will be ignored.`);
|
|
2694
2971
|
continue;
|
|
2695
2972
|
}
|
|
2696
|
-
if (typeof
|
|
2697
|
-
|
|
2973
|
+
if (typeof n != "string") {
|
|
2974
|
+
i(`Theme value "${Ae(f)}" is not a string and will be ignored.`);
|
|
2698
2975
|
continue;
|
|
2699
2976
|
}
|
|
2700
|
-
const v = f.includes("colorScheme") && f.includes("dark") ? r : e,
|
|
2701
|
-
if (v.push(`--vf-${
|
|
2702
|
-
const
|
|
2703
|
-
if (!
|
|
2977
|
+
const v = f.includes("colorScheme") && f.includes("dark") ? r : e, w = Ba(f);
|
|
2978
|
+
if (v.push(`--vf-${w}: ${n}`), f.includes("colors")) {
|
|
2979
|
+
const C = Ne(n);
|
|
2980
|
+
if (!C) {
|
|
2704
2981
|
d(
|
|
2705
|
-
`Theme color "${
|
|
2982
|
+
`Theme color "${Ae(f)}" is not hex. Shade variables will not be generated for it.`
|
|
2706
2983
|
);
|
|
2707
2984
|
continue;
|
|
2708
2985
|
}
|
|
2709
|
-
if (v.push(`--vf-${
|
|
2710
|
-
for (let
|
|
2711
|
-
const M =
|
|
2712
|
-
v.push(`--vf-${
|
|
2986
|
+
if (v.push(`--vf-${w}-rgb: ${Xe(C)}`), s !== "white")
|
|
2987
|
+
for (let $ = 1; $ < 10; ++$) {
|
|
2988
|
+
const M = Ta(C, $);
|
|
2989
|
+
v.push(`--vf-${w}-${$}00: ${M}`), v.push(`--vf-${w}-${$}00-rgb: ${Xe(M)}`);
|
|
2713
2990
|
}
|
|
2714
2991
|
}
|
|
2715
2992
|
}
|
|
2716
2993
|
};
|
|
2717
2994
|
return c(t, []), { baseVars: e, darkVars: r, warnings: o, errors: a };
|
|
2718
|
-
},
|
|
2995
|
+
}, Ia = (t) => {
|
|
2719
2996
|
if (typeof document > "u")
|
|
2720
2997
|
return null;
|
|
2721
2998
|
const e = document.getElementById(t);
|
|
@@ -2723,48 +3000,48 @@ const Pt = (t, e) => t.strategy ? t.strategy : Rt(e) ? "fixed" : "absolute", me
|
|
|
2723
3000
|
return e;
|
|
2724
3001
|
const r = document.createElement("style");
|
|
2725
3002
|
return r.id = t, document.head.appendChild(r), r;
|
|
2726
|
-
},
|
|
3003
|
+
}, Oa = (t) => ({
|
|
2727
3004
|
selector: t.selector ?? ":root",
|
|
2728
3005
|
darkSelector: t.darkSelector ?? ":root[data-theme=dark]"
|
|
2729
|
-
}),
|
|
2730
|
-
const { baseVars: a, darkVars: d, warnings:
|
|
3006
|
+
}), Ma = (t, e, r, o) => {
|
|
3007
|
+
const { baseVars: a, darkVars: d, warnings: i, errors: c } = Pa(t), l = Ia("vueforge-theme");
|
|
2731
3008
|
if (!l)
|
|
2732
3009
|
return;
|
|
2733
3010
|
if (c.length) {
|
|
2734
3011
|
if (o)
|
|
2735
3012
|
throw new Error(`[VueForge] ${c.join(" ")}`);
|
|
2736
|
-
for (const
|
|
2737
|
-
console.warn(`[VueForge] ${
|
|
3013
|
+
for (const s of c)
|
|
3014
|
+
console.warn(`[VueForge] ${s}`);
|
|
2738
3015
|
}
|
|
2739
|
-
if (
|
|
2740
|
-
for (const
|
|
2741
|
-
console.warn(`[VueForge] ${
|
|
3016
|
+
if (i.length)
|
|
3017
|
+
for (const s of i)
|
|
3018
|
+
console.warn(`[VueForge] ${s}`);
|
|
2742
3019
|
const u = [];
|
|
2743
3020
|
a.length && u.push(`${e} { ${a.join(";")} }`), d.length && u.push(`${r} { ${d.join(";")} }`), l.textContent = u.join(`
|
|
2744
3021
|
`);
|
|
2745
3022
|
};
|
|
2746
|
-
let
|
|
2747
|
-
const
|
|
2748
|
-
const e =
|
|
3023
|
+
let me = null;
|
|
3024
|
+
const nt = (t) => {
|
|
3025
|
+
const e = Ra(t);
|
|
2749
3026
|
if (!e)
|
|
2750
3027
|
return;
|
|
2751
|
-
const r =
|
|
2752
|
-
|
|
2753
|
-
},
|
|
2754
|
-
if (!
|
|
3028
|
+
const r = Ge(e.preset, e.overrides), { selector: o, darkSelector: a } = Oa(e);
|
|
3029
|
+
me = { ...e }, Ma(r, o, a, e.strict);
|
|
3030
|
+
}, Dr = (t) => {
|
|
3031
|
+
if (!me)
|
|
2755
3032
|
return;
|
|
2756
|
-
const e = t.overrides === void 0 ?
|
|
2757
|
-
preset: t.preset ??
|
|
3033
|
+
const e = t.overrides === void 0 ? me.overrides : Ge(me.overrides ?? {}, t.overrides ?? {}), r = {
|
|
3034
|
+
preset: t.preset ?? me.preset,
|
|
2758
3035
|
overrides: e,
|
|
2759
|
-
selector: t.selector ??
|
|
2760
|
-
darkSelector: t.darkSelector ??
|
|
3036
|
+
selector: t.selector ?? me.selector,
|
|
3037
|
+
darkSelector: t.darkSelector ?? me.darkSelector
|
|
2761
3038
|
};
|
|
2762
|
-
|
|
2763
|
-
},
|
|
3039
|
+
nt(r);
|
|
3040
|
+
}, Wr = () => me ? { ...me } : null, Ar = {
|
|
2764
3041
|
install(t, e = {}) {
|
|
2765
|
-
e.theme &&
|
|
3042
|
+
e.theme && nt(e.theme);
|
|
2766
3043
|
}
|
|
2767
|
-
},
|
|
3044
|
+
}, qe = {
|
|
2768
3045
|
colors: {
|
|
2769
3046
|
white: "#ffffff",
|
|
2770
3047
|
green: "#0cbc87",
|
|
@@ -2827,7 +3104,7 @@ const rt = (t) => {
|
|
|
2827
3104
|
dividerColor: "#2e2e32"
|
|
2828
3105
|
}
|
|
2829
3106
|
}
|
|
2830
|
-
},
|
|
3107
|
+
}, Da = {
|
|
2831
3108
|
fontSize: "var(--vf-typography-font-size)",
|
|
2832
3109
|
padding: "var(--vf-controls-padding-y) var(--vf-controls-padding-x)",
|
|
2833
3110
|
borderRadius: "var(--vf-radii-md)",
|
|
@@ -2969,11 +3246,11 @@ const rt = (t) => {
|
|
|
2969
3246
|
}
|
|
2970
3247
|
}
|
|
2971
3248
|
}
|
|
2972
|
-
},
|
|
3249
|
+
}, Wa = {
|
|
2973
3250
|
padding: "12px",
|
|
2974
3251
|
borderColor: "var(--vf-border-color)",
|
|
2975
3252
|
borderRadius: "var(--vf-radii-md)"
|
|
2976
|
-
},
|
|
3253
|
+
}, Aa = {
|
|
2977
3254
|
gap: "0.5rem",
|
|
2978
3255
|
fontSize: "var(--vf-typography-font-size)",
|
|
2979
3256
|
padding: "var(--vf-controls-padding-y) var(--vf-controls-padding-x)",
|
|
@@ -2994,7 +3271,7 @@ const rt = (t) => {
|
|
|
2994
3271
|
padding: "var(--vf-sizes-lg-padding-y) var(--vf-sizes-lg-padding-x)",
|
|
2995
3272
|
fontSize: "var(--vf-sizes-lg-font-size)"
|
|
2996
3273
|
}
|
|
2997
|
-
},
|
|
3274
|
+
}, Ea = {
|
|
2998
3275
|
gap: "0.375rem",
|
|
2999
3276
|
textColor: "var(--vf-text-color)",
|
|
3000
3277
|
labelFontSize: "0.875rem",
|
|
@@ -3014,7 +3291,7 @@ const rt = (t) => {
|
|
|
3014
3291
|
labelFontSize: "0.9375rem",
|
|
3015
3292
|
hintFontSize: "0.875rem"
|
|
3016
3293
|
}
|
|
3017
|
-
},
|
|
3294
|
+
}, Ha = {
|
|
3018
3295
|
gap: "0.5rem",
|
|
3019
3296
|
fontSize: "var(--vf-typography-font-size)",
|
|
3020
3297
|
padding: "var(--vf-controls-padding-y) var(--vf-controls-padding-x)",
|
|
@@ -3037,10 +3314,10 @@ const rt = (t) => {
|
|
|
3037
3314
|
padding: "var(--vf-sizes-lg-padding-y) var(--vf-sizes-lg-padding-x)",
|
|
3038
3315
|
fontSize: "var(--vf-sizes-lg-font-size)"
|
|
3039
3316
|
}
|
|
3040
|
-
},
|
|
3317
|
+
}, Ka = {
|
|
3041
3318
|
hoverColor: "var(--vf-blue)",
|
|
3042
3319
|
activeColor: "var(--vf-blue)"
|
|
3043
|
-
},
|
|
3320
|
+
}, Na = {
|
|
3044
3321
|
iconGap: "6px",
|
|
3045
3322
|
submenuOffset: "12px",
|
|
3046
3323
|
separatorThickness: "1px",
|
|
@@ -3060,7 +3337,7 @@ const rt = (t) => {
|
|
|
3060
3337
|
marginBottom: "0.5rem",
|
|
3061
3338
|
marginLeft: "0.5rem"
|
|
3062
3339
|
}
|
|
3063
|
-
},
|
|
3340
|
+
}, Ga = {
|
|
3064
3341
|
width: "90vw",
|
|
3065
3342
|
maxWidth: "520px",
|
|
3066
3343
|
maxHeight: "80vh",
|
|
@@ -3087,9 +3364,9 @@ const rt = (t) => {
|
|
|
3087
3364
|
closeColor: "var(--vf-text-color)",
|
|
3088
3365
|
closeFontSize: "1.25rem",
|
|
3089
3366
|
closeHoverBackgroundColor: "rgba(0, 0, 0, 0.06)"
|
|
3090
|
-
},
|
|
3367
|
+
}, Ya = {
|
|
3091
3368
|
backgroundColor: "var(--vf-bg-color)"
|
|
3092
|
-
},
|
|
3369
|
+
}, ja = {
|
|
3093
3370
|
minWidth: "12rem",
|
|
3094
3371
|
fontSize: "var(--vf-typography-font-size)",
|
|
3095
3372
|
controlGap: "0.75rem",
|
|
@@ -3122,7 +3399,7 @@ const rt = (t) => {
|
|
|
3122
3399
|
padding: "var(--vf-sizes-lg-padding-y) var(--vf-sizes-lg-padding-x)",
|
|
3123
3400
|
fontSize: "var(--vf-sizes-lg-font-size)"
|
|
3124
3401
|
}
|
|
3125
|
-
},
|
|
3402
|
+
}, Xa = {
|
|
3126
3403
|
minWidth: "12rem",
|
|
3127
3404
|
fontSize: "var(--vf-typography-font-size)",
|
|
3128
3405
|
controlGap: "0.5rem",
|
|
@@ -3161,7 +3438,7 @@ const rt = (t) => {
|
|
|
3161
3438
|
padding: "var(--vf-sizes-lg-padding-y) var(--vf-sizes-lg-padding-x)",
|
|
3162
3439
|
fontSize: "var(--vf-sizes-lg-font-size)"
|
|
3163
3440
|
}
|
|
3164
|
-
},
|
|
3441
|
+
}, qa = {
|
|
3165
3442
|
minWidth: "12rem",
|
|
3166
3443
|
fontSize: "var(--vf-typography-font-size)",
|
|
3167
3444
|
controlGap: "0.5rem",
|
|
@@ -3206,7 +3483,7 @@ const rt = (t) => {
|
|
|
3206
3483
|
padding: "var(--vf-sizes-lg-padding-y) var(--vf-sizes-lg-padding-x)",
|
|
3207
3484
|
fontSize: "var(--vf-sizes-lg-font-size)"
|
|
3208
3485
|
}
|
|
3209
|
-
},
|
|
3486
|
+
}, Ua = {
|
|
3210
3487
|
minWidth: "12rem",
|
|
3211
3488
|
fontSize: "var(--vf-typography-font-size)",
|
|
3212
3489
|
controlGap: "0.75rem",
|
|
@@ -3256,7 +3533,7 @@ const rt = (t) => {
|
|
|
3256
3533
|
fontSize: "var(--vf-sizes-lg-font-size)",
|
|
3257
3534
|
daySize: "2.2rem"
|
|
3258
3535
|
}
|
|
3259
|
-
},
|
|
3536
|
+
}, Za = {
|
|
3260
3537
|
gap: "0.4rem",
|
|
3261
3538
|
itemMinWidth: "2rem",
|
|
3262
3539
|
fontSize: "var(--vf-typography-font-size)",
|
|
@@ -3281,7 +3558,7 @@ const rt = (t) => {
|
|
|
3281
3558
|
fontSize: "var(--vf-sizes-lg-font-size)",
|
|
3282
3559
|
padding: "0.45rem 0.8rem"
|
|
3283
3560
|
}
|
|
3284
|
-
},
|
|
3561
|
+
}, Ja = {
|
|
3285
3562
|
size: "1rem",
|
|
3286
3563
|
gap: "0.5rem",
|
|
3287
3564
|
borderRadius: "var(--vf-radii-sm)",
|
|
@@ -3293,7 +3570,7 @@ const rt = (t) => {
|
|
|
3293
3570
|
checkColor: "#ffffff",
|
|
3294
3571
|
textColor: "var(--vf-text-color)",
|
|
3295
3572
|
disabledOpacity: "var(--vf-states-disabled-opacity)"
|
|
3296
|
-
},
|
|
3573
|
+
}, Qa = {
|
|
3297
3574
|
size: "1rem",
|
|
3298
3575
|
dotSize: "0.45rem",
|
|
3299
3576
|
gap: "0.5rem",
|
|
@@ -3307,7 +3584,7 @@ const rt = (t) => {
|
|
|
3307
3584
|
dotColor: "#ffffff",
|
|
3308
3585
|
textColor: "var(--vf-text-color)",
|
|
3309
3586
|
disabledOpacity: "var(--vf-states-disabled-opacity)"
|
|
3310
|
-
},
|
|
3587
|
+
}, er = {
|
|
3311
3588
|
width: "2.25rem",
|
|
3312
3589
|
height: "1.25rem",
|
|
3313
3590
|
thumbSize: "1rem",
|
|
@@ -3319,7 +3596,7 @@ const rt = (t) => {
|
|
|
3319
3596
|
thumbColor: "#ffffff",
|
|
3320
3597
|
textColor: "var(--vf-text-color)",
|
|
3321
3598
|
disabledOpacity: "var(--vf-states-disabled-opacity)"
|
|
3322
|
-
},
|
|
3599
|
+
}, tr = {
|
|
3323
3600
|
gap: "0.75rem",
|
|
3324
3601
|
listGap: "0.5rem",
|
|
3325
3602
|
listBorderWidth: "1px",
|
|
@@ -3340,7 +3617,38 @@ const rt = (t) => {
|
|
|
3340
3617
|
panelBackgroundColor: "transparent",
|
|
3341
3618
|
panelTextColor: "var(--vf-text-color)",
|
|
3342
3619
|
disabledOpacity: "var(--vf-states-disabled-opacity)"
|
|
3343
|
-
},
|
|
3620
|
+
}, or = {
|
|
3621
|
+
gap: "0.75rem",
|
|
3622
|
+
borderRadius: "var(--vf-radii-md)",
|
|
3623
|
+
borderColor: "var(--vf-border-color)",
|
|
3624
|
+
backgroundColor: "var(--vf-bg-color)",
|
|
3625
|
+
headerGap: "0.75rem",
|
|
3626
|
+
headerPadding: "0.75rem 0.9rem",
|
|
3627
|
+
headerFontSize: "0.95rem",
|
|
3628
|
+
headerFontWeight: "600",
|
|
3629
|
+
headerTextColor: "var(--vf-text-color)",
|
|
3630
|
+
headerBackgroundColor: "var(--vf-bg-color)",
|
|
3631
|
+
headerHoverBackgroundColor: "var(--vf-bg-soft-color)",
|
|
3632
|
+
headerActiveBackgroundColor: "var(--vf-bg-soft-color)",
|
|
3633
|
+
contentPadding: "0.75rem 0.9rem",
|
|
3634
|
+
contentTextColor: "var(--vf-text-color)",
|
|
3635
|
+
contentBackgroundColor: "var(--vf-bg-color)",
|
|
3636
|
+
iconSize: "1rem",
|
|
3637
|
+
iconColor: "var(--vf-secondary-text-color)",
|
|
3638
|
+
dividerColor: "var(--vf-divider-color)",
|
|
3639
|
+
focusRingShadow: "var(--vf-states-focus-ring-shadow)",
|
|
3640
|
+
disabledOpacity: "var(--vf-states-disabled-opacity)",
|
|
3641
|
+
small: {
|
|
3642
|
+
headerPadding: "0.5rem 0.75rem",
|
|
3643
|
+
headerFontSize: "0.875rem",
|
|
3644
|
+
contentPadding: "0.5rem 0.75rem"
|
|
3645
|
+
},
|
|
3646
|
+
large: {
|
|
3647
|
+
headerPadding: "0.9rem 1.1rem",
|
|
3648
|
+
headerFontSize: "1rem",
|
|
3649
|
+
contentPadding: "0.9rem 1.1rem"
|
|
3650
|
+
}
|
|
3651
|
+
}, ar = {
|
|
3344
3652
|
padding: "0.35rem 0.6rem",
|
|
3345
3653
|
borderRadius: "8px",
|
|
3346
3654
|
backgroundColor: "rgba(0, 0, 0, 0.8)",
|
|
@@ -3351,7 +3659,7 @@ const rt = (t) => {
|
|
|
3351
3659
|
zIndex: "120",
|
|
3352
3660
|
maxWidth: "240px",
|
|
3353
3661
|
arrowSize: "8px"
|
|
3354
|
-
},
|
|
3662
|
+
}, rr = {
|
|
3355
3663
|
width: "100%",
|
|
3356
3664
|
height: "1rem",
|
|
3357
3665
|
lineHeight: "0.9rem",
|
|
@@ -3359,7 +3667,38 @@ const rt = (t) => {
|
|
|
3359
3667
|
backgroundColor: "var(--vf-gutter-color)",
|
|
3360
3668
|
shimmerColor: "var(--vf-bg-color)",
|
|
3361
3669
|
animationDuration: "2s"
|
|
3362
|
-
},
|
|
3670
|
+
}, lr = {
|
|
3671
|
+
borderColor: "var(--vf-border-color)",
|
|
3672
|
+
borderRadius: "var(--vf-radii-md)",
|
|
3673
|
+
backgroundColor: "var(--vf-bg-color)",
|
|
3674
|
+
fontSize: "var(--vf-typography-font-size)",
|
|
3675
|
+
textColor: "var(--vf-text-color)",
|
|
3676
|
+
headerBackgroundColor: "var(--vf-bg-soft-color)",
|
|
3677
|
+
headerTextColor: "var(--vf-text-color)",
|
|
3678
|
+
headerFontSize: "var(--vf-typography-font-size)",
|
|
3679
|
+
headerFontWeight: "600",
|
|
3680
|
+
headerBorderColor: "var(--vf-divider-color)",
|
|
3681
|
+
headerGap: "0.35rem",
|
|
3682
|
+
rowBackgroundColor: "var(--vf-bg-color)",
|
|
3683
|
+
rowTextColor: "var(--vf-text-color)",
|
|
3684
|
+
rowBorderColor: "var(--vf-divider-color)",
|
|
3685
|
+
cellPadding: "0.6rem 0.75rem",
|
|
3686
|
+
stripedBackgroundColor: "var(--vf-bg-soft-color)",
|
|
3687
|
+
hoverBackgroundColor: "rgba(var(--vf-blue-600-rgb), 0.06)",
|
|
3688
|
+
sortIconColor: "var(--vf-secondary-text-color)",
|
|
3689
|
+
sortIconActiveColor: "var(--vf-blue-600)",
|
|
3690
|
+
sortIconSize: "0.8rem",
|
|
3691
|
+
statePadding: "1rem",
|
|
3692
|
+
stateTextColor: "var(--vf-secondary-text-color)",
|
|
3693
|
+
small: {
|
|
3694
|
+
fontSize: "var(--vf-sizes-sm-font-size)",
|
|
3695
|
+
cellPadding: "0.45rem 0.6rem"
|
|
3696
|
+
},
|
|
3697
|
+
large: {
|
|
3698
|
+
fontSize: "var(--vf-sizes-lg-font-size)",
|
|
3699
|
+
cellPadding: "0.75rem 0.9rem"
|
|
3700
|
+
}
|
|
3701
|
+
}, nr = {
|
|
3363
3702
|
gap: "0.75rem",
|
|
3364
3703
|
padding: "0.75rem 0.9rem",
|
|
3365
3704
|
borderRadius: "var(--vf-radii-md)",
|
|
@@ -3398,7 +3737,7 @@ const rt = (t) => {
|
|
|
3398
3737
|
borderColor: "rgba(var(--vf-red-600-rgb), 0.45)",
|
|
3399
3738
|
textColor: "var(--vf-text-color)"
|
|
3400
3739
|
}
|
|
3401
|
-
},
|
|
3740
|
+
}, sr = {
|
|
3402
3741
|
gap: "0.75rem",
|
|
3403
3742
|
padding: "0.75rem 0.9rem",
|
|
3404
3743
|
borderRadius: "var(--vf-radii-md)",
|
|
@@ -3436,64 +3775,69 @@ const rt = (t) => {
|
|
|
3436
3775
|
borderColor: "rgba(var(--vf-red-600-rgb), 0.45)",
|
|
3437
3776
|
textColor: "var(--vf-text-color)"
|
|
3438
3777
|
}
|
|
3439
|
-
},
|
|
3440
|
-
...
|
|
3778
|
+
}, Er = {
|
|
3779
|
+
...qe,
|
|
3441
3780
|
components: {
|
|
3442
|
-
base:
|
|
3443
|
-
button:
|
|
3444
|
-
card:
|
|
3445
|
-
input:
|
|
3446
|
-
formField:
|
|
3447
|
-
textarea:
|
|
3448
|
-
link:
|
|
3449
|
-
menu:
|
|
3450
|
-
modal:
|
|
3451
|
-
popover:
|
|
3452
|
-
select:
|
|
3453
|
-
autocomplete:
|
|
3454
|
-
multiselect:
|
|
3455
|
-
datepicker:
|
|
3456
|
-
pagination:
|
|
3457
|
-
checkbox:
|
|
3458
|
-
radio:
|
|
3459
|
-
switch:
|
|
3460
|
-
tabs:
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3781
|
+
base: qe,
|
|
3782
|
+
button: Da,
|
|
3783
|
+
card: Wa,
|
|
3784
|
+
input: Aa,
|
|
3785
|
+
formField: Ea,
|
|
3786
|
+
textarea: Ha,
|
|
3787
|
+
link: Ka,
|
|
3788
|
+
menu: Na,
|
|
3789
|
+
modal: Ga,
|
|
3790
|
+
popover: Ya,
|
|
3791
|
+
select: ja,
|
|
3792
|
+
autocomplete: Xa,
|
|
3793
|
+
multiselect: qa,
|
|
3794
|
+
datepicker: Ua,
|
|
3795
|
+
pagination: Za,
|
|
3796
|
+
checkbox: Ja,
|
|
3797
|
+
radio: Qa,
|
|
3798
|
+
switch: er,
|
|
3799
|
+
tabs: tr,
|
|
3800
|
+
accordion: or,
|
|
3801
|
+
tooltip: ar,
|
|
3802
|
+
skeleton: rr,
|
|
3803
|
+
datatable: lr,
|
|
3804
|
+
toast: nr,
|
|
3805
|
+
alert: sr
|
|
3465
3806
|
}
|
|
3466
3807
|
};
|
|
3467
3808
|
export {
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3809
|
+
zr as Accordion,
|
|
3810
|
+
Fr as AccordionItem,
|
|
3811
|
+
Lr as Alert,
|
|
3812
|
+
mr as Autocomplete,
|
|
3813
|
+
vr as Button,
|
|
3814
|
+
_t as Card,
|
|
3815
|
+
Cr as Checkbox,
|
|
3816
|
+
Mr as DataTable,
|
|
3817
|
+
yr as DatePicker,
|
|
3818
|
+
Er as DefaultTheme,
|
|
3819
|
+
pr as FormField,
|
|
3820
|
+
fr as Input,
|
|
3821
|
+
Qe as Link,
|
|
3822
|
+
ur as Menu,
|
|
3823
|
+
Pr as Modal,
|
|
3824
|
+
hr as MultiSelect,
|
|
3825
|
+
_r as Pagination,
|
|
3826
|
+
Rr as Popover,
|
|
3827
|
+
wr as RadioButton,
|
|
3828
|
+
kr as RadioGroup,
|
|
3829
|
+
gr as Select,
|
|
3830
|
+
Or as Skeleton,
|
|
3831
|
+
Tr as Switch,
|
|
3832
|
+
xr as Tab,
|
|
3833
|
+
Br as TabPanel,
|
|
3834
|
+
$r as Tabs,
|
|
3835
|
+
br as Textarea,
|
|
3836
|
+
Sr as Toast,
|
|
3837
|
+
Vr as ToastContainer,
|
|
3838
|
+
Ir as Tooltip,
|
|
3839
|
+
Ar as VueForge,
|
|
3840
|
+
Wr as getTheme,
|
|
3841
|
+
nt as setTheme,
|
|
3842
|
+
Dr as updateTheme
|
|
3499
3843
|
};
|