@arolariu/components 0.3.0 → 0.3.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 (100) hide show
  1. package/changelog.md +4 -0
  2. package/dist/components/ui/accordion.js.map +1 -1
  3. package/dist/components/ui/alert-dialog.js.map +1 -1
  4. package/dist/components/ui/alert.d.ts.map +1 -1
  5. package/dist/components/ui/alert.js.map +1 -1
  6. package/dist/components/ui/avatar.d.ts.map +1 -1
  7. package/dist/components/ui/avatar.js.map +1 -1
  8. package/dist/components/ui/calendar.d.ts.map +1 -1
  9. package/dist/components/ui/calendar.js.map +1 -1
  10. package/dist/components/ui/carousel.js +1 -1
  11. package/dist/components/ui/carousel.js.map +1 -1
  12. package/dist/components/ui/chart.d.ts.map +1 -1
  13. package/dist/components/ui/chart.js.map +1 -1
  14. package/dist/components/ui/checkbox.js.map +1 -1
  15. package/dist/components/ui/collapsible.d.ts +1 -2
  16. package/dist/components/ui/collapsible.d.ts.map +1 -1
  17. package/dist/components/ui/collapsible.js +30 -2
  18. package/dist/components/ui/collapsible.js.map +1 -1
  19. package/dist/components/ui/command.d.ts.map +1 -1
  20. package/dist/components/ui/command.js.map +1 -1
  21. package/dist/components/ui/context-menu.js.map +1 -1
  22. package/dist/components/ui/dialog.js.map +1 -1
  23. package/dist/components/ui/drawer.js.map +1 -1
  24. package/dist/components/ui/dropdown-menu.js.map +1 -1
  25. package/dist/components/ui/field.d.ts +1 -0
  26. package/dist/components/ui/field.d.ts.map +1 -1
  27. package/dist/components/ui/field.js +1 -1
  28. package/dist/components/ui/field.js.map +1 -1
  29. package/dist/components/ui/form.js +1 -1
  30. package/dist/components/ui/form.js.map +1 -1
  31. package/dist/components/ui/hover-card.js.map +1 -1
  32. package/dist/components/ui/input-otp.d.ts.map +1 -1
  33. package/dist/components/ui/input-otp.js +1 -1
  34. package/dist/components/ui/input-otp.js.map +1 -1
  35. package/dist/components/ui/label.js.map +1 -1
  36. package/dist/components/ui/menubar.js.map +1 -1
  37. package/dist/components/ui/navigation-menu.d.ts.map +1 -1
  38. package/dist/components/ui/navigation-menu.js +0 -1
  39. package/dist/components/ui/navigation-menu.js.map +1 -1
  40. package/dist/components/ui/pagination.d.ts.map +1 -1
  41. package/dist/components/ui/pagination.js.map +1 -1
  42. package/dist/components/ui/popover.js.map +1 -1
  43. package/dist/components/ui/progress.js.map +1 -1
  44. package/dist/components/ui/radio-group.js.map +1 -1
  45. package/dist/components/ui/resizable.d.ts +3 -2
  46. package/dist/components/ui/resizable.d.ts.map +1 -1
  47. package/dist/components/ui/resizable.js +2 -1
  48. package/dist/components/ui/resizable.js.map +1 -1
  49. package/dist/components/ui/scroll-area.js.map +1 -1
  50. package/dist/components/ui/select.js.map +1 -1
  51. package/dist/components/ui/separator.js.map +1 -1
  52. package/dist/components/ui/sheet.js.map +1 -1
  53. package/dist/components/ui/sidebar.d.ts.map +1 -1
  54. package/dist/components/ui/sidebar.js +3 -2
  55. package/dist/components/ui/sidebar.js.map +1 -1
  56. package/dist/components/ui/slider.d.ts.map +1 -1
  57. package/dist/components/ui/slider.js.map +1 -1
  58. package/dist/components/ui/switch.js.map +1 -1
  59. package/dist/components/ui/tabs.js.map +1 -1
  60. package/dist/components/ui/toggle-group.js.map +1 -1
  61. package/dist/components/ui/toggle.js.map +1 -1
  62. package/dist/components/ui/tooltip.js.map +1 -1
  63. package/package.json +1 -1
  64. package/src/components/ui/accordion.tsx +3 -3
  65. package/src/components/ui/alert-dialog.tsx +6 -6
  66. package/src/components/ui/alert.tsx +1 -0
  67. package/src/components/ui/avatar.tsx +12 -11
  68. package/src/components/ui/calendar.tsx +2 -0
  69. package/src/components/ui/carousel.tsx +1 -1
  70. package/src/components/ui/chart.tsx +3 -1
  71. package/src/components/ui/checkbox.tsx +1 -1
  72. package/src/components/ui/collapsible.tsx +1 -3
  73. package/src/components/ui/command.tsx +8 -7
  74. package/src/components/ui/context-menu.tsx +8 -8
  75. package/src/components/ui/dialog.tsx +4 -4
  76. package/src/components/ui/drawer.tsx +4 -4
  77. package/src/components/ui/dropdown-menu.tsx +8 -8
  78. package/src/components/ui/field.tsx +4 -3
  79. package/src/components/ui/form.tsx +4 -4
  80. package/src/components/ui/hover-card.tsx +1 -1
  81. package/src/components/ui/input-otp.tsx +5 -5
  82. package/src/components/ui/label.tsx +1 -1
  83. package/src/components/ui/menubar.tsx +10 -10
  84. package/src/components/ui/navigation-menu.tsx +6 -7
  85. package/src/components/ui/pagination.tsx +1 -0
  86. package/src/components/ui/popover.tsx +1 -1
  87. package/src/components/ui/progress.tsx +1 -1
  88. package/src/components/ui/radio-group.tsx +2 -2
  89. package/src/components/ui/resizable.tsx +2 -1
  90. package/src/components/ui/scroll-area.tsx +2 -2
  91. package/src/components/ui/select.tsx +7 -7
  92. package/src/components/ui/separator.tsx +1 -1
  93. package/src/components/ui/sheet.tsx +4 -4
  94. package/src/components/ui/sidebar.tsx +20 -14
  95. package/src/components/ui/slider.tsx +14 -13
  96. package/src/components/ui/switch.tsx +1 -1
  97. package/src/components/ui/tabs.tsx +3 -3
  98. package/src/components/ui/toggle-group.tsx +2 -2
  99. package/src/components/ui/toggle.tsx +1 -1
  100. package/src/components/ui/tooltip.tsx +1 -1
@@ -1,5 +1,7 @@
1
1
  "use client";
2
2
 
3
+ /* eslint-disable */
4
+
3
5
  import * as React from "react";
4
6
  import * as RechartsPrimitive from "recharts";
5
7
 
@@ -273,7 +275,7 @@ ChartLegendContent.displayName = "ChartLegend";
273
275
  // Helper to extract item config from a payload.
274
276
  function getPayloadConfigFromPayload(config: ChartConfig, payload: unknown, key: string) {
275
277
  if (typeof payload !== "object" || payload === null) {
276
- return undefined;
278
+ return;
277
279
  }
278
280
 
279
281
  const payloadPayload =
@@ -7,7 +7,7 @@ import * as React from "react";
7
7
  import {cn} from "@/lib/utilities";
8
8
 
9
9
  const Checkbox = React.forwardRef<
10
- React.ElementRef<typeof CheckboxPrimitive.Root>,
10
+ React.ComponentRef<typeof CheckboxPrimitive.Root>,
11
11
  React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>
12
12
  >(({className, ...props}, ref) => (
13
13
  <CheckboxPrimitive.Root
@@ -4,8 +4,6 @@ import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
4
4
 
5
5
  const Collapsible = CollapsiblePrimitive.Root;
6
6
 
7
- const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger;
8
-
9
- const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent;
7
+ const {CollapsibleTrigger, CollapsibleContent} = CollapsiblePrimitive;
10
8
 
11
9
  export {Collapsible, CollapsibleContent, CollapsibleTrigger};
@@ -8,7 +8,7 @@ import * as React from "react";
8
8
  import {Dialog, DialogContent} from "@/components/ui/dialog";
9
9
  import {cn} from "@/lib/utilities";
10
10
 
11
- const Command = React.forwardRef<React.ElementRef<typeof CommandPrimitive>, React.ComponentPropsWithoutRef<typeof CommandPrimitive>>(
11
+ const Command = React.forwardRef<React.ComponentRef<typeof CommandPrimitive>, React.ComponentPropsWithoutRef<typeof CommandPrimitive>>(
12
12
  ({className, ...props}, ref) => (
13
13
  <CommandPrimitive
14
14
  ref={ref}
@@ -35,11 +35,12 @@ const CommandDialog = ({children, ...props}: DialogProps) => {
35
35
  };
36
36
 
37
37
  const CommandInput = React.forwardRef<
38
- React.ElementRef<typeof CommandPrimitive.Input>,
38
+ React.ComponentRef<typeof CommandPrimitive.Input>,
39
39
  React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>
40
40
  >(({className, ...props}, ref) => (
41
41
  <div
42
42
  className='flex items-center border-b px-3'
43
+ // eslint-disable-next-line react/no-unknown-property -- cmdk specific attribute
43
44
  cmdk-input-wrapper=''>
44
45
  <Search className='mr-2 h-4 w-4 shrink-0 opacity-50' />
45
46
  <CommandPrimitive.Input
@@ -56,7 +57,7 @@ const CommandInput = React.forwardRef<
56
57
  CommandInput.displayName = CommandPrimitive.Input.displayName;
57
58
 
58
59
  const CommandList = React.forwardRef<
59
- React.ElementRef<typeof CommandPrimitive.List>,
60
+ React.ComponentRef<typeof CommandPrimitive.List>,
60
61
  React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>
61
62
  >(({className, ...props}, ref) => (
62
63
  <CommandPrimitive.List
@@ -69,7 +70,7 @@ const CommandList = React.forwardRef<
69
70
  CommandList.displayName = CommandPrimitive.List.displayName;
70
71
 
71
72
  const CommandEmpty = React.forwardRef<
72
- React.ElementRef<typeof CommandPrimitive.Empty>,
73
+ React.ComponentRef<typeof CommandPrimitive.Empty>,
73
74
  React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>
74
75
  >((props, ref) => (
75
76
  <CommandPrimitive.Empty
@@ -82,7 +83,7 @@ const CommandEmpty = React.forwardRef<
82
83
  CommandEmpty.displayName = CommandPrimitive.Empty.displayName;
83
84
 
84
85
  const CommandGroup = React.forwardRef<
85
- React.ElementRef<typeof CommandPrimitive.Group>,
86
+ React.ComponentRef<typeof CommandPrimitive.Group>,
86
87
  React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>
87
88
  >(({className, ...props}, ref) => (
88
89
  <CommandPrimitive.Group
@@ -98,7 +99,7 @@ const CommandGroup = React.forwardRef<
98
99
  CommandGroup.displayName = CommandPrimitive.Group.displayName;
99
100
 
100
101
  const CommandSeparator = React.forwardRef<
101
- React.ElementRef<typeof CommandPrimitive.Separator>,
102
+ React.ComponentRef<typeof CommandPrimitive.Separator>,
102
103
  React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>
103
104
  >(({className, ...props}, ref) => (
104
105
  <CommandPrimitive.Separator
@@ -110,7 +111,7 @@ const CommandSeparator = React.forwardRef<
110
111
  CommandSeparator.displayName = CommandPrimitive.Separator.displayName;
111
112
 
112
113
  const CommandItem = React.forwardRef<
113
- React.ElementRef<typeof CommandPrimitive.Item>,
114
+ React.ComponentRef<typeof CommandPrimitive.Item>,
114
115
  React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>
115
116
  >(({className, ...props}, ref) => (
116
117
  <CommandPrimitive.Item
@@ -19,7 +19,7 @@ const ContextMenuSub = ContextMenuPrimitive.Sub;
19
19
  const ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;
20
20
 
21
21
  const ContextMenuSubTrigger = React.forwardRef<
22
- React.ElementRef<typeof ContextMenuPrimitive.SubTrigger>,
22
+ React.ComponentRef<typeof ContextMenuPrimitive.SubTrigger>,
23
23
  React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubTrigger> & {
24
24
  inset?: boolean;
25
25
  }
@@ -39,7 +39,7 @@ const ContextMenuSubTrigger = React.forwardRef<
39
39
  ContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;
40
40
 
41
41
  const ContextMenuSubContent = React.forwardRef<
42
- React.ElementRef<typeof ContextMenuPrimitive.SubContent>,
42
+ React.ComponentRef<typeof ContextMenuPrimitive.SubContent>,
43
43
  React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubContent>
44
44
  >(({className, ...props}, ref) => (
45
45
  <ContextMenuPrimitive.SubContent
@@ -54,7 +54,7 @@ const ContextMenuSubContent = React.forwardRef<
54
54
  ContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;
55
55
 
56
56
  const ContextMenuContent = React.forwardRef<
57
- React.ElementRef<typeof ContextMenuPrimitive.Content>,
57
+ React.ComponentRef<typeof ContextMenuPrimitive.Content>,
58
58
  React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Content>
59
59
  >(({className, ...props}, ref) => (
60
60
  <ContextMenuPrimitive.Portal>
@@ -71,7 +71,7 @@ const ContextMenuContent = React.forwardRef<
71
71
  ContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;
72
72
 
73
73
  const ContextMenuItem = React.forwardRef<
74
- React.ElementRef<typeof ContextMenuPrimitive.Item>,
74
+ React.ComponentRef<typeof ContextMenuPrimitive.Item>,
75
75
  React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Item> & {
76
76
  inset?: boolean;
77
77
  }
@@ -89,7 +89,7 @@ const ContextMenuItem = React.forwardRef<
89
89
  ContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;
90
90
 
91
91
  const ContextMenuCheckboxItem = React.forwardRef<
92
- React.ElementRef<typeof ContextMenuPrimitive.CheckboxItem>,
92
+ React.ComponentRef<typeof ContextMenuPrimitive.CheckboxItem>,
93
93
  React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.CheckboxItem>
94
94
  >(({className, children, checked, ...props}, ref) => (
95
95
  <ContextMenuPrimitive.CheckboxItem
@@ -111,7 +111,7 @@ const ContextMenuCheckboxItem = React.forwardRef<
111
111
  ContextMenuCheckboxItem.displayName = ContextMenuPrimitive.CheckboxItem.displayName;
112
112
 
113
113
  const ContextMenuRadioItem = React.forwardRef<
114
- React.ElementRef<typeof ContextMenuPrimitive.RadioItem>,
114
+ React.ComponentRef<typeof ContextMenuPrimitive.RadioItem>,
115
115
  React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.RadioItem>
116
116
  >(({className, children, ...props}, ref) => (
117
117
  <ContextMenuPrimitive.RadioItem
@@ -132,7 +132,7 @@ const ContextMenuRadioItem = React.forwardRef<
132
132
  ContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;
133
133
 
134
134
  const ContextMenuLabel = React.forwardRef<
135
- React.ElementRef<typeof ContextMenuPrimitive.Label>,
135
+ React.ComponentRef<typeof ContextMenuPrimitive.Label>,
136
136
  React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Label> & {
137
137
  inset?: boolean;
138
138
  }
@@ -146,7 +146,7 @@ const ContextMenuLabel = React.forwardRef<
146
146
  ContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;
147
147
 
148
148
  const ContextMenuSeparator = React.forwardRef<
149
- React.ElementRef<typeof ContextMenuPrimitive.Separator>,
149
+ React.ComponentRef<typeof ContextMenuPrimitive.Separator>,
150
150
  React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Separator>
151
151
  >(({className, ...props}, ref) => (
152
152
  <ContextMenuPrimitive.Separator
@@ -15,7 +15,7 @@ const DialogPortal = DialogPrimitive.Portal;
15
15
  const DialogClose = DialogPrimitive.Close;
16
16
 
17
17
  const DialogOverlay = React.forwardRef<
18
- React.ElementRef<typeof DialogPrimitive.Overlay>,
18
+ React.ComponentRef<typeof DialogPrimitive.Overlay>,
19
19
  React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>
20
20
  >(({className, ...props}, ref) => (
21
21
  <DialogPrimitive.Overlay
@@ -30,7 +30,7 @@ const DialogOverlay = React.forwardRef<
30
30
  DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
31
31
 
32
32
  const DialogContent = React.forwardRef<
33
- React.ElementRef<typeof DialogPrimitive.Content>,
33
+ React.ComponentRef<typeof DialogPrimitive.Content>,
34
34
  React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>
35
35
  >(({className, children, ...props}, ref) => (
36
36
  <DialogPortal>
@@ -69,7 +69,7 @@ const DialogFooter = ({className, ...props}: React.HTMLAttributes<HTMLDivElement
69
69
  DialogFooter.displayName = "DialogFooter";
70
70
 
71
71
  const DialogTitle = React.forwardRef<
72
- React.ElementRef<typeof DialogPrimitive.Title>,
72
+ React.ComponentRef<typeof DialogPrimitive.Title>,
73
73
  React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>
74
74
  >(({className, ...props}, ref) => (
75
75
  <DialogPrimitive.Title
@@ -81,7 +81,7 @@ const DialogTitle = React.forwardRef<
81
81
  DialogTitle.displayName = DialogPrimitive.Title.displayName;
82
82
 
83
83
  const DialogDescription = React.forwardRef<
84
- React.ElementRef<typeof DialogPrimitive.Description>,
84
+ React.ComponentRef<typeof DialogPrimitive.Description>,
85
85
  React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>
86
86
  >(({className, ...props}, ref) => (
87
87
  <DialogPrimitive.Description
@@ -20,7 +20,7 @@ const DrawerPortal = DrawerPrimitive.Portal;
20
20
  const DrawerClose = DrawerPrimitive.Close;
21
21
 
22
22
  const DrawerOverlay = React.forwardRef<
23
- React.ElementRef<typeof DrawerPrimitive.Overlay>,
23
+ React.ComponentRef<typeof DrawerPrimitive.Overlay>,
24
24
  React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Overlay>
25
25
  >(({className, ...props}, ref) => (
26
26
  <DrawerPrimitive.Overlay
@@ -32,7 +32,7 @@ const DrawerOverlay = React.forwardRef<
32
32
  DrawerOverlay.displayName = DrawerPrimitive.Overlay.displayName;
33
33
 
34
34
  const DrawerContent = React.forwardRef<
35
- React.ElementRef<typeof DrawerPrimitive.Content>,
35
+ React.ComponentRef<typeof DrawerPrimitive.Content>,
36
36
  React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>
37
37
  >(({className, children, ...props}, ref) => (
38
38
  <DrawerPortal>
@@ -68,7 +68,7 @@ const DrawerFooter = ({className, ...props}: React.HTMLAttributes<HTMLDivElement
68
68
  DrawerFooter.displayName = "DrawerFooter";
69
69
 
70
70
  const DrawerTitle = React.forwardRef<
71
- React.ElementRef<typeof DrawerPrimitive.Title>,
71
+ React.ComponentRef<typeof DrawerPrimitive.Title>,
72
72
  React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title>
73
73
  >(({className, ...props}, ref) => (
74
74
  <DrawerPrimitive.Title
@@ -80,7 +80,7 @@ const DrawerTitle = React.forwardRef<
80
80
  DrawerTitle.displayName = DrawerPrimitive.Title.displayName;
81
81
 
82
82
  const DrawerDescription = React.forwardRef<
83
- React.ElementRef<typeof DrawerPrimitive.Description>,
83
+ React.ComponentRef<typeof DrawerPrimitive.Description>,
84
84
  React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Description>
85
85
  >(({className, ...props}, ref) => (
86
86
  <DrawerPrimitive.Description
@@ -19,7 +19,7 @@ const DropdownMenuSub = DropdownMenuPrimitive.Sub;
19
19
  const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
20
20
 
21
21
  const DropdownMenuSubTrigger = React.forwardRef<
22
- React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,
22
+ React.ComponentRef<typeof DropdownMenuPrimitive.SubTrigger>,
23
23
  React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {
24
24
  inset?: boolean;
25
25
  }
@@ -39,7 +39,7 @@ const DropdownMenuSubTrigger = React.forwardRef<
39
39
  DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
40
40
 
41
41
  const DropdownMenuSubContent = React.forwardRef<
42
- React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,
42
+ React.ComponentRef<typeof DropdownMenuPrimitive.SubContent>,
43
43
  React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>
44
44
  >(({className, ...props}, ref) => (
45
45
  <DropdownMenuPrimitive.SubContent
@@ -54,7 +54,7 @@ const DropdownMenuSubContent = React.forwardRef<
54
54
  DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
55
55
 
56
56
  const DropdownMenuContent = React.forwardRef<
57
- React.ElementRef<typeof DropdownMenuPrimitive.Content>,
57
+ React.ComponentRef<typeof DropdownMenuPrimitive.Content>,
58
58
  React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>
59
59
  >(({className, sideOffset = 4, ...props}, ref) => (
60
60
  <DropdownMenuPrimitive.Portal>
@@ -73,7 +73,7 @@ const DropdownMenuContent = React.forwardRef<
73
73
  DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
74
74
 
75
75
  const DropdownMenuItem = React.forwardRef<
76
- React.ElementRef<typeof DropdownMenuPrimitive.Item>,
76
+ React.ComponentRef<typeof DropdownMenuPrimitive.Item>,
77
77
  React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {
78
78
  inset?: boolean;
79
79
  }
@@ -91,7 +91,7 @@ const DropdownMenuItem = React.forwardRef<
91
91
  DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
92
92
 
93
93
  const DropdownMenuCheckboxItem = React.forwardRef<
94
- React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,
94
+ React.ComponentRef<typeof DropdownMenuPrimitive.CheckboxItem>,
95
95
  React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>
96
96
  >(({className, children, checked, ...props}, ref) => (
97
97
  <DropdownMenuPrimitive.CheckboxItem
@@ -113,7 +113,7 @@ const DropdownMenuCheckboxItem = React.forwardRef<
113
113
  DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
114
114
 
115
115
  const DropdownMenuRadioItem = React.forwardRef<
116
- React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,
116
+ React.ComponentRef<typeof DropdownMenuPrimitive.RadioItem>,
117
117
  React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>
118
118
  >(({className, children, ...props}, ref) => (
119
119
  <DropdownMenuPrimitive.RadioItem
@@ -134,7 +134,7 @@ const DropdownMenuRadioItem = React.forwardRef<
134
134
  DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
135
135
 
136
136
  const DropdownMenuLabel = React.forwardRef<
137
- React.ElementRef<typeof DropdownMenuPrimitive.Label>,
137
+ React.ComponentRef<typeof DropdownMenuPrimitive.Label>,
138
138
  React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {
139
139
  inset?: boolean;
140
140
  }
@@ -148,7 +148,7 @@ const DropdownMenuLabel = React.forwardRef<
148
148
  DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
149
149
 
150
150
  const DropdownMenuSeparator = React.forwardRef<
151
- React.ElementRef<typeof DropdownMenuPrimitive.Separator>,
151
+ React.ComponentRef<typeof DropdownMenuPrimitive.Separator>,
152
152
  React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>
153
153
  >(({className, ...props}, ref) => (
154
154
  <DropdownMenuPrimitive.Separator
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
 
3
3
  import {cva, type VariantProps} from "class-variance-authority";
4
- import {useMemo} from "react";
4
+ import * as React from "react";
5
5
 
6
6
  import {Label} from "@/components/ui/label";
7
7
  import {Separator} from "@/components/ui/separator";
@@ -137,7 +137,7 @@ function FieldSeparator({
137
137
  return (
138
138
  <div
139
139
  data-slot='field-separator'
140
- data-content={!!children}
140
+ data-content={Boolean(children) || undefined}
141
141
  className={cn("relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2", className)}
142
142
  {...props}>
143
143
  <Separator className='absolute inset-0 top-1/2' />
@@ -160,7 +160,8 @@ function FieldError({
160
160
  }: React.ComponentProps<"div"> & {
161
161
  errors?: Array<{message?: string} | undefined>;
162
162
  }) {
163
- const content = useMemo(() => {
163
+ // eslint-disable-next-line sonarjs/function-return-type -- expected different return type.
164
+ const content = React.useMemo(() => {
164
165
  if (children) {
165
166
  return children;
166
167
  }
@@ -74,7 +74,7 @@ const FormItem = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivEl
74
74
  FormItem.displayName = "FormItem";
75
75
 
76
76
  const FormLabel = React.forwardRef<
77
- React.ElementRef<typeof LabelPrimitive.Root>,
77
+ React.ComponentRef<typeof LabelPrimitive.Root>,
78
78
  React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>
79
79
  >(({className, ...props}, ref) => {
80
80
  const {error, formItemId} = useFormField();
@@ -90,15 +90,15 @@ const FormLabel = React.forwardRef<
90
90
  });
91
91
  FormLabel.displayName = "FormLabel";
92
92
 
93
- const FormControl = React.forwardRef<React.ElementRef<typeof Slot>, React.ComponentPropsWithoutRef<typeof Slot>>(({...props}, ref) => {
93
+ const FormControl = React.forwardRef<React.ComponentRef<typeof Slot>, React.ComponentPropsWithoutRef<typeof Slot>>(({...props}, ref) => {
94
94
  const {error, formItemId, formDescriptionId, formMessageId} = useFormField();
95
95
 
96
96
  return (
97
97
  <Slot
98
98
  ref={ref}
99
99
  id={formItemId}
100
- aria-describedby={!error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`}
101
- aria-invalid={!!error}
100
+ aria-describedby={error ? `${formDescriptionId} ${formMessageId}` : `${formDescriptionId}`}
101
+ aria-invalid={Boolean(error)}
102
102
  {...props}
103
103
  />
104
104
  );
@@ -10,7 +10,7 @@ const HoverCard = HoverCardPrimitive.Root;
10
10
  const HoverCardTrigger = HoverCardPrimitive.Trigger;
11
11
 
12
12
  const HoverCardContent = React.forwardRef<
13
- React.ElementRef<typeof HoverCardPrimitive.Content>,
13
+ React.ComponentRef<typeof HoverCardPrimitive.Content>,
14
14
  React.ComponentPropsWithoutRef<typeof HoverCardPrimitive.Content>
15
15
  >(({className, align = "center", sideOffset = 4, ...props}, ref) => (
16
16
  <HoverCardPrimitive.Content
@@ -6,7 +6,7 @@ import * as React from "react";
6
6
 
7
7
  import {cn} from "@/lib/utilities";
8
8
 
9
- const InputOTP = React.forwardRef<React.ElementRef<typeof OTPInput>, React.ComponentPropsWithoutRef<typeof OTPInput>>(
9
+ const InputOTP = React.forwardRef<React.ComponentRef<typeof OTPInput>, React.ComponentPropsWithoutRef<typeof OTPInput>>(
10
10
  ({className, containerClassName, ...props}, ref) => (
11
11
  <OTPInput
12
12
  ref={ref}
@@ -18,7 +18,7 @@ const InputOTP = React.forwardRef<React.ElementRef<typeof OTPInput>, React.Compo
18
18
  );
19
19
  InputOTP.displayName = "InputOTP";
20
20
 
21
- const InputOTPGroup = React.forwardRef<React.ElementRef<"div">, React.ComponentPropsWithoutRef<"div">>(({className, ...props}, ref) => (
21
+ const InputOTPGroup = React.forwardRef<React.ComponentRef<"div">, React.ComponentPropsWithoutRef<"div">>(({className, ...props}, ref) => (
22
22
  <div
23
23
  ref={ref}
24
24
  className={cn("flex items-center", className)}
@@ -27,7 +27,7 @@ const InputOTPGroup = React.forwardRef<React.ElementRef<"div">, React.ComponentP
27
27
  ));
28
28
  InputOTPGroup.displayName = "InputOTPGroup";
29
29
 
30
- const InputOTPSlot = React.forwardRef<React.ElementRef<"div">, React.ComponentPropsWithoutRef<"div"> & {index: number}>(
30
+ const InputOTPSlot = React.forwardRef<React.ComponentRef<"div">, React.ComponentPropsWithoutRef<"div"> & {index: number}>(
31
31
  ({index, className, ...props}, ref) => {
32
32
  const inputOTPContext = React.useContext(OTPInputContext);
33
33
  const {char, hasFakeCaret, isActive} = inputOTPContext.slots[index];
@@ -42,7 +42,7 @@ const InputOTPSlot = React.forwardRef<React.ElementRef<"div">, React.ComponentPr
42
42
  )}
43
43
  {...props}>
44
44
  {char}
45
- {hasFakeCaret && (
45
+ {Boolean(hasFakeCaret) && (
46
46
  <div className='pointer-events-none absolute inset-0 flex items-center justify-center'>
47
47
  <div className='animate-caret-blink h-4 w-px bg-neutral-950 duration-1000 dark:bg-neutral-50' />
48
48
  </div>
@@ -53,7 +53,7 @@ const InputOTPSlot = React.forwardRef<React.ElementRef<"div">, React.ComponentPr
53
53
  );
54
54
  InputOTPSlot.displayName = "InputOTPSlot";
55
55
 
56
- const InputOTPSeparator = React.forwardRef<React.ElementRef<"div">, React.ComponentPropsWithoutRef<"div">>(({...props}, ref) => (
56
+ const InputOTPSeparator = React.forwardRef<React.ComponentRef<"div">, React.ComponentPropsWithoutRef<"div">>(({...props}, ref) => (
57
57
  <div
58
58
  ref={ref}
59
59
  role='separator'
@@ -9,7 +9,7 @@ import {cn} from "@/lib/utilities";
9
9
  const labelVariants = cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70");
10
10
 
11
11
  const Label = React.forwardRef<
12
- React.ElementRef<typeof LabelPrimitive.Root>,
12
+ React.ComponentRef<typeof LabelPrimitive.Root>,
13
13
  React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> & VariantProps<typeof labelVariants>
14
14
  >(({className, ...props}, ref) => (
15
15
  <LabelPrimitive.Root
@@ -32,7 +32,7 @@ function MenubarSub({...props}: React.ComponentProps<typeof MenubarPrimitive.Sub
32
32
  }
33
33
 
34
34
  const Menubar = React.forwardRef<
35
- React.ElementRef<typeof MenubarPrimitive.Root>,
35
+ React.ComponentRef<typeof MenubarPrimitive.Root>,
36
36
  React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Root>
37
37
  >(({className, ...props}, ref) => (
38
38
  <MenubarPrimitive.Root
@@ -47,7 +47,7 @@ const Menubar = React.forwardRef<
47
47
  Menubar.displayName = MenubarPrimitive.Root.displayName;
48
48
 
49
49
  const MenubarTrigger = React.forwardRef<
50
- React.ElementRef<typeof MenubarPrimitive.Trigger>,
50
+ React.ComponentRef<typeof MenubarPrimitive.Trigger>,
51
51
  React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Trigger>
52
52
  >(({className, ...props}, ref) => (
53
53
  <MenubarPrimitive.Trigger
@@ -62,7 +62,7 @@ const MenubarTrigger = React.forwardRef<
62
62
  MenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName;
63
63
 
64
64
  const MenubarSubTrigger = React.forwardRef<
65
- React.ElementRef<typeof MenubarPrimitive.SubTrigger>,
65
+ React.ComponentRef<typeof MenubarPrimitive.SubTrigger>,
66
66
  React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubTrigger> & {
67
67
  inset?: boolean;
68
68
  }
@@ -82,7 +82,7 @@ const MenubarSubTrigger = React.forwardRef<
82
82
  MenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName;
83
83
 
84
84
  const MenubarSubContent = React.forwardRef<
85
- React.ElementRef<typeof MenubarPrimitive.SubContent>,
85
+ React.ComponentRef<typeof MenubarPrimitive.SubContent>,
86
86
  React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubContent>
87
87
  >(({className, ...props}, ref) => (
88
88
  <MenubarPrimitive.SubContent
@@ -97,7 +97,7 @@ const MenubarSubContent = React.forwardRef<
97
97
  MenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName;
98
98
 
99
99
  const MenubarContent = React.forwardRef<
100
- React.ElementRef<typeof MenubarPrimitive.Content>,
100
+ React.ComponentRef<typeof MenubarPrimitive.Content>,
101
101
  React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Content>
102
102
  >(({className, align = "start", alignOffset = -4, sideOffset = 8, ...props}, ref) => (
103
103
  <MenubarPrimitive.Portal>
@@ -117,7 +117,7 @@ const MenubarContent = React.forwardRef<
117
117
  MenubarContent.displayName = MenubarPrimitive.Content.displayName;
118
118
 
119
119
  const MenubarItem = React.forwardRef<
120
- React.ElementRef<typeof MenubarPrimitive.Item>,
120
+ React.ComponentRef<typeof MenubarPrimitive.Item>,
121
121
  React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Item> & {
122
122
  inset?: boolean;
123
123
  }
@@ -135,7 +135,7 @@ const MenubarItem = React.forwardRef<
135
135
  MenubarItem.displayName = MenubarPrimitive.Item.displayName;
136
136
 
137
137
  const MenubarCheckboxItem = React.forwardRef<
138
- React.ElementRef<typeof MenubarPrimitive.CheckboxItem>,
138
+ React.ComponentRef<typeof MenubarPrimitive.CheckboxItem>,
139
139
  React.ComponentPropsWithoutRef<typeof MenubarPrimitive.CheckboxItem>
140
140
  >(({className, children, checked, ...props}, ref) => (
141
141
  <MenubarPrimitive.CheckboxItem
@@ -157,7 +157,7 @@ const MenubarCheckboxItem = React.forwardRef<
157
157
  MenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName;
158
158
 
159
159
  const MenubarRadioItem = React.forwardRef<
160
- React.ElementRef<typeof MenubarPrimitive.RadioItem>,
160
+ React.ComponentRef<typeof MenubarPrimitive.RadioItem>,
161
161
  React.ComponentPropsWithoutRef<typeof MenubarPrimitive.RadioItem>
162
162
  >(({className, children, ...props}, ref) => (
163
163
  <MenubarPrimitive.RadioItem
@@ -178,7 +178,7 @@ const MenubarRadioItem = React.forwardRef<
178
178
  MenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName;
179
179
 
180
180
  const MenubarLabel = React.forwardRef<
181
- React.ElementRef<typeof MenubarPrimitive.Label>,
181
+ React.ComponentRef<typeof MenubarPrimitive.Label>,
182
182
  React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Label> & {
183
183
  inset?: boolean;
184
184
  }
@@ -192,7 +192,7 @@ const MenubarLabel = React.forwardRef<
192
192
  MenubarLabel.displayName = MenubarPrimitive.Label.displayName;
193
193
 
194
194
  const MenubarSeparator = React.forwardRef<
195
- React.ElementRef<typeof MenubarPrimitive.Separator>,
195
+ React.ComponentRef<typeof MenubarPrimitive.Separator>,
196
196
  React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Separator>
197
197
  >(({className, ...props}, ref) => (
198
198
  <MenubarPrimitive.Separator
@@ -8,7 +8,7 @@ import * as React from "react";
8
8
  import {cn} from "@/lib/utilities";
9
9
 
10
10
  const NavigationMenu = React.forwardRef<
11
- React.ElementRef<typeof NavigationMenuPrimitive.Root>,
11
+ React.ComponentRef<typeof NavigationMenuPrimitive.Root>,
12
12
  React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Root>
13
13
  >(({className, children, ...props}, ref) => (
14
14
  <NavigationMenuPrimitive.Root
@@ -22,7 +22,7 @@ const NavigationMenu = React.forwardRef<
22
22
  NavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName;
23
23
 
24
24
  const NavigationMenuList = React.forwardRef<
25
- React.ElementRef<typeof NavigationMenuPrimitive.List>,
25
+ React.ComponentRef<typeof NavigationMenuPrimitive.List>,
26
26
  React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.List>
27
27
  >(({className, ...props}, ref) => (
28
28
  <NavigationMenuPrimitive.List
@@ -40,7 +40,7 @@ const navigationMenuTriggerStyle = cva(
40
40
  );
41
41
 
42
42
  const NavigationMenuTrigger = React.forwardRef<
43
- React.ElementRef<typeof NavigationMenuPrimitive.Trigger>,
43
+ React.ComponentRef<typeof NavigationMenuPrimitive.Trigger>,
44
44
  React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Trigger>
45
45
  >(({className, children, ...props}, ref) => (
46
46
  <NavigationMenuPrimitive.Trigger
@@ -48,7 +48,6 @@ const NavigationMenuTrigger = React.forwardRef<
48
48
  className={cn(navigationMenuTriggerStyle(), "group", className)}
49
49
  {...props}>
50
50
  {children}
51
- {""}
52
51
  <ChevronDown
53
52
  className='relative top-[1px] ml-1 h-3 w-3 transition duration-300 group-data-[state=open]:rotate-180'
54
53
  aria-hidden='true'
@@ -58,7 +57,7 @@ const NavigationMenuTrigger = React.forwardRef<
58
57
  NavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName;
59
58
 
60
59
  const NavigationMenuContent = React.forwardRef<
61
- React.ElementRef<typeof NavigationMenuPrimitive.Content>,
60
+ React.ComponentRef<typeof NavigationMenuPrimitive.Content>,
62
61
  React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Content>
63
62
  >(({className, ...props}, ref) => (
64
63
  <NavigationMenuPrimitive.Content
@@ -75,7 +74,7 @@ NavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName;
75
74
  const NavigationMenuLink = NavigationMenuPrimitive.Link;
76
75
 
77
76
  const NavigationMenuViewport = React.forwardRef<
78
- React.ElementRef<typeof NavigationMenuPrimitive.Viewport>,
77
+ React.ComponentRef<typeof NavigationMenuPrimitive.Viewport>,
79
78
  React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Viewport>
80
79
  >(({className, ...props}, ref) => (
81
80
  <div className={cn("absolute top-full left-0 flex justify-center")}>
@@ -92,7 +91,7 @@ const NavigationMenuViewport = React.forwardRef<
92
91
  NavigationMenuViewport.displayName = NavigationMenuPrimitive.Viewport.displayName;
93
92
 
94
93
  const NavigationMenuIndicator = React.forwardRef<
95
- React.ElementRef<typeof NavigationMenuPrimitive.Indicator>,
94
+ React.ComponentRef<typeof NavigationMenuPrimitive.Indicator>,
96
95
  React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Indicator>
97
96
  >(({className, ...props}, ref) => (
98
97
  <NavigationMenuPrimitive.Indicator
@@ -40,6 +40,7 @@ type PaginationLinkProps = {
40
40
  & React.ComponentProps<"a">;
41
41
 
42
42
  const PaginationLink = ({className, isActive, size = "icon", ...props}: PaginationLinkProps) => (
43
+ // eslint-disable-next-line jsx-a11y/anchor-has-content -- the link will have children.
43
44
  <a
44
45
  aria-current={isActive ? "page" : undefined}
45
46
  className={cn(
@@ -12,7 +12,7 @@ const PopoverTrigger = PopoverPrimitive.Trigger;
12
12
  const PopoverAnchor = PopoverPrimitive.Anchor;
13
13
 
14
14
  const PopoverContent = React.forwardRef<
15
- React.ElementRef<typeof PopoverPrimitive.Content>,
15
+ React.ComponentRef<typeof PopoverPrimitive.Content>,
16
16
  React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>
17
17
  >(({className, align = "center", sideOffset = 4, ...props}, ref) => (
18
18
  <PopoverPrimitive.Portal>
@@ -6,7 +6,7 @@ import * as React from "react";
6
6
  import {cn} from "@/lib/utilities";
7
7
 
8
8
  const Progress = React.forwardRef<
9
- React.ElementRef<typeof ProgressPrimitive.Root>,
9
+ React.ComponentRef<typeof ProgressPrimitive.Root>,
10
10
  React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root>
11
11
  >(({className, value, ...props}, ref) => (
12
12
  <ProgressPrimitive.Root
@@ -7,7 +7,7 @@ import * as React from "react";
7
7
  import {cn} from "@/lib/utilities";
8
8
 
9
9
  const RadioGroup = React.forwardRef<
10
- React.ElementRef<typeof RadioGroupPrimitive.Root>,
10
+ React.ComponentRef<typeof RadioGroupPrimitive.Root>,
11
11
  React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>
12
12
  >(({className, ...props}, ref) => {
13
13
  return (
@@ -21,7 +21,7 @@ const RadioGroup = React.forwardRef<
21
21
  RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
22
22
 
23
23
  const RadioGroupItem = React.forwardRef<
24
- React.ElementRef<typeof RadioGroupPrimitive.Item>,
24
+ React.ComponentRef<typeof RadioGroupPrimitive.Item>,
25
25
  React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>
26
26
  >(({className, ...props}, ref) => {
27
27
  return (
@@ -1,6 +1,7 @@
1
1
  "use client";
2
2
 
3
3
  import {GripVertical} from "lucide-react";
4
+ import * as React from "react";
4
5
  import * as ResizablePrimitive from "react-resizable-panels";
5
6
 
6
7
  import {cn} from "@/lib/utilities";
@@ -27,7 +28,7 @@ const ResizableHandle = ({
27
28
  className,
28
29
  )}
29
30
  {...props}>
30
- {withHandle && (
31
+ {Boolean(withHandle) && (
31
32
  <div className='z-10 flex h-4 w-3 items-center justify-center rounded-sm border border-neutral-200 bg-neutral-200 dark:border-neutral-800 dark:bg-neutral-800'>
32
33
  <GripVertical className='h-2.5 w-2.5' />
33
34
  </div>