@rocketui/vue 0.0.1 → 0.0.2
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 +1 -1
- package/dist/design-tokens.source.json +1 -0
- package/dist/favicon.ico +0 -0
- package/dist/rocket-ui-vue.js +1884 -0
- package/dist/rocket-ui-vue.umd.cjs +1 -0
- package/dist/style.css +2 -0
- package/dist/types/Alert/Alert.vue.d.ts +184 -0
- package/dist/types/Avatar/Avatar.vue.d.ts +130 -0
- package/dist/types/Badge/Badge.vue.d.ts +132 -0
- package/dist/types/Button/Button.vue.d.ts +287 -0
- package/dist/types/Checkbox/Checkbox.vue.d.ts +238 -0
- package/dist/types/Chips/Chip.vue.d.ts +220 -0
- package/dist/types/Dropdown/Dropdown.vue.d.ts +496 -0
- package/dist/types/Icon/Icon.vue.d.ts +114 -0
- package/dist/types/Label/Label.vue.d.ts +67 -0
- package/dist/types/Snackbar/Snackbar.vue.d.ts +419 -0
- package/dist/types/Switch/Switch.vue.d.ts +159 -0
- package/dist/types/TabItem/TabItem.vue.d.ts +220 -0
- package/dist/types/TabItem/common.d.ts +6 -0
- package/dist/types/Tabs/Tabs.vue.d.ts +212 -0
- package/dist/types/Tabs/types.d.ts +9 -0
- package/dist/types/TextArea/TextArea.vue.d.ts +191 -0
- package/dist/types/Textfield/Textfield.vue.d.ts +441 -0
- package/dist/types/Tooltip/Tooltip.vue.d.ts +319 -0
- package/dist/types/Tooltip/common.d.ts +23 -0
- package/package.json +4 -4
|
@@ -0,0 +1,1884 @@
|
|
|
1
|
+
import { defineComponent as O, computed as $, openBlock as d, createElementBlock as m, normalizeClass as k, unref as x, normalizeStyle as He, toDisplayString as z, createElementVNode as v, createVNode as be, createBlock as A, renderSlot as j, createCommentVNode as C, mergeProps as Ye, withModifiers as Y, reactive as ne, watch as F, ref as B, Fragment as Q, renderList as ae, withDirectives as Fe, withKeys as we, vModelText as We, onMounted as Ue, withCtx as Xe, createTextVNode as Ze, useCssVars as Qe, watchEffect as Ke } from "vue";
|
|
2
|
+
const E = /* @__PURE__ */ O({
|
|
3
|
+
__name: "Icon",
|
|
4
|
+
props: {
|
|
5
|
+
name: { default: "" },
|
|
6
|
+
kind: { default: "round" },
|
|
7
|
+
fontSize: { default: 24 },
|
|
8
|
+
color: { default: "" },
|
|
9
|
+
fontWeight: { default: "normal" }
|
|
10
|
+
},
|
|
11
|
+
setup(e) {
|
|
12
|
+
const n = e, t = $(() => ({
|
|
13
|
+
fontSize: `${n.fontSize}px`,
|
|
14
|
+
fontWeight: n.fontWeight,
|
|
15
|
+
color: n.color,
|
|
16
|
+
display: "inline-flex",
|
|
17
|
+
alignItems: "center",
|
|
18
|
+
justifyContent: "center"
|
|
19
|
+
})), s = $(() => n.kind === "filled" ? "material-icons" : `material-icons-${n.kind}`);
|
|
20
|
+
return (o, l) => (d(), m("span", {
|
|
21
|
+
class: k(x(s)),
|
|
22
|
+
style: He(x(t))
|
|
23
|
+
}, z(n.name), 7));
|
|
24
|
+
}
|
|
25
|
+
}), Ge = { class: "icon" }, Je = { class: "texts" }, qe = { class: "texts__title" }, et = { class: "texts__description" }, tt = {
|
|
26
|
+
key: 0,
|
|
27
|
+
class: "close"
|
|
28
|
+
}, zn = /* @__PURE__ */ O({
|
|
29
|
+
__name: "Alert",
|
|
30
|
+
props: {
|
|
31
|
+
type: { default: "info" },
|
|
32
|
+
title: { default: "" },
|
|
33
|
+
description: { default: "" },
|
|
34
|
+
size: { default: "medium" },
|
|
35
|
+
closable: { type: Boolean, default: !0 }
|
|
36
|
+
},
|
|
37
|
+
emits: ["close"],
|
|
38
|
+
setup(e, { emit: n }) {
|
|
39
|
+
const t = e, s = $(() => ({
|
|
40
|
+
alert: !0,
|
|
41
|
+
[`alert--${t.type}`]: !0,
|
|
42
|
+
[`alert--${t.size}`]: !0
|
|
43
|
+
})), o = $(() => ({
|
|
44
|
+
success: "check_circle",
|
|
45
|
+
error: "error",
|
|
46
|
+
warning: "warning",
|
|
47
|
+
info: "info"
|
|
48
|
+
})[t.type]), l = $(() => ({
|
|
49
|
+
small: 12,
|
|
50
|
+
medium: 16,
|
|
51
|
+
large: 20
|
|
52
|
+
})[t.size]), i = () => {
|
|
53
|
+
n("close");
|
|
54
|
+
};
|
|
55
|
+
return (a, r) => (d(), m("div", {
|
|
56
|
+
class: k(x(s))
|
|
57
|
+
}, [
|
|
58
|
+
v("div", Ge, [
|
|
59
|
+
be(E, {
|
|
60
|
+
name: x(o),
|
|
61
|
+
size: x(l)
|
|
62
|
+
}, null, 8, ["name", "size"])
|
|
63
|
+
]),
|
|
64
|
+
v("div", Je, [
|
|
65
|
+
v("p", qe, z(t.title), 1),
|
|
66
|
+
v("p", et, z(t.description), 1)
|
|
67
|
+
]),
|
|
68
|
+
t.closable ? (d(), m("div", tt, [
|
|
69
|
+
a.$slots.close ? j(a.$slots, "close", { key: 1 }) : (d(), A(E, {
|
|
70
|
+
key: 0,
|
|
71
|
+
class: "close__button",
|
|
72
|
+
name: "close",
|
|
73
|
+
size: "16",
|
|
74
|
+
onClick: i
|
|
75
|
+
}))
|
|
76
|
+
])) : C("", !0)
|
|
77
|
+
], 2));
|
|
78
|
+
}
|
|
79
|
+
}), ke = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjciIGhlaWdodD0iMjgiIHZpZXdCb3g9IjAgMCAyNyAyOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEzLjQ5OTMgMTRDMTcuMTgyNyAxNCAyMC4xNjYgMTEuMDE2NyAyMC4xNjYgNy4zMzMzNEMyMC4xNjYgMy42NSAxNy4xODI3IDAuNjY2NjcyIDEzLjQ5OTMgMC42NjY2NzJDOS44MTYwMiAwLjY2NjY3MiA2LjgzMjY4IDMuNjUgNi44MzI2OCA3LjMzMzM0QzYuODMyNjggMTEuMDE2NyA5LjgxNjAyIDE0IDEzLjQ5OTMgMTRaTTEzLjQ5OTMgMTcuMzMzM0M5LjA0OTM1IDE3LjMzMzMgMC4xNjYwMTYgMTkuNTY2NyAwLjE2NjAxNiAyNFYyNS42NjY3QzAuMTY2MDE2IDI2LjU4MzMgMC45MTYwMTYgMjcuMzMzMyAxLjgzMjY4IDI3LjMzMzNIMjUuMTY2QzI2LjA4MjcgMjcuMzMzMyAyNi44MzI3IDI2LjU4MzMgMjYuODMyNyAyNS42NjY3VjI0QzI2LjgzMjcgMTkuNTY2NyAxNy45NDkzIDE3LjMzMzMgMTMuNDk5MyAxNy4zMzMzWiIgZmlsbD0iIzRDNUJFMSIvPgo8L3N2Zz4K", nt = { class: "avatar__wrapper" }, ot = ["alt", "src"], An = /* @__PURE__ */ O({
|
|
80
|
+
__name: "Avatar",
|
|
81
|
+
props: {
|
|
82
|
+
type: { default: "image" },
|
|
83
|
+
src: { default: ke },
|
|
84
|
+
alt: { default: "Avatar" },
|
|
85
|
+
size: { default: "2xl" },
|
|
86
|
+
online: { type: Boolean, default: !1 },
|
|
87
|
+
text: { default: "" }
|
|
88
|
+
},
|
|
89
|
+
setup(e) {
|
|
90
|
+
const n = e, t = $(() => ({
|
|
91
|
+
avatar: !0,
|
|
92
|
+
[`avatar--${n.size}`]: !0
|
|
93
|
+
})), s = $(() => n.type === "image" && !n.src), o = $(() => s.value ? ke : n.src), l = (i) => {
|
|
94
|
+
const a = i.split(" ");
|
|
95
|
+
return a.length === 1 ? a[0].substring(0, 2) : `${a[0].charAt(0)}${a[1].charAt(0)}`;
|
|
96
|
+
};
|
|
97
|
+
return (i, a) => (d(), m("div", nt, [
|
|
98
|
+
v("div", {
|
|
99
|
+
class: k(x(t))
|
|
100
|
+
}, [
|
|
101
|
+
n.type === "text" ? (d(), m("p", {
|
|
102
|
+
key: 0,
|
|
103
|
+
class: k({ avatar__text: !0, [`avatar__text--${n.size}`]: !0 })
|
|
104
|
+
}, z(l(n.text)), 3)) : (d(), m("img", {
|
|
105
|
+
key: 1,
|
|
106
|
+
alt: n.alt,
|
|
107
|
+
class: k({
|
|
108
|
+
avatar__image: !0,
|
|
109
|
+
[`avatar__image--${n.size}`]: !0,
|
|
110
|
+
"avatar__image--anonymous": x(s)
|
|
111
|
+
}),
|
|
112
|
+
src: x(o)
|
|
113
|
+
}, null, 10, ot))
|
|
114
|
+
], 2),
|
|
115
|
+
n.online ? (d(), m("span", {
|
|
116
|
+
key: 0,
|
|
117
|
+
class: k({ avatar__online: !0, [`avatar__online--${n.size}`]: !0 })
|
|
118
|
+
}, null, 2)) : C("", !0)
|
|
119
|
+
]));
|
|
120
|
+
}
|
|
121
|
+
}), st = { class: "badge-wrapper group" }, In = /* @__PURE__ */ O({
|
|
122
|
+
__name: "Badge",
|
|
123
|
+
props: {
|
|
124
|
+
variant: { default: "primary" },
|
|
125
|
+
placement: { default: "right" },
|
|
126
|
+
overlap: { type: Boolean, default: !1 },
|
|
127
|
+
hover: { type: Boolean, default: !1 },
|
|
128
|
+
content: { default: "" },
|
|
129
|
+
outside: { type: Boolean, default: !1 }
|
|
130
|
+
},
|
|
131
|
+
emits: ["click"],
|
|
132
|
+
setup(e) {
|
|
133
|
+
const n = e, t = $(() => ({
|
|
134
|
+
badge: !0,
|
|
135
|
+
badge__content: n.content,
|
|
136
|
+
[`badge--overlap-${n.placement}`]: n.overlap,
|
|
137
|
+
[`badge--${n.placement}`]: n.placement,
|
|
138
|
+
[`badge--outside-${n.placement}`]: n.outside,
|
|
139
|
+
"badge--hover": n.hover,
|
|
140
|
+
"badge--no-content": !n.content,
|
|
141
|
+
[`badge--${n.variant}`]: n.variant
|
|
142
|
+
}));
|
|
143
|
+
return (s, o) => (d(), m("div", st, [
|
|
144
|
+
v("span", {
|
|
145
|
+
class: k(x(t)),
|
|
146
|
+
onClick: o[0] || (o[0] = (l) => s.$emit("click"))
|
|
147
|
+
}, z(n.content), 3),
|
|
148
|
+
j(s.$slots, "default")
|
|
149
|
+
]));
|
|
150
|
+
}
|
|
151
|
+
}), lt = ["disabled"], it = /* @__PURE__ */ O({
|
|
152
|
+
__name: "Button",
|
|
153
|
+
props: {
|
|
154
|
+
variant: { default: "primary" },
|
|
155
|
+
loading: { type: Boolean, default: !1 },
|
|
156
|
+
disabled: { type: Boolean, default: !1 },
|
|
157
|
+
prependIcon: { default: "" },
|
|
158
|
+
appendIcon: { default: "" },
|
|
159
|
+
onlyIcon: { type: Boolean, default: !1 },
|
|
160
|
+
size: { default: "medium" },
|
|
161
|
+
height: { default: "" },
|
|
162
|
+
block: { type: Boolean, default: !1 },
|
|
163
|
+
backgroundColor: { default: "" }
|
|
164
|
+
},
|
|
165
|
+
emits: ["click"],
|
|
166
|
+
setup(e) {
|
|
167
|
+
const n = e, t = $(() => ({
|
|
168
|
+
button: !0,
|
|
169
|
+
[`button--${n.variant}`]: !0,
|
|
170
|
+
["button--loading"]: n.loading,
|
|
171
|
+
[`button--${n.size || "medium"}`]: !0,
|
|
172
|
+
["button--only-icon"]: n.onlyIcon,
|
|
173
|
+
["button--block"]: n.block
|
|
174
|
+
})), s = $(() => n.size === "large" ? 20 : 16), o = $(() => {
|
|
175
|
+
const { backgroundColor: l, height: i } = n;
|
|
176
|
+
return {
|
|
177
|
+
backgroundColor: l,
|
|
178
|
+
height: i ? `${i}px` : ""
|
|
179
|
+
};
|
|
180
|
+
});
|
|
181
|
+
return (l, i) => (d(), m("button", Ye(l.$attrs, {
|
|
182
|
+
class: x(t),
|
|
183
|
+
disabled: e.disabled || e.loading,
|
|
184
|
+
style: x(o),
|
|
185
|
+
onClick: i[0] || (i[0] = Y((a) => l.$emit("click"), ["stop"]))
|
|
186
|
+
}), [
|
|
187
|
+
j(l.$slots, "custom-icon"),
|
|
188
|
+
l.$slots["custom-icon"] ? C("", !0) : (d(), A(E, {
|
|
189
|
+
key: 0,
|
|
190
|
+
class: k({
|
|
191
|
+
"button__prepend-icon": !0,
|
|
192
|
+
"button__prepend-icon--only": n.onlyIcon
|
|
193
|
+
}),
|
|
194
|
+
name: n.prependIcon,
|
|
195
|
+
size: x(s)
|
|
196
|
+
}, null, 8, ["class", "name", "size"])),
|
|
197
|
+
n.onlyIcon ? C("", !0) : j(l.$slots, "default", { key: 1 }),
|
|
198
|
+
!l.$slots["custom-icon"] && !n.onlyIcon ? (d(), A(E, {
|
|
199
|
+
key: 2,
|
|
200
|
+
class: "button__append-icon",
|
|
201
|
+
name: n.appendIcon,
|
|
202
|
+
size: x(s)
|
|
203
|
+
}, null, 8, ["name", "size"])) : C("", !0)
|
|
204
|
+
], 16, lt));
|
|
205
|
+
}
|
|
206
|
+
}), at = { class: "checkbox-wrapper" }, rt = { class: "checkbox-container" }, ct = ["id", "checked", "disabled", "indeterminate"], dt = ["data-disabled"], ut = { class: "checkbox-texts" }, ft = ["data-disabled", "for"], pt = {
|
|
207
|
+
key: 0,
|
|
208
|
+
class: "checkbox-texts__error"
|
|
209
|
+
}, ht = {
|
|
210
|
+
key: 1,
|
|
211
|
+
class: "checkbox-texts__hint"
|
|
212
|
+
}, Nn = /* @__PURE__ */ O({
|
|
213
|
+
__name: "Checkbox",
|
|
214
|
+
props: {
|
|
215
|
+
id: { default: "" },
|
|
216
|
+
modelValue: { default: !1 },
|
|
217
|
+
label: { default: "" },
|
|
218
|
+
indeterminate: { default: !1 },
|
|
219
|
+
disabled: { default: !1 },
|
|
220
|
+
hint: { default: "" },
|
|
221
|
+
errorMsg: { default: "" }
|
|
222
|
+
},
|
|
223
|
+
emits: ["update:modelValue"],
|
|
224
|
+
setup(e, { emit: n }) {
|
|
225
|
+
const t = e, s = ne({
|
|
226
|
+
checked: !1,
|
|
227
|
+
indeterminate: !1
|
|
228
|
+
}), o = {
|
|
229
|
+
checked: "check",
|
|
230
|
+
unchecked: "",
|
|
231
|
+
indeterminate: "remove"
|
|
232
|
+
}, l = $(() => s.indeterminate ? o.indeterminate : s.checked ? o.checked : o.unchecked), i = $(() => ({
|
|
233
|
+
checkbox: !0,
|
|
234
|
+
"checkbox--checked": s.checked,
|
|
235
|
+
"checkbox--disabled": t.disabled,
|
|
236
|
+
"checkbox--indeterminate": s.indeterminate,
|
|
237
|
+
"checkbox--error": !!t.errorMsg
|
|
238
|
+
})), a = (r) => {
|
|
239
|
+
t.disabled || (s.checked = r.target.checked, s.indeterminate = !1, n("update:modelValue", s.checked));
|
|
240
|
+
};
|
|
241
|
+
return F(
|
|
242
|
+
() => t.indeterminate,
|
|
243
|
+
(r) => {
|
|
244
|
+
s.indeterminate = r, r === !0 && (s.checked = !1, n("update:modelValue", s.checked));
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
immediate: !0
|
|
248
|
+
}
|
|
249
|
+
), F(
|
|
250
|
+
() => t.modelValue,
|
|
251
|
+
(r) => {
|
|
252
|
+
s.checked = r;
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
immediate: !0
|
|
256
|
+
}
|
|
257
|
+
), (r, u) => (d(), m("div", at, [
|
|
258
|
+
v("div", rt, [
|
|
259
|
+
v("input", {
|
|
260
|
+
id: t.id,
|
|
261
|
+
checked: s.checked,
|
|
262
|
+
class: "checkbox-container__input",
|
|
263
|
+
disabled: t.disabled,
|
|
264
|
+
indeterminate: s.indeterminate,
|
|
265
|
+
type: "checkbox",
|
|
266
|
+
onChange: a
|
|
267
|
+
}, null, 40, ct),
|
|
268
|
+
v("div", {
|
|
269
|
+
class: k(x(i)),
|
|
270
|
+
"data-disabled": t.disabled
|
|
271
|
+
}, [
|
|
272
|
+
be(E, {
|
|
273
|
+
name: x(l),
|
|
274
|
+
size: "16"
|
|
275
|
+
}, null, 8, ["name"])
|
|
276
|
+
], 10, dt)
|
|
277
|
+
]),
|
|
278
|
+
v("div", ut, [
|
|
279
|
+
v("label", {
|
|
280
|
+
class: "checkbox-texts__label",
|
|
281
|
+
"data-disabled": t.disabled,
|
|
282
|
+
for: t.id
|
|
283
|
+
}, z(t.label), 9, ft),
|
|
284
|
+
t.errorMsg ? (d(), m("p", pt, z(t.errorMsg), 1)) : (d(), m("p", ht, z(t.hint), 1))
|
|
285
|
+
])
|
|
286
|
+
]));
|
|
287
|
+
}
|
|
288
|
+
}), mt = /* @__PURE__ */ O({
|
|
289
|
+
__name: "Chip",
|
|
290
|
+
props: {
|
|
291
|
+
variant: { default: "primary" },
|
|
292
|
+
size: { default: "medium" },
|
|
293
|
+
label: { default: "label" },
|
|
294
|
+
disabled: { type: Boolean, default: !1 },
|
|
295
|
+
prependIcon: { default: "" },
|
|
296
|
+
appendIcon: { default: "" },
|
|
297
|
+
ghost: { type: Boolean, default: !1 }
|
|
298
|
+
},
|
|
299
|
+
emits: ["click:chip", "click:close"],
|
|
300
|
+
setup(e, { emit: n }) {
|
|
301
|
+
const t = e, s = $(() => ({
|
|
302
|
+
chip: !0,
|
|
303
|
+
"chip--disabled": t.disabled,
|
|
304
|
+
[`chip__${t.variant}`]: t.variant,
|
|
305
|
+
[`chip--${t.size}`]: t.size,
|
|
306
|
+
[`chip__${t.variant}--ghost`]: t.ghost
|
|
307
|
+
})), o = $(() => t.size === "small" ? "10" : t.size === "large" ? "16" : "12"), l = (a) => {
|
|
308
|
+
t.disabled || n("click:chip", a);
|
|
309
|
+
}, i = (a) => {
|
|
310
|
+
t.disabled || n("click:close", a);
|
|
311
|
+
};
|
|
312
|
+
return (a, r) => (d(), m("div", {
|
|
313
|
+
class: k(x(s))
|
|
314
|
+
}, [
|
|
315
|
+
v("div", {
|
|
316
|
+
class: "chip__content",
|
|
317
|
+
onClick: r[0] || (r[0] = Y((u) => l(u), ["stop"]))
|
|
318
|
+
}, [
|
|
319
|
+
t.prependIcon ? (d(), A(E, {
|
|
320
|
+
key: 0,
|
|
321
|
+
"aria-disabled": t.disabled,
|
|
322
|
+
class: "chip__prepend-icon",
|
|
323
|
+
name: t.prependIcon,
|
|
324
|
+
size: x(o)
|
|
325
|
+
}, null, 8, ["aria-disabled", "name", "size"])) : C("", !0),
|
|
326
|
+
v("span", null, z(t.label), 1)
|
|
327
|
+
]),
|
|
328
|
+
t.appendIcon ? (d(), A(E, {
|
|
329
|
+
key: 0,
|
|
330
|
+
"aria-disabled": t.disabled,
|
|
331
|
+
class: "chip__append-icon",
|
|
332
|
+
name: t.appendIcon,
|
|
333
|
+
size: x(o),
|
|
334
|
+
onClick: r[1] || (r[1] = Y((u) => i(u), ["stop"]))
|
|
335
|
+
}, null, 8, ["aria-disabled", "name", "size"])) : C("", !0)
|
|
336
|
+
], 2));
|
|
337
|
+
}
|
|
338
|
+
}), gt = { class: "dropdown" }, _t = {
|
|
339
|
+
key: 0,
|
|
340
|
+
class: "select__tags"
|
|
341
|
+
}, bt = {
|
|
342
|
+
key: 1,
|
|
343
|
+
class: "select__multiple"
|
|
344
|
+
}, vt = ["disabled", "placeholder"], yt = ["onClick"], xt = { style: { display: "flex", "align-items": "center" } }, Ln = /* @__PURE__ */ O({
|
|
345
|
+
__name: "Dropdown",
|
|
346
|
+
props: {
|
|
347
|
+
placeholder: { default: "" },
|
|
348
|
+
options: { default: () => [] },
|
|
349
|
+
taggable: { type: Boolean, default: !1 },
|
|
350
|
+
multiple: { type: Boolean, default: !1 },
|
|
351
|
+
disabled: { type: Boolean, default: !1 },
|
|
352
|
+
loading: { type: Boolean, default: !1 },
|
|
353
|
+
prependIcon: { default: "" },
|
|
354
|
+
appendIcon: { default: "expand_less" },
|
|
355
|
+
modelValue: { default: "" }
|
|
356
|
+
},
|
|
357
|
+
emits: ["update:modelValue"],
|
|
358
|
+
setup(e, { emit: n }) {
|
|
359
|
+
const t = e, s = B(""), o = ne([]), l = B(!1), i = B(""), a = B(null), r = B(null), u = (p) => {
|
|
360
|
+
var h, c, b, w, T, I;
|
|
361
|
+
if (!t.disabled) {
|
|
362
|
+
if (p.stopPropagation(), l.value = !l.value, l.value) {
|
|
363
|
+
(h = a.value) == null || h.classList.add("select--active"), (c = a.value) == null || c.focus(), (b = r.value) == null || b.focus(), document.addEventListener("click", u);
|
|
364
|
+
return;
|
|
365
|
+
}
|
|
366
|
+
(w = a.value) == null || w.classList.remove("select--active"), (T = a.value) == null || T.blur(), (I = r.value) == null || I.blur(), document.removeEventListener("click", u);
|
|
367
|
+
}
|
|
368
|
+
}, y = (p, h) => {
|
|
369
|
+
var c;
|
|
370
|
+
if (t.multiple || t.taggable) {
|
|
371
|
+
p.stopPropagation(), o.includes(h) ? o.splice(o.indexOf(h), 1) : o.push(h), i.value = "", (c = r.value) == null || c.focus();
|
|
372
|
+
return;
|
|
373
|
+
} else
|
|
374
|
+
n("update:modelValue", h.value), s.value = h.label, i.value = h.label;
|
|
375
|
+
}, f = (p, h) => {
|
|
376
|
+
if (p instanceof KeyboardEvent && p.key !== "Backspace" || i.value !== "")
|
|
377
|
+
return;
|
|
378
|
+
p.stopPropagation();
|
|
379
|
+
const c = o.findIndex((b) => b.value === h.value);
|
|
380
|
+
o.splice(c, 1);
|
|
381
|
+
}, g = (p) => {
|
|
382
|
+
var b;
|
|
383
|
+
if (!t.taggable)
|
|
384
|
+
return;
|
|
385
|
+
p.stopPropagation();
|
|
386
|
+
const h = i.value;
|
|
387
|
+
if (h === "")
|
|
388
|
+
return;
|
|
389
|
+
t.options.find((w) => w.label === h) || (o.push({ value: h, label: h }), i.value = "", (b = r.value) == null || b.focus());
|
|
390
|
+
}, _ = $(() => t.options.filter((h) => h.label.toLowerCase().includes(i.value.toLowerCase())));
|
|
391
|
+
return F(o, (p) => {
|
|
392
|
+
n("update:modelValue", p);
|
|
393
|
+
}), (p, h) => (d(), m("div", gt, [
|
|
394
|
+
v("div", {
|
|
395
|
+
ref_key: "select",
|
|
396
|
+
ref: a,
|
|
397
|
+
class: k({ select: !0, "select--disabled": t.disabled }),
|
|
398
|
+
onClick: u
|
|
399
|
+
}, [
|
|
400
|
+
v("div", {
|
|
401
|
+
class: k({
|
|
402
|
+
"select__prepend-icon": !0,
|
|
403
|
+
"select__prepend-icon--active": l.value
|
|
404
|
+
})
|
|
405
|
+
}, [
|
|
406
|
+
j(p.$slots, "prepend-icon"),
|
|
407
|
+
p.$slots["prepend-icon"] ? C("", !0) : (d(), A(E, {
|
|
408
|
+
key: 0,
|
|
409
|
+
name: t.prependIcon
|
|
410
|
+
}, null, 8, ["name"]))
|
|
411
|
+
], 2),
|
|
412
|
+
t.taggable ? (d(), m("div", _t, [
|
|
413
|
+
(d(!0), m(Q, null, ae(o, (c, b) => (d(), A(mt, {
|
|
414
|
+
key: b,
|
|
415
|
+
appendIcon: "close",
|
|
416
|
+
class: "select__tags__chip",
|
|
417
|
+
label: c.label,
|
|
418
|
+
variant: "primary",
|
|
419
|
+
onClickIcon: (w) => f(w, c)
|
|
420
|
+
}, null, 8, ["label", "onClickIcon"]))), 128))
|
|
421
|
+
])) : C("", !0),
|
|
422
|
+
t.multiple ? (d(), m("div", bt, [
|
|
423
|
+
(d(!0), m(Q, null, ae(o, (c, b) => (d(), m("p", { key: b }, z(c.label + ","), 1))), 128))
|
|
424
|
+
])) : C("", !0),
|
|
425
|
+
Fe(v("input", {
|
|
426
|
+
id: "select",
|
|
427
|
+
ref_key: "input",
|
|
428
|
+
ref: r,
|
|
429
|
+
"onUpdate:modelValue": h[0] || (h[0] = (c) => i.value = c),
|
|
430
|
+
class: "select__input",
|
|
431
|
+
disabled: t.disabled,
|
|
432
|
+
placeholder: t.placeholder,
|
|
433
|
+
type: "text",
|
|
434
|
+
onKeydown: [
|
|
435
|
+
h[1] || (h[1] = we((c) => f(c, o[o.length - 1]), ["backspace"])),
|
|
436
|
+
h[2] || (h[2] = we((c) => g(c), ["enter"]))
|
|
437
|
+
]
|
|
438
|
+
}, null, 40, vt), [
|
|
439
|
+
[We, i.value]
|
|
440
|
+
]),
|
|
441
|
+
v("div", {
|
|
442
|
+
class: k({
|
|
443
|
+
"select__append-icon": !0,
|
|
444
|
+
"select__append-icon--active": l.value
|
|
445
|
+
})
|
|
446
|
+
}, [
|
|
447
|
+
j(p.$slots, "append-icon"),
|
|
448
|
+
p.$slots["append-icon"] ? C("", !0) : (d(), A(E, {
|
|
449
|
+
key: 0,
|
|
450
|
+
name: t.appendIcon
|
|
451
|
+
}, null, 8, ["name"]))
|
|
452
|
+
], 2)
|
|
453
|
+
], 2),
|
|
454
|
+
v("ul", {
|
|
455
|
+
class: k({ "select-options": !0, "select-options--active": l.value })
|
|
456
|
+
}, [
|
|
457
|
+
(d(!0), m(Q, null, ae(x(_), (c) => (d(), m("li", {
|
|
458
|
+
key: c.value,
|
|
459
|
+
class: k({
|
|
460
|
+
"select-options__option": !0,
|
|
461
|
+
"select-options__option--active": c.label === s.value || (o == null ? void 0 : o.includes(c))
|
|
462
|
+
}),
|
|
463
|
+
onClick: (b) => y(b, c)
|
|
464
|
+
}, [
|
|
465
|
+
v("div", xt, [
|
|
466
|
+
j(p.$slots, "option-prepend"),
|
|
467
|
+
p.$slots["option-prepend"] ? C("", !0) : (d(), A(E, {
|
|
468
|
+
key: 0,
|
|
469
|
+
class: k({
|
|
470
|
+
"select-options__option__prepend-icon": !0,
|
|
471
|
+
"select-options__option__prepend-icon--active": c.label === s.value || (o == null ? void 0 : o.includes(c))
|
|
472
|
+
}),
|
|
473
|
+
name: "face"
|
|
474
|
+
}, null, 8, ["class"])),
|
|
475
|
+
v("p", {
|
|
476
|
+
class: k({
|
|
477
|
+
"select-options__option__label": !0,
|
|
478
|
+
"select-options__option__label--active": c.label === s.value || (o == null ? void 0 : o.includes(c))
|
|
479
|
+
})
|
|
480
|
+
}, z(c.label), 3)
|
|
481
|
+
]),
|
|
482
|
+
c.label === s.value || (o == null ? void 0 : o.includes(c)) ? (d(), A(E, {
|
|
483
|
+
key: 0,
|
|
484
|
+
class: k({
|
|
485
|
+
"select-options__option__append-icon": !0,
|
|
486
|
+
"select-options__option__append-icon--active": c.label === s.value || (o == null ? void 0 : o.includes(c))
|
|
487
|
+
}),
|
|
488
|
+
name: "check"
|
|
489
|
+
}, null, 8, ["class"])) : C("", !0)
|
|
490
|
+
], 10, yt))), 128))
|
|
491
|
+
], 2)
|
|
492
|
+
]));
|
|
493
|
+
}
|
|
494
|
+
}), wt = ["id", "for"], Oe = /* @__PURE__ */ O({
|
|
495
|
+
__name: "Label",
|
|
496
|
+
props: {
|
|
497
|
+
id: { default: "" },
|
|
498
|
+
for: { default: "" },
|
|
499
|
+
text: { default: "" }
|
|
500
|
+
},
|
|
501
|
+
setup(e) {
|
|
502
|
+
const n = e;
|
|
503
|
+
return (t, s) => (d(), m("label", {
|
|
504
|
+
id: n.id,
|
|
505
|
+
for: n.for
|
|
506
|
+
}, z(n.text), 9, wt));
|
|
507
|
+
}
|
|
508
|
+
}), kt = { class: "snackbar__text" }, $t = {
|
|
509
|
+
key: 0,
|
|
510
|
+
class: "snackbar__action"
|
|
511
|
+
}, Mt = {
|
|
512
|
+
key: 1,
|
|
513
|
+
class: "snackbar__close"
|
|
514
|
+
}, On = /* @__PURE__ */ O({
|
|
515
|
+
__name: "Snackbar",
|
|
516
|
+
props: {
|
|
517
|
+
text: { default: "" },
|
|
518
|
+
actionText: { default: "" },
|
|
519
|
+
showAction: { type: Boolean, default: !1 },
|
|
520
|
+
showClose: { type: Boolean, default: !1 },
|
|
521
|
+
left: { type: Boolean, default: !1 },
|
|
522
|
+
show: { type: Boolean, default: !1 },
|
|
523
|
+
timeout: { default: 0 }
|
|
524
|
+
},
|
|
525
|
+
emits: ["click:action", "click:close"],
|
|
526
|
+
setup(e, { emit: n }) {
|
|
527
|
+
const t = e, s = B(!1), o = () => {
|
|
528
|
+
n("click:action");
|
|
529
|
+
}, l = () => {
|
|
530
|
+
s.value = !1, n("click:close");
|
|
531
|
+
};
|
|
532
|
+
return Ue(() => {
|
|
533
|
+
t.timeout && setTimeout(() => {
|
|
534
|
+
s.value = !1, n("click:close");
|
|
535
|
+
}, t.timeout);
|
|
536
|
+
}), F(
|
|
537
|
+
() => t.show,
|
|
538
|
+
(i) => {
|
|
539
|
+
s.value = i;
|
|
540
|
+
},
|
|
541
|
+
{ immediate: !0 }
|
|
542
|
+
), (i, a) => (d(), m("div", {
|
|
543
|
+
class: k({
|
|
544
|
+
snackbar: !0,
|
|
545
|
+
"snackbar--closed": !s.value,
|
|
546
|
+
[t.left ? "snackbar--left" : "snackbar--right"]: !0
|
|
547
|
+
})
|
|
548
|
+
}, [
|
|
549
|
+
v("div", kt, z(t.text), 1),
|
|
550
|
+
t.showAction ? (d(), m("div", $t, [
|
|
551
|
+
j(i.$slots, "action"),
|
|
552
|
+
i.$slots.action ? C("", !0) : (d(), A(it, {
|
|
553
|
+
key: 0,
|
|
554
|
+
size: "small",
|
|
555
|
+
variant: "ghost",
|
|
556
|
+
onClick: o
|
|
557
|
+
}, {
|
|
558
|
+
default: Xe(() => [
|
|
559
|
+
Ze(z(t.actionText), 1)
|
|
560
|
+
]),
|
|
561
|
+
_: 1
|
|
562
|
+
}))
|
|
563
|
+
])) : C("", !0),
|
|
564
|
+
t.showClose ? (d(), m("div", Mt, [
|
|
565
|
+
j(i.$slots, "close"),
|
|
566
|
+
i.$slots.close ? C("", !0) : (d(), A(E, {
|
|
567
|
+
key: 0,
|
|
568
|
+
name: "close",
|
|
569
|
+
size: "14",
|
|
570
|
+
onClick: Y(l, ["stop"])
|
|
571
|
+
}, null, 8, ["onClick"]))
|
|
572
|
+
])) : C("", !0)
|
|
573
|
+
], 2));
|
|
574
|
+
}
|
|
575
|
+
}), Ct = { class: "switch-container" }, Tt = ["id", "checked"], zt = /* @__PURE__ */ v("span", { class: "slider round" }, null, -1), At = ["id", "for"], It = {
|
|
576
|
+
key: 0,
|
|
577
|
+
class: "switch-texts__error"
|
|
578
|
+
}, Nt = {
|
|
579
|
+
key: 1,
|
|
580
|
+
class: "switch-texts__hint"
|
|
581
|
+
}, En = /* @__PURE__ */ O({
|
|
582
|
+
__name: "Switch",
|
|
583
|
+
props: {
|
|
584
|
+
id: { default: "switch" },
|
|
585
|
+
modelValue: { default: !1 },
|
|
586
|
+
disabled: { default: !1 },
|
|
587
|
+
label: { default: "" },
|
|
588
|
+
hint: { default: "" },
|
|
589
|
+
errorMsg: { default: "" },
|
|
590
|
+
size: { default: "medium" }
|
|
591
|
+
},
|
|
592
|
+
emits: ["update:modelValue"],
|
|
593
|
+
setup(e, { emit: n }) {
|
|
594
|
+
const t = e, s = ne({
|
|
595
|
+
checked: !1
|
|
596
|
+
}), o = $(() => ({
|
|
597
|
+
switch: !0,
|
|
598
|
+
"switch--disabled": t.disabled,
|
|
599
|
+
[`switch--${t.size}`]: t.size,
|
|
600
|
+
"switch--error": t.errorMsg
|
|
601
|
+
})), l = (i) => {
|
|
602
|
+
t.disabled || (s.checked = i.target.checked, n("update:modelValue", s.checked));
|
|
603
|
+
};
|
|
604
|
+
return F(
|
|
605
|
+
() => t.modelValue,
|
|
606
|
+
(i) => {
|
|
607
|
+
s.checked = i;
|
|
608
|
+
},
|
|
609
|
+
{
|
|
610
|
+
immediate: !0
|
|
611
|
+
}
|
|
612
|
+
), (i, a) => (d(), m("div", Ct, [
|
|
613
|
+
v("div", {
|
|
614
|
+
class: k(x(o))
|
|
615
|
+
}, [
|
|
616
|
+
v("input", {
|
|
617
|
+
id: t.id,
|
|
618
|
+
checked: s.checked,
|
|
619
|
+
class: "switch__input",
|
|
620
|
+
type: "checkbox",
|
|
621
|
+
onChange: l
|
|
622
|
+
}, null, 40, Tt),
|
|
623
|
+
zt
|
|
624
|
+
], 2),
|
|
625
|
+
v("div", {
|
|
626
|
+
class: k({
|
|
627
|
+
"switch-texts": !0,
|
|
628
|
+
[`switch-texts--${t.size}`]: !0
|
|
629
|
+
})
|
|
630
|
+
}, [
|
|
631
|
+
v("label", {
|
|
632
|
+
id: t.id,
|
|
633
|
+
class: "switch-texts__label",
|
|
634
|
+
for: t.id
|
|
635
|
+
}, z(t.label), 9, At),
|
|
636
|
+
t.errorMsg ? (d(), m("p", It, z(t.errorMsg), 1)) : (d(), m("p", Nt, z(t.hint), 1))
|
|
637
|
+
], 2)
|
|
638
|
+
]));
|
|
639
|
+
}
|
|
640
|
+
});
|
|
641
|
+
var re = /* @__PURE__ */ ((e) => (e.DEFAULT = "default", e.TEXT_ONLY = "text-only", e.ICON_ONLY = "icon-only", e))(re || {});
|
|
642
|
+
const Lt = ["aria-disabled", "aria-selected", "disabled"], Ot = {
|
|
643
|
+
key: 1,
|
|
644
|
+
class: "tab-item__label"
|
|
645
|
+
}, Et = /* @__PURE__ */ O({
|
|
646
|
+
__name: "TabItem",
|
|
647
|
+
props: {
|
|
648
|
+
id: null,
|
|
649
|
+
variant: { default: re.DEFAULT },
|
|
650
|
+
label: { default: "" },
|
|
651
|
+
icon: { default: "" },
|
|
652
|
+
disabled: { default: !1 },
|
|
653
|
+
active: { default: !1 },
|
|
654
|
+
modelValue: { default: "" }
|
|
655
|
+
},
|
|
656
|
+
emits: ["update:modelValue"],
|
|
657
|
+
setup(e, { emit: n }) {
|
|
658
|
+
const t = e, s = $(() => ({
|
|
659
|
+
"tab-item": !0,
|
|
660
|
+
[`tab-item--${t.variant}`]: !0
|
|
661
|
+
}));
|
|
662
|
+
function o(l) {
|
|
663
|
+
n("update:modelValue", l);
|
|
664
|
+
}
|
|
665
|
+
return (l, i) => (d(), m("button", {
|
|
666
|
+
"aria-disabled": t.disabled,
|
|
667
|
+
"aria-selected": t.active,
|
|
668
|
+
class: k(x(s)),
|
|
669
|
+
disabled: t.disabled,
|
|
670
|
+
onClick: i[0] || (i[0] = (a) => o(t.id))
|
|
671
|
+
}, [
|
|
672
|
+
j(l.$slots, "icon"),
|
|
673
|
+
!l.$slots.icon && e.variant !== x(re).TEXT_ONLY ? (d(), A(E, {
|
|
674
|
+
key: 0,
|
|
675
|
+
class: "tab-item__icon",
|
|
676
|
+
name: t.icon,
|
|
677
|
+
size: "16"
|
|
678
|
+
}, null, 8, ["name"])) : C("", !0),
|
|
679
|
+
e.variant !== x(re).ICON_ONLY ? (d(), m("span", Ot, z(t.label), 1)) : C("", !0)
|
|
680
|
+
], 10, Lt));
|
|
681
|
+
}
|
|
682
|
+
}), Dt = { class: "tabs-wrapper" }, Bt = { class: "tab-content" }, Dn = /* @__PURE__ */ O({
|
|
683
|
+
__name: "Tabs",
|
|
684
|
+
props: {
|
|
685
|
+
tabs: { default: () => [] },
|
|
686
|
+
scrollable: { type: Boolean, default: !1 }
|
|
687
|
+
},
|
|
688
|
+
setup(e) {
|
|
689
|
+
const n = e, t = B(0), s = $(() => ({
|
|
690
|
+
tabs: !0,
|
|
691
|
+
"tabs--scrollable": n.scrollable
|
|
692
|
+
}));
|
|
693
|
+
return (o, l) => (d(), m(Q, null, [
|
|
694
|
+
v("div", Dt, [
|
|
695
|
+
v("div", {
|
|
696
|
+
class: k(x(s))
|
|
697
|
+
}, [
|
|
698
|
+
(d(!0), m(Q, null, ae(n.tabs, (i, a) => (d(), A(Et, {
|
|
699
|
+
id: i.id,
|
|
700
|
+
key: a,
|
|
701
|
+
modelValue: t.value,
|
|
702
|
+
"onUpdate:modelValue": l[0] || (l[0] = (r) => t.value = r),
|
|
703
|
+
active: a === t.value,
|
|
704
|
+
disabled: i.disabled,
|
|
705
|
+
icon: i.icon,
|
|
706
|
+
label: i.label
|
|
707
|
+
}, null, 8, ["id", "modelValue", "active", "disabled", "icon", "label"]))), 128))
|
|
708
|
+
], 2)
|
|
709
|
+
]),
|
|
710
|
+
v("div", Bt, [
|
|
711
|
+
j(o.$slots, "tab", { activeTab: t.value })
|
|
712
|
+
])
|
|
713
|
+
], 64));
|
|
714
|
+
}
|
|
715
|
+
});
|
|
716
|
+
const jt = { class: "container" }, Vt = ["id", "disabled", "placeholder", "value"], Rt = {
|
|
717
|
+
key: 1,
|
|
718
|
+
class: "textarea__error"
|
|
719
|
+
}, St = {
|
|
720
|
+
key: 2,
|
|
721
|
+
class: "textarea__hint"
|
|
722
|
+
}, Bn = /* @__PURE__ */ O({
|
|
723
|
+
__name: "TextArea",
|
|
724
|
+
props: {
|
|
725
|
+
id: { default: "" },
|
|
726
|
+
modelValue: { default: "" },
|
|
727
|
+
label: { default: "" },
|
|
728
|
+
placeholder: { default: "" },
|
|
729
|
+
disabled: { default: !1 },
|
|
730
|
+
hint: { default: "This is a hint" },
|
|
731
|
+
errorMsg: { default: "" }
|
|
732
|
+
},
|
|
733
|
+
emits: ["update:modelValue"],
|
|
734
|
+
setup(e, { emit: n }) {
|
|
735
|
+
const t = e, s = ne({
|
|
736
|
+
value: ""
|
|
737
|
+
});
|
|
738
|
+
function o(l) {
|
|
739
|
+
n("update:modelValue", l.target.value);
|
|
740
|
+
}
|
|
741
|
+
return F(
|
|
742
|
+
() => t.modelValue,
|
|
743
|
+
(l) => {
|
|
744
|
+
s.value = l;
|
|
745
|
+
},
|
|
746
|
+
{
|
|
747
|
+
immediate: !0
|
|
748
|
+
}
|
|
749
|
+
), (l, i) => (d(), m("div", jt, [
|
|
750
|
+
t.label ? (d(), A(Oe, {
|
|
751
|
+
key: 0,
|
|
752
|
+
id: "textarea",
|
|
753
|
+
class: "textarea__label",
|
|
754
|
+
for: "textarea",
|
|
755
|
+
text: t.label
|
|
756
|
+
}, null, 8, ["text"])) : C("", !0),
|
|
757
|
+
v("textarea", {
|
|
758
|
+
id: t.id,
|
|
759
|
+
class: k(["textarea", {
|
|
760
|
+
"textarea--error": t.errorMsg,
|
|
761
|
+
"textarea--disabled": t.disabled
|
|
762
|
+
}]),
|
|
763
|
+
disabled: t.disabled,
|
|
764
|
+
placeholder: t.placeholder,
|
|
765
|
+
value: s.value,
|
|
766
|
+
onInput: o
|
|
767
|
+
}, null, 42, Vt),
|
|
768
|
+
t.errorMsg ? (d(), m("p", Rt, z(t.errorMsg), 1)) : (d(), m("p", St, z(t.hint), 1))
|
|
769
|
+
]));
|
|
770
|
+
}
|
|
771
|
+
}), Pt = {
|
|
772
|
+
class: /* @__PURE__ */ k({
|
|
773
|
+
textfield__wrapper: !0
|
|
774
|
+
})
|
|
775
|
+
}, Ht = { class: "input-wrapper" }, Yt = ["id", "disabled", "placeholder", "type", "value"], Ft = { class: "textfield__error" }, Wt = {
|
|
776
|
+
key: 0,
|
|
777
|
+
class: "textfield__hint"
|
|
778
|
+
}, jn = /* @__PURE__ */ O({
|
|
779
|
+
__name: "Textfield",
|
|
780
|
+
props: {
|
|
781
|
+
id: { default: "" },
|
|
782
|
+
type: { default: "text" },
|
|
783
|
+
modelValue: { default: "" },
|
|
784
|
+
label: { default: "" },
|
|
785
|
+
placeholder: { default: "" },
|
|
786
|
+
errorMsg: { default: "" },
|
|
787
|
+
hint: { default: "" },
|
|
788
|
+
prependIcon: { default: "" },
|
|
789
|
+
appendIcon: { default: "" },
|
|
790
|
+
iconColor: { default: "" },
|
|
791
|
+
disabled: { default: !1 },
|
|
792
|
+
loading: { type: Boolean, default: !1 },
|
|
793
|
+
clearable: { type: Boolean, default: !1 }
|
|
794
|
+
},
|
|
795
|
+
emits: [
|
|
796
|
+
"update:modelValue",
|
|
797
|
+
"focus",
|
|
798
|
+
"blur",
|
|
799
|
+
"click:icon",
|
|
800
|
+
"click:clear"
|
|
801
|
+
],
|
|
802
|
+
setup(e, { emit: n }) {
|
|
803
|
+
const t = e, s = B(), o = ne({
|
|
804
|
+
value: ""
|
|
805
|
+
}), l = B(t.type), i = {
|
|
806
|
+
password: "lock_outline",
|
|
807
|
+
email: "mail_outline",
|
|
808
|
+
tel: "phone",
|
|
809
|
+
url: "link",
|
|
810
|
+
number: "123",
|
|
811
|
+
text: ""
|
|
812
|
+
}, a = B(!1), r = $(() => !!o.value), u = $(() => {
|
|
813
|
+
const { disabled: M, loading: L, clearable: V, errorMsg: D } = t;
|
|
814
|
+
return {
|
|
815
|
+
textfield: !0,
|
|
816
|
+
"textfield--error": D == null ? void 0 : D.length,
|
|
817
|
+
"textfield--loading": L,
|
|
818
|
+
"textfield--disabled": M,
|
|
819
|
+
"textfield--clearable": V,
|
|
820
|
+
"textfield--focus": a.value,
|
|
821
|
+
"textfield--filled": r.value
|
|
822
|
+
};
|
|
823
|
+
}), y = $(() => ({
|
|
824
|
+
"textfield__prepend-icon": !0,
|
|
825
|
+
"textfield__prepend-icon--loading": t.loading,
|
|
826
|
+
"textfield__prepend-icon--error": _.value && r.value
|
|
827
|
+
})), f = $(() => ({
|
|
828
|
+
"textfield__append-icon": !0,
|
|
829
|
+
"textfield__append-icon--clear": p.value,
|
|
830
|
+
"textfield__append-icon--error": _.value
|
|
831
|
+
})), g = $(() => o.value.length > 0), _ = $(() => {
|
|
832
|
+
var M;
|
|
833
|
+
return (M = t.errorMsg) == null ? void 0 : M.length;
|
|
834
|
+
}), p = $(() => t.clearable && g.value), h = $(() => {
|
|
835
|
+
const { prependIcon: M, type: L } = t;
|
|
836
|
+
return M || i[L];
|
|
837
|
+
}), c = $(() => {
|
|
838
|
+
const { appendIcon: M, type: L } = t;
|
|
839
|
+
return _.value ? "error_outline" : p.value && ["text", "email"].includes(L) ? "clear" : L === "password" && l.value === "password" ? "visibility" : L === "password" && l.value === "text" ? "visibility_off" : M;
|
|
840
|
+
}), b = () => {
|
|
841
|
+
a.value = !0, n("focus", {
|
|
842
|
+
value: o.value
|
|
843
|
+
});
|
|
844
|
+
}, w = () => {
|
|
845
|
+
a.value = !1, n("blur", {
|
|
846
|
+
value: o.value
|
|
847
|
+
});
|
|
848
|
+
}, T = () => {
|
|
849
|
+
var M;
|
|
850
|
+
if (p.value) {
|
|
851
|
+
o.value = "", (M = s.value) == null || M.focus(), n("click:clear", {
|
|
852
|
+
value: o.value
|
|
853
|
+
});
|
|
854
|
+
return;
|
|
855
|
+
}
|
|
856
|
+
n("click:icon", {
|
|
857
|
+
value: o.value
|
|
858
|
+
}), I();
|
|
859
|
+
}, I = () => {
|
|
860
|
+
l.value = l.value === "password" ? "text" : "password";
|
|
861
|
+
}, N = (M) => {
|
|
862
|
+
const L = M.target;
|
|
863
|
+
o.value = L.value;
|
|
864
|
+
};
|
|
865
|
+
return F(
|
|
866
|
+
() => t.modelValue,
|
|
867
|
+
(M) => {
|
|
868
|
+
o.value = M;
|
|
869
|
+
},
|
|
870
|
+
{
|
|
871
|
+
immediate: !0
|
|
872
|
+
}
|
|
873
|
+
), F(
|
|
874
|
+
() => o.value,
|
|
875
|
+
(M) => {
|
|
876
|
+
n("update:modelValue", M);
|
|
877
|
+
}
|
|
878
|
+
), (M, L) => (d(), m("fieldset", null, [
|
|
879
|
+
v("div", Pt, [
|
|
880
|
+
be(Oe, {
|
|
881
|
+
id: t.id,
|
|
882
|
+
class: k({
|
|
883
|
+
textfield__label: !0
|
|
884
|
+
}),
|
|
885
|
+
for: t.id,
|
|
886
|
+
text: t.label
|
|
887
|
+
}, null, 8, ["id", "for", "text"]),
|
|
888
|
+
v("div", Ht, [
|
|
889
|
+
v("div", {
|
|
890
|
+
class: k(x(u))
|
|
891
|
+
}, [
|
|
892
|
+
x(h) ? (d(), A(E, {
|
|
893
|
+
key: 0,
|
|
894
|
+
class: k(x(y)),
|
|
895
|
+
name: x(h),
|
|
896
|
+
size: 16
|
|
897
|
+
}, null, 8, ["class", "name"])) : C("", !0),
|
|
898
|
+
v("input", {
|
|
899
|
+
id: t.id,
|
|
900
|
+
ref_key: "inputRef",
|
|
901
|
+
ref: s,
|
|
902
|
+
disabled: t.disabled,
|
|
903
|
+
placeholder: t.placeholder,
|
|
904
|
+
type: l.value,
|
|
905
|
+
value: o.value,
|
|
906
|
+
onBlur: w,
|
|
907
|
+
onFocus: b,
|
|
908
|
+
onInput: N
|
|
909
|
+
}, null, 40, Yt),
|
|
910
|
+
x(c) ? (d(), A(E, {
|
|
911
|
+
key: 1,
|
|
912
|
+
class: k(x(f)),
|
|
913
|
+
color: t.iconColor,
|
|
914
|
+
name: `${x(c)}`,
|
|
915
|
+
size: 16,
|
|
916
|
+
onClick: T
|
|
917
|
+
}, null, 8, ["class", "color", "name"])) : C("", !0)
|
|
918
|
+
], 2),
|
|
919
|
+
v("div", Ft, z(t.errorMsg), 1),
|
|
920
|
+
t.errorMsg ? C("", !0) : (d(), m("div", Wt, z(t.hint), 1))
|
|
921
|
+
])
|
|
922
|
+
])
|
|
923
|
+
]));
|
|
924
|
+
}
|
|
925
|
+
});
|
|
926
|
+
function oe(e) {
|
|
927
|
+
return e.split("-")[0];
|
|
928
|
+
}
|
|
929
|
+
function pe(e) {
|
|
930
|
+
return e.split("-")[1];
|
|
931
|
+
}
|
|
932
|
+
function se(e) {
|
|
933
|
+
return ["top", "bottom"].includes(oe(e)) ? "x" : "y";
|
|
934
|
+
}
|
|
935
|
+
function ve(e) {
|
|
936
|
+
return e === "y" ? "height" : "width";
|
|
937
|
+
}
|
|
938
|
+
function $e(e, n, t) {
|
|
939
|
+
let {
|
|
940
|
+
reference: s,
|
|
941
|
+
floating: o
|
|
942
|
+
} = e;
|
|
943
|
+
const l = s.x + s.width / 2 - o.width / 2, i = s.y + s.height / 2 - o.height / 2, a = se(n), r = ve(a), u = s[r] / 2 - o[r] / 2, y = oe(n), f = a === "x";
|
|
944
|
+
let g;
|
|
945
|
+
switch (y) {
|
|
946
|
+
case "top":
|
|
947
|
+
g = {
|
|
948
|
+
x: l,
|
|
949
|
+
y: s.y - o.height
|
|
950
|
+
};
|
|
951
|
+
break;
|
|
952
|
+
case "bottom":
|
|
953
|
+
g = {
|
|
954
|
+
x: l,
|
|
955
|
+
y: s.y + s.height
|
|
956
|
+
};
|
|
957
|
+
break;
|
|
958
|
+
case "right":
|
|
959
|
+
g = {
|
|
960
|
+
x: s.x + s.width,
|
|
961
|
+
y: i
|
|
962
|
+
};
|
|
963
|
+
break;
|
|
964
|
+
case "left":
|
|
965
|
+
g = {
|
|
966
|
+
x: s.x - o.width,
|
|
967
|
+
y: i
|
|
968
|
+
};
|
|
969
|
+
break;
|
|
970
|
+
default:
|
|
971
|
+
g = {
|
|
972
|
+
x: s.x,
|
|
973
|
+
y: s.y
|
|
974
|
+
};
|
|
975
|
+
}
|
|
976
|
+
switch (pe(n)) {
|
|
977
|
+
case "start":
|
|
978
|
+
g[a] -= u * (t && f ? -1 : 1);
|
|
979
|
+
break;
|
|
980
|
+
case "end":
|
|
981
|
+
g[a] += u * (t && f ? -1 : 1);
|
|
982
|
+
break;
|
|
983
|
+
}
|
|
984
|
+
return g;
|
|
985
|
+
}
|
|
986
|
+
const Ut = async (e, n, t) => {
|
|
987
|
+
const {
|
|
988
|
+
placement: s = "bottom",
|
|
989
|
+
strategy: o = "absolute",
|
|
990
|
+
middleware: l = [],
|
|
991
|
+
platform: i
|
|
992
|
+
} = t, a = l.filter(Boolean), r = await (i.isRTL == null ? void 0 : i.isRTL(n));
|
|
993
|
+
if (process.env.NODE_ENV !== "production") {
|
|
994
|
+
if (i == null && console.error(["Floating UI: `platform` property was not passed to config. If you", "want to use Floating UI on the web, install @floating-ui/dom", "instead of the /core package. Otherwise, you can create your own", "`platform`: https://floating-ui.com/docs/platform"].join(" ")), a.filter((h) => {
|
|
995
|
+
let {
|
|
996
|
+
name: c
|
|
997
|
+
} = h;
|
|
998
|
+
return c === "autoPlacement" || c === "flip";
|
|
999
|
+
}).length > 1)
|
|
1000
|
+
throw new Error(["Floating UI: duplicate `flip` and/or `autoPlacement` middleware", "detected. This will lead to an infinite loop. Ensure only one of", "either has been passed to the `middleware` array."].join(" "));
|
|
1001
|
+
(!e || !n) && console.error(["Floating UI: The reference and/or floating element was not defined", "when `computePosition()` was called. Ensure that both elements have", "been created and can be measured."].join(" "));
|
|
1002
|
+
}
|
|
1003
|
+
let u = await i.getElementRects({
|
|
1004
|
+
reference: e,
|
|
1005
|
+
floating: n,
|
|
1006
|
+
strategy: o
|
|
1007
|
+
}), {
|
|
1008
|
+
x: y,
|
|
1009
|
+
y: f
|
|
1010
|
+
} = $e(u, s, r), g = s, _ = {}, p = 0;
|
|
1011
|
+
for (let h = 0; h < a.length; h++) {
|
|
1012
|
+
const {
|
|
1013
|
+
name: c,
|
|
1014
|
+
fn: b
|
|
1015
|
+
} = a[h], {
|
|
1016
|
+
x: w,
|
|
1017
|
+
y: T,
|
|
1018
|
+
data: I,
|
|
1019
|
+
reset: N
|
|
1020
|
+
} = await b({
|
|
1021
|
+
x: y,
|
|
1022
|
+
y: f,
|
|
1023
|
+
initialPlacement: s,
|
|
1024
|
+
placement: g,
|
|
1025
|
+
strategy: o,
|
|
1026
|
+
middlewareData: _,
|
|
1027
|
+
rects: u,
|
|
1028
|
+
platform: i,
|
|
1029
|
+
elements: {
|
|
1030
|
+
reference: e,
|
|
1031
|
+
floating: n
|
|
1032
|
+
}
|
|
1033
|
+
});
|
|
1034
|
+
if (y = w != null ? w : y, f = T != null ? T : f, _ = {
|
|
1035
|
+
..._,
|
|
1036
|
+
[c]: {
|
|
1037
|
+
..._[c],
|
|
1038
|
+
...I
|
|
1039
|
+
}
|
|
1040
|
+
}, process.env.NODE_ENV !== "production" && p > 50 && console.warn(["Floating UI: The middleware lifecycle appears to be running in an", "infinite loop. This is usually caused by a `reset` continually", "being returned without a break condition."].join(" ")), N && p <= 50) {
|
|
1041
|
+
p++, typeof N == "object" && (N.placement && (g = N.placement), N.rects && (u = N.rects === !0 ? await i.getElementRects({
|
|
1042
|
+
reference: e,
|
|
1043
|
+
floating: n,
|
|
1044
|
+
strategy: o
|
|
1045
|
+
}) : N.rects), {
|
|
1046
|
+
x: y,
|
|
1047
|
+
y: f
|
|
1048
|
+
} = $e(u, g, r)), h = -1;
|
|
1049
|
+
continue;
|
|
1050
|
+
}
|
|
1051
|
+
}
|
|
1052
|
+
return {
|
|
1053
|
+
x: y,
|
|
1054
|
+
y: f,
|
|
1055
|
+
placement: g,
|
|
1056
|
+
strategy: o,
|
|
1057
|
+
middlewareData: _
|
|
1058
|
+
};
|
|
1059
|
+
};
|
|
1060
|
+
function Xt(e) {
|
|
1061
|
+
return {
|
|
1062
|
+
top: 0,
|
|
1063
|
+
right: 0,
|
|
1064
|
+
bottom: 0,
|
|
1065
|
+
left: 0,
|
|
1066
|
+
...e
|
|
1067
|
+
};
|
|
1068
|
+
}
|
|
1069
|
+
function Ee(e) {
|
|
1070
|
+
return typeof e != "number" ? Xt(e) : {
|
|
1071
|
+
top: e,
|
|
1072
|
+
right: e,
|
|
1073
|
+
bottom: e,
|
|
1074
|
+
left: e
|
|
1075
|
+
};
|
|
1076
|
+
}
|
|
1077
|
+
function ce(e) {
|
|
1078
|
+
return {
|
|
1079
|
+
...e,
|
|
1080
|
+
top: e.y,
|
|
1081
|
+
left: e.x,
|
|
1082
|
+
right: e.x + e.width,
|
|
1083
|
+
bottom: e.y + e.height
|
|
1084
|
+
};
|
|
1085
|
+
}
|
|
1086
|
+
async function de(e, n) {
|
|
1087
|
+
var t;
|
|
1088
|
+
n === void 0 && (n = {});
|
|
1089
|
+
const {
|
|
1090
|
+
x: s,
|
|
1091
|
+
y: o,
|
|
1092
|
+
platform: l,
|
|
1093
|
+
rects: i,
|
|
1094
|
+
elements: a,
|
|
1095
|
+
strategy: r
|
|
1096
|
+
} = e, {
|
|
1097
|
+
boundary: u = "clippingAncestors",
|
|
1098
|
+
rootBoundary: y = "viewport",
|
|
1099
|
+
elementContext: f = "floating",
|
|
1100
|
+
altBoundary: g = !1,
|
|
1101
|
+
padding: _ = 0
|
|
1102
|
+
} = n, p = Ee(_), c = a[g ? f === "floating" ? "reference" : "floating" : f], b = ce(await l.getClippingRect({
|
|
1103
|
+
element: (t = await (l.isElement == null ? void 0 : l.isElement(c))) == null || t ? c : c.contextElement || await (l.getDocumentElement == null ? void 0 : l.getDocumentElement(a.floating)),
|
|
1104
|
+
boundary: u,
|
|
1105
|
+
rootBoundary: y,
|
|
1106
|
+
strategy: r
|
|
1107
|
+
})), w = ce(l.convertOffsetParentRelativeRectToViewportRelativeRect ? await l.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
1108
|
+
rect: f === "floating" ? {
|
|
1109
|
+
...i.floating,
|
|
1110
|
+
x: s,
|
|
1111
|
+
y: o
|
|
1112
|
+
} : i.reference,
|
|
1113
|
+
offsetParent: await (l.getOffsetParent == null ? void 0 : l.getOffsetParent(a.floating)),
|
|
1114
|
+
strategy: r
|
|
1115
|
+
}) : i[f]);
|
|
1116
|
+
return {
|
|
1117
|
+
top: b.top - w.top + p.top,
|
|
1118
|
+
bottom: w.bottom - b.bottom + p.bottom,
|
|
1119
|
+
left: b.left - w.left + p.left,
|
|
1120
|
+
right: w.right - b.right + p.right
|
|
1121
|
+
};
|
|
1122
|
+
}
|
|
1123
|
+
const Zt = Math.min, Qt = Math.max;
|
|
1124
|
+
function _e(e, n, t) {
|
|
1125
|
+
return Qt(e, Zt(n, t));
|
|
1126
|
+
}
|
|
1127
|
+
const Kt = (e) => ({
|
|
1128
|
+
name: "arrow",
|
|
1129
|
+
options: e,
|
|
1130
|
+
async fn(n) {
|
|
1131
|
+
const {
|
|
1132
|
+
element: t,
|
|
1133
|
+
padding: s = 0
|
|
1134
|
+
} = e != null ? e : {}, {
|
|
1135
|
+
x: o,
|
|
1136
|
+
y: l,
|
|
1137
|
+
placement: i,
|
|
1138
|
+
rects: a,
|
|
1139
|
+
platform: r
|
|
1140
|
+
} = n;
|
|
1141
|
+
if (t == null)
|
|
1142
|
+
return process.env.NODE_ENV !== "production" && console.warn("Floating UI: No `element` was passed to the `arrow` middleware."), {};
|
|
1143
|
+
const u = Ee(s), y = {
|
|
1144
|
+
x: o,
|
|
1145
|
+
y: l
|
|
1146
|
+
}, f = se(i), g = pe(i), _ = ve(f), p = await r.getDimensions(t), h = f === "y" ? "top" : "left", c = f === "y" ? "bottom" : "right", b = a.reference[_] + a.reference[f] - y[f] - a.floating[_], w = y[f] - a.reference[f], T = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(t));
|
|
1147
|
+
let I = T ? f === "y" ? T.clientHeight || 0 : T.clientWidth || 0 : 0;
|
|
1148
|
+
I === 0 && (I = a.floating[_]);
|
|
1149
|
+
const N = b / 2 - w / 2, M = u[h], L = I - p[_] - u[c], V = I / 2 - p[_] / 2 + N, D = _e(M, V, L), le = (g === "start" ? u[h] : u[c]) > 0 && V !== D && a.reference[_] <= a.floating[_] ? V < M ? M - V : L - V : 0;
|
|
1150
|
+
return {
|
|
1151
|
+
[f]: y[f] - le,
|
|
1152
|
+
data: {
|
|
1153
|
+
[f]: D,
|
|
1154
|
+
centerOffset: V - D
|
|
1155
|
+
}
|
|
1156
|
+
};
|
|
1157
|
+
}
|
|
1158
|
+
}), Gt = {
|
|
1159
|
+
left: "right",
|
|
1160
|
+
right: "left",
|
|
1161
|
+
bottom: "top",
|
|
1162
|
+
top: "bottom"
|
|
1163
|
+
};
|
|
1164
|
+
function ue(e) {
|
|
1165
|
+
return e.replace(/left|right|bottom|top/g, (n) => Gt[n]);
|
|
1166
|
+
}
|
|
1167
|
+
function Jt(e, n, t) {
|
|
1168
|
+
t === void 0 && (t = !1);
|
|
1169
|
+
const s = pe(e), o = se(e), l = ve(o);
|
|
1170
|
+
let i = o === "x" ? s === (t ? "end" : "start") ? "right" : "left" : s === "start" ? "bottom" : "top";
|
|
1171
|
+
return n.reference[l] > n.floating[l] && (i = ue(i)), {
|
|
1172
|
+
main: i,
|
|
1173
|
+
cross: ue(i)
|
|
1174
|
+
};
|
|
1175
|
+
}
|
|
1176
|
+
const qt = {
|
|
1177
|
+
start: "end",
|
|
1178
|
+
end: "start"
|
|
1179
|
+
};
|
|
1180
|
+
function Me(e) {
|
|
1181
|
+
return e.replace(/start|end/g, (n) => qt[n]);
|
|
1182
|
+
}
|
|
1183
|
+
const en = ["top", "right", "bottom", "left"];
|
|
1184
|
+
function tn(e) {
|
|
1185
|
+
const n = ue(e);
|
|
1186
|
+
return [Me(e), n, Me(n)];
|
|
1187
|
+
}
|
|
1188
|
+
const nn = function(e) {
|
|
1189
|
+
return e === void 0 && (e = {}), {
|
|
1190
|
+
name: "flip",
|
|
1191
|
+
options: e,
|
|
1192
|
+
async fn(n) {
|
|
1193
|
+
var t;
|
|
1194
|
+
const {
|
|
1195
|
+
placement: s,
|
|
1196
|
+
middlewareData: o,
|
|
1197
|
+
rects: l,
|
|
1198
|
+
initialPlacement: i,
|
|
1199
|
+
platform: a,
|
|
1200
|
+
elements: r
|
|
1201
|
+
} = n, {
|
|
1202
|
+
mainAxis: u = !0,
|
|
1203
|
+
crossAxis: y = !0,
|
|
1204
|
+
fallbackPlacements: f,
|
|
1205
|
+
fallbackStrategy: g = "bestFit",
|
|
1206
|
+
flipAlignment: _ = !0,
|
|
1207
|
+
...p
|
|
1208
|
+
} = e, h = oe(s), b = f || (h === i || !_ ? [ue(i)] : tn(i)), w = [i, ...b], T = await de(n, p), I = [];
|
|
1209
|
+
let N = ((t = o.flip) == null ? void 0 : t.overflows) || [];
|
|
1210
|
+
if (u && I.push(T[h]), y) {
|
|
1211
|
+
const {
|
|
1212
|
+
main: D,
|
|
1213
|
+
cross: G
|
|
1214
|
+
} = Jt(s, l, await (a.isRTL == null ? void 0 : a.isRTL(r.floating)));
|
|
1215
|
+
I.push(T[D], T[G]);
|
|
1216
|
+
}
|
|
1217
|
+
if (N = [...N, {
|
|
1218
|
+
placement: s,
|
|
1219
|
+
overflows: I
|
|
1220
|
+
}], !I.every((D) => D <= 0)) {
|
|
1221
|
+
var M, L;
|
|
1222
|
+
const D = ((M = (L = o.flip) == null ? void 0 : L.index) != null ? M : 0) + 1, G = w[D];
|
|
1223
|
+
if (G)
|
|
1224
|
+
return {
|
|
1225
|
+
data: {
|
|
1226
|
+
index: D,
|
|
1227
|
+
overflows: N
|
|
1228
|
+
},
|
|
1229
|
+
reset: {
|
|
1230
|
+
placement: G
|
|
1231
|
+
}
|
|
1232
|
+
};
|
|
1233
|
+
let J = "bottom";
|
|
1234
|
+
switch (g) {
|
|
1235
|
+
case "bestFit": {
|
|
1236
|
+
var V;
|
|
1237
|
+
const le = (V = N.map((ie) => [ie, ie.overflows.filter((q) => q > 0).reduce((q, Pe) => q + Pe, 0)]).sort((ie, q) => ie[1] - q[1])[0]) == null ? void 0 : V[0].placement;
|
|
1238
|
+
le && (J = le);
|
|
1239
|
+
break;
|
|
1240
|
+
}
|
|
1241
|
+
case "initialPlacement":
|
|
1242
|
+
J = i;
|
|
1243
|
+
break;
|
|
1244
|
+
}
|
|
1245
|
+
if (s !== J)
|
|
1246
|
+
return {
|
|
1247
|
+
reset: {
|
|
1248
|
+
placement: J
|
|
1249
|
+
}
|
|
1250
|
+
};
|
|
1251
|
+
}
|
|
1252
|
+
return {};
|
|
1253
|
+
}
|
|
1254
|
+
};
|
|
1255
|
+
};
|
|
1256
|
+
function Ce(e, n) {
|
|
1257
|
+
return {
|
|
1258
|
+
top: e.top - n.height,
|
|
1259
|
+
right: e.right - n.width,
|
|
1260
|
+
bottom: e.bottom - n.height,
|
|
1261
|
+
left: e.left - n.width
|
|
1262
|
+
};
|
|
1263
|
+
}
|
|
1264
|
+
function Te(e) {
|
|
1265
|
+
return en.some((n) => e[n] >= 0);
|
|
1266
|
+
}
|
|
1267
|
+
const on = function(e) {
|
|
1268
|
+
let {
|
|
1269
|
+
strategy: n = "referenceHidden",
|
|
1270
|
+
...t
|
|
1271
|
+
} = e === void 0 ? {} : e;
|
|
1272
|
+
return {
|
|
1273
|
+
name: "hide",
|
|
1274
|
+
async fn(s) {
|
|
1275
|
+
const {
|
|
1276
|
+
rects: o
|
|
1277
|
+
} = s;
|
|
1278
|
+
switch (n) {
|
|
1279
|
+
case "referenceHidden": {
|
|
1280
|
+
const l = await de(s, {
|
|
1281
|
+
...t,
|
|
1282
|
+
elementContext: "reference"
|
|
1283
|
+
}), i = Ce(l, o.reference);
|
|
1284
|
+
return {
|
|
1285
|
+
data: {
|
|
1286
|
+
referenceHiddenOffsets: i,
|
|
1287
|
+
referenceHidden: Te(i)
|
|
1288
|
+
}
|
|
1289
|
+
};
|
|
1290
|
+
}
|
|
1291
|
+
case "escaped": {
|
|
1292
|
+
const l = await de(s, {
|
|
1293
|
+
...t,
|
|
1294
|
+
altBoundary: !0
|
|
1295
|
+
}), i = Ce(l, o.floating);
|
|
1296
|
+
return {
|
|
1297
|
+
data: {
|
|
1298
|
+
escapedOffsets: i,
|
|
1299
|
+
escaped: Te(i)
|
|
1300
|
+
}
|
|
1301
|
+
};
|
|
1302
|
+
}
|
|
1303
|
+
default:
|
|
1304
|
+
return {};
|
|
1305
|
+
}
|
|
1306
|
+
}
|
|
1307
|
+
};
|
|
1308
|
+
};
|
|
1309
|
+
async function sn(e, n) {
|
|
1310
|
+
const {
|
|
1311
|
+
placement: t,
|
|
1312
|
+
platform: s,
|
|
1313
|
+
elements: o
|
|
1314
|
+
} = e, l = await (s.isRTL == null ? void 0 : s.isRTL(o.floating)), i = oe(t), a = pe(t), r = se(t) === "x", u = ["left", "top"].includes(i) ? -1 : 1, y = l && r ? -1 : 1, f = typeof n == "function" ? n(e) : n;
|
|
1315
|
+
let {
|
|
1316
|
+
mainAxis: g,
|
|
1317
|
+
crossAxis: _,
|
|
1318
|
+
alignmentAxis: p
|
|
1319
|
+
} = typeof f == "number" ? {
|
|
1320
|
+
mainAxis: f,
|
|
1321
|
+
crossAxis: 0,
|
|
1322
|
+
alignmentAxis: null
|
|
1323
|
+
} : {
|
|
1324
|
+
mainAxis: 0,
|
|
1325
|
+
crossAxis: 0,
|
|
1326
|
+
alignmentAxis: null,
|
|
1327
|
+
...f
|
|
1328
|
+
};
|
|
1329
|
+
return a && typeof p == "number" && (_ = a === "end" ? p * -1 : p), r ? {
|
|
1330
|
+
x: _ * y,
|
|
1331
|
+
y: g * u
|
|
1332
|
+
} : {
|
|
1333
|
+
x: g * u,
|
|
1334
|
+
y: _ * y
|
|
1335
|
+
};
|
|
1336
|
+
}
|
|
1337
|
+
const ln = function(e) {
|
|
1338
|
+
return e === void 0 && (e = 0), {
|
|
1339
|
+
name: "offset",
|
|
1340
|
+
options: e,
|
|
1341
|
+
async fn(n) {
|
|
1342
|
+
const {
|
|
1343
|
+
x: t,
|
|
1344
|
+
y: s
|
|
1345
|
+
} = n, o = await sn(n, e);
|
|
1346
|
+
return {
|
|
1347
|
+
x: t + o.x,
|
|
1348
|
+
y: s + o.y,
|
|
1349
|
+
data: o
|
|
1350
|
+
};
|
|
1351
|
+
}
|
|
1352
|
+
};
|
|
1353
|
+
};
|
|
1354
|
+
function an(e) {
|
|
1355
|
+
return e === "x" ? "y" : "x";
|
|
1356
|
+
}
|
|
1357
|
+
const rn = function(e) {
|
|
1358
|
+
return e === void 0 && (e = {}), {
|
|
1359
|
+
name: "shift",
|
|
1360
|
+
options: e,
|
|
1361
|
+
async fn(n) {
|
|
1362
|
+
const {
|
|
1363
|
+
x: t,
|
|
1364
|
+
y: s,
|
|
1365
|
+
placement: o
|
|
1366
|
+
} = n, {
|
|
1367
|
+
mainAxis: l = !0,
|
|
1368
|
+
crossAxis: i = !1,
|
|
1369
|
+
limiter: a = {
|
|
1370
|
+
fn: (c) => {
|
|
1371
|
+
let {
|
|
1372
|
+
x: b,
|
|
1373
|
+
y: w
|
|
1374
|
+
} = c;
|
|
1375
|
+
return {
|
|
1376
|
+
x: b,
|
|
1377
|
+
y: w
|
|
1378
|
+
};
|
|
1379
|
+
}
|
|
1380
|
+
},
|
|
1381
|
+
...r
|
|
1382
|
+
} = e, u = {
|
|
1383
|
+
x: t,
|
|
1384
|
+
y: s
|
|
1385
|
+
}, y = await de(n, r), f = se(oe(o)), g = an(f);
|
|
1386
|
+
let _ = u[f], p = u[g];
|
|
1387
|
+
if (l) {
|
|
1388
|
+
const c = f === "y" ? "top" : "left", b = f === "y" ? "bottom" : "right", w = _ + y[c], T = _ - y[b];
|
|
1389
|
+
_ = _e(w, _, T);
|
|
1390
|
+
}
|
|
1391
|
+
if (i) {
|
|
1392
|
+
const c = g === "y" ? "top" : "left", b = g === "y" ? "bottom" : "right", w = p + y[c], T = p - y[b];
|
|
1393
|
+
p = _e(w, p, T);
|
|
1394
|
+
}
|
|
1395
|
+
const h = a.fn({
|
|
1396
|
+
...n,
|
|
1397
|
+
[f]: _,
|
|
1398
|
+
[g]: p
|
|
1399
|
+
});
|
|
1400
|
+
return {
|
|
1401
|
+
...h,
|
|
1402
|
+
data: {
|
|
1403
|
+
x: h.x - t,
|
|
1404
|
+
y: h.y - s
|
|
1405
|
+
}
|
|
1406
|
+
};
|
|
1407
|
+
}
|
|
1408
|
+
};
|
|
1409
|
+
};
|
|
1410
|
+
function De(e) {
|
|
1411
|
+
return e && e.document && e.location && e.alert && e.setInterval;
|
|
1412
|
+
}
|
|
1413
|
+
function P(e) {
|
|
1414
|
+
if (e == null)
|
|
1415
|
+
return window;
|
|
1416
|
+
if (!De(e)) {
|
|
1417
|
+
const n = e.ownerDocument;
|
|
1418
|
+
return n && n.defaultView || window;
|
|
1419
|
+
}
|
|
1420
|
+
return e;
|
|
1421
|
+
}
|
|
1422
|
+
function R(e) {
|
|
1423
|
+
return P(e).getComputedStyle(e);
|
|
1424
|
+
}
|
|
1425
|
+
function W(e) {
|
|
1426
|
+
return De(e) ? "" : e ? (e.nodeName || "").toLowerCase() : "";
|
|
1427
|
+
}
|
|
1428
|
+
function Be() {
|
|
1429
|
+
const e = navigator.userAgentData;
|
|
1430
|
+
return e && Array.isArray(e.brands) ? e.brands.map((n) => n.brand + "/" + n.version).join(" ") : navigator.userAgent;
|
|
1431
|
+
}
|
|
1432
|
+
function S(e) {
|
|
1433
|
+
return e instanceof P(e).HTMLElement;
|
|
1434
|
+
}
|
|
1435
|
+
function K(e) {
|
|
1436
|
+
return e instanceof P(e).Element;
|
|
1437
|
+
}
|
|
1438
|
+
function cn(e) {
|
|
1439
|
+
return e instanceof P(e).Node;
|
|
1440
|
+
}
|
|
1441
|
+
function ze(e) {
|
|
1442
|
+
if (typeof ShadowRoot > "u")
|
|
1443
|
+
return !1;
|
|
1444
|
+
const n = P(e).ShadowRoot;
|
|
1445
|
+
return e instanceof n || e instanceof ShadowRoot;
|
|
1446
|
+
}
|
|
1447
|
+
function he(e) {
|
|
1448
|
+
const {
|
|
1449
|
+
overflow: n,
|
|
1450
|
+
overflowX: t,
|
|
1451
|
+
overflowY: s,
|
|
1452
|
+
display: o
|
|
1453
|
+
} = R(e);
|
|
1454
|
+
return /auto|scroll|overlay|hidden/.test(n + s + t) && !["inline", "contents"].includes(o);
|
|
1455
|
+
}
|
|
1456
|
+
function dn(e) {
|
|
1457
|
+
return ["table", "td", "th"].includes(W(e));
|
|
1458
|
+
}
|
|
1459
|
+
function ye(e) {
|
|
1460
|
+
const n = /firefox/i.test(Be()), t = R(e), s = t.backdropFilter || t.WebkitBackdropFilter;
|
|
1461
|
+
return t.transform !== "none" || t.perspective !== "none" || (s ? s !== "none" : !1) || n && t.willChange === "filter" || n && (t.filter ? t.filter !== "none" : !1) || ["transform", "perspective"].some((o) => t.willChange.includes(o)) || ["paint", "layout", "strict", "content"].some(
|
|
1462
|
+
(o) => {
|
|
1463
|
+
const l = t.contain;
|
|
1464
|
+
return l != null ? l.includes(o) : !1;
|
|
1465
|
+
}
|
|
1466
|
+
);
|
|
1467
|
+
}
|
|
1468
|
+
function je() {
|
|
1469
|
+
return !/^((?!chrome|android).)*safari/i.test(Be());
|
|
1470
|
+
}
|
|
1471
|
+
function xe(e) {
|
|
1472
|
+
return ["html", "body", "#document"].includes(W(e));
|
|
1473
|
+
}
|
|
1474
|
+
const Ae = Math.min, ee = Math.max, fe = Math.round;
|
|
1475
|
+
function X(e, n, t) {
|
|
1476
|
+
var s, o, l, i;
|
|
1477
|
+
n === void 0 && (n = !1), t === void 0 && (t = !1);
|
|
1478
|
+
const a = e.getBoundingClientRect();
|
|
1479
|
+
let r = 1, u = 1;
|
|
1480
|
+
n && S(e) && (r = e.offsetWidth > 0 && fe(a.width) / e.offsetWidth || 1, u = e.offsetHeight > 0 && fe(a.height) / e.offsetHeight || 1);
|
|
1481
|
+
const y = K(e) ? P(e) : window, f = !je() && t, g = (a.left + (f && (s = (o = y.visualViewport) == null ? void 0 : o.offsetLeft) != null ? s : 0)) / r, _ = (a.top + (f && (l = (i = y.visualViewport) == null ? void 0 : i.offsetTop) != null ? l : 0)) / u, p = a.width / r, h = a.height / u;
|
|
1482
|
+
return {
|
|
1483
|
+
width: p,
|
|
1484
|
+
height: h,
|
|
1485
|
+
top: _,
|
|
1486
|
+
right: g + p,
|
|
1487
|
+
bottom: _ + h,
|
|
1488
|
+
left: g,
|
|
1489
|
+
x: g,
|
|
1490
|
+
y: _
|
|
1491
|
+
};
|
|
1492
|
+
}
|
|
1493
|
+
function U(e) {
|
|
1494
|
+
return ((cn(e) ? e.ownerDocument : e.document) || window.document).documentElement;
|
|
1495
|
+
}
|
|
1496
|
+
function me(e) {
|
|
1497
|
+
return K(e) ? {
|
|
1498
|
+
scrollLeft: e.scrollLeft,
|
|
1499
|
+
scrollTop: e.scrollTop
|
|
1500
|
+
} : {
|
|
1501
|
+
scrollLeft: e.pageXOffset,
|
|
1502
|
+
scrollTop: e.pageYOffset
|
|
1503
|
+
};
|
|
1504
|
+
}
|
|
1505
|
+
function Ve(e) {
|
|
1506
|
+
return X(U(e)).left + me(e).scrollLeft;
|
|
1507
|
+
}
|
|
1508
|
+
function un(e) {
|
|
1509
|
+
const n = X(e);
|
|
1510
|
+
return fe(n.width) !== e.offsetWidth || fe(n.height) !== e.offsetHeight;
|
|
1511
|
+
}
|
|
1512
|
+
function fn(e, n, t) {
|
|
1513
|
+
const s = S(n), o = U(n), l = X(
|
|
1514
|
+
e,
|
|
1515
|
+
s && un(n),
|
|
1516
|
+
t === "fixed"
|
|
1517
|
+
);
|
|
1518
|
+
let i = {
|
|
1519
|
+
scrollLeft: 0,
|
|
1520
|
+
scrollTop: 0
|
|
1521
|
+
};
|
|
1522
|
+
const a = {
|
|
1523
|
+
x: 0,
|
|
1524
|
+
y: 0
|
|
1525
|
+
};
|
|
1526
|
+
if (s || !s && t !== "fixed")
|
|
1527
|
+
if ((W(n) !== "body" || he(o)) && (i = me(n)), S(n)) {
|
|
1528
|
+
const r = X(n, !0);
|
|
1529
|
+
a.x = r.x + n.clientLeft, a.y = r.y + n.clientTop;
|
|
1530
|
+
} else
|
|
1531
|
+
o && (a.x = Ve(o));
|
|
1532
|
+
return {
|
|
1533
|
+
x: l.left + i.scrollLeft - a.x,
|
|
1534
|
+
y: l.top + i.scrollTop - a.y,
|
|
1535
|
+
width: l.width,
|
|
1536
|
+
height: l.height
|
|
1537
|
+
};
|
|
1538
|
+
}
|
|
1539
|
+
function te(e) {
|
|
1540
|
+
if (W(e) === "html")
|
|
1541
|
+
return e;
|
|
1542
|
+
const n = e.assignedSlot || e.parentNode || (ze(e) ? e.host : null) || U(e);
|
|
1543
|
+
return ze(n) ? n.host : n;
|
|
1544
|
+
}
|
|
1545
|
+
function Ie(e) {
|
|
1546
|
+
return !S(e) || R(e).position === "fixed" ? null : e.offsetParent;
|
|
1547
|
+
}
|
|
1548
|
+
function pn(e) {
|
|
1549
|
+
let n = te(e);
|
|
1550
|
+
for (; S(n) && !xe(n); ) {
|
|
1551
|
+
if (ye(n))
|
|
1552
|
+
return n;
|
|
1553
|
+
n = te(n);
|
|
1554
|
+
}
|
|
1555
|
+
return null;
|
|
1556
|
+
}
|
|
1557
|
+
function Ne(e) {
|
|
1558
|
+
const n = P(e);
|
|
1559
|
+
let t = Ie(e);
|
|
1560
|
+
for (; t && dn(t) && R(t).position === "static"; )
|
|
1561
|
+
t = Ie(t);
|
|
1562
|
+
return t && (W(t) === "html" || W(t) === "body" && R(t).position === "static" && !ye(t)) ? n : t || pn(e) || n;
|
|
1563
|
+
}
|
|
1564
|
+
function hn(e) {
|
|
1565
|
+
if (S(e))
|
|
1566
|
+
return {
|
|
1567
|
+
width: e.offsetWidth,
|
|
1568
|
+
height: e.offsetHeight
|
|
1569
|
+
};
|
|
1570
|
+
const n = X(e);
|
|
1571
|
+
return {
|
|
1572
|
+
width: n.width,
|
|
1573
|
+
height: n.height
|
|
1574
|
+
};
|
|
1575
|
+
}
|
|
1576
|
+
function mn(e) {
|
|
1577
|
+
let {
|
|
1578
|
+
rect: n,
|
|
1579
|
+
offsetParent: t,
|
|
1580
|
+
strategy: s
|
|
1581
|
+
} = e;
|
|
1582
|
+
const o = S(t), l = U(t);
|
|
1583
|
+
if (t === l)
|
|
1584
|
+
return n;
|
|
1585
|
+
let i = {
|
|
1586
|
+
scrollLeft: 0,
|
|
1587
|
+
scrollTop: 0
|
|
1588
|
+
};
|
|
1589
|
+
const a = {
|
|
1590
|
+
x: 0,
|
|
1591
|
+
y: 0
|
|
1592
|
+
};
|
|
1593
|
+
if ((o || !o && s !== "fixed") && ((W(t) !== "body" || he(l)) && (i = me(t)), S(t))) {
|
|
1594
|
+
const r = X(t, !0);
|
|
1595
|
+
a.x = r.x + t.clientLeft, a.y = r.y + t.clientTop;
|
|
1596
|
+
}
|
|
1597
|
+
return {
|
|
1598
|
+
...n,
|
|
1599
|
+
x: n.x - i.scrollLeft + a.x,
|
|
1600
|
+
y: n.y - i.scrollTop + a.y
|
|
1601
|
+
};
|
|
1602
|
+
}
|
|
1603
|
+
function gn(e, n) {
|
|
1604
|
+
const t = P(e), s = U(e), o = t.visualViewport;
|
|
1605
|
+
let l = s.clientWidth, i = s.clientHeight, a = 0, r = 0;
|
|
1606
|
+
if (o) {
|
|
1607
|
+
l = o.width, i = o.height;
|
|
1608
|
+
const u = je();
|
|
1609
|
+
(u || !u && n === "fixed") && (a = o.offsetLeft, r = o.offsetTop);
|
|
1610
|
+
}
|
|
1611
|
+
return {
|
|
1612
|
+
width: l,
|
|
1613
|
+
height: i,
|
|
1614
|
+
x: a,
|
|
1615
|
+
y: r
|
|
1616
|
+
};
|
|
1617
|
+
}
|
|
1618
|
+
function _n(e) {
|
|
1619
|
+
var n;
|
|
1620
|
+
const t = U(e), s = me(e), o = (n = e.ownerDocument) == null ? void 0 : n.body, l = ee(t.scrollWidth, t.clientWidth, o ? o.scrollWidth : 0, o ? o.clientWidth : 0), i = ee(t.scrollHeight, t.clientHeight, o ? o.scrollHeight : 0, o ? o.clientHeight : 0);
|
|
1621
|
+
let a = -s.scrollLeft + Ve(e);
|
|
1622
|
+
const r = -s.scrollTop;
|
|
1623
|
+
return R(o || t).direction === "rtl" && (a += ee(t.clientWidth, o ? o.clientWidth : 0) - l), {
|
|
1624
|
+
width: l,
|
|
1625
|
+
height: i,
|
|
1626
|
+
x: a,
|
|
1627
|
+
y: r
|
|
1628
|
+
};
|
|
1629
|
+
}
|
|
1630
|
+
function Re(e) {
|
|
1631
|
+
const n = te(e);
|
|
1632
|
+
return xe(n) ? e.ownerDocument.body : S(n) && he(n) ? n : Re(n);
|
|
1633
|
+
}
|
|
1634
|
+
function Se(e, n) {
|
|
1635
|
+
var t;
|
|
1636
|
+
n === void 0 && (n = []);
|
|
1637
|
+
const s = Re(e), o = s === ((t = e.ownerDocument) == null ? void 0 : t.body), l = P(s), i = o ? [l].concat(l.visualViewport || [], he(s) ? s : []) : s, a = n.concat(i);
|
|
1638
|
+
return o ? a : a.concat(Se(i));
|
|
1639
|
+
}
|
|
1640
|
+
function bn(e, n) {
|
|
1641
|
+
const t = X(e, !1, n === "fixed"), s = t.top + e.clientTop, o = t.left + e.clientLeft;
|
|
1642
|
+
return {
|
|
1643
|
+
top: s,
|
|
1644
|
+
left: o,
|
|
1645
|
+
x: o,
|
|
1646
|
+
y: s,
|
|
1647
|
+
right: o + e.clientWidth,
|
|
1648
|
+
bottom: s + e.clientHeight,
|
|
1649
|
+
width: e.clientWidth,
|
|
1650
|
+
height: e.clientHeight
|
|
1651
|
+
};
|
|
1652
|
+
}
|
|
1653
|
+
function Le(e, n, t) {
|
|
1654
|
+
return n === "viewport" ? ce(gn(e, t)) : K(n) ? bn(n, t) : ce(_n(U(e)));
|
|
1655
|
+
}
|
|
1656
|
+
function vn(e) {
|
|
1657
|
+
let n = Se(e).filter((l) => K(l) && W(l) !== "body"), t = null;
|
|
1658
|
+
const s = R(e).position === "fixed";
|
|
1659
|
+
let o = s ? te(e) : e;
|
|
1660
|
+
for (; K(o) && !xe(o); ) {
|
|
1661
|
+
const l = R(o), i = ye(o);
|
|
1662
|
+
(s ? !i && !t : !i && l.position === "static" && !!t && ["absolute", "fixed"].includes(t.position)) ? n = n.filter((r) => r !== o) : t = l, o = te(o);
|
|
1663
|
+
}
|
|
1664
|
+
return n;
|
|
1665
|
+
}
|
|
1666
|
+
function yn(e) {
|
|
1667
|
+
let {
|
|
1668
|
+
element: n,
|
|
1669
|
+
boundary: t,
|
|
1670
|
+
rootBoundary: s,
|
|
1671
|
+
strategy: o
|
|
1672
|
+
} = e;
|
|
1673
|
+
const i = [...t === "clippingAncestors" ? vn(n) : [].concat(t), s], a = i[0], r = i.reduce((u, y) => {
|
|
1674
|
+
const f = Le(n, y, o);
|
|
1675
|
+
return u.top = ee(f.top, u.top), u.right = Ae(f.right, u.right), u.bottom = Ae(f.bottom, u.bottom), u.left = ee(f.left, u.left), u;
|
|
1676
|
+
}, Le(n, a, o));
|
|
1677
|
+
return {
|
|
1678
|
+
width: r.right - r.left,
|
|
1679
|
+
height: r.bottom - r.top,
|
|
1680
|
+
x: r.left,
|
|
1681
|
+
y: r.top
|
|
1682
|
+
};
|
|
1683
|
+
}
|
|
1684
|
+
const xn = {
|
|
1685
|
+
getClippingRect: yn,
|
|
1686
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: mn,
|
|
1687
|
+
isElement: K,
|
|
1688
|
+
getDimensions: hn,
|
|
1689
|
+
getOffsetParent: Ne,
|
|
1690
|
+
getDocumentElement: U,
|
|
1691
|
+
async getElementRects(e) {
|
|
1692
|
+
let {
|
|
1693
|
+
reference: n,
|
|
1694
|
+
floating: t,
|
|
1695
|
+
strategy: s
|
|
1696
|
+
} = e;
|
|
1697
|
+
const o = this.getOffsetParent || Ne, l = this.getDimensions;
|
|
1698
|
+
return {
|
|
1699
|
+
reference: fn(n, await o(t), s),
|
|
1700
|
+
floating: {
|
|
1701
|
+
x: 0,
|
|
1702
|
+
y: 0,
|
|
1703
|
+
...await l(t)
|
|
1704
|
+
}
|
|
1705
|
+
};
|
|
1706
|
+
},
|
|
1707
|
+
getClientRects: (e) => Array.from(e.getClientRects()),
|
|
1708
|
+
isRTL: (e) => R(e).direction === "rtl"
|
|
1709
|
+
}, wn = (e, n, t) => Ut(e, n, {
|
|
1710
|
+
platform: xn,
|
|
1711
|
+
...t
|
|
1712
|
+
});
|
|
1713
|
+
function ge({ value: e }, { value: n }, { value: t }, s, o, l) {
|
|
1714
|
+
!e || !n || wn(e, n, {
|
|
1715
|
+
placement: s,
|
|
1716
|
+
middleware: [
|
|
1717
|
+
ln(o),
|
|
1718
|
+
rn({ padding: l }),
|
|
1719
|
+
Kt({ element: t }),
|
|
1720
|
+
nn(),
|
|
1721
|
+
on()
|
|
1722
|
+
]
|
|
1723
|
+
}).then(({ x: i, y: a, placement: r, middlewareData: u }) => {
|
|
1724
|
+
if (Object.assign(n.style, {
|
|
1725
|
+
left: `${i}px`,
|
|
1726
|
+
top: `${a}px`
|
|
1727
|
+
}), t && u.arrow) {
|
|
1728
|
+
const { x: y, y: f } = u.arrow, g = {
|
|
1729
|
+
top: Z.Bottom,
|
|
1730
|
+
right: Z.Left,
|
|
1731
|
+
bottom: Z.Top,
|
|
1732
|
+
left: Z.Right
|
|
1733
|
+
}[r.split("-")[0]];
|
|
1734
|
+
Object.assign(t.style, {
|
|
1735
|
+
left: i != null ? `${y}px` : "",
|
|
1736
|
+
top: a != null ? `${f}px` : "",
|
|
1737
|
+
right: "",
|
|
1738
|
+
bottom: "",
|
|
1739
|
+
[`${g}`]: "-4px"
|
|
1740
|
+
});
|
|
1741
|
+
}
|
|
1742
|
+
});
|
|
1743
|
+
}
|
|
1744
|
+
var Z = /* @__PURE__ */ ((e) => (e.Top = "top", e.Bottom = "bottom", e.Left = "left", e.Right = "right", e.TopStart = "top-start", e.TopEnd = "top-end", e.RightStart = "right-start", e.RightEnd = "right-end", e.BottomStart = "bottom-start", e.BottomEnd = "bottom-end", e.LeftStart = "left-start", e.LeftEnd = "left-end", e))(Z || {}), H = /* @__PURE__ */ ((e) => (e.Click = "click", e.Hover = "hover", e.Manual = "manual", e))(H || {});
|
|
1745
|
+
const kn = ["aria-disabled", "onClick", "onMouseenter", "onMouseleave", "onMousemove"], $n = ["innerHTML"], Mn = /* @__PURE__ */ O({
|
|
1746
|
+
__name: "Tooltip",
|
|
1747
|
+
props: {
|
|
1748
|
+
placement: { default: Z.Top },
|
|
1749
|
+
text: { default: "" },
|
|
1750
|
+
dark: { type: Boolean, default: !0 },
|
|
1751
|
+
light: { type: Boolean, default: !1 },
|
|
1752
|
+
triggers: { default: H.Hover },
|
|
1753
|
+
autoHide: { type: Boolean, default: !0 },
|
|
1754
|
+
hideDelay: { default: 3e3 },
|
|
1755
|
+
showDelay: { default: 0 },
|
|
1756
|
+
shown: { type: Boolean, default: !1 },
|
|
1757
|
+
disabled: { type: Boolean, default: !1 },
|
|
1758
|
+
offset: { default: 0 },
|
|
1759
|
+
padding: { default: 2 },
|
|
1760
|
+
outsideClick: { type: Boolean, default: !1 },
|
|
1761
|
+
triggerContent: { default: "" },
|
|
1762
|
+
resizable: { type: Boolean, default: !0 }
|
|
1763
|
+
},
|
|
1764
|
+
emits: ["show", "hide"],
|
|
1765
|
+
setup(e, { emit: n }) {
|
|
1766
|
+
const t = e;
|
|
1767
|
+
Qe((c) => ({
|
|
1768
|
+
"11aba73c": x(h)
|
|
1769
|
+
}));
|
|
1770
|
+
const s = B(null), o = B(null), l = B(null);
|
|
1771
|
+
function i() {
|
|
1772
|
+
const { placement: c, offset: b, padding: w, disabled: T } = t;
|
|
1773
|
+
T || (o.value.style.display = "block", n("show"), ge(s, o, l, c, b, w), r(), t.outsideClick && u("add"));
|
|
1774
|
+
}
|
|
1775
|
+
function a() {
|
|
1776
|
+
o.value.style.display = "", n("hide"), t.outsideClick && u("remove");
|
|
1777
|
+
}
|
|
1778
|
+
const r = () => {
|
|
1779
|
+
t.autoHide && setTimeout(() => {
|
|
1780
|
+
a();
|
|
1781
|
+
}, t.hideDelay);
|
|
1782
|
+
}, u = (c) => {
|
|
1783
|
+
c === "add" && document.addEventListener("click", a), c === "remove" && document.removeEventListener("click", a);
|
|
1784
|
+
}, y = () => {
|
|
1785
|
+
t.disabled || t.triggers == H.Click && (o.value.style.display === "block" ? a() : i());
|
|
1786
|
+
}, f = () => {
|
|
1787
|
+
t.disabled || t.triggers === H.Hover && i();
|
|
1788
|
+
}, g = () => {
|
|
1789
|
+
if (!t.disabled)
|
|
1790
|
+
if (o.value.style.display === "" && t.triggers === H.Hover) {
|
|
1791
|
+
i();
|
|
1792
|
+
return;
|
|
1793
|
+
} else
|
|
1794
|
+
o.value.style.display !== "" && t.triggers === H.Hover && a();
|
|
1795
|
+
}, _ = () => {
|
|
1796
|
+
const { placement: c, offset: b, padding: w, disabled: T } = t;
|
|
1797
|
+
T || t.triggers === H.Hover && ge(s, o, l, c, b, w);
|
|
1798
|
+
}, p = $(() => ({
|
|
1799
|
+
tooltip: !0,
|
|
1800
|
+
"tooltip--dark": t.dark,
|
|
1801
|
+
"tooltip--light": t.light
|
|
1802
|
+
}));
|
|
1803
|
+
window.onresize = () => {
|
|
1804
|
+
const { placement: c, offset: b, padding: w, disabled: T } = t;
|
|
1805
|
+
T || t.resizable && ge(s, o, l, c, b, w);
|
|
1806
|
+
}, Ke(
|
|
1807
|
+
() => {
|
|
1808
|
+
t.disabled || t.shown && t.triggers === H.Manual && i();
|
|
1809
|
+
},
|
|
1810
|
+
{ flush: "post" }
|
|
1811
|
+
);
|
|
1812
|
+
const h = $(() => `${t.showDelay}ms`);
|
|
1813
|
+
return (c, b) => (d(), m(Q, null, [
|
|
1814
|
+
v("div", {
|
|
1815
|
+
ref_key: "trigger",
|
|
1816
|
+
ref: s,
|
|
1817
|
+
"aria-disabled": t.disabled,
|
|
1818
|
+
class: "trigger",
|
|
1819
|
+
onClick: Y(y, ["stop"]),
|
|
1820
|
+
onMouseenter: Y(f, ["stop"]),
|
|
1821
|
+
onMouseleave: Y(g, ["stop"]),
|
|
1822
|
+
onMousemove: Y(_, ["stop"])
|
|
1823
|
+
}, [
|
|
1824
|
+
j(c.$slots, "trigger", {}, void 0, !0),
|
|
1825
|
+
c.$slots.trigger ? C("", !0) : (d(), m("div", {
|
|
1826
|
+
key: 0,
|
|
1827
|
+
innerHTML: t.triggerContent
|
|
1828
|
+
}, null, 8, $n))
|
|
1829
|
+
], 40, kn),
|
|
1830
|
+
v("div", {
|
|
1831
|
+
id: "tooltip",
|
|
1832
|
+
ref_key: "tooltip",
|
|
1833
|
+
ref: o,
|
|
1834
|
+
class: k(x(p)),
|
|
1835
|
+
role: "tooltip"
|
|
1836
|
+
}, [
|
|
1837
|
+
j(c.$slots, "content", {}, void 0, !0),
|
|
1838
|
+
c.$slots.content ? C("", !0) : (d(), m("div", {
|
|
1839
|
+
key: 0,
|
|
1840
|
+
class: k({
|
|
1841
|
+
tooltip__content: !0,
|
|
1842
|
+
"tooltip__content--dark": t.dark,
|
|
1843
|
+
"tooltip__content--light": t.light
|
|
1844
|
+
})
|
|
1845
|
+
}, z(t.text), 3)),
|
|
1846
|
+
c.$slots.content ? C("", !0) : (d(), m("div", {
|
|
1847
|
+
key: 1,
|
|
1848
|
+
id: "arrow",
|
|
1849
|
+
ref_key: "arrowElement",
|
|
1850
|
+
ref: l,
|
|
1851
|
+
class: k({
|
|
1852
|
+
tooltip__arrow: !0,
|
|
1853
|
+
"tooltip__arrow--dark": t.dark,
|
|
1854
|
+
"tooltip__arrow--light": t.light
|
|
1855
|
+
})
|
|
1856
|
+
}, null, 2))
|
|
1857
|
+
], 2)
|
|
1858
|
+
], 64));
|
|
1859
|
+
}
|
|
1860
|
+
});
|
|
1861
|
+
const Cn = (e, n) => {
|
|
1862
|
+
const t = e.__vccOpts || e;
|
|
1863
|
+
for (const [s, o] of n)
|
|
1864
|
+
t[s] = o;
|
|
1865
|
+
return t;
|
|
1866
|
+
}, Vn = /* @__PURE__ */ Cn(Mn, [["__scopeId", "data-v-af8d63f8"]]);
|
|
1867
|
+
export {
|
|
1868
|
+
zn as Alert,
|
|
1869
|
+
An as Avatar,
|
|
1870
|
+
In as Badge,
|
|
1871
|
+
it as Button,
|
|
1872
|
+
Nn as Checkbox,
|
|
1873
|
+
mt as Chip,
|
|
1874
|
+
Ln as Dropdown,
|
|
1875
|
+
E as Icon,
|
|
1876
|
+
Oe as Label,
|
|
1877
|
+
On as Snackbar,
|
|
1878
|
+
En as Switch,
|
|
1879
|
+
Et as TabItem,
|
|
1880
|
+
Dn as Tabs,
|
|
1881
|
+
Bn as TextArea,
|
|
1882
|
+
jn as Textfield,
|
|
1883
|
+
Vn as Tooltip
|
|
1884
|
+
};
|