@codemonster-ru/vueforge 0.17.0 → 0.19.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 +107 -2
- package/dist/index.css +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.ts.mjs +1451 -1039
- package/dist/index.ts.umd.js +3 -3
- package/dist/package/components/__tests__/alert.test.d.ts +1 -0
- package/dist/package/components/__tests__/multiselect.test.d.ts +1 -0
- package/dist/package/components/alert.vue.d.ts +42 -0
- package/dist/package/components/multi-select.vue.d.ts +60 -0
- package/dist/package/config/theme-core.d.ts +87 -0
- package/dist/package/themes/default/components/alert.d.ts +40 -0
- package/dist/package/themes/default/components/multiselect.d.ts +47 -0
- package/dist/package/themes/default/index.d.ts +85 -0
- package/package.json +1 -1
package/dist/index.ts.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as Z, ref as R, computed as g, watch as ee, resolveComponent as Xe, openBlock as m, createElementBlock as h, normalizeClass as E, renderSlot as F, Fragment as ue, createTextVNode as ae, toDisplayString as M, createBlock as le, withCtx as ye, createCommentVNode as V, createElementVNode as B, renderList as Be, withKeys as q, withModifiers as Y, unref as $e, createVNode as qe, useSlots as Ue, nextTick as ke, onMounted as Fe, onBeforeUnmount as Ce, Teleport as we, withDirectives as ve, vShow as fe, provide as Ze, inject as Me, reactive as lt, createSlots as nt } from "vue";
|
|
2
2
|
import { useRoute as st, useRouter as it } from "vue-router";
|
|
3
|
-
import { CmIcon as
|
|
4
|
-
const dt = ["href", "aria-disabled", "tabindex"],
|
|
3
|
+
import { CmIcon as xe } from "@codemonster-ru/vueiconify";
|
|
4
|
+
const dt = ["href", "aria-disabled", "tabindex"], Je = /* @__PURE__ */ Z({
|
|
5
5
|
__name: "link",
|
|
6
6
|
props: {
|
|
7
7
|
to: { default: void 0 },
|
|
@@ -15,48 +15,48 @@ const dt = ["href", "aria-disabled", "tabindex"], Ue = /* @__PURE__ */ Y({
|
|
|
15
15
|
},
|
|
16
16
|
emits: ["click", "active", "update:active", "onActive"],
|
|
17
17
|
setup(t, { emit: e }) {
|
|
18
|
-
const r = e, o = t, a = st(), u = it(),
|
|
18
|
+
const r = e, o = t, a = st(), u = it(), d = R(null), c = g(() => o.href ?? o.url), l = g(() => 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"), i = g(() => o.to), n = g(() => o.to ? u.resolve(o.to) : null), s = g(() => {
|
|
19
19
|
if (l.value !== "router-link")
|
|
20
20
|
return !1;
|
|
21
21
|
const f = n.value;
|
|
22
|
-
return f ? f.name ? a.matched.some(({ name:
|
|
23
|
-
}), v = g(() => o.active === void 0 ?
|
|
22
|
+
return f ? f.name ? a.matched.some(({ name: C }) => C === f.name) : f.fullPath ? a.fullPath === f.fullPath : a.path === f.path : !1;
|
|
23
|
+
}), v = g(() => o.active === void 0 ? s.value : o.active), b = (f) => {
|
|
24
24
|
if (!o.disabled) {
|
|
25
25
|
r("click", f);
|
|
26
26
|
return;
|
|
27
27
|
}
|
|
28
28
|
f.preventDefault(), f.stopPropagation();
|
|
29
29
|
};
|
|
30
|
-
return
|
|
30
|
+
return ee(s, (f) => {
|
|
31
31
|
f && (r("active"), r("onActive")), r("update:active", f);
|
|
32
|
-
}), (f,
|
|
33
|
-
const
|
|
34
|
-
return l.value === "a" ? (
|
|
32
|
+
}), (f, C) => {
|
|
33
|
+
const $ = Xe("router-link");
|
|
34
|
+
return l.value === "a" ? (m(), h("a", {
|
|
35
35
|
key: 0,
|
|
36
36
|
href: c.value,
|
|
37
|
-
class:
|
|
37
|
+
class: E(["vf-link", { "vf-link_active": v.value, "vf-link_disabled": f.disabled }]),
|
|
38
38
|
"aria-disabled": f.disabled,
|
|
39
39
|
tabindex: f.disabled ? -1 : void 0,
|
|
40
|
-
onClick:
|
|
40
|
+
onClick: b
|
|
41
41
|
}, [
|
|
42
|
-
f.$slots.default ?
|
|
43
|
-
|
|
42
|
+
f.$slots.default ? F(f.$slots, "default", { key: 0 }) : (m(), h(ue, { key: 1 }, [
|
|
43
|
+
ae(M(f.label), 1)
|
|
44
44
|
], 64))
|
|
45
|
-
], 10, dt)) : (
|
|
45
|
+
], 10, dt)) : (m(), le($, {
|
|
46
46
|
key: 1,
|
|
47
47
|
ref_key: "link",
|
|
48
|
-
ref:
|
|
49
|
-
to:
|
|
50
|
-
class:
|
|
48
|
+
ref: d,
|
|
49
|
+
to: i.value,
|
|
50
|
+
class: E(["vf-link", { "vf-link_active": v.value }]),
|
|
51
51
|
"aria-disabled": f.disabled,
|
|
52
52
|
tabindex: f.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
|
-
f.$slots.default ?
|
|
59
|
-
|
|
57
|
+
default: ye(() => [
|
|
58
|
+
f.$slots.default ? F(f.$slots, "default", { key: 0 }) : (m(), h(ue, { key: 1 }, [
|
|
59
|
+
ae(M(f.label), 1)
|
|
60
60
|
], 64))
|
|
61
61
|
]),
|
|
62
62
|
_: 3
|
|
@@ -82,19 +82,19 @@ const dt = ["href", "aria-disabled", "tabindex"], Ue = /* @__PURE__ */ Y({
|
|
|
82
82
|
class: "vf-card__footer"
|
|
83
83
|
};
|
|
84
84
|
function gt(t, e) {
|
|
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
|
-
])) :
|
|
85
|
+
return m(), h("div", vt, [
|
|
86
|
+
t.$slots.default ? (m(), h("div", ft, [
|
|
87
|
+
F(t.$slots, "default")
|
|
88
|
+
])) : V("", !0),
|
|
89
|
+
t.$slots.header ? (m(), h("div", pt, [
|
|
90
|
+
F(t.$slots, "header")
|
|
91
|
+
])) : V("", !0),
|
|
92
|
+
t.$slots.body ? (m(), h("div", bt, [
|
|
93
|
+
F(t.$slots, "body")
|
|
94
|
+
])) : V("", !0),
|
|
95
|
+
t.$slots.footer ? (m(), h("div", mt, [
|
|
96
|
+
F(t.$slots, "footer")
|
|
97
|
+
])) : V("", !0)
|
|
98
98
|
]);
|
|
99
99
|
}
|
|
100
100
|
const ht = /* @__PURE__ */ ct(ut, [["render", gt]]), yt = {
|
|
@@ -104,7 +104,7 @@ const ht = /* @__PURE__ */ ct(ut, [["render", gt]]), yt = {
|
|
|
104
104
|
key: 1,
|
|
105
105
|
class: "vf-menu__separator",
|
|
106
106
|
role: "separator"
|
|
107
|
-
}, kt = ["aria-expanded", "onClick", "onKeydown"],
|
|
107
|
+
}, kt = ["aria-expanded", "onClick", "onKeydown"], Ea = /* @__PURE__ */ Z({
|
|
108
108
|
name: "VfMenu",
|
|
109
109
|
__name: "menu",
|
|
110
110
|
props: {
|
|
@@ -113,87 +113,87 @@ const ht = /* @__PURE__ */ ct(ut, [["render", gt]]), yt = {
|
|
|
113
113
|
},
|
|
114
114
|
emits: ["active", "onActive"],
|
|
115
115
|
setup(t, { emit: e }) {
|
|
116
|
-
const r = e, o = t, a =
|
|
117
|
-
...
|
|
118
|
-
items:
|
|
116
|
+
const r = e, o = t, a = R([]), u = (n, s) => `${n.label ?? n.to ?? n.href ?? n.url ?? "item"}_${s.toString()}`, d = (n) => n.to ? "router-link" : "a", c = (n) => n.map((s) => ({
|
|
117
|
+
...s,
|
|
118
|
+
items: s.items ? c(s.items) : void 0
|
|
119
119
|
})), l = (n) => {
|
|
120
|
-
n.items && n.items.length ? (a.value.map((
|
|
121
|
-
|
|
120
|
+
n.items && n.items.length ? (a.value.map((s) => {
|
|
121
|
+
s !== n && (s.subMenuVisible = !1);
|
|
122
122
|
}), n.subMenuVisible = !n.subMenuVisible) : Object.prototype.hasOwnProperty.call(n, "command") && typeof n.command == "function" && n.command();
|
|
123
|
-
},
|
|
124
|
-
var
|
|
123
|
+
}, i = (n) => {
|
|
124
|
+
var s;
|
|
125
125
|
for (const v in a.value) {
|
|
126
|
-
const
|
|
127
|
-
Object.prototype.hasOwnProperty.call(
|
|
126
|
+
const b = a.value[v];
|
|
127
|
+
Object.prototype.hasOwnProperty.call(b, "items") && ((s = b.items) != null && s.some((f) => f === n) ? (b.active = !0, b.subMenuVisible = !0) : (b.active = !1, b.subMenuVisible = !1));
|
|
128
128
|
}
|
|
129
129
|
r("active", n), r("onActive", n);
|
|
130
130
|
};
|
|
131
|
-
return
|
|
131
|
+
return ee(
|
|
132
132
|
() => o.items,
|
|
133
133
|
(n) => {
|
|
134
134
|
a.value = c(n);
|
|
135
135
|
},
|
|
136
136
|
{ deep: !0, immediate: !0 }
|
|
137
|
-
), (n,
|
|
138
|
-
const v =
|
|
139
|
-
return
|
|
140
|
-
class:
|
|
137
|
+
), (n, s) => {
|
|
138
|
+
const v = Xe("VfMenu");
|
|
139
|
+
return m(), h("div", {
|
|
140
|
+
class: E(["vf-menu", `vf-menu_${n.orientation}`])
|
|
141
141
|
}, [
|
|
142
142
|
B("ul", yt, [
|
|
143
|
-
(
|
|
144
|
-
key: u(
|
|
143
|
+
(m(!0), h(ue, null, Be(a.value, (b, f) => (m(), h("li", {
|
|
144
|
+
key: u(b, f),
|
|
145
145
|
class: "vf-menu__item",
|
|
146
146
|
role: "none"
|
|
147
147
|
}, [
|
|
148
|
-
n.$slots[u(
|
|
148
|
+
n.$slots[u(b, f)] ? F(n.$slots, u(b, f), {
|
|
149
149
|
key: 0,
|
|
150
|
-
item: { ...
|
|
151
|
-
}) :
|
|
150
|
+
item: { ...b, class: "vf-menu__link" }
|
|
151
|
+
}) : b.separator ? (m(), h("hr", _t)) : b.items && b.items.length ? (m(), h(ue, { key: 2 }, [
|
|
152
152
|
B("div", {
|
|
153
|
-
class:
|
|
153
|
+
class: E(["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: (C) => l(b),
|
|
158
158
|
onKeydown: [
|
|
159
|
-
|
|
160
|
-
|
|
159
|
+
q(Y((C) => l(b), ["prevent"]), ["enter"]),
|
|
160
|
+
q(Y((C) => l(b), ["prevent"]), ["space"])
|
|
161
161
|
]
|
|
162
162
|
}, [
|
|
163
|
-
|
|
163
|
+
b.icon ? (m(), le($e(xe), {
|
|
164
164
|
key: 0,
|
|
165
|
-
icon:
|
|
165
|
+
icon: b.icon,
|
|
166
166
|
class: "vf-menu__icon"
|
|
167
|
-
}, null, 8, ["icon"])) :
|
|
168
|
-
|
|
169
|
-
|
|
167
|
+
}, null, 8, ["icon"])) : V("", !0),
|
|
168
|
+
ae(" " + M(b.label) + " ", 1),
|
|
169
|
+
qe($e(xe), { icon: "chevronDown" })
|
|
170
170
|
], 42, kt),
|
|
171
|
-
|
|
171
|
+
b.items ? (m(), le(v, {
|
|
172
172
|
key: 0,
|
|
173
|
-
items:
|
|
174
|
-
class:
|
|
175
|
-
onOnActive:
|
|
176
|
-
}, null, 8, ["items", "class"])) :
|
|
177
|
-
], 64)) : (
|
|
173
|
+
items: b.items,
|
|
174
|
+
class: E(["vf-menu__submenu", { "vf-menu__submenu_visible": b.subMenuVisible }]),
|
|
175
|
+
onOnActive: i
|
|
176
|
+
}, null, 8, ["items", "class"])) : V("", !0)
|
|
177
|
+
], 64)) : (m(), le(Je, {
|
|
178
178
|
key: 3,
|
|
179
|
-
to:
|
|
180
|
-
href:
|
|
181
|
-
as:
|
|
179
|
+
to: b.to,
|
|
180
|
+
href: b.href ?? b.url,
|
|
181
|
+
as: d(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: (C) => l(b),
|
|
188
|
+
onActive: (C) => i(b)
|
|
189
189
|
}, {
|
|
190
|
-
default:
|
|
191
|
-
|
|
190
|
+
default: ye(() => [
|
|
191
|
+
b.icon ? (m(), le($e(xe), {
|
|
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"])) : V("", !0),
|
|
196
|
+
ae(" " + M(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 ht = /* @__PURE__ */ ct(ut, [["render", gt]]), yt = {
|
|
|
202
202
|
], 2);
|
|
203
203
|
};
|
|
204
204
|
}
|
|
205
|
-
}), Ct = ["type", "disabled"],
|
|
205
|
+
}), Ct = ["type", "disabled"], Wa = /* @__PURE__ */ Z({
|
|
206
206
|
__name: "button",
|
|
207
207
|
props: {
|
|
208
208
|
to: { default: void 0 },
|
|
@@ -221,59 +221,59 @@ const ht = /* @__PURE__ */ ct(ut, [["render", gt]]), yt = {
|
|
|
221
221
|
disabled: { type: Boolean, default: !1 }
|
|
222
222
|
},
|
|
223
223
|
setup(t) {
|
|
224
|
-
const e = t, r = ["button", "submit", "reset"], o = (n) => !!n && r.includes(n), a = g(() => e.as ? e.as === "button" : !(e.to || e.href || e.url || e.type && !o(e.type))), u = g(() => o(e.type) ? e.type : "button"),
|
|
224
|
+
const e = t, r = ["button", "submit", "reset"], o = (n) => !!n && r.includes(n), a = g(() => e.as ? e.as === "button" : !(e.to || e.href || e.url || e.type && !o(e.type))), u = g(() => o(e.type) ? e.type : "button"), d = g(() => 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 = g(() => {
|
|
225
225
|
let n = ["vf-button", `vf-button_${e.severity}`];
|
|
226
226
|
return ["top", "bottom"].includes(e.iconPos) && n.push("vf-button_vertical"), e.variant === "text" && n.push("vf-button_text"), e.variant === "outlined" && n.push("vf-button_outlined"), ["small", "large"].indexOf(e.size) > -1 && n.push(`vf-button_${e.size}`), (e.loading || e.disabled) && n.push("vf-button_disabled"), e.rounded && n.push("vf-button_rounded"), n;
|
|
227
|
-
}), l = g(() => ["vf-button__icon", `vf-button__icon_${e.iconPos}`]),
|
|
228
|
-
return (n,
|
|
227
|
+
}), l = g(() => ["vf-button__icon", `vf-button__icon_${e.iconPos}`]), i = g(() => ["vf-button__label"]);
|
|
228
|
+
return (n, s) => a.value ? (m(), h("button", {
|
|
229
229
|
key: 0,
|
|
230
230
|
type: u.value,
|
|
231
|
-
class:
|
|
231
|
+
class: E(c.value),
|
|
232
232
|
disabled: e.loading || e.disabled
|
|
233
233
|
}, [
|
|
234
|
-
e.icon && !e.loading ? (
|
|
234
|
+
e.icon && !e.loading ? (m(), le($e(xe), {
|
|
235
235
|
key: 0,
|
|
236
236
|
icon: e.icon,
|
|
237
|
-
class:
|
|
238
|
-
}, null, 8, ["icon", "class"])) :
|
|
239
|
-
e.loading ? (
|
|
237
|
+
class: E(l.value)
|
|
238
|
+
}, null, 8, ["icon", "class"])) : V("", !0),
|
|
239
|
+
e.loading ? (m(), le($e(xe), {
|
|
240
240
|
key: 1,
|
|
241
241
|
icon: "circleNotch",
|
|
242
|
-
class:
|
|
242
|
+
class: E(l.value),
|
|
243
243
|
spin: ""
|
|
244
|
-
}, null, 8, ["class"])) :
|
|
245
|
-
n.$slots.default ? (
|
|
244
|
+
}, null, 8, ["class"])) : V("", !0),
|
|
245
|
+
n.$slots.default ? (m(), h("span", {
|
|
246
246
|
key: 2,
|
|
247
|
-
class:
|
|
247
|
+
class: E(i.value)
|
|
248
248
|
}, [
|
|
249
|
-
|
|
250
|
-
], 2)) : n.label ? (
|
|
249
|
+
F(n.$slots, "default")
|
|
250
|
+
], 2)) : n.label ? (m(), h("span", {
|
|
251
251
|
key: 3,
|
|
252
|
-
class:
|
|
253
|
-
},
|
|
254
|
-
], 10, Ct)) : (
|
|
252
|
+
class: E(i.value)
|
|
253
|
+
}, M(n.label), 3)) : V("", !0)
|
|
254
|
+
], 10, Ct)) : (m(), le(Je, {
|
|
255
255
|
key: 1,
|
|
256
256
|
to: e.to,
|
|
257
257
|
href: e.href ?? e.url,
|
|
258
|
-
as:
|
|
259
|
-
class:
|
|
258
|
+
as: d.value,
|
|
259
|
+
class: E(c.value),
|
|
260
260
|
disabled: e.loading || e.disabled
|
|
261
261
|
}, {
|
|
262
|
-
default:
|
|
263
|
-
e.icon ? (
|
|
262
|
+
default: ye(() => [
|
|
263
|
+
e.icon ? (m(), le($e(xe), {
|
|
264
264
|
key: 0,
|
|
265
265
|
icon: e.icon,
|
|
266
|
-
class:
|
|
267
|
-
}, null, 8, ["icon", "class"])) :
|
|
268
|
-
n.$slots.default ? (
|
|
266
|
+
class: E(l.value)
|
|
267
|
+
}, null, 8, ["icon", "class"])) : V("", !0),
|
|
268
|
+
n.$slots.default ? (m(), h("span", {
|
|
269
269
|
key: 1,
|
|
270
|
-
class:
|
|
270
|
+
class: E(i.value)
|
|
271
271
|
}, [
|
|
272
|
-
|
|
273
|
-
], 2)) : n.label ? (
|
|
272
|
+
F(n.$slots, "default")
|
|
273
|
+
], 2)) : n.label ? (m(), h("span", {
|
|
274
274
|
key: 2,
|
|
275
|
-
class:
|
|
276
|
-
},
|
|
275
|
+
class: E(i.value)
|
|
276
|
+
}, M(n.label), 3)) : V("", !0)
|
|
277
277
|
]),
|
|
278
278
|
_: 3
|
|
279
279
|
}, 8, ["to", "href", "as", "class", "disabled"]));
|
|
@@ -284,7 +284,7 @@ const ht = /* @__PURE__ */ ct(ut, [["render", gt]]), yt = {
|
|
|
284
284
|
}, $t = ["type", "value", "placeholder", "disabled", "readonly"], xt = {
|
|
285
285
|
key: 1,
|
|
286
286
|
class: "vf-input__suffix"
|
|
287
|
-
},
|
|
287
|
+
}, Ma = /* @__PURE__ */ Z({
|
|
288
288
|
__name: "input",
|
|
289
289
|
props: {
|
|
290
290
|
modelValue: { default: "" },
|
|
@@ -298,40 +298,40 @@ const ht = /* @__PURE__ */ ct(ut, [["render", gt]]), yt = {
|
|
|
298
298
|
emits: ["update:modelValue", "input", "change", "focus", "blur"],
|
|
299
299
|
setup(t, { emit: e }) {
|
|
300
300
|
const r = e, o = t, a = g(() => {
|
|
301
|
-
const
|
|
302
|
-
return o.size !== "normal" &&
|
|
303
|
-
}), u = (
|
|
304
|
-
const n =
|
|
305
|
-
r("update:modelValue", n.value), r("input",
|
|
306
|
-
},
|
|
307
|
-
return (
|
|
308
|
-
class:
|
|
301
|
+
const i = ["vf-input", `vf-input_${o.variant}`];
|
|
302
|
+
return o.size !== "normal" && i.push(`vf-input_${o.size}`), o.disabled && i.push("vf-input_disabled"), i;
|
|
303
|
+
}), u = (i) => {
|
|
304
|
+
const n = i.target;
|
|
305
|
+
r("update:modelValue", n.value), r("input", i);
|
|
306
|
+
}, d = (i) => r("change", i), c = (i) => r("focus", i), l = (i) => r("blur", i);
|
|
307
|
+
return (i, n) => (m(), h("div", {
|
|
308
|
+
class: E(a.value)
|
|
309
309
|
}, [
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
])) :
|
|
310
|
+
i.$slots.prefix ? (m(), h("span", wt, [
|
|
311
|
+
F(i.$slots, "prefix")
|
|
312
|
+
])) : V("", !0),
|
|
313
313
|
B("input", {
|
|
314
314
|
class: "vf-input__control",
|
|
315
|
-
type:
|
|
316
|
-
value:
|
|
317
|
-
placeholder:
|
|
318
|
-
disabled:
|
|
319
|
-
readonly:
|
|
315
|
+
type: i.type,
|
|
316
|
+
value: i.modelValue,
|
|
317
|
+
placeholder: i.placeholder,
|
|
318
|
+
disabled: i.disabled,
|
|
319
|
+
readonly: i.readonly,
|
|
320
320
|
onInput: u,
|
|
321
|
-
onChange:
|
|
321
|
+
onChange: d,
|
|
322
322
|
onFocus: c,
|
|
323
323
|
onBlur: l
|
|
324
324
|
}, null, 40, $t),
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
])) :
|
|
325
|
+
i.$slots.suffix ? (m(), h("span", xt, [
|
|
326
|
+
F(i.$slots, "suffix")
|
|
327
|
+
])) : V("", !0)
|
|
328
328
|
], 2));
|
|
329
329
|
}
|
|
330
330
|
}), Bt = ["for"], zt = {
|
|
331
331
|
key: 0,
|
|
332
332
|
class: "vf-form-field__required",
|
|
333
333
|
"aria-hidden": "true"
|
|
334
|
-
}, Ft = { class: "vf-form-field__control" }, St = ["id"], Vt = ["id"],
|
|
334
|
+
}, Ft = { class: "vf-form-field__control" }, St = ["id"], Vt = ["id"], Ha = /* @__PURE__ */ Z({
|
|
335
335
|
__name: "form-field",
|
|
336
336
|
props: {
|
|
337
337
|
id: { default: void 0 },
|
|
@@ -343,56 +343,56 @@ const ht = /* @__PURE__ */ ct(ut, [["render", gt]]), yt = {
|
|
|
343
343
|
size: { default: "normal" }
|
|
344
344
|
},
|
|
345
345
|
setup(t) {
|
|
346
|
-
const e = t, r =
|
|
346
|
+
const e = t, r = Ue(), o = `vf-form-field-${Math.random().toString(36).slice(2, 10)}`, a = g(() => e.id || o), u = g(() => `${a.value}-hint`), d = g(() => `${a.value}-error`), c = g(() => !!e.label || !!r.label), l = g(() => !!e.hint || !!r.hint), i = g(() => !!e.error || !!r.error), n = g(() => {
|
|
347
347
|
const v = [];
|
|
348
|
-
return l.value && v.push(u.value),
|
|
349
|
-
}),
|
|
348
|
+
return l.value && v.push(u.value), i.value && v.push(d.value), v.length ? v.join(" ") : void 0;
|
|
349
|
+
}), s = g(() => {
|
|
350
350
|
const v = ["vf-form-field"];
|
|
351
|
-
return e.size !== "normal" && v.push(`vf-form-field_${e.size}`), e.disabled && v.push("vf-form-field_disabled"),
|
|
351
|
+
return e.size !== "normal" && v.push(`vf-form-field_${e.size}`), e.disabled && v.push("vf-form-field_disabled"), i.value && v.push("vf-form-field_invalid"), v;
|
|
352
352
|
});
|
|
353
|
-
return (v,
|
|
354
|
-
class:
|
|
353
|
+
return (v, b) => (m(), h("div", {
|
|
354
|
+
class: E(s.value)
|
|
355
355
|
}, [
|
|
356
|
-
c.value ? (
|
|
356
|
+
c.value ? (m(), h("label", {
|
|
357
357
|
key: 0,
|
|
358
358
|
class: "vf-form-field__label",
|
|
359
359
|
for: a.value
|
|
360
360
|
}, [
|
|
361
|
-
|
|
362
|
-
|
|
361
|
+
F(v.$slots, "label", {}, () => [
|
|
362
|
+
ae(M(v.label), 1)
|
|
363
363
|
]),
|
|
364
|
-
v.required ? (
|
|
365
|
-
], 8, Bt)) :
|
|
364
|
+
v.required ? (m(), h("span", zt, "*")) : V("", !0)
|
|
365
|
+
], 8, Bt)) : V("", !0),
|
|
366
366
|
B("div", Ft, [
|
|
367
|
-
|
|
367
|
+
F(v.$slots, "default", {
|
|
368
368
|
id: a.value,
|
|
369
369
|
describedBy: n.value,
|
|
370
|
-
invalid:
|
|
370
|
+
invalid: i.value,
|
|
371
371
|
required: v.required
|
|
372
372
|
})
|
|
373
373
|
]),
|
|
374
|
-
l.value ? (
|
|
374
|
+
l.value ? (m(), h("p", {
|
|
375
375
|
key: 1,
|
|
376
376
|
id: u.value,
|
|
377
377
|
class: "vf-form-field__hint"
|
|
378
378
|
}, [
|
|
379
|
-
|
|
380
|
-
|
|
379
|
+
F(v.$slots, "hint", {}, () => [
|
|
380
|
+
ae(M(v.hint), 1)
|
|
381
381
|
])
|
|
382
|
-
], 8, St)) :
|
|
383
|
-
|
|
382
|
+
], 8, St)) : V("", !0),
|
|
383
|
+
i.value ? (m(), h("p", {
|
|
384
384
|
key: 2,
|
|
385
|
-
id:
|
|
385
|
+
id: d.value,
|
|
386
386
|
class: "vf-form-field__error",
|
|
387
387
|
role: "alert"
|
|
388
388
|
}, [
|
|
389
|
-
|
|
390
|
-
|
|
389
|
+
F(v.$slots, "error", {}, () => [
|
|
390
|
+
ae(M(v.error), 1)
|
|
391
391
|
])
|
|
392
|
-
], 8, Vt)) :
|
|
392
|
+
], 8, Vt)) : V("", !0)
|
|
393
393
|
], 2));
|
|
394
394
|
}
|
|
395
|
-
}),
|
|
395
|
+
}), Lt = ["value", "placeholder", "disabled", "readonly", "rows"], Aa = /* @__PURE__ */ Z({
|
|
396
396
|
__name: "textarea",
|
|
397
397
|
props: {
|
|
398
398
|
modelValue: { default: "" },
|
|
@@ -406,30 +406,30 @@ const ht = /* @__PURE__ */ ct(ut, [["render", gt]]), yt = {
|
|
|
406
406
|
emits: ["update:modelValue", "input", "change", "focus", "blur"],
|
|
407
407
|
setup(t, { emit: e }) {
|
|
408
408
|
const r = e, o = t, a = g(() => {
|
|
409
|
-
const
|
|
410
|
-
return o.size !== "normal" &&
|
|
411
|
-
}), u = (
|
|
412
|
-
const n =
|
|
413
|
-
r("update:modelValue", n.value), r("input",
|
|
414
|
-
},
|
|
415
|
-
return (
|
|
416
|
-
class:
|
|
409
|
+
const i = ["vf-textarea", `vf-textarea_${o.variant}`];
|
|
410
|
+
return o.size !== "normal" && i.push(`vf-textarea_${o.size}`), o.disabled && i.push("vf-textarea_disabled"), i;
|
|
411
|
+
}), u = (i) => {
|
|
412
|
+
const n = i.target;
|
|
413
|
+
r("update:modelValue", n.value), r("input", i);
|
|
414
|
+
}, d = (i) => r("change", i), c = (i) => r("focus", i), l = (i) => r("blur", i);
|
|
415
|
+
return (i, n) => (m(), h("div", {
|
|
416
|
+
class: E(a.value)
|
|
417
417
|
}, [
|
|
418
418
|
B("textarea", {
|
|
419
419
|
class: "vf-textarea__control",
|
|
420
|
-
value:
|
|
421
|
-
placeholder:
|
|
422
|
-
disabled:
|
|
423
|
-
readonly:
|
|
424
|
-
rows:
|
|
420
|
+
value: i.modelValue,
|
|
421
|
+
placeholder: i.placeholder,
|
|
422
|
+
disabled: i.disabled,
|
|
423
|
+
readonly: i.readonly,
|
|
424
|
+
rows: i.rows,
|
|
425
425
|
onInput: u,
|
|
426
|
-
onChange:
|
|
426
|
+
onChange: d,
|
|
427
427
|
onFocus: c,
|
|
428
428
|
onBlur: l
|
|
429
|
-
}, null, 40,
|
|
429
|
+
}, null, 40, Lt)
|
|
430
430
|
], 2));
|
|
431
431
|
}
|
|
432
|
-
}),
|
|
432
|
+
}), Ne = [
|
|
433
433
|
"top",
|
|
434
434
|
"top-start",
|
|
435
435
|
"top-end",
|
|
@@ -442,7 +442,7 @@ const ht = /* @__PURE__ */ ct(ut, [["render", gt]]), yt = {
|
|
|
442
442
|
"left",
|
|
443
443
|
"left-start",
|
|
444
444
|
"left-end"
|
|
445
|
-
],
|
|
445
|
+
], pe = (t) => {
|
|
446
446
|
if (t == null || !(t instanceof HTMLElement))
|
|
447
447
|
return null;
|
|
448
448
|
if (typeof window < "u") {
|
|
@@ -450,18 +450,18 @@ const ht = /* @__PURE__ */ ct(ut, [["render", gt]]), yt = {
|
|
|
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 : pe(t.parentNode);
|
|
454
454
|
};
|
|
455
|
-
function
|
|
455
|
+
function Tt(t) {
|
|
456
456
|
return typeof window > "u" ? !1 : window.getComputedStyle(t).position === "fixed";
|
|
457
457
|
}
|
|
458
|
-
const Rt = (t, e) => t.strategy ? t.strategy :
|
|
459
|
-
const o = t.getBoundingClientRect(), a = e ? e.offsetParent : null, u = e ?
|
|
458
|
+
const Rt = (t, e) => t.strategy ? t.strategy : Tt(e) ? "fixed" : "absolute", ge = (t, e) => Rt(t, e) === "fixed", se = (t, e, r = {}) => {
|
|
459
|
+
const o = t.getBoundingClientRect(), a = e ? e.offsetParent : null, u = e ? ge(r, e) : !1;
|
|
460
460
|
if (a && !u) {
|
|
461
|
-
const
|
|
461
|
+
const d = a.getBoundingClientRect(), c = a.scrollLeft, l = a.scrollTop;
|
|
462
462
|
return {
|
|
463
|
-
left: o.left -
|
|
464
|
-
top: o.top -
|
|
463
|
+
left: o.left - d.left + c,
|
|
464
|
+
top: o.top - d.top + l,
|
|
465
465
|
width: o.width,
|
|
466
466
|
height: o.height
|
|
467
467
|
};
|
|
@@ -472,63 +472,63 @@ const Rt = (t, e) => t.strategy ? t.strategy : Lt(e) ? "fixed" : "absolute", be
|
|
|
472
472
|
width: o.width,
|
|
473
473
|
height: o.height
|
|
474
474
|
};
|
|
475
|
-
},
|
|
475
|
+
}, _e = (t, e) => {
|
|
476
476
|
var r;
|
|
477
477
|
return (r = t.middleware) == null ? void 0 : r.find((o) => o.name === e);
|
|
478
|
-
},
|
|
479
|
-
const e =
|
|
478
|
+
}, Qe = (t, e) => !!_e(t, e), Pt = (t) => {
|
|
479
|
+
const e = pe(t);
|
|
480
480
|
let r = "";
|
|
481
481
|
return e !== null && ((e.dataset.scrollTop === void 0 || e.scrollTop === +e.dataset.scrollTop) && (e.dataset.scrollTop = "0"), (e.dataset.scrollLeft === void 0 || e.scrollLeft === +e.dataset.scrollLeft) && (e.dataset.scrollLeft = "0"), e.scrollTop > +e.dataset.scrollTop ? r = "bottom" : e.scrollTop < +e.dataset.scrollTop ? r = "top" : e.scrollLeft > +e.dataset.scrollLeft ? r = "right" : e.scrollLeft < +e.dataset.scrollLeft && (r = "left"), e.dataset.scrollTop = e.scrollTop <= 0 ? "0" : e.scrollTop.toString(), e.dataset.scrollLeft = e.scrollLeft <= 0 ? "0" : e.scrollLeft.toString()), r;
|
|
482
|
-
},
|
|
483
|
-
if (r === null && typeof window < "u" &&
|
|
482
|
+
}, Re = (t) => t.scrollLeft + t.clientWidth, Pe = (t) => t.scrollTop + t.clientHeight, ie = (t, e, r = null, o = {}, a) => {
|
|
483
|
+
if (r === null && typeof window < "u" && ge(o, e))
|
|
484
484
|
return t;
|
|
485
485
|
let u = 0;
|
|
486
486
|
if (r === null) {
|
|
487
|
-
const
|
|
488
|
-
u =
|
|
487
|
+
const d = pe(e);
|
|
488
|
+
u = d ? d.scrollTop : 0;
|
|
489
489
|
}
|
|
490
490
|
return t - u;
|
|
491
491
|
}, de = (t, e, r = null, o = {}, a) => {
|
|
492
492
|
let u;
|
|
493
|
-
if (r === null && typeof window < "u" &&
|
|
493
|
+
if (r === null && typeof window < "u" && ge(o, e))
|
|
494
494
|
u = window.innerWidth;
|
|
495
495
|
else if (r === null) {
|
|
496
|
-
const
|
|
497
|
-
u =
|
|
496
|
+
const d = pe(e);
|
|
497
|
+
u = d ? Re(d) : 0;
|
|
498
498
|
} else
|
|
499
499
|
u = r.getBoundingClientRect().width;
|
|
500
500
|
return -(t + e.clientWidth - u);
|
|
501
|
-
},
|
|
501
|
+
}, be = (t, e, r = null, o = {}, a) => {
|
|
502
502
|
let u;
|
|
503
|
-
if (r === null && typeof window < "u" &&
|
|
503
|
+
if (r === null && typeof window < "u" && ge(o, e))
|
|
504
504
|
u = window.innerHeight;
|
|
505
505
|
else if (r === null) {
|
|
506
|
-
const
|
|
507
|
-
u =
|
|
506
|
+
const d = pe(e);
|
|
507
|
+
u = d ? Pe(d) : 0;
|
|
508
508
|
} else
|
|
509
509
|
u = r.getBoundingClientRect().height;
|
|
510
510
|
return -(t + e.clientHeight - u);
|
|
511
511
|
}, ce = (t, e, r = null, o = {}, a) => {
|
|
512
|
-
if (r === null && typeof window < "u" &&
|
|
512
|
+
if (r === null && typeof window < "u" && ge(o, e))
|
|
513
513
|
return t;
|
|
514
514
|
let u = 0;
|
|
515
515
|
if (r === null) {
|
|
516
|
-
const
|
|
517
|
-
u =
|
|
516
|
+
const d = pe(e);
|
|
517
|
+
u = d ? d.scrollLeft : 0;
|
|
518
518
|
}
|
|
519
519
|
return t - u;
|
|
520
|
-
},
|
|
520
|
+
}, Ye = ({
|
|
521
521
|
options: t,
|
|
522
522
|
primaryX: e,
|
|
523
523
|
primaryY: r,
|
|
524
524
|
floating: o,
|
|
525
525
|
placement: a,
|
|
526
526
|
reference: u,
|
|
527
|
-
scrollDirection:
|
|
527
|
+
scrollDirection: d
|
|
528
528
|
}) => {
|
|
529
|
-
const c =
|
|
529
|
+
const c = Ie(u, o, a, t), l = _e(t, "offset");
|
|
530
530
|
if (l) {
|
|
531
|
-
const
|
|
531
|
+
const i = l.fn({
|
|
532
532
|
x: c.x,
|
|
533
533
|
y: c.y,
|
|
534
534
|
options: t,
|
|
@@ -537,16 +537,16 @@ const Rt = (t, e) => t.strategy ? t.strategy : Lt(e) ? "fixed" : "absolute", be
|
|
|
537
537
|
floating: o,
|
|
538
538
|
placement: a,
|
|
539
539
|
reference: u,
|
|
540
|
-
scrollDirection:
|
|
540
|
+
scrollDirection: d
|
|
541
541
|
});
|
|
542
|
-
c.x =
|
|
542
|
+
c.x = i.x, c.y = i.y;
|
|
543
543
|
}
|
|
544
544
|
return Ut(c, o, u, t) ? {
|
|
545
545
|
x: c.x,
|
|
546
546
|
y: c.y,
|
|
547
547
|
placement: a
|
|
548
548
|
} : !1;
|
|
549
|
-
},
|
|
549
|
+
}, Se = (t) => ({
|
|
550
550
|
name: "flip",
|
|
551
551
|
params: t,
|
|
552
552
|
fn: ({
|
|
@@ -555,115 +555,115 @@ const Rt = (t, e) => t.strategy ? t.strategy : Lt(e) ? "fixed" : "absolute", be
|
|
|
555
555
|
options: o,
|
|
556
556
|
primaryX: a,
|
|
557
557
|
primaryY: u,
|
|
558
|
-
floating:
|
|
558
|
+
floating: d,
|
|
559
559
|
placement: c,
|
|
560
560
|
reference: l,
|
|
561
|
-
scrollDirection:
|
|
561
|
+
scrollDirection: i
|
|
562
562
|
}) => {
|
|
563
563
|
var n;
|
|
564
|
-
const
|
|
564
|
+
const s = {
|
|
565
565
|
x: e,
|
|
566
566
|
y: r,
|
|
567
567
|
placement: c
|
|
568
568
|
}, v = {
|
|
569
569
|
...o,
|
|
570
|
-
middleware: (n = o.middleware) == null ? void 0 : n.filter((
|
|
571
|
-
},
|
|
572
|
-
let
|
|
573
|
-
const
|
|
574
|
-
if (
|
|
570
|
+
middleware: (n = o.middleware) == null ? void 0 : n.filter((T) => T.name !== "shift")
|
|
571
|
+
}, b = (t == null ? void 0 : t.placements) ?? Ne, f = !(t != null && t.placements), C = f ? Ne : b;
|
|
572
|
+
let $ = !1;
|
|
573
|
+
const S = (T) => {
|
|
574
|
+
if ($)
|
|
575
575
|
return;
|
|
576
|
-
const
|
|
576
|
+
const H = Ye({
|
|
577
577
|
options: v,
|
|
578
578
|
primaryX: a,
|
|
579
579
|
primaryY: u,
|
|
580
|
-
floating:
|
|
581
|
-
placement:
|
|
580
|
+
floating: d,
|
|
581
|
+
placement: T,
|
|
582
582
|
reference: l,
|
|
583
|
-
scrollDirection:
|
|
583
|
+
scrollDirection: i
|
|
584
584
|
});
|
|
585
|
-
|
|
586
|
-
},
|
|
587
|
-
if (!f &&
|
|
588
|
-
const
|
|
589
|
-
(
|
|
590
|
-
const
|
|
585
|
+
H && (s.x = H.x, s.y = H.y, s.placement = H.placement, $ = !0);
|
|
586
|
+
}, I = Jt(l, d, v);
|
|
587
|
+
if (!f && b.includes(c) && S(c), $ || C.forEach(S), !$) {
|
|
588
|
+
const T = b.reduce(
|
|
589
|
+
(H, P) => {
|
|
590
|
+
const D = Ye({
|
|
591
591
|
options: v,
|
|
592
592
|
primaryX: a,
|
|
593
593
|
primaryY: u,
|
|
594
|
-
floating:
|
|
595
|
-
placement:
|
|
594
|
+
floating: d,
|
|
595
|
+
placement: P,
|
|
596
596
|
reference: l,
|
|
597
|
-
scrollDirection:
|
|
597
|
+
scrollDirection: i
|
|
598
598
|
});
|
|
599
|
-
if (!
|
|
600
|
-
return
|
|
601
|
-
const
|
|
602
|
-
return !
|
|
599
|
+
if (!D)
|
|
600
|
+
return H;
|
|
601
|
+
const A = ze(P), L = I[A];
|
|
602
|
+
return !H || L > H.space ? { result: D, space: L } : H;
|
|
603
603
|
},
|
|
604
604
|
null
|
|
605
605
|
);
|
|
606
|
-
|
|
606
|
+
T && (s.x = T.result.x, s.y = T.result.y, s.placement = T.result.placement, $ = !0);
|
|
607
607
|
}
|
|
608
|
-
if (
|
|
609
|
-
const
|
|
610
|
-
let
|
|
611
|
-
|
|
612
|
-
const
|
|
613
|
-
|
|
608
|
+
if (!$ && b.length > 0) {
|
|
609
|
+
const T = ze(c);
|
|
610
|
+
let H = T, P = I[T];
|
|
611
|
+
b.forEach((w) => {
|
|
612
|
+
const y = ze(w), z = I[y];
|
|
613
|
+
z > P && (P = z, H = y);
|
|
614
614
|
});
|
|
615
|
-
const
|
|
615
|
+
const D = Zt(H, c, b), A = Ie(l, d, D, v), L = _e(v, "offset");
|
|
616
616
|
if (L) {
|
|
617
|
-
const
|
|
618
|
-
x:
|
|
619
|
-
y:
|
|
617
|
+
const w = L.fn({
|
|
618
|
+
x: A.x,
|
|
619
|
+
y: A.y,
|
|
620
620
|
options: v,
|
|
621
621
|
primaryX: a,
|
|
622
622
|
primaryY: u,
|
|
623
|
-
floating:
|
|
624
|
-
placement:
|
|
623
|
+
floating: d,
|
|
624
|
+
placement: D,
|
|
625
625
|
reference: l,
|
|
626
|
-
scrollDirection:
|
|
626
|
+
scrollDirection: i
|
|
627
627
|
});
|
|
628
|
-
|
|
628
|
+
A.x = w.x, A.y = w.y;
|
|
629
629
|
}
|
|
630
|
-
|
|
630
|
+
s.x = A.x, s.y = A.y, s.placement = A.placement;
|
|
631
631
|
}
|
|
632
|
-
return
|
|
632
|
+
return s;
|
|
633
633
|
}
|
|
634
|
-
}),
|
|
635
|
-
var u,
|
|
634
|
+
}), et = (t, e, r, o, a) => {
|
|
635
|
+
var u, d, c;
|
|
636
636
|
let l = 0;
|
|
637
637
|
o.startsWith("right") ? l = -t : o.startsWith("left") && (l = t);
|
|
638
|
-
const
|
|
639
|
-
if (
|
|
640
|
-
const
|
|
641
|
-
o.startsWith("right") ? l -=
|
|
638
|
+
const i = _e(e, "arrow"), n = _e(e, "shift");
|
|
639
|
+
if (i) {
|
|
640
|
+
const s = ((u = i.params) == null ? void 0 : u.arrow).getBoundingClientRect();
|
|
641
|
+
o.startsWith("right") ? l -= s.width / 2 : o.startsWith("left") && (l += s.width / 2);
|
|
642
642
|
}
|
|
643
|
-
if (
|
|
644
|
-
let
|
|
645
|
-
n && (
|
|
646
|
-
const
|
|
647
|
-
v =
|
|
643
|
+
if (Qe(e, "shift") && i) {
|
|
644
|
+
let s = null, v = 0;
|
|
645
|
+
n && (s = (d = n.params) == null ? void 0 : d.parent);
|
|
646
|
+
const b = (c = i.params) == null ? void 0 : c.arrow;
|
|
647
|
+
v = b.getBoundingClientRect().width / 2, v += Dt(b), v -= t, o.startsWith("right") ? de(r - l, a, s, e) <= t ? de(r, a, s, e) > 0 ? l = t - de(r, a, s, e) : l = t : ce(r - l - v, a, s, e) <= t && (ce(r - l - v, a, s, e) >= 0 ? (l = -t - (ce(r - l - v, a, s, e) + t), s && (l = -t)) : l = -t) : o.startsWith("left") ? de(r - l + v, a, s, e) <= t ? (l = t + de(r - v, a, s, e), l <= t && (l = t)) : ce(r - l, a, s, e) <= t && (l = -t + ce(r, a, s, e), l <= -t && (l = -t)) : de(r - l, a, s, e) <= t ? de(r - l, a, s, e) <= t && de(r, a, s, e) > 0 ? l = t - de(r, a, s, e) : l = t : ce(r - l, a, s, e) <= t && (ce(r - l, a, s, e) <= t && ce(r, a, s, e) > 0 ? l = -(t - ce(r, a, s, e)) : l = -t);
|
|
648
648
|
}
|
|
649
649
|
return l;
|
|
650
|
-
},
|
|
651
|
-
var u,
|
|
650
|
+
}, tt = (t, e, r, o, a) => {
|
|
651
|
+
var u, d, c;
|
|
652
652
|
let l = 0;
|
|
653
653
|
o.startsWith("top") ? l = t : o.startsWith("bottom") && (l = -t);
|
|
654
|
-
const
|
|
655
|
-
if (
|
|
656
|
-
const
|
|
657
|
-
o.startsWith("top") ? l +=
|
|
654
|
+
const i = _e(e, "arrow"), n = _e(e, "shift");
|
|
655
|
+
if (i) {
|
|
656
|
+
const s = ((u = i.params) == null ? void 0 : u.arrow).getBoundingClientRect();
|
|
657
|
+
o.startsWith("top") ? l += s.height / 2 : o.startsWith("bottom") && (l -= s.height / 2);
|
|
658
658
|
}
|
|
659
|
-
if (
|
|
660
|
-
let
|
|
661
|
-
n && (
|
|
662
|
-
const
|
|
663
|
-
v =
|
|
659
|
+
if (Qe(e, "shift") && i) {
|
|
660
|
+
let s = null, v = 0;
|
|
661
|
+
n && (s = (d = n.params) == null ? void 0 : d.parent);
|
|
662
|
+
const b = (c = i.params) == null ? void 0 : c.arrow;
|
|
663
|
+
v = b.getBoundingClientRect().height / 2, v += Ot(b), v -= t, o.startsWith("top") ? ie(r - l, a, s, e) <= t ? ie(r, a, s, e) >= 0 ? l = -(t - ie(r, a, s, e)) : l = -t : be(r - l + v, a, s, e) <= t && (l = t + be(r - v, a, s, e), l <= t && (l = t)) : o.startsWith("bottom") ? ie(r - l - v, a, s, e) <= t ? ie(r - l - v, a, s, e) >= 0 ? (l = -t - (ie(r - l - v, a, s, e) + t), s && (l = -t)) : l = -t : be(r - l, a, s, e) <= t && (be(r, a, s, e) >= 0 ? l = t - be(r, a, s, e) : l = t) : ie(r - l, a, s, e) <= t ? ie(r - l, a, s, e) >= 0 ? l = -(t - ie(r - l, a, s, e)) : l = -t : be(r - l, a, s, e) <= t && (be(r - l, a, s, e) >= 0 ? l = t - be(r - l, a, s, e) : l = t);
|
|
664
664
|
}
|
|
665
665
|
return l;
|
|
666
|
-
},
|
|
666
|
+
}, Ve = (t) => ({
|
|
667
667
|
name: "offset",
|
|
668
668
|
params: { value: t },
|
|
669
669
|
fn: ({
|
|
@@ -672,11 +672,11 @@ const Rt = (t, e) => t.strategy ? t.strategy : Lt(e) ? "fixed" : "absolute", be
|
|
|
672
672
|
options: o,
|
|
673
673
|
primaryX: a,
|
|
674
674
|
primaryY: u,
|
|
675
|
-
floating:
|
|
675
|
+
floating: d,
|
|
676
676
|
placement: c
|
|
677
677
|
}) => ({
|
|
678
|
-
x: e -
|
|
679
|
-
y: r -
|
|
678
|
+
x: e - et(t, o, a, c, d),
|
|
679
|
+
y: r - tt(t, o, u, c, d),
|
|
680
680
|
placement: c
|
|
681
681
|
})
|
|
682
682
|
}), It = (t) => ({
|
|
@@ -688,37 +688,37 @@ const Rt = (t, e) => t.strategy ? t.strategy : Lt(e) ? "fixed" : "absolute", be
|
|
|
688
688
|
options: o,
|
|
689
689
|
primaryX: a,
|
|
690
690
|
primaryY: u,
|
|
691
|
-
floating:
|
|
691
|
+
floating: d,
|
|
692
692
|
placement: c,
|
|
693
693
|
reference: l
|
|
694
694
|
}) => {
|
|
695
|
-
var
|
|
695
|
+
var i;
|
|
696
696
|
const n = {
|
|
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 n.x <
|
|
700
|
+
}, s = o.middleware || [], v = s.findIndex((z) => z.name === "shift"), b = s.findIndex((z) => z.name === "offset"), f = b !== -1 && (v === -1 || b > v), C = s.find((z) => z.name === "offset"), $ = C ? (i = C.params) == null ? void 0 : i.value : 0, S = f ? et($, o, a, c, d) : 0, I = f ? tt($, o, u, c, d) : 0, T = e - S, H = r - I;
|
|
701
|
+
let P = T, D = H;
|
|
702
|
+
const A = C ? Math.abs($) : 0, L = A, w = A;
|
|
703
|
+
if (ge(o, d) && typeof window < "u") {
|
|
704
|
+
const z = L, K = window.innerWidth - d.clientWidth - L, G = K < z ? z : K, j = w, te = window.innerHeight - d.clientHeight - w, X = te < j ? j : te;
|
|
705
|
+
P < z ? P = z : P > G && (P = G), D < j ? D = j : D > X && (D = X), f ? (n.x = e + (P - T), n.y = r + (D - H)) : (n.x = P, n.y = D);
|
|
706
|
+
const oe = L, J = window.innerWidth - d.clientWidth - L, ne = w, _ = window.innerHeight - d.clientHeight - w, O = f ? oe + S : oe, W = f ? J + S : J, Q = f ? ne + I : ne, p = f ? _ + I : _;
|
|
707
|
+
return n.x < O ? n.x = O : n.x > W && (n.x = W), n.y < Q ? n.y = Q : n.y > p && (n.y = p), n;
|
|
708
708
|
}
|
|
709
|
-
const
|
|
710
|
-
if (
|
|
711
|
-
const
|
|
712
|
-
|
|
709
|
+
const y = pe(d);
|
|
710
|
+
if (y !== null) {
|
|
711
|
+
const z = se(l, d, o), K = z.left, G = z.left + z.width, j = z.top, te = z.top + z.height, X = y.scrollLeft + L, oe = Re(y) - d.clientWidth - L, J = oe < X ? X : oe, ne = y.scrollTop + w, _ = Pe(y) - d.clientHeight - w, O = _ < ne ? ne : _, W = y.scrollLeft, Q = Re(y), p = y.scrollTop, k = Pe(y);
|
|
712
|
+
G <= W ? P = X : K >= Q && (P = J), te <= p ? D = ne : j >= k && (D = O), D < ne ? D = ne : D > O && (D = O), P < X ? P = X : P > J && (P = J);
|
|
713
713
|
}
|
|
714
|
-
if (f ? (n.x = e + (
|
|
715
|
-
const
|
|
716
|
-
n.x <
|
|
714
|
+
if (f ? (n.x = e + (P - T), n.y = r + (D - H)) : (n.x = P, n.y = D), y !== null) {
|
|
715
|
+
const z = y.scrollLeft + L, K = Re(y) - d.clientWidth - L, G = y.scrollTop + w, j = Pe(y) - d.clientHeight - w, te = f ? z + S : z, X = f ? K + S : K, oe = f ? G + I : G, J = f ? j + I : j;
|
|
716
|
+
n.x < te ? n.x = te : n.x > X && (n.x = X), n.y < oe ? n.y = oe : n.y > J && (n.y = J);
|
|
717
717
|
}
|
|
718
718
|
return n;
|
|
719
719
|
}
|
|
720
|
-
}),
|
|
721
|
-
const r =
|
|
720
|
+
}), Dt = (t) => t.getBoundingClientRect().width !== t.clientWidth ? (t.getBoundingClientRect().width - t.clientWidth) / 2 : 0, Ot = (t) => t.getBoundingClientRect().height !== t.clientHeight ? (t.getBoundingClientRect().height - t.clientHeight) / 2 : 0, Le = (t, e) => {
|
|
721
|
+
const r = pe(t), o = [];
|
|
722
722
|
if (r !== null) {
|
|
723
723
|
const a = () => e();
|
|
724
724
|
r.addEventListener("scroll", a, !1), o.push(() => r.removeEventListener("scroll", a, !1));
|
|
@@ -732,21 +732,21 @@ const Rt = (t, e) => t.strategy ? t.strategy : Lt(e) ? "fixed" : "absolute", be
|
|
|
732
732
|
a.observe(t), o.push(() => a.disconnect());
|
|
733
733
|
}
|
|
734
734
|
return () => o.forEach((a) => a());
|
|
735
|
-
},
|
|
735
|
+
}, Et = (t, e, r = {}) => {
|
|
736
736
|
const o = se(t, e, r);
|
|
737
737
|
return {
|
|
738
738
|
x: o.left - e.getBoundingClientRect().width / 2 + o.width / 2,
|
|
739
739
|
y: o.top - e.getBoundingClientRect().height,
|
|
740
740
|
placement: "top"
|
|
741
741
|
};
|
|
742
|
-
},
|
|
742
|
+
}, Wt = (t, e, r = {}) => {
|
|
743
743
|
const o = se(t, e, r);
|
|
744
744
|
return {
|
|
745
745
|
x: o.left,
|
|
746
746
|
y: o.top - e.getBoundingClientRect().height,
|
|
747
747
|
placement: "top-start"
|
|
748
748
|
};
|
|
749
|
-
},
|
|
749
|
+
}, Mt = (t, e, r = {}) => {
|
|
750
750
|
const o = se(t, e, r);
|
|
751
751
|
return {
|
|
752
752
|
x: o.left - e.getBoundingClientRect().width + o.width,
|
|
@@ -788,14 +788,14 @@ const Rt = (t, e) => t.strategy ? t.strategy : Lt(e) ? "fixed" : "absolute", be
|
|
|
788
788
|
y: o.top + o.height,
|
|
789
789
|
placement: "bottom-start"
|
|
790
790
|
};
|
|
791
|
-
},
|
|
791
|
+
}, Gt = (t, e, r = {}) => {
|
|
792
792
|
const o = se(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
|
+
}, jt = (t, e, r = {}) => {
|
|
799
799
|
const o = se(t, e, r);
|
|
800
800
|
return {
|
|
801
801
|
x: o.left - e.getBoundingClientRect().width,
|
|
@@ -816,14 +816,14 @@ const Rt = (t, e) => t.strategy ? t.strategy : Lt(e) ? "fixed" : "absolute", be
|
|
|
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 Et(t, e, o);
|
|
823
823
|
case "top-start":
|
|
824
|
-
return
|
|
824
|
+
return Wt(t, e, o);
|
|
825
825
|
case "top-end":
|
|
826
|
-
return
|
|
826
|
+
return Mt(t, e, o);
|
|
827
827
|
case "right":
|
|
828
828
|
return Ht(t, e, o);
|
|
829
829
|
case "right-start":
|
|
@@ -835,9 +835,9 @@ const Rt = (t, e) => t.strategy ? t.strategy : Lt(e) ? "fixed" : "absolute", be
|
|
|
835
835
|
case "bottom-start":
|
|
836
836
|
return Yt(t, e, o);
|
|
837
837
|
case "bottom-end":
|
|
838
|
-
return jt(t, e, o);
|
|
839
|
-
case "left":
|
|
840
838
|
return Gt(t, e, o);
|
|
839
|
+
case "left":
|
|
840
|
+
return jt(t, e, o);
|
|
841
841
|
case "left-start":
|
|
842
842
|
return Xt(t, e, o);
|
|
843
843
|
case "left-end":
|
|
@@ -850,24 +850,24 @@ const Rt = (t, e) => t.strategy ? t.strategy : Lt(e) ? "fixed" : "absolute", be
|
|
|
850
850
|
};
|
|
851
851
|
}
|
|
852
852
|
}, Ut = (t, e, r, o = {}) => {
|
|
853
|
-
if (
|
|
853
|
+
if (ge(o, e)) {
|
|
854
854
|
if (typeof window > "u")
|
|
855
855
|
return !0;
|
|
856
|
-
const
|
|
857
|
-
return
|
|
856
|
+
const s = t.x, v = t.y, b = s + e.clientWidth, f = v + e.clientHeight;
|
|
857
|
+
return s >= 0 && v >= 0 && b <= window.innerWidth && f <= window.innerHeight;
|
|
858
858
|
}
|
|
859
|
-
if (
|
|
860
|
-
return ie(t.y, e, null, o) > 0 && de(t.x, e, null, o) > 0 &&
|
|
859
|
+
if (pe(r) !== null)
|
|
860
|
+
return ie(t.y, e, null, o) > 0 && de(t.x, e, null, o) > 0 && be(t.y, e, null, o) > 0 && ce(t.x, e, null, o) > 0;
|
|
861
861
|
if (typeof window > "u")
|
|
862
862
|
return !0;
|
|
863
|
-
const a = window.innerWidth, u = window.innerHeight,
|
|
864
|
-
if (
|
|
865
|
-
const
|
|
866
|
-
return v >= 0 &&
|
|
863
|
+
const a = window.innerWidth, u = window.innerHeight, d = (r instanceof HTMLElement ? r.offsetParent : null) || e.offsetParent;
|
|
864
|
+
if (d) {
|
|
865
|
+
const s = d.getBoundingClientRect(), v = s.left + t.x, b = s.top + t.y, f = v + e.clientWidth, C = b + e.clientHeight;
|
|
866
|
+
return v >= 0 && b >= 0 && f <= a && C <= u;
|
|
867
867
|
}
|
|
868
|
-
const c = t.x, l = t.y,
|
|
869
|
-
return c >= 0 && l >= 0 &&
|
|
870
|
-
},
|
|
868
|
+
const c = t.x, l = t.y, i = c + e.clientWidth, n = l + e.clientHeight;
|
|
869
|
+
return c >= 0 && l >= 0 && i <= a && n <= u;
|
|
870
|
+
}, ze = (t) => t.startsWith("right") ? "right" : t.startsWith("left") ? "left" : t.startsWith("top") ? "top" : "bottom", Zt = (t, e, r) => ze(e) === t && r.includes(e) ? e : r.find((o) => ze(o) === t) ?? r[0], Jt = (t, e, r = {}) => {
|
|
871
871
|
if (typeof window > "u")
|
|
872
872
|
return {
|
|
873
873
|
top: 0,
|
|
@@ -875,7 +875,7 @@ const Rt = (t, e) => t.strategy ? t.strategy : Lt(e) ? "fixed" : "absolute", be
|
|
|
875
875
|
bottom: 0,
|
|
876
876
|
left: 0
|
|
877
877
|
};
|
|
878
|
-
const o =
|
|
878
|
+
const o = ge(r, e) ? null : pe(t), a = t.getBoundingClientRect(), u = o ? o.getBoundingClientRect() : {
|
|
879
879
|
top: 0,
|
|
880
880
|
left: 0,
|
|
881
881
|
right: window.innerWidth,
|
|
@@ -887,39 +887,39 @@ const Rt = (t, e) => t.strategy ? t.strategy : Lt(e) ? "fixed" : "absolute", be
|
|
|
887
887
|
bottom: u.bottom - a.bottom,
|
|
888
888
|
left: a.left - u.left
|
|
889
889
|
};
|
|
890
|
-
},
|
|
890
|
+
}, Te = (t, e, r = {}) => new Promise((o) => {
|
|
891
891
|
var a, u;
|
|
892
|
-
const
|
|
892
|
+
const d = r.placement ? r.placement : "bottom", c = {
|
|
893
893
|
x: 0,
|
|
894
894
|
y: 0,
|
|
895
|
-
placement:
|
|
895
|
+
placement: d,
|
|
896
896
|
middlewareData: {}
|
|
897
|
-
}, l =
|
|
897
|
+
}, l = Ie(t, e, d, r);
|
|
898
898
|
c.x = l.x, c.y = l.y, c.placement = l.placement;
|
|
899
|
-
const
|
|
900
|
-
(a = r.middleware) == null || a.forEach((
|
|
901
|
-
const
|
|
899
|
+
const i = c.x, n = c.y, s = Pt(t);
|
|
900
|
+
(a = r.middleware) == null || a.forEach((C) => {
|
|
901
|
+
const $ = C.fn({
|
|
902
902
|
x: c.x,
|
|
903
903
|
y: c.y,
|
|
904
904
|
options: r,
|
|
905
|
-
primaryX:
|
|
905
|
+
primaryX: i,
|
|
906
906
|
primaryY: n,
|
|
907
907
|
floating: e,
|
|
908
908
|
placement: c.placement,
|
|
909
909
|
reference: t,
|
|
910
|
-
scrollDirection:
|
|
910
|
+
scrollDirection: s
|
|
911
911
|
});
|
|
912
|
-
c.x =
|
|
912
|
+
c.x = $.x, c.y = $.y, c.placement = $.placement, C.name === "arrow" && ($.baseX = $.x, $.baseY = $.y, $.x = $.arrowX ?? $.x, $.y = $.arrowY ?? $.y), c.middlewareData[C.name] = $;
|
|
913
913
|
});
|
|
914
|
-
const v =
|
|
914
|
+
const v = Ie(t, e, c.placement, r), b = _e(r, "offset"), f = b ? (u = b.params) == null ? void 0 : u.value : 0;
|
|
915
915
|
if (Number.isFinite(c.x) || (c.x = v.x), !Number.isFinite(c.y))
|
|
916
|
-
if (
|
|
917
|
-
const
|
|
918
|
-
c.placement.startsWith("top") ? c.y =
|
|
916
|
+
if (ge(r, e)) {
|
|
917
|
+
const C = t.getBoundingClientRect(), $ = e.getBoundingClientRect().height;
|
|
918
|
+
c.placement.startsWith("top") ? c.y = C.top - $ - f : c.placement.startsWith("bottom") ? c.y = C.bottom + f : c.y = v.y;
|
|
919
919
|
} else
|
|
920
920
|
c.y = v.y;
|
|
921
921
|
o(c);
|
|
922
|
-
}), Qt = ["disabled", "aria-expanded", "onKeydown"], eo = ["data-placement"], to = ["disabled", "aria-selected", "onClick"],
|
|
922
|
+
}), Qt = ["disabled", "aria-expanded", "onKeydown"], eo = ["data-placement"], to = ["disabled", "aria-selected", "onClick"], Ka = /* @__PURE__ */ Z({
|
|
923
923
|
__name: "select",
|
|
924
924
|
props: {
|
|
925
925
|
modelValue: { default: void 0 },
|
|
@@ -934,128 +934,128 @@ const Rt = (t, e) => t.strategy ? t.strategy : Lt(e) ? "fixed" : "absolute", be
|
|
|
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, u =
|
|
937
|
+
const o = e, a = t, u = R(null), d = R(null), c = R(null), l = R(!1), i = R("bottom"), n = R("bottom"), s = `vf-select-panel-${++r}`;
|
|
938
938
|
let v = null;
|
|
939
|
-
const
|
|
940
|
-
label:
|
|
941
|
-
value:
|
|
942
|
-
disabled:
|
|
943
|
-
}))), f = g(() =>
|
|
944
|
-
var
|
|
945
|
-
return ((
|
|
946
|
-
}),
|
|
947
|
-
const
|
|
948
|
-
return a.size !== "normal" &&
|
|
949
|
-
}),
|
|
950
|
-
|
|
951
|
-
},
|
|
952
|
-
l.value = !1,
|
|
953
|
-
},
|
|
954
|
-
a.disabled || (l.value = !l.value, l.value && (
|
|
955
|
-
},
|
|
956
|
-
var
|
|
957
|
-
l.value || (l.value = !0, await
|
|
958
|
-
}, L = (
|
|
959
|
-
var
|
|
939
|
+
const b = g(() => a.options.map((y) => ({
|
|
940
|
+
label: y[a.optionLabel],
|
|
941
|
+
value: y[a.optionValue],
|
|
942
|
+
disabled: y.disabled
|
|
943
|
+
}))), f = g(() => b.value.find((y) => y.value === a.modelValue)), C = g(() => {
|
|
944
|
+
var y;
|
|
945
|
+
return ((y = f.value) == null ? void 0 : y.label) ?? "";
|
|
946
|
+
}), $ = g(() => {
|
|
947
|
+
const y = ["vf-select", `vf-select_${a.variant}`, l.value ? "vf-select_open" : ""];
|
|
948
|
+
return a.size !== "normal" && y.push(`vf-select_${a.size}`), a.disabled && y.push("vf-select_disabled"), y.filter(Boolean);
|
|
949
|
+
}), S = (y) => y.value === a.modelValue, I = (y) => {
|
|
950
|
+
y.disabled || (o("update:modelValue", y.value), o("change", y.value), P());
|
|
951
|
+
}, T = (y) => o("focus", y), H = (y) => o("blur", y), P = () => {
|
|
952
|
+
l.value = !1, i.value = "bottom", n.value = "bottom";
|
|
953
|
+
}, D = () => {
|
|
954
|
+
a.disabled || (l.value = !l.value, l.value && (i.value = "bottom", n.value = "bottom"));
|
|
955
|
+
}, A = async () => {
|
|
956
|
+
var y, z;
|
|
957
|
+
l.value || (l.value = !0, await ke()), (z = (y = c.value) == null ? void 0 : y.querySelector(".vf-select__option:not(.is-disabled)")) == null || z.focus();
|
|
958
|
+
}, L = (y) => {
|
|
959
|
+
var K;
|
|
960
960
|
if (!l.value || !u.value)
|
|
961
961
|
return;
|
|
962
|
-
const
|
|
963
|
-
u.value.contains(
|
|
964
|
-
},
|
|
965
|
-
if (!
|
|
962
|
+
const z = y.target;
|
|
963
|
+
u.value.contains(z) || (K = c.value) != null && K.contains(z) || P();
|
|
964
|
+
}, w = () => {
|
|
965
|
+
if (!d.value || !c.value)
|
|
966
966
|
return;
|
|
967
|
-
const
|
|
967
|
+
const y = d.value, z = c.value, K = async () => {
|
|
968
968
|
const {
|
|
969
|
-
x:
|
|
970
|
-
y:
|
|
971
|
-
placement:
|
|
972
|
-
} = await
|
|
973
|
-
placement:
|
|
969
|
+
x: X,
|
|
970
|
+
y: oe,
|
|
971
|
+
placement: J
|
|
972
|
+
} = await Te(y, z, {
|
|
973
|
+
placement: i.value,
|
|
974
974
|
strategy: "fixed",
|
|
975
|
-
middleware: [
|
|
975
|
+
middleware: [Ve(2), Se({ placements: ["bottom", "top"] })]
|
|
976
976
|
});
|
|
977
|
-
n.value =
|
|
978
|
-
},
|
|
979
|
-
await
|
|
980
|
-
},
|
|
981
|
-
|
|
982
|
-
}),
|
|
983
|
-
|
|
977
|
+
n.value = J ?? i.value, z.style.minWidth = `${y.getBoundingClientRect().width}px`, z.style.left = `${X}px`, z.style.top = `${oe}px`;
|
|
978
|
+
}, G = async () => {
|
|
979
|
+
await K();
|
|
980
|
+
}, j = Le(y, () => {
|
|
981
|
+
G();
|
|
982
|
+
}), te = () => {
|
|
983
|
+
G();
|
|
984
984
|
};
|
|
985
|
-
document.addEventListener("scroll",
|
|
986
|
-
update:
|
|
985
|
+
document.addEventListener("scroll", te, !0), window.addEventListener("resize", te, !1), v = {
|
|
986
|
+
update: G,
|
|
987
987
|
destroy: () => {
|
|
988
|
-
|
|
988
|
+
j(), document.removeEventListener("scroll", te, !0), window.removeEventListener("resize", te, !1);
|
|
989
989
|
}
|
|
990
990
|
}, v.update();
|
|
991
991
|
};
|
|
992
|
-
return
|
|
993
|
-
if (!
|
|
992
|
+
return ee(l, async (y) => {
|
|
993
|
+
if (!y) {
|
|
994
994
|
v && (v.destroy(), v = null);
|
|
995
995
|
return;
|
|
996
996
|
}
|
|
997
|
-
await
|
|
998
|
-
}),
|
|
997
|
+
await ke(), v || w(), v == null || v.update();
|
|
998
|
+
}), ee(
|
|
999
999
|
() => a.options,
|
|
1000
1000
|
() => {
|
|
1001
1001
|
v == null || v.update();
|
|
1002
1002
|
},
|
|
1003
1003
|
{ deep: !0 }
|
|
1004
|
-
),
|
|
1004
|
+
), Fe(() => {
|
|
1005
1005
|
document.addEventListener("click", L);
|
|
1006
|
-
}),
|
|
1006
|
+
}), Ce(() => {
|
|
1007
1007
|
document.removeEventListener("click", L), v == null || v.destroy(), v = null;
|
|
1008
|
-
}), (
|
|
1008
|
+
}), (y, z) => (m(), h("div", {
|
|
1009
1009
|
ref_key: "root",
|
|
1010
1010
|
ref: u,
|
|
1011
|
-
class:
|
|
1011
|
+
class: E($.value)
|
|
1012
1012
|
}, [
|
|
1013
1013
|
B("button", {
|
|
1014
1014
|
ref_key: "trigger",
|
|
1015
|
-
ref:
|
|
1015
|
+
ref: d,
|
|
1016
1016
|
class: "vf-select__control",
|
|
1017
1017
|
type: "button",
|
|
1018
|
-
disabled:
|
|
1018
|
+
disabled: y.disabled,
|
|
1019
1019
|
"aria-expanded": l.value,
|
|
1020
|
-
"aria-controls":
|
|
1020
|
+
"aria-controls": s,
|
|
1021
1021
|
"aria-haspopup": "listbox",
|
|
1022
|
-
onClick:
|
|
1022
|
+
onClick: D,
|
|
1023
1023
|
onKeydown: [
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1024
|
+
q(Y(A, ["prevent"]), ["down"]),
|
|
1025
|
+
q(Y(D, ["prevent"]), ["enter"]),
|
|
1026
|
+
q(Y(P, ["prevent"]), ["esc"])
|
|
1027
1027
|
],
|
|
1028
|
-
onFocus:
|
|
1029
|
-
onBlur:
|
|
1028
|
+
onFocus: T,
|
|
1029
|
+
onBlur: H
|
|
1030
1030
|
}, [
|
|
1031
1031
|
B("span", {
|
|
1032
|
-
class:
|
|
1033
|
-
},
|
|
1034
|
-
|
|
1032
|
+
class: E(["vf-select__label", { "vf-select__label_placeholder": !C.value }])
|
|
1033
|
+
}, M(C.value || y.placeholder), 3),
|
|
1034
|
+
z[0] || (z[0] = B("span", {
|
|
1035
1035
|
class: "vf-select__chevron",
|
|
1036
1036
|
"aria-hidden": "true"
|
|
1037
1037
|
}, "▾", -1))
|
|
1038
1038
|
], 40, Qt),
|
|
1039
|
-
(
|
|
1040
|
-
|
|
1041
|
-
id:
|
|
1039
|
+
(m(), le(we, { to: "body" }, [
|
|
1040
|
+
ve(B("div", {
|
|
1041
|
+
id: s,
|
|
1042
1042
|
ref_key: "panel",
|
|
1043
1043
|
ref: c,
|
|
1044
1044
|
class: "vf-select__panel",
|
|
1045
1045
|
role: "listbox",
|
|
1046
1046
|
"data-placement": n.value
|
|
1047
1047
|
}, [
|
|
1048
|
-
(
|
|
1049
|
-
key:
|
|
1050
|
-
class:
|
|
1048
|
+
(m(!0), h(ue, null, Be(b.value, (K) => (m(), h("button", {
|
|
1049
|
+
key: K.value,
|
|
1050
|
+
class: E(["vf-select__option", { "is-active": S(K), "is-disabled": K.disabled }]),
|
|
1051
1051
|
type: "button",
|
|
1052
1052
|
role: "option",
|
|
1053
|
-
disabled:
|
|
1054
|
-
"aria-selected":
|
|
1055
|
-
onClick: (
|
|
1056
|
-
}, K
|
|
1053
|
+
disabled: K.disabled,
|
|
1054
|
+
"aria-selected": S(K),
|
|
1055
|
+
onClick: (G) => I(K)
|
|
1056
|
+
}, M(K.label), 11, to))), 128))
|
|
1057
1057
|
], 8, eo), [
|
|
1058
|
-
[
|
|
1058
|
+
[fe, l.value]
|
|
1059
1059
|
])
|
|
1060
1060
|
]))
|
|
1061
1061
|
], 2));
|
|
@@ -1066,7 +1066,7 @@ const Rt = (t, e) => t.strategy ? t.strategy : Lt(e) ? "fixed" : "absolute", be
|
|
|
1066
1066
|
}, no = ["id", "disabled", "aria-selected", "onClick"], so = {
|
|
1067
1067
|
key: 2,
|
|
1068
1068
|
class: "vf-autocomplete__empty"
|
|
1069
|
-
},
|
|
1069
|
+
}, Na = /* @__PURE__ */ Z({
|
|
1070
1070
|
__name: "autocomplete",
|
|
1071
1071
|
props: {
|
|
1072
1072
|
modelValue: { default: void 0 },
|
|
@@ -1086,214 +1086,463 @@ const Rt = (t, e) => t.strategy ? t.strategy : Lt(e) ? "fixed" : "absolute", be
|
|
|
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, u =
|
|
1089
|
+
const o = e, a = t, u = R(null), d = R(null), c = R(null), l = R(!1), i = R(""), n = R(-1), s = R("bottom"), v = R("bottom"), b = `vf-autocomplete-panel-${++r}`;
|
|
1090
1090
|
let f = null;
|
|
1091
|
-
const
|
|
1092
|
-
label:
|
|
1093
|
-
value:
|
|
1094
|
-
disabled:
|
|
1095
|
-
}))),
|
|
1091
|
+
const C = g(() => a.options.map((_) => ({
|
|
1092
|
+
label: _[a.optionLabel],
|
|
1093
|
+
value: _[a.optionValue],
|
|
1094
|
+
disabled: _.disabled
|
|
1095
|
+
}))), $ = g(() => C.value.find((_) => _.value === a.modelValue)), S = g(() => {
|
|
1096
1096
|
if (!a.filter)
|
|
1097
|
-
return
|
|
1098
|
-
const
|
|
1099
|
-
return
|
|
1100
|
-
}),
|
|
1097
|
+
return C.value;
|
|
1098
|
+
const _ = i.value.trim().toLowerCase();
|
|
1099
|
+
return _ ? C.value.filter((O) => O.label.toLowerCase().includes(_)) : C.value;
|
|
1100
|
+
}), I = g(() => {
|
|
1101
1101
|
if (!(!l.value || n.value < 0))
|
|
1102
|
-
return
|
|
1103
|
-
}),
|
|
1104
|
-
const
|
|
1105
|
-
return a.size !== "normal" &&
|
|
1106
|
-
}),
|
|
1107
|
-
const
|
|
1108
|
-
if (!
|
|
1102
|
+
return H(n.value);
|
|
1103
|
+
}), T = g(() => {
|
|
1104
|
+
const _ = ["vf-autocomplete", `vf-autocomplete_${a.variant}`, l.value ? "vf-autocomplete_open" : ""];
|
|
1105
|
+
return a.size !== "normal" && _.push(`vf-autocomplete_${a.size}`), a.disabled && _.push("vf-autocomplete_disabled"), _.filter(Boolean);
|
|
1106
|
+
}), H = (_) => `${b}-option-${_}`, P = (_) => _.value === a.modelValue, D = () => S.value.findIndex((_) => !_.disabled), A = (_) => {
|
|
1107
|
+
const O = S.value;
|
|
1108
|
+
if (!O.length) {
|
|
1109
1109
|
n.value = -1;
|
|
1110
1110
|
return;
|
|
1111
1111
|
}
|
|
1112
1112
|
let W = n.value;
|
|
1113
|
-
(W < 0 || W >=
|
|
1114
|
-
for (let
|
|
1115
|
-
if (W = (W +
|
|
1113
|
+
(W < 0 || W >= O.length) && (W = _ > 0 ? -1 : O.length);
|
|
1114
|
+
for (let Q = 0; Q < O.length; Q += 1)
|
|
1115
|
+
if (W = (W + _ + O.length) % O.length, !O[W].disabled) {
|
|
1116
1116
|
n.value = W;
|
|
1117
1117
|
return;
|
|
1118
1118
|
}
|
|
1119
1119
|
n.value = -1;
|
|
1120
1120
|
}, L = () => {
|
|
1121
|
-
a.disabled || (l.value = !0,
|
|
1122
|
-
},
|
|
1123
|
-
l.value = !1, n.value = -1,
|
|
1124
|
-
},
|
|
1121
|
+
a.disabled || (l.value = !0, s.value = "bottom", v.value = "bottom", n.value < 0 && (n.value = D()));
|
|
1122
|
+
}, w = () => {
|
|
1123
|
+
l.value = !1, n.value = -1, s.value = "bottom", v.value = "bottom";
|
|
1124
|
+
}, y = () => {
|
|
1125
1125
|
if (l.value) {
|
|
1126
|
-
|
|
1126
|
+
w();
|
|
1127
1127
|
return;
|
|
1128
1128
|
}
|
|
1129
1129
|
L();
|
|
1130
|
-
},
|
|
1131
|
-
|
|
1132
|
-
},
|
|
1133
|
-
const
|
|
1134
|
-
|
|
1135
|
-
},
|
|
1136
|
-
o("focus",
|
|
1137
|
-
},
|
|
1138
|
-
o("blur",
|
|
1139
|
-
},
|
|
1130
|
+
}, z = (_) => {
|
|
1131
|
+
_.disabled || (i.value = _.label, o("update:modelValue", _.value), o("change", _.value), w());
|
|
1132
|
+
}, K = (_) => {
|
|
1133
|
+
const O = _.target;
|
|
1134
|
+
i.value = O.value, o("search", O.value), L(), n.value = D();
|
|
1135
|
+
}, G = (_) => {
|
|
1136
|
+
o("focus", _), L();
|
|
1137
|
+
}, j = (_) => {
|
|
1138
|
+
o("blur", _);
|
|
1139
|
+
}, te = () => {
|
|
1140
1140
|
if (!l.value) {
|
|
1141
1141
|
L();
|
|
1142
1142
|
return;
|
|
1143
1143
|
}
|
|
1144
|
-
|
|
1145
|
-
},
|
|
1144
|
+
A(1);
|
|
1145
|
+
}, X = () => {
|
|
1146
1146
|
if (!l.value) {
|
|
1147
1147
|
L();
|
|
1148
1148
|
return;
|
|
1149
1149
|
}
|
|
1150
|
-
|
|
1151
|
-
},
|
|
1150
|
+
A(-1);
|
|
1151
|
+
}, oe = () => {
|
|
1152
1152
|
if (!l.value) {
|
|
1153
1153
|
L();
|
|
1154
1154
|
return;
|
|
1155
1155
|
}
|
|
1156
|
-
const
|
|
1157
|
-
|
|
1158
|
-
},
|
|
1156
|
+
const _ = S.value[n.value];
|
|
1157
|
+
_ && !_.disabled && z(_);
|
|
1158
|
+
}, J = (_) => {
|
|
1159
1159
|
var W;
|
|
1160
1160
|
if (!l.value || !u.value)
|
|
1161
1161
|
return;
|
|
1162
|
-
const
|
|
1163
|
-
u.value.contains(
|
|
1164
|
-
},
|
|
1165
|
-
if (!
|
|
1162
|
+
const O = _.target;
|
|
1163
|
+
u.value.contains(O) || (W = c.value) != null && W.contains(O) || w();
|
|
1164
|
+
}, ne = () => {
|
|
1165
|
+
if (!d.value || !c.value)
|
|
1166
1166
|
return;
|
|
1167
|
-
const
|
|
1167
|
+
const _ = d.value, O = c.value, W = async () => {
|
|
1168
1168
|
const {
|
|
1169
|
-
x
|
|
1170
|
-
y:
|
|
1171
|
-
placement:
|
|
1172
|
-
} = await
|
|
1173
|
-
placement:
|
|
1169
|
+
x,
|
|
1170
|
+
y: N,
|
|
1171
|
+
placement: re
|
|
1172
|
+
} = await Te(_, O, {
|
|
1173
|
+
placement: s.value,
|
|
1174
1174
|
strategy: "fixed",
|
|
1175
|
-
middleware: [
|
|
1175
|
+
middleware: [Ve(2), Se({ placements: ["bottom", "top"] })]
|
|
1176
1176
|
});
|
|
1177
|
-
v.value =
|
|
1178
|
-
},
|
|
1177
|
+
v.value = re ?? s.value, O.style.minWidth = `${_.getBoundingClientRect().width}px`, O.style.left = `${x}px`, O.style.top = `${N}px`;
|
|
1178
|
+
}, Q = async () => {
|
|
1179
1179
|
await W();
|
|
1180
|
-
},
|
|
1181
|
-
|
|
1182
|
-
}),
|
|
1183
|
-
|
|
1180
|
+
}, p = Le(_, () => {
|
|
1181
|
+
Q();
|
|
1182
|
+
}), k = () => {
|
|
1183
|
+
Q();
|
|
1184
1184
|
};
|
|
1185
|
-
document.addEventListener("scroll",
|
|
1186
|
-
update:
|
|
1185
|
+
document.addEventListener("scroll", k, !0), window.addEventListener("resize", k, !1), f = {
|
|
1186
|
+
update: Q,
|
|
1187
1187
|
destroy: () => {
|
|
1188
|
-
|
|
1188
|
+
p(), document.removeEventListener("scroll", k, !0), window.removeEventListener("resize", k, !1);
|
|
1189
1189
|
}
|
|
1190
1190
|
}, f.update();
|
|
1191
1191
|
};
|
|
1192
|
-
return
|
|
1192
|
+
return ee(
|
|
1193
1193
|
() => a.modelValue,
|
|
1194
1194
|
() => {
|
|
1195
|
-
var
|
|
1196
|
-
|
|
1195
|
+
var _;
|
|
1196
|
+
i.value = ((_ = $.value) == null ? void 0 : _.label) ?? "";
|
|
1197
1197
|
},
|
|
1198
1198
|
{ immediate: !0 }
|
|
1199
|
-
),
|
|
1199
|
+
), ee(
|
|
1200
1200
|
() => a.options,
|
|
1201
1201
|
() => {
|
|
1202
|
-
var
|
|
1203
|
-
l.value || (
|
|
1202
|
+
var _;
|
|
1203
|
+
l.value || (i.value = ((_ = $.value) == null ? void 0 : _.label) ?? ""), f == null || f.update();
|
|
1204
1204
|
},
|
|
1205
1205
|
{ deep: !0 }
|
|
1206
|
-
),
|
|
1207
|
-
n.value >=
|
|
1208
|
-
}),
|
|
1209
|
-
if (!
|
|
1206
|
+
), ee(S, () => {
|
|
1207
|
+
n.value >= S.value.length && (n.value = D());
|
|
1208
|
+
}), ee(l, async (_) => {
|
|
1209
|
+
if (!_) {
|
|
1210
1210
|
f && (f.destroy(), f = null);
|
|
1211
1211
|
return;
|
|
1212
1212
|
}
|
|
1213
|
-
await
|
|
1214
|
-
}),
|
|
1215
|
-
document.addEventListener("click",
|
|
1216
|
-
}),
|
|
1217
|
-
document.removeEventListener("click",
|
|
1218
|
-
}), (
|
|
1213
|
+
await ke(), f || ne(), f == null || f.update();
|
|
1214
|
+
}), Fe(() => {
|
|
1215
|
+
document.addEventListener("click", J);
|
|
1216
|
+
}), Ce(() => {
|
|
1217
|
+
document.removeEventListener("click", J), f == null || f.destroy(), f = null;
|
|
1218
|
+
}), (_, O) => (m(), h("div", {
|
|
1219
1219
|
ref_key: "root",
|
|
1220
1220
|
ref: u,
|
|
1221
|
-
class:
|
|
1221
|
+
class: E(T.value)
|
|
1222
1222
|
}, [
|
|
1223
1223
|
B("input", {
|
|
1224
1224
|
ref_key: "control",
|
|
1225
|
-
ref:
|
|
1225
|
+
ref: d,
|
|
1226
1226
|
class: "vf-autocomplete__control",
|
|
1227
1227
|
type: "text",
|
|
1228
1228
|
role: "combobox",
|
|
1229
|
-
value:
|
|
1230
|
-
placeholder:
|
|
1231
|
-
disabled:
|
|
1232
|
-
readonly:
|
|
1229
|
+
value: i.value,
|
|
1230
|
+
placeholder: _.placeholder,
|
|
1231
|
+
disabled: _.disabled,
|
|
1232
|
+
readonly: _.readonly,
|
|
1233
1233
|
"aria-expanded": l.value,
|
|
1234
1234
|
"aria-autocomplete": "list",
|
|
1235
|
-
"aria-controls":
|
|
1236
|
-
"aria-activedescendant":
|
|
1237
|
-
onInput:
|
|
1238
|
-
onFocus:
|
|
1239
|
-
onBlur:
|
|
1235
|
+
"aria-controls": b,
|
|
1236
|
+
"aria-activedescendant": I.value,
|
|
1237
|
+
onInput: K,
|
|
1238
|
+
onFocus: G,
|
|
1239
|
+
onBlur: j,
|
|
1240
1240
|
onClick: L,
|
|
1241
1241
|
onKeydown: [
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1242
|
+
q(Y(te, ["prevent"]), ["down"]),
|
|
1243
|
+
q(Y(X, ["prevent"]), ["up"]),
|
|
1244
|
+
q(Y(oe, ["prevent"]), ["enter"]),
|
|
1245
|
+
q(Y(w, ["prevent"]), ["esc"]),
|
|
1246
|
+
q(w, ["tab"])
|
|
1247
1247
|
]
|
|
1248
1248
|
}, null, 40, oo),
|
|
1249
1249
|
B("button", {
|
|
1250
1250
|
class: "vf-autocomplete__chevron",
|
|
1251
1251
|
type: "button",
|
|
1252
|
-
disabled:
|
|
1252
|
+
disabled: _.disabled,
|
|
1253
1253
|
"aria-hidden": "true",
|
|
1254
1254
|
tabindex: "-1",
|
|
1255
|
-
onMousedown:
|
|
1255
|
+
onMousedown: O[0] || (O[0] = Y(() => {
|
|
1256
1256
|
}, ["prevent"])),
|
|
1257
|
-
onClick:
|
|
1257
|
+
onClick: y
|
|
1258
1258
|
}, " ▾ ", 40, ao),
|
|
1259
|
-
(
|
|
1260
|
-
|
|
1261
|
-
id:
|
|
1259
|
+
(m(), le(we, { to: "body" }, [
|
|
1260
|
+
ve(B("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": v.value
|
|
1267
1267
|
}, [
|
|
1268
|
-
|
|
1269
|
-
id:
|
|
1268
|
+
_.loading ? (m(), h("div", lo, M(_.loadingText), 1)) : S.value.length > 0 ? (m(!0), h(ue, { key: 1 }, Be(S.value, (W, Q) => (m(), h("button", {
|
|
1269
|
+
id: H(Q),
|
|
1270
1270
|
key: W.value,
|
|
1271
|
-
class:
|
|
1272
|
-
"is-active":
|
|
1271
|
+
class: E(["vf-autocomplete__option", {
|
|
1272
|
+
"is-active": P(W),
|
|
1273
1273
|
"is-disabled": W.disabled,
|
|
1274
|
-
"is-highlighted":
|
|
1274
|
+
"is-highlighted": Q === n.value
|
|
1275
1275
|
}]),
|
|
1276
1276
|
type: "button",
|
|
1277
1277
|
role: "option",
|
|
1278
1278
|
disabled: W.disabled,
|
|
1279
|
-
"aria-selected":
|
|
1280
|
-
onMousedown:
|
|
1279
|
+
"aria-selected": P(W),
|
|
1280
|
+
onMousedown: O[1] || (O[1] = Y(() => {
|
|
1281
1281
|
}, ["prevent"])),
|
|
1282
|
-
onClick: (
|
|
1283
|
-
},
|
|
1282
|
+
onClick: (p) => z(W)
|
|
1283
|
+
}, M(W.label), 43, no))), 128)) : (m(), h("div", so, M(_.emptyText), 1))
|
|
1284
1284
|
], 8, ro), [
|
|
1285
|
-
[
|
|
1285
|
+
[fe, l.value]
|
|
1286
1286
|
])
|
|
1287
1287
|
]))
|
|
1288
1288
|
], 2));
|
|
1289
1289
|
}
|
|
1290
|
-
}), io = ["disabled", "aria-expanded", "onKeydown"], co = ["data-placement"
|
|
1290
|
+
}), io = ["disabled", "aria-expanded", "onKeydown"], co = ["data-placement"], uo = {
|
|
1291
|
+
key: 0,
|
|
1292
|
+
class: "vf-multiselect__search"
|
|
1293
|
+
}, vo = ["value", "placeholder", "onKeydown"], fo = {
|
|
1294
|
+
key: 1,
|
|
1295
|
+
class: "vf-multiselect__loading"
|
|
1296
|
+
}, po = ["id", "disabled", "aria-selected", "onClick"], bo = { class: "vf-multiselect__option-label" }, mo = {
|
|
1297
|
+
key: 0,
|
|
1298
|
+
class: "vf-multiselect__option-check",
|
|
1299
|
+
"aria-hidden": "true"
|
|
1300
|
+
}, go = {
|
|
1301
|
+
key: 3,
|
|
1302
|
+
class: "vf-multiselect__empty"
|
|
1303
|
+
}, Ya = /* @__PURE__ */ Z({
|
|
1304
|
+
__name: "multi-select",
|
|
1305
|
+
props: {
|
|
1306
|
+
modelValue: { default: () => [] },
|
|
1307
|
+
options: { default: () => [] },
|
|
1308
|
+
optionLabel: { default: "label" },
|
|
1309
|
+
optionValue: { default: "value" },
|
|
1310
|
+
placeholder: { default: "" },
|
|
1311
|
+
searchPlaceholder: { default: "Search..." },
|
|
1312
|
+
disabled: { type: Boolean, default: !1 },
|
|
1313
|
+
readonly: { type: Boolean, default: !1 },
|
|
1314
|
+
loading: { type: Boolean, default: !1 },
|
|
1315
|
+
loadingText: { default: "Loading..." },
|
|
1316
|
+
emptyText: { default: "No results" },
|
|
1317
|
+
filter: { type: Boolean, default: !0 },
|
|
1318
|
+
clearable: { type: Boolean, default: !1 },
|
|
1319
|
+
variant: { default: "filled" },
|
|
1320
|
+
size: { default: "normal" }
|
|
1321
|
+
},
|
|
1322
|
+
emits: ["update:modelValue", "change", "search", "focus", "blur"],
|
|
1323
|
+
setup(t, { emit: e }) {
|
|
1324
|
+
let r = 0;
|
|
1325
|
+
const o = e, a = t, u = R(null), d = R(null), c = R(null), l = R(null), i = R(!1), n = R(""), s = R(-1), v = R("bottom"), b = R("bottom"), f = `vf-multiselect-panel-${++r}`;
|
|
1326
|
+
let C = null;
|
|
1327
|
+
const $ = g(() => a.options.map((p) => ({
|
|
1328
|
+
label: p[a.optionLabel],
|
|
1329
|
+
value: p[a.optionValue],
|
|
1330
|
+
disabled: p.disabled
|
|
1331
|
+
}))), S = g(() => Array.isArray(a.modelValue) ? a.modelValue : []), I = g(() => {
|
|
1332
|
+
if (!a.filter)
|
|
1333
|
+
return $.value;
|
|
1334
|
+
const p = n.value.trim().toLowerCase();
|
|
1335
|
+
return p ? $.value.filter((k) => k.label.toLowerCase().includes(p)) : $.value;
|
|
1336
|
+
}), T = g(() => $.value.filter((p) => S.value.includes(p.value))), H = g(() => T.value.length === 0 ? a.placeholder : T.value.map((p) => p.label).join(", ")), P = g(() => {
|
|
1337
|
+
const p = ["vf-multiselect", `vf-multiselect_${a.variant}`, i.value ? "vf-multiselect_open" : ""];
|
|
1338
|
+
return a.size !== "normal" && p.push(`vf-multiselect_${a.size}`), a.disabled && p.push("vf-multiselect_disabled"), p.filter(Boolean);
|
|
1339
|
+
}), D = (p) => `${f}-option-${p}`, A = () => I.value.findIndex((p) => !p.disabled), L = (p) => S.value.includes(p.value), w = (p) => {
|
|
1340
|
+
o("update:modelValue", p), o("change", p);
|
|
1341
|
+
}, y = (p) => {
|
|
1342
|
+
if (!(p.disabled || a.readonly)) {
|
|
1343
|
+
if (L(p)) {
|
|
1344
|
+
w(S.value.filter((k) => k !== p.value));
|
|
1345
|
+
return;
|
|
1346
|
+
}
|
|
1347
|
+
w([...S.value, p.value]);
|
|
1348
|
+
}
|
|
1349
|
+
}, z = () => {
|
|
1350
|
+
a.readonly || w([]);
|
|
1351
|
+
}, K = (p) => {
|
|
1352
|
+
const k = I.value;
|
|
1353
|
+
if (!k.length) {
|
|
1354
|
+
s.value = -1;
|
|
1355
|
+
return;
|
|
1356
|
+
}
|
|
1357
|
+
let x = s.value;
|
|
1358
|
+
(x < 0 || x >= k.length) && (x = p > 0 ? -1 : k.length);
|
|
1359
|
+
for (let N = 0; N < k.length; N += 1)
|
|
1360
|
+
if (x = (x + p + k.length) % k.length, !k[x].disabled) {
|
|
1361
|
+
s.value = x;
|
|
1362
|
+
return;
|
|
1363
|
+
}
|
|
1364
|
+
s.value = -1;
|
|
1365
|
+
}, G = async () => {
|
|
1366
|
+
var p;
|
|
1367
|
+
a.disabled || (i.value = !0, v.value = "bottom", b.value = "bottom", s.value < 0 && (s.value = A()), a.filter && (await ke(), (p = l.value) == null || p.focus()));
|
|
1368
|
+
}, j = () => {
|
|
1369
|
+
i.value = !1, s.value = -1, v.value = "bottom", b.value = "bottom", n.value = "";
|
|
1370
|
+
}, te = () => {
|
|
1371
|
+
if (i.value) {
|
|
1372
|
+
j();
|
|
1373
|
+
return;
|
|
1374
|
+
}
|
|
1375
|
+
G();
|
|
1376
|
+
}, X = () => {
|
|
1377
|
+
if (!i.value) {
|
|
1378
|
+
G();
|
|
1379
|
+
return;
|
|
1380
|
+
}
|
|
1381
|
+
K(1);
|
|
1382
|
+
}, oe = () => {
|
|
1383
|
+
if (!i.value) {
|
|
1384
|
+
G();
|
|
1385
|
+
return;
|
|
1386
|
+
}
|
|
1387
|
+
K(-1);
|
|
1388
|
+
}, J = () => {
|
|
1389
|
+
if (!i.value) {
|
|
1390
|
+
G();
|
|
1391
|
+
return;
|
|
1392
|
+
}
|
|
1393
|
+
const p = I.value[s.value];
|
|
1394
|
+
p && !p.disabled && y(p);
|
|
1395
|
+
}, ne = (p) => {
|
|
1396
|
+
const k = p.target;
|
|
1397
|
+
n.value = k.value, o("search", k.value), s.value = A();
|
|
1398
|
+
}, _ = (p) => o("focus", p), O = (p) => o("blur", p), W = (p) => {
|
|
1399
|
+
var x;
|
|
1400
|
+
if (!i.value || !u.value)
|
|
1401
|
+
return;
|
|
1402
|
+
const k = p.target;
|
|
1403
|
+
u.value.contains(k) || (x = c.value) != null && x.contains(k) || j();
|
|
1404
|
+
}, Q = () => {
|
|
1405
|
+
if (!d.value || !c.value)
|
|
1406
|
+
return;
|
|
1407
|
+
const p = d.value, k = c.value, x = async () => {
|
|
1408
|
+
const {
|
|
1409
|
+
x: he,
|
|
1410
|
+
y: Oe,
|
|
1411
|
+
placement: Ee
|
|
1412
|
+
} = await Te(p, k, {
|
|
1413
|
+
placement: v.value,
|
|
1414
|
+
strategy: "fixed",
|
|
1415
|
+
middleware: [Ve(2), Se({ placements: ["bottom", "top"] })]
|
|
1416
|
+
});
|
|
1417
|
+
b.value = Ee ?? v.value, k.style.minWidth = `${p.getBoundingClientRect().width}px`, k.style.left = `${he}px`, k.style.top = `${Oe}px`;
|
|
1418
|
+
}, N = async () => {
|
|
1419
|
+
await x();
|
|
1420
|
+
}, re = Le(p, () => {
|
|
1421
|
+
N();
|
|
1422
|
+
}), U = () => {
|
|
1423
|
+
N();
|
|
1424
|
+
};
|
|
1425
|
+
document.addEventListener("scroll", U, !0), window.addEventListener("resize", U, !1), C = {
|
|
1426
|
+
update: N,
|
|
1427
|
+
destroy: () => {
|
|
1428
|
+
re(), document.removeEventListener("scroll", U, !0), window.removeEventListener("resize", U, !1);
|
|
1429
|
+
}
|
|
1430
|
+
}, C.update();
|
|
1431
|
+
};
|
|
1432
|
+
return ee(
|
|
1433
|
+
() => a.options,
|
|
1434
|
+
() => {
|
|
1435
|
+
s.value >= I.value.length && (s.value = A()), C == null || C.update();
|
|
1436
|
+
},
|
|
1437
|
+
{ deep: !0 }
|
|
1438
|
+
), ee(i, async (p) => {
|
|
1439
|
+
if (!p) {
|
|
1440
|
+
C && (C.destroy(), C = null);
|
|
1441
|
+
return;
|
|
1442
|
+
}
|
|
1443
|
+
await ke(), C || Q(), C == null || C.update();
|
|
1444
|
+
}), ee(I, () => {
|
|
1445
|
+
s.value >= I.value.length && (s.value = A());
|
|
1446
|
+
}), Fe(() => {
|
|
1447
|
+
document.addEventListener("click", W);
|
|
1448
|
+
}), Ce(() => {
|
|
1449
|
+
document.removeEventListener("click", W), C == null || C.destroy(), C = null;
|
|
1450
|
+
}), (p, k) => (m(), h("div", {
|
|
1451
|
+
ref_key: "root",
|
|
1452
|
+
ref: u,
|
|
1453
|
+
class: E(P.value)
|
|
1454
|
+
}, [
|
|
1455
|
+
B("button", {
|
|
1456
|
+
ref_key: "trigger",
|
|
1457
|
+
ref: d,
|
|
1458
|
+
class: "vf-multiselect__control",
|
|
1459
|
+
type: "button",
|
|
1460
|
+
disabled: p.disabled,
|
|
1461
|
+
"aria-expanded": i.value,
|
|
1462
|
+
"aria-controls": f,
|
|
1463
|
+
"aria-haspopup": "listbox",
|
|
1464
|
+
onClick: te,
|
|
1465
|
+
onKeydown: [
|
|
1466
|
+
q(Y(X, ["prevent"]), ["down"]),
|
|
1467
|
+
q(Y(oe, ["prevent"]), ["up"]),
|
|
1468
|
+
q(Y(J, ["prevent"]), ["enter"]),
|
|
1469
|
+
q(Y(j, ["prevent"]), ["esc"])
|
|
1470
|
+
],
|
|
1471
|
+
onFocus: _,
|
|
1472
|
+
onBlur: O
|
|
1473
|
+
}, [
|
|
1474
|
+
B("span", {
|
|
1475
|
+
class: E(["vf-multiselect__label", { "vf-multiselect__label_placeholder": S.value.length === 0 }])
|
|
1476
|
+
}, M(H.value), 3),
|
|
1477
|
+
k[0] || (k[0] = B("span", {
|
|
1478
|
+
class: "vf-multiselect__chevron",
|
|
1479
|
+
"aria-hidden": "true"
|
|
1480
|
+
}, "▾", -1))
|
|
1481
|
+
], 40, io),
|
|
1482
|
+
p.clearable && S.value.length > 0 && !p.disabled && !p.readonly ? (m(), h("button", {
|
|
1483
|
+
key: 0,
|
|
1484
|
+
class: "vf-multiselect__clear",
|
|
1485
|
+
type: "button",
|
|
1486
|
+
"aria-label": "Clear selection",
|
|
1487
|
+
onClick: Y(z, ["stop"])
|
|
1488
|
+
}, " ✕ ")) : V("", !0),
|
|
1489
|
+
(m(), le(we, { to: "body" }, [
|
|
1490
|
+
ve(B("div", {
|
|
1491
|
+
id: f,
|
|
1492
|
+
ref_key: "panel",
|
|
1493
|
+
ref: c,
|
|
1494
|
+
class: "vf-multiselect__panel",
|
|
1495
|
+
role: "listbox",
|
|
1496
|
+
"aria-multiselectable": "true",
|
|
1497
|
+
"data-placement": b.value
|
|
1498
|
+
}, [
|
|
1499
|
+
p.filter ? (m(), h("div", uo, [
|
|
1500
|
+
B("input", {
|
|
1501
|
+
ref_key: "searchInput",
|
|
1502
|
+
ref: l,
|
|
1503
|
+
class: "vf-multiselect__search-control",
|
|
1504
|
+
type: "text",
|
|
1505
|
+
value: n.value,
|
|
1506
|
+
placeholder: p.searchPlaceholder,
|
|
1507
|
+
onInput: ne,
|
|
1508
|
+
onKeydown: [
|
|
1509
|
+
q(Y(X, ["prevent"]), ["down"]),
|
|
1510
|
+
q(Y(oe, ["prevent"]), ["up"]),
|
|
1511
|
+
q(Y(J, ["prevent"]), ["enter"]),
|
|
1512
|
+
q(Y(j, ["prevent"]), ["esc"])
|
|
1513
|
+
]
|
|
1514
|
+
}, null, 40, vo)
|
|
1515
|
+
])) : V("", !0),
|
|
1516
|
+
p.loading ? (m(), h("div", fo, M(p.loadingText), 1)) : I.value.length > 0 ? (m(!0), h(ue, { key: 2 }, Be(I.value, (x, N) => (m(), h("button", {
|
|
1517
|
+
id: D(N),
|
|
1518
|
+
key: x.value,
|
|
1519
|
+
class: E(["vf-multiselect__option", {
|
|
1520
|
+
"is-active": L(x),
|
|
1521
|
+
"is-disabled": x.disabled,
|
|
1522
|
+
"is-highlighted": N === s.value
|
|
1523
|
+
}]),
|
|
1524
|
+
type: "button",
|
|
1525
|
+
role: "option",
|
|
1526
|
+
disabled: x.disabled,
|
|
1527
|
+
"aria-selected": L(x),
|
|
1528
|
+
onClick: (re) => y(x)
|
|
1529
|
+
}, [
|
|
1530
|
+
B("span", bo, M(x.label), 1),
|
|
1531
|
+
L(x) ? (m(), h("span", mo, "✓")) : V("", !0)
|
|
1532
|
+
], 10, po))), 128)) : (m(), h("div", go, M(p.emptyText), 1))
|
|
1533
|
+
], 8, co), [
|
|
1534
|
+
[fe, i.value]
|
|
1535
|
+
])
|
|
1536
|
+
]))
|
|
1537
|
+
], 2));
|
|
1538
|
+
}
|
|
1539
|
+
}), ho = ["disabled", "aria-expanded", "onKeydown"], yo = ["data-placement", "onKeydown"], _o = { class: "vf-datepicker__header" }, ko = { class: "vf-datepicker__month-label" }, Co = {
|
|
1291
1540
|
class: "vf-datepicker__weekdays",
|
|
1292
1541
|
role: "row"
|
|
1293
|
-
},
|
|
1542
|
+
}, wo = {
|
|
1294
1543
|
class: "vf-datepicker__days",
|
|
1295
1544
|
role: "grid"
|
|
1296
|
-
},
|
|
1545
|
+
}, $o = ["disabled", "data-date", "onClick"], Ga = /* @__PURE__ */ Z({
|
|
1297
1546
|
__name: "datepicker",
|
|
1298
1547
|
props: {
|
|
1299
1548
|
modelValue: { default: void 0 },
|
|
@@ -1310,234 +1559,234 @@ const Rt = (t, e) => t.strategy ? t.strategy : Lt(e) ? "fixed" : "absolute", be
|
|
|
1310
1559
|
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
1311
1560
|
setup(t, { emit: e }) {
|
|
1312
1561
|
let r = 0;
|
|
1313
|
-
const o = e, a = t, u =
|
|
1314
|
-
let
|
|
1315
|
-
const f = g(() =>
|
|
1562
|
+
const o = e, a = t, u = R(null), d = R(null), c = R(null), l = R(!1), i = R("bottom"), n = R("bottom"), s = `vf-datepicker-panel-${++r}`, v = R(J(X(a.modelValue) ?? /* @__PURE__ */ new Date()));
|
|
1563
|
+
let b = null;
|
|
1564
|
+
const f = g(() => X(a.modelValue)), C = g(() => X(a.min)), $ = g(() => X(a.max)), S = g(() => f.value ? f.value.toLocaleDateString(a.locale, {
|
|
1316
1565
|
year: "numeric",
|
|
1317
1566
|
month: "short",
|
|
1318
1567
|
day: "numeric"
|
|
1319
|
-
}) : ""),
|
|
1568
|
+
}) : ""), I = g(() => v.value.toLocaleDateString(a.locale, {
|
|
1320
1569
|
year: "numeric",
|
|
1321
1570
|
month: "long"
|
|
1322
|
-
})),
|
|
1323
|
-
const
|
|
1324
|
-
return Array.from({ length: 7 }, (
|
|
1325
|
-
const
|
|
1326
|
-
return U.setDate(
|
|
1571
|
+
})), T = g(() => {
|
|
1572
|
+
const p = new Intl.DateTimeFormat(a.locale, { weekday: "short" }), k = new Date(2026, 0, 4);
|
|
1573
|
+
return Array.from({ length: 7 }, (x, N) => {
|
|
1574
|
+
const re = (N + a.firstDayOfWeek) % 7, U = new Date(k);
|
|
1575
|
+
return U.setDate(k.getDate() + re), p.format(U);
|
|
1327
1576
|
});
|
|
1328
|
-
}),
|
|
1329
|
-
const
|
|
1330
|
-
return Array.from({ length: 42 }, (
|
|
1331
|
-
const U =
|
|
1577
|
+
}), H = g(() => {
|
|
1578
|
+
const p = O(v.value, a.firstDayOfWeek), k = f.value ? W(f.value) : null, x = W(/* @__PURE__ */ new Date());
|
|
1579
|
+
return Array.from({ length: 42 }, (N, re) => {
|
|
1580
|
+
const U = _(p, re), he = W(U);
|
|
1332
1581
|
return {
|
|
1333
|
-
key: `${
|
|
1334
|
-
iso:
|
|
1582
|
+
key: `${he}-${re}`,
|
|
1583
|
+
iso: he,
|
|
1335
1584
|
date: U,
|
|
1336
1585
|
day: U.getDate(),
|
|
1337
1586
|
inCurrentMonth: U.getMonth() === v.value.getMonth(),
|
|
1338
|
-
isDisabled:
|
|
1339
|
-
isSelected:
|
|
1340
|
-
isToday:
|
|
1587
|
+
isDisabled: Q(U, C.value, $.value),
|
|
1588
|
+
isSelected: k === he,
|
|
1589
|
+
isToday: he === x
|
|
1341
1590
|
};
|
|
1342
1591
|
});
|
|
1343
|
-
}),
|
|
1344
|
-
const
|
|
1345
|
-
return a.size !== "normal" &&
|
|
1346
|
-
}),
|
|
1347
|
-
a.disabled || a.readonly || (l.value = !0,
|
|
1348
|
-
},
|
|
1349
|
-
l.value = !1,
|
|
1350
|
-
},
|
|
1592
|
+
}), P = g(() => {
|
|
1593
|
+
const p = ["vf-datepicker", `vf-datepicker_${a.variant}`, l.value ? "vf-datepicker_open" : ""];
|
|
1594
|
+
return a.size !== "normal" && p.push(`vf-datepicker_${a.size}`), a.disabled && p.push("vf-datepicker_disabled"), p.filter(Boolean);
|
|
1595
|
+
}), D = (p) => o("focus", p), A = (p) => o("blur", p), L = () => {
|
|
1596
|
+
a.disabled || a.readonly || (l.value = !0, i.value = "bottom", n.value = "bottom");
|
|
1597
|
+
}, w = () => {
|
|
1598
|
+
l.value = !1, i.value = "bottom", n.value = "bottom";
|
|
1599
|
+
}, y = () => {
|
|
1351
1600
|
if (l.value) {
|
|
1352
|
-
|
|
1601
|
+
w();
|
|
1353
1602
|
return;
|
|
1354
1603
|
}
|
|
1355
1604
|
L();
|
|
1356
|
-
},
|
|
1357
|
-
v.value =
|
|
1358
|
-
},
|
|
1359
|
-
v.value =
|
|
1360
|
-
},
|
|
1361
|
-
if (a.readonly ||
|
|
1605
|
+
}, z = () => {
|
|
1606
|
+
v.value = ne(v.value, -1);
|
|
1607
|
+
}, K = () => {
|
|
1608
|
+
v.value = ne(v.value, 1);
|
|
1609
|
+
}, G = (p) => {
|
|
1610
|
+
if (a.readonly || Q(p, C.value, $.value))
|
|
1362
1611
|
return;
|
|
1363
|
-
const
|
|
1364
|
-
o("update:modelValue",
|
|
1365
|
-
},
|
|
1366
|
-
var
|
|
1612
|
+
const k = W(p);
|
|
1613
|
+
o("update:modelValue", k), o("change", k), w();
|
|
1614
|
+
}, j = (p) => {
|
|
1615
|
+
var x;
|
|
1367
1616
|
if (!l.value || !u.value)
|
|
1368
1617
|
return;
|
|
1369
|
-
const
|
|
1370
|
-
u.value.contains(
|
|
1371
|
-
},
|
|
1372
|
-
if (!
|
|
1618
|
+
const k = p.target;
|
|
1619
|
+
u.value.contains(k) || (x = c.value) != null && x.contains(k) || w();
|
|
1620
|
+
}, te = () => {
|
|
1621
|
+
if (!d.value || !c.value)
|
|
1373
1622
|
return;
|
|
1374
|
-
const
|
|
1623
|
+
const p = d.value, k = c.value, x = async () => {
|
|
1375
1624
|
const {
|
|
1376
|
-
x:
|
|
1377
|
-
y:
|
|
1378
|
-
placement:
|
|
1379
|
-
} = await
|
|
1380
|
-
placement:
|
|
1625
|
+
x: he,
|
|
1626
|
+
y: Oe,
|
|
1627
|
+
placement: Ee
|
|
1628
|
+
} = await Te(p, k, {
|
|
1629
|
+
placement: i.value,
|
|
1381
1630
|
strategy: "fixed",
|
|
1382
|
-
middleware: [
|
|
1631
|
+
middleware: [Ve(2), Se({ placements: ["bottom", "top"] })]
|
|
1383
1632
|
});
|
|
1384
|
-
n.value =
|
|
1385
|
-
},
|
|
1386
|
-
await
|
|
1387
|
-
},
|
|
1388
|
-
|
|
1633
|
+
n.value = Ee ?? i.value, k.style.left = `${he}px`, k.style.top = `${Oe}px`;
|
|
1634
|
+
}, N = async () => {
|
|
1635
|
+
await x();
|
|
1636
|
+
}, re = Le(p, () => {
|
|
1637
|
+
N();
|
|
1389
1638
|
}), U = () => {
|
|
1390
|
-
|
|
1639
|
+
N();
|
|
1391
1640
|
};
|
|
1392
|
-
document.addEventListener("scroll", U, !0), window.addEventListener("resize", U, !1),
|
|
1393
|
-
update:
|
|
1641
|
+
document.addEventListener("scroll", U, !0), window.addEventListener("resize", U, !1), b = {
|
|
1642
|
+
update: N,
|
|
1394
1643
|
destroy: () => {
|
|
1395
|
-
|
|
1644
|
+
re(), document.removeEventListener("scroll", U, !0), window.removeEventListener("resize", U, !1);
|
|
1396
1645
|
}
|
|
1397
|
-
},
|
|
1646
|
+
}, b.update();
|
|
1398
1647
|
};
|
|
1399
|
-
|
|
1648
|
+
ee(
|
|
1400
1649
|
() => a.modelValue,
|
|
1401
|
-
(
|
|
1402
|
-
const
|
|
1403
|
-
|
|
1650
|
+
(p) => {
|
|
1651
|
+
const k = X(p);
|
|
1652
|
+
k && (v.value = J(k));
|
|
1404
1653
|
},
|
|
1405
1654
|
{ immediate: !0 }
|
|
1406
|
-
),
|
|
1655
|
+
), ee(
|
|
1407
1656
|
() => [a.min, a.max],
|
|
1408
1657
|
() => {
|
|
1409
|
-
|
|
1658
|
+
b == null || b.update();
|
|
1410
1659
|
}
|
|
1411
|
-
),
|
|
1412
|
-
if (!
|
|
1413
|
-
|
|
1660
|
+
), ee(l, async (p) => {
|
|
1661
|
+
if (!p) {
|
|
1662
|
+
b && (b.destroy(), b = null);
|
|
1414
1663
|
return;
|
|
1415
1664
|
}
|
|
1416
|
-
await
|
|
1417
|
-
}),
|
|
1418
|
-
document.addEventListener("click",
|
|
1419
|
-
}),
|
|
1420
|
-
document.removeEventListener("click",
|
|
1665
|
+
await ke(), b || te(), b == null || b.update();
|
|
1666
|
+
}), Fe(() => {
|
|
1667
|
+
document.addEventListener("click", j);
|
|
1668
|
+
}), Ce(() => {
|
|
1669
|
+
document.removeEventListener("click", j), b == null || b.destroy(), b = null;
|
|
1421
1670
|
});
|
|
1422
|
-
function
|
|
1423
|
-
if (!
|
|
1671
|
+
function X(p) {
|
|
1672
|
+
if (!p)
|
|
1424
1673
|
return null;
|
|
1425
|
-
const
|
|
1426
|
-
if (!
|
|
1674
|
+
const k = p.match(/^(\d{4})-(\d{2})-(\d{2})$/);
|
|
1675
|
+
if (!k)
|
|
1427
1676
|
return null;
|
|
1428
|
-
const
|
|
1429
|
-
return U.getFullYear() !==
|
|
1677
|
+
const x = Number(k[1]), N = Number(k[2]) - 1, re = Number(k[3]), U = new Date(x, N, re);
|
|
1678
|
+
return U.getFullYear() !== x || U.getMonth() !== N || U.getDate() !== re ? null : oe(U);
|
|
1430
1679
|
}
|
|
1431
|
-
function
|
|
1432
|
-
return new Date(
|
|
1680
|
+
function oe(p) {
|
|
1681
|
+
return new Date(p.getFullYear(), p.getMonth(), p.getDate());
|
|
1433
1682
|
}
|
|
1434
|
-
function
|
|
1435
|
-
return new Date(
|
|
1683
|
+
function J(p) {
|
|
1684
|
+
return new Date(p.getFullYear(), p.getMonth(), 1);
|
|
1436
1685
|
}
|
|
1437
|
-
function
|
|
1438
|
-
return new Date(
|
|
1686
|
+
function ne(p, k) {
|
|
1687
|
+
return new Date(p.getFullYear(), p.getMonth() + k, 1);
|
|
1439
1688
|
}
|
|
1440
|
-
function
|
|
1441
|
-
return new Date(
|
|
1689
|
+
function _(p, k) {
|
|
1690
|
+
return new Date(p.getFullYear(), p.getMonth(), p.getDate() + k);
|
|
1442
1691
|
}
|
|
1443
|
-
function
|
|
1444
|
-
const
|
|
1445
|
-
return
|
|
1692
|
+
function O(p, k) {
|
|
1693
|
+
const x = J(p), re = (x.getDay() - k + 7) % 7;
|
|
1694
|
+
return _(x, -re);
|
|
1446
1695
|
}
|
|
1447
|
-
function W(
|
|
1448
|
-
const
|
|
1449
|
-
return `${
|
|
1696
|
+
function W(p) {
|
|
1697
|
+
const k = p.getFullYear(), x = `${p.getMonth() + 1}`.padStart(2, "0"), N = `${p.getDate()}`.padStart(2, "0");
|
|
1698
|
+
return `${k}-${x}-${N}`;
|
|
1450
1699
|
}
|
|
1451
|
-
function
|
|
1452
|
-
const
|
|
1453
|
-
return !!(
|
|
1700
|
+
function Q(p, k, x) {
|
|
1701
|
+
const N = oe(p).getTime();
|
|
1702
|
+
return !!(k && N < k.getTime() || x && N > x.getTime());
|
|
1454
1703
|
}
|
|
1455
|
-
return (
|
|
1704
|
+
return (p, k) => (m(), h("div", {
|
|
1456
1705
|
ref_key: "root",
|
|
1457
1706
|
ref: u,
|
|
1458
|
-
class:
|
|
1707
|
+
class: E(P.value)
|
|
1459
1708
|
}, [
|
|
1460
1709
|
B("button", {
|
|
1461
1710
|
ref_key: "control",
|
|
1462
|
-
ref:
|
|
1711
|
+
ref: d,
|
|
1463
1712
|
class: "vf-datepicker__control",
|
|
1464
1713
|
type: "button",
|
|
1465
|
-
disabled:
|
|
1714
|
+
disabled: p.disabled,
|
|
1466
1715
|
"aria-expanded": l.value,
|
|
1467
|
-
"aria-controls":
|
|
1716
|
+
"aria-controls": s,
|
|
1468
1717
|
"aria-haspopup": "dialog",
|
|
1469
|
-
onClick:
|
|
1718
|
+
onClick: y,
|
|
1470
1719
|
onKeydown: [
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1720
|
+
q(Y(L, ["prevent"]), ["down"]),
|
|
1721
|
+
q(Y(y, ["prevent"]), ["enter"]),
|
|
1722
|
+
q(Y(w, ["prevent"]), ["esc"])
|
|
1474
1723
|
],
|
|
1475
|
-
onFocus:
|
|
1476
|
-
onBlur:
|
|
1724
|
+
onFocus: D,
|
|
1725
|
+
onBlur: A
|
|
1477
1726
|
}, [
|
|
1478
1727
|
B("span", {
|
|
1479
|
-
class:
|
|
1480
|
-
},
|
|
1481
|
-
|
|
1728
|
+
class: E(["vf-datepicker__label", { "vf-datepicker__label_placeholder": !f.value }])
|
|
1729
|
+
}, M(S.value || p.placeholder), 3),
|
|
1730
|
+
k[0] || (k[0] = B("span", {
|
|
1482
1731
|
class: "vf-datepicker__chevron",
|
|
1483
1732
|
"aria-hidden": "true"
|
|
1484
1733
|
}, "▾", -1))
|
|
1485
|
-
], 40,
|
|
1486
|
-
(
|
|
1487
|
-
|
|
1488
|
-
id:
|
|
1734
|
+
], 40, ho),
|
|
1735
|
+
(m(), le(we, { to: "body" }, [
|
|
1736
|
+
ve(B("div", {
|
|
1737
|
+
id: s,
|
|
1489
1738
|
ref_key: "panel",
|
|
1490
1739
|
ref: c,
|
|
1491
1740
|
class: "vf-datepicker__panel",
|
|
1492
1741
|
role: "dialog",
|
|
1493
1742
|
"data-placement": n.value,
|
|
1494
|
-
onKeydown:
|
|
1743
|
+
onKeydown: q(Y(w, ["prevent"]), ["esc"])
|
|
1495
1744
|
}, [
|
|
1496
|
-
B("div",
|
|
1745
|
+
B("div", _o, [
|
|
1497
1746
|
B("button", {
|
|
1498
1747
|
class: "vf-datepicker__nav",
|
|
1499
1748
|
type: "button",
|
|
1500
1749
|
"aria-label": "Previous month",
|
|
1501
|
-
onClick:
|
|
1750
|
+
onClick: z
|
|
1502
1751
|
}, " ‹ "),
|
|
1503
|
-
B("span",
|
|
1752
|
+
B("span", ko, M(I.value), 1),
|
|
1504
1753
|
B("button", {
|
|
1505
1754
|
class: "vf-datepicker__nav",
|
|
1506
1755
|
type: "button",
|
|
1507
1756
|
"aria-label": "Next month",
|
|
1508
|
-
onClick:
|
|
1757
|
+
onClick: K
|
|
1509
1758
|
}, " › ")
|
|
1510
1759
|
]),
|
|
1511
|
-
B("div",
|
|
1512
|
-
(
|
|
1513
|
-
key:
|
|
1760
|
+
B("div", Co, [
|
|
1761
|
+
(m(!0), h(ue, null, Be(T.value, (x) => (m(), h("span", {
|
|
1762
|
+
key: x,
|
|
1514
1763
|
class: "vf-datepicker__weekday"
|
|
1515
|
-
},
|
|
1764
|
+
}, M(x), 1))), 128))
|
|
1516
1765
|
]),
|
|
1517
|
-
B("div",
|
|
1518
|
-
(
|
|
1519
|
-
key:
|
|
1520
|
-
class:
|
|
1521
|
-
"is-outside": !
|
|
1522
|
-
"is-selected":
|
|
1523
|
-
"is-today":
|
|
1766
|
+
B("div", wo, [
|
|
1767
|
+
(m(!0), h(ue, null, Be(H.value, (x) => (m(), h("button", {
|
|
1768
|
+
key: x.key,
|
|
1769
|
+
class: E(["vf-datepicker__day", {
|
|
1770
|
+
"is-outside": !x.inCurrentMonth,
|
|
1771
|
+
"is-selected": x.isSelected,
|
|
1772
|
+
"is-today": x.isToday
|
|
1524
1773
|
}]),
|
|
1525
1774
|
type: "button",
|
|
1526
|
-
disabled:
|
|
1527
|
-
"data-date":
|
|
1528
|
-
onClick: (
|
|
1529
|
-
},
|
|
1775
|
+
disabled: x.isDisabled,
|
|
1776
|
+
"data-date": x.iso,
|
|
1777
|
+
onClick: (N) => G(x.date)
|
|
1778
|
+
}, M(x.day), 11, $o))), 128))
|
|
1530
1779
|
])
|
|
1531
|
-
], 40,
|
|
1532
|
-
[
|
|
1780
|
+
], 40, yo), [
|
|
1781
|
+
[fe, l.value]
|
|
1533
1782
|
])
|
|
1534
1783
|
]))
|
|
1535
1784
|
], 2));
|
|
1536
1785
|
}
|
|
1537
|
-
}),
|
|
1786
|
+
}), xo = ["checked", "disabled"], Bo = {
|
|
1538
1787
|
key: 0,
|
|
1539
1788
|
class: "vf-checkbox__label"
|
|
1540
|
-
},
|
|
1789
|
+
}, ja = /* @__PURE__ */ Z({
|
|
1541
1790
|
__name: "checkbox",
|
|
1542
1791
|
props: {
|
|
1543
1792
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -1548,31 +1797,31 @@ const Rt = (t, e) => t.strategy ? t.strategy : Lt(e) ? "fixed" : "absolute", be
|
|
|
1548
1797
|
emits: ["update:modelValue", "change"],
|
|
1549
1798
|
setup(t, { emit: e }) {
|
|
1550
1799
|
const r = e, o = t, a = g(() => {
|
|
1551
|
-
const
|
|
1552
|
-
return o.disabled &&
|
|
1553
|
-
}), u = (
|
|
1554
|
-
const c =
|
|
1555
|
-
r("update:modelValue", c.checked), r("change",
|
|
1800
|
+
const d = ["vf-checkbox", `vf-checkbox_${o.variant}`];
|
|
1801
|
+
return o.disabled && d.push("vf-checkbox_disabled"), d;
|
|
1802
|
+
}), u = (d) => {
|
|
1803
|
+
const c = d.target;
|
|
1804
|
+
r("update:modelValue", c.checked), r("change", d);
|
|
1556
1805
|
};
|
|
1557
|
-
return (
|
|
1558
|
-
class:
|
|
1806
|
+
return (d, c) => (m(), h("label", {
|
|
1807
|
+
class: E(a.value)
|
|
1559
1808
|
}, [
|
|
1560
1809
|
B("input", {
|
|
1561
1810
|
class: "vf-checkbox__control",
|
|
1562
1811
|
type: "checkbox",
|
|
1563
|
-
checked:
|
|
1564
|
-
disabled:
|
|
1812
|
+
checked: d.modelValue,
|
|
1813
|
+
disabled: d.disabled,
|
|
1565
1814
|
onChange: u
|
|
1566
|
-
}, null, 40,
|
|
1815
|
+
}, null, 40, xo),
|
|
1567
1816
|
c[0] || (c[0] = B("span", { class: "vf-checkbox__box" }, null, -1)),
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1817
|
+
d.label || d.$slots.default ? (m(), h("span", Bo, [
|
|
1818
|
+
F(d.$slots, "default", {}, () => [
|
|
1819
|
+
ae(M(d.label), 1)
|
|
1571
1820
|
])
|
|
1572
|
-
])) :
|
|
1821
|
+
])) : V("", !0)
|
|
1573
1822
|
], 2));
|
|
1574
1823
|
}
|
|
1575
|
-
}),
|
|
1824
|
+
}), ot = Symbol("VueForgeRadioGroup"), zo = ["aria-disabled", "aria-label", "aria-labelledby"], Xa = /* @__PURE__ */ Z({
|
|
1576
1825
|
__name: "radio-group",
|
|
1577
1826
|
props: {
|
|
1578
1827
|
modelValue: { type: [String, Number, Boolean, null], default: void 0 },
|
|
@@ -1590,27 +1839,27 @@ const Rt = (t, e) => t.strategy ? t.strategy : Lt(e) ? "fixed" : "absolute", be
|
|
|
1590
1839
|
return o.direction === "horizontal" && c.push("vf-radio-group_horizontal"), c;
|
|
1591
1840
|
}), u = (c, l) => {
|
|
1592
1841
|
r("update:modelValue", c), r("change", c, l);
|
|
1593
|
-
},
|
|
1842
|
+
}, d = {
|
|
1594
1843
|
name: g(() => o.name),
|
|
1595
1844
|
modelValue: g(() => o.modelValue),
|
|
1596
1845
|
disabled: g(() => o.disabled),
|
|
1597
1846
|
variant: g(() => o.variant),
|
|
1598
1847
|
onChange: u
|
|
1599
1848
|
};
|
|
1600
|
-
return
|
|
1601
|
-
class:
|
|
1849
|
+
return Ze(ot, d), (c, l) => (m(), h("div", {
|
|
1850
|
+
class: E(a.value),
|
|
1602
1851
|
role: "radiogroup",
|
|
1603
1852
|
"aria-disabled": c.disabled || void 0,
|
|
1604
1853
|
"aria-label": c.ariaLabel || void 0,
|
|
1605
1854
|
"aria-labelledby": c.ariaLabelledby || void 0
|
|
1606
1855
|
}, [
|
|
1607
|
-
|
|
1608
|
-
], 10,
|
|
1856
|
+
F(c.$slots, "default")
|
|
1857
|
+
], 10, zo));
|
|
1609
1858
|
}
|
|
1610
|
-
}),
|
|
1859
|
+
}), Fo = ["name", "value", "checked", "disabled"], So = {
|
|
1611
1860
|
key: 0,
|
|
1612
1861
|
class: "vf-radio__label"
|
|
1613
|
-
},
|
|
1862
|
+
}, qa = /* @__PURE__ */ Z({
|
|
1614
1863
|
__name: "radio-button",
|
|
1615
1864
|
props: {
|
|
1616
1865
|
modelValue: { type: [String, Number, Boolean, null], default: void 0 },
|
|
@@ -1622,33 +1871,33 @@ const Rt = (t, e) => t.strategy ? t.strategy : Lt(e) ? "fixed" : "absolute", be
|
|
|
1622
1871
|
},
|
|
1623
1872
|
emits: ["update:modelValue", "change"],
|
|
1624
1873
|
setup(t, { emit: e }) {
|
|
1625
|
-
const r = e, o = t, a =
|
|
1874
|
+
const r = e, o = t, a = Me(ot, null), u = g(() => a ? a.modelValue.value : o.modelValue), d = g(() => a ? a.name.value : o.name), c = g(() => a ? a.variant.value : o.variant), l = g(() => (a ? a.disabled.value : !1) || o.disabled), i = g(() => u.value === o.value), n = g(() => {
|
|
1626
1875
|
const v = ["vf-radio", `vf-radio_${c.value}`];
|
|
1627
1876
|
return l.value && v.push("vf-radio_disabled"), v;
|
|
1628
|
-
}),
|
|
1877
|
+
}), s = (v) => {
|
|
1629
1878
|
l.value || (a ? a.onChange(o.value, v) : r("update:modelValue", o.value), r("change", o.value, v));
|
|
1630
1879
|
};
|
|
1631
|
-
return (v,
|
|
1632
|
-
class:
|
|
1880
|
+
return (v, b) => (m(), h("label", {
|
|
1881
|
+
class: E(n.value)
|
|
1633
1882
|
}, [
|
|
1634
1883
|
B("input", {
|
|
1635
1884
|
class: "vf-radio__control",
|
|
1636
1885
|
type: "radio",
|
|
1637
|
-
name:
|
|
1886
|
+
name: d.value,
|
|
1638
1887
|
value: v.value,
|
|
1639
|
-
checked:
|
|
1888
|
+
checked: i.value,
|
|
1640
1889
|
disabled: l.value,
|
|
1641
|
-
onChange:
|
|
1642
|
-
}, null, 40,
|
|
1643
|
-
|
|
1644
|
-
v.label || v.$slots.default ? (
|
|
1645
|
-
|
|
1646
|
-
|
|
1890
|
+
onChange: s
|
|
1891
|
+
}, null, 40, Fo),
|
|
1892
|
+
b[0] || (b[0] = B("span", { class: "vf-radio__circle" }, null, -1)),
|
|
1893
|
+
v.label || v.$slots.default ? (m(), h("span", So, [
|
|
1894
|
+
F(v.$slots, "default", {}, () => [
|
|
1895
|
+
ae(M(v.label), 1)
|
|
1647
1896
|
])
|
|
1648
|
-
])) :
|
|
1897
|
+
])) : V("", !0)
|
|
1649
1898
|
], 2));
|
|
1650
1899
|
}
|
|
1651
|
-
}),
|
|
1900
|
+
}), He = Symbol("VueForgeTabs"), Vo = ["aria-orientation", "aria-label", "aria-labelledby"], Lo = { class: "vf-tabs__panels" }, Ua = /* @__PURE__ */ Z({
|
|
1652
1901
|
__name: "tabs",
|
|
1653
1902
|
props: {
|
|
1654
1903
|
modelValue: { default: void 0 },
|
|
@@ -1660,35 +1909,35 @@ const Rt = (t, e) => t.strategy ? t.strategy : Lt(e) ? "fixed" : "absolute", be
|
|
|
1660
1909
|
emits: ["update:modelValue", "change"],
|
|
1661
1910
|
setup(t, { emit: e }) {
|
|
1662
1911
|
let r = 0;
|
|
1663
|
-
const o = e, a = t, u = ++r,
|
|
1912
|
+
const o = e, a = t, u = ++r, d = (f) => String(f).toLowerCase().trim().replace(/\s+/g, "-").replace(/[^a-z0-9_-]/g, ""), c = g(() => {
|
|
1664
1913
|
const f = ["vf-tabs"];
|
|
1665
1914
|
return a.orientation === "vertical" && f.push("vf-tabs_vertical"), a.disabled && f.push("vf-tabs_disabled"), f;
|
|
1666
|
-
}), l =
|
|
1915
|
+
}), l = R(null), i = () => l.value ? Array.from(l.value.querySelectorAll('[role="tab"]:not([disabled])')) : [], n = (f) => {
|
|
1667
1916
|
f && (f.focus(), f.click());
|
|
1668
|
-
},
|
|
1917
|
+
}, s = (f) => {
|
|
1669
1918
|
if (a.disabled)
|
|
1670
1919
|
return;
|
|
1671
|
-
const
|
|
1672
|
-
if (![...
|
|
1920
|
+
const C = a.orientation === "horizontal", $ = f.key, S = C ? ["ArrowRight"] : ["ArrowDown"], I = C ? ["ArrowLeft"] : ["ArrowUp"];
|
|
1921
|
+
if (![...S, ...I, "Home", "End"].includes($))
|
|
1673
1922
|
return;
|
|
1674
|
-
const
|
|
1675
|
-
if (!
|
|
1923
|
+
const T = i();
|
|
1924
|
+
if (!T.length)
|
|
1676
1925
|
return;
|
|
1677
|
-
const
|
|
1678
|
-
let
|
|
1679
|
-
|
|
1680
|
-
}, v = (f,
|
|
1681
|
-
o("update:modelValue", f), o("change", f,
|
|
1682
|
-
},
|
|
1926
|
+
const H = T.findIndex((L) => L.getAttribute("aria-selected") === "true"), P = T.findIndex((L) => L === document.activeElement), D = P >= 0 ? P : Math.max(H, 0);
|
|
1927
|
+
let A = D;
|
|
1928
|
+
S.includes($) ? A = (D + 1) % T.length : I.includes($) ? A = (D - 1 + T.length) % T.length : $ === "Home" ? A = 0 : $ === "End" && (A = T.length - 1), f.preventDefault(), n(T[A]);
|
|
1929
|
+
}, v = (f, C) => {
|
|
1930
|
+
o("update:modelValue", f), o("change", f, C);
|
|
1931
|
+
}, b = {
|
|
1683
1932
|
activeValue: g(() => a.modelValue),
|
|
1684
1933
|
disabled: g(() => a.disabled),
|
|
1685
1934
|
orientation: g(() => a.orientation),
|
|
1686
1935
|
onChange: v,
|
|
1687
|
-
getTabId: (f) => `vf-tab-${u}-${
|
|
1688
|
-
getPanelId: (f) => `vf-tabpanel-${u}-${
|
|
1936
|
+
getTabId: (f) => `vf-tab-${u}-${d(f)}`,
|
|
1937
|
+
getPanelId: (f) => `vf-tabpanel-${u}-${d(f)}`
|
|
1689
1938
|
};
|
|
1690
|
-
return
|
|
1691
|
-
class:
|
|
1939
|
+
return Ze(He, b), (f, C) => (m(), h("div", {
|
|
1940
|
+
class: E(c.value)
|
|
1692
1941
|
}, [
|
|
1693
1942
|
B("div", {
|
|
1694
1943
|
ref_key: "list",
|
|
@@ -1698,16 +1947,16 @@ const Rt = (t, e) => t.strategy ? t.strategy : Lt(e) ? "fixed" : "absolute", be
|
|
|
1698
1947
|
"aria-orientation": f.orientation,
|
|
1699
1948
|
"aria-label": f.ariaLabel || void 0,
|
|
1700
1949
|
"aria-labelledby": f.ariaLabelledby || void 0,
|
|
1701
|
-
onKeydown:
|
|
1950
|
+
onKeydown: s
|
|
1702
1951
|
}, [
|
|
1703
|
-
|
|
1704
|
-
], 40,
|
|
1705
|
-
B("div",
|
|
1706
|
-
|
|
1952
|
+
F(f.$slots, "tabs")
|
|
1953
|
+
], 40, Vo),
|
|
1954
|
+
B("div", Lo, [
|
|
1955
|
+
F(f.$slots, "panels")
|
|
1707
1956
|
])
|
|
1708
1957
|
], 2));
|
|
1709
1958
|
}
|
|
1710
|
-
}),
|
|
1959
|
+
}), To = ["id", "aria-selected", "aria-controls", "disabled", "tabindex"], Za = /* @__PURE__ */ Z({
|
|
1711
1960
|
__name: "tab",
|
|
1712
1961
|
props: {
|
|
1713
1962
|
value: {},
|
|
@@ -1716,51 +1965,51 @@ const Rt = (t, e) => t.strategy ? t.strategy : Lt(e) ? "fixed" : "absolute", be
|
|
|
1716
1965
|
},
|
|
1717
1966
|
emits: ["change"],
|
|
1718
1967
|
setup(t, { emit: e }) {
|
|
1719
|
-
const r = e, o = t, a =
|
|
1720
|
-
!a ||
|
|
1968
|
+
const r = e, o = t, a = Me(He, null), u = g(() => (a == null ? void 0 : a.activeValue.value) === o.value), d = g(() => ((a == null ? void 0 : a.disabled.value) ?? !1) || o.disabled), c = g(() => a ? a.getTabId(o.value) : void 0), l = g(() => a ? a.getPanelId(o.value) : void 0), i = g(() => d.value ? -1 : u.value ? 0 : -1), n = (s) => {
|
|
1969
|
+
!a || d.value || (a.onChange(o.value, s), r("change", o.value, s));
|
|
1721
1970
|
};
|
|
1722
|
-
return (
|
|
1971
|
+
return (s, v) => (m(), h("button", {
|
|
1723
1972
|
id: c.value,
|
|
1724
|
-
class:
|
|
1973
|
+
class: E(["vf-tab", { "vf-tab_active": u.value, "vf-tab_disabled": d.value }]),
|
|
1725
1974
|
type: "button",
|
|
1726
1975
|
role: "tab",
|
|
1727
1976
|
"aria-selected": u.value,
|
|
1728
1977
|
"aria-controls": l.value,
|
|
1729
|
-
disabled:
|
|
1730
|
-
tabindex:
|
|
1978
|
+
disabled: d.value,
|
|
1979
|
+
tabindex: i.value,
|
|
1731
1980
|
onClick: n
|
|
1732
1981
|
}, [
|
|
1733
|
-
|
|
1734
|
-
|
|
1982
|
+
F(s.$slots, "default", {}, () => [
|
|
1983
|
+
ae(M(s.label), 1)
|
|
1735
1984
|
])
|
|
1736
|
-
], 10,
|
|
1985
|
+
], 10, To));
|
|
1737
1986
|
}
|
|
1738
|
-
}),
|
|
1987
|
+
}), Ro = ["id", "aria-labelledby"], Ja = /* @__PURE__ */ Z({
|
|
1739
1988
|
__name: "tab-panel",
|
|
1740
1989
|
props: {
|
|
1741
1990
|
value: {}
|
|
1742
1991
|
},
|
|
1743
1992
|
setup(t) {
|
|
1744
|
-
const e = t, r =
|
|
1745
|
-
return (
|
|
1993
|
+
const e = t, r = Me(He, null), o = g(() => (r == null ? void 0 : r.activeValue.value) === e.value), a = g(() => r ? r.getTabId(e.value) : void 0), u = g(() => r ? r.getPanelId(e.value) : void 0);
|
|
1994
|
+
return (d, c) => ve((m(), h("div", {
|
|
1746
1995
|
id: u.value,
|
|
1747
1996
|
class: "vf-tab-panel",
|
|
1748
1997
|
role: "tabpanel",
|
|
1749
1998
|
tabindex: "0",
|
|
1750
1999
|
"aria-labelledby": a.value
|
|
1751
2000
|
}, [
|
|
1752
|
-
|
|
1753
|
-
], 8,
|
|
1754
|
-
[
|
|
2001
|
+
F(d.$slots, "default")
|
|
2002
|
+
], 8, Ro)), [
|
|
2003
|
+
[fe, o.value]
|
|
1755
2004
|
]);
|
|
1756
2005
|
}
|
|
1757
|
-
}),
|
|
2006
|
+
}), Po = ["data-severity"], Io = { class: "vf-toast__body" }, Do = {
|
|
1758
2007
|
key: 0,
|
|
1759
2008
|
class: "vf-toast__title"
|
|
1760
|
-
},
|
|
2009
|
+
}, Oo = {
|
|
1761
2010
|
key: 1,
|
|
1762
2011
|
class: "vf-toast__message"
|
|
1763
|
-
},
|
|
2012
|
+
}, Qa = /* @__PURE__ */ Z({
|
|
1764
2013
|
__name: "toast",
|
|
1765
2014
|
props: {
|
|
1766
2015
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -1776,70 +2025,146 @@ const Rt = (t, e) => t.strategy ? t.strategy : Lt(e) ? "fixed" : "absolute", be
|
|
|
1776
2025
|
let a = null;
|
|
1777
2026
|
const u = () => {
|
|
1778
2027
|
a !== null && (clearTimeout(a), a = null);
|
|
1779
|
-
},
|
|
2028
|
+
}, d = () => {
|
|
1780
2029
|
u(), !(!o.modelValue || o.duration <= 0) && (a = window.setTimeout(() => {
|
|
1781
2030
|
r("update:modelValue", !1), r("close");
|
|
1782
2031
|
}, o.duration));
|
|
1783
2032
|
}, c = () => {
|
|
1784
2033
|
u(), r("update:modelValue", !1), r("close");
|
|
1785
2034
|
};
|
|
1786
|
-
return
|
|
2035
|
+
return ee(
|
|
1787
2036
|
() => o.modelValue,
|
|
1788
2037
|
(l) => {
|
|
1789
|
-
l && r("open"),
|
|
2038
|
+
l && r("open"), d();
|
|
1790
2039
|
},
|
|
1791
2040
|
{ immediate: !0 }
|
|
1792
|
-
),
|
|
2041
|
+
), Ce(() => {
|
|
1793
2042
|
u();
|
|
1794
|
-
}), (l,
|
|
2043
|
+
}), (l, i) => ve((m(), h("div", {
|
|
1795
2044
|
class: "vf-toast",
|
|
1796
2045
|
role: "status",
|
|
1797
2046
|
"aria-live": "polite",
|
|
1798
2047
|
"data-severity": l.severity
|
|
1799
2048
|
}, [
|
|
1800
|
-
B("div",
|
|
1801
|
-
l.title ? (
|
|
1802
|
-
l.message || l.$slots.default ? (
|
|
1803
|
-
|
|
1804
|
-
|
|
2049
|
+
B("div", Io, [
|
|
2050
|
+
l.title ? (m(), h("div", Do, M(l.title), 1)) : V("", !0),
|
|
2051
|
+
l.message || l.$slots.default ? (m(), h("div", Oo, [
|
|
2052
|
+
F(l.$slots, "default", {}, () => [
|
|
2053
|
+
ae(M(l.message), 1)
|
|
1805
2054
|
])
|
|
1806
|
-
])) :
|
|
2055
|
+
])) : V("", !0)
|
|
1807
2056
|
]),
|
|
1808
|
-
l.closable ? (
|
|
2057
|
+
l.closable ? (m(), h("button", {
|
|
1809
2058
|
key: 0,
|
|
1810
2059
|
class: "vf-toast__close",
|
|
1811
2060
|
type: "button",
|
|
1812
2061
|
onClick: c
|
|
1813
2062
|
}, [
|
|
1814
|
-
|
|
1815
|
-
|
|
2063
|
+
F(l.$slots, "close", {}, () => [
|
|
2064
|
+
i[0] || (i[0] = ae("×"))
|
|
1816
2065
|
])
|
|
1817
|
-
])) :
|
|
1818
|
-
], 8,
|
|
1819
|
-
[
|
|
2066
|
+
])) : V("", !0)
|
|
2067
|
+
], 8, Po)), [
|
|
2068
|
+
[fe, l.modelValue]
|
|
1820
2069
|
]);
|
|
1821
2070
|
}
|
|
1822
|
-
}),
|
|
2071
|
+
}), er = /* @__PURE__ */ Z({
|
|
1823
2072
|
__name: "toast-container",
|
|
1824
2073
|
props: {
|
|
1825
2074
|
position: { default: "top-right" }
|
|
1826
2075
|
},
|
|
1827
2076
|
setup(t) {
|
|
1828
2077
|
const e = t, r = g(() => `vf-toast-container_${e.position}`);
|
|
1829
|
-
return (o, a) => (
|
|
2078
|
+
return (o, a) => (m(), le(we, { to: "body" }, [
|
|
1830
2079
|
B("div", {
|
|
1831
|
-
class:
|
|
2080
|
+
class: E(["vf-toast-container", r.value]),
|
|
1832
2081
|
role: "region",
|
|
1833
2082
|
"aria-live": "polite"
|
|
1834
2083
|
}, [
|
|
1835
|
-
|
|
2084
|
+
F(o.$slots, "default")
|
|
1836
2085
|
], 2)
|
|
1837
2086
|
]));
|
|
1838
2087
|
}
|
|
1839
|
-
}),
|
|
2088
|
+
}), Eo = ["data-severity"], Wo = {
|
|
2089
|
+
key: 0,
|
|
2090
|
+
class: "vf-alert__icon",
|
|
2091
|
+
"aria-hidden": "true"
|
|
2092
|
+
}, Mo = { class: "vf-alert__body" }, Ho = {
|
|
2093
|
+
key: 0,
|
|
2094
|
+
class: "vf-alert__title"
|
|
2095
|
+
}, Ao = {
|
|
2096
|
+
key: 1,
|
|
2097
|
+
class: "vf-alert__message"
|
|
2098
|
+
}, Ko = {
|
|
2099
|
+
key: 1,
|
|
2100
|
+
class: "vf-alert__actions"
|
|
2101
|
+
}, tr = /* @__PURE__ */ Z({
|
|
2102
|
+
__name: "alert",
|
|
2103
|
+
props: {
|
|
2104
|
+
modelValue: { type: Boolean },
|
|
2105
|
+
title: { default: "" },
|
|
2106
|
+
message: { default: "" },
|
|
2107
|
+
severity: { default: "neutral" },
|
|
2108
|
+
closable: { type: Boolean, default: !1 },
|
|
2109
|
+
icon: { default: "" }
|
|
2110
|
+
},
|
|
2111
|
+
emits: ["update:modelValue", "close"],
|
|
2112
|
+
setup(t, { emit: e }) {
|
|
2113
|
+
const r = e, o = t, a = R(!0), u = g(() => typeof o.modelValue == "boolean"), d = g(() => u.value ? o.modelValue : a.value);
|
|
2114
|
+
ee(
|
|
2115
|
+
() => o.modelValue,
|
|
2116
|
+
(l) => {
|
|
2117
|
+
typeof l == "boolean" && (a.value = l);
|
|
2118
|
+
},
|
|
2119
|
+
{ immediate: !0 }
|
|
2120
|
+
);
|
|
2121
|
+
const c = () => {
|
|
2122
|
+
u.value ? r("update:modelValue", !1) : a.value = !1, r("close");
|
|
2123
|
+
};
|
|
2124
|
+
return (l, i) => ve((m(), h("div", {
|
|
2125
|
+
class: "vf-alert",
|
|
2126
|
+
role: "alert",
|
|
2127
|
+
"data-severity": l.severity
|
|
2128
|
+
}, [
|
|
2129
|
+
l.$slots.icon || l.icon ? (m(), h("div", Wo, [
|
|
2130
|
+
F(l.$slots, "icon", {}, () => [
|
|
2131
|
+
ae(M(l.icon), 1)
|
|
2132
|
+
])
|
|
2133
|
+
])) : V("", !0),
|
|
2134
|
+
B("div", Mo, [
|
|
2135
|
+
l.title || l.$slots.title ? (m(), h("div", Ho, [
|
|
2136
|
+
F(l.$slots, "title", {}, () => [
|
|
2137
|
+
ae(M(l.title), 1)
|
|
2138
|
+
])
|
|
2139
|
+
])) : V("", !0),
|
|
2140
|
+
l.message || l.$slots.default ? (m(), h("div", Ao, [
|
|
2141
|
+
F(l.$slots, "default", {}, () => [
|
|
2142
|
+
ae(M(l.message), 1)
|
|
2143
|
+
])
|
|
2144
|
+
])) : V("", !0)
|
|
2145
|
+
]),
|
|
2146
|
+
l.$slots.actions ? (m(), h("div", Ko, [
|
|
2147
|
+
F(l.$slots, "actions")
|
|
2148
|
+
])) : V("", !0),
|
|
2149
|
+
l.closable ? (m(), h("button", {
|
|
2150
|
+
key: 2,
|
|
2151
|
+
class: "vf-alert__close",
|
|
2152
|
+
type: "button",
|
|
2153
|
+
"aria-label": "Close",
|
|
2154
|
+
onClick: c
|
|
2155
|
+
}, [
|
|
2156
|
+
F(l.$slots, "close", {}, () => [
|
|
2157
|
+
i[0] || (i[0] = ae("×"))
|
|
2158
|
+
])
|
|
2159
|
+
])) : V("", !0)
|
|
2160
|
+
], 8, Eo)), [
|
|
2161
|
+
[fe, d.value]
|
|
2162
|
+
]);
|
|
2163
|
+
}
|
|
2164
|
+
}), No = ["checked", "disabled"], Yo = {
|
|
1840
2165
|
key: 0,
|
|
1841
2166
|
class: "vf-switch__label"
|
|
1842
|
-
},
|
|
2167
|
+
}, or = /* @__PURE__ */ Z({
|
|
1843
2168
|
__name: "switch",
|
|
1844
2169
|
props: {
|
|
1845
2170
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -1849,112 +2174,112 @@ const Rt = (t, e) => t.strategy ? t.strategy : Lt(e) ? "fixed" : "absolute", be
|
|
|
1849
2174
|
emits: ["update:modelValue", "change"],
|
|
1850
2175
|
setup(t, { emit: e }) {
|
|
1851
2176
|
const r = e, o = t, a = g(() => {
|
|
1852
|
-
const
|
|
1853
|
-
return o.disabled &&
|
|
1854
|
-
}), u = (
|
|
1855
|
-
const c =
|
|
1856
|
-
r("update:modelValue", c.checked), r("change",
|
|
2177
|
+
const d = ["vf-switch"];
|
|
2178
|
+
return o.disabled && d.push("vf-switch_disabled"), d;
|
|
2179
|
+
}), u = (d) => {
|
|
2180
|
+
const c = d.target;
|
|
2181
|
+
r("update:modelValue", c.checked), r("change", d);
|
|
1857
2182
|
};
|
|
1858
|
-
return (
|
|
1859
|
-
class:
|
|
2183
|
+
return (d, c) => (m(), h("label", {
|
|
2184
|
+
class: E(a.value)
|
|
1860
2185
|
}, [
|
|
1861
2186
|
B("input", {
|
|
1862
2187
|
class: "vf-switch__control",
|
|
1863
2188
|
type: "checkbox",
|
|
1864
|
-
checked:
|
|
1865
|
-
disabled:
|
|
2189
|
+
checked: d.modelValue,
|
|
2190
|
+
disabled: d.disabled,
|
|
1866
2191
|
onChange: u
|
|
1867
|
-
}, null, 40,
|
|
2192
|
+
}, null, 40, No),
|
|
1868
2193
|
c[0] || (c[0] = B("span", { class: "vf-switch__track" }, [
|
|
1869
2194
|
B("span", { class: "vf-switch__thumb" })
|
|
1870
2195
|
], -1)),
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
2196
|
+
d.label || d.$slots.default ? (m(), h("span", Yo, [
|
|
2197
|
+
F(d.$slots, "default", {}, () => [
|
|
2198
|
+
ae(M(d.label), 1)
|
|
1874
2199
|
])
|
|
1875
|
-
])) :
|
|
2200
|
+
])) : V("", !0)
|
|
1876
2201
|
], 2));
|
|
1877
2202
|
}
|
|
1878
|
-
}),
|
|
2203
|
+
}), Go = { class: "vf-popover" }, jo = ["aria-expanded", "onKeydown"], ar = /* @__PURE__ */ Z({
|
|
1879
2204
|
__name: "popover",
|
|
1880
2205
|
emits: ["click", "onClick"],
|
|
1881
2206
|
setup(t, { expose: e, emit: r }) {
|
|
1882
2207
|
const o = r, a = lt({ visible: !1 });
|
|
1883
2208
|
let u = 0;
|
|
1884
|
-
const
|
|
1885
|
-
|
|
2209
|
+
const d = `vf-popover-panel-${++u}`, c = () => a.visible = !0, l = () => a.visible = !1, i = () => a.visible = !a.visible, n = () => {
|
|
2210
|
+
i(), o("click"), o("onClick");
|
|
1886
2211
|
};
|
|
1887
|
-
return e({ show: c, hide: l, toggle:
|
|
2212
|
+
return e({ show: c, hide: l, toggle: i }), (s, v) => (m(), h("div", Go, [
|
|
1888
2213
|
B("div", {
|
|
1889
2214
|
class: "vf-popover__button",
|
|
1890
2215
|
role: "button",
|
|
1891
2216
|
tabindex: "0",
|
|
1892
2217
|
"aria-haspopup": "dialog",
|
|
1893
2218
|
"aria-expanded": a.visible,
|
|
1894
|
-
"aria-controls":
|
|
2219
|
+
"aria-controls": d,
|
|
1895
2220
|
onClick: n,
|
|
1896
2221
|
onKeydown: [
|
|
1897
|
-
|
|
1898
|
-
|
|
2222
|
+
q(Y(n, ["prevent"]), ["enter"]),
|
|
2223
|
+
q(Y(n, ["prevent"]), ["space"])
|
|
1899
2224
|
]
|
|
1900
2225
|
}, [
|
|
1901
|
-
|
|
1902
|
-
], 40,
|
|
1903
|
-
|
|
1904
|
-
id:
|
|
2226
|
+
F(s.$slots, "button")
|
|
2227
|
+
], 40, jo),
|
|
2228
|
+
ve(qe(ht, {
|
|
2229
|
+
id: d,
|
|
1905
2230
|
class: "vf-popover__wrapper"
|
|
1906
2231
|
}, nt({
|
|
1907
|
-
default:
|
|
2232
|
+
default: ye(() => [
|
|
1908
2233
|
v[0] || (v[0] = B("div", { class: "vf-popover__arrow" }, null, -1))
|
|
1909
2234
|
]),
|
|
1910
2235
|
_: 2
|
|
1911
2236
|
}, [
|
|
1912
|
-
|
|
2237
|
+
s.$slots.default ? {
|
|
1913
2238
|
name: "default",
|
|
1914
|
-
fn:
|
|
1915
|
-
|
|
2239
|
+
fn: ye(() => [
|
|
2240
|
+
F(s.$slots, "default")
|
|
1916
2241
|
]),
|
|
1917
2242
|
key: "0"
|
|
1918
2243
|
} : void 0,
|
|
1919
|
-
|
|
2244
|
+
s.$slots.header || s.$slots.popoverHeader ? {
|
|
1920
2245
|
name: "header",
|
|
1921
|
-
fn:
|
|
1922
|
-
|
|
1923
|
-
|
|
2246
|
+
fn: ye(() => [
|
|
2247
|
+
F(s.$slots, "header"),
|
|
2248
|
+
s.$slots.header ? V("", !0) : F(s.$slots, "popoverHeader", { key: 0 })
|
|
1924
2249
|
]),
|
|
1925
2250
|
key: "1"
|
|
1926
2251
|
} : void 0,
|
|
1927
|
-
|
|
2252
|
+
s.$slots.body || s.$slots.popoverBody ? {
|
|
1928
2253
|
name: "body",
|
|
1929
|
-
fn:
|
|
1930
|
-
|
|
1931
|
-
|
|
2254
|
+
fn: ye(() => [
|
|
2255
|
+
F(s.$slots, "body"),
|
|
2256
|
+
s.$slots.body ? V("", !0) : F(s.$slots, "popoverBody", { key: 0 })
|
|
1932
2257
|
]),
|
|
1933
2258
|
key: "2"
|
|
1934
2259
|
} : void 0,
|
|
1935
|
-
|
|
2260
|
+
s.$slots.footer || s.$slots.popoverFooter ? {
|
|
1936
2261
|
name: "footer",
|
|
1937
|
-
fn:
|
|
1938
|
-
|
|
1939
|
-
|
|
2262
|
+
fn: ye(() => [
|
|
2263
|
+
F(s.$slots, "footer"),
|
|
2264
|
+
s.$slots.footer ? V("", !0) : F(s.$slots, "popoverFooter", { key: 0 })
|
|
1940
2265
|
]),
|
|
1941
2266
|
key: "3"
|
|
1942
2267
|
} : void 0
|
|
1943
2268
|
]), 1536), [
|
|
1944
|
-
[
|
|
2269
|
+
[fe, a.visible]
|
|
1945
2270
|
])
|
|
1946
2271
|
]));
|
|
1947
2272
|
}
|
|
1948
|
-
}),
|
|
2273
|
+
}), Xo = ["aria-labelledby", "aria-describedby"], qo = {
|
|
1949
2274
|
key: 0,
|
|
1950
2275
|
class: "vf-modal__header"
|
|
1951
|
-
},
|
|
2276
|
+
}, Uo = {
|
|
1952
2277
|
key: 0,
|
|
1953
2278
|
class: "vf-modal__title"
|
|
1954
|
-
},
|
|
2279
|
+
}, Zo = {
|
|
1955
2280
|
key: 3,
|
|
1956
2281
|
class: "vf-modal__footer"
|
|
1957
|
-
},
|
|
2282
|
+
}, rr = /* @__PURE__ */ Z({
|
|
1958
2283
|
__name: "modal",
|
|
1959
2284
|
props: {
|
|
1960
2285
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -1968,111 +2293,111 @@ const Rt = (t, e) => t.strategy ? t.strategy : Lt(e) ? "fixed" : "absolute", be
|
|
|
1968
2293
|
emits: ["update:modelValue", "open", "close"],
|
|
1969
2294
|
setup(t, { expose: e, emit: r }) {
|
|
1970
2295
|
const o = r, a = t;
|
|
1971
|
-
let u = 0,
|
|
1972
|
-
const
|
|
1973
|
-
const
|
|
1974
|
-
return a.size !== "md" &&
|
|
1975
|
-
}),
|
|
2296
|
+
let u = 0, d = 0, c = "", l = null;
|
|
2297
|
+
const i = R(null), n = Ue(), s = `vf-modal-title-${++u}`, v = `vf-modal-body-${u}`, b = g(() => !!a.title || !!n.header), f = g(() => !!n.body || !!n.default), C = g(() => {
|
|
2298
|
+
const w = ["vf-modal"];
|
|
2299
|
+
return a.size !== "md" && w.push(`vf-modal_${a.size}`), w;
|
|
2300
|
+
}), $ = () => o("update:modelValue", !0), S = () => {
|
|
1976
2301
|
o("update:modelValue", !1), o("close");
|
|
1977
|
-
},
|
|
1978
|
-
a.closeOnOverlay &&
|
|
1979
|
-
},
|
|
1980
|
-
!a.modelValue || !a.closeOnEsc ||
|
|
1981
|
-
},
|
|
1982
|
-
var
|
|
1983
|
-
const
|
|
1984
|
-
|
|
1985
|
-
},
|
|
1986
|
-
var
|
|
1987
|
-
if (
|
|
2302
|
+
}, I = () => {
|
|
2303
|
+
a.closeOnOverlay && S();
|
|
2304
|
+
}, T = (w) => {
|
|
2305
|
+
!a.modelValue || !a.closeOnEsc || w.key === "Escape" && (w.preventDefault(), S());
|
|
2306
|
+
}, H = () => i.value ? Array.from(i.value.querySelectorAll('a[href],button:not([disabled]),textarea:not([disabled]),input:not([disabled]),select:not([disabled]),[tabindex]:not([tabindex="-1"])')).filter((y) => !y.hasAttribute("disabled") && !y.getAttribute("aria-hidden")) : [], P = () => {
|
|
2307
|
+
var y;
|
|
2308
|
+
const w = H();
|
|
2309
|
+
w.length ? w[0].focus() : (y = i.value) == null || y.focus();
|
|
2310
|
+
}, D = (w) => {
|
|
2311
|
+
var j;
|
|
2312
|
+
if (w.key !== "Tab")
|
|
1988
2313
|
return;
|
|
1989
|
-
const
|
|
1990
|
-
if (!
|
|
1991
|
-
|
|
2314
|
+
const y = H();
|
|
2315
|
+
if (!y.length) {
|
|
2316
|
+
w.preventDefault(), (j = i.value) == null || j.focus();
|
|
1992
2317
|
return;
|
|
1993
2318
|
}
|
|
1994
|
-
const
|
|
1995
|
-
if (
|
|
1996
|
-
|
|
2319
|
+
const z = y[0], K = y[y.length - 1], G = document.activeElement;
|
|
2320
|
+
if (w.shiftKey && G === z) {
|
|
2321
|
+
w.preventDefault(), K.focus();
|
|
1997
2322
|
return;
|
|
1998
2323
|
}
|
|
1999
|
-
!
|
|
2000
|
-
},
|
|
2001
|
-
!a.lockScroll || typeof document > "u" || (
|
|
2324
|
+
!w.shiftKey && G === K && (w.preventDefault(), z.focus());
|
|
2325
|
+
}, A = () => {
|
|
2326
|
+
!a.lockScroll || typeof document > "u" || (d === 0 && (c = document.body.style.overflow, document.body.style.overflow = "hidden"), d += 1);
|
|
2002
2327
|
}, L = () => {
|
|
2003
|
-
!a.lockScroll || typeof document > "u" || (
|
|
2328
|
+
!a.lockScroll || typeof document > "u" || (d = Math.max(0, d - 1), d === 0 && (document.body.style.overflow = c));
|
|
2004
2329
|
};
|
|
2005
|
-
return
|
|
2330
|
+
return ee(
|
|
2006
2331
|
() => a.modelValue,
|
|
2007
|
-
async (
|
|
2008
|
-
|
|
2332
|
+
async (w) => {
|
|
2333
|
+
w ? (typeof document < "u" && (l = document.activeElement), A(), o("open"), await ke(), P(), typeof document < "u" && document.addEventListener("keydown", T)) : (L(), typeof document < "u" && (document.removeEventListener("keydown", T), l == null || l.focus()));
|
|
2009
2334
|
},
|
|
2010
2335
|
{ immediate: !0 }
|
|
2011
|
-
),
|
|
2012
|
-
L(), typeof document < "u" && document.removeEventListener("keydown",
|
|
2013
|
-
}), e({ open:
|
|
2014
|
-
|
|
2015
|
-
class:
|
|
2336
|
+
), Ce(() => {
|
|
2337
|
+
L(), typeof document < "u" && document.removeEventListener("keydown", T);
|
|
2338
|
+
}), e({ open: $, close: S }), (w, y) => (m(), le(we, { to: "body" }, [
|
|
2339
|
+
ve(B("div", {
|
|
2340
|
+
class: E(C.value),
|
|
2016
2341
|
role: "presentation"
|
|
2017
2342
|
}, [
|
|
2018
2343
|
B("div", {
|
|
2019
2344
|
class: "vf-modal__overlay",
|
|
2020
|
-
onClick:
|
|
2345
|
+
onClick: I
|
|
2021
2346
|
}),
|
|
2022
2347
|
B("div", {
|
|
2023
2348
|
ref_key: "panel",
|
|
2024
|
-
ref:
|
|
2349
|
+
ref: i,
|
|
2025
2350
|
class: "vf-modal__panel",
|
|
2026
2351
|
role: "dialog",
|
|
2027
2352
|
"aria-modal": "true",
|
|
2028
|
-
"aria-labelledby":
|
|
2353
|
+
"aria-labelledby": b.value ? s : void 0,
|
|
2029
2354
|
"aria-describedby": f.value ? v : void 0,
|
|
2030
2355
|
tabindex: "-1",
|
|
2031
|
-
onKeydown:
|
|
2356
|
+
onKeydown: D
|
|
2032
2357
|
}, [
|
|
2033
|
-
|
|
2358
|
+
b.value ? (m(), h("div", qo, [
|
|
2034
2359
|
B("div", {
|
|
2035
|
-
id:
|
|
2360
|
+
id: s,
|
|
2036
2361
|
class: "vf-modal__header-content"
|
|
2037
2362
|
}, [
|
|
2038
|
-
|
|
2039
|
-
|
|
2363
|
+
F(w.$slots, "header", {}, () => [
|
|
2364
|
+
w.title ? (m(), h("h3", Uo, M(w.title), 1)) : V("", !0)
|
|
2040
2365
|
])
|
|
2041
2366
|
])
|
|
2042
|
-
])) :
|
|
2043
|
-
|
|
2367
|
+
])) : V("", !0),
|
|
2368
|
+
w.showClose ? F(w.$slots, "close", {
|
|
2044
2369
|
key: 1,
|
|
2045
|
-
close:
|
|
2370
|
+
close: S
|
|
2046
2371
|
}, () => [
|
|
2047
2372
|
B("button", {
|
|
2048
2373
|
type: "button",
|
|
2049
2374
|
class: "vf-modal__close",
|
|
2050
2375
|
"aria-label": "Close",
|
|
2051
|
-
onClick:
|
|
2376
|
+
onClick: S
|
|
2052
2377
|
}, "×")
|
|
2053
|
-
]) :
|
|
2054
|
-
|
|
2378
|
+
]) : V("", !0),
|
|
2379
|
+
w.$slots.body || w.$slots.default ? (m(), h("div", {
|
|
2055
2380
|
key: 2,
|
|
2056
2381
|
id: v,
|
|
2057
2382
|
class: "vf-modal__body"
|
|
2058
2383
|
}, [
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
])) :
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
])) :
|
|
2065
|
-
], 40,
|
|
2384
|
+
F(w.$slots, "body"),
|
|
2385
|
+
w.$slots.body ? V("", !0) : F(w.$slots, "default", { key: 0 })
|
|
2386
|
+
])) : V("", !0),
|
|
2387
|
+
w.$slots.footer ? (m(), h("div", Zo, [
|
|
2388
|
+
F(w.$slots, "footer")
|
|
2389
|
+
])) : V("", !0)
|
|
2390
|
+
], 40, Xo)
|
|
2066
2391
|
], 2), [
|
|
2067
|
-
[
|
|
2392
|
+
[fe, w.modelValue]
|
|
2068
2393
|
])
|
|
2069
2394
|
]));
|
|
2070
2395
|
}
|
|
2071
|
-
}),
|
|
2396
|
+
}), Jo = ["data-placement"], Qo = { class: "vf-tooltip__content" }, ea = {
|
|
2072
2397
|
key: 0,
|
|
2073
2398
|
class: "vf-tooltip__arrow",
|
|
2074
2399
|
"aria-hidden": "true"
|
|
2075
|
-
},
|
|
2400
|
+
}, lr = /* @__PURE__ */ Z({
|
|
2076
2401
|
__name: "tooltip",
|
|
2077
2402
|
props: {
|
|
2078
2403
|
text: { default: "" },
|
|
@@ -2083,152 +2408,152 @@ const Rt = (t, e) => t.strategy ? t.strategy : Lt(e) ? "fixed" : "absolute", be
|
|
|
2083
2408
|
setup(t) {
|
|
2084
2409
|
const e = t;
|
|
2085
2410
|
let r = 0;
|
|
2086
|
-
const o =
|
|
2411
|
+
const o = R(null), a = R(null), u = R(!1), d = R("top"), c = `vf-tooltip-${++r}`;
|
|
2087
2412
|
let l = null;
|
|
2088
|
-
const
|
|
2413
|
+
const i = () => {
|
|
2089
2414
|
e.disabled || (u.value = !0);
|
|
2090
2415
|
}, n = () => {
|
|
2091
2416
|
u.value = !1;
|
|
2092
|
-
},
|
|
2417
|
+
}, s = () => {
|
|
2093
2418
|
if (!o.value || !a.value)
|
|
2094
2419
|
return;
|
|
2095
|
-
const
|
|
2420
|
+
const b = o.value, f = a.value, C = async () => {
|
|
2096
2421
|
const {
|
|
2097
|
-
x:
|
|
2098
|
-
y:
|
|
2099
|
-
placement:
|
|
2100
|
-
} = await
|
|
2422
|
+
x: T,
|
|
2423
|
+
y: H,
|
|
2424
|
+
placement: P
|
|
2425
|
+
} = await Te(b, f, {
|
|
2101
2426
|
placement: e.placement,
|
|
2102
2427
|
strategy: "fixed",
|
|
2103
|
-
middleware: [
|
|
2428
|
+
middleware: [Ve(8), Se(), It()]
|
|
2104
2429
|
});
|
|
2105
|
-
|
|
2106
|
-
},
|
|
2107
|
-
await
|
|
2108
|
-
},
|
|
2109
|
-
|
|
2110
|
-
}),
|
|
2111
|
-
|
|
2430
|
+
d.value = P ?? e.placement, f.style.left = `${T}px`, f.style.top = `${H}px`;
|
|
2431
|
+
}, $ = async () => {
|
|
2432
|
+
await C();
|
|
2433
|
+
}, S = Le(b, () => {
|
|
2434
|
+
$();
|
|
2435
|
+
}), I = () => {
|
|
2436
|
+
$();
|
|
2112
2437
|
};
|
|
2113
|
-
document.addEventListener("scroll",
|
|
2114
|
-
update:
|
|
2438
|
+
document.addEventListener("scroll", I, !0), window.addEventListener("resize", I, !1), l = {
|
|
2439
|
+
update: $,
|
|
2115
2440
|
destroy: () => {
|
|
2116
|
-
|
|
2441
|
+
S(), document.removeEventListener("scroll", I, !0), window.removeEventListener("resize", I, !1);
|
|
2117
2442
|
}
|
|
2118
2443
|
}, l.update();
|
|
2119
2444
|
};
|
|
2120
|
-
|
|
2121
|
-
if (!
|
|
2445
|
+
ee(u, async (b) => {
|
|
2446
|
+
if (!b) {
|
|
2122
2447
|
l && (l.destroy(), l = null);
|
|
2123
2448
|
return;
|
|
2124
2449
|
}
|
|
2125
|
-
l ||
|
|
2126
|
-
}),
|
|
2127
|
-
u.value &&
|
|
2128
|
-
}),
|
|
2450
|
+
l || s(), l == null || l.update();
|
|
2451
|
+
}), Fe(() => {
|
|
2452
|
+
u.value && s();
|
|
2453
|
+
}), Ce(() => {
|
|
2129
2454
|
l == null || l.destroy(), l = null;
|
|
2130
2455
|
});
|
|
2131
2456
|
const v = g(() => !!e.text || !!(a.value && a.value.textContent));
|
|
2132
|
-
return
|
|
2133
|
-
|
|
2134
|
-
}), (
|
|
2457
|
+
return ee(v, (b) => {
|
|
2458
|
+
b || (u.value = !1);
|
|
2459
|
+
}), (b, f) => (m(), h(ue, null, [
|
|
2135
2460
|
B("span", {
|
|
2136
2461
|
ref_key: "trigger",
|
|
2137
2462
|
ref: o,
|
|
2138
2463
|
class: "vf-tooltip__trigger",
|
|
2139
2464
|
"aria-describedby": c,
|
|
2140
|
-
onMouseenter:
|
|
2465
|
+
onMouseenter: i,
|
|
2141
2466
|
onMouseleave: n,
|
|
2142
|
-
onFocus:
|
|
2467
|
+
onFocus: i,
|
|
2143
2468
|
onBlur: n
|
|
2144
2469
|
}, [
|
|
2145
|
-
|
|
2470
|
+
F(b.$slots, "default")
|
|
2146
2471
|
], 544),
|
|
2147
|
-
(
|
|
2148
|
-
|
|
2472
|
+
(m(), le(we, { to: "body" }, [
|
|
2473
|
+
ve(B("div", {
|
|
2149
2474
|
id: c,
|
|
2150
2475
|
ref_key: "panel",
|
|
2151
2476
|
ref: a,
|
|
2152
2477
|
class: "vf-tooltip",
|
|
2153
2478
|
role: "tooltip",
|
|
2154
|
-
"data-placement":
|
|
2479
|
+
"data-placement": d.value
|
|
2155
2480
|
}, [
|
|
2156
|
-
B("span",
|
|
2157
|
-
|
|
2158
|
-
|
|
2481
|
+
B("span", Qo, [
|
|
2482
|
+
F(b.$slots, "content", {}, () => [
|
|
2483
|
+
ae(M(b.text), 1)
|
|
2159
2484
|
])
|
|
2160
2485
|
]),
|
|
2161
|
-
|
|
2162
|
-
], 8,
|
|
2163
|
-
[
|
|
2486
|
+
b.arrow ? (m(), h("span", ea)) : V("", !0)
|
|
2487
|
+
], 8, Jo), [
|
|
2488
|
+
[fe, u.value]
|
|
2164
2489
|
])
|
|
2165
2490
|
]))
|
|
2166
2491
|
], 64));
|
|
2167
2492
|
}
|
|
2168
|
-
}),
|
|
2493
|
+
}), ta = ["dark", "light", "theme", "preset", "colors", "components", "colorScheme"], oa = (t) => {
|
|
2169
2494
|
const e = t.replace(/([A-Z])/g, "-$1");
|
|
2170
2495
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
2171
|
-
},
|
|
2172
|
-
if (!
|
|
2496
|
+
}, aa = (t) => t.filter((e) => !ta.includes(e)).map((e) => oa(e)).join("-").toLowerCase(), We = (t) => t.join("."), ra = (t) => /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(t), Ae = (t) => {
|
|
2497
|
+
if (!ra(t))
|
|
2173
2498
|
return null;
|
|
2174
2499
|
if (t.length === 4) {
|
|
2175
2500
|
const e = t[1], r = t[2], o = t[3];
|
|
2176
2501
|
return `#${e}${e}${r}${r}${o}${o}`;
|
|
2177
2502
|
}
|
|
2178
2503
|
return t.toLowerCase();
|
|
2179
|
-
},
|
|
2180
|
-
const e =
|
|
2504
|
+
}, at = (t) => {
|
|
2505
|
+
const e = Ae(t);
|
|
2181
2506
|
if (!e)
|
|
2182
2507
|
return [0, 0, 0];
|
|
2183
2508
|
const r = parseInt(e.slice(1), 16), o = r >> 16 & 255, a = r >> 8 & 255, u = r & 255;
|
|
2184
2509
|
return [o, a, u];
|
|
2185
|
-
},
|
|
2186
|
-
const [e, r, o] =
|
|
2510
|
+
}, Ge = (t) => {
|
|
2511
|
+
const [e, r, o] = at(t);
|
|
2187
2512
|
return `${e}, ${r}, ${o}`;
|
|
2188
|
-
},
|
|
2189
|
-
const o = t / 255, a = e / 255, u = r / 255,
|
|
2190
|
-
let
|
|
2191
|
-
const
|
|
2513
|
+
}, la = (t, e, r) => {
|
|
2514
|
+
const o = t / 255, a = e / 255, u = r / 255, d = Math.max(o, a, u), c = Math.min(o, a, u), l = d - c;
|
|
2515
|
+
let i = 0, n = 0;
|
|
2516
|
+
const s = (d + c) / 2;
|
|
2192
2517
|
if (l !== 0) {
|
|
2193
|
-
switch (n = l / (1 - Math.abs(2 *
|
|
2518
|
+
switch (n = l / (1 - Math.abs(2 * s - 1)), d) {
|
|
2194
2519
|
case o:
|
|
2195
|
-
|
|
2520
|
+
i = (a - u) / l % 6;
|
|
2196
2521
|
break;
|
|
2197
2522
|
case a:
|
|
2198
|
-
|
|
2523
|
+
i = (u - o) / l + 2;
|
|
2199
2524
|
break;
|
|
2200
2525
|
case u:
|
|
2201
|
-
|
|
2526
|
+
i = (o - a) / l + 4;
|
|
2202
2527
|
break;
|
|
2203
2528
|
}
|
|
2204
|
-
|
|
2529
|
+
i *= 60, i < 0 && (i += 360);
|
|
2205
2530
|
}
|
|
2206
|
-
return [
|
|
2207
|
-
},
|
|
2208
|
-
const o = e / 100, a = r / 100, u = (1 - Math.abs(2 * a - 1)) * o,
|
|
2209
|
-
let l = 0,
|
|
2210
|
-
t >= 0 && t < 60 ? (l = u,
|
|
2211
|
-
const
|
|
2212
|
-
return [
|
|
2213
|
-
},
|
|
2214
|
-
const r =
|
|
2531
|
+
return [i, n * 100, s * 100];
|
|
2532
|
+
}, na = (t, e, r) => {
|
|
2533
|
+
const o = e / 100, a = r / 100, u = (1 - Math.abs(2 * a - 1)) * o, d = u * (1 - Math.abs(t / 60 % 2 - 1)), c = a - u / 2;
|
|
2534
|
+
let l = 0, i = 0, n = 0;
|
|
2535
|
+
t >= 0 && t < 60 ? (l = u, i = d, n = 0) : t >= 60 && t < 120 ? (l = d, i = u, n = 0) : t >= 120 && t < 180 ? (l = 0, i = u, n = d) : t >= 180 && t < 240 ? (l = 0, i = d, n = u) : t >= 240 && t < 300 ? (l = d, i = 0, n = u) : (l = u, i = 0, n = d);
|
|
2536
|
+
const s = Math.round((l + c) * 255), v = Math.round((i + c) * 255), b = Math.round((n + c) * 255);
|
|
2537
|
+
return [s, v, b];
|
|
2538
|
+
}, sa = (t, e, r) => `#${[t, e, r].map((o) => o.toString(16).padStart(2, "0")).join("")}`, ia = (t, e, r) => Math.min(r, Math.max(e, t)), da = (t, e) => {
|
|
2539
|
+
const r = Ae(t);
|
|
2215
2540
|
if (!r)
|
|
2216
2541
|
return t;
|
|
2217
|
-
const [o, a, u] =
|
|
2218
|
-
return
|
|
2219
|
-
},
|
|
2542
|
+
const [o, a, u] = at(r), [d, c, l] = la(o, a, u), n = (e - 5) * 7, s = ia(l + n, 0, 100), [v, b, f] = na(d, c, s);
|
|
2543
|
+
return sa(v, b, f);
|
|
2544
|
+
}, De = (t) => !!t && typeof t == "object" && !Array.isArray(t), Ke = (t, e) => {
|
|
2220
2545
|
if (!e)
|
|
2221
2546
|
return { ...t };
|
|
2222
2547
|
const r = { ...t };
|
|
2223
2548
|
for (const o in e) {
|
|
2224
2549
|
const a = e[o], u = t[o];
|
|
2225
|
-
|
|
2550
|
+
De(u) && De(a) ? r[o] = Ke(u, a) : r[o] = a;
|
|
2226
2551
|
}
|
|
2227
2552
|
return r;
|
|
2228
|
-
},
|
|
2553
|
+
}, ca = (t) => {
|
|
2229
2554
|
if (!t)
|
|
2230
2555
|
return null;
|
|
2231
|
-
if (
|
|
2556
|
+
if (De(t) && "preset" in t) {
|
|
2232
2557
|
const e = t;
|
|
2233
2558
|
return {
|
|
2234
2559
|
preset: e.preset ?? {},
|
|
@@ -2239,42 +2564,42 @@ const Rt = (t, e) => t.strategy ? t.strategy : Lt(e) ? "fixed" : "absolute", be
|
|
|
2239
2564
|
};
|
|
2240
2565
|
}
|
|
2241
2566
|
return { preset: t };
|
|
2242
|
-
},
|
|
2243
|
-
const e = [], r = [], o = [], a = [], u = (l) => o.push(l),
|
|
2567
|
+
}, ua = (t) => {
|
|
2568
|
+
const e = [], r = [], o = [], a = [], u = (l) => o.push(l), d = (l) => a.push(l), c = (l, i) => {
|
|
2244
2569
|
if (!(!l || typeof l != "object"))
|
|
2245
2570
|
for (const n in l) {
|
|
2246
|
-
const
|
|
2247
|
-
if (
|
|
2248
|
-
c(
|
|
2571
|
+
const s = l[n], v = i.concat([n]);
|
|
2572
|
+
if (De(s)) {
|
|
2573
|
+
c(s, v);
|
|
2249
2574
|
continue;
|
|
2250
2575
|
}
|
|
2251
|
-
if (
|
|
2252
|
-
|
|
2576
|
+
if (s && typeof s == "object") {
|
|
2577
|
+
d(`Theme value "${We(v)}" is not a plain object or string and will be ignored.`);
|
|
2253
2578
|
continue;
|
|
2254
2579
|
}
|
|
2255
|
-
if (typeof
|
|
2256
|
-
|
|
2580
|
+
if (typeof s != "string") {
|
|
2581
|
+
d(`Theme value "${We(v)}" is not a string and will be ignored.`);
|
|
2257
2582
|
continue;
|
|
2258
2583
|
}
|
|
2259
|
-
const f = v.includes("colorScheme") && v.includes("dark") ? r : e,
|
|
2260
|
-
if (f.push(`--vf-${
|
|
2261
|
-
const
|
|
2262
|
-
if (
|
|
2584
|
+
const f = v.includes("colorScheme") && v.includes("dark") ? r : e, C = aa(v);
|
|
2585
|
+
if (f.push(`--vf-${C}: ${s}`), v.includes("colors")) {
|
|
2586
|
+
const $ = Ae(s);
|
|
2587
|
+
if (!$) {
|
|
2263
2588
|
u(
|
|
2264
|
-
`Theme color "${
|
|
2589
|
+
`Theme color "${We(v)}" is not hex. Shade variables will not be generated for it.`
|
|
2265
2590
|
);
|
|
2266
2591
|
continue;
|
|
2267
2592
|
}
|
|
2268
|
-
if (f.push(`--vf-${
|
|
2269
|
-
for (let
|
|
2270
|
-
const
|
|
2271
|
-
f.push(`--vf-${
|
|
2593
|
+
if (f.push(`--vf-${C}-rgb: ${Ge($)}`), n !== "white")
|
|
2594
|
+
for (let S = 1; S < 10; ++S) {
|
|
2595
|
+
const I = da($, S);
|
|
2596
|
+
f.push(`--vf-${C}-${S}00: ${I}`), f.push(`--vf-${C}-${S}00-rgb: ${Ge(I)}`);
|
|
2272
2597
|
}
|
|
2273
2598
|
}
|
|
2274
2599
|
}
|
|
2275
2600
|
};
|
|
2276
2601
|
return c(t, []), { baseVars: e, darkVars: r, warnings: o, errors: a };
|
|
2277
|
-
},
|
|
2602
|
+
}, va = (t) => {
|
|
2278
2603
|
if (typeof document > "u")
|
|
2279
2604
|
return null;
|
|
2280
2605
|
const e = document.getElementById(t);
|
|
@@ -2282,11 +2607,11 @@ const Rt = (t, e) => t.strategy ? t.strategy : Lt(e) ? "fixed" : "absolute", be
|
|
|
2282
2607
|
return e;
|
|
2283
2608
|
const r = document.createElement("style");
|
|
2284
2609
|
return r.id = t, document.head.appendChild(r), r;
|
|
2285
|
-
},
|
|
2610
|
+
}, fa = (t) => ({
|
|
2286
2611
|
selector: t.selector ?? ":root",
|
|
2287
2612
|
darkSelector: t.darkSelector ?? ":root[data-theme=dark]"
|
|
2288
|
-
}),
|
|
2289
|
-
const { baseVars: a, darkVars: u, warnings:
|
|
2613
|
+
}), pa = (t, e, r, o) => {
|
|
2614
|
+
const { baseVars: a, darkVars: u, warnings: d, errors: c } = ua(t), l = va("vueforge-theme");
|
|
2290
2615
|
if (!l)
|
|
2291
2616
|
return;
|
|
2292
2617
|
if (c.length) {
|
|
@@ -2295,35 +2620,35 @@ const Rt = (t, e) => t.strategy ? t.strategy : Lt(e) ? "fixed" : "absolute", be
|
|
|
2295
2620
|
for (const n of c)
|
|
2296
2621
|
console.warn(`[VueForge] ${n}`);
|
|
2297
2622
|
}
|
|
2298
|
-
if (
|
|
2299
|
-
for (const n of
|
|
2623
|
+
if (d.length)
|
|
2624
|
+
for (const n of d)
|
|
2300
2625
|
console.warn(`[VueForge] ${n}`);
|
|
2301
|
-
const
|
|
2302
|
-
a.length &&
|
|
2626
|
+
const i = [];
|
|
2627
|
+
a.length && i.push(`${e} { ${a.join(";")} }`), u.length && i.push(`${r} { ${u.join(";")} }`), l.textContent = i.join(`
|
|
2303
2628
|
`);
|
|
2304
2629
|
};
|
|
2305
|
-
let
|
|
2306
|
-
const
|
|
2307
|
-
const e =
|
|
2630
|
+
let me = null;
|
|
2631
|
+
const rt = (t) => {
|
|
2632
|
+
const e = ca(t);
|
|
2308
2633
|
if (!e)
|
|
2309
2634
|
return;
|
|
2310
|
-
const r =
|
|
2311
|
-
|
|
2312
|
-
},
|
|
2313
|
-
if (!
|
|
2635
|
+
const r = Ke(e.preset, e.overrides), { selector: o, darkSelector: a } = fa(e);
|
|
2636
|
+
me = { ...e }, pa(r, o, a, e.strict);
|
|
2637
|
+
}, nr = (t) => {
|
|
2638
|
+
if (!me)
|
|
2314
2639
|
return;
|
|
2315
|
-
const e = t.overrides === void 0 ?
|
|
2316
|
-
preset: t.preset ??
|
|
2640
|
+
const e = t.overrides === void 0 ? me.overrides : Ke(me.overrides ?? {}, t.overrides ?? {}), r = {
|
|
2641
|
+
preset: t.preset ?? me.preset,
|
|
2317
2642
|
overrides: e,
|
|
2318
|
-
selector: t.selector ??
|
|
2319
|
-
darkSelector: t.darkSelector ??
|
|
2643
|
+
selector: t.selector ?? me.selector,
|
|
2644
|
+
darkSelector: t.darkSelector ?? me.darkSelector
|
|
2320
2645
|
};
|
|
2321
|
-
|
|
2322
|
-
},
|
|
2646
|
+
rt(r);
|
|
2647
|
+
}, sr = () => me ? { ...me } : null, ir = {
|
|
2323
2648
|
install(t, e = {}) {
|
|
2324
|
-
e.theme &&
|
|
2649
|
+
e.theme && rt(e.theme);
|
|
2325
2650
|
}
|
|
2326
|
-
},
|
|
2651
|
+
}, je = {
|
|
2327
2652
|
colors: {
|
|
2328
2653
|
white: "#ffffff",
|
|
2329
2654
|
green: "#0cbc87",
|
|
@@ -2386,7 +2711,7 @@ const ot = (t) => {
|
|
|
2386
2711
|
dividerColor: "#2e2e32"
|
|
2387
2712
|
}
|
|
2388
2713
|
}
|
|
2389
|
-
},
|
|
2714
|
+
}, ba = {
|
|
2390
2715
|
fontSize: "var(--vf-typography-font-size)",
|
|
2391
2716
|
padding: "var(--vf-controls-padding-y) var(--vf-controls-padding-x)",
|
|
2392
2717
|
borderRadius: "var(--vf-radii-md)",
|
|
@@ -2528,11 +2853,11 @@ const ot = (t) => {
|
|
|
2528
2853
|
}
|
|
2529
2854
|
}
|
|
2530
2855
|
}
|
|
2531
|
-
},
|
|
2856
|
+
}, ma = {
|
|
2532
2857
|
padding: "12px",
|
|
2533
2858
|
borderColor: "var(--vf-border-color)",
|
|
2534
2859
|
borderRadius: "var(--vf-radii-md)"
|
|
2535
|
-
},
|
|
2860
|
+
}, ga = {
|
|
2536
2861
|
gap: "0.5rem",
|
|
2537
2862
|
fontSize: "var(--vf-typography-font-size)",
|
|
2538
2863
|
padding: "var(--vf-controls-padding-y) var(--vf-controls-padding-x)",
|
|
@@ -2553,7 +2878,7 @@ const ot = (t) => {
|
|
|
2553
2878
|
padding: "var(--vf-sizes-lg-padding-y) var(--vf-sizes-lg-padding-x)",
|
|
2554
2879
|
fontSize: "var(--vf-sizes-lg-font-size)"
|
|
2555
2880
|
}
|
|
2556
|
-
},
|
|
2881
|
+
}, ha = {
|
|
2557
2882
|
gap: "0.375rem",
|
|
2558
2883
|
textColor: "var(--vf-text-color)",
|
|
2559
2884
|
labelFontSize: "0.875rem",
|
|
@@ -2573,7 +2898,7 @@ const ot = (t) => {
|
|
|
2573
2898
|
labelFontSize: "0.9375rem",
|
|
2574
2899
|
hintFontSize: "0.875rem"
|
|
2575
2900
|
}
|
|
2576
|
-
},
|
|
2901
|
+
}, ya = {
|
|
2577
2902
|
gap: "0.5rem",
|
|
2578
2903
|
fontSize: "var(--vf-typography-font-size)",
|
|
2579
2904
|
padding: "var(--vf-controls-padding-y) var(--vf-controls-padding-x)",
|
|
@@ -2596,10 +2921,10 @@ const ot = (t) => {
|
|
|
2596
2921
|
padding: "var(--vf-sizes-lg-padding-y) var(--vf-sizes-lg-padding-x)",
|
|
2597
2922
|
fontSize: "var(--vf-sizes-lg-font-size)"
|
|
2598
2923
|
}
|
|
2599
|
-
},
|
|
2924
|
+
}, _a = {
|
|
2600
2925
|
hoverColor: "var(--vf-blue)",
|
|
2601
2926
|
activeColor: "var(--vf-blue)"
|
|
2602
|
-
},
|
|
2927
|
+
}, ka = {
|
|
2603
2928
|
iconGap: "6px",
|
|
2604
2929
|
submenuOffset: "12px",
|
|
2605
2930
|
separatorThickness: "1px",
|
|
@@ -2619,7 +2944,7 @@ const ot = (t) => {
|
|
|
2619
2944
|
marginBottom: "0.5rem",
|
|
2620
2945
|
marginLeft: "0.5rem"
|
|
2621
2946
|
}
|
|
2622
|
-
},
|
|
2947
|
+
}, Ca = {
|
|
2623
2948
|
width: "90vw",
|
|
2624
2949
|
maxWidth: "520px",
|
|
2625
2950
|
maxHeight: "80vh",
|
|
@@ -2646,9 +2971,9 @@ const ot = (t) => {
|
|
|
2646
2971
|
closeColor: "var(--vf-text-color)",
|
|
2647
2972
|
closeFontSize: "1.25rem",
|
|
2648
2973
|
closeHoverBackgroundColor: "rgba(0, 0, 0, 0.06)"
|
|
2649
|
-
},
|
|
2974
|
+
}, wa = {
|
|
2650
2975
|
backgroundColor: "var(--vf-bg-color)"
|
|
2651
|
-
},
|
|
2976
|
+
}, $a = {
|
|
2652
2977
|
minWidth: "12rem",
|
|
2653
2978
|
fontSize: "var(--vf-typography-font-size)",
|
|
2654
2979
|
controlGap: "0.75rem",
|
|
@@ -2681,7 +3006,46 @@ const ot = (t) => {
|
|
|
2681
3006
|
padding: "var(--vf-sizes-lg-padding-y) var(--vf-sizes-lg-padding-x)",
|
|
2682
3007
|
fontSize: "var(--vf-sizes-lg-font-size)"
|
|
2683
3008
|
}
|
|
2684
|
-
},
|
|
3009
|
+
}, xa = {
|
|
3010
|
+
minWidth: "12rem",
|
|
3011
|
+
fontSize: "var(--vf-typography-font-size)",
|
|
3012
|
+
controlGap: "0.5rem",
|
|
3013
|
+
chevronSize: "0.9em",
|
|
3014
|
+
padding: "var(--vf-controls-padding-y) var(--vf-controls-padding-x)",
|
|
3015
|
+
borderRadius: "var(--vf-radii-md)",
|
|
3016
|
+
borderColor: "var(--vf-border-color)",
|
|
3017
|
+
backgroundColor: "var(--vf-controls-background-color)",
|
|
3018
|
+
textColor: "var(--vf-text-color)",
|
|
3019
|
+
placeholderColor: "var(--vf-secondary-text-color)",
|
|
3020
|
+
focusBorderColor: "var(--vf-blue-600)",
|
|
3021
|
+
hoverBorderColor: "var(--vf-blue-500)",
|
|
3022
|
+
disabledOpacity: "var(--vf-states-disabled-opacity)",
|
|
3023
|
+
panelBackgroundColor: "var(--vf-bg-color)",
|
|
3024
|
+
panelBorderColor: "var(--vf-border-color)",
|
|
3025
|
+
panelPadding: "0.35rem",
|
|
3026
|
+
panelMaxHeight: "16rem",
|
|
3027
|
+
panelRadiusOffset: "2px",
|
|
3028
|
+
panelShadow: "0 10px 30px rgba(0, 0, 0, 0.12)",
|
|
3029
|
+
focusRingShadow: "var(--vf-states-focus-ring-shadow)",
|
|
3030
|
+
optionPadding: "0.5rem 0.6rem",
|
|
3031
|
+
optionBorderRadius: "var(--vf-radii-md)",
|
|
3032
|
+
optionHoverBackgroundColor: "rgba(var(--vf-blue-600-rgb), 0.08)",
|
|
3033
|
+
optionActiveBackgroundColor: "rgba(var(--vf-blue-600-rgb), 0.14)",
|
|
3034
|
+
optionActiveTextColor: "var(--vf-text-color)",
|
|
3035
|
+
optionHighlightedBackgroundColor: "rgba(var(--vf-blue-600-rgb), 0.14)",
|
|
3036
|
+
emptyPadding: "0.5rem 0.6rem",
|
|
3037
|
+
emptyColor: "var(--vf-secondary-text-color)",
|
|
3038
|
+
loadingPadding: "0.5rem 0.6rem",
|
|
3039
|
+
loadingColor: "var(--vf-secondary-text-color)",
|
|
3040
|
+
small: {
|
|
3041
|
+
padding: "var(--vf-sizes-sm-padding-y) var(--vf-sizes-sm-padding-x)",
|
|
3042
|
+
fontSize: "var(--vf-sizes-sm-font-size)"
|
|
3043
|
+
},
|
|
3044
|
+
large: {
|
|
3045
|
+
padding: "var(--vf-sizes-lg-padding-y) var(--vf-sizes-lg-padding-x)",
|
|
3046
|
+
fontSize: "var(--vf-sizes-lg-font-size)"
|
|
3047
|
+
}
|
|
3048
|
+
}, Ba = {
|
|
2685
3049
|
minWidth: "12rem",
|
|
2686
3050
|
fontSize: "var(--vf-typography-font-size)",
|
|
2687
3051
|
controlGap: "0.5rem",
|
|
@@ -2712,6 +3076,12 @@ const ot = (t) => {
|
|
|
2712
3076
|
emptyColor: "var(--vf-secondary-text-color)",
|
|
2713
3077
|
loadingPadding: "0.5rem 0.6rem",
|
|
2714
3078
|
loadingColor: "var(--vf-secondary-text-color)",
|
|
3079
|
+
searchPadding: "0 0 0.35rem",
|
|
3080
|
+
searchBorderColor: "var(--vf-border-color)",
|
|
3081
|
+
searchBorderRadius: "var(--vf-radii-sm)",
|
|
3082
|
+
clearSize: "1.25rem",
|
|
3083
|
+
clearRadius: "var(--vf-radii-sm)",
|
|
3084
|
+
clearHoverBackgroundColor: "rgba(var(--vf-blue-600-rgb), 0.08)",
|
|
2715
3085
|
small: {
|
|
2716
3086
|
padding: "var(--vf-sizes-sm-padding-y) var(--vf-sizes-sm-padding-x)",
|
|
2717
3087
|
fontSize: "var(--vf-sizes-sm-font-size)"
|
|
@@ -2720,7 +3090,7 @@ const ot = (t) => {
|
|
|
2720
3090
|
padding: "var(--vf-sizes-lg-padding-y) var(--vf-sizes-lg-padding-x)",
|
|
2721
3091
|
fontSize: "var(--vf-sizes-lg-font-size)"
|
|
2722
3092
|
}
|
|
2723
|
-
},
|
|
3093
|
+
}, za = {
|
|
2724
3094
|
minWidth: "12rem",
|
|
2725
3095
|
fontSize: "var(--vf-typography-font-size)",
|
|
2726
3096
|
controlGap: "0.75rem",
|
|
@@ -2770,7 +3140,7 @@ const ot = (t) => {
|
|
|
2770
3140
|
fontSize: "var(--vf-sizes-lg-font-size)",
|
|
2771
3141
|
daySize: "2.2rem"
|
|
2772
3142
|
}
|
|
2773
|
-
},
|
|
3143
|
+
}, Fa = {
|
|
2774
3144
|
size: "1rem",
|
|
2775
3145
|
gap: "0.5rem",
|
|
2776
3146
|
borderRadius: "var(--vf-radii-sm)",
|
|
@@ -2782,7 +3152,7 @@ const ot = (t) => {
|
|
|
2782
3152
|
checkColor: "#ffffff",
|
|
2783
3153
|
textColor: "var(--vf-text-color)",
|
|
2784
3154
|
disabledOpacity: "var(--vf-states-disabled-opacity)"
|
|
2785
|
-
},
|
|
3155
|
+
}, Sa = {
|
|
2786
3156
|
size: "1rem",
|
|
2787
3157
|
dotSize: "0.45rem",
|
|
2788
3158
|
gap: "0.5rem",
|
|
@@ -2796,7 +3166,7 @@ const ot = (t) => {
|
|
|
2796
3166
|
dotColor: "#ffffff",
|
|
2797
3167
|
textColor: "var(--vf-text-color)",
|
|
2798
3168
|
disabledOpacity: "var(--vf-states-disabled-opacity)"
|
|
2799
|
-
},
|
|
3169
|
+
}, Va = {
|
|
2800
3170
|
width: "2.25rem",
|
|
2801
3171
|
height: "1.25rem",
|
|
2802
3172
|
thumbSize: "1rem",
|
|
@@ -2808,7 +3178,7 @@ const ot = (t) => {
|
|
|
2808
3178
|
thumbColor: "#ffffff",
|
|
2809
3179
|
textColor: "var(--vf-text-color)",
|
|
2810
3180
|
disabledOpacity: "var(--vf-states-disabled-opacity)"
|
|
2811
|
-
},
|
|
3181
|
+
}, La = {
|
|
2812
3182
|
gap: "0.75rem",
|
|
2813
3183
|
listGap: "0.5rem",
|
|
2814
3184
|
listBorderWidth: "1px",
|
|
@@ -2829,7 +3199,7 @@ const ot = (t) => {
|
|
|
2829
3199
|
panelBackgroundColor: "transparent",
|
|
2830
3200
|
panelTextColor: "var(--vf-text-color)",
|
|
2831
3201
|
disabledOpacity: "var(--vf-states-disabled-opacity)"
|
|
2832
|
-
},
|
|
3202
|
+
}, Ta = {
|
|
2833
3203
|
padding: "0.35rem 0.6rem",
|
|
2834
3204
|
borderRadius: "8px",
|
|
2835
3205
|
backgroundColor: "rgba(0, 0, 0, 0.8)",
|
|
@@ -2840,7 +3210,7 @@ const ot = (t) => {
|
|
|
2840
3210
|
zIndex: "120",
|
|
2841
3211
|
maxWidth: "240px",
|
|
2842
3212
|
arrowSize: "8px"
|
|
2843
|
-
},
|
|
3213
|
+
}, Ra = {
|
|
2844
3214
|
gap: "0.75rem",
|
|
2845
3215
|
padding: "0.75rem 0.9rem",
|
|
2846
3216
|
borderRadius: "var(--vf-radii-md)",
|
|
@@ -2879,56 +3249,98 @@ const ot = (t) => {
|
|
|
2879
3249
|
borderColor: "rgba(var(--vf-red-600-rgb), 0.45)",
|
|
2880
3250
|
textColor: "var(--vf-text-color)"
|
|
2881
3251
|
}
|
|
2882
|
-
},
|
|
2883
|
-
|
|
3252
|
+
}, Pa = {
|
|
3253
|
+
gap: "0.75rem",
|
|
3254
|
+
padding: "0.75rem 0.9rem",
|
|
3255
|
+
borderRadius: "var(--vf-radii-md)",
|
|
3256
|
+
borderColor: "var(--vf-border-color)",
|
|
3257
|
+
backgroundColor: "var(--vf-bg-color)",
|
|
3258
|
+
textColor: "var(--vf-text-color)",
|
|
3259
|
+
iconColor: "currentColor",
|
|
3260
|
+
fontSize: "0.95rem",
|
|
3261
|
+
lineHeight: "1.4",
|
|
3262
|
+
bodyGap: "0.2rem",
|
|
3263
|
+
titleFontSize: "0.95rem",
|
|
3264
|
+
titleFontWeight: "600",
|
|
3265
|
+
actionsGap: "0.5rem",
|
|
3266
|
+
closeSize: "1.5rem",
|
|
3267
|
+
closeRadius: "var(--vf-radii-sm)",
|
|
3268
|
+
closeFontSize: "1rem",
|
|
3269
|
+
closeHoverBackgroundColor: "rgba(var(--vf-gray-600-rgb), 0.12)",
|
|
3270
|
+
info: {
|
|
3271
|
+
backgroundColor: "rgba(var(--vf-blue-600-rgb), 0.1)",
|
|
3272
|
+
borderColor: "rgba(var(--vf-blue-600-rgb), 0.4)",
|
|
3273
|
+
textColor: "var(--vf-text-color)"
|
|
3274
|
+
},
|
|
3275
|
+
success: {
|
|
3276
|
+
backgroundColor: "rgba(var(--vf-green-600-rgb), 0.12)",
|
|
3277
|
+
borderColor: "rgba(var(--vf-green-600-rgb), 0.45)",
|
|
3278
|
+
textColor: "var(--vf-text-color)"
|
|
3279
|
+
},
|
|
3280
|
+
warn: {
|
|
3281
|
+
backgroundColor: "rgba(var(--vf-yellow-600-rgb), 0.16)",
|
|
3282
|
+
borderColor: "rgba(var(--vf-yellow-600-rgb), 0.5)",
|
|
3283
|
+
textColor: "var(--vf-text-color)"
|
|
3284
|
+
},
|
|
3285
|
+
danger: {
|
|
3286
|
+
backgroundColor: "rgba(var(--vf-red-600-rgb), 0.12)",
|
|
3287
|
+
borderColor: "rgba(var(--vf-red-600-rgb), 0.45)",
|
|
3288
|
+
textColor: "var(--vf-text-color)"
|
|
3289
|
+
}
|
|
3290
|
+
}, dr = {
|
|
3291
|
+
...je,
|
|
2884
3292
|
components: {
|
|
2885
|
-
base:
|
|
2886
|
-
button:
|
|
2887
|
-
card:
|
|
2888
|
-
input:
|
|
2889
|
-
formField:
|
|
2890
|
-
textarea:
|
|
2891
|
-
link:
|
|
2892
|
-
menu:
|
|
2893
|
-
modal:
|
|
2894
|
-
popover:
|
|
2895
|
-
select:
|
|
2896
|
-
autocomplete:
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
3293
|
+
base: je,
|
|
3294
|
+
button: ba,
|
|
3295
|
+
card: ma,
|
|
3296
|
+
input: ga,
|
|
3297
|
+
formField: ha,
|
|
3298
|
+
textarea: ya,
|
|
3299
|
+
link: _a,
|
|
3300
|
+
menu: ka,
|
|
3301
|
+
modal: Ca,
|
|
3302
|
+
popover: wa,
|
|
3303
|
+
select: $a,
|
|
3304
|
+
autocomplete: xa,
|
|
3305
|
+
multiselect: Ba,
|
|
3306
|
+
datepicker: za,
|
|
3307
|
+
checkbox: Fa,
|
|
3308
|
+
radio: Sa,
|
|
3309
|
+
switch: Va,
|
|
3310
|
+
tabs: La,
|
|
3311
|
+
tooltip: Ta,
|
|
3312
|
+
toast: Ra,
|
|
3313
|
+
alert: Pa
|
|
2904
3314
|
}
|
|
2905
3315
|
};
|
|
2906
3316
|
export {
|
|
2907
|
-
|
|
2908
|
-
|
|
3317
|
+
tr as Alert,
|
|
3318
|
+
Na as Autocomplete,
|
|
3319
|
+
Wa as Button,
|
|
2909
3320
|
ht as Card,
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
3321
|
+
ja as Checkbox,
|
|
3322
|
+
Ga as DatePicker,
|
|
3323
|
+
dr as DefaultTheme,
|
|
3324
|
+
Ha as FormField,
|
|
3325
|
+
Ma as Input,
|
|
3326
|
+
Je as Link,
|
|
3327
|
+
Ea as Menu,
|
|
3328
|
+
rr as Modal,
|
|
3329
|
+
Ya as MultiSelect,
|
|
3330
|
+
ar as Popover,
|
|
3331
|
+
qa as RadioButton,
|
|
3332
|
+
Xa as RadioGroup,
|
|
3333
|
+
Ka as Select,
|
|
3334
|
+
or as Switch,
|
|
3335
|
+
Za as Tab,
|
|
3336
|
+
Ja as TabPanel,
|
|
3337
|
+
Ua as Tabs,
|
|
3338
|
+
Aa as Textarea,
|
|
3339
|
+
Qa as Toast,
|
|
3340
|
+
er as ToastContainer,
|
|
3341
|
+
lr as Tooltip,
|
|
3342
|
+
ir as VueForge,
|
|
3343
|
+
sr as getTheme,
|
|
3344
|
+
rt as setTheme,
|
|
3345
|
+
nr as updateTheme
|
|
2934
3346
|
};
|