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