@codemonster-ru/vueforge 0.14.0 → 0.16.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 +78 -3
- package/dist/index.css +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.ts.mjs +1469 -902
- package/dist/index.ts.umd.js +3 -3
- package/dist/package/components/__tests__/autocomplete.test.d.ts +1 -0
- package/dist/package/components/__tests__/datepicker.test.d.ts +1 -0
- package/dist/package/components/autocomplete.vue.d.ts +55 -0
- package/dist/package/components/datepicker.vue.d.ts +41 -0
- package/dist/package/config/theme-core.d.ts +93 -0
- package/dist/package/themes/default/components/autocomplete.d.ts +41 -0
- package/dist/package/themes/default/components/datepicker.d.ts +52 -0
- package/dist/package/themes/default/index.d.ts +91 -0
- package/package.json +1 -1
package/dist/index.ts.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useRoute as
|
|
3
|
-
import { CmIcon as
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as Y, ref as M, computed as h, watch as oe, resolveComponent as Ge, openBlock as m, createElementBlock as _, normalizeClass as P, renderSlot as F, Fragment as pe, createTextVNode as se, toDisplayString as K, createBlock as ae, withCtx as me, createCommentVNode as O, createElementVNode as B, renderList as Be, withKeys as ee, withModifiers as J, unref as _e, createVNode as je, nextTick as ze, onMounted as Le, onBeforeUnmount as we, Teleport as $e, withDirectives as he, vShow as ye, provide as Xe, inject as Oe, reactive as rt, createSlots as lt, useSlots as nt } from "vue";
|
|
2
|
+
import { useRoute as st, useRouter as it } from "vue-router";
|
|
3
|
+
import { CmIcon as Ce } from "@codemonster-ru/vueiconify";
|
|
4
|
+
const dt = ["href", "aria-disabled", "tabindex"], Ue = /* @__PURE__ */ Y({
|
|
5
5
|
__name: "link",
|
|
6
6
|
props: {
|
|
7
7
|
to: { default: void 0 },
|
|
@@ -15,96 +15,96 @@ const ot = ["href", "aria-disabled", "tabindex"], Pe = /* @__PURE__ */ I({
|
|
|
15
15
|
},
|
|
16
16
|
emits: ["click", "active", "update:active", "onActive"],
|
|
17
17
|
setup(t, { emit: e }) {
|
|
18
|
-
const r = e, o = t, a =
|
|
18
|
+
const r = e, o = t, a = st(), u = it(), i = M(null), d = h(() => o.href ?? o.url), l = h(() => o.as ? o.as === "router-link" && !o.to ? "a" : o.as : o.type === "router-link" || o.type === "a" ? o.type === "router-link" && !o.to ? "a" : o.type : o.to ? "router-link" : "a"), c = h(() => o.to), n = h(() => o.to ? u.resolve(o.to) : null), s = h(() => {
|
|
19
19
|
if (l.value !== "router-link")
|
|
20
20
|
return !1;
|
|
21
|
-
const v =
|
|
22
|
-
return v ? v.name ? a.matched.some(({ name:
|
|
23
|
-
}),
|
|
21
|
+
const v = n.value;
|
|
22
|
+
return v ? v.name ? a.matched.some(({ name: w }) => w === v.name) : v.fullPath ? a.fullPath === v.fullPath : a.path === v.path : !1;
|
|
23
|
+
}), p = h(() => o.active === void 0 ? s.value : o.active), f = (v) => {
|
|
24
24
|
if (!o.disabled) {
|
|
25
25
|
r("click", v);
|
|
26
26
|
return;
|
|
27
27
|
}
|
|
28
28
|
v.preventDefault(), v.stopPropagation();
|
|
29
29
|
};
|
|
30
|
-
return
|
|
30
|
+
return oe(s, (v) => {
|
|
31
31
|
v && (r("active"), r("onActive")), r("update:active", v);
|
|
32
|
-
}), (v,
|
|
33
|
-
const
|
|
34
|
-
return l.value === "a" ? (
|
|
32
|
+
}), (v, w) => {
|
|
33
|
+
const C = Ge("router-link");
|
|
34
|
+
return l.value === "a" ? (m(), _("a", {
|
|
35
35
|
key: 0,
|
|
36
36
|
href: d.value,
|
|
37
|
-
class:
|
|
37
|
+
class: P(["vf-link", { "vf-link_active": p.value, "vf-link_disabled": v.disabled }]),
|
|
38
38
|
"aria-disabled": v.disabled,
|
|
39
39
|
tabindex: v.disabled ? -1 : void 0,
|
|
40
|
-
onClick:
|
|
40
|
+
onClick: f
|
|
41
41
|
}, [
|
|
42
|
-
v.$slots.default ?
|
|
43
|
-
|
|
42
|
+
v.$slots.default ? F(v.$slots, "default", { key: 0 }) : (m(), _(pe, { key: 1 }, [
|
|
43
|
+
se(K(v.label), 1)
|
|
44
44
|
], 64))
|
|
45
|
-
], 10,
|
|
45
|
+
], 10, dt)) : (m(), ae(C, {
|
|
46
46
|
key: 1,
|
|
47
47
|
ref_key: "link",
|
|
48
|
-
ref:
|
|
49
|
-
to:
|
|
50
|
-
class:
|
|
48
|
+
ref: i,
|
|
49
|
+
to: c.value,
|
|
50
|
+
class: P(["vf-link", { "vf-link_active": p.value }]),
|
|
51
51
|
"aria-disabled": v.disabled,
|
|
52
52
|
tabindex: v.disabled ? -1 : void 0,
|
|
53
53
|
"active-class": "vf-link_partially-active",
|
|
54
54
|
"exact-active-class": "vf-link_active",
|
|
55
|
-
onClick:
|
|
55
|
+
onClick: f
|
|
56
56
|
}, {
|
|
57
|
-
default:
|
|
58
|
-
v.$slots.default ?
|
|
59
|
-
|
|
57
|
+
default: me(() => [
|
|
58
|
+
v.$slots.default ? F(v.$slots, "default", { key: 0 }) : (m(), _(pe, { key: 1 }, [
|
|
59
|
+
se(K(v.label), 1)
|
|
60
60
|
], 64))
|
|
61
61
|
]),
|
|
62
62
|
_: 3
|
|
63
63
|
}, 8, ["to", "class", "aria-disabled", "tabindex"]));
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
|
-
}),
|
|
66
|
+
}), ct = (t, e) => {
|
|
67
67
|
const r = t.__vccOpts || t;
|
|
68
68
|
for (const [o, a] of e)
|
|
69
69
|
r[o] = a;
|
|
70
70
|
return r;
|
|
71
|
-
},
|
|
71
|
+
}, ut = {}, vt = { class: "vf-card" }, ft = {
|
|
72
72
|
key: 0,
|
|
73
73
|
class: "vf-card__default"
|
|
74
|
-
},
|
|
74
|
+
}, pt = {
|
|
75
75
|
key: 1,
|
|
76
76
|
class: "vf-card__header"
|
|
77
|
-
},
|
|
77
|
+
}, bt = {
|
|
78
78
|
key: 2,
|
|
79
79
|
class: "vf-card__body"
|
|
80
|
-
},
|
|
80
|
+
}, mt = {
|
|
81
81
|
key: 3,
|
|
82
82
|
class: "vf-card__footer"
|
|
83
83
|
};
|
|
84
|
-
function
|
|
85
|
-
return
|
|
86
|
-
t.$slots.default ? (
|
|
87
|
-
|
|
88
|
-
])) :
|
|
89
|
-
t.$slots.header ? (
|
|
90
|
-
|
|
91
|
-
])) :
|
|
92
|
-
t.$slots.body ? (
|
|
93
|
-
|
|
94
|
-
])) :
|
|
95
|
-
t.$slots.footer ? (
|
|
96
|
-
|
|
97
|
-
])) :
|
|
84
|
+
function gt(t, e) {
|
|
85
|
+
return m(), _("div", vt, [
|
|
86
|
+
t.$slots.default ? (m(), _("div", ft, [
|
|
87
|
+
F(t.$slots, "default")
|
|
88
|
+
])) : O("", !0),
|
|
89
|
+
t.$slots.header ? (m(), _("div", pt, [
|
|
90
|
+
F(t.$slots, "header")
|
|
91
|
+
])) : O("", !0),
|
|
92
|
+
t.$slots.body ? (m(), _("div", bt, [
|
|
93
|
+
F(t.$slots, "body")
|
|
94
|
+
])) : O("", !0),
|
|
95
|
+
t.$slots.footer ? (m(), _("div", mt, [
|
|
96
|
+
F(t.$slots, "footer")
|
|
97
|
+
])) : O("", !0)
|
|
98
98
|
]);
|
|
99
99
|
}
|
|
100
|
-
const
|
|
100
|
+
const ht = /* @__PURE__ */ ct(ut, [["render", gt]]), yt = {
|
|
101
101
|
class: "vf-menu__list",
|
|
102
102
|
role: "menu"
|
|
103
|
-
},
|
|
103
|
+
}, kt = {
|
|
104
104
|
key: 1,
|
|
105
105
|
class: "vf-menu__separator",
|
|
106
106
|
role: "separator"
|
|
107
|
-
},
|
|
107
|
+
}, _t = ["aria-expanded", "onClick", "onKeydown"], ba = /* @__PURE__ */ Y({
|
|
108
108
|
name: "VfMenu",
|
|
109
109
|
__name: "menu",
|
|
110
110
|
props: {
|
|
@@ -113,87 +113,87 @@ const ut = /* @__PURE__ */ rt(at, [["render", ct]]), ft = {
|
|
|
113
113
|
},
|
|
114
114
|
emits: ["active", "onActive"],
|
|
115
115
|
setup(t, { emit: e }) {
|
|
116
|
-
const r = e, o = t, a =
|
|
117
|
-
...
|
|
118
|
-
items:
|
|
119
|
-
})), l = (
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
}),
|
|
123
|
-
},
|
|
124
|
-
var
|
|
125
|
-
for (const
|
|
126
|
-
const
|
|
127
|
-
Object.prototype.hasOwnProperty.call(
|
|
116
|
+
const r = e, o = t, a = M([]), u = (n, s) => `${n.label ?? n.to ?? n.href ?? n.url ?? "item"}_${s.toString()}`, i = (n) => n.to ? "router-link" : "a", d = (n) => n.map((s) => ({
|
|
117
|
+
...s,
|
|
118
|
+
items: s.items ? d(s.items) : void 0
|
|
119
|
+
})), l = (n) => {
|
|
120
|
+
n.items && n.items.length ? (a.value.map((s) => {
|
|
121
|
+
s !== n && (s.subMenuVisible = !1);
|
|
122
|
+
}), n.subMenuVisible = !n.subMenuVisible) : Object.prototype.hasOwnProperty.call(n, "command") && typeof n.command == "function" && n.command();
|
|
123
|
+
}, c = (n) => {
|
|
124
|
+
var s;
|
|
125
|
+
for (const p in a.value) {
|
|
126
|
+
const f = a.value[p];
|
|
127
|
+
Object.prototype.hasOwnProperty.call(f, "items") && ((s = f.items) != null && s.some((v) => v === n) ? (f.active = !0, f.subMenuVisible = !0) : (f.active = !1, f.subMenuVisible = !1));
|
|
128
128
|
}
|
|
129
|
-
r("active",
|
|
129
|
+
r("active", n), r("onActive", n);
|
|
130
130
|
};
|
|
131
|
-
return
|
|
131
|
+
return oe(
|
|
132
132
|
() => o.items,
|
|
133
|
-
(
|
|
134
|
-
a.value = d(
|
|
133
|
+
(n) => {
|
|
134
|
+
a.value = d(n);
|
|
135
135
|
},
|
|
136
136
|
{ deep: !0, immediate: !0 }
|
|
137
|
-
), (
|
|
138
|
-
const
|
|
139
|
-
return
|
|
140
|
-
class:
|
|
137
|
+
), (n, s) => {
|
|
138
|
+
const p = Ge("VfMenu");
|
|
139
|
+
return m(), _("div", {
|
|
140
|
+
class: P(["vf-menu", `vf-menu_${n.orientation}`])
|
|
141
141
|
}, [
|
|
142
|
-
|
|
143
|
-
(
|
|
144
|
-
key:
|
|
142
|
+
B("ul", yt, [
|
|
143
|
+
(m(!0), _(pe, null, Be(a.value, (f, v) => (m(), _("li", {
|
|
144
|
+
key: u(f, v),
|
|
145
145
|
class: "vf-menu__item",
|
|
146
146
|
role: "none"
|
|
147
147
|
}, [
|
|
148
|
-
|
|
148
|
+
n.$slots[u(f, v)] ? F(n.$slots, u(f, v), {
|
|
149
149
|
key: 0,
|
|
150
|
-
item: { ...
|
|
151
|
-
}) :
|
|
152
|
-
|
|
153
|
-
class:
|
|
150
|
+
item: { ...f, class: "vf-menu__link" }
|
|
151
|
+
}) : f.separator ? (m(), _("hr", kt)) : f.items && f.items.length ? (m(), _(pe, { key: 2 }, [
|
|
152
|
+
B("div", {
|
|
153
|
+
class: P(["vf-menu__parent", { "vf-menu__parent_active": f.active }]),
|
|
154
154
|
role: "menuitem",
|
|
155
155
|
tabindex: "0",
|
|
156
|
-
"aria-expanded":
|
|
157
|
-
onClick: (
|
|
156
|
+
"aria-expanded": f.subMenuVisible ? "true" : "false",
|
|
157
|
+
onClick: (w) => l(f),
|
|
158
158
|
onKeydown: [
|
|
159
|
-
|
|
160
|
-
|
|
159
|
+
ee(J((w) => l(f), ["prevent"]), ["enter"]),
|
|
160
|
+
ee(J((w) => l(f), ["prevent"]), ["space"])
|
|
161
161
|
]
|
|
162
162
|
}, [
|
|
163
|
-
|
|
163
|
+
f.icon ? (m(), ae(_e(Ce), {
|
|
164
164
|
key: 0,
|
|
165
|
-
icon:
|
|
165
|
+
icon: f.icon,
|
|
166
166
|
class: "vf-menu__icon"
|
|
167
|
-
}, null, 8, ["icon"])) :
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
], 42,
|
|
171
|
-
|
|
167
|
+
}, null, 8, ["icon"])) : O("", !0),
|
|
168
|
+
se(" " + K(f.label) + " ", 1),
|
|
169
|
+
je(_e(Ce), { icon: "chevronDown" })
|
|
170
|
+
], 42, _t),
|
|
171
|
+
f.items ? (m(), ae(p, {
|
|
172
172
|
key: 0,
|
|
173
|
-
items:
|
|
174
|
-
class:
|
|
175
|
-
onOnActive:
|
|
176
|
-
}, null, 8, ["items", "class"])) :
|
|
177
|
-
], 64)) : (
|
|
173
|
+
items: f.items,
|
|
174
|
+
class: P(["vf-menu__submenu", { "vf-menu__submenu_visible": f.subMenuVisible }]),
|
|
175
|
+
onOnActive: c
|
|
176
|
+
}, null, 8, ["items", "class"])) : O("", !0)
|
|
177
|
+
], 64)) : (m(), ae(Ue, {
|
|
178
178
|
key: 3,
|
|
179
|
-
to:
|
|
180
|
-
href:
|
|
181
|
-
as:
|
|
179
|
+
to: f.to,
|
|
180
|
+
href: f.href ?? f.url,
|
|
181
|
+
as: i(f),
|
|
182
182
|
class: "vf-menu__link",
|
|
183
|
-
active:
|
|
184
|
-
disabled:
|
|
183
|
+
active: f.active,
|
|
184
|
+
disabled: f.disabled,
|
|
185
185
|
role: "menuitem",
|
|
186
|
-
"aria-disabled":
|
|
187
|
-
onClick: (
|
|
188
|
-
onActive: (
|
|
186
|
+
"aria-disabled": f.disabled ? "true" : "false",
|
|
187
|
+
onClick: (w) => l(f),
|
|
188
|
+
onActive: (w) => c(f)
|
|
189
189
|
}, {
|
|
190
|
-
default:
|
|
191
|
-
|
|
190
|
+
default: me(() => [
|
|
191
|
+
f.icon ? (m(), ae(_e(Ce), {
|
|
192
192
|
key: 0,
|
|
193
|
-
icon:
|
|
193
|
+
icon: f.icon,
|
|
194
194
|
class: "vf-menu__icon"
|
|
195
|
-
}, null, 8, ["icon"])) :
|
|
196
|
-
|
|
195
|
+
}, null, 8, ["icon"])) : O("", !0),
|
|
196
|
+
se(" " + K(f.label), 1)
|
|
197
197
|
]),
|
|
198
198
|
_: 2
|
|
199
199
|
}, 1032, ["to", "href", "as", "active", "disabled", "aria-disabled", "onClick", "onActive"]))
|
|
@@ -202,7 +202,7 @@ const ut = /* @__PURE__ */ rt(at, [["render", ct]]), ft = {
|
|
|
202
202
|
], 2);
|
|
203
203
|
};
|
|
204
204
|
}
|
|
205
|
-
}),
|
|
205
|
+
}), Ct = ["type", "disabled"], ma = /* @__PURE__ */ Y({
|
|
206
206
|
__name: "button",
|
|
207
207
|
props: {
|
|
208
208
|
to: { default: void 0 },
|
|
@@ -221,70 +221,70 @@ const ut = /* @__PURE__ */ rt(at, [["render", ct]]), ft = {
|
|
|
221
221
|
disabled: { type: Boolean, default: !1 }
|
|
222
222
|
},
|
|
223
223
|
setup(t) {
|
|
224
|
-
const e = t, r = ["button", "submit", "reset"], o = (
|
|
225
|
-
let
|
|
226
|
-
return ["top", "bottom"].includes(e.iconPos) &&
|
|
227
|
-
}), l = h(() => ["vf-button__icon", `vf-button__icon_${e.iconPos}`]),
|
|
228
|
-
return (
|
|
224
|
+
const e = t, r = ["button", "submit", "reset"], o = (n) => !!n && r.includes(n), a = h(() => e.as ? e.as === "button" : !(e.to || e.href || e.url || e.type && !o(e.type))), u = h(() => o(e.type) ? e.type : "button"), i = h(() => e.as === "link" ? e.to ? "router-link" : "a" : e.type && !o(e.type) ? e.type === "router-link" && e.to ? "router-link" : "a" : e.to ? "router-link" : "a"), d = h(() => {
|
|
225
|
+
let n = ["vf-button", `vf-button_${e.severity}`];
|
|
226
|
+
return ["top", "bottom"].includes(e.iconPos) && n.push("vf-button_vertical"), e.variant === "text" && n.push("vf-button_text"), e.variant === "outlined" && n.push("vf-button_outlined"), ["small", "large"].indexOf(e.size) > -1 && n.push(`vf-button_${e.size}`), (e.loading || e.disabled) && n.push("vf-button_disabled"), e.rounded && n.push("vf-button_rounded"), n;
|
|
227
|
+
}), l = h(() => ["vf-button__icon", `vf-button__icon_${e.iconPos}`]), c = h(() => ["vf-button__label"]);
|
|
228
|
+
return (n, s) => a.value ? (m(), _("button", {
|
|
229
229
|
key: 0,
|
|
230
|
-
type:
|
|
231
|
-
class:
|
|
230
|
+
type: u.value,
|
|
231
|
+
class: P(d.value),
|
|
232
232
|
disabled: e.loading || e.disabled
|
|
233
233
|
}, [
|
|
234
|
-
e.icon && !e.loading ? (
|
|
234
|
+
e.icon && !e.loading ? (m(), ae(_e(Ce), {
|
|
235
235
|
key: 0,
|
|
236
236
|
icon: e.icon,
|
|
237
|
-
class:
|
|
238
|
-
}, null, 8, ["icon", "class"])) :
|
|
239
|
-
e.loading ? (
|
|
237
|
+
class: P(l.value)
|
|
238
|
+
}, null, 8, ["icon", "class"])) : O("", !0),
|
|
239
|
+
e.loading ? (m(), ae(_e(Ce), {
|
|
240
240
|
key: 1,
|
|
241
241
|
icon: "circleNotch",
|
|
242
|
-
class:
|
|
242
|
+
class: P(l.value),
|
|
243
243
|
spin: ""
|
|
244
|
-
}, null, 8, ["class"])) :
|
|
245
|
-
|
|
244
|
+
}, null, 8, ["class"])) : O("", !0),
|
|
245
|
+
n.$slots.default ? (m(), _("span", {
|
|
246
246
|
key: 2,
|
|
247
|
-
class:
|
|
247
|
+
class: P(c.value)
|
|
248
248
|
}, [
|
|
249
|
-
|
|
250
|
-
], 2)) :
|
|
249
|
+
F(n.$slots, "default")
|
|
250
|
+
], 2)) : n.label ? (m(), _("span", {
|
|
251
251
|
key: 3,
|
|
252
|
-
class:
|
|
253
|
-
},
|
|
254
|
-
], 10,
|
|
252
|
+
class: P(c.value)
|
|
253
|
+
}, K(n.label), 3)) : O("", !0)
|
|
254
|
+
], 10, Ct)) : (m(), ae(Ue, {
|
|
255
255
|
key: 1,
|
|
256
256
|
to: e.to,
|
|
257
257
|
href: e.href ?? e.url,
|
|
258
|
-
as:
|
|
259
|
-
class:
|
|
258
|
+
as: i.value,
|
|
259
|
+
class: P(d.value),
|
|
260
260
|
disabled: e.loading || e.disabled
|
|
261
261
|
}, {
|
|
262
|
-
default:
|
|
263
|
-
e.icon ? (
|
|
262
|
+
default: me(() => [
|
|
263
|
+
e.icon ? (m(), ae(_e(Ce), {
|
|
264
264
|
key: 0,
|
|
265
265
|
icon: e.icon,
|
|
266
|
-
class:
|
|
267
|
-
}, null, 8, ["icon", "class"])) :
|
|
268
|
-
|
|
266
|
+
class: P(l.value)
|
|
267
|
+
}, null, 8, ["icon", "class"])) : O("", !0),
|
|
268
|
+
n.$slots.default ? (m(), _("span", {
|
|
269
269
|
key: 1,
|
|
270
|
-
class:
|
|
270
|
+
class: P(c.value)
|
|
271
271
|
}, [
|
|
272
|
-
|
|
273
|
-
], 2)) :
|
|
272
|
+
F(n.$slots, "default")
|
|
273
|
+
], 2)) : n.label ? (m(), _("span", {
|
|
274
274
|
key: 2,
|
|
275
|
-
class:
|
|
276
|
-
},
|
|
275
|
+
class: P(c.value)
|
|
276
|
+
}, K(n.label), 3)) : O("", !0)
|
|
277
277
|
]),
|
|
278
278
|
_: 3
|
|
279
279
|
}, 8, ["to", "href", "as", "class", "disabled"]));
|
|
280
280
|
}
|
|
281
|
-
}),
|
|
281
|
+
}), wt = {
|
|
282
282
|
key: 0,
|
|
283
283
|
class: "vf-input__prefix"
|
|
284
|
-
},
|
|
284
|
+
}, $t = ["type", "value", "placeholder", "disabled", "readonly"], xt = {
|
|
285
285
|
key: 1,
|
|
286
286
|
class: "vf-input__suffix"
|
|
287
|
-
},
|
|
287
|
+
}, ga = /* @__PURE__ */ Y({
|
|
288
288
|
__name: "input",
|
|
289
289
|
props: {
|
|
290
290
|
modelValue: { default: "" },
|
|
@@ -298,36 +298,36 @@ const ut = /* @__PURE__ */ rt(at, [["render", ct]]), ft = {
|
|
|
298
298
|
emits: ["update:modelValue", "input", "change", "focus", "blur"],
|
|
299
299
|
setup(t, { emit: e }) {
|
|
300
300
|
const r = e, o = t, a = h(() => {
|
|
301
|
-
const
|
|
302
|
-
return o.size !== "normal" &&
|
|
303
|
-
}),
|
|
304
|
-
const
|
|
305
|
-
r("update:modelValue",
|
|
306
|
-
},
|
|
307
|
-
return (
|
|
308
|
-
class:
|
|
301
|
+
const c = ["vf-input", `vf-input_${o.variant}`];
|
|
302
|
+
return o.size !== "normal" && c.push(`vf-input_${o.size}`), o.disabled && c.push("vf-input_disabled"), c;
|
|
303
|
+
}), u = (c) => {
|
|
304
|
+
const n = c.target;
|
|
305
|
+
r("update:modelValue", n.value), r("input", c);
|
|
306
|
+
}, i = (c) => r("change", c), d = (c) => r("focus", c), l = (c) => r("blur", c);
|
|
307
|
+
return (c, n) => (m(), _("div", {
|
|
308
|
+
class: P(a.value)
|
|
309
309
|
}, [
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
])) :
|
|
313
|
-
|
|
310
|
+
c.$slots.prefix ? (m(), _("span", wt, [
|
|
311
|
+
F(c.$slots, "prefix")
|
|
312
|
+
])) : O("", !0),
|
|
313
|
+
B("input", {
|
|
314
314
|
class: "vf-input__control",
|
|
315
|
-
type:
|
|
316
|
-
value:
|
|
317
|
-
placeholder:
|
|
318
|
-
disabled:
|
|
319
|
-
readonly:
|
|
320
|
-
onInput:
|
|
321
|
-
onChange:
|
|
315
|
+
type: c.type,
|
|
316
|
+
value: c.modelValue,
|
|
317
|
+
placeholder: c.placeholder,
|
|
318
|
+
disabled: c.disabled,
|
|
319
|
+
readonly: c.readonly,
|
|
320
|
+
onInput: u,
|
|
321
|
+
onChange: i,
|
|
322
322
|
onFocus: d,
|
|
323
323
|
onBlur: l
|
|
324
|
-
}, null, 40,
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
])) :
|
|
324
|
+
}, null, 40, $t),
|
|
325
|
+
c.$slots.suffix ? (m(), _("span", xt, [
|
|
326
|
+
F(c.$slots, "suffix")
|
|
327
|
+
])) : O("", !0)
|
|
328
328
|
], 2));
|
|
329
329
|
}
|
|
330
|
-
}),
|
|
330
|
+
}), Bt = ["value", "placeholder", "disabled", "readonly", "rows"], ha = /* @__PURE__ */ Y({
|
|
331
331
|
__name: "textarea",
|
|
332
332
|
props: {
|
|
333
333
|
modelValue: { default: "" },
|
|
@@ -341,30 +341,30 @@ const ut = /* @__PURE__ */ rt(at, [["render", ct]]), ft = {
|
|
|
341
341
|
emits: ["update:modelValue", "input", "change", "focus", "blur"],
|
|
342
342
|
setup(t, { emit: e }) {
|
|
343
343
|
const r = e, o = t, a = h(() => {
|
|
344
|
-
const
|
|
345
|
-
return o.size !== "normal" &&
|
|
346
|
-
}),
|
|
347
|
-
const
|
|
348
|
-
r("update:modelValue",
|
|
349
|
-
},
|
|
350
|
-
return (
|
|
351
|
-
class:
|
|
344
|
+
const c = ["vf-textarea", `vf-textarea_${o.variant}`];
|
|
345
|
+
return o.size !== "normal" && c.push(`vf-textarea_${o.size}`), o.disabled && c.push("vf-textarea_disabled"), c;
|
|
346
|
+
}), u = (c) => {
|
|
347
|
+
const n = c.target;
|
|
348
|
+
r("update:modelValue", n.value), r("input", c);
|
|
349
|
+
}, i = (c) => r("change", c), d = (c) => r("focus", c), l = (c) => r("blur", c);
|
|
350
|
+
return (c, n) => (m(), _("div", {
|
|
351
|
+
class: P(a.value)
|
|
352
352
|
}, [
|
|
353
|
-
|
|
353
|
+
B("textarea", {
|
|
354
354
|
class: "vf-textarea__control",
|
|
355
|
-
value:
|
|
356
|
-
placeholder:
|
|
357
|
-
disabled:
|
|
358
|
-
readonly:
|
|
359
|
-
rows:
|
|
360
|
-
onInput:
|
|
361
|
-
onChange:
|
|
355
|
+
value: c.modelValue,
|
|
356
|
+
placeholder: c.placeholder,
|
|
357
|
+
disabled: c.disabled,
|
|
358
|
+
readonly: c.readonly,
|
|
359
|
+
rows: c.rows,
|
|
360
|
+
onInput: u,
|
|
361
|
+
onChange: i,
|
|
362
362
|
onFocus: d,
|
|
363
363
|
onBlur: l
|
|
364
|
-
}, null, 40,
|
|
364
|
+
}, null, 40, Bt)
|
|
365
365
|
], 2));
|
|
366
366
|
}
|
|
367
|
-
}),
|
|
367
|
+
}), Ae = [
|
|
368
368
|
"top",
|
|
369
369
|
"top-start",
|
|
370
370
|
"top-end",
|
|
@@ -377,7 +377,7 @@ const ut = /* @__PURE__ */ rt(at, [["render", ct]]), ft = {
|
|
|
377
377
|
"left",
|
|
378
378
|
"left-start",
|
|
379
379
|
"left-end"
|
|
380
|
-
],
|
|
380
|
+
], ue = (t) => {
|
|
381
381
|
if (t == null || !(t instanceof HTMLElement))
|
|
382
382
|
return null;
|
|
383
383
|
if (typeof window < "u") {
|
|
@@ -385,18 +385,18 @@ const ut = /* @__PURE__ */ rt(at, [["render", ct]]), ft = {
|
|
|
385
385
|
if (/(auto|scroll|overlay)/.test(r))
|
|
386
386
|
return t;
|
|
387
387
|
}
|
|
388
|
-
return t.scrollHeight > t.clientHeight || t.scrollWidth > t.clientWidth ? t :
|
|
388
|
+
return t.scrollHeight > t.clientHeight || t.scrollWidth > t.clientWidth ? t : ue(t.parentNode);
|
|
389
389
|
};
|
|
390
|
-
function
|
|
390
|
+
function zt(t) {
|
|
391
391
|
return typeof window > "u" ? !1 : window.getComputedStyle(t).position === "fixed";
|
|
392
392
|
}
|
|
393
|
-
const
|
|
394
|
-
const o = t.getBoundingClientRect(), a = e ? e.offsetParent : null,
|
|
395
|
-
if (a && !
|
|
396
|
-
const
|
|
393
|
+
const Ft = (t, e) => t.strategy ? t.strategy : zt(e) ? "fixed" : "absolute", be = (t, e) => Ft(t, e) === "fixed", ne = (t, e, r = {}) => {
|
|
394
|
+
const o = t.getBoundingClientRect(), a = e ? e.offsetParent : null, u = e ? be(r, e) : !1;
|
|
395
|
+
if (a && !u) {
|
|
396
|
+
const i = a.getBoundingClientRect(), d = a.scrollLeft, l = a.scrollTop;
|
|
397
397
|
return {
|
|
398
|
-
left: o.left -
|
|
399
|
-
top: o.top -
|
|
398
|
+
left: o.left - i.left + d,
|
|
399
|
+
top: o.top - i.top + l,
|
|
400
400
|
width: o.width,
|
|
401
401
|
height: o.height
|
|
402
402
|
};
|
|
@@ -407,63 +407,63 @@ const kt = (t, e) => t.strategy ? t.strategy : Ct(e) ? "fixed" : "absolute", ee
|
|
|
407
407
|
width: o.width,
|
|
408
408
|
height: o.height
|
|
409
409
|
};
|
|
410
|
-
},
|
|
410
|
+
}, ge = (t, e) => {
|
|
411
411
|
var r;
|
|
412
412
|
return (r = t.middleware) == null ? void 0 : r.find((o) => o.name === e);
|
|
413
|
-
},
|
|
414
|
-
const e =
|
|
413
|
+
}, qe = (t, e) => !!ge(t, e), St = (t) => {
|
|
414
|
+
const e = ue(t);
|
|
415
415
|
let r = "";
|
|
416
416
|
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;
|
|
417
|
-
},
|
|
418
|
-
if (r === null && typeof window < "u" &&
|
|
417
|
+
}, Fe = (t) => t.scrollLeft + t.clientWidth, Se = (t) => t.scrollTop + t.clientHeight, ie = (t, e, r = null, o = {}, a) => {
|
|
418
|
+
if (r === null && typeof window < "u" && be(o, e))
|
|
419
419
|
return t;
|
|
420
|
-
let
|
|
420
|
+
let u = 0;
|
|
421
421
|
if (r === null) {
|
|
422
|
-
const
|
|
423
|
-
|
|
422
|
+
const i = ue(e);
|
|
423
|
+
u = i ? i.scrollTop : 0;
|
|
424
424
|
}
|
|
425
|
-
return t -
|
|
426
|
-
},
|
|
427
|
-
let
|
|
428
|
-
if (r === null && typeof window < "u" &&
|
|
429
|
-
|
|
425
|
+
return t - u;
|
|
426
|
+
}, de = (t, e, r = null, o = {}, a) => {
|
|
427
|
+
let u;
|
|
428
|
+
if (r === null && typeof window < "u" && be(o, e))
|
|
429
|
+
u = window.innerWidth;
|
|
430
430
|
else if (r === null) {
|
|
431
|
-
const
|
|
432
|
-
|
|
431
|
+
const i = ue(e);
|
|
432
|
+
u = i ? Fe(i) : 0;
|
|
433
433
|
} else
|
|
434
|
-
|
|
435
|
-
return -(t + e.clientWidth -
|
|
436
|
-
},
|
|
437
|
-
let
|
|
438
|
-
if (r === null && typeof window < "u" &&
|
|
439
|
-
|
|
434
|
+
u = r.getBoundingClientRect().width;
|
|
435
|
+
return -(t + e.clientWidth - u);
|
|
436
|
+
}, ve = (t, e, r = null, o = {}, a) => {
|
|
437
|
+
let u;
|
|
438
|
+
if (r === null && typeof window < "u" && be(o, e))
|
|
439
|
+
u = window.innerHeight;
|
|
440
440
|
else if (r === null) {
|
|
441
|
-
const
|
|
442
|
-
|
|
441
|
+
const i = ue(e);
|
|
442
|
+
u = i ? Se(i) : 0;
|
|
443
443
|
} else
|
|
444
|
-
|
|
445
|
-
return -(t + e.clientHeight -
|
|
446
|
-
},
|
|
447
|
-
if (r === null && typeof window < "u" &&
|
|
444
|
+
u = r.getBoundingClientRect().height;
|
|
445
|
+
return -(t + e.clientHeight - u);
|
|
446
|
+
}, ce = (t, e, r = null, o = {}, a) => {
|
|
447
|
+
if (r === null && typeof window < "u" && be(o, e))
|
|
448
448
|
return t;
|
|
449
|
-
let
|
|
449
|
+
let u = 0;
|
|
450
450
|
if (r === null) {
|
|
451
|
-
const
|
|
452
|
-
|
|
451
|
+
const i = ue(e);
|
|
452
|
+
u = i ? i.scrollLeft : 0;
|
|
453
453
|
}
|
|
454
|
-
return t -
|
|
455
|
-
},
|
|
454
|
+
return t - u;
|
|
455
|
+
}, Ke = ({
|
|
456
456
|
options: t,
|
|
457
457
|
primaryX: e,
|
|
458
458
|
primaryY: r,
|
|
459
459
|
floating: o,
|
|
460
460
|
placement: a,
|
|
461
|
-
reference:
|
|
462
|
-
scrollDirection:
|
|
461
|
+
reference: u,
|
|
462
|
+
scrollDirection: i
|
|
463
463
|
}) => {
|
|
464
|
-
const d =
|
|
464
|
+
const d = Ve(u, o, a, t), l = ge(t, "offset");
|
|
465
465
|
if (l) {
|
|
466
|
-
const
|
|
466
|
+
const c = l.fn({
|
|
467
467
|
x: d.x,
|
|
468
468
|
y: d.y,
|
|
469
469
|
options: t,
|
|
@@ -471,17 +471,17 @@ const kt = (t, e) => t.strategy ? t.strategy : Ct(e) ? "fixed" : "absolute", ee
|
|
|
471
471
|
primaryY: r,
|
|
472
472
|
floating: o,
|
|
473
473
|
placement: a,
|
|
474
|
-
reference:
|
|
475
|
-
scrollDirection:
|
|
474
|
+
reference: u,
|
|
475
|
+
scrollDirection: i
|
|
476
476
|
});
|
|
477
|
-
d.x =
|
|
477
|
+
d.x = c.x, d.y = c.y;
|
|
478
478
|
}
|
|
479
|
-
return
|
|
479
|
+
return Yt(d, o, u, t) ? {
|
|
480
480
|
x: d.x,
|
|
481
481
|
y: d.y,
|
|
482
482
|
placement: a
|
|
483
483
|
} : !1;
|
|
484
|
-
},
|
|
484
|
+
}, Re = (t) => ({
|
|
485
485
|
name: "flip",
|
|
486
486
|
params: t,
|
|
487
487
|
fn: ({
|
|
@@ -489,116 +489,116 @@ const kt = (t, e) => t.strategy ? t.strategy : Ct(e) ? "fixed" : "absolute", ee
|
|
|
489
489
|
y: r,
|
|
490
490
|
options: o,
|
|
491
491
|
primaryX: a,
|
|
492
|
-
primaryY:
|
|
493
|
-
floating:
|
|
492
|
+
primaryY: u,
|
|
493
|
+
floating: i,
|
|
494
494
|
placement: d,
|
|
495
495
|
reference: l,
|
|
496
|
-
scrollDirection:
|
|
496
|
+
scrollDirection: c
|
|
497
497
|
}) => {
|
|
498
|
-
var
|
|
499
|
-
const
|
|
498
|
+
var n;
|
|
499
|
+
const s = {
|
|
500
500
|
x: e,
|
|
501
501
|
y: r,
|
|
502
502
|
placement: d
|
|
503
|
-
},
|
|
503
|
+
}, p = {
|
|
504
504
|
...o,
|
|
505
|
-
middleware: (
|
|
506
|
-
},
|
|
507
|
-
let
|
|
508
|
-
const
|
|
509
|
-
if (
|
|
505
|
+
middleware: (n = o.middleware) == null ? void 0 : n.filter((S) => S.name !== "shift")
|
|
506
|
+
}, f = (t == null ? void 0 : t.placements) ?? Ae, v = !(t != null && t.placements), w = v ? Ae : f;
|
|
507
|
+
let C = !1;
|
|
508
|
+
const z = (S) => {
|
|
509
|
+
if (C)
|
|
510
510
|
return;
|
|
511
|
-
const
|
|
512
|
-
options:
|
|
511
|
+
const W = Ke({
|
|
512
|
+
options: p,
|
|
513
513
|
primaryX: a,
|
|
514
|
-
primaryY:
|
|
515
|
-
floating:
|
|
516
|
-
placement:
|
|
514
|
+
primaryY: u,
|
|
515
|
+
floating: i,
|
|
516
|
+
placement: S,
|
|
517
517
|
reference: l,
|
|
518
|
-
scrollDirection:
|
|
518
|
+
scrollDirection: c
|
|
519
519
|
});
|
|
520
|
-
|
|
521
|
-
},
|
|
522
|
-
if (!v &&
|
|
523
|
-
const
|
|
524
|
-
(
|
|
525
|
-
const
|
|
526
|
-
options:
|
|
520
|
+
W && (s.x = W.x, s.y = W.y, s.placement = W.placement, C = !0);
|
|
521
|
+
}, E = jt(l, i, p);
|
|
522
|
+
if (!v && f.includes(d) && z(d), C || w.forEach(z), !C) {
|
|
523
|
+
const S = f.reduce(
|
|
524
|
+
(W, V) => {
|
|
525
|
+
const T = Ke({
|
|
526
|
+
options: p,
|
|
527
527
|
primaryX: a,
|
|
528
|
-
primaryY:
|
|
529
|
-
floating:
|
|
530
|
-
placement:
|
|
528
|
+
primaryY: u,
|
|
529
|
+
floating: i,
|
|
530
|
+
placement: V,
|
|
531
531
|
reference: l,
|
|
532
|
-
scrollDirection:
|
|
532
|
+
scrollDirection: c
|
|
533
533
|
});
|
|
534
|
-
if (!
|
|
535
|
-
return
|
|
536
|
-
const H =
|
|
537
|
-
return !
|
|
534
|
+
if (!T)
|
|
535
|
+
return W;
|
|
536
|
+
const H = xe(V), L = E[H];
|
|
537
|
+
return !W || L > W.space ? { result: T, space: L } : W;
|
|
538
538
|
},
|
|
539
539
|
null
|
|
540
540
|
);
|
|
541
|
-
|
|
541
|
+
S && (s.x = S.result.x, s.y = S.result.y, s.placement = S.result.placement, C = !0);
|
|
542
542
|
}
|
|
543
|
-
if (!
|
|
544
|
-
const
|
|
545
|
-
let
|
|
546
|
-
|
|
547
|
-
const b =
|
|
548
|
-
|
|
543
|
+
if (!C && f.length > 0) {
|
|
544
|
+
const S = xe(d);
|
|
545
|
+
let W = S, V = E[S];
|
|
546
|
+
f.forEach((y) => {
|
|
547
|
+
const b = xe(y), $ = E[b];
|
|
548
|
+
$ > V && (V = $, W = b);
|
|
549
549
|
});
|
|
550
|
-
const
|
|
550
|
+
const T = Gt(W, d, f), H = Ve(l, i, T, p), L = ge(p, "offset");
|
|
551
551
|
if (L) {
|
|
552
|
-
const
|
|
552
|
+
const y = L.fn({
|
|
553
553
|
x: H.x,
|
|
554
554
|
y: H.y,
|
|
555
|
-
options:
|
|
555
|
+
options: p,
|
|
556
556
|
primaryX: a,
|
|
557
|
-
primaryY:
|
|
558
|
-
floating:
|
|
559
|
-
placement:
|
|
557
|
+
primaryY: u,
|
|
558
|
+
floating: i,
|
|
559
|
+
placement: T,
|
|
560
560
|
reference: l,
|
|
561
|
-
scrollDirection:
|
|
561
|
+
scrollDirection: c
|
|
562
562
|
});
|
|
563
|
-
H.x =
|
|
563
|
+
H.x = y.x, H.y = y.y;
|
|
564
564
|
}
|
|
565
|
-
|
|
565
|
+
s.x = H.x, s.y = H.y, s.placement = H.placement;
|
|
566
566
|
}
|
|
567
|
-
return
|
|
567
|
+
return s;
|
|
568
568
|
}
|
|
569
|
-
}),
|
|
570
|
-
var
|
|
569
|
+
}), Ze = (t, e, r, o, a) => {
|
|
570
|
+
var u, i, d;
|
|
571
571
|
let l = 0;
|
|
572
572
|
o.startsWith("right") ? l = -t : o.startsWith("left") && (l = t);
|
|
573
|
-
const
|
|
574
|
-
if (
|
|
575
|
-
const
|
|
576
|
-
o.startsWith("right") ? l -=
|
|
573
|
+
const c = ge(e, "arrow"), n = ge(e, "shift");
|
|
574
|
+
if (c) {
|
|
575
|
+
const s = ((u = c.params) == null ? void 0 : u.arrow).getBoundingClientRect();
|
|
576
|
+
o.startsWith("right") ? l -= s.width / 2 : o.startsWith("left") && (l += s.width / 2);
|
|
577
577
|
}
|
|
578
|
-
if (
|
|
579
|
-
let
|
|
580
|
-
|
|
581
|
-
const
|
|
582
|
-
|
|
578
|
+
if (qe(e, "shift") && c) {
|
|
579
|
+
let s = null, p = 0;
|
|
580
|
+
n && (s = (i = n.params) == null ? void 0 : i.parent);
|
|
581
|
+
const f = (d = c.params) == null ? void 0 : d.arrow;
|
|
582
|
+
p = f.getBoundingClientRect().width / 2, p += Tt(f), p -= 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 - p, a, s, e) <= t && (ce(r - l - p, a, s, e) >= 0 ? (l = -t - (ce(r - l - p, a, s, e) + t), s && (l = -t)) : l = -t) : o.startsWith("left") ? de(r - l + p, a, s, e) <= t ? (l = t + de(r - p, 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);
|
|
583
583
|
}
|
|
584
584
|
return l;
|
|
585
|
-
},
|
|
586
|
-
var
|
|
585
|
+
}, Je = (t, e, r, o, a) => {
|
|
586
|
+
var u, i, d;
|
|
587
587
|
let l = 0;
|
|
588
588
|
o.startsWith("top") ? l = t : o.startsWith("bottom") && (l = -t);
|
|
589
|
-
const
|
|
590
|
-
if (
|
|
591
|
-
const
|
|
592
|
-
o.startsWith("top") ? l +=
|
|
589
|
+
const c = ge(e, "arrow"), n = ge(e, "shift");
|
|
590
|
+
if (c) {
|
|
591
|
+
const s = ((u = c.params) == null ? void 0 : u.arrow).getBoundingClientRect();
|
|
592
|
+
o.startsWith("top") ? l += s.height / 2 : o.startsWith("bottom") && (l -= s.height / 2);
|
|
593
593
|
}
|
|
594
|
-
if (
|
|
595
|
-
let
|
|
596
|
-
|
|
597
|
-
const
|
|
598
|
-
|
|
594
|
+
if (qe(e, "shift") && c) {
|
|
595
|
+
let s = null, p = 0;
|
|
596
|
+
n && (s = (i = n.params) == null ? void 0 : i.parent);
|
|
597
|
+
const f = (d = c.params) == null ? void 0 : d.arrow;
|
|
598
|
+
p = f.getBoundingClientRect().height / 2, p += Lt(f), p -= 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 : ve(r - l + p, a, s, e) <= t && (l = t + ve(r - p, a, s, e), l <= t && (l = t)) : o.startsWith("bottom") ? ie(r - l - p, a, s, e) <= t ? ie(r - l - p, a, s, e) >= 0 ? (l = -t - (ie(r - l - p, a, s, e) + t), s && (l = -t)) : l = -t : ve(r - l, a, s, e) <= t && (ve(r, a, s, e) >= 0 ? l = t - ve(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 : ve(r - l, a, s, e) <= t && (ve(r - l, a, s, e) >= 0 ? l = t - ve(r - l, a, s, e) : l = t);
|
|
599
599
|
}
|
|
600
600
|
return l;
|
|
601
|
-
},
|
|
601
|
+
}, De = (t) => ({
|
|
602
602
|
name: "offset",
|
|
603
603
|
params: { value: t },
|
|
604
604
|
fn: ({
|
|
@@ -606,15 +606,15 @@ const kt = (t, e) => t.strategy ? t.strategy : Ct(e) ? "fixed" : "absolute", ee
|
|
|
606
606
|
y: r,
|
|
607
607
|
options: o,
|
|
608
608
|
primaryX: a,
|
|
609
|
-
primaryY:
|
|
610
|
-
floating:
|
|
609
|
+
primaryY: u,
|
|
610
|
+
floating: i,
|
|
611
611
|
placement: d
|
|
612
612
|
}) => ({
|
|
613
|
-
x: e -
|
|
614
|
-
y: r -
|
|
613
|
+
x: e - Ze(t, o, a, d, i),
|
|
614
|
+
y: r - Je(t, o, u, d, i),
|
|
615
615
|
placement: d
|
|
616
616
|
})
|
|
617
|
-
}),
|
|
617
|
+
}), Vt = (t) => ({
|
|
618
618
|
name: "shift",
|
|
619
619
|
params: t,
|
|
620
620
|
fn: ({
|
|
@@ -622,161 +622,161 @@ const kt = (t, e) => t.strategy ? t.strategy : Ct(e) ? "fixed" : "absolute", ee
|
|
|
622
622
|
y: r,
|
|
623
623
|
options: o,
|
|
624
624
|
primaryX: a,
|
|
625
|
-
primaryY:
|
|
626
|
-
floating:
|
|
625
|
+
primaryY: u,
|
|
626
|
+
floating: i,
|
|
627
627
|
placement: d,
|
|
628
628
|
reference: l
|
|
629
629
|
}) => {
|
|
630
|
-
var
|
|
631
|
-
const
|
|
630
|
+
var c;
|
|
631
|
+
const n = {
|
|
632
632
|
x: e,
|
|
633
633
|
y: r,
|
|
634
634
|
placement: d
|
|
635
|
-
},
|
|
636
|
-
let
|
|
637
|
-
const H =
|
|
638
|
-
if (
|
|
639
|
-
const
|
|
640
|
-
|
|
641
|
-
const
|
|
642
|
-
return
|
|
635
|
+
}, s = o.middleware || [], p = s.findIndex(($) => $.name === "shift"), f = s.findIndex(($) => $.name === "offset"), v = f !== -1 && (p === -1 || f > p), w = s.find(($) => $.name === "offset"), C = w ? (c = w.params) == null ? void 0 : c.value : 0, z = v ? Ze(C, o, a, d, i) : 0, E = v ? Je(C, o, u, d, i) : 0, S = e - z, W = r - E;
|
|
636
|
+
let V = S, T = W;
|
|
637
|
+
const H = w ? Math.abs(C) : 0, L = H, y = H;
|
|
638
|
+
if (be(o, i) && typeof window < "u") {
|
|
639
|
+
const $ = L, A = window.innerWidth - i.clientWidth - L, G = A < $ ? $ : A, j = y, Q = window.innerHeight - i.clientHeight - y, N = Q < j ? j : Q;
|
|
640
|
+
V < $ ? V = $ : V > G && (V = G), T < j ? T = j : T > N && (T = N), v ? (n.x = e + (V - S), n.y = r + (T - W)) : (n.x = V, n.y = T);
|
|
641
|
+
const te = L, X = window.innerWidth - i.clientWidth - L, re = y, g = window.innerHeight - i.clientHeight - y, R = v ? te + z : te, I = v ? X + z : X, Z = v ? re + E : re, k = v ? g + E : g;
|
|
642
|
+
return n.x < R ? n.x = R : n.x > I && (n.x = I), n.y < Z ? n.y = Z : n.y > k && (n.y = k), n;
|
|
643
643
|
}
|
|
644
|
-
const b =
|
|
644
|
+
const b = ue(i);
|
|
645
645
|
if (b !== null) {
|
|
646
|
-
const
|
|
647
|
-
|
|
646
|
+
const $ = ne(l, i, o), A = $.left, G = $.left + $.width, j = $.top, Q = $.top + $.height, N = b.scrollLeft + L, te = Fe(b) - i.clientWidth - L, X = te < N ? N : te, re = b.scrollTop + y, g = Se(b) - i.clientHeight - y, R = g < re ? re : g, I = b.scrollLeft, Z = Fe(b), k = b.scrollTop, x = Se(b);
|
|
647
|
+
G <= I ? V = N : A >= Z && (V = X), Q <= k ? T = re : j >= x && (T = R), T < re ? T = re : T > R && (T = R), V < N ? V = N : V > X && (V = X);
|
|
648
648
|
}
|
|
649
|
-
if (v ? (
|
|
650
|
-
const
|
|
651
|
-
|
|
649
|
+
if (v ? (n.x = e + (V - S), n.y = r + (T - W)) : (n.x = V, n.y = T), b !== null) {
|
|
650
|
+
const $ = b.scrollLeft + L, A = Fe(b) - i.clientWidth - L, G = b.scrollTop + y, j = Se(b) - i.clientHeight - y, Q = v ? $ + z : $, N = v ? A + z : A, te = v ? G + E : G, X = v ? j + E : j;
|
|
651
|
+
n.x < Q ? n.x = Q : n.x > N && (n.x = N), n.y < te ? n.y = te : n.y > X && (n.y = X);
|
|
652
652
|
}
|
|
653
|
-
return
|
|
653
|
+
return n;
|
|
654
654
|
}
|
|
655
|
-
}),
|
|
656
|
-
const r =
|
|
655
|
+
}), Tt = (t) => t.getBoundingClientRect().width !== t.clientWidth ? (t.getBoundingClientRect().width - t.clientWidth) / 2 : 0, Lt = (t) => t.getBoundingClientRect().height !== t.clientHeight ? (t.getBoundingClientRect().height - t.clientHeight) / 2 : 0, Pe = (t, e) => {
|
|
656
|
+
const r = ue(t), o = [];
|
|
657
657
|
if (r !== null) {
|
|
658
658
|
const a = () => e();
|
|
659
659
|
r.addEventListener("scroll", a, !1), o.push(() => r.removeEventListener("scroll", a, !1));
|
|
660
660
|
}
|
|
661
661
|
if (typeof window < "u") {
|
|
662
|
-
const a = () => e(),
|
|
663
|
-
window.addEventListener("scroll", a, !1), window.addEventListener("resize",
|
|
662
|
+
const a = () => e(), u = () => e();
|
|
663
|
+
window.addEventListener("scroll", a, !1), window.addEventListener("resize", u, !1), o.push(() => window.removeEventListener("scroll", a, !1)), o.push(() => window.removeEventListener("resize", u, !1));
|
|
664
664
|
}
|
|
665
665
|
if (typeof ResizeObserver < "u" && t instanceof HTMLElement) {
|
|
666
666
|
const a = new ResizeObserver(() => e());
|
|
667
667
|
a.observe(t), o.push(() => a.disconnect());
|
|
668
668
|
}
|
|
669
669
|
return () => o.forEach((a) => a());
|
|
670
|
-
},
|
|
671
|
-
const o =
|
|
670
|
+
}, Rt = (t, e, r = {}) => {
|
|
671
|
+
const o = ne(t, e, r);
|
|
672
672
|
return {
|
|
673
673
|
x: o.left - e.getBoundingClientRect().width / 2 + o.width / 2,
|
|
674
674
|
y: o.top - e.getBoundingClientRect().height,
|
|
675
675
|
placement: "top"
|
|
676
676
|
};
|
|
677
|
-
},
|
|
678
|
-
const o =
|
|
677
|
+
}, Dt = (t, e, r = {}) => {
|
|
678
|
+
const o = ne(t, e, r);
|
|
679
679
|
return {
|
|
680
680
|
x: o.left,
|
|
681
681
|
y: o.top - e.getBoundingClientRect().height,
|
|
682
682
|
placement: "top-start"
|
|
683
683
|
};
|
|
684
|
-
},
|
|
685
|
-
const o =
|
|
684
|
+
}, Pt = (t, e, r = {}) => {
|
|
685
|
+
const o = ne(t, e, r);
|
|
686
686
|
return {
|
|
687
687
|
x: o.left - e.getBoundingClientRect().width + o.width,
|
|
688
688
|
y: o.top - e.getBoundingClientRect().height,
|
|
689
689
|
placement: "top-end"
|
|
690
690
|
};
|
|
691
|
-
},
|
|
692
|
-
const o =
|
|
691
|
+
}, Wt = (t, e, r = {}) => {
|
|
692
|
+
const o = ne(t, e, r);
|
|
693
693
|
return {
|
|
694
694
|
x: o.left + o.width,
|
|
695
695
|
y: o.top - e.getBoundingClientRect().height / 2 + o.height / 2,
|
|
696
696
|
placement: "right"
|
|
697
697
|
};
|
|
698
|
-
},
|
|
699
|
-
const o =
|
|
698
|
+
}, It = (t, e, r = {}) => {
|
|
699
|
+
const o = ne(t, e, r);
|
|
700
700
|
return {
|
|
701
701
|
x: o.left + o.width,
|
|
702
702
|
y: o.top,
|
|
703
703
|
placement: "right-start"
|
|
704
704
|
};
|
|
705
|
-
},
|
|
706
|
-
const o =
|
|
705
|
+
}, Ot = (t, e, r = {}) => {
|
|
706
|
+
const o = ne(t, e, r);
|
|
707
707
|
return {
|
|
708
708
|
x: o.left + o.width,
|
|
709
709
|
y: o.top + o.height - e.getBoundingClientRect().height,
|
|
710
710
|
placement: "right-end"
|
|
711
711
|
};
|
|
712
|
-
},
|
|
713
|
-
const o =
|
|
712
|
+
}, Mt = (t, e, r = {}) => {
|
|
713
|
+
const o = ne(t, e, r);
|
|
714
714
|
return {
|
|
715
715
|
x: o.left + o.width / 2 - e.getBoundingClientRect().width / 2,
|
|
716
716
|
y: o.top + o.height,
|
|
717
717
|
placement: "bottom"
|
|
718
718
|
};
|
|
719
|
-
},
|
|
720
|
-
const o =
|
|
719
|
+
}, Et = (t, e, r = {}) => {
|
|
720
|
+
const o = ne(t, e, r);
|
|
721
721
|
return {
|
|
722
722
|
x: o.left,
|
|
723
723
|
y: o.top + o.height,
|
|
724
724
|
placement: "bottom-start"
|
|
725
725
|
};
|
|
726
|
-
},
|
|
727
|
-
const o =
|
|
726
|
+
}, Ht = (t, e, r = {}) => {
|
|
727
|
+
const o = ne(t, e, r);
|
|
728
728
|
return {
|
|
729
729
|
x: o.left - e.getBoundingClientRect().width + o.width,
|
|
730
730
|
y: o.top + o.height,
|
|
731
731
|
placement: "bottom-end"
|
|
732
732
|
};
|
|
733
|
-
},
|
|
734
|
-
const o =
|
|
733
|
+
}, At = (t, e, r = {}) => {
|
|
734
|
+
const o = ne(t, e, r);
|
|
735
735
|
return {
|
|
736
736
|
x: o.left - e.getBoundingClientRect().width,
|
|
737
737
|
y: o.top + o.height / 2 - e.getBoundingClientRect().height / 2,
|
|
738
738
|
placement: "left"
|
|
739
739
|
};
|
|
740
|
-
},
|
|
741
|
-
const o =
|
|
740
|
+
}, Kt = (t, e, r = {}) => {
|
|
741
|
+
const o = ne(t, e, r);
|
|
742
742
|
return {
|
|
743
743
|
x: o.left - e.getBoundingClientRect().width,
|
|
744
744
|
y: o.top,
|
|
745
745
|
placement: "left-start"
|
|
746
746
|
};
|
|
747
|
-
},
|
|
748
|
-
const o =
|
|
747
|
+
}, Nt = (t, e, r = {}) => {
|
|
748
|
+
const o = ne(t, e, r);
|
|
749
749
|
return {
|
|
750
750
|
x: o.left - e.getBoundingClientRect().width,
|
|
751
751
|
y: o.top + o.height - e.getBoundingClientRect().height,
|
|
752
752
|
placement: "left-end"
|
|
753
753
|
};
|
|
754
|
-
},
|
|
754
|
+
}, Ve = (t, e, r, o = {}) => {
|
|
755
755
|
switch (r) {
|
|
756
756
|
case "top":
|
|
757
|
-
return
|
|
757
|
+
return Rt(t, e, o);
|
|
758
758
|
case "top-start":
|
|
759
|
-
return
|
|
759
|
+
return Dt(t, e, o);
|
|
760
760
|
case "top-end":
|
|
761
|
-
return
|
|
761
|
+
return Pt(t, e, o);
|
|
762
762
|
case "right":
|
|
763
|
-
return
|
|
763
|
+
return Wt(t, e, o);
|
|
764
764
|
case "right-start":
|
|
765
|
-
return
|
|
765
|
+
return It(t, e, o);
|
|
766
766
|
case "right-end":
|
|
767
|
-
return
|
|
767
|
+
return Ot(t, e, o);
|
|
768
768
|
case "bottom":
|
|
769
|
-
return
|
|
769
|
+
return Mt(t, e, o);
|
|
770
770
|
case "bottom-start":
|
|
771
|
-
return
|
|
771
|
+
return Et(t, e, o);
|
|
772
772
|
case "bottom-end":
|
|
773
|
-
return Wt(t, e, o);
|
|
774
|
-
case "left":
|
|
775
773
|
return Ht(t, e, o);
|
|
774
|
+
case "left":
|
|
775
|
+
return At(t, e, o);
|
|
776
776
|
case "left-start":
|
|
777
|
-
return
|
|
777
|
+
return Kt(t, e, o);
|
|
778
778
|
case "left-end":
|
|
779
|
-
return
|
|
779
|
+
return Nt(t, e, o);
|
|
780
780
|
default:
|
|
781
781
|
return {
|
|
782
782
|
x: 0,
|
|
@@ -784,25 +784,25 @@ const kt = (t, e) => t.strategy ? t.strategy : Ct(e) ? "fixed" : "absolute", ee
|
|
|
784
784
|
placement: ""
|
|
785
785
|
};
|
|
786
786
|
}
|
|
787
|
-
},
|
|
788
|
-
if (
|
|
787
|
+
}, Yt = (t, e, r, o = {}) => {
|
|
788
|
+
if (be(o, e)) {
|
|
789
789
|
if (typeof window > "u")
|
|
790
790
|
return !0;
|
|
791
|
-
const
|
|
792
|
-
return
|
|
791
|
+
const s = t.x, p = t.y, f = s + e.clientWidth, v = p + e.clientHeight;
|
|
792
|
+
return s >= 0 && p >= 0 && f <= window.innerWidth && v <= window.innerHeight;
|
|
793
793
|
}
|
|
794
|
-
if (
|
|
795
|
-
return
|
|
794
|
+
if (ue(r) !== null)
|
|
795
|
+
return ie(t.y, e, null, o) > 0 && de(t.x, e, null, o) > 0 && ve(t.y, e, null, o) > 0 && ce(t.x, e, null, o) > 0;
|
|
796
796
|
if (typeof window > "u")
|
|
797
797
|
return !0;
|
|
798
|
-
const a = window.innerWidth,
|
|
799
|
-
if (
|
|
800
|
-
const
|
|
801
|
-
return
|
|
798
|
+
const a = window.innerWidth, u = window.innerHeight, i = (r instanceof HTMLElement ? r.offsetParent : null) || e.offsetParent;
|
|
799
|
+
if (i) {
|
|
800
|
+
const s = i.getBoundingClientRect(), p = s.left + t.x, f = s.top + t.y, v = p + e.clientWidth, w = f + e.clientHeight;
|
|
801
|
+
return p >= 0 && f >= 0 && v <= a && w <= u;
|
|
802
802
|
}
|
|
803
|
-
const d = t.x, l = t.y,
|
|
804
|
-
return d >= 0 && l >= 0 &&
|
|
805
|
-
},
|
|
803
|
+
const d = t.x, l = t.y, c = d + e.clientWidth, n = l + e.clientHeight;
|
|
804
|
+
return d >= 0 && l >= 0 && c <= a && n <= u;
|
|
805
|
+
}, xe = (t) => t.startsWith("right") ? "right" : t.startsWith("left") ? "left" : t.startsWith("top") ? "top" : "bottom", Gt = (t, e, r) => xe(e) === t && r.includes(e) ? e : r.find((o) => xe(o) === t) ?? r[0], jt = (t, e, r = {}) => {
|
|
806
806
|
if (typeof window > "u")
|
|
807
807
|
return {
|
|
808
808
|
top: 0,
|
|
@@ -810,51 +810,51 @@ const kt = (t, e) => t.strategy ? t.strategy : Ct(e) ? "fixed" : "absolute", ee
|
|
|
810
810
|
bottom: 0,
|
|
811
811
|
left: 0
|
|
812
812
|
};
|
|
813
|
-
const o =
|
|
813
|
+
const o = be(r, e) ? null : ue(t), a = t.getBoundingClientRect(), u = o ? o.getBoundingClientRect() : {
|
|
814
814
|
top: 0,
|
|
815
815
|
left: 0,
|
|
816
816
|
right: window.innerWidth,
|
|
817
817
|
bottom: window.innerHeight
|
|
818
818
|
};
|
|
819
819
|
return {
|
|
820
|
-
top: a.top -
|
|
821
|
-
right:
|
|
822
|
-
bottom:
|
|
823
|
-
left: a.left -
|
|
820
|
+
top: a.top - u.top,
|
|
821
|
+
right: u.right - a.right,
|
|
822
|
+
bottom: u.bottom - a.bottom,
|
|
823
|
+
left: a.left - u.left
|
|
824
824
|
};
|
|
825
|
-
},
|
|
826
|
-
var a,
|
|
827
|
-
const
|
|
825
|
+
}, We = (t, e, r = {}) => new Promise((o) => {
|
|
826
|
+
var a, u;
|
|
827
|
+
const i = r.placement ? r.placement : "bottom", d = {
|
|
828
828
|
x: 0,
|
|
829
829
|
y: 0,
|
|
830
|
-
placement:
|
|
830
|
+
placement: i,
|
|
831
831
|
middlewareData: {}
|
|
832
|
-
}, l =
|
|
832
|
+
}, l = Ve(t, e, i, r);
|
|
833
833
|
d.x = l.x, d.y = l.y, d.placement = l.placement;
|
|
834
|
-
const
|
|
835
|
-
(a = r.middleware) == null || a.forEach((
|
|
836
|
-
const
|
|
834
|
+
const c = d.x, n = d.y, s = St(t);
|
|
835
|
+
(a = r.middleware) == null || a.forEach((w) => {
|
|
836
|
+
const C = w.fn({
|
|
837
837
|
x: d.x,
|
|
838
838
|
y: d.y,
|
|
839
839
|
options: r,
|
|
840
|
-
primaryX:
|
|
841
|
-
primaryY:
|
|
840
|
+
primaryX: c,
|
|
841
|
+
primaryY: n,
|
|
842
842
|
floating: e,
|
|
843
843
|
placement: d.placement,
|
|
844
844
|
reference: t,
|
|
845
|
-
scrollDirection:
|
|
845
|
+
scrollDirection: s
|
|
846
846
|
});
|
|
847
|
-
d.x =
|
|
847
|
+
d.x = C.x, d.y = C.y, d.placement = C.placement, w.name === "arrow" && (C.baseX = C.x, C.baseY = C.y, C.x = C.arrowX ?? C.x, C.y = C.arrowY ?? C.y), d.middlewareData[w.name] = C;
|
|
848
848
|
});
|
|
849
|
-
const
|
|
850
|
-
if (Number.isFinite(d.x) || (d.x =
|
|
851
|
-
if (
|
|
852
|
-
const
|
|
853
|
-
d.placement.startsWith("top") ? d.y =
|
|
849
|
+
const p = Ve(t, e, d.placement, r), f = ge(r, "offset"), v = f ? (u = f.params) == null ? void 0 : u.value : 0;
|
|
850
|
+
if (Number.isFinite(d.x) || (d.x = p.x), !Number.isFinite(d.y))
|
|
851
|
+
if (be(r, e)) {
|
|
852
|
+
const w = t.getBoundingClientRect(), C = e.getBoundingClientRect().height;
|
|
853
|
+
d.placement.startsWith("top") ? d.y = w.top - C - v : d.placement.startsWith("bottom") ? d.y = w.bottom + v : d.y = p.y;
|
|
854
854
|
} else
|
|
855
|
-
d.y =
|
|
855
|
+
d.y = p.y;
|
|
856
856
|
o(d);
|
|
857
|
-
}),
|
|
857
|
+
}), Xt = ["disabled", "aria-expanded", "onKeydown"], Ut = ["data-placement"], qt = ["disabled", "aria-selected", "onClick"], ya = /* @__PURE__ */ Y({
|
|
858
858
|
__name: "select",
|
|
859
859
|
props: {
|
|
860
860
|
modelValue: { default: void 0 },
|
|
@@ -869,136 +869,610 @@ const kt = (t, e) => t.strategy ? t.strategy : Ct(e) ? "fixed" : "absolute", ee
|
|
|
869
869
|
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
870
870
|
setup(t, { emit: e }) {
|
|
871
871
|
let r = 0;
|
|
872
|
-
const o = e, a = t,
|
|
873
|
-
let
|
|
874
|
-
const
|
|
872
|
+
const o = e, a = t, u = M(null), i = M(null), d = M(null), l = M(!1), c = M("bottom"), n = M("bottom"), s = `vf-select-panel-${++r}`;
|
|
873
|
+
let p = null;
|
|
874
|
+
const f = h(() => a.options.map((b) => ({
|
|
875
875
|
label: b[a.optionLabel],
|
|
876
876
|
value: b[a.optionValue],
|
|
877
877
|
disabled: b.disabled
|
|
878
|
-
}))), v = h(() =>
|
|
878
|
+
}))), v = h(() => f.value.find((b) => b.value === a.modelValue)), w = h(() => {
|
|
879
879
|
var b;
|
|
880
880
|
return ((b = v.value) == null ? void 0 : b.label) ?? "";
|
|
881
|
-
}),
|
|
881
|
+
}), C = h(() => {
|
|
882
882
|
const b = ["vf-select", `vf-select_${a.variant}`, l.value ? "vf-select_open" : ""];
|
|
883
883
|
return a.size !== "normal" && b.push(`vf-select_${a.size}`), a.disabled && b.push("vf-select_disabled"), b.filter(Boolean);
|
|
884
|
-
}),
|
|
885
|
-
b.disabled || (o("update:modelValue", b.value), o("change", b.value),
|
|
886
|
-
},
|
|
887
|
-
l.value = !1,
|
|
888
|
-
},
|
|
889
|
-
a.disabled || (l.value = !l.value, l.value && (
|
|
884
|
+
}), z = (b) => b.value === a.modelValue, E = (b) => {
|
|
885
|
+
b.disabled || (o("update:modelValue", b.value), o("change", b.value), V());
|
|
886
|
+
}, S = (b) => o("focus", b), W = (b) => o("blur", b), V = () => {
|
|
887
|
+
l.value = !1, c.value = "bottom", n.value = "bottom";
|
|
888
|
+
}, T = () => {
|
|
889
|
+
a.disabled || (l.value = !l.value, l.value && (c.value = "bottom", n.value = "bottom"));
|
|
890
890
|
}, H = async () => {
|
|
891
|
-
var b,
|
|
892
|
-
l.value || (l.value = !0, await
|
|
891
|
+
var b, $;
|
|
892
|
+
l.value || (l.value = !0, await ze()), ($ = (b = d.value) == null ? void 0 : b.querySelector(".vf-select__option:not(.is-disabled)")) == null || $.focus();
|
|
893
893
|
}, L = (b) => {
|
|
894
|
-
var
|
|
895
|
-
if (!l.value || !
|
|
894
|
+
var A;
|
|
895
|
+
if (!l.value || !u.value)
|
|
896
896
|
return;
|
|
897
|
-
const
|
|
898
|
-
|
|
899
|
-
},
|
|
900
|
-
if (!
|
|
897
|
+
const $ = b.target;
|
|
898
|
+
u.value.contains($) || (A = d.value) != null && A.contains($) || V();
|
|
899
|
+
}, y = () => {
|
|
900
|
+
if (!i.value || !d.value)
|
|
901
901
|
return;
|
|
902
|
-
const b =
|
|
902
|
+
const b = i.value, $ = d.value, A = async () => {
|
|
903
903
|
const {
|
|
904
|
-
x:
|
|
905
|
-
y:
|
|
904
|
+
x: N,
|
|
905
|
+
y: te,
|
|
906
906
|
placement: X
|
|
907
|
-
} = await
|
|
908
|
-
placement:
|
|
907
|
+
} = await We(b, $, {
|
|
908
|
+
placement: c.value,
|
|
909
909
|
strategy: "fixed",
|
|
910
|
-
middleware: [
|
|
910
|
+
middleware: [De(2), Re({ placements: ["bottom", "top"] })]
|
|
911
911
|
});
|
|
912
|
-
|
|
913
|
-
},
|
|
914
|
-
await
|
|
915
|
-
},
|
|
916
|
-
|
|
917
|
-
}),
|
|
918
|
-
|
|
912
|
+
n.value = X ?? c.value, $.style.minWidth = `${b.getBoundingClientRect().width}px`, $.style.left = `${N}px`, $.style.top = `${te}px`;
|
|
913
|
+
}, G = async () => {
|
|
914
|
+
await A();
|
|
915
|
+
}, j = Pe(b, () => {
|
|
916
|
+
G();
|
|
917
|
+
}), Q = () => {
|
|
918
|
+
G();
|
|
919
919
|
};
|
|
920
|
-
document.addEventListener("scroll",
|
|
921
|
-
update:
|
|
920
|
+
document.addEventListener("scroll", Q, !0), window.addEventListener("resize", Q, !1), p = {
|
|
921
|
+
update: G,
|
|
922
922
|
destroy: () => {
|
|
923
|
-
|
|
923
|
+
j(), document.removeEventListener("scroll", Q, !0), window.removeEventListener("resize", Q, !1);
|
|
924
924
|
}
|
|
925
|
-
},
|
|
925
|
+
}, p.update();
|
|
926
926
|
};
|
|
927
|
-
return
|
|
927
|
+
return oe(l, async (b) => {
|
|
928
928
|
if (!b) {
|
|
929
|
-
|
|
929
|
+
p && (p.destroy(), p = null);
|
|
930
930
|
return;
|
|
931
931
|
}
|
|
932
|
-
await
|
|
933
|
-
}),
|
|
932
|
+
await ze(), p || y(), p == null || p.update();
|
|
933
|
+
}), oe(
|
|
934
934
|
() => a.options,
|
|
935
935
|
() => {
|
|
936
|
-
|
|
936
|
+
p == null || p.update();
|
|
937
937
|
},
|
|
938
938
|
{ deep: !0 }
|
|
939
|
-
),
|
|
939
|
+
), Le(() => {
|
|
940
940
|
document.addEventListener("click", L);
|
|
941
|
-
}),
|
|
942
|
-
document.removeEventListener("click", L),
|
|
943
|
-
}), (b,
|
|
941
|
+
}), we(() => {
|
|
942
|
+
document.removeEventListener("click", L), p == null || p.destroy(), p = null;
|
|
943
|
+
}), (b, $) => (m(), _("div", {
|
|
944
944
|
ref_key: "root",
|
|
945
|
-
ref:
|
|
946
|
-
class:
|
|
945
|
+
ref: u,
|
|
946
|
+
class: P(C.value)
|
|
947
947
|
}, [
|
|
948
|
-
|
|
948
|
+
B("button", {
|
|
949
949
|
ref_key: "trigger",
|
|
950
|
-
ref:
|
|
950
|
+
ref: i,
|
|
951
951
|
class: "vf-select__control",
|
|
952
952
|
type: "button",
|
|
953
953
|
disabled: b.disabled,
|
|
954
954
|
"aria-expanded": l.value,
|
|
955
|
-
"aria-controls":
|
|
955
|
+
"aria-controls": s,
|
|
956
956
|
"aria-haspopup": "listbox",
|
|
957
|
-
onClick:
|
|
957
|
+
onClick: T,
|
|
958
958
|
onKeydown: [
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
959
|
+
ee(J(H, ["prevent"]), ["down"]),
|
|
960
|
+
ee(J(T, ["prevent"]), ["enter"]),
|
|
961
|
+
ee(J(V, ["prevent"]), ["esc"])
|
|
962
962
|
],
|
|
963
|
-
onFocus:
|
|
964
|
-
onBlur:
|
|
963
|
+
onFocus: S,
|
|
964
|
+
onBlur: W
|
|
965
965
|
}, [
|
|
966
|
-
|
|
967
|
-
class:
|
|
968
|
-
},
|
|
969
|
-
|
|
966
|
+
B("span", {
|
|
967
|
+
class: P(["vf-select__label", { "vf-select__label_placeholder": !w.value }])
|
|
968
|
+
}, K(w.value || b.placeholder), 3),
|
|
969
|
+
$[0] || ($[0] = B("span", {
|
|
970
970
|
class: "vf-select__chevron",
|
|
971
971
|
"aria-hidden": "true"
|
|
972
972
|
}, "▾", -1))
|
|
973
|
-
], 40,
|
|
974
|
-
(
|
|
975
|
-
|
|
976
|
-
id:
|
|
973
|
+
], 40, Xt),
|
|
974
|
+
(m(), ae($e, { to: "body" }, [
|
|
975
|
+
he(B("div", {
|
|
976
|
+
id: s,
|
|
977
977
|
ref_key: "panel",
|
|
978
978
|
ref: d,
|
|
979
979
|
class: "vf-select__panel",
|
|
980
980
|
role: "listbox",
|
|
981
|
-
"data-placement":
|
|
981
|
+
"data-placement": n.value
|
|
982
982
|
}, [
|
|
983
|
-
(
|
|
984
|
-
key:
|
|
985
|
-
class:
|
|
983
|
+
(m(!0), _(pe, null, Be(f.value, (A) => (m(), _("button", {
|
|
984
|
+
key: A.value,
|
|
985
|
+
class: P(["vf-select__option", { "is-active": z(A), "is-disabled": A.disabled }]),
|
|
986
986
|
type: "button",
|
|
987
987
|
role: "option",
|
|
988
|
-
disabled:
|
|
989
|
-
"aria-selected":
|
|
990
|
-
onClick: (
|
|
991
|
-
},
|
|
992
|
-
], 8,
|
|
993
|
-
[
|
|
988
|
+
disabled: A.disabled,
|
|
989
|
+
"aria-selected": z(A),
|
|
990
|
+
onClick: (G) => E(A)
|
|
991
|
+
}, K(A.label), 11, qt))), 128))
|
|
992
|
+
], 8, Ut), [
|
|
993
|
+
[ye, l.value]
|
|
994
994
|
])
|
|
995
995
|
]))
|
|
996
996
|
], 2));
|
|
997
997
|
}
|
|
998
|
-
}),
|
|
998
|
+
}), Zt = ["value", "placeholder", "disabled", "readonly", "aria-expanded", "aria-activedescendant", "onKeydown"], Jt = ["disabled"], Qt = ["data-placement"], eo = {
|
|
999
|
+
key: 0,
|
|
1000
|
+
class: "vf-autocomplete__loading"
|
|
1001
|
+
}, to = ["id", "disabled", "aria-selected", "onClick"], oo = {
|
|
1002
|
+
key: 2,
|
|
1003
|
+
class: "vf-autocomplete__empty"
|
|
1004
|
+
}, ka = /* @__PURE__ */ Y({
|
|
1005
|
+
__name: "autocomplete",
|
|
1006
|
+
props: {
|
|
1007
|
+
modelValue: { default: void 0 },
|
|
1008
|
+
options: { default: () => [] },
|
|
1009
|
+
optionLabel: { default: "label" },
|
|
1010
|
+
optionValue: { default: "value" },
|
|
1011
|
+
placeholder: { default: "" },
|
|
1012
|
+
disabled: { type: Boolean, default: !1 },
|
|
1013
|
+
readonly: { type: Boolean, default: !1 },
|
|
1014
|
+
loading: { type: Boolean, default: !1 },
|
|
1015
|
+
loadingText: { default: "Loading..." },
|
|
1016
|
+
emptyText: { default: "No results" },
|
|
1017
|
+
filter: { type: Boolean, default: !0 },
|
|
1018
|
+
variant: { default: "filled" },
|
|
1019
|
+
size: { default: "normal" }
|
|
1020
|
+
},
|
|
1021
|
+
emits: ["update:modelValue", "change", "focus", "blur", "search"],
|
|
1022
|
+
setup(t, { emit: e }) {
|
|
1023
|
+
let r = 0;
|
|
1024
|
+
const o = e, a = t, u = M(null), i = M(null), d = M(null), l = M(!1), c = M(""), n = M(-1), s = M("bottom"), p = M("bottom"), f = `vf-autocomplete-panel-${++r}`;
|
|
1025
|
+
let v = null;
|
|
1026
|
+
const w = h(() => a.options.map((g) => ({
|
|
1027
|
+
label: g[a.optionLabel],
|
|
1028
|
+
value: g[a.optionValue],
|
|
1029
|
+
disabled: g.disabled
|
|
1030
|
+
}))), C = h(() => w.value.find((g) => g.value === a.modelValue)), z = h(() => {
|
|
1031
|
+
if (!a.filter)
|
|
1032
|
+
return w.value;
|
|
1033
|
+
const g = c.value.trim().toLowerCase();
|
|
1034
|
+
return g ? w.value.filter((R) => R.label.toLowerCase().includes(g)) : w.value;
|
|
1035
|
+
}), E = h(() => {
|
|
1036
|
+
if (!(!l.value || n.value < 0))
|
|
1037
|
+
return W(n.value);
|
|
1038
|
+
}), S = h(() => {
|
|
1039
|
+
const g = ["vf-autocomplete", `vf-autocomplete_${a.variant}`, l.value ? "vf-autocomplete_open" : ""];
|
|
1040
|
+
return a.size !== "normal" && g.push(`vf-autocomplete_${a.size}`), a.disabled && g.push("vf-autocomplete_disabled"), g.filter(Boolean);
|
|
1041
|
+
}), W = (g) => `${f}-option-${g}`, V = (g) => g.value === a.modelValue, T = () => z.value.findIndex((g) => !g.disabled), H = (g) => {
|
|
1042
|
+
const R = z.value;
|
|
1043
|
+
if (!R.length) {
|
|
1044
|
+
n.value = -1;
|
|
1045
|
+
return;
|
|
1046
|
+
}
|
|
1047
|
+
let I = n.value;
|
|
1048
|
+
(I < 0 || I >= R.length) && (I = g > 0 ? -1 : R.length);
|
|
1049
|
+
for (let Z = 0; Z < R.length; Z += 1)
|
|
1050
|
+
if (I = (I + g + R.length) % R.length, !R[I].disabled) {
|
|
1051
|
+
n.value = I;
|
|
1052
|
+
return;
|
|
1053
|
+
}
|
|
1054
|
+
n.value = -1;
|
|
1055
|
+
}, L = () => {
|
|
1056
|
+
a.disabled || (l.value = !0, s.value = "bottom", p.value = "bottom", n.value < 0 && (n.value = T()));
|
|
1057
|
+
}, y = () => {
|
|
1058
|
+
l.value = !1, n.value = -1, s.value = "bottom", p.value = "bottom";
|
|
1059
|
+
}, b = () => {
|
|
1060
|
+
if (l.value) {
|
|
1061
|
+
y();
|
|
1062
|
+
return;
|
|
1063
|
+
}
|
|
1064
|
+
L();
|
|
1065
|
+
}, $ = (g) => {
|
|
1066
|
+
g.disabled || (c.value = g.label, o("update:modelValue", g.value), o("change", g.value), y());
|
|
1067
|
+
}, A = (g) => {
|
|
1068
|
+
const R = g.target;
|
|
1069
|
+
c.value = R.value, o("search", R.value), L(), n.value = T();
|
|
1070
|
+
}, G = (g) => {
|
|
1071
|
+
o("focus", g), L();
|
|
1072
|
+
}, j = (g) => {
|
|
1073
|
+
o("blur", g);
|
|
1074
|
+
}, Q = () => {
|
|
1075
|
+
if (!l.value) {
|
|
1076
|
+
L();
|
|
1077
|
+
return;
|
|
1078
|
+
}
|
|
1079
|
+
H(1);
|
|
1080
|
+
}, N = () => {
|
|
1081
|
+
if (!l.value) {
|
|
1082
|
+
L();
|
|
1083
|
+
return;
|
|
1084
|
+
}
|
|
1085
|
+
H(-1);
|
|
1086
|
+
}, te = () => {
|
|
1087
|
+
if (!l.value) {
|
|
1088
|
+
L();
|
|
1089
|
+
return;
|
|
1090
|
+
}
|
|
1091
|
+
const g = z.value[n.value];
|
|
1092
|
+
g && !g.disabled && $(g);
|
|
1093
|
+
}, X = (g) => {
|
|
1094
|
+
var I;
|
|
1095
|
+
if (!l.value || !u.value)
|
|
1096
|
+
return;
|
|
1097
|
+
const R = g.target;
|
|
1098
|
+
u.value.contains(R) || (I = d.value) != null && I.contains(R) || y();
|
|
1099
|
+
}, re = () => {
|
|
1100
|
+
if (!i.value || !d.value)
|
|
1101
|
+
return;
|
|
1102
|
+
const g = i.value, R = d.value, I = async () => {
|
|
1103
|
+
const {
|
|
1104
|
+
x: D,
|
|
1105
|
+
y: U,
|
|
1106
|
+
placement: le
|
|
1107
|
+
} = await We(g, R, {
|
|
1108
|
+
placement: s.value,
|
|
1109
|
+
strategy: "fixed",
|
|
1110
|
+
middleware: [De(2), Re({ placements: ["bottom", "top"] })]
|
|
1111
|
+
});
|
|
1112
|
+
p.value = le ?? s.value, R.style.minWidth = `${g.getBoundingClientRect().width}px`, R.style.left = `${D}px`, R.style.top = `${U}px`;
|
|
1113
|
+
}, Z = async () => {
|
|
1114
|
+
await I();
|
|
1115
|
+
}, k = Pe(g, () => {
|
|
1116
|
+
Z();
|
|
1117
|
+
}), x = () => {
|
|
1118
|
+
Z();
|
|
1119
|
+
};
|
|
1120
|
+
document.addEventListener("scroll", x, !0), window.addEventListener("resize", x, !1), v = {
|
|
1121
|
+
update: Z,
|
|
1122
|
+
destroy: () => {
|
|
1123
|
+
k(), document.removeEventListener("scroll", x, !0), window.removeEventListener("resize", x, !1);
|
|
1124
|
+
}
|
|
1125
|
+
}, v.update();
|
|
1126
|
+
};
|
|
1127
|
+
return oe(
|
|
1128
|
+
() => a.modelValue,
|
|
1129
|
+
() => {
|
|
1130
|
+
var g;
|
|
1131
|
+
c.value = ((g = C.value) == null ? void 0 : g.label) ?? "";
|
|
1132
|
+
},
|
|
1133
|
+
{ immediate: !0 }
|
|
1134
|
+
), oe(
|
|
1135
|
+
() => a.options,
|
|
1136
|
+
() => {
|
|
1137
|
+
var g;
|
|
1138
|
+
l.value || (c.value = ((g = C.value) == null ? void 0 : g.label) ?? ""), v == null || v.update();
|
|
1139
|
+
},
|
|
1140
|
+
{ deep: !0 }
|
|
1141
|
+
), oe(z, () => {
|
|
1142
|
+
n.value >= z.value.length && (n.value = T());
|
|
1143
|
+
}), oe(l, async (g) => {
|
|
1144
|
+
if (!g) {
|
|
1145
|
+
v && (v.destroy(), v = null);
|
|
1146
|
+
return;
|
|
1147
|
+
}
|
|
1148
|
+
await ze(), v || re(), v == null || v.update();
|
|
1149
|
+
}), Le(() => {
|
|
1150
|
+
document.addEventListener("click", X);
|
|
1151
|
+
}), we(() => {
|
|
1152
|
+
document.removeEventListener("click", X), v == null || v.destroy(), v = null;
|
|
1153
|
+
}), (g, R) => (m(), _("div", {
|
|
1154
|
+
ref_key: "root",
|
|
1155
|
+
ref: u,
|
|
1156
|
+
class: P(S.value)
|
|
1157
|
+
}, [
|
|
1158
|
+
B("input", {
|
|
1159
|
+
ref_key: "control",
|
|
1160
|
+
ref: i,
|
|
1161
|
+
class: "vf-autocomplete__control",
|
|
1162
|
+
type: "text",
|
|
1163
|
+
role: "combobox",
|
|
1164
|
+
value: c.value,
|
|
1165
|
+
placeholder: g.placeholder,
|
|
1166
|
+
disabled: g.disabled,
|
|
1167
|
+
readonly: g.readonly,
|
|
1168
|
+
"aria-expanded": l.value,
|
|
1169
|
+
"aria-autocomplete": "list",
|
|
1170
|
+
"aria-controls": f,
|
|
1171
|
+
"aria-activedescendant": E.value,
|
|
1172
|
+
onInput: A,
|
|
1173
|
+
onFocus: G,
|
|
1174
|
+
onBlur: j,
|
|
1175
|
+
onClick: L,
|
|
1176
|
+
onKeydown: [
|
|
1177
|
+
ee(J(Q, ["prevent"]), ["down"]),
|
|
1178
|
+
ee(J(N, ["prevent"]), ["up"]),
|
|
1179
|
+
ee(J(te, ["prevent"]), ["enter"]),
|
|
1180
|
+
ee(J(y, ["prevent"]), ["esc"]),
|
|
1181
|
+
ee(y, ["tab"])
|
|
1182
|
+
]
|
|
1183
|
+
}, null, 40, Zt),
|
|
1184
|
+
B("button", {
|
|
1185
|
+
class: "vf-autocomplete__chevron",
|
|
1186
|
+
type: "button",
|
|
1187
|
+
disabled: g.disabled,
|
|
1188
|
+
"aria-hidden": "true",
|
|
1189
|
+
tabindex: "-1",
|
|
1190
|
+
onMousedown: R[0] || (R[0] = J(() => {
|
|
1191
|
+
}, ["prevent"])),
|
|
1192
|
+
onClick: b
|
|
1193
|
+
}, " ▾ ", 40, Jt),
|
|
1194
|
+
(m(), ae($e, { to: "body" }, [
|
|
1195
|
+
he(B("div", {
|
|
1196
|
+
id: f,
|
|
1197
|
+
ref_key: "panel",
|
|
1198
|
+
ref: d,
|
|
1199
|
+
class: "vf-autocomplete__panel",
|
|
1200
|
+
role: "listbox",
|
|
1201
|
+
"data-placement": p.value
|
|
1202
|
+
}, [
|
|
1203
|
+
g.loading ? (m(), _("div", eo, K(g.loadingText), 1)) : z.value.length > 0 ? (m(!0), _(pe, { key: 1 }, Be(z.value, (I, Z) => (m(), _("button", {
|
|
1204
|
+
id: W(Z),
|
|
1205
|
+
key: I.value,
|
|
1206
|
+
class: P(["vf-autocomplete__option", {
|
|
1207
|
+
"is-active": V(I),
|
|
1208
|
+
"is-disabled": I.disabled,
|
|
1209
|
+
"is-highlighted": Z === n.value
|
|
1210
|
+
}]),
|
|
1211
|
+
type: "button",
|
|
1212
|
+
role: "option",
|
|
1213
|
+
disabled: I.disabled,
|
|
1214
|
+
"aria-selected": V(I),
|
|
1215
|
+
onMousedown: R[1] || (R[1] = J(() => {
|
|
1216
|
+
}, ["prevent"])),
|
|
1217
|
+
onClick: (k) => $(I)
|
|
1218
|
+
}, K(I.label), 43, to))), 128)) : (m(), _("div", oo, K(g.emptyText), 1))
|
|
1219
|
+
], 8, Qt), [
|
|
1220
|
+
[ye, l.value]
|
|
1221
|
+
])
|
|
1222
|
+
]))
|
|
1223
|
+
], 2));
|
|
1224
|
+
}
|
|
1225
|
+
}), ao = ["disabled", "aria-expanded", "onKeydown"], ro = ["data-placement", "onKeydown"], lo = { class: "vf-datepicker__header" }, no = { class: "vf-datepicker__month-label" }, so = {
|
|
1226
|
+
class: "vf-datepicker__weekdays",
|
|
1227
|
+
role: "row"
|
|
1228
|
+
}, io = {
|
|
1229
|
+
class: "vf-datepicker__days",
|
|
1230
|
+
role: "grid"
|
|
1231
|
+
}, co = ["disabled", "data-date", "onClick"], _a = /* @__PURE__ */ Y({
|
|
1232
|
+
__name: "datepicker",
|
|
1233
|
+
props: {
|
|
1234
|
+
modelValue: { default: void 0 },
|
|
1235
|
+
placeholder: { default: "" },
|
|
1236
|
+
disabled: { type: Boolean, default: !1 },
|
|
1237
|
+
readonly: { type: Boolean, default: !1 },
|
|
1238
|
+
min: { default: void 0 },
|
|
1239
|
+
max: { default: void 0 },
|
|
1240
|
+
locale: { default: "en-US" },
|
|
1241
|
+
firstDayOfWeek: { default: 0 },
|
|
1242
|
+
variant: { default: "filled" },
|
|
1243
|
+
size: { default: "normal" }
|
|
1244
|
+
},
|
|
1245
|
+
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
1246
|
+
setup(t, { emit: e }) {
|
|
1247
|
+
let r = 0;
|
|
1248
|
+
const o = e, a = t, u = M(null), i = M(null), d = M(null), l = M(!1), c = M("bottom"), n = M("bottom"), s = `vf-datepicker-panel-${++r}`, p = M(X(N(a.modelValue) ?? /* @__PURE__ */ new Date()));
|
|
1249
|
+
let f = null;
|
|
1250
|
+
const v = h(() => N(a.modelValue)), w = h(() => N(a.min)), C = h(() => N(a.max)), z = h(() => v.value ? v.value.toLocaleDateString(a.locale, {
|
|
1251
|
+
year: "numeric",
|
|
1252
|
+
month: "short",
|
|
1253
|
+
day: "numeric"
|
|
1254
|
+
}) : ""), E = h(() => p.value.toLocaleDateString(a.locale, {
|
|
1255
|
+
year: "numeric",
|
|
1256
|
+
month: "long"
|
|
1257
|
+
})), S = h(() => {
|
|
1258
|
+
const k = new Intl.DateTimeFormat(a.locale, { weekday: "short" }), x = new Date(2026, 0, 4);
|
|
1259
|
+
return Array.from({ length: 7 }, (D, U) => {
|
|
1260
|
+
const le = (U + a.firstDayOfWeek) % 7, q = new Date(x);
|
|
1261
|
+
return q.setDate(x.getDate() + le), k.format(q);
|
|
1262
|
+
});
|
|
1263
|
+
}), W = h(() => {
|
|
1264
|
+
const k = R(p.value, a.firstDayOfWeek), x = v.value ? I(v.value) : null, D = I(/* @__PURE__ */ new Date());
|
|
1265
|
+
return Array.from({ length: 42 }, (U, le) => {
|
|
1266
|
+
const q = g(k, le), ke = I(q);
|
|
1267
|
+
return {
|
|
1268
|
+
key: `${ke}-${le}`,
|
|
1269
|
+
iso: ke,
|
|
1270
|
+
date: q,
|
|
1271
|
+
day: q.getDate(),
|
|
1272
|
+
inCurrentMonth: q.getMonth() === p.value.getMonth(),
|
|
1273
|
+
isDisabled: Z(q, w.value, C.value),
|
|
1274
|
+
isSelected: x === ke,
|
|
1275
|
+
isToday: ke === D
|
|
1276
|
+
};
|
|
1277
|
+
});
|
|
1278
|
+
}), V = h(() => {
|
|
1279
|
+
const k = ["vf-datepicker", `vf-datepicker_${a.variant}`, l.value ? "vf-datepicker_open" : ""];
|
|
1280
|
+
return a.size !== "normal" && k.push(`vf-datepicker_${a.size}`), a.disabled && k.push("vf-datepicker_disabled"), k.filter(Boolean);
|
|
1281
|
+
}), T = (k) => o("focus", k), H = (k) => o("blur", k), L = () => {
|
|
1282
|
+
a.disabled || a.readonly || (l.value = !0, c.value = "bottom", n.value = "bottom");
|
|
1283
|
+
}, y = () => {
|
|
1284
|
+
l.value = !1, c.value = "bottom", n.value = "bottom";
|
|
1285
|
+
}, b = () => {
|
|
1286
|
+
if (l.value) {
|
|
1287
|
+
y();
|
|
1288
|
+
return;
|
|
1289
|
+
}
|
|
1290
|
+
L();
|
|
1291
|
+
}, $ = () => {
|
|
1292
|
+
p.value = re(p.value, -1);
|
|
1293
|
+
}, A = () => {
|
|
1294
|
+
p.value = re(p.value, 1);
|
|
1295
|
+
}, G = (k) => {
|
|
1296
|
+
if (a.readonly || Z(k, w.value, C.value))
|
|
1297
|
+
return;
|
|
1298
|
+
const x = I(k);
|
|
1299
|
+
o("update:modelValue", x), o("change", x), y();
|
|
1300
|
+
}, j = (k) => {
|
|
1301
|
+
var D;
|
|
1302
|
+
if (!l.value || !u.value)
|
|
1303
|
+
return;
|
|
1304
|
+
const x = k.target;
|
|
1305
|
+
u.value.contains(x) || (D = d.value) != null && D.contains(x) || y();
|
|
1306
|
+
}, Q = () => {
|
|
1307
|
+
if (!i.value || !d.value)
|
|
1308
|
+
return;
|
|
1309
|
+
const k = i.value, x = d.value, D = async () => {
|
|
1310
|
+
const {
|
|
1311
|
+
x: ke,
|
|
1312
|
+
y: ot,
|
|
1313
|
+
placement: at
|
|
1314
|
+
} = await We(k, x, {
|
|
1315
|
+
placement: c.value,
|
|
1316
|
+
strategy: "fixed",
|
|
1317
|
+
middleware: [De(2), Re({ placements: ["bottom", "top"] })]
|
|
1318
|
+
});
|
|
1319
|
+
n.value = at ?? c.value, x.style.left = `${ke}px`, x.style.top = `${ot}px`;
|
|
1320
|
+
}, U = async () => {
|
|
1321
|
+
await D();
|
|
1322
|
+
}, le = Pe(k, () => {
|
|
1323
|
+
U();
|
|
1324
|
+
}), q = () => {
|
|
1325
|
+
U();
|
|
1326
|
+
};
|
|
1327
|
+
document.addEventListener("scroll", q, !0), window.addEventListener("resize", q, !1), f = {
|
|
1328
|
+
update: U,
|
|
1329
|
+
destroy: () => {
|
|
1330
|
+
le(), document.removeEventListener("scroll", q, !0), window.removeEventListener("resize", q, !1);
|
|
1331
|
+
}
|
|
1332
|
+
}, f.update();
|
|
1333
|
+
};
|
|
1334
|
+
oe(
|
|
1335
|
+
() => a.modelValue,
|
|
1336
|
+
(k) => {
|
|
1337
|
+
const x = N(k);
|
|
1338
|
+
x && (p.value = X(x));
|
|
1339
|
+
},
|
|
1340
|
+
{ immediate: !0 }
|
|
1341
|
+
), oe(
|
|
1342
|
+
() => [a.min, a.max],
|
|
1343
|
+
() => {
|
|
1344
|
+
f == null || f.update();
|
|
1345
|
+
}
|
|
1346
|
+
), oe(l, async (k) => {
|
|
1347
|
+
if (!k) {
|
|
1348
|
+
f && (f.destroy(), f = null);
|
|
1349
|
+
return;
|
|
1350
|
+
}
|
|
1351
|
+
await ze(), f || Q(), f == null || f.update();
|
|
1352
|
+
}), Le(() => {
|
|
1353
|
+
document.addEventListener("click", j);
|
|
1354
|
+
}), we(() => {
|
|
1355
|
+
document.removeEventListener("click", j), f == null || f.destroy(), f = null;
|
|
1356
|
+
});
|
|
1357
|
+
function N(k) {
|
|
1358
|
+
if (!k)
|
|
1359
|
+
return null;
|
|
1360
|
+
const x = k.match(/^(\d{4})-(\d{2})-(\d{2})$/);
|
|
1361
|
+
if (!x)
|
|
1362
|
+
return null;
|
|
1363
|
+
const D = Number(x[1]), U = Number(x[2]) - 1, le = Number(x[3]), q = new Date(D, U, le);
|
|
1364
|
+
return q.getFullYear() !== D || q.getMonth() !== U || q.getDate() !== le ? null : te(q);
|
|
1365
|
+
}
|
|
1366
|
+
function te(k) {
|
|
1367
|
+
return new Date(k.getFullYear(), k.getMonth(), k.getDate());
|
|
1368
|
+
}
|
|
1369
|
+
function X(k) {
|
|
1370
|
+
return new Date(k.getFullYear(), k.getMonth(), 1);
|
|
1371
|
+
}
|
|
1372
|
+
function re(k, x) {
|
|
1373
|
+
return new Date(k.getFullYear(), k.getMonth() + x, 1);
|
|
1374
|
+
}
|
|
1375
|
+
function g(k, x) {
|
|
1376
|
+
return new Date(k.getFullYear(), k.getMonth(), k.getDate() + x);
|
|
1377
|
+
}
|
|
1378
|
+
function R(k, x) {
|
|
1379
|
+
const D = X(k), le = (D.getDay() - x + 7) % 7;
|
|
1380
|
+
return g(D, -le);
|
|
1381
|
+
}
|
|
1382
|
+
function I(k) {
|
|
1383
|
+
const x = k.getFullYear(), D = `${k.getMonth() + 1}`.padStart(2, "0"), U = `${k.getDate()}`.padStart(2, "0");
|
|
1384
|
+
return `${x}-${D}-${U}`;
|
|
1385
|
+
}
|
|
1386
|
+
function Z(k, x, D) {
|
|
1387
|
+
const U = te(k).getTime();
|
|
1388
|
+
return !!(x && U < x.getTime() || D && U > D.getTime());
|
|
1389
|
+
}
|
|
1390
|
+
return (k, x) => (m(), _("div", {
|
|
1391
|
+
ref_key: "root",
|
|
1392
|
+
ref: u,
|
|
1393
|
+
class: P(V.value)
|
|
1394
|
+
}, [
|
|
1395
|
+
B("button", {
|
|
1396
|
+
ref_key: "control",
|
|
1397
|
+
ref: i,
|
|
1398
|
+
class: "vf-datepicker__control",
|
|
1399
|
+
type: "button",
|
|
1400
|
+
disabled: k.disabled,
|
|
1401
|
+
"aria-expanded": l.value,
|
|
1402
|
+
"aria-controls": s,
|
|
1403
|
+
"aria-haspopup": "dialog",
|
|
1404
|
+
onClick: b,
|
|
1405
|
+
onKeydown: [
|
|
1406
|
+
ee(J(L, ["prevent"]), ["down"]),
|
|
1407
|
+
ee(J(b, ["prevent"]), ["enter"]),
|
|
1408
|
+
ee(J(y, ["prevent"]), ["esc"])
|
|
1409
|
+
],
|
|
1410
|
+
onFocus: T,
|
|
1411
|
+
onBlur: H
|
|
1412
|
+
}, [
|
|
1413
|
+
B("span", {
|
|
1414
|
+
class: P(["vf-datepicker__label", { "vf-datepicker__label_placeholder": !v.value }])
|
|
1415
|
+
}, K(z.value || k.placeholder), 3),
|
|
1416
|
+
x[0] || (x[0] = B("span", {
|
|
1417
|
+
class: "vf-datepicker__chevron",
|
|
1418
|
+
"aria-hidden": "true"
|
|
1419
|
+
}, "▾", -1))
|
|
1420
|
+
], 40, ao),
|
|
1421
|
+
(m(), ae($e, { to: "body" }, [
|
|
1422
|
+
he(B("div", {
|
|
1423
|
+
id: s,
|
|
1424
|
+
ref_key: "panel",
|
|
1425
|
+
ref: d,
|
|
1426
|
+
class: "vf-datepicker__panel",
|
|
1427
|
+
role: "dialog",
|
|
1428
|
+
"data-placement": n.value,
|
|
1429
|
+
onKeydown: ee(J(y, ["prevent"]), ["esc"])
|
|
1430
|
+
}, [
|
|
1431
|
+
B("div", lo, [
|
|
1432
|
+
B("button", {
|
|
1433
|
+
class: "vf-datepicker__nav",
|
|
1434
|
+
type: "button",
|
|
1435
|
+
"aria-label": "Previous month",
|
|
1436
|
+
onClick: $
|
|
1437
|
+
}, " ‹ "),
|
|
1438
|
+
B("span", no, K(E.value), 1),
|
|
1439
|
+
B("button", {
|
|
1440
|
+
class: "vf-datepicker__nav",
|
|
1441
|
+
type: "button",
|
|
1442
|
+
"aria-label": "Next month",
|
|
1443
|
+
onClick: A
|
|
1444
|
+
}, " › ")
|
|
1445
|
+
]),
|
|
1446
|
+
B("div", so, [
|
|
1447
|
+
(m(!0), _(pe, null, Be(S.value, (D) => (m(), _("span", {
|
|
1448
|
+
key: D,
|
|
1449
|
+
class: "vf-datepicker__weekday"
|
|
1450
|
+
}, K(D), 1))), 128))
|
|
1451
|
+
]),
|
|
1452
|
+
B("div", io, [
|
|
1453
|
+
(m(!0), _(pe, null, Be(W.value, (D) => (m(), _("button", {
|
|
1454
|
+
key: D.key,
|
|
1455
|
+
class: P(["vf-datepicker__day", {
|
|
1456
|
+
"is-outside": !D.inCurrentMonth,
|
|
1457
|
+
"is-selected": D.isSelected,
|
|
1458
|
+
"is-today": D.isToday
|
|
1459
|
+
}]),
|
|
1460
|
+
type: "button",
|
|
1461
|
+
disabled: D.isDisabled,
|
|
1462
|
+
"data-date": D.iso,
|
|
1463
|
+
onClick: (U) => G(D.date)
|
|
1464
|
+
}, K(D.day), 11, co))), 128))
|
|
1465
|
+
])
|
|
1466
|
+
], 40, ro), [
|
|
1467
|
+
[ye, l.value]
|
|
1468
|
+
])
|
|
1469
|
+
]))
|
|
1470
|
+
], 2));
|
|
1471
|
+
}
|
|
1472
|
+
}), uo = ["checked", "disabled"], vo = {
|
|
999
1473
|
key: 0,
|
|
1000
1474
|
class: "vf-checkbox__label"
|
|
1001
|
-
},
|
|
1475
|
+
}, Ca = /* @__PURE__ */ Y({
|
|
1002
1476
|
__name: "checkbox",
|
|
1003
1477
|
props: {
|
|
1004
1478
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -1009,31 +1483,31 @@ const kt = (t, e) => t.strategy ? t.strategy : Ct(e) ? "fixed" : "absolute", ee
|
|
|
1009
1483
|
emits: ["update:modelValue", "change"],
|
|
1010
1484
|
setup(t, { emit: e }) {
|
|
1011
1485
|
const r = e, o = t, a = h(() => {
|
|
1012
|
-
const
|
|
1013
|
-
return o.disabled &&
|
|
1014
|
-
}),
|
|
1015
|
-
const d =
|
|
1016
|
-
r("update:modelValue", d.checked), r("change",
|
|
1486
|
+
const i = ["vf-checkbox", `vf-checkbox_${o.variant}`];
|
|
1487
|
+
return o.disabled && i.push("vf-checkbox_disabled"), i;
|
|
1488
|
+
}), u = (i) => {
|
|
1489
|
+
const d = i.target;
|
|
1490
|
+
r("update:modelValue", d.checked), r("change", i);
|
|
1017
1491
|
};
|
|
1018
|
-
return (
|
|
1019
|
-
class:
|
|
1492
|
+
return (i, d) => (m(), _("label", {
|
|
1493
|
+
class: P(a.value)
|
|
1020
1494
|
}, [
|
|
1021
|
-
|
|
1495
|
+
B("input", {
|
|
1022
1496
|
class: "vf-checkbox__control",
|
|
1023
1497
|
type: "checkbox",
|
|
1024
|
-
checked:
|
|
1025
|
-
disabled:
|
|
1026
|
-
onChange:
|
|
1027
|
-
}, null, 40,
|
|
1028
|
-
d[0] || (d[0] =
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1498
|
+
checked: i.modelValue,
|
|
1499
|
+
disabled: i.disabled,
|
|
1500
|
+
onChange: u
|
|
1501
|
+
}, null, 40, uo),
|
|
1502
|
+
d[0] || (d[0] = B("span", { class: "vf-checkbox__box" }, null, -1)),
|
|
1503
|
+
i.label || i.$slots.default ? (m(), _("span", vo, [
|
|
1504
|
+
F(i.$slots, "default", {}, () => [
|
|
1505
|
+
se(K(i.label), 1)
|
|
1032
1506
|
])
|
|
1033
|
-
])) :
|
|
1507
|
+
])) : O("", !0)
|
|
1034
1508
|
], 2));
|
|
1035
1509
|
}
|
|
1036
|
-
}),
|
|
1510
|
+
}), Qe = Symbol("VueForgeRadioGroup"), fo = ["aria-disabled", "aria-label", "aria-labelledby"], wa = /* @__PURE__ */ Y({
|
|
1037
1511
|
__name: "radio-group",
|
|
1038
1512
|
props: {
|
|
1039
1513
|
modelValue: { type: [String, Number, Boolean, null], default: void 0 },
|
|
@@ -1049,29 +1523,29 @@ const kt = (t, e) => t.strategy ? t.strategy : Ct(e) ? "fixed" : "absolute", ee
|
|
|
1049
1523
|
const r = e, o = t, a = h(() => {
|
|
1050
1524
|
const d = ["vf-radio-group"];
|
|
1051
1525
|
return o.direction === "horizontal" && d.push("vf-radio-group_horizontal"), d;
|
|
1052
|
-
}),
|
|
1526
|
+
}), u = (d, l) => {
|
|
1053
1527
|
r("update:modelValue", d), r("change", d, l);
|
|
1054
|
-
},
|
|
1528
|
+
}, i = {
|
|
1055
1529
|
name: h(() => o.name),
|
|
1056
1530
|
modelValue: h(() => o.modelValue),
|
|
1057
1531
|
disabled: h(() => o.disabled),
|
|
1058
1532
|
variant: h(() => o.variant),
|
|
1059
|
-
onChange:
|
|
1533
|
+
onChange: u
|
|
1060
1534
|
};
|
|
1061
|
-
return
|
|
1062
|
-
class:
|
|
1535
|
+
return Xe(Qe, i), (d, l) => (m(), _("div", {
|
|
1536
|
+
class: P(a.value),
|
|
1063
1537
|
role: "radiogroup",
|
|
1064
1538
|
"aria-disabled": d.disabled || void 0,
|
|
1065
1539
|
"aria-label": d.ariaLabel || void 0,
|
|
1066
1540
|
"aria-labelledby": d.ariaLabelledby || void 0
|
|
1067
1541
|
}, [
|
|
1068
|
-
|
|
1069
|
-
], 10,
|
|
1542
|
+
F(d.$slots, "default")
|
|
1543
|
+
], 10, fo));
|
|
1070
1544
|
}
|
|
1071
|
-
}),
|
|
1545
|
+
}), po = ["name", "value", "checked", "disabled"], bo = {
|
|
1072
1546
|
key: 0,
|
|
1073
1547
|
class: "vf-radio__label"
|
|
1074
|
-
},
|
|
1548
|
+
}, $a = /* @__PURE__ */ Y({
|
|
1075
1549
|
__name: "radio-button",
|
|
1076
1550
|
props: {
|
|
1077
1551
|
modelValue: { type: [String, Number, Boolean, null], default: void 0 },
|
|
@@ -1083,33 +1557,33 @@ const kt = (t, e) => t.strategy ? t.strategy : Ct(e) ? "fixed" : "absolute", ee
|
|
|
1083
1557
|
},
|
|
1084
1558
|
emits: ["update:modelValue", "change"],
|
|
1085
1559
|
setup(t, { emit: e }) {
|
|
1086
|
-
const r = e, o = t, a =
|
|
1087
|
-
const
|
|
1088
|
-
return l.value &&
|
|
1089
|
-
}),
|
|
1090
|
-
l.value || (a ? a.onChange(o.value,
|
|
1560
|
+
const r = e, o = t, a = Oe(Qe, null), u = h(() => a ? a.modelValue.value : o.modelValue), i = h(() => a ? a.name.value : o.name), d = h(() => a ? a.variant.value : o.variant), l = h(() => (a ? a.disabled.value : !1) || o.disabled), c = h(() => u.value === o.value), n = h(() => {
|
|
1561
|
+
const p = ["vf-radio", `vf-radio_${d.value}`];
|
|
1562
|
+
return l.value && p.push("vf-radio_disabled"), p;
|
|
1563
|
+
}), s = (p) => {
|
|
1564
|
+
l.value || (a ? a.onChange(o.value, p) : r("update:modelValue", o.value), r("change", o.value, p));
|
|
1091
1565
|
};
|
|
1092
|
-
return (
|
|
1093
|
-
class:
|
|
1566
|
+
return (p, f) => (m(), _("label", {
|
|
1567
|
+
class: P(n.value)
|
|
1094
1568
|
}, [
|
|
1095
|
-
|
|
1569
|
+
B("input", {
|
|
1096
1570
|
class: "vf-radio__control",
|
|
1097
1571
|
type: "radio",
|
|
1098
|
-
name:
|
|
1099
|
-
value:
|
|
1100
|
-
checked:
|
|
1572
|
+
name: i.value,
|
|
1573
|
+
value: p.value,
|
|
1574
|
+
checked: c.value,
|
|
1101
1575
|
disabled: l.value,
|
|
1102
|
-
onChange:
|
|
1103
|
-
}, null, 40,
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1576
|
+
onChange: s
|
|
1577
|
+
}, null, 40, po),
|
|
1578
|
+
f[0] || (f[0] = B("span", { class: "vf-radio__circle" }, null, -1)),
|
|
1579
|
+
p.label || p.$slots.default ? (m(), _("span", bo, [
|
|
1580
|
+
F(p.$slots, "default", {}, () => [
|
|
1581
|
+
se(K(p.label), 1)
|
|
1108
1582
|
])
|
|
1109
|
-
])) :
|
|
1583
|
+
])) : O("", !0)
|
|
1110
1584
|
], 2));
|
|
1111
1585
|
}
|
|
1112
|
-
}),
|
|
1586
|
+
}), Me = Symbol("VueForgeTabs"), mo = ["aria-orientation", "aria-label", "aria-labelledby"], go = { class: "vf-tabs__panels" }, xa = /* @__PURE__ */ Y({
|
|
1113
1587
|
__name: "tabs",
|
|
1114
1588
|
props: {
|
|
1115
1589
|
modelValue: { default: void 0 },
|
|
@@ -1121,37 +1595,37 @@ const kt = (t, e) => t.strategy ? t.strategy : Ct(e) ? "fixed" : "absolute", ee
|
|
|
1121
1595
|
emits: ["update:modelValue", "change"],
|
|
1122
1596
|
setup(t, { emit: e }) {
|
|
1123
1597
|
let r = 0;
|
|
1124
|
-
const o = e, a = t,
|
|
1598
|
+
const o = e, a = t, u = ++r, i = (v) => String(v).toLowerCase().trim().replace(/\s+/g, "-").replace(/[^a-z0-9_-]/g, ""), d = h(() => {
|
|
1125
1599
|
const v = ["vf-tabs"];
|
|
1126
1600
|
return a.orientation === "vertical" && v.push("vf-tabs_vertical"), a.disabled && v.push("vf-tabs_disabled"), v;
|
|
1127
|
-
}), l =
|
|
1601
|
+
}), l = M(null), c = () => l.value ? Array.from(l.value.querySelectorAll('[role="tab"]:not([disabled])')) : [], n = (v) => {
|
|
1128
1602
|
v && (v.focus(), v.click());
|
|
1129
|
-
},
|
|
1603
|
+
}, s = (v) => {
|
|
1130
1604
|
if (a.disabled)
|
|
1131
1605
|
return;
|
|
1132
|
-
const
|
|
1133
|
-
if (![...
|
|
1606
|
+
const w = a.orientation === "horizontal", C = v.key, z = w ? ["ArrowRight"] : ["ArrowDown"], E = w ? ["ArrowLeft"] : ["ArrowUp"];
|
|
1607
|
+
if (![...z, ...E, "Home", "End"].includes(C))
|
|
1134
1608
|
return;
|
|
1135
|
-
const
|
|
1136
|
-
if (
|
|
1609
|
+
const S = c();
|
|
1610
|
+
if (!S.length)
|
|
1137
1611
|
return;
|
|
1138
|
-
const
|
|
1139
|
-
let H =
|
|
1140
|
-
|
|
1141
|
-
},
|
|
1142
|
-
o("update:modelValue", v), o("change", v,
|
|
1143
|
-
},
|
|
1612
|
+
const W = S.findIndex((L) => L.getAttribute("aria-selected") === "true"), V = S.findIndex((L) => L === document.activeElement), T = V >= 0 ? V : Math.max(W, 0);
|
|
1613
|
+
let H = T;
|
|
1614
|
+
z.includes(C) ? H = (T + 1) % S.length : E.includes(C) ? H = (T - 1 + S.length) % S.length : C === "Home" ? H = 0 : C === "End" && (H = S.length - 1), v.preventDefault(), n(S[H]);
|
|
1615
|
+
}, p = (v, w) => {
|
|
1616
|
+
o("update:modelValue", v), o("change", v, w);
|
|
1617
|
+
}, f = {
|
|
1144
1618
|
activeValue: h(() => a.modelValue),
|
|
1145
1619
|
disabled: h(() => a.disabled),
|
|
1146
1620
|
orientation: h(() => a.orientation),
|
|
1147
|
-
onChange:
|
|
1148
|
-
getTabId: (v) => `vf-tab-${
|
|
1149
|
-
getPanelId: (v) => `vf-tabpanel-${
|
|
1621
|
+
onChange: p,
|
|
1622
|
+
getTabId: (v) => `vf-tab-${u}-${i(v)}`,
|
|
1623
|
+
getPanelId: (v) => `vf-tabpanel-${u}-${i(v)}`
|
|
1150
1624
|
};
|
|
1151
|
-
return
|
|
1152
|
-
class:
|
|
1625
|
+
return Xe(Me, f), (v, w) => (m(), _("div", {
|
|
1626
|
+
class: P(d.value)
|
|
1153
1627
|
}, [
|
|
1154
|
-
|
|
1628
|
+
B("div", {
|
|
1155
1629
|
ref_key: "list",
|
|
1156
1630
|
ref: l,
|
|
1157
1631
|
class: "vf-tabs__list",
|
|
@@ -1159,16 +1633,16 @@ const kt = (t, e) => t.strategy ? t.strategy : Ct(e) ? "fixed" : "absolute", ee
|
|
|
1159
1633
|
"aria-orientation": v.orientation,
|
|
1160
1634
|
"aria-label": v.ariaLabel || void 0,
|
|
1161
1635
|
"aria-labelledby": v.ariaLabelledby || void 0,
|
|
1162
|
-
onKeydown:
|
|
1636
|
+
onKeydown: s
|
|
1163
1637
|
}, [
|
|
1164
|
-
|
|
1165
|
-
], 40,
|
|
1166
|
-
|
|
1167
|
-
|
|
1638
|
+
F(v.$slots, "tabs")
|
|
1639
|
+
], 40, mo),
|
|
1640
|
+
B("div", go, [
|
|
1641
|
+
F(v.$slots, "panels")
|
|
1168
1642
|
])
|
|
1169
1643
|
], 2));
|
|
1170
1644
|
}
|
|
1171
|
-
}),
|
|
1645
|
+
}), ho = ["id", "aria-selected", "aria-controls", "disabled", "tabindex"], Ba = /* @__PURE__ */ Y({
|
|
1172
1646
|
__name: "tab",
|
|
1173
1647
|
props: {
|
|
1174
1648
|
value: {},
|
|
@@ -1177,51 +1651,51 @@ const kt = (t, e) => t.strategy ? t.strategy : Ct(e) ? "fixed" : "absolute", ee
|
|
|
1177
1651
|
},
|
|
1178
1652
|
emits: ["change"],
|
|
1179
1653
|
setup(t, { emit: e }) {
|
|
1180
|
-
const r = e, o = t, a =
|
|
1181
|
-
!a ||
|
|
1654
|
+
const r = e, o = t, a = Oe(Me, null), u = h(() => (a == null ? void 0 : a.activeValue.value) === o.value), i = h(() => ((a == null ? void 0 : a.disabled.value) ?? !1) || o.disabled), d = h(() => a ? a.getTabId(o.value) : void 0), l = h(() => a ? a.getPanelId(o.value) : void 0), c = h(() => i.value ? -1 : u.value ? 0 : -1), n = (s) => {
|
|
1655
|
+
!a || i.value || (a.onChange(o.value, s), r("change", o.value, s));
|
|
1182
1656
|
};
|
|
1183
|
-
return (
|
|
1657
|
+
return (s, p) => (m(), _("button", {
|
|
1184
1658
|
id: d.value,
|
|
1185
|
-
class:
|
|
1659
|
+
class: P(["vf-tab", { "vf-tab_active": u.value, "vf-tab_disabled": i.value }]),
|
|
1186
1660
|
type: "button",
|
|
1187
1661
|
role: "tab",
|
|
1188
|
-
"aria-selected":
|
|
1662
|
+
"aria-selected": u.value,
|
|
1189
1663
|
"aria-controls": l.value,
|
|
1190
|
-
disabled:
|
|
1191
|
-
tabindex:
|
|
1192
|
-
onClick:
|
|
1664
|
+
disabled: i.value,
|
|
1665
|
+
tabindex: c.value,
|
|
1666
|
+
onClick: n
|
|
1193
1667
|
}, [
|
|
1194
|
-
|
|
1195
|
-
|
|
1668
|
+
F(s.$slots, "default", {}, () => [
|
|
1669
|
+
se(K(s.label), 1)
|
|
1196
1670
|
])
|
|
1197
|
-
], 10,
|
|
1671
|
+
], 10, ho));
|
|
1198
1672
|
}
|
|
1199
|
-
}),
|
|
1673
|
+
}), yo = ["id", "aria-labelledby"], za = /* @__PURE__ */ Y({
|
|
1200
1674
|
__name: "tab-panel",
|
|
1201
1675
|
props: {
|
|
1202
1676
|
value: {}
|
|
1203
1677
|
},
|
|
1204
1678
|
setup(t) {
|
|
1205
|
-
const e = t, r =
|
|
1206
|
-
return (
|
|
1207
|
-
id:
|
|
1679
|
+
const e = t, r = Oe(Me, null), o = h(() => (r == null ? void 0 : r.activeValue.value) === e.value), a = h(() => r ? r.getTabId(e.value) : void 0), u = h(() => r ? r.getPanelId(e.value) : void 0);
|
|
1680
|
+
return (i, d) => he((m(), _("div", {
|
|
1681
|
+
id: u.value,
|
|
1208
1682
|
class: "vf-tab-panel",
|
|
1209
1683
|
role: "tabpanel",
|
|
1210
1684
|
tabindex: "0",
|
|
1211
1685
|
"aria-labelledby": a.value
|
|
1212
1686
|
}, [
|
|
1213
|
-
|
|
1214
|
-
], 8,
|
|
1215
|
-
[
|
|
1687
|
+
F(i.$slots, "default")
|
|
1688
|
+
], 8, yo)), [
|
|
1689
|
+
[ye, o.value]
|
|
1216
1690
|
]);
|
|
1217
1691
|
}
|
|
1218
|
-
}),
|
|
1692
|
+
}), ko = ["data-severity"], _o = { class: "vf-toast__body" }, Co = {
|
|
1219
1693
|
key: 0,
|
|
1220
1694
|
class: "vf-toast__title"
|
|
1221
|
-
},
|
|
1695
|
+
}, wo = {
|
|
1222
1696
|
key: 1,
|
|
1223
1697
|
class: "vf-toast__message"
|
|
1224
|
-
},
|
|
1698
|
+
}, Fa = /* @__PURE__ */ Y({
|
|
1225
1699
|
__name: "toast",
|
|
1226
1700
|
props: {
|
|
1227
1701
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -1235,72 +1709,72 @@ const kt = (t, e) => t.strategy ? t.strategy : Ct(e) ? "fixed" : "absolute", ee
|
|
|
1235
1709
|
setup(t, { emit: e }) {
|
|
1236
1710
|
const r = e, o = t;
|
|
1237
1711
|
let a = null;
|
|
1238
|
-
const
|
|
1712
|
+
const u = () => {
|
|
1239
1713
|
a !== null && (clearTimeout(a), a = null);
|
|
1240
|
-
},
|
|
1241
|
-
|
|
1714
|
+
}, i = () => {
|
|
1715
|
+
u(), !(!o.modelValue || o.duration <= 0) && (a = window.setTimeout(() => {
|
|
1242
1716
|
r("update:modelValue", !1), r("close");
|
|
1243
1717
|
}, o.duration));
|
|
1244
1718
|
}, d = () => {
|
|
1245
|
-
|
|
1719
|
+
u(), r("update:modelValue", !1), r("close");
|
|
1246
1720
|
};
|
|
1247
|
-
return
|
|
1721
|
+
return oe(
|
|
1248
1722
|
() => o.modelValue,
|
|
1249
1723
|
(l) => {
|
|
1250
|
-
l && r("open"),
|
|
1724
|
+
l && r("open"), i();
|
|
1251
1725
|
},
|
|
1252
1726
|
{ immediate: !0 }
|
|
1253
|
-
),
|
|
1254
|
-
|
|
1255
|
-
}), (l,
|
|
1727
|
+
), we(() => {
|
|
1728
|
+
u();
|
|
1729
|
+
}), (l, c) => he((m(), _("div", {
|
|
1256
1730
|
class: "vf-toast",
|
|
1257
1731
|
role: "status",
|
|
1258
1732
|
"aria-live": "polite",
|
|
1259
1733
|
"data-severity": l.severity
|
|
1260
1734
|
}, [
|
|
1261
|
-
|
|
1262
|
-
l.title ? (
|
|
1263
|
-
l.message || l.$slots.default ? (
|
|
1264
|
-
|
|
1265
|
-
|
|
1735
|
+
B("div", _o, [
|
|
1736
|
+
l.title ? (m(), _("div", Co, K(l.title), 1)) : O("", !0),
|
|
1737
|
+
l.message || l.$slots.default ? (m(), _("div", wo, [
|
|
1738
|
+
F(l.$slots, "default", {}, () => [
|
|
1739
|
+
se(K(l.message), 1)
|
|
1266
1740
|
])
|
|
1267
|
-
])) :
|
|
1741
|
+
])) : O("", !0)
|
|
1268
1742
|
]),
|
|
1269
|
-
l.closable ? (
|
|
1743
|
+
l.closable ? (m(), _("button", {
|
|
1270
1744
|
key: 0,
|
|
1271
1745
|
class: "vf-toast__close",
|
|
1272
1746
|
type: "button",
|
|
1273
1747
|
onClick: d
|
|
1274
1748
|
}, [
|
|
1275
|
-
|
|
1276
|
-
|
|
1749
|
+
F(l.$slots, "close", {}, () => [
|
|
1750
|
+
c[0] || (c[0] = se("×"))
|
|
1277
1751
|
])
|
|
1278
|
-
])) :
|
|
1279
|
-
], 8,
|
|
1280
|
-
[
|
|
1752
|
+
])) : O("", !0)
|
|
1753
|
+
], 8, ko)), [
|
|
1754
|
+
[ye, l.modelValue]
|
|
1281
1755
|
]);
|
|
1282
1756
|
}
|
|
1283
|
-
}),
|
|
1757
|
+
}), Sa = /* @__PURE__ */ Y({
|
|
1284
1758
|
__name: "toast-container",
|
|
1285
1759
|
props: {
|
|
1286
1760
|
position: { default: "top-right" }
|
|
1287
1761
|
},
|
|
1288
1762
|
setup(t) {
|
|
1289
1763
|
const e = t, r = h(() => `vf-toast-container_${e.position}`);
|
|
1290
|
-
return (o, a) => (
|
|
1291
|
-
|
|
1292
|
-
class:
|
|
1764
|
+
return (o, a) => (m(), ae($e, { to: "body" }, [
|
|
1765
|
+
B("div", {
|
|
1766
|
+
class: P(["vf-toast-container", r.value]),
|
|
1293
1767
|
role: "region",
|
|
1294
1768
|
"aria-live": "polite"
|
|
1295
1769
|
}, [
|
|
1296
|
-
|
|
1770
|
+
F(o.$slots, "default")
|
|
1297
1771
|
], 2)
|
|
1298
1772
|
]));
|
|
1299
1773
|
}
|
|
1300
|
-
}),
|
|
1774
|
+
}), $o = ["checked", "disabled"], xo = {
|
|
1301
1775
|
key: 0,
|
|
1302
1776
|
class: "vf-switch__label"
|
|
1303
|
-
},
|
|
1777
|
+
}, Va = /* @__PURE__ */ Y({
|
|
1304
1778
|
__name: "switch",
|
|
1305
1779
|
props: {
|
|
1306
1780
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -1310,112 +1784,112 @@ const kt = (t, e) => t.strategy ? t.strategy : Ct(e) ? "fixed" : "absolute", ee
|
|
|
1310
1784
|
emits: ["update:modelValue", "change"],
|
|
1311
1785
|
setup(t, { emit: e }) {
|
|
1312
1786
|
const r = e, o = t, a = h(() => {
|
|
1313
|
-
const
|
|
1314
|
-
return o.disabled &&
|
|
1315
|
-
}),
|
|
1316
|
-
const d =
|
|
1317
|
-
r("update:modelValue", d.checked), r("change",
|
|
1787
|
+
const i = ["vf-switch"];
|
|
1788
|
+
return o.disabled && i.push("vf-switch_disabled"), i;
|
|
1789
|
+
}), u = (i) => {
|
|
1790
|
+
const d = i.target;
|
|
1791
|
+
r("update:modelValue", d.checked), r("change", i);
|
|
1318
1792
|
};
|
|
1319
|
-
return (
|
|
1320
|
-
class:
|
|
1793
|
+
return (i, d) => (m(), _("label", {
|
|
1794
|
+
class: P(a.value)
|
|
1321
1795
|
}, [
|
|
1322
|
-
|
|
1796
|
+
B("input", {
|
|
1323
1797
|
class: "vf-switch__control",
|
|
1324
1798
|
type: "checkbox",
|
|
1325
|
-
checked:
|
|
1326
|
-
disabled:
|
|
1327
|
-
onChange:
|
|
1328
|
-
}, null, 40,
|
|
1329
|
-
d[0] || (d[0] =
|
|
1330
|
-
|
|
1799
|
+
checked: i.modelValue,
|
|
1800
|
+
disabled: i.disabled,
|
|
1801
|
+
onChange: u
|
|
1802
|
+
}, null, 40, $o),
|
|
1803
|
+
d[0] || (d[0] = B("span", { class: "vf-switch__track" }, [
|
|
1804
|
+
B("span", { class: "vf-switch__thumb" })
|
|
1331
1805
|
], -1)),
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1806
|
+
i.label || i.$slots.default ? (m(), _("span", xo, [
|
|
1807
|
+
F(i.$slots, "default", {}, () => [
|
|
1808
|
+
se(K(i.label), 1)
|
|
1335
1809
|
])
|
|
1336
|
-
])) :
|
|
1810
|
+
])) : O("", !0)
|
|
1337
1811
|
], 2));
|
|
1338
1812
|
}
|
|
1339
|
-
}),
|
|
1813
|
+
}), Bo = { class: "vf-popover" }, zo = ["aria-expanded", "onKeydown"], Ta = /* @__PURE__ */ Y({
|
|
1340
1814
|
__name: "popover",
|
|
1341
1815
|
emits: ["click", "onClick"],
|
|
1342
1816
|
setup(t, { expose: e, emit: r }) {
|
|
1343
|
-
const o = r, a =
|
|
1344
|
-
let
|
|
1345
|
-
const
|
|
1346
|
-
|
|
1817
|
+
const o = r, a = rt({ visible: !1 });
|
|
1818
|
+
let u = 0;
|
|
1819
|
+
const i = `vf-popover-panel-${++u}`, d = () => a.visible = !0, l = () => a.visible = !1, c = () => a.visible = !a.visible, n = () => {
|
|
1820
|
+
c(), o("click"), o("onClick");
|
|
1347
1821
|
};
|
|
1348
|
-
return e({ show: d, hide: l, toggle:
|
|
1349
|
-
|
|
1822
|
+
return e({ show: d, hide: l, toggle: c }), (s, p) => (m(), _("div", Bo, [
|
|
1823
|
+
B("div", {
|
|
1350
1824
|
class: "vf-popover__button",
|
|
1351
1825
|
role: "button",
|
|
1352
1826
|
tabindex: "0",
|
|
1353
1827
|
"aria-haspopup": "dialog",
|
|
1354
1828
|
"aria-expanded": a.visible,
|
|
1355
|
-
"aria-controls":
|
|
1356
|
-
onClick:
|
|
1829
|
+
"aria-controls": i,
|
|
1830
|
+
onClick: n,
|
|
1357
1831
|
onKeydown: [
|
|
1358
|
-
|
|
1359
|
-
|
|
1832
|
+
ee(J(n, ["prevent"]), ["enter"]),
|
|
1833
|
+
ee(J(n, ["prevent"]), ["space"])
|
|
1360
1834
|
]
|
|
1361
1835
|
}, [
|
|
1362
|
-
|
|
1363
|
-
], 40,
|
|
1364
|
-
|
|
1365
|
-
id:
|
|
1836
|
+
F(s.$slots, "button")
|
|
1837
|
+
], 40, zo),
|
|
1838
|
+
he(je(ht, {
|
|
1839
|
+
id: i,
|
|
1366
1840
|
class: "vf-popover__wrapper"
|
|
1367
|
-
},
|
|
1368
|
-
default:
|
|
1369
|
-
|
|
1841
|
+
}, lt({
|
|
1842
|
+
default: me(() => [
|
|
1843
|
+
p[0] || (p[0] = B("div", { class: "vf-popover__arrow" }, null, -1))
|
|
1370
1844
|
]),
|
|
1371
1845
|
_: 2
|
|
1372
1846
|
}, [
|
|
1373
|
-
|
|
1847
|
+
s.$slots.default ? {
|
|
1374
1848
|
name: "default",
|
|
1375
|
-
fn:
|
|
1376
|
-
|
|
1849
|
+
fn: me(() => [
|
|
1850
|
+
F(s.$slots, "default")
|
|
1377
1851
|
]),
|
|
1378
1852
|
key: "0"
|
|
1379
1853
|
} : void 0,
|
|
1380
|
-
|
|
1854
|
+
s.$slots.header || s.$slots.popoverHeader ? {
|
|
1381
1855
|
name: "header",
|
|
1382
|
-
fn:
|
|
1383
|
-
|
|
1384
|
-
|
|
1856
|
+
fn: me(() => [
|
|
1857
|
+
F(s.$slots, "header"),
|
|
1858
|
+
s.$slots.header ? O("", !0) : F(s.$slots, "popoverHeader", { key: 0 })
|
|
1385
1859
|
]),
|
|
1386
1860
|
key: "1"
|
|
1387
1861
|
} : void 0,
|
|
1388
|
-
|
|
1862
|
+
s.$slots.body || s.$slots.popoverBody ? {
|
|
1389
1863
|
name: "body",
|
|
1390
|
-
fn:
|
|
1391
|
-
|
|
1392
|
-
|
|
1864
|
+
fn: me(() => [
|
|
1865
|
+
F(s.$slots, "body"),
|
|
1866
|
+
s.$slots.body ? O("", !0) : F(s.$slots, "popoverBody", { key: 0 })
|
|
1393
1867
|
]),
|
|
1394
1868
|
key: "2"
|
|
1395
1869
|
} : void 0,
|
|
1396
|
-
|
|
1870
|
+
s.$slots.footer || s.$slots.popoverFooter ? {
|
|
1397
1871
|
name: "footer",
|
|
1398
|
-
fn:
|
|
1399
|
-
|
|
1400
|
-
|
|
1872
|
+
fn: me(() => [
|
|
1873
|
+
F(s.$slots, "footer"),
|
|
1874
|
+
s.$slots.footer ? O("", !0) : F(s.$slots, "popoverFooter", { key: 0 })
|
|
1401
1875
|
]),
|
|
1402
1876
|
key: "3"
|
|
1403
1877
|
} : void 0
|
|
1404
1878
|
]), 1536), [
|
|
1405
|
-
[
|
|
1879
|
+
[ye, a.visible]
|
|
1406
1880
|
])
|
|
1407
1881
|
]));
|
|
1408
1882
|
}
|
|
1409
|
-
}),
|
|
1883
|
+
}), Fo = ["aria-labelledby", "aria-describedby"], So = {
|
|
1410
1884
|
key: 0,
|
|
1411
1885
|
class: "vf-modal__header"
|
|
1412
|
-
},
|
|
1886
|
+
}, Vo = {
|
|
1413
1887
|
key: 0,
|
|
1414
1888
|
class: "vf-modal__title"
|
|
1415
|
-
},
|
|
1889
|
+
}, To = {
|
|
1416
1890
|
key: 3,
|
|
1417
1891
|
class: "vf-modal__footer"
|
|
1418
|
-
},
|
|
1892
|
+
}, La = /* @__PURE__ */ Y({
|
|
1419
1893
|
__name: "modal",
|
|
1420
1894
|
props: {
|
|
1421
1895
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -1429,111 +1903,111 @@ const kt = (t, e) => t.strategy ? t.strategy : Ct(e) ? "fixed" : "absolute", ee
|
|
|
1429
1903
|
emits: ["update:modelValue", "open", "close"],
|
|
1430
1904
|
setup(t, { expose: e, emit: r }) {
|
|
1431
1905
|
const o = r, a = t;
|
|
1432
|
-
let
|
|
1433
|
-
const
|
|
1434
|
-
const
|
|
1435
|
-
return a.size !== "md" &&
|
|
1436
|
-
}),
|
|
1906
|
+
let u = 0, i = 0, d = "", l = null;
|
|
1907
|
+
const c = M(null), n = nt(), s = `vf-modal-title-${++u}`, p = `vf-modal-body-${u}`, f = h(() => !!a.title || !!n.header), v = h(() => !!n.body || !!n.default), w = h(() => {
|
|
1908
|
+
const y = ["vf-modal"];
|
|
1909
|
+
return a.size !== "md" && y.push(`vf-modal_${a.size}`), y;
|
|
1910
|
+
}), C = () => o("update:modelValue", !0), z = () => {
|
|
1437
1911
|
o("update:modelValue", !1), o("close");
|
|
1438
|
-
},
|
|
1439
|
-
a.closeOnOverlay &&
|
|
1440
|
-
},
|
|
1441
|
-
!a.modelValue || !a.closeOnEsc ||
|
|
1442
|
-
},
|
|
1912
|
+
}, E = () => {
|
|
1913
|
+
a.closeOnOverlay && z();
|
|
1914
|
+
}, S = (y) => {
|
|
1915
|
+
!a.modelValue || !a.closeOnEsc || y.key === "Escape" && (y.preventDefault(), z());
|
|
1916
|
+
}, W = () => c.value ? Array.from(c.value.querySelectorAll('a[href],button:not([disabled]),textarea:not([disabled]),input:not([disabled]),select:not([disabled]),[tabindex]:not([tabindex="-1"])')).filter((b) => !b.hasAttribute("disabled") && !b.getAttribute("aria-hidden")) : [], V = () => {
|
|
1443
1917
|
var b;
|
|
1444
|
-
const
|
|
1445
|
-
|
|
1446
|
-
},
|
|
1447
|
-
var
|
|
1448
|
-
if (
|
|
1918
|
+
const y = W();
|
|
1919
|
+
y.length ? y[0].focus() : (b = c.value) == null || b.focus();
|
|
1920
|
+
}, T = (y) => {
|
|
1921
|
+
var j;
|
|
1922
|
+
if (y.key !== "Tab")
|
|
1449
1923
|
return;
|
|
1450
|
-
const b =
|
|
1924
|
+
const b = W();
|
|
1451
1925
|
if (!b.length) {
|
|
1452
|
-
|
|
1926
|
+
y.preventDefault(), (j = c.value) == null || j.focus();
|
|
1453
1927
|
return;
|
|
1454
1928
|
}
|
|
1455
|
-
const
|
|
1456
|
-
if (
|
|
1457
|
-
|
|
1929
|
+
const $ = b[0], A = b[b.length - 1], G = document.activeElement;
|
|
1930
|
+
if (y.shiftKey && G === $) {
|
|
1931
|
+
y.preventDefault(), A.focus();
|
|
1458
1932
|
return;
|
|
1459
1933
|
}
|
|
1460
|
-
!
|
|
1934
|
+
!y.shiftKey && G === A && (y.preventDefault(), $.focus());
|
|
1461
1935
|
}, H = () => {
|
|
1462
|
-
!a.lockScroll || typeof document > "u" || (
|
|
1936
|
+
!a.lockScroll || typeof document > "u" || (i === 0 && (d = document.body.style.overflow, document.body.style.overflow = "hidden"), i += 1);
|
|
1463
1937
|
}, L = () => {
|
|
1464
|
-
!a.lockScroll || typeof document > "u" || (
|
|
1938
|
+
!a.lockScroll || typeof document > "u" || (i = Math.max(0, i - 1), i === 0 && (document.body.style.overflow = d));
|
|
1465
1939
|
};
|
|
1466
|
-
return
|
|
1940
|
+
return oe(
|
|
1467
1941
|
() => a.modelValue,
|
|
1468
|
-
async (
|
|
1469
|
-
|
|
1942
|
+
async (y) => {
|
|
1943
|
+
y ? (typeof document < "u" && (l = document.activeElement), H(), o("open"), await ze(), V(), typeof document < "u" && document.addEventListener("keydown", S)) : (L(), typeof document < "u" && (document.removeEventListener("keydown", S), l == null || l.focus()));
|
|
1470
1944
|
},
|
|
1471
1945
|
{ immediate: !0 }
|
|
1472
|
-
),
|
|
1473
|
-
L(), typeof document < "u" && document.removeEventListener("keydown",
|
|
1474
|
-
}), e({ open:
|
|
1475
|
-
|
|
1476
|
-
class:
|
|
1946
|
+
), we(() => {
|
|
1947
|
+
L(), typeof document < "u" && document.removeEventListener("keydown", S);
|
|
1948
|
+
}), e({ open: C, close: z }), (y, b) => (m(), ae($e, { to: "body" }, [
|
|
1949
|
+
he(B("div", {
|
|
1950
|
+
class: P(w.value),
|
|
1477
1951
|
role: "presentation"
|
|
1478
1952
|
}, [
|
|
1479
|
-
|
|
1953
|
+
B("div", {
|
|
1480
1954
|
class: "vf-modal__overlay",
|
|
1481
|
-
onClick:
|
|
1955
|
+
onClick: E
|
|
1482
1956
|
}),
|
|
1483
|
-
|
|
1957
|
+
B("div", {
|
|
1484
1958
|
ref_key: "panel",
|
|
1485
|
-
ref:
|
|
1959
|
+
ref: c,
|
|
1486
1960
|
class: "vf-modal__panel",
|
|
1487
1961
|
role: "dialog",
|
|
1488
1962
|
"aria-modal": "true",
|
|
1489
|
-
"aria-labelledby":
|
|
1490
|
-
"aria-describedby": v.value ?
|
|
1963
|
+
"aria-labelledby": f.value ? s : void 0,
|
|
1964
|
+
"aria-describedby": v.value ? p : void 0,
|
|
1491
1965
|
tabindex: "-1",
|
|
1492
|
-
onKeydown:
|
|
1966
|
+
onKeydown: T
|
|
1493
1967
|
}, [
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
id:
|
|
1968
|
+
f.value ? (m(), _("div", So, [
|
|
1969
|
+
B("div", {
|
|
1970
|
+
id: s,
|
|
1497
1971
|
class: "vf-modal__header-content"
|
|
1498
1972
|
}, [
|
|
1499
|
-
|
|
1500
|
-
|
|
1973
|
+
F(y.$slots, "header", {}, () => [
|
|
1974
|
+
y.title ? (m(), _("h3", Vo, K(y.title), 1)) : O("", !0)
|
|
1501
1975
|
])
|
|
1502
1976
|
])
|
|
1503
|
-
])) :
|
|
1504
|
-
|
|
1977
|
+
])) : O("", !0),
|
|
1978
|
+
y.showClose ? F(y.$slots, "close", {
|
|
1505
1979
|
key: 1,
|
|
1506
|
-
close:
|
|
1980
|
+
close: z
|
|
1507
1981
|
}, () => [
|
|
1508
|
-
|
|
1982
|
+
B("button", {
|
|
1509
1983
|
type: "button",
|
|
1510
1984
|
class: "vf-modal__close",
|
|
1511
1985
|
"aria-label": "Close",
|
|
1512
|
-
onClick:
|
|
1986
|
+
onClick: z
|
|
1513
1987
|
}, "×")
|
|
1514
|
-
]) :
|
|
1515
|
-
|
|
1988
|
+
]) : O("", !0),
|
|
1989
|
+
y.$slots.body || y.$slots.default ? (m(), _("div", {
|
|
1516
1990
|
key: 2,
|
|
1517
|
-
id:
|
|
1991
|
+
id: p,
|
|
1518
1992
|
class: "vf-modal__body"
|
|
1519
1993
|
}, [
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
])) :
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
])) :
|
|
1526
|
-
], 40,
|
|
1994
|
+
F(y.$slots, "body"),
|
|
1995
|
+
y.$slots.body ? O("", !0) : F(y.$slots, "default", { key: 0 })
|
|
1996
|
+
])) : O("", !0),
|
|
1997
|
+
y.$slots.footer ? (m(), _("div", To, [
|
|
1998
|
+
F(y.$slots, "footer")
|
|
1999
|
+
])) : O("", !0)
|
|
2000
|
+
], 40, Fo)
|
|
1527
2001
|
], 2), [
|
|
1528
|
-
[
|
|
2002
|
+
[ye, y.modelValue]
|
|
1529
2003
|
])
|
|
1530
2004
|
]));
|
|
1531
2005
|
}
|
|
1532
|
-
}),
|
|
2006
|
+
}), Lo = ["data-placement"], Ro = { class: "vf-tooltip__content" }, Do = {
|
|
1533
2007
|
key: 0,
|
|
1534
2008
|
class: "vf-tooltip__arrow",
|
|
1535
2009
|
"aria-hidden": "true"
|
|
1536
|
-
},
|
|
2010
|
+
}, Ra = /* @__PURE__ */ Y({
|
|
1537
2011
|
__name: "tooltip",
|
|
1538
2012
|
props: {
|
|
1539
2013
|
text: { default: "" },
|
|
@@ -1544,152 +2018,152 @@ const kt = (t, e) => t.strategy ? t.strategy : Ct(e) ? "fixed" : "absolute", ee
|
|
|
1544
2018
|
setup(t) {
|
|
1545
2019
|
const e = t;
|
|
1546
2020
|
let r = 0;
|
|
1547
|
-
const o =
|
|
2021
|
+
const o = M(null), a = M(null), u = M(!1), i = M("top"), d = `vf-tooltip-${++r}`;
|
|
1548
2022
|
let l = null;
|
|
1549
|
-
const
|
|
1550
|
-
e.disabled || (
|
|
1551
|
-
}, i = () => {
|
|
1552
|
-
c.value = !1;
|
|
2023
|
+
const c = () => {
|
|
2024
|
+
e.disabled || (u.value = !0);
|
|
1553
2025
|
}, n = () => {
|
|
2026
|
+
u.value = !1;
|
|
2027
|
+
}, s = () => {
|
|
1554
2028
|
if (!o.value || !a.value)
|
|
1555
2029
|
return;
|
|
1556
|
-
const
|
|
2030
|
+
const f = o.value, v = a.value, w = async () => {
|
|
1557
2031
|
const {
|
|
1558
|
-
x:
|
|
1559
|
-
y:
|
|
1560
|
-
placement:
|
|
1561
|
-
} = await
|
|
2032
|
+
x: S,
|
|
2033
|
+
y: W,
|
|
2034
|
+
placement: V
|
|
2035
|
+
} = await We(f, v, {
|
|
1562
2036
|
placement: e.placement,
|
|
1563
2037
|
strategy: "fixed",
|
|
1564
|
-
middleware: [
|
|
2038
|
+
middleware: [De(8), Re(), Vt()]
|
|
1565
2039
|
});
|
|
1566
|
-
|
|
1567
|
-
},
|
|
1568
|
-
await
|
|
1569
|
-
},
|
|
1570
|
-
|
|
1571
|
-
}),
|
|
1572
|
-
|
|
2040
|
+
i.value = V ?? e.placement, v.style.left = `${S}px`, v.style.top = `${W}px`;
|
|
2041
|
+
}, C = async () => {
|
|
2042
|
+
await w();
|
|
2043
|
+
}, z = Pe(f, () => {
|
|
2044
|
+
C();
|
|
2045
|
+
}), E = () => {
|
|
2046
|
+
C();
|
|
1573
2047
|
};
|
|
1574
|
-
document.addEventListener("scroll",
|
|
1575
|
-
update:
|
|
2048
|
+
document.addEventListener("scroll", E, !0), window.addEventListener("resize", E, !1), l = {
|
|
2049
|
+
update: C,
|
|
1576
2050
|
destroy: () => {
|
|
1577
|
-
|
|
2051
|
+
z(), document.removeEventListener("scroll", E, !0), window.removeEventListener("resize", E, !1);
|
|
1578
2052
|
}
|
|
1579
2053
|
}, l.update();
|
|
1580
2054
|
};
|
|
1581
|
-
|
|
1582
|
-
if (!
|
|
2055
|
+
oe(u, async (f) => {
|
|
2056
|
+
if (!f) {
|
|
1583
2057
|
l && (l.destroy(), l = null);
|
|
1584
2058
|
return;
|
|
1585
2059
|
}
|
|
1586
|
-
l ||
|
|
1587
|
-
}),
|
|
1588
|
-
|
|
1589
|
-
}),
|
|
2060
|
+
l || s(), l == null || l.update();
|
|
2061
|
+
}), Le(() => {
|
|
2062
|
+
u.value && s();
|
|
2063
|
+
}), we(() => {
|
|
1590
2064
|
l == null || l.destroy(), l = null;
|
|
1591
2065
|
});
|
|
1592
|
-
const
|
|
1593
|
-
return
|
|
1594
|
-
|
|
1595
|
-
}), (
|
|
1596
|
-
|
|
2066
|
+
const p = h(() => !!e.text || !!(a.value && a.value.textContent));
|
|
2067
|
+
return oe(p, (f) => {
|
|
2068
|
+
f || (u.value = !1);
|
|
2069
|
+
}), (f, v) => (m(), _(pe, null, [
|
|
2070
|
+
B("span", {
|
|
1597
2071
|
ref_key: "trigger",
|
|
1598
2072
|
ref: o,
|
|
1599
2073
|
class: "vf-tooltip__trigger",
|
|
1600
2074
|
"aria-describedby": d,
|
|
1601
|
-
onMouseenter:
|
|
1602
|
-
onMouseleave:
|
|
1603
|
-
onFocus:
|
|
1604
|
-
onBlur:
|
|
2075
|
+
onMouseenter: c,
|
|
2076
|
+
onMouseleave: n,
|
|
2077
|
+
onFocus: c,
|
|
2078
|
+
onBlur: n
|
|
1605
2079
|
}, [
|
|
1606
|
-
|
|
2080
|
+
F(f.$slots, "default")
|
|
1607
2081
|
], 544),
|
|
1608
|
-
(
|
|
1609
|
-
|
|
2082
|
+
(m(), ae($e, { to: "body" }, [
|
|
2083
|
+
he(B("div", {
|
|
1610
2084
|
id: d,
|
|
1611
2085
|
ref_key: "panel",
|
|
1612
2086
|
ref: a,
|
|
1613
2087
|
class: "vf-tooltip",
|
|
1614
2088
|
role: "tooltip",
|
|
1615
|
-
"data-placement":
|
|
2089
|
+
"data-placement": i.value
|
|
1616
2090
|
}, [
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
2091
|
+
B("span", Ro, [
|
|
2092
|
+
F(f.$slots, "content", {}, () => [
|
|
2093
|
+
se(K(f.text), 1)
|
|
1620
2094
|
])
|
|
1621
2095
|
]),
|
|
1622
|
-
|
|
1623
|
-
], 8,
|
|
1624
|
-
[
|
|
2096
|
+
f.arrow ? (m(), _("span", Do)) : O("", !0)
|
|
2097
|
+
], 8, Lo), [
|
|
2098
|
+
[ye, u.value]
|
|
1625
2099
|
])
|
|
1626
2100
|
]))
|
|
1627
2101
|
], 64));
|
|
1628
2102
|
}
|
|
1629
|
-
}),
|
|
2103
|
+
}), Po = ["dark", "light", "theme", "preset", "colors", "components", "colorScheme"], Wo = (t) => {
|
|
1630
2104
|
const e = t.replace(/([A-Z])/g, "-$1");
|
|
1631
2105
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
1632
|
-
},
|
|
1633
|
-
if (!
|
|
2106
|
+
}, Io = (t) => t.filter((e) => !Po.includes(e)).map((e) => Wo(e)).join("-").toLowerCase(), Ie = (t) => t.join("."), Oo = (t) => /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(t), Ee = (t) => {
|
|
2107
|
+
if (!Oo(t))
|
|
1634
2108
|
return null;
|
|
1635
2109
|
if (t.length === 4) {
|
|
1636
2110
|
const e = t[1], r = t[2], o = t[3];
|
|
1637
2111
|
return `#${e}${e}${r}${r}${o}${o}`;
|
|
1638
2112
|
}
|
|
1639
2113
|
return t.toLowerCase();
|
|
1640
|
-
},
|
|
1641
|
-
const e =
|
|
2114
|
+
}, et = (t) => {
|
|
2115
|
+
const e = Ee(t);
|
|
1642
2116
|
if (!e)
|
|
1643
2117
|
return [0, 0, 0];
|
|
1644
|
-
const r = parseInt(e.slice(1), 16), o = r >> 16 & 255, a = r >> 8 & 255,
|
|
1645
|
-
return [o, a,
|
|
1646
|
-
},
|
|
1647
|
-
const [e, r, o] =
|
|
2118
|
+
const r = parseInt(e.slice(1), 16), o = r >> 16 & 255, a = r >> 8 & 255, u = r & 255;
|
|
2119
|
+
return [o, a, u];
|
|
2120
|
+
}, Ne = (t) => {
|
|
2121
|
+
const [e, r, o] = et(t);
|
|
1648
2122
|
return `${e}, ${r}, ${o}`;
|
|
1649
|
-
},
|
|
1650
|
-
const o = t / 255, a = e / 255,
|
|
1651
|
-
let
|
|
1652
|
-
const
|
|
2123
|
+
}, Mo = (t, e, r) => {
|
|
2124
|
+
const o = t / 255, a = e / 255, u = r / 255, i = Math.max(o, a, u), d = Math.min(o, a, u), l = i - d;
|
|
2125
|
+
let c = 0, n = 0;
|
|
2126
|
+
const s = (i + d) / 2;
|
|
1653
2127
|
if (l !== 0) {
|
|
1654
|
-
switch (
|
|
2128
|
+
switch (n = l / (1 - Math.abs(2 * s - 1)), i) {
|
|
1655
2129
|
case o:
|
|
1656
|
-
|
|
2130
|
+
c = (a - u) / l % 6;
|
|
1657
2131
|
break;
|
|
1658
2132
|
case a:
|
|
1659
|
-
|
|
2133
|
+
c = (u - o) / l + 2;
|
|
1660
2134
|
break;
|
|
1661
|
-
case
|
|
1662
|
-
|
|
2135
|
+
case u:
|
|
2136
|
+
c = (o - a) / l + 4;
|
|
1663
2137
|
break;
|
|
1664
2138
|
}
|
|
1665
|
-
|
|
2139
|
+
c *= 60, c < 0 && (c += 360);
|
|
1666
2140
|
}
|
|
1667
|
-
return [
|
|
1668
|
-
},
|
|
1669
|
-
const o = e / 100, a = r / 100,
|
|
1670
|
-
let l = 0,
|
|
1671
|
-
t >= 0 && t < 60 ? (l =
|
|
1672
|
-
const
|
|
1673
|
-
return [
|
|
1674
|
-
},
|
|
1675
|
-
const r =
|
|
2141
|
+
return [c, n * 100, s * 100];
|
|
2142
|
+
}, Eo = (t, e, r) => {
|
|
2143
|
+
const o = e / 100, a = r / 100, u = (1 - Math.abs(2 * a - 1)) * o, i = u * (1 - Math.abs(t / 60 % 2 - 1)), d = a - u / 2;
|
|
2144
|
+
let l = 0, c = 0, n = 0;
|
|
2145
|
+
t >= 0 && t < 60 ? (l = u, c = i, n = 0) : t >= 60 && t < 120 ? (l = i, c = u, n = 0) : t >= 120 && t < 180 ? (l = 0, c = u, n = i) : t >= 180 && t < 240 ? (l = 0, c = i, n = u) : t >= 240 && t < 300 ? (l = i, c = 0, n = u) : (l = u, c = 0, n = i);
|
|
2146
|
+
const s = Math.round((l + d) * 255), p = Math.round((c + d) * 255), f = Math.round((n + d) * 255);
|
|
2147
|
+
return [s, p, f];
|
|
2148
|
+
}, Ho = (t, e, r) => `#${[t, e, r].map((o) => o.toString(16).padStart(2, "0")).join("")}`, Ao = (t, e, r) => Math.min(r, Math.max(e, t)), Ko = (t, e) => {
|
|
2149
|
+
const r = Ee(t);
|
|
1676
2150
|
if (!r)
|
|
1677
2151
|
return t;
|
|
1678
|
-
const [o, a,
|
|
1679
|
-
return
|
|
1680
|
-
},
|
|
2152
|
+
const [o, a, u] = et(r), [i, d, l] = Mo(o, a, u), n = (e - 5) * 7, s = Ao(l + n, 0, 100), [p, f, v] = Eo(i, d, s);
|
|
2153
|
+
return Ho(p, f, v);
|
|
2154
|
+
}, Te = (t) => !!t && typeof t == "object" && !Array.isArray(t), He = (t, e) => {
|
|
1681
2155
|
if (!e)
|
|
1682
2156
|
return { ...t };
|
|
1683
2157
|
const r = { ...t };
|
|
1684
2158
|
for (const o in e) {
|
|
1685
|
-
const a = e[o],
|
|
1686
|
-
|
|
2159
|
+
const a = e[o], u = t[o];
|
|
2160
|
+
Te(u) && Te(a) ? r[o] = He(u, a) : r[o] = a;
|
|
1687
2161
|
}
|
|
1688
2162
|
return r;
|
|
1689
|
-
},
|
|
2163
|
+
}, No = (t) => {
|
|
1690
2164
|
if (!t)
|
|
1691
2165
|
return null;
|
|
1692
|
-
if (
|
|
2166
|
+
if (Te(t) && "preset" in t) {
|
|
1693
2167
|
const e = t;
|
|
1694
2168
|
return {
|
|
1695
2169
|
preset: e.preset ?? {},
|
|
@@ -1700,42 +2174,42 @@ const kt = (t, e) => t.strategy ? t.strategy : Ct(e) ? "fixed" : "absolute", ee
|
|
|
1700
2174
|
};
|
|
1701
2175
|
}
|
|
1702
2176
|
return { preset: t };
|
|
1703
|
-
},
|
|
1704
|
-
const e = [], r = [], o = [], a = [],
|
|
2177
|
+
}, Yo = (t) => {
|
|
2178
|
+
const e = [], r = [], o = [], a = [], u = (l) => o.push(l), i = (l) => a.push(l), d = (l, c) => {
|
|
1705
2179
|
if (!(!l || typeof l != "object"))
|
|
1706
|
-
for (const
|
|
1707
|
-
const
|
|
1708
|
-
if (
|
|
1709
|
-
d(
|
|
2180
|
+
for (const n in l) {
|
|
2181
|
+
const s = l[n], p = c.concat([n]);
|
|
2182
|
+
if (Te(s)) {
|
|
2183
|
+
d(s, p);
|
|
1710
2184
|
continue;
|
|
1711
2185
|
}
|
|
1712
|
-
if (
|
|
1713
|
-
|
|
2186
|
+
if (s && typeof s == "object") {
|
|
2187
|
+
i(`Theme value "${Ie(p)}" is not a plain object or string and will be ignored.`);
|
|
1714
2188
|
continue;
|
|
1715
2189
|
}
|
|
1716
|
-
if (typeof
|
|
1717
|
-
|
|
2190
|
+
if (typeof s != "string") {
|
|
2191
|
+
i(`Theme value "${Ie(p)}" is not a string and will be ignored.`);
|
|
1718
2192
|
continue;
|
|
1719
2193
|
}
|
|
1720
|
-
const v =
|
|
1721
|
-
if (v.push(`--vf-${
|
|
1722
|
-
const
|
|
1723
|
-
if (!
|
|
1724
|
-
|
|
1725
|
-
`Theme color "${
|
|
2194
|
+
const v = p.includes("colorScheme") && p.includes("dark") ? r : e, w = Io(p);
|
|
2195
|
+
if (v.push(`--vf-${w}: ${s}`), p.includes("colors")) {
|
|
2196
|
+
const C = Ee(s);
|
|
2197
|
+
if (!C) {
|
|
2198
|
+
u(
|
|
2199
|
+
`Theme color "${Ie(p)}" is not hex. Shade variables will not be generated for it.`
|
|
1726
2200
|
);
|
|
1727
2201
|
continue;
|
|
1728
2202
|
}
|
|
1729
|
-
if (v.push(`--vf-${
|
|
1730
|
-
for (let
|
|
1731
|
-
const
|
|
1732
|
-
v.push(`--vf-${
|
|
2203
|
+
if (v.push(`--vf-${w}-rgb: ${Ne(C)}`), n !== "white")
|
|
2204
|
+
for (let z = 1; z < 10; ++z) {
|
|
2205
|
+
const E = Ko(C, z);
|
|
2206
|
+
v.push(`--vf-${w}-${z}00: ${E}`), v.push(`--vf-${w}-${z}00-rgb: ${Ne(E)}`);
|
|
1733
2207
|
}
|
|
1734
2208
|
}
|
|
1735
2209
|
}
|
|
1736
2210
|
};
|
|
1737
2211
|
return d(t, []), { baseVars: e, darkVars: r, warnings: o, errors: a };
|
|
1738
|
-
},
|
|
2212
|
+
}, Go = (t) => {
|
|
1739
2213
|
if (typeof document > "u")
|
|
1740
2214
|
return null;
|
|
1741
2215
|
const e = document.getElementById(t);
|
|
@@ -1743,48 +2217,48 @@ const kt = (t, e) => t.strategy ? t.strategy : Ct(e) ? "fixed" : "absolute", ee
|
|
|
1743
2217
|
return e;
|
|
1744
2218
|
const r = document.createElement("style");
|
|
1745
2219
|
return r.id = t, document.head.appendChild(r), r;
|
|
1746
|
-
},
|
|
2220
|
+
}, jo = (t) => ({
|
|
1747
2221
|
selector: t.selector ?? ":root",
|
|
1748
2222
|
darkSelector: t.darkSelector ?? ":root[data-theme=dark]"
|
|
1749
|
-
}),
|
|
1750
|
-
const { baseVars: a, darkVars:
|
|
2223
|
+
}), Xo = (t, e, r, o) => {
|
|
2224
|
+
const { baseVars: a, darkVars: u, warnings: i, errors: d } = Yo(t), l = Go("vueforge-theme");
|
|
1751
2225
|
if (!l)
|
|
1752
2226
|
return;
|
|
1753
2227
|
if (d.length) {
|
|
1754
2228
|
if (o)
|
|
1755
2229
|
throw new Error(`[VueForge] ${d.join(" ")}`);
|
|
1756
|
-
for (const
|
|
1757
|
-
console.warn(`[VueForge] ${
|
|
2230
|
+
for (const n of d)
|
|
2231
|
+
console.warn(`[VueForge] ${n}`);
|
|
1758
2232
|
}
|
|
1759
|
-
if (
|
|
1760
|
-
for (const
|
|
1761
|
-
console.warn(`[VueForge] ${
|
|
1762
|
-
const
|
|
1763
|
-
a.length &&
|
|
2233
|
+
if (i.length)
|
|
2234
|
+
for (const n of i)
|
|
2235
|
+
console.warn(`[VueForge] ${n}`);
|
|
2236
|
+
const c = [];
|
|
2237
|
+
a.length && c.push(`${e} { ${a.join(";")} }`), u.length && c.push(`${r} { ${u.join(";")} }`), l.textContent = c.join(`
|
|
1764
2238
|
`);
|
|
1765
2239
|
};
|
|
1766
|
-
let
|
|
1767
|
-
const
|
|
1768
|
-
const e =
|
|
2240
|
+
let fe = null;
|
|
2241
|
+
const tt = (t) => {
|
|
2242
|
+
const e = No(t);
|
|
1769
2243
|
if (!e)
|
|
1770
2244
|
return;
|
|
1771
|
-
const r =
|
|
1772
|
-
|
|
1773
|
-
},
|
|
1774
|
-
if (!
|
|
2245
|
+
const r = He(e.preset, e.overrides), { selector: o, darkSelector: a } = jo(e);
|
|
2246
|
+
fe = { ...e }, Xo(r, o, a, e.strict);
|
|
2247
|
+
}, Da = (t) => {
|
|
2248
|
+
if (!fe)
|
|
1775
2249
|
return;
|
|
1776
|
-
const e = t.overrides === void 0 ?
|
|
1777
|
-
preset: t.preset ??
|
|
2250
|
+
const e = t.overrides === void 0 ? fe.overrides : He(fe.overrides ?? {}, t.overrides ?? {}), r = {
|
|
2251
|
+
preset: t.preset ?? fe.preset,
|
|
1778
2252
|
overrides: e,
|
|
1779
|
-
selector: t.selector ??
|
|
1780
|
-
darkSelector: t.darkSelector ??
|
|
2253
|
+
selector: t.selector ?? fe.selector,
|
|
2254
|
+
darkSelector: t.darkSelector ?? fe.darkSelector
|
|
1781
2255
|
};
|
|
1782
|
-
|
|
1783
|
-
},
|
|
2256
|
+
tt(r);
|
|
2257
|
+
}, Pa = () => fe ? { ...fe } : null, Wa = {
|
|
1784
2258
|
install(t, e = {}) {
|
|
1785
|
-
e.theme &&
|
|
2259
|
+
e.theme && tt(e.theme);
|
|
1786
2260
|
}
|
|
1787
|
-
},
|
|
2261
|
+
}, Ye = {
|
|
1788
2262
|
colors: {
|
|
1789
2263
|
white: "#ffffff",
|
|
1790
2264
|
green: "#0cbc87",
|
|
@@ -1847,7 +2321,7 @@ const Ue = (t) => {
|
|
|
1847
2321
|
dividerColor: "#2e2e32"
|
|
1848
2322
|
}
|
|
1849
2323
|
}
|
|
1850
|
-
},
|
|
2324
|
+
}, Uo = {
|
|
1851
2325
|
fontSize: "var(--vf-typography-font-size)",
|
|
1852
2326
|
padding: "var(--vf-controls-padding-y) var(--vf-controls-padding-x)",
|
|
1853
2327
|
borderRadius: "var(--vf-radii-md)",
|
|
@@ -1989,11 +2463,11 @@ const Ue = (t) => {
|
|
|
1989
2463
|
}
|
|
1990
2464
|
}
|
|
1991
2465
|
}
|
|
1992
|
-
},
|
|
2466
|
+
}, qo = {
|
|
1993
2467
|
padding: "12px",
|
|
1994
2468
|
borderColor: "var(--vf-border-color)",
|
|
1995
2469
|
borderRadius: "var(--vf-radii-md)"
|
|
1996
|
-
},
|
|
2470
|
+
}, Zo = {
|
|
1997
2471
|
gap: "0.5rem",
|
|
1998
2472
|
fontSize: "var(--vf-typography-font-size)",
|
|
1999
2473
|
padding: "var(--vf-controls-padding-y) var(--vf-controls-padding-x)",
|
|
@@ -2014,7 +2488,7 @@ const Ue = (t) => {
|
|
|
2014
2488
|
padding: "var(--vf-sizes-lg-padding-y) var(--vf-sizes-lg-padding-x)",
|
|
2015
2489
|
fontSize: "var(--vf-sizes-lg-font-size)"
|
|
2016
2490
|
}
|
|
2017
|
-
},
|
|
2491
|
+
}, Jo = {
|
|
2018
2492
|
gap: "0.5rem",
|
|
2019
2493
|
fontSize: "var(--vf-typography-font-size)",
|
|
2020
2494
|
padding: "var(--vf-controls-padding-y) var(--vf-controls-padding-x)",
|
|
@@ -2037,10 +2511,10 @@ const Ue = (t) => {
|
|
|
2037
2511
|
padding: "var(--vf-sizes-lg-padding-y) var(--vf-sizes-lg-padding-x)",
|
|
2038
2512
|
fontSize: "var(--vf-sizes-lg-font-size)"
|
|
2039
2513
|
}
|
|
2040
|
-
},
|
|
2514
|
+
}, Qo = {
|
|
2041
2515
|
hoverColor: "var(--vf-blue)",
|
|
2042
2516
|
activeColor: "var(--vf-blue)"
|
|
2043
|
-
},
|
|
2517
|
+
}, ea = {
|
|
2044
2518
|
iconGap: "6px",
|
|
2045
2519
|
submenuOffset: "12px",
|
|
2046
2520
|
separatorThickness: "1px",
|
|
@@ -2060,7 +2534,7 @@ const Ue = (t) => {
|
|
|
2060
2534
|
marginBottom: "0.5rem",
|
|
2061
2535
|
marginLeft: "0.5rem"
|
|
2062
2536
|
}
|
|
2063
|
-
},
|
|
2537
|
+
}, ta = {
|
|
2064
2538
|
width: "90vw",
|
|
2065
2539
|
maxWidth: "520px",
|
|
2066
2540
|
maxHeight: "80vh",
|
|
@@ -2087,9 +2561,9 @@ const Ue = (t) => {
|
|
|
2087
2561
|
closeColor: "var(--vf-text-color)",
|
|
2088
2562
|
closeFontSize: "1.25rem",
|
|
2089
2563
|
closeHoverBackgroundColor: "rgba(0, 0, 0, 0.06)"
|
|
2090
|
-
},
|
|
2564
|
+
}, oa = {
|
|
2091
2565
|
backgroundColor: "var(--vf-bg-color)"
|
|
2092
|
-
},
|
|
2566
|
+
}, aa = {
|
|
2093
2567
|
minWidth: "12rem",
|
|
2094
2568
|
fontSize: "var(--vf-typography-font-size)",
|
|
2095
2569
|
controlGap: "0.75rem",
|
|
@@ -2122,7 +2596,96 @@ const Ue = (t) => {
|
|
|
2122
2596
|
padding: "var(--vf-sizes-lg-padding-y) var(--vf-sizes-lg-padding-x)",
|
|
2123
2597
|
fontSize: "var(--vf-sizes-lg-font-size)"
|
|
2124
2598
|
}
|
|
2125
|
-
},
|
|
2599
|
+
}, ra = {
|
|
2600
|
+
minWidth: "12rem",
|
|
2601
|
+
fontSize: "var(--vf-typography-font-size)",
|
|
2602
|
+
controlGap: "0.5rem",
|
|
2603
|
+
chevronSize: "0.9em",
|
|
2604
|
+
padding: "var(--vf-controls-padding-y) var(--vf-controls-padding-x)",
|
|
2605
|
+
borderRadius: "var(--vf-radii-md)",
|
|
2606
|
+
borderColor: "var(--vf-border-color)",
|
|
2607
|
+
backgroundColor: "var(--vf-controls-background-color)",
|
|
2608
|
+
textColor: "var(--vf-text-color)",
|
|
2609
|
+
placeholderColor: "var(--vf-secondary-text-color)",
|
|
2610
|
+
focusBorderColor: "var(--vf-blue-600)",
|
|
2611
|
+
hoverBorderColor: "var(--vf-blue-500)",
|
|
2612
|
+
disabledOpacity: "var(--vf-states-disabled-opacity)",
|
|
2613
|
+
panelBackgroundColor: "var(--vf-bg-color)",
|
|
2614
|
+
panelBorderColor: "var(--vf-border-color)",
|
|
2615
|
+
panelPadding: "0.35rem",
|
|
2616
|
+
panelMaxHeight: "16rem",
|
|
2617
|
+
panelRadiusOffset: "2px",
|
|
2618
|
+
panelShadow: "0 10px 30px rgba(0, 0, 0, 0.12)",
|
|
2619
|
+
focusRingShadow: "var(--vf-states-focus-ring-shadow)",
|
|
2620
|
+
optionPadding: "0.5rem 0.6rem",
|
|
2621
|
+
optionBorderRadius: "var(--vf-radii-md)",
|
|
2622
|
+
optionHoverBackgroundColor: "rgba(var(--vf-blue-600-rgb), 0.08)",
|
|
2623
|
+
optionActiveBackgroundColor: "rgba(var(--vf-blue-600-rgb), 0.14)",
|
|
2624
|
+
optionActiveTextColor: "var(--vf-text-color)",
|
|
2625
|
+
optionHighlightedBackgroundColor: "rgba(var(--vf-blue-600-rgb), 0.14)",
|
|
2626
|
+
emptyPadding: "0.5rem 0.6rem",
|
|
2627
|
+
emptyColor: "var(--vf-secondary-text-color)",
|
|
2628
|
+
loadingPadding: "0.5rem 0.6rem",
|
|
2629
|
+
loadingColor: "var(--vf-secondary-text-color)",
|
|
2630
|
+
small: {
|
|
2631
|
+
padding: "var(--vf-sizes-sm-padding-y) var(--vf-sizes-sm-padding-x)",
|
|
2632
|
+
fontSize: "var(--vf-sizes-sm-font-size)"
|
|
2633
|
+
},
|
|
2634
|
+
large: {
|
|
2635
|
+
padding: "var(--vf-sizes-lg-padding-y) var(--vf-sizes-lg-padding-x)",
|
|
2636
|
+
fontSize: "var(--vf-sizes-lg-font-size)"
|
|
2637
|
+
}
|
|
2638
|
+
}, la = {
|
|
2639
|
+
minWidth: "12rem",
|
|
2640
|
+
fontSize: "var(--vf-typography-font-size)",
|
|
2641
|
+
controlGap: "0.75rem",
|
|
2642
|
+
chevronSize: "0.9em",
|
|
2643
|
+
padding: "var(--vf-controls-padding-y) var(--vf-controls-padding-x)",
|
|
2644
|
+
borderRadius: "var(--vf-radii-md)",
|
|
2645
|
+
borderColor: "var(--vf-border-color)",
|
|
2646
|
+
backgroundColor: "var(--vf-controls-background-color)",
|
|
2647
|
+
textColor: "var(--vf-text-color)",
|
|
2648
|
+
placeholderColor: "var(--vf-secondary-text-color)",
|
|
2649
|
+
focusBorderColor: "var(--vf-blue-600)",
|
|
2650
|
+
hoverBorderColor: "var(--vf-blue-500)",
|
|
2651
|
+
disabledOpacity: "var(--vf-states-disabled-opacity)",
|
|
2652
|
+
panelWidth: "17rem",
|
|
2653
|
+
panelBackgroundColor: "var(--vf-bg-color)",
|
|
2654
|
+
panelBorderColor: "var(--vf-border-color)",
|
|
2655
|
+
panelPadding: "0.5rem",
|
|
2656
|
+
panelRadiusOffset: "2px",
|
|
2657
|
+
panelShadow: "0 10px 30px rgba(0, 0, 0, 0.12)",
|
|
2658
|
+
focusRingShadow: "var(--vf-states-focus-ring-shadow)",
|
|
2659
|
+
headerGap: "0.5rem",
|
|
2660
|
+
headerPadding: "0 0 0.4rem",
|
|
2661
|
+
monthLabelFontSize: "0.95rem",
|
|
2662
|
+
monthLabelFontWeight: "600",
|
|
2663
|
+
navButtonSize: "1.8rem",
|
|
2664
|
+
navButtonRadius: "var(--vf-radii-sm)",
|
|
2665
|
+
navButtonFontSize: "1.1rem",
|
|
2666
|
+
weekdayColor: "var(--vf-secondary-text-color)",
|
|
2667
|
+
weekdayFontSize: "0.75rem",
|
|
2668
|
+
weekdaysMarginBottom: "0.35rem",
|
|
2669
|
+
daysGap: "0.15rem",
|
|
2670
|
+
daySize: "2rem",
|
|
2671
|
+
dayFontSize: "0.875rem",
|
|
2672
|
+
dayBorderRadius: "var(--vf-radii-sm)",
|
|
2673
|
+
dayHoverBackgroundColor: "rgba(var(--vf-blue-600-rgb), 0.08)",
|
|
2674
|
+
daySelectedBackgroundColor: "rgba(var(--vf-blue-600-rgb), 0.14)",
|
|
2675
|
+
daySelectedTextColor: "var(--vf-text-color)",
|
|
2676
|
+
dayMutedColor: "var(--vf-secondary-text-color)",
|
|
2677
|
+
dayTodayBorderColor: "rgba(var(--vf-blue-600-rgb), 0.45)",
|
|
2678
|
+
small: {
|
|
2679
|
+
padding: "var(--vf-sizes-sm-padding-y) var(--vf-sizes-sm-padding-x)",
|
|
2680
|
+
fontSize: "var(--vf-sizes-sm-font-size)",
|
|
2681
|
+
daySize: "1.8rem"
|
|
2682
|
+
},
|
|
2683
|
+
large: {
|
|
2684
|
+
padding: "var(--vf-sizes-lg-padding-y) var(--vf-sizes-lg-padding-x)",
|
|
2685
|
+
fontSize: "var(--vf-sizes-lg-font-size)",
|
|
2686
|
+
daySize: "2.2rem"
|
|
2687
|
+
}
|
|
2688
|
+
}, na = {
|
|
2126
2689
|
size: "1rem",
|
|
2127
2690
|
gap: "0.5rem",
|
|
2128
2691
|
borderRadius: "var(--vf-radii-sm)",
|
|
@@ -2134,7 +2697,7 @@ const Ue = (t) => {
|
|
|
2134
2697
|
checkColor: "#ffffff",
|
|
2135
2698
|
textColor: "var(--vf-text-color)",
|
|
2136
2699
|
disabledOpacity: "var(--vf-states-disabled-opacity)"
|
|
2137
|
-
},
|
|
2700
|
+
}, sa = {
|
|
2138
2701
|
size: "1rem",
|
|
2139
2702
|
dotSize: "0.45rem",
|
|
2140
2703
|
gap: "0.5rem",
|
|
@@ -2148,7 +2711,7 @@ const Ue = (t) => {
|
|
|
2148
2711
|
dotColor: "#ffffff",
|
|
2149
2712
|
textColor: "var(--vf-text-color)",
|
|
2150
2713
|
disabledOpacity: "var(--vf-states-disabled-opacity)"
|
|
2151
|
-
},
|
|
2714
|
+
}, ia = {
|
|
2152
2715
|
width: "2.25rem",
|
|
2153
2716
|
height: "1.25rem",
|
|
2154
2717
|
thumbSize: "1rem",
|
|
@@ -2160,7 +2723,7 @@ const Ue = (t) => {
|
|
|
2160
2723
|
thumbColor: "#ffffff",
|
|
2161
2724
|
textColor: "var(--vf-text-color)",
|
|
2162
2725
|
disabledOpacity: "var(--vf-states-disabled-opacity)"
|
|
2163
|
-
},
|
|
2726
|
+
}, da = {
|
|
2164
2727
|
gap: "0.75rem",
|
|
2165
2728
|
listGap: "0.5rem",
|
|
2166
2729
|
listBorderWidth: "1px",
|
|
@@ -2181,7 +2744,7 @@ const Ue = (t) => {
|
|
|
2181
2744
|
panelBackgroundColor: "transparent",
|
|
2182
2745
|
panelTextColor: "var(--vf-text-color)",
|
|
2183
2746
|
disabledOpacity: "var(--vf-states-disabled-opacity)"
|
|
2184
|
-
},
|
|
2747
|
+
}, ca = {
|
|
2185
2748
|
padding: "0.35rem 0.6rem",
|
|
2186
2749
|
borderRadius: "8px",
|
|
2187
2750
|
backgroundColor: "rgba(0, 0, 0, 0.8)",
|
|
@@ -2192,7 +2755,7 @@ const Ue = (t) => {
|
|
|
2192
2755
|
zIndex: "120",
|
|
2193
2756
|
maxWidth: "240px",
|
|
2194
2757
|
arrowSize: "8px"
|
|
2195
|
-
},
|
|
2758
|
+
}, ua = {
|
|
2196
2759
|
gap: "0.75rem",
|
|
2197
2760
|
padding: "0.75rem 0.9rem",
|
|
2198
2761
|
borderRadius: "var(--vf-radii-md)",
|
|
@@ -2231,50 +2794,54 @@ const Ue = (t) => {
|
|
|
2231
2794
|
borderColor: "rgba(var(--vf-red-600-rgb), 0.45)",
|
|
2232
2795
|
textColor: "var(--vf-text-color)"
|
|
2233
2796
|
}
|
|
2234
|
-
},
|
|
2235
|
-
...
|
|
2797
|
+
}, Ia = {
|
|
2798
|
+
...Ye,
|
|
2236
2799
|
components: {
|
|
2237
|
-
base:
|
|
2238
|
-
button:
|
|
2239
|
-
card:
|
|
2240
|
-
input:
|
|
2241
|
-
textarea:
|
|
2242
|
-
link:
|
|
2243
|
-
menu:
|
|
2244
|
-
modal:
|
|
2245
|
-
popover:
|
|
2246
|
-
select:
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2800
|
+
base: Ye,
|
|
2801
|
+
button: Uo,
|
|
2802
|
+
card: qo,
|
|
2803
|
+
input: Zo,
|
|
2804
|
+
textarea: Jo,
|
|
2805
|
+
link: Qo,
|
|
2806
|
+
menu: ea,
|
|
2807
|
+
modal: ta,
|
|
2808
|
+
popover: oa,
|
|
2809
|
+
select: aa,
|
|
2810
|
+
autocomplete: ra,
|
|
2811
|
+
datepicker: la,
|
|
2812
|
+
checkbox: na,
|
|
2813
|
+
radio: sa,
|
|
2814
|
+
switch: ia,
|
|
2815
|
+
tabs: da,
|
|
2816
|
+
tooltip: ca,
|
|
2817
|
+
toast: ua
|
|
2253
2818
|
}
|
|
2254
2819
|
};
|
|
2255
2820
|
export {
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2821
|
+
ka as Autocomplete,
|
|
2822
|
+
ma as Button,
|
|
2823
|
+
ht as Card,
|
|
2824
|
+
Ca as Checkbox,
|
|
2825
|
+
_a as DatePicker,
|
|
2826
|
+
Ia as DefaultTheme,
|
|
2827
|
+
ga as Input,
|
|
2828
|
+
Ue as Link,
|
|
2829
|
+
ba as Menu,
|
|
2830
|
+
La as Modal,
|
|
2831
|
+
Ta as Popover,
|
|
2832
|
+
$a as RadioButton,
|
|
2833
|
+
wa as RadioGroup,
|
|
2834
|
+
ya as Select,
|
|
2835
|
+
Va as Switch,
|
|
2836
|
+
Ba as Tab,
|
|
2837
|
+
za as TabPanel,
|
|
2838
|
+
xa as Tabs,
|
|
2839
|
+
ha as Textarea,
|
|
2840
|
+
Fa as Toast,
|
|
2841
|
+
Sa as ToastContainer,
|
|
2842
|
+
Ra as Tooltip,
|
|
2843
|
+
Wa as VueForge,
|
|
2844
|
+
Pa as getTheme,
|
|
2845
|
+
tt as setTheme,
|
|
2846
|
+
Da as updateTheme
|
|
2280
2847
|
};
|