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