@evinvest/uikit 0.4.0 → 0.6.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 +80 -2
- package/dist/index.js +696 -521
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1183,25 +1183,37 @@ function Header({
|
|
|
1183
1183
|
tagline = "Quy Nhon Fund",
|
|
1184
1184
|
homeHref = "/",
|
|
1185
1185
|
className,
|
|
1186
|
-
linkComponent
|
|
1186
|
+
linkComponent,
|
|
1187
|
+
variant = "marketing",
|
|
1188
|
+
hideNav = false
|
|
1187
1189
|
}) {
|
|
1188
1190
|
const L = linkComponent ?? "a";
|
|
1191
|
+
const compact = variant === "compact";
|
|
1189
1192
|
const [hasScrolled, setHasScrolled] = React23.useState(false);
|
|
1190
1193
|
React23.useEffect(() => {
|
|
1194
|
+
if (compact) return;
|
|
1191
1195
|
const handleScroll = () => setHasScrolled(window.scrollY > 50);
|
|
1192
1196
|
window.addEventListener("scroll", handleScroll);
|
|
1193
1197
|
return () => window.removeEventListener("scroll", handleScroll);
|
|
1194
|
-
}, []);
|
|
1198
|
+
}, [compact]);
|
|
1195
1199
|
return /* @__PURE__ */ jsx14(
|
|
1196
1200
|
"header",
|
|
1197
1201
|
{
|
|
1198
1202
|
"data-slot": "header",
|
|
1203
|
+
"data-variant": variant,
|
|
1199
1204
|
className: cn(
|
|
1200
|
-
"fixed top-0 left-0 w-full z-[60]
|
|
1201
|
-
|
|
1205
|
+
"fixed top-0 left-0 w-full z-[60] border-b",
|
|
1206
|
+
compact ? (
|
|
1207
|
+
// Fixed 4rem bar (py-3 + the 40px lockup): opaque by default so app
|
|
1208
|
+
// content beneath it never bleeds through.
|
|
1209
|
+
"h-16 bg-main-black/90 backdrop-blur-md border-main-mist/10"
|
|
1210
|
+
) : cn(
|
|
1211
|
+
"transition-all duration-500",
|
|
1212
|
+
hasScrolled ? "bg-main-black/90 backdrop-blur-md border-main-mist/10 py-4" : "bg-transparent border-transparent py-6"
|
|
1213
|
+
),
|
|
1202
1214
|
className
|
|
1203
1215
|
),
|
|
1204
|
-
children: /* @__PURE__ */ jsxs4(Container, { className: "flex items-center justify-between gap-4", children: [
|
|
1216
|
+
children: /* @__PURE__ */ jsxs4(Container, { className: "flex h-full items-center justify-between gap-4", children: [
|
|
1205
1217
|
/* @__PURE__ */ jsxs4(
|
|
1206
1218
|
L,
|
|
1207
1219
|
{
|
|
@@ -1217,7 +1229,7 @@ function Header({
|
|
|
1217
1229
|
]
|
|
1218
1230
|
}
|
|
1219
1231
|
),
|
|
1220
|
-
/* @__PURE__ */ jsx14("nav", { className: "hidden lg:flex items-center gap-6 font-mono-tech text-xs tracking-widest uppercase", children: nav.map((item) => /* @__PURE__ */ jsx14(
|
|
1232
|
+
!hideNav && /* @__PURE__ */ jsx14("nav", { className: "hidden lg:flex items-center gap-6 font-mono-tech text-xs tracking-widest uppercase", children: nav.map((item) => /* @__PURE__ */ jsx14(
|
|
1221
1233
|
L,
|
|
1222
1234
|
{
|
|
1223
1235
|
href: item.href,
|
|
@@ -1228,7 +1240,7 @@ function Header({
|
|
|
1228
1240
|
)) }),
|
|
1229
1241
|
/* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-3", children: [
|
|
1230
1242
|
cta,
|
|
1231
|
-
/* @__PURE__ */ jsx14(MobileMenu, { nav, cta: mobileCta ?? cta, linkComponent: L })
|
|
1243
|
+
!hideNav && /* @__PURE__ */ jsx14(MobileMenu, { nav, cta: mobileCta ?? cta, linkComponent: L })
|
|
1232
1244
|
] })
|
|
1233
1245
|
] })
|
|
1234
1246
|
}
|
|
@@ -1905,6 +1917,164 @@ function Spinner({ className, ...props }) {
|
|
|
1905
1917
|
);
|
|
1906
1918
|
}
|
|
1907
1919
|
|
|
1920
|
+
// src/components/status-screen.tsx
|
|
1921
|
+
import "react";
|
|
1922
|
+
import { jsx as jsx25, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1923
|
+
var ACCENT_TEXT = {
|
|
1924
|
+
teal: "text-main-accent-t1",
|
|
1925
|
+
gold: "text-main-accent-t3",
|
|
1926
|
+
red: "text-destructive",
|
|
1927
|
+
blue: "text-[#5e9be6]"
|
|
1928
|
+
};
|
|
1929
|
+
var BTN_BASE = "inline-flex items-center justify-center rounded-md px-6 py-3.5 font-mono-tech text-xs uppercase tracking-widest transition-colors";
|
|
1930
|
+
var BTN_FILLED = {
|
|
1931
|
+
teal: "bg-main-accent-t1 text-main-black hover:bg-main-accent-t1/90",
|
|
1932
|
+
gold: "bg-main-accent-t3 text-main-black hover:bg-main-accent-t3/90",
|
|
1933
|
+
red: "bg-destructive text-white hover:bg-destructive/90",
|
|
1934
|
+
blue: "bg-[#5e9be6] text-main-black hover:bg-[#5e9be6]/90"
|
|
1935
|
+
};
|
|
1936
|
+
var BTN_OUTLINE = {
|
|
1937
|
+
teal: "border border-main-accent-t1/40 text-main-accent-t1 hover:bg-main-accent-t1/10",
|
|
1938
|
+
gold: "border border-main-accent-t3/40 text-main-accent-t3 hover:bg-main-accent-t3/10",
|
|
1939
|
+
red: "border border-destructive/40 text-destructive hover:bg-destructive/10",
|
|
1940
|
+
blue: "border border-[#5e9be6]/40 text-[#5e9be6] hover:bg-[#5e9be6]/10"
|
|
1941
|
+
};
|
|
1942
|
+
function statusButtonClass(accent, variant) {
|
|
1943
|
+
return cn(BTN_BASE, variant === "filled" ? BTN_FILLED[accent] : BTN_OUTLINE[accent]);
|
|
1944
|
+
}
|
|
1945
|
+
function LogoMark({ className }) {
|
|
1946
|
+
return /* @__PURE__ */ jsx25("svg", { viewBox: "0 0 140 48", className, "aria-hidden": true, children: /* @__PURE__ */ jsxs6("g", { fill: "currentColor", children: [
|
|
1947
|
+
/* @__PURE__ */ jsx25("path", { d: "M0.0437012 47.3326L50.9499 40.5805V22.3378L56.4881 23.6408V37.9071L59.1984 37.5005V24.1147L64.6189 25.1808V37.0269L67.2113 36.553V22.1009L56.606 17.481L43.408 21.864V36.553L0.0437012 47.3326Z" }),
|
|
1948
|
+
/* @__PURE__ */ jsx25("path", { d: "M77.2277 40.5804L85.9478 41.4099L85.8299 0.304321L73.1033 7.17499V26.3654L77.2277 28.2608V40.5804Z" }),
|
|
1949
|
+
/* @__PURE__ */ jsx25("path", { d: "M87.126 0.304321L99.9705 7.29343V42.5943L94.3141 41.8835V9.54417L87.126 5.75347V0.304321Z" }),
|
|
1950
|
+
/* @__PURE__ */ jsx25("path", { d: "M103.034 42.9496L139.682 46.0296L110.104 39.7513V26.8393L103.034 23.0486V42.9496Z" })
|
|
1951
|
+
] }) });
|
|
1952
|
+
}
|
|
1953
|
+
function ArrowLeftIcon({ className }) {
|
|
1954
|
+
return /* @__PURE__ */ jsxs6(
|
|
1955
|
+
"svg",
|
|
1956
|
+
{
|
|
1957
|
+
className,
|
|
1958
|
+
viewBox: "0 0 24 24",
|
|
1959
|
+
fill: "none",
|
|
1960
|
+
stroke: "currentColor",
|
|
1961
|
+
strokeWidth: 2,
|
|
1962
|
+
strokeLinecap: "round",
|
|
1963
|
+
strokeLinejoin: "round",
|
|
1964
|
+
"aria-hidden": true,
|
|
1965
|
+
children: [
|
|
1966
|
+
/* @__PURE__ */ jsx25("path", { d: "m12 19-7-7 7-7" }),
|
|
1967
|
+
/* @__PURE__ */ jsx25("path", { d: "M19 12H5" })
|
|
1968
|
+
]
|
|
1969
|
+
}
|
|
1970
|
+
);
|
|
1971
|
+
}
|
|
1972
|
+
function StatusScreen({
|
|
1973
|
+
accent,
|
|
1974
|
+
eyebrow,
|
|
1975
|
+
code,
|
|
1976
|
+
headlineLead,
|
|
1977
|
+
headlineAccent,
|
|
1978
|
+
headlineTail = ".",
|
|
1979
|
+
subtext,
|
|
1980
|
+
links,
|
|
1981
|
+
children,
|
|
1982
|
+
linkComponent
|
|
1983
|
+
}) {
|
|
1984
|
+
const L = linkComponent ?? "a";
|
|
1985
|
+
const accentText = ACCENT_TEXT[accent];
|
|
1986
|
+
return /* @__PURE__ */ jsxs6("section", { className: "relative flex min-h-screen flex-col items-center justify-center overflow-hidden bg-main-black px-6 py-32 text-center", children: [
|
|
1987
|
+
/* @__PURE__ */ jsx25(
|
|
1988
|
+
"div",
|
|
1989
|
+
{
|
|
1990
|
+
"aria-hidden": true,
|
|
1991
|
+
className: cn(
|
|
1992
|
+
"pointer-events-none absolute inset-0 opacity-[0.07] [background:radial-gradient(55%_45%_at_50%_30%,currentColor,transparent_70%)]",
|
|
1993
|
+
accentText
|
|
1994
|
+
)
|
|
1995
|
+
}
|
|
1996
|
+
),
|
|
1997
|
+
/* @__PURE__ */ jsxs6("div", { className: "relative z-10 flex w-full max-w-2xl flex-col items-center", children: [
|
|
1998
|
+
/* @__PURE__ */ jsx25(LogoMark, { className: cn("mb-7 h-10 w-auto", accentText) }),
|
|
1999
|
+
/* @__PURE__ */ jsx25("p", { className: cn("mb-6 font-mono-tech text-[11px] uppercase tracking-[0.34em]", accentText), children: eyebrow }),
|
|
2000
|
+
/* @__PURE__ */ jsx25("p", { className: cn("font-serif-display text-[110px] font-medium leading-[0.9] sm:text-[180px]", accentText), children: code }),
|
|
2001
|
+
/* @__PURE__ */ jsxs6("h1", { className: "mt-4 font-serif-display text-3xl font-light leading-tight text-white sm:text-5xl", children: [
|
|
2002
|
+
headlineLead,
|
|
2003
|
+
/* @__PURE__ */ jsx25("span", { className: cn("font-serif italic", accentText), children: headlineAccent }),
|
|
2004
|
+
headlineTail
|
|
2005
|
+
] }),
|
|
2006
|
+
/* @__PURE__ */ jsx25("p", { className: "mx-auto mt-5 max-w-md text-sm leading-relaxed text-main-mist/60 sm:text-base", children: subtext }),
|
|
2007
|
+
/* @__PURE__ */ jsxs6("div", { className: "mt-9 flex flex-col items-center gap-3 sm:flex-row", children: [
|
|
2008
|
+
children,
|
|
2009
|
+
links?.map((link) => /* @__PURE__ */ jsxs6(L, { href: link.href, className: statusButtonClass(accent, link.variant ?? "filled"), children: [
|
|
2010
|
+
link.leadingArrow ? /* @__PURE__ */ jsx25(ArrowLeftIcon, { className: "mr-2 h-4 w-4" }) : null,
|
|
2011
|
+
link.label
|
|
2012
|
+
] }, link.label))
|
|
2013
|
+
] })
|
|
2014
|
+
] })
|
|
2015
|
+
] });
|
|
2016
|
+
}
|
|
2017
|
+
function NotFound({ linkComponent = "a", homeHref = "/", contactHref = "/contact" }) {
|
|
2018
|
+
return /* @__PURE__ */ jsx25(
|
|
2019
|
+
StatusScreen,
|
|
2020
|
+
{
|
|
2021
|
+
accent: "teal",
|
|
2022
|
+
eyebrow: "Page not found",
|
|
2023
|
+
code: "404",
|
|
2024
|
+
headlineLead: "You've reached ",
|
|
2025
|
+
headlineAccent: "open water",
|
|
2026
|
+
subtext: "The page you're looking for has drifted off our coastline \u2014 moved, renamed, or never charted. Let's get you back to shore.",
|
|
2027
|
+
linkComponent,
|
|
2028
|
+
links: [
|
|
2029
|
+
{ label: "Back to home", href: homeHref, leadingArrow: true },
|
|
2030
|
+
{ label: "Contact the team", href: contactHref, variant: "outline" }
|
|
2031
|
+
]
|
|
2032
|
+
}
|
|
2033
|
+
);
|
|
2034
|
+
}
|
|
2035
|
+
function Forbidden({ linkComponent = "a", homeHref = "/", contactHref = "/contact" }) {
|
|
2036
|
+
return /* @__PURE__ */ jsx25(
|
|
2037
|
+
StatusScreen,
|
|
2038
|
+
{
|
|
2039
|
+
accent: "gold",
|
|
2040
|
+
eyebrow: "Access forbidden",
|
|
2041
|
+
code: "403",
|
|
2042
|
+
headlineLead: "This harbour is ",
|
|
2043
|
+
headlineAccent: "private",
|
|
2044
|
+
subtext: "You don't have the credentials to view this page. If you believe you should, our team can open the right doors.",
|
|
2045
|
+
linkComponent,
|
|
2046
|
+
links: [
|
|
2047
|
+
{ label: "Back to home", href: homeHref, leadingArrow: true },
|
|
2048
|
+
{ label: "Request access", href: contactHref, variant: "outline" }
|
|
2049
|
+
]
|
|
2050
|
+
}
|
|
2051
|
+
);
|
|
2052
|
+
}
|
|
2053
|
+
function ServerError({ linkComponent = "a", homeHref = "/", reset }) {
|
|
2054
|
+
return /* @__PURE__ */ jsx25(
|
|
2055
|
+
StatusScreen,
|
|
2056
|
+
{
|
|
2057
|
+
accent: "red",
|
|
2058
|
+
eyebrow: "Server error",
|
|
2059
|
+
code: "500",
|
|
2060
|
+
headlineLead: "Our systems are ",
|
|
2061
|
+
headlineAccent: "recalibrating",
|
|
2062
|
+
subtext: "Something broke on our end \u2014 not yours. We've been alerted and are restoring service. Please try again in a moment.",
|
|
2063
|
+
linkComponent,
|
|
2064
|
+
links: [{ label: "Back to home", href: homeHref, variant: "outline", leadingArrow: true }],
|
|
2065
|
+
children: /* @__PURE__ */ jsx25(
|
|
2066
|
+
"button",
|
|
2067
|
+
{
|
|
2068
|
+
type: "button",
|
|
2069
|
+
className: statusButtonClass("red", "filled"),
|
|
2070
|
+
onClick: () => reset ? reset() : window.location.reload(),
|
|
2071
|
+
children: "Try again"
|
|
2072
|
+
}
|
|
2073
|
+
)
|
|
2074
|
+
}
|
|
2075
|
+
);
|
|
2076
|
+
}
|
|
2077
|
+
|
|
1908
2078
|
// src/components/table.tsx
|
|
1909
2079
|
import "react";
|
|
1910
2080
|
|
|
@@ -1920,14 +2090,14 @@ var TABLE_CELL = "p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr
|
|
|
1920
2090
|
var TABLE_CAPTION = "text-muted-foreground mt-4 text-sm";
|
|
1921
2091
|
|
|
1922
2092
|
// src/components/table.tsx
|
|
1923
|
-
import { jsx as
|
|
2093
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
1924
2094
|
function Table({ className, ...props }) {
|
|
1925
|
-
return /* @__PURE__ */
|
|
2095
|
+
return /* @__PURE__ */ jsx26(
|
|
1926
2096
|
"div",
|
|
1927
2097
|
{
|
|
1928
2098
|
"data-slot": "table-container",
|
|
1929
2099
|
className: TABLE_CONTAINER,
|
|
1930
|
-
children: /* @__PURE__ */
|
|
2100
|
+
children: /* @__PURE__ */ jsx26(
|
|
1931
2101
|
"table",
|
|
1932
2102
|
{
|
|
1933
2103
|
"data-slot": "table",
|
|
@@ -1942,7 +2112,7 @@ function TableHeader({
|
|
|
1942
2112
|
className,
|
|
1943
2113
|
...props
|
|
1944
2114
|
}) {
|
|
1945
|
-
return /* @__PURE__ */
|
|
2115
|
+
return /* @__PURE__ */ jsx26(
|
|
1946
2116
|
"thead",
|
|
1947
2117
|
{
|
|
1948
2118
|
"data-slot": "table-header",
|
|
@@ -1955,7 +2125,7 @@ function TableBody({
|
|
|
1955
2125
|
className,
|
|
1956
2126
|
...props
|
|
1957
2127
|
}) {
|
|
1958
|
-
return /* @__PURE__ */
|
|
2128
|
+
return /* @__PURE__ */ jsx26(
|
|
1959
2129
|
"tbody",
|
|
1960
2130
|
{
|
|
1961
2131
|
"data-slot": "table-body",
|
|
@@ -1968,7 +2138,7 @@ function TableFooter({
|
|
|
1968
2138
|
className,
|
|
1969
2139
|
...props
|
|
1970
2140
|
}) {
|
|
1971
|
-
return /* @__PURE__ */
|
|
2141
|
+
return /* @__PURE__ */ jsx26(
|
|
1972
2142
|
"tfoot",
|
|
1973
2143
|
{
|
|
1974
2144
|
"data-slot": "table-footer",
|
|
@@ -1978,7 +2148,7 @@ function TableFooter({
|
|
|
1978
2148
|
);
|
|
1979
2149
|
}
|
|
1980
2150
|
function TableRow({ className, ...props }) {
|
|
1981
|
-
return /* @__PURE__ */
|
|
2151
|
+
return /* @__PURE__ */ jsx26(
|
|
1982
2152
|
"tr",
|
|
1983
2153
|
{
|
|
1984
2154
|
"data-slot": "table-row",
|
|
@@ -1988,7 +2158,7 @@ function TableRow({ className, ...props }) {
|
|
|
1988
2158
|
);
|
|
1989
2159
|
}
|
|
1990
2160
|
function TableHead({ className, ...props }) {
|
|
1991
|
-
return /* @__PURE__ */
|
|
2161
|
+
return /* @__PURE__ */ jsx26(
|
|
1992
2162
|
"th",
|
|
1993
2163
|
{
|
|
1994
2164
|
"data-slot": "table-head",
|
|
@@ -1998,7 +2168,7 @@ function TableHead({ className, ...props }) {
|
|
|
1998
2168
|
);
|
|
1999
2169
|
}
|
|
2000
2170
|
function TableCell({ className, ...props }) {
|
|
2001
|
-
return /* @__PURE__ */
|
|
2171
|
+
return /* @__PURE__ */ jsx26(
|
|
2002
2172
|
"td",
|
|
2003
2173
|
{
|
|
2004
2174
|
"data-slot": "table-cell",
|
|
@@ -2011,7 +2181,7 @@ function TableCaption({
|
|
|
2011
2181
|
className,
|
|
2012
2182
|
...props
|
|
2013
2183
|
}) {
|
|
2014
|
-
return /* @__PURE__ */
|
|
2184
|
+
return /* @__PURE__ */ jsx26(
|
|
2015
2185
|
"caption",
|
|
2016
2186
|
{
|
|
2017
2187
|
"data-slot": "table-caption",
|
|
@@ -2022,7 +2192,7 @@ function TableCaption({
|
|
|
2022
2192
|
}
|
|
2023
2193
|
|
|
2024
2194
|
// src/components/accordion.tsx
|
|
2025
|
-
import * as
|
|
2195
|
+
import * as React36 from "react";
|
|
2026
2196
|
|
|
2027
2197
|
// src/generated/accordion.ts
|
|
2028
2198
|
var ACCORDION_ITEM = "border-b last:border-b-0";
|
|
@@ -2032,16 +2202,16 @@ var ACCORDION_CONTENT = "data-[state=closed]:animate-accordion-up data-[state=op
|
|
|
2032
2202
|
var ACCORDION_CONTENT_INNER = "pt-0 pb-4";
|
|
2033
2203
|
|
|
2034
2204
|
// src/components/accordion.tsx
|
|
2035
|
-
import { jsx as
|
|
2036
|
-
var AccordionContext =
|
|
2205
|
+
import { jsx as jsx27, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
2206
|
+
var AccordionContext = React36.createContext(null);
|
|
2037
2207
|
function useAccordion() {
|
|
2038
|
-
const ctx =
|
|
2208
|
+
const ctx = React36.useContext(AccordionContext);
|
|
2039
2209
|
if (!ctx) throw new Error("Accordion parts must be used within <Accordion>");
|
|
2040
2210
|
return ctx;
|
|
2041
2211
|
}
|
|
2042
|
-
var ItemContext =
|
|
2212
|
+
var ItemContext = React36.createContext(null);
|
|
2043
2213
|
function useItemValue() {
|
|
2044
|
-
const value =
|
|
2214
|
+
const value = React36.useContext(ItemContext);
|
|
2045
2215
|
if (value === null)
|
|
2046
2216
|
throw new Error("AccordionTrigger/Content must be used within <AccordionItem>");
|
|
2047
2217
|
return value;
|
|
@@ -2069,7 +2239,7 @@ function Accordion({
|
|
|
2069
2239
|
if (open.includes(v)) setOpen(collapsible ? [] : open);
|
|
2070
2240
|
else setOpen([v]);
|
|
2071
2241
|
};
|
|
2072
|
-
return /* @__PURE__ */
|
|
2242
|
+
return /* @__PURE__ */ jsx27(AccordionContext.Provider, { value: { isOpen, toggle }, children: /* @__PURE__ */ jsx27("div", { "data-slot": "accordion", ...props, children }) });
|
|
2073
2243
|
}
|
|
2074
2244
|
function AccordionItem({
|
|
2075
2245
|
className,
|
|
@@ -2077,7 +2247,7 @@ function AccordionItem({
|
|
|
2077
2247
|
children,
|
|
2078
2248
|
...props
|
|
2079
2249
|
}) {
|
|
2080
|
-
return /* @__PURE__ */
|
|
2250
|
+
return /* @__PURE__ */ jsx27(ItemContext.Provider, { value, children: /* @__PURE__ */ jsx27(
|
|
2081
2251
|
"div",
|
|
2082
2252
|
{
|
|
2083
2253
|
"data-slot": "accordion-item",
|
|
@@ -2096,7 +2266,7 @@ function AccordionTrigger({
|
|
|
2096
2266
|
const { isOpen, toggle } = useAccordion();
|
|
2097
2267
|
const value = useItemValue();
|
|
2098
2268
|
const open = isOpen(value);
|
|
2099
|
-
return /* @__PURE__ */
|
|
2269
|
+
return /* @__PURE__ */ jsx27("h3", { className: ACCORDION_HEADER, "data-slot": "accordion-header", children: /* @__PURE__ */ jsxs7(
|
|
2100
2270
|
"button",
|
|
2101
2271
|
{
|
|
2102
2272
|
type: "button",
|
|
@@ -2111,7 +2281,7 @@ function AccordionTrigger({
|
|
|
2111
2281
|
...props,
|
|
2112
2282
|
children: [
|
|
2113
2283
|
children,
|
|
2114
|
-
/* @__PURE__ */
|
|
2284
|
+
/* @__PURE__ */ jsx27(
|
|
2115
2285
|
"svg",
|
|
2116
2286
|
{
|
|
2117
2287
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2124,7 +2294,7 @@ function AccordionTrigger({
|
|
|
2124
2294
|
strokeLinecap: "round",
|
|
2125
2295
|
strokeLinejoin: "round",
|
|
2126
2296
|
className: "text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200",
|
|
2127
|
-
children: /* @__PURE__ */
|
|
2297
|
+
children: /* @__PURE__ */ jsx27("path", { d: "m6 9 6 6 6-6" })
|
|
2128
2298
|
}
|
|
2129
2299
|
)
|
|
2130
2300
|
]
|
|
@@ -2139,26 +2309,26 @@ function AccordionContent({
|
|
|
2139
2309
|
const { isOpen } = useAccordion();
|
|
2140
2310
|
const value = useItemValue();
|
|
2141
2311
|
if (!isOpen(value)) return null;
|
|
2142
|
-
return /* @__PURE__ */
|
|
2312
|
+
return /* @__PURE__ */ jsx27(
|
|
2143
2313
|
"div",
|
|
2144
2314
|
{
|
|
2145
2315
|
"data-slot": "accordion-content",
|
|
2146
2316
|
"data-state": "open",
|
|
2147
2317
|
className: ACCORDION_CONTENT,
|
|
2148
2318
|
...props,
|
|
2149
|
-
children: /* @__PURE__ */
|
|
2319
|
+
children: /* @__PURE__ */ jsx27("div", { className: cn(ACCORDION_CONTENT_INNER, className), children })
|
|
2150
2320
|
}
|
|
2151
2321
|
);
|
|
2152
2322
|
}
|
|
2153
2323
|
|
|
2154
2324
|
// src/components/collapsible.tsx
|
|
2155
|
-
import * as
|
|
2156
|
-
import { jsx as
|
|
2157
|
-
var CollapsibleContext =
|
|
2325
|
+
import * as React37 from "react";
|
|
2326
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
2327
|
+
var CollapsibleContext = React37.createContext(
|
|
2158
2328
|
null
|
|
2159
2329
|
);
|
|
2160
2330
|
function useCollapsible() {
|
|
2161
|
-
const ctx =
|
|
2331
|
+
const ctx = React37.useContext(CollapsibleContext);
|
|
2162
2332
|
if (!ctx) throw new Error("Collapsible parts must be used within <Collapsible>");
|
|
2163
2333
|
return ctx;
|
|
2164
2334
|
}
|
|
@@ -2174,14 +2344,14 @@ function Collapsible({
|
|
|
2174
2344
|
defaultValue: defaultOpen,
|
|
2175
2345
|
...onOpenChange ? { onChange: onOpenChange } : {}
|
|
2176
2346
|
});
|
|
2177
|
-
return /* @__PURE__ */
|
|
2347
|
+
return /* @__PURE__ */ jsx28(CollapsibleContext.Provider, { value: { open: isOpen, setOpen }, children: /* @__PURE__ */ jsx28("div", { "data-slot": "collapsible", "data-state": isOpen ? "open" : "closed", ...props, children }) });
|
|
2178
2348
|
}
|
|
2179
2349
|
function CollapsibleTrigger({
|
|
2180
2350
|
onClick,
|
|
2181
2351
|
...props
|
|
2182
2352
|
}) {
|
|
2183
2353
|
const { open, setOpen } = useCollapsible();
|
|
2184
|
-
return /* @__PURE__ */
|
|
2354
|
+
return /* @__PURE__ */ jsx28(
|
|
2185
2355
|
"button",
|
|
2186
2356
|
{
|
|
2187
2357
|
type: "button",
|
|
@@ -2202,11 +2372,11 @@ function CollapsibleContent({
|
|
|
2202
2372
|
}) {
|
|
2203
2373
|
const { open } = useCollapsible();
|
|
2204
2374
|
if (!open) return null;
|
|
2205
|
-
return /* @__PURE__ */
|
|
2375
|
+
return /* @__PURE__ */ jsx28("div", { "data-slot": "collapsible-content", "data-state": "open", ...props, children });
|
|
2206
2376
|
}
|
|
2207
2377
|
|
|
2208
2378
|
// src/components/tabs.tsx
|
|
2209
|
-
import * as
|
|
2379
|
+
import * as React38 from "react";
|
|
2210
2380
|
|
|
2211
2381
|
// src/generated/tabs.ts
|
|
2212
2382
|
var TABS_ROOT = "flex flex-col gap-2";
|
|
@@ -2215,10 +2385,10 @@ var TABS_TRIGGER = "data-[state=active]:bg-background focus-visible:border-ring
|
|
|
2215
2385
|
var TABS_CONTENT = "flex-1 outline-none";
|
|
2216
2386
|
|
|
2217
2387
|
// src/components/tabs.tsx
|
|
2218
|
-
import { jsx as
|
|
2219
|
-
var TabsContext =
|
|
2388
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
2389
|
+
var TabsContext = React38.createContext(null);
|
|
2220
2390
|
function useTabs() {
|
|
2221
|
-
const ctx =
|
|
2391
|
+
const ctx = React38.useContext(TabsContext);
|
|
2222
2392
|
if (!ctx) throw new Error("Tabs parts must be used within <Tabs>");
|
|
2223
2393
|
return ctx;
|
|
2224
2394
|
}
|
|
@@ -2236,7 +2406,7 @@ function Tabs({
|
|
|
2236
2406
|
defaultValue,
|
|
2237
2407
|
...onValueChange ? { onChange: onValueChange } : {}
|
|
2238
2408
|
});
|
|
2239
|
-
return /* @__PURE__ */
|
|
2409
|
+
return /* @__PURE__ */ jsx29(TabsContext.Provider, { value: { value: active, setValue, orientation }, children: /* @__PURE__ */ jsx29(
|
|
2240
2410
|
"div",
|
|
2241
2411
|
{
|
|
2242
2412
|
"data-slot": "tabs",
|
|
@@ -2254,12 +2424,12 @@ function TabsList({
|
|
|
2254
2424
|
...props
|
|
2255
2425
|
}) {
|
|
2256
2426
|
const { orientation } = useTabs();
|
|
2257
|
-
const items =
|
|
2427
|
+
const items = React38.Children.toArray(children);
|
|
2258
2428
|
const { activeIndex, setActiveIndex, onKeyDown: rovingKeyDown } = useRovingFocus({
|
|
2259
2429
|
count: items.length,
|
|
2260
2430
|
orientation: orientation === "vertical" ? "vertical" : "horizontal"
|
|
2261
2431
|
});
|
|
2262
|
-
return /* @__PURE__ */
|
|
2432
|
+
return /* @__PURE__ */ jsx29(
|
|
2263
2433
|
"div",
|
|
2264
2434
|
{
|
|
2265
2435
|
role: "tablist",
|
|
@@ -2272,7 +2442,7 @@ function TabsList({
|
|
|
2272
2442
|
},
|
|
2273
2443
|
...props,
|
|
2274
2444
|
children: items.map(
|
|
2275
|
-
(child, index) =>
|
|
2445
|
+
(child, index) => React38.isValidElement(child) ? React38.cloneElement(child, {
|
|
2276
2446
|
__index: index,
|
|
2277
2447
|
__isFocusItem: index === activeIndex,
|
|
2278
2448
|
__onFocusItem: () => setActiveIndex(index)
|
|
@@ -2292,7 +2462,7 @@ function TabsTrigger({
|
|
|
2292
2462
|
}) {
|
|
2293
2463
|
const { value: active, setValue } = useTabs();
|
|
2294
2464
|
const selected = active === value;
|
|
2295
|
-
return /* @__PURE__ */
|
|
2465
|
+
return /* @__PURE__ */ jsx29(
|
|
2296
2466
|
"button",
|
|
2297
2467
|
{
|
|
2298
2468
|
type: "button",
|
|
@@ -2323,7 +2493,7 @@ function TabsContent({
|
|
|
2323
2493
|
}) {
|
|
2324
2494
|
const { value: active } = useTabs();
|
|
2325
2495
|
if (active !== value) return null;
|
|
2326
|
-
return /* @__PURE__ */
|
|
2496
|
+
return /* @__PURE__ */ jsx29(
|
|
2327
2497
|
"div",
|
|
2328
2498
|
{
|
|
2329
2499
|
role: "tabpanel",
|
|
@@ -2352,7 +2522,7 @@ var toggleSizeClasses = {
|
|
|
2352
2522
|
};
|
|
2353
2523
|
|
|
2354
2524
|
// src/components/toggle.tsx
|
|
2355
|
-
import { jsx as
|
|
2525
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
2356
2526
|
function toggleVariants({
|
|
2357
2527
|
variant = "default",
|
|
2358
2528
|
size = "default",
|
|
@@ -2375,7 +2545,7 @@ function Toggle({
|
|
|
2375
2545
|
defaultValue: defaultPressed,
|
|
2376
2546
|
...onPressedChange ? { onChange: onPressedChange } : {}
|
|
2377
2547
|
});
|
|
2378
|
-
return /* @__PURE__ */
|
|
2548
|
+
return /* @__PURE__ */ jsx30(
|
|
2379
2549
|
"button",
|
|
2380
2550
|
{
|
|
2381
2551
|
type: "button",
|
|
@@ -2393,9 +2563,9 @@ function Toggle({
|
|
|
2393
2563
|
}
|
|
2394
2564
|
|
|
2395
2565
|
// src/components/toggle-group.tsx
|
|
2396
|
-
import * as
|
|
2397
|
-
import { jsx as
|
|
2398
|
-
var ToggleGroupContext =
|
|
2566
|
+
import * as React40 from "react";
|
|
2567
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
2568
|
+
var ToggleGroupContext = React40.createContext({
|
|
2399
2569
|
variant: "default",
|
|
2400
2570
|
size: "default",
|
|
2401
2571
|
value: [],
|
|
@@ -2422,7 +2592,7 @@ function ToggleGroup({
|
|
|
2422
2592
|
defaultValue: toArray(defaultValue),
|
|
2423
2593
|
onChange: (next) => onValueChange?.(type === "single" ? next[0] ?? "" : next)
|
|
2424
2594
|
});
|
|
2425
|
-
const toggle =
|
|
2595
|
+
const toggle = React40.useCallback(
|
|
2426
2596
|
(itemValue) => {
|
|
2427
2597
|
if (type === "single") {
|
|
2428
2598
|
setSelected(selected.includes(itemValue) ? [] : [itemValue]);
|
|
@@ -2434,7 +2604,7 @@ function ToggleGroup({
|
|
|
2434
2604
|
},
|
|
2435
2605
|
[type, selected, setSelected]
|
|
2436
2606
|
);
|
|
2437
|
-
return /* @__PURE__ */
|
|
2607
|
+
return /* @__PURE__ */ jsx31(
|
|
2438
2608
|
"div",
|
|
2439
2609
|
{
|
|
2440
2610
|
"data-slot": "toggle-group",
|
|
@@ -2445,7 +2615,7 @@ function ToggleGroup({
|
|
|
2445
2615
|
className
|
|
2446
2616
|
),
|
|
2447
2617
|
...props,
|
|
2448
|
-
children: /* @__PURE__ */
|
|
2618
|
+
children: /* @__PURE__ */ jsx31(ToggleGroupContext.Provider, { value: { variant, size, value: selected, toggle }, children })
|
|
2449
2619
|
}
|
|
2450
2620
|
);
|
|
2451
2621
|
}
|
|
@@ -2458,11 +2628,11 @@ function ToggleGroupItem({
|
|
|
2458
2628
|
onClick,
|
|
2459
2629
|
...props
|
|
2460
2630
|
}) {
|
|
2461
|
-
const context =
|
|
2631
|
+
const context = React40.useContext(ToggleGroupContext);
|
|
2462
2632
|
const resolvedVariant = context.variant || variant || "default";
|
|
2463
2633
|
const resolvedSize = context.size || size || "default";
|
|
2464
2634
|
const on = context.value.includes(value);
|
|
2465
|
-
return /* @__PURE__ */
|
|
2635
|
+
return /* @__PURE__ */ jsx31(
|
|
2466
2636
|
"button",
|
|
2467
2637
|
{
|
|
2468
2638
|
type: "button",
|
|
@@ -2488,7 +2658,7 @@ function ToggleGroupItem({
|
|
|
2488
2658
|
|
|
2489
2659
|
// src/components/switch.tsx
|
|
2490
2660
|
import "react";
|
|
2491
|
-
import { jsx as
|
|
2661
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
2492
2662
|
function Switch({
|
|
2493
2663
|
className,
|
|
2494
2664
|
checked,
|
|
@@ -2504,7 +2674,7 @@ function Switch({
|
|
|
2504
2674
|
...onCheckedChange ? { onChange: onCheckedChange } : {}
|
|
2505
2675
|
});
|
|
2506
2676
|
const state = on ? "checked" : "unchecked";
|
|
2507
|
-
return /* @__PURE__ */
|
|
2677
|
+
return /* @__PURE__ */ jsx32(
|
|
2508
2678
|
"button",
|
|
2509
2679
|
{
|
|
2510
2680
|
type: "button",
|
|
@@ -2522,7 +2692,7 @@ function Switch({
|
|
|
2522
2692
|
setOn(!on);
|
|
2523
2693
|
},
|
|
2524
2694
|
...props,
|
|
2525
|
-
children: /* @__PURE__ */
|
|
2695
|
+
children: /* @__PURE__ */ jsx32(
|
|
2526
2696
|
"span",
|
|
2527
2697
|
{
|
|
2528
2698
|
"data-slot": "switch-thumb",
|
|
@@ -2536,7 +2706,7 @@ function Switch({
|
|
|
2536
2706
|
|
|
2537
2707
|
// src/components/checkbox.tsx
|
|
2538
2708
|
import "react";
|
|
2539
|
-
import { jsx as
|
|
2709
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
2540
2710
|
function Checkbox({
|
|
2541
2711
|
className,
|
|
2542
2712
|
checked,
|
|
@@ -2552,7 +2722,7 @@ function Checkbox({
|
|
|
2552
2722
|
...onCheckedChange ? { onChange: onCheckedChange } : {}
|
|
2553
2723
|
});
|
|
2554
2724
|
const state = on ? "checked" : "unchecked";
|
|
2555
|
-
return /* @__PURE__ */
|
|
2725
|
+
return /* @__PURE__ */ jsx33(
|
|
2556
2726
|
"button",
|
|
2557
2727
|
{
|
|
2558
2728
|
type: "button",
|
|
@@ -2570,12 +2740,12 @@ function Checkbox({
|
|
|
2570
2740
|
setOn(!on);
|
|
2571
2741
|
},
|
|
2572
2742
|
...props,
|
|
2573
|
-
children: on && /* @__PURE__ */
|
|
2743
|
+
children: on && /* @__PURE__ */ jsx33(
|
|
2574
2744
|
"span",
|
|
2575
2745
|
{
|
|
2576
2746
|
"data-slot": "checkbox-indicator",
|
|
2577
2747
|
className: "flex items-center justify-center text-current transition-none",
|
|
2578
|
-
children: /* @__PURE__ */
|
|
2748
|
+
children: /* @__PURE__ */ jsx33(
|
|
2579
2749
|
"svg",
|
|
2580
2750
|
{
|
|
2581
2751
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2587,7 +2757,7 @@ function Checkbox({
|
|
|
2587
2757
|
strokeLinejoin: "round",
|
|
2588
2758
|
className: "size-3.5",
|
|
2589
2759
|
"aria-hidden": "true",
|
|
2590
|
-
children: /* @__PURE__ */
|
|
2760
|
+
children: /* @__PURE__ */ jsx33("path", { d: "M20 6 9 17l-5-5" })
|
|
2591
2761
|
}
|
|
2592
2762
|
)
|
|
2593
2763
|
}
|
|
@@ -2597,15 +2767,15 @@ function Checkbox({
|
|
|
2597
2767
|
}
|
|
2598
2768
|
|
|
2599
2769
|
// src/components/radio-group.tsx
|
|
2600
|
-
import * as
|
|
2770
|
+
import * as React43 from "react";
|
|
2601
2771
|
|
|
2602
2772
|
// src/generated/radio-group.ts
|
|
2603
2773
|
var RADIO_GROUP_ROOT = "grid gap-3";
|
|
2604
2774
|
var RADIO_GROUP_ITEM = "border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 aria-invalid:border-destructive aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50";
|
|
2605
2775
|
|
|
2606
2776
|
// src/components/radio-group.tsx
|
|
2607
|
-
import { jsx as
|
|
2608
|
-
var RadioGroupContext =
|
|
2777
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
2778
|
+
var RadioGroupContext = React43.createContext(
|
|
2609
2779
|
null
|
|
2610
2780
|
);
|
|
2611
2781
|
function RadioGroup({
|
|
@@ -2622,10 +2792,10 @@ function RadioGroup({
|
|
|
2622
2792
|
defaultValue,
|
|
2623
2793
|
...onValueChange ? { onChange: onValueChange } : {}
|
|
2624
2794
|
});
|
|
2625
|
-
const itemsRef =
|
|
2626
|
-
const [count, setCount] =
|
|
2795
|
+
const itemsRef = React43.useRef([]);
|
|
2796
|
+
const [count, setCount] = React43.useState(0);
|
|
2627
2797
|
const { activeIndex, setActiveIndex, onKeyDown: rovingKeyDown } = useRovingFocus({ count, orientation: "vertical", loop: true });
|
|
2628
|
-
const register =
|
|
2798
|
+
const register = React43.useCallback((el) => {
|
|
2629
2799
|
const list = itemsRef.current;
|
|
2630
2800
|
let index = list.indexOf(el);
|
|
2631
2801
|
if (index === -1) {
|
|
@@ -2635,11 +2805,11 @@ function RadioGroup({
|
|
|
2635
2805
|
}
|
|
2636
2806
|
return index;
|
|
2637
2807
|
}, []);
|
|
2638
|
-
const ctx =
|
|
2808
|
+
const ctx = React43.useMemo(
|
|
2639
2809
|
() => ({ value: current, setValue: setCurrent, register, activeIndex, setActiveIndex }),
|
|
2640
2810
|
[current, setCurrent, register, activeIndex, setActiveIndex]
|
|
2641
2811
|
);
|
|
2642
|
-
return /* @__PURE__ */
|
|
2812
|
+
return /* @__PURE__ */ jsx34(RadioGroupContext.Provider, { value: ctx, children: /* @__PURE__ */ jsx34(
|
|
2643
2813
|
"div",
|
|
2644
2814
|
{
|
|
2645
2815
|
"data-slot": "radio-group",
|
|
@@ -2661,14 +2831,14 @@ function RadioGroupItem({
|
|
|
2661
2831
|
onClick,
|
|
2662
2832
|
...props
|
|
2663
2833
|
}) {
|
|
2664
|
-
const ctx =
|
|
2834
|
+
const ctx = React43.useContext(RadioGroupContext);
|
|
2665
2835
|
if (!ctx) throw new Error("RadioGroupItem must be used within a RadioGroup");
|
|
2666
|
-
const indexRef =
|
|
2836
|
+
const indexRef = React43.useRef(-1);
|
|
2667
2837
|
const checked = ctx.value === value;
|
|
2668
|
-
|
|
2838
|
+
React43.useEffect(() => {
|
|
2669
2839
|
if (checked) ctx.setActiveIndex(indexRef.current);
|
|
2670
2840
|
}, [checked]);
|
|
2671
|
-
return /* @__PURE__ */
|
|
2841
|
+
return /* @__PURE__ */ jsx34(
|
|
2672
2842
|
"button",
|
|
2673
2843
|
{
|
|
2674
2844
|
ref: (el) => {
|
|
@@ -2687,18 +2857,18 @@ function RadioGroupItem({
|
|
|
2687
2857
|
ctx.setValue(value);
|
|
2688
2858
|
},
|
|
2689
2859
|
...props,
|
|
2690
|
-
children: checked ? /* @__PURE__ */
|
|
2860
|
+
children: checked ? /* @__PURE__ */ jsx34(
|
|
2691
2861
|
"span",
|
|
2692
2862
|
{
|
|
2693
2863
|
"data-slot": "radio-group-indicator",
|
|
2694
2864
|
className: "relative flex items-center justify-center",
|
|
2695
|
-
children: /* @__PURE__ */
|
|
2865
|
+
children: /* @__PURE__ */ jsx34(
|
|
2696
2866
|
"svg",
|
|
2697
2867
|
{
|
|
2698
2868
|
className: "fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2",
|
|
2699
2869
|
viewBox: "0 0 24 24",
|
|
2700
2870
|
"aria-hidden": "true",
|
|
2701
|
-
children: /* @__PURE__ */
|
|
2871
|
+
children: /* @__PURE__ */ jsx34("circle", { cx: "12", cy: "12", r: "10" })
|
|
2702
2872
|
}
|
|
2703
2873
|
)
|
|
2704
2874
|
}
|
|
@@ -2708,7 +2878,7 @@ function RadioGroupItem({
|
|
|
2708
2878
|
}
|
|
2709
2879
|
|
|
2710
2880
|
// src/components/slider.tsx
|
|
2711
|
-
import * as
|
|
2881
|
+
import * as React44 from "react";
|
|
2712
2882
|
|
|
2713
2883
|
// src/generated/slider.ts
|
|
2714
2884
|
var SLIDER_ROOT = "relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col";
|
|
@@ -2717,7 +2887,7 @@ var SLIDER_RANGE = "bg-primary absolute data-[orientation=horizontal]:h-full dat
|
|
|
2717
2887
|
var SLIDER_THUMB = "border-primary ring-ring/50 block size-4 shrink-0 rounded-full border bg-white shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50";
|
|
2718
2888
|
|
|
2719
2889
|
// src/components/slider.tsx
|
|
2720
|
-
import { jsx as
|
|
2890
|
+
import { jsx as jsx35, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
2721
2891
|
function clampStep(value, min, max, step) {
|
|
2722
2892
|
const clamped = Math.min(max, Math.max(min, value));
|
|
2723
2893
|
if (step <= 0) return clamped;
|
|
@@ -2744,9 +2914,9 @@ function Slider({
|
|
|
2744
2914
|
const current = clampStep(raw, min, max, step);
|
|
2745
2915
|
const span = Math.max(max - min, Number.EPSILON);
|
|
2746
2916
|
const percent = Math.min(100, Math.max(0, (current - min) / span * 100));
|
|
2747
|
-
const trackRef =
|
|
2748
|
-
const draggingRef =
|
|
2749
|
-
const valueFromPointer =
|
|
2917
|
+
const trackRef = React44.useRef(null);
|
|
2918
|
+
const draggingRef = React44.useRef(false);
|
|
2919
|
+
const valueFromPointer = React44.useCallback(
|
|
2750
2920
|
(clientX, clientY) => {
|
|
2751
2921
|
const rect = trackRef.current?.getBoundingClientRect();
|
|
2752
2922
|
if (!rect) return current;
|
|
@@ -2795,7 +2965,7 @@ function Slider({
|
|
|
2795
2965
|
};
|
|
2796
2966
|
const rangeStyle = orientation === "vertical" ? { height: `${percent}%` } : { width: `${percent}%` };
|
|
2797
2967
|
const thumbStyle = orientation === "vertical" ? { position: "absolute", bottom: `${percent}%`, left: "50%", transform: "translate(-50%, 50%)" } : { position: "absolute", left: `${percent}%`, top: "50%", transform: "translate(-50%, -50%)" };
|
|
2798
|
-
return /* @__PURE__ */
|
|
2968
|
+
return /* @__PURE__ */ jsxs8(
|
|
2799
2969
|
"span",
|
|
2800
2970
|
{
|
|
2801
2971
|
"data-slot": "slider",
|
|
@@ -2807,14 +2977,14 @@ function Slider({
|
|
|
2807
2977
|
onPointerMove,
|
|
2808
2978
|
onPointerUp,
|
|
2809
2979
|
children: [
|
|
2810
|
-
/* @__PURE__ */
|
|
2980
|
+
/* @__PURE__ */ jsx35(
|
|
2811
2981
|
"span",
|
|
2812
2982
|
{
|
|
2813
2983
|
ref: trackRef,
|
|
2814
2984
|
"data-slot": "slider-track",
|
|
2815
2985
|
"data-orientation": orientation,
|
|
2816
2986
|
className: SLIDER_TRACK,
|
|
2817
|
-
children: /* @__PURE__ */
|
|
2987
|
+
children: /* @__PURE__ */ jsx35(
|
|
2818
2988
|
"span",
|
|
2819
2989
|
{
|
|
2820
2990
|
"data-slot": "slider-range",
|
|
@@ -2825,7 +2995,7 @@ function Slider({
|
|
|
2825
2995
|
)
|
|
2826
2996
|
}
|
|
2827
2997
|
),
|
|
2828
|
-
/* @__PURE__ */
|
|
2998
|
+
/* @__PURE__ */ jsx35(
|
|
2829
2999
|
"span",
|
|
2830
3000
|
{
|
|
2831
3001
|
"data-slot": "slider-thumb",
|
|
@@ -2860,15 +3030,15 @@ var scrollBarOrientations = {
|
|
|
2860
3030
|
};
|
|
2861
3031
|
|
|
2862
3032
|
// src/components/scroll-area.tsx
|
|
2863
|
-
import { jsx as
|
|
3033
|
+
import { jsx as jsx36, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
2864
3034
|
function ScrollArea({
|
|
2865
3035
|
className,
|
|
2866
3036
|
children,
|
|
2867
3037
|
...props
|
|
2868
3038
|
}) {
|
|
2869
|
-
return /* @__PURE__ */
|
|
2870
|
-
/* @__PURE__ */
|
|
2871
|
-
/* @__PURE__ */
|
|
3039
|
+
return /* @__PURE__ */ jsxs9("div", { "data-slot": "scroll-area", className: cn("relative", className), ...props, children: [
|
|
3040
|
+
/* @__PURE__ */ jsx36("div", { "data-slot": "scroll-area-viewport", className: SCROLL_AREA_VIEWPORT, children }),
|
|
3041
|
+
/* @__PURE__ */ jsx36(ScrollBar, {})
|
|
2872
3042
|
] });
|
|
2873
3043
|
}
|
|
2874
3044
|
function ScrollBar({
|
|
@@ -2876,20 +3046,20 @@ function ScrollBar({
|
|
|
2876
3046
|
orientation = "vertical",
|
|
2877
3047
|
...props
|
|
2878
3048
|
}) {
|
|
2879
|
-
return /* @__PURE__ */
|
|
3049
|
+
return /* @__PURE__ */ jsx36(
|
|
2880
3050
|
"div",
|
|
2881
3051
|
{
|
|
2882
3052
|
"data-slot": "scroll-area-scrollbar",
|
|
2883
3053
|
"data-orientation": orientation,
|
|
2884
3054
|
className: cn(SCROLLBAR_BASE, scrollBarOrientations[orientation], className),
|
|
2885
3055
|
...props,
|
|
2886
|
-
children: /* @__PURE__ */
|
|
3056
|
+
children: /* @__PURE__ */ jsx36("div", { "data-slot": "scroll-area-thumb", className: SCROLL_AREA_THUMB })
|
|
2887
3057
|
}
|
|
2888
3058
|
);
|
|
2889
3059
|
}
|
|
2890
3060
|
|
|
2891
3061
|
// src/components/sidebar.tsx
|
|
2892
|
-
import * as
|
|
3062
|
+
import * as React46 from "react";
|
|
2893
3063
|
|
|
2894
3064
|
// src/generated/sidebar.ts
|
|
2895
3065
|
var SIDEBAR_MENU_BUTTON_BASE = "peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0";
|
|
@@ -2919,12 +3089,12 @@ var SIDEBAR_MENU = "flex w-full min-w-0 flex-col gap-1";
|
|
|
2919
3089
|
var SIDEBAR_MENU_ITEM = "group/menu-item relative";
|
|
2920
3090
|
|
|
2921
3091
|
// src/components/sidebar.tsx
|
|
2922
|
-
import { jsx as
|
|
3092
|
+
import { jsx as jsx37, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
2923
3093
|
var SIDEBAR_WIDTH = "16rem";
|
|
2924
3094
|
var SIDEBAR_WIDTH_ICON = "3rem";
|
|
2925
|
-
var SidebarContext =
|
|
3095
|
+
var SidebarContext = React46.createContext(null);
|
|
2926
3096
|
function useSidebar() {
|
|
2927
|
-
const ctx =
|
|
3097
|
+
const ctx = React46.useContext(SidebarContext);
|
|
2928
3098
|
if (!ctx) throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
2929
3099
|
return ctx;
|
|
2930
3100
|
}
|
|
@@ -2942,16 +3112,16 @@ function SidebarProvider({
|
|
|
2942
3112
|
defaultValue: defaultOpen,
|
|
2943
3113
|
...onOpenChange ? { onChange: onOpenChange } : {}
|
|
2944
3114
|
});
|
|
2945
|
-
const toggleSidebar =
|
|
3115
|
+
const toggleSidebar = React46.useCallback(
|
|
2946
3116
|
() => setOpen(!open),
|
|
2947
3117
|
[open, setOpen]
|
|
2948
3118
|
);
|
|
2949
3119
|
const state = open ? "expanded" : "collapsed";
|
|
2950
|
-
const contextValue =
|
|
3120
|
+
const contextValue = React46.useMemo(
|
|
2951
3121
|
() => ({ state, open, setOpen, toggleSidebar }),
|
|
2952
3122
|
[state, open, setOpen, toggleSidebar]
|
|
2953
3123
|
);
|
|
2954
|
-
return /* @__PURE__ */
|
|
3124
|
+
return /* @__PURE__ */ jsx37(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx37(
|
|
2955
3125
|
"div",
|
|
2956
3126
|
{
|
|
2957
3127
|
"data-slot": "sidebar-wrapper",
|
|
@@ -2976,7 +3146,7 @@ function Sidebar({
|
|
|
2976
3146
|
}) {
|
|
2977
3147
|
const { state } = useSidebar();
|
|
2978
3148
|
if (collapsible === "none") {
|
|
2979
|
-
return /* @__PURE__ */
|
|
3149
|
+
return /* @__PURE__ */ jsx37(
|
|
2980
3150
|
"div",
|
|
2981
3151
|
{
|
|
2982
3152
|
"data-slot": "sidebar",
|
|
@@ -2986,7 +3156,7 @@ function Sidebar({
|
|
|
2986
3156
|
}
|
|
2987
3157
|
);
|
|
2988
3158
|
}
|
|
2989
|
-
return /* @__PURE__ */
|
|
3159
|
+
return /* @__PURE__ */ jsx37(
|
|
2990
3160
|
"div",
|
|
2991
3161
|
{
|
|
2992
3162
|
className: "group peer text-sidebar-foreground hidden md:block",
|
|
@@ -2995,7 +3165,7 @@ function Sidebar({
|
|
|
2995
3165
|
"data-variant": variant,
|
|
2996
3166
|
"data-side": side,
|
|
2997
3167
|
"data-slot": "sidebar",
|
|
2998
|
-
children: /* @__PURE__ */
|
|
3168
|
+
children: /* @__PURE__ */ jsx37(
|
|
2999
3169
|
"div",
|
|
3000
3170
|
{
|
|
3001
3171
|
"data-slot": "sidebar-inner",
|
|
@@ -3014,7 +3184,7 @@ function SidebarTrigger({
|
|
|
3014
3184
|
...props
|
|
3015
3185
|
}) {
|
|
3016
3186
|
const { toggleSidebar } = useSidebar();
|
|
3017
|
-
return /* @__PURE__ */
|
|
3187
|
+
return /* @__PURE__ */ jsxs10(
|
|
3018
3188
|
"button",
|
|
3019
3189
|
{
|
|
3020
3190
|
type: "button",
|
|
@@ -3029,7 +3199,7 @@ function SidebarTrigger({
|
|
|
3029
3199
|
...props,
|
|
3030
3200
|
children: [
|
|
3031
3201
|
children,
|
|
3032
|
-
/* @__PURE__ */
|
|
3202
|
+
/* @__PURE__ */ jsx37("span", { className: "sr-only", children: "Toggle Sidebar" })
|
|
3033
3203
|
]
|
|
3034
3204
|
}
|
|
3035
3205
|
);
|
|
@@ -3039,7 +3209,7 @@ function SidebarRail({
|
|
|
3039
3209
|
...props
|
|
3040
3210
|
}) {
|
|
3041
3211
|
const { toggleSidebar } = useSidebar();
|
|
3042
|
-
return /* @__PURE__ */
|
|
3212
|
+
return /* @__PURE__ */ jsx37(
|
|
3043
3213
|
"button",
|
|
3044
3214
|
{
|
|
3045
3215
|
type: "button",
|
|
@@ -3055,7 +3225,7 @@ function SidebarRail({
|
|
|
3055
3225
|
);
|
|
3056
3226
|
}
|
|
3057
3227
|
function SidebarInset({ className, ...props }) {
|
|
3058
|
-
return /* @__PURE__ */
|
|
3228
|
+
return /* @__PURE__ */ jsx37(
|
|
3059
3229
|
"main",
|
|
3060
3230
|
{
|
|
3061
3231
|
"data-slot": "sidebar-inset",
|
|
@@ -3065,7 +3235,7 @@ function SidebarInset({ className, ...props }) {
|
|
|
3065
3235
|
);
|
|
3066
3236
|
}
|
|
3067
3237
|
function SidebarHeader({ className, ...props }) {
|
|
3068
|
-
return /* @__PURE__ */
|
|
3238
|
+
return /* @__PURE__ */ jsx37(
|
|
3069
3239
|
"div",
|
|
3070
3240
|
{
|
|
3071
3241
|
"data-slot": "sidebar-header",
|
|
@@ -3076,7 +3246,7 @@ function SidebarHeader({ className, ...props }) {
|
|
|
3076
3246
|
);
|
|
3077
3247
|
}
|
|
3078
3248
|
function SidebarFooter({ className, ...props }) {
|
|
3079
|
-
return /* @__PURE__ */
|
|
3249
|
+
return /* @__PURE__ */ jsx37(
|
|
3080
3250
|
"div",
|
|
3081
3251
|
{
|
|
3082
3252
|
"data-slot": "sidebar-footer",
|
|
@@ -3090,7 +3260,7 @@ function SidebarSeparator({
|
|
|
3090
3260
|
className,
|
|
3091
3261
|
...props
|
|
3092
3262
|
}) {
|
|
3093
|
-
return /* @__PURE__ */
|
|
3263
|
+
return /* @__PURE__ */ jsx37(
|
|
3094
3264
|
"div",
|
|
3095
3265
|
{
|
|
3096
3266
|
"data-slot": "sidebar-separator",
|
|
@@ -3102,7 +3272,7 @@ function SidebarSeparator({
|
|
|
3102
3272
|
);
|
|
3103
3273
|
}
|
|
3104
3274
|
function SidebarContent({ className, ...props }) {
|
|
3105
|
-
return /* @__PURE__ */
|
|
3275
|
+
return /* @__PURE__ */ jsx37(
|
|
3106
3276
|
"div",
|
|
3107
3277
|
{
|
|
3108
3278
|
"data-slot": "sidebar-content",
|
|
@@ -3113,7 +3283,7 @@ function SidebarContent({ className, ...props }) {
|
|
|
3113
3283
|
);
|
|
3114
3284
|
}
|
|
3115
3285
|
function SidebarGroup({ className, ...props }) {
|
|
3116
|
-
return /* @__PURE__ */
|
|
3286
|
+
return /* @__PURE__ */ jsx37(
|
|
3117
3287
|
"div",
|
|
3118
3288
|
{
|
|
3119
3289
|
"data-slot": "sidebar-group",
|
|
@@ -3129,7 +3299,7 @@ function SidebarGroupLabel({
|
|
|
3129
3299
|
...props
|
|
3130
3300
|
}) {
|
|
3131
3301
|
const Comp = asChild ? Slot : "div";
|
|
3132
|
-
return /* @__PURE__ */
|
|
3302
|
+
return /* @__PURE__ */ jsx37(
|
|
3133
3303
|
Comp,
|
|
3134
3304
|
{
|
|
3135
3305
|
"data-slot": "sidebar-group-label",
|
|
@@ -3143,7 +3313,7 @@ function SidebarGroupContent({
|
|
|
3143
3313
|
className,
|
|
3144
3314
|
...props
|
|
3145
3315
|
}) {
|
|
3146
|
-
return /* @__PURE__ */
|
|
3316
|
+
return /* @__PURE__ */ jsx37(
|
|
3147
3317
|
"div",
|
|
3148
3318
|
{
|
|
3149
3319
|
"data-slot": "sidebar-group-content",
|
|
@@ -3154,7 +3324,7 @@ function SidebarGroupContent({
|
|
|
3154
3324
|
);
|
|
3155
3325
|
}
|
|
3156
3326
|
function SidebarMenu({ className, ...props }) {
|
|
3157
|
-
return /* @__PURE__ */
|
|
3327
|
+
return /* @__PURE__ */ jsx37(
|
|
3158
3328
|
"ul",
|
|
3159
3329
|
{
|
|
3160
3330
|
"data-slot": "sidebar-menu",
|
|
@@ -3165,7 +3335,7 @@ function SidebarMenu({ className, ...props }) {
|
|
|
3165
3335
|
);
|
|
3166
3336
|
}
|
|
3167
3337
|
function SidebarMenuItem({ className, ...props }) {
|
|
3168
|
-
return /* @__PURE__ */
|
|
3338
|
+
return /* @__PURE__ */ jsx37(
|
|
3169
3339
|
"li",
|
|
3170
3340
|
{
|
|
3171
3341
|
"data-slot": "sidebar-menu-item",
|
|
@@ -3184,7 +3354,7 @@ function SidebarMenuButton({
|
|
|
3184
3354
|
...props
|
|
3185
3355
|
}) {
|
|
3186
3356
|
const Comp = asChild ? Slot : "button";
|
|
3187
|
-
return /* @__PURE__ */
|
|
3357
|
+
return /* @__PURE__ */ jsx37(
|
|
3188
3358
|
Comp,
|
|
3189
3359
|
{
|
|
3190
3360
|
"data-slot": "sidebar-menu-button",
|
|
@@ -3203,7 +3373,7 @@ function SidebarMenuButton({
|
|
|
3203
3373
|
}
|
|
3204
3374
|
|
|
3205
3375
|
// src/components/carousel.tsx
|
|
3206
|
-
import * as
|
|
3376
|
+
import * as React47 from "react";
|
|
3207
3377
|
|
|
3208
3378
|
// src/generated/carousel.ts
|
|
3209
3379
|
var CAROUSEL_CONTENT_VIEWPORT = "overflow-hidden";
|
|
@@ -3222,10 +3392,10 @@ var CAROUSEL_EDGE_FADE_PREV = "pointer-events-none absolute inset-y-0 left-0 w-2
|
|
|
3222
3392
|
var CAROUSEL_EDGE_FADE_NEXT = "pointer-events-none absolute inset-y-0 right-0 w-20 bg-gradient-to-l from-background via-background/60 to-transparent transition-opacity duration-300";
|
|
3223
3393
|
|
|
3224
3394
|
// src/components/carousel.tsx
|
|
3225
|
-
import { Fragment as Fragment3, jsx as
|
|
3226
|
-
var CarouselContext =
|
|
3395
|
+
import { Fragment as Fragment3, jsx as jsx38, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
3396
|
+
var CarouselContext = React47.createContext(null);
|
|
3227
3397
|
function useCarousel() {
|
|
3228
|
-
const context =
|
|
3398
|
+
const context = React47.useContext(CarouselContext);
|
|
3229
3399
|
if (!context) {
|
|
3230
3400
|
throw new Error("useCarousel must be used within a <Carousel />");
|
|
3231
3401
|
}
|
|
@@ -3246,13 +3416,13 @@ function Carousel({
|
|
|
3246
3416
|
defaultValue: defaultIndex,
|
|
3247
3417
|
onChange: onIndexChange
|
|
3248
3418
|
});
|
|
3249
|
-
const [count, setCount] =
|
|
3419
|
+
const [count, setCount] = React47.useState(0);
|
|
3250
3420
|
const canScrollPrev = index > 0;
|
|
3251
3421
|
const canScrollNext = index < count - 1;
|
|
3252
|
-
const scrollPrev =
|
|
3422
|
+
const scrollPrev = React47.useCallback(() => {
|
|
3253
3423
|
if (index > 0) setIndex(index - 1);
|
|
3254
3424
|
}, [index, setIndex]);
|
|
3255
|
-
const scrollNext =
|
|
3425
|
+
const scrollNext = React47.useCallback(() => {
|
|
3256
3426
|
if (index < count - 1) setIndex(index + 1);
|
|
3257
3427
|
}, [index, count, setIndex]);
|
|
3258
3428
|
const handleKeyDown = (event) => {
|
|
@@ -3265,7 +3435,7 @@ function Carousel({
|
|
|
3265
3435
|
}
|
|
3266
3436
|
onKeyDown?.(event);
|
|
3267
3437
|
};
|
|
3268
|
-
return /* @__PURE__ */
|
|
3438
|
+
return /* @__PURE__ */ jsx38(
|
|
3269
3439
|
CarouselContext.Provider,
|
|
3270
3440
|
{
|
|
3271
3441
|
value: {
|
|
@@ -3278,7 +3448,7 @@ function Carousel({
|
|
|
3278
3448
|
canScrollPrev,
|
|
3279
3449
|
canScrollNext
|
|
3280
3450
|
},
|
|
3281
|
-
children: /* @__PURE__ */
|
|
3451
|
+
children: /* @__PURE__ */ jsx38(
|
|
3282
3452
|
"div",
|
|
3283
3453
|
{
|
|
3284
3454
|
onKeyDownCapture: handleKeyDown,
|
|
@@ -3300,12 +3470,12 @@ function CarouselContent({
|
|
|
3300
3470
|
...props
|
|
3301
3471
|
}) {
|
|
3302
3472
|
const { orientation, index, setCount } = useCarousel();
|
|
3303
|
-
const childCount =
|
|
3304
|
-
|
|
3473
|
+
const childCount = React47.Children.count(children);
|
|
3474
|
+
React47.useEffect(() => {
|
|
3305
3475
|
setCount(childCount);
|
|
3306
3476
|
}, [childCount, setCount]);
|
|
3307
3477
|
const transform = orientation === "horizontal" ? `translate3d(-${index * 100}%, 0, 0)` : `translate3d(0, -${index * 100}%, 0)`;
|
|
3308
|
-
return /* @__PURE__ */
|
|
3478
|
+
return /* @__PURE__ */ jsx38("div", { className: CAROUSEL_CONTENT_VIEWPORT, "data-slot": "carousel-content", children: /* @__PURE__ */ jsx38(
|
|
3309
3479
|
"div",
|
|
3310
3480
|
{
|
|
3311
3481
|
className: cn(
|
|
@@ -3324,7 +3494,7 @@ function CarouselItem({
|
|
|
3324
3494
|
...props
|
|
3325
3495
|
}) {
|
|
3326
3496
|
const { orientation } = useCarousel();
|
|
3327
|
-
return /* @__PURE__ */
|
|
3497
|
+
return /* @__PURE__ */ jsx38(
|
|
3328
3498
|
"div",
|
|
3329
3499
|
{
|
|
3330
3500
|
role: "group",
|
|
@@ -3343,8 +3513,8 @@ function CarouselEdgeFade({
|
|
|
3343
3513
|
className
|
|
3344
3514
|
}) {
|
|
3345
3515
|
const { canScrollPrev, canScrollNext } = useCarousel();
|
|
3346
|
-
return /* @__PURE__ */
|
|
3347
|
-
/* @__PURE__ */
|
|
3516
|
+
return /* @__PURE__ */ jsxs11(Fragment3, { children: [
|
|
3517
|
+
/* @__PURE__ */ jsx38(
|
|
3348
3518
|
"div",
|
|
3349
3519
|
{
|
|
3350
3520
|
"aria-hidden": true,
|
|
@@ -3355,7 +3525,7 @@ function CarouselEdgeFade({
|
|
|
3355
3525
|
)
|
|
3356
3526
|
}
|
|
3357
3527
|
),
|
|
3358
|
-
/* @__PURE__ */
|
|
3528
|
+
/* @__PURE__ */ jsx38(
|
|
3359
3529
|
"div",
|
|
3360
3530
|
{
|
|
3361
3531
|
"aria-hidden": true,
|
|
@@ -3375,7 +3545,7 @@ function CarouselPrevious({
|
|
|
3375
3545
|
...props
|
|
3376
3546
|
}) {
|
|
3377
3547
|
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
3378
|
-
return /* @__PURE__ */
|
|
3548
|
+
return /* @__PURE__ */ jsxs11(
|
|
3379
3549
|
Button,
|
|
3380
3550
|
{
|
|
3381
3551
|
"data-slot": "carousel-previous",
|
|
@@ -3390,7 +3560,7 @@ function CarouselPrevious({
|
|
|
3390
3560
|
onClick: scrollPrev,
|
|
3391
3561
|
...props,
|
|
3392
3562
|
children: [
|
|
3393
|
-
/* @__PURE__ */
|
|
3563
|
+
/* @__PURE__ */ jsx38(
|
|
3394
3564
|
"svg",
|
|
3395
3565
|
{
|
|
3396
3566
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3401,10 +3571,10 @@ function CarouselPrevious({
|
|
|
3401
3571
|
strokeLinecap: "round",
|
|
3402
3572
|
strokeLinejoin: "round",
|
|
3403
3573
|
"aria-hidden": "true",
|
|
3404
|
-
children: /* @__PURE__ */
|
|
3574
|
+
children: /* @__PURE__ */ jsx38("path", { d: "m15 18-6-6 6-6" })
|
|
3405
3575
|
}
|
|
3406
3576
|
),
|
|
3407
|
-
/* @__PURE__ */
|
|
3577
|
+
/* @__PURE__ */ jsx38("span", { className: "sr-only", children: "Previous slide" })
|
|
3408
3578
|
]
|
|
3409
3579
|
}
|
|
3410
3580
|
);
|
|
@@ -3416,7 +3586,7 @@ function CarouselNext({
|
|
|
3416
3586
|
...props
|
|
3417
3587
|
}) {
|
|
3418
3588
|
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
3419
|
-
return /* @__PURE__ */
|
|
3589
|
+
return /* @__PURE__ */ jsxs11(
|
|
3420
3590
|
Button,
|
|
3421
3591
|
{
|
|
3422
3592
|
"data-slot": "carousel-next",
|
|
@@ -3431,7 +3601,7 @@ function CarouselNext({
|
|
|
3431
3601
|
onClick: scrollNext,
|
|
3432
3602
|
...props,
|
|
3433
3603
|
children: [
|
|
3434
|
-
/* @__PURE__ */
|
|
3604
|
+
/* @__PURE__ */ jsx38(
|
|
3435
3605
|
"svg",
|
|
3436
3606
|
{
|
|
3437
3607
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3442,17 +3612,17 @@ function CarouselNext({
|
|
|
3442
3612
|
strokeLinecap: "round",
|
|
3443
3613
|
strokeLinejoin: "round",
|
|
3444
3614
|
"aria-hidden": "true",
|
|
3445
|
-
children: /* @__PURE__ */
|
|
3615
|
+
children: /* @__PURE__ */ jsx38("path", { d: "m9 18 6-6-6-6" })
|
|
3446
3616
|
}
|
|
3447
3617
|
),
|
|
3448
|
-
/* @__PURE__ */
|
|
3618
|
+
/* @__PURE__ */ jsx38("span", { className: "sr-only", children: "Next slide" })
|
|
3449
3619
|
]
|
|
3450
3620
|
}
|
|
3451
3621
|
);
|
|
3452
3622
|
}
|
|
3453
3623
|
|
|
3454
3624
|
// src/components/input-otp.tsx
|
|
3455
|
-
import * as
|
|
3625
|
+
import * as React48 from "react";
|
|
3456
3626
|
|
|
3457
3627
|
// src/generated/input-otp.ts
|
|
3458
3628
|
var INPUT_OTP_CONTAINER = "relative flex items-center gap-2 has-disabled:opacity-50";
|
|
@@ -3463,10 +3633,10 @@ var INPUT_OTP_SLOT_CARET_WRAPPER = "pointer-events-none absolute inset-0 flex it
|
|
|
3463
3633
|
var INPUT_OTP_SLOT_CARET = "animate-caret-blink bg-foreground h-4 w-px duration-1000";
|
|
3464
3634
|
|
|
3465
3635
|
// src/components/input-otp.tsx
|
|
3466
|
-
import { jsx as
|
|
3467
|
-
var InputOTPContext =
|
|
3636
|
+
import { jsx as jsx39, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
3637
|
+
var InputOTPContext = React48.createContext(null);
|
|
3468
3638
|
function useInputOTP() {
|
|
3469
|
-
const context =
|
|
3639
|
+
const context = React48.useContext(InputOTPContext);
|
|
3470
3640
|
if (!context) {
|
|
3471
3641
|
throw new Error("InputOTP slots must be used within an <InputOTP />");
|
|
3472
3642
|
}
|
|
@@ -3488,16 +3658,16 @@ function InputOTP({
|
|
|
3488
3658
|
defaultValue,
|
|
3489
3659
|
onChange
|
|
3490
3660
|
});
|
|
3491
|
-
const [focused, setFocused] =
|
|
3661
|
+
const [focused, setFocused] = React48.useState(false);
|
|
3492
3662
|
const activeIndex = focused ? Math.min(value.length, maxLength - 1) : -1;
|
|
3493
|
-
return /* @__PURE__ */
|
|
3663
|
+
return /* @__PURE__ */ jsx39(InputOTPContext.Provider, { value: { value, maxLength, activeIndex }, children: /* @__PURE__ */ jsxs12(
|
|
3494
3664
|
"div",
|
|
3495
3665
|
{
|
|
3496
3666
|
"data-slot": "input-otp",
|
|
3497
3667
|
className: cn(INPUT_OTP_CONTAINER, containerClassName),
|
|
3498
3668
|
children: [
|
|
3499
3669
|
children,
|
|
3500
|
-
/* @__PURE__ */
|
|
3670
|
+
/* @__PURE__ */ jsx39(
|
|
3501
3671
|
"input",
|
|
3502
3672
|
{
|
|
3503
3673
|
inputMode: "numeric",
|
|
@@ -3520,7 +3690,7 @@ function InputOTPGroup({
|
|
|
3520
3690
|
className,
|
|
3521
3691
|
...props
|
|
3522
3692
|
}) {
|
|
3523
|
-
return /* @__PURE__ */
|
|
3693
|
+
return /* @__PURE__ */ jsx39(
|
|
3524
3694
|
"div",
|
|
3525
3695
|
{
|
|
3526
3696
|
"data-slot": "input-otp-group",
|
|
@@ -3534,7 +3704,7 @@ function InputOTPSlot({ index, className, ...props }) {
|
|
|
3534
3704
|
const char = value[index];
|
|
3535
3705
|
const isActive = activeIndex === index;
|
|
3536
3706
|
const hasFakeCaret = isActive && char === void 0;
|
|
3537
|
-
return /* @__PURE__ */
|
|
3707
|
+
return /* @__PURE__ */ jsxs12(
|
|
3538
3708
|
"div",
|
|
3539
3709
|
{
|
|
3540
3710
|
"data-slot": "input-otp-slot",
|
|
@@ -3543,13 +3713,13 @@ function InputOTPSlot({ index, className, ...props }) {
|
|
|
3543
3713
|
...props,
|
|
3544
3714
|
children: [
|
|
3545
3715
|
char,
|
|
3546
|
-
hasFakeCaret && /* @__PURE__ */
|
|
3716
|
+
hasFakeCaret && /* @__PURE__ */ jsx39("div", { className: INPUT_OTP_SLOT_CARET_WRAPPER, children: /* @__PURE__ */ jsx39("div", { className: INPUT_OTP_SLOT_CARET }) })
|
|
3547
3717
|
]
|
|
3548
3718
|
}
|
|
3549
3719
|
);
|
|
3550
3720
|
}
|
|
3551
3721
|
function InputOTPSeparator({ ...props }) {
|
|
3552
|
-
return /* @__PURE__ */
|
|
3722
|
+
return /* @__PURE__ */ jsx39("div", { "data-slot": "input-otp-separator", role: "separator", ...props, children: /* @__PURE__ */ jsx39(
|
|
3553
3723
|
"svg",
|
|
3554
3724
|
{
|
|
3555
3725
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3560,27 +3730,27 @@ function InputOTPSeparator({ ...props }) {
|
|
|
3560
3730
|
strokeLinecap: "round",
|
|
3561
3731
|
strokeLinejoin: "round",
|
|
3562
3732
|
"aria-hidden": "true",
|
|
3563
|
-
children: /* @__PURE__ */
|
|
3733
|
+
children: /* @__PURE__ */ jsx39("path", { d: "M5 12h14" })
|
|
3564
3734
|
}
|
|
3565
3735
|
) });
|
|
3566
3736
|
}
|
|
3567
3737
|
|
|
3568
3738
|
// src/components/tooltip.tsx
|
|
3569
|
-
import * as
|
|
3739
|
+
import * as React49 from "react";
|
|
3570
3740
|
|
|
3571
3741
|
// src/generated/tooltip.ts
|
|
3572
3742
|
var TOOLTIP_CONTENT = "bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit rounded-md px-3 py-1.5 text-xs text-balance";
|
|
3573
3743
|
|
|
3574
3744
|
// src/components/tooltip.tsx
|
|
3575
|
-
import { Fragment as Fragment4, jsx as
|
|
3576
|
-
var TooltipContext =
|
|
3745
|
+
import { Fragment as Fragment4, jsx as jsx40 } from "react/jsx-runtime";
|
|
3746
|
+
var TooltipContext = React49.createContext(null);
|
|
3577
3747
|
function useTooltip() {
|
|
3578
|
-
const ctx =
|
|
3748
|
+
const ctx = React49.useContext(TooltipContext);
|
|
3579
3749
|
if (!ctx) throw new Error("Tooltip parts must be used within <Tooltip>");
|
|
3580
3750
|
return ctx;
|
|
3581
3751
|
}
|
|
3582
3752
|
function TooltipProvider({ children }) {
|
|
3583
|
-
return /* @__PURE__ */
|
|
3753
|
+
return /* @__PURE__ */ jsx40(Fragment4, { children });
|
|
3584
3754
|
}
|
|
3585
3755
|
function Tooltip({ open, defaultOpen = false, onOpenChange, children }) {
|
|
3586
3756
|
const [isOpen, setOpen] = useControllableState({
|
|
@@ -3588,8 +3758,8 @@ function Tooltip({ open, defaultOpen = false, onOpenChange, children }) {
|
|
|
3588
3758
|
defaultValue: defaultOpen,
|
|
3589
3759
|
...onOpenChange ? { onChange: onOpenChange } : {}
|
|
3590
3760
|
});
|
|
3591
|
-
const anchorRef =
|
|
3592
|
-
return /* @__PURE__ */
|
|
3761
|
+
const anchorRef = React49.useRef(null);
|
|
3762
|
+
return /* @__PURE__ */ jsx40(TooltipProvider, { children: /* @__PURE__ */ jsx40(TooltipContext.Provider, { value: { open: isOpen, setOpen, anchorRef }, children }) });
|
|
3593
3763
|
}
|
|
3594
3764
|
function TooltipTrigger({
|
|
3595
3765
|
asChild = false,
|
|
@@ -3601,7 +3771,7 @@ function TooltipTrigger({
|
|
|
3601
3771
|
}) {
|
|
3602
3772
|
const { setOpen, anchorRef } = useTooltip();
|
|
3603
3773
|
const Comp = asChild ? Slot : "button";
|
|
3604
|
-
return /* @__PURE__ */
|
|
3774
|
+
return /* @__PURE__ */ jsx40(
|
|
3605
3775
|
Comp,
|
|
3606
3776
|
{
|
|
3607
3777
|
"data-slot": "tooltip-trigger",
|
|
@@ -3642,7 +3812,7 @@ function TooltipContent({
|
|
|
3642
3812
|
offset: sideOffset
|
|
3643
3813
|
});
|
|
3644
3814
|
if (!isPresent) return null;
|
|
3645
|
-
return /* @__PURE__ */
|
|
3815
|
+
return /* @__PURE__ */ jsx40(Portal, { children: /* @__PURE__ */ jsx40(
|
|
3646
3816
|
"div",
|
|
3647
3817
|
{
|
|
3648
3818
|
"data-slot": "tooltip-content",
|
|
@@ -3659,16 +3829,16 @@ function TooltipContent({
|
|
|
3659
3829
|
}
|
|
3660
3830
|
|
|
3661
3831
|
// src/components/popover.tsx
|
|
3662
|
-
import * as
|
|
3832
|
+
import * as React50 from "react";
|
|
3663
3833
|
|
|
3664
3834
|
// src/generated/popover.ts
|
|
3665
3835
|
var POPOVER_CONTENT = "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 rounded-md border p-4 shadow-md outline-hidden";
|
|
3666
3836
|
|
|
3667
3837
|
// src/components/popover.tsx
|
|
3668
|
-
import { jsx as
|
|
3669
|
-
var PopoverContext =
|
|
3838
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
3839
|
+
var PopoverContext = React50.createContext(null);
|
|
3670
3840
|
function usePopover() {
|
|
3671
|
-
const ctx =
|
|
3841
|
+
const ctx = React50.useContext(PopoverContext);
|
|
3672
3842
|
if (!ctx) throw new Error("Popover parts must be used within <Popover>");
|
|
3673
3843
|
return ctx;
|
|
3674
3844
|
}
|
|
@@ -3678,13 +3848,13 @@ function Popover({ open, defaultOpen = false, onOpenChange, children }) {
|
|
|
3678
3848
|
defaultValue: defaultOpen,
|
|
3679
3849
|
...onOpenChange ? { onChange: onOpenChange } : {}
|
|
3680
3850
|
});
|
|
3681
|
-
const anchorRef =
|
|
3682
|
-
return /* @__PURE__ */
|
|
3851
|
+
const anchorRef = React50.useRef(null);
|
|
3852
|
+
return /* @__PURE__ */ jsx41(PopoverContext.Provider, { value: { open: isOpen, setOpen, anchorRef }, children });
|
|
3683
3853
|
}
|
|
3684
3854
|
function PopoverTrigger({ asChild = false, onClick, ...props }) {
|
|
3685
3855
|
const { open, setOpen, anchorRef } = usePopover();
|
|
3686
3856
|
const Comp = asChild ? Slot : "button";
|
|
3687
|
-
return /* @__PURE__ */
|
|
3857
|
+
return /* @__PURE__ */ jsx41(
|
|
3688
3858
|
Comp,
|
|
3689
3859
|
{
|
|
3690
3860
|
"data-slot": "popover-trigger",
|
|
@@ -3701,7 +3871,7 @@ function PopoverTrigger({ asChild = false, onClick, ...props }) {
|
|
|
3701
3871
|
function PopoverAnchor({ asChild = false, ...props }) {
|
|
3702
3872
|
const { anchorRef } = usePopover();
|
|
3703
3873
|
const Comp = asChild ? Slot : "div";
|
|
3704
|
-
return /* @__PURE__ */
|
|
3874
|
+
return /* @__PURE__ */ jsx41(
|
|
3705
3875
|
Comp,
|
|
3706
3876
|
{
|
|
3707
3877
|
"data-slot": "popover-anchor",
|
|
@@ -3733,7 +3903,7 @@ function PopoverContent({
|
|
|
3733
3903
|
exclude: [anchorRef]
|
|
3734
3904
|
});
|
|
3735
3905
|
if (!isPresent) return null;
|
|
3736
|
-
return /* @__PURE__ */
|
|
3906
|
+
return /* @__PURE__ */ jsx41(Portal, { children: /* @__PURE__ */ jsx41(
|
|
3737
3907
|
"div",
|
|
3738
3908
|
{
|
|
3739
3909
|
"data-slot": "popover-content",
|
|
@@ -3753,16 +3923,16 @@ function PopoverContent({
|
|
|
3753
3923
|
}
|
|
3754
3924
|
|
|
3755
3925
|
// src/components/hover-card.tsx
|
|
3756
|
-
import * as
|
|
3926
|
+
import * as React51 from "react";
|
|
3757
3927
|
|
|
3758
3928
|
// src/generated/hover-card.ts
|
|
3759
3929
|
var HOVER_CARD_CONTENT = "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 rounded-md border p-4 shadow-md outline-hidden";
|
|
3760
3930
|
|
|
3761
3931
|
// src/components/hover-card.tsx
|
|
3762
|
-
import { jsx as
|
|
3763
|
-
var HoverCardContext =
|
|
3932
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
3933
|
+
var HoverCardContext = React51.createContext(null);
|
|
3764
3934
|
function useHoverCard() {
|
|
3765
|
-
const ctx =
|
|
3935
|
+
const ctx = React51.useContext(HoverCardContext);
|
|
3766
3936
|
if (!ctx) throw new Error("HoverCard parts must be used within <HoverCard>");
|
|
3767
3937
|
return ctx;
|
|
3768
3938
|
}
|
|
@@ -3772,8 +3942,8 @@ function HoverCard({ open, defaultOpen = false, onOpenChange, children }) {
|
|
|
3772
3942
|
defaultValue: defaultOpen,
|
|
3773
3943
|
...onOpenChange ? { onChange: onOpenChange } : {}
|
|
3774
3944
|
});
|
|
3775
|
-
const anchorRef =
|
|
3776
|
-
return /* @__PURE__ */
|
|
3945
|
+
const anchorRef = React51.useRef(null);
|
|
3946
|
+
return /* @__PURE__ */ jsx42(HoverCardContext.Provider, { value: { open: isOpen, setOpen, anchorRef }, children });
|
|
3777
3947
|
}
|
|
3778
3948
|
function HoverCardTrigger({
|
|
3779
3949
|
asChild = false,
|
|
@@ -3783,7 +3953,7 @@ function HoverCardTrigger({
|
|
|
3783
3953
|
}) {
|
|
3784
3954
|
const { setOpen, anchorRef } = useHoverCard();
|
|
3785
3955
|
const Comp = asChild ? Slot : "a";
|
|
3786
|
-
return /* @__PURE__ */
|
|
3956
|
+
return /* @__PURE__ */ jsx42(
|
|
3787
3957
|
Comp,
|
|
3788
3958
|
{
|
|
3789
3959
|
"data-slot": "hover-card-trigger",
|
|
@@ -3818,7 +3988,7 @@ function HoverCardContent({
|
|
|
3818
3988
|
offset: sideOffset
|
|
3819
3989
|
});
|
|
3820
3990
|
if (!isPresent) return null;
|
|
3821
|
-
return /* @__PURE__ */
|
|
3991
|
+
return /* @__PURE__ */ jsx42(Portal, { children: /* @__PURE__ */ jsx42(
|
|
3822
3992
|
"div",
|
|
3823
3993
|
{
|
|
3824
3994
|
"data-slot": "hover-card-content",
|
|
@@ -3835,7 +4005,7 @@ function HoverCardContent({
|
|
|
3835
4005
|
}
|
|
3836
4006
|
|
|
3837
4007
|
// src/components/dropdown-menu.tsx
|
|
3838
|
-
import * as
|
|
4008
|
+
import * as React52 from "react";
|
|
3839
4009
|
|
|
3840
4010
|
// src/generated/dropdown-menu.ts
|
|
3841
4011
|
var DROPDOWN_MENU_CONTENT = "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md";
|
|
@@ -3849,12 +4019,12 @@ var DROPDOWN_MENU_SEPARATOR = "bg-border -mx-1 my-1 h-px";
|
|
|
3849
4019
|
var DROPDOWN_MENU_SHORTCUT = "text-muted-foreground ml-auto text-xs tracking-widest";
|
|
3850
4020
|
|
|
3851
4021
|
// src/components/dropdown-menu.tsx
|
|
3852
|
-
import { jsx as
|
|
3853
|
-
var DropdownMenuContext =
|
|
4022
|
+
import { jsx as jsx43, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
4023
|
+
var DropdownMenuContext = React52.createContext(
|
|
3854
4024
|
null
|
|
3855
4025
|
);
|
|
3856
4026
|
function useDropdownMenu() {
|
|
3857
|
-
const ctx =
|
|
4027
|
+
const ctx = React52.useContext(DropdownMenuContext);
|
|
3858
4028
|
if (!ctx) throw new Error("DropdownMenu parts must be used within <DropdownMenu>");
|
|
3859
4029
|
return ctx;
|
|
3860
4030
|
}
|
|
@@ -3864,16 +4034,16 @@ function DropdownMenu({ open, defaultOpen = false, onOpenChange, children }) {
|
|
|
3864
4034
|
defaultValue: defaultOpen,
|
|
3865
4035
|
...onOpenChange ? { onChange: onOpenChange } : {}
|
|
3866
4036
|
});
|
|
3867
|
-
const anchorRef =
|
|
3868
|
-
return /* @__PURE__ */
|
|
4037
|
+
const anchorRef = React52.useRef(null);
|
|
4038
|
+
return /* @__PURE__ */ jsx43(DropdownMenuContext.Provider, { value: { open: isOpen, setOpen, anchorRef }, children: /* @__PURE__ */ jsx43("div", { "data-slot": "dropdown-menu", children }) });
|
|
3869
4039
|
}
|
|
3870
4040
|
function DropdownMenuPortal({ children }) {
|
|
3871
|
-
return /* @__PURE__ */
|
|
4041
|
+
return /* @__PURE__ */ jsx43(Portal, { children });
|
|
3872
4042
|
}
|
|
3873
4043
|
function DropdownMenuTrigger({ asChild = false, onClick, ...props }) {
|
|
3874
4044
|
const { open, setOpen, anchorRef } = useDropdownMenu();
|
|
3875
4045
|
const Comp = asChild ? Slot : "button";
|
|
3876
|
-
return /* @__PURE__ */
|
|
4046
|
+
return /* @__PURE__ */ jsx43(
|
|
3877
4047
|
Comp,
|
|
3878
4048
|
{
|
|
3879
4049
|
"data-slot": "dropdown-menu-trigger",
|
|
@@ -3909,7 +4079,7 @@ function DropdownMenuContent({
|
|
|
3909
4079
|
onDismiss: () => setOpen(false),
|
|
3910
4080
|
exclude: [anchorRef]
|
|
3911
4081
|
});
|
|
3912
|
-
const contentRef =
|
|
4082
|
+
const contentRef = React52.useRef(null);
|
|
3913
4083
|
const items = () => Array.from(
|
|
3914
4084
|
contentRef.current?.querySelectorAll("[role^='menuitem']") ?? []
|
|
3915
4085
|
).filter((el) => el.getAttribute("data-disabled") === null);
|
|
@@ -3918,13 +4088,13 @@ function DropdownMenuContent({
|
|
|
3918
4088
|
orientation: "vertical",
|
|
3919
4089
|
loop: true
|
|
3920
4090
|
});
|
|
3921
|
-
|
|
4091
|
+
React52.useEffect(() => {
|
|
3922
4092
|
if (!open) return;
|
|
3923
4093
|
items()[activeIndex]?.focus();
|
|
3924
4094
|
}, [open, activeIndex]);
|
|
3925
|
-
const close =
|
|
4095
|
+
const close = React52.useCallback(() => setOpen(false), [setOpen]);
|
|
3926
4096
|
if (!isPresent) return null;
|
|
3927
|
-
return /* @__PURE__ */
|
|
4097
|
+
return /* @__PURE__ */ jsx43(Portal, { children: /* @__PURE__ */ jsx43(DropdownMenuCloseContext.Provider, { value: close, children: /* @__PURE__ */ jsx43(
|
|
3928
4098
|
"div",
|
|
3929
4099
|
{
|
|
3930
4100
|
"data-slot": "dropdown-menu-content",
|
|
@@ -3947,10 +4117,10 @@ function DropdownMenuContent({
|
|
|
3947
4117
|
}
|
|
3948
4118
|
) }) });
|
|
3949
4119
|
}
|
|
3950
|
-
var DropdownMenuCloseContext =
|
|
4120
|
+
var DropdownMenuCloseContext = React52.createContext(() => {
|
|
3951
4121
|
});
|
|
3952
4122
|
function DropdownMenuGroup({ className, ...props }) {
|
|
3953
|
-
return /* @__PURE__ */
|
|
4123
|
+
return /* @__PURE__ */ jsx43("div", { "data-slot": "dropdown-menu-group", role: "group", className, ...props });
|
|
3954
4124
|
}
|
|
3955
4125
|
function DropdownMenuItem({
|
|
3956
4126
|
className,
|
|
@@ -3961,8 +4131,8 @@ function DropdownMenuItem({
|
|
|
3961
4131
|
onKeyDown,
|
|
3962
4132
|
...props
|
|
3963
4133
|
}) {
|
|
3964
|
-
const close =
|
|
3965
|
-
return /* @__PURE__ */
|
|
4134
|
+
const close = React52.useContext(DropdownMenuCloseContext);
|
|
4135
|
+
return /* @__PURE__ */ jsx43(
|
|
3966
4136
|
"div",
|
|
3967
4137
|
{
|
|
3968
4138
|
"data-slot": "dropdown-menu-item",
|
|
@@ -3999,8 +4169,8 @@ function DropdownMenuCheckboxItem({
|
|
|
3999
4169
|
onClick,
|
|
4000
4170
|
...props
|
|
4001
4171
|
}) {
|
|
4002
|
-
const close =
|
|
4003
|
-
return /* @__PURE__ */
|
|
4172
|
+
const close = React52.useContext(DropdownMenuCloseContext);
|
|
4173
|
+
return /* @__PURE__ */ jsxs13(
|
|
4004
4174
|
"div",
|
|
4005
4175
|
{
|
|
4006
4176
|
"data-slot": "dropdown-menu-checkbox-item",
|
|
@@ -4020,13 +4190,13 @@ function DropdownMenuCheckboxItem({
|
|
|
4020
4190
|
},
|
|
4021
4191
|
...props,
|
|
4022
4192
|
children: [
|
|
4023
|
-
/* @__PURE__ */
|
|
4193
|
+
/* @__PURE__ */ jsx43("span", { className: DROPDOWN_MENU_ITEM_INDICATOR, children: checked ? /* @__PURE__ */ jsx43("svg", { className: "size-4", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsx43("path", { d: "M20 6 9 17l-5-5" }) }) : null }),
|
|
4024
4194
|
children
|
|
4025
4195
|
]
|
|
4026
4196
|
}
|
|
4027
4197
|
);
|
|
4028
4198
|
}
|
|
4029
|
-
var DropdownMenuRadioGroupContext =
|
|
4199
|
+
var DropdownMenuRadioGroupContext = React52.createContext(null);
|
|
4030
4200
|
function DropdownMenuRadioGroup({
|
|
4031
4201
|
className,
|
|
4032
4202
|
value,
|
|
@@ -4034,11 +4204,11 @@ function DropdownMenuRadioGroup({
|
|
|
4034
4204
|
children,
|
|
4035
4205
|
...props
|
|
4036
4206
|
}) {
|
|
4037
|
-
const ctx =
|
|
4207
|
+
const ctx = React52.useMemo(
|
|
4038
4208
|
() => ({ value, setValue: (next) => onValueChange?.(next) }),
|
|
4039
4209
|
[value, onValueChange]
|
|
4040
4210
|
);
|
|
4041
|
-
return /* @__PURE__ */
|
|
4211
|
+
return /* @__PURE__ */ jsx43(DropdownMenuRadioGroupContext.Provider, { value: ctx, children: /* @__PURE__ */ jsx43("div", { "data-slot": "dropdown-menu-radio-group", role: "group", className, ...props, children }) });
|
|
4042
4212
|
}
|
|
4043
4213
|
function DropdownMenuRadioItem({
|
|
4044
4214
|
className,
|
|
@@ -4048,10 +4218,10 @@ function DropdownMenuRadioItem({
|
|
|
4048
4218
|
onClick,
|
|
4049
4219
|
...props
|
|
4050
4220
|
}) {
|
|
4051
|
-
const close =
|
|
4052
|
-
const group =
|
|
4221
|
+
const close = React52.useContext(DropdownMenuCloseContext);
|
|
4222
|
+
const group = React52.useContext(DropdownMenuRadioGroupContext);
|
|
4053
4223
|
const checked = group?.value === value;
|
|
4054
|
-
return /* @__PURE__ */
|
|
4224
|
+
return /* @__PURE__ */ jsxs13(
|
|
4055
4225
|
"div",
|
|
4056
4226
|
{
|
|
4057
4227
|
"data-slot": "dropdown-menu-radio-item",
|
|
@@ -4072,14 +4242,14 @@ function DropdownMenuRadioItem({
|
|
|
4072
4242
|
},
|
|
4073
4243
|
...props,
|
|
4074
4244
|
children: [
|
|
4075
|
-
/* @__PURE__ */
|
|
4245
|
+
/* @__PURE__ */ jsx43("span", { className: DROPDOWN_MENU_ITEM_INDICATOR, children: checked ? /* @__PURE__ */ jsx43("svg", { className: "size-2 fill-current", viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ jsx43("circle", { cx: "12", cy: "12", r: "10" }) }) : null }),
|
|
4076
4246
|
children
|
|
4077
4247
|
]
|
|
4078
4248
|
}
|
|
4079
4249
|
);
|
|
4080
4250
|
}
|
|
4081
4251
|
function DropdownMenuLabel({ className, inset, ...props }) {
|
|
4082
|
-
return /* @__PURE__ */
|
|
4252
|
+
return /* @__PURE__ */ jsx43(
|
|
4083
4253
|
"div",
|
|
4084
4254
|
{
|
|
4085
4255
|
"data-slot": "dropdown-menu-label",
|
|
@@ -4090,7 +4260,7 @@ function DropdownMenuLabel({ className, inset, ...props }) {
|
|
|
4090
4260
|
);
|
|
4091
4261
|
}
|
|
4092
4262
|
function DropdownMenuSeparator({ className, ...props }) {
|
|
4093
|
-
return /* @__PURE__ */
|
|
4263
|
+
return /* @__PURE__ */ jsx43(
|
|
4094
4264
|
"div",
|
|
4095
4265
|
{
|
|
4096
4266
|
"data-slot": "dropdown-menu-separator",
|
|
@@ -4101,7 +4271,7 @@ function DropdownMenuSeparator({ className, ...props }) {
|
|
|
4101
4271
|
);
|
|
4102
4272
|
}
|
|
4103
4273
|
function DropdownMenuShortcut({ className, ...props }) {
|
|
4104
|
-
return /* @__PURE__ */
|
|
4274
|
+
return /* @__PURE__ */ jsx43(
|
|
4105
4275
|
"span",
|
|
4106
4276
|
{
|
|
4107
4277
|
"data-slot": "dropdown-menu-shortcut",
|
|
@@ -4110,18 +4280,18 @@ function DropdownMenuShortcut({ className, ...props }) {
|
|
|
4110
4280
|
}
|
|
4111
4281
|
);
|
|
4112
4282
|
}
|
|
4113
|
-
var DropdownMenuSubContext =
|
|
4283
|
+
var DropdownMenuSubContext = React52.createContext(null);
|
|
4114
4284
|
function DropdownMenuSub({ open, defaultOpen = false, onOpenChange, children }) {
|
|
4115
4285
|
const [isOpen, setOpen] = useControllableState({
|
|
4116
4286
|
...open !== void 0 ? { value: open } : {},
|
|
4117
4287
|
defaultValue: defaultOpen,
|
|
4118
4288
|
...onOpenChange ? { onChange: onOpenChange } : {}
|
|
4119
4289
|
});
|
|
4120
|
-
return /* @__PURE__ */
|
|
4290
|
+
return /* @__PURE__ */ jsx43(DropdownMenuSubContext.Provider, { value: { open: isOpen, setOpen }, children: /* @__PURE__ */ jsx43("div", { "data-slot": "dropdown-menu-sub", children }) });
|
|
4121
4291
|
}
|
|
4122
4292
|
function DropdownMenuSubTrigger({ className, inset, children, onClick, ...props }) {
|
|
4123
|
-
const ctx =
|
|
4124
|
-
return /* @__PURE__ */
|
|
4293
|
+
const ctx = React52.useContext(DropdownMenuSubContext);
|
|
4294
|
+
return /* @__PURE__ */ jsxs13(
|
|
4125
4295
|
"div",
|
|
4126
4296
|
{
|
|
4127
4297
|
"data-slot": "dropdown-menu-sub-trigger",
|
|
@@ -4142,15 +4312,15 @@ function DropdownMenuSubTrigger({ className, inset, children, onClick, ...props
|
|
|
4142
4312
|
...props,
|
|
4143
4313
|
children: [
|
|
4144
4314
|
children,
|
|
4145
|
-
/* @__PURE__ */
|
|
4315
|
+
/* @__PURE__ */ jsx43("svg", { className: "ml-auto size-4", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsx43("path", { d: "m9 18 6-6-6-6" }) })
|
|
4146
4316
|
]
|
|
4147
4317
|
}
|
|
4148
4318
|
);
|
|
4149
4319
|
}
|
|
4150
4320
|
function DropdownMenuSubContent({ className, children, ...props }) {
|
|
4151
|
-
const ctx =
|
|
4321
|
+
const ctx = React52.useContext(DropdownMenuSubContext);
|
|
4152
4322
|
if (!ctx?.open) return null;
|
|
4153
|
-
return /* @__PURE__ */
|
|
4323
|
+
return /* @__PURE__ */ jsx43(
|
|
4154
4324
|
"div",
|
|
4155
4325
|
{
|
|
4156
4326
|
"data-slot": "dropdown-menu-sub-content",
|
|
@@ -4167,7 +4337,7 @@ function DropdownMenuSubContent({ className, children, ...props }) {
|
|
|
4167
4337
|
}
|
|
4168
4338
|
|
|
4169
4339
|
// src/components/context-menu.tsx
|
|
4170
|
-
import * as
|
|
4340
|
+
import * as React53 from "react";
|
|
4171
4341
|
|
|
4172
4342
|
// src/generated/context-menu.ts
|
|
4173
4343
|
var CONTEXT_MENU_CONTENT = "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md";
|
|
@@ -4180,10 +4350,10 @@ var CONTEXT_MENU_SEPARATOR = "bg-border -mx-1 my-1 h-px";
|
|
|
4180
4350
|
var CONTEXT_MENU_SHORTCUT = "text-muted-foreground ml-auto text-xs tracking-widest";
|
|
4181
4351
|
|
|
4182
4352
|
// src/components/context-menu.tsx
|
|
4183
|
-
import { jsx as
|
|
4184
|
-
var ContextMenuContext =
|
|
4353
|
+
import { jsx as jsx44, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
4354
|
+
var ContextMenuContext = React53.createContext(null);
|
|
4185
4355
|
function useContextMenu() {
|
|
4186
|
-
const ctx =
|
|
4356
|
+
const ctx = React53.useContext(ContextMenuContext);
|
|
4187
4357
|
if (!ctx) throw new Error("ContextMenu parts must be used within <ContextMenu>");
|
|
4188
4358
|
return ctx;
|
|
4189
4359
|
}
|
|
@@ -4193,16 +4363,16 @@ function ContextMenu({ open, defaultOpen = false, onOpenChange, children }) {
|
|
|
4193
4363
|
defaultValue: defaultOpen,
|
|
4194
4364
|
...onOpenChange ? { onChange: onOpenChange } : {}
|
|
4195
4365
|
});
|
|
4196
|
-
const [point, setPoint] =
|
|
4197
|
-
return /* @__PURE__ */
|
|
4366
|
+
const [point, setPoint] = React53.useState({ x: 0, y: 0 });
|
|
4367
|
+
return /* @__PURE__ */ jsx44(ContextMenuContext.Provider, { value: { open: isOpen, setOpen, point, setPoint }, children: /* @__PURE__ */ jsx44("div", { "data-slot": "context-menu", children }) });
|
|
4198
4368
|
}
|
|
4199
4369
|
function ContextMenuPortal({ children }) {
|
|
4200
|
-
return /* @__PURE__ */
|
|
4370
|
+
return /* @__PURE__ */ jsx44(Portal, { children });
|
|
4201
4371
|
}
|
|
4202
4372
|
function ContextMenuTrigger({ asChild = false, onContextMenu, ...props }) {
|
|
4203
4373
|
const { setOpen, setPoint } = useContextMenu();
|
|
4204
4374
|
const Comp = asChild ? Slot : "div";
|
|
4205
|
-
return /* @__PURE__ */
|
|
4375
|
+
return /* @__PURE__ */ jsx44(
|
|
4206
4376
|
Comp,
|
|
4207
4377
|
{
|
|
4208
4378
|
"data-slot": "context-menu-trigger",
|
|
@@ -4217,9 +4387,9 @@ function ContextMenuTrigger({ asChild = false, onContextMenu, ...props }) {
|
|
|
4217
4387
|
);
|
|
4218
4388
|
}
|
|
4219
4389
|
function ContextMenuGroup({ className, ...props }) {
|
|
4220
|
-
return /* @__PURE__ */
|
|
4390
|
+
return /* @__PURE__ */ jsx44("div", { "data-slot": "context-menu-group", role: "group", className, ...props });
|
|
4221
4391
|
}
|
|
4222
|
-
var ContextMenuCloseContext =
|
|
4392
|
+
var ContextMenuCloseContext = React53.createContext(() => {
|
|
4223
4393
|
});
|
|
4224
4394
|
function ContextMenuContent({ className, children, ...props }) {
|
|
4225
4395
|
const { open, setOpen, point } = useContextMenu();
|
|
@@ -4228,7 +4398,7 @@ function ContextMenuContent({ className, children, ...props }) {
|
|
|
4228
4398
|
enabled: open,
|
|
4229
4399
|
onDismiss: () => setOpen(false)
|
|
4230
4400
|
});
|
|
4231
|
-
const contentRef =
|
|
4401
|
+
const contentRef = React53.useRef(null);
|
|
4232
4402
|
const items = () => Array.from(
|
|
4233
4403
|
contentRef.current?.querySelectorAll("[role^='menuitem']") ?? []
|
|
4234
4404
|
).filter((el) => el.getAttribute("data-disabled") === null);
|
|
@@ -4237,13 +4407,13 @@ function ContextMenuContent({ className, children, ...props }) {
|
|
|
4237
4407
|
orientation: "vertical",
|
|
4238
4408
|
loop: true
|
|
4239
4409
|
});
|
|
4240
|
-
|
|
4410
|
+
React53.useEffect(() => {
|
|
4241
4411
|
if (!open) return;
|
|
4242
4412
|
items()[activeIndex]?.focus();
|
|
4243
4413
|
}, [open, activeIndex]);
|
|
4244
|
-
const close =
|
|
4414
|
+
const close = React53.useCallback(() => setOpen(false), [setOpen]);
|
|
4245
4415
|
if (!isPresent) return null;
|
|
4246
|
-
return /* @__PURE__ */
|
|
4416
|
+
return /* @__PURE__ */ jsx44(Portal, { children: /* @__PURE__ */ jsx44(ContextMenuCloseContext.Provider, { value: close, children: /* @__PURE__ */ jsx44(
|
|
4247
4417
|
"div",
|
|
4248
4418
|
{
|
|
4249
4419
|
"data-slot": "context-menu-content",
|
|
@@ -4275,8 +4445,8 @@ function ContextMenuItem({
|
|
|
4275
4445
|
onKeyDown,
|
|
4276
4446
|
...props
|
|
4277
4447
|
}) {
|
|
4278
|
-
const close =
|
|
4279
|
-
return /* @__PURE__ */
|
|
4448
|
+
const close = React53.useContext(ContextMenuCloseContext);
|
|
4449
|
+
return /* @__PURE__ */ jsx44(
|
|
4280
4450
|
"div",
|
|
4281
4451
|
{
|
|
4282
4452
|
"data-slot": "context-menu-item",
|
|
@@ -4313,8 +4483,8 @@ function ContextMenuCheckboxItem({
|
|
|
4313
4483
|
onClick,
|
|
4314
4484
|
...props
|
|
4315
4485
|
}) {
|
|
4316
|
-
const close =
|
|
4317
|
-
return /* @__PURE__ */
|
|
4486
|
+
const close = React53.useContext(ContextMenuCloseContext);
|
|
4487
|
+
return /* @__PURE__ */ jsxs14(
|
|
4318
4488
|
"div",
|
|
4319
4489
|
{
|
|
4320
4490
|
"data-slot": "context-menu-checkbox-item",
|
|
@@ -4334,13 +4504,13 @@ function ContextMenuCheckboxItem({
|
|
|
4334
4504
|
},
|
|
4335
4505
|
...props,
|
|
4336
4506
|
children: [
|
|
4337
|
-
/* @__PURE__ */
|
|
4507
|
+
/* @__PURE__ */ jsx44("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: checked ? /* @__PURE__ */ jsx44("svg", { className: "size-4", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsx44("path", { d: "M20 6 9 17l-5-5" }) }) : null }),
|
|
4338
4508
|
children
|
|
4339
4509
|
]
|
|
4340
4510
|
}
|
|
4341
4511
|
);
|
|
4342
4512
|
}
|
|
4343
|
-
var ContextMenuRadioGroupContext =
|
|
4513
|
+
var ContextMenuRadioGroupContext = React53.createContext(null);
|
|
4344
4514
|
function ContextMenuRadioGroup({
|
|
4345
4515
|
className,
|
|
4346
4516
|
value,
|
|
@@ -4348,11 +4518,11 @@ function ContextMenuRadioGroup({
|
|
|
4348
4518
|
children,
|
|
4349
4519
|
...props
|
|
4350
4520
|
}) {
|
|
4351
|
-
const ctx =
|
|
4521
|
+
const ctx = React53.useMemo(
|
|
4352
4522
|
() => ({ value, setValue: (next) => onValueChange?.(next) }),
|
|
4353
4523
|
[value, onValueChange]
|
|
4354
4524
|
);
|
|
4355
|
-
return /* @__PURE__ */
|
|
4525
|
+
return /* @__PURE__ */ jsx44(ContextMenuRadioGroupContext.Provider, { value: ctx, children: /* @__PURE__ */ jsx44("div", { "data-slot": "context-menu-radio-group", role: "group", className, ...props, children }) });
|
|
4356
4526
|
}
|
|
4357
4527
|
function ContextMenuRadioItem({
|
|
4358
4528
|
className,
|
|
@@ -4362,10 +4532,10 @@ function ContextMenuRadioItem({
|
|
|
4362
4532
|
onClick,
|
|
4363
4533
|
...props
|
|
4364
4534
|
}) {
|
|
4365
|
-
const close =
|
|
4366
|
-
const group =
|
|
4535
|
+
const close = React53.useContext(ContextMenuCloseContext);
|
|
4536
|
+
const group = React53.useContext(ContextMenuRadioGroupContext);
|
|
4367
4537
|
const checked = group?.value === value;
|
|
4368
|
-
return /* @__PURE__ */
|
|
4538
|
+
return /* @__PURE__ */ jsxs14(
|
|
4369
4539
|
"div",
|
|
4370
4540
|
{
|
|
4371
4541
|
"data-slot": "context-menu-radio-item",
|
|
@@ -4386,14 +4556,14 @@ function ContextMenuRadioItem({
|
|
|
4386
4556
|
},
|
|
4387
4557
|
...props,
|
|
4388
4558
|
children: [
|
|
4389
|
-
/* @__PURE__ */
|
|
4559
|
+
/* @__PURE__ */ jsx44("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: checked ? /* @__PURE__ */ jsx44("svg", { className: "size-2 fill-current", viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ jsx44("circle", { cx: "12", cy: "12", r: "10" }) }) : null }),
|
|
4390
4560
|
children
|
|
4391
4561
|
]
|
|
4392
4562
|
}
|
|
4393
4563
|
);
|
|
4394
4564
|
}
|
|
4395
4565
|
function ContextMenuLabel({ className, inset, ...props }) {
|
|
4396
|
-
return /* @__PURE__ */
|
|
4566
|
+
return /* @__PURE__ */ jsx44(
|
|
4397
4567
|
"div",
|
|
4398
4568
|
{
|
|
4399
4569
|
"data-slot": "context-menu-label",
|
|
@@ -4404,7 +4574,7 @@ function ContextMenuLabel({ className, inset, ...props }) {
|
|
|
4404
4574
|
);
|
|
4405
4575
|
}
|
|
4406
4576
|
function ContextMenuSeparator({ className, ...props }) {
|
|
4407
|
-
return /* @__PURE__ */
|
|
4577
|
+
return /* @__PURE__ */ jsx44(
|
|
4408
4578
|
"div",
|
|
4409
4579
|
{
|
|
4410
4580
|
"data-slot": "context-menu-separator",
|
|
@@ -4415,7 +4585,7 @@ function ContextMenuSeparator({ className, ...props }) {
|
|
|
4415
4585
|
);
|
|
4416
4586
|
}
|
|
4417
4587
|
function ContextMenuShortcut({ className, ...props }) {
|
|
4418
|
-
return /* @__PURE__ */
|
|
4588
|
+
return /* @__PURE__ */ jsx44(
|
|
4419
4589
|
"span",
|
|
4420
4590
|
{
|
|
4421
4591
|
"data-slot": "context-menu-shortcut",
|
|
@@ -4424,18 +4594,18 @@ function ContextMenuShortcut({ className, ...props }) {
|
|
|
4424
4594
|
}
|
|
4425
4595
|
);
|
|
4426
4596
|
}
|
|
4427
|
-
var ContextMenuSubContext =
|
|
4597
|
+
var ContextMenuSubContext = React53.createContext(null);
|
|
4428
4598
|
function ContextMenuSub({ open, defaultOpen = false, onOpenChange, children }) {
|
|
4429
4599
|
const [isOpen, setOpen] = useControllableState({
|
|
4430
4600
|
...open !== void 0 ? { value: open } : {},
|
|
4431
4601
|
defaultValue: defaultOpen,
|
|
4432
4602
|
...onOpenChange ? { onChange: onOpenChange } : {}
|
|
4433
4603
|
});
|
|
4434
|
-
return /* @__PURE__ */
|
|
4604
|
+
return /* @__PURE__ */ jsx44(ContextMenuSubContext.Provider, { value: { open: isOpen, setOpen }, children: /* @__PURE__ */ jsx44("div", { "data-slot": "context-menu-sub", children }) });
|
|
4435
4605
|
}
|
|
4436
4606
|
function ContextMenuSubTrigger({ className, inset, children, onClick, ...props }) {
|
|
4437
|
-
const ctx =
|
|
4438
|
-
return /* @__PURE__ */
|
|
4607
|
+
const ctx = React53.useContext(ContextMenuSubContext);
|
|
4608
|
+
return /* @__PURE__ */ jsxs14(
|
|
4439
4609
|
"div",
|
|
4440
4610
|
{
|
|
4441
4611
|
"data-slot": "context-menu-sub-trigger",
|
|
@@ -4456,15 +4626,15 @@ function ContextMenuSubTrigger({ className, inset, children, onClick, ...props }
|
|
|
4456
4626
|
...props,
|
|
4457
4627
|
children: [
|
|
4458
4628
|
children,
|
|
4459
|
-
/* @__PURE__ */
|
|
4629
|
+
/* @__PURE__ */ jsx44("svg", { className: "ml-auto", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsx44("path", { d: "m9 18 6-6-6-6" }) })
|
|
4460
4630
|
]
|
|
4461
4631
|
}
|
|
4462
4632
|
);
|
|
4463
4633
|
}
|
|
4464
4634
|
function ContextMenuSubContent({ className, children, ...props }) {
|
|
4465
|
-
const ctx =
|
|
4635
|
+
const ctx = React53.useContext(ContextMenuSubContext);
|
|
4466
4636
|
if (!ctx?.open) return null;
|
|
4467
|
-
return /* @__PURE__ */
|
|
4637
|
+
return /* @__PURE__ */ jsx44(
|
|
4468
4638
|
"div",
|
|
4469
4639
|
{
|
|
4470
4640
|
"data-slot": "context-menu-sub-content",
|
|
@@ -4481,7 +4651,7 @@ function ContextMenuSubContent({ className, children, ...props }) {
|
|
|
4481
4651
|
}
|
|
4482
4652
|
|
|
4483
4653
|
// src/components/menubar.tsx
|
|
4484
|
-
import * as
|
|
4654
|
+
import * as React54 from "react";
|
|
4485
4655
|
|
|
4486
4656
|
// src/generated/menubar.ts
|
|
4487
4657
|
var MENUBAR_ROOT = "bg-background flex h-9 items-center gap-1 rounded-md border p-1 shadow-xs";
|
|
@@ -4498,16 +4668,16 @@ var MENUBAR_SUB_TRIGGER = "focus:bg-accent focus:text-accent-foreground data-[st
|
|
|
4498
4668
|
var MENUBAR_SUB_CONTENT = "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 absolute z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-lg";
|
|
4499
4669
|
|
|
4500
4670
|
// src/components/menubar.tsx
|
|
4501
|
-
import { jsx as
|
|
4502
|
-
var MenubarMenuContext =
|
|
4671
|
+
import { jsx as jsx45, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
4672
|
+
var MenubarMenuContext = React54.createContext(null);
|
|
4503
4673
|
function useMenu() {
|
|
4504
|
-
const ctx =
|
|
4674
|
+
const ctx = React54.useContext(MenubarMenuContext);
|
|
4505
4675
|
if (!ctx) throw new Error("Menubar parts must be used within <MenubarMenu>");
|
|
4506
4676
|
return ctx;
|
|
4507
4677
|
}
|
|
4508
|
-
var MenubarRadioGroupContext =
|
|
4678
|
+
var MenubarRadioGroupContext = React54.createContext(null);
|
|
4509
4679
|
function Menubar({ className, ...props }) {
|
|
4510
|
-
return /* @__PURE__ */
|
|
4680
|
+
return /* @__PURE__ */ jsx45(
|
|
4511
4681
|
"div",
|
|
4512
4682
|
{
|
|
4513
4683
|
"data-slot": "menubar",
|
|
@@ -4523,12 +4693,12 @@ function MenubarMenu({ open, defaultOpen = false, onOpenChange, children }) {
|
|
|
4523
4693
|
defaultValue: defaultOpen,
|
|
4524
4694
|
onChange: onOpenChange
|
|
4525
4695
|
});
|
|
4526
|
-
const triggerRef =
|
|
4527
|
-
return /* @__PURE__ */
|
|
4696
|
+
const triggerRef = React54.useRef(null);
|
|
4697
|
+
return /* @__PURE__ */ jsx45(MenubarMenuContext.Provider, { value: { open: isOpen, setOpen, triggerRef }, children: /* @__PURE__ */ jsx45("div", { "data-slot": "menubar-menu", className: "relative", children }) });
|
|
4528
4698
|
}
|
|
4529
4699
|
function MenubarTrigger({ className, onClick, ...props }) {
|
|
4530
4700
|
const { open, setOpen, triggerRef } = useMenu();
|
|
4531
|
-
return /* @__PURE__ */
|
|
4701
|
+
return /* @__PURE__ */ jsx45(
|
|
4532
4702
|
"button",
|
|
4533
4703
|
{
|
|
4534
4704
|
ref: triggerRef,
|
|
@@ -4564,10 +4734,10 @@ function MenubarContent({
|
|
|
4564
4734
|
onDismiss: () => setOpen(false),
|
|
4565
4735
|
exclude: [triggerRef]
|
|
4566
4736
|
});
|
|
4567
|
-
const items =
|
|
4737
|
+
const items = React54.Children.toArray(children);
|
|
4568
4738
|
const { onKeyDown } = useRovingFocus({ count: items.length, orientation: "vertical" });
|
|
4569
4739
|
if (!isPresent) return null;
|
|
4570
|
-
return /* @__PURE__ */
|
|
4740
|
+
return /* @__PURE__ */ jsx45(Portal, { children: /* @__PURE__ */ jsx45(
|
|
4571
4741
|
"div",
|
|
4572
4742
|
{
|
|
4573
4743
|
ref: mergeRefs(presenceRef, floatingRef, dismissRef),
|
|
@@ -4584,7 +4754,7 @@ function MenubarContent({
|
|
|
4584
4754
|
) });
|
|
4585
4755
|
}
|
|
4586
4756
|
function MenubarGroup({ className, ...props }) {
|
|
4587
|
-
return /* @__PURE__ */
|
|
4757
|
+
return /* @__PURE__ */ jsx45("div", { "data-slot": "menubar-group", role: "group", className, ...props });
|
|
4588
4758
|
}
|
|
4589
4759
|
function MenubarItem({
|
|
4590
4760
|
className,
|
|
@@ -4592,7 +4762,7 @@ function MenubarItem({
|
|
|
4592
4762
|
variant = "default",
|
|
4593
4763
|
...props
|
|
4594
4764
|
}) {
|
|
4595
|
-
return /* @__PURE__ */
|
|
4765
|
+
return /* @__PURE__ */ jsx45(
|
|
4596
4766
|
"div",
|
|
4597
4767
|
{
|
|
4598
4768
|
"data-slot": "menubar-item",
|
|
@@ -4611,7 +4781,7 @@ function MenubarCheckboxItem({
|
|
|
4611
4781
|
checked,
|
|
4612
4782
|
...props
|
|
4613
4783
|
}) {
|
|
4614
|
-
return /* @__PURE__ */
|
|
4784
|
+
return /* @__PURE__ */ jsxs15(
|
|
4615
4785
|
"div",
|
|
4616
4786
|
{
|
|
4617
4787
|
"data-slot": "menubar-checkbox-item",
|
|
@@ -4621,7 +4791,7 @@ function MenubarCheckboxItem({
|
|
|
4621
4791
|
className: cn(MENUBAR_CHECKBOX_ITEM, className),
|
|
4622
4792
|
...props,
|
|
4623
4793
|
children: [
|
|
4624
|
-
/* @__PURE__ */
|
|
4794
|
+
/* @__PURE__ */ jsx45("span", { className: MENUBAR_ITEM_INDICATOR, children: checked && /* @__PURE__ */ jsx45(
|
|
4625
4795
|
"svg",
|
|
4626
4796
|
{
|
|
4627
4797
|
className: "size-4",
|
|
@@ -4631,7 +4801,7 @@ function MenubarCheckboxItem({
|
|
|
4631
4801
|
strokeWidth: "2",
|
|
4632
4802
|
strokeLinecap: "round",
|
|
4633
4803
|
strokeLinejoin: "round",
|
|
4634
|
-
children: /* @__PURE__ */
|
|
4804
|
+
children: /* @__PURE__ */ jsx45("path", { d: "M20 6 9 17l-5-5" })
|
|
4635
4805
|
}
|
|
4636
4806
|
) }),
|
|
4637
4807
|
children
|
|
@@ -4651,7 +4821,7 @@ function MenubarRadioGroup({
|
|
|
4651
4821
|
defaultValue,
|
|
4652
4822
|
onChange: onValueChange
|
|
4653
4823
|
});
|
|
4654
|
-
return /* @__PURE__ */
|
|
4824
|
+
return /* @__PURE__ */ jsx45(MenubarRadioGroupContext.Provider, { value: { value: current, onValueChange: setValue }, children: /* @__PURE__ */ jsx45("div", { "data-slot": "menubar-radio-group", role: "group", className, children }) });
|
|
4655
4825
|
}
|
|
4656
4826
|
function MenubarRadioItem({
|
|
4657
4827
|
className,
|
|
@@ -4659,9 +4829,9 @@ function MenubarRadioItem({
|
|
|
4659
4829
|
value,
|
|
4660
4830
|
...props
|
|
4661
4831
|
}) {
|
|
4662
|
-
const ctx =
|
|
4832
|
+
const ctx = React54.useContext(MenubarRadioGroupContext);
|
|
4663
4833
|
const checked = ctx?.value === value;
|
|
4664
|
-
return /* @__PURE__ */
|
|
4834
|
+
return /* @__PURE__ */ jsxs15(
|
|
4665
4835
|
"div",
|
|
4666
4836
|
{
|
|
4667
4837
|
"data-slot": "menubar-radio-item",
|
|
@@ -4672,7 +4842,7 @@ function MenubarRadioItem({
|
|
|
4672
4842
|
onClick: () => ctx?.onValueChange(value),
|
|
4673
4843
|
...props,
|
|
4674
4844
|
children: [
|
|
4675
|
-
/* @__PURE__ */
|
|
4845
|
+
/* @__PURE__ */ jsx45("span", { className: MENUBAR_ITEM_INDICATOR, children: checked && /* @__PURE__ */ jsx45("svg", { className: "size-2 fill-current", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx45("circle", { cx: "12", cy: "12", r: "10" }) }) }),
|
|
4676
4846
|
children
|
|
4677
4847
|
]
|
|
4678
4848
|
}
|
|
@@ -4683,7 +4853,7 @@ function MenubarLabel({
|
|
|
4683
4853
|
inset,
|
|
4684
4854
|
...props
|
|
4685
4855
|
}) {
|
|
4686
|
-
return /* @__PURE__ */
|
|
4856
|
+
return /* @__PURE__ */ jsx45(
|
|
4687
4857
|
"div",
|
|
4688
4858
|
{
|
|
4689
4859
|
"data-slot": "menubar-label",
|
|
@@ -4694,7 +4864,7 @@ function MenubarLabel({
|
|
|
4694
4864
|
);
|
|
4695
4865
|
}
|
|
4696
4866
|
function MenubarSeparator({ className, ...props }) {
|
|
4697
|
-
return /* @__PURE__ */
|
|
4867
|
+
return /* @__PURE__ */ jsx45(
|
|
4698
4868
|
"div",
|
|
4699
4869
|
{
|
|
4700
4870
|
"data-slot": "menubar-separator",
|
|
@@ -4705,7 +4875,7 @@ function MenubarSeparator({ className, ...props }) {
|
|
|
4705
4875
|
);
|
|
4706
4876
|
}
|
|
4707
4877
|
function MenubarShortcut({ className, ...props }) {
|
|
4708
|
-
return /* @__PURE__ */
|
|
4878
|
+
return /* @__PURE__ */ jsx45(
|
|
4709
4879
|
"span",
|
|
4710
4880
|
{
|
|
4711
4881
|
"data-slot": "menubar-shortcut",
|
|
@@ -4714,9 +4884,9 @@ function MenubarShortcut({ className, ...props }) {
|
|
|
4714
4884
|
}
|
|
4715
4885
|
);
|
|
4716
4886
|
}
|
|
4717
|
-
var MenubarSubContext =
|
|
4887
|
+
var MenubarSubContext = React54.createContext(null);
|
|
4718
4888
|
function useSub() {
|
|
4719
|
-
const ctx =
|
|
4889
|
+
const ctx = React54.useContext(MenubarSubContext);
|
|
4720
4890
|
if (!ctx) throw new Error("MenubarSub parts must be used within <MenubarSub>");
|
|
4721
4891
|
return ctx;
|
|
4722
4892
|
}
|
|
@@ -4726,7 +4896,7 @@ function MenubarSub({ open, defaultOpen = false, onOpenChange, children }) {
|
|
|
4726
4896
|
defaultValue: defaultOpen,
|
|
4727
4897
|
onChange: onOpenChange
|
|
4728
4898
|
});
|
|
4729
|
-
return /* @__PURE__ */
|
|
4899
|
+
return /* @__PURE__ */ jsx45(MenubarSubContext.Provider, { value: { open: isOpen, setOpen }, children: /* @__PURE__ */ jsx45("div", { "data-slot": "menubar-sub", className: "relative", children }) });
|
|
4730
4900
|
}
|
|
4731
4901
|
function MenubarSubTrigger({
|
|
4732
4902
|
className,
|
|
@@ -4736,7 +4906,7 @@ function MenubarSubTrigger({
|
|
|
4736
4906
|
...props
|
|
4737
4907
|
}) {
|
|
4738
4908
|
const { open, setOpen } = useSub();
|
|
4739
|
-
return /* @__PURE__ */
|
|
4909
|
+
return /* @__PURE__ */ jsxs15(
|
|
4740
4910
|
"div",
|
|
4741
4911
|
{
|
|
4742
4912
|
"data-slot": "menubar-sub-trigger",
|
|
@@ -4752,7 +4922,7 @@ function MenubarSubTrigger({
|
|
|
4752
4922
|
...props,
|
|
4753
4923
|
children: [
|
|
4754
4924
|
children,
|
|
4755
|
-
/* @__PURE__ */
|
|
4925
|
+
/* @__PURE__ */ jsx45(
|
|
4756
4926
|
"svg",
|
|
4757
4927
|
{
|
|
4758
4928
|
className: "ml-auto h-4 w-4",
|
|
@@ -4762,7 +4932,7 @@ function MenubarSubTrigger({
|
|
|
4762
4932
|
strokeWidth: "2",
|
|
4763
4933
|
strokeLinecap: "round",
|
|
4764
4934
|
strokeLinejoin: "round",
|
|
4765
|
-
children: /* @__PURE__ */
|
|
4935
|
+
children: /* @__PURE__ */ jsx45("path", { d: "m9 18 6-6-6-6" })
|
|
4766
4936
|
}
|
|
4767
4937
|
)
|
|
4768
4938
|
]
|
|
@@ -4773,7 +4943,7 @@ function MenubarSubContent({ className, children, ...props }) {
|
|
|
4773
4943
|
const { open } = useSub();
|
|
4774
4944
|
const { isPresent, ref } = usePresence(open);
|
|
4775
4945
|
if (!isPresent) return null;
|
|
4776
|
-
return /* @__PURE__ */
|
|
4946
|
+
return /* @__PURE__ */ jsx45(
|
|
4777
4947
|
"div",
|
|
4778
4948
|
{
|
|
4779
4949
|
ref,
|
|
@@ -4788,7 +4958,7 @@ function MenubarSubContent({ className, children, ...props }) {
|
|
|
4788
4958
|
}
|
|
4789
4959
|
|
|
4790
4960
|
// src/components/navigation-menu.tsx
|
|
4791
|
-
import * as
|
|
4961
|
+
import * as React55 from "react";
|
|
4792
4962
|
|
|
4793
4963
|
// src/generated/navigation-menu.ts
|
|
4794
4964
|
var NAVIGATION_MENU = "group/navigation-menu relative flex max-w-max flex-1 items-center justify-center";
|
|
@@ -4801,13 +4971,13 @@ var NAVIGATION_MENU_INDICATOR = "data-[state=visible]:animate-in data-[state=hid
|
|
|
4801
4971
|
var NAVIGATION_MENU_VIEWPORT = "origin-top-center bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border shadow md:w-[var(--radix-navigation-menu-viewport-width)]";
|
|
4802
4972
|
|
|
4803
4973
|
// src/components/navigation-menu.tsx
|
|
4804
|
-
import { jsx as
|
|
4974
|
+
import { jsx as jsx46, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
4805
4975
|
function navigationMenuTriggerStyle() {
|
|
4806
4976
|
return NAVIGATION_MENU_TRIGGER_STYLE;
|
|
4807
4977
|
}
|
|
4808
|
-
var NavigationMenuItemContext =
|
|
4978
|
+
var NavigationMenuItemContext = React55.createContext(null);
|
|
4809
4979
|
function useItem() {
|
|
4810
|
-
const ctx =
|
|
4980
|
+
const ctx = React55.useContext(NavigationMenuItemContext);
|
|
4811
4981
|
if (!ctx) throw new Error("NavigationMenu parts must be used within <NavigationMenuItem>");
|
|
4812
4982
|
return ctx;
|
|
4813
4983
|
}
|
|
@@ -4817,7 +4987,7 @@ function NavigationMenu({
|
|
|
4817
4987
|
viewport = true,
|
|
4818
4988
|
...props
|
|
4819
4989
|
}) {
|
|
4820
|
-
return /* @__PURE__ */
|
|
4990
|
+
return /* @__PURE__ */ jsxs16(
|
|
4821
4991
|
"nav",
|
|
4822
4992
|
{
|
|
4823
4993
|
"data-slot": "navigation-menu",
|
|
@@ -4830,13 +5000,13 @@ function NavigationMenu({
|
|
|
4830
5000
|
...props,
|
|
4831
5001
|
children: [
|
|
4832
5002
|
children,
|
|
4833
|
-
viewport && /* @__PURE__ */
|
|
5003
|
+
viewport && /* @__PURE__ */ jsx46(NavigationMenuViewport, {})
|
|
4834
5004
|
]
|
|
4835
5005
|
}
|
|
4836
5006
|
);
|
|
4837
5007
|
}
|
|
4838
5008
|
function NavigationMenuList({ className, ...props }) {
|
|
4839
|
-
return /* @__PURE__ */
|
|
5009
|
+
return /* @__PURE__ */ jsx46(
|
|
4840
5010
|
"ul",
|
|
4841
5011
|
{
|
|
4842
5012
|
"data-slot": "navigation-menu-list",
|
|
@@ -4862,8 +5032,8 @@ function NavigationMenuItem({
|
|
|
4862
5032
|
defaultValue: defaultOpen,
|
|
4863
5033
|
onChange: onOpenChange
|
|
4864
5034
|
});
|
|
4865
|
-
const triggerRef =
|
|
4866
|
-
return /* @__PURE__ */
|
|
5035
|
+
const triggerRef = React55.useRef(null);
|
|
5036
|
+
return /* @__PURE__ */ jsx46(NavigationMenuItemContext.Provider, { value: { open: isOpen, setOpen, triggerRef }, children: /* @__PURE__ */ jsx46("li", { "data-slot": "navigation-menu-item", className: cn(NAVIGATION_MENU_ITEM, className), ...props, children }) });
|
|
4867
5037
|
}
|
|
4868
5038
|
function NavigationMenuTrigger({
|
|
4869
5039
|
className,
|
|
@@ -4872,7 +5042,7 @@ function NavigationMenuTrigger({
|
|
|
4872
5042
|
...props
|
|
4873
5043
|
}) {
|
|
4874
5044
|
const { open, setOpen, triggerRef } = useItem();
|
|
4875
|
-
return /* @__PURE__ */
|
|
5045
|
+
return /* @__PURE__ */ jsxs16(
|
|
4876
5046
|
"button",
|
|
4877
5047
|
{
|
|
4878
5048
|
ref: triggerRef,
|
|
@@ -4888,7 +5058,7 @@ function NavigationMenuTrigger({
|
|
|
4888
5058
|
children: [
|
|
4889
5059
|
children,
|
|
4890
5060
|
" ",
|
|
4891
|
-
/* @__PURE__ */
|
|
5061
|
+
/* @__PURE__ */ jsx46(
|
|
4892
5062
|
"svg",
|
|
4893
5063
|
{
|
|
4894
5064
|
className: "relative top-[1px] ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180",
|
|
@@ -4899,7 +5069,7 @@ function NavigationMenuTrigger({
|
|
|
4899
5069
|
strokeLinecap: "round",
|
|
4900
5070
|
strokeLinejoin: "round",
|
|
4901
5071
|
"aria-hidden": "true",
|
|
4902
|
-
children: /* @__PURE__ */
|
|
5072
|
+
children: /* @__PURE__ */ jsx46("path", { d: "m6 9 6 6 6-6" })
|
|
4903
5073
|
}
|
|
4904
5074
|
)
|
|
4905
5075
|
]
|
|
@@ -4915,7 +5085,7 @@ function NavigationMenuContent({ className, children, ...props }) {
|
|
|
4915
5085
|
exclude: [triggerRef]
|
|
4916
5086
|
});
|
|
4917
5087
|
if (!isPresent) return null;
|
|
4918
|
-
return /* @__PURE__ */
|
|
5088
|
+
return /* @__PURE__ */ jsx46(
|
|
4919
5089
|
"div",
|
|
4920
5090
|
{
|
|
4921
5091
|
ref: mergeRefs(presenceRef, dismissRef),
|
|
@@ -4931,7 +5101,7 @@ function NavigationMenuContent({ className, children, ...props }) {
|
|
|
4931
5101
|
);
|
|
4932
5102
|
}
|
|
4933
5103
|
function NavigationMenuViewport({ className, ...props }) {
|
|
4934
|
-
return /* @__PURE__ */
|
|
5104
|
+
return /* @__PURE__ */ jsx46("div", { className: "absolute top-full left-0 isolate z-50 flex justify-center", children: /* @__PURE__ */ jsx46(
|
|
4935
5105
|
"div",
|
|
4936
5106
|
{
|
|
4937
5107
|
"data-slot": "navigation-menu-viewport",
|
|
@@ -4949,7 +5119,7 @@ function NavigationMenuLink({
|
|
|
4949
5119
|
...props
|
|
4950
5120
|
}) {
|
|
4951
5121
|
const Comp = asChild ? Slot : "a";
|
|
4952
|
-
return /* @__PURE__ */
|
|
5122
|
+
return /* @__PURE__ */ jsx46(
|
|
4953
5123
|
Comp,
|
|
4954
5124
|
{
|
|
4955
5125
|
"data-slot": "navigation-menu-link",
|
|
@@ -4962,7 +5132,7 @@ function NavigationMenuLink({
|
|
|
4962
5132
|
);
|
|
4963
5133
|
}
|
|
4964
5134
|
function NavigationMenuIndicator({ className, ...props }) {
|
|
4965
|
-
return /* @__PURE__ */
|
|
5135
|
+
return /* @__PURE__ */ jsx46(
|
|
4966
5136
|
"div",
|
|
4967
5137
|
{
|
|
4968
5138
|
"data-slot": "navigation-menu-indicator",
|
|
@@ -4971,13 +5141,13 @@ function NavigationMenuIndicator({ className, ...props }) {
|
|
|
4971
5141
|
className
|
|
4972
5142
|
),
|
|
4973
5143
|
...props,
|
|
4974
|
-
children: /* @__PURE__ */
|
|
5144
|
+
children: /* @__PURE__ */ jsx46("div", { className: "bg-border relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm shadow-md" })
|
|
4975
5145
|
}
|
|
4976
5146
|
);
|
|
4977
5147
|
}
|
|
4978
5148
|
|
|
4979
5149
|
// src/components/dialog.tsx
|
|
4980
|
-
import * as
|
|
5150
|
+
import * as React56 from "react";
|
|
4981
5151
|
|
|
4982
5152
|
// src/generated/dialog.ts
|
|
4983
5153
|
var DIALOG_OVERLAY = "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50";
|
|
@@ -4989,10 +5159,10 @@ var DIALOG_TITLE = "text-lg leading-none font-semibold";
|
|
|
4989
5159
|
var DIALOG_DESCRIPTION = "text-muted-foreground text-sm";
|
|
4990
5160
|
|
|
4991
5161
|
// src/components/dialog.tsx
|
|
4992
|
-
import { Fragment as Fragment5, jsx as
|
|
4993
|
-
var DialogContext =
|
|
5162
|
+
import { Fragment as Fragment5, jsx as jsx47, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
5163
|
+
var DialogContext = React56.createContext(null);
|
|
4994
5164
|
function useDialog() {
|
|
4995
|
-
const ctx =
|
|
5165
|
+
const ctx = React56.useContext(DialogContext);
|
|
4996
5166
|
if (!ctx) throw new Error("Dialog parts must be used within <Dialog>");
|
|
4997
5167
|
return ctx;
|
|
4998
5168
|
}
|
|
@@ -5002,13 +5172,13 @@ function Dialog({ open, defaultOpen = false, onOpenChange, children }) {
|
|
|
5002
5172
|
defaultValue: defaultOpen,
|
|
5003
5173
|
...onOpenChange ? { onChange: onOpenChange } : {}
|
|
5004
5174
|
});
|
|
5005
|
-
const triggerRef =
|
|
5006
|
-
return /* @__PURE__ */
|
|
5175
|
+
const triggerRef = React56.useRef(null);
|
|
5176
|
+
return /* @__PURE__ */ jsx47(DialogContext.Provider, { value: { open: isOpen, setOpen, triggerRef }, children });
|
|
5007
5177
|
}
|
|
5008
5178
|
function DialogTrigger({ asChild = false, onClick, ...props }) {
|
|
5009
5179
|
const { open, setOpen, triggerRef } = useDialog();
|
|
5010
5180
|
const Comp = asChild ? Slot : "button";
|
|
5011
|
-
return /* @__PURE__ */
|
|
5181
|
+
return /* @__PURE__ */ jsx47(
|
|
5012
5182
|
Comp,
|
|
5013
5183
|
{
|
|
5014
5184
|
"data-slot": "dialog-trigger",
|
|
@@ -5023,11 +5193,11 @@ function DialogTrigger({ asChild = false, onClick, ...props }) {
|
|
|
5023
5193
|
);
|
|
5024
5194
|
}
|
|
5025
5195
|
function DialogPortal({ children }) {
|
|
5026
|
-
return /* @__PURE__ */
|
|
5196
|
+
return /* @__PURE__ */ jsx47(Fragment5, { children });
|
|
5027
5197
|
}
|
|
5028
5198
|
function DialogOverlay({ className, ...props }) {
|
|
5029
5199
|
const { open, setOpen } = useDialog();
|
|
5030
|
-
return /* @__PURE__ */
|
|
5200
|
+
return /* @__PURE__ */ jsx47(
|
|
5031
5201
|
"div",
|
|
5032
5202
|
{
|
|
5033
5203
|
"data-slot": "dialog-overlay",
|
|
@@ -5038,7 +5208,7 @@ function DialogOverlay({ className, ...props }) {
|
|
|
5038
5208
|
}
|
|
5039
5209
|
);
|
|
5040
5210
|
}
|
|
5041
|
-
var XIcon = (props) => /* @__PURE__ */
|
|
5211
|
+
var XIcon = (props) => /* @__PURE__ */ jsx47(
|
|
5042
5212
|
"svg",
|
|
5043
5213
|
{
|
|
5044
5214
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -5051,7 +5221,7 @@ var XIcon = (props) => /* @__PURE__ */ jsx46(
|
|
|
5051
5221
|
strokeLinecap: "round",
|
|
5052
5222
|
strokeLinejoin: "round",
|
|
5053
5223
|
...props,
|
|
5054
|
-
children: /* @__PURE__ */
|
|
5224
|
+
children: /* @__PURE__ */ jsx47("path", { d: "M18 6 6 18M6 6l12 12" })
|
|
5055
5225
|
}
|
|
5056
5226
|
);
|
|
5057
5227
|
function DialogContent({
|
|
@@ -5068,7 +5238,7 @@ function DialogContent({
|
|
|
5068
5238
|
onDismiss: () => setOpen(false),
|
|
5069
5239
|
exclude: [triggerRef]
|
|
5070
5240
|
});
|
|
5071
|
-
|
|
5241
|
+
React56.useEffect(() => {
|
|
5072
5242
|
if (!open) return;
|
|
5073
5243
|
const prev = document.body.style.overflow;
|
|
5074
5244
|
document.body.style.overflow = "hidden";
|
|
@@ -5077,9 +5247,9 @@ function DialogContent({
|
|
|
5077
5247
|
};
|
|
5078
5248
|
}, [open]);
|
|
5079
5249
|
if (!isPresent) return null;
|
|
5080
|
-
return /* @__PURE__ */
|
|
5081
|
-
/* @__PURE__ */
|
|
5082
|
-
/* @__PURE__ */
|
|
5250
|
+
return /* @__PURE__ */ jsxs17(Portal, { children: [
|
|
5251
|
+
/* @__PURE__ */ jsx47(DialogOverlay, {}),
|
|
5252
|
+
/* @__PURE__ */ jsxs17(
|
|
5083
5253
|
"div",
|
|
5084
5254
|
{
|
|
5085
5255
|
"data-slot": "dialog-content",
|
|
@@ -5091,7 +5261,7 @@ function DialogContent({
|
|
|
5091
5261
|
...props,
|
|
5092
5262
|
children: [
|
|
5093
5263
|
children,
|
|
5094
|
-
showCloseButton && /* @__PURE__ */
|
|
5264
|
+
showCloseButton && /* @__PURE__ */ jsxs17(
|
|
5095
5265
|
"button",
|
|
5096
5266
|
{
|
|
5097
5267
|
type: "button",
|
|
@@ -5099,8 +5269,8 @@ function DialogContent({
|
|
|
5099
5269
|
onClick: () => setOpen(false),
|
|
5100
5270
|
className: DIALOG_CLOSE,
|
|
5101
5271
|
children: [
|
|
5102
|
-
/* @__PURE__ */
|
|
5103
|
-
/* @__PURE__ */
|
|
5272
|
+
/* @__PURE__ */ jsx47(XIcon, {}),
|
|
5273
|
+
/* @__PURE__ */ jsx47("span", { className: "sr-only", children: "Close" })
|
|
5104
5274
|
]
|
|
5105
5275
|
}
|
|
5106
5276
|
)
|
|
@@ -5112,7 +5282,7 @@ function DialogContent({
|
|
|
5112
5282
|
function DialogClose({ asChild = false, onClick, ...props }) {
|
|
5113
5283
|
const { setOpen } = useDialog();
|
|
5114
5284
|
const Comp = asChild ? Slot : "button";
|
|
5115
|
-
return /* @__PURE__ */
|
|
5285
|
+
return /* @__PURE__ */ jsx47(
|
|
5116
5286
|
Comp,
|
|
5117
5287
|
{
|
|
5118
5288
|
"data-slot": "dialog-close",
|
|
@@ -5125,7 +5295,7 @@ function DialogClose({ asChild = false, onClick, ...props }) {
|
|
|
5125
5295
|
);
|
|
5126
5296
|
}
|
|
5127
5297
|
function DialogHeader({ className, ...props }) {
|
|
5128
|
-
return /* @__PURE__ */
|
|
5298
|
+
return /* @__PURE__ */ jsx47(
|
|
5129
5299
|
"div",
|
|
5130
5300
|
{
|
|
5131
5301
|
"data-slot": "dialog-header",
|
|
@@ -5135,7 +5305,7 @@ function DialogHeader({ className, ...props }) {
|
|
|
5135
5305
|
);
|
|
5136
5306
|
}
|
|
5137
5307
|
function DialogFooter({ className, ...props }) {
|
|
5138
|
-
return /* @__PURE__ */
|
|
5308
|
+
return /* @__PURE__ */ jsx47(
|
|
5139
5309
|
"div",
|
|
5140
5310
|
{
|
|
5141
5311
|
"data-slot": "dialog-footer",
|
|
@@ -5145,7 +5315,7 @@ function DialogFooter({ className, ...props }) {
|
|
|
5145
5315
|
);
|
|
5146
5316
|
}
|
|
5147
5317
|
function DialogTitle({ className, ...props }) {
|
|
5148
|
-
return /* @__PURE__ */
|
|
5318
|
+
return /* @__PURE__ */ jsx47(
|
|
5149
5319
|
"h2",
|
|
5150
5320
|
{
|
|
5151
5321
|
"data-slot": "dialog-title",
|
|
@@ -5155,7 +5325,7 @@ function DialogTitle({ className, ...props }) {
|
|
|
5155
5325
|
);
|
|
5156
5326
|
}
|
|
5157
5327
|
function DialogDescription({ className, ...props }) {
|
|
5158
|
-
return /* @__PURE__ */
|
|
5328
|
+
return /* @__PURE__ */ jsx47(
|
|
5159
5329
|
"p",
|
|
5160
5330
|
{
|
|
5161
5331
|
"data-slot": "dialog-description",
|
|
@@ -5166,7 +5336,7 @@ function DialogDescription({ className, ...props }) {
|
|
|
5166
5336
|
}
|
|
5167
5337
|
|
|
5168
5338
|
// src/components/alert-dialog.tsx
|
|
5169
|
-
import * as
|
|
5339
|
+
import * as React57 from "react";
|
|
5170
5340
|
|
|
5171
5341
|
// src/generated/alert-dialog.ts
|
|
5172
5342
|
var ALERT_DIALOG_OVERLAY = "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50";
|
|
@@ -5177,10 +5347,10 @@ var ALERT_DIALOG_TITLE = "text-lg font-semibold";
|
|
|
5177
5347
|
var ALERT_DIALOG_DESCRIPTION = "text-muted-foreground text-sm";
|
|
5178
5348
|
|
|
5179
5349
|
// src/components/alert-dialog.tsx
|
|
5180
|
-
import { jsx as
|
|
5181
|
-
var AlertDialogContext =
|
|
5350
|
+
import { jsx as jsx48, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
5351
|
+
var AlertDialogContext = React57.createContext(null);
|
|
5182
5352
|
function useAlertDialog() {
|
|
5183
|
-
const ctx =
|
|
5353
|
+
const ctx = React57.useContext(AlertDialogContext);
|
|
5184
5354
|
if (!ctx) throw new Error("AlertDialog parts must be used within <AlertDialog>");
|
|
5185
5355
|
return ctx;
|
|
5186
5356
|
}
|
|
@@ -5190,13 +5360,13 @@ function AlertDialog({ open, defaultOpen = false, onOpenChange, children }) {
|
|
|
5190
5360
|
defaultValue: defaultOpen,
|
|
5191
5361
|
...onOpenChange ? { onChange: onOpenChange } : {}
|
|
5192
5362
|
});
|
|
5193
|
-
const triggerRef =
|
|
5194
|
-
return /* @__PURE__ */
|
|
5363
|
+
const triggerRef = React57.useRef(null);
|
|
5364
|
+
return /* @__PURE__ */ jsx48(AlertDialogContext.Provider, { value: { open: isOpen, setOpen, triggerRef }, children });
|
|
5195
5365
|
}
|
|
5196
5366
|
function AlertDialogTrigger({ asChild = false, onClick, ...props }) {
|
|
5197
5367
|
const { open, setOpen, triggerRef } = useAlertDialog();
|
|
5198
5368
|
const Comp = asChild ? Slot : "button";
|
|
5199
|
-
return /* @__PURE__ */
|
|
5369
|
+
return /* @__PURE__ */ jsx48(
|
|
5200
5370
|
Comp,
|
|
5201
5371
|
{
|
|
5202
5372
|
"data-slot": "alert-dialog-trigger",
|
|
@@ -5212,7 +5382,7 @@ function AlertDialogTrigger({ asChild = false, onClick, ...props }) {
|
|
|
5212
5382
|
}
|
|
5213
5383
|
function AlertDialogOverlay({ className, ...props }) {
|
|
5214
5384
|
const { open, setOpen } = useAlertDialog();
|
|
5215
|
-
return /* @__PURE__ */
|
|
5385
|
+
return /* @__PURE__ */ jsx48(
|
|
5216
5386
|
"div",
|
|
5217
5387
|
{
|
|
5218
5388
|
"data-slot": "alert-dialog-overlay",
|
|
@@ -5233,9 +5403,9 @@ function AlertDialogContent({ className, children, ...props }) {
|
|
|
5233
5403
|
exclude: [triggerRef]
|
|
5234
5404
|
});
|
|
5235
5405
|
if (!isPresent) return null;
|
|
5236
|
-
return /* @__PURE__ */
|
|
5237
|
-
/* @__PURE__ */
|
|
5238
|
-
/* @__PURE__ */
|
|
5406
|
+
return /* @__PURE__ */ jsxs18(Portal, { children: [
|
|
5407
|
+
/* @__PURE__ */ jsx48(AlertDialogOverlay, {}),
|
|
5408
|
+
/* @__PURE__ */ jsx48(
|
|
5239
5409
|
"div",
|
|
5240
5410
|
{
|
|
5241
5411
|
"data-slot": "alert-dialog-content",
|
|
@@ -5251,7 +5421,7 @@ function AlertDialogContent({ className, children, ...props }) {
|
|
|
5251
5421
|
] });
|
|
5252
5422
|
}
|
|
5253
5423
|
function AlertDialogHeader({ className, ...props }) {
|
|
5254
|
-
return /* @__PURE__ */
|
|
5424
|
+
return /* @__PURE__ */ jsx48(
|
|
5255
5425
|
"div",
|
|
5256
5426
|
{
|
|
5257
5427
|
"data-slot": "alert-dialog-header",
|
|
@@ -5261,7 +5431,7 @@ function AlertDialogHeader({ className, ...props }) {
|
|
|
5261
5431
|
);
|
|
5262
5432
|
}
|
|
5263
5433
|
function AlertDialogFooter({ className, ...props }) {
|
|
5264
|
-
return /* @__PURE__ */
|
|
5434
|
+
return /* @__PURE__ */ jsx48(
|
|
5265
5435
|
"div",
|
|
5266
5436
|
{
|
|
5267
5437
|
"data-slot": "alert-dialog-footer",
|
|
@@ -5271,7 +5441,7 @@ function AlertDialogFooter({ className, ...props }) {
|
|
|
5271
5441
|
);
|
|
5272
5442
|
}
|
|
5273
5443
|
function AlertDialogTitle({ className, ...props }) {
|
|
5274
|
-
return /* @__PURE__ */
|
|
5444
|
+
return /* @__PURE__ */ jsx48(
|
|
5275
5445
|
"h2",
|
|
5276
5446
|
{
|
|
5277
5447
|
"data-slot": "alert-dialog-title",
|
|
@@ -5281,7 +5451,7 @@ function AlertDialogTitle({ className, ...props }) {
|
|
|
5281
5451
|
);
|
|
5282
5452
|
}
|
|
5283
5453
|
function AlertDialogDescription({ className, ...props }) {
|
|
5284
|
-
return /* @__PURE__ */
|
|
5454
|
+
return /* @__PURE__ */ jsx48(
|
|
5285
5455
|
"p",
|
|
5286
5456
|
{
|
|
5287
5457
|
"data-slot": "alert-dialog-description",
|
|
@@ -5292,7 +5462,7 @@ function AlertDialogDescription({ className, ...props }) {
|
|
|
5292
5462
|
}
|
|
5293
5463
|
function AlertDialogAction({ className, onClick, ...props }) {
|
|
5294
5464
|
const { setOpen } = useAlertDialog();
|
|
5295
|
-
return /* @__PURE__ */
|
|
5465
|
+
return /* @__PURE__ */ jsx48(
|
|
5296
5466
|
"button",
|
|
5297
5467
|
{
|
|
5298
5468
|
"data-slot": "alert-dialog-action",
|
|
@@ -5307,7 +5477,7 @@ function AlertDialogAction({ className, onClick, ...props }) {
|
|
|
5307
5477
|
}
|
|
5308
5478
|
function AlertDialogCancel({ className, onClick, ...props }) {
|
|
5309
5479
|
const { setOpen } = useAlertDialog();
|
|
5310
|
-
return /* @__PURE__ */
|
|
5480
|
+
return /* @__PURE__ */ jsx48(
|
|
5311
5481
|
"button",
|
|
5312
5482
|
{
|
|
5313
5483
|
"data-slot": "alert-dialog-cancel",
|
|
@@ -5322,7 +5492,7 @@ function AlertDialogCancel({ className, onClick, ...props }) {
|
|
|
5322
5492
|
}
|
|
5323
5493
|
|
|
5324
5494
|
// src/components/sheet.tsx
|
|
5325
|
-
import * as
|
|
5495
|
+
import * as React58 from "react";
|
|
5326
5496
|
|
|
5327
5497
|
// src/generated/sheet.ts
|
|
5328
5498
|
var SHEET_OVERLAY = "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50";
|
|
@@ -5338,10 +5508,10 @@ var SHEET_TITLE = "text-foreground font-semibold";
|
|
|
5338
5508
|
var SHEET_DESCRIPTION = "text-muted-foreground text-sm";
|
|
5339
5509
|
|
|
5340
5510
|
// src/components/sheet.tsx
|
|
5341
|
-
import { jsx as
|
|
5342
|
-
var SheetContext =
|
|
5511
|
+
import { jsx as jsx49, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
5512
|
+
var SheetContext = React58.createContext(null);
|
|
5343
5513
|
function useSheet() {
|
|
5344
|
-
const ctx =
|
|
5514
|
+
const ctx = React58.useContext(SheetContext);
|
|
5345
5515
|
if (!ctx) throw new Error("Sheet parts must be used within <Sheet>");
|
|
5346
5516
|
return ctx;
|
|
5347
5517
|
}
|
|
@@ -5351,13 +5521,13 @@ function Sheet({ open, defaultOpen = false, onOpenChange, children }) {
|
|
|
5351
5521
|
defaultValue: defaultOpen,
|
|
5352
5522
|
...onOpenChange ? { onChange: onOpenChange } : {}
|
|
5353
5523
|
});
|
|
5354
|
-
const triggerRef =
|
|
5355
|
-
return /* @__PURE__ */
|
|
5524
|
+
const triggerRef = React58.useRef(null);
|
|
5525
|
+
return /* @__PURE__ */ jsx49(SheetContext.Provider, { value: { open: isOpen, setOpen, triggerRef }, children });
|
|
5356
5526
|
}
|
|
5357
5527
|
function SheetTrigger({ asChild = false, onClick, ...props }) {
|
|
5358
5528
|
const { open, setOpen, triggerRef } = useSheet();
|
|
5359
5529
|
const Comp = asChild ? Slot : "button";
|
|
5360
|
-
return /* @__PURE__ */
|
|
5530
|
+
return /* @__PURE__ */ jsx49(
|
|
5361
5531
|
Comp,
|
|
5362
5532
|
{
|
|
5363
5533
|
"data-slot": "sheet-trigger",
|
|
@@ -5373,7 +5543,7 @@ function SheetTrigger({ asChild = false, onClick, ...props }) {
|
|
|
5373
5543
|
}
|
|
5374
5544
|
function SheetOverlay({ className, ...props }) {
|
|
5375
5545
|
const { open, setOpen } = useSheet();
|
|
5376
|
-
return /* @__PURE__ */
|
|
5546
|
+
return /* @__PURE__ */ jsx49(
|
|
5377
5547
|
"div",
|
|
5378
5548
|
{
|
|
5379
5549
|
"data-slot": "sheet-overlay",
|
|
@@ -5390,7 +5560,7 @@ var sheetSideClasses = {
|
|
|
5390
5560
|
top: SHEET_SIDE_TOP,
|
|
5391
5561
|
bottom: SHEET_SIDE_BOTTOM
|
|
5392
5562
|
};
|
|
5393
|
-
var XIcon2 = (props) => /* @__PURE__ */
|
|
5563
|
+
var XIcon2 = (props) => /* @__PURE__ */ jsx49(
|
|
5394
5564
|
"svg",
|
|
5395
5565
|
{
|
|
5396
5566
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -5403,7 +5573,7 @@ var XIcon2 = (props) => /* @__PURE__ */ jsx48(
|
|
|
5403
5573
|
strokeLinecap: "round",
|
|
5404
5574
|
strokeLinejoin: "round",
|
|
5405
5575
|
...props,
|
|
5406
|
-
children: /* @__PURE__ */
|
|
5576
|
+
children: /* @__PURE__ */ jsx49("path", { d: "M18 6 6 18M6 6l12 12" })
|
|
5407
5577
|
}
|
|
5408
5578
|
);
|
|
5409
5579
|
function SheetContent({ className, children, side = "right", ...props }) {
|
|
@@ -5416,9 +5586,9 @@ function SheetContent({ className, children, side = "right", ...props }) {
|
|
|
5416
5586
|
exclude: [triggerRef]
|
|
5417
5587
|
});
|
|
5418
5588
|
if (!isPresent) return null;
|
|
5419
|
-
return /* @__PURE__ */
|
|
5420
|
-
/* @__PURE__ */
|
|
5421
|
-
/* @__PURE__ */
|
|
5589
|
+
return /* @__PURE__ */ jsxs19(Portal, { children: [
|
|
5590
|
+
/* @__PURE__ */ jsx49(SheetOverlay, {}),
|
|
5591
|
+
/* @__PURE__ */ jsxs19(
|
|
5422
5592
|
"div",
|
|
5423
5593
|
{
|
|
5424
5594
|
"data-slot": "sheet-content",
|
|
@@ -5430,7 +5600,7 @@ function SheetContent({ className, children, side = "right", ...props }) {
|
|
|
5430
5600
|
...props,
|
|
5431
5601
|
children: [
|
|
5432
5602
|
children,
|
|
5433
|
-
/* @__PURE__ */
|
|
5603
|
+
/* @__PURE__ */ jsxs19(
|
|
5434
5604
|
"button",
|
|
5435
5605
|
{
|
|
5436
5606
|
type: "button",
|
|
@@ -5438,8 +5608,8 @@ function SheetContent({ className, children, side = "right", ...props }) {
|
|
|
5438
5608
|
onClick: () => setOpen(false),
|
|
5439
5609
|
className: SHEET_CLOSE,
|
|
5440
5610
|
children: [
|
|
5441
|
-
/* @__PURE__ */
|
|
5442
|
-
/* @__PURE__ */
|
|
5611
|
+
/* @__PURE__ */ jsx49(XIcon2, { className: "size-4" }),
|
|
5612
|
+
/* @__PURE__ */ jsx49("span", { className: "sr-only", children: "Close" })
|
|
5443
5613
|
]
|
|
5444
5614
|
}
|
|
5445
5615
|
)
|
|
@@ -5451,7 +5621,7 @@ function SheetContent({ className, children, side = "right", ...props }) {
|
|
|
5451
5621
|
function SheetClose({ asChild = false, onClick, ...props }) {
|
|
5452
5622
|
const { setOpen } = useSheet();
|
|
5453
5623
|
const Comp = asChild ? Slot : "button";
|
|
5454
|
-
return /* @__PURE__ */
|
|
5624
|
+
return /* @__PURE__ */ jsx49(
|
|
5455
5625
|
Comp,
|
|
5456
5626
|
{
|
|
5457
5627
|
"data-slot": "sheet-close",
|
|
@@ -5464,7 +5634,7 @@ function SheetClose({ asChild = false, onClick, ...props }) {
|
|
|
5464
5634
|
);
|
|
5465
5635
|
}
|
|
5466
5636
|
function SheetHeader({ className, ...props }) {
|
|
5467
|
-
return /* @__PURE__ */
|
|
5637
|
+
return /* @__PURE__ */ jsx49(
|
|
5468
5638
|
"div",
|
|
5469
5639
|
{
|
|
5470
5640
|
"data-slot": "sheet-header",
|
|
@@ -5474,7 +5644,7 @@ function SheetHeader({ className, ...props }) {
|
|
|
5474
5644
|
);
|
|
5475
5645
|
}
|
|
5476
5646
|
function SheetFooter({ className, ...props }) {
|
|
5477
|
-
return /* @__PURE__ */
|
|
5647
|
+
return /* @__PURE__ */ jsx49(
|
|
5478
5648
|
"div",
|
|
5479
5649
|
{
|
|
5480
5650
|
"data-slot": "sheet-footer",
|
|
@@ -5484,7 +5654,7 @@ function SheetFooter({ className, ...props }) {
|
|
|
5484
5654
|
);
|
|
5485
5655
|
}
|
|
5486
5656
|
function SheetTitle({ className, ...props }) {
|
|
5487
|
-
return /* @__PURE__ */
|
|
5657
|
+
return /* @__PURE__ */ jsx49(
|
|
5488
5658
|
"h2",
|
|
5489
5659
|
{
|
|
5490
5660
|
"data-slot": "sheet-title",
|
|
@@ -5494,7 +5664,7 @@ function SheetTitle({ className, ...props }) {
|
|
|
5494
5664
|
);
|
|
5495
5665
|
}
|
|
5496
5666
|
function SheetDescription({ className, ...props }) {
|
|
5497
|
-
return /* @__PURE__ */
|
|
5667
|
+
return /* @__PURE__ */ jsx49(
|
|
5498
5668
|
"p",
|
|
5499
5669
|
{
|
|
5500
5670
|
"data-slot": "sheet-description",
|
|
@@ -5505,7 +5675,7 @@ function SheetDescription({ className, ...props }) {
|
|
|
5505
5675
|
}
|
|
5506
5676
|
|
|
5507
5677
|
// src/components/drawer.tsx
|
|
5508
|
-
import * as
|
|
5678
|
+
import * as React59 from "react";
|
|
5509
5679
|
|
|
5510
5680
|
// src/generated/drawer.ts
|
|
5511
5681
|
var DRAWER_CONTENT_BASE = "bg-background fixed z-50 flex h-auto border";
|
|
@@ -5523,10 +5693,10 @@ var DRAWER_TITLE = "text-foreground font-semibold";
|
|
|
5523
5693
|
var DRAWER_DESCRIPTION = "text-muted-foreground text-sm";
|
|
5524
5694
|
|
|
5525
5695
|
// src/components/drawer.tsx
|
|
5526
|
-
import { jsx as
|
|
5527
|
-
var DrawerContext =
|
|
5696
|
+
import { jsx as jsx50, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
5697
|
+
var DrawerContext = React59.createContext(null);
|
|
5528
5698
|
function useDrawer() {
|
|
5529
|
-
const ctx =
|
|
5699
|
+
const ctx = React59.useContext(DrawerContext);
|
|
5530
5700
|
if (!ctx) throw new Error("Drawer parts must be used within <Drawer>");
|
|
5531
5701
|
return ctx;
|
|
5532
5702
|
}
|
|
@@ -5542,12 +5712,12 @@ function Drawer({
|
|
|
5542
5712
|
defaultValue: defaultOpen,
|
|
5543
5713
|
...onOpenChange ? { onChange: onOpenChange } : {}
|
|
5544
5714
|
});
|
|
5545
|
-
return /* @__PURE__ */
|
|
5715
|
+
return /* @__PURE__ */ jsx50(DrawerContext.Provider, { value: { open: isOpen, setOpen, direction }, children: /* @__PURE__ */ jsx50("div", { "data-slot": "drawer", children }) });
|
|
5546
5716
|
}
|
|
5547
5717
|
function DrawerTrigger({ asChild = false, onClick, ...props }) {
|
|
5548
5718
|
const { setOpen } = useDrawer();
|
|
5549
5719
|
const Comp = asChild ? Slot : "button";
|
|
5550
|
-
return /* @__PURE__ */
|
|
5720
|
+
return /* @__PURE__ */ jsx50(
|
|
5551
5721
|
Comp,
|
|
5552
5722
|
{
|
|
5553
5723
|
"data-slot": "drawer-trigger",
|
|
@@ -5562,7 +5732,7 @@ function DrawerTrigger({ asChild = false, onClick, ...props }) {
|
|
|
5562
5732
|
function DrawerClose({ asChild = false, onClick, ...props }) {
|
|
5563
5733
|
const { setOpen } = useDrawer();
|
|
5564
5734
|
const Comp = asChild ? Slot : "button";
|
|
5565
|
-
return /* @__PURE__ */
|
|
5735
|
+
return /* @__PURE__ */ jsx50(
|
|
5566
5736
|
Comp,
|
|
5567
5737
|
{
|
|
5568
5738
|
"data-slot": "drawer-close",
|
|
@@ -5577,7 +5747,7 @@ function DrawerClose({ asChild = false, onClick, ...props }) {
|
|
|
5577
5747
|
function DrawerOverlay({ className, ...props }) {
|
|
5578
5748
|
const { open, setOpen } = useDrawer();
|
|
5579
5749
|
if (!open) return null;
|
|
5580
|
-
return /* @__PURE__ */
|
|
5750
|
+
return /* @__PURE__ */ jsx50(
|
|
5581
5751
|
"div",
|
|
5582
5752
|
{
|
|
5583
5753
|
"data-slot": "drawer-overlay",
|
|
@@ -5592,8 +5762,8 @@ function DrawerContent({ className, children, ...props }) {
|
|
|
5592
5762
|
const { open, setOpen, direction } = useDrawer();
|
|
5593
5763
|
const scopeRef = useFocusScope(open);
|
|
5594
5764
|
if (!open) return null;
|
|
5595
|
-
return /* @__PURE__ */
|
|
5596
|
-
/* @__PURE__ */
|
|
5765
|
+
return /* @__PURE__ */ jsxs20(Portal, { children: [
|
|
5766
|
+
/* @__PURE__ */ jsx50(
|
|
5597
5767
|
"div",
|
|
5598
5768
|
{
|
|
5599
5769
|
"data-slot": "drawer-overlay",
|
|
@@ -5601,7 +5771,7 @@ function DrawerContent({ className, children, ...props }) {
|
|
|
5601
5771
|
onClick: () => setOpen(false)
|
|
5602
5772
|
}
|
|
5603
5773
|
),
|
|
5604
|
-
/* @__PURE__ */
|
|
5774
|
+
/* @__PURE__ */ jsxs20(
|
|
5605
5775
|
"div",
|
|
5606
5776
|
{
|
|
5607
5777
|
role: "dialog",
|
|
@@ -5616,7 +5786,7 @@ function DrawerContent({ className, children, ...props }) {
|
|
|
5616
5786
|
className: cn(DRAWER_CONTENT_BASE, drawerDirectionClasses[direction], className),
|
|
5617
5787
|
...props,
|
|
5618
5788
|
children: [
|
|
5619
|
-
direction === "bottom" ? /* @__PURE__ */
|
|
5789
|
+
direction === "bottom" ? /* @__PURE__ */ jsx50(
|
|
5620
5790
|
"div",
|
|
5621
5791
|
{
|
|
5622
5792
|
"data-slot": "drawer-handle",
|
|
@@ -5630,7 +5800,7 @@ function DrawerContent({ className, children, ...props }) {
|
|
|
5630
5800
|
] });
|
|
5631
5801
|
}
|
|
5632
5802
|
function DrawerHeader({ className, ...props }) {
|
|
5633
|
-
return /* @__PURE__ */
|
|
5803
|
+
return /* @__PURE__ */ jsx50(
|
|
5634
5804
|
"div",
|
|
5635
5805
|
{
|
|
5636
5806
|
"data-slot": "drawer-header",
|
|
@@ -5640,7 +5810,7 @@ function DrawerHeader({ className, ...props }) {
|
|
|
5640
5810
|
);
|
|
5641
5811
|
}
|
|
5642
5812
|
function DrawerFooter({ className, ...props }) {
|
|
5643
|
-
return /* @__PURE__ */
|
|
5813
|
+
return /* @__PURE__ */ jsx50(
|
|
5644
5814
|
"div",
|
|
5645
5815
|
{
|
|
5646
5816
|
"data-slot": "drawer-footer",
|
|
@@ -5650,7 +5820,7 @@ function DrawerFooter({ className, ...props }) {
|
|
|
5650
5820
|
);
|
|
5651
5821
|
}
|
|
5652
5822
|
function DrawerTitle({ className, ...props }) {
|
|
5653
|
-
return /* @__PURE__ */
|
|
5823
|
+
return /* @__PURE__ */ jsx50(
|
|
5654
5824
|
"div",
|
|
5655
5825
|
{
|
|
5656
5826
|
"data-slot": "drawer-title",
|
|
@@ -5660,7 +5830,7 @@ function DrawerTitle({ className, ...props }) {
|
|
|
5660
5830
|
);
|
|
5661
5831
|
}
|
|
5662
5832
|
function DrawerDescription({ className, ...props }) {
|
|
5663
|
-
return /* @__PURE__ */
|
|
5833
|
+
return /* @__PURE__ */ jsx50(
|
|
5664
5834
|
"div",
|
|
5665
5835
|
{
|
|
5666
5836
|
"data-slot": "drawer-description",
|
|
@@ -5671,11 +5841,11 @@ function DrawerDescription({ className, ...props }) {
|
|
|
5671
5841
|
}
|
|
5672
5842
|
|
|
5673
5843
|
// src/components/select.tsx
|
|
5674
|
-
import * as
|
|
5675
|
-
import { jsx as
|
|
5676
|
-
var SelectContext =
|
|
5844
|
+
import * as React60 from "react";
|
|
5845
|
+
import { jsx as jsx51, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
5846
|
+
var SelectContext = React60.createContext(null);
|
|
5677
5847
|
function useSelect() {
|
|
5678
|
-
const ctx =
|
|
5848
|
+
const ctx = React60.useContext(SelectContext);
|
|
5679
5849
|
if (!ctx) throw new Error("Select parts must be used within <Select>");
|
|
5680
5850
|
return ctx;
|
|
5681
5851
|
}
|
|
@@ -5698,8 +5868,8 @@ function Select({
|
|
|
5698
5868
|
defaultValue: defaultOpen,
|
|
5699
5869
|
...onOpenChange ? { onChange: onOpenChange } : {}
|
|
5700
5870
|
});
|
|
5701
|
-
const anchorRef =
|
|
5702
|
-
return /* @__PURE__ */
|
|
5871
|
+
const anchorRef = React60.useRef(null);
|
|
5872
|
+
return /* @__PURE__ */ jsx51(
|
|
5703
5873
|
SelectContext.Provider,
|
|
5704
5874
|
{
|
|
5705
5875
|
value: { value: currentValue, setValue, open: isOpen, setOpen, anchorRef },
|
|
@@ -5715,7 +5885,7 @@ function SelectTrigger({
|
|
|
5715
5885
|
...props
|
|
5716
5886
|
}) {
|
|
5717
5887
|
const { open, setOpen, anchorRef } = useSelect();
|
|
5718
|
-
return /* @__PURE__ */
|
|
5888
|
+
return /* @__PURE__ */ jsxs21(
|
|
5719
5889
|
"button",
|
|
5720
5890
|
{
|
|
5721
5891
|
type: "button",
|
|
@@ -5736,7 +5906,7 @@ function SelectTrigger({
|
|
|
5736
5906
|
...props,
|
|
5737
5907
|
children: [
|
|
5738
5908
|
children,
|
|
5739
|
-
/* @__PURE__ */
|
|
5909
|
+
/* @__PURE__ */ jsx51(
|
|
5740
5910
|
"svg",
|
|
5741
5911
|
{
|
|
5742
5912
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -5750,7 +5920,7 @@ function SelectTrigger({
|
|
|
5750
5920
|
strokeLinejoin: "round",
|
|
5751
5921
|
className: "size-4 opacity-50",
|
|
5752
5922
|
"aria-hidden": "true",
|
|
5753
|
-
children: /* @__PURE__ */
|
|
5923
|
+
children: /* @__PURE__ */ jsx51("path", { d: "m6 9 6 6 6-6" })
|
|
5754
5924
|
}
|
|
5755
5925
|
)
|
|
5756
5926
|
]
|
|
@@ -5760,7 +5930,7 @@ function SelectTrigger({
|
|
|
5760
5930
|
function SelectValue({ className, placeholder, ...props }) {
|
|
5761
5931
|
const { value } = useSelect();
|
|
5762
5932
|
const isEmpty = value === "";
|
|
5763
|
-
return /* @__PURE__ */
|
|
5933
|
+
return /* @__PURE__ */ jsx51(
|
|
5764
5934
|
"span",
|
|
5765
5935
|
{
|
|
5766
5936
|
"data-slot": "select-value",
|
|
@@ -5793,13 +5963,13 @@ function SelectContent({
|
|
|
5793
5963
|
onDismiss: () => setOpen(false),
|
|
5794
5964
|
exclude: [anchorRef]
|
|
5795
5965
|
});
|
|
5796
|
-
const items =
|
|
5966
|
+
const items = React60.Children.toArray(children).filter(React60.isValidElement);
|
|
5797
5967
|
const { activeIndex, setActiveIndex, onKeyDown } = useRovingFocus({
|
|
5798
5968
|
count: items.length,
|
|
5799
5969
|
orientation: "vertical"
|
|
5800
5970
|
});
|
|
5801
5971
|
if (!isPresent) return null;
|
|
5802
|
-
return /* @__PURE__ */
|
|
5972
|
+
return /* @__PURE__ */ jsx51(Portal, { children: /* @__PURE__ */ jsx51(
|
|
5803
5973
|
"div",
|
|
5804
5974
|
{
|
|
5805
5975
|
role: "listbox",
|
|
@@ -5815,8 +5985,8 @@ function SelectContent({
|
|
|
5815
5985
|
className
|
|
5816
5986
|
),
|
|
5817
5987
|
...props,
|
|
5818
|
-
children: /* @__PURE__ */
|
|
5819
|
-
(child, index) =>
|
|
5988
|
+
children: /* @__PURE__ */ jsx51("div", { className: "p-1", children: items.map(
|
|
5989
|
+
(child, index) => React60.cloneElement(child, {
|
|
5820
5990
|
__index: index,
|
|
5821
5991
|
__active: index === activeIndex,
|
|
5822
5992
|
__setActive: setActiveIndex
|
|
@@ -5836,7 +6006,7 @@ function SelectItem({
|
|
|
5836
6006
|
}) {
|
|
5837
6007
|
const { value: selectedValue, setValue, setOpen } = useSelect();
|
|
5838
6008
|
const selected = selectedValue === value;
|
|
5839
|
-
return /* @__PURE__ */
|
|
6009
|
+
return /* @__PURE__ */ jsxs21(
|
|
5840
6010
|
"div",
|
|
5841
6011
|
{
|
|
5842
6012
|
role: "option",
|
|
@@ -5861,7 +6031,7 @@ function SelectItem({
|
|
|
5861
6031
|
),
|
|
5862
6032
|
...props,
|
|
5863
6033
|
children: [
|
|
5864
|
-
selected ? /* @__PURE__ */
|
|
6034
|
+
selected ? /* @__PURE__ */ jsx51("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx51(
|
|
5865
6035
|
"svg",
|
|
5866
6036
|
{
|
|
5867
6037
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -5875,19 +6045,19 @@ function SelectItem({
|
|
|
5875
6045
|
strokeLinejoin: "round",
|
|
5876
6046
|
className: "size-4",
|
|
5877
6047
|
"aria-hidden": "true",
|
|
5878
|
-
children: /* @__PURE__ */
|
|
6048
|
+
children: /* @__PURE__ */ jsx51("path", { d: "M20 6 9 17l-5-5" })
|
|
5879
6049
|
}
|
|
5880
6050
|
) }) : null,
|
|
5881
|
-
/* @__PURE__ */
|
|
6051
|
+
/* @__PURE__ */ jsx51("span", { children })
|
|
5882
6052
|
]
|
|
5883
6053
|
}
|
|
5884
6054
|
);
|
|
5885
6055
|
}
|
|
5886
6056
|
function SelectGroup({ className, ...props }) {
|
|
5887
|
-
return /* @__PURE__ */
|
|
6057
|
+
return /* @__PURE__ */ jsx51("div", { role: "group", "data-slot": "select-group", className, ...props });
|
|
5888
6058
|
}
|
|
5889
6059
|
function SelectLabel({ className, ...props }) {
|
|
5890
|
-
return /* @__PURE__ */
|
|
6060
|
+
return /* @__PURE__ */ jsx51(
|
|
5891
6061
|
"div",
|
|
5892
6062
|
{
|
|
5893
6063
|
"data-slot": "select-label",
|
|
@@ -5897,7 +6067,7 @@ function SelectLabel({ className, ...props }) {
|
|
|
5897
6067
|
);
|
|
5898
6068
|
}
|
|
5899
6069
|
function SelectSeparator({ className, ...props }) {
|
|
5900
|
-
return /* @__PURE__ */
|
|
6070
|
+
return /* @__PURE__ */ jsx51(
|
|
5901
6071
|
"div",
|
|
5902
6072
|
{
|
|
5903
6073
|
"data-slot": "select-separator",
|
|
@@ -5908,7 +6078,7 @@ function SelectSeparator({ className, ...props }) {
|
|
|
5908
6078
|
}
|
|
5909
6079
|
|
|
5910
6080
|
// src/components/command.tsx
|
|
5911
|
-
import * as
|
|
6081
|
+
import * as React61 from "react";
|
|
5912
6082
|
|
|
5913
6083
|
// src/generated/command.ts
|
|
5914
6084
|
var COMMAND_ROOT = "bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md";
|
|
@@ -5925,10 +6095,10 @@ var COMMAND_SEPARATOR = "bg-border -mx-1 h-px";
|
|
|
5925
6095
|
var COMMAND_SHORTCUT = "text-muted-foreground ml-auto text-xs tracking-widest";
|
|
5926
6096
|
|
|
5927
6097
|
// src/components/command.tsx
|
|
5928
|
-
import { jsx as
|
|
5929
|
-
var CommandContext =
|
|
6098
|
+
import { jsx as jsx52, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
6099
|
+
var CommandContext = React61.createContext(null);
|
|
5930
6100
|
function useCommand() {
|
|
5931
|
-
const ctx =
|
|
6101
|
+
const ctx = React61.useContext(CommandContext);
|
|
5932
6102
|
if (!ctx) throw new Error("Command parts must be used within <Command>");
|
|
5933
6103
|
return ctx;
|
|
5934
6104
|
}
|
|
@@ -5945,7 +6115,7 @@ function Command({
|
|
|
5945
6115
|
defaultValue: defaultSearch,
|
|
5946
6116
|
...onSearchChange ? { onChange: onSearchChange } : {}
|
|
5947
6117
|
});
|
|
5948
|
-
return /* @__PURE__ */
|
|
6118
|
+
return /* @__PURE__ */ jsx52(CommandContext.Provider, { value: { search: currentSearch, setSearch }, children: /* @__PURE__ */ jsx52(
|
|
5949
6119
|
"div",
|
|
5950
6120
|
{
|
|
5951
6121
|
"data-slot": "command",
|
|
@@ -5969,8 +6139,8 @@ function CommandDialog({
|
|
|
5969
6139
|
});
|
|
5970
6140
|
const scopeRef = useFocusScope(isOpen);
|
|
5971
6141
|
if (!isOpen) return null;
|
|
5972
|
-
return /* @__PURE__ */
|
|
5973
|
-
/* @__PURE__ */
|
|
6142
|
+
return /* @__PURE__ */ jsxs22(Portal, { children: [
|
|
6143
|
+
/* @__PURE__ */ jsx52(
|
|
5974
6144
|
"div",
|
|
5975
6145
|
{
|
|
5976
6146
|
"data-slot": "command-overlay",
|
|
@@ -5978,7 +6148,7 @@ function CommandDialog({
|
|
|
5978
6148
|
onClick: () => setOpen(false)
|
|
5979
6149
|
}
|
|
5980
6150
|
),
|
|
5981
|
-
/* @__PURE__ */
|
|
6151
|
+
/* @__PURE__ */ jsx52(
|
|
5982
6152
|
"div",
|
|
5983
6153
|
{
|
|
5984
6154
|
role: "dialog",
|
|
@@ -5989,7 +6159,7 @@ function CommandDialog({
|
|
|
5989
6159
|
if (e.key === "Escape") setOpen(false);
|
|
5990
6160
|
},
|
|
5991
6161
|
className: cn(COMMAND_DIALOG_CONTENT, className),
|
|
5992
|
-
children: /* @__PURE__ */
|
|
6162
|
+
children: /* @__PURE__ */ jsx52(Command, { className: COMMAND_DIALOG_COMMAND, children })
|
|
5993
6163
|
}
|
|
5994
6164
|
)
|
|
5995
6165
|
] });
|
|
@@ -5999,8 +6169,8 @@ function CommandInput({
|
|
|
5999
6169
|
...props
|
|
6000
6170
|
}) {
|
|
6001
6171
|
const { search, setSearch } = useCommand();
|
|
6002
|
-
return /* @__PURE__ */
|
|
6003
|
-
/* @__PURE__ */
|
|
6172
|
+
return /* @__PURE__ */ jsxs22("div", { className: COMMAND_INPUT_WRAPPER, "data-slot": "command-input-wrapper", children: [
|
|
6173
|
+
/* @__PURE__ */ jsxs22(
|
|
6004
6174
|
"svg",
|
|
6005
6175
|
{
|
|
6006
6176
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -6015,12 +6185,12 @@ function CommandInput({
|
|
|
6015
6185
|
className: "size-4 shrink-0 opacity-50",
|
|
6016
6186
|
"aria-hidden": "true",
|
|
6017
6187
|
children: [
|
|
6018
|
-
/* @__PURE__ */
|
|
6019
|
-
/* @__PURE__ */
|
|
6188
|
+
/* @__PURE__ */ jsx52("circle", { cx: "11", cy: "11", r: "8" }),
|
|
6189
|
+
/* @__PURE__ */ jsx52("path", { d: "m21 21-4.3-4.3" })
|
|
6020
6190
|
]
|
|
6021
6191
|
}
|
|
6022
6192
|
),
|
|
6023
|
-
/* @__PURE__ */
|
|
6193
|
+
/* @__PURE__ */ jsx52(
|
|
6024
6194
|
"input",
|
|
6025
6195
|
{
|
|
6026
6196
|
type: "text",
|
|
@@ -6035,7 +6205,7 @@ function CommandInput({
|
|
|
6035
6205
|
] });
|
|
6036
6206
|
}
|
|
6037
6207
|
function CommandList({ className, ...props }) {
|
|
6038
|
-
return /* @__PURE__ */
|
|
6208
|
+
return /* @__PURE__ */ jsx52(
|
|
6039
6209
|
"div",
|
|
6040
6210
|
{
|
|
6041
6211
|
role: "listbox",
|
|
@@ -6049,7 +6219,7 @@ function CommandEmpty({ className, children, ...props }) {
|
|
|
6049
6219
|
const { search } = useCommand();
|
|
6050
6220
|
const hasQuery = search.trim() !== "";
|
|
6051
6221
|
if (!hasQuery) return null;
|
|
6052
|
-
return /* @__PURE__ */
|
|
6222
|
+
return /* @__PURE__ */ jsx52(
|
|
6053
6223
|
"div",
|
|
6054
6224
|
{
|
|
6055
6225
|
"data-slot": "command-empty",
|
|
@@ -6060,7 +6230,7 @@ function CommandEmpty({ className, children, ...props }) {
|
|
|
6060
6230
|
);
|
|
6061
6231
|
}
|
|
6062
6232
|
function CommandGroup({ className, heading, children, ...props }) {
|
|
6063
|
-
return /* @__PURE__ */
|
|
6233
|
+
return /* @__PURE__ */ jsxs22(
|
|
6064
6234
|
"div",
|
|
6065
6235
|
{
|
|
6066
6236
|
role: "group",
|
|
@@ -6068,7 +6238,7 @@ function CommandGroup({ className, heading, children, ...props }) {
|
|
|
6068
6238
|
className: cn(COMMAND_GROUP, className),
|
|
6069
6239
|
...props,
|
|
6070
6240
|
children: [
|
|
6071
|
-
heading ? /* @__PURE__ */
|
|
6241
|
+
heading ? /* @__PURE__ */ jsx52("div", { "data-slot": "command-group-heading", children: heading }) : null,
|
|
6072
6242
|
children
|
|
6073
6243
|
]
|
|
6074
6244
|
}
|
|
@@ -6085,7 +6255,7 @@ function CommandItem({
|
|
|
6085
6255
|
const { search } = useCommand();
|
|
6086
6256
|
const query = search.toLowerCase();
|
|
6087
6257
|
if (query !== "" && !value.toLowerCase().includes(query)) return null;
|
|
6088
|
-
return /* @__PURE__ */
|
|
6258
|
+
return /* @__PURE__ */ jsx52(
|
|
6089
6259
|
"div",
|
|
6090
6260
|
{
|
|
6091
6261
|
role: "option",
|
|
@@ -6103,7 +6273,7 @@ function CommandItem({
|
|
|
6103
6273
|
);
|
|
6104
6274
|
}
|
|
6105
6275
|
function CommandSeparator({ className, ...props }) {
|
|
6106
|
-
return /* @__PURE__ */
|
|
6276
|
+
return /* @__PURE__ */ jsx52(
|
|
6107
6277
|
"div",
|
|
6108
6278
|
{
|
|
6109
6279
|
"data-slot": "command-separator",
|
|
@@ -6113,7 +6283,7 @@ function CommandSeparator({ className, ...props }) {
|
|
|
6113
6283
|
);
|
|
6114
6284
|
}
|
|
6115
6285
|
function CommandShortcut({ className, ...props }) {
|
|
6116
|
-
return /* @__PURE__ */
|
|
6286
|
+
return /* @__PURE__ */ jsx52(
|
|
6117
6287
|
"span",
|
|
6118
6288
|
{
|
|
6119
6289
|
"data-slot": "command-shortcut",
|
|
@@ -6124,7 +6294,7 @@ function CommandShortcut({ className, ...props }) {
|
|
|
6124
6294
|
}
|
|
6125
6295
|
|
|
6126
6296
|
// src/components/chart.tsx
|
|
6127
|
-
import * as
|
|
6297
|
+
import * as React62 from "react";
|
|
6128
6298
|
|
|
6129
6299
|
// src/generated/chart.ts
|
|
6130
6300
|
var CHART_CONTAINER = "flex aspect-video justify-center text-xs [&_.recharts-layer]:outline-hidden [&_.recharts-surface]:outline-hidden [&_svg]:outline-hidden";
|
|
@@ -6132,10 +6302,10 @@ var CHART_TOOLTIP = "border-border/50 bg-background grid min-w-[8rem] items-star
|
|
|
6132
6302
|
var CHART_LEGEND = "flex items-center justify-center gap-4";
|
|
6133
6303
|
|
|
6134
6304
|
// src/components/chart.tsx
|
|
6135
|
-
import { Fragment as Fragment6, jsx as
|
|
6136
|
-
var ChartContext =
|
|
6305
|
+
import { Fragment as Fragment6, jsx as jsx53, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
6306
|
+
var ChartContext = React62.createContext(null);
|
|
6137
6307
|
function useChart() {
|
|
6138
|
-
const context =
|
|
6308
|
+
const context = React62.useContext(ChartContext);
|
|
6139
6309
|
if (!context) {
|
|
6140
6310
|
throw new Error("useChart must be used within a <ChartContainer />");
|
|
6141
6311
|
}
|
|
@@ -6148,9 +6318,9 @@ function ChartContainer({
|
|
|
6148
6318
|
config,
|
|
6149
6319
|
...props
|
|
6150
6320
|
}) {
|
|
6151
|
-
const uniqueId =
|
|
6321
|
+
const uniqueId = React62.useId();
|
|
6152
6322
|
const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`;
|
|
6153
|
-
return /* @__PURE__ */
|
|
6323
|
+
return /* @__PURE__ */ jsx53(ChartContext.Provider, { value: { config }, children: /* @__PURE__ */ jsxs23(
|
|
6154
6324
|
"div",
|
|
6155
6325
|
{
|
|
6156
6326
|
"data-slot": "chart",
|
|
@@ -6158,7 +6328,7 @@ function ChartContainer({
|
|
|
6158
6328
|
className: cn(CHART_CONTAINER, className),
|
|
6159
6329
|
...props,
|
|
6160
6330
|
children: [
|
|
6161
|
-
/* @__PURE__ */
|
|
6331
|
+
/* @__PURE__ */ jsx53(ChartStyle, { id: chartId, config }),
|
|
6162
6332
|
children
|
|
6163
6333
|
]
|
|
6164
6334
|
}
|
|
@@ -6169,7 +6339,7 @@ var ChartStyle = ({ id, config }) => {
|
|
|
6169
6339
|
if (!colorConfig.length) {
|
|
6170
6340
|
return null;
|
|
6171
6341
|
}
|
|
6172
|
-
return /* @__PURE__ */
|
|
6342
|
+
return /* @__PURE__ */ jsx53(
|
|
6173
6343
|
"style",
|
|
6174
6344
|
{
|
|
6175
6345
|
dangerouslySetInnerHTML: {
|
|
@@ -6180,7 +6350,7 @@ ${colorConfig.map(([key, itemConfig]) => ` --color-${key}: ${itemConfig.color};
|
|
|
6180
6350
|
}
|
|
6181
6351
|
);
|
|
6182
6352
|
};
|
|
6183
|
-
var ChartTooltip = ({ children }) => /* @__PURE__ */
|
|
6353
|
+
var ChartTooltip = ({ children }) => /* @__PURE__ */ jsx53(Fragment6, { children });
|
|
6184
6354
|
function ChartTooltipContent({
|
|
6185
6355
|
className,
|
|
6186
6356
|
items = [],
|
|
@@ -6193,21 +6363,21 @@ function ChartTooltipContent({
|
|
|
6193
6363
|
if (!items.length) {
|
|
6194
6364
|
return null;
|
|
6195
6365
|
}
|
|
6196
|
-
return /* @__PURE__ */
|
|
6366
|
+
return /* @__PURE__ */ jsxs23(
|
|
6197
6367
|
"div",
|
|
6198
6368
|
{
|
|
6199
6369
|
"data-slot": "chart-tooltip",
|
|
6200
6370
|
className: cn(CHART_TOOLTIP, className),
|
|
6201
6371
|
children: [
|
|
6202
|
-
!hideLabel && label ? /* @__PURE__ */
|
|
6203
|
-
/* @__PURE__ */
|
|
6372
|
+
!hideLabel && label ? /* @__PURE__ */ jsx53("div", { className: cn("font-medium", labelClassName), children: label }) : null,
|
|
6373
|
+
/* @__PURE__ */ jsx53("div", { className: "grid gap-1.5", children: items.map((item, index) => /* @__PURE__ */ jsxs23(
|
|
6204
6374
|
"div",
|
|
6205
6375
|
{
|
|
6206
6376
|
className: cn(
|
|
6207
6377
|
"[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 items-center"
|
|
6208
6378
|
),
|
|
6209
6379
|
children: [
|
|
6210
|
-
!hideIndicator && /* @__PURE__ */
|
|
6380
|
+
!hideIndicator && /* @__PURE__ */ jsx53(
|
|
6211
6381
|
"div",
|
|
6212
6382
|
{
|
|
6213
6383
|
className: "shrink-0 rounded-[2px] h-2.5 w-2.5",
|
|
@@ -6217,9 +6387,9 @@ function ChartTooltipContent({
|
|
|
6217
6387
|
}
|
|
6218
6388
|
}
|
|
6219
6389
|
),
|
|
6220
|
-
/* @__PURE__ */
|
|
6221
|
-
/* @__PURE__ */
|
|
6222
|
-
item.value !== void 0 && /* @__PURE__ */
|
|
6390
|
+
/* @__PURE__ */ jsxs23("div", { className: "flex flex-1 justify-between leading-none items-center", children: [
|
|
6391
|
+
/* @__PURE__ */ jsx53("span", { className: "text-muted-foreground", children: item.label }),
|
|
6392
|
+
item.value !== void 0 && /* @__PURE__ */ jsx53("span", { className: "text-foreground font-mono font-medium tabular-nums", children: item.value })
|
|
6223
6393
|
] })
|
|
6224
6394
|
]
|
|
6225
6395
|
},
|
|
@@ -6229,7 +6399,7 @@ function ChartTooltipContent({
|
|
|
6229
6399
|
}
|
|
6230
6400
|
);
|
|
6231
6401
|
}
|
|
6232
|
-
var ChartLegend = ({ children }) => /* @__PURE__ */
|
|
6402
|
+
var ChartLegend = ({ children }) => /* @__PURE__ */ jsx53(Fragment6, { children });
|
|
6233
6403
|
function ChartLegendContent({
|
|
6234
6404
|
className,
|
|
6235
6405
|
hideIcon = false,
|
|
@@ -6243,19 +6413,19 @@ function ChartLegendContent({
|
|
|
6243
6413
|
if (!rows.length) {
|
|
6244
6414
|
return null;
|
|
6245
6415
|
}
|
|
6246
|
-
return /* @__PURE__ */
|
|
6416
|
+
return /* @__PURE__ */ jsx53(
|
|
6247
6417
|
"div",
|
|
6248
6418
|
{
|
|
6249
6419
|
"data-slot": "chart-legend",
|
|
6250
6420
|
className: cn(CHART_LEGEND, className),
|
|
6251
|
-
children: rows.map((item, index) => /* @__PURE__ */
|
|
6421
|
+
children: rows.map((item, index) => /* @__PURE__ */ jsxs23(
|
|
6252
6422
|
"div",
|
|
6253
6423
|
{
|
|
6254
6424
|
className: cn(
|
|
6255
6425
|
"[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3"
|
|
6256
6426
|
),
|
|
6257
6427
|
children: [
|
|
6258
|
-
!hideIcon && /* @__PURE__ */
|
|
6428
|
+
!hideIcon && /* @__PURE__ */ jsx53(
|
|
6259
6429
|
"div",
|
|
6260
6430
|
{
|
|
6261
6431
|
className: "h-2 w-2 shrink-0 rounded-[2px]",
|
|
@@ -6272,7 +6442,7 @@ function ChartLegendContent({
|
|
|
6272
6442
|
}
|
|
6273
6443
|
|
|
6274
6444
|
// src/components/calendar.tsx
|
|
6275
|
-
import * as
|
|
6445
|
+
import * as React63 from "react";
|
|
6276
6446
|
|
|
6277
6447
|
// src/generated/calendar.ts
|
|
6278
6448
|
var CALENDAR_ROOT = "bg-background p-3 w-fit";
|
|
@@ -6290,7 +6460,7 @@ var CALENDAR_DAY_SELECTED = "bg-primary text-primary-foreground";
|
|
|
6290
6460
|
var CALENDAR_DAY_TODAY = "bg-accent text-accent-foreground rounded-md";
|
|
6291
6461
|
|
|
6292
6462
|
// src/components/calendar.tsx
|
|
6293
|
-
import { jsx as
|
|
6463
|
+
import { jsx as jsx54, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
6294
6464
|
var MONTHS = [
|
|
6295
6465
|
"January",
|
|
6296
6466
|
"February",
|
|
@@ -6309,7 +6479,7 @@ var WEEKDAYS = ["Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"];
|
|
|
6309
6479
|
var CHEVRON_LEFT = "m15 18-6-6 6-6";
|
|
6310
6480
|
var CHEVRON_RIGHT = "m9 18 6-6-6-6";
|
|
6311
6481
|
function Chevron({ d }) {
|
|
6312
|
-
return /* @__PURE__ */
|
|
6482
|
+
return /* @__PURE__ */ jsx54(
|
|
6313
6483
|
"svg",
|
|
6314
6484
|
{
|
|
6315
6485
|
className: "size-4",
|
|
@@ -6323,7 +6493,7 @@ function Chevron({ d }) {
|
|
|
6323
6493
|
strokeLinecap: "round",
|
|
6324
6494
|
strokeLinejoin: "round",
|
|
6325
6495
|
"aria-hidden": true,
|
|
6326
|
-
children: /* @__PURE__ */
|
|
6496
|
+
children: /* @__PURE__ */ jsx54("path", { d })
|
|
6327
6497
|
}
|
|
6328
6498
|
);
|
|
6329
6499
|
}
|
|
@@ -6345,7 +6515,7 @@ function Calendar({
|
|
|
6345
6515
|
today = /* @__PURE__ */ new Date(),
|
|
6346
6516
|
className
|
|
6347
6517
|
}) {
|
|
6348
|
-
const [internal, setInternal] =
|
|
6518
|
+
const [internal, setInternal] = React63.useState(
|
|
6349
6519
|
() => startOfMonth(defaultMonth ?? /* @__PURE__ */ new Date())
|
|
6350
6520
|
);
|
|
6351
6521
|
const view = month ? startOfMonth(month) : internal;
|
|
@@ -6370,38 +6540,38 @@ function Calendar({
|
|
|
6370
6540
|
size: "icon",
|
|
6371
6541
|
className: CALENDAR_NAV_BUTTON
|
|
6372
6542
|
});
|
|
6373
|
-
return /* @__PURE__ */
|
|
6543
|
+
return /* @__PURE__ */ jsxs24(
|
|
6374
6544
|
"div",
|
|
6375
6545
|
{
|
|
6376
6546
|
"data-slot": "calendar",
|
|
6377
6547
|
role: "application",
|
|
6378
6548
|
className: cn(CALENDAR_ROOT, className),
|
|
6379
6549
|
children: [
|
|
6380
|
-
/* @__PURE__ */
|
|
6381
|
-
/* @__PURE__ */
|
|
6550
|
+
/* @__PURE__ */ jsxs24("div", { className: CALENDAR_NAV, children: [
|
|
6551
|
+
/* @__PURE__ */ jsx54(
|
|
6382
6552
|
"button",
|
|
6383
6553
|
{
|
|
6384
6554
|
type: "button",
|
|
6385
6555
|
className: navClass,
|
|
6386
6556
|
"aria-label": "Previous month",
|
|
6387
6557
|
onClick: () => go(-1),
|
|
6388
|
-
children: /* @__PURE__ */
|
|
6558
|
+
children: /* @__PURE__ */ jsx54(Chevron, { d: CHEVRON_LEFT })
|
|
6389
6559
|
}
|
|
6390
6560
|
),
|
|
6391
|
-
/* @__PURE__ */
|
|
6392
|
-
/* @__PURE__ */
|
|
6561
|
+
/* @__PURE__ */ jsx54("div", { className: CALENDAR_CAPTION, children: caption }),
|
|
6562
|
+
/* @__PURE__ */ jsx54(
|
|
6393
6563
|
"button",
|
|
6394
6564
|
{
|
|
6395
6565
|
type: "button",
|
|
6396
6566
|
className: navClass,
|
|
6397
6567
|
"aria-label": "Next month",
|
|
6398
6568
|
onClick: () => go(1),
|
|
6399
|
-
children: /* @__PURE__ */
|
|
6569
|
+
children: /* @__PURE__ */ jsx54(Chevron, { d: CHEVRON_RIGHT })
|
|
6400
6570
|
}
|
|
6401
6571
|
)
|
|
6402
6572
|
] }),
|
|
6403
|
-
/* @__PURE__ */
|
|
6404
|
-
/* @__PURE__ */
|
|
6573
|
+
/* @__PURE__ */ jsxs24("table", { className: CALENDAR_GRID, role: "grid", children: [
|
|
6574
|
+
/* @__PURE__ */ jsx54("thead", { children: /* @__PURE__ */ jsx54("tr", { className: CALENDAR_WEEKDAY_ROW, children: WEEKDAYS.map((wd) => /* @__PURE__ */ jsx54(
|
|
6405
6575
|
"th",
|
|
6406
6576
|
{
|
|
6407
6577
|
scope: "col",
|
|
@@ -6410,9 +6580,9 @@ function Calendar({
|
|
|
6410
6580
|
},
|
|
6411
6581
|
wd
|
|
6412
6582
|
)) }) }),
|
|
6413
|
-
/* @__PURE__ */
|
|
6583
|
+
/* @__PURE__ */ jsx54("tbody", { children: weeks.map((week, wi) => /* @__PURE__ */ jsx54("tr", { className: CALENDAR_WEEK, children: week.map((cell, ci) => {
|
|
6414
6584
|
if (cell === null) {
|
|
6415
|
-
return /* @__PURE__ */
|
|
6585
|
+
return /* @__PURE__ */ jsx54(
|
|
6416
6586
|
"td",
|
|
6417
6587
|
{
|
|
6418
6588
|
className: CALENDAR_DAY_EMPTY
|
|
@@ -6423,13 +6593,13 @@ function Calendar({
|
|
|
6423
6593
|
const date = new Date(year, monthIndex, cell);
|
|
6424
6594
|
const isSelected = sameDay(selected, date);
|
|
6425
6595
|
const isToday = sameDay(today, date);
|
|
6426
|
-
return /* @__PURE__ */
|
|
6596
|
+
return /* @__PURE__ */ jsx54(
|
|
6427
6597
|
"td",
|
|
6428
6598
|
{
|
|
6429
6599
|
role: "gridcell",
|
|
6430
6600
|
"aria-selected": isSelected,
|
|
6431
6601
|
className: CALENDAR_DAY_CELL,
|
|
6432
|
-
children: /* @__PURE__ */
|
|
6602
|
+
children: /* @__PURE__ */ jsx54(
|
|
6433
6603
|
"button",
|
|
6434
6604
|
{
|
|
6435
6605
|
type: "button",
|
|
@@ -6459,7 +6629,7 @@ function Calendar({
|
|
|
6459
6629
|
}
|
|
6460
6630
|
|
|
6461
6631
|
// src/components/sonner.tsx
|
|
6462
|
-
import * as
|
|
6632
|
+
import * as React64 from "react";
|
|
6463
6633
|
|
|
6464
6634
|
// src/generated/sonner.ts
|
|
6465
6635
|
var TOAST_BASE = "pointer-events-auto flex w-full items-start gap-3 rounded-md border p-4 text-sm shadow-lg";
|
|
@@ -6484,7 +6654,7 @@ var TOAST_CONTENT = "flex-1 space-y-1";
|
|
|
6484
6654
|
var TOAST_TITLE = "font-medium";
|
|
6485
6655
|
|
|
6486
6656
|
// src/components/sonner.tsx
|
|
6487
|
-
import { jsx as
|
|
6657
|
+
import { jsx as jsx55, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
6488
6658
|
var DEFAULT_DURATION = 4e3;
|
|
6489
6659
|
var SWIPE_THRESHOLD = 45;
|
|
6490
6660
|
var SWIPE_VELOCITY = 0.11;
|
|
@@ -6549,17 +6719,17 @@ function ToastItem({
|
|
|
6549
6719
|
reportHeight,
|
|
6550
6720
|
removeHeight
|
|
6551
6721
|
}) {
|
|
6552
|
-
const ref =
|
|
6553
|
-
const [height, setHeight] =
|
|
6554
|
-
const remainingRef =
|
|
6555
|
-
const startedRef =
|
|
6556
|
-
const flingRef =
|
|
6722
|
+
const ref = React64.useRef(null);
|
|
6723
|
+
const [height, setHeight] = React64.useState(0);
|
|
6724
|
+
const remainingRef = React64.useRef(t.duration);
|
|
6725
|
+
const startedRef = React64.useRef(0);
|
|
6726
|
+
const flingRef = React64.useRef(
|
|
6557
6727
|
void 0
|
|
6558
6728
|
);
|
|
6559
|
-
const dragRef =
|
|
6729
|
+
const dragRef = React64.useRef(
|
|
6560
6730
|
null
|
|
6561
6731
|
);
|
|
6562
|
-
|
|
6732
|
+
React64.useLayoutEffect(() => {
|
|
6563
6733
|
const el = ref.current;
|
|
6564
6734
|
if (!el) return;
|
|
6565
6735
|
el.style.height = "auto";
|
|
@@ -6570,8 +6740,8 @@ function ToastItem({
|
|
|
6570
6740
|
reportHeight(t.id, h);
|
|
6571
6741
|
}
|
|
6572
6742
|
}, [t.id, t.message, t.description, reportHeight]);
|
|
6573
|
-
|
|
6574
|
-
|
|
6743
|
+
React64.useEffect(() => () => removeHeight(t.id), [t.id, removeHeight]);
|
|
6744
|
+
React64.useEffect(() => {
|
|
6575
6745
|
if (t.duration === Infinity || t.state === "closing" || paused) return;
|
|
6576
6746
|
startedRef.current = Date.now();
|
|
6577
6747
|
const id = setTimeout(() => store.dismiss(t.id), remainingRef.current);
|
|
@@ -6583,7 +6753,7 @@ function ToastItem({
|
|
|
6583
6753
|
);
|
|
6584
6754
|
};
|
|
6585
6755
|
}, [paused, t.id, t.duration, t.state]);
|
|
6586
|
-
|
|
6756
|
+
React64.useEffect(
|
|
6587
6757
|
() => () => {
|
|
6588
6758
|
if (flingRef.current) clearTimeout(flingRef.current);
|
|
6589
6759
|
},
|
|
@@ -6642,7 +6812,7 @@ function ToastItem({
|
|
|
6642
6812
|
);
|
|
6643
6813
|
}
|
|
6644
6814
|
};
|
|
6645
|
-
return /* @__PURE__ */
|
|
6815
|
+
return /* @__PURE__ */ jsxs25(
|
|
6646
6816
|
"li",
|
|
6647
6817
|
{
|
|
6648
6818
|
ref,
|
|
@@ -6670,11 +6840,11 @@ function ToastItem({
|
|
|
6670
6840
|
toastVariantClasses[t.variant]
|
|
6671
6841
|
),
|
|
6672
6842
|
children: [
|
|
6673
|
-
/* @__PURE__ */
|
|
6674
|
-
/* @__PURE__ */
|
|
6675
|
-
t.description ? /* @__PURE__ */
|
|
6843
|
+
/* @__PURE__ */ jsxs25("div", { className: TOAST_CONTENT, children: [
|
|
6844
|
+
/* @__PURE__ */ jsx55("div", { className: TOAST_TITLE, children: t.message }),
|
|
6845
|
+
t.description ? /* @__PURE__ */ jsx55("div", { className: "text-muted-foreground text-sm", children: t.description }) : null
|
|
6676
6846
|
] }),
|
|
6677
|
-
/* @__PURE__ */
|
|
6847
|
+
/* @__PURE__ */ jsx55(
|
|
6678
6848
|
"button",
|
|
6679
6849
|
{
|
|
6680
6850
|
type: "button",
|
|
@@ -6682,7 +6852,7 @@ function ToastItem({
|
|
|
6682
6852
|
"data-slot": "toast-close",
|
|
6683
6853
|
onClick: () => store.dismiss(t.id),
|
|
6684
6854
|
className: TOAST_CLOSE,
|
|
6685
|
-
children: /* @__PURE__ */
|
|
6855
|
+
children: /* @__PURE__ */ jsx55(
|
|
6686
6856
|
"svg",
|
|
6687
6857
|
{
|
|
6688
6858
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -6695,7 +6865,7 @@ function ToastItem({
|
|
|
6695
6865
|
strokeLinecap: "round",
|
|
6696
6866
|
strokeLinejoin: "round",
|
|
6697
6867
|
"aria-hidden": "true",
|
|
6698
|
-
children: /* @__PURE__ */
|
|
6868
|
+
children: /* @__PURE__ */ jsx55("path", { d: "M18 6 6 18M6 6l12 12" })
|
|
6699
6869
|
}
|
|
6700
6870
|
)
|
|
6701
6871
|
}
|
|
@@ -6709,17 +6879,17 @@ function Toaster({
|
|
|
6709
6879
|
className,
|
|
6710
6880
|
...props
|
|
6711
6881
|
}) {
|
|
6712
|
-
const [toasts, setToasts] =
|
|
6713
|
-
const [heights, setHeights] =
|
|
6714
|
-
const [paused, setPaused] =
|
|
6715
|
-
|
|
6882
|
+
const [toasts, setToasts] = React64.useState([]);
|
|
6883
|
+
const [heights, setHeights] = React64.useState(/* @__PURE__ */ new Map());
|
|
6884
|
+
const [paused, setPaused] = React64.useState(false);
|
|
6885
|
+
React64.useEffect(() => store.subscribe(setToasts), []);
|
|
6716
6886
|
const onEnter = () => setPaused(true);
|
|
6717
6887
|
const onLeave = (e) => {
|
|
6718
6888
|
if (!e.currentTarget.contains(e.relatedTarget)) {
|
|
6719
6889
|
setPaused(false);
|
|
6720
6890
|
}
|
|
6721
6891
|
};
|
|
6722
|
-
const reportHeight =
|
|
6892
|
+
const reportHeight = React64.useCallback((id, h) => {
|
|
6723
6893
|
setHeights((prev) => {
|
|
6724
6894
|
if (prev.get(id) === h) return prev;
|
|
6725
6895
|
const next = new Map(prev);
|
|
@@ -6727,7 +6897,7 @@ function Toaster({
|
|
|
6727
6897
|
return next;
|
|
6728
6898
|
});
|
|
6729
6899
|
}, []);
|
|
6730
|
-
const removeHeight =
|
|
6900
|
+
const removeHeight = React64.useCallback((id) => {
|
|
6731
6901
|
setHeights((prev) => {
|
|
6732
6902
|
if (!prev.has(id)) return prev;
|
|
6733
6903
|
const next = new Map(prev);
|
|
@@ -6745,7 +6915,7 @@ function Toaster({
|
|
|
6745
6915
|
sum += heights.get(t.id) ?? 0;
|
|
6746
6916
|
return o;
|
|
6747
6917
|
});
|
|
6748
|
-
return /* @__PURE__ */
|
|
6918
|
+
return /* @__PURE__ */ jsx55(
|
|
6749
6919
|
"ol",
|
|
6750
6920
|
{
|
|
6751
6921
|
"data-slot": "toaster",
|
|
@@ -6766,7 +6936,7 @@ function Toaster({
|
|
|
6766
6936
|
onPointerOut: onLeave,
|
|
6767
6937
|
onFocus: onEnter,
|
|
6768
6938
|
onBlur: onLeave,
|
|
6769
|
-
children: ordered.map((t, i) => /* @__PURE__ */
|
|
6939
|
+
children: ordered.map((t, i) => /* @__PURE__ */ jsx55(
|
|
6770
6940
|
ToastItem,
|
|
6771
6941
|
{
|
|
6772
6942
|
toast: t,
|
|
@@ -6784,7 +6954,7 @@ function Toaster({
|
|
|
6784
6954
|
}
|
|
6785
6955
|
|
|
6786
6956
|
// src/components/form.tsx
|
|
6787
|
-
import * as
|
|
6957
|
+
import * as React65 from "react";
|
|
6788
6958
|
|
|
6789
6959
|
// src/generated/form.ts
|
|
6790
6960
|
var FORM_ITEM = "grid gap-2";
|
|
@@ -6792,21 +6962,21 @@ var FORM_DESCRIPTION = "text-muted-foreground text-sm";
|
|
|
6792
6962
|
var FORM_MESSAGE = "text-destructive text-sm";
|
|
6793
6963
|
|
|
6794
6964
|
// src/components/form.tsx
|
|
6795
|
-
import { jsx as
|
|
6796
|
-
var FormItemContext =
|
|
6965
|
+
import { jsx as jsx56 } from "react/jsx-runtime";
|
|
6966
|
+
var FormItemContext = React65.createContext(null);
|
|
6797
6967
|
function useFormItem() {
|
|
6798
|
-
const ctx =
|
|
6968
|
+
const ctx = React65.useContext(FormItemContext);
|
|
6799
6969
|
if (!ctx) {
|
|
6800
6970
|
throw new Error("Form parts must be used within <FormItem>");
|
|
6801
6971
|
}
|
|
6802
6972
|
return ctx;
|
|
6803
6973
|
}
|
|
6804
6974
|
function Form({ ...props }) {
|
|
6805
|
-
return /* @__PURE__ */
|
|
6975
|
+
return /* @__PURE__ */ jsx56("form", { "data-slot": "form", ...props });
|
|
6806
6976
|
}
|
|
6807
6977
|
function FormItem({ className, ...props }) {
|
|
6808
|
-
const id =
|
|
6809
|
-
const value =
|
|
6978
|
+
const id = React65.useId();
|
|
6979
|
+
const value = React65.useMemo(
|
|
6810
6980
|
() => ({
|
|
6811
6981
|
id,
|
|
6812
6982
|
formItemId: `${id}-form-item`,
|
|
@@ -6815,7 +6985,7 @@ function FormItem({ className, ...props }) {
|
|
|
6815
6985
|
}),
|
|
6816
6986
|
[id]
|
|
6817
6987
|
);
|
|
6818
|
-
return /* @__PURE__ */
|
|
6988
|
+
return /* @__PURE__ */ jsx56(FormItemContext.Provider, { value, children: /* @__PURE__ */ jsx56("div", { "data-slot": "form-item", className: cn(FORM_ITEM, className), ...props }) });
|
|
6819
6989
|
}
|
|
6820
6990
|
function FormLabel({
|
|
6821
6991
|
className,
|
|
@@ -6823,7 +6993,7 @@ function FormLabel({
|
|
|
6823
6993
|
...props
|
|
6824
6994
|
}) {
|
|
6825
6995
|
const { formItemId } = useFormItem();
|
|
6826
|
-
return /* @__PURE__ */
|
|
6996
|
+
return /* @__PURE__ */ jsx56(
|
|
6827
6997
|
Label,
|
|
6828
6998
|
{
|
|
6829
6999
|
"data-slot": "form-label",
|
|
@@ -6839,7 +7009,7 @@ function FormControl({
|
|
|
6839
7009
|
...props
|
|
6840
7010
|
}) {
|
|
6841
7011
|
const { formItemId, formDescriptionId, formMessageId } = useFormItem();
|
|
6842
|
-
return /* @__PURE__ */
|
|
7012
|
+
return /* @__PURE__ */ jsx56(
|
|
6843
7013
|
Slot,
|
|
6844
7014
|
{
|
|
6845
7015
|
"data-slot": "form-control",
|
|
@@ -6852,7 +7022,7 @@ function FormControl({
|
|
|
6852
7022
|
}
|
|
6853
7023
|
function FormDescription({ className, ...props }) {
|
|
6854
7024
|
const { formDescriptionId } = useFormItem();
|
|
6855
|
-
return /* @__PURE__ */
|
|
7025
|
+
return /* @__PURE__ */ jsx56(
|
|
6856
7026
|
"p",
|
|
6857
7027
|
{
|
|
6858
7028
|
"data-slot": "form-description",
|
|
@@ -6867,7 +7037,7 @@ function FormMessage({ className, children, ...props }) {
|
|
|
6867
7037
|
if (!children) {
|
|
6868
7038
|
return null;
|
|
6869
7039
|
}
|
|
6870
|
-
return /* @__PURE__ */
|
|
7040
|
+
return /* @__PURE__ */ jsx56(
|
|
6871
7041
|
"p",
|
|
6872
7042
|
{
|
|
6873
7043
|
"data-slot": "form-message",
|
|
@@ -6880,7 +7050,7 @@ function FormMessage({ className, children, ...props }) {
|
|
|
6880
7050
|
}
|
|
6881
7051
|
|
|
6882
7052
|
// src/components/resizable.tsx
|
|
6883
|
-
import * as
|
|
7053
|
+
import * as React66 from "react";
|
|
6884
7054
|
|
|
6885
7055
|
// src/generated/resizable.ts
|
|
6886
7056
|
var RESIZABLE_GROUP = "flex h-full w-full data-[panel-group-direction=vertical]:flex-col";
|
|
@@ -6889,10 +7059,10 @@ var RESIZABLE_HANDLE = "bg-border focus-visible:ring-ring relative flex w-px ite
|
|
|
6889
7059
|
var RESIZABLE_HANDLE_GRIP = "bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border";
|
|
6890
7060
|
|
|
6891
7061
|
// src/components/resizable.tsx
|
|
6892
|
-
import { jsx as
|
|
6893
|
-
var ResizableContext =
|
|
7062
|
+
import { jsx as jsx57, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
7063
|
+
var ResizableContext = React66.createContext(null);
|
|
6894
7064
|
function useResizable() {
|
|
6895
|
-
const ctx =
|
|
7065
|
+
const ctx = React66.useContext(ResizableContext);
|
|
6896
7066
|
if (!ctx)
|
|
6897
7067
|
throw new Error("Resizable parts must be used within a ResizablePanelGroup");
|
|
6898
7068
|
return ctx;
|
|
@@ -6915,9 +7085,9 @@ function ResizablePanelGroup({
|
|
|
6915
7085
|
children,
|
|
6916
7086
|
...props
|
|
6917
7087
|
}) {
|
|
6918
|
-
const [sizes, setSizes] =
|
|
6919
|
-
const groupRef =
|
|
6920
|
-
const register =
|
|
7088
|
+
const [sizes, setSizes] = React66.useState([]);
|
|
7089
|
+
const groupRef = React66.useRef(null);
|
|
7090
|
+
const register = React66.useCallback((index, defaultSize) => {
|
|
6921
7091
|
setSizes((prev) => {
|
|
6922
7092
|
if (prev[index] !== void 0) return prev;
|
|
6923
7093
|
const next = prev.slice();
|
|
@@ -6926,14 +7096,14 @@ function ResizablePanelGroup({
|
|
|
6926
7096
|
return next;
|
|
6927
7097
|
});
|
|
6928
7098
|
}, []);
|
|
6929
|
-
|
|
7099
|
+
React66.useEffect(() => {
|
|
6930
7100
|
if (sizes.length) onLayout?.(sizes);
|
|
6931
7101
|
}, [sizes, onLayout]);
|
|
6932
|
-
const value =
|
|
7102
|
+
const value = React66.useMemo(
|
|
6933
7103
|
() => ({ sizes, setSizes, register, direction, keyboardStep, groupRef }),
|
|
6934
7104
|
[sizes, register, direction, keyboardStep]
|
|
6935
7105
|
);
|
|
6936
|
-
return /* @__PURE__ */
|
|
7106
|
+
return /* @__PURE__ */ jsx57(ResizableContext.Provider, { value, children: /* @__PURE__ */ jsx57(
|
|
6937
7107
|
"div",
|
|
6938
7108
|
{
|
|
6939
7109
|
ref: groupRef,
|
|
@@ -6954,11 +7124,11 @@ function ResizablePanel({
|
|
|
6954
7124
|
...props
|
|
6955
7125
|
}) {
|
|
6956
7126
|
const { sizes, register } = useResizable();
|
|
6957
|
-
|
|
7127
|
+
React66.useEffect(() => {
|
|
6958
7128
|
register(index, defaultSize);
|
|
6959
7129
|
}, [register, index, defaultSize]);
|
|
6960
7130
|
const basis = sizes[index] ?? defaultSize;
|
|
6961
|
-
return /* @__PURE__ */
|
|
7131
|
+
return /* @__PURE__ */ jsx57(
|
|
6962
7132
|
"div",
|
|
6963
7133
|
{
|
|
6964
7134
|
"data-slot": "resizable-panel",
|
|
@@ -6977,12 +7147,12 @@ function ResizableHandle({
|
|
|
6977
7147
|
...props
|
|
6978
7148
|
}) {
|
|
6979
7149
|
const { setSizes, direction, keyboardStep, groupRef } = useResizable();
|
|
6980
|
-
const draggingRef =
|
|
6981
|
-
const resize =
|
|
7150
|
+
const draggingRef = React66.useRef(false);
|
|
7151
|
+
const resize = React66.useCallback(
|
|
6982
7152
|
(delta) => setSizes((prev) => redistribute(prev, index, delta)),
|
|
6983
7153
|
[setSizes, index]
|
|
6984
7154
|
);
|
|
6985
|
-
const onPointerMove =
|
|
7155
|
+
const onPointerMove = React66.useCallback(
|
|
6986
7156
|
(event) => {
|
|
6987
7157
|
if (!draggingRef.current) return;
|
|
6988
7158
|
const rect = groupRef.current?.getBoundingClientRect();
|
|
@@ -6994,7 +7164,7 @@ function ResizableHandle({
|
|
|
6994
7164
|
},
|
|
6995
7165
|
[direction, resize, groupRef]
|
|
6996
7166
|
);
|
|
6997
|
-
const onPointerUp =
|
|
7167
|
+
const onPointerUp = React66.useCallback(() => {
|
|
6998
7168
|
draggingRef.current = false;
|
|
6999
7169
|
window.removeEventListener("pointermove", onPointerMove);
|
|
7000
7170
|
window.removeEventListener("pointerup", onPointerUp);
|
|
@@ -7005,7 +7175,7 @@ function ResizableHandle({
|
|
|
7005
7175
|
window.addEventListener("pointermove", onPointerMove);
|
|
7006
7176
|
window.addEventListener("pointerup", onPointerUp);
|
|
7007
7177
|
};
|
|
7008
|
-
|
|
7178
|
+
React66.useEffect(() => () => onPointerUp(), [onPointerUp]);
|
|
7009
7179
|
const onKeyDown = (event) => {
|
|
7010
7180
|
let delta;
|
|
7011
7181
|
switch (event.key) {
|
|
@@ -7025,7 +7195,7 @@ function ResizableHandle({
|
|
|
7025
7195
|
event.preventDefault();
|
|
7026
7196
|
resize(delta);
|
|
7027
7197
|
};
|
|
7028
|
-
return /* @__PURE__ */
|
|
7198
|
+
return /* @__PURE__ */ jsxs26(
|
|
7029
7199
|
"div",
|
|
7030
7200
|
{
|
|
7031
7201
|
"data-slot": "resizable-handle",
|
|
@@ -7038,7 +7208,7 @@ function ResizableHandle({
|
|
|
7038
7208
|
onKeyDown,
|
|
7039
7209
|
...props,
|
|
7040
7210
|
children: [
|
|
7041
|
-
withHandle && /* @__PURE__ */
|
|
7211
|
+
withHandle && /* @__PURE__ */ jsx57("div", { className: RESIZABLE_HANDLE_GRIP, children: /* @__PURE__ */ jsxs26(
|
|
7042
7212
|
"svg",
|
|
7043
7213
|
{
|
|
7044
7214
|
className: "size-2.5",
|
|
@@ -7053,12 +7223,12 @@ function ResizableHandle({
|
|
|
7053
7223
|
strokeLinejoin: "round",
|
|
7054
7224
|
"aria-hidden": "true",
|
|
7055
7225
|
children: [
|
|
7056
|
-
/* @__PURE__ */
|
|
7057
|
-
/* @__PURE__ */
|
|
7058
|
-
/* @__PURE__ */
|
|
7059
|
-
/* @__PURE__ */
|
|
7060
|
-
/* @__PURE__ */
|
|
7061
|
-
/* @__PURE__ */
|
|
7226
|
+
/* @__PURE__ */ jsx57("circle", { cx: "9", cy: "12", r: "1" }),
|
|
7227
|
+
/* @__PURE__ */ jsx57("circle", { cx: "9", cy: "5", r: "1" }),
|
|
7228
|
+
/* @__PURE__ */ jsx57("circle", { cx: "9", cy: "19", r: "1" }),
|
|
7229
|
+
/* @__PURE__ */ jsx57("circle", { cx: "15", cy: "12", r: "1" }),
|
|
7230
|
+
/* @__PURE__ */ jsx57("circle", { cx: "15", cy: "5", r: "1" }),
|
|
7231
|
+
/* @__PURE__ */ jsx57("circle", { cx: "15", cy: "19", r: "1" })
|
|
7062
7232
|
]
|
|
7063
7233
|
}
|
|
7064
7234
|
) }),
|
|
@@ -7200,6 +7370,7 @@ export {
|
|
|
7200
7370
|
FieldSet,
|
|
7201
7371
|
FieldTitle,
|
|
7202
7372
|
Footer,
|
|
7373
|
+
Forbidden,
|
|
7203
7374
|
Form,
|
|
7204
7375
|
FormControl,
|
|
7205
7376
|
FormDescription,
|
|
@@ -7258,6 +7429,7 @@ export {
|
|
|
7258
7429
|
NavigationMenuList,
|
|
7259
7430
|
NavigationMenuTrigger,
|
|
7260
7431
|
NavigationMenuViewport,
|
|
7432
|
+
NotFound,
|
|
7261
7433
|
Pagination,
|
|
7262
7434
|
PaginationContent,
|
|
7263
7435
|
PaginationEllipsis,
|
|
@@ -7287,6 +7459,7 @@ export {
|
|
|
7287
7459
|
SelectTrigger,
|
|
7288
7460
|
SelectValue,
|
|
7289
7461
|
Separator,
|
|
7462
|
+
ServerError,
|
|
7290
7463
|
Sheet,
|
|
7291
7464
|
SheetClose,
|
|
7292
7465
|
SheetContent,
|
|
@@ -7315,6 +7488,7 @@ export {
|
|
|
7315
7488
|
Slider,
|
|
7316
7489
|
Slot,
|
|
7317
7490
|
Spinner,
|
|
7491
|
+
StatusScreen,
|
|
7318
7492
|
Switch,
|
|
7319
7493
|
Table,
|
|
7320
7494
|
TableBody,
|
|
@@ -7341,6 +7515,7 @@ export {
|
|
|
7341
7515
|
cn,
|
|
7342
7516
|
mergeRefs,
|
|
7343
7517
|
navigationMenuTriggerStyle,
|
|
7518
|
+
statusButtonClass,
|
|
7344
7519
|
toast,
|
|
7345
7520
|
toggleVariants,
|
|
7346
7521
|
useControllableState,
|