@deck9/ui 0.15.1 → 0.15.3
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/src/ui.mjs +438 -432
- package/dist/src/ui.umd.js +3 -3
- package/package.json +1 -1
package/dist/src/ui.mjs
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { defineComponent as A, computed as k, openBlock as R, createBlock as
|
|
2
|
-
import { FontAwesomeIcon as
|
|
1
|
+
import { defineComponent as A, computed as k, openBlock as R, createBlock as W, unref as _, mergeProps as ot, createCommentVNode as M, createElementBlock as L, normalizeClass as $, createElementVNode as T, toDisplayString as G, createVNode as F, ref as C, getCurrentInstance as In, onMounted as ee, watch as Q, Fragment as be, withDirectives as An, vModelText as $n, normalizeStyle as Nt, cloneVNode as Mn, h as Oe, inject as he, provide as ye, watchEffect as xe, nextTick as B, onUnmounted as Ne, toRaw as X, shallowRef as Vn, getCurrentScope as Fn, onScopeDispose as Nn, shallowReadonly as me, withCtx as U, renderSlot as ht, Teleport as Bn, Transition as Bt, normalizeProps as jn, guardReactiveProps as zn, resolveDynamicComponent as Hn, isRef as Un, renderList as jt } from "vue";
|
|
2
|
+
import { FontAwesomeIcon as Wn } from "@fortawesome/vue-fontawesome";
|
|
3
3
|
import { library as lt } from "@fortawesome/fontawesome-svg-core";
|
|
4
4
|
import * as p from "@fortawesome/free-solid-svg-icons";
|
|
5
5
|
import * as Se from "@fortawesome/free-brands-svg-icons";
|
|
6
|
-
var zt = "fas",
|
|
6
|
+
var zt = "fas", Ht = "numeric-input", Ut = 512, Wt = 512, Ze = [], Kt = "", Gt = "m409.445 111 2.112.004c34.066.146 46.74 3.848 59.517 10.681 13.037 6.973 23.268 17.204 30.24 30.241l.415.782c6.705 12.782 10.271 25.9 10.271 60.847v72.002c-.15 34.066-3.852 46.74-10.685 59.517-6.973 13.037-17.204 23.268-30.241 30.24l-.782.415C457.51 382.434 444.392 386 409.445 386h-306.89l-2.112-.004c-34.066-.146-46.74-3.848-59.517-10.681-13.037-6.973-23.268-17.204-30.24-30.241l-.415-.782C3.566 331.51 0 318.392 0 283.445v-69.89c0-35.66 3.713-48.592 10.685-61.629 6.973-13.037 17.204-23.268 30.241-30.24l.782-.415C54.49 114.566 67.608 111 102.555 111h306.89Zm.806 36H102.555l-2.387.005c-22.69.089-31.789 1.488-39.667 5.128l-.523.246c-.696.332-1.385.683-2.074 1.052-6.764 3.617-11.856 8.71-15.473 15.473l-.282.533c-4.492 8.62-6.116 17.401-6.148 43.312v71.502l.012 3.09c.161 24.044 1.9 32.308 6.418 40.755 3.617 6.764 8.71 11.856 15.473 15.473l.533.282c8.62 4.492 17.401 6.116 43.312 6.149h307.696c27.078 0 35.763-1.677 44.651-6.43 6.764-3.618 11.856-8.71 15.473-15.474l.282-.533c4.492-8.62 6.116-17.401 6.149-43.312v-70.696c0-27.078-1.677-35.763-6.43-44.651-3.618-6.764-8.71-11.856-15.474-15.473l-.533-.282c-8.62-4.492-17.401-6.116-43.312-6.149Zm-164.715 19c11.682 0 22.013 1.976 30.994 5.929 8.98 3.952 16.005 9.38 21.074 16.284 5.07 6.904 7.578 14.797 7.527 23.677.103 8.829-2.92 16.066-9.07 21.713-6.15 5.646-13.935 8.983-23.353 10.01v1.231c12.764 1.386 22.362 5.274 28.794 11.665 6.433 6.39 9.598 14.411 9.496 24.061.051 9.24-2.715 17.427-8.299 24.562-5.584 7.135-13.33 12.73-23.236 16.785-9.907 4.055-21.319 6.083-34.236 6.083-12.454 0-23.506-2.143-33.156-6.43-9.65-4.285-17.227-10.201-22.734-17.747-5.506-7.545-8.286-16.22-8.337-26.025h43.23c.051 3.029.99 5.737 2.817 8.124 1.827 2.386 4.336 4.247 7.527 5.582 3.19 1.334 6.845 2.002 10.962 2.002 3.962 0 7.462-.706 10.498-2.118 3.037-1.411 5.404-3.375 7.102-5.89 1.699-2.515 2.522-5.39 2.47-8.623.052-3.183-.913-6.006-2.894-8.47-1.982-2.464-4.748-4.389-8.299-5.775-3.55-1.386-7.642-2.079-12.274-2.079h-16.057v-29.566h16.057c4.271 0 8.041-.693 11.31-2.08 3.267-1.385 5.815-3.31 7.642-5.774s2.714-5.287 2.663-8.47c.051-3.08-.695-5.8-2.239-8.161-1.544-2.361-3.692-4.21-6.446-5.544-2.753-1.334-5.93-2.002-9.533-2.002-3.912 0-7.398.693-10.46 2.08-3.063 1.385-5.468 3.31-7.218 5.774s-2.65 5.287-2.702 8.47h-41.068c.051-9.65 2.715-18.172 7.99-25.563 5.275-7.392 12.518-13.192 21.73-17.401 9.212-4.21 19.788-6.314 31.728-6.314Zm-133.074 0c12.615 0 23.55 2.017 32.807 6.05 9.257 4.033 16.41 9.698 21.462 16.994 5.051 7.296 7.577 15.851 7.577 25.665 0 6.063-1.257 12.087-3.77 18.073-2.512 5.986-7.025 12.601-13.538 19.846-6.513 7.245-15.77 15.877-27.77 25.896l-14.768 12.331v.925H176V326H55.077v-30.829l58.77-48.709c3.897-3.237 7.243-6.28 10.038-9.133 2.794-2.851 4.948-5.793 6.461-8.824 1.513-3.032 2.27-6.397 2.27-10.097 0-4.059-.86-7.527-2.578-10.404-1.717-2.877-4.09-5.1-7.115-6.667-3.026-1.567-6.513-2.35-10.461-2.35-3.95 0-7.424.796-10.424 2.389-3 1.593-5.32 3.93-6.961 7.013-1.641 3.083-2.462 6.834-2.462 11.253H52c0-11.099 2.487-20.655 7.462-28.67 4.974-8.016 12-14.182 21.076-18.498 9.077-4.316 19.718-6.474 31.924-6.474Z";
|
|
7
7
|
const yt = {
|
|
8
8
|
prefix: zt,
|
|
9
|
-
iconName:
|
|
10
|
-
icon: [
|
|
11
|
-
},
|
|
9
|
+
iconName: Ht,
|
|
10
|
+
icon: [Ut, Wt, Ze, Kt, Gt]
|
|
11
|
+
}, Kn = {
|
|
12
12
|
definition: yt,
|
|
13
13
|
faAlignJustify: yt,
|
|
14
14
|
prefix: zt,
|
|
15
|
-
iconName:
|
|
16
|
-
width:
|
|
15
|
+
iconName: Ht,
|
|
16
|
+
width: Ut,
|
|
17
17
|
height: Wt,
|
|
18
18
|
ligatures: Ze,
|
|
19
19
|
unicode: Kt,
|
|
@@ -128,27 +128,27 @@ lt.add(
|
|
|
128
128
|
Se.faLinkedin,
|
|
129
129
|
Se.faFacebook,
|
|
130
130
|
// Custom
|
|
131
|
-
|
|
131
|
+
Kn.definition
|
|
132
132
|
);
|
|
133
|
-
const
|
|
133
|
+
const Gn = [...Object.keys(lt.definitions.fas)].sort(), xt = [...Object.keys(lt.definitions.fab)].sort(), z = /* @__PURE__ */ A({
|
|
134
134
|
__name: "Icon",
|
|
135
135
|
props: {
|
|
136
136
|
name: { default: "user" }
|
|
137
137
|
},
|
|
138
138
|
setup(e) {
|
|
139
|
-
const t = e, l = k(() => xt.includes(t.name) ? "fab" : "fas"), o = k(() =>
|
|
139
|
+
const t = e, l = k(() => xt.includes(t.name) ? "fab" : "fas"), o = k(() => Gn.includes(t.name) || xt.includes(t.name) ? !0 : (console.warn(
|
|
140
140
|
"could not load icon, because it is not available",
|
|
141
141
|
t.name
|
|
142
142
|
), !1));
|
|
143
|
-
return (n, r) => o.value ? (R(),
|
|
143
|
+
return (n, r) => o.value ? (R(), W(_(Wn), ot({
|
|
144
144
|
key: 0,
|
|
145
145
|
icon: [l.value, n.name]
|
|
146
146
|
}, n.$attrs), null, 16, ["icon"])) : M("", !0);
|
|
147
147
|
}
|
|
148
|
-
}),
|
|
148
|
+
}), qn = ["aria-label", "tabindex"], Xn = {
|
|
149
149
|
key: 0,
|
|
150
150
|
class: "absolute inset-0 flex items-center justify-center"
|
|
151
|
-
},
|
|
151
|
+
}, Er = /* @__PURE__ */ A({
|
|
152
152
|
__name: "Button",
|
|
153
153
|
props: {
|
|
154
154
|
label: {},
|
|
@@ -200,70 +200,70 @@ const qn = [...Object.keys(lt.definitions.fas)].sort(), xt = [...Object.keys(lt.
|
|
|
200
200
|
function i() {
|
|
201
201
|
o.isDisabled || l("onClick");
|
|
202
202
|
}
|
|
203
|
-
return (u, c) => (R(),
|
|
203
|
+
return (u, c) => (R(), L("button", {
|
|
204
204
|
class: $(["relative inline-flex items-center focus:outline-none focus:ring active:ring transition duration-150 ease-in-out", n.value]),
|
|
205
205
|
type: "button",
|
|
206
206
|
"aria-label": u.label,
|
|
207
207
|
tabindex: u.isDisabled ? "-1" : void 0,
|
|
208
208
|
onClick: i
|
|
209
209
|
}, [
|
|
210
|
-
|
|
210
|
+
T("div", {
|
|
211
211
|
class: $(!u.isLoading || "invisible")
|
|
212
212
|
}, [
|
|
213
|
-
u.icon && u.iconPosition === "left" ? (R(),
|
|
213
|
+
u.icon && u.iconPosition === "left" ? (R(), W(z, {
|
|
214
214
|
key: 0,
|
|
215
215
|
name: u.icon,
|
|
216
216
|
class: $(r.value)
|
|
217
217
|
}, null, 8, ["name", "class"])) : M("", !0),
|
|
218
|
-
|
|
219
|
-
u.icon && u.iconPosition === "right" ? (R(),
|
|
218
|
+
T("span", null, G(u.label), 1),
|
|
219
|
+
u.icon && u.iconPosition === "right" ? (R(), W(z, {
|
|
220
220
|
key: 1,
|
|
221
221
|
name: u.icon,
|
|
222
222
|
class: $(r.value)
|
|
223
223
|
}, null, 8, ["name", "class"])) : M("", !0)
|
|
224
224
|
], 2),
|
|
225
|
-
u.isLoading ? (R(),
|
|
226
|
-
F(
|
|
225
|
+
u.isLoading ? (R(), L("span", Xn, [
|
|
226
|
+
F(z, {
|
|
227
227
|
class: "animate-spin",
|
|
228
228
|
name: "circle-notch"
|
|
229
229
|
})
|
|
230
230
|
])) : M("", !0)
|
|
231
|
-
], 10,
|
|
231
|
+
], 10, qn));
|
|
232
232
|
}
|
|
233
233
|
});
|
|
234
234
|
let Te;
|
|
235
|
-
const
|
|
236
|
-
function
|
|
235
|
+
const Yn = new Uint8Array(16);
|
|
236
|
+
function Qn() {
|
|
237
237
|
if (!Te && (Te = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !Te))
|
|
238
238
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
239
|
-
return Te(
|
|
239
|
+
return Te(Yn);
|
|
240
240
|
}
|
|
241
241
|
const V = [];
|
|
242
242
|
for (let e = 0; e < 256; ++e)
|
|
243
243
|
V.push((e + 256).toString(16).slice(1));
|
|
244
|
-
function
|
|
244
|
+
function Zn(e, t = 0) {
|
|
245
245
|
return V[e[t + 0]] + V[e[t + 1]] + V[e[t + 2]] + V[e[t + 3]] + "-" + V[e[t + 4]] + V[e[t + 5]] + "-" + V[e[t + 6]] + V[e[t + 7]] + "-" + V[e[t + 8]] + V[e[t + 9]] + "-" + V[e[t + 10]] + V[e[t + 11]] + V[e[t + 12]] + V[e[t + 13]] + V[e[t + 14]] + V[e[t + 15]];
|
|
246
246
|
}
|
|
247
|
-
const
|
|
248
|
-
randomUUID:
|
|
247
|
+
const Jn = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), wt = {
|
|
248
|
+
randomUUID: Jn
|
|
249
249
|
};
|
|
250
250
|
function qt(e, t, l) {
|
|
251
251
|
if (wt.randomUUID && !t && !e)
|
|
252
252
|
return wt.randomUUID();
|
|
253
253
|
e = e || {};
|
|
254
|
-
const o = e.random || (e.rng ||
|
|
254
|
+
const o = e.random || (e.rng || Qn)();
|
|
255
255
|
if (o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128, t) {
|
|
256
256
|
l = l || 0;
|
|
257
257
|
for (let n = 0; n < 16; ++n)
|
|
258
258
|
t[l + n] = o[n];
|
|
259
259
|
return t;
|
|
260
260
|
}
|
|
261
|
-
return
|
|
261
|
+
return Zn(o);
|
|
262
262
|
}
|
|
263
|
-
const
|
|
263
|
+
const eo = { class: "relative flex items-start" }, to = { class: "flex items-center h-5" }, no = ["checked", "id"], oo = { class: "ml-2 text-sm leading-5" }, lo = ["for"], ro = {
|
|
264
264
|
key: 0,
|
|
265
265
|
class: "block text-xs text-grey-400 font-normal mono-0 casual-60"
|
|
266
|
-
},
|
|
266
|
+
}, Dr = /* @__PURE__ */ A({
|
|
267
267
|
__name: "Checkbox",
|
|
268
268
|
props: {
|
|
269
269
|
id: { default: qt() },
|
|
@@ -276,38 +276,38 @@ const to = { class: "relative flex items-start" }, no = { class: "flex items-cen
|
|
|
276
276
|
const l = t, o = (n) => {
|
|
277
277
|
l("update:modelValue", n.target.checked);
|
|
278
278
|
};
|
|
279
|
-
return (n, r) => (R(),
|
|
280
|
-
|
|
281
|
-
|
|
279
|
+
return (n, r) => (R(), L("div", eo, [
|
|
280
|
+
T("div", to, [
|
|
281
|
+
T("input", {
|
|
282
282
|
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",
|
|
283
283
|
type: "checkbox",
|
|
284
284
|
checked: n.modelValue,
|
|
285
285
|
onChange: o,
|
|
286
286
|
id: n.id
|
|
287
|
-
}, null, 40,
|
|
287
|
+
}, null, 40, no)
|
|
288
288
|
]),
|
|
289
|
-
|
|
290
|
-
|
|
289
|
+
T("div", oo, [
|
|
290
|
+
T("label", {
|
|
291
291
|
for: n.id,
|
|
292
292
|
class: "font-medium text-grey-700 dark:text-grey-200 casual-25"
|
|
293
|
-
},
|
|
294
|
-
n.description ? (R(),
|
|
293
|
+
}, G(n.label), 9, lo),
|
|
294
|
+
n.description ? (R(), L("p", ro, G(n.description), 1)) : M("", !0)
|
|
295
295
|
])
|
|
296
296
|
]));
|
|
297
297
|
}
|
|
298
298
|
});
|
|
299
|
-
function
|
|
299
|
+
function io() {
|
|
300
300
|
const e = C(!1);
|
|
301
301
|
return In() && ee(() => {
|
|
302
302
|
e.value = !0;
|
|
303
303
|
}), e;
|
|
304
304
|
}
|
|
305
|
-
function
|
|
306
|
-
const t =
|
|
305
|
+
function ao(e) {
|
|
306
|
+
const t = io();
|
|
307
307
|
return k(() => (t.value, !!e()));
|
|
308
308
|
}
|
|
309
|
-
function
|
|
310
|
-
const { initialValue: t = "" } = e, l =
|
|
309
|
+
function so(e = {}) {
|
|
310
|
+
const { initialValue: t = "" } = e, l = ao(() => typeof window < "u" && "EyeDropper" in window), o = C(t);
|
|
311
311
|
async function n(r) {
|
|
312
312
|
if (!l.value)
|
|
313
313
|
return;
|
|
@@ -316,22 +316,22 @@ function uo(e = {}) {
|
|
|
316
316
|
}
|
|
317
317
|
return { isSupported: l, sRGBHex: o, open: n };
|
|
318
318
|
}
|
|
319
|
-
const
|
|
320
|
-
},
|
|
319
|
+
const uo = () => {
|
|
320
|
+
}, co = Array.isArray, fo = (e) => typeof e == "function", po = (e) => typeof e == "symbol";
|
|
321
321
|
let kt;
|
|
322
322
|
const St = () => kt || (kt = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {});
|
|
323
|
-
let
|
|
324
|
-
function
|
|
323
|
+
let mo;
|
|
324
|
+
function vo(e, t = mo) {
|
|
325
325
|
t && t.active && t.effects.push(e);
|
|
326
326
|
}
|
|
327
|
-
const
|
|
327
|
+
const go = (e) => {
|
|
328
328
|
const t = new Set(e);
|
|
329
329
|
return t.w = 0, t.n = 0, t;
|
|
330
|
-
}, Xt = (e) => (e.w & ie) > 0, Yt = (e) => (e.n & ie) > 0,
|
|
330
|
+
}, Xt = (e) => (e.w & ie) > 0, Yt = (e) => (e.n & ie) > 0, bo = ({ deps: e }) => {
|
|
331
331
|
if (e.length)
|
|
332
332
|
for (let t = 0; t < e.length; t++)
|
|
333
333
|
e[t].w |= ie;
|
|
334
|
-
},
|
|
334
|
+
}, ho = (e) => {
|
|
335
335
|
const { deps: t } = e;
|
|
336
336
|
if (t.length) {
|
|
337
337
|
let l = 0;
|
|
@@ -345,9 +345,9 @@ const bo = (e) => {
|
|
|
345
345
|
let Ce = 0, ie = 1;
|
|
346
346
|
const Je = 30;
|
|
347
347
|
let Y;
|
|
348
|
-
class
|
|
348
|
+
class yo {
|
|
349
349
|
constructor(t, l = null, o) {
|
|
350
|
-
this.fn = t, this.scheduler = l, this.active = !0, this.deps = [], this.parent = void 0,
|
|
350
|
+
this.fn = t, this.scheduler = l, this.active = !0, this.deps = [], this.parent = void 0, vo(this, o);
|
|
351
351
|
}
|
|
352
352
|
run() {
|
|
353
353
|
if (!this.active)
|
|
@@ -359,9 +359,9 @@ class xo {
|
|
|
359
359
|
t = t.parent;
|
|
360
360
|
}
|
|
361
361
|
try {
|
|
362
|
-
return this.parent = Y, Y = this, Ae = !0, ie = 1 << ++Ce, Ce <= Je ?
|
|
362
|
+
return this.parent = Y, Y = this, Ae = !0, ie = 1 << ++Ce, Ce <= Je ? bo(this) : Ct(this), this.fn();
|
|
363
363
|
} finally {
|
|
364
|
-
Ce <= Je &&
|
|
364
|
+
Ce <= Je && ho(this), ie = 1 << --Ce, Y = this.parent, Ae = l, this.parent = void 0, this.deferStop && this.stop();
|
|
365
365
|
}
|
|
366
366
|
}
|
|
367
367
|
stop() {
|
|
@@ -377,12 +377,12 @@ function Ct(e) {
|
|
|
377
377
|
}
|
|
378
378
|
}
|
|
379
379
|
let Ae = !0;
|
|
380
|
-
function
|
|
380
|
+
function xo(e, t) {
|
|
381
381
|
let l = !1;
|
|
382
382
|
Ce <= Je ? Yt(e) || (e.n |= ie, l = !Xt(e)) : l = !e.has(Y), l && (e.add(Y), Y.deps.push(e));
|
|
383
383
|
}
|
|
384
|
-
function
|
|
385
|
-
const l =
|
|
384
|
+
function wo(e, t) {
|
|
385
|
+
const l = co(e) ? e : [...e];
|
|
386
386
|
for (const o of l)
|
|
387
387
|
o.computed && Ot(o);
|
|
388
388
|
for (const o of l)
|
|
@@ -392,43 +392,43 @@ function Ot(e, t) {
|
|
|
392
392
|
(e !== Y || e.allowRecurse) && (e.scheduler ? e.scheduler() : e.run());
|
|
393
393
|
}
|
|
394
394
|
new Set(
|
|
395
|
-
/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((e) => e !== "arguments" && e !== "caller").map((e) => Symbol[e]).filter(
|
|
395
|
+
/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((e) => e !== "arguments" && e !== "caller").map((e) => Symbol[e]).filter(po)
|
|
396
396
|
);
|
|
397
397
|
function Be(e) {
|
|
398
398
|
const t = e && e.__v_raw;
|
|
399
399
|
return t ? Be(t) : e;
|
|
400
400
|
}
|
|
401
|
-
function
|
|
402
|
-
Ae && Y && (e = Be(e),
|
|
401
|
+
function ko(e) {
|
|
402
|
+
Ae && Y && (e = Be(e), xo(e.dep || (e.dep = go())));
|
|
403
403
|
}
|
|
404
|
-
function
|
|
404
|
+
function So(e, t) {
|
|
405
405
|
e = Be(e);
|
|
406
406
|
const l = e.dep;
|
|
407
|
-
l &&
|
|
407
|
+
l && wo(l);
|
|
408
408
|
}
|
|
409
|
-
class
|
|
409
|
+
class Co {
|
|
410
410
|
constructor(t, l, o, n) {
|
|
411
|
-
this._setter = l, this.dep = void 0, this.__v_isRef = !0, this.__v_isReadonly = !1, this._dirty = !0, this.effect = new
|
|
412
|
-
this._dirty || (this._dirty = !0,
|
|
411
|
+
this._setter = l, this.dep = void 0, this.__v_isRef = !0, this.__v_isReadonly = !1, this._dirty = !0, this.effect = new yo(t, () => {
|
|
412
|
+
this._dirty || (this._dirty = !0, So(this));
|
|
413
413
|
}), this.effect.computed = this, this.effect.active = this._cacheable = !n, this.__v_isReadonly = o;
|
|
414
414
|
}
|
|
415
415
|
get value() {
|
|
416
416
|
const t = Be(this);
|
|
417
|
-
return
|
|
417
|
+
return ko(t), (t._dirty || !t._cacheable) && (t._dirty = !1, t._value = t.effect.run()), t._value;
|
|
418
418
|
}
|
|
419
419
|
set value(t) {
|
|
420
420
|
this._setter(t);
|
|
421
421
|
}
|
|
422
422
|
}
|
|
423
|
-
function
|
|
423
|
+
function Oo(e, t, l = !1) {
|
|
424
424
|
let o, n;
|
|
425
|
-
const r =
|
|
426
|
-
return r ? (o = e, n =
|
|
425
|
+
const r = fo(e);
|
|
426
|
+
return r ? (o = e, n = uo) : (o = e.get, n = e.set), new Co(o, n, r || !n, l);
|
|
427
427
|
}
|
|
428
428
|
let Xe, Rt = "__VUE_INSTANCE_SETTERS__";
|
|
429
429
|
(Xe = St()[Rt]) || (Xe = St()[Rt] = []), Xe.push((e) => e);
|
|
430
|
-
let
|
|
431
|
-
const Ye = (e, t) =>
|
|
430
|
+
let Ro = !1;
|
|
431
|
+
const Ye = (e, t) => Oo(e, t, Ro);
|
|
432
432
|
function rt(e) {
|
|
433
433
|
const t = Ye(() => ({
|
|
434
434
|
"pl-3 pr-10 py-2": !e.icon && e.type !== "color" && e.size === "small",
|
|
@@ -450,9 +450,9 @@ function rt(e) {
|
|
|
450
450
|
textSizeClasses: o
|
|
451
451
|
};
|
|
452
452
|
}
|
|
453
|
-
const
|
|
453
|
+
const Eo = ["placeholder", "type", "tabindex", "value"], Do = { class: "absolute inset-y-2 left-2 w-8 cursor-pointer" }, _o = {
|
|
454
454
|
inheritAttrs: !1
|
|
455
|
-
},
|
|
455
|
+
}, _r = /* @__PURE__ */ A({
|
|
456
456
|
..._o,
|
|
457
457
|
__name: "Input",
|
|
458
458
|
props: {
|
|
@@ -480,7 +480,7 @@ const Do = ["placeholder", "type", "tabindex", "value"], Po = { class: "absolute
|
|
|
480
480
|
isSupported: d,
|
|
481
481
|
open: v,
|
|
482
482
|
sRGBHex: f
|
|
483
|
-
} =
|
|
483
|
+
} = so(), g = () => {
|
|
484
484
|
v();
|
|
485
485
|
};
|
|
486
486
|
Q(f, (y) => {
|
|
@@ -502,11 +502,11 @@ const Do = ["placeholder", "type", "tabindex", "value"], Po = { class: "absolute
|
|
|
502
502
|
focus: () => {
|
|
503
503
|
o.isDisabled || h.value.focus();
|
|
504
504
|
}
|
|
505
|
-
}), (y, x) => (R(),
|
|
505
|
+
}), (y, x) => (R(), L("div", {
|
|
506
506
|
class: $(["relative", [y.block ? "w-full block" : "inline-block"]])
|
|
507
507
|
}, [
|
|
508
|
-
|
|
509
|
-
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", [
|
|
508
|
+
T("input", ot({
|
|
509
|
+
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", [_(u), _(a), _(c)]],
|
|
510
510
|
placeholder: y.placeholder,
|
|
511
511
|
type: s.value,
|
|
512
512
|
tabindex: y.isDisabled ? "-1" : void 0,
|
|
@@ -515,10 +515,10 @@ const Do = ["placeholder", "type", "tabindex", "value"], Po = { class: "absolute
|
|
|
515
515
|
ref_key: "inputElement",
|
|
516
516
|
ref: n,
|
|
517
517
|
onInput: m
|
|
518
|
-
}), null, 16,
|
|
519
|
-
y.type === "color" ? (R(),
|
|
520
|
-
|
|
521
|
-
An(
|
|
518
|
+
}), null, 16, Eo),
|
|
519
|
+
y.type === "color" ? (R(), L(be, { key: 0 }, [
|
|
520
|
+
T("label", Do, [
|
|
521
|
+
An(T("input", {
|
|
522
522
|
class: "invisible",
|
|
523
523
|
type: "color",
|
|
524
524
|
"onUpdate:modelValue": x[0] || (x[0] = (w) => r.value = w),
|
|
@@ -526,31 +526,31 @@ const Do = ["placeholder", "type", "tabindex", "value"], Po = { class: "absolute
|
|
|
526
526
|
}, null, 544), [
|
|
527
527
|
[$n, r.value]
|
|
528
528
|
]),
|
|
529
|
-
|
|
529
|
+
T("span", {
|
|
530
530
|
class: "border-1 absolute inset-0 block rounded border border-grey-600/25 bg-clip-border shadow",
|
|
531
531
|
style: Nt(`background-color: ${r.value}`)
|
|
532
532
|
}, null, 4)
|
|
533
533
|
]),
|
|
534
|
-
|
|
534
|
+
_(d) && y.showColorPicker ? (R(), L("button", {
|
|
535
535
|
key: 0,
|
|
536
536
|
type: "button",
|
|
537
537
|
class: "absolute inset-y-2 right-2 h-7 w-7 rounded-full hover:bg-grey-200",
|
|
538
538
|
onClick: g
|
|
539
539
|
}, [
|
|
540
|
-
F(
|
|
540
|
+
F(z, {
|
|
541
541
|
size: "xs",
|
|
542
542
|
name: "eyedropper"
|
|
543
543
|
})
|
|
544
544
|
])) : M("", !0)
|
|
545
|
-
], 64)) : y.icon ? (R(),
|
|
545
|
+
], 64)) : y.icon ? (R(), L("span", {
|
|
546
546
|
key: 1,
|
|
547
|
-
class: $(["absolute left-0 inset-y-0 inline-flex items-center justify-center text-grey-700 dark:text-grey-100 px-4",
|
|
547
|
+
class: $(["absolute left-0 inset-y-0 inline-flex items-center justify-center text-grey-700 dark:text-grey-100 px-4", _(a)])
|
|
548
548
|
}, [
|
|
549
|
-
F(
|
|
549
|
+
F(z, { name: y.icon }, null, 8, ["name"])
|
|
550
550
|
], 2)) : M("", !0)
|
|
551
551
|
], 2));
|
|
552
552
|
}
|
|
553
|
-
}),
|
|
553
|
+
}), Po = { class: "inline-block text-grey-700 dark:text-grey-200 text-sm font-medium casual-20" }, To = ["for"], Lo = {
|
|
554
554
|
key: 0,
|
|
555
555
|
class: "block text-xs text-grey-400 font-normal mono-0 casual-60"
|
|
556
556
|
}, Pr = /* @__PURE__ */ A({
|
|
@@ -561,29 +561,29 @@ const Do = ["placeholder", "type", "tabindex", "value"], Po = { class: "absolute
|
|
|
561
561
|
description: {}
|
|
562
562
|
},
|
|
563
563
|
setup(e) {
|
|
564
|
-
return (t, l) => (R(),
|
|
565
|
-
|
|
566
|
-
t.description ? (R(),
|
|
564
|
+
return (t, l) => (R(), L("span", Po, [
|
|
565
|
+
T("label", { for: t.id }, G(t.label), 9, To),
|
|
566
|
+
t.description ? (R(), L("span", Lo, G(t.description), 1)) : M("", !0)
|
|
567
567
|
]));
|
|
568
568
|
}
|
|
569
569
|
});
|
|
570
|
-
function
|
|
570
|
+
function K(e, t, ...l) {
|
|
571
571
|
if (e in t) {
|
|
572
572
|
let n = t[e];
|
|
573
573
|
return typeof n == "function" ? n(...l) : n;
|
|
574
574
|
}
|
|
575
575
|
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(", ")}.`);
|
|
576
|
-
throw Error.captureStackTrace && Error.captureStackTrace(o,
|
|
576
|
+
throw Error.captureStackTrace && Error.captureStackTrace(o, K), o;
|
|
577
577
|
}
|
|
578
|
-
var Re = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(Re || {}),
|
|
579
|
-
function
|
|
578
|
+
var Re = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(Re || {}), Io = ((e) => (e[e.Unmount = 0] = "Unmount", e[e.Hidden = 1] = "Hidden", e))(Io || {});
|
|
579
|
+
function j({ visible: e = !0, features: t = 0, ourProps: l, theirProps: o, ...n }) {
|
|
580
580
|
var r;
|
|
581
581
|
let i = Zt(o, l), u = Object.assign(n, { props: i });
|
|
582
582
|
if (e || t & 2 && i.static)
|
|
583
583
|
return Qe(u);
|
|
584
584
|
if (t & 1) {
|
|
585
585
|
let c = (r = i.unmount) == null || r ? 0 : 1;
|
|
586
|
-
return
|
|
586
|
+
return K(c, { 0() {
|
|
587
587
|
return null;
|
|
588
588
|
}, 1() {
|
|
589
589
|
return Qe({ ...n, props: { ...i, hidden: !0, style: { display: "none" } } });
|
|
@@ -603,7 +603,7 @@ function Qe({ props: e, attrs: t, slots: l, slot: o, name: n }) {
|
|
|
603
603
|
if (u === "template") {
|
|
604
604
|
if (a = Qt(a ?? []), Object.keys(c).length > 0 || Object.keys(t).length > 0) {
|
|
605
605
|
let [d, ...v] = a ?? [];
|
|
606
|
-
if (
|
|
606
|
+
if (!Ao(d) || v.length > 0)
|
|
607
607
|
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((m) => m.trim()).filter((m, h, b) => b.indexOf(m) === h).sort((m, h) => m.localeCompare(h)).map((m) => ` - ${m}`).join(`
|
|
608
608
|
`), "", "You can apply a few solutions:", ['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".', "Render a single element as the child so that we can forward the props onto that element."].map((m) => ` - ${m}`).join(`
|
|
609
609
|
`)].join(`
|
|
@@ -654,21 +654,21 @@ function it(e, t = []) {
|
|
|
654
654
|
o in l && delete l[o];
|
|
655
655
|
return l;
|
|
656
656
|
}
|
|
657
|
-
function
|
|
657
|
+
function Ao(e) {
|
|
658
658
|
return e == null ? !1 : typeof e.type == "string" || typeof e.type == "object" || typeof e.type == "function";
|
|
659
659
|
}
|
|
660
|
-
let
|
|
661
|
-
function
|
|
662
|
-
return
|
|
660
|
+
let $o = 0;
|
|
661
|
+
function Mo() {
|
|
662
|
+
return ++$o;
|
|
663
663
|
}
|
|
664
664
|
function J() {
|
|
665
|
-
return
|
|
665
|
+
return Mo();
|
|
666
666
|
}
|
|
667
667
|
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 || {});
|
|
668
|
-
function
|
|
668
|
+
function Vo(e) {
|
|
669
669
|
throw new Error("Unexpected object: " + e);
|
|
670
670
|
}
|
|
671
|
-
var
|
|
671
|
+
var I = ((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))(I || {});
|
|
672
672
|
function en(e, t) {
|
|
673
673
|
let l = t.resolveItems();
|
|
674
674
|
if (l.length <= 0)
|
|
@@ -692,7 +692,7 @@ function en(e, t) {
|
|
|
692
692
|
case 5:
|
|
693
693
|
return null;
|
|
694
694
|
default:
|
|
695
|
-
|
|
695
|
+
Vo(e);
|
|
696
696
|
}
|
|
697
697
|
})();
|
|
698
698
|
return r === -1 ? o : r;
|
|
@@ -725,8 +725,8 @@ function at(e, t) {
|
|
|
725
725
|
l.value || E(t) && E(t) instanceof HTMLButtonElement && !((o = E(t)) != null && o.hasAttribute("type")) && (l.value = "button");
|
|
726
726
|
}), l;
|
|
727
727
|
}
|
|
728
|
-
var
|
|
729
|
-
class
|
|
728
|
+
var Fo = Object.defineProperty, No = (e, t, l) => t in e ? Fo(e, t, { enumerable: !0, configurable: !0, writable: !0, value: l }) : e[t] = l, Dt = (e, t, l) => (No(e, typeof t != "symbol" ? t + "" : t, l), l);
|
|
729
|
+
class Bo {
|
|
730
730
|
constructor() {
|
|
731
731
|
Dt(this, "current", this.detect()), Dt(this, "currentId", 0);
|
|
732
732
|
}
|
|
@@ -749,7 +749,7 @@ class jo {
|
|
|
749
749
|
return typeof window > "u" || typeof document > "u" ? "server" : "client";
|
|
750
750
|
}
|
|
751
751
|
}
|
|
752
|
-
let st = new
|
|
752
|
+
let st = new Bo();
|
|
753
753
|
function ut(e) {
|
|
754
754
|
if (st.isServer)
|
|
755
755
|
return null;
|
|
@@ -762,7 +762,7 @@ function ut(e) {
|
|
|
762
762
|
}
|
|
763
763
|
return document;
|
|
764
764
|
}
|
|
765
|
-
function
|
|
765
|
+
function jo({ container: e, accept: t, walk: l, enabled: o }) {
|
|
766
766
|
xe(() => {
|
|
767
767
|
let n = e.value;
|
|
768
768
|
if (!n || o !== void 0 && !o.value)
|
|
@@ -776,14 +776,14 @@ function zo({ container: e, accept: t, walk: l, enabled: o }) {
|
|
|
776
776
|
});
|
|
777
777
|
}
|
|
778
778
|
let et = ["[contentEditable=true]", "[tabindex]", "a[href]", "area[href]", "button:not([disabled])", "iframe", "input:not([disabled])", "select:not([disabled])", "textarea:not([disabled])"].map((e) => `${e}:not([tabindex='-1'])`).join(",");
|
|
779
|
-
var tt = ((e) => (e[e.First = 1] = "First", e[e.Previous = 2] = "Previous", e[e.Next = 4] = "Next", e[e.Last = 8] = "Last", e[e.WrapAround = 16] = "WrapAround", e[e.NoScroll = 32] = "NoScroll", e))(tt || {}),
|
|
779
|
+
var tt = ((e) => (e[e.First = 1] = "First", e[e.Previous = 2] = "Previous", e[e.Next = 4] = "Next", e[e.Last = 8] = "Last", e[e.WrapAround = 16] = "WrapAround", e[e.NoScroll = 32] = "NoScroll", e))(tt || {}), zo = ((e) => (e[e.Error = 0] = "Error", e[e.Overflow = 1] = "Overflow", e[e.Success = 2] = "Success", e[e.Underflow = 3] = "Underflow", e))(zo || {}), Ho = ((e) => (e[e.Previous = -1] = "Previous", e[e.Next = 1] = "Next", e))(Ho || {});
|
|
780
780
|
function ln(e = document.body) {
|
|
781
781
|
return e == null ? [] : Array.from(e.querySelectorAll(et)).sort((t, l) => Math.sign((t.tabIndex || Number.MAX_SAFE_INTEGER) - (l.tabIndex || Number.MAX_SAFE_INTEGER)));
|
|
782
782
|
}
|
|
783
783
|
var je = ((e) => (e[e.Strict = 0] = "Strict", e[e.Loose = 1] = "Loose", e))(je || {});
|
|
784
784
|
function ze(e, t = 0) {
|
|
785
785
|
var l;
|
|
786
|
-
return e === ((l = ut(e)) == null ? void 0 : l.body) ? !1 :
|
|
786
|
+
return e === ((l = ut(e)) == null ? void 0 : l.body) ? !1 : K(t, { 0() {
|
|
787
787
|
return e.matches(et);
|
|
788
788
|
}, 1() {
|
|
789
789
|
let o = e;
|
|
@@ -797,23 +797,23 @@ function ze(e, t = 0) {
|
|
|
797
797
|
}
|
|
798
798
|
function rn(e) {
|
|
799
799
|
let t = ut(e);
|
|
800
|
-
|
|
801
|
-
t && !ze(t.activeElement, 0) &&
|
|
800
|
+
B(() => {
|
|
801
|
+
t && !ze(t.activeElement, 0) && Wo(e);
|
|
802
802
|
});
|
|
803
803
|
}
|
|
804
|
-
var
|
|
804
|
+
var Uo = ((e) => (e[e.Keyboard = 0] = "Keyboard", e[e.Mouse = 1] = "Mouse", e))(Uo || {});
|
|
805
805
|
typeof window < "u" && typeof document < "u" && (document.addEventListener("keydown", (e) => {
|
|
806
806
|
e.metaKey || e.altKey || e.ctrlKey || (document.documentElement.dataset.headlessuiFocusVisible = "");
|
|
807
807
|
}, !0), document.addEventListener("click", (e) => {
|
|
808
808
|
e.detail === 1 ? delete document.documentElement.dataset.headlessuiFocusVisible : e.detail === 0 && (document.documentElement.dataset.headlessuiFocusVisible = "");
|
|
809
809
|
}, !0));
|
|
810
|
-
function
|
|
810
|
+
function Wo(e) {
|
|
811
811
|
e == null || e.focus({ preventScroll: !0 });
|
|
812
812
|
}
|
|
813
|
-
let
|
|
814
|
-
function
|
|
813
|
+
let Ko = ["textarea", "input"].join(",");
|
|
814
|
+
function Go(e) {
|
|
815
815
|
var t, l;
|
|
816
|
-
return (l = (t = e == null ? void 0 : e.matches) == null ? void 0 : t.call(e,
|
|
816
|
+
return (l = (t = e == null ? void 0 : e.matches) == null ? void 0 : t.call(e, Ko)) != null ? l : !1;
|
|
817
817
|
}
|
|
818
818
|
function ct(e, t = (l) => l) {
|
|
819
819
|
return e.slice().sort((l, o) => {
|
|
@@ -824,10 +824,10 @@ function ct(e, t = (l) => l) {
|
|
|
824
824
|
return i & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : i & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
|
|
825
825
|
});
|
|
826
826
|
}
|
|
827
|
-
function
|
|
828
|
-
return
|
|
827
|
+
function qo(e, t) {
|
|
828
|
+
return Xo(ln(), t, { relativeTo: e });
|
|
829
829
|
}
|
|
830
|
-
function
|
|
830
|
+
function Xo(e, t, { sorted: l = !0, relativeTo: o = null, skipElements: n = [] } = {}) {
|
|
831
831
|
var r;
|
|
832
832
|
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);
|
|
833
833
|
n.length > 0 && u.length > 1 && (u = u.filter((g) => !n.includes(g))), o = o ?? i.activeElement;
|
|
@@ -862,14 +862,14 @@ function Yo(e, t, { sorted: l = !0, relativeTo: o = null, skipElements: n = [] }
|
|
|
862
862
|
}
|
|
863
863
|
f = u[g], f == null || f.focus(s), d += c;
|
|
864
864
|
} while (f !== i.activeElement);
|
|
865
|
-
return t & 6 &&
|
|
865
|
+
return t & 6 && Go(f) && f.select(), 2;
|
|
866
866
|
}
|
|
867
867
|
function Le(e, t, l) {
|
|
868
868
|
st.isServer || xe((o) => {
|
|
869
869
|
document.addEventListener(e, t, l), o(() => document.removeEventListener(e, t, l));
|
|
870
870
|
});
|
|
871
871
|
}
|
|
872
|
-
function
|
|
872
|
+
function Yo(e, t, l) {
|
|
873
873
|
st.isServer || xe((o) => {
|
|
874
874
|
window.addEventListener(e, t, l), o(() => window.removeEventListener(e, t, l));
|
|
875
875
|
});
|
|
@@ -902,13 +902,13 @@ function an(e, t, l = k(() => !0)) {
|
|
|
902
902
|
l.value && (n.value = ((u = (i = r.composedPath) == null ? void 0 : i.call(r)) == null ? void 0 : u[0]) || r.target);
|
|
903
903
|
}, !0), Le("click", (r) => {
|
|
904
904
|
n.value && (o(r, () => n.value), n.value = null);
|
|
905
|
-
}, !0), Le("touchend", (r) => o(r, () => r.target instanceof HTMLElement ? r.target : null), !0),
|
|
905
|
+
}, !0), Le("touchend", (r) => o(r, () => r.target instanceof HTMLElement ? r.target : null), !0), Yo("blur", (r) => o(r, () => window.document.activeElement instanceof HTMLIFrameElement ? window.document.activeElement : null), !0);
|
|
906
906
|
}
|
|
907
907
|
var dt = ((e) => (e[e.None = 1] = "None", e[e.Focusable = 2] = "Focusable", e[e.Hidden = 4] = "Hidden", e))(dt || {});
|
|
908
908
|
let sn = A({ name: "Hidden", props: { as: { type: [Object, String], default: "div" }, features: { type: Number, default: 1 } }, setup(e, { slots: t, attrs: l }) {
|
|
909
909
|
return () => {
|
|
910
910
|
let { features: o, ...n } = e, r = { "aria-hidden": (o & 2) === 2 ? !0 : void 0, style: { position: "fixed", top: 1, left: 1, width: 1, height: 0, padding: 0, margin: -1, overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0", ...(o & 4) === 4 && (o & 2) !== 2 && { display: "none" } } };
|
|
911
|
-
return
|
|
911
|
+
return j({ ourProps: r, theirProps: n, slot: {}, attrs: l, slots: t, name: "Hidden" });
|
|
912
912
|
};
|
|
913
913
|
} });
|
|
914
914
|
function un(e = {}, t = null, l = []) {
|
|
@@ -926,7 +926,7 @@ function dn(e, t, l) {
|
|
|
926
926
|
else
|
|
927
927
|
l instanceof Date ? e.push([t, l.toISOString()]) : typeof l == "boolean" ? e.push([t, l ? "1" : "0"]) : typeof l == "string" ? e.push([t, l]) : typeof l == "number" ? e.push([t, `${l}`]) : l == null ? e.push([t, ""]) : un(l, t, e);
|
|
928
928
|
}
|
|
929
|
-
function
|
|
929
|
+
function Qo(e) {
|
|
930
930
|
var t, l;
|
|
931
931
|
let o = (t = e == null ? void 0 : e.form) != null ? t : e.closest("form");
|
|
932
932
|
if (o) {
|
|
@@ -944,26 +944,26 @@ function fn(e, t, l) {
|
|
|
944
944
|
return n.value || (o.value = r), t == null ? void 0 : t(r);
|
|
945
945
|
}];
|
|
946
946
|
}
|
|
947
|
-
function
|
|
947
|
+
function _t(e) {
|
|
948
948
|
return [e.screenX, e.screenY];
|
|
949
949
|
}
|
|
950
950
|
function pn() {
|
|
951
951
|
let e = C([-1, -1]);
|
|
952
952
|
return { wasMoved(t) {
|
|
953
|
-
let l =
|
|
953
|
+
let l = _t(t);
|
|
954
954
|
return e.value[0] === l[0] && e.value[1] === l[1] ? !1 : (e.value = l, !0);
|
|
955
955
|
}, update(t) {
|
|
956
|
-
e.value =
|
|
956
|
+
e.value = _t(t);
|
|
957
957
|
} };
|
|
958
958
|
}
|
|
959
959
|
let mn = Symbol("DescriptionContext");
|
|
960
|
-
function
|
|
960
|
+
function Zo() {
|
|
961
961
|
let e = he(mn, null);
|
|
962
962
|
if (e === null)
|
|
963
963
|
throw new Error("Missing parent");
|
|
964
964
|
return e;
|
|
965
965
|
}
|
|
966
|
-
function
|
|
966
|
+
function Jo({ slot: e = C({}), name: t = "Description", props: l = {} } = {}) {
|
|
967
967
|
let o = C([]);
|
|
968
968
|
function n(r) {
|
|
969
969
|
return o.value.push(r), () => {
|
|
@@ -974,13 +974,13 @@ function el({ slot: e = C({}), name: t = "Description", props: l = {} } = {}) {
|
|
|
974
974
|
return ye(mn, { register: n, slot: e, name: t, props: l }), k(() => o.value.length > 0 ? o.value.join(" ") : void 0);
|
|
975
975
|
}
|
|
976
976
|
A({ name: "Description", props: { as: { type: [Object, String], default: "p" }, id: { type: String, default: () => `headlessui-description-${J()}` } }, setup(e, { attrs: t, slots: l }) {
|
|
977
|
-
let o =
|
|
977
|
+
let o = Zo();
|
|
978
978
|
return ee(() => Ne(o.register(e.id))), () => {
|
|
979
|
-
let { name: n = "Description", slot: r = C({}), props: i = {} } = o, { id: u, ...c } = e, a = { ...Object.entries(i).reduce((s, [d, v]) => Object.assign(s, { [d]:
|
|
980
|
-
return
|
|
979
|
+
let { name: n = "Description", slot: r = C({}), props: i = {} } = o, { id: u, ...c } = e, a = { ...Object.entries(i).reduce((s, [d, v]) => Object.assign(s, { [d]: _(v) }), {}), id: u };
|
|
980
|
+
return j({ ourProps: a, theirProps: c, slot: r.value, attrs: t, slots: l, name: n });
|
|
981
981
|
};
|
|
982
982
|
} });
|
|
983
|
-
let
|
|
983
|
+
let Pt = /([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;
|
|
984
984
|
function Tt(e) {
|
|
985
985
|
var t, l;
|
|
986
986
|
let o = (t = e.innerText) != null ? t : "", n = e.cloneNode(!0);
|
|
@@ -990,9 +990,9 @@ function Tt(e) {
|
|
|
990
990
|
for (let u of n.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))
|
|
991
991
|
u.remove(), r = !0;
|
|
992
992
|
let i = r ? (l = n.innerText) != null ? l : "" : o;
|
|
993
|
-
return
|
|
993
|
+
return Pt.test(i) && (i = i.replace(Pt, "")), i;
|
|
994
994
|
}
|
|
995
|
-
function
|
|
995
|
+
function el(e) {
|
|
996
996
|
let t = e.getAttribute("aria-label");
|
|
997
997
|
if (typeof t == "string")
|
|
998
998
|
return t.trim();
|
|
@@ -1020,15 +1020,15 @@ function vn(e) {
|
|
|
1020
1020
|
let n = o.innerText;
|
|
1021
1021
|
if (t.value === n)
|
|
1022
1022
|
return l.value;
|
|
1023
|
-
let r =
|
|
1023
|
+
let r = el(o).trim().toLowerCase();
|
|
1024
1024
|
return t.value = n, l.value = r, r;
|
|
1025
1025
|
};
|
|
1026
1026
|
}
|
|
1027
|
-
function
|
|
1027
|
+
function tl(e, t) {
|
|
1028
1028
|
return e === t;
|
|
1029
1029
|
}
|
|
1030
|
-
var
|
|
1031
|
-
function
|
|
1030
|
+
var nl = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(nl || {}), ol = ((e) => (e[e.Single = 0] = "Single", e[e.Multi = 1] = "Multi", e))(ol || {}), ll = ((e) => (e[e.Pointer = 0] = "Pointer", e[e.Other = 1] = "Other", e))(ll || {});
|
|
1031
|
+
function rl(e) {
|
|
1032
1032
|
requestAnimationFrame(() => requestAnimationFrame(e));
|
|
1033
1033
|
}
|
|
1034
1034
|
let gn = Symbol("ListboxContext");
|
|
@@ -1040,13 +1040,13 @@ function De(e) {
|
|
|
1040
1040
|
}
|
|
1041
1041
|
return t;
|
|
1042
1042
|
}
|
|
1043
|
-
let
|
|
1043
|
+
let il = A({ name: "Listbox", emits: { "update:modelValue": (e) => !0 }, props: { as: { type: [Object, String], default: "template" }, disabled: { type: [Boolean], default: !1 }, by: { type: [String, Function], default: () => tl }, 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 }) {
|
|
1044
1044
|
let n = C(1), r = C(null), i = C(null), u = C(null), c = C([]), a = C(""), s = C(null), d = C(1);
|
|
1045
1045
|
function v(x = (w) => w) {
|
|
1046
|
-
let w = s.value !== null ? c.value[s.value] : null, S = ct(x(c.value.slice()), (O) => E(O.dataRef.domRef)),
|
|
1047
|
-
return
|
|
1046
|
+
let w = s.value !== null ? c.value[s.value] : null, S = ct(x(c.value.slice()), (O) => E(O.dataRef.domRef)), P = w ? S.indexOf(w) : null;
|
|
1047
|
+
return P === -1 && (P = null), { options: S, activeOptionIndex: P };
|
|
1048
1048
|
}
|
|
1049
|
-
let f = k(() => e.multiple ? 1 : 0), [g, m] = fn(k(() => e.modelValue), (x) => o("update:modelValue", x), k(() => e.defaultValue)), h = k(() => g.value === void 0 ?
|
|
1049
|
+
let f = k(() => e.multiple ? 1 : 0), [g, m] = fn(k(() => e.modelValue), (x) => o("update:modelValue", x), k(() => e.defaultValue)), h = k(() => g.value === void 0 ? K(f.value, { 1: [], 0: void 0 }) : g.value), b = { listboxState: n, value: h, mode: f, compare(x, w) {
|
|
1050
1050
|
if (typeof e.by == "string") {
|
|
1051
1051
|
let S = e.by;
|
|
1052
1052
|
return (x == null ? void 0 : x[S]) === (w == null ? void 0 : w[S]);
|
|
@@ -1059,38 +1059,38 @@ let al = A({ name: "Listbox", emits: { "update:modelValue": (e) => !0 }, props:
|
|
|
1059
1059
|
}, goToOption(x, w, S) {
|
|
1060
1060
|
if (e.disabled || n.value === 1)
|
|
1061
1061
|
return;
|
|
1062
|
-
let
|
|
1063
|
-
a.value = "", s.value = O, d.value = S ?? 1, c.value =
|
|
1062
|
+
let P = v(), O = en(x === I.Specific ? { focus: I.Specific, id: w } : { focus: x }, { resolveItems: () => P.options, resolveActiveIndex: () => P.activeOptionIndex, resolveId: (N) => N.id, resolveDisabled: (N) => N.dataRef.disabled });
|
|
1063
|
+
a.value = "", s.value = O, d.value = S ?? 1, c.value = P.options;
|
|
1064
1064
|
}, search(x) {
|
|
1065
1065
|
if (e.disabled || n.value === 1)
|
|
1066
1066
|
return;
|
|
1067
1067
|
let w = a.value !== "" ? 0 : 1;
|
|
1068
1068
|
a.value += x.toLowerCase();
|
|
1069
|
-
let S = (s.value !== null ? c.value.slice(s.value + w).concat(c.value.slice(0, s.value + w)) : c.value).find((O) => O.dataRef.textValue.startsWith(a.value) && !O.dataRef.disabled),
|
|
1070
|
-
|
|
1069
|
+
let S = (s.value !== null ? c.value.slice(s.value + w).concat(c.value.slice(0, s.value + w)) : c.value).find((O) => O.dataRef.textValue.startsWith(a.value) && !O.dataRef.disabled), P = S ? c.value.indexOf(S) : -1;
|
|
1070
|
+
P === -1 || P === s.value || (s.value = P, d.value = 1);
|
|
1071
1071
|
}, clearSearch() {
|
|
1072
1072
|
e.disabled || n.value !== 1 && a.value !== "" && (a.value = "");
|
|
1073
1073
|
}, registerOption(x, w) {
|
|
1074
|
-
let S = v((
|
|
1074
|
+
let S = v((P) => [...P, { id: x, dataRef: w }]);
|
|
1075
1075
|
c.value = S.options, s.value = S.activeOptionIndex;
|
|
1076
1076
|
}, unregisterOption(x) {
|
|
1077
1077
|
let w = v((S) => {
|
|
1078
|
-
let
|
|
1079
|
-
return
|
|
1078
|
+
let P = S.findIndex((O) => O.id === x);
|
|
1079
|
+
return P !== -1 && S.splice(P, 1), S;
|
|
1080
1080
|
});
|
|
1081
1081
|
c.value = w.options, s.value = w.activeOptionIndex, d.value = 1;
|
|
1082
1082
|
}, theirOnChange(x) {
|
|
1083
1083
|
e.disabled || m(x);
|
|
1084
1084
|
}, select(x) {
|
|
1085
|
-
e.disabled || m(
|
|
1086
|
-
let w = X(b.value.value).slice(), S = X(x),
|
|
1087
|
-
return
|
|
1085
|
+
e.disabled || m(K(f.value, { 0: () => x, 1: () => {
|
|
1086
|
+
let w = X(b.value.value).slice(), S = X(x), P = w.findIndex((O) => b.compare(S, X(O)));
|
|
1087
|
+
return P === -1 ? w.push(S) : w.splice(P, 1), w;
|
|
1088
1088
|
} }));
|
|
1089
1089
|
} };
|
|
1090
1090
|
an([i, u], (x, w) => {
|
|
1091
1091
|
var S;
|
|
1092
1092
|
b.closeListbox(), ze(w, je.Loose) || (x.preventDefault(), (S = E(i)) == null || S.focus());
|
|
1093
|
-
}, k(() => n.value === 0)), ye(gn, b), on(k(() =>
|
|
1093
|
+
}, k(() => n.value === 0)), ye(gn, b), on(k(() => K(n.value, { 0: te.Open, 1: te.Closed })));
|
|
1094
1094
|
let y = k(() => {
|
|
1095
1095
|
var x;
|
|
1096
1096
|
return (x = E(i)) == null ? void 0 : x.closest("form");
|
|
@@ -1108,8 +1108,8 @@ let al = A({ name: "Listbox", emits: { "update:modelValue": (e) => !0 }, props:
|
|
|
1108
1108
|
};
|
|
1109
1109
|
}, { immediate: !0 });
|
|
1110
1110
|
}), () => {
|
|
1111
|
-
let { name: x, modelValue: w, disabled: S, form:
|
|
1112
|
-
return Oe(be, [...x != null && h.value != null ? un({ [x]: h.value }).map(([re,
|
|
1111
|
+
let { name: x, modelValue: w, disabled: S, form: P, ...O } = e, N = { open: n.value === 0, disabled: S, value: h.value };
|
|
1112
|
+
return Oe(be, [...x != null && h.value != null ? un({ [x]: h.value }).map(([re, Pe]) => Oe(sn, Jt({ features: dt.Hidden, key: re, as: "input", type: "hidden", hidden: !0, readOnly: !0, form: P, name: re, value: Pe }))) : [], j({ ourProps: {}, theirProps: { ...l, ...it(O, ["defaultValue", "onUpdate:modelValue", "horizontal", "multiple", "by"]) }, slot: N, slots: t, attrs: l, name: "Listbox" })]);
|
|
1113
1113
|
};
|
|
1114
1114
|
} });
|
|
1115
1115
|
A({ name: "ListboxLabel", props: { as: { type: [Object, String], default: "label" }, id: { type: String, default: () => `headlessui-listbox-label-${J()}` } }, setup(e, { attrs: t, slots: l }) {
|
|
@@ -1120,10 +1120,10 @@ A({ name: "ListboxLabel", props: { as: { type: [Object, String], default: "label
|
|
|
1120
1120
|
}
|
|
1121
1121
|
return () => {
|
|
1122
1122
|
let r = { open: o.listboxState.value === 0, disabled: o.disabled.value }, { id: i, ...u } = e, c = { id: i, ref: o.labelRef, onClick: n };
|
|
1123
|
-
return
|
|
1123
|
+
return j({ ourProps: c, theirProps: u, slot: r, attrs: t, slots: l, name: "ListboxLabel" });
|
|
1124
1124
|
};
|
|
1125
1125
|
} });
|
|
1126
|
-
let
|
|
1126
|
+
let al = A({ 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 }) {
|
|
1127
1127
|
let n = De("ListboxButton");
|
|
1128
1128
|
o({ el: n.buttonRef, $el: n.buttonRef });
|
|
1129
1129
|
function r(a) {
|
|
@@ -1131,15 +1131,15 @@ let sl = A({ name: "ListboxButton", props: { as: { type: [Object, String], defau
|
|
|
1131
1131
|
case D.Space:
|
|
1132
1132
|
case D.Enter:
|
|
1133
1133
|
case D.ArrowDown:
|
|
1134
|
-
a.preventDefault(), n.openListbox(),
|
|
1134
|
+
a.preventDefault(), n.openListbox(), B(() => {
|
|
1135
1135
|
var s;
|
|
1136
|
-
(s = E(n.optionsRef)) == null || s.focus({ preventScroll: !0 }), n.value.value || n.goToOption(
|
|
1136
|
+
(s = E(n.optionsRef)) == null || s.focus({ preventScroll: !0 }), n.value.value || n.goToOption(I.First);
|
|
1137
1137
|
});
|
|
1138
1138
|
break;
|
|
1139
1139
|
case D.ArrowUp:
|
|
1140
|
-
a.preventDefault(), n.openListbox(),
|
|
1140
|
+
a.preventDefault(), n.openListbox(), B(() => {
|
|
1141
1141
|
var s;
|
|
1142
|
-
(s = E(n.optionsRef)) == null || s.focus({ preventScroll: !0 }), n.value.value || n.goToOption(
|
|
1142
|
+
(s = E(n.optionsRef)) == null || s.focus({ preventScroll: !0 }), n.value.value || n.goToOption(I.Last);
|
|
1143
1143
|
});
|
|
1144
1144
|
break;
|
|
1145
1145
|
}
|
|
@@ -1152,10 +1152,10 @@ let sl = A({ name: "ListboxButton", props: { as: { type: [Object, String], defau
|
|
|
1152
1152
|
}
|
|
1153
1153
|
}
|
|
1154
1154
|
function u(a) {
|
|
1155
|
-
n.disabled.value || (n.listboxState.value === 0 ? (n.closeListbox(),
|
|
1155
|
+
n.disabled.value || (n.listboxState.value === 0 ? (n.closeListbox(), B(() => {
|
|
1156
1156
|
var s;
|
|
1157
1157
|
return (s = E(n.buttonRef)) == null ? void 0 : s.focus({ preventScroll: !0 });
|
|
1158
|
-
})) : (a.preventDefault(), n.openListbox(),
|
|
1158
|
+
})) : (a.preventDefault(), n.openListbox(), rl(() => {
|
|
1159
1159
|
var s;
|
|
1160
1160
|
return (s = E(n.optionsRef)) == null ? void 0 : s.focus({ preventScroll: !0 });
|
|
1161
1161
|
})));
|
|
@@ -1164,9 +1164,9 @@ let sl = A({ name: "ListboxButton", props: { as: { type: [Object, String], defau
|
|
|
1164
1164
|
return () => {
|
|
1165
1165
|
var a, s;
|
|
1166
1166
|
let d = { open: n.listboxState.value === 0, disabled: n.disabled.value, value: n.value.value }, { id: v, ...f } = e, g = { ref: n.buttonRef, id: v, type: c.value, "aria-haspopup": "listbox", "aria-controls": (a = E(n.optionsRef)) == null ? void 0 : a.id, "aria-expanded": n.listboxState.value === 0, "aria-labelledby": n.labelRef.value ? [(s = E(n.labelRef)) == null ? void 0 : s.id, v].join(" ") : void 0, disabled: n.disabled.value === !0 ? !0 : void 0, onKeydown: r, onKeyup: i, onClick: u };
|
|
1167
|
-
return
|
|
1167
|
+
return j({ ourProps: g, theirProps: f, slot: d, attrs: t, slots: l, name: "ListboxButton" });
|
|
1168
1168
|
};
|
|
1169
|
-
} }),
|
|
1169
|
+
} }), sl = A({ 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 }) {
|
|
1170
1170
|
let n = De("ListboxOptions"), r = C(null);
|
|
1171
1171
|
o({ el: n.optionsRef, $el: n.optionsRef });
|
|
1172
1172
|
function i(a) {
|
|
@@ -1179,23 +1179,23 @@ let sl = A({ name: "ListboxButton", props: { as: { type: [Object, String], defau
|
|
|
1179
1179
|
let s = n.options.value[n.activeOptionIndex.value];
|
|
1180
1180
|
n.select(s.dataRef.value);
|
|
1181
1181
|
}
|
|
1182
|
-
n.mode.value === 0 && (n.closeListbox(),
|
|
1182
|
+
n.mode.value === 0 && (n.closeListbox(), B(() => {
|
|
1183
1183
|
var s;
|
|
1184
1184
|
return (s = E(n.buttonRef)) == null ? void 0 : s.focus({ preventScroll: !0 });
|
|
1185
1185
|
}));
|
|
1186
1186
|
break;
|
|
1187
|
-
case
|
|
1188
|
-
return a.preventDefault(), a.stopPropagation(), n.goToOption(
|
|
1189
|
-
case
|
|
1190
|
-
return a.preventDefault(), a.stopPropagation(), n.goToOption(
|
|
1187
|
+
case K(n.orientation.value, { vertical: D.ArrowDown, horizontal: D.ArrowRight }):
|
|
1188
|
+
return a.preventDefault(), a.stopPropagation(), n.goToOption(I.Next);
|
|
1189
|
+
case K(n.orientation.value, { vertical: D.ArrowUp, horizontal: D.ArrowLeft }):
|
|
1190
|
+
return a.preventDefault(), a.stopPropagation(), n.goToOption(I.Previous);
|
|
1191
1191
|
case D.Home:
|
|
1192
1192
|
case D.PageUp:
|
|
1193
|
-
return a.preventDefault(), a.stopPropagation(), n.goToOption(
|
|
1193
|
+
return a.preventDefault(), a.stopPropagation(), n.goToOption(I.First);
|
|
1194
1194
|
case D.End:
|
|
1195
1195
|
case D.PageDown:
|
|
1196
|
-
return a.preventDefault(), a.stopPropagation(), n.goToOption(
|
|
1196
|
+
return a.preventDefault(), a.stopPropagation(), n.goToOption(I.Last);
|
|
1197
1197
|
case D.Escape:
|
|
1198
|
-
a.preventDefault(), a.stopPropagation(), n.closeListbox(),
|
|
1198
|
+
a.preventDefault(), a.stopPropagation(), n.closeListbox(), B(() => {
|
|
1199
1199
|
var s;
|
|
1200
1200
|
return (s = E(n.buttonRef)) == null ? void 0 : s.focus({ preventScroll: !0 });
|
|
1201
1201
|
});
|
|
@@ -1212,12 +1212,12 @@ let sl = A({ name: "ListboxButton", props: { as: { type: [Object, String], defau
|
|
|
1212
1212
|
return () => {
|
|
1213
1213
|
var a, s, d, v;
|
|
1214
1214
|
let f = { open: n.listboxState.value === 0 }, { id: g, ...m } = e, h = { "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": (v = (s = E(n.labelRef)) == null ? void 0 : s.id) != null ? v : (d = E(n.buttonRef)) == null ? void 0 : d.id, "aria-orientation": n.orientation.value, id: g, onKeydown: i, role: "listbox", tabIndex: 0, ref: n.optionsRef };
|
|
1215
|
-
return
|
|
1215
|
+
return j({ ourProps: h, theirProps: m, slot: f, attrs: t, slots: l, features: Re.RenderStrategy | Re.Static, visible: c.value, name: "ListboxOptions" });
|
|
1216
1216
|
};
|
|
1217
|
-
} }),
|
|
1217
|
+
} }), ul = A({ 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 }) {
|
|
1218
1218
|
let n = De("ListboxOption"), r = C(null);
|
|
1219
1219
|
o({ el: r, $el: r });
|
|
1220
|
-
let i = k(() => n.activeOptionIndex.value !== null ? n.options.value[n.activeOptionIndex.value].id === e.id : !1), u = k(() =>
|
|
1220
|
+
let i = k(() => n.activeOptionIndex.value !== null ? n.options.value[n.activeOptionIndex.value].id === e.id : !1), u = k(() => K(n.mode.value, { 0: () => n.compare(X(n.value.value), X(e.value)), 1: () => X(n.value.value).some((b) => n.compare(X(b), X(e.value))) })), c = k(() => K(n.mode.value, { 1: () => {
|
|
1221
1221
|
var b;
|
|
1222
1222
|
let y = X(n.value.value);
|
|
1223
1223
|
return ((b = n.options.value.find((x) => y.some((w) => n.compare(X(w), X(x.dataRef.value))))) == null ? void 0 : b.id) === e.id;
|
|
@@ -1226,14 +1226,14 @@ let sl = A({ name: "ListboxButton", props: { as: { type: [Object, String], defau
|
|
|
1226
1226
|
}, domRef: r }));
|
|
1227
1227
|
ee(() => n.registerOption(e.id, s)), Ne(() => n.unregisterOption(e.id)), ee(() => {
|
|
1228
1228
|
Q([n.listboxState, u], () => {
|
|
1229
|
-
n.listboxState.value === 0 && u.value &&
|
|
1230
|
-
c.value && n.goToOption(
|
|
1229
|
+
n.listboxState.value === 0 && u.value && K(n.mode.value, { 1: () => {
|
|
1230
|
+
c.value && n.goToOption(I.Specific, e.id);
|
|
1231
1231
|
}, 0: () => {
|
|
1232
|
-
n.goToOption(
|
|
1232
|
+
n.goToOption(I.Specific, e.id);
|
|
1233
1233
|
} });
|
|
1234
1234
|
}, { immediate: !0 });
|
|
1235
1235
|
}), xe(() => {
|
|
1236
|
-
n.listboxState.value === 0 && i.value && n.activationTrigger.value !== 0 &&
|
|
1236
|
+
n.listboxState.value === 0 && i.value && n.activationTrigger.value !== 0 && B(() => {
|
|
1237
1237
|
var b, y;
|
|
1238
1238
|
return (y = (b = E(r)) == null ? void 0 : b.scrollIntoView) == null ? void 0 : y.call(b, { block: "nearest" });
|
|
1239
1239
|
});
|
|
@@ -1241,45 +1241,45 @@ let sl = A({ name: "ListboxButton", props: { as: { type: [Object, String], defau
|
|
|
1241
1241
|
function d(b) {
|
|
1242
1242
|
if (e.disabled)
|
|
1243
1243
|
return b.preventDefault();
|
|
1244
|
-
n.select(e.value), n.mode.value === 0 && (n.closeListbox(),
|
|
1244
|
+
n.select(e.value), n.mode.value === 0 && (n.closeListbox(), B(() => {
|
|
1245
1245
|
var y;
|
|
1246
1246
|
return (y = E(n.buttonRef)) == null ? void 0 : y.focus({ preventScroll: !0 });
|
|
1247
1247
|
}));
|
|
1248
1248
|
}
|
|
1249
1249
|
function v() {
|
|
1250
1250
|
if (e.disabled)
|
|
1251
|
-
return n.goToOption(
|
|
1252
|
-
n.goToOption(
|
|
1251
|
+
return n.goToOption(I.Nothing);
|
|
1252
|
+
n.goToOption(I.Specific, e.id);
|
|
1253
1253
|
}
|
|
1254
1254
|
let f = pn();
|
|
1255
1255
|
function g(b) {
|
|
1256
1256
|
f.update(b);
|
|
1257
1257
|
}
|
|
1258
1258
|
function m(b) {
|
|
1259
|
-
f.wasMoved(b) && (e.disabled || i.value || n.goToOption(
|
|
1259
|
+
f.wasMoved(b) && (e.disabled || i.value || n.goToOption(I.Specific, e.id, 0));
|
|
1260
1260
|
}
|
|
1261
1261
|
function h(b) {
|
|
1262
|
-
f.wasMoved(b) && (e.disabled || i.value && n.goToOption(
|
|
1262
|
+
f.wasMoved(b) && (e.disabled || i.value && n.goToOption(I.Nothing));
|
|
1263
1263
|
}
|
|
1264
1264
|
return () => {
|
|
1265
|
-
let { disabled: b } = e, y = { active: i.value, selected: u.value, disabled: b }, { id: x, value: w, disabled: S, ...
|
|
1266
|
-
return
|
|
1265
|
+
let { disabled: b } = e, y = { active: i.value, selected: u.value, disabled: b }, { id: x, value: w, disabled: S, ...P } = e, O = { id: x, ref: r, role: "option", tabIndex: b === !0 ? void 0 : -1, "aria-disabled": b === !0 ? !0 : void 0, "aria-selected": u.value, disabled: void 0, onClick: d, onFocus: v, onPointerenter: g, onMouseenter: g, onPointermove: m, onMousemove: m, onPointerleave: h, onMouseleave: h };
|
|
1266
|
+
return j({ ourProps: O, theirProps: P, slot: y, attrs: l, slots: t, name: "ListboxOption" });
|
|
1267
1267
|
};
|
|
1268
1268
|
} });
|
|
1269
|
-
var
|
|
1270
|
-
function
|
|
1269
|
+
var cl = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(cl || {}), dl = ((e) => (e[e.Pointer = 0] = "Pointer", e[e.Other = 1] = "Other", e))(dl || {});
|
|
1270
|
+
function fl(e) {
|
|
1271
1271
|
requestAnimationFrame(() => requestAnimationFrame(e));
|
|
1272
1272
|
}
|
|
1273
1273
|
let bn = Symbol("MenuContext");
|
|
1274
|
-
function
|
|
1274
|
+
function He(e) {
|
|
1275
1275
|
let t = he(bn, null);
|
|
1276
1276
|
if (t === null) {
|
|
1277
1277
|
let l = new Error(`<${e} /> is missing a parent <Menu /> component.`);
|
|
1278
|
-
throw Error.captureStackTrace && Error.captureStackTrace(l,
|
|
1278
|
+
throw Error.captureStackTrace && Error.captureStackTrace(l, He), l;
|
|
1279
1279
|
}
|
|
1280
1280
|
return t;
|
|
1281
1281
|
}
|
|
1282
|
-
let
|
|
1282
|
+
let pl = A({ name: "Menu", props: { as: { type: [Object, String], default: "template" } }, setup(e, { slots: t, attrs: l }) {
|
|
1283
1283
|
let o = C(1), n = C(null), r = C(null), i = C([]), u = C(""), c = C(null), a = C(1);
|
|
1284
1284
|
function s(v = (f) => f) {
|
|
1285
1285
|
let f = c.value !== null ? i.value[c.value] : null, g = ct(v(i.value.slice()), (h) => E(h.dataRef.domRef)), m = f ? g.indexOf(f) : null;
|
|
@@ -1288,7 +1288,7 @@ let ml = A({ name: "Menu", props: { as: { type: [Object, String], default: "temp
|
|
|
1288
1288
|
let d = { menuState: o, buttonRef: n, itemsRef: r, items: i, searchQuery: u, activeItemIndex: c, activationTrigger: a, closeMenu: () => {
|
|
1289
1289
|
o.value = 1, c.value = null;
|
|
1290
1290
|
}, openMenu: () => o.value = 0, goToItem(v, f, g) {
|
|
1291
|
-
let m = s(), h = en(v ===
|
|
1291
|
+
let m = s(), h = en(v === I.Specific ? { focus: I.Specific, id: f } : { focus: v }, { resolveItems: () => m.items, resolveActiveIndex: () => m.activeItemIndex, resolveId: (b) => b.id, resolveDisabled: (b) => b.dataRef.disabled });
|
|
1292
1292
|
u.value = "", c.value = h, a.value = g ?? 1, i.value = m.items;
|
|
1293
1293
|
}, search(v) {
|
|
1294
1294
|
let f = u.value !== "" ? 0 : 1;
|
|
@@ -1310,27 +1310,27 @@ let ml = A({ name: "Menu", props: { as: { type: [Object, String], default: "temp
|
|
|
1310
1310
|
return an([n, r], (v, f) => {
|
|
1311
1311
|
var g;
|
|
1312
1312
|
d.closeMenu(), ze(f, je.Loose) || (v.preventDefault(), (g = E(n)) == null || g.focus());
|
|
1313
|
-
}, k(() => o.value === 0)), ye(bn, d), on(k(() =>
|
|
1313
|
+
}, k(() => o.value === 0)), ye(bn, d), on(k(() => K(o.value, { 0: te.Open, 1: te.Closed }))), () => {
|
|
1314
1314
|
let v = { open: o.value === 0, close: d.closeMenu };
|
|
1315
|
-
return
|
|
1315
|
+
return j({ ourProps: {}, theirProps: e, slot: v, slots: t, attrs: l, name: "Menu" });
|
|
1316
1316
|
};
|
|
1317
|
-
} }),
|
|
1318
|
-
let n =
|
|
1317
|
+
} }), ml = A({ 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 }) {
|
|
1318
|
+
let n = He("MenuButton");
|
|
1319
1319
|
o({ el: n.buttonRef, $el: n.buttonRef });
|
|
1320
1320
|
function r(a) {
|
|
1321
1321
|
switch (a.key) {
|
|
1322
1322
|
case D.Space:
|
|
1323
1323
|
case D.Enter:
|
|
1324
1324
|
case D.ArrowDown:
|
|
1325
|
-
a.preventDefault(), a.stopPropagation(), n.openMenu(),
|
|
1325
|
+
a.preventDefault(), a.stopPropagation(), n.openMenu(), B(() => {
|
|
1326
1326
|
var s;
|
|
1327
|
-
(s = E(n.itemsRef)) == null || s.focus({ preventScroll: !0 }), n.goToItem(
|
|
1327
|
+
(s = E(n.itemsRef)) == null || s.focus({ preventScroll: !0 }), n.goToItem(I.First);
|
|
1328
1328
|
});
|
|
1329
1329
|
break;
|
|
1330
1330
|
case D.ArrowUp:
|
|
1331
|
-
a.preventDefault(), a.stopPropagation(), n.openMenu(),
|
|
1331
|
+
a.preventDefault(), a.stopPropagation(), n.openMenu(), B(() => {
|
|
1332
1332
|
var s;
|
|
1333
|
-
(s = E(n.itemsRef)) == null || s.focus({ preventScroll: !0 }), n.goToItem(
|
|
1333
|
+
(s = E(n.itemsRef)) == null || s.focus({ preventScroll: !0 }), n.goToItem(I.Last);
|
|
1334
1334
|
});
|
|
1335
1335
|
break;
|
|
1336
1336
|
}
|
|
@@ -1343,10 +1343,10 @@ let ml = A({ name: "Menu", props: { as: { type: [Object, String], default: "temp
|
|
|
1343
1343
|
}
|
|
1344
1344
|
}
|
|
1345
1345
|
function u(a) {
|
|
1346
|
-
e.disabled || (n.menuState.value === 0 ? (n.closeMenu(),
|
|
1346
|
+
e.disabled || (n.menuState.value === 0 ? (n.closeMenu(), B(() => {
|
|
1347
1347
|
var s;
|
|
1348
1348
|
return (s = E(n.buttonRef)) == null ? void 0 : s.focus({ preventScroll: !0 });
|
|
1349
|
-
})) : (a.preventDefault(), n.openMenu(),
|
|
1349
|
+
})) : (a.preventDefault(), n.openMenu(), fl(() => {
|
|
1350
1350
|
var s;
|
|
1351
1351
|
return (s = E(n.itemsRef)) == null ? void 0 : s.focus({ preventScroll: !0 });
|
|
1352
1352
|
})));
|
|
@@ -1355,11 +1355,11 @@ let ml = A({ name: "Menu", props: { as: { type: [Object, String], default: "temp
|
|
|
1355
1355
|
return () => {
|
|
1356
1356
|
var a;
|
|
1357
1357
|
let s = { open: n.menuState.value === 0 }, { id: d, ...v } = e, f = { ref: n.buttonRef, id: d, type: c.value, "aria-haspopup": "menu", "aria-controls": (a = E(n.itemsRef)) == null ? void 0 : a.id, "aria-expanded": n.menuState.value === 0, onKeydown: r, onKeyup: i, onClick: u };
|
|
1358
|
-
return
|
|
1358
|
+
return j({ ourProps: f, theirProps: v, slot: s, attrs: t, slots: l, name: "MenuButton" });
|
|
1359
1359
|
};
|
|
1360
|
-
} }),
|
|
1361
|
-
let n =
|
|
1362
|
-
o({ el: n.itemsRef, $el: n.itemsRef }),
|
|
1360
|
+
} }), vl = A({ 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 }) {
|
|
1361
|
+
let n = He("MenuItems"), r = C(null);
|
|
1362
|
+
o({ el: n.itemsRef, $el: n.itemsRef }), jo({ container: k(() => E(n.itemsRef)), enabled: k(() => n.menuState.value === 0), accept(s) {
|
|
1363
1363
|
return s.getAttribute("role") === "menuitem" ? NodeFilter.FILTER_REJECT : s.hasAttribute("role") ? NodeFilter.FILTER_SKIP : NodeFilter.FILTER_ACCEPT;
|
|
1364
1364
|
}, walk(s) {
|
|
1365
1365
|
s.setAttribute("role", "none");
|
|
@@ -1378,23 +1378,23 @@ let ml = A({ name: "Menu", props: { as: { type: [Object, String], default: "temp
|
|
|
1378
1378
|
n.closeMenu(), rn(E(n.buttonRef));
|
|
1379
1379
|
break;
|
|
1380
1380
|
case D.ArrowDown:
|
|
1381
|
-
return s.preventDefault(), s.stopPropagation(), n.goToItem(
|
|
1381
|
+
return s.preventDefault(), s.stopPropagation(), n.goToItem(I.Next);
|
|
1382
1382
|
case D.ArrowUp:
|
|
1383
|
-
return s.preventDefault(), s.stopPropagation(), n.goToItem(
|
|
1383
|
+
return s.preventDefault(), s.stopPropagation(), n.goToItem(I.Previous);
|
|
1384
1384
|
case D.Home:
|
|
1385
1385
|
case D.PageUp:
|
|
1386
|
-
return s.preventDefault(), s.stopPropagation(), n.goToItem(
|
|
1386
|
+
return s.preventDefault(), s.stopPropagation(), n.goToItem(I.First);
|
|
1387
1387
|
case D.End:
|
|
1388
1388
|
case D.PageDown:
|
|
1389
|
-
return s.preventDefault(), s.stopPropagation(), n.goToItem(
|
|
1389
|
+
return s.preventDefault(), s.stopPropagation(), n.goToItem(I.Last);
|
|
1390
1390
|
case D.Escape:
|
|
1391
|
-
s.preventDefault(), s.stopPropagation(), n.closeMenu(),
|
|
1391
|
+
s.preventDefault(), s.stopPropagation(), n.closeMenu(), B(() => {
|
|
1392
1392
|
var v;
|
|
1393
1393
|
return (v = E(n.buttonRef)) == null ? void 0 : v.focus({ preventScroll: !0 });
|
|
1394
1394
|
});
|
|
1395
1395
|
break;
|
|
1396
1396
|
case D.Tab:
|
|
1397
|
-
s.preventDefault(), s.stopPropagation(), n.closeMenu(),
|
|
1397
|
+
s.preventDefault(), s.stopPropagation(), n.closeMenu(), B(() => qo(E(n.buttonRef), s.shiftKey ? tt.Previous : tt.Next));
|
|
1398
1398
|
break;
|
|
1399
1399
|
default:
|
|
1400
1400
|
s.key.length === 1 && (n.search(s.key), r.value = setTimeout(() => n.clearSearch(), 350));
|
|
@@ -1412,16 +1412,16 @@ let ml = A({ name: "Menu", props: { as: { type: [Object, String], default: "temp
|
|
|
1412
1412
|
return () => {
|
|
1413
1413
|
var s, d;
|
|
1414
1414
|
let v = { open: n.menuState.value === 0 }, { id: f, ...g } = e, m = { "aria-activedescendant": n.activeItemIndex.value === null || (s = n.items.value[n.activeItemIndex.value]) == null ? void 0 : s.id, "aria-labelledby": (d = E(n.buttonRef)) == null ? void 0 : d.id, id: f, onKeydown: i, onKeyup: u, role: "menu", tabIndex: 0, ref: n.itemsRef };
|
|
1415
|
-
return
|
|
1415
|
+
return j({ ourProps: m, theirProps: g, slot: v, attrs: t, slots: l, features: Re.RenderStrategy | Re.Static, visible: a.value, name: "MenuItems" });
|
|
1416
1416
|
};
|
|
1417
|
-
} }),
|
|
1418
|
-
let n =
|
|
1417
|
+
} }), gl = A({ 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 }) {
|
|
1418
|
+
let n = He("MenuItem"), r = C(null);
|
|
1419
1419
|
o({ el: r, $el: r });
|
|
1420
1420
|
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() {
|
|
1421
1421
|
return u();
|
|
1422
1422
|
}, domRef: r }));
|
|
1423
1423
|
ee(() => n.registerItem(e.id, c)), Ne(() => n.unregisterItem(e.id)), xe(() => {
|
|
1424
|
-
n.menuState.value === 0 && i.value && n.activationTrigger.value !== 0 &&
|
|
1424
|
+
n.menuState.value === 0 && i.value && n.activationTrigger.value !== 0 && B(() => {
|
|
1425
1425
|
var m, h;
|
|
1426
1426
|
return (h = (m = E(r)) == null ? void 0 : m.scrollIntoView) == null ? void 0 : h.call(m, { block: "nearest" });
|
|
1427
1427
|
});
|
|
@@ -1433,22 +1433,22 @@ let ml = A({ name: "Menu", props: { as: { type: [Object, String], default: "temp
|
|
|
1433
1433
|
}
|
|
1434
1434
|
function s() {
|
|
1435
1435
|
if (e.disabled)
|
|
1436
|
-
return n.goToItem(
|
|
1437
|
-
n.goToItem(
|
|
1436
|
+
return n.goToItem(I.Nothing);
|
|
1437
|
+
n.goToItem(I.Specific, e.id);
|
|
1438
1438
|
}
|
|
1439
1439
|
let d = pn();
|
|
1440
1440
|
function v(m) {
|
|
1441
1441
|
d.update(m);
|
|
1442
1442
|
}
|
|
1443
1443
|
function f(m) {
|
|
1444
|
-
d.wasMoved(m) && (e.disabled || i.value || n.goToItem(
|
|
1444
|
+
d.wasMoved(m) && (e.disabled || i.value || n.goToItem(I.Specific, e.id, 0));
|
|
1445
1445
|
}
|
|
1446
1446
|
function g(m) {
|
|
1447
|
-
d.wasMoved(m) && (e.disabled || i.value && n.goToItem(
|
|
1447
|
+
d.wasMoved(m) && (e.disabled || i.value && n.goToItem(I.Nothing));
|
|
1448
1448
|
}
|
|
1449
1449
|
return () => {
|
|
1450
1450
|
let { disabled: m } = e, h = { active: i.value, disabled: m, close: n.closeMenu }, { id: b, ...y } = e;
|
|
1451
|
-
return
|
|
1451
|
+
return j({ ourProps: { id: b, ref: r, role: "menuitem", tabIndex: m === !0 ? void 0 : -1, "aria-disabled": m === !0 ? !0 : void 0, disabled: void 0, onClick: a, onFocus: s, onPointerenter: v, onMouseenter: v, onPointermove: f, onMousemove: f, onPointerleave: g, onMouseleave: g }, theirProps: { ...l, ...y }, slot: h, attrs: l, slots: t, name: "MenuItem" });
|
|
1452
1452
|
};
|
|
1453
1453
|
} }), hn = Symbol("LabelContext");
|
|
1454
1454
|
function yn() {
|
|
@@ -1459,7 +1459,7 @@ function yn() {
|
|
|
1459
1459
|
}
|
|
1460
1460
|
return e;
|
|
1461
1461
|
}
|
|
1462
|
-
function
|
|
1462
|
+
function bl({ slot: e = {}, name: t = "Label", props: l = {} } = {}) {
|
|
1463
1463
|
let o = C([]);
|
|
1464
1464
|
function n(r) {
|
|
1465
1465
|
return o.value.push(r), () => {
|
|
@@ -1472,21 +1472,21 @@ function hl({ slot: e = {}, name: t = "Label", props: l = {} } = {}) {
|
|
|
1472
1472
|
A({ 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 }) {
|
|
1473
1473
|
let o = yn();
|
|
1474
1474
|
return ee(() => Ne(o.register(e.id))), () => {
|
|
1475
|
-
let { name: n = "Label", slot: r = {}, props: i = {} } = o, { id: u, passive: c, ...a } = e, s = { ...Object.entries(i).reduce((d, [v, f]) => Object.assign(d, { [v]:
|
|
1476
|
-
return c && (delete s.onClick, delete s.htmlFor, delete a.onClick),
|
|
1475
|
+
let { name: n = "Label", slot: r = {}, props: i = {} } = o, { id: u, passive: c, ...a } = e, s = { ...Object.entries(i).reduce((d, [v, f]) => Object.assign(d, { [v]: _(f) }), {}), id: u };
|
|
1476
|
+
return c && (delete s.onClick, delete s.htmlFor, delete a.onClick), j({ ourProps: s, theirProps: a, slot: r, attrs: l, slots: t, name: n });
|
|
1477
1477
|
};
|
|
1478
1478
|
} });
|
|
1479
1479
|
let xn = Symbol("GroupContext");
|
|
1480
1480
|
A({ name: "SwitchGroup", props: { as: { type: [Object, String], default: "template" } }, setup(e, { slots: t, attrs: l }) {
|
|
1481
|
-
let o = C(null), n =
|
|
1481
|
+
let o = C(null), n = bl({ name: "SwitchLabel", props: { htmlFor: k(() => {
|
|
1482
1482
|
var i;
|
|
1483
1483
|
return (i = o.value) == null ? void 0 : i.id;
|
|
1484
1484
|
}), onClick(i) {
|
|
1485
1485
|
o.value && (i.currentTarget.tagName === "LABEL" && i.preventDefault(), o.value.click(), o.value.focus({ preventScroll: !0 }));
|
|
1486
|
-
} } }), r =
|
|
1487
|
-
return ye(xn, { switchRef: o, labelledby: n, describedby: r }), () =>
|
|
1486
|
+
} } }), r = Jo({ name: "SwitchDescription" });
|
|
1487
|
+
return ye(xn, { switchRef: o, labelledby: n, describedby: r }), () => j({ theirProps: e, ourProps: {}, slot: {}, slots: t, attrs: l, name: "SwitchGroup" });
|
|
1488
1488
|
} });
|
|
1489
|
-
let
|
|
1489
|
+
let hl = A({ 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 }) {
|
|
1490
1490
|
let r = he(xn, null), [i, u] = fn(k(() => e.modelValue), (h) => t("update:modelValue", h), k(() => e.defaultChecked));
|
|
1491
1491
|
function c() {
|
|
1492
1492
|
u(!i.value);
|
|
@@ -1497,7 +1497,7 @@ let yl = A({ name: "Switch", emits: { "update:modelValue": (e) => !0 }, props: {
|
|
|
1497
1497
|
h.preventDefault(), c();
|
|
1498
1498
|
}
|
|
1499
1499
|
function f(h) {
|
|
1500
|
-
h.key === D.Space ? (h.preventDefault(), c()) : h.key === D.Enter &&
|
|
1500
|
+
h.key === D.Space ? (h.preventDefault(), c()) : h.key === D.Enter && Qo(h.currentTarget);
|
|
1501
1501
|
}
|
|
1502
1502
|
function g(h) {
|
|
1503
1503
|
h.preventDefault();
|
|
@@ -1519,26 +1519,26 @@ let yl = A({ name: "Switch", emits: { "update:modelValue": (e) => !0 }, props: {
|
|
|
1519
1519
|
};
|
|
1520
1520
|
}, { immediate: !0 });
|
|
1521
1521
|
}), () => {
|
|
1522
|
-
let { id: h, name: b, value: y, form: x, ...w } = e, S = { checked: i.value },
|
|
1523
|
-
return Oe(be, [b != null && i.value != null ? Oe(sn, Jt({ features: dt.Hidden, as: "input", type: "checkbox", hidden: !0, readOnly: !0, checked: i.value, form: x, name: b, value: y })) : null,
|
|
1522
|
+
let { id: h, name: b, value: y, form: x, ...w } = e, S = { checked: i.value }, P = { id: h, 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: v, onKeyup: f, onKeypress: g };
|
|
1523
|
+
return Oe(be, [b != null && i.value != null ? Oe(sn, Jt({ features: dt.Hidden, as: "input", type: "checkbox", hidden: !0, readOnly: !0, checked: i.value, form: x, name: b, value: y })) : null, j({ ourProps: P, theirProps: { ...l, ...it(w, ["modelValue", "defaultChecked"]) }, slot: S, attrs: l, slots: o, name: "Switch" })]);
|
|
1524
1524
|
};
|
|
1525
1525
|
} });
|
|
1526
1526
|
const $e = Math.min, ue = Math.max, Me = Math.round, Ie = Math.floor, ae = (e) => ({
|
|
1527
1527
|
x: e,
|
|
1528
1528
|
y: e
|
|
1529
|
-
}),
|
|
1529
|
+
}), yl = {
|
|
1530
1530
|
left: "right",
|
|
1531
1531
|
right: "left",
|
|
1532
1532
|
bottom: "top",
|
|
1533
1533
|
top: "bottom"
|
|
1534
|
-
},
|
|
1534
|
+
}, xl = {
|
|
1535
1535
|
start: "end",
|
|
1536
1536
|
end: "start"
|
|
1537
1537
|
};
|
|
1538
1538
|
function Lt(e, t, l) {
|
|
1539
1539
|
return ue(e, $e(t, l));
|
|
1540
1540
|
}
|
|
1541
|
-
function
|
|
1541
|
+
function Ue(e, t) {
|
|
1542
1542
|
return typeof e == "function" ? e(t) : e;
|
|
1543
1543
|
}
|
|
1544
1544
|
function ce(e) {
|
|
@@ -1559,20 +1559,20 @@ function Ke(e) {
|
|
|
1559
1559
|
function Sn(e) {
|
|
1560
1560
|
return wn(Ke(e));
|
|
1561
1561
|
}
|
|
1562
|
-
function
|
|
1562
|
+
function wl(e, t, l) {
|
|
1563
1563
|
l === void 0 && (l = !1);
|
|
1564
1564
|
const o = We(e), n = Sn(e), r = kn(n);
|
|
1565
1565
|
let i = n === "x" ? o === (l ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
1566
1566
|
return t.reference[r] > t.floating[r] && (i = Ve(i)), [i, Ve(i)];
|
|
1567
1567
|
}
|
|
1568
|
-
function
|
|
1568
|
+
function kl(e) {
|
|
1569
1569
|
const t = Ve(e);
|
|
1570
1570
|
return [nt(e), t, nt(t)];
|
|
1571
1571
|
}
|
|
1572
1572
|
function nt(e) {
|
|
1573
|
-
return e.replace(/start|end/g, (t) =>
|
|
1573
|
+
return e.replace(/start|end/g, (t) => xl[t]);
|
|
1574
1574
|
}
|
|
1575
|
-
function
|
|
1575
|
+
function Sl(e, t, l) {
|
|
1576
1576
|
const o = ["left", "right"], n = ["right", "left"], r = ["top", "bottom"], i = ["bottom", "top"];
|
|
1577
1577
|
switch (e) {
|
|
1578
1578
|
case "top":
|
|
@@ -1585,15 +1585,15 @@ function Cl(e, t, l) {
|
|
|
1585
1585
|
return [];
|
|
1586
1586
|
}
|
|
1587
1587
|
}
|
|
1588
|
-
function
|
|
1588
|
+
function Cl(e, t, l, o) {
|
|
1589
1589
|
const n = We(e);
|
|
1590
|
-
let r =
|
|
1590
|
+
let r = Sl(ce(e), l === "start", o);
|
|
1591
1591
|
return n && (r = r.map((i) => i + "-" + n), t && (r = r.concat(r.map(nt)))), r;
|
|
1592
1592
|
}
|
|
1593
1593
|
function Ve(e) {
|
|
1594
|
-
return e.replace(/left|right|bottom|top/g, (t) =>
|
|
1594
|
+
return e.replace(/left|right|bottom|top/g, (t) => yl[t]);
|
|
1595
1595
|
}
|
|
1596
|
-
function
|
|
1596
|
+
function Ol(e) {
|
|
1597
1597
|
return {
|
|
1598
1598
|
top: 0,
|
|
1599
1599
|
right: 0,
|
|
@@ -1602,8 +1602,8 @@ function Rl(e) {
|
|
|
1602
1602
|
...e
|
|
1603
1603
|
};
|
|
1604
1604
|
}
|
|
1605
|
-
function
|
|
1606
|
-
return typeof e != "number" ?
|
|
1605
|
+
function Rl(e) {
|
|
1606
|
+
return typeof e != "number" ? Ol(e) : {
|
|
1607
1607
|
top: e,
|
|
1608
1608
|
right: e,
|
|
1609
1609
|
bottom: e,
|
|
@@ -1667,7 +1667,7 @@ function It(e, t, l) {
|
|
|
1667
1667
|
}
|
|
1668
1668
|
return f;
|
|
1669
1669
|
}
|
|
1670
|
-
const
|
|
1670
|
+
const El = async (e, t, l) => {
|
|
1671
1671
|
const {
|
|
1672
1672
|
placement: o = "bottom",
|
|
1673
1673
|
strategy: n = "absolute",
|
|
@@ -1747,7 +1747,7 @@ async function Cn(e, t) {
|
|
|
1747
1747
|
elementContext: d = "floating",
|
|
1748
1748
|
altBoundary: v = !1,
|
|
1749
1749
|
padding: f = 0
|
|
1750
|
-
} =
|
|
1750
|
+
} = Ue(t, e), g = Rl(f), h = u[v ? d === "floating" ? "reference" : "floating" : d], b = Fe(await r.getClippingRect({
|
|
1751
1751
|
element: (l = await (r.isElement == null ? void 0 : r.isElement(h))) == null || l ? h : h.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(u.floating)),
|
|
1752
1752
|
boundary: a,
|
|
1753
1753
|
rootBoundary: s,
|
|
@@ -1774,7 +1774,7 @@ async function Cn(e, t) {
|
|
|
1774
1774
|
right: (S.right - b.right + g.right) / w.x
|
|
1775
1775
|
};
|
|
1776
1776
|
}
|
|
1777
|
-
const
|
|
1777
|
+
const Dl = function(e) {
|
|
1778
1778
|
return e === void 0 && (e = {}), {
|
|
1779
1779
|
name: "flip",
|
|
1780
1780
|
options: e,
|
|
@@ -1795,22 +1795,22 @@ const Pl = function(e) {
|
|
|
1795
1795
|
fallbackAxisSideDirection: g = "none",
|
|
1796
1796
|
flipAlignment: m = !0,
|
|
1797
1797
|
...h
|
|
1798
|
-
} =
|
|
1798
|
+
} = Ue(e, t);
|
|
1799
1799
|
if ((l = r.arrow) != null && l.alignmentOffset)
|
|
1800
1800
|
return {};
|
|
1801
|
-
const b = ce(n), y = ce(u) === u, x = await (c.isRTL == null ? void 0 : c.isRTL(a.floating)), w = v || (y || !m ? [Ve(u)] :
|
|
1802
|
-
!v && g !== "none" && w.push(...
|
|
1803
|
-
const S = [u, ...w],
|
|
1801
|
+
const b = ce(n), y = ce(u) === u, x = await (c.isRTL == null ? void 0 : c.isRTL(a.floating)), w = v || (y || !m ? [Ve(u)] : kl(u));
|
|
1802
|
+
!v && g !== "none" && w.push(...Cl(u, m, g, x));
|
|
1803
|
+
const S = [u, ...w], P = await Cn(t, h), O = [];
|
|
1804
1804
|
let N = ((o = r.flip) == null ? void 0 : o.overflows) || [];
|
|
1805
|
-
if (s && O.push(
|
|
1806
|
-
const se =
|
|
1807
|
-
O.push(
|
|
1805
|
+
if (s && O.push(P[b]), d) {
|
|
1806
|
+
const se = wl(n, i, x);
|
|
1807
|
+
O.push(P[se[0]], P[se[1]]);
|
|
1808
1808
|
}
|
|
1809
1809
|
if (N = [...N, {
|
|
1810
1810
|
placement: n,
|
|
1811
1811
|
overflows: O
|
|
1812
1812
|
}], !O.every((se) => se <= 0)) {
|
|
1813
|
-
var re,
|
|
1813
|
+
var re, Pe;
|
|
1814
1814
|
const se = (((re = r.flip) == null ? void 0 : re.index) || 0) + 1, bt = S[se];
|
|
1815
1815
|
if (bt)
|
|
1816
1816
|
return {
|
|
@@ -1822,7 +1822,7 @@ const Pl = function(e) {
|
|
|
1822
1822
|
placement: bt
|
|
1823
1823
|
}
|
|
1824
1824
|
};
|
|
1825
|
-
let we = (
|
|
1825
|
+
let we = (Pe = N.filter((fe) => fe.overflows[0] <= 0).sort((fe, pe) => fe.overflows[1] - pe.overflows[1])[0]) == null ? void 0 : Pe.placement;
|
|
1826
1826
|
if (!we)
|
|
1827
1827
|
switch (f) {
|
|
1828
1828
|
case "bestFit": {
|
|
@@ -1851,7 +1851,7 @@ async function _l(e, t) {
|
|
|
1851
1851
|
placement: l,
|
|
1852
1852
|
platform: o,
|
|
1853
1853
|
elements: n
|
|
1854
|
-
} = 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 =
|
|
1854
|
+
} = 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 = Ue(t, e);
|
|
1855
1855
|
let {
|
|
1856
1856
|
mainAxis: v,
|
|
1857
1857
|
crossAxis: f,
|
|
@@ -1874,7 +1874,7 @@ async function _l(e, t) {
|
|
|
1874
1874
|
y: f * s
|
|
1875
1875
|
};
|
|
1876
1876
|
}
|
|
1877
|
-
const
|
|
1877
|
+
const Pl = function(e) {
|
|
1878
1878
|
return e === void 0 && (e = 0), {
|
|
1879
1879
|
name: "offset",
|
|
1880
1880
|
options: e,
|
|
@@ -1896,7 +1896,7 @@ const Tl = function(e) {
|
|
|
1896
1896
|
};
|
|
1897
1897
|
}
|
|
1898
1898
|
};
|
|
1899
|
-
},
|
|
1899
|
+
}, Tl = function(e) {
|
|
1900
1900
|
return e === void 0 && (e = {}), {
|
|
1901
1901
|
name: "shift",
|
|
1902
1902
|
options: e,
|
|
@@ -1921,7 +1921,7 @@ const Tl = function(e) {
|
|
|
1921
1921
|
}
|
|
1922
1922
|
},
|
|
1923
1923
|
...c
|
|
1924
|
-
} =
|
|
1924
|
+
} = Ue(e, t), a = {
|
|
1925
1925
|
x: l,
|
|
1926
1926
|
y: o
|
|
1927
1927
|
}, s = await Cn(t, c), d = Ke(ce(n)), v = wn(d);
|
|
@@ -1972,7 +1972,7 @@ function Z(e) {
|
|
|
1972
1972
|
function At(e) {
|
|
1973
1973
|
return typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof H(e).ShadowRoot;
|
|
1974
1974
|
}
|
|
1975
|
-
function
|
|
1975
|
+
function _e(e) {
|
|
1976
1976
|
const {
|
|
1977
1977
|
overflow: t,
|
|
1978
1978
|
overflowX: l,
|
|
@@ -1981,14 +1981,14 @@ function Pe(e) {
|
|
|
1981
1981
|
} = q(e);
|
|
1982
1982
|
return /auto|scroll|overlay|hidden|clip/.test(t + o + l) && !["inline", "contents"].includes(n);
|
|
1983
1983
|
}
|
|
1984
|
-
function
|
|
1984
|
+
function Ll(e) {
|
|
1985
1985
|
return ["table", "td", "th"].includes(ne(e));
|
|
1986
1986
|
}
|
|
1987
1987
|
function pt(e) {
|
|
1988
1988
|
const t = mt(), l = q(e);
|
|
1989
1989
|
return l.transform !== "none" || l.perspective !== "none" || (l.containerType ? l.containerType !== "normal" : !1) || !t && (l.backdropFilter ? l.backdropFilter !== "none" : !1) || !t && (l.filter ? l.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((o) => (l.willChange || "").includes(o)) || ["paint", "layout", "strict", "content"].some((o) => (l.contain || "").includes(o));
|
|
1990
1990
|
}
|
|
1991
|
-
function
|
|
1991
|
+
function Il(e) {
|
|
1992
1992
|
let t = ge(e);
|
|
1993
1993
|
for (; Z(t) && !Ge(t); ) {
|
|
1994
1994
|
if (pt(t))
|
|
@@ -2029,13 +2029,13 @@ function ge(e) {
|
|
|
2029
2029
|
}
|
|
2030
2030
|
function On(e) {
|
|
2031
2031
|
const t = ge(e);
|
|
2032
|
-
return Ge(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Z(t) &&
|
|
2032
|
+
return Ge(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Z(t) && _e(t) ? t : On(t);
|
|
2033
2033
|
}
|
|
2034
2034
|
function Ee(e, t, l) {
|
|
2035
2035
|
var o;
|
|
2036
2036
|
t === void 0 && (t = []), l === void 0 && (l = !0);
|
|
2037
2037
|
const n = On(e), r = n === ((o = e.ownerDocument) == null ? void 0 : o.body), i = H(n);
|
|
2038
|
-
return r ? t.concat(i, i.visualViewport || [],
|
|
2038
|
+
return r ? t.concat(i, i.visualViewport || [], _e(n) ? n : [], i.frameElement && l ? Ee(i.frameElement) : []) : t.concat(n, Ee(n, [], l));
|
|
2039
2039
|
}
|
|
2040
2040
|
function Rn(e) {
|
|
2041
2041
|
const t = q(e);
|
|
@@ -2065,15 +2065,15 @@ function ve(e) {
|
|
|
2065
2065
|
y: u
|
|
2066
2066
|
};
|
|
2067
2067
|
}
|
|
2068
|
-
const
|
|
2068
|
+
const Al = /* @__PURE__ */ ae(0);
|
|
2069
2069
|
function En(e) {
|
|
2070
2070
|
const t = H(e);
|
|
2071
|
-
return !mt() || !t.visualViewport ?
|
|
2071
|
+
return !mt() || !t.visualViewport ? Al : {
|
|
2072
2072
|
x: t.visualViewport.offsetLeft,
|
|
2073
2073
|
y: t.visualViewport.offsetTop
|
|
2074
2074
|
};
|
|
2075
2075
|
}
|
|
2076
|
-
function
|
|
2076
|
+
function $l(e, t, l) {
|
|
2077
2077
|
return t === void 0 && (t = !1), !l || t && l !== H(e) ? !1 : t;
|
|
2078
2078
|
}
|
|
2079
2079
|
function de(e, t, l, o) {
|
|
@@ -2081,7 +2081,7 @@ function de(e, t, l, o) {
|
|
|
2081
2081
|
const n = e.getBoundingClientRect(), r = vt(e);
|
|
2082
2082
|
let i = ae(1);
|
|
2083
2083
|
t && (o ? oe(o) && (i = ve(o)) : i = ve(e));
|
|
2084
|
-
const u =
|
|
2084
|
+
const u = $l(r, l, o) ? En(r) : ae(0);
|
|
2085
2085
|
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;
|
|
2086
2086
|
if (r) {
|
|
2087
2087
|
const v = H(r), f = o && oe(o) ? H(o) : o;
|
|
@@ -2098,7 +2098,7 @@ function de(e, t, l, o) {
|
|
|
2098
2098
|
y: a
|
|
2099
2099
|
});
|
|
2100
2100
|
}
|
|
2101
|
-
function
|
|
2101
|
+
function Ml(e) {
|
|
2102
2102
|
let {
|
|
2103
2103
|
rect: t,
|
|
2104
2104
|
offsetParent: l,
|
|
@@ -2112,7 +2112,7 @@ function Vl(e) {
|
|
|
2112
2112
|
scrollTop: 0
|
|
2113
2113
|
}, u = ae(1);
|
|
2114
2114
|
const c = ae(0);
|
|
2115
|
-
if ((n || !n && o !== "fixed") && ((ne(l) !== "body" ||
|
|
2115
|
+
if ((n || !n && o !== "fixed") && ((ne(l) !== "body" || _e(r)) && (i = qe(l)), Z(l))) {
|
|
2116
2116
|
const a = de(l);
|
|
2117
2117
|
u = ve(l), c.x = a.x + l.clientLeft, c.y = a.y + l.clientTop;
|
|
2118
2118
|
}
|
|
@@ -2123,13 +2123,13 @@ function Vl(e) {
|
|
|
2123
2123
|
y: t.y * u.y - i.scrollTop * u.y + c.y
|
|
2124
2124
|
};
|
|
2125
2125
|
}
|
|
2126
|
-
function
|
|
2126
|
+
function Vl(e) {
|
|
2127
2127
|
return Array.from(e.getClientRects());
|
|
2128
2128
|
}
|
|
2129
2129
|
function Dn(e) {
|
|
2130
2130
|
return de(le(e)).left + qe(e).scrollLeft;
|
|
2131
2131
|
}
|
|
2132
|
-
function
|
|
2132
|
+
function Fl(e) {
|
|
2133
2133
|
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);
|
|
2134
2134
|
let i = -l.scrollLeft + Dn(e);
|
|
2135
2135
|
const u = -l.scrollTop;
|
|
@@ -2140,7 +2140,7 @@ function Nl(e) {
|
|
|
2140
2140
|
y: u
|
|
2141
2141
|
};
|
|
2142
2142
|
}
|
|
2143
|
-
function
|
|
2143
|
+
function Nl(e, t) {
|
|
2144
2144
|
const l = H(e), o = le(e), n = l.visualViewport;
|
|
2145
2145
|
let r = o.clientWidth, i = o.clientHeight, u = 0, c = 0;
|
|
2146
2146
|
if (n) {
|
|
@@ -2155,7 +2155,7 @@ function Bl(e, t) {
|
|
|
2155
2155
|
y: c
|
|
2156
2156
|
};
|
|
2157
2157
|
}
|
|
2158
|
-
function
|
|
2158
|
+
function Bl(e, t) {
|
|
2159
2159
|
const l = de(e, !0, t === "fixed"), o = l.top + e.clientTop, n = l.left + e.clientLeft, r = Z(e) ? ve(e) : ae(1), i = e.clientWidth * r.x, u = e.clientHeight * r.y, c = n * r.x, a = o * r.y;
|
|
2160
2160
|
return {
|
|
2161
2161
|
width: i,
|
|
@@ -2167,11 +2167,11 @@ function jl(e, t) {
|
|
|
2167
2167
|
function $t(e, t, l) {
|
|
2168
2168
|
let o;
|
|
2169
2169
|
if (t === "viewport")
|
|
2170
|
-
o =
|
|
2170
|
+
o = Nl(e, l);
|
|
2171
2171
|
else if (t === "document")
|
|
2172
|
-
o =
|
|
2172
|
+
o = Fl(le(e));
|
|
2173
2173
|
else if (oe(t))
|
|
2174
|
-
o =
|
|
2174
|
+
o = Bl(t, l);
|
|
2175
2175
|
else {
|
|
2176
2176
|
const n = En(e);
|
|
2177
2177
|
o = {
|
|
@@ -2182,11 +2182,11 @@ function $t(e, t, l) {
|
|
|
2182
2182
|
}
|
|
2183
2183
|
return Fe(o);
|
|
2184
2184
|
}
|
|
2185
|
-
function
|
|
2185
|
+
function _n(e, t) {
|
|
2186
2186
|
const l = ge(e);
|
|
2187
|
-
return l === t || !oe(l) || Ge(l) ? !1 : q(l).position === "fixed" ||
|
|
2187
|
+
return l === t || !oe(l) || Ge(l) ? !1 : q(l).position === "fixed" || _n(l, t);
|
|
2188
2188
|
}
|
|
2189
|
-
function
|
|
2189
|
+
function jl(e, t) {
|
|
2190
2190
|
const l = t.get(e);
|
|
2191
2191
|
if (l)
|
|
2192
2192
|
return l;
|
|
@@ -2195,18 +2195,18 @@ function zl(e, t) {
|
|
|
2195
2195
|
let i = r ? ge(e) : e;
|
|
2196
2196
|
for (; oe(i) && !Ge(i); ) {
|
|
2197
2197
|
const u = q(i), c = pt(i);
|
|
2198
|
-
!c && u.position === "fixed" && (n = null), (r ? !c && !n : !c && u.position === "static" && !!n && ["absolute", "fixed"].includes(n.position) ||
|
|
2198
|
+
!c && u.position === "fixed" && (n = null), (r ? !c && !n : !c && u.position === "static" && !!n && ["absolute", "fixed"].includes(n.position) || _e(i) && !c && _n(e, i)) ? o = o.filter((s) => s !== i) : n = u, i = ge(i);
|
|
2199
2199
|
}
|
|
2200
2200
|
return t.set(e, o), o;
|
|
2201
2201
|
}
|
|
2202
|
-
function
|
|
2202
|
+
function zl(e) {
|
|
2203
2203
|
let {
|
|
2204
2204
|
element: t,
|
|
2205
2205
|
boundary: l,
|
|
2206
2206
|
rootBoundary: o,
|
|
2207
2207
|
strategy: n
|
|
2208
2208
|
} = e;
|
|
2209
|
-
const i = [...l === "clippingAncestors" ?
|
|
2209
|
+
const i = [...l === "clippingAncestors" ? jl(t, this._c) : [].concat(l), o], u = i[0], c = i.reduce((a, s) => {
|
|
2210
2210
|
const d = $t(t, s, n);
|
|
2211
2211
|
return a.top = ue(d.top, a.top), a.right = $e(d.right, a.right), a.bottom = $e(d.bottom, a.bottom), a.left = ue(d.left, a.left), a;
|
|
2212
2212
|
}, $t(t, u, n));
|
|
@@ -2227,7 +2227,7 @@ function Hl(e) {
|
|
|
2227
2227
|
height: l
|
|
2228
2228
|
};
|
|
2229
2229
|
}
|
|
2230
|
-
function
|
|
2230
|
+
function Ul(e, t, l) {
|
|
2231
2231
|
const o = Z(t), n = le(t), r = l === "fixed", i = de(e, !0, r, t);
|
|
2232
2232
|
let u = {
|
|
2233
2233
|
scrollLeft: 0,
|
|
@@ -2235,7 +2235,7 @@ function Wl(e, t, l) {
|
|
|
2235
2235
|
};
|
|
2236
2236
|
const c = ae(0);
|
|
2237
2237
|
if (o || !o && !r)
|
|
2238
|
-
if ((ne(t) !== "body" ||
|
|
2238
|
+
if ((ne(t) !== "body" || _e(n)) && (u = qe(t)), o) {
|
|
2239
2239
|
const a = de(t, !0, r, t);
|
|
2240
2240
|
c.x = a.x + t.clientLeft, c.y = a.y + t.clientTop;
|
|
2241
2241
|
} else
|
|
@@ -2250,24 +2250,24 @@ function Wl(e, t, l) {
|
|
|
2250
2250
|
function Mt(e, t) {
|
|
2251
2251
|
return !Z(e) || q(e).position === "fixed" ? null : t ? t(e) : e.offsetParent;
|
|
2252
2252
|
}
|
|
2253
|
-
function
|
|
2253
|
+
function Pn(e, t) {
|
|
2254
2254
|
const l = H(e);
|
|
2255
2255
|
if (!Z(e))
|
|
2256
2256
|
return l;
|
|
2257
2257
|
let o = Mt(e, t);
|
|
2258
|
-
for (; o &&
|
|
2258
|
+
for (; o && Ll(o) && q(o).position === "static"; )
|
|
2259
2259
|
o = Mt(o, t);
|
|
2260
|
-
return o && (ne(o) === "html" || ne(o) === "body" && q(o).position === "static" && !pt(o)) ? l : o ||
|
|
2260
|
+
return o && (ne(o) === "html" || ne(o) === "body" && q(o).position === "static" && !pt(o)) ? l : o || Il(e) || l;
|
|
2261
2261
|
}
|
|
2262
|
-
const
|
|
2262
|
+
const Wl = async function(e) {
|
|
2263
2263
|
let {
|
|
2264
2264
|
reference: t,
|
|
2265
2265
|
floating: l,
|
|
2266
2266
|
strategy: o
|
|
2267
2267
|
} = e;
|
|
2268
|
-
const n = this.getOffsetParent ||
|
|
2268
|
+
const n = this.getOffsetParent || Pn, r = this.getDimensions;
|
|
2269
2269
|
return {
|
|
2270
|
-
reference:
|
|
2270
|
+
reference: Ul(t, await n(l), o),
|
|
2271
2271
|
floating: {
|
|
2272
2272
|
x: 0,
|
|
2273
2273
|
y: 0,
|
|
@@ -2275,22 +2275,22 @@ const Kl = async function(e) {
|
|
|
2275
2275
|
}
|
|
2276
2276
|
};
|
|
2277
2277
|
};
|
|
2278
|
-
function
|
|
2278
|
+
function Kl(e) {
|
|
2279
2279
|
return q(e).direction === "rtl";
|
|
2280
2280
|
}
|
|
2281
|
-
const
|
|
2282
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
2281
|
+
const Gl = {
|
|
2282
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: Ml,
|
|
2283
2283
|
getDocumentElement: le,
|
|
2284
|
-
getClippingRect:
|
|
2285
|
-
getOffsetParent:
|
|
2286
|
-
getElementRects:
|
|
2287
|
-
getClientRects:
|
|
2284
|
+
getClippingRect: zl,
|
|
2285
|
+
getOffsetParent: Pn,
|
|
2286
|
+
getElementRects: Wl,
|
|
2287
|
+
getClientRects: Vl,
|
|
2288
2288
|
getDimensions: Hl,
|
|
2289
2289
|
getScale: ve,
|
|
2290
2290
|
isElement: oe,
|
|
2291
|
-
isRTL:
|
|
2291
|
+
isRTL: Kl
|
|
2292
2292
|
};
|
|
2293
|
-
function
|
|
2293
|
+
function ql(e, t) {
|
|
2294
2294
|
let l = null, o;
|
|
2295
2295
|
const n = le(e);
|
|
2296
2296
|
function r() {
|
|
@@ -2312,11 +2312,11 @@ function Xl(e, t) {
|
|
|
2312
2312
|
};
|
|
2313
2313
|
let x = !0;
|
|
2314
2314
|
function w(S) {
|
|
2315
|
-
const
|
|
2316
|
-
if (
|
|
2315
|
+
const P = S[0].intersectionRatio;
|
|
2316
|
+
if (P !== c) {
|
|
2317
2317
|
if (!x)
|
|
2318
2318
|
return i();
|
|
2319
|
-
|
|
2319
|
+
P ? i(!1, P) : o = setTimeout(() => {
|
|
2320
2320
|
i(!1, 1e-7);
|
|
2321
2321
|
}, 100);
|
|
2322
2322
|
}
|
|
@@ -2335,7 +2335,7 @@ function Xl(e, t) {
|
|
|
2335
2335
|
}
|
|
2336
2336
|
return i(!0), r;
|
|
2337
2337
|
}
|
|
2338
|
-
function
|
|
2338
|
+
function Xl(e, t, l, o) {
|
|
2339
2339
|
o === void 0 && (o = {});
|
|
2340
2340
|
const {
|
|
2341
2341
|
ancestorScroll: n = !0,
|
|
@@ -2349,7 +2349,7 @@ function Yl(e, t, l, o) {
|
|
|
2349
2349
|
passive: !0
|
|
2350
2350
|
}), r && b.addEventListener("resize", l);
|
|
2351
2351
|
});
|
|
2352
|
-
const d = a && u ?
|
|
2352
|
+
const d = a && u ? ql(a, l) : null;
|
|
2353
2353
|
let v = -1, f = null;
|
|
2354
2354
|
i && (f = new ResizeObserver((b) => {
|
|
2355
2355
|
let [y] = b;
|
|
@@ -2369,24 +2369,24 @@ function Yl(e, t, l, o) {
|
|
|
2369
2369
|
}), d && d(), f && f.disconnect(), f = null, c && cancelAnimationFrame(g);
|
|
2370
2370
|
};
|
|
2371
2371
|
}
|
|
2372
|
-
const
|
|
2372
|
+
const Yl = Tl, Ql = Dl, Zl = (e, t, l) => {
|
|
2373
2373
|
const o = /* @__PURE__ */ new Map(), n = {
|
|
2374
|
-
platform:
|
|
2374
|
+
platform: Gl,
|
|
2375
2375
|
...l
|
|
2376
2376
|
}, r = {
|
|
2377
2377
|
...n.platform,
|
|
2378
2378
|
_c: o
|
|
2379
2379
|
};
|
|
2380
|
-
return
|
|
2380
|
+
return El(e, t, {
|
|
2381
2381
|
...n,
|
|
2382
2382
|
platform: r
|
|
2383
2383
|
});
|
|
2384
2384
|
};
|
|
2385
|
-
function
|
|
2385
|
+
function Jl(e) {
|
|
2386
2386
|
return e != null && typeof e == "object" && "$el" in e;
|
|
2387
2387
|
}
|
|
2388
2388
|
function Vt(e) {
|
|
2389
|
-
if (
|
|
2389
|
+
if (Jl(e)) {
|
|
2390
2390
|
const t = e.$el;
|
|
2391
2391
|
return ft(t) && ne(t) === "#comment" ? null : t;
|
|
2392
2392
|
}
|
|
@@ -2399,20 +2399,20 @@ function Ft(e, t) {
|
|
|
2399
2399
|
const l = Tn(e);
|
|
2400
2400
|
return Math.round(t * l) / l;
|
|
2401
2401
|
}
|
|
2402
|
-
function
|
|
2402
|
+
function er(e, t, l) {
|
|
2403
2403
|
l === void 0 && (l = {});
|
|
2404
2404
|
const o = l.whileElementsMounted, n = k(() => {
|
|
2405
2405
|
var O;
|
|
2406
|
-
return (O =
|
|
2407
|
-
}), r = k(() =>
|
|
2406
|
+
return (O = _(l.open)) != null ? O : !0;
|
|
2407
|
+
}), r = k(() => _(l.middleware)), i = k(() => {
|
|
2408
2408
|
var O;
|
|
2409
|
-
return (O =
|
|
2409
|
+
return (O = _(l.placement)) != null ? O : "bottom";
|
|
2410
2410
|
}), u = k(() => {
|
|
2411
2411
|
var O;
|
|
2412
|
-
return (O =
|
|
2412
|
+
return (O = _(l.strategy)) != null ? O : "absolute";
|
|
2413
2413
|
}), c = k(() => {
|
|
2414
2414
|
var O;
|
|
2415
|
-
return (O =
|
|
2415
|
+
return (O = _(l.transform)) != null ? O : !0;
|
|
2416
2416
|
}), a = k(() => Vt(e.value)), s = k(() => Vt(t.value)), d = C(0), v = C(0), f = C(u.value), g = C(i.value), m = Vn({}), h = C(!1), b = k(() => {
|
|
2417
2417
|
const O = {
|
|
2418
2418
|
position: f.value,
|
|
@@ -2436,7 +2436,7 @@ function tr(e, t, l) {
|
|
|
2436
2436
|
});
|
|
2437
2437
|
let y;
|
|
2438
2438
|
function x() {
|
|
2439
|
-
a.value == null || s.value == null ||
|
|
2439
|
+
a.value == null || s.value == null || Zl(a.value, s.value, {
|
|
2440
2440
|
middleware: r.value,
|
|
2441
2441
|
placement: i.value,
|
|
2442
2442
|
strategy: u.value
|
|
@@ -2457,14 +2457,14 @@ function tr(e, t, l) {
|
|
|
2457
2457
|
return;
|
|
2458
2458
|
}
|
|
2459
2459
|
}
|
|
2460
|
-
function
|
|
2460
|
+
function P() {
|
|
2461
2461
|
n.value || (h.value = !1);
|
|
2462
2462
|
}
|
|
2463
2463
|
return Q([r, i, u], x, {
|
|
2464
2464
|
flush: "sync"
|
|
2465
2465
|
}), Q([a, s], S, {
|
|
2466
2466
|
flush: "sync"
|
|
2467
|
-
}), Q(n,
|
|
2467
|
+
}), Q(n, P, {
|
|
2468
2468
|
flush: "sync"
|
|
2469
2469
|
}), Fn() && Nn(w), {
|
|
2470
2470
|
x: me(d),
|
|
@@ -2477,31 +2477,31 @@ function tr(e, t, l) {
|
|
|
2477
2477
|
update: x
|
|
2478
2478
|
};
|
|
2479
2479
|
}
|
|
2480
|
-
const
|
|
2480
|
+
const Tr = /* @__PURE__ */ A({
|
|
2481
2481
|
__name: "MenuContainer",
|
|
2482
2482
|
props: {
|
|
2483
2483
|
position: { default: "left" },
|
|
2484
2484
|
usePortal: { type: [Boolean, String], default: !1 }
|
|
2485
2485
|
},
|
|
2486
2486
|
setup(e) {
|
|
2487
|
-
const t = e, l = C(null), o = C(null), n = t.position === "left" ? "bottom-end" : "bottom-start", { floatingStyles: r } =
|
|
2487
|
+
const t = e, l = C(null), o = C(null), n = t.position === "left" ? "bottom-end" : "bottom-start", { floatingStyles: r } = er(l, o, {
|
|
2488
2488
|
placement: n,
|
|
2489
|
-
whileElementsMounted:
|
|
2490
|
-
middleware: [
|
|
2489
|
+
whileElementsMounted: Xl,
|
|
2490
|
+
middleware: [Pl(6), Ql(), Yl({ padding: 6 })]
|
|
2491
2491
|
});
|
|
2492
|
-
return (i, u) => (R(),
|
|
2492
|
+
return (i, u) => (R(), W(_(pl), {
|
|
2493
2493
|
as: "div",
|
|
2494
2494
|
class: "inline-block text-left"
|
|
2495
2495
|
}, {
|
|
2496
|
-
default:
|
|
2497
|
-
F(
|
|
2496
|
+
default: U(() => [
|
|
2497
|
+
F(_(ml), {
|
|
2498
2498
|
class: "focus:outline-none",
|
|
2499
2499
|
ref_key: "reference",
|
|
2500
2500
|
ref: l
|
|
2501
2501
|
}, {
|
|
2502
|
-
default:
|
|
2502
|
+
default: U(() => [
|
|
2503
2503
|
ht(i.$slots, "button", {}, () => [
|
|
2504
|
-
F(
|
|
2504
|
+
F(_(z), {
|
|
2505
2505
|
class: "fill-current",
|
|
2506
2506
|
name: "ellipsis-h"
|
|
2507
2507
|
})
|
|
@@ -2509,13 +2509,13 @@ const _r = /* @__PURE__ */ A({
|
|
|
2509
2509
|
]),
|
|
2510
2510
|
_: 3
|
|
2511
2511
|
}, 512),
|
|
2512
|
-
(R(),
|
|
2512
|
+
(R(), W(Bn, {
|
|
2513
2513
|
to: typeof i.usePortal == "string" ? i.usePortal : "body",
|
|
2514
2514
|
disabled: !i.usePortal
|
|
2515
2515
|
}, [
|
|
2516
|
-
|
|
2516
|
+
T("div", {
|
|
2517
2517
|
class: "w-56 z-20",
|
|
2518
|
-
style: Nt(
|
|
2518
|
+
style: Nt(_(r)),
|
|
2519
2519
|
ref_key: "floating",
|
|
2520
2520
|
ref: o
|
|
2521
2521
|
}, [
|
|
@@ -2527,13 +2527,13 @@ const _r = /* @__PURE__ */ A({
|
|
|
2527
2527
|
"leave-from-class": "transform opacity-100",
|
|
2528
2528
|
"leave-to-class": "transform -translate-y-2 opacity-0"
|
|
2529
2529
|
}, {
|
|
2530
|
-
default:
|
|
2531
|
-
F(
|
|
2530
|
+
default: U(() => [
|
|
2531
|
+
F(_(vl), {
|
|
2532
2532
|
class: $([
|
|
2533
2533
|
"z-40 mt-1 p-1 bg-white rounded shadow-lg text-grey-700 focus:outline-none w-full"
|
|
2534
2534
|
])
|
|
2535
2535
|
}, {
|
|
2536
|
-
default:
|
|
2536
|
+
default: U(() => [
|
|
2537
2537
|
ht(i.$slots, "default")
|
|
2538
2538
|
]),
|
|
2539
2539
|
_: 3
|
|
@@ -2547,10 +2547,10 @@ const _r = /* @__PURE__ */ A({
|
|
|
2547
2547
|
_: 3
|
|
2548
2548
|
}));
|
|
2549
2549
|
}
|
|
2550
|
-
}),
|
|
2550
|
+
}), tr = {
|
|
2551
2551
|
key: 0,
|
|
2552
2552
|
class: "bg-grey-300 px-2 rounded-lg max-w-[66px] truncate"
|
|
2553
|
-
},
|
|
2553
|
+
}, Lr = /* @__PURE__ */ A({
|
|
2554
2554
|
__name: "MenuLink",
|
|
2555
2555
|
props: {
|
|
2556
2556
|
label: {},
|
|
@@ -2559,17 +2559,17 @@ const _r = /* @__PURE__ */ A({
|
|
|
2559
2559
|
as: {}
|
|
2560
2560
|
},
|
|
2561
2561
|
setup(e) {
|
|
2562
|
-
return (t, l) => (R(),
|
|
2563
|
-
default:
|
|
2564
|
-
(R(),
|
|
2562
|
+
return (t, l) => (R(), W(_(gl), jn(zn({ disabled: t.disabled })), {
|
|
2563
|
+
default: U(({ active: o }) => [
|
|
2564
|
+
(R(), W(Hn(t.as || "span"), {
|
|
2565
2565
|
class: $(["flex items-center justify-between px-4 py-2 text-xs leading-5 transition-colors duration-100 rounded-lg", [
|
|
2566
2566
|
o ? "bg-grey-200" : "",
|
|
2567
2567
|
t.disabled ? "opacity-50 pointer-events-none" : "hover:bg-grey-200 focus:bg-grey-200 focus:outline-none"
|
|
2568
2568
|
]])
|
|
2569
2569
|
}, {
|
|
2570
|
-
default:
|
|
2571
|
-
|
|
2572
|
-
t.meta ? (R(),
|
|
2570
|
+
default: U(() => [
|
|
2571
|
+
T("span", null, G(t.label), 1),
|
|
2572
|
+
t.meta ? (R(), L("span", tr, G(t.meta), 1)) : M("", !0)
|
|
2573
2573
|
]),
|
|
2574
2574
|
_: 2
|
|
2575
2575
|
}, 1032, ["class"]))
|
|
@@ -2577,19 +2577,19 @@ const _r = /* @__PURE__ */ A({
|
|
|
2577
2577
|
_: 1
|
|
2578
2578
|
}, 16));
|
|
2579
2579
|
}
|
|
2580
|
-
}),
|
|
2580
|
+
}), nr = { class: "relative" }, or = {
|
|
2581
2581
|
key: 0,
|
|
2582
2582
|
class: "absolute left-0 inset-y-0 inline-flex items-center justify-center text-grey-700 dark:text-grey-100 px-4 pointer-events-none"
|
|
2583
|
-
},
|
|
2583
|
+
}, lr = {
|
|
2584
2584
|
key: 1,
|
|
2585
2585
|
class: "block truncate"
|
|
2586
|
-
}, ir = {
|
|
2586
|
+
}, rr = ["innerHTML"], ir = {
|
|
2587
2587
|
key: 2,
|
|
2588
2588
|
class: "text-grey-500 truncate"
|
|
2589
2589
|
}, ar = { class: "absolute right-0 inset-y-0 inline-flex items-center justify-center text-grey-700 dark:text-grey-100 px-4 pointer-events-none" }, sr = { class: "absolute right-2 inset-y-0 flex items-center" }, ur = {
|
|
2590
2590
|
key: 0,
|
|
2591
2591
|
class: "bg-grey-500 text-grey-100 rounded text-xs px-2 py-1"
|
|
2592
|
-
},
|
|
2592
|
+
}, cr = ["innerHTML"], Ir = /* @__PURE__ */ A({
|
|
2593
2593
|
__name: "Select",
|
|
2594
2594
|
props: {
|
|
2595
2595
|
modelValue: {},
|
|
@@ -2611,28 +2611,32 @@ const _r = /* @__PURE__ */ A({
|
|
|
2611
2611
|
}
|
|
2612
2612
|
), Q(o, (c) => {
|
|
2613
2613
|
c && n("update:modelValue", c);
|
|
2614
|
-
}), (c, a) => (R(),
|
|
2614
|
+
}), (c, a) => (R(), W(_(il), {
|
|
2615
2615
|
as: "div",
|
|
2616
|
-
modelValue:
|
|
2617
|
-
"onUpdate:modelValue": a[0] || (a[0] = (s) =>
|
|
2616
|
+
modelValue: _(o),
|
|
2617
|
+
"onUpdate:modelValue": a[0] || (a[0] = (s) => Un(o) ? o.value = s : null),
|
|
2618
2618
|
disabled: c.isDisabled
|
|
2619
2619
|
}, {
|
|
2620
|
-
default:
|
|
2621
|
-
|
|
2622
|
-
F(
|
|
2623
|
-
class: $(["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", [
|
|
2620
|
+
default: U(() => [
|
|
2621
|
+
T("div", nr, [
|
|
2622
|
+
F(_(al), {
|
|
2623
|
+
class: $(["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", [_(r), _(u), _(i)]])
|
|
2624
2624
|
}, {
|
|
2625
|
-
default:
|
|
2625
|
+
default: U(() => {
|
|
2626
2626
|
var s;
|
|
2627
2627
|
return [
|
|
2628
|
-
c.icon ? (R(),
|
|
2629
|
-
F(
|
|
2630
|
-
name: ((s =
|
|
2628
|
+
c.icon ? (R(), L("span", or, [
|
|
2629
|
+
F(z, {
|
|
2630
|
+
name: ((s = _(o)) == null ? void 0 : s.icon) ?? c.icon
|
|
2631
2631
|
}, null, 8, ["name"])
|
|
2632
2632
|
])) : M("", !0),
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2633
|
+
_(o) ? (R(), L("span", lr, [
|
|
2634
|
+
T("span", {
|
|
2635
|
+
innerHTML: _(o).label
|
|
2636
|
+
}, null, 8, rr)
|
|
2637
|
+
])) : (R(), L("span", ir, G(c.placeholder), 1)),
|
|
2638
|
+
T("span", ar, [
|
|
2639
|
+
F(z, {
|
|
2636
2640
|
class: "text-grey-400",
|
|
2637
2641
|
name: "chevron-down",
|
|
2638
2642
|
"aria-hidden": "true"
|
|
@@ -2647,47 +2651,49 @@ const _r = /* @__PURE__ */ A({
|
|
|
2647
2651
|
"leave-from-class": "opacity-100",
|
|
2648
2652
|
"leave-to-class": "opacity-0"
|
|
2649
2653
|
}, {
|
|
2650
|
-
default:
|
|
2651
|
-
F(
|
|
2652
|
-
default:
|
|
2653
|
-
(R(!0),
|
|
2654
|
+
default: U(() => [
|
|
2655
|
+
F(_(sl), { 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" }, {
|
|
2656
|
+
default: U(() => [
|
|
2657
|
+
(R(!0), L(be, null, jt(c.options, (s) => (R(), W(_(ul), {
|
|
2654
2658
|
as: "template",
|
|
2655
2659
|
key: s.id,
|
|
2656
2660
|
value: s,
|
|
2657
2661
|
disabled: s.disabled
|
|
2658
2662
|
}, {
|
|
2659
|
-
default:
|
|
2660
|
-
|
|
2663
|
+
default: U(({ active: d, selected: v }) => [
|
|
2664
|
+
T("li", {
|
|
2661
2665
|
class: $([
|
|
2662
2666
|
d ? "text-white bg-blue-500" : "text-grey-900 dark:text-grey-50",
|
|
2663
2667
|
"cursor-default select-none relative py-2 pl-3 pr-12",
|
|
2664
2668
|
{ "opacity-50 bg-grey-100": s.disabled }
|
|
2665
2669
|
])
|
|
2666
2670
|
}, [
|
|
2667
|
-
|
|
2668
|
-
s.disabled && c.disabledBadge ? (R(),
|
|
2671
|
+
T("div", sr, [
|
|
2672
|
+
s.disabled && c.disabledBadge ? (R(), L("span", ur, G(c.disabledBadge), 1)) : M("", !0)
|
|
2669
2673
|
]),
|
|
2670
|
-
|
|
2674
|
+
T("span", {
|
|
2671
2675
|
class: $([
|
|
2672
2676
|
v ? "font-semibold" : "font-normal",
|
|
2673
2677
|
"block truncate"
|
|
2674
2678
|
])
|
|
2675
2679
|
}, [
|
|
2676
|
-
s.icon ? (R(),
|
|
2680
|
+
s.icon ? (R(), W(z, {
|
|
2677
2681
|
key: 0,
|
|
2678
2682
|
class: "inline-block mr-1",
|
|
2679
2683
|
name: s.icon
|
|
2680
2684
|
}, null, 8, ["name"])) : M("", !0),
|
|
2681
|
-
|
|
2685
|
+
T("span", {
|
|
2686
|
+
innerHTML: s.label
|
|
2687
|
+
}, null, 8, cr)
|
|
2682
2688
|
], 2),
|
|
2683
|
-
v ? (R(),
|
|
2689
|
+
v ? (R(), L("span", {
|
|
2684
2690
|
key: 0,
|
|
2685
2691
|
class: $([
|
|
2686
2692
|
d ? "text-blue-100" : "text-blue-500",
|
|
2687
2693
|
"absolute inset-y-0 right-0 flex items-center pr-4"
|
|
2688
2694
|
])
|
|
2689
2695
|
}, [
|
|
2690
|
-
F(
|
|
2696
|
+
F(z, {
|
|
2691
2697
|
name: "check",
|
|
2692
2698
|
class: "h-5 w-5",
|
|
2693
2699
|
"aria-hidden": "true"
|
|
@@ -2708,19 +2714,19 @@ const _r = /* @__PURE__ */ A({
|
|
|
2708
2714
|
_: 1
|
|
2709
2715
|
}, 8, ["modelValue", "disabled"]));
|
|
2710
2716
|
}
|
|
2711
|
-
}),
|
|
2717
|
+
}), dr = { class: "animate-pulse" }, fr = { class: "flex items-center justify-between space-x-4" }, pr = {
|
|
2712
2718
|
key: 0,
|
|
2713
2719
|
class: "w-12 h-12 bg-current rounded-full shrink-0"
|
|
2714
|
-
},
|
|
2720
|
+
}, mr = {
|
|
2715
2721
|
key: 1,
|
|
2716
2722
|
class: "w-full h-8 bg-current rounded-lg"
|
|
2717
|
-
},
|
|
2723
|
+
}, vr = {
|
|
2718
2724
|
key: 0,
|
|
2719
2725
|
class: "mt-6 space-y-2"
|
|
2720
|
-
},
|
|
2726
|
+
}, gr = {
|
|
2721
2727
|
key: 1,
|
|
2722
2728
|
class: "w-1/3 h-10 mt-6 bg-current rounded-lg"
|
|
2723
|
-
},
|
|
2729
|
+
}, Ar = /* @__PURE__ */ A({
|
|
2724
2730
|
__name: "Skeleton",
|
|
2725
2731
|
props: {
|
|
2726
2732
|
avatar: { type: Boolean, default: !1 },
|
|
@@ -2735,32 +2741,32 @@ const _r = /* @__PURE__ */ A({
|
|
|
2735
2741
|
margin: `mr-${o[Math.floor(Math.random() * o.length)]}`
|
|
2736
2742
|
};
|
|
2737
2743
|
});
|
|
2738
|
-
return (o, n) => (R(),
|
|
2739
|
-
|
|
2740
|
-
o.avatar ? (R(),
|
|
2741
|
-
o.title ? (R(),
|
|
2744
|
+
return (o, n) => (R(), L("div", dr, [
|
|
2745
|
+
T("div", fr, [
|
|
2746
|
+
o.avatar ? (R(), L("div", pr)) : M("", !0),
|
|
2747
|
+
o.title ? (R(), L("div", mr)) : M("", !0)
|
|
2742
2748
|
]),
|
|
2743
|
-
o.lines > 0 ? (R(),
|
|
2744
|
-
(R(!0),
|
|
2749
|
+
o.lines > 0 ? (R(), L("div", vr, [
|
|
2750
|
+
(R(!0), L(be, null, jt(_(l), (r, i) => (R(), L("div", {
|
|
2745
2751
|
class: $(["h-4 bg-current rounded-lg", r.margin]),
|
|
2746
2752
|
key: i
|
|
2747
2753
|
}, null, 2))), 128))
|
|
2748
2754
|
])) : M("", !0),
|
|
2749
|
-
o.footer ? (R(),
|
|
2755
|
+
o.footer ? (R(), L("div", gr)) : M("", !0)
|
|
2750
2756
|
]));
|
|
2751
2757
|
}
|
|
2752
|
-
}),
|
|
2758
|
+
}), $r = /* @__PURE__ */ A({
|
|
2753
2759
|
__name: "Spinner",
|
|
2754
2760
|
setup(e) {
|
|
2755
|
-
return (t, l) => (R(),
|
|
2761
|
+
return (t, l) => (R(), W(_(z), {
|
|
2756
2762
|
class: "animate-spin",
|
|
2757
2763
|
name: "circle-notch"
|
|
2758
2764
|
}));
|
|
2759
2765
|
}
|
|
2760
|
-
}),
|
|
2766
|
+
}), br = { class: "relative inline-flex items-center" }, hr = ["aria-label", "tabindex"], yr = {
|
|
2761
2767
|
key: 0,
|
|
2762
2768
|
class: "absolute inset-0 flex items-center justify-center"
|
|
2763
|
-
},
|
|
2769
|
+
}, Mr = /* @__PURE__ */ A({
|
|
2764
2770
|
__name: "SplitButton",
|
|
2765
2771
|
props: {
|
|
2766
2772
|
label: {},
|
|
@@ -2818,39 +2824,39 @@ const _r = /* @__PURE__ */ A({
|
|
|
2818
2824
|
function c() {
|
|
2819
2825
|
o.isDisabled || l("onClickSplit");
|
|
2820
2826
|
}
|
|
2821
|
-
return (a, s) => (R(),
|
|
2822
|
-
|
|
2827
|
+
return (a, s) => (R(), L("div", br, [
|
|
2828
|
+
T("button", {
|
|
2823
2829
|
type: "button",
|
|
2824
2830
|
"aria-label": a.label,
|
|
2825
2831
|
tabindex: a.isDisabled ? "-1" : void 0,
|
|
2826
2832
|
class: $(["relative transition duration-150 ease-in-out rounded-l-lg", n.value]),
|
|
2827
2833
|
onClick: u
|
|
2828
2834
|
}, [
|
|
2829
|
-
|
|
2835
|
+
T("div", {
|
|
2830
2836
|
class: $(!a.isLoading || "invisible")
|
|
2831
2837
|
}, [
|
|
2832
|
-
|
|
2838
|
+
T("span", null, G(a.label), 1)
|
|
2833
2839
|
], 2),
|
|
2834
|
-
a.isLoading ? (R(),
|
|
2835
|
-
F(
|
|
2840
|
+
a.isLoading ? (R(), L("span", yr, [
|
|
2841
|
+
F(z, {
|
|
2836
2842
|
class: "ml-3 animate-spin",
|
|
2837
2843
|
name: "circle-notch"
|
|
2838
2844
|
})
|
|
2839
2845
|
])) : M("", !0)
|
|
2840
|
-
], 10,
|
|
2841
|
-
|
|
2846
|
+
], 10, hr),
|
|
2847
|
+
T("button", {
|
|
2842
2848
|
type: "button",
|
|
2843
2849
|
class: $(["border-l-white/50 border-l transition duration-150 ease-in-out rounded-r-lg", [n.value, r.value]]),
|
|
2844
2850
|
onClick: c
|
|
2845
2851
|
}, [
|
|
2846
|
-
F(
|
|
2852
|
+
F(z, {
|
|
2847
2853
|
class: $([i.value]),
|
|
2848
2854
|
name: a.icon
|
|
2849
2855
|
}, null, 8, ["class", "name"])
|
|
2850
2856
|
], 2)
|
|
2851
2857
|
]));
|
|
2852
2858
|
}
|
|
2853
|
-
}),
|
|
2859
|
+
}), xr = { class: "sr-only" }, Vr = /* @__PURE__ */ A({
|
|
2854
2860
|
__name: "Switch",
|
|
2855
2861
|
props: {
|
|
2856
2862
|
id: { default: qt() },
|
|
@@ -2865,28 +2871,28 @@ const _r = /* @__PURE__ */ A({
|
|
|
2865
2871
|
const l = t, o = (n) => {
|
|
2866
2872
|
l("update:modelValue", n), l("change", n);
|
|
2867
2873
|
};
|
|
2868
|
-
return (n, r) => (R(),
|
|
2874
|
+
return (n, r) => (R(), W(_(hl), {
|
|
2869
2875
|
modelValue: n.modelValue,
|
|
2870
2876
|
label: n.label,
|
|
2871
2877
|
class: $([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"]),
|
|
2872
2878
|
"onUpdate:modelValue": o
|
|
2873
2879
|
}, {
|
|
2874
|
-
default:
|
|
2875
|
-
|
|
2880
|
+
default: U(() => [
|
|
2881
|
+
T("span", {
|
|
2876
2882
|
class: $(["absolute text-xs text-center text-white inset-x-2", n.modelValue ? "pr-3" : "pl-3"])
|
|
2877
|
-
},
|
|
2878
|
-
|
|
2879
|
-
|
|
2883
|
+
}, G(n.modelValue === !0 ? n.onLabel : n.offLabel), 3),
|
|
2884
|
+
T("span", xr, G(n.label), 1),
|
|
2885
|
+
T("span", {
|
|
2880
2886
|
class: $([n.modelValue ? "translate-x-9" : "translate-x-1", "inline-block w-4 h-4 transition bg-white rounded-full"])
|
|
2881
2887
|
}, null, 2)
|
|
2882
2888
|
]),
|
|
2883
2889
|
_: 1
|
|
2884
2890
|
}, 8, ["modelValue", "label", "class"]));
|
|
2885
2891
|
}
|
|
2886
|
-
}),
|
|
2892
|
+
}), wr = { class: "relative" }, kr = ["tabindex", "value"], Sr = {
|
|
2887
2893
|
inheritAttrs: !1
|
|
2888
|
-
},
|
|
2889
|
-
...
|
|
2894
|
+
}, Fr = /* @__PURE__ */ A({
|
|
2895
|
+
...Sr,
|
|
2890
2896
|
__name: "Textarea",
|
|
2891
2897
|
props: {
|
|
2892
2898
|
modelValue: {},
|
|
@@ -2903,9 +2909,9 @@ const _r = /* @__PURE__ */ A({
|
|
|
2903
2909
|
focus: () => {
|
|
2904
2910
|
o.isDisabled || a.value.focus();
|
|
2905
2911
|
}
|
|
2906
|
-
}), (d, v) => (R(),
|
|
2907
|
-
|
|
2908
|
-
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", [
|
|
2912
|
+
}), (d, v) => (R(), L("div", wr, [
|
|
2913
|
+
T("textarea", ot({
|
|
2914
|
+
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", [_(r), _(u), _(i)]],
|
|
2909
2915
|
tabindex: d.isDisabled ? "-1" : void 0,
|
|
2910
2916
|
value: d.modelValue ?? ""
|
|
2911
2917
|
}, d.$attrs, {
|
|
@@ -2915,24 +2921,24 @@ const _r = /* @__PURE__ */ A({
|
|
|
2915
2921
|
rows: "8",
|
|
2916
2922
|
onInput: c
|
|
2917
2923
|
}), `
|
|
2918
|
-
`, 16,
|
|
2924
|
+
`, 16, kr)
|
|
2919
2925
|
]));
|
|
2920
2926
|
}
|
|
2921
2927
|
});
|
|
2922
2928
|
export {
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2929
|
+
Er as D9Button,
|
|
2930
|
+
Dr as D9Checkbox,
|
|
2931
|
+
z as D9Icon,
|
|
2932
|
+
_r as D9Input,
|
|
2927
2933
|
Pr as D9Label,
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2934
|
+
Tr as D9Menu,
|
|
2935
|
+
Lr as D9MenuLink,
|
|
2936
|
+
Ir as D9Select,
|
|
2937
|
+
Ar as D9Skeleton,
|
|
2938
|
+
$r as D9Spinner,
|
|
2939
|
+
Mr as D9SplitButton,
|
|
2940
|
+
Vr as D9Switch,
|
|
2941
|
+
Fr as D9Textarea,
|
|
2936
2942
|
xt as brands,
|
|
2937
|
-
|
|
2943
|
+
Gn as icons
|
|
2938
2944
|
};
|