@minimalstuff/ui 5.6.1 → 5.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +18 -2
- package/dist/minimalstuff-ui.css +1 -1
- package/dist/minimalstuff-ui.js +619 -616
- package/package.json +1 -1
package/dist/minimalstuff-ui.js
CHANGED
|
@@ -101,7 +101,7 @@ function te() {
|
|
|
101
101
|
}, [])
|
|
102
102
|
};
|
|
103
103
|
}
|
|
104
|
-
function
|
|
104
|
+
function ne(e, t, n) {
|
|
105
105
|
m(() => {
|
|
106
106
|
if (!e || !t) return;
|
|
107
107
|
let r = requestAnimationFrame(() => n(!0));
|
|
@@ -113,40 +113,40 @@ function K(e, t, n) {
|
|
|
113
113
|
]);
|
|
114
114
|
}
|
|
115
115
|
// src/lib/merge_refs.ts
|
|
116
|
-
function
|
|
116
|
+
function K(...e) {
|
|
117
117
|
return (t) => {
|
|
118
118
|
for (let n of e) typeof n == "function" ? n(t) : n && (n.current = t);
|
|
119
119
|
};
|
|
120
120
|
}
|
|
121
121
|
// src/components/tooltip/tooltip.tsx
|
|
122
|
-
var
|
|
122
|
+
var re = 8, ie = 8, ae = 100, q = {
|
|
123
123
|
top: "ms-tooltip-enter-top",
|
|
124
124
|
bottom: "ms-tooltip-enter-bottom",
|
|
125
125
|
left: "ms-tooltip-enter-left",
|
|
126
126
|
right: "ms-tooltip-enter-right"
|
|
127
|
-
},
|
|
127
|
+
}, oe = {
|
|
128
128
|
top: "bottom",
|
|
129
129
|
bottom: "top",
|
|
130
130
|
left: "right",
|
|
131
131
|
right: "left"
|
|
132
132
|
};
|
|
133
|
-
function
|
|
134
|
-
let { isMounted: I, isVisible: L, setIsVisible: R, open: B, close: H } = te(), [G,
|
|
133
|
+
function J({ content: o, children: l, position: d = "top", showOnClick: p = !1, temporaryContent: v, temporaryDuration: x = 2e3, disabled: E = !1, radius: D = "lg", unstyled: O = !1, panelClassName: k, onTemporaryShow: A, className: j, describeChild: M, hoverable: N = !1, portalContainer: P, ref: F }) {
|
|
134
|
+
let { isMounted: I, isVisible: L, setIsVisible: R, open: B, close: H } = te(), [G, J] = b(!1), [Y, se] = b(!1), ce = g(), X = y(null), [Z, le] = b(null), [ue, de] = b(null), [fe, pe] = b(null), Q = y(void 0), me = y(void 0), { refs: he, floatingStyles: ge, placement: _e, middlewareData: ve, isPositioned: ye } = s({
|
|
135
135
|
placement: d,
|
|
136
136
|
strategy: "fixed",
|
|
137
137
|
open: I,
|
|
138
138
|
whileElementsMounted: n,
|
|
139
139
|
middleware: [
|
|
140
|
-
i(
|
|
140
|
+
i(re),
|
|
141
141
|
r(),
|
|
142
142
|
a({ padding: 8 }),
|
|
143
143
|
t({ element: X })
|
|
144
144
|
]
|
|
145
145
|
}), be = _e.split("-")[0];
|
|
146
|
-
|
|
146
|
+
ne(I, ye, f((e) => {
|
|
147
147
|
Y && R(e);
|
|
148
148
|
}, [Y, R]));
|
|
149
|
-
let xe = f((e) =>
|
|
149
|
+
let xe = f((e) => K(he.setReference, le, F)(e), [he, F]), Se = f((e) => K(he.setFloating, de)(e), [he]);
|
|
150
150
|
_(() => {
|
|
151
151
|
let e = Z?.firstElementChild;
|
|
152
152
|
pe(ue && e ? V(ue.textContent) === U(e) : null);
|
|
@@ -158,9 +158,9 @@ function oe({ content: o, children: l, position: d = "top", showOnClick: p = !1,
|
|
|
158
158
|
G
|
|
159
159
|
]);
|
|
160
160
|
let Ce = f(() => {
|
|
161
|
-
|
|
161
|
+
J(!1), se(!1), H();
|
|
162
162
|
}, [H]), we = () => {
|
|
163
|
-
!E && v && (
|
|
163
|
+
!E && v && (J(!0), se(!0), B(ye), clearTimeout(Q.current), Q.current = setTimeout(Ce, x), A?.());
|
|
164
164
|
}, Te = () => {
|
|
165
165
|
E || (se(!0), B(ye));
|
|
166
166
|
}, $ = f(() => {
|
|
@@ -168,7 +168,7 @@ function oe({ content: o, children: l, position: d = "top", showOnClick: p = !1,
|
|
|
168
168
|
}, [Ce]), Ee = () => {
|
|
169
169
|
clearTimeout(me.current);
|
|
170
170
|
}, De = () => {
|
|
171
|
-
clearTimeout(me.current), me.current = setTimeout($,
|
|
171
|
+
clearTimeout(me.current), me.current = setTimeout($, ae);
|
|
172
172
|
}, Oe = (e) => {
|
|
173
173
|
e.target.matches(":focus-visible") && Te();
|
|
174
174
|
}, ke = (e) => {
|
|
@@ -202,7 +202,7 @@ function oe({ content: o, children: l, position: d = "top", showOnClick: p = !1,
|
|
|
202
202
|
p && v && we(), u(l) && l.props.onClick?.(e);
|
|
203
203
|
},
|
|
204
204
|
"aria-describedby": W(u(l) ? l.props["aria-describedby"] : void 0, Ne && (M ?? (fe !== null && !fe)) && ce)
|
|
205
|
-
}, Ie = u(l) ? c(l, Fe) : l, Le = ve.arrow?.x, Re = ve.arrow?.y, ze =
|
|
205
|
+
}, Ie = u(l) ? c(l, Fe) : l, Le = ve.arrow?.x, Re = ve.arrow?.y, ze = oe[be];
|
|
206
206
|
return /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ T("span", {
|
|
207
207
|
ref: xe,
|
|
208
208
|
className: e("inline-flex", j),
|
|
@@ -230,18 +230,18 @@ function oe({ content: o, children: l, position: d = "top", showOnClick: p = !1,
|
|
|
230
230
|
"text-white dark:text-gray-900 bg-gray-900 dark:bg-gray-100 shadow-lg",
|
|
231
231
|
"transition-[opacity,transform] duration-150 ease-out",
|
|
232
232
|
L ? "opacity-100" : "opacity-0",
|
|
233
|
-
|
|
233
|
+
q[be],
|
|
234
234
|
z[D]
|
|
235
235
|
], k),
|
|
236
236
|
children: [Pe, !O && /* @__PURE__ */ w("div", {
|
|
237
237
|
ref: X,
|
|
238
238
|
style: {
|
|
239
239
|
position: "absolute",
|
|
240
|
-
width: `${
|
|
241
|
-
height: `${
|
|
240
|
+
width: `${ie}px`,
|
|
241
|
+
height: `${ie}px`,
|
|
242
242
|
left: Le === void 0 ? void 0 : `${Le}px`,
|
|
243
243
|
top: Re === void 0 ? void 0 : `${Re}px`,
|
|
244
|
-
[ze]: `-${
|
|
244
|
+
[ze]: `-${ie / 2}px`
|
|
245
245
|
},
|
|
246
246
|
className: "rotate-45 bg-gray-900 dark:bg-gray-100"
|
|
247
247
|
})]
|
|
@@ -282,7 +282,7 @@ function X(t) {
|
|
|
282
282
|
});
|
|
283
283
|
if (!g) return _;
|
|
284
284
|
let v = g.content !== void 0;
|
|
285
|
-
return /* @__PURE__ */ w(
|
|
285
|
+
return /* @__PURE__ */ w(J, {
|
|
286
286
|
content: v ? g.content : r,
|
|
287
287
|
position: g.position,
|
|
288
288
|
describeChild: v ? void 0 : !1,
|
|
@@ -784,7 +784,7 @@ function pt({ htmlFor: e, className: t, children: n }) {
|
|
|
784
784
|
function mt({ label: t, indeterminate: n = !1, description: r, error: i, radius: a = "sm", unstyled: o = !1, fullWidth: s = !1, variant: c = "inline", className: l, wrapperClassName: u, checked: d, defaultChecked: f = !1, onChange: p, id: h, "aria-describedby": g, "aria-label": _, "aria-labelledby": b, ref: x, ...S }) {
|
|
785
785
|
let { fieldId: C, errorId: E, descriptionId: D } = it(h), [O, k] = rt(d, f), A = y(null), j = c === "card", M = !!t, N = O || n, P = W(g, !!r && D, i && E);
|
|
786
786
|
lt("Checkbox", A, !!t || !!_?.trim() || !!b?.trim());
|
|
787
|
-
let F = v(() =>
|
|
787
|
+
let F = v(() => K(A, x), [x]);
|
|
788
788
|
m(() => {
|
|
789
789
|
A.current && (A.current.indeterminate = n);
|
|
790
790
|
});
|
|
@@ -1275,7 +1275,7 @@ function Qt() {
|
|
|
1275
1275
|
}, []), e;
|
|
1276
1276
|
}
|
|
1277
1277
|
function $t({ ref: t, id: n, options: r, activeIndex: i, noResultsText: a, isWindowed: o = !1, labelOverflow: s = "wrap", initialVisibleIndex: c, "aria-label": l, "aria-labelledby": u, "aria-multiselectable": d, getOptionState: f, renderOptionContent: p, onOptionClick: m }) {
|
|
1278
|
-
let h = r.length === 0, g = Qt(), _ = y(null), b = v(() =>
|
|
1278
|
+
let h = r.length === 0, g = Qt(), _ = y(null), b = v(() => K(t, _), [t]), { startIndex: x, endIndex: S, metrics: E, refreshWindow: D } = Gt({
|
|
1279
1279
|
listboxRef: _,
|
|
1280
1280
|
optionCount: r.length,
|
|
1281
1281
|
activeIndex: i,
|
|
@@ -1418,22 +1418,22 @@ function fn(e) {
|
|
|
1418
1418
|
return e.label;
|
|
1419
1419
|
}
|
|
1420
1420
|
function pn({ options: t, filterOption: n, label: r, description: i, "aria-label": a, error: o, placeholder: s, noResultsText: c, clearLabel: l, radius: u = "md", unstyled: d = !1, disabled: f = !1, required: p = !1, className: m, wrapperClassName: h, dropdownClassName: g, optionLabelOverflow: _ = "wrap", value: x, defaultValue: S = "", onChange: C, id: E }) {
|
|
1421
|
-
let D = Q(), { fieldId: O, errorId: k, descriptionId: A, labelId: j } = it(E), M = `${O}-listbox`, N = y(null), P = y(null), [I, L] = rt(x, S), R = t.find((e) => e.value === I), [B, V] = b(""), [H, U] = b(!1), [G, ee] = b(!1), te = dn(G),
|
|
1421
|
+
let D = Q(), { fieldId: O, errorId: k, descriptionId: A, labelId: j } = it(E), M = `${O}-listbox`, N = y(null), P = y(null), [I, L] = rt(x, S), R = t.find((e) => e.value === I), [B, V] = b(""), [H, U] = b(!1), [G, ee] = b(!1), te = dn(G), ne = v(() => n ? [] : t.map((e) => e.label.toLowerCase()), [t, n]), K = v(() => {
|
|
1422
1422
|
if (!H) return t;
|
|
1423
1423
|
if (n) return t.filter((e) => n(e, B));
|
|
1424
1424
|
let e = B.toLowerCase();
|
|
1425
|
-
return t.filter((t, n) =>
|
|
1425
|
+
return t.filter((t, n) => ne[n].includes(e));
|
|
1426
1426
|
}, [
|
|
1427
1427
|
t,
|
|
1428
1428
|
n,
|
|
1429
|
-
|
|
1429
|
+
ne,
|
|
1430
1430
|
H,
|
|
1431
1431
|
B
|
|
1432
|
-
]), { activeIndex:
|
|
1433
|
-
optionCount:
|
|
1432
|
+
]), { activeIndex: re, activeOptionId: ie, move: ae, moveWithinBounds: q, first: oe, last: J, reset: Y } = rn({
|
|
1433
|
+
optionCount: K.length,
|
|
1434
1434
|
getOptionId: (e) => Ct(M, e),
|
|
1435
1435
|
isOpen: G
|
|
1436
|
-
}), se = _ !== "wrap" && kt(t.length), ce =
|
|
1436
|
+
}), se = _ !== "wrap" && kt(t.length), ce = K.findIndex((e) => e.value === I), X = G ? B : R?.label ?? "", Z = () => {
|
|
1437
1437
|
f || (V(R?.label ?? ""), U(!1), ee(!0), Y());
|
|
1438
1438
|
}, le = () => {
|
|
1439
1439
|
ee(!1), U(!1), Y();
|
|
@@ -1442,21 +1442,21 @@ function pn({ options: t, filterOption: n, label: r, description: i, "aria-label
|
|
|
1442
1442
|
}, de = () => {
|
|
1443
1443
|
L(""), C?.(""), V(""), N.current?.focus();
|
|
1444
1444
|
}, fe = (e) => {
|
|
1445
|
-
V(e.target.value), U(!0), ee(!0),
|
|
1445
|
+
V(e.target.value), U(!0), ee(!0), oe();
|
|
1446
1446
|
}, pe = () => {
|
|
1447
1447
|
G || Z();
|
|
1448
1448
|
}, me = (e) => {
|
|
1449
|
-
e.preventDefault(), e.altKey ? G || Z() : G ?
|
|
1449
|
+
e.preventDefault(), e.altKey ? G || Z() : G ? ae(1) : (Z(), oe());
|
|
1450
1450
|
}, he = (e) => {
|
|
1451
|
-
e.preventDefault(), e.altKey ? G && le() : G ?
|
|
1451
|
+
e.preventDefault(), e.altKey ? G && le() : G ? ae(-1) : (Z(), J());
|
|
1452
1452
|
}, ge = (e) => {
|
|
1453
1453
|
if (!G) return;
|
|
1454
|
-
let t =
|
|
1454
|
+
let t = K[re];
|
|
1455
1455
|
t ? (e.preventDefault(), ue(t)) : le();
|
|
1456
1456
|
}, _e = (e) => {
|
|
1457
1457
|
G && (e.preventDefault(), le());
|
|
1458
1458
|
}, ve = (e, t) => {
|
|
1459
|
-
G && !St(e) && (e.preventDefault(),
|
|
1459
|
+
G && !St(e) && (e.preventDefault(), q(t * Rt(P.current, re)));
|
|
1460
1460
|
}, ye = (e) => {
|
|
1461
1461
|
let t = e.value === I;
|
|
1462
1462
|
return {
|
|
@@ -1505,7 +1505,7 @@ function pn({ options: t, filterOption: n, label: r, description: i, "aria-label
|
|
|
1505
1505
|
"aria-autocomplete": "list",
|
|
1506
1506
|
"aria-label": a,
|
|
1507
1507
|
"aria-labelledby": en(r, j, a),
|
|
1508
|
-
"aria-activedescendant":
|
|
1508
|
+
"aria-activedescendant": ie,
|
|
1509
1509
|
"aria-invalid": !!o,
|
|
1510
1510
|
"aria-required": p || void 0,
|
|
1511
1511
|
"aria-describedby": W(!!i && A, o && k),
|
|
@@ -1539,8 +1539,8 @@ function pn({ options: t, filterOption: n, label: r, description: i, "aria-label
|
|
|
1539
1539
|
children: /* @__PURE__ */ w($t, {
|
|
1540
1540
|
ref: P,
|
|
1541
1541
|
id: M,
|
|
1542
|
-
options:
|
|
1543
|
-
activeIndex:
|
|
1542
|
+
options: K,
|
|
1543
|
+
activeIndex: re,
|
|
1544
1544
|
isWindowed: se,
|
|
1545
1545
|
labelOverflow: _,
|
|
1546
1546
|
initialVisibleIndex: ce,
|
|
@@ -1699,8 +1699,8 @@ function Nn({ children: e, items: t, radius: o = "md", unstyled: c = !1, panelCl
|
|
|
1699
1699
|
kn()
|
|
1700
1700
|
]
|
|
1701
1701
|
});
|
|
1702
|
-
|
|
1703
|
-
let k = f((e) =>
|
|
1702
|
+
ne(_, O, x);
|
|
1703
|
+
let k = f((e) => K(g, d)(e), [d]), A = f(() => {
|
|
1704
1704
|
C(), m.current?.focus({ preventScroll: !0 });
|
|
1705
1705
|
}, [C]);
|
|
1706
1706
|
return /* @__PURE__ */ T("div", {
|
|
@@ -1813,9 +1813,12 @@ var Hn = {
|
|
|
1813
1813
|
right: "right-0",
|
|
1814
1814
|
left: "left-0"
|
|
1815
1815
|
}, Wn = {
|
|
1816
|
+
right: "pt-[env(safe-area-inset-top)] pb-[env(safe-area-inset-bottom)] pr-[env(safe-area-inset-right)]",
|
|
1817
|
+
left: "pt-[env(safe-area-inset-top)] pb-[env(safe-area-inset-bottom)] pl-[env(safe-area-inset-left)]"
|
|
1818
|
+
}, Gn = {
|
|
1816
1819
|
right: "ms-drawer-offscreen-right",
|
|
1817
1820
|
left: "ms-drawer-offscreen-left"
|
|
1818
|
-
},
|
|
1821
|
+
}, Kn = {
|
|
1819
1822
|
right: {
|
|
1820
1823
|
none: "rounded-l-none",
|
|
1821
1824
|
sm: "rounded-l-sm",
|
|
@@ -1832,9 +1835,9 @@ var Hn = {
|
|
|
1832
1835
|
xl: "rounded-r-xl",
|
|
1833
1836
|
full: "rounded-r-lg"
|
|
1834
1837
|
}
|
|
1835
|
-
},
|
|
1838
|
+
}, qn = l(null);
|
|
1836
1839
|
// src/components/modal/modal_footer_slot.tsx
|
|
1837
|
-
function
|
|
1840
|
+
function Jn({ onSlotChange: t, children: n, unstyled: r = !1 }) {
|
|
1838
1841
|
return /* @__PURE__ */ w("div", {
|
|
1839
1842
|
ref: t,
|
|
1840
1843
|
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"]),
|
|
@@ -1842,9 +1845,9 @@ function qn({ onSlotChange: t, children: n, unstyled: r = !1 }) {
|
|
|
1842
1845
|
});
|
|
1843
1846
|
}
|
|
1844
1847
|
// src/components/modal/modal_footer_slot_context.ts
|
|
1845
|
-
var
|
|
1848
|
+
var Yn = l(null);
|
|
1846
1849
|
// src/components/modal/modal_header.tsx
|
|
1847
|
-
function
|
|
1850
|
+
function Xn({ titleId: t, title: n, onDismiss: r, dismissible: i, closeLabel: a, unstyled: o = !1 }) {
|
|
1848
1851
|
let s = Q(), c = a ?? s.close;
|
|
1849
1852
|
return /* @__PURE__ */ T("div", {
|
|
1850
1853
|
className: e("flex items-center justify-between flex-shrink-0", !o && "gap-4 px-6 pt-5 pb-4"),
|
|
@@ -1874,14 +1877,14 @@ function Yn({ titleId: t, title: n, onDismiss: r, dismissible: i, closeLabel: a,
|
|
|
1874
1877
|
});
|
|
1875
1878
|
}
|
|
1876
1879
|
// src/components/modal/use_guarded_dismiss.ts
|
|
1877
|
-
function
|
|
1880
|
+
function Zn(e) {
|
|
1878
1881
|
try {
|
|
1879
1882
|
return e();
|
|
1880
1883
|
} catch (e) {
|
|
1881
1884
|
return Pn(e), null;
|
|
1882
1885
|
}
|
|
1883
1886
|
}
|
|
1884
|
-
function
|
|
1887
|
+
function Qn({ onDismiss: e, isEnded: t }) {
|
|
1885
1888
|
let n = y(e), r = y(t), i = y([]), a = y(!1);
|
|
1886
1889
|
_(() => {
|
|
1887
1890
|
n.current = e, r.current = t;
|
|
@@ -1903,36 +1906,36 @@ function Zn({ onDismiss: e, isEnded: t }) {
|
|
|
1903
1906
|
n.current();
|
|
1904
1907
|
return;
|
|
1905
1908
|
}
|
|
1906
|
-
let t =
|
|
1909
|
+
let t = Zn(e.current);
|
|
1907
1910
|
t !== null && (typeof t == "boolean" ? t && n.current() : s(t));
|
|
1908
1911
|
}, [s]),
|
|
1909
1912
|
registry: o
|
|
1910
1913
|
};
|
|
1911
1914
|
}
|
|
1912
1915
|
// src/components/modal/keyboard_scroll_region_attribute.ts
|
|
1913
|
-
var
|
|
1914
|
-
function er(e) {
|
|
1915
|
-
return e.matches(":disabled");
|
|
1916
|
-
}
|
|
1916
|
+
var $n = "data-keyboard-scroll-region", er = "a[href], button, input, select, textarea, summary, audio[controls], video[controls], [contenteditable]:not([contenteditable=\"false\"]), [tabindex]";
|
|
1917
1917
|
function tr(e) {
|
|
1918
|
-
return e.
|
|
1918
|
+
return e.matches(":disabled");
|
|
1919
1919
|
}
|
|
1920
1920
|
function nr(e) {
|
|
1921
|
-
return e.
|
|
1921
|
+
return e.getAttribute("tabindex") === "-1";
|
|
1922
1922
|
}
|
|
1923
1923
|
function rr(e) {
|
|
1924
|
-
return e.
|
|
1924
|
+
return e.matches("input[type=\"hidden\"]");
|
|
1925
1925
|
}
|
|
1926
1926
|
function ir(e) {
|
|
1927
|
-
return
|
|
1927
|
+
return e.closest("[inert]") !== null;
|
|
1928
1928
|
}
|
|
1929
1929
|
function ar(e) {
|
|
1930
|
-
return
|
|
1930
|
+
return typeof e.checkVisibility != "function" || e.checkVisibility();
|
|
1931
1931
|
}
|
|
1932
1932
|
function or(e) {
|
|
1933
|
-
return e
|
|
1933
|
+
return !tr(e) && !nr(e) && !rr(e) && !ir(e) && ar(e);
|
|
1934
1934
|
}
|
|
1935
1935
|
function sr(e) {
|
|
1936
|
+
return e instanceof HTMLInputElement && e.type === "radio" && e.name !== "";
|
|
1937
|
+
}
|
|
1938
|
+
function cr(e) {
|
|
1936
1939
|
let t = /* @__PURE__ */ new Map();
|
|
1937
1940
|
for (let n of e) {
|
|
1938
1941
|
let e = t.get(n.form) ?? /* @__PURE__ */ new Map();
|
|
@@ -1942,19 +1945,19 @@ function sr(e) {
|
|
|
1942
1945
|
}
|
|
1943
1946
|
return Array.from(t.values()).flatMap((e) => Array.from(e.values()));
|
|
1944
1947
|
}
|
|
1945
|
-
function
|
|
1948
|
+
function lr(e) {
|
|
1946
1949
|
return e.find((e) => e.checked) ?? e[0];
|
|
1947
1950
|
}
|
|
1948
|
-
function
|
|
1949
|
-
let t = Array.from(e.querySelectorAll(
|
|
1950
|
-
return t.filter((e) => !
|
|
1951
|
+
function ur(e) {
|
|
1952
|
+
let t = Array.from(e.querySelectorAll(er)).filter(or), n = t.filter(sr), r = new Set(cr(n).map(lr));
|
|
1953
|
+
return t.filter((e) => !sr(e) || r.has(e));
|
|
1951
1954
|
}
|
|
1952
1955
|
// src/components/modal/use_keyboard_scroll_region.ts
|
|
1953
|
-
var
|
|
1954
|
-
function
|
|
1955
|
-
return e.scrollHeight > e.clientHeight &&
|
|
1956
|
+
var dr = {};
|
|
1957
|
+
function fr(e) {
|
|
1958
|
+
return e.scrollHeight > e.clientHeight && ur(e).length === 0;
|
|
1956
1959
|
}
|
|
1957
|
-
var
|
|
1960
|
+
var pr = [
|
|
1958
1961
|
"disabled",
|
|
1959
1962
|
"tabindex",
|
|
1960
1963
|
"hidden",
|
|
@@ -1962,39 +1965,39 @@ var fr = [
|
|
|
1962
1965
|
"href",
|
|
1963
1966
|
"contenteditable"
|
|
1964
1967
|
];
|
|
1965
|
-
function
|
|
1968
|
+
function mr(e, t) {
|
|
1966
1969
|
e.disconnect(), e.observe(t);
|
|
1967
1970
|
for (let n of t.children) e.observe(n);
|
|
1968
1971
|
}
|
|
1969
|
-
function
|
|
1972
|
+
function hr(e, t) {
|
|
1970
1973
|
let n = typeof ResizeObserver > "u" ? void 0 : new ResizeObserver(t), r = new MutationObserver(() => {
|
|
1971
|
-
t(), n &&
|
|
1974
|
+
t(), n && mr(n, e);
|
|
1972
1975
|
});
|
|
1973
1976
|
return r.observe(e, {
|
|
1974
1977
|
childList: !0,
|
|
1975
1978
|
subtree: !0,
|
|
1976
1979
|
attributes: !0,
|
|
1977
|
-
attributeFilter:
|
|
1978
|
-
}), n &&
|
|
1980
|
+
attributeFilter: pr
|
|
1981
|
+
}), n && mr(n, e), () => {
|
|
1979
1982
|
r.disconnect(), n?.disconnect();
|
|
1980
1983
|
};
|
|
1981
1984
|
}
|
|
1982
|
-
function
|
|
1985
|
+
function gr({ labelledBy: e, label: t }) {
|
|
1983
1986
|
let [n, r] = b(null), [i, a] = b(null);
|
|
1984
1987
|
return m(() => {
|
|
1985
1988
|
if (!n) return;
|
|
1986
|
-
let e = () => a(
|
|
1987
|
-
return e(),
|
|
1989
|
+
let e = () => a(fr(n) ? n : null);
|
|
1990
|
+
return e(), hr(n, e);
|
|
1988
1991
|
}, [n]), n === null || i !== n || !(e || t) ? {
|
|
1989
1992
|
ref: r,
|
|
1990
|
-
scrollableProps:
|
|
1993
|
+
scrollableProps: dr,
|
|
1991
1994
|
focusClassName: void 0
|
|
1992
1995
|
} : {
|
|
1993
1996
|
ref: r,
|
|
1994
1997
|
scrollableProps: {
|
|
1995
1998
|
tabIndex: 0,
|
|
1996
1999
|
role: "region",
|
|
1997
|
-
[
|
|
2000
|
+
[$n]: !0,
|
|
1998
2001
|
"aria-labelledby": e,
|
|
1999
2002
|
"aria-label": e ? void 0 : t
|
|
2000
2003
|
},
|
|
@@ -2002,74 +2005,74 @@ function hr({ labelledBy: e, label: t }) {
|
|
|
2002
2005
|
};
|
|
2003
2006
|
}
|
|
2004
2007
|
// src/components/modal/body_scroll_lock.ts
|
|
2005
|
-
var
|
|
2006
|
-
function
|
|
2008
|
+
var _r = "--scrollbar-compensation", vr = 0, yr;
|
|
2009
|
+
function br() {
|
|
2007
2010
|
let { style: e } = document.documentElement;
|
|
2008
2011
|
return {
|
|
2009
2012
|
overflow: e.overflow,
|
|
2010
2013
|
overflowX: e.overflowX,
|
|
2011
2014
|
overflowY: e.overflowY,
|
|
2012
2015
|
paddingRight: e.paddingRight,
|
|
2013
|
-
scrollbarCompensation: e.getPropertyValue(
|
|
2016
|
+
scrollbarCompensation: e.getPropertyValue(_r)
|
|
2014
2017
|
};
|
|
2015
2018
|
}
|
|
2016
|
-
function
|
|
2019
|
+
function xr(e) {
|
|
2017
2020
|
let { style: t } = document.documentElement;
|
|
2018
|
-
t.overflow = e.overflow, t.overflowX = e.overflowX, t.overflowY = e.overflowY, t.paddingRight = e.paddingRight, e.scrollbarCompensation === "" ? t.removeProperty(
|
|
2021
|
+
t.overflow = e.overflow, t.overflowX = e.overflowX, t.overflowY = e.overflowY, t.paddingRight = e.paddingRight, e.scrollbarCompensation === "" ? t.removeProperty(_r) : t.setProperty(_r, e.scrollbarCompensation);
|
|
2019
2022
|
}
|
|
2020
|
-
function
|
|
2023
|
+
function Sr(e, t) {
|
|
2021
2024
|
let { style: n } = document.documentElement;
|
|
2022
|
-
n.paddingRight = `${t + e}px`, n.setProperty(
|
|
2025
|
+
n.paddingRight = `${t + e}px`, n.setProperty(_r, `${e}px`);
|
|
2023
2026
|
}
|
|
2024
|
-
function
|
|
2025
|
-
if (
|
|
2027
|
+
function Cr() {
|
|
2028
|
+
if (vr === 0) {
|
|
2026
2029
|
let e = document.documentElement;
|
|
2027
|
-
|
|
2030
|
+
yr = br();
|
|
2028
2031
|
let t = Number.parseFloat(getComputedStyle(e).paddingRight) || 0, n = e.clientWidth;
|
|
2029
2032
|
e.style.overflow = "hidden";
|
|
2030
2033
|
let r = e.clientWidth - n;
|
|
2031
|
-
r > 0 &&
|
|
2034
|
+
r > 0 && Sr(r, t);
|
|
2032
2035
|
}
|
|
2033
|
-
|
|
2034
|
-
}
|
|
2035
|
-
function Cr() {
|
|
2036
|
-
--_r, _r === 0 && vr && (br(vr), vr = void 0);
|
|
2036
|
+
vr += 1;
|
|
2037
2037
|
}
|
|
2038
2038
|
function wr() {
|
|
2039
|
-
|
|
2039
|
+
--vr, vr === 0 && yr && (xr(yr), yr = void 0);
|
|
2040
|
+
}
|
|
2041
|
+
function Tr() {
|
|
2042
|
+
m(() => (Cr(), wr), []);
|
|
2040
2043
|
}
|
|
2041
2044
|
// src/components/modal/modal_stack.ts
|
|
2042
|
-
var
|
|
2043
|
-
function
|
|
2044
|
-
return
|
|
2045
|
+
var Er = [];
|
|
2046
|
+
function Dr(e, t) {
|
|
2047
|
+
return Er.push({
|
|
2045
2048
|
token: e,
|
|
2046
2049
|
requestDismiss: t
|
|
2047
2050
|
}), () => {
|
|
2048
|
-
let t =
|
|
2049
|
-
t !== -1 &&
|
|
2051
|
+
let t = Er.findIndex((t) => t.token === e);
|
|
2052
|
+
t !== -1 && Er.splice(t, 1);
|
|
2050
2053
|
};
|
|
2051
2054
|
}
|
|
2052
|
-
function
|
|
2053
|
-
return
|
|
2055
|
+
function Or(e) {
|
|
2056
|
+
return Er.at(-1)?.token === e;
|
|
2054
2057
|
}
|
|
2055
|
-
function
|
|
2056
|
-
let e =
|
|
2058
|
+
function kr() {
|
|
2059
|
+
let e = Er.at(-1);
|
|
2057
2060
|
return e ? (e.requestDismiss(), !0) : !1;
|
|
2058
2061
|
}
|
|
2059
2062
|
// src/components/modal/use_modal_dialog.ts
|
|
2060
|
-
function
|
|
2061
|
-
return
|
|
2063
|
+
function Ar(e) {
|
|
2064
|
+
return ur(e).filter((e) => !e.hasAttribute($n));
|
|
2062
2065
|
}
|
|
2063
|
-
function
|
|
2064
|
-
let r = t ?
|
|
2065
|
-
return r || n === "content" ? r : e ?
|
|
2066
|
+
function jr({ dialog: e, content: t, fallbackScope: n }) {
|
|
2067
|
+
let r = t ? Ar(t)[0] : void 0;
|
|
2068
|
+
return r || n === "content" ? r : e ? Ar(e)[0] : void 0;
|
|
2066
2069
|
}
|
|
2067
|
-
function
|
|
2068
|
-
let t =
|
|
2070
|
+
function Mr(e) {
|
|
2071
|
+
let t = jr(e);
|
|
2069
2072
|
(e.initialFocusRef?.current ?? t ?? e.dialog)?.focus();
|
|
2070
2073
|
}
|
|
2071
|
-
function
|
|
2072
|
-
let n =
|
|
2074
|
+
function Nr(e, t) {
|
|
2075
|
+
let n = ur(t);
|
|
2073
2076
|
if (n.length === 0) {
|
|
2074
2077
|
e.preventDefault(), t.focus();
|
|
2075
2078
|
return;
|
|
@@ -2077,10 +2080,10 @@ function Mr(e, t) {
|
|
|
2077
2080
|
let r = n[0], i = n[n.length - 1], a = document.activeElement;
|
|
2078
2081
|
(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());
|
|
2079
2082
|
}
|
|
2080
|
-
function
|
|
2083
|
+
function Pr() {
|
|
2081
2084
|
return typeof document > "u" ? null : document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
2082
2085
|
}
|
|
2083
|
-
function
|
|
2086
|
+
function Fr() {
|
|
2084
2087
|
let [e, t] = b(!1);
|
|
2085
2088
|
return m(() => {
|
|
2086
2089
|
let e = requestAnimationFrame(() => {
|
|
@@ -2089,15 +2092,15 @@ function Pr() {
|
|
|
2089
2092
|
return () => cancelAnimationFrame(e);
|
|
2090
2093
|
}, []), e;
|
|
2091
2094
|
}
|
|
2092
|
-
function
|
|
2095
|
+
function Ir(e, { isEnded: t, modalToken: n }) {
|
|
2093
2096
|
m(() => {
|
|
2094
2097
|
if (t) return;
|
|
2095
2098
|
let r = (t) => {
|
|
2096
|
-
if (
|
|
2099
|
+
if (Or(n)) {
|
|
2097
2100
|
if (t.key === "Escape") {
|
|
2098
2101
|
if (t.defaultPrevented) return;
|
|
2099
|
-
t.preventDefault(),
|
|
2100
|
-
} else t.key === "Tab" && e.current &&
|
|
2102
|
+
t.preventDefault(), kr();
|
|
2103
|
+
} else t.key === "Tab" && e.current && Nr(t, e.current);
|
|
2101
2104
|
}
|
|
2102
2105
|
};
|
|
2103
2106
|
return document.addEventListener("keydown", r), () => document.removeEventListener("keydown", r);
|
|
@@ -2107,18 +2110,18 @@ function Fr(e, { isEnded: t, modalToken: n }) {
|
|
|
2107
2110
|
e
|
|
2108
2111
|
]);
|
|
2109
2112
|
}
|
|
2110
|
-
function
|
|
2111
|
-
let [o] = b(() => Symbol("modal")), [s, c] = b(null), l = y(null), u = y(null), [d] = b(
|
|
2113
|
+
function Lr({ isEnded: e, onDismiss: t, dismissible: n, initialFocusRef: r, initialFocusFallbackScope: i = "dialog", getFocusFallback: a }) {
|
|
2114
|
+
let [o] = b(() => Symbol("modal")), [s, c] = b(null), l = y(null), u = y(null), [d] = b(Pr), f = y(() => {});
|
|
2112
2115
|
_(() => {
|
|
2113
2116
|
f.current = () => {
|
|
2114
2117
|
n && t();
|
|
2115
2118
|
};
|
|
2116
2119
|
}), m(() => {
|
|
2117
|
-
if (!e) return
|
|
2118
|
-
}, [e, o]),
|
|
2119
|
-
let p =
|
|
2120
|
+
if (!e) return Dr(o, () => f.current());
|
|
2121
|
+
}, [e, o]), Tr();
|
|
2122
|
+
let p = Fr();
|
|
2120
2123
|
return m(() => {
|
|
2121
|
-
s && !e &&
|
|
2124
|
+
s && !e && Mr({
|
|
2122
2125
|
dialog: l.current,
|
|
2123
2126
|
content: u.current,
|
|
2124
2127
|
initialFocusRef: r,
|
|
@@ -2130,7 +2133,7 @@ function Ir({ isEnded: e, onDismiss: t, dismissible: n, initialFocusRef: r, init
|
|
|
2130
2133
|
e,
|
|
2131
2134
|
d,
|
|
2132
2135
|
a
|
|
2133
|
-
]),
|
|
2136
|
+
]), Ir(l, {
|
|
2134
2137
|
isEnded: e,
|
|
2135
2138
|
modalToken: o
|
|
2136
2139
|
}), {
|
|
@@ -2149,7 +2152,7 @@ function Ir({ isEnded: e, onDismiss: t, dismissible: n, initialFocusRef: r, init
|
|
|
2149
2152
|
};
|
|
2150
2153
|
}
|
|
2151
2154
|
// src/components/toast/toast_announcer_slot.tsx
|
|
2152
|
-
var
|
|
2155
|
+
var Rr = () => /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w("div", {
|
|
2153
2156
|
role: "status",
|
|
2154
2157
|
className: "sr-only",
|
|
2155
2158
|
"data-ms-toast-announcer": "polite"
|
|
@@ -2157,34 +2160,34 @@ var Lr = () => /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w("div", {
|
|
|
2157
2160
|
role: "alert",
|
|
2158
2161
|
className: "sr-only",
|
|
2159
2162
|
"data-ms-toast-announcer": "assertive"
|
|
2160
|
-
})] }),
|
|
2163
|
+
})] }), zr = E((e) => ({
|
|
2161
2164
|
globalHotkeysEnabled: !0,
|
|
2162
2165
|
setGlobalHotkeysEnabled: (t) => e({ globalHotkeysEnabled: t })
|
|
2163
|
-
})),
|
|
2164
|
-
function
|
|
2165
|
-
m(() => (
|
|
2166
|
-
--
|
|
2166
|
+
})), Br = 0;
|
|
2167
|
+
function Vr() {
|
|
2168
|
+
m(() => (Br += 1, Br === 1 && zr.getState().setGlobalHotkeysEnabled(!1), () => {
|
|
2169
|
+
--Br, Br === 0 && zr.getState().setGlobalHotkeysEnabled(!0);
|
|
2167
2170
|
}), []);
|
|
2168
2171
|
}
|
|
2169
2172
|
// src/components/drawer/drawer.tsx
|
|
2170
|
-
function
|
|
2173
|
+
function Hr() {
|
|
2171
2174
|
let e = document.querySelector("main");
|
|
2172
2175
|
return e && !e.hasAttribute("tabindex") && (e.tabIndex = -1), e;
|
|
2173
2176
|
}
|
|
2174
|
-
function
|
|
2175
|
-
|
|
2176
|
-
let _ = g(), { dismiss: y, registry: b } =
|
|
2177
|
+
function Ur({ 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 }) {
|
|
2178
|
+
Vr();
|
|
2179
|
+
let _ = g(), { dismiss: y, registry: b } = Qn({
|
|
2177
2180
|
onDismiss: n,
|
|
2178
2181
|
isEnded: t
|
|
2179
|
-
}), { dialogRef: x, contentRef: C, footerSlot: E, setFooterSlot: D, isVisible: O, handleBackdropClick: k, handleBackdropMouseDown: A } =
|
|
2182
|
+
}), { dialogRef: x, contentRef: C, footerSlot: E, setFooterSlot: D, isVisible: O, handleBackdropClick: k, handleBackdropMouseDown: A } = Lr({
|
|
2180
2183
|
isEnded: t,
|
|
2181
2184
|
onDismiss: y,
|
|
2182
2185
|
dismissible: p,
|
|
2183
2186
|
initialFocusRef: h,
|
|
2184
2187
|
initialFocusFallbackScope: "content",
|
|
2185
|
-
getFocusFallback:
|
|
2186
|
-
}), { ref: j, scrollableProps: M, focusClassName: N } =
|
|
2187
|
-
return /* @__PURE__ */ w(
|
|
2188
|
+
getFocusFallback: Hr
|
|
2189
|
+
}), { ref: j, scrollableProps: M, focusClassName: N } = gr({ labelledBy: _ }), P = v(() => K(C, j), [C, j]);
|
|
2190
|
+
return /* @__PURE__ */ w(qn.Provider, {
|
|
2188
2191
|
value: b,
|
|
2189
2192
|
children: S(/* @__PURE__ */ T("div", {
|
|
2190
2193
|
className: e("fixed inset-0 z-50", !f && "transition-opacity duration-200 ease-out", O ? "opacity-100" : "opacity-0"),
|
|
@@ -2201,17 +2204,17 @@ function Hr({ isEnded: t, onDismiss: n, title: r, children: i, footer: a, size:
|
|
|
2201
2204
|
tabIndex: -1,
|
|
2202
2205
|
"data-state": O ? "open" : "closed",
|
|
2203
2206
|
inert: t,
|
|
2204
|
-
className: e("fixed inset-y-0 h-full flex flex-col overflow-hidden", Un[s], Hn[o], "focus:outline-none", !f && [
|
|
2207
|
+
className: e("fixed inset-y-0 h-full flex flex-col overflow-hidden", Un[s], Wn[s], Hn[o], "focus:outline-none", !f && [
|
|
2205
2208
|
"bg-white dark:bg-gray-900",
|
|
2206
2209
|
"[&,&_*]:[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]",
|
|
2207
2210
|
"shadow-2xl",
|
|
2208
|
-
|
|
2211
|
+
Kn[s][c],
|
|
2209
2212
|
"ms-drawer-transition"
|
|
2210
|
-
], !O &&
|
|
2213
|
+
], !O && Gn[s], u),
|
|
2211
2214
|
onClick: (e) => e.stopPropagation(),
|
|
2212
2215
|
children: [
|
|
2213
|
-
/* @__PURE__ */ w(
|
|
2214
|
-
/* @__PURE__ */ w(
|
|
2216
|
+
/* @__PURE__ */ w(Rr, {}),
|
|
2217
|
+
/* @__PURE__ */ w(Xn, {
|
|
2215
2218
|
titleId: _,
|
|
2216
2219
|
title: r,
|
|
2217
2220
|
onDismiss: y,
|
|
@@ -2223,12 +2226,12 @@ function Hr({ isEnded: t, onDismiss: n, title: r, children: i, footer: a, size:
|
|
|
2223
2226
|
ref: P,
|
|
2224
2227
|
...M,
|
|
2225
2228
|
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),
|
|
2226
|
-
children: /* @__PURE__ */ w(
|
|
2229
|
+
children: /* @__PURE__ */ w(Yn.Provider, {
|
|
2227
2230
|
value: E,
|
|
2228
2231
|
children: i
|
|
2229
2232
|
})
|
|
2230
2233
|
}),
|
|
2231
|
-
/* @__PURE__ */ w(
|
|
2234
|
+
/* @__PURE__ */ w(Jn, {
|
|
2232
2235
|
onSlotChange: D,
|
|
2233
2236
|
unstyled: f,
|
|
2234
2237
|
children: a
|
|
@@ -2238,7 +2241,7 @@ function Hr({ isEnded: t, onDismiss: n, title: r, children: i, footer: a, size:
|
|
|
2238
2241
|
}), document.body)
|
|
2239
2242
|
});
|
|
2240
2243
|
}
|
|
2241
|
-
function
|
|
2244
|
+
function Wr(e, t) {
|
|
2242
2245
|
let [n, r] = b(!e), i = h(() => t?.());
|
|
2243
2246
|
return e && n && r(!1), m(() => {
|
|
2244
2247
|
if (e || n) return;
|
|
@@ -2248,8 +2251,8 @@ function Ur(e, t) {
|
|
|
2248
2251
|
return () => clearTimeout(t);
|
|
2249
2252
|
}, [e, n]), e || !n;
|
|
2250
2253
|
}
|
|
2251
|
-
function
|
|
2252
|
-
return
|
|
2254
|
+
function Gr({ isOpen: e, onClose: t, size: n = "md", side: r = "right", radius: i = "none", dismissible: a = !0, onExited: o, ...s }) {
|
|
2255
|
+
return Wr(e, o) ? /* @__PURE__ */ w(Ur, {
|
|
2253
2256
|
...s,
|
|
2254
2257
|
isEnded: !e,
|
|
2255
2258
|
onDismiss: t,
|
|
@@ -2260,21 +2263,21 @@ function Wr({ isOpen: e, onClose: t, size: n = "md", side: r = "right", radius:
|
|
|
2260
2263
|
}) : null;
|
|
2261
2264
|
}
|
|
2262
2265
|
// src/components/shared/use_controlled_length.ts
|
|
2263
|
-
function
|
|
2266
|
+
function Kr(e) {
|
|
2264
2267
|
return typeof e == "string" ? e.length : 0;
|
|
2265
2268
|
}
|
|
2266
|
-
function
|
|
2267
|
-
let [n, r] = b(
|
|
2269
|
+
function qr(e, t) {
|
|
2270
|
+
let [n, r] = b(Kr(t)), i = e !== void 0;
|
|
2268
2271
|
return {
|
|
2269
|
-
length: i ?
|
|
2272
|
+
length: i ? Kr(e) : n,
|
|
2270
2273
|
trackLength: (e) => {
|
|
2271
2274
|
i || r(e.length);
|
|
2272
2275
|
}
|
|
2273
2276
|
};
|
|
2274
2277
|
}
|
|
2275
2278
|
// src/components/input/input.tsx
|
|
2276
|
-
function
|
|
2277
|
-
let { fieldId: v, errorId: y, descriptionId: b, labelId: x, characterCountId: S } = it(m), { length: C, trackLength: E } =
|
|
2279
|
+
function Jr({ 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, ..._ }) {
|
|
2280
|
+
let { fieldId: v, errorId: y, descriptionId: b, labelId: x, characterCountId: S } = it(m), { length: C, trackLength: E } = qr(d, f), D = i && (a !== void 0 || o !== void 0), O = (e) => {
|
|
2278
2281
|
E(e.target.value), p?.(e);
|
|
2279
2282
|
};
|
|
2280
2283
|
return /* @__PURE__ */ T(xt, {
|
|
@@ -2313,13 +2316,13 @@ function qr({ label: t, description: n, error: r, showCharCount: i = !1, minLeng
|
|
|
2313
2316
|
});
|
|
2314
2317
|
}
|
|
2315
2318
|
// src/components/kbd/kbd.tsx
|
|
2316
|
-
var
|
|
2319
|
+
var Yr = {
|
|
2317
2320
|
xs: "px-1.5 py-0.5 text-xs",
|
|
2318
2321
|
sm: "px-2 py-0.5 text-xs",
|
|
2319
2322
|
md: "px-2.5 py-1 text-sm",
|
|
2320
2323
|
lg: "px-3 py-1 text-base"
|
|
2321
|
-
},
|
|
2322
|
-
className: e("inline-flex items-center",
|
|
2324
|
+
}, Xr = ({ children: t, size: n = "sm", radius: r = "sm", unstyled: i = !1, className: a }) => /* @__PURE__ */ w("kbd", {
|
|
2325
|
+
className: e("inline-flex items-center", Yr[n], !i && [
|
|
2323
2326
|
"border font-semibold uppercase",
|
|
2324
2327
|
"text-gray-600 dark:text-gray-300",
|
|
2325
2328
|
"bg-gray-100 dark:bg-gray-700",
|
|
@@ -2327,27 +2330,27 @@ var Jr = {
|
|
|
2327
2330
|
z[r]
|
|
2328
2331
|
], a),
|
|
2329
2332
|
children: t
|
|
2330
|
-
}),
|
|
2331
|
-
function
|
|
2333
|
+
}), Zr = 4;
|
|
2334
|
+
function Qr(e, t) {
|
|
2332
2335
|
return t === "center" ? e : `${e}-${t}`;
|
|
2333
2336
|
}
|
|
2334
|
-
function
|
|
2337
|
+
function $r({ trigger: t, children: o, side: l = "bottom", align: d = "start", radius: p = "md", unstyled: h = !1, panelClassName: _, className: v, disabled: x = !1, ref: S }) {
|
|
2335
2338
|
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({
|
|
2336
|
-
placement:
|
|
2339
|
+
placement: Qr(l, d),
|
|
2337
2340
|
strategy: "fixed",
|
|
2338
2341
|
open: A,
|
|
2339
2342
|
whileElementsMounted: n,
|
|
2340
2343
|
middleware: [
|
|
2341
|
-
i(
|
|
2344
|
+
i(Zr),
|
|
2342
2345
|
r(),
|
|
2343
2346
|
a({ padding: 8 }),
|
|
2344
2347
|
kn()
|
|
2345
2348
|
]
|
|
2346
2349
|
});
|
|
2347
|
-
|
|
2350
|
+
ne(A, L, M);
|
|
2348
2351
|
let R = g(), z = (u(t) ? t.props.id : void 0) ?? R, B = `${z}-menu`, V = f(() => {
|
|
2349
2352
|
P(), C.current?.querySelector("button, [href], [tabindex]")?.focus({ preventScroll: !0 });
|
|
2350
|
-
}, [P]), H = f((e) =>
|
|
2353
|
+
}, [P]), H = f((e) => K(F.setReference, C, D, S)(e), [F, S]);
|
|
2351
2354
|
m(() => {
|
|
2352
2355
|
x && A && P();
|
|
2353
2356
|
}, [
|
|
@@ -2388,7 +2391,7 @@ function Qr({ trigger: t, children: o, side: l = "bottom", align: d = "start", r
|
|
|
2388
2391
|
});
|
|
2389
2392
|
}
|
|
2390
2393
|
// src/components/menu_group/menu_group.tsx
|
|
2391
|
-
function
|
|
2394
|
+
function ei({ label: t, children: n, unstyled: r = !1, className: i, wrapperClassName: a }) {
|
|
2392
2395
|
let o = g();
|
|
2393
2396
|
return /* @__PURE__ */ T("div", {
|
|
2394
2397
|
role: "group",
|
|
@@ -2403,12 +2406,12 @@ function $r({ label: t, children: n, unstyled: r = !1, className: i, wrapperClas
|
|
|
2403
2406
|
});
|
|
2404
2407
|
}
|
|
2405
2408
|
// src/components/menu_item/menu_item_content.tsx
|
|
2406
|
-
var
|
|
2409
|
+
var ti = ({ icon: t, danger: n = !1, unstyled: r = !1, children: i }) => /* @__PURE__ */ T(C, { children: [t && /* @__PURE__ */ w("span", {
|
|
2407
2410
|
className: e(t, "h-4 w-4 flex-shrink-0", !n && !r && "text-gray-500 dark:text-gray-400"),
|
|
2408
2411
|
"aria-hidden": "true"
|
|
2409
2412
|
}), i] });
|
|
2410
2413
|
// src/components/menu_item/menu_item_end.tsx
|
|
2411
|
-
function
|
|
2414
|
+
function ni({ trailing: t, selected: n, unstyled: r = !1 }) {
|
|
2412
2415
|
let i = n !== void 0;
|
|
2413
2416
|
return !t && !i ? null : /* @__PURE__ */ T("span", {
|
|
2414
2417
|
className: "ml-auto flex flex-shrink-0 items-center gap-2 pl-2",
|
|
@@ -2422,26 +2425,26 @@ function ti({ trailing: t, selected: n, unstyled: r = !1 }) {
|
|
|
2422
2425
|
});
|
|
2423
2426
|
}
|
|
2424
2427
|
// src/components/menu_item/menu_item_styles.ts
|
|
2425
|
-
var
|
|
2428
|
+
var ri = "flex w-full cursor-pointer items-center whitespace-nowrap text-left", ii = "gap-2 px-3 py-2 text-sm transition-colors", ai = {
|
|
2426
2429
|
default: "text-gray-900 dark:text-gray-100 focus-visible:bg-blue-50 dark:focus-visible:bg-blue-900/40",
|
|
2427
2430
|
danger: "text-red-700 dark:text-red-400 focus-visible:bg-red-50 dark:focus-visible:bg-red-950/40"
|
|
2428
2431
|
};
|
|
2429
|
-
function
|
|
2432
|
+
function oi({ hoverClasses: t, stateClasses: n, danger: r, unstyled: i, radius: a, className: o }) {
|
|
2430
2433
|
let s = r ? "danger" : "default";
|
|
2431
|
-
return e(
|
|
2434
|
+
return e(ri, !i && [
|
|
2432
2435
|
"outline-hidden focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-blue-500 dark:focus-visible:outline-blue-400",
|
|
2433
|
-
|
|
2434
|
-
|
|
2436
|
+
ii,
|
|
2437
|
+
ai[s],
|
|
2435
2438
|
t[s],
|
|
2436
2439
|
a && z[a]
|
|
2437
2440
|
], n, o);
|
|
2438
2441
|
}
|
|
2439
2442
|
// src/components/menu_item/menu_item_button.tsx
|
|
2440
|
-
var
|
|
2443
|
+
var si = {
|
|
2441
2444
|
default: "hover:enabled:bg-gray-50 dark:hover:enabled:bg-gray-800/60",
|
|
2442
2445
|
danger: "hover:enabled:bg-red-50 dark:hover:enabled:bg-red-950/40"
|
|
2443
|
-
},
|
|
2444
|
-
function
|
|
2446
|
+
}, ci = ["disabled:cursor-not-allowed disabled:opacity-50"];
|
|
2447
|
+
function li({ 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 }) {
|
|
2445
2448
|
let d = _n();
|
|
2446
2449
|
return /* @__PURE__ */ T("button", {
|
|
2447
2450
|
ref: u,
|
|
@@ -2453,20 +2456,20 @@ function ci({ icon: e, trailing: t, onClick: n, selected: r, danger: i = !1, dis
|
|
|
2453
2456
|
e.stopPropagation(), n(e), d?.();
|
|
2454
2457
|
},
|
|
2455
2458
|
disabled: a,
|
|
2456
|
-
className:
|
|
2457
|
-
hoverClasses:
|
|
2458
|
-
stateClasses:
|
|
2459
|
+
className: oi({
|
|
2460
|
+
hoverClasses: si,
|
|
2461
|
+
stateClasses: ci,
|
|
2459
2462
|
danger: i,
|
|
2460
2463
|
unstyled: c,
|
|
2461
2464
|
radius: s,
|
|
2462
2465
|
className: l
|
|
2463
2466
|
}),
|
|
2464
|
-
children: [/* @__PURE__ */ w(
|
|
2467
|
+
children: [/* @__PURE__ */ w(ti, {
|
|
2465
2468
|
icon: e,
|
|
2466
2469
|
danger: i,
|
|
2467
2470
|
unstyled: c,
|
|
2468
2471
|
children: o
|
|
2469
|
-
}), /* @__PURE__ */ w(
|
|
2472
|
+
}), /* @__PURE__ */ w(ni, {
|
|
2470
2473
|
trailing: t,
|
|
2471
2474
|
selected: r,
|
|
2472
2475
|
unstyled: c
|
|
@@ -2474,11 +2477,11 @@ function ci({ icon: e, trailing: t, onClick: n, selected: r, danger: i = !1, dis
|
|
|
2474
2477
|
});
|
|
2475
2478
|
}
|
|
2476
2479
|
// src/components/menu_item/menu_item_link.tsx
|
|
2477
|
-
var
|
|
2480
|
+
var ui = "_blank", di = "noopener noreferrer", fi = {
|
|
2478
2481
|
default: "hover:bg-gray-50 dark:hover:bg-gray-800/60",
|
|
2479
2482
|
danger: "hover:bg-red-50 dark:hover:bg-red-950/40"
|
|
2480
|
-
},
|
|
2481
|
-
function
|
|
2483
|
+
}, pi = ["no-underline", "aria-disabled:pointer-events-none aria-disabled:cursor-not-allowed aria-disabled:opacity-50"];
|
|
2484
|
+
function mi({ 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 }) {
|
|
2482
2485
|
let f = _n();
|
|
2483
2486
|
return /* @__PURE__ */ T("a", {
|
|
2484
2487
|
ref: d,
|
|
@@ -2486,94 +2489,94 @@ function pi({ icon: e, trailing: t, href: n, target: r, rel: i, danger: a = !1,
|
|
|
2486
2489
|
tabIndex: -1,
|
|
2487
2490
|
href: o ? void 0 : n,
|
|
2488
2491
|
target: r,
|
|
2489
|
-
rel: i ?? (r ===
|
|
2492
|
+
rel: i ?? (r === ui ? di : void 0),
|
|
2490
2493
|
"aria-disabled": o || void 0,
|
|
2491
2494
|
onClick: (e) => {
|
|
2492
2495
|
e.stopPropagation(), f?.();
|
|
2493
2496
|
},
|
|
2494
|
-
className:
|
|
2495
|
-
hoverClasses:
|
|
2496
|
-
stateClasses:
|
|
2497
|
+
className: oi({
|
|
2498
|
+
hoverClasses: fi,
|
|
2499
|
+
stateClasses: pi,
|
|
2497
2500
|
danger: a,
|
|
2498
2501
|
unstyled: l,
|
|
2499
2502
|
radius: c,
|
|
2500
2503
|
className: u
|
|
2501
2504
|
}),
|
|
2502
|
-
children: [/* @__PURE__ */ w(
|
|
2505
|
+
children: [/* @__PURE__ */ w(ti, {
|
|
2503
2506
|
icon: e,
|
|
2504
2507
|
danger: a,
|
|
2505
2508
|
unstyled: l,
|
|
2506
2509
|
children: s
|
|
2507
|
-
}), /* @__PURE__ */ w(
|
|
2510
|
+
}), /* @__PURE__ */ w(ni, {
|
|
2508
2511
|
trailing: t,
|
|
2509
2512
|
unstyled: l
|
|
2510
2513
|
})]
|
|
2511
2514
|
});
|
|
2512
2515
|
}
|
|
2513
2516
|
// src/components/menu_item/menu_item.tsx
|
|
2514
|
-
function
|
|
2515
|
-
return e.href === void 0 ? /* @__PURE__ */ w(
|
|
2517
|
+
function hi(e) {
|
|
2518
|
+
return e.href === void 0 ? /* @__PURE__ */ w(li, { ...e }) : /* @__PURE__ */ w(mi, { ...e });
|
|
2516
2519
|
}
|
|
2517
2520
|
// src/components/menu_separator/menu_separator.tsx
|
|
2518
|
-
var
|
|
2521
|
+
var gi = ({ unstyled: t = !1, className: n }) => /* @__PURE__ */ w("hr", {
|
|
2519
2522
|
"aria-orientation": "horizontal",
|
|
2520
2523
|
className: e("w-full", !t && ["my-1 border-0 border-t", "border-gray-100 dark:border-gray-800"], n)
|
|
2521
|
-
}),
|
|
2524
|
+
}), _i = {
|
|
2522
2525
|
danger: "i-mdi-alert-circle",
|
|
2523
2526
|
primary: "i-mdi-help-circle",
|
|
2524
2527
|
success: "i-mdi-check-circle"
|
|
2525
|
-
},
|
|
2528
|
+
}, vi = {
|
|
2526
2529
|
danger: "bg-red-50 text-red-600 dark:bg-red-500/10 dark:text-red-400",
|
|
2527
2530
|
primary: "bg-blue-50 text-blue-600 dark:bg-blue-500/10 dark:text-blue-400",
|
|
2528
2531
|
success: "bg-green-50 text-green-600 dark:bg-green-500/10 dark:text-green-400"
|
|
2529
2532
|
};
|
|
2530
|
-
function
|
|
2533
|
+
function yi({ title: t, color: n }) {
|
|
2531
2534
|
return /* @__PURE__ */ T("div", {
|
|
2532
2535
|
className: "flex items-center gap-3",
|
|
2533
2536
|
children: [/* @__PURE__ */ w("span", {
|
|
2534
|
-
className: e("flex h-9 w-9 shrink-0 items-center justify-center rounded-full",
|
|
2537
|
+
className: e("flex h-9 w-9 shrink-0 items-center justify-center rounded-full", vi[n]),
|
|
2535
2538
|
"aria-hidden": "true",
|
|
2536
|
-
children: /* @__PURE__ */ w("span", { className: e(
|
|
2539
|
+
children: /* @__PURE__ */ w("span", { className: e(_i[n], "h-5 w-5") })
|
|
2537
2540
|
}), t]
|
|
2538
2541
|
});
|
|
2539
2542
|
}
|
|
2540
2543
|
// src/components/modal/modal_sheet_classes.ts
|
|
2541
|
-
var
|
|
2544
|
+
var bi = {
|
|
2542
2545
|
sm: "ms-modal-sheet-size-sm",
|
|
2543
2546
|
md: "ms-modal-sheet-size-md",
|
|
2544
2547
|
lg: "ms-modal-sheet-size-lg",
|
|
2545
2548
|
xl: "ms-modal-sheet-size-xl"
|
|
2546
|
-
},
|
|
2549
|
+
}, xi = {
|
|
2547
2550
|
none: "ms-modal-sheet-radius-none",
|
|
2548
2551
|
sm: "ms-modal-sheet-radius-sm",
|
|
2549
2552
|
md: "ms-modal-sheet-radius-md",
|
|
2550
2553
|
lg: "ms-modal-sheet-radius-lg",
|
|
2551
2554
|
xl: "ms-modal-sheet-radius-xl",
|
|
2552
2555
|
full: "ms-modal-sheet-radius-full"
|
|
2553
|
-
},
|
|
2556
|
+
}, Si = "a dialog needs an accessible name. Provide a non-empty `title` or `aria-label` prop.", Ci = {
|
|
2554
2557
|
sm: "max-w-md",
|
|
2555
2558
|
md: "max-w-lg",
|
|
2556
2559
|
lg: "max-w-2xl",
|
|
2557
2560
|
xl: "max-w-4xl"
|
|
2558
|
-
},
|
|
2561
|
+
}, wi = {
|
|
2559
2562
|
auto: "",
|
|
2560
2563
|
fixed: "ms-modal-height-fixed"
|
|
2561
|
-
},
|
|
2564
|
+
}, Ti = {
|
|
2562
2565
|
auto: "overflow-y-auto",
|
|
2563
2566
|
fixed: "overflow-hidden flex flex-col"
|
|
2564
2567
|
};
|
|
2565
|
-
function
|
|
2566
|
-
let x = g(), C = g(), { dialogRef: E, contentRef: D, footerSlot: O, setFooterSlot: k, isVisible: A, handleBackdropClick: j, handleBackdropMouseDown: M } =
|
|
2568
|
+
function Ei({ 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 }) {
|
|
2569
|
+
let x = g(), C = g(), { dialogRef: E, contentRef: D, footerSlot: O, setFooterSlot: k, isVisible: A, handleBackdropClick: j, handleBackdropMouseDown: M } = Lr({
|
|
2567
2570
|
isEnded: t,
|
|
2568
2571
|
onDismiss: n,
|
|
2569
2572
|
dismissible: m,
|
|
2570
2573
|
initialFocusRef: y
|
|
2571
2574
|
});
|
|
2572
|
-
ct("Modal", !!r || !!b?.trim(),
|
|
2573
|
-
let { ref: N, scrollableProps: P, focusClassName: F } =
|
|
2575
|
+
ct("Modal", !!r || !!b?.trim(), Si);
|
|
2576
|
+
let { ref: N, scrollableProps: P, focusClassName: F } = gr({
|
|
2574
2577
|
labelledBy: r ? x : void 0,
|
|
2575
2578
|
label: b
|
|
2576
|
-
}), I = v(() =>
|
|
2579
|
+
}), I = v(() => K(D, N), [D, N]), L = s === "auto", R = c === "sheet", B = _ === "alertdialog" && !!i;
|
|
2577
2580
|
return S(/* @__PURE__ */ T("div", {
|
|
2578
2581
|
className: e("fixed inset-0 z-50 flex justify-center", R ? "ms-modal-sheet-backdrop" : "items-start ms-modal-backdrop-padding", !p && "transition-opacity duration-200 ease-out", A ? "opacity-100" : "opacity-0"),
|
|
2579
2582
|
onClick: j,
|
|
@@ -2595,18 +2598,18 @@ function Ti({ isEnded: t, onDismiss: n, title: r, children: i, footer: a, size:
|
|
|
2595
2598
|
tabIndex: -1,
|
|
2596
2599
|
"data-state": A ? "open" : "closed",
|
|
2597
2600
|
"data-phone-layout": R ? "sheet" : void 0,
|
|
2598
|
-
className: e("relative w-full", R ?
|
|
2601
|
+
className: e("relative w-full", R ? bi[o] : Ci[o], wi[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 && [
|
|
2599
2602
|
"bg-white dark:bg-gray-900",
|
|
2600
2603
|
"[&,&_*]:[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]",
|
|
2601
2604
|
"shadow-2xl",
|
|
2602
|
-
R ?
|
|
2605
|
+
R ? xi[l] : z[l],
|
|
2603
2606
|
"transition-all duration-200 ease-out",
|
|
2604
2607
|
A ? "opacity-100" : R ? "ms-modal-sheet-closed" : "ms-modal-panel-closed"
|
|
2605
2608
|
], d),
|
|
2606
2609
|
onClick: (e) => e.stopPropagation(),
|
|
2607
2610
|
children: [
|
|
2608
|
-
/* @__PURE__ */ w(
|
|
2609
|
-
r && /* @__PURE__ */ w(
|
|
2611
|
+
/* @__PURE__ */ w(Rr, {}),
|
|
2612
|
+
r && /* @__PURE__ */ w(Xn, {
|
|
2610
2613
|
titleId: x,
|
|
2611
2614
|
title: r,
|
|
2612
2615
|
onDismiss: n,
|
|
@@ -2618,13 +2621,13 @@ function Ti({ isEnded: t, onDismiss: n, title: r, children: i, footer: a, size:
|
|
|
2618
2621
|
ref: I,
|
|
2619
2622
|
id: B ? C : void 0,
|
|
2620
2623
|
...L ? P : void 0,
|
|
2621
|
-
className: e("flex-1 min-h-0", !p && "px-6 pb-6 text-sm leading-relaxed text-gray-600 dark:text-gray-400",
|
|
2622
|
-
children: /* @__PURE__ */ w(
|
|
2624
|
+
className: e("flex-1 min-h-0", !p && "px-6 pb-6 text-sm leading-relaxed text-gray-600 dark:text-gray-400", Ti[s], !p && !r && "pt-6", L && F, u),
|
|
2625
|
+
children: /* @__PURE__ */ w(Yn.Provider, {
|
|
2623
2626
|
value: O,
|
|
2624
2627
|
children: i
|
|
2625
2628
|
})
|
|
2626
2629
|
}),
|
|
2627
|
-
/* @__PURE__ */ w(
|
|
2630
|
+
/* @__PURE__ */ w(Jn, {
|
|
2628
2631
|
onSlotChange: k,
|
|
2629
2632
|
unstyled: p,
|
|
2630
2633
|
children: a
|
|
@@ -2634,8 +2637,8 @@ function Ti({ isEnded: t, onDismiss: n, title: r, children: i, footer: a, size:
|
|
|
2634
2637
|
}), document.body);
|
|
2635
2638
|
}
|
|
2636
2639
|
// src/components/modal/confirm_modal.tsx
|
|
2637
|
-
var
|
|
2638
|
-
|
|
2640
|
+
var Di = D(({ call: e, title: t, children: n, confirmLabel: r, cancelLabel: i, confirmColor: a, radius: o, closeLabel: s, onConfirm: c, onError: l }) => {
|
|
2641
|
+
Vr();
|
|
2639
2642
|
let [u, d] = b(!1), f = y(null), p = () => e.end(!1), m = async () => {
|
|
2640
2643
|
if (!c) e.end(!0);
|
|
2641
2644
|
else {
|
|
@@ -2647,10 +2650,10 @@ var Ei = D(({ call: e, title: t, children: n, confirmLabel: r, cancelLabel: i, c
|
|
|
2647
2650
|
}
|
|
2648
2651
|
}
|
|
2649
2652
|
}, h = Q(), g = r ?? h.confirm, _ = i ?? h.cancel, v = a ?? "primary";
|
|
2650
|
-
return /* @__PURE__ */ w(
|
|
2653
|
+
return /* @__PURE__ */ w(Ei, {
|
|
2651
2654
|
isEnded: e.ended,
|
|
2652
2655
|
onDismiss: p,
|
|
2653
|
-
title: /* @__PURE__ */ w(
|
|
2656
|
+
title: /* @__PURE__ */ w(yi, {
|
|
2654
2657
|
title: t,
|
|
2655
2658
|
color: v
|
|
2656
2659
|
}),
|
|
@@ -2680,18 +2683,18 @@ var Ei = D(({ call: e, title: t, children: n, confirmLabel: r, cancelLabel: i, c
|
|
|
2680
2683
|
});
|
|
2681
2684
|
}, 200);
|
|
2682
2685
|
// src/components/modal/modal.tsx
|
|
2683
|
-
function
|
|
2686
|
+
function Oi(e, t) {
|
|
2684
2687
|
return typeof e == "function" ? e(t) : e;
|
|
2685
2688
|
}
|
|
2686
|
-
var
|
|
2687
|
-
|
|
2688
|
-
let { dismiss: g, registry: _ } =
|
|
2689
|
+
var ki = 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 }) => {
|
|
2690
|
+
Vr();
|
|
2691
|
+
let { dismiss: g, registry: _ } = Qn({
|
|
2689
2692
|
onDismiss: () => e.end(),
|
|
2690
2693
|
isEnded: e.ended
|
|
2691
2694
|
});
|
|
2692
|
-
return /* @__PURE__ */ w(
|
|
2695
|
+
return /* @__PURE__ */ w(qn.Provider, {
|
|
2693
2696
|
value: _,
|
|
2694
|
-
children: /* @__PURE__ */ w(
|
|
2697
|
+
children: /* @__PURE__ */ w(Ei, {
|
|
2695
2698
|
isEnded: e.ended,
|
|
2696
2699
|
onDismiss: g,
|
|
2697
2700
|
title: t,
|
|
@@ -2708,18 +2711,18 @@ var Oi = D(({ call: e, title: t, children: n, size: r, height: i, phoneLayout: a
|
|
|
2708
2711
|
role: p,
|
|
2709
2712
|
initialFocusRef: m,
|
|
2710
2713
|
"aria-label": h,
|
|
2711
|
-
children:
|
|
2714
|
+
children: Oi(n, g)
|
|
2712
2715
|
})
|
|
2713
2716
|
});
|
|
2714
2717
|
}, 200);
|
|
2715
2718
|
// src/components/modal/modal_footer.tsx
|
|
2716
|
-
function
|
|
2717
|
-
let t = p(
|
|
2719
|
+
function Ai({ children: e }) {
|
|
2720
|
+
let t = p(Yn);
|
|
2718
2721
|
return t ? S(e, t) : null;
|
|
2719
2722
|
}
|
|
2720
2723
|
// src/components/modal/use_dismiss_guard.ts
|
|
2721
|
-
function
|
|
2722
|
-
let n = p(
|
|
2724
|
+
function ji(e, t = !0) {
|
|
2725
|
+
let n = p(qn), r = y(e);
|
|
2723
2726
|
if (_(() => {
|
|
2724
2727
|
r.current = e;
|
|
2725
2728
|
}), m(() => {
|
|
@@ -2727,11 +2730,11 @@ function Ai(e, t = !0) {
|
|
|
2727
2730
|
}, [n, t]), !n) throw Error("useDismissGuard must be used inside a Modal or a Drawer");
|
|
2728
2731
|
}
|
|
2729
2732
|
// src/components/modal_provider/modal_provider.tsx
|
|
2730
|
-
function
|
|
2731
|
-
return /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(
|
|
2733
|
+
function Mi() {
|
|
2734
|
+
return /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(ki, {}), /* @__PURE__ */ w(Di, {})] });
|
|
2732
2735
|
}
|
|
2733
2736
|
// src/components/multi_combobox/multi_combobox_checkbox.tsx
|
|
2734
|
-
function
|
|
2737
|
+
function Ni({ isSelected: t, unstyled: n, radius: r }) {
|
|
2735
2738
|
return /* @__PURE__ */ w("span", {
|
|
2736
2739
|
"aria-hidden": !0,
|
|
2737
2740
|
className: e("flex h-4 w-4 shrink-0 items-center justify-center", !n && [
|
|
@@ -2752,14 +2755,14 @@ function Mi({ isSelected: t, unstyled: n, radius: r }) {
|
|
|
2752
2755
|
});
|
|
2753
2756
|
}
|
|
2754
2757
|
// src/components/multi_combobox/multi_combobox.tsx
|
|
2755
|
-
var
|
|
2756
|
-
function
|
|
2758
|
+
var Pi = 2, Fi = "flex items-center gap-2";
|
|
2759
|
+
function Ii(e, t, n, r, i) {
|
|
2757
2760
|
return i?.(e, t) ? !0 : r === void 0 || n.has(e) ? !1 : t.length >= r;
|
|
2758
2761
|
}
|
|
2759
|
-
function
|
|
2762
|
+
function Li(e, t, n) {
|
|
2760
2763
|
return t.has(n) ? e.filter((e) => e !== n) : [...e, n];
|
|
2761
2764
|
}
|
|
2762
|
-
function
|
|
2765
|
+
function Ri(e, t) {
|
|
2763
2766
|
if (e.length <= t) return {
|
|
2764
2767
|
visibleOptions: e,
|
|
2765
2768
|
hiddenCount: 0
|
|
@@ -2770,12 +2773,12 @@ function Li(e, t) {
|
|
|
2770
2773
|
hiddenCount: e.length - n
|
|
2771
2774
|
};
|
|
2772
2775
|
}
|
|
2773
|
-
function
|
|
2776
|
+
function zi(e, t, n) {
|
|
2774
2777
|
return typeof e == "string" ? `${e}, ${n}` : t ? `${t}, ${n}` : n;
|
|
2775
2778
|
}
|
|
2776
|
-
var
|
|
2777
|
-
function
|
|
2778
|
-
let H = Q(), { fieldId: U, errorId: G, descriptionId: ee, labelId: te } = it(V),
|
|
2779
|
+
var Bi = "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";
|
|
2780
|
+
function Vi({ 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 = Pi, 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 }) {
|
|
2781
|
+
let H = Q(), { fieldId: U, errorId: G, descriptionId: ee, labelId: te } = it(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] = rt(P, I), [ce, X] = b(""), [Z, le] = b(!1), ue = dn(Z), de = v(() => new Set(Y), [Y]), fe = v(() => n ? [] : t.map((e) => e.label.toLowerCase()), [t, n]), pe = v(() => {
|
|
2779
2782
|
let e = ce.trim().toLowerCase();
|
|
2780
2783
|
return e ? n ? t.filter((e) => n(e, ce)) : t.filter((t, n) => fe[n].includes(e)) : t;
|
|
2781
2784
|
}, [
|
|
@@ -2785,9 +2788,9 @@ function Bi({ options: t, filterOption: n, label: r, description: i, "aria-label
|
|
|
2785
2788
|
ce
|
|
2786
2789
|
]), { activeIndex: me, activeOptionId: he, move: ge, moveWithinBounds: _e, first: ve, last: ye, reset: be } = rn({
|
|
2787
2790
|
optionCount: pe.length,
|
|
2788
|
-
getOptionId: (e) => Ct(
|
|
2791
|
+
getOptionId: (e) => Ct(ne, e),
|
|
2789
2792
|
isOpen: Z
|
|
2790
|
-
}), xe = v(() => t.filter((e) => de.has(e.value)), [t, de]), Se =
|
|
2793
|
+
}), xe = v(() => t.filter((e) => de.has(e.value)), [t, de]), Se = ie && xe.length > 0, { visibleOptions: Ce, hiddenCount: we } = Ri(xe, g), Te = () => {
|
|
2791
2794
|
O || le(!0);
|
|
2792
2795
|
}, $ = f(() => {
|
|
2793
2796
|
le(!1), X(""), be(), R?.(Y);
|
|
@@ -2798,15 +2801,15 @@ function Bi({ options: t, filterOption: n, label: r, description: i, "aria-label
|
|
|
2798
2801
|
]), Ee = () => {
|
|
2799
2802
|
Z ? $() : Te();
|
|
2800
2803
|
}, De = (e) => {
|
|
2801
|
-
if (
|
|
2802
|
-
let t =
|
|
2804
|
+
if (Ii(e, Y, de, p, h)) return;
|
|
2805
|
+
let t = Li(Y, de, e);
|
|
2803
2806
|
se(t), L?.(t);
|
|
2804
2807
|
}, Oe = () => {
|
|
2805
2808
|
se([]), L?.([]);
|
|
2806
2809
|
}, ke = (e) => {
|
|
2807
|
-
e.stopPropagation(), Oe(), Z || R?.([]),
|
|
2810
|
+
e.stopPropagation(), Oe(), Z || R?.([]), ae.current?.focus();
|
|
2808
2811
|
}, Ae = () => {
|
|
2809
|
-
Oe(),
|
|
2812
|
+
Oe(), oe.current?.focus();
|
|
2810
2813
|
}, je = () => {
|
|
2811
2814
|
O || Ee();
|
|
2812
2815
|
}, Me = (e) => {
|
|
@@ -2821,16 +2824,16 @@ function Bi({ options: t, filterOption: n, label: r, description: i, "aria-label
|
|
|
2821
2824
|
let t = pe[me];
|
|
2822
2825
|
t && De(t.value);
|
|
2823
2826
|
}, Ie = (e) => {
|
|
2824
|
-
Z && (e.preventDefault(), $(),
|
|
2827
|
+
Z && (e.preventDefault(), $(), ae.current?.focus());
|
|
2825
2828
|
}, Le = (e, t) => {
|
|
2826
|
-
Z && !St(e) && (e.preventDefault(), _e(t * Rt(
|
|
2829
|
+
Z && !St(e) && (e.preventDefault(), _e(t * Rt(J.current, me)));
|
|
2827
2830
|
}, Re = zt((e) => {
|
|
2828
2831
|
De(e.value);
|
|
2829
2832
|
}), ze = (e) => ({
|
|
2830
2833
|
isSelected: de.has(e.value),
|
|
2831
|
-
isDisabled:
|
|
2832
|
-
className:
|
|
2833
|
-
}), Be = f((e, t, n) => /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(
|
|
2834
|
+
isDisabled: Ii(e.value, Y, de, p, h),
|
|
2835
|
+
className: Fi
|
|
2836
|
+
}), Be = f((e, t, n) => /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(Ni, {
|
|
2834
2837
|
isSelected: t,
|
|
2835
2838
|
unstyled: D,
|
|
2836
2839
|
radius: E
|
|
@@ -2848,7 +2851,7 @@ function Bi({ options: t, filterOption: n, label: r, description: i, "aria-label
|
|
|
2848
2851
|
return m(() => {
|
|
2849
2852
|
if (!Z) return;
|
|
2850
2853
|
let e = (e) => {
|
|
2851
|
-
|
|
2854
|
+
q.current && !q.current.contains(e.target) && $();
|
|
2852
2855
|
};
|
|
2853
2856
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
2854
2857
|
}, [Z, $]), /* @__PURE__ */ w(xt, {
|
|
@@ -2861,31 +2864,31 @@ function Bi({ options: t, filterOption: n, label: r, description: i, "aria-label
|
|
|
2861
2864
|
required: k,
|
|
2862
2865
|
wrapperClassName: j,
|
|
2863
2866
|
children: /* @__PURE__ */ T("div", {
|
|
2864
|
-
ref:
|
|
2867
|
+
ref: q,
|
|
2865
2868
|
className: "relative",
|
|
2866
2869
|
onBlur: (e) => {
|
|
2867
2870
|
if (!Z) return;
|
|
2868
2871
|
let t = e.relatedTarget;
|
|
2869
|
-
t instanceof Node &&
|
|
2872
|
+
t instanceof Node && q.current?.contains(t) || $();
|
|
2870
2873
|
},
|
|
2871
2874
|
children: [
|
|
2872
2875
|
Se && /* @__PURE__ */ w("span", {
|
|
2873
|
-
id:
|
|
2876
|
+
id: re,
|
|
2874
2877
|
className: "sr-only",
|
|
2875
2878
|
children: xe.map((e) => e.label).join(", ")
|
|
2876
2879
|
}),
|
|
2877
2880
|
/* @__PURE__ */ w("button", {
|
|
2878
|
-
ref:
|
|
2881
|
+
ref: ae,
|
|
2879
2882
|
type: "button",
|
|
2880
2883
|
id: U,
|
|
2881
2884
|
role: "combobox",
|
|
2882
2885
|
disabled: O,
|
|
2883
2886
|
"aria-expanded": Z,
|
|
2884
|
-
"aria-controls":
|
|
2887
|
+
"aria-controls": ne,
|
|
2885
2888
|
"aria-haspopup": "listbox",
|
|
2886
2889
|
"aria-invalid": !!o,
|
|
2887
2890
|
"aria-required": k || void 0,
|
|
2888
|
-
"aria-describedby": W(Se &&
|
|
2891
|
+
"aria-describedby": W(Se && re, !!i && ee, o && G),
|
|
2889
2892
|
"aria-labelledby": r && !a ? te : void 0,
|
|
2890
2893
|
"aria-label": a,
|
|
2891
2894
|
onClick: je,
|
|
@@ -2899,10 +2902,10 @@ function Bi({ options: t, filterOption: n, label: r, description: i, "aria-label
|
|
|
2899
2902
|
className: e(!D && "text-gray-500 dark:text-gray-400"),
|
|
2900
2903
|
children: s
|
|
2901
2904
|
}) : /* @__PURE__ */ T(C, { children: [Ce.map((t) => /* @__PURE__ */ w("span", {
|
|
2902
|
-
className: e(!D &&
|
|
2905
|
+
className: e(!D && Bi),
|
|
2903
2906
|
children: t.label
|
|
2904
2907
|
}, t.value)), we > 0 && /* @__PURE__ */ w("span", {
|
|
2905
|
-
className: e(!D &&
|
|
2908
|
+
className: e(!D && Bi),
|
|
2906
2909
|
children: (_ ?? H.overflowCount)(we)
|
|
2907
2910
|
})] })
|
|
2908
2911
|
}),
|
|
@@ -2920,7 +2923,7 @@ function Bi({ options: t, filterOption: n, label: r, description: i, "aria-label
|
|
|
2920
2923
|
Z && /* @__PURE__ */ T("div", {
|
|
2921
2924
|
ref: ue,
|
|
2922
2925
|
onMouseDown: (e) => {
|
|
2923
|
-
e.target !==
|
|
2926
|
+
e.target !== oe.current && e.preventDefault();
|
|
2924
2927
|
},
|
|
2925
2928
|
className: e("absolute z-10 mt-1", M ? "min-w-full" : "w-full", "text-sm shadow-lg", !D && [
|
|
2926
2929
|
"border overflow-hidden",
|
|
@@ -2930,7 +2933,7 @@ function Bi({ options: t, filterOption: n, label: r, description: i, "aria-label
|
|
|
2930
2933
|
], M),
|
|
2931
2934
|
children: [
|
|
2932
2935
|
/* @__PURE__ */ w("input", {
|
|
2933
|
-
ref:
|
|
2936
|
+
ref: oe,
|
|
2934
2937
|
type: "text",
|
|
2935
2938
|
autoFocus: !0,
|
|
2936
2939
|
role: "combobox",
|
|
@@ -2942,10 +2945,10 @@ function Bi({ options: t, filterOption: n, label: r, description: i, "aria-label
|
|
|
2942
2945
|
onChange: Me,
|
|
2943
2946
|
onKeyDown: Ve,
|
|
2944
2947
|
placeholder: c ?? H.search,
|
|
2945
|
-
"aria-label":
|
|
2946
|
-
"aria-controls":
|
|
2948
|
+
"aria-label": zi(r, a, c ?? H.search),
|
|
2949
|
+
"aria-controls": ne,
|
|
2947
2950
|
"aria-activedescendant": he,
|
|
2948
|
-
"aria-describedby": p === void 0 ? void 0 :
|
|
2951
|
+
"aria-describedby": p === void 0 ? void 0 : K,
|
|
2949
2952
|
className: e("w-full", !D && [
|
|
2950
2953
|
"px-3 py-2 border-b bg-transparent",
|
|
2951
2954
|
"outline-hidden focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-blue-500 dark:focus-visible:outline-blue-400",
|
|
@@ -2954,13 +2957,13 @@ function Bi({ options: t, filterOption: n, label: r, description: i, "aria-label
|
|
|
2954
2957
|
])
|
|
2955
2958
|
}),
|
|
2956
2959
|
p !== void 0 && /* @__PURE__ */ w("div", {
|
|
2957
|
-
id:
|
|
2960
|
+
id: K,
|
|
2958
2961
|
className: e("px-3 py-1 text-xs", !D && ["border-b", "border-gray-100 dark:border-gray-800"], !D && "text-gray-500 dark:text-gray-400"),
|
|
2959
2962
|
children: (S ?? H.maxSelectedHint)(p)
|
|
2960
2963
|
}),
|
|
2961
2964
|
/* @__PURE__ */ w($t, {
|
|
2962
|
-
ref:
|
|
2963
|
-
id:
|
|
2965
|
+
ref: J,
|
|
2966
|
+
id: ne,
|
|
2964
2967
|
options: pe,
|
|
2965
2968
|
activeIndex: me,
|
|
2966
2969
|
isWindowed: N !== "wrap" && kt(t.length),
|
|
@@ -2993,11 +2996,11 @@ function Bi({ options: t, filterOption: n, label: r, description: i, "aria-label
|
|
|
2993
2996
|
});
|
|
2994
2997
|
}
|
|
2995
2998
|
// src/components/popover/popover_surface.tsx
|
|
2996
|
-
function
|
|
2999
|
+
function Hi({ 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 }) {
|
|
2997
3000
|
return m(() => {
|
|
2998
3001
|
if (!i || !a) return;
|
|
2999
3002
|
let e = t.current;
|
|
3000
|
-
e && (f?.current ??
|
|
3003
|
+
e && (f?.current ?? ur(e)[0] ?? e).focus();
|
|
3001
3004
|
}, [
|
|
3002
3005
|
i,
|
|
3003
3006
|
a,
|
|
@@ -3018,7 +3021,7 @@ function Vi({ panelRef: t, setFloating: n, floatingStyles: r, isVisible: i, isPo
|
|
|
3018
3021
|
onKeyDown: (e) => {
|
|
3019
3022
|
let n = t.current;
|
|
3020
3023
|
if (e.key !== "Tab" || !n) return;
|
|
3021
|
-
let r =
|
|
3024
|
+
let r = ur(n), i = e.shiftKey ? r[0] : r.at(-1);
|
|
3022
3025
|
document.activeElement === (i ?? n) && (e.preventDefault(), p());
|
|
3023
3026
|
},
|
|
3024
3027
|
className: e("w-max ms-floating-panel-scroll", !s && [
|
|
@@ -3034,7 +3037,7 @@ function Vi({ panelRef: t, setFloating: n, floatingStyles: r, isVisible: i, isPo
|
|
|
3034
3037
|
}), h);
|
|
3035
3038
|
}
|
|
3036
3039
|
// src/components/popover/use_outside_pointer_down.ts
|
|
3037
|
-
function
|
|
3040
|
+
function Ui(e, t, n) {
|
|
3038
3041
|
let r = zt(n);
|
|
3039
3042
|
m(() => {
|
|
3040
3043
|
if (!e) return;
|
|
@@ -3050,87 +3053,87 @@ function Hi(e, t, n) {
|
|
|
3050
3053
|
]);
|
|
3051
3054
|
}
|
|
3052
3055
|
// src/components/popover/use_popover_state.ts
|
|
3053
|
-
function
|
|
3054
|
-
let [r, i] = rt(e, t), a = y(r), o = y(void 0), s = zt((e) => n?.(e));
|
|
3056
|
+
function Wi({ isOpen: e, defaultOpen: t, onOpenChange: n }) {
|
|
3057
|
+
let [r, i] = rt(e, t), a = y(r), o = y(void 0), s = zt((e, t) => n?.(e, t));
|
|
3055
3058
|
return _(() => {
|
|
3056
3059
|
a.current = r;
|
|
3057
3060
|
}), {
|
|
3058
3061
|
isOpen: r,
|
|
3059
|
-
setOpen: f((e) => {
|
|
3062
|
+
setOpen: f((e, t) => {
|
|
3060
3063
|
a.current !== e && o.current !== e && (o.current = e, queueMicrotask(() => {
|
|
3061
3064
|
o.current = void 0;
|
|
3062
|
-
}), i(e), s(e));
|
|
3065
|
+
}), i(e), s(e, t));
|
|
3063
3066
|
}, [i, s])
|
|
3064
3067
|
};
|
|
3065
3068
|
}
|
|
3066
3069
|
// src/components/popover/popover.tsx
|
|
3067
|
-
var
|
|
3068
|
-
function
|
|
3070
|
+
var Gi = 4;
|
|
3071
|
+
function Ki(e, t) {
|
|
3069
3072
|
return t === "center" ? e : `${e}-${t}`;
|
|
3070
3073
|
}
|
|
3071
|
-
function
|
|
3074
|
+
function qi({ 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 }) {
|
|
3072
3075
|
ct("Popover", !!(l ?? d));
|
|
3073
|
-
let M = y(null), N = y(null), [P, F] = b(null), { isOpen: I, setOpen: L } =
|
|
3076
|
+
let M = y(null), N = y(null), [P, F] = b(null), { isOpen: I, setOpen: L } = Wi({
|
|
3074
3077
|
isOpen: p,
|
|
3075
3078
|
defaultOpen: h,
|
|
3076
3079
|
onOpenChange: _
|
|
3077
3080
|
}), { isMounted: R, isVisible: z, setIsVisible: B, open: V, close: H } = te(), { refs: U, floatingStyles: W, isPositioned: G } = s({
|
|
3078
|
-
placement:
|
|
3081
|
+
placement: Ki(x, S),
|
|
3079
3082
|
strategy: "fixed",
|
|
3080
3083
|
open: R,
|
|
3081
3084
|
whileElementsMounted: n,
|
|
3082
3085
|
middleware: [
|
|
3083
|
-
i(
|
|
3086
|
+
i(Gi),
|
|
3084
3087
|
r(),
|
|
3085
3088
|
a({ padding: 8 }),
|
|
3086
3089
|
kn()
|
|
3087
3090
|
]
|
|
3088
3091
|
});
|
|
3089
|
-
|
|
3092
|
+
ne(R, G, B);
|
|
3090
3093
|
let ee = zt((e) => {
|
|
3091
3094
|
e ? V(G) : H();
|
|
3092
3095
|
});
|
|
3093
3096
|
m(() => {
|
|
3094
3097
|
ee(I);
|
|
3095
3098
|
}, [I, ee]);
|
|
3096
|
-
let
|
|
3099
|
+
let re = `${g()}-popover`, ie = v(() => [M, N], []), ae = f((e) => K(U.setReference, M, F, j)(e), [U, j]), q = f(() => {
|
|
3097
3100
|
let e = M.current?.firstElementChild;
|
|
3098
3101
|
e instanceof HTMLElement && e.focus({ preventScroll: !0 });
|
|
3099
|
-
}, []),
|
|
3102
|
+
}, []), oe = f(() => {
|
|
3100
3103
|
let e = document.activeElement;
|
|
3101
|
-
if (!e || e === document.body) return
|
|
3102
|
-
N.current?.contains(e) &&
|
|
3103
|
-
}, [
|
|
3104
|
-
L(!1),
|
|
3105
|
-
}, [L, J]);
|
|
3106
|
-
|
|
3107
|
-
L(!1), window.setTimeout(
|
|
3104
|
+
if (!e || e === document.body) return q();
|
|
3105
|
+
N.current?.contains(e) && q();
|
|
3106
|
+
}, [q]), J = f((e) => {
|
|
3107
|
+
L(!1, { reason: e }), q();
|
|
3108
|
+
}, [L, q]), Y = f(() => J("focus-out"), [J]);
|
|
3109
|
+
Ui(I, ie, () => {
|
|
3110
|
+
L(!1, { reason: "outside-pointer" }), window.setTimeout(oe, 0);
|
|
3108
3111
|
}), m(() => {
|
|
3109
|
-
A && I && L(!1);
|
|
3112
|
+
A && I && L(!1, { reason: "disabled" });
|
|
3110
3113
|
}, [
|
|
3111
3114
|
A,
|
|
3112
3115
|
I,
|
|
3113
3116
|
L
|
|
3114
3117
|
]);
|
|
3115
|
-
let
|
|
3116
|
-
e.key === "Escape" && I && (e.preventDefault(), e.stopPropagation(),
|
|
3117
|
-
},
|
|
3118
|
+
let se = (e) => {
|
|
3119
|
+
e.key === "Escape" && I && (e.preventDefault(), e.stopPropagation(), J("escape"));
|
|
3120
|
+
}, ce = (e) => {
|
|
3118
3121
|
let t = e.relatedTarget;
|
|
3119
|
-
I && t instanceof Node && (M.current?.contains(t) || N.current?.contains(t) || L(!1));
|
|
3120
|
-
},
|
|
3122
|
+
I && t instanceof Node && (M.current?.contains(t) || N.current?.contains(t) || L(!1, { reason: "focus-out" }));
|
|
3123
|
+
}, X = {
|
|
3121
3124
|
onClick: zt((e) => {
|
|
3122
|
-
A || (I ?
|
|
3125
|
+
A || (I ? J("trigger") : L(!0, { reason: "trigger" })), u(t) && t.props.onClick?.(e);
|
|
3123
3126
|
}),
|
|
3124
3127
|
"aria-haspopup": "dialog",
|
|
3125
3128
|
"aria-expanded": I,
|
|
3126
|
-
"aria-controls": R ?
|
|
3127
|
-
},
|
|
3129
|
+
"aria-controls": R ? re : void 0
|
|
3130
|
+
}, Z = u(t) ? c(t, X) : t;
|
|
3128
3131
|
return /* @__PURE__ */ T("span", {
|
|
3129
|
-
ref:
|
|
3132
|
+
ref: ae,
|
|
3130
3133
|
className: e("inline-flex", O),
|
|
3131
|
-
onKeyDown:
|
|
3132
|
-
onBlur:
|
|
3133
|
-
children: [
|
|
3134
|
+
onKeyDown: se,
|
|
3135
|
+
onBlur: ce,
|
|
3136
|
+
children: [Z, R && /* @__PURE__ */ w(Hi, {
|
|
3134
3137
|
panelRef: N,
|
|
3135
3138
|
setFloating: U.setFloating,
|
|
3136
3139
|
floatingStyles: W,
|
|
@@ -3139,18 +3142,18 @@ function Ki({ trigger: t, children: o, "aria-label": l, "aria-labelledby": d, is
|
|
|
3139
3142
|
radius: E,
|
|
3140
3143
|
unstyled: D,
|
|
3141
3144
|
panelClassName: k,
|
|
3142
|
-
id:
|
|
3145
|
+
id: re,
|
|
3143
3146
|
ariaLabel: l,
|
|
3144
3147
|
ariaLabelledBy: d,
|
|
3145
3148
|
initialFocusRef: C,
|
|
3146
|
-
onTabOut:
|
|
3149
|
+
onTabOut: Y,
|
|
3147
3150
|
portalTarget: Dn(P),
|
|
3148
3151
|
children: o
|
|
3149
3152
|
})]
|
|
3150
3153
|
});
|
|
3151
3154
|
}
|
|
3152
3155
|
// src/components/radio_options/radio_option_row.tsx
|
|
3153
|
-
function
|
|
3156
|
+
function Ji({ 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 }) {
|
|
3154
3157
|
let h = !!u;
|
|
3155
3158
|
return /* @__PURE__ */ w(ht, {
|
|
3156
3159
|
item: t,
|
|
@@ -3186,7 +3189,7 @@ function qi({ option: t, optionId: n, descriptionId: r, name: i, orientation: a,
|
|
|
3186
3189
|
});
|
|
3187
3190
|
}
|
|
3188
3191
|
// src/components/radio_options/radio_options.tsx
|
|
3189
|
-
function
|
|
3192
|
+
function Yi({ 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, ..._ }) {
|
|
3190
3193
|
let { fieldId: v, errorId: y } = it(h), b = o ?? v, [x, S] = rt(r, i ?? ""), C = t.map((e) => typeof e == "string" ? {
|
|
3191
3194
|
value: e,
|
|
3192
3195
|
label: e
|
|
@@ -3207,7 +3210,7 @@ function Ji({ options: t, orientation: n = "vertical", value: r, defaultValue: i
|
|
|
3207
3210
|
}),
|
|
3208
3211
|
/* @__PURE__ */ w("div", {
|
|
3209
3212
|
className: e(n === "horizontal" ? "flex flex-row gap-2" : "flex flex-col gap-2"),
|
|
3210
|
-
children: C.map((e, t) => /* @__PURE__ */ w(
|
|
3213
|
+
children: C.map((e, t) => /* @__PURE__ */ w(Ji, {
|
|
3211
3214
|
option: e,
|
|
3212
3215
|
optionId: `${v}-${t}`,
|
|
3213
3216
|
descriptionId: `${v}-${t}-desc`,
|
|
@@ -3233,7 +3236,7 @@ function Ji({ options: t, orientation: n = "vertical", value: r, defaultValue: i
|
|
|
3233
3236
|
});
|
|
3234
3237
|
}
|
|
3235
3238
|
// src/components/select/select.tsx
|
|
3236
|
-
function
|
|
3239
|
+
function Xi({ 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 }) {
|
|
3237
3240
|
let { fieldId: _, errorId: v, descriptionId: y, labelId: b } = it(p);
|
|
3238
3241
|
return /* @__PURE__ */ w(xt, {
|
|
3239
3242
|
fieldId: _,
|
|
@@ -3269,19 +3272,19 @@ function Yi({ options: t, label: n, description: r, error: i, placeholder: a, ra
|
|
|
3269
3272
|
})
|
|
3270
3273
|
});
|
|
3271
3274
|
}
|
|
3272
|
-
var
|
|
3275
|
+
var Zi = "!rounded-l-none border-l", Qi = {
|
|
3273
3276
|
solid: "!border-l-white/40",
|
|
3274
3277
|
outline: "!border-l-0",
|
|
3275
3278
|
ghost: "!border-l-current/25",
|
|
3276
3279
|
subtle: "!border-l-current/25"
|
|
3277
|
-
},
|
|
3278
|
-
function
|
|
3279
|
-
return [
|
|
3280
|
+
}, $i = "!border-l-gray-400";
|
|
3281
|
+
function ea(e, t) {
|
|
3282
|
+
return [Zi, e === "solid" && t === "neutral" ? $i : Qi[e]];
|
|
3280
3283
|
}
|
|
3281
3284
|
// src/components/split_button/split_button.tsx
|
|
3282
|
-
var
|
|
3283
|
-
function
|
|
3284
|
-
let { children: n, onClick: r, menu: i, menuLabel: a, menuIcon: o =
|
|
3285
|
+
var ta = "i-mdi-chevron-down";
|
|
3286
|
+
function na(t) {
|
|
3287
|
+
let { children: n, onClick: r, menu: i, menuLabel: a, menuIcon: o = ta, 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 } : {
|
|
3285
3288
|
variant: _,
|
|
3286
3289
|
color: v,
|
|
3287
3290
|
radius: y
|
|
@@ -3292,7 +3295,7 @@ function ta(t) {
|
|
|
3292
3295
|
size: l,
|
|
3293
3296
|
disabled: d,
|
|
3294
3297
|
"aria-disabled": u && !d || void 0,
|
|
3295
|
-
className: e(!g && ["relative focus-visible:z-10",
|
|
3298
|
+
className: e(!g && ["relative focus-visible:z-10", ea(_, v)]),
|
|
3296
3299
|
...b
|
|
3297
3300
|
});
|
|
3298
3301
|
return /* @__PURE__ */ T("div", {
|
|
@@ -3310,7 +3313,7 @@ function ta(t) {
|
|
|
3310
3313
|
className: e(!g && ["relative focus-visible:z-10", "!rounded-r-none"]),
|
|
3311
3314
|
...b,
|
|
3312
3315
|
children: n
|
|
3313
|
-
}), /* @__PURE__ */ w(
|
|
3316
|
+
}), /* @__PURE__ */ w($r, {
|
|
3314
3317
|
trigger: x,
|
|
3315
3318
|
align: s,
|
|
3316
3319
|
radius: y,
|
|
@@ -3320,28 +3323,28 @@ function ta(t) {
|
|
|
3320
3323
|
});
|
|
3321
3324
|
}
|
|
3322
3325
|
// src/components/spinner/spinner.tsx
|
|
3323
|
-
var
|
|
3326
|
+
var ra = 0, ia = "inline-flex items-center gap-2", aa = {
|
|
3324
3327
|
xs: "text-xs",
|
|
3325
3328
|
sm: "text-sm",
|
|
3326
3329
|
md: "text-sm",
|
|
3327
3330
|
lg: "text-base"
|
|
3328
|
-
},
|
|
3331
|
+
}, oa = {
|
|
3329
3332
|
xs: "w-3.5 h-3.5",
|
|
3330
3333
|
sm: "w-4 h-4",
|
|
3331
3334
|
md: "w-5 h-5",
|
|
3332
3335
|
lg: "w-6 h-6"
|
|
3333
3336
|
};
|
|
3334
|
-
function
|
|
3337
|
+
function sa(t) {
|
|
3335
3338
|
let { size: n = "md", label: r, unstyled: i = !1, className: a, iconClassName: o, labelClassName: s, ...c } = t, l = Q(), [u, d] = b(!1);
|
|
3336
3339
|
m(() => {
|
|
3337
|
-
let e = setTimeout(() => d(!0),
|
|
3340
|
+
let e = setTimeout(() => d(!0), ra);
|
|
3338
3341
|
return () => clearTimeout(e);
|
|
3339
3342
|
}, []);
|
|
3340
|
-
let f = r ?? l.loading, p = e(!i &&
|
|
3343
|
+
let f = r ?? l.loading, p = e(!i && oa[n], o);
|
|
3341
3344
|
return /* @__PURE__ */ T("span", {
|
|
3342
3345
|
role: "status",
|
|
3343
3346
|
...c,
|
|
3344
|
-
className: e(!i && [
|
|
3347
|
+
className: e(!i && [ia, aa[n]], a),
|
|
3345
3348
|
children: [
|
|
3346
3349
|
/* @__PURE__ */ w("span", {
|
|
3347
3350
|
className: e("i-svg-spinners-3-dots-fade ms-spinner-animated", p),
|
|
@@ -3359,11 +3362,11 @@ function oa(t) {
|
|
|
3359
3362
|
});
|
|
3360
3363
|
}
|
|
3361
3364
|
// src/components/switch/switch.tsx
|
|
3362
|
-
var
|
|
3363
|
-
function
|
|
3364
|
-
return t ? "sr-only" : e(
|
|
3365
|
+
var ca = "absolute -inset-0.5 m-0 h-6 w-11 appearance-none opacity-0";
|
|
3366
|
+
function la(t, n) {
|
|
3367
|
+
return t ? "sr-only" : e(ca, n ? "cursor-not-allowed" : "cursor-pointer");
|
|
3365
3368
|
}
|
|
3366
|
-
function
|
|
3369
|
+
function ua({ htmlFor: e, className: t, children: n }) {
|
|
3367
3370
|
return e === void 0 ? /* @__PURE__ */ w("div", {
|
|
3368
3371
|
className: t,
|
|
3369
3372
|
children: n
|
|
@@ -3373,14 +3376,14 @@ function la({ htmlFor: e, className: t, children: n }) {
|
|
|
3373
3376
|
children: n
|
|
3374
3377
|
});
|
|
3375
3378
|
}
|
|
3376
|
-
function
|
|
3379
|
+
function da({ 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 }) {
|
|
3377
3380
|
let { fieldId: _, errorId: b, descriptionId: x } = it(d), [S, E] = rt(c, l), D = y(null), O = !!t, k = W(f, !!n && x, r && b);
|
|
3378
3381
|
lt("Switch", D, !!t || !!p?.trim() || !!m?.trim());
|
|
3379
|
-
let M = v(() =>
|
|
3382
|
+
let M = v(() => K(D, h), [h]);
|
|
3380
3383
|
return /* @__PURE__ */ T("div", {
|
|
3381
3384
|
className: e(a ? "w-full" : "w-fit", s),
|
|
3382
3385
|
children: [
|
|
3383
|
-
/* @__PURE__ */ T(
|
|
3386
|
+
/* @__PURE__ */ T(ua, {
|
|
3384
3387
|
htmlFor: O ? _ : void 0,
|
|
3385
3388
|
className: e("flex items-center gap-3 cursor-pointer", g.disabled && "cursor-not-allowed opacity-50"),
|
|
3386
3389
|
children: [/* @__PURE__ */ T("span", {
|
|
@@ -3394,7 +3397,7 @@ function ua({ label: t, description: n, error: r, unstyled: i = !1, fullWidth: a
|
|
|
3394
3397
|
role: "switch",
|
|
3395
3398
|
ref: M,
|
|
3396
3399
|
id: _,
|
|
3397
|
-
className:
|
|
3400
|
+
className: la(O, g.disabled === !0),
|
|
3398
3401
|
checked: S,
|
|
3399
3402
|
onChange: (e) => {
|
|
3400
3403
|
E(e.target.checked), u?.(e);
|
|
@@ -3427,11 +3430,11 @@ function ua({ label: t, description: n, error: r, unstyled: i = !1, fullWidth: a
|
|
|
3427
3430
|
});
|
|
3428
3431
|
}
|
|
3429
3432
|
// src/components/tabs/tabs_styles.ts
|
|
3430
|
-
var
|
|
3433
|
+
var fa = {
|
|
3431
3434
|
list: "gap-1 p-1 bg-gray-100 dark:bg-gray-800/50",
|
|
3432
3435
|
tab: "",
|
|
3433
3436
|
indicator: `absolute inset-0 ${_e} border border-gray-200 dark:border-gray-700`
|
|
3434
|
-
},
|
|
3437
|
+
}, pa = {
|
|
3435
3438
|
line: {
|
|
3436
3439
|
activeTab: "border-transparent text-gray-900 dark:text-gray-100",
|
|
3437
3440
|
idleTab: "border-transparent text-gray-500 dark:text-gray-400",
|
|
@@ -3454,52 +3457,52 @@ var da = {
|
|
|
3454
3457
|
idleTab: "text-gray-600 dark:text-gray-400",
|
|
3455
3458
|
idleHover: "hover:text-gray-900 dark:hover:text-gray-100",
|
|
3456
3459
|
byOrientation: {
|
|
3457
|
-
horizontal:
|
|
3458
|
-
vertical:
|
|
3460
|
+
horizontal: fa,
|
|
3461
|
+
vertical: fa
|
|
3459
3462
|
}
|
|
3460
3463
|
}
|
|
3461
|
-
},
|
|
3464
|
+
}, ma = {
|
|
3462
3465
|
xs: "px-2 py-1 text-xs",
|
|
3463
3466
|
sm: "px-3 py-1.5 text-sm",
|
|
3464
3467
|
md: "px-4 py-2.5 text-sm",
|
|
3465
3468
|
lg: "px-5 py-3 text-base"
|
|
3466
|
-
},
|
|
3469
|
+
}, ha = {
|
|
3467
3470
|
xs: "w-3.5 h-3.5",
|
|
3468
3471
|
sm: "w-4 h-4",
|
|
3469
3472
|
md: "w-4 h-4",
|
|
3470
3473
|
lg: "w-5 h-5"
|
|
3471
|
-
},
|
|
3474
|
+
}, ga = {
|
|
3472
3475
|
horizontal: e(O, F.primary.focusOutline),
|
|
3473
3476
|
vertical: e("outline-hidden focus-visible:outline-2", "focus-visible:-outline-offset-2", F.primary.focusOutline)
|
|
3474
|
-
},
|
|
3475
|
-
function
|
|
3476
|
-
return e("w-full", t === "vertical" &&
|
|
3477
|
+
}, _a = "items-center", va = e("flex-col items-stretch min-h-0 overflow-y-auto overflow-x-hidden", xe), ya = "w-48 shrink-0", ba = "justify-start text-left whitespace-normal", xa = "whitespace-nowrap", Sa = "flex min-h-0", Ca = e("flex-1 min-w-0 min-h-0 overflow-y-auto", xe), wa = "ml-6", Ta = "mt-4";
|
|
3478
|
+
function Ea(t, n) {
|
|
3479
|
+
return e("w-full", t === "vertical" && Sa, n);
|
|
3477
3480
|
}
|
|
3478
|
-
function
|
|
3481
|
+
function Da(t) {
|
|
3479
3482
|
let { orientation: n, unstyled: r, className: i } = t, a = n === "vertical";
|
|
3480
|
-
return e(a &&
|
|
3483
|
+
return e(a && Ca, !r && [a ? wa : Ta, ga[n]], i);
|
|
3481
3484
|
}
|
|
3482
|
-
function
|
|
3485
|
+
function Oa(t) {
|
|
3483
3486
|
let { variant: n, orientation: r, radius: i, unstyled: a, isFullWidth: o, className: s } = t, c = r === "vertical";
|
|
3484
|
-
return e("flex", c ?
|
|
3487
|
+
return e("flex", c ? va : _a, !c && o && "w-full", !a && c && ya, !a && pa[n].byOrientation[r].list, !a && n === "segmented" && z[i], s);
|
|
3485
3488
|
}
|
|
3486
|
-
function
|
|
3487
|
-
let { variant: n, orientation: r, size: i, radius: a, unstyled: o, isActive: s, isDisabled: c, isFullWidth: l, className: u } = t, d = r === "vertical", f =
|
|
3488
|
-
return e("relative flex items-center gap-2", d ?
|
|
3489
|
+
function ka(t) {
|
|
3490
|
+
let { variant: n, orientation: r, size: i, radius: a, unstyled: o, isActive: s, isDisabled: c, isFullWidth: l, className: u } = t, d = r === "vertical", f = pa[n];
|
|
3491
|
+
return e("relative flex items-center gap-2", d ? ba : xa, !d && l && "flex-1 justify-center", c ? "opacity-50 cursor-not-allowed" : "cursor-pointer", !o && [
|
|
3489
3492
|
"font-medium transition-colors duration-200",
|
|
3490
|
-
|
|
3493
|
+
ma[i],
|
|
3491
3494
|
f.byOrientation[r].tab,
|
|
3492
3495
|
s ? f.activeTab : [f.idleTab, !c && f.idleHover],
|
|
3493
3496
|
n === "segmented" && z[a],
|
|
3494
|
-
|
|
3497
|
+
ga[r]
|
|
3495
3498
|
], u);
|
|
3496
3499
|
}
|
|
3497
|
-
function
|
|
3500
|
+
function Aa(t) {
|
|
3498
3501
|
let { variant: n, orientation: r, radius: i } = t;
|
|
3499
|
-
return e("tabs-indicator pointer-events-none",
|
|
3502
|
+
return e("tabs-indicator pointer-events-none", pa[n].byOrientation[r].indicator, n === "segmented" && z[i]);
|
|
3500
3503
|
}
|
|
3501
3504
|
// src/components/tabs/tab_button.tsx
|
|
3502
|
-
function
|
|
3505
|
+
function ja({ 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 }) {
|
|
3503
3506
|
let _ = !!t.disabled;
|
|
3504
3507
|
return /* @__PURE__ */ T("button", {
|
|
3505
3508
|
ref: h,
|
|
@@ -3513,7 +3516,7 @@ function Aa({ item: t, isActive: n, hasMountedPanel: r, isTabStop: i, isFullWidt
|
|
|
3513
3516
|
disabled: t.disabled,
|
|
3514
3517
|
onClick: p,
|
|
3515
3518
|
onKeyDown: m,
|
|
3516
|
-
className:
|
|
3519
|
+
className: ka({
|
|
3517
3520
|
variant: o,
|
|
3518
3521
|
orientation: s,
|
|
3519
3522
|
size: c,
|
|
@@ -3527,7 +3530,7 @@ function Aa({ item: t, isActive: n, hasMountedPanel: r, isTabStop: i, isFullWidt
|
|
|
3527
3530
|
n && !u && /* @__PURE__ */ w("span", {
|
|
3528
3531
|
ref: g,
|
|
3529
3532
|
"aria-hidden": "true",
|
|
3530
|
-
className:
|
|
3533
|
+
className: Aa({
|
|
3531
3534
|
variant: o,
|
|
3532
3535
|
orientation: s,
|
|
3533
3536
|
radius: l
|
|
@@ -3535,7 +3538,7 @@ function Aa({ item: t, isActive: n, hasMountedPanel: r, isTabStop: i, isFullWidt
|
|
|
3535
3538
|
}),
|
|
3536
3539
|
t.icon && /* @__PURE__ */ w("span", {
|
|
3537
3540
|
"aria-hidden": "true",
|
|
3538
|
-
className: e("relative shrink-0",
|
|
3541
|
+
className: e("relative shrink-0", ha[c], t.icon)
|
|
3539
3542
|
}),
|
|
3540
3543
|
/* @__PURE__ */ w("span", {
|
|
3541
3544
|
className: "relative",
|
|
@@ -3546,7 +3549,7 @@ function Aa({ item: t, isActive: n, hasMountedPanel: r, isTabStop: i, isFullWidt
|
|
|
3546
3549
|
});
|
|
3547
3550
|
}
|
|
3548
3551
|
// src/components/tabs/tab_panel.tsx
|
|
3549
|
-
function
|
|
3552
|
+
function Ma({ panelId: t, tabId: n, isHidden: r, isAnimated: i, className: a, contentKey: o, children: s }) {
|
|
3550
3553
|
return /* @__PURE__ */ w("div", {
|
|
3551
3554
|
role: "tabpanel",
|
|
3552
3555
|
id: t,
|
|
@@ -3561,11 +3564,11 @@ function ja({ panelId: t, tabId: n, isHidden: r, isAnimated: i, className: a, co
|
|
|
3561
3564
|
});
|
|
3562
3565
|
}
|
|
3563
3566
|
// src/components/tabs/use_tab_indicator_transition.ts
|
|
3564
|
-
var
|
|
3565
|
-
function
|
|
3566
|
-
return typeof window > "u" || typeof window.matchMedia != "function" ? !1 : window.matchMedia(
|
|
3567
|
+
var Na = 200, Pa = "ease-out", Fa = "(prefers-reduced-motion: reduce)";
|
|
3568
|
+
function Ia() {
|
|
3569
|
+
return typeof window > "u" || typeof window.matchMedia != "function" ? !1 : window.matchMedia(Fa).matches;
|
|
3567
3570
|
}
|
|
3568
|
-
function
|
|
3571
|
+
function La(e, t, n) {
|
|
3569
3572
|
return e === "vertical" ? [{
|
|
3570
3573
|
transform: `translateY(${t.top - n.top}px)`,
|
|
3571
3574
|
height: `${t.height}px`
|
|
@@ -3580,16 +3583,16 @@ function Ia(e, t, n) {
|
|
|
3580
3583
|
width: `${n.width}px`
|
|
3581
3584
|
}];
|
|
3582
3585
|
}
|
|
3583
|
-
function
|
|
3584
|
-
e.animate(
|
|
3585
|
-
duration:
|
|
3586
|
-
easing:
|
|
3586
|
+
function Ra(e, t, n, r) {
|
|
3587
|
+
e.animate(La(t, n, r), {
|
|
3588
|
+
duration: Na,
|
|
3589
|
+
easing: Pa
|
|
3587
3590
|
});
|
|
3588
3591
|
}
|
|
3589
|
-
function
|
|
3590
|
-
return !e || !t || !n ? !1 : !
|
|
3592
|
+
function za(e, t, n) {
|
|
3593
|
+
return !e || !t || !n ? !1 : !Ia();
|
|
3591
3594
|
}
|
|
3592
|
-
function
|
|
3595
|
+
function Ba(e) {
|
|
3593
3596
|
let { activeIndex: t, indicatorRef: n, isAnimated: r, orientation: i } = e, a = y(null);
|
|
3594
3597
|
_(() => {
|
|
3595
3598
|
let e = n.current;
|
|
@@ -3598,7 +3601,7 @@ function za(e) {
|
|
|
3598
3601
|
return;
|
|
3599
3602
|
}
|
|
3600
3603
|
let t = e.getBoundingClientRect(), o = typeof e.animate == "function";
|
|
3601
|
-
|
|
3604
|
+
za(a.current, r, o) && Ra(e, i, a.current, t), a.current = t;
|
|
3602
3605
|
}, [
|
|
3603
3606
|
t,
|
|
3604
3607
|
n,
|
|
@@ -3607,34 +3610,34 @@ function za(e) {
|
|
|
3607
3610
|
]);
|
|
3608
3611
|
}
|
|
3609
3612
|
// src/components/tabs/use_tabs_keyboard_navigation.ts
|
|
3610
|
-
var
|
|
3613
|
+
var Va = {
|
|
3611
3614
|
Home: () => 0,
|
|
3612
3615
|
End: (e, t) => t - 1
|
|
3613
|
-
},
|
|
3616
|
+
}, Ha = (e, t) => (e + 1) % t, Ua = (e, t) => (e - 1 + t) % t, Wa = {
|
|
3614
3617
|
horizontal: {
|
|
3615
|
-
...
|
|
3616
|
-
ArrowRight:
|
|
3617
|
-
ArrowLeft:
|
|
3618
|
+
...Va,
|
|
3619
|
+
ArrowRight: Ha,
|
|
3620
|
+
ArrowLeft: Ua
|
|
3618
3621
|
},
|
|
3619
3622
|
vertical: {
|
|
3620
|
-
...
|
|
3621
|
-
ArrowDown:
|
|
3622
|
-
ArrowUp:
|
|
3623
|
+
...Va,
|
|
3624
|
+
ArrowDown: Ha,
|
|
3625
|
+
ArrowUp: Ua
|
|
3623
3626
|
}
|
|
3624
3627
|
};
|
|
3625
|
-
function
|
|
3628
|
+
function Ga(e) {
|
|
3626
3629
|
return e.flatMap((e, t) => e.disabled ? [] : [t]);
|
|
3627
3630
|
}
|
|
3628
|
-
function
|
|
3631
|
+
function Ka(e, t) {
|
|
3629
3632
|
let n = e[t];
|
|
3630
|
-
return n && !n.disabled ? t :
|
|
3633
|
+
return n && !n.disabled ? t : Ga(e)[0] ?? -1;
|
|
3631
3634
|
}
|
|
3632
|
-
function
|
|
3635
|
+
function qa(e) {
|
|
3633
3636
|
let { items: t, activeIndex: n, orientation: r, onNavigate: i } = e;
|
|
3634
3637
|
return (e) => {
|
|
3635
|
-
let a =
|
|
3638
|
+
let a = Wa[r][e.key];
|
|
3636
3639
|
if (!a) return;
|
|
3637
|
-
let o =
|
|
3640
|
+
let o = Ga(t);
|
|
3638
3641
|
if (o.length === 0) return;
|
|
3639
3642
|
e.preventDefault();
|
|
3640
3643
|
let s = a(o.indexOf(n), o.length);
|
|
@@ -3642,34 +3645,34 @@ function Ka(e) {
|
|
|
3642
3645
|
};
|
|
3643
3646
|
}
|
|
3644
3647
|
// src/components/tabs/tabs.tsx
|
|
3645
|
-
function
|
|
3648
|
+
function Ja({ 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: _ }) {
|
|
3646
3649
|
let [v, b] = rt(t, n), x = g(), S = y([]), C = y(null), E = (t) => {
|
|
3647
3650
|
e[t]?.disabled || (b(t), _?.(t));
|
|
3648
3651
|
}, D = (e) => {
|
|
3649
3652
|
S.current[e]?.focus(), E(e);
|
|
3650
|
-
}, O =
|
|
3653
|
+
}, O = Ka(e, v), k = qa({
|
|
3651
3654
|
items: e,
|
|
3652
3655
|
activeIndex: O,
|
|
3653
3656
|
orientation: i,
|
|
3654
3657
|
onNavigate: D
|
|
3655
|
-
}), A =
|
|
3658
|
+
}), A = Da({
|
|
3656
3659
|
orientation: i,
|
|
3657
3660
|
unstyled: c,
|
|
3658
3661
|
className: h
|
|
3659
3662
|
}), j = l && !c;
|
|
3660
|
-
return
|
|
3663
|
+
return Ba({
|
|
3661
3664
|
activeIndex: v,
|
|
3662
3665
|
indicatorRef: C,
|
|
3663
3666
|
isAnimated: l,
|
|
3664
3667
|
orientation: i
|
|
3665
3668
|
}), /* @__PURE__ */ T("div", {
|
|
3666
|
-
className:
|
|
3669
|
+
className: Ea(i, p),
|
|
3667
3670
|
children: [/* @__PURE__ */ w("div", {
|
|
3668
3671
|
role: "tablist",
|
|
3669
3672
|
"aria-label": d,
|
|
3670
3673
|
"aria-labelledby": f,
|
|
3671
3674
|
"aria-orientation": i,
|
|
3672
|
-
className:
|
|
3675
|
+
className: Oa({
|
|
3673
3676
|
variant: r,
|
|
3674
3677
|
orientation: i,
|
|
3675
3678
|
radius: o,
|
|
@@ -3677,7 +3680,7 @@ function qa({ items: e, value: t, defaultIndex: n = 0, variant: r = "line", orie
|
|
|
3677
3680
|
isFullWidth: s,
|
|
3678
3681
|
className: m
|
|
3679
3682
|
}),
|
|
3680
|
-
children: e.map((e, t) => /* @__PURE__ */ w(
|
|
3683
|
+
children: e.map((e, t) => /* @__PURE__ */ w(ja, {
|
|
3681
3684
|
ref: (e) => {
|
|
3682
3685
|
S.current[t] = e;
|
|
3683
3686
|
},
|
|
@@ -3697,14 +3700,14 @@ function qa({ items: e, value: t, defaultIndex: n = 0, variant: r = "line", orie
|
|
|
3697
3700
|
onSelect: () => E(t),
|
|
3698
3701
|
onKeyDown: k
|
|
3699
3702
|
}, e.title))
|
|
3700
|
-
}), u ? e.map((e, t) => /* @__PURE__ */ w(
|
|
3703
|
+
}), u ? e.map((e, t) => /* @__PURE__ */ w(Ma, {
|
|
3701
3704
|
panelId: `${x}-panel-${t}`,
|
|
3702
3705
|
tabId: `${x}-tab-${t}`,
|
|
3703
3706
|
isHidden: t !== v,
|
|
3704
3707
|
isAnimated: j,
|
|
3705
3708
|
className: A,
|
|
3706
3709
|
children: e.content
|
|
3707
|
-
}, e.title)) : /* @__PURE__ */ w(
|
|
3710
|
+
}, e.title)) : /* @__PURE__ */ w(Ma, {
|
|
3708
3711
|
panelId: `${x}-panel-${v}`,
|
|
3709
3712
|
tabId: `${x}-tab-${v}`,
|
|
3710
3713
|
isHidden: !1,
|
|
@@ -3716,8 +3719,8 @@ function qa({ items: e, value: t, defaultIndex: n = 0, variant: r = "line", orie
|
|
|
3716
3719
|
});
|
|
3717
3720
|
}
|
|
3718
3721
|
// src/components/textarea/textarea.tsx
|
|
3719
|
-
function
|
|
3720
|
-
let { fieldId: v, errorId: y, descriptionId: b, labelId: x, characterCountId: S } = it(m), { length: C, trackLength: E } =
|
|
3722
|
+
function Ya({ 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, ..._ }) {
|
|
3723
|
+
let { fieldId: v, errorId: y, descriptionId: b, labelId: x, characterCountId: S } = it(m), { length: C, trackLength: E } = qr(d, f), D = i && (a !== void 0 || o !== void 0), O = (e) => {
|
|
3721
3724
|
E(e.target.value), p?.(e);
|
|
3722
3725
|
};
|
|
3723
3726
|
return /* @__PURE__ */ T(xt, {
|
|
@@ -3756,7 +3759,7 @@ function Ja({ label: t, description: n, error: r, showCharCount: i = !1, minLeng
|
|
|
3756
3759
|
});
|
|
3757
3760
|
}
|
|
3758
3761
|
// src/lib/is_webkit_gtk.ts
|
|
3759
|
-
var
|
|
3762
|
+
var Xa = "AppleWebKit", Za = ["Linux", "X11"], Qa = [
|
|
3760
3763
|
"Chrome",
|
|
3761
3764
|
"Chromium",
|
|
3762
3765
|
"Edg",
|
|
@@ -3764,12 +3767,12 @@ var Ya = "AppleWebKit", Xa = ["Linux", "X11"], Za = [
|
|
|
3764
3767
|
"CriOS",
|
|
3765
3768
|
"FxiOS"
|
|
3766
3769
|
];
|
|
3767
|
-
function
|
|
3768
|
-
return !e.includes(
|
|
3770
|
+
function $a(e) {
|
|
3771
|
+
return !e.includes(Xa) || !Za.some((t) => e.includes(t)) ? !1 : !Qa.some((t) => e.includes(t));
|
|
3769
3772
|
}
|
|
3770
3773
|
// src/lib/theme_transition.ts
|
|
3771
|
-
var
|
|
3772
|
-
async function
|
|
3774
|
+
var eo = 750, to = "ease-in-out";
|
|
3775
|
+
async function no({ theme: e, element: t, transitionDuration: n = eo, transitionEasing: r = to, applyThemeCallback: i }) {
|
|
3773
3776
|
if (!document.startViewTransition || globalThis.matchMedia("(prefers-reduced-motion: reduce)").matches) {
|
|
3774
3777
|
i(e);
|
|
3775
3778
|
return;
|
|
@@ -3783,81 +3786,81 @@ async function to({ theme: e, element: t, transitionDuration: n = $a, transition
|
|
|
3783
3786
|
pseudoElement: "::view-transition-new(root)"
|
|
3784
3787
|
});
|
|
3785
3788
|
}
|
|
3786
|
-
function
|
|
3789
|
+
function ro(e) {
|
|
3787
3790
|
return e === "light" ? "dark" : e === "dark" ? "system" : "light";
|
|
3788
3791
|
}
|
|
3789
3792
|
// src/stores/theme_store/theme_storage_key.ts
|
|
3790
|
-
var
|
|
3793
|
+
var io = "theme";
|
|
3791
3794
|
// src/stores/theme_store/theme_store.ts
|
|
3792
|
-
function
|
|
3795
|
+
function ao(e) {
|
|
3793
3796
|
return e === "light" || e === "dark" || e === "system";
|
|
3794
3797
|
}
|
|
3795
|
-
function
|
|
3798
|
+
function oo() {
|
|
3796
3799
|
return globalThis.window !== void 0 && globalThis.document !== void 0;
|
|
3797
3800
|
}
|
|
3798
|
-
var
|
|
3799
|
-
function
|
|
3801
|
+
var so = "meta[name=\"theme-color\"][data-light][data-dark]";
|
|
3802
|
+
function co(e) {
|
|
3800
3803
|
let t = e ? "data-dark" : "data-light";
|
|
3801
|
-
for (let e of document.querySelectorAll(
|
|
3804
|
+
for (let e of document.querySelectorAll(so)) e.setAttribute("content", e.getAttribute(t) ?? "");
|
|
3802
3805
|
}
|
|
3803
|
-
function
|
|
3806
|
+
function lo(e) {
|
|
3804
3807
|
let t = window.matchMedia("(prefers-color-scheme: dark)").matches, n = e === "dark" || e === "system" && t;
|
|
3805
|
-
document.documentElement.classList.toggle("dark", n),
|
|
3808
|
+
document.documentElement.classList.toggle("dark", n), co(n);
|
|
3806
3809
|
}
|
|
3807
|
-
function
|
|
3808
|
-
if (!
|
|
3810
|
+
function uo() {
|
|
3811
|
+
if (!oo()) return "system";
|
|
3809
3812
|
try {
|
|
3810
|
-
let e = globalThis.localStorage.getItem(
|
|
3811
|
-
return
|
|
3813
|
+
let e = globalThis.localStorage.getItem(io);
|
|
3814
|
+
return ao(e) ? e : "system";
|
|
3812
3815
|
} catch {
|
|
3813
3816
|
return "system";
|
|
3814
3817
|
}
|
|
3815
3818
|
}
|
|
3816
|
-
function
|
|
3817
|
-
if (
|
|
3818
|
-
globalThis.localStorage.setItem(
|
|
3819
|
+
function fo(e) {
|
|
3820
|
+
if (oo()) try {
|
|
3821
|
+
globalThis.localStorage.setItem(io, e);
|
|
3819
3822
|
} catch {
|
|
3820
3823
|
return;
|
|
3821
3824
|
}
|
|
3822
3825
|
}
|
|
3823
|
-
var
|
|
3824
|
-
|
|
3825
|
-
var
|
|
3826
|
-
theme:
|
|
3826
|
+
var po = uo();
|
|
3827
|
+
oo() && lo(po);
|
|
3828
|
+
var mo = E((e) => ({
|
|
3829
|
+
theme: po,
|
|
3827
3830
|
setTheme: (t) => {
|
|
3828
|
-
|
|
3831
|
+
lo(t), fo(t), e({ theme: t });
|
|
3829
3832
|
}
|
|
3830
3833
|
}));
|
|
3831
|
-
|
|
3834
|
+
oo() && (globalThis.addEventListener("storage", (e) => {
|
|
3832
3835
|
if (e.key !== "theme") return;
|
|
3833
|
-
let t =
|
|
3834
|
-
|
|
3836
|
+
let t = ao(e.newValue) ? e.newValue : "system";
|
|
3837
|
+
lo(t), mo.setState({ theme: t });
|
|
3835
3838
|
}), globalThis.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", () => {
|
|
3836
|
-
|
|
3839
|
+
mo.getState().theme === "system" && lo("system");
|
|
3837
3840
|
}));
|
|
3838
3841
|
// src/components/theme_toggle/theme_toggle.tsx
|
|
3839
|
-
var
|
|
3842
|
+
var ho = {
|
|
3840
3843
|
light: "i-tabler-sun text-yellow-500",
|
|
3841
3844
|
dark: "i-tabler-moon-stars text-gray-700 dark:text-yellow-500",
|
|
3842
3845
|
system: "i-tabler-device-desktop text-blue-500"
|
|
3843
|
-
},
|
|
3846
|
+
}, go = {
|
|
3844
3847
|
light: "i-tabler-sun",
|
|
3845
3848
|
dark: "i-tabler-moon-stars",
|
|
3846
3849
|
system: "i-tabler-device-desktop"
|
|
3847
|
-
},
|
|
3848
|
-
function
|
|
3850
|
+
}, _o = "i-tabler-device-desktop text-gray-400", vo = "i-tabler-device-desktop";
|
|
3851
|
+
function yo(e, t, n) {
|
|
3849
3852
|
return e ? { unstyled: !0 } : {
|
|
3850
3853
|
radius: t,
|
|
3851
3854
|
variant: n
|
|
3852
3855
|
};
|
|
3853
3856
|
}
|
|
3854
|
-
function
|
|
3855
|
-
return n ? t ?
|
|
3857
|
+
function bo(e, t, n) {
|
|
3858
|
+
return n ? t ? go[e] : vo : t ? ho[e] : _o;
|
|
3856
3859
|
}
|
|
3857
|
-
function
|
|
3858
|
-
let l =
|
|
3859
|
-
let r =
|
|
3860
|
-
i && a ? await
|
|
3860
|
+
function xo({ isTransitionEnabled: e, transitionDuration: t, transitionEasing: n, size: r = "md", unstyled: i = !1, radius: a, variant: o, getAriaLabel: s, tooltip: c }) {
|
|
3861
|
+
let l = mo((e) => e.theme), u = mo((e) => e.setTheme), d = Q(), p = yt(), m = y(null), h = f(async () => {
|
|
3862
|
+
let r = ro(l), i = m.current, a = e ?? !$a(navigator.userAgent);
|
|
3863
|
+
i && a ? await no({
|
|
3861
3864
|
theme: r,
|
|
3862
3865
|
element: i,
|
|
3863
3866
|
transitionDuration: t,
|
|
@@ -3870,7 +3873,7 @@ function bo({ isTransitionEnabled: e, transitionDuration: t, transitionEasing: n
|
|
|
3870
3873
|
t,
|
|
3871
3874
|
n,
|
|
3872
3875
|
u
|
|
3873
|
-
]), g =
|
|
3876
|
+
]), g = bo(l, p, i), _ = yo(i, a, o);
|
|
3874
3877
|
return /* @__PURE__ */ w(X, {
|
|
3875
3878
|
ref: m,
|
|
3876
3879
|
icon: g,
|
|
@@ -3884,7 +3887,7 @@ function bo({ isTransitionEnabled: e, transitionDuration: t, transitionEasing: n
|
|
|
3884
3887
|
});
|
|
3885
3888
|
}
|
|
3886
3889
|
// src/components/toast/toast_focus.ts
|
|
3887
|
-
function
|
|
3890
|
+
function So(e) {
|
|
3888
3891
|
for (let t = e.nextElementSibling; t; t = t.nextElementSibling) {
|
|
3889
3892
|
if (t.hasAttribute("inert")) continue;
|
|
3890
3893
|
let e = t.querySelector("button");
|
|
@@ -3892,23 +3895,23 @@ function xo(e) {
|
|
|
3892
3895
|
}
|
|
3893
3896
|
return null;
|
|
3894
3897
|
}
|
|
3895
|
-
function
|
|
3898
|
+
function Co({ toastElement: e, previousFocus: t }) {
|
|
3896
3899
|
if (!e.contains(document.activeElement)) return;
|
|
3897
|
-
let n =
|
|
3900
|
+
let n = So(e);
|
|
3898
3901
|
if (n) return n.focus();
|
|
3899
3902
|
if (t?.isConnected && !e.contains(t)) return t.focus();
|
|
3900
3903
|
e.closest("[data-ms-toaster-region]")?.focus();
|
|
3901
3904
|
}
|
|
3902
3905
|
// src/components/toast/toast_styles.ts
|
|
3903
|
-
var
|
|
3904
|
-
function Eo(e) {
|
|
3905
|
-
return e === "error" ? To : wo;
|
|
3906
|
-
}
|
|
3906
|
+
var wo = 2 ** 31 - 1, To = 4e3, Eo = 6e3;
|
|
3907
3907
|
function Do(e) {
|
|
3908
|
-
return e
|
|
3908
|
+
return e === "error" ? Eo : To;
|
|
3909
|
+
}
|
|
3910
|
+
function Oo(e) {
|
|
3911
|
+
return e <= 0 || !Number.isFinite(e) || e >= wo;
|
|
3909
3912
|
}
|
|
3910
3913
|
// src/components/toast/toast_timer_bar.tsx
|
|
3911
|
-
function
|
|
3914
|
+
function ko({ duration: t, isRunning: n, isStyled: r }) {
|
|
3912
3915
|
let i = {
|
|
3913
3916
|
animationDuration: `${t}ms`,
|
|
3914
3917
|
animationFillMode: "forwards",
|
|
@@ -3923,7 +3926,7 @@ function Oo({ duration: t, isRunning: n, isStyled: r }) {
|
|
|
3923
3926
|
});
|
|
3924
3927
|
}
|
|
3925
3928
|
// src/components/toast/toaster_item_content.tsx
|
|
3926
|
-
function
|
|
3929
|
+
function Ao({ tone: t, message: n, description: r, action: i, radius: a, unstyled: o, closeLabel: s, timerDuration: c, isTimerRunning: l, timerKey: u, onAction: d, onDismiss: f }) {
|
|
3927
3930
|
return /* @__PURE__ */ T("div", {
|
|
3928
3931
|
className: e("flex items-start gap-3", !o && [
|
|
3929
3932
|
"relative overflow-hidden px-4 py-3 border text-sm",
|
|
@@ -3966,7 +3969,7 @@ function ko({ tone: t, message: n, description: r, action: i, radius: a, unstyle
|
|
|
3966
3969
|
unstyled: o,
|
|
3967
3970
|
onClick: f
|
|
3968
3971
|
}),
|
|
3969
|
-
c !== null && /* @__PURE__ */ w(
|
|
3972
|
+
c !== null && /* @__PURE__ */ w(ko, {
|
|
3970
3973
|
duration: c,
|
|
3971
3974
|
isRunning: l,
|
|
3972
3975
|
isStyled: !o
|
|
@@ -3975,14 +3978,14 @@ function ko({ tone: t, message: n, description: r, action: i, radius: a, unstyle
|
|
|
3975
3978
|
});
|
|
3976
3979
|
}
|
|
3977
3980
|
// src/components/toast/toaster_styles.ts
|
|
3978
|
-
var
|
|
3981
|
+
var jo = {
|
|
3979
3982
|
"top-left": "ms-toaster-top ms-toaster-left",
|
|
3980
3983
|
"top-center": "ms-toaster-top ms-toaster-center",
|
|
3981
3984
|
"top-right": "ms-toaster-top ms-toaster-right",
|
|
3982
3985
|
"bottom-left": "ms-toaster-bottom ms-toaster-left",
|
|
3983
3986
|
"bottom-center": "ms-toaster-bottom ms-toaster-center",
|
|
3984
3987
|
"bottom-right": "ms-toaster-bottom ms-toaster-right"
|
|
3985
|
-
},
|
|
3988
|
+
}, Mo = {
|
|
3986
3989
|
"top-left": "ms-toaster-item-top-left",
|
|
3987
3990
|
"top-center": "ms-toaster-item-top-center",
|
|
3988
3991
|
"top-right": "ms-toaster-item-top-right",
|
|
@@ -3991,25 +3994,25 @@ var Ao = {
|
|
|
3991
3994
|
"bottom-right": "ms-toaster-item-bottom-right"
|
|
3992
3995
|
};
|
|
3993
3996
|
// src/components/toast/use_toast_timer.ts
|
|
3994
|
-
function
|
|
3997
|
+
function No() {
|
|
3995
3998
|
return document.visibilityState === "hidden";
|
|
3996
3999
|
}
|
|
3997
|
-
var
|
|
3998
|
-
function
|
|
3999
|
-
for (let e of
|
|
4000
|
+
var Po = /* @__PURE__ */ new Set();
|
|
4001
|
+
function Fo() {
|
|
4002
|
+
for (let e of Po) e();
|
|
4000
4003
|
}
|
|
4001
|
-
function
|
|
4002
|
-
return
|
|
4003
|
-
|
|
4004
|
+
function Io(e) {
|
|
4005
|
+
return Po.size === 0 && document.addEventListener("visibilitychange", Fo), Po.add(e), () => {
|
|
4006
|
+
Po.delete(e), !(Po.size > 0) && document.removeEventListener("visibilitychange", Fo);
|
|
4004
4007
|
};
|
|
4005
4008
|
}
|
|
4006
|
-
function
|
|
4009
|
+
function Lo() {
|
|
4007
4010
|
return !1;
|
|
4008
4011
|
}
|
|
4009
|
-
function
|
|
4010
|
-
let i = y(e), a = y(r), [o, s] = b(null), c = x(
|
|
4012
|
+
function Ro({ duration: e, isPaused: t, onElapsed: n, revision: r = 0 }) {
|
|
4013
|
+
let i = y(e), a = y(r), [o, s] = b(null), c = x(Io, No, Lo), l = o === r, u = h(n);
|
|
4011
4014
|
return m(() => {
|
|
4012
|
-
if (a.current !== r && (a.current = r, i.current = e), l || t || c ||
|
|
4015
|
+
if (a.current !== r && (a.current = r, i.current = e), l || t || c || Oo(e)) return;
|
|
4013
4016
|
let n = Date.now(), o = setTimeout(() => {
|
|
4014
4017
|
s(r), u();
|
|
4015
4018
|
}, i.current);
|
|
@@ -4022,26 +4025,26 @@ function Lo({ duration: e, isPaused: t, onElapsed: n, revision: r = 0 }) {
|
|
|
4022
4025
|
c,
|
|
4023
4026
|
r,
|
|
4024
4027
|
l
|
|
4025
|
-
]), { isRunning: !l && !t && !c && !
|
|
4028
|
+
]), { isRunning: !l && !t && !c && !Oo(e) };
|
|
4026
4029
|
}
|
|
4027
|
-
var
|
|
4028
|
-
function
|
|
4030
|
+
var zo = 5;
|
|
4031
|
+
function Bo(e) {
|
|
4029
4032
|
return e.filter((e) => !e.isClosing).length;
|
|
4030
4033
|
}
|
|
4031
|
-
function
|
|
4034
|
+
function Vo(e) {
|
|
4032
4035
|
let t = e.filter((e) => !e.isClosing && !e.isPinned);
|
|
4033
|
-
return t.find((e) => !
|
|
4036
|
+
return t.find((e) => !Oo(e.duration)) ?? t[0];
|
|
4034
4037
|
}
|
|
4035
|
-
function
|
|
4038
|
+
function Ho(e) {
|
|
4036
4039
|
let t = e;
|
|
4037
|
-
for (;
|
|
4038
|
-
let e =
|
|
4040
|
+
for (; Bo(t) > 5;) {
|
|
4041
|
+
let e = Vo(t);
|
|
4039
4042
|
if (!e) return t;
|
|
4040
|
-
t =
|
|
4043
|
+
t = Wo(t, e.id);
|
|
4041
4044
|
}
|
|
4042
4045
|
return t;
|
|
4043
4046
|
}
|
|
4044
|
-
function
|
|
4047
|
+
function Uo(e, t) {
|
|
4045
4048
|
let n = e.find((e) => e.id === t.id);
|
|
4046
4049
|
if (!n) {
|
|
4047
4050
|
let n = {
|
|
@@ -4060,48 +4063,48 @@ function Ho(e, t) {
|
|
|
4060
4063
|
};
|
|
4061
4064
|
return e.map((e) => e.id === t.id ? r : e);
|
|
4062
4065
|
}
|
|
4063
|
-
function
|
|
4066
|
+
function Wo(e, t) {
|
|
4064
4067
|
let n = (e) => (t === void 0 || e.id === t) && !e.isClosing;
|
|
4065
4068
|
return e.some(n) ? e.map((e) => n(e) ? {
|
|
4066
4069
|
...e,
|
|
4067
4070
|
isClosing: !0
|
|
4068
4071
|
} : e) : e;
|
|
4069
4072
|
}
|
|
4070
|
-
function
|
|
4073
|
+
function Go(e, t) {
|
|
4071
4074
|
return e.some((e) => e.id === t) ? e.filter((e) => e.id !== t) : e;
|
|
4072
4075
|
}
|
|
4073
|
-
function
|
|
4076
|
+
function Ko(e, t, n) {
|
|
4074
4077
|
let r = e.find((e) => e.id === t);
|
|
4075
4078
|
return !r || r.isPinned === n ? e : e.map((e) => e.id === t ? {
|
|
4076
4079
|
...e,
|
|
4077
4080
|
isPinned: n
|
|
4078
4081
|
} : e);
|
|
4079
4082
|
}
|
|
4080
|
-
function
|
|
4081
|
-
let t = e.filter((e) => e.isClosing).length -
|
|
4083
|
+
function qo(e) {
|
|
4084
|
+
let t = e.filter((e) => e.isClosing).length - zo;
|
|
4082
4085
|
return t <= 0 ? e : e.filter((e) => !e.isClosing || t <= 0 || (--t, !1));
|
|
4083
4086
|
}
|
|
4084
4087
|
// src/stores/toast_store/toast_store.ts
|
|
4085
|
-
function
|
|
4088
|
+
function Jo(e, t) {
|
|
4086
4089
|
return t === e.entries ? e : {
|
|
4087
4090
|
...e,
|
|
4088
4091
|
entries: t
|
|
4089
4092
|
};
|
|
4090
4093
|
}
|
|
4091
|
-
var
|
|
4094
|
+
var Yo = E((e) => ({
|
|
4092
4095
|
entries: [],
|
|
4093
|
-
showToast: (t) => e((e) => ({ entries:
|
|
4094
|
-
dismissToast: (t) => e((e) =>
|
|
4095
|
-
removeToast: (t) => e((e) =>
|
|
4096
|
-
setToastPinned: (t, n) => e((e) =>
|
|
4096
|
+
showToast: (t) => e((e) => ({ entries: qo(Ho(Uo(e.entries, t))) })),
|
|
4097
|
+
dismissToast: (t) => e((e) => Jo(e, Wo(e.entries, t))),
|
|
4098
|
+
removeToast: (t) => e((e) => Jo(e, Go(e.entries, t))),
|
|
4099
|
+
setToastPinned: (t, n) => e((e) => Jo(e, Ko(e.entries, t, n))),
|
|
4097
4100
|
resetToasts: () => e((e) => e.entries.length === 0 ? e : {
|
|
4098
4101
|
...e,
|
|
4099
4102
|
entries: []
|
|
4100
4103
|
})
|
|
4101
4104
|
}));
|
|
4102
4105
|
// src/components/toast/toaster_item.tsx
|
|
4103
|
-
function
|
|
4104
|
-
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 =
|
|
4106
|
+
function Xo({ entry: t, position: n, toasterRadius: r, toasterUnstyled: i, closeLabel: a, previousFocusRef: o }) {
|
|
4107
|
+
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 = Yo((e) => e.dismissToast), S = Yo((e) => e.removeToast), C = Yo((e) => e.setToastPinned), T = y(null), [E, D] = b(!1), [O, k] = b(!1), [A, j] = b(!1), { isRunning: M } = Ro({
|
|
4105
4108
|
duration: d,
|
|
4106
4109
|
isPaused: O || A || h,
|
|
4107
4110
|
onElapsed: () => x(s),
|
|
@@ -4118,7 +4121,7 @@ function Yo({ entry: t, position: n, toasterRadius: r, toasterUnstyled: i, close
|
|
|
4118
4121
|
A,
|
|
4119
4122
|
C
|
|
4120
4123
|
]), _(() => {
|
|
4121
|
-
h && T.current &&
|
|
4124
|
+
h && T.current && Co({
|
|
4122
4125
|
toastElement: T.current,
|
|
4123
4126
|
previousFocus: o.current
|
|
4124
4127
|
});
|
|
@@ -4141,7 +4144,7 @@ function Yo({ entry: t, position: n, toasterRadius: r, toasterUnstyled: i, close
|
|
|
4141
4144
|
e.key !== "Escape" || h || e.ctrlKey || e.altKey || e.metaKey || e.shiftKey || (e.preventDefault(), e.stopPropagation(), x(s));
|
|
4142
4145
|
}, R = () => x(s), z = () => {
|
|
4143
4146
|
f?.onClick(), x(s);
|
|
4144
|
-
}, V = E && !h, H =
|
|
4147
|
+
}, V = E && !h, H = Oo(d) ? null : d;
|
|
4145
4148
|
return /* @__PURE__ */ w("li", {
|
|
4146
4149
|
ref: T,
|
|
4147
4150
|
"data-ms-toast-id": s,
|
|
@@ -4153,14 +4156,14 @@ function Yo({ entry: t, position: n, toasterRadius: r, toasterUnstyled: i, close
|
|
|
4153
4156
|
"bg-white dark:bg-gray-900",
|
|
4154
4157
|
B[g],
|
|
4155
4158
|
"ms-toaster-item-transition",
|
|
4156
|
-
|
|
4159
|
+
Mo[n]
|
|
4157
4160
|
]),
|
|
4158
4161
|
onPointerEnter: P,
|
|
4159
4162
|
onPointerLeave: F,
|
|
4160
4163
|
onFocus: I,
|
|
4161
4164
|
onKeyDown: L,
|
|
4162
4165
|
onBlur: N,
|
|
4163
|
-
children: /* @__PURE__ */ w(
|
|
4166
|
+
children: /* @__PURE__ */ w(Ao, {
|
|
4164
4167
|
tone: u,
|
|
4165
4168
|
message: c,
|
|
4166
4169
|
description: l,
|
|
@@ -4176,83 +4179,83 @@ function Yo({ entry: t, position: n, toasterRadius: r, toasterUnstyled: i, close
|
|
|
4176
4179
|
})
|
|
4177
4180
|
});
|
|
4178
4181
|
}
|
|
4179
|
-
var
|
|
4180
|
-
function es() {
|
|
4181
|
-
for (let e of Qo) e();
|
|
4182
|
-
}
|
|
4182
|
+
var Zo = d(Xo), Qo = [], $o = /* @__PURE__ */ new Set(), es = 0;
|
|
4183
4183
|
function ts() {
|
|
4184
|
-
let e
|
|
4184
|
+
for (let e of $o) e();
|
|
4185
|
+
}
|
|
4186
|
+
function ns() {
|
|
4187
|
+
let e = es;
|
|
4185
4188
|
queueMicrotask(() => {
|
|
4186
|
-
e ===
|
|
4189
|
+
e === es && Yo.getState().resetToasts();
|
|
4187
4190
|
});
|
|
4188
4191
|
}
|
|
4189
|
-
function ns(e) {
|
|
4190
|
-
return Qo.add(e), () => {
|
|
4191
|
-
Qo.delete(e);
|
|
4192
|
-
};
|
|
4193
|
-
}
|
|
4194
4192
|
function rs(e) {
|
|
4195
|
-
return
|
|
4193
|
+
return $o.add(e), () => {
|
|
4194
|
+
$o.delete(e);
|
|
4195
|
+
};
|
|
4196
4196
|
}
|
|
4197
4197
|
function is(e) {
|
|
4198
|
-
return
|
|
4199
|
-
|
|
4200
|
-
|
|
4198
|
+
return Qo[0] === e;
|
|
4199
|
+
}
|
|
4200
|
+
function as(e) {
|
|
4201
|
+
return es += 1, Qo.push(e), ts(), () => {
|
|
4202
|
+
let t = Qo.indexOf(e);
|
|
4203
|
+
t !== -1 && (Qo.splice(t, 1), ts(), Qo.length === 0 && ns());
|
|
4201
4204
|
};
|
|
4202
4205
|
}
|
|
4203
4206
|
// src/components/toast/use_is_active_toaster.ts
|
|
4204
|
-
var
|
|
4205
|
-
function
|
|
4207
|
+
var os = "Toaster: another <Toaster /> is already mounted, so this one renders nothing. Mount a single Toaster at the app root.";
|
|
4208
|
+
function ss() {
|
|
4206
4209
|
return !1;
|
|
4207
4210
|
}
|
|
4208
|
-
function
|
|
4211
|
+
function cs() {
|
|
4209
4212
|
let e = g();
|
|
4210
4213
|
return m(() => {
|
|
4211
|
-
let t =
|
|
4212
|
-
return !
|
|
4213
|
-
}, [e]), x(
|
|
4214
|
+
let t = as(e);
|
|
4215
|
+
return !is(e) && process.env.NODE_ENV !== "production" && console.warn(os), t;
|
|
4216
|
+
}, [e]), x(rs, () => is(e), ss);
|
|
4214
4217
|
}
|
|
4215
4218
|
// src/components/toast/toast_announcement.ts
|
|
4216
|
-
var
|
|
4217
|
-
function ls(e) {
|
|
4218
|
-
return cs.some((t) => t === e) ? "assertive" : "polite";
|
|
4219
|
-
}
|
|
4219
|
+
var ls = ["warning", "danger"];
|
|
4220
4220
|
function us(e) {
|
|
4221
|
-
return
|
|
4221
|
+
return ls.some((t) => t === e) ? "assertive" : "polite";
|
|
4222
4222
|
}
|
|
4223
4223
|
function ds(e) {
|
|
4224
|
-
return
|
|
4224
|
+
return Array.from(document.querySelectorAll(`[data-ms-toast-announcer="${e}"]`));
|
|
4225
4225
|
}
|
|
4226
4226
|
function fs(e) {
|
|
4227
|
+
return e.closest("[aria-modal=\"true\"]")?.getAttribute("data-state") === "open";
|
|
4228
|
+
}
|
|
4229
|
+
function ps(e) {
|
|
4227
4230
|
let t = e.querySelector("[data-ms-toast-text]");
|
|
4228
4231
|
return t ? Array.from(t.children).map((e) => e.textContent ?? "").join(" ").trim() : "";
|
|
4229
4232
|
}
|
|
4230
|
-
function
|
|
4233
|
+
function ms(e, t) {
|
|
4231
4234
|
let n = t[e];
|
|
4232
4235
|
n && (n.textContent = "");
|
|
4233
|
-
for (let t of
|
|
4236
|
+
for (let t of ds(e)) t.textContent = "";
|
|
4234
4237
|
}
|
|
4235
|
-
function
|
|
4236
|
-
let r =
|
|
4238
|
+
function hs(e, t, n) {
|
|
4239
|
+
let r = ds(e).filter(fs).at(-1) ?? n[e];
|
|
4237
4240
|
r && (r.textContent = t);
|
|
4238
4241
|
}
|
|
4239
|
-
function
|
|
4242
|
+
function gs(e, t) {
|
|
4240
4243
|
if (e) return Array.from(e.querySelectorAll("[data-ms-toast-id]")).find((e) => e.dataset.msToastId === t);
|
|
4241
4244
|
}
|
|
4242
|
-
function
|
|
4245
|
+
function _s(e, t) {
|
|
4243
4246
|
let n = {
|
|
4244
4247
|
polite: [],
|
|
4245
4248
|
assertive: []
|
|
4246
4249
|
};
|
|
4247
4250
|
for (let r of t) {
|
|
4248
|
-
let t =
|
|
4251
|
+
let t = gs(e, r);
|
|
4249
4252
|
if (!t) continue;
|
|
4250
|
-
let i =
|
|
4251
|
-
i && n[
|
|
4253
|
+
let i = ps(t);
|
|
4254
|
+
i && n[us(t.dataset.tone ?? "")].push(i);
|
|
4252
4255
|
}
|
|
4253
4256
|
return n;
|
|
4254
4257
|
}
|
|
4255
|
-
function
|
|
4258
|
+
function vs({ entries: e, listRef: t, politeRef: n, assertiveRef: r }) {
|
|
4256
4259
|
let i = y(/* @__PURE__ */ new Map()), a = y([]), o = y(null);
|
|
4257
4260
|
m(() => {
|
|
4258
4261
|
let s = i.current, c = a.current, l = {
|
|
@@ -4262,11 +4265,11 @@ function _s({ entries: e, listRef: t, politeRef: n, assertiveRef: r }) {
|
|
|
4262
4265
|
s.clear();
|
|
4263
4266
|
for (let t of e) s.set(t.id, t.revision);
|
|
4264
4267
|
if (u.length !== 0) {
|
|
4265
|
-
for (let e of u)
|
|
4268
|
+
for (let e of u) ms(us(e.tone), l), c.push(e.id);
|
|
4266
4269
|
o.current === null && (o.current = setTimeout(() => {
|
|
4267
4270
|
o.current = null;
|
|
4268
|
-
let e =
|
|
4269
|
-
e.polite.length > 0 &&
|
|
4271
|
+
let e = _s(t.current, c.splice(0));
|
|
4272
|
+
e.polite.length > 0 && hs("polite", e.polite.join(" "), l), e.assertive.length > 0 && hs("assertive", e.assertive.join(" "), l);
|
|
4270
4273
|
}, 50));
|
|
4271
4274
|
}
|
|
4272
4275
|
}, [
|
|
@@ -4281,28 +4284,28 @@ function _s({ entries: e, listRef: t, politeRef: n, assertiveRef: r }) {
|
|
|
4281
4284
|
};
|
|
4282
4285
|
}, []);
|
|
4283
4286
|
}
|
|
4284
|
-
function
|
|
4287
|
+
function ys(e) {
|
|
4285
4288
|
return e.ctrlKey || e.altKey || e.metaKey || e.shiftKey;
|
|
4286
4289
|
}
|
|
4287
|
-
function ys() {
|
|
4288
|
-
return Jo.getState().entries.some((e) => !e.isClosing);
|
|
4289
|
-
}
|
|
4290
4290
|
function bs() {
|
|
4291
|
+
return Yo.getState().entries.some((e) => !e.isClosing);
|
|
4292
|
+
}
|
|
4293
|
+
function xs() {
|
|
4291
4294
|
let { activeElement: e } = document;
|
|
4292
4295
|
return e instanceof HTMLElement ? e === document.body ? null : e : null;
|
|
4293
4296
|
}
|
|
4294
|
-
function
|
|
4297
|
+
function Ss({ regionRef: e, previousFocusRef: t }) {
|
|
4295
4298
|
m(() => {
|
|
4296
4299
|
let n = (n) => {
|
|
4297
|
-
if (n.key !== "F8" ||
|
|
4300
|
+
if (n.key !== "F8" || ys(n) || n.defaultPrevented || !zr.getState().globalHotkeysEnabled) return;
|
|
4298
4301
|
let r = e.current;
|
|
4299
|
-
if (r &&
|
|
4302
|
+
if (r && bs()) {
|
|
4300
4303
|
if (r.contains(document.activeElement)) {
|
|
4301
4304
|
let e = t.current;
|
|
4302
4305
|
if (!e?.isConnected) return;
|
|
4303
4306
|
e.focus();
|
|
4304
4307
|
} else {
|
|
4305
|
-
let e =
|
|
4308
|
+
let e = xs();
|
|
4306
4309
|
r.focus(), t.current = e;
|
|
4307
4310
|
}
|
|
4308
4311
|
n.preventDefault();
|
|
@@ -4312,12 +4315,12 @@ function xs({ regionRef: e, previousFocusRef: t }) {
|
|
|
4312
4315
|
}, [e, t]);
|
|
4313
4316
|
}
|
|
4314
4317
|
// src/components/toast/toaster.tsx
|
|
4315
|
-
function
|
|
4316
|
-
let i = Q(), a =
|
|
4317
|
-
|
|
4318
|
+
function Cs({ position: t = "bottom-right", radius: n, unstyled: r }) {
|
|
4319
|
+
let i = Q(), a = Yo((e) => e.entries), o = y(null), s = y(null), c = y(null), l = y(null), u = y(null);
|
|
4320
|
+
Ss({
|
|
4318
4321
|
regionRef: l,
|
|
4319
4322
|
previousFocusRef: u
|
|
4320
|
-
}),
|
|
4323
|
+
}), vs({
|
|
4321
4324
|
entries: a,
|
|
4322
4325
|
listRef: o,
|
|
4323
4326
|
politeRef: s,
|
|
@@ -4325,7 +4328,7 @@ function Ss({ position: t = "bottom-right", radius: n, unstyled: r }) {
|
|
|
4325
4328
|
});
|
|
4326
4329
|
let d = t.startsWith("top"), f = v(() => d ? [...a].reverse() : a, [a, d]);
|
|
4327
4330
|
return S(/* @__PURE__ */ T("div", {
|
|
4328
|
-
className: e("ms-toaster",
|
|
4331
|
+
className: e("ms-toaster", jo[t]),
|
|
4329
4332
|
children: [
|
|
4330
4333
|
/* @__PURE__ */ w("section", {
|
|
4331
4334
|
ref: l,
|
|
@@ -4341,7 +4344,7 @@ function Ss({ position: t = "bottom-right", radius: n, unstyled: r }) {
|
|
|
4341
4344
|
children: /* @__PURE__ */ w("ol", {
|
|
4342
4345
|
ref: o,
|
|
4343
4346
|
className: "m-0 flex list-none flex-col gap-2 p-0",
|
|
4344
|
-
children: f.map((e) => /* @__PURE__ */ w(
|
|
4347
|
+
children: f.map((e) => /* @__PURE__ */ w(Zo, {
|
|
4345
4348
|
entry: e,
|
|
4346
4349
|
position: t,
|
|
4347
4350
|
toasterRadius: n,
|
|
@@ -4364,70 +4367,70 @@ function Ss({ position: t = "bottom-right", radius: n, unstyled: r }) {
|
|
|
4364
4367
|
]
|
|
4365
4368
|
}), document.body);
|
|
4366
4369
|
}
|
|
4367
|
-
function
|
|
4368
|
-
return
|
|
4370
|
+
function ws(e) {
|
|
4371
|
+
return cs() ? /* @__PURE__ */ w(Cs, { ...e }) : null;
|
|
4369
4372
|
}
|
|
4370
4373
|
// src/components/toast/toast_provider.tsx
|
|
4371
|
-
var
|
|
4372
|
-
function
|
|
4373
|
-
return
|
|
4374
|
+
var Ts = ({ children: e }) => /* @__PURE__ */ T(C, { children: [e, /* @__PURE__ */ w(ws, {})] }), Es = 0;
|
|
4375
|
+
function Ds() {
|
|
4376
|
+
return Es += 1, `ms-toast-${Es}`;
|
|
4374
4377
|
}
|
|
4375
4378
|
// src/components/toast/toast.ts
|
|
4376
|
-
var
|
|
4377
|
-
function
|
|
4378
|
-
return t.duration === void 0 ?
|
|
4379
|
+
var Os = 5e3, ks = ["warning", "danger"];
|
|
4380
|
+
function As(e, t) {
|
|
4381
|
+
return t.duration === void 0 ? ks.includes(e) || t.action ? Infinity : Os : t.duration;
|
|
4379
4382
|
}
|
|
4380
|
-
function
|
|
4381
|
-
let r = n.id ??
|
|
4382
|
-
return typeof window > "u" ||
|
|
4383
|
+
function js(e, t, n = {}) {
|
|
4384
|
+
let r = n.id ?? Ds();
|
|
4385
|
+
return typeof window > "u" || Yo.getState().showToast({
|
|
4383
4386
|
id: r,
|
|
4384
4387
|
message: t,
|
|
4385
4388
|
description: n.description,
|
|
4386
4389
|
tone: e,
|
|
4387
|
-
duration:
|
|
4390
|
+
duration: As(e, n),
|
|
4388
4391
|
action: n.action
|
|
4389
4392
|
}), r;
|
|
4390
4393
|
}
|
|
4391
|
-
function
|
|
4392
|
-
typeof window < "u" &&
|
|
4394
|
+
function Ms(e) {
|
|
4395
|
+
typeof window < "u" && Yo.getState().dismissToast(e);
|
|
4393
4396
|
}
|
|
4394
|
-
var
|
|
4395
|
-
info: (e, t) =>
|
|
4396
|
-
success: (e, t) =>
|
|
4397
|
-
warning: (e, t) =>
|
|
4398
|
-
error: (e, t) =>
|
|
4399
|
-
dismiss:
|
|
4397
|
+
var Ns = Object.assign((e, t) => js("info", e, t), {
|
|
4398
|
+
info: (e, t) => js("info", e, t),
|
|
4399
|
+
success: (e, t) => js("success", e, t),
|
|
4400
|
+
warning: (e, t) => js("warning", e, t),
|
|
4401
|
+
error: (e, t) => js("danger", e, t),
|
|
4402
|
+
dismiss: Ms
|
|
4400
4403
|
});
|
|
4401
4404
|
// src/components/toast/use_toast.ts
|
|
4402
|
-
function Ns(e) {
|
|
4403
|
-
return e.duration === void 0 ? e.action ? Infinity : Eo(e.tone ?? "info") : e.duration;
|
|
4404
|
-
}
|
|
4405
4405
|
function Ps(e) {
|
|
4406
|
-
|
|
4406
|
+
return e.duration === void 0 ? e.action ? Infinity : Do(e.tone ?? "info") : e.duration;
|
|
4407
|
+
}
|
|
4408
|
+
function Fs(e) {
|
|
4409
|
+
let t = Ds();
|
|
4407
4410
|
if (typeof window > "u") return t;
|
|
4408
4411
|
let n = e.tone ?? "info";
|
|
4409
|
-
return
|
|
4412
|
+
return Yo.getState().showToast({
|
|
4410
4413
|
id: t,
|
|
4411
4414
|
message: e.message,
|
|
4412
4415
|
tone: n === "error" ? "danger" : n,
|
|
4413
|
-
duration:
|
|
4416
|
+
duration: Ps(e),
|
|
4414
4417
|
action: e.action,
|
|
4415
4418
|
radius: e.radius,
|
|
4416
4419
|
unstyled: e.unstyled
|
|
4417
4420
|
}), t;
|
|
4418
4421
|
}
|
|
4419
|
-
function
|
|
4420
|
-
typeof window < "u" &&
|
|
4422
|
+
function Is(e) {
|
|
4423
|
+
typeof window < "u" && Yo.getState().dismissToast(e);
|
|
4421
4424
|
}
|
|
4422
|
-
var
|
|
4423
|
-
show:
|
|
4424
|
-
dismiss:
|
|
4425
|
+
var Ls = {
|
|
4426
|
+
show: Fs,
|
|
4427
|
+
dismiss: Is
|
|
4425
4428
|
};
|
|
4426
|
-
function
|
|
4427
|
-
return
|
|
4429
|
+
function Rs() {
|
|
4430
|
+
return Ls;
|
|
4428
4431
|
}
|
|
4429
4432
|
// src/components/toolbar/toolbar_items.ts
|
|
4430
|
-
var
|
|
4433
|
+
var zs = "a[href], button, input:not([type=\"hidden\"]), select, textarea, summary, [contenteditable]:not([contenteditable=\"false\"]), [tabindex]", Bs = [
|
|
4431
4434
|
"textarea",
|
|
4432
4435
|
"[contenteditable]:not([contenteditable=\"false\"])",
|
|
4433
4436
|
`input:not(${[
|
|
@@ -4441,46 +4444,46 @@ var Rs = "a[href], button, input:not([type=\"hidden\"]), select, textarea, summa
|
|
|
4441
4444
|
"reset",
|
|
4442
4445
|
"submit"
|
|
4443
4446
|
].map((e) => `[type="${e}"]`).join(", ")})`
|
|
4444
|
-
].join(", "),
|
|
4445
|
-
function Vs(e) {
|
|
4446
|
-
return e.matches(":disabled, [aria-disabled=\"true\"]");
|
|
4447
|
-
}
|
|
4447
|
+
].join(", "), Vs = "select, input[type=\"range\"], input[type=\"radio\"]";
|
|
4448
4448
|
function Hs(e) {
|
|
4449
|
-
return
|
|
4449
|
+
return e.matches(":disabled, [aria-disabled=\"true\"]");
|
|
4450
4450
|
}
|
|
4451
4451
|
function Us(e) {
|
|
4452
|
-
return
|
|
4452
|
+
return Array.from(e.querySelectorAll(zs));
|
|
4453
4453
|
}
|
|
4454
4454
|
function Ws(e) {
|
|
4455
|
-
return e
|
|
4455
|
+
return Us(e).filter((e) => !Hs(e));
|
|
4456
|
+
}
|
|
4457
|
+
function Gs(e) {
|
|
4458
|
+
return e instanceof HTMLElement && e.matches(`${Bs}, ${Vs}`);
|
|
4456
4459
|
}
|
|
4457
4460
|
// src/components/toolbar/toolbar_navigation.ts
|
|
4458
|
-
var
|
|
4461
|
+
var Ks = (e, t) => (e + 1) % t, qs = (e, t) => (e - 1 + t) % t, Js = () => 0, Ys = (e, t) => t - 1, Xs = {
|
|
4459
4462
|
horizontal: {
|
|
4460
|
-
ArrowRight:
|
|
4461
|
-
ArrowLeft:
|
|
4462
|
-
Home:
|
|
4463
|
-
End:
|
|
4463
|
+
ArrowRight: Ks,
|
|
4464
|
+
ArrowLeft: qs,
|
|
4465
|
+
Home: Js,
|
|
4466
|
+
End: Ys
|
|
4464
4467
|
},
|
|
4465
4468
|
vertical: {
|
|
4466
|
-
ArrowDown:
|
|
4467
|
-
ArrowUp:
|
|
4468
|
-
Home:
|
|
4469
|
-
End:
|
|
4469
|
+
ArrowDown: Ks,
|
|
4470
|
+
ArrowUp: qs,
|
|
4471
|
+
Home: Js,
|
|
4472
|
+
End: Ys
|
|
4470
4473
|
}
|
|
4471
4474
|
};
|
|
4472
|
-
function
|
|
4473
|
-
let { key: t, orientation: n, currentPosition: r, itemCount: i } = e, a =
|
|
4475
|
+
function Zs(e) {
|
|
4476
|
+
let { key: t, orientation: n, currentPosition: r, itemCount: i } = e, a = Xs[n][t];
|
|
4474
4477
|
if (a && i !== 0) return a(r, i);
|
|
4475
4478
|
}
|
|
4476
4479
|
// src/components/toolbar/use_toolbar_roving_focus.ts
|
|
4477
|
-
var
|
|
4478
|
-
function
|
|
4480
|
+
var Qs = ["disabled", "aria-disabled"];
|
|
4481
|
+
function $s(e, t) {
|
|
4479
4482
|
let n = y(null), r = f(() => {
|
|
4480
4483
|
let t = e.current;
|
|
4481
4484
|
if (!t) return;
|
|
4482
|
-
let r =
|
|
4483
|
-
for (let e of
|
|
4485
|
+
let r = Ws(t), i = n.current, a = i && r.includes(i) ? i : r[0];
|
|
4486
|
+
for (let e of Us(t)) e.tabIndex = e === a ? 0 : -1;
|
|
4484
4487
|
}, [e]);
|
|
4485
4488
|
return m(() => {
|
|
4486
4489
|
let t = e.current;
|
|
@@ -4491,19 +4494,19 @@ function Qs(e, t) {
|
|
|
4491
4494
|
subtree: !0,
|
|
4492
4495
|
childList: !0,
|
|
4493
4496
|
attributes: !0,
|
|
4494
|
-
attributeFilter:
|
|
4497
|
+
attributeFilter: Qs
|
|
4495
4498
|
}), () => n.disconnect();
|
|
4496
4499
|
}, [e, r]), {
|
|
4497
4500
|
handleFocus: (t) => {
|
|
4498
4501
|
let i = e.current;
|
|
4499
4502
|
if (!i) return;
|
|
4500
|
-
let a =
|
|
4503
|
+
let a = Ws(i).find((e) => e === t.target);
|
|
4501
4504
|
a && (n.current = a, r());
|
|
4502
4505
|
},
|
|
4503
4506
|
handleKeyDown: (n) => {
|
|
4504
4507
|
let r = e.current;
|
|
4505
|
-
if (!r || !r.contains(n.target) ||
|
|
4506
|
-
let i =
|
|
4508
|
+
if (!r || !r.contains(n.target) || Gs(n.target)) return;
|
|
4509
|
+
let i = Ws(r), a = Zs({
|
|
4507
4510
|
key: n.key,
|
|
4508
4511
|
orientation: t,
|
|
4509
4512
|
currentPosition: i.findIndex((e) => e === n.target),
|
|
@@ -4514,18 +4517,18 @@ function Qs(e, t) {
|
|
|
4514
4517
|
};
|
|
4515
4518
|
}
|
|
4516
4519
|
// src/components/toolbar/toolbar.tsx
|
|
4517
|
-
var
|
|
4520
|
+
var ec = {
|
|
4518
4521
|
horizontal: "flex items-center gap-1",
|
|
4519
4522
|
vertical: "flex flex-col items-stretch gap-1"
|
|
4520
4523
|
};
|
|
4521
|
-
function
|
|
4522
|
-
let { orientation: n = "horizontal", unstyled: r = !1, className: i, ref: a, onFocus: o, onKeyDown: s, ...c } = t, l = y(null), { handleFocus: u, handleKeyDown: d } =
|
|
4524
|
+
function tc(t) {
|
|
4525
|
+
let { orientation: n = "horizontal", unstyled: r = !1, className: i, ref: a, onFocus: o, onKeyDown: s, ...c } = t, l = y(null), { handleFocus: u, handleKeyDown: d } = $s(l, n);
|
|
4523
4526
|
return /* @__PURE__ */ w("div", {
|
|
4524
4527
|
...c,
|
|
4525
|
-
ref:
|
|
4528
|
+
ref: K(l, a),
|
|
4526
4529
|
role: "toolbar",
|
|
4527
4530
|
"aria-orientation": n,
|
|
4528
|
-
className: e(!r &&
|
|
4531
|
+
className: e(!r && ec[n], i),
|
|
4529
4532
|
onFocus: (e) => {
|
|
4530
4533
|
u(e), o?.(e);
|
|
4531
4534
|
},
|
|
@@ -4535,11 +4538,11 @@ function ec(t) {
|
|
|
4535
4538
|
});
|
|
4536
4539
|
}
|
|
4537
4540
|
// src/components/ui_provider/french_ui_labels.ts
|
|
4538
|
-
var
|
|
4541
|
+
var nc = {
|
|
4539
4542
|
light: "clair",
|
|
4540
4543
|
dark: "sombre",
|
|
4541
4544
|
system: "système"
|
|
4542
|
-
},
|
|
4545
|
+
}, rc = {
|
|
4543
4546
|
close: "Fermer",
|
|
4544
4547
|
confirm: "Confirmer",
|
|
4545
4548
|
cancel: "Annuler",
|
|
@@ -4554,19 +4557,19 @@ var tc = {
|
|
|
4554
4557
|
notifications: "Notifications",
|
|
4555
4558
|
closeNotification: "Fermer la notification",
|
|
4556
4559
|
charactersRemaining: (e) => `${e} ${e > 1 ? "caractères restants" : "caractère restant"}`,
|
|
4557
|
-
currentTheme: (e) => `Thème actuel : ${
|
|
4560
|
+
currentTheme: (e) => `Thème actuel : ${nc[e]}`,
|
|
4558
4561
|
overflowCount: (e) => `+${e} ${e > 1 ? "autres" : "autre"}`,
|
|
4559
4562
|
selectedCount: (e) => `${e} ${e > 1 ? "sélectionnés" : "sélectionné"}`,
|
|
4560
4563
|
maxSelectedHint: (e) => `Vous pouvez sélectionner jusqu'à ${e} ${e > 1 ? "éléments" : "élément"}`
|
|
4561
4564
|
};
|
|
4562
4565
|
// src/components/ui_provider/ui_provider.tsx
|
|
4563
|
-
function
|
|
4566
|
+
function ic(e = {}) {
|
|
4564
4567
|
return Object.fromEntries(Object.entries(e).filter(([, e]) => e !== void 0));
|
|
4565
4568
|
}
|
|
4566
|
-
function
|
|
4569
|
+
function ac({ labels: e, announceFieldErrors: t, children: n }) {
|
|
4567
4570
|
let r = p(pe), i = Qe(), a = v(() => ({
|
|
4568
4571
|
...r,
|
|
4569
|
-
...
|
|
4572
|
+
...ic(e)
|
|
4570
4573
|
}), [r, e]);
|
|
4571
4574
|
return /* @__PURE__ */ w(pe.Provider, {
|
|
4572
4575
|
value: a,
|
|
@@ -4577,15 +4580,15 @@ function ic({ labels: e, announceFieldErrors: t, children: n }) {
|
|
|
4577
4580
|
});
|
|
4578
4581
|
}
|
|
4579
4582
|
// src/hooks/use_is_client/with_client_only.tsx
|
|
4580
|
-
var
|
|
4583
|
+
var oc = (e) => {
|
|
4581
4584
|
function t(t) {
|
|
4582
4585
|
return yt() ? /* @__PURE__ */ w(e, { ...t }) : null;
|
|
4583
4586
|
}
|
|
4584
4587
|
return t;
|
|
4585
|
-
},
|
|
4586
|
-
function
|
|
4587
|
-
let { ref: t, scrollableProps: n, focusClassName: r } =
|
|
4588
|
-
return ct("useKeyboardScrollable", !!e.label?.trim() || !!e.labelledBy?.trim(),
|
|
4588
|
+
}, sc = "a scroll region needs an accessible name. Provide a non-empty `label` or `labelledBy`.";
|
|
4589
|
+
function cc(e) {
|
|
4590
|
+
let { ref: t, scrollableProps: n, focusClassName: r } = gr(e);
|
|
4591
|
+
return ct("useKeyboardScrollable", !!e.label?.trim() || !!e.labelledBy?.trim(), sc), {
|
|
4589
4592
|
scrollableProps: {
|
|
4590
4593
|
ref: t,
|
|
4591
4594
|
...n
|
|
@@ -4594,5 +4597,5 @@ function sc(e) {
|
|
|
4594
4597
|
};
|
|
4595
4598
|
}
|
|
4596
4599
|
// src/stores/theme_store/theme_init_script.ts
|
|
4597
|
-
var
|
|
4598
|
-
export { he as Alert, Ce as AppBar, Ee as Avatar, We as BASE_INPUT_STYLES, Oe as Badge, Me as Button, Ie as Card, Ve as CharacterCount, mt as Checkbox, vt as CheckboxOptions, bt as ClientOnly, pn as Combobox,
|
|
4600
|
+
var lc = `(function(){var t=null;try{t=localStorage.getItem(${JSON.stringify(io)})}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"))}})()`;
|
|
4601
|
+
export { he as Alert, Ce as AppBar, Ee as Avatar, We as BASE_INPUT_STYLES, Oe as Badge, Me as Button, Ie as Card, Ve as CharacterCount, mt as Checkbox, vt as CheckboxOptions, bt as ClientOnly, pn as Combobox, Di as ConfirmModal, Nn as ContextMenu, Ln as CopyButton, Gr as Drawer, rc as FRENCH_UI_LABELS, Vn as Highlight, X as IconButton, Jr as Input, Xr as Kbd, $r as Menu, ei as MenuGroup, hi as MenuItem, gi as MenuSeparator, ki as Modal, Ai as ModalFooter, Mi as ModalProvider, Vi as MultiCombobox, qi as Popover, Yi as RadioOptions, Xi as Select, sa as Spinner, na as SplitButton, da as Switch, lc as THEME_INIT_SCRIPT, Ja as Tabs, Ya as Textarea, xo as ThemeToggle, Ts as ToastProvider, ws as Toaster, tc as Toolbar, J as Tooltip, ac as UIProvider, Ae as buttonClassName, kr as dismissTopmostModal, Rn as splitIntoHighlightSegments, Ns as toast, Vr as useDisableHotkeysWhileMounted, ji as useDismissGuard, zr as useGlobalHotkeysStore, yt as useIsClient, cc as useKeyboardScrollable, mo as useThemeStore, Rs as useToast, oc as withClientOnly };
|