@tempots/beatui 0.32.0 → 0.32.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/beatui.css +9 -18
- package/dist/beatui.tailwind.css +9 -18
- package/dist/index.cjs.js +4 -4
- package/dist/index.es.js +235 -243
- package/dist/types/components/overlay/ribbon.d.ts +4 -4
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { prop as j, html as p, attr as s, computedOf as w, Use as Y, Empty as O, Value as S, WithElement as Q, Fragment as M, aria as A, OnDispose as W, OneOfValue as zt, on as T, style as v, coalesce as Ee, When as te, ForEach as be, Ensure as
|
|
1
|
+
import { prop as j, html as p, attr as s, computedOf as w, Use as Y, Empty as O, Value as S, WithElement as Q, Fragment as M, aria as A, OnDispose as W, OneOfValue as zt, on as T, style as v, coalesce as Ee, When as te, ForEach as be, Ensure as De, OneOfType as bt, dataAttr as He, NotEmpty as Wt, input as X, emitValue as E, emitValueAsDate as qt, Portal as mt, WithProvider as Zt, Task as Yt, Provide as ft, makeProviderMark as Gt, MapSignal as gt, svg as Ge, svgAttr as Ke } from "@tempots/dom";
|
|
2
2
|
import { Use as xs } from "@tempots/dom";
|
|
3
3
|
import { PopOver as Kt, ElementRect as xe, WindowSize as Xt, Query as Jt, Location as he, NavigationService as Qt, Anchor as Re } from "@tempots/ui";
|
|
4
|
-
import { a as ne, c as ce, h as
|
|
4
|
+
import { a as ne, c as ce, h as $e, I as U, B as Xe, b as q, C as G, L as je, t as Je, g as Qe, i as et } from "./translations-iam7PITs.js";
|
|
5
5
|
import { v as ws, T as Ss, j as Cs, d as ks, f as Is, p as $s, o as Ts, l as _s, u as Ds, w as Vs, k as As, q as Ls, m as Bs, n as Ms, r as Os, s as Ns } from "./translations-iam7PITs.js";
|
|
6
6
|
import { T as ht, a as en } from "./theme-DsQOxXW1.js";
|
|
7
7
|
import { t as Es, am as Fs, f as Hs, J as Rs, c as js, N as Us, I as zs, K as Ws, d as qs, k as Zs, b as Ys, a as Gs, ab as Ks, o as Xs, a0 as Js, ae as Qs, q as el, H as tl, A as nl, al, g as sl, E as ll, x as rl, aj as ol, $ as il, a4 as ul, j as cl, i as dl, h as pl, Y as bl, X as ml, Q as fl, P as gl, S as hl, R as vl, W as xl, V as yl, U as wl, T as Sl, a8 as Cl, a7 as kl, aa as Il, a9 as $l, n as Tl, m as _l, l as Dl, _ as Vl, Z as Al, ad as Ll, p as Bl, G as Ml, z as Ol, ak as Nl, D as Pl, C as El, w as Fl, v as Hl, ai as Rl, ah as jl, e as Ul, a3 as zl, a2 as Wl, M as ql, L as Zl, a5 as Yl, a6 as Gl, r as Kl, O as Xl, ac as Jl, s as Ql, F as er, y as tr, ag as nr, B as ar, u as sr, af as lr, a1 as rr } from "./index-DJJ67-RV.js";
|
|
@@ -9,14 +9,14 @@ import { C as vt, s as re, m as xt, d as yt, I as Ue, B as wt, c as St, S as ze,
|
|
|
9
9
|
import { A as ir, g as ur, b as cr, D as dr, E as pr, v as br, L as mr, M as fr, x as gr, N as hr, i as vr, P as xr, R as yr, n as wr, q as Sr, o as Cr, k as kr, j as Ir, f as $r, p as Tr, h as _r, r as Dr, t as Vr, l as Ar, u as Lr, w as Br } from "./notice-Ct8ZHvwq.js";
|
|
10
10
|
import { S as nn, G as Ct, E as an, F as sn, N as kt, a as oe, M as me, e as tt, n as ln, W as J, d as rn } from "./utils-CuD-_CDx.js";
|
|
11
11
|
import { g as Or, i as Nr, B as Pr, l as Er, O as Fr, C as Hr, j as Rr, L as jr, k as Ur, m as zr, o as Wr, p as qr, I as Zr, q as Yr, w as Gr, r as Kr, A as Xr, H as Jr, s as Qr, u as eo, z as to, K as no, v as ao, R as so, D as lo, x as ro, T as oo, y as io, b as uo, U as co, J as po, P as bo, Q as mo, V as fo, h as go, c as ho, t as vo, f as xo } from "./utils-CuD-_CDx.js";
|
|
12
|
-
import { g as
|
|
12
|
+
import { g as Te } from "./timer-CQlK5LhW.js";
|
|
13
13
|
import { u as ve, A as Fe, O as on, F as un } from "./modal-eY-3j_zS.js";
|
|
14
14
|
import { B as wo, C as So, M as Co, a as ko, S as Io, b as $o, c as To, o as _o, s as Do, e as Vo, d as Ao, f as Lo } from "./modal-eY-3j_zS.js";
|
|
15
15
|
import { L as Mo } from "./link-portal-Cr2l9f3k.js";
|
|
16
16
|
import { g as cn } from "./colors-WfmhQ5e1.js";
|
|
17
17
|
import { b as No, e as Po, i as Eo, a as Fo, c as Ho, o as Ro, l as jo, m as Uo, k as zo, j as Wo, n as qo, r as Zo, s as Yo, d as Go, h as Ko, t as Xo } from "./colors-WfmhQ5e1.js";
|
|
18
18
|
import { T as Qo, a as ei, c as ti, b as ni, d as ai } from "./toolbar-ClJbaKID.js";
|
|
19
|
-
function
|
|
19
|
+
function _e(e) {
|
|
20
20
|
if (typeof e != "string") return !1;
|
|
21
21
|
const n = e.startsWith("#") ? e.slice(1) : e;
|
|
22
22
|
return /^[0-9A-Fa-f]{3}$|^[0-9A-Fa-f]{6}$/.test(n);
|
|
@@ -43,10 +43,10 @@ function bn(e) {
|
|
|
43
43
|
return u >= 0 && u <= 360 && c >= 0 && c <= 100 && i >= 0 && i <= 100;
|
|
44
44
|
}
|
|
45
45
|
function mn(e) {
|
|
46
|
-
return
|
|
46
|
+
return _e(e) || dn(e) || pn(e) || bn(e);
|
|
47
47
|
}
|
|
48
48
|
function de(e) {
|
|
49
|
-
if (!
|
|
49
|
+
if (!_e(e)) return null;
|
|
50
50
|
let n = e.startsWith("#") ? e.slice(1) : e;
|
|
51
51
|
return n.length === 3 && (n = n.split("").map((t) => t + t).join("")), `#${n.toLowerCase()}`;
|
|
52
52
|
}
|
|
@@ -70,8 +70,8 @@ function nt(e) {
|
|
|
70
70
|
function ba(e, n) {
|
|
71
71
|
const t = nt(e), a = nt(n);
|
|
72
72
|
if (!t || !a) return null;
|
|
73
|
-
const l = (o, d,
|
|
74
|
-
const [x, f, g] = [o, d,
|
|
73
|
+
const l = (o, d, m) => {
|
|
74
|
+
const [x, f, g] = [o, d, m].map((h) => (h = h / 255, h <= 0.03928 ? h / 12.92 : Math.pow((h + 0.055) / 1.055, 2.4)));
|
|
75
75
|
return 0.2126 * x + 0.7152 * f + 0.0722 * g;
|
|
76
76
|
}, r = l(t.r, t.g, t.b), u = l(a.r, a.g, a.b), c = Math.max(r, u), i = Math.min(r, u);
|
|
77
77
|
return (c + 0.05) / (i + 0.05);
|
|
@@ -87,20 +87,20 @@ function ma(e, n = 0, t = () => !0) {
|
|
|
87
87
|
a != null && clearTimeout(a);
|
|
88
88
|
}), r;
|
|
89
89
|
}
|
|
90
|
-
const at = (e, n) => e < n ? e : n, ke = (e, n) => e > n ? e : n,
|
|
90
|
+
const at = (e, n) => e < n ? e : n, ke = (e, n) => e > n ? e : n, Me = ["xs", "sm", "md", "lg", "xl"];
|
|
91
91
|
function fa(e, n = 1) {
|
|
92
|
-
const t =
|
|
92
|
+
const t = Me.indexOf(e);
|
|
93
93
|
if (t === -1)
|
|
94
94
|
throw new Error(`Invalid size: ${e}`);
|
|
95
|
-
const a = Math.min(Math.max(t + n, 0),
|
|
96
|
-
return
|
|
95
|
+
const a = Math.min(Math.max(t + n, 0), Me.length - 1);
|
|
96
|
+
return Me[a];
|
|
97
97
|
}
|
|
98
98
|
function fn(e, n) {
|
|
99
99
|
const t = ["bc-tag"];
|
|
100
100
|
return e !== "md" && t.push(`bc-tag--${e}`), n && t.push("bc-tag--disabled"), t.join(" ");
|
|
101
101
|
}
|
|
102
102
|
function gn(e) {
|
|
103
|
-
const n = ce(e, "light", "light"), t = ce(e, "light", "dark"), a =
|
|
103
|
+
const n = ce(e, "light", "light"), t = ce(e, "light", "dark"), a = $e(e, "light", "light"), l = $e(e, "light", "dark");
|
|
104
104
|
return [
|
|
105
105
|
`--tag-bg: ${n.backgroundColor}`,
|
|
106
106
|
`--tag-text: ${n.textColor}`,
|
|
@@ -189,7 +189,7 @@ function ga() {
|
|
|
189
189
|
function vn(e) {
|
|
190
190
|
return e.startsWith("top") ? "flyout-top" : e.startsWith("bottom") ? "flyout-bottom" : e.startsWith("left") ? "flyout-left" : e.startsWith("right") ? "flyout-right" : "scale-fade";
|
|
191
191
|
}
|
|
192
|
-
function
|
|
192
|
+
function Ve(e) {
|
|
193
193
|
const {
|
|
194
194
|
content: n,
|
|
195
195
|
placement: t = "top",
|
|
@@ -201,15 +201,15 @@ function Ae(e) {
|
|
|
201
201
|
closable: i = !0,
|
|
202
202
|
arrow: o,
|
|
203
203
|
role: d,
|
|
204
|
-
hasPopup:
|
|
204
|
+
hasPopup: m = "dialog"
|
|
205
205
|
} = e;
|
|
206
206
|
return Kt((x, f) => {
|
|
207
207
|
const g = ve({
|
|
208
208
|
initialStatus: "closed"
|
|
209
209
|
}), h = re("flyout"), k = j(!1);
|
|
210
|
-
let C = null,
|
|
210
|
+
let C = null, b = null, y = null, D = !1;
|
|
211
211
|
function V() {
|
|
212
|
-
I != null && (clearTimeout(I), I = null), L != null && (clearTimeout(L), L = null), y && (y(), y = null),
|
|
212
|
+
I != null && (clearTimeout(I), I = null), L != null && (clearTimeout(L), L = null), y && (y(), y = null), b && (b(), b = null), C && (document.removeEventListener("keydown", C), C = null), k.set(!1), D = !1;
|
|
213
213
|
}
|
|
214
214
|
function N() {
|
|
215
215
|
S.get(i) && (C = (H) => {
|
|
@@ -223,7 +223,7 @@ function Ae(e) {
|
|
|
223
223
|
},
|
|
224
224
|
arrow: o,
|
|
225
225
|
content: Q((H) => {
|
|
226
|
-
g.setElement(H), y =
|
|
226
|
+
g.setElement(H), y = Te(() => {
|
|
227
227
|
g.open(), y = null;
|
|
228
228
|
});
|
|
229
229
|
const F = (z) => {
|
|
@@ -250,7 +250,7 @@ function Ae(e) {
|
|
|
250
250
|
}
|
|
251
251
|
let I = null;
|
|
252
252
|
function _() {
|
|
253
|
-
if (I != null && (clearTimeout(I), I = null), L != null && (clearTimeout(L), L = null),
|
|
253
|
+
if (I != null && (clearTimeout(I), I = null), L != null && (clearTimeout(L), L = null), b && (b(), b = null), g.isOpened.value || g.isOpening.value || g.isStartOpening.value)
|
|
254
254
|
return;
|
|
255
255
|
if (g.isClosing.value || g.isStartClosing.value) {
|
|
256
256
|
g.open();
|
|
@@ -269,7 +269,7 @@ function Ae(e) {
|
|
|
269
269
|
}
|
|
270
270
|
const H = S.get(l);
|
|
271
271
|
L = setTimeout(() => {
|
|
272
|
-
L = null,
|
|
272
|
+
L = null, b && (b(), b = null), g.close(), b = g.onClosed(() => {
|
|
273
273
|
f(), V();
|
|
274
274
|
});
|
|
275
275
|
}, H);
|
|
@@ -283,7 +283,7 @@ function Ae(e) {
|
|
|
283
283
|
A.expanded(k),
|
|
284
284
|
A.controls(h),
|
|
285
285
|
A.haspopup(
|
|
286
|
-
|
|
286
|
+
m
|
|
287
287
|
)
|
|
288
288
|
);
|
|
289
289
|
if (typeof c == "function")
|
|
@@ -322,7 +322,7 @@ function Ae(e) {
|
|
|
322
322
|
return M(
|
|
323
323
|
W(we),
|
|
324
324
|
T.click(() => {
|
|
325
|
-
F(),
|
|
325
|
+
F(), Te(() => {
|
|
326
326
|
document.addEventListener("click", pe, {
|
|
327
327
|
once: !0
|
|
328
328
|
});
|
|
@@ -374,7 +374,7 @@ function $t(e, { breakpoints: n, mode: t = "viewport" }) {
|
|
|
374
374
|
([u, c]) => [c, u]
|
|
375
375
|
)].sort((u, c) => u[0] - c[0]), r = (u) => {
|
|
376
376
|
const c = u.map(({ width: o }) => {
|
|
377
|
-
const d = l.findIndex((
|
|
377
|
+
const d = l.findIndex((m) => m[0] > o) - 1;
|
|
378
378
|
return d >= 0 ? { width: o, breakpoint: l[d][1] } : l.length > 0 && o >= l[0][0] ? { width: o, breakpoint: l[0][1] } : { width: o, breakpoint: l[0][1] };
|
|
379
379
|
});
|
|
380
380
|
return e({
|
|
@@ -386,9 +386,9 @@ function $t(e, { breakpoints: n, mode: t = "viewport" }) {
|
|
|
386
386
|
};
|
|
387
387
|
return t === "element" ? xe(r) : Xt(r);
|
|
388
388
|
}
|
|
389
|
-
let
|
|
389
|
+
let Oe = NaN;
|
|
390
390
|
function Sn(e, n) {
|
|
391
|
-
return e ? (isNaN(
|
|
391
|
+
return e ? (isNaN(Oe) && (Oe = parseFloat(getComputedStyle(document.documentElement).fontSize)), parseFloat(e) * Oe) : n;
|
|
392
392
|
}
|
|
393
393
|
function Z(e, n, t) {
|
|
394
394
|
return Sn(e.getPropertyValue(n), t);
|
|
@@ -523,7 +523,7 @@ function st(e, n) {
|
|
|
523
523
|
};
|
|
524
524
|
return t.xs < t.zero && (t.xs = t.zero), t.sm < t.xs && (t.sm = t.xs), t.md < t.sm && (t.md = t.sm), t.lg < t.md && (t.lg = t.md), t.xl < t.lg && (t.xl = t.lg), t;
|
|
525
525
|
}
|
|
526
|
-
function
|
|
526
|
+
function Ne(e) {
|
|
527
527
|
e = e.filter((n) => n.some((t) => t != null && !t.startsWith("?")));
|
|
528
528
|
for (let n = 0; n < e[0].length; n++)
|
|
529
529
|
e.every((t) => t[n] == null || t[n].startsWith("?")) && (e = e.map((t) => t.filter((a, l) => l !== n)), n--);
|
|
@@ -547,12 +547,12 @@ function kn({
|
|
|
547
547
|
];
|
|
548
548
|
const d = [];
|
|
549
549
|
d.push("1fr");
|
|
550
|
-
const
|
|
551
|
-
return a.banner && (
|
|
550
|
+
const m = [];
|
|
551
|
+
return a.banner && (m.push(a.banner[i] + "px"), o[0][1] = "banner"), (a.header || t.menu || t.aside) && (m.push(
|
|
552
552
|
(a.header?.[i] ?? se.header[i]) + "px"
|
|
553
|
-
), o[1][1] = "header"), a.mainHeader && (
|
|
553
|
+
), o[1][1] = "header"), a.mainHeader && (m.push(a.mainHeader[i] + "px"), o[2][1] = "mainHeader"), m.push("1fr"), o[3][1] = "main", a.mainFooter && (m.push(a.mainFooter[i] + "px"), o[4][1] = "mainFooter"), a.footer && (m.push(a.footer[i] + "px"), o[5][1] = "footer"), o = Ne(o), {
|
|
554
554
|
columns: d.join(" "),
|
|
555
|
-
rows:
|
|
555
|
+
rows: m.join(" "),
|
|
556
556
|
areas: o.map((f) => `"${f.join(" ")}"`).join(`
|
|
557
557
|
`),
|
|
558
558
|
displayMenu: !1,
|
|
@@ -572,12 +572,12 @@ function kn({
|
|
|
572
572
|
];
|
|
573
573
|
const d = [];
|
|
574
574
|
t.menu && (d.push(t.menu[i] + "px"), o[2][0] = "?menu", o[3][0] = "menu", o[4][0] = "?menu"), d.push("1fr");
|
|
575
|
-
const
|
|
576
|
-
return a.banner && (
|
|
575
|
+
const m = [];
|
|
576
|
+
return a.banner && (m.push(a.banner[i] + "px"), o[0][0] = "?banner", o[0][1] = "banner"), (a.header || t.aside) && (m.push(
|
|
577
577
|
(a.header?.[i] ?? se.header[i]) + "px"
|
|
578
|
-
), o[1][0] = "?header", o[1][1] = "header"), a.mainHeader && (
|
|
578
|
+
), o[1][0] = "?header", o[1][1] = "header"), a.mainHeader && (m.push(a.mainHeader[i] + "px"), o[2][1] = "mainHeader"), m.push("1fr"), o[3][1] = "main", a.mainFooter && (m.push(a.mainFooter[i] + "px"), o[4][1] = "mainFooter"), a.footer && (m.push(a.footer[i] + "px"), o[5][0] = "?footer", o[5][1] = "footer"), o = Ne(o), {
|
|
579
579
|
columns: d.join(" "),
|
|
580
|
-
rows:
|
|
580
|
+
rows: m.join(" "),
|
|
581
581
|
areas: o.map((f) => `"${f.join(" ")}"`).join(`
|
|
582
582
|
`),
|
|
583
583
|
displayMenu: !0,
|
|
@@ -597,10 +597,10 @@ function kn({
|
|
|
597
597
|
];
|
|
598
598
|
const d = [];
|
|
599
599
|
t.menu && (d.push(t.menu[i] + "px"), o[2][0] = "?menu", o[3][0] = "menu", o[4][0] = "?menu"), d.push("1fr"), t.aside && (d.push(t.aside[i] + "px"), o[2][2] = "?aside", o[3][2] = "aside", o[4][2] = "?aside");
|
|
600
|
-
const
|
|
601
|
-
return a.banner && (
|
|
600
|
+
const m = [];
|
|
601
|
+
return a.banner && (m.push(a.banner[i] + "px"), o[0][0] = "?banner", o[0][1] = "banner", o[0][2] = "?banner"), a.header && (m.push(a.header[i] + "px"), o[1][0] = "?header", o[1][1] = "header", o[1][2] = "?header"), a.mainHeader && (m.push(a.mainHeader[i] + "px"), o[2][1] = "mainHeader"), m.push("1fr"), o[3][1] = "main", a.mainFooter && (m.push(a.mainFooter[i] + "px"), o[4][1] = "mainFooter"), a.footer && (m.push(a.footer[i] + "px"), o[5][0] = "?footer", o[5][1] = "footer", o[5][2] = "?footer"), o = Ne(o), {
|
|
602
602
|
columns: d.join(" "),
|
|
603
|
-
rows:
|
|
603
|
+
rows: m.join(" "),
|
|
604
604
|
areas: o.map((f) => `"${f.join(" ")}"`).join(`
|
|
605
605
|
`),
|
|
606
606
|
displayMenu: !0,
|
|
@@ -656,13 +656,13 @@ function xa({
|
|
|
656
656
|
vertical: a,
|
|
657
657
|
horizontal: l,
|
|
658
658
|
is: c
|
|
659
|
-
}), o = u.map(i), d = l.header != null || a.menu != null || a.aside != null,
|
|
659
|
+
}), o = u.map(i), d = l.header != null || a.menu != null || a.aside != null, m = w(
|
|
660
660
|
a.aside != null,
|
|
661
661
|
o
|
|
662
|
-
)((
|
|
662
|
+
)((b, { displayAside: y }) => b && !y), x = w(
|
|
663
663
|
a.menu != null,
|
|
664
664
|
o
|
|
665
|
-
)((
|
|
665
|
+
)((b, { displayMenu: y }) => b && !y), f = ve(), g = ve(), h = j(0), k = w(
|
|
666
666
|
a.menu != null,
|
|
667
667
|
o,
|
|
668
668
|
f.display
|
|
@@ -700,13 +700,13 @@ function xa({
|
|
|
700
700
|
v.zIndex("20"),
|
|
701
701
|
v.display(d ? "block" : "none"),
|
|
702
702
|
v.gridArea("header"),
|
|
703
|
-
xe((
|
|
703
|
+
xe((b) => (b.$.bottom.feedProp(h), null)),
|
|
704
704
|
p.div(
|
|
705
705
|
v.display("flex"),
|
|
706
706
|
v.height("100%"),
|
|
707
707
|
p.div(
|
|
708
708
|
v.display(
|
|
709
|
-
x.map((
|
|
709
|
+
x.map((b) => b ? "flex" : "none")
|
|
710
710
|
),
|
|
711
711
|
v.alignItems("center"),
|
|
712
712
|
v.justifyContent("center"),
|
|
@@ -721,7 +721,7 @@ function xa({
|
|
|
721
721
|
A.label(r.$.toggleMenu),
|
|
722
722
|
U({
|
|
723
723
|
icon: f.display.map(
|
|
724
|
-
(
|
|
724
|
+
(b) => b ? "line-md/menu-to-close-alt-transition" : "line-md/close-to-menu-alt-transition"
|
|
725
725
|
)
|
|
726
726
|
})
|
|
727
727
|
)
|
|
@@ -737,7 +737,7 @@ function xa({
|
|
|
737
737
|
v.height("100%"),
|
|
738
738
|
v.width("60px"),
|
|
739
739
|
v.display(
|
|
740
|
-
|
|
740
|
+
m.map((b) => b ? "flex" : "none")
|
|
741
741
|
),
|
|
742
742
|
Xe(
|
|
743
743
|
{
|
|
@@ -752,7 +752,7 @@ function xa({
|
|
|
752
752
|
s.style("transition: transform 0.2s ease-in-out"),
|
|
753
753
|
s.style(
|
|
754
754
|
g.display.map(
|
|
755
|
-
(
|
|
755
|
+
(b) => `transform: rotate(${b ? 180 : 0}deg)`
|
|
756
756
|
)
|
|
757
757
|
)
|
|
758
758
|
)
|
|
@@ -761,7 +761,7 @@ function xa({
|
|
|
761
761
|
)
|
|
762
762
|
),
|
|
763
763
|
t.menu ? p.nav(
|
|
764
|
-
Q((
|
|
764
|
+
Q((b) => f.setElement(b)),
|
|
765
765
|
v.zIndex("10"),
|
|
766
766
|
// Add ARIA attributes for navigation landmark
|
|
767
767
|
A.label(r.$.mainNavigation),
|
|
@@ -769,7 +769,7 @@ function xa({
|
|
|
769
769
|
v.overflow("hidden"),
|
|
770
770
|
s.class(
|
|
771
771
|
k.map(
|
|
772
|
-
(
|
|
772
|
+
(b) => b === "float" ? ae(
|
|
773
773
|
"right",
|
|
774
774
|
t.menu?.shadow ?? "md"
|
|
775
775
|
) : ae(
|
|
@@ -781,7 +781,7 @@ function xa({
|
|
|
781
781
|
ie(t.menu?.color ?? "white"),
|
|
782
782
|
v.height(
|
|
783
783
|
k.map(
|
|
784
|
-
(
|
|
784
|
+
(b) => b === "float" ? "auto" : "100%"
|
|
785
785
|
)
|
|
786
786
|
),
|
|
787
787
|
v.overflow("hidden"),
|
|
@@ -790,21 +790,21 @@ function xa({
|
|
|
790
790
|
w(
|
|
791
791
|
k,
|
|
792
792
|
f.status
|
|
793
|
-
)((
|
|
793
|
+
)((b, y) => b === "none" && y === "closed" ? "none" : "block")
|
|
794
794
|
),
|
|
795
795
|
v.position(
|
|
796
796
|
w(
|
|
797
797
|
k,
|
|
798
798
|
f.status
|
|
799
|
-
)((
|
|
799
|
+
)((b, y) => b === "float" || b === "none" && y !== "closed" ? "fixed" : "initial")
|
|
800
800
|
),
|
|
801
|
-
v.top(h.map((
|
|
801
|
+
v.top(h.map((b) => `${b}px`)),
|
|
802
802
|
Fe(
|
|
803
803
|
"slide-right",
|
|
804
804
|
w(
|
|
805
805
|
k,
|
|
806
806
|
f.status
|
|
807
|
-
)((
|
|
807
|
+
)((b, y) => b === "block" ? "opened" : y)
|
|
808
808
|
),
|
|
809
809
|
v.width(Ee(t.menu?.width, o.$.menuWidth)),
|
|
810
810
|
v.bottom("0"),
|
|
@@ -845,8 +845,8 @@ function xa({
|
|
|
845
845
|
t.mainFooter.content
|
|
846
846
|
) : null,
|
|
847
847
|
t.aside ? p.aside(
|
|
848
|
-
Q((
|
|
849
|
-
g.setElement(
|
|
848
|
+
Q((b) => {
|
|
849
|
+
g.setElement(b);
|
|
850
850
|
}),
|
|
851
851
|
v.zIndex("10"),
|
|
852
852
|
// Add ARIA attributes for aside landmark
|
|
@@ -854,7 +854,7 @@ function xa({
|
|
|
854
854
|
s.role("complementary"),
|
|
855
855
|
s.class(
|
|
856
856
|
C.map(
|
|
857
|
-
(
|
|
857
|
+
(b) => b === "float" ? ae("left", "md") : ae("left", "none")
|
|
858
858
|
)
|
|
859
859
|
),
|
|
860
860
|
ie("white"),
|
|
@@ -864,26 +864,26 @@ function xa({
|
|
|
864
864
|
w(
|
|
865
865
|
C,
|
|
866
866
|
g.status
|
|
867
|
-
)((
|
|
867
|
+
)((b, y) => b === "none" && y === "closed" ? "none" : "block")
|
|
868
868
|
),
|
|
869
869
|
v.position(
|
|
870
870
|
w(
|
|
871
871
|
C,
|
|
872
872
|
g.status
|
|
873
|
-
)((
|
|
873
|
+
)((b, y) => b === "float" || b === "none" && y !== "closed" ? "fixed" : "initial")
|
|
874
874
|
),
|
|
875
|
-
v.top(h.map((
|
|
875
|
+
v.top(h.map((b) => `${b}px`)),
|
|
876
876
|
Fe(
|
|
877
877
|
"slide-left",
|
|
878
878
|
w(
|
|
879
879
|
C,
|
|
880
880
|
g.status
|
|
881
|
-
)((
|
|
881
|
+
)((b, y) => b === "block" ? "opened" : y)
|
|
882
882
|
),
|
|
883
883
|
v.width(
|
|
884
884
|
Ee(t.aside?.width, o.$.asideWidth)
|
|
885
885
|
),
|
|
886
|
-
v.bottom(h.map((
|
|
886
|
+
v.bottom(h.map((b) => `${b}px`)),
|
|
887
887
|
t.aside.content
|
|
888
888
|
) : null,
|
|
889
889
|
t.footer ? p.footer(
|
|
@@ -928,10 +928,10 @@ function Vn({ open: e }, ...n) {
|
|
|
928
928
|
o != null && c.set(o);
|
|
929
929
|
}), a.on((o) => {
|
|
930
930
|
if (t && o === "start-opening") {
|
|
931
|
-
const d = t.style.height,
|
|
931
|
+
const d = t.style.height, m = t.style.transition;
|
|
932
932
|
t.style.transition = "none", t.style.height = "auto", t.offsetHeight;
|
|
933
933
|
const x = t.scrollHeight;
|
|
934
|
-
x > 0 && c.set(x), t.style.height = d, t.style.transition =
|
|
934
|
+
x > 0 && c.set(x), t.style.height = d, t.style.transition = m, t.offsetHeight;
|
|
935
935
|
}
|
|
936
936
|
}), M(
|
|
937
937
|
W(r),
|
|
@@ -963,13 +963,13 @@ function Sa({
|
|
|
963
963
|
footerHeight: i = 0,
|
|
964
964
|
bottomStart: o,
|
|
965
965
|
bottomEnd: d,
|
|
966
|
-
sidebarStart:
|
|
966
|
+
sidebarStart: m,
|
|
967
967
|
sidebarStartWidth: x = 0,
|
|
968
968
|
sidebarEnd: f,
|
|
969
969
|
sidebarEndWidth: g = 0,
|
|
970
970
|
anchorMode: h = "container-edge"
|
|
971
971
|
}) {
|
|
972
|
-
const k = j(0n), C = j(0n),
|
|
972
|
+
const k = j(0n), C = j(0n), b = lt(l), y = lt(x), D = j(16);
|
|
973
973
|
return p.div(
|
|
974
974
|
W(
|
|
975
975
|
k.dispose,
|
|
@@ -1018,8 +1018,8 @@ function Sa({
|
|
|
1018
1018
|
P,
|
|
1019
1019
|
g
|
|
1020
1020
|
)(($, B, R, K) => {
|
|
1021
|
-
const ee = $ + Number(B), le = $ + R,
|
|
1022
|
-
return `${Math.max($ + K,
|
|
1021
|
+
const ee = $ + Number(B), le = $ + R, Be = Math.min(ee, le);
|
|
1022
|
+
return `${Math.max($ + K, Be)}px`;
|
|
1023
1023
|
})
|
|
1024
1024
|
),
|
|
1025
1025
|
() => v.right("0")
|
|
@@ -1035,8 +1035,8 @@ function Sa({
|
|
|
1035
1035
|
H,
|
|
1036
1036
|
i
|
|
1037
1037
|
)(($, B, R, K) => {
|
|
1038
|
-
const ee = $ + Number(B), le = $ + R,
|
|
1039
|
-
return `${Math.max($ + K,
|
|
1038
|
+
const ee = $ + Number(B), le = $ + R, Be = Math.min(ee, le);
|
|
1039
|
+
return `${Math.max($ + K, Be)}px`;
|
|
1040
1040
|
})
|
|
1041
1041
|
),
|
|
1042
1042
|
() => v.bottom("0")
|
|
@@ -1060,16 +1060,16 @@ function Sa({
|
|
|
1060
1060
|
C.map(($) => `translateX(-${$}px)`)
|
|
1061
1061
|
), Ye = v.transform(
|
|
1062
1062
|
k.map(($) => `translateY(-${$}px)`)
|
|
1063
|
-
),
|
|
1063
|
+
), Ae = w(
|
|
1064
1064
|
t,
|
|
1065
1065
|
H
|
|
1066
|
-
)(($, B) => $ - BigInt(Math.max(1, B))),
|
|
1066
|
+
)(($, B) => $ - BigInt(Math.max(1, B))), Le = w(
|
|
1067
1067
|
n,
|
|
1068
1068
|
P
|
|
1069
1069
|
)(($, B) => $ - BigInt(Math.max(1, B)));
|
|
1070
1070
|
let ge = null, Se = 0, Ce = 0;
|
|
1071
1071
|
const Ut = () => {
|
|
1072
|
-
const $ =
|
|
1072
|
+
const $ = Ae.value, B = Le.value, R = L.value, K = _.value;
|
|
1073
1073
|
if (R && Ce !== 0) {
|
|
1074
1074
|
const ee = at(
|
|
1075
1075
|
ke(0n, $),
|
|
@@ -1100,8 +1100,8 @@ function Sa({
|
|
|
1100
1100
|
L.on(($) => {
|
|
1101
1101
|
$ || k.set(0n);
|
|
1102
1102
|
}),
|
|
1103
|
+
Ae.dispose,
|
|
1103
1104
|
Le.dispose,
|
|
1104
|
-
Be.dispose,
|
|
1105
1105
|
() => {
|
|
1106
1106
|
ge && clearTimeout(ge);
|
|
1107
1107
|
}
|
|
@@ -1147,23 +1147,23 @@ function Sa({
|
|
|
1147
1147
|
u
|
|
1148
1148
|
) : null,
|
|
1149
1149
|
// middle-start sidebar
|
|
1150
|
-
|
|
1150
|
+
m != null ? p.div(
|
|
1151
1151
|
s.class("bc-nine-slice-pane bc-nine-slice-sidebar-start"),
|
|
1152
1152
|
v.left("0"),
|
|
1153
|
-
v.top(
|
|
1153
|
+
v.top(b),
|
|
1154
1154
|
// style.height(visibleAreaHeightPx),
|
|
1155
1155
|
// style.width(sidebarStartWidthPx),
|
|
1156
1156
|
p.div(
|
|
1157
1157
|
s.class("bc-nine-slice-pane-content"),
|
|
1158
1158
|
Ye,
|
|
1159
|
-
|
|
1159
|
+
m
|
|
1160
1160
|
)
|
|
1161
1161
|
) : null,
|
|
1162
1162
|
// middle-center (main body)
|
|
1163
1163
|
p.div(
|
|
1164
1164
|
s.class("bc-nine-slice-pane bc-nine-slice-body"),
|
|
1165
1165
|
v.left(y),
|
|
1166
|
-
v.top(
|
|
1166
|
+
v.top(b),
|
|
1167
1167
|
// style.width(visibleAreaWidth.map(toPx)),
|
|
1168
1168
|
// style.height(visibleAreaHeight.map(toPx)),
|
|
1169
1169
|
p.div(
|
|
@@ -1176,7 +1176,7 @@ function Sa({
|
|
|
1176
1176
|
f != null ? p.div(
|
|
1177
1177
|
s.class("bc-nine-slice-pane bc-nine-slice-sidebar-end"),
|
|
1178
1178
|
fe,
|
|
1179
|
-
v.top(
|
|
1179
|
+
v.top(b),
|
|
1180
1180
|
// style.height(visibleAreaHeightPx),
|
|
1181
1181
|
// style.width(sidebarEndWidthPx),
|
|
1182
1182
|
p.div(
|
|
@@ -1247,7 +1247,7 @@ function Sa({
|
|
|
1247
1247
|
T.scroll(($) => {
|
|
1248
1248
|
const B = $.target, R = B.scrollLeft, K = B.scrollWidth - B.clientWidth;
|
|
1249
1249
|
if (K > 0) {
|
|
1250
|
-
const ee = R / K, le =
|
|
1250
|
+
const ee = R / K, le = Le.value;
|
|
1251
1251
|
C.set(
|
|
1252
1252
|
BigInt(Math.round(Number(le) * ee))
|
|
1253
1253
|
);
|
|
@@ -1289,7 +1289,7 @@ function Sa({
|
|
|
1289
1289
|
T.scroll(($) => {
|
|
1290
1290
|
const B = $.target, R = B.scrollTop, K = B.scrollHeight - B.clientHeight;
|
|
1291
1291
|
if (K > 0) {
|
|
1292
|
-
const ee = R / K, le =
|
|
1292
|
+
const ee = R / K, le = Ae.value;
|
|
1293
1293
|
k.set(
|
|
1294
1294
|
BigInt(Math.round(Number(le) * ee))
|
|
1295
1295
|
);
|
|
@@ -1331,7 +1331,7 @@ function rt({ header: e, footer: n, body: t, shadowOnScroll: a = !0 }, ...l) {
|
|
|
1331
1331
|
p.div(
|
|
1332
1332
|
s.class("bc-scrollable-panel__body"),
|
|
1333
1333
|
Q(
|
|
1334
|
-
(i) => W(
|
|
1334
|
+
(i) => W(Te(() => u(i)))
|
|
1335
1335
|
),
|
|
1336
1336
|
T.scroll((i) => {
|
|
1337
1337
|
const o = i.target;
|
|
@@ -1407,52 +1407,52 @@ const ue = {
|
|
|
1407
1407
|
onBeforeOpen: c,
|
|
1408
1408
|
onAfterOpen: i,
|
|
1409
1409
|
buildListboxContent: o
|
|
1410
|
-
} = e, d = j(!1),
|
|
1410
|
+
} = e, d = j(!1), m = j(-1), x = j(null), f = re("dropdown"), g = re("listbox");
|
|
1411
1411
|
let h, k;
|
|
1412
1412
|
const C = (y) => {
|
|
1413
|
-
n?.(y), d.set(!1),
|
|
1414
|
-
},
|
|
1413
|
+
n?.(y), d.set(!1), m.set(-1), x.set(null), h?.focus();
|
|
1414
|
+
}, b = (y) => {
|
|
1415
1415
|
const D = ue.getValues(S.get(r));
|
|
1416
1416
|
switch (y.key) {
|
|
1417
1417
|
case "ArrowDown": {
|
|
1418
1418
|
if (y.preventDefault(), !d.value)
|
|
1419
|
-
d.set(!0), D.length > 0 && (
|
|
1419
|
+
d.set(!0), D.length > 0 && (m.set(0), x.set(D[0]));
|
|
1420
1420
|
else {
|
|
1421
1421
|
const V = Math.min(
|
|
1422
|
-
|
|
1422
|
+
m.value + 1,
|
|
1423
1423
|
D.length - 1
|
|
1424
1424
|
);
|
|
1425
|
-
|
|
1425
|
+
m.set(V), x.set(D[V] ?? null);
|
|
1426
1426
|
}
|
|
1427
1427
|
break;
|
|
1428
1428
|
}
|
|
1429
1429
|
case "ArrowUp": {
|
|
1430
1430
|
if (y.preventDefault(), d.value) {
|
|
1431
|
-
const V = Math.max(
|
|
1432
|
-
|
|
1431
|
+
const V = Math.max(m.value - 1, 0);
|
|
1432
|
+
m.set(V), x.set(D[V] ?? null);
|
|
1433
1433
|
}
|
|
1434
1434
|
break;
|
|
1435
1435
|
}
|
|
1436
1436
|
case "Enter": {
|
|
1437
|
-
if (y.preventDefault(), d.value &&
|
|
1438
|
-
const V = D[
|
|
1437
|
+
if (y.preventDefault(), d.value && m.value >= 0) {
|
|
1438
|
+
const V = D[m.value];
|
|
1439
1439
|
V != null && C(V);
|
|
1440
1440
|
} else {
|
|
1441
1441
|
c?.();
|
|
1442
1442
|
const V = ue.getValues(S.get(r));
|
|
1443
|
-
d.set(!0), V.length > 0 && (
|
|
1443
|
+
d.set(!0), V.length > 0 && (m.set(0), x.set(V[0])), setTimeout(() => i?.(), 0);
|
|
1444
1444
|
}
|
|
1445
1445
|
break;
|
|
1446
1446
|
}
|
|
1447
1447
|
case "Escape": {
|
|
1448
|
-
d.value && (y.preventDefault(), d.set(!1),
|
|
1448
|
+
d.value && (y.preventDefault(), d.set(!1), m.set(-1), x.set(null), h?.focus());
|
|
1449
1449
|
break;
|
|
1450
1450
|
}
|
|
1451
1451
|
case " ": {
|
|
1452
1452
|
if (S.get(u)) {
|
|
1453
1453
|
y.preventDefault();
|
|
1454
1454
|
const V = ue.getValues(S.get(r));
|
|
1455
|
-
d.set(!d.value), d.value && V.length > 0 && (
|
|
1455
|
+
d.set(!d.value), d.value && V.length > 0 && (m.set(0), x.set(V[0]));
|
|
1456
1456
|
}
|
|
1457
1457
|
break;
|
|
1458
1458
|
}
|
|
@@ -1471,8 +1471,8 @@ const ue = {
|
|
|
1471
1471
|
)
|
|
1472
1472
|
},
|
|
1473
1473
|
xe((y) => M(
|
|
1474
|
-
Q((D) => (h = D, D.addEventListener("keydown",
|
|
1475
|
-
() => D.removeEventListener("keydown",
|
|
1474
|
+
Q((D) => (h = D, D.addEventListener("keydown", b), W(
|
|
1475
|
+
() => D.removeEventListener("keydown", b)
|
|
1476
1476
|
))),
|
|
1477
1477
|
G(e),
|
|
1478
1478
|
s.id(f),
|
|
@@ -1491,10 +1491,10 @@ const ue = {
|
|
|
1491
1491
|
),
|
|
1492
1492
|
t != null ? T.blur(() => {
|
|
1493
1493
|
setTimeout(() => {
|
|
1494
|
-
k?.contains(document.activeElement) || (d.set(!1),
|
|
1494
|
+
k?.contains(document.activeElement) || (d.set(!1), m.set(-1), t());
|
|
1495
1495
|
}, 100);
|
|
1496
1496
|
}) : O,
|
|
1497
|
-
|
|
1497
|
+
Ve({
|
|
1498
1498
|
content: () => p.div(
|
|
1499
1499
|
Q((D) => {
|
|
1500
1500
|
k = D;
|
|
@@ -1508,7 +1508,7 @@ const ue = {
|
|
|
1508
1508
|
dropdownId: f,
|
|
1509
1509
|
listboxId: g,
|
|
1510
1510
|
focusedValue: x,
|
|
1511
|
-
handleKeyDown:
|
|
1511
|
+
handleKeyDown: b,
|
|
1512
1512
|
onSelect: C
|
|
1513
1513
|
})
|
|
1514
1514
|
),
|
|
@@ -1518,7 +1518,7 @@ const ue = {
|
|
|
1518
1518
|
showOn: (D, V) => {
|
|
1519
1519
|
const N = V;
|
|
1520
1520
|
V = () => {
|
|
1521
|
-
d.set(!1),
|
|
1521
|
+
d.set(!1), m.set(-1), x.set(null), N();
|
|
1522
1522
|
};
|
|
1523
1523
|
const I = () => {
|
|
1524
1524
|
if (d.value)
|
|
@@ -1526,7 +1526,7 @@ const ue = {
|
|
|
1526
1526
|
else {
|
|
1527
1527
|
c?.();
|
|
1528
1528
|
const _ = ue.getValues(S.get(r));
|
|
1529
|
-
d.set(!0), _.length > 0 && (
|
|
1529
|
+
d.set(!0), _.length > 0 && (m.set(0), x.set(_[0])), D(), setTimeout(() => i?.(), 0);
|
|
1530
1530
|
}
|
|
1531
1531
|
};
|
|
1532
1532
|
return T.click(I);
|
|
@@ -1537,7 +1537,7 @@ const ue = {
|
|
|
1537
1537
|
})
|
|
1538
1538
|
))
|
|
1539
1539
|
);
|
|
1540
|
-
}, _t = (e, n, t, a, l) =>
|
|
1540
|
+
}, _t = (e, n, t, a, l) => De(
|
|
1541
1541
|
e,
|
|
1542
1542
|
(r) => bt(r, {
|
|
1543
1543
|
value: (u) => {
|
|
@@ -1557,9 +1557,9 @@ const ue = {
|
|
|
1557
1557
|
c,
|
|
1558
1558
|
i,
|
|
1559
1559
|
u
|
|
1560
|
-
)((o, d,
|
|
1560
|
+
)((o, d, m) => {
|
|
1561
1561
|
const x = [];
|
|
1562
|
-
return o && x.push("bc-dropdown__option--selected"), d && x.push("bc-dropdown__option--focused"),
|
|
1562
|
+
return o && x.push("bc-dropdown__option--selected"), d && x.push("bc-dropdown__option--focused"), m.disabled && x.push("bc-dropdown__option--disabled"), x.join(" ");
|
|
1563
1563
|
})
|
|
1564
1564
|
),
|
|
1565
1565
|
s.role("option"),
|
|
@@ -1616,17 +1616,17 @@ const ue = {
|
|
|
1616
1616
|
t
|
|
1617
1617
|
)((o, d) => {
|
|
1618
1618
|
if (o == null) return "";
|
|
1619
|
-
const
|
|
1619
|
+
const m = (x) => {
|
|
1620
1620
|
for (const f of x) {
|
|
1621
1621
|
if (f.type === "value" && l(f.value, o))
|
|
1622
1622
|
return f.label;
|
|
1623
1623
|
if (f.type === "group") {
|
|
1624
|
-
const g =
|
|
1624
|
+
const g = m(f.options);
|
|
1625
1625
|
if (g) return g;
|
|
1626
1626
|
}
|
|
1627
1627
|
}
|
|
1628
1628
|
};
|
|
1629
|
-
return
|
|
1629
|
+
return m(d) || String(o);
|
|
1630
1630
|
}), i = w(u)((o) => !o);
|
|
1631
1631
|
return Tt({
|
|
1632
1632
|
...e,
|
|
@@ -1643,7 +1643,7 @@ const ue = {
|
|
|
1643
1643
|
allowSpaceToggle: i,
|
|
1644
1644
|
buildListboxContent: ({ focusedValue: o, onSelect: d }) => be(
|
|
1645
1645
|
t,
|
|
1646
|
-
(
|
|
1646
|
+
(m) => _t(m, l, n, d, o)
|
|
1647
1647
|
)
|
|
1648
1648
|
});
|
|
1649
1649
|
}, Mn = (e) => {
|
|
@@ -1657,18 +1657,18 @@ const ue = {
|
|
|
1657
1657
|
}, ka = (e) => Ue({
|
|
1658
1658
|
...e,
|
|
1659
1659
|
content: Mn(e)
|
|
1660
|
-
}), Dt = (e, n, t, a, l, r) =>
|
|
1660
|
+
}), Dt = (e, n, t, a, l, r) => De(
|
|
1661
1661
|
e,
|
|
1662
1662
|
(u) => bt(u, {
|
|
1663
1663
|
value: (c) => {
|
|
1664
1664
|
const i = w(
|
|
1665
1665
|
c,
|
|
1666
1666
|
t
|
|
1667
|
-
)((d,
|
|
1667
|
+
)((d, m) => n(d.value, m)), o = w(
|
|
1668
1668
|
c,
|
|
1669
1669
|
l
|
|
1670
1670
|
)(
|
|
1671
|
-
(d,
|
|
1671
|
+
(d, m) => m != null && n(d.value, m)
|
|
1672
1672
|
);
|
|
1673
1673
|
return p.div(
|
|
1674
1674
|
W(i.dispose),
|
|
@@ -1679,9 +1679,9 @@ const ue = {
|
|
|
1679
1679
|
i,
|
|
1680
1680
|
o,
|
|
1681
1681
|
c
|
|
1682
|
-
)((d,
|
|
1682
|
+
)((d, m, x) => {
|
|
1683
1683
|
const f = [];
|
|
1684
|
-
return d && f.push("bc-dropdown__option--selected"),
|
|
1684
|
+
return d && f.push("bc-dropdown__option--selected"), m && f.push("bc-dropdown__option--focused"), x.disabled && f.push("bc-dropdown__option--disabled"), f.join(" ");
|
|
1685
1685
|
})
|
|
1686
1686
|
),
|
|
1687
1687
|
s.role("option"),
|
|
@@ -1734,24 +1734,24 @@ const ue = {
|
|
|
1734
1734
|
loadOptions: t,
|
|
1735
1735
|
renderOption: a,
|
|
1736
1736
|
renderValue: l,
|
|
1737
|
-
equality: r = (
|
|
1737
|
+
equality: r = (b, y) => b === y,
|
|
1738
1738
|
placeholder: u,
|
|
1739
1739
|
searchPlaceholder: c,
|
|
1740
1740
|
debounceMs: i = 150
|
|
1741
|
-
} = e, o = j(""), d = j(!1),
|
|
1741
|
+
} = e, o = j(""), d = j(!1), m = j([]);
|
|
1742
1742
|
let x;
|
|
1743
1743
|
const f = S.toSignal(n), g = () => (l ?? a)(f);
|
|
1744
1744
|
let h = null;
|
|
1745
|
-
const k = (
|
|
1746
|
-
d.set(!0), Promise.resolve(t(
|
|
1747
|
-
|
|
1745
|
+
const k = (b) => {
|
|
1746
|
+
d.set(!0), Promise.resolve(t(b)).then((y) => {
|
|
1747
|
+
m.set(y ?? []);
|
|
1748
1748
|
}).catch(() => {
|
|
1749
|
-
|
|
1749
|
+
m.set([]);
|
|
1750
1750
|
}).finally(() => d.set(!1));
|
|
1751
|
-
}, C = (
|
|
1751
|
+
}, C = (b) => {
|
|
1752
1752
|
h != null && (clearTimeout(h), h = null), h = setTimeout(
|
|
1753
1753
|
() => {
|
|
1754
|
-
k(
|
|
1754
|
+
k(b);
|
|
1755
1755
|
},
|
|
1756
1756
|
Math.max(0, i)
|
|
1757
1757
|
);
|
|
@@ -1760,19 +1760,19 @@ const ue = {
|
|
|
1760
1760
|
...e,
|
|
1761
1761
|
role: "combobox",
|
|
1762
1762
|
display: te(
|
|
1763
|
-
w(n)((
|
|
1763
|
+
w(n)((b) => b != null),
|
|
1764
1764
|
g,
|
|
1765
|
-
() => Y(ne, (
|
|
1765
|
+
() => Y(ne, (b) => b.$.selectOne)
|
|
1766
1766
|
),
|
|
1767
|
-
optionsSource:
|
|
1767
|
+
optionsSource: m,
|
|
1768
1768
|
onBeforeOpen: () => {
|
|
1769
|
-
const
|
|
1770
|
-
C(
|
|
1769
|
+
const b = S.get(o);
|
|
1770
|
+
C(b);
|
|
1771
1771
|
},
|
|
1772
1772
|
onAfterOpen: () => {
|
|
1773
1773
|
x?.focus();
|
|
1774
1774
|
},
|
|
1775
|
-
buildListboxContent: ({ focusedValue:
|
|
1775
|
+
buildListboxContent: ({ focusedValue: b, handleKeyDown: y, onSelect: D }) => M(
|
|
1776
1776
|
// Search input at the top
|
|
1777
1777
|
p.div(
|
|
1778
1778
|
s.class("bc-dropdown__search"),
|
|
@@ -1801,13 +1801,13 @@ const ue = {
|
|
|
1801
1801
|
U({ icon: "ph:spinner-bold", color: "neutral" })
|
|
1802
1802
|
),
|
|
1803
1803
|
() => be(
|
|
1804
|
-
|
|
1804
|
+
m,
|
|
1805
1805
|
(V) => Dt(
|
|
1806
1806
|
V,
|
|
1807
1807
|
r,
|
|
1808
1808
|
f,
|
|
1809
1809
|
D,
|
|
1810
|
-
|
|
1810
|
+
b,
|
|
1811
1811
|
a
|
|
1812
1812
|
)
|
|
1813
1813
|
)
|
|
@@ -1838,14 +1838,14 @@ function Vt(e) {
|
|
|
1838
1838
|
closable: i = !0,
|
|
1839
1839
|
onClose: o,
|
|
1840
1840
|
onAction: d,
|
|
1841
|
-
ariaLabel:
|
|
1841
|
+
ariaLabel: m,
|
|
1842
1842
|
ariaLabelledBy: x
|
|
1843
1843
|
} = e, f = re("menu"), g = j(-1), h = j([]);
|
|
1844
1844
|
let k = null;
|
|
1845
|
-
return
|
|
1845
|
+
return Ve({
|
|
1846
1846
|
content: () => Q((C) => {
|
|
1847
1847
|
k = document.activeElement;
|
|
1848
|
-
const
|
|
1848
|
+
const b = (I, _, L) => {
|
|
1849
1849
|
if (_.length === 0) return -1;
|
|
1850
1850
|
let P = I + L, H = 0;
|
|
1851
1851
|
for (; H < _.length; ) {
|
|
@@ -1861,12 +1861,12 @@ function Vt(e) {
|
|
|
1861
1861
|
switch (I.key) {
|
|
1862
1862
|
case "ArrowDown":
|
|
1863
1863
|
I.preventDefault(), I.stopPropagation();
|
|
1864
|
-
const P =
|
|
1864
|
+
const P = b(L, _, 1);
|
|
1865
1865
|
D(P, _);
|
|
1866
1866
|
break;
|
|
1867
1867
|
case "ArrowUp":
|
|
1868
1868
|
I.preventDefault(), I.stopPropagation();
|
|
1869
|
-
const H =
|
|
1869
|
+
const H = b(L, _, -1);
|
|
1870
1870
|
D(H, _);
|
|
1871
1871
|
break;
|
|
1872
1872
|
case "Enter":
|
|
@@ -1926,7 +1926,7 @@ function Vt(e) {
|
|
|
1926
1926
|
s.role("menu"),
|
|
1927
1927
|
s.tabindex(-1),
|
|
1928
1928
|
A.orientation("vertical"),
|
|
1929
|
-
|
|
1929
|
+
m ? A.label(m) : M(),
|
|
1930
1930
|
x ? A.labelledby(x) : M(),
|
|
1931
1931
|
A.activedescendant(
|
|
1932
1932
|
g.map((I) => {
|
|
@@ -1979,14 +1979,14 @@ function $a(e) {
|
|
|
1979
1979
|
ariaLabel: c,
|
|
1980
1980
|
submenu: i,
|
|
1981
1981
|
submenuPlacement: o = "right-start"
|
|
1982
|
-
} = e, d = n ?? re("menu-item"),
|
|
1982
|
+
} = e, d = n ?? re("menu-item"), m = `menu-item-${d}`, x = i != null;
|
|
1983
1983
|
return p.div(
|
|
1984
1984
|
s.class(
|
|
1985
1985
|
w(r)(
|
|
1986
1986
|
(f) => `bc-menu-item ${f ? "bc-menu-item--disabled" : ""} ${x ? "bc-menu-item--has-submenu" : ""}`
|
|
1987
1987
|
)
|
|
1988
1988
|
),
|
|
1989
|
-
s.id(
|
|
1989
|
+
s.id(m),
|
|
1990
1990
|
s.role("menuitem"),
|
|
1991
1991
|
s.tabindex(-1),
|
|
1992
1992
|
He.key(d),
|
|
@@ -2009,7 +2009,7 @@ function $a(e) {
|
|
|
2009
2009
|
// End content
|
|
2010
2010
|
l && p.span(s.class("bc-menu-item__end"), l),
|
|
2011
2011
|
// Submenu (if present)
|
|
2012
|
-
x && i ?
|
|
2012
|
+
x && i ? Ve({
|
|
2013
2013
|
content: () => M(
|
|
2014
2014
|
s.class("bc-menu bc-submenu"),
|
|
2015
2015
|
s.role("menu"),
|
|
@@ -2110,25 +2110,25 @@ function Et(e) {
|
|
|
2110
2110
|
}, c = (o) => w(n)((d) => Mt(d, o, a)), i = Vt({
|
|
2111
2111
|
items: () => {
|
|
2112
2112
|
const o = S.get(t), d = [];
|
|
2113
|
-
for (const
|
|
2114
|
-
if (
|
|
2115
|
-
const x = c(
|
|
2113
|
+
for (const m of o)
|
|
2114
|
+
if (m.type === "value") {
|
|
2115
|
+
const x = c(m.value);
|
|
2116
2116
|
d.push(
|
|
2117
2117
|
p.div(
|
|
2118
2118
|
s.role("menuitem"),
|
|
2119
2119
|
s.tabindex(-1),
|
|
2120
|
-
A.disabled(
|
|
2120
|
+
A.disabled(m.disabled === !0),
|
|
2121
2121
|
A.checked(x),
|
|
2122
2122
|
s.class("bc-menu-item"),
|
|
2123
|
-
p.span(s.class("bc-menu-item__content"),
|
|
2124
|
-
T.click(() => u(
|
|
2123
|
+
p.span(s.class("bc-menu-item__content"), m.label),
|
|
2124
|
+
T.click(() => u(m.value))
|
|
2125
2125
|
)
|
|
2126
2126
|
);
|
|
2127
|
-
} else
|
|
2127
|
+
} else m.type === "group" ? d.push(
|
|
2128
2128
|
p.div(
|
|
2129
2129
|
s.class("bc-menu-group"),
|
|
2130
|
-
p.div(s.class("bc-menu-group__label"),
|
|
2131
|
-
...
|
|
2130
|
+
p.div(s.class("bc-menu-group__label"), m.group),
|
|
2131
|
+
...m.options.map((x) => {
|
|
2132
2132
|
if (x.type === "value") {
|
|
2133
2133
|
const f = c(x.value);
|
|
2134
2134
|
return p.div(
|
|
@@ -2198,12 +2198,12 @@ function Ft(e) {
|
|
|
2198
2198
|
}, o = (f) => {
|
|
2199
2199
|
const g = S.get(n);
|
|
2200
2200
|
e.onChange?.(Lt(g, f, a));
|
|
2201
|
-
}, d = (f) => w(n)((g) => Mt(g, f, a)),
|
|
2201
|
+
}, d = (f) => w(n)((g) => Mt(g, f, a)), m = w(
|
|
2202
2202
|
t,
|
|
2203
2203
|
c
|
|
2204
2204
|
)((f, g) => Nt(f, g, u)), x = Vt({
|
|
2205
2205
|
items: () => {
|
|
2206
|
-
const f = [], g = S.get(
|
|
2206
|
+
const f = [], g = S.get(m);
|
|
2207
2207
|
if (g.length === 0)
|
|
2208
2208
|
return f.push(
|
|
2209
2209
|
p.div(
|
|
@@ -2406,11 +2406,11 @@ const Aa = (e) => {
|
|
|
2406
2406
|
const g = w(
|
|
2407
2407
|
n,
|
|
2408
2408
|
a
|
|
2409
|
-
)((C,
|
|
2409
|
+
)((C, b) => b == null ? !0 : (C ?? 0n) > b), h = w(
|
|
2410
2410
|
n,
|
|
2411
2411
|
l
|
|
2412
|
-
)((C,
|
|
2413
|
-
const y = S.get(n) ?? 0n, D = S.get(t), V =
|
|
2412
|
+
)((C, b) => b == null ? !0 : (C ?? 0n) < b), k = (C, b) => {
|
|
2413
|
+
const y = S.get(n) ?? 0n, D = S.get(t), V = b?.shiftKey ? 10n : 1n, N = y + D * V * C, I = a != null ? S.get(a) : void 0, _ = l != null ? S.get(l) : void 0;
|
|
2414
2414
|
if (C < 0n && I != null && N < I || C > 0n && _ != null && N > _) return;
|
|
2415
2415
|
const L = i(N);
|
|
2416
2416
|
L !== y && r && r(L);
|
|
@@ -2426,7 +2426,7 @@ const Aa = (e) => {
|
|
|
2426
2426
|
w(
|
|
2427
2427
|
h,
|
|
2428
2428
|
e.disabled ?? !1
|
|
2429
|
-
)((C,
|
|
2429
|
+
)((C, b) => !C || b)
|
|
2430
2430
|
),
|
|
2431
2431
|
T.click((C) => k(1n, C)),
|
|
2432
2432
|
A.label(f.$.incrementValue),
|
|
@@ -2441,14 +2441,14 @@ const Aa = (e) => {
|
|
|
2441
2441
|
w(
|
|
2442
2442
|
g,
|
|
2443
2443
|
e.disabled ?? !1
|
|
2444
|
-
)((C,
|
|
2444
|
+
)((C, b) => !C || b)
|
|
2445
2445
|
),
|
|
2446
2446
|
T.click((C) => k(-1n, C)),
|
|
2447
2447
|
A.label(f.$.decrementValue),
|
|
2448
2448
|
U({ icon: "line-md:minus", size: "xs" })
|
|
2449
2449
|
)
|
|
2450
2450
|
);
|
|
2451
|
-
}) : null, d = c != null && o != null ? M(o, c) : c ?? o,
|
|
2451
|
+
}) : null, d = c != null && o != null ? M(o, c) : c ?? o, m = r ? (f) => {
|
|
2452
2452
|
const g = ot(f);
|
|
2453
2453
|
g != null && r(i(g));
|
|
2454
2454
|
} : void 0, x = u ? (f) => {
|
|
@@ -2458,7 +2458,7 @@ const Aa = (e) => {
|
|
|
2458
2458
|
return me({
|
|
2459
2459
|
...e,
|
|
2460
2460
|
value: S.map(n, (f) => f.toString()),
|
|
2461
|
-
onChange:
|
|
2461
|
+
onChange: m,
|
|
2462
2462
|
onInput: x,
|
|
2463
2463
|
after: d,
|
|
2464
2464
|
mask: null,
|
|
@@ -2480,18 +2480,18 @@ const Aa = (e) => {
|
|
|
2480
2480
|
const h = w(
|
|
2481
2481
|
n,
|
|
2482
2482
|
a
|
|
2483
|
-
)((
|
|
2484
|
-
const D =
|
|
2483
|
+
)((b, y) => {
|
|
2484
|
+
const D = b ?? 0n;
|
|
2485
2485
|
return y == null ? !0 : D > y;
|
|
2486
2486
|
}), k = w(
|
|
2487
2487
|
n,
|
|
2488
2488
|
l
|
|
2489
|
-
)((
|
|
2490
|
-
const D =
|
|
2489
|
+
)((b, y) => {
|
|
2490
|
+
const D = b ?? 0n;
|
|
2491
2491
|
return y == null ? !0 : D < y;
|
|
2492
|
-
}), C = (
|
|
2493
|
-
const D = S.get(n) ?? 0n, V = S.get(t), N = y?.shiftKey ? 10n : 1n, I = D + V * N *
|
|
2494
|
-
if (
|
|
2492
|
+
}), C = (b, y) => {
|
|
2493
|
+
const D = S.get(n) ?? 0n, V = S.get(t), N = y?.shiftKey ? 10n : 1n, I = D + V * N * b, _ = a != null ? S.get(a) : void 0, L = l != null ? S.get(l) : void 0;
|
|
2494
|
+
if (b < 0n && _ != null && I < _ || b > 0n && L != null && I > L) return;
|
|
2495
2495
|
const P = i(I);
|
|
2496
2496
|
P !== D && r && r(P);
|
|
2497
2497
|
};
|
|
@@ -2506,9 +2506,9 @@ const Aa = (e) => {
|
|
|
2506
2506
|
w(
|
|
2507
2507
|
k,
|
|
2508
2508
|
e.disabled ?? !1
|
|
2509
|
-
)((
|
|
2509
|
+
)((b, y) => !b || y)
|
|
2510
2510
|
),
|
|
2511
|
-
T.click((
|
|
2511
|
+
T.click((b) => C(1n, b)),
|
|
2512
2512
|
A.label(g.$.incrementValue),
|
|
2513
2513
|
U({ icon: "line-md:plus", size: "xs" })
|
|
2514
2514
|
),
|
|
@@ -2521,14 +2521,14 @@ const Aa = (e) => {
|
|
|
2521
2521
|
w(
|
|
2522
2522
|
h,
|
|
2523
2523
|
e.disabled ?? !1
|
|
2524
|
-
)((
|
|
2524
|
+
)((b, y) => !b || y)
|
|
2525
2525
|
),
|
|
2526
|
-
T.click((
|
|
2526
|
+
T.click((b) => C(-1n, b)),
|
|
2527
2527
|
A.label(g.$.decrementValue),
|
|
2528
2528
|
U({ icon: "line-md:minus", size: "xs" })
|
|
2529
2529
|
)
|
|
2530
2530
|
);
|
|
2531
|
-
}) : null, d = oe(n, e.disabled, r),
|
|
2531
|
+
}) : null, d = oe(n, e.disabled, r), m = c != null && o != null ? M(o, d, c) : c != null ? M(d, c) : o != null ? M(o, d) : d, x = r ? (g) => {
|
|
2532
2532
|
const h = it(g);
|
|
2533
2533
|
r(h === null ? null : i(h));
|
|
2534
2534
|
} : void 0, f = u ? (g) => {
|
|
@@ -2540,7 +2540,7 @@ const Aa = (e) => {
|
|
|
2540
2540
|
value: S.map(n, (g) => g == null ? "" : g.toString()),
|
|
2541
2541
|
onChange: x,
|
|
2542
2542
|
onInput: f,
|
|
2543
|
-
after:
|
|
2543
|
+
after: m,
|
|
2544
2544
|
mask: null,
|
|
2545
2545
|
allowMode: "digits",
|
|
2546
2546
|
class: "bc-number-input"
|
|
@@ -2843,7 +2843,7 @@ const Aa = (e) => {
|
|
|
2843
2843
|
);
|
|
2844
2844
|
};
|
|
2845
2845
|
function es(e, n, t) {
|
|
2846
|
-
return
|
|
2846
|
+
return De(
|
|
2847
2847
|
e.value,
|
|
2848
2848
|
() => {
|
|
2849
2849
|
const a = e.transform(
|
|
@@ -2875,7 +2875,7 @@ class Rn extends tn {
|
|
|
2875
2875
|
/**
|
|
2876
2876
|
* Validates that the current value is a valid hex color
|
|
2877
2877
|
*/
|
|
2878
|
-
isValidHex = this.value.map(
|
|
2878
|
+
isValidHex = this.value.map(_e);
|
|
2879
2879
|
/**
|
|
2880
2880
|
* Gets the normalized hex color (always 6 characters with # prefix)
|
|
2881
2881
|
*/
|
|
@@ -2887,7 +2887,7 @@ class Rn extends tn {
|
|
|
2887
2887
|
* @param color - The color value to set
|
|
2888
2888
|
*/
|
|
2889
2889
|
setColor = (n) => {
|
|
2890
|
-
if (
|
|
2890
|
+
if (_e(n)) {
|
|
2891
2891
|
const t = de(n);
|
|
2892
2892
|
if (t) {
|
|
2893
2893
|
this.change(t);
|
|
@@ -3016,8 +3016,14 @@ function ls({
|
|
|
3016
3016
|
defaultAppearance: t = "system"
|
|
3017
3017
|
}, ...a) {
|
|
3018
3018
|
return Zt(({ set: l, use: r }) => {
|
|
3019
|
-
l(he, {}), l(je, {}), l(ne, {}),
|
|
3020
|
-
|
|
3019
|
+
l(he, {}), l(je, {}), l(ne, {}), l(ht, {
|
|
3020
|
+
defaultAppearance: n ? t : "light"
|
|
3021
|
+
}), Qt.attach(r(he));
|
|
3022
|
+
const u = M(
|
|
3023
|
+
n ? en() : O,
|
|
3024
|
+
jn(),
|
|
3025
|
+
...a
|
|
3026
|
+
);
|
|
3021
3027
|
return e ? Yt(
|
|
3022
3028
|
() => import("./translations-1yD6Rm5l.js"),
|
|
3023
3029
|
({ AuthI18n: c }) => ft(c, {}, () => u)
|
|
@@ -3096,7 +3102,7 @@ function Un({
|
|
|
3096
3102
|
replace: i,
|
|
3097
3103
|
target: o,
|
|
3098
3104
|
rel: d
|
|
3099
|
-
}, ...
|
|
3105
|
+
}, ...m) {
|
|
3100
3106
|
return te(
|
|
3101
3107
|
l,
|
|
3102
3108
|
() => p.span(
|
|
@@ -3111,7 +3117,7 @@ function Un({
|
|
|
3111
3117
|
(x) => ct(x ?? "base")
|
|
3112
3118
|
)
|
|
3113
3119
|
),
|
|
3114
|
-
...
|
|
3120
|
+
...m
|
|
3115
3121
|
),
|
|
3116
3122
|
() => Re(
|
|
3117
3123
|
{
|
|
@@ -3134,7 +3140,7 @@ function Un({
|
|
|
3134
3140
|
),
|
|
3135
3141
|
o ? s.target(o) : null,
|
|
3136
3142
|
d ? s.rel(d) : null,
|
|
3137
|
-
...
|
|
3143
|
+
...m
|
|
3138
3144
|
)
|
|
3139
3145
|
);
|
|
3140
3146
|
}
|
|
@@ -3161,9 +3167,9 @@ function qn(e, n, t) {
|
|
|
3161
3167
|
const o = Array.from(
|
|
3162
3168
|
new URLSearchParams(i.search).entries()
|
|
3163
3169
|
).sort(), d = Array.from(a.entries()).sort();
|
|
3164
|
-
return o.length !== d.length ? !1 : o.every(([
|
|
3170
|
+
return o.length !== d.length ? !1 : o.every(([m, x], f) => {
|
|
3165
3171
|
const [g, h] = d[f];
|
|
3166
|
-
return
|
|
3172
|
+
return m === g && x === h;
|
|
3167
3173
|
});
|
|
3168
3174
|
} catch {
|
|
3169
3175
|
return e.pathname === n;
|
|
@@ -3212,7 +3218,7 @@ function us({
|
|
|
3212
3218
|
disableWhenActive: i,
|
|
3213
3219
|
variant: o = "filled",
|
|
3214
3220
|
size: d = "md",
|
|
3215
|
-
color:
|
|
3221
|
+
color: m = "base",
|
|
3216
3222
|
roundedness: x = "sm",
|
|
3217
3223
|
disabled: f = !1
|
|
3218
3224
|
}, ...g) {
|
|
@@ -3220,7 +3226,7 @@ function us({
|
|
|
3220
3226
|
const k = c !== void 0 ? h.matchSignal(qe(e, c)) : w(h.location)(() => !1), C = w(
|
|
3221
3227
|
k,
|
|
3222
3228
|
i
|
|
3223
|
-
)((y, D) => !(D ?? !0) || !c ? !1 : y),
|
|
3229
|
+
)((y, D) => !(D ?? !0) || !c ? !1 : y), b = w(
|
|
3224
3230
|
f,
|
|
3225
3231
|
C
|
|
3226
3232
|
)((y, D) => y || D);
|
|
@@ -3235,9 +3241,9 @@ function us({
|
|
|
3235
3241
|
rel: u,
|
|
3236
3242
|
variant: o,
|
|
3237
3243
|
size: d,
|
|
3238
|
-
color:
|
|
3244
|
+
color: m,
|
|
3239
3245
|
roundedness: x,
|
|
3240
|
-
disabled:
|
|
3246
|
+
disabled: b
|
|
3241
3247
|
},
|
|
3242
3248
|
...g
|
|
3243
3249
|
);
|
|
@@ -3252,7 +3258,7 @@ function us({
|
|
|
3252
3258
|
rel: u,
|
|
3253
3259
|
variant: o,
|
|
3254
3260
|
size: d,
|
|
3255
|
-
color:
|
|
3261
|
+
color: m,
|
|
3256
3262
|
roundedness: x,
|
|
3257
3263
|
disabled: f
|
|
3258
3264
|
},
|
|
@@ -3271,10 +3277,10 @@ function dt({
|
|
|
3271
3277
|
size: i,
|
|
3272
3278
|
color: o,
|
|
3273
3279
|
roundedness: d,
|
|
3274
|
-
disabled:
|
|
3280
|
+
disabled: m
|
|
3275
3281
|
}, ...x) {
|
|
3276
3282
|
return te(
|
|
3277
|
-
|
|
3283
|
+
m ?? !1,
|
|
3278
3284
|
() => p.span(
|
|
3279
3285
|
s.class(
|
|
3280
3286
|
w(
|
|
@@ -3293,7 +3299,7 @@ function dt({
|
|
|
3293
3299
|
w(
|
|
3294
3300
|
c,
|
|
3295
3301
|
o,
|
|
3296
|
-
|
|
3302
|
+
m
|
|
3297
3303
|
)(
|
|
3298
3304
|
(f, g, h) => et(
|
|
3299
3305
|
f ?? "filled",
|
|
@@ -3331,7 +3337,7 @@ function dt({
|
|
|
3331
3337
|
w(
|
|
3332
3338
|
c,
|
|
3333
3339
|
o,
|
|
3334
|
-
|
|
3340
|
+
m
|
|
3335
3341
|
)(
|
|
3336
3342
|
(f, g, h) => et(
|
|
3337
3343
|
f ?? "filled",
|
|
@@ -3498,9 +3504,9 @@ function Qn(e, n) {
|
|
|
3498
3504
|
if (e !== "filled") return "";
|
|
3499
3505
|
const t = /* @__PURE__ */ new Map(), a = ce(n, "solid", "light"), l = ce(n, "solid", "dark");
|
|
3500
3506
|
t.set("--tabs-filled-inactive-bg", a.backgroundColor), t.set("--tabs-filled-inactive-text", "var(--color-white)");
|
|
3501
|
-
const r =
|
|
3507
|
+
const r = $e(n, "solid", "light");
|
|
3502
3508
|
t.set("--tabs-filled-inactive-bg-hover", r.backgroundColor);
|
|
3503
|
-
const u =
|
|
3509
|
+
const u = $e(n, "solid", "dark");
|
|
3504
3510
|
t.set("--tabs-filled-inactive-bg-dark-hover", u.backgroundColor), t.set("--tabs-filled-inactive-bg-dark", l.backgroundColor), t.set("--tabs-filled-inactive-text-dark", l.textColor), t.set("--tabs-filled-active-bg", "var(--color-white)"), t.set("--tabs-filled-active-text", "var(--color-base-800)"), t.set("--tabs-filled-active-bg-dark", "var(--color-base-900)");
|
|
3505
3511
|
const c = n === "white" || n === "black" || n === "transparent" ? "var(--color-white)" : cn(n, 400);
|
|
3506
3512
|
return t.set("--tabs-filled-active-text-dark", c), Array.from(t.entries()).map(([i, o]) => `${i}: ${o}`).join("; ");
|
|
@@ -3534,15 +3540,15 @@ function bs(e) {
|
|
|
3534
3540
|
orientation: i = "horizontal",
|
|
3535
3541
|
showContent: o = !0,
|
|
3536
3542
|
ariaLabel: d
|
|
3537
|
-
} = e,
|
|
3543
|
+
} = e, m = re("tablist"), x = j(-1), f = w(t)((h) => n.find((k) => k.key === h)), g = (h) => {
|
|
3538
3544
|
if (S.get(c)) return;
|
|
3539
|
-
const C = x.value,
|
|
3545
|
+
const C = x.value, b = S.get(i) === "horizontal";
|
|
3540
3546
|
let y = C;
|
|
3541
3547
|
switch (h.key) {
|
|
3542
|
-
case (
|
|
3548
|
+
case (b ? "ArrowRight" : "ArrowDown"):
|
|
3543
3549
|
h.preventDefault(), y = Ie(C, n, 1);
|
|
3544
3550
|
break;
|
|
3545
|
-
case (
|
|
3551
|
+
case (b ? "ArrowLeft" : "ArrowUp"):
|
|
3546
3552
|
h.preventDefault(), y = Ie(C, n, -1);
|
|
3547
3553
|
break;
|
|
3548
3554
|
case "Home":
|
|
@@ -3574,11 +3580,11 @@ function bs(e) {
|
|
|
3574
3580
|
c,
|
|
3575
3581
|
r
|
|
3576
3582
|
)(
|
|
3577
|
-
(h, k, C,
|
|
3583
|
+
(h, k, C, b) => Jn(
|
|
3578
3584
|
h ?? "md",
|
|
3579
3585
|
k ?? "horizontal",
|
|
3580
3586
|
C ?? !1,
|
|
3581
|
-
|
|
3587
|
+
b ?? "default"
|
|
3582
3588
|
)
|
|
3583
3589
|
)
|
|
3584
3590
|
),
|
|
@@ -3594,24 +3600,24 @@ function bs(e) {
|
|
|
3594
3600
|
p.div(
|
|
3595
3601
|
s.class("bc-tabs__list"),
|
|
3596
3602
|
s.role("tablist"),
|
|
3597
|
-
s.id(
|
|
3603
|
+
s.id(m),
|
|
3598
3604
|
A.orientation(
|
|
3599
3605
|
i ?? "horizontal"
|
|
3600
3606
|
),
|
|
3601
3607
|
d ? A.label(d) : M(),
|
|
3602
3608
|
T.keydown(g),
|
|
3603
3609
|
...n.map((h, k) => {
|
|
3604
|
-
const C = w(t)((V) => V === h.key),
|
|
3610
|
+
const C = w(t)((V) => V === h.key), b = w(
|
|
3605
3611
|
c,
|
|
3606
3612
|
h.disabled
|
|
3607
|
-
)((V, N) => V || N), y = `${
|
|
3613
|
+
)((V, N) => V || N), y = `${m}-tab-${h.key}`, D = `${m}-panel-${h.key}`;
|
|
3608
3614
|
return p.button(
|
|
3609
3615
|
s.type("button"),
|
|
3610
3616
|
s.class(
|
|
3611
3617
|
w(
|
|
3612
3618
|
l,
|
|
3613
3619
|
C,
|
|
3614
|
-
|
|
3620
|
+
b
|
|
3615
3621
|
)(
|
|
3616
3622
|
(V, N, I) => ea(
|
|
3617
3623
|
V ?? "md",
|
|
@@ -3630,8 +3636,8 @@ function bs(e) {
|
|
|
3630
3636
|
),
|
|
3631
3637
|
A.selected(C),
|
|
3632
3638
|
A.controls(D),
|
|
3633
|
-
A.disabled(
|
|
3634
|
-
s.disabled(
|
|
3639
|
+
A.disabled(b),
|
|
3640
|
+
s.disabled(b),
|
|
3635
3641
|
He["tab-index"](String(k)),
|
|
3636
3642
|
h.ariaLabel ? A.label(h.ariaLabel) : M(),
|
|
3637
3643
|
T.click((V) => {
|
|
@@ -3647,13 +3653,13 @@ function bs(e) {
|
|
|
3647
3653
|
// Panel
|
|
3648
3654
|
te(
|
|
3649
3655
|
o ?? !0,
|
|
3650
|
-
() =>
|
|
3651
|
-
const k = h.$.key, C = k.map((y) => `${
|
|
3656
|
+
() => De(f, (h) => {
|
|
3657
|
+
const k = h.$.key, C = k.map((y) => `${m}-tab-${y}`), b = k.map((y) => `${m}-panel-${y}`);
|
|
3652
3658
|
return p.div(
|
|
3653
3659
|
s.class("bc-tabs__panels"),
|
|
3654
3660
|
p.div(
|
|
3655
3661
|
s.class("bc-tabs__panel"),
|
|
3656
|
-
s.id(
|
|
3662
|
+
s.id(b),
|
|
3657
3663
|
s.role("tabpanel"),
|
|
3658
3664
|
s.tabindex(0),
|
|
3659
3665
|
A.labelledby(C),
|
|
@@ -3673,7 +3679,7 @@ function ms(e) {
|
|
|
3673
3679
|
size: i = "md",
|
|
3674
3680
|
side: o = "right",
|
|
3675
3681
|
dismissable: d = !0,
|
|
3676
|
-
showCloseButton:
|
|
3682
|
+
showCloseButton: m = !0,
|
|
3677
3683
|
onClose: x,
|
|
3678
3684
|
overlayEffect: f = "opaque",
|
|
3679
3685
|
container: g = "body",
|
|
@@ -3682,13 +3688,13 @@ function ms(e) {
|
|
|
3682
3688
|
footer: C
|
|
3683
3689
|
} = c;
|
|
3684
3690
|
a = t;
|
|
3685
|
-
const
|
|
3691
|
+
const b = j("capturing");
|
|
3686
3692
|
S.on(d, (V) => {
|
|
3687
|
-
|
|
3693
|
+
b.set(V ? "capturing" : "non-capturing");
|
|
3688
3694
|
});
|
|
3689
3695
|
const y = w(
|
|
3690
3696
|
h != null,
|
|
3691
|
-
|
|
3697
|
+
m
|
|
3692
3698
|
)((V, N) => V || N), D = Q((V) => {
|
|
3693
3699
|
const N = ve({
|
|
3694
3700
|
initialStatus: "closed",
|
|
@@ -3698,7 +3704,7 @@ function ms(e) {
|
|
|
3698
3704
|
N.close(), N.onClosed(() => {
|
|
3699
3705
|
t();
|
|
3700
3706
|
});
|
|
3701
|
-
},
|
|
3707
|
+
}, Te(() => N.open());
|
|
3702
3708
|
const _ = re("drawer"), L = h != null ? `${_}-header` : void 0, P = `${_}-body`;
|
|
3703
3709
|
return p.div(
|
|
3704
3710
|
s.class(
|
|
@@ -3737,7 +3743,7 @@ function ms(e) {
|
|
|
3737
3743
|
s.class("bc-drawer__header"),
|
|
3738
3744
|
p.div(s.id(L), h),
|
|
3739
3745
|
te(
|
|
3740
|
-
|
|
3746
|
+
m,
|
|
3741
3747
|
() => Y(
|
|
3742
3748
|
ne,
|
|
3743
3749
|
(F) => vt({
|
|
@@ -3765,7 +3771,7 @@ function ms(e) {
|
|
|
3765
3771
|
);
|
|
3766
3772
|
});
|
|
3767
3773
|
n({
|
|
3768
|
-
mode:
|
|
3774
|
+
mode: b,
|
|
3769
3775
|
effect: f ?? "opaque",
|
|
3770
3776
|
container: g,
|
|
3771
3777
|
content: D,
|
|
@@ -3805,7 +3811,7 @@ function fs(e) {
|
|
|
3805
3811
|
} = e, i = re("tooltip");
|
|
3806
3812
|
return M(
|
|
3807
3813
|
A.describedby(i),
|
|
3808
|
-
|
|
3814
|
+
Ve({
|
|
3809
3815
|
content: () => M(
|
|
3810
3816
|
s.class("bc-tooltip"),
|
|
3811
3817
|
s.role("tooltip"),
|
|
@@ -3825,14 +3831,14 @@ function fs(e) {
|
|
|
3825
3831
|
arrow: (o) => {
|
|
3826
3832
|
const d = o.map(
|
|
3827
3833
|
({
|
|
3828
|
-
placement:
|
|
3829
|
-
}) =>
|
|
3834
|
+
placement: m
|
|
3835
|
+
}) => m.includes("top") ? "down" : m.includes("bottom") ? "up" : m.includes("left") ? "right" : m.includes("right") ? "left" : "up"
|
|
3830
3836
|
);
|
|
3831
3837
|
return M(
|
|
3832
3838
|
s.class("bc-tooltip__arrow"),
|
|
3833
|
-
s.class(d.map((
|
|
3839
|
+
s.class(d.map((m) => `bc-tooltip__arrow-${m}`)),
|
|
3834
3840
|
v.transform(
|
|
3835
|
-
o.map(({ x:
|
|
3841
|
+
o.map(({ x: m, y: x }) => m == null && x == null ? "" : m != null ? `translate(${m}px, 0)` : `translate(0, ${x}px)`)
|
|
3836
3842
|
),
|
|
3837
3843
|
ta(d)
|
|
3838
3844
|
);
|
|
@@ -3847,46 +3853,32 @@ function na(e, n, t, a, l) {
|
|
|
3847
3853
|
`--ribbon-text: ${r.textColor}`,
|
|
3848
3854
|
`--ribbon-bg-dark: ${u.backgroundColor}`,
|
|
3849
3855
|
`--ribbon-text-dark: ${u.textColor}`,
|
|
3850
|
-
`--ribbon-
|
|
3851
|
-
`--ribbon-
|
|
3852
|
-
`--ribbon-
|
|
3853
|
-
`--ribbon-
|
|
3856
|
+
`--ribbon-inset: ${Pe(n)}`,
|
|
3857
|
+
`--ribbon-offset: ${Pe(t)}`,
|
|
3858
|
+
`--ribbon-width: ${Pe(a)}`,
|
|
3859
|
+
`--ribbon-angle: ${l}deg`
|
|
3854
3860
|
].join("; ");
|
|
3855
3861
|
}
|
|
3856
|
-
function
|
|
3862
|
+
function Pe(e) {
|
|
3857
3863
|
return e == null ? null : typeof e == "number" ? `${e}px` : e;
|
|
3858
3864
|
}
|
|
3859
3865
|
function gs({
|
|
3860
3866
|
color: e = "primary",
|
|
3861
3867
|
class: n,
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
|
|
3868
|
+
inset: t = 0,
|
|
3869
|
+
offset: a = 40,
|
|
3870
|
+
width: l = 100,
|
|
3871
|
+
angle: r = 45
|
|
3866
3872
|
}, ...u) {
|
|
3867
3873
|
return p.div(
|
|
3868
3874
|
s.class("bc-ribbon"),
|
|
3869
3875
|
// Theme styles via CSS variables
|
|
3870
3876
|
s.style(
|
|
3871
|
-
w(
|
|
3872
|
-
e,
|
|
3873
|
-
t,
|
|
3874
|
-
a,
|
|
3875
|
-
l,
|
|
3876
|
-
r
|
|
3877
|
-
)(
|
|
3878
|
-
(c, i, o, d, b) => na(
|
|
3879
|
-
c ?? "primary",
|
|
3880
|
-
i ?? 28,
|
|
3881
|
-
o ?? 0,
|
|
3882
|
-
d ?? 40,
|
|
3883
|
-
b ?? 0
|
|
3884
|
-
)
|
|
3885
|
-
)
|
|
3877
|
+
w(e, t, a, l, r)(na)
|
|
3886
3878
|
),
|
|
3887
3879
|
// Allow external classes
|
|
3888
3880
|
s.class(n),
|
|
3889
|
-
|
|
3881
|
+
...u
|
|
3890
3882
|
);
|
|
3891
3883
|
}
|
|
3892
3884
|
export {
|
|
@@ -3943,7 +3935,7 @@ export {
|
|
|
3943
3935
|
an as Expando,
|
|
3944
3936
|
Ba as FileInput,
|
|
3945
3937
|
sn as FilesInput,
|
|
3946
|
-
|
|
3938
|
+
Ve as Flyout,
|
|
3947
3939
|
un as FocusTrap,
|
|
3948
3940
|
ts as FormStatus,
|
|
3949
3941
|
Ct as Group,
|
|
@@ -4160,7 +4152,7 @@ export {
|
|
|
4160
4152
|
Ls as isRTLLocale,
|
|
4161
4153
|
qn as isUrlMatch,
|
|
4162
4154
|
mn as isValidColor,
|
|
4163
|
-
|
|
4155
|
+
_e as isValidHexColor,
|
|
4164
4156
|
bn as isValidHslColor,
|
|
4165
4157
|
dn as isValidRgbColor,
|
|
4166
4158
|
pn as isValidRgbaColor,
|