@robuust-digital/vue-components 1.2.5 → 1.2.7
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/style.css +1 -1
- package/dist/tailwind/base/index.js +8 -7
- package/dist/tailwind/components/dropdown.js +33 -33
- package/dist/tailwind/components/empty-state.js +13 -13
- package/dist/tailwind/components/input.js +100 -0
- package/dist/tailwind/components/radio.js +37 -37
- package/dist/tailwind/components/select.js +32 -12
- package/dist/tailwind/components/tabs.js +26 -26
- package/dist/tailwind/index.js +3 -0
- package/dist/vue-components.es.js +1119 -1006
- package/dist/vue-components.umd.js +2 -2
- package/package.json +1 -1
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { openBlock as
|
|
3
|
-
function
|
|
4
|
-
return
|
|
1
|
+
import * as nn from "vue";
|
|
2
|
+
import { openBlock as g, createElementBlock as S, createElementVNode as x, Fragment as ie, renderList as Te, renderSlot as k, createTextVNode as pe, toDisplayString as M, createVNode as D, unref as $, normalizeClass as N, createBlock as R, resolveDynamicComponent as J, withCtx as P, createCommentVNode as B, watchEffect as _, mergeProps as Y, computed as w, getCurrentInstance as Sn, useAttrs as En, withDirectives as vt, vModelDynamic as Nt, normalizeProps as He, guardReactiveProps as Tn, vModelSelect as gl, ref as E, nextTick as Oe, onMounted as z, cloneVNode as hl, h as K, defineComponent as W, inject as ee, provide as ue, onUnmounted as ce, watch as me, shallowRef as Ze, Teleport as yl, reactive as bl, withModifiers as kn, Transition as wl, useSlots as $l, getCurrentScope as xl, onScopeDispose as Sl, shallowReadonly as Ne, normalizeStyle as El } from "vue";
|
|
3
|
+
function Tl(e, t) {
|
|
4
|
+
return g(), S("svg", {
|
|
5
5
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6
6
|
viewBox: "0 0 24 24",
|
|
7
7
|
fill: "currentColor",
|
|
8
8
|
"aria-hidden": "true",
|
|
9
9
|
"data-slot": "icon"
|
|
10
10
|
}, [
|
|
11
|
-
|
|
11
|
+
x("path", {
|
|
12
12
|
"fill-rule": "evenodd",
|
|
13
13
|
d: "M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z",
|
|
14
14
|
"clip-rule": "evenodd"
|
|
15
15
|
})
|
|
16
16
|
]);
|
|
17
17
|
}
|
|
18
|
-
function
|
|
19
|
-
return
|
|
18
|
+
function kl(e, t) {
|
|
19
|
+
return g(), S("svg", {
|
|
20
20
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21
21
|
viewBox: "0 0 24 24",
|
|
22
22
|
fill: "currentColor",
|
|
23
23
|
"aria-hidden": "true",
|
|
24
24
|
"data-slot": "icon"
|
|
25
25
|
}, [
|
|
26
|
-
|
|
26
|
+
x("path", {
|
|
27
27
|
"fill-rule": "evenodd",
|
|
28
28
|
d: "M12 3.75a.75.75 0 0 1 .75.75v6.75h6.75a.75.75 0 0 1 0 1.5h-6.75v6.75a.75.75 0 0 1-1.5 0v-6.75H4.5a.75.75 0 0 1 0-1.5h6.75V4.5a.75.75 0 0 1 .75-.75Z",
|
|
29
29
|
"clip-rule": "evenodd"
|
|
30
30
|
})
|
|
31
31
|
]);
|
|
32
32
|
}
|
|
33
|
-
function
|
|
34
|
-
return
|
|
33
|
+
function pt(e, t) {
|
|
34
|
+
return g(), S("svg", {
|
|
35
35
|
xmlns: "http://www.w3.org/2000/svg",
|
|
36
36
|
viewBox: "0 0 24 24",
|
|
37
37
|
fill: "currentColor",
|
|
38
38
|
"aria-hidden": "true",
|
|
39
39
|
"data-slot": "icon"
|
|
40
40
|
}, [
|
|
41
|
-
|
|
41
|
+
x("path", {
|
|
42
42
|
"fill-rule": "evenodd",
|
|
43
43
|
d: "M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z",
|
|
44
44
|
"clip-rule": "evenodd"
|
|
45
45
|
})
|
|
46
46
|
]);
|
|
47
47
|
}
|
|
48
|
-
const
|
|
48
|
+
const Ol = { class: "rvc-accordion" }, Ll = ["open", "name"], Cl = ["innerHTML"], Da = {
|
|
49
49
|
__name: "Accordion",
|
|
50
50
|
props: {
|
|
51
51
|
items: {
|
|
@@ -67,37 +67,37 @@ const El = { class: "rvc-accordion" }, Tl = ["open", "name"], kl = ["innerHTML"]
|
|
|
67
67
|
}
|
|
68
68
|
},
|
|
69
69
|
setup(e) {
|
|
70
|
-
return (t, n) => (
|
|
71
|
-
(
|
|
70
|
+
return (t, n) => (g(), S("div", Ol, [
|
|
71
|
+
(g(!0), S(ie, null, Te(e.items, (l, r) => (g(), S("details", {
|
|
72
72
|
key: r,
|
|
73
73
|
open: e.defaultOpenIndex === r,
|
|
74
74
|
name: e.name,
|
|
75
75
|
class: "rvc-group/accordion group/accordion"
|
|
76
76
|
}, [
|
|
77
|
-
|
|
77
|
+
x("summary", null, [
|
|
78
78
|
k(t.$slots, "summary", {
|
|
79
79
|
item: l,
|
|
80
80
|
active: e.defaultOpenIndex === r
|
|
81
81
|
}, () => [
|
|
82
|
-
pe(
|
|
82
|
+
pe(M(l.title) + " ", 1),
|
|
83
83
|
k(t.$slots, "icon", { classList: "size-5 group-open/accordion:rotate-45 transition-transform" }, () => [
|
|
84
|
-
D(
|
|
84
|
+
D($(kl), { class: "rvc-size-5 group-open/accordion:rvc-rotate-45 rvc-transition-transform" })
|
|
85
85
|
])
|
|
86
86
|
])
|
|
87
87
|
]),
|
|
88
|
-
|
|
88
|
+
x("div", {
|
|
89
89
|
class: N(["rvc-accordion-content", e.contentClass])
|
|
90
90
|
}, [
|
|
91
91
|
k(t.$slots, "content", { item: l }, () => [
|
|
92
|
-
|
|
92
|
+
x("div", {
|
|
93
93
|
innerHTML: l.content
|
|
94
|
-
}, null, 8,
|
|
94
|
+
}, null, 8, Cl)
|
|
95
95
|
])
|
|
96
96
|
], 2)
|
|
97
|
-
], 8,
|
|
97
|
+
], 8, Ll))), 128))
|
|
98
98
|
]));
|
|
99
99
|
}
|
|
100
|
-
},
|
|
100
|
+
}, Pl = { class: "rvc-alert-title" }, Ra = {
|
|
101
101
|
__name: "Alert",
|
|
102
102
|
props: {
|
|
103
103
|
as: {
|
|
@@ -124,37 +124,37 @@ const El = { class: "rvc-accordion" }, Tl = ["open", "name"], kl = ["innerHTML"]
|
|
|
124
124
|
},
|
|
125
125
|
emits: ["alert:close"],
|
|
126
126
|
setup(e) {
|
|
127
|
-
return (t, n) => (
|
|
127
|
+
return (t, n) => (g(), R(J(e.as), {
|
|
128
128
|
class: N(["rvc-alert", `rvc-alert-${e.type}`])
|
|
129
129
|
}, {
|
|
130
130
|
default: P(() => [
|
|
131
131
|
k(t.$slots, "icon", {}, () => [
|
|
132
|
-
e.icon ? (
|
|
132
|
+
e.icon ? (g(), R(J(e.icon), {
|
|
133
133
|
key: 0,
|
|
134
134
|
class: "rvc-alert-icon"
|
|
135
|
-
})) :
|
|
135
|
+
})) : B("", !0)
|
|
136
136
|
]),
|
|
137
|
-
|
|
137
|
+
x("div", null, [
|
|
138
138
|
k(t.$slots, "title", {}, () => [
|
|
139
|
-
|
|
139
|
+
x("span", Pl, M(e.title), 1)
|
|
140
140
|
]),
|
|
141
141
|
k(t.$slots, "default")
|
|
142
142
|
]),
|
|
143
143
|
k(t.$slots, "close", {}, () => [
|
|
144
|
-
e.close ? (
|
|
144
|
+
e.close ? (g(), S("button", {
|
|
145
145
|
key: 0,
|
|
146
146
|
type: "button",
|
|
147
147
|
class: "rvc-alert-close rvc-transition-colors",
|
|
148
148
|
onClick: n[0] || (n[0] = (l) => t.$emit("alert:close"))
|
|
149
149
|
}, [
|
|
150
|
-
D(
|
|
151
|
-
])) :
|
|
150
|
+
D($(pt), { class: "rvc-size-5" })
|
|
151
|
+
])) : B("", !0)
|
|
152
152
|
])
|
|
153
153
|
]),
|
|
154
154
|
_: 3
|
|
155
155
|
}, 8, ["class"]));
|
|
156
156
|
}
|
|
157
|
-
},
|
|
157
|
+
}, Fa = {
|
|
158
158
|
__name: "Badge",
|
|
159
159
|
props: {
|
|
160
160
|
as: {
|
|
@@ -177,25 +177,25 @@ const El = { class: "rvc-accordion" }, Tl = ["open", "name"], kl = ["innerHTML"]
|
|
|
177
177
|
}
|
|
178
178
|
},
|
|
179
179
|
setup(e) {
|
|
180
|
-
return (t, n) => (
|
|
180
|
+
return (t, n) => (g(), R(J(e.as), {
|
|
181
181
|
class: N(["rvc-badge", `rvc-badge-${e.color}`, `rvc-badge-${e.size}`])
|
|
182
182
|
}, {
|
|
183
183
|
default: P(() => [
|
|
184
184
|
k(t.$slots, "default", { label: e.label }, () => [
|
|
185
|
-
pe(
|
|
185
|
+
pe(M(e.label), 1)
|
|
186
186
|
])
|
|
187
187
|
]),
|
|
188
188
|
_: 3
|
|
189
189
|
}, 8, ["class"]));
|
|
190
190
|
}
|
|
191
|
-
},
|
|
191
|
+
}, Al = {
|
|
192
192
|
xmlns: "http://www.w3.org/2000/svg",
|
|
193
193
|
fill: "none",
|
|
194
194
|
viewBox: "0 0 24 24"
|
|
195
195
|
};
|
|
196
|
-
function
|
|
197
|
-
return
|
|
198
|
-
|
|
196
|
+
function Dl(e, t) {
|
|
197
|
+
return g(), S("svg", Al, t[0] || (t[0] = [
|
|
198
|
+
x("circle", {
|
|
199
199
|
cx: "12",
|
|
200
200
|
cy: "12",
|
|
201
201
|
r: "10",
|
|
@@ -203,16 +203,16 @@ function Cl(e, t) {
|
|
|
203
203
|
"stroke-width": "4",
|
|
204
204
|
style: { opacity: ".25" }
|
|
205
205
|
}, null, -1),
|
|
206
|
-
|
|
206
|
+
x("path", {
|
|
207
207
|
fill: "currentColor",
|
|
208
208
|
d: "M4 12a8 8 0 0 1 8-8V0C5.373 0 0 5.373 0 12zm2 5.291A7.96 7.96 0 0 1 4 12H0c0 3.042 1.135 5.824 3 7.938z"
|
|
209
209
|
}, null, -1)
|
|
210
210
|
]));
|
|
211
211
|
}
|
|
212
|
-
const
|
|
212
|
+
const On = { render: Dl }, Rl = {
|
|
213
213
|
key: 0,
|
|
214
214
|
class: "rvc-sr-only"
|
|
215
|
-
},
|
|
215
|
+
}, Xe = {
|
|
216
216
|
__name: "ButtonBase",
|
|
217
217
|
props: {
|
|
218
218
|
as: {
|
|
@@ -254,47 +254,47 @@ const En = { render: Cl }, Pl = {
|
|
|
254
254
|
},
|
|
255
255
|
setup(e) {
|
|
256
256
|
const t = e;
|
|
257
|
-
return
|
|
257
|
+
return _(() => {
|
|
258
258
|
t.iconOnly && !t.icon && console.warn("[ButtonBase] Using iconOnly prop without providing an icon may result in an empty button.");
|
|
259
|
-
}), (n, l) => (
|
|
259
|
+
}), (n, l) => (g(), R(J(e.as), Y(e.bindAs ? { as: e.bindAs } : {}, {
|
|
260
260
|
class: ["rvc-button", `rvc-button-${e.color}`, `rvc-button-${e.size}`, { "rvc-button-reverse": e.iconLeft }, { "rvc-button-icon-only": e.iconOnly }],
|
|
261
261
|
"aria-label": e.iconOnly ? e.label : null,
|
|
262
262
|
"aria-busy": e.spinning
|
|
263
263
|
}), {
|
|
264
264
|
default: P(() => [
|
|
265
|
-
e.iconOnly && e.label ? (
|
|
265
|
+
e.iconOnly && e.label ? (g(), S("span", Rl, [
|
|
266
266
|
k(n.$slots, "default", { label: e.label }, () => [
|
|
267
|
-
pe(
|
|
267
|
+
pe(M(e.label), 1)
|
|
268
268
|
])
|
|
269
269
|
])) : e.label ? k(n.$slots, "default", {
|
|
270
270
|
key: 1,
|
|
271
271
|
label: e.label
|
|
272
272
|
}, () => [
|
|
273
|
-
pe(
|
|
274
|
-
]) :
|
|
273
|
+
pe(M(e.label), 1)
|
|
274
|
+
]) : B("", !0),
|
|
275
275
|
k(n.$slots, "icon", { icon: e.icon }, () => [
|
|
276
|
-
e.icon && !e.spinning ? (
|
|
276
|
+
e.icon && !e.spinning ? (g(), R(J(e.icon), {
|
|
277
277
|
key: 0,
|
|
278
278
|
class: "rvc-button-icon",
|
|
279
279
|
"aria-hidden": !e.iconOnly
|
|
280
|
-
}, null, 8, ["aria-hidden"])) :
|
|
280
|
+
}, null, 8, ["aria-hidden"])) : B("", !0)
|
|
281
281
|
]),
|
|
282
282
|
k(n.$slots, "spinner", { spinning: e.spinning }, () => [
|
|
283
|
-
e.spinning ? (
|
|
283
|
+
e.spinning ? (g(), R($(On), {
|
|
284
284
|
key: 0,
|
|
285
285
|
class: "rvc-button-icon rvc-button-icon-loading",
|
|
286
286
|
"aria-hidden": "true"
|
|
287
|
-
})) :
|
|
287
|
+
})) : B("", !0)
|
|
288
288
|
])
|
|
289
289
|
]),
|
|
290
290
|
_: 3
|
|
291
291
|
}, 16, ["class", "aria-label", "aria-busy"]));
|
|
292
292
|
}
|
|
293
|
-
},
|
|
293
|
+
}, mt = () => ({ hasModelBinding: w(() => {
|
|
294
294
|
var n;
|
|
295
|
-
const t =
|
|
295
|
+
const t = Sn();
|
|
296
296
|
return ((n = t == null ? void 0 : t.vnode) == null ? void 0 : n.props) && Object.prototype.hasOwnProperty.call(t.vnode.props, "onUpdate:modelValue");
|
|
297
|
-
}) }),
|
|
297
|
+
}) }), Fl = { class: "rvc-checkbox-input peer-focus/checkbox:rvc-focus" }, Ml = ["for"], Ma = /* @__PURE__ */ Object.assign({
|
|
298
298
|
inheritAttrs: !1
|
|
299
299
|
}, {
|
|
300
300
|
__name: "Checkbox",
|
|
@@ -321,92 +321,103 @@ const En = { render: Cl }, Pl = {
|
|
|
321
321
|
const n = e, l = t, r = w({
|
|
322
322
|
get: () => n.modelValue,
|
|
323
323
|
set: (s) => l("update:modelValue", s)
|
|
324
|
-
}), { hasModelBinding: a } =
|
|
325
|
-
|
|
324
|
+
}), { hasModelBinding: a } = mt(), i = {
|
|
325
|
+
...En(),
|
|
326
326
|
id: n.id,
|
|
327
327
|
type: "checkbox",
|
|
328
328
|
class: "rvc-absolute rvc-opacity-0 rvc-inset-0 rvc-cursor-pointer rvc-peer/checkbox"
|
|
329
329
|
};
|
|
330
|
-
return (s, u) => (
|
|
330
|
+
return (s, u) => (g(), S("div", {
|
|
331
331
|
class: N(["rvc-checkbox", e.rootClass])
|
|
332
332
|
}, [
|
|
333
|
-
|
|
333
|
+
$(a) ? vt((g(), S("input", Y({ key: 0 }, i, {
|
|
334
334
|
"onUpdate:modelValue": u[0] || (u[0] = (c) => r.value = c)
|
|
335
335
|
}), null, 16)), [
|
|
336
|
-
[
|
|
337
|
-
]) : (
|
|
338
|
-
|
|
339
|
-
D(
|
|
336
|
+
[Nt, r.value]
|
|
337
|
+
]) : (g(), S("input", He(Y({ key: 1 }, i)), null, 16)),
|
|
338
|
+
x("span", Fl, [
|
|
339
|
+
D($(Tl))
|
|
340
340
|
]),
|
|
341
|
-
|
|
341
|
+
x("div", null, [
|
|
342
342
|
s.$slots.default || e.label ? k(s.$slots, "default", { key: 0 }, () => [
|
|
343
|
-
|
|
344
|
-
]) :
|
|
343
|
+
x("label", { for: e.id }, M(e.label), 9, Ml)
|
|
344
|
+
]) : B("", !0)
|
|
345
345
|
])
|
|
346
346
|
], 2));
|
|
347
347
|
}
|
|
348
348
|
});
|
|
349
|
-
function
|
|
350
|
-
return
|
|
349
|
+
function Bl(e, t) {
|
|
350
|
+
return g(), S("svg", {
|
|
351
351
|
xmlns: "http://www.w3.org/2000/svg",
|
|
352
352
|
viewBox: "0 0 16 16",
|
|
353
353
|
fill: "currentColor",
|
|
354
354
|
"aria-hidden": "true",
|
|
355
355
|
"data-slot": "icon"
|
|
356
356
|
}, [
|
|
357
|
-
|
|
357
|
+
x("path", {
|
|
358
358
|
"fill-rule": "evenodd",
|
|
359
359
|
d: "M8 14a.75.75 0 0 1-.75-.75V4.56L4.03 7.78a.75.75 0 0 1-1.06-1.06l4.5-4.5a.75.75 0 0 1 1.06 0l4.5 4.5a.75.75 0 0 1-1.06 1.06L8.75 4.56v8.69A.75.75 0 0 1 8 14Z",
|
|
360
360
|
"clip-rule": "evenodd"
|
|
361
361
|
})
|
|
362
362
|
]);
|
|
363
363
|
}
|
|
364
|
-
function
|
|
365
|
-
return
|
|
364
|
+
function Il(e, t) {
|
|
365
|
+
return g(), S("svg", {
|
|
366
366
|
xmlns: "http://www.w3.org/2000/svg",
|
|
367
367
|
viewBox: "0 0 20 20",
|
|
368
368
|
fill: "currentColor",
|
|
369
369
|
"aria-hidden": "true",
|
|
370
370
|
"data-slot": "icon"
|
|
371
371
|
}, [
|
|
372
|
-
|
|
372
|
+
x("path", {
|
|
373
373
|
"fill-rule": "evenodd",
|
|
374
374
|
d: "M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",
|
|
375
375
|
"clip-rule": "evenodd"
|
|
376
376
|
})
|
|
377
377
|
]);
|
|
378
378
|
}
|
|
379
|
-
function
|
|
380
|
-
return
|
|
379
|
+
function Nl(e, t) {
|
|
380
|
+
return g(), S("svg", {
|
|
381
381
|
xmlns: "http://www.w3.org/2000/svg",
|
|
382
382
|
viewBox: "0 0 20 20",
|
|
383
383
|
fill: "currentColor",
|
|
384
384
|
"aria-hidden": "true",
|
|
385
385
|
"data-slot": "icon"
|
|
386
386
|
}, [
|
|
387
|
-
|
|
387
|
+
x("path", {
|
|
388
388
|
"fill-rule": "evenodd",
|
|
389
389
|
d: "M11.78 5.22a.75.75 0 0 1 0 1.06L8.06 10l3.72 3.72a.75.75 0 1 1-1.06 1.06l-4.25-4.25a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0Z",
|
|
390
390
|
"clip-rule": "evenodd"
|
|
391
391
|
})
|
|
392
392
|
]);
|
|
393
393
|
}
|
|
394
|
-
function
|
|
395
|
-
return
|
|
394
|
+
function jl(e, t) {
|
|
395
|
+
return g(), S("svg", {
|
|
396
396
|
xmlns: "http://www.w3.org/2000/svg",
|
|
397
397
|
viewBox: "0 0 20 20",
|
|
398
398
|
fill: "currentColor",
|
|
399
399
|
"aria-hidden": "true",
|
|
400
400
|
"data-slot": "icon"
|
|
401
401
|
}, [
|
|
402
|
-
|
|
402
|
+
x("path", {
|
|
403
403
|
"fill-rule": "evenodd",
|
|
404
404
|
d: "M8.22 5.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L11.94 10 8.22 6.28a.75.75 0 0 1 0-1.06Z",
|
|
405
405
|
"clip-rule": "evenodd"
|
|
406
406
|
})
|
|
407
407
|
]);
|
|
408
408
|
}
|
|
409
|
-
|
|
409
|
+
function Vl(e, t) {
|
|
410
|
+
return g(), S("svg", {
|
|
411
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
412
|
+
viewBox: "0 0 20 20",
|
|
413
|
+
fill: "currentColor",
|
|
414
|
+
"aria-hidden": "true",
|
|
415
|
+
"data-slot": "icon"
|
|
416
|
+
}, [
|
|
417
|
+
x("path", { d: "M10 3a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3ZM10 8.5a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3ZM11.5 15.5a1.5 1.5 0 1 0-3 0 1.5 1.5 0 0 0 3 0Z" })
|
|
418
|
+
]);
|
|
419
|
+
}
|
|
420
|
+
const Ln = /* @__PURE__ */ Object.assign({
|
|
410
421
|
inheritAttrs: !1
|
|
411
422
|
}, {
|
|
412
423
|
__name: "FormSelect",
|
|
@@ -419,6 +430,10 @@ const Tn = /* @__PURE__ */ Object.assign({
|
|
|
419
430
|
type: String,
|
|
420
431
|
default: ""
|
|
421
432
|
},
|
|
433
|
+
iconLeft: {
|
|
434
|
+
type: [Object, Function],
|
|
435
|
+
default: null
|
|
436
|
+
},
|
|
422
437
|
icon: {
|
|
423
438
|
type: [Object, Function],
|
|
424
439
|
default: null
|
|
@@ -434,34 +449,40 @@ const Tn = /* @__PURE__ */ Object.assign({
|
|
|
434
449
|
const n = e, l = t, r = w({
|
|
435
450
|
get: () => n.modelValue,
|
|
436
451
|
set: (o) => l("update:modelValue", o)
|
|
437
|
-
}), { hasModelBinding: a } =
|
|
438
|
-
return (o, i) => (
|
|
452
|
+
}), { hasModelBinding: a } = mt();
|
|
453
|
+
return (o, i) => (g(), S("div", {
|
|
439
454
|
class: N([
|
|
440
455
|
"rvc-select",
|
|
441
456
|
`rvc-select-${e.size}`,
|
|
442
457
|
e.rootClass
|
|
443
458
|
])
|
|
444
459
|
}, [
|
|
445
|
-
k(o.$slots, "
|
|
446
|
-
|
|
460
|
+
e.iconLeft ? k(o.$slots, "iconLeft", {
|
|
461
|
+
key: 0,
|
|
462
|
+
icon: e.iconLeft
|
|
463
|
+
}, () => [
|
|
464
|
+
(g(), R(J(e.iconLeft), { "aria-hidden": "true" }))
|
|
465
|
+
]) : B("", !0),
|
|
466
|
+
k(o.$slots, "select", He(Tn(o.$attrs)), () => [
|
|
467
|
+
$(a) ? vt((g(), S("select", Y({ key: 0 }, o.$attrs, {
|
|
447
468
|
"onUpdate:modelValue": i[0] || (i[0] = (s) => r.value = s)
|
|
448
469
|
}), [
|
|
449
470
|
k(o.$slots, "default")
|
|
450
471
|
], 16)), [
|
|
451
|
-
[
|
|
452
|
-
]) : (
|
|
472
|
+
[gl, r.value]
|
|
473
|
+
]) : (g(), S("select", He(Y({ key: 1 }, o.$attrs)), [
|
|
453
474
|
k(o.$slots, "default")
|
|
454
475
|
], 16))
|
|
455
476
|
]),
|
|
456
477
|
k(o.$slots, "icon", { icon: e.icon }, () => [
|
|
457
|
-
(
|
|
478
|
+
(g(), R(J(e.icon ?? $(Il)), { "aria-hidden": "true" }))
|
|
458
479
|
])
|
|
459
480
|
], 2));
|
|
460
481
|
}
|
|
461
|
-
}),
|
|
482
|
+
}), Hl = {
|
|
462
483
|
key: 0,
|
|
463
484
|
class: "rvc-pagination rvc-grid rvc-grid-cols-2 md:rvc-grid-cols-3 rvc-items-center rvc-justify-between"
|
|
464
|
-
},
|
|
485
|
+
}, Wl = ["value"], Ul = { class: "md:rvc-flex rvc-justify-center rvc-hidden" }, zl = { class: "rvc-pagination-info" }, ql = { class: "rvc-flex rvc-justify-end" }, Kl = { class: "rvc-flex rvc-items-center md:gap-0.5 xl:rvc-gap-1" }, Yl = ["disabled", "onClick"], Zl = { key: 2 }, Gl = { key: 3 }, Xl = {
|
|
465
486
|
__name: "Pagination",
|
|
466
487
|
props: {
|
|
467
488
|
pagination: {
|
|
@@ -487,12 +508,12 @@ const Tn = /* @__PURE__ */ Object.assign({
|
|
|
487
508
|
},
|
|
488
509
|
emits: ["pagination:change", "pagination:perPage"],
|
|
489
510
|
setup(e, { emit: t }) {
|
|
490
|
-
const n = e, l = t, r =
|
|
511
|
+
const n = e, l = t, r = E(n.perPage);
|
|
491
512
|
return (a, o) => {
|
|
492
513
|
var i;
|
|
493
|
-
return (i = e.pagination) != null && i.total ? (
|
|
494
|
-
k(a.$slots, "perPage",
|
|
495
|
-
D(
|
|
514
|
+
return (i = e.pagination) != null && i.total ? (g(), S("div", Hl, [
|
|
515
|
+
k(a.$slots, "perPage", Y(e.pagination, { perPage: r.value }), () => [
|
|
516
|
+
D(Ln, {
|
|
496
517
|
modelValue: r.value,
|
|
497
518
|
"onUpdate:modelValue": [
|
|
498
519
|
o[0] || (o[0] = (s) => r.value = s),
|
|
@@ -502,27 +523,27 @@ const Tn = /* @__PURE__ */ Object.assign({
|
|
|
502
523
|
"root-class": "rvc-w-fit"
|
|
503
524
|
}, {
|
|
504
525
|
default: P(() => [
|
|
505
|
-
(
|
|
526
|
+
(g(!0), S(ie, null, Te(e.perPageOptions, (s) => (g(), S("option", {
|
|
506
527
|
key: `pagination-items-per-page-option-${s}`,
|
|
507
528
|
value: s
|
|
508
|
-
},
|
|
529
|
+
}, M(s) + " " + M(e.perPageLabel), 9, Wl))), 128))
|
|
509
530
|
]),
|
|
510
531
|
_: 1
|
|
511
532
|
}, 8, ["modelValue"])
|
|
512
533
|
]),
|
|
513
|
-
k(a.$slots, "info",
|
|
514
|
-
|
|
515
|
-
|
|
534
|
+
k(a.$slots, "info", Y(e.pagination, { fromLabel: e.fromLabel }), () => [
|
|
535
|
+
x("div", Ul, [
|
|
536
|
+
x("div", zl, M(e.pagination.from) + " - " + M(e.pagination.to) + " " + M(e.fromLabel) + " " + M(e.pagination.total), 1)
|
|
516
537
|
])
|
|
517
538
|
]),
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
(
|
|
539
|
+
x("div", ql, [
|
|
540
|
+
x("nav", null, [
|
|
541
|
+
x("ol", Kl, [
|
|
542
|
+
(g(!0), S(ie, null, Te(e.pagination.links, (s, u) => (g(), S("li", {
|
|
522
543
|
key: `pagination-link-${s.label}-${u}`,
|
|
523
544
|
class: "rvc-hidden md:rvc-block first:rvc-block last:rvc-block"
|
|
524
545
|
}, [
|
|
525
|
-
|
|
546
|
+
x("button", {
|
|
526
547
|
type: "button",
|
|
527
548
|
disabled: s.label === "..." || !s.url,
|
|
528
549
|
class: N([
|
|
@@ -531,30 +552,30 @@ const Tn = /* @__PURE__ */ Object.assign({
|
|
|
531
552
|
]),
|
|
532
553
|
onClick: (c) => s.url && l("pagination:change", s.url)
|
|
533
554
|
}, [
|
|
534
|
-
s.url !== "..." && u === 0 ? (
|
|
555
|
+
s.url !== "..." && u === 0 ? (g(), R($(Nl), {
|
|
535
556
|
key: 0,
|
|
536
557
|
"aria-hidden": "true",
|
|
537
558
|
class: N([
|
|
538
559
|
"rvc-size-5 rvc-text-slate-80",
|
|
539
560
|
{ "rvc-opacity-50": !s.url }
|
|
540
561
|
])
|
|
541
|
-
}, null, 8, ["class"])) : s.label !== "..." && u === e.pagination.links.length - 1 ? (
|
|
562
|
+
}, null, 8, ["class"])) : s.label !== "..." && u === e.pagination.links.length - 1 ? (g(), R($(jl), {
|
|
542
563
|
key: 1,
|
|
543
564
|
"aria-hidden": "true",
|
|
544
565
|
class: N([
|
|
545
566
|
"rvc-size-5 rvc-text-slate-80",
|
|
546
567
|
{ "rvc-opacity-50": !s.url }
|
|
547
568
|
])
|
|
548
|
-
}, null, 8, ["class"])) : s.label === "..." ? (
|
|
549
|
-
], 10,
|
|
569
|
+
}, null, 8, ["class"])) : s.label === "..." ? (g(), S("span", Zl, " ... ")) : (g(), S("span", Gl, M(s.label), 1))
|
|
570
|
+
], 10, Yl)
|
|
550
571
|
]))), 128))
|
|
551
572
|
])
|
|
552
573
|
])
|
|
553
574
|
])
|
|
554
|
-
])) :
|
|
575
|
+
])) : B("", !0);
|
|
555
576
|
};
|
|
556
577
|
}
|
|
557
|
-
},
|
|
578
|
+
}, Ql = { class: "rvc-overflow-x-auto rvc-pb-4" }, Jl = { key: 0 }, _l = ["aria-label", "onClick"], er = ["innerHTML"], tr = { key: 1 }, nr = ["colspan"], lr = { key: 2 }, rr = ["colspan"], or = { class: "rvc-flex rvc-gap-x-2 rvc-items-center" }, Ba = {
|
|
558
579
|
__name: "DataTable",
|
|
559
580
|
props: {
|
|
560
581
|
headers: {
|
|
@@ -590,7 +611,7 @@ const Tn = /* @__PURE__ */ Object.assign({
|
|
|
590
611
|
},
|
|
591
612
|
emits: ["table:sortBy", "pagination:change", "pagination:perPage"],
|
|
592
613
|
setup(e, { emit: t }) {
|
|
593
|
-
const n = e, l = t, r =
|
|
614
|
+
const n = e, l = t, r = E(null), a = (i) => n.headers.find((s) => s.key === i), o = (i) => {
|
|
594
615
|
!r.value || r.value.key !== i.key ? r.value = {
|
|
595
616
|
key: i.key,
|
|
596
617
|
direction: "asc"
|
|
@@ -599,17 +620,17 @@ const Tn = /* @__PURE__ */ Object.assign({
|
|
|
599
620
|
direction: "desc"
|
|
600
621
|
} : r.value = null, l("table:sortBy", r.value);
|
|
601
622
|
};
|
|
602
|
-
return (i, s) => (
|
|
603
|
-
|
|
604
|
-
|
|
623
|
+
return (i, s) => (g(), S("div", null, [
|
|
624
|
+
x("div", Ql, [
|
|
625
|
+
x("table", {
|
|
605
626
|
class: N([{ "rvc-table-striped": e.striped }, "rvc-w-full rvc-table"])
|
|
606
627
|
}, [
|
|
607
|
-
e.headers.length ? (
|
|
608
|
-
|
|
628
|
+
e.headers.length ? (g(), S("thead", Jl, [
|
|
629
|
+
x("tr", null, [
|
|
609
630
|
k(i.$slots, "headers", { headers: e.headers }, () => [
|
|
610
|
-
(
|
|
631
|
+
(g(!0), S(ie, null, Te(e.headers, (u) => {
|
|
611
632
|
var c, f;
|
|
612
|
-
return
|
|
633
|
+
return g(), S("th", Y({ ref_for: !0 }, u, {
|
|
613
634
|
key: `rvc-table-header-${u.id}`,
|
|
614
635
|
class: {
|
|
615
636
|
"rvc-text-left": u.align === "left" || !u.align,
|
|
@@ -617,7 +638,7 @@ const Tn = /* @__PURE__ */ Object.assign({
|
|
|
617
638
|
"rvc-text-right": u.align === "right"
|
|
618
639
|
}
|
|
619
640
|
}), [
|
|
620
|
-
u.sortable && u.key ? (
|
|
641
|
+
u.sortable && u.key ? (g(), S("button", {
|
|
621
642
|
key: 0,
|
|
622
643
|
type: "button",
|
|
623
644
|
"aria-label": `Sort on ${u.label}`,
|
|
@@ -634,9 +655,9 @@ const Tn = /* @__PURE__ */ Object.assign({
|
|
|
634
655
|
sortBy: r.value,
|
|
635
656
|
header: u
|
|
636
657
|
}, () => [
|
|
637
|
-
pe(
|
|
658
|
+
pe(M(u.label), 1)
|
|
638
659
|
]),
|
|
639
|
-
D(
|
|
660
|
+
D($(Bl), {
|
|
640
661
|
class: N([
|
|
641
662
|
"rvc-size-4 rvc-shrink-0 rvc-transition",
|
|
642
663
|
{
|
|
@@ -646,50 +667,50 @@ const Tn = /* @__PURE__ */ Object.assign({
|
|
|
646
667
|
}
|
|
647
668
|
])
|
|
648
669
|
}, null, 8, ["class"])
|
|
649
|
-
], 10,
|
|
670
|
+
], 10, _l)) : k(i.$slots, "header-label", {
|
|
650
671
|
key: 1,
|
|
651
672
|
sortBy: r.value,
|
|
652
673
|
header: u
|
|
653
674
|
}, () => [
|
|
654
|
-
pe(
|
|
675
|
+
pe(M(u.label), 1)
|
|
655
676
|
])
|
|
656
677
|
], 16);
|
|
657
678
|
}), 128))
|
|
658
679
|
])
|
|
659
680
|
])
|
|
660
|
-
])) :
|
|
661
|
-
|
|
662
|
-
e.items.length && !e.spinning ? (
|
|
681
|
+
])) : B("", !0),
|
|
682
|
+
x("tbody", null, [
|
|
683
|
+
e.items.length && !e.spinning ? (g(!0), S(ie, { key: 0 }, Te(e.items, (u, c) => (g(), S("tr", {
|
|
663
684
|
key: `rvc-table-row-${c}-${u.id}`
|
|
664
685
|
}, [
|
|
665
686
|
k(i.$slots, "items", {
|
|
666
687
|
item: u,
|
|
667
688
|
index: c
|
|
668
689
|
}, () => [
|
|
669
|
-
(
|
|
670
|
-
var v, p, m,
|
|
671
|
-
return
|
|
690
|
+
(g(!0), S(ie, null, Te(u, (f, d) => {
|
|
691
|
+
var v, p, m, h;
|
|
692
|
+
return g(), S("td", Y({
|
|
672
693
|
key: `rvc-table-row-${c}-column-${d}-${u.id}`,
|
|
673
694
|
ref_for: !0
|
|
674
695
|
}, u.attrs, {
|
|
675
696
|
class: {
|
|
676
697
|
"rvc-text-left": ((v = a(d)) == null ? void 0 : v.align) === "left" || !((p = a(d)) != null && p.align),
|
|
677
698
|
"rvc-text-center": ((m = a(d)) == null ? void 0 : m.align) === "center",
|
|
678
|
-
"rvc-text-right": ((
|
|
699
|
+
"rvc-text-right": ((h = a(d)) == null ? void 0 : h.align) === "right"
|
|
679
700
|
},
|
|
680
701
|
innerHTML: f
|
|
681
|
-
}), null, 16,
|
|
702
|
+
}), null, 16, er);
|
|
682
703
|
}), 128))
|
|
683
704
|
])
|
|
684
|
-
]))), 128)) : !e.items.length && !e.spinning ? (
|
|
685
|
-
|
|
705
|
+
]))), 128)) : !e.items.length && !e.spinning ? (g(), S("tr", tr, [
|
|
706
|
+
x("td", {
|
|
686
707
|
colspan: e.headers.length,
|
|
687
708
|
class: "rvc-table-state"
|
|
688
709
|
}, [
|
|
689
|
-
|
|
690
|
-
], 8,
|
|
691
|
-
])) : (
|
|
692
|
-
|
|
710
|
+
x("p", null, M(e.noResultsText), 1)
|
|
711
|
+
], 8, nr)
|
|
712
|
+
])) : (g(), S("tr", lr, [
|
|
713
|
+
x("td", {
|
|
693
714
|
colspan: e.headers.length,
|
|
694
715
|
class: "rvc-table-state"
|
|
695
716
|
}, [
|
|
@@ -697,42 +718,42 @@ const Tn = /* @__PURE__ */ Object.assign({
|
|
|
697
718
|
spinning: e.spinning,
|
|
698
719
|
label: e.loadingText
|
|
699
720
|
}, () => [
|
|
700
|
-
|
|
701
|
-
e.spinning ? (
|
|
721
|
+
x("div", or, [
|
|
722
|
+
e.spinning ? (g(), R($(On), {
|
|
702
723
|
key: 0,
|
|
703
724
|
"aria-hidden": "true",
|
|
704
725
|
class: "rvc-table-spinner"
|
|
705
|
-
})) :
|
|
706
|
-
pe(" " +
|
|
726
|
+
})) : B("", !0),
|
|
727
|
+
pe(" " + M(e.loadingText), 1)
|
|
707
728
|
])
|
|
708
729
|
])
|
|
709
|
-
], 8,
|
|
730
|
+
], 8, rr)
|
|
710
731
|
]))
|
|
711
732
|
])
|
|
712
733
|
], 2)
|
|
713
734
|
]),
|
|
714
|
-
e.pagination ? k(i.$slots, "pagination",
|
|
715
|
-
D(
|
|
735
|
+
e.pagination ? k(i.$slots, "pagination", He(Y({ key: 0 }, e.pagination)), () => [
|
|
736
|
+
D(Xl, {
|
|
716
737
|
pagination: e.pagination,
|
|
717
738
|
"onPagination:change": s[0] || (s[0] = (u) => l("pagination:change", u)),
|
|
718
739
|
"onPagination:perPage": s[1] || (s[1] = (u) => l("pagination:perPage", u))
|
|
719
740
|
}, null, 8, ["pagination"])
|
|
720
|
-
]) :
|
|
741
|
+
]) : B("", !0)
|
|
721
742
|
]));
|
|
722
743
|
}
|
|
723
744
|
};
|
|
724
|
-
function
|
|
725
|
-
let l =
|
|
745
|
+
function ar(e, t, n) {
|
|
746
|
+
let l = E(n == null ? void 0 : n.value), r = w(() => e.value !== void 0);
|
|
726
747
|
return [w(() => r.value ? e.value : l.value), function(a) {
|
|
727
748
|
return r.value || (l.value = a), t == null ? void 0 : t(a);
|
|
728
749
|
}];
|
|
729
750
|
}
|
|
730
|
-
function
|
|
751
|
+
function jt(e) {
|
|
731
752
|
typeof queueMicrotask == "function" ? queueMicrotask(e) : Promise.resolve().then(e).catch((t) => setTimeout(() => {
|
|
732
753
|
throw t;
|
|
733
754
|
}));
|
|
734
755
|
}
|
|
735
|
-
function
|
|
756
|
+
function et() {
|
|
736
757
|
let e = [], t = { addEventListener(n, l, r, a) {
|
|
737
758
|
return n.addEventListener(l, r, a), t.add(() => n.removeEventListener(l, r, a));
|
|
738
759
|
}, requestAnimationFrame(...n) {
|
|
@@ -747,7 +768,7 @@ function _e() {
|
|
|
747
768
|
t.add(() => clearTimeout(l));
|
|
748
769
|
}, microTask(...n) {
|
|
749
770
|
let l = { current: !0 };
|
|
750
|
-
return
|
|
771
|
+
return jt(() => {
|
|
751
772
|
l.current && n[0]();
|
|
752
773
|
}), t.add(() => {
|
|
753
774
|
l.current = !1;
|
|
@@ -758,7 +779,7 @@ function _e() {
|
|
|
758
779
|
Object.assign(n.style, { [l]: a });
|
|
759
780
|
});
|
|
760
781
|
}, group(n) {
|
|
761
|
-
let l =
|
|
782
|
+
let l = et();
|
|
762
783
|
return n(l), this.add(() => l.dispose());
|
|
763
784
|
}, add(n) {
|
|
764
785
|
return e.push(n), () => {
|
|
@@ -770,10 +791,10 @@ function _e() {
|
|
|
770
791
|
} };
|
|
771
792
|
return t;
|
|
772
793
|
}
|
|
773
|
-
var
|
|
774
|
-
let
|
|
775
|
-
const ve = (
|
|
776
|
-
return
|
|
794
|
+
var ln;
|
|
795
|
+
let ir = Symbol("headlessui.useid"), sr = 0;
|
|
796
|
+
const ve = (ln = nn.useId) != null ? ln : function() {
|
|
797
|
+
return nn.inject(ir, () => `${++sr}`)();
|
|
777
798
|
};
|
|
778
799
|
function O(e) {
|
|
779
800
|
var t;
|
|
@@ -789,10 +810,10 @@ function ge(e, t, ...n) {
|
|
|
789
810
|
let l = new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map((r) => `"${r}"`).join(", ")}.`);
|
|
790
811
|
throw Error.captureStackTrace && Error.captureStackTrace(l, ge), l;
|
|
791
812
|
}
|
|
792
|
-
var
|
|
793
|
-
let
|
|
813
|
+
var ur = Object.defineProperty, cr = (e, t, n) => t in e ? ur(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, rn = (e, t, n) => (cr(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
814
|
+
let dr = class {
|
|
794
815
|
constructor() {
|
|
795
|
-
|
|
816
|
+
rn(this, "current", this.detect()), rn(this, "currentId", 0);
|
|
796
817
|
}
|
|
797
818
|
set(t) {
|
|
798
819
|
this.current !== t && (this.currentId = 0, this.current = t);
|
|
@@ -812,9 +833,9 @@ let ir = class {
|
|
|
812
833
|
detect() {
|
|
813
834
|
return typeof window > "u" || typeof document > "u" ? "server" : "client";
|
|
814
835
|
}
|
|
815
|
-
},
|
|
836
|
+
}, tt = new dr();
|
|
816
837
|
function Ae(e) {
|
|
817
|
-
if (
|
|
838
|
+
if (tt.isServer) return null;
|
|
818
839
|
if (e instanceof Node) return e.ownerDocument;
|
|
819
840
|
if (e != null && e.hasOwnProperty("value")) {
|
|
820
841
|
let t = O(e);
|
|
@@ -822,32 +843,32 @@ function Ae(e) {
|
|
|
822
843
|
}
|
|
823
844
|
return document;
|
|
824
845
|
}
|
|
825
|
-
let
|
|
826
|
-
var we = ((e) => (e[e.First = 1] = "First", e[e.Previous = 2] = "Previous", e[e.Next = 4] = "Next", e[e.Last = 8] = "Last", e[e.WrapAround = 16] = "WrapAround", e[e.NoScroll = 32] = "NoScroll", e))(we || {}),
|
|
827
|
-
function
|
|
828
|
-
return e == null ? [] : Array.from(e.querySelectorAll(
|
|
846
|
+
let Lt = ["[contentEditable=true]", "[tabindex]", "a[href]", "area[href]", "button:not([disabled])", "iframe", "input:not([disabled])", "select:not([disabled])", "textarea:not([disabled])"].map((e) => `${e}:not([tabindex='-1'])`).join(",");
|
|
847
|
+
var we = ((e) => (e[e.First = 1] = "First", e[e.Previous = 2] = "Previous", e[e.Next = 4] = "Next", e[e.Last = 8] = "Last", e[e.WrapAround = 16] = "WrapAround", e[e.NoScroll = 32] = "NoScroll", e))(we || {}), Cn = ((e) => (e[e.Error = 0] = "Error", e[e.Overflow = 1] = "Overflow", e[e.Success = 2] = "Success", e[e.Underflow = 3] = "Underflow", e))(Cn || {}), fr = ((e) => (e[e.Previous = -1] = "Previous", e[e.Next = 1] = "Next", e))(fr || {});
|
|
848
|
+
function Pn(e = document.body) {
|
|
849
|
+
return e == null ? [] : Array.from(e.querySelectorAll(Lt)).sort((t, n) => Math.sign((t.tabIndex || Number.MAX_SAFE_INTEGER) - (n.tabIndex || Number.MAX_SAFE_INTEGER)));
|
|
829
850
|
}
|
|
830
|
-
var
|
|
831
|
-
function
|
|
851
|
+
var Vt = ((e) => (e[e.Strict = 0] = "Strict", e[e.Loose = 1] = "Loose", e))(Vt || {});
|
|
852
|
+
function Ht(e, t = 0) {
|
|
832
853
|
var n;
|
|
833
854
|
return e === ((n = Ae(e)) == null ? void 0 : n.body) ? !1 : ge(t, { 0() {
|
|
834
|
-
return e.matches(
|
|
855
|
+
return e.matches(Lt);
|
|
835
856
|
}, 1() {
|
|
836
857
|
let l = e;
|
|
837
858
|
for (; l !== null; ) {
|
|
838
|
-
if (l.matches(
|
|
859
|
+
if (l.matches(Lt)) return !0;
|
|
839
860
|
l = l.parentElement;
|
|
840
861
|
}
|
|
841
862
|
return !1;
|
|
842
863
|
} });
|
|
843
864
|
}
|
|
844
|
-
function
|
|
865
|
+
function An(e) {
|
|
845
866
|
let t = Ae(e);
|
|
846
867
|
Oe(() => {
|
|
847
|
-
t && !
|
|
868
|
+
t && !Ht(t.activeElement, 0) && Le(e);
|
|
848
869
|
});
|
|
849
870
|
}
|
|
850
|
-
var
|
|
871
|
+
var vr = ((e) => (e[e.Keyboard = 0] = "Keyboard", e[e.Mouse = 1] = "Mouse", e))(vr || {});
|
|
851
872
|
typeof window < "u" && typeof document < "u" && (document.addEventListener("keydown", (e) => {
|
|
852
873
|
e.metaKey || e.altKey || e.ctrlKey || (document.documentElement.dataset.headlessuiFocusVisible = "");
|
|
853
874
|
}, !0), document.addEventListener("click", (e) => {
|
|
@@ -856,12 +877,12 @@ typeof window < "u" && typeof document < "u" && (document.addEventListener("keyd
|
|
|
856
877
|
function Le(e) {
|
|
857
878
|
e == null || e.focus({ preventScroll: !0 });
|
|
858
879
|
}
|
|
859
|
-
let
|
|
860
|
-
function
|
|
880
|
+
let pr = ["textarea", "input"].join(",");
|
|
881
|
+
function mr(e) {
|
|
861
882
|
var t, n;
|
|
862
|
-
return (n = (t = e == null ? void 0 : e.matches) == null ? void 0 : t.call(e,
|
|
883
|
+
return (n = (t = e == null ? void 0 : e.matches) == null ? void 0 : t.call(e, pr)) != null ? n : !1;
|
|
863
884
|
}
|
|
864
|
-
function
|
|
885
|
+
function Dn(e, t = (n) => n) {
|
|
865
886
|
return e.slice().sort((n, l) => {
|
|
866
887
|
let r = t(n), a = t(l);
|
|
867
888
|
if (r === null || a === null) return 0;
|
|
@@ -869,12 +890,12 @@ function Cn(e, t = (n) => n) {
|
|
|
869
890
|
return o & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : o & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
|
|
870
891
|
});
|
|
871
892
|
}
|
|
872
|
-
function
|
|
873
|
-
return Ge(
|
|
893
|
+
function gr(e, t) {
|
|
894
|
+
return Ge(Pn(), t, { relativeTo: e });
|
|
874
895
|
}
|
|
875
896
|
function Ge(e, t, { sorted: n = !0, relativeTo: l = null, skipElements: r = [] } = {}) {
|
|
876
897
|
var a;
|
|
877
|
-
let o = (a = Array.isArray(e) ? e.length > 0 ? e[0].ownerDocument : document : e == null ? void 0 : e.ownerDocument) != null ? a : document, i = Array.isArray(e) ? n ?
|
|
898
|
+
let o = (a = Array.isArray(e) ? e.length > 0 ? e[0].ownerDocument : document : e == null ? void 0 : e.ownerDocument) != null ? a : document, i = Array.isArray(e) ? n ? Dn(e) : e : Pn(e);
|
|
878
899
|
r.length > 0 && i.length > 1 && (i = i.filter((p) => !r.includes(p))), l = l ?? o.activeElement;
|
|
879
900
|
let s = (() => {
|
|
880
901
|
if (t & 5) return 1;
|
|
@@ -897,28 +918,28 @@ function Ge(e, t, { sorted: n = !0, relativeTo: l = null, skipElements: r = [] }
|
|
|
897
918
|
}
|
|
898
919
|
v = i[p], v == null || v.focus(c), f += s;
|
|
899
920
|
} while (v !== o.activeElement);
|
|
900
|
-
return t & 6 &&
|
|
921
|
+
return t & 6 && mr(v) && v.select(), 2;
|
|
901
922
|
}
|
|
902
|
-
function
|
|
923
|
+
function Rn() {
|
|
903
924
|
return /iPhone/gi.test(window.navigator.platform) || /Mac/gi.test(window.navigator.platform) && window.navigator.maxTouchPoints > 0;
|
|
904
925
|
}
|
|
905
|
-
function
|
|
926
|
+
function hr() {
|
|
906
927
|
return /Android/gi.test(window.navigator.userAgent);
|
|
907
928
|
}
|
|
908
|
-
function
|
|
909
|
-
return
|
|
929
|
+
function yr() {
|
|
930
|
+
return Rn() || hr();
|
|
910
931
|
}
|
|
911
|
-
function
|
|
912
|
-
|
|
932
|
+
function at(e, t, n) {
|
|
933
|
+
tt.isServer || _((l) => {
|
|
913
934
|
document.addEventListener(e, t, n), l(() => document.removeEventListener(e, t, n));
|
|
914
935
|
});
|
|
915
936
|
}
|
|
916
|
-
function
|
|
917
|
-
|
|
937
|
+
function Fn(e, t, n) {
|
|
938
|
+
tt.isServer || _((l) => {
|
|
918
939
|
window.addEventListener(e, t, n), l(() => window.removeEventListener(e, t, n));
|
|
919
940
|
});
|
|
920
941
|
}
|
|
921
|
-
function
|
|
942
|
+
function Mn(e, t, n = w(() => !0)) {
|
|
922
943
|
function l(a, o) {
|
|
923
944
|
if (!n.value || a.defaultPrevented) return;
|
|
924
945
|
let i = o(a);
|
|
@@ -931,47 +952,47 @@ function Dn(e, t, n = w(() => !0)) {
|
|
|
931
952
|
let c = u instanceof HTMLElement ? u : O(u);
|
|
932
953
|
if (c != null && c.contains(i) || a.composed && a.composedPath().includes(c)) return;
|
|
933
954
|
}
|
|
934
|
-
return !
|
|
955
|
+
return !Ht(i, Vt.Loose) && i.tabIndex !== -1 && a.preventDefault(), t(a, i);
|
|
935
956
|
}
|
|
936
|
-
let r =
|
|
937
|
-
|
|
957
|
+
let r = E(null);
|
|
958
|
+
at("pointerdown", (a) => {
|
|
938
959
|
var o, i;
|
|
939
960
|
n.value && (r.value = ((i = (o = a.composedPath) == null ? void 0 : o.call(a)) == null ? void 0 : i[0]) || a.target);
|
|
940
|
-
}, !0),
|
|
961
|
+
}, !0), at("mousedown", (a) => {
|
|
941
962
|
var o, i;
|
|
942
963
|
n.value && (r.value = ((i = (o = a.composedPath) == null ? void 0 : o.call(a)) == null ? void 0 : i[0]) || a.target);
|
|
943
|
-
}, !0),
|
|
944
|
-
|
|
945
|
-
}, !0),
|
|
964
|
+
}, !0), at("click", (a) => {
|
|
965
|
+
yr() || r.value && (l(a, () => r.value), r.value = null);
|
|
966
|
+
}, !0), at("touchend", (a) => l(a, () => a.target instanceof HTMLElement ? a.target : null), !0), Fn("blur", (a) => l(a, () => window.document.activeElement instanceof HTMLIFrameElement ? window.document.activeElement : null), !0);
|
|
946
967
|
}
|
|
947
|
-
function
|
|
968
|
+
function on(e, t) {
|
|
948
969
|
if (e) return e;
|
|
949
970
|
let n = t ?? "button";
|
|
950
971
|
if (typeof n == "string" && n.toLowerCase() === "button") return "button";
|
|
951
972
|
}
|
|
952
|
-
function
|
|
953
|
-
let n =
|
|
973
|
+
function Bn(e, t) {
|
|
974
|
+
let n = E(on(e.value.type, e.value.as));
|
|
954
975
|
return z(() => {
|
|
955
|
-
n.value =
|
|
956
|
-
}),
|
|
976
|
+
n.value = on(e.value.type, e.value.as);
|
|
977
|
+
}), _(() => {
|
|
957
978
|
var l;
|
|
958
979
|
n.value || O(t) && O(t) instanceof HTMLButtonElement && !((l = O(t)) != null && l.hasAttribute("type")) && (n.value = "button");
|
|
959
980
|
}), n;
|
|
960
981
|
}
|
|
961
|
-
function
|
|
982
|
+
function an(e) {
|
|
962
983
|
return [e.screenX, e.screenY];
|
|
963
984
|
}
|
|
964
|
-
function
|
|
965
|
-
let e =
|
|
985
|
+
function br() {
|
|
986
|
+
let e = E([-1, -1]);
|
|
966
987
|
return { wasMoved(t) {
|
|
967
|
-
let n =
|
|
988
|
+
let n = an(t);
|
|
968
989
|
return e.value[0] === n[0] && e.value[1] === n[1] ? !1 : (e.value = n, !0);
|
|
969
990
|
}, update(t) {
|
|
970
|
-
e.value =
|
|
991
|
+
e.value = an(t);
|
|
971
992
|
} };
|
|
972
993
|
}
|
|
973
|
-
function
|
|
974
|
-
|
|
994
|
+
function wr({ container: e, accept: t, walk: n, enabled: l }) {
|
|
995
|
+
_(() => {
|
|
975
996
|
let r = e.value;
|
|
976
997
|
if (!r || l !== void 0 && !l.value) return;
|
|
977
998
|
let a = Ae(e);
|
|
@@ -980,37 +1001,37 @@ function gr({ container: e, accept: t, walk: n, enabled: l }) {
|
|
|
980
1001
|
for (; i.nextNode(); ) n(i.currentNode);
|
|
981
1002
|
});
|
|
982
1003
|
}
|
|
983
|
-
var
|
|
1004
|
+
var We = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(We || {}), ke = ((e) => (e[e.Unmount = 0] = "Unmount", e[e.Hidden = 1] = "Hidden", e))(ke || {});
|
|
984
1005
|
function q({ visible: e = !0, features: t = 0, ourProps: n, theirProps: l, ...r }) {
|
|
985
1006
|
var a;
|
|
986
|
-
let o =
|
|
987
|
-
if (e || t & 2 && o.static) return
|
|
1007
|
+
let o = Nn(l, n), i = Object.assign(r, { props: o });
|
|
1008
|
+
if (e || t & 2 && o.static) return Et(i);
|
|
988
1009
|
if (t & 1) {
|
|
989
1010
|
let s = (a = o.unmount) == null || a ? 0 : 1;
|
|
990
1011
|
return ge(s, { 0() {
|
|
991
1012
|
return null;
|
|
992
1013
|
}, 1() {
|
|
993
|
-
return
|
|
1014
|
+
return Et({ ...r, props: { ...o, hidden: !0, style: { display: "none" } } });
|
|
994
1015
|
} });
|
|
995
1016
|
}
|
|
996
|
-
return
|
|
1017
|
+
return Et(i);
|
|
997
1018
|
}
|
|
998
|
-
function
|
|
1019
|
+
function Et({ props: e, attrs: t, slots: n, slot: l, name: r }) {
|
|
999
1020
|
var a, o;
|
|
1000
|
-
let { as: i, ...s } =
|
|
1021
|
+
let { as: i, ...s } = Wt(e, ["unmount", "static"]), u = (a = n.default) == null ? void 0 : a.call(n, l), c = {};
|
|
1001
1022
|
if (l) {
|
|
1002
1023
|
let f = !1, d = [];
|
|
1003
1024
|
for (let [v, p] of Object.entries(l)) typeof p == "boolean" && (f = !0), p === !0 && d.push(v);
|
|
1004
1025
|
f && (c["data-headlessui-state"] = d.join(" "));
|
|
1005
1026
|
}
|
|
1006
1027
|
if (i === "template") {
|
|
1007
|
-
if (u =
|
|
1028
|
+
if (u = In(u ?? []), Object.keys(s).length > 0 || Object.keys(t).length > 0) {
|
|
1008
1029
|
let [f, ...d] = u ?? [];
|
|
1009
|
-
if (!
|
|
1030
|
+
if (!xr(f) || d.length > 0) throw new Error(['Passing props on "template"!', "", `The current component <${r} /> is rendering a "template".`, "However we need to passthrough the following props:", Object.keys(s).concat(Object.keys(t)).map((m) => m.trim()).filter((m, h, y) => y.indexOf(m) === h).sort((m, h) => m.localeCompare(h)).map((m) => ` - ${m}`).join(`
|
|
1010
1031
|
`), "", "You can apply a few solutions:", ['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".', "Render a single element as the child so that we can forward the props onto that element."].map((m) => ` - ${m}`).join(`
|
|
1011
1032
|
`)].join(`
|
|
1012
1033
|
`));
|
|
1013
|
-
let v =
|
|
1034
|
+
let v = Nn((o = f.props) != null ? o : {}, s, c), p = hl(f, v, !0);
|
|
1014
1035
|
for (let m in v) m.startsWith("on") && (p.props || (p.props = {}), p.props[m] = v[m]);
|
|
1015
1036
|
return p;
|
|
1016
1037
|
}
|
|
@@ -1018,10 +1039,10 @@ function xt({ props: e, attrs: t, slots: n, slot: l, name: r }) {
|
|
|
1018
1039
|
}
|
|
1019
1040
|
return K(i, Object.assign({}, s, c), { default: () => u });
|
|
1020
1041
|
}
|
|
1021
|
-
function
|
|
1022
|
-
return e.flatMap((t) => t.type ===
|
|
1042
|
+
function In(e) {
|
|
1043
|
+
return e.flatMap((t) => t.type === ie ? In(t.children) : [t]);
|
|
1023
1044
|
}
|
|
1024
|
-
function
|
|
1045
|
+
function Nn(...e) {
|
|
1025
1046
|
if (e.length === 0) return {};
|
|
1026
1047
|
if (e.length === 1) return e[0];
|
|
1027
1048
|
let t = {}, n = {};
|
|
@@ -1036,56 +1057,56 @@ function Mn(...e) {
|
|
|
1036
1057
|
} });
|
|
1037
1058
|
return t;
|
|
1038
1059
|
}
|
|
1039
|
-
function
|
|
1060
|
+
function $r(e) {
|
|
1040
1061
|
let t = Object.assign({}, e);
|
|
1041
1062
|
for (let n in t) t[n] === void 0 && delete t[n];
|
|
1042
1063
|
return t;
|
|
1043
1064
|
}
|
|
1044
|
-
function
|
|
1065
|
+
function Wt(e, t = []) {
|
|
1045
1066
|
let n = Object.assign({}, e);
|
|
1046
1067
|
for (let l of t) l in n && delete n[l];
|
|
1047
1068
|
return n;
|
|
1048
1069
|
}
|
|
1049
|
-
function
|
|
1070
|
+
function xr(e) {
|
|
1050
1071
|
return e == null ? !1 : typeof e.type == "string" || typeof e.type == "object" || typeof e.type == "function";
|
|
1051
1072
|
}
|
|
1052
|
-
var
|
|
1073
|
+
var Qe = ((e) => (e[e.None = 1] = "None", e[e.Focusable = 2] = "Focusable", e[e.Hidden = 4] = "Hidden", e))(Qe || {});
|
|
1053
1074
|
let ct = W({ name: "Hidden", props: { as: { type: [Object, String], default: "div" }, features: { type: Number, default: 1 } }, setup(e, { slots: t, attrs: n }) {
|
|
1054
1075
|
return () => {
|
|
1055
1076
|
var l;
|
|
1056
1077
|
let { features: r, ...a } = e, o = { "aria-hidden": (r & 2) === 2 ? !0 : (l = a["aria-hidden"]) != null ? l : void 0, hidden: (r & 4) === 4 ? !0 : void 0, style: { position: "fixed", top: 1, left: 1, width: 1, height: 0, padding: 0, margin: -1, overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0", ...(r & 4) === 4 && (r & 2) !== 2 && { display: "none" } } };
|
|
1057
1078
|
return q({ ourProps: o, theirProps: a, slot: {}, attrs: n, slots: t, name: "Hidden" });
|
|
1058
1079
|
};
|
|
1059
|
-
} }),
|
|
1080
|
+
} }), jn = Symbol("Context");
|
|
1060
1081
|
var G = ((e) => (e[e.Open = 1] = "Open", e[e.Closed = 2] = "Closed", e[e.Closing = 4] = "Closing", e[e.Opening = 8] = "Opening", e))(G || {});
|
|
1061
|
-
function
|
|
1062
|
-
return
|
|
1082
|
+
function Sr() {
|
|
1083
|
+
return gt() !== null;
|
|
1063
1084
|
}
|
|
1064
|
-
function
|
|
1065
|
-
return
|
|
1085
|
+
function gt() {
|
|
1086
|
+
return ee(jn, null);
|
|
1066
1087
|
}
|
|
1067
|
-
function
|
|
1068
|
-
|
|
1088
|
+
function Vn(e) {
|
|
1089
|
+
ue(jn, e);
|
|
1069
1090
|
}
|
|
1070
1091
|
var U = ((e) => (e.Space = " ", e.Enter = "Enter", e.Escape = "Escape", e.Backspace = "Backspace", e.Delete = "Delete", e.ArrowLeft = "ArrowLeft", e.ArrowUp = "ArrowUp", e.ArrowRight = "ArrowRight", e.ArrowDown = "ArrowDown", e.Home = "Home", e.End = "End", e.PageUp = "PageUp", e.PageDown = "PageDown", e.Tab = "Tab", e))(U || {});
|
|
1071
|
-
function
|
|
1092
|
+
function Er(e) {
|
|
1072
1093
|
function t() {
|
|
1073
1094
|
document.readyState !== "loading" && (e(), document.removeEventListener("DOMContentLoaded", t));
|
|
1074
1095
|
}
|
|
1075
1096
|
typeof window < "u" && typeof document < "u" && (document.addEventListener("DOMContentLoaded", t), t());
|
|
1076
1097
|
}
|
|
1077
1098
|
let Re = [];
|
|
1078
|
-
|
|
1099
|
+
Er(() => {
|
|
1079
1100
|
function e(t) {
|
|
1080
1101
|
t.target instanceof HTMLElement && t.target !== document.body && Re[0] !== t.target && (Re.unshift(t.target), Re = Re.filter((n) => n != null && n.isConnected), Re.splice(10));
|
|
1081
1102
|
}
|
|
1082
1103
|
window.addEventListener("click", e, { capture: !0 }), window.addEventListener("mousedown", e, { capture: !0 }), window.addEventListener("focus", e, { capture: !0 }), document.body.addEventListener("click", e, { capture: !0 }), document.body.addEventListener("mousedown", e, { capture: !0 }), document.body.addEventListener("focus", e, { capture: !0 });
|
|
1083
1104
|
});
|
|
1084
|
-
function
|
|
1105
|
+
function Tr(e) {
|
|
1085
1106
|
throw new Error("Unexpected object: " + e);
|
|
1086
1107
|
}
|
|
1087
|
-
var
|
|
1088
|
-
function
|
|
1108
|
+
var ae = ((e) => (e[e.First = 0] = "First", e[e.Previous = 1] = "Previous", e[e.Next = 2] = "Next", e[e.Last = 3] = "Last", e[e.Specific = 4] = "Specific", e[e.Nothing = 5] = "Nothing", e))(ae || {});
|
|
1109
|
+
function kr(e, t) {
|
|
1089
1110
|
let n = t.resolveItems();
|
|
1090
1111
|
if (n.length <= 0) return null;
|
|
1091
1112
|
let l = t.resolveActiveIndex(), r = l ?? -1;
|
|
@@ -1114,10 +1135,10 @@ function xr(e, t) {
|
|
|
1114
1135
|
case 5:
|
|
1115
1136
|
return null;
|
|
1116
1137
|
default:
|
|
1117
|
-
|
|
1138
|
+
Tr(e);
|
|
1118
1139
|
}
|
|
1119
1140
|
}
|
|
1120
|
-
function
|
|
1141
|
+
function Or(e) {
|
|
1121
1142
|
var t, n;
|
|
1122
1143
|
let l = (t = e == null ? void 0 : e.form) != null ? t : e.closest("form");
|
|
1123
1144
|
if (l) {
|
|
@@ -1128,19 +1149,19 @@ function Sr(e) {
|
|
|
1128
1149
|
(n = l.requestSubmit) == null || n.call(l);
|
|
1129
1150
|
}
|
|
1130
1151
|
}
|
|
1131
|
-
function
|
|
1132
|
-
|
|
1152
|
+
function Hn(e, t, n, l) {
|
|
1153
|
+
tt.isServer || _((r) => {
|
|
1133
1154
|
e = e ?? window, e.addEventListener(t, n, l), r(() => e.removeEventListener(t, n, l));
|
|
1134
1155
|
});
|
|
1135
1156
|
}
|
|
1136
|
-
var
|
|
1137
|
-
function
|
|
1138
|
-
let e =
|
|
1139
|
-
return
|
|
1157
|
+
var Ye = ((e) => (e[e.Forwards = 0] = "Forwards", e[e.Backwards = 1] = "Backwards", e))(Ye || {});
|
|
1158
|
+
function Lr() {
|
|
1159
|
+
let e = E(0);
|
|
1160
|
+
return Fn("keydown", (t) => {
|
|
1140
1161
|
t.key === "Tab" && (e.value = t.shiftKey ? 1 : 0);
|
|
1141
1162
|
}), e;
|
|
1142
1163
|
}
|
|
1143
|
-
function
|
|
1164
|
+
function Wn(e) {
|
|
1144
1165
|
if (!e) return /* @__PURE__ */ new Set();
|
|
1145
1166
|
if (typeof e == "function") return new Set(e());
|
|
1146
1167
|
let t = /* @__PURE__ */ new Set();
|
|
@@ -1150,26 +1171,26 @@ function jn(e) {
|
|
|
1150
1171
|
}
|
|
1151
1172
|
return t;
|
|
1152
1173
|
}
|
|
1153
|
-
var
|
|
1154
|
-
let
|
|
1155
|
-
let r =
|
|
1174
|
+
var Un = ((e) => (e[e.None = 1] = "None", e[e.InitialFocus = 2] = "InitialFocus", e[e.TabLock = 4] = "TabLock", e[e.FocusLock = 8] = "FocusLock", e[e.RestoreFocus = 16] = "RestoreFocus", e[e.All = 30] = "All", e))(Un || {});
|
|
1175
|
+
let qe = Object.assign(W({ name: "FocusTrap", props: { as: { type: [Object, String], default: "div" }, initialFocus: { type: Object, default: null }, features: { type: Number, default: 30 }, containers: { type: [Object, Function], default: E(/* @__PURE__ */ new Set()) } }, inheritAttrs: !1, setup(e, { attrs: t, slots: n, expose: l }) {
|
|
1176
|
+
let r = E(null);
|
|
1156
1177
|
l({ el: r, $el: r });
|
|
1157
|
-
let a = w(() => Ae(r)), o =
|
|
1158
|
-
z(() => o.value = !0),
|
|
1159
|
-
let i =
|
|
1160
|
-
|
|
1161
|
-
let s =
|
|
1178
|
+
let a = w(() => Ae(r)), o = E(!1);
|
|
1179
|
+
z(() => o.value = !0), ce(() => o.value = !1), Pr({ ownerDocument: a }, w(() => o.value && !!(e.features & 16)));
|
|
1180
|
+
let i = Ar({ ownerDocument: a, container: r, initialFocus: w(() => e.initialFocus) }, w(() => o.value && !!(e.features & 2)));
|
|
1181
|
+
Dr({ ownerDocument: a, container: r, containers: e.containers, previousActiveElement: i }, w(() => o.value && !!(e.features & 8)));
|
|
1182
|
+
let s = Lr();
|
|
1162
1183
|
function u(v) {
|
|
1163
1184
|
let p = O(r);
|
|
1164
1185
|
p && ((m) => m())(() => {
|
|
1165
|
-
ge(s.value, { [
|
|
1186
|
+
ge(s.value, { [Ye.Forwards]: () => {
|
|
1166
1187
|
Ge(p, we.First, { skipElements: [v.relatedTarget] });
|
|
1167
|
-
}, [
|
|
1188
|
+
}, [Ye.Backwards]: () => {
|
|
1168
1189
|
Ge(p, we.Last, { skipElements: [v.relatedTarget] });
|
|
1169
1190
|
} });
|
|
1170
1191
|
});
|
|
1171
1192
|
}
|
|
1172
|
-
let c =
|
|
1193
|
+
let c = E(!1);
|
|
1173
1194
|
function f(v) {
|
|
1174
1195
|
v.key === "Tab" && (c.value = !0, requestAnimationFrame(() => {
|
|
1175
1196
|
c.value = !1;
|
|
@@ -1177,20 +1198,20 @@ let ze = Object.assign(W({ name: "FocusTrap", props: { as: { type: [Object, Stri
|
|
|
1177
1198
|
}
|
|
1178
1199
|
function d(v) {
|
|
1179
1200
|
if (!o.value) return;
|
|
1180
|
-
let p =
|
|
1201
|
+
let p = Wn(e.containers);
|
|
1181
1202
|
O(r) instanceof HTMLElement && p.add(O(r));
|
|
1182
1203
|
let m = v.relatedTarget;
|
|
1183
|
-
m instanceof HTMLElement && m.dataset.headlessuiFocusGuard !== "true" && (
|
|
1204
|
+
m instanceof HTMLElement && m.dataset.headlessuiFocusGuard !== "true" && (zn(p, m) || (c.value ? Ge(O(r), ge(s.value, { [Ye.Forwards]: () => we.Next, [Ye.Backwards]: () => we.Previous }) | we.WrapAround, { relativeTo: v.target }) : v.target instanceof HTMLElement && Le(v.target)));
|
|
1184
1205
|
}
|
|
1185
1206
|
return () => {
|
|
1186
|
-
let v = {}, p = { ref: r, onKeydown: f, onFocusout: d }, { features: m, initialFocus:
|
|
1187
|
-
return K(
|
|
1207
|
+
let v = {}, p = { ref: r, onKeydown: f, onFocusout: d }, { features: m, initialFocus: h, containers: y, ...b } = e;
|
|
1208
|
+
return K(ie, [!!(m & 4) && K(ct, { as: "button", type: "button", "data-headlessui-focus-guard": !0, onFocus: u, features: Qe.Focusable }), q({ ourProps: p, theirProps: { ...t, ...b }, slot: v, attrs: t, slots: n, name: "FocusTrap" }), !!(m & 4) && K(ct, { as: "button", type: "button", "data-headlessui-focus-guard": !0, onFocus: u, features: Qe.Focusable })]);
|
|
1188
1209
|
};
|
|
1189
|
-
} }), { features:
|
|
1190
|
-
function
|
|
1191
|
-
let t =
|
|
1210
|
+
} }), { features: Un });
|
|
1211
|
+
function Cr(e) {
|
|
1212
|
+
let t = E(Re.slice());
|
|
1192
1213
|
return me([e], ([n], [l]) => {
|
|
1193
|
-
l === !0 && n === !1 ?
|
|
1214
|
+
l === !0 && n === !1 ? jt(() => {
|
|
1194
1215
|
t.value.splice(0);
|
|
1195
1216
|
}) : l === !1 && n === !0 && (t.value = Re.slice());
|
|
1196
1217
|
}, { flush: "post" }), () => {
|
|
@@ -1198,24 +1219,24 @@ function Tr(e) {
|
|
|
1198
1219
|
return (n = t.value.find((l) => l != null && l.isConnected)) != null ? n : null;
|
|
1199
1220
|
};
|
|
1200
1221
|
}
|
|
1201
|
-
function
|
|
1202
|
-
let n =
|
|
1222
|
+
function Pr({ ownerDocument: e }, t) {
|
|
1223
|
+
let n = Cr(t);
|
|
1203
1224
|
z(() => {
|
|
1204
|
-
|
|
1225
|
+
_(() => {
|
|
1205
1226
|
var l, r;
|
|
1206
1227
|
t.value || ((l = e.value) == null ? void 0 : l.activeElement) === ((r = e.value) == null ? void 0 : r.body) && Le(n());
|
|
1207
1228
|
}, { flush: "post" });
|
|
1208
|
-
}),
|
|
1229
|
+
}), ce(() => {
|
|
1209
1230
|
t.value && Le(n());
|
|
1210
1231
|
});
|
|
1211
1232
|
}
|
|
1212
|
-
function
|
|
1213
|
-
let r =
|
|
1214
|
-
return z(() => a.value = !0),
|
|
1233
|
+
function Ar({ ownerDocument: e, container: t, initialFocus: n }, l) {
|
|
1234
|
+
let r = E(null), a = E(!1);
|
|
1235
|
+
return z(() => a.value = !0), ce(() => a.value = !1), z(() => {
|
|
1215
1236
|
me([t, n, l], (o, i) => {
|
|
1216
1237
|
if (o.every((u, c) => (i == null ? void 0 : i[c]) === u) || !l.value) return;
|
|
1217
1238
|
let s = O(t);
|
|
1218
|
-
s &&
|
|
1239
|
+
s && jt(() => {
|
|
1219
1240
|
var u, c;
|
|
1220
1241
|
if (!a.value) return;
|
|
1221
1242
|
let f = O(n), d = (u = e.value) == null ? void 0 : u.activeElement;
|
|
@@ -1228,34 +1249,34 @@ function Or({ ownerDocument: e, container: t, initialFocus: n }, l) {
|
|
|
1228
1249
|
r.value = d;
|
|
1229
1250
|
return;
|
|
1230
1251
|
}
|
|
1231
|
-
f ? Le(f) : Ge(s, we.First | we.NoScroll) ===
|
|
1252
|
+
f ? Le(f) : Ge(s, we.First | we.NoScroll) === Cn.Error && console.warn("There are no focusable elements inside the <FocusTrap />"), r.value = (c = e.value) == null ? void 0 : c.activeElement;
|
|
1232
1253
|
});
|
|
1233
1254
|
}, { immediate: !0, flush: "post" });
|
|
1234
1255
|
}), r;
|
|
1235
1256
|
}
|
|
1236
|
-
function
|
|
1257
|
+
function Dr({ ownerDocument: e, container: t, containers: n, previousActiveElement: l }, r) {
|
|
1237
1258
|
var a;
|
|
1238
|
-
|
|
1259
|
+
Hn((a = e.value) == null ? void 0 : a.defaultView, "focus", (o) => {
|
|
1239
1260
|
if (!r.value) return;
|
|
1240
|
-
let i =
|
|
1261
|
+
let i = Wn(n);
|
|
1241
1262
|
O(t) instanceof HTMLElement && i.add(O(t));
|
|
1242
1263
|
let s = l.value;
|
|
1243
1264
|
if (!s) return;
|
|
1244
1265
|
let u = o.target;
|
|
1245
|
-
u && u instanceof HTMLElement ?
|
|
1266
|
+
u && u instanceof HTMLElement ? zn(i, u) ? (l.value = u, Le(u)) : (o.preventDefault(), o.stopPropagation(), Le(s)) : Le(l.value);
|
|
1246
1267
|
}, !0);
|
|
1247
1268
|
}
|
|
1248
|
-
function
|
|
1269
|
+
function zn(e, t) {
|
|
1249
1270
|
for (let n of e) if (n.contains(t)) return !0;
|
|
1250
1271
|
return !1;
|
|
1251
1272
|
}
|
|
1252
|
-
function
|
|
1253
|
-
let t =
|
|
1254
|
-
return
|
|
1273
|
+
function Rr(e) {
|
|
1274
|
+
let t = Ze(e.getSnapshot());
|
|
1275
|
+
return ce(e.subscribe(() => {
|
|
1255
1276
|
t.value = e.getSnapshot();
|
|
1256
1277
|
})), t;
|
|
1257
1278
|
}
|
|
1258
|
-
function
|
|
1279
|
+
function Fr(e, t) {
|
|
1259
1280
|
let n = e(), l = /* @__PURE__ */ new Set();
|
|
1260
1281
|
return { getSnapshot() {
|
|
1261
1282
|
return n;
|
|
@@ -1266,7 +1287,7 @@ function Pr(e, t) {
|
|
|
1266
1287
|
o && (n = o, l.forEach((i) => i()));
|
|
1267
1288
|
} };
|
|
1268
1289
|
}
|
|
1269
|
-
function
|
|
1290
|
+
function Mr() {
|
|
1270
1291
|
let e;
|
|
1271
1292
|
return { before({ doc: t }) {
|
|
1272
1293
|
var n;
|
|
@@ -1277,15 +1298,15 @@ function Ar() {
|
|
|
1277
1298
|
n.style(l, "paddingRight", `${a}px`);
|
|
1278
1299
|
} };
|
|
1279
1300
|
}
|
|
1280
|
-
function
|
|
1281
|
-
return
|
|
1301
|
+
function Br() {
|
|
1302
|
+
return Rn() ? { before({ doc: e, d: t, meta: n }) {
|
|
1282
1303
|
function l(r) {
|
|
1283
1304
|
return n.containers.flatMap((a) => a()).some((a) => a.contains(r));
|
|
1284
1305
|
}
|
|
1285
1306
|
t.microTask(() => {
|
|
1286
1307
|
var r;
|
|
1287
1308
|
if (window.getComputedStyle(e.documentElement).scrollBehavior !== "auto") {
|
|
1288
|
-
let i =
|
|
1309
|
+
let i = et();
|
|
1289
1310
|
i.style(e.documentElement, "scrollBehavior", "auto"), t.add(() => t.microTask(() => i.dispose()));
|
|
1290
1311
|
}
|
|
1291
1312
|
let a = (r = window.scrollY) != null ? r : window.pageYOffset, o = null;
|
|
@@ -1320,25 +1341,25 @@ function Dr() {
|
|
|
1320
1341
|
});
|
|
1321
1342
|
} } : {};
|
|
1322
1343
|
}
|
|
1323
|
-
function
|
|
1344
|
+
function Ir() {
|
|
1324
1345
|
return { before({ doc: e, d: t }) {
|
|
1325
1346
|
t.style(e.documentElement, "overflow", "hidden");
|
|
1326
1347
|
} };
|
|
1327
1348
|
}
|
|
1328
|
-
function
|
|
1349
|
+
function Nr(e) {
|
|
1329
1350
|
let t = {};
|
|
1330
1351
|
for (let n of e) Object.assign(t, n(t));
|
|
1331
1352
|
return t;
|
|
1332
1353
|
}
|
|
1333
|
-
let Fe =
|
|
1354
|
+
let Fe = Fr(() => /* @__PURE__ */ new Map(), { PUSH(e, t) {
|
|
1334
1355
|
var n;
|
|
1335
|
-
let l = (n = this.get(e)) != null ? n : { doc: e, count: 0, d:
|
|
1356
|
+
let l = (n = this.get(e)) != null ? n : { doc: e, count: 0, d: et(), meta: /* @__PURE__ */ new Set() };
|
|
1336
1357
|
return l.count++, l.meta.add(t), this.set(e, l), this;
|
|
1337
1358
|
}, POP(e, t) {
|
|
1338
1359
|
let n = this.get(e);
|
|
1339
1360
|
return n && (n.count--, n.meta.delete(t)), this;
|
|
1340
1361
|
}, SCROLL_PREVENT({ doc: e, d: t, meta: n }) {
|
|
1341
|
-
let l = { doc: e, d: t, meta:
|
|
1362
|
+
let l = { doc: e, d: t, meta: Nr(n) }, r = [Br(), Mr(), Ir()];
|
|
1342
1363
|
r.forEach(({ before: a }) => a == null ? void 0 : a(l)), r.forEach(({ after: a }) => a == null ? void 0 : a(l));
|
|
1343
1364
|
}, SCROLL_ALLOW({ d: e }) {
|
|
1344
1365
|
e.dispose();
|
|
@@ -1353,8 +1374,8 @@ Fe.subscribe(() => {
|
|
|
1353
1374
|
(r && !l || !r && l) && Fe.dispatch(n.count > 0 ? "SCROLL_PREVENT" : "SCROLL_ALLOW", n), n.count === 0 && Fe.dispatch("TEARDOWN", n);
|
|
1354
1375
|
}
|
|
1355
1376
|
});
|
|
1356
|
-
function
|
|
1357
|
-
let l =
|
|
1377
|
+
function jr(e, t, n) {
|
|
1378
|
+
let l = Rr(Fe), r = w(() => {
|
|
1358
1379
|
let a = e.value ? l.value.get(e.value) : void 0;
|
|
1359
1380
|
return a ? a.count > 0 : !1;
|
|
1360
1381
|
});
|
|
@@ -1367,9 +1388,9 @@ function Mr(e, t, n) {
|
|
|
1367
1388
|
});
|
|
1368
1389
|
}, { immediate: !0 }), r;
|
|
1369
1390
|
}
|
|
1370
|
-
let
|
|
1371
|
-
function
|
|
1372
|
-
|
|
1391
|
+
let Tt = /* @__PURE__ */ new Map(), Ke = /* @__PURE__ */ new Map();
|
|
1392
|
+
function sn(e, t = E(!0)) {
|
|
1393
|
+
_((n) => {
|
|
1373
1394
|
var l;
|
|
1374
1395
|
if (!t.value) return;
|
|
1375
1396
|
let r = O(e);
|
|
@@ -1377,17 +1398,17 @@ function an(e, t = x(!0)) {
|
|
|
1377
1398
|
n(function() {
|
|
1378
1399
|
var o;
|
|
1379
1400
|
if (!r) return;
|
|
1380
|
-
let i = (o =
|
|
1381
|
-
if (i === 1 ?
|
|
1382
|
-
let s =
|
|
1383
|
-
s && (s["aria-hidden"] === null ? r.removeAttribute("aria-hidden") : r.setAttribute("aria-hidden", s["aria-hidden"]), r.inert = s.inert,
|
|
1401
|
+
let i = (o = Ke.get(r)) != null ? o : 1;
|
|
1402
|
+
if (i === 1 ? Ke.delete(r) : Ke.set(r, i - 1), i !== 1) return;
|
|
1403
|
+
let s = Tt.get(r);
|
|
1404
|
+
s && (s["aria-hidden"] === null ? r.removeAttribute("aria-hidden") : r.setAttribute("aria-hidden", s["aria-hidden"]), r.inert = s.inert, Tt.delete(r));
|
|
1384
1405
|
});
|
|
1385
|
-
let a = (l =
|
|
1386
|
-
|
|
1406
|
+
let a = (l = Ke.get(r)) != null ? l : 0;
|
|
1407
|
+
Ke.set(r, a + 1), a === 0 && (Tt.set(r, { "aria-hidden": r.getAttribute("aria-hidden"), inert: r.inert }), r.setAttribute("aria-hidden", "true"), r.inert = !0);
|
|
1387
1408
|
});
|
|
1388
1409
|
}
|
|
1389
|
-
function
|
|
1390
|
-
let l =
|
|
1410
|
+
function Vr({ defaultContainers: e = [], portals: t, mainTreeNodeRef: n } = {}) {
|
|
1411
|
+
let l = E(null), r = Ae(l);
|
|
1391
1412
|
function a() {
|
|
1392
1413
|
var o, i, s;
|
|
1393
1414
|
let u = [];
|
|
@@ -1399,26 +1420,26 @@ function Br({ defaultContainers: e = [], portals: t, mainTreeNodeRef: n } = {})
|
|
|
1399
1420
|
return { resolveContainers: a, contains(o) {
|
|
1400
1421
|
return a().some((i) => i.contains(o));
|
|
1401
1422
|
}, mainTreeNodeRef: l, MainTreeNode() {
|
|
1402
|
-
return n != null ? null : K(ct, { features:
|
|
1423
|
+
return n != null ? null : K(ct, { features: Qe.Hidden, ref: l });
|
|
1403
1424
|
} };
|
|
1404
1425
|
}
|
|
1405
|
-
let
|
|
1406
|
-
function
|
|
1407
|
-
return
|
|
1426
|
+
let qn = Symbol("ForcePortalRootContext");
|
|
1427
|
+
function Hr() {
|
|
1428
|
+
return ee(qn, !1);
|
|
1408
1429
|
}
|
|
1409
|
-
let
|
|
1410
|
-
return
|
|
1430
|
+
let Ct = W({ name: "ForcePortalRoot", props: { as: { type: [Object, String], default: "template" }, force: { type: Boolean, default: !1 } }, setup(e, { slots: t, attrs: n }) {
|
|
1431
|
+
return ue(qn, e.force), () => {
|
|
1411
1432
|
let { force: l, ...r } = e;
|
|
1412
1433
|
return q({ theirProps: r, ourProps: {}, slot: {}, slots: t, attrs: n, name: "ForcePortalRoot" });
|
|
1413
1434
|
};
|
|
1414
|
-
} }),
|
|
1415
|
-
var
|
|
1416
|
-
function
|
|
1417
|
-
return
|
|
1435
|
+
} }), Kn = Symbol("StackContext");
|
|
1436
|
+
var Pt = ((e) => (e[e.Add = 0] = "Add", e[e.Remove = 1] = "Remove", e))(Pt || {});
|
|
1437
|
+
function Wr() {
|
|
1438
|
+
return ee(Kn, () => {
|
|
1418
1439
|
});
|
|
1419
1440
|
}
|
|
1420
|
-
function
|
|
1421
|
-
let r =
|
|
1441
|
+
function Ur({ type: e, enabled: t, element: n, onUpdate: l }) {
|
|
1442
|
+
let r = Wr();
|
|
1422
1443
|
function a(...o) {
|
|
1423
1444
|
l == null || l(...o), r(...o);
|
|
1424
1445
|
}
|
|
@@ -1426,35 +1447,35 @@ function jr({ type: e, enabled: t, element: n, onUpdate: l }) {
|
|
|
1426
1447
|
me(t, (o, i) => {
|
|
1427
1448
|
o ? a(0, e, n) : i === !0 && a(1, e, n);
|
|
1428
1449
|
}, { immediate: !0, flush: "sync" });
|
|
1429
|
-
}),
|
|
1450
|
+
}), ce(() => {
|
|
1430
1451
|
t.value && a(1, e, n);
|
|
1431
|
-
}),
|
|
1452
|
+
}), ue(Kn, a);
|
|
1432
1453
|
}
|
|
1433
|
-
let
|
|
1434
|
-
function
|
|
1435
|
-
let e =
|
|
1454
|
+
let Yn = Symbol("DescriptionContext");
|
|
1455
|
+
function zr() {
|
|
1456
|
+
let e = ee(Yn, null);
|
|
1436
1457
|
if (e === null) throw new Error("Missing parent");
|
|
1437
1458
|
return e;
|
|
1438
1459
|
}
|
|
1439
|
-
function
|
|
1440
|
-
let l =
|
|
1460
|
+
function Zn({ slot: e = E({}), name: t = "Description", props: n = {} } = {}) {
|
|
1461
|
+
let l = E([]);
|
|
1441
1462
|
function r(a) {
|
|
1442
1463
|
return l.value.push(a), () => {
|
|
1443
1464
|
let o = l.value.indexOf(a);
|
|
1444
1465
|
o !== -1 && l.value.splice(o, 1);
|
|
1445
1466
|
};
|
|
1446
1467
|
}
|
|
1447
|
-
return
|
|
1468
|
+
return ue(Yn, { register: r, slot: e, name: t, props: n }), w(() => l.value.length > 0 ? l.value.join(" ") : void 0);
|
|
1448
1469
|
}
|
|
1449
1470
|
W({ name: "Description", props: { as: { type: [Object, String], default: "p" }, id: { type: String, default: null } }, setup(e, { attrs: t, slots: n }) {
|
|
1450
1471
|
var l;
|
|
1451
|
-
let r = (l = e.id) != null ? l : `headlessui-description-${ve()}`, a =
|
|
1452
|
-
return z(() =>
|
|
1453
|
-
let { name: o = "Description", slot: i =
|
|
1472
|
+
let r = (l = e.id) != null ? l : `headlessui-description-${ve()}`, a = zr();
|
|
1473
|
+
return z(() => ce(a.register(r))), () => {
|
|
1474
|
+
let { name: o = "Description", slot: i = E({}), props: s = {} } = a, { ...u } = e, c = { ...Object.entries(s).reduce((f, [d, v]) => Object.assign(f, { [d]: $(v) }), {}), id: r };
|
|
1454
1475
|
return q({ ourProps: c, theirProps: u, slot: i.value, attrs: t, slots: n, name: o });
|
|
1455
1476
|
};
|
|
1456
1477
|
} });
|
|
1457
|
-
function
|
|
1478
|
+
function qr(e) {
|
|
1458
1479
|
let t = Ae(e);
|
|
1459
1480
|
if (!t) {
|
|
1460
1481
|
if (e === null) return null;
|
|
@@ -1465,41 +1486,41 @@ function Hr(e) {
|
|
|
1465
1486
|
let l = t.createElement("div");
|
|
1466
1487
|
return l.setAttribute("id", "headlessui-portal-root"), t.body.appendChild(l);
|
|
1467
1488
|
}
|
|
1468
|
-
const
|
|
1469
|
-
function
|
|
1489
|
+
const At = /* @__PURE__ */ new WeakMap();
|
|
1490
|
+
function Kr(e) {
|
|
1470
1491
|
var t;
|
|
1471
|
-
return (t =
|
|
1492
|
+
return (t = At.get(e)) != null ? t : 0;
|
|
1472
1493
|
}
|
|
1473
|
-
function
|
|
1474
|
-
let n = t(
|
|
1475
|
-
return n <= 0 ?
|
|
1494
|
+
function un(e, t) {
|
|
1495
|
+
let n = t(Kr(e));
|
|
1496
|
+
return n <= 0 ? At.delete(e) : At.set(e, n), n;
|
|
1476
1497
|
}
|
|
1477
|
-
let
|
|
1478
|
-
let l =
|
|
1479
|
-
i.value &&
|
|
1480
|
-
let s =
|
|
1498
|
+
let Gn = W({ name: "Portal", props: { as: { type: [Object, String], default: "div" } }, setup(e, { slots: t, attrs: n }) {
|
|
1499
|
+
let l = E(null), r = w(() => Ae(l)), a = Hr(), o = ee(Xn, null), i = E(a === !0 || o == null ? qr(l.value) : o.resolveTarget());
|
|
1500
|
+
i.value && un(i.value, (d) => d + 1);
|
|
1501
|
+
let s = E(!1);
|
|
1481
1502
|
z(() => {
|
|
1482
1503
|
s.value = !0;
|
|
1483
|
-
}),
|
|
1504
|
+
}), _(() => {
|
|
1484
1505
|
a || o != null && (i.value = o.resolveTarget());
|
|
1485
1506
|
});
|
|
1486
|
-
let u =
|
|
1507
|
+
let u = ee(Dt, null), c = !1, f = Sn();
|
|
1487
1508
|
return me(l, () => {
|
|
1488
1509
|
if (c || !u) return;
|
|
1489
1510
|
let d = O(l);
|
|
1490
|
-
d && (
|
|
1491
|
-
}),
|
|
1511
|
+
d && (ce(u.register(d), f), c = !0);
|
|
1512
|
+
}), ce(() => {
|
|
1492
1513
|
var d, v;
|
|
1493
1514
|
let p = (d = r.value) == null ? void 0 : d.getElementById("headlessui-portal-root");
|
|
1494
|
-
!p || i.value !== p ||
|
|
1515
|
+
!p || i.value !== p || un(i.value, (m) => m - 1) || i.value.children.length > 0 || (v = i.value.parentElement) == null || v.removeChild(i.value);
|
|
1495
1516
|
}), () => {
|
|
1496
1517
|
if (!s.value || i.value === null) return null;
|
|
1497
1518
|
let d = { ref: l, "data-headlessui-portal": "" };
|
|
1498
|
-
return K(
|
|
1519
|
+
return K(yl, { to: i.value }, q({ ourProps: d, theirProps: e, slot: {}, attrs: n, slots: t, name: "Portal" }));
|
|
1499
1520
|
};
|
|
1500
|
-
} }),
|
|
1501
|
-
function
|
|
1502
|
-
let e =
|
|
1521
|
+
} }), Dt = Symbol("PortalParentContext");
|
|
1522
|
+
function Yr() {
|
|
1523
|
+
let e = ee(Dt, null), t = E([]);
|
|
1503
1524
|
function n(a) {
|
|
1504
1525
|
return t.value.push(a), e && e.register(a), () => l(a);
|
|
1505
1526
|
}
|
|
@@ -1509,92 +1530,92 @@ function Ur() {
|
|
|
1509
1530
|
}
|
|
1510
1531
|
let r = { register: n, unregister: l, portals: t };
|
|
1511
1532
|
return [t, W({ name: "PortalWrapper", setup(a, { slots: o }) {
|
|
1512
|
-
return
|
|
1533
|
+
return ue(Dt, r), () => {
|
|
1513
1534
|
var i;
|
|
1514
1535
|
return (i = o.default) == null ? void 0 : i.call(o);
|
|
1515
1536
|
};
|
|
1516
1537
|
} })];
|
|
1517
1538
|
}
|
|
1518
|
-
let
|
|
1519
|
-
let l =
|
|
1539
|
+
let Xn = Symbol("PortalGroupContext"), Zr = W({ name: "PortalGroup", props: { as: { type: [Object, String], default: "template" }, target: { type: Object, default: null } }, setup(e, { attrs: t, slots: n }) {
|
|
1540
|
+
let l = bl({ resolveTarget() {
|
|
1520
1541
|
return e.target;
|
|
1521
1542
|
} });
|
|
1522
|
-
return
|
|
1543
|
+
return ue(Xn, l), () => {
|
|
1523
1544
|
let { target: r, ...a } = e;
|
|
1524
1545
|
return q({ theirProps: a, ourProps: {}, slot: {}, attrs: t, slots: n, name: "PortalGroup" });
|
|
1525
1546
|
};
|
|
1526
1547
|
} });
|
|
1527
|
-
var
|
|
1528
|
-
let
|
|
1529
|
-
function
|
|
1530
|
-
let t =
|
|
1548
|
+
var Gr = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(Gr || {});
|
|
1549
|
+
let Rt = Symbol("DialogContext");
|
|
1550
|
+
function nt(e) {
|
|
1551
|
+
let t = ee(Rt, null);
|
|
1531
1552
|
if (t === null) {
|
|
1532
1553
|
let n = new Error(`<${e} /> is missing a parent <Dialog /> component.`);
|
|
1533
|
-
throw Error.captureStackTrace && Error.captureStackTrace(n,
|
|
1554
|
+
throw Error.captureStackTrace && Error.captureStackTrace(n, nt), n;
|
|
1534
1555
|
}
|
|
1535
1556
|
return t;
|
|
1536
1557
|
}
|
|
1537
|
-
let
|
|
1558
|
+
let it = "DC8F892D-2EBD-447C-A4C8-A03058436FF4", Qn = W({ name: "Dialog", inheritAttrs: !1, props: { as: { type: [Object, String], default: "div" }, static: { type: Boolean, default: !1 }, unmount: { type: Boolean, default: !0 }, open: { type: [Boolean, String], default: it }, initialFocus: { type: Object, default: null }, id: { type: String, default: null }, role: { type: String, default: "dialog" } }, emits: { close: (e) => !0 }, setup(e, { emit: t, attrs: n, slots: l, expose: r }) {
|
|
1538
1559
|
var a, o;
|
|
1539
|
-
let i = (a = e.id) != null ? a : `headlessui-dialog-${ve()}`, s =
|
|
1560
|
+
let i = (a = e.id) != null ? a : `headlessui-dialog-${ve()}`, s = E(!1);
|
|
1540
1561
|
z(() => {
|
|
1541
1562
|
s.value = !0;
|
|
1542
1563
|
});
|
|
1543
|
-
let u = !1, c = w(() => e.role === "dialog" || e.role === "alertdialog" ? e.role : (u || (u = !0, console.warn(`Invalid role [${c}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)), "dialog")), f =
|
|
1544
|
-
if (r({ el: p, $el: p }), !(e.open !==
|
|
1545
|
-
if (typeof v.value != "boolean") throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${v.value ===
|
|
1546
|
-
let
|
|
1547
|
-
var
|
|
1548
|
-
return (
|
|
1549
|
-
})] }), X = w(() =>
|
|
1550
|
-
var
|
|
1551
|
-
return (
|
|
1564
|
+
let u = !1, c = w(() => e.role === "dialog" || e.role === "alertdialog" ? e.role : (u || (u = !0, console.warn(`Invalid role [${c}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)), "dialog")), f = E(0), d = gt(), v = w(() => e.open === it && d !== null ? (d.value & G.Open) === G.Open : e.open), p = E(null), m = w(() => Ae(p));
|
|
1565
|
+
if (r({ el: p, $el: p }), !(e.open !== it || d !== null)) throw new Error("You forgot to provide an `open` prop to the `Dialog`.");
|
|
1566
|
+
if (typeof v.value != "boolean") throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${v.value === it ? void 0 : e.open}`);
|
|
1567
|
+
let h = w(() => s.value && v.value ? 0 : 1), y = w(() => h.value === 0), b = w(() => f.value > 1), T = ee(Rt, null) !== null, [A, C] = Yr(), { resolveContainers: I, mainTreeNodeRef: L, MainTreeNode: j } = Vr({ portals: A, defaultContainers: [w(() => {
|
|
1568
|
+
var F;
|
|
1569
|
+
return (F = be.panelRef.value) != null ? F : p.value;
|
|
1570
|
+
})] }), X = w(() => b.value ? "parent" : "leaf"), V = w(() => d !== null ? (d.value & G.Closing) === G.Closing : !1), Q = w(() => T || V.value ? !1 : y.value), te = w(() => {
|
|
1571
|
+
var F, H, de;
|
|
1572
|
+
return (de = Array.from((H = (F = m.value) == null ? void 0 : F.querySelectorAll("body > *")) != null ? H : []).find((fe) => fe.id === "headlessui-portal-root" ? !1 : fe.contains(O(L)) && fe instanceof HTMLElement)) != null ? de : null;
|
|
1552
1573
|
});
|
|
1553
|
-
|
|
1554
|
-
let
|
|
1555
|
-
var
|
|
1556
|
-
return (
|
|
1574
|
+
sn(te, Q);
|
|
1575
|
+
let Z = w(() => b.value ? !0 : y.value), ne = w(() => {
|
|
1576
|
+
var F, H, de;
|
|
1577
|
+
return (de = Array.from((H = (F = m.value) == null ? void 0 : F.querySelectorAll("[data-headlessui-portal]")) != null ? H : []).find((fe) => fe.contains(O(L)) && fe instanceof HTMLElement)) != null ? de : null;
|
|
1557
1578
|
});
|
|
1558
|
-
|
|
1559
|
-
if (
|
|
1579
|
+
sn(ne, Z), Ur({ type: "Dialog", enabled: w(() => h.value === 0), element: p, onUpdate: (F, H) => {
|
|
1580
|
+
if (H === "Dialog") return ge(F, { [Pt.Add]: () => f.value += 1, [Pt.Remove]: () => f.value -= 1 });
|
|
1560
1581
|
} });
|
|
1561
|
-
let
|
|
1562
|
-
|
|
1582
|
+
let le = Zn({ name: "DialogDescription", slot: w(() => ({ open: v.value })) }), re = E(null), be = { titleId: re, panelRef: E(null), dialogState: h, setTitleId(F) {
|
|
1583
|
+
re.value !== F && (re.value = F);
|
|
1563
1584
|
}, close() {
|
|
1564
1585
|
t("close", !1);
|
|
1565
1586
|
} };
|
|
1566
|
-
|
|
1567
|
-
let
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
},
|
|
1571
|
-
let
|
|
1572
|
-
|
|
1573
|
-
|
|
1587
|
+
ue(Rt, be);
|
|
1588
|
+
let _t = w(() => !(!y.value || b.value));
|
|
1589
|
+
Mn(I, (F, H) => {
|
|
1590
|
+
F.preventDefault(), be.close(), Oe(() => H == null ? void 0 : H.focus());
|
|
1591
|
+
}, _t);
|
|
1592
|
+
let en = w(() => !(b.value || h.value !== 0));
|
|
1593
|
+
Hn((o = m.value) == null ? void 0 : o.defaultView, "keydown", (F) => {
|
|
1594
|
+
en.value && (F.defaultPrevented || F.key === U.Escape && (F.preventDefault(), F.stopPropagation(), be.close()));
|
|
1574
1595
|
});
|
|
1575
|
-
let
|
|
1576
|
-
return
|
|
1577
|
-
var
|
|
1578
|
-
return { containers: [...(
|
|
1579
|
-
}),
|
|
1580
|
-
if (
|
|
1581
|
-
let
|
|
1582
|
-
if (!
|
|
1583
|
-
let
|
|
1584
|
-
for (let
|
|
1585
|
-
let
|
|
1586
|
-
|
|
1596
|
+
let tn = w(() => !(V.value || h.value !== 0 || T));
|
|
1597
|
+
return jr(m, tn, (F) => {
|
|
1598
|
+
var H;
|
|
1599
|
+
return { containers: [...(H = F.containers) != null ? H : [], I] };
|
|
1600
|
+
}), _((F) => {
|
|
1601
|
+
if (h.value !== 0) return;
|
|
1602
|
+
let H = O(p);
|
|
1603
|
+
if (!H) return;
|
|
1604
|
+
let de = new ResizeObserver((fe) => {
|
|
1605
|
+
for (let St of fe) {
|
|
1606
|
+
let ot = St.target.getBoundingClientRect();
|
|
1607
|
+
ot.x === 0 && ot.y === 0 && ot.width === 0 && ot.height === 0 && be.close();
|
|
1587
1608
|
}
|
|
1588
1609
|
});
|
|
1589
|
-
|
|
1610
|
+
de.observe(H), F(() => de.disconnect());
|
|
1590
1611
|
}), () => {
|
|
1591
|
-
let { open:
|
|
1592
|
-
return K(
|
|
1612
|
+
let { open: F, initialFocus: H, ...de } = e, fe = { ...n, ref: p, id: i, role: c.value, "aria-modal": h.value === 0 ? !0 : void 0, "aria-labelledby": re.value, "aria-describedby": le.value }, St = { open: h.value === 0 };
|
|
1613
|
+
return K(Ct, { force: !0 }, () => [K(Gn, () => K(Zr, { target: p.value }, () => K(Ct, { force: !1 }, () => K(qe, { initialFocus: H, containers: I, features: y.value ? ge(X.value, { parent: qe.features.RestoreFocus, leaf: qe.features.All & ~qe.features.FocusLock }) : qe.features.None }, () => K(C, {}, () => q({ ourProps: fe, theirProps: { ...de, ...n }, slot: St, attrs: n, slots: l, visible: h.value === 0, features: We.RenderStrategy | We.Static, name: "Dialog" })))))), K(j)]);
|
|
1593
1614
|
};
|
|
1594
1615
|
} });
|
|
1595
1616
|
W({ name: "DialogOverlay", props: { as: { type: [Object, String], default: "div" }, id: { type: String, default: null } }, setup(e, { attrs: t, slots: n }) {
|
|
1596
1617
|
var l;
|
|
1597
|
-
let r = (l = e.id) != null ? l : `headlessui-dialog-overlay-${ve()}`, a =
|
|
1618
|
+
let r = (l = e.id) != null ? l : `headlessui-dialog-overlay-${ve()}`, a = nt("DialogOverlay");
|
|
1598
1619
|
function o(i) {
|
|
1599
1620
|
i.target === i.currentTarget && (i.preventDefault(), i.stopPropagation(), a.close());
|
|
1600
1621
|
}
|
|
@@ -1605,17 +1626,17 @@ W({ name: "DialogOverlay", props: { as: { type: [Object, String], default: "div"
|
|
|
1605
1626
|
} });
|
|
1606
1627
|
W({ name: "DialogBackdrop", props: { as: { type: [Object, String], default: "div" }, id: { type: String, default: null } }, inheritAttrs: !1, setup(e, { attrs: t, slots: n, expose: l }) {
|
|
1607
1628
|
var r;
|
|
1608
|
-
let a = (r = e.id) != null ? r : `headlessui-dialog-backdrop-${ve()}`, o =
|
|
1629
|
+
let a = (r = e.id) != null ? r : `headlessui-dialog-backdrop-${ve()}`, o = nt("DialogBackdrop"), i = E(null);
|
|
1609
1630
|
return l({ el: i, $el: i }), z(() => {
|
|
1610
1631
|
if (o.panelRef.value === null) throw new Error("A <DialogBackdrop /> component is being used, but a <DialogPanel /> component is missing.");
|
|
1611
1632
|
}), () => {
|
|
1612
1633
|
let { ...s } = e, u = { id: a, ref: i, "aria-hidden": !0 };
|
|
1613
|
-
return K(
|
|
1634
|
+
return K(Ct, { force: !0 }, () => K(Gn, () => q({ ourProps: u, theirProps: { ...t, ...s }, slot: { open: o.dialogState.value === 0 }, attrs: t, slots: n, name: "DialogBackdrop" })));
|
|
1614
1635
|
};
|
|
1615
1636
|
} });
|
|
1616
|
-
let
|
|
1637
|
+
let Jn = W({ name: "DialogPanel", props: { as: { type: [Object, String], default: "div" }, id: { type: String, default: null } }, setup(e, { attrs: t, slots: n, expose: l }) {
|
|
1617
1638
|
var r;
|
|
1618
|
-
let a = (r = e.id) != null ? r : `headlessui-dialog-panel-${ve()}`, o =
|
|
1639
|
+
let a = (r = e.id) != null ? r : `headlessui-dialog-panel-${ve()}`, o = nt("DialogPanel");
|
|
1619
1640
|
l({ el: o.panelRef, $el: o.panelRef });
|
|
1620
1641
|
function i(s) {
|
|
1621
1642
|
s.stopPropagation();
|
|
@@ -1624,26 +1645,26 @@ let Zn = W({ name: "DialogPanel", props: { as: { type: [Object, String], default
|
|
|
1624
1645
|
let { ...s } = e, u = { id: a, ref: o.panelRef, onClick: i };
|
|
1625
1646
|
return q({ ourProps: u, theirProps: s, slot: { open: o.dialogState.value === 0 }, attrs: t, slots: n, name: "DialogPanel" });
|
|
1626
1647
|
};
|
|
1627
|
-
} }),
|
|
1648
|
+
} }), _n = W({ name: "DialogTitle", props: { as: { type: [Object, String], default: "h2" }, id: { type: String, default: null } }, setup(e, { attrs: t, slots: n }) {
|
|
1628
1649
|
var l;
|
|
1629
|
-
let r = (l = e.id) != null ? l : `headlessui-dialog-title-${ve()}`, a =
|
|
1650
|
+
let r = (l = e.id) != null ? l : `headlessui-dialog-title-${ve()}`, a = nt("DialogTitle");
|
|
1630
1651
|
return z(() => {
|
|
1631
|
-
a.setTitleId(r),
|
|
1652
|
+
a.setTitleId(r), ce(() => a.setTitleId(null));
|
|
1632
1653
|
}), () => {
|
|
1633
1654
|
let { ...o } = e;
|
|
1634
1655
|
return q({ ourProps: { id: r }, theirProps: o, slot: { open: a.dialogState.value === 0 }, attrs: t, slots: n, name: "DialogTitle" });
|
|
1635
1656
|
};
|
|
1636
|
-
} }),
|
|
1637
|
-
function
|
|
1657
|
+
} }), cn = /([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;
|
|
1658
|
+
function dn(e) {
|
|
1638
1659
|
var t, n;
|
|
1639
1660
|
let l = (t = e.innerText) != null ? t : "", r = e.cloneNode(!0);
|
|
1640
1661
|
if (!(r instanceof HTMLElement)) return l;
|
|
1641
1662
|
let a = !1;
|
|
1642
1663
|
for (let i of r.querySelectorAll('[hidden],[aria-hidden],[role="img"]')) i.remove(), a = !0;
|
|
1643
1664
|
let o = a ? (n = r.innerText) != null ? n : "" : l;
|
|
1644
|
-
return
|
|
1665
|
+
return cn.test(o) && (o = o.replace(cn, "")), o;
|
|
1645
1666
|
}
|
|
1646
|
-
function
|
|
1667
|
+
function Xr(e) {
|
|
1647
1668
|
let t = e.getAttribute("aria-label");
|
|
1648
1669
|
if (typeof t == "string") return t.trim();
|
|
1649
1670
|
let n = e.getAttribute("aria-labelledby");
|
|
@@ -1652,53 +1673,53 @@ function Kr(e) {
|
|
|
1652
1673
|
let a = document.getElementById(r);
|
|
1653
1674
|
if (a) {
|
|
1654
1675
|
let o = a.getAttribute("aria-label");
|
|
1655
|
-
return typeof o == "string" ? o.trim() :
|
|
1676
|
+
return typeof o == "string" ? o.trim() : dn(a).trim();
|
|
1656
1677
|
}
|
|
1657
1678
|
return null;
|
|
1658
1679
|
}).filter(Boolean);
|
|
1659
1680
|
if (l.length > 0) return l.join(", ");
|
|
1660
1681
|
}
|
|
1661
|
-
return
|
|
1682
|
+
return dn(e).trim();
|
|
1662
1683
|
}
|
|
1663
|
-
function
|
|
1664
|
-
let t =
|
|
1684
|
+
function Qr(e) {
|
|
1685
|
+
let t = E(""), n = E("");
|
|
1665
1686
|
return () => {
|
|
1666
1687
|
let l = O(e);
|
|
1667
1688
|
if (!l) return "";
|
|
1668
1689
|
let r = l.innerText;
|
|
1669
1690
|
if (t.value === r) return n.value;
|
|
1670
|
-
let a =
|
|
1691
|
+
let a = Xr(l).trim().toLowerCase();
|
|
1671
1692
|
return t.value = r, n.value = a, a;
|
|
1672
1693
|
};
|
|
1673
1694
|
}
|
|
1674
|
-
var
|
|
1675
|
-
function
|
|
1695
|
+
var Jr = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(Jr || {}), _r = ((e) => (e[e.Pointer = 0] = "Pointer", e[e.Other = 1] = "Other", e))(_r || {});
|
|
1696
|
+
function eo(e) {
|
|
1676
1697
|
requestAnimationFrame(() => requestAnimationFrame(e));
|
|
1677
1698
|
}
|
|
1678
|
-
let
|
|
1679
|
-
function
|
|
1680
|
-
let t =
|
|
1699
|
+
let el = Symbol("MenuContext");
|
|
1700
|
+
function ht(e) {
|
|
1701
|
+
let t = ee(el, null);
|
|
1681
1702
|
if (t === null) {
|
|
1682
1703
|
let n = new Error(`<${e} /> is missing a parent <Menu /> component.`);
|
|
1683
|
-
throw Error.captureStackTrace && Error.captureStackTrace(n,
|
|
1704
|
+
throw Error.captureStackTrace && Error.captureStackTrace(n, ht), n;
|
|
1684
1705
|
}
|
|
1685
1706
|
return t;
|
|
1686
1707
|
}
|
|
1687
|
-
let
|
|
1688
|
-
let l =
|
|
1708
|
+
let to = W({ name: "Menu", props: { as: { type: [Object, String], default: "template" } }, setup(e, { slots: t, attrs: n }) {
|
|
1709
|
+
let l = E(1), r = E(null), a = E(null), o = E([]), i = E(""), s = E(null), u = E(1);
|
|
1689
1710
|
function c(d = (v) => v) {
|
|
1690
|
-
let v = s.value !== null ? o.value[s.value] : null, p =
|
|
1711
|
+
let v = s.value !== null ? o.value[s.value] : null, p = Dn(d(o.value.slice()), (h) => O(h.dataRef.domRef)), m = v ? p.indexOf(v) : null;
|
|
1691
1712
|
return m === -1 && (m = null), { items: p, activeItemIndex: m };
|
|
1692
1713
|
}
|
|
1693
1714
|
let f = { menuState: l, buttonRef: r, itemsRef: a, items: o, searchQuery: i, activeItemIndex: s, activationTrigger: u, closeMenu: () => {
|
|
1694
1715
|
l.value = 1, s.value = null;
|
|
1695
1716
|
}, openMenu: () => l.value = 0, goToItem(d, v, p) {
|
|
1696
|
-
let m = c(),
|
|
1697
|
-
i.value = "", s.value =
|
|
1717
|
+
let m = c(), h = kr(d === ae.Specific ? { focus: ae.Specific, id: v } : { focus: d }, { resolveItems: () => m.items, resolveActiveIndex: () => m.activeItemIndex, resolveId: (y) => y.id, resolveDisabled: (y) => y.dataRef.disabled });
|
|
1718
|
+
i.value = "", s.value = h, u.value = p ?? 1, o.value = m.items;
|
|
1698
1719
|
}, search(d) {
|
|
1699
1720
|
let v = i.value !== "" ? 0 : 1;
|
|
1700
1721
|
i.value += d.toLowerCase();
|
|
1701
|
-
let p = (s.value !== null ? o.value.slice(s.value + v).concat(o.value.slice(0, s.value + v)) : o.value).find((
|
|
1722
|
+
let p = (s.value !== null ? o.value.slice(s.value + v).concat(o.value.slice(0, s.value + v)) : o.value).find((h) => h.dataRef.textValue.startsWith(i.value) && !h.dataRef.disabled), m = p ? o.value.indexOf(p) : -1;
|
|
1702
1723
|
m === -1 || m === s.value || (s.value = m, u.value = 1);
|
|
1703
1724
|
}, clearSearch() {
|
|
1704
1725
|
i.value = "";
|
|
@@ -1707,21 +1728,21 @@ let Qr = W({ name: "Menu", props: { as: { type: [Object, String], default: "temp
|
|
|
1707
1728
|
o.value = p.items, s.value = p.activeItemIndex, u.value = 1;
|
|
1708
1729
|
}, unregisterItem(d) {
|
|
1709
1730
|
let v = c((p) => {
|
|
1710
|
-
let m = p.findIndex((
|
|
1731
|
+
let m = p.findIndex((h) => h.id === d);
|
|
1711
1732
|
return m !== -1 && p.splice(m, 1), p;
|
|
1712
1733
|
});
|
|
1713
1734
|
o.value = v.items, s.value = v.activeItemIndex, u.value = 1;
|
|
1714
1735
|
} };
|
|
1715
|
-
return
|
|
1736
|
+
return Mn([r, a], (d, v) => {
|
|
1716
1737
|
var p;
|
|
1717
|
-
f.closeMenu(),
|
|
1718
|
-
}, w(() => l.value === 0)),
|
|
1738
|
+
f.closeMenu(), Ht(v, Vt.Loose) || (d.preventDefault(), (p = O(r)) == null || p.focus());
|
|
1739
|
+
}, w(() => l.value === 0)), ue(el, f), Vn(w(() => ge(l.value, { 0: G.Open, 1: G.Closed }))), () => {
|
|
1719
1740
|
let d = { open: l.value === 0, close: f.closeMenu };
|
|
1720
1741
|
return q({ ourProps: {}, theirProps: e, slot: d, slots: t, attrs: n, name: "Menu" });
|
|
1721
1742
|
};
|
|
1722
|
-
} }),
|
|
1743
|
+
} }), fn = W({ name: "MenuButton", props: { disabled: { type: Boolean, default: !1 }, as: { type: [Object, String], default: "button" }, id: { type: String, default: null } }, setup(e, { attrs: t, slots: n, expose: l }) {
|
|
1723
1744
|
var r;
|
|
1724
|
-
let a = (r = e.id) != null ? r : `headlessui-menu-button-${ve()}`, o =
|
|
1745
|
+
let a = (r = e.id) != null ? r : `headlessui-menu-button-${ve()}`, o = ht("MenuButton");
|
|
1725
1746
|
l({ el: o.buttonRef, $el: o.buttonRef });
|
|
1726
1747
|
function i(f) {
|
|
1727
1748
|
switch (f.key) {
|
|
@@ -1730,13 +1751,13 @@ let Qr = W({ name: "Menu", props: { as: { type: [Object, String], default: "temp
|
|
|
1730
1751
|
case U.ArrowDown:
|
|
1731
1752
|
f.preventDefault(), f.stopPropagation(), o.openMenu(), Oe(() => {
|
|
1732
1753
|
var d;
|
|
1733
|
-
(d = O(o.itemsRef)) == null || d.focus({ preventScroll: !0 }), o.goToItem(
|
|
1754
|
+
(d = O(o.itemsRef)) == null || d.focus({ preventScroll: !0 }), o.goToItem(ae.First);
|
|
1734
1755
|
});
|
|
1735
1756
|
break;
|
|
1736
1757
|
case U.ArrowUp:
|
|
1737
1758
|
f.preventDefault(), f.stopPropagation(), o.openMenu(), Oe(() => {
|
|
1738
1759
|
var d;
|
|
1739
|
-
(d = O(o.itemsRef)) == null || d.focus({ preventScroll: !0 }), o.goToItem(
|
|
1760
|
+
(d = O(o.itemsRef)) == null || d.focus({ preventScroll: !0 }), o.goToItem(ae.Last);
|
|
1740
1761
|
});
|
|
1741
1762
|
break;
|
|
1742
1763
|
}
|
|
@@ -1752,21 +1773,21 @@ let Qr = W({ name: "Menu", props: { as: { type: [Object, String], default: "temp
|
|
|
1752
1773
|
e.disabled || (o.menuState.value === 0 ? (o.closeMenu(), Oe(() => {
|
|
1753
1774
|
var d;
|
|
1754
1775
|
return (d = O(o.buttonRef)) == null ? void 0 : d.focus({ preventScroll: !0 });
|
|
1755
|
-
})) : (f.preventDefault(), o.openMenu(),
|
|
1776
|
+
})) : (f.preventDefault(), o.openMenu(), eo(() => {
|
|
1756
1777
|
var d;
|
|
1757
1778
|
return (d = O(o.itemsRef)) == null ? void 0 : d.focus({ preventScroll: !0 });
|
|
1758
1779
|
})));
|
|
1759
1780
|
}
|
|
1760
|
-
let c =
|
|
1781
|
+
let c = Bn(w(() => ({ as: e.as, type: t.type })), o.buttonRef);
|
|
1761
1782
|
return () => {
|
|
1762
1783
|
var f;
|
|
1763
1784
|
let d = { open: o.menuState.value === 0 }, { ...v } = e, p = { ref: o.buttonRef, id: a, type: c.value, "aria-haspopup": "menu", "aria-controls": (f = O(o.itemsRef)) == null ? void 0 : f.id, "aria-expanded": o.menuState.value === 0, onKeydown: i, onKeyup: s, onClick: u };
|
|
1764
1785
|
return q({ ourProps: p, theirProps: v, slot: d, attrs: t, slots: n, name: "MenuButton" });
|
|
1765
1786
|
};
|
|
1766
|
-
} }),
|
|
1787
|
+
} }), no = W({ name: "MenuItems", props: { as: { type: [Object, String], default: "div" }, static: { type: Boolean, default: !1 }, unmount: { type: Boolean, default: !0 }, id: { type: String, default: null } }, setup(e, { attrs: t, slots: n, expose: l }) {
|
|
1767
1788
|
var r;
|
|
1768
|
-
let a = (r = e.id) != null ? r : `headlessui-menu-items-${ve()}`, o =
|
|
1769
|
-
l({ el: o.itemsRef, $el: o.itemsRef }),
|
|
1789
|
+
let a = (r = e.id) != null ? r : `headlessui-menu-items-${ve()}`, o = ht("MenuItems"), i = E(null);
|
|
1790
|
+
l({ el: o.itemsRef, $el: o.itemsRef }), wr({ container: w(() => O(o.itemsRef)), enabled: w(() => o.menuState.value === 0), accept(d) {
|
|
1770
1791
|
return d.getAttribute("role") === "menuitem" ? NodeFilter.FILTER_REJECT : d.hasAttribute("role") ? NodeFilter.FILTER_SKIP : NodeFilter.FILTER_ACCEPT;
|
|
1771
1792
|
}, walk(d) {
|
|
1772
1793
|
d.setAttribute("role", "none");
|
|
@@ -1781,18 +1802,18 @@ let Qr = W({ name: "Menu", props: { as: { type: [Object, String], default: "temp
|
|
|
1781
1802
|
let p = o.items.value[o.activeItemIndex.value];
|
|
1782
1803
|
(v = O(p.dataRef.domRef)) == null || v.click();
|
|
1783
1804
|
}
|
|
1784
|
-
o.closeMenu(),
|
|
1805
|
+
o.closeMenu(), An(O(o.buttonRef));
|
|
1785
1806
|
break;
|
|
1786
1807
|
case U.ArrowDown:
|
|
1787
|
-
return d.preventDefault(), d.stopPropagation(), o.goToItem(
|
|
1808
|
+
return d.preventDefault(), d.stopPropagation(), o.goToItem(ae.Next);
|
|
1788
1809
|
case U.ArrowUp:
|
|
1789
|
-
return d.preventDefault(), d.stopPropagation(), o.goToItem(
|
|
1810
|
+
return d.preventDefault(), d.stopPropagation(), o.goToItem(ae.Previous);
|
|
1790
1811
|
case U.Home:
|
|
1791
1812
|
case U.PageUp:
|
|
1792
|
-
return d.preventDefault(), d.stopPropagation(), o.goToItem(
|
|
1813
|
+
return d.preventDefault(), d.stopPropagation(), o.goToItem(ae.First);
|
|
1793
1814
|
case U.End:
|
|
1794
1815
|
case U.PageDown:
|
|
1795
|
-
return d.preventDefault(), d.stopPropagation(), o.goToItem(
|
|
1816
|
+
return d.preventDefault(), d.stopPropagation(), o.goToItem(ae.Last);
|
|
1796
1817
|
case U.Escape:
|
|
1797
1818
|
d.preventDefault(), d.stopPropagation(), o.closeMenu(), Oe(() => {
|
|
1798
1819
|
var p;
|
|
@@ -1800,7 +1821,7 @@ let Qr = W({ name: "Menu", props: { as: { type: [Object, String], default: "temp
|
|
|
1800
1821
|
});
|
|
1801
1822
|
break;
|
|
1802
1823
|
case U.Tab:
|
|
1803
|
-
d.preventDefault(), d.stopPropagation(), o.closeMenu(), Oe(() =>
|
|
1824
|
+
d.preventDefault(), d.stopPropagation(), o.closeMenu(), Oe(() => gr(O(o.buttonRef), d.shiftKey ? we.Previous : we.Next));
|
|
1804
1825
|
break;
|
|
1805
1826
|
default:
|
|
1806
1827
|
d.key.length === 1 && (o.search(d.key), i.value = setTimeout(() => o.clearSearch(), 350));
|
|
@@ -1814,133 +1835,133 @@ let Qr = W({ name: "Menu", props: { as: { type: [Object, String], default: "temp
|
|
|
1814
1835
|
break;
|
|
1815
1836
|
}
|
|
1816
1837
|
}
|
|
1817
|
-
let c =
|
|
1838
|
+
let c = gt(), f = w(() => c !== null ? (c.value & G.Open) === G.Open : o.menuState.value === 0);
|
|
1818
1839
|
return () => {
|
|
1819
1840
|
var d, v;
|
|
1820
|
-
let p = { open: o.menuState.value === 0 }, { ...m } = e,
|
|
1821
|
-
return q({ ourProps:
|
|
1841
|
+
let p = { open: o.menuState.value === 0 }, { ...m } = e, h = { "aria-activedescendant": o.activeItemIndex.value === null || (d = o.items.value[o.activeItemIndex.value]) == null ? void 0 : d.id, "aria-labelledby": (v = O(o.buttonRef)) == null ? void 0 : v.id, id: a, onKeydown: s, onKeyup: u, role: "menu", tabIndex: 0, ref: o.itemsRef };
|
|
1842
|
+
return q({ ourProps: h, theirProps: m, slot: p, attrs: t, slots: n, features: We.RenderStrategy | We.Static, visible: f.value, name: "MenuItems" });
|
|
1822
1843
|
};
|
|
1823
|
-
} }),
|
|
1844
|
+
} }), vn = W({ name: "MenuItem", inheritAttrs: !1, props: { as: { type: [Object, String], default: "template" }, disabled: { type: Boolean, default: !1 }, id: { type: String, default: null } }, setup(e, { slots: t, attrs: n, expose: l }) {
|
|
1824
1845
|
var r;
|
|
1825
|
-
let a = (r = e.id) != null ? r : `headlessui-menu-item-${ve()}`, o =
|
|
1846
|
+
let a = (r = e.id) != null ? r : `headlessui-menu-item-${ve()}`, o = ht("MenuItem"), i = E(null);
|
|
1826
1847
|
l({ el: i, $el: i });
|
|
1827
|
-
let s = w(() => o.activeItemIndex.value !== null ? o.items.value[o.activeItemIndex.value].id === a : !1), u =
|
|
1848
|
+
let s = w(() => o.activeItemIndex.value !== null ? o.items.value[o.activeItemIndex.value].id === a : !1), u = Qr(i), c = w(() => ({ disabled: e.disabled, get textValue() {
|
|
1828
1849
|
return u();
|
|
1829
1850
|
}, domRef: i }));
|
|
1830
|
-
z(() => o.registerItem(a, c)),
|
|
1851
|
+
z(() => o.registerItem(a, c)), ce(() => o.unregisterItem(a)), _(() => {
|
|
1831
1852
|
o.menuState.value === 0 && s.value && o.activationTrigger.value !== 0 && Oe(() => {
|
|
1832
|
-
var
|
|
1833
|
-
return (
|
|
1853
|
+
var y, b;
|
|
1854
|
+
return (b = (y = O(i)) == null ? void 0 : y.scrollIntoView) == null ? void 0 : b.call(y, { block: "nearest" });
|
|
1834
1855
|
});
|
|
1835
1856
|
});
|
|
1836
|
-
function f(
|
|
1837
|
-
if (e.disabled) return
|
|
1838
|
-
o.closeMenu(),
|
|
1857
|
+
function f(y) {
|
|
1858
|
+
if (e.disabled) return y.preventDefault();
|
|
1859
|
+
o.closeMenu(), An(O(o.buttonRef));
|
|
1839
1860
|
}
|
|
1840
1861
|
function d() {
|
|
1841
|
-
if (e.disabled) return o.goToItem(
|
|
1842
|
-
o.goToItem(
|
|
1862
|
+
if (e.disabled) return o.goToItem(ae.Nothing);
|
|
1863
|
+
o.goToItem(ae.Specific, a);
|
|
1843
1864
|
}
|
|
1844
|
-
let v =
|
|
1845
|
-
function p(
|
|
1846
|
-
v.update(
|
|
1865
|
+
let v = br();
|
|
1866
|
+
function p(y) {
|
|
1867
|
+
v.update(y);
|
|
1847
1868
|
}
|
|
1848
|
-
function m(
|
|
1849
|
-
v.wasMoved(
|
|
1869
|
+
function m(y) {
|
|
1870
|
+
v.wasMoved(y) && (e.disabled || s.value || o.goToItem(ae.Specific, a, 0));
|
|
1850
1871
|
}
|
|
1851
|
-
function
|
|
1852
|
-
v.wasMoved(
|
|
1872
|
+
function h(y) {
|
|
1873
|
+
v.wasMoved(y) && (e.disabled || s.value && o.goToItem(ae.Nothing));
|
|
1853
1874
|
}
|
|
1854
1875
|
return () => {
|
|
1855
|
-
let { disabled:
|
|
1856
|
-
return q({ ourProps: { id: a, ref: i, role: "menuitem", tabIndex:
|
|
1876
|
+
let { disabled: y, ...b } = e, T = { active: s.value, disabled: y, close: o.closeMenu };
|
|
1877
|
+
return q({ ourProps: { id: a, ref: i, role: "menuitem", tabIndex: y === !0 ? void 0 : -1, "aria-disabled": y === !0 ? !0 : void 0, onClick: f, onFocus: d, onPointerenter: p, onMouseenter: p, onPointermove: m, onMousemove: m, onPointerleave: h, onMouseleave: h }, theirProps: { ...n, ...b }, slot: T, attrs: n, slots: t, name: "MenuItem" });
|
|
1857
1878
|
};
|
|
1858
|
-
} }),
|
|
1859
|
-
function
|
|
1860
|
-
let e =
|
|
1879
|
+
} }), tl = Symbol("LabelContext");
|
|
1880
|
+
function nl() {
|
|
1881
|
+
let e = ee(tl, null);
|
|
1861
1882
|
if (e === null) {
|
|
1862
1883
|
let t = new Error("You used a <Label /> component, but it is not inside a parent.");
|
|
1863
|
-
throw Error.captureStackTrace && Error.captureStackTrace(t,
|
|
1884
|
+
throw Error.captureStackTrace && Error.captureStackTrace(t, nl), t;
|
|
1864
1885
|
}
|
|
1865
1886
|
return e;
|
|
1866
1887
|
}
|
|
1867
|
-
function
|
|
1868
|
-
let l =
|
|
1888
|
+
function lo({ slot: e = {}, name: t = "Label", props: n = {} } = {}) {
|
|
1889
|
+
let l = E([]);
|
|
1869
1890
|
function r(a) {
|
|
1870
1891
|
return l.value.push(a), () => {
|
|
1871
1892
|
let o = l.value.indexOf(a);
|
|
1872
1893
|
o !== -1 && l.value.splice(o, 1);
|
|
1873
1894
|
};
|
|
1874
1895
|
}
|
|
1875
|
-
return
|
|
1896
|
+
return ue(tl, { register: r, slot: e, name: t, props: n }), w(() => l.value.length > 0 ? l.value.join(" ") : void 0);
|
|
1876
1897
|
}
|
|
1877
|
-
let
|
|
1898
|
+
let ro = W({ name: "Label", props: { as: { type: [Object, String], default: "label" }, passive: { type: [Boolean], default: !1 }, id: { type: String, default: null } }, setup(e, { slots: t, attrs: n }) {
|
|
1878
1899
|
var l;
|
|
1879
|
-
let r = (l = e.id) != null ? l : `headlessui-label-${ve()}`, a =
|
|
1880
|
-
return z(() =>
|
|
1881
|
-
let { name: o = "Label", slot: i = {}, props: s = {} } = a, { passive: u, ...c } = e, f = { ...Object.entries(s).reduce((d, [v, p]) => Object.assign(d, { [v]:
|
|
1900
|
+
let r = (l = e.id) != null ? l : `headlessui-label-${ve()}`, a = nl();
|
|
1901
|
+
return z(() => ce(a.register(r))), () => {
|
|
1902
|
+
let { name: o = "Label", slot: i = {}, props: s = {} } = a, { passive: u, ...c } = e, f = { ...Object.entries(s).reduce((d, [v, p]) => Object.assign(d, { [v]: $(p) }), {}), id: r };
|
|
1882
1903
|
return u && (delete f.onClick, delete f.htmlFor, delete c.onClick), q({ ourProps: f, theirProps: c, slot: i, attrs: n, slots: t, name: o });
|
|
1883
1904
|
};
|
|
1884
|
-
} }),
|
|
1885
|
-
let l =
|
|
1905
|
+
} }), ll = Symbol("GroupContext"), oo = W({ name: "SwitchGroup", props: { as: { type: [Object, String], default: "template" } }, setup(e, { slots: t, attrs: n }) {
|
|
1906
|
+
let l = E(null), r = lo({ name: "SwitchLabel", props: { htmlFor: w(() => {
|
|
1886
1907
|
var o;
|
|
1887
1908
|
return (o = l.value) == null ? void 0 : o.id;
|
|
1888
1909
|
}), onClick(o) {
|
|
1889
1910
|
l.value && (o.currentTarget.tagName === "LABEL" && o.preventDefault(), l.value.click(), l.value.focus({ preventScroll: !0 }));
|
|
1890
|
-
} } }), a =
|
|
1891
|
-
return
|
|
1892
|
-
} }),
|
|
1911
|
+
} } }), a = Zn({ name: "SwitchDescription" });
|
|
1912
|
+
return ue(ll, { switchRef: l, labelledby: r, describedby: a }), () => q({ theirProps: e, ourProps: {}, slot: {}, slots: t, attrs: n, name: "SwitchGroup" });
|
|
1913
|
+
} }), ao = W({ name: "Switch", emits: { "update:modelValue": (e) => !0 }, props: { as: { type: [Object, String], default: "button" }, modelValue: { type: Boolean, default: void 0 }, defaultChecked: { type: Boolean, optional: !0 }, form: { type: String, optional: !0 }, name: { type: String, optional: !0 }, value: { type: String, optional: !0 }, id: { type: String, default: null }, disabled: { type: Boolean, default: !1 }, tabIndex: { type: Number, default: 0 } }, inheritAttrs: !1, setup(e, { emit: t, attrs: n, slots: l, expose: r }) {
|
|
1893
1914
|
var a;
|
|
1894
|
-
let o = (a = e.id) != null ? a : `headlessui-switch-${ve()}`, i =
|
|
1915
|
+
let o = (a = e.id) != null ? a : `headlessui-switch-${ve()}`, i = ee(ll, null), [s, u] = ar(w(() => e.modelValue), (b) => t("update:modelValue", b), w(() => e.defaultChecked));
|
|
1895
1916
|
function c() {
|
|
1896
1917
|
u(!s.value);
|
|
1897
1918
|
}
|
|
1898
|
-
let f =
|
|
1919
|
+
let f = E(null), d = i === null ? f : i.switchRef, v = Bn(w(() => ({ as: e.as, type: n.type })), d);
|
|
1899
1920
|
r({ el: d, $el: d });
|
|
1900
|
-
function p(
|
|
1901
|
-
|
|
1921
|
+
function p(b) {
|
|
1922
|
+
b.preventDefault(), c();
|
|
1902
1923
|
}
|
|
1903
|
-
function m(
|
|
1904
|
-
|
|
1924
|
+
function m(b) {
|
|
1925
|
+
b.key === U.Space ? (b.preventDefault(), c()) : b.key === U.Enter && Or(b.currentTarget);
|
|
1905
1926
|
}
|
|
1906
|
-
function
|
|
1907
|
-
|
|
1927
|
+
function h(b) {
|
|
1928
|
+
b.preventDefault();
|
|
1908
1929
|
}
|
|
1909
|
-
let
|
|
1910
|
-
var
|
|
1911
|
-
return (T = (
|
|
1930
|
+
let y = w(() => {
|
|
1931
|
+
var b, T;
|
|
1932
|
+
return (T = (b = O(d)) == null ? void 0 : b.closest) == null ? void 0 : T.call(b, "form");
|
|
1912
1933
|
});
|
|
1913
1934
|
return z(() => {
|
|
1914
|
-
me([
|
|
1915
|
-
if (!
|
|
1916
|
-
function
|
|
1935
|
+
me([y], () => {
|
|
1936
|
+
if (!y.value || e.defaultChecked === void 0) return;
|
|
1937
|
+
function b() {
|
|
1917
1938
|
u(e.defaultChecked);
|
|
1918
1939
|
}
|
|
1919
|
-
return
|
|
1940
|
+
return y.value.addEventListener("reset", b), () => {
|
|
1920
1941
|
var T;
|
|
1921
|
-
(T =
|
|
1942
|
+
(T = y.value) == null || T.removeEventListener("reset", b);
|
|
1922
1943
|
};
|
|
1923
1944
|
}, { immediate: !0 });
|
|
1924
1945
|
}), () => {
|
|
1925
|
-
let { name:
|
|
1926
|
-
return K(
|
|
1946
|
+
let { name: b, value: T, form: A, tabIndex: C, ...I } = e, L = { checked: s.value }, j = { id: o, ref: d, role: "switch", type: v.value, tabIndex: C === -1 ? 0 : C, "aria-checked": s.value, "aria-labelledby": i == null ? void 0 : i.labelledby.value, "aria-describedby": i == null ? void 0 : i.describedby.value, onClick: p, onKeyup: m, onKeypress: h };
|
|
1947
|
+
return K(ie, [b != null && s.value != null ? K(ct, $r({ features: Qe.Hidden, as: "input", type: "checkbox", hidden: !0, readOnly: !0, checked: s.value, form: A, disabled: I.disabled, name: b, value: T })) : null, q({ ourProps: j, theirProps: { ...n, ...Wt(I, ["modelValue", "defaultChecked"]) }, slot: L, attrs: n, slots: l, name: "Switch" })]);
|
|
1927
1948
|
};
|
|
1928
|
-
} }),
|
|
1929
|
-
function
|
|
1949
|
+
} }), io = ro;
|
|
1950
|
+
function so(e) {
|
|
1930
1951
|
let t = { called: !1 };
|
|
1931
1952
|
return (...n) => {
|
|
1932
1953
|
if (!t.called) return t.called = !0, e(...n);
|
|
1933
1954
|
};
|
|
1934
1955
|
}
|
|
1935
|
-
function
|
|
1956
|
+
function kt(e, ...t) {
|
|
1936
1957
|
e && t.length > 0 && e.classList.add(...t);
|
|
1937
1958
|
}
|
|
1938
|
-
function
|
|
1959
|
+
function st(e, ...t) {
|
|
1939
1960
|
e && t.length > 0 && e.classList.remove(...t);
|
|
1940
1961
|
}
|
|
1941
|
-
var
|
|
1942
|
-
function
|
|
1943
|
-
let n =
|
|
1962
|
+
var Ft = ((e) => (e.Finished = "finished", e.Cancelled = "cancelled", e))(Ft || {});
|
|
1963
|
+
function uo(e, t) {
|
|
1964
|
+
let n = et();
|
|
1944
1965
|
if (!e) return n.dispose;
|
|
1945
1966
|
let { transitionDuration: l, transitionDelay: r } = getComputedStyle(e), [a, o] = [l, r].map((i) => {
|
|
1946
1967
|
let [s = 0] = i.split(",").filter(Boolean).map((u) => u.includes("ms") ? parseFloat(u) : parseFloat(u) * 1e3).sort((u, c) => c - u);
|
|
@@ -1948,45 +1969,45 @@ function io(e, t) {
|
|
|
1948
1969
|
});
|
|
1949
1970
|
return a !== 0 ? n.setTimeout(() => t("finished"), a + o) : t("finished"), n.add(() => t("cancelled")), n.dispose;
|
|
1950
1971
|
}
|
|
1951
|
-
function
|
|
1952
|
-
let o =
|
|
1972
|
+
function pn(e, t, n, l, r, a) {
|
|
1973
|
+
let o = et(), i = a !== void 0 ? so(a) : () => {
|
|
1953
1974
|
};
|
|
1954
|
-
return
|
|
1955
|
-
|
|
1956
|
-
}), o.add(() =>
|
|
1975
|
+
return st(e, ...r), kt(e, ...t, ...n), o.nextFrame(() => {
|
|
1976
|
+
st(e, ...n), kt(e, ...l), o.add(uo(e, (s) => (st(e, ...l, ...t), kt(e, ...r), i(s))));
|
|
1977
|
+
}), o.add(() => st(e, ...t, ...n, ...l, ...r)), o.add(() => i("cancelled")), o.dispose;
|
|
1957
1978
|
}
|
|
1958
1979
|
function De(e = "") {
|
|
1959
1980
|
return e.split(/\s+/).filter((t) => t.length > 1);
|
|
1960
1981
|
}
|
|
1961
|
-
let
|
|
1962
|
-
var
|
|
1963
|
-
function
|
|
1964
|
-
return
|
|
1982
|
+
let Ut = Symbol("TransitionContext");
|
|
1983
|
+
var co = ((e) => (e.Visible = "visible", e.Hidden = "hidden", e))(co || {});
|
|
1984
|
+
function fo() {
|
|
1985
|
+
return ee(Ut, null) !== null;
|
|
1965
1986
|
}
|
|
1966
|
-
function
|
|
1967
|
-
let e =
|
|
1987
|
+
function vo() {
|
|
1988
|
+
let e = ee(Ut, null);
|
|
1968
1989
|
if (e === null) throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");
|
|
1969
1990
|
return e;
|
|
1970
1991
|
}
|
|
1971
|
-
function
|
|
1972
|
-
let e =
|
|
1992
|
+
function po() {
|
|
1993
|
+
let e = ee(zt, null);
|
|
1973
1994
|
if (e === null) throw new Error("A <TransitionChild /> is used but it is missing a parent <TransitionRoot />.");
|
|
1974
1995
|
return e;
|
|
1975
1996
|
}
|
|
1976
|
-
let
|
|
1977
|
-
function
|
|
1978
|
-
return "children" in e ?
|
|
1997
|
+
let zt = Symbol("NestingContext");
|
|
1998
|
+
function yt(e) {
|
|
1999
|
+
return "children" in e ? yt(e.children) : e.value.filter(({ state: t }) => t === "visible").length > 0;
|
|
1979
2000
|
}
|
|
1980
|
-
function
|
|
1981
|
-
let t =
|
|
1982
|
-
z(() => n.value = !0),
|
|
2001
|
+
function rl(e) {
|
|
2002
|
+
let t = E([]), n = E(!1);
|
|
2003
|
+
z(() => n.value = !0), ce(() => n.value = !1);
|
|
1983
2004
|
function l(a, o = ke.Hidden) {
|
|
1984
2005
|
let i = t.value.findIndex(({ id: s }) => s === a);
|
|
1985
2006
|
i !== -1 && (ge(o, { [ke.Unmount]() {
|
|
1986
2007
|
t.value.splice(i, 1);
|
|
1987
2008
|
}, [ke.Hidden]() {
|
|
1988
2009
|
t.value[i].state = "hidden";
|
|
1989
|
-
} }), !
|
|
2010
|
+
} }), !yt(t) && n.value && (e == null || e()));
|
|
1990
2011
|
}
|
|
1991
2012
|
function r(a) {
|
|
1992
2013
|
let o = t.value.find(({ id: i }) => i === a);
|
|
@@ -1994,8 +2015,8 @@ function tl(e) {
|
|
|
1994
2015
|
}
|
|
1995
2016
|
return { children: t, register: r, unregister: l };
|
|
1996
2017
|
}
|
|
1997
|
-
let
|
|
1998
|
-
let a =
|
|
2018
|
+
let ol = We.RenderStrategy, Je = W({ props: { as: { type: [Object, String], default: "div" }, show: { type: [Boolean], default: null }, unmount: { type: [Boolean], default: !0 }, appear: { type: [Boolean], default: !1 }, enter: { type: [String], default: "" }, enterFrom: { type: [String], default: "" }, enterTo: { type: [String], default: "" }, entered: { type: [String], default: "" }, leave: { type: [String], default: "" }, leaveFrom: { type: [String], default: "" }, leaveTo: { type: [String], default: "" } }, emits: { beforeEnter: () => !0, afterEnter: () => !0, beforeLeave: () => !0, afterLeave: () => !0 }, setup(e, { emit: t, attrs: n, slots: l, expose: r }) {
|
|
2019
|
+
let a = E(0);
|
|
1999
2020
|
function o() {
|
|
2000
2021
|
a.value |= G.Opening, t("beforeEnter");
|
|
2001
2022
|
}
|
|
@@ -2008,68 +2029,68 @@ let nl = He.RenderStrategy, Qe = W({ props: { as: { type: [Object, String], defa
|
|
|
2008
2029
|
function u() {
|
|
2009
2030
|
a.value &= ~G.Closing, t("afterLeave");
|
|
2010
2031
|
}
|
|
2011
|
-
if (!
|
|
2012
|
-
let c =
|
|
2032
|
+
if (!fo() && Sr()) return () => K(bt, { ...e, onBeforeEnter: o, onAfterEnter: i, onBeforeLeave: s, onAfterLeave: u }, l);
|
|
2033
|
+
let c = E(null), f = w(() => e.unmount ? ke.Unmount : ke.Hidden);
|
|
2013
2034
|
r({ el: c, $el: c });
|
|
2014
|
-
let { show: d, appear: v } =
|
|
2015
|
-
!T.value &&
|
|
2035
|
+
let { show: d, appear: v } = vo(), { register: p, unregister: m } = po(), h = E(d.value ? "visible" : "hidden"), y = { value: !0 }, b = ve(), T = { value: !1 }, A = rl(() => {
|
|
2036
|
+
!T.value && h.value !== "hidden" && (h.value = "hidden", m(b), u());
|
|
2016
2037
|
});
|
|
2017
2038
|
z(() => {
|
|
2018
|
-
let
|
|
2019
|
-
|
|
2020
|
-
}),
|
|
2021
|
-
if (f.value === ke.Hidden &&
|
|
2022
|
-
if (d.value &&
|
|
2023
|
-
|
|
2039
|
+
let Z = p(b);
|
|
2040
|
+
ce(Z);
|
|
2041
|
+
}), _(() => {
|
|
2042
|
+
if (f.value === ke.Hidden && b) {
|
|
2043
|
+
if (d.value && h.value !== "visible") {
|
|
2044
|
+
h.value = "visible";
|
|
2024
2045
|
return;
|
|
2025
2046
|
}
|
|
2026
|
-
ge(
|
|
2047
|
+
ge(h.value, { hidden: () => m(b), visible: () => p(b) });
|
|
2027
2048
|
}
|
|
2028
2049
|
});
|
|
2029
|
-
let C = De(e.enter),
|
|
2050
|
+
let C = De(e.enter), I = De(e.enterFrom), L = De(e.enterTo), j = De(e.entered), X = De(e.leave), V = De(e.leaveFrom), Q = De(e.leaveTo);
|
|
2030
2051
|
z(() => {
|
|
2031
|
-
|
|
2032
|
-
if (
|
|
2033
|
-
let
|
|
2034
|
-
if (
|
|
2052
|
+
_(() => {
|
|
2053
|
+
if (h.value === "visible") {
|
|
2054
|
+
let Z = O(c);
|
|
2055
|
+
if (Z instanceof Comment && Z.data === "") throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?");
|
|
2035
2056
|
}
|
|
2036
2057
|
});
|
|
2037
2058
|
});
|
|
2038
|
-
function
|
|
2039
|
-
let
|
|
2040
|
-
!
|
|
2041
|
-
T.value = !1,
|
|
2042
|
-
}) :
|
|
2043
|
-
T.value = !1,
|
|
2059
|
+
function te(Z) {
|
|
2060
|
+
let ne = y.value && !v.value, le = O(c);
|
|
2061
|
+
!le || !(le instanceof HTMLElement) || ne || (T.value = !0, d.value && o(), d.value || s(), Z(d.value ? pn(le, C, I, L, j, (re) => {
|
|
2062
|
+
T.value = !1, re === Ft.Finished && i();
|
|
2063
|
+
}) : pn(le, X, V, Q, j, (re) => {
|
|
2064
|
+
T.value = !1, re === Ft.Finished && (yt(A) || (h.value = "hidden", m(b), u()));
|
|
2044
2065
|
})));
|
|
2045
2066
|
}
|
|
2046
2067
|
return z(() => {
|
|
2047
|
-
me([d], (
|
|
2048
|
-
|
|
2068
|
+
me([d], (Z, ne, le) => {
|
|
2069
|
+
te(le), y.value = !1;
|
|
2049
2070
|
}, { immediate: !0 });
|
|
2050
|
-
}),
|
|
2051
|
-
let { appear:
|
|
2052
|
-
return q({ theirProps:
|
|
2071
|
+
}), ue(zt, A), Vn(w(() => ge(h.value, { visible: G.Open, hidden: G.Closed }) | a.value)), () => {
|
|
2072
|
+
let { appear: Z, show: ne, enter: le, enterFrom: re, enterTo: be, entered: _t, leave: en, leaveFrom: tn, leaveTo: F, ...H } = e, de = { ref: c }, fe = { ...H, ...v.value && d.value && tt.isServer ? { class: N([n.class, H.class, ...C, ...I]) } : {} };
|
|
2073
|
+
return q({ theirProps: fe, ourProps: de, slot: {}, slots: l, attrs: n, features: ol, visible: h.value === "visible", name: "TransitionChild" });
|
|
2053
2074
|
};
|
|
2054
|
-
} }),
|
|
2055
|
-
let r =
|
|
2056
|
-
|
|
2075
|
+
} }), mo = Je, bt = W({ inheritAttrs: !1, props: { as: { type: [Object, String], default: "div" }, show: { type: [Boolean], default: null }, unmount: { type: [Boolean], default: !0 }, appear: { type: [Boolean], default: !1 }, enter: { type: [String], default: "" }, enterFrom: { type: [String], default: "" }, enterTo: { type: [String], default: "" }, entered: { type: [String], default: "" }, leave: { type: [String], default: "" }, leaveFrom: { type: [String], default: "" }, leaveTo: { type: [String], default: "" } }, emits: { beforeEnter: () => !0, afterEnter: () => !0, beforeLeave: () => !0, afterLeave: () => !0 }, setup(e, { emit: t, attrs: n, slots: l }) {
|
|
2076
|
+
let r = gt(), a = w(() => e.show === null && r !== null ? (r.value & G.Open) === G.Open : e.show);
|
|
2077
|
+
_(() => {
|
|
2057
2078
|
if (![!0, !1].includes(a.value)) throw new Error('A <Transition /> is used but it is missing a `:show="true | false"` prop.');
|
|
2058
2079
|
});
|
|
2059
|
-
let o =
|
|
2080
|
+
let o = E(a.value ? "visible" : "hidden"), i = rl(() => {
|
|
2060
2081
|
o.value = "hidden";
|
|
2061
|
-
}), s =
|
|
2082
|
+
}), s = E(!0), u = { show: a, appear: w(() => e.appear || !s.value) };
|
|
2062
2083
|
return z(() => {
|
|
2063
|
-
|
|
2064
|
-
s.value = !1, a.value ? o.value = "visible" :
|
|
2084
|
+
_(() => {
|
|
2085
|
+
s.value = !1, a.value ? o.value = "visible" : yt(i) || (o.value = "hidden");
|
|
2065
2086
|
});
|
|
2066
|
-
}),
|
|
2067
|
-
let c =
|
|
2068
|
-
return q({ ourProps: { ...f, as: "template" }, theirProps: {}, slot: {}, slots: { ...l, default: () => [K(
|
|
2087
|
+
}), ue(zt, i), ue(Ut, u), () => {
|
|
2088
|
+
let c = Wt(e, ["show", "appear", "unmount", "onBeforeEnter", "onBeforeLeave", "onAfterEnter", "onAfterLeave"]), f = { unmount: e.unmount };
|
|
2089
|
+
return q({ ourProps: { ...f, as: "template" }, theirProps: {}, slot: {}, slots: { ...l, default: () => [K(mo, { onBeforeEnter: () => t("beforeEnter"), onAfterEnter: () => t("afterEnter"), onBeforeLeave: () => t("beforeLeave"), onAfterLeave: () => t("afterLeave"), ...n, ...f, ...c }, l.default)] }, attrs: {}, features: ol, visible: o.value === "visible", name: "Transition" });
|
|
2069
2090
|
};
|
|
2070
2091
|
} });
|
|
2071
|
-
function
|
|
2072
|
-
const t =
|
|
2092
|
+
function al(e) {
|
|
2093
|
+
const t = E(null), n = E(!1), l = w(() => e.as === "form"), r = w(() => `${e.id}-title`), a = w(() => `${e.id}-content`), o = w(() => {
|
|
2073
2094
|
var i;
|
|
2074
2095
|
return (i = t.value) == null ? void 0 : i.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');
|
|
2075
2096
|
});
|
|
@@ -2082,13 +2103,13 @@ function ll(e) {
|
|
|
2082
2103
|
initialFocusElement: o
|
|
2083
2104
|
};
|
|
2084
2105
|
}
|
|
2085
|
-
const
|
|
2106
|
+
const go = {
|
|
2086
2107
|
class: "rvc-fixed rvc-inset-0 rvc-overflow-hidden",
|
|
2087
2108
|
role: "presentation"
|
|
2088
|
-
},
|
|
2109
|
+
}, ho = { class: "rvc-absolute rvc-inset-0 rvc-overflow-hidden" }, yo = { class: "rvc-pointer-events-none rvc-fixed rvc-inset-y-0 rvc-right-0 rvc-flex rvc-max-w-full rvc-pl-10" }, bo = { class: "rvc-flex rvc-h-full rvc-flex-col rvc-shadow-xl" }, wo = { class: "rvc-flex rvc-items-center rvc-justify-between" }, $o = {
|
|
2089
2110
|
key: 0,
|
|
2090
2111
|
class: "rvc-ml-3 rvc-flex rvc-h-7 rvc-items-center"
|
|
2091
|
-
},
|
|
2112
|
+
}, xo = ["id"], So = { class: "rvc-flex rvc-shrink-0 rvc-drawer-footer" }, Na = {
|
|
2092
2113
|
__name: "Drawer",
|
|
2093
2114
|
props: {
|
|
2094
2115
|
as: {
|
|
@@ -2137,22 +2158,22 @@ const po = {
|
|
|
2137
2158
|
titleId: i,
|
|
2138
2159
|
descriptionId: s,
|
|
2139
2160
|
initialFocusElement: u
|
|
2140
|
-
} =
|
|
2141
|
-
return (c, f) => (
|
|
2161
|
+
} = al(l);
|
|
2162
|
+
return (c, f) => (g(), R($(bt), { as: "template" }, {
|
|
2142
2163
|
default: P(() => [
|
|
2143
|
-
D(
|
|
2164
|
+
D($(Qn), {
|
|
2144
2165
|
as: e.as,
|
|
2145
2166
|
class: "rvc-drawer",
|
|
2146
2167
|
static: "",
|
|
2147
2168
|
"aria-modal": "true",
|
|
2148
2169
|
role: "dialog",
|
|
2149
|
-
"initial-focus":
|
|
2150
|
-
"aria-labelledby":
|
|
2170
|
+
"initial-focus": $(u),
|
|
2171
|
+
"aria-labelledby": $(i),
|
|
2151
2172
|
onClose: f[5] || (f[5] = (d) => c.$emit("drawer:close")),
|
|
2152
|
-
onSubmit: f[6] || (f[6] =
|
|
2173
|
+
onSubmit: f[6] || (f[6] = kn((d) => n("drawer:save", d), ["prevent"]))
|
|
2153
2174
|
}, {
|
|
2154
2175
|
default: P(() => [
|
|
2155
|
-
D(
|
|
2176
|
+
D($(Je), {
|
|
2156
2177
|
as: "template",
|
|
2157
2178
|
enter: "rvc-ease-in-out rvc-duration-500",
|
|
2158
2179
|
"enter-from": "rvc-opacity-0",
|
|
@@ -2163,17 +2184,17 @@ const po = {
|
|
|
2163
2184
|
onBeforeEnter: f[0] || (f[0] = (d) => n("drawer:open"))
|
|
2164
2185
|
}, {
|
|
2165
2186
|
default: P(() => f[7] || (f[7] = [
|
|
2166
|
-
|
|
2187
|
+
x("div", {
|
|
2167
2188
|
class: "rvc-fixed rvc-inset-0 rvc-transition-opacity rvc-drawer-backdrop",
|
|
2168
2189
|
"aria-hidden": "true"
|
|
2169
2190
|
}, null, -1)
|
|
2170
2191
|
])),
|
|
2171
2192
|
_: 1
|
|
2172
2193
|
}),
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
D(
|
|
2194
|
+
x("div", go, [
|
|
2195
|
+
x("div", ho, [
|
|
2196
|
+
x("div", yo, [
|
|
2197
|
+
D($(Je), {
|
|
2177
2198
|
as: "template",
|
|
2178
2199
|
enter: "rvc-transform rvc-transition rvc-ease-in-out rvc-duration-500 sm:rvc-duration-700",
|
|
2179
2200
|
"enter-from": "rvc-translate-x-full",
|
|
@@ -2185,73 +2206,73 @@ const po = {
|
|
|
2185
2206
|
onAfterLeave: f[4] || (f[4] = (d) => (a.value = !1, n("drawer:closed")))
|
|
2186
2207
|
}, {
|
|
2187
2208
|
default: P(() => [
|
|
2188
|
-
D(
|
|
2209
|
+
D($(Jn), {
|
|
2189
2210
|
class: N(["rvc-pointer-events-auto rvc-w-screen", e.panelClass]),
|
|
2190
2211
|
"aria-busy": e.spinning,
|
|
2191
|
-
"aria-describedby":
|
|
2212
|
+
"aria-describedby": $(s)
|
|
2192
2213
|
}, {
|
|
2193
2214
|
default: P(() => [
|
|
2194
|
-
|
|
2195
|
-
|
|
2215
|
+
x("div", bo, [
|
|
2216
|
+
x("header", {
|
|
2196
2217
|
class: N([{ "rvc-sticky rvc-top-0 rvc-left-0 rvc-w-full rvc-z-10": e.headerSticky }, "rvc-drawer-header"])
|
|
2197
2218
|
}, [
|
|
2198
2219
|
k(c.$slots, "header", {
|
|
2199
2220
|
title: e.title,
|
|
2200
2221
|
showClose: e.showClose
|
|
2201
2222
|
}, () => [
|
|
2202
|
-
|
|
2203
|
-
D(
|
|
2204
|
-
id:
|
|
2223
|
+
x("div", wo, [
|
|
2224
|
+
D($(_n), {
|
|
2225
|
+
id: $(i),
|
|
2205
2226
|
class: "rvc-drawer-title"
|
|
2206
2227
|
}, {
|
|
2207
2228
|
default: P(() => [
|
|
2208
|
-
pe(
|
|
2229
|
+
pe(M(e.title), 1)
|
|
2209
2230
|
]),
|
|
2210
2231
|
_: 1
|
|
2211
2232
|
}, 8, ["id"]),
|
|
2212
|
-
e.showClose ? (
|
|
2213
|
-
|
|
2233
|
+
e.showClose ? (g(), S("div", $o, [
|
|
2234
|
+
x("button", {
|
|
2214
2235
|
type: "button",
|
|
2215
2236
|
class: "rvc-relative rvc-drawer-close",
|
|
2216
2237
|
"aria-label": "Close panel",
|
|
2217
2238
|
onClick: f[1] || (f[1] = (d) => n("drawer:close"))
|
|
2218
2239
|
}, [
|
|
2219
|
-
D(
|
|
2240
|
+
D($(pt), {
|
|
2220
2241
|
class: "rvc-size-full",
|
|
2221
2242
|
"aria-hidden": "true"
|
|
2222
2243
|
})
|
|
2223
2244
|
])
|
|
2224
|
-
])) :
|
|
2245
|
+
])) : B("", !0)
|
|
2225
2246
|
])
|
|
2226
2247
|
])
|
|
2227
2248
|
], 2),
|
|
2228
|
-
|
|
2249
|
+
x("div", {
|
|
2229
2250
|
class: N([e.scrolledDown ? "rvc-flex-col-reverse" : "rvc-flex-col", "rvc-flex rvc-min-h-0 rvc-flex-1 rvc-overflow-y-scroll"])
|
|
2230
2251
|
}, [
|
|
2231
|
-
|
|
2232
|
-
id:
|
|
2252
|
+
x("div", {
|
|
2253
|
+
id: $(s),
|
|
2233
2254
|
ref_key: "contentRef",
|
|
2234
2255
|
ref: r,
|
|
2235
2256
|
class: "rvc-relative rvc-flex-1 rvc-drawer-content"
|
|
2236
2257
|
}, [
|
|
2237
|
-
k(c.$slots, "default", { ready:
|
|
2238
|
-
], 8,
|
|
2258
|
+
k(c.$slots, "default", { ready: $(a) })
|
|
2259
|
+
], 8, xo)
|
|
2239
2260
|
], 2),
|
|
2240
|
-
|
|
2261
|
+
x("footer", So, [
|
|
2241
2262
|
k(c.$slots, "footer", { loading: e.spinning }, () => [
|
|
2242
|
-
D(
|
|
2263
|
+
D(Xe, {
|
|
2243
2264
|
type: "button",
|
|
2244
2265
|
label: e.cancelLabel,
|
|
2245
2266
|
color: "light",
|
|
2246
2267
|
onClick: f[2] || (f[2] = (d) => n("drawer:close"))
|
|
2247
2268
|
}, null, 8, ["label"]),
|
|
2248
|
-
|
|
2269
|
+
$(o) ? (g(), R(Xe, {
|
|
2249
2270
|
key: 0,
|
|
2250
2271
|
type: "submit",
|
|
2251
2272
|
label: e.submitLabel,
|
|
2252
2273
|
spinning: e.spinning,
|
|
2253
2274
|
disabled: e.spinning
|
|
2254
|
-
}, null, 8, ["label", "spinning", "disabled"])) :
|
|
2275
|
+
}, null, 8, ["label", "spinning", "disabled"])) : B("", !0)
|
|
2255
2276
|
])
|
|
2256
2277
|
])
|
|
2257
2278
|
])
|
|
@@ -2271,7 +2292,9 @@ const po = {
|
|
|
2271
2292
|
_: 3
|
|
2272
2293
|
}));
|
|
2273
2294
|
}
|
|
2274
|
-
},
|
|
2295
|
+
}, ja = /* @__PURE__ */ Object.assign({
|
|
2296
|
+
inheritAttrs: !1
|
|
2297
|
+
}, {
|
|
2275
2298
|
__name: "Dropdown",
|
|
2276
2299
|
props: {
|
|
2277
2300
|
items: {
|
|
@@ -2279,9 +2302,17 @@ const po = {
|
|
|
2279
2302
|
required: !0,
|
|
2280
2303
|
default: () => []
|
|
2281
2304
|
},
|
|
2282
|
-
|
|
2305
|
+
alignLeft: {
|
|
2283
2306
|
type: Boolean,
|
|
2284
2307
|
default: !1
|
|
2308
|
+
},
|
|
2309
|
+
label: {
|
|
2310
|
+
type: String,
|
|
2311
|
+
default: "Options"
|
|
2312
|
+
},
|
|
2313
|
+
rootClass: {
|
|
2314
|
+
type: String,
|
|
2315
|
+
default: ""
|
|
2285
2316
|
}
|
|
2286
2317
|
},
|
|
2287
2318
|
emits: ["dropdown:click"],
|
|
@@ -2297,18 +2328,24 @@ const po = {
|
|
|
2297
2328
|
} = r;
|
|
2298
2329
|
return c;
|
|
2299
2330
|
};
|
|
2300
|
-
return (r, a) => (
|
|
2331
|
+
return (r, a) => (g(), R($(to), {
|
|
2301
2332
|
as: "div",
|
|
2302
|
-
class: "rvc-relative rvc-inline-block"
|
|
2333
|
+
class: N(["rvc-relative rvc-inline-block rvc-w-fit", e.rootClass])
|
|
2303
2334
|
}, {
|
|
2304
2335
|
default: P(() => [
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2336
|
+
k(r.$slots, "button", {
|
|
2337
|
+
label: e.label,
|
|
2338
|
+
button: $(fn)
|
|
2339
|
+
}, () => [
|
|
2340
|
+
D($(fn), Y({
|
|
2341
|
+
as: Xe,
|
|
2342
|
+
label: e.label,
|
|
2343
|
+
color: "light",
|
|
2344
|
+
icon: $(Vl),
|
|
2345
|
+
"icon-left": e.alignLeft
|
|
2346
|
+
}, r.$attrs), null, 16, ["label", "icon", "icon-left"])
|
|
2347
|
+
]),
|
|
2348
|
+
D(wl, {
|
|
2312
2349
|
"enter-active-class": "rvc-transition rvc-duration-100 rvc-ease-out",
|
|
2313
2350
|
"enter-from-class": "rvc-transform rvc-scale-95 rvc-opacity-0",
|
|
2314
2351
|
"enter-to-class": "rvc-transform rvc-scale-100 rvc-opacity-100",
|
|
@@ -2317,30 +2354,33 @@ const po = {
|
|
|
2317
2354
|
"leave-to-class": "rvc-transform rvc-scale-95 rvc-opacity-0"
|
|
2318
2355
|
}, {
|
|
2319
2356
|
default: P(() => [
|
|
2320
|
-
D(
|
|
2321
|
-
class: N(["rvc-dropdown", e.
|
|
2357
|
+
D($(no), {
|
|
2358
|
+
class: N(["rvc-dropdown", e.alignLeft ? "rvc-left-0" : "rvc-right-0"])
|
|
2322
2359
|
}, {
|
|
2323
2360
|
default: P(() => [
|
|
2324
|
-
k(r.$slots, "items", {
|
|
2325
|
-
|
|
2361
|
+
k(r.$slots, "items", {
|
|
2362
|
+
items: e.items,
|
|
2363
|
+
menuItem: $(vn)
|
|
2364
|
+
}, () => [
|
|
2365
|
+
(g(!0), S(ie, null, Te(e.items, (o, i) => (g(), R($(vn), {
|
|
2326
2366
|
key: `${i}-dropdown-item`,
|
|
2327
2367
|
as: "template"
|
|
2328
2368
|
}, {
|
|
2329
2369
|
default: P(() => [
|
|
2330
2370
|
k(r.$slots, "item", { item: o }, () => [
|
|
2331
|
-
(
|
|
2371
|
+
(g(), R(J(o.as ? o.as : "button"), Y({
|
|
2332
2372
|
class: "rvc-dropdown-item",
|
|
2333
2373
|
ref_for: !0
|
|
2334
2374
|
}, l(o), {
|
|
2335
2375
|
as: o.bindAs ? o.bindAs : void 0,
|
|
2336
|
-
onClick: (s) => (n("dropdown:click", o), o.event())
|
|
2376
|
+
onClick: (s) => (n("dropdown:click", o), o.event ? o.event() : null)
|
|
2337
2377
|
}), {
|
|
2338
2378
|
default: P(() => [
|
|
2339
|
-
o.icon ? (
|
|
2379
|
+
o.icon ? (g(), R(J(o.icon), {
|
|
2340
2380
|
key: 0,
|
|
2341
2381
|
class: "rvc-dropdown-item-icon"
|
|
2342
|
-
})) :
|
|
2343
|
-
pe(" " +
|
|
2382
|
+
})) : B("", !0),
|
|
2383
|
+
pe(" " + M(o.name), 1)
|
|
2344
2384
|
]),
|
|
2345
2385
|
_: 2
|
|
2346
2386
|
}, 1040, ["as", "onClick"]))
|
|
@@ -2357,12 +2397,12 @@ const po = {
|
|
|
2357
2397
|
})
|
|
2358
2398
|
]),
|
|
2359
2399
|
_: 3
|
|
2360
|
-
}));
|
|
2400
|
+
}, 8, ["class"]));
|
|
2361
2401
|
}
|
|
2362
|
-
},
|
|
2402
|
+
}), Eo = {
|
|
2363
2403
|
key: 1,
|
|
2364
2404
|
class: "rvc-empty-state-title"
|
|
2365
|
-
},
|
|
2405
|
+
}, Va = {
|
|
2366
2406
|
__name: "EmptyState",
|
|
2367
2407
|
props: {
|
|
2368
2408
|
title: {
|
|
@@ -2380,18 +2420,90 @@ const po = {
|
|
|
2380
2420
|
}
|
|
2381
2421
|
},
|
|
2382
2422
|
setup(e) {
|
|
2383
|
-
return (t, n) => (
|
|
2423
|
+
return (t, n) => (g(), S("div", {
|
|
2384
2424
|
class: N(["rvc-empty-state", { "rvc-empty-state-bg": e.background }])
|
|
2385
2425
|
}, [
|
|
2386
|
-
e.icon ? (
|
|
2426
|
+
e.icon ? (g(), R(J(e.icon), {
|
|
2387
2427
|
key: 0,
|
|
2388
2428
|
class: "rvc-empty-state-icon"
|
|
2389
|
-
})) :
|
|
2390
|
-
e.title ? (
|
|
2429
|
+
})) : B("", !0),
|
|
2430
|
+
e.title ? (g(), S("p", Eo, M(e.title), 1)) : B("", !0),
|
|
2391
2431
|
k(t.$slots, "default")
|
|
2392
2432
|
], 2));
|
|
2393
2433
|
}
|
|
2394
|
-
},
|
|
2434
|
+
}, To = {
|
|
2435
|
+
key: 0,
|
|
2436
|
+
class: "rvc-input-prefix"
|
|
2437
|
+
}, ko = ["type"], Oo = ["type"], Ha = /* @__PURE__ */ Object.assign({
|
|
2438
|
+
inheritAttrs: !1
|
|
2439
|
+
}, {
|
|
2440
|
+
__name: "FormInput",
|
|
2441
|
+
props: {
|
|
2442
|
+
modelValue: {
|
|
2443
|
+
type: [String, Number, Object],
|
|
2444
|
+
default: null
|
|
2445
|
+
},
|
|
2446
|
+
rootClass: {
|
|
2447
|
+
type: String,
|
|
2448
|
+
default: ""
|
|
2449
|
+
},
|
|
2450
|
+
iconLeft: {
|
|
2451
|
+
type: [Object, Function],
|
|
2452
|
+
default: null
|
|
2453
|
+
},
|
|
2454
|
+
icon: {
|
|
2455
|
+
type: [Object, Function],
|
|
2456
|
+
default: null
|
|
2457
|
+
},
|
|
2458
|
+
size: {
|
|
2459
|
+
type: String,
|
|
2460
|
+
default: "base",
|
|
2461
|
+
validator: (e) => ["sm", "base"].includes(e)
|
|
2462
|
+
}
|
|
2463
|
+
},
|
|
2464
|
+
emits: ["update:modelValue"],
|
|
2465
|
+
setup(e, { emit: t }) {
|
|
2466
|
+
const n = e, l = t, { hasModelBinding: r } = mt(), a = $l(), o = w({
|
|
2467
|
+
get: () => n.modelValue,
|
|
2468
|
+
set: (i) => l("update:modelValue", i)
|
|
2469
|
+
});
|
|
2470
|
+
return (i, s) => (g(), S("div", {
|
|
2471
|
+
class: N([
|
|
2472
|
+
"rvc-input",
|
|
2473
|
+
`rvc-input-${e.size}`,
|
|
2474
|
+
e.rootClass
|
|
2475
|
+
])
|
|
2476
|
+
}, [
|
|
2477
|
+
$(a).prefix || $(a).iconLeft || e.iconLeft ? (g(), S("span", To, [
|
|
2478
|
+
k(i.$slots, "prefix", {}, () => [
|
|
2479
|
+
k(i.$slots, "iconLeft", { icon: e.iconLeft }, () => [
|
|
2480
|
+
e.iconLeft ? (g(), R(J(e.iconLeft), {
|
|
2481
|
+
key: 0,
|
|
2482
|
+
"aria-hidden": "true"
|
|
2483
|
+
})) : B("", !0)
|
|
2484
|
+
])
|
|
2485
|
+
])
|
|
2486
|
+
])) : B("", !0),
|
|
2487
|
+
k(i.$slots, "input", He(Tn(i.$attrs)), () => [
|
|
2488
|
+
$(r) ? vt((g(), S("input", Y({ key: 0 }, i.$attrs, {
|
|
2489
|
+
"onUpdate:modelValue": s[0] || (s[0] = (u) => o.value = u),
|
|
2490
|
+
type: i.$attrs.type || "text"
|
|
2491
|
+
}), null, 16, ko)), [
|
|
2492
|
+
[Nt, o.value]
|
|
2493
|
+
]) : (g(), S("input", Y({
|
|
2494
|
+
key: 1,
|
|
2495
|
+
type: i.$attrs.type || "text"
|
|
2496
|
+
}, i.$attrs), null, 16, Oo))
|
|
2497
|
+
]),
|
|
2498
|
+
k(i.$slots, "icon", { icon: e.icon }, () => [
|
|
2499
|
+
e.icon ? (g(), R(J(e.icon), {
|
|
2500
|
+
key: 0,
|
|
2501
|
+
"aria-hidden": "true"
|
|
2502
|
+
})) : B("", !0)
|
|
2503
|
+
])
|
|
2504
|
+
], 2));
|
|
2505
|
+
}
|
|
2506
|
+
}), Wa = /* @__PURE__ */ Object.assign({
|
|
2395
2507
|
inheritAttrs: !1
|
|
2396
2508
|
}, {
|
|
2397
2509
|
__name: "Lightswitch",
|
|
@@ -2407,40 +2519,40 @@ const po = {
|
|
|
2407
2519
|
get: () => n.modelValue,
|
|
2408
2520
|
set: (a) => l("update:modelValue", a)
|
|
2409
2521
|
});
|
|
2410
|
-
return (a, o) => (
|
|
2522
|
+
return (a, o) => (g(), R($(oo), {
|
|
2411
2523
|
as: "div",
|
|
2412
2524
|
class: "rvc-lightswitch-group"
|
|
2413
2525
|
}, {
|
|
2414
2526
|
default: P(() => [
|
|
2415
|
-
D(
|
|
2527
|
+
D($(ao), Y({
|
|
2416
2528
|
modelValue: r.value,
|
|
2417
2529
|
"onUpdate:modelValue": o[0] || (o[0] = (i) => r.value = i),
|
|
2418
2530
|
class: [{ "rvc-lightswitch-enabled": r.value }, "rvc-lightswitch"]
|
|
2419
2531
|
}, a.$attrs), {
|
|
2420
2532
|
default: P(() => [
|
|
2421
|
-
|
|
2533
|
+
x("span", {
|
|
2422
2534
|
class: N([{ "rvc-translate-x-6": r.value }, "rvc-lightswitch-toggle"])
|
|
2423
2535
|
}, null, 2)
|
|
2424
2536
|
]),
|
|
2425
2537
|
_: 1
|
|
2426
2538
|
}, 16, ["modelValue", "class"]),
|
|
2427
|
-
a.$slots.default ? (
|
|
2539
|
+
a.$slots.default ? (g(), R($(io), { key: 0 }, {
|
|
2428
2540
|
default: P(() => [
|
|
2429
2541
|
k(a.$slots, "default")
|
|
2430
2542
|
]),
|
|
2431
2543
|
_: 3
|
|
2432
|
-
})) :
|
|
2544
|
+
})) : B("", !0)
|
|
2433
2545
|
]),
|
|
2434
2546
|
_: 3
|
|
2435
2547
|
}));
|
|
2436
2548
|
}
|
|
2437
|
-
}),
|
|
2549
|
+
}), Lo = {
|
|
2438
2550
|
role: "presentation",
|
|
2439
2551
|
class: "rvc-fixed rvc-inset-0 rvc-z-10 rvc-w-screen rvc-overflow-y-auto"
|
|
2440
|
-
},
|
|
2552
|
+
}, Co = { class: "rvc-flex rvc-min-h-full rvc-justify-center rvc-p-4 rvc-items-center sm:rvc-p-0" }, Po = { class: "rvc-modal-header" }, Ao = { class: "rvc-flex rvc-items-center rvc-justify-between" }, Do = {
|
|
2441
2553
|
key: 0,
|
|
2442
2554
|
class: "rvc-ml-3 rvc-flex rvc-h-7 rvc-items-center"
|
|
2443
|
-
},
|
|
2555
|
+
}, Ro = ["id"], Fo = { class: "rvc-modal-footer" }, Ua = {
|
|
2444
2556
|
__name: "Modal",
|
|
2445
2557
|
props: {
|
|
2446
2558
|
as: {
|
|
@@ -2483,22 +2595,22 @@ const po = {
|
|
|
2483
2595
|
titleId: i,
|
|
2484
2596
|
descriptionId: s,
|
|
2485
2597
|
initialFocusElement: u
|
|
2486
|
-
} =
|
|
2487
|
-
return (c, f) => (
|
|
2598
|
+
} = al(l);
|
|
2599
|
+
return (c, f) => (g(), R($(bt), { as: "template" }, {
|
|
2488
2600
|
default: P(() => [
|
|
2489
|
-
D(
|
|
2601
|
+
D($(Qn), {
|
|
2490
2602
|
as: e.as,
|
|
2491
2603
|
class: "rvc-modal",
|
|
2492
2604
|
static: "",
|
|
2493
2605
|
"aria-modal": "true",
|
|
2494
2606
|
role: "dialog",
|
|
2495
|
-
"initial-focus":
|
|
2496
|
-
"aria-labelledby":
|
|
2607
|
+
"initial-focus": $(u),
|
|
2608
|
+
"aria-labelledby": $(i),
|
|
2497
2609
|
onClose: f[6] || (f[6] = (d) => c.$emit("modal:close")),
|
|
2498
|
-
onSubmit: f[7] || (f[7] =
|
|
2610
|
+
onSubmit: f[7] || (f[7] = kn((d) => n("modal:save", d), ["prevent"]))
|
|
2499
2611
|
}, {
|
|
2500
2612
|
default: P(() => [
|
|
2501
|
-
D(
|
|
2613
|
+
D($(Je), {
|
|
2502
2614
|
as: "template",
|
|
2503
2615
|
enter: "rvc-ease-out rvc-duration-300",
|
|
2504
2616
|
"enter-from": "rvc-opacity-0",
|
|
@@ -2509,16 +2621,16 @@ const po = {
|
|
|
2509
2621
|
onBeforeEnter: f[0] || (f[0] = (d) => n("modal:open"))
|
|
2510
2622
|
}, {
|
|
2511
2623
|
default: P(() => f[8] || (f[8] = [
|
|
2512
|
-
|
|
2624
|
+
x("div", {
|
|
2513
2625
|
"aria-hidden": "true",
|
|
2514
2626
|
class: "rvc-fixed rvc-inset-0 rvc-transition-opacity rvc-modal-backdrop"
|
|
2515
2627
|
}, null, -1)
|
|
2516
2628
|
])),
|
|
2517
2629
|
_: 1
|
|
2518
2630
|
}),
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
D(
|
|
2631
|
+
x("div", Lo, [
|
|
2632
|
+
x("div", Co, [
|
|
2633
|
+
D($(Je), {
|
|
2522
2634
|
as: "template",
|
|
2523
2635
|
enter: "rvc-ease-out rvc-duration-300",
|
|
2524
2636
|
"enter-from": "rvc-opacity-0 rvc-translate-y-4 sm:rvc-translate-y-0 sm:rvc-scale-95",
|
|
@@ -2530,58 +2642,58 @@ const po = {
|
|
|
2530
2642
|
onAfterLeave: f[5] || (f[5] = (d) => (a.value = !1, n("modal:closed")))
|
|
2531
2643
|
}, {
|
|
2532
2644
|
default: P(() => [
|
|
2533
|
-
D(
|
|
2645
|
+
D($(Jn), {
|
|
2534
2646
|
class: N(["rvc-modal-panel", e.panelClass]),
|
|
2535
2647
|
"aria-busy": e.spinning,
|
|
2536
|
-
"aria-describedby":
|
|
2648
|
+
"aria-describedby": $(s)
|
|
2537
2649
|
}, {
|
|
2538
2650
|
default: P(() => [
|
|
2539
|
-
|
|
2651
|
+
x("header", Po, [
|
|
2540
2652
|
k(c.$slots, "header", { title: e.title }, () => [
|
|
2541
|
-
|
|
2542
|
-
D(
|
|
2543
|
-
id:
|
|
2653
|
+
x("div", Ao, [
|
|
2654
|
+
D($(_n), {
|
|
2655
|
+
id: $(i),
|
|
2544
2656
|
class: "rvc-modal-title"
|
|
2545
2657
|
}, {
|
|
2546
2658
|
default: P(() => [
|
|
2547
|
-
pe(
|
|
2659
|
+
pe(M(e.title), 1)
|
|
2548
2660
|
]),
|
|
2549
2661
|
_: 1
|
|
2550
2662
|
}, 8, ["id"]),
|
|
2551
|
-
e.showClose ? (
|
|
2552
|
-
|
|
2663
|
+
e.showClose ? (g(), S("div", Do, [
|
|
2664
|
+
x("button", {
|
|
2553
2665
|
type: "button",
|
|
2554
2666
|
class: "rvc-relative rvc-modal-close",
|
|
2555
2667
|
"aria-label": "Close panel",
|
|
2556
2668
|
onClick: f[1] || (f[1] = (d) => n("modal:close"))
|
|
2557
2669
|
}, [
|
|
2558
|
-
D(
|
|
2670
|
+
D($(pt), {
|
|
2559
2671
|
class: "rvc-size-full",
|
|
2560
2672
|
"aria-hidden": "true"
|
|
2561
2673
|
})
|
|
2562
2674
|
])
|
|
2563
|
-
])) :
|
|
2675
|
+
])) : B("", !0)
|
|
2564
2676
|
])
|
|
2565
2677
|
])
|
|
2566
2678
|
]),
|
|
2567
|
-
|
|
2568
|
-
id:
|
|
2679
|
+
x("div", {
|
|
2680
|
+
id: $(s),
|
|
2569
2681
|
ref_key: "contentRef",
|
|
2570
2682
|
ref: r,
|
|
2571
2683
|
class: "rvc-modal-content"
|
|
2572
2684
|
}, [
|
|
2573
|
-
k(c.$slots, "default", { ready:
|
|
2574
|
-
], 8,
|
|
2575
|
-
|
|
2685
|
+
k(c.$slots, "default", { ready: $(a) })
|
|
2686
|
+
], 8, Ro),
|
|
2687
|
+
x("footer", Fo, [
|
|
2576
2688
|
k(c.$slots, "footer", { loading: e.spinning }, () => [
|
|
2577
|
-
D(
|
|
2578
|
-
type:
|
|
2689
|
+
D(Xe, {
|
|
2690
|
+
type: $(o) ? "submit" : "button",
|
|
2579
2691
|
label: e.submitLabel,
|
|
2580
2692
|
spinning: e.spinning,
|
|
2581
2693
|
disabled: e.spinning,
|
|
2582
|
-
onClick: f[2] || (f[2] = (d) =>
|
|
2694
|
+
onClick: f[2] || (f[2] = (d) => !$(o) && c.$emit("modal:save"))
|
|
2583
2695
|
}, null, 8, ["type", "label", "spinning", "disabled"]),
|
|
2584
|
-
D(
|
|
2696
|
+
D(Xe, {
|
|
2585
2697
|
type: "button",
|
|
2586
2698
|
color: "light",
|
|
2587
2699
|
label: e.cancelLabel,
|
|
@@ -2604,7 +2716,7 @@ const po = {
|
|
|
2604
2716
|
_: 3
|
|
2605
2717
|
}));
|
|
2606
2718
|
}
|
|
2607
|
-
},
|
|
2719
|
+
}, Mo = { class: "rvc-radio" }, Bo = ["id"], Io = { key: 2 }, No = ["for"], za = /* @__PURE__ */ Object.assign({
|
|
2608
2720
|
inheritAttrs: !1
|
|
2609
2721
|
}, {
|
|
2610
2722
|
__name: "Radio",
|
|
@@ -2627,28 +2739,28 @@ const po = {
|
|
|
2627
2739
|
const n = e, l = t, r = w({
|
|
2628
2740
|
get: () => n.modelValue,
|
|
2629
2741
|
set: (s) => l("update:modelValue", s)
|
|
2630
|
-
}), { hasModelBinding: a } =
|
|
2631
|
-
|
|
2742
|
+
}), { hasModelBinding: a } = mt(), i = {
|
|
2743
|
+
...En(),
|
|
2632
2744
|
id: n.id,
|
|
2633
2745
|
type: "radio",
|
|
2634
2746
|
class: "rvc-absolute rvc-opacity-0 rvc-inset-0 rvc-cursor-pointer"
|
|
2635
2747
|
};
|
|
2636
|
-
return (s, u) => (
|
|
2637
|
-
|
|
2748
|
+
return (s, u) => (g(), S("div", Mo, [
|
|
2749
|
+
$(a) ? vt((g(), S("input", Y({ key: 0 }, i, {
|
|
2638
2750
|
id: e.id,
|
|
2639
2751
|
"onUpdate:modelValue": u[0] || (u[0] = (c) => r.value = c)
|
|
2640
|
-
}), null, 16,
|
|
2641
|
-
[
|
|
2642
|
-
]) : (
|
|
2643
|
-
u[1] || (u[1] =
|
|
2644
|
-
s.$slots.default || e.label ? (
|
|
2752
|
+
}), null, 16, Bo)), [
|
|
2753
|
+
[Nt, r.value]
|
|
2754
|
+
]) : (g(), S("input", He(Y({ key: 1 }, i)), null, 16)),
|
|
2755
|
+
u[1] || (u[1] = x("span", { class: "rvc-radio-input" }, null, -1)),
|
|
2756
|
+
s.$slots.default || e.label ? (g(), S("span", Io, [
|
|
2645
2757
|
k(s.$slots, "default", {}, () => [
|
|
2646
|
-
|
|
2758
|
+
x("label", { for: e.id }, M(e.label), 9, No)
|
|
2647
2759
|
])
|
|
2648
|
-
])) :
|
|
2760
|
+
])) : B("", !0)
|
|
2649
2761
|
]));
|
|
2650
2762
|
}
|
|
2651
|
-
}),
|
|
2763
|
+
}), jo = { class: "rvc-tabs-nav" }, Vo = { class: "md:rvc-hidden" }, Ho = ["value", "selected"], qa = {
|
|
2652
2764
|
__name: "Tabs",
|
|
2653
2765
|
props: {
|
|
2654
2766
|
modelValue: {
|
|
@@ -2693,42 +2805,42 @@ const po = {
|
|
|
2693
2805
|
} = s;
|
|
2694
2806
|
return p;
|
|
2695
2807
|
};
|
|
2696
|
-
return (s, u) => (
|
|
2697
|
-
|
|
2808
|
+
return (s, u) => (g(), S(ie, null, [
|
|
2809
|
+
x("div", {
|
|
2698
2810
|
class: N(["rvc-tabs rvc-hidden md:rvc-flex", { "rvc-tabs-buttons": e.tabStyle === "buttons" }])
|
|
2699
2811
|
}, [
|
|
2700
|
-
|
|
2701
|
-
(
|
|
2812
|
+
x("nav", jo, [
|
|
2813
|
+
(g(!0), S(ie, null, Te(e.tabs, (c, f) => (g(), R(J(c.as ? c.as : "button"), Y({ ref_for: !0 }, i(c), {
|
|
2702
2814
|
key: `${f}-tab-item`,
|
|
2703
2815
|
as: c.bindAs ? c.bindAs : void 0,
|
|
2704
2816
|
class: ["rvc-tab", { "rvc-tab-active": a.value === f }],
|
|
2705
2817
|
onClick: (d) => a.value = f
|
|
2706
2818
|
}), {
|
|
2707
2819
|
default: P(() => [
|
|
2708
|
-
pe(
|
|
2820
|
+
pe(M(c.name), 1)
|
|
2709
2821
|
]),
|
|
2710
2822
|
_: 2
|
|
2711
2823
|
}, 1040, ["as", "class", "onClick"]))), 128))
|
|
2712
2824
|
])
|
|
2713
2825
|
], 2),
|
|
2714
|
-
|
|
2715
|
-
D(
|
|
2826
|
+
x("div", Vo, [
|
|
2827
|
+
D(Ln, {
|
|
2716
2828
|
value: a.value,
|
|
2717
2829
|
onChange: o
|
|
2718
2830
|
}, {
|
|
2719
2831
|
default: P(() => [
|
|
2720
|
-
(
|
|
2832
|
+
(g(!0), S(ie, null, Te(e.tabs, (c, f) => (g(), S("option", {
|
|
2721
2833
|
key: `${f}-tab-item-select-option`,
|
|
2722
2834
|
value: f,
|
|
2723
2835
|
selected: a.value === f
|
|
2724
|
-
},
|
|
2836
|
+
}, M(c.name), 9, Ho))), 128))
|
|
2725
2837
|
]),
|
|
2726
2838
|
_: 1
|
|
2727
2839
|
}, 8, ["value"])
|
|
2728
2840
|
])
|
|
2729
2841
|
], 64));
|
|
2730
2842
|
}
|
|
2731
|
-
},
|
|
2843
|
+
}, Wo = { class: "rvc-toast-title" }, Ka = {
|
|
2732
2844
|
__name: "Toast",
|
|
2733
2845
|
props: {
|
|
2734
2846
|
as: {
|
|
@@ -2777,7 +2889,7 @@ const po = {
|
|
|
2777
2889
|
r();
|
|
2778
2890
|
}), me(() => n.open, (a) => {
|
|
2779
2891
|
a && r();
|
|
2780
|
-
}), (a, o) => (
|
|
2892
|
+
}), (a, o) => (g(), R($(bt), {
|
|
2781
2893
|
as: "template",
|
|
2782
2894
|
show: e.open,
|
|
2783
2895
|
enter: "rvc-transition-opacity rvc-duration-300",
|
|
@@ -2788,31 +2900,31 @@ const po = {
|
|
|
2788
2900
|
"leave-to": "rvc-opacity-0"
|
|
2789
2901
|
}, {
|
|
2790
2902
|
default: P(() => [
|
|
2791
|
-
(
|
|
2903
|
+
(g(), R(J(e.as), {
|
|
2792
2904
|
class: N(["rvc-toast rvc-transition-opacity", `rvc-toast-${e.position}`, `rvc-toast-${e.type}`, { "rvc-toast-open": e.open }])
|
|
2793
2905
|
}, {
|
|
2794
2906
|
default: P(() => [
|
|
2795
2907
|
k(a.$slots, "icon", {}, () => [
|
|
2796
|
-
e.icon ? (
|
|
2908
|
+
e.icon ? (g(), R(J(e.icon), {
|
|
2797
2909
|
key: 0,
|
|
2798
2910
|
class: "rvc-toast-icon"
|
|
2799
|
-
})) :
|
|
2911
|
+
})) : B("", !0)
|
|
2800
2912
|
]),
|
|
2801
|
-
|
|
2913
|
+
x("div", null, [
|
|
2802
2914
|
k(a.$slots, "title", {}, () => [
|
|
2803
|
-
|
|
2915
|
+
x("span", Wo, M(e.title), 1)
|
|
2804
2916
|
]),
|
|
2805
2917
|
k(a.$slots, "default")
|
|
2806
2918
|
]),
|
|
2807
2919
|
k(a.$slots, "close", {}, () => [
|
|
2808
|
-
e.showClose ? (
|
|
2920
|
+
e.showClose ? (g(), S("button", {
|
|
2809
2921
|
key: 0,
|
|
2810
2922
|
type: "button",
|
|
2811
2923
|
class: "rvc-toast-close rvc-transition-colors",
|
|
2812
2924
|
onClick: o[0] || (o[0] = (i) => a.$emit("toast:close"))
|
|
2813
2925
|
}, [
|
|
2814
|
-
D(
|
|
2815
|
-
])) :
|
|
2926
|
+
D($(pt), { class: "rvc-size-5" })
|
|
2927
|
+
])) : B("", !0)
|
|
2816
2928
|
])
|
|
2817
2929
|
]),
|
|
2818
2930
|
_: 3
|
|
@@ -2821,22 +2933,22 @@ const po = {
|
|
|
2821
2933
|
_: 3
|
|
2822
2934
|
}, 8, ["show"]));
|
|
2823
2935
|
}
|
|
2824
|
-
},
|
|
2936
|
+
}, Uo = ["top", "right", "bottom", "left"], mn = ["start", "end"], gn = /* @__PURE__ */ Uo.reduce((e, t) => e.concat(t, t + "-" + mn[0], t + "-" + mn[1]), []), Ce = Math.min, oe = Math.max, dt = Math.round, ut = Math.floor, $e = (e) => ({
|
|
2825
2937
|
x: e,
|
|
2826
2938
|
y: e
|
|
2827
|
-
}),
|
|
2939
|
+
}), zo = {
|
|
2828
2940
|
left: "right",
|
|
2829
2941
|
right: "left",
|
|
2830
2942
|
bottom: "top",
|
|
2831
2943
|
top: "bottom"
|
|
2832
|
-
},
|
|
2944
|
+
}, qo = {
|
|
2833
2945
|
start: "end",
|
|
2834
2946
|
end: "start"
|
|
2835
2947
|
};
|
|
2836
|
-
function
|
|
2837
|
-
return
|
|
2948
|
+
function Mt(e, t, n) {
|
|
2949
|
+
return oe(e, Ce(t, n));
|
|
2838
2950
|
}
|
|
2839
|
-
function
|
|
2951
|
+
function ze(e, t) {
|
|
2840
2952
|
return typeof e == "function" ? e(t) : e;
|
|
2841
2953
|
}
|
|
2842
2954
|
function Be(e) {
|
|
@@ -2845,31 +2957,31 @@ function Be(e) {
|
|
|
2845
2957
|
function xe(e) {
|
|
2846
2958
|
return e.split("-")[1];
|
|
2847
2959
|
}
|
|
2848
|
-
function
|
|
2960
|
+
function il(e) {
|
|
2849
2961
|
return e === "x" ? "y" : "x";
|
|
2850
2962
|
}
|
|
2851
|
-
function
|
|
2963
|
+
function qt(e) {
|
|
2852
2964
|
return e === "y" ? "height" : "width";
|
|
2853
2965
|
}
|
|
2854
|
-
function
|
|
2966
|
+
function lt(e) {
|
|
2855
2967
|
return ["top", "bottom"].includes(Be(e)) ? "y" : "x";
|
|
2856
2968
|
}
|
|
2857
|
-
function
|
|
2858
|
-
return
|
|
2969
|
+
function Kt(e) {
|
|
2970
|
+
return il(lt(e));
|
|
2859
2971
|
}
|
|
2860
|
-
function
|
|
2972
|
+
function Ko(e, t, n) {
|
|
2861
2973
|
n === void 0 && (n = !1);
|
|
2862
|
-
const l = xe(e), r =
|
|
2974
|
+
const l = xe(e), r = Kt(e), a = qt(r);
|
|
2863
2975
|
let o = r === "x" ? l === (n ? "end" : "start") ? "right" : "left" : l === "start" ? "bottom" : "top";
|
|
2864
|
-
return t.reference[a] > t.floating[a] && (o =
|
|
2976
|
+
return t.reference[a] > t.floating[a] && (o = hn(o)), [o, hn(o)];
|
|
2865
2977
|
}
|
|
2866
|
-
function
|
|
2867
|
-
return e.replace(/start|end/g, (t) =>
|
|
2978
|
+
function Yo(e) {
|
|
2979
|
+
return e.replace(/start|end/g, (t) => qo[t]);
|
|
2868
2980
|
}
|
|
2869
|
-
function
|
|
2870
|
-
return e.replace(/left|right|bottom|top/g, (t) =>
|
|
2981
|
+
function hn(e) {
|
|
2982
|
+
return e.replace(/left|right|bottom|top/g, (t) => zo[t]);
|
|
2871
2983
|
}
|
|
2872
|
-
function
|
|
2984
|
+
function Zo(e) {
|
|
2873
2985
|
return {
|
|
2874
2986
|
top: 0,
|
|
2875
2987
|
right: 0,
|
|
@@ -2878,8 +2990,8 @@ function Uo(e) {
|
|
|
2878
2990
|
...e
|
|
2879
2991
|
};
|
|
2880
2992
|
}
|
|
2881
|
-
function
|
|
2882
|
-
return typeof e != "number" ?
|
|
2993
|
+
function sl(e) {
|
|
2994
|
+
return typeof e != "number" ? Zo(e) : {
|
|
2883
2995
|
top: e,
|
|
2884
2996
|
right: e,
|
|
2885
2997
|
bottom: e,
|
|
@@ -2904,12 +3016,12 @@ function ft(e) {
|
|
|
2904
3016
|
y: n
|
|
2905
3017
|
};
|
|
2906
3018
|
}
|
|
2907
|
-
function
|
|
3019
|
+
function yn(e, t, n) {
|
|
2908
3020
|
let {
|
|
2909
3021
|
reference: l,
|
|
2910
3022
|
floating: r
|
|
2911
3023
|
} = e;
|
|
2912
|
-
const a =
|
|
3024
|
+
const a = lt(t), o = Kt(t), i = qt(o), s = Be(t), u = a === "y", c = l.x + l.width / 2 - r.width / 2, f = l.y + l.height / 2 - r.height / 2, d = l[i] / 2 - r[i] / 2;
|
|
2913
3025
|
let v;
|
|
2914
3026
|
switch (s) {
|
|
2915
3027
|
case "top":
|
|
@@ -2952,7 +3064,7 @@ function mn(e, t, n) {
|
|
|
2952
3064
|
}
|
|
2953
3065
|
return v;
|
|
2954
3066
|
}
|
|
2955
|
-
const
|
|
3067
|
+
const Go = async (e, t, n) => {
|
|
2956
3068
|
const {
|
|
2957
3069
|
placement: l = "bottom",
|
|
2958
3070
|
strategy: r = "absolute",
|
|
@@ -2966,17 +3078,17 @@ const zo = async (e, t, n) => {
|
|
|
2966
3078
|
}), {
|
|
2967
3079
|
x: c,
|
|
2968
3080
|
y: f
|
|
2969
|
-
} =
|
|
3081
|
+
} = yn(u, l, s), d = l, v = {}, p = 0;
|
|
2970
3082
|
for (let m = 0; m < i.length; m++) {
|
|
2971
3083
|
const {
|
|
2972
|
-
name:
|
|
2973
|
-
fn:
|
|
3084
|
+
name: h,
|
|
3085
|
+
fn: y
|
|
2974
3086
|
} = i[m], {
|
|
2975
|
-
x:
|
|
3087
|
+
x: b,
|
|
2976
3088
|
y: T,
|
|
2977
3089
|
data: A,
|
|
2978
3090
|
reset: C
|
|
2979
|
-
} = await
|
|
3091
|
+
} = await y({
|
|
2980
3092
|
x: c,
|
|
2981
3093
|
y: f,
|
|
2982
3094
|
initialPlacement: l,
|
|
@@ -2990,10 +3102,10 @@ const zo = async (e, t, n) => {
|
|
|
2990
3102
|
floating: t
|
|
2991
3103
|
}
|
|
2992
3104
|
});
|
|
2993
|
-
c =
|
|
3105
|
+
c = b ?? c, f = T ?? f, v = {
|
|
2994
3106
|
...v,
|
|
2995
|
-
[
|
|
2996
|
-
...v[
|
|
3107
|
+
[h]: {
|
|
3108
|
+
...v[h],
|
|
2997
3109
|
...A
|
|
2998
3110
|
}
|
|
2999
3111
|
}, C && p <= 50 && (p++, typeof C == "object" && (C.placement && (d = C.placement), C.rects && (u = C.rects === !0 ? await o.getElementRects({
|
|
@@ -3003,7 +3115,7 @@ const zo = async (e, t, n) => {
|
|
|
3003
3115
|
}) : C.rects), {
|
|
3004
3116
|
x: c,
|
|
3005
3117
|
y: f
|
|
3006
|
-
} =
|
|
3118
|
+
} = yn(u, d, s)), m = -1);
|
|
3007
3119
|
}
|
|
3008
3120
|
return {
|
|
3009
3121
|
x: c,
|
|
@@ -3013,7 +3125,7 @@ const zo = async (e, t, n) => {
|
|
|
3013
3125
|
middlewareData: v
|
|
3014
3126
|
};
|
|
3015
3127
|
};
|
|
3016
|
-
async function
|
|
3128
|
+
async function Yt(e, t) {
|
|
3017
3129
|
var n;
|
|
3018
3130
|
t === void 0 && (t = {});
|
|
3019
3131
|
const {
|
|
@@ -3029,12 +3141,12 @@ async function Kt(e, t) {
|
|
|
3029
3141
|
elementContext: f = "floating",
|
|
3030
3142
|
altBoundary: d = !1,
|
|
3031
3143
|
padding: v = 0
|
|
3032
|
-
} =
|
|
3033
|
-
element: (n = await (a.isElement == null ? void 0 : a.isElement(
|
|
3144
|
+
} = ze(t, e), p = sl(v), h = i[d ? f === "floating" ? "reference" : "floating" : f], y = ft(await a.getClippingRect({
|
|
3145
|
+
element: (n = await (a.isElement == null ? void 0 : a.isElement(h))) == null || n ? h : h.contextElement || await (a.getDocumentElement == null ? void 0 : a.getDocumentElement(i.floating)),
|
|
3034
3146
|
boundary: u,
|
|
3035
3147
|
rootBoundary: c,
|
|
3036
3148
|
strategy: s
|
|
3037
|
-
})),
|
|
3149
|
+
})), b = f === "floating" ? {
|
|
3038
3150
|
x: l,
|
|
3039
3151
|
y: r,
|
|
3040
3152
|
width: o.floating.width,
|
|
@@ -3047,18 +3159,18 @@ async function Kt(e, t) {
|
|
|
3047
3159
|
y: 1
|
|
3048
3160
|
}, C = ft(a.convertOffsetParentRelativeRectToViewportRelativeRect ? await a.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
3049
3161
|
elements: i,
|
|
3050
|
-
rect:
|
|
3162
|
+
rect: b,
|
|
3051
3163
|
offsetParent: T,
|
|
3052
3164
|
strategy: s
|
|
3053
|
-
}) :
|
|
3165
|
+
}) : b);
|
|
3054
3166
|
return {
|
|
3055
|
-
top: (
|
|
3056
|
-
bottom: (C.bottom -
|
|
3057
|
-
left: (
|
|
3058
|
-
right: (C.right -
|
|
3167
|
+
top: (y.top - C.top + p.top) / A.y,
|
|
3168
|
+
bottom: (C.bottom - y.bottom + p.bottom) / A.y,
|
|
3169
|
+
left: (y.left - C.left + p.left) / A.x,
|
|
3170
|
+
right: (C.right - y.right + p.right) / A.x
|
|
3059
3171
|
};
|
|
3060
3172
|
}
|
|
3061
|
-
const
|
|
3173
|
+
const Xo = (e) => ({
|
|
3062
3174
|
name: "arrow",
|
|
3063
3175
|
options: e,
|
|
3064
3176
|
async fn(t) {
|
|
@@ -3073,33 +3185,33 @@ const qo = (e) => ({
|
|
|
3073
3185
|
} = t, {
|
|
3074
3186
|
element: u,
|
|
3075
3187
|
padding: c = 0
|
|
3076
|
-
} =
|
|
3188
|
+
} = ze(e, t) || {};
|
|
3077
3189
|
if (u == null)
|
|
3078
3190
|
return {};
|
|
3079
|
-
const f =
|
|
3191
|
+
const f = sl(c), d = {
|
|
3080
3192
|
x: n,
|
|
3081
3193
|
y: l
|
|
3082
|
-
}, v =
|
|
3083
|
-
let L =
|
|
3084
|
-
(!L || !await (o.isElement == null ? void 0 : o.isElement(
|
|
3085
|
-
const
|
|
3194
|
+
}, v = Kt(r), p = qt(v), m = await o.getDimensions(u), h = v === "y", y = h ? "top" : "left", b = h ? "bottom" : "right", T = h ? "clientHeight" : "clientWidth", A = a.reference[p] + a.reference[v] - d[v] - a.floating[p], C = d[v] - a.reference[v], I = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(u));
|
|
3195
|
+
let L = I ? I[T] : 0;
|
|
3196
|
+
(!L || !await (o.isElement == null ? void 0 : o.isElement(I))) && (L = i.floating[T] || a.floating[p]);
|
|
3197
|
+
const j = A / 2 - C / 2, X = L / 2 - m[p] / 2 - 1, V = Ce(f[y], X), Q = Ce(f[b], X), te = V, Z = L - m[p] - Q, ne = L / 2 - m[p] / 2 + j, le = Mt(te, ne, Z), re = !s.arrow && xe(r) != null && ne !== le && a.reference[p] / 2 - (ne < te ? V : Q) - m[p] / 2 < 0, be = re ? ne < te ? ne - te : ne - Z : 0;
|
|
3086
3198
|
return {
|
|
3087
3199
|
[v]: d[v] + be,
|
|
3088
3200
|
data: {
|
|
3089
|
-
[v]:
|
|
3090
|
-
centerOffset:
|
|
3091
|
-
...
|
|
3201
|
+
[v]: le,
|
|
3202
|
+
centerOffset: ne - le - be,
|
|
3203
|
+
...re && {
|
|
3092
3204
|
alignmentOffset: be
|
|
3093
3205
|
}
|
|
3094
3206
|
},
|
|
3095
|
-
reset:
|
|
3207
|
+
reset: re
|
|
3096
3208
|
};
|
|
3097
3209
|
}
|
|
3098
3210
|
});
|
|
3099
|
-
function
|
|
3100
|
-
return (e ? [...n.filter((r) => xe(r) === e), ...n.filter((r) => xe(r) !== e)] : n.filter((r) => Be(r) === r)).filter((r) => e ? xe(r) === e || (t ?
|
|
3211
|
+
function Qo(e, t, n) {
|
|
3212
|
+
return (e ? [...n.filter((r) => xe(r) === e), ...n.filter((r) => xe(r) !== e)] : n.filter((r) => Be(r) === r)).filter((r) => e ? xe(r) === e || (t ? Yo(r) !== r : !1) : !0);
|
|
3101
3213
|
}
|
|
3102
|
-
const
|
|
3214
|
+
const Jo = function(e) {
|
|
3103
3215
|
return e === void 0 && (e = {}), {
|
|
3104
3216
|
name: "autoPlacement",
|
|
3105
3217
|
options: e,
|
|
@@ -3114,51 +3226,51 @@ const Yo = function(e) {
|
|
|
3114
3226
|
} = t, {
|
|
3115
3227
|
crossAxis: c = !1,
|
|
3116
3228
|
alignment: f,
|
|
3117
|
-
allowedPlacements: d =
|
|
3229
|
+
allowedPlacements: d = gn,
|
|
3118
3230
|
autoAlignment: v = !0,
|
|
3119
3231
|
...p
|
|
3120
|
-
} =
|
|
3121
|
-
if (
|
|
3232
|
+
} = ze(e, t), m = f !== void 0 || d === gn ? Qo(f || null, v, d) : d, h = await Yt(t, p), y = ((n = o.autoPlacement) == null ? void 0 : n.index) || 0, b = m[y];
|
|
3233
|
+
if (b == null)
|
|
3122
3234
|
return {};
|
|
3123
|
-
const T =
|
|
3124
|
-
if (i !==
|
|
3235
|
+
const T = Ko(b, a, await (s.isRTL == null ? void 0 : s.isRTL(u.floating)));
|
|
3236
|
+
if (i !== b)
|
|
3125
3237
|
return {
|
|
3126
3238
|
reset: {
|
|
3127
3239
|
placement: m[0]
|
|
3128
3240
|
}
|
|
3129
3241
|
};
|
|
3130
|
-
const A = [
|
|
3131
|
-
placement:
|
|
3242
|
+
const A = [h[Be(b)], h[T[0]], h[T[1]]], C = [...((l = o.autoPlacement) == null ? void 0 : l.overflows) || [], {
|
|
3243
|
+
placement: b,
|
|
3132
3244
|
overflows: A
|
|
3133
|
-
}],
|
|
3134
|
-
if (
|
|
3245
|
+
}], I = m[y + 1];
|
|
3246
|
+
if (I)
|
|
3135
3247
|
return {
|
|
3136
3248
|
data: {
|
|
3137
|
-
index:
|
|
3249
|
+
index: y + 1,
|
|
3138
3250
|
overflows: C
|
|
3139
3251
|
},
|
|
3140
3252
|
reset: {
|
|
3141
|
-
placement:
|
|
3253
|
+
placement: I
|
|
3142
3254
|
}
|
|
3143
3255
|
};
|
|
3144
|
-
const L = C.map((
|
|
3145
|
-
const Q = xe(
|
|
3146
|
-
return [
|
|
3256
|
+
const L = C.map((V) => {
|
|
3257
|
+
const Q = xe(V.placement);
|
|
3258
|
+
return [V.placement, Q && c ? (
|
|
3147
3259
|
// Check along the mainAxis and main crossAxis side.
|
|
3148
|
-
|
|
3260
|
+
V.overflows.slice(0, 2).reduce((te, Z) => te + Z, 0)
|
|
3149
3261
|
) : (
|
|
3150
3262
|
// Check only the mainAxis.
|
|
3151
|
-
|
|
3152
|
-
),
|
|
3153
|
-
}).sort((
|
|
3263
|
+
V.overflows[0]
|
|
3264
|
+
), V.overflows];
|
|
3265
|
+
}).sort((V, Q) => V[1] - Q[1]), X = ((r = L.filter((V) => V[2].slice(
|
|
3154
3266
|
0,
|
|
3155
3267
|
// Aligned placements should not check their opposite crossAxis
|
|
3156
3268
|
// side.
|
|
3157
|
-
xe(
|
|
3269
|
+
xe(V[0]) ? 2 : 3
|
|
3158
3270
|
).every((Q) => Q <= 0))[0]) == null ? void 0 : r[0]) || L[0][0];
|
|
3159
3271
|
return X !== i ? {
|
|
3160
3272
|
data: {
|
|
3161
|
-
index:
|
|
3273
|
+
index: y + 1,
|
|
3162
3274
|
overflows: C
|
|
3163
3275
|
},
|
|
3164
3276
|
reset: {
|
|
@@ -3168,12 +3280,12 @@ const Yo = function(e) {
|
|
|
3168
3280
|
}
|
|
3169
3281
|
};
|
|
3170
3282
|
};
|
|
3171
|
-
async function
|
|
3283
|
+
async function _o(e, t) {
|
|
3172
3284
|
const {
|
|
3173
3285
|
placement: n,
|
|
3174
3286
|
platform: l,
|
|
3175
3287
|
elements: r
|
|
3176
|
-
} = e, a = await (l.isRTL == null ? void 0 : l.isRTL(r.floating)), o = Be(n), i = xe(n), s =
|
|
3288
|
+
} = e, a = await (l.isRTL == null ? void 0 : l.isRTL(r.floating)), o = Be(n), i = xe(n), s = lt(n) === "y", u = ["left", "top"].includes(o) ? -1 : 1, c = a && s ? -1 : 1, f = ze(t, e);
|
|
3177
3289
|
let {
|
|
3178
3290
|
mainAxis: d,
|
|
3179
3291
|
crossAxis: v,
|
|
@@ -3195,7 +3307,7 @@ async function Go(e, t) {
|
|
|
3195
3307
|
y: v * c
|
|
3196
3308
|
};
|
|
3197
3309
|
}
|
|
3198
|
-
const
|
|
3310
|
+
const ea = function(e) {
|
|
3199
3311
|
return e === void 0 && (e = 0), {
|
|
3200
3312
|
name: "offset",
|
|
3201
3313
|
options: e,
|
|
@@ -3206,7 +3318,7 @@ const Zo = function(e) {
|
|
|
3206
3318
|
y: a,
|
|
3207
3319
|
placement: o,
|
|
3208
3320
|
middlewareData: i
|
|
3209
|
-
} = t, s = await
|
|
3321
|
+
} = t, s = await _o(t, e);
|
|
3210
3322
|
return o === ((n = i.offset) == null ? void 0 : n.placement) && (l = i.arrow) != null && l.alignmentOffset ? {} : {
|
|
3211
3323
|
x: r + s.x,
|
|
3212
3324
|
y: a + s.y,
|
|
@@ -3217,7 +3329,7 @@ const Zo = function(e) {
|
|
|
3217
3329
|
};
|
|
3218
3330
|
}
|
|
3219
3331
|
};
|
|
3220
|
-
},
|
|
3332
|
+
}, ta = function(e) {
|
|
3221
3333
|
return e === void 0 && (e = {}), {
|
|
3222
3334
|
name: "shift",
|
|
3223
3335
|
options: e,
|
|
@@ -3230,30 +3342,30 @@ const Zo = function(e) {
|
|
|
3230
3342
|
mainAxis: a = !0,
|
|
3231
3343
|
crossAxis: o = !1,
|
|
3232
3344
|
limiter: i = {
|
|
3233
|
-
fn: (
|
|
3345
|
+
fn: (h) => {
|
|
3234
3346
|
let {
|
|
3235
|
-
x:
|
|
3236
|
-
y
|
|
3237
|
-
} =
|
|
3347
|
+
x: y,
|
|
3348
|
+
y: b
|
|
3349
|
+
} = h;
|
|
3238
3350
|
return {
|
|
3239
|
-
x:
|
|
3240
|
-
y
|
|
3351
|
+
x: y,
|
|
3352
|
+
y: b
|
|
3241
3353
|
};
|
|
3242
3354
|
}
|
|
3243
3355
|
},
|
|
3244
3356
|
...s
|
|
3245
|
-
} =
|
|
3357
|
+
} = ze(e, t), u = {
|
|
3246
3358
|
x: n,
|
|
3247
3359
|
y: l
|
|
3248
|
-
}, c = await
|
|
3360
|
+
}, c = await Yt(t, s), f = lt(Be(r)), d = il(f);
|
|
3249
3361
|
let v = u[d], p = u[f];
|
|
3250
3362
|
if (a) {
|
|
3251
|
-
const
|
|
3252
|
-
v =
|
|
3363
|
+
const h = d === "y" ? "top" : "left", y = d === "y" ? "bottom" : "right", b = v + c[h], T = v - c[y];
|
|
3364
|
+
v = Mt(b, v, T);
|
|
3253
3365
|
}
|
|
3254
3366
|
if (o) {
|
|
3255
|
-
const
|
|
3256
|
-
p =
|
|
3367
|
+
const h = f === "y" ? "top" : "left", y = f === "y" ? "bottom" : "right", b = p + c[h], T = p - c[y];
|
|
3368
|
+
p = Mt(b, p, T);
|
|
3257
3369
|
}
|
|
3258
3370
|
const m = i.fn({
|
|
3259
3371
|
...t,
|
|
@@ -3273,7 +3385,7 @@ const Zo = function(e) {
|
|
|
3273
3385
|
};
|
|
3274
3386
|
}
|
|
3275
3387
|
};
|
|
3276
|
-
},
|
|
3388
|
+
}, na = function(e) {
|
|
3277
3389
|
return e === void 0 && (e = {}), {
|
|
3278
3390
|
name: "size",
|
|
3279
3391
|
options: e,
|
|
@@ -3288,21 +3400,21 @@ const Zo = function(e) {
|
|
|
3288
3400
|
apply: s = () => {
|
|
3289
3401
|
},
|
|
3290
3402
|
...u
|
|
3291
|
-
} =
|
|
3403
|
+
} = ze(e, t), c = await Yt(t, u), f = Be(r), d = xe(r), v = lt(r) === "y", {
|
|
3292
3404
|
width: p,
|
|
3293
3405
|
height: m
|
|
3294
3406
|
} = a.floating;
|
|
3295
|
-
let
|
|
3296
|
-
f === "top" || f === "bottom" ? (
|
|
3297
|
-
const
|
|
3298
|
-
let L = A,
|
|
3299
|
-
if ((n = t.middlewareData.shift) != null && n.enabled.x && (
|
|
3300
|
-
const
|
|
3301
|
-
v ?
|
|
3407
|
+
let h, y;
|
|
3408
|
+
f === "top" || f === "bottom" ? (h = f, y = d === (await (o.isRTL == null ? void 0 : o.isRTL(i.floating)) ? "start" : "end") ? "left" : "right") : (y = f, h = d === "end" ? "top" : "bottom");
|
|
3409
|
+
const b = m - c.top - c.bottom, T = p - c.left - c.right, A = Ce(m - c[h], b), C = Ce(p - c[y], T), I = !t.middlewareData.shift;
|
|
3410
|
+
let L = A, j = C;
|
|
3411
|
+
if ((n = t.middlewareData.shift) != null && n.enabled.x && (j = T), (l = t.middlewareData.shift) != null && l.enabled.y && (L = b), I && !d) {
|
|
3412
|
+
const V = oe(c.left, 0), Q = oe(c.right, 0), te = oe(c.top, 0), Z = oe(c.bottom, 0);
|
|
3413
|
+
v ? j = p - 2 * (V !== 0 || Q !== 0 ? V + Q : oe(c.left, c.right)) : L = m - 2 * (te !== 0 || Z !== 0 ? te + Z : oe(c.top, c.bottom));
|
|
3302
3414
|
}
|
|
3303
3415
|
await s({
|
|
3304
3416
|
...t,
|
|
3305
|
-
availableWidth:
|
|
3417
|
+
availableWidth: j,
|
|
3306
3418
|
availableHeight: L
|
|
3307
3419
|
});
|
|
3308
3420
|
const X = await o.getDimensions(i.floating);
|
|
@@ -3314,33 +3426,33 @@ const Zo = function(e) {
|
|
|
3314
3426
|
}
|
|
3315
3427
|
};
|
|
3316
3428
|
};
|
|
3317
|
-
function
|
|
3429
|
+
function wt() {
|
|
3318
3430
|
return typeof window < "u";
|
|
3319
3431
|
}
|
|
3320
3432
|
function Ie(e) {
|
|
3321
|
-
return
|
|
3433
|
+
return Zt(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
3322
3434
|
}
|
|
3323
|
-
function
|
|
3435
|
+
function se(e) {
|
|
3324
3436
|
var t;
|
|
3325
3437
|
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
3326
3438
|
}
|
|
3327
3439
|
function Ee(e) {
|
|
3328
3440
|
var t;
|
|
3329
|
-
return (t = (
|
|
3441
|
+
return (t = (Zt(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
3330
3442
|
}
|
|
3331
|
-
function
|
|
3332
|
-
return
|
|
3443
|
+
function Zt(e) {
|
|
3444
|
+
return wt() ? e instanceof Node || e instanceof se(e).Node : !1;
|
|
3333
3445
|
}
|
|
3334
3446
|
function he(e) {
|
|
3335
|
-
return
|
|
3447
|
+
return wt() ? e instanceof Element || e instanceof se(e).Element : !1;
|
|
3336
3448
|
}
|
|
3337
3449
|
function Se(e) {
|
|
3338
|
-
return
|
|
3450
|
+
return wt() ? e instanceof HTMLElement || e instanceof se(e).HTMLElement : !1;
|
|
3339
3451
|
}
|
|
3340
|
-
function
|
|
3341
|
-
return !
|
|
3452
|
+
function bn(e) {
|
|
3453
|
+
return !wt() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof se(e).ShadowRoot;
|
|
3342
3454
|
}
|
|
3343
|
-
function
|
|
3455
|
+
function rt(e) {
|
|
3344
3456
|
const {
|
|
3345
3457
|
overflow: t,
|
|
3346
3458
|
overflowX: n,
|
|
@@ -3349,10 +3461,10 @@ function lt(e) {
|
|
|
3349
3461
|
} = ye(e);
|
|
3350
3462
|
return /auto|scroll|overlay|hidden|clip/.test(t + l + n) && !["inline", "contents"].includes(r);
|
|
3351
3463
|
}
|
|
3352
|
-
function
|
|
3464
|
+
function la(e) {
|
|
3353
3465
|
return ["table", "td", "th"].includes(Ie(e));
|
|
3354
3466
|
}
|
|
3355
|
-
function
|
|
3467
|
+
function $t(e) {
|
|
3356
3468
|
return [":popover-open", ":modal"].some((t) => {
|
|
3357
3469
|
try {
|
|
3358
3470
|
return e.matches(t);
|
|
@@ -3362,30 +3474,30 @@ function bt(e) {
|
|
|
3362
3474
|
});
|
|
3363
3475
|
}
|
|
3364
3476
|
function Gt(e) {
|
|
3365
|
-
const t =
|
|
3477
|
+
const t = Xt(), n = he(e) ? ye(e) : e;
|
|
3366
3478
|
return n.transform !== "none" || n.perspective !== "none" || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((l) => (n.willChange || "").includes(l)) || ["paint", "layout", "strict", "content"].some((l) => (n.contain || "").includes(l));
|
|
3367
3479
|
}
|
|
3368
|
-
function
|
|
3480
|
+
function ra(e) {
|
|
3369
3481
|
let t = Pe(e);
|
|
3370
|
-
for (; Se(t) && !
|
|
3482
|
+
for (; Se(t) && !Ue(t); ) {
|
|
3371
3483
|
if (Gt(t))
|
|
3372
3484
|
return t;
|
|
3373
|
-
if (
|
|
3485
|
+
if ($t(t))
|
|
3374
3486
|
return null;
|
|
3375
3487
|
t = Pe(t);
|
|
3376
3488
|
}
|
|
3377
3489
|
return null;
|
|
3378
3490
|
}
|
|
3379
|
-
function
|
|
3491
|
+
function Xt() {
|
|
3380
3492
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
3381
3493
|
}
|
|
3382
|
-
function
|
|
3494
|
+
function Ue(e) {
|
|
3383
3495
|
return ["html", "body", "#document"].includes(Ie(e));
|
|
3384
3496
|
}
|
|
3385
3497
|
function ye(e) {
|
|
3386
|
-
return
|
|
3498
|
+
return se(e).getComputedStyle(e);
|
|
3387
3499
|
}
|
|
3388
|
-
function
|
|
3500
|
+
function xt(e) {
|
|
3389
3501
|
return he(e) ? {
|
|
3390
3502
|
scrollLeft: e.scrollLeft,
|
|
3391
3503
|
scrollTop: e.scrollTop
|
|
@@ -3401,29 +3513,29 @@ function Pe(e) {
|
|
|
3401
3513
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
3402
3514
|
e.assignedSlot || // DOM Element detected.
|
|
3403
3515
|
e.parentNode || // ShadowRoot detected.
|
|
3404
|
-
|
|
3516
|
+
bn(e) && e.host || // Fallback.
|
|
3405
3517
|
Ee(e)
|
|
3406
3518
|
);
|
|
3407
|
-
return
|
|
3519
|
+
return bn(t) ? t.host : t;
|
|
3408
3520
|
}
|
|
3409
|
-
function
|
|
3521
|
+
function ul(e) {
|
|
3410
3522
|
const t = Pe(e);
|
|
3411
|
-
return
|
|
3523
|
+
return Ue(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Se(t) && rt(t) ? t : ul(t);
|
|
3412
3524
|
}
|
|
3413
|
-
function
|
|
3525
|
+
function _e(e, t, n) {
|
|
3414
3526
|
var l;
|
|
3415
3527
|
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
3416
|
-
const r =
|
|
3528
|
+
const r = ul(e), a = r === ((l = e.ownerDocument) == null ? void 0 : l.body), o = se(r);
|
|
3417
3529
|
if (a) {
|
|
3418
|
-
const i =
|
|
3419
|
-
return t.concat(o, o.visualViewport || [],
|
|
3530
|
+
const i = Bt(o);
|
|
3531
|
+
return t.concat(o, o.visualViewport || [], rt(r) ? r : [], i && n ? _e(i) : []);
|
|
3420
3532
|
}
|
|
3421
|
-
return t.concat(r,
|
|
3533
|
+
return t.concat(r, _e(r, [], n));
|
|
3422
3534
|
}
|
|
3423
|
-
function
|
|
3535
|
+
function Bt(e) {
|
|
3424
3536
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
3425
3537
|
}
|
|
3426
|
-
function
|
|
3538
|
+
function cl(e) {
|
|
3427
3539
|
const t = ye(e);
|
|
3428
3540
|
let n = parseFloat(t.width) || 0, l = parseFloat(t.height) || 0;
|
|
3429
3541
|
const r = Se(e), a = r ? e.offsetWidth : n, o = r ? e.offsetHeight : l, i = dt(n) !== a || dt(l) !== o;
|
|
@@ -3433,48 +3545,48 @@ function il(e) {
|
|
|
3433
3545
|
$: i
|
|
3434
3546
|
};
|
|
3435
3547
|
}
|
|
3436
|
-
function
|
|
3548
|
+
function Qt(e) {
|
|
3437
3549
|
return he(e) ? e : e.contextElement;
|
|
3438
3550
|
}
|
|
3439
3551
|
function Ve(e) {
|
|
3440
|
-
const t =
|
|
3552
|
+
const t = Qt(e);
|
|
3441
3553
|
if (!Se(t))
|
|
3442
3554
|
return $e(1);
|
|
3443
3555
|
const n = t.getBoundingClientRect(), {
|
|
3444
3556
|
width: l,
|
|
3445
3557
|
height: r,
|
|
3446
3558
|
$: a
|
|
3447
|
-
} =
|
|
3559
|
+
} = cl(t);
|
|
3448
3560
|
let o = (a ? dt(n.width) : n.width) / l, i = (a ? dt(n.height) : n.height) / r;
|
|
3449
3561
|
return (!o || !Number.isFinite(o)) && (o = 1), (!i || !Number.isFinite(i)) && (i = 1), {
|
|
3450
3562
|
x: o,
|
|
3451
3563
|
y: i
|
|
3452
3564
|
};
|
|
3453
3565
|
}
|
|
3454
|
-
const
|
|
3455
|
-
function
|
|
3456
|
-
const t =
|
|
3457
|
-
return !
|
|
3566
|
+
const oa = /* @__PURE__ */ $e(0);
|
|
3567
|
+
function dl(e) {
|
|
3568
|
+
const t = se(e);
|
|
3569
|
+
return !Xt() || !t.visualViewport ? oa : {
|
|
3458
3570
|
x: t.visualViewport.offsetLeft,
|
|
3459
3571
|
y: t.visualViewport.offsetTop
|
|
3460
3572
|
};
|
|
3461
3573
|
}
|
|
3462
|
-
function
|
|
3463
|
-
return t === void 0 && (t = !1), !n || t && n !==
|
|
3574
|
+
function aa(e, t, n) {
|
|
3575
|
+
return t === void 0 && (t = !1), !n || t && n !== se(e) ? !1 : t;
|
|
3464
3576
|
}
|
|
3465
3577
|
function Me(e, t, n, l) {
|
|
3466
3578
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
3467
|
-
const r = e.getBoundingClientRect(), a =
|
|
3579
|
+
const r = e.getBoundingClientRect(), a = Qt(e);
|
|
3468
3580
|
let o = $e(1);
|
|
3469
3581
|
t && (l ? he(l) && (o = Ve(l)) : o = Ve(e));
|
|
3470
|
-
const i =
|
|
3582
|
+
const i = aa(a, n, l) ? dl(a) : $e(0);
|
|
3471
3583
|
let s = (r.left + i.x) / o.x, u = (r.top + i.y) / o.y, c = r.width / o.x, f = r.height / o.y;
|
|
3472
3584
|
if (a) {
|
|
3473
|
-
const d =
|
|
3474
|
-
let p = d, m =
|
|
3585
|
+
const d = se(a), v = l && he(l) ? se(l) : l;
|
|
3586
|
+
let p = d, m = Bt(p);
|
|
3475
3587
|
for (; m && l && v !== p; ) {
|
|
3476
|
-
const
|
|
3477
|
-
s *=
|
|
3588
|
+
const h = Ve(m), y = m.getBoundingClientRect(), b = ye(m), T = y.left + (m.clientLeft + parseFloat(b.paddingLeft)) * h.x, A = y.top + (m.clientTop + parseFloat(b.paddingTop)) * h.y;
|
|
3589
|
+
s *= h.x, u *= h.y, c *= h.x, f *= h.y, s += T, u += A, p = se(m), m = Bt(p);
|
|
3478
3590
|
}
|
|
3479
3591
|
}
|
|
3480
3592
|
return ft({
|
|
@@ -3484,29 +3596,29 @@ function Me(e, t, n, l) {
|
|
|
3484
3596
|
y: u
|
|
3485
3597
|
});
|
|
3486
3598
|
}
|
|
3487
|
-
function
|
|
3488
|
-
const n =
|
|
3599
|
+
function Jt(e, t) {
|
|
3600
|
+
const n = xt(e).scrollLeft;
|
|
3489
3601
|
return t ? t.left + n : Me(Ee(e)).left + n;
|
|
3490
3602
|
}
|
|
3491
|
-
function
|
|
3603
|
+
function fl(e, t, n) {
|
|
3492
3604
|
n === void 0 && (n = !1);
|
|
3493
3605
|
const l = e.getBoundingClientRect(), r = l.left + t.scrollLeft - (n ? 0 : (
|
|
3494
3606
|
// RTL <body> scrollbar.
|
|
3495
|
-
|
|
3607
|
+
Jt(e, l)
|
|
3496
3608
|
)), a = l.top + t.scrollTop;
|
|
3497
3609
|
return {
|
|
3498
3610
|
x: r,
|
|
3499
3611
|
y: a
|
|
3500
3612
|
};
|
|
3501
3613
|
}
|
|
3502
|
-
function
|
|
3614
|
+
function ia(e) {
|
|
3503
3615
|
let {
|
|
3504
3616
|
elements: t,
|
|
3505
3617
|
rect: n,
|
|
3506
3618
|
offsetParent: l,
|
|
3507
3619
|
strategy: r
|
|
3508
3620
|
} = e;
|
|
3509
|
-
const a = r === "fixed", o = Ee(l), i = t ?
|
|
3621
|
+
const a = r === "fixed", o = Ee(l), i = t ? $t(t.floating) : !1;
|
|
3510
3622
|
if (l === o || i && a)
|
|
3511
3623
|
return n;
|
|
3512
3624
|
let s = {
|
|
@@ -3514,11 +3626,11 @@ function na(e) {
|
|
|
3514
3626
|
scrollTop: 0
|
|
3515
3627
|
}, u = $e(1);
|
|
3516
3628
|
const c = $e(0), f = Se(l);
|
|
3517
|
-
if ((f || !f && !a) && ((Ie(l) !== "body" ||
|
|
3629
|
+
if ((f || !f && !a) && ((Ie(l) !== "body" || rt(o)) && (s = xt(l)), Se(l))) {
|
|
3518
3630
|
const v = Me(l);
|
|
3519
3631
|
u = Ve(l), c.x = v.x + l.clientLeft, c.y = v.y + l.clientTop;
|
|
3520
3632
|
}
|
|
3521
|
-
const d = o && !f && !a ?
|
|
3633
|
+
const d = o && !f && !a ? fl(o, s, !0) : $e(0);
|
|
3522
3634
|
return {
|
|
3523
3635
|
width: n.width * u.x,
|
|
3524
3636
|
height: n.height * u.y,
|
|
@@ -3526,26 +3638,26 @@ function na(e) {
|
|
|
3526
3638
|
y: n.y * u.y - s.scrollTop * u.y + c.y + d.y
|
|
3527
3639
|
};
|
|
3528
3640
|
}
|
|
3529
|
-
function
|
|
3641
|
+
function sa(e) {
|
|
3530
3642
|
return Array.from(e.getClientRects());
|
|
3531
3643
|
}
|
|
3532
|
-
function
|
|
3533
|
-
const t = Ee(e), n =
|
|
3534
|
-
let o = -n.scrollLeft +
|
|
3644
|
+
function ua(e) {
|
|
3645
|
+
const t = Ee(e), n = xt(e), l = e.ownerDocument.body, r = oe(t.scrollWidth, t.clientWidth, l.scrollWidth, l.clientWidth), a = oe(t.scrollHeight, t.clientHeight, l.scrollHeight, l.clientHeight);
|
|
3646
|
+
let o = -n.scrollLeft + Jt(e);
|
|
3535
3647
|
const i = -n.scrollTop;
|
|
3536
|
-
return ye(l).direction === "rtl" && (o +=
|
|
3648
|
+
return ye(l).direction === "rtl" && (o += oe(t.clientWidth, l.clientWidth) - r), {
|
|
3537
3649
|
width: r,
|
|
3538
3650
|
height: a,
|
|
3539
3651
|
x: o,
|
|
3540
3652
|
y: i
|
|
3541
3653
|
};
|
|
3542
3654
|
}
|
|
3543
|
-
function
|
|
3544
|
-
const n =
|
|
3655
|
+
function ca(e, t) {
|
|
3656
|
+
const n = se(e), l = Ee(e), r = n.visualViewport;
|
|
3545
3657
|
let a = l.clientWidth, o = l.clientHeight, i = 0, s = 0;
|
|
3546
3658
|
if (r) {
|
|
3547
3659
|
a = r.width, o = r.height;
|
|
3548
|
-
const u =
|
|
3660
|
+
const u = Xt();
|
|
3549
3661
|
(!u || u && t === "fixed") && (i = r.offsetLeft, s = r.offsetTop);
|
|
3550
3662
|
}
|
|
3551
3663
|
return {
|
|
@@ -3555,7 +3667,7 @@ function oa(e, t) {
|
|
|
3555
3667
|
y: s
|
|
3556
3668
|
};
|
|
3557
3669
|
}
|
|
3558
|
-
function
|
|
3670
|
+
function da(e, t) {
|
|
3559
3671
|
const n = Me(e, !0, t === "fixed"), l = n.top + e.clientTop, r = n.left + e.clientLeft, a = Se(e) ? Ve(e) : $e(1), o = e.clientWidth * a.x, i = e.clientHeight * a.y, s = r * a.x, u = l * a.y;
|
|
3560
3672
|
return {
|
|
3561
3673
|
width: o,
|
|
@@ -3564,16 +3676,16 @@ function aa(e, t) {
|
|
|
3564
3676
|
y: u
|
|
3565
3677
|
};
|
|
3566
3678
|
}
|
|
3567
|
-
function
|
|
3679
|
+
function wn(e, t, n) {
|
|
3568
3680
|
let l;
|
|
3569
3681
|
if (t === "viewport")
|
|
3570
|
-
l =
|
|
3682
|
+
l = ca(e, n);
|
|
3571
3683
|
else if (t === "document")
|
|
3572
|
-
l =
|
|
3684
|
+
l = ua(Ee(e));
|
|
3573
3685
|
else if (he(t))
|
|
3574
|
-
l =
|
|
3686
|
+
l = da(t, n);
|
|
3575
3687
|
else {
|
|
3576
|
-
const r =
|
|
3688
|
+
const r = dl(e);
|
|
3577
3689
|
l = {
|
|
3578
3690
|
x: t.x - r.x,
|
|
3579
3691
|
y: t.y - r.y,
|
|
@@ -3583,34 +3695,34 @@ function hn(e, t, n) {
|
|
|
3583
3695
|
}
|
|
3584
3696
|
return ft(l);
|
|
3585
3697
|
}
|
|
3586
|
-
function
|
|
3698
|
+
function vl(e, t) {
|
|
3587
3699
|
const n = Pe(e);
|
|
3588
|
-
return n === t || !he(n) ||
|
|
3700
|
+
return n === t || !he(n) || Ue(n) ? !1 : ye(n).position === "fixed" || vl(n, t);
|
|
3589
3701
|
}
|
|
3590
|
-
function
|
|
3702
|
+
function fa(e, t) {
|
|
3591
3703
|
const n = t.get(e);
|
|
3592
3704
|
if (n)
|
|
3593
3705
|
return n;
|
|
3594
|
-
let l =
|
|
3706
|
+
let l = _e(e, [], !1).filter((i) => he(i) && Ie(i) !== "body"), r = null;
|
|
3595
3707
|
const a = ye(e).position === "fixed";
|
|
3596
3708
|
let o = a ? Pe(e) : e;
|
|
3597
|
-
for (; he(o) && !
|
|
3709
|
+
for (; he(o) && !Ue(o); ) {
|
|
3598
3710
|
const i = ye(o), s = Gt(o);
|
|
3599
|
-
!s && i.position === "fixed" && (r = null), (a ? !s && !r : !s && i.position === "static" && !!r && ["absolute", "fixed"].includes(r.position) ||
|
|
3711
|
+
!s && i.position === "fixed" && (r = null), (a ? !s && !r : !s && i.position === "static" && !!r && ["absolute", "fixed"].includes(r.position) || rt(o) && !s && vl(e, o)) ? l = l.filter((c) => c !== o) : r = i, o = Pe(o);
|
|
3600
3712
|
}
|
|
3601
3713
|
return t.set(e, l), l;
|
|
3602
3714
|
}
|
|
3603
|
-
function
|
|
3715
|
+
function va(e) {
|
|
3604
3716
|
let {
|
|
3605
3717
|
element: t,
|
|
3606
3718
|
boundary: n,
|
|
3607
3719
|
rootBoundary: l,
|
|
3608
3720
|
strategy: r
|
|
3609
3721
|
} = e;
|
|
3610
|
-
const o = [...n === "clippingAncestors" ?
|
|
3611
|
-
const f =
|
|
3612
|
-
return u.top =
|
|
3613
|
-
},
|
|
3722
|
+
const o = [...n === "clippingAncestors" ? $t(t) ? [] : fa(t, this._c) : [].concat(n), l], i = o[0], s = o.reduce((u, c) => {
|
|
3723
|
+
const f = wn(t, c, r);
|
|
3724
|
+
return u.top = oe(f.top, u.top), u.right = Ce(f.right, u.right), u.bottom = Ce(f.bottom, u.bottom), u.left = oe(f.left, u.left), u;
|
|
3725
|
+
}, wn(t, i, r));
|
|
3614
3726
|
return {
|
|
3615
3727
|
width: s.right - s.left,
|
|
3616
3728
|
height: s.bottom - s.top,
|
|
@@ -3618,17 +3730,17 @@ function sa(e) {
|
|
|
3618
3730
|
y: s.top
|
|
3619
3731
|
};
|
|
3620
3732
|
}
|
|
3621
|
-
function
|
|
3733
|
+
function pa(e) {
|
|
3622
3734
|
const {
|
|
3623
3735
|
width: t,
|
|
3624
3736
|
height: n
|
|
3625
|
-
} =
|
|
3737
|
+
} = cl(e);
|
|
3626
3738
|
return {
|
|
3627
3739
|
width: t,
|
|
3628
3740
|
height: n
|
|
3629
3741
|
};
|
|
3630
3742
|
}
|
|
3631
|
-
function
|
|
3743
|
+
function ma(e, t, n) {
|
|
3632
3744
|
const l = Se(t), r = Ee(t), a = n === "fixed", o = Me(e, !0, a, t);
|
|
3633
3745
|
let i = {
|
|
3634
3746
|
scrollLeft: 0,
|
|
@@ -3636,11 +3748,11 @@ function ca(e, t, n) {
|
|
|
3636
3748
|
};
|
|
3637
3749
|
const s = $e(0);
|
|
3638
3750
|
if (l || !l && !a)
|
|
3639
|
-
if ((Ie(t) !== "body" ||
|
|
3751
|
+
if ((Ie(t) !== "body" || rt(r)) && (i = xt(t)), l) {
|
|
3640
3752
|
const d = Me(t, !0, a, t);
|
|
3641
3753
|
s.x = d.x + t.clientLeft, s.y = d.y + t.clientTop;
|
|
3642
|
-
} else r && (s.x =
|
|
3643
|
-
const u = r && !l && !a ?
|
|
3754
|
+
} else r && (s.x = Jt(r));
|
|
3755
|
+
const u = r && !l && !a ? fl(r, i) : $e(0), c = o.left + i.scrollLeft - s.x - u.x, f = o.top + i.scrollTop - s.y - u.y;
|
|
3644
3756
|
return {
|
|
3645
3757
|
x: c,
|
|
3646
3758
|
y: f,
|
|
@@ -3648,10 +3760,10 @@ function ca(e, t, n) {
|
|
|
3648
3760
|
height: o.height
|
|
3649
3761
|
};
|
|
3650
3762
|
}
|
|
3651
|
-
function
|
|
3763
|
+
function Ot(e) {
|
|
3652
3764
|
return ye(e).position === "static";
|
|
3653
3765
|
}
|
|
3654
|
-
function
|
|
3766
|
+
function $n(e, t) {
|
|
3655
3767
|
if (!Se(e) || ye(e).position === "fixed")
|
|
3656
3768
|
return null;
|
|
3657
3769
|
if (t)
|
|
@@ -3659,28 +3771,28 @@ function yn(e, t) {
|
|
|
3659
3771
|
let n = e.offsetParent;
|
|
3660
3772
|
return Ee(e) === n && (n = n.ownerDocument.body), n;
|
|
3661
3773
|
}
|
|
3662
|
-
function
|
|
3663
|
-
const n =
|
|
3664
|
-
if (
|
|
3774
|
+
function pl(e, t) {
|
|
3775
|
+
const n = se(e);
|
|
3776
|
+
if ($t(e))
|
|
3665
3777
|
return n;
|
|
3666
3778
|
if (!Se(e)) {
|
|
3667
3779
|
let r = Pe(e);
|
|
3668
|
-
for (; r && !
|
|
3669
|
-
if (he(r) && !
|
|
3780
|
+
for (; r && !Ue(r); ) {
|
|
3781
|
+
if (he(r) && !Ot(r))
|
|
3670
3782
|
return r;
|
|
3671
3783
|
r = Pe(r);
|
|
3672
3784
|
}
|
|
3673
3785
|
return n;
|
|
3674
3786
|
}
|
|
3675
|
-
let l =
|
|
3676
|
-
for (; l &&
|
|
3677
|
-
l =
|
|
3678
|
-
return l &&
|
|
3787
|
+
let l = $n(e, t);
|
|
3788
|
+
for (; l && la(l) && Ot(l); )
|
|
3789
|
+
l = $n(l, t);
|
|
3790
|
+
return l && Ue(l) && Ot(l) && !Gt(l) ? n : l || ra(e) || n;
|
|
3679
3791
|
}
|
|
3680
|
-
const
|
|
3681
|
-
const t = this.getOffsetParent ||
|
|
3792
|
+
const ga = async function(e) {
|
|
3793
|
+
const t = this.getOffsetParent || pl, n = this.getDimensions, l = await n(e.floating);
|
|
3682
3794
|
return {
|
|
3683
|
-
reference:
|
|
3795
|
+
reference: ma(e.reference, await t(e.floating), e.strategy),
|
|
3684
3796
|
floating: {
|
|
3685
3797
|
x: 0,
|
|
3686
3798
|
y: 0,
|
|
@@ -3689,22 +3801,22 @@ const da = async function(e) {
|
|
|
3689
3801
|
}
|
|
3690
3802
|
};
|
|
3691
3803
|
};
|
|
3692
|
-
function
|
|
3804
|
+
function ha(e) {
|
|
3693
3805
|
return ye(e).direction === "rtl";
|
|
3694
3806
|
}
|
|
3695
|
-
const
|
|
3696
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
3807
|
+
const ya = {
|
|
3808
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: ia,
|
|
3697
3809
|
getDocumentElement: Ee,
|
|
3698
|
-
getClippingRect:
|
|
3699
|
-
getOffsetParent:
|
|
3700
|
-
getElementRects:
|
|
3701
|
-
getClientRects:
|
|
3702
|
-
getDimensions:
|
|
3810
|
+
getClippingRect: va,
|
|
3811
|
+
getOffsetParent: pl,
|
|
3812
|
+
getElementRects: ga,
|
|
3813
|
+
getClientRects: sa,
|
|
3814
|
+
getDimensions: pa,
|
|
3703
3815
|
getScale: Ve,
|
|
3704
3816
|
isElement: he,
|
|
3705
|
-
isRTL:
|
|
3817
|
+
isRTL: ha
|
|
3706
3818
|
};
|
|
3707
|
-
function
|
|
3819
|
+
function ba(e, t) {
|
|
3708
3820
|
let n = null, l;
|
|
3709
3821
|
const r = Ee(e);
|
|
3710
3822
|
function a() {
|
|
@@ -3721,17 +3833,17 @@ function pa(e, t) {
|
|
|
3721
3833
|
} = e.getBoundingClientRect();
|
|
3722
3834
|
if (i || t(), !f || !d)
|
|
3723
3835
|
return;
|
|
3724
|
-
const v =
|
|
3725
|
-
rootMargin: -v + "px " + -p + "px " + -m + "px " + -
|
|
3726
|
-
threshold:
|
|
3836
|
+
const v = ut(c), p = ut(r.clientWidth - (u + f)), m = ut(r.clientHeight - (c + d)), h = ut(u), b = {
|
|
3837
|
+
rootMargin: -v + "px " + -p + "px " + -m + "px " + -h + "px",
|
|
3838
|
+
threshold: oe(0, Ce(1, s)) || 1
|
|
3727
3839
|
};
|
|
3728
3840
|
let T = !0;
|
|
3729
3841
|
function A(C) {
|
|
3730
|
-
const
|
|
3731
|
-
if (
|
|
3842
|
+
const I = C[0].intersectionRatio;
|
|
3843
|
+
if (I !== s) {
|
|
3732
3844
|
if (!T)
|
|
3733
3845
|
return o();
|
|
3734
|
-
|
|
3846
|
+
I ? o(!1, I) : l = setTimeout(() => {
|
|
3735
3847
|
o(!1, 1e-7);
|
|
3736
3848
|
}, 1e3);
|
|
3737
3849
|
}
|
|
@@ -3739,18 +3851,18 @@ function pa(e, t) {
|
|
|
3739
3851
|
}
|
|
3740
3852
|
try {
|
|
3741
3853
|
n = new IntersectionObserver(A, {
|
|
3742
|
-
...
|
|
3854
|
+
...b,
|
|
3743
3855
|
// Handle <iframe>s
|
|
3744
3856
|
root: r.ownerDocument
|
|
3745
3857
|
});
|
|
3746
3858
|
} catch {
|
|
3747
|
-
n = new IntersectionObserver(A,
|
|
3859
|
+
n = new IntersectionObserver(A, b);
|
|
3748
3860
|
}
|
|
3749
3861
|
n.observe(e);
|
|
3750
3862
|
}
|
|
3751
3863
|
return o(!0), a;
|
|
3752
3864
|
}
|
|
3753
|
-
function
|
|
3865
|
+
function wa(e, t, n, l) {
|
|
3754
3866
|
l === void 0 && (l = {});
|
|
3755
3867
|
const {
|
|
3756
3868
|
ancestorScroll: r = !0,
|
|
@@ -3758,81 +3870,81 @@ function ma(e, t, n, l) {
|
|
|
3758
3870
|
elementResize: o = typeof ResizeObserver == "function",
|
|
3759
3871
|
layoutShift: i = typeof IntersectionObserver == "function",
|
|
3760
3872
|
animationFrame: s = !1
|
|
3761
|
-
} = l, u =
|
|
3762
|
-
c.forEach((
|
|
3763
|
-
r &&
|
|
3873
|
+
} = l, u = Qt(e), c = r || a ? [...u ? _e(u) : [], ..._e(t)] : [];
|
|
3874
|
+
c.forEach((y) => {
|
|
3875
|
+
r && y.addEventListener("scroll", n, {
|
|
3764
3876
|
passive: !0
|
|
3765
|
-
}), a &&
|
|
3877
|
+
}), a && y.addEventListener("resize", n);
|
|
3766
3878
|
});
|
|
3767
|
-
const f = u && i ?
|
|
3879
|
+
const f = u && i ? ba(u, n) : null;
|
|
3768
3880
|
let d = -1, v = null;
|
|
3769
|
-
o && (v = new ResizeObserver((
|
|
3770
|
-
let [
|
|
3771
|
-
|
|
3881
|
+
o && (v = new ResizeObserver((y) => {
|
|
3882
|
+
let [b] = y;
|
|
3883
|
+
b && b.target === u && v && (v.unobserve(t), cancelAnimationFrame(d), d = requestAnimationFrame(() => {
|
|
3772
3884
|
var T;
|
|
3773
3885
|
(T = v) == null || T.observe(t);
|
|
3774
3886
|
})), n();
|
|
3775
3887
|
}), u && !s && v.observe(u), v.observe(t));
|
|
3776
3888
|
let p, m = s ? Me(e) : null;
|
|
3777
|
-
s &&
|
|
3778
|
-
function
|
|
3779
|
-
const
|
|
3780
|
-
m && (
|
|
3889
|
+
s && h();
|
|
3890
|
+
function h() {
|
|
3891
|
+
const y = Me(e);
|
|
3892
|
+
m && (y.x !== m.x || y.y !== m.y || y.width !== m.width || y.height !== m.height) && n(), m = y, p = requestAnimationFrame(h);
|
|
3781
3893
|
}
|
|
3782
3894
|
return n(), () => {
|
|
3783
|
-
var
|
|
3784
|
-
c.forEach((
|
|
3785
|
-
r &&
|
|
3786
|
-
}), f == null || f(), (
|
|
3895
|
+
var y;
|
|
3896
|
+
c.forEach((b) => {
|
|
3897
|
+
r && b.removeEventListener("scroll", n), a && b.removeEventListener("resize", n);
|
|
3898
|
+
}), f == null || f(), (y = v) == null || y.disconnect(), v = null, s && cancelAnimationFrame(p);
|
|
3787
3899
|
};
|
|
3788
3900
|
}
|
|
3789
|
-
const
|
|
3901
|
+
const $a = ea, xa = Jo, Sa = ta, Ea = na, Ta = Xo, ka = (e, t, n) => {
|
|
3790
3902
|
const l = /* @__PURE__ */ new Map(), r = {
|
|
3791
|
-
platform:
|
|
3903
|
+
platform: ya,
|
|
3792
3904
|
...n
|
|
3793
3905
|
}, a = {
|
|
3794
3906
|
...r.platform,
|
|
3795
3907
|
_c: l
|
|
3796
3908
|
};
|
|
3797
|
-
return
|
|
3909
|
+
return Go(e, t, {
|
|
3798
3910
|
...r,
|
|
3799
3911
|
platform: a
|
|
3800
3912
|
});
|
|
3801
3913
|
};
|
|
3802
|
-
function
|
|
3914
|
+
function Oa(e) {
|
|
3803
3915
|
return e != null && typeof e == "object" && "$el" in e;
|
|
3804
3916
|
}
|
|
3805
|
-
function
|
|
3806
|
-
if (
|
|
3917
|
+
function It(e) {
|
|
3918
|
+
if (Oa(e)) {
|
|
3807
3919
|
const t = e.$el;
|
|
3808
|
-
return
|
|
3920
|
+
return Zt(t) && Ie(t) === "#comment" ? null : t;
|
|
3809
3921
|
}
|
|
3810
3922
|
return e;
|
|
3811
3923
|
}
|
|
3812
3924
|
function je(e) {
|
|
3813
|
-
return typeof e == "function" ? e() :
|
|
3925
|
+
return typeof e == "function" ? e() : $(e);
|
|
3814
3926
|
}
|
|
3815
|
-
function
|
|
3927
|
+
function La(e) {
|
|
3816
3928
|
return {
|
|
3817
3929
|
name: "arrow",
|
|
3818
3930
|
options: e,
|
|
3819
3931
|
fn(t) {
|
|
3820
|
-
const n =
|
|
3821
|
-
return n == null ? {} :
|
|
3932
|
+
const n = It(je(e.element));
|
|
3933
|
+
return n == null ? {} : Ta({
|
|
3822
3934
|
element: n,
|
|
3823
3935
|
padding: e.padding
|
|
3824
3936
|
}).fn(t);
|
|
3825
3937
|
}
|
|
3826
3938
|
};
|
|
3827
3939
|
}
|
|
3828
|
-
function
|
|
3940
|
+
function ml(e) {
|
|
3829
3941
|
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
3830
3942
|
}
|
|
3831
|
-
function
|
|
3832
|
-
const n =
|
|
3943
|
+
function xn(e, t) {
|
|
3944
|
+
const n = ml(e);
|
|
3833
3945
|
return Math.round(t * n) / n;
|
|
3834
3946
|
}
|
|
3835
|
-
function
|
|
3947
|
+
function Ca(e, t, n) {
|
|
3836
3948
|
n === void 0 && (n = {});
|
|
3837
3949
|
const l = n.whileElementsMounted, r = w(() => {
|
|
3838
3950
|
var L;
|
|
@@ -3846,7 +3958,7 @@ function Ea(e, t, n) {
|
|
|
3846
3958
|
}), s = w(() => {
|
|
3847
3959
|
var L;
|
|
3848
3960
|
return (L = je(n.transform)) != null ? L : !0;
|
|
3849
|
-
}), u = w(() =>
|
|
3961
|
+
}), u = w(() => It(e.value)), c = w(() => It(t.value)), f = E(0), d = E(0), v = E(i.value), p = E(o.value), m = Ze({}), h = E(!1), y = w(() => {
|
|
3850
3962
|
const L = {
|
|
3851
3963
|
position: v.value,
|
|
3852
3964
|
left: "0",
|
|
@@ -3854,34 +3966,34 @@ function Ea(e, t, n) {
|
|
|
3854
3966
|
};
|
|
3855
3967
|
if (!c.value)
|
|
3856
3968
|
return L;
|
|
3857
|
-
const
|
|
3969
|
+
const j = xn(c.value, f.value), X = xn(c.value, d.value);
|
|
3858
3970
|
return s.value ? {
|
|
3859
3971
|
...L,
|
|
3860
|
-
transform: "translate(" +
|
|
3861
|
-
...
|
|
3972
|
+
transform: "translate(" + j + "px, " + X + "px)",
|
|
3973
|
+
...ml(c.value) >= 1.5 && {
|
|
3862
3974
|
willChange: "transform"
|
|
3863
3975
|
}
|
|
3864
3976
|
} : {
|
|
3865
3977
|
position: v.value,
|
|
3866
|
-
left:
|
|
3978
|
+
left: j + "px",
|
|
3867
3979
|
top: X + "px"
|
|
3868
3980
|
};
|
|
3869
3981
|
});
|
|
3870
|
-
let
|
|
3982
|
+
let b;
|
|
3871
3983
|
function T() {
|
|
3872
3984
|
if (u.value == null || c.value == null)
|
|
3873
3985
|
return;
|
|
3874
3986
|
const L = r.value;
|
|
3875
|
-
|
|
3987
|
+
ka(u.value, c.value, {
|
|
3876
3988
|
middleware: a.value,
|
|
3877
3989
|
placement: o.value,
|
|
3878
3990
|
strategy: i.value
|
|
3879
|
-
}).then((
|
|
3880
|
-
f.value =
|
|
3991
|
+
}).then((j) => {
|
|
3992
|
+
f.value = j.x, d.value = j.y, v.value = j.strategy, p.value = j.placement, m.value = j.middlewareData, h.value = L !== !1;
|
|
3881
3993
|
});
|
|
3882
3994
|
}
|
|
3883
3995
|
function A() {
|
|
3884
|
-
typeof
|
|
3996
|
+
typeof b == "function" && (b(), b = void 0);
|
|
3885
3997
|
}
|
|
3886
3998
|
function C() {
|
|
3887
3999
|
if (A(), l === void 0) {
|
|
@@ -3889,31 +4001,31 @@ function Ea(e, t, n) {
|
|
|
3889
4001
|
return;
|
|
3890
4002
|
}
|
|
3891
4003
|
if (u.value != null && c.value != null) {
|
|
3892
|
-
|
|
4004
|
+
b = l(u.value, c.value, T);
|
|
3893
4005
|
return;
|
|
3894
4006
|
}
|
|
3895
4007
|
}
|
|
3896
|
-
function
|
|
3897
|
-
r.value || (
|
|
4008
|
+
function I() {
|
|
4009
|
+
r.value || (h.value = !1);
|
|
3898
4010
|
}
|
|
3899
4011
|
return me([a, o, i, r], T, {
|
|
3900
4012
|
flush: "sync"
|
|
3901
4013
|
}), me([u, c], C, {
|
|
3902
4014
|
flush: "sync"
|
|
3903
|
-
}), me(r,
|
|
4015
|
+
}), me(r, I, {
|
|
3904
4016
|
flush: "sync"
|
|
3905
|
-
}),
|
|
4017
|
+
}), xl() && Sl(A), {
|
|
3906
4018
|
x: Ne(f),
|
|
3907
4019
|
y: Ne(d),
|
|
3908
4020
|
strategy: Ne(v),
|
|
3909
4021
|
placement: Ne(p),
|
|
3910
4022
|
middlewareData: Ne(m),
|
|
3911
|
-
isPositioned: Ne(
|
|
3912
|
-
floatingStyles:
|
|
4023
|
+
isPositioned: Ne(h),
|
|
4024
|
+
floatingStyles: y,
|
|
3913
4025
|
update: T
|
|
3914
4026
|
};
|
|
3915
4027
|
}
|
|
3916
|
-
const
|
|
4028
|
+
const Pa = ["innerHTML"], Ya = {
|
|
3917
4029
|
__name: "Tooltip",
|
|
3918
4030
|
props: {
|
|
3919
4031
|
content: {
|
|
@@ -3952,17 +4064,17 @@ const Ta = ["innerHTML"], Ha = {
|
|
|
3952
4064
|
}
|
|
3953
4065
|
},
|
|
3954
4066
|
setup(e) {
|
|
3955
|
-
const t = e, n =
|
|
4067
|
+
const t = e, n = Ze(), l = Ze(), r = Ze(), {
|
|
3956
4068
|
floatingStyles: a,
|
|
3957
4069
|
middlewareData: o,
|
|
3958
4070
|
placement: i
|
|
3959
|
-
} =
|
|
4071
|
+
} = Ca(n, l, {
|
|
3960
4072
|
middleware: [
|
|
3961
|
-
t.placement ? null :
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
4073
|
+
t.placement ? null : xa(),
|
|
4074
|
+
$a(10),
|
|
4075
|
+
Sa({ crossAxis: !0, padding: 5 }),
|
|
4076
|
+
La({ element: r }),
|
|
4077
|
+
Ea({
|
|
3966
4078
|
apply({ availableWidth: c, availableHeight: f, elements: d }) {
|
|
3967
4079
|
Object.assign(d.floating.style, {
|
|
3968
4080
|
maxWidth: t.maxWidth ? `${Math.min(c, t.maxWidth) / 16}rem` : "",
|
|
@@ -3971,7 +4083,7 @@ const Ta = ["innerHTML"], Ha = {
|
|
|
3971
4083
|
}
|
|
3972
4084
|
})
|
|
3973
4085
|
],
|
|
3974
|
-
whileElementsMounted:
|
|
4086
|
+
whileElementsMounted: wa,
|
|
3975
4087
|
placement: t.placement
|
|
3976
4088
|
}), s = (c) => ({
|
|
3977
4089
|
top: 0,
|
|
@@ -3997,49 +4109,50 @@ const Ta = ["innerHTML"], Ha = {
|
|
|
3997
4109
|
}
|
|
3998
4110
|
};
|
|
3999
4111
|
};
|
|
4000
|
-
return (c, f) => (
|
|
4112
|
+
return (c, f) => (g(), S("div", {
|
|
4001
4113
|
ref_key: "wrapperRef",
|
|
4002
4114
|
ref: n,
|
|
4003
4115
|
class: "rvc-group/tooltip"
|
|
4004
4116
|
}, [
|
|
4005
4117
|
k(c.$slots, "default"),
|
|
4006
|
-
|
|
4118
|
+
x("div", {
|
|
4007
4119
|
ref_key: "tooltipRef",
|
|
4008
4120
|
ref: l,
|
|
4009
4121
|
class: N(["group-hover/tooltip:rvc-opacity-100 group-hover/tooltip:rvc-visible rvc-invisible rvc-opacity-0 rvc-tooltip", e.tooltipClass, { "rvc-tooltip-blur": e.blur }]),
|
|
4010
|
-
style: $
|
|
4122
|
+
style: El($(a))
|
|
4011
4123
|
}, [
|
|
4012
4124
|
k(c.$slots, "content", { content: e.content }, () => [
|
|
4013
|
-
e.content ? (
|
|
4125
|
+
e.content ? (g(), S("div", {
|
|
4014
4126
|
key: 0,
|
|
4015
4127
|
innerHTML: e.content
|
|
4016
|
-
}, null, 8,
|
|
4128
|
+
}, null, 8, Pa)) : B("", !0)
|
|
4017
4129
|
]),
|
|
4018
|
-
|
|
4130
|
+
x("div", Y({
|
|
4019
4131
|
ref_key: "arrowRef",
|
|
4020
4132
|
ref: r,
|
|
4021
4133
|
class: "rvc-absolute rvc-tooltip-arrow"
|
|
4022
|
-
}, u(
|
|
4134
|
+
}, u($(o))), null, 16)
|
|
4023
4135
|
], 6)
|
|
4024
4136
|
], 512));
|
|
4025
4137
|
}
|
|
4026
4138
|
};
|
|
4027
4139
|
export {
|
|
4028
|
-
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
4140
|
+
Da as Accordion,
|
|
4141
|
+
Ra as Alert,
|
|
4142
|
+
Fa as Badge,
|
|
4143
|
+
Xe as ButtonBase,
|
|
4144
|
+
Ma as Checkbox,
|
|
4145
|
+
Ba as DataTable,
|
|
4146
|
+
Na as Drawer,
|
|
4147
|
+
ja as Dropdown,
|
|
4148
|
+
Va as EmptyState,
|
|
4149
|
+
Ha as FormInput,
|
|
4150
|
+
Ln as FormSelect,
|
|
4151
|
+
Wa as Lightswitch,
|
|
4152
|
+
Ua as Modal,
|
|
4153
|
+
Xl as Pagination,
|
|
4154
|
+
za as Radio,
|
|
4155
|
+
qa as Tabs,
|
|
4156
|
+
Ka as Toast,
|
|
4157
|
+
Ya as Tooltip
|
|
4045
4158
|
};
|