@minimalstuff/ui 5.9.0 → 5.10.0
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/README.md +92 -1
- package/dist/index.d.ts +148 -0
- package/dist/minimalstuff-ui.css +1 -1
- package/dist/minimalstuff-ui.js +1236 -596
- package/package.json +6 -6
package/dist/minimalstuff-ui.js
CHANGED
|
@@ -272,6 +272,7 @@ function X(t) {
|
|
|
272
272
|
className: e(I, !i && [
|
|
273
273
|
L,
|
|
274
274
|
"border",
|
|
275
|
+
"min-h-[var(--ms-control-min-height,0px)] min-w-[var(--ms-control-min-height,0px)]",
|
|
275
276
|
z[c],
|
|
276
277
|
Y[s],
|
|
277
278
|
R(o, a, f ?? !1),
|
|
@@ -331,8 +332,11 @@ var le = {
|
|
|
331
332
|
danger: "danger"
|
|
332
333
|
}, pe = l({
|
|
333
334
|
close: "Close",
|
|
335
|
+
enterFullScreen: "Full screen",
|
|
336
|
+
exitFullScreen: "Exit full screen",
|
|
334
337
|
confirm: "Confirm",
|
|
335
338
|
cancel: "Cancel",
|
|
339
|
+
collapsePanel: "Collapse panel",
|
|
336
340
|
noResults: "No results found",
|
|
337
341
|
clearSelection: "Clear selection",
|
|
338
342
|
search: "Search",
|
|
@@ -482,6 +486,7 @@ function Ae(t = {}) {
|
|
|
482
486
|
return e(I, !c && [
|
|
483
487
|
L,
|
|
484
488
|
"gap-2 font-medium border",
|
|
489
|
+
"min-h-[var(--ms-control-min-height,0px)]",
|
|
485
490
|
z[a],
|
|
486
491
|
ke[i],
|
|
487
492
|
R(r, n, s),
|
|
@@ -1526,7 +1531,8 @@ function hn({ options: t, filterOption: n, label: r, description: i, "aria-label
|
|
|
1526
1531
|
className: e("w-full disabled:opacity-50 disabled:cursor-not-allowed", !d && [
|
|
1527
1532
|
je,
|
|
1528
1533
|
z[u],
|
|
1529
|
-
"pl-9 pr-8 py-2 text-sm"
|
|
1534
|
+
"pl-9 pr-8 py-2 text-sm",
|
|
1535
|
+
"min-h-[var(--ms-control-min-height,0px)]"
|
|
1530
1536
|
], !d && o && e("border-red-500 dark:border-red-400", "focus:ring-red-500"), m)
|
|
1531
1537
|
}),
|
|
1532
1538
|
!d && R && !f && /* @__PURE__ */ w("button", {
|
|
@@ -1818,40 +1824,264 @@ function Un({ text: t, ranges: n, radius: r = "sm", unstyled: i = !1, markClassN
|
|
|
1818
1824
|
children: t.text
|
|
1819
1825
|
}, t.start) : /* @__PURE__ */ w("span", { children: t.text }, t.start)) });
|
|
1820
1826
|
}
|
|
1821
|
-
// src/components/
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1827
|
+
// src/components/bottom_sheet/bottom_sheet_expand_button.tsx
|
|
1828
|
+
function Wn({ isExpanded: e, onToggle: t, unstyled: n }) {
|
|
1829
|
+
let r = Q(), i = e ? "i-mdi-fullscreen-exit" : "i-mdi-fullscreen", a = e ? r.exitFullScreen ?? "Exit full screen" : r.enterFullScreen ?? "Full screen";
|
|
1830
|
+
return n ? /* @__PURE__ */ w(X, {
|
|
1831
|
+
icon: i,
|
|
1832
|
+
onClick: t,
|
|
1833
|
+
"aria-label": a,
|
|
1834
|
+
className: "min-h-6 min-w-6",
|
|
1835
|
+
unstyled: !0
|
|
1836
|
+
}) : /* @__PURE__ */ w(X, {
|
|
1837
|
+
icon: i,
|
|
1838
|
+
onClick: t,
|
|
1839
|
+
"aria-label": a,
|
|
1840
|
+
variant: "subtle",
|
|
1841
|
+
size: "sm",
|
|
1842
|
+
radius: "full"
|
|
1843
|
+
});
|
|
1844
|
+
}
|
|
1845
|
+
// src/components/bottom_sheet/sheet_drag_decision.ts
|
|
1846
|
+
var Gn = .25, Kn = .25, qn = .5, Jn = .5, Yn = 100;
|
|
1847
|
+
function Xn(e, t) {
|
|
1848
|
+
return [...e.filter((e) => e.time >= t.time - Yn), t];
|
|
1849
|
+
}
|
|
1850
|
+
function Zn(e) {
|
|
1851
|
+
let t = e.at(-1);
|
|
1852
|
+
if (t === void 0) return 0;
|
|
1853
|
+
let n = e.filter((e) => e.time >= t.time - Yn), r = t.time - n[0].time;
|
|
1854
|
+
return r <= 0 ? 0 : (t.y - n[0].y) / r;
|
|
1855
|
+
}
|
|
1856
|
+
function Qn({ distance: e, panelHeight: t, velocity: n }) {
|
|
1857
|
+
return e > t * Gn || n > qn;
|
|
1858
|
+
}
|
|
1859
|
+
function $n({ growth: e, currentHeight: t, fullHeight: n, upwardVelocity: r }) {
|
|
1860
|
+
let i = n - t;
|
|
1861
|
+
return i <= 0 ? !1 : e > i * Kn || r > Jn;
|
|
1862
|
+
}
|
|
1863
|
+
// src/components/bottom_sheet/use_sheet_drag_core.ts
|
|
1864
|
+
var er = 6, tr = 100, nr = "--ms-sheet-drag-offset", rr = "--ms-sheet-drag-height", ir = "--ms-keyboard-inset", ar = "data-dragging", or = "grow";
|
|
1865
|
+
function sr({ dialogRef: e, isEnded: t, isExpanded: n, canExpand: r, onExpand: i, onRelease: a }) {
|
|
1866
|
+
let o = y(null), s = y(!1), c = y(void 0), l = y(a), u = y(t), d = y(r), f = y(i);
|
|
1867
|
+
_(() => {
|
|
1868
|
+
l.current = a, u.current = t, d.current = r, f.current = i;
|
|
1869
|
+
});
|
|
1870
|
+
let p = () => {
|
|
1871
|
+
e.current?.removeAttribute(ar), e.current?.style.removeProperty(nr), e.current?.style.removeProperty(rr);
|
|
1872
|
+
};
|
|
1873
|
+
_(() => {
|
|
1874
|
+
clearTimeout(c.current), p();
|
|
1875
|
+
}, [t, n]), m(() => () => clearTimeout(c.current), []);
|
|
1876
|
+
let h = (t, n) => {
|
|
1877
|
+
let r = e.current;
|
|
1878
|
+
if (r === null) return;
|
|
1879
|
+
s.current = !1, clearTimeout(c.current);
|
|
1880
|
+
let i = Number.parseFloat(r.style.getPropertyValue(ir)) || 0;
|
|
1881
|
+
o.current = {
|
|
1882
|
+
startY: t,
|
|
1883
|
+
panelHeight: r.getBoundingClientRect().height,
|
|
1884
|
+
fullHeight: window.innerHeight - i,
|
|
1885
|
+
direction: n,
|
|
1886
|
+
samples: [{
|
|
1887
|
+
y: t,
|
|
1888
|
+
time: performance.now()
|
|
1889
|
+
}],
|
|
1890
|
+
isDragging: !1
|
|
1891
|
+
};
|
|
1892
|
+
}, g = (e, t) => {
|
|
1893
|
+
let n = Math.max(0, e.fullHeight - e.panelHeight);
|
|
1894
|
+
return Math.min(n, Math.max(0, e.startY - t));
|
|
1895
|
+
}, v = (e, t, n) => {
|
|
1896
|
+
let r = e.direction ?? (n > 0 ? "down" : "up");
|
|
1897
|
+
r === "up" && !d.current ? o.current = null : (e.direction = r, e.isDragging = !0, s.current = !0, t.setAttribute(ar, r === "up" ? or : ""));
|
|
1898
|
+
}, b = (t) => {
|
|
1899
|
+
let n = o.current, r = e.current;
|
|
1900
|
+
if (n === null || r === null) return;
|
|
1901
|
+
n.samples = Xn(n.samples, {
|
|
1902
|
+
y: t,
|
|
1903
|
+
time: performance.now()
|
|
1904
|
+
});
|
|
1905
|
+
let i = t - n.startY;
|
|
1906
|
+
!n.isDragging && Math.abs(i) > er && v(n, r, i), n.isDragging && (n.direction === "up" ? r.style.setProperty(rr, `${n.panelHeight + g(n, t)}px`) : r.style.setProperty(nr, `${Math.max(0, i)}px`));
|
|
1907
|
+
}, x = () => {
|
|
1908
|
+
l.current() ? c.current = setTimeout(() => {
|
|
1909
|
+
u.current || p();
|
|
1910
|
+
}, tr) : p();
|
|
1911
|
+
}, S = (e, t) => {
|
|
1912
|
+
let n = Xn(e.samples, {
|
|
1913
|
+
y: t,
|
|
1914
|
+
time: performance.now()
|
|
1915
|
+
});
|
|
1916
|
+
$n({
|
|
1917
|
+
growth: g(e, t),
|
|
1918
|
+
currentHeight: e.panelHeight,
|
|
1919
|
+
fullHeight: e.fullHeight,
|
|
1920
|
+
upwardVelocity: -Zn(n)
|
|
1921
|
+
}) ? f.current() : p();
|
|
1922
|
+
}, C = (e, t) => {
|
|
1923
|
+
let n = Xn(e.samples, {
|
|
1924
|
+
y: t,
|
|
1925
|
+
time: performance.now()
|
|
1926
|
+
});
|
|
1927
|
+
Qn({
|
|
1928
|
+
distance: Math.max(0, t - e.startY),
|
|
1929
|
+
panelHeight: e.panelHeight,
|
|
1930
|
+
velocity: Zn(n)
|
|
1931
|
+
}) ? x() : p();
|
|
1932
|
+
};
|
|
1933
|
+
return {
|
|
1934
|
+
begin: h,
|
|
1935
|
+
track: b,
|
|
1936
|
+
release: (e) => {
|
|
1937
|
+
let t = o.current;
|
|
1938
|
+
o.current = null, t !== null && t.isDragging && (t.direction === "up" ? S(t, e) : C(t, e));
|
|
1939
|
+
},
|
|
1940
|
+
cancel: () => {
|
|
1941
|
+
s.current = !1;
|
|
1942
|
+
let e = o.current;
|
|
1943
|
+
o.current = null, e?.isDragging && p();
|
|
1944
|
+
},
|
|
1945
|
+
consumeWasDragged: () => {
|
|
1946
|
+
let e = s.current;
|
|
1947
|
+
return s.current = !1, e;
|
|
1948
|
+
}
|
|
1949
|
+
};
|
|
1950
|
+
}
|
|
1951
|
+
// src/components/bottom_sheet/get_sheet_handle_drag_handlers.ts
|
|
1952
|
+
function cr(e) {
|
|
1953
|
+
return {
|
|
1954
|
+
onPointerDown: (t) => {
|
|
1955
|
+
t.isPrimary && (t.currentTarget.setPointerCapture(t.pointerId), e.begin(t.clientY));
|
|
1956
|
+
},
|
|
1957
|
+
onPointerMove: (t) => e.track(t.clientY),
|
|
1958
|
+
onPointerUp: (t) => e.release(t.clientY),
|
|
1959
|
+
onPointerCancel: e.cancel
|
|
1960
|
+
};
|
|
1961
|
+
}
|
|
1962
|
+
// src/components/bottom_sheet/bottom_sheet_handle.tsx
|
|
1963
|
+
function lr({ core: t, unstyled: n }) {
|
|
1964
|
+
return /* @__PURE__ */ w("div", {
|
|
1965
|
+
"aria-hidden": "true",
|
|
1966
|
+
"data-sheet-handle": "",
|
|
1967
|
+
className: "flex flex-shrink-0 items-center justify-center h-6 touch-none",
|
|
1968
|
+
...cr(t),
|
|
1969
|
+
children: /* @__PURE__ */ w("span", { className: e("block w-9 h-1 rounded-full", !n && "bg-gray-300 dark:bg-gray-600") })
|
|
1970
|
+
});
|
|
1971
|
+
}
|
|
1972
|
+
// src/components/bottom_sheet/bottom_sheet_styles.ts
|
|
1973
|
+
var ur = {
|
|
1974
|
+
auto: "ms-bottom-sheet-height-auto",
|
|
1975
|
+
fixed: "ms-bottom-sheet-height-fixed"
|
|
1976
|
+
}, dr = "ms-bottom-sheet-expanded", fr = "fixed inset-x-0 bottom-[var(--ms-keyboard-inset,0px)] flex flex-col overflow-hidden pl-[env(safe-area-inset-left)] pr-[env(safe-area-inset-right)] pb-[max(0px,calc(env(safe-area-inset-bottom)_-_var(--ms-keyboard-inset,0px)))] focus:outline-none data-[dragging]:translate-y-[var(--ms-sheet-drag-offset,0px)] data-[dragging]:transition-none data-[dragging=grow]:h-[var(--ms-sheet-drag-height)] data-[dragging=grow]:max-h-none", pr = {
|
|
1977
|
+
none: "rounded-t-none",
|
|
1978
|
+
sm: "rounded-t-sm",
|
|
1979
|
+
md: "rounded-t-md",
|
|
1980
|
+
lg: "rounded-t-lg",
|
|
1981
|
+
xl: "rounded-t-xl",
|
|
1982
|
+
full: "rounded-t-lg"
|
|
1983
|
+
}, mr = "--ms-keyboard-inset";
|
|
1984
|
+
function hr(e) {
|
|
1985
|
+
let t = window.innerHeight - e.height - e.offsetTop;
|
|
1986
|
+
return Math.max(0, Math.round(t));
|
|
1987
|
+
}
|
|
1988
|
+
function gr(e, t) {
|
|
1989
|
+
m(() => {
|
|
1990
|
+
let n = e.current, r = window.visualViewport;
|
|
1991
|
+
if (t || n === null || !r) return;
|
|
1992
|
+
let i = () => {
|
|
1993
|
+
r.scale > 1 || n.style.setProperty(mr, `${hr(r)}px`);
|
|
1994
|
+
};
|
|
1995
|
+
return i(), r.addEventListener("resize", i), r.addEventListener("scroll", i), () => {
|
|
1996
|
+
r.removeEventListener("resize", i), r.removeEventListener("scroll", i);
|
|
1997
|
+
};
|
|
1998
|
+
}, [e, t]);
|
|
1999
|
+
}
|
|
2000
|
+
// src/components/bottom_sheet/is_sheet_drag_excluded.ts
|
|
2001
|
+
var _r = "input, textarea, select, [contenteditable]:not([contenteditable=\"false\"]), [role=\"slider\"], [data-sheet-no-drag], [data-sheet-handle]";
|
|
2002
|
+
function vr(e, t) {
|
|
2003
|
+
let n = e;
|
|
2004
|
+
for (; n !== null && !t.includes(n);) {
|
|
2005
|
+
if (n.scrollTop > 0) return !0;
|
|
2006
|
+
n = n.parentElement;
|
|
1851
2007
|
}
|
|
1852
|
-
|
|
2008
|
+
return !1;
|
|
2009
|
+
}
|
|
2010
|
+
function yr(e, t) {
|
|
2011
|
+
return !(e instanceof Element) || e.closest(_r) !== null || vr(e, t);
|
|
2012
|
+
}
|
|
2013
|
+
// src/components/bottom_sheet/use_sheet_content_drag.ts
|
|
2014
|
+
var br = 8, xr = 400;
|
|
2015
|
+
function Sr({ dialogRef: e, bodyRef: t, footerSlot: n, core: r, canDragDown: i, canDragUp: a }) {
|
|
2016
|
+
let o = y(r), s = y(n), c = y(i), l = y(a), u = y({ phase: "idle" }), d = y(!1);
|
|
2017
|
+
_(() => {
|
|
2018
|
+
o.current = r, s.current = n, c.current = i, l.current = a;
|
|
2019
|
+
}), m(() => {
|
|
2020
|
+
let n = e.current;
|
|
2021
|
+
if (n === null) return;
|
|
2022
|
+
let r, i = () => (t.current?.scrollTop ?? 0) <= 0, a = (e) => e instanceof Node && s.current?.contains(e) === !0, f = (e) => e instanceof Node && n.contains(e) && !t.current?.contains(e) && !a(e), p = (e) => {
|
|
2023
|
+
let r = e.touches[0], o = [n, t.current].filter((e) => e !== null), s = !f(e.target), u = c.current && (!s || i()), d = l.current && f(e.target);
|
|
2024
|
+
return e.touches.length !== 1 || a(e.target) || yr(e.target, o) || !(u || d) ? { phase: "ignored" } : {
|
|
2025
|
+
phase: "pending",
|
|
2026
|
+
startX: r.clientX,
|
|
2027
|
+
startY: r.clientY,
|
|
2028
|
+
canDragDown: u,
|
|
2029
|
+
canDragUp: d,
|
|
2030
|
+
isFromBody: s
|
|
2031
|
+
};
|
|
2032
|
+
}, m = () => {
|
|
2033
|
+
let e = u.current.phase === "dragging";
|
|
2034
|
+
u.current = { phase: "ignored" }, e && o.current.cancel();
|
|
2035
|
+
}, h = (e) => {
|
|
2036
|
+
clearTimeout(r), d.current = !1, e.touches.length === 1 ? u.current = p(e) : m();
|
|
2037
|
+
}, g = (e, t) => {
|
|
2038
|
+
let n = t.clientX - e.startX, r = t.clientY - e.startY;
|
|
2039
|
+
if (Math.max(Math.abs(n), Math.abs(r)) <= br) return;
|
|
2040
|
+
let a = Math.abs(r) > Math.abs(n), s = r > 0 ? "down" : "up", c = s === "down" ? e.canDragDown && (!e.isFromBody || i()) : e.canDragUp;
|
|
2041
|
+
!a || !c ? u.current = { phase: "ignored" } : (u.current = { phase: "dragging" }, o.current.begin(e.startY, s));
|
|
2042
|
+
}, _ = (e) => {
|
|
2043
|
+
if (e.touches.length !== 1) {
|
|
2044
|
+
m();
|
|
2045
|
+
return;
|
|
2046
|
+
}
|
|
2047
|
+
let t = e.touches[0], n = u.current;
|
|
2048
|
+
n.phase === "pending" && g(n, t), u.current.phase === "dragging" && (e.cancelable && e.preventDefault(), o.current.track(t.clientY));
|
|
2049
|
+
}, v = (e) => {
|
|
2050
|
+
let t = u.current.phase === "dragging";
|
|
2051
|
+
u.current = { phase: "idle" }, t && (o.current.release(e.changedTouches[0].clientY), o.current.consumeWasDragged(), d.current = !0, r = setTimeout(() => {
|
|
2052
|
+
d.current = !1;
|
|
2053
|
+
}, xr));
|
|
2054
|
+
}, y = () => {
|
|
2055
|
+
let e = u.current.phase === "dragging";
|
|
2056
|
+
u.current = { phase: "idle" }, e && o.current.cancel();
|
|
2057
|
+
}, b = (e) => {
|
|
2058
|
+
d.current && (d.current = !1, e.stopPropagation(), e.preventDefault());
|
|
2059
|
+
};
|
|
2060
|
+
return n.addEventListener("touchstart", h, { passive: !0 }), n.addEventListener("touchmove", _, { passive: !1 }), n.addEventListener("touchend", v), n.addEventListener("touchcancel", y), n.addEventListener("click", b, !0), () => {
|
|
2061
|
+
clearTimeout(r), n.removeEventListener("touchstart", h), n.removeEventListener("touchmove", _), n.removeEventListener("touchend", v), n.removeEventListener("touchcancel", y), n.removeEventListener("click", b, !0);
|
|
2062
|
+
};
|
|
2063
|
+
}, [e, t]);
|
|
2064
|
+
}
|
|
2065
|
+
// src/components/bottom_sheet/use_sheet_expansion.ts
|
|
2066
|
+
function Cr({ isEnded: e, onExpandedChange: t }) {
|
|
2067
|
+
let [n, r] = b(!1), i = y(!1), a = h((e) => t?.(e));
|
|
2068
|
+
e && n && r(!1), m(() => {
|
|
2069
|
+
i.current && !n && e && a(!1), i.current = n;
|
|
2070
|
+
}, [n, e]);
|
|
2071
|
+
let o = (e) => {
|
|
2072
|
+
r(e), t?.(e);
|
|
2073
|
+
};
|
|
2074
|
+
return {
|
|
2075
|
+
isExpanded: n,
|
|
2076
|
+
toggle: () => o(!n),
|
|
2077
|
+
expand: () => o(!0),
|
|
2078
|
+
collapse: () => o(!1)
|
|
2079
|
+
};
|
|
2080
|
+
}
|
|
2081
|
+
// src/components/modal/dismiss_guard_context.ts
|
|
2082
|
+
var wr = l(null);
|
|
1853
2083
|
// src/components/modal/modal_footer_slot.tsx
|
|
1854
|
-
function
|
|
2084
|
+
function Tr({ onSlotChange: t, children: n, unstyled: r = !1 }) {
|
|
1855
2085
|
return /* @__PURE__ */ w("div", {
|
|
1856
2086
|
ref: t,
|
|
1857
2087
|
className: e("flex items-center justify-end flex-shrink-0 empty:hidden", !r && ["gap-3 px-6 py-4 border-t", "border-gray-100 dark:border-gray-800"]),
|
|
@@ -1859,46 +2089,45 @@ function Xn({ onSlotChange: t, children: n, unstyled: r = !1 }) {
|
|
|
1859
2089
|
});
|
|
1860
2090
|
}
|
|
1861
2091
|
// src/components/modal/modal_footer_slot_context.ts
|
|
1862
|
-
var
|
|
2092
|
+
var Er = l(null);
|
|
1863
2093
|
// src/components/modal/modal_header.tsx
|
|
1864
|
-
function
|
|
1865
|
-
let
|
|
2094
|
+
function Dr({ titleId: t, title: n, onDismiss: r, dismissible: i, closeLabel: a, unstyled: o = !1, actions: s }) {
|
|
2095
|
+
let c = Q(), l = a ?? c.close, u = /* @__PURE__ */ T(C, { children: [i && o && /* @__PURE__ */ w(X, {
|
|
2096
|
+
icon: "i-mdi-close",
|
|
2097
|
+
onClick: r,
|
|
2098
|
+
"aria-label": l,
|
|
2099
|
+
className: "min-h-6 min-w-6",
|
|
2100
|
+
unstyled: !0
|
|
2101
|
+
}), i && !o && /* @__PURE__ */ w(X, {
|
|
2102
|
+
icon: "i-mdi-close",
|
|
2103
|
+
onClick: r,
|
|
2104
|
+
"aria-label": l,
|
|
2105
|
+
variant: "subtle",
|
|
2106
|
+
size: "sm",
|
|
2107
|
+
radius: "full",
|
|
2108
|
+
className: "-mr-1"
|
|
2109
|
+
})] });
|
|
1866
2110
|
return /* @__PURE__ */ T("div", {
|
|
1867
2111
|
className: e("flex items-center justify-between flex-shrink-0", !o && "gap-4 px-6 pt-5 pb-4"),
|
|
1868
|
-
children: [
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
onClick: r,
|
|
1877
|
-
"aria-label": c,
|
|
1878
|
-
className: "min-h-6 min-w-6",
|
|
1879
|
-
unstyled: !0
|
|
1880
|
-
}),
|
|
1881
|
-
i && !o && /* @__PURE__ */ w(X, {
|
|
1882
|
-
icon: "i-mdi-close",
|
|
1883
|
-
onClick: r,
|
|
1884
|
-
"aria-label": c,
|
|
1885
|
-
variant: "subtle",
|
|
1886
|
-
size: "sm",
|
|
1887
|
-
radius: "full",
|
|
1888
|
-
className: "-mr-1"
|
|
1889
|
-
})
|
|
1890
|
-
]
|
|
2112
|
+
children: [/* @__PURE__ */ w("h2", {
|
|
2113
|
+
id: t,
|
|
2114
|
+
className: e(!o && "text-base font-medium tracking-tight text-gray-900 dark:text-gray-100"),
|
|
2115
|
+
children: n
|
|
2116
|
+
}), s ? /* @__PURE__ */ T("div", {
|
|
2117
|
+
className: e("flex items-center", !o && "gap-1"),
|
|
2118
|
+
children: [s, u]
|
|
2119
|
+
}) : u]
|
|
1891
2120
|
});
|
|
1892
2121
|
}
|
|
1893
2122
|
// src/components/modal/use_guarded_dismiss.ts
|
|
1894
|
-
function
|
|
2123
|
+
function Or(e) {
|
|
1895
2124
|
try {
|
|
1896
2125
|
return e();
|
|
1897
2126
|
} catch (e) {
|
|
1898
2127
|
return In(e), null;
|
|
1899
2128
|
}
|
|
1900
2129
|
}
|
|
1901
|
-
function
|
|
2130
|
+
function kr({ onDismiss: e, isEnded: t }) {
|
|
1902
2131
|
let n = y(e), r = y(t), i = y([]), a = y(!1);
|
|
1903
2132
|
_(() => {
|
|
1904
2133
|
n.current = e, r.current = t;
|
|
@@ -1914,42 +2143,39 @@ function er({ onDismiss: e, isEnded: t }) {
|
|
|
1914
2143
|
}, []);
|
|
1915
2144
|
return {
|
|
1916
2145
|
dismiss: f(() => {
|
|
1917
|
-
if (a.current) return;
|
|
2146
|
+
if (a.current) return !1;
|
|
1918
2147
|
let e = i.current.at(-1);
|
|
1919
|
-
if (!e)
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
}
|
|
1923
|
-
let t = $n(e.current);
|
|
1924
|
-
t !== null && (typeof t == "boolean" ? t && n.current() : s(t));
|
|
2148
|
+
if (!e) return n.current(), !0;
|
|
2149
|
+
let t = Or(e.current);
|
|
2150
|
+
return t === null ? !1 : typeof t == "boolean" ? (t && n.current(), t) : (s(t), !1);
|
|
1925
2151
|
}, [s]),
|
|
1926
2152
|
registry: o
|
|
1927
2153
|
};
|
|
1928
2154
|
}
|
|
1929
2155
|
// src/components/modal/keyboard_scroll_region_attribute.ts
|
|
1930
|
-
var
|
|
1931
|
-
function
|
|
2156
|
+
var Ar = "data-keyboard-scroll-region", jr = "a[href], button, input, select, textarea, summary, audio[controls], video[controls], [contenteditable]:not([contenteditable=\"false\"]), [tabindex]";
|
|
2157
|
+
function Mr(e) {
|
|
1932
2158
|
return e.matches(":disabled");
|
|
1933
2159
|
}
|
|
1934
|
-
function
|
|
2160
|
+
function Nr(e) {
|
|
1935
2161
|
return e.getAttribute("tabindex") === "-1";
|
|
1936
2162
|
}
|
|
1937
|
-
function
|
|
2163
|
+
function Pr(e) {
|
|
1938
2164
|
return e.matches("input[type=\"hidden\"]");
|
|
1939
2165
|
}
|
|
1940
|
-
function
|
|
2166
|
+
function Fr(e) {
|
|
1941
2167
|
return e.closest("[inert]") !== null;
|
|
1942
2168
|
}
|
|
1943
|
-
function
|
|
2169
|
+
function Ir(e) {
|
|
1944
2170
|
return typeof e.checkVisibility != "function" || e.checkVisibility();
|
|
1945
2171
|
}
|
|
1946
|
-
function
|
|
1947
|
-
return !
|
|
2172
|
+
function Lr(e) {
|
|
2173
|
+
return !Mr(e) && !Nr(e) && !Pr(e) && !Fr(e) && Ir(e);
|
|
1948
2174
|
}
|
|
1949
|
-
function
|
|
2175
|
+
function Rr(e) {
|
|
1950
2176
|
return e instanceof HTMLInputElement && e.type === "radio" && e.name !== "";
|
|
1951
2177
|
}
|
|
1952
|
-
function
|
|
2178
|
+
function zr(e) {
|
|
1953
2179
|
let t = /* @__PURE__ */ new Map();
|
|
1954
2180
|
for (let n of e) {
|
|
1955
2181
|
let e = t.get(n.form) ?? /* @__PURE__ */ new Map();
|
|
@@ -1959,19 +2185,19 @@ function ur(e) {
|
|
|
1959
2185
|
}
|
|
1960
2186
|
return Array.from(t.values()).flatMap((e) => Array.from(e.values()));
|
|
1961
2187
|
}
|
|
1962
|
-
function
|
|
2188
|
+
function Br(e) {
|
|
1963
2189
|
return e.find((e) => e.checked) ?? e[0];
|
|
1964
2190
|
}
|
|
1965
|
-
function
|
|
1966
|
-
let t = Array.from(e.querySelectorAll(
|
|
1967
|
-
return t.filter((e) => !
|
|
2191
|
+
function Vr(e) {
|
|
2192
|
+
let t = Array.from(e.querySelectorAll(jr)).filter(Lr), n = t.filter(Rr), r = new Set(zr(n).map(Br));
|
|
2193
|
+
return t.filter((e) => !Rr(e) || r.has(e));
|
|
1968
2194
|
}
|
|
1969
2195
|
// src/components/modal/use_keyboard_scroll_region.ts
|
|
1970
|
-
var
|
|
1971
|
-
function
|
|
1972
|
-
return e.scrollHeight > e.clientHeight &&
|
|
2196
|
+
var Hr = {};
|
|
2197
|
+
function Ur(e) {
|
|
2198
|
+
return e.scrollHeight > e.clientHeight && Vr(e).length === 0;
|
|
1973
2199
|
}
|
|
1974
|
-
var
|
|
2200
|
+
var Wr = [
|
|
1975
2201
|
"disabled",
|
|
1976
2202
|
"tabindex",
|
|
1977
2203
|
"hidden",
|
|
@@ -1979,39 +2205,39 @@ var hr = [
|
|
|
1979
2205
|
"href",
|
|
1980
2206
|
"contenteditable"
|
|
1981
2207
|
];
|
|
1982
|
-
function
|
|
2208
|
+
function Gr(e, t) {
|
|
1983
2209
|
e.disconnect(), e.observe(t);
|
|
1984
2210
|
for (let n of t.children) e.observe(n);
|
|
1985
2211
|
}
|
|
1986
|
-
function
|
|
2212
|
+
function Kr(e, t) {
|
|
1987
2213
|
let n = typeof ResizeObserver > "u" ? void 0 : new ResizeObserver(t), r = new MutationObserver(() => {
|
|
1988
|
-
t(), n &&
|
|
2214
|
+
t(), n && Gr(n, e);
|
|
1989
2215
|
});
|
|
1990
2216
|
return r.observe(e, {
|
|
1991
2217
|
childList: !0,
|
|
1992
2218
|
subtree: !0,
|
|
1993
2219
|
attributes: !0,
|
|
1994
|
-
attributeFilter:
|
|
1995
|
-
}), n &&
|
|
2220
|
+
attributeFilter: Wr
|
|
2221
|
+
}), n && Gr(n, e), () => {
|
|
1996
2222
|
r.disconnect(), n?.disconnect();
|
|
1997
2223
|
};
|
|
1998
2224
|
}
|
|
1999
|
-
function
|
|
2225
|
+
function qr({ labelledBy: e, label: t }) {
|
|
2000
2226
|
let [n, r] = b(null), [i, a] = b(null);
|
|
2001
2227
|
return m(() => {
|
|
2002
2228
|
if (!n) return;
|
|
2003
|
-
let e = () => a(
|
|
2004
|
-
return e(),
|
|
2229
|
+
let e = () => a(Ur(n) ? n : null);
|
|
2230
|
+
return e(), Kr(n, e);
|
|
2005
2231
|
}, [n]), n === null || i !== n || !(e || t) ? {
|
|
2006
2232
|
ref: r,
|
|
2007
|
-
scrollableProps:
|
|
2233
|
+
scrollableProps: Hr,
|
|
2008
2234
|
focusClassName: void 0
|
|
2009
2235
|
} : {
|
|
2010
2236
|
ref: r,
|
|
2011
2237
|
scrollableProps: {
|
|
2012
2238
|
tabIndex: 0,
|
|
2013
2239
|
role: "region",
|
|
2014
|
-
[
|
|
2240
|
+
[Ar]: !0,
|
|
2015
2241
|
"aria-labelledby": e,
|
|
2016
2242
|
"aria-label": e ? void 0 : t
|
|
2017
2243
|
},
|
|
@@ -2019,74 +2245,77 @@ function vr({ labelledBy: e, label: t }) {
|
|
|
2019
2245
|
};
|
|
2020
2246
|
}
|
|
2021
2247
|
// src/components/modal/body_scroll_lock.ts
|
|
2022
|
-
var
|
|
2023
|
-
function
|
|
2248
|
+
var Jr = "--scrollbar-compensation", Yr = 0, Xr;
|
|
2249
|
+
function Zr() {
|
|
2024
2250
|
let { style: e } = document.documentElement;
|
|
2025
2251
|
return {
|
|
2026
2252
|
overflow: e.overflow,
|
|
2027
2253
|
overflowX: e.overflowX,
|
|
2028
2254
|
overflowY: e.overflowY,
|
|
2029
2255
|
paddingRight: e.paddingRight,
|
|
2030
|
-
scrollbarCompensation: e.getPropertyValue(
|
|
2256
|
+
scrollbarCompensation: e.getPropertyValue(Jr)
|
|
2031
2257
|
};
|
|
2032
2258
|
}
|
|
2033
|
-
function
|
|
2259
|
+
function Qr(e) {
|
|
2034
2260
|
let { style: t } = document.documentElement;
|
|
2035
|
-
t.overflow = e.overflow, t.overflowX = e.overflowX, t.overflowY = e.overflowY, t.paddingRight = e.paddingRight, e.scrollbarCompensation === "" ? t.removeProperty(
|
|
2261
|
+
t.overflow = e.overflow, t.overflowX = e.overflowX, t.overflowY = e.overflowY, t.paddingRight = e.paddingRight, e.scrollbarCompensation === "" ? t.removeProperty(Jr) : t.setProperty(Jr, e.scrollbarCompensation);
|
|
2036
2262
|
}
|
|
2037
|
-
function
|
|
2263
|
+
function $r(e, t) {
|
|
2038
2264
|
let { style: n } = document.documentElement;
|
|
2039
|
-
n.paddingRight = `${t + e}px`, n.setProperty(
|
|
2265
|
+
n.paddingRight = `${t + e}px`, n.setProperty(Jr, `${e}px`);
|
|
2040
2266
|
}
|
|
2041
|
-
function
|
|
2042
|
-
if (
|
|
2267
|
+
function ei() {
|
|
2268
|
+
if (Yr === 0) {
|
|
2043
2269
|
let e = document.documentElement;
|
|
2044
|
-
|
|
2270
|
+
Xr = Zr();
|
|
2045
2271
|
let t = Number.parseFloat(getComputedStyle(e).paddingRight) || 0, n = e.clientWidth;
|
|
2046
2272
|
e.style.overflow = "hidden";
|
|
2047
2273
|
let r = e.clientWidth - n;
|
|
2048
|
-
r > 0 &&
|
|
2274
|
+
r > 0 && $r(r, t);
|
|
2049
2275
|
}
|
|
2050
|
-
|
|
2276
|
+
Yr += 1;
|
|
2051
2277
|
}
|
|
2052
|
-
function
|
|
2053
|
-
--
|
|
2278
|
+
function ti() {
|
|
2279
|
+
--Yr, Yr === 0 && Xr && (Qr(Xr), Xr = void 0);
|
|
2054
2280
|
}
|
|
2055
|
-
function
|
|
2056
|
-
m(() => (
|
|
2281
|
+
function ni() {
|
|
2282
|
+
m(() => (ei(), ti), []);
|
|
2057
2283
|
}
|
|
2058
2284
|
// src/components/modal/modal_stack.ts
|
|
2059
|
-
var
|
|
2060
|
-
function
|
|
2061
|
-
return
|
|
2285
|
+
var ri = [];
|
|
2286
|
+
function ii(e, t) {
|
|
2287
|
+
return ri.push({
|
|
2062
2288
|
token: e,
|
|
2063
2289
|
requestDismiss: t
|
|
2064
2290
|
}), () => {
|
|
2065
|
-
let t =
|
|
2066
|
-
t !== -1 &&
|
|
2291
|
+
let t = ri.findIndex((t) => t.token === e);
|
|
2292
|
+
t !== -1 && ri.splice(t, 1);
|
|
2067
2293
|
};
|
|
2068
2294
|
}
|
|
2069
|
-
function
|
|
2070
|
-
return
|
|
2295
|
+
function ai(e) {
|
|
2296
|
+
return ri.at(-1)?.token === e;
|
|
2297
|
+
}
|
|
2298
|
+
function oi() {
|
|
2299
|
+
return ri.length > 0;
|
|
2071
2300
|
}
|
|
2072
|
-
function
|
|
2073
|
-
let e =
|
|
2301
|
+
function si() {
|
|
2302
|
+
let e = ri.at(-1);
|
|
2074
2303
|
return e ? (e.requestDismiss(), !0) : !1;
|
|
2075
2304
|
}
|
|
2076
2305
|
// src/components/modal/use_modal_dialog.ts
|
|
2077
|
-
function
|
|
2078
|
-
return
|
|
2306
|
+
function ci(e) {
|
|
2307
|
+
return Vr(e).filter((e) => !e.hasAttribute(Ar));
|
|
2079
2308
|
}
|
|
2080
|
-
function
|
|
2081
|
-
let r = t ?
|
|
2082
|
-
return r || n === "content" ? r : e ?
|
|
2309
|
+
function li({ dialog: e, content: t, fallbackScope: n }) {
|
|
2310
|
+
let r = t ? ci(t)[0] : void 0;
|
|
2311
|
+
return r || n === "content" ? r : e ? ci(e)[0] : void 0;
|
|
2083
2312
|
}
|
|
2084
|
-
function
|
|
2085
|
-
let t =
|
|
2313
|
+
function ui(e) {
|
|
2314
|
+
let t = li(e);
|
|
2086
2315
|
(e.initialFocusRef?.current ?? t ?? e.dialog)?.focus();
|
|
2087
2316
|
}
|
|
2088
|
-
function
|
|
2089
|
-
let n =
|
|
2317
|
+
function di(e, t) {
|
|
2318
|
+
let n = Vr(t);
|
|
2090
2319
|
if (n.length === 0) {
|
|
2091
2320
|
e.preventDefault(), t.focus();
|
|
2092
2321
|
return;
|
|
@@ -2094,10 +2323,10 @@ function Fr(e, t) {
|
|
|
2094
2323
|
let r = n[0], i = n[n.length - 1], a = document.activeElement;
|
|
2095
2324
|
(a instanceof HTMLElement ? n.indexOf(a) : -1) === -1 ? (e.preventDefault(), (e.shiftKey ? i : r).focus()) : e.shiftKey && a === r ? (e.preventDefault(), i.focus()) : !e.shiftKey && a === i && (e.preventDefault(), r.focus());
|
|
2096
2325
|
}
|
|
2097
|
-
function
|
|
2326
|
+
function fi() {
|
|
2098
2327
|
return typeof document > "u" ? null : document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
2099
2328
|
}
|
|
2100
|
-
function
|
|
2329
|
+
function pi() {
|
|
2101
2330
|
let [e, t] = b(!1);
|
|
2102
2331
|
return m(() => {
|
|
2103
2332
|
let e = requestAnimationFrame(() => {
|
|
@@ -2106,15 +2335,15 @@ function Lr() {
|
|
|
2106
2335
|
return () => cancelAnimationFrame(e);
|
|
2107
2336
|
}, []), e;
|
|
2108
2337
|
}
|
|
2109
|
-
function
|
|
2338
|
+
function mi(e, { isEnded: t, modalToken: n }) {
|
|
2110
2339
|
m(() => {
|
|
2111
2340
|
if (t) return;
|
|
2112
2341
|
let r = (t) => {
|
|
2113
|
-
if (
|
|
2342
|
+
if (ai(n)) {
|
|
2114
2343
|
if (t.key === "Escape") {
|
|
2115
2344
|
if (t.defaultPrevented) return;
|
|
2116
|
-
t.preventDefault(),
|
|
2117
|
-
} else t.key === "Tab" && e.current &&
|
|
2345
|
+
t.preventDefault(), si();
|
|
2346
|
+
} else t.key === "Tab" && e.current && di(t, e.current);
|
|
2118
2347
|
}
|
|
2119
2348
|
};
|
|
2120
2349
|
return document.addEventListener("keydown", r), () => document.removeEventListener("keydown", r);
|
|
@@ -2124,18 +2353,18 @@ function Rr(e, { isEnded: t, modalToken: n }) {
|
|
|
2124
2353
|
e
|
|
2125
2354
|
]);
|
|
2126
2355
|
}
|
|
2127
|
-
function
|
|
2128
|
-
let [o] = b(() => Symbol("modal")), [s, c] = b(null), l = y(null), u = y(null), [d] = b(
|
|
2356
|
+
function hi({ isEnded: e, onDismiss: t, dismissible: n, initialFocusRef: r, initialFocusFallbackScope: i = "dialog", getFocusFallback: a }) {
|
|
2357
|
+
let [o] = b(() => Symbol("modal")), [s, c] = b(null), l = y(null), u = y(null), [d] = b(fi), f = y(() => {});
|
|
2129
2358
|
_(() => {
|
|
2130
2359
|
f.current = () => {
|
|
2131
2360
|
n && t();
|
|
2132
2361
|
};
|
|
2133
2362
|
}), m(() => {
|
|
2134
|
-
if (!e) return
|
|
2135
|
-
}, [e, o]),
|
|
2136
|
-
let p =
|
|
2363
|
+
if (!e) return ii(o, () => f.current());
|
|
2364
|
+
}, [e, o]), ni();
|
|
2365
|
+
let p = pi();
|
|
2137
2366
|
return m(() => {
|
|
2138
|
-
s && !e &&
|
|
2367
|
+
s && !e && ui({
|
|
2139
2368
|
dialog: l.current,
|
|
2140
2369
|
content: u.current,
|
|
2141
2370
|
initialFocusRef: r,
|
|
@@ -2147,7 +2376,7 @@ function zr({ isEnded: e, onDismiss: t, dismissible: n, initialFocusRef: r, init
|
|
|
2147
2376
|
e,
|
|
2148
2377
|
d,
|
|
2149
2378
|
a
|
|
2150
|
-
]),
|
|
2379
|
+
]), mi(l, {
|
|
2151
2380
|
isEnded: e,
|
|
2152
2381
|
modalToken: o
|
|
2153
2382
|
}), {
|
|
@@ -2165,8 +2394,13 @@ function zr({ isEnded: e, onDismiss: t, dismissible: n, initialFocusRef: r, init
|
|
|
2165
2394
|
}
|
|
2166
2395
|
};
|
|
2167
2396
|
}
|
|
2397
|
+
// src/components/shared/get_main_element.ts
|
|
2398
|
+
function gi() {
|
|
2399
|
+
let e = document.querySelector("main");
|
|
2400
|
+
return e && !e.hasAttribute("tabindex") && (e.tabIndex = -1), e;
|
|
2401
|
+
}
|
|
2168
2402
|
// src/components/toast/toast_announcer_slot.tsx
|
|
2169
|
-
var
|
|
2403
|
+
var _i = () => /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w("div", {
|
|
2170
2404
|
role: "status",
|
|
2171
2405
|
className: "sr-only",
|
|
2172
2406
|
"data-ms-toast-announcer": "polite"
|
|
@@ -2174,34 +2408,182 @@ var Br = () => /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w("div", {
|
|
|
2174
2408
|
role: "alert",
|
|
2175
2409
|
className: "sr-only",
|
|
2176
2410
|
"data-ms-toast-announcer": "assertive"
|
|
2177
|
-
})] }),
|
|
2411
|
+
})] }), vi = E((e) => ({
|
|
2178
2412
|
globalHotkeysEnabled: !0,
|
|
2179
2413
|
setGlobalHotkeysEnabled: (t) => e({ globalHotkeysEnabled: t })
|
|
2180
|
-
})),
|
|
2181
|
-
function
|
|
2182
|
-
m(() => (
|
|
2183
|
-
--
|
|
2414
|
+
})), yi = 0;
|
|
2415
|
+
function bi() {
|
|
2416
|
+
m(() => (yi += 1, yi === 1 && vi.getState().setGlobalHotkeysEnabled(!1), () => {
|
|
2417
|
+
--yi, yi === 0 && vi.getState().setGlobalHotkeysEnabled(!0);
|
|
2184
2418
|
}), []);
|
|
2185
2419
|
}
|
|
2186
|
-
// src/components/
|
|
2187
|
-
function
|
|
2188
|
-
|
|
2189
|
-
|
|
2420
|
+
// src/components/bottom_sheet/bottom_sheet_dialog.tsx
|
|
2421
|
+
function xi({ isEnded: t, onDismiss: n, title: r, children: i, footer: a, height: o, radius: s, expandable: c, onExpandedChange: l, className: u, panelClassName: d, backdropClassName: f, unstyled: p = !1, dismissible: m, closeLabel: h, initialFocusRef: _ }) {
|
|
2422
|
+
bi();
|
|
2423
|
+
let y = g(), { dismiss: b, registry: x } = kr({
|
|
2424
|
+
onDismiss: n,
|
|
2425
|
+
isEnded: t
|
|
2426
|
+
}), { dialogRef: C, contentRef: E, footerSlot: D, setFooterSlot: O, isVisible: k, handleBackdropClick: A, handleBackdropMouseDown: j } = hi({
|
|
2427
|
+
isEnded: t,
|
|
2428
|
+
onDismiss: b,
|
|
2429
|
+
dismissible: m,
|
|
2430
|
+
initialFocusRef: _,
|
|
2431
|
+
initialFocusFallbackScope: "content",
|
|
2432
|
+
getFocusFallback: gi
|
|
2433
|
+
}), { isExpanded: M, toggle: N, expand: P, collapse: F } = Cr({
|
|
2434
|
+
isEnded: t,
|
|
2435
|
+
onExpandedChange: l
|
|
2436
|
+
}), I = () => M ? (F(), !1) : b(), L = c && !M, R = sr({
|
|
2437
|
+
dialogRef: C,
|
|
2438
|
+
isEnded: t,
|
|
2439
|
+
isExpanded: M,
|
|
2440
|
+
canExpand: L,
|
|
2441
|
+
onExpand: P,
|
|
2442
|
+
onRelease: I
|
|
2443
|
+
});
|
|
2444
|
+
Sr({
|
|
2445
|
+
dialogRef: C,
|
|
2446
|
+
bodyRef: E,
|
|
2447
|
+
footerSlot: D,
|
|
2448
|
+
core: R,
|
|
2449
|
+
canDragDown: m || M,
|
|
2450
|
+
canDragUp: L
|
|
2451
|
+
}), gr(C, t);
|
|
2452
|
+
let { ref: z, scrollableProps: B, focusClassName: V } = qr({ labelledBy: y }), H = v(() => K(E, z), [E, z]), U = c && /* @__PURE__ */ w(Wn, {
|
|
2453
|
+
isExpanded: M,
|
|
2454
|
+
onToggle: N,
|
|
2455
|
+
unstyled: p
|
|
2456
|
+
}), W = M ? "rounded-t-none" : pr[s];
|
|
2457
|
+
return /* @__PURE__ */ w(wr.Provider, {
|
|
2458
|
+
value: x,
|
|
2459
|
+
children: S(/* @__PURE__ */ T("div", {
|
|
2460
|
+
className: e("fixed inset-0 z-50", !p && "transition-opacity duration-200 ease-out", k ? "opacity-100" : "opacity-0"),
|
|
2461
|
+
onClick: A,
|
|
2462
|
+
onMouseDown: j,
|
|
2463
|
+
children: [/* @__PURE__ */ w("div", {
|
|
2464
|
+
className: e("fixed inset-0", !p && "bg-black/60 backdrop-blur-md", f),
|
|
2465
|
+
"aria-hidden": "true"
|
|
2466
|
+
}), /* @__PURE__ */ T("div", {
|
|
2467
|
+
ref: C,
|
|
2468
|
+
role: "dialog",
|
|
2469
|
+
"aria-modal": "true",
|
|
2470
|
+
"aria-labelledby": y,
|
|
2471
|
+
tabIndex: -1,
|
|
2472
|
+
"data-bottom-sheet": "",
|
|
2473
|
+
"data-state": k ? "open" : "closed",
|
|
2474
|
+
inert: t,
|
|
2475
|
+
className: e(fr, M ? dr : ur[o], !p && [
|
|
2476
|
+
"bg-white dark:bg-gray-900",
|
|
2477
|
+
"[&,&_*]:[scrollbar-width:thin] [scrollbar-color:theme(colors.gray.300)_transparent] hover:[scrollbar-color:theme(colors.gray.400)_transparent] dark:[scrollbar-color:theme(colors.gray.600)_transparent] dark:hover:[scrollbar-color:theme(colors.gray.500)_transparent]",
|
|
2478
|
+
"shadow-2xl",
|
|
2479
|
+
W,
|
|
2480
|
+
"ms-bottom-sheet-transition"
|
|
2481
|
+
], !k && "ms-bottom-sheet-offscreen", d),
|
|
2482
|
+
onClick: (e) => e.stopPropagation(),
|
|
2483
|
+
children: [
|
|
2484
|
+
m && !M && /* @__PURE__ */ w(lr, {
|
|
2485
|
+
core: R,
|
|
2486
|
+
unstyled: p
|
|
2487
|
+
}),
|
|
2488
|
+
/* @__PURE__ */ w(_i, {}),
|
|
2489
|
+
/* @__PURE__ */ w(Dr, {
|
|
2490
|
+
titleId: y,
|
|
2491
|
+
title: r,
|
|
2492
|
+
onDismiss: b,
|
|
2493
|
+
dismissible: m,
|
|
2494
|
+
closeLabel: h,
|
|
2495
|
+
unstyled: p,
|
|
2496
|
+
actions: U
|
|
2497
|
+
}),
|
|
2498
|
+
/* @__PURE__ */ w("div", {
|
|
2499
|
+
ref: H,
|
|
2500
|
+
...B,
|
|
2501
|
+
className: e("flex-1 overflow-y-auto min-h-0 overscroll-y-contain", !p && "px-6 pb-6 text-sm leading-relaxed text-gray-600 dark:text-gray-400", V, u),
|
|
2502
|
+
children: /* @__PURE__ */ w(Er.Provider, {
|
|
2503
|
+
value: D,
|
|
2504
|
+
children: i
|
|
2505
|
+
})
|
|
2506
|
+
}),
|
|
2507
|
+
/* @__PURE__ */ w(Tr, {
|
|
2508
|
+
onSlotChange: O,
|
|
2509
|
+
unstyled: p,
|
|
2510
|
+
children: a
|
|
2511
|
+
})
|
|
2512
|
+
]
|
|
2513
|
+
})]
|
|
2514
|
+
}), document.body)
|
|
2515
|
+
});
|
|
2516
|
+
}
|
|
2517
|
+
// src/components/bottom_sheet/use_is_sheet_mounted.ts
|
|
2518
|
+
function Si(e, t) {
|
|
2519
|
+
let [n, r] = b(!e), i = h(() => t?.());
|
|
2520
|
+
return e && n && r(!1), m(() => {
|
|
2521
|
+
if (e || n) return;
|
|
2522
|
+
let t = setTimeout(() => {
|
|
2523
|
+
r(!0), i();
|
|
2524
|
+
}, 200);
|
|
2525
|
+
return () => clearTimeout(t);
|
|
2526
|
+
}, [e, n]), e || !n;
|
|
2527
|
+
}
|
|
2528
|
+
// src/components/bottom_sheet/bottom_sheet.tsx
|
|
2529
|
+
function Ci({ isOpen: e, onClose: t, height: n = "auto", radius: r = "xl", dismissible: i = !0, expandable: a = !1, onExited: o, ...s }) {
|
|
2530
|
+
return Si(e, o) ? /* @__PURE__ */ w(xi, {
|
|
2531
|
+
...s,
|
|
2532
|
+
isEnded: !e,
|
|
2533
|
+
onDismiss: t,
|
|
2534
|
+
height: n,
|
|
2535
|
+
radius: r,
|
|
2536
|
+
dismissible: i,
|
|
2537
|
+
expandable: a
|
|
2538
|
+
}) : null;
|
|
2190
2539
|
}
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2540
|
+
// src/components/drawer/drawer_styles.ts
|
|
2541
|
+
var wi = {
|
|
2542
|
+
sm: "ms-drawer-width-sm",
|
|
2543
|
+
md: "ms-drawer-width-md",
|
|
2544
|
+
lg: "ms-drawer-width-lg"
|
|
2545
|
+
}, Ti = {
|
|
2546
|
+
right: "right-0",
|
|
2547
|
+
left: "left-0"
|
|
2548
|
+
}, Ei = {
|
|
2549
|
+
right: "pt-[env(safe-area-inset-top)] pb-[env(safe-area-inset-bottom)] pr-[env(safe-area-inset-right)]",
|
|
2550
|
+
left: "pt-[env(safe-area-inset-top)] pb-[env(safe-area-inset-bottom)] pl-[env(safe-area-inset-left)]"
|
|
2551
|
+
}, Di = {
|
|
2552
|
+
right: "ms-drawer-offscreen-right",
|
|
2553
|
+
left: "ms-drawer-offscreen-left"
|
|
2554
|
+
}, Oi = {
|
|
2555
|
+
right: {
|
|
2556
|
+
none: "rounded-l-none",
|
|
2557
|
+
sm: "rounded-l-sm",
|
|
2558
|
+
md: "rounded-l-md",
|
|
2559
|
+
lg: "rounded-l-lg",
|
|
2560
|
+
xl: "rounded-l-xl",
|
|
2561
|
+
full: "rounded-l-lg"
|
|
2562
|
+
},
|
|
2563
|
+
left: {
|
|
2564
|
+
none: "rounded-r-none",
|
|
2565
|
+
sm: "rounded-r-sm",
|
|
2566
|
+
md: "rounded-r-md",
|
|
2567
|
+
lg: "rounded-r-lg",
|
|
2568
|
+
xl: "rounded-r-xl",
|
|
2569
|
+
full: "rounded-r-lg"
|
|
2570
|
+
}
|
|
2571
|
+
};
|
|
2572
|
+
// src/components/drawer/drawer.tsx
|
|
2573
|
+
function ki({ isEnded: t, onDismiss: n, title: r, children: i, footer: a, size: o, side: s, radius: c, className: l, panelClassName: u, backdropClassName: d, unstyled: f = !1, dismissible: p, closeLabel: m, initialFocusRef: h }) {
|
|
2574
|
+
bi();
|
|
2575
|
+
let _ = g(), { dismiss: y, registry: b } = kr({
|
|
2194
2576
|
onDismiss: n,
|
|
2195
2577
|
isEnded: t
|
|
2196
|
-
}), { dialogRef: x, contentRef: C, footerSlot: E, setFooterSlot: D, isVisible: O, handleBackdropClick: k, handleBackdropMouseDown: A } =
|
|
2578
|
+
}), { dialogRef: x, contentRef: C, footerSlot: E, setFooterSlot: D, isVisible: O, handleBackdropClick: k, handleBackdropMouseDown: A } = hi({
|
|
2197
2579
|
isEnded: t,
|
|
2198
2580
|
onDismiss: y,
|
|
2199
2581
|
dismissible: p,
|
|
2200
2582
|
initialFocusRef: h,
|
|
2201
2583
|
initialFocusFallbackScope: "content",
|
|
2202
|
-
getFocusFallback:
|
|
2203
|
-
}), { ref: j, scrollableProps: M, focusClassName: N } =
|
|
2204
|
-
return /* @__PURE__ */ w(
|
|
2584
|
+
getFocusFallback: gi
|
|
2585
|
+
}), { ref: j, scrollableProps: M, focusClassName: N } = qr({ labelledBy: _ }), P = v(() => K(C, j), [C, j]);
|
|
2586
|
+
return /* @__PURE__ */ w(wr.Provider, {
|
|
2205
2587
|
value: b,
|
|
2206
2588
|
children: S(/* @__PURE__ */ T("div", {
|
|
2207
2589
|
className: e("fixed inset-0 z-50", !f && "transition-opacity duration-200 ease-out", O ? "opacity-100" : "opacity-0"),
|
|
@@ -2218,17 +2600,17 @@ function Gr({ isEnded: t, onDismiss: n, title: r, children: i, footer: a, size:
|
|
|
2218
2600
|
tabIndex: -1,
|
|
2219
2601
|
"data-state": O ? "open" : "closed",
|
|
2220
2602
|
inert: t,
|
|
2221
|
-
className: e("fixed inset-y-0 h-full flex flex-col overflow-hidden",
|
|
2603
|
+
className: e("fixed inset-y-0 h-full flex flex-col overflow-hidden", Ti[s], Ei[s], wi[o], "focus:outline-none", !f && [
|
|
2222
2604
|
"bg-white dark:bg-gray-900",
|
|
2223
2605
|
"[&,&_*]:[scrollbar-width:thin] [scrollbar-color:theme(colors.gray.300)_transparent] hover:[scrollbar-color:theme(colors.gray.400)_transparent] dark:[scrollbar-color:theme(colors.gray.600)_transparent] dark:hover:[scrollbar-color:theme(colors.gray.500)_transparent]",
|
|
2224
2606
|
"shadow-2xl",
|
|
2225
|
-
|
|
2607
|
+
Oi[s][c],
|
|
2226
2608
|
"ms-drawer-transition"
|
|
2227
|
-
], !O &&
|
|
2609
|
+
], !O && Di[s], u),
|
|
2228
2610
|
onClick: (e) => e.stopPropagation(),
|
|
2229
2611
|
children: [
|
|
2230
|
-
/* @__PURE__ */ w(
|
|
2231
|
-
/* @__PURE__ */ w(
|
|
2612
|
+
/* @__PURE__ */ w(_i, {}),
|
|
2613
|
+
/* @__PURE__ */ w(Dr, {
|
|
2232
2614
|
titleId: _,
|
|
2233
2615
|
title: r,
|
|
2234
2616
|
onDismiss: y,
|
|
@@ -2240,12 +2622,12 @@ function Gr({ isEnded: t, onDismiss: n, title: r, children: i, footer: a, size:
|
|
|
2240
2622
|
ref: P,
|
|
2241
2623
|
...M,
|
|
2242
2624
|
className: e("flex-1 overflow-y-auto min-h-0", !f && "px-6 pb-6 text-sm leading-relaxed text-gray-600 dark:text-gray-400", N, l),
|
|
2243
|
-
children: /* @__PURE__ */ w(
|
|
2625
|
+
children: /* @__PURE__ */ w(Er.Provider, {
|
|
2244
2626
|
value: E,
|
|
2245
2627
|
children: i
|
|
2246
2628
|
})
|
|
2247
2629
|
}),
|
|
2248
|
-
/* @__PURE__ */ w(
|
|
2630
|
+
/* @__PURE__ */ w(Tr, {
|
|
2249
2631
|
onSlotChange: D,
|
|
2250
2632
|
unstyled: f,
|
|
2251
2633
|
children: a
|
|
@@ -2255,7 +2637,7 @@ function Gr({ isEnded: t, onDismiss: n, title: r, children: i, footer: a, size:
|
|
|
2255
2637
|
}), document.body)
|
|
2256
2638
|
});
|
|
2257
2639
|
}
|
|
2258
|
-
function
|
|
2640
|
+
function Ai(e, t) {
|
|
2259
2641
|
let [n, r] = b(!e), i = h(() => t?.());
|
|
2260
2642
|
return e && n && r(!1), m(() => {
|
|
2261
2643
|
if (e || n) return;
|
|
@@ -2265,8 +2647,8 @@ function Kr(e, t) {
|
|
|
2265
2647
|
return () => clearTimeout(t);
|
|
2266
2648
|
}, [e, n]), e || !n;
|
|
2267
2649
|
}
|
|
2268
|
-
function
|
|
2269
|
-
return
|
|
2650
|
+
function ji({ isOpen: e, onClose: t, size: n = "md", side: r = "right", radius: i = "none", dismissible: a = !0, onExited: o, ...s }) {
|
|
2651
|
+
return Ai(e, o) ? /* @__PURE__ */ w(ki, {
|
|
2270
2652
|
...s,
|
|
2271
2653
|
isEnded: !e,
|
|
2272
2654
|
onDismiss: t,
|
|
@@ -2277,21 +2659,21 @@ function qr({ isOpen: e, onClose: t, size: n = "md", side: r = "right", radius:
|
|
|
2277
2659
|
}) : null;
|
|
2278
2660
|
}
|
|
2279
2661
|
// src/components/shared/use_controlled_length.ts
|
|
2280
|
-
function
|
|
2662
|
+
function Mi(e) {
|
|
2281
2663
|
return typeof e == "string" ? e.length : 0;
|
|
2282
2664
|
}
|
|
2283
|
-
function
|
|
2284
|
-
let [n, r] = b(
|
|
2665
|
+
function Ni(e, t) {
|
|
2666
|
+
let [n, r] = b(Mi(t)), i = e !== void 0;
|
|
2285
2667
|
return {
|
|
2286
|
-
length: i ?
|
|
2668
|
+
length: i ? Mi(e) : n,
|
|
2287
2669
|
trackLength: (e) => {
|
|
2288
2670
|
i || r(e.length);
|
|
2289
2671
|
}
|
|
2290
2672
|
};
|
|
2291
2673
|
}
|
|
2292
2674
|
// src/components/input/input.tsx
|
|
2293
|
-
function
|
|
2294
|
-
let { fieldId: v, errorId: y, descriptionId: b, labelId: x, characterCountId: S } = ot(m), { length: C, trackLength: E } =
|
|
2675
|
+
function Pi({ label: t, description: n, error: r, showCharCount: i = !1, minLength: a, maxLength: o, radius: s = "md", unstyled: c = !1, className: l, wrapperClassName: u, value: d, defaultValue: f, onChange: p, id: m, "aria-describedby": h, "aria-label": g, ..._ }) {
|
|
2676
|
+
let { fieldId: v, errorId: y, descriptionId: b, labelId: x, characterCountId: S } = ot(m), { length: C, trackLength: E } = Ni(d, f), D = i && (a !== void 0 || o !== void 0), O = (e) => {
|
|
2295
2677
|
E(e.target.value), p?.(e);
|
|
2296
2678
|
};
|
|
2297
2679
|
return /* @__PURE__ */ T(Ct, {
|
|
@@ -2308,7 +2690,8 @@ function Xr({ label: t, description: n, error: r, showCharCount: i = !1, minLeng
|
|
|
2308
2690
|
className: e("w-full disabled:opacity-50 disabled:cursor-not-allowed", !c && [
|
|
2309
2691
|
je,
|
|
2310
2692
|
z[s],
|
|
2311
|
-
"px-3 py-2 text-sm"
|
|
2693
|
+
"px-3 py-2 text-sm",
|
|
2694
|
+
"min-h-[var(--ms-control-min-height,0px)]"
|
|
2312
2695
|
], !c && r && e("border-red-500 dark:border-red-400", "focus:ring-red-500"), l),
|
|
2313
2696
|
...d === void 0 ? { defaultValue: f } : { value: d },
|
|
2314
2697
|
minLength: a,
|
|
@@ -2330,13 +2713,13 @@ function Xr({ label: t, description: n, error: r, showCharCount: i = !1, minLeng
|
|
|
2330
2713
|
});
|
|
2331
2714
|
}
|
|
2332
2715
|
// src/components/kbd/kbd.tsx
|
|
2333
|
-
var
|
|
2716
|
+
var Fi = {
|
|
2334
2717
|
xs: "px-1.5 py-0.5 text-xs",
|
|
2335
2718
|
sm: "px-2 py-0.5 text-xs",
|
|
2336
2719
|
md: "px-2.5 py-1 text-sm",
|
|
2337
2720
|
lg: "px-3 py-1 text-base"
|
|
2338
|
-
},
|
|
2339
|
-
className: e("inline-flex items-center",
|
|
2721
|
+
}, Ii = ({ children: t, size: n = "sm", radius: r = "sm", unstyled: i = !1, className: a }) => /* @__PURE__ */ w("kbd", {
|
|
2722
|
+
className: e("inline-flex items-center", Fi[n], !i && [
|
|
2340
2723
|
"border font-semibold uppercase",
|
|
2341
2724
|
"text-gray-600 dark:text-gray-300",
|
|
2342
2725
|
"bg-gray-100 dark:bg-gray-700",
|
|
@@ -2344,18 +2727,18 @@ var Zr = {
|
|
|
2344
2727
|
z[r]
|
|
2345
2728
|
], a),
|
|
2346
2729
|
children: t
|
|
2347
|
-
}),
|
|
2348
|
-
function
|
|
2730
|
+
}), Li = 4;
|
|
2731
|
+
function Ri(e, t) {
|
|
2349
2732
|
return t === "center" ? e : `${e}-${t}`;
|
|
2350
2733
|
}
|
|
2351
|
-
function
|
|
2734
|
+
function zi({ trigger: t, children: o, side: l = "bottom", align: d = "start", radius: p = "md", unstyled: h = !1, panelClassName: _, className: v, disabled: x = !1, ref: S }) {
|
|
2352
2735
|
let C = y(null), [E, D] = b(null), [O, k] = b("first"), { isMounted: A, isVisible: j, setIsVisible: M, open: N, close: P } = te(), { refs: F, floatingStyles: I, isPositioned: L } = s({
|
|
2353
|
-
placement:
|
|
2736
|
+
placement: Ri(l, d),
|
|
2354
2737
|
strategy: "fixed",
|
|
2355
2738
|
open: A,
|
|
2356
2739
|
whileElementsMounted: n,
|
|
2357
2740
|
middleware: [
|
|
2358
|
-
i(
|
|
2741
|
+
i(Li),
|
|
2359
2742
|
r(),
|
|
2360
2743
|
a({ padding: 8 }),
|
|
2361
2744
|
jn()
|
|
@@ -2405,7 +2788,7 @@ function ti({ trigger: t, children: o, side: l = "bottom", align: d = "start", r
|
|
|
2405
2788
|
});
|
|
2406
2789
|
}
|
|
2407
2790
|
// src/components/menu_group/menu_group.tsx
|
|
2408
|
-
function
|
|
2791
|
+
function Bi({ label: t, children: n, unstyled: r = !1, className: i, wrapperClassName: a }) {
|
|
2409
2792
|
let o = g();
|
|
2410
2793
|
return /* @__PURE__ */ T("div", {
|
|
2411
2794
|
role: "group",
|
|
@@ -2420,12 +2803,12 @@ function ni({ label: t, children: n, unstyled: r = !1, className: i, wrapperClas
|
|
|
2420
2803
|
});
|
|
2421
2804
|
}
|
|
2422
2805
|
// src/components/menu_item/menu_item_content.tsx
|
|
2423
|
-
var
|
|
2806
|
+
var Vi = ({ icon: t, danger: n = !1, unstyled: r = !1, children: i }) => /* @__PURE__ */ T(C, { children: [t && /* @__PURE__ */ w("span", {
|
|
2424
2807
|
className: e(t, "h-4 w-4 flex-shrink-0", !n && !r && "text-gray-500 dark:text-gray-400"),
|
|
2425
2808
|
"aria-hidden": "true"
|
|
2426
2809
|
}), i] });
|
|
2427
2810
|
// src/components/menu_item/menu_item_end.tsx
|
|
2428
|
-
function
|
|
2811
|
+
function Hi({ trailing: t, selected: n, unstyled: r = !1 }) {
|
|
2429
2812
|
let i = n !== void 0;
|
|
2430
2813
|
return !t && !i ? null : /* @__PURE__ */ T("span", {
|
|
2431
2814
|
className: "ml-auto flex flex-shrink-0 items-center gap-2 pl-2",
|
|
@@ -2439,26 +2822,26 @@ function ii({ trailing: t, selected: n, unstyled: r = !1 }) {
|
|
|
2439
2822
|
});
|
|
2440
2823
|
}
|
|
2441
2824
|
// src/components/menu_item/menu_item_styles.ts
|
|
2442
|
-
var
|
|
2825
|
+
var Ui = "flex w-full cursor-pointer items-center whitespace-nowrap text-left", Wi = "gap-2 px-3 py-2 text-sm transition-colors", Gi = {
|
|
2443
2826
|
default: "text-gray-900 dark:text-gray-100 focus-visible:bg-blue-50 dark:focus-visible:bg-blue-900/40",
|
|
2444
2827
|
danger: "text-red-700 dark:text-red-400 focus-visible:bg-red-50 dark:focus-visible:bg-red-950/40"
|
|
2445
2828
|
};
|
|
2446
|
-
function
|
|
2829
|
+
function Ki({ hoverClasses: t, stateClasses: n, danger: r, unstyled: i, radius: a, className: o }) {
|
|
2447
2830
|
let s = r ? "danger" : "default";
|
|
2448
|
-
return e(
|
|
2831
|
+
return e(Ui, !i && [
|
|
2449
2832
|
"outline-hidden focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-blue-500 dark:focus-visible:outline-blue-400",
|
|
2450
|
-
|
|
2451
|
-
|
|
2833
|
+
Wi,
|
|
2834
|
+
Gi[s],
|
|
2452
2835
|
t[s],
|
|
2453
2836
|
a && z[a]
|
|
2454
2837
|
], n, o);
|
|
2455
2838
|
}
|
|
2456
2839
|
// src/components/menu_item/menu_item_button.tsx
|
|
2457
|
-
var
|
|
2840
|
+
var qi = {
|
|
2458
2841
|
default: "hover:enabled:bg-gray-50 dark:hover:enabled:bg-gray-800/60",
|
|
2459
2842
|
danger: "hover:enabled:bg-red-50 dark:hover:enabled:bg-red-950/40"
|
|
2460
|
-
},
|
|
2461
|
-
function
|
|
2843
|
+
}, Ji = ["disabled:cursor-not-allowed disabled:opacity-50"];
|
|
2844
|
+
function Yi({ icon: e, trailing: t, onClick: n, selected: r, danger: i = !1, disabled: a = !1, children: o, radius: s, unstyled: c = !1, className: l, ref: u }) {
|
|
2462
2845
|
let d = yn();
|
|
2463
2846
|
return /* @__PURE__ */ T("button", {
|
|
2464
2847
|
ref: u,
|
|
@@ -2470,20 +2853,20 @@ function di({ icon: e, trailing: t, onClick: n, selected: r, danger: i = !1, dis
|
|
|
2470
2853
|
e.stopPropagation(), n(e), d?.();
|
|
2471
2854
|
},
|
|
2472
2855
|
disabled: a,
|
|
2473
|
-
className:
|
|
2474
|
-
hoverClasses:
|
|
2475
|
-
stateClasses:
|
|
2856
|
+
className: Ki({
|
|
2857
|
+
hoverClasses: qi,
|
|
2858
|
+
stateClasses: Ji,
|
|
2476
2859
|
danger: i,
|
|
2477
2860
|
unstyled: c,
|
|
2478
2861
|
radius: s,
|
|
2479
2862
|
className: l
|
|
2480
2863
|
}),
|
|
2481
|
-
children: [/* @__PURE__ */ w(
|
|
2864
|
+
children: [/* @__PURE__ */ w(Vi, {
|
|
2482
2865
|
icon: e,
|
|
2483
2866
|
danger: i,
|
|
2484
2867
|
unstyled: c,
|
|
2485
2868
|
children: o
|
|
2486
|
-
}), /* @__PURE__ */ w(
|
|
2869
|
+
}), /* @__PURE__ */ w(Hi, {
|
|
2487
2870
|
trailing: t,
|
|
2488
2871
|
selected: r,
|
|
2489
2872
|
unstyled: c
|
|
@@ -2491,11 +2874,11 @@ function di({ icon: e, trailing: t, onClick: n, selected: r, danger: i = !1, dis
|
|
|
2491
2874
|
});
|
|
2492
2875
|
}
|
|
2493
2876
|
// src/components/menu_item/menu_item_link.tsx
|
|
2494
|
-
var
|
|
2877
|
+
var Xi = "_blank", Zi = "noopener noreferrer", Qi = {
|
|
2495
2878
|
default: "hover:bg-gray-50 dark:hover:bg-gray-800/60",
|
|
2496
2879
|
danger: "hover:bg-red-50 dark:hover:bg-red-950/40"
|
|
2497
|
-
},
|
|
2498
|
-
function
|
|
2880
|
+
}, $i = ["no-underline", "aria-disabled:pointer-events-none aria-disabled:cursor-not-allowed aria-disabled:opacity-50"];
|
|
2881
|
+
function ea({ icon: e, trailing: t, href: n, target: r, rel: i, danger: a = !1, disabled: o = !1, children: s, radius: c, unstyled: l = !1, className: u, ref: d }) {
|
|
2499
2882
|
let f = yn();
|
|
2500
2883
|
return /* @__PURE__ */ T("a", {
|
|
2501
2884
|
ref: d,
|
|
@@ -2503,91 +2886,91 @@ function gi({ icon: e, trailing: t, href: n, target: r, rel: i, danger: a = !1,
|
|
|
2503
2886
|
tabIndex: -1,
|
|
2504
2887
|
href: o ? void 0 : n,
|
|
2505
2888
|
target: r,
|
|
2506
|
-
rel: i ?? (r ===
|
|
2889
|
+
rel: i ?? (r === Xi ? Zi : void 0),
|
|
2507
2890
|
"aria-disabled": o || void 0,
|
|
2508
2891
|
onClick: (e) => {
|
|
2509
2892
|
e.stopPropagation(), f?.();
|
|
2510
2893
|
},
|
|
2511
|
-
className:
|
|
2512
|
-
hoverClasses:
|
|
2513
|
-
stateClasses:
|
|
2894
|
+
className: Ki({
|
|
2895
|
+
hoverClasses: Qi,
|
|
2896
|
+
stateClasses: $i,
|
|
2514
2897
|
danger: a,
|
|
2515
2898
|
unstyled: l,
|
|
2516
2899
|
radius: c,
|
|
2517
2900
|
className: u
|
|
2518
2901
|
}),
|
|
2519
|
-
children: [/* @__PURE__ */ w(
|
|
2902
|
+
children: [/* @__PURE__ */ w(Vi, {
|
|
2520
2903
|
icon: e,
|
|
2521
2904
|
danger: a,
|
|
2522
2905
|
unstyled: l,
|
|
2523
2906
|
children: s
|
|
2524
|
-
}), /* @__PURE__ */ w(
|
|
2907
|
+
}), /* @__PURE__ */ w(Hi, {
|
|
2525
2908
|
trailing: t,
|
|
2526
2909
|
unstyled: l
|
|
2527
2910
|
})]
|
|
2528
2911
|
});
|
|
2529
2912
|
}
|
|
2530
2913
|
// src/components/menu_item/menu_item.tsx
|
|
2531
|
-
function
|
|
2532
|
-
return e.href === void 0 ? /* @__PURE__ */ w(
|
|
2914
|
+
function ta(e) {
|
|
2915
|
+
return e.href === void 0 ? /* @__PURE__ */ w(Yi, { ...e }) : /* @__PURE__ */ w(ea, { ...e });
|
|
2533
2916
|
}
|
|
2534
2917
|
// src/components/menu_separator/menu_separator.tsx
|
|
2535
|
-
var
|
|
2918
|
+
var na = ({ unstyled: t = !1, className: n }) => /* @__PURE__ */ w("hr", {
|
|
2536
2919
|
"aria-orientation": "horizontal",
|
|
2537
2920
|
className: e("w-full", !t && ["my-1 border-0 border-t", "border-gray-100 dark:border-gray-800"], n)
|
|
2538
|
-
}),
|
|
2921
|
+
}), ra = {
|
|
2539
2922
|
danger: "i-mdi-alert-circle",
|
|
2540
2923
|
primary: "i-mdi-help-circle",
|
|
2541
2924
|
success: "i-mdi-check-circle"
|
|
2542
|
-
},
|
|
2925
|
+
}, ia = {
|
|
2543
2926
|
danger: "bg-red-50 text-red-600 dark:bg-red-500/10 dark:text-red-400",
|
|
2544
2927
|
primary: "bg-blue-50 text-blue-600 dark:bg-blue-500/10 dark:text-blue-400",
|
|
2545
2928
|
success: "bg-green-50 text-green-600 dark:bg-green-500/10 dark:text-green-400"
|
|
2546
2929
|
};
|
|
2547
|
-
function
|
|
2930
|
+
function aa({ title: t, color: n }) {
|
|
2548
2931
|
return /* @__PURE__ */ T("div", {
|
|
2549
2932
|
className: "flex items-center gap-3",
|
|
2550
2933
|
children: [/* @__PURE__ */ w("span", {
|
|
2551
|
-
className: e("flex h-9 w-9 shrink-0 items-center justify-center rounded-full",
|
|
2934
|
+
className: e("flex h-9 w-9 shrink-0 items-center justify-center rounded-full", ia[n]),
|
|
2552
2935
|
"aria-hidden": "true",
|
|
2553
|
-
children: /* @__PURE__ */ w("span", { className: e(
|
|
2936
|
+
children: /* @__PURE__ */ w("span", { className: e(ra[n], "h-5 w-5") })
|
|
2554
2937
|
}), t]
|
|
2555
2938
|
});
|
|
2556
2939
|
}
|
|
2557
2940
|
// src/components/modal/modal_sheet_classes.ts
|
|
2558
|
-
var
|
|
2941
|
+
var oa = {
|
|
2559
2942
|
sm: "ms-modal-sheet-size-sm",
|
|
2560
2943
|
md: "ms-modal-sheet-size-md",
|
|
2561
2944
|
lg: "ms-modal-sheet-size-lg",
|
|
2562
2945
|
xl: "ms-modal-sheet-size-xl"
|
|
2563
|
-
},
|
|
2946
|
+
}, sa = {
|
|
2564
2947
|
none: "ms-modal-sheet-radius-none",
|
|
2565
2948
|
sm: "ms-modal-sheet-radius-sm",
|
|
2566
2949
|
md: "ms-modal-sheet-radius-md",
|
|
2567
2950
|
lg: "ms-modal-sheet-radius-lg",
|
|
2568
2951
|
xl: "ms-modal-sheet-radius-xl",
|
|
2569
2952
|
full: "ms-modal-sheet-radius-full"
|
|
2570
|
-
},
|
|
2953
|
+
}, ca = "a dialog needs an accessible name. Provide a non-empty `title` or `aria-label` prop.", la = {
|
|
2571
2954
|
sm: "max-w-md",
|
|
2572
2955
|
md: "max-w-lg",
|
|
2573
2956
|
lg: "max-w-2xl",
|
|
2574
2957
|
xl: "max-w-4xl"
|
|
2575
|
-
},
|
|
2958
|
+
}, ua = {
|
|
2576
2959
|
auto: "",
|
|
2577
2960
|
fixed: "ms-modal-height-fixed"
|
|
2578
|
-
},
|
|
2961
|
+
}, da = {
|
|
2579
2962
|
auto: "overflow-y-auto",
|
|
2580
2963
|
fixed: "overflow-hidden flex flex-col"
|
|
2581
2964
|
};
|
|
2582
|
-
function
|
|
2583
|
-
let x = g(), C = g(), { dialogRef: E, contentRef: D, footerSlot: O, setFooterSlot: k, isVisible: A, handleBackdropClick: j, handleBackdropMouseDown: M } =
|
|
2965
|
+
function fa({ isEnded: t, onDismiss: n, title: r, children: i, footer: a, size: o = "md", height: s = "auto", phoneLayout: c = "center", radius: l = "xl", className: u, panelClassName: d, backdropClassName: f, unstyled: p = !1, dismissible: m = !0, closeLabel: h, role: _ = "dialog", initialFocusRef: y, "aria-label": b }) {
|
|
2966
|
+
let x = g(), C = g(), { dialogRef: E, contentRef: D, footerSlot: O, setFooterSlot: k, isVisible: A, handleBackdropClick: j, handleBackdropMouseDown: M } = hi({
|
|
2584
2967
|
isEnded: t,
|
|
2585
2968
|
onDismiss: n,
|
|
2586
2969
|
dismissible: m,
|
|
2587
2970
|
initialFocusRef: y
|
|
2588
2971
|
});
|
|
2589
|
-
ut("Modal", !!r || !!b?.trim(),
|
|
2590
|
-
let { ref: N, scrollableProps: P, focusClassName: F } =
|
|
2972
|
+
ut("Modal", !!r || !!b?.trim(), ca);
|
|
2973
|
+
let { ref: N, scrollableProps: P, focusClassName: F } = qr({
|
|
2591
2974
|
labelledBy: r ? x : void 0,
|
|
2592
2975
|
label: b
|
|
2593
2976
|
}), I = v(() => K(D, N), [D, N]), L = s === "auto", R = c === "sheet", B = _ === "alertdialog" && !!i;
|
|
@@ -2612,18 +2995,18 @@ function Oi({ isEnded: t, onDismiss: n, title: r, children: i, footer: a, size:
|
|
|
2612
2995
|
tabIndex: -1,
|
|
2613
2996
|
"data-state": A ? "open" : "closed",
|
|
2614
2997
|
"data-phone-layout": R ? "sheet" : void 0,
|
|
2615
|
-
className: e("relative w-full", R ?
|
|
2998
|
+
className: e("relative w-full", R ? oa[o] : la[o], ua[s], R && "ms-modal-sheet-panel", R && s === "fixed" && "ms-modal-sheet-height-fixed", "ms-modal-max-height overflow-hidden flex flex-col", "focus:outline-none", !p && [
|
|
2616
2999
|
"bg-white dark:bg-gray-900",
|
|
2617
3000
|
"[&,&_*]:[scrollbar-width:thin] [scrollbar-color:theme(colors.gray.300)_transparent] hover:[scrollbar-color:theme(colors.gray.400)_transparent] dark:[scrollbar-color:theme(colors.gray.600)_transparent] dark:hover:[scrollbar-color:theme(colors.gray.500)_transparent]",
|
|
2618
3001
|
"shadow-2xl",
|
|
2619
|
-
R ?
|
|
3002
|
+
R ? sa[l] : z[l],
|
|
2620
3003
|
"transition-all duration-200 ease-out",
|
|
2621
3004
|
A ? "opacity-100" : R ? "ms-modal-sheet-closed" : "ms-modal-panel-closed"
|
|
2622
3005
|
], d),
|
|
2623
3006
|
onClick: (e) => e.stopPropagation(),
|
|
2624
3007
|
children: [
|
|
2625
|
-
/* @__PURE__ */ w(
|
|
2626
|
-
r && /* @__PURE__ */ w(
|
|
3008
|
+
/* @__PURE__ */ w(_i, {}),
|
|
3009
|
+
r && /* @__PURE__ */ w(Dr, {
|
|
2627
3010
|
titleId: x,
|
|
2628
3011
|
title: r,
|
|
2629
3012
|
onDismiss: n,
|
|
@@ -2635,13 +3018,13 @@ function Oi({ isEnded: t, onDismiss: n, title: r, children: i, footer: a, size:
|
|
|
2635
3018
|
ref: I,
|
|
2636
3019
|
id: B ? C : void 0,
|
|
2637
3020
|
...L ? P : void 0,
|
|
2638
|
-
className: e("flex-1 min-h-0", !p && "px-6 pb-6 text-sm leading-relaxed text-gray-600 dark:text-gray-400",
|
|
2639
|
-
children: /* @__PURE__ */ w(
|
|
3021
|
+
className: e("flex-1 min-h-0", !p && "px-6 pb-6 text-sm leading-relaxed text-gray-600 dark:text-gray-400", da[s], !p && !r && "pt-6", L && F, u),
|
|
3022
|
+
children: /* @__PURE__ */ w(Er.Provider, {
|
|
2640
3023
|
value: O,
|
|
2641
3024
|
children: i
|
|
2642
3025
|
})
|
|
2643
3026
|
}),
|
|
2644
|
-
/* @__PURE__ */ w(
|
|
3027
|
+
/* @__PURE__ */ w(Tr, {
|
|
2645
3028
|
onSlotChange: k,
|
|
2646
3029
|
unstyled: p,
|
|
2647
3030
|
children: a
|
|
@@ -2651,8 +3034,8 @@ function Oi({ isEnded: t, onDismiss: n, title: r, children: i, footer: a, size:
|
|
|
2651
3034
|
}), document.body);
|
|
2652
3035
|
}
|
|
2653
3036
|
// src/components/modal/confirm_modal.tsx
|
|
2654
|
-
var
|
|
2655
|
-
|
|
3037
|
+
var pa = D(({ call: e, title: t, children: n, confirmLabel: r, cancelLabel: i, confirmColor: a, radius: o, closeLabel: s, onConfirm: c, onError: l }) => {
|
|
3038
|
+
bi();
|
|
2656
3039
|
let [u, d] = b(!1), f = y(null), p = () => e.end(!1), m = async () => {
|
|
2657
3040
|
if (!c) e.end(!0);
|
|
2658
3041
|
else {
|
|
@@ -2664,10 +3047,10 @@ var ki = D(({ call: e, title: t, children: n, confirmLabel: r, cancelLabel: i, c
|
|
|
2664
3047
|
}
|
|
2665
3048
|
}
|
|
2666
3049
|
}, h = Q(), g = r ?? h.confirm, _ = i ?? h.cancel, v = a ?? "primary";
|
|
2667
|
-
return /* @__PURE__ */ w(
|
|
3050
|
+
return /* @__PURE__ */ w(fa, {
|
|
2668
3051
|
isEnded: e.ended,
|
|
2669
3052
|
onDismiss: p,
|
|
2670
|
-
title: /* @__PURE__ */ w(
|
|
3053
|
+
title: /* @__PURE__ */ w(aa, {
|
|
2671
3054
|
title: t,
|
|
2672
3055
|
color: v
|
|
2673
3056
|
}),
|
|
@@ -2697,18 +3080,18 @@ var ki = D(({ call: e, title: t, children: n, confirmLabel: r, cancelLabel: i, c
|
|
|
2697
3080
|
});
|
|
2698
3081
|
}, 200);
|
|
2699
3082
|
// src/components/modal/modal.tsx
|
|
2700
|
-
function
|
|
3083
|
+
function ma(e, t) {
|
|
2701
3084
|
return typeof e == "function" ? e(t) : e;
|
|
2702
3085
|
}
|
|
2703
|
-
var
|
|
2704
|
-
|
|
2705
|
-
let { dismiss: g, registry: _ } =
|
|
3086
|
+
var ha = D(({ call: e, title: t, children: n, size: r, height: i, phoneLayout: a, radius: o, className: s, panelClassName: c, backdropClassName: l, unstyled: u, dismissible: d, closeLabel: f, role: p, initialFocusRef: m, "aria-label": h }) => {
|
|
3087
|
+
bi();
|
|
3088
|
+
let { dismiss: g, registry: _ } = kr({
|
|
2706
3089
|
onDismiss: () => e.end(),
|
|
2707
3090
|
isEnded: e.ended
|
|
2708
3091
|
});
|
|
2709
|
-
return /* @__PURE__ */ w(
|
|
3092
|
+
return /* @__PURE__ */ w(wr.Provider, {
|
|
2710
3093
|
value: _,
|
|
2711
|
-
children: /* @__PURE__ */ w(
|
|
3094
|
+
children: /* @__PURE__ */ w(fa, {
|
|
2712
3095
|
isEnded: e.ended,
|
|
2713
3096
|
onDismiss: g,
|
|
2714
3097
|
title: t,
|
|
@@ -2725,18 +3108,18 @@ var ji = D(({ call: e, title: t, children: n, size: r, height: i, phoneLayout: a
|
|
|
2725
3108
|
role: p,
|
|
2726
3109
|
initialFocusRef: m,
|
|
2727
3110
|
"aria-label": h,
|
|
2728
|
-
children:
|
|
3111
|
+
children: ma(n, g)
|
|
2729
3112
|
})
|
|
2730
3113
|
});
|
|
2731
3114
|
}, 200);
|
|
2732
3115
|
// src/components/modal/modal_footer.tsx
|
|
2733
|
-
function
|
|
2734
|
-
let t = p(
|
|
3116
|
+
function ga({ children: e }) {
|
|
3117
|
+
let t = p(Er);
|
|
2735
3118
|
return t ? S(e, t) : null;
|
|
2736
3119
|
}
|
|
2737
3120
|
// src/components/modal/use_dismiss_guard.ts
|
|
2738
|
-
function
|
|
2739
|
-
let n = p(
|
|
3121
|
+
function _a(e, t = !0) {
|
|
3122
|
+
let n = p(wr), r = y(e);
|
|
2740
3123
|
if (_(() => {
|
|
2741
3124
|
r.current = e;
|
|
2742
3125
|
}), m(() => {
|
|
@@ -2744,11 +3127,11 @@ function Ni(e, t = !0) {
|
|
|
2744
3127
|
}, [n, t]), !n) throw Error("useDismissGuard must be used inside a Modal or a Drawer");
|
|
2745
3128
|
}
|
|
2746
3129
|
// src/components/modal_provider/modal_provider.tsx
|
|
2747
|
-
function
|
|
2748
|
-
return /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(
|
|
3130
|
+
function va() {
|
|
3131
|
+
return /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(ha, {}), /* @__PURE__ */ w(pa, {})] });
|
|
2749
3132
|
}
|
|
2750
3133
|
// src/components/multi_combobox/multi_combobox_checkbox.tsx
|
|
2751
|
-
function
|
|
3134
|
+
function ya({ isSelected: t, unstyled: n, radius: r }) {
|
|
2752
3135
|
return /* @__PURE__ */ w("span", {
|
|
2753
3136
|
"aria-hidden": !0,
|
|
2754
3137
|
className: e("flex h-4 w-4 shrink-0 items-center justify-center", !n && [
|
|
@@ -2769,14 +3152,14 @@ function Fi({ isSelected: t, unstyled: n, radius: r }) {
|
|
|
2769
3152
|
});
|
|
2770
3153
|
}
|
|
2771
3154
|
// src/components/multi_combobox/multi_combobox.tsx
|
|
2772
|
-
var
|
|
2773
|
-
function
|
|
3155
|
+
var ba = 2, xa = "flex items-center gap-2";
|
|
3156
|
+
function Sa(e, t, n, r, i) {
|
|
2774
3157
|
return i?.(e, t) ? !0 : r === void 0 || n.has(e) ? !1 : t.length >= r;
|
|
2775
3158
|
}
|
|
2776
|
-
function
|
|
3159
|
+
function Ca(e, t, n) {
|
|
2777
3160
|
return t.has(n) ? e.filter((e) => e !== n) : [...e, n];
|
|
2778
3161
|
}
|
|
2779
|
-
function
|
|
3162
|
+
function wa(e, t) {
|
|
2780
3163
|
if (e.length <= t) return {
|
|
2781
3164
|
visibleOptions: e,
|
|
2782
3165
|
hiddenCount: 0
|
|
@@ -2787,11 +3170,11 @@ function Bi(e, t) {
|
|
|
2787
3170
|
hiddenCount: e.length - n
|
|
2788
3171
|
};
|
|
2789
3172
|
}
|
|
2790
|
-
function
|
|
3173
|
+
function Ta(e, t, n) {
|
|
2791
3174
|
return typeof e == "string" ? `${e}, ${n}` : t ? `${t}, ${n}` : n;
|
|
2792
3175
|
}
|
|
2793
|
-
var
|
|
2794
|
-
function
|
|
3176
|
+
var Ea = "inline-flex items-center rounded-full bg-gray-200 dark:bg-gray-700 px-2 py-0.5 text-xs text-gray-900 dark:text-gray-100";
|
|
3177
|
+
function Da({ options: t, filterOption: n, label: r, description: i, "aria-label": a, error: o, placeholder: s, searchPlaceholder: c, noResultsText: l, clearLabel: u, clearText: d, maxSelectedValues: p, isOptionDisabled: h, maxDisplayedValues: g = ba, formatOverflowCount: _, formatSelectedCount: x, formatMaxSelectedHint: S, radius: E = "sm", unstyled: D = !1, disabled: O = !1, required: k = !1, className: A, wrapperClassName: j, dropdownClassName: M, optionLabelOverflow: N = "wrap", values: P, defaultValues: I = [], onChange: L, onDropdownClose: R, id: V }) {
|
|
2795
3178
|
let H = Q(), { fieldId: U, errorId: G, descriptionId: ee, labelId: te } = ot(V), ne = `${U}-listbox`, K = `${U}-max-hint`, re = `${U}-selection`, ie = r !== void 0 || !!a, ae = y(null), q = y(null), oe = y(null), J = y(null), [Y, se] = at(P, I), [ce, X] = b(""), [Z, le] = b(!1), ue = pn(Z), de = v(() => new Set(Y), [Y]), fe = v(() => n ? [] : t.map((e) => e.label.toLowerCase()), [t, n]), pe = v(() => {
|
|
2796
3179
|
let e = ce.trim().toLowerCase();
|
|
2797
3180
|
return e ? n ? t.filter((e) => n(e, ce)) : t.filter((t, n) => fe[n].includes(e)) : t;
|
|
@@ -2804,7 +3187,7 @@ function Ui({ options: t, filterOption: n, label: r, description: i, "aria-label
|
|
|
2804
3187
|
optionCount: pe.length,
|
|
2805
3188
|
getOptionId: (e) => Tt(ne, e),
|
|
2806
3189
|
isOpen: Z
|
|
2807
|
-
}), xe = v(() => t.filter((e) => de.has(e.value)), [t, de]), Se = ie && xe.length > 0, { visibleOptions: Ce, hiddenCount: we } =
|
|
3190
|
+
}), xe = v(() => t.filter((e) => de.has(e.value)), [t, de]), Se = ie && xe.length > 0, { visibleOptions: Ce, hiddenCount: we } = wa(xe, g), Te = () => {
|
|
2808
3191
|
O || le(!0);
|
|
2809
3192
|
}, $ = f(() => {
|
|
2810
3193
|
le(!1), X(""), be(), R?.(Y);
|
|
@@ -2815,8 +3198,8 @@ function Ui({ options: t, filterOption: n, label: r, description: i, "aria-label
|
|
|
2815
3198
|
]), Ee = () => {
|
|
2816
3199
|
Z ? $() : Te();
|
|
2817
3200
|
}, De = (e) => {
|
|
2818
|
-
if (
|
|
2819
|
-
let t =
|
|
3201
|
+
if (Sa(e, Y, de, p, h)) return;
|
|
3202
|
+
let t = Ca(Y, de, e);
|
|
2820
3203
|
se(t), L?.(t);
|
|
2821
3204
|
}, Oe = () => {
|
|
2822
3205
|
se([]), L?.([]);
|
|
@@ -2845,9 +3228,9 @@ function Ui({ options: t, filterOption: n, label: r, description: i, "aria-label
|
|
|
2845
3228
|
De(e.value);
|
|
2846
3229
|
}), Be = (e) => ({
|
|
2847
3230
|
isSelected: de.has(e.value),
|
|
2848
|
-
isDisabled:
|
|
2849
|
-
className:
|
|
2850
|
-
}), Ve = f((e, t, n) => /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(
|
|
3231
|
+
isDisabled: Sa(e.value, Y, de, p, h),
|
|
3232
|
+
className: xa
|
|
3233
|
+
}), Ve = f((e, t, n) => /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(ya, {
|
|
2851
3234
|
isSelected: t,
|
|
2852
3235
|
unstyled: D,
|
|
2853
3236
|
radius: E
|
|
@@ -2910,16 +3293,17 @@ function Ui({ options: t, filterOption: n, label: r, description: i, "aria-label
|
|
|
2910
3293
|
className: e("w-full flex flex-wrap items-center gap-1 text-left disabled:opacity-50 disabled:cursor-not-allowed", !D && [
|
|
2911
3294
|
je,
|
|
2912
3295
|
z[E],
|
|
2913
|
-
"pl-3 pr-8 py-2 text-sm
|
|
3296
|
+
"pl-3 pr-8 py-2 text-sm",
|
|
3297
|
+
"min-h-[max(2.5rem,var(--ms-control-min-height,0px))]"
|
|
2914
3298
|
], !D && o && e("border-red-500 dark:border-red-400", "focus:ring-red-500"), A),
|
|
2915
3299
|
children: xe.length === 0 ? /* @__PURE__ */ w("span", {
|
|
2916
3300
|
className: e(!D && "text-gray-500 dark:text-gray-400"),
|
|
2917
3301
|
children: s
|
|
2918
3302
|
}) : /* @__PURE__ */ T(C, { children: [Ce.map((t) => /* @__PURE__ */ w("span", {
|
|
2919
|
-
className: e(!D &&
|
|
3303
|
+
className: e(!D && Ea),
|
|
2920
3304
|
children: t.label
|
|
2921
3305
|
}, t.value)), we > 0 && /* @__PURE__ */ w("span", {
|
|
2922
|
-
className: e(!D &&
|
|
3306
|
+
className: e(!D && Ea),
|
|
2923
3307
|
children: (_ ?? H.overflowCount)(we)
|
|
2924
3308
|
})] })
|
|
2925
3309
|
}),
|
|
@@ -2959,7 +3343,7 @@ function Ui({ options: t, filterOption: n, label: r, description: i, "aria-label
|
|
|
2959
3343
|
onChange: Ne,
|
|
2960
3344
|
onKeyDown: He,
|
|
2961
3345
|
placeholder: c ?? H.search,
|
|
2962
|
-
"aria-label":
|
|
3346
|
+
"aria-label": Ta(r, a, c ?? H.search),
|
|
2963
3347
|
"aria-controls": ne,
|
|
2964
3348
|
"aria-activedescendant": he,
|
|
2965
3349
|
"aria-describedby": p === void 0 ? void 0 : K,
|
|
@@ -3010,11 +3394,11 @@ function Ui({ options: t, filterOption: n, label: r, description: i, "aria-label
|
|
|
3010
3394
|
});
|
|
3011
3395
|
}
|
|
3012
3396
|
// src/components/popover/popover_surface.tsx
|
|
3013
|
-
function
|
|
3397
|
+
function Oa({ panelRef: t, setFloating: n, floatingStyles: r, isVisible: i, isPositioned: a, radius: o, unstyled: s, panelClassName: c, id: l, ariaLabel: u, ariaLabelledBy: d, initialFocusRef: f, onTabOut: p, portalTarget: h, children: g }) {
|
|
3014
3398
|
return m(() => {
|
|
3015
3399
|
if (!i || !a) return;
|
|
3016
3400
|
let e = t.current;
|
|
3017
|
-
e && (f?.current ??
|
|
3401
|
+
e && (f?.current ?? Vr(e)[0] ?? e).focus();
|
|
3018
3402
|
}, [
|
|
3019
3403
|
i,
|
|
3020
3404
|
a,
|
|
@@ -3035,7 +3419,7 @@ function Wi({ panelRef: t, setFloating: n, floatingStyles: r, isVisible: i, isPo
|
|
|
3035
3419
|
onKeyDown: (e) => {
|
|
3036
3420
|
let n = t.current;
|
|
3037
3421
|
if (e.key !== "Tab" || !n) return;
|
|
3038
|
-
let r =
|
|
3422
|
+
let r = Vr(n), i = e.shiftKey ? r[0] : r.at(-1);
|
|
3039
3423
|
document.activeElement === (i ?? n) && (e.preventDefault(), p());
|
|
3040
3424
|
},
|
|
3041
3425
|
className: e("w-max ms-floating-panel-scroll", !s && [
|
|
@@ -3051,7 +3435,7 @@ function Wi({ panelRef: t, setFloating: n, floatingStyles: r, isVisible: i, isPo
|
|
|
3051
3435
|
}), h);
|
|
3052
3436
|
}
|
|
3053
3437
|
// src/components/popover/use_outside_pointer_down.ts
|
|
3054
|
-
function
|
|
3438
|
+
function ka(e, t, n) {
|
|
3055
3439
|
let r = Vt(n);
|
|
3056
3440
|
m(() => {
|
|
3057
3441
|
if (!e) return;
|
|
@@ -3067,7 +3451,7 @@ function Gi(e, t, n) {
|
|
|
3067
3451
|
]);
|
|
3068
3452
|
}
|
|
3069
3453
|
// src/components/popover/use_popover_state.ts
|
|
3070
|
-
function
|
|
3454
|
+
function Aa({ isOpen: e, defaultOpen: t, onOpenChange: n }) {
|
|
3071
3455
|
let [r, i] = at(e, t), a = y(r), o = y(void 0), s = Vt((e, t) => n?.(e, t));
|
|
3072
3456
|
return _(() => {
|
|
3073
3457
|
a.current = r;
|
|
@@ -3081,23 +3465,23 @@ function Ki({ isOpen: e, defaultOpen: t, onOpenChange: n }) {
|
|
|
3081
3465
|
};
|
|
3082
3466
|
}
|
|
3083
3467
|
// src/components/popover/popover.tsx
|
|
3084
|
-
var
|
|
3085
|
-
function
|
|
3468
|
+
var ja = 4;
|
|
3469
|
+
function Ma(e, t) {
|
|
3086
3470
|
return t === "center" ? e : `${e}-${t}`;
|
|
3087
3471
|
}
|
|
3088
|
-
function
|
|
3472
|
+
function Na({ trigger: t, children: o, "aria-label": l, "aria-labelledby": d, isOpen: p, defaultOpen: h = !1, onOpenChange: _, side: x = "bottom", align: S = "start", initialFocusRef: C, radius: E = "md", unstyled: D = !1, className: O, panelClassName: k, disabled: A = !1, ref: j }) {
|
|
3089
3473
|
ut("Popover", !!(l ?? d));
|
|
3090
|
-
let M = y(null), N = y(null), [P, F] = b(null), { isOpen: I, setOpen: L } =
|
|
3474
|
+
let M = y(null), N = y(null), [P, F] = b(null), { isOpen: I, setOpen: L } = Aa({
|
|
3091
3475
|
isOpen: p,
|
|
3092
3476
|
defaultOpen: h,
|
|
3093
3477
|
onOpenChange: _
|
|
3094
3478
|
}), { isMounted: R, isVisible: z, setIsVisible: B, open: V, close: H } = te(), { refs: U, floatingStyles: W, isPositioned: G } = s({
|
|
3095
|
-
placement:
|
|
3479
|
+
placement: Ma(x, S),
|
|
3096
3480
|
strategy: "fixed",
|
|
3097
3481
|
open: R,
|
|
3098
3482
|
whileElementsMounted: n,
|
|
3099
3483
|
middleware: [
|
|
3100
|
-
i(
|
|
3484
|
+
i(ja),
|
|
3101
3485
|
r(),
|
|
3102
3486
|
a({ padding: 8 }),
|
|
3103
3487
|
jn()
|
|
@@ -3120,7 +3504,7 @@ function Yi({ trigger: t, children: o, "aria-label": l, "aria-labelledby": d, is
|
|
|
3120
3504
|
}, [q]), J = f((e) => {
|
|
3121
3505
|
L(!1, { reason: e }), q();
|
|
3122
3506
|
}, [L, q]), Y = f(() => J("focus-out"), [J]);
|
|
3123
|
-
|
|
3507
|
+
ka(I, ie, () => {
|
|
3124
3508
|
L(!1, { reason: "outside-pointer" }), window.setTimeout(oe, 0);
|
|
3125
3509
|
}), m(() => {
|
|
3126
3510
|
A && I && L(!1, { reason: "disabled" });
|
|
@@ -3147,7 +3531,7 @@ function Yi({ trigger: t, children: o, "aria-label": l, "aria-labelledby": d, is
|
|
|
3147
3531
|
className: e("inline-flex", O),
|
|
3148
3532
|
onKeyDown: se,
|
|
3149
3533
|
onBlur: ce,
|
|
3150
|
-
children: [Z, R && /* @__PURE__ */ w(
|
|
3534
|
+
children: [Z, R && /* @__PURE__ */ w(Oa, {
|
|
3151
3535
|
panelRef: N,
|
|
3152
3536
|
setFloating: U.setFloating,
|
|
3153
3537
|
floatingStyles: W,
|
|
@@ -3167,7 +3551,7 @@ function Yi({ trigger: t, children: o, "aria-label": l, "aria-labelledby": d, is
|
|
|
3167
3551
|
});
|
|
3168
3552
|
}
|
|
3169
3553
|
// src/components/radio_options/radio_option_row.tsx
|
|
3170
|
-
function
|
|
3554
|
+
function Pa({ option: t, optionId: n, descriptionId: r, name: i, orientation: a, isSelected: o, isDisabled: s, isFirstOption: c, required: l, error: u, radius: d, unstyled: f, className: p, onSelect: m }) {
|
|
3171
3555
|
let h = !!u;
|
|
3172
3556
|
return /* @__PURE__ */ w(_t, {
|
|
3173
3557
|
item: t,
|
|
@@ -3203,7 +3587,7 @@ function Xi({ option: t, optionId: n, descriptionId: r, name: i, orientation: a,
|
|
|
3203
3587
|
});
|
|
3204
3588
|
}
|
|
3205
3589
|
// src/components/radio_options/radio_options.tsx
|
|
3206
|
-
function
|
|
3590
|
+
function Fa({ options: t, orientation: n = "vertical", value: r, defaultValue: i, onChange: a, name: o, label: s, error: c, required: l, disabled: u, radius: d = "lg", unstyled: f = !1, className: p, wrapperClassName: m, id: h, "aria-describedby": g, ..._ }) {
|
|
3207
3591
|
let { fieldId: v, errorId: y } = ot(h), b = o ?? v, [x, S] = at(r, i ?? ""), C = t.map((e) => typeof e == "string" ? {
|
|
3208
3592
|
value: e,
|
|
3209
3593
|
label: e
|
|
@@ -3224,7 +3608,7 @@ function Zi({ options: t, orientation: n = "vertical", value: r, defaultValue: i
|
|
|
3224
3608
|
}),
|
|
3225
3609
|
/* @__PURE__ */ w("div", {
|
|
3226
3610
|
className: e(n === "horizontal" ? "flex flex-row gap-2" : "flex flex-col gap-2"),
|
|
3227
|
-
children: C.map((e, t) => /* @__PURE__ */ w(
|
|
3611
|
+
children: C.map((e, t) => /* @__PURE__ */ w(Pa, {
|
|
3228
3612
|
option: e,
|
|
3229
3613
|
optionId: `${v}-${t}`,
|
|
3230
3614
|
descriptionId: `${v}-${t}-desc`,
|
|
@@ -3250,7 +3634,7 @@ function Zi({ options: t, orientation: n = "vertical", value: r, defaultValue: i
|
|
|
3250
3634
|
});
|
|
3251
3635
|
}
|
|
3252
3636
|
// src/components/select/select.tsx
|
|
3253
|
-
function
|
|
3637
|
+
function Ia({ options: t, label: n, description: r, error: i, placeholder: a, radius: o = "md", unstyled: s = !1, className: c, wrapperClassName: l, value: u, defaultValue: d, onChange: f, id: p, "aria-describedby": m, "aria-label": h, ...g }) {
|
|
3254
3638
|
let { fieldId: _, errorId: v, descriptionId: y, labelId: b } = ot(p);
|
|
3255
3639
|
return /* @__PURE__ */ w(Ct, {
|
|
3256
3640
|
fieldId: _,
|
|
@@ -3266,6 +3650,7 @@ function Qi({ options: t, label: n, description: r, error: i, placeholder: a, ra
|
|
|
3266
3650
|
className: e("w-full disabled:opacity-50 disabled:cursor-not-allowed", !s && [
|
|
3267
3651
|
je,
|
|
3268
3652
|
z[o],
|
|
3653
|
+
"min-h-[var(--ms-control-min-height,0px)]",
|
|
3269
3654
|
"pl-3 pr-8 py-2 text-sm appearance-none bg-[length:1rem_1rem] bg-[position:right_0.5rem_center] bg-no-repeat",
|
|
3270
3655
|
"bg-[url(\"data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 fill=%27none%27 viewBox=%270 0 20 20%27%3e%3cpath stroke=%27%236b7280%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%271.5%27 d=%27M6 8l4 4 4-4%27/%3e%3c/svg%3e\")]"
|
|
3271
3656
|
], !s && i && e("border-red-500 dark:border-red-400", "focus:ring-red-500"), c),
|
|
@@ -3286,19 +3671,234 @@ function Qi({ options: t, label: n, description: r, error: i, placeholder: a, ra
|
|
|
3286
3671
|
})
|
|
3287
3672
|
});
|
|
3288
3673
|
}
|
|
3289
|
-
|
|
3674
|
+
// src/components/side_panel/side_panel_header.tsx
|
|
3675
|
+
var La = {
|
|
3676
|
+
right: "i-mdi-chevron-right",
|
|
3677
|
+
left: "i-mdi-chevron-left"
|
|
3678
|
+
};
|
|
3679
|
+
function Ra({ titleId: t, headingRef: n, title: r, actions: i, side: a, onCollapse: o, collapseLabel: s, unstyled: c }) {
|
|
3680
|
+
let l = Q(), u = s ?? l.collapsePanel ?? "Collapse panel";
|
|
3681
|
+
return /* @__PURE__ */ T("div", {
|
|
3682
|
+
className: e("flex items-center justify-between flex-shrink-0", !c && "gap-3 px-6 pt-5 pb-4"),
|
|
3683
|
+
children: [
|
|
3684
|
+
/* @__PURE__ */ w("h2", {
|
|
3685
|
+
ref: n,
|
|
3686
|
+
id: t,
|
|
3687
|
+
tabIndex: -1,
|
|
3688
|
+
className: e("min-w-0 flex-1", !c && "outline-hidden focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-blue-500 dark:focus-visible:outline-blue-400", !c && "text-base font-medium tracking-tight text-gray-900 dark:text-gray-100"),
|
|
3689
|
+
children: r
|
|
3690
|
+
}),
|
|
3691
|
+
i,
|
|
3692
|
+
c ? /* @__PURE__ */ w(X, {
|
|
3693
|
+
icon: La[a],
|
|
3694
|
+
onClick: o,
|
|
3695
|
+
"aria-label": u,
|
|
3696
|
+
className: "min-h-6 min-w-6",
|
|
3697
|
+
unstyled: !0
|
|
3698
|
+
}) : /* @__PURE__ */ w(X, {
|
|
3699
|
+
icon: La[a],
|
|
3700
|
+
onClick: o,
|
|
3701
|
+
"aria-label": u,
|
|
3702
|
+
variant: "subtle",
|
|
3703
|
+
size: "sm",
|
|
3704
|
+
radius: "full",
|
|
3705
|
+
className: "-mr-1"
|
|
3706
|
+
})
|
|
3707
|
+
]
|
|
3708
|
+
});
|
|
3709
|
+
}
|
|
3710
|
+
// src/components/side_panel/side_panel_styles.ts
|
|
3711
|
+
var za = {
|
|
3712
|
+
sm: "w-[22.5rem] max-w-full",
|
|
3713
|
+
md: "w-[26.25rem] max-w-full",
|
|
3714
|
+
lg: "w-[32.5rem] max-w-full"
|
|
3715
|
+
}, Ba = {
|
|
3716
|
+
lg: "ms-side-panel-layout-lg",
|
|
3717
|
+
xl: "ms-side-panel-layout-xl",
|
|
3718
|
+
never: "sticky top-0 h-dvh flex-none"
|
|
3719
|
+
}, Va = {
|
|
3720
|
+
lg: {
|
|
3721
|
+
right: "ms-side-panel-edge-right-lg",
|
|
3722
|
+
left: "ms-side-panel-edge-left-lg"
|
|
3723
|
+
},
|
|
3724
|
+
xl: {
|
|
3725
|
+
right: "ms-side-panel-edge-right-xl",
|
|
3726
|
+
left: "ms-side-panel-edge-left-xl"
|
|
3727
|
+
},
|
|
3728
|
+
never: {
|
|
3729
|
+
right: "",
|
|
3730
|
+
left: ""
|
|
3731
|
+
}
|
|
3732
|
+
}, Ha = {
|
|
3733
|
+
lg: {
|
|
3734
|
+
right: "ms-side-panel-offscreen-right-lg",
|
|
3735
|
+
left: "ms-side-panel-offscreen-left-lg"
|
|
3736
|
+
},
|
|
3737
|
+
xl: {
|
|
3738
|
+
right: "ms-side-panel-offscreen-right-xl",
|
|
3739
|
+
left: "ms-side-panel-offscreen-left-xl"
|
|
3740
|
+
},
|
|
3741
|
+
never: {
|
|
3742
|
+
right: "",
|
|
3743
|
+
left: ""
|
|
3744
|
+
}
|
|
3745
|
+
}, Ua = {
|
|
3746
|
+
lg: "ms-side-panel-closed-lg",
|
|
3747
|
+
xl: "ms-side-panel-closed-xl",
|
|
3748
|
+
never: "data-[state=closed]:hidden"
|
|
3749
|
+
}, Wa = {
|
|
3750
|
+
right: "border-l",
|
|
3751
|
+
left: "border-r"
|
|
3752
|
+
};
|
|
3753
|
+
// src/components/side_panel/use_side_panel_entered.ts
|
|
3754
|
+
function Ga() {
|
|
3755
|
+
let [e, t] = b(!1);
|
|
3756
|
+
return m(() => {
|
|
3757
|
+
let e = requestAnimationFrame(() => {
|
|
3758
|
+
requestAnimationFrame(() => t(!0));
|
|
3759
|
+
});
|
|
3760
|
+
return () => cancelAnimationFrame(e);
|
|
3761
|
+
}, []), e;
|
|
3762
|
+
}
|
|
3763
|
+
// src/components/side_panel/use_side_panel_escape.ts
|
|
3764
|
+
function Ka(e, t) {
|
|
3765
|
+
return e.key === "Escape" && e.target instanceof Node && t.contains(e.target);
|
|
3766
|
+
}
|
|
3767
|
+
function qa(e) {
|
|
3768
|
+
return !e.defaultPrevented && !e.isComposing && !oi();
|
|
3769
|
+
}
|
|
3770
|
+
function Ja(e, t, n) {
|
|
3771
|
+
let r = h(n);
|
|
3772
|
+
m(() => {
|
|
3773
|
+
if (!t) return;
|
|
3774
|
+
let n = (t) => {
|
|
3775
|
+
let n = e.current;
|
|
3776
|
+
n && Ka(t, n) && qa(t) && r();
|
|
3777
|
+
};
|
|
3778
|
+
return document.addEventListener("keydown", n), () => document.removeEventListener("keydown", n);
|
|
3779
|
+
}, [e, t]);
|
|
3780
|
+
}
|
|
3781
|
+
// src/components/side_panel/use_side_panel_focus.ts
|
|
3782
|
+
function Ya() {
|
|
3783
|
+
return typeof document > "u" ? null : document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
3784
|
+
}
|
|
3785
|
+
function Xa(e, t, n) {
|
|
3786
|
+
n.current = e.contains(document.activeElement);
|
|
3787
|
+
let r = () => {
|
|
3788
|
+
n.current = !0;
|
|
3789
|
+
}, i = (r) => {
|
|
3790
|
+
t.current && (r.relatedTarget instanceof Node && e.contains(r.relatedTarget) || (n.current = !1));
|
|
3791
|
+
}, a = (r) => {
|
|
3792
|
+
!(r.target instanceof Node && e.contains(r.target)) && t.current && (n.current = !1);
|
|
3793
|
+
};
|
|
3794
|
+
return e.addEventListener("focusin", r), e.addEventListener("pointerdown", r), e.addEventListener("focusout", i), document.addEventListener("focusin", a), document.addEventListener("pointerdown", a), () => {
|
|
3795
|
+
document.removeEventListener("focusin", a), document.removeEventListener("pointerdown", a), e.removeEventListener("focusin", r), e.removeEventListener("pointerdown", r), e.removeEventListener("focusout", i);
|
|
3796
|
+
};
|
|
3797
|
+
}
|
|
3798
|
+
function Za(...e) {
|
|
3799
|
+
return e.find((e) => e?.isConnected) ?? null;
|
|
3800
|
+
}
|
|
3801
|
+
function Qa({ isOpen: e, focusOnOpen: t, panelRef: n, headingRef: r, initialFocusRef: i, returnFocusRef: a }) {
|
|
3802
|
+
let [o] = b(Ya), s = y(o), c = y(!1), l = y(e), u = h(() => {
|
|
3803
|
+
t && (i?.current ?? r.current)?.focus({ preventScroll: !0 });
|
|
3804
|
+
}), d = h(() => {
|
|
3805
|
+
c.current && (c.current = !1, Za(a?.current, s.current, gi())?.focus({ preventScroll: !0 }));
|
|
3806
|
+
});
|
|
3807
|
+
m(() => {
|
|
3808
|
+
if (!e) return;
|
|
3809
|
+
let t = Ya();
|
|
3810
|
+
t && !n.current?.contains(t) && (s.current = t), u();
|
|
3811
|
+
}, [e, n]), _(() => {
|
|
3812
|
+
l.current = e;
|
|
3813
|
+
}, [e]), m(() => {
|
|
3814
|
+
let e = n.current;
|
|
3815
|
+
if (e) return Xa(e, l, c);
|
|
3816
|
+
}, [n]), m(() => {
|
|
3817
|
+
e || d();
|
|
3818
|
+
}, [e]);
|
|
3819
|
+
}
|
|
3820
|
+
// src/components/side_panel/side_panel_aside.tsx
|
|
3821
|
+
function $a({ isOpen: t, onClose: n, title: r, children: i, footer: a, actions: o, side: s, size: c, overlayBelow: l, focusOnOpen: u = !1, initialFocusRef: d, returnFocusRef: f, collapseLabel: p, radius: m, className: h, panelClassName: _, unstyled: v = !1 }) {
|
|
3822
|
+
let b = g(), x = y(null), S = y(null), C = Ga(), { ref: E, scrollableProps: D, focusClassName: O } = qr({ labelledBy: b });
|
|
3823
|
+
Qa({
|
|
3824
|
+
isOpen: t,
|
|
3825
|
+
focusOnOpen: u,
|
|
3826
|
+
panelRef: x,
|
|
3827
|
+
headingRef: S,
|
|
3828
|
+
initialFocusRef: d,
|
|
3829
|
+
returnFocusRef: f
|
|
3830
|
+
}), Ja(x, t, n);
|
|
3831
|
+
let k = !t || !C;
|
|
3832
|
+
return /* @__PURE__ */ T("aside", {
|
|
3833
|
+
ref: x,
|
|
3834
|
+
"aria-labelledby": b,
|
|
3835
|
+
"data-state": t ? "open" : "closed",
|
|
3836
|
+
inert: !t,
|
|
3837
|
+
className: e("flex flex-col overflow-hidden", Ba[l], Va[l][s], za[c], Ei[s], Ua[l], k && Ha[l][s], !v && [
|
|
3838
|
+
"bg-white dark:bg-gray-900",
|
|
3839
|
+
"border-gray-200 dark:border-gray-700",
|
|
3840
|
+
Wa[s],
|
|
3841
|
+
"[&,&_*]:[scrollbar-width:thin] [scrollbar-color:theme(colors.gray.300)_transparent] hover:[scrollbar-color:theme(colors.gray.400)_transparent] dark:[scrollbar-color:theme(colors.gray.600)_transparent] dark:hover:[scrollbar-color:theme(colors.gray.500)_transparent]",
|
|
3842
|
+
Oi[s][m],
|
|
3843
|
+
"ms-side-panel-transition"
|
|
3844
|
+
], _),
|
|
3845
|
+
children: [
|
|
3846
|
+
/* @__PURE__ */ w(Ra, {
|
|
3847
|
+
titleId: b,
|
|
3848
|
+
headingRef: S,
|
|
3849
|
+
title: r,
|
|
3850
|
+
actions: o,
|
|
3851
|
+
side: s,
|
|
3852
|
+
onCollapse: n,
|
|
3853
|
+
collapseLabel: p,
|
|
3854
|
+
unstyled: v
|
|
3855
|
+
}),
|
|
3856
|
+
/* @__PURE__ */ w("div", {
|
|
3857
|
+
ref: E,
|
|
3858
|
+
...D,
|
|
3859
|
+
className: e("flex-1 overflow-y-auto min-h-0", !v && "px-6 pb-6 text-sm leading-relaxed text-gray-600 dark:text-gray-400", O, h),
|
|
3860
|
+
children: i
|
|
3861
|
+
}),
|
|
3862
|
+
a && /* @__PURE__ */ w("div", {
|
|
3863
|
+
className: e("flex-shrink-0", !v && ["px-6 py-4 border-t", "border-gray-100 dark:border-gray-800"]),
|
|
3864
|
+
children: a
|
|
3865
|
+
})
|
|
3866
|
+
]
|
|
3867
|
+
});
|
|
3868
|
+
}
|
|
3869
|
+
// src/components/side_panel/use_side_panel_mounted.ts
|
|
3870
|
+
function eo(e) {
|
|
3871
|
+
let [t, n] = b(!e);
|
|
3872
|
+
return e && t && n(!1), m(() => {
|
|
3873
|
+
if (e || t) return;
|
|
3874
|
+
let r = setTimeout(() => n(!0), 200);
|
|
3875
|
+
return () => clearTimeout(r);
|
|
3876
|
+
}, [e, t]), e || !t;
|
|
3877
|
+
}
|
|
3878
|
+
// src/components/side_panel/side_panel.tsx
|
|
3879
|
+
function to({ isOpen: e, side: t = "right", size: n = "md", overlayBelow: r = "xl", radius: i = "none", ...a }) {
|
|
3880
|
+
return eo(e) ? /* @__PURE__ */ w($a, {
|
|
3881
|
+
...a,
|
|
3882
|
+
isOpen: e,
|
|
3883
|
+
side: t,
|
|
3884
|
+
size: n,
|
|
3885
|
+
overlayBelow: r,
|
|
3886
|
+
radius: i
|
|
3887
|
+
}) : null;
|
|
3888
|
+
}
|
|
3889
|
+
var no = "!rounded-l-none border-l", ro = {
|
|
3290
3890
|
solid: "!border-l-white/40",
|
|
3291
3891
|
outline: "!border-l-0",
|
|
3292
3892
|
ghost: "!border-l-current/25",
|
|
3293
3893
|
subtle: "!border-l-current/25"
|
|
3294
|
-
},
|
|
3295
|
-
function
|
|
3296
|
-
return [
|
|
3894
|
+
}, io = "!border-l-gray-400";
|
|
3895
|
+
function ao(e, t) {
|
|
3896
|
+
return [no, e === "solid" && t === "neutral" ? io : ro[e]];
|
|
3297
3897
|
}
|
|
3298
3898
|
// src/components/split_button/split_button.tsx
|
|
3299
|
-
var
|
|
3300
|
-
function
|
|
3301
|
-
let { children: n, onClick: r, menu: i, menuLabel: a, menuIcon: o =
|
|
3899
|
+
var oo = "i-mdi-chevron-down";
|
|
3900
|
+
function so(t) {
|
|
3901
|
+
let { children: n, onClick: r, menu: i, menuLabel: a, menuIcon: o = oo, menuAlign: s = "end", startIcon: c, size: l = "md", loading: u = !1, disabled: d = !1, "aria-label": f, "aria-labelledby": p, className: m, ref: h, unstyled: g = !1, variant: _ = "solid", color: v = "primary", radius: y = "md" } = t, b = g ? { unstyled: !0 } : {
|
|
3302
3902
|
variant: _,
|
|
3303
3903
|
color: v,
|
|
3304
3904
|
radius: y
|
|
@@ -3309,7 +3909,7 @@ function ia(t) {
|
|
|
3309
3909
|
size: l,
|
|
3310
3910
|
disabled: d,
|
|
3311
3911
|
"aria-disabled": u && !d || void 0,
|
|
3312
|
-
className: e(!g && ["relative focus-visible:z-10",
|
|
3912
|
+
className: e(!g && ["relative focus-visible:z-10", ao(_, v)]),
|
|
3313
3913
|
...b
|
|
3314
3914
|
});
|
|
3315
3915
|
return /* @__PURE__ */ T("div", {
|
|
@@ -3327,7 +3927,7 @@ function ia(t) {
|
|
|
3327
3927
|
className: e(!g && ["relative focus-visible:z-10", "!rounded-r-none"]),
|
|
3328
3928
|
...b,
|
|
3329
3929
|
children: n
|
|
3330
|
-
}), /* @__PURE__ */ w(
|
|
3930
|
+
}), /* @__PURE__ */ w(zi, {
|
|
3331
3931
|
trigger: x,
|
|
3332
3932
|
align: s,
|
|
3333
3933
|
radius: y,
|
|
@@ -3337,28 +3937,28 @@ function ia(t) {
|
|
|
3337
3937
|
});
|
|
3338
3938
|
}
|
|
3339
3939
|
// src/components/spinner/spinner.tsx
|
|
3340
|
-
var
|
|
3940
|
+
var co = 0, lo = "inline-flex items-center gap-2", uo = {
|
|
3341
3941
|
xs: "text-xs",
|
|
3342
3942
|
sm: "text-sm",
|
|
3343
3943
|
md: "text-sm",
|
|
3344
3944
|
lg: "text-base"
|
|
3345
|
-
},
|
|
3945
|
+
}, fo = {
|
|
3346
3946
|
xs: "w-3.5 h-3.5",
|
|
3347
3947
|
sm: "w-4 h-4",
|
|
3348
3948
|
md: "w-5 h-5",
|
|
3349
3949
|
lg: "w-6 h-6"
|
|
3350
3950
|
};
|
|
3351
|
-
function
|
|
3951
|
+
function po(t) {
|
|
3352
3952
|
let { size: n = "md", label: r, unstyled: i = !1, className: a, iconClassName: o, labelClassName: s, ...c } = t, l = Q(), [u, d] = b(!1);
|
|
3353
3953
|
m(() => {
|
|
3354
|
-
let e = setTimeout(() => d(!0),
|
|
3954
|
+
let e = setTimeout(() => d(!0), co);
|
|
3355
3955
|
return () => clearTimeout(e);
|
|
3356
3956
|
}, []);
|
|
3357
|
-
let f = r ?? l.loading, p = e(!i &&
|
|
3957
|
+
let f = r ?? l.loading, p = e(!i && fo[n], o);
|
|
3358
3958
|
return /* @__PURE__ */ T("span", {
|
|
3359
3959
|
role: "status",
|
|
3360
3960
|
...c,
|
|
3361
|
-
className: e(!i && [
|
|
3961
|
+
className: e(!i && [lo, uo[n]], a),
|
|
3362
3962
|
children: [
|
|
3363
3963
|
/* @__PURE__ */ w("span", {
|
|
3364
3964
|
className: e("i-svg-spinners-3-dots-fade ms-spinner-animated", p),
|
|
@@ -3376,11 +3976,11 @@ function la(t) {
|
|
|
3376
3976
|
});
|
|
3377
3977
|
}
|
|
3378
3978
|
// src/components/switch/switch.tsx
|
|
3379
|
-
var
|
|
3380
|
-
function
|
|
3381
|
-
return t ? "sr-only" : e(
|
|
3979
|
+
var mo = "absolute -inset-0.5 m-0 h-6 w-11 appearance-none opacity-0";
|
|
3980
|
+
function ho(t, n) {
|
|
3981
|
+
return t ? "sr-only" : e(mo, n ? "cursor-not-allowed" : "cursor-pointer");
|
|
3382
3982
|
}
|
|
3383
|
-
function
|
|
3983
|
+
function go({ htmlFor: e, className: t, children: n }) {
|
|
3384
3984
|
return e === void 0 ? /* @__PURE__ */ w("div", {
|
|
3385
3985
|
className: t,
|
|
3386
3986
|
children: n
|
|
@@ -3390,14 +3990,14 @@ function fa({ htmlFor: e, className: t, children: n }) {
|
|
|
3390
3990
|
children: n
|
|
3391
3991
|
});
|
|
3392
3992
|
}
|
|
3393
|
-
function
|
|
3993
|
+
function _o({ label: t, description: n, error: r, unstyled: i = !1, fullWidth: a = !1, className: o, wrapperClassName: s, checked: c, defaultChecked: l = !1, onChange: u, id: d, "aria-describedby": f, "aria-label": p, "aria-labelledby": m, ref: h, ...g }) {
|
|
3394
3994
|
let { fieldId: _, errorId: b, descriptionId: x } = ot(d), [S, E] = at(c, l), D = y(null), O = !!t, k = W(f, !!n && x, r && b);
|
|
3395
3995
|
dt("Switch", D, !!t || !!p?.trim() || !!m?.trim());
|
|
3396
3996
|
let M = v(() => K(D, h), [h]);
|
|
3397
3997
|
return /* @__PURE__ */ T("div", {
|
|
3398
3998
|
className: e(a ? "w-full" : "w-fit", s),
|
|
3399
3999
|
children: [
|
|
3400
|
-
/* @__PURE__ */ T(
|
|
4000
|
+
/* @__PURE__ */ T(go, {
|
|
3401
4001
|
htmlFor: O ? _ : void 0,
|
|
3402
4002
|
className: e("flex items-center gap-3 cursor-pointer", g.disabled && "cursor-not-allowed opacity-50"),
|
|
3403
4003
|
children: [/* @__PURE__ */ T("span", {
|
|
@@ -3411,7 +4011,7 @@ function pa({ label: t, description: n, error: r, unstyled: i = !1, fullWidth: a
|
|
|
3411
4011
|
role: "switch",
|
|
3412
4012
|
ref: M,
|
|
3413
4013
|
id: _,
|
|
3414
|
-
className:
|
|
4014
|
+
className: ho(O, g.disabled === !0),
|
|
3415
4015
|
checked: S,
|
|
3416
4016
|
onChange: (e) => {
|
|
3417
4017
|
E(e.target.checked), u?.(e);
|
|
@@ -3443,12 +4043,48 @@ function pa({ label: t, description: n, error: r, unstyled: i = !1, fullWidth: a
|
|
|
3443
4043
|
]
|
|
3444
4044
|
});
|
|
3445
4045
|
}
|
|
4046
|
+
// src/components/tab_bar/tab_bar.tsx
|
|
4047
|
+
var vo = e("border-t pt-1.5 pb-[env(safe-area-inset-bottom)]", "pl-[max(0.5rem,env(safe-area-inset-left))] pr-[max(0.5rem,env(safe-area-inset-right))]", ye, ve);
|
|
4048
|
+
function yo(t) {
|
|
4049
|
+
let { children: n, unstyled: r = !1, className: i, ...a } = t;
|
|
4050
|
+
return /* @__PURE__ */ w("nav", {
|
|
4051
|
+
...a,
|
|
4052
|
+
className: e(!r && vo, i),
|
|
4053
|
+
children: /* @__PURE__ */ w("ul", {
|
|
4054
|
+
role: "list",
|
|
4055
|
+
className: "grid grid-flow-col auto-cols-fr",
|
|
4056
|
+
children: n
|
|
4057
|
+
})
|
|
4058
|
+
});
|
|
4059
|
+
}
|
|
4060
|
+
// src/components/tab_bar/tab_bar_link.tsx
|
|
4061
|
+
var bo = "group flex min-w-0 flex-1 flex-col items-center justify-center gap-1 text-center", xo = e("min-h-14 text-xs text-gray-600 dark:text-gray-400", "[&:not([aria-current=page]):hover]:text-gray-900 dark:[&:not([aria-current=page]):hover]:text-gray-100", "aria-[current=page]:font-semibold aria-[current=page]:text-blue-700 dark:aria-[current=page]:text-blue-300", N), So = "flex max-w-full items-center justify-center", Co = e("h-7 w-14 transition-colors duration-200", "group-[:not([aria-current=page]):hover]:bg-gray-100 dark:group-[:not([aria-current=page]):hover]:bg-gray-800", "group-aria-[current=page]:bg-blue-100 dark:group-aria-[current=page]:bg-blue-500/20");
|
|
4062
|
+
function wo(t) {
|
|
4063
|
+
let { icon: n, children: r, radius: i = "full", unstyled: a = !1, className: o, ...s } = t;
|
|
4064
|
+
return /* @__PURE__ */ w("li", {
|
|
4065
|
+
className: "flex min-w-0",
|
|
4066
|
+
children: /* @__PURE__ */ T("a", {
|
|
4067
|
+
...s,
|
|
4068
|
+
className: e(bo, !a && xo, o),
|
|
4069
|
+
children: [/* @__PURE__ */ w("span", {
|
|
4070
|
+
className: e(So, !a && [Co, z[i]]),
|
|
4071
|
+
children: /* @__PURE__ */ w("span", {
|
|
4072
|
+
className: e(n, "h-6 w-6"),
|
|
4073
|
+
"aria-hidden": "true"
|
|
4074
|
+
})
|
|
4075
|
+
}), /* @__PURE__ */ w("span", {
|
|
4076
|
+
className: "min-w-0 [overflow-wrap:anywhere]",
|
|
4077
|
+
children: r
|
|
4078
|
+
})]
|
|
4079
|
+
})
|
|
4080
|
+
});
|
|
4081
|
+
}
|
|
3446
4082
|
// src/components/tabs/tabs_styles.ts
|
|
3447
|
-
var
|
|
4083
|
+
var To = {
|
|
3448
4084
|
list: "gap-1 p-1 bg-gray-100 dark:bg-gray-800/50",
|
|
3449
4085
|
tab: "",
|
|
3450
4086
|
indicator: `absolute inset-0 ${_e} border border-gray-200 dark:border-gray-700`
|
|
3451
|
-
},
|
|
4087
|
+
}, Eo = {
|
|
3452
4088
|
line: {
|
|
3453
4089
|
activeTab: "border-transparent text-gray-900 dark:text-gray-100",
|
|
3454
4090
|
idleTab: "border-transparent text-gray-500 dark:text-gray-400",
|
|
@@ -3471,52 +4107,53 @@ var ma = {
|
|
|
3471
4107
|
idleTab: "text-gray-600 dark:text-gray-400",
|
|
3472
4108
|
idleHover: "hover:text-gray-900 dark:hover:text-gray-100",
|
|
3473
4109
|
byOrientation: {
|
|
3474
|
-
horizontal:
|
|
3475
|
-
vertical:
|
|
4110
|
+
horizontal: To,
|
|
4111
|
+
vertical: To
|
|
3476
4112
|
}
|
|
3477
4113
|
}
|
|
3478
|
-
},
|
|
4114
|
+
}, Do = {
|
|
3479
4115
|
xs: "px-2 py-1 text-xs",
|
|
3480
4116
|
sm: "px-3 py-1.5 text-sm",
|
|
3481
4117
|
md: "px-4 py-2.5 text-sm",
|
|
3482
4118
|
lg: "px-5 py-3 text-base"
|
|
3483
|
-
},
|
|
4119
|
+
}, Oo = {
|
|
3484
4120
|
xs: "w-3.5 h-3.5",
|
|
3485
4121
|
sm: "w-4 h-4",
|
|
3486
4122
|
md: "w-4 h-4",
|
|
3487
4123
|
lg: "w-5 h-5"
|
|
3488
|
-
},
|
|
4124
|
+
}, ko = {
|
|
3489
4125
|
horizontal: e(O, F.primary.focusOutline),
|
|
3490
4126
|
vertical: e("outline-hidden focus-visible:outline-2", "focus-visible:-outline-offset-2", F.primary.focusOutline)
|
|
3491
|
-
},
|
|
3492
|
-
function
|
|
3493
|
-
return e("w-full", t === "vertical" &&
|
|
4127
|
+
}, Ao = "items-center", jo = e("flex-col items-stretch min-h-0 overflow-y-auto overflow-x-hidden", xe), Mo = "w-48 shrink-0", No = "justify-start text-left whitespace-normal", Po = "whitespace-nowrap", Fo = "flex min-h-0", Io = e("flex-1 min-w-0 min-h-0 overflow-y-auto", xe), Lo = "ml-6", Ro = "mt-4";
|
|
4128
|
+
function zo(t, n) {
|
|
4129
|
+
return e("w-full", t === "vertical" && Fo, n);
|
|
3494
4130
|
}
|
|
3495
|
-
function
|
|
4131
|
+
function Bo(t) {
|
|
3496
4132
|
let { orientation: n, unstyled: r, className: i } = t, a = n === "vertical";
|
|
3497
|
-
return e(a &&
|
|
4133
|
+
return e(a && Io, !r && [a ? Lo : Ro, ko[n]], i);
|
|
3498
4134
|
}
|
|
3499
|
-
function
|
|
4135
|
+
function Vo(t) {
|
|
3500
4136
|
let { variant: n, orientation: r, radius: i, unstyled: a, isFullWidth: o, className: s } = t, c = r === "vertical";
|
|
3501
|
-
return e("flex", c ?
|
|
4137
|
+
return e("flex", c ? jo : Ao, !c && o && "w-full", !a && c && Mo, !a && Eo[n].byOrientation[r].list, !a && n === "segmented" && z[i], s);
|
|
3502
4138
|
}
|
|
3503
|
-
function
|
|
3504
|
-
let { variant: n, orientation: r, size: i, radius: a, unstyled: o, isActive: s, isDisabled: c, isFullWidth: l, className: u } = t, d = r === "vertical", f =
|
|
3505
|
-
return e("relative flex items-center gap-2", d ?
|
|
4139
|
+
function Ho(t) {
|
|
4140
|
+
let { variant: n, orientation: r, size: i, radius: a, unstyled: o, isActive: s, isDisabled: c, isFullWidth: l, className: u } = t, d = r === "vertical", f = Eo[n];
|
|
4141
|
+
return e("relative flex items-center gap-2", d ? No : Po, !d && l && "flex-1 justify-center", c ? "opacity-50 cursor-not-allowed" : "cursor-pointer", !o && [
|
|
3506
4142
|
"font-medium transition-colors duration-200",
|
|
3507
|
-
|
|
4143
|
+
Do[i],
|
|
4144
|
+
"min-h-[var(--ms-control-min-height,0px)]",
|
|
3508
4145
|
f.byOrientation[r].tab,
|
|
3509
4146
|
s ? f.activeTab : [f.idleTab, !c && f.idleHover],
|
|
3510
4147
|
n === "segmented" && z[a],
|
|
3511
|
-
|
|
4148
|
+
ko[r]
|
|
3512
4149
|
], u);
|
|
3513
4150
|
}
|
|
3514
|
-
function
|
|
4151
|
+
function Uo(t) {
|
|
3515
4152
|
let { variant: n, orientation: r, radius: i } = t;
|
|
3516
|
-
return e("tabs-indicator pointer-events-none",
|
|
4153
|
+
return e("tabs-indicator pointer-events-none", Eo[n].byOrientation[r].indicator, n === "segmented" && z[i]);
|
|
3517
4154
|
}
|
|
3518
4155
|
// src/components/tabs/tab_button.tsx
|
|
3519
|
-
function
|
|
4156
|
+
function Wo({ item: t, isActive: n, hasMountedPanel: r, isTabStop: i, isFullWidth: a, variant: o, orientation: s, size: c, radius: l, unstyled: u, tabId: d, panelId: f, onSelect: p, onKeyDown: m, ref: h, indicatorRef: g }) {
|
|
3520
4157
|
let _ = !!t.disabled;
|
|
3521
4158
|
return /* @__PURE__ */ T("button", {
|
|
3522
4159
|
ref: h,
|
|
@@ -3530,7 +4167,7 @@ function Na({ item: t, isActive: n, hasMountedPanel: r, isTabStop: i, isFullWidt
|
|
|
3530
4167
|
disabled: t.disabled,
|
|
3531
4168
|
onClick: p,
|
|
3532
4169
|
onKeyDown: m,
|
|
3533
|
-
className:
|
|
4170
|
+
className: Ho({
|
|
3534
4171
|
variant: o,
|
|
3535
4172
|
orientation: s,
|
|
3536
4173
|
size: c,
|
|
@@ -3544,7 +4181,7 @@ function Na({ item: t, isActive: n, hasMountedPanel: r, isTabStop: i, isFullWidt
|
|
|
3544
4181
|
n && !u && /* @__PURE__ */ w("span", {
|
|
3545
4182
|
ref: g,
|
|
3546
4183
|
"aria-hidden": "true",
|
|
3547
|
-
className:
|
|
4184
|
+
className: Uo({
|
|
3548
4185
|
variant: o,
|
|
3549
4186
|
orientation: s,
|
|
3550
4187
|
radius: l
|
|
@@ -3552,7 +4189,7 @@ function Na({ item: t, isActive: n, hasMountedPanel: r, isTabStop: i, isFullWidt
|
|
|
3552
4189
|
}),
|
|
3553
4190
|
t.icon && /* @__PURE__ */ w("span", {
|
|
3554
4191
|
"aria-hidden": "true",
|
|
3555
|
-
className: e("relative shrink-0",
|
|
4192
|
+
className: e("relative shrink-0", Oo[c], t.icon)
|
|
3556
4193
|
}),
|
|
3557
4194
|
/* @__PURE__ */ w("span", {
|
|
3558
4195
|
className: "relative",
|
|
@@ -3563,7 +4200,7 @@ function Na({ item: t, isActive: n, hasMountedPanel: r, isTabStop: i, isFullWidt
|
|
|
3563
4200
|
});
|
|
3564
4201
|
}
|
|
3565
4202
|
// src/components/tabs/tab_panel.tsx
|
|
3566
|
-
function
|
|
4203
|
+
function Go({ panelId: t, tabId: n, isHidden: r, isAnimated: i, className: a, contentKey: o, children: s }) {
|
|
3567
4204
|
return /* @__PURE__ */ w("div", {
|
|
3568
4205
|
role: "tabpanel",
|
|
3569
4206
|
id: t,
|
|
@@ -3578,11 +4215,11 @@ function Pa({ panelId: t, tabId: n, isHidden: r, isAnimated: i, className: a, co
|
|
|
3578
4215
|
});
|
|
3579
4216
|
}
|
|
3580
4217
|
// src/components/tabs/use_tab_indicator_transition.ts
|
|
3581
|
-
var
|
|
3582
|
-
function
|
|
3583
|
-
return typeof window > "u" || typeof window.matchMedia != "function" ? !1 : window.matchMedia(
|
|
4218
|
+
var Ko = 200, qo = "ease-out", Jo = "(prefers-reduced-motion: reduce)";
|
|
4219
|
+
function Yo() {
|
|
4220
|
+
return typeof window > "u" || typeof window.matchMedia != "function" ? !1 : window.matchMedia(Jo).matches;
|
|
3584
4221
|
}
|
|
3585
|
-
function
|
|
4222
|
+
function Xo(e, t, n) {
|
|
3586
4223
|
return e === "vertical" ? [{
|
|
3587
4224
|
transform: `translateY(${t.top - n.top}px)`,
|
|
3588
4225
|
height: `${t.height}px`
|
|
@@ -3597,16 +4234,16 @@ function za(e, t, n) {
|
|
|
3597
4234
|
width: `${n.width}px`
|
|
3598
4235
|
}];
|
|
3599
4236
|
}
|
|
3600
|
-
function
|
|
3601
|
-
e.animate(
|
|
3602
|
-
duration:
|
|
3603
|
-
easing:
|
|
4237
|
+
function Zo(e, t, n, r) {
|
|
4238
|
+
e.animate(Xo(t, n, r), {
|
|
4239
|
+
duration: Ko,
|
|
4240
|
+
easing: qo
|
|
3604
4241
|
});
|
|
3605
4242
|
}
|
|
3606
|
-
function
|
|
3607
|
-
return !e || !t || !n ? !1 : !
|
|
4243
|
+
function Qo(e, t, n) {
|
|
4244
|
+
return !e || !t || !n ? !1 : !Yo();
|
|
3608
4245
|
}
|
|
3609
|
-
function
|
|
4246
|
+
function $o(e) {
|
|
3610
4247
|
let { activeIndex: t, indicatorRef: n, isAnimated: r, orientation: i } = e, a = y(null);
|
|
3611
4248
|
_(() => {
|
|
3612
4249
|
let e = n.current;
|
|
@@ -3615,7 +4252,7 @@ function Ha(e) {
|
|
|
3615
4252
|
return;
|
|
3616
4253
|
}
|
|
3617
4254
|
let t = e.getBoundingClientRect(), o = typeof e.animate == "function";
|
|
3618
|
-
|
|
4255
|
+
Qo(a.current, r, o) && Zo(e, i, a.current, t), a.current = t;
|
|
3619
4256
|
}, [
|
|
3620
4257
|
t,
|
|
3621
4258
|
n,
|
|
@@ -3624,34 +4261,34 @@ function Ha(e) {
|
|
|
3624
4261
|
]);
|
|
3625
4262
|
}
|
|
3626
4263
|
// src/components/tabs/use_tabs_keyboard_navigation.ts
|
|
3627
|
-
var
|
|
4264
|
+
var es = {
|
|
3628
4265
|
Home: () => 0,
|
|
3629
4266
|
End: (e, t) => t - 1
|
|
3630
|
-
},
|
|
4267
|
+
}, ts = (e, t) => (e + 1) % t, ns = (e, t) => (e - 1 + t) % t, rs = {
|
|
3631
4268
|
horizontal: {
|
|
3632
|
-
...
|
|
3633
|
-
ArrowRight:
|
|
3634
|
-
ArrowLeft:
|
|
4269
|
+
...es,
|
|
4270
|
+
ArrowRight: ts,
|
|
4271
|
+
ArrowLeft: ns
|
|
3635
4272
|
},
|
|
3636
4273
|
vertical: {
|
|
3637
|
-
...
|
|
3638
|
-
ArrowDown:
|
|
3639
|
-
ArrowUp:
|
|
4274
|
+
...es,
|
|
4275
|
+
ArrowDown: ts,
|
|
4276
|
+
ArrowUp: ns
|
|
3640
4277
|
}
|
|
3641
4278
|
};
|
|
3642
|
-
function
|
|
4279
|
+
function is(e) {
|
|
3643
4280
|
return e.flatMap((e, t) => e.disabled ? [] : [t]);
|
|
3644
4281
|
}
|
|
3645
|
-
function
|
|
4282
|
+
function as(e, t) {
|
|
3646
4283
|
let n = e[t];
|
|
3647
|
-
return n && !n.disabled ? t :
|
|
4284
|
+
return n && !n.disabled ? t : is(e)[0] ?? -1;
|
|
3648
4285
|
}
|
|
3649
|
-
function
|
|
4286
|
+
function os(e) {
|
|
3650
4287
|
let { items: t, activeIndex: n, orientation: r, onNavigate: i } = e;
|
|
3651
4288
|
return (e) => {
|
|
3652
|
-
let a =
|
|
4289
|
+
let a = rs[r][e.key];
|
|
3653
4290
|
if (!a) return;
|
|
3654
|
-
let o =
|
|
4291
|
+
let o = is(t);
|
|
3655
4292
|
if (o.length === 0) return;
|
|
3656
4293
|
e.preventDefault();
|
|
3657
4294
|
let s = a(o.indexOf(n), o.length);
|
|
@@ -3659,34 +4296,34 @@ function Ya(e) {
|
|
|
3659
4296
|
};
|
|
3660
4297
|
}
|
|
3661
4298
|
// src/components/tabs/tabs.tsx
|
|
3662
|
-
function
|
|
4299
|
+
function ss({ items: e, value: t, defaultIndex: n = 0, variant: r = "line", orientation: i = "horizontal", size: a = "md", radius: o = "md", fullWidth: s = !1, unstyled: c = !1, animated: l = !0, keepMounted: u = !1, "aria-label": d, "aria-labelledby": f, className: p, tabListClassName: m, panelClassName: h, onChange: _ }) {
|
|
3663
4300
|
let [v, b] = at(t, n), x = g(), S = y([]), C = y(null), E = (t) => {
|
|
3664
4301
|
e[t]?.disabled || (b(t), _?.(t));
|
|
3665
4302
|
}, D = (e) => {
|
|
3666
4303
|
S.current[e]?.focus(), E(e);
|
|
3667
|
-
}, O =
|
|
4304
|
+
}, O = as(e, v), k = os({
|
|
3668
4305
|
items: e,
|
|
3669
4306
|
activeIndex: O,
|
|
3670
4307
|
orientation: i,
|
|
3671
4308
|
onNavigate: D
|
|
3672
|
-
}), A =
|
|
4309
|
+
}), A = Bo({
|
|
3673
4310
|
orientation: i,
|
|
3674
4311
|
unstyled: c,
|
|
3675
4312
|
className: h
|
|
3676
4313
|
}), j = l && !c;
|
|
3677
|
-
return
|
|
4314
|
+
return $o({
|
|
3678
4315
|
activeIndex: v,
|
|
3679
4316
|
indicatorRef: C,
|
|
3680
4317
|
isAnimated: l,
|
|
3681
4318
|
orientation: i
|
|
3682
4319
|
}), /* @__PURE__ */ T("div", {
|
|
3683
|
-
className:
|
|
4320
|
+
className: zo(i, p),
|
|
3684
4321
|
children: [/* @__PURE__ */ w("div", {
|
|
3685
4322
|
role: "tablist",
|
|
3686
4323
|
"aria-label": d,
|
|
3687
4324
|
"aria-labelledby": f,
|
|
3688
4325
|
"aria-orientation": i,
|
|
3689
|
-
className:
|
|
4326
|
+
className: Vo({
|
|
3690
4327
|
variant: r,
|
|
3691
4328
|
orientation: i,
|
|
3692
4329
|
radius: o,
|
|
@@ -3694,7 +4331,7 @@ function Xa({ items: e, value: t, defaultIndex: n = 0, variant: r = "line", orie
|
|
|
3694
4331
|
isFullWidth: s,
|
|
3695
4332
|
className: m
|
|
3696
4333
|
}),
|
|
3697
|
-
children: e.map((e, t) => /* @__PURE__ */ w(
|
|
4334
|
+
children: e.map((e, t) => /* @__PURE__ */ w(Wo, {
|
|
3698
4335
|
ref: (e) => {
|
|
3699
4336
|
S.current[t] = e;
|
|
3700
4337
|
},
|
|
@@ -3714,14 +4351,14 @@ function Xa({ items: e, value: t, defaultIndex: n = 0, variant: r = "line", orie
|
|
|
3714
4351
|
onSelect: () => E(t),
|
|
3715
4352
|
onKeyDown: k
|
|
3716
4353
|
}, e.title))
|
|
3717
|
-
}), u ? e.map((e, t) => /* @__PURE__ */ w(
|
|
4354
|
+
}), u ? e.map((e, t) => /* @__PURE__ */ w(Go, {
|
|
3718
4355
|
panelId: `${x}-panel-${t}`,
|
|
3719
4356
|
tabId: `${x}-tab-${t}`,
|
|
3720
4357
|
isHidden: t !== v,
|
|
3721
4358
|
isAnimated: j,
|
|
3722
4359
|
className: A,
|
|
3723
4360
|
children: e.content
|
|
3724
|
-
}, e.title)) : /* @__PURE__ */ w(
|
|
4361
|
+
}, e.title)) : /* @__PURE__ */ w(Go, {
|
|
3725
4362
|
panelId: `${x}-panel-${v}`,
|
|
3726
4363
|
tabId: `${x}-tab-${v}`,
|
|
3727
4364
|
isHidden: !1,
|
|
@@ -3733,8 +4370,8 @@ function Xa({ items: e, value: t, defaultIndex: n = 0, variant: r = "line", orie
|
|
|
3733
4370
|
});
|
|
3734
4371
|
}
|
|
3735
4372
|
// src/components/textarea/textarea.tsx
|
|
3736
|
-
function
|
|
3737
|
-
let { fieldId: v, errorId: y, descriptionId: b, labelId: x, characterCountId: S } = ot(m), { length: C, trackLength: E } =
|
|
4373
|
+
function cs({ label: t, description: n, error: r, showCharCount: i = !1, minLength: a, maxLength: o, radius: s = "md", unstyled: c = !1, className: l, wrapperClassName: u, value: d, defaultValue: f, onChange: p, id: m, "aria-describedby": h, "aria-label": g, ..._ }) {
|
|
4374
|
+
let { fieldId: v, errorId: y, descriptionId: b, labelId: x, characterCountId: S } = ot(m), { length: C, trackLength: E } = Ni(d, f), D = i && (a !== void 0 || o !== void 0), O = (e) => {
|
|
3738
4375
|
E(e.target.value), p?.(e);
|
|
3739
4376
|
};
|
|
3740
4377
|
return /* @__PURE__ */ T(Ct, {
|
|
@@ -3773,7 +4410,7 @@ function Za({ label: t, description: n, error: r, showCharCount: i = !1, minLeng
|
|
|
3773
4410
|
});
|
|
3774
4411
|
}
|
|
3775
4412
|
// src/lib/is_webkit_gtk.ts
|
|
3776
|
-
var
|
|
4413
|
+
var ls = "AppleWebKit", us = ["Linux", "X11"], ds = [
|
|
3777
4414
|
"Chrome",
|
|
3778
4415
|
"Chromium",
|
|
3779
4416
|
"Edg",
|
|
@@ -3781,12 +4418,12 @@ var Qa = "AppleWebKit", $a = ["Linux", "X11"], eo = [
|
|
|
3781
4418
|
"CriOS",
|
|
3782
4419
|
"FxiOS"
|
|
3783
4420
|
];
|
|
3784
|
-
function
|
|
3785
|
-
return !e.includes(
|
|
4421
|
+
function fs(e) {
|
|
4422
|
+
return !e.includes(ls) || !us.some((t) => e.includes(t)) ? !1 : !ds.some((t) => e.includes(t));
|
|
3786
4423
|
}
|
|
3787
4424
|
// src/lib/theme_transition.ts
|
|
3788
|
-
var
|
|
3789
|
-
async function
|
|
4425
|
+
var ps = 750, ms = "ease-in-out";
|
|
4426
|
+
async function hs({ theme: e, element: t, transitionDuration: n = ps, transitionEasing: r = ms, applyThemeCallback: i }) {
|
|
3790
4427
|
if (!document.startViewTransition || globalThis.matchMedia("(prefers-reduced-motion: reduce)").matches) {
|
|
3791
4428
|
i(e);
|
|
3792
4429
|
return;
|
|
@@ -3800,81 +4437,81 @@ async function io({ theme: e, element: t, transitionDuration: n = no, transition
|
|
|
3800
4437
|
pseudoElement: "::view-transition-new(root)"
|
|
3801
4438
|
});
|
|
3802
4439
|
}
|
|
3803
|
-
function
|
|
4440
|
+
function gs(e) {
|
|
3804
4441
|
return e === "light" ? "dark" : e === "dark" ? "system" : "light";
|
|
3805
4442
|
}
|
|
3806
4443
|
// src/stores/theme_store/theme_storage_key.ts
|
|
3807
|
-
var
|
|
4444
|
+
var _s = "theme";
|
|
3808
4445
|
// src/stores/theme_store/theme_store.ts
|
|
3809
|
-
function
|
|
4446
|
+
function vs(e) {
|
|
3810
4447
|
return e === "light" || e === "dark" || e === "system";
|
|
3811
4448
|
}
|
|
3812
|
-
function
|
|
4449
|
+
function ys() {
|
|
3813
4450
|
return globalThis.window !== void 0 && globalThis.document !== void 0;
|
|
3814
4451
|
}
|
|
3815
|
-
var
|
|
3816
|
-
function
|
|
4452
|
+
var bs = "meta[name=\"theme-color\"][data-light][data-dark]";
|
|
4453
|
+
function xs(e) {
|
|
3817
4454
|
let t = e ? "data-dark" : "data-light";
|
|
3818
|
-
for (let e of document.querySelectorAll(
|
|
4455
|
+
for (let e of document.querySelectorAll(bs)) e.setAttribute("content", e.getAttribute(t) ?? "");
|
|
3819
4456
|
}
|
|
3820
|
-
function
|
|
4457
|
+
function Ss(e) {
|
|
3821
4458
|
let t = window.matchMedia("(prefers-color-scheme: dark)").matches, n = e === "dark" || e === "system" && t;
|
|
3822
|
-
document.documentElement.classList.toggle("dark", n),
|
|
4459
|
+
document.documentElement.classList.toggle("dark", n), xs(n);
|
|
3823
4460
|
}
|
|
3824
|
-
function
|
|
3825
|
-
if (!
|
|
4461
|
+
function Cs() {
|
|
4462
|
+
if (!ys()) return "system";
|
|
3826
4463
|
try {
|
|
3827
|
-
let e = globalThis.localStorage.getItem(
|
|
3828
|
-
return
|
|
4464
|
+
let e = globalThis.localStorage.getItem(_s);
|
|
4465
|
+
return vs(e) ? e : "system";
|
|
3829
4466
|
} catch {
|
|
3830
4467
|
return "system";
|
|
3831
4468
|
}
|
|
3832
4469
|
}
|
|
3833
|
-
function
|
|
3834
|
-
if (
|
|
3835
|
-
globalThis.localStorage.setItem(
|
|
4470
|
+
function ws(e) {
|
|
4471
|
+
if (ys()) try {
|
|
4472
|
+
globalThis.localStorage.setItem(_s, e);
|
|
3836
4473
|
} catch {
|
|
3837
4474
|
return;
|
|
3838
4475
|
}
|
|
3839
4476
|
}
|
|
3840
|
-
var
|
|
3841
|
-
|
|
3842
|
-
var
|
|
3843
|
-
theme:
|
|
4477
|
+
var Ts = Cs();
|
|
4478
|
+
ys() && Ss(Ts);
|
|
4479
|
+
var Es = E((e) => ({
|
|
4480
|
+
theme: Ts,
|
|
3844
4481
|
setTheme: (t) => {
|
|
3845
|
-
|
|
4482
|
+
Ss(t), ws(t), e({ theme: t });
|
|
3846
4483
|
}
|
|
3847
4484
|
}));
|
|
3848
|
-
|
|
4485
|
+
ys() && (globalThis.addEventListener("storage", (e) => {
|
|
3849
4486
|
if (e.key !== "theme") return;
|
|
3850
|
-
let t =
|
|
3851
|
-
|
|
4487
|
+
let t = vs(e.newValue) ? e.newValue : "system";
|
|
4488
|
+
Ss(t), Es.setState({ theme: t });
|
|
3852
4489
|
}), globalThis.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", () => {
|
|
3853
|
-
|
|
4490
|
+
Es.getState().theme === "system" && Ss("system");
|
|
3854
4491
|
}));
|
|
3855
4492
|
// src/components/theme_toggle/theme_toggle.tsx
|
|
3856
|
-
var
|
|
4493
|
+
var Ds = {
|
|
3857
4494
|
light: "i-tabler-sun text-yellow-500",
|
|
3858
4495
|
dark: "i-tabler-moon-stars text-gray-700 dark:text-yellow-500",
|
|
3859
4496
|
system: "i-tabler-device-desktop text-blue-500"
|
|
3860
|
-
},
|
|
4497
|
+
}, Os = {
|
|
3861
4498
|
light: "i-tabler-sun",
|
|
3862
4499
|
dark: "i-tabler-moon-stars",
|
|
3863
4500
|
system: "i-tabler-device-desktop"
|
|
3864
|
-
},
|
|
3865
|
-
function
|
|
4501
|
+
}, ks = "i-tabler-device-desktop text-gray-400", As = "i-tabler-device-desktop";
|
|
4502
|
+
function js(e, t, n) {
|
|
3866
4503
|
return e ? { unstyled: !0 } : {
|
|
3867
4504
|
radius: t,
|
|
3868
4505
|
variant: n
|
|
3869
4506
|
};
|
|
3870
4507
|
}
|
|
3871
|
-
function
|
|
3872
|
-
return n ? t ?
|
|
4508
|
+
function Ms(e, t, n) {
|
|
4509
|
+
return n ? t ? Os[e] : As : t ? Ds[e] : ks;
|
|
3873
4510
|
}
|
|
3874
|
-
function
|
|
3875
|
-
let l =
|
|
3876
|
-
let r =
|
|
3877
|
-
i && a ? await
|
|
4511
|
+
function Ns({ isTransitionEnabled: e, transitionDuration: t, transitionEasing: n, size: r = "md", unstyled: i = !1, radius: a, variant: o, getAriaLabel: s, tooltip: c }) {
|
|
4512
|
+
let l = Es((e) => e.theme), u = Es((e) => e.setTheme), d = Q(), p = xt(), m = y(null), h = f(async () => {
|
|
4513
|
+
let r = gs(l), i = m.current, a = e ?? !fs(navigator.userAgent);
|
|
4514
|
+
i && a ? await hs({
|
|
3878
4515
|
theme: r,
|
|
3879
4516
|
element: i,
|
|
3880
4517
|
transitionDuration: t,
|
|
@@ -3887,7 +4524,7 @@ function Co({ isTransitionEnabled: e, transitionDuration: t, transitionEasing: n
|
|
|
3887
4524
|
t,
|
|
3888
4525
|
n,
|
|
3889
4526
|
u
|
|
3890
|
-
]), g =
|
|
4527
|
+
]), g = Ms(l, p, i), _ = js(i, a, o);
|
|
3891
4528
|
return /* @__PURE__ */ w(X, {
|
|
3892
4529
|
ref: m,
|
|
3893
4530
|
icon: g,
|
|
@@ -3901,7 +4538,7 @@ function Co({ isTransitionEnabled: e, transitionDuration: t, transitionEasing: n
|
|
|
3901
4538
|
});
|
|
3902
4539
|
}
|
|
3903
4540
|
// src/components/toast/toast_focus.ts
|
|
3904
|
-
function
|
|
4541
|
+
function Ps(e) {
|
|
3905
4542
|
for (let t = e.nextElementSibling; t; t = t.nextElementSibling) {
|
|
3906
4543
|
if (t.hasAttribute("inert")) continue;
|
|
3907
4544
|
let e = t.querySelector("button");
|
|
@@ -3909,23 +4546,23 @@ function wo(e) {
|
|
|
3909
4546
|
}
|
|
3910
4547
|
return null;
|
|
3911
4548
|
}
|
|
3912
|
-
function
|
|
4549
|
+
function Fs({ toastElement: e, previousFocus: t }) {
|
|
3913
4550
|
if (!e.contains(document.activeElement)) return;
|
|
3914
|
-
let n =
|
|
4551
|
+
let n = Ps(e);
|
|
3915
4552
|
if (n) return n.focus();
|
|
3916
4553
|
if (t?.isConnected && !e.contains(t)) return t.focus();
|
|
3917
4554
|
e.closest("[data-ms-toaster-region]")?.focus();
|
|
3918
4555
|
}
|
|
3919
4556
|
// src/components/toast/toast_styles.ts
|
|
3920
|
-
var
|
|
3921
|
-
function
|
|
3922
|
-
return e === "error" ?
|
|
4557
|
+
var Is = 2 ** 31 - 1, Ls = 4e3, Rs = 6e3;
|
|
4558
|
+
function zs(e) {
|
|
4559
|
+
return e === "error" ? Rs : Ls;
|
|
3923
4560
|
}
|
|
3924
|
-
function
|
|
3925
|
-
return e <= 0 || !Number.isFinite(e) || e >=
|
|
4561
|
+
function Bs(e) {
|
|
4562
|
+
return e <= 0 || !Number.isFinite(e) || e >= Is;
|
|
3926
4563
|
}
|
|
3927
4564
|
// src/components/toast/toast_timer_bar.tsx
|
|
3928
|
-
function
|
|
4565
|
+
function Vs({ duration: t, isRunning: n, isStyled: r }) {
|
|
3929
4566
|
let i = {
|
|
3930
4567
|
animationDuration: `${t}ms`,
|
|
3931
4568
|
animationFillMode: "forwards",
|
|
@@ -3940,7 +4577,7 @@ function jo({ duration: t, isRunning: n, isStyled: r }) {
|
|
|
3940
4577
|
});
|
|
3941
4578
|
}
|
|
3942
4579
|
// src/components/toast/toaster_item_content.tsx
|
|
3943
|
-
function
|
|
4580
|
+
function Hs({ tone: t, message: n, description: r, action: i, radius: a, unstyled: o, closeLabel: s, timerDuration: c, isTimerRunning: l, timerKey: u, onAction: d, onDismiss: f }) {
|
|
3944
4581
|
return /* @__PURE__ */ T("div", {
|
|
3945
4582
|
className: e("flex items-start gap-3", !o && [
|
|
3946
4583
|
"relative overflow-hidden px-4 py-3 border text-sm",
|
|
@@ -3983,7 +4620,7 @@ function Mo({ tone: t, message: n, description: r, action: i, radius: a, unstyle
|
|
|
3983
4620
|
unstyled: o,
|
|
3984
4621
|
onClick: f
|
|
3985
4622
|
}),
|
|
3986
|
-
c !== null && /* @__PURE__ */ w(
|
|
4623
|
+
c !== null && /* @__PURE__ */ w(Vs, {
|
|
3987
4624
|
duration: c,
|
|
3988
4625
|
isRunning: l,
|
|
3989
4626
|
isStyled: !o
|
|
@@ -3992,14 +4629,14 @@ function Mo({ tone: t, message: n, description: r, action: i, radius: a, unstyle
|
|
|
3992
4629
|
});
|
|
3993
4630
|
}
|
|
3994
4631
|
// src/components/toast/toaster_styles.ts
|
|
3995
|
-
var
|
|
4632
|
+
var Us = {
|
|
3996
4633
|
"top-left": "ms-toaster-top ms-toaster-left",
|
|
3997
4634
|
"top-center": "ms-toaster-top ms-toaster-center",
|
|
3998
4635
|
"top-right": "ms-toaster-top ms-toaster-right",
|
|
3999
4636
|
"bottom-left": "ms-toaster-bottom ms-toaster-left",
|
|
4000
4637
|
"bottom-center": "ms-toaster-bottom ms-toaster-center",
|
|
4001
4638
|
"bottom-right": "ms-toaster-bottom ms-toaster-right"
|
|
4002
|
-
},
|
|
4639
|
+
}, Ws = {
|
|
4003
4640
|
"top-left": "ms-toaster-item-top-left",
|
|
4004
4641
|
"top-center": "ms-toaster-item-top-center",
|
|
4005
4642
|
"top-right": "ms-toaster-item-top-right",
|
|
@@ -4008,25 +4645,25 @@ var No = {
|
|
|
4008
4645
|
"bottom-right": "ms-toaster-item-bottom-right"
|
|
4009
4646
|
};
|
|
4010
4647
|
// src/components/toast/use_toast_timer.ts
|
|
4011
|
-
function
|
|
4648
|
+
function Gs() {
|
|
4012
4649
|
return document.visibilityState === "hidden";
|
|
4013
4650
|
}
|
|
4014
|
-
var
|
|
4015
|
-
function
|
|
4016
|
-
for (let e of
|
|
4651
|
+
var Ks = /* @__PURE__ */ new Set();
|
|
4652
|
+
function qs() {
|
|
4653
|
+
for (let e of Ks) e();
|
|
4017
4654
|
}
|
|
4018
|
-
function
|
|
4019
|
-
return
|
|
4020
|
-
|
|
4655
|
+
function Js(e) {
|
|
4656
|
+
return Ks.size === 0 && document.addEventListener("visibilitychange", qs), Ks.add(e), () => {
|
|
4657
|
+
Ks.delete(e), !(Ks.size > 0) && document.removeEventListener("visibilitychange", qs);
|
|
4021
4658
|
};
|
|
4022
4659
|
}
|
|
4023
|
-
function
|
|
4660
|
+
function Ys() {
|
|
4024
4661
|
return !1;
|
|
4025
4662
|
}
|
|
4026
|
-
function
|
|
4027
|
-
let i = y(e), a = y(r), [o, s] = b(null), c = x(
|
|
4663
|
+
function Xs({ duration: e, isPaused: t, onElapsed: n, revision: r = 0 }) {
|
|
4664
|
+
let i = y(e), a = y(r), [o, s] = b(null), c = x(Js, Gs, Ys), l = o === r, u = h(n);
|
|
4028
4665
|
return m(() => {
|
|
4029
|
-
if (a.current !== r && (a.current = r, i.current = e), l || t || c ||
|
|
4666
|
+
if (a.current !== r && (a.current = r, i.current = e), l || t || c || Bs(e)) return;
|
|
4030
4667
|
let n = Date.now(), o = setTimeout(() => {
|
|
4031
4668
|
s(r), u();
|
|
4032
4669
|
}, i.current);
|
|
@@ -4039,26 +4676,26 @@ function Bo({ duration: e, isPaused: t, onElapsed: n, revision: r = 0 }) {
|
|
|
4039
4676
|
c,
|
|
4040
4677
|
r,
|
|
4041
4678
|
l
|
|
4042
|
-
]), { isRunning: !l && !t && !c && !
|
|
4679
|
+
]), { isRunning: !l && !t && !c && !Bs(e) };
|
|
4043
4680
|
}
|
|
4044
|
-
var
|
|
4045
|
-
function
|
|
4681
|
+
var Zs = 5;
|
|
4682
|
+
function Qs(e) {
|
|
4046
4683
|
return e.filter((e) => !e.isClosing).length;
|
|
4047
4684
|
}
|
|
4048
|
-
function
|
|
4685
|
+
function $s(e) {
|
|
4049
4686
|
let t = e.filter((e) => !e.isClosing && !e.isPinned);
|
|
4050
|
-
return t.find((e) => !
|
|
4687
|
+
return t.find((e) => !Bs(e.duration)) ?? t[0];
|
|
4051
4688
|
}
|
|
4052
|
-
function
|
|
4689
|
+
function ec(e) {
|
|
4053
4690
|
let t = e;
|
|
4054
|
-
for (;
|
|
4055
|
-
let e =
|
|
4691
|
+
for (; Qs(t) > 5;) {
|
|
4692
|
+
let e = $s(t);
|
|
4056
4693
|
if (!e) return t;
|
|
4057
|
-
t =
|
|
4694
|
+
t = nc(t, e.id);
|
|
4058
4695
|
}
|
|
4059
4696
|
return t;
|
|
4060
4697
|
}
|
|
4061
|
-
function
|
|
4698
|
+
function tc(e, t) {
|
|
4062
4699
|
let n = e.find((e) => e.id === t.id);
|
|
4063
4700
|
if (!n) {
|
|
4064
4701
|
let n = {
|
|
@@ -4077,48 +4714,48 @@ function Go(e, t) {
|
|
|
4077
4714
|
};
|
|
4078
4715
|
return e.map((e) => e.id === t.id ? r : e);
|
|
4079
4716
|
}
|
|
4080
|
-
function
|
|
4717
|
+
function nc(e, t) {
|
|
4081
4718
|
let n = (e) => (t === void 0 || e.id === t) && !e.isClosing;
|
|
4082
4719
|
return e.some(n) ? e.map((e) => n(e) ? {
|
|
4083
4720
|
...e,
|
|
4084
4721
|
isClosing: !0
|
|
4085
4722
|
} : e) : e;
|
|
4086
4723
|
}
|
|
4087
|
-
function
|
|
4724
|
+
function rc(e, t) {
|
|
4088
4725
|
return e.some((e) => e.id === t) ? e.filter((e) => e.id !== t) : e;
|
|
4089
4726
|
}
|
|
4090
|
-
function
|
|
4727
|
+
function ic(e, t, n) {
|
|
4091
4728
|
let r = e.find((e) => e.id === t);
|
|
4092
4729
|
return !r || r.isPinned === n ? e : e.map((e) => e.id === t ? {
|
|
4093
4730
|
...e,
|
|
4094
4731
|
isPinned: n
|
|
4095
4732
|
} : e);
|
|
4096
4733
|
}
|
|
4097
|
-
function
|
|
4098
|
-
let t = e.filter((e) => e.isClosing).length -
|
|
4734
|
+
function ac(e) {
|
|
4735
|
+
let t = e.filter((e) => e.isClosing).length - Zs;
|
|
4099
4736
|
return t <= 0 ? e : e.filter((e) => !e.isClosing || t <= 0 || (--t, !1));
|
|
4100
4737
|
}
|
|
4101
4738
|
// src/stores/toast_store/toast_store.ts
|
|
4102
|
-
function
|
|
4739
|
+
function oc(e, t) {
|
|
4103
4740
|
return t === e.entries ? e : {
|
|
4104
4741
|
...e,
|
|
4105
4742
|
entries: t
|
|
4106
4743
|
};
|
|
4107
4744
|
}
|
|
4108
|
-
var
|
|
4745
|
+
var sc = E((e) => ({
|
|
4109
4746
|
entries: [],
|
|
4110
|
-
showToast: (t) => e((e) => ({ entries:
|
|
4111
|
-
dismissToast: (t) => e((e) =>
|
|
4112
|
-
removeToast: (t) => e((e) =>
|
|
4113
|
-
setToastPinned: (t, n) => e((e) =>
|
|
4747
|
+
showToast: (t) => e((e) => ({ entries: ac(ec(tc(e.entries, t))) })),
|
|
4748
|
+
dismissToast: (t) => e((e) => oc(e, nc(e.entries, t))),
|
|
4749
|
+
removeToast: (t) => e((e) => oc(e, rc(e.entries, t))),
|
|
4750
|
+
setToastPinned: (t, n) => e((e) => oc(e, ic(e.entries, t, n))),
|
|
4114
4751
|
resetToasts: () => e((e) => e.entries.length === 0 ? e : {
|
|
4115
4752
|
...e,
|
|
4116
4753
|
entries: []
|
|
4117
4754
|
})
|
|
4118
4755
|
}));
|
|
4119
4756
|
// src/components/toast/toaster_item.tsx
|
|
4120
|
-
function
|
|
4121
|
-
let { id: s, message: c, description: l, tone: u, duration: d, action: f, revision: p, isClosing: h } = t, g = t.radius ?? r ?? "lg", v = t.unstyled ?? i ?? !1, x =
|
|
4757
|
+
function cc({ entry: t, position: n, toasterRadius: r, toasterUnstyled: i, closeLabel: a, previousFocusRef: o }) {
|
|
4758
|
+
let { id: s, message: c, description: l, tone: u, duration: d, action: f, revision: p, isClosing: h } = t, g = t.radius ?? r ?? "lg", v = t.unstyled ?? i ?? !1, x = sc((e) => e.dismissToast), S = sc((e) => e.removeToast), C = sc((e) => e.setToastPinned), T = y(null), [E, D] = b(!1), [O, k] = b(!1), [A, j] = b(!1), { isRunning: M } = Xs({
|
|
4122
4759
|
duration: d,
|
|
4123
4760
|
isPaused: O || A || h,
|
|
4124
4761
|
onElapsed: () => x(s),
|
|
@@ -4135,7 +4772,7 @@ function Qo({ entry: t, position: n, toasterRadius: r, toasterUnstyled: i, close
|
|
|
4135
4772
|
A,
|
|
4136
4773
|
C
|
|
4137
4774
|
]), _(() => {
|
|
4138
|
-
h && T.current &&
|
|
4775
|
+
h && T.current && Fs({
|
|
4139
4776
|
toastElement: T.current,
|
|
4140
4777
|
previousFocus: o.current
|
|
4141
4778
|
});
|
|
@@ -4158,7 +4795,7 @@ function Qo({ entry: t, position: n, toasterRadius: r, toasterUnstyled: i, close
|
|
|
4158
4795
|
e.key !== "Escape" || h || e.ctrlKey || e.altKey || e.metaKey || e.shiftKey || (e.preventDefault(), e.stopPropagation(), x(s));
|
|
4159
4796
|
}, R = () => x(s), z = () => {
|
|
4160
4797
|
f?.onClick(), x(s);
|
|
4161
|
-
}, V = E && !h, H =
|
|
4798
|
+
}, V = E && !h, H = Bs(d) ? null : d;
|
|
4162
4799
|
return /* @__PURE__ */ w("li", {
|
|
4163
4800
|
ref: T,
|
|
4164
4801
|
"data-ms-toast-id": s,
|
|
@@ -4170,14 +4807,14 @@ function Qo({ entry: t, position: n, toasterRadius: r, toasterUnstyled: i, close
|
|
|
4170
4807
|
"bg-white dark:bg-gray-900",
|
|
4171
4808
|
B[g],
|
|
4172
4809
|
"ms-toaster-item-transition",
|
|
4173
|
-
|
|
4810
|
+
Ws[n]
|
|
4174
4811
|
]),
|
|
4175
4812
|
onPointerEnter: P,
|
|
4176
4813
|
onPointerLeave: F,
|
|
4177
4814
|
onFocus: I,
|
|
4178
4815
|
onKeyDown: L,
|
|
4179
4816
|
onBlur: N,
|
|
4180
|
-
children: /* @__PURE__ */ w(
|
|
4817
|
+
children: /* @__PURE__ */ w(Hs, {
|
|
4181
4818
|
tone: u,
|
|
4182
4819
|
message: c,
|
|
4183
4820
|
description: l,
|
|
@@ -4193,83 +4830,83 @@ function Qo({ entry: t, position: n, toasterRadius: r, toasterUnstyled: i, close
|
|
|
4193
4830
|
})
|
|
4194
4831
|
});
|
|
4195
4832
|
}
|
|
4196
|
-
var
|
|
4197
|
-
function
|
|
4198
|
-
for (let e of
|
|
4833
|
+
var lc = d(cc), uc = [], dc = /* @__PURE__ */ new Set(), fc = 0;
|
|
4834
|
+
function pc() {
|
|
4835
|
+
for (let e of dc) e();
|
|
4199
4836
|
}
|
|
4200
|
-
function
|
|
4201
|
-
let e =
|
|
4837
|
+
function mc() {
|
|
4838
|
+
let e = fc;
|
|
4202
4839
|
queueMicrotask(() => {
|
|
4203
|
-
e ===
|
|
4840
|
+
e === fc && sc.getState().resetToasts();
|
|
4204
4841
|
});
|
|
4205
4842
|
}
|
|
4206
|
-
function
|
|
4207
|
-
return
|
|
4208
|
-
|
|
4843
|
+
function hc(e) {
|
|
4844
|
+
return dc.add(e), () => {
|
|
4845
|
+
dc.delete(e);
|
|
4209
4846
|
};
|
|
4210
4847
|
}
|
|
4211
|
-
function
|
|
4212
|
-
return
|
|
4848
|
+
function gc(e) {
|
|
4849
|
+
return uc[0] === e;
|
|
4213
4850
|
}
|
|
4214
|
-
function
|
|
4215
|
-
return
|
|
4216
|
-
let t =
|
|
4217
|
-
t !== -1 && (
|
|
4851
|
+
function _c(e) {
|
|
4852
|
+
return fc += 1, uc.push(e), pc(), () => {
|
|
4853
|
+
let t = uc.indexOf(e);
|
|
4854
|
+
t !== -1 && (uc.splice(t, 1), pc(), uc.length === 0 && mc());
|
|
4218
4855
|
};
|
|
4219
4856
|
}
|
|
4220
4857
|
// src/components/toast/use_is_active_toaster.ts
|
|
4221
|
-
var
|
|
4222
|
-
function
|
|
4858
|
+
var vc = "Toaster: another <Toaster /> is already mounted, so this one renders nothing. Mount a single Toaster at the app root.";
|
|
4859
|
+
function yc() {
|
|
4223
4860
|
return !1;
|
|
4224
4861
|
}
|
|
4225
|
-
function
|
|
4862
|
+
function bc() {
|
|
4226
4863
|
let e = g();
|
|
4227
4864
|
return m(() => {
|
|
4228
|
-
let t =
|
|
4229
|
-
return !
|
|
4230
|
-
}, [e]), x(
|
|
4865
|
+
let t = _c(e);
|
|
4866
|
+
return !gc(e) && process.env.NODE_ENV !== "production" && console.warn(vc), t;
|
|
4867
|
+
}, [e]), x(hc, () => gc(e), yc);
|
|
4231
4868
|
}
|
|
4232
4869
|
// src/components/toast/toast_announcement.ts
|
|
4233
|
-
var
|
|
4234
|
-
function
|
|
4235
|
-
return
|
|
4870
|
+
var xc = ["danger"];
|
|
4871
|
+
function Sc(e) {
|
|
4872
|
+
return xc.some((t) => t === e) ? "assertive" : "polite";
|
|
4236
4873
|
}
|
|
4237
|
-
function
|
|
4874
|
+
function Cc(e) {
|
|
4238
4875
|
return Array.from(document.querySelectorAll(`[data-ms-toast-announcer="${e}"]`));
|
|
4239
4876
|
}
|
|
4240
|
-
function
|
|
4877
|
+
function wc(e) {
|
|
4241
4878
|
return e.closest("[aria-modal=\"true\"]")?.getAttribute("data-state") === "open";
|
|
4242
4879
|
}
|
|
4243
|
-
function
|
|
4880
|
+
function Tc(e) {
|
|
4244
4881
|
let t = e.querySelector("[data-ms-toast-text]");
|
|
4245
4882
|
return t ? Array.from(t.children).map((e) => e.textContent ?? "").join(" ").trim() : "";
|
|
4246
4883
|
}
|
|
4247
|
-
function
|
|
4884
|
+
function Ec(e, t) {
|
|
4248
4885
|
let n = t[e];
|
|
4249
4886
|
n && (n.textContent = "");
|
|
4250
|
-
for (let t of
|
|
4887
|
+
for (let t of Cc(e)) t.textContent = "";
|
|
4251
4888
|
}
|
|
4252
|
-
function
|
|
4253
|
-
let r =
|
|
4889
|
+
function Dc(e, t, n) {
|
|
4890
|
+
let r = Cc(e).filter(wc).at(-1) ?? n[e];
|
|
4254
4891
|
r && (r.textContent = t);
|
|
4255
4892
|
}
|
|
4256
|
-
function
|
|
4893
|
+
function Oc(e, t) {
|
|
4257
4894
|
if (e) return Array.from(e.querySelectorAll("[data-ms-toast-id]")).find((e) => e.dataset.msToastId === t);
|
|
4258
4895
|
}
|
|
4259
|
-
function
|
|
4896
|
+
function kc(e, t) {
|
|
4260
4897
|
let n = {
|
|
4261
4898
|
polite: [],
|
|
4262
4899
|
assertive: []
|
|
4263
4900
|
};
|
|
4264
4901
|
for (let r of t) {
|
|
4265
|
-
let t =
|
|
4902
|
+
let t = Oc(e, r);
|
|
4266
4903
|
if (!t) continue;
|
|
4267
|
-
let i =
|
|
4268
|
-
i && n[
|
|
4904
|
+
let i = Tc(t);
|
|
4905
|
+
i && n[Sc(t.dataset.tone ?? "")].push(i);
|
|
4269
4906
|
}
|
|
4270
4907
|
return n;
|
|
4271
4908
|
}
|
|
4272
|
-
function
|
|
4909
|
+
function Ac({ entries: e, listRef: t, politeRef: n, assertiveRef: r }) {
|
|
4273
4910
|
let i = y(/* @__PURE__ */ new Map()), a = y([]), o = y(null);
|
|
4274
4911
|
m(() => {
|
|
4275
4912
|
let s = i.current, c = a.current, l = {
|
|
@@ -4279,11 +4916,11 @@ function bs({ entries: e, listRef: t, politeRef: n, assertiveRef: r }) {
|
|
|
4279
4916
|
s.clear();
|
|
4280
4917
|
for (let t of e) s.set(t.id, t.revision);
|
|
4281
4918
|
if (u.length !== 0) {
|
|
4282
|
-
for (let e of u)
|
|
4919
|
+
for (let e of u) Ec(Sc(e.tone), l), c.push(e.id);
|
|
4283
4920
|
o.current === null && (o.current = setTimeout(() => {
|
|
4284
4921
|
o.current = null;
|
|
4285
|
-
let e =
|
|
4286
|
-
e.polite.length > 0 &&
|
|
4922
|
+
let e = kc(t.current, c.splice(0));
|
|
4923
|
+
e.polite.length > 0 && Dc("polite", e.polite.join(" "), l), e.assertive.length > 0 && Dc("assertive", e.assertive.join(" "), l);
|
|
4287
4924
|
}, 50));
|
|
4288
4925
|
}
|
|
4289
4926
|
}, [
|
|
@@ -4298,28 +4935,28 @@ function bs({ entries: e, listRef: t, politeRef: n, assertiveRef: r }) {
|
|
|
4298
4935
|
};
|
|
4299
4936
|
}, []);
|
|
4300
4937
|
}
|
|
4301
|
-
function
|
|
4938
|
+
function jc(e) {
|
|
4302
4939
|
return e.ctrlKey || e.altKey || e.metaKey || e.shiftKey;
|
|
4303
4940
|
}
|
|
4304
|
-
function
|
|
4305
|
-
return
|
|
4941
|
+
function Mc() {
|
|
4942
|
+
return sc.getState().entries.some((e) => !e.isClosing);
|
|
4306
4943
|
}
|
|
4307
|
-
function
|
|
4944
|
+
function Nc() {
|
|
4308
4945
|
let { activeElement: e } = document;
|
|
4309
4946
|
return e instanceof HTMLElement ? e === document.body ? null : e : null;
|
|
4310
4947
|
}
|
|
4311
|
-
function
|
|
4948
|
+
function Pc({ regionRef: e, previousFocusRef: t }) {
|
|
4312
4949
|
m(() => {
|
|
4313
4950
|
let n = (n) => {
|
|
4314
|
-
if (n.key !== "F8" ||
|
|
4951
|
+
if (n.key !== "F8" || jc(n) || n.defaultPrevented || !vi.getState().globalHotkeysEnabled) return;
|
|
4315
4952
|
let r = e.current;
|
|
4316
|
-
if (r &&
|
|
4953
|
+
if (r && Mc()) {
|
|
4317
4954
|
if (r.contains(document.activeElement)) {
|
|
4318
4955
|
let e = t.current;
|
|
4319
4956
|
if (!e?.isConnected) return;
|
|
4320
4957
|
e.focus();
|
|
4321
4958
|
} else {
|
|
4322
|
-
let e =
|
|
4959
|
+
let e = Nc();
|
|
4323
4960
|
r.focus(), t.current = e;
|
|
4324
4961
|
}
|
|
4325
4962
|
n.preventDefault();
|
|
@@ -4329,12 +4966,12 @@ function ws({ regionRef: e, previousFocusRef: t }) {
|
|
|
4329
4966
|
}, [e, t]);
|
|
4330
4967
|
}
|
|
4331
4968
|
// src/components/toast/toaster.tsx
|
|
4332
|
-
function
|
|
4333
|
-
let i = Q(), a =
|
|
4334
|
-
|
|
4969
|
+
function Fc({ position: t = "bottom-right", radius: n, unstyled: r }) {
|
|
4970
|
+
let i = Q(), a = sc((e) => e.entries), o = y(null), s = y(null), c = y(null), l = y(null), u = y(null);
|
|
4971
|
+
Pc({
|
|
4335
4972
|
regionRef: l,
|
|
4336
4973
|
previousFocusRef: u
|
|
4337
|
-
}),
|
|
4974
|
+
}), Ac({
|
|
4338
4975
|
entries: a,
|
|
4339
4976
|
listRef: o,
|
|
4340
4977
|
politeRef: s,
|
|
@@ -4342,7 +4979,7 @@ function Ts({ position: t = "bottom-right", radius: n, unstyled: r }) {
|
|
|
4342
4979
|
});
|
|
4343
4980
|
let d = t.startsWith("top"), f = v(() => d ? [...a].reverse() : a, [a, d]);
|
|
4344
4981
|
return S(/* @__PURE__ */ T("div", {
|
|
4345
|
-
className: e("ms-toaster",
|
|
4982
|
+
className: e("ms-toaster", Us[t]),
|
|
4346
4983
|
children: [
|
|
4347
4984
|
/* @__PURE__ */ w("section", {
|
|
4348
4985
|
ref: l,
|
|
@@ -4358,7 +4995,7 @@ function Ts({ position: t = "bottom-right", radius: n, unstyled: r }) {
|
|
|
4358
4995
|
children: /* @__PURE__ */ w("ol", {
|
|
4359
4996
|
ref: o,
|
|
4360
4997
|
className: "m-0 flex list-none flex-col gap-2 p-0",
|
|
4361
|
-
children: f.map((e) => /* @__PURE__ */ w(
|
|
4998
|
+
children: f.map((e) => /* @__PURE__ */ w(lc, {
|
|
4362
4999
|
entry: e,
|
|
4363
5000
|
position: t,
|
|
4364
5001
|
toasterRadius: n,
|
|
@@ -4381,70 +5018,70 @@ function Ts({ position: t = "bottom-right", radius: n, unstyled: r }) {
|
|
|
4381
5018
|
]
|
|
4382
5019
|
}), document.body);
|
|
4383
5020
|
}
|
|
4384
|
-
function
|
|
4385
|
-
return
|
|
5021
|
+
function Ic(e) {
|
|
5022
|
+
return bc() ? /* @__PURE__ */ w(Fc, { ...e }) : null;
|
|
4386
5023
|
}
|
|
4387
5024
|
// src/components/toast/toast_provider.tsx
|
|
4388
|
-
var
|
|
4389
|
-
function
|
|
4390
|
-
return
|
|
5025
|
+
var Lc = ({ children: e }) => /* @__PURE__ */ T(C, { children: [e, /* @__PURE__ */ w(Ic, {})] }), Rc = 0;
|
|
5026
|
+
function zc() {
|
|
5027
|
+
return Rc += 1, `ms-toast-${Rc}`;
|
|
4391
5028
|
}
|
|
4392
5029
|
// src/components/toast/toast.ts
|
|
4393
|
-
var
|
|
4394
|
-
function
|
|
4395
|
-
return t.duration === void 0 ?
|
|
5030
|
+
var Bc = 5e3, Vc = ["warning", "danger"];
|
|
5031
|
+
function Hc(e, t) {
|
|
5032
|
+
return t.duration === void 0 ? Vc.includes(e) || t.action ? Infinity : Bc : t.duration;
|
|
4396
5033
|
}
|
|
4397
|
-
function
|
|
4398
|
-
let r = n.id ??
|
|
4399
|
-
return typeof window > "u" ||
|
|
5034
|
+
function Uc(e, t, n = {}) {
|
|
5035
|
+
let r = n.id ?? zc();
|
|
5036
|
+
return typeof window > "u" || sc.getState().showToast({
|
|
4400
5037
|
id: r,
|
|
4401
5038
|
message: t,
|
|
4402
5039
|
description: n.description,
|
|
4403
5040
|
tone: e,
|
|
4404
|
-
duration:
|
|
5041
|
+
duration: Hc(e, n),
|
|
4405
5042
|
action: n.action
|
|
4406
5043
|
}), r;
|
|
4407
5044
|
}
|
|
4408
|
-
function
|
|
4409
|
-
typeof window < "u" &&
|
|
4410
|
-
}
|
|
4411
|
-
var
|
|
4412
|
-
info: (e, t) =>
|
|
4413
|
-
success: (e, t) =>
|
|
4414
|
-
warning: (e, t) =>
|
|
4415
|
-
error: (e, t) =>
|
|
4416
|
-
dismiss:
|
|
5045
|
+
function Wc(e) {
|
|
5046
|
+
typeof window < "u" && sc.getState().dismissToast(e);
|
|
5047
|
+
}
|
|
5048
|
+
var Gc = Object.assign((e, t) => Uc("info", e, t), {
|
|
5049
|
+
info: (e, t) => Uc("info", e, t),
|
|
5050
|
+
success: (e, t) => Uc("success", e, t),
|
|
5051
|
+
warning: (e, t) => Uc("warning", e, t),
|
|
5052
|
+
error: (e, t) => Uc("danger", e, t),
|
|
5053
|
+
dismiss: Wc
|
|
4417
5054
|
});
|
|
4418
5055
|
// src/components/toast/use_toast.ts
|
|
4419
|
-
function
|
|
4420
|
-
return e.duration === void 0 ? e.action ? Infinity :
|
|
5056
|
+
function Kc(e) {
|
|
5057
|
+
return e.duration === void 0 ? e.action ? Infinity : zs(e.tone ?? "info") : e.duration;
|
|
4421
5058
|
}
|
|
4422
|
-
function
|
|
4423
|
-
let t =
|
|
5059
|
+
function qc(e) {
|
|
5060
|
+
let t = zc();
|
|
4424
5061
|
if (typeof window > "u") return t;
|
|
4425
5062
|
let n = e.tone ?? "info";
|
|
4426
|
-
return
|
|
5063
|
+
return sc.getState().showToast({
|
|
4427
5064
|
id: t,
|
|
4428
5065
|
message: e.message,
|
|
4429
5066
|
tone: n === "error" ? "danger" : n,
|
|
4430
|
-
duration:
|
|
5067
|
+
duration: Kc(e),
|
|
4431
5068
|
action: e.action,
|
|
4432
5069
|
radius: e.radius,
|
|
4433
5070
|
unstyled: e.unstyled
|
|
4434
5071
|
}), t;
|
|
4435
5072
|
}
|
|
4436
|
-
function
|
|
4437
|
-
typeof window < "u" &&
|
|
5073
|
+
function Jc(e) {
|
|
5074
|
+
typeof window < "u" && sc.getState().dismissToast(e);
|
|
4438
5075
|
}
|
|
4439
|
-
var
|
|
4440
|
-
show:
|
|
4441
|
-
dismiss:
|
|
5076
|
+
var Yc = {
|
|
5077
|
+
show: qc,
|
|
5078
|
+
dismiss: Jc
|
|
4442
5079
|
};
|
|
4443
|
-
function
|
|
4444
|
-
return
|
|
5080
|
+
function Xc() {
|
|
5081
|
+
return Yc;
|
|
4445
5082
|
}
|
|
4446
5083
|
// src/components/toolbar/toolbar_items.ts
|
|
4447
|
-
var
|
|
5084
|
+
var Zc = "a[href], button, input:not([type=\"hidden\"]), select, textarea, summary, [contenteditable]:not([contenteditable=\"false\"]), [tabindex]", Qc = [
|
|
4448
5085
|
"textarea",
|
|
4449
5086
|
"[contenteditable]:not([contenteditable=\"false\"])",
|
|
4450
5087
|
`input:not(${[
|
|
@@ -4458,46 +5095,46 @@ var Vs = "a[href], button, input:not([type=\"hidden\"]), select, textarea, summa
|
|
|
4458
5095
|
"reset",
|
|
4459
5096
|
"submit"
|
|
4460
5097
|
].map((e) => `[type="${e}"]`).join(", ")})`
|
|
4461
|
-
].join(", "),
|
|
4462
|
-
function
|
|
5098
|
+
].join(", "), $c = "select, input[type=\"range\"], input[type=\"radio\"]";
|
|
5099
|
+
function el(e) {
|
|
4463
5100
|
return e.matches(":disabled, [aria-disabled=\"true\"]");
|
|
4464
5101
|
}
|
|
4465
|
-
function
|
|
4466
|
-
return Array.from(e.querySelectorAll(
|
|
5102
|
+
function tl(e) {
|
|
5103
|
+
return Array.from(e.querySelectorAll(Zc));
|
|
4467
5104
|
}
|
|
4468
|
-
function
|
|
4469
|
-
return
|
|
5105
|
+
function nl(e) {
|
|
5106
|
+
return tl(e).filter((e) => !el(e));
|
|
4470
5107
|
}
|
|
4471
|
-
function
|
|
4472
|
-
return e instanceof HTMLElement && e.matches(`${
|
|
5108
|
+
function rl(e) {
|
|
5109
|
+
return e instanceof HTMLElement && e.matches(`${Qc}, ${$c}`);
|
|
4473
5110
|
}
|
|
4474
5111
|
// src/components/toolbar/toolbar_navigation.ts
|
|
4475
|
-
var
|
|
5112
|
+
var il = (e, t) => (e + 1) % t, al = (e, t) => (e - 1 + t) % t, ol = () => 0, sl = (e, t) => t - 1, cl = {
|
|
4476
5113
|
horizontal: {
|
|
4477
|
-
ArrowRight:
|
|
4478
|
-
ArrowLeft:
|
|
4479
|
-
Home:
|
|
4480
|
-
End:
|
|
5114
|
+
ArrowRight: il,
|
|
5115
|
+
ArrowLeft: al,
|
|
5116
|
+
Home: ol,
|
|
5117
|
+
End: sl
|
|
4481
5118
|
},
|
|
4482
5119
|
vertical: {
|
|
4483
|
-
ArrowDown:
|
|
4484
|
-
ArrowUp:
|
|
4485
|
-
Home:
|
|
4486
|
-
End:
|
|
5120
|
+
ArrowDown: il,
|
|
5121
|
+
ArrowUp: al,
|
|
5122
|
+
Home: ol,
|
|
5123
|
+
End: sl
|
|
4487
5124
|
}
|
|
4488
5125
|
};
|
|
4489
|
-
function
|
|
4490
|
-
let { key: t, orientation: n, currentPosition: r, itemCount: i } = e, a =
|
|
5126
|
+
function ll(e) {
|
|
5127
|
+
let { key: t, orientation: n, currentPosition: r, itemCount: i } = e, a = cl[n][t];
|
|
4491
5128
|
if (a && i !== 0) return a(r, i);
|
|
4492
5129
|
}
|
|
4493
5130
|
// src/components/toolbar/use_toolbar_roving_focus.ts
|
|
4494
|
-
var
|
|
4495
|
-
function
|
|
5131
|
+
var ul = ["disabled", "aria-disabled"];
|
|
5132
|
+
function dl(e, t) {
|
|
4496
5133
|
let n = y(null), r = f(() => {
|
|
4497
5134
|
let t = e.current;
|
|
4498
5135
|
if (!t) return;
|
|
4499
|
-
let r =
|
|
4500
|
-
for (let e of
|
|
5136
|
+
let r = nl(t), i = n.current, a = i && r.includes(i) ? i : r[0];
|
|
5137
|
+
for (let e of tl(t)) e.tabIndex = e === a ? 0 : -1;
|
|
4501
5138
|
}, [e]);
|
|
4502
5139
|
return m(() => {
|
|
4503
5140
|
let t = e.current;
|
|
@@ -4508,19 +5145,19 @@ function tc(e, t) {
|
|
|
4508
5145
|
subtree: !0,
|
|
4509
5146
|
childList: !0,
|
|
4510
5147
|
attributes: !0,
|
|
4511
|
-
attributeFilter:
|
|
5148
|
+
attributeFilter: ul
|
|
4512
5149
|
}), () => n.disconnect();
|
|
4513
5150
|
}, [e, r]), {
|
|
4514
5151
|
handleFocus: (t) => {
|
|
4515
5152
|
let i = e.current;
|
|
4516
5153
|
if (!i) return;
|
|
4517
|
-
let a =
|
|
5154
|
+
let a = nl(i).find((e) => e === t.target);
|
|
4518
5155
|
a && (n.current = a, r());
|
|
4519
5156
|
},
|
|
4520
5157
|
handleKeyDown: (n) => {
|
|
4521
5158
|
let r = e.current;
|
|
4522
|
-
if (!r || !r.contains(n.target) ||
|
|
4523
|
-
let i =
|
|
5159
|
+
if (!r || !r.contains(n.target) || rl(n.target)) return;
|
|
5160
|
+
let i = nl(r), a = ll({
|
|
4524
5161
|
key: n.key,
|
|
4525
5162
|
orientation: t,
|
|
4526
5163
|
currentPosition: i.findIndex((e) => e === n.target),
|
|
@@ -4531,18 +5168,18 @@ function tc(e, t) {
|
|
|
4531
5168
|
};
|
|
4532
5169
|
}
|
|
4533
5170
|
// src/components/toolbar/toolbar.tsx
|
|
4534
|
-
var
|
|
5171
|
+
var fl = {
|
|
4535
5172
|
horizontal: "flex items-center gap-1",
|
|
4536
5173
|
vertical: "flex flex-col items-stretch gap-1"
|
|
4537
5174
|
};
|
|
4538
|
-
function
|
|
4539
|
-
let { orientation: n = "horizontal", unstyled: r = !1, className: i, ref: a, onFocus: o, onKeyDown: s, ...c } = t, l = y(null), { handleFocus: u, handleKeyDown: d } =
|
|
5175
|
+
function pl(t) {
|
|
5176
|
+
let { orientation: n = "horizontal", unstyled: r = !1, className: i, ref: a, onFocus: o, onKeyDown: s, ...c } = t, l = y(null), { handleFocus: u, handleKeyDown: d } = dl(l, n);
|
|
4540
5177
|
return /* @__PURE__ */ w("div", {
|
|
4541
5178
|
...c,
|
|
4542
5179
|
ref: K(l, a),
|
|
4543
5180
|
role: "toolbar",
|
|
4544
5181
|
"aria-orientation": n,
|
|
4545
|
-
className: e(!r &&
|
|
5182
|
+
className: e(!r && fl[n], i),
|
|
4546
5183
|
onFocus: (e) => {
|
|
4547
5184
|
u(e), o?.(e);
|
|
4548
5185
|
},
|
|
@@ -4552,14 +5189,17 @@ function rc(t) {
|
|
|
4552
5189
|
});
|
|
4553
5190
|
}
|
|
4554
5191
|
// src/components/ui_provider/french_ui_labels.ts
|
|
4555
|
-
var
|
|
5192
|
+
var ml = {
|
|
4556
5193
|
light: "clair",
|
|
4557
5194
|
dark: "sombre",
|
|
4558
5195
|
system: "système"
|
|
4559
|
-
},
|
|
5196
|
+
}, hl = {
|
|
4560
5197
|
close: "Fermer",
|
|
5198
|
+
enterFullScreen: "Plein écran",
|
|
5199
|
+
exitFullScreen: "Quitter le plein écran",
|
|
4561
5200
|
confirm: "Confirmer",
|
|
4562
5201
|
cancel: "Annuler",
|
|
5202
|
+
collapsePanel: "Replier le panneau",
|
|
4563
5203
|
noResults: "Aucun résultat",
|
|
4564
5204
|
clearSelection: "Effacer la sélection",
|
|
4565
5205
|
search: "Rechercher",
|
|
@@ -4571,19 +5211,19 @@ var ic = {
|
|
|
4571
5211
|
notifications: "Notifications",
|
|
4572
5212
|
closeNotification: "Fermer la notification",
|
|
4573
5213
|
charactersRemaining: (e) => `${e} ${e > 1 ? "caractères restants" : "caractère restant"}`,
|
|
4574
|
-
currentTheme: (e) => `Thème actuel : ${
|
|
5214
|
+
currentTheme: (e) => `Thème actuel : ${ml[e]}`,
|
|
4575
5215
|
overflowCount: (e) => `+${e} ${e > 1 ? "autres" : "autre"}`,
|
|
4576
5216
|
selectedCount: (e) => `${e} ${e > 1 ? "sélectionnés" : "sélectionné"}`,
|
|
4577
5217
|
maxSelectedHint: (e) => `Vous pouvez sélectionner jusqu'à ${e} ${e > 1 ? "éléments" : "élément"}`
|
|
4578
5218
|
};
|
|
4579
5219
|
// src/components/ui_provider/ui_provider.tsx
|
|
4580
|
-
function
|
|
5220
|
+
function gl(e = {}) {
|
|
4581
5221
|
return Object.fromEntries(Object.entries(e).filter(([, e]) => e !== void 0));
|
|
4582
5222
|
}
|
|
4583
|
-
function
|
|
5223
|
+
function _l({ labels: e, announceFieldErrors: t, children: n }) {
|
|
4584
5224
|
let r = p(pe), i = et(), a = v(() => ({
|
|
4585
5225
|
...r,
|
|
4586
|
-
...
|
|
5226
|
+
...gl(e)
|
|
4587
5227
|
}), [r, e]);
|
|
4588
5228
|
return /* @__PURE__ */ w(pe.Provider, {
|
|
4589
5229
|
value: a,
|
|
@@ -4594,15 +5234,15 @@ function sc({ labels: e, announceFieldErrors: t, children: n }) {
|
|
|
4594
5234
|
});
|
|
4595
5235
|
}
|
|
4596
5236
|
// src/hooks/use_is_client/with_client_only.tsx
|
|
4597
|
-
var
|
|
5237
|
+
var vl = (e) => {
|
|
4598
5238
|
function t(t) {
|
|
4599
5239
|
return xt() ? /* @__PURE__ */ w(e, { ...t }) : null;
|
|
4600
5240
|
}
|
|
4601
5241
|
return t;
|
|
4602
|
-
},
|
|
4603
|
-
function
|
|
4604
|
-
let { ref: t, scrollableProps: n, focusClassName: r } =
|
|
4605
|
-
return ut("useKeyboardScrollable", !!e.label?.trim() || !!e.labelledBy?.trim(),
|
|
5242
|
+
}, yl = "a scroll region needs an accessible name. Provide a non-empty `label` or `labelledBy`.";
|
|
5243
|
+
function bl(e) {
|
|
5244
|
+
let { ref: t, scrollableProps: n, focusClassName: r } = qr(e);
|
|
5245
|
+
return ut("useKeyboardScrollable", !!e.label?.trim() || !!e.labelledBy?.trim(), yl), {
|
|
4606
5246
|
scrollableProps: {
|
|
4607
5247
|
ref: t,
|
|
4608
5248
|
...n
|
|
@@ -4611,5 +5251,5 @@ function uc(e) {
|
|
|
4611
5251
|
};
|
|
4612
5252
|
}
|
|
4613
5253
|
// src/stores/theme_store/theme_init_script.ts
|
|
4614
|
-
var
|
|
4615
|
-
export { he as Alert, Ce as AppBar, Ee as Avatar, je as BASE_INPUT_STYLES, Oe as Badge, ze as Button, Ge as Card, Xe as CharacterCount, gt as Checkbox, bt as CheckboxOptions, St as ClientOnly, hn as Combobox,
|
|
5254
|
+
var xl = `(function(){var t=null;try{t=localStorage.getItem(${JSON.stringify(_s)})}catch(e){}var d=t==="dark"||(t!=="light"&&matchMedia("(prefers-color-scheme: dark)").matches);document.documentElement.classList.toggle("dark",d);var m=document.querySelectorAll('meta[name="theme-color"][data-light][data-dark]');for(var i=0;i<m.length;i++){m[i].setAttribute("content",m[i].getAttribute(d?"data-dark":"data-light"))}})()`;
|
|
5255
|
+
export { he as Alert, Ce as AppBar, Ee as Avatar, je as BASE_INPUT_STYLES, Oe as Badge, Ci as BottomSheet, ze as Button, Ge as Card, Xe as CharacterCount, gt as Checkbox, bt as CheckboxOptions, St as ClientOnly, hn as Combobox, pa as ConfirmModal, Fn as ContextMenu, zn as CopyButton, ji as Drawer, hl as FRENCH_UI_LABELS, Un as Highlight, X as IconButton, Pi as Input, Ii as Kbd, zi as Menu, Bi as MenuGroup, ta as MenuItem, na as MenuSeparator, ha as Modal, ga as ModalFooter, va as ModalProvider, Da as MultiCombobox, Na as Popover, Fa as RadioOptions, Ia as Select, to as SidePanel, po as Spinner, so as SplitButton, _o as Switch, xl as THEME_INIT_SCRIPT, yo as TabBar, wo as TabBarLink, ss as Tabs, cs as Textarea, Ns as ThemeToggle, Lc as ToastProvider, Ic as Toaster, pl as Toolbar, J as Tooltip, _l as UIProvider, Ae as buttonClassName, si as dismissTopmostModal, Bn as splitIntoHighlightSegments, Gc as toast, bi as useDisableHotkeysWhileMounted, _a as useDismissGuard, vi as useGlobalHotkeysStore, xt as useIsClient, bl as useKeyboardScrollable, Es as useThemeStore, Xc as useToast, vl as withClientOnly };
|