@rocketui/vue 0.0.15 → 0.0.16
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/dist/rocket-ui-vue.js +576 -517
- package/dist/rocket-ui-vue.umd.cjs +1 -1
- package/dist/style.css +2 -2
- package/dist/types/main.d.ts +2 -1
- package/package.json +1 -1
package/dist/rocket-ui-vue.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as I, computed as $, openBlock as f, createElementBlock as m, normalizeClass as x, unref as w, normalizeStyle as We, toDisplayString as C, reactive as G, Fragment as Q, renderList as q, createElementVNode as v, createVNode as ne, createBlock as L, renderSlot as D, createCommentVNode as R, mergeProps as Pe, withModifiers as V, watch as U, ref as E, withDirectives as Ae, withKeys as ye, vModelText as Fe, vShow as Ue, onMounted as Ze, withCtx as Qe, createTextVNode as Xe, useCssVars as Ke, watchEffect as Ge } from "vue";
|
|
2
|
+
const N = /* @__PURE__ */ I({
|
|
3
3
|
__name: "RIcon",
|
|
4
4
|
props: {
|
|
5
5
|
name: { default: "" },
|
|
@@ -17,58 +17,58 @@ const B = /* @__PURE__ */ L({
|
|
|
17
17
|
alignItems: "center",
|
|
18
18
|
justifyContent: "center"
|
|
19
19
|
})), a = $(() => n.kind === "filled" ? "material-icons" : `material-icons-${n.kind}`);
|
|
20
|
-
return (o,
|
|
21
|
-
class:
|
|
22
|
-
style:
|
|
20
|
+
return (o, l) => (f(), m("span", {
|
|
21
|
+
class: x(w(a)),
|
|
22
|
+
style: We(w(e))
|
|
23
23
|
}, C(n.name), 7));
|
|
24
24
|
}
|
|
25
|
-
}),
|
|
25
|
+
}), Je = ["onClick"], qe = { class: "accordion__title" }, et = { class: "accordion__icon" }, tt = { class: "accordion__content" }, zn = /* @__PURE__ */ I({
|
|
26
26
|
__name: "RAccordion",
|
|
27
27
|
props: {
|
|
28
28
|
accordions: null
|
|
29
29
|
},
|
|
30
30
|
setup(t) {
|
|
31
31
|
const n = t, e = G(
|
|
32
|
-
n.accordions.map(({ title: o, content:
|
|
32
|
+
n.accordions.map(({ title: o, content: l }, s) => ({
|
|
33
33
|
title: o,
|
|
34
|
-
content:
|
|
35
|
-
open: n.accordions[
|
|
36
|
-
disabled: n.accordions[
|
|
34
|
+
content: l,
|
|
35
|
+
open: n.accordions[s].open || !1,
|
|
36
|
+
disabled: n.accordions[s].disabled || !1
|
|
37
37
|
}))
|
|
38
38
|
);
|
|
39
39
|
function a(o) {
|
|
40
|
-
e[o].disabled || e.forEach((
|
|
41
|
-
e[
|
|
40
|
+
e[o].disabled || e.forEach((l, s) => {
|
|
41
|
+
e[s].open = s === o ? !e[s].open : !1;
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
|
-
return (o,
|
|
44
|
+
return (o, l) => (f(!0), m(Q, null, q(e, (s, i) => (f(), m("div", {
|
|
45
45
|
key: i,
|
|
46
|
-
class:
|
|
46
|
+
class: x({
|
|
47
47
|
accordion: !0,
|
|
48
|
-
"accordion--opened":
|
|
49
|
-
"accordion--disabled":
|
|
48
|
+
"accordion--opened": s.open,
|
|
49
|
+
"accordion--disabled": s.disabled
|
|
50
50
|
})
|
|
51
51
|
}, [
|
|
52
52
|
v("div", {
|
|
53
53
|
class: "accordion__header",
|
|
54
54
|
onClick: (r) => a(i)
|
|
55
55
|
}, [
|
|
56
|
-
v("div",
|
|
57
|
-
v("div",
|
|
58
|
-
|
|
59
|
-
name:
|
|
56
|
+
v("div", qe, C(s.title), 1),
|
|
57
|
+
v("div", et, [
|
|
58
|
+
ne(N, {
|
|
59
|
+
name: s.open ? "expand_less" : "expand_more"
|
|
60
60
|
}, null, 8, ["name"])
|
|
61
61
|
])
|
|
62
|
-
], 8,
|
|
63
|
-
v("div",
|
|
64
|
-
v("span", null, C(
|
|
62
|
+
], 8, Je),
|
|
63
|
+
v("div", tt, [
|
|
64
|
+
v("span", null, C(s.content), 1)
|
|
65
65
|
])
|
|
66
66
|
], 2))), 128));
|
|
67
67
|
}
|
|
68
|
-
}),
|
|
68
|
+
}), nt = { class: "icon" }, ot = { class: "texts" }, at = { class: "texts__title" }, lt = { class: "texts__description" }, st = {
|
|
69
69
|
key: 0,
|
|
70
70
|
class: "close"
|
|
71
|
-
},
|
|
71
|
+
}, Cn = /* @__PURE__ */ I({
|
|
72
72
|
__name: "RAlert",
|
|
73
73
|
props: {
|
|
74
74
|
type: { default: "info" },
|
|
@@ -88,42 +88,42 @@ const B = /* @__PURE__ */ L({
|
|
|
88
88
|
error: "error",
|
|
89
89
|
warning: "warning",
|
|
90
90
|
info: "info"
|
|
91
|
-
})[e.type]),
|
|
91
|
+
})[e.type]), l = $(() => ({
|
|
92
92
|
small: 12,
|
|
93
93
|
medium: 16,
|
|
94
94
|
large: 20
|
|
95
|
-
})[e.size]),
|
|
95
|
+
})[e.size]), s = () => {
|
|
96
96
|
n("close");
|
|
97
97
|
};
|
|
98
|
-
return (i, r) => (
|
|
99
|
-
class:
|
|
98
|
+
return (i, r) => (f(), m("div", {
|
|
99
|
+
class: x(w(a))
|
|
100
100
|
}, [
|
|
101
|
-
v("div",
|
|
102
|
-
|
|
101
|
+
v("div", nt, [
|
|
102
|
+
ne(N, {
|
|
103
103
|
name: w(o),
|
|
104
|
-
size: w(
|
|
104
|
+
size: w(l)
|
|
105
105
|
}, null, 8, ["name", "size"])
|
|
106
106
|
]),
|
|
107
|
-
v("div",
|
|
108
|
-
v("p",
|
|
109
|
-
v("p",
|
|
107
|
+
v("div", ot, [
|
|
108
|
+
v("p", at, C(e.title), 1),
|
|
109
|
+
v("p", lt, C(e.description), 1)
|
|
110
110
|
]),
|
|
111
|
-
e.closable ? (
|
|
112
|
-
i.$slots.close ?
|
|
111
|
+
e.closable ? (f(), m("div", st, [
|
|
112
|
+
i.$slots.close ? D(i.$slots, "close", { key: 1 }) : (f(), L(N, {
|
|
113
113
|
key: 0,
|
|
114
114
|
class: "close__button",
|
|
115
115
|
name: "close",
|
|
116
116
|
size: "16",
|
|
117
|
-
onClick:
|
|
117
|
+
onClick: s
|
|
118
118
|
}))
|
|
119
119
|
])) : R("", !0)
|
|
120
120
|
], 2));
|
|
121
121
|
}
|
|
122
|
-
}),
|
|
122
|
+
}), ke = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjciIGhlaWdodD0iMjgiIHZpZXdCb3g9IjAgMCAyNyAyOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEzLjQ5OTMgMTRDMTcuMTgyNyAxNCAyMC4xNjYgMTEuMDE2NyAyMC4xNjYgNy4zMzMzNEMyMC4xNjYgMy42NSAxNy4xODI3IDAuNjY2NjcyIDEzLjQ5OTMgMC42NjY2NzJDOS44MTYwMiAwLjY2NjY3MiA2LjgzMjY4IDMuNjUgNi44MzI2OCA3LjMzMzM0QzYuODMyNjggMTEuMDE2NyA5LjgxNjAyIDE0IDEzLjQ5OTMgMTRaTTEzLjQ5OTMgMTcuMzMzM0M5LjA0OTM1IDE3LjMzMzMgMC4xNjYwMTYgMTkuNTY2NyAwLjE2NjAxNiAyNFYyNS42NjY3QzAuMTY2MDE2IDI2LjU4MzMgMC45MTYwMTYgMjcuMzMzMyAxLjgzMjY4IDI3LjMzMzNIMjUuMTY2QzI2LjA4MjcgMjcuMzMzMyAyNi44MzI3IDI2LjU4MzMgMjYuODMyNyAyNS42NjY3VjI0QzI2LjgzMjcgMTkuNTY2NyAxNy45NDkzIDE3LjMzMzMgMTMuNDk5MyAxNy4zMzMzWiIgZmlsbD0iIzRDNUJFMSIvPgo8L3N2Zz4K", it = { class: "avatar__wrapper" }, rt = ["alt", "src"], Rn = /* @__PURE__ */ I({
|
|
123
123
|
__name: "RAvatar",
|
|
124
124
|
props: {
|
|
125
125
|
type: { default: "image" },
|
|
126
|
-
src: { default:
|
|
126
|
+
src: { default: ke },
|
|
127
127
|
alt: { default: "Avatar" },
|
|
128
128
|
size: { default: "2xl" },
|
|
129
129
|
online: { type: Boolean, default: !1 },
|
|
@@ -133,35 +133,35 @@ const B = /* @__PURE__ */ L({
|
|
|
133
133
|
const n = t, e = $(() => ({
|
|
134
134
|
avatar: !0,
|
|
135
135
|
[`avatar--${n.size}`]: !0
|
|
136
|
-
})), a = $(() => n.type === "image" && !n.src), o = $(() => a.value ?
|
|
137
|
-
const i =
|
|
136
|
+
})), a = $(() => n.type === "image" && !n.src), o = $(() => a.value ? ke : n.src), l = (s) => {
|
|
137
|
+
const i = s.split(" ");
|
|
138
138
|
return i.length === 1 ? i[0].substring(0, 2) : `${i[0].charAt(0)}${i[1].charAt(0)}`;
|
|
139
139
|
};
|
|
140
|
-
return (
|
|
140
|
+
return (s, i) => (f(), m("div", it, [
|
|
141
141
|
v("div", {
|
|
142
|
-
class:
|
|
142
|
+
class: x(w(e))
|
|
143
143
|
}, [
|
|
144
|
-
n.type === "text" ? (
|
|
144
|
+
n.type === "text" ? (f(), m("p", {
|
|
145
145
|
key: 0,
|
|
146
|
-
class:
|
|
147
|
-
}, C(
|
|
146
|
+
class: x({ avatar__text: !0, [`avatar__text--${n.size}`]: !0 })
|
|
147
|
+
}, C(l(n.text)), 3)) : (f(), m("img", {
|
|
148
148
|
key: 1,
|
|
149
149
|
alt: n.alt,
|
|
150
|
-
class:
|
|
150
|
+
class: x({
|
|
151
151
|
avatar__image: !0,
|
|
152
152
|
[`avatar__image--${n.size}`]: !0,
|
|
153
153
|
"avatar__image--anonymous": w(a)
|
|
154
154
|
}),
|
|
155
155
|
src: w(o)
|
|
156
|
-
}, null, 10,
|
|
156
|
+
}, null, 10, rt))
|
|
157
157
|
], 2),
|
|
158
|
-
n.online ? (
|
|
158
|
+
n.online ? (f(), m("span", {
|
|
159
159
|
key: 0,
|
|
160
|
-
class:
|
|
160
|
+
class: x({ avatar__online: !0, [`avatar__online--${n.size}`]: !0 })
|
|
161
161
|
}, null, 2)) : R("", !0)
|
|
162
162
|
]));
|
|
163
163
|
}
|
|
164
|
-
}),
|
|
164
|
+
}), ct = { class: "badge-wrapper group" }, In = /* @__PURE__ */ I({
|
|
165
165
|
__name: "RBadge",
|
|
166
166
|
props: {
|
|
167
167
|
variant: { default: "primary" },
|
|
@@ -183,15 +183,15 @@ const B = /* @__PURE__ */ L({
|
|
|
183
183
|
"badge--no-content": !n.content,
|
|
184
184
|
[`badge--${n.variant}`]: n.variant
|
|
185
185
|
}));
|
|
186
|
-
return (a, o) => (
|
|
186
|
+
return (a, o) => (f(), m("div", ct, [
|
|
187
187
|
v("span", {
|
|
188
|
-
class:
|
|
189
|
-
onClick: o[0] || (o[0] = (
|
|
188
|
+
class: x(w(e)),
|
|
189
|
+
onClick: o[0] || (o[0] = (l) => a.$emit("click"))
|
|
190
190
|
}, C(n.content), 3),
|
|
191
|
-
|
|
191
|
+
D(a.$slots, "default")
|
|
192
192
|
]));
|
|
193
193
|
}
|
|
194
|
-
}),
|
|
194
|
+
}), dt = ["disabled"], ut = /* @__PURE__ */ I({
|
|
195
195
|
__name: "RButton",
|
|
196
196
|
props: {
|
|
197
197
|
variant: { default: "primary" },
|
|
@@ -215,44 +215,44 @@ const B = /* @__PURE__ */ L({
|
|
|
215
215
|
"button--only-icon": n.onlyIcon,
|
|
216
216
|
"button--block": n.block
|
|
217
217
|
})), a = $(() => n.size === "large" ? 20 : 16), o = $(() => {
|
|
218
|
-
const { backgroundColor:
|
|
218
|
+
const { backgroundColor: l, height: s } = n;
|
|
219
219
|
return {
|
|
220
|
-
backgroundColor:
|
|
221
|
-
height:
|
|
220
|
+
backgroundColor: l,
|
|
221
|
+
height: s ? `${s}px` : ""
|
|
222
222
|
};
|
|
223
223
|
});
|
|
224
|
-
return (
|
|
224
|
+
return (l, s) => (f(), m("button", Pe(l.$attrs, {
|
|
225
225
|
class: w(e),
|
|
226
226
|
disabled: t.disabled || t.loading,
|
|
227
227
|
style: w(o),
|
|
228
|
-
onClick:
|
|
228
|
+
onClick: s[0] || (s[0] = V((i) => l.$emit("click"), ["stop"]))
|
|
229
229
|
}), [
|
|
230
|
-
|
|
231
|
-
|
|
230
|
+
D(l.$slots, "custom-icon"),
|
|
231
|
+
l.$slots["custom-icon"] ? R("", !0) : (f(), L(N, {
|
|
232
232
|
key: 0,
|
|
233
|
-
class:
|
|
233
|
+
class: x({
|
|
234
234
|
"button__prepend-icon": !0,
|
|
235
235
|
"button__prepend-icon--only": n.onlyIcon
|
|
236
236
|
}),
|
|
237
237
|
name: n.prependIcon,
|
|
238
238
|
size: w(a)
|
|
239
239
|
}, null, 8, ["class", "name", "size"])),
|
|
240
|
-
n.onlyIcon ? R("", !0) :
|
|
241
|
-
!
|
|
240
|
+
n.onlyIcon ? R("", !0) : D(l.$slots, "default", { key: 1 }),
|
|
241
|
+
!l.$slots["custom-icon"] && !n.onlyIcon ? (f(), L(N, {
|
|
242
242
|
key: 2,
|
|
243
243
|
class: "button__append-icon",
|
|
244
244
|
name: n.appendIcon,
|
|
245
245
|
size: w(a)
|
|
246
246
|
}, null, 8, ["name", "size"])) : R("", !0)
|
|
247
|
-
], 16,
|
|
247
|
+
], 16, dt));
|
|
248
248
|
}
|
|
249
|
-
}),
|
|
249
|
+
}), ft = { class: "checkbox-wrapper" }, pt = { class: "checkbox-container" }, ht = ["id", "checked", "disabled", "indeterminate"], mt = ["data-disabled"], _t = { class: "checkbox-texts" }, gt = ["data-disabled", "for"], vt = {
|
|
250
250
|
key: 0,
|
|
251
251
|
class: "checkbox-texts__error"
|
|
252
|
-
},
|
|
252
|
+
}, bt = {
|
|
253
253
|
key: 1,
|
|
254
254
|
class: "checkbox-texts__hint"
|
|
255
|
-
},
|
|
255
|
+
}, An = /* @__PURE__ */ I({
|
|
256
256
|
__name: "RCheckbox",
|
|
257
257
|
props: {
|
|
258
258
|
id: { default: "" },
|
|
@@ -272,7 +272,7 @@ const B = /* @__PURE__ */ L({
|
|
|
272
272
|
checked: "check",
|
|
273
273
|
unchecked: "",
|
|
274
274
|
indeterminate: "remove"
|
|
275
|
-
},
|
|
275
|
+
}, l = $(() => a.indeterminate ? o.indeterminate : a.checked ? o.checked : o.unchecked), s = $(() => ({
|
|
276
276
|
checkbox: !0,
|
|
277
277
|
"checkbox--checked": a.checked,
|
|
278
278
|
"checkbox--disabled": e.disabled,
|
|
@@ -301,8 +301,8 @@ const B = /* @__PURE__ */ L({
|
|
|
301
301
|
// TODO: find a better way to do this
|
|
302
302
|
immediate: !0
|
|
303
303
|
}
|
|
304
|
-
), (r, u) => (
|
|
305
|
-
v("div",
|
|
304
|
+
), (r, u) => (f(), m("div", ft, [
|
|
305
|
+
v("div", pt, [
|
|
306
306
|
v("input", {
|
|
307
307
|
id: e.id,
|
|
308
308
|
checked: a.checked,
|
|
@@ -311,28 +311,28 @@ const B = /* @__PURE__ */ L({
|
|
|
311
311
|
indeterminate: a.indeterminate,
|
|
312
312
|
type: "checkbox",
|
|
313
313
|
onChange: i
|
|
314
|
-
}, null, 40,
|
|
314
|
+
}, null, 40, ht),
|
|
315
315
|
v("div", {
|
|
316
|
-
class:
|
|
316
|
+
class: x(w(s)),
|
|
317
317
|
"data-disabled": e.disabled
|
|
318
318
|
}, [
|
|
319
|
-
|
|
320
|
-
name: w(
|
|
319
|
+
ne(N, {
|
|
320
|
+
name: w(l),
|
|
321
321
|
size: "16"
|
|
322
322
|
}, null, 8, ["name"])
|
|
323
|
-
], 10,
|
|
323
|
+
], 10, mt)
|
|
324
324
|
]),
|
|
325
|
-
v("div",
|
|
325
|
+
v("div", _t, [
|
|
326
326
|
v("label", {
|
|
327
327
|
class: "checkbox-texts__label",
|
|
328
328
|
"data-disabled": e.disabled,
|
|
329
329
|
for: e.id
|
|
330
|
-
}, C(e.label), 9,
|
|
331
|
-
e.errorMsg ? (
|
|
330
|
+
}, C(e.label), 9, gt),
|
|
331
|
+
e.errorMsg ? (f(), m("p", vt, C(e.errorMsg), 1)) : (f(), m("p", bt, C(e.hint), 1))
|
|
332
332
|
])
|
|
333
333
|
]));
|
|
334
334
|
}
|
|
335
|
-
}),
|
|
335
|
+
}), yt = /* @__PURE__ */ I({
|
|
336
336
|
__name: "RChip",
|
|
337
337
|
props: {
|
|
338
338
|
variant: { default: "primary" },
|
|
@@ -351,19 +351,19 @@ const B = /* @__PURE__ */ L({
|
|
|
351
351
|
[`chip__${e.variant}`]: e.variant,
|
|
352
352
|
[`chip--${e.size}`]: e.size,
|
|
353
353
|
[`chip__${e.variant}--ghost`]: e.ghost
|
|
354
|
-
})), o = $(() => e.size === "small" ? "10" : e.size === "large" ? "16" : "12"),
|
|
354
|
+
})), o = $(() => e.size === "small" ? "10" : e.size === "large" ? "16" : "12"), l = (i) => {
|
|
355
355
|
e.disabled || n("click:chip", i);
|
|
356
|
-
},
|
|
356
|
+
}, s = (i) => {
|
|
357
357
|
e.disabled || n("click:close", i);
|
|
358
358
|
};
|
|
359
|
-
return (i, r) => (
|
|
360
|
-
class:
|
|
359
|
+
return (i, r) => (f(), m("div", {
|
|
360
|
+
class: x(w(a))
|
|
361
361
|
}, [
|
|
362
362
|
v("div", {
|
|
363
363
|
class: "chip__content",
|
|
364
|
-
onClick: r[0] || (r[0] =
|
|
364
|
+
onClick: r[0] || (r[0] = V((u) => l(u), ["stop"]))
|
|
365
365
|
}, [
|
|
366
|
-
e.prependIcon ? (
|
|
366
|
+
e.prependIcon ? (f(), L(N, {
|
|
367
367
|
key: 0,
|
|
368
368
|
"aria-disabled": e.disabled,
|
|
369
369
|
class: "chip__prepend-icon",
|
|
@@ -372,23 +372,23 @@ const B = /* @__PURE__ */ L({
|
|
|
372
372
|
}, null, 8, ["aria-disabled", "name", "size"])) : R("", !0),
|
|
373
373
|
v("span", null, C(e.label), 1)
|
|
374
374
|
]),
|
|
375
|
-
e.appendIcon ? (
|
|
375
|
+
e.appendIcon ? (f(), L(N, {
|
|
376
376
|
key: 0,
|
|
377
377
|
"aria-disabled": e.disabled,
|
|
378
378
|
class: "chip__append-icon",
|
|
379
379
|
name: e.appendIcon,
|
|
380
380
|
size: w(o),
|
|
381
|
-
onClick: r[1] || (r[1] =
|
|
381
|
+
onClick: r[1] || (r[1] = V((u) => s(u), ["stop"]))
|
|
382
382
|
}, null, 8, ["aria-disabled", "name", "size"])) : R("", !0)
|
|
383
383
|
], 2));
|
|
384
384
|
}
|
|
385
|
-
}),
|
|
385
|
+
}), kt = { class: "dropdown-wrapper" }, xt = {
|
|
386
386
|
key: 0,
|
|
387
387
|
class: "dropdown__tags"
|
|
388
|
-
},
|
|
388
|
+
}, wt = {
|
|
389
389
|
key: 1,
|
|
390
390
|
class: "dropdown__multiple"
|
|
391
|
-
},
|
|
391
|
+
}, $t = ["disabled", "placeholder", "readonly"], Mt = ["aria-disabled", "onClick"], Tt = { style: { display: "flex", "align-items": "center" } }, Ln = /* @__PURE__ */ I({
|
|
392
392
|
__name: "RDropdown",
|
|
393
393
|
props: {
|
|
394
394
|
placeholder: { default: "" },
|
|
@@ -404,51 +404,51 @@ const B = /* @__PURE__ */ L({
|
|
|
404
404
|
},
|
|
405
405
|
emits: ["update:modelValue"],
|
|
406
406
|
setup(t, { emit: n }) {
|
|
407
|
-
const e = t, a =
|
|
408
|
-
var c,
|
|
407
|
+
const e = t, a = E(""), o = G([]), l = E(!1), s = E(""), i = E(null), r = E(null), u = (h) => {
|
|
408
|
+
var c, p, k, M, B, A;
|
|
409
409
|
if (!e.disabled) {
|
|
410
|
-
if (h.stopPropagation(),
|
|
411
|
-
(c = i.value) == null || c.classList.add("dropdown--active"), (
|
|
410
|
+
if (h.stopPropagation(), l.value = !l.value, l.value) {
|
|
411
|
+
(c = i.value) == null || c.classList.add("dropdown--active"), (p = i.value) == null || p.focus(), e.searchable && ((k = r.value) == null || k.focus()), document.addEventListener("click", u);
|
|
412
412
|
return;
|
|
413
413
|
}
|
|
414
|
-
(M = i.value) == null || M.classList.remove("dropdown--active"), (
|
|
414
|
+
(M = i.value) == null || M.classList.remove("dropdown--active"), (B = i.value) == null || B.blur(), (A = r.value) == null || A.blur(), document.removeEventListener("click", u);
|
|
415
415
|
}
|
|
416
|
-
},
|
|
417
|
-
var
|
|
416
|
+
}, _ = (h, c) => {
|
|
417
|
+
var p;
|
|
418
418
|
if (e.multiple || e.taggable) {
|
|
419
|
-
h.stopPropagation(), o.includes(c) ? o.splice(o.indexOf(c), 1) : o.push(c),
|
|
419
|
+
h.stopPropagation(), o.includes(c) ? o.splice(o.indexOf(c), 1) : o.push(c), s.value = "", e.searchable && ((p = r.value) == null || p.focus());
|
|
420
420
|
return;
|
|
421
421
|
}
|
|
422
422
|
d(h, c);
|
|
423
423
|
}, d = (h, c) => {
|
|
424
424
|
if (a.value === c.value) {
|
|
425
|
-
a.value = "",
|
|
425
|
+
a.value = "", s.value = "";
|
|
426
426
|
return;
|
|
427
427
|
}
|
|
428
|
-
|
|
428
|
+
s.value = c.label, a.value = c.value, u(h), n("update:modelValue", c);
|
|
429
429
|
}, y = (h, c) => {
|
|
430
|
-
if (h instanceof KeyboardEvent && h.key !== "Backspace" ||
|
|
430
|
+
if (h instanceof KeyboardEvent && h.key !== "Backspace" || s.value !== "")
|
|
431
431
|
return;
|
|
432
432
|
h.stopPropagation();
|
|
433
|
-
const
|
|
434
|
-
o.splice(
|
|
435
|
-
},
|
|
436
|
-
var
|
|
433
|
+
const p = o.findIndex((k) => k.value === c.value);
|
|
434
|
+
o.splice(p, 1);
|
|
435
|
+
}, g = (h) => {
|
|
436
|
+
var k;
|
|
437
437
|
if (!e.taggable)
|
|
438
438
|
return;
|
|
439
439
|
h.stopPropagation();
|
|
440
|
-
const c =
|
|
440
|
+
const c = s.value;
|
|
441
441
|
if (c === "")
|
|
442
442
|
return;
|
|
443
|
-
e.options.find((M) => M.label === c) || (o.push({ value: c, label: c }),
|
|
444
|
-
}, b = $(() => e.searchable ? e.options.filter((c) => c.label.toLowerCase().includes(
|
|
443
|
+
e.options.find((M) => M.label === c) || (o.push({ value: c, label: c }), s.value = "", (k = r.value) == null || k.focus());
|
|
444
|
+
}, b = $(() => e.searchable ? e.options.filter((c) => c.label.toLowerCase().includes(s.value.toLowerCase())) : e.options);
|
|
445
445
|
return U(o, (h) => {
|
|
446
446
|
n("update:modelValue", h);
|
|
447
|
-
}), (h, c) => (
|
|
447
|
+
}), (h, c) => (f(), m("div", kt, [
|
|
448
448
|
v("div", {
|
|
449
449
|
ref_key: "dropdown",
|
|
450
450
|
ref: i,
|
|
451
|
-
class:
|
|
451
|
+
class: x({
|
|
452
452
|
dropdown: !0,
|
|
453
453
|
"dropdown--disabled": e.disabled,
|
|
454
454
|
"dropdown--loading": e.loading
|
|
@@ -456,36 +456,36 @@ const B = /* @__PURE__ */ L({
|
|
|
456
456
|
onClick: u
|
|
457
457
|
}, [
|
|
458
458
|
v("div", {
|
|
459
|
-
class:
|
|
459
|
+
class: x({
|
|
460
460
|
"dropdown__prepend-icon": !0,
|
|
461
|
-
"dropdown__prepend-icon--active":
|
|
461
|
+
"dropdown__prepend-icon--active": l.value
|
|
462
462
|
})
|
|
463
463
|
}, [
|
|
464
|
-
e.prependIcon ? (
|
|
464
|
+
e.prependIcon ? (f(), L(N, {
|
|
465
465
|
key: 1,
|
|
466
466
|
name: e.prependIcon
|
|
467
|
-
}, null, 8, ["name"])) :
|
|
467
|
+
}, null, 8, ["name"])) : D(h.$slots, "prepend-icon", { key: 0 })
|
|
468
468
|
], 2),
|
|
469
|
-
e.taggable ? (
|
|
470
|
-
(
|
|
471
|
-
key:
|
|
472
|
-
label:
|
|
469
|
+
e.taggable ? (f(), m("div", xt, [
|
|
470
|
+
(f(!0), m(Q, null, q(o, (p, k) => (f(), L(yt, {
|
|
471
|
+
key: k,
|
|
472
|
+
label: p.label,
|
|
473
473
|
appendIcon: "close",
|
|
474
474
|
class: "dropdown__tags__chip",
|
|
475
475
|
variant: "primary",
|
|
476
|
-
"onClick:close": (M) => y(M,
|
|
476
|
+
"onClick:close": (M) => y(M, p)
|
|
477
477
|
}, null, 8, ["label", "onClick:close"]))), 128))
|
|
478
478
|
])) : R("", !0),
|
|
479
|
-
e.multiple ? (
|
|
480
|
-
(
|
|
479
|
+
e.multiple ? (f(), m("div", wt, [
|
|
480
|
+
(f(!0), m(Q, null, q(o, (p, k) => (f(), m("p", { key: k }, C(p.label + ","), 1))), 128))
|
|
481
481
|
])) : R("", !0),
|
|
482
|
-
|
|
482
|
+
Ae(v("input", {
|
|
483
483
|
id: "select",
|
|
484
484
|
ref_key: "input",
|
|
485
485
|
ref: r,
|
|
486
486
|
type: "text",
|
|
487
|
-
"onUpdate:modelValue": c[0] || (c[0] = (
|
|
488
|
-
class:
|
|
487
|
+
"onUpdate:modelValue": c[0] || (c[0] = (p) => s.value = p),
|
|
488
|
+
class: x({
|
|
489
489
|
dropdown__input: !0,
|
|
490
490
|
"dropdown__input--loading": e.loading
|
|
491
491
|
}),
|
|
@@ -493,65 +493,65 @@ const B = /* @__PURE__ */ L({
|
|
|
493
493
|
placeholder: e.placeholder,
|
|
494
494
|
readonly: !e.searchable,
|
|
495
495
|
onKeydown: [
|
|
496
|
-
c[1] || (c[1] = ye((
|
|
497
|
-
c[2] || (c[2] = ye((
|
|
496
|
+
c[1] || (c[1] = ye((p) => y(p, o[o.length - 1]), ["backspace"])),
|
|
497
|
+
c[2] || (c[2] = ye((p) => g(p), ["enter"]))
|
|
498
498
|
]
|
|
499
|
-
}, null, 42,
|
|
500
|
-
[Fe,
|
|
499
|
+
}, null, 42, $t), [
|
|
500
|
+
[Fe, s.value]
|
|
501
501
|
]),
|
|
502
502
|
v("div", {
|
|
503
|
-
class:
|
|
503
|
+
class: x({
|
|
504
504
|
"dropdown__append-icon": !0,
|
|
505
|
-
"dropdown__append-icon--active":
|
|
505
|
+
"dropdown__append-icon--active": l.value
|
|
506
506
|
})
|
|
507
507
|
}, [
|
|
508
|
-
e.appendIcon ? (
|
|
508
|
+
e.appendIcon ? (f(), L(N, {
|
|
509
509
|
key: 1,
|
|
510
510
|
name: e.appendIcon
|
|
511
|
-
}, null, 8, ["name"])) :
|
|
511
|
+
}, null, 8, ["name"])) : D(h.$slots, "append-icon", { key: 0 })
|
|
512
512
|
], 2)
|
|
513
513
|
], 2),
|
|
514
514
|
v("ul", {
|
|
515
|
-
class:
|
|
515
|
+
class: x({ "dropdown-options": !0, "dropdown-options--active": l.value })
|
|
516
516
|
}, [
|
|
517
|
-
(
|
|
518
|
-
key:
|
|
519
|
-
class:
|
|
517
|
+
(f(!0), m(Q, null, q(w(b), (p) => (f(), m("li", {
|
|
518
|
+
key: p.value,
|
|
519
|
+
class: x({
|
|
520
520
|
"dropdown-options__option": !0,
|
|
521
|
-
"dropdown-options__option--active":
|
|
521
|
+
"dropdown-options__option--active": p.value === a.value || (o == null ? void 0 : o.includes(p))
|
|
522
522
|
}),
|
|
523
|
-
"aria-disabled":
|
|
524
|
-
onClick: (
|
|
523
|
+
"aria-disabled": p.disabled,
|
|
524
|
+
onClick: (k) => _(k, p)
|
|
525
525
|
}, [
|
|
526
|
-
v("div",
|
|
527
|
-
|
|
526
|
+
v("div", Tt, [
|
|
527
|
+
p.prependIcon ? (f(), L(N, {
|
|
528
528
|
key: 1,
|
|
529
|
-
class:
|
|
529
|
+
class: x({
|
|
530
530
|
"dropdown-options__option__prepend-icon": !0,
|
|
531
|
-
"dropdown-options__option__prepend-icon--active":
|
|
531
|
+
"dropdown-options__option__prepend-icon--active": p.value === a.value || (o == null ? void 0 : o.includes(p))
|
|
532
532
|
}),
|
|
533
|
-
name:
|
|
534
|
-
}, null, 8, ["class", "name"])) :
|
|
533
|
+
name: p.prependIcon
|
|
534
|
+
}, null, 8, ["class", "name"])) : D(h.$slots, "option-prepend", { key: 0 }),
|
|
535
535
|
v("p", {
|
|
536
|
-
class:
|
|
536
|
+
class: x({
|
|
537
537
|
"dropdown-options__option__label": !0,
|
|
538
|
-
"dropdown-options__option__label--active":
|
|
538
|
+
"dropdown-options__option__label--active": p.value === a.value || (o == null ? void 0 : o.includes(p))
|
|
539
539
|
})
|
|
540
|
-
}, C(
|
|
540
|
+
}, C(p.label), 3)
|
|
541
541
|
]),
|
|
542
|
-
|
|
542
|
+
p.value === a.value || o != null && o.includes(p) ? (f(), L(N, {
|
|
543
543
|
key: 0,
|
|
544
|
-
class:
|
|
544
|
+
class: x({
|
|
545
545
|
"dropdown-options__option__append-icon": !0,
|
|
546
|
-
"dropdown-options__option__append-icon--active":
|
|
546
|
+
"dropdown-options__option__append-icon--active": p.value === a.value || (o == null ? void 0 : o.includes(p))
|
|
547
547
|
}),
|
|
548
548
|
name: "check"
|
|
549
549
|
}, null, 8, ["class"])) : R("", !0)
|
|
550
|
-
], 10,
|
|
550
|
+
], 10, Mt))), 128))
|
|
551
551
|
], 2)
|
|
552
552
|
]));
|
|
553
553
|
}
|
|
554
|
-
}), zt = ["id", "for"],
|
|
554
|
+
}), zt = ["id", "for"], Le = /* @__PURE__ */ I({
|
|
555
555
|
__name: "RLabel",
|
|
556
556
|
props: {
|
|
557
557
|
id: { default: "" },
|
|
@@ -560,18 +560,76 @@ const B = /* @__PURE__ */ L({
|
|
|
560
560
|
},
|
|
561
561
|
setup(t) {
|
|
562
562
|
const n = t;
|
|
563
|
-
return (e, a) => (
|
|
563
|
+
return (e, a) => (f(), m("label", {
|
|
564
564
|
id: n.id,
|
|
565
565
|
for: n.for
|
|
566
566
|
}, C(n.text), 9, zt));
|
|
567
567
|
}
|
|
568
|
-
}),
|
|
568
|
+
}), Ct = ["onClick"], Rt = ["open"], It = { class: "dialog__header" }, At = {
|
|
569
|
+
key: 0,
|
|
570
|
+
class: "icon"
|
|
571
|
+
}, Lt = {
|
|
572
|
+
key: 1,
|
|
573
|
+
class: "title"
|
|
574
|
+
}, Nt = {
|
|
575
|
+
key: 2,
|
|
576
|
+
class: "description"
|
|
577
|
+
}, Bt = { class: "dialog__body" }, Dt = { class: "dialog__actions" }, Nn = /* @__PURE__ */ I({
|
|
578
|
+
__name: "RModal",
|
|
579
|
+
props: {
|
|
580
|
+
modelValue: { type: Boolean, default: !1 },
|
|
581
|
+
block: { type: Boolean, default: !1 },
|
|
582
|
+
title: { default: "" },
|
|
583
|
+
description: { default: "" },
|
|
584
|
+
icon: null
|
|
585
|
+
},
|
|
586
|
+
emits: ["update:modelValue"],
|
|
587
|
+
setup(t, { emit: n }) {
|
|
588
|
+
const e = t, a = $(() => ({
|
|
589
|
+
dialog: !0,
|
|
590
|
+
"dialog--block": e.block
|
|
591
|
+
})), o = (l) => {
|
|
592
|
+
l.target === l.currentTarget && n("update:modelValue", !1);
|
|
593
|
+
};
|
|
594
|
+
return (l, s) => Ae((f(), m("div", {
|
|
595
|
+
class: "modal",
|
|
596
|
+
onClick: V(o, ["stop"])
|
|
597
|
+
}, [
|
|
598
|
+
v("div", {
|
|
599
|
+
role: "dialog",
|
|
600
|
+
"aria-modal": "true",
|
|
601
|
+
class: x(w(a)),
|
|
602
|
+
open: e.modelValue
|
|
603
|
+
}, [
|
|
604
|
+
v("div", It, [
|
|
605
|
+
D(l.$slots, "header"),
|
|
606
|
+
e.icon ? (f(), m("div", At, [
|
|
607
|
+
ne(N, {
|
|
608
|
+
name: e.icon,
|
|
609
|
+
kind: "outlined"
|
|
610
|
+
}, null, 8, ["name"])
|
|
611
|
+
])) : R("", !0),
|
|
612
|
+
e.title ? (f(), m("div", Lt, C(e.title), 1)) : R("", !0),
|
|
613
|
+
e.description ? (f(), m("div", Nt, C(e.description), 1)) : R("", !0)
|
|
614
|
+
]),
|
|
615
|
+
v("div", Bt, [
|
|
616
|
+
D(l.$slots, "default")
|
|
617
|
+
]),
|
|
618
|
+
v("div", Dt, [
|
|
619
|
+
D(l.$slots, "actions")
|
|
620
|
+
])
|
|
621
|
+
], 10, Rt)
|
|
622
|
+
], 8, Ct)), [
|
|
623
|
+
[Ue, t.modelValue]
|
|
624
|
+
]);
|
|
625
|
+
}
|
|
626
|
+
}), jt = { class: "snackbar__text" }, Et = {
|
|
569
627
|
key: 0,
|
|
570
628
|
class: "snackbar__action"
|
|
571
|
-
},
|
|
629
|
+
}, Ot = {
|
|
572
630
|
key: 1,
|
|
573
631
|
class: "snackbar__close"
|
|
574
|
-
},
|
|
632
|
+
}, Bn = /* @__PURE__ */ I({
|
|
575
633
|
__name: "RSnackbar",
|
|
576
634
|
props: {
|
|
577
635
|
text: { default: "" },
|
|
@@ -584,61 +642,61 @@ const B = /* @__PURE__ */ L({
|
|
|
584
642
|
},
|
|
585
643
|
emits: ["action", "close"],
|
|
586
644
|
setup(t, { emit: n }) {
|
|
587
|
-
const e = t, a =
|
|
645
|
+
const e = t, a = E(!1), o = () => {
|
|
588
646
|
n("action");
|
|
589
|
-
},
|
|
647
|
+
}, l = () => {
|
|
590
648
|
a.value = !1, n("close");
|
|
591
649
|
};
|
|
592
|
-
return
|
|
650
|
+
return Ze(() => {
|
|
593
651
|
e.timeout && setTimeout(() => {
|
|
594
652
|
a.value = !1, n("close");
|
|
595
653
|
}, e.timeout);
|
|
596
654
|
}), U(
|
|
597
655
|
() => e.show,
|
|
598
|
-
(
|
|
599
|
-
a.value =
|
|
656
|
+
(s) => {
|
|
657
|
+
a.value = s;
|
|
600
658
|
},
|
|
601
659
|
{ immediate: !0 }
|
|
602
|
-
), (
|
|
603
|
-
class:
|
|
660
|
+
), (s, i) => (f(), m("div", {
|
|
661
|
+
class: x({
|
|
604
662
|
snackbar: !0,
|
|
605
663
|
"snackbar--closed": !a.value,
|
|
606
664
|
[e.left ? "snackbar--left" : "snackbar--right"]: !0
|
|
607
665
|
})
|
|
608
666
|
}, [
|
|
609
|
-
v("div",
|
|
610
|
-
e.showAction ? (
|
|
611
|
-
|
|
612
|
-
|
|
667
|
+
v("div", jt, C(e.text), 1),
|
|
668
|
+
e.showAction ? (f(), m("div", Et, [
|
|
669
|
+
D(s.$slots, "action"),
|
|
670
|
+
s.$slots.action ? R("", !0) : (f(), L(ut, {
|
|
613
671
|
key: 0,
|
|
614
672
|
size: "small",
|
|
615
673
|
variant: "ghost",
|
|
616
674
|
onClick: o
|
|
617
675
|
}, {
|
|
618
|
-
default:
|
|
619
|
-
|
|
676
|
+
default: Qe(() => [
|
|
677
|
+
Xe(C(e.actionText), 1)
|
|
620
678
|
]),
|
|
621
679
|
_: 1
|
|
622
680
|
}))
|
|
623
681
|
])) : R("", !0),
|
|
624
|
-
e.showClose ? (
|
|
625
|
-
|
|
626
|
-
|
|
682
|
+
e.showClose ? (f(), m("div", Ot, [
|
|
683
|
+
D(s.$slots, "close"),
|
|
684
|
+
s.$slots.close ? R("", !0) : (f(), L(N, {
|
|
627
685
|
key: 0,
|
|
628
686
|
name: "close",
|
|
629
687
|
size: "14",
|
|
630
|
-
onClick:
|
|
688
|
+
onClick: V(l, ["stop"])
|
|
631
689
|
}, null, 8, ["onClick"]))
|
|
632
690
|
])) : R("", !0)
|
|
633
691
|
], 2));
|
|
634
692
|
}
|
|
635
|
-
}),
|
|
693
|
+
}), Vt = { class: "switch-container" }, Ht = ["id", "checked"], St = /* @__PURE__ */ v("span", { class: "slider round" }, null, -1), Yt = ["id", "for"], Wt = {
|
|
636
694
|
key: 0,
|
|
637
695
|
class: "switch-texts__error"
|
|
638
|
-
},
|
|
696
|
+
}, Pt = {
|
|
639
697
|
key: 1,
|
|
640
698
|
class: "switch-texts__hint"
|
|
641
|
-
},
|
|
699
|
+
}, Dn = /* @__PURE__ */ I({
|
|
642
700
|
__name: "RSwitch",
|
|
643
701
|
props: {
|
|
644
702
|
id: { default: "switch" },
|
|
@@ -658,34 +716,34 @@ const B = /* @__PURE__ */ L({
|
|
|
658
716
|
"switch--disabled": e.disabled,
|
|
659
717
|
[`switch--${e.size}`]: e.size,
|
|
660
718
|
"switch--error": e.errorMsg
|
|
661
|
-
})),
|
|
662
|
-
e.disabled || (a.checked =
|
|
719
|
+
})), l = (s) => {
|
|
720
|
+
e.disabled || (a.checked = s.target.checked, n("update:modelValue", a.checked));
|
|
663
721
|
};
|
|
664
722
|
return U(
|
|
665
723
|
() => e.modelValue,
|
|
666
|
-
(
|
|
667
|
-
a.checked =
|
|
724
|
+
(s) => {
|
|
725
|
+
a.checked = s;
|
|
668
726
|
},
|
|
669
727
|
{
|
|
670
728
|
// need immediate to set the state on first render for storybook
|
|
671
729
|
// TODO: find a better way to do this
|
|
672
730
|
immediate: !0
|
|
673
731
|
}
|
|
674
|
-
), (
|
|
732
|
+
), (s, i) => (f(), m("div", Vt, [
|
|
675
733
|
v("div", {
|
|
676
|
-
class:
|
|
734
|
+
class: x(w(o))
|
|
677
735
|
}, [
|
|
678
736
|
v("input", {
|
|
679
737
|
id: e.id,
|
|
680
738
|
checked: a.checked,
|
|
681
739
|
class: "switch__input",
|
|
682
740
|
type: "checkbox",
|
|
683
|
-
onChange:
|
|
684
|
-
}, null, 40,
|
|
685
|
-
|
|
741
|
+
onChange: l
|
|
742
|
+
}, null, 40, Ht),
|
|
743
|
+
St
|
|
686
744
|
], 2),
|
|
687
745
|
v("div", {
|
|
688
|
-
class:
|
|
746
|
+
class: x({
|
|
689
747
|
"switch-texts": !0,
|
|
690
748
|
[`switch-texts--${e.size}`]: !0
|
|
691
749
|
})
|
|
@@ -694,21 +752,21 @@ const B = /* @__PURE__ */ L({
|
|
|
694
752
|
id: e.id,
|
|
695
753
|
class: "switch-texts__label",
|
|
696
754
|
for: e.id
|
|
697
|
-
}, C(e.label), 9,
|
|
698
|
-
e.errorMsg ? (
|
|
755
|
+
}, C(e.label), 9, Yt),
|
|
756
|
+
e.errorMsg ? (f(), m("p", Wt, C(e.errorMsg), 1)) : (f(), m("p", Pt, C(e.hint), 1))
|
|
699
757
|
], 2)
|
|
700
758
|
]));
|
|
701
759
|
}
|
|
702
760
|
});
|
|
703
|
-
var
|
|
704
|
-
const
|
|
761
|
+
var se = /* @__PURE__ */ ((t) => (t.DEFAULT = "default", t.TEXT_ONLY = "text-only", t.ICON_ONLY = "icon-only", t))(se || {});
|
|
762
|
+
const Ft = ["aria-disabled", "aria-selected", "disabled"], Ut = {
|
|
705
763
|
key: 2,
|
|
706
764
|
class: "tab-item__label"
|
|
707
|
-
},
|
|
765
|
+
}, Zt = /* @__PURE__ */ I({
|
|
708
766
|
__name: "RTabItem",
|
|
709
767
|
props: {
|
|
710
768
|
id: null,
|
|
711
|
-
variant: { default:
|
|
769
|
+
variant: { default: se.DEFAULT },
|
|
712
770
|
label: { default: "" },
|
|
713
771
|
icon: { default: "" },
|
|
714
772
|
disabled: { default: !1 },
|
|
@@ -721,65 +779,65 @@ const jt = ["aria-disabled", "aria-selected", "disabled"], Et = {
|
|
|
721
779
|
"tab-item": !0,
|
|
722
780
|
[`tab-item--${e.variant}`]: !0
|
|
723
781
|
}));
|
|
724
|
-
function o(
|
|
725
|
-
n("update:modelValue",
|
|
782
|
+
function o(l) {
|
|
783
|
+
n("update:modelValue", l);
|
|
726
784
|
}
|
|
727
|
-
return (
|
|
785
|
+
return (l, s) => (f(), m("button", {
|
|
728
786
|
"aria-disabled": e.disabled,
|
|
729
787
|
"aria-selected": e.active,
|
|
730
|
-
class:
|
|
788
|
+
class: x(w(a)),
|
|
731
789
|
disabled: e.disabled,
|
|
732
|
-
onClick:
|
|
790
|
+
onClick: s[0] || (s[0] = (i) => o(e.id))
|
|
733
791
|
}, [
|
|
734
|
-
!
|
|
792
|
+
!l.$slots.icon && t.variant !== w(se).TEXT_ONLY ? (f(), L(N, {
|
|
735
793
|
key: 0,
|
|
736
794
|
class: "tab-item__icon",
|
|
737
795
|
name: e.icon,
|
|
738
796
|
size: "16"
|
|
739
|
-
}, null, 8, ["name"])) :
|
|
740
|
-
t.variant !== w(
|
|
741
|
-
], 10,
|
|
797
|
+
}, null, 8, ["name"])) : D(l.$slots, "custom-icon", { key: 1 }),
|
|
798
|
+
t.variant !== w(se).ICON_ONLY ? (f(), m("span", Ut, C(e.label), 1)) : R("", !0)
|
|
799
|
+
], 10, Ft));
|
|
742
800
|
}
|
|
743
|
-
}),
|
|
801
|
+
}), Qt = { class: "tabs-wrapper" }, Xt = { class: "tab-content" }, jn = /* @__PURE__ */ I({
|
|
744
802
|
__name: "RTabs",
|
|
745
803
|
props: {
|
|
746
804
|
tabs: { default: () => [] },
|
|
747
805
|
scrollable: { type: Boolean, default: !1 }
|
|
748
806
|
},
|
|
749
807
|
setup(t) {
|
|
750
|
-
const n = t, e =
|
|
808
|
+
const n = t, e = E(0), a = $(() => ({
|
|
751
809
|
tabs: !0,
|
|
752
810
|
"tabs--scrollable": n.scrollable
|
|
753
811
|
}));
|
|
754
|
-
return (o,
|
|
755
|
-
v("div",
|
|
812
|
+
return (o, l) => (f(), m(Q, null, [
|
|
813
|
+
v("div", Qt, [
|
|
756
814
|
v("div", {
|
|
757
|
-
class:
|
|
815
|
+
class: x(w(a))
|
|
758
816
|
}, [
|
|
759
|
-
(
|
|
760
|
-
id:
|
|
817
|
+
(f(!0), m(Q, null, q(n.tabs, (s, i) => (f(), L(Zt, {
|
|
818
|
+
id: s.id,
|
|
761
819
|
key: i,
|
|
762
820
|
modelValue: e.value,
|
|
763
|
-
"onUpdate:modelValue":
|
|
821
|
+
"onUpdate:modelValue": l[0] || (l[0] = (r) => e.value = r),
|
|
764
822
|
active: i === e.value,
|
|
765
|
-
disabled:
|
|
766
|
-
icon:
|
|
767
|
-
label:
|
|
823
|
+
disabled: s.disabled,
|
|
824
|
+
icon: s.icon,
|
|
825
|
+
label: s.label
|
|
768
826
|
}, null, 8, ["id", "modelValue", "active", "disabled", "icon", "label"]))), 128))
|
|
769
827
|
], 2)
|
|
770
828
|
]),
|
|
771
|
-
v("div",
|
|
772
|
-
|
|
829
|
+
v("div", Xt, [
|
|
830
|
+
D(o.$slots, "tab", { activeTab: e.value })
|
|
773
831
|
])
|
|
774
832
|
], 64));
|
|
775
833
|
}
|
|
776
|
-
}),
|
|
834
|
+
}), Kt = { class: "container" }, Gt = ["id", "disabled", "placeholder", "value"], Jt = {
|
|
777
835
|
key: 1,
|
|
778
836
|
class: "textarea__error"
|
|
779
|
-
},
|
|
837
|
+
}, qt = {
|
|
780
838
|
key: 2,
|
|
781
839
|
class: "textarea__hint"
|
|
782
|
-
},
|
|
840
|
+
}, En = /* @__PURE__ */ I({
|
|
783
841
|
__name: "RTextArea",
|
|
784
842
|
props: {
|
|
785
843
|
id: { default: "" },
|
|
@@ -795,19 +853,19 @@ const jt = ["aria-disabled", "aria-selected", "disabled"], Et = {
|
|
|
795
853
|
const e = t, a = G({
|
|
796
854
|
value: ""
|
|
797
855
|
});
|
|
798
|
-
function o(
|
|
799
|
-
n("update:modelValue",
|
|
856
|
+
function o(l) {
|
|
857
|
+
n("update:modelValue", l.target.value);
|
|
800
858
|
}
|
|
801
859
|
return U(
|
|
802
860
|
() => e.modelValue,
|
|
803
|
-
(
|
|
804
|
-
a.value =
|
|
861
|
+
(l) => {
|
|
862
|
+
a.value = l;
|
|
805
863
|
},
|
|
806
864
|
{
|
|
807
865
|
immediate: !0
|
|
808
866
|
}
|
|
809
|
-
), (
|
|
810
|
-
e.label ? (
|
|
867
|
+
), (l, s) => (f(), m("div", Kt, [
|
|
868
|
+
e.label ? (f(), L(Le, {
|
|
811
869
|
key: 0,
|
|
812
870
|
id: "textarea",
|
|
813
871
|
class: "textarea__label",
|
|
@@ -816,7 +874,7 @@ const jt = ["aria-disabled", "aria-selected", "disabled"], Et = {
|
|
|
816
874
|
}, null, 8, ["text"])) : R("", !0),
|
|
817
875
|
v("textarea", {
|
|
818
876
|
id: e.id,
|
|
819
|
-
class:
|
|
877
|
+
class: x(["textarea", {
|
|
820
878
|
"textarea--error": e.errorMsg,
|
|
821
879
|
"textarea--disabled": e.disabled
|
|
822
880
|
}]),
|
|
@@ -824,18 +882,18 @@ const jt = ["aria-disabled", "aria-selected", "disabled"], Et = {
|
|
|
824
882
|
placeholder: e.placeholder,
|
|
825
883
|
value: a.value,
|
|
826
884
|
onInput: o
|
|
827
|
-
}, null, 42,
|
|
828
|
-
e.errorMsg ? (
|
|
885
|
+
}, null, 42, Gt),
|
|
886
|
+
e.errorMsg ? (f(), m("p", Jt, C(e.errorMsg), 1)) : (f(), m("p", qt, C(e.hint), 1))
|
|
829
887
|
]));
|
|
830
888
|
}
|
|
831
|
-
}),
|
|
832
|
-
class: /* @__PURE__ */
|
|
889
|
+
}), en = {
|
|
890
|
+
class: /* @__PURE__ */ x({
|
|
833
891
|
textfield__wrapper: !0
|
|
834
892
|
})
|
|
835
|
-
},
|
|
893
|
+
}, tn = { class: "input-wrapper" }, nn = ["id", "disabled", "placeholder", "type", "value"], on = { class: "textfield__error" }, an = {
|
|
836
894
|
key: 0,
|
|
837
895
|
class: "textfield__hint"
|
|
838
|
-
},
|
|
896
|
+
}, On = /* @__PURE__ */ I({
|
|
839
897
|
__name: "RTextfield",
|
|
840
898
|
props: {
|
|
841
899
|
id: { default: "" },
|
|
@@ -860,102 +918,102 @@ const jt = ["aria-disabled", "aria-selected", "disabled"], Et = {
|
|
|
860
918
|
"click:clear"
|
|
861
919
|
],
|
|
862
920
|
setup(t, { emit: n }) {
|
|
863
|
-
const e = t, a =
|
|
921
|
+
const e = t, a = E(), o = G({
|
|
864
922
|
value: ""
|
|
865
|
-
}),
|
|
923
|
+
}), l = E(e.type), s = {
|
|
866
924
|
password: "lock_outline",
|
|
867
925
|
email: "mail_outline",
|
|
868
926
|
tel: "phone",
|
|
869
927
|
url: "link",
|
|
870
928
|
number: "123",
|
|
871
929
|
text: ""
|
|
872
|
-
}, i =
|
|
873
|
-
const { disabled:
|
|
930
|
+
}, i = E(!1), r = $(() => !!o.value), u = $(() => {
|
|
931
|
+
const { disabled: T, loading: z, clearable: j, errorMsg: O } = e;
|
|
874
932
|
return {
|
|
875
933
|
textfield: !0,
|
|
876
934
|
"textfield--error": O == null ? void 0 : O.length,
|
|
877
|
-
"textfield--loading":
|
|
878
|
-
"textfield--disabled":
|
|
879
|
-
"textfield--clearable":
|
|
935
|
+
"textfield--loading": z,
|
|
936
|
+
"textfield--disabled": T,
|
|
937
|
+
"textfield--clearable": j,
|
|
880
938
|
"textfield--focus": i.value,
|
|
881
939
|
"textfield--filled": r.value
|
|
882
940
|
};
|
|
883
|
-
}),
|
|
941
|
+
}), _ = $(() => ({
|
|
884
942
|
"textfield__prepend-icon": !0,
|
|
885
943
|
"textfield__prepend-icon--loading": e.loading,
|
|
886
|
-
"textfield__prepend-icon--error":
|
|
944
|
+
"textfield__prepend-icon--error": g.value && r.value
|
|
887
945
|
})), d = $(() => ({
|
|
888
946
|
"textfield__append-icon": !0,
|
|
889
947
|
"textfield__append-icon--clear": b.value,
|
|
890
|
-
"textfield__append-icon--error":
|
|
891
|
-
})), y = $(() => o.value.length > 0),
|
|
892
|
-
var
|
|
893
|
-
return (
|
|
948
|
+
"textfield__append-icon--error": g.value
|
|
949
|
+
})), y = $(() => o.value.length > 0), g = $(() => {
|
|
950
|
+
var T;
|
|
951
|
+
return (T = e.errorMsg) == null ? void 0 : T.length;
|
|
894
952
|
}), b = $(() => e.clearable && y.value), h = $(() => {
|
|
895
|
-
const { prependIcon:
|
|
896
|
-
return
|
|
953
|
+
const { prependIcon: T, type: z } = e;
|
|
954
|
+
return T || s[z];
|
|
897
955
|
}), c = $(() => {
|
|
898
|
-
const { appendIcon:
|
|
899
|
-
return
|
|
900
|
-
}),
|
|
956
|
+
const { appendIcon: T, type: z } = e;
|
|
957
|
+
return g.value ? "error_outline" : b.value && ["text", "email"].includes(z) ? "clear" : z === "password" && l.value === "password" ? "visibility" : z === "password" && l.value === "text" ? "visibility_off" : T;
|
|
958
|
+
}), p = () => {
|
|
901
959
|
i.value = !0, n("focus", {
|
|
902
960
|
value: o.value
|
|
903
961
|
});
|
|
904
|
-
},
|
|
962
|
+
}, k = () => {
|
|
905
963
|
i.value = !1, n("blur", {
|
|
906
964
|
value: o.value
|
|
907
965
|
});
|
|
908
966
|
}, M = () => {
|
|
909
|
-
var
|
|
967
|
+
var T;
|
|
910
968
|
if (b.value) {
|
|
911
|
-
o.value = "", (
|
|
969
|
+
o.value = "", (T = a.value) == null || T.focus(), n("click:clear", {
|
|
912
970
|
value: o.value
|
|
913
971
|
});
|
|
914
972
|
return;
|
|
915
973
|
}
|
|
916
974
|
n("click:icon", {
|
|
917
975
|
value: o.value
|
|
918
|
-
}),
|
|
919
|
-
},
|
|
920
|
-
|
|
921
|
-
},
|
|
922
|
-
const
|
|
923
|
-
o.value =
|
|
924
|
-
},
|
|
925
|
-
var
|
|
926
|
-
(
|
|
976
|
+
}), B();
|
|
977
|
+
}, B = () => {
|
|
978
|
+
l.value = l.value === "password" ? "text" : "password";
|
|
979
|
+
}, A = (T) => {
|
|
980
|
+
const z = T.target;
|
|
981
|
+
o.value = z.value;
|
|
982
|
+
}, W = () => {
|
|
983
|
+
var T;
|
|
984
|
+
(T = a.value) == null || T.focus();
|
|
927
985
|
};
|
|
928
986
|
return U(
|
|
929
987
|
() => e.modelValue,
|
|
930
|
-
(
|
|
931
|
-
o.value =
|
|
988
|
+
(T) => {
|
|
989
|
+
o.value = T;
|
|
932
990
|
},
|
|
933
991
|
{
|
|
934
992
|
immediate: !0
|
|
935
993
|
}
|
|
936
994
|
), U(
|
|
937
995
|
() => o.value,
|
|
938
|
-
(
|
|
939
|
-
n("update:modelValue",
|
|
996
|
+
(T) => {
|
|
997
|
+
n("update:modelValue", T);
|
|
940
998
|
}
|
|
941
|
-
), (
|
|
942
|
-
v("div",
|
|
943
|
-
|
|
999
|
+
), (T, z) => (f(), m("fieldset", null, [
|
|
1000
|
+
v("div", en, [
|
|
1001
|
+
ne(Le, {
|
|
944
1002
|
id: e.id,
|
|
945
|
-
class:
|
|
1003
|
+
class: x({
|
|
946
1004
|
textfield__label: !0
|
|
947
1005
|
}),
|
|
948
1006
|
for: e.id,
|
|
949
1007
|
text: e.label,
|
|
950
|
-
onClick:
|
|
1008
|
+
onClick: W
|
|
951
1009
|
}, null, 8, ["id", "for", "text"]),
|
|
952
|
-
v("div",
|
|
1010
|
+
v("div", tn, [
|
|
953
1011
|
v("div", {
|
|
954
|
-
class:
|
|
1012
|
+
class: x(w(u))
|
|
955
1013
|
}, [
|
|
956
|
-
w(h) ? (
|
|
1014
|
+
w(h) ? (f(), L(N, {
|
|
957
1015
|
key: 0,
|
|
958
|
-
class:
|
|
1016
|
+
class: x(w(_)),
|
|
959
1017
|
name: w(h),
|
|
960
1018
|
size: 16
|
|
961
1019
|
}, null, 8, ["class", "name"])) : R("", !0),
|
|
@@ -965,148 +1023,148 @@ const jt = ["aria-disabled", "aria-selected", "disabled"], Et = {
|
|
|
965
1023
|
id: e.id,
|
|
966
1024
|
disabled: e.disabled,
|
|
967
1025
|
placeholder: e.placeholder,
|
|
968
|
-
type:
|
|
1026
|
+
type: l.value,
|
|
969
1027
|
value: o.value,
|
|
970
|
-
onBlur:
|
|
971
|
-
onFocus:
|
|
972
|
-
onInput:
|
|
973
|
-
}, null, 40,
|
|
974
|
-
w(c) ? (
|
|
1028
|
+
onBlur: k,
|
|
1029
|
+
onFocus: p,
|
|
1030
|
+
onInput: A
|
|
1031
|
+
}, null, 40, nn),
|
|
1032
|
+
w(c) ? (f(), L(N, {
|
|
975
1033
|
key: 1,
|
|
976
|
-
class:
|
|
1034
|
+
class: x(w(d)),
|
|
977
1035
|
color: e.iconColor,
|
|
978
1036
|
name: `${w(c)}`,
|
|
979
1037
|
size: 16,
|
|
980
1038
|
onClick: M
|
|
981
1039
|
}, null, 8, ["class", "color", "name"])) : R("", !0)
|
|
982
1040
|
], 2),
|
|
983
|
-
v("div",
|
|
984
|
-
e.errorMsg ? R("", !0) : (
|
|
1041
|
+
v("div", on, C(e.errorMsg), 1),
|
|
1042
|
+
e.errorMsg ? R("", !0) : (f(), m("div", an, C(e.hint), 1))
|
|
985
1043
|
])
|
|
986
1044
|
])
|
|
987
1045
|
]));
|
|
988
1046
|
}
|
|
989
1047
|
});
|
|
990
|
-
function
|
|
1048
|
+
function oe(t) {
|
|
991
1049
|
return t.split("-")[0];
|
|
992
1050
|
}
|
|
993
1051
|
function ue(t) {
|
|
994
1052
|
return t.split("-")[1];
|
|
995
1053
|
}
|
|
996
|
-
function
|
|
997
|
-
return ["top", "bottom"].includes(
|
|
1054
|
+
function ae(t) {
|
|
1055
|
+
return ["top", "bottom"].includes(oe(t)) ? "x" : "y";
|
|
998
1056
|
}
|
|
999
1057
|
function ge(t) {
|
|
1000
1058
|
return t === "y" ? "height" : "width";
|
|
1001
1059
|
}
|
|
1002
|
-
function
|
|
1060
|
+
function xe(t, n, e) {
|
|
1003
1061
|
let { reference: a, floating: o } = t;
|
|
1004
|
-
const
|
|
1062
|
+
const l = a.x + a.width / 2 - o.width / 2, s = a.y + a.height / 2 - o.height / 2, i = ae(n), r = ge(i), u = a[r] / 2 - o[r] / 2, _ = i === "x";
|
|
1005
1063
|
let d;
|
|
1006
|
-
switch (
|
|
1064
|
+
switch (oe(n)) {
|
|
1007
1065
|
case "top":
|
|
1008
|
-
d = { x:
|
|
1066
|
+
d = { x: l, y: a.y - o.height };
|
|
1009
1067
|
break;
|
|
1010
1068
|
case "bottom":
|
|
1011
|
-
d = { x:
|
|
1069
|
+
d = { x: l, y: a.y + a.height };
|
|
1012
1070
|
break;
|
|
1013
1071
|
case "right":
|
|
1014
|
-
d = { x: a.x + a.width, y:
|
|
1072
|
+
d = { x: a.x + a.width, y: s };
|
|
1015
1073
|
break;
|
|
1016
1074
|
case "left":
|
|
1017
|
-
d = { x: a.x - o.width, y:
|
|
1075
|
+
d = { x: a.x - o.width, y: s };
|
|
1018
1076
|
break;
|
|
1019
1077
|
default:
|
|
1020
1078
|
d = { x: a.x, y: a.y };
|
|
1021
1079
|
}
|
|
1022
1080
|
switch (ue(n)) {
|
|
1023
1081
|
case "start":
|
|
1024
|
-
d[i] -= u * (e &&
|
|
1082
|
+
d[i] -= u * (e && _ ? -1 : 1);
|
|
1025
1083
|
break;
|
|
1026
1084
|
case "end":
|
|
1027
|
-
d[i] += u * (e &&
|
|
1085
|
+
d[i] += u * (e && _ ? -1 : 1);
|
|
1028
1086
|
}
|
|
1029
1087
|
return d;
|
|
1030
1088
|
}
|
|
1031
|
-
const
|
|
1032
|
-
const { placement: a = "bottom", strategy: o = "absolute", middleware:
|
|
1033
|
-
let u = await
|
|
1089
|
+
const ln = async (t, n, e) => {
|
|
1090
|
+
const { placement: a = "bottom", strategy: o = "absolute", middleware: l = [], platform: s } = e, i = l.filter(Boolean), r = await (s.isRTL == null ? void 0 : s.isRTL(n));
|
|
1091
|
+
let u = await s.getElementRects({ reference: t, floating: n, strategy: o }), { x: _, y: d } = xe(u, a, r), y = a, g = {}, b = 0;
|
|
1034
1092
|
for (let h = 0; h < i.length; h++) {
|
|
1035
|
-
const { name: c, fn:
|
|
1036
|
-
|
|
1093
|
+
const { name: c, fn: p } = i[h], { x: k, y: M, data: B, reset: A } = await p({ x: _, y: d, initialPlacement: a, placement: y, strategy: o, middlewareData: g, rects: u, platform: s, elements: { reference: t, floating: n } });
|
|
1094
|
+
_ = k ?? _, d = M ?? d, g = { ...g, [c]: { ...g[c], ...B } }, A && b <= 50 && (b++, typeof A == "object" && (A.placement && (y = A.placement), A.rects && (u = A.rects === !0 ? await s.getElementRects({ reference: t, floating: n, strategy: o }) : A.rects), { x: _, y: d } = xe(u, y, r)), h = -1);
|
|
1037
1095
|
}
|
|
1038
|
-
return { x:
|
|
1096
|
+
return { x: _, y: d, placement: y, strategy: o, middlewareData: g };
|
|
1039
1097
|
};
|
|
1040
|
-
function
|
|
1098
|
+
function Ne(t) {
|
|
1041
1099
|
return typeof t != "number" ? function(n) {
|
|
1042
1100
|
return { top: 0, right: 0, bottom: 0, left: 0, ...n };
|
|
1043
1101
|
}(t) : { top: t, right: t, bottom: t, left: t };
|
|
1044
1102
|
}
|
|
1045
|
-
function
|
|
1103
|
+
function ie(t) {
|
|
1046
1104
|
return { ...t, top: t.y, left: t.x, right: t.x + t.width, bottom: t.y + t.height };
|
|
1047
1105
|
}
|
|
1048
|
-
async function
|
|
1106
|
+
async function re(t, n) {
|
|
1049
1107
|
var e;
|
|
1050
1108
|
n === void 0 && (n = {});
|
|
1051
|
-
const { x: a, y: o, platform:
|
|
1052
|
-
return { top: c.top -
|
|
1109
|
+
const { x: a, y: o, platform: l, rects: s, elements: i, strategy: r } = t, { boundary: u = "clippingAncestors", rootBoundary: _ = "viewport", elementContext: d = "floating", altBoundary: y = !1, padding: g = 0 } = n, b = Ne(g), h = i[y ? d === "floating" ? "reference" : "floating" : d], c = ie(await l.getClippingRect({ element: (e = await (l.isElement == null ? void 0 : l.isElement(h))) == null || e ? h : h.contextElement || await (l.getDocumentElement == null ? void 0 : l.getDocumentElement(i.floating)), boundary: u, rootBoundary: _, strategy: r })), p = ie(l.convertOffsetParentRelativeRectToViewportRelativeRect ? await l.convertOffsetParentRelativeRectToViewportRelativeRect({ rect: d === "floating" ? { ...s.floating, x: a, y: o } : s.reference, offsetParent: await (l.getOffsetParent == null ? void 0 : l.getOffsetParent(i.floating)), strategy: r }) : s[d]);
|
|
1110
|
+
return { top: c.top - p.top + b.top, bottom: p.bottom - c.bottom + b.bottom, left: c.left - p.left + b.left, right: p.right - c.right + b.right };
|
|
1053
1111
|
}
|
|
1054
|
-
const
|
|
1112
|
+
const sn = Math.min, rn = Math.max;
|
|
1055
1113
|
function me(t, n, e) {
|
|
1056
|
-
return
|
|
1114
|
+
return rn(t, sn(n, e));
|
|
1057
1115
|
}
|
|
1058
|
-
const
|
|
1059
|
-
const { element: e, padding: a = 0 } = t ?? {}, { x: o, y:
|
|
1116
|
+
const cn = (t) => ({ name: "arrow", options: t, async fn(n) {
|
|
1117
|
+
const { element: e, padding: a = 0 } = t ?? {}, { x: o, y: l, placement: s, rects: i, platform: r } = n;
|
|
1060
1118
|
if (e == null)
|
|
1061
1119
|
return {};
|
|
1062
|
-
const u =
|
|
1063
|
-
let
|
|
1064
|
-
|
|
1065
|
-
const
|
|
1066
|
-
return { [d]:
|
|
1067
|
-
} }),
|
|
1068
|
-
function
|
|
1069
|
-
return t.replace(/left|right|bottom|top/g, (n) =>
|
|
1120
|
+
const u = Ne(a), _ = { x: o, y: l }, d = ae(s), y = ue(s), g = ge(d), b = await r.getDimensions(e), h = d === "y" ? "top" : "left", c = d === "y" ? "bottom" : "right", p = i.reference[g] + i.reference[d] - _[d] - i.floating[g], k = _[d] - i.reference[d], M = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(e));
|
|
1121
|
+
let B = M ? d === "y" ? M.clientHeight || 0 : M.clientWidth || 0 : 0;
|
|
1122
|
+
B === 0 && (B = i.floating[g]);
|
|
1123
|
+
const A = p / 2 - k / 2, W = u[h], T = B - b[g] - u[c], z = B / 2 - b[g] / 2 + A, j = me(W, z, T), O = (y === "start" ? u[h] : u[c]) > 0 && z !== j && i.reference[g] <= i.floating[g];
|
|
1124
|
+
return { [d]: _[d] - (O ? z < W ? W - z : T - z : 0), data: { [d]: j, centerOffset: z - j } };
|
|
1125
|
+
} }), dn = { left: "right", right: "left", bottom: "top", top: "bottom" };
|
|
1126
|
+
function ce(t) {
|
|
1127
|
+
return t.replace(/left|right|bottom|top/g, (n) => dn[n]);
|
|
1070
1128
|
}
|
|
1071
|
-
function
|
|
1129
|
+
function un(t, n, e) {
|
|
1072
1130
|
e === void 0 && (e = !1);
|
|
1073
|
-
const a = ue(t), o =
|
|
1074
|
-
let
|
|
1075
|
-
return n.reference[
|
|
1131
|
+
const a = ue(t), o = ae(t), l = ge(o);
|
|
1132
|
+
let s = o === "x" ? a === (e ? "end" : "start") ? "right" : "left" : a === "start" ? "bottom" : "top";
|
|
1133
|
+
return n.reference[l] > n.floating[l] && (s = ce(s)), { main: s, cross: ce(s) };
|
|
1076
1134
|
}
|
|
1077
|
-
const
|
|
1135
|
+
const fn = { start: "end", end: "start" };
|
|
1078
1136
|
function we(t) {
|
|
1079
|
-
return t.replace(/start|end/g, (n) =>
|
|
1137
|
+
return t.replace(/start|end/g, (n) => fn[n]);
|
|
1080
1138
|
}
|
|
1081
|
-
const
|
|
1082
|
-
|
|
1083
|
-
const
|
|
1139
|
+
const Be = ["top", "right", "bottom", "left"];
|
|
1140
|
+
Be.reduce((t, n) => t.concat(n, n + "-start", n + "-end"), []);
|
|
1141
|
+
const pn = function(t) {
|
|
1084
1142
|
return t === void 0 && (t = {}), { name: "flip", options: t, async fn(n) {
|
|
1085
1143
|
var e;
|
|
1086
|
-
const { placement: a, middlewareData: o, rects:
|
|
1087
|
-
const
|
|
1088
|
-
return [we(
|
|
1089
|
-
}(
|
|
1090
|
-
let
|
|
1091
|
-
if (u && M.push(
|
|
1092
|
-
const { main:
|
|
1093
|
-
M.push(
|
|
1144
|
+
const { placement: a, middlewareData: o, rects: l, initialPlacement: s, platform: i, elements: r } = n, { mainAxis: u = !0, crossAxis: _ = !0, fallbackPlacements: d, fallbackStrategy: y = "bestFit", flipAlignment: g = !0, ...b } = t, h = oe(a), c = d || (h === s || !g ? [ce(s)] : function(z) {
|
|
1145
|
+
const j = ce(z);
|
|
1146
|
+
return [we(z), j, we(j)];
|
|
1147
|
+
}(s)), p = [s, ...c], k = await re(n, b), M = [];
|
|
1148
|
+
let B = ((e = o.flip) == null ? void 0 : e.overflows) || [];
|
|
1149
|
+
if (u && M.push(k[h]), _) {
|
|
1150
|
+
const { main: z, cross: j } = un(a, l, await (i.isRTL == null ? void 0 : i.isRTL(r.floating)));
|
|
1151
|
+
M.push(k[z], k[j]);
|
|
1094
1152
|
}
|
|
1095
|
-
if (
|
|
1096
|
-
var
|
|
1097
|
-
const
|
|
1098
|
-
if (
|
|
1099
|
-
return { data: { index:
|
|
1153
|
+
if (B = [...B, { placement: a, overflows: M }], !M.every((z) => z <= 0)) {
|
|
1154
|
+
var A, W;
|
|
1155
|
+
const z = ((A = (W = o.flip) == null ? void 0 : W.index) != null ? A : 0) + 1, j = p[z];
|
|
1156
|
+
if (j)
|
|
1157
|
+
return { data: { index: z, overflows: B }, reset: { placement: j } };
|
|
1100
1158
|
let O = "bottom";
|
|
1101
1159
|
switch (y) {
|
|
1102
1160
|
case "bestFit": {
|
|
1103
|
-
var
|
|
1104
|
-
const be = (
|
|
1161
|
+
var T;
|
|
1162
|
+
const be = (T = B.map((le) => [le, le.overflows.filter((J) => J > 0).reduce((J, Ye) => J + Ye, 0)]).sort((le, J) => le[1] - J[1])[0]) == null ? void 0 : T[0].placement;
|
|
1105
1163
|
be && (O = be);
|
|
1106
1164
|
break;
|
|
1107
1165
|
}
|
|
1108
1166
|
case "initialPlacement":
|
|
1109
|
-
O =
|
|
1167
|
+
O = s;
|
|
1110
1168
|
}
|
|
1111
1169
|
if (a !== O)
|
|
1112
1170
|
return { reset: { placement: O } };
|
|
@@ -1118,160 +1176,160 @@ function $e(t, n) {
|
|
|
1118
1176
|
return { top: t.top - n.height, right: t.right - n.width, bottom: t.bottom - n.height, left: t.left - n.width };
|
|
1119
1177
|
}
|
|
1120
1178
|
function Me(t) {
|
|
1121
|
-
return
|
|
1179
|
+
return Be.some((n) => t[n] >= 0);
|
|
1122
1180
|
}
|
|
1123
|
-
const
|
|
1181
|
+
const hn = function(t) {
|
|
1124
1182
|
let { strategy: n = "referenceHidden", ...e } = t === void 0 ? {} : t;
|
|
1125
1183
|
return { name: "hide", async fn(a) {
|
|
1126
1184
|
const { rects: o } = a;
|
|
1127
1185
|
switch (n) {
|
|
1128
1186
|
case "referenceHidden": {
|
|
1129
|
-
const
|
|
1130
|
-
return { data: { referenceHiddenOffsets:
|
|
1187
|
+
const l = $e(await re(a, { ...e, elementContext: "reference" }), o.reference);
|
|
1188
|
+
return { data: { referenceHiddenOffsets: l, referenceHidden: Me(l) } };
|
|
1131
1189
|
}
|
|
1132
1190
|
case "escaped": {
|
|
1133
|
-
const
|
|
1134
|
-
return { data: { escapedOffsets:
|
|
1191
|
+
const l = $e(await re(a, { ...e, altBoundary: !0 }), o.floating);
|
|
1192
|
+
return { data: { escapedOffsets: l, escaped: Me(l) } };
|
|
1135
1193
|
}
|
|
1136
1194
|
default:
|
|
1137
1195
|
return {};
|
|
1138
1196
|
}
|
|
1139
1197
|
} };
|
|
1140
|
-
},
|
|
1198
|
+
}, mn = function(t) {
|
|
1141
1199
|
return t === void 0 && (t = 0), { name: "offset", options: t, async fn(n) {
|
|
1142
|
-
const { x: e, y: a } = n, o = await async function(
|
|
1143
|
-
const { placement: i, platform: r, elements: u } =
|
|
1144
|
-
let { mainAxis:
|
|
1145
|
-
return y && typeof M == "number" && (
|
|
1200
|
+
const { x: e, y: a } = n, o = await async function(l, s) {
|
|
1201
|
+
const { placement: i, platform: r, elements: u } = l, _ = await (r.isRTL == null ? void 0 : r.isRTL(u.floating)), d = oe(i), y = ue(i), g = ae(i) === "x", b = ["left", "top"].includes(d) ? -1 : 1, h = _ && g ? -1 : 1, c = typeof s == "function" ? s(l) : s;
|
|
1202
|
+
let { mainAxis: p, crossAxis: k, alignmentAxis: M } = typeof c == "number" ? { mainAxis: c, crossAxis: 0, alignmentAxis: null } : { mainAxis: 0, crossAxis: 0, alignmentAxis: null, ...c };
|
|
1203
|
+
return y && typeof M == "number" && (k = y === "end" ? -1 * M : M), g ? { x: k * h, y: p * b } : { x: p * b, y: k * h };
|
|
1146
1204
|
}(n, t);
|
|
1147
1205
|
return { x: e + o.x, y: a + o.y, data: o };
|
|
1148
1206
|
} };
|
|
1149
1207
|
};
|
|
1150
|
-
function
|
|
1208
|
+
function _n(t) {
|
|
1151
1209
|
return t === "x" ? "y" : "x";
|
|
1152
1210
|
}
|
|
1153
|
-
const
|
|
1211
|
+
const gn = function(t) {
|
|
1154
1212
|
return t === void 0 && (t = {}), { name: "shift", options: t, async fn(n) {
|
|
1155
|
-
const { x: e, y: a, placement: o } = n, { mainAxis:
|
|
1156
|
-
let { x:
|
|
1157
|
-
return { x:
|
|
1158
|
-
} }, ...r } = t, u = { x: e, y: a },
|
|
1159
|
-
let
|
|
1160
|
-
if (
|
|
1213
|
+
const { x: e, y: a, placement: o } = n, { mainAxis: l = !0, crossAxis: s = !1, limiter: i = { fn: (c) => {
|
|
1214
|
+
let { x: p, y: k } = c;
|
|
1215
|
+
return { x: p, y: k };
|
|
1216
|
+
} }, ...r } = t, u = { x: e, y: a }, _ = await re(n, r), d = ae(oe(o)), y = _n(d);
|
|
1217
|
+
let g = u[d], b = u[y];
|
|
1218
|
+
if (l) {
|
|
1161
1219
|
const c = d === "y" ? "bottom" : "right";
|
|
1162
|
-
|
|
1220
|
+
g = me(g + _[d === "y" ? "top" : "left"], g, g - _[c]);
|
|
1163
1221
|
}
|
|
1164
|
-
if (
|
|
1222
|
+
if (s) {
|
|
1165
1223
|
const c = y === "y" ? "bottom" : "right";
|
|
1166
|
-
b = me(b +
|
|
1224
|
+
b = me(b + _[y === "y" ? "top" : "left"], b, b - _[c]);
|
|
1167
1225
|
}
|
|
1168
|
-
const h = i.fn({ ...n, [d]:
|
|
1226
|
+
const h = i.fn({ ...n, [d]: g, [y]: b });
|
|
1169
1227
|
return { ...h, data: { x: h.x - e, y: h.y - a } };
|
|
1170
1228
|
} };
|
|
1171
1229
|
};
|
|
1172
|
-
function
|
|
1230
|
+
function De(t) {
|
|
1173
1231
|
return t && t.document && t.location && t.alert && t.setInterval;
|
|
1174
1232
|
}
|
|
1175
|
-
function
|
|
1233
|
+
function Y(t) {
|
|
1176
1234
|
if (t == null)
|
|
1177
1235
|
return window;
|
|
1178
|
-
if (!
|
|
1236
|
+
if (!De(t)) {
|
|
1179
1237
|
const n = t.ownerDocument;
|
|
1180
1238
|
return n && n.defaultView || window;
|
|
1181
1239
|
}
|
|
1182
1240
|
return t;
|
|
1183
1241
|
}
|
|
1184
|
-
function
|
|
1185
|
-
return
|
|
1242
|
+
function H(t) {
|
|
1243
|
+
return Y(t).getComputedStyle(t);
|
|
1186
1244
|
}
|
|
1187
1245
|
function Z(t) {
|
|
1188
|
-
return
|
|
1246
|
+
return De(t) ? "" : t ? (t.nodeName || "").toLowerCase() : "";
|
|
1189
1247
|
}
|
|
1190
|
-
function
|
|
1248
|
+
function je() {
|
|
1191
1249
|
const t = navigator.userAgentData;
|
|
1192
1250
|
return t && Array.isArray(t.brands) ? t.brands.map((n) => n.brand + "/" + n.version).join(" ") : navigator.userAgent;
|
|
1193
1251
|
}
|
|
1194
|
-
function
|
|
1195
|
-
return t instanceof
|
|
1252
|
+
function S(t) {
|
|
1253
|
+
return t instanceof Y(t).HTMLElement;
|
|
1196
1254
|
}
|
|
1197
1255
|
function K(t) {
|
|
1198
|
-
return t instanceof
|
|
1256
|
+
return t instanceof Y(t).Element;
|
|
1199
1257
|
}
|
|
1200
|
-
function
|
|
1201
|
-
return typeof ShadowRoot > "u" ? !1 : t instanceof
|
|
1258
|
+
function Te(t) {
|
|
1259
|
+
return typeof ShadowRoot > "u" ? !1 : t instanceof Y(t).ShadowRoot || t instanceof ShadowRoot;
|
|
1202
1260
|
}
|
|
1203
1261
|
function fe(t) {
|
|
1204
|
-
const { overflow: n, overflowX: e, overflowY: a, display: o } =
|
|
1262
|
+
const { overflow: n, overflowX: e, overflowY: a, display: o } = H(t);
|
|
1205
1263
|
return /auto|scroll|overlay|hidden/.test(n + a + e) && !["inline", "contents"].includes(o);
|
|
1206
1264
|
}
|
|
1207
|
-
function
|
|
1265
|
+
function vn(t) {
|
|
1208
1266
|
return ["table", "td", "th"].includes(Z(t));
|
|
1209
1267
|
}
|
|
1210
1268
|
function _e(t) {
|
|
1211
|
-
const n = /firefox/i.test(
|
|
1269
|
+
const n = /firefox/i.test(je()), e = H(t), a = e.backdropFilter || e.WebkitBackdropFilter;
|
|
1212
1270
|
return e.transform !== "none" || e.perspective !== "none" || !!a && a !== "none" || n && e.willChange === "filter" || n && !!e.filter && e.filter !== "none" || ["transform", "perspective"].some((o) => e.willChange.includes(o)) || ["paint", "layout", "strict", "content"].some((o) => {
|
|
1213
|
-
const
|
|
1214
|
-
return
|
|
1271
|
+
const l = e.contain;
|
|
1272
|
+
return l != null && l.includes(o);
|
|
1215
1273
|
});
|
|
1216
1274
|
}
|
|
1217
|
-
function
|
|
1218
|
-
return !/^((?!chrome|android).)*safari/i.test(
|
|
1275
|
+
function Ee() {
|
|
1276
|
+
return !/^((?!chrome|android).)*safari/i.test(je());
|
|
1219
1277
|
}
|
|
1220
1278
|
function ve(t) {
|
|
1221
1279
|
return ["html", "body", "#document"].includes(Z(t));
|
|
1222
1280
|
}
|
|
1223
|
-
const
|
|
1281
|
+
const ze = Math.min, ee = Math.max, de = Math.round;
|
|
1224
1282
|
function X(t, n, e) {
|
|
1225
|
-
var a, o,
|
|
1283
|
+
var a, o, l, s;
|
|
1226
1284
|
n === void 0 && (n = !1), e === void 0 && (e = !1);
|
|
1227
1285
|
const i = t.getBoundingClientRect();
|
|
1228
1286
|
let r = 1, u = 1;
|
|
1229
|
-
n &&
|
|
1230
|
-
const
|
|
1231
|
-
return { width: b, height: h, top:
|
|
1287
|
+
n && S(t) && (r = t.offsetWidth > 0 && de(i.width) / t.offsetWidth || 1, u = t.offsetHeight > 0 && de(i.height) / t.offsetHeight || 1);
|
|
1288
|
+
const _ = K(t) ? Y(t) : window, d = !Ee() && e, y = (i.left + (d && (a = (o = _.visualViewport) == null ? void 0 : o.offsetLeft) != null ? a : 0)) / r, g = (i.top + (d && (l = (s = _.visualViewport) == null ? void 0 : s.offsetTop) != null ? l : 0)) / u, b = i.width / r, h = i.height / u;
|
|
1289
|
+
return { width: b, height: h, top: g, right: y + b, bottom: g + h, left: y, x: y, y: g };
|
|
1232
1290
|
}
|
|
1233
1291
|
function F(t) {
|
|
1234
|
-
return (n = t, (n instanceof
|
|
1292
|
+
return (n = t, (n instanceof Y(n).Node ? t.ownerDocument : t.document) || window.document).documentElement;
|
|
1235
1293
|
var n;
|
|
1236
1294
|
}
|
|
1237
1295
|
function pe(t) {
|
|
1238
1296
|
return K(t) ? { scrollLeft: t.scrollLeft, scrollTop: t.scrollTop } : { scrollLeft: t.pageXOffset, scrollTop: t.pageYOffset };
|
|
1239
1297
|
}
|
|
1240
|
-
function
|
|
1298
|
+
function Oe(t) {
|
|
1241
1299
|
return X(F(t)).left + pe(t).scrollLeft;
|
|
1242
1300
|
}
|
|
1243
|
-
function
|
|
1244
|
-
const a =
|
|
1301
|
+
function bn(t, n, e) {
|
|
1302
|
+
const a = S(n), o = F(n), l = X(t, a && function(r) {
|
|
1245
1303
|
const u = X(r);
|
|
1246
|
-
return
|
|
1304
|
+
return de(u.width) !== r.offsetWidth || de(u.height) !== r.offsetHeight;
|
|
1247
1305
|
}(n), e === "fixed");
|
|
1248
|
-
let
|
|
1306
|
+
let s = { scrollLeft: 0, scrollTop: 0 };
|
|
1249
1307
|
const i = { x: 0, y: 0 };
|
|
1250
1308
|
if (a || !a && e !== "fixed")
|
|
1251
|
-
if ((Z(n) !== "body" || fe(o)) && (
|
|
1309
|
+
if ((Z(n) !== "body" || fe(o)) && (s = pe(n)), S(n)) {
|
|
1252
1310
|
const r = X(n, !0);
|
|
1253
1311
|
i.x = r.x + n.clientLeft, i.y = r.y + n.clientTop;
|
|
1254
1312
|
} else
|
|
1255
|
-
o && (i.x =
|
|
1256
|
-
return { x:
|
|
1313
|
+
o && (i.x = Oe(o));
|
|
1314
|
+
return { x: l.left + s.scrollLeft - i.x, y: l.top + s.scrollTop - i.y, width: l.width, height: l.height };
|
|
1257
1315
|
}
|
|
1258
1316
|
function te(t) {
|
|
1259
1317
|
if (Z(t) === "html")
|
|
1260
1318
|
return t;
|
|
1261
|
-
const n = t.assignedSlot || t.parentNode || (
|
|
1262
|
-
return
|
|
1319
|
+
const n = t.assignedSlot || t.parentNode || (Te(t) ? t.host : null) || F(t);
|
|
1320
|
+
return Te(n) ? n.host : n;
|
|
1263
1321
|
}
|
|
1264
1322
|
function Ce(t) {
|
|
1265
|
-
return
|
|
1323
|
+
return S(t) && H(t).position !== "fixed" ? t.offsetParent : null;
|
|
1266
1324
|
}
|
|
1267
1325
|
function Re(t) {
|
|
1268
|
-
const n =
|
|
1326
|
+
const n = Y(t);
|
|
1269
1327
|
let e = Ce(t);
|
|
1270
|
-
for (; e &&
|
|
1328
|
+
for (; e && vn(e) && H(e).position === "static"; )
|
|
1271
1329
|
e = Ce(e);
|
|
1272
|
-
return e && (Z(e) === "html" || Z(e) === "body" &&
|
|
1330
|
+
return e && (Z(e) === "html" || Z(e) === "body" && H(e).position === "static" && !_e(e)) ? n : e || function(a) {
|
|
1273
1331
|
let o = te(a);
|
|
1274
|
-
for (;
|
|
1332
|
+
for (; S(o) && !ve(o); ) {
|
|
1275
1333
|
if (_e(o))
|
|
1276
1334
|
return o;
|
|
1277
1335
|
o = te(o);
|
|
@@ -1279,91 +1337,91 @@ function Re(t) {
|
|
|
1279
1337
|
return null;
|
|
1280
1338
|
}(t) || n;
|
|
1281
1339
|
}
|
|
1282
|
-
function
|
|
1340
|
+
function Ve(t) {
|
|
1283
1341
|
const n = te(t);
|
|
1284
|
-
return ve(n) ? t.ownerDocument.body :
|
|
1342
|
+
return ve(n) ? t.ownerDocument.body : S(n) && fe(n) ? n : Ve(n);
|
|
1285
1343
|
}
|
|
1286
|
-
function
|
|
1344
|
+
function He(t, n) {
|
|
1287
1345
|
var e;
|
|
1288
1346
|
n === void 0 && (n = []);
|
|
1289
|
-
const a =
|
|
1290
|
-
return o ? i : i.concat(
|
|
1347
|
+
const a = Ve(t), o = a === ((e = t.ownerDocument) == null ? void 0 : e.body), l = Y(a), s = o ? [l].concat(l.visualViewport || [], fe(a) ? a : []) : a, i = n.concat(s);
|
|
1348
|
+
return o ? i : i.concat(He(s));
|
|
1291
1349
|
}
|
|
1292
1350
|
function Ie(t, n, e) {
|
|
1293
|
-
return n === "viewport" ?
|
|
1294
|
-
const
|
|
1295
|
-
let r =
|
|
1351
|
+
return n === "viewport" ? ie(function(a, o) {
|
|
1352
|
+
const l = Y(a), s = F(a), i = l.visualViewport;
|
|
1353
|
+
let r = s.clientWidth, u = s.clientHeight, _ = 0, d = 0;
|
|
1296
1354
|
if (i) {
|
|
1297
1355
|
r = i.width, u = i.height;
|
|
1298
|
-
const y =
|
|
1299
|
-
(y || !y && o === "fixed") && (
|
|
1356
|
+
const y = Ee();
|
|
1357
|
+
(y || !y && o === "fixed") && (_ = i.offsetLeft, d = i.offsetTop);
|
|
1300
1358
|
}
|
|
1301
|
-
return { width: r, height: u, x:
|
|
1359
|
+
return { width: r, height: u, x: _, y: d };
|
|
1302
1360
|
}(t, e)) : K(n) ? function(a, o) {
|
|
1303
|
-
const
|
|
1304
|
-
return { top:
|
|
1305
|
-
}(n, e) :
|
|
1361
|
+
const l = X(a, !1, o === "fixed"), s = l.top + a.clientTop, i = l.left + a.clientLeft;
|
|
1362
|
+
return { top: s, left: i, x: i, y: s, right: i + a.clientWidth, bottom: s + a.clientHeight, width: a.clientWidth, height: a.clientHeight };
|
|
1363
|
+
}(n, e) : ie(function(a) {
|
|
1306
1364
|
var o;
|
|
1307
|
-
const
|
|
1308
|
-
let
|
|
1309
|
-
const d = -
|
|
1310
|
-
return
|
|
1365
|
+
const l = F(a), s = pe(a), i = (o = a.ownerDocument) == null ? void 0 : o.body, r = ee(l.scrollWidth, l.clientWidth, i ? i.scrollWidth : 0, i ? i.clientWidth : 0), u = ee(l.scrollHeight, l.clientHeight, i ? i.scrollHeight : 0, i ? i.clientHeight : 0);
|
|
1366
|
+
let _ = -s.scrollLeft + Oe(a);
|
|
1367
|
+
const d = -s.scrollTop;
|
|
1368
|
+
return H(i || l).direction === "rtl" && (_ += ee(l.clientWidth, i ? i.clientWidth : 0) - r), { width: r, height: u, x: _, y: d };
|
|
1311
1369
|
}(F(t)));
|
|
1312
1370
|
}
|
|
1313
|
-
const
|
|
1371
|
+
const yn = { getClippingRect: function(t) {
|
|
1314
1372
|
let { element: n, boundary: e, rootBoundary: a, strategy: o } = t;
|
|
1315
|
-
const
|
|
1316
|
-
let
|
|
1317
|
-
const y =
|
|
1318
|
-
let
|
|
1319
|
-
for (; K(
|
|
1320
|
-
const b =
|
|
1321
|
-
(y ? h || d : h || b.position !== "static" || !d || !["absolute", "fixed"].includes(d.position)) ? d = b :
|
|
1373
|
+
const l = e === "clippingAncestors" ? function(u) {
|
|
1374
|
+
let _ = He(u).filter((b) => K(b) && Z(b) !== "body"), d = null;
|
|
1375
|
+
const y = H(u).position === "fixed";
|
|
1376
|
+
let g = y ? te(u) : u;
|
|
1377
|
+
for (; K(g) && !ve(g); ) {
|
|
1378
|
+
const b = H(g), h = _e(g);
|
|
1379
|
+
(y ? h || d : h || b.position !== "static" || !d || !["absolute", "fixed"].includes(d.position)) ? d = b : _ = _.filter((c) => c !== g), g = te(g);
|
|
1322
1380
|
}
|
|
1323
|
-
return
|
|
1324
|
-
}(n) : [].concat(e),
|
|
1325
|
-
const d = Ie(n,
|
|
1326
|
-
return u.top = ee(d.top, u.top), u.right =
|
|
1381
|
+
return _;
|
|
1382
|
+
}(n) : [].concat(e), s = [...l, a], i = s[0], r = s.reduce((u, _) => {
|
|
1383
|
+
const d = Ie(n, _, o);
|
|
1384
|
+
return u.top = ee(d.top, u.top), u.right = ze(d.right, u.right), u.bottom = ze(d.bottom, u.bottom), u.left = ee(d.left, u.left), u;
|
|
1327
1385
|
}, Ie(n, i, o));
|
|
1328
1386
|
return { width: r.right - r.left, height: r.bottom - r.top, x: r.left, y: r.top };
|
|
1329
1387
|
}, convertOffsetParentRelativeRectToViewportRelativeRect: function(t) {
|
|
1330
1388
|
let { rect: n, offsetParent: e, strategy: a } = t;
|
|
1331
|
-
const o =
|
|
1332
|
-
if (e ===
|
|
1389
|
+
const o = S(e), l = F(e);
|
|
1390
|
+
if (e === l)
|
|
1333
1391
|
return n;
|
|
1334
|
-
let
|
|
1392
|
+
let s = { scrollLeft: 0, scrollTop: 0 };
|
|
1335
1393
|
const i = { x: 0, y: 0 };
|
|
1336
|
-
if ((o || !o && a !== "fixed") && ((Z(e) !== "body" || fe(
|
|
1394
|
+
if ((o || !o && a !== "fixed") && ((Z(e) !== "body" || fe(l)) && (s = pe(e)), S(e))) {
|
|
1337
1395
|
const r = X(e, !0);
|
|
1338
1396
|
i.x = r.x + e.clientLeft, i.y = r.y + e.clientTop;
|
|
1339
1397
|
}
|
|
1340
|
-
return { ...n, x: n.x -
|
|
1398
|
+
return { ...n, x: n.x - s.scrollLeft + i.x, y: n.y - s.scrollTop + i.y };
|
|
1341
1399
|
}, isElement: K, getDimensions: function(t) {
|
|
1342
|
-
if (
|
|
1400
|
+
if (S(t))
|
|
1343
1401
|
return { width: t.offsetWidth, height: t.offsetHeight };
|
|
1344
1402
|
const n = X(t);
|
|
1345
1403
|
return { width: n.width, height: n.height };
|
|
1346
1404
|
}, getOffsetParent: Re, getDocumentElement: F, async getElementRects(t) {
|
|
1347
1405
|
let { reference: n, floating: e, strategy: a } = t;
|
|
1348
|
-
const o = this.getOffsetParent || Re,
|
|
1349
|
-
return { reference:
|
|
1350
|
-
}, getClientRects: (t) => Array.from(t.getClientRects()), isRTL: (t) =>
|
|
1351
|
-
function he({ value: t }, { value: n }, { value: e }, a, o,
|
|
1352
|
-
!t || !n ||
|
|
1406
|
+
const o = this.getOffsetParent || Re, l = this.getDimensions;
|
|
1407
|
+
return { reference: bn(n, await o(e), a), floating: { x: 0, y: 0, ...await l(e) } };
|
|
1408
|
+
}, getClientRects: (t) => Array.from(t.getClientRects()), isRTL: (t) => H(t).direction === "rtl" }, kn = (t, n, e) => ln(t, n, { platform: yn, ...e });
|
|
1409
|
+
function he({ value: t }, { value: n }, { value: e }, a, o, l) {
|
|
1410
|
+
!t || !n || kn(t, n, {
|
|
1353
1411
|
placement: a,
|
|
1354
1412
|
middleware: [
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1413
|
+
mn(o),
|
|
1414
|
+
gn({ padding: l }),
|
|
1415
|
+
cn({ element: e }),
|
|
1416
|
+
pn(),
|
|
1417
|
+
hn()
|
|
1360
1418
|
]
|
|
1361
|
-
}).then(({ x:
|
|
1419
|
+
}).then(({ x: s, y: i, placement: r, middlewareData: u }) => {
|
|
1362
1420
|
if (Object.assign(n.style, {
|
|
1363
|
-
left: `${
|
|
1421
|
+
left: `${s}px`,
|
|
1364
1422
|
top: `${i}px`
|
|
1365
1423
|
}), e && u.arrow) {
|
|
1366
|
-
const { x:
|
|
1424
|
+
const { x: _, y: d } = u.arrow, y = {
|
|
1367
1425
|
top: "bottom",
|
|
1368
1426
|
right: "left",
|
|
1369
1427
|
bottom: "top",
|
|
@@ -1371,7 +1429,7 @@ function he({ value: t }, { value: n }, { value: e }, a, o, s) {
|
|
|
1371
1429
|
/* Right */
|
|
1372
1430
|
}[r.split("-")[0]];
|
|
1373
1431
|
Object.assign(e.style, {
|
|
1374
|
-
left:
|
|
1432
|
+
left: s != null ? `${_}px` : "",
|
|
1375
1433
|
top: i != null ? `${d}px` : "",
|
|
1376
1434
|
right: "",
|
|
1377
1435
|
bottom: "",
|
|
@@ -1380,15 +1438,15 @@ function he({ value: t }, { value: n }, { value: e }, a, o, s) {
|
|
|
1380
1438
|
}
|
|
1381
1439
|
});
|
|
1382
1440
|
}
|
|
1383
|
-
var
|
|
1384
|
-
const
|
|
1441
|
+
var Se = /* @__PURE__ */ ((t) => (t.Top = "top", t.Bottom = "bottom", t.Left = "left", t.Right = "right", t.TopStart = "top-start", t.TopEnd = "top-end", t.RightStart = "right-start", t.RightEnd = "right-end", t.BottomStart = "bottom-start", t.BottomEnd = "bottom-end", t.LeftStart = "left-start", t.LeftEnd = "left-end", t))(Se || {}), P = /* @__PURE__ */ ((t) => (t.Click = "click", t.Hover = "hover", t.Manual = "manual", t))(P || {});
|
|
1442
|
+
const xn = ["aria-disabled", "onClick", "onMouseenter", "onMouseleave", "onMousemove"], wn = ["innerHTML"], $n = /* @__PURE__ */ I({
|
|
1385
1443
|
__name: "RTooltip",
|
|
1386
1444
|
props: {
|
|
1387
|
-
placement: { default:
|
|
1445
|
+
placement: { default: Se.Top },
|
|
1388
1446
|
text: { default: "" },
|
|
1389
1447
|
dark: { type: Boolean, default: !0 },
|
|
1390
1448
|
light: { type: Boolean, default: !1 },
|
|
1391
|
-
triggers: { default:
|
|
1449
|
+
triggers: { default: P.Hover },
|
|
1392
1450
|
autoHide: { type: Boolean, default: !0 },
|
|
1393
1451
|
hideDelay: { default: 3e3 },
|
|
1394
1452
|
showDelay: { default: 0 },
|
|
@@ -1403,13 +1461,13 @@ const pn = ["aria-disabled", "onClick", "onMouseenter", "onMouseleave", "onMouse
|
|
|
1403
1461
|
emits: ["show", "hide"],
|
|
1404
1462
|
setup(t, { emit: n }) {
|
|
1405
1463
|
const e = t;
|
|
1406
|
-
|
|
1464
|
+
Ke((c) => ({
|
|
1407
1465
|
"271323d4": w(h)
|
|
1408
1466
|
}));
|
|
1409
|
-
const a =
|
|
1410
|
-
function
|
|
1411
|
-
const { placement: c, offset:
|
|
1412
|
-
M || (o.value.style.display = "block", n("show"), he(a, o,
|
|
1467
|
+
const a = E(null), o = E(null), l = E(null);
|
|
1468
|
+
function s() {
|
|
1469
|
+
const { placement: c, offset: p, padding: k, disabled: M } = e;
|
|
1470
|
+
M || (o.value.style.display = "block", n("show"), he(a, o, l, c, p, k), r(), e.outsideClick && u("add"));
|
|
1413
1471
|
}
|
|
1414
1472
|
function i() {
|
|
1415
1473
|
o.value.style.display = "", n("hide"), e.outsideClick && u("remove");
|
|
@@ -1420,75 +1478,75 @@ const pn = ["aria-disabled", "onClick", "onMouseenter", "onMouseleave", "onMouse
|
|
|
1420
1478
|
}, e.hideDelay);
|
|
1421
1479
|
}, u = (c) => {
|
|
1422
1480
|
c === "add" && document.addEventListener("click", i), c === "remove" && document.removeEventListener("click", i);
|
|
1423
|
-
},
|
|
1424
|
-
e.disabled || e.triggers ==
|
|
1481
|
+
}, _ = () => {
|
|
1482
|
+
e.disabled || e.triggers == P.Click && (o.value.style.display === "block" ? i() : s());
|
|
1425
1483
|
}, d = () => {
|
|
1426
|
-
e.disabled || e.triggers ===
|
|
1484
|
+
e.disabled || e.triggers === P.Hover && s();
|
|
1427
1485
|
}, y = () => {
|
|
1428
1486
|
if (!e.disabled)
|
|
1429
|
-
if (o.value.style.display === "" && e.triggers ===
|
|
1430
|
-
|
|
1487
|
+
if (o.value.style.display === "" && e.triggers === P.Hover) {
|
|
1488
|
+
s();
|
|
1431
1489
|
return;
|
|
1432
1490
|
} else
|
|
1433
|
-
o.value.style.display !== "" && e.triggers ===
|
|
1434
|
-
},
|
|
1435
|
-
const { placement: c, offset:
|
|
1436
|
-
M || e.triggers ===
|
|
1491
|
+
o.value.style.display !== "" && e.triggers === P.Hover && i();
|
|
1492
|
+
}, g = () => {
|
|
1493
|
+
const { placement: c, offset: p, padding: k, disabled: M } = e;
|
|
1494
|
+
M || e.triggers === P.Hover && he(a, o, l, c, p, k);
|
|
1437
1495
|
}, b = $(() => ({
|
|
1438
1496
|
tooltip: !0,
|
|
1439
1497
|
"tooltip--dark": e.dark,
|
|
1440
1498
|
"tooltip--light": e.light
|
|
1441
1499
|
}));
|
|
1442
1500
|
window.onresize = () => {
|
|
1443
|
-
const { placement: c, offset:
|
|
1444
|
-
M || e.resizable && he(a, o,
|
|
1445
|
-
},
|
|
1501
|
+
const { placement: c, offset: p, padding: k, disabled: M } = e;
|
|
1502
|
+
M || e.resizable && he(a, o, l, c, p, k);
|
|
1503
|
+
}, Ge(
|
|
1446
1504
|
() => {
|
|
1447
|
-
e.disabled || e.shown && e.triggers ===
|
|
1505
|
+
e.disabled || e.shown && e.triggers === P.Manual && s();
|
|
1448
1506
|
},
|
|
1449
1507
|
{ flush: "post" }
|
|
1450
1508
|
// this is important to avoid infinite loop & for fire on mounted
|
|
1451
1509
|
);
|
|
1452
1510
|
const h = $(() => `${e.showDelay}ms`);
|
|
1453
|
-
return (c,
|
|
1511
|
+
return (c, p) => (f(), m(Q, null, [
|
|
1454
1512
|
v("div", {
|
|
1455
1513
|
ref_key: "trigger",
|
|
1456
1514
|
ref: a,
|
|
1457
1515
|
"aria-disabled": e.disabled,
|
|
1458
1516
|
class: "trigger",
|
|
1459
|
-
onClick:
|
|
1460
|
-
onMouseenter:
|
|
1461
|
-
onMouseleave:
|
|
1462
|
-
onMousemove:
|
|
1517
|
+
onClick: V(_, ["stop"]),
|
|
1518
|
+
onMouseenter: V(d, ["stop"]),
|
|
1519
|
+
onMouseleave: V(y, ["stop"]),
|
|
1520
|
+
onMousemove: V(g, ["stop"])
|
|
1463
1521
|
}, [
|
|
1464
|
-
|
|
1465
|
-
c.$slots.trigger ? R("", !0) : (
|
|
1522
|
+
D(c.$slots, "trigger", {}, void 0, !0),
|
|
1523
|
+
c.$slots.trigger ? R("", !0) : (f(), m("div", {
|
|
1466
1524
|
key: 0,
|
|
1467
1525
|
innerHTML: e.triggerContent
|
|
1468
|
-
}, null, 8,
|
|
1469
|
-
], 40,
|
|
1526
|
+
}, null, 8, wn))
|
|
1527
|
+
], 40, xn),
|
|
1470
1528
|
v("div", {
|
|
1471
1529
|
id: "tooltip",
|
|
1472
1530
|
ref_key: "tooltip",
|
|
1473
1531
|
ref: o,
|
|
1474
|
-
class:
|
|
1532
|
+
class: x(w(b)),
|
|
1475
1533
|
role: "tooltip"
|
|
1476
1534
|
}, [
|
|
1477
|
-
|
|
1478
|
-
c.$slots.content ? R("", !0) : (
|
|
1535
|
+
D(c.$slots, "content", {}, void 0, !0),
|
|
1536
|
+
c.$slots.content ? R("", !0) : (f(), m("div", {
|
|
1479
1537
|
key: 0,
|
|
1480
|
-
class:
|
|
1538
|
+
class: x({
|
|
1481
1539
|
tooltip__content: !0,
|
|
1482
1540
|
"tooltip__content--dark": e.dark,
|
|
1483
1541
|
"tooltip__content--light": e.light
|
|
1484
1542
|
})
|
|
1485
1543
|
}, C(e.text), 3)),
|
|
1486
|
-
c.$slots.content ? R("", !0) : (
|
|
1544
|
+
c.$slots.content ? R("", !0) : (f(), m("div", {
|
|
1487
1545
|
key: 1,
|
|
1488
1546
|
id: "arrow",
|
|
1489
1547
|
ref_key: "arrowElement",
|
|
1490
|
-
ref:
|
|
1491
|
-
class:
|
|
1548
|
+
ref: l,
|
|
1549
|
+
class: x({
|
|
1492
1550
|
tooltip__arrow: !0,
|
|
1493
1551
|
"tooltip__arrow--dark": e.dark,
|
|
1494
1552
|
"tooltip__arrow--light": e.light
|
|
@@ -1498,28 +1556,29 @@ const pn = ["aria-disabled", "onClick", "onMouseenter", "onMouseleave", "onMouse
|
|
|
1498
1556
|
], 64));
|
|
1499
1557
|
}
|
|
1500
1558
|
});
|
|
1501
|
-
const
|
|
1559
|
+
const Mn = (t, n) => {
|
|
1502
1560
|
const e = t.__vccOpts || t;
|
|
1503
1561
|
for (const [a, o] of n)
|
|
1504
1562
|
e[a] = o;
|
|
1505
1563
|
return e;
|
|
1506
|
-
},
|
|
1564
|
+
}, Vn = /* @__PURE__ */ Mn($n, [["__scopeId", "data-v-ee5f5651"]]);
|
|
1507
1565
|
export {
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1566
|
+
zn as RAccordion,
|
|
1567
|
+
Cn as RAlert,
|
|
1568
|
+
Rn as RAvatar,
|
|
1569
|
+
In as RBadge,
|
|
1570
|
+
ut as RButton,
|
|
1571
|
+
An as RCheckbox,
|
|
1572
|
+
yt as RChip,
|
|
1573
|
+
Ln as RDropdown,
|
|
1574
|
+
N as RIcon,
|
|
1575
|
+
Le as RLabel,
|
|
1576
|
+
Nn as RModal,
|
|
1577
|
+
Bn as RSnackbar,
|
|
1578
|
+
Dn as RSwitch,
|
|
1579
|
+
Zt as RTabItem,
|
|
1580
|
+
jn as RTabs,
|
|
1581
|
+
En as RTextArea,
|
|
1582
|
+
On as RTextfield,
|
|
1583
|
+
Vn as RTooltip
|
|
1525
1584
|
};
|