@evinvest/uikit 0.5.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 +65 -1
- package/dist/index.js +677 -514
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1917,6 +1917,164 @@ function Spinner({ className, ...props }) {
|
|
|
1917
1917
|
);
|
|
1918
1918
|
}
|
|
1919
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
|
+
|
|
1920
2078
|
// src/components/table.tsx
|
|
1921
2079
|
import "react";
|
|
1922
2080
|
|
|
@@ -1932,14 +2090,14 @@ var TABLE_CELL = "p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr
|
|
|
1932
2090
|
var TABLE_CAPTION = "text-muted-foreground mt-4 text-sm";
|
|
1933
2091
|
|
|
1934
2092
|
// src/components/table.tsx
|
|
1935
|
-
import { jsx as
|
|
2093
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
1936
2094
|
function Table({ className, ...props }) {
|
|
1937
|
-
return /* @__PURE__ */
|
|
2095
|
+
return /* @__PURE__ */ jsx26(
|
|
1938
2096
|
"div",
|
|
1939
2097
|
{
|
|
1940
2098
|
"data-slot": "table-container",
|
|
1941
2099
|
className: TABLE_CONTAINER,
|
|
1942
|
-
children: /* @__PURE__ */
|
|
2100
|
+
children: /* @__PURE__ */ jsx26(
|
|
1943
2101
|
"table",
|
|
1944
2102
|
{
|
|
1945
2103
|
"data-slot": "table",
|
|
@@ -1954,7 +2112,7 @@ function TableHeader({
|
|
|
1954
2112
|
className,
|
|
1955
2113
|
...props
|
|
1956
2114
|
}) {
|
|
1957
|
-
return /* @__PURE__ */
|
|
2115
|
+
return /* @__PURE__ */ jsx26(
|
|
1958
2116
|
"thead",
|
|
1959
2117
|
{
|
|
1960
2118
|
"data-slot": "table-header",
|
|
@@ -1967,7 +2125,7 @@ function TableBody({
|
|
|
1967
2125
|
className,
|
|
1968
2126
|
...props
|
|
1969
2127
|
}) {
|
|
1970
|
-
return /* @__PURE__ */
|
|
2128
|
+
return /* @__PURE__ */ jsx26(
|
|
1971
2129
|
"tbody",
|
|
1972
2130
|
{
|
|
1973
2131
|
"data-slot": "table-body",
|
|
@@ -1980,7 +2138,7 @@ function TableFooter({
|
|
|
1980
2138
|
className,
|
|
1981
2139
|
...props
|
|
1982
2140
|
}) {
|
|
1983
|
-
return /* @__PURE__ */
|
|
2141
|
+
return /* @__PURE__ */ jsx26(
|
|
1984
2142
|
"tfoot",
|
|
1985
2143
|
{
|
|
1986
2144
|
"data-slot": "table-footer",
|
|
@@ -1990,7 +2148,7 @@ function TableFooter({
|
|
|
1990
2148
|
);
|
|
1991
2149
|
}
|
|
1992
2150
|
function TableRow({ className, ...props }) {
|
|
1993
|
-
return /* @__PURE__ */
|
|
2151
|
+
return /* @__PURE__ */ jsx26(
|
|
1994
2152
|
"tr",
|
|
1995
2153
|
{
|
|
1996
2154
|
"data-slot": "table-row",
|
|
@@ -2000,7 +2158,7 @@ function TableRow({ className, ...props }) {
|
|
|
2000
2158
|
);
|
|
2001
2159
|
}
|
|
2002
2160
|
function TableHead({ className, ...props }) {
|
|
2003
|
-
return /* @__PURE__ */
|
|
2161
|
+
return /* @__PURE__ */ jsx26(
|
|
2004
2162
|
"th",
|
|
2005
2163
|
{
|
|
2006
2164
|
"data-slot": "table-head",
|
|
@@ -2010,7 +2168,7 @@ function TableHead({ className, ...props }) {
|
|
|
2010
2168
|
);
|
|
2011
2169
|
}
|
|
2012
2170
|
function TableCell({ className, ...props }) {
|
|
2013
|
-
return /* @__PURE__ */
|
|
2171
|
+
return /* @__PURE__ */ jsx26(
|
|
2014
2172
|
"td",
|
|
2015
2173
|
{
|
|
2016
2174
|
"data-slot": "table-cell",
|
|
@@ -2023,7 +2181,7 @@ function TableCaption({
|
|
|
2023
2181
|
className,
|
|
2024
2182
|
...props
|
|
2025
2183
|
}) {
|
|
2026
|
-
return /* @__PURE__ */
|
|
2184
|
+
return /* @__PURE__ */ jsx26(
|
|
2027
2185
|
"caption",
|
|
2028
2186
|
{
|
|
2029
2187
|
"data-slot": "table-caption",
|
|
@@ -2034,7 +2192,7 @@ function TableCaption({
|
|
|
2034
2192
|
}
|
|
2035
2193
|
|
|
2036
2194
|
// src/components/accordion.tsx
|
|
2037
|
-
import * as
|
|
2195
|
+
import * as React36 from "react";
|
|
2038
2196
|
|
|
2039
2197
|
// src/generated/accordion.ts
|
|
2040
2198
|
var ACCORDION_ITEM = "border-b last:border-b-0";
|
|
@@ -2044,16 +2202,16 @@ var ACCORDION_CONTENT = "data-[state=closed]:animate-accordion-up data-[state=op
|
|
|
2044
2202
|
var ACCORDION_CONTENT_INNER = "pt-0 pb-4";
|
|
2045
2203
|
|
|
2046
2204
|
// src/components/accordion.tsx
|
|
2047
|
-
import { jsx as
|
|
2048
|
-
var AccordionContext =
|
|
2205
|
+
import { jsx as jsx27, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
2206
|
+
var AccordionContext = React36.createContext(null);
|
|
2049
2207
|
function useAccordion() {
|
|
2050
|
-
const ctx =
|
|
2208
|
+
const ctx = React36.useContext(AccordionContext);
|
|
2051
2209
|
if (!ctx) throw new Error("Accordion parts must be used within <Accordion>");
|
|
2052
2210
|
return ctx;
|
|
2053
2211
|
}
|
|
2054
|
-
var ItemContext =
|
|
2212
|
+
var ItemContext = React36.createContext(null);
|
|
2055
2213
|
function useItemValue() {
|
|
2056
|
-
const value =
|
|
2214
|
+
const value = React36.useContext(ItemContext);
|
|
2057
2215
|
if (value === null)
|
|
2058
2216
|
throw new Error("AccordionTrigger/Content must be used within <AccordionItem>");
|
|
2059
2217
|
return value;
|
|
@@ -2081,7 +2239,7 @@ function Accordion({
|
|
|
2081
2239
|
if (open.includes(v)) setOpen(collapsible ? [] : open);
|
|
2082
2240
|
else setOpen([v]);
|
|
2083
2241
|
};
|
|
2084
|
-
return /* @__PURE__ */
|
|
2242
|
+
return /* @__PURE__ */ jsx27(AccordionContext.Provider, { value: { isOpen, toggle }, children: /* @__PURE__ */ jsx27("div", { "data-slot": "accordion", ...props, children }) });
|
|
2085
2243
|
}
|
|
2086
2244
|
function AccordionItem({
|
|
2087
2245
|
className,
|
|
@@ -2089,7 +2247,7 @@ function AccordionItem({
|
|
|
2089
2247
|
children,
|
|
2090
2248
|
...props
|
|
2091
2249
|
}) {
|
|
2092
|
-
return /* @__PURE__ */
|
|
2250
|
+
return /* @__PURE__ */ jsx27(ItemContext.Provider, { value, children: /* @__PURE__ */ jsx27(
|
|
2093
2251
|
"div",
|
|
2094
2252
|
{
|
|
2095
2253
|
"data-slot": "accordion-item",
|
|
@@ -2108,7 +2266,7 @@ function AccordionTrigger({
|
|
|
2108
2266
|
const { isOpen, toggle } = useAccordion();
|
|
2109
2267
|
const value = useItemValue();
|
|
2110
2268
|
const open = isOpen(value);
|
|
2111
|
-
return /* @__PURE__ */
|
|
2269
|
+
return /* @__PURE__ */ jsx27("h3", { className: ACCORDION_HEADER, "data-slot": "accordion-header", children: /* @__PURE__ */ jsxs7(
|
|
2112
2270
|
"button",
|
|
2113
2271
|
{
|
|
2114
2272
|
type: "button",
|
|
@@ -2123,7 +2281,7 @@ function AccordionTrigger({
|
|
|
2123
2281
|
...props,
|
|
2124
2282
|
children: [
|
|
2125
2283
|
children,
|
|
2126
|
-
/* @__PURE__ */
|
|
2284
|
+
/* @__PURE__ */ jsx27(
|
|
2127
2285
|
"svg",
|
|
2128
2286
|
{
|
|
2129
2287
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2136,7 +2294,7 @@ function AccordionTrigger({
|
|
|
2136
2294
|
strokeLinecap: "round",
|
|
2137
2295
|
strokeLinejoin: "round",
|
|
2138
2296
|
className: "text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200",
|
|
2139
|
-
children: /* @__PURE__ */
|
|
2297
|
+
children: /* @__PURE__ */ jsx27("path", { d: "m6 9 6 6 6-6" })
|
|
2140
2298
|
}
|
|
2141
2299
|
)
|
|
2142
2300
|
]
|
|
@@ -2151,26 +2309,26 @@ function AccordionContent({
|
|
|
2151
2309
|
const { isOpen } = useAccordion();
|
|
2152
2310
|
const value = useItemValue();
|
|
2153
2311
|
if (!isOpen(value)) return null;
|
|
2154
|
-
return /* @__PURE__ */
|
|
2312
|
+
return /* @__PURE__ */ jsx27(
|
|
2155
2313
|
"div",
|
|
2156
2314
|
{
|
|
2157
2315
|
"data-slot": "accordion-content",
|
|
2158
2316
|
"data-state": "open",
|
|
2159
2317
|
className: ACCORDION_CONTENT,
|
|
2160
2318
|
...props,
|
|
2161
|
-
children: /* @__PURE__ */
|
|
2319
|
+
children: /* @__PURE__ */ jsx27("div", { className: cn(ACCORDION_CONTENT_INNER, className), children })
|
|
2162
2320
|
}
|
|
2163
2321
|
);
|
|
2164
2322
|
}
|
|
2165
2323
|
|
|
2166
2324
|
// src/components/collapsible.tsx
|
|
2167
|
-
import * as
|
|
2168
|
-
import { jsx as
|
|
2169
|
-
var CollapsibleContext =
|
|
2325
|
+
import * as React37 from "react";
|
|
2326
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
2327
|
+
var CollapsibleContext = React37.createContext(
|
|
2170
2328
|
null
|
|
2171
2329
|
);
|
|
2172
2330
|
function useCollapsible() {
|
|
2173
|
-
const ctx =
|
|
2331
|
+
const ctx = React37.useContext(CollapsibleContext);
|
|
2174
2332
|
if (!ctx) throw new Error("Collapsible parts must be used within <Collapsible>");
|
|
2175
2333
|
return ctx;
|
|
2176
2334
|
}
|
|
@@ -2186,14 +2344,14 @@ function Collapsible({
|
|
|
2186
2344
|
defaultValue: defaultOpen,
|
|
2187
2345
|
...onOpenChange ? { onChange: onOpenChange } : {}
|
|
2188
2346
|
});
|
|
2189
|
-
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 }) });
|
|
2190
2348
|
}
|
|
2191
2349
|
function CollapsibleTrigger({
|
|
2192
2350
|
onClick,
|
|
2193
2351
|
...props
|
|
2194
2352
|
}) {
|
|
2195
2353
|
const { open, setOpen } = useCollapsible();
|
|
2196
|
-
return /* @__PURE__ */
|
|
2354
|
+
return /* @__PURE__ */ jsx28(
|
|
2197
2355
|
"button",
|
|
2198
2356
|
{
|
|
2199
2357
|
type: "button",
|
|
@@ -2214,11 +2372,11 @@ function CollapsibleContent({
|
|
|
2214
2372
|
}) {
|
|
2215
2373
|
const { open } = useCollapsible();
|
|
2216
2374
|
if (!open) return null;
|
|
2217
|
-
return /* @__PURE__ */
|
|
2375
|
+
return /* @__PURE__ */ jsx28("div", { "data-slot": "collapsible-content", "data-state": "open", ...props, children });
|
|
2218
2376
|
}
|
|
2219
2377
|
|
|
2220
2378
|
// src/components/tabs.tsx
|
|
2221
|
-
import * as
|
|
2379
|
+
import * as React38 from "react";
|
|
2222
2380
|
|
|
2223
2381
|
// src/generated/tabs.ts
|
|
2224
2382
|
var TABS_ROOT = "flex flex-col gap-2";
|
|
@@ -2227,10 +2385,10 @@ var TABS_TRIGGER = "data-[state=active]:bg-background focus-visible:border-ring
|
|
|
2227
2385
|
var TABS_CONTENT = "flex-1 outline-none";
|
|
2228
2386
|
|
|
2229
2387
|
// src/components/tabs.tsx
|
|
2230
|
-
import { jsx as
|
|
2231
|
-
var TabsContext =
|
|
2388
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
2389
|
+
var TabsContext = React38.createContext(null);
|
|
2232
2390
|
function useTabs() {
|
|
2233
|
-
const ctx =
|
|
2391
|
+
const ctx = React38.useContext(TabsContext);
|
|
2234
2392
|
if (!ctx) throw new Error("Tabs parts must be used within <Tabs>");
|
|
2235
2393
|
return ctx;
|
|
2236
2394
|
}
|
|
@@ -2248,7 +2406,7 @@ function Tabs({
|
|
|
2248
2406
|
defaultValue,
|
|
2249
2407
|
...onValueChange ? { onChange: onValueChange } : {}
|
|
2250
2408
|
});
|
|
2251
|
-
return /* @__PURE__ */
|
|
2409
|
+
return /* @__PURE__ */ jsx29(TabsContext.Provider, { value: { value: active, setValue, orientation }, children: /* @__PURE__ */ jsx29(
|
|
2252
2410
|
"div",
|
|
2253
2411
|
{
|
|
2254
2412
|
"data-slot": "tabs",
|
|
@@ -2266,12 +2424,12 @@ function TabsList({
|
|
|
2266
2424
|
...props
|
|
2267
2425
|
}) {
|
|
2268
2426
|
const { orientation } = useTabs();
|
|
2269
|
-
const items =
|
|
2427
|
+
const items = React38.Children.toArray(children);
|
|
2270
2428
|
const { activeIndex, setActiveIndex, onKeyDown: rovingKeyDown } = useRovingFocus({
|
|
2271
2429
|
count: items.length,
|
|
2272
2430
|
orientation: orientation === "vertical" ? "vertical" : "horizontal"
|
|
2273
2431
|
});
|
|
2274
|
-
return /* @__PURE__ */
|
|
2432
|
+
return /* @__PURE__ */ jsx29(
|
|
2275
2433
|
"div",
|
|
2276
2434
|
{
|
|
2277
2435
|
role: "tablist",
|
|
@@ -2284,7 +2442,7 @@ function TabsList({
|
|
|
2284
2442
|
},
|
|
2285
2443
|
...props,
|
|
2286
2444
|
children: items.map(
|
|
2287
|
-
(child, index) =>
|
|
2445
|
+
(child, index) => React38.isValidElement(child) ? React38.cloneElement(child, {
|
|
2288
2446
|
__index: index,
|
|
2289
2447
|
__isFocusItem: index === activeIndex,
|
|
2290
2448
|
__onFocusItem: () => setActiveIndex(index)
|
|
@@ -2304,7 +2462,7 @@ function TabsTrigger({
|
|
|
2304
2462
|
}) {
|
|
2305
2463
|
const { value: active, setValue } = useTabs();
|
|
2306
2464
|
const selected = active === value;
|
|
2307
|
-
return /* @__PURE__ */
|
|
2465
|
+
return /* @__PURE__ */ jsx29(
|
|
2308
2466
|
"button",
|
|
2309
2467
|
{
|
|
2310
2468
|
type: "button",
|
|
@@ -2335,7 +2493,7 @@ function TabsContent({
|
|
|
2335
2493
|
}) {
|
|
2336
2494
|
const { value: active } = useTabs();
|
|
2337
2495
|
if (active !== value) return null;
|
|
2338
|
-
return /* @__PURE__ */
|
|
2496
|
+
return /* @__PURE__ */ jsx29(
|
|
2339
2497
|
"div",
|
|
2340
2498
|
{
|
|
2341
2499
|
role: "tabpanel",
|
|
@@ -2364,7 +2522,7 @@ var toggleSizeClasses = {
|
|
|
2364
2522
|
};
|
|
2365
2523
|
|
|
2366
2524
|
// src/components/toggle.tsx
|
|
2367
|
-
import { jsx as
|
|
2525
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
2368
2526
|
function toggleVariants({
|
|
2369
2527
|
variant = "default",
|
|
2370
2528
|
size = "default",
|
|
@@ -2387,7 +2545,7 @@ function Toggle({
|
|
|
2387
2545
|
defaultValue: defaultPressed,
|
|
2388
2546
|
...onPressedChange ? { onChange: onPressedChange } : {}
|
|
2389
2547
|
});
|
|
2390
|
-
return /* @__PURE__ */
|
|
2548
|
+
return /* @__PURE__ */ jsx30(
|
|
2391
2549
|
"button",
|
|
2392
2550
|
{
|
|
2393
2551
|
type: "button",
|
|
@@ -2405,9 +2563,9 @@ function Toggle({
|
|
|
2405
2563
|
}
|
|
2406
2564
|
|
|
2407
2565
|
// src/components/toggle-group.tsx
|
|
2408
|
-
import * as
|
|
2409
|
-
import { jsx as
|
|
2410
|
-
var ToggleGroupContext =
|
|
2566
|
+
import * as React40 from "react";
|
|
2567
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
2568
|
+
var ToggleGroupContext = React40.createContext({
|
|
2411
2569
|
variant: "default",
|
|
2412
2570
|
size: "default",
|
|
2413
2571
|
value: [],
|
|
@@ -2434,7 +2592,7 @@ function ToggleGroup({
|
|
|
2434
2592
|
defaultValue: toArray(defaultValue),
|
|
2435
2593
|
onChange: (next) => onValueChange?.(type === "single" ? next[0] ?? "" : next)
|
|
2436
2594
|
});
|
|
2437
|
-
const toggle =
|
|
2595
|
+
const toggle = React40.useCallback(
|
|
2438
2596
|
(itemValue) => {
|
|
2439
2597
|
if (type === "single") {
|
|
2440
2598
|
setSelected(selected.includes(itemValue) ? [] : [itemValue]);
|
|
@@ -2446,7 +2604,7 @@ function ToggleGroup({
|
|
|
2446
2604
|
},
|
|
2447
2605
|
[type, selected, setSelected]
|
|
2448
2606
|
);
|
|
2449
|
-
return /* @__PURE__ */
|
|
2607
|
+
return /* @__PURE__ */ jsx31(
|
|
2450
2608
|
"div",
|
|
2451
2609
|
{
|
|
2452
2610
|
"data-slot": "toggle-group",
|
|
@@ -2457,7 +2615,7 @@ function ToggleGroup({
|
|
|
2457
2615
|
className
|
|
2458
2616
|
),
|
|
2459
2617
|
...props,
|
|
2460
|
-
children: /* @__PURE__ */
|
|
2618
|
+
children: /* @__PURE__ */ jsx31(ToggleGroupContext.Provider, { value: { variant, size, value: selected, toggle }, children })
|
|
2461
2619
|
}
|
|
2462
2620
|
);
|
|
2463
2621
|
}
|
|
@@ -2470,11 +2628,11 @@ function ToggleGroupItem({
|
|
|
2470
2628
|
onClick,
|
|
2471
2629
|
...props
|
|
2472
2630
|
}) {
|
|
2473
|
-
const context =
|
|
2631
|
+
const context = React40.useContext(ToggleGroupContext);
|
|
2474
2632
|
const resolvedVariant = context.variant || variant || "default";
|
|
2475
2633
|
const resolvedSize = context.size || size || "default";
|
|
2476
2634
|
const on = context.value.includes(value);
|
|
2477
|
-
return /* @__PURE__ */
|
|
2635
|
+
return /* @__PURE__ */ jsx31(
|
|
2478
2636
|
"button",
|
|
2479
2637
|
{
|
|
2480
2638
|
type: "button",
|
|
@@ -2500,7 +2658,7 @@ function ToggleGroupItem({
|
|
|
2500
2658
|
|
|
2501
2659
|
// src/components/switch.tsx
|
|
2502
2660
|
import "react";
|
|
2503
|
-
import { jsx as
|
|
2661
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
2504
2662
|
function Switch({
|
|
2505
2663
|
className,
|
|
2506
2664
|
checked,
|
|
@@ -2516,7 +2674,7 @@ function Switch({
|
|
|
2516
2674
|
...onCheckedChange ? { onChange: onCheckedChange } : {}
|
|
2517
2675
|
});
|
|
2518
2676
|
const state = on ? "checked" : "unchecked";
|
|
2519
|
-
return /* @__PURE__ */
|
|
2677
|
+
return /* @__PURE__ */ jsx32(
|
|
2520
2678
|
"button",
|
|
2521
2679
|
{
|
|
2522
2680
|
type: "button",
|
|
@@ -2534,7 +2692,7 @@ function Switch({
|
|
|
2534
2692
|
setOn(!on);
|
|
2535
2693
|
},
|
|
2536
2694
|
...props,
|
|
2537
|
-
children: /* @__PURE__ */
|
|
2695
|
+
children: /* @__PURE__ */ jsx32(
|
|
2538
2696
|
"span",
|
|
2539
2697
|
{
|
|
2540
2698
|
"data-slot": "switch-thumb",
|
|
@@ -2548,7 +2706,7 @@ function Switch({
|
|
|
2548
2706
|
|
|
2549
2707
|
// src/components/checkbox.tsx
|
|
2550
2708
|
import "react";
|
|
2551
|
-
import { jsx as
|
|
2709
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
2552
2710
|
function Checkbox({
|
|
2553
2711
|
className,
|
|
2554
2712
|
checked,
|
|
@@ -2564,7 +2722,7 @@ function Checkbox({
|
|
|
2564
2722
|
...onCheckedChange ? { onChange: onCheckedChange } : {}
|
|
2565
2723
|
});
|
|
2566
2724
|
const state = on ? "checked" : "unchecked";
|
|
2567
|
-
return /* @__PURE__ */
|
|
2725
|
+
return /* @__PURE__ */ jsx33(
|
|
2568
2726
|
"button",
|
|
2569
2727
|
{
|
|
2570
2728
|
type: "button",
|
|
@@ -2582,12 +2740,12 @@ function Checkbox({
|
|
|
2582
2740
|
setOn(!on);
|
|
2583
2741
|
},
|
|
2584
2742
|
...props,
|
|
2585
|
-
children: on && /* @__PURE__ */
|
|
2743
|
+
children: on && /* @__PURE__ */ jsx33(
|
|
2586
2744
|
"span",
|
|
2587
2745
|
{
|
|
2588
2746
|
"data-slot": "checkbox-indicator",
|
|
2589
2747
|
className: "flex items-center justify-center text-current transition-none",
|
|
2590
|
-
children: /* @__PURE__ */
|
|
2748
|
+
children: /* @__PURE__ */ jsx33(
|
|
2591
2749
|
"svg",
|
|
2592
2750
|
{
|
|
2593
2751
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2599,7 +2757,7 @@ function Checkbox({
|
|
|
2599
2757
|
strokeLinejoin: "round",
|
|
2600
2758
|
className: "size-3.5",
|
|
2601
2759
|
"aria-hidden": "true",
|
|
2602
|
-
children: /* @__PURE__ */
|
|
2760
|
+
children: /* @__PURE__ */ jsx33("path", { d: "M20 6 9 17l-5-5" })
|
|
2603
2761
|
}
|
|
2604
2762
|
)
|
|
2605
2763
|
}
|
|
@@ -2609,15 +2767,15 @@ function Checkbox({
|
|
|
2609
2767
|
}
|
|
2610
2768
|
|
|
2611
2769
|
// src/components/radio-group.tsx
|
|
2612
|
-
import * as
|
|
2770
|
+
import * as React43 from "react";
|
|
2613
2771
|
|
|
2614
2772
|
// src/generated/radio-group.ts
|
|
2615
2773
|
var RADIO_GROUP_ROOT = "grid gap-3";
|
|
2616
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";
|
|
2617
2775
|
|
|
2618
2776
|
// src/components/radio-group.tsx
|
|
2619
|
-
import { jsx as
|
|
2620
|
-
var RadioGroupContext =
|
|
2777
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
2778
|
+
var RadioGroupContext = React43.createContext(
|
|
2621
2779
|
null
|
|
2622
2780
|
);
|
|
2623
2781
|
function RadioGroup({
|
|
@@ -2634,10 +2792,10 @@ function RadioGroup({
|
|
|
2634
2792
|
defaultValue,
|
|
2635
2793
|
...onValueChange ? { onChange: onValueChange } : {}
|
|
2636
2794
|
});
|
|
2637
|
-
const itemsRef =
|
|
2638
|
-
const [count, setCount] =
|
|
2795
|
+
const itemsRef = React43.useRef([]);
|
|
2796
|
+
const [count, setCount] = React43.useState(0);
|
|
2639
2797
|
const { activeIndex, setActiveIndex, onKeyDown: rovingKeyDown } = useRovingFocus({ count, orientation: "vertical", loop: true });
|
|
2640
|
-
const register =
|
|
2798
|
+
const register = React43.useCallback((el) => {
|
|
2641
2799
|
const list = itemsRef.current;
|
|
2642
2800
|
let index = list.indexOf(el);
|
|
2643
2801
|
if (index === -1) {
|
|
@@ -2647,11 +2805,11 @@ function RadioGroup({
|
|
|
2647
2805
|
}
|
|
2648
2806
|
return index;
|
|
2649
2807
|
}, []);
|
|
2650
|
-
const ctx =
|
|
2808
|
+
const ctx = React43.useMemo(
|
|
2651
2809
|
() => ({ value: current, setValue: setCurrent, register, activeIndex, setActiveIndex }),
|
|
2652
2810
|
[current, setCurrent, register, activeIndex, setActiveIndex]
|
|
2653
2811
|
);
|
|
2654
|
-
return /* @__PURE__ */
|
|
2812
|
+
return /* @__PURE__ */ jsx34(RadioGroupContext.Provider, { value: ctx, children: /* @__PURE__ */ jsx34(
|
|
2655
2813
|
"div",
|
|
2656
2814
|
{
|
|
2657
2815
|
"data-slot": "radio-group",
|
|
@@ -2673,14 +2831,14 @@ function RadioGroupItem({
|
|
|
2673
2831
|
onClick,
|
|
2674
2832
|
...props
|
|
2675
2833
|
}) {
|
|
2676
|
-
const ctx =
|
|
2834
|
+
const ctx = React43.useContext(RadioGroupContext);
|
|
2677
2835
|
if (!ctx) throw new Error("RadioGroupItem must be used within a RadioGroup");
|
|
2678
|
-
const indexRef =
|
|
2836
|
+
const indexRef = React43.useRef(-1);
|
|
2679
2837
|
const checked = ctx.value === value;
|
|
2680
|
-
|
|
2838
|
+
React43.useEffect(() => {
|
|
2681
2839
|
if (checked) ctx.setActiveIndex(indexRef.current);
|
|
2682
2840
|
}, [checked]);
|
|
2683
|
-
return /* @__PURE__ */
|
|
2841
|
+
return /* @__PURE__ */ jsx34(
|
|
2684
2842
|
"button",
|
|
2685
2843
|
{
|
|
2686
2844
|
ref: (el) => {
|
|
@@ -2699,18 +2857,18 @@ function RadioGroupItem({
|
|
|
2699
2857
|
ctx.setValue(value);
|
|
2700
2858
|
},
|
|
2701
2859
|
...props,
|
|
2702
|
-
children: checked ? /* @__PURE__ */
|
|
2860
|
+
children: checked ? /* @__PURE__ */ jsx34(
|
|
2703
2861
|
"span",
|
|
2704
2862
|
{
|
|
2705
2863
|
"data-slot": "radio-group-indicator",
|
|
2706
2864
|
className: "relative flex items-center justify-center",
|
|
2707
|
-
children: /* @__PURE__ */
|
|
2865
|
+
children: /* @__PURE__ */ jsx34(
|
|
2708
2866
|
"svg",
|
|
2709
2867
|
{
|
|
2710
2868
|
className: "fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2",
|
|
2711
2869
|
viewBox: "0 0 24 24",
|
|
2712
2870
|
"aria-hidden": "true",
|
|
2713
|
-
children: /* @__PURE__ */
|
|
2871
|
+
children: /* @__PURE__ */ jsx34("circle", { cx: "12", cy: "12", r: "10" })
|
|
2714
2872
|
}
|
|
2715
2873
|
)
|
|
2716
2874
|
}
|
|
@@ -2720,7 +2878,7 @@ function RadioGroupItem({
|
|
|
2720
2878
|
}
|
|
2721
2879
|
|
|
2722
2880
|
// src/components/slider.tsx
|
|
2723
|
-
import * as
|
|
2881
|
+
import * as React44 from "react";
|
|
2724
2882
|
|
|
2725
2883
|
// src/generated/slider.ts
|
|
2726
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";
|
|
@@ -2729,7 +2887,7 @@ var SLIDER_RANGE = "bg-primary absolute data-[orientation=horizontal]:h-full dat
|
|
|
2729
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";
|
|
2730
2888
|
|
|
2731
2889
|
// src/components/slider.tsx
|
|
2732
|
-
import { jsx as
|
|
2890
|
+
import { jsx as jsx35, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
2733
2891
|
function clampStep(value, min, max, step) {
|
|
2734
2892
|
const clamped = Math.min(max, Math.max(min, value));
|
|
2735
2893
|
if (step <= 0) return clamped;
|
|
@@ -2756,9 +2914,9 @@ function Slider({
|
|
|
2756
2914
|
const current = clampStep(raw, min, max, step);
|
|
2757
2915
|
const span = Math.max(max - min, Number.EPSILON);
|
|
2758
2916
|
const percent = Math.min(100, Math.max(0, (current - min) / span * 100));
|
|
2759
|
-
const trackRef =
|
|
2760
|
-
const draggingRef =
|
|
2761
|
-
const valueFromPointer =
|
|
2917
|
+
const trackRef = React44.useRef(null);
|
|
2918
|
+
const draggingRef = React44.useRef(false);
|
|
2919
|
+
const valueFromPointer = React44.useCallback(
|
|
2762
2920
|
(clientX, clientY) => {
|
|
2763
2921
|
const rect = trackRef.current?.getBoundingClientRect();
|
|
2764
2922
|
if (!rect) return current;
|
|
@@ -2807,7 +2965,7 @@ function Slider({
|
|
|
2807
2965
|
};
|
|
2808
2966
|
const rangeStyle = orientation === "vertical" ? { height: `${percent}%` } : { width: `${percent}%` };
|
|
2809
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%)" };
|
|
2810
|
-
return /* @__PURE__ */
|
|
2968
|
+
return /* @__PURE__ */ jsxs8(
|
|
2811
2969
|
"span",
|
|
2812
2970
|
{
|
|
2813
2971
|
"data-slot": "slider",
|
|
@@ -2819,14 +2977,14 @@ function Slider({
|
|
|
2819
2977
|
onPointerMove,
|
|
2820
2978
|
onPointerUp,
|
|
2821
2979
|
children: [
|
|
2822
|
-
/* @__PURE__ */
|
|
2980
|
+
/* @__PURE__ */ jsx35(
|
|
2823
2981
|
"span",
|
|
2824
2982
|
{
|
|
2825
2983
|
ref: trackRef,
|
|
2826
2984
|
"data-slot": "slider-track",
|
|
2827
2985
|
"data-orientation": orientation,
|
|
2828
2986
|
className: SLIDER_TRACK,
|
|
2829
|
-
children: /* @__PURE__ */
|
|
2987
|
+
children: /* @__PURE__ */ jsx35(
|
|
2830
2988
|
"span",
|
|
2831
2989
|
{
|
|
2832
2990
|
"data-slot": "slider-range",
|
|
@@ -2837,7 +2995,7 @@ function Slider({
|
|
|
2837
2995
|
)
|
|
2838
2996
|
}
|
|
2839
2997
|
),
|
|
2840
|
-
/* @__PURE__ */
|
|
2998
|
+
/* @__PURE__ */ jsx35(
|
|
2841
2999
|
"span",
|
|
2842
3000
|
{
|
|
2843
3001
|
"data-slot": "slider-thumb",
|
|
@@ -2872,15 +3030,15 @@ var scrollBarOrientations = {
|
|
|
2872
3030
|
};
|
|
2873
3031
|
|
|
2874
3032
|
// src/components/scroll-area.tsx
|
|
2875
|
-
import { jsx as
|
|
3033
|
+
import { jsx as jsx36, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
2876
3034
|
function ScrollArea({
|
|
2877
3035
|
className,
|
|
2878
3036
|
children,
|
|
2879
3037
|
...props
|
|
2880
3038
|
}) {
|
|
2881
|
-
return /* @__PURE__ */
|
|
2882
|
-
/* @__PURE__ */
|
|
2883
|
-
/* @__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, {})
|
|
2884
3042
|
] });
|
|
2885
3043
|
}
|
|
2886
3044
|
function ScrollBar({
|
|
@@ -2888,20 +3046,20 @@ function ScrollBar({
|
|
|
2888
3046
|
orientation = "vertical",
|
|
2889
3047
|
...props
|
|
2890
3048
|
}) {
|
|
2891
|
-
return /* @__PURE__ */
|
|
3049
|
+
return /* @__PURE__ */ jsx36(
|
|
2892
3050
|
"div",
|
|
2893
3051
|
{
|
|
2894
3052
|
"data-slot": "scroll-area-scrollbar",
|
|
2895
3053
|
"data-orientation": orientation,
|
|
2896
3054
|
className: cn(SCROLLBAR_BASE, scrollBarOrientations[orientation], className),
|
|
2897
3055
|
...props,
|
|
2898
|
-
children: /* @__PURE__ */
|
|
3056
|
+
children: /* @__PURE__ */ jsx36("div", { "data-slot": "scroll-area-thumb", className: SCROLL_AREA_THUMB })
|
|
2899
3057
|
}
|
|
2900
3058
|
);
|
|
2901
3059
|
}
|
|
2902
3060
|
|
|
2903
3061
|
// src/components/sidebar.tsx
|
|
2904
|
-
import * as
|
|
3062
|
+
import * as React46 from "react";
|
|
2905
3063
|
|
|
2906
3064
|
// src/generated/sidebar.ts
|
|
2907
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";
|
|
@@ -2931,12 +3089,12 @@ var SIDEBAR_MENU = "flex w-full min-w-0 flex-col gap-1";
|
|
|
2931
3089
|
var SIDEBAR_MENU_ITEM = "group/menu-item relative";
|
|
2932
3090
|
|
|
2933
3091
|
// src/components/sidebar.tsx
|
|
2934
|
-
import { jsx as
|
|
3092
|
+
import { jsx as jsx37, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
2935
3093
|
var SIDEBAR_WIDTH = "16rem";
|
|
2936
3094
|
var SIDEBAR_WIDTH_ICON = "3rem";
|
|
2937
|
-
var SidebarContext =
|
|
3095
|
+
var SidebarContext = React46.createContext(null);
|
|
2938
3096
|
function useSidebar() {
|
|
2939
|
-
const ctx =
|
|
3097
|
+
const ctx = React46.useContext(SidebarContext);
|
|
2940
3098
|
if (!ctx) throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
2941
3099
|
return ctx;
|
|
2942
3100
|
}
|
|
@@ -2954,16 +3112,16 @@ function SidebarProvider({
|
|
|
2954
3112
|
defaultValue: defaultOpen,
|
|
2955
3113
|
...onOpenChange ? { onChange: onOpenChange } : {}
|
|
2956
3114
|
});
|
|
2957
|
-
const toggleSidebar =
|
|
3115
|
+
const toggleSidebar = React46.useCallback(
|
|
2958
3116
|
() => setOpen(!open),
|
|
2959
3117
|
[open, setOpen]
|
|
2960
3118
|
);
|
|
2961
3119
|
const state = open ? "expanded" : "collapsed";
|
|
2962
|
-
const contextValue =
|
|
3120
|
+
const contextValue = React46.useMemo(
|
|
2963
3121
|
() => ({ state, open, setOpen, toggleSidebar }),
|
|
2964
3122
|
[state, open, setOpen, toggleSidebar]
|
|
2965
3123
|
);
|
|
2966
|
-
return /* @__PURE__ */
|
|
3124
|
+
return /* @__PURE__ */ jsx37(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx37(
|
|
2967
3125
|
"div",
|
|
2968
3126
|
{
|
|
2969
3127
|
"data-slot": "sidebar-wrapper",
|
|
@@ -2988,7 +3146,7 @@ function Sidebar({
|
|
|
2988
3146
|
}) {
|
|
2989
3147
|
const { state } = useSidebar();
|
|
2990
3148
|
if (collapsible === "none") {
|
|
2991
|
-
return /* @__PURE__ */
|
|
3149
|
+
return /* @__PURE__ */ jsx37(
|
|
2992
3150
|
"div",
|
|
2993
3151
|
{
|
|
2994
3152
|
"data-slot": "sidebar",
|
|
@@ -2998,7 +3156,7 @@ function Sidebar({
|
|
|
2998
3156
|
}
|
|
2999
3157
|
);
|
|
3000
3158
|
}
|
|
3001
|
-
return /* @__PURE__ */
|
|
3159
|
+
return /* @__PURE__ */ jsx37(
|
|
3002
3160
|
"div",
|
|
3003
3161
|
{
|
|
3004
3162
|
className: "group peer text-sidebar-foreground hidden md:block",
|
|
@@ -3007,7 +3165,7 @@ function Sidebar({
|
|
|
3007
3165
|
"data-variant": variant,
|
|
3008
3166
|
"data-side": side,
|
|
3009
3167
|
"data-slot": "sidebar",
|
|
3010
|
-
children: /* @__PURE__ */
|
|
3168
|
+
children: /* @__PURE__ */ jsx37(
|
|
3011
3169
|
"div",
|
|
3012
3170
|
{
|
|
3013
3171
|
"data-slot": "sidebar-inner",
|
|
@@ -3026,7 +3184,7 @@ function SidebarTrigger({
|
|
|
3026
3184
|
...props
|
|
3027
3185
|
}) {
|
|
3028
3186
|
const { toggleSidebar } = useSidebar();
|
|
3029
|
-
return /* @__PURE__ */
|
|
3187
|
+
return /* @__PURE__ */ jsxs10(
|
|
3030
3188
|
"button",
|
|
3031
3189
|
{
|
|
3032
3190
|
type: "button",
|
|
@@ -3041,7 +3199,7 @@ function SidebarTrigger({
|
|
|
3041
3199
|
...props,
|
|
3042
3200
|
children: [
|
|
3043
3201
|
children,
|
|
3044
|
-
/* @__PURE__ */
|
|
3202
|
+
/* @__PURE__ */ jsx37("span", { className: "sr-only", children: "Toggle Sidebar" })
|
|
3045
3203
|
]
|
|
3046
3204
|
}
|
|
3047
3205
|
);
|
|
@@ -3051,7 +3209,7 @@ function SidebarRail({
|
|
|
3051
3209
|
...props
|
|
3052
3210
|
}) {
|
|
3053
3211
|
const { toggleSidebar } = useSidebar();
|
|
3054
|
-
return /* @__PURE__ */
|
|
3212
|
+
return /* @__PURE__ */ jsx37(
|
|
3055
3213
|
"button",
|
|
3056
3214
|
{
|
|
3057
3215
|
type: "button",
|
|
@@ -3067,7 +3225,7 @@ function SidebarRail({
|
|
|
3067
3225
|
);
|
|
3068
3226
|
}
|
|
3069
3227
|
function SidebarInset({ className, ...props }) {
|
|
3070
|
-
return /* @__PURE__ */
|
|
3228
|
+
return /* @__PURE__ */ jsx37(
|
|
3071
3229
|
"main",
|
|
3072
3230
|
{
|
|
3073
3231
|
"data-slot": "sidebar-inset",
|
|
@@ -3077,7 +3235,7 @@ function SidebarInset({ className, ...props }) {
|
|
|
3077
3235
|
);
|
|
3078
3236
|
}
|
|
3079
3237
|
function SidebarHeader({ className, ...props }) {
|
|
3080
|
-
return /* @__PURE__ */
|
|
3238
|
+
return /* @__PURE__ */ jsx37(
|
|
3081
3239
|
"div",
|
|
3082
3240
|
{
|
|
3083
3241
|
"data-slot": "sidebar-header",
|
|
@@ -3088,7 +3246,7 @@ function SidebarHeader({ className, ...props }) {
|
|
|
3088
3246
|
);
|
|
3089
3247
|
}
|
|
3090
3248
|
function SidebarFooter({ className, ...props }) {
|
|
3091
|
-
return /* @__PURE__ */
|
|
3249
|
+
return /* @__PURE__ */ jsx37(
|
|
3092
3250
|
"div",
|
|
3093
3251
|
{
|
|
3094
3252
|
"data-slot": "sidebar-footer",
|
|
@@ -3102,7 +3260,7 @@ function SidebarSeparator({
|
|
|
3102
3260
|
className,
|
|
3103
3261
|
...props
|
|
3104
3262
|
}) {
|
|
3105
|
-
return /* @__PURE__ */
|
|
3263
|
+
return /* @__PURE__ */ jsx37(
|
|
3106
3264
|
"div",
|
|
3107
3265
|
{
|
|
3108
3266
|
"data-slot": "sidebar-separator",
|
|
@@ -3114,7 +3272,7 @@ function SidebarSeparator({
|
|
|
3114
3272
|
);
|
|
3115
3273
|
}
|
|
3116
3274
|
function SidebarContent({ className, ...props }) {
|
|
3117
|
-
return /* @__PURE__ */
|
|
3275
|
+
return /* @__PURE__ */ jsx37(
|
|
3118
3276
|
"div",
|
|
3119
3277
|
{
|
|
3120
3278
|
"data-slot": "sidebar-content",
|
|
@@ -3125,7 +3283,7 @@ function SidebarContent({ className, ...props }) {
|
|
|
3125
3283
|
);
|
|
3126
3284
|
}
|
|
3127
3285
|
function SidebarGroup({ className, ...props }) {
|
|
3128
|
-
return /* @__PURE__ */
|
|
3286
|
+
return /* @__PURE__ */ jsx37(
|
|
3129
3287
|
"div",
|
|
3130
3288
|
{
|
|
3131
3289
|
"data-slot": "sidebar-group",
|
|
@@ -3141,7 +3299,7 @@ function SidebarGroupLabel({
|
|
|
3141
3299
|
...props
|
|
3142
3300
|
}) {
|
|
3143
3301
|
const Comp = asChild ? Slot : "div";
|
|
3144
|
-
return /* @__PURE__ */
|
|
3302
|
+
return /* @__PURE__ */ jsx37(
|
|
3145
3303
|
Comp,
|
|
3146
3304
|
{
|
|
3147
3305
|
"data-slot": "sidebar-group-label",
|
|
@@ -3155,7 +3313,7 @@ function SidebarGroupContent({
|
|
|
3155
3313
|
className,
|
|
3156
3314
|
...props
|
|
3157
3315
|
}) {
|
|
3158
|
-
return /* @__PURE__ */
|
|
3316
|
+
return /* @__PURE__ */ jsx37(
|
|
3159
3317
|
"div",
|
|
3160
3318
|
{
|
|
3161
3319
|
"data-slot": "sidebar-group-content",
|
|
@@ -3166,7 +3324,7 @@ function SidebarGroupContent({
|
|
|
3166
3324
|
);
|
|
3167
3325
|
}
|
|
3168
3326
|
function SidebarMenu({ className, ...props }) {
|
|
3169
|
-
return /* @__PURE__ */
|
|
3327
|
+
return /* @__PURE__ */ jsx37(
|
|
3170
3328
|
"ul",
|
|
3171
3329
|
{
|
|
3172
3330
|
"data-slot": "sidebar-menu",
|
|
@@ -3177,7 +3335,7 @@ function SidebarMenu({ className, ...props }) {
|
|
|
3177
3335
|
);
|
|
3178
3336
|
}
|
|
3179
3337
|
function SidebarMenuItem({ className, ...props }) {
|
|
3180
|
-
return /* @__PURE__ */
|
|
3338
|
+
return /* @__PURE__ */ jsx37(
|
|
3181
3339
|
"li",
|
|
3182
3340
|
{
|
|
3183
3341
|
"data-slot": "sidebar-menu-item",
|
|
@@ -3196,7 +3354,7 @@ function SidebarMenuButton({
|
|
|
3196
3354
|
...props
|
|
3197
3355
|
}) {
|
|
3198
3356
|
const Comp = asChild ? Slot : "button";
|
|
3199
|
-
return /* @__PURE__ */
|
|
3357
|
+
return /* @__PURE__ */ jsx37(
|
|
3200
3358
|
Comp,
|
|
3201
3359
|
{
|
|
3202
3360
|
"data-slot": "sidebar-menu-button",
|
|
@@ -3215,7 +3373,7 @@ function SidebarMenuButton({
|
|
|
3215
3373
|
}
|
|
3216
3374
|
|
|
3217
3375
|
// src/components/carousel.tsx
|
|
3218
|
-
import * as
|
|
3376
|
+
import * as React47 from "react";
|
|
3219
3377
|
|
|
3220
3378
|
// src/generated/carousel.ts
|
|
3221
3379
|
var CAROUSEL_CONTENT_VIEWPORT = "overflow-hidden";
|
|
@@ -3234,10 +3392,10 @@ var CAROUSEL_EDGE_FADE_PREV = "pointer-events-none absolute inset-y-0 left-0 w-2
|
|
|
3234
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";
|
|
3235
3393
|
|
|
3236
3394
|
// src/components/carousel.tsx
|
|
3237
|
-
import { Fragment as Fragment3, jsx as
|
|
3238
|
-
var CarouselContext =
|
|
3395
|
+
import { Fragment as Fragment3, jsx as jsx38, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
3396
|
+
var CarouselContext = React47.createContext(null);
|
|
3239
3397
|
function useCarousel() {
|
|
3240
|
-
const context =
|
|
3398
|
+
const context = React47.useContext(CarouselContext);
|
|
3241
3399
|
if (!context) {
|
|
3242
3400
|
throw new Error("useCarousel must be used within a <Carousel />");
|
|
3243
3401
|
}
|
|
@@ -3258,13 +3416,13 @@ function Carousel({
|
|
|
3258
3416
|
defaultValue: defaultIndex,
|
|
3259
3417
|
onChange: onIndexChange
|
|
3260
3418
|
});
|
|
3261
|
-
const [count, setCount] =
|
|
3419
|
+
const [count, setCount] = React47.useState(0);
|
|
3262
3420
|
const canScrollPrev = index > 0;
|
|
3263
3421
|
const canScrollNext = index < count - 1;
|
|
3264
|
-
const scrollPrev =
|
|
3422
|
+
const scrollPrev = React47.useCallback(() => {
|
|
3265
3423
|
if (index > 0) setIndex(index - 1);
|
|
3266
3424
|
}, [index, setIndex]);
|
|
3267
|
-
const scrollNext =
|
|
3425
|
+
const scrollNext = React47.useCallback(() => {
|
|
3268
3426
|
if (index < count - 1) setIndex(index + 1);
|
|
3269
3427
|
}, [index, count, setIndex]);
|
|
3270
3428
|
const handleKeyDown = (event) => {
|
|
@@ -3277,7 +3435,7 @@ function Carousel({
|
|
|
3277
3435
|
}
|
|
3278
3436
|
onKeyDown?.(event);
|
|
3279
3437
|
};
|
|
3280
|
-
return /* @__PURE__ */
|
|
3438
|
+
return /* @__PURE__ */ jsx38(
|
|
3281
3439
|
CarouselContext.Provider,
|
|
3282
3440
|
{
|
|
3283
3441
|
value: {
|
|
@@ -3290,7 +3448,7 @@ function Carousel({
|
|
|
3290
3448
|
canScrollPrev,
|
|
3291
3449
|
canScrollNext
|
|
3292
3450
|
},
|
|
3293
|
-
children: /* @__PURE__ */
|
|
3451
|
+
children: /* @__PURE__ */ jsx38(
|
|
3294
3452
|
"div",
|
|
3295
3453
|
{
|
|
3296
3454
|
onKeyDownCapture: handleKeyDown,
|
|
@@ -3312,12 +3470,12 @@ function CarouselContent({
|
|
|
3312
3470
|
...props
|
|
3313
3471
|
}) {
|
|
3314
3472
|
const { orientation, index, setCount } = useCarousel();
|
|
3315
|
-
const childCount =
|
|
3316
|
-
|
|
3473
|
+
const childCount = React47.Children.count(children);
|
|
3474
|
+
React47.useEffect(() => {
|
|
3317
3475
|
setCount(childCount);
|
|
3318
3476
|
}, [childCount, setCount]);
|
|
3319
3477
|
const transform = orientation === "horizontal" ? `translate3d(-${index * 100}%, 0, 0)` : `translate3d(0, -${index * 100}%, 0)`;
|
|
3320
|
-
return /* @__PURE__ */
|
|
3478
|
+
return /* @__PURE__ */ jsx38("div", { className: CAROUSEL_CONTENT_VIEWPORT, "data-slot": "carousel-content", children: /* @__PURE__ */ jsx38(
|
|
3321
3479
|
"div",
|
|
3322
3480
|
{
|
|
3323
3481
|
className: cn(
|
|
@@ -3336,7 +3494,7 @@ function CarouselItem({
|
|
|
3336
3494
|
...props
|
|
3337
3495
|
}) {
|
|
3338
3496
|
const { orientation } = useCarousel();
|
|
3339
|
-
return /* @__PURE__ */
|
|
3497
|
+
return /* @__PURE__ */ jsx38(
|
|
3340
3498
|
"div",
|
|
3341
3499
|
{
|
|
3342
3500
|
role: "group",
|
|
@@ -3355,8 +3513,8 @@ function CarouselEdgeFade({
|
|
|
3355
3513
|
className
|
|
3356
3514
|
}) {
|
|
3357
3515
|
const { canScrollPrev, canScrollNext } = useCarousel();
|
|
3358
|
-
return /* @__PURE__ */
|
|
3359
|
-
/* @__PURE__ */
|
|
3516
|
+
return /* @__PURE__ */ jsxs11(Fragment3, { children: [
|
|
3517
|
+
/* @__PURE__ */ jsx38(
|
|
3360
3518
|
"div",
|
|
3361
3519
|
{
|
|
3362
3520
|
"aria-hidden": true,
|
|
@@ -3367,7 +3525,7 @@ function CarouselEdgeFade({
|
|
|
3367
3525
|
)
|
|
3368
3526
|
}
|
|
3369
3527
|
),
|
|
3370
|
-
/* @__PURE__ */
|
|
3528
|
+
/* @__PURE__ */ jsx38(
|
|
3371
3529
|
"div",
|
|
3372
3530
|
{
|
|
3373
3531
|
"aria-hidden": true,
|
|
@@ -3387,7 +3545,7 @@ function CarouselPrevious({
|
|
|
3387
3545
|
...props
|
|
3388
3546
|
}) {
|
|
3389
3547
|
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
3390
|
-
return /* @__PURE__ */
|
|
3548
|
+
return /* @__PURE__ */ jsxs11(
|
|
3391
3549
|
Button,
|
|
3392
3550
|
{
|
|
3393
3551
|
"data-slot": "carousel-previous",
|
|
@@ -3402,7 +3560,7 @@ function CarouselPrevious({
|
|
|
3402
3560
|
onClick: scrollPrev,
|
|
3403
3561
|
...props,
|
|
3404
3562
|
children: [
|
|
3405
|
-
/* @__PURE__ */
|
|
3563
|
+
/* @__PURE__ */ jsx38(
|
|
3406
3564
|
"svg",
|
|
3407
3565
|
{
|
|
3408
3566
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3413,10 +3571,10 @@ function CarouselPrevious({
|
|
|
3413
3571
|
strokeLinecap: "round",
|
|
3414
3572
|
strokeLinejoin: "round",
|
|
3415
3573
|
"aria-hidden": "true",
|
|
3416
|
-
children: /* @__PURE__ */
|
|
3574
|
+
children: /* @__PURE__ */ jsx38("path", { d: "m15 18-6-6 6-6" })
|
|
3417
3575
|
}
|
|
3418
3576
|
),
|
|
3419
|
-
/* @__PURE__ */
|
|
3577
|
+
/* @__PURE__ */ jsx38("span", { className: "sr-only", children: "Previous slide" })
|
|
3420
3578
|
]
|
|
3421
3579
|
}
|
|
3422
3580
|
);
|
|
@@ -3428,7 +3586,7 @@ function CarouselNext({
|
|
|
3428
3586
|
...props
|
|
3429
3587
|
}) {
|
|
3430
3588
|
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
3431
|
-
return /* @__PURE__ */
|
|
3589
|
+
return /* @__PURE__ */ jsxs11(
|
|
3432
3590
|
Button,
|
|
3433
3591
|
{
|
|
3434
3592
|
"data-slot": "carousel-next",
|
|
@@ -3443,7 +3601,7 @@ function CarouselNext({
|
|
|
3443
3601
|
onClick: scrollNext,
|
|
3444
3602
|
...props,
|
|
3445
3603
|
children: [
|
|
3446
|
-
/* @__PURE__ */
|
|
3604
|
+
/* @__PURE__ */ jsx38(
|
|
3447
3605
|
"svg",
|
|
3448
3606
|
{
|
|
3449
3607
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3454,17 +3612,17 @@ function CarouselNext({
|
|
|
3454
3612
|
strokeLinecap: "round",
|
|
3455
3613
|
strokeLinejoin: "round",
|
|
3456
3614
|
"aria-hidden": "true",
|
|
3457
|
-
children: /* @__PURE__ */
|
|
3615
|
+
children: /* @__PURE__ */ jsx38("path", { d: "m9 18 6-6-6-6" })
|
|
3458
3616
|
}
|
|
3459
3617
|
),
|
|
3460
|
-
/* @__PURE__ */
|
|
3618
|
+
/* @__PURE__ */ jsx38("span", { className: "sr-only", children: "Next slide" })
|
|
3461
3619
|
]
|
|
3462
3620
|
}
|
|
3463
3621
|
);
|
|
3464
3622
|
}
|
|
3465
3623
|
|
|
3466
3624
|
// src/components/input-otp.tsx
|
|
3467
|
-
import * as
|
|
3625
|
+
import * as React48 from "react";
|
|
3468
3626
|
|
|
3469
3627
|
// src/generated/input-otp.ts
|
|
3470
3628
|
var INPUT_OTP_CONTAINER = "relative flex items-center gap-2 has-disabled:opacity-50";
|
|
@@ -3475,10 +3633,10 @@ var INPUT_OTP_SLOT_CARET_WRAPPER = "pointer-events-none absolute inset-0 flex it
|
|
|
3475
3633
|
var INPUT_OTP_SLOT_CARET = "animate-caret-blink bg-foreground h-4 w-px duration-1000";
|
|
3476
3634
|
|
|
3477
3635
|
// src/components/input-otp.tsx
|
|
3478
|
-
import { jsx as
|
|
3479
|
-
var InputOTPContext =
|
|
3636
|
+
import { jsx as jsx39, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
3637
|
+
var InputOTPContext = React48.createContext(null);
|
|
3480
3638
|
function useInputOTP() {
|
|
3481
|
-
const context =
|
|
3639
|
+
const context = React48.useContext(InputOTPContext);
|
|
3482
3640
|
if (!context) {
|
|
3483
3641
|
throw new Error("InputOTP slots must be used within an <InputOTP />");
|
|
3484
3642
|
}
|
|
@@ -3500,16 +3658,16 @@ function InputOTP({
|
|
|
3500
3658
|
defaultValue,
|
|
3501
3659
|
onChange
|
|
3502
3660
|
});
|
|
3503
|
-
const [focused, setFocused] =
|
|
3661
|
+
const [focused, setFocused] = React48.useState(false);
|
|
3504
3662
|
const activeIndex = focused ? Math.min(value.length, maxLength - 1) : -1;
|
|
3505
|
-
return /* @__PURE__ */
|
|
3663
|
+
return /* @__PURE__ */ jsx39(InputOTPContext.Provider, { value: { value, maxLength, activeIndex }, children: /* @__PURE__ */ jsxs12(
|
|
3506
3664
|
"div",
|
|
3507
3665
|
{
|
|
3508
3666
|
"data-slot": "input-otp",
|
|
3509
3667
|
className: cn(INPUT_OTP_CONTAINER, containerClassName),
|
|
3510
3668
|
children: [
|
|
3511
3669
|
children,
|
|
3512
|
-
/* @__PURE__ */
|
|
3670
|
+
/* @__PURE__ */ jsx39(
|
|
3513
3671
|
"input",
|
|
3514
3672
|
{
|
|
3515
3673
|
inputMode: "numeric",
|
|
@@ -3532,7 +3690,7 @@ function InputOTPGroup({
|
|
|
3532
3690
|
className,
|
|
3533
3691
|
...props
|
|
3534
3692
|
}) {
|
|
3535
|
-
return /* @__PURE__ */
|
|
3693
|
+
return /* @__PURE__ */ jsx39(
|
|
3536
3694
|
"div",
|
|
3537
3695
|
{
|
|
3538
3696
|
"data-slot": "input-otp-group",
|
|
@@ -3546,7 +3704,7 @@ function InputOTPSlot({ index, className, ...props }) {
|
|
|
3546
3704
|
const char = value[index];
|
|
3547
3705
|
const isActive = activeIndex === index;
|
|
3548
3706
|
const hasFakeCaret = isActive && char === void 0;
|
|
3549
|
-
return /* @__PURE__ */
|
|
3707
|
+
return /* @__PURE__ */ jsxs12(
|
|
3550
3708
|
"div",
|
|
3551
3709
|
{
|
|
3552
3710
|
"data-slot": "input-otp-slot",
|
|
@@ -3555,13 +3713,13 @@ function InputOTPSlot({ index, className, ...props }) {
|
|
|
3555
3713
|
...props,
|
|
3556
3714
|
children: [
|
|
3557
3715
|
char,
|
|
3558
|
-
hasFakeCaret && /* @__PURE__ */
|
|
3716
|
+
hasFakeCaret && /* @__PURE__ */ jsx39("div", { className: INPUT_OTP_SLOT_CARET_WRAPPER, children: /* @__PURE__ */ jsx39("div", { className: INPUT_OTP_SLOT_CARET }) })
|
|
3559
3717
|
]
|
|
3560
3718
|
}
|
|
3561
3719
|
);
|
|
3562
3720
|
}
|
|
3563
3721
|
function InputOTPSeparator({ ...props }) {
|
|
3564
|
-
return /* @__PURE__ */
|
|
3722
|
+
return /* @__PURE__ */ jsx39("div", { "data-slot": "input-otp-separator", role: "separator", ...props, children: /* @__PURE__ */ jsx39(
|
|
3565
3723
|
"svg",
|
|
3566
3724
|
{
|
|
3567
3725
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3572,27 +3730,27 @@ function InputOTPSeparator({ ...props }) {
|
|
|
3572
3730
|
strokeLinecap: "round",
|
|
3573
3731
|
strokeLinejoin: "round",
|
|
3574
3732
|
"aria-hidden": "true",
|
|
3575
|
-
children: /* @__PURE__ */
|
|
3733
|
+
children: /* @__PURE__ */ jsx39("path", { d: "M5 12h14" })
|
|
3576
3734
|
}
|
|
3577
3735
|
) });
|
|
3578
3736
|
}
|
|
3579
3737
|
|
|
3580
3738
|
// src/components/tooltip.tsx
|
|
3581
|
-
import * as
|
|
3739
|
+
import * as React49 from "react";
|
|
3582
3740
|
|
|
3583
3741
|
// src/generated/tooltip.ts
|
|
3584
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";
|
|
3585
3743
|
|
|
3586
3744
|
// src/components/tooltip.tsx
|
|
3587
|
-
import { Fragment as Fragment4, jsx as
|
|
3588
|
-
var TooltipContext =
|
|
3745
|
+
import { Fragment as Fragment4, jsx as jsx40 } from "react/jsx-runtime";
|
|
3746
|
+
var TooltipContext = React49.createContext(null);
|
|
3589
3747
|
function useTooltip() {
|
|
3590
|
-
const ctx =
|
|
3748
|
+
const ctx = React49.useContext(TooltipContext);
|
|
3591
3749
|
if (!ctx) throw new Error("Tooltip parts must be used within <Tooltip>");
|
|
3592
3750
|
return ctx;
|
|
3593
3751
|
}
|
|
3594
3752
|
function TooltipProvider({ children }) {
|
|
3595
|
-
return /* @__PURE__ */
|
|
3753
|
+
return /* @__PURE__ */ jsx40(Fragment4, { children });
|
|
3596
3754
|
}
|
|
3597
3755
|
function Tooltip({ open, defaultOpen = false, onOpenChange, children }) {
|
|
3598
3756
|
const [isOpen, setOpen] = useControllableState({
|
|
@@ -3600,8 +3758,8 @@ function Tooltip({ open, defaultOpen = false, onOpenChange, children }) {
|
|
|
3600
3758
|
defaultValue: defaultOpen,
|
|
3601
3759
|
...onOpenChange ? { onChange: onOpenChange } : {}
|
|
3602
3760
|
});
|
|
3603
|
-
const anchorRef =
|
|
3604
|
-
return /* @__PURE__ */
|
|
3761
|
+
const anchorRef = React49.useRef(null);
|
|
3762
|
+
return /* @__PURE__ */ jsx40(TooltipProvider, { children: /* @__PURE__ */ jsx40(TooltipContext.Provider, { value: { open: isOpen, setOpen, anchorRef }, children }) });
|
|
3605
3763
|
}
|
|
3606
3764
|
function TooltipTrigger({
|
|
3607
3765
|
asChild = false,
|
|
@@ -3613,7 +3771,7 @@ function TooltipTrigger({
|
|
|
3613
3771
|
}) {
|
|
3614
3772
|
const { setOpen, anchorRef } = useTooltip();
|
|
3615
3773
|
const Comp = asChild ? Slot : "button";
|
|
3616
|
-
return /* @__PURE__ */
|
|
3774
|
+
return /* @__PURE__ */ jsx40(
|
|
3617
3775
|
Comp,
|
|
3618
3776
|
{
|
|
3619
3777
|
"data-slot": "tooltip-trigger",
|
|
@@ -3654,7 +3812,7 @@ function TooltipContent({
|
|
|
3654
3812
|
offset: sideOffset
|
|
3655
3813
|
});
|
|
3656
3814
|
if (!isPresent) return null;
|
|
3657
|
-
return /* @__PURE__ */
|
|
3815
|
+
return /* @__PURE__ */ jsx40(Portal, { children: /* @__PURE__ */ jsx40(
|
|
3658
3816
|
"div",
|
|
3659
3817
|
{
|
|
3660
3818
|
"data-slot": "tooltip-content",
|
|
@@ -3671,16 +3829,16 @@ function TooltipContent({
|
|
|
3671
3829
|
}
|
|
3672
3830
|
|
|
3673
3831
|
// src/components/popover.tsx
|
|
3674
|
-
import * as
|
|
3832
|
+
import * as React50 from "react";
|
|
3675
3833
|
|
|
3676
3834
|
// src/generated/popover.ts
|
|
3677
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";
|
|
3678
3836
|
|
|
3679
3837
|
// src/components/popover.tsx
|
|
3680
|
-
import { jsx as
|
|
3681
|
-
var PopoverContext =
|
|
3838
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
3839
|
+
var PopoverContext = React50.createContext(null);
|
|
3682
3840
|
function usePopover() {
|
|
3683
|
-
const ctx =
|
|
3841
|
+
const ctx = React50.useContext(PopoverContext);
|
|
3684
3842
|
if (!ctx) throw new Error("Popover parts must be used within <Popover>");
|
|
3685
3843
|
return ctx;
|
|
3686
3844
|
}
|
|
@@ -3690,13 +3848,13 @@ function Popover({ open, defaultOpen = false, onOpenChange, children }) {
|
|
|
3690
3848
|
defaultValue: defaultOpen,
|
|
3691
3849
|
...onOpenChange ? { onChange: onOpenChange } : {}
|
|
3692
3850
|
});
|
|
3693
|
-
const anchorRef =
|
|
3694
|
-
return /* @__PURE__ */
|
|
3851
|
+
const anchorRef = React50.useRef(null);
|
|
3852
|
+
return /* @__PURE__ */ jsx41(PopoverContext.Provider, { value: { open: isOpen, setOpen, anchorRef }, children });
|
|
3695
3853
|
}
|
|
3696
3854
|
function PopoverTrigger({ asChild = false, onClick, ...props }) {
|
|
3697
3855
|
const { open, setOpen, anchorRef } = usePopover();
|
|
3698
3856
|
const Comp = asChild ? Slot : "button";
|
|
3699
|
-
return /* @__PURE__ */
|
|
3857
|
+
return /* @__PURE__ */ jsx41(
|
|
3700
3858
|
Comp,
|
|
3701
3859
|
{
|
|
3702
3860
|
"data-slot": "popover-trigger",
|
|
@@ -3713,7 +3871,7 @@ function PopoverTrigger({ asChild = false, onClick, ...props }) {
|
|
|
3713
3871
|
function PopoverAnchor({ asChild = false, ...props }) {
|
|
3714
3872
|
const { anchorRef } = usePopover();
|
|
3715
3873
|
const Comp = asChild ? Slot : "div";
|
|
3716
|
-
return /* @__PURE__ */
|
|
3874
|
+
return /* @__PURE__ */ jsx41(
|
|
3717
3875
|
Comp,
|
|
3718
3876
|
{
|
|
3719
3877
|
"data-slot": "popover-anchor",
|
|
@@ -3745,7 +3903,7 @@ function PopoverContent({
|
|
|
3745
3903
|
exclude: [anchorRef]
|
|
3746
3904
|
});
|
|
3747
3905
|
if (!isPresent) return null;
|
|
3748
|
-
return /* @__PURE__ */
|
|
3906
|
+
return /* @__PURE__ */ jsx41(Portal, { children: /* @__PURE__ */ jsx41(
|
|
3749
3907
|
"div",
|
|
3750
3908
|
{
|
|
3751
3909
|
"data-slot": "popover-content",
|
|
@@ -3765,16 +3923,16 @@ function PopoverContent({
|
|
|
3765
3923
|
}
|
|
3766
3924
|
|
|
3767
3925
|
// src/components/hover-card.tsx
|
|
3768
|
-
import * as
|
|
3926
|
+
import * as React51 from "react";
|
|
3769
3927
|
|
|
3770
3928
|
// src/generated/hover-card.ts
|
|
3771
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";
|
|
3772
3930
|
|
|
3773
3931
|
// src/components/hover-card.tsx
|
|
3774
|
-
import { jsx as
|
|
3775
|
-
var HoverCardContext =
|
|
3932
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
3933
|
+
var HoverCardContext = React51.createContext(null);
|
|
3776
3934
|
function useHoverCard() {
|
|
3777
|
-
const ctx =
|
|
3935
|
+
const ctx = React51.useContext(HoverCardContext);
|
|
3778
3936
|
if (!ctx) throw new Error("HoverCard parts must be used within <HoverCard>");
|
|
3779
3937
|
return ctx;
|
|
3780
3938
|
}
|
|
@@ -3784,8 +3942,8 @@ function HoverCard({ open, defaultOpen = false, onOpenChange, children }) {
|
|
|
3784
3942
|
defaultValue: defaultOpen,
|
|
3785
3943
|
...onOpenChange ? { onChange: onOpenChange } : {}
|
|
3786
3944
|
});
|
|
3787
|
-
const anchorRef =
|
|
3788
|
-
return /* @__PURE__ */
|
|
3945
|
+
const anchorRef = React51.useRef(null);
|
|
3946
|
+
return /* @__PURE__ */ jsx42(HoverCardContext.Provider, { value: { open: isOpen, setOpen, anchorRef }, children });
|
|
3789
3947
|
}
|
|
3790
3948
|
function HoverCardTrigger({
|
|
3791
3949
|
asChild = false,
|
|
@@ -3795,7 +3953,7 @@ function HoverCardTrigger({
|
|
|
3795
3953
|
}) {
|
|
3796
3954
|
const { setOpen, anchorRef } = useHoverCard();
|
|
3797
3955
|
const Comp = asChild ? Slot : "a";
|
|
3798
|
-
return /* @__PURE__ */
|
|
3956
|
+
return /* @__PURE__ */ jsx42(
|
|
3799
3957
|
Comp,
|
|
3800
3958
|
{
|
|
3801
3959
|
"data-slot": "hover-card-trigger",
|
|
@@ -3830,7 +3988,7 @@ function HoverCardContent({
|
|
|
3830
3988
|
offset: sideOffset
|
|
3831
3989
|
});
|
|
3832
3990
|
if (!isPresent) return null;
|
|
3833
|
-
return /* @__PURE__ */
|
|
3991
|
+
return /* @__PURE__ */ jsx42(Portal, { children: /* @__PURE__ */ jsx42(
|
|
3834
3992
|
"div",
|
|
3835
3993
|
{
|
|
3836
3994
|
"data-slot": "hover-card-content",
|
|
@@ -3847,7 +4005,7 @@ function HoverCardContent({
|
|
|
3847
4005
|
}
|
|
3848
4006
|
|
|
3849
4007
|
// src/components/dropdown-menu.tsx
|
|
3850
|
-
import * as
|
|
4008
|
+
import * as React52 from "react";
|
|
3851
4009
|
|
|
3852
4010
|
// src/generated/dropdown-menu.ts
|
|
3853
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";
|
|
@@ -3861,12 +4019,12 @@ var DROPDOWN_MENU_SEPARATOR = "bg-border -mx-1 my-1 h-px";
|
|
|
3861
4019
|
var DROPDOWN_MENU_SHORTCUT = "text-muted-foreground ml-auto text-xs tracking-widest";
|
|
3862
4020
|
|
|
3863
4021
|
// src/components/dropdown-menu.tsx
|
|
3864
|
-
import { jsx as
|
|
3865
|
-
var DropdownMenuContext =
|
|
4022
|
+
import { jsx as jsx43, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
4023
|
+
var DropdownMenuContext = React52.createContext(
|
|
3866
4024
|
null
|
|
3867
4025
|
);
|
|
3868
4026
|
function useDropdownMenu() {
|
|
3869
|
-
const ctx =
|
|
4027
|
+
const ctx = React52.useContext(DropdownMenuContext);
|
|
3870
4028
|
if (!ctx) throw new Error("DropdownMenu parts must be used within <DropdownMenu>");
|
|
3871
4029
|
return ctx;
|
|
3872
4030
|
}
|
|
@@ -3876,16 +4034,16 @@ function DropdownMenu({ open, defaultOpen = false, onOpenChange, children }) {
|
|
|
3876
4034
|
defaultValue: defaultOpen,
|
|
3877
4035
|
...onOpenChange ? { onChange: onOpenChange } : {}
|
|
3878
4036
|
});
|
|
3879
|
-
const anchorRef =
|
|
3880
|
-
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 }) });
|
|
3881
4039
|
}
|
|
3882
4040
|
function DropdownMenuPortal({ children }) {
|
|
3883
|
-
return /* @__PURE__ */
|
|
4041
|
+
return /* @__PURE__ */ jsx43(Portal, { children });
|
|
3884
4042
|
}
|
|
3885
4043
|
function DropdownMenuTrigger({ asChild = false, onClick, ...props }) {
|
|
3886
4044
|
const { open, setOpen, anchorRef } = useDropdownMenu();
|
|
3887
4045
|
const Comp = asChild ? Slot : "button";
|
|
3888
|
-
return /* @__PURE__ */
|
|
4046
|
+
return /* @__PURE__ */ jsx43(
|
|
3889
4047
|
Comp,
|
|
3890
4048
|
{
|
|
3891
4049
|
"data-slot": "dropdown-menu-trigger",
|
|
@@ -3921,7 +4079,7 @@ function DropdownMenuContent({
|
|
|
3921
4079
|
onDismiss: () => setOpen(false),
|
|
3922
4080
|
exclude: [anchorRef]
|
|
3923
4081
|
});
|
|
3924
|
-
const contentRef =
|
|
4082
|
+
const contentRef = React52.useRef(null);
|
|
3925
4083
|
const items = () => Array.from(
|
|
3926
4084
|
contentRef.current?.querySelectorAll("[role^='menuitem']") ?? []
|
|
3927
4085
|
).filter((el) => el.getAttribute("data-disabled") === null);
|
|
@@ -3930,13 +4088,13 @@ function DropdownMenuContent({
|
|
|
3930
4088
|
orientation: "vertical",
|
|
3931
4089
|
loop: true
|
|
3932
4090
|
});
|
|
3933
|
-
|
|
4091
|
+
React52.useEffect(() => {
|
|
3934
4092
|
if (!open) return;
|
|
3935
4093
|
items()[activeIndex]?.focus();
|
|
3936
4094
|
}, [open, activeIndex]);
|
|
3937
|
-
const close =
|
|
4095
|
+
const close = React52.useCallback(() => setOpen(false), [setOpen]);
|
|
3938
4096
|
if (!isPresent) return null;
|
|
3939
|
-
return /* @__PURE__ */
|
|
4097
|
+
return /* @__PURE__ */ jsx43(Portal, { children: /* @__PURE__ */ jsx43(DropdownMenuCloseContext.Provider, { value: close, children: /* @__PURE__ */ jsx43(
|
|
3940
4098
|
"div",
|
|
3941
4099
|
{
|
|
3942
4100
|
"data-slot": "dropdown-menu-content",
|
|
@@ -3959,10 +4117,10 @@ function DropdownMenuContent({
|
|
|
3959
4117
|
}
|
|
3960
4118
|
) }) });
|
|
3961
4119
|
}
|
|
3962
|
-
var DropdownMenuCloseContext =
|
|
4120
|
+
var DropdownMenuCloseContext = React52.createContext(() => {
|
|
3963
4121
|
});
|
|
3964
4122
|
function DropdownMenuGroup({ className, ...props }) {
|
|
3965
|
-
return /* @__PURE__ */
|
|
4123
|
+
return /* @__PURE__ */ jsx43("div", { "data-slot": "dropdown-menu-group", role: "group", className, ...props });
|
|
3966
4124
|
}
|
|
3967
4125
|
function DropdownMenuItem({
|
|
3968
4126
|
className,
|
|
@@ -3973,8 +4131,8 @@ function DropdownMenuItem({
|
|
|
3973
4131
|
onKeyDown,
|
|
3974
4132
|
...props
|
|
3975
4133
|
}) {
|
|
3976
|
-
const close =
|
|
3977
|
-
return /* @__PURE__ */
|
|
4134
|
+
const close = React52.useContext(DropdownMenuCloseContext);
|
|
4135
|
+
return /* @__PURE__ */ jsx43(
|
|
3978
4136
|
"div",
|
|
3979
4137
|
{
|
|
3980
4138
|
"data-slot": "dropdown-menu-item",
|
|
@@ -4011,8 +4169,8 @@ function DropdownMenuCheckboxItem({
|
|
|
4011
4169
|
onClick,
|
|
4012
4170
|
...props
|
|
4013
4171
|
}) {
|
|
4014
|
-
const close =
|
|
4015
|
-
return /* @__PURE__ */
|
|
4172
|
+
const close = React52.useContext(DropdownMenuCloseContext);
|
|
4173
|
+
return /* @__PURE__ */ jsxs13(
|
|
4016
4174
|
"div",
|
|
4017
4175
|
{
|
|
4018
4176
|
"data-slot": "dropdown-menu-checkbox-item",
|
|
@@ -4032,13 +4190,13 @@ function DropdownMenuCheckboxItem({
|
|
|
4032
4190
|
},
|
|
4033
4191
|
...props,
|
|
4034
4192
|
children: [
|
|
4035
|
-
/* @__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 }),
|
|
4036
4194
|
children
|
|
4037
4195
|
]
|
|
4038
4196
|
}
|
|
4039
4197
|
);
|
|
4040
4198
|
}
|
|
4041
|
-
var DropdownMenuRadioGroupContext =
|
|
4199
|
+
var DropdownMenuRadioGroupContext = React52.createContext(null);
|
|
4042
4200
|
function DropdownMenuRadioGroup({
|
|
4043
4201
|
className,
|
|
4044
4202
|
value,
|
|
@@ -4046,11 +4204,11 @@ function DropdownMenuRadioGroup({
|
|
|
4046
4204
|
children,
|
|
4047
4205
|
...props
|
|
4048
4206
|
}) {
|
|
4049
|
-
const ctx =
|
|
4207
|
+
const ctx = React52.useMemo(
|
|
4050
4208
|
() => ({ value, setValue: (next) => onValueChange?.(next) }),
|
|
4051
4209
|
[value, onValueChange]
|
|
4052
4210
|
);
|
|
4053
|
-
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 }) });
|
|
4054
4212
|
}
|
|
4055
4213
|
function DropdownMenuRadioItem({
|
|
4056
4214
|
className,
|
|
@@ -4060,10 +4218,10 @@ function DropdownMenuRadioItem({
|
|
|
4060
4218
|
onClick,
|
|
4061
4219
|
...props
|
|
4062
4220
|
}) {
|
|
4063
|
-
const close =
|
|
4064
|
-
const group =
|
|
4221
|
+
const close = React52.useContext(DropdownMenuCloseContext);
|
|
4222
|
+
const group = React52.useContext(DropdownMenuRadioGroupContext);
|
|
4065
4223
|
const checked = group?.value === value;
|
|
4066
|
-
return /* @__PURE__ */
|
|
4224
|
+
return /* @__PURE__ */ jsxs13(
|
|
4067
4225
|
"div",
|
|
4068
4226
|
{
|
|
4069
4227
|
"data-slot": "dropdown-menu-radio-item",
|
|
@@ -4084,14 +4242,14 @@ function DropdownMenuRadioItem({
|
|
|
4084
4242
|
},
|
|
4085
4243
|
...props,
|
|
4086
4244
|
children: [
|
|
4087
|
-
/* @__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 }),
|
|
4088
4246
|
children
|
|
4089
4247
|
]
|
|
4090
4248
|
}
|
|
4091
4249
|
);
|
|
4092
4250
|
}
|
|
4093
4251
|
function DropdownMenuLabel({ className, inset, ...props }) {
|
|
4094
|
-
return /* @__PURE__ */
|
|
4252
|
+
return /* @__PURE__ */ jsx43(
|
|
4095
4253
|
"div",
|
|
4096
4254
|
{
|
|
4097
4255
|
"data-slot": "dropdown-menu-label",
|
|
@@ -4102,7 +4260,7 @@ function DropdownMenuLabel({ className, inset, ...props }) {
|
|
|
4102
4260
|
);
|
|
4103
4261
|
}
|
|
4104
4262
|
function DropdownMenuSeparator({ className, ...props }) {
|
|
4105
|
-
return /* @__PURE__ */
|
|
4263
|
+
return /* @__PURE__ */ jsx43(
|
|
4106
4264
|
"div",
|
|
4107
4265
|
{
|
|
4108
4266
|
"data-slot": "dropdown-menu-separator",
|
|
@@ -4113,7 +4271,7 @@ function DropdownMenuSeparator({ className, ...props }) {
|
|
|
4113
4271
|
);
|
|
4114
4272
|
}
|
|
4115
4273
|
function DropdownMenuShortcut({ className, ...props }) {
|
|
4116
|
-
return /* @__PURE__ */
|
|
4274
|
+
return /* @__PURE__ */ jsx43(
|
|
4117
4275
|
"span",
|
|
4118
4276
|
{
|
|
4119
4277
|
"data-slot": "dropdown-menu-shortcut",
|
|
@@ -4122,18 +4280,18 @@ function DropdownMenuShortcut({ className, ...props }) {
|
|
|
4122
4280
|
}
|
|
4123
4281
|
);
|
|
4124
4282
|
}
|
|
4125
|
-
var DropdownMenuSubContext =
|
|
4283
|
+
var DropdownMenuSubContext = React52.createContext(null);
|
|
4126
4284
|
function DropdownMenuSub({ open, defaultOpen = false, onOpenChange, children }) {
|
|
4127
4285
|
const [isOpen, setOpen] = useControllableState({
|
|
4128
4286
|
...open !== void 0 ? { value: open } : {},
|
|
4129
4287
|
defaultValue: defaultOpen,
|
|
4130
4288
|
...onOpenChange ? { onChange: onOpenChange } : {}
|
|
4131
4289
|
});
|
|
4132
|
-
return /* @__PURE__ */
|
|
4290
|
+
return /* @__PURE__ */ jsx43(DropdownMenuSubContext.Provider, { value: { open: isOpen, setOpen }, children: /* @__PURE__ */ jsx43("div", { "data-slot": "dropdown-menu-sub", children }) });
|
|
4133
4291
|
}
|
|
4134
4292
|
function DropdownMenuSubTrigger({ className, inset, children, onClick, ...props }) {
|
|
4135
|
-
const ctx =
|
|
4136
|
-
return /* @__PURE__ */
|
|
4293
|
+
const ctx = React52.useContext(DropdownMenuSubContext);
|
|
4294
|
+
return /* @__PURE__ */ jsxs13(
|
|
4137
4295
|
"div",
|
|
4138
4296
|
{
|
|
4139
4297
|
"data-slot": "dropdown-menu-sub-trigger",
|
|
@@ -4154,15 +4312,15 @@ function DropdownMenuSubTrigger({ className, inset, children, onClick, ...props
|
|
|
4154
4312
|
...props,
|
|
4155
4313
|
children: [
|
|
4156
4314
|
children,
|
|
4157
|
-
/* @__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" }) })
|
|
4158
4316
|
]
|
|
4159
4317
|
}
|
|
4160
4318
|
);
|
|
4161
4319
|
}
|
|
4162
4320
|
function DropdownMenuSubContent({ className, children, ...props }) {
|
|
4163
|
-
const ctx =
|
|
4321
|
+
const ctx = React52.useContext(DropdownMenuSubContext);
|
|
4164
4322
|
if (!ctx?.open) return null;
|
|
4165
|
-
return /* @__PURE__ */
|
|
4323
|
+
return /* @__PURE__ */ jsx43(
|
|
4166
4324
|
"div",
|
|
4167
4325
|
{
|
|
4168
4326
|
"data-slot": "dropdown-menu-sub-content",
|
|
@@ -4179,7 +4337,7 @@ function DropdownMenuSubContent({ className, children, ...props }) {
|
|
|
4179
4337
|
}
|
|
4180
4338
|
|
|
4181
4339
|
// src/components/context-menu.tsx
|
|
4182
|
-
import * as
|
|
4340
|
+
import * as React53 from "react";
|
|
4183
4341
|
|
|
4184
4342
|
// src/generated/context-menu.ts
|
|
4185
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";
|
|
@@ -4192,10 +4350,10 @@ var CONTEXT_MENU_SEPARATOR = "bg-border -mx-1 my-1 h-px";
|
|
|
4192
4350
|
var CONTEXT_MENU_SHORTCUT = "text-muted-foreground ml-auto text-xs tracking-widest";
|
|
4193
4351
|
|
|
4194
4352
|
// src/components/context-menu.tsx
|
|
4195
|
-
import { jsx as
|
|
4196
|
-
var ContextMenuContext =
|
|
4353
|
+
import { jsx as jsx44, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
4354
|
+
var ContextMenuContext = React53.createContext(null);
|
|
4197
4355
|
function useContextMenu() {
|
|
4198
|
-
const ctx =
|
|
4356
|
+
const ctx = React53.useContext(ContextMenuContext);
|
|
4199
4357
|
if (!ctx) throw new Error("ContextMenu parts must be used within <ContextMenu>");
|
|
4200
4358
|
return ctx;
|
|
4201
4359
|
}
|
|
@@ -4205,16 +4363,16 @@ function ContextMenu({ open, defaultOpen = false, onOpenChange, children }) {
|
|
|
4205
4363
|
defaultValue: defaultOpen,
|
|
4206
4364
|
...onOpenChange ? { onChange: onOpenChange } : {}
|
|
4207
4365
|
});
|
|
4208
|
-
const [point, setPoint] =
|
|
4209
|
-
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 }) });
|
|
4210
4368
|
}
|
|
4211
4369
|
function ContextMenuPortal({ children }) {
|
|
4212
|
-
return /* @__PURE__ */
|
|
4370
|
+
return /* @__PURE__ */ jsx44(Portal, { children });
|
|
4213
4371
|
}
|
|
4214
4372
|
function ContextMenuTrigger({ asChild = false, onContextMenu, ...props }) {
|
|
4215
4373
|
const { setOpen, setPoint } = useContextMenu();
|
|
4216
4374
|
const Comp = asChild ? Slot : "div";
|
|
4217
|
-
return /* @__PURE__ */
|
|
4375
|
+
return /* @__PURE__ */ jsx44(
|
|
4218
4376
|
Comp,
|
|
4219
4377
|
{
|
|
4220
4378
|
"data-slot": "context-menu-trigger",
|
|
@@ -4229,9 +4387,9 @@ function ContextMenuTrigger({ asChild = false, onContextMenu, ...props }) {
|
|
|
4229
4387
|
);
|
|
4230
4388
|
}
|
|
4231
4389
|
function ContextMenuGroup({ className, ...props }) {
|
|
4232
|
-
return /* @__PURE__ */
|
|
4390
|
+
return /* @__PURE__ */ jsx44("div", { "data-slot": "context-menu-group", role: "group", className, ...props });
|
|
4233
4391
|
}
|
|
4234
|
-
var ContextMenuCloseContext =
|
|
4392
|
+
var ContextMenuCloseContext = React53.createContext(() => {
|
|
4235
4393
|
});
|
|
4236
4394
|
function ContextMenuContent({ className, children, ...props }) {
|
|
4237
4395
|
const { open, setOpen, point } = useContextMenu();
|
|
@@ -4240,7 +4398,7 @@ function ContextMenuContent({ className, children, ...props }) {
|
|
|
4240
4398
|
enabled: open,
|
|
4241
4399
|
onDismiss: () => setOpen(false)
|
|
4242
4400
|
});
|
|
4243
|
-
const contentRef =
|
|
4401
|
+
const contentRef = React53.useRef(null);
|
|
4244
4402
|
const items = () => Array.from(
|
|
4245
4403
|
contentRef.current?.querySelectorAll("[role^='menuitem']") ?? []
|
|
4246
4404
|
).filter((el) => el.getAttribute("data-disabled") === null);
|
|
@@ -4249,13 +4407,13 @@ function ContextMenuContent({ className, children, ...props }) {
|
|
|
4249
4407
|
orientation: "vertical",
|
|
4250
4408
|
loop: true
|
|
4251
4409
|
});
|
|
4252
|
-
|
|
4410
|
+
React53.useEffect(() => {
|
|
4253
4411
|
if (!open) return;
|
|
4254
4412
|
items()[activeIndex]?.focus();
|
|
4255
4413
|
}, [open, activeIndex]);
|
|
4256
|
-
const close =
|
|
4414
|
+
const close = React53.useCallback(() => setOpen(false), [setOpen]);
|
|
4257
4415
|
if (!isPresent) return null;
|
|
4258
|
-
return /* @__PURE__ */
|
|
4416
|
+
return /* @__PURE__ */ jsx44(Portal, { children: /* @__PURE__ */ jsx44(ContextMenuCloseContext.Provider, { value: close, children: /* @__PURE__ */ jsx44(
|
|
4259
4417
|
"div",
|
|
4260
4418
|
{
|
|
4261
4419
|
"data-slot": "context-menu-content",
|
|
@@ -4287,8 +4445,8 @@ function ContextMenuItem({
|
|
|
4287
4445
|
onKeyDown,
|
|
4288
4446
|
...props
|
|
4289
4447
|
}) {
|
|
4290
|
-
const close =
|
|
4291
|
-
return /* @__PURE__ */
|
|
4448
|
+
const close = React53.useContext(ContextMenuCloseContext);
|
|
4449
|
+
return /* @__PURE__ */ jsx44(
|
|
4292
4450
|
"div",
|
|
4293
4451
|
{
|
|
4294
4452
|
"data-slot": "context-menu-item",
|
|
@@ -4325,8 +4483,8 @@ function ContextMenuCheckboxItem({
|
|
|
4325
4483
|
onClick,
|
|
4326
4484
|
...props
|
|
4327
4485
|
}) {
|
|
4328
|
-
const close =
|
|
4329
|
-
return /* @__PURE__ */
|
|
4486
|
+
const close = React53.useContext(ContextMenuCloseContext);
|
|
4487
|
+
return /* @__PURE__ */ jsxs14(
|
|
4330
4488
|
"div",
|
|
4331
4489
|
{
|
|
4332
4490
|
"data-slot": "context-menu-checkbox-item",
|
|
@@ -4346,13 +4504,13 @@ function ContextMenuCheckboxItem({
|
|
|
4346
4504
|
},
|
|
4347
4505
|
...props,
|
|
4348
4506
|
children: [
|
|
4349
|
-
/* @__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 }),
|
|
4350
4508
|
children
|
|
4351
4509
|
]
|
|
4352
4510
|
}
|
|
4353
4511
|
);
|
|
4354
4512
|
}
|
|
4355
|
-
var ContextMenuRadioGroupContext =
|
|
4513
|
+
var ContextMenuRadioGroupContext = React53.createContext(null);
|
|
4356
4514
|
function ContextMenuRadioGroup({
|
|
4357
4515
|
className,
|
|
4358
4516
|
value,
|
|
@@ -4360,11 +4518,11 @@ function ContextMenuRadioGroup({
|
|
|
4360
4518
|
children,
|
|
4361
4519
|
...props
|
|
4362
4520
|
}) {
|
|
4363
|
-
const ctx =
|
|
4521
|
+
const ctx = React53.useMemo(
|
|
4364
4522
|
() => ({ value, setValue: (next) => onValueChange?.(next) }),
|
|
4365
4523
|
[value, onValueChange]
|
|
4366
4524
|
);
|
|
4367
|
-
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 }) });
|
|
4368
4526
|
}
|
|
4369
4527
|
function ContextMenuRadioItem({
|
|
4370
4528
|
className,
|
|
@@ -4374,10 +4532,10 @@ function ContextMenuRadioItem({
|
|
|
4374
4532
|
onClick,
|
|
4375
4533
|
...props
|
|
4376
4534
|
}) {
|
|
4377
|
-
const close =
|
|
4378
|
-
const group =
|
|
4535
|
+
const close = React53.useContext(ContextMenuCloseContext);
|
|
4536
|
+
const group = React53.useContext(ContextMenuRadioGroupContext);
|
|
4379
4537
|
const checked = group?.value === value;
|
|
4380
|
-
return /* @__PURE__ */
|
|
4538
|
+
return /* @__PURE__ */ jsxs14(
|
|
4381
4539
|
"div",
|
|
4382
4540
|
{
|
|
4383
4541
|
"data-slot": "context-menu-radio-item",
|
|
@@ -4398,14 +4556,14 @@ function ContextMenuRadioItem({
|
|
|
4398
4556
|
},
|
|
4399
4557
|
...props,
|
|
4400
4558
|
children: [
|
|
4401
|
-
/* @__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 }),
|
|
4402
4560
|
children
|
|
4403
4561
|
]
|
|
4404
4562
|
}
|
|
4405
4563
|
);
|
|
4406
4564
|
}
|
|
4407
4565
|
function ContextMenuLabel({ className, inset, ...props }) {
|
|
4408
|
-
return /* @__PURE__ */
|
|
4566
|
+
return /* @__PURE__ */ jsx44(
|
|
4409
4567
|
"div",
|
|
4410
4568
|
{
|
|
4411
4569
|
"data-slot": "context-menu-label",
|
|
@@ -4416,7 +4574,7 @@ function ContextMenuLabel({ className, inset, ...props }) {
|
|
|
4416
4574
|
);
|
|
4417
4575
|
}
|
|
4418
4576
|
function ContextMenuSeparator({ className, ...props }) {
|
|
4419
|
-
return /* @__PURE__ */
|
|
4577
|
+
return /* @__PURE__ */ jsx44(
|
|
4420
4578
|
"div",
|
|
4421
4579
|
{
|
|
4422
4580
|
"data-slot": "context-menu-separator",
|
|
@@ -4427,7 +4585,7 @@ function ContextMenuSeparator({ className, ...props }) {
|
|
|
4427
4585
|
);
|
|
4428
4586
|
}
|
|
4429
4587
|
function ContextMenuShortcut({ className, ...props }) {
|
|
4430
|
-
return /* @__PURE__ */
|
|
4588
|
+
return /* @__PURE__ */ jsx44(
|
|
4431
4589
|
"span",
|
|
4432
4590
|
{
|
|
4433
4591
|
"data-slot": "context-menu-shortcut",
|
|
@@ -4436,18 +4594,18 @@ function ContextMenuShortcut({ className, ...props }) {
|
|
|
4436
4594
|
}
|
|
4437
4595
|
);
|
|
4438
4596
|
}
|
|
4439
|
-
var ContextMenuSubContext =
|
|
4597
|
+
var ContextMenuSubContext = React53.createContext(null);
|
|
4440
4598
|
function ContextMenuSub({ open, defaultOpen = false, onOpenChange, children }) {
|
|
4441
4599
|
const [isOpen, setOpen] = useControllableState({
|
|
4442
4600
|
...open !== void 0 ? { value: open } : {},
|
|
4443
4601
|
defaultValue: defaultOpen,
|
|
4444
4602
|
...onOpenChange ? { onChange: onOpenChange } : {}
|
|
4445
4603
|
});
|
|
4446
|
-
return /* @__PURE__ */
|
|
4604
|
+
return /* @__PURE__ */ jsx44(ContextMenuSubContext.Provider, { value: { open: isOpen, setOpen }, children: /* @__PURE__ */ jsx44("div", { "data-slot": "context-menu-sub", children }) });
|
|
4447
4605
|
}
|
|
4448
4606
|
function ContextMenuSubTrigger({ className, inset, children, onClick, ...props }) {
|
|
4449
|
-
const ctx =
|
|
4450
|
-
return /* @__PURE__ */
|
|
4607
|
+
const ctx = React53.useContext(ContextMenuSubContext);
|
|
4608
|
+
return /* @__PURE__ */ jsxs14(
|
|
4451
4609
|
"div",
|
|
4452
4610
|
{
|
|
4453
4611
|
"data-slot": "context-menu-sub-trigger",
|
|
@@ -4468,15 +4626,15 @@ function ContextMenuSubTrigger({ className, inset, children, onClick, ...props }
|
|
|
4468
4626
|
...props,
|
|
4469
4627
|
children: [
|
|
4470
4628
|
children,
|
|
4471
|
-
/* @__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" }) })
|
|
4472
4630
|
]
|
|
4473
4631
|
}
|
|
4474
4632
|
);
|
|
4475
4633
|
}
|
|
4476
4634
|
function ContextMenuSubContent({ className, children, ...props }) {
|
|
4477
|
-
const ctx =
|
|
4635
|
+
const ctx = React53.useContext(ContextMenuSubContext);
|
|
4478
4636
|
if (!ctx?.open) return null;
|
|
4479
|
-
return /* @__PURE__ */
|
|
4637
|
+
return /* @__PURE__ */ jsx44(
|
|
4480
4638
|
"div",
|
|
4481
4639
|
{
|
|
4482
4640
|
"data-slot": "context-menu-sub-content",
|
|
@@ -4493,7 +4651,7 @@ function ContextMenuSubContent({ className, children, ...props }) {
|
|
|
4493
4651
|
}
|
|
4494
4652
|
|
|
4495
4653
|
// src/components/menubar.tsx
|
|
4496
|
-
import * as
|
|
4654
|
+
import * as React54 from "react";
|
|
4497
4655
|
|
|
4498
4656
|
// src/generated/menubar.ts
|
|
4499
4657
|
var MENUBAR_ROOT = "bg-background flex h-9 items-center gap-1 rounded-md border p-1 shadow-xs";
|
|
@@ -4510,16 +4668,16 @@ var MENUBAR_SUB_TRIGGER = "focus:bg-accent focus:text-accent-foreground data-[st
|
|
|
4510
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";
|
|
4511
4669
|
|
|
4512
4670
|
// src/components/menubar.tsx
|
|
4513
|
-
import { jsx as
|
|
4514
|
-
var MenubarMenuContext =
|
|
4671
|
+
import { jsx as jsx45, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
4672
|
+
var MenubarMenuContext = React54.createContext(null);
|
|
4515
4673
|
function useMenu() {
|
|
4516
|
-
const ctx =
|
|
4674
|
+
const ctx = React54.useContext(MenubarMenuContext);
|
|
4517
4675
|
if (!ctx) throw new Error("Menubar parts must be used within <MenubarMenu>");
|
|
4518
4676
|
return ctx;
|
|
4519
4677
|
}
|
|
4520
|
-
var MenubarRadioGroupContext =
|
|
4678
|
+
var MenubarRadioGroupContext = React54.createContext(null);
|
|
4521
4679
|
function Menubar({ className, ...props }) {
|
|
4522
|
-
return /* @__PURE__ */
|
|
4680
|
+
return /* @__PURE__ */ jsx45(
|
|
4523
4681
|
"div",
|
|
4524
4682
|
{
|
|
4525
4683
|
"data-slot": "menubar",
|
|
@@ -4535,12 +4693,12 @@ function MenubarMenu({ open, defaultOpen = false, onOpenChange, children }) {
|
|
|
4535
4693
|
defaultValue: defaultOpen,
|
|
4536
4694
|
onChange: onOpenChange
|
|
4537
4695
|
});
|
|
4538
|
-
const triggerRef =
|
|
4539
|
-
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 }) });
|
|
4540
4698
|
}
|
|
4541
4699
|
function MenubarTrigger({ className, onClick, ...props }) {
|
|
4542
4700
|
const { open, setOpen, triggerRef } = useMenu();
|
|
4543
|
-
return /* @__PURE__ */
|
|
4701
|
+
return /* @__PURE__ */ jsx45(
|
|
4544
4702
|
"button",
|
|
4545
4703
|
{
|
|
4546
4704
|
ref: triggerRef,
|
|
@@ -4576,10 +4734,10 @@ function MenubarContent({
|
|
|
4576
4734
|
onDismiss: () => setOpen(false),
|
|
4577
4735
|
exclude: [triggerRef]
|
|
4578
4736
|
});
|
|
4579
|
-
const items =
|
|
4737
|
+
const items = React54.Children.toArray(children);
|
|
4580
4738
|
const { onKeyDown } = useRovingFocus({ count: items.length, orientation: "vertical" });
|
|
4581
4739
|
if (!isPresent) return null;
|
|
4582
|
-
return /* @__PURE__ */
|
|
4740
|
+
return /* @__PURE__ */ jsx45(Portal, { children: /* @__PURE__ */ jsx45(
|
|
4583
4741
|
"div",
|
|
4584
4742
|
{
|
|
4585
4743
|
ref: mergeRefs(presenceRef, floatingRef, dismissRef),
|
|
@@ -4596,7 +4754,7 @@ function MenubarContent({
|
|
|
4596
4754
|
) });
|
|
4597
4755
|
}
|
|
4598
4756
|
function MenubarGroup({ className, ...props }) {
|
|
4599
|
-
return /* @__PURE__ */
|
|
4757
|
+
return /* @__PURE__ */ jsx45("div", { "data-slot": "menubar-group", role: "group", className, ...props });
|
|
4600
4758
|
}
|
|
4601
4759
|
function MenubarItem({
|
|
4602
4760
|
className,
|
|
@@ -4604,7 +4762,7 @@ function MenubarItem({
|
|
|
4604
4762
|
variant = "default",
|
|
4605
4763
|
...props
|
|
4606
4764
|
}) {
|
|
4607
|
-
return /* @__PURE__ */
|
|
4765
|
+
return /* @__PURE__ */ jsx45(
|
|
4608
4766
|
"div",
|
|
4609
4767
|
{
|
|
4610
4768
|
"data-slot": "menubar-item",
|
|
@@ -4623,7 +4781,7 @@ function MenubarCheckboxItem({
|
|
|
4623
4781
|
checked,
|
|
4624
4782
|
...props
|
|
4625
4783
|
}) {
|
|
4626
|
-
return /* @__PURE__ */
|
|
4784
|
+
return /* @__PURE__ */ jsxs15(
|
|
4627
4785
|
"div",
|
|
4628
4786
|
{
|
|
4629
4787
|
"data-slot": "menubar-checkbox-item",
|
|
@@ -4633,7 +4791,7 @@ function MenubarCheckboxItem({
|
|
|
4633
4791
|
className: cn(MENUBAR_CHECKBOX_ITEM, className),
|
|
4634
4792
|
...props,
|
|
4635
4793
|
children: [
|
|
4636
|
-
/* @__PURE__ */
|
|
4794
|
+
/* @__PURE__ */ jsx45("span", { className: MENUBAR_ITEM_INDICATOR, children: checked && /* @__PURE__ */ jsx45(
|
|
4637
4795
|
"svg",
|
|
4638
4796
|
{
|
|
4639
4797
|
className: "size-4",
|
|
@@ -4643,7 +4801,7 @@ function MenubarCheckboxItem({
|
|
|
4643
4801
|
strokeWidth: "2",
|
|
4644
4802
|
strokeLinecap: "round",
|
|
4645
4803
|
strokeLinejoin: "round",
|
|
4646
|
-
children: /* @__PURE__ */
|
|
4804
|
+
children: /* @__PURE__ */ jsx45("path", { d: "M20 6 9 17l-5-5" })
|
|
4647
4805
|
}
|
|
4648
4806
|
) }),
|
|
4649
4807
|
children
|
|
@@ -4663,7 +4821,7 @@ function MenubarRadioGroup({
|
|
|
4663
4821
|
defaultValue,
|
|
4664
4822
|
onChange: onValueChange
|
|
4665
4823
|
});
|
|
4666
|
-
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 }) });
|
|
4667
4825
|
}
|
|
4668
4826
|
function MenubarRadioItem({
|
|
4669
4827
|
className,
|
|
@@ -4671,9 +4829,9 @@ function MenubarRadioItem({
|
|
|
4671
4829
|
value,
|
|
4672
4830
|
...props
|
|
4673
4831
|
}) {
|
|
4674
|
-
const ctx =
|
|
4832
|
+
const ctx = React54.useContext(MenubarRadioGroupContext);
|
|
4675
4833
|
const checked = ctx?.value === value;
|
|
4676
|
-
return /* @__PURE__ */
|
|
4834
|
+
return /* @__PURE__ */ jsxs15(
|
|
4677
4835
|
"div",
|
|
4678
4836
|
{
|
|
4679
4837
|
"data-slot": "menubar-radio-item",
|
|
@@ -4684,7 +4842,7 @@ function MenubarRadioItem({
|
|
|
4684
4842
|
onClick: () => ctx?.onValueChange(value),
|
|
4685
4843
|
...props,
|
|
4686
4844
|
children: [
|
|
4687
|
-
/* @__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" }) }) }),
|
|
4688
4846
|
children
|
|
4689
4847
|
]
|
|
4690
4848
|
}
|
|
@@ -4695,7 +4853,7 @@ function MenubarLabel({
|
|
|
4695
4853
|
inset,
|
|
4696
4854
|
...props
|
|
4697
4855
|
}) {
|
|
4698
|
-
return /* @__PURE__ */
|
|
4856
|
+
return /* @__PURE__ */ jsx45(
|
|
4699
4857
|
"div",
|
|
4700
4858
|
{
|
|
4701
4859
|
"data-slot": "menubar-label",
|
|
@@ -4706,7 +4864,7 @@ function MenubarLabel({
|
|
|
4706
4864
|
);
|
|
4707
4865
|
}
|
|
4708
4866
|
function MenubarSeparator({ className, ...props }) {
|
|
4709
|
-
return /* @__PURE__ */
|
|
4867
|
+
return /* @__PURE__ */ jsx45(
|
|
4710
4868
|
"div",
|
|
4711
4869
|
{
|
|
4712
4870
|
"data-slot": "menubar-separator",
|
|
@@ -4717,7 +4875,7 @@ function MenubarSeparator({ className, ...props }) {
|
|
|
4717
4875
|
);
|
|
4718
4876
|
}
|
|
4719
4877
|
function MenubarShortcut({ className, ...props }) {
|
|
4720
|
-
return /* @__PURE__ */
|
|
4878
|
+
return /* @__PURE__ */ jsx45(
|
|
4721
4879
|
"span",
|
|
4722
4880
|
{
|
|
4723
4881
|
"data-slot": "menubar-shortcut",
|
|
@@ -4726,9 +4884,9 @@ function MenubarShortcut({ className, ...props }) {
|
|
|
4726
4884
|
}
|
|
4727
4885
|
);
|
|
4728
4886
|
}
|
|
4729
|
-
var MenubarSubContext =
|
|
4887
|
+
var MenubarSubContext = React54.createContext(null);
|
|
4730
4888
|
function useSub() {
|
|
4731
|
-
const ctx =
|
|
4889
|
+
const ctx = React54.useContext(MenubarSubContext);
|
|
4732
4890
|
if (!ctx) throw new Error("MenubarSub parts must be used within <MenubarSub>");
|
|
4733
4891
|
return ctx;
|
|
4734
4892
|
}
|
|
@@ -4738,7 +4896,7 @@ function MenubarSub({ open, defaultOpen = false, onOpenChange, children }) {
|
|
|
4738
4896
|
defaultValue: defaultOpen,
|
|
4739
4897
|
onChange: onOpenChange
|
|
4740
4898
|
});
|
|
4741
|
-
return /* @__PURE__ */
|
|
4899
|
+
return /* @__PURE__ */ jsx45(MenubarSubContext.Provider, { value: { open: isOpen, setOpen }, children: /* @__PURE__ */ jsx45("div", { "data-slot": "menubar-sub", className: "relative", children }) });
|
|
4742
4900
|
}
|
|
4743
4901
|
function MenubarSubTrigger({
|
|
4744
4902
|
className,
|
|
@@ -4748,7 +4906,7 @@ function MenubarSubTrigger({
|
|
|
4748
4906
|
...props
|
|
4749
4907
|
}) {
|
|
4750
4908
|
const { open, setOpen } = useSub();
|
|
4751
|
-
return /* @__PURE__ */
|
|
4909
|
+
return /* @__PURE__ */ jsxs15(
|
|
4752
4910
|
"div",
|
|
4753
4911
|
{
|
|
4754
4912
|
"data-slot": "menubar-sub-trigger",
|
|
@@ -4764,7 +4922,7 @@ function MenubarSubTrigger({
|
|
|
4764
4922
|
...props,
|
|
4765
4923
|
children: [
|
|
4766
4924
|
children,
|
|
4767
|
-
/* @__PURE__ */
|
|
4925
|
+
/* @__PURE__ */ jsx45(
|
|
4768
4926
|
"svg",
|
|
4769
4927
|
{
|
|
4770
4928
|
className: "ml-auto h-4 w-4",
|
|
@@ -4774,7 +4932,7 @@ function MenubarSubTrigger({
|
|
|
4774
4932
|
strokeWidth: "2",
|
|
4775
4933
|
strokeLinecap: "round",
|
|
4776
4934
|
strokeLinejoin: "round",
|
|
4777
|
-
children: /* @__PURE__ */
|
|
4935
|
+
children: /* @__PURE__ */ jsx45("path", { d: "m9 18 6-6-6-6" })
|
|
4778
4936
|
}
|
|
4779
4937
|
)
|
|
4780
4938
|
]
|
|
@@ -4785,7 +4943,7 @@ function MenubarSubContent({ className, children, ...props }) {
|
|
|
4785
4943
|
const { open } = useSub();
|
|
4786
4944
|
const { isPresent, ref } = usePresence(open);
|
|
4787
4945
|
if (!isPresent) return null;
|
|
4788
|
-
return /* @__PURE__ */
|
|
4946
|
+
return /* @__PURE__ */ jsx45(
|
|
4789
4947
|
"div",
|
|
4790
4948
|
{
|
|
4791
4949
|
ref,
|
|
@@ -4800,7 +4958,7 @@ function MenubarSubContent({ className, children, ...props }) {
|
|
|
4800
4958
|
}
|
|
4801
4959
|
|
|
4802
4960
|
// src/components/navigation-menu.tsx
|
|
4803
|
-
import * as
|
|
4961
|
+
import * as React55 from "react";
|
|
4804
4962
|
|
|
4805
4963
|
// src/generated/navigation-menu.ts
|
|
4806
4964
|
var NAVIGATION_MENU = "group/navigation-menu relative flex max-w-max flex-1 items-center justify-center";
|
|
@@ -4813,13 +4971,13 @@ var NAVIGATION_MENU_INDICATOR = "data-[state=visible]:animate-in data-[state=hid
|
|
|
4813
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)]";
|
|
4814
4972
|
|
|
4815
4973
|
// src/components/navigation-menu.tsx
|
|
4816
|
-
import { jsx as
|
|
4974
|
+
import { jsx as jsx46, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
4817
4975
|
function navigationMenuTriggerStyle() {
|
|
4818
4976
|
return NAVIGATION_MENU_TRIGGER_STYLE;
|
|
4819
4977
|
}
|
|
4820
|
-
var NavigationMenuItemContext =
|
|
4978
|
+
var NavigationMenuItemContext = React55.createContext(null);
|
|
4821
4979
|
function useItem() {
|
|
4822
|
-
const ctx =
|
|
4980
|
+
const ctx = React55.useContext(NavigationMenuItemContext);
|
|
4823
4981
|
if (!ctx) throw new Error("NavigationMenu parts must be used within <NavigationMenuItem>");
|
|
4824
4982
|
return ctx;
|
|
4825
4983
|
}
|
|
@@ -4829,7 +4987,7 @@ function NavigationMenu({
|
|
|
4829
4987
|
viewport = true,
|
|
4830
4988
|
...props
|
|
4831
4989
|
}) {
|
|
4832
|
-
return /* @__PURE__ */
|
|
4990
|
+
return /* @__PURE__ */ jsxs16(
|
|
4833
4991
|
"nav",
|
|
4834
4992
|
{
|
|
4835
4993
|
"data-slot": "navigation-menu",
|
|
@@ -4842,13 +5000,13 @@ function NavigationMenu({
|
|
|
4842
5000
|
...props,
|
|
4843
5001
|
children: [
|
|
4844
5002
|
children,
|
|
4845
|
-
viewport && /* @__PURE__ */
|
|
5003
|
+
viewport && /* @__PURE__ */ jsx46(NavigationMenuViewport, {})
|
|
4846
5004
|
]
|
|
4847
5005
|
}
|
|
4848
5006
|
);
|
|
4849
5007
|
}
|
|
4850
5008
|
function NavigationMenuList({ className, ...props }) {
|
|
4851
|
-
return /* @__PURE__ */
|
|
5009
|
+
return /* @__PURE__ */ jsx46(
|
|
4852
5010
|
"ul",
|
|
4853
5011
|
{
|
|
4854
5012
|
"data-slot": "navigation-menu-list",
|
|
@@ -4874,8 +5032,8 @@ function NavigationMenuItem({
|
|
|
4874
5032
|
defaultValue: defaultOpen,
|
|
4875
5033
|
onChange: onOpenChange
|
|
4876
5034
|
});
|
|
4877
|
-
const triggerRef =
|
|
4878
|
-
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 }) });
|
|
4879
5037
|
}
|
|
4880
5038
|
function NavigationMenuTrigger({
|
|
4881
5039
|
className,
|
|
@@ -4884,7 +5042,7 @@ function NavigationMenuTrigger({
|
|
|
4884
5042
|
...props
|
|
4885
5043
|
}) {
|
|
4886
5044
|
const { open, setOpen, triggerRef } = useItem();
|
|
4887
|
-
return /* @__PURE__ */
|
|
5045
|
+
return /* @__PURE__ */ jsxs16(
|
|
4888
5046
|
"button",
|
|
4889
5047
|
{
|
|
4890
5048
|
ref: triggerRef,
|
|
@@ -4900,7 +5058,7 @@ function NavigationMenuTrigger({
|
|
|
4900
5058
|
children: [
|
|
4901
5059
|
children,
|
|
4902
5060
|
" ",
|
|
4903
|
-
/* @__PURE__ */
|
|
5061
|
+
/* @__PURE__ */ jsx46(
|
|
4904
5062
|
"svg",
|
|
4905
5063
|
{
|
|
4906
5064
|
className: "relative top-[1px] ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180",
|
|
@@ -4911,7 +5069,7 @@ function NavigationMenuTrigger({
|
|
|
4911
5069
|
strokeLinecap: "round",
|
|
4912
5070
|
strokeLinejoin: "round",
|
|
4913
5071
|
"aria-hidden": "true",
|
|
4914
|
-
children: /* @__PURE__ */
|
|
5072
|
+
children: /* @__PURE__ */ jsx46("path", { d: "m6 9 6 6 6-6" })
|
|
4915
5073
|
}
|
|
4916
5074
|
)
|
|
4917
5075
|
]
|
|
@@ -4927,7 +5085,7 @@ function NavigationMenuContent({ className, children, ...props }) {
|
|
|
4927
5085
|
exclude: [triggerRef]
|
|
4928
5086
|
});
|
|
4929
5087
|
if (!isPresent) return null;
|
|
4930
|
-
return /* @__PURE__ */
|
|
5088
|
+
return /* @__PURE__ */ jsx46(
|
|
4931
5089
|
"div",
|
|
4932
5090
|
{
|
|
4933
5091
|
ref: mergeRefs(presenceRef, dismissRef),
|
|
@@ -4943,7 +5101,7 @@ function NavigationMenuContent({ className, children, ...props }) {
|
|
|
4943
5101
|
);
|
|
4944
5102
|
}
|
|
4945
5103
|
function NavigationMenuViewport({ className, ...props }) {
|
|
4946
|
-
return /* @__PURE__ */
|
|
5104
|
+
return /* @__PURE__ */ jsx46("div", { className: "absolute top-full left-0 isolate z-50 flex justify-center", children: /* @__PURE__ */ jsx46(
|
|
4947
5105
|
"div",
|
|
4948
5106
|
{
|
|
4949
5107
|
"data-slot": "navigation-menu-viewport",
|
|
@@ -4961,7 +5119,7 @@ function NavigationMenuLink({
|
|
|
4961
5119
|
...props
|
|
4962
5120
|
}) {
|
|
4963
5121
|
const Comp = asChild ? Slot : "a";
|
|
4964
|
-
return /* @__PURE__ */
|
|
5122
|
+
return /* @__PURE__ */ jsx46(
|
|
4965
5123
|
Comp,
|
|
4966
5124
|
{
|
|
4967
5125
|
"data-slot": "navigation-menu-link",
|
|
@@ -4974,7 +5132,7 @@ function NavigationMenuLink({
|
|
|
4974
5132
|
);
|
|
4975
5133
|
}
|
|
4976
5134
|
function NavigationMenuIndicator({ className, ...props }) {
|
|
4977
|
-
return /* @__PURE__ */
|
|
5135
|
+
return /* @__PURE__ */ jsx46(
|
|
4978
5136
|
"div",
|
|
4979
5137
|
{
|
|
4980
5138
|
"data-slot": "navigation-menu-indicator",
|
|
@@ -4983,13 +5141,13 @@ function NavigationMenuIndicator({ className, ...props }) {
|
|
|
4983
5141
|
className
|
|
4984
5142
|
),
|
|
4985
5143
|
...props,
|
|
4986
|
-
children: /* @__PURE__ */
|
|
5144
|
+
children: /* @__PURE__ */ jsx46("div", { className: "bg-border relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm shadow-md" })
|
|
4987
5145
|
}
|
|
4988
5146
|
);
|
|
4989
5147
|
}
|
|
4990
5148
|
|
|
4991
5149
|
// src/components/dialog.tsx
|
|
4992
|
-
import * as
|
|
5150
|
+
import * as React56 from "react";
|
|
4993
5151
|
|
|
4994
5152
|
// src/generated/dialog.ts
|
|
4995
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";
|
|
@@ -5001,10 +5159,10 @@ var DIALOG_TITLE = "text-lg leading-none font-semibold";
|
|
|
5001
5159
|
var DIALOG_DESCRIPTION = "text-muted-foreground text-sm";
|
|
5002
5160
|
|
|
5003
5161
|
// src/components/dialog.tsx
|
|
5004
|
-
import { Fragment as Fragment5, jsx as
|
|
5005
|
-
var DialogContext =
|
|
5162
|
+
import { Fragment as Fragment5, jsx as jsx47, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
5163
|
+
var DialogContext = React56.createContext(null);
|
|
5006
5164
|
function useDialog() {
|
|
5007
|
-
const ctx =
|
|
5165
|
+
const ctx = React56.useContext(DialogContext);
|
|
5008
5166
|
if (!ctx) throw new Error("Dialog parts must be used within <Dialog>");
|
|
5009
5167
|
return ctx;
|
|
5010
5168
|
}
|
|
@@ -5014,13 +5172,13 @@ function Dialog({ open, defaultOpen = false, onOpenChange, children }) {
|
|
|
5014
5172
|
defaultValue: defaultOpen,
|
|
5015
5173
|
...onOpenChange ? { onChange: onOpenChange } : {}
|
|
5016
5174
|
});
|
|
5017
|
-
const triggerRef =
|
|
5018
|
-
return /* @__PURE__ */
|
|
5175
|
+
const triggerRef = React56.useRef(null);
|
|
5176
|
+
return /* @__PURE__ */ jsx47(DialogContext.Provider, { value: { open: isOpen, setOpen, triggerRef }, children });
|
|
5019
5177
|
}
|
|
5020
5178
|
function DialogTrigger({ asChild = false, onClick, ...props }) {
|
|
5021
5179
|
const { open, setOpen, triggerRef } = useDialog();
|
|
5022
5180
|
const Comp = asChild ? Slot : "button";
|
|
5023
|
-
return /* @__PURE__ */
|
|
5181
|
+
return /* @__PURE__ */ jsx47(
|
|
5024
5182
|
Comp,
|
|
5025
5183
|
{
|
|
5026
5184
|
"data-slot": "dialog-trigger",
|
|
@@ -5035,11 +5193,11 @@ function DialogTrigger({ asChild = false, onClick, ...props }) {
|
|
|
5035
5193
|
);
|
|
5036
5194
|
}
|
|
5037
5195
|
function DialogPortal({ children }) {
|
|
5038
|
-
return /* @__PURE__ */
|
|
5196
|
+
return /* @__PURE__ */ jsx47(Fragment5, { children });
|
|
5039
5197
|
}
|
|
5040
5198
|
function DialogOverlay({ className, ...props }) {
|
|
5041
5199
|
const { open, setOpen } = useDialog();
|
|
5042
|
-
return /* @__PURE__ */
|
|
5200
|
+
return /* @__PURE__ */ jsx47(
|
|
5043
5201
|
"div",
|
|
5044
5202
|
{
|
|
5045
5203
|
"data-slot": "dialog-overlay",
|
|
@@ -5050,7 +5208,7 @@ function DialogOverlay({ className, ...props }) {
|
|
|
5050
5208
|
}
|
|
5051
5209
|
);
|
|
5052
5210
|
}
|
|
5053
|
-
var XIcon = (props) => /* @__PURE__ */
|
|
5211
|
+
var XIcon = (props) => /* @__PURE__ */ jsx47(
|
|
5054
5212
|
"svg",
|
|
5055
5213
|
{
|
|
5056
5214
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -5063,7 +5221,7 @@ var XIcon = (props) => /* @__PURE__ */ jsx46(
|
|
|
5063
5221
|
strokeLinecap: "round",
|
|
5064
5222
|
strokeLinejoin: "round",
|
|
5065
5223
|
...props,
|
|
5066
|
-
children: /* @__PURE__ */
|
|
5224
|
+
children: /* @__PURE__ */ jsx47("path", { d: "M18 6 6 18M6 6l12 12" })
|
|
5067
5225
|
}
|
|
5068
5226
|
);
|
|
5069
5227
|
function DialogContent({
|
|
@@ -5080,7 +5238,7 @@ function DialogContent({
|
|
|
5080
5238
|
onDismiss: () => setOpen(false),
|
|
5081
5239
|
exclude: [triggerRef]
|
|
5082
5240
|
});
|
|
5083
|
-
|
|
5241
|
+
React56.useEffect(() => {
|
|
5084
5242
|
if (!open) return;
|
|
5085
5243
|
const prev = document.body.style.overflow;
|
|
5086
5244
|
document.body.style.overflow = "hidden";
|
|
@@ -5089,9 +5247,9 @@ function DialogContent({
|
|
|
5089
5247
|
};
|
|
5090
5248
|
}, [open]);
|
|
5091
5249
|
if (!isPresent) return null;
|
|
5092
|
-
return /* @__PURE__ */
|
|
5093
|
-
/* @__PURE__ */
|
|
5094
|
-
/* @__PURE__ */
|
|
5250
|
+
return /* @__PURE__ */ jsxs17(Portal, { children: [
|
|
5251
|
+
/* @__PURE__ */ jsx47(DialogOverlay, {}),
|
|
5252
|
+
/* @__PURE__ */ jsxs17(
|
|
5095
5253
|
"div",
|
|
5096
5254
|
{
|
|
5097
5255
|
"data-slot": "dialog-content",
|
|
@@ -5103,7 +5261,7 @@ function DialogContent({
|
|
|
5103
5261
|
...props,
|
|
5104
5262
|
children: [
|
|
5105
5263
|
children,
|
|
5106
|
-
showCloseButton && /* @__PURE__ */
|
|
5264
|
+
showCloseButton && /* @__PURE__ */ jsxs17(
|
|
5107
5265
|
"button",
|
|
5108
5266
|
{
|
|
5109
5267
|
type: "button",
|
|
@@ -5111,8 +5269,8 @@ function DialogContent({
|
|
|
5111
5269
|
onClick: () => setOpen(false),
|
|
5112
5270
|
className: DIALOG_CLOSE,
|
|
5113
5271
|
children: [
|
|
5114
|
-
/* @__PURE__ */
|
|
5115
|
-
/* @__PURE__ */
|
|
5272
|
+
/* @__PURE__ */ jsx47(XIcon, {}),
|
|
5273
|
+
/* @__PURE__ */ jsx47("span", { className: "sr-only", children: "Close" })
|
|
5116
5274
|
]
|
|
5117
5275
|
}
|
|
5118
5276
|
)
|
|
@@ -5124,7 +5282,7 @@ function DialogContent({
|
|
|
5124
5282
|
function DialogClose({ asChild = false, onClick, ...props }) {
|
|
5125
5283
|
const { setOpen } = useDialog();
|
|
5126
5284
|
const Comp = asChild ? Slot : "button";
|
|
5127
|
-
return /* @__PURE__ */
|
|
5285
|
+
return /* @__PURE__ */ jsx47(
|
|
5128
5286
|
Comp,
|
|
5129
5287
|
{
|
|
5130
5288
|
"data-slot": "dialog-close",
|
|
@@ -5137,7 +5295,7 @@ function DialogClose({ asChild = false, onClick, ...props }) {
|
|
|
5137
5295
|
);
|
|
5138
5296
|
}
|
|
5139
5297
|
function DialogHeader({ className, ...props }) {
|
|
5140
|
-
return /* @__PURE__ */
|
|
5298
|
+
return /* @__PURE__ */ jsx47(
|
|
5141
5299
|
"div",
|
|
5142
5300
|
{
|
|
5143
5301
|
"data-slot": "dialog-header",
|
|
@@ -5147,7 +5305,7 @@ function DialogHeader({ className, ...props }) {
|
|
|
5147
5305
|
);
|
|
5148
5306
|
}
|
|
5149
5307
|
function DialogFooter({ className, ...props }) {
|
|
5150
|
-
return /* @__PURE__ */
|
|
5308
|
+
return /* @__PURE__ */ jsx47(
|
|
5151
5309
|
"div",
|
|
5152
5310
|
{
|
|
5153
5311
|
"data-slot": "dialog-footer",
|
|
@@ -5157,7 +5315,7 @@ function DialogFooter({ className, ...props }) {
|
|
|
5157
5315
|
);
|
|
5158
5316
|
}
|
|
5159
5317
|
function DialogTitle({ className, ...props }) {
|
|
5160
|
-
return /* @__PURE__ */
|
|
5318
|
+
return /* @__PURE__ */ jsx47(
|
|
5161
5319
|
"h2",
|
|
5162
5320
|
{
|
|
5163
5321
|
"data-slot": "dialog-title",
|
|
@@ -5167,7 +5325,7 @@ function DialogTitle({ className, ...props }) {
|
|
|
5167
5325
|
);
|
|
5168
5326
|
}
|
|
5169
5327
|
function DialogDescription({ className, ...props }) {
|
|
5170
|
-
return /* @__PURE__ */
|
|
5328
|
+
return /* @__PURE__ */ jsx47(
|
|
5171
5329
|
"p",
|
|
5172
5330
|
{
|
|
5173
5331
|
"data-slot": "dialog-description",
|
|
@@ -5178,7 +5336,7 @@ function DialogDescription({ className, ...props }) {
|
|
|
5178
5336
|
}
|
|
5179
5337
|
|
|
5180
5338
|
// src/components/alert-dialog.tsx
|
|
5181
|
-
import * as
|
|
5339
|
+
import * as React57 from "react";
|
|
5182
5340
|
|
|
5183
5341
|
// src/generated/alert-dialog.ts
|
|
5184
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";
|
|
@@ -5189,10 +5347,10 @@ var ALERT_DIALOG_TITLE = "text-lg font-semibold";
|
|
|
5189
5347
|
var ALERT_DIALOG_DESCRIPTION = "text-muted-foreground text-sm";
|
|
5190
5348
|
|
|
5191
5349
|
// src/components/alert-dialog.tsx
|
|
5192
|
-
import { jsx as
|
|
5193
|
-
var AlertDialogContext =
|
|
5350
|
+
import { jsx as jsx48, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
5351
|
+
var AlertDialogContext = React57.createContext(null);
|
|
5194
5352
|
function useAlertDialog() {
|
|
5195
|
-
const ctx =
|
|
5353
|
+
const ctx = React57.useContext(AlertDialogContext);
|
|
5196
5354
|
if (!ctx) throw new Error("AlertDialog parts must be used within <AlertDialog>");
|
|
5197
5355
|
return ctx;
|
|
5198
5356
|
}
|
|
@@ -5202,13 +5360,13 @@ function AlertDialog({ open, defaultOpen = false, onOpenChange, children }) {
|
|
|
5202
5360
|
defaultValue: defaultOpen,
|
|
5203
5361
|
...onOpenChange ? { onChange: onOpenChange } : {}
|
|
5204
5362
|
});
|
|
5205
|
-
const triggerRef =
|
|
5206
|
-
return /* @__PURE__ */
|
|
5363
|
+
const triggerRef = React57.useRef(null);
|
|
5364
|
+
return /* @__PURE__ */ jsx48(AlertDialogContext.Provider, { value: { open: isOpen, setOpen, triggerRef }, children });
|
|
5207
5365
|
}
|
|
5208
5366
|
function AlertDialogTrigger({ asChild = false, onClick, ...props }) {
|
|
5209
5367
|
const { open, setOpen, triggerRef } = useAlertDialog();
|
|
5210
5368
|
const Comp = asChild ? Slot : "button";
|
|
5211
|
-
return /* @__PURE__ */
|
|
5369
|
+
return /* @__PURE__ */ jsx48(
|
|
5212
5370
|
Comp,
|
|
5213
5371
|
{
|
|
5214
5372
|
"data-slot": "alert-dialog-trigger",
|
|
@@ -5224,7 +5382,7 @@ function AlertDialogTrigger({ asChild = false, onClick, ...props }) {
|
|
|
5224
5382
|
}
|
|
5225
5383
|
function AlertDialogOverlay({ className, ...props }) {
|
|
5226
5384
|
const { open, setOpen } = useAlertDialog();
|
|
5227
|
-
return /* @__PURE__ */
|
|
5385
|
+
return /* @__PURE__ */ jsx48(
|
|
5228
5386
|
"div",
|
|
5229
5387
|
{
|
|
5230
5388
|
"data-slot": "alert-dialog-overlay",
|
|
@@ -5245,9 +5403,9 @@ function AlertDialogContent({ className, children, ...props }) {
|
|
|
5245
5403
|
exclude: [triggerRef]
|
|
5246
5404
|
});
|
|
5247
5405
|
if (!isPresent) return null;
|
|
5248
|
-
return /* @__PURE__ */
|
|
5249
|
-
/* @__PURE__ */
|
|
5250
|
-
/* @__PURE__ */
|
|
5406
|
+
return /* @__PURE__ */ jsxs18(Portal, { children: [
|
|
5407
|
+
/* @__PURE__ */ jsx48(AlertDialogOverlay, {}),
|
|
5408
|
+
/* @__PURE__ */ jsx48(
|
|
5251
5409
|
"div",
|
|
5252
5410
|
{
|
|
5253
5411
|
"data-slot": "alert-dialog-content",
|
|
@@ -5263,7 +5421,7 @@ function AlertDialogContent({ className, children, ...props }) {
|
|
|
5263
5421
|
] });
|
|
5264
5422
|
}
|
|
5265
5423
|
function AlertDialogHeader({ className, ...props }) {
|
|
5266
|
-
return /* @__PURE__ */
|
|
5424
|
+
return /* @__PURE__ */ jsx48(
|
|
5267
5425
|
"div",
|
|
5268
5426
|
{
|
|
5269
5427
|
"data-slot": "alert-dialog-header",
|
|
@@ -5273,7 +5431,7 @@ function AlertDialogHeader({ className, ...props }) {
|
|
|
5273
5431
|
);
|
|
5274
5432
|
}
|
|
5275
5433
|
function AlertDialogFooter({ className, ...props }) {
|
|
5276
|
-
return /* @__PURE__ */
|
|
5434
|
+
return /* @__PURE__ */ jsx48(
|
|
5277
5435
|
"div",
|
|
5278
5436
|
{
|
|
5279
5437
|
"data-slot": "alert-dialog-footer",
|
|
@@ -5283,7 +5441,7 @@ function AlertDialogFooter({ className, ...props }) {
|
|
|
5283
5441
|
);
|
|
5284
5442
|
}
|
|
5285
5443
|
function AlertDialogTitle({ className, ...props }) {
|
|
5286
|
-
return /* @__PURE__ */
|
|
5444
|
+
return /* @__PURE__ */ jsx48(
|
|
5287
5445
|
"h2",
|
|
5288
5446
|
{
|
|
5289
5447
|
"data-slot": "alert-dialog-title",
|
|
@@ -5293,7 +5451,7 @@ function AlertDialogTitle({ className, ...props }) {
|
|
|
5293
5451
|
);
|
|
5294
5452
|
}
|
|
5295
5453
|
function AlertDialogDescription({ className, ...props }) {
|
|
5296
|
-
return /* @__PURE__ */
|
|
5454
|
+
return /* @__PURE__ */ jsx48(
|
|
5297
5455
|
"p",
|
|
5298
5456
|
{
|
|
5299
5457
|
"data-slot": "alert-dialog-description",
|
|
@@ -5304,7 +5462,7 @@ function AlertDialogDescription({ className, ...props }) {
|
|
|
5304
5462
|
}
|
|
5305
5463
|
function AlertDialogAction({ className, onClick, ...props }) {
|
|
5306
5464
|
const { setOpen } = useAlertDialog();
|
|
5307
|
-
return /* @__PURE__ */
|
|
5465
|
+
return /* @__PURE__ */ jsx48(
|
|
5308
5466
|
"button",
|
|
5309
5467
|
{
|
|
5310
5468
|
"data-slot": "alert-dialog-action",
|
|
@@ -5319,7 +5477,7 @@ function AlertDialogAction({ className, onClick, ...props }) {
|
|
|
5319
5477
|
}
|
|
5320
5478
|
function AlertDialogCancel({ className, onClick, ...props }) {
|
|
5321
5479
|
const { setOpen } = useAlertDialog();
|
|
5322
|
-
return /* @__PURE__ */
|
|
5480
|
+
return /* @__PURE__ */ jsx48(
|
|
5323
5481
|
"button",
|
|
5324
5482
|
{
|
|
5325
5483
|
"data-slot": "alert-dialog-cancel",
|
|
@@ -5334,7 +5492,7 @@ function AlertDialogCancel({ className, onClick, ...props }) {
|
|
|
5334
5492
|
}
|
|
5335
5493
|
|
|
5336
5494
|
// src/components/sheet.tsx
|
|
5337
|
-
import * as
|
|
5495
|
+
import * as React58 from "react";
|
|
5338
5496
|
|
|
5339
5497
|
// src/generated/sheet.ts
|
|
5340
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";
|
|
@@ -5350,10 +5508,10 @@ var SHEET_TITLE = "text-foreground font-semibold";
|
|
|
5350
5508
|
var SHEET_DESCRIPTION = "text-muted-foreground text-sm";
|
|
5351
5509
|
|
|
5352
5510
|
// src/components/sheet.tsx
|
|
5353
|
-
import { jsx as
|
|
5354
|
-
var SheetContext =
|
|
5511
|
+
import { jsx as jsx49, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
5512
|
+
var SheetContext = React58.createContext(null);
|
|
5355
5513
|
function useSheet() {
|
|
5356
|
-
const ctx =
|
|
5514
|
+
const ctx = React58.useContext(SheetContext);
|
|
5357
5515
|
if (!ctx) throw new Error("Sheet parts must be used within <Sheet>");
|
|
5358
5516
|
return ctx;
|
|
5359
5517
|
}
|
|
@@ -5363,13 +5521,13 @@ function Sheet({ open, defaultOpen = false, onOpenChange, children }) {
|
|
|
5363
5521
|
defaultValue: defaultOpen,
|
|
5364
5522
|
...onOpenChange ? { onChange: onOpenChange } : {}
|
|
5365
5523
|
});
|
|
5366
|
-
const triggerRef =
|
|
5367
|
-
return /* @__PURE__ */
|
|
5524
|
+
const triggerRef = React58.useRef(null);
|
|
5525
|
+
return /* @__PURE__ */ jsx49(SheetContext.Provider, { value: { open: isOpen, setOpen, triggerRef }, children });
|
|
5368
5526
|
}
|
|
5369
5527
|
function SheetTrigger({ asChild = false, onClick, ...props }) {
|
|
5370
5528
|
const { open, setOpen, triggerRef } = useSheet();
|
|
5371
5529
|
const Comp = asChild ? Slot : "button";
|
|
5372
|
-
return /* @__PURE__ */
|
|
5530
|
+
return /* @__PURE__ */ jsx49(
|
|
5373
5531
|
Comp,
|
|
5374
5532
|
{
|
|
5375
5533
|
"data-slot": "sheet-trigger",
|
|
@@ -5385,7 +5543,7 @@ function SheetTrigger({ asChild = false, onClick, ...props }) {
|
|
|
5385
5543
|
}
|
|
5386
5544
|
function SheetOverlay({ className, ...props }) {
|
|
5387
5545
|
const { open, setOpen } = useSheet();
|
|
5388
|
-
return /* @__PURE__ */
|
|
5546
|
+
return /* @__PURE__ */ jsx49(
|
|
5389
5547
|
"div",
|
|
5390
5548
|
{
|
|
5391
5549
|
"data-slot": "sheet-overlay",
|
|
@@ -5402,7 +5560,7 @@ var sheetSideClasses = {
|
|
|
5402
5560
|
top: SHEET_SIDE_TOP,
|
|
5403
5561
|
bottom: SHEET_SIDE_BOTTOM
|
|
5404
5562
|
};
|
|
5405
|
-
var XIcon2 = (props) => /* @__PURE__ */
|
|
5563
|
+
var XIcon2 = (props) => /* @__PURE__ */ jsx49(
|
|
5406
5564
|
"svg",
|
|
5407
5565
|
{
|
|
5408
5566
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -5415,7 +5573,7 @@ var XIcon2 = (props) => /* @__PURE__ */ jsx48(
|
|
|
5415
5573
|
strokeLinecap: "round",
|
|
5416
5574
|
strokeLinejoin: "round",
|
|
5417
5575
|
...props,
|
|
5418
|
-
children: /* @__PURE__ */
|
|
5576
|
+
children: /* @__PURE__ */ jsx49("path", { d: "M18 6 6 18M6 6l12 12" })
|
|
5419
5577
|
}
|
|
5420
5578
|
);
|
|
5421
5579
|
function SheetContent({ className, children, side = "right", ...props }) {
|
|
@@ -5428,9 +5586,9 @@ function SheetContent({ className, children, side = "right", ...props }) {
|
|
|
5428
5586
|
exclude: [triggerRef]
|
|
5429
5587
|
});
|
|
5430
5588
|
if (!isPresent) return null;
|
|
5431
|
-
return /* @__PURE__ */
|
|
5432
|
-
/* @__PURE__ */
|
|
5433
|
-
/* @__PURE__ */
|
|
5589
|
+
return /* @__PURE__ */ jsxs19(Portal, { children: [
|
|
5590
|
+
/* @__PURE__ */ jsx49(SheetOverlay, {}),
|
|
5591
|
+
/* @__PURE__ */ jsxs19(
|
|
5434
5592
|
"div",
|
|
5435
5593
|
{
|
|
5436
5594
|
"data-slot": "sheet-content",
|
|
@@ -5442,7 +5600,7 @@ function SheetContent({ className, children, side = "right", ...props }) {
|
|
|
5442
5600
|
...props,
|
|
5443
5601
|
children: [
|
|
5444
5602
|
children,
|
|
5445
|
-
/* @__PURE__ */
|
|
5603
|
+
/* @__PURE__ */ jsxs19(
|
|
5446
5604
|
"button",
|
|
5447
5605
|
{
|
|
5448
5606
|
type: "button",
|
|
@@ -5450,8 +5608,8 @@ function SheetContent({ className, children, side = "right", ...props }) {
|
|
|
5450
5608
|
onClick: () => setOpen(false),
|
|
5451
5609
|
className: SHEET_CLOSE,
|
|
5452
5610
|
children: [
|
|
5453
|
-
/* @__PURE__ */
|
|
5454
|
-
/* @__PURE__ */
|
|
5611
|
+
/* @__PURE__ */ jsx49(XIcon2, { className: "size-4" }),
|
|
5612
|
+
/* @__PURE__ */ jsx49("span", { className: "sr-only", children: "Close" })
|
|
5455
5613
|
]
|
|
5456
5614
|
}
|
|
5457
5615
|
)
|
|
@@ -5463,7 +5621,7 @@ function SheetContent({ className, children, side = "right", ...props }) {
|
|
|
5463
5621
|
function SheetClose({ asChild = false, onClick, ...props }) {
|
|
5464
5622
|
const { setOpen } = useSheet();
|
|
5465
5623
|
const Comp = asChild ? Slot : "button";
|
|
5466
|
-
return /* @__PURE__ */
|
|
5624
|
+
return /* @__PURE__ */ jsx49(
|
|
5467
5625
|
Comp,
|
|
5468
5626
|
{
|
|
5469
5627
|
"data-slot": "sheet-close",
|
|
@@ -5476,7 +5634,7 @@ function SheetClose({ asChild = false, onClick, ...props }) {
|
|
|
5476
5634
|
);
|
|
5477
5635
|
}
|
|
5478
5636
|
function SheetHeader({ className, ...props }) {
|
|
5479
|
-
return /* @__PURE__ */
|
|
5637
|
+
return /* @__PURE__ */ jsx49(
|
|
5480
5638
|
"div",
|
|
5481
5639
|
{
|
|
5482
5640
|
"data-slot": "sheet-header",
|
|
@@ -5486,7 +5644,7 @@ function SheetHeader({ className, ...props }) {
|
|
|
5486
5644
|
);
|
|
5487
5645
|
}
|
|
5488
5646
|
function SheetFooter({ className, ...props }) {
|
|
5489
|
-
return /* @__PURE__ */
|
|
5647
|
+
return /* @__PURE__ */ jsx49(
|
|
5490
5648
|
"div",
|
|
5491
5649
|
{
|
|
5492
5650
|
"data-slot": "sheet-footer",
|
|
@@ -5496,7 +5654,7 @@ function SheetFooter({ className, ...props }) {
|
|
|
5496
5654
|
);
|
|
5497
5655
|
}
|
|
5498
5656
|
function SheetTitle({ className, ...props }) {
|
|
5499
|
-
return /* @__PURE__ */
|
|
5657
|
+
return /* @__PURE__ */ jsx49(
|
|
5500
5658
|
"h2",
|
|
5501
5659
|
{
|
|
5502
5660
|
"data-slot": "sheet-title",
|
|
@@ -5506,7 +5664,7 @@ function SheetTitle({ className, ...props }) {
|
|
|
5506
5664
|
);
|
|
5507
5665
|
}
|
|
5508
5666
|
function SheetDescription({ className, ...props }) {
|
|
5509
|
-
return /* @__PURE__ */
|
|
5667
|
+
return /* @__PURE__ */ jsx49(
|
|
5510
5668
|
"p",
|
|
5511
5669
|
{
|
|
5512
5670
|
"data-slot": "sheet-description",
|
|
@@ -5517,7 +5675,7 @@ function SheetDescription({ className, ...props }) {
|
|
|
5517
5675
|
}
|
|
5518
5676
|
|
|
5519
5677
|
// src/components/drawer.tsx
|
|
5520
|
-
import * as
|
|
5678
|
+
import * as React59 from "react";
|
|
5521
5679
|
|
|
5522
5680
|
// src/generated/drawer.ts
|
|
5523
5681
|
var DRAWER_CONTENT_BASE = "bg-background fixed z-50 flex h-auto border";
|
|
@@ -5535,10 +5693,10 @@ var DRAWER_TITLE = "text-foreground font-semibold";
|
|
|
5535
5693
|
var DRAWER_DESCRIPTION = "text-muted-foreground text-sm";
|
|
5536
5694
|
|
|
5537
5695
|
// src/components/drawer.tsx
|
|
5538
|
-
import { jsx as
|
|
5539
|
-
var DrawerContext =
|
|
5696
|
+
import { jsx as jsx50, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
5697
|
+
var DrawerContext = React59.createContext(null);
|
|
5540
5698
|
function useDrawer() {
|
|
5541
|
-
const ctx =
|
|
5699
|
+
const ctx = React59.useContext(DrawerContext);
|
|
5542
5700
|
if (!ctx) throw new Error("Drawer parts must be used within <Drawer>");
|
|
5543
5701
|
return ctx;
|
|
5544
5702
|
}
|
|
@@ -5554,12 +5712,12 @@ function Drawer({
|
|
|
5554
5712
|
defaultValue: defaultOpen,
|
|
5555
5713
|
...onOpenChange ? { onChange: onOpenChange } : {}
|
|
5556
5714
|
});
|
|
5557
|
-
return /* @__PURE__ */
|
|
5715
|
+
return /* @__PURE__ */ jsx50(DrawerContext.Provider, { value: { open: isOpen, setOpen, direction }, children: /* @__PURE__ */ jsx50("div", { "data-slot": "drawer", children }) });
|
|
5558
5716
|
}
|
|
5559
5717
|
function DrawerTrigger({ asChild = false, onClick, ...props }) {
|
|
5560
5718
|
const { setOpen } = useDrawer();
|
|
5561
5719
|
const Comp = asChild ? Slot : "button";
|
|
5562
|
-
return /* @__PURE__ */
|
|
5720
|
+
return /* @__PURE__ */ jsx50(
|
|
5563
5721
|
Comp,
|
|
5564
5722
|
{
|
|
5565
5723
|
"data-slot": "drawer-trigger",
|
|
@@ -5574,7 +5732,7 @@ function DrawerTrigger({ asChild = false, onClick, ...props }) {
|
|
|
5574
5732
|
function DrawerClose({ asChild = false, onClick, ...props }) {
|
|
5575
5733
|
const { setOpen } = useDrawer();
|
|
5576
5734
|
const Comp = asChild ? Slot : "button";
|
|
5577
|
-
return /* @__PURE__ */
|
|
5735
|
+
return /* @__PURE__ */ jsx50(
|
|
5578
5736
|
Comp,
|
|
5579
5737
|
{
|
|
5580
5738
|
"data-slot": "drawer-close",
|
|
@@ -5589,7 +5747,7 @@ function DrawerClose({ asChild = false, onClick, ...props }) {
|
|
|
5589
5747
|
function DrawerOverlay({ className, ...props }) {
|
|
5590
5748
|
const { open, setOpen } = useDrawer();
|
|
5591
5749
|
if (!open) return null;
|
|
5592
|
-
return /* @__PURE__ */
|
|
5750
|
+
return /* @__PURE__ */ jsx50(
|
|
5593
5751
|
"div",
|
|
5594
5752
|
{
|
|
5595
5753
|
"data-slot": "drawer-overlay",
|
|
@@ -5604,8 +5762,8 @@ function DrawerContent({ className, children, ...props }) {
|
|
|
5604
5762
|
const { open, setOpen, direction } = useDrawer();
|
|
5605
5763
|
const scopeRef = useFocusScope(open);
|
|
5606
5764
|
if (!open) return null;
|
|
5607
|
-
return /* @__PURE__ */
|
|
5608
|
-
/* @__PURE__ */
|
|
5765
|
+
return /* @__PURE__ */ jsxs20(Portal, { children: [
|
|
5766
|
+
/* @__PURE__ */ jsx50(
|
|
5609
5767
|
"div",
|
|
5610
5768
|
{
|
|
5611
5769
|
"data-slot": "drawer-overlay",
|
|
@@ -5613,7 +5771,7 @@ function DrawerContent({ className, children, ...props }) {
|
|
|
5613
5771
|
onClick: () => setOpen(false)
|
|
5614
5772
|
}
|
|
5615
5773
|
),
|
|
5616
|
-
/* @__PURE__ */
|
|
5774
|
+
/* @__PURE__ */ jsxs20(
|
|
5617
5775
|
"div",
|
|
5618
5776
|
{
|
|
5619
5777
|
role: "dialog",
|
|
@@ -5628,7 +5786,7 @@ function DrawerContent({ className, children, ...props }) {
|
|
|
5628
5786
|
className: cn(DRAWER_CONTENT_BASE, drawerDirectionClasses[direction], className),
|
|
5629
5787
|
...props,
|
|
5630
5788
|
children: [
|
|
5631
|
-
direction === "bottom" ? /* @__PURE__ */
|
|
5789
|
+
direction === "bottom" ? /* @__PURE__ */ jsx50(
|
|
5632
5790
|
"div",
|
|
5633
5791
|
{
|
|
5634
5792
|
"data-slot": "drawer-handle",
|
|
@@ -5642,7 +5800,7 @@ function DrawerContent({ className, children, ...props }) {
|
|
|
5642
5800
|
] });
|
|
5643
5801
|
}
|
|
5644
5802
|
function DrawerHeader({ className, ...props }) {
|
|
5645
|
-
return /* @__PURE__ */
|
|
5803
|
+
return /* @__PURE__ */ jsx50(
|
|
5646
5804
|
"div",
|
|
5647
5805
|
{
|
|
5648
5806
|
"data-slot": "drawer-header",
|
|
@@ -5652,7 +5810,7 @@ function DrawerHeader({ className, ...props }) {
|
|
|
5652
5810
|
);
|
|
5653
5811
|
}
|
|
5654
5812
|
function DrawerFooter({ className, ...props }) {
|
|
5655
|
-
return /* @__PURE__ */
|
|
5813
|
+
return /* @__PURE__ */ jsx50(
|
|
5656
5814
|
"div",
|
|
5657
5815
|
{
|
|
5658
5816
|
"data-slot": "drawer-footer",
|
|
@@ -5662,7 +5820,7 @@ function DrawerFooter({ className, ...props }) {
|
|
|
5662
5820
|
);
|
|
5663
5821
|
}
|
|
5664
5822
|
function DrawerTitle({ className, ...props }) {
|
|
5665
|
-
return /* @__PURE__ */
|
|
5823
|
+
return /* @__PURE__ */ jsx50(
|
|
5666
5824
|
"div",
|
|
5667
5825
|
{
|
|
5668
5826
|
"data-slot": "drawer-title",
|
|
@@ -5672,7 +5830,7 @@ function DrawerTitle({ className, ...props }) {
|
|
|
5672
5830
|
);
|
|
5673
5831
|
}
|
|
5674
5832
|
function DrawerDescription({ className, ...props }) {
|
|
5675
|
-
return /* @__PURE__ */
|
|
5833
|
+
return /* @__PURE__ */ jsx50(
|
|
5676
5834
|
"div",
|
|
5677
5835
|
{
|
|
5678
5836
|
"data-slot": "drawer-description",
|
|
@@ -5683,11 +5841,11 @@ function DrawerDescription({ className, ...props }) {
|
|
|
5683
5841
|
}
|
|
5684
5842
|
|
|
5685
5843
|
// src/components/select.tsx
|
|
5686
|
-
import * as
|
|
5687
|
-
import { jsx as
|
|
5688
|
-
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);
|
|
5689
5847
|
function useSelect() {
|
|
5690
|
-
const ctx =
|
|
5848
|
+
const ctx = React60.useContext(SelectContext);
|
|
5691
5849
|
if (!ctx) throw new Error("Select parts must be used within <Select>");
|
|
5692
5850
|
return ctx;
|
|
5693
5851
|
}
|
|
@@ -5710,8 +5868,8 @@ function Select({
|
|
|
5710
5868
|
defaultValue: defaultOpen,
|
|
5711
5869
|
...onOpenChange ? { onChange: onOpenChange } : {}
|
|
5712
5870
|
});
|
|
5713
|
-
const anchorRef =
|
|
5714
|
-
return /* @__PURE__ */
|
|
5871
|
+
const anchorRef = React60.useRef(null);
|
|
5872
|
+
return /* @__PURE__ */ jsx51(
|
|
5715
5873
|
SelectContext.Provider,
|
|
5716
5874
|
{
|
|
5717
5875
|
value: { value: currentValue, setValue, open: isOpen, setOpen, anchorRef },
|
|
@@ -5727,7 +5885,7 @@ function SelectTrigger({
|
|
|
5727
5885
|
...props
|
|
5728
5886
|
}) {
|
|
5729
5887
|
const { open, setOpen, anchorRef } = useSelect();
|
|
5730
|
-
return /* @__PURE__ */
|
|
5888
|
+
return /* @__PURE__ */ jsxs21(
|
|
5731
5889
|
"button",
|
|
5732
5890
|
{
|
|
5733
5891
|
type: "button",
|
|
@@ -5748,7 +5906,7 @@ function SelectTrigger({
|
|
|
5748
5906
|
...props,
|
|
5749
5907
|
children: [
|
|
5750
5908
|
children,
|
|
5751
|
-
/* @__PURE__ */
|
|
5909
|
+
/* @__PURE__ */ jsx51(
|
|
5752
5910
|
"svg",
|
|
5753
5911
|
{
|
|
5754
5912
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -5762,7 +5920,7 @@ function SelectTrigger({
|
|
|
5762
5920
|
strokeLinejoin: "round",
|
|
5763
5921
|
className: "size-4 opacity-50",
|
|
5764
5922
|
"aria-hidden": "true",
|
|
5765
|
-
children: /* @__PURE__ */
|
|
5923
|
+
children: /* @__PURE__ */ jsx51("path", { d: "m6 9 6 6 6-6" })
|
|
5766
5924
|
}
|
|
5767
5925
|
)
|
|
5768
5926
|
]
|
|
@@ -5772,7 +5930,7 @@ function SelectTrigger({
|
|
|
5772
5930
|
function SelectValue({ className, placeholder, ...props }) {
|
|
5773
5931
|
const { value } = useSelect();
|
|
5774
5932
|
const isEmpty = value === "";
|
|
5775
|
-
return /* @__PURE__ */
|
|
5933
|
+
return /* @__PURE__ */ jsx51(
|
|
5776
5934
|
"span",
|
|
5777
5935
|
{
|
|
5778
5936
|
"data-slot": "select-value",
|
|
@@ -5805,13 +5963,13 @@ function SelectContent({
|
|
|
5805
5963
|
onDismiss: () => setOpen(false),
|
|
5806
5964
|
exclude: [anchorRef]
|
|
5807
5965
|
});
|
|
5808
|
-
const items =
|
|
5966
|
+
const items = React60.Children.toArray(children).filter(React60.isValidElement);
|
|
5809
5967
|
const { activeIndex, setActiveIndex, onKeyDown } = useRovingFocus({
|
|
5810
5968
|
count: items.length,
|
|
5811
5969
|
orientation: "vertical"
|
|
5812
5970
|
});
|
|
5813
5971
|
if (!isPresent) return null;
|
|
5814
|
-
return /* @__PURE__ */
|
|
5972
|
+
return /* @__PURE__ */ jsx51(Portal, { children: /* @__PURE__ */ jsx51(
|
|
5815
5973
|
"div",
|
|
5816
5974
|
{
|
|
5817
5975
|
role: "listbox",
|
|
@@ -5827,8 +5985,8 @@ function SelectContent({
|
|
|
5827
5985
|
className
|
|
5828
5986
|
),
|
|
5829
5987
|
...props,
|
|
5830
|
-
children: /* @__PURE__ */
|
|
5831
|
-
(child, index) =>
|
|
5988
|
+
children: /* @__PURE__ */ jsx51("div", { className: "p-1", children: items.map(
|
|
5989
|
+
(child, index) => React60.cloneElement(child, {
|
|
5832
5990
|
__index: index,
|
|
5833
5991
|
__active: index === activeIndex,
|
|
5834
5992
|
__setActive: setActiveIndex
|
|
@@ -5848,7 +6006,7 @@ function SelectItem({
|
|
|
5848
6006
|
}) {
|
|
5849
6007
|
const { value: selectedValue, setValue, setOpen } = useSelect();
|
|
5850
6008
|
const selected = selectedValue === value;
|
|
5851
|
-
return /* @__PURE__ */
|
|
6009
|
+
return /* @__PURE__ */ jsxs21(
|
|
5852
6010
|
"div",
|
|
5853
6011
|
{
|
|
5854
6012
|
role: "option",
|
|
@@ -5873,7 +6031,7 @@ function SelectItem({
|
|
|
5873
6031
|
),
|
|
5874
6032
|
...props,
|
|
5875
6033
|
children: [
|
|
5876
|
-
selected ? /* @__PURE__ */
|
|
6034
|
+
selected ? /* @__PURE__ */ jsx51("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx51(
|
|
5877
6035
|
"svg",
|
|
5878
6036
|
{
|
|
5879
6037
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -5887,19 +6045,19 @@ function SelectItem({
|
|
|
5887
6045
|
strokeLinejoin: "round",
|
|
5888
6046
|
className: "size-4",
|
|
5889
6047
|
"aria-hidden": "true",
|
|
5890
|
-
children: /* @__PURE__ */
|
|
6048
|
+
children: /* @__PURE__ */ jsx51("path", { d: "M20 6 9 17l-5-5" })
|
|
5891
6049
|
}
|
|
5892
6050
|
) }) : null,
|
|
5893
|
-
/* @__PURE__ */
|
|
6051
|
+
/* @__PURE__ */ jsx51("span", { children })
|
|
5894
6052
|
]
|
|
5895
6053
|
}
|
|
5896
6054
|
);
|
|
5897
6055
|
}
|
|
5898
6056
|
function SelectGroup({ className, ...props }) {
|
|
5899
|
-
return /* @__PURE__ */
|
|
6057
|
+
return /* @__PURE__ */ jsx51("div", { role: "group", "data-slot": "select-group", className, ...props });
|
|
5900
6058
|
}
|
|
5901
6059
|
function SelectLabel({ className, ...props }) {
|
|
5902
|
-
return /* @__PURE__ */
|
|
6060
|
+
return /* @__PURE__ */ jsx51(
|
|
5903
6061
|
"div",
|
|
5904
6062
|
{
|
|
5905
6063
|
"data-slot": "select-label",
|
|
@@ -5909,7 +6067,7 @@ function SelectLabel({ className, ...props }) {
|
|
|
5909
6067
|
);
|
|
5910
6068
|
}
|
|
5911
6069
|
function SelectSeparator({ className, ...props }) {
|
|
5912
|
-
return /* @__PURE__ */
|
|
6070
|
+
return /* @__PURE__ */ jsx51(
|
|
5913
6071
|
"div",
|
|
5914
6072
|
{
|
|
5915
6073
|
"data-slot": "select-separator",
|
|
@@ -5920,7 +6078,7 @@ function SelectSeparator({ className, ...props }) {
|
|
|
5920
6078
|
}
|
|
5921
6079
|
|
|
5922
6080
|
// src/components/command.tsx
|
|
5923
|
-
import * as
|
|
6081
|
+
import * as React61 from "react";
|
|
5924
6082
|
|
|
5925
6083
|
// src/generated/command.ts
|
|
5926
6084
|
var COMMAND_ROOT = "bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md";
|
|
@@ -5937,10 +6095,10 @@ var COMMAND_SEPARATOR = "bg-border -mx-1 h-px";
|
|
|
5937
6095
|
var COMMAND_SHORTCUT = "text-muted-foreground ml-auto text-xs tracking-widest";
|
|
5938
6096
|
|
|
5939
6097
|
// src/components/command.tsx
|
|
5940
|
-
import { jsx as
|
|
5941
|
-
var CommandContext =
|
|
6098
|
+
import { jsx as jsx52, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
6099
|
+
var CommandContext = React61.createContext(null);
|
|
5942
6100
|
function useCommand() {
|
|
5943
|
-
const ctx =
|
|
6101
|
+
const ctx = React61.useContext(CommandContext);
|
|
5944
6102
|
if (!ctx) throw new Error("Command parts must be used within <Command>");
|
|
5945
6103
|
return ctx;
|
|
5946
6104
|
}
|
|
@@ -5957,7 +6115,7 @@ function Command({
|
|
|
5957
6115
|
defaultValue: defaultSearch,
|
|
5958
6116
|
...onSearchChange ? { onChange: onSearchChange } : {}
|
|
5959
6117
|
});
|
|
5960
|
-
return /* @__PURE__ */
|
|
6118
|
+
return /* @__PURE__ */ jsx52(CommandContext.Provider, { value: { search: currentSearch, setSearch }, children: /* @__PURE__ */ jsx52(
|
|
5961
6119
|
"div",
|
|
5962
6120
|
{
|
|
5963
6121
|
"data-slot": "command",
|
|
@@ -5981,8 +6139,8 @@ function CommandDialog({
|
|
|
5981
6139
|
});
|
|
5982
6140
|
const scopeRef = useFocusScope(isOpen);
|
|
5983
6141
|
if (!isOpen) return null;
|
|
5984
|
-
return /* @__PURE__ */
|
|
5985
|
-
/* @__PURE__ */
|
|
6142
|
+
return /* @__PURE__ */ jsxs22(Portal, { children: [
|
|
6143
|
+
/* @__PURE__ */ jsx52(
|
|
5986
6144
|
"div",
|
|
5987
6145
|
{
|
|
5988
6146
|
"data-slot": "command-overlay",
|
|
@@ -5990,7 +6148,7 @@ function CommandDialog({
|
|
|
5990
6148
|
onClick: () => setOpen(false)
|
|
5991
6149
|
}
|
|
5992
6150
|
),
|
|
5993
|
-
/* @__PURE__ */
|
|
6151
|
+
/* @__PURE__ */ jsx52(
|
|
5994
6152
|
"div",
|
|
5995
6153
|
{
|
|
5996
6154
|
role: "dialog",
|
|
@@ -6001,7 +6159,7 @@ function CommandDialog({
|
|
|
6001
6159
|
if (e.key === "Escape") setOpen(false);
|
|
6002
6160
|
},
|
|
6003
6161
|
className: cn(COMMAND_DIALOG_CONTENT, className),
|
|
6004
|
-
children: /* @__PURE__ */
|
|
6162
|
+
children: /* @__PURE__ */ jsx52(Command, { className: COMMAND_DIALOG_COMMAND, children })
|
|
6005
6163
|
}
|
|
6006
6164
|
)
|
|
6007
6165
|
] });
|
|
@@ -6011,8 +6169,8 @@ function CommandInput({
|
|
|
6011
6169
|
...props
|
|
6012
6170
|
}) {
|
|
6013
6171
|
const { search, setSearch } = useCommand();
|
|
6014
|
-
return /* @__PURE__ */
|
|
6015
|
-
/* @__PURE__ */
|
|
6172
|
+
return /* @__PURE__ */ jsxs22("div", { className: COMMAND_INPUT_WRAPPER, "data-slot": "command-input-wrapper", children: [
|
|
6173
|
+
/* @__PURE__ */ jsxs22(
|
|
6016
6174
|
"svg",
|
|
6017
6175
|
{
|
|
6018
6176
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -6027,12 +6185,12 @@ function CommandInput({
|
|
|
6027
6185
|
className: "size-4 shrink-0 opacity-50",
|
|
6028
6186
|
"aria-hidden": "true",
|
|
6029
6187
|
children: [
|
|
6030
|
-
/* @__PURE__ */
|
|
6031
|
-
/* @__PURE__ */
|
|
6188
|
+
/* @__PURE__ */ jsx52("circle", { cx: "11", cy: "11", r: "8" }),
|
|
6189
|
+
/* @__PURE__ */ jsx52("path", { d: "m21 21-4.3-4.3" })
|
|
6032
6190
|
]
|
|
6033
6191
|
}
|
|
6034
6192
|
),
|
|
6035
|
-
/* @__PURE__ */
|
|
6193
|
+
/* @__PURE__ */ jsx52(
|
|
6036
6194
|
"input",
|
|
6037
6195
|
{
|
|
6038
6196
|
type: "text",
|
|
@@ -6047,7 +6205,7 @@ function CommandInput({
|
|
|
6047
6205
|
] });
|
|
6048
6206
|
}
|
|
6049
6207
|
function CommandList({ className, ...props }) {
|
|
6050
|
-
return /* @__PURE__ */
|
|
6208
|
+
return /* @__PURE__ */ jsx52(
|
|
6051
6209
|
"div",
|
|
6052
6210
|
{
|
|
6053
6211
|
role: "listbox",
|
|
@@ -6061,7 +6219,7 @@ function CommandEmpty({ className, children, ...props }) {
|
|
|
6061
6219
|
const { search } = useCommand();
|
|
6062
6220
|
const hasQuery = search.trim() !== "";
|
|
6063
6221
|
if (!hasQuery) return null;
|
|
6064
|
-
return /* @__PURE__ */
|
|
6222
|
+
return /* @__PURE__ */ jsx52(
|
|
6065
6223
|
"div",
|
|
6066
6224
|
{
|
|
6067
6225
|
"data-slot": "command-empty",
|
|
@@ -6072,7 +6230,7 @@ function CommandEmpty({ className, children, ...props }) {
|
|
|
6072
6230
|
);
|
|
6073
6231
|
}
|
|
6074
6232
|
function CommandGroup({ className, heading, children, ...props }) {
|
|
6075
|
-
return /* @__PURE__ */
|
|
6233
|
+
return /* @__PURE__ */ jsxs22(
|
|
6076
6234
|
"div",
|
|
6077
6235
|
{
|
|
6078
6236
|
role: "group",
|
|
@@ -6080,7 +6238,7 @@ function CommandGroup({ className, heading, children, ...props }) {
|
|
|
6080
6238
|
className: cn(COMMAND_GROUP, className),
|
|
6081
6239
|
...props,
|
|
6082
6240
|
children: [
|
|
6083
|
-
heading ? /* @__PURE__ */
|
|
6241
|
+
heading ? /* @__PURE__ */ jsx52("div", { "data-slot": "command-group-heading", children: heading }) : null,
|
|
6084
6242
|
children
|
|
6085
6243
|
]
|
|
6086
6244
|
}
|
|
@@ -6097,7 +6255,7 @@ function CommandItem({
|
|
|
6097
6255
|
const { search } = useCommand();
|
|
6098
6256
|
const query = search.toLowerCase();
|
|
6099
6257
|
if (query !== "" && !value.toLowerCase().includes(query)) return null;
|
|
6100
|
-
return /* @__PURE__ */
|
|
6258
|
+
return /* @__PURE__ */ jsx52(
|
|
6101
6259
|
"div",
|
|
6102
6260
|
{
|
|
6103
6261
|
role: "option",
|
|
@@ -6115,7 +6273,7 @@ function CommandItem({
|
|
|
6115
6273
|
);
|
|
6116
6274
|
}
|
|
6117
6275
|
function CommandSeparator({ className, ...props }) {
|
|
6118
|
-
return /* @__PURE__ */
|
|
6276
|
+
return /* @__PURE__ */ jsx52(
|
|
6119
6277
|
"div",
|
|
6120
6278
|
{
|
|
6121
6279
|
"data-slot": "command-separator",
|
|
@@ -6125,7 +6283,7 @@ function CommandSeparator({ className, ...props }) {
|
|
|
6125
6283
|
);
|
|
6126
6284
|
}
|
|
6127
6285
|
function CommandShortcut({ className, ...props }) {
|
|
6128
|
-
return /* @__PURE__ */
|
|
6286
|
+
return /* @__PURE__ */ jsx52(
|
|
6129
6287
|
"span",
|
|
6130
6288
|
{
|
|
6131
6289
|
"data-slot": "command-shortcut",
|
|
@@ -6136,7 +6294,7 @@ function CommandShortcut({ className, ...props }) {
|
|
|
6136
6294
|
}
|
|
6137
6295
|
|
|
6138
6296
|
// src/components/chart.tsx
|
|
6139
|
-
import * as
|
|
6297
|
+
import * as React62 from "react";
|
|
6140
6298
|
|
|
6141
6299
|
// src/generated/chart.ts
|
|
6142
6300
|
var CHART_CONTAINER = "flex aspect-video justify-center text-xs [&_.recharts-layer]:outline-hidden [&_.recharts-surface]:outline-hidden [&_svg]:outline-hidden";
|
|
@@ -6144,10 +6302,10 @@ var CHART_TOOLTIP = "border-border/50 bg-background grid min-w-[8rem] items-star
|
|
|
6144
6302
|
var CHART_LEGEND = "flex items-center justify-center gap-4";
|
|
6145
6303
|
|
|
6146
6304
|
// src/components/chart.tsx
|
|
6147
|
-
import { Fragment as Fragment6, jsx as
|
|
6148
|
-
var ChartContext =
|
|
6305
|
+
import { Fragment as Fragment6, jsx as jsx53, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
6306
|
+
var ChartContext = React62.createContext(null);
|
|
6149
6307
|
function useChart() {
|
|
6150
|
-
const context =
|
|
6308
|
+
const context = React62.useContext(ChartContext);
|
|
6151
6309
|
if (!context) {
|
|
6152
6310
|
throw new Error("useChart must be used within a <ChartContainer />");
|
|
6153
6311
|
}
|
|
@@ -6160,9 +6318,9 @@ function ChartContainer({
|
|
|
6160
6318
|
config,
|
|
6161
6319
|
...props
|
|
6162
6320
|
}) {
|
|
6163
|
-
const uniqueId =
|
|
6321
|
+
const uniqueId = React62.useId();
|
|
6164
6322
|
const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`;
|
|
6165
|
-
return /* @__PURE__ */
|
|
6323
|
+
return /* @__PURE__ */ jsx53(ChartContext.Provider, { value: { config }, children: /* @__PURE__ */ jsxs23(
|
|
6166
6324
|
"div",
|
|
6167
6325
|
{
|
|
6168
6326
|
"data-slot": "chart",
|
|
@@ -6170,7 +6328,7 @@ function ChartContainer({
|
|
|
6170
6328
|
className: cn(CHART_CONTAINER, className),
|
|
6171
6329
|
...props,
|
|
6172
6330
|
children: [
|
|
6173
|
-
/* @__PURE__ */
|
|
6331
|
+
/* @__PURE__ */ jsx53(ChartStyle, { id: chartId, config }),
|
|
6174
6332
|
children
|
|
6175
6333
|
]
|
|
6176
6334
|
}
|
|
@@ -6181,7 +6339,7 @@ var ChartStyle = ({ id, config }) => {
|
|
|
6181
6339
|
if (!colorConfig.length) {
|
|
6182
6340
|
return null;
|
|
6183
6341
|
}
|
|
6184
|
-
return /* @__PURE__ */
|
|
6342
|
+
return /* @__PURE__ */ jsx53(
|
|
6185
6343
|
"style",
|
|
6186
6344
|
{
|
|
6187
6345
|
dangerouslySetInnerHTML: {
|
|
@@ -6192,7 +6350,7 @@ ${colorConfig.map(([key, itemConfig]) => ` --color-${key}: ${itemConfig.color};
|
|
|
6192
6350
|
}
|
|
6193
6351
|
);
|
|
6194
6352
|
};
|
|
6195
|
-
var ChartTooltip = ({ children }) => /* @__PURE__ */
|
|
6353
|
+
var ChartTooltip = ({ children }) => /* @__PURE__ */ jsx53(Fragment6, { children });
|
|
6196
6354
|
function ChartTooltipContent({
|
|
6197
6355
|
className,
|
|
6198
6356
|
items = [],
|
|
@@ -6205,21 +6363,21 @@ function ChartTooltipContent({
|
|
|
6205
6363
|
if (!items.length) {
|
|
6206
6364
|
return null;
|
|
6207
6365
|
}
|
|
6208
|
-
return /* @__PURE__ */
|
|
6366
|
+
return /* @__PURE__ */ jsxs23(
|
|
6209
6367
|
"div",
|
|
6210
6368
|
{
|
|
6211
6369
|
"data-slot": "chart-tooltip",
|
|
6212
6370
|
className: cn(CHART_TOOLTIP, className),
|
|
6213
6371
|
children: [
|
|
6214
|
-
!hideLabel && label ? /* @__PURE__ */
|
|
6215
|
-
/* @__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(
|
|
6216
6374
|
"div",
|
|
6217
6375
|
{
|
|
6218
6376
|
className: cn(
|
|
6219
6377
|
"[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 items-center"
|
|
6220
6378
|
),
|
|
6221
6379
|
children: [
|
|
6222
|
-
!hideIndicator && /* @__PURE__ */
|
|
6380
|
+
!hideIndicator && /* @__PURE__ */ jsx53(
|
|
6223
6381
|
"div",
|
|
6224
6382
|
{
|
|
6225
6383
|
className: "shrink-0 rounded-[2px] h-2.5 w-2.5",
|
|
@@ -6229,9 +6387,9 @@ function ChartTooltipContent({
|
|
|
6229
6387
|
}
|
|
6230
6388
|
}
|
|
6231
6389
|
),
|
|
6232
|
-
/* @__PURE__ */
|
|
6233
|
-
/* @__PURE__ */
|
|
6234
|
-
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 })
|
|
6235
6393
|
] })
|
|
6236
6394
|
]
|
|
6237
6395
|
},
|
|
@@ -6241,7 +6399,7 @@ function ChartTooltipContent({
|
|
|
6241
6399
|
}
|
|
6242
6400
|
);
|
|
6243
6401
|
}
|
|
6244
|
-
var ChartLegend = ({ children }) => /* @__PURE__ */
|
|
6402
|
+
var ChartLegend = ({ children }) => /* @__PURE__ */ jsx53(Fragment6, { children });
|
|
6245
6403
|
function ChartLegendContent({
|
|
6246
6404
|
className,
|
|
6247
6405
|
hideIcon = false,
|
|
@@ -6255,19 +6413,19 @@ function ChartLegendContent({
|
|
|
6255
6413
|
if (!rows.length) {
|
|
6256
6414
|
return null;
|
|
6257
6415
|
}
|
|
6258
|
-
return /* @__PURE__ */
|
|
6416
|
+
return /* @__PURE__ */ jsx53(
|
|
6259
6417
|
"div",
|
|
6260
6418
|
{
|
|
6261
6419
|
"data-slot": "chart-legend",
|
|
6262
6420
|
className: cn(CHART_LEGEND, className),
|
|
6263
|
-
children: rows.map((item, index) => /* @__PURE__ */
|
|
6421
|
+
children: rows.map((item, index) => /* @__PURE__ */ jsxs23(
|
|
6264
6422
|
"div",
|
|
6265
6423
|
{
|
|
6266
6424
|
className: cn(
|
|
6267
6425
|
"[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3"
|
|
6268
6426
|
),
|
|
6269
6427
|
children: [
|
|
6270
|
-
!hideIcon && /* @__PURE__ */
|
|
6428
|
+
!hideIcon && /* @__PURE__ */ jsx53(
|
|
6271
6429
|
"div",
|
|
6272
6430
|
{
|
|
6273
6431
|
className: "h-2 w-2 shrink-0 rounded-[2px]",
|
|
@@ -6284,7 +6442,7 @@ function ChartLegendContent({
|
|
|
6284
6442
|
}
|
|
6285
6443
|
|
|
6286
6444
|
// src/components/calendar.tsx
|
|
6287
|
-
import * as
|
|
6445
|
+
import * as React63 from "react";
|
|
6288
6446
|
|
|
6289
6447
|
// src/generated/calendar.ts
|
|
6290
6448
|
var CALENDAR_ROOT = "bg-background p-3 w-fit";
|
|
@@ -6302,7 +6460,7 @@ var CALENDAR_DAY_SELECTED = "bg-primary text-primary-foreground";
|
|
|
6302
6460
|
var CALENDAR_DAY_TODAY = "bg-accent text-accent-foreground rounded-md";
|
|
6303
6461
|
|
|
6304
6462
|
// src/components/calendar.tsx
|
|
6305
|
-
import { jsx as
|
|
6463
|
+
import { jsx as jsx54, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
6306
6464
|
var MONTHS = [
|
|
6307
6465
|
"January",
|
|
6308
6466
|
"February",
|
|
@@ -6321,7 +6479,7 @@ var WEEKDAYS = ["Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"];
|
|
|
6321
6479
|
var CHEVRON_LEFT = "m15 18-6-6 6-6";
|
|
6322
6480
|
var CHEVRON_RIGHT = "m9 18 6-6-6-6";
|
|
6323
6481
|
function Chevron({ d }) {
|
|
6324
|
-
return /* @__PURE__ */
|
|
6482
|
+
return /* @__PURE__ */ jsx54(
|
|
6325
6483
|
"svg",
|
|
6326
6484
|
{
|
|
6327
6485
|
className: "size-4",
|
|
@@ -6335,7 +6493,7 @@ function Chevron({ d }) {
|
|
|
6335
6493
|
strokeLinecap: "round",
|
|
6336
6494
|
strokeLinejoin: "round",
|
|
6337
6495
|
"aria-hidden": true,
|
|
6338
|
-
children: /* @__PURE__ */
|
|
6496
|
+
children: /* @__PURE__ */ jsx54("path", { d })
|
|
6339
6497
|
}
|
|
6340
6498
|
);
|
|
6341
6499
|
}
|
|
@@ -6357,7 +6515,7 @@ function Calendar({
|
|
|
6357
6515
|
today = /* @__PURE__ */ new Date(),
|
|
6358
6516
|
className
|
|
6359
6517
|
}) {
|
|
6360
|
-
const [internal, setInternal] =
|
|
6518
|
+
const [internal, setInternal] = React63.useState(
|
|
6361
6519
|
() => startOfMonth(defaultMonth ?? /* @__PURE__ */ new Date())
|
|
6362
6520
|
);
|
|
6363
6521
|
const view = month ? startOfMonth(month) : internal;
|
|
@@ -6382,38 +6540,38 @@ function Calendar({
|
|
|
6382
6540
|
size: "icon",
|
|
6383
6541
|
className: CALENDAR_NAV_BUTTON
|
|
6384
6542
|
});
|
|
6385
|
-
return /* @__PURE__ */
|
|
6543
|
+
return /* @__PURE__ */ jsxs24(
|
|
6386
6544
|
"div",
|
|
6387
6545
|
{
|
|
6388
6546
|
"data-slot": "calendar",
|
|
6389
6547
|
role: "application",
|
|
6390
6548
|
className: cn(CALENDAR_ROOT, className),
|
|
6391
6549
|
children: [
|
|
6392
|
-
/* @__PURE__ */
|
|
6393
|
-
/* @__PURE__ */
|
|
6550
|
+
/* @__PURE__ */ jsxs24("div", { className: CALENDAR_NAV, children: [
|
|
6551
|
+
/* @__PURE__ */ jsx54(
|
|
6394
6552
|
"button",
|
|
6395
6553
|
{
|
|
6396
6554
|
type: "button",
|
|
6397
6555
|
className: navClass,
|
|
6398
6556
|
"aria-label": "Previous month",
|
|
6399
6557
|
onClick: () => go(-1),
|
|
6400
|
-
children: /* @__PURE__ */
|
|
6558
|
+
children: /* @__PURE__ */ jsx54(Chevron, { d: CHEVRON_LEFT })
|
|
6401
6559
|
}
|
|
6402
6560
|
),
|
|
6403
|
-
/* @__PURE__ */
|
|
6404
|
-
/* @__PURE__ */
|
|
6561
|
+
/* @__PURE__ */ jsx54("div", { className: CALENDAR_CAPTION, children: caption }),
|
|
6562
|
+
/* @__PURE__ */ jsx54(
|
|
6405
6563
|
"button",
|
|
6406
6564
|
{
|
|
6407
6565
|
type: "button",
|
|
6408
6566
|
className: navClass,
|
|
6409
6567
|
"aria-label": "Next month",
|
|
6410
6568
|
onClick: () => go(1),
|
|
6411
|
-
children: /* @__PURE__ */
|
|
6569
|
+
children: /* @__PURE__ */ jsx54(Chevron, { d: CHEVRON_RIGHT })
|
|
6412
6570
|
}
|
|
6413
6571
|
)
|
|
6414
6572
|
] }),
|
|
6415
|
-
/* @__PURE__ */
|
|
6416
|
-
/* @__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(
|
|
6417
6575
|
"th",
|
|
6418
6576
|
{
|
|
6419
6577
|
scope: "col",
|
|
@@ -6422,9 +6580,9 @@ function Calendar({
|
|
|
6422
6580
|
},
|
|
6423
6581
|
wd
|
|
6424
6582
|
)) }) }),
|
|
6425
|
-
/* @__PURE__ */
|
|
6583
|
+
/* @__PURE__ */ jsx54("tbody", { children: weeks.map((week, wi) => /* @__PURE__ */ jsx54("tr", { className: CALENDAR_WEEK, children: week.map((cell, ci) => {
|
|
6426
6584
|
if (cell === null) {
|
|
6427
|
-
return /* @__PURE__ */
|
|
6585
|
+
return /* @__PURE__ */ jsx54(
|
|
6428
6586
|
"td",
|
|
6429
6587
|
{
|
|
6430
6588
|
className: CALENDAR_DAY_EMPTY
|
|
@@ -6435,13 +6593,13 @@ function Calendar({
|
|
|
6435
6593
|
const date = new Date(year, monthIndex, cell);
|
|
6436
6594
|
const isSelected = sameDay(selected, date);
|
|
6437
6595
|
const isToday = sameDay(today, date);
|
|
6438
|
-
return /* @__PURE__ */
|
|
6596
|
+
return /* @__PURE__ */ jsx54(
|
|
6439
6597
|
"td",
|
|
6440
6598
|
{
|
|
6441
6599
|
role: "gridcell",
|
|
6442
6600
|
"aria-selected": isSelected,
|
|
6443
6601
|
className: CALENDAR_DAY_CELL,
|
|
6444
|
-
children: /* @__PURE__ */
|
|
6602
|
+
children: /* @__PURE__ */ jsx54(
|
|
6445
6603
|
"button",
|
|
6446
6604
|
{
|
|
6447
6605
|
type: "button",
|
|
@@ -6471,7 +6629,7 @@ function Calendar({
|
|
|
6471
6629
|
}
|
|
6472
6630
|
|
|
6473
6631
|
// src/components/sonner.tsx
|
|
6474
|
-
import * as
|
|
6632
|
+
import * as React64 from "react";
|
|
6475
6633
|
|
|
6476
6634
|
// src/generated/sonner.ts
|
|
6477
6635
|
var TOAST_BASE = "pointer-events-auto flex w-full items-start gap-3 rounded-md border p-4 text-sm shadow-lg";
|
|
@@ -6496,7 +6654,7 @@ var TOAST_CONTENT = "flex-1 space-y-1";
|
|
|
6496
6654
|
var TOAST_TITLE = "font-medium";
|
|
6497
6655
|
|
|
6498
6656
|
// src/components/sonner.tsx
|
|
6499
|
-
import { jsx as
|
|
6657
|
+
import { jsx as jsx55, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
6500
6658
|
var DEFAULT_DURATION = 4e3;
|
|
6501
6659
|
var SWIPE_THRESHOLD = 45;
|
|
6502
6660
|
var SWIPE_VELOCITY = 0.11;
|
|
@@ -6561,17 +6719,17 @@ function ToastItem({
|
|
|
6561
6719
|
reportHeight,
|
|
6562
6720
|
removeHeight
|
|
6563
6721
|
}) {
|
|
6564
|
-
const ref =
|
|
6565
|
-
const [height, setHeight] =
|
|
6566
|
-
const remainingRef =
|
|
6567
|
-
const startedRef =
|
|
6568
|
-
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(
|
|
6569
6727
|
void 0
|
|
6570
6728
|
);
|
|
6571
|
-
const dragRef =
|
|
6729
|
+
const dragRef = React64.useRef(
|
|
6572
6730
|
null
|
|
6573
6731
|
);
|
|
6574
|
-
|
|
6732
|
+
React64.useLayoutEffect(() => {
|
|
6575
6733
|
const el = ref.current;
|
|
6576
6734
|
if (!el) return;
|
|
6577
6735
|
el.style.height = "auto";
|
|
@@ -6582,8 +6740,8 @@ function ToastItem({
|
|
|
6582
6740
|
reportHeight(t.id, h);
|
|
6583
6741
|
}
|
|
6584
6742
|
}, [t.id, t.message, t.description, reportHeight]);
|
|
6585
|
-
|
|
6586
|
-
|
|
6743
|
+
React64.useEffect(() => () => removeHeight(t.id), [t.id, removeHeight]);
|
|
6744
|
+
React64.useEffect(() => {
|
|
6587
6745
|
if (t.duration === Infinity || t.state === "closing" || paused) return;
|
|
6588
6746
|
startedRef.current = Date.now();
|
|
6589
6747
|
const id = setTimeout(() => store.dismiss(t.id), remainingRef.current);
|
|
@@ -6595,7 +6753,7 @@ function ToastItem({
|
|
|
6595
6753
|
);
|
|
6596
6754
|
};
|
|
6597
6755
|
}, [paused, t.id, t.duration, t.state]);
|
|
6598
|
-
|
|
6756
|
+
React64.useEffect(
|
|
6599
6757
|
() => () => {
|
|
6600
6758
|
if (flingRef.current) clearTimeout(flingRef.current);
|
|
6601
6759
|
},
|
|
@@ -6654,7 +6812,7 @@ function ToastItem({
|
|
|
6654
6812
|
);
|
|
6655
6813
|
}
|
|
6656
6814
|
};
|
|
6657
|
-
return /* @__PURE__ */
|
|
6815
|
+
return /* @__PURE__ */ jsxs25(
|
|
6658
6816
|
"li",
|
|
6659
6817
|
{
|
|
6660
6818
|
ref,
|
|
@@ -6682,11 +6840,11 @@ function ToastItem({
|
|
|
6682
6840
|
toastVariantClasses[t.variant]
|
|
6683
6841
|
),
|
|
6684
6842
|
children: [
|
|
6685
|
-
/* @__PURE__ */
|
|
6686
|
-
/* @__PURE__ */
|
|
6687
|
-
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
|
|
6688
6846
|
] }),
|
|
6689
|
-
/* @__PURE__ */
|
|
6847
|
+
/* @__PURE__ */ jsx55(
|
|
6690
6848
|
"button",
|
|
6691
6849
|
{
|
|
6692
6850
|
type: "button",
|
|
@@ -6694,7 +6852,7 @@ function ToastItem({
|
|
|
6694
6852
|
"data-slot": "toast-close",
|
|
6695
6853
|
onClick: () => store.dismiss(t.id),
|
|
6696
6854
|
className: TOAST_CLOSE,
|
|
6697
|
-
children: /* @__PURE__ */
|
|
6855
|
+
children: /* @__PURE__ */ jsx55(
|
|
6698
6856
|
"svg",
|
|
6699
6857
|
{
|
|
6700
6858
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -6707,7 +6865,7 @@ function ToastItem({
|
|
|
6707
6865
|
strokeLinecap: "round",
|
|
6708
6866
|
strokeLinejoin: "round",
|
|
6709
6867
|
"aria-hidden": "true",
|
|
6710
|
-
children: /* @__PURE__ */
|
|
6868
|
+
children: /* @__PURE__ */ jsx55("path", { d: "M18 6 6 18M6 6l12 12" })
|
|
6711
6869
|
}
|
|
6712
6870
|
)
|
|
6713
6871
|
}
|
|
@@ -6721,17 +6879,17 @@ function Toaster({
|
|
|
6721
6879
|
className,
|
|
6722
6880
|
...props
|
|
6723
6881
|
}) {
|
|
6724
|
-
const [toasts, setToasts] =
|
|
6725
|
-
const [heights, setHeights] =
|
|
6726
|
-
const [paused, setPaused] =
|
|
6727
|
-
|
|
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), []);
|
|
6728
6886
|
const onEnter = () => setPaused(true);
|
|
6729
6887
|
const onLeave = (e) => {
|
|
6730
6888
|
if (!e.currentTarget.contains(e.relatedTarget)) {
|
|
6731
6889
|
setPaused(false);
|
|
6732
6890
|
}
|
|
6733
6891
|
};
|
|
6734
|
-
const reportHeight =
|
|
6892
|
+
const reportHeight = React64.useCallback((id, h) => {
|
|
6735
6893
|
setHeights((prev) => {
|
|
6736
6894
|
if (prev.get(id) === h) return prev;
|
|
6737
6895
|
const next = new Map(prev);
|
|
@@ -6739,7 +6897,7 @@ function Toaster({
|
|
|
6739
6897
|
return next;
|
|
6740
6898
|
});
|
|
6741
6899
|
}, []);
|
|
6742
|
-
const removeHeight =
|
|
6900
|
+
const removeHeight = React64.useCallback((id) => {
|
|
6743
6901
|
setHeights((prev) => {
|
|
6744
6902
|
if (!prev.has(id)) return prev;
|
|
6745
6903
|
const next = new Map(prev);
|
|
@@ -6757,7 +6915,7 @@ function Toaster({
|
|
|
6757
6915
|
sum += heights.get(t.id) ?? 0;
|
|
6758
6916
|
return o;
|
|
6759
6917
|
});
|
|
6760
|
-
return /* @__PURE__ */
|
|
6918
|
+
return /* @__PURE__ */ jsx55(
|
|
6761
6919
|
"ol",
|
|
6762
6920
|
{
|
|
6763
6921
|
"data-slot": "toaster",
|
|
@@ -6778,7 +6936,7 @@ function Toaster({
|
|
|
6778
6936
|
onPointerOut: onLeave,
|
|
6779
6937
|
onFocus: onEnter,
|
|
6780
6938
|
onBlur: onLeave,
|
|
6781
|
-
children: ordered.map((t, i) => /* @__PURE__ */
|
|
6939
|
+
children: ordered.map((t, i) => /* @__PURE__ */ jsx55(
|
|
6782
6940
|
ToastItem,
|
|
6783
6941
|
{
|
|
6784
6942
|
toast: t,
|
|
@@ -6796,7 +6954,7 @@ function Toaster({
|
|
|
6796
6954
|
}
|
|
6797
6955
|
|
|
6798
6956
|
// src/components/form.tsx
|
|
6799
|
-
import * as
|
|
6957
|
+
import * as React65 from "react";
|
|
6800
6958
|
|
|
6801
6959
|
// src/generated/form.ts
|
|
6802
6960
|
var FORM_ITEM = "grid gap-2";
|
|
@@ -6804,21 +6962,21 @@ var FORM_DESCRIPTION = "text-muted-foreground text-sm";
|
|
|
6804
6962
|
var FORM_MESSAGE = "text-destructive text-sm";
|
|
6805
6963
|
|
|
6806
6964
|
// src/components/form.tsx
|
|
6807
|
-
import { jsx as
|
|
6808
|
-
var FormItemContext =
|
|
6965
|
+
import { jsx as jsx56 } from "react/jsx-runtime";
|
|
6966
|
+
var FormItemContext = React65.createContext(null);
|
|
6809
6967
|
function useFormItem() {
|
|
6810
|
-
const ctx =
|
|
6968
|
+
const ctx = React65.useContext(FormItemContext);
|
|
6811
6969
|
if (!ctx) {
|
|
6812
6970
|
throw new Error("Form parts must be used within <FormItem>");
|
|
6813
6971
|
}
|
|
6814
6972
|
return ctx;
|
|
6815
6973
|
}
|
|
6816
6974
|
function Form({ ...props }) {
|
|
6817
|
-
return /* @__PURE__ */
|
|
6975
|
+
return /* @__PURE__ */ jsx56("form", { "data-slot": "form", ...props });
|
|
6818
6976
|
}
|
|
6819
6977
|
function FormItem({ className, ...props }) {
|
|
6820
|
-
const id =
|
|
6821
|
-
const value =
|
|
6978
|
+
const id = React65.useId();
|
|
6979
|
+
const value = React65.useMemo(
|
|
6822
6980
|
() => ({
|
|
6823
6981
|
id,
|
|
6824
6982
|
formItemId: `${id}-form-item`,
|
|
@@ -6827,7 +6985,7 @@ function FormItem({ className, ...props }) {
|
|
|
6827
6985
|
}),
|
|
6828
6986
|
[id]
|
|
6829
6987
|
);
|
|
6830
|
-
return /* @__PURE__ */
|
|
6988
|
+
return /* @__PURE__ */ jsx56(FormItemContext.Provider, { value, children: /* @__PURE__ */ jsx56("div", { "data-slot": "form-item", className: cn(FORM_ITEM, className), ...props }) });
|
|
6831
6989
|
}
|
|
6832
6990
|
function FormLabel({
|
|
6833
6991
|
className,
|
|
@@ -6835,7 +6993,7 @@ function FormLabel({
|
|
|
6835
6993
|
...props
|
|
6836
6994
|
}) {
|
|
6837
6995
|
const { formItemId } = useFormItem();
|
|
6838
|
-
return /* @__PURE__ */
|
|
6996
|
+
return /* @__PURE__ */ jsx56(
|
|
6839
6997
|
Label,
|
|
6840
6998
|
{
|
|
6841
6999
|
"data-slot": "form-label",
|
|
@@ -6851,7 +7009,7 @@ function FormControl({
|
|
|
6851
7009
|
...props
|
|
6852
7010
|
}) {
|
|
6853
7011
|
const { formItemId, formDescriptionId, formMessageId } = useFormItem();
|
|
6854
|
-
return /* @__PURE__ */
|
|
7012
|
+
return /* @__PURE__ */ jsx56(
|
|
6855
7013
|
Slot,
|
|
6856
7014
|
{
|
|
6857
7015
|
"data-slot": "form-control",
|
|
@@ -6864,7 +7022,7 @@ function FormControl({
|
|
|
6864
7022
|
}
|
|
6865
7023
|
function FormDescription({ className, ...props }) {
|
|
6866
7024
|
const { formDescriptionId } = useFormItem();
|
|
6867
|
-
return /* @__PURE__ */
|
|
7025
|
+
return /* @__PURE__ */ jsx56(
|
|
6868
7026
|
"p",
|
|
6869
7027
|
{
|
|
6870
7028
|
"data-slot": "form-description",
|
|
@@ -6879,7 +7037,7 @@ function FormMessage({ className, children, ...props }) {
|
|
|
6879
7037
|
if (!children) {
|
|
6880
7038
|
return null;
|
|
6881
7039
|
}
|
|
6882
|
-
return /* @__PURE__ */
|
|
7040
|
+
return /* @__PURE__ */ jsx56(
|
|
6883
7041
|
"p",
|
|
6884
7042
|
{
|
|
6885
7043
|
"data-slot": "form-message",
|
|
@@ -6892,7 +7050,7 @@ function FormMessage({ className, children, ...props }) {
|
|
|
6892
7050
|
}
|
|
6893
7051
|
|
|
6894
7052
|
// src/components/resizable.tsx
|
|
6895
|
-
import * as
|
|
7053
|
+
import * as React66 from "react";
|
|
6896
7054
|
|
|
6897
7055
|
// src/generated/resizable.ts
|
|
6898
7056
|
var RESIZABLE_GROUP = "flex h-full w-full data-[panel-group-direction=vertical]:flex-col";
|
|
@@ -6901,10 +7059,10 @@ var RESIZABLE_HANDLE = "bg-border focus-visible:ring-ring relative flex w-px ite
|
|
|
6901
7059
|
var RESIZABLE_HANDLE_GRIP = "bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border";
|
|
6902
7060
|
|
|
6903
7061
|
// src/components/resizable.tsx
|
|
6904
|
-
import { jsx as
|
|
6905
|
-
var ResizableContext =
|
|
7062
|
+
import { jsx as jsx57, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
7063
|
+
var ResizableContext = React66.createContext(null);
|
|
6906
7064
|
function useResizable() {
|
|
6907
|
-
const ctx =
|
|
7065
|
+
const ctx = React66.useContext(ResizableContext);
|
|
6908
7066
|
if (!ctx)
|
|
6909
7067
|
throw new Error("Resizable parts must be used within a ResizablePanelGroup");
|
|
6910
7068
|
return ctx;
|
|
@@ -6927,9 +7085,9 @@ function ResizablePanelGroup({
|
|
|
6927
7085
|
children,
|
|
6928
7086
|
...props
|
|
6929
7087
|
}) {
|
|
6930
|
-
const [sizes, setSizes] =
|
|
6931
|
-
const groupRef =
|
|
6932
|
-
const register =
|
|
7088
|
+
const [sizes, setSizes] = React66.useState([]);
|
|
7089
|
+
const groupRef = React66.useRef(null);
|
|
7090
|
+
const register = React66.useCallback((index, defaultSize) => {
|
|
6933
7091
|
setSizes((prev) => {
|
|
6934
7092
|
if (prev[index] !== void 0) return prev;
|
|
6935
7093
|
const next = prev.slice();
|
|
@@ -6938,14 +7096,14 @@ function ResizablePanelGroup({
|
|
|
6938
7096
|
return next;
|
|
6939
7097
|
});
|
|
6940
7098
|
}, []);
|
|
6941
|
-
|
|
7099
|
+
React66.useEffect(() => {
|
|
6942
7100
|
if (sizes.length) onLayout?.(sizes);
|
|
6943
7101
|
}, [sizes, onLayout]);
|
|
6944
|
-
const value =
|
|
7102
|
+
const value = React66.useMemo(
|
|
6945
7103
|
() => ({ sizes, setSizes, register, direction, keyboardStep, groupRef }),
|
|
6946
7104
|
[sizes, register, direction, keyboardStep]
|
|
6947
7105
|
);
|
|
6948
|
-
return /* @__PURE__ */
|
|
7106
|
+
return /* @__PURE__ */ jsx57(ResizableContext.Provider, { value, children: /* @__PURE__ */ jsx57(
|
|
6949
7107
|
"div",
|
|
6950
7108
|
{
|
|
6951
7109
|
ref: groupRef,
|
|
@@ -6966,11 +7124,11 @@ function ResizablePanel({
|
|
|
6966
7124
|
...props
|
|
6967
7125
|
}) {
|
|
6968
7126
|
const { sizes, register } = useResizable();
|
|
6969
|
-
|
|
7127
|
+
React66.useEffect(() => {
|
|
6970
7128
|
register(index, defaultSize);
|
|
6971
7129
|
}, [register, index, defaultSize]);
|
|
6972
7130
|
const basis = sizes[index] ?? defaultSize;
|
|
6973
|
-
return /* @__PURE__ */
|
|
7131
|
+
return /* @__PURE__ */ jsx57(
|
|
6974
7132
|
"div",
|
|
6975
7133
|
{
|
|
6976
7134
|
"data-slot": "resizable-panel",
|
|
@@ -6989,12 +7147,12 @@ function ResizableHandle({
|
|
|
6989
7147
|
...props
|
|
6990
7148
|
}) {
|
|
6991
7149
|
const { setSizes, direction, keyboardStep, groupRef } = useResizable();
|
|
6992
|
-
const draggingRef =
|
|
6993
|
-
const resize =
|
|
7150
|
+
const draggingRef = React66.useRef(false);
|
|
7151
|
+
const resize = React66.useCallback(
|
|
6994
7152
|
(delta) => setSizes((prev) => redistribute(prev, index, delta)),
|
|
6995
7153
|
[setSizes, index]
|
|
6996
7154
|
);
|
|
6997
|
-
const onPointerMove =
|
|
7155
|
+
const onPointerMove = React66.useCallback(
|
|
6998
7156
|
(event) => {
|
|
6999
7157
|
if (!draggingRef.current) return;
|
|
7000
7158
|
const rect = groupRef.current?.getBoundingClientRect();
|
|
@@ -7006,7 +7164,7 @@ function ResizableHandle({
|
|
|
7006
7164
|
},
|
|
7007
7165
|
[direction, resize, groupRef]
|
|
7008
7166
|
);
|
|
7009
|
-
const onPointerUp =
|
|
7167
|
+
const onPointerUp = React66.useCallback(() => {
|
|
7010
7168
|
draggingRef.current = false;
|
|
7011
7169
|
window.removeEventListener("pointermove", onPointerMove);
|
|
7012
7170
|
window.removeEventListener("pointerup", onPointerUp);
|
|
@@ -7017,7 +7175,7 @@ function ResizableHandle({
|
|
|
7017
7175
|
window.addEventListener("pointermove", onPointerMove);
|
|
7018
7176
|
window.addEventListener("pointerup", onPointerUp);
|
|
7019
7177
|
};
|
|
7020
|
-
|
|
7178
|
+
React66.useEffect(() => () => onPointerUp(), [onPointerUp]);
|
|
7021
7179
|
const onKeyDown = (event) => {
|
|
7022
7180
|
let delta;
|
|
7023
7181
|
switch (event.key) {
|
|
@@ -7037,7 +7195,7 @@ function ResizableHandle({
|
|
|
7037
7195
|
event.preventDefault();
|
|
7038
7196
|
resize(delta);
|
|
7039
7197
|
};
|
|
7040
|
-
return /* @__PURE__ */
|
|
7198
|
+
return /* @__PURE__ */ jsxs26(
|
|
7041
7199
|
"div",
|
|
7042
7200
|
{
|
|
7043
7201
|
"data-slot": "resizable-handle",
|
|
@@ -7050,7 +7208,7 @@ function ResizableHandle({
|
|
|
7050
7208
|
onKeyDown,
|
|
7051
7209
|
...props,
|
|
7052
7210
|
children: [
|
|
7053
|
-
withHandle && /* @__PURE__ */
|
|
7211
|
+
withHandle && /* @__PURE__ */ jsx57("div", { className: RESIZABLE_HANDLE_GRIP, children: /* @__PURE__ */ jsxs26(
|
|
7054
7212
|
"svg",
|
|
7055
7213
|
{
|
|
7056
7214
|
className: "size-2.5",
|
|
@@ -7065,12 +7223,12 @@ function ResizableHandle({
|
|
|
7065
7223
|
strokeLinejoin: "round",
|
|
7066
7224
|
"aria-hidden": "true",
|
|
7067
7225
|
children: [
|
|
7068
|
-
/* @__PURE__ */
|
|
7069
|
-
/* @__PURE__ */
|
|
7070
|
-
/* @__PURE__ */
|
|
7071
|
-
/* @__PURE__ */
|
|
7072
|
-
/* @__PURE__ */
|
|
7073
|
-
/* @__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" })
|
|
7074
7232
|
]
|
|
7075
7233
|
}
|
|
7076
7234
|
) }),
|
|
@@ -7212,6 +7370,7 @@ export {
|
|
|
7212
7370
|
FieldSet,
|
|
7213
7371
|
FieldTitle,
|
|
7214
7372
|
Footer,
|
|
7373
|
+
Forbidden,
|
|
7215
7374
|
Form,
|
|
7216
7375
|
FormControl,
|
|
7217
7376
|
FormDescription,
|
|
@@ -7270,6 +7429,7 @@ export {
|
|
|
7270
7429
|
NavigationMenuList,
|
|
7271
7430
|
NavigationMenuTrigger,
|
|
7272
7431
|
NavigationMenuViewport,
|
|
7432
|
+
NotFound,
|
|
7273
7433
|
Pagination,
|
|
7274
7434
|
PaginationContent,
|
|
7275
7435
|
PaginationEllipsis,
|
|
@@ -7299,6 +7459,7 @@ export {
|
|
|
7299
7459
|
SelectTrigger,
|
|
7300
7460
|
SelectValue,
|
|
7301
7461
|
Separator,
|
|
7462
|
+
ServerError,
|
|
7302
7463
|
Sheet,
|
|
7303
7464
|
SheetClose,
|
|
7304
7465
|
SheetContent,
|
|
@@ -7327,6 +7488,7 @@ export {
|
|
|
7327
7488
|
Slider,
|
|
7328
7489
|
Slot,
|
|
7329
7490
|
Spinner,
|
|
7491
|
+
StatusScreen,
|
|
7330
7492
|
Switch,
|
|
7331
7493
|
Table,
|
|
7332
7494
|
TableBody,
|
|
@@ -7353,6 +7515,7 @@ export {
|
|
|
7353
7515
|
cn,
|
|
7354
7516
|
mergeRefs,
|
|
7355
7517
|
navigationMenuTriggerStyle,
|
|
7518
|
+
statusButtonClass,
|
|
7356
7519
|
toast,
|
|
7357
7520
|
toggleVariants,
|
|
7358
7521
|
useControllableState,
|