@deck9/ui 0.14.7 → 0.14.9
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/Input/Input.vue.d.ts +6 -2
- package/dist/src/ui.mjs +604 -590
- package/dist/src/ui.umd.js +4 -4
- package/package.json +10 -10
package/dist/src/ui.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as $, computed as
|
|
1
|
+
import { defineComponent as $, computed as k, openBlock as E, createBlock as K, unref as P, mergeProps as ot, createCommentVNode as M, createElementBlock as T, normalizeClass as A, createElementVNode as I, toDisplayString as B, createVNode as F, ref as O, getCurrentInstance as In, onMounted as ee, watch as Z, Fragment as be, withDirectives as $n, vModelText as An, normalizeStyle as Nt, cloneVNode as Mn, h as Ce, inject as he, provide as ye, watchEffect as xe, nextTick as j, onUnmounted as Ne, toRaw as X, shallowRef as Vn, getCurrentScope as Fn, onScopeDispose as Nn, shallowReadonly as me, withCtx as W, renderSlot as ht, Teleport as Bn, Transition as Bt, normalizeProps as jn, guardReactiveProps as zn, resolveDynamicComponent as Un, isRef as Hn, renderList as jt, createTextVNode as Wn } from "vue";
|
|
2
2
|
import { FontAwesomeIcon as Kn } from "@fortawesome/vue-fontawesome";
|
|
3
3
|
import { library as lt } from "@fortawesome/fontawesome-svg-core";
|
|
4
4
|
import * as h from "@fortawesome/free-solid-svg-icons";
|
|
@@ -49,6 +49,9 @@ lt.add(
|
|
|
49
49
|
h.faExternalLink,
|
|
50
50
|
h.faEyeDropper,
|
|
51
51
|
h.faFileLines,
|
|
52
|
+
h.faFilePdf,
|
|
53
|
+
h.faFileWaveform,
|
|
54
|
+
h.faFileVideo,
|
|
52
55
|
h.faFileUpload,
|
|
53
56
|
h.faFilter,
|
|
54
57
|
h.faFingerprint,
|
|
@@ -105,11 +108,11 @@ const qn = [...Object.keys(lt.definitions.fas)].sort(), xt = [...Object.keys(lt.
|
|
|
105
108
|
name: { default: "user" }
|
|
106
109
|
},
|
|
107
110
|
setup(e) {
|
|
108
|
-
const t = e, l =
|
|
111
|
+
const t = e, l = k(() => xt.includes(t.name) ? "fab" : "fas"), o = k(() => qn.includes(t.name) || xt.includes(t.name) ? !0 : (console.warn(
|
|
109
112
|
"could not load icon, because it is not available",
|
|
110
113
|
t.name
|
|
111
114
|
), !1));
|
|
112
|
-
return (n, r) => o.value ? (
|
|
115
|
+
return (n, r) => o.value ? (E(), K(P(Kn), ot({
|
|
113
116
|
key: 0,
|
|
114
117
|
icon: [l.value, n.name]
|
|
115
118
|
}, n.$attrs), null, 16, ["icon"])) : M("", !0);
|
|
@@ -117,7 +120,7 @@ const qn = [...Object.keys(lt.definitions.fas)].sort(), xt = [...Object.keys(lt.
|
|
|
117
120
|
}), Xn = ["aria-label", "tabindex"], Yn = {
|
|
118
121
|
key: 0,
|
|
119
122
|
class: "absolute inset-0 flex items-center justify-center"
|
|
120
|
-
},
|
|
123
|
+
}, Er = /* @__PURE__ */ $({
|
|
121
124
|
__name: "Button",
|
|
122
125
|
props: {
|
|
123
126
|
label: {},
|
|
@@ -130,7 +133,7 @@ const qn = [...Object.keys(lt.definitions.fas)].sort(), xt = [...Object.keys(lt.
|
|
|
130
133
|
},
|
|
131
134
|
emits: ["onClick"],
|
|
132
135
|
setup(e, { emit: t }) {
|
|
133
|
-
const l = t, o = e, n =
|
|
136
|
+
const l = t, o = e, n = k(() => {
|
|
134
137
|
const u = {
|
|
135
138
|
"text-white bg-blue-600 border-transparent hover:bg-blue-700 active:bg-blue-700 dark:ring-blue-800 ring-offset-2 dark:ring-offset-grey-900": o.color === "primary",
|
|
136
139
|
"text-blue-600 bg-grey-100 border-transparent hover:bg-blue-100 hover:text-blue-700 active:bg-grey-100 ring-blue-300 ring-offset-2 dark:ring-offset-grey-900": o.color === "light",
|
|
@@ -138,7 +141,7 @@ const qn = [...Object.keys(lt.definitions.fas)].sort(), xt = [...Object.keys(lt.
|
|
|
138
141
|
"text-red-50 bg-red-500 border-transparent hover:bg-red-600 active:bg-red-600 ring-red-400 dark:ring-red-400 dark:ring-opacity-50 ring-offset-2 dark:ring-offset-red-900": o.color === "danger"
|
|
139
142
|
}, c = {
|
|
140
143
|
"pointer-events-none opacity-75 cursor-not-allowed": o.isDisabled
|
|
141
|
-
},
|
|
144
|
+
}, a = {
|
|
142
145
|
"px-4 py-1 text-xs leading-5 mono-100 rounded-lg": o.size === "small",
|
|
143
146
|
"px-5 py-2 text-sm leading-4 font-medium rounded-lg": o.size === "medium",
|
|
144
147
|
"px-8 py-3 text-base leading-6 font-medium rounded-lg": o.size === "large"
|
|
@@ -146,16 +149,16 @@ const qn = [...Object.keys(lt.definitions.fas)].sort(), xt = [...Object.keys(lt.
|
|
|
146
149
|
return {
|
|
147
150
|
...u,
|
|
148
151
|
...c,
|
|
149
|
-
...
|
|
152
|
+
...a
|
|
150
153
|
};
|
|
151
|
-
}), r =
|
|
154
|
+
}), r = k(() => {
|
|
152
155
|
const u = {
|
|
153
156
|
"mr-2 -ml-1": ["small", "medium"].includes(o.size) && o.iconPosition === "left",
|
|
154
157
|
"mr-4 -ml-2": ["large"].includes(o.size) && o.iconPosition === "left"
|
|
155
158
|
}, c = {
|
|
156
159
|
"ml-3 -mr-1": ["small", "medium"].includes(o.size) && o.iconPosition === "right",
|
|
157
160
|
"ml-3 -mr-3": ["large"].includes(o.size) && o.iconPosition === "right"
|
|
158
|
-
},
|
|
161
|
+
}, a = {
|
|
159
162
|
"text-white": o.color === "primary",
|
|
160
163
|
"text-blue-600": o.color === "light",
|
|
161
164
|
"text-grey-50": o.color === "dark"
|
|
@@ -163,13 +166,13 @@ const qn = [...Object.keys(lt.definitions.fas)].sort(), xt = [...Object.keys(lt.
|
|
|
163
166
|
return {
|
|
164
167
|
...u,
|
|
165
168
|
...c,
|
|
166
|
-
...
|
|
169
|
+
...a
|
|
167
170
|
};
|
|
168
171
|
});
|
|
169
172
|
function i() {
|
|
170
173
|
o.isDisabled || l("onClick");
|
|
171
174
|
}
|
|
172
|
-
return (u, c) => (
|
|
175
|
+
return (u, c) => (E(), T("button", {
|
|
173
176
|
class: A(["relative inline-flex items-center focus:outline-none focus:ring active:ring transition duration-150 ease-in-out", n.value]),
|
|
174
177
|
type: "button",
|
|
175
178
|
"aria-label": u.label,
|
|
@@ -179,20 +182,20 @@ const qn = [...Object.keys(lt.definitions.fas)].sort(), xt = [...Object.keys(lt.
|
|
|
179
182
|
I("div", {
|
|
180
183
|
class: A(!u.isLoading || "invisible")
|
|
181
184
|
}, [
|
|
182
|
-
u.icon && u.iconPosition === "left" ? (
|
|
185
|
+
u.icon && u.iconPosition === "left" ? (E(), K(U, {
|
|
183
186
|
key: 0,
|
|
184
187
|
name: u.icon,
|
|
185
188
|
class: A(r.value)
|
|
186
189
|
}, null, 8, ["name", "class"])) : M("", !0),
|
|
187
190
|
I("span", null, B(u.label), 1),
|
|
188
|
-
u.icon && u.iconPosition === "right" ? (
|
|
191
|
+
u.icon && u.iconPosition === "right" ? (E(), K(U, {
|
|
189
192
|
key: 1,
|
|
190
193
|
name: u.icon,
|
|
191
194
|
class: A(r.value)
|
|
192
195
|
}, null, 8, ["name", "class"])) : M("", !0)
|
|
193
196
|
], 2),
|
|
194
|
-
u.isLoading ? (
|
|
195
|
-
|
|
197
|
+
u.isLoading ? (E(), T("span", Yn, [
|
|
198
|
+
F(U, {
|
|
196
199
|
class: "animate-spin",
|
|
197
200
|
name: "circle-notch"
|
|
198
201
|
})
|
|
@@ -232,7 +235,7 @@ function qt(e, t, l) {
|
|
|
232
235
|
const to = { class: "relative flex items-start" }, no = { class: "flex items-center h-5" }, oo = ["checked", "id"], lo = { class: "ml-2 text-sm leading-5" }, ro = ["for"], io = {
|
|
233
236
|
key: 0,
|
|
234
237
|
class: "block text-xs text-grey-400 font-normal mono-0 casual-60"
|
|
235
|
-
},
|
|
238
|
+
}, Rr = /* @__PURE__ */ $({
|
|
236
239
|
__name: "Checkbox",
|
|
237
240
|
props: {
|
|
238
241
|
id: { default: qt() },
|
|
@@ -245,7 +248,7 @@ const to = { class: "relative flex items-start" }, no = { class: "flex items-cen
|
|
|
245
248
|
const l = t, o = (n) => {
|
|
246
249
|
l("update:modelValue", n.target.checked);
|
|
247
250
|
};
|
|
248
|
-
return (n, r) => (
|
|
251
|
+
return (n, r) => (E(), T("div", to, [
|
|
249
252
|
I("div", no, [
|
|
250
253
|
I("input", {
|
|
251
254
|
class: "h-4 w-4 border-grey-600 dark:text-blue-500 dark:border-grey-300 dark:checked:border-blue-500 dark:focus:ring-blue-900 dark:focus:ring-offset-grey-800 rounded-sm",
|
|
@@ -260,7 +263,7 @@ const to = { class: "relative flex items-start" }, no = { class: "flex items-cen
|
|
|
260
263
|
for: n.id,
|
|
261
264
|
class: "font-medium text-grey-700 dark:text-grey-200 casual-25"
|
|
262
265
|
}, B(n.label), 9, ro),
|
|
263
|
-
n.description ? (
|
|
266
|
+
n.description ? (E(), T("p", io, B(n.description), 1)) : M("", !0)
|
|
264
267
|
])
|
|
265
268
|
]));
|
|
266
269
|
}
|
|
@@ -273,7 +276,7 @@ function ao() {
|
|
|
273
276
|
}
|
|
274
277
|
function so(e) {
|
|
275
278
|
const t = ao();
|
|
276
|
-
return
|
|
279
|
+
return k(() => (t.value, !!e()));
|
|
277
280
|
}
|
|
278
281
|
function uo(e = {}) {
|
|
279
282
|
const { initialValue: t = "" } = e, l = so(() => typeof window < "u" && "EyeDropper" in window), o = O(t);
|
|
@@ -389,15 +392,15 @@ class Co {
|
|
|
389
392
|
this._setter(t);
|
|
390
393
|
}
|
|
391
394
|
}
|
|
392
|
-
function
|
|
395
|
+
function Eo(e, t, l = !1) {
|
|
393
396
|
let o, n;
|
|
394
397
|
const r = po(e);
|
|
395
398
|
return r ? (o = e, n = co) : (o = e.get, n = e.set), new Co(o, n, r || !n, l);
|
|
396
399
|
}
|
|
397
|
-
let Xe,
|
|
398
|
-
(Xe = St()[
|
|
399
|
-
let
|
|
400
|
-
const Ye = (e, t) =>
|
|
400
|
+
let Xe, Et = "__VUE_INSTANCE_SETTERS__";
|
|
401
|
+
(Xe = St()[Et]) || (Xe = St()[Et] = []), Xe.push((e) => e);
|
|
402
|
+
let Ro = !1;
|
|
403
|
+
const Ye = (e, t) => Eo(e, t, Ro);
|
|
401
404
|
function rt(e) {
|
|
402
405
|
const t = Ye(() => ({
|
|
403
406
|
"pl-3 pr-10 py-2": !e.icon && e.type !== "color" && e.size === "small",
|
|
@@ -430,81 +433,92 @@ const Do = ["placeholder", "type", "tabindex", "value"], Po = { class: "absolute
|
|
|
430
433
|
placeholder: {},
|
|
431
434
|
size: { default: "medium" },
|
|
432
435
|
icon: {},
|
|
436
|
+
min: {},
|
|
437
|
+
max: {},
|
|
433
438
|
isDisabled: { type: Boolean, default: !1 },
|
|
434
439
|
block: { type: Boolean },
|
|
435
440
|
showColorPicker: { type: Boolean }
|
|
436
441
|
},
|
|
437
442
|
emits: ["update:modelValue"],
|
|
438
443
|
setup(e, { expose: t, emit: l }) {
|
|
439
|
-
const o = e, n = O(o.modelValue ?? "");
|
|
444
|
+
const o = e, n = O(null), r = O(o.modelValue ?? "");
|
|
440
445
|
Z(
|
|
441
446
|
() => o.modelValue,
|
|
442
|
-
(
|
|
443
|
-
typeof
|
|
447
|
+
(y) => {
|
|
448
|
+
typeof y < "u" && y !== r.value && (r.value = y);
|
|
444
449
|
}
|
|
445
450
|
);
|
|
446
|
-
const
|
|
447
|
-
isSupported:
|
|
448
|
-
open:
|
|
449
|
-
sRGBHex:
|
|
450
|
-
} = uo(),
|
|
451
|
-
|
|
451
|
+
const i = l, { inputClasses: u, disabledClasses: c, textSizeClasses: a } = rt(o), s = k(() => o.type === "color" ? "text" : o.type), {
|
|
452
|
+
isSupported: d,
|
|
453
|
+
open: m,
|
|
454
|
+
sRGBHex: f
|
|
455
|
+
} = uo(), v = () => {
|
|
456
|
+
m();
|
|
452
457
|
};
|
|
453
|
-
Z(
|
|
454
|
-
|
|
458
|
+
Z(f, (y) => {
|
|
459
|
+
r.value = y, i("update:modelValue", y);
|
|
455
460
|
});
|
|
456
|
-
const
|
|
457
|
-
|
|
458
|
-
|
|
461
|
+
const p = function(y) {
|
|
462
|
+
const x = (y == null ? void 0 : y.target).value;
|
|
463
|
+
if (o.type === "number" && o.min && parseInt(x) < o.min) {
|
|
464
|
+
r.value = o.min, n.value.value = r.value.toString(), i("update:modelValue", o.min);
|
|
465
|
+
return;
|
|
466
|
+
}
|
|
467
|
+
if (o.type === "number" && o.max && parseInt(x) > o.max) {
|
|
468
|
+
r.value = o.max, n.value.value = r.value.toString(), i("update:modelValue", o.max);
|
|
469
|
+
return;
|
|
470
|
+
}
|
|
471
|
+
r.value = (y == null ? void 0 : y.target).value, i("update:modelValue", r.value);
|
|
472
|
+
}, b = O(null);
|
|
459
473
|
return t({
|
|
460
474
|
focus: () => {
|
|
461
|
-
o.isDisabled ||
|
|
475
|
+
o.isDisabled || b.value.focus();
|
|
462
476
|
}
|
|
463
|
-
}), (
|
|
464
|
-
class: A(["relative", [
|
|
477
|
+
}), (y, x) => (E(), T("div", {
|
|
478
|
+
class: A(["relative", [y.block ? "w-full block" : "inline-block"]])
|
|
465
479
|
}, [
|
|
466
480
|
I("input", ot({
|
|
467
|
-
class: ["relative mono-50 bg-white text-grey-800 placeholder:text-grey-400 placeholder:font-normal border-grey-300 dark:bg-grey-800 dark:text-grey-100 dark:placeholder:text-grey-500 dark:border-grey-700 focus:border-blue-400 focus:ring-blue-400 dark:focus:border-blue-800 dark:focus:ring-blue-800 rounded", [P(
|
|
468
|
-
placeholder:
|
|
481
|
+
class: ["relative mono-50 bg-white text-grey-800 placeholder:text-grey-400 placeholder:font-normal border-grey-300 dark:bg-grey-800 dark:text-grey-100 dark:placeholder:text-grey-500 dark:border-grey-700 focus:border-blue-400 focus:ring-blue-400 dark:focus:border-blue-800 dark:focus:ring-blue-800 rounded", [P(u), P(a), P(c)]],
|
|
482
|
+
placeholder: y.placeholder,
|
|
469
483
|
type: s.value,
|
|
470
|
-
tabindex:
|
|
471
|
-
value:
|
|
472
|
-
},
|
|
473
|
-
ref_key: "
|
|
474
|
-
ref:
|
|
475
|
-
onInput:
|
|
484
|
+
tabindex: y.isDisabled ? "-1" : void 0,
|
|
485
|
+
value: r.value
|
|
486
|
+
}, y.$attrs, {
|
|
487
|
+
ref_key: "inputElement",
|
|
488
|
+
ref: n,
|
|
489
|
+
onInput: p
|
|
476
490
|
}), null, 16, Do),
|
|
477
|
-
|
|
491
|
+
y.type === "color" ? (E(), T(be, { key: 0 }, [
|
|
478
492
|
I("label", Po, [
|
|
479
493
|
$n(I("input", {
|
|
480
494
|
class: "invisible",
|
|
481
495
|
type: "color",
|
|
482
|
-
"onUpdate:modelValue":
|
|
483
|
-
onInput:
|
|
496
|
+
"onUpdate:modelValue": x[0] || (x[0] = (w) => r.value = w),
|
|
497
|
+
onInput: p
|
|
484
498
|
}, null, 544), [
|
|
485
|
-
[An,
|
|
499
|
+
[An, r.value]
|
|
486
500
|
]),
|
|
487
501
|
I("span", {
|
|
488
502
|
class: "border-1 absolute inset-0 block rounded border border-grey-600/25 bg-clip-border shadow",
|
|
489
|
-
style:
|
|
503
|
+
style: Nt(`background-color: ${r.value}`)
|
|
490
504
|
}, null, 4)
|
|
491
505
|
]),
|
|
492
|
-
P(
|
|
506
|
+
P(d) && y.showColorPicker ? (E(), T("button", {
|
|
493
507
|
key: 0,
|
|
494
508
|
type: "button",
|
|
495
509
|
class: "absolute inset-y-2 right-2 h-7 w-7 rounded-full hover:bg-grey-200",
|
|
496
|
-
onClick:
|
|
510
|
+
onClick: v
|
|
497
511
|
}, [
|
|
498
|
-
|
|
512
|
+
F(U, {
|
|
499
513
|
size: "xs",
|
|
500
514
|
name: "eyedropper"
|
|
501
515
|
})
|
|
502
516
|
])) : M("", !0)
|
|
503
|
-
], 64)) :
|
|
517
|
+
], 64)) : y.icon ? (E(), T("span", {
|
|
504
518
|
key: 1,
|
|
505
|
-
class: A(["absolute left-0 inset-y-0 inline-flex items-center justify-center text-grey-700 dark:text-grey-100 px-4", P(
|
|
519
|
+
class: A(["absolute left-0 inset-y-0 inline-flex items-center justify-center text-grey-700 dark:text-grey-100 px-4", P(a)])
|
|
506
520
|
}, [
|
|
507
|
-
|
|
521
|
+
F(U, { name: y.icon }, null, 8, ["name"])
|
|
508
522
|
], 2)) : M("", !0)
|
|
509
523
|
], 2));
|
|
510
524
|
}
|
|
@@ -519,9 +533,9 @@ const Do = ["placeholder", "type", "tabindex", "value"], Po = { class: "absolute
|
|
|
519
533
|
description: {}
|
|
520
534
|
},
|
|
521
535
|
setup(e) {
|
|
522
|
-
return (t, l) => (
|
|
536
|
+
return (t, l) => (E(), T("span", To, [
|
|
523
537
|
I("label", { for: t.id }, B(t.label), 9, Lo),
|
|
524
|
-
t.description ? (
|
|
538
|
+
t.description ? (E(), T("span", Io, B(t.description), 1)) : M("", !0)
|
|
525
539
|
]));
|
|
526
540
|
}
|
|
527
541
|
});
|
|
@@ -533,7 +547,7 @@ function G(e, t, ...l) {
|
|
|
533
547
|
let o = new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map((n) => `"${n}"`).join(", ")}.`);
|
|
534
548
|
throw Error.captureStackTrace && Error.captureStackTrace(o, G), o;
|
|
535
549
|
}
|
|
536
|
-
var
|
|
550
|
+
var Ee = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(Ee || {}), $o = ((e) => (e[e.Unmount = 0] = "Unmount", e[e.Hidden = 1] = "Hidden", e))($o || {});
|
|
537
551
|
function z({ visible: e = !0, features: t = 0, ourProps: l, theirProps: o, ...n }) {
|
|
538
552
|
var r;
|
|
539
553
|
let i = Qt(o, l), u = Object.assign(n, { props: i });
|
|
@@ -551,29 +565,29 @@ function z({ visible: e = !0, features: t = 0, ourProps: l, theirProps: o, ...n
|
|
|
551
565
|
}
|
|
552
566
|
function Ze({ props: e, attrs: t, slots: l, slot: o, name: n }) {
|
|
553
567
|
var r, i;
|
|
554
|
-
let { as: u, ...c } = it(e, ["unmount", "static"]),
|
|
568
|
+
let { as: u, ...c } = it(e, ["unmount", "static"]), a = (r = l.default) == null ? void 0 : r.call(l, o), s = {};
|
|
555
569
|
if (o) {
|
|
556
|
-
let d = !1,
|
|
557
|
-
for (let [f,
|
|
558
|
-
typeof
|
|
559
|
-
d && (
|
|
570
|
+
let d = !1, m = [];
|
|
571
|
+
for (let [f, v] of Object.entries(o))
|
|
572
|
+
typeof v == "boolean" && (d = !0), v === !0 && m.push(f);
|
|
573
|
+
d && (s["data-headlessui-state"] = m.join(" "));
|
|
560
574
|
}
|
|
561
575
|
if (u === "template") {
|
|
562
|
-
if (
|
|
563
|
-
let [d, ...
|
|
564
|
-
if (!Ao(d) ||
|
|
565
|
-
throw new Error(['Passing props on "template"!', "", `The current component <${n} /> is rendering a "template".`, "However we need to passthrough the following props:", Object.keys(c).concat(Object.keys(t)).map((
|
|
566
|
-
`), "", "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((
|
|
576
|
+
if (a = Zt(a ?? []), Object.keys(c).length > 0 || Object.keys(t).length > 0) {
|
|
577
|
+
let [d, ...m] = a ?? [];
|
|
578
|
+
if (!Ao(d) || m.length > 0)
|
|
579
|
+
throw new Error(['Passing props on "template"!', "", `The current component <${n} /> is rendering a "template".`, "However we need to passthrough the following props:", Object.keys(c).concat(Object.keys(t)).map((p) => p.trim()).filter((p, b, g) => g.indexOf(p) === b).sort((p, b) => p.localeCompare(b)).map((p) => ` - ${p}`).join(`
|
|
580
|
+
`), "", "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((p) => ` - ${p}`).join(`
|
|
567
581
|
`)].join(`
|
|
568
582
|
`));
|
|
569
|
-
let f = Qt((i = d.props) != null ? i : {}, c),
|
|
570
|
-
for (let
|
|
571
|
-
|
|
572
|
-
return
|
|
583
|
+
let f = Qt((i = d.props) != null ? i : {}, c), v = Mn(d, f);
|
|
584
|
+
for (let p in f)
|
|
585
|
+
p.startsWith("on") && (v.props || (v.props = {}), v.props[p] = f[p]);
|
|
586
|
+
return v;
|
|
573
587
|
}
|
|
574
|
-
return Array.isArray(
|
|
588
|
+
return Array.isArray(a) && a.length === 1 ? a[0] : a;
|
|
575
589
|
}
|
|
576
|
-
return Ce(u, Object.assign({}, c,
|
|
590
|
+
return Ce(u, Object.assign({}, c, s), { default: () => a });
|
|
577
591
|
}
|
|
578
592
|
function Zt(e) {
|
|
579
593
|
return e.flatMap((t) => t.type === be ? Zt(t.children) : [t]);
|
|
@@ -623,7 +637,7 @@ function J() {
|
|
|
623
637
|
return Vo();
|
|
624
638
|
}
|
|
625
639
|
var D = ((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))(D || {});
|
|
626
|
-
function
|
|
640
|
+
function Fo(e) {
|
|
627
641
|
throw new Error("Unexpected object: " + e);
|
|
628
642
|
}
|
|
629
643
|
var L = ((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))(L || {});
|
|
@@ -636,7 +650,7 @@ function en(e, t) {
|
|
|
636
650
|
case 0:
|
|
637
651
|
return l.findIndex((i) => !t.resolveDisabled(i));
|
|
638
652
|
case 1: {
|
|
639
|
-
let i = l.slice().reverse().findIndex((u, c,
|
|
653
|
+
let i = l.slice().reverse().findIndex((u, c, a) => n !== -1 && a.length - c - 1 >= n ? !1 : !t.resolveDisabled(u));
|
|
640
654
|
return i === -1 ? i : l.length - 1 - i;
|
|
641
655
|
}
|
|
642
656
|
case 2:
|
|
@@ -650,12 +664,12 @@ function en(e, t) {
|
|
|
650
664
|
case 5:
|
|
651
665
|
return null;
|
|
652
666
|
default:
|
|
653
|
-
|
|
667
|
+
Fo(e);
|
|
654
668
|
}
|
|
655
669
|
})();
|
|
656
670
|
return r === -1 ? o : r;
|
|
657
671
|
}
|
|
658
|
-
function
|
|
672
|
+
function R(e) {
|
|
659
673
|
var t;
|
|
660
674
|
return e == null || e.value == null ? null : (t = e.value.$el) != null ? t : e.value;
|
|
661
675
|
}
|
|
@@ -667,7 +681,7 @@ function nn() {
|
|
|
667
681
|
function on(e) {
|
|
668
682
|
ye(tn, e);
|
|
669
683
|
}
|
|
670
|
-
function
|
|
684
|
+
function Rt(e, t) {
|
|
671
685
|
if (e)
|
|
672
686
|
return e;
|
|
673
687
|
let l = t ?? "button";
|
|
@@ -675,15 +689,15 @@ function Et(e, t) {
|
|
|
675
689
|
return "button";
|
|
676
690
|
}
|
|
677
691
|
function at(e, t) {
|
|
678
|
-
let l = O(
|
|
692
|
+
let l = O(Rt(e.value.type, e.value.as));
|
|
679
693
|
return ee(() => {
|
|
680
|
-
l.value =
|
|
694
|
+
l.value = Rt(e.value.type, e.value.as);
|
|
681
695
|
}), xe(() => {
|
|
682
696
|
var o;
|
|
683
|
-
l.value ||
|
|
697
|
+
l.value || R(t) && R(t) instanceof HTMLButtonElement && !((o = R(t)) != null && o.hasAttribute("type")) && (l.value = "button");
|
|
684
698
|
}), l;
|
|
685
699
|
}
|
|
686
|
-
var
|
|
700
|
+
var No = Object.defineProperty, Bo = (e, t, l) => t in e ? No(e, t, { enumerable: !0, configurable: !0, writable: !0, value: l }) : e[t] = l, Dt = (e, t, l) => (Bo(e, typeof t != "symbol" ? t + "" : t, l), l);
|
|
687
701
|
class jo {
|
|
688
702
|
constructor() {
|
|
689
703
|
Dt(this, "current", this.detect()), Dt(this, "currentId", 0);
|
|
@@ -714,7 +728,7 @@ function ut(e) {
|
|
|
714
728
|
if (e instanceof Node)
|
|
715
729
|
return e.ownerDocument;
|
|
716
730
|
if (e != null && e.hasOwnProperty("value")) {
|
|
717
|
-
let t =
|
|
731
|
+
let t = R(e);
|
|
718
732
|
if (t)
|
|
719
733
|
return t.ownerDocument;
|
|
720
734
|
}
|
|
@@ -788,14 +802,14 @@ function Xo(e, t) {
|
|
|
788
802
|
function Yo(e, t, { sorted: l = !0, relativeTo: o = null, skipElements: n = [] } = {}) {
|
|
789
803
|
var r;
|
|
790
804
|
let i = (r = Array.isArray(e) ? e.length > 0 ? e[0].ownerDocument : document : e == null ? void 0 : e.ownerDocument) != null ? r : document, u = Array.isArray(e) ? l ? ct(e) : e : ln(e);
|
|
791
|
-
n.length > 0 && u.length > 1 && (u = u.filter((
|
|
805
|
+
n.length > 0 && u.length > 1 && (u = u.filter((v) => !n.includes(v))), o = o ?? i.activeElement;
|
|
792
806
|
let c = (() => {
|
|
793
807
|
if (t & 5)
|
|
794
808
|
return 1;
|
|
795
809
|
if (t & 10)
|
|
796
810
|
return -1;
|
|
797
811
|
throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last");
|
|
798
|
-
})(),
|
|
812
|
+
})(), a = (() => {
|
|
799
813
|
if (t & 1)
|
|
800
814
|
return 0;
|
|
801
815
|
if (t & 2)
|
|
@@ -805,20 +819,20 @@ function Yo(e, t, { sorted: l = !0, relativeTo: o = null, skipElements: n = [] }
|
|
|
805
819
|
if (t & 8)
|
|
806
820
|
return u.length - 1;
|
|
807
821
|
throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last");
|
|
808
|
-
})(),
|
|
822
|
+
})(), s = t & 32 ? { preventScroll: !0 } : {}, d = 0, m = u.length, f;
|
|
809
823
|
do {
|
|
810
|
-
if (d >=
|
|
824
|
+
if (d >= m || d + m <= 0)
|
|
811
825
|
return 0;
|
|
812
|
-
let
|
|
826
|
+
let v = a + d;
|
|
813
827
|
if (t & 16)
|
|
814
|
-
|
|
828
|
+
v = (v + m) % m;
|
|
815
829
|
else {
|
|
816
|
-
if (
|
|
830
|
+
if (v < 0)
|
|
817
831
|
return 3;
|
|
818
|
-
if (
|
|
832
|
+
if (v >= m)
|
|
819
833
|
return 1;
|
|
820
834
|
}
|
|
821
|
-
f = u[
|
|
835
|
+
f = u[v], f == null || f.focus(s), d += c;
|
|
822
836
|
} while (f !== i.activeElement);
|
|
823
837
|
return t & 6 && qo(f) && f.select(), 2;
|
|
824
838
|
}
|
|
@@ -832,21 +846,21 @@ function Zo(e, t, l) {
|
|
|
832
846
|
window.addEventListener(e, t, l), o(() => window.removeEventListener(e, t, l));
|
|
833
847
|
});
|
|
834
848
|
}
|
|
835
|
-
function an(e, t, l =
|
|
849
|
+
function an(e, t, l = k(() => !0)) {
|
|
836
850
|
function o(r, i) {
|
|
837
851
|
if (!l.value || r.defaultPrevented)
|
|
838
852
|
return;
|
|
839
853
|
let u = i(r);
|
|
840
854
|
if (u === null || !u.getRootNode().contains(u))
|
|
841
855
|
return;
|
|
842
|
-
let c = function s
|
|
843
|
-
return typeof
|
|
856
|
+
let c = function a(s) {
|
|
857
|
+
return typeof s == "function" ? a(s()) : Array.isArray(s) || s instanceof Set ? s : [s];
|
|
844
858
|
}(e);
|
|
845
|
-
for (let
|
|
846
|
-
if (
|
|
859
|
+
for (let a of c) {
|
|
860
|
+
if (a === null)
|
|
847
861
|
continue;
|
|
848
|
-
let
|
|
849
|
-
if (
|
|
862
|
+
let s = a instanceof HTMLElement ? a : R(a);
|
|
863
|
+
if (s != null && s.contains(u) || r.composed && r.composedPath().includes(s))
|
|
850
864
|
return;
|
|
851
865
|
}
|
|
852
866
|
return !ze(u, je.Loose) && u.tabIndex !== -1 && r.preventDefault(), t(r, u);
|
|
@@ -897,8 +911,8 @@ function Qo(e) {
|
|
|
897
911
|
}
|
|
898
912
|
}
|
|
899
913
|
function fn(e, t, l) {
|
|
900
|
-
let o = O(l == null ? void 0 : l.value), n =
|
|
901
|
-
return [
|
|
914
|
+
let o = O(l == null ? void 0 : l.value), n = k(() => e.value !== void 0);
|
|
915
|
+
return [k(() => n.value ? e.value : o.value), function(r) {
|
|
902
916
|
return n.value || (o.value = r), t == null ? void 0 : t(r);
|
|
903
917
|
}];
|
|
904
918
|
}
|
|
@@ -929,13 +943,13 @@ function el({ slot: e = O({}), name: t = "Description", props: l = {} } = {}) {
|
|
|
929
943
|
i !== -1 && o.value.splice(i, 1);
|
|
930
944
|
};
|
|
931
945
|
}
|
|
932
|
-
return ye(mn, { register: n, slot: e, name: t, props: l }),
|
|
946
|
+
return ye(mn, { register: n, slot: e, name: t, props: l }), k(() => o.value.length > 0 ? o.value.join(" ") : void 0);
|
|
933
947
|
}
|
|
934
948
|
$({ name: "Description", props: { as: { type: [Object, String], default: "p" }, id: { type: String, default: () => `headlessui-description-${J()}` } }, setup(e, { attrs: t, slots: l }) {
|
|
935
949
|
let o = Jo();
|
|
936
|
-
return ee(() =>
|
|
937
|
-
let { name: n = "Description", slot: r = O({}), props: i = {} } = o, { id: u, ...c } = e,
|
|
938
|
-
return z({ ourProps:
|
|
950
|
+
return ee(() => Ne(o.register(e.id))), () => {
|
|
951
|
+
let { name: n = "Description", slot: r = O({}), props: i = {} } = o, { id: u, ...c } = e, a = { ...Object.entries(i).reduce((s, [d, m]) => Object.assign(s, { [d]: P(m) }), {}), id: u };
|
|
952
|
+
return z({ ourProps: a, theirProps: c, slot: r.value, attrs: t, slots: l, name: n });
|
|
939
953
|
};
|
|
940
954
|
} });
|
|
941
955
|
let _t = /([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;
|
|
@@ -972,7 +986,7 @@ function tl(e) {
|
|
|
972
986
|
function vn(e) {
|
|
973
987
|
let t = O(""), l = O("");
|
|
974
988
|
return () => {
|
|
975
|
-
let o =
|
|
989
|
+
let o = R(e);
|
|
976
990
|
if (!o)
|
|
977
991
|
return "";
|
|
978
992
|
let n = o.innerText;
|
|
@@ -999,82 +1013,82 @@ function De(e) {
|
|
|
999
1013
|
return t;
|
|
1000
1014
|
}
|
|
1001
1015
|
let al = $({ name: "Listbox", emits: { "update:modelValue": (e) => !0 }, props: { as: { type: [Object, String], default: "template" }, disabled: { type: [Boolean], default: !1 }, by: { type: [String, Function], default: () => nl }, horizontal: { type: [Boolean], default: !1 }, modelValue: { type: [Object, String, Number, Boolean], default: void 0 }, defaultValue: { type: [Object, String, Number, Boolean], default: void 0 }, form: { type: String, optional: !0 }, name: { type: String, optional: !0 }, multiple: { type: [Boolean], default: !1 } }, inheritAttrs: !1, setup(e, { slots: t, attrs: l, emit: o }) {
|
|
1002
|
-
let n = O(1), r = O(null), i = O(null), u = O(null), c = O([]),
|
|
1003
|
-
function
|
|
1004
|
-
let
|
|
1005
|
-
return _ === -1 && (_ = null), { options:
|
|
1016
|
+
let n = O(1), r = O(null), i = O(null), u = O(null), c = O([]), a = O(""), s = O(null), d = O(1);
|
|
1017
|
+
function m(x = (w) => w) {
|
|
1018
|
+
let w = s.value !== null ? c.value[s.value] : null, S = ct(x(c.value.slice()), (C) => R(C.dataRef.domRef)), _ = w ? S.indexOf(w) : null;
|
|
1019
|
+
return _ === -1 && (_ = null), { options: S, activeOptionIndex: _ };
|
|
1006
1020
|
}
|
|
1007
|
-
let f =
|
|
1021
|
+
let f = k(() => e.multiple ? 1 : 0), [v, p] = fn(k(() => e.modelValue), (x) => o("update:modelValue", x), k(() => e.defaultValue)), b = k(() => v.value === void 0 ? G(f.value, { 1: [], 0: void 0 }) : v.value), g = { listboxState: n, value: b, mode: f, compare(x, w) {
|
|
1008
1022
|
if (typeof e.by == "string") {
|
|
1009
|
-
let
|
|
1010
|
-
return (
|
|
1023
|
+
let S = e.by;
|
|
1024
|
+
return (x == null ? void 0 : x[S]) === (w == null ? void 0 : w[S]);
|
|
1011
1025
|
}
|
|
1012
|
-
return e.by(
|
|
1013
|
-
}, orientation:
|
|
1014
|
-
e.disabled || n.value !== 1 && (n.value = 1,
|
|
1026
|
+
return e.by(x, w);
|
|
1027
|
+
}, orientation: k(() => e.horizontal ? "horizontal" : "vertical"), labelRef: r, buttonRef: i, optionsRef: u, disabled: k(() => e.disabled), options: c, searchQuery: a, activeOptionIndex: s, activationTrigger: d, closeListbox() {
|
|
1028
|
+
e.disabled || n.value !== 1 && (n.value = 1, s.value = null);
|
|
1015
1029
|
}, openListbox() {
|
|
1016
1030
|
e.disabled || n.value !== 0 && (n.value = 0);
|
|
1017
|
-
}, goToOption(
|
|
1031
|
+
}, goToOption(x, w, S) {
|
|
1018
1032
|
if (e.disabled || n.value === 1)
|
|
1019
1033
|
return;
|
|
1020
|
-
let _ =
|
|
1021
|
-
|
|
1022
|
-
}, search(
|
|
1034
|
+
let _ = m(), C = en(x === L.Specific ? { focus: L.Specific, id: w } : { focus: x }, { resolveItems: () => _.options, resolveActiveIndex: () => _.activeOptionIndex, resolveId: (N) => N.id, resolveDisabled: (N) => N.dataRef.disabled });
|
|
1035
|
+
a.value = "", s.value = C, d.value = S ?? 1, c.value = _.options;
|
|
1036
|
+
}, search(x) {
|
|
1023
1037
|
if (e.disabled || n.value === 1)
|
|
1024
1038
|
return;
|
|
1025
|
-
let
|
|
1026
|
-
|
|
1027
|
-
let
|
|
1028
|
-
_ === -1 || _ ===
|
|
1039
|
+
let w = a.value !== "" ? 0 : 1;
|
|
1040
|
+
a.value += x.toLowerCase();
|
|
1041
|
+
let S = (s.value !== null ? c.value.slice(s.value + w).concat(c.value.slice(0, s.value + w)) : c.value).find((C) => C.dataRef.textValue.startsWith(a.value) && !C.dataRef.disabled), _ = S ? c.value.indexOf(S) : -1;
|
|
1042
|
+
_ === -1 || _ === s.value || (s.value = _, d.value = 1);
|
|
1029
1043
|
}, clearSearch() {
|
|
1030
|
-
e.disabled || n.value !== 1 &&
|
|
1031
|
-
}, registerOption(
|
|
1032
|
-
let
|
|
1033
|
-
c.value =
|
|
1034
|
-
}, unregisterOption(
|
|
1035
|
-
let
|
|
1036
|
-
let _ =
|
|
1037
|
-
return _ !== -1 &&
|
|
1044
|
+
e.disabled || n.value !== 1 && a.value !== "" && (a.value = "");
|
|
1045
|
+
}, registerOption(x, w) {
|
|
1046
|
+
let S = m((_) => [..._, { id: x, dataRef: w }]);
|
|
1047
|
+
c.value = S.options, s.value = S.activeOptionIndex;
|
|
1048
|
+
}, unregisterOption(x) {
|
|
1049
|
+
let w = m((S) => {
|
|
1050
|
+
let _ = S.findIndex((C) => C.id === x);
|
|
1051
|
+
return _ !== -1 && S.splice(_, 1), S;
|
|
1038
1052
|
});
|
|
1039
|
-
c.value =
|
|
1040
|
-
}, theirOnChange(
|
|
1041
|
-
e.disabled ||
|
|
1042
|
-
}, select(
|
|
1043
|
-
e.disabled ||
|
|
1044
|
-
let
|
|
1045
|
-
return _ === -1 ?
|
|
1053
|
+
c.value = w.options, s.value = w.activeOptionIndex, d.value = 1;
|
|
1054
|
+
}, theirOnChange(x) {
|
|
1055
|
+
e.disabled || p(x);
|
|
1056
|
+
}, select(x) {
|
|
1057
|
+
e.disabled || p(G(f.value, { 0: () => x, 1: () => {
|
|
1058
|
+
let w = X(g.value.value).slice(), S = X(x), _ = w.findIndex((C) => g.compare(S, X(C)));
|
|
1059
|
+
return _ === -1 ? w.push(S) : w.splice(_, 1), w;
|
|
1046
1060
|
} }));
|
|
1047
1061
|
} };
|
|
1048
|
-
an([i, u], (
|
|
1049
|
-
var
|
|
1050
|
-
|
|
1051
|
-
},
|
|
1052
|
-
let
|
|
1053
|
-
var
|
|
1054
|
-
return (
|
|
1062
|
+
an([i, u], (x, w) => {
|
|
1063
|
+
var S;
|
|
1064
|
+
g.closeListbox(), ze(w, je.Loose) || (x.preventDefault(), (S = R(i)) == null || S.focus());
|
|
1065
|
+
}, k(() => n.value === 0)), ye(gn, g), on(k(() => G(n.value, { 0: te.Open, 1: te.Closed })));
|
|
1066
|
+
let y = k(() => {
|
|
1067
|
+
var x;
|
|
1068
|
+
return (x = R(i)) == null ? void 0 : x.closest("form");
|
|
1055
1069
|
});
|
|
1056
1070
|
return ee(() => {
|
|
1057
|
-
Z([
|
|
1058
|
-
if (!
|
|
1071
|
+
Z([y], () => {
|
|
1072
|
+
if (!y.value || e.defaultValue === void 0)
|
|
1059
1073
|
return;
|
|
1060
|
-
function
|
|
1061
|
-
|
|
1074
|
+
function x() {
|
|
1075
|
+
g.theirOnChange(e.defaultValue);
|
|
1062
1076
|
}
|
|
1063
|
-
return
|
|
1064
|
-
var
|
|
1065
|
-
(
|
|
1077
|
+
return y.value.addEventListener("reset", x), () => {
|
|
1078
|
+
var w;
|
|
1079
|
+
(w = y.value) == null || w.removeEventListener("reset", x);
|
|
1066
1080
|
};
|
|
1067
1081
|
}, { immediate: !0 });
|
|
1068
1082
|
}), () => {
|
|
1069
|
-
let { name:
|
|
1070
|
-
return Ce(be, [...
|
|
1083
|
+
let { name: x, modelValue: w, disabled: S, form: _, ...C } = e, N = { open: n.value === 0, disabled: S, value: b.value };
|
|
1084
|
+
return Ce(be, [...x != null && b.value != null ? un({ [x]: b.value }).map(([re, _e]) => Ce(sn, Jt({ features: dt.Hidden, key: re, as: "input", type: "hidden", hidden: !0, readOnly: !0, form: _, name: re, value: _e }))) : [], z({ ourProps: {}, theirProps: { ...l, ...it(C, ["defaultValue", "onUpdate:modelValue", "horizontal", "multiple", "by"]) }, slot: N, slots: t, attrs: l, name: "Listbox" })]);
|
|
1071
1085
|
};
|
|
1072
1086
|
} });
|
|
1073
1087
|
$({ name: "ListboxLabel", props: { as: { type: [Object, String], default: "label" }, id: { type: String, default: () => `headlessui-listbox-label-${J()}` } }, setup(e, { attrs: t, slots: l }) {
|
|
1074
1088
|
let o = De("ListboxLabel");
|
|
1075
1089
|
function n() {
|
|
1076
1090
|
var r;
|
|
1077
|
-
(r =
|
|
1091
|
+
(r = R(o.buttonRef)) == null || r.focus({ preventScroll: !0 });
|
|
1078
1092
|
}
|
|
1079
1093
|
return () => {
|
|
1080
1094
|
let r = { open: o.listboxState.value === 0, disabled: o.disabled.value }, { id: i, ...u } = e, c = { id: i, ref: o.labelRef, onClick: n };
|
|
@@ -1084,105 +1098,105 @@ $({ name: "ListboxLabel", props: { as: { type: [Object, String], default: "label
|
|
|
1084
1098
|
let sl = $({ name: "ListboxButton", props: { as: { type: [Object, String], default: "button" }, id: { type: String, default: () => `headlessui-listbox-button-${J()}` } }, setup(e, { attrs: t, slots: l, expose: o }) {
|
|
1085
1099
|
let n = De("ListboxButton");
|
|
1086
1100
|
o({ el: n.buttonRef, $el: n.buttonRef });
|
|
1087
|
-
function r(
|
|
1088
|
-
switch (
|
|
1101
|
+
function r(a) {
|
|
1102
|
+
switch (a.key) {
|
|
1089
1103
|
case D.Space:
|
|
1090
1104
|
case D.Enter:
|
|
1091
1105
|
case D.ArrowDown:
|
|
1092
|
-
|
|
1093
|
-
var
|
|
1094
|
-
(
|
|
1106
|
+
a.preventDefault(), n.openListbox(), j(() => {
|
|
1107
|
+
var s;
|
|
1108
|
+
(s = R(n.optionsRef)) == null || s.focus({ preventScroll: !0 }), n.value.value || n.goToOption(L.First);
|
|
1095
1109
|
});
|
|
1096
1110
|
break;
|
|
1097
1111
|
case D.ArrowUp:
|
|
1098
|
-
|
|
1099
|
-
var
|
|
1100
|
-
(
|
|
1112
|
+
a.preventDefault(), n.openListbox(), j(() => {
|
|
1113
|
+
var s;
|
|
1114
|
+
(s = R(n.optionsRef)) == null || s.focus({ preventScroll: !0 }), n.value.value || n.goToOption(L.Last);
|
|
1101
1115
|
});
|
|
1102
1116
|
break;
|
|
1103
1117
|
}
|
|
1104
1118
|
}
|
|
1105
|
-
function i(
|
|
1106
|
-
switch (
|
|
1119
|
+
function i(a) {
|
|
1120
|
+
switch (a.key) {
|
|
1107
1121
|
case D.Space:
|
|
1108
|
-
|
|
1122
|
+
a.preventDefault();
|
|
1109
1123
|
break;
|
|
1110
1124
|
}
|
|
1111
1125
|
}
|
|
1112
|
-
function u(
|
|
1126
|
+
function u(a) {
|
|
1113
1127
|
n.disabled.value || (n.listboxState.value === 0 ? (n.closeListbox(), j(() => {
|
|
1114
|
-
var
|
|
1115
|
-
return (
|
|
1116
|
-
})) : (
|
|
1117
|
-
var
|
|
1118
|
-
return (
|
|
1128
|
+
var s;
|
|
1129
|
+
return (s = R(n.buttonRef)) == null ? void 0 : s.focus({ preventScroll: !0 });
|
|
1130
|
+
})) : (a.preventDefault(), n.openListbox(), il(() => {
|
|
1131
|
+
var s;
|
|
1132
|
+
return (s = R(n.optionsRef)) == null ? void 0 : s.focus({ preventScroll: !0 });
|
|
1119
1133
|
})));
|
|
1120
1134
|
}
|
|
1121
|
-
let c = at(
|
|
1135
|
+
let c = at(k(() => ({ as: e.as, type: t.type })), n.buttonRef);
|
|
1122
1136
|
return () => {
|
|
1123
|
-
var
|
|
1124
|
-
let d = { open: n.listboxState.value === 0, disabled: n.disabled.value, value: n.value.value }, { id:
|
|
1125
|
-
return z({ ourProps:
|
|
1137
|
+
var a, s;
|
|
1138
|
+
let d = { open: n.listboxState.value === 0, disabled: n.disabled.value, value: n.value.value }, { id: m, ...f } = e, v = { ref: n.buttonRef, id: m, type: c.value, "aria-haspopup": "listbox", "aria-controls": (a = R(n.optionsRef)) == null ? void 0 : a.id, "aria-expanded": n.listboxState.value === 0, "aria-labelledby": n.labelRef.value ? [(s = R(n.labelRef)) == null ? void 0 : s.id, m].join(" ") : void 0, disabled: n.disabled.value === !0 ? !0 : void 0, onKeydown: r, onKeyup: i, onClick: u };
|
|
1139
|
+
return z({ ourProps: v, theirProps: f, slot: d, attrs: t, slots: l, name: "ListboxButton" });
|
|
1126
1140
|
};
|
|
1127
1141
|
} }), ul = $({ name: "ListboxOptions", props: { as: { type: [Object, String], default: "ul" }, static: { type: Boolean, default: !1 }, unmount: { type: Boolean, default: !0 }, id: { type: String, default: () => `headlessui-listbox-options-${J()}` } }, setup(e, { attrs: t, slots: l, expose: o }) {
|
|
1128
1142
|
let n = De("ListboxOptions"), r = O(null);
|
|
1129
1143
|
o({ el: n.optionsRef, $el: n.optionsRef });
|
|
1130
|
-
function i(
|
|
1131
|
-
switch (r.value && clearTimeout(r.value),
|
|
1144
|
+
function i(a) {
|
|
1145
|
+
switch (r.value && clearTimeout(r.value), a.key) {
|
|
1132
1146
|
case D.Space:
|
|
1133
1147
|
if (n.searchQuery.value !== "")
|
|
1134
|
-
return
|
|
1148
|
+
return a.preventDefault(), a.stopPropagation(), n.search(a.key);
|
|
1135
1149
|
case D.Enter:
|
|
1136
|
-
if (
|
|
1137
|
-
let
|
|
1138
|
-
n.select(
|
|
1150
|
+
if (a.preventDefault(), a.stopPropagation(), n.activeOptionIndex.value !== null) {
|
|
1151
|
+
let s = n.options.value[n.activeOptionIndex.value];
|
|
1152
|
+
n.select(s.dataRef.value);
|
|
1139
1153
|
}
|
|
1140
1154
|
n.mode.value === 0 && (n.closeListbox(), j(() => {
|
|
1141
|
-
var
|
|
1142
|
-
return (
|
|
1155
|
+
var s;
|
|
1156
|
+
return (s = R(n.buttonRef)) == null ? void 0 : s.focus({ preventScroll: !0 });
|
|
1143
1157
|
}));
|
|
1144
1158
|
break;
|
|
1145
1159
|
case G(n.orientation.value, { vertical: D.ArrowDown, horizontal: D.ArrowRight }):
|
|
1146
|
-
return
|
|
1160
|
+
return a.preventDefault(), a.stopPropagation(), n.goToOption(L.Next);
|
|
1147
1161
|
case G(n.orientation.value, { vertical: D.ArrowUp, horizontal: D.ArrowLeft }):
|
|
1148
|
-
return
|
|
1162
|
+
return a.preventDefault(), a.stopPropagation(), n.goToOption(L.Previous);
|
|
1149
1163
|
case D.Home:
|
|
1150
1164
|
case D.PageUp:
|
|
1151
|
-
return
|
|
1165
|
+
return a.preventDefault(), a.stopPropagation(), n.goToOption(L.First);
|
|
1152
1166
|
case D.End:
|
|
1153
1167
|
case D.PageDown:
|
|
1154
|
-
return
|
|
1168
|
+
return a.preventDefault(), a.stopPropagation(), n.goToOption(L.Last);
|
|
1155
1169
|
case D.Escape:
|
|
1156
|
-
|
|
1157
|
-
var
|
|
1158
|
-
return (
|
|
1170
|
+
a.preventDefault(), a.stopPropagation(), n.closeListbox(), j(() => {
|
|
1171
|
+
var s;
|
|
1172
|
+
return (s = R(n.buttonRef)) == null ? void 0 : s.focus({ preventScroll: !0 });
|
|
1159
1173
|
});
|
|
1160
1174
|
break;
|
|
1161
1175
|
case D.Tab:
|
|
1162
|
-
|
|
1176
|
+
a.preventDefault(), a.stopPropagation();
|
|
1163
1177
|
break;
|
|
1164
1178
|
default:
|
|
1165
|
-
|
|
1179
|
+
a.key.length === 1 && (n.search(a.key), r.value = setTimeout(() => n.clearSearch(), 350));
|
|
1166
1180
|
break;
|
|
1167
1181
|
}
|
|
1168
1182
|
}
|
|
1169
|
-
let u = nn(), c =
|
|
1183
|
+
let u = nn(), c = k(() => u !== null ? (u.value & te.Open) === te.Open : n.listboxState.value === 0);
|
|
1170
1184
|
return () => {
|
|
1171
|
-
var
|
|
1172
|
-
let f = { open: n.listboxState.value === 0 }, { id:
|
|
1173
|
-
return z({ ourProps: b, theirProps:
|
|
1185
|
+
var a, s, d, m;
|
|
1186
|
+
let f = { open: n.listboxState.value === 0 }, { id: v, ...p } = e, b = { "aria-activedescendant": n.activeOptionIndex.value === null || (a = n.options.value[n.activeOptionIndex.value]) == null ? void 0 : a.id, "aria-multiselectable": n.mode.value === 1 ? !0 : void 0, "aria-labelledby": (m = (s = R(n.labelRef)) == null ? void 0 : s.id) != null ? m : (d = R(n.buttonRef)) == null ? void 0 : d.id, "aria-orientation": n.orientation.value, id: v, onKeydown: i, role: "listbox", tabIndex: 0, ref: n.optionsRef };
|
|
1187
|
+
return z({ ourProps: b, theirProps: p, slot: f, attrs: t, slots: l, features: Ee.RenderStrategy | Ee.Static, visible: c.value, name: "ListboxOptions" });
|
|
1174
1188
|
};
|
|
1175
1189
|
} }), cl = $({ name: "ListboxOption", props: { as: { type: [Object, String], default: "li" }, value: { type: [Object, String, Number, Boolean] }, disabled: { type: Boolean, default: !1 }, id: { type: String, default: () => `headlessui-listbox.option-${J()}` } }, setup(e, { slots: t, attrs: l, expose: o }) {
|
|
1176
1190
|
let n = De("ListboxOption"), r = O(null);
|
|
1177
1191
|
o({ el: r, $el: r });
|
|
1178
|
-
let i =
|
|
1179
|
-
var
|
|
1180
|
-
let
|
|
1181
|
-
return ((
|
|
1182
|
-
}, 0: () => u.value })),
|
|
1183
|
-
return
|
|
1192
|
+
let i = k(() => n.activeOptionIndex.value !== null ? n.options.value[n.activeOptionIndex.value].id === e.id : !1), u = k(() => G(n.mode.value, { 0: () => n.compare(X(n.value.value), X(e.value)), 1: () => X(n.value.value).some((g) => n.compare(X(g), X(e.value))) })), c = k(() => G(n.mode.value, { 1: () => {
|
|
1193
|
+
var g;
|
|
1194
|
+
let y = X(n.value.value);
|
|
1195
|
+
return ((g = n.options.value.find((x) => y.some((w) => n.compare(X(w), X(x.dataRef.value))))) == null ? void 0 : g.id) === e.id;
|
|
1196
|
+
}, 0: () => u.value })), a = vn(r), s = k(() => ({ disabled: e.disabled, value: e.value, get textValue() {
|
|
1197
|
+
return a();
|
|
1184
1198
|
}, domRef: r }));
|
|
1185
|
-
ee(() => n.registerOption(e.id,
|
|
1199
|
+
ee(() => n.registerOption(e.id, s)), Ne(() => n.unregisterOption(e.id)), ee(() => {
|
|
1186
1200
|
Z([n.listboxState, u], () => {
|
|
1187
1201
|
n.listboxState.value === 0 && u.value && G(n.mode.value, { 1: () => {
|
|
1188
1202
|
c.value && n.goToOption(L.Specific, e.id);
|
|
@@ -1192,36 +1206,36 @@ let sl = $({ name: "ListboxButton", props: { as: { type: [Object, String], defau
|
|
|
1192
1206
|
}, { immediate: !0 });
|
|
1193
1207
|
}), xe(() => {
|
|
1194
1208
|
n.listboxState.value === 0 && i.value && n.activationTrigger.value !== 0 && j(() => {
|
|
1195
|
-
var
|
|
1196
|
-
return (
|
|
1209
|
+
var g, y;
|
|
1210
|
+
return (y = (g = R(r)) == null ? void 0 : g.scrollIntoView) == null ? void 0 : y.call(g, { block: "nearest" });
|
|
1197
1211
|
});
|
|
1198
1212
|
});
|
|
1199
|
-
function d(
|
|
1213
|
+
function d(g) {
|
|
1200
1214
|
if (e.disabled)
|
|
1201
|
-
return
|
|
1215
|
+
return g.preventDefault();
|
|
1202
1216
|
n.select(e.value), n.mode.value === 0 && (n.closeListbox(), j(() => {
|
|
1203
|
-
var
|
|
1204
|
-
return (
|
|
1217
|
+
var y;
|
|
1218
|
+
return (y = R(n.buttonRef)) == null ? void 0 : y.focus({ preventScroll: !0 });
|
|
1205
1219
|
}));
|
|
1206
1220
|
}
|
|
1207
|
-
function
|
|
1221
|
+
function m() {
|
|
1208
1222
|
if (e.disabled)
|
|
1209
1223
|
return n.goToOption(L.Nothing);
|
|
1210
1224
|
n.goToOption(L.Specific, e.id);
|
|
1211
1225
|
}
|
|
1212
1226
|
let f = pn();
|
|
1213
|
-
function g
|
|
1214
|
-
f.update(
|
|
1227
|
+
function v(g) {
|
|
1228
|
+
f.update(g);
|
|
1215
1229
|
}
|
|
1216
|
-
function
|
|
1217
|
-
f.wasMoved(
|
|
1230
|
+
function p(g) {
|
|
1231
|
+
f.wasMoved(g) && (e.disabled || i.value || n.goToOption(L.Specific, e.id, 0));
|
|
1218
1232
|
}
|
|
1219
|
-
function b(
|
|
1220
|
-
f.wasMoved(
|
|
1233
|
+
function b(g) {
|
|
1234
|
+
f.wasMoved(g) && (e.disabled || i.value && n.goToOption(L.Nothing));
|
|
1221
1235
|
}
|
|
1222
1236
|
return () => {
|
|
1223
|
-
let { disabled:
|
|
1224
|
-
return z({ ourProps: C, theirProps: _, slot:
|
|
1237
|
+
let { disabled: g } = e, y = { active: i.value, selected: u.value, disabled: g }, { id: x, value: w, disabled: S, ..._ } = e, C = { id: x, ref: r, role: "option", tabIndex: g === !0 ? void 0 : -1, "aria-disabled": g === !0 ? !0 : void 0, "aria-selected": u.value, disabled: void 0, onClick: d, onFocus: m, onPointerenter: v, onMouseenter: v, onPointermove: p, onMousemove: p, onPointerleave: b, onMouseleave: b };
|
|
1238
|
+
return z({ ourProps: C, theirProps: _, slot: y, attrs: l, slots: t, name: "ListboxOption" });
|
|
1225
1239
|
};
|
|
1226
1240
|
} });
|
|
1227
1241
|
var dl = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(dl || {}), fl = ((e) => (e[e.Pointer = 0] = "Pointer", e[e.Other = 1] = "Other", e))(fl || {});
|
|
@@ -1238,175 +1252,175 @@ function Ue(e) {
|
|
|
1238
1252
|
return t;
|
|
1239
1253
|
}
|
|
1240
1254
|
let ml = $({ name: "Menu", props: { as: { type: [Object, String], default: "template" } }, setup(e, { slots: t, attrs: l }) {
|
|
1241
|
-
let o = O(1), n = O(null), r = O(null), i = O([]), u = O(""), c = O(null),
|
|
1242
|
-
function
|
|
1243
|
-
let f = c.value !== null ? i.value[c.value] : null,
|
|
1244
|
-
return
|
|
1255
|
+
let o = O(1), n = O(null), r = O(null), i = O([]), u = O(""), c = O(null), a = O(1);
|
|
1256
|
+
function s(m = (f) => f) {
|
|
1257
|
+
let f = c.value !== null ? i.value[c.value] : null, v = ct(m(i.value.slice()), (b) => R(b.dataRef.domRef)), p = f ? v.indexOf(f) : null;
|
|
1258
|
+
return p === -1 && (p = null), { items: v, activeItemIndex: p };
|
|
1245
1259
|
}
|
|
1246
|
-
let d = { menuState: o, buttonRef: n, itemsRef: r, items: i, searchQuery: u, activeItemIndex: c, activationTrigger:
|
|
1260
|
+
let d = { menuState: o, buttonRef: n, itemsRef: r, items: i, searchQuery: u, activeItemIndex: c, activationTrigger: a, closeMenu: () => {
|
|
1247
1261
|
o.value = 1, c.value = null;
|
|
1248
|
-
}, openMenu: () => o.value = 0, goToItem(
|
|
1249
|
-
let
|
|
1250
|
-
u.value = "", c.value = b,
|
|
1251
|
-
}, search(
|
|
1262
|
+
}, openMenu: () => o.value = 0, goToItem(m, f, v) {
|
|
1263
|
+
let p = s(), b = en(m === L.Specific ? { focus: L.Specific, id: f } : { focus: m }, { resolveItems: () => p.items, resolveActiveIndex: () => p.activeItemIndex, resolveId: (g) => g.id, resolveDisabled: (g) => g.dataRef.disabled });
|
|
1264
|
+
u.value = "", c.value = b, a.value = v ?? 1, i.value = p.items;
|
|
1265
|
+
}, search(m) {
|
|
1252
1266
|
let f = u.value !== "" ? 0 : 1;
|
|
1253
|
-
u.value +=
|
|
1254
|
-
let
|
|
1255
|
-
|
|
1267
|
+
u.value += m.toLowerCase();
|
|
1268
|
+
let v = (c.value !== null ? i.value.slice(c.value + f).concat(i.value.slice(0, c.value + f)) : i.value).find((b) => b.dataRef.textValue.startsWith(u.value) && !b.dataRef.disabled), p = v ? i.value.indexOf(v) : -1;
|
|
1269
|
+
p === -1 || p === c.value || (c.value = p, a.value = 1);
|
|
1256
1270
|
}, clearSearch() {
|
|
1257
1271
|
u.value = "";
|
|
1258
|
-
}, registerItem(
|
|
1259
|
-
let
|
|
1260
|
-
i.value =
|
|
1261
|
-
}, unregisterItem(
|
|
1262
|
-
let f =
|
|
1263
|
-
let
|
|
1264
|
-
return
|
|
1272
|
+
}, registerItem(m, f) {
|
|
1273
|
+
let v = s((p) => [...p, { id: m, dataRef: f }]);
|
|
1274
|
+
i.value = v.items, c.value = v.activeItemIndex, a.value = 1;
|
|
1275
|
+
}, unregisterItem(m) {
|
|
1276
|
+
let f = s((v) => {
|
|
1277
|
+
let p = v.findIndex((b) => b.id === m);
|
|
1278
|
+
return p !== -1 && v.splice(p, 1), v;
|
|
1265
1279
|
});
|
|
1266
|
-
i.value = f.items, c.value = f.activeItemIndex,
|
|
1280
|
+
i.value = f.items, c.value = f.activeItemIndex, a.value = 1;
|
|
1267
1281
|
} };
|
|
1268
|
-
return an([n, r], (
|
|
1269
|
-
var
|
|
1270
|
-
d.closeMenu(), ze(f, je.Loose) || (
|
|
1271
|
-
},
|
|
1272
|
-
let
|
|
1273
|
-
return z({ ourProps: {}, theirProps: e, slot:
|
|
1282
|
+
return an([n, r], (m, f) => {
|
|
1283
|
+
var v;
|
|
1284
|
+
d.closeMenu(), ze(f, je.Loose) || (m.preventDefault(), (v = R(n)) == null || v.focus());
|
|
1285
|
+
}, k(() => o.value === 0)), ye(bn, d), on(k(() => G(o.value, { 0: te.Open, 1: te.Closed }))), () => {
|
|
1286
|
+
let m = { open: o.value === 0, close: d.closeMenu };
|
|
1287
|
+
return z({ ourProps: {}, theirProps: e, slot: m, slots: t, attrs: l, name: "Menu" });
|
|
1274
1288
|
};
|
|
1275
1289
|
} }), vl = $({ name: "MenuButton", props: { disabled: { type: Boolean, default: !1 }, as: { type: [Object, String], default: "button" }, id: { type: String, default: () => `headlessui-menu-button-${J()}` } }, setup(e, { attrs: t, slots: l, expose: o }) {
|
|
1276
1290
|
let n = Ue("MenuButton");
|
|
1277
1291
|
o({ el: n.buttonRef, $el: n.buttonRef });
|
|
1278
|
-
function r(
|
|
1279
|
-
switch (
|
|
1292
|
+
function r(a) {
|
|
1293
|
+
switch (a.key) {
|
|
1280
1294
|
case D.Space:
|
|
1281
1295
|
case D.Enter:
|
|
1282
1296
|
case D.ArrowDown:
|
|
1283
|
-
|
|
1284
|
-
var
|
|
1285
|
-
(
|
|
1297
|
+
a.preventDefault(), a.stopPropagation(), n.openMenu(), j(() => {
|
|
1298
|
+
var s;
|
|
1299
|
+
(s = R(n.itemsRef)) == null || s.focus({ preventScroll: !0 }), n.goToItem(L.First);
|
|
1286
1300
|
});
|
|
1287
1301
|
break;
|
|
1288
1302
|
case D.ArrowUp:
|
|
1289
|
-
|
|
1290
|
-
var
|
|
1291
|
-
(
|
|
1303
|
+
a.preventDefault(), a.stopPropagation(), n.openMenu(), j(() => {
|
|
1304
|
+
var s;
|
|
1305
|
+
(s = R(n.itemsRef)) == null || s.focus({ preventScroll: !0 }), n.goToItem(L.Last);
|
|
1292
1306
|
});
|
|
1293
1307
|
break;
|
|
1294
1308
|
}
|
|
1295
1309
|
}
|
|
1296
|
-
function i(
|
|
1297
|
-
switch (
|
|
1310
|
+
function i(a) {
|
|
1311
|
+
switch (a.key) {
|
|
1298
1312
|
case D.Space:
|
|
1299
|
-
|
|
1313
|
+
a.preventDefault();
|
|
1300
1314
|
break;
|
|
1301
1315
|
}
|
|
1302
1316
|
}
|
|
1303
|
-
function u(
|
|
1317
|
+
function u(a) {
|
|
1304
1318
|
e.disabled || (n.menuState.value === 0 ? (n.closeMenu(), j(() => {
|
|
1305
|
-
var
|
|
1306
|
-
return (
|
|
1307
|
-
})) : (
|
|
1308
|
-
var
|
|
1309
|
-
return (
|
|
1319
|
+
var s;
|
|
1320
|
+
return (s = R(n.buttonRef)) == null ? void 0 : s.focus({ preventScroll: !0 });
|
|
1321
|
+
})) : (a.preventDefault(), n.openMenu(), pl(() => {
|
|
1322
|
+
var s;
|
|
1323
|
+
return (s = R(n.itemsRef)) == null ? void 0 : s.focus({ preventScroll: !0 });
|
|
1310
1324
|
})));
|
|
1311
1325
|
}
|
|
1312
|
-
let c = at(
|
|
1326
|
+
let c = at(k(() => ({ as: e.as, type: t.type })), n.buttonRef);
|
|
1313
1327
|
return () => {
|
|
1314
|
-
var
|
|
1315
|
-
let
|
|
1316
|
-
return z({ ourProps: f, theirProps:
|
|
1328
|
+
var a;
|
|
1329
|
+
let s = { open: n.menuState.value === 0 }, { id: d, ...m } = e, f = { ref: n.buttonRef, id: d, type: c.value, "aria-haspopup": "menu", "aria-controls": (a = R(n.itemsRef)) == null ? void 0 : a.id, "aria-expanded": n.menuState.value === 0, onKeydown: r, onKeyup: i, onClick: u };
|
|
1330
|
+
return z({ ourProps: f, theirProps: m, slot: s, attrs: t, slots: l, name: "MenuButton" });
|
|
1317
1331
|
};
|
|
1318
1332
|
} }), gl = $({ name: "MenuItems", props: { as: { type: [Object, String], default: "div" }, static: { type: Boolean, default: !1 }, unmount: { type: Boolean, default: !0 }, id: { type: String, default: () => `headlessui-menu-items-${J()}` } }, setup(e, { attrs: t, slots: l, expose: o }) {
|
|
1319
1333
|
let n = Ue("MenuItems"), r = O(null);
|
|
1320
|
-
o({ el: n.itemsRef, $el: n.itemsRef }), zo({ container:
|
|
1321
|
-
return
|
|
1322
|
-
}, walk(
|
|
1323
|
-
|
|
1334
|
+
o({ el: n.itemsRef, $el: n.itemsRef }), zo({ container: k(() => R(n.itemsRef)), enabled: k(() => n.menuState.value === 0), accept(s) {
|
|
1335
|
+
return s.getAttribute("role") === "menuitem" ? NodeFilter.FILTER_REJECT : s.hasAttribute("role") ? NodeFilter.FILTER_SKIP : NodeFilter.FILTER_ACCEPT;
|
|
1336
|
+
}, walk(s) {
|
|
1337
|
+
s.setAttribute("role", "none");
|
|
1324
1338
|
} });
|
|
1325
|
-
function i(
|
|
1339
|
+
function i(s) {
|
|
1326
1340
|
var d;
|
|
1327
|
-
switch (r.value && clearTimeout(r.value),
|
|
1341
|
+
switch (r.value && clearTimeout(r.value), s.key) {
|
|
1328
1342
|
case D.Space:
|
|
1329
1343
|
if (n.searchQuery.value !== "")
|
|
1330
|
-
return
|
|
1344
|
+
return s.preventDefault(), s.stopPropagation(), n.search(s.key);
|
|
1331
1345
|
case D.Enter:
|
|
1332
|
-
if (
|
|
1333
|
-
let
|
|
1334
|
-
(d =
|
|
1346
|
+
if (s.preventDefault(), s.stopPropagation(), n.activeItemIndex.value !== null) {
|
|
1347
|
+
let m = n.items.value[n.activeItemIndex.value];
|
|
1348
|
+
(d = R(m.dataRef.domRef)) == null || d.click();
|
|
1335
1349
|
}
|
|
1336
|
-
n.closeMenu(), rn(
|
|
1350
|
+
n.closeMenu(), rn(R(n.buttonRef));
|
|
1337
1351
|
break;
|
|
1338
1352
|
case D.ArrowDown:
|
|
1339
|
-
return
|
|
1353
|
+
return s.preventDefault(), s.stopPropagation(), n.goToItem(L.Next);
|
|
1340
1354
|
case D.ArrowUp:
|
|
1341
|
-
return
|
|
1355
|
+
return s.preventDefault(), s.stopPropagation(), n.goToItem(L.Previous);
|
|
1342
1356
|
case D.Home:
|
|
1343
1357
|
case D.PageUp:
|
|
1344
|
-
return
|
|
1358
|
+
return s.preventDefault(), s.stopPropagation(), n.goToItem(L.First);
|
|
1345
1359
|
case D.End:
|
|
1346
1360
|
case D.PageDown:
|
|
1347
|
-
return
|
|
1361
|
+
return s.preventDefault(), s.stopPropagation(), n.goToItem(L.Last);
|
|
1348
1362
|
case D.Escape:
|
|
1349
|
-
|
|
1350
|
-
var
|
|
1351
|
-
return (
|
|
1363
|
+
s.preventDefault(), s.stopPropagation(), n.closeMenu(), j(() => {
|
|
1364
|
+
var m;
|
|
1365
|
+
return (m = R(n.buttonRef)) == null ? void 0 : m.focus({ preventScroll: !0 });
|
|
1352
1366
|
});
|
|
1353
1367
|
break;
|
|
1354
1368
|
case D.Tab:
|
|
1355
|
-
|
|
1369
|
+
s.preventDefault(), s.stopPropagation(), n.closeMenu(), j(() => Xo(R(n.buttonRef), s.shiftKey ? tt.Previous : tt.Next));
|
|
1356
1370
|
break;
|
|
1357
1371
|
default:
|
|
1358
|
-
|
|
1372
|
+
s.key.length === 1 && (n.search(s.key), r.value = setTimeout(() => n.clearSearch(), 350));
|
|
1359
1373
|
break;
|
|
1360
1374
|
}
|
|
1361
1375
|
}
|
|
1362
|
-
function u(
|
|
1363
|
-
switch (
|
|
1376
|
+
function u(s) {
|
|
1377
|
+
switch (s.key) {
|
|
1364
1378
|
case D.Space:
|
|
1365
|
-
|
|
1379
|
+
s.preventDefault();
|
|
1366
1380
|
break;
|
|
1367
1381
|
}
|
|
1368
1382
|
}
|
|
1369
|
-
let c = nn(),
|
|
1383
|
+
let c = nn(), a = k(() => c !== null ? (c.value & te.Open) === te.Open : n.menuState.value === 0);
|
|
1370
1384
|
return () => {
|
|
1371
|
-
var
|
|
1372
|
-
let
|
|
1373
|
-
return z({ ourProps:
|
|
1385
|
+
var s, d;
|
|
1386
|
+
let m = { open: n.menuState.value === 0 }, { id: f, ...v } = e, p = { "aria-activedescendant": n.activeItemIndex.value === null || (s = n.items.value[n.activeItemIndex.value]) == null ? void 0 : s.id, "aria-labelledby": (d = R(n.buttonRef)) == null ? void 0 : d.id, id: f, onKeydown: i, onKeyup: u, role: "menu", tabIndex: 0, ref: n.itemsRef };
|
|
1387
|
+
return z({ ourProps: p, theirProps: v, slot: m, attrs: t, slots: l, features: Ee.RenderStrategy | Ee.Static, visible: a.value, name: "MenuItems" });
|
|
1374
1388
|
};
|
|
1375
1389
|
} }), bl = $({ name: "MenuItem", inheritAttrs: !1, props: { as: { type: [Object, String], default: "template" }, disabled: { type: Boolean, default: !1 }, id: { type: String, default: () => `headlessui-menu-item-${J()}` } }, setup(e, { slots: t, attrs: l, expose: o }) {
|
|
1376
1390
|
let n = Ue("MenuItem"), r = O(null);
|
|
1377
1391
|
o({ el: r, $el: r });
|
|
1378
|
-
let i =
|
|
1392
|
+
let i = k(() => n.activeItemIndex.value !== null ? n.items.value[n.activeItemIndex.value].id === e.id : !1), u = vn(r), c = k(() => ({ disabled: e.disabled, get textValue() {
|
|
1379
1393
|
return u();
|
|
1380
1394
|
}, domRef: r }));
|
|
1381
|
-
ee(() => n.registerItem(e.id, c)),
|
|
1395
|
+
ee(() => n.registerItem(e.id, c)), Ne(() => n.unregisterItem(e.id)), xe(() => {
|
|
1382
1396
|
n.menuState.value === 0 && i.value && n.activationTrigger.value !== 0 && j(() => {
|
|
1383
|
-
var
|
|
1384
|
-
return (b = (
|
|
1397
|
+
var p, b;
|
|
1398
|
+
return (b = (p = R(r)) == null ? void 0 : p.scrollIntoView) == null ? void 0 : b.call(p, { block: "nearest" });
|
|
1385
1399
|
});
|
|
1386
1400
|
});
|
|
1387
|
-
function
|
|
1401
|
+
function a(p) {
|
|
1388
1402
|
if (e.disabled)
|
|
1389
|
-
return
|
|
1390
|
-
n.closeMenu(), rn(
|
|
1403
|
+
return p.preventDefault();
|
|
1404
|
+
n.closeMenu(), rn(R(n.buttonRef));
|
|
1391
1405
|
}
|
|
1392
|
-
function
|
|
1406
|
+
function s() {
|
|
1393
1407
|
if (e.disabled)
|
|
1394
1408
|
return n.goToItem(L.Nothing);
|
|
1395
1409
|
n.goToItem(L.Specific, e.id);
|
|
1396
1410
|
}
|
|
1397
1411
|
let d = pn();
|
|
1398
|
-
function
|
|
1399
|
-
d.update(
|
|
1412
|
+
function m(p) {
|
|
1413
|
+
d.update(p);
|
|
1400
1414
|
}
|
|
1401
|
-
function f(
|
|
1402
|
-
d.wasMoved(
|
|
1415
|
+
function f(p) {
|
|
1416
|
+
d.wasMoved(p) && (e.disabled || i.value || n.goToItem(L.Specific, e.id, 0));
|
|
1403
1417
|
}
|
|
1404
|
-
function
|
|
1405
|
-
d.wasMoved(
|
|
1418
|
+
function v(p) {
|
|
1419
|
+
d.wasMoved(p) && (e.disabled || i.value && n.goToItem(L.Nothing));
|
|
1406
1420
|
}
|
|
1407
1421
|
return () => {
|
|
1408
|
-
let { disabled:
|
|
1409
|
-
return z({ ourProps: { id:
|
|
1422
|
+
let { disabled: p } = e, b = { active: i.value, disabled: p, close: n.closeMenu }, { id: g, ...y } = e;
|
|
1423
|
+
return z({ ourProps: { id: g, ref: r, role: "menuitem", tabIndex: p === !0 ? void 0 : -1, "aria-disabled": p === !0 ? !0 : void 0, disabled: void 0, onClick: a, onFocus: s, onPointerenter: m, onMouseenter: m, onPointermove: f, onMousemove: f, onPointerleave: v, onMouseleave: v }, theirProps: { ...l, ...y }, slot: b, attrs: l, slots: t, name: "MenuItem" });
|
|
1410
1424
|
};
|
|
1411
1425
|
} }), hn = Symbol("LabelContext");
|
|
1412
1426
|
function yn() {
|
|
@@ -1425,18 +1439,18 @@ function hl({ slot: e = {}, name: t = "Label", props: l = {} } = {}) {
|
|
|
1425
1439
|
i !== -1 && o.value.splice(i, 1);
|
|
1426
1440
|
};
|
|
1427
1441
|
}
|
|
1428
|
-
return ye(hn, { register: n, slot: e, name: t, props: l }),
|
|
1442
|
+
return ye(hn, { register: n, slot: e, name: t, props: l }), k(() => o.value.length > 0 ? o.value.join(" ") : void 0);
|
|
1429
1443
|
}
|
|
1430
1444
|
$({ name: "Label", props: { as: { type: [Object, String], default: "label" }, passive: { type: [Boolean], default: !1 }, id: { type: String, default: () => `headlessui-label-${J()}` } }, setup(e, { slots: t, attrs: l }) {
|
|
1431
1445
|
let o = yn();
|
|
1432
|
-
return ee(() =>
|
|
1433
|
-
let { name: n = "Label", slot: r = {}, props: i = {} } = o, { id: u, passive: c, ...
|
|
1434
|
-
return c && (delete
|
|
1446
|
+
return ee(() => Ne(o.register(e.id))), () => {
|
|
1447
|
+
let { name: n = "Label", slot: r = {}, props: i = {} } = o, { id: u, passive: c, ...a } = e, s = { ...Object.entries(i).reduce((d, [m, f]) => Object.assign(d, { [m]: P(f) }), {}), id: u };
|
|
1448
|
+
return c && (delete s.onClick, delete s.htmlFor, delete a.onClick), z({ ourProps: s, theirProps: a, slot: r, attrs: l, slots: t, name: n });
|
|
1435
1449
|
};
|
|
1436
1450
|
} });
|
|
1437
1451
|
let xn = Symbol("GroupContext");
|
|
1438
1452
|
$({ name: "SwitchGroup", props: { as: { type: [Object, String], default: "template" } }, setup(e, { slots: t, attrs: l }) {
|
|
1439
|
-
let o = O(null), n = hl({ name: "SwitchLabel", props: { htmlFor:
|
|
1453
|
+
let o = O(null), n = hl({ name: "SwitchLabel", props: { htmlFor: k(() => {
|
|
1440
1454
|
var i;
|
|
1441
1455
|
return (i = o.value) == null ? void 0 : i.id;
|
|
1442
1456
|
}), onClick(i) {
|
|
@@ -1445,40 +1459,40 @@ $({ name: "SwitchGroup", props: { as: { type: [Object, String], default: "templa
|
|
|
1445
1459
|
return ye(xn, { switchRef: o, labelledby: n, describedby: r }), () => z({ theirProps: e, ourProps: {}, slot: {}, slots: t, attrs: l, name: "SwitchGroup" });
|
|
1446
1460
|
} });
|
|
1447
1461
|
let yl = $({ 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: () => `headlessui-switch-${J()}` } }, inheritAttrs: !1, setup(e, { emit: t, attrs: l, slots: o, expose: n }) {
|
|
1448
|
-
let r = he(xn, null), [i, u] = fn(
|
|
1462
|
+
let r = he(xn, null), [i, u] = fn(k(() => e.modelValue), (b) => t("update:modelValue", b), k(() => e.defaultChecked));
|
|
1449
1463
|
function c() {
|
|
1450
1464
|
u(!i.value);
|
|
1451
1465
|
}
|
|
1452
|
-
let
|
|
1453
|
-
n({ el:
|
|
1454
|
-
function
|
|
1466
|
+
let a = O(null), s = r === null ? a : r.switchRef, d = at(k(() => ({ as: e.as, type: l.type })), s);
|
|
1467
|
+
n({ el: s, $el: s });
|
|
1468
|
+
function m(b) {
|
|
1455
1469
|
b.preventDefault(), c();
|
|
1456
1470
|
}
|
|
1457
1471
|
function f(b) {
|
|
1458
1472
|
b.key === D.Space ? (b.preventDefault(), c()) : b.key === D.Enter && Qo(b.currentTarget);
|
|
1459
1473
|
}
|
|
1460
|
-
function
|
|
1474
|
+
function v(b) {
|
|
1461
1475
|
b.preventDefault();
|
|
1462
1476
|
}
|
|
1463
|
-
let
|
|
1464
|
-
var b,
|
|
1465
|
-
return (
|
|
1477
|
+
let p = k(() => {
|
|
1478
|
+
var b, g;
|
|
1479
|
+
return (g = (b = R(s)) == null ? void 0 : b.closest) == null ? void 0 : g.call(b, "form");
|
|
1466
1480
|
});
|
|
1467
1481
|
return ee(() => {
|
|
1468
|
-
Z([
|
|
1469
|
-
if (!
|
|
1482
|
+
Z([p], () => {
|
|
1483
|
+
if (!p.value || e.defaultChecked === void 0)
|
|
1470
1484
|
return;
|
|
1471
1485
|
function b() {
|
|
1472
1486
|
u(e.defaultChecked);
|
|
1473
1487
|
}
|
|
1474
|
-
return
|
|
1475
|
-
var
|
|
1476
|
-
(
|
|
1488
|
+
return p.value.addEventListener("reset", b), () => {
|
|
1489
|
+
var g;
|
|
1490
|
+
(g = p.value) == null || g.removeEventListener("reset", b);
|
|
1477
1491
|
};
|
|
1478
1492
|
}, { immediate: !0 });
|
|
1479
1493
|
}), () => {
|
|
1480
|
-
let { id: b, name:
|
|
1481
|
-
return Ce(be, [
|
|
1494
|
+
let { id: b, name: g, value: y, form: x, ...w } = e, S = { checked: i.value }, _ = { id: b, ref: s, role: "switch", type: d.value, tabIndex: 0, "aria-checked": i.value, "aria-labelledby": r == null ? void 0 : r.labelledby.value, "aria-describedby": r == null ? void 0 : r.describedby.value, onClick: m, onKeyup: f, onKeypress: v };
|
|
1495
|
+
return Ce(be, [g != null && i.value != null ? Ce(sn, Jt({ features: dt.Hidden, as: "input", type: "checkbox", hidden: !0, readOnly: !0, checked: i.value, form: x, name: g, value: y })) : null, z({ ourProps: _, theirProps: { ...l, ...it(w, ["modelValue", "defaultChecked"]) }, slot: S, attrs: l, slots: o, name: "Switch" })]);
|
|
1482
1496
|
};
|
|
1483
1497
|
} });
|
|
1484
1498
|
const Ae = Math.min, ue = Math.max, Me = Math.round, Ie = Math.floor, ae = (e) => ({
|
|
@@ -1551,7 +1565,7 @@ function Cl(e, t, l, o) {
|
|
|
1551
1565
|
function Ve(e) {
|
|
1552
1566
|
return e.replace(/left|right|bottom|top/g, (t) => xl[t]);
|
|
1553
1567
|
}
|
|
1554
|
-
function
|
|
1568
|
+
function El(e) {
|
|
1555
1569
|
return {
|
|
1556
1570
|
top: 0,
|
|
1557
1571
|
right: 0,
|
|
@@ -1560,15 +1574,15 @@ function Rl(e) {
|
|
|
1560
1574
|
...e
|
|
1561
1575
|
};
|
|
1562
1576
|
}
|
|
1563
|
-
function
|
|
1564
|
-
return typeof e != "number" ?
|
|
1577
|
+
function Rl(e) {
|
|
1578
|
+
return typeof e != "number" ? El(e) : {
|
|
1565
1579
|
top: e,
|
|
1566
1580
|
right: e,
|
|
1567
1581
|
bottom: e,
|
|
1568
1582
|
left: e
|
|
1569
1583
|
};
|
|
1570
1584
|
}
|
|
1571
|
-
function
|
|
1585
|
+
function Fe(e) {
|
|
1572
1586
|
return {
|
|
1573
1587
|
...e,
|
|
1574
1588
|
top: e.y,
|
|
@@ -1582,18 +1596,18 @@ function It(e, t, l) {
|
|
|
1582
1596
|
reference: o,
|
|
1583
1597
|
floating: n
|
|
1584
1598
|
} = e;
|
|
1585
|
-
const r = Ke(t), i = Sn(t), u = kn(i), c = ce(t),
|
|
1599
|
+
const r = Ke(t), i = Sn(t), u = kn(i), c = ce(t), a = r === "y", s = o.x + o.width / 2 - n.width / 2, d = o.y + o.height / 2 - n.height / 2, m = o[u] / 2 - n[u] / 2;
|
|
1586
1600
|
let f;
|
|
1587
1601
|
switch (c) {
|
|
1588
1602
|
case "top":
|
|
1589
1603
|
f = {
|
|
1590
|
-
x:
|
|
1604
|
+
x: s,
|
|
1591
1605
|
y: o.y - n.height
|
|
1592
1606
|
};
|
|
1593
1607
|
break;
|
|
1594
1608
|
case "bottom":
|
|
1595
1609
|
f = {
|
|
1596
|
-
x:
|
|
1610
|
+
x: s,
|
|
1597
1611
|
y: o.y + o.height
|
|
1598
1612
|
};
|
|
1599
1613
|
break;
|
|
@@ -1617,10 +1631,10 @@ function It(e, t, l) {
|
|
|
1617
1631
|
}
|
|
1618
1632
|
switch (We(t)) {
|
|
1619
1633
|
case "start":
|
|
1620
|
-
f[i] -=
|
|
1634
|
+
f[i] -= m * (l && a ? -1 : 1);
|
|
1621
1635
|
break;
|
|
1622
1636
|
case "end":
|
|
1623
|
-
f[i] +=
|
|
1637
|
+
f[i] += m * (l && a ? -1 : 1);
|
|
1624
1638
|
break;
|
|
1625
1639
|
}
|
|
1626
1640
|
return f;
|
|
@@ -1632,59 +1646,59 @@ const Dl = async (e, t, l) => {
|
|
|
1632
1646
|
middleware: r = [],
|
|
1633
1647
|
platform: i
|
|
1634
1648
|
} = l, u = r.filter(Boolean), c = await (i.isRTL == null ? void 0 : i.isRTL(t));
|
|
1635
|
-
let
|
|
1649
|
+
let a = await i.getElementRects({
|
|
1636
1650
|
reference: e,
|
|
1637
1651
|
floating: t,
|
|
1638
1652
|
strategy: n
|
|
1639
1653
|
}), {
|
|
1640
|
-
x:
|
|
1654
|
+
x: s,
|
|
1641
1655
|
y: d
|
|
1642
|
-
} = It(
|
|
1643
|
-
for (let
|
|
1656
|
+
} = It(a, o, c), m = o, f = {}, v = 0;
|
|
1657
|
+
for (let p = 0; p < u.length; p++) {
|
|
1644
1658
|
const {
|
|
1645
1659
|
name: b,
|
|
1646
|
-
fn:
|
|
1647
|
-
} = u[
|
|
1648
|
-
x:
|
|
1649
|
-
y,
|
|
1650
|
-
data:
|
|
1651
|
-
reset:
|
|
1652
|
-
} = await
|
|
1653
|
-
x:
|
|
1660
|
+
fn: g
|
|
1661
|
+
} = u[p], {
|
|
1662
|
+
x: y,
|
|
1663
|
+
y: x,
|
|
1664
|
+
data: w,
|
|
1665
|
+
reset: S
|
|
1666
|
+
} = await g({
|
|
1667
|
+
x: s,
|
|
1654
1668
|
y: d,
|
|
1655
1669
|
initialPlacement: o,
|
|
1656
|
-
placement:
|
|
1670
|
+
placement: m,
|
|
1657
1671
|
strategy: n,
|
|
1658
1672
|
middlewareData: f,
|
|
1659
|
-
rects:
|
|
1673
|
+
rects: a,
|
|
1660
1674
|
platform: i,
|
|
1661
1675
|
elements: {
|
|
1662
1676
|
reference: e,
|
|
1663
1677
|
floating: t
|
|
1664
1678
|
}
|
|
1665
1679
|
});
|
|
1666
|
-
if (
|
|
1680
|
+
if (s = y ?? s, d = x ?? d, f = {
|
|
1667
1681
|
...f,
|
|
1668
1682
|
[b]: {
|
|
1669
1683
|
...f[b],
|
|
1670
|
-
...
|
|
1684
|
+
...w
|
|
1671
1685
|
}
|
|
1672
|
-
},
|
|
1673
|
-
|
|
1686
|
+
}, S && v <= 50) {
|
|
1687
|
+
v++, typeof S == "object" && (S.placement && (m = S.placement), S.rects && (a = S.rects === !0 ? await i.getElementRects({
|
|
1674
1688
|
reference: e,
|
|
1675
1689
|
floating: t,
|
|
1676
1690
|
strategy: n
|
|
1677
|
-
}) :
|
|
1678
|
-
x:
|
|
1691
|
+
}) : S.rects), {
|
|
1692
|
+
x: s,
|
|
1679
1693
|
y: d
|
|
1680
|
-
} = It(
|
|
1694
|
+
} = It(a, m, c)), p = -1;
|
|
1681
1695
|
continue;
|
|
1682
1696
|
}
|
|
1683
1697
|
}
|
|
1684
1698
|
return {
|
|
1685
|
-
x:
|
|
1699
|
+
x: s,
|
|
1686
1700
|
y: d,
|
|
1687
|
-
placement:
|
|
1701
|
+
placement: m,
|
|
1688
1702
|
strategy: n,
|
|
1689
1703
|
middlewareData: f
|
|
1690
1704
|
};
|
|
@@ -1700,36 +1714,36 @@ async function On(e, t) {
|
|
|
1700
1714
|
elements: u,
|
|
1701
1715
|
strategy: c
|
|
1702
1716
|
} = e, {
|
|
1703
|
-
boundary:
|
|
1704
|
-
rootBoundary:
|
|
1717
|
+
boundary: a = "clippingAncestors",
|
|
1718
|
+
rootBoundary: s = "viewport",
|
|
1705
1719
|
elementContext: d = "floating",
|
|
1706
|
-
altBoundary:
|
|
1720
|
+
altBoundary: m = !1,
|
|
1707
1721
|
padding: f = 0
|
|
1708
|
-
} = He(t, e),
|
|
1722
|
+
} = He(t, e), v = Rl(f), b = u[m ? d === "floating" ? "reference" : "floating" : d], g = Fe(await r.getClippingRect({
|
|
1709
1723
|
element: (l = await (r.isElement == null ? void 0 : r.isElement(b))) == null || l ? b : b.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(u.floating)),
|
|
1710
|
-
boundary:
|
|
1711
|
-
rootBoundary:
|
|
1724
|
+
boundary: a,
|
|
1725
|
+
rootBoundary: s,
|
|
1712
1726
|
strategy: c
|
|
1713
|
-
})),
|
|
1727
|
+
})), y = d === "floating" ? {
|
|
1714
1728
|
...i.floating,
|
|
1715
1729
|
x: o,
|
|
1716
1730
|
y: n
|
|
1717
|
-
} : i.reference,
|
|
1731
|
+
} : i.reference, x = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(u.floating)), w = await (r.isElement == null ? void 0 : r.isElement(x)) ? await (r.getScale == null ? void 0 : r.getScale(x)) || {
|
|
1718
1732
|
x: 1,
|
|
1719
1733
|
y: 1
|
|
1720
1734
|
} : {
|
|
1721
1735
|
x: 1,
|
|
1722
1736
|
y: 1
|
|
1723
|
-
},
|
|
1724
|
-
rect:
|
|
1725
|
-
offsetParent:
|
|
1737
|
+
}, S = Fe(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
1738
|
+
rect: y,
|
|
1739
|
+
offsetParent: x,
|
|
1726
1740
|
strategy: c
|
|
1727
|
-
}) :
|
|
1741
|
+
}) : y);
|
|
1728
1742
|
return {
|
|
1729
|
-
top: (
|
|
1730
|
-
bottom: (
|
|
1731
|
-
left: (
|
|
1732
|
-
right: (
|
|
1743
|
+
top: (g.top - S.top + v.top) / w.y,
|
|
1744
|
+
bottom: (S.bottom - g.bottom + v.bottom) / w.y,
|
|
1745
|
+
left: (g.left - S.left + v.left) / w.x,
|
|
1746
|
+
right: (S.right - g.right + v.right) / w.x
|
|
1733
1747
|
};
|
|
1734
1748
|
}
|
|
1735
1749
|
const Pl = function(e) {
|
|
@@ -1744,48 +1758,48 @@ const Pl = function(e) {
|
|
|
1744
1758
|
rects: i,
|
|
1745
1759
|
initialPlacement: u,
|
|
1746
1760
|
platform: c,
|
|
1747
|
-
elements:
|
|
1761
|
+
elements: a
|
|
1748
1762
|
} = t, {
|
|
1749
|
-
mainAxis:
|
|
1763
|
+
mainAxis: s = !0,
|
|
1750
1764
|
crossAxis: d = !0,
|
|
1751
|
-
fallbackPlacements:
|
|
1765
|
+
fallbackPlacements: m,
|
|
1752
1766
|
fallbackStrategy: f = "bestFit",
|
|
1753
|
-
fallbackAxisSideDirection:
|
|
1754
|
-
flipAlignment:
|
|
1767
|
+
fallbackAxisSideDirection: v = "none",
|
|
1768
|
+
flipAlignment: p = !0,
|
|
1755
1769
|
...b
|
|
1756
1770
|
} = He(e, t);
|
|
1757
1771
|
if ((l = r.arrow) != null && l.alignmentOffset)
|
|
1758
1772
|
return {};
|
|
1759
|
-
const
|
|
1760
|
-
!
|
|
1761
|
-
const
|
|
1762
|
-
let
|
|
1763
|
-
if (
|
|
1764
|
-
const se = kl(n, i,
|
|
1773
|
+
const g = ce(n), y = ce(u) === u, x = await (c.isRTL == null ? void 0 : c.isRTL(a.floating)), w = m || (y || !p ? [Ve(u)] : Sl(u));
|
|
1774
|
+
!m && v !== "none" && w.push(...Cl(u, p, v, x));
|
|
1775
|
+
const S = [u, ...w], _ = await On(t, b), C = [];
|
|
1776
|
+
let N = ((o = r.flip) == null ? void 0 : o.overflows) || [];
|
|
1777
|
+
if (s && C.push(_[g]), d) {
|
|
1778
|
+
const se = kl(n, i, x);
|
|
1765
1779
|
C.push(_[se[0]], _[se[1]]);
|
|
1766
1780
|
}
|
|
1767
|
-
if (
|
|
1781
|
+
if (N = [...N, {
|
|
1768
1782
|
placement: n,
|
|
1769
1783
|
overflows: C
|
|
1770
1784
|
}], !C.every((se) => se <= 0)) {
|
|
1771
1785
|
var re, _e;
|
|
1772
|
-
const se = (((re = r.flip) == null ? void 0 : re.index) || 0) + 1, bt =
|
|
1786
|
+
const se = (((re = r.flip) == null ? void 0 : re.index) || 0) + 1, bt = S[se];
|
|
1773
1787
|
if (bt)
|
|
1774
1788
|
return {
|
|
1775
1789
|
data: {
|
|
1776
1790
|
index: se,
|
|
1777
|
-
overflows:
|
|
1791
|
+
overflows: N
|
|
1778
1792
|
},
|
|
1779
1793
|
reset: {
|
|
1780
1794
|
placement: bt
|
|
1781
1795
|
}
|
|
1782
1796
|
};
|
|
1783
|
-
let we = (_e =
|
|
1797
|
+
let we = (_e = N.filter((fe) => fe.overflows[0] <= 0).sort((fe, pe) => fe.overflows[1] - pe.overflows[1])[0]) == null ? void 0 : _e.placement;
|
|
1784
1798
|
if (!we)
|
|
1785
1799
|
switch (f) {
|
|
1786
1800
|
case "bestFit": {
|
|
1787
1801
|
var gt;
|
|
1788
|
-
const fe = (gt =
|
|
1802
|
+
const fe = (gt = N.map((pe) => [pe.placement, pe.overflows.filter((ke) => ke > 0).reduce((ke, Ln) => ke + Ln, 0)]).sort((pe, ke) => pe[1] - ke[1])[0]) == null ? void 0 : gt[0];
|
|
1789
1803
|
fe && (we = fe);
|
|
1790
1804
|
break;
|
|
1791
1805
|
}
|
|
@@ -1809,11 +1823,11 @@ async function _l(e, t) {
|
|
|
1809
1823
|
placement: l,
|
|
1810
1824
|
platform: o,
|
|
1811
1825
|
elements: n
|
|
1812
|
-
} = e, r = await (o.isRTL == null ? void 0 : o.isRTL(n.floating)), i = ce(l), u = We(l), c = Ke(l) === "y",
|
|
1826
|
+
} = e, r = await (o.isRTL == null ? void 0 : o.isRTL(n.floating)), i = ce(l), u = We(l), c = Ke(l) === "y", a = ["left", "top"].includes(i) ? -1 : 1, s = r && c ? -1 : 1, d = He(t, e);
|
|
1813
1827
|
let {
|
|
1814
|
-
mainAxis:
|
|
1828
|
+
mainAxis: m,
|
|
1815
1829
|
crossAxis: f,
|
|
1816
|
-
alignmentAxis:
|
|
1830
|
+
alignmentAxis: v
|
|
1817
1831
|
} = typeof d == "number" ? {
|
|
1818
1832
|
mainAxis: d,
|
|
1819
1833
|
crossAxis: 0,
|
|
@@ -1824,12 +1838,12 @@ async function _l(e, t) {
|
|
|
1824
1838
|
alignmentAxis: null,
|
|
1825
1839
|
...d
|
|
1826
1840
|
};
|
|
1827
|
-
return u && typeof
|
|
1828
|
-
x: f *
|
|
1829
|
-
y:
|
|
1841
|
+
return u && typeof v == "number" && (f = u === "end" ? v * -1 : v), c ? {
|
|
1842
|
+
x: f * s,
|
|
1843
|
+
y: m * a
|
|
1830
1844
|
} : {
|
|
1831
|
-
x:
|
|
1832
|
-
y: f *
|
|
1845
|
+
x: m * a,
|
|
1846
|
+
y: f * s
|
|
1833
1847
|
};
|
|
1834
1848
|
}
|
|
1835
1849
|
const Tl = function(e) {
|
|
@@ -1869,39 +1883,39 @@ const Tl = function(e) {
|
|
|
1869
1883
|
limiter: u = {
|
|
1870
1884
|
fn: (b) => {
|
|
1871
1885
|
let {
|
|
1872
|
-
x:
|
|
1873
|
-
y
|
|
1886
|
+
x: g,
|
|
1887
|
+
y
|
|
1874
1888
|
} = b;
|
|
1875
1889
|
return {
|
|
1876
|
-
x:
|
|
1877
|
-
y
|
|
1890
|
+
x: g,
|
|
1891
|
+
y
|
|
1878
1892
|
};
|
|
1879
1893
|
}
|
|
1880
1894
|
},
|
|
1881
1895
|
...c
|
|
1882
|
-
} = He(e, t),
|
|
1896
|
+
} = He(e, t), a = {
|
|
1883
1897
|
x: l,
|
|
1884
1898
|
y: o
|
|
1885
|
-
},
|
|
1886
|
-
let f =
|
|
1899
|
+
}, s = await On(t, c), d = Ke(ce(n)), m = wn(d);
|
|
1900
|
+
let f = a[m], v = a[d];
|
|
1887
1901
|
if (r) {
|
|
1888
|
-
const b =
|
|
1889
|
-
f = Lt(
|
|
1902
|
+
const b = m === "y" ? "top" : "left", g = m === "y" ? "bottom" : "right", y = f + s[b], x = f - s[g];
|
|
1903
|
+
f = Lt(y, f, x);
|
|
1890
1904
|
}
|
|
1891
1905
|
if (i) {
|
|
1892
|
-
const b = d === "y" ? "top" : "left",
|
|
1893
|
-
|
|
1906
|
+
const b = d === "y" ? "top" : "left", g = d === "y" ? "bottom" : "right", y = v + s[b], x = v - s[g];
|
|
1907
|
+
v = Lt(y, v, x);
|
|
1894
1908
|
}
|
|
1895
|
-
const
|
|
1909
|
+
const p = u.fn({
|
|
1896
1910
|
...t,
|
|
1897
|
-
[
|
|
1898
|
-
[d]:
|
|
1911
|
+
[m]: f,
|
|
1912
|
+
[d]: v
|
|
1899
1913
|
});
|
|
1900
1914
|
return {
|
|
1901
|
-
...
|
|
1915
|
+
...p,
|
|
1902
1916
|
data: {
|
|
1903
|
-
x:
|
|
1904
|
-
y:
|
|
1917
|
+
x: p.x - l,
|
|
1918
|
+
y: p.y - o
|
|
1905
1919
|
}
|
|
1906
1920
|
};
|
|
1907
1921
|
}
|
|
@@ -1989,13 +2003,13 @@ function Cn(e) {
|
|
|
1989
2003
|
const t = ge(e);
|
|
1990
2004
|
return Ge(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Q(t) && Pe(t) ? t : Cn(t);
|
|
1991
2005
|
}
|
|
1992
|
-
function
|
|
2006
|
+
function Re(e, t, l) {
|
|
1993
2007
|
var o;
|
|
1994
2008
|
t === void 0 && (t = []), l === void 0 && (l = !0);
|
|
1995
2009
|
const n = Cn(e), r = n === ((o = e.ownerDocument) == null ? void 0 : o.body), i = H(n);
|
|
1996
|
-
return r ? t.concat(i, i.visualViewport || [], Pe(n) ? n : [], i.frameElement && l ?
|
|
2010
|
+
return r ? t.concat(i, i.visualViewport || [], Pe(n) ? n : [], i.frameElement && l ? Re(i.frameElement) : []) : t.concat(n, Re(n, [], l));
|
|
1997
2011
|
}
|
|
1998
|
-
function
|
|
2012
|
+
function En(e) {
|
|
1999
2013
|
const t = q(e);
|
|
2000
2014
|
let l = parseFloat(t.width) || 0, o = parseFloat(t.height) || 0;
|
|
2001
2015
|
const n = Q(e), r = n ? e.offsetWidth : l, i = n ? e.offsetHeight : o, u = Me(l) !== r || Me(o) !== i;
|
|
@@ -2016,7 +2030,7 @@ function ve(e) {
|
|
|
2016
2030
|
width: o,
|
|
2017
2031
|
height: n,
|
|
2018
2032
|
$: r
|
|
2019
|
-
} =
|
|
2033
|
+
} = En(t);
|
|
2020
2034
|
let i = (r ? Me(l.width) : l.width) / o, u = (r ? Me(l.height) : l.height) / n;
|
|
2021
2035
|
return (!i || !Number.isFinite(i)) && (i = 1), (!u || !Number.isFinite(u)) && (u = 1), {
|
|
2022
2036
|
x: i,
|
|
@@ -2024,7 +2038,7 @@ function ve(e) {
|
|
|
2024
2038
|
};
|
|
2025
2039
|
}
|
|
2026
2040
|
const Al = /* @__PURE__ */ ae(0);
|
|
2027
|
-
function
|
|
2041
|
+
function Rn(e) {
|
|
2028
2042
|
const t = H(e);
|
|
2029
2043
|
return !mt() || !t.visualViewport ? Al : {
|
|
2030
2044
|
x: t.visualViewport.offsetLeft,
|
|
@@ -2039,21 +2053,21 @@ function de(e, t, l, o) {
|
|
|
2039
2053
|
const n = e.getBoundingClientRect(), r = vt(e);
|
|
2040
2054
|
let i = ae(1);
|
|
2041
2055
|
t && (o ? oe(o) && (i = ve(o)) : i = ve(e));
|
|
2042
|
-
const u = Ml(r, l, o) ?
|
|
2043
|
-
let c = (n.left + u.x) / i.x,
|
|
2056
|
+
const u = Ml(r, l, o) ? Rn(r) : ae(0);
|
|
2057
|
+
let c = (n.left + u.x) / i.x, a = (n.top + u.y) / i.y, s = n.width / i.x, d = n.height / i.y;
|
|
2044
2058
|
if (r) {
|
|
2045
|
-
const
|
|
2046
|
-
let
|
|
2047
|
-
for (;
|
|
2048
|
-
const
|
|
2049
|
-
c *=
|
|
2059
|
+
const m = H(r), f = o && oe(o) ? H(o) : o;
|
|
2060
|
+
let v = m.frameElement;
|
|
2061
|
+
for (; v && o && f !== m; ) {
|
|
2062
|
+
const p = ve(v), b = v.getBoundingClientRect(), g = q(v), y = b.left + (v.clientLeft + parseFloat(g.paddingLeft)) * p.x, x = b.top + (v.clientTop + parseFloat(g.paddingTop)) * p.y;
|
|
2063
|
+
c *= p.x, a *= p.y, s *= p.x, d *= p.y, c += y, a += x, v = H(v).frameElement;
|
|
2050
2064
|
}
|
|
2051
2065
|
}
|
|
2052
|
-
return
|
|
2053
|
-
width:
|
|
2066
|
+
return Fe({
|
|
2067
|
+
width: s,
|
|
2054
2068
|
height: d,
|
|
2055
2069
|
x: c,
|
|
2056
|
-
y:
|
|
2070
|
+
y: a
|
|
2057
2071
|
});
|
|
2058
2072
|
}
|
|
2059
2073
|
function Vl(e) {
|
|
@@ -2071,8 +2085,8 @@ function Vl(e) {
|
|
|
2071
2085
|
}, u = ae(1);
|
|
2072
2086
|
const c = ae(0);
|
|
2073
2087
|
if ((n || !n && o !== "fixed") && ((ne(l) !== "body" || Pe(r)) && (i = qe(l)), Q(l))) {
|
|
2074
|
-
const
|
|
2075
|
-
u = ve(l), c.x =
|
|
2088
|
+
const a = de(l);
|
|
2089
|
+
u = ve(l), c.x = a.x + l.clientLeft, c.y = a.y + l.clientTop;
|
|
2076
2090
|
}
|
|
2077
2091
|
return {
|
|
2078
2092
|
width: t.width * u.x,
|
|
@@ -2081,13 +2095,13 @@ function Vl(e) {
|
|
|
2081
2095
|
y: t.y * u.y - i.scrollTop * u.y + c.y
|
|
2082
2096
|
};
|
|
2083
2097
|
}
|
|
2084
|
-
function
|
|
2098
|
+
function Fl(e) {
|
|
2085
2099
|
return Array.from(e.getClientRects());
|
|
2086
2100
|
}
|
|
2087
2101
|
function Dn(e) {
|
|
2088
2102
|
return de(le(e)).left + qe(e).scrollLeft;
|
|
2089
2103
|
}
|
|
2090
|
-
function
|
|
2104
|
+
function Nl(e) {
|
|
2091
2105
|
const t = le(e), l = qe(e), o = e.ownerDocument.body, n = ue(t.scrollWidth, t.clientWidth, o.scrollWidth, o.clientWidth), r = ue(t.scrollHeight, t.clientHeight, o.scrollHeight, o.clientHeight);
|
|
2092
2106
|
let i = -l.scrollLeft + Dn(e);
|
|
2093
2107
|
const u = -l.scrollTop;
|
|
@@ -2103,8 +2117,8 @@ function Bl(e, t) {
|
|
|
2103
2117
|
let r = o.clientWidth, i = o.clientHeight, u = 0, c = 0;
|
|
2104
2118
|
if (n) {
|
|
2105
2119
|
r = n.width, i = n.height;
|
|
2106
|
-
const
|
|
2107
|
-
(!
|
|
2120
|
+
const a = mt();
|
|
2121
|
+
(!a || a && t === "fixed") && (u = n.offsetLeft, c = n.offsetTop);
|
|
2108
2122
|
}
|
|
2109
2123
|
return {
|
|
2110
2124
|
width: r,
|
|
@@ -2114,12 +2128,12 @@ function Bl(e, t) {
|
|
|
2114
2128
|
};
|
|
2115
2129
|
}
|
|
2116
2130
|
function jl(e, t) {
|
|
2117
|
-
const l = de(e, !0, t === "fixed"), o = l.top + e.clientTop, n = l.left + e.clientLeft, r = Q(e) ? ve(e) : ae(1), i = e.clientWidth * r.x, u = e.clientHeight * r.y, c = n * r.x,
|
|
2131
|
+
const l = de(e, !0, t === "fixed"), o = l.top + e.clientTop, n = l.left + e.clientLeft, r = Q(e) ? ve(e) : ae(1), i = e.clientWidth * r.x, u = e.clientHeight * r.y, c = n * r.x, a = o * r.y;
|
|
2118
2132
|
return {
|
|
2119
2133
|
width: i,
|
|
2120
2134
|
height: u,
|
|
2121
2135
|
x: c,
|
|
2122
|
-
y:
|
|
2136
|
+
y: a
|
|
2123
2137
|
};
|
|
2124
2138
|
}
|
|
2125
2139
|
function At(e, t, l) {
|
|
@@ -2127,18 +2141,18 @@ function At(e, t, l) {
|
|
|
2127
2141
|
if (t === "viewport")
|
|
2128
2142
|
o = Bl(e, l);
|
|
2129
2143
|
else if (t === "document")
|
|
2130
|
-
o =
|
|
2144
|
+
o = Nl(le(e));
|
|
2131
2145
|
else if (oe(t))
|
|
2132
2146
|
o = jl(t, l);
|
|
2133
2147
|
else {
|
|
2134
|
-
const n =
|
|
2148
|
+
const n = Rn(e);
|
|
2135
2149
|
o = {
|
|
2136
2150
|
...t,
|
|
2137
2151
|
x: t.x - n.x,
|
|
2138
2152
|
y: t.y - n.y
|
|
2139
2153
|
};
|
|
2140
2154
|
}
|
|
2141
|
-
return
|
|
2155
|
+
return Fe(o);
|
|
2142
2156
|
}
|
|
2143
2157
|
function Pn(e, t) {
|
|
2144
2158
|
const l = ge(e);
|
|
@@ -2148,12 +2162,12 @@ function zl(e, t) {
|
|
|
2148
2162
|
const l = t.get(e);
|
|
2149
2163
|
if (l)
|
|
2150
2164
|
return l;
|
|
2151
|
-
let o =
|
|
2165
|
+
let o = Re(e, [], !1).filter((u) => oe(u) && ne(u) !== "body"), n = null;
|
|
2152
2166
|
const r = q(e).position === "fixed";
|
|
2153
2167
|
let i = r ? ge(e) : e;
|
|
2154
2168
|
for (; oe(i) && !Ge(i); ) {
|
|
2155
2169
|
const u = q(i), c = pt(i);
|
|
2156
|
-
!c && u.position === "fixed" && (n = null), (r ? !c && !n : !c && u.position === "static" && !!n && ["absolute", "fixed"].includes(n.position) || Pe(i) && !c && Pn(e, i)) ? o = o.filter((
|
|
2170
|
+
!c && u.position === "fixed" && (n = null), (r ? !c && !n : !c && u.position === "static" && !!n && ["absolute", "fixed"].includes(n.position) || Pe(i) && !c && Pn(e, i)) ? o = o.filter((s) => s !== i) : n = u, i = ge(i);
|
|
2157
2171
|
}
|
|
2158
2172
|
return t.set(e, o), o;
|
|
2159
2173
|
}
|
|
@@ -2164,9 +2178,9 @@ function Ul(e) {
|
|
|
2164
2178
|
rootBoundary: o,
|
|
2165
2179
|
strategy: n
|
|
2166
2180
|
} = e;
|
|
2167
|
-
const i = [...l === "clippingAncestors" ? zl(t, this._c) : [].concat(l), o], u = i[0], c = i.reduce((
|
|
2168
|
-
const d = At(t,
|
|
2169
|
-
return
|
|
2181
|
+
const i = [...l === "clippingAncestors" ? zl(t, this._c) : [].concat(l), o], u = i[0], c = i.reduce((a, s) => {
|
|
2182
|
+
const d = At(t, s, n);
|
|
2183
|
+
return a.top = ue(d.top, a.top), a.right = Ae(d.right, a.right), a.bottom = Ae(d.bottom, a.bottom), a.left = ue(d.left, a.left), a;
|
|
2170
2184
|
}, At(t, u, n));
|
|
2171
2185
|
return {
|
|
2172
2186
|
width: c.right - c.left,
|
|
@@ -2179,7 +2193,7 @@ function Hl(e) {
|
|
|
2179
2193
|
const {
|
|
2180
2194
|
width: t,
|
|
2181
2195
|
height: l
|
|
2182
|
-
} =
|
|
2196
|
+
} = En(e);
|
|
2183
2197
|
return {
|
|
2184
2198
|
width: t,
|
|
2185
2199
|
height: l
|
|
@@ -2194,8 +2208,8 @@ function Wl(e, t, l) {
|
|
|
2194
2208
|
const c = ae(0);
|
|
2195
2209
|
if (o || !o && !r)
|
|
2196
2210
|
if ((ne(t) !== "body" || Pe(n)) && (u = qe(t)), o) {
|
|
2197
|
-
const
|
|
2198
|
-
c.x =
|
|
2211
|
+
const a = de(t, !0, r, t);
|
|
2212
|
+
c.x = a.x + t.clientLeft, c.y = a.y + t.clientTop;
|
|
2199
2213
|
} else
|
|
2200
2214
|
n && (c.x = Dn(n));
|
|
2201
2215
|
return {
|
|
@@ -2242,7 +2256,7 @@ const ql = {
|
|
|
2242
2256
|
getClippingRect: Ul,
|
|
2243
2257
|
getOffsetParent: _n,
|
|
2244
2258
|
getElementRects: Kl,
|
|
2245
|
-
getClientRects:
|
|
2259
|
+
getClientRects: Fl,
|
|
2246
2260
|
getDimensions: Hl,
|
|
2247
2261
|
getScale: ve,
|
|
2248
2262
|
isElement: oe,
|
|
@@ -2257,37 +2271,37 @@ function Xl(e, t) {
|
|
|
2257
2271
|
function i(u, c) {
|
|
2258
2272
|
u === void 0 && (u = !1), c === void 0 && (c = 1), r();
|
|
2259
2273
|
const {
|
|
2260
|
-
left:
|
|
2261
|
-
top:
|
|
2274
|
+
left: a,
|
|
2275
|
+
top: s,
|
|
2262
2276
|
width: d,
|
|
2263
|
-
height:
|
|
2277
|
+
height: m
|
|
2264
2278
|
} = e.getBoundingClientRect();
|
|
2265
|
-
if (u || t(), !d || !
|
|
2279
|
+
if (u || t(), !d || !m)
|
|
2266
2280
|
return;
|
|
2267
|
-
const f = Ie(
|
|
2268
|
-
rootMargin: -f + "px " + -
|
|
2281
|
+
const f = Ie(s), v = Ie(n.clientWidth - (a + d)), p = Ie(n.clientHeight - (s + m)), b = Ie(a), y = {
|
|
2282
|
+
rootMargin: -f + "px " + -v + "px " + -p + "px " + -b + "px",
|
|
2269
2283
|
threshold: ue(0, Ae(1, c)) || 1
|
|
2270
2284
|
};
|
|
2271
|
-
let
|
|
2272
|
-
function
|
|
2273
|
-
const _ =
|
|
2285
|
+
let x = !0;
|
|
2286
|
+
function w(S) {
|
|
2287
|
+
const _ = S[0].intersectionRatio;
|
|
2274
2288
|
if (_ !== c) {
|
|
2275
|
-
if (!
|
|
2289
|
+
if (!x)
|
|
2276
2290
|
return i();
|
|
2277
2291
|
_ ? i(!1, _) : o = setTimeout(() => {
|
|
2278
2292
|
i(!1, 1e-7);
|
|
2279
2293
|
}, 100);
|
|
2280
2294
|
}
|
|
2281
|
-
|
|
2295
|
+
x = !1;
|
|
2282
2296
|
}
|
|
2283
2297
|
try {
|
|
2284
|
-
l = new IntersectionObserver(
|
|
2285
|
-
...
|
|
2298
|
+
l = new IntersectionObserver(w, {
|
|
2299
|
+
...y,
|
|
2286
2300
|
// Handle <iframe>s
|
|
2287
2301
|
root: n.ownerDocument
|
|
2288
2302
|
});
|
|
2289
2303
|
} catch {
|
|
2290
|
-
l = new IntersectionObserver(
|
|
2304
|
+
l = new IntersectionObserver(w, y);
|
|
2291
2305
|
}
|
|
2292
2306
|
l.observe(e);
|
|
2293
2307
|
}
|
|
@@ -2301,30 +2315,30 @@ function Yl(e, t, l, o) {
|
|
|
2301
2315
|
elementResize: i = typeof ResizeObserver == "function",
|
|
2302
2316
|
layoutShift: u = typeof IntersectionObserver == "function",
|
|
2303
2317
|
animationFrame: c = !1
|
|
2304
|
-
} = o,
|
|
2305
|
-
|
|
2306
|
-
n &&
|
|
2318
|
+
} = o, a = vt(e), s = n || r ? [...a ? Re(a) : [], ...Re(t)] : [];
|
|
2319
|
+
s.forEach((g) => {
|
|
2320
|
+
n && g.addEventListener("scroll", l, {
|
|
2307
2321
|
passive: !0
|
|
2308
|
-
}), r &&
|
|
2322
|
+
}), r && g.addEventListener("resize", l);
|
|
2309
2323
|
});
|
|
2310
|
-
const d =
|
|
2311
|
-
let
|
|
2312
|
-
i && (f = new ResizeObserver((
|
|
2313
|
-
let [
|
|
2314
|
-
|
|
2324
|
+
const d = a && u ? Xl(a, l) : null;
|
|
2325
|
+
let m = -1, f = null;
|
|
2326
|
+
i && (f = new ResizeObserver((g) => {
|
|
2327
|
+
let [y] = g;
|
|
2328
|
+
y && y.target === a && f && (f.unobserve(t), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
|
|
2315
2329
|
f && f.observe(t);
|
|
2316
2330
|
})), l();
|
|
2317
|
-
}),
|
|
2318
|
-
let
|
|
2331
|
+
}), a && !c && f.observe(a), f.observe(t));
|
|
2332
|
+
let v, p = c ? de(e) : null;
|
|
2319
2333
|
c && b();
|
|
2320
2334
|
function b() {
|
|
2321
|
-
const
|
|
2322
|
-
|
|
2335
|
+
const g = de(e);
|
|
2336
|
+
p && (g.x !== p.x || g.y !== p.y || g.width !== p.width || g.height !== p.height) && l(), p = g, v = requestAnimationFrame(b);
|
|
2323
2337
|
}
|
|
2324
2338
|
return l(), () => {
|
|
2325
|
-
|
|
2326
|
-
n &&
|
|
2327
|
-
}), d && d(), f && f.disconnect(), f = null, c && cancelAnimationFrame(
|
|
2339
|
+
s.forEach((g) => {
|
|
2340
|
+
n && g.removeEventListener("scroll", l), r && g.removeEventListener("resize", l);
|
|
2341
|
+
}), d && d(), f && f.disconnect(), f = null, c && cancelAnimationFrame(v);
|
|
2328
2342
|
};
|
|
2329
2343
|
}
|
|
2330
2344
|
const Zl = Ll, Ql = Pl, Jl = (e, t, l) => {
|
|
@@ -2353,86 +2367,86 @@ function Vt(e) {
|
|
|
2353
2367
|
function Tn(e) {
|
|
2354
2368
|
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
2355
2369
|
}
|
|
2356
|
-
function
|
|
2370
|
+
function Ft(e, t) {
|
|
2357
2371
|
const l = Tn(e);
|
|
2358
2372
|
return Math.round(t * l) / l;
|
|
2359
2373
|
}
|
|
2360
2374
|
function tr(e, t, l) {
|
|
2361
2375
|
l === void 0 && (l = {});
|
|
2362
|
-
const o = l.whileElementsMounted, n =
|
|
2376
|
+
const o = l.whileElementsMounted, n = k(() => {
|
|
2363
2377
|
var C;
|
|
2364
2378
|
return (C = P(l.open)) != null ? C : !0;
|
|
2365
|
-
}), r =
|
|
2379
|
+
}), r = k(() => P(l.middleware)), i = k(() => {
|
|
2366
2380
|
var C;
|
|
2367
2381
|
return (C = P(l.placement)) != null ? C : "bottom";
|
|
2368
|
-
}), u =
|
|
2382
|
+
}), u = k(() => {
|
|
2369
2383
|
var C;
|
|
2370
2384
|
return (C = P(l.strategy)) != null ? C : "absolute";
|
|
2371
|
-
}), c =
|
|
2385
|
+
}), c = k(() => {
|
|
2372
2386
|
var C;
|
|
2373
2387
|
return (C = P(l.transform)) != null ? C : !0;
|
|
2374
|
-
}),
|
|
2388
|
+
}), a = k(() => Vt(e.value)), s = k(() => Vt(t.value)), d = O(0), m = O(0), f = O(u.value), v = O(i.value), p = Vn({}), b = O(!1), g = k(() => {
|
|
2375
2389
|
const C = {
|
|
2376
2390
|
position: f.value,
|
|
2377
2391
|
left: "0",
|
|
2378
2392
|
top: "0"
|
|
2379
2393
|
};
|
|
2380
|
-
if (!
|
|
2394
|
+
if (!s.value)
|
|
2381
2395
|
return C;
|
|
2382
|
-
const
|
|
2396
|
+
const N = Ft(s.value, d.value), re = Ft(s.value, m.value);
|
|
2383
2397
|
return c.value ? {
|
|
2384
2398
|
...C,
|
|
2385
|
-
transform: "translate(" +
|
|
2386
|
-
...Tn(
|
|
2399
|
+
transform: "translate(" + N + "px, " + re + "px)",
|
|
2400
|
+
...Tn(s.value) >= 1.5 && {
|
|
2387
2401
|
willChange: "transform"
|
|
2388
2402
|
}
|
|
2389
2403
|
} : {
|
|
2390
2404
|
position: f.value,
|
|
2391
|
-
left:
|
|
2405
|
+
left: N + "px",
|
|
2392
2406
|
top: re + "px"
|
|
2393
2407
|
};
|
|
2394
2408
|
});
|
|
2395
|
-
let
|
|
2396
|
-
function
|
|
2397
|
-
|
|
2409
|
+
let y;
|
|
2410
|
+
function x() {
|
|
2411
|
+
a.value == null || s.value == null || Jl(a.value, s.value, {
|
|
2398
2412
|
middleware: r.value,
|
|
2399
2413
|
placement: i.value,
|
|
2400
2414
|
strategy: u.value
|
|
2401
2415
|
}).then((C) => {
|
|
2402
|
-
d.value = C.x,
|
|
2416
|
+
d.value = C.x, m.value = C.y, f.value = C.strategy, v.value = C.placement, p.value = C.middlewareData, b.value = !0;
|
|
2403
2417
|
});
|
|
2404
2418
|
}
|
|
2405
|
-
function
|
|
2406
|
-
typeof
|
|
2419
|
+
function w() {
|
|
2420
|
+
typeof y == "function" && (y(), y = void 0);
|
|
2407
2421
|
}
|
|
2408
|
-
function
|
|
2409
|
-
if (
|
|
2410
|
-
|
|
2422
|
+
function S() {
|
|
2423
|
+
if (w(), o === void 0) {
|
|
2424
|
+
x();
|
|
2411
2425
|
return;
|
|
2412
2426
|
}
|
|
2413
|
-
if (
|
|
2414
|
-
|
|
2427
|
+
if (a.value != null && s.value != null) {
|
|
2428
|
+
y = o(a.value, s.value, x);
|
|
2415
2429
|
return;
|
|
2416
2430
|
}
|
|
2417
2431
|
}
|
|
2418
2432
|
function _() {
|
|
2419
2433
|
n.value || (b.value = !1);
|
|
2420
2434
|
}
|
|
2421
|
-
return Z([r, i, u],
|
|
2435
|
+
return Z([r, i, u], x, {
|
|
2422
2436
|
flush: "sync"
|
|
2423
|
-
}), Z([
|
|
2437
|
+
}), Z([a, s], S, {
|
|
2424
2438
|
flush: "sync"
|
|
2425
2439
|
}), Z(n, _, {
|
|
2426
2440
|
flush: "sync"
|
|
2427
|
-
}),
|
|
2441
|
+
}), Fn() && Nn(w), {
|
|
2428
2442
|
x: me(d),
|
|
2429
|
-
y: me(
|
|
2443
|
+
y: me(m),
|
|
2430
2444
|
strategy: me(f),
|
|
2431
|
-
placement: me(
|
|
2432
|
-
middlewareData: me(
|
|
2445
|
+
placement: me(v),
|
|
2446
|
+
middlewareData: me(p),
|
|
2433
2447
|
isPositioned: me(b),
|
|
2434
|
-
floatingStyles:
|
|
2435
|
-
update:
|
|
2448
|
+
floatingStyles: g,
|
|
2449
|
+
update: x
|
|
2436
2450
|
};
|
|
2437
2451
|
}
|
|
2438
2452
|
const _r = /* @__PURE__ */ $({
|
|
@@ -2447,19 +2461,19 @@ const _r = /* @__PURE__ */ $({
|
|
|
2447
2461
|
whileElementsMounted: Yl,
|
|
2448
2462
|
middleware: [Tl(6), Ql(), Zl({ padding: 6 })]
|
|
2449
2463
|
});
|
|
2450
|
-
return (i, u) => (
|
|
2464
|
+
return (i, u) => (E(), K(P(ml), {
|
|
2451
2465
|
as: "div",
|
|
2452
2466
|
class: "inline-block text-left"
|
|
2453
2467
|
}, {
|
|
2454
2468
|
default: W(() => [
|
|
2455
|
-
|
|
2469
|
+
F(P(vl), {
|
|
2456
2470
|
class: "focus:outline-none",
|
|
2457
2471
|
ref_key: "reference",
|
|
2458
2472
|
ref: l
|
|
2459
2473
|
}, {
|
|
2460
2474
|
default: W(() => [
|
|
2461
2475
|
ht(i.$slots, "button", {}, () => [
|
|
2462
|
-
|
|
2476
|
+
F(P(U), {
|
|
2463
2477
|
class: "fill-current",
|
|
2464
2478
|
name: "ellipsis-h"
|
|
2465
2479
|
})
|
|
@@ -2467,17 +2481,17 @@ const _r = /* @__PURE__ */ $({
|
|
|
2467
2481
|
]),
|
|
2468
2482
|
_: 3
|
|
2469
2483
|
}, 512),
|
|
2470
|
-
(
|
|
2484
|
+
(E(), K(Bn, {
|
|
2471
2485
|
to: typeof i.usePortal == "string" ? i.usePortal : "body",
|
|
2472
2486
|
disabled: !i.usePortal
|
|
2473
2487
|
}, [
|
|
2474
2488
|
I("div", {
|
|
2475
2489
|
class: "w-56",
|
|
2476
|
-
style:
|
|
2490
|
+
style: Nt(P(r)),
|
|
2477
2491
|
ref_key: "floating",
|
|
2478
2492
|
ref: o
|
|
2479
2493
|
}, [
|
|
2480
|
-
|
|
2494
|
+
F(Bt, {
|
|
2481
2495
|
"enter-active-class": "transition duration-200 ease-in-out",
|
|
2482
2496
|
"enter-from-class": "transform -translate-y-4 opacity-0",
|
|
2483
2497
|
"enter-to-class": "transform opacity-100",
|
|
@@ -2486,7 +2500,7 @@ const _r = /* @__PURE__ */ $({
|
|
|
2486
2500
|
"leave-to-class": "transform -translate-y-2 opacity-0"
|
|
2487
2501
|
}, {
|
|
2488
2502
|
default: W(() => [
|
|
2489
|
-
|
|
2503
|
+
F(P(gl), {
|
|
2490
2504
|
class: A([
|
|
2491
2505
|
"z-40 mt-1 p-1 bg-white rounded shadow-lg text-grey-700 focus:outline-none w-full"
|
|
2492
2506
|
])
|
|
@@ -2517,9 +2531,9 @@ const _r = /* @__PURE__ */ $({
|
|
|
2517
2531
|
as: {}
|
|
2518
2532
|
},
|
|
2519
2533
|
setup(e) {
|
|
2520
|
-
return (t, l) => (
|
|
2534
|
+
return (t, l) => (E(), K(P(bl), jn(zn({ disabled: t.disabled })), {
|
|
2521
2535
|
default: W(({ active: o }) => [
|
|
2522
|
-
(
|
|
2536
|
+
(E(), K(Un(t.as || "span"), {
|
|
2523
2537
|
class: A(["flex items-center justify-between px-4 py-2 text-xs leading-5 transition-colors duration-100 rounded-lg", [
|
|
2524
2538
|
o ? "bg-grey-200" : "",
|
|
2525
2539
|
t.disabled ? "opacity-50 pointer-events-none" : "hover:bg-grey-200 focus:bg-grey-200 focus:outline-none"
|
|
@@ -2527,7 +2541,7 @@ const _r = /* @__PURE__ */ $({
|
|
|
2527
2541
|
}, {
|
|
2528
2542
|
default: W(() => [
|
|
2529
2543
|
I("span", null, B(t.label), 1),
|
|
2530
|
-
t.meta ? (
|
|
2544
|
+
t.meta ? (E(), T("span", nr, B(t.meta), 1)) : M("", !0)
|
|
2531
2545
|
]),
|
|
2532
2546
|
_: 2
|
|
2533
2547
|
}, 1032, ["class"]))
|
|
@@ -2564,33 +2578,33 @@ const _r = /* @__PURE__ */ $({
|
|
|
2564
2578
|
return Z(
|
|
2565
2579
|
() => l.modelValue,
|
|
2566
2580
|
(c) => {
|
|
2567
|
-
var
|
|
2568
|
-
c && c.id !== ((
|
|
2581
|
+
var a;
|
|
2582
|
+
c && c.id !== ((a = o.value) == null ? void 0 : a.id) && (o.value = c);
|
|
2569
2583
|
}
|
|
2570
2584
|
), Z(o, (c) => {
|
|
2571
2585
|
c && n("update:modelValue", c);
|
|
2572
|
-
}), (c,
|
|
2586
|
+
}), (c, a) => (E(), K(P(al), {
|
|
2573
2587
|
as: "div",
|
|
2574
2588
|
modelValue: P(o),
|
|
2575
|
-
"onUpdate:modelValue":
|
|
2589
|
+
"onUpdate:modelValue": a[0] || (a[0] = (s) => Hn(o) ? o.value = s : null),
|
|
2576
2590
|
disabled: c.isDisabled
|
|
2577
2591
|
}, {
|
|
2578
2592
|
default: W(() => [
|
|
2579
2593
|
I("div", or, [
|
|
2580
|
-
|
|
2594
|
+
F(P(sl), {
|
|
2581
2595
|
class: A(["w-full mono-50 bg-white text-grey-800 placeholder-grey-600 border border-grey-300 dark:bg-grey-800 dark:text-grey-100 dark:placeholder-grey-400 dark:border-grey-700 focus:ring-2 focus:border-blue-400 focus:ring-blue-400 focus:outline-none dark:focus:border-blue-800 dark:focus:ring-blue-800 cursor-default rounded font-normal text-left", [P(r), P(u), P(i)]])
|
|
2582
2596
|
}, {
|
|
2583
2597
|
default: W(() => {
|
|
2584
|
-
var
|
|
2598
|
+
var s;
|
|
2585
2599
|
return [
|
|
2586
|
-
c.icon ? (
|
|
2587
|
-
|
|
2588
|
-
name: ((
|
|
2600
|
+
c.icon ? (E(), T("span", lr, [
|
|
2601
|
+
F(U, {
|
|
2602
|
+
name: ((s = P(o)) == null ? void 0 : s.icon) ?? c.icon
|
|
2589
2603
|
}, null, 8, ["name"])
|
|
2590
2604
|
])) : M("", !0),
|
|
2591
|
-
P(o) ? (
|
|
2605
|
+
P(o) ? (E(), T("span", rr, B(P(o).label), 1)) : (E(), T("span", ir, B(c.placeholder), 1)),
|
|
2592
2606
|
I("span", ar, [
|
|
2593
|
-
|
|
2607
|
+
F(U, {
|
|
2594
2608
|
class: "text-grey-400",
|
|
2595
2609
|
name: "chevron-down",
|
|
2596
2610
|
"aria-hidden": "true"
|
|
@@ -2600,52 +2614,52 @@ const _r = /* @__PURE__ */ $({
|
|
|
2600
2614
|
}),
|
|
2601
2615
|
_: 1
|
|
2602
2616
|
}, 8, ["class"]),
|
|
2603
|
-
|
|
2617
|
+
F(Bt, {
|
|
2604
2618
|
"leave-active-class": "transition ease-in duration-100",
|
|
2605
2619
|
"leave-from-class": "opacity-100",
|
|
2606
2620
|
"leave-to-class": "opacity-0"
|
|
2607
2621
|
}, {
|
|
2608
2622
|
default: W(() => [
|
|
2609
|
-
|
|
2623
|
+
F(P(ul), { class: "absolute z-10 mt-1 w-full bg-white dark:bg-grey-700 dark:text-grey-50 shadow-lg max-h-60 rounded-md py-1 text-base ring-1 ring-black ring-opacity-5 overflow-auto focus:outline-none sm:text-sm" }, {
|
|
2610
2624
|
default: W(() => [
|
|
2611
|
-
(
|
|
2625
|
+
(E(!0), T(be, null, jt(c.options, (s) => (E(), K(P(cl), {
|
|
2612
2626
|
as: "template",
|
|
2613
|
-
key:
|
|
2614
|
-
value:
|
|
2615
|
-
disabled:
|
|
2627
|
+
key: s.id,
|
|
2628
|
+
value: s,
|
|
2629
|
+
disabled: s.disabled
|
|
2616
2630
|
}, {
|
|
2617
|
-
default: W(({ active: d, selected:
|
|
2631
|
+
default: W(({ active: d, selected: m }) => [
|
|
2618
2632
|
I("li", {
|
|
2619
2633
|
class: A([
|
|
2620
2634
|
d ? "text-white bg-blue-500" : "text-grey-900 dark:text-grey-50",
|
|
2621
2635
|
"cursor-default select-none relative py-2 pl-3 pr-12",
|
|
2622
|
-
{ "opacity-50 bg-grey-100":
|
|
2636
|
+
{ "opacity-50 bg-grey-100": s.disabled }
|
|
2623
2637
|
])
|
|
2624
2638
|
}, [
|
|
2625
2639
|
I("div", sr, [
|
|
2626
|
-
|
|
2640
|
+
s.disabled && c.disabledBadge ? (E(), T("span", ur, B(c.disabledBadge), 1)) : M("", !0)
|
|
2627
2641
|
]),
|
|
2628
2642
|
I("span", {
|
|
2629
2643
|
class: A([
|
|
2630
|
-
|
|
2644
|
+
m ? "font-semibold" : "font-normal",
|
|
2631
2645
|
"block truncate"
|
|
2632
2646
|
])
|
|
2633
2647
|
}, [
|
|
2634
|
-
|
|
2648
|
+
s.icon ? (E(), K(U, {
|
|
2635
2649
|
key: 0,
|
|
2636
2650
|
class: "inline-block mr-1",
|
|
2637
|
-
name:
|
|
2651
|
+
name: s.icon
|
|
2638
2652
|
}, null, 8, ["name"])) : M("", !0),
|
|
2639
|
-
Wn(" " + B(
|
|
2653
|
+
Wn(" " + B(s.label), 1)
|
|
2640
2654
|
], 2),
|
|
2641
|
-
|
|
2655
|
+
m ? (E(), T("span", {
|
|
2642
2656
|
key: 0,
|
|
2643
2657
|
class: A([
|
|
2644
2658
|
d ? "text-blue-100" : "text-blue-500",
|
|
2645
2659
|
"absolute inset-y-0 right-0 flex items-center pr-4"
|
|
2646
2660
|
])
|
|
2647
2661
|
}, [
|
|
2648
|
-
|
|
2662
|
+
F(U, {
|
|
2649
2663
|
name: "check",
|
|
2650
2664
|
class: "h-5 w-5",
|
|
2651
2665
|
"aria-hidden": "true"
|
|
@@ -2693,24 +2707,24 @@ const _r = /* @__PURE__ */ $({
|
|
|
2693
2707
|
margin: `mr-${o[Math.floor(Math.random() * o.length)]}`
|
|
2694
2708
|
};
|
|
2695
2709
|
});
|
|
2696
|
-
return (o, n) => (
|
|
2710
|
+
return (o, n) => (E(), T("div", cr, [
|
|
2697
2711
|
I("div", dr, [
|
|
2698
|
-
o.avatar ? (
|
|
2699
|
-
o.title ? (
|
|
2712
|
+
o.avatar ? (E(), T("div", fr)) : M("", !0),
|
|
2713
|
+
o.title ? (E(), T("div", pr)) : M("", !0)
|
|
2700
2714
|
]),
|
|
2701
|
-
o.lines > 0 ? (
|
|
2702
|
-
(
|
|
2715
|
+
o.lines > 0 ? (E(), T("div", mr, [
|
|
2716
|
+
(E(!0), T(be, null, jt(P(l), (r, i) => (E(), T("div", {
|
|
2703
2717
|
class: A(["h-4 bg-current rounded-lg", r.margin]),
|
|
2704
2718
|
key: i
|
|
2705
2719
|
}, null, 2))), 128))
|
|
2706
2720
|
])) : M("", !0),
|
|
2707
|
-
o.footer ? (
|
|
2721
|
+
o.footer ? (E(), T("div", vr)) : M("", !0)
|
|
2708
2722
|
]));
|
|
2709
2723
|
}
|
|
2710
2724
|
}), $r = /* @__PURE__ */ $({
|
|
2711
2725
|
__name: "Spinner",
|
|
2712
2726
|
setup(e) {
|
|
2713
|
-
return (t, l) => (
|
|
2727
|
+
return (t, l) => (E(), K(P(U), {
|
|
2714
2728
|
class: "animate-spin",
|
|
2715
2729
|
name: "circle-notch"
|
|
2716
2730
|
}));
|
|
@@ -2730,13 +2744,13 @@ const _r = /* @__PURE__ */ $({
|
|
|
2730
2744
|
},
|
|
2731
2745
|
emits: ["onClick", "onClickSplit"],
|
|
2732
2746
|
setup(e, { emit: t }) {
|
|
2733
|
-
const l = t, o = e, n =
|
|
2734
|
-
const
|
|
2747
|
+
const l = t, o = e, n = k(() => {
|
|
2748
|
+
const a = {
|
|
2735
2749
|
"text-white bg-blue-600 border-transparent hover:bg-blue-700 active:bg-blue-700 dark:ring-blue-800 ring-offset-2 dark:ring-offset-grey-900": o.color === "primary",
|
|
2736
2750
|
"text-blue-600 bg-grey-100 border-transparent hover:bg-blue-100 hover:text-blue-700 active:bg-grey-100 ring-blue-300 ring-offset-2 dark:ring-offset-grey-900": o.color === "light",
|
|
2737
2751
|
"text-grey-50 bg-grey-700 border-transparent hover:bg-grey-800 active:bg-grey-700 ring-grey-500 dark:ring-grey-400 dark:ring-opacity-50 ring-offset-2 dark:ring-offset-grey-900": o.color === "dark",
|
|
2738
2752
|
"text-red-50 bg-red-500 border-transparent hover:bg-red-600 active:bg-red-600 ring-red-400 dark:ring-red-400 dark:ring-opacity-50 ring-offset-2 dark:ring-offset-red-900": o.color === "danger"
|
|
2739
|
-
},
|
|
2753
|
+
}, s = {
|
|
2740
2754
|
"px-4 py-1 text-xs leading-5 mono-100": o.size === "small",
|
|
2741
2755
|
"px-5 py-2 text-sm leading-4 font-medium": o.size === "medium",
|
|
2742
2756
|
"px-8 pr-4 py-3 text-base leading-6 font-medium": o.size === "large"
|
|
@@ -2744,26 +2758,26 @@ const _r = /* @__PURE__ */ $({
|
|
|
2744
2758
|
"pointer-events-none opacity-75 cursor-not-allowed": o.isDisabled
|
|
2745
2759
|
};
|
|
2746
2760
|
return {
|
|
2747
|
-
...
|
|
2761
|
+
...a,
|
|
2748
2762
|
...d,
|
|
2749
|
-
...
|
|
2763
|
+
...s
|
|
2750
2764
|
};
|
|
2751
|
-
}), r =
|
|
2752
|
-
const
|
|
2765
|
+
}), r = k(() => {
|
|
2766
|
+
const a = {
|
|
2753
2767
|
"border-l-white/50 border-l": o.color === "primary",
|
|
2754
2768
|
"border-l-blue-100 border-l": o.color === "light",
|
|
2755
2769
|
"border-l-grey-600 border-l": o.color === "dark",
|
|
2756
2770
|
"border-l-red-600 border-l": o.color === "danger"
|
|
2757
|
-
},
|
|
2771
|
+
}, s = {
|
|
2758
2772
|
"pl-2 pr-3": o.size === "small",
|
|
2759
2773
|
"pl-3 pr-3": o.size === "medium",
|
|
2760
2774
|
"pl-4 pr-5": o.size === "large"
|
|
2761
2775
|
};
|
|
2762
2776
|
return {
|
|
2763
|
-
...
|
|
2764
|
-
...
|
|
2777
|
+
...a,
|
|
2778
|
+
...s
|
|
2765
2779
|
};
|
|
2766
|
-
}), i =
|
|
2780
|
+
}), i = k(() => ({
|
|
2767
2781
|
...{
|
|
2768
2782
|
"text-white": o.color === "primary",
|
|
2769
2783
|
"text-blue-600": o.color === "light",
|
|
@@ -2776,21 +2790,21 @@ const _r = /* @__PURE__ */ $({
|
|
|
2776
2790
|
function c() {
|
|
2777
2791
|
o.isDisabled || l("onClickSplit");
|
|
2778
2792
|
}
|
|
2779
|
-
return (
|
|
2793
|
+
return (a, s) => (E(), T("div", gr, [
|
|
2780
2794
|
I("button", {
|
|
2781
2795
|
type: "button",
|
|
2782
|
-
"aria-label":
|
|
2783
|
-
tabindex:
|
|
2796
|
+
"aria-label": a.label,
|
|
2797
|
+
tabindex: a.isDisabled ? "-1" : void 0,
|
|
2784
2798
|
class: A(["relative transition duration-150 ease-in-out rounded-l-lg", n.value]),
|
|
2785
2799
|
onClick: u
|
|
2786
2800
|
}, [
|
|
2787
2801
|
I("div", {
|
|
2788
|
-
class: A(!
|
|
2802
|
+
class: A(!a.isLoading || "invisible")
|
|
2789
2803
|
}, [
|
|
2790
|
-
I("span", null, B(
|
|
2804
|
+
I("span", null, B(a.label), 1)
|
|
2791
2805
|
], 2),
|
|
2792
|
-
|
|
2793
|
-
|
|
2806
|
+
a.isLoading ? (E(), T("span", hr, [
|
|
2807
|
+
F(U, {
|
|
2794
2808
|
class: "ml-3 animate-spin",
|
|
2795
2809
|
name: "circle-notch"
|
|
2796
2810
|
})
|
|
@@ -2801,9 +2815,9 @@ const _r = /* @__PURE__ */ $({
|
|
|
2801
2815
|
class: A(["border-l-white/50 border-l transition duration-150 ease-in-out rounded-r-lg", [n.value, r.value]]),
|
|
2802
2816
|
onClick: c
|
|
2803
2817
|
}, [
|
|
2804
|
-
|
|
2818
|
+
F(U, {
|
|
2805
2819
|
class: A([i.value]),
|
|
2806
|
-
name:
|
|
2820
|
+
name: a.icon
|
|
2807
2821
|
}, null, 8, ["class", "name"])
|
|
2808
2822
|
], 2)
|
|
2809
2823
|
]));
|
|
@@ -2823,7 +2837,7 @@ const _r = /* @__PURE__ */ $({
|
|
|
2823
2837
|
const l = t, o = (n) => {
|
|
2824
2838
|
l("update:modelValue", n), l("change", n);
|
|
2825
2839
|
};
|
|
2826
|
-
return (n, r) => (
|
|
2840
|
+
return (n, r) => (E(), K(P(yl), {
|
|
2827
2841
|
modelValue: n.modelValue,
|
|
2828
2842
|
label: n.label,
|
|
2829
2843
|
class: A([n.modelValue ? "bg-blue-700" : "bg-grey-700", "relative inline-flex items-center h-6 transition rounded-full w-14 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-grey-900 focus:ring-blue-300"]),
|
|
@@ -2856,19 +2870,19 @@ const _r = /* @__PURE__ */ $({
|
|
|
2856
2870
|
setup(e, { expose: t, emit: l }) {
|
|
2857
2871
|
const o = e, n = l, { inputClasses: r, disabledClasses: i, textSizeClasses: u } = rt(o), c = function(d) {
|
|
2858
2872
|
n("update:modelValue", (d == null ? void 0 : d.target).value);
|
|
2859
|
-
},
|
|
2873
|
+
}, a = O(null);
|
|
2860
2874
|
return t({
|
|
2861
2875
|
focus: () => {
|
|
2862
|
-
o.isDisabled ||
|
|
2876
|
+
o.isDisabled || a.value.focus();
|
|
2863
2877
|
}
|
|
2864
|
-
}), (d,
|
|
2878
|
+
}), (d, m) => (E(), T("div", xr, [
|
|
2865
2879
|
I("textarea", ot({
|
|
2866
2880
|
class: ["mono-50 bg-white text-grey-800 placeholder:text-grey-400 placeholder:font-normal border-grey-300 dark:bg-grey-800 dark:text-grey-100 dark:placeholder:text-grey-500 dark:border-grey-700 focus:border-blue-400 focus:ring-blue-400 dark:focus:border-blue-800 dark:focus:ring-blue-800 rounded", [P(r), P(u), P(i)]],
|
|
2867
2881
|
tabindex: d.isDisabled ? "-1" : void 0,
|
|
2868
2882
|
value: d.modelValue ?? ""
|
|
2869
2883
|
}, d.$attrs, {
|
|
2870
2884
|
ref_key: "input",
|
|
2871
|
-
ref:
|
|
2885
|
+
ref: a,
|
|
2872
2886
|
cols: "56",
|
|
2873
2887
|
rows: "8",
|
|
2874
2888
|
onInput: c
|
|
@@ -2878,8 +2892,8 @@ const _r = /* @__PURE__ */ $({
|
|
|
2878
2892
|
}
|
|
2879
2893
|
});
|
|
2880
2894
|
export {
|
|
2881
|
-
|
|
2882
|
-
|
|
2895
|
+
Er as D9Button,
|
|
2896
|
+
Rr as D9Checkbox,
|
|
2883
2897
|
U as D9Icon,
|
|
2884
2898
|
Dr as D9Input,
|
|
2885
2899
|
Pr as D9Label,
|