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