@minimalstuff/ui 4.2.1 → 4.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +25 -0
- package/dist/minimalstuff-ui.css +1 -1
- package/dist/minimalstuff-ui.js +441 -378
- package/package.json +1 -1
package/dist/minimalstuff-ui.js
CHANGED
|
@@ -1938,9 +1938,9 @@ var ar = {
|
|
|
1938
1938
|
xl: "rounded-r-xl",
|
|
1939
1939
|
full: "rounded-r-lg"
|
|
1940
1940
|
}
|
|
1941
|
-
};
|
|
1941
|
+
}, ur = r(null);
|
|
1942
1942
|
// src/components/modal/modal_footer_slot.tsx
|
|
1943
|
-
function
|
|
1943
|
+
function dr({ onSlotChange: e, children: t }) {
|
|
1944
1944
|
return /* @__PURE__ */ g("div", {
|
|
1945
1945
|
ref: e,
|
|
1946
1946
|
className: x("flex items-center justify-end gap-3 px-6 py-4 border-t flex-shrink-0 empty:hidden", U),
|
|
@@ -1948,45 +1948,45 @@ function ur({ onSlotChange: e, children: t }) {
|
|
|
1948
1948
|
});
|
|
1949
1949
|
}
|
|
1950
1950
|
// src/components/modal/modal_footer_slot_context.ts
|
|
1951
|
-
var
|
|
1951
|
+
var fr = r(null);
|
|
1952
1952
|
// src/components/shared/accessible_name.ts
|
|
1953
|
-
function
|
|
1953
|
+
function pr(e) {
|
|
1954
1954
|
return (e ?? "").replace(/\s+/g, " ").trim();
|
|
1955
1955
|
}
|
|
1956
|
-
function
|
|
1956
|
+
function mr(e, t) {
|
|
1957
1957
|
return t.split(/\s+/).map((t) => e.ownerDocument.getElementById(t)?.textContent).join(" ");
|
|
1958
1958
|
}
|
|
1959
|
-
function
|
|
1960
|
-
let t =
|
|
1959
|
+
function hr(e) {
|
|
1960
|
+
let t = pr(e.getAttribute("aria-label"));
|
|
1961
1961
|
if (t) return t;
|
|
1962
1962
|
let n = e.getAttribute("aria-labelledby");
|
|
1963
|
-
return (n ?
|
|
1963
|
+
return (n ? pr(mr(e, n)) : "") || pr(e.textContent);
|
|
1964
1964
|
}
|
|
1965
1965
|
// src/components/shared/portal_target.ts
|
|
1966
|
-
var
|
|
1967
|
-
function
|
|
1968
|
-
return e?.closest(
|
|
1966
|
+
var gr = "main, nav, aside, header, footer, form[aria-label], form[aria-labelledby], section[aria-label], section[aria-labelledby], [role=main], [role=navigation], [role=complementary], [role=banner], [role=contentinfo], [role=region], [role=search], [role=form], dialog, [role=dialog], [role=alertdialog]";
|
|
1967
|
+
function _r(e) {
|
|
1968
|
+
return e?.closest(gr) ?? (e?.ownerDocument ?? document).body;
|
|
1969
1969
|
}
|
|
1970
1970
|
// src/components/tooltip/tooltip.tsx
|
|
1971
|
-
var
|
|
1971
|
+
var vr = 8, yr = 8, br = {
|
|
1972
1972
|
top: "data-[state=closed]:translate-y-1",
|
|
1973
1973
|
bottom: "data-[state=closed]:-translate-y-1",
|
|
1974
1974
|
left: "data-[state=closed]:translate-x-1",
|
|
1975
1975
|
right: "data-[state=closed]:-translate-x-1"
|
|
1976
|
-
},
|
|
1976
|
+
}, xr = {
|
|
1977
1977
|
top: "bottom",
|
|
1978
1978
|
bottom: "top",
|
|
1979
1979
|
left: "right",
|
|
1980
1980
|
right: "left"
|
|
1981
1981
|
};
|
|
1982
|
-
function
|
|
1982
|
+
function Sr({ content: e, children: t, position: r = "top", showOnClick: i = !1, temporaryContent: s, temporaryDuration: d = 2e3, disabled: m = !1, radius: v = "lg", onTemporaryShow: b, className: S, describeChild: C, portalContainer: w, ref: T }) {
|
|
1983
1983
|
let { isMounted: E, isVisible: D, setIsVisible: O, open: k, close: A } = qn(), [M, N] = p(!1), P = l(), F = f(null), [I, L] = p(null), [R, z] = p(null), [ee, te] = p(null), B = f(void 0), { refs: V, floatingStyles: ne, placement: H, middlewareData: re, isPositioned: U } = kn({
|
|
1984
1984
|
placement: r,
|
|
1985
1985
|
strategy: "fixed",
|
|
1986
1986
|
open: E,
|
|
1987
1987
|
whileElementsMounted: vn,
|
|
1988
1988
|
middleware: [
|
|
1989
|
-
jn(
|
|
1989
|
+
jn(vr),
|
|
1990
1990
|
Nn(),
|
|
1991
1991
|
Mn({ padding: 8 }),
|
|
1992
1992
|
Pn({ element: F })
|
|
@@ -1996,7 +1996,7 @@ function xr({ content: e, children: t, position: r = "top", showOnClick: i = !1,
|
|
|
1996
1996
|
let ie = o((e) => we(V.setReference, L, T)(e), [V, T]), ae = o((e) => we(V.setFloating, z)(e), [V]);
|
|
1997
1997
|
u(() => {
|
|
1998
1998
|
let e = I?.firstElementChild;
|
|
1999
|
-
te(R && e ?
|
|
1999
|
+
te(R && e ? pr(R.textContent) === hr(e) : null);
|
|
2000
2000
|
}, [
|
|
2001
2001
|
I,
|
|
2002
2002
|
R,
|
|
@@ -2025,7 +2025,7 @@ function xr({ content: e, children: t, position: r = "top", showOnClick: i = !1,
|
|
|
2025
2025
|
i && s && oe(), a(t) && t.props.onClick?.(e);
|
|
2026
2026
|
},
|
|
2027
2027
|
"aria-describedby": q(a(t) ? t.props["aria-describedby"] : void 0, ce && (C ?? (ee !== null && !ee)) && P)
|
|
2028
|
-
}, de = a(t) ? n(t, ue) : t, fe =
|
|
2028
|
+
}, de = a(t) ? n(t, ue) : t, fe = re.arrow?.x, pe = re.arrow?.y, me = xr[W];
|
|
2029
2029
|
return /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ _("span", {
|
|
2030
2030
|
ref: ie,
|
|
2031
2031
|
className: x("inline-block", S),
|
|
@@ -2046,39 +2046,39 @@ function xr({ content: e, children: t, position: r = "top", showOnClick: i = !1,
|
|
|
2046
2046
|
id: P,
|
|
2047
2047
|
role: "tooltip",
|
|
2048
2048
|
"data-state": D ? "open" : "closed",
|
|
2049
|
-
className: x("px-3 py-1.5 text-sm whitespace-nowrap", "text-white dark:text-gray-900 bg-gray-900 dark:bg-gray-100 shadow-lg", "transition-[opacity,transform] duration-150 ease-out", D ? "opacity-100" : "opacity-0",
|
|
2049
|
+
className: x("px-3 py-1.5 text-sm whitespace-nowrap", "text-white dark:text-gray-900 bg-gray-900 dark:bg-gray-100 shadow-lg", "transition-[opacity,transform] duration-150 ease-out", D ? "opacity-100" : "opacity-0", br[W], j[v]),
|
|
2050
2050
|
children: [le, /* @__PURE__ */ g("div", {
|
|
2051
2051
|
ref: F,
|
|
2052
2052
|
style: {
|
|
2053
2053
|
position: "absolute",
|
|
2054
|
-
width: `${
|
|
2055
|
-
height: `${
|
|
2056
|
-
left:
|
|
2057
|
-
top:
|
|
2058
|
-
[
|
|
2054
|
+
width: `${yr}px`,
|
|
2055
|
+
height: `${yr}px`,
|
|
2056
|
+
left: fe === void 0 ? void 0 : `${fe}px`,
|
|
2057
|
+
top: pe === void 0 ? void 0 : `${pe}px`,
|
|
2058
|
+
[me]: `-${yr / 2}px`
|
|
2059
2059
|
},
|
|
2060
2060
|
className: "rotate-45 bg-gray-900 dark:bg-gray-100"
|
|
2061
2061
|
})]
|
|
2062
2062
|
})
|
|
2063
|
-
}),
|
|
2063
|
+
}), w ?? _r(I))] });
|
|
2064
2064
|
}
|
|
2065
2065
|
// src/components/icon_button/icon_button.tsx
|
|
2066
|
-
var
|
|
2066
|
+
var Cr = {
|
|
2067
2067
|
xs: "p-1",
|
|
2068
2068
|
sm: "p-2",
|
|
2069
2069
|
md: "p-2",
|
|
2070
2070
|
lg: "p-3"
|
|
2071
|
-
},
|
|
2071
|
+
}, wr = {
|
|
2072
2072
|
xs: "w-4 h-4",
|
|
2073
2073
|
sm: "w-4 h-4",
|
|
2074
2074
|
md: "w-5 h-5",
|
|
2075
2075
|
lg: "w-6 h-6"
|
|
2076
2076
|
};
|
|
2077
|
-
function
|
|
2077
|
+
function Tr(e) {
|
|
2078
2078
|
if (e) return e === !0 ? {} : typeof e == "string" ? { position: e } : e;
|
|
2079
2079
|
}
|
|
2080
|
-
function
|
|
2081
|
-
let { icon: t, "aria-label": n, unstyled: r = !1, variant: i = "outline", color: a = "neutral", size: o = "md", radius: s = "md", className: c, children: l, tooltip: u, ref: d, ...f } = e, p = O[a], m =
|
|
2080
|
+
function Er(e) {
|
|
2081
|
+
let { icon: t, "aria-label": n, unstyled: r = !1, variant: i = "outline", color: a = "neutral", size: o = "md", radius: s = "md", className: c, children: l, tooltip: u, ref: d, ...f } = e, p = O[a], m = Tr(u), h = /* @__PURE__ */ _("button", {
|
|
2082
2082
|
ref: d,
|
|
2083
2083
|
type: "button",
|
|
2084
2084
|
"aria-label": n,
|
|
@@ -2086,16 +2086,16 @@ function Tr(e) {
|
|
|
2086
2086
|
A,
|
|
2087
2087
|
"border",
|
|
2088
2088
|
j[s],
|
|
2089
|
-
|
|
2089
|
+
Cr[o],
|
|
2090
2090
|
p[i],
|
|
2091
2091
|
p.focusOutline
|
|
2092
2092
|
], c),
|
|
2093
2093
|
...f,
|
|
2094
|
-
children: [/* @__PURE__ */ g("div", { className: x(t,
|
|
2094
|
+
children: [/* @__PURE__ */ g("div", { className: x(t, wr[o], l && "mr-1") }), l]
|
|
2095
2095
|
});
|
|
2096
2096
|
if (!m) return h;
|
|
2097
2097
|
let v = m.content !== void 0;
|
|
2098
|
-
return /* @__PURE__ */ g(
|
|
2098
|
+
return /* @__PURE__ */ g(Sr, {
|
|
2099
2099
|
content: v ? m.content : n,
|
|
2100
2100
|
position: m.position,
|
|
2101
2101
|
describeChild: v ? void 0 : !1,
|
|
@@ -2103,7 +2103,7 @@ function Tr(e) {
|
|
|
2103
2103
|
});
|
|
2104
2104
|
}
|
|
2105
2105
|
// src/components/modal/modal_header.tsx
|
|
2106
|
-
function
|
|
2106
|
+
function Dr({ titleId: e, title: t, onDismiss: n, dismissible: r, closeLabel: i }) {
|
|
2107
2107
|
let a = Ae();
|
|
2108
2108
|
return /* @__PURE__ */ _("div", {
|
|
2109
2109
|
className: "flex items-center justify-between gap-4 px-6 pt-5 pb-4 flex-shrink-0",
|
|
@@ -2111,7 +2111,7 @@ function Er({ titleId: e, title: t, onDismiss: n, dismissible: r, closeLabel: i
|
|
|
2111
2111
|
id: e,
|
|
2112
2112
|
className: "text-base font-medium tracking-tight text-gray-900 dark:text-gray-100",
|
|
2113
2113
|
children: t
|
|
2114
|
-
}), r && /* @__PURE__ */ g(
|
|
2114
|
+
}), r && /* @__PURE__ */ g(Er, {
|
|
2115
2115
|
icon: "i-mdi-close",
|
|
2116
2116
|
onClick: n,
|
|
2117
2117
|
"aria-label": i ?? a.close,
|
|
@@ -2122,78 +2122,114 @@ function Er({ titleId: e, title: t, onDismiss: n, dismissible: r, closeLabel: i
|
|
|
2122
2122
|
})]
|
|
2123
2123
|
});
|
|
2124
2124
|
}
|
|
2125
|
+
// src/components/modal/use_guarded_dismiss.ts
|
|
2126
|
+
function Or(e) {
|
|
2127
|
+
try {
|
|
2128
|
+
return e();
|
|
2129
|
+
} catch (e) {
|
|
2130
|
+
return $n(e), null;
|
|
2131
|
+
}
|
|
2132
|
+
}
|
|
2133
|
+
function kr({ onDismiss: e, isEnded: t }) {
|
|
2134
|
+
let n = f(e), r = f(t), i = f([]), a = f(!1);
|
|
2135
|
+
u(() => {
|
|
2136
|
+
n.current = e, r.current = t;
|
|
2137
|
+
});
|
|
2138
|
+
let [s] = p(() => ({ register: (e) => (i.current = [...i.current, e], () => {
|
|
2139
|
+
i.current = i.current.filter((t) => t !== e);
|
|
2140
|
+
}) })), c = o((e) => {
|
|
2141
|
+
a.current = !0, e.then((e) => {
|
|
2142
|
+
a.current = !1, e && !r.current && n.current();
|
|
2143
|
+
}, (e) => {
|
|
2144
|
+
a.current = !1, $n(e);
|
|
2145
|
+
});
|
|
2146
|
+
}, []);
|
|
2147
|
+
return {
|
|
2148
|
+
dismiss: o(() => {
|
|
2149
|
+
if (a.current) return;
|
|
2150
|
+
let e = i.current.at(-1);
|
|
2151
|
+
if (!e) {
|
|
2152
|
+
n.current();
|
|
2153
|
+
return;
|
|
2154
|
+
}
|
|
2155
|
+
let t = Or(e.current);
|
|
2156
|
+
t !== null && (typeof t == "boolean" ? t && n.current() : c(t));
|
|
2157
|
+
}, [c]),
|
|
2158
|
+
registry: s
|
|
2159
|
+
};
|
|
2160
|
+
}
|
|
2125
2161
|
// src/components/modal/body_scroll_lock.ts
|
|
2126
|
-
var
|
|
2127
|
-
function
|
|
2162
|
+
var Ar = "--scrollbar-compensation", jr = 0, Mr;
|
|
2163
|
+
function Nr() {
|
|
2128
2164
|
let { style: e } = document.documentElement;
|
|
2129
2165
|
return {
|
|
2130
2166
|
overflow: e.overflow,
|
|
2131
2167
|
overflowX: e.overflowX,
|
|
2132
2168
|
overflowY: e.overflowY,
|
|
2133
2169
|
paddingRight: e.paddingRight,
|
|
2134
|
-
scrollbarCompensation: e.getPropertyValue(
|
|
2170
|
+
scrollbarCompensation: e.getPropertyValue(Ar)
|
|
2135
2171
|
};
|
|
2136
2172
|
}
|
|
2137
|
-
function
|
|
2173
|
+
function Pr(e) {
|
|
2138
2174
|
let { style: t } = document.documentElement;
|
|
2139
|
-
t.overflow = e.overflow, t.overflowX = e.overflowX, t.overflowY = e.overflowY, t.paddingRight = e.paddingRight, e.scrollbarCompensation === "" ? t.removeProperty(
|
|
2175
|
+
t.overflow = e.overflow, t.overflowX = e.overflowX, t.overflowY = e.overflowY, t.paddingRight = e.paddingRight, e.scrollbarCompensation === "" ? t.removeProperty(Ar) : t.setProperty(Ar, e.scrollbarCompensation);
|
|
2140
2176
|
}
|
|
2141
|
-
function
|
|
2177
|
+
function Fr(e, t) {
|
|
2142
2178
|
let { style: n } = document.documentElement;
|
|
2143
|
-
n.paddingRight = `${t + e}px`, n.setProperty(
|
|
2179
|
+
n.paddingRight = `${t + e}px`, n.setProperty(Ar, `${e}px`);
|
|
2144
2180
|
}
|
|
2145
|
-
function
|
|
2146
|
-
if (
|
|
2181
|
+
function Ir() {
|
|
2182
|
+
if (jr === 0) {
|
|
2147
2183
|
let e = document.documentElement;
|
|
2148
|
-
|
|
2184
|
+
Mr = Nr();
|
|
2149
2185
|
let t = Number.parseFloat(getComputedStyle(e).paddingRight) || 0, n = e.clientWidth;
|
|
2150
2186
|
e.style.overflow = "hidden";
|
|
2151
2187
|
let r = e.clientWidth - n;
|
|
2152
|
-
r > 0 &&
|
|
2188
|
+
r > 0 && Fr(r, t);
|
|
2153
2189
|
}
|
|
2154
|
-
|
|
2190
|
+
jr += 1;
|
|
2155
2191
|
}
|
|
2156
|
-
function
|
|
2157
|
-
--
|
|
2192
|
+
function Lr() {
|
|
2193
|
+
--jr, jr === 0 && Mr && (Pr(Mr), Mr = void 0);
|
|
2158
2194
|
}
|
|
2159
|
-
function
|
|
2160
|
-
c(() => (
|
|
2195
|
+
function Rr() {
|
|
2196
|
+
c(() => (Ir(), Lr), []);
|
|
2161
2197
|
}
|
|
2162
2198
|
// src/components/modal/modal_stack.ts
|
|
2163
|
-
var
|
|
2164
|
-
function
|
|
2165
|
-
return
|
|
2166
|
-
let t =
|
|
2167
|
-
t !== -1 &&
|
|
2199
|
+
var zr = [];
|
|
2200
|
+
function Br(e) {
|
|
2201
|
+
return zr.push(e), () => {
|
|
2202
|
+
let t = zr.indexOf(e);
|
|
2203
|
+
t !== -1 && zr.splice(t, 1);
|
|
2168
2204
|
};
|
|
2169
2205
|
}
|
|
2170
|
-
function
|
|
2171
|
-
return
|
|
2206
|
+
function Vr(e) {
|
|
2207
|
+
return zr[zr.length - 1] === e;
|
|
2172
2208
|
}
|
|
2173
2209
|
// src/components/shared/tabbable.ts
|
|
2174
|
-
var
|
|
2175
|
-
function
|
|
2210
|
+
var Hr = "a[href], button, input, select, textarea, summary, audio[controls], video[controls], [contenteditable]:not([contenteditable=\"false\"]), [tabindex]";
|
|
2211
|
+
function Ur(e) {
|
|
2176
2212
|
return e.matches(":disabled");
|
|
2177
2213
|
}
|
|
2178
|
-
function
|
|
2214
|
+
function Wr(e) {
|
|
2179
2215
|
return e.getAttribute("tabindex") === "-1";
|
|
2180
2216
|
}
|
|
2181
|
-
function
|
|
2217
|
+
function Gr(e) {
|
|
2182
2218
|
return e.matches("input[type=\"hidden\"]");
|
|
2183
2219
|
}
|
|
2184
|
-
function
|
|
2220
|
+
function Kr(e) {
|
|
2185
2221
|
return e.closest("[inert]") !== null;
|
|
2186
2222
|
}
|
|
2187
|
-
function
|
|
2223
|
+
function qr(e) {
|
|
2188
2224
|
return typeof e.checkVisibility != "function" || e.checkVisibility();
|
|
2189
2225
|
}
|
|
2190
|
-
function
|
|
2191
|
-
return !
|
|
2226
|
+
function Jr(e) {
|
|
2227
|
+
return !Ur(e) && !Wr(e) && !Gr(e) && !Kr(e) && qr(e);
|
|
2192
2228
|
}
|
|
2193
|
-
function
|
|
2229
|
+
function Yr(e) {
|
|
2194
2230
|
return e instanceof HTMLInputElement && e.type === "radio" && e.name !== "";
|
|
2195
2231
|
}
|
|
2196
|
-
function
|
|
2232
|
+
function Xr(e) {
|
|
2197
2233
|
let t = /* @__PURE__ */ new Map();
|
|
2198
2234
|
for (let n of e) {
|
|
2199
2235
|
let e = t.get(n.form) ?? /* @__PURE__ */ new Map();
|
|
@@ -2203,24 +2239,24 @@ function qr(e) {
|
|
|
2203
2239
|
}
|
|
2204
2240
|
return Array.from(t.values()).flatMap((e) => Array.from(e.values()));
|
|
2205
2241
|
}
|
|
2206
|
-
function
|
|
2242
|
+
function Zr(e) {
|
|
2207
2243
|
return e.find((e) => e.checked) ?? e[0];
|
|
2208
2244
|
}
|
|
2209
|
-
function
|
|
2210
|
-
let t = Array.from(e.querySelectorAll(
|
|
2211
|
-
return t.filter((e) => !
|
|
2245
|
+
function Qr(e) {
|
|
2246
|
+
let t = Array.from(e.querySelectorAll(Hr)).filter(Jr), n = t.filter(Yr), r = new Set(Xr(n).map(Zr));
|
|
2247
|
+
return t.filter((e) => !Yr(e) || r.has(e));
|
|
2212
2248
|
}
|
|
2213
2249
|
// src/components/modal/use_modal_dialog.ts
|
|
2214
|
-
function
|
|
2215
|
-
let r = t ?
|
|
2216
|
-
return r || n === "content" ? r : e ?
|
|
2250
|
+
function $r({ dialog: e, content: t, fallbackScope: n }) {
|
|
2251
|
+
let r = t ? Qr(t)[0] : void 0;
|
|
2252
|
+
return r || n === "content" ? r : e ? Qr(e)[0] : void 0;
|
|
2217
2253
|
}
|
|
2218
|
-
function
|
|
2219
|
-
let t =
|
|
2254
|
+
function ei(e) {
|
|
2255
|
+
let t = $r(e);
|
|
2220
2256
|
(e.initialFocusRef?.current ?? t ?? e.dialog)?.focus();
|
|
2221
2257
|
}
|
|
2222
|
-
function
|
|
2223
|
-
let n =
|
|
2258
|
+
function ti(e, t) {
|
|
2259
|
+
let n = Qr(t);
|
|
2224
2260
|
if (n.length === 0) {
|
|
2225
2261
|
e.preventDefault(), t.focus();
|
|
2226
2262
|
return;
|
|
@@ -2228,7 +2264,7 @@ function Qr(e, t) {
|
|
|
2228
2264
|
let r = n[0], i = n[n.length - 1], a = document.activeElement;
|
|
2229
2265
|
(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());
|
|
2230
2266
|
}
|
|
2231
|
-
function
|
|
2267
|
+
function ni() {
|
|
2232
2268
|
let [e, t] = p(!1);
|
|
2233
2269
|
return c(() => {
|
|
2234
2270
|
let e = requestAnimationFrame(() => {
|
|
@@ -2237,15 +2273,15 @@ function $r() {
|
|
|
2237
2273
|
return () => cancelAnimationFrame(e);
|
|
2238
2274
|
}, []), e;
|
|
2239
2275
|
}
|
|
2240
|
-
function
|
|
2276
|
+
function ri(e, { isEnded: t, onDismiss: n, dismissible: r, modalToken: i }) {
|
|
2241
2277
|
c(() => {
|
|
2242
2278
|
if (t) return;
|
|
2243
2279
|
let a = (t) => {
|
|
2244
|
-
if (
|
|
2280
|
+
if (Vr(i)) {
|
|
2245
2281
|
if (t.key === "Escape") {
|
|
2246
2282
|
if (t.defaultPrevented) return;
|
|
2247
2283
|
t.preventDefault(), r && n();
|
|
2248
|
-
} else t.key === "Tab" && e.current &&
|
|
2284
|
+
} else t.key === "Tab" && e.current && ti(t, e.current);
|
|
2249
2285
|
}
|
|
2250
2286
|
};
|
|
2251
2287
|
return document.addEventListener("keydown", a), () => document.removeEventListener("keydown", a);
|
|
@@ -2257,16 +2293,16 @@ function ei(e, { isEnded: t, onDismiss: n, dismissible: r, modalToken: i }) {
|
|
|
2257
2293
|
e
|
|
2258
2294
|
]);
|
|
2259
2295
|
}
|
|
2260
|
-
function
|
|
2296
|
+
function ii({ isEnded: e, onDismiss: t, dismissible: n, initialFocusRef: r, initialFocusFallbackScope: i = "dialog", getFocusFallback: a }) {
|
|
2261
2297
|
let [o] = p(() => Symbol("modal")), [s, l] = p(null), u = f(null), d = f(null), m = f(null);
|
|
2262
2298
|
c(() => {
|
|
2263
|
-
if (!e) return
|
|
2264
|
-
}, [e, o]),
|
|
2265
|
-
let h =
|
|
2299
|
+
if (!e) return Br(o);
|
|
2300
|
+
}, [e, o]), Rr();
|
|
2301
|
+
let h = ni();
|
|
2266
2302
|
return c(() => {
|
|
2267
2303
|
e || (m.current = document.activeElement);
|
|
2268
2304
|
}, [e]), c(() => {
|
|
2269
|
-
s && !e &&
|
|
2305
|
+
s && !e && ei({
|
|
2270
2306
|
dialog: u.current,
|
|
2271
2307
|
content: d.current,
|
|
2272
2308
|
initialFocusRef: r,
|
|
@@ -2276,7 +2312,7 @@ function ti({ isEnded: e, onDismiss: t, dismissible: n, initialFocusRef: r, init
|
|
|
2276
2312
|
if (!e) return;
|
|
2277
2313
|
let t = m.current;
|
|
2278
2314
|
(t?.isConnected ? t : a?.())?.focus();
|
|
2279
|
-
}, [e, a]),
|
|
2315
|
+
}, [e, a]), ri(u, {
|
|
2280
2316
|
isEnded: e,
|
|
2281
2317
|
onDismiss: t,
|
|
2282
2318
|
dismissible: n,
|
|
@@ -2289,11 +2325,15 @@ function ti({ isEnded: e, onDismiss: t, dismissible: n, initialFocusRef: r, init
|
|
|
2289
2325
|
isVisible: h && !e,
|
|
2290
2326
|
handleBackdropClick: () => {
|
|
2291
2327
|
!e && n && t();
|
|
2328
|
+
},
|
|
2329
|
+
handleBackdropMouseDown: (e) => {
|
|
2330
|
+
let t = e.target;
|
|
2331
|
+
e.currentTarget.contains(t) && !u.current?.contains(t) && e.preventDefault();
|
|
2292
2332
|
}
|
|
2293
2333
|
};
|
|
2294
2334
|
}
|
|
2295
2335
|
// node_modules/.pnpm/zustand@5.0.15_@types+react@19.3.0_react@19.3.1_use-sync-external-store@1.7.0_react@19.3.1_/node_modules/zustand/esm/vanilla.mjs
|
|
2296
|
-
var
|
|
2336
|
+
var ai = (e) => {
|
|
2297
2337
|
let t, n = /* @__PURE__ */ new Set(), r = (e, r) => {
|
|
2298
2338
|
let i = typeof e == "function" ? e(t) : e;
|
|
2299
2339
|
if (!Object.is(i, t)) {
|
|
@@ -2307,78 +2347,85 @@ var ni = (e) => {
|
|
|
2307
2347
|
subscribe: (e) => (n.add(e), () => n.delete(e))
|
|
2308
2348
|
}, o = t = e(r, i, a);
|
|
2309
2349
|
return a;
|
|
2310
|
-
},
|
|
2311
|
-
function
|
|
2350
|
+
}, oi = ((e) => e ? ai(e) : ai), si = (e) => e;
|
|
2351
|
+
function ci(e, n = si) {
|
|
2312
2352
|
let r = t.useSyncExternalStore(e.subscribe, t.useCallback(() => n(e.getState()), [e, n]), t.useCallback(() => n(e.getInitialState()), [e, n]));
|
|
2313
2353
|
return t.useDebugValue(r), r;
|
|
2314
2354
|
}
|
|
2315
|
-
var
|
|
2316
|
-
let t =
|
|
2355
|
+
var li = (e) => {
|
|
2356
|
+
let t = oi(e), n = (e) => ci(t, e);
|
|
2317
2357
|
return Object.assign(n, t), n;
|
|
2318
|
-
},
|
|
2358
|
+
}, ui = ((e) => e ? li(e) : li), di = ui((e) => ({
|
|
2319
2359
|
globalHotkeysEnabled: !0,
|
|
2320
2360
|
setGlobalHotkeysEnabled: (t) => e({ globalHotkeysEnabled: t })
|
|
2321
|
-
})),
|
|
2322
|
-
function
|
|
2323
|
-
c(() => (
|
|
2324
|
-
--
|
|
2361
|
+
})), fi = 0;
|
|
2362
|
+
function pi() {
|
|
2363
|
+
c(() => (fi += 1, fi === 1 && di.getState().setGlobalHotkeysEnabled(!1), () => {
|
|
2364
|
+
--fi, fi === 0 && di.getState().setGlobalHotkeysEnabled(!0);
|
|
2325
2365
|
}), []);
|
|
2326
2366
|
}
|
|
2327
2367
|
// src/components/drawer/drawer.tsx
|
|
2328
|
-
function
|
|
2368
|
+
function mi() {
|
|
2329
2369
|
let e = document.querySelector("main");
|
|
2330
2370
|
return e && !e.hasAttribute("tabindex") && (e.tabIndex = -1), e;
|
|
2331
2371
|
}
|
|
2332
|
-
function
|
|
2333
|
-
|
|
2334
|
-
let p = l(), {
|
|
2335
|
-
isEnded: e,
|
|
2372
|
+
function hi({ isEnded: e, onDismiss: t, title: n, children: r, footer: i, size: a, side: o, radius: s, className: c, dismissible: u, closeLabel: d, initialFocusRef: f }) {
|
|
2373
|
+
pi();
|
|
2374
|
+
let p = l(), { dismiss: m, registry: h } = kr({
|
|
2336
2375
|
onDismiss: t,
|
|
2376
|
+
isEnded: e
|
|
2377
|
+
}), { dialogRef: v, contentRef: b, footerSlot: S, setFooterSlot: C, isVisible: w, handleBackdropClick: T, handleBackdropMouseDown: E } = ii({
|
|
2378
|
+
isEnded: e,
|
|
2379
|
+
onDismiss: m,
|
|
2337
2380
|
dismissible: u,
|
|
2338
2381
|
initialFocusRef: f,
|
|
2339
2382
|
initialFocusFallbackScope: "content",
|
|
2340
|
-
getFocusFallback:
|
|
2383
|
+
getFocusFallback: mi
|
|
2341
2384
|
});
|
|
2342
|
-
return
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2385
|
+
return /* @__PURE__ */ g(ur.Provider, {
|
|
2386
|
+
value: h,
|
|
2387
|
+
children: y(/* @__PURE__ */ _("div", {
|
|
2388
|
+
className: x("fixed inset-0 z-50", "transition-opacity duration-200 ease-out", w ? "opacity-100" : "opacity-0"),
|
|
2389
|
+
onClick: T,
|
|
2390
|
+
onMouseDown: E,
|
|
2391
|
+
children: [/* @__PURE__ */ g("div", {
|
|
2392
|
+
className: "fixed inset-0 bg-black/60 backdrop-blur-md",
|
|
2393
|
+
"aria-hidden": "true"
|
|
2394
|
+
}), /* @__PURE__ */ _("div", {
|
|
2395
|
+
ref: v,
|
|
2396
|
+
role: "dialog",
|
|
2397
|
+
"aria-modal": "true",
|
|
2398
|
+
"aria-labelledby": p,
|
|
2399
|
+
tabIndex: -1,
|
|
2400
|
+
inert: e,
|
|
2401
|
+
className: x("fixed inset-y-0 h-full w-full flex flex-col overflow-hidden", or[o], ar[a], W, G, "shadow-2xl", lr[o][s], "transition-transform duration-200 ease-out motion-reduce:transition-none", "focus:outline-none", w ? cr : sr[o]),
|
|
2402
|
+
onClick: (e) => e.stopPropagation(),
|
|
2403
|
+
children: [
|
|
2404
|
+
/* @__PURE__ */ g(Dr, {
|
|
2405
|
+
titleId: p,
|
|
2406
|
+
title: n,
|
|
2407
|
+
onDismiss: m,
|
|
2408
|
+
dismissible: u,
|
|
2409
|
+
closeLabel: d
|
|
2410
|
+
}),
|
|
2411
|
+
/* @__PURE__ */ g("div", {
|
|
2412
|
+
ref: b,
|
|
2413
|
+
className: x("flex-1 overflow-y-auto min-h-0 px-6 pb-6 text-sm leading-relaxed text-gray-600 dark:text-gray-400", c),
|
|
2414
|
+
children: /* @__PURE__ */ g(fr.Provider, {
|
|
2415
|
+
value: S,
|
|
2416
|
+
children: r
|
|
2417
|
+
})
|
|
2418
|
+
}),
|
|
2419
|
+
/* @__PURE__ */ g(dr, {
|
|
2420
|
+
onSlotChange: C,
|
|
2421
|
+
children: i
|
|
2371
2422
|
})
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
})
|
|
2377
|
-
]
|
|
2378
|
-
})]
|
|
2379
|
-
}), document.body);
|
|
2423
|
+
]
|
|
2424
|
+
})]
|
|
2425
|
+
}), document.body)
|
|
2426
|
+
});
|
|
2380
2427
|
}
|
|
2381
|
-
function
|
|
2428
|
+
function gi(e) {
|
|
2382
2429
|
let [t, n] = p(!e);
|
|
2383
2430
|
return e && t && n(!1), c(() => {
|
|
2384
2431
|
if (e) return;
|
|
@@ -2386,8 +2433,8 @@ function pi(e) {
|
|
|
2386
2433
|
return () => clearTimeout(t);
|
|
2387
2434
|
}, [e]), e || !t;
|
|
2388
2435
|
}
|
|
2389
|
-
function
|
|
2390
|
-
return
|
|
2436
|
+
function _i({ isOpen: e, onClose: t, size: n = "md", side: r = "right", radius: i = "none", dismissible: a = !0, ...o }) {
|
|
2437
|
+
return gi(e) ? /* @__PURE__ */ g(hi, {
|
|
2391
2438
|
...o,
|
|
2392
2439
|
isEnded: !e,
|
|
2393
2440
|
onDismiss: t,
|
|
@@ -2398,21 +2445,21 @@ function mi({ isOpen: e, onClose: t, size: n = "md", side: r = "right", radius:
|
|
|
2398
2445
|
}) : null;
|
|
2399
2446
|
}
|
|
2400
2447
|
// src/components/shared/use_controlled_length.ts
|
|
2401
|
-
function
|
|
2448
|
+
function vi(e) {
|
|
2402
2449
|
return typeof e == "string" ? e.length : 0;
|
|
2403
2450
|
}
|
|
2404
|
-
function
|
|
2405
|
-
let [n, r] = p(
|
|
2451
|
+
function yi(e, t) {
|
|
2452
|
+
let [n, r] = p(vi(t)), i = e !== void 0;
|
|
2406
2453
|
return {
|
|
2407
|
-
length: i ?
|
|
2454
|
+
length: i ? vi(e) : n,
|
|
2408
2455
|
trackLength: (e) => {
|
|
2409
2456
|
i || r(e.length);
|
|
2410
2457
|
}
|
|
2411
2458
|
};
|
|
2412
2459
|
}
|
|
2413
2460
|
// src/components/input/input.tsx
|
|
2414
|
-
function
|
|
2415
|
-
let { fieldId: v, errorId: y, descriptionId: b, characterCountId: S } = J(p), { length: C, trackLength: w } =
|
|
2461
|
+
function bi({ label: e, description: t, error: n, showCharCount: r = !1, minLength: i, maxLength: a, radius: o = "md", unstyled: s = !1, className: c, wrapperClassName: l, value: u, defaultValue: d, onChange: f, id: p, "aria-describedby": m, ...h }) {
|
|
2462
|
+
let { fieldId: v, errorId: y, descriptionId: b, characterCountId: S } = J(p), { length: C, trackLength: w } = yi(u, d), T = r && (i !== void 0 || a !== void 0), E = (e) => {
|
|
2416
2463
|
w(e.target.value), f?.(e);
|
|
2417
2464
|
};
|
|
2418
2465
|
return /* @__PURE__ */ _(Fe, {
|
|
@@ -2449,13 +2496,13 @@ function _i({ label: e, description: t, error: n, showCharCount: r = !1, minLeng
|
|
|
2449
2496
|
});
|
|
2450
2497
|
}
|
|
2451
2498
|
// src/components/kbd/kbd.tsx
|
|
2452
|
-
var
|
|
2499
|
+
var xi = {
|
|
2453
2500
|
xs: "px-1.5 py-0.5 text-xs",
|
|
2454
2501
|
sm: "px-2 py-0.5 text-xs",
|
|
2455
2502
|
md: "px-2.5 py-1 text-sm",
|
|
2456
2503
|
lg: "px-3 py-1 text-base"
|
|
2457
|
-
},
|
|
2458
|
-
className: x("inline-flex items-center",
|
|
2504
|
+
}, Si = ({ children: e, size: t = "sm", radius: n = "sm", unstyled: r = !1, className: i }) => /* @__PURE__ */ g("kbd", {
|
|
2505
|
+
className: x("inline-flex items-center", xi[t], !r && [
|
|
2459
2506
|
"border font-semibold uppercase",
|
|
2460
2507
|
"text-gray-600 dark:text-gray-300",
|
|
2461
2508
|
"bg-gray-100 dark:bg-gray-700",
|
|
@@ -2463,17 +2510,17 @@ var vi = {
|
|
|
2463
2510
|
j[n]
|
|
2464
2511
|
], i),
|
|
2465
2512
|
children: e
|
|
2466
|
-
}),
|
|
2467
|
-
function
|
|
2513
|
+
}), Ci = 4;
|
|
2514
|
+
function wi(e, t) {
|
|
2468
2515
|
return t === "center" ? e : `${e}-${t}`;
|
|
2469
2516
|
}
|
|
2470
|
-
function
|
|
2517
|
+
function Ti({ trigger: e, children: t, side: r = "bottom", align: i = "start", radius: s = "md", className: c, ref: u }) {
|
|
2471
2518
|
let d = f(null), [m, h] = p("first"), { isMounted: v, isVisible: y, setIsVisible: b, open: S, close: C } = qn(), { refs: w, floatingStyles: T, isPositioned: E } = kn({
|
|
2472
|
-
placement:
|
|
2519
|
+
placement: wi(r, i),
|
|
2473
2520
|
open: v,
|
|
2474
2521
|
whileElementsMounted: vn,
|
|
2475
2522
|
middleware: [
|
|
2476
|
-
jn(
|
|
2523
|
+
jn(Ci),
|
|
2477
2524
|
Nn(),
|
|
2478
2525
|
Mn({ padding: 8 })
|
|
2479
2526
|
]
|
|
@@ -2511,7 +2558,7 @@ function Si({ trigger: e, children: t, side: r = "bottom", align: i = "start", r
|
|
|
2511
2558
|
});
|
|
2512
2559
|
}
|
|
2513
2560
|
// src/components/menu_group/menu_group.tsx
|
|
2514
|
-
function
|
|
2561
|
+
function Ei({ label: e, children: t, unstyled: n = !1, className: r, wrapperClassName: i }) {
|
|
2515
2562
|
let a = l();
|
|
2516
2563
|
return /* @__PURE__ */ _("div", {
|
|
2517
2564
|
role: "group",
|
|
@@ -2526,12 +2573,12 @@ function Ci({ label: e, children: t, unstyled: n = !1, className: r, wrapperClas
|
|
|
2526
2573
|
});
|
|
2527
2574
|
}
|
|
2528
2575
|
// src/components/menu_item/menu_item_content.tsx
|
|
2529
|
-
var
|
|
2576
|
+
var Di = ({ icon: e, children: t }) => /* @__PURE__ */ _(h, { children: [e && /* @__PURE__ */ g("div", {
|
|
2530
2577
|
className: x(e, "h-4 w-4 flex-shrink-0"),
|
|
2531
2578
|
"aria-hidden": "true"
|
|
2532
2579
|
}), t] });
|
|
2533
2580
|
// src/components/menu_item/menu_item_end.tsx
|
|
2534
|
-
function
|
|
2581
|
+
function Oi({ trailing: e, selected: t }) {
|
|
2535
2582
|
let n = t !== void 0;
|
|
2536
2583
|
return !e && !n ? null : /* @__PURE__ */ _("span", {
|
|
2537
2584
|
className: "ml-auto flex flex-shrink-0 items-center gap-2 pl-2",
|
|
@@ -2545,17 +2592,17 @@ function Ti({ trailing: e, selected: t }) {
|
|
|
2545
2592
|
});
|
|
2546
2593
|
}
|
|
2547
2594
|
// src/components/menu_item/menu_item_styles.ts
|
|
2548
|
-
var
|
|
2595
|
+
var ki = [
|
|
2549
2596
|
"flex w-full cursor-pointer items-center gap-2 whitespace-nowrap px-4 py-2 text-left text-sm transition-colors",
|
|
2550
2597
|
"focus-visible:bg-gray-100 dark:focus-visible:bg-gray-700",
|
|
2551
2598
|
D
|
|
2552
2599
|
];
|
|
2553
|
-
function
|
|
2554
|
-
return x(
|
|
2600
|
+
function Ai(e, t, n) {
|
|
2601
|
+
return x(ki, e, t ? "text-red-700 dark:text-red-300" : "text-gray-700 dark:text-gray-300", n);
|
|
2555
2602
|
}
|
|
2556
2603
|
// src/components/menu_item/menu_item_button.tsx
|
|
2557
|
-
var
|
|
2558
|
-
function
|
|
2604
|
+
var ji = ["hover:enabled:bg-gray-100 dark:hover:enabled:bg-gray-700", "disabled:cursor-not-allowed disabled:opacity-50"];
|
|
2605
|
+
function Mi({ icon: e, trailing: t, onClick: n, selected: r, danger: i = !1, disabled: a = !1, children: o, className: s, ref: c }) {
|
|
2559
2606
|
let l = Rn();
|
|
2560
2607
|
return /* @__PURE__ */ _("button", {
|
|
2561
2608
|
ref: c,
|
|
@@ -2567,19 +2614,19 @@ function ki({ icon: e, trailing: t, onClick: n, selected: r, danger: i = !1, dis
|
|
|
2567
2614
|
e.stopPropagation(), n(e), l?.();
|
|
2568
2615
|
},
|
|
2569
2616
|
disabled: a,
|
|
2570
|
-
className:
|
|
2571
|
-
children: [/* @__PURE__ */ g(
|
|
2617
|
+
className: Ai(ji, i, s),
|
|
2618
|
+
children: [/* @__PURE__ */ g(Di, {
|
|
2572
2619
|
icon: e,
|
|
2573
2620
|
children: o
|
|
2574
|
-
}), /* @__PURE__ */ g(
|
|
2621
|
+
}), /* @__PURE__ */ g(Oi, {
|
|
2575
2622
|
trailing: t,
|
|
2576
2623
|
selected: r
|
|
2577
2624
|
})]
|
|
2578
2625
|
});
|
|
2579
2626
|
}
|
|
2580
2627
|
// src/components/menu_item/menu_item_link.tsx
|
|
2581
|
-
var
|
|
2582
|
-
function
|
|
2628
|
+
var Ni = "_blank", Pi = "noopener noreferrer", Fi = ["no-underline hover:bg-gray-100 dark:hover:bg-gray-700", "aria-disabled:pointer-events-none aria-disabled:cursor-not-allowed aria-disabled:opacity-50"];
|
|
2629
|
+
function Ii({ icon: e, trailing: t, href: n, target: r, rel: i, danger: a = !1, disabled: o = !1, children: s, className: c, ref: l }) {
|
|
2583
2630
|
let u = Rn();
|
|
2584
2631
|
return /* @__PURE__ */ _("a", {
|
|
2585
2632
|
ref: l,
|
|
@@ -2587,28 +2634,28 @@ function Ni({ icon: e, trailing: t, href: n, target: r, rel: i, danger: a = !1,
|
|
|
2587
2634
|
tabIndex: -1,
|
|
2588
2635
|
href: o ? void 0 : n,
|
|
2589
2636
|
target: r,
|
|
2590
|
-
rel: i ?? (r ===
|
|
2637
|
+
rel: i ?? (r === Ni ? Pi : void 0),
|
|
2591
2638
|
"aria-disabled": o || void 0,
|
|
2592
2639
|
onClick: (e) => {
|
|
2593
2640
|
e.stopPropagation(), u?.();
|
|
2594
2641
|
},
|
|
2595
|
-
className:
|
|
2596
|
-
children: [/* @__PURE__ */ g(
|
|
2642
|
+
className: Ai(Fi, a, c),
|
|
2643
|
+
children: [/* @__PURE__ */ g(Di, {
|
|
2597
2644
|
icon: e,
|
|
2598
2645
|
children: s
|
|
2599
|
-
}), /* @__PURE__ */ g(
|
|
2646
|
+
}), /* @__PURE__ */ g(Oi, { trailing: t })]
|
|
2600
2647
|
});
|
|
2601
2648
|
}
|
|
2602
2649
|
// src/components/menu_item/menu_item.tsx
|
|
2603
|
-
function
|
|
2604
|
-
return e.href === void 0 ? /* @__PURE__ */ g(
|
|
2650
|
+
function Li(e) {
|
|
2651
|
+
return e.href === void 0 ? /* @__PURE__ */ g(Mi, { ...e }) : /* @__PURE__ */ g(Ii, { ...e });
|
|
2605
2652
|
}
|
|
2606
2653
|
// src/components/menu_separator/menu_separator.tsx
|
|
2607
|
-
var
|
|
2654
|
+
var Ri = ({ unstyled: e = !1, className: t }) => /* @__PURE__ */ g("hr", {
|
|
2608
2655
|
"aria-orientation": "horizontal",
|
|
2609
2656
|
className: x("w-full", !e && ["my-1 border-0 border-t", "border-gray-200 dark:border-gray-700"], t)
|
|
2610
|
-
}),
|
|
2611
|
-
function
|
|
2657
|
+
}), zi = [];
|
|
2658
|
+
function Bi() {
|
|
2612
2659
|
let e = 0, t = [], n = null, r = /* @__PURE__ */ new Set(), i = () => {
|
|
2613
2660
|
for (let e of r) e(t);
|
|
2614
2661
|
};
|
|
@@ -2629,7 +2676,7 @@ function Li() {
|
|
|
2629
2676
|
r.delete(i), r.size || (e = 0, t = [], n = null);
|
|
2630
2677
|
}),
|
|
2631
2678
|
getSnapshot: () => t,
|
|
2632
|
-
getServerSnapshot: () =>
|
|
2679
|
+
getServerSnapshot: () => zi,
|
|
2633
2680
|
getListenersSize: () => r.size,
|
|
2634
2681
|
getUpsertPromise: () => n,
|
|
2635
2682
|
setUpsertPromise: (e) => {
|
|
@@ -2637,9 +2684,9 @@ function Li() {
|
|
|
2637
2684
|
}
|
|
2638
2685
|
};
|
|
2639
2686
|
}
|
|
2640
|
-
var
|
|
2641
|
-
function
|
|
2642
|
-
let n = { current:
|
|
2687
|
+
var Vi = /* @__PURE__ */ new Map();
|
|
2688
|
+
function Hi(e, t = 0) {
|
|
2689
|
+
let n = { current: Bi() }, r = (e) => (r) => {
|
|
2643
2690
|
let i = /* @__PURE__ */ new Set();
|
|
2644
2691
|
n.current.set(e, (e) => (e.resolve(r), i.add(e.promise), {
|
|
2645
2692
|
...e,
|
|
@@ -2725,56 +2772,57 @@ function zi(e, t = 0) {
|
|
|
2725
2772
|
set: (r) => {
|
|
2726
2773
|
if (t || (e = r, !r)) return;
|
|
2727
2774
|
t = !0;
|
|
2728
|
-
let i =
|
|
2729
|
-
i ? n.current = i :
|
|
2775
|
+
let i = Vi.get(r);
|
|
2776
|
+
i ? n.current = i : Vi.set(r, n.current);
|
|
2730
2777
|
}
|
|
2731
2778
|
});
|
|
2732
2779
|
}
|
|
2733
2780
|
return d;
|
|
2734
2781
|
}
|
|
2735
2782
|
// src/components/modal/confirm_modal_title.tsx
|
|
2736
|
-
var
|
|
2783
|
+
var Ui = {
|
|
2737
2784
|
danger: "i-mdi-alert-circle",
|
|
2738
2785
|
primary: "i-mdi-help-circle",
|
|
2739
2786
|
success: "i-mdi-check-circle"
|
|
2740
|
-
},
|
|
2787
|
+
}, Wi = {
|
|
2741
2788
|
danger: "bg-red-50 text-red-600 dark:bg-red-500/10 dark:text-red-400",
|
|
2742
2789
|
primary: "bg-blue-50 text-blue-600 dark:bg-blue-500/10 dark:text-blue-400",
|
|
2743
2790
|
success: "bg-green-50 text-green-600 dark:bg-green-500/10 dark:text-green-400"
|
|
2744
2791
|
};
|
|
2745
|
-
function
|
|
2792
|
+
function Gi({ title: e, color: t }) {
|
|
2746
2793
|
return /* @__PURE__ */ _("div", {
|
|
2747
2794
|
className: "flex items-center gap-3",
|
|
2748
2795
|
children: [/* @__PURE__ */ g("span", {
|
|
2749
|
-
className: x("flex h-9 w-9 shrink-0 items-center justify-center rounded-full",
|
|
2796
|
+
className: x("flex h-9 w-9 shrink-0 items-center justify-center rounded-full", Wi[t]),
|
|
2750
2797
|
"aria-hidden": "true",
|
|
2751
|
-
children: /* @__PURE__ */ g("span", { className: x(
|
|
2798
|
+
children: /* @__PURE__ */ g("span", { className: x(Ui[t], "h-5 w-5") })
|
|
2752
2799
|
}), e]
|
|
2753
2800
|
});
|
|
2754
2801
|
}
|
|
2755
2802
|
// src/components/modal/modal_shell.tsx
|
|
2756
|
-
var
|
|
2803
|
+
var Ki = {
|
|
2757
2804
|
sm: "max-w-md",
|
|
2758
2805
|
md: "max-w-lg",
|
|
2759
2806
|
lg: "max-w-2xl",
|
|
2760
2807
|
xl: "max-w-4xl"
|
|
2761
|
-
},
|
|
2808
|
+
}, qi = {
|
|
2762
2809
|
auto: "",
|
|
2763
2810
|
fixed: "h-[calc(100vh-4rem)] sm:h-[min(40rem,calc(100vh-10rem))]"
|
|
2764
|
-
},
|
|
2811
|
+
}, Ji = {
|
|
2765
2812
|
auto: "overflow-y-auto",
|
|
2766
2813
|
fixed: "overflow-hidden flex flex-col"
|
|
2767
2814
|
};
|
|
2768
|
-
function
|
|
2769
|
-
let h = l(), v = l(), { dialogRef: b, contentRef: S, footerSlot: C, setFooterSlot: w, isVisible: T, handleBackdropClick: E } =
|
|
2815
|
+
function Yi({ isEnded: e, onDismiss: t, title: n, children: r, footer: i, size: a = "md", height: o = "auto", radius: s = "xl", className: c, dismissible: u = !0, closeLabel: d, role: f = "dialog", initialFocusRef: p, "aria-label": m }) {
|
|
2816
|
+
let h = l(), v = l(), { dialogRef: b, contentRef: S, footerSlot: C, setFooterSlot: w, isVisible: T, handleBackdropClick: E, handleBackdropMouseDown: D } = ii({
|
|
2770
2817
|
isEnded: e,
|
|
2771
2818
|
onDismiss: t,
|
|
2772
2819
|
dismissible: u,
|
|
2773
2820
|
initialFocusRef: p
|
|
2774
|
-
}),
|
|
2821
|
+
}), O = f === "alertdialog" && !!r;
|
|
2775
2822
|
return y(/* @__PURE__ */ _("div", {
|
|
2776
2823
|
className: x("fixed inset-0 z-50 flex items-start justify-center", "p-2 sm:py-[3rem] lg:py-[5rem]", "transition-opacity duration-200 ease-out", T ? "opacity-100" : "opacity-0"),
|
|
2777
2824
|
onClick: E,
|
|
2825
|
+
onMouseDown: D,
|
|
2778
2826
|
children: [/* @__PURE__ */ g("div", {
|
|
2779
2827
|
className: x("fixed inset-0 bg-black/60 backdrop-blur-md", "transition-opacity duration-200 ease-out", T ? "opacity-100" : "opacity-0"),
|
|
2780
2828
|
"aria-hidden": "true"
|
|
@@ -2784,12 +2832,12 @@ function Ki({ isEnded: e, onDismiss: t, title: n, children: r, footer: i, size:
|
|
|
2784
2832
|
"aria-modal": "true",
|
|
2785
2833
|
"aria-labelledby": n ? h : void 0,
|
|
2786
2834
|
"aria-label": n ? void 0 : m,
|
|
2787
|
-
"aria-describedby":
|
|
2835
|
+
"aria-describedby": O ? v : void 0,
|
|
2788
2836
|
tabIndex: -1,
|
|
2789
|
-
className: x("relative w-full",
|
|
2837
|
+
className: x("relative w-full", Ki[a], qi[o], W, G, "shadow-2xl", j[s], "max-h-[calc(100vh-4rem)] sm:max-h-[calc(100vh-10rem)] overflow-hidden flex flex-col", "transition-all duration-200 ease-out", "focus:outline-none", T ? "opacity-100 scale-100 translate-y-0" : "opacity-0 scale-95 translate-y-1"),
|
|
2790
2838
|
onClick: (e) => e.stopPropagation(),
|
|
2791
2839
|
children: [
|
|
2792
|
-
n && /* @__PURE__ */ g(
|
|
2840
|
+
n && /* @__PURE__ */ g(Dr, {
|
|
2793
2841
|
titleId: h,
|
|
2794
2842
|
title: n,
|
|
2795
2843
|
onDismiss: t,
|
|
@@ -2798,14 +2846,14 @@ function Ki({ isEnded: e, onDismiss: t, title: n, children: r, footer: i, size:
|
|
|
2798
2846
|
}),
|
|
2799
2847
|
/* @__PURE__ */ g("div", {
|
|
2800
2848
|
ref: S,
|
|
2801
|
-
id:
|
|
2802
|
-
className: x("flex-1 px-6 pb-6 text-sm leading-relaxed text-gray-600 dark:text-gray-400 min-h-0",
|
|
2803
|
-
children: /* @__PURE__ */ g(
|
|
2849
|
+
id: O ? v : void 0,
|
|
2850
|
+
className: x("flex-1 px-6 pb-6 text-sm leading-relaxed text-gray-600 dark:text-gray-400 min-h-0", Ji[o], !n && "pt-6", c),
|
|
2851
|
+
children: /* @__PURE__ */ g(fr.Provider, {
|
|
2804
2852
|
value: C,
|
|
2805
2853
|
children: r
|
|
2806
2854
|
})
|
|
2807
2855
|
}),
|
|
2808
|
-
/* @__PURE__ */ g(
|
|
2856
|
+
/* @__PURE__ */ g(dr, {
|
|
2809
2857
|
onSlotChange: w,
|
|
2810
2858
|
children: i
|
|
2811
2859
|
})
|
|
@@ -2814,8 +2862,8 @@ function Ki({ isEnded: e, onDismiss: t, title: n, children: r, footer: i, size:
|
|
|
2814
2862
|
}), document.body);
|
|
2815
2863
|
}
|
|
2816
2864
|
// src/components/modal/confirm_modal.tsx
|
|
2817
|
-
var
|
|
2818
|
-
|
|
2865
|
+
var Xi = Hi(({ call: e, title: t, children: n, confirmLabel: r, cancelLabel: i, confirmColor: a, radius: o, closeLabel: s, onConfirm: c, onError: l }) => {
|
|
2866
|
+
pi();
|
|
2819
2867
|
let [u, d] = p(!1), m = f(null), v = () => e.end(!1), y = async () => {
|
|
2820
2868
|
if (!c) e.end(!0);
|
|
2821
2869
|
else {
|
|
@@ -2827,10 +2875,10 @@ var qi = zi(({ call: e, title: t, children: n, confirmLabel: r, cancelLabel: i,
|
|
|
2827
2875
|
}
|
|
2828
2876
|
}
|
|
2829
2877
|
}, b = Ae(), x = r ?? b.confirm, S = i ?? b.cancel, C = a ?? "primary";
|
|
2830
|
-
return /* @__PURE__ */ g(
|
|
2878
|
+
return /* @__PURE__ */ g(Yi, {
|
|
2831
2879
|
isEnded: e.ended,
|
|
2832
2880
|
onDismiss: v,
|
|
2833
|
-
title: /* @__PURE__ */ g(
|
|
2881
|
+
title: /* @__PURE__ */ g(Gi, {
|
|
2834
2882
|
title: t,
|
|
2835
2883
|
color: C
|
|
2836
2884
|
}),
|
|
@@ -2860,46 +2908,61 @@ var qi = zi(({ call: e, title: t, children: n, confirmLabel: r, cancelLabel: i,
|
|
|
2860
2908
|
});
|
|
2861
2909
|
}, 200);
|
|
2862
2910
|
// src/components/modal/modal.tsx
|
|
2863
|
-
function
|
|
2911
|
+
function Zi(e, t) {
|
|
2864
2912
|
return typeof e == "function" ? e(t) : e;
|
|
2865
2913
|
}
|
|
2866
|
-
var
|
|
2867
|
-
|
|
2868
|
-
let f
|
|
2869
|
-
|
|
2870
|
-
isEnded: e.ended
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2914
|
+
var Qi = Hi(({ call: e, title: t, children: n, size: r, height: i, radius: a, className: o, dismissible: s, closeLabel: c, role: l, initialFocusRef: u, "aria-label": d }) => {
|
|
2915
|
+
pi();
|
|
2916
|
+
let { dismiss: f, registry: p } = kr({
|
|
2917
|
+
onDismiss: () => e.end(),
|
|
2918
|
+
isEnded: e.ended
|
|
2919
|
+
});
|
|
2920
|
+
return /* @__PURE__ */ g(ur.Provider, {
|
|
2921
|
+
value: p,
|
|
2922
|
+
children: /* @__PURE__ */ g(Yi, {
|
|
2923
|
+
isEnded: e.ended,
|
|
2924
|
+
onDismiss: f,
|
|
2925
|
+
title: t,
|
|
2926
|
+
size: r,
|
|
2927
|
+
height: i,
|
|
2928
|
+
radius: a,
|
|
2929
|
+
className: o,
|
|
2930
|
+
dismissible: s,
|
|
2931
|
+
closeLabel: c,
|
|
2932
|
+
role: l,
|
|
2933
|
+
initialFocusRef: u,
|
|
2934
|
+
"aria-label": d,
|
|
2935
|
+
children: Zi(n, f)
|
|
2936
|
+
})
|
|
2883
2937
|
});
|
|
2884
2938
|
}, 200);
|
|
2885
2939
|
// src/components/modal/modal_footer.tsx
|
|
2886
|
-
function
|
|
2887
|
-
let t = s(
|
|
2940
|
+
function $i({ children: e }) {
|
|
2941
|
+
let t = s(fr);
|
|
2888
2942
|
return t ? y(e, t) : null;
|
|
2889
2943
|
}
|
|
2944
|
+
// src/components/modal/use_dismiss_guard.ts
|
|
2945
|
+
function ea(e, t = !0) {
|
|
2946
|
+
let n = s(ur), r = f(e);
|
|
2947
|
+
if (u(() => {
|
|
2948
|
+
r.current = e;
|
|
2949
|
+
}), c(() => {
|
|
2950
|
+
if (n && t) return n.register(r);
|
|
2951
|
+
}, [n, t]), !n) throw Error("useDismissGuard must be used inside a Modal or a Drawer");
|
|
2952
|
+
}
|
|
2890
2953
|
// src/components/modal_provider/modal_provider.tsx
|
|
2891
|
-
function
|
|
2892
|
-
return /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(
|
|
2954
|
+
function ta() {
|
|
2955
|
+
return /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(Qi, {}), /* @__PURE__ */ g(Xi, {})] });
|
|
2893
2956
|
}
|
|
2894
2957
|
// src/components/multi_combobox/multi_combobox.tsx
|
|
2895
|
-
var
|
|
2896
|
-
function
|
|
2958
|
+
var na = 2;
|
|
2959
|
+
function ra(e, t, n, r) {
|
|
2897
2960
|
return r?.(e, t) ? !0 : n === void 0 || t.includes(e) ? !1 : t.length >= n;
|
|
2898
2961
|
}
|
|
2899
|
-
function
|
|
2962
|
+
function ia(e, t) {
|
|
2900
2963
|
return e.includes(t) ? e.filter((e) => e !== t) : [...e, t];
|
|
2901
2964
|
}
|
|
2902
|
-
function
|
|
2965
|
+
function aa(e, t) {
|
|
2903
2966
|
if (e.length <= t) return {
|
|
2904
2967
|
visibleOptions: e,
|
|
2905
2968
|
hiddenCount: 0
|
|
@@ -2910,8 +2973,8 @@ function ta(e, t) {
|
|
|
2910
2973
|
hiddenCount: e.length - n
|
|
2911
2974
|
};
|
|
2912
2975
|
}
|
|
2913
|
-
var
|
|
2914
|
-
function
|
|
2976
|
+
var oa = "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";
|
|
2977
|
+
function sa({ options: e, label: t, "aria-label": n, error: r, placeholder: i, searchPlaceholder: a, noResultsText: s, clearLabel: l, clearText: u, maxSelectedValues: m, isOptionDisabled: v, maxDisplayedValues: y = na, formatOverflowCount: b, formatSelectedCount: S, formatMaxSelectedHint: C, radius: w = "sm", unstyled: T = !1, disabled: E = !1, required: D = !1, className: k, wrapperClassName: A, values: N, defaultValues: P = [], onChange: F, onDropdownClose: I, id: L }) {
|
|
2915
2978
|
let R = Ae(), { fieldId: z, errorId: ee, labelId: te } = J(L), B = `${z}-listbox`, V = `${z}-max-hint`, ne = f(null), H = f(null), re = f(null), [U, W] = Ce(N, P), [ie, ae] = p(""), [G, oe] = p(!1), K = d(() => {
|
|
2916
2979
|
let t = ie.trim().toLowerCase();
|
|
2917
2980
|
return t ? e.filter((e) => e.label.toLowerCase().includes(t)) : e;
|
|
@@ -2919,7 +2982,7 @@ function ra({ options: e, label: t, "aria-label": n, error: r, placeholder: i, s
|
|
|
2919
2982
|
optionCount: K.length,
|
|
2920
2983
|
getOptionId: (e) => `${B}-option-${e}`,
|
|
2921
2984
|
isOpen: G
|
|
2922
|
-
}), me = d(() => e.filter((e) => U.includes(e.value)), [e, U]), { visibleOptions: he, hiddenCount: ge } =
|
|
2985
|
+
}), me = d(() => e.filter((e) => U.includes(e.value)), [e, U]), { visibleOptions: he, hiddenCount: ge } = aa(me, y), _e = () => {
|
|
2923
2986
|
E || oe(!0);
|
|
2924
2987
|
}, ve = o(() => {
|
|
2925
2988
|
oe(!1), ae(""), pe(), I?.(U);
|
|
@@ -2930,8 +2993,8 @@ function ra({ options: e, label: t, "aria-label": n, error: r, placeholder: i, s
|
|
|
2930
2993
|
]), ye = () => {
|
|
2931
2994
|
G ? ve() : _e();
|
|
2932
2995
|
}, be = (e) => {
|
|
2933
|
-
if (
|
|
2934
|
-
let t =
|
|
2996
|
+
if (ra(e, U, m, v)) return;
|
|
2997
|
+
let t = ia(U, e);
|
|
2935
2998
|
W(t), F?.(t);
|
|
2936
2999
|
}, q = () => {
|
|
2937
3000
|
W([]), F?.([]);
|
|
@@ -3007,10 +3070,10 @@ function ra({ options: e, label: t, "aria-label": n, error: r, placeholder: i, s
|
|
|
3007
3070
|
className: x(!T && "text-gray-500 dark:text-gray-400"),
|
|
3008
3071
|
children: i
|
|
3009
3072
|
}) : /* @__PURE__ */ _(h, { children: [he.map((e) => /* @__PURE__ */ g("span", {
|
|
3010
|
-
className: x(!T &&
|
|
3073
|
+
className: x(!T && oa),
|
|
3011
3074
|
children: e.label
|
|
3012
3075
|
}, e.value)), ge > 0 && /* @__PURE__ */ g("span", {
|
|
3013
|
-
className: x(!T &&
|
|
3076
|
+
className: x(!T && oa),
|
|
3014
3077
|
children: (b ?? R.overflowCount)(ge)
|
|
3015
3078
|
})] })
|
|
3016
3079
|
}),
|
|
@@ -3066,7 +3129,7 @@ function ra({ options: e, label: t, "aria-label": n, error: r, placeholder: i, s
|
|
|
3066
3129
|
"aria-multiselectable": !0,
|
|
3067
3130
|
className: x("max-h-60 overflow-auto py-1", "[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]"),
|
|
3068
3131
|
children: K.map((e, t) => {
|
|
3069
|
-
let n = U.includes(e.value), r =
|
|
3132
|
+
let n = U.includes(e.value), r = ra(e.value, U, m, v);
|
|
3070
3133
|
return /* @__PURE__ */ _("li", {
|
|
3071
3134
|
id: `${B}-option-${t}`,
|
|
3072
3135
|
role: "option",
|
|
@@ -3120,7 +3183,7 @@ function ra({ options: e, label: t, "aria-label": n, error: r, placeholder: i, s
|
|
|
3120
3183
|
});
|
|
3121
3184
|
}
|
|
3122
3185
|
// src/components/radio_options/radio_option_row.tsx
|
|
3123
|
-
function
|
|
3186
|
+
function ca({ option: e, optionId: t, descriptionId: n, name: r, orientation: i, isSelected: a, isDisabled: o, isFirstOption: s, required: c, error: l, radius: u, unstyled: d, className: f, onSelect: p }) {
|
|
3124
3187
|
let m = !!l;
|
|
3125
3188
|
return /* @__PURE__ */ g(De, {
|
|
3126
3189
|
item: e,
|
|
@@ -3156,7 +3219,7 @@ function ia({ option: e, optionId: t, descriptionId: n, name: r, orientation: i,
|
|
|
3156
3219
|
});
|
|
3157
3220
|
}
|
|
3158
3221
|
// src/components/radio_options/radio_options.tsx
|
|
3159
|
-
function
|
|
3222
|
+
function la({ options: e, orientation: t = "vertical", value: n, defaultValue: r, onChange: i, name: a, label: o, error: s, required: c, disabled: l, radius: u = "lg", unstyled: d = !1, className: f, wrapperClassName: p, id: m, "aria-describedby": h, ...v }) {
|
|
3160
3223
|
let { fieldId: y, errorId: b } = J(m), S = a ?? y, [C, w] = Ce(n, r ?? ""), T = e.map((e) => typeof e == "string" ? {
|
|
3161
3224
|
value: e,
|
|
3162
3225
|
label: e
|
|
@@ -3180,7 +3243,7 @@ function aa({ options: e, orientation: t = "vertical", value: n, defaultValue: r
|
|
|
3180
3243
|
}),
|
|
3181
3244
|
/* @__PURE__ */ g("div", {
|
|
3182
3245
|
className: x(t === "horizontal" ? "flex flex-row gap-2" : "flex flex-col gap-2"),
|
|
3183
|
-
children: T.map((e, n) => /* @__PURE__ */ g(
|
|
3246
|
+
children: T.map((e, n) => /* @__PURE__ */ g(ca, {
|
|
3184
3247
|
option: e,
|
|
3185
3248
|
optionId: `${y}-${n}`,
|
|
3186
3249
|
descriptionId: `${y}-${n}-desc`,
|
|
@@ -3206,7 +3269,7 @@ function aa({ options: e, orientation: t = "vertical", value: n, defaultValue: r
|
|
|
3206
3269
|
});
|
|
3207
3270
|
}
|
|
3208
3271
|
// src/components/select/select.tsx
|
|
3209
|
-
function
|
|
3272
|
+
function ua({ options: e, label: t, description: n, error: r, placeholder: i, radius: a = "md", unstyled: o = !1, className: s, wrapperClassName: c, value: l, defaultValue: u, onChange: d, id: f, "aria-describedby": p, ...m }) {
|
|
3210
3273
|
let { fieldId: h, errorId: v, descriptionId: y } = J(f);
|
|
3211
3274
|
return /* @__PURE__ */ g(Fe, {
|
|
3212
3275
|
fieldId: h,
|
|
@@ -3241,7 +3304,7 @@ function oa({ options: e, label: t, description: n, error: r, placeholder: i, ra
|
|
|
3241
3304
|
});
|
|
3242
3305
|
}
|
|
3243
3306
|
// src/components/switch/switch.tsx
|
|
3244
|
-
function
|
|
3307
|
+
function da({ label: e, description: t, error: n, unstyled: r = !1, fullWidth: i = !1, className: a, wrapperClassName: o, checked: s, defaultChecked: c = !1, onChange: l, id: u, "aria-describedby": d, ...f }) {
|
|
3245
3308
|
let { fieldId: p, errorId: m, descriptionId: v } = J(u), [y, b] = Ce(s, c), S = q(d, !!t && v, n && m);
|
|
3246
3309
|
return /* @__PURE__ */ _("div", {
|
|
3247
3310
|
className: x(i ? "w-full" : "w-fit", o),
|
|
@@ -3296,11 +3359,11 @@ function sa({ label: e, description: t, error: n, unstyled: r = !1, fullWidth: i
|
|
|
3296
3359
|
});
|
|
3297
3360
|
}
|
|
3298
3361
|
// src/components/tabs/tabs_styles.ts
|
|
3299
|
-
var
|
|
3362
|
+
var fa = {
|
|
3300
3363
|
list: "gap-1 p-1 bg-gray-100 dark:bg-gray-800/50",
|
|
3301
3364
|
tab: "",
|
|
3302
3365
|
indicator: `absolute inset-0 ${H} border border-gray-200 dark:border-gray-700`
|
|
3303
|
-
},
|
|
3366
|
+
}, pa = {
|
|
3304
3367
|
line: {
|
|
3305
3368
|
activeTab: "border-transparent text-gray-900 dark:text-gray-100",
|
|
3306
3369
|
idleTab: "border-transparent text-gray-500 dark:text-gray-400",
|
|
@@ -3323,52 +3386,52 @@ var ca = {
|
|
|
3323
3386
|
idleTab: "text-gray-600 dark:text-gray-400",
|
|
3324
3387
|
idleHover: "hover:text-gray-900 dark:hover:text-gray-100",
|
|
3325
3388
|
byOrientation: {
|
|
3326
|
-
horizontal:
|
|
3327
|
-
vertical:
|
|
3389
|
+
horizontal: fa,
|
|
3390
|
+
vertical: fa
|
|
3328
3391
|
}
|
|
3329
3392
|
}
|
|
3330
|
-
},
|
|
3393
|
+
}, ma = {
|
|
3331
3394
|
xs: "px-2 py-1 text-xs",
|
|
3332
3395
|
sm: "px-3 py-1.5 text-sm",
|
|
3333
3396
|
md: "px-4 py-2.5 text-sm",
|
|
3334
3397
|
lg: "px-5 py-3 text-base"
|
|
3335
|
-
},
|
|
3398
|
+
}, ha = {
|
|
3336
3399
|
xs: "w-3.5 h-3.5",
|
|
3337
3400
|
sm: "w-4 h-4",
|
|
3338
3401
|
md: "w-4 h-4",
|
|
3339
3402
|
lg: "w-5 h-5"
|
|
3340
|
-
},
|
|
3403
|
+
}, ga = {
|
|
3341
3404
|
horizontal: x(S, O.primary.focusOutline),
|
|
3342
3405
|
vertical: x("outline-hidden focus-visible:outline-2", "focus-visible:-outline-offset-2", O.primary.focusOutline)
|
|
3343
|
-
},
|
|
3344
|
-
function
|
|
3345
|
-
return x("w-full", e === "vertical" &&
|
|
3406
|
+
}, _a = "items-center", va = x("flex-col items-stretch min-h-0 overflow-y-auto overflow-x-hidden", ae), ya = "w-48 shrink-0", ba = "justify-start text-left whitespace-normal", xa = "whitespace-nowrap", Sa = "flex min-h-0", Ca = x("flex-1 min-w-0 min-h-0 overflow-y-auto", ae), wa = "ml-6", Ta = "mt-4";
|
|
3407
|
+
function Ea(e, t) {
|
|
3408
|
+
return x("w-full", e === "vertical" && Sa, t);
|
|
3346
3409
|
}
|
|
3347
|
-
function
|
|
3410
|
+
function Da(e) {
|
|
3348
3411
|
let { orientation: t, unstyled: n, className: r } = e, i = t === "vertical";
|
|
3349
|
-
return x(i &&
|
|
3412
|
+
return x(i && Ca, !n && [i ? wa : Ta, ga[t]], r);
|
|
3350
3413
|
}
|
|
3351
|
-
function
|
|
3414
|
+
function Oa(e) {
|
|
3352
3415
|
let { variant: t, orientation: n, radius: r, unstyled: i, isFullWidth: a, className: o } = e, s = n === "vertical";
|
|
3353
|
-
return x("flex", s ?
|
|
3416
|
+
return x("flex", s ? va : _a, !s && a && "w-full", !i && s && ya, !i && pa[t].byOrientation[n].list, !i && t === "segmented" && j[r], o);
|
|
3354
3417
|
}
|
|
3355
|
-
function
|
|
3356
|
-
let { variant: t, orientation: n, size: r, radius: i, unstyled: a, isActive: o, isDisabled: s, isFullWidth: c, className: l } = e, u = n === "vertical", d =
|
|
3357
|
-
return x("relative flex items-center gap-2", u ?
|
|
3418
|
+
function ka(e) {
|
|
3419
|
+
let { variant: t, orientation: n, size: r, radius: i, unstyled: a, isActive: o, isDisabled: s, isFullWidth: c, className: l } = e, u = n === "vertical", d = pa[t];
|
|
3420
|
+
return x("relative flex items-center gap-2", u ? ba : xa, !u && c && "flex-1 justify-center", s ? "opacity-50 cursor-not-allowed" : "cursor-pointer", !a && [
|
|
3358
3421
|
"font-medium transition-colors duration-200",
|
|
3359
|
-
|
|
3422
|
+
ma[r],
|
|
3360
3423
|
d.byOrientation[n].tab,
|
|
3361
3424
|
o ? d.activeTab : [d.idleTab, !s && d.idleHover],
|
|
3362
3425
|
t === "segmented" && j[i],
|
|
3363
|
-
|
|
3426
|
+
ga[n]
|
|
3364
3427
|
], l);
|
|
3365
3428
|
}
|
|
3366
|
-
function
|
|
3429
|
+
function Aa(e) {
|
|
3367
3430
|
let { variant: t, orientation: n, radius: r } = e;
|
|
3368
|
-
return x("tabs-indicator pointer-events-none",
|
|
3431
|
+
return x("tabs-indicator pointer-events-none", pa[t].byOrientation[n].indicator, t === "segmented" && j[r]);
|
|
3369
3432
|
}
|
|
3370
3433
|
// src/components/tabs/tab_button.tsx
|
|
3371
|
-
function
|
|
3434
|
+
function ja({ item: e, isActive: t, hasMountedPanel: n, isTabStop: r, isFullWidth: i, variant: a, orientation: o, size: s, radius: c, unstyled: l, tabId: u, panelId: d, onSelect: f, onKeyDown: p, ref: m, indicatorRef: v }) {
|
|
3372
3435
|
let y = !!e.disabled;
|
|
3373
3436
|
return /* @__PURE__ */ _("button", {
|
|
3374
3437
|
ref: m,
|
|
@@ -3382,7 +3445,7 @@ function Da({ item: e, isActive: t, hasMountedPanel: n, isTabStop: r, isFullWidt
|
|
|
3382
3445
|
disabled: e.disabled,
|
|
3383
3446
|
onClick: f,
|
|
3384
3447
|
onKeyDown: p,
|
|
3385
|
-
className:
|
|
3448
|
+
className: ka({
|
|
3386
3449
|
variant: a,
|
|
3387
3450
|
orientation: o,
|
|
3388
3451
|
size: s,
|
|
@@ -3396,7 +3459,7 @@ function Da({ item: e, isActive: t, hasMountedPanel: n, isTabStop: r, isFullWidt
|
|
|
3396
3459
|
t && !l && /* @__PURE__ */ g("span", {
|
|
3397
3460
|
ref: v,
|
|
3398
3461
|
"aria-hidden": "true",
|
|
3399
|
-
className:
|
|
3462
|
+
className: Aa({
|
|
3400
3463
|
variant: a,
|
|
3401
3464
|
orientation: o,
|
|
3402
3465
|
radius: c
|
|
@@ -3404,7 +3467,7 @@ function Da({ item: e, isActive: t, hasMountedPanel: n, isTabStop: r, isFullWidt
|
|
|
3404
3467
|
}),
|
|
3405
3468
|
e.icon && /* @__PURE__ */ g("span", {
|
|
3406
3469
|
"aria-hidden": "true",
|
|
3407
|
-
className: x("relative shrink-0",
|
|
3470
|
+
className: x("relative shrink-0", ha[s], e.icon)
|
|
3408
3471
|
}),
|
|
3409
3472
|
/* @__PURE__ */ g("span", {
|
|
3410
3473
|
className: "relative",
|
|
@@ -3415,7 +3478,7 @@ function Da({ item: e, isActive: t, hasMountedPanel: n, isTabStop: r, isFullWidt
|
|
|
3415
3478
|
});
|
|
3416
3479
|
}
|
|
3417
3480
|
// src/components/tabs/tab_panel.tsx
|
|
3418
|
-
function
|
|
3481
|
+
function Ma({ panelId: e, tabId: t, isHidden: n, isAnimated: r, className: i, contentKey: a, children: o }) {
|
|
3419
3482
|
return /* @__PURE__ */ g("div", {
|
|
3420
3483
|
role: "tabpanel",
|
|
3421
3484
|
id: e,
|
|
@@ -3430,11 +3493,11 @@ function Oa({ panelId: e, tabId: t, isHidden: n, isAnimated: r, className: i, co
|
|
|
3430
3493
|
});
|
|
3431
3494
|
}
|
|
3432
3495
|
// src/components/tabs/use_tab_indicator_transition.ts
|
|
3433
|
-
var
|
|
3434
|
-
function
|
|
3435
|
-
return typeof window > "u" || typeof window.matchMedia != "function" ? !1 : window.matchMedia(
|
|
3496
|
+
var Na = 200, Pa = "ease-out", Fa = "(prefers-reduced-motion: reduce)";
|
|
3497
|
+
function Ia() {
|
|
3498
|
+
return typeof window > "u" || typeof window.matchMedia != "function" ? !1 : window.matchMedia(Fa).matches;
|
|
3436
3499
|
}
|
|
3437
|
-
function
|
|
3500
|
+
function La(e, t, n) {
|
|
3438
3501
|
return e === "vertical" ? [{
|
|
3439
3502
|
transform: `translateY(${t.top - n.top}px)`,
|
|
3440
3503
|
height: `${t.height}px`
|
|
@@ -3449,16 +3512,16 @@ function Na(e, t, n) {
|
|
|
3449
3512
|
width: `${n.width}px`
|
|
3450
3513
|
}];
|
|
3451
3514
|
}
|
|
3452
|
-
function
|
|
3453
|
-
e.animate(
|
|
3454
|
-
duration:
|
|
3455
|
-
easing:
|
|
3515
|
+
function Ra(e, t, n, r) {
|
|
3516
|
+
e.animate(La(t, n, r), {
|
|
3517
|
+
duration: Na,
|
|
3518
|
+
easing: Pa
|
|
3456
3519
|
});
|
|
3457
3520
|
}
|
|
3458
|
-
function
|
|
3459
|
-
return !e || !t || !n ? !1 : !
|
|
3521
|
+
function za(e, t, n) {
|
|
3522
|
+
return !e || !t || !n ? !1 : !Ia();
|
|
3460
3523
|
}
|
|
3461
|
-
function
|
|
3524
|
+
function Ba(e) {
|
|
3462
3525
|
let { activeIndex: t, indicatorRef: n, isAnimated: r, orientation: i } = e, a = f(null);
|
|
3463
3526
|
u(() => {
|
|
3464
3527
|
let e = n.current;
|
|
@@ -3467,7 +3530,7 @@ function Ia(e) {
|
|
|
3467
3530
|
return;
|
|
3468
3531
|
}
|
|
3469
3532
|
let t = e.getBoundingClientRect(), o = typeof e.animate == "function";
|
|
3470
|
-
|
|
3533
|
+
za(a.current, r, o) && Ra(e, i, a.current, t), a.current = t;
|
|
3471
3534
|
}, [
|
|
3472
3535
|
t,
|
|
3473
3536
|
n,
|
|
@@ -3476,34 +3539,34 @@ function Ia(e) {
|
|
|
3476
3539
|
]);
|
|
3477
3540
|
}
|
|
3478
3541
|
// src/components/tabs/use_tabs_keyboard_navigation.ts
|
|
3479
|
-
var
|
|
3542
|
+
var Va = {
|
|
3480
3543
|
Home: () => 0,
|
|
3481
3544
|
End: (e, t) => t - 1
|
|
3482
|
-
},
|
|
3545
|
+
}, Ha = (e, t) => (e + 1) % t, Ua = (e, t) => (e - 1 + t) % t, Wa = {
|
|
3483
3546
|
horizontal: {
|
|
3484
|
-
...
|
|
3485
|
-
ArrowRight:
|
|
3486
|
-
ArrowLeft:
|
|
3547
|
+
...Va,
|
|
3548
|
+
ArrowRight: Ha,
|
|
3549
|
+
ArrowLeft: Ua
|
|
3487
3550
|
},
|
|
3488
3551
|
vertical: {
|
|
3489
|
-
...
|
|
3490
|
-
ArrowDown:
|
|
3491
|
-
ArrowUp:
|
|
3552
|
+
...Va,
|
|
3553
|
+
ArrowDown: Ha,
|
|
3554
|
+
ArrowUp: Ua
|
|
3492
3555
|
}
|
|
3493
3556
|
};
|
|
3494
|
-
function
|
|
3557
|
+
function Ga(e) {
|
|
3495
3558
|
return e.flatMap((e, t) => e.disabled ? [] : [t]);
|
|
3496
3559
|
}
|
|
3497
|
-
function
|
|
3560
|
+
function Ka(e, t) {
|
|
3498
3561
|
let n = e[t];
|
|
3499
|
-
return n && !n.disabled ? t :
|
|
3562
|
+
return n && !n.disabled ? t : Ga(e)[0] ?? -1;
|
|
3500
3563
|
}
|
|
3501
|
-
function
|
|
3564
|
+
function qa(e) {
|
|
3502
3565
|
let { items: t, activeIndex: n, orientation: r, onNavigate: i } = e;
|
|
3503
3566
|
return (e) => {
|
|
3504
|
-
let a =
|
|
3567
|
+
let a = Wa[r][e.key];
|
|
3505
3568
|
if (!a) return;
|
|
3506
|
-
let o =
|
|
3569
|
+
let o = Ga(t);
|
|
3507
3570
|
if (o.length === 0) return;
|
|
3508
3571
|
e.preventDefault();
|
|
3509
3572
|
let s = a(o.indexOf(n), o.length);
|
|
@@ -3511,32 +3574,32 @@ function Ua(e) {
|
|
|
3511
3574
|
};
|
|
3512
3575
|
}
|
|
3513
3576
|
// src/components/tabs/tabs.tsx
|
|
3514
|
-
function
|
|
3577
|
+
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: u = !0, keepMounted: d = !1, className: p, tabListClassName: m, panelClassName: h, onChange: v }) {
|
|
3515
3578
|
let [y, b] = Ce(t, n), x = l(), S = f([]), C = f(null), w = (t) => {
|
|
3516
3579
|
e[t]?.disabled || (b(t), v?.(t));
|
|
3517
3580
|
}, T = (e) => {
|
|
3518
3581
|
S.current[e]?.focus(), w(e);
|
|
3519
|
-
}, E =
|
|
3582
|
+
}, E = Ka(e, y), D = qa({
|
|
3520
3583
|
items: e,
|
|
3521
3584
|
activeIndex: E,
|
|
3522
3585
|
orientation: i,
|
|
3523
3586
|
onNavigate: T
|
|
3524
|
-
}), O =
|
|
3587
|
+
}), O = Da({
|
|
3525
3588
|
orientation: i,
|
|
3526
3589
|
unstyled: c,
|
|
3527
3590
|
className: h
|
|
3528
3591
|
}), k = u && !c;
|
|
3529
|
-
return
|
|
3592
|
+
return Ba({
|
|
3530
3593
|
activeIndex: y,
|
|
3531
3594
|
indicatorRef: C,
|
|
3532
3595
|
isAnimated: u,
|
|
3533
3596
|
orientation: i
|
|
3534
3597
|
}), /* @__PURE__ */ _("div", {
|
|
3535
|
-
className:
|
|
3598
|
+
className: Ea(i, p),
|
|
3536
3599
|
children: [/* @__PURE__ */ g("div", {
|
|
3537
3600
|
role: "tablist",
|
|
3538
3601
|
"aria-orientation": i,
|
|
3539
|
-
className:
|
|
3602
|
+
className: Oa({
|
|
3540
3603
|
variant: r,
|
|
3541
3604
|
orientation: i,
|
|
3542
3605
|
radius: o,
|
|
@@ -3544,7 +3607,7 @@ function Wa({ items: e, value: t, defaultIndex: n = 0, variant: r = "line", orie
|
|
|
3544
3607
|
isFullWidth: s,
|
|
3545
3608
|
className: m
|
|
3546
3609
|
}),
|
|
3547
|
-
children: e.map((e, t) => /* @__PURE__ */ g(
|
|
3610
|
+
children: e.map((e, t) => /* @__PURE__ */ g(ja, {
|
|
3548
3611
|
ref: (e) => {
|
|
3549
3612
|
S.current[t] = e;
|
|
3550
3613
|
},
|
|
@@ -3564,14 +3627,14 @@ function Wa({ items: e, value: t, defaultIndex: n = 0, variant: r = "line", orie
|
|
|
3564
3627
|
onSelect: () => w(t),
|
|
3565
3628
|
onKeyDown: D
|
|
3566
3629
|
}, e.title))
|
|
3567
|
-
}), d ? e.map((e, t) => /* @__PURE__ */ g(
|
|
3630
|
+
}), d ? e.map((e, t) => /* @__PURE__ */ g(Ma, {
|
|
3568
3631
|
panelId: `${x}-panel-${t}`,
|
|
3569
3632
|
tabId: `${x}-tab-${t}`,
|
|
3570
3633
|
isHidden: t !== y,
|
|
3571
3634
|
isAnimated: k,
|
|
3572
3635
|
className: O,
|
|
3573
3636
|
children: e.content
|
|
3574
|
-
}, e.title)) : /* @__PURE__ */ g(
|
|
3637
|
+
}, e.title)) : /* @__PURE__ */ g(Ma, {
|
|
3575
3638
|
panelId: `${x}-panel-${y}`,
|
|
3576
3639
|
tabId: `${x}-tab-${y}`,
|
|
3577
3640
|
isHidden: !1,
|
|
@@ -3583,8 +3646,8 @@ function Wa({ items: e, value: t, defaultIndex: n = 0, variant: r = "line", orie
|
|
|
3583
3646
|
});
|
|
3584
3647
|
}
|
|
3585
3648
|
// src/components/textarea/textarea.tsx
|
|
3586
|
-
function
|
|
3587
|
-
let { fieldId: v, errorId: y, descriptionId: b, characterCountId: S } = J(p), { length: C, trackLength: w } =
|
|
3649
|
+
function Ya({ label: e, description: t, error: n, showCharCount: r = !1, minLength: i, maxLength: a, radius: o = "md", unstyled: s = !1, className: c, wrapperClassName: l, value: u, defaultValue: d, onChange: f, id: p, "aria-describedby": m, ...h }) {
|
|
3650
|
+
let { fieldId: v, errorId: y, descriptionId: b, characterCountId: S } = J(p), { length: C, trackLength: w } = yi(u, d), T = r && (i !== void 0 || a !== void 0), E = (e) => {
|
|
3588
3651
|
w(e.target.value), f?.(e);
|
|
3589
3652
|
};
|
|
3590
3653
|
return /* @__PURE__ */ _(Fe, {
|
|
@@ -3621,7 +3684,7 @@ function Ga({ label: e, description: t, error: n, showCharCount: r = !1, minLeng
|
|
|
3621
3684
|
});
|
|
3622
3685
|
}
|
|
3623
3686
|
// src/lib/is_webkit_gtk.ts
|
|
3624
|
-
var
|
|
3687
|
+
var Xa = "AppleWebKit", Za = ["Linux", "X11"], Qa = [
|
|
3625
3688
|
"Chrome",
|
|
3626
3689
|
"Chromium",
|
|
3627
3690
|
"Edg",
|
|
@@ -3629,12 +3692,12 @@ var Ka = "AppleWebKit", qa = ["Linux", "X11"], Ja = [
|
|
|
3629
3692
|
"CriOS",
|
|
3630
3693
|
"FxiOS"
|
|
3631
3694
|
];
|
|
3632
|
-
function
|
|
3633
|
-
return !e.includes(
|
|
3695
|
+
function $a(e) {
|
|
3696
|
+
return !e.includes(Xa) || !Za.some((t) => e.includes(t)) ? !1 : !Qa.some((t) => e.includes(t));
|
|
3634
3697
|
}
|
|
3635
3698
|
// src/lib/theme_transition.ts
|
|
3636
|
-
var
|
|
3637
|
-
async function
|
|
3699
|
+
var eo = 750, to = "ease-in-out";
|
|
3700
|
+
async function no({ theme: e, element: t, transitionDuration: n = eo, transitionEasing: r = to, applyThemeCallback: i }) {
|
|
3638
3701
|
if (!document.startViewTransition || globalThis.matchMedia("(prefers-reduced-motion: reduce)").matches) {
|
|
3639
3702
|
i(e);
|
|
3640
3703
|
return;
|
|
@@ -3648,51 +3711,51 @@ async function Qa({ theme: e, element: t, transitionDuration: n = Xa, transition
|
|
|
3648
3711
|
pseudoElement: "::view-transition-new(root)"
|
|
3649
3712
|
});
|
|
3650
3713
|
}
|
|
3651
|
-
function
|
|
3714
|
+
function ro(e) {
|
|
3652
3715
|
return e === "light" ? "dark" : e === "dark" ? "system" : "light";
|
|
3653
3716
|
}
|
|
3654
3717
|
// src/stores/theme_store/theme_store.ts
|
|
3655
|
-
var
|
|
3656
|
-
function
|
|
3718
|
+
var io = "theme";
|
|
3719
|
+
function ao(e) {
|
|
3657
3720
|
return e === "light" || e === "dark" || e === "system";
|
|
3658
3721
|
}
|
|
3659
|
-
function
|
|
3722
|
+
function oo() {
|
|
3660
3723
|
return globalThis.window !== void 0 && globalThis.document !== void 0;
|
|
3661
3724
|
}
|
|
3662
|
-
function
|
|
3725
|
+
function so(e) {
|
|
3663
3726
|
let t = window.matchMedia("(prefers-color-scheme: dark)").matches, n = e === "dark" || e === "system" && t;
|
|
3664
3727
|
document.documentElement.classList.toggle("dark", n);
|
|
3665
3728
|
}
|
|
3666
|
-
function
|
|
3667
|
-
if (!
|
|
3668
|
-
let e = globalThis.localStorage.getItem(
|
|
3669
|
-
return
|
|
3729
|
+
function co() {
|
|
3730
|
+
if (!oo()) return "system";
|
|
3731
|
+
let e = globalThis.localStorage.getItem(io);
|
|
3732
|
+
return ao(e) ? e : "system";
|
|
3670
3733
|
}
|
|
3671
|
-
var
|
|
3672
|
-
|
|
3673
|
-
var
|
|
3674
|
-
theme:
|
|
3734
|
+
var lo = co();
|
|
3735
|
+
oo() && so(lo);
|
|
3736
|
+
var uo = ui((e) => ({
|
|
3737
|
+
theme: lo,
|
|
3675
3738
|
setTheme: (t) => {
|
|
3676
|
-
|
|
3739
|
+
so(t), oo() && globalThis.localStorage.setItem(io, t), e({ theme: t });
|
|
3677
3740
|
}
|
|
3678
3741
|
}));
|
|
3679
|
-
|
|
3680
|
-
if (e.key !==
|
|
3681
|
-
let t =
|
|
3682
|
-
|
|
3742
|
+
oo() && (globalThis.addEventListener("storage", (e) => {
|
|
3743
|
+
if (e.key !== io) return;
|
|
3744
|
+
let t = ao(e.newValue) ? e.newValue : "system";
|
|
3745
|
+
so(t), uo.setState({ theme: t });
|
|
3683
3746
|
}), globalThis.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", () => {
|
|
3684
|
-
|
|
3747
|
+
uo.getState().theme === "system" && so("system");
|
|
3685
3748
|
}));
|
|
3686
3749
|
// src/components/theme_toggle/theme_toggle.tsx
|
|
3687
|
-
var
|
|
3750
|
+
var fo = {
|
|
3688
3751
|
light: "i-tabler-sun text-yellow-500",
|
|
3689
3752
|
dark: "i-tabler-moon-stars text-gray-700 dark:text-yellow-500",
|
|
3690
3753
|
system: "i-tabler-device-desktop text-blue-500"
|
|
3691
|
-
},
|
|
3692
|
-
function
|
|
3693
|
-
let l =
|
|
3694
|
-
let r =
|
|
3695
|
-
i && a ? await
|
|
3754
|
+
}, po = "i-tabler-device-desktop text-gray-400";
|
|
3755
|
+
function mo({ isTransitionEnabled: e, transitionDuration: t, transitionEasing: n, size: r = "md", radius: i, variant: a, getAriaLabel: s, tooltip: c }) {
|
|
3756
|
+
let l = uo((e) => e.theme), u = uo((e) => e.setTheme), d = Ae(), p = Ne(), m = f(null), h = o(async () => {
|
|
3757
|
+
let r = ro(l), i = m.current, a = e ?? !$a(navigator.userAgent);
|
|
3758
|
+
i && a ? await no({
|
|
3696
3759
|
theme: r,
|
|
3697
3760
|
element: i,
|
|
3698
3761
|
transitionDuration: t,
|
|
@@ -3705,8 +3768,8 @@ function lo({ isTransitionEnabled: e, transitionDuration: t, transitionEasing: n
|
|
|
3705
3768
|
t,
|
|
3706
3769
|
n,
|
|
3707
3770
|
u
|
|
3708
|
-
]), _ = p ?
|
|
3709
|
-
return /* @__PURE__ */ g(
|
|
3771
|
+
]), _ = p ? fo[l] : po;
|
|
3772
|
+
return /* @__PURE__ */ g(Er, {
|
|
3710
3773
|
ref: m,
|
|
3711
3774
|
icon: _,
|
|
3712
3775
|
"aria-label": (s ?? d.currentTheme)(l),
|
|
@@ -3720,7 +3783,7 @@ function lo({ isTransitionEnabled: e, transitionDuration: t, transitionEasing: n
|
|
|
3720
3783
|
});
|
|
3721
3784
|
}
|
|
3722
3785
|
// src/components/toolbar/toolbar_items.ts
|
|
3723
|
-
var
|
|
3786
|
+
var ho = "a[href], button, input:not([type=\"hidden\"]), select, textarea, summary, [contenteditable]:not([contenteditable=\"false\"]), [tabindex]", go = [
|
|
3724
3787
|
"textarea",
|
|
3725
3788
|
"[contenteditable]:not([contenteditable=\"false\"])",
|
|
3726
3789
|
`input:not(${[
|
|
@@ -3735,45 +3798,45 @@ var uo = "a[href], button, input:not([type=\"hidden\"]), select, textarea, summa
|
|
|
3735
3798
|
"submit"
|
|
3736
3799
|
].map((e) => `[type="${e}"]`).join(", ")})`
|
|
3737
3800
|
].join(", ");
|
|
3738
|
-
function
|
|
3801
|
+
function _o(e) {
|
|
3739
3802
|
return e.matches(":disabled, [aria-disabled=\"true\"]");
|
|
3740
3803
|
}
|
|
3741
|
-
function
|
|
3742
|
-
return Array.from(e.querySelectorAll(
|
|
3804
|
+
function vo(e) {
|
|
3805
|
+
return Array.from(e.querySelectorAll(ho));
|
|
3743
3806
|
}
|
|
3744
|
-
function
|
|
3745
|
-
return
|
|
3807
|
+
function yo(e) {
|
|
3808
|
+
return vo(e).filter((e) => !_o(e));
|
|
3746
3809
|
}
|
|
3747
|
-
function
|
|
3748
|
-
return e instanceof HTMLElement && e.matches(
|
|
3810
|
+
function bo(e) {
|
|
3811
|
+
return e instanceof HTMLElement && e.matches(go);
|
|
3749
3812
|
}
|
|
3750
3813
|
// src/components/toolbar/toolbar_navigation.ts
|
|
3751
|
-
var
|
|
3814
|
+
var xo = (e, t) => (e + 1) % t, So = (e, t) => (e - 1 + t) % t, Co = () => 0, wo = (e, t) => t - 1, To = {
|
|
3752
3815
|
horizontal: {
|
|
3753
|
-
ArrowRight:
|
|
3754
|
-
ArrowLeft:
|
|
3755
|
-
Home:
|
|
3756
|
-
End:
|
|
3816
|
+
ArrowRight: xo,
|
|
3817
|
+
ArrowLeft: So,
|
|
3818
|
+
Home: Co,
|
|
3819
|
+
End: wo
|
|
3757
3820
|
},
|
|
3758
3821
|
vertical: {
|
|
3759
|
-
ArrowDown:
|
|
3760
|
-
ArrowUp:
|
|
3761
|
-
Home:
|
|
3762
|
-
End:
|
|
3822
|
+
ArrowDown: xo,
|
|
3823
|
+
ArrowUp: So,
|
|
3824
|
+
Home: Co,
|
|
3825
|
+
End: wo
|
|
3763
3826
|
}
|
|
3764
3827
|
};
|
|
3765
|
-
function
|
|
3766
|
-
let { key: t, orientation: n, currentPosition: r, itemCount: i } = e, a =
|
|
3828
|
+
function Eo(e) {
|
|
3829
|
+
let { key: t, orientation: n, currentPosition: r, itemCount: i } = e, a = To[n][t];
|
|
3767
3830
|
if (a && i !== 0) return a(r, i);
|
|
3768
3831
|
}
|
|
3769
3832
|
// src/components/toolbar/use_toolbar_roving_focus.ts
|
|
3770
|
-
var
|
|
3771
|
-
function
|
|
3833
|
+
var Do = ["disabled", "aria-disabled"];
|
|
3834
|
+
function Oo(e, t) {
|
|
3772
3835
|
let n = f(null), r = o(() => {
|
|
3773
3836
|
let t = e.current;
|
|
3774
3837
|
if (!t) return;
|
|
3775
|
-
let r =
|
|
3776
|
-
for (let e of
|
|
3838
|
+
let r = yo(t), i = n.current, a = i && r.includes(i) ? i : r[0];
|
|
3839
|
+
for (let e of vo(t)) e.tabIndex = e === a ? 0 : -1;
|
|
3777
3840
|
}, [e]);
|
|
3778
3841
|
return c(() => {
|
|
3779
3842
|
let t = e.current;
|
|
@@ -3784,19 +3847,19 @@ function wo(e, t) {
|
|
|
3784
3847
|
subtree: !0,
|
|
3785
3848
|
childList: !0,
|
|
3786
3849
|
attributes: !0,
|
|
3787
|
-
attributeFilter:
|
|
3850
|
+
attributeFilter: Do
|
|
3788
3851
|
}), () => n.disconnect();
|
|
3789
3852
|
}, [e, r]), {
|
|
3790
3853
|
handleFocus: (t) => {
|
|
3791
3854
|
let i = e.current;
|
|
3792
3855
|
if (!i) return;
|
|
3793
|
-
let a =
|
|
3856
|
+
let a = yo(i).find((e) => e === t.target);
|
|
3794
3857
|
a && (n.current = a, r());
|
|
3795
3858
|
},
|
|
3796
3859
|
handleKeyDown: (n) => {
|
|
3797
3860
|
let r = e.current;
|
|
3798
|
-
if (!r ||
|
|
3799
|
-
let i =
|
|
3861
|
+
if (!r || bo(n.target)) return;
|
|
3862
|
+
let i = yo(r), a = Eo({
|
|
3800
3863
|
key: n.key,
|
|
3801
3864
|
orientation: t,
|
|
3802
3865
|
currentPosition: i.findIndex((e) => e === n.target),
|
|
@@ -3807,18 +3870,18 @@ function wo(e, t) {
|
|
|
3807
3870
|
};
|
|
3808
3871
|
}
|
|
3809
3872
|
// src/components/toolbar/toolbar.tsx
|
|
3810
|
-
var
|
|
3873
|
+
var ko = {
|
|
3811
3874
|
horizontal: "flex items-center gap-1",
|
|
3812
3875
|
vertical: "flex flex-col items-stretch gap-1"
|
|
3813
3876
|
};
|
|
3814
|
-
function
|
|
3815
|
-
let { orientation: t = "horizontal", unstyled: n = !1, className: r, ref: i, onFocus: a, onKeyDown: o, ...s } = e, c = f(null), { handleFocus: l, handleKeyDown: u } =
|
|
3877
|
+
function Ao(e) {
|
|
3878
|
+
let { orientation: t = "horizontal", unstyled: n = !1, className: r, ref: i, onFocus: a, onKeyDown: o, ...s } = e, c = f(null), { handleFocus: l, handleKeyDown: u } = Oo(c, t);
|
|
3816
3879
|
return /* @__PURE__ */ g("div", {
|
|
3817
3880
|
...s,
|
|
3818
3881
|
ref: we(c, i),
|
|
3819
3882
|
role: "toolbar",
|
|
3820
3883
|
"aria-orientation": t,
|
|
3821
|
-
className: x(!n &&
|
|
3884
|
+
className: x(!n && ko[t], r),
|
|
3822
3885
|
onFocus: (e) => {
|
|
3823
3886
|
l(e), a?.(e);
|
|
3824
3887
|
},
|
|
@@ -3828,13 +3891,13 @@ function Eo(e) {
|
|
|
3828
3891
|
});
|
|
3829
3892
|
}
|
|
3830
3893
|
// src/components/ui_provider/ui_provider.tsx
|
|
3831
|
-
function
|
|
3894
|
+
function jo(e = {}) {
|
|
3832
3895
|
return Object.fromEntries(Object.entries(e).filter(([, e]) => e !== void 0));
|
|
3833
3896
|
}
|
|
3834
|
-
function
|
|
3897
|
+
function Mo({ labels: e, announceFieldErrors: t, children: n }) {
|
|
3835
3898
|
let r = s(ke), i = ye(), a = d(() => ({
|
|
3836
3899
|
...r,
|
|
3837
|
-
...
|
|
3900
|
+
...jo(e)
|
|
3838
3901
|
}), [r, e]);
|
|
3839
3902
|
return /* @__PURE__ */ g(ke.Provider, {
|
|
3840
3903
|
value: a,
|
|
@@ -3845,10 +3908,10 @@ function Oo({ labels: e, announceFieldErrors: t, children: n }) {
|
|
|
3845
3908
|
});
|
|
3846
3909
|
}
|
|
3847
3910
|
// src/hooks/use_is_client/with_client_only.tsx
|
|
3848
|
-
var
|
|
3911
|
+
var No = (e) => {
|
|
3849
3912
|
function t(t) {
|
|
3850
3913
|
return Ne() ? /* @__PURE__ */ g(e, { ...t }) : null;
|
|
3851
3914
|
}
|
|
3852
3915
|
return t;
|
|
3853
3916
|
};
|
|
3854
|
-
export { I as Avatar, fe as BASE_INPUT_STYLES, R as Badge, te as Button, K as Card, le as CharacterCount, Ee as Checkbox, Me as CheckboxOptions, Pe as ClientOnly, ze as Combobox,
|
|
3917
|
+
export { I as Avatar, fe as BASE_INPUT_STYLES, R as Badge, te as Button, K as Card, le as CharacterCount, Ee as Checkbox, Me as CheckboxOptions, Pe as ClientOnly, ze as Combobox, Xi as ConfirmModal, Qn as ContextMenu, tr as CopyButton, _i as Drawer, ir as Highlight, Er as IconButton, bi as Input, Si as Kbd, Ti as Menu, Ei as MenuGroup, Li as MenuItem, Ri as MenuSeparator, Qi as Modal, $i as ModalFooter, ta as ModalProvider, sa as MultiCombobox, la as RadioOptions, ua as Select, da as Switch, Ja as Tabs, Ya as Textarea, mo as ThemeToggle, Ao as Toolbar, Sr as Tooltip, Mo as UIProvider, nr as splitIntoHighlightSegments, pi as useDisableHotkeysWhileMounted, ea as useDismissGuard, di as useGlobalHotkeysStore, Ne as useIsClient, uo as useThemeStore, No as withClientOnly };
|