@codemonster-ru/vueforge 0.9.0 → 0.11.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 +74 -2
- package/dist/index.css +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.ts.mjs +974 -762
- package/dist/index.ts.umd.js +3 -3
- package/dist/package/components/__tests__/textarea.test.d.ts +1 -0
- package/dist/package/components/__tests__/tooltip.test.d.ts +1 -0
- package/dist/package/components/checkbox.vue.d.ts +3 -0
- package/dist/package/components/select.vue.d.ts +3 -0
- package/dist/package/components/textarea.vue.d.ts +33 -0
- package/dist/package/components/tooltip.vue.d.ts +35 -0
- package/dist/package/config/theme-core.d.ts +35 -3
- package/dist/package/themes/default/base.d.ts +1 -0
- package/dist/package/themes/default/components/textarea.d.ts +25 -0
- package/dist/package/themes/default/components/tooltip.d.ts +13 -0
- package/dist/package/themes/default/index.d.ts +38 -1
- package/package.json +4 -2
- package/dist/package/themes/default/components/codeBlock.d.ts +0 -2
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 j, ref as P, computed as B, watch as ne, resolveComponent as Le, openBlock as m, createElementBlock as k, normalizeClass as L, renderSlot as _, Fragment as ce, createTextVNode as ae, toDisplayString as X, createBlock as I, withCtx as te, createCommentVNode as $, createElementVNode as R, renderList as Ve, withKeys as re, withModifiers as le, unref as ie, createVNode as We, nextTick as _e, onMounted as Oe, onBeforeUnmount as $e, Teleport as xe, withDirectives as ke, vShow as Ce, reactive as Ke, createSlots as Ge, useSlots as Ue } from "vue";
|
|
2
|
+
import { useRoute as qe, useRouter as Ze } from "vue-router";
|
|
3
|
+
import { CmIcon as de } from "@codemonster-ru/vueiconify";
|
|
4
|
+
const Je = ["href", "aria-disabled", "tabindex"], He = /* @__PURE__ */ j({
|
|
5
5
|
__name: "link",
|
|
6
6
|
props: {
|
|
7
7
|
to: { default: void 0 },
|
|
@@ -14,97 +14,97 @@ const He = ["href", "aria-disabled", "tabindex"], $e = /* @__PURE__ */ K({
|
|
|
14
14
|
disabled: { type: Boolean }
|
|
15
15
|
},
|
|
16
16
|
emits: ["click", "active", "update:active", "onActive"],
|
|
17
|
-
setup(
|
|
18
|
-
const r = e,
|
|
17
|
+
setup(t, { emit: e }) {
|
|
18
|
+
const r = e, o = t, l = qe(), c = Ze(), i = P(null), u = B(() => o.href ?? o.url), n = B(() => 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"), d = B(() => o.to), a = B(() => o.to ? c.resolve(o.to) : null), s = B(() => {
|
|
19
19
|
if (n.value !== "router-link")
|
|
20
20
|
return !1;
|
|
21
|
-
const p =
|
|
22
|
-
return p ? p.name ? l.matched.some(({ name:
|
|
23
|
-
}),
|
|
24
|
-
if (!
|
|
21
|
+
const p = a.value;
|
|
22
|
+
return p ? p.name ? l.matched.some(({ name: C }) => C === p.name) : p.fullPath ? l.fullPath === p.fullPath : l.path === p.path : !1;
|
|
23
|
+
}), v = B(() => o.active === void 0 ? s.value : o.active), f = (p) => {
|
|
24
|
+
if (!o.disabled) {
|
|
25
25
|
r("click", p);
|
|
26
26
|
return;
|
|
27
27
|
}
|
|
28
28
|
p.preventDefault(), p.stopPropagation();
|
|
29
29
|
};
|
|
30
|
-
return
|
|
30
|
+
return ne(s, (p) => {
|
|
31
31
|
p && (r("active"), r("onActive")), r("update:active", p);
|
|
32
|
-
}), (p,
|
|
33
|
-
const
|
|
34
|
-
return n.value === "a" ? (
|
|
32
|
+
}), (p, C) => {
|
|
33
|
+
const b = Le("router-link");
|
|
34
|
+
return n.value === "a" ? (m(), k("a", {
|
|
35
35
|
key: 0,
|
|
36
|
-
href:
|
|
37
|
-
class:
|
|
36
|
+
href: u.value,
|
|
37
|
+
class: L(["vf-link", { "vf-link_active": v.value, "vf-link_disabled": p.disabled }]),
|
|
38
38
|
"aria-disabled": p.disabled,
|
|
39
39
|
tabindex: p.disabled ? -1 : void 0,
|
|
40
|
-
onClick:
|
|
40
|
+
onClick: f
|
|
41
41
|
}, [
|
|
42
|
-
p.$slots.default ?
|
|
43
|
-
|
|
42
|
+
p.$slots.default ? _(p.$slots, "default", { key: 0 }) : (m(), k(ce, { key: 1 }, [
|
|
43
|
+
ae(X(p.label), 1)
|
|
44
44
|
], 64))
|
|
45
|
-
], 10,
|
|
45
|
+
], 10, Je)) : (m(), I(b, {
|
|
46
46
|
key: 1,
|
|
47
47
|
ref_key: "link",
|
|
48
|
-
ref:
|
|
49
|
-
to:
|
|
50
|
-
class:
|
|
48
|
+
ref: i,
|
|
49
|
+
to: d.value,
|
|
50
|
+
class: L(["vf-link", { "vf-link_active": v.value }]),
|
|
51
51
|
"aria-disabled": p.disabled,
|
|
52
52
|
tabindex: p.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
|
-
p.$slots.default ?
|
|
59
|
-
|
|
57
|
+
default: te(() => [
|
|
58
|
+
p.$slots.default ? _(p.$slots, "default", { key: 0 }) : (m(), k(ce, { key: 1 }, [
|
|
59
|
+
ae(X(p.label), 1)
|
|
60
60
|
], 64))
|
|
61
61
|
]),
|
|
62
62
|
_: 3
|
|
63
63
|
}, 8, ["to", "class", "aria-disabled", "tabindex"]));
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
|
-
}),
|
|
67
|
-
const r =
|
|
68
|
-
for (const [
|
|
69
|
-
r[
|
|
66
|
+
}), Qe = (t, e) => {
|
|
67
|
+
const r = t.__vccOpts || t;
|
|
68
|
+
for (const [o, l] of e)
|
|
69
|
+
r[o] = l;
|
|
70
70
|
return r;
|
|
71
|
-
},
|
|
71
|
+
}, et = {}, tt = { class: "vf-card" }, ot = {
|
|
72
72
|
key: 0,
|
|
73
73
|
class: "vf-card__default"
|
|
74
|
-
},
|
|
74
|
+
}, rt = {
|
|
75
75
|
key: 1,
|
|
76
76
|
class: "vf-card__header"
|
|
77
|
-
},
|
|
77
|
+
}, lt = {
|
|
78
78
|
key: 2,
|
|
79
79
|
class: "vf-card__body"
|
|
80
|
-
},
|
|
80
|
+
}, nt = {
|
|
81
81
|
key: 3,
|
|
82
82
|
class: "vf-card__footer"
|
|
83
83
|
};
|
|
84
|
-
function
|
|
85
|
-
return
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
])) :
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
])) :
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
])) :
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
])) :
|
|
84
|
+
function at(t, e) {
|
|
85
|
+
return m(), k("div", tt, [
|
|
86
|
+
t.$slots.default ? (m(), k("div", ot, [
|
|
87
|
+
_(t.$slots, "default")
|
|
88
|
+
])) : $("", !0),
|
|
89
|
+
t.$slots.header ? (m(), k("div", rt, [
|
|
90
|
+
_(t.$slots, "header")
|
|
91
|
+
])) : $("", !0),
|
|
92
|
+
t.$slots.body ? (m(), k("div", lt, [
|
|
93
|
+
_(t.$slots, "body")
|
|
94
|
+
])) : $("", !0),
|
|
95
|
+
t.$slots.footer ? (m(), k("div", nt, [
|
|
96
|
+
_(t.$slots, "footer")
|
|
97
|
+
])) : $("", !0)
|
|
98
98
|
]);
|
|
99
99
|
}
|
|
100
|
-
const
|
|
100
|
+
const st = /* @__PURE__ */ Qe(et, [["render", at]]), it = {
|
|
101
101
|
class: "vf-menu__list",
|
|
102
102
|
role: "menu"
|
|
103
|
-
},
|
|
103
|
+
}, dt = {
|
|
104
104
|
key: 1,
|
|
105
105
|
class: "vf-menu__separator",
|
|
106
106
|
role: "separator"
|
|
107
|
-
},
|
|
107
|
+
}, ct = ["aria-expanded", "onClick", "onKeydown"], So = /* @__PURE__ */ j({
|
|
108
108
|
name: "VfMenu",
|
|
109
109
|
__name: "menu",
|
|
110
110
|
props: {
|
|
@@ -112,88 +112,88 @@ const Xe = /* @__PURE__ */ Me(Pe, [["render", Ke]]), Ye = {
|
|
|
112
112
|
orientation: { default: "vertical" }
|
|
113
113
|
},
|
|
114
114
|
emits: ["active", "onActive"],
|
|
115
|
-
setup(
|
|
116
|
-
const r = e,
|
|
117
|
-
...
|
|
118
|
-
items:
|
|
119
|
-
})), n = (
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
}),
|
|
123
|
-
},
|
|
124
|
-
var
|
|
125
|
-
for (const
|
|
126
|
-
const
|
|
127
|
-
Object.prototype.hasOwnProperty.call(
|
|
115
|
+
setup(t, { emit: e }) {
|
|
116
|
+
const r = e, o = t, l = P([]), c = (a, s) => `${a.label ?? a.to ?? a.href ?? a.url ?? "item"}_${s.toString()}`, i = (a) => a.to ? "router-link" : "a", u = (a) => a.map((s) => ({
|
|
117
|
+
...s,
|
|
118
|
+
items: s.items ? u(s.items) : void 0
|
|
119
|
+
})), n = (a) => {
|
|
120
|
+
a.items && a.items.length ? (l.value.map((s) => {
|
|
121
|
+
s !== a && (s.subMenuVisible = !1);
|
|
122
|
+
}), a.subMenuVisible = !a.subMenuVisible) : Object.prototype.hasOwnProperty.call(a, "command") && typeof a.command == "function" && a.command();
|
|
123
|
+
}, d = (a) => {
|
|
124
|
+
var s;
|
|
125
|
+
for (const v in l.value) {
|
|
126
|
+
const f = l.value[v];
|
|
127
|
+
Object.prototype.hasOwnProperty.call(f, "items") && ((s = f.items) != null && s.some((p) => p === a) ? (f.active = !0, f.subMenuVisible = !0) : (f.active = !1, f.subMenuVisible = !1));
|
|
128
128
|
}
|
|
129
|
-
r("active",
|
|
129
|
+
r("active", a), r("onActive", a);
|
|
130
130
|
};
|
|
131
|
-
return
|
|
132
|
-
() =>
|
|
133
|
-
(
|
|
134
|
-
l.value =
|
|
131
|
+
return ne(
|
|
132
|
+
() => o.items,
|
|
133
|
+
(a) => {
|
|
134
|
+
l.value = u(a);
|
|
135
135
|
},
|
|
136
136
|
{ deep: !0, immediate: !0 }
|
|
137
|
-
), (
|
|
138
|
-
const
|
|
139
|
-
return
|
|
140
|
-
class:
|
|
137
|
+
), (a, s) => {
|
|
138
|
+
const v = Le("VfMenu");
|
|
139
|
+
return m(), k("div", {
|
|
140
|
+
class: L(["vf-menu", `vf-menu_${a.orientation}`])
|
|
141
141
|
}, [
|
|
142
|
-
|
|
143
|
-
(
|
|
144
|
-
key: c(
|
|
142
|
+
R("ul", it, [
|
|
143
|
+
(m(!0), k(ce, null, Ve(l.value, (f, p) => (m(), k("li", {
|
|
144
|
+
key: c(f, p),
|
|
145
145
|
class: "vf-menu__item",
|
|
146
146
|
role: "none"
|
|
147
147
|
}, [
|
|
148
|
-
|
|
148
|
+
a.$slots[c(f, p)] ? _(a.$slots, c(f, p), {
|
|
149
149
|
key: 0,
|
|
150
|
-
item: { ...
|
|
151
|
-
}) :
|
|
152
|
-
|
|
153
|
-
class:
|
|
150
|
+
item: { ...f, class: "vf-menu__link" }
|
|
151
|
+
}) : f.separator ? (m(), k("hr", dt)) : f.items && f.items.length ? (m(), k(ce, { key: 2 }, [
|
|
152
|
+
R("div", {
|
|
153
|
+
class: L(["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: (C) => n(f),
|
|
158
158
|
onKeydown: [
|
|
159
|
-
|
|
160
|
-
|
|
159
|
+
re(le((C) => n(f), ["prevent"]), ["enter"]),
|
|
160
|
+
re(le((C) => n(f), ["prevent"]), ["space"])
|
|
161
161
|
]
|
|
162
162
|
}, [
|
|
163
|
-
|
|
163
|
+
f.icon ? (m(), I(ie(de), {
|
|
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"])) : $("", !0),
|
|
168
|
+
ae(" " + X(f.label) + " ", 1),
|
|
169
|
+
We(ie(de), { icon: "chevronDown" })
|
|
170
|
+
], 42, ct),
|
|
171
|
+
f.items ? (m(), I(v, {
|
|
172
172
|
key: 0,
|
|
173
|
-
items:
|
|
174
|
-
class:
|
|
175
|
-
onOnActive:
|
|
176
|
-
}, null, 8, ["items", "class"])) :
|
|
177
|
-
], 64)) : (
|
|
173
|
+
items: f.items,
|
|
174
|
+
class: L(["vf-menu__submenu", { "vf-menu__submenu_visible": f.subMenuVisible }]),
|
|
175
|
+
onOnActive: d
|
|
176
|
+
}, null, 8, ["items", "class"])) : $("", !0)
|
|
177
|
+
], 64)) : (m(), I(He, {
|
|
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: (C) => n(f),
|
|
188
|
+
onActive: (C) => d(f)
|
|
189
189
|
}, {
|
|
190
|
-
default:
|
|
191
|
-
|
|
190
|
+
default: te(() => [
|
|
191
|
+
f.icon ? (m(), I(ie(de), {
|
|
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"])) : $("", !0),
|
|
196
|
+
ae(" " + X(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 Xe = /* @__PURE__ */ Me(Pe, [["render", Ke]]), Ye = {
|
|
|
202
202
|
], 2);
|
|
203
203
|
};
|
|
204
204
|
}
|
|
205
|
-
}),
|
|
205
|
+
}), ut = ["type", "disabled"], To = /* @__PURE__ */ j({
|
|
206
206
|
__name: "button",
|
|
207
207
|
props: {
|
|
208
208
|
to: { default: void 0 },
|
|
@@ -220,71 +220,71 @@ const Xe = /* @__PURE__ */ Me(Pe, [["render", Ke]]), Ye = {
|
|
|
220
220
|
severity: { default: "primary" },
|
|
221
221
|
disabled: { type: Boolean, default: !1 }
|
|
222
222
|
},
|
|
223
|
-
setup(
|
|
224
|
-
const e =
|
|
225
|
-
let
|
|
226
|
-
return ["top", "bottom"].includes(e.iconPos) &&
|
|
227
|
-
}), n =
|
|
228
|
-
return (
|
|
223
|
+
setup(t) {
|
|
224
|
+
const e = t, r = ["button", "submit", "reset"], o = (a) => !!a && r.includes(a), l = B(() => e.as ? e.as === "button" : !(e.to || e.href || e.url || e.type && !o(e.type))), c = B(() => o(e.type) ? e.type : "button"), i = B(() => e.as === "link" ? e.to ? "router-link" : "a" : e.type && !o(e.type) ? e.type === "router-link" && e.to ? "router-link" : "a" : e.to ? "router-link" : "a"), u = B(() => {
|
|
225
|
+
let a = ["vf-button", `vf-button_${e.severity}`];
|
|
226
|
+
return ["top", "bottom"].includes(e.iconPos) && a.push("vf-button_vertical"), e.variant === "text" && a.push("vf-button_text"), e.variant === "outlined" && a.push("vf-button_outlined"), ["small", "large"].indexOf(e.size) > -1 && a.push(`vf-button_${e.size}`), (e.loading || e.disabled) && a.push("vf-button_disabled"), e.rounded && a.push("vf-button_rounded"), a;
|
|
227
|
+
}), n = B(() => ["vf-button__icon", `vf-button__icon_${e.iconPos}`]), d = B(() => ["vf-button__label"]);
|
|
228
|
+
return (a, s) => l.value ? (m(), k("button", {
|
|
229
229
|
key: 0,
|
|
230
230
|
type: c.value,
|
|
231
|
-
class:
|
|
231
|
+
class: L(u.value),
|
|
232
232
|
disabled: e.loading || e.disabled
|
|
233
233
|
}, [
|
|
234
|
-
e.icon && !e.loading ? (
|
|
234
|
+
e.icon && !e.loading ? (m(), I(ie(de), {
|
|
235
235
|
key: 0,
|
|
236
236
|
icon: e.icon,
|
|
237
|
-
class:
|
|
238
|
-
}, null, 8, ["icon", "class"])) :
|
|
239
|
-
e.loading ? (
|
|
237
|
+
class: L(n.value)
|
|
238
|
+
}, null, 8, ["icon", "class"])) : $("", !0),
|
|
239
|
+
e.loading ? (m(), I(ie(de), {
|
|
240
240
|
key: 1,
|
|
241
241
|
icon: "circleNotch",
|
|
242
|
-
class:
|
|
242
|
+
class: L(n.value),
|
|
243
243
|
spin: ""
|
|
244
|
-
}, null, 8, ["class"])) :
|
|
245
|
-
|
|
244
|
+
}, null, 8, ["class"])) : $("", !0),
|
|
245
|
+
a.$slots.default ? (m(), k("span", {
|
|
246
246
|
key: 2,
|
|
247
|
-
class:
|
|
247
|
+
class: L(d.value)
|
|
248
248
|
}, [
|
|
249
|
-
|
|
250
|
-
], 2)) :
|
|
249
|
+
_(a.$slots, "default")
|
|
250
|
+
], 2)) : a.label ? (m(), k("span", {
|
|
251
251
|
key: 3,
|
|
252
|
-
class:
|
|
253
|
-
},
|
|
254
|
-
], 10,
|
|
252
|
+
class: L(d.value)
|
|
253
|
+
}, X(a.label), 3)) : $("", !0)
|
|
254
|
+
], 10, ut)) : (m(), I(He, {
|
|
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: L(u.value),
|
|
260
260
|
disabled: e.loading || e.disabled
|
|
261
261
|
}, {
|
|
262
|
-
default:
|
|
263
|
-
e.icon ? (
|
|
262
|
+
default: te(() => [
|
|
263
|
+
e.icon ? (m(), I(ie(de), {
|
|
264
264
|
key: 0,
|
|
265
265
|
icon: e.icon,
|
|
266
|
-
class:
|
|
267
|
-
}, null, 8, ["icon", "class"])) :
|
|
268
|
-
|
|
266
|
+
class: L(n.value)
|
|
267
|
+
}, null, 8, ["icon", "class"])) : $("", !0),
|
|
268
|
+
a.$slots.default ? (m(), k("span", {
|
|
269
269
|
key: 1,
|
|
270
|
-
class:
|
|
270
|
+
class: L(d.value)
|
|
271
271
|
}, [
|
|
272
|
-
|
|
273
|
-
], 2)) :
|
|
272
|
+
_(a.$slots, "default")
|
|
273
|
+
], 2)) : a.label ? (m(), k("span", {
|
|
274
274
|
key: 2,
|
|
275
|
-
class:
|
|
276
|
-
},
|
|
275
|
+
class: L(d.value)
|
|
276
|
+
}, X(a.label), 3)) : $("", !0)
|
|
277
277
|
]),
|
|
278
278
|
_: 3
|
|
279
279
|
}, 8, ["to", "href", "as", "class", "disabled"]));
|
|
280
280
|
}
|
|
281
|
-
}),
|
|
281
|
+
}), ft = {
|
|
282
282
|
key: 0,
|
|
283
283
|
class: "vf-input__prefix"
|
|
284
|
-
},
|
|
284
|
+
}, vt = ["type", "value", "placeholder", "disabled", "readonly"], pt = {
|
|
285
285
|
key: 1,
|
|
286
286
|
class: "vf-input__suffix"
|
|
287
|
-
},
|
|
287
|
+
}, Ro = /* @__PURE__ */ j({
|
|
288
288
|
__name: "input",
|
|
289
289
|
props: {
|
|
290
290
|
modelValue: { default: "" },
|
|
@@ -296,38 +296,75 @@ const Xe = /* @__PURE__ */ Me(Pe, [["render", Ke]]), Ye = {
|
|
|
296
296
|
variant: { default: "filled" }
|
|
297
297
|
},
|
|
298
298
|
emits: ["update:modelValue", "input", "change", "focus", "blur"],
|
|
299
|
-
setup(
|
|
300
|
-
const r = e,
|
|
301
|
-
const
|
|
302
|
-
return
|
|
303
|
-
}), c = (
|
|
304
|
-
const
|
|
305
|
-
r("update:modelValue",
|
|
306
|
-
},
|
|
307
|
-
return (
|
|
308
|
-
class:
|
|
299
|
+
setup(t, { emit: e }) {
|
|
300
|
+
const r = e, o = t, l = B(() => {
|
|
301
|
+
const d = ["vf-input", `vf-input_${o.variant}`];
|
|
302
|
+
return o.size !== "normal" && d.push(`vf-input_${o.size}`), o.disabled && d.push("vf-input_disabled"), d;
|
|
303
|
+
}), c = (d) => {
|
|
304
|
+
const a = d.target;
|
|
305
|
+
r("update:modelValue", a.value), r("input", d);
|
|
306
|
+
}, i = (d) => r("change", d), u = (d) => r("focus", d), n = (d) => r("blur", d);
|
|
307
|
+
return (d, a) => (m(), k("div", {
|
|
308
|
+
class: L(l.value)
|
|
309
309
|
}, [
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
])) :
|
|
313
|
-
|
|
310
|
+
d.$slots.prefix ? (m(), k("span", ft, [
|
|
311
|
+
_(d.$slots, "prefix")
|
|
312
|
+
])) : $("", !0),
|
|
313
|
+
R("input", {
|
|
314
314
|
class: "vf-input__control",
|
|
315
|
-
type:
|
|
316
|
-
value:
|
|
317
|
-
placeholder:
|
|
318
|
-
disabled:
|
|
319
|
-
readonly:
|
|
315
|
+
type: d.type,
|
|
316
|
+
value: d.modelValue,
|
|
317
|
+
placeholder: d.placeholder,
|
|
318
|
+
disabled: d.disabled,
|
|
319
|
+
readonly: d.readonly,
|
|
320
|
+
onInput: c,
|
|
321
|
+
onChange: i,
|
|
322
|
+
onFocus: u,
|
|
323
|
+
onBlur: n
|
|
324
|
+
}, null, 40, vt),
|
|
325
|
+
d.$slots.suffix ? (m(), k("span", pt, [
|
|
326
|
+
_(d.$slots, "suffix")
|
|
327
|
+
])) : $("", !0)
|
|
328
|
+
], 2));
|
|
329
|
+
}
|
|
330
|
+
}), gt = ["value", "placeholder", "disabled", "readonly", "rows"], Lo = /* @__PURE__ */ j({
|
|
331
|
+
__name: "textarea",
|
|
332
|
+
props: {
|
|
333
|
+
modelValue: { default: "" },
|
|
334
|
+
placeholder: { default: "" },
|
|
335
|
+
disabled: { type: Boolean, default: !1 },
|
|
336
|
+
readonly: { type: Boolean, default: !1 },
|
|
337
|
+
size: { default: "normal" },
|
|
338
|
+
variant: { default: "filled" },
|
|
339
|
+
rows: { default: 3 }
|
|
340
|
+
},
|
|
341
|
+
emits: ["update:modelValue", "input", "change", "focus", "blur"],
|
|
342
|
+
setup(t, { emit: e }) {
|
|
343
|
+
const r = e, o = t, l = B(() => {
|
|
344
|
+
const d = ["vf-textarea", `vf-textarea_${o.variant}`];
|
|
345
|
+
return o.size !== "normal" && d.push(`vf-textarea_${o.size}`), o.disabled && d.push("vf-textarea_disabled"), d;
|
|
346
|
+
}), c = (d) => {
|
|
347
|
+
const a = d.target;
|
|
348
|
+
r("update:modelValue", a.value), r("input", d);
|
|
349
|
+
}, i = (d) => r("change", d), u = (d) => r("focus", d), n = (d) => r("blur", d);
|
|
350
|
+
return (d, a) => (m(), k("div", {
|
|
351
|
+
class: L(l.value)
|
|
352
|
+
}, [
|
|
353
|
+
R("textarea", {
|
|
354
|
+
class: "vf-textarea__control",
|
|
355
|
+
value: d.modelValue,
|
|
356
|
+
placeholder: d.placeholder,
|
|
357
|
+
disabled: d.disabled,
|
|
358
|
+
readonly: d.readonly,
|
|
359
|
+
rows: d.rows,
|
|
320
360
|
onInput: c,
|
|
321
|
-
onChange:
|
|
322
|
-
onFocus:
|
|
361
|
+
onChange: i,
|
|
362
|
+
onFocus: u,
|
|
323
363
|
onBlur: n
|
|
324
|
-
}, null, 40,
|
|
325
|
-
u.$slots.suffix ? (b(), y("span", Qe, [
|
|
326
|
-
C(u.$slots, "suffix")
|
|
327
|
-
])) : w("", !0)
|
|
364
|
+
}, null, 40, gt)
|
|
328
365
|
], 2));
|
|
329
366
|
}
|
|
330
|
-
}),
|
|
367
|
+
}), ze = [
|
|
331
368
|
"top",
|
|
332
369
|
"top-start",
|
|
333
370
|
"top-end",
|
|
@@ -340,368 +377,406 @@ const Xe = /* @__PURE__ */ Me(Pe, [["render", Ke]]), Ye = {
|
|
|
340
377
|
"left",
|
|
341
378
|
"left-start",
|
|
342
379
|
"left-end"
|
|
343
|
-
],
|
|
344
|
-
if (
|
|
380
|
+
], q = (t) => {
|
|
381
|
+
if (t == null || !(t instanceof HTMLElement))
|
|
345
382
|
return null;
|
|
346
383
|
if (typeof window < "u") {
|
|
347
|
-
const e = window.getComputedStyle(
|
|
384
|
+
const e = window.getComputedStyle(t), r = `${e.overflowX}${e.overflowY}`;
|
|
348
385
|
if (/(auto|scroll|overlay)/.test(r))
|
|
349
|
-
return
|
|
386
|
+
return t;
|
|
350
387
|
}
|
|
351
|
-
return
|
|
388
|
+
return t.scrollHeight > t.clientHeight || t.scrollWidth > t.clientWidth ? t : q(t.parentNode);
|
|
352
389
|
};
|
|
353
|
-
function
|
|
354
|
-
return typeof window > "u" ? !1 : window.getComputedStyle(
|
|
390
|
+
function ht(t) {
|
|
391
|
+
return typeof window > "u" ? !1 : window.getComputedStyle(t).position === "fixed";
|
|
355
392
|
}
|
|
356
|
-
const
|
|
357
|
-
const
|
|
393
|
+
const mt = (t, e) => t.strategy ? t.strategy : ht(e) ? "fixed" : "absolute", Q = (t, e) => mt(t, e) === "fixed", A = (t, e, r = {}) => {
|
|
394
|
+
const o = t.getBoundingClientRect(), l = e ? e.offsetParent : null, c = e ? Q(r, e) : !1;
|
|
358
395
|
if (l && !c) {
|
|
359
|
-
const
|
|
396
|
+
const i = l.getBoundingClientRect(), u = l.scrollLeft, n = l.scrollTop;
|
|
360
397
|
return {
|
|
361
|
-
left:
|
|
362
|
-
top:
|
|
363
|
-
width:
|
|
364
|
-
height:
|
|
398
|
+
left: o.left - i.left + u,
|
|
399
|
+
top: o.top - i.top + n,
|
|
400
|
+
width: o.width,
|
|
401
|
+
height: o.height
|
|
365
402
|
};
|
|
366
403
|
}
|
|
367
404
|
return {
|
|
368
|
-
left:
|
|
369
|
-
top:
|
|
370
|
-
width:
|
|
371
|
-
height:
|
|
405
|
+
left: o.left,
|
|
406
|
+
top: o.top,
|
|
407
|
+
width: o.width,
|
|
408
|
+
height: o.height
|
|
372
409
|
};
|
|
373
|
-
},
|
|
410
|
+
}, oe = (t, e) => {
|
|
374
411
|
var r;
|
|
375
|
-
return (r =
|
|
376
|
-
},
|
|
377
|
-
const e =
|
|
412
|
+
return (r = t.middleware) == null ? void 0 : r.find((o) => o.name === e);
|
|
413
|
+
}, Ee = (t, e) => !!oe(t, e), bt = (t) => {
|
|
414
|
+
const e = q(t);
|
|
378
415
|
let r = "";
|
|
379
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;
|
|
380
|
-
},
|
|
381
|
-
if (r === null && typeof window < "u" &&
|
|
382
|
-
return
|
|
417
|
+
}, he = (t) => t.scrollLeft + t.clientWidth, me = (t) => t.scrollTop + t.clientHeight, K = (t, e, r = null, o = {}, l) => {
|
|
418
|
+
if (r === null && typeof window < "u" && Q(o, e))
|
|
419
|
+
return t;
|
|
383
420
|
let c = 0;
|
|
384
421
|
if (r === null) {
|
|
385
|
-
const
|
|
386
|
-
c =
|
|
422
|
+
const i = q(e);
|
|
423
|
+
c = i ? i.scrollTop : 0;
|
|
387
424
|
}
|
|
388
|
-
return
|
|
389
|
-
},
|
|
425
|
+
return t - c;
|
|
426
|
+
}, G = (t, e, r = null, o = {}, l) => {
|
|
390
427
|
let c;
|
|
391
|
-
if (r === null && typeof window < "u" &&
|
|
428
|
+
if (r === null && typeof window < "u" && Q(o, e))
|
|
392
429
|
c = window.innerWidth;
|
|
393
430
|
else if (r === null) {
|
|
394
|
-
const
|
|
395
|
-
c =
|
|
431
|
+
const i = q(e);
|
|
432
|
+
c = i ? he(i) : 0;
|
|
396
433
|
} else
|
|
397
434
|
c = r.getBoundingClientRect().width;
|
|
398
|
-
return -(
|
|
399
|
-
},
|
|
435
|
+
return -(t + e.clientWidth - c);
|
|
436
|
+
}, Z = (t, e, r = null, o = {}, l) => {
|
|
400
437
|
let c;
|
|
401
|
-
if (r === null && typeof window < "u" &&
|
|
438
|
+
if (r === null && typeof window < "u" && Q(o, e))
|
|
402
439
|
c = window.innerHeight;
|
|
403
440
|
else if (r === null) {
|
|
404
|
-
const
|
|
405
|
-
c =
|
|
441
|
+
const i = q(e);
|
|
442
|
+
c = i ? me(i) : 0;
|
|
406
443
|
} else
|
|
407
444
|
c = r.getBoundingClientRect().height;
|
|
408
|
-
return -(
|
|
409
|
-
},
|
|
410
|
-
if (r === null && typeof window < "u" &&
|
|
411
|
-
return
|
|
445
|
+
return -(t + e.clientHeight - c);
|
|
446
|
+
}, U = (t, e, r = null, o = {}, l) => {
|
|
447
|
+
if (r === null && typeof window < "u" && Q(o, e))
|
|
448
|
+
return t;
|
|
412
449
|
let c = 0;
|
|
413
450
|
if (r === null) {
|
|
414
|
-
const
|
|
415
|
-
c =
|
|
451
|
+
const i = q(e);
|
|
452
|
+
c = i ? i.scrollLeft : 0;
|
|
416
453
|
}
|
|
417
|
-
return
|
|
418
|
-
},
|
|
419
|
-
options:
|
|
454
|
+
return t - c;
|
|
455
|
+
}, Se = ({
|
|
456
|
+
options: t,
|
|
420
457
|
primaryX: e,
|
|
421
458
|
primaryY: r,
|
|
422
|
-
floating:
|
|
459
|
+
floating: o,
|
|
423
460
|
placement: l,
|
|
424
461
|
reference: c,
|
|
425
|
-
scrollDirection:
|
|
462
|
+
scrollDirection: i
|
|
426
463
|
}) => {
|
|
427
|
-
const
|
|
464
|
+
const u = be(c, o, l, t), n = oe(t, "offset");
|
|
428
465
|
if (n) {
|
|
429
|
-
const
|
|
430
|
-
x:
|
|
431
|
-
y:
|
|
432
|
-
options:
|
|
466
|
+
const d = n.fn({
|
|
467
|
+
x: u.x,
|
|
468
|
+
y: u.y,
|
|
469
|
+
options: t,
|
|
433
470
|
primaryX: e,
|
|
434
471
|
primaryY: r,
|
|
435
|
-
floating:
|
|
472
|
+
floating: o,
|
|
436
473
|
placement: l,
|
|
437
474
|
reference: c,
|
|
438
|
-
scrollDirection:
|
|
475
|
+
scrollDirection: i
|
|
439
476
|
});
|
|
440
|
-
|
|
477
|
+
u.x = d.x, u.y = d.y;
|
|
441
478
|
}
|
|
442
|
-
return
|
|
443
|
-
x:
|
|
444
|
-
y:
|
|
479
|
+
return Wt(u, o, c, t) ? {
|
|
480
|
+
x: u.x,
|
|
481
|
+
y: u.y,
|
|
445
482
|
placement: l
|
|
446
483
|
} : !1;
|
|
447
|
-
},
|
|
484
|
+
}, Me = (t) => ({
|
|
448
485
|
name: "flip",
|
|
449
|
-
params:
|
|
486
|
+
params: t,
|
|
450
487
|
fn: ({
|
|
451
488
|
x: e,
|
|
452
489
|
y: r,
|
|
453
|
-
options:
|
|
490
|
+
options: o,
|
|
454
491
|
primaryX: l,
|
|
455
492
|
primaryY: c,
|
|
456
|
-
floating:
|
|
457
|
-
placement:
|
|
493
|
+
floating: i,
|
|
494
|
+
placement: u,
|
|
458
495
|
reference: n,
|
|
459
|
-
scrollDirection:
|
|
496
|
+
scrollDirection: d
|
|
460
497
|
}) => {
|
|
461
|
-
var
|
|
462
|
-
const
|
|
498
|
+
var a;
|
|
499
|
+
const s = {
|
|
463
500
|
x: e,
|
|
464
501
|
y: r,
|
|
465
|
-
placement:
|
|
466
|
-
},
|
|
467
|
-
...
|
|
468
|
-
middleware: (
|
|
469
|
-
},
|
|
470
|
-
let
|
|
502
|
+
placement: u
|
|
503
|
+
}, v = {
|
|
504
|
+
...o,
|
|
505
|
+
middleware: (a = o.middleware) == null ? void 0 : a.filter((z) => z.name !== "shift")
|
|
506
|
+
}, f = (t == null ? void 0 : t.placements) ?? ze, p = !(t != null && t.placements), C = p ? ze : f;
|
|
507
|
+
let b = !1;
|
|
471
508
|
const x = (z) => {
|
|
472
|
-
if (
|
|
509
|
+
if (b)
|
|
473
510
|
return;
|
|
474
|
-
const S =
|
|
475
|
-
options:
|
|
511
|
+
const S = Se({
|
|
512
|
+
options: v,
|
|
476
513
|
primaryX: l,
|
|
477
514
|
primaryY: c,
|
|
478
|
-
floating:
|
|
515
|
+
floating: i,
|
|
479
516
|
placement: z,
|
|
480
517
|
reference: n,
|
|
481
|
-
scrollDirection:
|
|
518
|
+
scrollDirection: d
|
|
482
519
|
});
|
|
483
|
-
S && (
|
|
484
|
-
},
|
|
485
|
-
if (!p &&
|
|
486
|
-
const z =
|
|
487
|
-
(S,
|
|
488
|
-
const
|
|
489
|
-
options:
|
|
520
|
+
S && (s.x = S.x, s.y = S.y, s.placement = S.placement, b = !0);
|
|
521
|
+
}, V = Ht(n, i, v);
|
|
522
|
+
if (!p && f.includes(u) && x(u), b || C.forEach(x), !b) {
|
|
523
|
+
const z = f.reduce(
|
|
524
|
+
(S, w) => {
|
|
525
|
+
const F = Se({
|
|
526
|
+
options: v,
|
|
490
527
|
primaryX: l,
|
|
491
528
|
primaryY: c,
|
|
492
|
-
floating:
|
|
493
|
-
placement:
|
|
529
|
+
floating: i,
|
|
530
|
+
placement: w,
|
|
494
531
|
reference: n,
|
|
495
|
-
scrollDirection:
|
|
532
|
+
scrollDirection: d
|
|
496
533
|
});
|
|
497
|
-
if (!
|
|
534
|
+
if (!F)
|
|
498
535
|
return S;
|
|
499
|
-
const
|
|
500
|
-
return !S || W > S.space ? { result:
|
|
536
|
+
const O = fe(w), W = V[O];
|
|
537
|
+
return !S || W > S.space ? { result: F, space: W } : S;
|
|
501
538
|
},
|
|
502
539
|
null
|
|
503
540
|
);
|
|
504
|
-
z && (
|
|
541
|
+
z && (s.x = z.result.x, s.y = z.result.y, s.placement = z.result.placement, b = !0);
|
|
505
542
|
}
|
|
506
|
-
if (!
|
|
507
|
-
const z =
|
|
508
|
-
let S = z,
|
|
509
|
-
|
|
510
|
-
const g =
|
|
511
|
-
|
|
543
|
+
if (!b && f.length > 0) {
|
|
544
|
+
const z = fe(u);
|
|
545
|
+
let S = z, w = V[z];
|
|
546
|
+
f.forEach((h) => {
|
|
547
|
+
const g = fe(h), y = V[g];
|
|
548
|
+
y > w && (w = y, S = g);
|
|
512
549
|
});
|
|
513
|
-
const
|
|
550
|
+
const F = Ot(S, u, f), O = be(n, i, F, v), W = oe(v, "offset");
|
|
514
551
|
if (W) {
|
|
515
552
|
const h = W.fn({
|
|
516
|
-
x:
|
|
517
|
-
y:
|
|
518
|
-
options:
|
|
553
|
+
x: O.x,
|
|
554
|
+
y: O.y,
|
|
555
|
+
options: v,
|
|
519
556
|
primaryX: l,
|
|
520
557
|
primaryY: c,
|
|
521
|
-
floating:
|
|
522
|
-
placement:
|
|
558
|
+
floating: i,
|
|
559
|
+
placement: F,
|
|
523
560
|
reference: n,
|
|
524
|
-
scrollDirection:
|
|
561
|
+
scrollDirection: d
|
|
525
562
|
});
|
|
526
|
-
|
|
563
|
+
O.x = h.x, O.y = h.y;
|
|
527
564
|
}
|
|
528
|
-
|
|
565
|
+
s.x = O.x, s.y = O.y, s.placement = O.placement;
|
|
529
566
|
}
|
|
530
|
-
return
|
|
567
|
+
return s;
|
|
531
568
|
}
|
|
532
|
-
}),
|
|
533
|
-
var c,
|
|
569
|
+
}), Pe = (t, e, r, o, l) => {
|
|
570
|
+
var c, i, u;
|
|
534
571
|
let n = 0;
|
|
535
|
-
|
|
536
|
-
const
|
|
537
|
-
if (
|
|
538
|
-
const
|
|
539
|
-
|
|
572
|
+
o.startsWith("right") ? n = -t : o.startsWith("left") && (n = t);
|
|
573
|
+
const d = oe(e, "arrow"), a = oe(e, "shift");
|
|
574
|
+
if (d) {
|
|
575
|
+
const s = ((c = d.params) == null ? void 0 : c.arrow).getBoundingClientRect();
|
|
576
|
+
o.startsWith("right") ? n -= s.width / 2 : o.startsWith("left") && (n += s.width / 2);
|
|
540
577
|
}
|
|
541
|
-
if (
|
|
542
|
-
let
|
|
543
|
-
|
|
544
|
-
const
|
|
545
|
-
|
|
578
|
+
if (Ee(e, "shift") && d) {
|
|
579
|
+
let s = null, v = 0;
|
|
580
|
+
a && (s = (i = a.params) == null ? void 0 : i.parent);
|
|
581
|
+
const f = (u = d.params) == null ? void 0 : u.arrow;
|
|
582
|
+
v = f.getBoundingClientRect().width / 2, v += kt(f), v -= t, o.startsWith("right") ? G(r - n, l, s, e) <= t ? G(r, l, s, e) > 0 ? n = t - G(r, l, s, e) : n = t : U(r - n - v, l, s, e) <= t && (U(r - n - v, l, s, e) >= 0 ? (n = -t - (U(r - n - v, l, s, e) + t), s && (n = -t)) : n = -t) : o.startsWith("left") ? G(r - n + v, l, s, e) <= t ? (n = t + G(r - v, l, s, e), n <= t && (n = t)) : U(r - n, l, s, e) <= t && (n = -t + U(r, l, s, e), n <= -t && (n = -t)) : G(r - n, l, s, e) <= t ? G(r - n, l, s, e) <= t && G(r, l, s, e) > 0 ? n = t - G(r, l, s, e) : n = t : U(r - n, l, s, e) <= t && (U(r - n, l, s, e) <= t && U(r, l, s, e) > 0 ? n = -(t - U(r, l, s, e)) : n = -t);
|
|
546
583
|
}
|
|
547
584
|
return n;
|
|
548
|
-
},
|
|
549
|
-
var c,
|
|
585
|
+
}, Ae = (t, e, r, o, l) => {
|
|
586
|
+
var c, i, u;
|
|
550
587
|
let n = 0;
|
|
551
|
-
|
|
552
|
-
const
|
|
553
|
-
if (
|
|
554
|
-
const
|
|
555
|
-
|
|
588
|
+
o.startsWith("top") ? n = t : o.startsWith("bottom") && (n = -t);
|
|
589
|
+
const d = oe(e, "arrow"), a = oe(e, "shift");
|
|
590
|
+
if (d) {
|
|
591
|
+
const s = ((c = d.params) == null ? void 0 : c.arrow).getBoundingClientRect();
|
|
592
|
+
o.startsWith("top") ? n += s.height / 2 : o.startsWith("bottom") && (n -= s.height / 2);
|
|
556
593
|
}
|
|
557
|
-
if (
|
|
558
|
-
let
|
|
559
|
-
|
|
560
|
-
const
|
|
561
|
-
|
|
594
|
+
if (Ee(e, "shift") && d) {
|
|
595
|
+
let s = null, v = 0;
|
|
596
|
+
a && (s = (i = a.params) == null ? void 0 : i.parent);
|
|
597
|
+
const f = (u = d.params) == null ? void 0 : u.arrow;
|
|
598
|
+
v = f.getBoundingClientRect().height / 2, v += Ct(f), v -= t, o.startsWith("top") ? K(r - n, l, s, e) <= t ? K(r, l, s, e) >= 0 ? n = -(t - K(r, l, s, e)) : n = -t : Z(r - n + v, l, s, e) <= t && (n = t + Z(r - v, l, s, e), n <= t && (n = t)) : o.startsWith("bottom") ? K(r - n - v, l, s, e) <= t ? K(r - n - v, l, s, e) >= 0 ? (n = -t - (K(r - n - v, l, s, e) + t), s && (n = -t)) : n = -t : Z(r - n, l, s, e) <= t && (Z(r, l, s, e) >= 0 ? n = t - Z(r, l, s, e) : n = t) : K(r - n, l, s, e) <= t ? K(r - n, l, s, e) >= 0 ? n = -(t - K(r - n, l, s, e)) : n = -t : Z(r - n, l, s, e) <= t && (Z(r - n, l, s, e) >= 0 ? n = t - Z(r - n, l, s, e) : n = t);
|
|
562
599
|
}
|
|
563
600
|
return n;
|
|
564
|
-
},
|
|
601
|
+
}, De = (t) => ({
|
|
565
602
|
name: "offset",
|
|
566
|
-
params: { value:
|
|
603
|
+
params: { value: t },
|
|
567
604
|
fn: ({
|
|
568
605
|
x: e,
|
|
569
606
|
y: r,
|
|
570
|
-
options:
|
|
607
|
+
options: o,
|
|
571
608
|
primaryX: l,
|
|
572
609
|
primaryY: c,
|
|
573
|
-
floating:
|
|
574
|
-
placement:
|
|
610
|
+
floating: i,
|
|
611
|
+
placement: u
|
|
575
612
|
}) => ({
|
|
576
|
-
x: e -
|
|
577
|
-
y: r -
|
|
578
|
-
placement:
|
|
613
|
+
x: e - Pe(t, o, l, u, i),
|
|
614
|
+
y: r - Ae(t, o, c, u, i),
|
|
615
|
+
placement: u
|
|
579
616
|
})
|
|
580
|
-
}),
|
|
581
|
-
|
|
617
|
+
}), yt = (t) => ({
|
|
618
|
+
name: "shift",
|
|
619
|
+
params: t,
|
|
620
|
+
fn: ({
|
|
621
|
+
x: e,
|
|
622
|
+
y: r,
|
|
623
|
+
options: o,
|
|
624
|
+
primaryX: l,
|
|
625
|
+
primaryY: c,
|
|
626
|
+
floating: i,
|
|
627
|
+
placement: u,
|
|
628
|
+
reference: n
|
|
629
|
+
}) => {
|
|
630
|
+
var d;
|
|
631
|
+
const a = {
|
|
632
|
+
x: e,
|
|
633
|
+
y: r,
|
|
634
|
+
placement: u
|
|
635
|
+
}, s = o.middleware || [], v = s.findIndex((y) => y.name === "shift"), f = s.findIndex((y) => y.name === "offset"), p = f !== -1 && (v === -1 || f > v), C = s.find((y) => y.name === "offset"), b = C ? (d = C.params) == null ? void 0 : d.value : 0, x = p ? Pe(b, o, l, u, i) : 0, V = p ? Ae(b, o, c, u, i) : 0, z = e - x, S = r - V;
|
|
636
|
+
let w = z, F = S;
|
|
637
|
+
const O = C ? Math.abs(b) : 0, W = O, h = O;
|
|
638
|
+
if (Q(o, i) && typeof window < "u") {
|
|
639
|
+
const y = W, T = window.innerWidth - i.clientWidth - W, H = T < y ? y : T, E = h, D = window.innerHeight - i.clientHeight - h, M = D < E ? E : D;
|
|
640
|
+
w < y ? w = y : w > H && (w = H), F < E ? F = E : F > M && (F = M), p ? (a.x = e + (w - z), a.y = r + (F - S)) : (a.x = w, a.y = F);
|
|
641
|
+
const N = W, Y = window.innerWidth - i.clientWidth - W, ee = h, ue = window.innerHeight - i.clientHeight - h, se = p ? N + x : N, ve = p ? Y + x : Y, pe = p ? ee + V : ee, ge = p ? ue + V : ue;
|
|
642
|
+
return a.x < se ? a.x = se : a.x > ve && (a.x = ve), a.y < pe ? a.y = pe : a.y > ge && (a.y = ge), a;
|
|
643
|
+
}
|
|
644
|
+
const g = q(i);
|
|
645
|
+
if (g !== null) {
|
|
646
|
+
const y = A(n, i, o), T = y.left, H = y.left + y.width, E = y.top, D = y.top + y.height, M = g.scrollLeft + W, N = he(g) - i.clientWidth - W, Y = N < M ? M : N, ee = g.scrollTop + h, ue = me(g) - i.clientHeight - h, se = ue < ee ? ee : ue, ve = g.scrollLeft, pe = he(g), ge = g.scrollTop, Ne = me(g);
|
|
647
|
+
H <= ve ? w = M : T >= pe && (w = Y), D <= ge ? F = ee : E >= Ne && (F = se), F < ee ? F = ee : F > se && (F = se), w < M ? w = M : w > Y && (w = Y);
|
|
648
|
+
}
|
|
649
|
+
if (p ? (a.x = e + (w - z), a.y = r + (F - S)) : (a.x = w, a.y = F), g !== null) {
|
|
650
|
+
const y = g.scrollLeft + W, T = he(g) - i.clientWidth - W, H = g.scrollTop + h, E = me(g) - i.clientHeight - h, D = p ? y + x : y, M = p ? T + x : T, N = p ? H + V : H, Y = p ? E + V : E;
|
|
651
|
+
a.x < D ? a.x = D : a.x > M && (a.x = M), a.y < N ? a.y = N : a.y > Y && (a.y = Y);
|
|
652
|
+
}
|
|
653
|
+
return a;
|
|
654
|
+
}
|
|
655
|
+
}), kt = (t) => t.getBoundingClientRect().width !== t.clientWidth ? (t.getBoundingClientRect().width - t.clientWidth) / 2 : 0, Ct = (t) => t.getBoundingClientRect().height !== t.clientHeight ? (t.getBoundingClientRect().height - t.clientHeight) / 2 : 0, Ie = (t, e) => {
|
|
656
|
+
const r = q(t), o = [];
|
|
582
657
|
if (r !== null) {
|
|
583
658
|
const l = () => e();
|
|
584
|
-
r.addEventListener("scroll", l, !1),
|
|
659
|
+
r.addEventListener("scroll", l, !1), o.push(() => r.removeEventListener("scroll", l, !1));
|
|
585
660
|
}
|
|
586
661
|
if (typeof window < "u") {
|
|
587
662
|
const l = () => e(), c = () => e();
|
|
588
|
-
window.addEventListener("scroll", l, !1), window.addEventListener("resize", c, !1),
|
|
663
|
+
window.addEventListener("scroll", l, !1), window.addEventListener("resize", c, !1), o.push(() => window.removeEventListener("scroll", l, !1)), o.push(() => window.removeEventListener("resize", c, !1));
|
|
589
664
|
}
|
|
590
|
-
if (typeof ResizeObserver < "u" &&
|
|
665
|
+
if (typeof ResizeObserver < "u" && t instanceof HTMLElement) {
|
|
591
666
|
const l = new ResizeObserver(() => e());
|
|
592
|
-
l.observe(
|
|
667
|
+
l.observe(t), o.push(() => l.disconnect());
|
|
593
668
|
}
|
|
594
|
-
return () =>
|
|
595
|
-
},
|
|
596
|
-
const
|
|
669
|
+
return () => o.forEach((l) => l());
|
|
670
|
+
}, wt = (t, e, r = {}) => {
|
|
671
|
+
const o = A(t, e, r);
|
|
597
672
|
return {
|
|
598
|
-
x:
|
|
599
|
-
y:
|
|
673
|
+
x: o.left - e.getBoundingClientRect().width / 2 + o.width / 2,
|
|
674
|
+
y: o.top - e.getBoundingClientRect().height,
|
|
600
675
|
placement: "top"
|
|
601
676
|
};
|
|
602
|
-
},
|
|
603
|
-
const
|
|
677
|
+
}, _t = (t, e, r = {}) => {
|
|
678
|
+
const o = A(t, e, r);
|
|
604
679
|
return {
|
|
605
|
-
x:
|
|
606
|
-
y:
|
|
680
|
+
x: o.left,
|
|
681
|
+
y: o.top - e.getBoundingClientRect().height,
|
|
607
682
|
placement: "top-start"
|
|
608
683
|
};
|
|
609
|
-
},
|
|
610
|
-
const
|
|
684
|
+
}, $t = (t, e, r = {}) => {
|
|
685
|
+
const o = A(t, e, r);
|
|
611
686
|
return {
|
|
612
|
-
x:
|
|
613
|
-
y:
|
|
687
|
+
x: o.left - e.getBoundingClientRect().width + o.width,
|
|
688
|
+
y: o.top - e.getBoundingClientRect().height,
|
|
614
689
|
placement: "top-end"
|
|
615
690
|
};
|
|
616
|
-
},
|
|
617
|
-
const
|
|
691
|
+
}, xt = (t, e, r = {}) => {
|
|
692
|
+
const o = A(t, e, r);
|
|
618
693
|
return {
|
|
619
|
-
x:
|
|
620
|
-
y:
|
|
694
|
+
x: o.left + o.width,
|
|
695
|
+
y: o.top - e.getBoundingClientRect().height / 2 + o.height / 2,
|
|
621
696
|
placement: "right"
|
|
622
697
|
};
|
|
623
|
-
},
|
|
624
|
-
const
|
|
698
|
+
}, Ft = (t, e, r = {}) => {
|
|
699
|
+
const o = A(t, e, r);
|
|
625
700
|
return {
|
|
626
|
-
x:
|
|
627
|
-
y:
|
|
701
|
+
x: o.left + o.width,
|
|
702
|
+
y: o.top,
|
|
628
703
|
placement: "right-start"
|
|
629
704
|
};
|
|
630
|
-
},
|
|
631
|
-
const
|
|
705
|
+
}, Bt = (t, e, r = {}) => {
|
|
706
|
+
const o = A(t, e, r);
|
|
632
707
|
return {
|
|
633
|
-
x:
|
|
634
|
-
y:
|
|
708
|
+
x: o.left + o.width,
|
|
709
|
+
y: o.top + o.height - e.getBoundingClientRect().height,
|
|
635
710
|
placement: "right-end"
|
|
636
711
|
};
|
|
637
|
-
},
|
|
638
|
-
const
|
|
712
|
+
}, zt = (t, e, r = {}) => {
|
|
713
|
+
const o = A(t, e, r);
|
|
639
714
|
return {
|
|
640
|
-
x:
|
|
641
|
-
y:
|
|
715
|
+
x: o.left + o.width / 2 - e.getBoundingClientRect().width / 2,
|
|
716
|
+
y: o.top + o.height,
|
|
642
717
|
placement: "bottom"
|
|
643
718
|
};
|
|
644
|
-
},
|
|
645
|
-
const
|
|
719
|
+
}, St = (t, e, r = {}) => {
|
|
720
|
+
const o = A(t, e, r);
|
|
646
721
|
return {
|
|
647
|
-
x:
|
|
648
|
-
y:
|
|
722
|
+
x: o.left,
|
|
723
|
+
y: o.top + o.height,
|
|
649
724
|
placement: "bottom-start"
|
|
650
725
|
};
|
|
651
|
-
},
|
|
652
|
-
const
|
|
726
|
+
}, Tt = (t, e, r = {}) => {
|
|
727
|
+
const o = A(t, e, r);
|
|
653
728
|
return {
|
|
654
|
-
x:
|
|
655
|
-
y:
|
|
729
|
+
x: o.left - e.getBoundingClientRect().width + o.width,
|
|
730
|
+
y: o.top + o.height,
|
|
656
731
|
placement: "bottom-end"
|
|
657
732
|
};
|
|
658
|
-
},
|
|
659
|
-
const
|
|
733
|
+
}, Rt = (t, e, r = {}) => {
|
|
734
|
+
const o = A(t, e, r);
|
|
660
735
|
return {
|
|
661
|
-
x:
|
|
662
|
-
y:
|
|
736
|
+
x: o.left - e.getBoundingClientRect().width,
|
|
737
|
+
y: o.top + o.height / 2 - e.getBoundingClientRect().height / 2,
|
|
663
738
|
placement: "left"
|
|
664
739
|
};
|
|
665
|
-
},
|
|
666
|
-
const
|
|
740
|
+
}, Lt = (t, e, r = {}) => {
|
|
741
|
+
const o = A(t, e, r);
|
|
667
742
|
return {
|
|
668
|
-
x:
|
|
669
|
-
y:
|
|
743
|
+
x: o.left - e.getBoundingClientRect().width,
|
|
744
|
+
y: o.top,
|
|
670
745
|
placement: "left-start"
|
|
671
746
|
};
|
|
672
|
-
},
|
|
673
|
-
const
|
|
747
|
+
}, Vt = (t, e, r = {}) => {
|
|
748
|
+
const o = A(t, e, r);
|
|
674
749
|
return {
|
|
675
|
-
x:
|
|
676
|
-
y:
|
|
750
|
+
x: o.left - e.getBoundingClientRect().width,
|
|
751
|
+
y: o.top + o.height - e.getBoundingClientRect().height,
|
|
677
752
|
placement: "left-end"
|
|
678
753
|
};
|
|
679
|
-
},
|
|
754
|
+
}, be = (t, e, r, o = {}) => {
|
|
680
755
|
switch (r) {
|
|
681
756
|
case "top":
|
|
682
|
-
return
|
|
757
|
+
return wt(t, e, o);
|
|
683
758
|
case "top-start":
|
|
684
|
-
return
|
|
759
|
+
return _t(t, e, o);
|
|
685
760
|
case "top-end":
|
|
686
|
-
return
|
|
761
|
+
return $t(t, e, o);
|
|
687
762
|
case "right":
|
|
688
|
-
return
|
|
763
|
+
return xt(t, e, o);
|
|
689
764
|
case "right-start":
|
|
690
|
-
return
|
|
765
|
+
return Ft(t, e, o);
|
|
691
766
|
case "right-end":
|
|
692
|
-
return
|
|
767
|
+
return Bt(t, e, o);
|
|
693
768
|
case "bottom":
|
|
694
|
-
return
|
|
769
|
+
return zt(t, e, o);
|
|
695
770
|
case "bottom-start":
|
|
696
|
-
return
|
|
771
|
+
return St(t, e, o);
|
|
697
772
|
case "bottom-end":
|
|
698
|
-
return
|
|
773
|
+
return Tt(t, e, o);
|
|
699
774
|
case "left":
|
|
700
|
-
return
|
|
775
|
+
return Rt(t, e, o);
|
|
701
776
|
case "left-start":
|
|
702
|
-
return
|
|
777
|
+
return Lt(t, e, o);
|
|
703
778
|
case "left-end":
|
|
704
|
-
return
|
|
779
|
+
return Vt(t, e, o);
|
|
705
780
|
default:
|
|
706
781
|
return {
|
|
707
782
|
x: 0,
|
|
@@ -709,25 +784,25 @@ const oo = (o, e) => o.strategy ? o.strategy : eo(e) ? "fixed" : "absolute", q =
|
|
|
709
784
|
placement: ""
|
|
710
785
|
};
|
|
711
786
|
}
|
|
712
|
-
},
|
|
713
|
-
if (
|
|
787
|
+
}, Wt = (t, e, r, o = {}) => {
|
|
788
|
+
if (Q(o, e)) {
|
|
714
789
|
if (typeof window > "u")
|
|
715
790
|
return !0;
|
|
716
|
-
const
|
|
717
|
-
return
|
|
791
|
+
const s = t.x, v = t.y, f = s + e.clientWidth, p = v + e.clientHeight;
|
|
792
|
+
return s >= 0 && v >= 0 && f <= window.innerWidth && p <= window.innerHeight;
|
|
718
793
|
}
|
|
719
|
-
if (
|
|
720
|
-
return
|
|
794
|
+
if (q(r) !== null)
|
|
795
|
+
return K(t.y, e, null, o) > 0 && G(t.x, e, null, o) > 0 && Z(t.y, e, null, o) > 0 && U(t.x, e, null, o) > 0;
|
|
721
796
|
if (typeof window > "u")
|
|
722
797
|
return !0;
|
|
723
|
-
const l = window.innerWidth, c = window.innerHeight,
|
|
724
|
-
if (
|
|
725
|
-
const
|
|
726
|
-
return
|
|
798
|
+
const l = window.innerWidth, c = window.innerHeight, i = (r instanceof HTMLElement ? r.offsetParent : null) || e.offsetParent;
|
|
799
|
+
if (i) {
|
|
800
|
+
const s = i.getBoundingClientRect(), v = s.left + t.x, f = s.top + t.y, p = v + e.clientWidth, C = f + e.clientHeight;
|
|
801
|
+
return v >= 0 && f >= 0 && p <= l && C <= c;
|
|
727
802
|
}
|
|
728
|
-
const
|
|
729
|
-
return
|
|
730
|
-
},
|
|
803
|
+
const u = t.x, n = t.y, d = u + e.clientWidth, a = n + e.clientHeight;
|
|
804
|
+
return u >= 0 && n >= 0 && d <= l && a <= c;
|
|
805
|
+
}, fe = (t) => t.startsWith("right") ? "right" : t.startsWith("left") ? "left" : t.startsWith("top") ? "top" : "bottom", Ot = (t, e, r) => fe(e) === t && r.includes(e) ? e : r.find((o) => fe(o) === t) ?? r[0], Ht = (t, e, r = {}) => {
|
|
731
806
|
if (typeof window > "u")
|
|
732
807
|
return {
|
|
733
808
|
top: 0,
|
|
@@ -735,7 +810,7 @@ const oo = (o, e) => o.strategy ? o.strategy : eo(e) ? "fixed" : "absolute", q =
|
|
|
735
810
|
bottom: 0,
|
|
736
811
|
left: 0
|
|
737
812
|
};
|
|
738
|
-
const
|
|
813
|
+
const o = Q(r, e) ? null : q(t), l = t.getBoundingClientRect(), c = o ? o.getBoundingClientRect() : {
|
|
739
814
|
top: 0,
|
|
740
815
|
left: 0,
|
|
741
816
|
right: window.innerWidth,
|
|
@@ -747,39 +822,39 @@ const oo = (o, e) => o.strategy ? o.strategy : eo(e) ? "fixed" : "absolute", q =
|
|
|
747
822
|
bottom: c.bottom - l.bottom,
|
|
748
823
|
left: l.left - c.left
|
|
749
824
|
};
|
|
750
|
-
},
|
|
825
|
+
}, Xe = (t, e, r = {}) => new Promise((o) => {
|
|
751
826
|
var l, c;
|
|
752
|
-
const
|
|
827
|
+
const i = r.placement ? r.placement : "bottom", u = {
|
|
753
828
|
x: 0,
|
|
754
829
|
y: 0,
|
|
755
|
-
placement:
|
|
830
|
+
placement: i,
|
|
756
831
|
middlewareData: {}
|
|
757
|
-
}, n =
|
|
758
|
-
|
|
759
|
-
const
|
|
760
|
-
(l = r.middleware) == null || l.forEach((
|
|
761
|
-
const
|
|
762
|
-
x:
|
|
763
|
-
y:
|
|
832
|
+
}, n = be(t, e, i, r);
|
|
833
|
+
u.x = n.x, u.y = n.y, u.placement = n.placement;
|
|
834
|
+
const d = u.x, a = u.y, s = bt(t);
|
|
835
|
+
(l = r.middleware) == null || l.forEach((C) => {
|
|
836
|
+
const b = C.fn({
|
|
837
|
+
x: u.x,
|
|
838
|
+
y: u.y,
|
|
764
839
|
options: r,
|
|
765
|
-
primaryX:
|
|
766
|
-
primaryY:
|
|
840
|
+
primaryX: d,
|
|
841
|
+
primaryY: a,
|
|
767
842
|
floating: e,
|
|
768
|
-
placement:
|
|
769
|
-
reference:
|
|
770
|
-
scrollDirection:
|
|
843
|
+
placement: u.placement,
|
|
844
|
+
reference: t,
|
|
845
|
+
scrollDirection: s
|
|
771
846
|
});
|
|
772
|
-
|
|
847
|
+
u.x = b.x, u.y = b.y, u.placement = b.placement, C.name === "arrow" && (b.baseX = b.x, b.baseY = b.y, b.x = b.arrowX ?? b.x, b.y = b.arrowY ?? b.y), u.middlewareData[C.name] = b;
|
|
773
848
|
});
|
|
774
|
-
const
|
|
775
|
-
if (Number.isFinite(
|
|
776
|
-
if (
|
|
777
|
-
const
|
|
778
|
-
|
|
849
|
+
const v = be(t, e, u.placement, r), f = oe(r, "offset"), p = f ? (c = f.params) == null ? void 0 : c.value : 0;
|
|
850
|
+
if (Number.isFinite(u.x) || (u.x = v.x), !Number.isFinite(u.y))
|
|
851
|
+
if (Q(r, e)) {
|
|
852
|
+
const C = t.getBoundingClientRect(), b = e.getBoundingClientRect().height;
|
|
853
|
+
u.placement.startsWith("top") ? u.y = C.top - b - p : u.placement.startsWith("bottom") ? u.y = C.bottom + p : u.y = v.y;
|
|
779
854
|
} else
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
}),
|
|
855
|
+
u.y = v.y;
|
|
856
|
+
o(u);
|
|
857
|
+
}), Et = ["disabled", "aria-expanded", "onKeydown"], Mt = ["data-placement"], Pt = ["disabled", "aria-selected", "onClick"], Vo = /* @__PURE__ */ j({
|
|
783
858
|
__name: "select",
|
|
784
859
|
props: {
|
|
785
860
|
modelValue: { default: void 0 },
|
|
@@ -788,178 +863,180 @@ const oo = (o, e) => o.strategy ? o.strategy : eo(e) ? "fixed" : "absolute", q =
|
|
|
788
863
|
optionValue: { default: "value" },
|
|
789
864
|
placeholder: { default: "" },
|
|
790
865
|
disabled: { type: Boolean, default: !1 },
|
|
866
|
+
variant: { default: "filled" },
|
|
791
867
|
size: { default: "normal" }
|
|
792
868
|
},
|
|
793
869
|
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
794
|
-
setup(
|
|
870
|
+
setup(t, { emit: e }) {
|
|
795
871
|
let r = 0;
|
|
796
|
-
const
|
|
797
|
-
let
|
|
798
|
-
const
|
|
872
|
+
const o = e, l = t, c = P(null), i = P(null), u = P(null), n = P(!1), d = P("bottom"), a = P("bottom"), s = `vf-select-panel-${++r}`;
|
|
873
|
+
let v = null;
|
|
874
|
+
const f = B(() => l.options.map((g) => ({
|
|
799
875
|
label: g[l.optionLabel],
|
|
800
876
|
value: g[l.optionValue],
|
|
801
877
|
disabled: g.disabled
|
|
802
|
-
}))), p =
|
|
878
|
+
}))), p = B(() => f.value.find((g) => g.value === l.modelValue)), C = B(() => {
|
|
803
879
|
var g;
|
|
804
880
|
return ((g = p.value) == null ? void 0 : g.label) ?? "";
|
|
805
|
-
}),
|
|
806
|
-
const g = ["vf-select", n.value ? "vf-select_open" : ""];
|
|
881
|
+
}), b = B(() => {
|
|
882
|
+
const g = ["vf-select", `vf-select_${l.variant}`, n.value ? "vf-select_open" : ""];
|
|
807
883
|
return l.size !== "normal" && g.push(`vf-select_${l.size}`), l.disabled && g.push("vf-select_disabled"), g.filter(Boolean);
|
|
808
|
-
}), x = (g) => g.value === l.modelValue,
|
|
809
|
-
g.disabled || (
|
|
810
|
-
}, z = (g) =>
|
|
811
|
-
n.value = !1,
|
|
812
|
-
},
|
|
813
|
-
l.disabled || (n.value = !n.value, n.value && (
|
|
814
|
-
},
|
|
815
|
-
var g,
|
|
816
|
-
n.value || (n.value = !0, await
|
|
884
|
+
}), x = (g) => g.value === l.modelValue, V = (g) => {
|
|
885
|
+
g.disabled || (o("update:modelValue", g.value), o("change", g.value), w());
|
|
886
|
+
}, z = (g) => o("focus", g), S = (g) => o("blur", g), w = () => {
|
|
887
|
+
n.value = !1, d.value = "bottom", a.value = "bottom";
|
|
888
|
+
}, F = () => {
|
|
889
|
+
l.disabled || (n.value = !n.value, n.value && (d.value = "bottom", a.value = "bottom"));
|
|
890
|
+
}, O = async () => {
|
|
891
|
+
var g, y;
|
|
892
|
+
n.value || (n.value = !0, await _e()), (y = (g = u.value) == null ? void 0 : g.querySelector(".vf-select__option:not(.is-disabled)")) == null || y.focus();
|
|
817
893
|
}, W = (g) => {
|
|
818
894
|
var T;
|
|
819
895
|
if (!n.value || !c.value)
|
|
820
896
|
return;
|
|
821
|
-
const
|
|
822
|
-
c.value.contains(
|
|
897
|
+
const y = g.target;
|
|
898
|
+
c.value.contains(y) || (T = u.value) != null && T.contains(y) || w();
|
|
823
899
|
}, h = () => {
|
|
824
|
-
if (!
|
|
900
|
+
if (!i.value || !u.value)
|
|
825
901
|
return;
|
|
826
|
-
const g =
|
|
902
|
+
const g = i.value, y = u.value, T = async () => {
|
|
827
903
|
const {
|
|
828
|
-
x:
|
|
829
|
-
y:
|
|
830
|
-
placement:
|
|
831
|
-
} = await
|
|
832
|
-
placement:
|
|
904
|
+
x: M,
|
|
905
|
+
y: N,
|
|
906
|
+
placement: Y
|
|
907
|
+
} = await Xe(g, y, {
|
|
908
|
+
placement: d.value,
|
|
833
909
|
strategy: "fixed",
|
|
834
|
-
middleware: [
|
|
910
|
+
middleware: [De(2), Me({ placements: ["bottom", "top"] })]
|
|
835
911
|
});
|
|
836
|
-
|
|
837
|
-
},
|
|
912
|
+
a.value = Y ?? d.value, y.style.minWidth = `${g.getBoundingClientRect().width}px`, y.style.left = `${M}px`, y.style.top = `${N}px`;
|
|
913
|
+
}, H = async () => {
|
|
838
914
|
await T();
|
|
839
|
-
},
|
|
840
|
-
|
|
841
|
-
}),
|
|
842
|
-
|
|
915
|
+
}, E = Ie(g, () => {
|
|
916
|
+
H();
|
|
917
|
+
}), D = () => {
|
|
918
|
+
H();
|
|
843
919
|
};
|
|
844
|
-
document.addEventListener("scroll",
|
|
845
|
-
update:
|
|
920
|
+
document.addEventListener("scroll", D, !0), window.addEventListener("resize", D, !1), v = {
|
|
921
|
+
update: H,
|
|
846
922
|
destroy: () => {
|
|
847
|
-
|
|
923
|
+
E(), document.removeEventListener("scroll", D, !0), window.removeEventListener("resize", D, !1);
|
|
848
924
|
}
|
|
849
|
-
},
|
|
925
|
+
}, v.update();
|
|
850
926
|
};
|
|
851
|
-
return
|
|
927
|
+
return ne(n, async (g) => {
|
|
852
928
|
if (!g) {
|
|
853
|
-
|
|
929
|
+
v && (v.destroy(), v = null);
|
|
854
930
|
return;
|
|
855
931
|
}
|
|
856
|
-
await
|
|
857
|
-
}),
|
|
932
|
+
await _e(), v || h(), v == null || v.update();
|
|
933
|
+
}), ne(
|
|
858
934
|
() => l.options,
|
|
859
935
|
() => {
|
|
860
|
-
|
|
936
|
+
v == null || v.update();
|
|
861
937
|
},
|
|
862
938
|
{ deep: !0 }
|
|
863
|
-
),
|
|
939
|
+
), Oe(() => {
|
|
864
940
|
document.addEventListener("click", W);
|
|
865
|
-
}),
|
|
866
|
-
document.removeEventListener("click", W),
|
|
867
|
-
}), (g,
|
|
941
|
+
}), $e(() => {
|
|
942
|
+
document.removeEventListener("click", W), v == null || v.destroy(), v = null;
|
|
943
|
+
}), (g, y) => (m(), k("div", {
|
|
868
944
|
ref_key: "root",
|
|
869
945
|
ref: c,
|
|
870
|
-
class:
|
|
946
|
+
class: L(b.value)
|
|
871
947
|
}, [
|
|
872
|
-
|
|
948
|
+
R("button", {
|
|
873
949
|
ref_key: "trigger",
|
|
874
|
-
ref:
|
|
950
|
+
ref: i,
|
|
875
951
|
class: "vf-select__control",
|
|
876
952
|
type: "button",
|
|
877
953
|
disabled: g.disabled,
|
|
878
954
|
"aria-expanded": n.value,
|
|
879
|
-
"aria-controls":
|
|
955
|
+
"aria-controls": s,
|
|
880
956
|
"aria-haspopup": "listbox",
|
|
881
|
-
onClick:
|
|
957
|
+
onClick: F,
|
|
882
958
|
onKeydown: [
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
959
|
+
re(le(O, ["prevent"]), ["down"]),
|
|
960
|
+
re(le(F, ["prevent"]), ["enter"]),
|
|
961
|
+
re(le(w, ["prevent"]), ["esc"])
|
|
886
962
|
],
|
|
887
963
|
onFocus: z,
|
|
888
964
|
onBlur: S
|
|
889
965
|
}, [
|
|
890
|
-
|
|
891
|
-
class:
|
|
892
|
-
},
|
|
893
|
-
|
|
966
|
+
R("span", {
|
|
967
|
+
class: L(["vf-select__label", { "vf-select__label_placeholder": !C.value }])
|
|
968
|
+
}, X(C.value || g.placeholder), 3),
|
|
969
|
+
y[0] || (y[0] = R("span", {
|
|
894
970
|
class: "vf-select__chevron",
|
|
895
971
|
"aria-hidden": "true"
|
|
896
972
|
}, "▾", -1))
|
|
897
|
-
], 40,
|
|
898
|
-
(
|
|
899
|
-
|
|
900
|
-
id:
|
|
973
|
+
], 40, Et),
|
|
974
|
+
(m(), I(xe, { to: "body" }, [
|
|
975
|
+
ke(R("div", {
|
|
976
|
+
id: s,
|
|
901
977
|
ref_key: "panel",
|
|
902
|
-
ref:
|
|
978
|
+
ref: u,
|
|
903
979
|
class: "vf-select__panel",
|
|
904
980
|
role: "listbox",
|
|
905
|
-
"data-placement":
|
|
981
|
+
"data-placement": a.value
|
|
906
982
|
}, [
|
|
907
|
-
(
|
|
983
|
+
(m(!0), k(ce, null, Ve(f.value, (T) => (m(), k("button", {
|
|
908
984
|
key: T.value,
|
|
909
|
-
class:
|
|
985
|
+
class: L(["vf-select__option", { "is-active": x(T), "is-disabled": T.disabled }]),
|
|
910
986
|
type: "button",
|
|
911
987
|
role: "option",
|
|
912
988
|
disabled: T.disabled,
|
|
913
989
|
"aria-selected": x(T),
|
|
914
|
-
onClick: (
|
|
915
|
-
},
|
|
916
|
-
], 8,
|
|
917
|
-
[
|
|
990
|
+
onClick: (H) => V(T)
|
|
991
|
+
}, X(T.label), 11, Pt))), 128))
|
|
992
|
+
], 8, Mt), [
|
|
993
|
+
[Ce, n.value]
|
|
918
994
|
])
|
|
919
995
|
]))
|
|
920
996
|
], 2));
|
|
921
997
|
}
|
|
922
|
-
}),
|
|
998
|
+
}), At = ["checked", "disabled"], Dt = {
|
|
923
999
|
key: 0,
|
|
924
1000
|
class: "vf-checkbox__label"
|
|
925
|
-
},
|
|
1001
|
+
}, Wo = /* @__PURE__ */ j({
|
|
926
1002
|
__name: "checkbox",
|
|
927
1003
|
props: {
|
|
928
1004
|
modelValue: { type: Boolean, default: !1 },
|
|
929
1005
|
label: { default: "" },
|
|
930
|
-
disabled: { type: Boolean, default: !1 }
|
|
1006
|
+
disabled: { type: Boolean, default: !1 },
|
|
1007
|
+
variant: { default: "filled" }
|
|
931
1008
|
},
|
|
932
1009
|
emits: ["update:modelValue", "change"],
|
|
933
|
-
setup(
|
|
934
|
-
const r = e,
|
|
935
|
-
const
|
|
936
|
-
return
|
|
937
|
-
}), c = (
|
|
938
|
-
const
|
|
939
|
-
r("update:modelValue",
|
|
1010
|
+
setup(t, { emit: e }) {
|
|
1011
|
+
const r = e, o = t, l = B(() => {
|
|
1012
|
+
const i = ["vf-checkbox", `vf-checkbox_${o.variant}`];
|
|
1013
|
+
return o.disabled && i.push("vf-checkbox_disabled"), i;
|
|
1014
|
+
}), c = (i) => {
|
|
1015
|
+
const u = i.target;
|
|
1016
|
+
r("update:modelValue", u.checked), r("change", i);
|
|
940
1017
|
};
|
|
941
|
-
return (
|
|
942
|
-
class:
|
|
1018
|
+
return (i, u) => (m(), k("label", {
|
|
1019
|
+
class: L(l.value)
|
|
943
1020
|
}, [
|
|
944
|
-
|
|
1021
|
+
R("input", {
|
|
945
1022
|
class: "vf-checkbox__control",
|
|
946
1023
|
type: "checkbox",
|
|
947
|
-
checked:
|
|
948
|
-
disabled:
|
|
1024
|
+
checked: i.modelValue,
|
|
1025
|
+
disabled: i.disabled,
|
|
949
1026
|
onChange: c
|
|
950
|
-
}, null, 40,
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
1027
|
+
}, null, 40, At),
|
|
1028
|
+
u[0] || (u[0] = R("span", { class: "vf-checkbox__box" }, null, -1)),
|
|
1029
|
+
i.label || i.$slots.default ? (m(), k("span", Dt, [
|
|
1030
|
+
_(i.$slots, "default", {}, () => [
|
|
1031
|
+
ae(X(i.label), 1)
|
|
955
1032
|
])
|
|
956
|
-
])) :
|
|
1033
|
+
])) : $("", !0)
|
|
957
1034
|
], 2));
|
|
958
1035
|
}
|
|
959
|
-
}),
|
|
1036
|
+
}), It = ["checked", "disabled"], Xt = {
|
|
960
1037
|
key: 0,
|
|
961
1038
|
class: "vf-switch__label"
|
|
962
|
-
},
|
|
1039
|
+
}, Oo = /* @__PURE__ */ j({
|
|
963
1040
|
__name: "switch",
|
|
964
1041
|
props: {
|
|
965
1042
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -967,114 +1044,114 @@ const oo = (o, e) => o.strategy ? o.strategy : eo(e) ? "fixed" : "absolute", q =
|
|
|
967
1044
|
disabled: { type: Boolean, default: !1 }
|
|
968
1045
|
},
|
|
969
1046
|
emits: ["update:modelValue", "change"],
|
|
970
|
-
setup(
|
|
971
|
-
const r = e,
|
|
972
|
-
const
|
|
973
|
-
return
|
|
974
|
-
}), c = (
|
|
975
|
-
const
|
|
976
|
-
r("update:modelValue",
|
|
1047
|
+
setup(t, { emit: e }) {
|
|
1048
|
+
const r = e, o = t, l = B(() => {
|
|
1049
|
+
const i = ["vf-switch"];
|
|
1050
|
+
return o.disabled && i.push("vf-switch_disabled"), i;
|
|
1051
|
+
}), c = (i) => {
|
|
1052
|
+
const u = i.target;
|
|
1053
|
+
r("update:modelValue", u.checked), r("change", i);
|
|
977
1054
|
};
|
|
978
|
-
return (
|
|
979
|
-
class:
|
|
1055
|
+
return (i, u) => (m(), k("label", {
|
|
1056
|
+
class: L(l.value)
|
|
980
1057
|
}, [
|
|
981
|
-
|
|
1058
|
+
R("input", {
|
|
982
1059
|
class: "vf-switch__control",
|
|
983
1060
|
type: "checkbox",
|
|
984
|
-
checked:
|
|
985
|
-
disabled:
|
|
1061
|
+
checked: i.modelValue,
|
|
1062
|
+
disabled: i.disabled,
|
|
986
1063
|
onChange: c
|
|
987
|
-
}, null, 40,
|
|
988
|
-
|
|
989
|
-
|
|
1064
|
+
}, null, 40, It),
|
|
1065
|
+
u[0] || (u[0] = R("span", { class: "vf-switch__track" }, [
|
|
1066
|
+
R("span", { class: "vf-switch__thumb" })
|
|
990
1067
|
], -1)),
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
1068
|
+
i.label || i.$slots.default ? (m(), k("span", Xt, [
|
|
1069
|
+
_(i.$slots, "default", {}, () => [
|
|
1070
|
+
ae(X(i.label), 1)
|
|
994
1071
|
])
|
|
995
|
-
])) :
|
|
1072
|
+
])) : $("", !0)
|
|
996
1073
|
], 2));
|
|
997
1074
|
}
|
|
998
|
-
}),
|
|
1075
|
+
}), Yt = { class: "vf-popover" }, jt = ["aria-expanded", "onKeydown"], Ho = /* @__PURE__ */ j({
|
|
999
1076
|
__name: "popover",
|
|
1000
1077
|
emits: ["click", "onClick"],
|
|
1001
|
-
setup(
|
|
1002
|
-
const
|
|
1078
|
+
setup(t, { expose: e, emit: r }) {
|
|
1079
|
+
const o = r, l = Ke({ visible: !1 });
|
|
1003
1080
|
let c = 0;
|
|
1004
|
-
const
|
|
1005
|
-
|
|
1081
|
+
const i = `vf-popover-panel-${++c}`, u = () => l.visible = !0, n = () => l.visible = !1, d = () => l.visible = !l.visible, a = () => {
|
|
1082
|
+
d(), o("click"), o("onClick");
|
|
1006
1083
|
};
|
|
1007
|
-
return e({ show:
|
|
1008
|
-
|
|
1084
|
+
return e({ show: u, hide: n, toggle: d }), (s, v) => (m(), k("div", Yt, [
|
|
1085
|
+
R("div", {
|
|
1009
1086
|
class: "vf-popover__button",
|
|
1010
1087
|
role: "button",
|
|
1011
1088
|
tabindex: "0",
|
|
1012
1089
|
"aria-haspopup": "dialog",
|
|
1013
1090
|
"aria-expanded": l.visible,
|
|
1014
|
-
"aria-controls":
|
|
1015
|
-
onClick:
|
|
1091
|
+
"aria-controls": i,
|
|
1092
|
+
onClick: a,
|
|
1016
1093
|
onKeydown: [
|
|
1017
|
-
|
|
1018
|
-
|
|
1094
|
+
re(le(a, ["prevent"]), ["enter"]),
|
|
1095
|
+
re(le(a, ["prevent"]), ["space"])
|
|
1019
1096
|
]
|
|
1020
1097
|
}, [
|
|
1021
|
-
|
|
1022
|
-
], 40,
|
|
1023
|
-
|
|
1024
|
-
id:
|
|
1098
|
+
_(s.$slots, "button")
|
|
1099
|
+
], 40, jt),
|
|
1100
|
+
ke(We(st, {
|
|
1101
|
+
id: i,
|
|
1025
1102
|
class: "vf-popover__wrapper"
|
|
1026
|
-
},
|
|
1027
|
-
default:
|
|
1028
|
-
|
|
1103
|
+
}, Ge({
|
|
1104
|
+
default: te(() => [
|
|
1105
|
+
v[0] || (v[0] = R("div", { class: "vf-popover__arrow" }, null, -1))
|
|
1029
1106
|
]),
|
|
1030
1107
|
_: 2
|
|
1031
1108
|
}, [
|
|
1032
|
-
|
|
1109
|
+
s.$slots.default ? {
|
|
1033
1110
|
name: "default",
|
|
1034
|
-
fn:
|
|
1035
|
-
|
|
1111
|
+
fn: te(() => [
|
|
1112
|
+
_(s.$slots, "default")
|
|
1036
1113
|
]),
|
|
1037
1114
|
key: "0"
|
|
1038
1115
|
} : void 0,
|
|
1039
|
-
|
|
1116
|
+
s.$slots.header || s.$slots.popoverHeader ? {
|
|
1040
1117
|
name: "header",
|
|
1041
|
-
fn:
|
|
1042
|
-
|
|
1043
|
-
|
|
1118
|
+
fn: te(() => [
|
|
1119
|
+
_(s.$slots, "header"),
|
|
1120
|
+
s.$slots.header ? $("", !0) : _(s.$slots, "popoverHeader", { key: 0 })
|
|
1044
1121
|
]),
|
|
1045
1122
|
key: "1"
|
|
1046
1123
|
} : void 0,
|
|
1047
|
-
|
|
1124
|
+
s.$slots.body || s.$slots.popoverBody ? {
|
|
1048
1125
|
name: "body",
|
|
1049
|
-
fn:
|
|
1050
|
-
|
|
1051
|
-
|
|
1126
|
+
fn: te(() => [
|
|
1127
|
+
_(s.$slots, "body"),
|
|
1128
|
+
s.$slots.body ? $("", !0) : _(s.$slots, "popoverBody", { key: 0 })
|
|
1052
1129
|
]),
|
|
1053
1130
|
key: "2"
|
|
1054
1131
|
} : void 0,
|
|
1055
|
-
|
|
1132
|
+
s.$slots.footer || s.$slots.popoverFooter ? {
|
|
1056
1133
|
name: "footer",
|
|
1057
|
-
fn:
|
|
1058
|
-
|
|
1059
|
-
|
|
1134
|
+
fn: te(() => [
|
|
1135
|
+
_(s.$slots, "footer"),
|
|
1136
|
+
s.$slots.footer ? $("", !0) : _(s.$slots, "popoverFooter", { key: 0 })
|
|
1060
1137
|
]),
|
|
1061
1138
|
key: "3"
|
|
1062
1139
|
} : void 0
|
|
1063
1140
|
]), 1536), [
|
|
1064
|
-
[
|
|
1141
|
+
[Ce, l.visible]
|
|
1065
1142
|
])
|
|
1066
1143
|
]));
|
|
1067
1144
|
}
|
|
1068
|
-
}),
|
|
1145
|
+
}), Nt = ["aria-labelledby", "aria-describedby"], Kt = {
|
|
1069
1146
|
key: 0,
|
|
1070
1147
|
class: "vf-modal__header"
|
|
1071
|
-
},
|
|
1148
|
+
}, Gt = {
|
|
1072
1149
|
key: 0,
|
|
1073
1150
|
class: "vf-modal__title"
|
|
1074
|
-
},
|
|
1151
|
+
}, Ut = {
|
|
1075
1152
|
key: 3,
|
|
1076
1153
|
class: "vf-modal__footer"
|
|
1077
|
-
},
|
|
1154
|
+
}, Eo = /* @__PURE__ */ j({
|
|
1078
1155
|
__name: "modal",
|
|
1079
1156
|
props: {
|
|
1080
1157
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -1086,173 +1163,270 @@ const oo = (o, e) => o.strategy ? o.strategy : eo(e) ? "fixed" : "absolute", q =
|
|
|
1086
1163
|
size: { default: "md" }
|
|
1087
1164
|
},
|
|
1088
1165
|
emits: ["update:modelValue", "open", "close"],
|
|
1089
|
-
setup(
|
|
1090
|
-
const
|
|
1091
|
-
let c = 0,
|
|
1092
|
-
const
|
|
1166
|
+
setup(t, { expose: e, emit: r }) {
|
|
1167
|
+
const o = r, l = t;
|
|
1168
|
+
let c = 0, i = 0, u = "", n = null;
|
|
1169
|
+
const d = P(null), a = Ue(), s = `vf-modal-title-${++c}`, v = `vf-modal-body-${c}`, f = B(() => !!l.title || !!a.header), p = B(() => !!a.body || !!a.default), C = B(() => {
|
|
1093
1170
|
const h = ["vf-modal"];
|
|
1094
1171
|
return l.size !== "md" && h.push(`vf-modal_${l.size}`), h;
|
|
1095
|
-
}),
|
|
1096
|
-
|
|
1097
|
-
},
|
|
1172
|
+
}), b = () => o("update:modelValue", !0), x = () => {
|
|
1173
|
+
o("update:modelValue", !1), o("close");
|
|
1174
|
+
}, V = () => {
|
|
1098
1175
|
l.closeOnOverlay && x();
|
|
1099
1176
|
}, z = (h) => {
|
|
1100
1177
|
!l.modelValue || !l.closeOnEsc || h.key === "Escape" && (h.preventDefault(), x());
|
|
1101
|
-
}, S = () =>
|
|
1178
|
+
}, S = () => d.value ? Array.from(d.value.querySelectorAll('a[href],button:not([disabled]),textarea:not([disabled]),input:not([disabled]),select:not([disabled]),[tabindex]:not([tabindex="-1"])')).filter((g) => !g.hasAttribute("disabled") && !g.getAttribute("aria-hidden")) : [], w = () => {
|
|
1102
1179
|
var g;
|
|
1103
1180
|
const h = S();
|
|
1104
|
-
h.length ? h[0].focus() : (g =
|
|
1105
|
-
},
|
|
1106
|
-
var
|
|
1181
|
+
h.length ? h[0].focus() : (g = d.value) == null || g.focus();
|
|
1182
|
+
}, F = (h) => {
|
|
1183
|
+
var E;
|
|
1107
1184
|
if (h.key !== "Tab")
|
|
1108
1185
|
return;
|
|
1109
1186
|
const g = S();
|
|
1110
1187
|
if (!g.length) {
|
|
1111
|
-
h.preventDefault(), (
|
|
1188
|
+
h.preventDefault(), (E = d.value) == null || E.focus();
|
|
1112
1189
|
return;
|
|
1113
1190
|
}
|
|
1114
|
-
const
|
|
1115
|
-
if (h.shiftKey &&
|
|
1191
|
+
const y = g[0], T = g[g.length - 1], H = document.activeElement;
|
|
1192
|
+
if (h.shiftKey && H === y) {
|
|
1116
1193
|
h.preventDefault(), T.focus();
|
|
1117
1194
|
return;
|
|
1118
1195
|
}
|
|
1119
|
-
!h.shiftKey &&
|
|
1120
|
-
},
|
|
1121
|
-
!l.lockScroll || typeof document > "u" || (
|
|
1196
|
+
!h.shiftKey && H === T && (h.preventDefault(), y.focus());
|
|
1197
|
+
}, O = () => {
|
|
1198
|
+
!l.lockScroll || typeof document > "u" || (i === 0 && (u = document.body.style.overflow, document.body.style.overflow = "hidden"), i += 1);
|
|
1122
1199
|
}, W = () => {
|
|
1123
|
-
!l.lockScroll || typeof document > "u" || (
|
|
1200
|
+
!l.lockScroll || typeof document > "u" || (i = Math.max(0, i - 1), i === 0 && (document.body.style.overflow = u));
|
|
1124
1201
|
};
|
|
1125
|
-
return
|
|
1202
|
+
return ne(
|
|
1126
1203
|
() => l.modelValue,
|
|
1127
1204
|
async (h) => {
|
|
1128
|
-
h ? (typeof document < "u" && (n = document.activeElement),
|
|
1205
|
+
h ? (typeof document < "u" && (n = document.activeElement), O(), o("open"), await _e(), w(), typeof document < "u" && document.addEventListener("keydown", z)) : (W(), typeof document < "u" && (document.removeEventListener("keydown", z), n == null || n.focus()));
|
|
1129
1206
|
},
|
|
1130
1207
|
{ immediate: !0 }
|
|
1131
|
-
),
|
|
1208
|
+
), $e(() => {
|
|
1132
1209
|
W(), typeof document < "u" && document.removeEventListener("keydown", z);
|
|
1133
|
-
}), e({ open:
|
|
1134
|
-
|
|
1135
|
-
class:
|
|
1210
|
+
}), e({ open: b, close: x }), (h, g) => (m(), I(xe, { to: "body" }, [
|
|
1211
|
+
ke(R("div", {
|
|
1212
|
+
class: L(C.value),
|
|
1136
1213
|
role: "presentation"
|
|
1137
1214
|
}, [
|
|
1138
|
-
|
|
1215
|
+
R("div", {
|
|
1139
1216
|
class: "vf-modal__overlay",
|
|
1140
|
-
onClick:
|
|
1217
|
+
onClick: V
|
|
1141
1218
|
}),
|
|
1142
|
-
|
|
1219
|
+
R("div", {
|
|
1143
1220
|
ref_key: "panel",
|
|
1144
|
-
ref:
|
|
1221
|
+
ref: d,
|
|
1145
1222
|
class: "vf-modal__panel",
|
|
1146
1223
|
role: "dialog",
|
|
1147
1224
|
"aria-modal": "true",
|
|
1148
|
-
"aria-labelledby":
|
|
1149
|
-
"aria-describedby": p.value ?
|
|
1225
|
+
"aria-labelledby": f.value ? s : void 0,
|
|
1226
|
+
"aria-describedby": p.value ? v : void 0,
|
|
1150
1227
|
tabindex: "-1",
|
|
1151
|
-
onKeydown:
|
|
1228
|
+
onKeydown: F
|
|
1152
1229
|
}, [
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
id:
|
|
1230
|
+
f.value ? (m(), k("div", Kt, [
|
|
1231
|
+
R("div", {
|
|
1232
|
+
id: s,
|
|
1156
1233
|
class: "vf-modal__header-content"
|
|
1157
1234
|
}, [
|
|
1158
|
-
|
|
1159
|
-
h.title ? (
|
|
1235
|
+
_(h.$slots, "header", {}, () => [
|
|
1236
|
+
h.title ? (m(), k("h3", Gt, X(h.title), 1)) : $("", !0)
|
|
1160
1237
|
])
|
|
1161
1238
|
])
|
|
1162
|
-
])) :
|
|
1163
|
-
h.showClose ?
|
|
1239
|
+
])) : $("", !0),
|
|
1240
|
+
h.showClose ? _(h.$slots, "close", {
|
|
1164
1241
|
key: 1,
|
|
1165
1242
|
close: x
|
|
1166
1243
|
}, () => [
|
|
1167
|
-
|
|
1244
|
+
R("button", {
|
|
1168
1245
|
type: "button",
|
|
1169
1246
|
class: "vf-modal__close",
|
|
1170
1247
|
"aria-label": "Close",
|
|
1171
1248
|
onClick: x
|
|
1172
1249
|
}, "×")
|
|
1173
|
-
]) :
|
|
1174
|
-
h.$slots.body || h.$slots.default ? (
|
|
1250
|
+
]) : $("", !0),
|
|
1251
|
+
h.$slots.body || h.$slots.default ? (m(), k("div", {
|
|
1175
1252
|
key: 2,
|
|
1176
|
-
id:
|
|
1253
|
+
id: v,
|
|
1177
1254
|
class: "vf-modal__body"
|
|
1178
1255
|
}, [
|
|
1179
|
-
|
|
1180
|
-
h.$slots.body ?
|
|
1181
|
-
])) :
|
|
1182
|
-
h.$slots.footer ? (
|
|
1183
|
-
|
|
1184
|
-
])) :
|
|
1185
|
-
], 40,
|
|
1256
|
+
_(h.$slots, "body"),
|
|
1257
|
+
h.$slots.body ? $("", !0) : _(h.$slots, "default", { key: 0 })
|
|
1258
|
+
])) : $("", !0),
|
|
1259
|
+
h.$slots.footer ? (m(), k("div", Ut, [
|
|
1260
|
+
_(h.$slots, "footer")
|
|
1261
|
+
])) : $("", !0)
|
|
1262
|
+
], 40, Nt)
|
|
1186
1263
|
], 2), [
|
|
1187
|
-
[
|
|
1264
|
+
[Ce, h.modelValue]
|
|
1188
1265
|
])
|
|
1189
1266
|
]));
|
|
1190
1267
|
}
|
|
1191
|
-
}),
|
|
1192
|
-
|
|
1268
|
+
}), qt = ["data-placement"], Zt = { class: "vf-tooltip__content" }, Jt = {
|
|
1269
|
+
key: 0,
|
|
1270
|
+
class: "vf-tooltip__arrow",
|
|
1271
|
+
"aria-hidden": "true"
|
|
1272
|
+
}, Mo = /* @__PURE__ */ j({
|
|
1273
|
+
__name: "tooltip",
|
|
1274
|
+
props: {
|
|
1275
|
+
text: { default: "" },
|
|
1276
|
+
placement: { default: "top" },
|
|
1277
|
+
disabled: { type: Boolean, default: !1 },
|
|
1278
|
+
arrow: { type: Boolean, default: !1 }
|
|
1279
|
+
},
|
|
1280
|
+
setup(t) {
|
|
1281
|
+
const e = t;
|
|
1282
|
+
let r = 0;
|
|
1283
|
+
const o = P(null), l = P(null), c = P(!1), i = P("top"), u = `vf-tooltip-${++r}`;
|
|
1284
|
+
let n = null;
|
|
1285
|
+
const d = () => {
|
|
1286
|
+
e.disabled || (c.value = !0);
|
|
1287
|
+
}, a = () => {
|
|
1288
|
+
c.value = !1;
|
|
1289
|
+
}, s = () => {
|
|
1290
|
+
if (!o.value || !l.value)
|
|
1291
|
+
return;
|
|
1292
|
+
const f = o.value, p = l.value, C = async () => {
|
|
1293
|
+
const {
|
|
1294
|
+
x: z,
|
|
1295
|
+
y: S,
|
|
1296
|
+
placement: w
|
|
1297
|
+
} = await Xe(f, p, {
|
|
1298
|
+
placement: e.placement,
|
|
1299
|
+
strategy: "fixed",
|
|
1300
|
+
middleware: [De(8), Me(), yt()]
|
|
1301
|
+
});
|
|
1302
|
+
i.value = w ?? e.placement, p.style.left = `${z}px`, p.style.top = `${S}px`;
|
|
1303
|
+
}, b = async () => {
|
|
1304
|
+
await C();
|
|
1305
|
+
}, x = Ie(f, () => {
|
|
1306
|
+
b();
|
|
1307
|
+
}), V = () => {
|
|
1308
|
+
b();
|
|
1309
|
+
};
|
|
1310
|
+
document.addEventListener("scroll", V, !0), window.addEventListener("resize", V, !1), n = {
|
|
1311
|
+
update: b,
|
|
1312
|
+
destroy: () => {
|
|
1313
|
+
x(), document.removeEventListener("scroll", V, !0), window.removeEventListener("resize", V, !1);
|
|
1314
|
+
}
|
|
1315
|
+
}, n.update();
|
|
1316
|
+
};
|
|
1317
|
+
ne(c, async (f) => {
|
|
1318
|
+
if (!f) {
|
|
1319
|
+
n && (n.destroy(), n = null);
|
|
1320
|
+
return;
|
|
1321
|
+
}
|
|
1322
|
+
n || s(), n == null || n.update();
|
|
1323
|
+
}), Oe(() => {
|
|
1324
|
+
c.value && s();
|
|
1325
|
+
}), $e(() => {
|
|
1326
|
+
n == null || n.destroy(), n = null;
|
|
1327
|
+
});
|
|
1328
|
+
const v = B(() => !!e.text || !!(l.value && l.value.textContent));
|
|
1329
|
+
return ne(v, (f) => {
|
|
1330
|
+
f || (c.value = !1);
|
|
1331
|
+
}), (f, p) => (m(), k(ce, null, [
|
|
1332
|
+
R("span", {
|
|
1333
|
+
ref_key: "trigger",
|
|
1334
|
+
ref: o,
|
|
1335
|
+
class: "vf-tooltip__trigger",
|
|
1336
|
+
"aria-describedby": u,
|
|
1337
|
+
onMouseenter: d,
|
|
1338
|
+
onMouseleave: a,
|
|
1339
|
+
onFocus: d,
|
|
1340
|
+
onBlur: a
|
|
1341
|
+
}, [
|
|
1342
|
+
_(f.$slots, "default")
|
|
1343
|
+
], 544),
|
|
1344
|
+
(m(), I(xe, { to: "body" }, [
|
|
1345
|
+
ke(R("div", {
|
|
1346
|
+
id: u,
|
|
1347
|
+
ref_key: "panel",
|
|
1348
|
+
ref: l,
|
|
1349
|
+
class: "vf-tooltip",
|
|
1350
|
+
role: "tooltip",
|
|
1351
|
+
"data-placement": i.value
|
|
1352
|
+
}, [
|
|
1353
|
+
R("span", Zt, [
|
|
1354
|
+
_(f.$slots, "content", {}, () => [
|
|
1355
|
+
ae(X(f.text), 1)
|
|
1356
|
+
])
|
|
1357
|
+
]),
|
|
1358
|
+
f.arrow ? (m(), k("span", Jt)) : $("", !0)
|
|
1359
|
+
], 8, qt), [
|
|
1360
|
+
[Ce, c.value]
|
|
1361
|
+
])
|
|
1362
|
+
]))
|
|
1363
|
+
], 64));
|
|
1364
|
+
}
|
|
1365
|
+
}), Qt = ["dark", "light", "theme", "preset", "colors", "components", "colorScheme"], eo = (t) => {
|
|
1366
|
+
const e = t.replace(/([A-Z])/g, "-$1");
|
|
1193
1367
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
1194
|
-
},
|
|
1195
|
-
if (!
|
|
1368
|
+
}, to = (t) => t.filter((e) => !Qt.includes(e)).map((e) => eo(e)).join("-").toLowerCase(), we = (t) => t.join("."), oo = (t) => /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(t), Fe = (t) => {
|
|
1369
|
+
if (!oo(t))
|
|
1196
1370
|
return null;
|
|
1197
|
-
if (
|
|
1198
|
-
const e =
|
|
1199
|
-
return `#${e}${e}${r}${r}${
|
|
1371
|
+
if (t.length === 4) {
|
|
1372
|
+
const e = t[1], r = t[2], o = t[3];
|
|
1373
|
+
return `#${e}${e}${r}${r}${o}${o}`;
|
|
1200
1374
|
}
|
|
1201
|
-
return
|
|
1202
|
-
},
|
|
1203
|
-
const e =
|
|
1375
|
+
return t.toLowerCase();
|
|
1376
|
+
}, Ye = (t) => {
|
|
1377
|
+
const e = Fe(t);
|
|
1204
1378
|
if (!e)
|
|
1205
1379
|
return [0, 0, 0];
|
|
1206
|
-
const r = parseInt(e.slice(1), 16),
|
|
1207
|
-
return [
|
|
1208
|
-
},
|
|
1209
|
-
const [e, r,
|
|
1210
|
-
return `${e}, ${r}, ${
|
|
1211
|
-
},
|
|
1212
|
-
const
|
|
1213
|
-
let
|
|
1214
|
-
const
|
|
1380
|
+
const r = parseInt(e.slice(1), 16), o = r >> 16 & 255, l = r >> 8 & 255, c = r & 255;
|
|
1381
|
+
return [o, l, c];
|
|
1382
|
+
}, Te = (t) => {
|
|
1383
|
+
const [e, r, o] = Ye(t);
|
|
1384
|
+
return `${e}, ${r}, ${o}`;
|
|
1385
|
+
}, ro = (t, e, r) => {
|
|
1386
|
+
const o = t / 255, l = e / 255, c = r / 255, i = Math.max(o, l, c), u = Math.min(o, l, c), n = i - u;
|
|
1387
|
+
let d = 0, a = 0;
|
|
1388
|
+
const s = (i + u) / 2;
|
|
1215
1389
|
if (n !== 0) {
|
|
1216
|
-
switch (
|
|
1217
|
-
case
|
|
1218
|
-
|
|
1390
|
+
switch (a = n / (1 - Math.abs(2 * s - 1)), i) {
|
|
1391
|
+
case o:
|
|
1392
|
+
d = (l - c) / n % 6;
|
|
1219
1393
|
break;
|
|
1220
1394
|
case l:
|
|
1221
|
-
|
|
1395
|
+
d = (c - o) / n + 2;
|
|
1222
1396
|
break;
|
|
1223
1397
|
case c:
|
|
1224
|
-
|
|
1398
|
+
d = (o - l) / n + 4;
|
|
1225
1399
|
break;
|
|
1226
1400
|
}
|
|
1227
|
-
|
|
1401
|
+
d *= 60, d < 0 && (d += 360);
|
|
1228
1402
|
}
|
|
1229
|
-
return [
|
|
1230
|
-
},
|
|
1231
|
-
const
|
|
1232
|
-
let n = 0,
|
|
1233
|
-
|
|
1234
|
-
const
|
|
1235
|
-
return [
|
|
1236
|
-
},
|
|
1237
|
-
const r =
|
|
1403
|
+
return [d, a * 100, s * 100];
|
|
1404
|
+
}, lo = (t, e, r) => {
|
|
1405
|
+
const o = e / 100, l = r / 100, c = (1 - Math.abs(2 * l - 1)) * o, i = c * (1 - Math.abs(t / 60 % 2 - 1)), u = l - c / 2;
|
|
1406
|
+
let n = 0, d = 0, a = 0;
|
|
1407
|
+
t >= 0 && t < 60 ? (n = c, d = i, a = 0) : t >= 60 && t < 120 ? (n = i, d = c, a = 0) : t >= 120 && t < 180 ? (n = 0, d = c, a = i) : t >= 180 && t < 240 ? (n = 0, d = i, a = c) : t >= 240 && t < 300 ? (n = i, d = 0, a = c) : (n = c, d = 0, a = i);
|
|
1408
|
+
const s = Math.round((n + u) * 255), v = Math.round((d + u) * 255), f = Math.round((a + u) * 255);
|
|
1409
|
+
return [s, v, f];
|
|
1410
|
+
}, no = (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)), so = (t, e) => {
|
|
1411
|
+
const r = Fe(t);
|
|
1238
1412
|
if (!r)
|
|
1239
|
-
return
|
|
1240
|
-
const [
|
|
1241
|
-
return
|
|
1242
|
-
},
|
|
1413
|
+
return t;
|
|
1414
|
+
const [o, l, c] = Ye(r), [i, u, n] = ro(o, l, c), a = (e - 5) * 7, s = ao(n + a, 0, 100), [v, f, p] = lo(i, u, s);
|
|
1415
|
+
return no(v, f, p);
|
|
1416
|
+
}, ye = (t) => !!t && typeof t == "object" && !Array.isArray(t), Be = (t, e) => {
|
|
1243
1417
|
if (!e)
|
|
1244
|
-
return { ...
|
|
1245
|
-
const r = { ...
|
|
1246
|
-
for (const
|
|
1247
|
-
const l = e[
|
|
1248
|
-
|
|
1418
|
+
return { ...t };
|
|
1419
|
+
const r = { ...t };
|
|
1420
|
+
for (const o in e) {
|
|
1421
|
+
const l = e[o], c = t[o];
|
|
1422
|
+
ye(c) && ye(l) ? r[o] = Be(c, l) : r[o] = l;
|
|
1249
1423
|
}
|
|
1250
1424
|
return r;
|
|
1251
|
-
},
|
|
1252
|
-
if (!
|
|
1425
|
+
}, io = (t) => {
|
|
1426
|
+
if (!t)
|
|
1253
1427
|
return null;
|
|
1254
|
-
if (
|
|
1255
|
-
const e =
|
|
1428
|
+
if (ye(t) && "preset" in t) {
|
|
1429
|
+
const e = t;
|
|
1256
1430
|
return {
|
|
1257
1431
|
preset: e.preset ?? {},
|
|
1258
1432
|
overrides: e.overrides,
|
|
@@ -1261,92 +1435,92 @@ const oo = (o, e) => o.strategy ? o.strategy : eo(e) ? "fixed" : "absolute", q =
|
|
|
1261
1435
|
strict: e.strict
|
|
1262
1436
|
};
|
|
1263
1437
|
}
|
|
1264
|
-
return { preset:
|
|
1265
|
-
},
|
|
1266
|
-
const e = [], r = [],
|
|
1438
|
+
return { preset: t };
|
|
1439
|
+
}, co = (t) => {
|
|
1440
|
+
const e = [], r = [], o = [], l = [], c = (n) => o.push(n), i = (n) => l.push(n), u = (n, d) => {
|
|
1267
1441
|
if (!(!n || typeof n != "object"))
|
|
1268
|
-
for (const
|
|
1269
|
-
const
|
|
1270
|
-
if (
|
|
1271
|
-
|
|
1442
|
+
for (const a in n) {
|
|
1443
|
+
const s = n[a], v = d.concat([a]);
|
|
1444
|
+
if (ye(s)) {
|
|
1445
|
+
u(s, v);
|
|
1272
1446
|
continue;
|
|
1273
1447
|
}
|
|
1274
|
-
if (
|
|
1275
|
-
|
|
1448
|
+
if (s && typeof s == "object") {
|
|
1449
|
+
i(`Theme value "${we(v)}" is not a plain object or string and will be ignored.`);
|
|
1276
1450
|
continue;
|
|
1277
1451
|
}
|
|
1278
|
-
if (typeof
|
|
1279
|
-
|
|
1452
|
+
if (typeof s != "string") {
|
|
1453
|
+
i(`Theme value "${we(v)}" is not a string and will be ignored.`);
|
|
1280
1454
|
continue;
|
|
1281
1455
|
}
|
|
1282
|
-
const p =
|
|
1283
|
-
if (p.push(`--vf-${
|
|
1284
|
-
const
|
|
1285
|
-
if (!
|
|
1456
|
+
const p = v.includes("colorScheme") && v.includes("dark") ? r : e, C = to(v);
|
|
1457
|
+
if (p.push(`--vf-${C}: ${s}`), v.includes("colors")) {
|
|
1458
|
+
const b = Fe(s);
|
|
1459
|
+
if (!b) {
|
|
1286
1460
|
c(
|
|
1287
|
-
`Theme color "${
|
|
1461
|
+
`Theme color "${we(v)}" is not hex. Shade variables will not be generated for it.`
|
|
1288
1462
|
);
|
|
1289
1463
|
continue;
|
|
1290
1464
|
}
|
|
1291
|
-
if (p.push(`--vf-${
|
|
1465
|
+
if (p.push(`--vf-${C}-rgb: ${Te(b)}`), a !== "white")
|
|
1292
1466
|
for (let x = 1; x < 10; ++x) {
|
|
1293
|
-
const
|
|
1294
|
-
p.push(`--vf-${
|
|
1467
|
+
const V = so(b, x);
|
|
1468
|
+
p.push(`--vf-${C}-${x}00: ${V}`), p.push(`--vf-${C}-${x}00-rgb: ${Te(V)}`);
|
|
1295
1469
|
}
|
|
1296
1470
|
}
|
|
1297
1471
|
}
|
|
1298
1472
|
};
|
|
1299
|
-
return
|
|
1300
|
-
},
|
|
1473
|
+
return u(t, []), { baseVars: e, darkVars: r, warnings: o, errors: l };
|
|
1474
|
+
}, uo = (t) => {
|
|
1301
1475
|
if (typeof document > "u")
|
|
1302
1476
|
return null;
|
|
1303
|
-
const e = document.getElementById(
|
|
1477
|
+
const e = document.getElementById(t);
|
|
1304
1478
|
if (e && e.tagName.toLowerCase() === "style")
|
|
1305
1479
|
return e;
|
|
1306
1480
|
const r = document.createElement("style");
|
|
1307
|
-
return r.id =
|
|
1308
|
-
},
|
|
1309
|
-
selector:
|
|
1310
|
-
darkSelector:
|
|
1311
|
-
}),
|
|
1312
|
-
const { baseVars: l, darkVars: c, warnings:
|
|
1481
|
+
return r.id = t, document.head.appendChild(r), r;
|
|
1482
|
+
}, fo = (t) => ({
|
|
1483
|
+
selector: t.selector ?? ":root",
|
|
1484
|
+
darkSelector: t.darkSelector ?? ":root[data-theme=dark]"
|
|
1485
|
+
}), vo = (t, e, r, o) => {
|
|
1486
|
+
const { baseVars: l, darkVars: c, warnings: i, errors: u } = co(t), n = uo("vueforge-theme");
|
|
1313
1487
|
if (!n)
|
|
1314
1488
|
return;
|
|
1315
|
-
if (
|
|
1316
|
-
if (
|
|
1317
|
-
throw new Error(`[VueForge] ${
|
|
1318
|
-
for (const
|
|
1319
|
-
console.warn(`[VueForge] ${
|
|
1489
|
+
if (u.length) {
|
|
1490
|
+
if (o)
|
|
1491
|
+
throw new Error(`[VueForge] ${u.join(" ")}`);
|
|
1492
|
+
for (const a of u)
|
|
1493
|
+
console.warn(`[VueForge] ${a}`);
|
|
1320
1494
|
}
|
|
1321
|
-
if (
|
|
1322
|
-
for (const
|
|
1323
|
-
console.warn(`[VueForge] ${
|
|
1324
|
-
const
|
|
1325
|
-
l.length &&
|
|
1495
|
+
if (i.length)
|
|
1496
|
+
for (const a of i)
|
|
1497
|
+
console.warn(`[VueForge] ${a}`);
|
|
1498
|
+
const d = [];
|
|
1499
|
+
l.length && d.push(`${e} { ${l.join(";")} }`), c.length && d.push(`${r} { ${c.join(";")} }`), n.textContent = d.join(`
|
|
1326
1500
|
`);
|
|
1327
1501
|
};
|
|
1328
|
-
let
|
|
1329
|
-
const
|
|
1330
|
-
const e =
|
|
1502
|
+
let J = null;
|
|
1503
|
+
const je = (t) => {
|
|
1504
|
+
const e = io(t);
|
|
1331
1505
|
if (!e)
|
|
1332
1506
|
return;
|
|
1333
|
-
const r =
|
|
1334
|
-
|
|
1335
|
-
},
|
|
1336
|
-
if (!
|
|
1507
|
+
const r = Be(e.preset, e.overrides), { selector: o, darkSelector: l } = fo(e);
|
|
1508
|
+
J = { ...e }, vo(r, o, l, e.strict);
|
|
1509
|
+
}, Po = (t) => {
|
|
1510
|
+
if (!J)
|
|
1337
1511
|
return;
|
|
1338
|
-
const e =
|
|
1339
|
-
preset:
|
|
1512
|
+
const e = t.overrides === void 0 ? J.overrides : Be(J.overrides ?? {}, t.overrides ?? {}), r = {
|
|
1513
|
+
preset: t.preset ?? J.preset,
|
|
1340
1514
|
overrides: e,
|
|
1341
|
-
selector:
|
|
1342
|
-
darkSelector:
|
|
1515
|
+
selector: t.selector ?? J.selector,
|
|
1516
|
+
darkSelector: t.darkSelector ?? J.darkSelector
|
|
1343
1517
|
};
|
|
1344
|
-
|
|
1345
|
-
},
|
|
1346
|
-
install(
|
|
1347
|
-
e.theme &&
|
|
1518
|
+
je(r);
|
|
1519
|
+
}, Ao = () => J ? { ...J } : null, Do = {
|
|
1520
|
+
install(t, e = {}) {
|
|
1521
|
+
e.theme && je(e.theme);
|
|
1348
1522
|
}
|
|
1349
|
-
},
|
|
1523
|
+
}, Re = {
|
|
1350
1524
|
colors: {
|
|
1351
1525
|
white: "#ffffff",
|
|
1352
1526
|
green: "#0cbc87",
|
|
@@ -1361,7 +1535,8 @@ const xe = (o) => {
|
|
|
1361
1535
|
controls: {
|
|
1362
1536
|
height: "2rem",
|
|
1363
1537
|
paddingY: "0.25rem",
|
|
1364
|
-
paddingX: "0.6rem"
|
|
1538
|
+
paddingX: "0.6rem",
|
|
1539
|
+
backgroundColor: "var(--vf-bg-soft-color)"
|
|
1365
1540
|
},
|
|
1366
1541
|
radii: {
|
|
1367
1542
|
sm: "4px",
|
|
@@ -1408,7 +1583,7 @@ const xe = (o) => {
|
|
|
1408
1583
|
dividerColor: "#2e2e32"
|
|
1409
1584
|
}
|
|
1410
1585
|
}
|
|
1411
|
-
},
|
|
1586
|
+
}, po = {
|
|
1412
1587
|
fontSize: "var(--vf-typography-font-size)",
|
|
1413
1588
|
padding: "var(--vf-controls-padding-y) var(--vf-controls-padding-x)",
|
|
1414
1589
|
borderRadius: "var(--vf-radii-md)",
|
|
@@ -1550,17 +1725,17 @@ const xe = (o) => {
|
|
|
1550
1725
|
}
|
|
1551
1726
|
}
|
|
1552
1727
|
}
|
|
1553
|
-
},
|
|
1728
|
+
}, go = {
|
|
1554
1729
|
padding: "12px",
|
|
1555
1730
|
borderColor: "var(--vf-border-color)",
|
|
1556
1731
|
borderRadius: "var(--vf-radii-md)"
|
|
1557
|
-
},
|
|
1732
|
+
}, ho = {
|
|
1558
1733
|
gap: "0.5rem",
|
|
1559
1734
|
fontSize: "var(--vf-typography-font-size)",
|
|
1560
1735
|
padding: "var(--vf-controls-padding-y) var(--vf-controls-padding-x)",
|
|
1561
1736
|
borderRadius: "var(--vf-radii-md)",
|
|
1562
1737
|
borderColor: "var(--vf-border-color)",
|
|
1563
|
-
backgroundColor: "var(--vf-
|
|
1738
|
+
backgroundColor: "var(--vf-controls-background-color)",
|
|
1564
1739
|
textColor: "var(--vf-text-color)",
|
|
1565
1740
|
placeholderColor: "var(--vf-secondary-text-color)",
|
|
1566
1741
|
focusBorderColor: "var(--vf-blue-600)",
|
|
@@ -1575,10 +1750,33 @@ const xe = (o) => {
|
|
|
1575
1750
|
padding: "var(--vf-sizes-lg-padding-y) var(--vf-sizes-lg-padding-x)",
|
|
1576
1751
|
fontSize: "var(--vf-sizes-lg-font-size)"
|
|
1577
1752
|
}
|
|
1578
|
-
},
|
|
1753
|
+
}, mo = {
|
|
1754
|
+
gap: "0.5rem",
|
|
1755
|
+
fontSize: "var(--vf-typography-font-size)",
|
|
1756
|
+
padding: "var(--vf-controls-padding-y) var(--vf-controls-padding-x)",
|
|
1757
|
+
borderRadius: "var(--vf-radii-md)",
|
|
1758
|
+
borderColor: "var(--vf-border-color)",
|
|
1759
|
+
backgroundColor: "var(--vf-controls-background-color)",
|
|
1760
|
+
textColor: "var(--vf-text-color)",
|
|
1761
|
+
placeholderColor: "var(--vf-secondary-text-color)",
|
|
1762
|
+
focusBorderColor: "var(--vf-blue-600)",
|
|
1763
|
+
focusRingShadow: "var(--vf-states-focus-ring-shadow)",
|
|
1764
|
+
hoverBorderColor: "var(--vf-blue-500)",
|
|
1765
|
+
disabledOpacity: "var(--vf-states-disabled-opacity)",
|
|
1766
|
+
minHeight: "calc(var(--vf-controls-height) * 2)",
|
|
1767
|
+
resize: "vertical",
|
|
1768
|
+
small: {
|
|
1769
|
+
padding: "var(--vf-sizes-sm-padding-y) var(--vf-sizes-sm-padding-x)",
|
|
1770
|
+
fontSize: "var(--vf-sizes-sm-font-size)"
|
|
1771
|
+
},
|
|
1772
|
+
large: {
|
|
1773
|
+
padding: "var(--vf-sizes-lg-padding-y) var(--vf-sizes-lg-padding-x)",
|
|
1774
|
+
fontSize: "var(--vf-sizes-lg-font-size)"
|
|
1775
|
+
}
|
|
1776
|
+
}, bo = {
|
|
1579
1777
|
hoverColor: "var(--vf-blue)",
|
|
1580
1778
|
activeColor: "var(--vf-blue)"
|
|
1581
|
-
},
|
|
1779
|
+
}, yo = {
|
|
1582
1780
|
iconGap: "6px",
|
|
1583
1781
|
submenuOffset: "12px",
|
|
1584
1782
|
separatorThickness: "1px",
|
|
@@ -1598,7 +1796,7 @@ const xe = (o) => {
|
|
|
1598
1796
|
marginBottom: "0.5rem",
|
|
1599
1797
|
marginLeft: "0.5rem"
|
|
1600
1798
|
}
|
|
1601
|
-
},
|
|
1799
|
+
}, ko = {
|
|
1602
1800
|
width: "90vw",
|
|
1603
1801
|
maxWidth: "520px",
|
|
1604
1802
|
maxHeight: "80vh",
|
|
@@ -1625,9 +1823,9 @@ const xe = (o) => {
|
|
|
1625
1823
|
closeColor: "var(--vf-text-color)",
|
|
1626
1824
|
closeFontSize: "1.25rem",
|
|
1627
1825
|
closeHoverBackgroundColor: "rgba(0, 0, 0, 0.06)"
|
|
1628
|
-
},
|
|
1826
|
+
}, Co = {
|
|
1629
1827
|
backgroundColor: "var(--vf-bg-color)"
|
|
1630
|
-
},
|
|
1828
|
+
}, wo = {
|
|
1631
1829
|
minWidth: "12rem",
|
|
1632
1830
|
fontSize: "var(--vf-typography-font-size)",
|
|
1633
1831
|
controlGap: "0.75rem",
|
|
@@ -1635,7 +1833,7 @@ const xe = (o) => {
|
|
|
1635
1833
|
padding: "var(--vf-controls-padding-y) var(--vf-controls-padding-x)",
|
|
1636
1834
|
borderRadius: "var(--vf-radii-md)",
|
|
1637
1835
|
borderColor: "var(--vf-border-color)",
|
|
1638
|
-
backgroundColor: "var(--vf-
|
|
1836
|
+
backgroundColor: "var(--vf-controls-background-color)",
|
|
1639
1837
|
textColor: "var(--vf-text-color)",
|
|
1640
1838
|
focusBorderColor: "var(--vf-blue-600)",
|
|
1641
1839
|
hoverBorderColor: "var(--vf-blue-500)",
|
|
@@ -1660,19 +1858,19 @@ const xe = (o) => {
|
|
|
1660
1858
|
padding: "var(--vf-sizes-lg-padding-y) var(--vf-sizes-lg-padding-x)",
|
|
1661
1859
|
fontSize: "var(--vf-sizes-lg-font-size)"
|
|
1662
1860
|
}
|
|
1663
|
-
},
|
|
1861
|
+
}, _o = {
|
|
1664
1862
|
size: "1rem",
|
|
1665
1863
|
gap: "0.5rem",
|
|
1666
1864
|
borderRadius: "var(--vf-radii-sm)",
|
|
1667
1865
|
checkBorderRadius: "2px",
|
|
1668
1866
|
borderColor: "var(--vf-border-color)",
|
|
1669
|
-
backgroundColor: "var(--vf-
|
|
1867
|
+
backgroundColor: "var(--vf-controls-background-color)",
|
|
1670
1868
|
checkedBackgroundColor: "var(--vf-blue)",
|
|
1671
1869
|
checkedBorderColor: "var(--vf-blue)",
|
|
1672
1870
|
checkColor: "#ffffff",
|
|
1673
1871
|
textColor: "var(--vf-text-color)",
|
|
1674
1872
|
disabledOpacity: "var(--vf-states-disabled-opacity)"
|
|
1675
|
-
},
|
|
1873
|
+
}, $o = {
|
|
1676
1874
|
width: "2.25rem",
|
|
1677
1875
|
height: "1.25rem",
|
|
1678
1876
|
thumbSize: "1rem",
|
|
@@ -1684,37 +1882,51 @@ const xe = (o) => {
|
|
|
1684
1882
|
thumbColor: "#ffffff",
|
|
1685
1883
|
textColor: "var(--vf-text-color)",
|
|
1686
1884
|
disabledOpacity: "var(--vf-states-disabled-opacity)"
|
|
1687
|
-
},
|
|
1688
|
-
|
|
1885
|
+
}, xo = {
|
|
1886
|
+
padding: "0.35rem 0.6rem",
|
|
1887
|
+
borderRadius: "8px",
|
|
1888
|
+
backgroundColor: "rgba(0, 0, 0, 0.8)",
|
|
1889
|
+
textColor: "#ffffff",
|
|
1890
|
+
fontSize: "0.75rem",
|
|
1891
|
+
lineHeight: "1.2",
|
|
1892
|
+
shadow: "0 8px 20px rgba(0, 0, 0, 0.2)",
|
|
1893
|
+
zIndex: "120",
|
|
1894
|
+
maxWidth: "240px",
|
|
1895
|
+
arrowSize: "8px"
|
|
1896
|
+
}, Io = {
|
|
1897
|
+
...Re,
|
|
1689
1898
|
components: {
|
|
1690
|
-
base:
|
|
1691
|
-
button:
|
|
1692
|
-
card:
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
link:
|
|
1696
|
-
menu:
|
|
1697
|
-
modal:
|
|
1698
|
-
popover:
|
|
1699
|
-
select:
|
|
1700
|
-
checkbox:
|
|
1701
|
-
switch:
|
|
1899
|
+
base: Re,
|
|
1900
|
+
button: po,
|
|
1901
|
+
card: go,
|
|
1902
|
+
input: ho,
|
|
1903
|
+
textarea: mo,
|
|
1904
|
+
link: bo,
|
|
1905
|
+
menu: yo,
|
|
1906
|
+
modal: ko,
|
|
1907
|
+
popover: Co,
|
|
1908
|
+
select: wo,
|
|
1909
|
+
checkbox: _o,
|
|
1910
|
+
switch: $o,
|
|
1911
|
+
tooltip: xo
|
|
1702
1912
|
}
|
|
1703
1913
|
};
|
|
1704
1914
|
export {
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1915
|
+
To as Button,
|
|
1916
|
+
st as Card,
|
|
1917
|
+
Wo as Checkbox,
|
|
1918
|
+
Io as DefaultTheme,
|
|
1919
|
+
Ro as Input,
|
|
1920
|
+
He as Link,
|
|
1921
|
+
So as Menu,
|
|
1922
|
+
Eo as Modal,
|
|
1923
|
+
Ho as Popover,
|
|
1924
|
+
Vo as Select,
|
|
1925
|
+
Oo as Switch,
|
|
1926
|
+
Lo as Textarea,
|
|
1927
|
+
Mo as Tooltip,
|
|
1928
|
+
Do as VueForge,
|
|
1929
|
+
Ao as getTheme,
|
|
1930
|
+
je as setTheme,
|
|
1931
|
+
Po as updateTheme
|
|
1720
1932
|
};
|