@esmate/shadcn 0.0.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/components/ui/accordion.d.ts +7 -0
- package/dist/components/ui/accordion.js +39 -0
- package/dist/components/ui/alert-dialog.d.ts +14 -0
- package/dist/components/ui/alert-dialog.js +80 -0
- package/dist/components/ui/alert.d.ts +9 -0
- package/dist/components/ui/alert.js +39 -0
- package/dist/components/ui/aspect-ratio.d.ts +3 -0
- package/dist/components/ui/aspect-ratio.js +9 -0
- package/dist/components/ui/avatar.d.ts +6 -0
- package/dist/components/ui/avatar.js +26 -0
- package/dist/components/ui/badge.d.ts +9 -0
- package/dist/components/ui/badge.js +28 -0
- package/dist/components/ui/breadcrumb.d.ts +11 -0
- package/dist/components/ui/breadcrumb.js +66 -0
- package/dist/components/ui/button.d.ts +10 -0
- package/dist/components/ui/button.js +39 -0
- package/dist/components/ui/calendar.d.ts +4 -0
- package/dist/components/ui/calendar.js +53 -0
- package/dist/components/ui/card.d.ts +9 -0
- package/dist/components/ui/card.js +52 -0
- package/dist/components/ui/carousel.d.ts +19 -0
- package/dist/components/ui/carousel.js +135 -0
- package/dist/components/ui/chart.d.ts +40 -0
- package/dist/components/ui/chart.js +138 -0
- package/dist/components/ui/checkbox.d.ts +4 -0
- package/dist/components/ui/checkbox.js +18 -0
- package/dist/components/ui/collapsible.d.ts +5 -0
- package/dist/components/ui/collapsible.js +21 -0
- package/dist/components/ui/command.d.ts +16 -0
- package/dist/components/ui/command.js +77 -0
- package/dist/components/ui/context-menu.d.ts +25 -0
- package/dist/components/ui/context-menu.js +120 -0
- package/dist/components/ui/dialog.d.ts +13 -0
- package/dist/components/ui/dialog.js +78 -0
- package/dist/components/ui/drawer.d.ts +13 -0
- package/dist/components/ui/drawer.js +75 -0
- package/dist/components/ui/dropdown-menu.d.ts +25 -0
- package/dist/components/ui/dropdown-menu.js +121 -0
- package/dist/components/ui/form.d.ts +24 -0
- package/dist/components/ui/form.js +86 -0
- package/dist/components/ui/hover-card.d.ts +6 -0
- package/dist/components/ui/hover-card.js +28 -0
- package/dist/components/ui/input-otp.d.ts +11 -0
- package/dist/components/ui/input-otp.js +42 -0
- package/dist/components/ui/input.d.ts +3 -0
- package/dist/components/ui/input.js +11 -0
- package/dist/components/ui/label.d.ts +4 -0
- package/dist/components/ui/label.js +12 -0
- package/dist/components/ui/menubar.d.ts +26 -0
- package/dist/components/ui/menubar.js +131 -0
- package/dist/components/ui/navigation-menu.d.ts +14 -0
- package/dist/components/ui/navigation-menu.js +71 -0
- package/dist/components/ui/pagination.d.ts +13 -0
- package/dist/components/ui/pagination.js +71 -0
- package/dist/components/ui/popover.d.ts +7 -0
- package/dist/components/ui/popover.js +32 -0
- package/dist/components/ui/progress.d.ts +4 -0
- package/dist/components/ui/progress.js +18 -0
- package/dist/components/ui/radio-group.d.ts +5 -0
- package/dist/components/ui/radio-group.js +25 -0
- package/dist/components/ui/resizable.d.ts +8 -0
- package/dist/components/ui/resizable.js +30 -0
- package/dist/components/ui/scroll-area.d.ts +5 -0
- package/dist/components/ui/scroll-area.js +26 -0
- package/dist/components/ui/select.d.ts +15 -0
- package/dist/components/ui/select.js +89 -0
- package/dist/components/ui/separator.d.ts +4 -0
- package/dist/components/ui/separator.js +14 -0
- package/dist/components/ui/sheet.d.ts +13 -0
- package/dist/components/ui/sheet.js +78 -0
- package/dist/components/ui/sidebar.d.ts +69 -0
- package/dist/components/ui/sidebar.js +368 -0
- package/dist/components/ui/skeleton.d.ts +2 -0
- package/dist/components/ui/skeleton.js +9 -0
- package/dist/components/ui/slider.d.ts +4 -0
- package/dist/components/ui/slider.js +37 -0
- package/dist/components/ui/sonner.d.ts +3 -0
- package/dist/components/ui/sonner.js +17 -0
- package/dist/components/ui/switch.d.ts +4 -0
- package/dist/components/ui/switch.js +15 -0
- package/dist/components/ui/table.d.ts +10 -0
- package/dist/components/ui/table.js +63 -0
- package/dist/components/ui/tabs.d.ts +7 -0
- package/dist/components/ui/tabs.js +33 -0
- package/dist/components/ui/textarea.d.ts +3 -0
- package/dist/components/ui/textarea.js +10 -0
- package/dist/components/ui/toggle-group.d.ts +7 -0
- package/dist/components/ui/toggle-group.js +37 -0
- package/dist/components/ui/toggle.d.ts +9 -0
- package/dist/components/ui/toggle.js +34 -0
- package/dist/components/ui/tooltip.d.ts +7 -0
- package/dist/components/ui/tooltip.js +34 -0
- package/dist/hooks/use-mobile.d.ts +1 -0
- package/dist/hooks/use-mobile.js +16 -0
- package/dist/index.d.ts +47 -0
- package/dist/index.js +47 -0
- package/dist/lib/hook-form/react.d.ts +8 -0
- package/dist/lib/hook-form/react.js +11 -0
- package/dist/lib/hook-form/resolvers.d.ts +1 -0
- package/dist/lib/hook-form/resolvers.js +1 -0
- package/dist/lib/hooks.d.ts +8 -0
- package/dist/lib/hooks.js +10 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/lib/utils.js +6 -0
- package/dist/lib/zod.d.ts +1 -0
- package/dist/lib/zod.js +1 -0
- package/dist/styles/new-york.css +122 -0
- package/package.json +90 -0
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
|
|
3
|
+
import * as __WEBPACK_EXTERNAL_MODULE_embla_carousel_react_7f67003b__ from "embla-carousel-react";
|
|
4
|
+
import * as __WEBPACK_EXTERNAL_MODULE_lucide_react_f128bbbb__ from "lucide-react";
|
|
5
|
+
import * as __WEBPACK_EXTERNAL_MODULE__lib_utils_js_c09d30d7__ from "../../lib/utils.js";
|
|
6
|
+
import * as __WEBPACK_EXTERNAL_MODULE__button_js_821b8d9d__ from "./button.js";
|
|
7
|
+
const CarouselContext = /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createContext(null);
|
|
8
|
+
function useCarousel() {
|
|
9
|
+
const context = __WEBPACK_EXTERNAL_MODULE_react__.useContext(CarouselContext);
|
|
10
|
+
if (!context) throw new Error("useCarousel must be used within a <Carousel />");
|
|
11
|
+
return context;
|
|
12
|
+
}
|
|
13
|
+
function Carousel({ orientation = "horizontal", opts, setApi, plugins, className, children, ...props }) {
|
|
14
|
+
const [carouselRef, api] = (0, __WEBPACK_EXTERNAL_MODULE_embla_carousel_react_7f67003b__["default"])({
|
|
15
|
+
...opts,
|
|
16
|
+
axis: "horizontal" === orientation ? "x" : "y"
|
|
17
|
+
}, plugins);
|
|
18
|
+
const [canScrollPrev, setCanScrollPrev] = __WEBPACK_EXTERNAL_MODULE_react__.useState(false);
|
|
19
|
+
const [canScrollNext, setCanScrollNext] = __WEBPACK_EXTERNAL_MODULE_react__.useState(false);
|
|
20
|
+
const onSelect = __WEBPACK_EXTERNAL_MODULE_react__.useCallback((api)=>{
|
|
21
|
+
if (!api) return;
|
|
22
|
+
setCanScrollPrev(api.canScrollPrev());
|
|
23
|
+
setCanScrollNext(api.canScrollNext());
|
|
24
|
+
}, []);
|
|
25
|
+
const scrollPrev = __WEBPACK_EXTERNAL_MODULE_react__.useCallback(()=>{
|
|
26
|
+
null == api || api.scrollPrev();
|
|
27
|
+
}, [
|
|
28
|
+
api
|
|
29
|
+
]);
|
|
30
|
+
const scrollNext = __WEBPACK_EXTERNAL_MODULE_react__.useCallback(()=>{
|
|
31
|
+
null == api || api.scrollNext();
|
|
32
|
+
}, [
|
|
33
|
+
api
|
|
34
|
+
]);
|
|
35
|
+
const handleKeyDown = __WEBPACK_EXTERNAL_MODULE_react__.useCallback((event)=>{
|
|
36
|
+
if ("ArrowLeft" === event.key) {
|
|
37
|
+
event.preventDefault();
|
|
38
|
+
scrollPrev();
|
|
39
|
+
} else if ("ArrowRight" === event.key) {
|
|
40
|
+
event.preventDefault();
|
|
41
|
+
scrollNext();
|
|
42
|
+
}
|
|
43
|
+
}, [
|
|
44
|
+
scrollPrev,
|
|
45
|
+
scrollNext
|
|
46
|
+
]);
|
|
47
|
+
__WEBPACK_EXTERNAL_MODULE_react__.useEffect(()=>{
|
|
48
|
+
if (!api || !setApi) return;
|
|
49
|
+
setApi(api);
|
|
50
|
+
}, [
|
|
51
|
+
api,
|
|
52
|
+
setApi
|
|
53
|
+
]);
|
|
54
|
+
__WEBPACK_EXTERNAL_MODULE_react__.useEffect(()=>{
|
|
55
|
+
if (!api) return;
|
|
56
|
+
onSelect(api);
|
|
57
|
+
api.on("reInit", onSelect);
|
|
58
|
+
api.on("select", onSelect);
|
|
59
|
+
return ()=>{
|
|
60
|
+
null == api || api.off("select", onSelect);
|
|
61
|
+
};
|
|
62
|
+
}, [
|
|
63
|
+
api,
|
|
64
|
+
onSelect
|
|
65
|
+
]);
|
|
66
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(CarouselContext.Provider, {
|
|
67
|
+
value: {
|
|
68
|
+
carouselRef,
|
|
69
|
+
api: api,
|
|
70
|
+
opts,
|
|
71
|
+
orientation: orientation || ((null == opts ? void 0 : opts.axis) === "y" ? "vertical" : "horizontal"),
|
|
72
|
+
scrollPrev,
|
|
73
|
+
scrollNext,
|
|
74
|
+
canScrollPrev,
|
|
75
|
+
canScrollNext
|
|
76
|
+
}
|
|
77
|
+
}, /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("div", {
|
|
78
|
+
onKeyDownCapture: handleKeyDown,
|
|
79
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_c09d30d7__.cn)("relative", className),
|
|
80
|
+
role: "region",
|
|
81
|
+
"aria-roledescription": "carousel",
|
|
82
|
+
"data-slot": "carousel",
|
|
83
|
+
...props
|
|
84
|
+
}, children));
|
|
85
|
+
}
|
|
86
|
+
function CarouselContent({ className, ...props }) {
|
|
87
|
+
const { carouselRef, orientation } = useCarousel();
|
|
88
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("div", {
|
|
89
|
+
ref: carouselRef,
|
|
90
|
+
className: "overflow-hidden",
|
|
91
|
+
"data-slot": "carousel-content"
|
|
92
|
+
}, /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("div", {
|
|
93
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_c09d30d7__.cn)("flex", "horizontal" === orientation ? "-ml-4" : "-mt-4 flex-col", className),
|
|
94
|
+
...props
|
|
95
|
+
}));
|
|
96
|
+
}
|
|
97
|
+
function CarouselItem({ className, ...props }) {
|
|
98
|
+
const { orientation } = useCarousel();
|
|
99
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("div", {
|
|
100
|
+
role: "group",
|
|
101
|
+
"aria-roledescription": "slide",
|
|
102
|
+
"data-slot": "carousel-item",
|
|
103
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_c09d30d7__.cn)("min-w-0 shrink-0 grow-0 basis-full", "horizontal" === orientation ? "pl-4" : "pt-4", className),
|
|
104
|
+
...props
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
function CarouselPrevious({ className, variant = "outline", size = "icon", ...props }) {
|
|
108
|
+
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
109
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__button_js_821b8d9d__.Button, {
|
|
110
|
+
"data-slot": "carousel-previous",
|
|
111
|
+
variant: variant,
|
|
112
|
+
size: size,
|
|
113
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_c09d30d7__.cn)("absolute size-8 rounded-full", "horizontal" === orientation ? "top-1/2 -left-12 -translate-y-1/2" : "-top-12 left-1/2 -translate-x-1/2 rotate-90", className),
|
|
114
|
+
disabled: !canScrollPrev,
|
|
115
|
+
onClick: scrollPrev,
|
|
116
|
+
...props
|
|
117
|
+
}, /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE_lucide_react_f128bbbb__.ArrowLeft, null), /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("span", {
|
|
118
|
+
className: "sr-only"
|
|
119
|
+
}, "Previous slide"));
|
|
120
|
+
}
|
|
121
|
+
function CarouselNext({ className, variant = "outline", size = "icon", ...props }) {
|
|
122
|
+
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
123
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__button_js_821b8d9d__.Button, {
|
|
124
|
+
"data-slot": "carousel-next",
|
|
125
|
+
variant: variant,
|
|
126
|
+
size: size,
|
|
127
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_c09d30d7__.cn)("absolute size-8 rounded-full", "horizontal" === orientation ? "top-1/2 -right-12 -translate-y-1/2" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90", className),
|
|
128
|
+
disabled: !canScrollNext,
|
|
129
|
+
onClick: scrollNext,
|
|
130
|
+
...props
|
|
131
|
+
}, /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE_lucide_react_f128bbbb__.ArrowRight, null), /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("span", {
|
|
132
|
+
className: "sr-only"
|
|
133
|
+
}, "Next slide"));
|
|
134
|
+
}
|
|
135
|
+
export { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as RechartsPrimitive from "recharts";
|
|
3
|
+
declare const THEMES: {
|
|
4
|
+
readonly light: "";
|
|
5
|
+
readonly dark: ".dark";
|
|
6
|
+
};
|
|
7
|
+
export type ChartConfig = {
|
|
8
|
+
[k in string]: {
|
|
9
|
+
label?: React.ReactNode;
|
|
10
|
+
icon?: React.ComponentType;
|
|
11
|
+
} & ({
|
|
12
|
+
color?: string;
|
|
13
|
+
theme?: never;
|
|
14
|
+
} | {
|
|
15
|
+
color?: never;
|
|
16
|
+
theme: Record<keyof typeof THEMES, string>;
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
declare function ChartContainer({ id, className, children, config, ...props }: React.ComponentProps<"div"> & {
|
|
20
|
+
config: ChartConfig;
|
|
21
|
+
children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>["children"];
|
|
22
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
declare const ChartStyle: ({ id, config }: {
|
|
24
|
+
id: string;
|
|
25
|
+
config: ChartConfig;
|
|
26
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
27
|
+
declare const ChartTooltip: typeof RechartsPrimitive.Tooltip;
|
|
28
|
+
declare function ChartTooltipContent({ active, payload, className, indicator, hideLabel, hideIndicator, label, labelFormatter, labelClassName, formatter, color, nameKey, labelKey, }: React.ComponentProps<typeof RechartsPrimitive.Tooltip> & React.ComponentProps<"div"> & {
|
|
29
|
+
hideLabel?: boolean;
|
|
30
|
+
hideIndicator?: boolean;
|
|
31
|
+
indicator?: "line" | "dot" | "dashed";
|
|
32
|
+
nameKey?: string;
|
|
33
|
+
labelKey?: string;
|
|
34
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
35
|
+
declare const ChartLegend: typeof RechartsPrimitive.Legend;
|
|
36
|
+
declare function ChartLegendContent({ className, hideIcon, payload, verticalAlign, nameKey, }: React.ComponentProps<"div"> & Pick<RechartsPrimitive.LegendProps, "payload" | "verticalAlign"> & {
|
|
37
|
+
hideIcon?: boolean;
|
|
38
|
+
nameKey?: string;
|
|
39
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
40
|
+
export { ChartContainer, ChartTooltip, ChartTooltipContent, ChartLegend, ChartLegendContent, ChartStyle, };
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
|
|
3
|
+
import * as __WEBPACK_EXTERNAL_MODULE_recharts__ from "recharts";
|
|
4
|
+
import * as __WEBPACK_EXTERNAL_MODULE__lib_utils_js_c09d30d7__ from "../../lib/utils.js";
|
|
5
|
+
const THEMES = {
|
|
6
|
+
light: "",
|
|
7
|
+
dark: ".dark"
|
|
8
|
+
};
|
|
9
|
+
const ChartContext = /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createContext(null);
|
|
10
|
+
function useChart() {
|
|
11
|
+
const context = __WEBPACK_EXTERNAL_MODULE_react__.useContext(ChartContext);
|
|
12
|
+
if (!context) throw new Error("useChart must be used within a <ChartContainer />");
|
|
13
|
+
return context;
|
|
14
|
+
}
|
|
15
|
+
function ChartContainer({ id, className, children, config, ...props }) {
|
|
16
|
+
const uniqueId = __WEBPACK_EXTERNAL_MODULE_react__.useId();
|
|
17
|
+
const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`;
|
|
18
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(ChartContext.Provider, {
|
|
19
|
+
value: {
|
|
20
|
+
config
|
|
21
|
+
}
|
|
22
|
+
}, /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("div", {
|
|
23
|
+
"data-slot": "chart",
|
|
24
|
+
"data-chart": chartId,
|
|
25
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_c09d30d7__.cn)("[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border flex aspect-video justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden", className),
|
|
26
|
+
...props
|
|
27
|
+
}, /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(ChartStyle, {
|
|
28
|
+
id: chartId,
|
|
29
|
+
config: config
|
|
30
|
+
}), /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE_recharts__.ResponsiveContainer, null, children)));
|
|
31
|
+
}
|
|
32
|
+
const ChartStyle = ({ id, config })=>{
|
|
33
|
+
const colorConfig = Object.entries(config).filter(([, config])=>config.theme || config.color);
|
|
34
|
+
if (!colorConfig.length) return null;
|
|
35
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("style", {
|
|
36
|
+
dangerouslySetInnerHTML: {
|
|
37
|
+
__html: Object.entries(THEMES).map(([theme, prefix])=>`
|
|
38
|
+
${prefix} [data-chart=${id}] {
|
|
39
|
+
${colorConfig.map(([key, itemConfig])=>{
|
|
40
|
+
var _itemConfig_theme;
|
|
41
|
+
const color = (null == (_itemConfig_theme = itemConfig.theme) ? void 0 : _itemConfig_theme[theme]) || itemConfig.color;
|
|
42
|
+
return color ? ` --color-${key}: ${color};` : null;
|
|
43
|
+
}).join("\n")}
|
|
44
|
+
}
|
|
45
|
+
`).join("\n")
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
const ChartTooltip = __WEBPACK_EXTERNAL_MODULE_recharts__.Tooltip;
|
|
50
|
+
function ChartTooltipContent({ active, payload, className, indicator = "dot", hideLabel = false, hideIndicator = false, label, labelFormatter, labelClassName, formatter, color, nameKey, labelKey }) {
|
|
51
|
+
const { config } = useChart();
|
|
52
|
+
const tooltipLabel = __WEBPACK_EXTERNAL_MODULE_react__.useMemo(()=>{
|
|
53
|
+
var _config_label;
|
|
54
|
+
if (hideLabel || !(null == payload ? void 0 : payload.length)) return null;
|
|
55
|
+
const [item] = payload;
|
|
56
|
+
const key = `${labelKey || (null == item ? void 0 : item.dataKey) || (null == item ? void 0 : item.name) || "value"}`;
|
|
57
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
58
|
+
const value = labelKey || "string" != typeof label ? null == itemConfig ? void 0 : itemConfig.label : (null == (_config_label = config[label]) ? void 0 : _config_label.label) || label;
|
|
59
|
+
if (labelFormatter) return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("div", {
|
|
60
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_c09d30d7__.cn)("font-medium", labelClassName)
|
|
61
|
+
}, labelFormatter(value, payload));
|
|
62
|
+
if (!value) return null;
|
|
63
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("div", {
|
|
64
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_c09d30d7__.cn)("font-medium", labelClassName)
|
|
65
|
+
}, value);
|
|
66
|
+
}, [
|
|
67
|
+
label,
|
|
68
|
+
labelFormatter,
|
|
69
|
+
payload,
|
|
70
|
+
hideLabel,
|
|
71
|
+
labelClassName,
|
|
72
|
+
config,
|
|
73
|
+
labelKey
|
|
74
|
+
]);
|
|
75
|
+
if (!active || !(null == payload ? void 0 : payload.length)) return null;
|
|
76
|
+
const nestLabel = 1 === payload.length && "dot" !== indicator;
|
|
77
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("div", {
|
|
78
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_c09d30d7__.cn)("border-neutral-200/50 bg-white grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-neutral-200 px-2.5 py-1.5 text-xs shadow-xl dark:border-neutral-800/50 dark:bg-neutral-950 dark:border-neutral-800", className)
|
|
79
|
+
}, nestLabel ? null : tooltipLabel, /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("div", {
|
|
80
|
+
className: "grid gap-1.5"
|
|
81
|
+
}, payload.map((item, index)=>{
|
|
82
|
+
const key = `${nameKey || item.name || item.dataKey || "value"}`;
|
|
83
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
84
|
+
const indicatorColor = color || item.payload.fill || item.color;
|
|
85
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("div", {
|
|
86
|
+
key: item.dataKey,
|
|
87
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_c09d30d7__.cn)("[&>svg]:text-neutral-500 flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 dark:[&>svg]:text-neutral-400", "dot" === indicator && "items-center")
|
|
88
|
+
}, formatter && (null == item ? void 0 : item.value) !== void 0 && item.name ? formatter(item.value, item.name, item, index, item.payload) : /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE_react__.Fragment, null, (null == itemConfig ? void 0 : itemConfig.icon) ? /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(itemConfig.icon, null) : !hideIndicator && /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("div", {
|
|
89
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_c09d30d7__.cn)("shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)", {
|
|
90
|
+
"h-2.5 w-2.5": "dot" === indicator,
|
|
91
|
+
"w-1": "line" === indicator,
|
|
92
|
+
"w-0 border-[1.5px] border-dashed bg-transparent": "dashed" === indicator,
|
|
93
|
+
"my-0.5": nestLabel && "dashed" === indicator
|
|
94
|
+
}),
|
|
95
|
+
style: {
|
|
96
|
+
"--color-bg": indicatorColor,
|
|
97
|
+
"--color-border": indicatorColor
|
|
98
|
+
}
|
|
99
|
+
}), /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("div", {
|
|
100
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_c09d30d7__.cn)("flex flex-1 justify-between leading-none", nestLabel ? "items-end" : "items-center")
|
|
101
|
+
}, /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("div", {
|
|
102
|
+
className: "grid gap-1.5"
|
|
103
|
+
}, nestLabel ? tooltipLabel : null, /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("span", {
|
|
104
|
+
className: "text-neutral-500 dark:text-neutral-400"
|
|
105
|
+
}, (null == itemConfig ? void 0 : itemConfig.label) || item.name)), item.value && /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("span", {
|
|
106
|
+
className: "text-neutral-950 font-mono font-medium tabular-nums dark:text-neutral-50"
|
|
107
|
+
}, item.value.toLocaleString()))));
|
|
108
|
+
})));
|
|
109
|
+
}
|
|
110
|
+
const ChartLegend = __WEBPACK_EXTERNAL_MODULE_recharts__.Legend;
|
|
111
|
+
function ChartLegendContent({ className, hideIcon = false, payload, verticalAlign = "bottom", nameKey }) {
|
|
112
|
+
const { config } = useChart();
|
|
113
|
+
if (!(null == payload ? void 0 : payload.length)) return null;
|
|
114
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("div", {
|
|
115
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_c09d30d7__.cn)("flex items-center justify-center gap-4", "top" === verticalAlign ? "pb-3" : "pt-3", className)
|
|
116
|
+
}, payload.map((item)=>{
|
|
117
|
+
const key = `${nameKey || item.dataKey || "value"}`;
|
|
118
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
119
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("div", {
|
|
120
|
+
key: item.value,
|
|
121
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_c09d30d7__.cn)("[&>svg]:text-neutral-500 flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 dark:[&>svg]:text-neutral-400")
|
|
122
|
+
}, (null == itemConfig ? void 0 : itemConfig.icon) && !hideIcon ? /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(itemConfig.icon, null) : /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("div", {
|
|
123
|
+
className: "h-2 w-2 shrink-0 rounded-[2px]",
|
|
124
|
+
style: {
|
|
125
|
+
backgroundColor: item.color
|
|
126
|
+
}
|
|
127
|
+
}), null == itemConfig ? void 0 : itemConfig.label);
|
|
128
|
+
}));
|
|
129
|
+
}
|
|
130
|
+
function getPayloadConfigFromPayload(config, payload, key) {
|
|
131
|
+
if ("object" != typeof payload || null === payload) return;
|
|
132
|
+
const payloadPayload = "payload" in payload && "object" == typeof payload.payload && null !== payload.payload ? payload.payload : void 0;
|
|
133
|
+
let configLabelKey = key;
|
|
134
|
+
if (key in payload && "string" == typeof payload[key]) configLabelKey = payload[key];
|
|
135
|
+
else if (payloadPayload && key in payloadPayload && "string" == typeof payloadPayload[key]) configLabelKey = payloadPayload[key];
|
|
136
|
+
return configLabelKey in config ? config[configLabelKey] : config[key];
|
|
137
|
+
}
|
|
138
|
+
export { ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
|
|
3
|
+
import * as __WEBPACK_EXTERNAL_MODULE__radix_ui_react_checkbox_76684228__ from "@radix-ui/react-checkbox";
|
|
4
|
+
import * as __WEBPACK_EXTERNAL_MODULE_lucide_react_f128bbbb__ from "lucide-react";
|
|
5
|
+
import * as __WEBPACK_EXTERNAL_MODULE__lib_utils_js_c09d30d7__ from "../../lib/utils.js";
|
|
6
|
+
function Checkbox({ className, ...props }) {
|
|
7
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_checkbox_76684228__.Root, {
|
|
8
|
+
"data-slot": "checkbox",
|
|
9
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_c09d30d7__.cn)("peer border-neutral-200 dark:bg-neutral-200/30 data-[state=checked]:bg-neutral-900 data-[state=checked]:text-neutral-50 dark:data-[state=checked]:bg-neutral-900 data-[state=checked]:border-neutral-900 focus-visible:border-neutral-950 focus-visible:ring-neutral-950/50 aria-invalid:ring-red-500/20 dark:aria-invalid:ring-red-500/40 aria-invalid:border-red-500 size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 dark:border-neutral-800 dark:dark:bg-neutral-800/30 dark:data-[state=checked]:bg-neutral-50 dark:data-[state=checked]:text-neutral-900 dark:dark:data-[state=checked]:bg-neutral-50 dark:data-[state=checked]:border-neutral-50 dark:focus-visible:border-neutral-300 dark:focus-visible:ring-neutral-300/50 dark:aria-invalid:ring-red-900/20 dark:dark:aria-invalid:ring-red-900/40 dark:aria-invalid:border-red-900", className),
|
|
10
|
+
...props
|
|
11
|
+
}, /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_checkbox_76684228__.Indicator, {
|
|
12
|
+
"data-slot": "checkbox-indicator",
|
|
13
|
+
className: "flex items-center justify-center text-current transition-none"
|
|
14
|
+
}, /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE_lucide_react_f128bbbb__.CheckIcon, {
|
|
15
|
+
className: "size-3.5"
|
|
16
|
+
})));
|
|
17
|
+
}
|
|
18
|
+
export { Checkbox };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
|
|
2
|
+
declare function Collapsible({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare function CollapsibleTrigger({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function CollapsibleContent({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export { Collapsible, CollapsibleTrigger, CollapsibleContent };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import * as __WEBPACK_EXTERNAL_MODULE__radix_ui_react_collapsible_4615ddd5__ from "@radix-ui/react-collapsible";
|
|
3
|
+
function Collapsible({ ...props }) {
|
|
4
|
+
return /*#__PURE__*/ React.createElement(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_collapsible_4615ddd5__.Root, {
|
|
5
|
+
"data-slot": "collapsible",
|
|
6
|
+
...props
|
|
7
|
+
});
|
|
8
|
+
}
|
|
9
|
+
function CollapsibleTrigger({ ...props }) {
|
|
10
|
+
return /*#__PURE__*/ React.createElement(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_collapsible_4615ddd5__.CollapsibleTrigger, {
|
|
11
|
+
"data-slot": "collapsible-trigger",
|
|
12
|
+
...props
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
function CollapsibleContent({ ...props }) {
|
|
16
|
+
return /*#__PURE__*/ React.createElement(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_collapsible_4615ddd5__.CollapsibleContent, {
|
|
17
|
+
"data-slot": "collapsible-content",
|
|
18
|
+
...props
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
export { Collapsible, CollapsibleContent, CollapsibleTrigger };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Command as CommandPrimitive } from "cmdk";
|
|
3
|
+
import { Dialog } from "./dialog";
|
|
4
|
+
declare function Command({ className, ...props }: React.ComponentProps<typeof CommandPrimitive>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function CommandDialog({ title, description, children, ...props }: React.ComponentProps<typeof Dialog> & {
|
|
6
|
+
title?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function CommandInput({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Input>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function CommandList({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.List>): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function CommandEmpty({ ...props }: React.ComponentProps<typeof CommandPrimitive.Empty>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function CommandGroup({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function CommandSeparator({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Separator>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare function CommandItem({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Item>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare function CommandShortcut({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator, };
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
|
|
3
|
+
import * as __WEBPACK_EXTERNAL_MODULE_cmdk__ from "cmdk";
|
|
4
|
+
import * as __WEBPACK_EXTERNAL_MODULE_lucide_react_f128bbbb__ from "lucide-react";
|
|
5
|
+
import * as __WEBPACK_EXTERNAL_MODULE__lib_utils_js_c09d30d7__ from "../../lib/utils.js";
|
|
6
|
+
import * as __WEBPACK_EXTERNAL_MODULE__dialog_js_d344ec77__ from "./dialog.js";
|
|
7
|
+
function Command({ className, ...props }) {
|
|
8
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE_cmdk__.Command, {
|
|
9
|
+
"data-slot": "command",
|
|
10
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_c09d30d7__.cn)("bg-white text-neutral-950 flex h-full w-full flex-col overflow-hidden rounded-md dark:bg-neutral-950 dark:text-neutral-50", className),
|
|
11
|
+
...props
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
function CommandDialog({ title = "Command Palette", description = "Search for a command to run...", children, ...props }) {
|
|
15
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__dialog_js_d344ec77__.Dialog, props, /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__dialog_js_d344ec77__.DialogHeader, {
|
|
16
|
+
className: "sr-only"
|
|
17
|
+
}, /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__dialog_js_d344ec77__.DialogTitle, null, title), /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__dialog_js_d344ec77__.DialogDescription, null, description)), /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__dialog_js_d344ec77__.DialogContent, {
|
|
18
|
+
className: "overflow-hidden p-0"
|
|
19
|
+
}, /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(Command, {
|
|
20
|
+
className: "[&_[cmdk-group-heading]]:text-neutral-500 **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5 dark:[&_[cmdk-group-heading]]:text-neutral-400"
|
|
21
|
+
}, children)));
|
|
22
|
+
}
|
|
23
|
+
function CommandInput({ className, ...props }) {
|
|
24
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("div", {
|
|
25
|
+
"data-slot": "command-input-wrapper",
|
|
26
|
+
className: "flex h-9 items-center gap-2 border-b px-3"
|
|
27
|
+
}, /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE_lucide_react_f128bbbb__.SearchIcon, {
|
|
28
|
+
className: "size-4 shrink-0 opacity-50"
|
|
29
|
+
}), /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE_cmdk__.Command.Input, {
|
|
30
|
+
"data-slot": "command-input",
|
|
31
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_c09d30d7__.cn)("placeholder:text-neutral-500 flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50 dark:placeholder:text-neutral-400", className),
|
|
32
|
+
...props
|
|
33
|
+
}));
|
|
34
|
+
}
|
|
35
|
+
function CommandList({ className, ...props }) {
|
|
36
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE_cmdk__.Command.List, {
|
|
37
|
+
"data-slot": "command-list",
|
|
38
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_c09d30d7__.cn)("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto", className),
|
|
39
|
+
...props
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
function CommandEmpty({ ...props }) {
|
|
43
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE_cmdk__.Command.Empty, {
|
|
44
|
+
"data-slot": "command-empty",
|
|
45
|
+
className: "py-6 text-center text-sm",
|
|
46
|
+
...props
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
function CommandGroup({ className, ...props }) {
|
|
50
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE_cmdk__.Command.Group, {
|
|
51
|
+
"data-slot": "command-group",
|
|
52
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_c09d30d7__.cn)("text-neutral-950 [&_[cmdk-group-heading]]:text-neutral-500 overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium dark:text-neutral-50 dark:[&_[cmdk-group-heading]]:text-neutral-400", className),
|
|
53
|
+
...props
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
function CommandSeparator({ className, ...props }) {
|
|
57
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE_cmdk__.Command.Separator, {
|
|
58
|
+
"data-slot": "command-separator",
|
|
59
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_c09d30d7__.cn)("bg-neutral-200 -mx-1 h-px dark:bg-neutral-800", className),
|
|
60
|
+
...props
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
function CommandItem({ className, ...props }) {
|
|
64
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE_cmdk__.Command.Item, {
|
|
65
|
+
"data-slot": "command-item",
|
|
66
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_c09d30d7__.cn)("data-[selected=true]:bg-neutral-100 data-[selected=true]:text-neutral-900 [&_svg:not([class*='text-'])]:text-neutral-500 relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 dark:data-[selected=true]:bg-neutral-800 dark:data-[selected=true]:text-neutral-50 dark:[&_svg:not([class*='text-'])]:text-neutral-400", className),
|
|
67
|
+
...props
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
function CommandShortcut({ className, ...props }) {
|
|
71
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("span", {
|
|
72
|
+
"data-slot": "command-shortcut",
|
|
73
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_c09d30d7__.cn)("text-neutral-500 ml-auto text-xs tracking-widest dark:text-neutral-400", className),
|
|
74
|
+
...props
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
export { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
|
|
3
|
+
declare function ContextMenu({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function ContextMenuTrigger({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function ContextMenuGroup({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function ContextMenuPortal({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function ContextMenuSub({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Sub>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function ContextMenuRadioGroup({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.RadioGroup>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function ContextMenuSubTrigger({ className, inset, children, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.SubTrigger> & {
|
|
10
|
+
inset?: boolean;
|
|
11
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function ContextMenuSubContent({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.SubContent>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function ContextMenuContent({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare function ContextMenuItem({ className, inset, variant, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Item> & {
|
|
15
|
+
inset?: boolean;
|
|
16
|
+
variant?: "default" | "destructive";
|
|
17
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
declare function ContextMenuCheckboxItem({ className, children, checked, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.CheckboxItem>): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
declare function ContextMenuRadioItem({ className, children, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.RadioItem>): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
declare function ContextMenuLabel({ className, inset, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Label> & {
|
|
21
|
+
inset?: boolean;
|
|
22
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
declare function ContextMenuSeparator({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Separator>): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
declare function ContextMenuShortcut({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export { ContextMenu, ContextMenuTrigger, ContextMenuContent, ContextMenuItem, ContextMenuCheckboxItem, ContextMenuRadioItem, ContextMenuLabel, ContextMenuSeparator, ContextMenuShortcut, ContextMenuGroup, ContextMenuPortal, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuRadioGroup, };
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
|
|
3
|
+
import * as __WEBPACK_EXTERNAL_MODULE__radix_ui_react_context_menu_293d36e3__ from "@radix-ui/react-context-menu";
|
|
4
|
+
import * as __WEBPACK_EXTERNAL_MODULE_lucide_react_f128bbbb__ from "lucide-react";
|
|
5
|
+
import * as __WEBPACK_EXTERNAL_MODULE__lib_utils_js_c09d30d7__ from "../../lib/utils.js";
|
|
6
|
+
function ContextMenu({ ...props }) {
|
|
7
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_context_menu_293d36e3__.Root, {
|
|
8
|
+
"data-slot": "context-menu",
|
|
9
|
+
...props
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
function ContextMenuTrigger({ ...props }) {
|
|
13
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_context_menu_293d36e3__.Trigger, {
|
|
14
|
+
"data-slot": "context-menu-trigger",
|
|
15
|
+
...props
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
function ContextMenuGroup({ ...props }) {
|
|
19
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_context_menu_293d36e3__.Group, {
|
|
20
|
+
"data-slot": "context-menu-group",
|
|
21
|
+
...props
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
function ContextMenuPortal({ ...props }) {
|
|
25
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_context_menu_293d36e3__.Portal, {
|
|
26
|
+
"data-slot": "context-menu-portal",
|
|
27
|
+
...props
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
function ContextMenuSub({ ...props }) {
|
|
31
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_context_menu_293d36e3__.Sub, {
|
|
32
|
+
"data-slot": "context-menu-sub",
|
|
33
|
+
...props
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
function ContextMenuRadioGroup({ ...props }) {
|
|
37
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_context_menu_293d36e3__.RadioGroup, {
|
|
38
|
+
"data-slot": "context-menu-radio-group",
|
|
39
|
+
...props
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
function ContextMenuSubTrigger({ className, inset, children, ...props }) {
|
|
43
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_context_menu_293d36e3__.SubTrigger, {
|
|
44
|
+
"data-slot": "context-menu-sub-trigger",
|
|
45
|
+
"data-inset": inset,
|
|
46
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_c09d30d7__.cn)("focus:bg-neutral-100 focus:text-neutral-900 data-[state=open]:bg-neutral-100 data-[state=open]:text-neutral-900 flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 dark:focus:bg-neutral-800 dark:focus:text-neutral-50 dark:data-[state=open]:bg-neutral-800 dark:data-[state=open]:text-neutral-50", className),
|
|
47
|
+
...props
|
|
48
|
+
}, children, /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE_lucide_react_f128bbbb__.ChevronRightIcon, {
|
|
49
|
+
className: "ml-auto"
|
|
50
|
+
}));
|
|
51
|
+
}
|
|
52
|
+
function ContextMenuSubContent({ className, ...props }) {
|
|
53
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_context_menu_293d36e3__.SubContent, {
|
|
54
|
+
"data-slot": "context-menu-sub-content",
|
|
55
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_c09d30d7__.cn)("bg-white text-neutral-950 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-hidden rounded-md border border-neutral-200 p-1 shadow-lg dark:bg-neutral-950 dark:text-neutral-50 dark:border-neutral-800", className),
|
|
56
|
+
...props
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
function ContextMenuContent({ className, ...props }) {
|
|
60
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_context_menu_293d36e3__.Portal, null, /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_context_menu_293d36e3__.Content, {
|
|
61
|
+
"data-slot": "context-menu-content",
|
|
62
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_c09d30d7__.cn)("bg-white text-neutral-950 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 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border border-neutral-200 p-1 shadow-md dark:bg-neutral-950 dark:text-neutral-50 dark:border-neutral-800", className),
|
|
63
|
+
...props
|
|
64
|
+
}));
|
|
65
|
+
}
|
|
66
|
+
function ContextMenuItem({ className, inset, variant = "default", ...props }) {
|
|
67
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_context_menu_293d36e3__.Item, {
|
|
68
|
+
"data-slot": "context-menu-item",
|
|
69
|
+
"data-inset": inset,
|
|
70
|
+
"data-variant": variant,
|
|
71
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_c09d30d7__.cn)("focus:bg-neutral-100 focus:text-neutral-900 data-[variant=destructive]:text-red-500 data-[variant=destructive]:focus:bg-red-500/10 dark:data-[variant=destructive]:focus:bg-red-500/20 data-[variant=destructive]:focus:text-red-500 data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-neutral-500 relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 dark:focus:bg-neutral-800 dark:focus:text-neutral-50 dark:data-[variant=destructive]:text-red-900 dark:data-[variant=destructive]:focus:bg-red-900/10 dark:dark:data-[variant=destructive]:focus:bg-red-900/20 dark:data-[variant=destructive]:focus:text-red-900 dark:[&_svg:not([class*='text-'])]:text-neutral-400", className),
|
|
72
|
+
...props
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
function ContextMenuCheckboxItem({ className, children, checked, ...props }) {
|
|
76
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_context_menu_293d36e3__.CheckboxItem, {
|
|
77
|
+
"data-slot": "context-menu-checkbox-item",
|
|
78
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_c09d30d7__.cn)("focus:bg-neutral-100 focus:text-neutral-900 relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 dark:focus:bg-neutral-800 dark:focus:text-neutral-50", className),
|
|
79
|
+
checked: checked,
|
|
80
|
+
...props
|
|
81
|
+
}, /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("span", {
|
|
82
|
+
className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center"
|
|
83
|
+
}, /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_context_menu_293d36e3__.ItemIndicator, null, /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE_lucide_react_f128bbbb__.CheckIcon, {
|
|
84
|
+
className: "size-4"
|
|
85
|
+
}))), children);
|
|
86
|
+
}
|
|
87
|
+
function ContextMenuRadioItem({ className, children, ...props }) {
|
|
88
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_context_menu_293d36e3__.RadioItem, {
|
|
89
|
+
"data-slot": "context-menu-radio-item",
|
|
90
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_c09d30d7__.cn)("focus:bg-neutral-100 focus:text-neutral-900 relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 dark:focus:bg-neutral-800 dark:focus:text-neutral-50", className),
|
|
91
|
+
...props
|
|
92
|
+
}, /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("span", {
|
|
93
|
+
className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center"
|
|
94
|
+
}, /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_context_menu_293d36e3__.ItemIndicator, null, /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE_lucide_react_f128bbbb__.CircleIcon, {
|
|
95
|
+
className: "size-2 fill-current"
|
|
96
|
+
}))), children);
|
|
97
|
+
}
|
|
98
|
+
function ContextMenuLabel({ className, inset, ...props }) {
|
|
99
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_context_menu_293d36e3__.Label, {
|
|
100
|
+
"data-slot": "context-menu-label",
|
|
101
|
+
"data-inset": inset,
|
|
102
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_c09d30d7__.cn)("text-neutral-950 px-2 py-1.5 text-sm font-medium data-[inset]:pl-8 dark:text-neutral-50", className),
|
|
103
|
+
...props
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
function ContextMenuSeparator({ className, ...props }) {
|
|
107
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement(__WEBPACK_EXTERNAL_MODULE__radix_ui_react_context_menu_293d36e3__.Separator, {
|
|
108
|
+
"data-slot": "context-menu-separator",
|
|
109
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_c09d30d7__.cn)("bg-neutral-200 -mx-1 my-1 h-px dark:bg-neutral-800", className),
|
|
110
|
+
...props
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
function ContextMenuShortcut({ className, ...props }) {
|
|
114
|
+
return /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.createElement("span", {
|
|
115
|
+
"data-slot": "context-menu-shortcut",
|
|
116
|
+
className: (0, __WEBPACK_EXTERNAL_MODULE__lib_utils_js_c09d30d7__.cn)("text-neutral-500 ml-auto text-xs tracking-widest dark:text-neutral-400", className),
|
|
117
|
+
...props
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
export { ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger };
|