@deck9/ui 0.15.1 → 0.15.2
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 +343 -341
- 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 K, unref as P, mergeProps as ot, createCommentVNode as M, createElementBlock as
|
|
2
|
-
import { FontAwesomeIcon as
|
|
1
|
+
import { defineComponent as A, computed as k, openBlock as R, createBlock as K, unref as P, mergeProps as ot, createCommentVNode as M, createElementBlock as L, normalizeClass as $, createElementVNode as T, toDisplayString as H, 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 W, 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,24 +128,24 @@ 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(), K(P(
|
|
143
|
+
return (n, r) => o.value ? (R(), K(P(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
|
}, Rr = /* @__PURE__ */ A({
|
|
@@ -200,67 +200,67 @@ 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(), K(
|
|
213
|
+
u.icon && u.iconPosition === "left" ? (R(), K(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(), K(
|
|
218
|
+
T("span", null, H(u.label), 1),
|
|
219
|
+
u.icon && u.iconPosition === "right" ? (R(), K(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
|
}, Er = /* @__PURE__ */ A({
|
|
@@ -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
|
+
}, H(n.label), 9, lo),
|
|
294
|
+
n.description ? (R(), L("p", ro, H(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,10 +450,10 @@ 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" }, Po = {
|
|
454
454
|
inheritAttrs: !1
|
|
455
455
|
}, Dr = /* @__PURE__ */ A({
|
|
456
|
-
...
|
|
456
|
+
...Po,
|
|
457
457
|
__name: "Input",
|
|
458
458
|
props: {
|
|
459
459
|
modelValue: {},
|
|
@@ -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,10 +502,10 @@ 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
|
-
|
|
508
|
+
T("input", ot({
|
|
509
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", [P(u), P(a), P(c)]],
|
|
510
510
|
placeholder: y.placeholder,
|
|
511
511
|
type: s.value,
|
|
@@ -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
|
-
P(d) && y.showColorPicker ? (R(),
|
|
534
|
+
P(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
547
|
class: $(["absolute left-0 inset-y-0 inline-flex items-center justify-center text-grey-700 dark:text-grey-100 px-4", P(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
|
+
}), _o = { 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,9 +561,9 @@ 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", _o, [
|
|
565
|
+
T("label", { for: t.id }, H(t.label), 9, To),
|
|
566
|
+
t.description ? (R(), L("span", Lo, H(t.description), 1)) : M("", !0)
|
|
567
567
|
]));
|
|
568
568
|
}
|
|
569
569
|
});
|
|
@@ -575,8 +575,8 @@ function G(e, t, ...l) {
|
|
|
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
576
|
throw Error.captureStackTrace && Error.captureStackTrace(o, G), 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)
|
|
@@ -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,7 +776,7 @@ 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
|
}
|
|
@@ -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) {
|
|
@@ -957,13 +957,13 @@ function pn() {
|
|
|
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,10 +974,10 @@ 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
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]: P(v) }), {}), id: u };
|
|
980
|
-
return
|
|
980
|
+
return j({ ourProps: a, theirProps: c, slot: r.value, attrs: t, slots: l, name: n });
|
|
981
981
|
};
|
|
982
982
|
} });
|
|
983
983
|
let _t = /([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;
|
|
@@ -992,7 +992,7 @@ function Tt(e) {
|
|
|
992
992
|
let i = r ? (l = n.innerText) != null ? l : "" : o;
|
|
993
993
|
return _t.test(i) && (i = i.replace(_t, "")), 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,7 +1040,7 @@ 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
1046
|
let w = s.value !== null ? c.value[s.value] : null, S = ct(x(c.value.slice()), (O) => E(O.dataRef.domRef)), _ = w ? S.indexOf(w) : null;
|
|
@@ -1059,7 +1059,7 @@ 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 _ = v(), O = en(x ===
|
|
1062
|
+
let _ = v(), O = en(x === I.Specific ? { focus: I.Specific, id: w } : { focus: x }, { resolveItems: () => _.options, resolveActiveIndex: () => _.activeOptionIndex, resolveId: (N) => N.id, resolveDisabled: (N) => N.dataRef.disabled });
|
|
1063
1063
|
a.value = "", s.value = O, d.value = S ?? 1, c.value = _.options;
|
|
1064
1064
|
}, search(x) {
|
|
1065
1065
|
if (e.disabled || n.value === 1)
|
|
@@ -1109,7 +1109,7 @@ let al = A({ name: "Listbox", emits: { "update:modelValue": (e) => !0 }, props:
|
|
|
1109
1109
|
}, { immediate: !0 });
|
|
1110
1110
|
}), () => {
|
|
1111
1111
|
let { name: x, modelValue: w, disabled: S, form: _, ...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, _e]) => Oe(sn, Jt({ features: dt.Hidden, key: re, as: "input", type: "hidden", hidden: !0, readOnly: !0, form: _, name: re, value: _e }))) : [],
|
|
1112
|
+
return Oe(be, [...x != null && h.value != null ? un({ [x]: h.value }).map(([re, _e]) => Oe(sn, Jt({ features: dt.Hidden, key: re, as: "input", type: "hidden", hidden: !0, readOnly: !0, form: _, name: re, value: _e }))) : [], 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
1187
|
case G(n.orientation.value, { vertical: D.ArrowDown, horizontal: D.ArrowRight }):
|
|
1188
|
-
return a.preventDefault(), a.stopPropagation(), n.goToOption(
|
|
1188
|
+
return a.preventDefault(), a.stopPropagation(), n.goToOption(I.Next);
|
|
1189
1189
|
case G(n.orientation.value, { vertical: D.ArrowUp, horizontal: D.ArrowLeft }):
|
|
1190
|
-
return a.preventDefault(), a.stopPropagation(), n.goToOption(
|
|
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,9 +1212,9 @@ 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
1220
|
let i = k(() => n.activeOptionIndex.value !== null ? n.options.value[n.activeOptionIndex.value].id === e.id : !1), u = k(() => G(n.mode.value, { 0: () => n.compare(X(n.value.value), X(e.value)), 1: () => X(n.value.value).some((b) => n.compare(X(b), X(e.value))) })), c = k(() => G(n.mode.value, { 1: () => {
|
|
@@ -1227,13 +1227,13 @@ let sl = A({ name: "ListboxButton", props: { as: { type: [Object, String], defau
|
|
|
1227
1227
|
ee(() => n.registerOption(e.id, s)), Ne(() => n.unregisterOption(e.id)), ee(() => {
|
|
1228
1228
|
Q([n.listboxState, u], () => {
|
|
1229
1229
|
n.listboxState.value === 0 && u.value && G(n.mode.value, { 1: () => {
|
|
1230
|
-
c.value && n.goToOption(
|
|
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
1265
|
let { disabled: b } = e, y = { active: i.value, selected: u.value, disabled: b }, { id: x, value: w, disabled: S, ..._ } = 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
|
|
1266
|
+
return j({ ourProps: O, theirProps: _, 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;
|
|
@@ -1312,25 +1312,25 @@ let ml = A({ name: "Menu", props: { as: { type: [Object, String], default: "temp
|
|
|
1312
1312
|
d.closeMenu(), ze(f, je.Loose) || (v.preventDefault(), (g = E(n)) == null || g.focus());
|
|
1313
1313
|
}, k(() => o.value === 0)), ye(bn, d), on(k(() => G(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), () => {
|
|
@@ -1473,20 +1473,20 @@ A({ name: "Label", props: { as: { type: [Object, String], default: "label" }, pa
|
|
|
1473
1473
|
let o = yn();
|
|
1474
1474
|
return ee(() => Ne(o.register(e.id))), () => {
|
|
1475
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]: P(f) }), {}), id: u };
|
|
1476
|
-
return c && (delete s.onClick, delete s.htmlFor, delete a.onClick),
|
|
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();
|
|
@@ -1520,25 +1520,25 @@ let yl = A({ name: "Switch", emits: { "update:modelValue": (e) => !0 }, props: {
|
|
|
1520
1520
|
}, { immediate: !0 });
|
|
1521
1521
|
}), () => {
|
|
1522
1522
|
let { id: h, name: b, value: y, form: x, ...w } = e, S = { checked: i.value }, _ = { 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,
|
|
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: _, 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,15 +1795,15 @@ 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(...
|
|
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
1803
|
const S = [u, ...w], _ = await Cn(t, h), O = [];
|
|
1804
1804
|
let N = ((o = r.flip) == null ? void 0 : o.overflows) || [];
|
|
1805
1805
|
if (s && O.push(_[b]), d) {
|
|
1806
|
-
const se =
|
|
1806
|
+
const se = wl(n, i, x);
|
|
1807
1807
|
O.push(_[se[0]], _[se[1]]);
|
|
1808
1808
|
}
|
|
1809
1809
|
if (N = [...N, {
|
|
@@ -1846,12 +1846,12 @@ const Pl = function(e) {
|
|
|
1846
1846
|
}
|
|
1847
1847
|
};
|
|
1848
1848
|
};
|
|
1849
|
-
async function
|
|
1849
|
+
async function Pl(e, t) {
|
|
1850
1850
|
const {
|
|
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 _l = function(e) {
|
|
1878
1878
|
return e === void 0 && (e = 0), {
|
|
1879
1879
|
name: "offset",
|
|
1880
1880
|
options: e,
|
|
@@ -1885,7 +1885,7 @@ const Tl = function(e) {
|
|
|
1885
1885
|
y: r,
|
|
1886
1886
|
placement: i,
|
|
1887
1887
|
middlewareData: u
|
|
1888
|
-
} = t, c = await
|
|
1888
|
+
} = t, c = await Pl(t, e);
|
|
1889
1889
|
return i === ((l = u.offset) == null ? void 0 : l.placement) && (o = u.arrow) != null && o.alignmentOffset ? {} : {
|
|
1890
1890
|
x: n + c.x,
|
|
1891
1891
|
y: r + c.y,
|
|
@@ -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);
|
|
@@ -1952,7 +1952,7 @@ const Tl = function(e) {
|
|
|
1952
1952
|
function ne(e) {
|
|
1953
1953
|
return ft(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
1954
1954
|
}
|
|
1955
|
-
function
|
|
1955
|
+
function U(e) {
|
|
1956
1956
|
var t;
|
|
1957
1957
|
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
1958
1958
|
}
|
|
@@ -1961,16 +1961,16 @@ function le(e) {
|
|
|
1961
1961
|
return (t = (ft(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
1962
1962
|
}
|
|
1963
1963
|
function ft(e) {
|
|
1964
|
-
return e instanceof Node || e instanceof
|
|
1964
|
+
return e instanceof Node || e instanceof U(e).Node;
|
|
1965
1965
|
}
|
|
1966
1966
|
function oe(e) {
|
|
1967
|
-
return e instanceof Element || e instanceof
|
|
1967
|
+
return e instanceof Element || e instanceof U(e).Element;
|
|
1968
1968
|
}
|
|
1969
1969
|
function Z(e) {
|
|
1970
|
-
return e instanceof HTMLElement || e instanceof
|
|
1970
|
+
return e instanceof HTMLElement || e instanceof U(e).HTMLElement;
|
|
1971
1971
|
}
|
|
1972
1972
|
function At(e) {
|
|
1973
|
-
return typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof
|
|
1973
|
+
return typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof U(e).ShadowRoot;
|
|
1974
1974
|
}
|
|
1975
1975
|
function Pe(e) {
|
|
1976
1976
|
const {
|
|
@@ -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))
|
|
@@ -2004,7 +2004,7 @@ function Ge(e) {
|
|
|
2004
2004
|
return ["html", "body", "#document"].includes(ne(e));
|
|
2005
2005
|
}
|
|
2006
2006
|
function q(e) {
|
|
2007
|
-
return
|
|
2007
|
+
return U(e).getComputedStyle(e);
|
|
2008
2008
|
}
|
|
2009
2009
|
function qe(e) {
|
|
2010
2010
|
return oe(e) ? {
|
|
@@ -2034,7 +2034,7 @@ function On(e) {
|
|
|
2034
2034
|
function Ee(e, t, l) {
|
|
2035
2035
|
var o;
|
|
2036
2036
|
t === void 0 && (t = []), l === void 0 && (l = !0);
|
|
2037
|
-
const n = On(e), r = n === ((o = e.ownerDocument) == null ? void 0 : o.body), i =
|
|
2037
|
+
const n = On(e), r = n === ((o = e.ownerDocument) == null ? void 0 : o.body), i = U(n);
|
|
2038
2038
|
return r ? t.concat(i, i.visualViewport || [], Pe(n) ? n : [], i.frameElement && l ? Ee(i.frameElement) : []) : t.concat(n, Ee(n, [], l));
|
|
2039
2039
|
}
|
|
2040
2040
|
function Rn(e) {
|
|
@@ -2065,30 +2065,30 @@ 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
|
-
const t =
|
|
2071
|
-
return !mt() || !t.visualViewport ?
|
|
2070
|
+
const t = U(e);
|
|
2071
|
+
return !mt() || !t.visualViewport ? Al : {
|
|
2072
2072
|
x: t.visualViewport.offsetLeft,
|
|
2073
2073
|
y: t.visualViewport.offsetTop
|
|
2074
2074
|
};
|
|
2075
2075
|
}
|
|
2076
|
-
function
|
|
2077
|
-
return t === void 0 && (t = !1), !l || t && l !==
|
|
2076
|
+
function $l(e, t, l) {
|
|
2077
|
+
return t === void 0 && (t = !1), !l || t && l !== U(e) ? !1 : t;
|
|
2078
2078
|
}
|
|
2079
2079
|
function de(e, t, l, o) {
|
|
2080
2080
|
t === void 0 && (t = !1), l === void 0 && (l = !1);
|
|
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
|
-
const v =
|
|
2087
|
+
const v = U(r), f = o && oe(o) ? U(o) : o;
|
|
2088
2088
|
let g = v.frameElement;
|
|
2089
2089
|
for (; g && o && f !== v; ) {
|
|
2090
2090
|
const m = ve(g), h = g.getBoundingClientRect(), b = q(g), y = h.left + (g.clientLeft + parseFloat(b.paddingLeft)) * m.x, x = h.top + (g.clientTop + parseFloat(b.paddingTop)) * m.y;
|
|
2091
|
-
c *= m.x, a *= m.y, s *= m.x, d *= m.y, c += y, a += x, g =
|
|
2091
|
+
c *= m.x, a *= m.y, s *= m.x, d *= m.y, c += y, a += x, g = U(g).frameElement;
|
|
2092
2092
|
}
|
|
2093
2093
|
}
|
|
2094
2094
|
return Fe({
|
|
@@ -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,
|
|
@@ -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,8 +2140,8 @@ function Nl(e) {
|
|
|
2140
2140
|
y: u
|
|
2141
2141
|
};
|
|
2142
2142
|
}
|
|
2143
|
-
function
|
|
2144
|
-
const l =
|
|
2143
|
+
function Nl(e, t) {
|
|
2144
|
+
const l = U(e), o = le(e), n = l.visualViewport;
|
|
2145
2145
|
let r = o.clientWidth, i = o.clientHeight, u = 0, c = 0;
|
|
2146
2146
|
if (n) {
|
|
2147
2147
|
r = n.width, i = n.height;
|
|
@@ -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 = {
|
|
@@ -2186,7 +2186,7 @@ function Pn(e, t) {
|
|
|
2186
2186
|
const l = ge(e);
|
|
2187
2187
|
return l === t || !oe(l) || Ge(l) ? !1 : q(l).position === "fixed" || Pn(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;
|
|
@@ -2199,14 +2199,14 @@ function zl(e, t) {
|
|
|
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,
|
|
@@ -2251,15 +2251,15 @@ function Mt(e, t) {
|
|
|
2251
2251
|
return !Z(e) || q(e).position === "fixed" ? null : t ? t(e) : e.offsetParent;
|
|
2252
2252
|
}
|
|
2253
2253
|
function _n(e, t) {
|
|
2254
|
-
const l =
|
|
2254
|
+
const l = U(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,
|
|
@@ -2267,7 +2267,7 @@ const Kl = async function(e) {
|
|
|
2267
2267
|
} = e;
|
|
2268
2268
|
const n = this.getOffsetParent || _n, 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:
|
|
2284
|
+
getClippingRect: zl,
|
|
2285
2285
|
getOffsetParent: _n,
|
|
2286
|
-
getElementRects:
|
|
2287
|
-
getClientRects:
|
|
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() {
|
|
@@ -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,7 +2399,7 @@ 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;
|
|
@@ -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
|
|
@@ -2484,24 +2484,24 @@ const _r = /* @__PURE__ */ A({
|
|
|
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: [_l(6), Ql(), Yl({ padding: 6 })]
|
|
2491
2491
|
});
|
|
2492
|
-
return (i, u) => (R(), K(P(
|
|
2492
|
+
return (i, u) => (R(), K(P(pl), {
|
|
2493
2493
|
as: "div",
|
|
2494
2494
|
class: "inline-block text-left"
|
|
2495
2495
|
}, {
|
|
2496
2496
|
default: W(() => [
|
|
2497
|
-
F(P(
|
|
2497
|
+
F(P(ml), {
|
|
2498
2498
|
class: "focus:outline-none",
|
|
2499
2499
|
ref_key: "reference",
|
|
2500
2500
|
ref: l
|
|
2501
2501
|
}, {
|
|
2502
2502
|
default: W(() => [
|
|
2503
2503
|
ht(i.$slots, "button", {}, () => [
|
|
2504
|
-
F(P(
|
|
2504
|
+
F(P(z), {
|
|
2505
2505
|
class: "fill-current",
|
|
2506
2506
|
name: "ellipsis-h"
|
|
2507
2507
|
})
|
|
@@ -2513,7 +2513,7 @@ const _r = /* @__PURE__ */ A({
|
|
|
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
2518
|
style: Nt(P(r)),
|
|
2519
2519
|
ref_key: "floating",
|
|
@@ -2528,7 +2528,7 @@ const _r = /* @__PURE__ */ A({
|
|
|
2528
2528
|
"leave-to-class": "transform -translate-y-2 opacity-0"
|
|
2529
2529
|
}, {
|
|
2530
2530
|
default: W(() => [
|
|
2531
|
-
F(P(
|
|
2531
|
+
F(P(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
|
])
|
|
@@ -2547,7 +2547,7 @@ 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
|
}, Tr = /* @__PURE__ */ A({
|
|
@@ -2559,17 +2559,17 @@ const _r = /* @__PURE__ */ A({
|
|
|
2559
2559
|
as: {}
|
|
2560
2560
|
},
|
|
2561
2561
|
setup(e) {
|
|
2562
|
-
return (t, l) => (R(), K(P(
|
|
2562
|
+
return (t, l) => (R(), K(P(gl), jn(zn({ disabled: t.disabled })), {
|
|
2563
2563
|
default: W(({ active: o }) => [
|
|
2564
|
-
(R(), K(
|
|
2564
|
+
(R(), K(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
2570
|
default: W(() => [
|
|
2571
|
-
|
|
2572
|
-
t.meta ? (R(),
|
|
2571
|
+
T("span", null, H(t.label), 1),
|
|
2572
|
+
t.meta ? (R(), L("span", tr, H(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
|
-
},
|
|
2586
|
+
}, rr = {
|
|
2587
2587
|
key: 2,
|
|
2588
2588
|
class: "text-grey-500 truncate"
|
|
2589
|
-
},
|
|
2589
|
+
}, ir = { 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" }, ar = { class: "absolute right-2 inset-y-0 flex items-center" }, sr = {
|
|
2590
2590
|
key: 0,
|
|
2591
2591
|
class: "bg-grey-500 text-grey-100 rounded text-xs px-2 py-1"
|
|
2592
|
-
}, Lr = /* @__PURE__ */ A({
|
|
2592
|
+
}, ur = ["innerHTML"], Lr = /* @__PURE__ */ A({
|
|
2593
2593
|
__name: "Select",
|
|
2594
2594
|
props: {
|
|
2595
2595
|
modelValue: {},
|
|
@@ -2611,28 +2611,28 @@ const _r = /* @__PURE__ */ A({
|
|
|
2611
2611
|
}
|
|
2612
2612
|
), Q(o, (c) => {
|
|
2613
2613
|
c && n("update:modelValue", c);
|
|
2614
|
-
}), (c, a) => (R(), K(P(
|
|
2614
|
+
}), (c, a) => (R(), K(P(il), {
|
|
2615
2615
|
as: "div",
|
|
2616
2616
|
modelValue: P(o),
|
|
2617
|
-
"onUpdate:modelValue": a[0] || (a[0] = (s) =>
|
|
2617
|
+
"onUpdate:modelValue": a[0] || (a[0] = (s) => Un(o) ? o.value = s : null),
|
|
2618
2618
|
disabled: c.isDisabled
|
|
2619
2619
|
}, {
|
|
2620
2620
|
default: W(() => [
|
|
2621
|
-
|
|
2622
|
-
F(P(
|
|
2621
|
+
T("div", nr, [
|
|
2622
|
+
F(P(al), {
|
|
2623
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", [P(r), P(u), P(i)]])
|
|
2624
2624
|
}, {
|
|
2625
2625
|
default: W(() => {
|
|
2626
2626
|
var s;
|
|
2627
2627
|
return [
|
|
2628
|
-
c.icon ? (R(),
|
|
2629
|
-
F(
|
|
2628
|
+
c.icon ? (R(), L("span", or, [
|
|
2629
|
+
F(z, {
|
|
2630
2630
|
name: ((s = P(o)) == null ? void 0 : s.icon) ?? c.icon
|
|
2631
2631
|
}, null, 8, ["name"])
|
|
2632
2632
|
])) : M("", !0),
|
|
2633
|
-
P(o) ? (R(),
|
|
2634
|
-
|
|
2635
|
-
F(
|
|
2633
|
+
P(o) ? (R(), L("span", lr, H(P(o).label), 1)) : (R(), L("span", rr, H(c.placeholder), 1)),
|
|
2634
|
+
T("span", ir, [
|
|
2635
|
+
F(z, {
|
|
2636
2636
|
class: "text-grey-400",
|
|
2637
2637
|
name: "chevron-down",
|
|
2638
2638
|
"aria-hidden": "true"
|
|
@@ -2648,46 +2648,48 @@ const _r = /* @__PURE__ */ A({
|
|
|
2648
2648
|
"leave-to-class": "opacity-0"
|
|
2649
2649
|
}, {
|
|
2650
2650
|
default: W(() => [
|
|
2651
|
-
F(P(
|
|
2651
|
+
F(P(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" }, {
|
|
2652
2652
|
default: W(() => [
|
|
2653
|
-
(R(!0),
|
|
2653
|
+
(R(!0), L(be, null, jt(c.options, (s) => (R(), K(P(ul), {
|
|
2654
2654
|
as: "template",
|
|
2655
2655
|
key: s.id,
|
|
2656
2656
|
value: s,
|
|
2657
2657
|
disabled: s.disabled
|
|
2658
2658
|
}, {
|
|
2659
2659
|
default: W(({ active: d, selected: v }) => [
|
|
2660
|
-
|
|
2660
|
+
T("li", {
|
|
2661
2661
|
class: $([
|
|
2662
2662
|
d ? "text-white bg-blue-500" : "text-grey-900 dark:text-grey-50",
|
|
2663
2663
|
"cursor-default select-none relative py-2 pl-3 pr-12",
|
|
2664
2664
|
{ "opacity-50 bg-grey-100": s.disabled }
|
|
2665
2665
|
])
|
|
2666
2666
|
}, [
|
|
2667
|
-
|
|
2668
|
-
s.disabled && c.disabledBadge ? (R(),
|
|
2667
|
+
T("div", ar, [
|
|
2668
|
+
s.disabled && c.disabledBadge ? (R(), L("span", sr, H(c.disabledBadge), 1)) : M("", !0)
|
|
2669
2669
|
]),
|
|
2670
|
-
|
|
2670
|
+
T("span", {
|
|
2671
2671
|
class: $([
|
|
2672
2672
|
v ? "font-semibold" : "font-normal",
|
|
2673
2673
|
"block truncate"
|
|
2674
2674
|
])
|
|
2675
2675
|
}, [
|
|
2676
|
-
s.icon ? (R(), K(
|
|
2676
|
+
s.icon ? (R(), K(z, {
|
|
2677
2677
|
key: 0,
|
|
2678
2678
|
class: "inline-block mr-1",
|
|
2679
2679
|
name: s.icon
|
|
2680
2680
|
}, null, 8, ["name"])) : M("", !0),
|
|
2681
|
-
|
|
2681
|
+
T("span", {
|
|
2682
|
+
innerHTML: s.label
|
|
2683
|
+
}, null, 8, ur)
|
|
2682
2684
|
], 2),
|
|
2683
|
-
v ? (R(),
|
|
2685
|
+
v ? (R(), L("span", {
|
|
2684
2686
|
key: 0,
|
|
2685
2687
|
class: $([
|
|
2686
2688
|
d ? "text-blue-100" : "text-blue-500",
|
|
2687
2689
|
"absolute inset-y-0 right-0 flex items-center pr-4"
|
|
2688
2690
|
])
|
|
2689
2691
|
}, [
|
|
2690
|
-
F(
|
|
2692
|
+
F(z, {
|
|
2691
2693
|
name: "check",
|
|
2692
2694
|
class: "h-5 w-5",
|
|
2693
2695
|
"aria-hidden": "true"
|
|
@@ -2735,24 +2737,24 @@ const _r = /* @__PURE__ */ A({
|
|
|
2735
2737
|
margin: `mr-${o[Math.floor(Math.random() * o.length)]}`
|
|
2736
2738
|
};
|
|
2737
2739
|
});
|
|
2738
|
-
return (o, n) => (R(),
|
|
2739
|
-
|
|
2740
|
-
o.avatar ? (R(),
|
|
2741
|
-
o.title ? (R(),
|
|
2740
|
+
return (o, n) => (R(), L("div", cr, [
|
|
2741
|
+
T("div", dr, [
|
|
2742
|
+
o.avatar ? (R(), L("div", fr)) : M("", !0),
|
|
2743
|
+
o.title ? (R(), L("div", pr)) : M("", !0)
|
|
2742
2744
|
]),
|
|
2743
|
-
o.lines > 0 ? (R(),
|
|
2744
|
-
(R(!0),
|
|
2745
|
+
o.lines > 0 ? (R(), L("div", mr, [
|
|
2746
|
+
(R(!0), L(be, null, jt(P(l), (r, i) => (R(), L("div", {
|
|
2745
2747
|
class: $(["h-4 bg-current rounded-lg", r.margin]),
|
|
2746
2748
|
key: i
|
|
2747
2749
|
}, null, 2))), 128))
|
|
2748
2750
|
])) : M("", !0),
|
|
2749
|
-
o.footer ? (R(),
|
|
2751
|
+
o.footer ? (R(), L("div", vr)) : M("", !0)
|
|
2750
2752
|
]));
|
|
2751
2753
|
}
|
|
2752
2754
|
}), Ar = /* @__PURE__ */ A({
|
|
2753
2755
|
__name: "Spinner",
|
|
2754
2756
|
setup(e) {
|
|
2755
|
-
return (t, l) => (R(), K(P(
|
|
2757
|
+
return (t, l) => (R(), K(P(z), {
|
|
2756
2758
|
class: "animate-spin",
|
|
2757
2759
|
name: "circle-notch"
|
|
2758
2760
|
}));
|
|
@@ -2818,32 +2820,32 @@ const _r = /* @__PURE__ */ A({
|
|
|
2818
2820
|
function c() {
|
|
2819
2821
|
o.isDisabled || l("onClickSplit");
|
|
2820
2822
|
}
|
|
2821
|
-
return (a, s) => (R(),
|
|
2822
|
-
|
|
2823
|
+
return (a, s) => (R(), L("div", gr, [
|
|
2824
|
+
T("button", {
|
|
2823
2825
|
type: "button",
|
|
2824
2826
|
"aria-label": a.label,
|
|
2825
2827
|
tabindex: a.isDisabled ? "-1" : void 0,
|
|
2826
2828
|
class: $(["relative transition duration-150 ease-in-out rounded-l-lg", n.value]),
|
|
2827
2829
|
onClick: u
|
|
2828
2830
|
}, [
|
|
2829
|
-
|
|
2831
|
+
T("div", {
|
|
2830
2832
|
class: $(!a.isLoading || "invisible")
|
|
2831
2833
|
}, [
|
|
2832
|
-
|
|
2834
|
+
T("span", null, H(a.label), 1)
|
|
2833
2835
|
], 2),
|
|
2834
|
-
a.isLoading ? (R(),
|
|
2835
|
-
F(
|
|
2836
|
+
a.isLoading ? (R(), L("span", hr, [
|
|
2837
|
+
F(z, {
|
|
2836
2838
|
class: "ml-3 animate-spin",
|
|
2837
2839
|
name: "circle-notch"
|
|
2838
2840
|
})
|
|
2839
2841
|
])) : M("", !0)
|
|
2840
2842
|
], 10, br),
|
|
2841
|
-
|
|
2843
|
+
T("button", {
|
|
2842
2844
|
type: "button",
|
|
2843
2845
|
class: $(["border-l-white/50 border-l transition duration-150 ease-in-out rounded-r-lg", [n.value, r.value]]),
|
|
2844
2846
|
onClick: c
|
|
2845
2847
|
}, [
|
|
2846
|
-
F(
|
|
2848
|
+
F(z, {
|
|
2847
2849
|
class: $([i.value]),
|
|
2848
2850
|
name: a.icon
|
|
2849
2851
|
}, null, 8, ["class", "name"])
|
|
@@ -2865,18 +2867,18 @@ const _r = /* @__PURE__ */ A({
|
|
|
2865
2867
|
const l = t, o = (n) => {
|
|
2866
2868
|
l("update:modelValue", n), l("change", n);
|
|
2867
2869
|
};
|
|
2868
|
-
return (n, r) => (R(), K(P(
|
|
2870
|
+
return (n, r) => (R(), K(P(hl), {
|
|
2869
2871
|
modelValue: n.modelValue,
|
|
2870
2872
|
label: n.label,
|
|
2871
2873
|
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
2874
|
"onUpdate:modelValue": o
|
|
2873
2875
|
}, {
|
|
2874
2876
|
default: W(() => [
|
|
2875
|
-
|
|
2877
|
+
T("span", {
|
|
2876
2878
|
class: $(["absolute text-xs text-center text-white inset-x-2", n.modelValue ? "pr-3" : "pl-3"])
|
|
2877
|
-
},
|
|
2878
|
-
|
|
2879
|
-
|
|
2879
|
+
}, H(n.modelValue === !0 ? n.onLabel : n.offLabel), 3),
|
|
2880
|
+
T("span", yr, H(n.label), 1),
|
|
2881
|
+
T("span", {
|
|
2880
2882
|
class: $([n.modelValue ? "translate-x-9" : "translate-x-1", "inline-block w-4 h-4 transition bg-white rounded-full"])
|
|
2881
2883
|
}, null, 2)
|
|
2882
2884
|
]),
|
|
@@ -2903,8 +2905,8 @@ const _r = /* @__PURE__ */ A({
|
|
|
2903
2905
|
focus: () => {
|
|
2904
2906
|
o.isDisabled || a.value.focus();
|
|
2905
2907
|
}
|
|
2906
|
-
}), (d, v) => (R(),
|
|
2907
|
-
|
|
2908
|
+
}), (d, v) => (R(), L("div", xr, [
|
|
2909
|
+
T("textarea", ot({
|
|
2908
2910
|
class: ["mono-50 bg-white text-grey-800 placeholder:text-grey-400 placeholder:font-normal border-grey-300 dark:bg-grey-800 dark:text-grey-100 dark:placeholder:text-grey-500 dark:border-grey-700 focus:border-blue-400 focus:ring-blue-400 dark:focus:border-blue-800 dark:focus:ring-blue-800 rounded", [P(r), P(u), P(i)]],
|
|
2909
2911
|
tabindex: d.isDisabled ? "-1" : void 0,
|
|
2910
2912
|
value: d.modelValue ?? ""
|
|
@@ -2922,7 +2924,7 @@ const _r = /* @__PURE__ */ A({
|
|
|
2922
2924
|
export {
|
|
2923
2925
|
Rr as D9Button,
|
|
2924
2926
|
Er as D9Checkbox,
|
|
2925
|
-
|
|
2927
|
+
z as D9Icon,
|
|
2926
2928
|
Dr as D9Input,
|
|
2927
2929
|
Pr as D9Label,
|
|
2928
2930
|
_r as D9Menu,
|
|
@@ -2934,5 +2936,5 @@ export {
|
|
|
2934
2936
|
Mr as D9Switch,
|
|
2935
2937
|
Vr as D9Textarea,
|
|
2936
2938
|
xt as brands,
|
|
2937
|
-
|
|
2939
|
+
Gn as icons
|
|
2938
2940
|
};
|