@arolariu/components 0.3.0 → 0.4.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/EXAMPLES.md +1035 -1035
- package/changelog.md +9 -0
- package/dist/components/ui/accordion.js.map +1 -1
- package/dist/components/ui/alert-dialog.js.map +1 -1
- package/dist/components/ui/alert.d.ts.map +1 -1
- package/dist/components/ui/alert.js.map +1 -1
- package/dist/components/ui/aspect-ratio.js.map +1 -1
- package/dist/components/ui/avatar.d.ts.map +1 -1
- package/dist/components/ui/avatar.js.map +1 -1
- package/dist/components/ui/background-beams.js.map +1 -1
- package/dist/components/ui/badge.js.map +1 -1
- package/dist/components/ui/breadcrumb.js.map +1 -1
- package/dist/components/ui/bubble-background.js.map +1 -1
- package/dist/components/ui/button-group.js.map +1 -1
- package/dist/components/ui/button.js.map +1 -1
- package/dist/components/ui/calendar.d.ts.map +1 -1
- package/dist/components/ui/calendar.js.map +1 -1
- package/dist/components/ui/card.js.map +1 -1
- package/dist/components/ui/carousel.js +1 -1
- package/dist/components/ui/carousel.js.map +1 -1
- package/dist/components/ui/chart.d.ts.map +1 -1
- package/dist/components/ui/chart.js.map +1 -1
- package/dist/components/ui/checkbox.js +2 -2
- package/dist/components/ui/checkbox.js.map +1 -1
- package/dist/components/ui/collapsible.js.map +1 -1
- package/dist/components/ui/command.d.ts.map +1 -1
- package/dist/components/ui/command.js.map +1 -1
- package/dist/components/ui/context-menu.js.map +1 -1
- package/dist/components/ui/counting-number.js.map +1 -1
- package/dist/components/ui/dialog.js.map +1 -1
- package/dist/components/ui/dot-background.js.map +1 -1
- package/dist/components/ui/drawer.js.map +1 -1
- package/dist/components/ui/dropdown-menu.js.map +1 -1
- package/dist/components/ui/dropdrawer.js.map +1 -1
- package/dist/components/ui/empty.js.map +1 -1
- package/dist/components/ui/field.js +2 -2
- package/dist/components/ui/field.js.map +1 -1
- package/dist/components/ui/fireworks-background.js.map +1 -1
- package/dist/components/ui/flip-button.js.map +1 -1
- package/dist/components/ui/form.d.ts.map +1 -1
- package/dist/components/ui/form.js +5 -4
- package/dist/components/ui/form.js.map +1 -1
- package/dist/components/ui/gradient-background.js.map +1 -1
- package/dist/components/ui/gradient-text.js.map +1 -1
- package/dist/components/ui/highlight-text.js.map +1 -1
- package/dist/components/ui/hole-background.js.map +1 -1
- package/dist/components/ui/hover-card.js.map +1 -1
- package/dist/components/ui/input-group.d.ts.map +1 -1
- package/dist/components/ui/input-group.js.map +1 -1
- package/dist/components/ui/input-otp.d.ts.map +1 -1
- package/dist/components/ui/input-otp.js +1 -1
- package/dist/components/ui/input-otp.js.map +1 -1
- package/dist/components/ui/input.js.map +1 -1
- package/dist/components/ui/item.js.map +1 -1
- package/dist/components/ui/kbd.js.map +1 -1
- package/dist/components/ui/label.js.map +1 -1
- package/dist/components/ui/menubar.js.map +1 -1
- package/dist/components/ui/navigation-menu.d.ts.map +1 -1
- package/dist/components/ui/navigation-menu.js +0 -1
- package/dist/components/ui/navigation-menu.js.map +1 -1
- package/dist/components/ui/pagination.d.ts.map +1 -1
- package/dist/components/ui/pagination.js.map +1 -1
- package/dist/components/ui/popover.js.map +1 -1
- package/dist/components/ui/progress.js.map +1 -1
- package/dist/components/ui/radio-group.js.map +1 -1
- package/dist/components/ui/resizable.d.ts +3 -2
- package/dist/components/ui/resizable.d.ts.map +1 -1
- package/dist/components/ui/resizable.js +2 -1
- package/dist/components/ui/resizable.js.map +1 -1
- package/dist/components/ui/ripple-button.js.map +1 -1
- package/dist/components/ui/scratcher.js.map +1 -1
- package/dist/components/ui/scroll-area.js.map +1 -1
- package/dist/components/ui/select.js.map +1 -1
- package/dist/components/ui/separator.js.map +1 -1
- package/dist/components/ui/sheet.js.map +1 -1
- package/dist/components/ui/sidebar.d.ts.map +1 -1
- package/dist/components/ui/sidebar.js +3 -2
- package/dist/components/ui/sidebar.js.map +1 -1
- package/dist/components/ui/skeleton.js.map +1 -1
- package/dist/components/ui/slider.d.ts.map +1 -1
- package/dist/components/ui/slider.js.map +1 -1
- package/dist/components/ui/sonner.js.map +1 -1
- package/dist/components/ui/spinner.js.map +1 -1
- package/dist/components/ui/switch.js.map +1 -1
- package/dist/components/ui/table.d.ts.map +1 -1
- package/dist/components/ui/table.js.map +1 -1
- package/dist/components/ui/tabs.js.map +1 -1
- package/dist/components/ui/textarea.js.map +1 -1
- package/dist/components/ui/toggle-group.js.map +1 -1
- package/dist/components/ui/toggle.js.map +1 -1
- package/dist/components/ui/tooltip.js.map +1 -1
- package/dist/components/ui/typewriter.js +6 -2
- package/dist/components/ui/typewriter.js.map +1 -1
- package/dist/hooks/useIsMobile.js.map +1 -1
- package/dist/hooks/useWindowSize.js.map +1 -1
- package/dist/index.css +25 -1779
- package/dist/index.css.map +1 -1
- package/dist/lib/utilities.js.map +1 -1
- package/package.json +2 -15
- package/src/components/ui/accordion.tsx +3 -3
- package/src/components/ui/alert-dialog.tsx +6 -6
- package/src/components/ui/alert.tsx +1 -0
- package/src/components/ui/avatar.tsx +12 -11
- package/src/components/ui/calendar.tsx +2 -0
- package/src/components/ui/carousel.tsx +1 -1
- package/src/components/ui/chart.tsx +2 -0
- package/src/components/ui/checkbox.tsx +3 -3
- package/src/components/ui/command.tsx +8 -7
- package/src/components/ui/context-menu.tsx +8 -8
- package/src/components/ui/dialog.tsx +4 -4
- package/src/components/ui/drawer.tsx +4 -4
- package/src/components/ui/dropdown-menu.tsx +8 -8
- package/src/components/ui/field.tsx +5 -4
- package/src/components/ui/form.tsx +12 -8
- package/src/components/ui/hover-card.tsx +1 -1
- package/src/components/ui/input-group.tsx +2 -0
- package/src/components/ui/input-otp.tsx +5 -5
- package/src/components/ui/label.tsx +1 -1
- package/src/components/ui/menubar.tsx +10 -10
- package/src/components/ui/navigation-menu.tsx +6 -7
- package/src/components/ui/pagination.tsx +1 -0
- package/src/components/ui/popover.tsx +1 -1
- package/src/components/ui/progress.tsx +1 -1
- package/src/components/ui/radio-group.tsx +2 -2
- package/src/components/ui/resizable.tsx +2 -1
- package/src/components/ui/scroll-area.tsx +2 -2
- package/src/components/ui/select.tsx +7 -7
- package/src/components/ui/separator.tsx +1 -1
- package/src/components/ui/sheet.tsx +4 -4
- package/src/components/ui/sidebar.tsx +22 -14
- package/src/components/ui/slider.tsx +14 -13
- package/src/components/ui/switch.tsx +1 -1
- package/src/components/ui/table.tsx +2 -0
- package/src/components/ui/tabs.tsx +3 -3
- package/src/components/ui/toggle-group.tsx +2 -2
- package/src/components/ui/toggle.tsx +1 -1
- package/src/components/ui/tooltip.tsx +1 -1
- package/src/components/ui/typewriter.tsx +2 -2
- package/src/index.css +6 -6
- package/dist/components/ui/field.d.ts +0 -25
- package/dist/components/ui/field.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lib
|
|
1
|
+
{"version":3,"file":"lib/utilities.js","sources":["../../src/lib/utilities.ts"],"sourcesContent":["import {clsx, type ClassValue} from \"clsx\";\r\nimport {twMerge} from \"tailwind-merge\";\r\n\r\n/**\r\n * Helper function that merges tailwindcss\r\n * class names in the given input array.\r\n * @param inputs Array of class names\r\n * @returns Merged class names\r\n */\r\nexport function cn(...inputs: ReadonlyArray<ClassValue>): Readonly<string> {\r\n return twMerge(clsx(inputs));\r\n}\r\n"],"names":["cn","inputs","twMerge","clsx"],"mappings":";;AASO,SAASA,GAAG,GAAGC,MAAiC;IACrD,OAAOC,QAAQC,KAAKF;AACtB"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arolariu/components",
|
|
3
3
|
"displayName": "@arolariu/components",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.4.0",
|
|
5
5
|
"description": "🎨 70+ beautiful, accessible React components built on Radix UI. TypeScript-first, tree-shakeable, SSR-ready. Perfect for modern web apps, design systems & rapid prototyping. Zero config, maximum flexibility! ⚡",
|
|
6
6
|
"homepage": "https://arolariu.ro",
|
|
7
7
|
"repository": {
|
|
@@ -81,9 +81,7 @@
|
|
|
81
81
|
"build:before": "node scripts/beforeBuild.ts",
|
|
82
82
|
"build:after": "node scripts/afterBuild.ts",
|
|
83
83
|
"build:clean": "rimraf dist",
|
|
84
|
-
"build:exports": "node scripts/generate-exports.ts"
|
|
85
|
-
"build:storybook": "storybook build",
|
|
86
|
-
"storybook": "storybook dev -p 6006"
|
|
84
|
+
"build:exports": "node scripts/generate-exports.ts"
|
|
87
85
|
},
|
|
88
86
|
"dependencies": {
|
|
89
87
|
"@hookform/resolvers": "*",
|
|
@@ -143,13 +141,6 @@
|
|
|
143
141
|
"@rsbuild/core": "*",
|
|
144
142
|
"@rsbuild/plugin-react": "*",
|
|
145
143
|
"@rslib/core": "*",
|
|
146
|
-
"@storybook/addon-a11y": "*",
|
|
147
|
-
"@storybook/addon-docs": "*",
|
|
148
|
-
"@storybook/addon-essentials": "*",
|
|
149
|
-
"@storybook/addon-interactions": "*",
|
|
150
|
-
"@storybook/addon-links": "*",
|
|
151
|
-
"@storybook/addon-storysource": "*",
|
|
152
|
-
"@storybook/addon-themes": "*",
|
|
153
144
|
"@tailwindcss/postcss": "*",
|
|
154
145
|
"@types/node": "*",
|
|
155
146
|
"@types/react": "*",
|
|
@@ -160,10 +151,6 @@
|
|
|
160
151
|
"react": "*",
|
|
161
152
|
"react-dom": "*",
|
|
162
153
|
"rimraf": "*",
|
|
163
|
-
"storybook": "*",
|
|
164
|
-
"storybook-addon-rslib": "*",
|
|
165
|
-
"storybook-builder-rsbuild": "*",
|
|
166
|
-
"storybook-react-rsbuild": "*",
|
|
167
154
|
"tailwindcss": "*",
|
|
168
155
|
"typescript": "*"
|
|
169
156
|
},
|
|
@@ -9,7 +9,7 @@ import {cn} from "@/lib/utilities";
|
|
|
9
9
|
const Accordion = AccordionPrimitive.Root;
|
|
10
10
|
|
|
11
11
|
const AccordionItem = React.forwardRef<
|
|
12
|
-
React.
|
|
12
|
+
React.ComponentRef<typeof AccordionPrimitive.Item>,
|
|
13
13
|
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>
|
|
14
14
|
>(({className, ...props}, ref) => (
|
|
15
15
|
<AccordionPrimitive.Item
|
|
@@ -21,7 +21,7 @@ const AccordionItem = React.forwardRef<
|
|
|
21
21
|
AccordionItem.displayName = "AccordionItem";
|
|
22
22
|
|
|
23
23
|
const AccordionTrigger = React.forwardRef<
|
|
24
|
-
React.
|
|
24
|
+
React.ComponentRef<typeof AccordionPrimitive.Trigger>,
|
|
25
25
|
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>
|
|
26
26
|
>(({className, children, ...props}, ref) => (
|
|
27
27
|
<AccordionPrimitive.Header className='flex'>
|
|
@@ -40,7 +40,7 @@ const AccordionTrigger = React.forwardRef<
|
|
|
40
40
|
AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
|
|
41
41
|
|
|
42
42
|
const AccordionContent = React.forwardRef<
|
|
43
|
-
React.
|
|
43
|
+
React.ComponentRef<typeof AccordionPrimitive.Content>,
|
|
44
44
|
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>
|
|
45
45
|
>(({className, children, ...props}, ref) => (
|
|
46
46
|
<AccordionPrimitive.Content
|
|
@@ -13,7 +13,7 @@ const AlertDialogTrigger = AlertDialogPrimitive.Trigger;
|
|
|
13
13
|
const AlertDialogPortal = AlertDialogPrimitive.Portal;
|
|
14
14
|
|
|
15
15
|
const AlertDialogOverlay = React.forwardRef<
|
|
16
|
-
React.
|
|
16
|
+
React.ComponentRef<typeof AlertDialogPrimitive.Overlay>,
|
|
17
17
|
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay>
|
|
18
18
|
>(({className, ...props}, ref) => (
|
|
19
19
|
<AlertDialogPrimitive.Overlay
|
|
@@ -28,7 +28,7 @@ const AlertDialogOverlay = React.forwardRef<
|
|
|
28
28
|
AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
|
|
29
29
|
|
|
30
30
|
const AlertDialogContent = React.forwardRef<
|
|
31
|
-
React.
|
|
31
|
+
React.ComponentRef<typeof AlertDialogPrimitive.Content>,
|
|
32
32
|
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content>
|
|
33
33
|
>(({className, ...props}, ref) => (
|
|
34
34
|
<AlertDialogPortal>
|
|
@@ -62,7 +62,7 @@ const AlertDialogFooter = ({className, ...props}: React.HTMLAttributes<HTMLDivEl
|
|
|
62
62
|
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
63
63
|
|
|
64
64
|
const AlertDialogTitle = React.forwardRef<
|
|
65
|
-
React.
|
|
65
|
+
React.ComponentRef<typeof AlertDialogPrimitive.Title>,
|
|
66
66
|
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title>
|
|
67
67
|
>(({className, ...props}, ref) => (
|
|
68
68
|
<AlertDialogPrimitive.Title
|
|
@@ -74,7 +74,7 @@ const AlertDialogTitle = React.forwardRef<
|
|
|
74
74
|
AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
|
|
75
75
|
|
|
76
76
|
const AlertDialogDescription = React.forwardRef<
|
|
77
|
-
React.
|
|
77
|
+
React.ComponentRef<typeof AlertDialogPrimitive.Description>,
|
|
78
78
|
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Description>
|
|
79
79
|
>(({className, ...props}, ref) => (
|
|
80
80
|
<AlertDialogPrimitive.Description
|
|
@@ -86,7 +86,7 @@ const AlertDialogDescription = React.forwardRef<
|
|
|
86
86
|
AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
|
|
87
87
|
|
|
88
88
|
const AlertDialogAction = React.forwardRef<
|
|
89
|
-
React.
|
|
89
|
+
React.ComponentRef<typeof AlertDialogPrimitive.Action>,
|
|
90
90
|
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action>
|
|
91
91
|
>(({className, ...props}, ref) => (
|
|
92
92
|
<AlertDialogPrimitive.Action
|
|
@@ -98,7 +98,7 @@ const AlertDialogAction = React.forwardRef<
|
|
|
98
98
|
AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
|
|
99
99
|
|
|
100
100
|
const AlertDialogCancel = React.forwardRef<
|
|
101
|
-
React.
|
|
101
|
+
React.ComponentRef<typeof AlertDialogPrimitive.Cancel>,
|
|
102
102
|
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Cancel>
|
|
103
103
|
>(({className, ...props}, ref) => (
|
|
104
104
|
<AlertDialogPrimitive.Cancel
|
|
@@ -34,6 +34,7 @@ const Alert = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivEleme
|
|
|
34
34
|
Alert.displayName = "Alert";
|
|
35
35
|
|
|
36
36
|
const AlertTitle = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLHeadingElement>>(({className, ...props}, ref) => (
|
|
37
|
+
// eslint-disable-next-line jsx-a11y/heading-has-content -- this will be filled with children.
|
|
37
38
|
<h5
|
|
38
39
|
ref={ref}
|
|
39
40
|
className={cn("mb-1 leading-none font-medium tracking-tight", className)}
|
|
@@ -5,19 +5,20 @@ import * as React from "react";
|
|
|
5
5
|
|
|
6
6
|
import {cn} from "@/lib/utilities";
|
|
7
7
|
|
|
8
|
-
const Avatar = React.forwardRef<
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
const Avatar = React.forwardRef<
|
|
9
|
+
React.ComponentRef<typeof AvatarPrimitive.Root>,
|
|
10
|
+
React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>
|
|
11
|
+
>(({className, ...props}, ref) => (
|
|
12
|
+
<AvatarPrimitive.Root
|
|
13
|
+
ref={ref}
|
|
14
|
+
className={cn("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full", className)}
|
|
15
|
+
{...props}
|
|
16
|
+
/>
|
|
17
|
+
));
|
|
17
18
|
Avatar.displayName = AvatarPrimitive.Root.displayName;
|
|
18
19
|
|
|
19
20
|
const AvatarImage = React.forwardRef<
|
|
20
|
-
React.
|
|
21
|
+
React.ComponentRef<typeof AvatarPrimitive.Image>,
|
|
21
22
|
React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image>
|
|
22
23
|
>(({className, ...props}, ref) => (
|
|
23
24
|
<AvatarPrimitive.Image
|
|
@@ -29,7 +30,7 @@ const AvatarImage = React.forwardRef<
|
|
|
29
30
|
AvatarImage.displayName = AvatarPrimitive.Image.displayName;
|
|
30
31
|
|
|
31
32
|
const AvatarFallback = React.forwardRef<
|
|
32
|
-
React.
|
|
33
|
+
React.ComponentRef<typeof AvatarPrimitive.Fallback>,
|
|
33
34
|
React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>
|
|
34
35
|
>(({className, ...props}, ref) => (
|
|
35
36
|
<AvatarPrimitive.Fallback
|
|
@@ -108,7 +108,7 @@ const Carousel = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivEl
|
|
|
108
108
|
<CarouselContext.Provider
|
|
109
109
|
value={{
|
|
110
110
|
carouselRef,
|
|
111
|
-
api
|
|
111
|
+
api,
|
|
112
112
|
opts,
|
|
113
113
|
orientation: orientation || (opts?.axis === "y" ? "vertical" : "horizontal"),
|
|
114
114
|
scrollPrev,
|
|
@@ -7,17 +7,17 @@ import * as React from "react";
|
|
|
7
7
|
import {cn} from "@/lib/utilities";
|
|
8
8
|
|
|
9
9
|
const Checkbox = React.forwardRef<
|
|
10
|
-
React.
|
|
10
|
+
React.ComponentRef<typeof CheckboxPrimitive.Root>,
|
|
11
11
|
React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>
|
|
12
12
|
>(({className, ...props}, ref) => (
|
|
13
13
|
<CheckboxPrimitive.Root
|
|
14
14
|
ref={ref}
|
|
15
15
|
className={cn(
|
|
16
|
-
"peer h-4 w-4 shrink-0 rounded-sm border border-neutral-200 border-neutral-900 shadow focus-visible:ring-1 focus-visible:ring-neutral-950 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-neutral-900 data-[state=checked]:text-neutral-50 dark:border-neutral-50 dark:border-neutral-800 dark:focus-visible:ring-neutral-300 dark:data-[state=checked]:bg-neutral-50 dark:data-[state=checked]:text-neutral-900",
|
|
16
|
+
"peer grid h-4 w-4 shrink-0 place-content-center rounded-sm border border-neutral-200 border-neutral-900 shadow focus-visible:ring-1 focus-visible:ring-neutral-950 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-neutral-900 data-[state=checked]:text-neutral-50 dark:border-neutral-50 dark:border-neutral-800 dark:focus-visible:ring-neutral-300 dark:data-[state=checked]:bg-neutral-50 dark:data-[state=checked]:text-neutral-900",
|
|
17
17
|
className,
|
|
18
18
|
)}
|
|
19
19
|
{...props}>
|
|
20
|
-
<CheckboxPrimitive.Indicator className={cn("
|
|
20
|
+
<CheckboxPrimitive.Indicator className={cn("grid place-content-center text-current")}>
|
|
21
21
|
<Check className='h-4 w-4' />
|
|
22
22
|
</CheckboxPrimitive.Indicator>
|
|
23
23
|
</CheckboxPrimitive.Root>
|
|
@@ -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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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
|
|
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,11 +137,11 @@ function FieldSeparator({
|
|
|
137
137
|
return (
|
|
138
138
|
<div
|
|
139
139
|
data-slot='field-separator'
|
|
140
|
-
data-content={
|
|
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' />
|
|
144
|
-
{children && (
|
|
144
|
+
{Boolean(children) && (
|
|
145
145
|
<span
|
|
146
146
|
className='relative mx-auto block w-fit bg-white px-2 text-neutral-500 dark:bg-neutral-950 dark:text-neutral-400'
|
|
147
147
|
data-slot='field-separator-content'>
|
|
@@ -160,7 +160,8 @@ function FieldError({
|
|
|
160
160
|
}: React.ComponentProps<"div"> & {
|
|
161
161
|
errors?: Array<{message?: string} | undefined>;
|
|
162
162
|
}) {
|
|
163
|
-
|
|
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
|
}
|
|
@@ -17,7 +17,7 @@ type FormFieldContextValue<
|
|
|
17
17
|
name: TName;
|
|
18
18
|
};
|
|
19
19
|
|
|
20
|
-
const FormFieldContext = React.createContext<FormFieldContextValue>(
|
|
20
|
+
const FormFieldContext = React.createContext<FormFieldContextValue | null>(null);
|
|
21
21
|
|
|
22
22
|
const FormField = <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({
|
|
23
23
|
...props
|
|
@@ -34,12 +34,16 @@ const useFormField = () => {
|
|
|
34
34
|
const itemContext = React.useContext(FormItemContext);
|
|
35
35
|
const {getFieldState, formState} = useFormContext();
|
|
36
36
|
|
|
37
|
-
const fieldState = getFieldState(fieldContext.name, formState);
|
|
38
|
-
|
|
39
37
|
if (!fieldContext) {
|
|
40
38
|
throw new Error("useFormField should be used within <FormField>");
|
|
41
39
|
}
|
|
42
40
|
|
|
41
|
+
if (!itemContext) {
|
|
42
|
+
throw new Error("useFormField should be used within <FormItem>");
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const fieldState = getFieldState(fieldContext.name, formState);
|
|
46
|
+
|
|
43
47
|
const {id} = itemContext;
|
|
44
48
|
|
|
45
49
|
return {
|
|
@@ -56,7 +60,7 @@ type FormItemContextValue = {
|
|
|
56
60
|
id: string;
|
|
57
61
|
};
|
|
58
62
|
|
|
59
|
-
const FormItemContext = React.createContext<FormItemContextValue>(
|
|
63
|
+
const FormItemContext = React.createContext<FormItemContextValue | null>(null);
|
|
60
64
|
|
|
61
65
|
const FormItem = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(({className, ...props}, ref) => {
|
|
62
66
|
const id = React.useId();
|
|
@@ -74,7 +78,7 @@ const FormItem = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivEl
|
|
|
74
78
|
FormItem.displayName = "FormItem";
|
|
75
79
|
|
|
76
80
|
const FormLabel = React.forwardRef<
|
|
77
|
-
React.
|
|
81
|
+
React.ComponentRef<typeof LabelPrimitive.Root>,
|
|
78
82
|
React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>
|
|
79
83
|
>(({className, ...props}, ref) => {
|
|
80
84
|
const {error, formItemId} = useFormField();
|
|
@@ -90,15 +94,15 @@ const FormLabel = React.forwardRef<
|
|
|
90
94
|
});
|
|
91
95
|
FormLabel.displayName = "FormLabel";
|
|
92
96
|
|
|
93
|
-
const FormControl = React.forwardRef<React.
|
|
97
|
+
const FormControl = React.forwardRef<React.ComponentRef<typeof Slot>, React.ComponentPropsWithoutRef<typeof Slot>>(({...props}, ref) => {
|
|
94
98
|
const {error, formItemId, formDescriptionId, formMessageId} = useFormField();
|
|
95
99
|
|
|
96
100
|
return (
|
|
97
101
|
<Slot
|
|
98
102
|
ref={ref}
|
|
99
103
|
id={formItemId}
|
|
100
|
-
aria-describedby={
|
|
101
|
-
aria-invalid={
|
|
104
|
+
aria-describedby={error ? `${formDescriptionId} ${formMessageId}` : `${formDescriptionId}`}
|
|
105
|
+
aria-invalid={Boolean(error)}
|
|
102
106
|
{...props}
|
|
103
107
|
/>
|
|
104
108
|
);
|
|
@@ -10,7 +10,7 @@ const HoverCard = HoverCardPrimitive.Root;
|
|
|
10
10
|
const HoverCardTrigger = HoverCardPrimitive.Trigger;
|
|
11
11
|
|
|
12
12
|
const HoverCardContent = React.forwardRef<
|
|
13
|
-
React.
|
|
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
|