shadcn-packaged 2025.4.14 → 2025.6.16-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/README.md +30 -31
  2. package/index.css +112 -138
  3. package/package.json +38 -38
  4. package/ui/accordion.d.ts +4 -4
  5. package/ui/accordion.jsx +20 -15
  6. package/ui/alert-dialog.d.ts +11 -17
  7. package/ui/alert-dialog.jsx +36 -23
  8. package/ui/alert.d.ts +5 -4
  9. package/ui/alert.jsx +12 -9
  10. package/ui/aspect-ratio.d.ts +1 -1
  11. package/ui/aspect-ratio.jsx +3 -1
  12. package/ui/avatar.d.ts +3 -3
  13. package/ui/avatar.jsx +9 -6
  14. package/ui/badge.d.ts +3 -3
  15. package/ui/badge.jsx +9 -7
  16. package/ui/breadcrumb.d.ts +8 -16
  17. package/ui/breadcrumb.jsx +26 -21
  18. package/ui/button.d.ts +2 -3
  19. package/ui/button.jsx +13 -14
  20. package/ui/calendar.d.ts +7 -7
  21. package/ui/calendar.jsx +70 -30
  22. package/ui/card.d.ts +8 -7
  23. package/ui/card.jsx +22 -13
  24. package/ui/carousel.d.ts +6 -5
  25. package/ui/carousel.jsx +26 -34
  26. package/ui/chart.d.ts +6 -28
  27. package/ui/chart.jsx +37 -40
  28. package/ui/checkbox.d.ts +1 -1
  29. package/ui/checkbox.jsx +8 -7
  30. package/ui/collapsible.d.ts +3 -3
  31. package/ui/collapsible.jsx +9 -3
  32. package/ui/command.d.ts +16 -78
  33. package/ui/command.jsx +37 -27
  34. package/ui/context-menu.d.ts +19 -21
  35. package/ui/context-menu.jsx +65 -47
  36. package/ui/dialog.d.ts +13 -17
  37. package/ui/dialog.jsx +41 -27
  38. package/ui/drawer.d.ts +10 -19
  39. package/ui/drawer.jsx +36 -23
  40. package/ui/dropdown-menu.d.ts +20 -22
  41. package/ui/dropdown-menu.jsx +66 -50
  42. package/ui/form.d.ts +6 -5
  43. package/ui/form.jsx +19 -23
  44. package/ui/hover-card.d.ts +3 -3
  45. package/ui/hover-card.jsx +11 -4
  46. package/ui/input-otp.d.ts +7 -30
  47. package/ui/input-otp.jsx +17 -15
  48. package/ui/input.d.ts +1 -1
  49. package/ui/input.jsx +3 -4
  50. package/ui/label.d.ts +1 -2
  51. package/ui/label.jsx +3 -4
  52. package/ui/menubar.d.ts +17 -19
  53. package/ui/menubar.jsx +58 -49
  54. package/ui/navigation-menu.d.ts +11 -9
  55. package/ui/navigation-menu.jsx +37 -29
  56. package/ui/pagination.d.ts +10 -25
  57. package/ui/pagination.jsx +35 -28
  58. package/ui/popover.d.ts +5 -4
  59. package/ui/popover.jsx +15 -7
  60. package/ui/progress.d.ts +1 -1
  61. package/ui/progress.jsx +5 -4
  62. package/ui/radio-group.d.ts +2 -2
  63. package/ui/radio-group.jsx +9 -11
  64. package/ui/resizable.d.ts +5 -20
  65. package/ui/resizable.jsx +15 -8
  66. package/ui/scroll-area.d.ts +2 -2
  67. package/ui/scroll-area.jsx +16 -14
  68. package/ui/select.d.ts +13 -11
  69. package/ui/select.jsx +58 -47
  70. package/ui/separator.d.ts +1 -1
  71. package/ui/separator.jsx +3 -2
  72. package/ui/sheet.d.ts +11 -23
  73. package/ui/sheet.jsx +45 -41
  74. package/ui/sidebar.d.ts +38 -34
  75. package/ui/sidebar.jsx +109 -122
  76. package/ui/skeleton.d.ts +1 -1
  77. package/ui/skeleton.jsx +1 -1
  78. package/ui/slider.d.ts +1 -1
  79. package/ui/slider.jsx +13 -7
  80. package/ui/sonner.d.ts +1 -2
  81. package/ui/sonner.jsx +4 -7
  82. package/ui/switch.d.ts +2 -2
  83. package/ui/switch.jsx +6 -5
  84. package/ui/table.d.ts +8 -8
  85. package/ui/table.jsx +27 -18
  86. package/ui/tabs.d.ts +4 -4
  87. package/ui/tabs.jsx +12 -7
  88. package/ui/textarea.d.ts +1 -1
  89. package/ui/textarea.jsx +3 -4
  90. package/ui/toggle-group.d.ts +3 -8
  91. package/ui/toggle-group.jsx +11 -11
  92. package/ui/toggle.d.ts +1 -4
  93. package/ui/toggle.jsx +8 -7
  94. package/ui/tooltip.d.ts +4 -4
  95. package/ui/tooltip.jsx +19 -5
  96. package/tailwind.config.js +0 -89
  97. /package/hooks/{use-mobile.jsx → use-mobile.js} +0 -0
package/ui/carousel.jsx CHANGED
@@ -12,7 +12,7 @@ function useCarousel() {
12
12
  }
13
13
  return context;
14
14
  }
15
- const Carousel = React.forwardRef(({ orientation = "horizontal", opts, setApi, plugins, className, children, ...props }, ref) => {
15
+ function Carousel({ orientation = "horizontal", opts, setApi, plugins, className, children, ...props }) {
16
16
  const [carouselRef, api] = useEmblaCarousel({
17
17
  ...opts,
18
18
  axis: orientation === "horizontal" ? "x" : "y",
@@ -20,9 +20,8 @@ const Carousel = React.forwardRef(({ orientation = "horizontal", opts, setApi, p
20
20
  const [canScrollPrev, setCanScrollPrev] = React.useState(false);
21
21
  const [canScrollNext, setCanScrollNext] = React.useState(false);
22
22
  const onSelect = React.useCallback((api) => {
23
- if (!api) {
23
+ if (!api)
24
24
  return;
25
- }
26
25
  setCanScrollPrev(api.canScrollPrev());
27
26
  setCanScrollNext(api.canScrollNext());
28
27
  }, []);
@@ -43,15 +42,13 @@ const Carousel = React.forwardRef(({ orientation = "horizontal", opts, setApi, p
43
42
  }
44
43
  }, [scrollPrev, scrollNext]);
45
44
  React.useEffect(() => {
46
- if (!api || !setApi) {
45
+ if (!api || !setApi)
47
46
  return;
48
- }
49
47
  setApi(api);
50
48
  }, [api, setApi]);
51
49
  React.useEffect(() => {
52
- if (!api) {
50
+ if (!api)
53
51
  return;
54
- }
55
52
  onSelect(api);
56
53
  api.on("reInit", onSelect);
57
54
  api.on("select", onSelect);
@@ -69,42 +66,37 @@ const Carousel = React.forwardRef(({ orientation = "horizontal", opts, setApi, p
69
66
  canScrollPrev,
70
67
  canScrollNext,
71
68
  }}>
72
- <div ref={ref} onKeyDownCapture={handleKeyDown} className={cn("relative", className)} role="region" aria-roledescription="carousel" {...props}>
73
- {children}
74
- </div>
75
- </CarouselContext.Provider>);
76
- });
77
- Carousel.displayName = "Carousel";
78
- const CarouselContent = React.forwardRef(({ className, ...props }, ref) => {
69
+ <div onKeyDownCapture={handleKeyDown} className={cn("relative", className)} role="region" aria-roledescription="carousel" data-slot="carousel" {...props}>
70
+ {children}
71
+ </div>
72
+ </CarouselContext.Provider>);
73
+ }
74
+ function CarouselContent({ className, ...props }) {
79
75
  const { carouselRef, orientation } = useCarousel();
80
- return (<div ref={carouselRef} className="overflow-hidden">
81
- <div ref={ref} className={cn("flex", orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col", className)} {...props}/>
76
+ return (<div ref={carouselRef} className="overflow-hidden" data-slot="carousel-content">
77
+ <div className={cn("flex", orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col", className)} {...props}/>
82
78
  </div>);
83
- });
84
- CarouselContent.displayName = "CarouselContent";
85
- const CarouselItem = React.forwardRef(({ className, ...props }, ref) => {
79
+ }
80
+ function CarouselItem({ className, ...props }) {
86
81
  const { orientation } = useCarousel();
87
- return (<div ref={ref} role="group" aria-roledescription="slide" className={cn("min-w-0 shrink-0 grow-0 basis-full", orientation === "horizontal" ? "pl-4" : "pt-4", className)} {...props}/>);
88
- });
89
- CarouselItem.displayName = "CarouselItem";
90
- const CarouselPrevious = React.forwardRef(({ className, variant = "outline", size = "icon", ...props }, ref) => {
82
+ return (<div role="group" aria-roledescription="slide" data-slot="carousel-item" className={cn("min-w-0 shrink-0 grow-0 basis-full", orientation === "horizontal" ? "pl-4" : "pt-4", className)} {...props}/>);
83
+ }
84
+ function CarouselPrevious({ className, variant = "outline", size = "icon", ...props }) {
91
85
  const { orientation, scrollPrev, canScrollPrev } = useCarousel();
92
- return (<Button ref={ref} variant={variant} size={size} className={cn("absolute h-8 w-8 rounded-full", orientation === "horizontal"
93
- ? "-left-12 top-1/2 -translate-y-1/2"
86
+ return (<Button data-slot="carousel-previous" variant={variant} size={size} className={cn("absolute size-8 rounded-full", orientation === "horizontal"
87
+ ? "top-1/2 -left-12 -translate-y-1/2"
94
88
  : "-top-12 left-1/2 -translate-x-1/2 rotate-90", className)} disabled={!canScrollPrev} onClick={scrollPrev} {...props}>
95
- <ArrowLeft className="h-4 w-4"/>
89
+ <ArrowLeft />
96
90
  <span className="sr-only">Previous slide</span>
97
91
  </Button>);
98
- });
99
- CarouselPrevious.displayName = "CarouselPrevious";
100
- const CarouselNext = React.forwardRef(({ className, variant = "outline", size = "icon", ...props }, ref) => {
92
+ }
93
+ function CarouselNext({ className, variant = "outline", size = "icon", ...props }) {
101
94
  const { orientation, scrollNext, canScrollNext } = useCarousel();
102
- return (<Button ref={ref} variant={variant} size={size} className={cn("absolute h-8 w-8 rounded-full", orientation === "horizontal"
103
- ? "-right-12 top-1/2 -translate-y-1/2"
95
+ return (<Button data-slot="carousel-next" variant={variant} size={size} className={cn("absolute size-8 rounded-full", orientation === "horizontal"
96
+ ? "top-1/2 -right-12 -translate-y-1/2"
104
97
  : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90", className)} disabled={!canScrollNext} onClick={scrollNext} {...props}>
105
- <ArrowRight className="h-4 w-4"/>
98
+ <ArrowRight />
106
99
  <span className="sr-only">Next slide</span>
107
100
  </Button>);
108
- });
109
- CarouselNext.displayName = "CarouselNext";
101
+ }
110
102
  export { Carousel, CarouselContent, CarouselItem, CarouselPrevious, CarouselNext, };
package/ui/chart.d.ts CHANGED
@@ -16,47 +16,25 @@ export type ChartConfig = {
16
16
  theme: Record<keyof typeof THEMES, string>;
17
17
  });
18
18
  };
19
- declare const ChartContainer: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
19
+ declare function ChartContainer({ id, className, children, config, ...props }: React.ComponentProps<"div"> & {
20
20
  config: ChartConfig;
21
21
  children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>["children"];
22
- }, "ref"> & React.RefAttributes<HTMLDivElement>>;
22
+ }): React.JSX.Element;
23
23
  declare const ChartStyle: ({ id, config }: {
24
24
  id: string;
25
25
  config: ChartConfig;
26
26
  }) => React.JSX.Element;
27
27
  declare const ChartTooltip: typeof RechartsPrimitive.Tooltip;
28
- declare const ChartTooltipContent: React.ForwardRefExoticComponent<Omit<RechartsPrimitive.DefaultTooltipContentProps<import("recharts/types/component/DefaultTooltipContent").ValueType, import("recharts/types/component/DefaultTooltipContent").NameType> & {
29
- accessibilityLayer?: boolean;
30
- active?: boolean | undefined;
31
- includeHidden?: boolean | undefined;
32
- allowEscapeViewBox?: import("recharts/types/util/types").AllowInDimension;
33
- animationDuration?: import("recharts/types/util/types").AnimationDuration;
34
- animationEasing?: import("recharts/types/util/types").AnimationTiming;
35
- content?: import("recharts/types/component/Tooltip").ContentType<import("recharts/types/component/DefaultTooltipContent").ValueType, import("recharts/types/component/DefaultTooltipContent").NameType>;
36
- coordinate?: Partial<import("recharts/types/util/types").Coordinate>;
37
- cursor?: boolean | React.ReactElement | React.SVGProps<SVGElement>;
38
- filterNull?: boolean;
39
- defaultIndex?: number;
40
- isAnimationActive?: boolean;
41
- offset?: number;
42
- payloadUniqBy?: import("recharts/types/util/payload/getUniqPayload").UniqueOption<import("recharts/types/component/DefaultTooltipContent").Payload<import("recharts/types/component/DefaultTooltipContent").ValueType, import("recharts/types/component/DefaultTooltipContent").NameType>>;
43
- position?: Partial<import("recharts/types/util/types").Coordinate>;
44
- reverseDirection?: import("recharts/types/util/types").AllowInDimension;
45
- shared?: boolean;
46
- trigger?: "hover" | "click";
47
- useTranslate3d?: boolean;
48
- viewBox?: import("recharts/types/util/types").CartesianViewBox;
49
- wrapperStyle?: React.CSSProperties;
50
- } & React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
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"> & {
51
29
  hideLabel?: boolean;
52
30
  hideIndicator?: boolean;
53
31
  indicator?: "line" | "dot" | "dashed";
54
32
  nameKey?: string;
55
33
  labelKey?: string;
56
- }, "ref"> & React.RefAttributes<HTMLDivElement>>;
34
+ }): React.JSX.Element;
57
35
  declare const ChartLegend: typeof RechartsPrimitive.Legend;
58
- declare const ChartLegendContent: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & Pick<RechartsPrimitive.LegendProps, "verticalAlign" | "payload"> & {
36
+ declare function ChartLegendContent({ className, hideIcon, payload, verticalAlign, nameKey, }: React.ComponentProps<"div"> & Pick<RechartsPrimitive.LegendProps, "payload" | "verticalAlign"> & {
59
37
  hideIcon?: boolean;
60
38
  nameKey?: string;
61
- }, "ref"> & React.RefAttributes<HTMLDivElement>>;
39
+ }): React.JSX.Element;
62
40
  export { ChartContainer, ChartTooltip, ChartTooltipContent, ChartLegend, ChartLegendContent, ChartStyle, };
package/ui/chart.jsx CHANGED
@@ -12,19 +12,18 @@ function useChart() {
12
12
  }
13
13
  return context;
14
14
  }
15
- const ChartContainer = React.forwardRef(({ id, className, children, config, ...props }, ref) => {
15
+ function ChartContainer({ id, className, children, config, ...props }) {
16
16
  const uniqueId = React.useId();
17
17
  const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`;
18
18
  return (<ChartContext.Provider value={{ config }}>
19
- <div data-chart={chartId} ref={ref} className={cn("flex aspect-video justify-center text-xs [&_.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-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.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 [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none", className)} {...props}>
19
+ <div data-slot="chart" data-chart={chartId} className={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)} {...props}>
20
20
  <ChartStyle id={chartId} config={config}/>
21
21
  <RechartsPrimitive.ResponsiveContainer>
22
22
  {children}
23
23
  </RechartsPrimitive.ResponsiveContainer>
24
24
  </div>
25
25
  </ChartContext.Provider>);
26
- });
27
- ChartContainer.displayName = "Chart";
26
+ }
28
27
  const ChartStyle = ({ id, config }) => {
29
28
  const colorConfig = Object.entries(config).filter(([, config]) => config.theme || config.color);
30
29
  if (!colorConfig.length) {
@@ -47,7 +46,7 @@ ${colorConfig
47
46
  }}/>);
48
47
  };
49
48
  const ChartTooltip = RechartsPrimitive.Tooltip;
50
- const ChartTooltipContent = React.forwardRef(({ active, payload, className, indicator = "dot", hideLabel = false, hideIndicator = false, label, labelFormatter, labelClassName, formatter, color, nameKey, labelKey, }, ref) => {
49
+ function ChartTooltipContent({ active, payload, className, indicator = "dot", hideLabel = false, hideIndicator = false, label, labelFormatter, labelClassName, formatter, color, nameKey, labelKey, }) {
51
50
  const { config } = useChart();
52
51
  const tooltipLabel = React.useMemo(() => {
53
52
  if (hideLabel || !payload?.length) {
@@ -61,8 +60,8 @@ const ChartTooltipContent = React.forwardRef(({ active, payload, className, indi
61
60
  : itemConfig?.label;
62
61
  if (labelFormatter) {
63
62
  return (<div className={cn("font-medium", labelClassName)}>
64
- {labelFormatter(value, payload)}
65
- </div>);
63
+ {labelFormatter(value, payload)}
64
+ </div>);
66
65
  }
67
66
  if (!value) {
68
67
  return null;
@@ -81,16 +80,16 @@ const ChartTooltipContent = React.forwardRef(({ active, payload, className, indi
81
80
  return null;
82
81
  }
83
82
  const nestLabel = payload.length === 1 && indicator !== "dot";
84
- return (<div ref={ref} className={cn("grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl", className)}>
85
- {!nestLabel ? tooltipLabel : null}
86
- <div className="grid gap-1.5">
87
- {payload.map((item, index) => {
83
+ return (<div className={cn("border-border/50 bg-background grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl", className)}>
84
+ {!nestLabel ? tooltipLabel : null}
85
+ <div className="grid gap-1.5">
86
+ {payload.map((item, index) => {
88
87
  const key = `${nameKey || item.name || item.dataKey || "value"}`;
89
88
  const itemConfig = getPayloadConfigFromPayload(config, item, key);
90
89
  const indicatorColor = color || item.payload.fill || item.color;
91
- return (<div key={item.dataKey} className={cn("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground", indicator === "dot" && "items-center")}>
92
- {formatter && item?.value !== undefined && item.name ? (formatter(item.value, item.name, item, index, item.payload)) : (<>
93
- {itemConfig?.icon ? (<itemConfig.icon />) : (!hideIndicator && (<div className={cn("shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]", {
90
+ return (<div key={item.dataKey} className={cn("[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5", indicator === "dot" && "items-center")}>
91
+ {formatter && item?.value !== undefined && item.name ? (formatter(item.value, item.name, item, index, item.payload)) : (<>
92
+ {itemConfig?.icon ? (<itemConfig.icon />) : (!hideIndicator && (<div className={cn("shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)", {
94
93
  "h-2.5 w-2.5": indicator === "dot",
95
94
  "w-1": indicator === "line",
96
95
  "w-0 border-[1.5px] border-dashed bg-transparent": indicator === "dashed",
@@ -99,44 +98,42 @@ const ChartTooltipContent = React.forwardRef(({ active, payload, className, indi
99
98
  "--color-bg": indicatorColor,
100
99
  "--color-border": indicatorColor,
101
100
  }}/>))}
102
- <div className={cn("flex flex-1 justify-between leading-none", nestLabel ? "items-end" : "items-center")}>
103
- <div className="grid gap-1.5">
104
- {nestLabel ? tooltipLabel : null}
105
- <span className="text-muted-foreground">
106
- {itemConfig?.label || item.name}
107
- </span>
108
- </div>
109
- {item.value && (<span className="font-mono font-medium tabular-nums text-foreground">
110
- {item.value.toLocaleString()}
111
- </span>)}
101
+ <div className={cn("flex flex-1 justify-between leading-none", nestLabel ? "items-end" : "items-center")}>
102
+ <div className="grid gap-1.5">
103
+ {nestLabel ? tooltipLabel : null}
104
+ <span className="text-muted-foreground">
105
+ {itemConfig?.label || item.name}
106
+ </span>
112
107
  </div>
113
- </>)}
114
- </div>);
108
+ {item.value && (<span className="text-foreground font-mono font-medium tabular-nums">
109
+ {item.value.toLocaleString()}
110
+ </span>)}
111
+ </div>
112
+ </>)}
113
+ </div>);
115
114
  })}
116
- </div>
117
- </div>);
118
- });
119
- ChartTooltipContent.displayName = "ChartTooltip";
115
+ </div>
116
+ </div>);
117
+ }
120
118
  const ChartLegend = RechartsPrimitive.Legend;
121
- const ChartLegendContent = React.forwardRef(({ className, hideIcon = false, payload, verticalAlign = "bottom", nameKey }, ref) => {
119
+ function ChartLegendContent({ className, hideIcon = false, payload, verticalAlign = "bottom", nameKey, }) {
122
120
  const { config } = useChart();
123
121
  if (!payload?.length) {
124
122
  return null;
125
123
  }
126
- return (<div ref={ref} className={cn("flex items-center justify-center gap-4", verticalAlign === "top" ? "pb-3" : "pt-3", className)}>
127
- {payload.map((item) => {
124
+ return (<div className={cn("flex items-center justify-center gap-4", verticalAlign === "top" ? "pb-3" : "pt-3", className)}>
125
+ {payload.map((item) => {
128
126
  const key = `${nameKey || item.dataKey || "value"}`;
129
127
  const itemConfig = getPayloadConfigFromPayload(config, item, key);
130
- return (<div key={item.value} className={cn("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground")}>
131
- {itemConfig?.icon && !hideIcon ? (<itemConfig.icon />) : (<div className="h-2 w-2 shrink-0 rounded-[2px]" style={{
128
+ return (<div key={item.value} className={cn("[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3")}>
129
+ {itemConfig?.icon && !hideIcon ? (<itemConfig.icon />) : (<div className="h-2 w-2 shrink-0 rounded-[2px]" style={{
132
130
  backgroundColor: item.color,
133
131
  }}/>)}
134
- {itemConfig?.label}
135
- </div>);
132
+ {itemConfig?.label}
133
+ </div>);
136
134
  })}
137
- </div>);
138
- });
139
- ChartLegendContent.displayName = "ChartLegend";
135
+ </div>);
136
+ }
140
137
  // Helper to extract item config from a payload.
141
138
  function getPayloadConfigFromPayload(config, payload, key) {
142
139
  if (typeof payload !== "object" || payload === null) {
package/ui/checkbox.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  import * as React from "react";
2
2
  import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
3
- declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
3
+ declare function Checkbox({ className, ...props }: React.ComponentProps<typeof CheckboxPrimitive.Root>): React.JSX.Element;
4
4
  export { Checkbox };
package/ui/checkbox.jsx CHANGED
@@ -1,12 +1,13 @@
1
1
  "use client";
2
2
  import * as React from "react";
3
3
  import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
4
- import { Check } from "lucide-react";
4
+ import { CheckIcon } from "lucide-react";
5
5
  import { cn } from "../lib/utils";
6
- const Checkbox = React.forwardRef(({ className, ...props }, ref) => (<CheckboxPrimitive.Root ref={ref} className={cn("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground", className)} {...props}>
7
- <CheckboxPrimitive.Indicator className={cn("flex items-center justify-center text-current")}>
8
- <Check className="h-4 w-4"/>
9
- </CheckboxPrimitive.Indicator>
10
- </CheckboxPrimitive.Root>));
11
- Checkbox.displayName = CheckboxPrimitive.Root.displayName;
6
+ function Checkbox({ className, ...props }) {
7
+ return (<CheckboxPrimitive.Root data-slot="checkbox" className={cn("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50", className)} {...props}>
8
+ <CheckboxPrimitive.Indicator data-slot="checkbox-indicator" className="flex items-center justify-center text-current transition-none">
9
+ <CheckIcon className="size-3.5"/>
10
+ </CheckboxPrimitive.Indicator>
11
+ </CheckboxPrimitive.Root>);
12
+ }
12
13
  export { Checkbox };
@@ -1,5 +1,5 @@
1
1
  import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
2
- declare const Collapsible: import("react").ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleProps & import("react").RefAttributes<HTMLDivElement>>;
3
- declare const CollapsibleTrigger: import("react").ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
4
- declare const CollapsibleContent: import("react").ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleContentProps & import("react").RefAttributes<HTMLDivElement>>;
2
+ declare function Collapsible({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.Root>): import("react").JSX.Element;
3
+ declare function CollapsibleTrigger({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>): import("react").JSX.Element;
4
+ declare function CollapsibleContent({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>): import("react").JSX.Element;
5
5
  export { Collapsible, CollapsibleTrigger, CollapsibleContent };
@@ -1,6 +1,12 @@
1
1
  "use client";
2
2
  import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
3
- const Collapsible = CollapsiblePrimitive.Root;
4
- const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger;
5
- const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent;
3
+ function Collapsible({ ...props }) {
4
+ return <CollapsiblePrimitive.Root data-slot="collapsible" {...props}/>;
5
+ }
6
+ function CollapsibleTrigger({ ...props }) {
7
+ return (<CollapsiblePrimitive.CollapsibleTrigger data-slot="collapsible-trigger" {...props}/>);
8
+ }
9
+ function CollapsibleContent({ ...props }) {
10
+ return (<CollapsiblePrimitive.CollapsibleContent data-slot="collapsible-content" {...props}/>);
11
+ }
6
12
  export { Collapsible, CollapsibleTrigger, CollapsibleContent };
package/ui/command.d.ts CHANGED
@@ -1,80 +1,18 @@
1
1
  import * as React from "react";
2
- import { type DialogProps } from "@radix-ui/react-dialog";
3
- declare const Command: React.ForwardRefExoticComponent<Omit<{
4
- children?: React.ReactNode;
5
- } & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
6
- ref?: React.Ref<HTMLDivElement>;
7
- } & {
8
- asChild?: boolean;
9
- }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
10
- label?: string;
11
- shouldFilter?: boolean;
12
- filter?: (value: string, search: string, keywords?: string[]) => number;
13
- defaultValue?: string;
14
- value?: string;
15
- onValueChange?: (value: string) => void;
16
- loop?: boolean;
17
- disablePointerSelection?: boolean;
18
- vimBindings?: boolean;
19
- } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
20
- declare const CommandDialog: ({ children, ...props }: DialogProps) => React.JSX.Element;
21
- declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof React.InputHTMLAttributes<HTMLInputElement>> & {
22
- ref?: React.Ref<HTMLInputElement>;
23
- } & {
24
- asChild?: boolean;
25
- }, "key" | keyof React.InputHTMLAttributes<HTMLInputElement> | "asChild">, "type" | "value" | "onChange"> & {
26
- value?: string;
27
- onValueChange?: (search: string) => void;
28
- } & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
29
- declare const CommandList: React.ForwardRefExoticComponent<Omit<{
30
- children?: React.ReactNode;
31
- } & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
32
- ref?: React.Ref<HTMLDivElement>;
33
- } & {
34
- asChild?: boolean;
35
- }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
36
- label?: string;
37
- } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
38
- declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
39
- children?: React.ReactNode;
40
- } & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
41
- ref?: React.Ref<HTMLDivElement>;
42
- } & {
43
- asChild?: boolean;
44
- }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
45
- declare const CommandGroup: React.ForwardRefExoticComponent<Omit<{
46
- children?: React.ReactNode;
47
- } & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
48
- ref?: React.Ref<HTMLDivElement>;
49
- } & {
50
- asChild?: boolean;
51
- }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild">, "value" | "heading"> & {
52
- heading?: React.ReactNode;
53
- value?: string;
54
- forceMount?: boolean;
55
- } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
56
- declare const CommandSeparator: React.ForwardRefExoticComponent<Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
57
- ref?: React.Ref<HTMLDivElement>;
58
- } & {
59
- asChild?: boolean;
60
- }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
61
- alwaysRender?: boolean;
62
- } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
63
- declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
64
- children?: React.ReactNode;
65
- } & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
66
- ref?: React.Ref<HTMLDivElement>;
67
- } & {
68
- asChild?: boolean;
69
- }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild">, "value" | "disabled" | "onSelect"> & {
70
- disabled?: boolean;
71
- onSelect?: (value: string) => void;
72
- value?: string;
73
- keywords?: string[];
74
- forceMount?: boolean;
75
- } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
76
- declare const CommandShortcut: {
77
- ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): React.JSX.Element;
78
- displayName: string;
79
- };
2
+ import { Command as CommandPrimitive } from "cmdk";
3
+ import { Dialog } from "../ui/dialog";
4
+ declare function Command({ className, ...props }: React.ComponentProps<typeof CommandPrimitive>): React.JSX.Element;
5
+ declare function CommandDialog({ title, description, children, className, showCloseButton, ...props }: React.ComponentProps<typeof Dialog> & {
6
+ title?: string;
7
+ description?: string;
8
+ className?: string;
9
+ showCloseButton?: boolean;
10
+ }): React.JSX.Element;
11
+ declare function CommandInput({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Input>): React.JSX.Element;
12
+ declare function CommandList({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.List>): React.JSX.Element;
13
+ declare function CommandEmpty({ ...props }: React.ComponentProps<typeof CommandPrimitive.Empty>): React.JSX.Element;
14
+ declare function CommandGroup({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Group>): React.JSX.Element;
15
+ declare function CommandSeparator({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Separator>): React.JSX.Element;
16
+ declare function CommandItem({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Item>): React.JSX.Element;
17
+ declare function CommandShortcut({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
80
18
  export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator, };
package/ui/command.jsx CHANGED
@@ -1,37 +1,47 @@
1
1
  "use client";
2
2
  import * as React from "react";
3
3
  import { Command as CommandPrimitive } from "cmdk";
4
- import { Search } from "lucide-react";
4
+ import { SearchIcon } from "lucide-react";
5
5
  import { cn } from "../lib/utils";
6
- import { Dialog, DialogContent } from "../ui/dialog";
7
- const Command = React.forwardRef(({ className, ...props }, ref) => (<CommandPrimitive ref={ref} className={cn("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground", className)} {...props}/>));
8
- Command.displayName = CommandPrimitive.displayName;
9
- const CommandDialog = ({ children, ...props }) => {
6
+ import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, } from "../ui/dialog";
7
+ function Command({ className, ...props }) {
8
+ return (<CommandPrimitive data-slot="command" className={cn("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md", className)} {...props}/>);
9
+ }
10
+ function CommandDialog({ title = "Command Palette", description = "Search for a command to run...", children, className, showCloseButton = true, ...props }) {
10
11
  return (<Dialog {...props}>
11
- <DialogContent className="overflow-hidden p-0 shadow-lg">
12
- <Command className="[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[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">
12
+ <DialogHeader className="sr-only">
13
+ <DialogTitle>{title}</DialogTitle>
14
+ <DialogDescription>{description}</DialogDescription>
15
+ </DialogHeader>
16
+ <DialogContent className={cn("overflow-hidden p-0", className)} showCloseButton={showCloseButton}>
17
+ <Command className="[&_[cmdk-group-heading]]:text-muted-foreground **: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">
13
18
  {children}
14
19
  </Command>
15
20
  </DialogContent>
16
21
  </Dialog>);
17
- };
18
- const CommandInput = React.forwardRef(({ className, ...props }, ref) => (<div className="flex items-center border-b px-3" cmdk-input-wrapper="">
19
- <Search className="mr-2 h-4 w-4 shrink-0 opacity-50"/>
20
- <CommandPrimitive.Input ref={ref} className={cn("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50", className)} {...props}/>
21
- </div>));
22
- CommandInput.displayName = CommandPrimitive.Input.displayName;
23
- const CommandList = React.forwardRef(({ className, ...props }, ref) => (<CommandPrimitive.List ref={ref} className={cn("max-h-[300px] overflow-y-auto overflow-x-hidden", className)} {...props}/>));
24
- CommandList.displayName = CommandPrimitive.List.displayName;
25
- const CommandEmpty = React.forwardRef((props, ref) => (<CommandPrimitive.Empty ref={ref} className="py-6 text-center text-sm" {...props}/>));
26
- CommandEmpty.displayName = CommandPrimitive.Empty.displayName;
27
- const CommandGroup = React.forwardRef(({ className, ...props }, ref) => (<CommandPrimitive.Group ref={ref} className={cn("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground", className)} {...props}/>));
28
- CommandGroup.displayName = CommandPrimitive.Group.displayName;
29
- const CommandSeparator = React.forwardRef(({ className, ...props }, ref) => (<CommandPrimitive.Separator ref={ref} className={cn("-mx-1 h-px bg-border", className)} {...props}/>));
30
- CommandSeparator.displayName = CommandPrimitive.Separator.displayName;
31
- const CommandItem = React.forwardRef(({ className, ...props }, ref) => (<CommandPrimitive.Item ref={ref} className={cn("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", className)} {...props}/>));
32
- CommandItem.displayName = CommandPrimitive.Item.displayName;
33
- const CommandShortcut = ({ className, ...props }) => {
34
- return (<span className={cn("ml-auto text-xs tracking-widest text-muted-foreground", className)} {...props}/>);
35
- };
36
- CommandShortcut.displayName = "CommandShortcut";
22
+ }
23
+ function CommandInput({ className, ...props }) {
24
+ return (<div data-slot="command-input-wrapper" className="flex h-9 items-center gap-2 border-b px-3">
25
+ <SearchIcon className="size-4 shrink-0 opacity-50"/>
26
+ <CommandPrimitive.Input data-slot="command-input" className={cn("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50", className)} {...props}/>
27
+ </div>);
28
+ }
29
+ function CommandList({ className, ...props }) {
30
+ return (<CommandPrimitive.List data-slot="command-list" className={cn("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto", className)} {...props}/>);
31
+ }
32
+ function CommandEmpty({ ...props }) {
33
+ return (<CommandPrimitive.Empty data-slot="command-empty" className="py-6 text-center text-sm" {...props}/>);
34
+ }
35
+ function CommandGroup({ className, ...props }) {
36
+ return (<CommandPrimitive.Group data-slot="command-group" className={cn("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground 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", className)} {...props}/>);
37
+ }
38
+ function CommandSeparator({ className, ...props }) {
39
+ return (<CommandPrimitive.Separator data-slot="command-separator" className={cn("bg-border -mx-1 h-px", className)} {...props}/>);
40
+ }
41
+ function CommandItem({ className, ...props }) {
42
+ return (<CommandPrimitive.Item data-slot="command-item" className={cn("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground 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", className)} {...props}/>);
43
+ }
44
+ function CommandShortcut({ className, ...props }) {
45
+ return (<span data-slot="command-shortcut" className={cn("text-muted-foreground ml-auto text-xs tracking-widest", className)} {...props}/>);
46
+ }
37
47
  export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator, };
@@ -1,27 +1,25 @@
1
1
  import * as React from "react";
2
2
  import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
3
- declare const ContextMenu: React.FC<ContextMenuPrimitive.ContextMenuProps>;
4
- declare const ContextMenuTrigger: React.ForwardRefExoticComponent<ContextMenuPrimitive.ContextMenuTriggerProps & React.RefAttributes<HTMLSpanElement>>;
5
- declare const ContextMenuGroup: React.ForwardRefExoticComponent<ContextMenuPrimitive.ContextMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
6
- declare const ContextMenuPortal: React.FC<ContextMenuPrimitive.ContextMenuPortalProps>;
7
- declare const ContextMenuSub: React.FC<ContextMenuPrimitive.ContextMenuSubProps>;
8
- declare const ContextMenuRadioGroup: React.ForwardRefExoticComponent<ContextMenuPrimitive.ContextMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
9
- declare const ContextMenuSubTrigger: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
3
+ declare function ContextMenu({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Root>): React.JSX.Element;
4
+ declare function ContextMenuTrigger({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Trigger>): React.JSX.Element;
5
+ declare function ContextMenuGroup({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Group>): React.JSX.Element;
6
+ declare function ContextMenuPortal({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Portal>): React.JSX.Element;
7
+ declare function ContextMenuSub({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Sub>): React.JSX.Element;
8
+ declare function ContextMenuRadioGroup({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.RadioGroup>): React.JSX.Element;
9
+ declare function ContextMenuSubTrigger({ className, inset, children, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.SubTrigger> & {
10
10
  inset?: boolean;
11
- } & React.RefAttributes<HTMLDivElement>>;
12
- declare const ContextMenuSubContent: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
13
- declare const ContextMenuContent: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
14
- declare const ContextMenuItem: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
11
+ }): React.JSX.Element;
12
+ declare function ContextMenuSubContent({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.SubContent>): React.JSX.Element;
13
+ declare function ContextMenuContent({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Content>): React.JSX.Element;
14
+ declare function ContextMenuItem({ className, inset, variant, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Item> & {
15
15
  inset?: boolean;
16
- } & React.RefAttributes<HTMLDivElement>>;
17
- declare const ContextMenuCheckboxItem: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
18
- declare const ContextMenuRadioItem: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuRadioItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
19
- declare const ContextMenuLabel: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
16
+ variant?: "default" | "destructive";
17
+ }): React.JSX.Element;
18
+ declare function ContextMenuCheckboxItem({ className, children, checked, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.CheckboxItem>): React.JSX.Element;
19
+ declare function ContextMenuRadioItem({ className, children, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.RadioItem>): React.JSX.Element;
20
+ declare function ContextMenuLabel({ className, inset, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Label> & {
20
21
  inset?: boolean;
21
- } & React.RefAttributes<HTMLDivElement>>;
22
- declare const ContextMenuSeparator: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
23
- declare const ContextMenuShortcut: {
24
- ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): React.JSX.Element;
25
- displayName: string;
26
- };
22
+ }): React.JSX.Element;
23
+ declare function ContextMenuSeparator({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Separator>): React.JSX.Element;
24
+ declare function ContextMenuShortcut({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
27
25
  export { ContextMenu, ContextMenuTrigger, ContextMenuContent, ContextMenuItem, ContextMenuCheckboxItem, ContextMenuRadioItem, ContextMenuLabel, ContextMenuSeparator, ContextMenuShortcut, ContextMenuGroup, ContextMenuPortal, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuRadioGroup, };