@vireo-ai/trellis-ui 0.1.8 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/index.js +766 -765
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/index.js.map +1 -1
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/trellis.js +3 -5
- package/packages/server/trellis_ui/static/trellis_ui/assets/js/trellis.min.js +3 -5
|
@@ -7313,17 +7313,14 @@ var Gp = (e) => {
|
|
|
7313
7313
|
};
|
|
7314
7314
|
return {
|
|
7315
7315
|
push(e) {
|
|
7316
|
-
|
|
7317
|
-
|
|
7318
|
-
|
|
7319
|
-
|
|
7320
|
-
|
|
7321
|
-
|
|
7322
|
-
|
|
7323
|
-
|
|
7324
|
-
}
|
|
7325
|
-
r += t;
|
|
7326
|
-
}
|
|
7316
|
+
let t = 0;
|
|
7317
|
+
i && e.length > 0 && (i = !1, e.charCodeAt(0) === 10 && (t = 1));
|
|
7318
|
+
let n = t;
|
|
7319
|
+
for (let a = t; a < e.length; a += 1) {
|
|
7320
|
+
let t = e.charCodeAt(a);
|
|
7321
|
+
t !== 10 && t !== 13 || (o(r + e.slice(n, a)), r = "", t === 13 && (a + 1 < e.length && e.charCodeAt(a + 1) === 10 ? a += 1 : a + 1 === e.length && (i = !0)), n = a + 1);
|
|
7322
|
+
}
|
|
7323
|
+
r += e.slice(n);
|
|
7327
7324
|
},
|
|
7328
7325
|
end() {
|
|
7329
7326
|
r &&= (o(r), ""), a();
|
|
@@ -7345,10 +7342,10 @@ var Gp = (e) => {
|
|
|
7345
7342
|
}, om = (e) => {
|
|
7346
7343
|
let t = /* @__PURE__ */ new Map();
|
|
7347
7344
|
for (let n of e.data.split("\n")) {
|
|
7348
|
-
let e = n.indexOf(" ");
|
|
7349
|
-
if (
|
|
7350
|
-
let
|
|
7351
|
-
|
|
7345
|
+
let e = n.indexOf(" "), r = e > 0, i = r ? n.slice(0, e) : n;
|
|
7346
|
+
if (!r && i !== "html") return J("x-ui-stream: invalid SSE command line", i), null;
|
|
7347
|
+
let a = r ? n.slice(e + 1) : "", o = t.get(i);
|
|
7348
|
+
o ? o.push(a) : t.set(i, [a]);
|
|
7352
7349
|
}
|
|
7353
7350
|
return t;
|
|
7354
7351
|
}, sm = (e, t) => {
|
|
@@ -7356,14 +7353,16 @@ var Gp = (e) => {
|
|
|
7356
7353
|
if (n?.length) return n.length > 1 && J("x-ui-stream: duplicate SSE command, using last value", t), n.at(-1);
|
|
7357
7354
|
}, cm = (e, t) => {
|
|
7358
7355
|
let n = om(t);
|
|
7359
|
-
n.size
|
|
7356
|
+
!n || n.size === 0 || Qp(e, {
|
|
7360
7357
|
mode: sm(n, "mode") ?? "replace",
|
|
7361
7358
|
target: sm(n, "target") ?? null,
|
|
7362
7359
|
selector: sm(n, "selector") ?? null,
|
|
7363
7360
|
html: n.get("html")?.join("\n") ?? null
|
|
7364
7361
|
});
|
|
7365
7362
|
}, lm = (e) => {
|
|
7366
|
-
let t = om(e)
|
|
7363
|
+
let t = om(e);
|
|
7364
|
+
if (!t) return;
|
|
7365
|
+
let n = sm(t, "event");
|
|
7367
7366
|
if (!n) {
|
|
7368
7367
|
J("x-ui-stream: dispatch SSE frame missing event");
|
|
7369
7368
|
return;
|
|
@@ -7384,7 +7383,9 @@ var Gp = (e) => {
|
|
|
7384
7383
|
"trellis-ui-patch": cm,
|
|
7385
7384
|
"trellis-ui-dispatch": (e, t) => lm(t),
|
|
7386
7385
|
"trellis-ui-location": (e, t) => {
|
|
7387
|
-
let n = om(t)
|
|
7386
|
+
let n = om(t);
|
|
7387
|
+
if (!n) return;
|
|
7388
|
+
let r = sm(n, "url");
|
|
7388
7389
|
if (!r) {
|
|
7389
7390
|
J("x-ui-stream: location SSE frame missing url");
|
|
7390
7391
|
return;
|
|
@@ -7396,72 +7397,72 @@ var Gp = (e) => {
|
|
|
7396
7397
|
...i ? { mode: i } : {}
|
|
7397
7398
|
});
|
|
7398
7399
|
}
|
|
7399
|
-
}, dm = (e, t) => {
|
|
7400
|
+
}, dm = "trellis-ui-", fm = (e, t) => {
|
|
7400
7401
|
let n = um[t.event];
|
|
7401
7402
|
if (!n) {
|
|
7402
|
-
J("x-ui-stream: unsupported SSE event", t.event);
|
|
7403
|
+
t.event.startsWith(dm) && J("x-ui-stream: unsupported SSE event", t.event);
|
|
7403
7404
|
return;
|
|
7404
7405
|
}
|
|
7405
7406
|
n(e, t);
|
|
7406
|
-
},
|
|
7407
|
-
|
|
7408
|
-
} }),
|
|
7407
|
+
}, pm = (e, t) => new Vp(t).listen({ onMessage(t) {
|
|
7408
|
+
fm(e, t);
|
|
7409
|
+
} }), mm = (e) => {
|
|
7409
7410
|
typeof e.directive == "function" && e.directive("ui-stream", (t, { expression: n }, { cleanup: r }) => {
|
|
7410
7411
|
if (!n) return;
|
|
7411
7412
|
let i = null;
|
|
7412
|
-
i =
|
|
7413
|
+
i = pm(e, n), r(() => {
|
|
7413
7414
|
i?.abort(), i = null;
|
|
7414
7415
|
});
|
|
7415
7416
|
});
|
|
7416
|
-
},
|
|
7417
|
+
}, hm = "X-Trellis-UI-Request", gm = "meta[name=\"csrf-token\"]", _m = "text/event-stream", vm = "data-ui-request-pending", ym = "application/x-www-form-urlencoded", bm = "multipart/form-data", xm = new Set(["GET"]), Sm = null, Cm = (e) => {
|
|
7417
7418
|
let t = (e || "GET").toUpperCase();
|
|
7418
7419
|
return t === "POST" || t === "PUT" || t === "PATCH" || t === "DELETE" ? t : "GET";
|
|
7419
|
-
},
|
|
7420
|
+
}, wm = (e, t, n) => {
|
|
7420
7421
|
if (e instanceof FormData) {
|
|
7421
7422
|
e.append(t, n);
|
|
7422
7423
|
return;
|
|
7423
7424
|
}
|
|
7424
7425
|
e.append(t, n instanceof File ? n.name : String(n));
|
|
7425
|
-
},
|
|
7426
|
+
}, Tm = (e, t, n) => {
|
|
7426
7427
|
if (Array.isArray(n)) {
|
|
7427
|
-
n.forEach((n) =>
|
|
7428
|
+
n.forEach((n) => Tm(e, t, n));
|
|
7428
7429
|
return;
|
|
7429
7430
|
}
|
|
7430
|
-
n != null &&
|
|
7431
|
-
}, Tm = (e, t) => {
|
|
7432
|
-
Object.entries(t).forEach(([t, n]) => wm(e, t, n));
|
|
7431
|
+
n != null && wm(e, t, n instanceof Blob ? n : String(n));
|
|
7433
7432
|
}, Em = (e, t) => {
|
|
7433
|
+
Object.entries(t).forEach(([t, n]) => Tm(e, t, n));
|
|
7434
|
+
}, Dm = (e, t) => {
|
|
7434
7435
|
if (t) {
|
|
7435
7436
|
if (t instanceof FormData || t instanceof URLSearchParams) {
|
|
7436
|
-
for (let [n, r] of t.entries())
|
|
7437
|
+
for (let [n, r] of t.entries()) wm(e, n, r);
|
|
7437
7438
|
return;
|
|
7438
7439
|
}
|
|
7439
|
-
|
|
7440
|
+
Em(e, t);
|
|
7440
7441
|
}
|
|
7441
|
-
},
|
|
7442
|
+
}, Om = (e, t) => {
|
|
7442
7443
|
let n = new Headers(e);
|
|
7443
|
-
n.set(
|
|
7444
|
-
let r = document.querySelector(
|
|
7445
|
-
return r && n.set("X-CSRFToken", r), t instanceof URLSearchParams && !n.has("Content-Type") && n.set("Content-Type",
|
|
7446
|
-
},
|
|
7444
|
+
n.set(hm, "true");
|
|
7445
|
+
let r = document.querySelector(gm)?.content;
|
|
7446
|
+
return r && n.set("X-CSRFToken", r), t instanceof URLSearchParams && !n.has("Content-Type") && n.set("Content-Type", ym), n;
|
|
7447
|
+
}, km = (e, t, n) => {
|
|
7447
7448
|
if (e) return new URL(e, document.baseURI);
|
|
7448
7449
|
if (t instanceof HTMLFormElement) {
|
|
7449
7450
|
let e = n?.getAttribute("formaction") || t.getAttribute("action") || window.location.href;
|
|
7450
7451
|
return new URL(e, document.baseURI);
|
|
7451
7452
|
}
|
|
7452
7453
|
return t instanceof HTMLAnchorElement ? new URL(t.href, document.baseURI) : new URL(window.location.href);
|
|
7453
|
-
},
|
|
7454
|
+
}, Am = (e, t) => t?.getAttribute("formenctype") || e.enctype || ym, jm = (e) => {
|
|
7454
7455
|
if (!(e instanceof HTMLButtonElement || e instanceof HTMLInputElement)) return null;
|
|
7455
7456
|
let t = e.getAttribute("name");
|
|
7456
7457
|
return t ? [t, e.value] : null;
|
|
7457
|
-
},
|
|
7458
|
-
let n = new FormData(e), r =
|
|
7458
|
+
}, Mm = (e, t) => {
|
|
7459
|
+
let n = new FormData(e), r = jm(t);
|
|
7459
7460
|
return r && n.append(...r), n;
|
|
7460
|
-
},
|
|
7461
|
+
}, Nm = (e) => {
|
|
7461
7462
|
let t = new URLSearchParams();
|
|
7462
7463
|
for (let [n, r] of e.entries()) r instanceof File ? t.append(n, r.name) : t.append(n, r);
|
|
7463
7464
|
return t;
|
|
7464
|
-
},
|
|
7465
|
+
}, Pm = (e, t) => {
|
|
7465
7466
|
if (e === void 0) return {
|
|
7466
7467
|
payload: t,
|
|
7467
7468
|
explicit: !1
|
|
@@ -7475,58 +7476,58 @@ var Gp = (e) => {
|
|
|
7475
7476
|
explicit: !0
|
|
7476
7477
|
};
|
|
7477
7478
|
let n = new URLSearchParams();
|
|
7478
|
-
return
|
|
7479
|
+
return Em(n, e), {
|
|
7479
7480
|
payload: n,
|
|
7480
7481
|
explicit: !0
|
|
7481
7482
|
};
|
|
7482
|
-
},
|
|
7483
|
+
}, Fm = (e, t) => {
|
|
7483
7484
|
if (!t) return e;
|
|
7484
|
-
if (e instanceof FormData || e instanceof URLSearchParams) return
|
|
7485
|
+
if (e instanceof FormData || e instanceof URLSearchParams) return Dm(e, t), e;
|
|
7485
7486
|
let n = new URLSearchParams();
|
|
7486
|
-
return typeof e == "string" && n.append("data", e),
|
|
7487
|
-
},
|
|
7488
|
-
payload:
|
|
7489
|
-
enctype:
|
|
7487
|
+
return typeof e == "string" && n.append("data", e), Dm(n, t), n;
|
|
7488
|
+
}, Im = (e, t) => e instanceof HTMLFormElement ? {
|
|
7489
|
+
payload: Mm(e, t),
|
|
7490
|
+
enctype: Am(e, t)
|
|
7490
7491
|
} : {
|
|
7491
7492
|
payload: new URLSearchParams(),
|
|
7492
|
-
enctype:
|
|
7493
|
-
},
|
|
7494
|
-
let n = t.source, r = t.submitter ?? null, i =
|
|
7495
|
-
return
|
|
7493
|
+
enctype: ym
|
|
7494
|
+
}, Lm = (e, t, n) => t ? Cm(t) : e instanceof HTMLFormElement ? Cm(n?.getAttribute("formmethod") || e.getAttribute("method")) : "GET", Rm = (e, t = {}) => {
|
|
7495
|
+
let n = t.source, r = t.submitter ?? null, i = Lm(n, t.method, r), a = km(e, n, r), o = Im(n, r), s = Pm(t.data, o.payload), c = Fm(s.payload, t.extra), l = { method: i }, u = null;
|
|
7496
|
+
return xm.has(i) ? c instanceof FormData || c instanceof URLSearchParams ? Nm(c).forEach((e, t) => a.searchParams.append(t, e)) : typeof c == "string" && a.searchParams.append("data", c) : u = c instanceof FormData && (s.explicit || o.enctype === bm) ? c : c instanceof FormData ? Nm(c) : c, l.headers = Om(t.headers, u), u != null && (l.body = u), {
|
|
7496
7497
|
url: a,
|
|
7497
7498
|
method: i,
|
|
7498
7499
|
init: l
|
|
7499
7500
|
};
|
|
7500
|
-
},
|
|
7501
|
+
}, zm = (e) => e?.isConnected ? e : document, Bm = (e, t, n = {}) => new CustomEvent(e, {
|
|
7501
7502
|
bubbles: !0,
|
|
7502
7503
|
composed: !0,
|
|
7503
7504
|
cancelable: n.cancelable ?? !1,
|
|
7504
7505
|
detail: t
|
|
7505
|
-
}),
|
|
7506
|
+
}), Vm = (e, t, n, r) => zm(t).dispatchEvent(Bm(e, n, r)), Hm = /* @__PURE__ */ new WeakMap(), Um = (e) => {
|
|
7506
7507
|
if (!e) return;
|
|
7507
|
-
let t =
|
|
7508
|
-
|
|
7509
|
-
},
|
|
7508
|
+
let t = Hm.get(e) ?? 0;
|
|
7509
|
+
Hm.set(e, t + 1), e.setAttribute("aria-busy", "true"), e.setAttribute(vm, "true");
|
|
7510
|
+
}, Wm = (e) => {
|
|
7510
7511
|
if (!e) return;
|
|
7511
|
-
let t = (
|
|
7512
|
+
let t = (Hm.get(e) ?? 1) - 1;
|
|
7512
7513
|
if (t > 0) {
|
|
7513
|
-
|
|
7514
|
+
Hm.set(e, t);
|
|
7514
7515
|
return;
|
|
7515
7516
|
}
|
|
7516
|
-
|
|
7517
|
-
},
|
|
7517
|
+
Hm.delete(e), e.removeAttribute("aria-busy"), e.removeAttribute(vm);
|
|
7518
|
+
}, Gm = (e) => e.headers.get("Content-Type")?.toLowerCase().includes(_m) ?? !1, Km = async (e, t) => t.status === 204 ? {
|
|
7518
7519
|
response: t,
|
|
7519
7520
|
type: "empty"
|
|
7520
|
-
} : t.redirected && !
|
|
7521
|
+
} : t.redirected && !Gm(t) ? (window.location.assign(t.url), {
|
|
7521
7522
|
response: t,
|
|
7522
7523
|
type: "redirect"
|
|
7523
|
-
}) :
|
|
7524
|
+
}) : Gm(t) ? (await am(t, (t) => fm(e, t)), {
|
|
7524
7525
|
response: t,
|
|
7525
7526
|
type: "sse"
|
|
7526
7527
|
}) : (J("x-ui-request: expected text/event-stream response", t), {
|
|
7527
7528
|
response: t,
|
|
7528
7529
|
type: "other"
|
|
7529
|
-
}),
|
|
7530
|
+
}), qm = (e, t) => {
|
|
7530
7531
|
if (!t) return {
|
|
7531
7532
|
signal: e.signal,
|
|
7532
7533
|
cleanup: () => void 0
|
|
@@ -7536,8 +7537,8 @@ var Gp = (e) => {
|
|
|
7536
7537
|
signal: e.signal,
|
|
7537
7538
|
cleanup: () => t.removeEventListener("abort", n)
|
|
7538
7539
|
};
|
|
7539
|
-
},
|
|
7540
|
-
let r = n.source, i = new AbortController(), a =
|
|
7540
|
+
}, Jm = (e, t) => t.aborted || e instanceof DOMException && e.name === "AbortError" || e instanceof Error && e.name === "AbortError", Ym = async (e, t, n = {}) => {
|
|
7541
|
+
let r = n.source, i = new AbortController(), a = Rm(t, n), o = qm(i, n.signal), s = o.signal;
|
|
7541
7542
|
a.init.signal = s;
|
|
7542
7543
|
let c = {
|
|
7543
7544
|
source: r ?? document,
|
|
@@ -7547,56 +7548,56 @@ var Gp = (e) => {
|
|
|
7547
7548
|
controller: i,
|
|
7548
7549
|
signal: s
|
|
7549
7550
|
};
|
|
7550
|
-
if (!
|
|
7551
|
+
if (!Vm("ui:request:before", r, c, { cancelable: !0 })) return {
|
|
7551
7552
|
response: null,
|
|
7552
7553
|
type: "empty"
|
|
7553
7554
|
};
|
|
7554
|
-
|
|
7555
|
+
Um(r), Vm("ui:request:start", r, c);
|
|
7555
7556
|
try {
|
|
7556
|
-
let t = await fetch(a.url.toString(), a.init), n = await
|
|
7557
|
-
return c.response = t, c.responseType = n.type, n.type === "sse" || t.ok && n.type !== "other" || n.type === "redirect" ?
|
|
7557
|
+
let t = await fetch(a.url.toString(), a.init), n = await Km(e, t);
|
|
7558
|
+
return c.response = t, c.responseType = n.type, n.type === "sse" || t.ok && n.type !== "other" || n.type === "redirect" ? Vm("ui:request:success", r, c) : Vm("ui:request:error", r, c), n;
|
|
7558
7559
|
} catch (e) {
|
|
7559
|
-
if (
|
|
7560
|
+
if (Jm(e, s)) return c.responseType = "aborted", {
|
|
7560
7561
|
response: null,
|
|
7561
7562
|
type: "aborted"
|
|
7562
7563
|
};
|
|
7563
|
-
throw c.error = e,
|
|
7564
|
+
throw c.error = e, Vm("ui:request:error", r, c), e;
|
|
7564
7565
|
} finally {
|
|
7565
|
-
o.cleanup(),
|
|
7566
|
+
o.cleanup(), Wm(r), Vm("ui:request:finish", r, c);
|
|
7566
7567
|
}
|
|
7567
|
-
},
|
|
7568
|
-
if (!
|
|
7569
|
-
return
|
|
7570
|
-
},
|
|
7568
|
+
}, Xm = () => {
|
|
7569
|
+
if (!Sm) throw Error("Trellis request runtime has not been registered with Alpine.");
|
|
7570
|
+
return Sm;
|
|
7571
|
+
}, Zm = (e, t = {}) => Ym(Xm(), e, t), Qm = (e, t = {}) => Zm(e, {
|
|
7571
7572
|
...t,
|
|
7572
7573
|
method: "GET"
|
|
7573
|
-
}),
|
|
7574
|
+
}), $m = (e, t = {}) => Zm(e, {
|
|
7574
7575
|
...t,
|
|
7575
7576
|
method: "POST"
|
|
7576
|
-
}),
|
|
7577
|
+
}), eh = (e, t = {}) => Zm(e, {
|
|
7577
7578
|
...t,
|
|
7578
7579
|
method: "PUT"
|
|
7579
|
-
}),
|
|
7580
|
+
}), th = (e, t = {}) => Zm(e, {
|
|
7580
7581
|
...t,
|
|
7581
7582
|
method: "DELETE"
|
|
7582
|
-
}),
|
|
7583
|
-
|
|
7584
|
-
},
|
|
7583
|
+
}), nh = (e) => {
|
|
7584
|
+
Sm = e;
|
|
7585
|
+
}, rh = [
|
|
7585
7586
|
"light",
|
|
7586
7587
|
"dark",
|
|
7587
7588
|
"system"
|
|
7588
|
-
],
|
|
7589
|
+
], ih = (e) => typeof e == "string" && rh.includes(e), ah = (e) => ih(e) ? e : "system", oh = () => document.documentElement.dataset.themeStorageKey || "trellis-ui-theme", sh = () => ah(document.documentElement.dataset.theme), ch = () => {
|
|
7589
7590
|
try {
|
|
7590
|
-
return
|
|
7591
|
+
return ah(window.localStorage.getItem(oh()) || sh());
|
|
7591
7592
|
} catch {
|
|
7592
|
-
return
|
|
7593
|
+
return sh();
|
|
7593
7594
|
}
|
|
7594
|
-
},
|
|
7595
|
+
}, lh = (e) => {
|
|
7595
7596
|
try {
|
|
7596
|
-
window.localStorage.setItem(
|
|
7597
|
+
window.localStorage.setItem(oh(), e);
|
|
7597
7598
|
} catch {}
|
|
7598
|
-
},
|
|
7599
|
-
let t =
|
|
7599
|
+
}, uh = () => window.matchMedia("(prefers-color-scheme: dark)").matches, dh = (e) => e === "dark" || e === "system" && uh(), fh = (e) => {
|
|
7600
|
+
let t = dh(e), n = t ? "dark" : "light", r = document.documentElement;
|
|
7600
7601
|
return r.classList.toggle("dark", t), r.dataset.theme = e, r.dataset.resolvedTheme = n, r.dispatchEvent(new CustomEvent("ui:theme-change", {
|
|
7601
7602
|
detail: {
|
|
7602
7603
|
mode: e,
|
|
@@ -7611,45 +7612,45 @@ var Gp = (e) => {
|
|
|
7611
7612
|
dark: t,
|
|
7612
7613
|
on: t
|
|
7613
7614
|
};
|
|
7614
|
-
},
|
|
7615
|
-
let e =
|
|
7615
|
+
}, ph = () => {
|
|
7616
|
+
let e = fh(ch());
|
|
7616
7617
|
return {
|
|
7617
7618
|
mode: e.mode,
|
|
7618
7619
|
resolved: e.resolved,
|
|
7619
7620
|
dark: e.dark,
|
|
7620
7621
|
on: e.on,
|
|
7621
7622
|
set(e) {
|
|
7622
|
-
let t =
|
|
7623
|
-
|
|
7624
|
-
let n =
|
|
7623
|
+
let t = ah(e);
|
|
7624
|
+
lh(t);
|
|
7625
|
+
let n = fh(t);
|
|
7625
7626
|
this.mode = n.mode, this.resolved = n.resolved, this.dark = n.dark, this.on = n.on;
|
|
7626
7627
|
},
|
|
7627
7628
|
toggle() {
|
|
7628
7629
|
this.set(this.dark ? "light" : "dark");
|
|
7629
7630
|
}
|
|
7630
7631
|
};
|
|
7631
|
-
},
|
|
7632
|
+
}, mh = (e) => {
|
|
7632
7633
|
if (typeof e.store != "function") return;
|
|
7633
|
-
let t = e.store("theme") ??
|
|
7634
|
+
let t = e.store("theme") ?? ph();
|
|
7634
7635
|
e.store("theme", t), window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", () => {
|
|
7635
7636
|
if (t.mode !== "system") return;
|
|
7636
|
-
let e =
|
|
7637
|
+
let e = fh("system");
|
|
7637
7638
|
t.mode = e.mode, t.resolved = e.resolved, t.dark = e.dark, t.on = e.on;
|
|
7638
7639
|
});
|
|
7639
|
-
},
|
|
7640
|
-
if (
|
|
7640
|
+
}, hh = 0, gh = null, _h = () => {
|
|
7641
|
+
if (hh === 0) {
|
|
7641
7642
|
let e = document.documentElement, t = document.body, n = Math.max(0, window.innerWidth - e.clientWidth);
|
|
7642
|
-
|
|
7643
|
+
gh = {
|
|
7643
7644
|
bodyOverflow: t.style.overflow,
|
|
7644
7645
|
bodyPaddingRight: t.style.paddingRight,
|
|
7645
7646
|
rootOverflow: e.style.overflow
|
|
7646
7647
|
}, e.style.overflow = "hidden", t.style.overflow = "hidden", n > 0 && (t.style.paddingRight = `${n}px`), e.setAttribute("data-ui-scroll-locked", "");
|
|
7647
7648
|
}
|
|
7648
|
-
|
|
7649
|
-
},
|
|
7650
|
-
if (
|
|
7649
|
+
hh += 1;
|
|
7650
|
+
}, vh = () => {
|
|
7651
|
+
if (hh === 0 || (--hh, hh > 0)) return;
|
|
7651
7652
|
let e = document.documentElement, t = document.body;
|
|
7652
|
-
t.style.overflow =
|
|
7653
|
+
t.style.overflow = gh?.bodyOverflow ?? "", t.style.paddingRight = gh?.bodyPaddingRight ?? "", e.style.overflow = gh?.rootOverflow ?? "", e.removeAttribute("data-ui-scroll-locked"), gh = null;
|
|
7653
7654
|
}, Z = {
|
|
7654
7655
|
createAnchoredPopover: dl,
|
|
7655
7656
|
createCollectionNavigation: vl,
|
|
@@ -7679,56 +7680,56 @@ var Gp = (e) => {
|
|
|
7679
7680
|
className: ml,
|
|
7680
7681
|
cx: hl,
|
|
7681
7682
|
motion: xs,
|
|
7682
|
-
get:
|
|
7683
|
-
post:
|
|
7684
|
-
put:
|
|
7685
|
-
delete:
|
|
7686
|
-
registerRequestRuntime:
|
|
7683
|
+
get: Qm,
|
|
7684
|
+
post: $m,
|
|
7685
|
+
put: eh,
|
|
7686
|
+
delete: th,
|
|
7687
|
+
registerRequestRuntime: nh,
|
|
7687
7688
|
applyStreamPatch: $p,
|
|
7688
7689
|
applyStreamPatches: Qp,
|
|
7689
7690
|
applyUiEffect: nm,
|
|
7690
7691
|
applyUiEffects: rm,
|
|
7691
|
-
connectStream:
|
|
7692
|
+
connectStream: pm,
|
|
7692
7693
|
dispatchStreamEvent: em,
|
|
7693
|
-
applyThemeMode:
|
|
7694
|
-
createThemeStore:
|
|
7695
|
-
lockDocumentScroll:
|
|
7694
|
+
applyThemeMode: fh,
|
|
7695
|
+
createThemeStore: ph,
|
|
7696
|
+
lockDocumentScroll: _h,
|
|
7696
7697
|
registerConfirm: El,
|
|
7697
7698
|
registerResizable: xf,
|
|
7698
|
-
registerStream:
|
|
7699
|
-
registerThemeStore:
|
|
7699
|
+
registerStream: mm,
|
|
7700
|
+
registerThemeStore: mh,
|
|
7700
7701
|
unregisterConfirm: Dl,
|
|
7701
|
-
unlockDocumentScroll:
|
|
7702
|
-
},
|
|
7702
|
+
unlockDocumentScroll: vh
|
|
7703
|
+
}, yh = [
|
|
7703
7704
|
"xs",
|
|
7704
7705
|
"sm",
|
|
7705
7706
|
"md",
|
|
7706
7707
|
"lg",
|
|
7707
7708
|
"xlg"
|
|
7708
|
-
],
|
|
7709
|
+
], bh = ["outline", "filled"], xh = [
|
|
7709
7710
|
"outline",
|
|
7710
7711
|
"solid",
|
|
7711
7712
|
"mini",
|
|
7712
7713
|
"micro"
|
|
7713
|
-
],
|
|
7714
|
+
], Sh = [
|
|
7714
7715
|
"button",
|
|
7715
7716
|
"submit",
|
|
7716
7717
|
"reset"
|
|
7717
|
-
],
|
|
7718
|
+
], Ch = [
|
|
7718
7719
|
"start",
|
|
7719
7720
|
"center",
|
|
7720
7721
|
"end"
|
|
7721
|
-
],
|
|
7722
|
+
], wh = [
|
|
7722
7723
|
"bottom",
|
|
7723
7724
|
"top",
|
|
7724
7725
|
"left",
|
|
7725
7726
|
"right"
|
|
7726
|
-
],
|
|
7727
|
+
], Th = [
|
|
7727
7728
|
"top",
|
|
7728
7729
|
"right",
|
|
7729
7730
|
"bottom",
|
|
7730
7731
|
"left"
|
|
7731
|
-
],
|
|
7732
|
+
], Eh = ["vertical", "horizontal"], Dh = [
|
|
7732
7733
|
"leading",
|
|
7733
7734
|
"trailing",
|
|
7734
7735
|
"center",
|
|
@@ -7736,29 +7737,29 @@ var Gp = (e) => {
|
|
|
7736
7737
|
"top-trailing",
|
|
7737
7738
|
"bottom-leading",
|
|
7738
7739
|
"bottom-trailing"
|
|
7739
|
-
],
|
|
7740
|
+
], Oh = ["default"], kh = [
|
|
7740
7741
|
"h1",
|
|
7741
7742
|
"h2",
|
|
7742
7743
|
"h3",
|
|
7743
7744
|
"h4",
|
|
7744
7745
|
"h5",
|
|
7745
7746
|
"h6"
|
|
7746
|
-
],
|
|
7747
|
+
], Ah = {
|
|
7747
7748
|
inherit: "text-inherit",
|
|
7748
7749
|
muted: "text-foreground-muted",
|
|
7749
7750
|
subtle: "text-foreground-subtle",
|
|
7750
7751
|
accent: "text-accent-text",
|
|
7751
7752
|
danger: "text-danger-text"
|
|
7752
7753
|
};
|
|
7753
|
-
|
|
7754
|
-
var
|
|
7754
|
+
Ah.muted, Ah.subtle, Ah.accent, Ah.danger;
|
|
7755
|
+
var jh = [
|
|
7755
7756
|
"none",
|
|
7756
7757
|
"xs",
|
|
7757
7758
|
"sm",
|
|
7758
7759
|
"md",
|
|
7759
7760
|
"lg",
|
|
7760
7761
|
"full"
|
|
7761
|
-
],
|
|
7762
|
+
], Mh = ["solid", "alpha"], Nh = {
|
|
7762
7763
|
none: "bg-transparent text-inherit",
|
|
7763
7764
|
app: "bg-app text-foreground",
|
|
7764
7765
|
chrome: "bg-chrome text-foreground",
|
|
@@ -7768,10 +7769,10 @@ var Ah = [
|
|
|
7768
7769
|
overlay: "bg-surface-overlay text-foreground",
|
|
7769
7770
|
accent: "bg-surface-accent text-surface-accent-fg",
|
|
7770
7771
|
inverse: "bg-surface-inverse text-surface-inverse-fg"
|
|
7771
|
-
},
|
|
7772
|
+
}, Ph = {
|
|
7772
7773
|
solid: "",
|
|
7773
7774
|
alpha: ""
|
|
7774
|
-
},
|
|
7775
|
+
}, Fh = {
|
|
7775
7776
|
xs: {
|
|
7776
7777
|
none: "",
|
|
7777
7778
|
xs: "rounded-1",
|
|
@@ -7812,61 +7813,61 @@ var Ah = [
|
|
|
7812
7813
|
lg: "rounded-5",
|
|
7813
7814
|
full: "rounded-full"
|
|
7814
7815
|
}
|
|
7815
|
-
},
|
|
7816
|
+
}, Ih = ((e) => yh.flatMap((t) => jh.map((n) => ({
|
|
7816
7817
|
when: {
|
|
7817
7818
|
size: t,
|
|
7818
7819
|
radius: n
|
|
7819
7820
|
},
|
|
7820
7821
|
class: e[t][n]
|
|
7821
|
-
}))))(
|
|
7822
|
+
}))))(Fh), Lh = ["flex w-full min-w-0 items-center gap-control text-control-fg outline-none"], Rh = ["flex w-full min-w-0 gap-control text-control-fg outline-none"], zh = ["data-invalid:focus-within:shadow-danger-focus data-invalid:data-[state=open]:shadow-danger-focus"], Bh = {
|
|
7822
7823
|
xs: "min-h-control-xs px-1.5 text-xs",
|
|
7823
7824
|
sm: "min-h-control-sm px-2 text-xs",
|
|
7824
7825
|
md: "min-h-control-md px-3 text-sm",
|
|
7825
7826
|
lg: "min-h-control-lg px-3 text-sm",
|
|
7826
7827
|
xlg: "min-h-control-xlg px-4 text-sm"
|
|
7827
|
-
},
|
|
7828
|
+
}, Vh = {
|
|
7828
7829
|
xs: "min-h-control-lg px-1.5 py-1 text-xs",
|
|
7829
7830
|
sm: "min-h-control-xlg px-2 py-1.5 text-xs",
|
|
7830
7831
|
md: "min-h-12 px-3 py-2 text-sm",
|
|
7831
7832
|
lg: "min-h-20 px-3 py-2 text-sm",
|
|
7832
7833
|
xlg: "min-h-24 px-4 py-2 text-sm"
|
|
7833
|
-
},
|
|
7834
|
+
}, Hh = {
|
|
7834
7835
|
outline: "bg-control shadow-control",
|
|
7835
7836
|
filled: "bg-control-hover shadow-none hover:bg-control-active data-invalid:shadow-control data-disabled:bg-control-hover data-disabled:hover:bg-control-hover"
|
|
7836
|
-
},
|
|
7837
|
+
}, Uh = ["border-0 bg-transparent p-0 text-inherit text-control-fg outline-none", "placeholder:text-control-placeholder"], Wh = [
|
|
7837
7838
|
"inline-flex size-control-xs shrink-0 items-center justify-center rounded-2 border-0 bg-transparent",
|
|
7838
7839
|
"text-icon outline-none hover:bg-control-hover hover:text-control-fg",
|
|
7839
7840
|
"focus-visible:ring-2 focus-visible:ring-focus"
|
|
7840
|
-
],
|
|
7841
|
+
], Gh = ["w-full bg-control text-control-fg shadow-control outline-none"], Kh = ["absolute left-0 top-0 z-popover m-0 grid", "rounded-3 bg-popover text-popover-fg shadow-popover outline-none"], qh = [
|
|
7841
7842
|
"ui-interactive:hover:bg-interactive-hover",
|
|
7842
7843
|
"ui-interactive:ui-active:bg-interactive-active",
|
|
7843
7844
|
"ui-interactive:ui-selected:bg-interactive-selected",
|
|
7844
7845
|
"ui-interactive:ui-selected:hover:bg-interactive-selected-hover"
|
|
7845
7846
|
];
|
|
7846
|
-
[...
|
|
7847
|
-
var
|
|
7847
|
+
[...qh];
|
|
7848
|
+
var Jh = [
|
|
7848
7849
|
"flex h-menu-item w-full cursor-default select-none items-center gap-2 rounded-2 px-menu-item-x",
|
|
7849
7850
|
"text-left text-sm font-normal text-menu-item-fg outline-none",
|
|
7850
|
-
|
|
7851
|
+
qh,
|
|
7851
7852
|
"data-disabled:pointer-events-none data-disabled:opacity-50"
|
|
7852
|
-
],
|
|
7853
|
-
[...Qh];
|
|
7854
|
-
var $h = Oh;
|
|
7853
|
+
], Yh = "size-icon shrink-0 fill-current text-current opacity-70", Xh = "ml-auto size-icon shrink-0 fill-current text-current opacity-0 data-selected:opacity-100", Zh = ["single", "multiple"], Qh = Eh, $h = ["trailing", "leading"];
|
|
7855
7854
|
[...$h];
|
|
7856
|
-
var eg =
|
|
7857
|
-
|
|
7855
|
+
var eg = kh;
|
|
7856
|
+
[...eg];
|
|
7857
|
+
var tg = {
|
|
7858
|
+
mode: q(Zh, "single"),
|
|
7858
7859
|
collapsible: K,
|
|
7859
7860
|
disabled: K,
|
|
7860
|
-
orientation: q(
|
|
7861
|
+
orientation: q(Qh, "vertical"),
|
|
7861
7862
|
defaultValue: W,
|
|
7862
7863
|
defaultValues: W,
|
|
7863
7864
|
value: W,
|
|
7864
7865
|
values: W,
|
|
7865
7866
|
loop: K.default(!0),
|
|
7866
|
-
iconPosition: q(
|
|
7867
|
-
headingAs: q(
|
|
7867
|
+
iconPosition: q($h, "trailing"),
|
|
7868
|
+
headingAs: q(eg, "h3"),
|
|
7868
7869
|
class: W
|
|
7869
|
-
},
|
|
7870
|
+
}, ng = Y({ definition: {
|
|
7870
7871
|
component: "ui.accordion",
|
|
7871
7872
|
parts: {
|
|
7872
7873
|
root: {
|
|
@@ -7890,7 +7891,7 @@ var eg = {
|
|
|
7890
7891
|
content: { base: "overflow-hidden text-sm text-foreground-muted" },
|
|
7891
7892
|
contentInner: { base: "min-w-0 px-3 pb-3 pt-1" }
|
|
7892
7893
|
}
|
|
7893
|
-
} }),
|
|
7894
|
+
} }), rg = (e) => e.split(",").map((e) => e.trim()).filter(Boolean), ig = (e) => e ? "open" : "closed", ag = (e) => e instanceof HTMLButtonElement, og = () => ({
|
|
7894
7895
|
props: null,
|
|
7895
7896
|
openValues: /* @__PURE__ */ new Set(),
|
|
7896
7897
|
collection: null,
|
|
@@ -7898,7 +7899,7 @@ var eg = {
|
|
|
7898
7899
|
init() {
|
|
7899
7900
|
this.props = U({
|
|
7900
7901
|
el: this.$el,
|
|
7901
|
-
schema:
|
|
7902
|
+
schema: tg,
|
|
7902
7903
|
onChange: (e, t) => this.applyProps(t.map((e) => e.key))
|
|
7903
7904
|
}), this.openValues = new Set(this.initialValues()), this.setupTriggers(), this.syncAll();
|
|
7904
7905
|
},
|
|
@@ -7907,7 +7908,7 @@ var eg = {
|
|
|
7907
7908
|
},
|
|
7908
7909
|
get root() {
|
|
7909
7910
|
return Z.mergeBindings({ inputs: [Z.resolveStyle({
|
|
7910
|
-
part:
|
|
7911
|
+
part: ng.parts.root,
|
|
7911
7912
|
props: this.props,
|
|
7912
7913
|
className: this.props.class
|
|
7913
7914
|
}), {
|
|
@@ -7919,7 +7920,7 @@ var eg = {
|
|
|
7919
7920
|
items() {
|
|
7920
7921
|
return Array.from(this.$el.querySelectorAll("[data-ui-accordion-item]")).map((e, t) => {
|
|
7921
7922
|
let n = e.querySelector("[data-ui-accordion-trigger]"), r = e.querySelector("[data-ui-accordion-content]");
|
|
7922
|
-
return !
|
|
7923
|
+
return !ag(n) || !r ? null : (e.dataset.value || (e.dataset.value = `item-${t + 1}`), {
|
|
7923
7924
|
item: e,
|
|
7924
7925
|
heading: e.querySelector("[data-ui-accordion-heading]"),
|
|
7925
7926
|
trigger: n,
|
|
@@ -7934,10 +7935,10 @@ var eg = {
|
|
|
7934
7935
|
},
|
|
7935
7936
|
initialValues() {
|
|
7936
7937
|
let e = this.propValues();
|
|
7937
|
-
return e.length > 0 ? e : this.props.mode === "multiple" && this.props.defaultValues ? this.normalizeValues(
|
|
7938
|
+
return e.length > 0 ? e : this.props.mode === "multiple" && this.props.defaultValues ? this.normalizeValues(rg(this.props.defaultValues)) : this.props.mode === "single" && this.props.defaultValue ? this.normalizeValues([this.props.defaultValue]) : this.normalizeValues(this.items().filter((e) => Z.asBool({ value: e.item.dataset.open }) || e.item.dataset.state === "open").map((e) => e.value));
|
|
7938
7939
|
},
|
|
7939
7940
|
propValues() {
|
|
7940
|
-
return this.props.mode === "multiple" ? this.normalizeValues(
|
|
7941
|
+
return this.props.mode === "multiple" ? this.normalizeValues(rg(this.props.values || this.props.value)) : this.props.value ? this.normalizeValues([this.props.value]) : [];
|
|
7941
7942
|
},
|
|
7942
7943
|
normalizeValues(e) {
|
|
7943
7944
|
let t = Array.from(new Set(e.filter(Boolean)));
|
|
@@ -7978,13 +7979,13 @@ var eg = {
|
|
|
7978
7979
|
this.$el.dataset.orientation = this.props.orientation, this.$el.dataset.iconPosition = this.props.iconPosition, this.$el.dataset.mode = this.props.mode, this.props.disabled ? this.$el.setAttribute("data-disabled", "") : this.$el.removeAttribute("data-disabled");
|
|
7979
7980
|
},
|
|
7980
7981
|
syncItem(e) {
|
|
7981
|
-
let t = this.isItemOpen(e), n =
|
|
7982
|
+
let t = this.isItemOpen(e), n = ig(t), r = this.isItemDisabled(e), i = t && !this.canCollapseOpenItem(e);
|
|
7982
7983
|
if (e.item.dataset.state = n, e.item.dataset.orientation = this.props.orientation, e.item.className = Z.resolveStyle({
|
|
7983
|
-
part:
|
|
7984
|
+
part: ng.parts.item,
|
|
7984
7985
|
props: this.props,
|
|
7985
7986
|
className: e.item.dataset.class ?? ""
|
|
7986
7987
|
}), e.heading?.setAttribute("data-state", n), e.heading?.setAttribute("data-orientation", this.props.orientation), e.trigger.id ||= this.$id(`accordion-trigger-${e.value}`), e.content.id ||= this.$id(`accordion-content-${e.value}`), e.trigger.type = "button", e.trigger.dataset.state = n, e.trigger.dataset.orientation = this.props.orientation, e.trigger.className = Z.resolveStyle({
|
|
7987
|
-
part:
|
|
7988
|
+
part: ng.parts.trigger,
|
|
7988
7989
|
props: this.props,
|
|
7989
7990
|
className: e.trigger.dataset.class ?? ""
|
|
7990
7991
|
}), e.trigger.setAttribute("aria-expanded", t ? "true" : "false"), e.trigger.setAttribute("aria-controls", e.content.id), e.content.dataset.state = n, e.content.dataset.orientation = this.props.orientation, e.content.setAttribute("aria-labelledby", e.trigger.id), this.syncContent(e.content, t), r) {
|
|
@@ -8082,8 +8083,8 @@ var eg = {
|
|
|
8082
8083
|
detail: t
|
|
8083
8084
|
});
|
|
8084
8085
|
}
|
|
8085
|
-
}),
|
|
8086
|
-
e.data("UiAccordion", () =>
|
|
8086
|
+
}), sg = (e) => {
|
|
8087
|
+
e.data("UiAccordion", () => og());
|
|
8087
8088
|
};
|
|
8088
8089
|
Y({ definition: {
|
|
8089
8090
|
component: "ui.button",
|
|
@@ -8208,7 +8209,7 @@ Y({ definition: {
|
|
|
8208
8209
|
},
|
|
8209
8210
|
class: "w-control-xlg px-0"
|
|
8210
8211
|
},
|
|
8211
|
-
...
|
|
8212
|
+
...Ih,
|
|
8212
8213
|
{
|
|
8213
8214
|
when: {
|
|
8214
8215
|
insetLeft: !0,
|
|
@@ -8443,7 +8444,7 @@ Y({ definition: {
|
|
|
8443
8444
|
} });
|
|
8444
8445
|
//#endregion
|
|
8445
8446
|
//#region packages/client/src/components/button/index.ts
|
|
8446
|
-
var
|
|
8447
|
+
var cg = "[data-ui-button]:not([data-ui-loading-mode=\"false\"])", lg = [
|
|
8447
8448
|
"data-on",
|
|
8448
8449
|
"data-bind",
|
|
8449
8450
|
"data-ref",
|
|
@@ -8452,37 +8453,37 @@ var sg = "[data-ui-button]:not([data-ui-loading-mode=\"false\"])", cg = [
|
|
|
8452
8453
|
"data-request",
|
|
8453
8454
|
"data-ui-request",
|
|
8454
8455
|
"wire:"
|
|
8455
|
-
],
|
|
8456
|
+
], ug = "ui:request:finish", dg = null, fg = (e) => e instanceof HTMLButtonElement || e instanceof HTMLAnchorElement, pg = (e) => {
|
|
8456
8457
|
if (!(e instanceof Element)) return null;
|
|
8457
|
-
let t = e.closest(
|
|
8458
|
-
return
|
|
8459
|
-
},
|
|
8458
|
+
let t = e.closest(cg);
|
|
8459
|
+
return fg(t) ? t : null;
|
|
8460
|
+
}, mg = (e) => e.getAttributeNames().some((e) => lg.some((t) => e.startsWith(t))), hg = (e) => e instanceof HTMLButtonElement && e.type === "submit", gg = (e) => e instanceof HTMLButtonElement && (e.dataset.uiConfirm !== void 0 || e.form?.dataset.uiConfirm !== void 0), _g = (e, t) => t?.dataset.uiConfirm !== void 0 || e?.dataset.uiConfirm !== void 0, vg = (e) => e.dataset.uiLoadingMode === "true" || hg(e) || mg(e), yg = (e) => e.dataset.uiSubmitting === "true" || e.getAttribute("aria-disabled") === "true" || e.hasAttribute("disabled"), bg = (e) => e.dataset.uiSubmitting === "true" || e.hasAttribute("disabled"), xg = (e) => {
|
|
8460
8461
|
e.dataset.uiSubmitting = "true", e.setAttribute("data-ui-loading", ""), e.setAttribute("aria-disabled", "true"), e.setAttribute("aria-busy", "true"), e.dispatchEvent(new CustomEvent("ui:loading-start", { bubbles: !0 })), e instanceof HTMLButtonElement ? e.disabled = !0 : e.tabIndex = -1;
|
|
8461
|
-
},
|
|
8462
|
+
}, Sg = (e) => {
|
|
8462
8463
|
e.dataset.initialLoading !== "true" && (delete e.dataset.uiSubmitting, e.removeAttribute("data-ui-loading"), e.removeAttribute("aria-busy"), e.dataset.initialDisabled !== "true" && (e.removeAttribute("aria-disabled"), e instanceof HTMLButtonElement ? e.disabled = !1 : e.removeAttribute("tabindex"), e.dispatchEvent(new CustomEvent("ui:loading-end", { bubbles: !0 }))));
|
|
8463
|
-
},
|
|
8464
|
+
}, Cg = (e, t) => {
|
|
8464
8465
|
window.setTimeout(() => {
|
|
8465
|
-
!e.isConnected ||
|
|
8466
|
+
!e.isConnected || bg(e) || xg(e);
|
|
8466
8467
|
}, 0);
|
|
8467
|
-
},
|
|
8468
|
-
let t =
|
|
8469
|
-
if (!(!t || !
|
|
8470
|
-
if (
|
|
8468
|
+
}, wg = (e) => {
|
|
8469
|
+
let t = pg(e.target);
|
|
8470
|
+
if (!(!t || !vg(t))) {
|
|
8471
|
+
if (yg(t)) {
|
|
8471
8472
|
e.preventDefault(), e.stopImmediatePropagation();
|
|
8472
8473
|
return;
|
|
8473
8474
|
}
|
|
8474
|
-
t instanceof HTMLButtonElement && t.form && !t.form.checkValidity() ||
|
|
8475
|
+
t instanceof HTMLButtonElement && t.form && !t.form.checkValidity() || gg(t) || Cg(t, e);
|
|
8475
8476
|
}
|
|
8476
|
-
},
|
|
8477
|
-
let t = e, n = t.submitter instanceof HTMLElement ? t.submitter : null, r =
|
|
8478
|
-
e.defaultPrevented &&
|
|
8479
|
-
}, Tg = () => {
|
|
8480
|
-
document.querySelectorAll("[data-ui-button][data-ui-submitting=\"true\"]").forEach((e) => xg(e));
|
|
8477
|
+
}, Tg = (e) => {
|
|
8478
|
+
let t = e, n = t.submitter instanceof HTMLElement ? t.submitter : null, r = fg(n) ? n : null, i = e.target instanceof HTMLFormElement ? e.target : null, a = r ? r.matches(cg) ? r : null : i?.querySelector(cg) ?? null;
|
|
8479
|
+
e.defaultPrevented && _g(i, n) || !a || !hg(a) || Cg(a, e);
|
|
8481
8480
|
}, Eg = () => {
|
|
8482
|
-
|
|
8483
|
-
|
|
8481
|
+
document.querySelectorAll("[data-ui-button][data-ui-submitting=\"true\"]").forEach((e) => Sg(e));
|
|
8482
|
+
}, Dg = () => {
|
|
8483
|
+
dg ||= (document.addEventListener("click", wg, !0), document.addEventListener("submit", Tg, !0), document.addEventListener(ug, Eg), () => {
|
|
8484
|
+
document.removeEventListener("click", wg, !0), document.removeEventListener("submit", Tg, !0), document.removeEventListener(ug, Eg), dg = null;
|
|
8484
8485
|
});
|
|
8485
|
-
},
|
|
8486
|
+
}, Og = Eh, kg = Oh, Ag = Dh, jg = yh, Mg = Oh, Ng = {
|
|
8486
8487
|
value: W.default("on"),
|
|
8487
8488
|
name: W,
|
|
8488
8489
|
label: W,
|
|
@@ -8493,10 +8494,10 @@ var sg = "[data-ui-button]:not([data-ui-loading-mode=\"false\"])", cg = [
|
|
|
8493
8494
|
required: K,
|
|
8494
8495
|
invalid: K,
|
|
8495
8496
|
indicator: K.default(!0),
|
|
8496
|
-
placement: q(
|
|
8497
|
+
placement: q(Ag, "leading"),
|
|
8497
8498
|
icon: W,
|
|
8498
|
-
variant: q(
|
|
8499
|
-
size: q(
|
|
8499
|
+
variant: q(Mg, "default"),
|
|
8500
|
+
size: q(jg, "md"),
|
|
8500
8501
|
inputClass: W,
|
|
8501
8502
|
indicatorClass: W,
|
|
8502
8503
|
indicatorIconClass: W,
|
|
@@ -8506,22 +8507,22 @@ var sg = "[data-ui-button]:not([data-ui-loading-mode=\"false\"])", cg = [
|
|
|
8506
8507
|
descriptionClass: W,
|
|
8507
8508
|
class: W
|
|
8508
8509
|
};
|
|
8509
|
-
({ ...
|
|
8510
|
-
var
|
|
8510
|
+
({ ...Ng });
|
|
8511
|
+
var Pg = {
|
|
8511
8512
|
name: W,
|
|
8512
|
-
orientation: q(
|
|
8513
|
-
variant: q(
|
|
8513
|
+
orientation: q(Og, "vertical"),
|
|
8514
|
+
variant: q(kg, "default"),
|
|
8514
8515
|
indicator: K.default(!0),
|
|
8515
|
-
placement: q(
|
|
8516
|
+
placement: q(Ag, "leading"),
|
|
8516
8517
|
disabled: K,
|
|
8517
8518
|
required: K,
|
|
8518
8519
|
invalid: K,
|
|
8519
8520
|
class: W
|
|
8520
8521
|
};
|
|
8521
|
-
q(
|
|
8522
|
+
q(jg, "md");
|
|
8522
8523
|
//#endregion
|
|
8523
8524
|
//#region packages/client/src/components/checkbox/index.ts
|
|
8524
|
-
var
|
|
8525
|
+
var Fg = (e) => {
|
|
8525
8526
|
let t = e.querySelector("[data-ui-checkbox-input]");
|
|
8526
8527
|
return t ? {
|
|
8527
8528
|
root: e,
|
|
@@ -8534,7 +8535,7 @@ var Pg = (e) => {
|
|
|
8534
8535
|
required: e.hasAttribute("data-required") || t.required,
|
|
8535
8536
|
invalid: e.hasAttribute("data-invalid") || t.getAttribute("aria-invalid") === "true"
|
|
8536
8537
|
} : null;
|
|
8537
|
-
},
|
|
8538
|
+
}, Ig = (e, t = {}) => {
|
|
8538
8539
|
let n = t.disabled ?? e.disabled, r = t.required ?? e.required, i = t.invalid ?? e.invalid, a = e.input.indeterminate || e.root.hasAttribute("data-indeterminate"), o = e.input.checked && !a, s = a ? "indeterminate" : o ? "checked" : "unchecked";
|
|
8539
8540
|
e.input.indeterminate = a, Z.syncNativeControl({
|
|
8540
8541
|
input: e.input,
|
|
@@ -8605,13 +8606,13 @@ var Pg = (e) => {
|
|
|
8605
8606
|
el: e.indeterminateIcon,
|
|
8606
8607
|
attr: "data-checked"
|
|
8607
8608
|
}));
|
|
8608
|
-
},
|
|
8609
|
+
}, Lg = () => ({
|
|
8609
8610
|
props: null,
|
|
8610
8611
|
listeners: [],
|
|
8611
8612
|
init() {
|
|
8612
8613
|
this.props = U({
|
|
8613
8614
|
el: this.$el,
|
|
8614
|
-
schema:
|
|
8615
|
+
schema: Ng,
|
|
8615
8616
|
onChange: () => this.sync()
|
|
8616
8617
|
});
|
|
8617
8618
|
let e = this.input();
|
|
@@ -8633,26 +8634,26 @@ var Pg = (e) => {
|
|
|
8633
8634
|
return e;
|
|
8634
8635
|
},
|
|
8635
8636
|
item() {
|
|
8636
|
-
let e =
|
|
8637
|
+
let e = Fg(this.$el);
|
|
8637
8638
|
if (!e) throw Error("Checkbox requires a native checkbox input.");
|
|
8638
8639
|
return e;
|
|
8639
8640
|
},
|
|
8640
8641
|
sync() {
|
|
8641
8642
|
let e = this.item();
|
|
8642
|
-
this.props.name && (e.input.name = this.props.name), this.props.value && (e.input.value = this.props.value),
|
|
8643
|
+
this.props.name && (e.input.name = this.props.name), this.props.value && (e.input.value = this.props.value), Ig(e, {
|
|
8643
8644
|
disabled: this.props.disabled || e.disabled,
|
|
8644
8645
|
required: this.props.required || e.required,
|
|
8645
8646
|
invalid: this.props.invalid || e.invalid
|
|
8646
8647
|
});
|
|
8647
8648
|
}
|
|
8648
|
-
}),
|
|
8649
|
+
}), Rg = () => ({
|
|
8649
8650
|
props: null,
|
|
8650
8651
|
listeners: [],
|
|
8651
8652
|
observer: null,
|
|
8652
8653
|
init() {
|
|
8653
8654
|
this.props = U({
|
|
8654
8655
|
el: this.$el,
|
|
8655
|
-
schema:
|
|
8656
|
+
schema: Pg,
|
|
8656
8657
|
onChange: () => this.sync()
|
|
8657
8658
|
}), Z.addListener({
|
|
8658
8659
|
target: this.$el,
|
|
@@ -8671,7 +8672,7 @@ var Pg = (e) => {
|
|
|
8671
8672
|
this.props.disconnect(), this.listeners.forEach((e) => e()), this.listeners = [], this.observer?.disconnect();
|
|
8672
8673
|
},
|
|
8673
8674
|
items() {
|
|
8674
|
-
return Array.from(this.$el.querySelectorAll("[data-ui-checkbox]")).map(
|
|
8675
|
+
return Array.from(this.$el.querySelectorAll("[data-ui-checkbox]")).map(Fg).filter((e) => e !== null);
|
|
8675
8676
|
},
|
|
8676
8677
|
sync() {
|
|
8677
8678
|
let e = this.$el;
|
|
@@ -8689,15 +8690,15 @@ var Pg = (e) => {
|
|
|
8689
8690
|
}), this.items().forEach((e) => this.syncItem(e));
|
|
8690
8691
|
},
|
|
8691
8692
|
syncItem(e) {
|
|
8692
|
-
this.props.name && !e.name && (e.input.name = this.props.name),
|
|
8693
|
+
this.props.name && !e.name && (e.input.name = this.props.name), Ig(e, {
|
|
8693
8694
|
disabled: this.props.disabled || e.disabled,
|
|
8694
8695
|
required: this.props.required || e.required,
|
|
8695
8696
|
invalid: this.props.invalid || e.invalid
|
|
8696
8697
|
});
|
|
8697
8698
|
}
|
|
8698
|
-
}),
|
|
8699
|
-
e.data("UiCheckbox", () =>
|
|
8700
|
-
},
|
|
8699
|
+
}), zg = (e) => {
|
|
8700
|
+
e.data("UiCheckbox", () => Lg()), e.data("UiCheckboxGroup", () => Rg());
|
|
8701
|
+
}, Bg = yh, Vg = bh, Hg = jh, Ug = wh, Wg = Ch, Gg = xh, Kg = {
|
|
8701
8702
|
name: W,
|
|
8702
8703
|
value: W,
|
|
8703
8704
|
values: W,
|
|
@@ -8713,40 +8714,40 @@ var Pg = (e) => {
|
|
|
8713
8714
|
filter: K.default(!0),
|
|
8714
8715
|
path: W,
|
|
8715
8716
|
loop: K.default(!0),
|
|
8716
|
-
size: q(
|
|
8717
|
-
variant: q(
|
|
8718
|
-
radius: q(
|
|
8719
|
-
side: q(
|
|
8720
|
-
align: q(
|
|
8717
|
+
size: q(Bg, "lg"),
|
|
8718
|
+
variant: q(Vg, "outline"),
|
|
8719
|
+
radius: q(Hg, "md"),
|
|
8720
|
+
side: q(Ug, "bottom"),
|
|
8721
|
+
align: q(Wg, "start"),
|
|
8721
8722
|
offset: G.clamp(-100, 100).default(0),
|
|
8722
8723
|
gap: G.clamp(0, 50).default(4),
|
|
8723
8724
|
icon: W,
|
|
8724
8725
|
iconTrailing: W.default("chevron__down"),
|
|
8725
|
-
iconVariant: q(
|
|
8726
|
+
iconVariant: q(Gg, "outline"),
|
|
8726
8727
|
inputClass: W,
|
|
8727
8728
|
listboxClass: W,
|
|
8728
8729
|
chipClass: W,
|
|
8729
8730
|
class: W
|
|
8730
8731
|
};
|
|
8731
|
-
q(
|
|
8732
|
+
q(Gg, "outline");
|
|
8732
8733
|
//#endregion
|
|
8733
8734
|
//#region packages/client/src/components/combobox/styles.ts
|
|
8734
|
-
var
|
|
8735
|
+
var qg = Y({ definition: {
|
|
8735
8736
|
component: "ui.combobox",
|
|
8736
8737
|
parts: {
|
|
8737
8738
|
root: { base: "relative inline-grid w-full min-w-0" },
|
|
8738
8739
|
control: {
|
|
8739
|
-
base:
|
|
8740
|
+
base: Lh,
|
|
8740
8741
|
variants: {
|
|
8741
|
-
size:
|
|
8742
|
-
variant:
|
|
8742
|
+
size: Bh,
|
|
8743
|
+
variant: Hh
|
|
8743
8744
|
},
|
|
8744
8745
|
defaults: {
|
|
8745
8746
|
size: "lg",
|
|
8746
8747
|
variant: "outline",
|
|
8747
8748
|
radius: "md"
|
|
8748
8749
|
},
|
|
8749
|
-
compounds:
|
|
8750
|
+
compounds: Ih
|
|
8750
8751
|
},
|
|
8751
8752
|
chips: { base: "-ml-1.5 flex min-w-0 flex-wrap items-center gap-1" },
|
|
8752
8753
|
chip: { base: ["inline-flex h-control-sm max-w-48 min-w-0 items-center gap-1 rounded-2 border border-border bg-current/10 px-2", "text-sm font-normal text-foreground"] },
|
|
@@ -8756,7 +8757,7 @@ var Kg = Y({ definition: {
|
|
|
8756
8757
|
"text-icon outline-none hover:bg-base-a3 hover:text-foreground",
|
|
8757
8758
|
"focus-visible:ring-2 focus-visible:ring-focus"
|
|
8758
8759
|
] },
|
|
8759
|
-
input: { base: ["w-full min-w-16 flex-1",
|
|
8760
|
+
input: { base: ["w-full min-w-16 flex-1", Uh] },
|
|
8760
8761
|
icon: {
|
|
8761
8762
|
base: "size-icon shrink-0 fill-current text-icon",
|
|
8762
8763
|
variants: { position: {
|
|
@@ -8765,27 +8766,27 @@ var Kg = Y({ definition: {
|
|
|
8765
8766
|
} },
|
|
8766
8767
|
defaults: { position: "leading" }
|
|
8767
8768
|
},
|
|
8768
|
-
clear: { base:
|
|
8769
|
-
listbox: { base: [
|
|
8770
|
-
option: { base:
|
|
8769
|
+
clear: { base: Wh },
|
|
8770
|
+
listbox: { base: [Kh, "auto-rows-min content-start max-h-combobox-listbox min-w-48 gap-1 overflow-auto p-popover"] },
|
|
8771
|
+
option: { base: Jh },
|
|
8771
8772
|
optionLabel: { base: "min-w-0 flex-1" },
|
|
8772
8773
|
optionMeta: { base: "ml-auto text-menu-item-muted" },
|
|
8773
8774
|
optionIcon: {
|
|
8774
|
-
base:
|
|
8775
|
+
base: Yh,
|
|
8775
8776
|
variants: { position: {
|
|
8776
8777
|
leading: "",
|
|
8777
8778
|
trailing: "ml-auto"
|
|
8778
8779
|
} },
|
|
8779
8780
|
defaults: { position: "leading" }
|
|
8780
8781
|
},
|
|
8781
|
-
optionIndicator: { base:
|
|
8782
|
+
optionIndicator: { base: Xh },
|
|
8782
8783
|
group: { base: "grid auto-rows-min content-start gap-1" },
|
|
8783
8784
|
label: { base: "px-menu-item-x py-1 text-menu-heading-fg" },
|
|
8784
8785
|
empty: { base: "px-menu-item-x py-2 text-sm text-foreground-muted" },
|
|
8785
8786
|
separatorRoot: { base: "-mx-popover my-popover h-px" },
|
|
8786
8787
|
separatorRule: { base: "h-px w-full border-0 bg-menu-separator" }
|
|
8787
8788
|
}
|
|
8788
|
-
} }),
|
|
8789
|
+
} }), Jg = () => ({
|
|
8789
8790
|
query: "",
|
|
8790
8791
|
selectedValues: [],
|
|
8791
8792
|
selectedLabels: [],
|
|
@@ -8803,7 +8804,7 @@ var Kg = Y({ definition: {
|
|
|
8803
8804
|
init() {
|
|
8804
8805
|
this.props = U({
|
|
8805
8806
|
el: this.$el,
|
|
8806
|
-
schema:
|
|
8807
|
+
schema: Kg,
|
|
8807
8808
|
onChange: (e, t) => this.applyProps(t.map((e) => e.key))
|
|
8808
8809
|
}), this.inputId = this.$id("combobox-input"), this.listboxId = this.$id("combobox-listbox"), this.machine = Z.createMachine(Z.createVisibilityMachine({
|
|
8809
8810
|
enter: "enterListbox",
|
|
@@ -8852,7 +8853,7 @@ var Kg = Y({ definition: {
|
|
|
8852
8853
|
},
|
|
8853
8854
|
get root() {
|
|
8854
8855
|
return Z.mergeBindings({ inputs: [X({
|
|
8855
|
-
part:
|
|
8856
|
+
part: qg.parts.root,
|
|
8856
8857
|
props: this.props,
|
|
8857
8858
|
className: this.props.class
|
|
8858
8859
|
}), {
|
|
@@ -9099,7 +9100,7 @@ var Kg = Y({ definition: {
|
|
|
9099
9100
|
},
|
|
9100
9101
|
syncControl() {
|
|
9101
9102
|
let e = this.control(), t = X({
|
|
9102
|
-
part:
|
|
9103
|
+
part: qg.parts.control,
|
|
9103
9104
|
props: this.props
|
|
9104
9105
|
});
|
|
9105
9106
|
e.setAttribute("class", t), e.setAttribute("data-ui-control", ""), e.setAttribute("data-ui-combobox-control", ""), e.dataset.state = this.isOpen ? "open" : "closed", e.dataset.variant = this.props.variant, Z.syncControlPresence({
|
|
@@ -9113,7 +9114,7 @@ var Kg = Y({ definition: {
|
|
|
9113
9114
|
},
|
|
9114
9115
|
syncListbox() {
|
|
9115
9116
|
let e = this.listbox(), t = X({
|
|
9116
|
-
part:
|
|
9117
|
+
part: qg.parts.listbox,
|
|
9117
9118
|
props: this.props,
|
|
9118
9119
|
className: this.props.listboxClass
|
|
9119
9120
|
});
|
|
@@ -9149,10 +9150,10 @@ var Kg = Y({ definition: {
|
|
|
9149
9150
|
});
|
|
9150
9151
|
if (n === this.renderedChipsKey || (this.renderedChipsKey = n, e.replaceChildren(), e.hidden)) return;
|
|
9151
9152
|
let r = X({
|
|
9152
|
-
part:
|
|
9153
|
+
part: qg.parts.chip,
|
|
9153
9154
|
props: {},
|
|
9154
9155
|
className: this.props.chipClass
|
|
9155
|
-
}), i = X({ part:
|
|
9156
|
+
}), i = X({ part: qg.parts.chipLabel }), a = X({ part: qg.parts.chipRemove });
|
|
9156
9157
|
this.selectedValues.forEach((t, n) => {
|
|
9157
9158
|
let o = this.selectedLabels[n] ?? t, s = document.createElement("span");
|
|
9158
9159
|
s.className = r, s.setAttribute("data-ui-combobox-chip", "");
|
|
@@ -9290,23 +9291,23 @@ var Kg = Y({ definition: {
|
|
|
9290
9291
|
optionValue(e, t) {
|
|
9291
9292
|
return e.dataset.value || t;
|
|
9292
9293
|
}
|
|
9293
|
-
}),
|
|
9294
|
-
e.data("UiCombobox", () =>
|
|
9295
|
-
},
|
|
9294
|
+
}), Yg = (e) => {
|
|
9295
|
+
e.data("UiCombobox", () => Jg());
|
|
9296
|
+
}, Xg = ["single", "range"], Zg = ["enhanced", "native"], Qg = [
|
|
9296
9297
|
"popover",
|
|
9297
9298
|
"modal",
|
|
9298
9299
|
"native"
|
|
9299
|
-
],
|
|
9300
|
+
], $g = ["select", "confirm"], e_ = ["neutral", "accent"], t_ = jh, n_ = [
|
|
9300
9301
|
"left",
|
|
9301
9302
|
"right",
|
|
9302
9303
|
"top",
|
|
9303
9304
|
"bottom"
|
|
9304
|
-
],
|
|
9305
|
+
], r_ = {
|
|
9305
9306
|
name: W,
|
|
9306
9307
|
value: W,
|
|
9307
9308
|
startName: W,
|
|
9308
9309
|
endName: W,
|
|
9309
|
-
mode: q(
|
|
9310
|
+
mode: q(Xg, "single"),
|
|
9310
9311
|
placeholder: W,
|
|
9311
9312
|
min: W,
|
|
9312
9313
|
max: W,
|
|
@@ -9326,17 +9327,17 @@ var Kg = Y({ definition: {
|
|
|
9326
9327
|
readonly: K,
|
|
9327
9328
|
required: K,
|
|
9328
9329
|
invalid: K,
|
|
9329
|
-
side: q(
|
|
9330
|
-
align: q(
|
|
9330
|
+
side: q(wh, "bottom"),
|
|
9331
|
+
align: q(Ch, "start"),
|
|
9331
9332
|
offset: G.clamp(-100, 100).default(0),
|
|
9332
9333
|
gap: G.clamp(0, 50).default(4),
|
|
9333
|
-
mobile: q(
|
|
9334
|
-
variant: q(
|
|
9335
|
-
color: q(
|
|
9336
|
-
radius: q(
|
|
9337
|
-
close: q(
|
|
9334
|
+
mobile: q(Qg, "modal"),
|
|
9335
|
+
variant: q(Zg, "enhanced"),
|
|
9336
|
+
color: q(e_, "neutral"),
|
|
9337
|
+
radius: q(t_, "md"),
|
|
9338
|
+
close: q($g, "select"),
|
|
9338
9339
|
presets: Xl.array([]),
|
|
9339
|
-
presetsPosition: q(
|
|
9340
|
+
presetsPosition: q(n_, "left"),
|
|
9340
9341
|
preset: W,
|
|
9341
9342
|
presetName: W,
|
|
9342
9343
|
triggerClass: W,
|
|
@@ -9348,22 +9349,22 @@ var Kg = Y({ definition: {
|
|
|
9348
9349
|
class: W,
|
|
9349
9350
|
form: W
|
|
9350
9351
|
};
|
|
9351
|
-
q(
|
|
9352
|
+
q(n_, "left");
|
|
9352
9353
|
//#endregion
|
|
9353
9354
|
//#region packages/client/src/components/date-picker/styles.ts
|
|
9354
|
-
var
|
|
9355
|
+
var i_ = Y({ definition: {
|
|
9355
9356
|
component: "ui.date-picker",
|
|
9356
9357
|
parts: {
|
|
9357
9358
|
root: { base: "relative inline-grid w-full min-w-0" },
|
|
9358
9359
|
trigger: {
|
|
9359
9360
|
base: [
|
|
9360
|
-
|
|
9361
|
-
|
|
9362
|
-
|
|
9363
|
-
|
|
9361
|
+
Lh,
|
|
9362
|
+
zh,
|
|
9363
|
+
Bh.lg,
|
|
9364
|
+
Hh.outline,
|
|
9364
9365
|
"text-left"
|
|
9365
9366
|
],
|
|
9366
|
-
variants: { radius:
|
|
9367
|
+
variants: { radius: Fh.lg },
|
|
9367
9368
|
defaults: { radius: "md" }
|
|
9368
9369
|
},
|
|
9369
9370
|
customTrigger: {
|
|
@@ -9374,13 +9375,13 @@ var r_ = Y({ definition: {
|
|
|
9374
9375
|
"data-disabled:bg-control-disabled data-disabled:text-control-disabled-fg data-disabled:shadow-control-disabled",
|
|
9375
9376
|
"data-disabled:hover:bg-control-disabled data-disabled:hover:text-control-disabled-fg"
|
|
9376
9377
|
],
|
|
9377
|
-
variants: { radius:
|
|
9378
|
+
variants: { radius: Fh.lg },
|
|
9378
9379
|
defaults: { radius: "md" }
|
|
9379
9380
|
},
|
|
9380
|
-
input: { base: ["min-w-0 flex-1 text-sm",
|
|
9381
|
+
input: { base: ["min-w-0 flex-1 text-sm", Uh] },
|
|
9381
9382
|
icon: { base: "size-icon shrink-0 fill-current text-icon" },
|
|
9382
|
-
action: { base:
|
|
9383
|
-
popover: { base: [
|
|
9383
|
+
action: { base: Wh },
|
|
9384
|
+
popover: { base: [Kh, "max-h-lg overflow-hidden"] },
|
|
9384
9385
|
panel: {
|
|
9385
9386
|
base: "grid min-w-72 max-w-[calc(100vw-2rem)] gap-0 overflow-hidden",
|
|
9386
9387
|
variants: {
|
|
@@ -9416,35 +9417,35 @@ var r_ = Y({ definition: {
|
|
|
9416
9417
|
calendarWrap: { base: "relative grid size-full place-items-center overflow-x-auto overflow-y-auto p-popover" },
|
|
9417
9418
|
calendar: { base: "grid max-w-full gap-2 text-sm text-foreground" },
|
|
9418
9419
|
presets: { base: ["grid content-start gap-1 border-popover-border p-popover", "sm:data-[position=left]:border-r sm:data-[position=right]:border-l data-[position=top]:border-b data-[position=bottom]:border-t"] },
|
|
9419
|
-
preset: { base:
|
|
9420
|
+
preset: { base: Jh },
|
|
9420
9421
|
footer: { base: "flex items-center justify-end gap-2 border-t border-popover-border p-popover" },
|
|
9421
9422
|
nativeWrapper: { base: "relative w-full min-w-0" },
|
|
9422
9423
|
native: {
|
|
9423
|
-
base: [
|
|
9424
|
-
variants: { radius:
|
|
9424
|
+
base: [Gh, Bh.lg],
|
|
9425
|
+
variants: { radius: Fh.lg },
|
|
9425
9426
|
defaults: { radius: "md" }
|
|
9426
9427
|
}
|
|
9427
9428
|
}
|
|
9428
|
-
} }),
|
|
9429
|
+
} }), a_ = /^\d{4}-\d{2}-\d{2}$/, o_ = /^\d{4}-\d{2}-\d{2}\/\d{4}-\d{2}-\d{2}$/, s_ = 100, c_ = 10, l_ = null, u_ = () => typeof customElements > "u" || customElements.get("calendar-ctx") ? Promise.resolve() : (l_ ??= import("./chunks/cally-TZl4LpyH.js").then(() => void 0).catch((e) => {
|
|
9429
9430
|
if (!customElements.get("calendar-ctx")) throw e;
|
|
9430
|
-
}),
|
|
9431
|
+
}), l_), d_ = (e) => {
|
|
9431
9432
|
let [t = "", n = ""] = e.split("/");
|
|
9432
9433
|
return [t, n];
|
|
9433
|
-
},
|
|
9434
|
-
if (!e.match(
|
|
9434
|
+
}, f_ = (e, t) => e === "" || (t ? o_.test(e) : a_.test(e)), p_ = () => (/* @__PURE__ */ new Date()).getFullYear(), m_ = () => `${p_() - s_}-01-01`, h_ = () => `${p_() + c_}-12-31`, g_ = () => (/* @__PURE__ */ new Date()).toISOString().slice(0, 10), __ = (e, t) => {
|
|
9435
|
+
if (!e.match(a_)) return "";
|
|
9435
9436
|
let n = /* @__PURE__ */ new Date(`${e}T00:00:00.000Z`);
|
|
9436
9437
|
return new Intl.DateTimeFormat(t || void 0, {
|
|
9437
9438
|
month: "long",
|
|
9438
9439
|
timeZone: "UTC",
|
|
9439
9440
|
year: "numeric"
|
|
9440
9441
|
}).format(n);
|
|
9441
|
-
},
|
|
9442
|
+
}, v_ = (e) => ({
|
|
9442
9443
|
value: e.dataset.value ?? "",
|
|
9443
9444
|
label: e.dataset.label ?? e.textContent?.trim() ?? "",
|
|
9444
9445
|
start: e.dataset.start ?? "",
|
|
9445
9446
|
end: e.dataset.end ?? "",
|
|
9446
9447
|
disabled: Z.asBool({ value: e.dataset.disabled })
|
|
9447
|
-
}),
|
|
9448
|
+
}), y_ = () => ({
|
|
9448
9449
|
value: "",
|
|
9449
9450
|
pendingValue: "",
|
|
9450
9451
|
presetValue: "",
|
|
@@ -9461,7 +9462,7 @@ var r_ = Y({ definition: {
|
|
|
9461
9462
|
init() {
|
|
9462
9463
|
this.props = U({
|
|
9463
9464
|
el: this.$el,
|
|
9464
|
-
schema:
|
|
9465
|
+
schema: r_,
|
|
9465
9466
|
onChange: () => this.sync()
|
|
9466
9467
|
}), this.value = this.props.value, this.pendingValue = this.value, this.presetValue = this.props.preset, this.triggerId = this.$id("date-picker-trigger"), this.popoverId = this.$id("date-picker-popover"), this.machine = Z.createMachine(Z.createVisibilityMachine({
|
|
9467
9468
|
enter: "enterPopover",
|
|
@@ -9517,7 +9518,7 @@ var r_ = Y({ definition: {
|
|
|
9517
9518
|
}), this.popoverMotion = Z.motion.createPresenceLifecycle({
|
|
9518
9519
|
element: () => this.popoverEl(),
|
|
9519
9520
|
preset: "popover"
|
|
9520
|
-
}), this.setup(), this.sync(),
|
|
9521
|
+
}), this.setup(), this.sync(), u_().then(() => this.sync());
|
|
9521
9522
|
},
|
|
9522
9523
|
destroy() {
|
|
9523
9524
|
this.props.disconnect(), this.machine.stop(), this.popoverMotion?.destroy(), this.listeners.forEach((e) => e()), this.listeners = [], this.popover?.unmount();
|
|
@@ -9527,7 +9528,7 @@ var r_ = Y({ definition: {
|
|
|
9527
9528
|
},
|
|
9528
9529
|
get root() {
|
|
9529
9530
|
return Z.mergeBindings({ inputs: [X({
|
|
9530
|
-
part:
|
|
9531
|
+
part: i_.parts.root,
|
|
9531
9532
|
props: this.props,
|
|
9532
9533
|
className: this.props.class
|
|
9533
9534
|
}), {
|
|
@@ -9563,7 +9564,7 @@ var r_ = Y({ definition: {
|
|
|
9563
9564
|
return this.$el.querySelector("[data-ui-date-picker-preset-inputs]");
|
|
9564
9565
|
},
|
|
9565
9566
|
presetItems() {
|
|
9566
|
-
let e = Array.from(this.$el.querySelectorAll("[data-ui-date-picker-preset]")).map(
|
|
9567
|
+
let e = Array.from(this.$el.querySelectorAll("[data-ui-date-picker-preset]")).map(v_).filter((e) => e.value && e.start && e.end);
|
|
9567
9568
|
return e.length ? e : this.props.presets;
|
|
9568
9569
|
},
|
|
9569
9570
|
isRange() {
|
|
@@ -9575,7 +9576,7 @@ var r_ = Y({ definition: {
|
|
|
9575
9576
|
displayValue() {
|
|
9576
9577
|
if (!this.value) return "";
|
|
9577
9578
|
if (!this.isRange()) return this.value;
|
|
9578
|
-
let [e, t] =
|
|
9579
|
+
let [e, t] = d_(this.value);
|
|
9579
9580
|
return e && t ? `${e} to ${t}` : this.value;
|
|
9580
9581
|
},
|
|
9581
9582
|
effectivePlaceholder() {
|
|
@@ -9585,7 +9586,7 @@ var r_ = Y({ definition: {
|
|
|
9585
9586
|
return this.props.months > 0 ? this.props.months : this.isRange() ? 2 : 1;
|
|
9586
9587
|
},
|
|
9587
9588
|
open(e) {
|
|
9588
|
-
e?.preventDefault(), !(this.props.disabled || this.props.readonly) && (this.machine.send("OPEN"), e instanceof KeyboardEvent &&
|
|
9589
|
+
e?.preventDefault(), !(this.props.disabled || this.props.readonly) && (this.machine.send("OPEN"), e instanceof KeyboardEvent && u_().then(() => {
|
|
9589
9590
|
queueMicrotask(() => this.calendar()?.focus({ preventScroll: !0 }));
|
|
9590
9591
|
}));
|
|
9591
9592
|
},
|
|
@@ -9628,7 +9629,7 @@ var r_ = Y({ definition: {
|
|
|
9628
9629
|
},
|
|
9629
9630
|
selectPreset(e, t) {
|
|
9630
9631
|
t?.preventDefault();
|
|
9631
|
-
let n =
|
|
9632
|
+
let n = v_(e);
|
|
9632
9633
|
if (n.disabled) return;
|
|
9633
9634
|
let r = this.isRange() ? `${n.start}/${n.end}` : n.start;
|
|
9634
9635
|
this.presetValue = n.value, this.commitValue(r), this.close();
|
|
@@ -9637,7 +9638,7 @@ var r_ = Y({ definition: {
|
|
|
9637
9638
|
let t = e.target;
|
|
9638
9639
|
if (!(t instanceof HTMLInputElement)) return;
|
|
9639
9640
|
let n = t.value.trim(), r = this.isRange() ? n.replace(/\s+to\s+/i, "/") : n;
|
|
9640
|
-
|
|
9641
|
+
f_(r, this.isRange()) && r !== this.value && this.commitValue(r);
|
|
9641
9642
|
},
|
|
9642
9643
|
handleKeydown(e) {
|
|
9643
9644
|
if ((e.key === "ArrowDown" || e.key === "Enter" || e.key === " ") && !this.isOpen) {
|
|
@@ -9648,7 +9649,7 @@ var r_ = Y({ definition: {
|
|
|
9648
9649
|
},
|
|
9649
9650
|
handleCalendarChange(e) {
|
|
9650
9651
|
let t = e.currentTarget;
|
|
9651
|
-
this.pendingValue = t.value, this.isRange() && (this.liveMessage = this.pendingValue.includes("/") ? "Range selected" : "Start date selected"), this.closeMode() === "select" && (!this.isRange() ||
|
|
9652
|
+
this.pendingValue = t.value, this.isRange() && (this.liveMessage = this.pendingValue.includes("/") ? "Range selected" : "Start date selected"), this.closeMode() === "select" && (!this.isRange() || o_.test(this.pendingValue)) ? (this.commitValue(this.pendingValue), this.close()) : this.sync();
|
|
9652
9653
|
},
|
|
9653
9654
|
handleCalendarFocus(e) {
|
|
9654
9655
|
let t = e.detail;
|
|
@@ -9680,9 +9681,9 @@ var r_ = Y({ definition: {
|
|
|
9680
9681
|
syncCalendar() {
|
|
9681
9682
|
let e = this.calendar();
|
|
9682
9683
|
if (!e) return;
|
|
9683
|
-
e.setAttribute("value", this.pendingValue), this.isRange() && !this.pendingValue && e.setAttribute("tentative", ""), e.setAttribute("months", String(this.effectiveMonths())), e.style.setProperty("--ui-date-picker-month-columns", String(this.effectiveMonths())), e.setAttribute("format-weekday", "short"), e.setAttribute("min", this.props.min ||
|
|
9684
|
-
let t = this.props.forceOpenTo ? this.props.openTo : this.value || this.props.openTo || this.props.today ||
|
|
9685
|
-
e.setAttribute("focused-date",
|
|
9684
|
+
e.setAttribute("value", this.pendingValue), this.isRange() && !this.pendingValue && e.setAttribute("tentative", ""), e.setAttribute("months", String(this.effectiveMonths())), e.style.setProperty("--ui-date-picker-month-columns", String(this.effectiveMonths())), e.setAttribute("format-weekday", "short"), e.setAttribute("min", this.props.min || m_()), e.setAttribute("max", this.props.max || h_()), this.props.today && e.setAttribute("today", this.props.today);
|
|
9685
|
+
let t = this.props.forceOpenTo ? this.props.openTo : this.value || this.props.openTo || this.props.today || g_();
|
|
9686
|
+
e.setAttribute("focused-date", d_(t)[0]), this.props.locale && e.setAttribute("locale", this.props.locale), this.props.firstDayOfWeek >= 0 && e.setAttribute("first-day-of-week", String(this.props.firstDayOfWeek));
|
|
9686
9687
|
let n = !this.props.selectableHeader && this.effectiveMonths() === 1;
|
|
9687
9688
|
Z.setPresence({
|
|
9688
9689
|
el: e,
|
|
@@ -9711,12 +9712,12 @@ var r_ = Y({ definition: {
|
|
|
9711
9712
|
},
|
|
9712
9713
|
syncCalendarHeading(e) {
|
|
9713
9714
|
let t = this.$el.querySelector("[data-ui-date-picker-calendar-heading]");
|
|
9714
|
-
t && (t.textContent =
|
|
9715
|
+
t && (t.textContent = __(e || d_(this.value || this.props.openTo || this.props.today || g_())[0], this.props.locale));
|
|
9715
9716
|
},
|
|
9716
9717
|
syncTodayButton() {
|
|
9717
9718
|
let e = this.$el.querySelector("[data-ui-date-picker-calendar-today]"), t = this.$el.querySelector("[data-ui-date-picker-today-day]");
|
|
9718
9719
|
if (!e || !t) return;
|
|
9719
|
-
let n = this.props.today ||
|
|
9720
|
+
let n = this.props.today || g_(), r = n.match(a_) ? String(Number(n.slice(-2))) : "";
|
|
9720
9721
|
t.textContent = r, e.setAttribute("aria-label", r ? `Go to today, ${n}` : "Go to today");
|
|
9721
9722
|
},
|
|
9722
9723
|
syncHiddenInputs() {
|
|
@@ -9735,7 +9736,7 @@ var r_ = Y({ definition: {
|
|
|
9735
9736
|
});
|
|
9736
9737
|
return;
|
|
9737
9738
|
}
|
|
9738
|
-
let [t, n] =
|
|
9739
|
+
let [t, n] = d_(this.value);
|
|
9739
9740
|
if (this.props.startName || this.props.endName) {
|
|
9740
9741
|
let r = JSON.stringify({
|
|
9741
9742
|
startName: this.props.startName,
|
|
@@ -9782,7 +9783,7 @@ var r_ = Y({ definition: {
|
|
|
9782
9783
|
syncPresets() {
|
|
9783
9784
|
let e = this.pendingValue || this.value;
|
|
9784
9785
|
Array.from(this.$el.querySelectorAll("[data-ui-date-picker-preset]")).forEach((t) => {
|
|
9785
|
-
let n =
|
|
9786
|
+
let n = v_(t), r = this.isRange() ? `${n.start}/${n.end}` : n.start;
|
|
9786
9787
|
Z.setPresence({
|
|
9787
9788
|
el: t,
|
|
9788
9789
|
attr: "data-selected",
|
|
@@ -9870,14 +9871,14 @@ var r_ = Y({ definition: {
|
|
|
9870
9871
|
onDismiss: () => this.close()
|
|
9871
9872
|
}));
|
|
9872
9873
|
}
|
|
9873
|
-
}),
|
|
9874
|
-
e.data("UiDatePicker", () =>
|
|
9875
|
-
},
|
|
9874
|
+
}), b_ = (e) => {
|
|
9875
|
+
e.data("UiDatePicker", () => y_());
|
|
9876
|
+
}, x_ = Y({ definition: {
|
|
9876
9877
|
component: "ui.menu",
|
|
9877
9878
|
parts: {
|
|
9878
|
-
menu: { base: [
|
|
9879
|
+
menu: { base: [Kh, "auto-rows-min content-start min-w-48 gap-1 overflow-hidden p-popover"] },
|
|
9879
9880
|
item: {
|
|
9880
|
-
base: [
|
|
9881
|
+
base: [Jh],
|
|
9881
9882
|
variants: {
|
|
9882
9883
|
variant: {
|
|
9883
9884
|
default: "",
|
|
@@ -9901,7 +9902,7 @@ var r_ = Y({ definition: {
|
|
|
9901
9902
|
itemLabel: { base: "min-w-0 flex-1" },
|
|
9902
9903
|
itemMeta: { base: "ml-auto text-menu-item-muted" },
|
|
9903
9904
|
itemIcon: {
|
|
9904
|
-
base:
|
|
9905
|
+
base: Yh,
|
|
9905
9906
|
variants: { position: {
|
|
9906
9907
|
leading: "",
|
|
9907
9908
|
trailing: "ml-auto"
|
|
@@ -9925,18 +9926,18 @@ var r_ = Y({ definition: {
|
|
|
9925
9926
|
defaults: { orientation: "horizontal" }
|
|
9926
9927
|
}
|
|
9927
9928
|
}
|
|
9928
|
-
} }),
|
|
9929
|
-
side: q(
|
|
9930
|
-
align: q(
|
|
9929
|
+
} }), S_ = wh, C_ = Ch, w_ = {
|
|
9930
|
+
side: q(S_, "bottom"),
|
|
9931
|
+
align: q(C_, "start"),
|
|
9931
9932
|
offset: G.clamp(-100, 100).default(0),
|
|
9932
9933
|
gap: G.clamp(0, 50).default(4),
|
|
9933
9934
|
open: K,
|
|
9934
9935
|
disabled: K,
|
|
9935
9936
|
class: W
|
|
9936
|
-
},
|
|
9937
|
+
}, T_ = Y({ definition: {
|
|
9937
9938
|
component: "ui.dropdown",
|
|
9938
9939
|
parts: { root: { base: "contents" } }
|
|
9939
|
-
} }),
|
|
9940
|
+
} }), E_ = () => ({
|
|
9940
9941
|
machine: null,
|
|
9941
9942
|
menuMotion: null,
|
|
9942
9943
|
triggerId: "",
|
|
@@ -9949,7 +9950,7 @@ var r_ = Y({ definition: {
|
|
|
9949
9950
|
init() {
|
|
9950
9951
|
this.props = U({
|
|
9951
9952
|
el: this.$el,
|
|
9952
|
-
schema:
|
|
9953
|
+
schema: w_,
|
|
9953
9954
|
onChange: (e, t) => this.applyProps(t.map((e) => e.key))
|
|
9954
9955
|
}), this.triggerId = this.$id("dropdown-trigger"), this.menuId = this.$id("dropdown-menu"), this.collection = Z.createCollectionNavigation({
|
|
9955
9956
|
root: () => this.menuEl(),
|
|
@@ -10015,7 +10016,7 @@ var r_ = Y({ definition: {
|
|
|
10015
10016
|
},
|
|
10016
10017
|
get root() {
|
|
10017
10018
|
return Z.mergeBindings({ inputs: [X({
|
|
10018
|
-
part:
|
|
10019
|
+
part: T_.parts.root,
|
|
10019
10020
|
props: this.props,
|
|
10020
10021
|
className: this.props.class
|
|
10021
10022
|
}), {
|
|
@@ -10026,7 +10027,7 @@ var r_ = Y({ definition: {
|
|
|
10026
10027
|
},
|
|
10027
10028
|
menu(e) {
|
|
10028
10029
|
return Z.mergeBindings({ inputs: [X({
|
|
10029
|
-
part:
|
|
10030
|
+
part: x_.parts.menu,
|
|
10030
10031
|
props: {},
|
|
10031
10032
|
className: e.dataset.class
|
|
10032
10033
|
}), {
|
|
@@ -10042,7 +10043,7 @@ var r_ = Y({ definition: {
|
|
|
10042
10043
|
menuItem(e) {
|
|
10043
10044
|
let t = e.dataset.variant || "default", n = e.dataset.color || "neutral", r = Z.asBool({ value: e.dataset.disabled }), i = e instanceof HTMLButtonElement ? e.getAttribute("type") || e.dataset.type || "button" : void 0;
|
|
10044
10045
|
return Z.mergeBindings({ inputs: [X({
|
|
10045
|
-
part:
|
|
10046
|
+
part: x_.parts.item,
|
|
10046
10047
|
props: {
|
|
10047
10048
|
variant: t,
|
|
10048
10049
|
color: n
|
|
@@ -10238,12 +10239,12 @@ var r_ = Y({ definition: {
|
|
|
10238
10239
|
let n = Z.asBool({ value: this.menuEl().dataset.keepOpen });
|
|
10239
10240
|
(e.dataset.keepOpen === void 0 || e.dataset.keepOpen === "" ? n : Z.asBool({ value: e.dataset.keepOpen })) || this.close();
|
|
10240
10241
|
}
|
|
10241
|
-
}),
|
|
10242
|
-
e.data("UiDropdown", () =>
|
|
10243
|
-
},
|
|
10242
|
+
}), D_ = (e) => {
|
|
10243
|
+
e.data("UiDropdown", () => E_());
|
|
10244
|
+
}, O_ = "input:not([type=\"hidden\"]), textarea, select, button, [data-ui-control-target]", k_ = (e, t) => {
|
|
10244
10245
|
let n = new Set((e ?? "").split(/\s+/).filter(Boolean));
|
|
10245
10246
|
return n.add(t), Array.from(n).join(" ");
|
|
10246
|
-
},
|
|
10247
|
+
}, A_ = (e, t) => (e.id ||= `ui-${t}-${crypto.randomUUID()}`, e.id), j_ = () => ({
|
|
10247
10248
|
observer: null,
|
|
10248
10249
|
listeners: [],
|
|
10249
10250
|
init() {
|
|
@@ -10258,22 +10259,22 @@ var r_ = Y({ definition: {
|
|
|
10258
10259
|
this.observer?.disconnect(), this.listeners.forEach((e) => e()), this.listeners = [];
|
|
10259
10260
|
},
|
|
10260
10261
|
sync() {
|
|
10261
|
-
let e = this.$el, t = Array.from(e.querySelectorAll(
|
|
10262
|
+
let e = this.$el, t = Array.from(e.querySelectorAll(O_)).filter((t) => !t.closest("[data-ui-field], [data-ui-fieldset]") || t.closest("[data-ui-field], [data-ui-fieldset]") === e)[0], n = e.querySelector(":scope > [data-ui-field-label]"), r = e.querySelector(":scope > [data-ui-fieldset-legend]"), i = Array.from(e.querySelectorAll(":scope > [data-ui-field-description]")), a = Array.from(e.querySelectorAll(":scope > [data-ui-field-error]")), o = [...i, ...a].filter((e) => !e.hasAttribute("hidden")).map((e) => A_(e, e.hasAttribute("data-ui-field-error") ? "field-error" : "field-description"));
|
|
10262
10263
|
if (t) {
|
|
10263
|
-
let i =
|
|
10264
|
+
let i = A_(t, "control");
|
|
10264
10265
|
if (n && !n.htmlFor && (n.htmlFor = i), r) {
|
|
10265
|
-
let e =
|
|
10266
|
+
let e = A_(r, "fieldset-legend");
|
|
10266
10267
|
Z.setAttribute({
|
|
10267
10268
|
el: t,
|
|
10268
10269
|
attr: "aria-labelledby",
|
|
10269
|
-
value:
|
|
10270
|
+
value: k_(t.getAttribute("aria-labelledby"), e)
|
|
10270
10271
|
});
|
|
10271
10272
|
}
|
|
10272
10273
|
o.forEach((e) => {
|
|
10273
10274
|
Z.setAttribute({
|
|
10274
10275
|
el: t,
|
|
10275
10276
|
attr: "aria-describedby",
|
|
10276
|
-
value:
|
|
10277
|
+
value: k_(t.getAttribute("aria-describedby"), e)
|
|
10277
10278
|
});
|
|
10278
10279
|
}), e.hasAttribute("data-invalid") ? (t.setAttribute("aria-invalid", "true"), t.setAttribute("data-ui-field-aria-invalid", "")) : t.hasAttribute("data-ui-field-aria-invalid") && (t.removeAttribute("aria-invalid"), t.removeAttribute("data-ui-field-aria-invalid"));
|
|
10279
10280
|
}
|
|
@@ -10281,19 +10282,19 @@ var r_ = Y({ definition: {
|
|
|
10281
10282
|
Z.setAttribute({
|
|
10282
10283
|
el: e,
|
|
10283
10284
|
attr: "aria-describedby",
|
|
10284
|
-
value:
|
|
10285
|
+
value: k_(e.getAttribute("aria-describedby"), t)
|
|
10285
10286
|
});
|
|
10286
10287
|
});
|
|
10287
10288
|
}
|
|
10288
|
-
}),
|
|
10289
|
-
e.data("UiField",
|
|
10289
|
+
}), M_ = (e) => {
|
|
10290
|
+
e.data("UiField", j_);
|
|
10290
10291
|
};
|
|
10291
10292
|
//#endregion
|
|
10292
10293
|
//#region node_modules/.pnpm/@atlaskit+pragmatic-drag-and-drop@2.0.1/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/public-utils/external/file.js
|
|
10293
|
-
function
|
|
10294
|
+
function N_(e) {
|
|
10294
10295
|
return e.source.types.includes("Files");
|
|
10295
10296
|
}
|
|
10296
|
-
function
|
|
10297
|
+
function P_(e) {
|
|
10297
10298
|
return e.source.items.filter(function(e) {
|
|
10298
10299
|
return e.kind === "file";
|
|
10299
10300
|
}).map(function(e) {
|
|
@@ -10304,41 +10305,41 @@ function N_(e) {
|
|
|
10304
10305
|
}
|
|
10305
10306
|
//#endregion
|
|
10306
10307
|
//#region node_modules/.pnpm/@atlaskit+pragmatic-drag-and-drop@2.0.1/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/changing-window/is-entering-window.js
|
|
10307
|
-
function
|
|
10308
|
+
function F_(e) {
|
|
10308
10309
|
var t = e.dragEnter, n = t.type, r = t.relatedTarget;
|
|
10309
10310
|
return n === "dragenter" ? od() ? cd({ dragEnter: t }) : r == null ? !0 : ad() ? dd(r) : r instanceof HTMLIFrameElement : !1;
|
|
10310
10311
|
}
|
|
10311
10312
|
//#endregion
|
|
10312
10313
|
//#region node_modules/.pnpm/@atlaskit+pragmatic-drag-and-drop@2.0.1/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/adapter/external-adapter.js
|
|
10313
|
-
function
|
|
10314
|
+
function I_(e) {
|
|
10314
10315
|
var t = e.type, n = e.value;
|
|
10315
10316
|
return !(t === "application/vnd.pdnd" || t === "text/plain" && n === "pdnd:android-fallback");
|
|
10316
10317
|
}
|
|
10317
|
-
function
|
|
10318
|
+
function L_(e) {
|
|
10318
10319
|
return Array.from(e.types).filter(function(t) {
|
|
10319
|
-
return
|
|
10320
|
+
return I_({
|
|
10320
10321
|
type: t,
|
|
10321
10322
|
value: e.getData(t)
|
|
10322
10323
|
});
|
|
10323
10324
|
});
|
|
10324
10325
|
}
|
|
10325
|
-
function
|
|
10326
|
+
function R_(e) {
|
|
10326
10327
|
return Array.from(e.items).filter(function(t) {
|
|
10327
|
-
return t.kind === "file" ||
|
|
10328
|
+
return t.kind === "file" || I_({
|
|
10328
10329
|
type: t.type,
|
|
10329
10330
|
value: e.getData(t.type)
|
|
10330
10331
|
});
|
|
10331
10332
|
});
|
|
10332
10333
|
}
|
|
10333
|
-
var
|
|
10334
|
+
var z_ = !1, B_ = Wd({
|
|
10334
10335
|
typeKey: "external",
|
|
10335
10336
|
defaultDropEffect: "copy",
|
|
10336
10337
|
mount: function(e) {
|
|
10337
10338
|
return (0, Au.bind)(window, {
|
|
10338
10339
|
type: "dragenter",
|
|
10339
10340
|
listener: function(t) {
|
|
10340
|
-
if (!
|
|
10341
|
-
var n =
|
|
10341
|
+
if (!z_ && t.dataTransfer && e.canStart(t) && F_({ dragEnter: t })) {
|
|
10342
|
+
var n = L_(t.dataTransfer);
|
|
10342
10343
|
if (n.length) {
|
|
10343
10344
|
var r = {
|
|
10344
10345
|
types: n,
|
|
@@ -10355,14 +10356,14 @@ var R_ = !1, z_ = Wd({
|
|
|
10355
10356
|
payload: r,
|
|
10356
10357
|
getDropPayload: function(e) {
|
|
10357
10358
|
if (!e.dataTransfer) return r;
|
|
10358
|
-
var t =
|
|
10359
|
+
var t = R_(e.dataTransfer), i = e.dataTransfer.getData.bind(e.dataTransfer);
|
|
10359
10360
|
return {
|
|
10360
10361
|
types: n,
|
|
10361
10362
|
items: t,
|
|
10362
10363
|
getStringData: function(e) {
|
|
10363
10364
|
if (!n.includes(e)) return null;
|
|
10364
10365
|
var t = i(e);
|
|
10365
|
-
return
|
|
10366
|
+
return I_({
|
|
10366
10367
|
type: e,
|
|
10367
10368
|
value: t
|
|
10368
10369
|
}) ? t : null;
|
|
@@ -10377,18 +10378,18 @@ var R_ = !1, z_ = Wd({
|
|
|
10377
10378
|
});
|
|
10378
10379
|
}
|
|
10379
10380
|
});
|
|
10380
|
-
function B_(e) {
|
|
10381
|
-
return z_.dropTarget(e);
|
|
10382
|
-
}
|
|
10383
10381
|
function V_(e) {
|
|
10384
|
-
return
|
|
10382
|
+
return B_.dropTarget(e);
|
|
10383
|
+
}
|
|
10384
|
+
function H_(e) {
|
|
10385
|
+
return B_.monitor(e);
|
|
10385
10386
|
}
|
|
10386
10387
|
(function() {
|
|
10387
10388
|
if (typeof window > "u") return;
|
|
10388
|
-
|
|
10389
|
+
B_.registerUsage();
|
|
10389
10390
|
var e = { type: "idle" }, t = e;
|
|
10390
10391
|
function n() {
|
|
10391
|
-
t.type === "dragging" && (
|
|
10392
|
+
t.type === "dragging" && (z_ = !1, t.cleanup(), t = e);
|
|
10392
10393
|
}
|
|
10393
10394
|
function r() {
|
|
10394
10395
|
return (0, Au.bindAll)(window, [{
|
|
@@ -10399,7 +10400,7 @@ function V_(e) {
|
|
|
10399
10400
|
(0, Au.bind)(window, {
|
|
10400
10401
|
type: "dragstart",
|
|
10401
10402
|
listener: function() {
|
|
10402
|
-
t.type === "idle" && (
|
|
10403
|
+
t.type === "idle" && (z_ = !0, t = {
|
|
10403
10404
|
type: "dragging",
|
|
10404
10405
|
cleanup: r()
|
|
10405
10406
|
});
|
|
@@ -10409,15 +10410,15 @@ function V_(e) {
|
|
|
10409
10410
|
})();
|
|
10410
10411
|
//#endregion
|
|
10411
10412
|
//#region packages/client/src/components/file-upload/contract.ts
|
|
10412
|
-
var
|
|
10413
|
+
var U_ = ["stack", "inline"], W_ = [
|
|
10413
10414
|
"auto",
|
|
10414
10415
|
"image",
|
|
10415
10416
|
"none"
|
|
10416
|
-
],
|
|
10417
|
+
], G_ = [
|
|
10417
10418
|
"sm",
|
|
10418
10419
|
"md",
|
|
10419
10420
|
"lg"
|
|
10420
|
-
],
|
|
10421
|
+
], K_ = {
|
|
10421
10422
|
name: W,
|
|
10422
10423
|
accept: W,
|
|
10423
10424
|
capture: W,
|
|
@@ -10425,9 +10426,9 @@ var H_ = ["stack", "inline"], U_ = [
|
|
|
10425
10426
|
required: K,
|
|
10426
10427
|
disabled: K,
|
|
10427
10428
|
invalid: K,
|
|
10428
|
-
preview: q(
|
|
10429
|
-
layout: q(
|
|
10430
|
-
size: q(
|
|
10429
|
+
preview: q(W_, "auto"),
|
|
10430
|
+
layout: q(U_, "stack"),
|
|
10431
|
+
size: q(G_, "md"),
|
|
10431
10432
|
heading: W.default("Drop files here or browse"),
|
|
10432
10433
|
text: W,
|
|
10433
10434
|
browseLabel: W,
|
|
@@ -10440,10 +10441,10 @@ var H_ = ["stack", "inline"], U_ = [
|
|
|
10440
10441
|
itemClass: W,
|
|
10441
10442
|
class: W
|
|
10442
10443
|
};
|
|
10443
|
-
W.default("Drop files here or browse"), W.default("cloud__upload"), q(
|
|
10444
|
+
W.default("Drop files here or browse"), W.default("cloud__upload"), q(U_, "stack"), q(G_, "md"), W.default("document__blank"), W.default("Remove file");
|
|
10444
10445
|
//#endregion
|
|
10445
10446
|
//#region packages/client/src/components/file-upload/styles.ts
|
|
10446
|
-
var
|
|
10447
|
+
var q_ = Y({ definition: {
|
|
10447
10448
|
component: "ui.file-upload",
|
|
10448
10449
|
parts: {
|
|
10449
10450
|
root: { base: ["grid w-full min-w-0 gap-3"] },
|
|
@@ -10500,7 +10501,7 @@ var K_ = Y({ definition: {
|
|
|
10500
10501
|
removeIcon: { base: "size-icon-xs fill-current leading-none" },
|
|
10501
10502
|
clear: { base: "sr-only" }
|
|
10502
10503
|
}
|
|
10503
|
-
} }),
|
|
10504
|
+
} }), J_ = (e) => {
|
|
10504
10505
|
if (e === 0) return "0 B";
|
|
10505
10506
|
let t = [
|
|
10506
10507
|
"B",
|
|
@@ -10509,34 +10510,34 @@ var K_ = Y({ definition: {
|
|
|
10509
10510
|
"GB"
|
|
10510
10511
|
], n = Math.min(Math.floor(Math.log(e) / Math.log(1024)), t.length - 1), r = e / 1024 ** n;
|
|
10511
10512
|
return `${r >= 10 || n === 0 ? Math.round(r) : Number(r.toFixed(1))} ${t[n]}`;
|
|
10512
|
-
},
|
|
10513
|
+
}, Y_ = (e, t) => [
|
|
10513
10514
|
t,
|
|
10514
10515
|
e.name,
|
|
10515
10516
|
e.size,
|
|
10516
10517
|
e.lastModified
|
|
10517
|
-
].join(":"),
|
|
10518
|
+
].join(":"), X_ = (e) => e.type.startsWith("image/"), Z_ = (e, t) => t !== "none" && (t === "image" || X_(e)), Q_ = (e) => e ? Array.from(e) : [], $_ = (e, t) => {
|
|
10518
10519
|
let n = t.split(",").map((e) => e.trim().toLowerCase()).filter(Boolean);
|
|
10519
10520
|
if (n.length === 0) return !0;
|
|
10520
10521
|
let r = e.name.toLowerCase(), i = e.type.toLowerCase();
|
|
10521
10522
|
return n.some((e) => e.startsWith(".") ? r.endsWith(e) : e.endsWith("/*") ? i.startsWith(`${e.slice(0, -1)}`) : e.includes("/") ? i === e : !1);
|
|
10522
|
-
},
|
|
10523
|
+
}, ev = (e, t) => e.filter((e) => $_(e, t)), tv = (e, t) => e.maxItems > 0 && t >= e.maxItems, nv = (e) => {
|
|
10523
10524
|
if (typeof DataTransfer > "u") return null;
|
|
10524
10525
|
let t = new DataTransfer();
|
|
10525
10526
|
return e.forEach((e) => t.items.add(e)), t.files;
|
|
10526
|
-
},
|
|
10527
|
-
let n =
|
|
10527
|
+
}, rv = (e, t) => {
|
|
10528
|
+
let n = nv(t);
|
|
10528
10529
|
if (!n) return !1;
|
|
10529
10530
|
try {
|
|
10530
10531
|
return e.files = n, !0;
|
|
10531
10532
|
} catch {
|
|
10532
10533
|
return !1;
|
|
10533
10534
|
}
|
|
10534
|
-
}, rv = (e) => {
|
|
10535
|
-
e.dispatchEvent(new Event("input", { bubbles: !0 })), e.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
10536
10535
|
}, iv = (e) => {
|
|
10536
|
+
e.dispatchEvent(new Event("input", { bubbles: !0 })), e.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
10537
|
+
}, av = (e) => {
|
|
10537
10538
|
let t = "http://www.w3.org/2000/svg", n = document.createElementNS(t, "svg"), r = document.createElementNS(t, "polygon");
|
|
10538
10539
|
return n.setAttribute("viewBox", "0 0 32 32"), n.setAttribute("aria-hidden", "true"), n.setAttribute("class", e), r.setAttribute("points", "17.4141 16 24 9.4141 22.5859 8 16 14.5859 9.4143 8 8 9.4141 14.5859 16 8 22.5859 9.4143 24 16 17.4141 22.5859 24 24 22.5859 17.4141 16"), n.append(r), n;
|
|
10539
|
-
},
|
|
10540
|
+
}, ov = () => ({
|
|
10540
10541
|
props: null,
|
|
10541
10542
|
listeners: [],
|
|
10542
10543
|
files: [],
|
|
@@ -10545,7 +10546,7 @@ var K_ = Y({ definition: {
|
|
|
10545
10546
|
init() {
|
|
10546
10547
|
this.props = U({
|
|
10547
10548
|
el: this.$el,
|
|
10548
|
-
schema:
|
|
10549
|
+
schema: K_,
|
|
10549
10550
|
onChange: () => this.sync()
|
|
10550
10551
|
});
|
|
10551
10552
|
let e = this.input(), t = this.dropzone();
|
|
@@ -10583,17 +10584,17 @@ var K_ = Y({ definition: {
|
|
|
10583
10584
|
r && (e.preventDefault(), this.clearExisting(r));
|
|
10584
10585
|
},
|
|
10585
10586
|
cleanup: this.listeners
|
|
10586
|
-
}), t && (this.listeners.push(
|
|
10587
|
+
}), t && (this.listeners.push(V_({
|
|
10587
10588
|
element: t,
|
|
10588
|
-
canDrop: ({ source: e }) => !this.isInputUnavailable() &&
|
|
10589
|
+
canDrop: ({ source: e }) => !this.isInputUnavailable() && N_({ source: e }),
|
|
10589
10590
|
getDropEffect: () => "copy",
|
|
10590
10591
|
onDragEnter: () => this.setDragging(!0),
|
|
10591
10592
|
onDragLeave: () => this.setDragging(!1),
|
|
10592
10593
|
onDrop: ({ source: e }) => {
|
|
10593
|
-
this.setDragging(!1), !(this.isInputUnavailable() || !
|
|
10594
|
+
this.setDragging(!1), !(this.isInputUnavailable() || !N_({ source: e })) && this.addFiles(P_({ source: e }));
|
|
10594
10595
|
}
|
|
10595
|
-
})), this.listeners.push(
|
|
10596
|
-
canMonitor: ({ source: e }) =>
|
|
10596
|
+
})), this.listeners.push(H_({
|
|
10597
|
+
canMonitor: ({ source: e }) => N_({ source: e }),
|
|
10597
10598
|
onDrop: () => this.setDragging(!1)
|
|
10598
10599
|
}))), this.syncFromInput(), this.sync();
|
|
10599
10600
|
},
|
|
@@ -10617,7 +10618,7 @@ var K_ = Y({ definition: {
|
|
|
10617
10618
|
return this.$el.querySelector("[data-ui-file-upload-list]");
|
|
10618
10619
|
},
|
|
10619
10620
|
isInputUnavailable() {
|
|
10620
|
-
return this.props.disabled ||
|
|
10621
|
+
return this.props.disabled || tv(this.props, Q_(this.input().files).length);
|
|
10621
10622
|
},
|
|
10622
10623
|
sync() {
|
|
10623
10624
|
let e = this.root(), t = this.dropzone(), n = !!e.querySelector("[data-ui-file-upload-item][data-existing-file]:not([hidden])"), r = this.files.length > 0 || n, i = this.isInputUnavailable();
|
|
@@ -10691,25 +10692,25 @@ var K_ = Y({ definition: {
|
|
|
10691
10692
|
}), e.multiple = this.props.multiple, this.props.accept ? e.accept = this.props.accept : e.removeAttribute("accept"), this.props.capture ? e.setAttribute("capture", this.props.capture) : e.removeAttribute("capture"), this.isInputUnavailable() && !this.props.disabled ? (e.setAttribute("aria-disabled", "true"), e.tabIndex = -1) : this.props.disabled || (e.removeAttribute("aria-disabled"), e.removeAttribute("tabindex"));
|
|
10692
10693
|
},
|
|
10693
10694
|
syncFromInput() {
|
|
10694
|
-
let e = this.input(), t =
|
|
10695
|
+
let e = this.input(), t = Q_(e.files), n = this.emptyInputChangeClears;
|
|
10695
10696
|
if (this.emptyInputChangeClears = !1, t.length === 0 && this.files.length > 0 && !n) {
|
|
10696
|
-
|
|
10697
|
+
rv(e, this.files.map(({ file: e }) => e)), this.sync();
|
|
10697
10698
|
return;
|
|
10698
10699
|
}
|
|
10699
|
-
let r =
|
|
10700
|
-
this.limitReached =
|
|
10700
|
+
let r = ev(t, this.props.accept), i = this.props.multiple ? this.props.maxItems : 1, a = i > 0 ? r.slice(0, i) : r, o = t.length - r.length, s = r.length - a.length, c = o + s;
|
|
10701
|
+
this.limitReached = tv(this.props, a.length), c > 0 && (rv(e, a), s > 0 && Z.dispatch({
|
|
10701
10702
|
el: this.root(),
|
|
10702
10703
|
name: "ui:file-upload-limit",
|
|
10703
10704
|
detail: { rejectedCount: s }
|
|
10704
10705
|
})), this.files.forEach((e) => {
|
|
10705
10706
|
e.previewUrl && URL.revokeObjectURL(e.previewUrl);
|
|
10706
10707
|
}), this.files = a.map((e, t) => ({
|
|
10707
|
-
id:
|
|
10708
|
+
id: Y_(e, t),
|
|
10708
10709
|
file: e,
|
|
10709
10710
|
name: e.name,
|
|
10710
|
-
size:
|
|
10711
|
+
size: J_(e.size),
|
|
10711
10712
|
type: e.type || "File",
|
|
10712
|
-
previewUrl:
|
|
10713
|
+
previewUrl: Z_(e, this.props.preview) ? URL.createObjectURL(e) : ""
|
|
10713
10714
|
})), this.renderFiles(), this.sync(), Z.dispatch({
|
|
10714
10715
|
el: this.root(),
|
|
10715
10716
|
name: "ui:file-upload-change",
|
|
@@ -10722,29 +10723,29 @@ var K_ = Y({ definition: {
|
|
|
10722
10723
|
},
|
|
10723
10724
|
addFiles(e) {
|
|
10724
10725
|
if (this.isInputUnavailable() || e.length === 0) return;
|
|
10725
|
-
let t = this.input(), n =
|
|
10726
|
+
let t = this.input(), n = ev(e, this.props.accept), r = this.props.multiple ? Q_(t.files) : [], i = this.props.maxItems > 0 ? Math.max(this.props.maxItems - r.length, 0) : n.length, a = this.props.multiple ? n.slice(0, i) : n.slice(0, 1), o = n.length - a.length, s = this.props.multiple ? [...r, ...a] : a;
|
|
10726
10727
|
if (o > 0 && Z.dispatch({
|
|
10727
10728
|
el: this.root(),
|
|
10728
10729
|
name: "ui:file-upload-limit",
|
|
10729
10730
|
detail: { rejectedCount: o }
|
|
10730
|
-
}), this.props.maxItems > 0 ? this.limitReached =
|
|
10731
|
+
}), this.props.maxItems > 0 ? this.limitReached = tv(this.props, s.length) : this.limitReached = !1, s.length === 0) {
|
|
10731
10732
|
this.sync();
|
|
10732
10733
|
return;
|
|
10733
10734
|
}
|
|
10734
|
-
if (!
|
|
10735
|
+
if (!rv(t, s)) {
|
|
10735
10736
|
t.click();
|
|
10736
10737
|
return;
|
|
10737
10738
|
}
|
|
10738
|
-
|
|
10739
|
+
iv(t);
|
|
10739
10740
|
},
|
|
10740
10741
|
removePending(e) {
|
|
10741
10742
|
if (this.props.disabled || !Number.isInteger(e)) return;
|
|
10742
|
-
let t = this.input(), n =
|
|
10743
|
+
let t = this.input(), n = Q_(t.files).filter((t, n) => n !== e);
|
|
10743
10744
|
if (n.length === 0) {
|
|
10744
|
-
this.emptyInputChangeClears = !0,
|
|
10745
|
+
this.emptyInputChangeClears = !0, rv(t, []) || (t.value = ""), iv(t);
|
|
10745
10746
|
return;
|
|
10746
10747
|
}
|
|
10747
|
-
|
|
10748
|
+
rv(t, n) || (t.value = ""), iv(t);
|
|
10748
10749
|
},
|
|
10749
10750
|
clearExisting(e) {
|
|
10750
10751
|
if (this.props.disabled || !this.props.clearable) return;
|
|
@@ -10760,10 +10761,10 @@ var K_ = Y({ definition: {
|
|
|
10760
10761
|
let t = e.querySelector("[data-ui-file-upload-empty]");
|
|
10761
10762
|
t && (t.hidden = this.files.length > 0 || !!e.querySelector("[data-existing-file]:not([hidden])"));
|
|
10762
10763
|
let n = X({
|
|
10763
|
-
part:
|
|
10764
|
+
part: q_.parts.item,
|
|
10764
10765
|
props: {},
|
|
10765
10766
|
className: this.props.itemClass
|
|
10766
|
-
}), r = X({ part:
|
|
10767
|
+
}), r = X({ part: q_.parts.preview }), i = ["relative block overflow-hidden ui-image-outline", X({ part: q_.parts.previewImage })].filter(Boolean).join(" "), a = X({ part: q_.parts.itemBody }), o = X({ part: q_.parts.itemName }), s = X({ part: q_.parts.itemMeta }), c = X({ part: q_.parts.remove }), l = X({ part: q_.parts.removeIcon });
|
|
10767
10768
|
this.files.forEach((t, u) => {
|
|
10768
10769
|
let d = document.createElement("li");
|
|
10769
10770
|
d.dataset.uiFileUploadItem = "", d.dataset.uiFileUploadPending = "", d.dataset.fileIndex = String(u), d.className = n;
|
|
@@ -10781,7 +10782,7 @@ var K_ = Y({ definition: {
|
|
|
10781
10782
|
let h = document.createElement("span");
|
|
10782
10783
|
h.dataset.uiFileUploadItemMeta = "", h.className = s, h.textContent = [t.size, t.type].filter(Boolean).join(" · "), p.append(m, h);
|
|
10783
10784
|
let g = document.createElement("button");
|
|
10784
|
-
g.type = "button", g.dataset.uiFileUploadRemove = "", g.dataset.fileIndex = String(u), g.className = c, g.setAttribute("aria-label", `Remove ${t.name}`), g.append(
|
|
10785
|
+
g.type = "button", g.dataset.uiFileUploadRemove = "", g.dataset.fileIndex = String(u), g.className = c, g.setAttribute("aria-label", `Remove ${t.name}`), g.append(av(l)), d.append(f, p, g), e.append(d);
|
|
10785
10786
|
});
|
|
10786
10787
|
},
|
|
10787
10788
|
setDragging(e) {
|
|
@@ -10798,23 +10799,23 @@ var K_ = Y({ definition: {
|
|
|
10798
10799
|
value: "true"
|
|
10799
10800
|
});
|
|
10800
10801
|
}
|
|
10801
|
-
}),
|
|
10802
|
-
e.data("UiFileUpload", () =>
|
|
10803
|
-
},
|
|
10802
|
+
}), sv = (e) => {
|
|
10803
|
+
e.data("UiFileUpload", () => ov());
|
|
10804
|
+
}, cv = yh, lv = bh, uv = jh, dv = xh, fv = {
|
|
10804
10805
|
type: W.default("text"),
|
|
10805
10806
|
name: W,
|
|
10806
10807
|
value: W,
|
|
10807
10808
|
placeholder: W,
|
|
10808
|
-
size: q(
|
|
10809
|
-
variant: q(
|
|
10810
|
-
radius: q(
|
|
10809
|
+
size: q(cv, "lg"),
|
|
10810
|
+
variant: q(lv, "outline"),
|
|
10811
|
+
radius: q(uv, "md"),
|
|
10811
10812
|
disabled: K,
|
|
10812
10813
|
readonly: K,
|
|
10813
10814
|
required: K,
|
|
10814
10815
|
invalid: K,
|
|
10815
10816
|
icon: W,
|
|
10816
10817
|
iconTrailing: W,
|
|
10817
|
-
iconVariant: q(
|
|
10818
|
+
iconVariant: q(dv, "outline"),
|
|
10818
10819
|
clearable: K,
|
|
10819
10820
|
copyable: K,
|
|
10820
10821
|
kbd: W,
|
|
@@ -10824,17 +10825,17 @@ var K_ = Y({ definition: {
|
|
|
10824
10825
|
controlClass: W,
|
|
10825
10826
|
class: W
|
|
10826
10827
|
};
|
|
10827
|
-
q(
|
|
10828
|
+
q(cv, "lg"), q(lv, "outline"), q(uv, "md");
|
|
10828
10829
|
//#endregion
|
|
10829
10830
|
//#region packages/client/src/components/input/index.ts
|
|
10830
|
-
var
|
|
10831
|
+
var pv = () => ({
|
|
10831
10832
|
props: null,
|
|
10832
10833
|
listeners: [],
|
|
10833
10834
|
copiedTimer: null,
|
|
10834
10835
|
init() {
|
|
10835
10836
|
this.props = U({
|
|
10836
10837
|
el: this.$el,
|
|
10837
|
-
schema:
|
|
10838
|
+
schema: fv,
|
|
10838
10839
|
onChange: () => this.sync()
|
|
10839
10840
|
});
|
|
10840
10841
|
let e = this.input();
|
|
@@ -10934,26 +10935,26 @@ var fv = () => ({
|
|
|
10934
10935
|
});
|
|
10935
10936
|
}, 1200);
|
|
10936
10937
|
}
|
|
10937
|
-
}),
|
|
10938
|
-
e.data("UiInput", () =>
|
|
10939
|
-
},
|
|
10938
|
+
}), mv = (e) => {
|
|
10939
|
+
e.data("UiInput", () => pv());
|
|
10940
|
+
}, hv = ["modal", "sheet"], gv = Th, _v = [
|
|
10940
10941
|
"sm",
|
|
10941
10942
|
"md",
|
|
10942
10943
|
"lg",
|
|
10943
10944
|
"xl",
|
|
10944
10945
|
"full"
|
|
10945
|
-
],
|
|
10946
|
+
], vv = [
|
|
10946
10947
|
"overlay",
|
|
10947
10948
|
"panel",
|
|
10948
10949
|
"inverse"
|
|
10949
|
-
],
|
|
10950
|
+
], yv = Mh, bv = kh, xv = {
|
|
10950
10951
|
name: W,
|
|
10951
10952
|
open: K,
|
|
10952
|
-
mode: q(
|
|
10953
|
-
side: q(
|
|
10954
|
-
size: q(
|
|
10955
|
-
surface: q(
|
|
10956
|
-
tone: q(
|
|
10953
|
+
mode: q(hv, "modal"),
|
|
10954
|
+
side: q(gv, "right"),
|
|
10955
|
+
size: q(_v, "md"),
|
|
10956
|
+
surface: q(vv, "overlay"),
|
|
10957
|
+
tone: q(yv, "solid"),
|
|
10957
10958
|
dismissible: K.default(!0),
|
|
10958
10959
|
closable: K.default(!0),
|
|
10959
10960
|
disabled: K,
|
|
@@ -10963,24 +10964,24 @@ var fv = () => ({
|
|
|
10963
10964
|
panelClass: W,
|
|
10964
10965
|
overlayClass: W,
|
|
10965
10966
|
class: W
|
|
10966
|
-
},
|
|
10967
|
+
}, Sv = {
|
|
10967
10968
|
name: W,
|
|
10968
10969
|
disabled: K,
|
|
10969
10970
|
class: W
|
|
10970
10971
|
};
|
|
10971
|
-
W.default("ui-modal-root"), q(
|
|
10972
|
+
W.default("ui-modal-root"), q(bv, "h2"), W.default("Close");
|
|
10972
10973
|
//#endregion
|
|
10973
10974
|
//#region packages/client/src/components/modal/styles.ts
|
|
10974
|
-
var
|
|
10975
|
-
overlay:
|
|
10976
|
-
panel:
|
|
10977
|
-
inverse:
|
|
10978
|
-
},
|
|
10975
|
+
var Cv = {
|
|
10976
|
+
overlay: Nh.overlay,
|
|
10977
|
+
panel: Nh.panel,
|
|
10978
|
+
inverse: Nh.inverse
|
|
10979
|
+
}, wv = [
|
|
10979
10980
|
"grid-rows-[auto_auto_minmax(0,1fr)_auto]",
|
|
10980
10981
|
"[&>[data-ui-modal-body]]:-mx-1 [&>[data-ui-modal-body]]:min-h-0 [&>[data-ui-modal-body]]:content-start",
|
|
10981
10982
|
"[&>[data-ui-modal-body]]:overflow-x-hidden [&>[data-ui-modal-body]]:overflow-y-auto [&>[data-ui-modal-body]]:px-1",
|
|
10982
10983
|
"[&>[data-ui-modal-footer]]:self-end"
|
|
10983
|
-
],
|
|
10984
|
+
], Tv = Y({ definition: {
|
|
10984
10985
|
component: "ui.modal",
|
|
10985
10986
|
parts: {
|
|
10986
10987
|
instance: { base: "contents" },
|
|
@@ -11038,8 +11039,8 @@ var Sv = {
|
|
|
11038
11039
|
panel: {
|
|
11039
11040
|
base: ["relative z-dialog grid w-full min-w-0 gap-4 overflow-auto p-5 shadow-modal outline-none", "max-h-full"],
|
|
11040
11041
|
variants: {
|
|
11041
|
-
surface:
|
|
11042
|
-
tone:
|
|
11042
|
+
surface: Cv,
|
|
11043
|
+
tone: Ph,
|
|
11043
11044
|
mode: {
|
|
11044
11045
|
modal: "rounded-4",
|
|
11045
11046
|
sheet: ""
|
|
@@ -11064,14 +11065,14 @@ var Sv = {
|
|
|
11064
11065
|
mode: "sheet",
|
|
11065
11066
|
side: "right"
|
|
11066
11067
|
},
|
|
11067
|
-
class: ["min-h-dvh max-w-lg",
|
|
11068
|
+
class: ["min-h-dvh max-w-lg", wv]
|
|
11068
11069
|
},
|
|
11069
11070
|
{
|
|
11070
11071
|
when: {
|
|
11071
11072
|
mode: "sheet",
|
|
11072
11073
|
side: "left"
|
|
11073
11074
|
},
|
|
11074
|
-
class: ["min-h-dvh max-w-lg",
|
|
11075
|
+
class: ["min-h-dvh max-w-lg", wv]
|
|
11075
11076
|
},
|
|
11076
11077
|
{
|
|
11077
11078
|
when: {
|
|
@@ -11119,7 +11120,7 @@ var Sv = {
|
|
|
11119
11120
|
close: { base: ["absolute right-3 top-3 inline-flex size-control-md items-center justify-center rounded-2 border border-transparent text-icon outline-none", "hover:bg-base-a2 focus-visible:ring-2 focus-visible:ring-focus focus-visible:ring-offset-2 focus-visible:ring-offset-app"] },
|
|
11120
11121
|
closeIcon: { base: "size-icon fill-current" }
|
|
11121
11122
|
}
|
|
11122
|
-
} }),
|
|
11123
|
+
} }), Ev = /* @__PURE__ */ new Set(), Dv = /* @__PURE__ */ new Set(), Ov = [
|
|
11123
11124
|
"a[href]",
|
|
11124
11125
|
"area[href]",
|
|
11125
11126
|
"button:not([disabled])",
|
|
@@ -11128,10 +11129,10 @@ var Sv = {
|
|
|
11128
11129
|
"textarea:not([disabled])",
|
|
11129
11130
|
"[tabindex]:not([tabindex=\"-1\"])",
|
|
11130
11131
|
"[contenteditable=\"true\"]"
|
|
11131
|
-
].join(","),
|
|
11132
|
-
let n =
|
|
11132
|
+
].join(","), kv = (e) => e ? "open" : "closed", Av = (e) => (e.side === "left" || e.side === "right") && e.mode === "sheet" ? "sheet" : "modal", jv = (e) => Array.from(Ev).find((t) => t.name === e) ?? null, Mv = (e) => Array.from(Dv).filter((t) => t.name === e), Nv = (e) => !e.hasAttribute("disabled") && e.getAttribute("aria-disabled") !== "true" && !e.hidden && e.tabIndex !== -1, Pv = (e) => e.matches(Ov) && Nv(e) ? e : e.querySelector(Ov) ?? e, Fv = (e, t) => {
|
|
11133
|
+
let n = kv(t);
|
|
11133
11134
|
e.setAttribute("data-state", n), e.setAttribute("aria-expanded", t ? "true" : "false");
|
|
11134
|
-
},
|
|
11135
|
+
}, Iv = () => ({
|
|
11135
11136
|
props: null,
|
|
11136
11137
|
machine: null,
|
|
11137
11138
|
dialogId: "",
|
|
@@ -11150,14 +11151,14 @@ var Sv = {
|
|
|
11150
11151
|
init() {
|
|
11151
11152
|
this.props = U({
|
|
11152
11153
|
el: this.$el,
|
|
11153
|
-
schema:
|
|
11154
|
+
schema: xv,
|
|
11154
11155
|
onChange: (e, t) => this.applyProps(t.map((e) => e.key))
|
|
11155
11156
|
}), this.dialogId = this.dialogEl().id || this.$id(`modal${this.props.name ? `-${this.props.name}` : ""}`), this.register(), this.mountLocalTrigger(), this.setupDialog(), this.setupNamedClose(), this.overlayMotion = Z.motion.createPresenceLifecycle({
|
|
11156
11157
|
element: () => this.overlayEl(),
|
|
11157
11158
|
preset: "fade"
|
|
11158
11159
|
}), this.panelMotion = Z.motion.createPresenceLifecycle({
|
|
11159
11160
|
element: () => this.panelEl(),
|
|
11160
|
-
preset:
|
|
11161
|
+
preset: Av(this.props)
|
|
11161
11162
|
}), this.machine = Z.createMachine(Z.createVisibilityMachine({
|
|
11162
11163
|
enter: "applyOpenState",
|
|
11163
11164
|
exit: "applyClosedState"
|
|
@@ -11170,11 +11171,11 @@ var Sv = {
|
|
|
11170
11171
|
}), this.syncAll(), this.props.open && queueMicrotask(() => this.open());
|
|
11171
11172
|
},
|
|
11172
11173
|
destroy() {
|
|
11173
|
-
this.props.disconnect(), this.machine.stop(), this.overlayMotion?.destroy(), this.panelMotion?.destroy(), this.hasScrollLock &&= (
|
|
11174
|
+
this.props.disconnect(), this.machine.stop(), this.overlayMotion?.destroy(), this.panelMotion?.destroy(), this.hasScrollLock &&= (vh(), !1), this.unregister(), this.teardownLocalTrigger(), this.teardown();
|
|
11174
11175
|
},
|
|
11175
11176
|
get root() {
|
|
11176
11177
|
return Z.mergeBindings({ inputs: [Z.resolveStyle({
|
|
11177
|
-
part:
|
|
11178
|
+
part: Tv.parts.instance,
|
|
11178
11179
|
props: {},
|
|
11179
11180
|
className: ""
|
|
11180
11181
|
}), { "data-ui-modal-instance": "" }] });
|
|
@@ -11215,10 +11216,10 @@ var Sv = {
|
|
|
11215
11216
|
return Array.from(this.$el.children).find((e) => e instanceof HTMLElement && e.matches("[data-ui-modal-trigger]")) ?? null;
|
|
11216
11217
|
},
|
|
11217
11218
|
triggerTarget(e) {
|
|
11218
|
-
return
|
|
11219
|
+
return Pv(e);
|
|
11219
11220
|
},
|
|
11220
11221
|
focusableEls() {
|
|
11221
|
-
return Array.from(this.panelEl().querySelectorAll(
|
|
11222
|
+
return Array.from(this.panelEl().querySelectorAll(Ov)).filter(Nv);
|
|
11222
11223
|
},
|
|
11223
11224
|
firstAutofocusEl() {
|
|
11224
11225
|
return this.panelEl().querySelector("[autofocus]");
|
|
@@ -11295,10 +11296,10 @@ var Sv = {
|
|
|
11295
11296
|
});
|
|
11296
11297
|
},
|
|
11297
11298
|
register() {
|
|
11298
|
-
this.isRegistered ||= (
|
|
11299
|
+
this.isRegistered ||= (Ev.add(this), !0);
|
|
11299
11300
|
},
|
|
11300
11301
|
unregister() {
|
|
11301
|
-
|
|
11302
|
+
Ev.delete(this), this.isRegistered = !1;
|
|
11302
11303
|
},
|
|
11303
11304
|
open(e) {
|
|
11304
11305
|
if (e?.preventDefault(), this.props.disabled) return;
|
|
@@ -11325,7 +11326,7 @@ var Sv = {
|
|
|
11325
11326
|
applyProps(e = []) {
|
|
11326
11327
|
if ((e.includes("mode") || e.includes("side")) && (this.panelMotion?.destroy(), this.panelMotion = Z.motion.createPresenceLifecycle({
|
|
11327
11328
|
element: () => this.panelEl(),
|
|
11328
|
-
preset:
|
|
11329
|
+
preset: Av(this.props)
|
|
11329
11330
|
})), e.includes("open")) {
|
|
11330
11331
|
this.props.open ? this.open() : this.close();
|
|
11331
11332
|
return;
|
|
@@ -11337,30 +11338,30 @@ var Sv = {
|
|
|
11337
11338
|
this.syncAll();
|
|
11338
11339
|
},
|
|
11339
11340
|
syncExternalTrigger(e, t) {
|
|
11340
|
-
if (
|
|
11341
|
-
e.setAttribute("aria-disabled", "true"), e.setAttribute("data-disabled", ""), e instanceof HTMLButtonElement && (e.disabled = !0), e.matches(
|
|
11341
|
+
if (Fv(e, this.isOpen), e.setAttribute("aria-controls", this.dialogId), e.setAttribute("data-ui-modal-trigger-target", this.dialogId), e.setAttribute("data-state", kv(this.isOpen)), t || this.props.disabled) {
|
|
11342
|
+
e.setAttribute("aria-disabled", "true"), e.setAttribute("data-disabled", ""), e instanceof HTMLButtonElement && (e.disabled = !0), e.matches(Ov) || (e.tabIndex = -1);
|
|
11342
11343
|
return;
|
|
11343
11344
|
}
|
|
11344
|
-
e.removeAttribute("aria-disabled"), e.removeAttribute("data-disabled"), e instanceof HTMLButtonElement && (e.disabled = !1), e.matches(
|
|
11345
|
+
e.removeAttribute("aria-disabled"), e.removeAttribute("data-disabled"), e instanceof HTMLButtonElement && (e.disabled = !1), e.matches(Ov) || (e.tabIndex = 0);
|
|
11345
11346
|
},
|
|
11346
11347
|
syncAll() {
|
|
11347
11348
|
this.syncDialog(), this.syncLocalTrigger(), this.syncNamedTriggers();
|
|
11348
11349
|
},
|
|
11349
11350
|
syncDialog() {
|
|
11350
|
-
let e = this.dialogEl(), t = this.viewportEl(), n = this.overlayEl(), r = this.panelEl(), i = this.titleEl(), a = this.descriptionEl(), o =
|
|
11351
|
+
let e = this.dialogEl(), t = this.viewportEl(), n = this.overlayEl(), r = this.panelEl(), i = this.titleEl(), a = this.descriptionEl(), o = kv(this.isOpen);
|
|
11351
11352
|
e.id = this.dialogId, e.setAttribute("role", "dialog"), e.setAttribute("aria-modal", "true"), e.setAttribute("data-state", o), e.dataset.mode = this.props.mode, e.dataset.side = this.props.side, e.dataset.size = this.props.size, e.dataset.surface = this.props.surface, e.dataset.tone = this.props.tone, e.className = Z.resolveStyle({
|
|
11352
|
-
part:
|
|
11353
|
+
part: Tv.parts.root,
|
|
11353
11354
|
props: this.props,
|
|
11354
11355
|
className: this.props.class
|
|
11355
11356
|
}), t.setAttribute("data-state", o), t.dataset.mode = this.props.mode, t.dataset.side = this.props.side, t.className = Z.resolveStyle({
|
|
11356
|
-
part:
|
|
11357
|
+
part: Tv.parts.viewport,
|
|
11357
11358
|
props: this.props
|
|
11358
11359
|
}), n.setAttribute("data-state", o), n.className = Z.resolveStyle({
|
|
11359
|
-
part:
|
|
11360
|
+
part: Tv.parts.overlay,
|
|
11360
11361
|
props: this.props,
|
|
11361
11362
|
className: this.props.overlayClass
|
|
11362
11363
|
}), r.id ||= this.$id(`modal-panel${this.props.name ? `-${this.props.name}` : ""}`), r.setAttribute("data-state", o), r.dataset.mode = this.props.mode, r.dataset.side = this.props.side, r.dataset.size = this.props.size, r.dataset.surface = this.props.surface, r.dataset.tone = this.props.tone, r.tabIndex = -1, r.className = Z.resolveStyle({
|
|
11363
|
-
part:
|
|
11364
|
+
part: Tv.parts.panel,
|
|
11364
11365
|
props: this.props,
|
|
11365
11366
|
className: this.props.panelClass
|
|
11366
11367
|
}), i ? (i.id ||= this.$id(`modal-title${this.props.name ? `-${this.props.name}` : ""}`), e.setAttribute("aria-labelledby", i.id), e.removeAttribute("aria-label"), this.props.autofocusTitle && (i.tabIndex = -1)) : this.props.label && (e.setAttribute("aria-label", this.props.label), e.removeAttribute("aria-labelledby")), a && (a.id ||= this.$id(`modal-description${this.props.name ? `-${this.props.name}` : ""}`)), this.props.descriptionId === "none" ? e.removeAttribute("aria-describedby") : this.props.descriptionId ? e.setAttribute("aria-describedby", this.props.descriptionId) : a && e.setAttribute("aria-describedby", a.id);
|
|
@@ -11370,12 +11371,12 @@ var Sv = {
|
|
|
11370
11371
|
e && this.syncExternalTrigger(this.triggerTarget(e), this.props.disabled);
|
|
11371
11372
|
},
|
|
11372
11373
|
syncNamedTriggers() {
|
|
11373
|
-
this.props.name &&
|
|
11374
|
+
this.props.name && Mv(this.props.name).forEach((e) => e.sync());
|
|
11374
11375
|
},
|
|
11375
11376
|
applyOpenState() {
|
|
11376
11377
|
this.modalMotionRun += 1;
|
|
11377
11378
|
let e = this.dialogEl();
|
|
11378
|
-
typeof e.showModal == "function" ? this.didShowModal ||= (e.open && e.removeAttribute("open"), e.showModal(), !0) : e.open || e.setAttribute("open", ""), this.hasScrollLock ||= (
|
|
11379
|
+
typeof e.showModal == "function" ? this.didShowModal ||= (e.open && e.removeAttribute("open"), e.showModal(), !0) : e.open || e.setAttribute("open", ""), this.hasScrollLock ||= (_h(), !0), this.syncAll();
|
|
11379
11380
|
let t = this.overlayMotion?.enter(), n = this.panelMotion?.enter();
|
|
11380
11381
|
Promise.allSettled([t?.finished ?? Promise.resolve(), n?.finished ?? Promise.resolve()]).then(() => {
|
|
11381
11382
|
this.machine.matches("opening") && this.machine.send("ANIMATION_END");
|
|
@@ -11395,14 +11396,14 @@ var Sv = {
|
|
|
11395
11396
|
finishClosedState(e) {
|
|
11396
11397
|
if (e !== this.modalMotionRun || this.isOpen) return;
|
|
11397
11398
|
let t = this.dialogEl();
|
|
11398
|
-
t.open && t.close(), this.didShowModal = !1, this.hasScrollLock &&= (
|
|
11399
|
+
t.open && t.close(), this.didShowModal = !1, this.hasScrollLock &&= (vh(), !1), this.restoreFocus(), Z.dispatch({
|
|
11399
11400
|
el: t,
|
|
11400
11401
|
name: "ui:close"
|
|
11401
11402
|
});
|
|
11402
11403
|
},
|
|
11403
11404
|
focusInitial() {
|
|
11404
11405
|
let e = this.firstAutofocusEl();
|
|
11405
|
-
if (e &&
|
|
11406
|
+
if (e && Nv(e)) {
|
|
11406
11407
|
e.focus({ preventScroll: !0 });
|
|
11407
11408
|
return;
|
|
11408
11409
|
}
|
|
@@ -11445,7 +11446,7 @@ var Sv = {
|
|
|
11445
11446
|
teardown() {
|
|
11446
11447
|
this.cleanup.forEach((e) => e()), this.cleanup = [];
|
|
11447
11448
|
}
|
|
11448
|
-
}),
|
|
11449
|
+
}), Lv = () => ({
|
|
11449
11450
|
props: null,
|
|
11450
11451
|
target: null,
|
|
11451
11452
|
cleanup: [],
|
|
@@ -11455,9 +11456,9 @@ var Sv = {
|
|
|
11455
11456
|
init() {
|
|
11456
11457
|
this.props = U({
|
|
11457
11458
|
el: this.$el,
|
|
11458
|
-
schema:
|
|
11459
|
+
schema: Sv,
|
|
11459
11460
|
onChange: () => this.sync()
|
|
11460
|
-
}), this.target = this.targetEl(),
|
|
11461
|
+
}), this.target = this.targetEl(), Dv.add(this), this.sync(), Z.addListener({
|
|
11461
11462
|
target: this.target,
|
|
11462
11463
|
event: "click",
|
|
11463
11464
|
handler: (e) => this.open(e),
|
|
@@ -11472,11 +11473,11 @@ var Sv = {
|
|
|
11472
11473
|
});
|
|
11473
11474
|
},
|
|
11474
11475
|
destroy() {
|
|
11475
|
-
this.props.disconnect(),
|
|
11476
|
+
this.props.disconnect(), Dv.delete(this), this.cleanup.forEach((e) => e()), this.cleanup = [];
|
|
11476
11477
|
},
|
|
11477
11478
|
get root() {
|
|
11478
11479
|
return Z.mergeBindings({ inputs: [Z.resolveStyle({
|
|
11479
|
-
part:
|
|
11480
|
+
part: Tv.parts.trigger,
|
|
11480
11481
|
props: {},
|
|
11481
11482
|
className: this.props.class
|
|
11482
11483
|
}), {
|
|
@@ -11491,44 +11492,44 @@ var Sv = {
|
|
|
11491
11492
|
e.syncExternalTrigger(this.target, this.props.disabled);
|
|
11492
11493
|
return;
|
|
11493
11494
|
}
|
|
11494
|
-
|
|
11495
|
+
Fv(this.target, !1), this.props.disabled ? (this.target.setAttribute("aria-disabled", "true"), this.target.setAttribute("data-disabled", "")) : (this.target.removeAttribute("aria-disabled"), this.target.removeAttribute("data-disabled"));
|
|
11495
11496
|
},
|
|
11496
11497
|
modal() {
|
|
11497
|
-
return this.props.name ?
|
|
11498
|
+
return this.props.name ? jv(this.props.name) : null;
|
|
11498
11499
|
},
|
|
11499
11500
|
open(e) {
|
|
11500
11501
|
e?.preventDefault(), !this.props.disabled && this.modal()?.openFrom(this.target);
|
|
11501
11502
|
},
|
|
11502
11503
|
targetEl() {
|
|
11503
|
-
return
|
|
11504
|
+
return Pv(this.$el);
|
|
11504
11505
|
}
|
|
11505
|
-
}),
|
|
11506
|
-
e.data("UiModal", () =>
|
|
11507
|
-
},
|
|
11506
|
+
}), Rv = (e) => {
|
|
11507
|
+
e.data("UiModal", () => Iv()), e.data("UiModalTrigger", () => Lv());
|
|
11508
|
+
}, zv = Eh, Bv = [
|
|
11508
11509
|
"default",
|
|
11509
11510
|
"cards",
|
|
11510
11511
|
"pills"
|
|
11511
|
-
],
|
|
11512
|
+
], Vv = Dh, Hv = yh, Uv = [
|
|
11512
11513
|
"default",
|
|
11513
11514
|
"cards",
|
|
11514
11515
|
"pills"
|
|
11515
|
-
],
|
|
11516
|
+
], Wv = {
|
|
11516
11517
|
name: W,
|
|
11517
11518
|
value: W,
|
|
11518
|
-
orientation: q(
|
|
11519
|
-
variant: q(
|
|
11519
|
+
orientation: q(zv, "vertical"),
|
|
11520
|
+
variant: q(Bv, "default"),
|
|
11520
11521
|
indicator: K.default(!0),
|
|
11521
|
-
placement: q(
|
|
11522
|
+
placement: q(Vv, "leading"),
|
|
11522
11523
|
disabled: K,
|
|
11523
11524
|
required: K,
|
|
11524
11525
|
invalid: K,
|
|
11525
11526
|
loop: K.default(!0),
|
|
11526
11527
|
class: W
|
|
11527
11528
|
};
|
|
11528
|
-
K.default(!0), q(
|
|
11529
|
+
K.default(!0), q(Vv, "leading"), q(Uv, "default"), q(Hv, "md"), q(Hv, "md");
|
|
11529
11530
|
//#endregion
|
|
11530
11531
|
//#region packages/client/src/components/radio/index.ts
|
|
11531
|
-
var
|
|
11532
|
+
var Gv = (e, t) => t.value || e.dataset.value || e.textContent?.trim() || "", Kv = () => ({
|
|
11532
11533
|
props: null,
|
|
11533
11534
|
value: "",
|
|
11534
11535
|
listeners: [],
|
|
@@ -11536,7 +11537,7 @@ var Wv = (e, t) => t.value || e.dataset.value || e.textContent?.trim() || "", Gv
|
|
|
11536
11537
|
init() {
|
|
11537
11538
|
this.props = U({
|
|
11538
11539
|
el: this.$el,
|
|
11539
|
-
schema:
|
|
11540
|
+
schema: Wv,
|
|
11540
11541
|
onChange: () => this.sync()
|
|
11541
11542
|
});
|
|
11542
11543
|
let e = this.items().find((e) => e.input.checked);
|
|
@@ -11578,7 +11579,7 @@ var Wv = (e, t) => t.value || e.dataset.value || e.textContent?.trim() || "", Gv
|
|
|
11578
11579
|
input: t,
|
|
11579
11580
|
indicator: e.querySelector("[data-ui-radio-indicator]"),
|
|
11580
11581
|
dot: e.querySelector("[data-ui-radio-indicator-dot]"),
|
|
11581
|
-
value:
|
|
11582
|
+
value: Gv(e, t),
|
|
11582
11583
|
disabled: n
|
|
11583
11584
|
};
|
|
11584
11585
|
}).filter((e) => e !== null);
|
|
@@ -11692,9 +11693,9 @@ var Wv = (e, t) => t.value || e.dataset.value || e.textContent?.trim() || "", Gv
|
|
|
11692
11693
|
}
|
|
11693
11694
|
["ArrowUp", "ArrowLeft"].includes(t.key) && (t.preventDefault(), this.move(e, -1)), ["ArrowDown", "ArrowRight"].includes(t.key) && (t.preventDefault(), this.move(e, 1));
|
|
11694
11695
|
}
|
|
11695
|
-
}),
|
|
11696
|
-
e.data("UiRadioGroup", () =>
|
|
11697
|
-
},
|
|
11696
|
+
}), qv = (e) => {
|
|
11697
|
+
e.data("UiRadioGroup", () => Kv());
|
|
11698
|
+
}, Jv = {
|
|
11698
11699
|
orientation: q([
|
|
11699
11700
|
"vertical",
|
|
11700
11701
|
"horizontal",
|
|
@@ -11714,7 +11715,7 @@ var Wv = (e, t) => t.value || e.dataset.value || e.textContent?.trim() || "", Gv
|
|
|
11714
11715
|
scrollbarClass: W,
|
|
11715
11716
|
thumbClass: W,
|
|
11716
11717
|
cornerClass: W
|
|
11717
|
-
},
|
|
11718
|
+
}, Yv = Y({ definition: {
|
|
11718
11719
|
component: "ui.scroll-area",
|
|
11719
11720
|
parts: {
|
|
11720
11721
|
root: {
|
|
@@ -11783,27 +11784,27 @@ var Wv = (e, t) => t.value || e.dataset.value || e.textContent?.trim() || "", Gv
|
|
|
11783
11784
|
"data-visible:opacity-100"
|
|
11784
11785
|
] }
|
|
11785
11786
|
}
|
|
11786
|
-
} }),
|
|
11787
|
-
if (
|
|
11787
|
+
} }), Xv = 18, Zv = 1e3, Qv = null, $v = (e, t, n) => Math.min(n, Math.max(t, e)), ey = (e, t) => e === "both" || e === "horizontal" && t === "x" || e === "vertical" && t === "y", ty = () => {
|
|
11788
|
+
if (Qv) return Qv;
|
|
11788
11789
|
let e = document.createElement("div"), t = document.createElement("div");
|
|
11789
|
-
return e.dir = "rtl", e.style.cssText = "position:absolute;left:-9999px;width:4px;height:1px;overflow:scroll;", t.style.cssText = "width:8px;height:1px;", e.append(t), document.body.append(e), e.scrollLeft = 1, e.scrollLeft === 0 ?
|
|
11790
|
-
},
|
|
11790
|
+
return e.dir = "rtl", e.style.cssText = "position:absolute;left:-9999px;width:4px;height:1px;overflow:scroll;", t.style.cssText = "width:8px;height:1px;", e.append(t), document.body.append(e), e.scrollLeft = 1, e.scrollLeft === 0 ? Qv = "negative" : (e.scrollLeft = 0, Qv = e.scrollLeft === 0 ? "reverse" : "default"), e.remove(), Qv;
|
|
11791
|
+
}, ny = (e) => {
|
|
11791
11792
|
let t = Math.max(0, e.scrollWidth - e.clientWidth);
|
|
11792
11793
|
if (!Z.isRtl({ el: e })) return e.scrollLeft;
|
|
11793
|
-
let n =
|
|
11794
|
+
let n = ty();
|
|
11794
11795
|
return n === "negative" ? -e.scrollLeft : n === "reverse" ? t - e.scrollLeft : e.scrollLeft;
|
|
11795
|
-
},
|
|
11796
|
-
let n = Math.max(0, e.scrollWidth - e.clientWidth), r =
|
|
11796
|
+
}, ry = (e, t) => {
|
|
11797
|
+
let n = Math.max(0, e.scrollWidth - e.clientWidth), r = $v(t, 0, n);
|
|
11797
11798
|
if (!Z.isRtl({ el: e })) {
|
|
11798
11799
|
e.scrollLeft = r;
|
|
11799
11800
|
return;
|
|
11800
11801
|
}
|
|
11801
|
-
let i =
|
|
11802
|
+
let i = ty();
|
|
11802
11803
|
i === "negative" ? e.scrollLeft = -r : i === "reverse" ? e.scrollLeft = n - r : e.scrollLeft = r;
|
|
11803
|
-
},
|
|
11804
|
+
}, iy = (e) => e.dataset.orientation === "horizontal" ? "x" : "y", ay = (e) => e instanceof HTMLElement, oy = (e, t) => {
|
|
11804
11805
|
let n = e.querySelector(`:scope > ${t}`);
|
|
11805
|
-
return
|
|
11806
|
-
},
|
|
11806
|
+
return ay(n) ? n : null;
|
|
11807
|
+
}, sy = () => ({
|
|
11807
11808
|
props: null,
|
|
11808
11809
|
listeners: [],
|
|
11809
11810
|
resizeObserver: null,
|
|
@@ -11822,7 +11823,7 @@ var Wv = (e, t) => t.value || e.dataset.value || e.textContent?.trim() || "", Gv
|
|
|
11822
11823
|
init() {
|
|
11823
11824
|
this.props = U({
|
|
11824
11825
|
el: this.$el,
|
|
11825
|
-
schema:
|
|
11826
|
+
schema: Jv,
|
|
11826
11827
|
onChange: () => this.scheduleSync()
|
|
11827
11828
|
});
|
|
11828
11829
|
let e = this.elements();
|
|
@@ -11900,7 +11901,7 @@ var Wv = (e, t) => t.value || e.dataset.value || e.textContent?.trim() || "", Gv
|
|
|
11900
11901
|
},
|
|
11901
11902
|
get root() {
|
|
11902
11903
|
return Z.mergeBindings({ inputs: [X({
|
|
11903
|
-
part:
|
|
11904
|
+
part: Yv.parts.root,
|
|
11904
11905
|
props: {
|
|
11905
11906
|
fill: this.props.fill,
|
|
11906
11907
|
size: this.props.size
|
|
@@ -11917,7 +11918,7 @@ var Wv = (e, t) => t.value || e.dataset.value || e.textContent?.trim() || "", Gv
|
|
|
11917
11918
|
},
|
|
11918
11919
|
viewport(e) {
|
|
11919
11920
|
return Z.mergeBindings({ inputs: [X({
|
|
11920
|
-
part:
|
|
11921
|
+
part: Yv.parts.viewport,
|
|
11921
11922
|
props: {
|
|
11922
11923
|
orientation: this.props.orientation,
|
|
11923
11924
|
fill: this.props.fill
|
|
@@ -11931,9 +11932,9 @@ var Wv = (e, t) => t.value || e.dataset.value || e.textContent?.trim() || "", Gv
|
|
|
11931
11932
|
}] });
|
|
11932
11933
|
},
|
|
11933
11934
|
scrollbar(e) {
|
|
11934
|
-
let t =
|
|
11935
|
+
let t = iy(e) === "x" ? "horizontal" : "vertical";
|
|
11935
11936
|
return Z.mergeBindings({ inputs: [X({
|
|
11936
|
-
part:
|
|
11937
|
+
part: Yv.parts.scrollbar,
|
|
11937
11938
|
props: { orientation: t },
|
|
11938
11939
|
className: e.dataset.class
|
|
11939
11940
|
}), {
|
|
@@ -11943,9 +11944,9 @@ var Wv = (e, t) => t.value || e.dataset.value || e.textContent?.trim() || "", Gv
|
|
|
11943
11944
|
}] });
|
|
11944
11945
|
},
|
|
11945
11946
|
thumb(e) {
|
|
11946
|
-
let t =
|
|
11947
|
+
let t = iy(e), n = t === "x" ? "horizontal" : "vertical";
|
|
11947
11948
|
return Z.mergeBindings({ inputs: [X({
|
|
11948
|
-
part:
|
|
11949
|
+
part: Yv.parts.thumb,
|
|
11949
11950
|
props: { orientation: n },
|
|
11950
11951
|
className: e.dataset.class
|
|
11951
11952
|
}), {
|
|
@@ -11957,7 +11958,7 @@ var Wv = (e, t) => t.value || e.dataset.value || e.textContent?.trim() || "", Gv
|
|
|
11957
11958
|
},
|
|
11958
11959
|
corner(e) {
|
|
11959
11960
|
return Z.mergeBindings({ inputs: [X({
|
|
11960
|
-
part:
|
|
11961
|
+
part: Yv.parts.corner,
|
|
11961
11962
|
className: e.dataset.class
|
|
11962
11963
|
}), {
|
|
11963
11964
|
"data-ui-scroll-area-corner": "",
|
|
@@ -11965,16 +11966,16 @@ var Wv = (e, t) => t.value || e.dataset.value || e.textContent?.trim() || "", Gv
|
|
|
11965
11966
|
}] });
|
|
11966
11967
|
},
|
|
11967
11968
|
elements() {
|
|
11968
|
-
let e = this.$el, t =
|
|
11969
|
+
let e = this.$el, t = oy(e, "[data-ui-scroll-area-viewport]") ?? e;
|
|
11969
11970
|
return {
|
|
11970
11971
|
root: e,
|
|
11971
11972
|
viewport: t,
|
|
11972
|
-
content:
|
|
11973
|
-
verticalScrollbar:
|
|
11974
|
-
horizontalScrollbar:
|
|
11975
|
-
verticalThumb:
|
|
11976
|
-
horizontalThumb:
|
|
11977
|
-
corner:
|
|
11973
|
+
content: oy(t, "[data-ui-scroll-area-content]"),
|
|
11974
|
+
verticalScrollbar: oy(e, "[data-ui-scroll-area-scrollbar][data-orientation=\"vertical\"]"),
|
|
11975
|
+
horizontalScrollbar: oy(e, "[data-ui-scroll-area-scrollbar][data-orientation=\"horizontal\"]"),
|
|
11976
|
+
verticalThumb: oy(e, "[data-ui-scroll-area-scrollbar][data-orientation=\"vertical\"] > [data-ui-scroll-area-thumb][data-orientation=\"vertical\"]"),
|
|
11977
|
+
horizontalThumb: oy(e, "[data-ui-scroll-area-scrollbar][data-orientation=\"horizontal\"] > [data-ui-scroll-area-thumb][data-orientation=\"horizontal\"]"),
|
|
11978
|
+
corner: oy(e, "[data-ui-scroll-area-corner]")
|
|
11978
11979
|
};
|
|
11979
11980
|
},
|
|
11980
11981
|
scheduleSync() {
|
|
@@ -11989,7 +11990,7 @@ var Wv = (e, t) => t.value || e.dataset.value || e.textContent?.trim() || "", Gv
|
|
|
11989
11990
|
},
|
|
11990
11991
|
sync() {
|
|
11991
11992
|
let e = this.elements(), { viewport: t } = e;
|
|
11992
|
-
this.overflowX =
|
|
11993
|
+
this.overflowX = ey(this.props.orientation, "x") && t.scrollWidth > t.clientWidth + 1, this.overflowY = ey(this.props.orientation, "y") && t.scrollHeight > t.clientHeight + 1, Z.setPresence({
|
|
11993
11994
|
el: this.$el,
|
|
11994
11995
|
attr: "data-overflow-x",
|
|
11995
11996
|
present: this.overflowX
|
|
@@ -12022,7 +12023,7 @@ var Wv = (e, t) => t.value || e.dataset.value || e.textContent?.trim() || "", Gv
|
|
|
12022
12023
|
updateGeometry(e) {
|
|
12023
12024
|
let { viewport: t } = e, n = (e, n, r, i) => {
|
|
12024
12025
|
if (!n || !r || !i) return r && (r.style.width = "", r.style.height = "", r.style.transform = ""), null;
|
|
12025
|
-
let a = e === "y" ? n.clientHeight : n.clientWidth, o = e === "y" ? t.clientHeight : t.clientWidth, s = e === "y" ? t.scrollHeight : t.scrollWidth, c = Math.max(1, s - o), l = Math.min(a, Math.max(
|
|
12026
|
+
let a = e === "y" ? n.clientHeight : n.clientWidth, o = e === "y" ? t.clientHeight : t.clientWidth, s = e === "y" ? t.scrollHeight : t.scrollWidth, c = Math.max(1, s - o), l = Math.min(a, Math.max(Xv, o / s * a)), u = Math.max(0, a - l);
|
|
12026
12027
|
return e === "y" ? (r.style.height = `${l}px`, r.style.width = "") : (r.style.width = `${l}px`, r.style.height = ""), {
|
|
12027
12028
|
trackLength: a,
|
|
12028
12029
|
thumbLength: l,
|
|
@@ -12035,11 +12036,11 @@ var Wv = (e, t) => t.value || e.dataset.value || e.textContent?.trim() || "", Gv
|
|
|
12035
12036
|
updateThumbPositions(e) {
|
|
12036
12037
|
let { viewport: t } = e;
|
|
12037
12038
|
if (e.verticalThumb && this.verticalGeometry) {
|
|
12038
|
-
let { maxOffset: n, maxScroll: r } = this.verticalGeometry, i = n *
|
|
12039
|
+
let { maxOffset: n, maxScroll: r } = this.verticalGeometry, i = n * $v(t.scrollTop / r, 0, 1);
|
|
12039
12040
|
e.verticalThumb.style.transform = `translate3d(0, ${i}px, 0)`;
|
|
12040
12041
|
}
|
|
12041
12042
|
if (e.horizontalThumb && this.horizontalGeometry) {
|
|
12042
|
-
let { maxOffset: n, maxScroll: r } = this.horizontalGeometry, i = n *
|
|
12043
|
+
let { maxOffset: n, maxScroll: r } = this.horizontalGeometry, i = n * $v(ny(t) / r, 0, 1);
|
|
12043
12044
|
e.horizontalThumb.style.transform = `translate3d(${i}px, 0, 0)`;
|
|
12044
12045
|
}
|
|
12045
12046
|
},
|
|
@@ -12067,7 +12068,7 @@ var Wv = (e, t) => t.value || e.dataset.value || e.textContent?.trim() || "", Gv
|
|
|
12067
12068
|
e && Z.setPresence({
|
|
12068
12069
|
el: e,
|
|
12069
12070
|
attr: "data-dragging",
|
|
12070
|
-
present: this.dragging?.axis ===
|
|
12071
|
+
present: this.dragging?.axis === iy(e)
|
|
12071
12072
|
});
|
|
12072
12073
|
}), e.corner && Z.setPresence({
|
|
12073
12074
|
el: e.corner,
|
|
@@ -12082,7 +12083,7 @@ var Wv = (e, t) => t.value || e.dataset.value || e.textContent?.trim() || "", Gv
|
|
|
12082
12083
|
attr: "data-scrolling",
|
|
12083
12084
|
present: !1
|
|
12084
12085
|
}), this.updateVisibility(this.elements());
|
|
12085
|
-
},
|
|
12086
|
+
}, Zv);
|
|
12086
12087
|
},
|
|
12087
12088
|
clearFadeTimer() {
|
|
12088
12089
|
this.fadeTimer &&= (window.clearTimeout(this.fadeTimer), 0);
|
|
@@ -12099,7 +12100,7 @@ var Wv = (e, t) => t.value || e.dataset.value || e.textContent?.trim() || "", Gv
|
|
|
12099
12100
|
if (this.props.disabled) return;
|
|
12100
12101
|
let n = this.elements(), r = n.viewport, i = t === "y" ? n.verticalScrollbar : n.horizontalScrollbar, a = t === "y" ? n.verticalThumb : n.horizontalThumb, o = t === "y" ? this.overflowY : this.overflowX;
|
|
12101
12102
|
if (!i || !a || !o) return;
|
|
12102
|
-
let s = t === "y" ? i.clientHeight : i.clientWidth, c = t === "y" ? a.offsetHeight : a.offsetWidth, l = t === "y" ? Math.max(0, r.scrollHeight - r.clientHeight) : Math.max(0, r.scrollWidth - r.clientWidth), u = t === "y" ? r.scrollTop :
|
|
12103
|
+
let s = t === "y" ? i.clientHeight : i.clientWidth, c = t === "y" ? a.offsetHeight : a.offsetWidth, l = t === "y" ? Math.max(0, r.scrollHeight - r.clientHeight) : Math.max(0, r.scrollWidth - r.clientWidth), u = t === "y" ? r.scrollTop : ny(r);
|
|
12103
12104
|
this.dragging = {
|
|
12104
12105
|
axis: t,
|
|
12105
12106
|
pointerId: e.pointerId,
|
|
@@ -12118,7 +12119,7 @@ var Wv = (e, t) => t.value || e.dataset.value || e.textContent?.trim() || "", Gv
|
|
|
12118
12119
|
if (!this.dragging || this.dragging.pointerId !== e.pointerId) return;
|
|
12119
12120
|
e.preventDefault();
|
|
12120
12121
|
let t = this.elements().viewport, n = (this.dragging.axis === "y" ? e.clientY : e.clientX) - this.dragging.startPointer, r = Math.max(1, this.dragging.trackLength - this.dragging.thumbLength), i = this.dragging.startScroll + n / r * this.dragging.maxScroll;
|
|
12121
|
-
this.dragging.axis === "y" ? t.scrollTop =
|
|
12122
|
+
this.dragging.axis === "y" ? t.scrollTop = $v(i, 0, this.dragging.maxScroll) : ry(t, i), this.schedulePositionSync();
|
|
12122
12123
|
},
|
|
12123
12124
|
onPointerUp(e) {
|
|
12124
12125
|
if (!this.dragging || this.dragging.pointerId !== e.pointerId) return;
|
|
@@ -12128,9 +12129,9 @@ var Wv = (e, t) => t.value || e.dataset.value || e.textContent?.trim() || "", Gv
|
|
|
12128
12129
|
} catch {}
|
|
12129
12130
|
this.dragging = null, this.startFadeTimer(), this.sync();
|
|
12130
12131
|
}
|
|
12131
|
-
}),
|
|
12132
|
-
e.data("UiScrollArea", () =>
|
|
12133
|
-
},
|
|
12132
|
+
}), cy = (e) => {
|
|
12133
|
+
e.data("UiScrollArea", () => sy());
|
|
12134
|
+
}, ly = Y({ definition: {
|
|
12134
12135
|
component: "ui.badge",
|
|
12135
12136
|
parts: {
|
|
12136
12137
|
root: {
|
|
@@ -12290,7 +12291,7 @@ var Wv = (e, t) => t.value || e.dataset.value || e.textContent?.trim() || "", Gv
|
|
|
12290
12291
|
},
|
|
12291
12292
|
class: "bg-danger-solid text-danger-contrast shadow-1"
|
|
12292
12293
|
},
|
|
12293
|
-
...
|
|
12294
|
+
...Ih,
|
|
12294
12295
|
{
|
|
12295
12296
|
when: {
|
|
12296
12297
|
insetLeft: !0,
|
|
@@ -12383,32 +12384,32 @@ var Wv = (e, t) => t.value || e.dataset.value || e.textContent?.trim() || "", Gv
|
|
|
12383
12384
|
},
|
|
12384
12385
|
closeIcon: { base: "size-icon-xs shrink-0 fill-current text-current" }
|
|
12385
12386
|
}
|
|
12386
|
-
} }),
|
|
12387
|
+
} }), uy = [
|
|
12387
12388
|
"soft",
|
|
12388
12389
|
"surface",
|
|
12389
12390
|
"outline",
|
|
12390
12391
|
"solid"
|
|
12391
|
-
],
|
|
12392
|
+
], dy = [
|
|
12392
12393
|
"neutral",
|
|
12393
12394
|
"accent",
|
|
12394
12395
|
"success",
|
|
12395
12396
|
"warning",
|
|
12396
12397
|
"danger"
|
|
12397
|
-
],
|
|
12398
|
-
q(
|
|
12398
|
+
], fy = yh, py = ["span", "button"], my = Sh, hy = xh, gy = jh;
|
|
12399
|
+
q(uy, "soft"), q(dy, "neutral"), q(fy, "sm"), q(gy, "sm"), q(py, "span"), q(my, "button"), q(hy, "mini"), q(my, "button"), W.default("close"), q(hy, "mini"), q(fy, "sm"), W.default("Remove");
|
|
12399
12400
|
//#endregion
|
|
12400
12401
|
//#region packages/client/src/components/select/contract.ts
|
|
12401
|
-
var
|
|
12402
|
+
var _y = [
|
|
12402
12403
|
"listbox",
|
|
12403
12404
|
"combobox",
|
|
12404
12405
|
"pillbox",
|
|
12405
12406
|
"native"
|
|
12406
|
-
],
|
|
12407
|
+
], vy = bh, yy = yh, by = jh, xy = wh, Sy = Ch, Cy = xh, wy = {
|
|
12407
12408
|
name: W,
|
|
12408
12409
|
value: W,
|
|
12409
12410
|
values: W,
|
|
12410
12411
|
placeholder: W,
|
|
12411
|
-
mode: q(
|
|
12412
|
+
mode: q(_y, "listbox"),
|
|
12412
12413
|
multiple: K,
|
|
12413
12414
|
searchable: K,
|
|
12414
12415
|
filter: K.default(!0),
|
|
@@ -12428,11 +12429,11 @@ var gy = [
|
|
|
12428
12429
|
autoHighlight: K.default(!0),
|
|
12429
12430
|
loop: K.default(!0),
|
|
12430
12431
|
path: W,
|
|
12431
|
-
size: q(
|
|
12432
|
-
variant: q(
|
|
12433
|
-
radius: q(
|
|
12434
|
-
side: q(
|
|
12435
|
-
align: q(
|
|
12432
|
+
size: q(yy, "lg"),
|
|
12433
|
+
variant: q(vy, "outline"),
|
|
12434
|
+
radius: q(by, "md"),
|
|
12435
|
+
side: q(xy, "bottom"),
|
|
12436
|
+
align: q(Sy, "start"),
|
|
12436
12437
|
offset: G.clamp(-100, 100).default(0),
|
|
12437
12438
|
gap: G.clamp(0, 50).default(4),
|
|
12438
12439
|
empty: W.default("No results found."),
|
|
@@ -12440,29 +12441,29 @@ var gy = [
|
|
|
12440
12441
|
searchIcon: W.default("search"),
|
|
12441
12442
|
icon: W,
|
|
12442
12443
|
iconTrailing: W.default("chevron__down"),
|
|
12443
|
-
iconVariant: q(
|
|
12444
|
+
iconVariant: q(Cy, "outline"),
|
|
12444
12445
|
buttonClass: W,
|
|
12445
12446
|
inputClass: W,
|
|
12446
12447
|
searchClass: W,
|
|
12447
12448
|
listboxClass: W,
|
|
12448
12449
|
optionClass: W,
|
|
12449
|
-
chipVariant: q(
|
|
12450
|
-
chipColor: q(
|
|
12450
|
+
chipVariant: q(uy, "soft"),
|
|
12451
|
+
chipColor: q(dy, "neutral"),
|
|
12451
12452
|
chipClass: W,
|
|
12452
12453
|
class: W
|
|
12453
12454
|
};
|
|
12454
|
-
q(
|
|
12455
|
+
q(Cy, "outline"), G.clamp(0, 100).default(0);
|
|
12455
12456
|
//#endregion
|
|
12456
12457
|
//#region packages/client/src/components/select/styles.ts
|
|
12457
|
-
var
|
|
12458
|
+
var Ty = Y({ definition: {
|
|
12458
12459
|
component: "ui.select",
|
|
12459
12460
|
parts: {
|
|
12460
12461
|
root: { base: "relative inline-grid w-full min-w-0" },
|
|
12461
12462
|
control: {
|
|
12462
|
-
base: [
|
|
12463
|
+
base: [Lh, zh],
|
|
12463
12464
|
variants: {
|
|
12464
|
-
size:
|
|
12465
|
-
variant:
|
|
12465
|
+
size: Bh,
|
|
12466
|
+
variant: Hh,
|
|
12466
12467
|
mode: {
|
|
12467
12468
|
listbox: "",
|
|
12468
12469
|
combobox: "",
|
|
@@ -12480,7 +12481,7 @@ var wy = Y({ definition: {
|
|
|
12480
12481
|
empty: !1
|
|
12481
12482
|
},
|
|
12482
12483
|
class: "!pl-1.5"
|
|
12483
|
-
}, ...
|
|
12484
|
+
}, ...Ih],
|
|
12484
12485
|
defaults: {
|
|
12485
12486
|
size: "lg",
|
|
12486
12487
|
variant: "outline",
|
|
@@ -12492,9 +12493,9 @@ var wy = Y({ definition: {
|
|
|
12492
12493
|
button: { base: ["flex min-w-0 flex-1 items-center gap-2 border-0 bg-transparent p-0 text-left text-inherit outline-none"] },
|
|
12493
12494
|
value: { base: "min-w-0 flex-1" },
|
|
12494
12495
|
placeholder: { base: "min-w-0 flex-1 text-foreground" },
|
|
12495
|
-
input: { base: ["w-full min-w-16 flex-1",
|
|
12496
|
+
input: { base: ["w-full min-w-16 flex-1", Uh] },
|
|
12496
12497
|
search: { base: ["flex min-h-control-xlg shrink-0 items-center gap-2 border-b border-popover-border px-3", "text-sm text-foreground"] },
|
|
12497
|
-
searchInput: { base: ["min-w-0 flex-1 text-sm",
|
|
12498
|
+
searchInput: { base: ["min-w-0 flex-1 text-sm", Uh] },
|
|
12498
12499
|
chips: { base: "flex min-w-0 flex-wrap items-center gap-1" },
|
|
12499
12500
|
chip: { base: ["max-w-64"] },
|
|
12500
12501
|
chipLabel: { base: "block min-w-0 flex-1 truncate" },
|
|
@@ -12507,11 +12508,11 @@ var wy = Y({ definition: {
|
|
|
12507
12508
|
} },
|
|
12508
12509
|
defaults: { position: "leading" }
|
|
12509
12510
|
},
|
|
12510
|
-
action: { base:
|
|
12511
|
-
popover: { base: [
|
|
12511
|
+
action: { base: Wh },
|
|
12512
|
+
popover: { base: [Kh, "overflow-hidden"] },
|
|
12512
12513
|
viewport: { base: "grid auto-rows-min content-start max-h-combobox-listbox gap-1 overflow-x-hidden overflow-y-auto p-popover" },
|
|
12513
12514
|
option: { base: [
|
|
12514
|
-
|
|
12515
|
+
Jh,
|
|
12515
12516
|
"[&:has([data-ui-select-option-label]>*+*)]:h-auto",
|
|
12516
12517
|
"[&:has([data-ui-select-option-label]>*+*)]:items-start",
|
|
12517
12518
|
"[&:has([data-ui-select-option-label]>*+*)]:py-2"
|
|
@@ -12519,14 +12520,14 @@ var wy = Y({ definition: {
|
|
|
12519
12520
|
optionLabel: { base: "min-w-0 flex-1 truncate" },
|
|
12520
12521
|
optionMeta: { base: "ml-auto text-menu-item-muted" },
|
|
12521
12522
|
optionIcon: {
|
|
12522
|
-
base:
|
|
12523
|
+
base: Yh,
|
|
12523
12524
|
variants: { position: {
|
|
12524
12525
|
leading: "",
|
|
12525
12526
|
trailing: "ml-auto"
|
|
12526
12527
|
} },
|
|
12527
12528
|
defaults: { position: "leading" }
|
|
12528
12529
|
},
|
|
12529
|
-
optionIndicator: { base:
|
|
12530
|
+
optionIndicator: { base: Xh },
|
|
12530
12531
|
optionCheckbox: { base: ["ml-auto inline-flex size-icon-sm shrink-0 items-center justify-center rounded-1 border border-border bg-surface-panel text-accent-contrast", "data-selected:border-accent-solid data-selected:bg-accent-solid"] },
|
|
12531
12532
|
group: { base: "grid auto-rows-min content-start gap-1" },
|
|
12532
12533
|
label: { base: "px-menu-item-x py-1 text-menu-heading-fg" },
|
|
@@ -12535,9 +12536,9 @@ var wy = Y({ definition: {
|
|
|
12535
12536
|
separatorRule: { base: "h-px w-full border-0 bg-menu-separator" },
|
|
12536
12537
|
nativeWrapper: { base: "relative w-full min-w-0" },
|
|
12537
12538
|
native: {
|
|
12538
|
-
base: [
|
|
12539
|
-
variants: { size:
|
|
12540
|
-
compounds:
|
|
12539
|
+
base: [Gh, "appearance-none pe-10"],
|
|
12540
|
+
variants: { size: Bh },
|
|
12541
|
+
compounds: Ih,
|
|
12541
12542
|
defaults: {
|
|
12542
12543
|
size: "lg",
|
|
12543
12544
|
radius: "md"
|
|
@@ -12545,23 +12546,23 @@ var wy = Y({ definition: {
|
|
|
12545
12546
|
},
|
|
12546
12547
|
nativeIcon: { base: "pointer-events-none absolute right-3 top-1/2 size-icon -translate-y-1/2 fill-current text-icon" }
|
|
12547
12548
|
}
|
|
12548
|
-
} }),
|
|
12549
|
+
} }), Ey = "[data-ui-select-option], [data-ui-select-option-create]", Dy = "template[data-ui-select-option-selected-template]", Oy = /* @__PURE__ */ new WeakSet(), ky = (e, t) => e.composedPath().some((e) => e instanceof Element && e.matches(t)), Ay = (e) => {
|
|
12549
12550
|
if (!(e instanceof Element)) {
|
|
12550
|
-
e.childNodes.forEach((e) =>
|
|
12551
|
+
e.childNodes.forEach((e) => Ay(e));
|
|
12551
12552
|
return;
|
|
12552
12553
|
}
|
|
12553
12554
|
Array.from(e.attributes).forEach((t) => {
|
|
12554
12555
|
let n = t.name;
|
|
12555
12556
|
(n === "id" || n === "role" || n === "tabindex" || n.startsWith("aria-selected") || n.startsWith("aria-disabled") || n.startsWith("data-ui-select-option") || n.startsWith("data-selected") || n.startsWith("data-highlighted") || n.startsWith("data-disabled") || n.startsWith("x-") || n.startsWith("@") || n.startsWith(":") || n.startsWith("on")) && e.removeAttribute(n);
|
|
12556
|
-
}), e.childNodes.forEach((e) =>
|
|
12557
|
-
},
|
|
12557
|
+
}), e.childNodes.forEach((e) => Ay(e)), e.setAttribute("x-ignore", "true");
|
|
12558
|
+
}, jy = (e) => {
|
|
12558
12559
|
let t = document.createDocumentFragment();
|
|
12559
12560
|
return Array.from(e).forEach((e) => {
|
|
12560
|
-
if (e instanceof HTMLTemplateElement && e.matches(
|
|
12561
|
+
if (e instanceof HTMLTemplateElement && e.matches(Dy)) return;
|
|
12561
12562
|
let n = e.cloneNode(!0);
|
|
12562
|
-
|
|
12563
|
+
Ay(n), t.append(n);
|
|
12563
12564
|
}), t;
|
|
12564
|
-
},
|
|
12565
|
+
}, My = () => ({
|
|
12565
12566
|
search: "",
|
|
12566
12567
|
selectedValues: [],
|
|
12567
12568
|
selectedLabels: [],
|
|
@@ -12581,7 +12582,7 @@ var wy = Y({ definition: {
|
|
|
12581
12582
|
init() {
|
|
12582
12583
|
this.props = U({
|
|
12583
12584
|
el: this.$el,
|
|
12584
|
-
schema:
|
|
12585
|
+
schema: wy,
|
|
12585
12586
|
onChange: (e, t) => this.applyProps(t.map((e) => e.key))
|
|
12586
12587
|
}), this.buttonId = this.$id("select-button"), this.inputId = this.$id("select-input"), this.listboxId = this.$id("select-listbox"), this.machine = Z.createMachine(Z.createVisibilityMachine({
|
|
12587
12588
|
enter: "enterPopover",
|
|
@@ -12632,7 +12633,7 @@ var wy = Y({ definition: {
|
|
|
12632
12633
|
},
|
|
12633
12634
|
get root() {
|
|
12634
12635
|
return Z.mergeBindings({ inputs: [X({
|
|
12635
|
-
part:
|
|
12636
|
+
part: Ty.parts.root,
|
|
12636
12637
|
props: this.props,
|
|
12637
12638
|
className: this.props.class
|
|
12638
12639
|
}), {
|
|
@@ -12673,7 +12674,7 @@ var wy = Y({ definition: {
|
|
|
12673
12674
|
return this.$el.querySelector("[data-ui-select-hidden-inputs]");
|
|
12674
12675
|
},
|
|
12675
12676
|
options() {
|
|
12676
|
-
let e = Z.normalizeOptionText(this.search), t = Array.from(this.$el.querySelectorAll(
|
|
12677
|
+
let e = Z.normalizeOptionText(this.search), t = Array.from(this.$el.querySelectorAll(Ey)).map((t, n) => {
|
|
12677
12678
|
let r = this.resolveOptionLabel(t), i = this.optionValue(t, r), a = this.resolveSelectedLabel(t, r), o = Z.asBool({ value: t.dataset.disabled }), s = this.selectedValues.includes(i), c = t.hasAttribute("data-ui-select-option-create"), l = !this.props.filter || e === "" || Z.normalizeOptionText(`${r} ${t.dataset.suffix ?? ""}`).includes(e), u = e !== "" && Z.normalizeOptionText(r) === e, d = Number(t.dataset.minLength ?? "0"), f = c ? e.length >= d && !u : l;
|
|
12678
12679
|
return {
|
|
12679
12680
|
el: t,
|
|
@@ -12908,7 +12909,7 @@ var wy = Y({ definition: {
|
|
|
12908
12909
|
syncControl() {
|
|
12909
12910
|
let e = this.control();
|
|
12910
12911
|
e.setAttribute("class", X({
|
|
12911
|
-
part:
|
|
12912
|
+
part: Ty.parts.control,
|
|
12912
12913
|
props: {
|
|
12913
12914
|
...this.props,
|
|
12914
12915
|
mode: this.controlLayoutMode(),
|
|
@@ -12952,7 +12953,7 @@ var wy = Y({ definition: {
|
|
|
12952
12953
|
e.id ||= this.inputId;
|
|
12953
12954
|
let t = this.selectedSummary();
|
|
12954
12955
|
e.className = X({
|
|
12955
|
-
part:
|
|
12956
|
+
part: Ty.parts.input,
|
|
12956
12957
|
className: this.props.inputClass
|
|
12957
12958
|
}), this.isPillbox() ? (e.value = this.search, e.placeholder = this.hasSelection() ? "" : this.props.placeholder) : (e.value = this.isOpen && this.inputSearching ? this.search : t, e.placeholder = this.props.placeholder), e.setAttribute("role", "combobox"), e.setAttribute("autocomplete", "off"), e.setAttribute("aria-autocomplete", "list"), e.setAttribute("aria-expanded", this.isOpen ? "true" : "false"), e.setAttribute("aria-controls", this.listboxId), Z.syncNativeControl({
|
|
12958
12959
|
input: e,
|
|
@@ -12976,7 +12977,7 @@ var wy = Y({ definition: {
|
|
|
12976
12977
|
syncListbox() {
|
|
12977
12978
|
let e = this.popoverEl(), t = this.listbox();
|
|
12978
12979
|
e.id = `${this.listboxId}-popover`, e.setAttribute("class", X({
|
|
12979
|
-
part:
|
|
12980
|
+
part: Ty.parts.popover,
|
|
12980
12981
|
props: this.props,
|
|
12981
12982
|
className: this.props.listboxClass
|
|
12982
12983
|
})), e.setAttribute("popover", "manual"), e.dataset.state = this.isOpen ? "open" : "closed", e.hidden = !this.isOpen, t.id = this.listboxId, t.setAttribute("role", "listbox"), t.setAttribute("tabindex", "-1"), t.setAttribute("aria-labelledby", this.trigger().id), this.props.multiple ? t.setAttribute("aria-multiselectable", "true") : t.removeAttribute("aria-multiselectable");
|
|
@@ -13035,7 +13036,7 @@ var wy = Y({ definition: {
|
|
|
13035
13036
|
});
|
|
13036
13037
|
if (i === this.renderedChipsKey || (this.renderedChipsKey = i, e.replaceChildren(), e.hidden)) return;
|
|
13037
13038
|
let a = X({
|
|
13038
|
-
part:
|
|
13039
|
+
part: ly.parts.root,
|
|
13039
13040
|
props: {
|
|
13040
13041
|
variant: this.props.chipVariant,
|
|
13041
13042
|
color: this.props.chipColor,
|
|
@@ -13043,14 +13044,14 @@ var wy = Y({ definition: {
|
|
|
13043
13044
|
radius: "sm"
|
|
13044
13045
|
},
|
|
13045
13046
|
className: X({
|
|
13046
|
-
part:
|
|
13047
|
+
part: Ty.parts.chip,
|
|
13047
13048
|
props: {},
|
|
13048
13049
|
className: this.props.chipClass
|
|
13049
13050
|
})
|
|
13050
|
-
}), o = X({ part:
|
|
13051
|
-
part:
|
|
13051
|
+
}), o = X({ part: Ty.parts.chipLabel }), s = X({
|
|
13052
|
+
part: ly.parts.close,
|
|
13052
13053
|
props: { size: "sm" },
|
|
13053
|
-
className: X({ part:
|
|
13054
|
+
className: X({ part: Ty.parts.chipRemove })
|
|
13054
13055
|
});
|
|
13055
13056
|
r.forEach((t) => {
|
|
13056
13057
|
let n = document.createElement("span");
|
|
@@ -13123,7 +13124,7 @@ var wy = Y({ definition: {
|
|
|
13123
13124
|
target: t,
|
|
13124
13125
|
event: "click",
|
|
13125
13126
|
handler: (e) => {
|
|
13126
|
-
|
|
13127
|
+
Oy.add(e);
|
|
13127
13128
|
let n = e.target;
|
|
13128
13129
|
if (n instanceof Element && n.closest("[data-ui-select-clear], [data-ui-select-button-clear]")) {
|
|
13129
13130
|
this.clear(e);
|
|
@@ -13164,8 +13165,8 @@ var wy = Y({ definition: {
|
|
|
13164
13165
|
return;
|
|
13165
13166
|
}
|
|
13166
13167
|
if (n.closest("[data-ui-select-chip-remove]")) return;
|
|
13167
|
-
if (
|
|
13168
|
-
if (
|
|
13168
|
+
if (ky(e, "[data-ui-select-trigger]")) {
|
|
13169
|
+
if (Oy.has(e)) return;
|
|
13169
13170
|
if (this.trigger().focus({ preventScroll: !0 }), t instanceof HTMLInputElement) {
|
|
13170
13171
|
this.isOpen || this.openSelect(e);
|
|
13171
13172
|
return;
|
|
@@ -13220,7 +13221,7 @@ var wy = Y({ definition: {
|
|
|
13220
13221
|
event: "pointerdown",
|
|
13221
13222
|
handler: (e) => {
|
|
13222
13223
|
let t = e.target;
|
|
13223
|
-
t instanceof Element && t.closest(
|
|
13224
|
+
t instanceof Element && t.closest(Ey) && e.preventDefault();
|
|
13224
13225
|
},
|
|
13225
13226
|
cleanup: this.listeners
|
|
13226
13227
|
}), Z.addListener({
|
|
@@ -13233,7 +13234,7 @@ var wy = Y({ definition: {
|
|
|
13233
13234
|
this.setSearch("");
|
|
13234
13235
|
return;
|
|
13235
13236
|
}
|
|
13236
|
-
let n = t.closest(
|
|
13237
|
+
let n = t.closest(Ey), r = n ? this.options().find((e) => e.el === n) : void 0;
|
|
13237
13238
|
r && this.selectOption(r, e);
|
|
13238
13239
|
},
|
|
13239
13240
|
cleanup: this.listeners
|
|
@@ -13243,7 +13244,7 @@ var wy = Y({ definition: {
|
|
|
13243
13244
|
handler: (e) => {
|
|
13244
13245
|
let t = e.target;
|
|
13245
13246
|
if (!(t instanceof Element)) return;
|
|
13246
|
-
let n = t.closest(
|
|
13247
|
+
let n = t.closest(Ey), r = n ? this.options().find((e) => e.el === n) : void 0;
|
|
13247
13248
|
r && !r.disabled && this.setActive(r);
|
|
13248
13249
|
},
|
|
13249
13250
|
cleanup: this.listeners
|
|
@@ -13270,10 +13271,10 @@ var wy = Y({ definition: {
|
|
|
13270
13271
|
return e ? this.options().find((t) => t.value === e) ?? null : null;
|
|
13271
13272
|
},
|
|
13272
13273
|
selectedContent(e) {
|
|
13273
|
-
let t = e.el.querySelector(
|
|
13274
|
-
if (t) return
|
|
13274
|
+
let t = e.el.querySelector(Dy);
|
|
13275
|
+
if (t) return jy(t.content.childNodes);
|
|
13275
13276
|
let n = e.el.querySelector("[data-ui-select-option-selected-content]") ?? e.el.querySelector("[data-ui-select-option-label]");
|
|
13276
|
-
if (n) return
|
|
13277
|
+
if (n) return jy(n.childNodes);
|
|
13277
13278
|
let r = document.createDocumentFragment();
|
|
13278
13279
|
return r.append(document.createTextNode(e.selectedLabel)), r;
|
|
13279
13280
|
},
|
|
@@ -13291,24 +13292,24 @@ var wy = Y({ definition: {
|
|
|
13291
13292
|
optionValue(e, t) {
|
|
13292
13293
|
return e.dataset.value || t;
|
|
13293
13294
|
}
|
|
13294
|
-
}),
|
|
13295
|
-
e.data("UiSelect", () =>
|
|
13296
|
-
},
|
|
13295
|
+
}), Ny = (e) => {
|
|
13296
|
+
e.data("UiSelect", () => My());
|
|
13297
|
+
}, Py = ["left", "right"], Fy = [
|
|
13297
13298
|
"none",
|
|
13298
13299
|
"mobile",
|
|
13299
13300
|
"desktop",
|
|
13300
13301
|
"both"
|
|
13301
|
-
],
|
|
13302
|
+
], Iy = [
|
|
13302
13303
|
"toggle",
|
|
13303
13304
|
"open",
|
|
13304
13305
|
"close",
|
|
13305
13306
|
"stash",
|
|
13306
13307
|
"expand"
|
|
13307
|
-
],
|
|
13308
|
+
], Ly = ["a", "button"], Ry = ["ghost", "surface"], zy = ["neutral", "accent"], By = {
|
|
13308
13309
|
id: W.default("ui-sidebar"),
|
|
13309
|
-
side: q(
|
|
13310
|
+
side: q(Py, "left"),
|
|
13310
13311
|
sticky: K.default(!0),
|
|
13311
|
-
collapse: q(
|
|
13312
|
+
collapse: q(Fy, "mobile"),
|
|
13312
13313
|
open: K,
|
|
13313
13314
|
stashed: K,
|
|
13314
13315
|
persist: K.default(!0),
|
|
@@ -13321,14 +13322,14 @@ var wy = Y({ definition: {
|
|
|
13321
13322
|
resizable: K,
|
|
13322
13323
|
class: W
|
|
13323
13324
|
};
|
|
13324
|
-
q(
|
|
13325
|
-
var
|
|
13325
|
+
q(Ly, "a"), q(Ry, "ghost"), q(zy, "neutral"), K.default(!0);
|
|
13326
|
+
var Vy = {
|
|
13326
13327
|
target: W,
|
|
13327
13328
|
icon: W.default("side_panel"),
|
|
13328
13329
|
label: W.default("Toggle sidebar"),
|
|
13329
|
-
action: q(
|
|
13330
|
+
action: q(Iy, "toggle"),
|
|
13330
13331
|
class: W
|
|
13331
|
-
},
|
|
13332
|
+
}, Hy = Y({ definition: {
|
|
13332
13333
|
component: "ui.sidebar",
|
|
13333
13334
|
parts: {
|
|
13334
13335
|
root: {
|
|
@@ -13367,7 +13368,7 @@ var By = {
|
|
|
13367
13368
|
"group/sidebar-item flex h-control-md w-full min-w-0 select-none items-center gap-2 rounded-3 px-2",
|
|
13368
13369
|
"border border-transparent text-left text-sm font-medium text-foreground outline-none",
|
|
13369
13370
|
"cursor-default",
|
|
13370
|
-
|
|
13371
|
+
qh,
|
|
13371
13372
|
"focus-visible:ring-2 focus-visible:ring-focus focus-visible:ring-offset-2 focus-visible:ring-offset-app",
|
|
13372
13373
|
"data-disabled:pointer-events-none data-disabled:opacity-50"
|
|
13373
13374
|
],
|
|
@@ -13451,35 +13452,35 @@ var By = {
|
|
|
13451
13452
|
defaults: { side: "left" }
|
|
13452
13453
|
}
|
|
13453
13454
|
}
|
|
13454
|
-
} }),
|
|
13455
|
-
target:
|
|
13456
|
-
action:
|
|
13457
|
-
class:
|
|
13458
|
-
},
|
|
13459
|
-
target:
|
|
13460
|
-
action:
|
|
13461
|
-
class:
|
|
13462
|
-
},
|
|
13455
|
+
} }), Uy = {
|
|
13456
|
+
target: Vy.target,
|
|
13457
|
+
action: Vy.action,
|
|
13458
|
+
class: Vy.class
|
|
13459
|
+
}, Wy = {
|
|
13460
|
+
target: Vy.target,
|
|
13461
|
+
action: Vy.action,
|
|
13462
|
+
class: Vy.class
|
|
13463
|
+
}, Gy = /* @__PURE__ */ new Set(), Ky = {
|
|
13463
13464
|
sm: 640,
|
|
13464
13465
|
md: 768,
|
|
13465
13466
|
lg: 1024,
|
|
13466
13467
|
xl: 1280,
|
|
13467
13468
|
"2xl": 1536
|
|
13468
|
-
},
|
|
13469
|
-
let t =
|
|
13470
|
-
return t ? `(min-width: ${t}px)` : /^\d+$/.test(e) ? `(min-width: ${e}px)` : /^\d+(\.\d+)?(px|rem|em)$/.test(e) ? `(min-width: ${e})` : `(min-width: ${
|
|
13471
|
-
},
|
|
13472
|
-
if (
|
|
13473
|
-
let n =
|
|
13474
|
-
|
|
13475
|
-
|
|
13469
|
+
}, qy = (e, t) => !t?.id || t.id === e.id, Jy = (e) => {
|
|
13470
|
+
let t = Ky[e];
|
|
13471
|
+
return t ? `(min-width: ${t}px)` : /^\d+$/.test(e) ? `(min-width: ${e}px)` : /^\d+(\.\d+)?(px|rem|em)$/.test(e) ? `(min-width: ${e})` : `(min-width: ${Ky.lg}px)`;
|
|
13472
|
+
}, Yy = (e) => e instanceof CustomEvent && typeof e.detail == "object" && e.detail !== null ? e.detail : {}, Xy = (e) => e.target instanceof Element && e.target.hasAttribute("data-ui-sidebar"), Zy = (e, t) => {
|
|
13473
|
+
if (Xy(e)) return;
|
|
13474
|
+
let n = Yy(e);
|
|
13475
|
+
Gy.forEach((e) => {
|
|
13476
|
+
qy(e, n) && e.perform(n.action ?? t, n.trigger ?? null);
|
|
13476
13477
|
});
|
|
13477
|
-
},
|
|
13478
|
+
}, Qy = (() => {
|
|
13478
13479
|
let e = !1;
|
|
13479
13480
|
return () => {
|
|
13480
|
-
e || typeof document > "u" || (document.addEventListener("ui:sidebar-open", (e) =>
|
|
13481
|
+
e || typeof document > "u" || (document.addEventListener("ui:sidebar-open", (e) => Zy(e, "open")), document.addEventListener("ui:sidebar-close", (e) => Zy(e, "close")), document.addEventListener("ui:sidebar-toggle", (e) => Zy(e, "toggle")), e = !0);
|
|
13481
13482
|
};
|
|
13482
|
-
})(),
|
|
13483
|
+
})(), $y = () => ({
|
|
13483
13484
|
props: null,
|
|
13484
13485
|
machine: null,
|
|
13485
13486
|
sidebarExitFreezeCleanup: null,
|
|
@@ -13500,9 +13501,9 @@ var By = {
|
|
|
13500
13501
|
return this.$el.id || this.props.id || "ui-sidebar";
|
|
13501
13502
|
},
|
|
13502
13503
|
init() {
|
|
13503
|
-
|
|
13504
|
+
Qy(), this.props = U({
|
|
13504
13505
|
el: this.$el,
|
|
13505
|
-
schema:
|
|
13506
|
+
schema: By,
|
|
13506
13507
|
onChange: (e, t) => this.applyProps(t.map((e) => e.key))
|
|
13507
13508
|
});
|
|
13508
13509
|
let e = this.storedStashed();
|
|
@@ -13762,7 +13763,7 @@ var By = {
|
|
|
13762
13763
|
}), this.backdropMotion = Z.motion.createPresenceLifecycle({
|
|
13763
13764
|
element: () => this.backdropEl(),
|
|
13764
13765
|
preset: "fade"
|
|
13765
|
-
}),
|
|
13766
|
+
}), Gy.add(this), Z.addListener({
|
|
13766
13767
|
target: document,
|
|
13767
13768
|
event: "keydown",
|
|
13768
13769
|
handler: (e) => {
|
|
@@ -13818,7 +13819,7 @@ var By = {
|
|
|
13818
13819
|
})), this.setupGroups(), this.syncAll();
|
|
13819
13820
|
},
|
|
13820
13821
|
destroy() {
|
|
13821
|
-
this.props.disconnect(), this.machine.stop(), this.drawerMotion?.destroy(), this.backdropMotion?.destroy(), this.clearSidebarExitFreeze(),
|
|
13822
|
+
this.props.disconnect(), this.machine.stop(), this.drawerMotion?.destroy(), this.backdropMotion?.destroy(), this.clearSidebarExitFreeze(), Gy.delete(this), this.cleanup.forEach((e) => e()), this.cleanup = [], this.hasScrollLock &&= (vh(), !1);
|
|
13822
13823
|
},
|
|
13823
13824
|
get mobileOpen() {
|
|
13824
13825
|
return this.machine?.hasTag("mobileOpen") ?? !1;
|
|
@@ -13840,7 +13841,7 @@ var By = {
|
|
|
13840
13841
|
},
|
|
13841
13842
|
get root() {
|
|
13842
13843
|
return Z.mergeBindings({ inputs: [Z.resolveStyle({
|
|
13843
|
-
part:
|
|
13844
|
+
part: Hy.parts.root,
|
|
13844
13845
|
props: this.props,
|
|
13845
13846
|
className: this.props.class
|
|
13846
13847
|
}), {
|
|
@@ -13853,7 +13854,7 @@ var By = {
|
|
|
13853
13854
|
return this.mediaQuery?.matches ?? !1;
|
|
13854
13855
|
},
|
|
13855
13856
|
setupMediaQuery() {
|
|
13856
|
-
this.mediaQueryCleanup?.(), this.mediaQuery = window.matchMedia(
|
|
13857
|
+
this.mediaQueryCleanup?.(), this.mediaQuery = window.matchMedia(Jy(this.props.breakpoint)), this.mediaQueryCleanup = Z.addListener({
|
|
13857
13858
|
target: this.mediaQuery,
|
|
13858
13859
|
event: "change",
|
|
13859
13860
|
handler: () => this.handleBreakpointChange(),
|
|
@@ -13981,7 +13982,7 @@ var By = {
|
|
|
13981
13982
|
attr: "data-resize-disabled",
|
|
13982
13983
|
present: this.props.resizable && (!t || this.desktopStashed || this.desktopDrawerOpen),
|
|
13983
13984
|
value: "true"
|
|
13984
|
-
}), e ? (this.$el.removeAttribute("inert"), this.$el.removeAttribute("aria-hidden")) : (this.$el.setAttribute("inert", ""), this.$el.setAttribute("aria-hidden", "true")), o && !this.hasScrollLock ? (
|
|
13985
|
+
}), e ? (this.$el.removeAttribute("inert"), this.$el.removeAttribute("aria-hidden")) : (this.$el.setAttribute("inert", ""), this.$el.setAttribute("aria-hidden", "true")), o && !this.hasScrollLock ? (_h(), this.hasScrollLock = !0) : !o && this.hasScrollLock && (vh(), this.hasScrollLock = !1), this.renderedExpanded = e, this.renderedDrawerOpen = this.hasOpenDrawer();
|
|
13985
13986
|
},
|
|
13986
13987
|
syncBackdrop() {
|
|
13987
13988
|
let e = this.backdropEl();
|
|
@@ -14156,12 +14157,12 @@ var By = {
|
|
|
14156
14157
|
window.localStorage.setItem(this.storageKey(), this.desktopStashed ? "true" : "false");
|
|
14157
14158
|
} catch {}
|
|
14158
14159
|
}
|
|
14159
|
-
}),
|
|
14160
|
+
}), eb = () => ({
|
|
14160
14161
|
props: null,
|
|
14161
14162
|
init() {
|
|
14162
14163
|
this.props = U({
|
|
14163
14164
|
el: this.$el,
|
|
14164
|
-
schema:
|
|
14165
|
+
schema: Uy
|
|
14165
14166
|
});
|
|
14166
14167
|
},
|
|
14167
14168
|
destroy() {
|
|
@@ -14169,7 +14170,7 @@ var By = {
|
|
|
14169
14170
|
},
|
|
14170
14171
|
get root() {
|
|
14171
14172
|
return Z.mergeBindings({ inputs: [Z.resolveStyle({
|
|
14172
|
-
part:
|
|
14173
|
+
part: Hy.parts.toggle,
|
|
14173
14174
|
props: {},
|
|
14174
14175
|
className: this.props.class
|
|
14175
14176
|
}), {
|
|
@@ -14192,12 +14193,12 @@ var By = {
|
|
|
14192
14193
|
}
|
|
14193
14194
|
}));
|
|
14194
14195
|
}
|
|
14195
|
-
}),
|
|
14196
|
+
}), tb = () => ({
|
|
14196
14197
|
props: null,
|
|
14197
14198
|
init() {
|
|
14198
14199
|
this.props = U({
|
|
14199
14200
|
el: this.$el,
|
|
14200
|
-
schema:
|
|
14201
|
+
schema: Wy
|
|
14201
14202
|
});
|
|
14202
14203
|
},
|
|
14203
14204
|
destroy() {
|
|
@@ -14205,7 +14206,7 @@ var By = {
|
|
|
14205
14206
|
},
|
|
14206
14207
|
get root() {
|
|
14207
14208
|
return Z.mergeBindings({ inputs: [Z.resolveStyle({
|
|
14208
|
-
part:
|
|
14209
|
+
part: Hy.parts.edge,
|
|
14209
14210
|
props: { side: this.$el.dataset.side || "left" },
|
|
14210
14211
|
className: this.props.class
|
|
14211
14212
|
}), {
|
|
@@ -14231,9 +14232,9 @@ var By = {
|
|
|
14231
14232
|
}
|
|
14232
14233
|
}));
|
|
14233
14234
|
}
|
|
14234
|
-
}),
|
|
14235
|
-
e.data("UiSidebar", () =>
|
|
14236
|
-
},
|
|
14235
|
+
}), nb = (e) => {
|
|
14236
|
+
e.data("UiSidebar", () => $y()), e.data("UiSidebarEdge", () => tb()), e.data("UiSidebarToggle", () => eb());
|
|
14237
|
+
}, rb = yh, ib = Oh, ab = Eh, ob = {
|
|
14237
14238
|
name: W,
|
|
14238
14239
|
value: W.default("0"),
|
|
14239
14240
|
defaultValue: W,
|
|
@@ -14243,9 +14244,9 @@ var By = {
|
|
|
14243
14244
|
bigStep: G.default(10),
|
|
14244
14245
|
minStepsBetween: G.default(0),
|
|
14245
14246
|
range: K,
|
|
14246
|
-
orientation: q(
|
|
14247
|
-
size: q(
|
|
14248
|
-
variant: q(
|
|
14247
|
+
orientation: q(ab, "horizontal"),
|
|
14248
|
+
size: q(rb, "md"),
|
|
14249
|
+
variant: q(ib, "default"),
|
|
14249
14250
|
disabled: K,
|
|
14250
14251
|
required: K,
|
|
14251
14252
|
invalid: K,
|
|
@@ -14273,11 +14274,11 @@ var By = {
|
|
|
14273
14274
|
G.default(0);
|
|
14274
14275
|
//#endregion
|
|
14275
14276
|
//#region packages/client/src/components/slider/index.ts
|
|
14276
|
-
var
|
|
14277
|
+
var sb = (e, t, n) => {
|
|
14277
14278
|
if (!Number.isFinite(n) || n <= 0) return e;
|
|
14278
14279
|
let r = Math.round((e - t) / n) * n + t, i = Math.max(0, `${n}`.split(".")[1]?.length ?? 0);
|
|
14279
14280
|
return Number(r.toFixed(i));
|
|
14280
|
-
}, Q = (e, t, n) => Math.min(n, Math.max(t, e)),
|
|
14281
|
+
}, Q = (e, t, n) => Math.min(n, Math.max(t, e)), cb = (e) => {
|
|
14281
14282
|
let t = Math.min(e.min, e.max), n = Math.max(e.min, e.max), r = e.step > 0 ? e.step : 1;
|
|
14282
14283
|
return {
|
|
14283
14284
|
min: t,
|
|
@@ -14285,28 +14286,28 @@ var ob = (e, t, n) => {
|
|
|
14285
14286
|
step: r,
|
|
14286
14287
|
bigStep: e.bigStep > 0 ? e.bigStep : r * 10
|
|
14287
14288
|
};
|
|
14288
|
-
},
|
|
14289
|
+
}, lb = (e, t) => {
|
|
14289
14290
|
let n = Number(e);
|
|
14290
14291
|
return Number.isFinite(n) ? n : t;
|
|
14291
|
-
},
|
|
14292
|
-
let { min: n, max: r, step: i } =
|
|
14292
|
+
}, ub = (e, t) => {
|
|
14293
|
+
let { min: n, max: r, step: i } = cb(e), a = (e.value || e.defaultValue || "").split(",").map((e) => e.trim()), o = t.lowerInput ?? t.singleInput, s = t.upperInput, c = (e.range, o?.value || a[0] || `${n}`), l = e.range ? s?.value || a[1] || `${r}` : c, u = sb(Q(lb(c, n), n, r), n, i), d = sb(Q(lb(l, r), n, r), n, i);
|
|
14293
14294
|
if (!e.range) return {
|
|
14294
14295
|
lower: u,
|
|
14295
14296
|
upper: u
|
|
14296
14297
|
};
|
|
14297
14298
|
u > d && ([u, d] = [d, u]);
|
|
14298
14299
|
let f = Math.max(0, e.minStepsBetween) * i;
|
|
14299
|
-
return d - u < f && (d = Q(
|
|
14300
|
+
return d - u < f && (d = Q(sb(u + f, n, i), n, r), d - u < f && (u = Q(sb(d - f, n, i), n, r))), {
|
|
14300
14301
|
lower: u,
|
|
14301
14302
|
upper: d
|
|
14302
14303
|
};
|
|
14303
|
-
},
|
|
14304
|
+
}, db = (e, t, n) => n <= t ? 0 : Q((e - t) / (n - t) * 100, 0, 100), fb = (e, t) => {
|
|
14304
14305
|
let n = (t) => e.format === "percent" ? `${Math.round(t)}%` : String(t);
|
|
14305
14306
|
return e.range ? `${n(t.lower)} - ${n(t.upper)}` : n(t.lower);
|
|
14306
|
-
},
|
|
14307
|
-
let { min: r, max: i, step: a } =
|
|
14308
|
-
return
|
|
14309
|
-
},
|
|
14307
|
+
}, pb = (e, t, n) => {
|
|
14308
|
+
let { min: r, max: i, step: a } = cb(n), o = e.getBoundingClientRect();
|
|
14309
|
+
return sb(Q(r + Q(n.orientation === "vertical" ? 1 - (t.clientY - o.top) / Math.max(o.height, 1) : (t.clientX - o.left) / Math.max(o.width, 1), 0, 1) * (i - r), r, i), r, a);
|
|
14310
|
+
}, mb = (e, t) => Math.abs(e - t.lower) <= Math.abs(e - t.upper) ? "lower" : "upper", hb = (e, t, n, r) => {
|
|
14310
14311
|
e && (Z.setPresence({
|
|
14311
14312
|
el: e,
|
|
14312
14313
|
attr: "data-focus",
|
|
@@ -14320,7 +14321,7 @@ var ob = (e, t, n) => {
|
|
|
14320
14321
|
attr: "data-invalid",
|
|
14321
14322
|
present: r
|
|
14322
14323
|
}));
|
|
14323
|
-
},
|
|
14324
|
+
}, gb = ({ input: e, props: t, value: n, min: r, max: i, label: a, valueText: o, nativeRequired: s }) => {
|
|
14324
14325
|
e && (e.min = String(r), e.max = String(i), e.step = String(t.step > 0 ? t.step : 1), Z.syncNativeControl({
|
|
14325
14326
|
input: e,
|
|
14326
14327
|
state: {
|
|
@@ -14332,15 +14333,15 @@ var ob = (e, t, n) => {
|
|
|
14332
14333
|
invalid: t.invalid
|
|
14333
14334
|
}
|
|
14334
14335
|
}), e.setAttribute("aria-valuemin", String(r)), e.setAttribute("aria-valuemax", String(i)), e.setAttribute("aria-valuenow", String(n)), o ? e.setAttribute("aria-valuetext", o) : e.removeAttribute("aria-valuetext"), a && e.setAttribute("aria-label", a), t.orientation === "vertical" ? e.setAttribute("aria-orientation", "vertical") : e.removeAttribute("aria-orientation"));
|
|
14335
|
-
},
|
|
14336
|
-
let { min: r, max: i } =
|
|
14336
|
+
}, _b = (e, t, n) => {
|
|
14337
|
+
let { min: r, max: i } = cb(e), a = db(n.lower, r, i), o = db(n.upper, r, i), s = e.range ? a : 0, c = e.range ? o : a;
|
|
14337
14338
|
t.root.style.setProperty("--ui-slider-lower-percent", `${a}%`), t.root.style.setProperty("--ui-slider-upper-percent", `${o}%`), e.orientation === "vertical" ? (t.range && (t.range.style.bottom = `${s}%`, t.range.style.height = `${Math.max(0, c - s)}%`, t.range.style.left = "", t.range.style.width = ""), t.singleThumb && (t.singleThumb.style.bottom = `${a}%`), t.lowerThumb && (t.lowerThumb.style.bottom = `${a}%`), t.upperThumb && (t.upperThumb.style.bottom = `${o}%`)) : (t.range && (t.range.style.left = `${s}%`, t.range.style.width = `${Math.max(0, c - s)}%`, t.range.style.bottom = "", t.range.style.height = ""), t.singleThumb && (t.singleThumb.style.left = `${a}%`), t.lowerThumb && (t.lowerThumb.style.left = `${a}%`), t.upperThumb && (t.upperThumb.style.left = `${o}%`)), t.ticks.forEach((t) => {
|
|
14338
|
-
let n =
|
|
14339
|
+
let n = db(lb(t.dataset.value ?? "", r), r, i);
|
|
14339
14340
|
e.orientation === "vertical" ? (t.style.bottom = `${n}%`, t.style.left = "") : (t.style.left = `${n}%`, t.style.bottom = "");
|
|
14340
14341
|
});
|
|
14341
|
-
},
|
|
14342
|
-
let { min: i, max: a, step: o } =
|
|
14343
|
-
e.range ? (c > l && ([c, l] = [l, c]), l - c < s && (r?.dataset.thumb === "lower" ? c = Q(
|
|
14342
|
+
}, vb = (e, t, n, r) => {
|
|
14343
|
+
let { min: i, max: a, step: o } = cb(e), s = e.range ? Math.max(0, e.minStepsBetween) * o : 0, c = sb(Q(n.lower, i, a), i, o), l = sb(Q(n.upper, i, a), i, o);
|
|
14344
|
+
e.range ? (c > l && ([c, l] = [l, c]), l - c < s && (r?.dataset.thumb === "lower" ? c = Q(sb(l - s, i, o), i, a) : l = Q(sb(c + s, i, o), i, a))) : l = c, gb({
|
|
14344
14345
|
input: t.singleInput,
|
|
14345
14346
|
props: e,
|
|
14346
14347
|
value: c,
|
|
@@ -14349,7 +14350,7 @@ var ob = (e, t, n) => {
|
|
|
14349
14350
|
label: e.label,
|
|
14350
14351
|
valueText: e.valueText,
|
|
14351
14352
|
nativeRequired: e.required
|
|
14352
|
-
}),
|
|
14353
|
+
}), gb({
|
|
14353
14354
|
input: t.lowerInput,
|
|
14354
14355
|
props: e,
|
|
14355
14356
|
value: c,
|
|
@@ -14358,7 +14359,7 @@ var ob = (e, t, n) => {
|
|
|
14358
14359
|
label: e.lowerLabel,
|
|
14359
14360
|
valueText: e.lowerValueText,
|
|
14360
14361
|
nativeRequired: !1
|
|
14361
|
-
}),
|
|
14362
|
+
}), gb({
|
|
14362
14363
|
input: t.upperInput,
|
|
14363
14364
|
props: e,
|
|
14364
14365
|
value: l,
|
|
@@ -14372,7 +14373,7 @@ var ob = (e, t, n) => {
|
|
|
14372
14373
|
lower: c,
|
|
14373
14374
|
upper: l
|
|
14374
14375
|
};
|
|
14375
|
-
return
|
|
14376
|
+
return _b(e, t, u), t.value && (t.value.textContent = fb(e, u)), Z.syncControlPresence({
|
|
14376
14377
|
el: t.root,
|
|
14377
14378
|
state: e
|
|
14378
14379
|
}), t.track && Z.syncControlPresence({
|
|
@@ -14387,8 +14388,8 @@ var ob = (e, t, n) => {
|
|
|
14387
14388
|
disabled: e.disabled,
|
|
14388
14389
|
invalid: e.invalid
|
|
14389
14390
|
}
|
|
14390
|
-
}),
|
|
14391
|
-
},
|
|
14391
|
+
}), hb(t.singleThumb, t.singleInput === document.activeElement, e.disabled, e.invalid), hb(t.lowerThumb, t.lowerInput === document.activeElement, e.disabled, e.invalid), hb(t.upperThumb, t.upperInput === document.activeElement, e.disabled, e.invalid), u;
|
|
14392
|
+
}, yb = () => ({
|
|
14392
14393
|
props: null,
|
|
14393
14394
|
listeners: [],
|
|
14394
14395
|
hiddenInputsKey: "",
|
|
@@ -14396,7 +14397,7 @@ var ob = (e, t, n) => {
|
|
|
14396
14397
|
init() {
|
|
14397
14398
|
this.props = U({
|
|
14398
14399
|
el: this.$el,
|
|
14399
|
-
schema:
|
|
14400
|
+
schema: ob,
|
|
14400
14401
|
onChange: (e, t) => this.applyProps(t.map((e) => e.key))
|
|
14401
14402
|
});
|
|
14402
14403
|
let e = this.elements();
|
|
@@ -14488,7 +14489,7 @@ var ob = (e, t, n) => {
|
|
|
14488
14489
|
e.length === 1 && e[0] === "defaultValue" || this.sync();
|
|
14489
14490
|
},
|
|
14490
14491
|
sync() {
|
|
14491
|
-
let e = this.elements(), t =
|
|
14492
|
+
let e = this.elements(), t = vb(this.props, e, ub(this.props, e));
|
|
14492
14493
|
this.props.range && e.hiddenInputs ? this.hiddenInputsKey = Z.syncRepeatedHiddenInputs({
|
|
14493
14494
|
container: e.hiddenInputs,
|
|
14494
14495
|
currentKey: this.hiddenInputsKey,
|
|
@@ -14509,8 +14510,8 @@ var ob = (e, t, n) => {
|
|
|
14509
14510
|
}));
|
|
14510
14511
|
},
|
|
14511
14512
|
syncFromInput(e) {
|
|
14512
|
-
let t = e.target instanceof HTMLInputElement ? e.target : null, n = this.elements(), r =
|
|
14513
|
-
t?.dataset.thumb === "upper" ? r.upper =
|
|
14513
|
+
let t = e.target instanceof HTMLInputElement ? e.target : null, n = this.elements(), r = ub(this.props, n);
|
|
14514
|
+
t?.dataset.thumb === "upper" ? r.upper = lb(t.value, r.upper) : r.lower = lb(t?.value ?? "", r.lower), vb(this.props, n, r, t), this.sync();
|
|
14514
14515
|
},
|
|
14515
14516
|
commitFromInput(e) {
|
|
14516
14517
|
this.syncFromInput(e);
|
|
@@ -14522,31 +14523,31 @@ var ob = (e, t, n) => {
|
|
|
14522
14523
|
"PageDown",
|
|
14523
14524
|
"ArrowDown",
|
|
14524
14525
|
"ArrowLeft"
|
|
14525
|
-
].includes(e.key) ? -1 : 1, { bigStep: r } =
|
|
14526
|
-
t.value = String(
|
|
14526
|
+
].includes(e.key) ? -1 : 1, { bigStep: r } = cb(this.props);
|
|
14527
|
+
t.value = String(lb(t.value, this.props.min) + n * r), t.dispatchEvent(new Event("input", { bubbles: !0 })), t.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
14527
14528
|
},
|
|
14528
14529
|
handlePointerDown(e) {
|
|
14529
14530
|
if (this.props.disabled) return;
|
|
14530
|
-
let t = this.elements(), n =
|
|
14531
|
-
this.draggingThumb = this.props.range ?
|
|
14531
|
+
let t = this.elements(), n = pb(t.root, e, this.props), r = ub(this.props, t);
|
|
14532
|
+
this.draggingThumb = this.props.range ? mb(n, r) : "single", this.draggingThumb === "upper" ? r.upper = n : r.lower = n;
|
|
14532
14533
|
let i = this.draggingThumb === "upper" ? t.upperInput : this.props.range ? t.lowerInput : t.singleInput;
|
|
14533
|
-
i?.focus(),
|
|
14534
|
+
i?.focus(), vb(this.props, t, r, i), this.sync(), t.root.setPointerCapture?.(e.pointerId), e.preventDefault();
|
|
14534
14535
|
},
|
|
14535
14536
|
handlePointerMove(e) {
|
|
14536
14537
|
if (!this.draggingThumb || this.props.disabled) return;
|
|
14537
|
-
let t = this.elements(), n =
|
|
14538
|
+
let t = this.elements(), n = ub(this.props, t), r = pb(t.root, e, this.props);
|
|
14538
14539
|
this.draggingThumb === "upper" ? n.upper = r : n.lower = r;
|
|
14539
14540
|
let i = this.draggingThumb === "upper" ? t.upperInput : this.props.range ? t.lowerInput : t.singleInput;
|
|
14540
|
-
|
|
14541
|
+
vb(this.props, t, n, i), i?.dispatchEvent(new Event("input", { bubbles: !0 }));
|
|
14541
14542
|
},
|
|
14542
14543
|
handlePointerUp(e) {
|
|
14543
14544
|
if (!this.draggingThumb) return;
|
|
14544
14545
|
let t = this.elements();
|
|
14545
14546
|
(this.draggingThumb === "upper" ? t.upperInput : this.props.range ? t.lowerInput : t.singleInput)?.dispatchEvent(new Event("change", { bubbles: !0 })), t.root.releasePointerCapture?.(e.pointerId), this.draggingThumb = null;
|
|
14546
14547
|
}
|
|
14547
|
-
}),
|
|
14548
|
-
e.data("UiSlider", () =>
|
|
14549
|
-
},
|
|
14548
|
+
}), bb = (e) => {
|
|
14549
|
+
e.data("UiSlider", () => yb());
|
|
14550
|
+
}, xb = ["trailing", "leading"], Sb = yh, Cb = Oh, wb = {
|
|
14550
14551
|
value: W.default("on"),
|
|
14551
14552
|
name: W,
|
|
14552
14553
|
label: W,
|
|
@@ -14555,9 +14556,9 @@ var ob = (e, t, n) => {
|
|
|
14555
14556
|
disabled: K,
|
|
14556
14557
|
required: K,
|
|
14557
14558
|
invalid: K,
|
|
14558
|
-
placement: q(
|
|
14559
|
-
variant: q(
|
|
14560
|
-
size: q(
|
|
14559
|
+
placement: q(xb, "trailing"),
|
|
14560
|
+
variant: q(Cb, "default"),
|
|
14561
|
+
size: q(Sb, "md"),
|
|
14561
14562
|
inputClass: W,
|
|
14562
14563
|
trackClass: W,
|
|
14563
14564
|
thumbClass: W,
|
|
@@ -14566,10 +14567,10 @@ var ob = (e, t, n) => {
|
|
|
14566
14567
|
descriptionClass: W,
|
|
14567
14568
|
class: W
|
|
14568
14569
|
};
|
|
14569
|
-
({ ...
|
|
14570
|
+
({ ...wb });
|
|
14570
14571
|
//#endregion
|
|
14571
14572
|
//#region packages/client/src/components/switch/index.ts
|
|
14572
|
-
var
|
|
14573
|
+
var Tb = (e) => {
|
|
14573
14574
|
let t = e.querySelector("[data-ui-switch-input]");
|
|
14574
14575
|
return t ? {
|
|
14575
14576
|
root: e,
|
|
@@ -14580,7 +14581,7 @@ var wb = (e) => {
|
|
|
14580
14581
|
required: e.hasAttribute("data-required") || t.required,
|
|
14581
14582
|
invalid: e.hasAttribute("data-invalid") || t.getAttribute("aria-invalid") === "true"
|
|
14582
14583
|
} : null;
|
|
14583
|
-
},
|
|
14584
|
+
}, Eb = (e, t = {}) => {
|
|
14584
14585
|
let n = t.disabled ?? e.disabled, r = t.required ?? e.required, i = t.invalid ?? e.invalid, a = e.input.checked, o = a ? "checked" : "unchecked";
|
|
14585
14586
|
Z.syncNativeControl({
|
|
14586
14587
|
input: e.input,
|
|
@@ -14643,13 +14644,13 @@ var wb = (e) => {
|
|
|
14643
14644
|
attr: "data-invalid",
|
|
14644
14645
|
present: i
|
|
14645
14646
|
}));
|
|
14646
|
-
},
|
|
14647
|
+
}, Db = () => ({
|
|
14647
14648
|
props: null,
|
|
14648
14649
|
listeners: [],
|
|
14649
14650
|
init() {
|
|
14650
14651
|
this.props = U({
|
|
14651
14652
|
el: this.$el,
|
|
14652
|
-
schema:
|
|
14653
|
+
schema: wb,
|
|
14653
14654
|
onChange: () => this.sync()
|
|
14654
14655
|
});
|
|
14655
14656
|
let e = this.input();
|
|
@@ -14676,13 +14677,13 @@ var wb = (e) => {
|
|
|
14676
14677
|
return e;
|
|
14677
14678
|
},
|
|
14678
14679
|
item() {
|
|
14679
|
-
let e =
|
|
14680
|
+
let e = Tb(this.$el);
|
|
14680
14681
|
if (!e) throw Error("Switch requires a native checkbox input.");
|
|
14681
14682
|
return e;
|
|
14682
14683
|
},
|
|
14683
14684
|
sync() {
|
|
14684
14685
|
let e = this.item();
|
|
14685
|
-
this.props.name && (e.input.name = this.props.name), this.props.value && (e.input.value = this.props.value),
|
|
14686
|
+
this.props.name && (e.input.name = this.props.name), this.props.value && (e.input.value = this.props.value), Eb(e, {
|
|
14686
14687
|
disabled: this.props.disabled || e.disabled,
|
|
14687
14688
|
required: this.props.required || e.required,
|
|
14688
14689
|
invalid: this.props.invalid || e.invalid
|
|
@@ -14693,20 +14694,20 @@ var wb = (e) => {
|
|
|
14693
14694
|
let t = this.input();
|
|
14694
14695
|
t.disabled || (e.preventDefault(), t.checked = !t.checked, t.dispatchEvent(new Event("input", { bubbles: !0 })), t.dispatchEvent(new Event("change", { bubbles: !0 })));
|
|
14695
14696
|
}
|
|
14696
|
-
}),
|
|
14697
|
-
e.data("UiSwitch", () =>
|
|
14698
|
-
},
|
|
14699
|
-
[...
|
|
14700
|
-
var
|
|
14697
|
+
}), Ob = (e) => {
|
|
14698
|
+
e.data("UiSwitch", () => Db());
|
|
14699
|
+
}, kb = ["manual", "automatic"], Ab = Eh;
|
|
14700
|
+
[...Ab];
|
|
14701
|
+
var jb = {
|
|
14701
14702
|
id: W.default("ui-tabs"),
|
|
14702
14703
|
defaultValue: W,
|
|
14703
14704
|
value: W,
|
|
14704
|
-
activation: q(
|
|
14705
|
-
orientation: q(
|
|
14705
|
+
activation: q(kb, "manual"),
|
|
14706
|
+
orientation: q(Ab, "horizontal"),
|
|
14706
14707
|
loop: K.default(!0),
|
|
14707
14708
|
panels: W,
|
|
14708
14709
|
class: W
|
|
14709
|
-
},
|
|
14710
|
+
}, Mb = Y({ definition: {
|
|
14710
14711
|
component: "ui.tabs",
|
|
14711
14712
|
parts: {
|
|
14712
14713
|
root: {
|
|
@@ -14814,7 +14815,7 @@ var Ab = {
|
|
|
14814
14815
|
panel: { base: "min-w-0 text-sm text-foreground outline-none focus-visible:ring-2 focus-visible:ring-focus focus-visible:ring-offset-2 focus-visible:ring-offset-app" },
|
|
14815
14816
|
panelInner: { base: "min-w-0" }
|
|
14816
14817
|
}
|
|
14817
|
-
} }),
|
|
14818
|
+
} }), Nb = "ui-tabs", Pb = (e) => e ? "active" : "inactive", Fb = (e) => e instanceof HTMLButtonElement || e instanceof HTMLAnchorElement, Ib = (e) => Array.from(new Set(e)), Lb = (e) => e.trim().toLowerCase().replace(/[^a-z0-9_-]+/g, "-").replace(/^-+|-+$/g, "") || "tab", Rb = (e, t) => `${e}-tab-${Lb(t)}`, zb = (e, t) => `${e}-panel-${Lb(t)}`, Bb = (e) => Z.asBool({ value: e }), Vb = () => ({
|
|
14818
14819
|
props: null,
|
|
14819
14820
|
activeValue: "",
|
|
14820
14821
|
collection: null,
|
|
@@ -14822,7 +14823,7 @@ var Ab = {
|
|
|
14822
14823
|
init() {
|
|
14823
14824
|
this.props = U({
|
|
14824
14825
|
el: this.$el,
|
|
14825
|
-
schema:
|
|
14826
|
+
schema: jb,
|
|
14826
14827
|
onChange: (e, t) => this.applyProps(t.map((e) => e.key))
|
|
14827
14828
|
}), this.activeValue = this.initialValue(), this.setupEvents(), this.syncAll();
|
|
14828
14829
|
},
|
|
@@ -14831,7 +14832,7 @@ var Ab = {
|
|
|
14831
14832
|
},
|
|
14832
14833
|
get root() {
|
|
14833
14834
|
return Z.mergeBindings({ inputs: [Z.resolveStyle({
|
|
14834
|
-
part:
|
|
14835
|
+
part: Mb.parts.root,
|
|
14835
14836
|
props: this.props,
|
|
14836
14837
|
className: this.props.class
|
|
14837
14838
|
}), {
|
|
@@ -14841,7 +14842,7 @@ var Ab = {
|
|
|
14841
14842
|
}] });
|
|
14842
14843
|
},
|
|
14843
14844
|
owner() {
|
|
14844
|
-
return this.$el.id || this.props.id || this.$el.dataset.owner ||
|
|
14845
|
+
return this.$el.id || this.props.id || this.$el.dataset.owner || Nb;
|
|
14845
14846
|
},
|
|
14846
14847
|
ownsElement(e) {
|
|
14847
14848
|
return e.closest("[data-ui-tabs]") === this.$el;
|
|
@@ -14864,10 +14865,10 @@ var Ab = {
|
|
|
14864
14865
|
return t === "vertical" || t === "horizontal" ? t : this.props.orientation;
|
|
14865
14866
|
},
|
|
14866
14867
|
tabs() {
|
|
14867
|
-
return Array.from(this.$el.querySelectorAll("[data-ui-tabs-tab]")).filter((e) => this.ownsElement(e)).map((e, t) =>
|
|
14868
|
+
return Array.from(this.$el.querySelectorAll("[data-ui-tabs-tab]")).filter((e) => this.ownsElement(e)).map((e, t) => Fb(e) ? (e.dataset.value || (e.dataset.value = `tab-${t + 1}`), {
|
|
14868
14869
|
tab: e,
|
|
14869
14870
|
value: e.dataset.value,
|
|
14870
|
-
isDisabled:
|
|
14871
|
+
isDisabled: Bb(e.dataset.disabled) || e.hasAttribute("disabled"),
|
|
14871
14872
|
panel: this.panelForValue(e.dataset.value)
|
|
14872
14873
|
}) : null).filter((e) => e !== null);
|
|
14873
14874
|
},
|
|
@@ -14880,7 +14881,7 @@ var Ab = {
|
|
|
14880
14881
|
let e = document.querySelector(this.props.panels);
|
|
14881
14882
|
e && r.push(...Array.from(e.querySelectorAll("[data-ui-tabs-panel]")).filter(n));
|
|
14882
14883
|
}
|
|
14883
|
-
return r.push(...Array.from(document.querySelectorAll(t)).filter(n)),
|
|
14884
|
+
return r.push(...Array.from(document.querySelectorAll(t)).filter(n)), Ib(r);
|
|
14884
14885
|
},
|
|
14885
14886
|
panelForValue(e) {
|
|
14886
14887
|
return this.panels().find((t) => t.dataset.value === e) ?? null;
|
|
@@ -14888,8 +14889,8 @@ var Ab = {
|
|
|
14888
14889
|
initialValue() {
|
|
14889
14890
|
if (this.props.value) return this.props.value;
|
|
14890
14891
|
if (this.props.defaultValue) return this.props.defaultValue;
|
|
14891
|
-
let e = this.tabs().find((e) =>
|
|
14892
|
-
return e ? e.value : this.panels().find((e) =>
|
|
14892
|
+
let e = this.tabs().find((e) => Bb(e.tab.dataset.selected) || e.tab.getAttribute("aria-selected") === "true");
|
|
14893
|
+
return e ? e.value : this.panels().find((e) => Bb(e.dataset.selected))?.dataset.value || this.fallbackValue();
|
|
14893
14894
|
},
|
|
14894
14895
|
fallbackValue() {
|
|
14895
14896
|
return this.tabs().find((e) => !e.isDisabled)?.value ?? "";
|
|
@@ -14913,20 +14914,20 @@ var Ab = {
|
|
|
14913
14914
|
syncList(e) {
|
|
14914
14915
|
let t = this.listOrientation(e);
|
|
14915
14916
|
e.setAttribute("role", "tablist"), e.dataset.orientation = t, e.className = Z.resolveStyle({
|
|
14916
|
-
part:
|
|
14917
|
+
part: Mb.parts.list,
|
|
14917
14918
|
props: {
|
|
14918
14919
|
variant: e.dataset.variant || "line",
|
|
14919
14920
|
size: e.dataset.size || "md",
|
|
14920
14921
|
orientation: t,
|
|
14921
|
-
scrollable:
|
|
14922
|
+
scrollable: Bb(e.dataset.scrollable)
|
|
14922
14923
|
},
|
|
14923
14924
|
className: e.dataset.class ?? ""
|
|
14924
14925
|
}), t === "vertical" ? e.setAttribute("aria-orientation", "vertical") : e.removeAttribute("aria-orientation");
|
|
14925
14926
|
},
|
|
14926
14927
|
syncTab(e) {
|
|
14927
|
-
let t = e.value === this.activeValue, n = e.tab.getAttribute("data-active") === "true" || document.activeElement === e.tab, r =
|
|
14928
|
-
if (e.tab.id ||=
|
|
14929
|
-
part:
|
|
14928
|
+
let t = e.value === this.activeValue, n = e.tab.getAttribute("data-active") === "true" || document.activeElement === e.tab, r = Pb(t), i = e.tab.dataset.uiTabsOwner || e.tab.dataset.owner || this.owner(), a = e.panel?.id || zb(i, e.value), o = this.listOrientation(e.tab.closest("[data-ui-tabs-list]")), s = e.tab.closest("[data-ui-tabs-list]")?.dataset.variant || this.listVariant(), c = e.tab.closest("[data-ui-tabs-list]")?.dataset.size || this.listSize(), l = e.tab.querySelector("[data-ui-tabs-tab-selected-icon]");
|
|
14929
|
+
if (e.tab.id ||= Rb(i, e.value), e.tab.dataset.state = r, e.tab.dataset.orientation = o, e.tab.dataset.variant = s, e.tab.dataset.size = c, e.tab.setAttribute("role", "tab"), e.tab.setAttribute("aria-selected", t ? "true" : "false"), e.tab.setAttribute("aria-controls", a), e.tab.tabIndex = t || n ? 0 : -1, e.tab.className = Z.resolveStyle({
|
|
14930
|
+
part: Mb.parts.tab,
|
|
14930
14931
|
props: {
|
|
14931
14932
|
variant: s,
|
|
14932
14933
|
size: c,
|
|
@@ -14945,9 +14946,9 @@ var Ab = {
|
|
|
14945
14946
|
e.tab.removeAttribute("data-disabled"), e.tab.removeAttribute("aria-disabled"), e.tab instanceof HTMLButtonElement && (e.tab.disabled = !1);
|
|
14946
14947
|
},
|
|
14947
14948
|
syncPanel(e) {
|
|
14948
|
-
let t = e.dataset.value || "", n = t === this.activeValue, r = e.dataset.uiTabsOwner || e.dataset.owner || this.owner(), i =
|
|
14949
|
-
t && !e.id && (e.id = a), !e.getAttribute("data-ui-key") && t && e.setAttribute("data-ui-key", e.id || a), e.dataset.state =
|
|
14950
|
-
part:
|
|
14949
|
+
let t = e.dataset.value || "", n = t === this.activeValue, r = e.dataset.uiTabsOwner || e.dataset.owner || this.owner(), i = Rb(r, t), a = zb(r, t);
|
|
14950
|
+
t && !e.id && (e.id = a), !e.getAttribute("data-ui-key") && t && e.setAttribute("data-ui-key", e.id || a), e.dataset.state = Pb(n), e.dataset.orientation = this.props.orientation, e.setAttribute("role", "tabpanel"), e.setAttribute("aria-labelledby", i), e.hasAttribute("tabindex") || (e.tabIndex = 0), e.hidden = !n, e.className = Z.resolveStyle({
|
|
14951
|
+
part: Mb.parts.panel,
|
|
14951
14952
|
props: this.props,
|
|
14952
14953
|
className: e.dataset.class ?? ""
|
|
14953
14954
|
}), Z.setPresence({
|
|
@@ -14981,7 +14982,7 @@ var Ab = {
|
|
|
14981
14982
|
},
|
|
14982
14983
|
tabFromEvent(e) {
|
|
14983
14984
|
let t = (e.target instanceof Element ? e.target : null)?.closest("[data-ui-tabs-tab]") ?? null;
|
|
14984
|
-
return !
|
|
14985
|
+
return !Fb(t) || !this.ownsElement(t) ? null : t;
|
|
14985
14986
|
},
|
|
14986
14987
|
itemFromTab(e) {
|
|
14987
14988
|
return this.tabs().find((t) => t.tab === e) ?? null;
|
|
@@ -14990,7 +14991,7 @@ var Ab = {
|
|
|
14990
14991
|
return this.collection ||= Z.createCollectionNavigation({
|
|
14991
14992
|
root: () => this.$el,
|
|
14992
14993
|
itemSelector: "[data-ui-tabs-tab]",
|
|
14993
|
-
isDisabled: (e) => !this.ownsElement(e) ||
|
|
14994
|
+
isDisabled: (e) => !this.ownsElement(e) || Bb(e.dataset.disabled) || e.hasAttribute("disabled"),
|
|
14994
14995
|
loop: () => this.props.loop
|
|
14995
14996
|
}), this.collection;
|
|
14996
14997
|
},
|
|
@@ -15060,7 +15061,7 @@ var Ab = {
|
|
|
15060
15061
|
activateFocused() {
|
|
15061
15062
|
if (this.props.activation !== "automatic") return;
|
|
15062
15063
|
let e = document.activeElement;
|
|
15063
|
-
if (!
|
|
15064
|
+
if (!Fb(e)) return;
|
|
15064
15065
|
let t = this.itemFromTab(e);
|
|
15065
15066
|
t && !t.isDisabled && this.setActiveValue(t.value, e);
|
|
15066
15067
|
},
|
|
@@ -15081,15 +15082,15 @@ var Ab = {
|
|
|
15081
15082
|
}
|
|
15082
15083
|
});
|
|
15083
15084
|
}
|
|
15084
|
-
}),
|
|
15085
|
-
e.data("UiTabs", () =>
|
|
15086
|
-
},
|
|
15085
|
+
}), Hb = (e) => {
|
|
15086
|
+
e.data("UiTabs", () => Vb());
|
|
15087
|
+
}, Ub = {
|
|
15087
15088
|
name: W,
|
|
15088
15089
|
value: W.emptyAsValue,
|
|
15089
15090
|
placeholder: W,
|
|
15090
|
-
size: q(
|
|
15091
|
-
variant: q(
|
|
15092
|
-
radius: q(
|
|
15091
|
+
size: q(cv, "lg"),
|
|
15092
|
+
variant: q(lv, "outline"),
|
|
15093
|
+
radius: q(uv, "md"),
|
|
15093
15094
|
rows: G.default(4).min(1),
|
|
15094
15095
|
resize: q([
|
|
15095
15096
|
"vertical",
|
|
@@ -15104,25 +15105,25 @@ var Ab = {
|
|
|
15104
15105
|
rootClass: W,
|
|
15105
15106
|
controlClass: W,
|
|
15106
15107
|
class: W
|
|
15107
|
-
},
|
|
15108
|
+
}, Wb = Y({ definition: {
|
|
15108
15109
|
component: "ui.textarea",
|
|
15109
15110
|
parts: {
|
|
15110
15111
|
root: { base: "inline-grid w-full min-w-0" },
|
|
15111
15112
|
control: {
|
|
15112
|
-
base:
|
|
15113
|
+
base: Rh,
|
|
15113
15114
|
variants: {
|
|
15114
|
-
size:
|
|
15115
|
-
variant:
|
|
15115
|
+
size: Vh,
|
|
15116
|
+
variant: Hh
|
|
15116
15117
|
},
|
|
15117
15118
|
defaults: {
|
|
15118
15119
|
size: "lg",
|
|
15119
15120
|
variant: "outline",
|
|
15120
15121
|
radius: "md"
|
|
15121
15122
|
},
|
|
15122
|
-
compounds:
|
|
15123
|
+
compounds: Ih
|
|
15123
15124
|
},
|
|
15124
15125
|
textarea: {
|
|
15125
|
-
base: ["min-h-0 w-full min-w-0",
|
|
15126
|
+
base: ["min-h-0 w-full min-w-0", Uh],
|
|
15126
15127
|
variants: { resize: {
|
|
15127
15128
|
vertical: "resize-y",
|
|
15128
15129
|
horizontal: "resize-x",
|
|
@@ -15132,12 +15133,12 @@ var Ab = {
|
|
|
15132
15133
|
defaults: { resize: "vertical" }
|
|
15133
15134
|
}
|
|
15134
15135
|
}
|
|
15135
|
-
} }),
|
|
15136
|
+
} }), Gb = () => ({
|
|
15136
15137
|
props: null,
|
|
15137
15138
|
init() {
|
|
15138
15139
|
this.props = U({
|
|
15139
15140
|
el: this.$el,
|
|
15140
|
-
schema:
|
|
15141
|
+
schema: Ub,
|
|
15141
15142
|
onChange: () => this.sync()
|
|
15142
15143
|
}), this.sync();
|
|
15143
15144
|
},
|
|
@@ -15165,7 +15166,7 @@ var Ab = {
|
|
|
15165
15166
|
},
|
|
15166
15167
|
value: "true"
|
|
15167
15168
|
}), t.dataset.variant = this.props.variant, t.dataset.radius = this.props.radius, t.setAttribute("class", X({
|
|
15168
|
-
part:
|
|
15169
|
+
part: Wb.parts.control,
|
|
15169
15170
|
props: this.props,
|
|
15170
15171
|
className: this.props.controlClass
|
|
15171
15172
|
})), Z.syncControlPresence({
|
|
@@ -15176,7 +15177,7 @@ var Ab = {
|
|
|
15176
15177
|
},
|
|
15177
15178
|
value: "true"
|
|
15178
15179
|
}), n.dataset.size = this.props.size, n.dataset.resize = this.props.resize, n.rows = this.props.rows, n.setAttribute("class", X({
|
|
15179
|
-
part:
|
|
15180
|
+
part: Wb.parts.textarea,
|
|
15180
15181
|
props: this.props,
|
|
15181
15182
|
className: this.props.class
|
|
15182
15183
|
})), Z.syncNativeControl({
|
|
@@ -15190,38 +15191,38 @@ var Ab = {
|
|
|
15190
15191
|
}
|
|
15191
15192
|
}), this.props.placeholder ? n.placeholder = this.props.placeholder : n.removeAttribute("placeholder");
|
|
15192
15193
|
}
|
|
15193
|
-
}),
|
|
15194
|
-
e.data("UiTextarea", () =>
|
|
15195
|
-
},
|
|
15194
|
+
}), Kb = (e) => {
|
|
15195
|
+
e.data("UiTextarea", () => Gb());
|
|
15196
|
+
}, qb = [
|
|
15196
15197
|
"info",
|
|
15197
15198
|
"success",
|
|
15198
15199
|
"warning",
|
|
15199
15200
|
"danger",
|
|
15200
15201
|
"debug"
|
|
15201
|
-
],
|
|
15202
|
+
], Jb = [
|
|
15202
15203
|
"auto",
|
|
15203
15204
|
"neutral",
|
|
15204
15205
|
"accent",
|
|
15205
15206
|
"success",
|
|
15206
15207
|
"warning",
|
|
15207
15208
|
"danger"
|
|
15208
|
-
],
|
|
15209
|
+
], Yb = [
|
|
15209
15210
|
"default",
|
|
15210
15211
|
"soft",
|
|
15211
15212
|
"surface",
|
|
15212
15213
|
"solid",
|
|
15213
15214
|
"outline"
|
|
15214
|
-
],
|
|
15215
|
+
], Xb = [
|
|
15215
15216
|
"top-right",
|
|
15216
15217
|
"top-left",
|
|
15217
15218
|
"top-center",
|
|
15218
15219
|
"bottom-right",
|
|
15219
15220
|
"bottom-left",
|
|
15220
15221
|
"bottom-center"
|
|
15221
|
-
],
|
|
15222
|
-
level: q(
|
|
15223
|
-
color: q(
|
|
15224
|
-
variant: q(
|
|
15222
|
+
], Zb = {
|
|
15223
|
+
level: q(qb, "info"),
|
|
15224
|
+
color: q(Jb, "auto"),
|
|
15225
|
+
variant: q(Yb, "default"),
|
|
15225
15226
|
title: W,
|
|
15226
15227
|
description: W,
|
|
15227
15228
|
duration: G.default(5e3).min(0),
|
|
@@ -15229,9 +15230,9 @@ var Ab = {
|
|
|
15229
15230
|
class: W,
|
|
15230
15231
|
contentClass: W,
|
|
15231
15232
|
closeClass: W
|
|
15232
|
-
},
|
|
15233
|
+
}, Qb = {
|
|
15233
15234
|
id: W.default("ui-toast-root"),
|
|
15234
|
-
position: q(
|
|
15235
|
+
position: q(Xb, "top-right"),
|
|
15235
15236
|
duration: G.default(5e3).min(0),
|
|
15236
15237
|
includeMessages: K.default(!0),
|
|
15237
15238
|
class: W
|
|
@@ -15456,53 +15457,53 @@ var Ab = {
|
|
|
15456
15457
|
defaults: { position: "top-right" }
|
|
15457
15458
|
}
|
|
15458
15459
|
}
|
|
15459
|
-
} }),
|
|
15460
|
+
} }), $b = (e) => e === "info" || e === "success" || e === "warning" || e === "danger" || e === "debug", ex = (e) => e === "auto" || e === "neutral" || e === "accent" || e === "success" || e === "warning" || e === "danger", tx = (e) => e === "default" || e === "soft" || e === "surface" || e === "solid" || e === "outline", nx = (e) => e === "info" ? "accent" : e === "success" || e === "warning" || e === "danger" ? e : "neutral", rx = (e, t) => ex(e) && e !== "auto" ? e : nx(t), ix = (e, t) => {
|
|
15460
15461
|
let n = typeof e == "number" ? e : Number(e);
|
|
15461
15462
|
return Number.isFinite(n) && n >= 0 ? n : t;
|
|
15462
|
-
},
|
|
15463
|
+
}, ax = (e) => Math.min(e, 3), ox = /* @__PURE__ */ new WeakMap(), sx = (e) => {
|
|
15463
15464
|
let t = Array.from(e.querySelectorAll(":scope > [data-ui-toast]"));
|
|
15464
15465
|
e.dataset.stack = t.length > 1 ? "collapsed" : "single";
|
|
15465
|
-
let n = window.getComputedStyle(e), r = Number.parseFloat(n.rowGap || n.gap || "0") || 0, i = t.map((e) => Math.ceil(e.scrollHeight || e.getBoundingClientRect().height)), a = i[0] ?? 0, o = Number.parseFloat(n.getPropertyValue("--ui-toast-stack-peek")) || 8, s = e.dataset.position?.startsWith("bottom") ? -1 : 1, c =
|
|
15466
|
+
let n = window.getComputedStyle(e), r = Number.parseFloat(n.rowGap || n.gap || "0") || 0, i = t.map((e) => Math.ceil(e.scrollHeight || e.getBoundingClientRect().height)), a = i[0] ?? 0, o = Number.parseFloat(n.getPropertyValue("--ui-toast-stack-peek")) || 8, s = e.dataset.position?.startsWith("bottom") ? -1 : 1, c = ax(Math.max(0, t.length - 1)), l = i.reduce((e, t) => e + t, 0) + Math.max(0, t.length - 1) * r, u = a + c * o;
|
|
15466
15467
|
e.style.setProperty("--ui-toast-front-height", `${a}px`), e.style.setProperty("--ui-toast-stack-height", `${u}px`), e.style.setProperty("--ui-toast-stack-expanded-height", `${l}px`), t.forEach((e, n) => {
|
|
15467
|
-
let r =
|
|
15468
|
+
let r = ax(n), i = Math.max(.91, 1 - r * .03), a = Math.max(.72, 1 - r * .08);
|
|
15468
15469
|
e.dataset.state !== "closed" && (e.style.removeProperty("opacity"), e.style.removeProperty("transform")), e.dataset.stackIndex = String(n), e.style.setProperty("--ui-toast-stack-index", String(n)), e.style.setProperty("--ui-toast-stack-depth", String(r)), e.style.setProperty("--ui-toast-stack-direction", String(s)), e.style.setProperty("--ui-toast-stack-offset", `${r * o * s}px`), e.style.setProperty("--ui-toast-stack-scale", String(i)), e.style.setProperty("--ui-toast-stack-opacity", String(a)), e.style.zIndex = String(t.length - n);
|
|
15469
15470
|
});
|
|
15470
|
-
}, sx = (e) => {
|
|
15471
|
-
let t = e.parentElement instanceof HTMLElement ? e.parentElement : null;
|
|
15472
|
-
e.dataset.state = "closed", e.remove(), t?.matches("[data-ui-toast-outlet]") && ox(t);
|
|
15473
15471
|
}, cx = (e) => {
|
|
15474
|
-
|
|
15472
|
+
let t = e.parentElement instanceof HTMLElement ? e.parentElement : null;
|
|
15473
|
+
e.dataset.state = "closed", e.remove(), t?.matches("[data-ui-toast-outlet]") && sx(t);
|
|
15474
|
+
}, lx = (e) => {
|
|
15475
|
+
ox.get(e)?.cancel();
|
|
15475
15476
|
let t = Z.motion.animatePresence(e, "enter", "toast");
|
|
15476
|
-
|
|
15477
|
-
if (
|
|
15478
|
-
|
|
15477
|
+
ox.set(e, t), t.finished.finally(() => {
|
|
15478
|
+
if (ox.get(e) !== t) return;
|
|
15479
|
+
ox.delete(e), e.style.removeProperty("opacity"), e.style.removeProperty("transform");
|
|
15479
15480
|
let n = e.parentElement instanceof HTMLElement && e.parentElement.matches("[data-ui-toast-outlet]") ? e.parentElement : null;
|
|
15480
|
-
n &&
|
|
15481
|
+
n && sx(n);
|
|
15481
15482
|
});
|
|
15482
|
-
},
|
|
15483
|
+
}, ux = (e) => {
|
|
15483
15484
|
if (!e.isConnected) return;
|
|
15484
|
-
e.dataset.state = "closed",
|
|
15485
|
+
e.dataset.state = "closed", ox.get(e)?.cancel();
|
|
15485
15486
|
let t = Z.motion.animatePresence(e, "exit", "toast");
|
|
15486
|
-
|
|
15487
|
-
|
|
15487
|
+
ox.set(e, t), t.finished.finally(() => {
|
|
15488
|
+
ox.get(e) === t && (ox.delete(e), cx(e));
|
|
15488
15489
|
});
|
|
15489
|
-
},
|
|
15490
|
+
}, dx = (e) => {
|
|
15490
15491
|
let t = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
15491
15492
|
t.setAttribute("viewBox", "0 0 32 32"), t.setAttribute("aria-hidden", "true"), t.setAttribute("data-ui-toast-close-icon", ""), t.setAttribute("class", e);
|
|
15492
15493
|
let n = document.createElementNS("http://www.w3.org/2000/svg", "polygon");
|
|
15493
15494
|
return n.setAttribute("points", "17.4141 16 24 9.4141 22.5859 8 16 14.5859 9.4143 8 8 9.4141 14.5859 16 8 22.5859 9.4143 24 16 17.4141 22.5859 24 24 22.5859 17.4141 16"), t.append(n), t;
|
|
15494
|
-
},
|
|
15495
|
+
}, fx = () => ({
|
|
15495
15496
|
props: null,
|
|
15496
15497
|
cleanup: [],
|
|
15497
15498
|
timer: null,
|
|
15498
15499
|
init() {
|
|
15499
15500
|
this.props = U({
|
|
15500
15501
|
el: this.$el,
|
|
15501
|
-
schema:
|
|
15502
|
+
schema: Zb,
|
|
15502
15503
|
onChange: (e, t) => this.applyProps(t.map((e) => e.key))
|
|
15503
15504
|
});
|
|
15504
15505
|
let e = this.$el, t = e.parentElement instanceof HTMLElement && e.parentElement.matches("[data-ui-toast-outlet]") ? e.parentElement : null;
|
|
15505
|
-
e.dataset.state = "open", e.setAttribute("data-ui-motion-owner", "component"), t &&
|
|
15506
|
+
e.dataset.state = "open", e.setAttribute("data-ui-motion-owner", "component"), t && sx(t), lx(e), Z.addListener({
|
|
15506
15507
|
target: e,
|
|
15507
15508
|
event: "click",
|
|
15508
15509
|
handler: (e) => {
|
|
@@ -15513,13 +15514,13 @@ var Ab = {
|
|
|
15513
15514
|
}), this.sync(), this.resetTimer();
|
|
15514
15515
|
},
|
|
15515
15516
|
destroy() {
|
|
15516
|
-
this.props.disconnect(), this.cleanup.forEach((e) => e()), this.cleanup = [], this.timer !== null && window.clearTimeout(this.timer),
|
|
15517
|
+
this.props.disconnect(), this.cleanup.forEach((e) => e()), this.cleanup = [], this.timer !== null && window.clearTimeout(this.timer), ox.get(this.$el)?.cancel();
|
|
15517
15518
|
},
|
|
15518
15519
|
applyProps(e = []) {
|
|
15519
15520
|
this.sync(), e.includes("duration") && this.resetTimer();
|
|
15520
15521
|
},
|
|
15521
15522
|
sync() {
|
|
15522
|
-
let e = this.$el, t =
|
|
15523
|
+
let e = this.$el, t = rx(this.props.color, this.props.level), n = e.dataset.description === "true" || !!this.props.description.trim(), r = t !== "neutral" && this.props.variant !== "solid" && this.props.variant !== "default", i = this.props.level === "danger" || this.props.level === "warning";
|
|
15523
15524
|
e.dataset.level = this.props.level, e.dataset.color = t, e.dataset.variant = this.props.variant, e.dataset.duration = String(this.props.duration), e.dataset.dismissible = String(this.props.dismissible), e.setAttribute("role", i ? "alert" : "status"), e.setAttribute("aria-live", i ? "assertive" : "polite"), e.className = Z.resolveStyle({
|
|
15524
15525
|
part: $.parts.root,
|
|
15525
15526
|
props: {
|
|
@@ -15558,7 +15559,7 @@ var Ab = {
|
|
|
15558
15559
|
});
|
|
15559
15560
|
});
|
|
15560
15561
|
let a = e.parentElement instanceof HTMLElement && e.parentElement.matches("[data-ui-toast-outlet]") ? e.parentElement : null;
|
|
15561
|
-
a &&
|
|
15562
|
+
a && sx(a);
|
|
15562
15563
|
},
|
|
15563
15564
|
resetTimer() {
|
|
15564
15565
|
this.timer !== null && window.clearTimeout(this.timer), this.timer = this.props.duration > 0 ? window.setTimeout(() => this.dismiss(), this.props.duration) : null;
|
|
@@ -15568,10 +15569,10 @@ var Ab = {
|
|
|
15568
15569
|
this.timer !== null && window.clearTimeout(this.timer), Z.dispatch({
|
|
15569
15570
|
el: e,
|
|
15570
15571
|
name: "ui:dismiss"
|
|
15571
|
-
}),
|
|
15572
|
+
}), ux(e);
|
|
15572
15573
|
}
|
|
15573
|
-
}),
|
|
15574
|
-
let n =
|
|
15574
|
+
}), px = (e, t) => {
|
|
15575
|
+
let n = $b(e.level) ? e.level : "info", r = rx(e.color, n), i = tx(e.variant) ? e.variant : "default", a = typeof e.title == "string" ? e.title : "", o = typeof e.description == "string" ? e.description : "", s = o.trim().length > 0, c = r !== "neutral" && i !== "solid" && i !== "default", l = ix(e.duration, t), u = typeof e.dismissible == "boolean" ? e.dismissible : !0, d = n === "danger" || n === "warning", f = document.createElement("div");
|
|
15575
15576
|
f.dataset.uiToast = "", f.dataset.level = n, f.dataset.color = r, f.dataset.variant = i, f.dataset.duration = String(l), f.dataset.dismissible = String(u), f.dataset.description = String(s), f.dataset.state = "open", f.setAttribute("role", d ? "alert" : "status"), f.setAttribute("aria-live", d ? "assertive" : "polite"), f.setAttribute("aria-atomic", "true"), f.className = Z.resolveStyle({
|
|
15576
15577
|
part: $.parts.root,
|
|
15577
15578
|
props: {
|
|
@@ -15609,20 +15610,20 @@ var Ab = {
|
|
|
15609
15610
|
e.type = "button", e.dataset.uiToastClose = "", e.setAttribute("aria-label", "Dismiss notification"), e.className = Z.resolveStyle({
|
|
15610
15611
|
part: $.parts.close,
|
|
15611
15612
|
props: { variant: i }
|
|
15612
|
-
}), e.append(
|
|
15613
|
+
}), e.append(dx(Z.resolveStyle({ part: $.parts.closeIcon }))), e.addEventListener("click", () => ux(f)), f.append(e);
|
|
15613
15614
|
}
|
|
15614
|
-
return l > 0 && window.setTimeout(() =>
|
|
15615
|
-
},
|
|
15615
|
+
return l > 0 && window.setTimeout(() => ux(f), l), f;
|
|
15616
|
+
}, mx = () => ({
|
|
15616
15617
|
props: null,
|
|
15617
15618
|
cleanup: [],
|
|
15618
15619
|
init() {
|
|
15619
15620
|
this.props = U({
|
|
15620
15621
|
el: this.$el,
|
|
15621
|
-
schema:
|
|
15622
|
+
schema: Qb,
|
|
15622
15623
|
onChange: () => this.sync()
|
|
15623
15624
|
});
|
|
15624
15625
|
let e = this.$el;
|
|
15625
|
-
this.sync(),
|
|
15626
|
+
this.sync(), sx(e), Z.addListener({
|
|
15626
15627
|
target: e,
|
|
15627
15628
|
event: "pointerover",
|
|
15628
15629
|
handler: () => {
|
|
@@ -15672,80 +15673,80 @@ var Ab = {
|
|
|
15672
15673
|
part: $.parts.outlet,
|
|
15673
15674
|
props: { position: this.props.position },
|
|
15674
15675
|
className: this.props.class
|
|
15675
|
-
}),
|
|
15676
|
+
}), sx(e);
|
|
15676
15677
|
},
|
|
15677
15678
|
add(e) {
|
|
15678
15679
|
let t = typeof e.title == "string" ? e.title : "", n = typeof e.description == "string" ? e.description : "";
|
|
15679
15680
|
if (!t.trim() && !n.trim()) return;
|
|
15680
|
-
let r = this.$el, i =
|
|
15681
|
-
i.setAttribute("data-ui-motion-owner", "component"), r.append(i),
|
|
15681
|
+
let r = this.$el, i = px(e, this.props.duration);
|
|
15682
|
+
i.setAttribute("data-ui-motion-owner", "component"), r.append(i), sx(r), lx(i);
|
|
15682
15683
|
}
|
|
15683
|
-
}),
|
|
15684
|
-
e.data("UiToast", () =>
|
|
15685
|
-
},
|
|
15684
|
+
}), hx = (e) => {
|
|
15685
|
+
e.data("UiToast", () => fx()), e.data("UiToastOutlet", () => mx());
|
|
15686
|
+
}, gx = "[x-ui-request], [x-ui-request\\.navigate]", _x = new Set([
|
|
15686
15687
|
"data",
|
|
15687
15688
|
"extra",
|
|
15688
15689
|
"headers",
|
|
15689
15690
|
"method"
|
|
15690
|
-
]),
|
|
15691
|
+
]), vx = [
|
|
15691
15692
|
"altKey",
|
|
15692
15693
|
"ctrlKey",
|
|
15693
15694
|
"metaKey",
|
|
15694
15695
|
"shiftKey"
|
|
15695
|
-
],
|
|
15696
|
+
], yx = (e, { expression: t }, n) => {
|
|
15696
15697
|
if (!t?.trim()) return {};
|
|
15697
15698
|
let r = n.Alpine.evaluate(e, t);
|
|
15698
15699
|
return fu(r) ? (Object.keys(r).forEach((e) => {
|
|
15699
|
-
|
|
15700
|
+
_x.has(e) || J("x-ui-request: unknown option key", e);
|
|
15700
15701
|
}), r) : (J("x-ui-request: expression must evaluate to an object"), null);
|
|
15701
|
-
},
|
|
15702
|
-
if (t.defaultPrevented || t.button !== 0 || n &&
|
|
15702
|
+
}, bx = (e) => e.submitter instanceof HTMLElement ? e.submitter : null, xx = (e, t, n) => t.defaultPrevented || (n?.getAttribute("formmethod") || e.getAttribute("method"))?.toLowerCase() === "dialog" || e.getAttribute("target") || n?.getAttribute("formtarget") ? !1 : !e.noValidate && !e.checkValidity() ? (e.reportValidity(), !1) : !0, Sx = (e) => e.hash !== "" && e.origin === window.location.origin && e.pathname === window.location.pathname && e.search === window.location.search, Cx = (e, t, n) => {
|
|
15703
|
+
if (t.defaultPrevented || t.button !== 0 || n && vx.some((e) => t[e]) || e.hasAttribute("download") || e.getAttribute("target")) return !1;
|
|
15703
15704
|
let r = new URL(e.href, document.baseURI);
|
|
15704
|
-
return r.origin === window.location.origin ? !
|
|
15705
|
-
},
|
|
15705
|
+
return r.origin === window.location.origin ? !Sx(r) : !1;
|
|
15706
|
+
}, wx = (e, t, n, r) => {
|
|
15706
15707
|
let i = (i) => {
|
|
15707
|
-
let a =
|
|
15708
|
-
if (!
|
|
15709
|
-
let o =
|
|
15710
|
-
o && (i.preventDefault(),
|
|
15708
|
+
let a = bx(i);
|
|
15709
|
+
if (!xx(t, i, a)) return;
|
|
15710
|
+
let o = yx(t, n, r);
|
|
15711
|
+
o && (i.preventDefault(), Ym(e, void 0, {
|
|
15711
15712
|
...o,
|
|
15712
15713
|
source: t,
|
|
15713
15714
|
submitter: a
|
|
15714
15715
|
}).catch((e) => J("x-ui-request: request failed", e)));
|
|
15715
15716
|
};
|
|
15716
15717
|
t.addEventListener("submit", i), r.cleanup?.(() => t.removeEventListener("submit", i));
|
|
15717
|
-
},
|
|
15718
|
+
}, Tx = (e, t, n, r, i) => {
|
|
15718
15719
|
let a = (a) => {
|
|
15719
|
-
if (!
|
|
15720
|
-
let o =
|
|
15721
|
-
o && (a.preventDefault(),
|
|
15720
|
+
if (!Cx(t, a, i.navigate)) return;
|
|
15721
|
+
let o = yx(t, n, r);
|
|
15722
|
+
o && (a.preventDefault(), Ym(e, t.href, {
|
|
15722
15723
|
...o,
|
|
15723
15724
|
method: o.method ?? "GET",
|
|
15724
15725
|
source: t
|
|
15725
15726
|
}).catch((e) => J("x-ui-request: request failed", e)));
|
|
15726
15727
|
};
|
|
15727
15728
|
t.addEventListener("click", a), r.cleanup?.(() => t.removeEventListener("click", a));
|
|
15728
|
-
},
|
|
15729
|
+
}, Ex = (e) => {
|
|
15729
15730
|
e.magic("ui", () => ({
|
|
15730
|
-
get:
|
|
15731
|
-
post:
|
|
15732
|
-
put:
|
|
15733
|
-
delete:
|
|
15731
|
+
get: Qm,
|
|
15732
|
+
post: $m,
|
|
15733
|
+
put: eh,
|
|
15734
|
+
delete: th
|
|
15734
15735
|
}));
|
|
15735
|
-
},
|
|
15736
|
-
e.addRootSelector(() =>
|
|
15736
|
+
}, Dx = (e) => {
|
|
15737
|
+
e.addRootSelector(() => gx), nh(e), Ex(e), e.directive("ui-request", (t, { expression: n, modifiers: r }, i) => {
|
|
15737
15738
|
let a = { expression: n };
|
|
15738
15739
|
if (t instanceof HTMLFormElement) {
|
|
15739
|
-
|
|
15740
|
+
wx(e, t, a, i);
|
|
15740
15741
|
return;
|
|
15741
15742
|
}
|
|
15742
15743
|
if (t instanceof HTMLAnchorElement) {
|
|
15743
|
-
|
|
15744
|
+
Tx(e, t, a, i, { navigate: r.includes("navigate") });
|
|
15744
15745
|
return;
|
|
15745
15746
|
}
|
|
15746
15747
|
J("x-ui-request: directive only supports forms and anchors", t);
|
|
15747
15748
|
});
|
|
15748
|
-
},
|
|
15749
|
+
}, Ox = {
|
|
15749
15750
|
bool: K,
|
|
15750
15751
|
className: ml,
|
|
15751
15752
|
create: kl,
|
|
@@ -15764,10 +15765,10 @@ var Ab = {
|
|
|
15764
15765
|
propsFromSchema: wf,
|
|
15765
15766
|
resolveStyle: X,
|
|
15766
15767
|
string: W
|
|
15767
|
-
},
|
|
15768
|
-
Yl(e.reactive), e.plugin(h), Es(e),
|
|
15768
|
+
}, kx = (e) => {
|
|
15769
|
+
Yl(e.reactive), e.plugin(h), Es(e), mh(e), El(), Dg(), Dx(e), sg(e), zg(e), Yg(e), b_(e), D_(e), M_(e), sv(e), mv(e), Rv(e), qv(e), cy(e), Ny(e), nb(e), bb(e), xf(e), mm(e), Ob(e), Hb(e), Kb(e), hx(e);
|
|
15769
15770
|
};
|
|
15770
15771
|
//#endregion
|
|
15771
|
-
export { K as bool, ml as className, kl as create, tu as createMachine, bf as createResizable, eu as createVisibilityMachine, hl as cx,
|
|
15772
|
+
export { K as bool, ml as className, kl as create, tu as createMachine, bf as createResizable, eu as createVisibilityMachine, hl as cx, kx as default, kx as trellisUi, Cf as defineManifest, U as defineProps, Y as defineStyles, Xl as json, Pl as mergeBindings, xs as motion, G as number, q as oneOf, wf as propsFromSchema, X as resolveStyle, W as string, Ox as ui };
|
|
15772
15773
|
|
|
15773
15774
|
//# sourceMappingURL=index.js.map
|