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