@playfast/reform-better-hub-ui-primitives 0.2.2 → 0.3.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.
@@ -1,82 +1,80 @@
1
- import type * as React from "react";
2
- import type { ComponentProps } from "react";
3
- import { Popover as PopoverPrimitive } from "radix-ui";
1
+ import type * as React from 'react'
2
+ import type { ComponentProps } from 'react'
3
+ import { Popover as PopoverPrimitive } from 'radix-ui'
4
4
 
5
- import { cn } from "../foundation/cn";
5
+ import { cn } from '../foundation/cn'
6
6
 
7
7
  function Popover({ ...props }: ComponentProps<typeof PopoverPrimitive.Root>): React.JSX.Element {
8
- return <PopoverPrimitive.Root data-slot="popover" {...props} />;
8
+ return <PopoverPrimitive.Root data-slot="popover" {...props} />
9
9
  }
10
10
 
11
- function PopoverTrigger({ ...props }: ComponentProps<typeof PopoverPrimitive.Trigger>): React.JSX.Element {
12
- return <PopoverPrimitive.Trigger data-slot="popover-trigger" {...props} />;
11
+ function PopoverTrigger({
12
+ ...props
13
+ }: ComponentProps<typeof PopoverPrimitive.Trigger>): React.JSX.Element {
14
+ return <PopoverPrimitive.Trigger data-slot="popover-trigger" {...props} />
13
15
  }
14
16
 
15
17
  function PopoverContent({
16
- className,
17
- align = "center",
18
- sideOffset = 4,
19
- ...props
18
+ className,
19
+ align = 'center',
20
+ sideOffset = 4,
21
+ ...props
20
22
  }: ComponentProps<typeof PopoverPrimitive.Content>): React.JSX.Element {
21
- return (
22
- <PopoverPrimitive.Portal>
23
- <PopoverPrimitive.Content
24
- data-slot="popover-content"
25
- align={align}
26
- sideOffset={sideOffset}
27
- className={cn(
28
- // NOTE: `--popover` is not defined in this design system (only --background/--card/…),
29
- // so `bg-popover` rendered transparent. Use the defined `bg-background`/`text-foreground`
30
- // (exactly what DropdownMenuContent uses) so a portaled popover is opaque.
31
- "z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border bg-background p-4 text-foreground shadow-md outline-hidden data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
32
- className,
33
- )}
34
- {...props}
35
- />
36
- </PopoverPrimitive.Portal>
37
- );
23
+ return (
24
+ <PopoverPrimitive.Portal>
25
+ <PopoverPrimitive.Content
26
+ data-slot="popover-content"
27
+ align={align}
28
+ sideOffset={sideOffset}
29
+ className={cn(
30
+ // NOTE: `--popover` is not defined in this design system (only --background/--card/…),
31
+ // so `bg-popover` rendered transparent. Use the defined `bg-background`/`text-foreground`
32
+ // (exactly what DropdownMenuContent uses) so a portaled popover is opaque.
33
+ 'z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border bg-background p-4 text-foreground shadow-md outline-hidden data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95',
34
+ className,
35
+ )}
36
+ {...props}
37
+ />
38
+ </PopoverPrimitive.Portal>
39
+ )
38
40
  }
39
41
 
40
- function PopoverAnchor({ ...props }: ComponentProps<typeof PopoverPrimitive.Anchor>): React.JSX.Element {
41
- return <PopoverPrimitive.Anchor data-slot="popover-anchor" {...props} />;
42
+ function PopoverAnchor({
43
+ ...props
44
+ }: ComponentProps<typeof PopoverPrimitive.Anchor>): React.JSX.Element {
45
+ return <PopoverPrimitive.Anchor data-slot="popover-anchor" {...props} />
42
46
  }
43
47
 
44
- function PopoverHeader({ className, ...props }: ComponentProps<"div">): React.JSX.Element {
45
- return (
46
- <div
47
- data-slot="popover-header"
48
- className={cn("flex flex-col gap-1 text-sm", className)}
49
- {...props}
50
- />
51
- );
48
+ function PopoverHeader({ className, ...props }: ComponentProps<'div'>): React.JSX.Element {
49
+ return (
50
+ <div
51
+ data-slot="popover-header"
52
+ className={cn('flex flex-col gap-1 text-sm', className)}
53
+ {...props}
54
+ />
55
+ )
52
56
  }
53
57
 
54
- function PopoverTitle({ className, ...props }: ComponentProps<"h2">): React.JSX.Element {
55
- return (
56
- <div
57
- data-slot="popover-title"
58
- className={cn("font-medium", className)}
59
- {...props}
60
- />
61
- );
58
+ function PopoverTitle({ className, ...props }: ComponentProps<'h2'>): React.JSX.Element {
59
+ return <div data-slot="popover-title" className={cn('font-medium', className)} {...props} />
62
60
  }
63
61
 
64
- function PopoverDescription({ className, ...props }: ComponentProps<"p">): React.JSX.Element {
65
- return (
66
- <p
67
- data-slot="popover-description"
68
- className={cn("text-muted-foreground", className)}
69
- {...props}
70
- />
71
- );
62
+ function PopoverDescription({ className, ...props }: ComponentProps<'p'>): React.JSX.Element {
63
+ return (
64
+ <p
65
+ data-slot="popover-description"
66
+ className={cn('text-muted-foreground', className)}
67
+ {...props}
68
+ />
69
+ )
72
70
  }
73
71
 
74
72
  export {
75
- Popover,
76
- PopoverTrigger,
77
- PopoverContent,
78
- PopoverAnchor,
79
- PopoverHeader,
80
- PopoverTitle,
81
- PopoverDescription,
82
- };
73
+ Popover,
74
+ PopoverTrigger,
75
+ PopoverContent,
76
+ PopoverAnchor,
77
+ PopoverHeader,
78
+ PopoverTitle,
79
+ PopoverDescription,
80
+ }
@@ -1,89 +1,87 @@
1
- import type * as React from "react";
2
- import { useCallback, useEffect, useState } from "react";
3
- import type { MouseEvent as ReactMouseEvent } from "react";
4
- import { cn } from "../foundation/cn";
1
+ import type * as React from 'react'
2
+ import { useCallback, useEffect, useState } from 'react'
3
+ import type { MouseEvent as ReactMouseEvent } from 'react'
4
+ import { cn } from '../foundation/cn'
5
5
 
6
6
  interface ResizeHandlePropsExternalApi {
7
- onResize: (clientPos: number) => void;
8
- onDragStart?: () => void;
9
- onDragEnd?: () => void;
10
- onDoubleClick?: () => void;
11
- axis?: "x" | "y";
12
- className?: string;
7
+ onResize: (clientPos: number) => void
8
+ onDragStart?: () => void
9
+ onDragEnd?: () => void
10
+ onDoubleClick?: () => void
11
+ axis?: 'x' | 'y'
12
+ className?: string
13
13
  }
14
14
 
15
15
  export function ResizeHandle({
16
- onResize,
17
- onDragStart,
18
- onDragEnd,
19
- onDoubleClick,
20
- axis = "x",
21
- className,
16
+ onResize,
17
+ onDragStart,
18
+ onDragEnd,
19
+ onDoubleClick,
20
+ axis = 'x',
21
+ className,
22
22
  }: ResizeHandlePropsExternalApi): React.JSX.Element {
23
- const [isDragging, setIsDragging] = useState(false);
24
- const vertical = axis === "y";
23
+ const [isDragging, setIsDragging] = useState(false)
24
+ const vertical = axis === 'y'
25
25
 
26
- const handleMouseDown = useCallback(
27
- (event: ReactMouseEvent) => {
28
- event.preventDefault();
29
- setIsDragging(true);
30
- onDragStart?.();
31
- },
32
- [onDragStart],
33
- );
26
+ const handleMouseDown = useCallback(
27
+ (event: ReactMouseEvent) => {
28
+ event.preventDefault()
29
+ setIsDragging(true)
30
+ onDragStart?.()
31
+ },
32
+ [onDragStart],
33
+ )
34
34
 
35
- useEffect(() => {
36
- if (!isDragging) {
37
- return;
38
- }
35
+ useEffect(() => {
36
+ if (!isDragging) {
37
+ return
38
+ }
39
39
 
40
- const handleMouseMove = (event: MouseEvent) => {
41
- onResize(vertical ? event.clientY : event.clientX);
42
- };
40
+ const handleMouseMove = (event: MouseEvent) => {
41
+ onResize(vertical ? event.clientY : event.clientX)
42
+ }
43
43
 
44
- const handleMouseUp = () => {
45
- setIsDragging(false);
46
- onDragEnd?.();
47
- };
44
+ const handleMouseUp = () => {
45
+ setIsDragging(false)
46
+ onDragEnd?.()
47
+ }
48
48
 
49
- document.addEventListener("mousemove", handleMouseMove);
50
- document.addEventListener("mouseup", handleMouseUp);
51
- document.body.style.userSelect = "none";
52
- document.body.style.cursor = vertical ? "row-resize" : "col-resize";
49
+ document.addEventListener('mousemove', handleMouseMove)
50
+ document.addEventListener('mouseup', handleMouseUp)
51
+ document.body.style.userSelect = 'none'
52
+ document.body.style.cursor = vertical ? 'row-resize' : 'col-resize'
53
53
 
54
- return () => {
55
- document.removeEventListener("mousemove", handleMouseMove);
56
- document.removeEventListener("mouseup", handleMouseUp);
57
- document.body.style.userSelect = "";
58
- document.body.style.cursor = "";
59
- };
60
- }, [isDragging, onResize, onDragEnd, vertical]);
54
+ return () => {
55
+ document.removeEventListener('mousemove', handleMouseMove)
56
+ document.removeEventListener('mouseup', handleMouseUp)
57
+ document.body.style.userSelect = ''
58
+ document.body.style.cursor = ''
59
+ }
60
+ }, [isDragging, onResize, onDragEnd, vertical])
61
61
 
62
- return (
63
- <div
64
- onMouseDown={handleMouseDown}
65
- onDoubleClick={onDoubleClick}
66
- className={cn(
67
- "relative shrink-0 group/resize z-10",
68
- vertical ? "h-0 cursor-row-resize" : "w-0 cursor-col-resize",
69
- className,
70
- )}
71
- >
72
- <div
73
- className={cn(
74
- "absolute",
75
- vertical ? "inset-x-0 -top-[5px] h-[11px]" : "inset-y-0 -left-[5px] w-[11px]",
76
- )}
77
- />
78
- <div
79
- className={cn(
80
- "absolute transition-all duration-150",
81
- vertical ? "inset-x-0 -top-px h-[2px]" : "inset-y-0 -left-px w-[2px]",
82
- isDragging
83
- ? "bg-foreground/25"
84
- : "bg-transparent group-hover/resize:bg-foreground/15",
85
- )}
86
- />
87
- </div>
88
- );
62
+ return (
63
+ <div
64
+ onMouseDown={handleMouseDown}
65
+ onDoubleClick={onDoubleClick}
66
+ className={cn(
67
+ 'relative shrink-0 group/resize z-10',
68
+ vertical ? 'h-0 cursor-row-resize' : 'w-0 cursor-col-resize',
69
+ className,
70
+ )}
71
+ >
72
+ <div
73
+ className={cn(
74
+ 'absolute',
75
+ vertical ? 'inset-x-0 -top-[5px] h-[11px]' : 'inset-y-0 -left-[5px] w-[11px]',
76
+ )}
77
+ />
78
+ <div
79
+ className={cn(
80
+ 'absolute transition-all duration-150',
81
+ vertical ? 'inset-x-0 -top-px h-[2px]' : 'inset-y-0 -left-px w-[2px]',
82
+ isDragging ? 'bg-foreground/25' : 'bg-transparent group-hover/resize:bg-foreground/15',
83
+ )}
84
+ />
85
+ </div>
86
+ )
89
87
  }
@@ -1,144 +1,152 @@
1
- import * as DialogPrimitive from "@radix-ui/react-dialog";
2
- import { XIcon } from "lucide-react";
3
- import type * as React from "react";
4
- import { cn } from "../foundation/cn";
1
+ import * as DialogPrimitive from '@radix-ui/react-dialog'
2
+ import { XIcon } from 'lucide-react'
3
+ import type * as React from 'react'
4
+ import { cn } from '../foundation/cn'
5
5
 
6
6
  function Sheet({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>): React.JSX.Element {
7
- return <DialogPrimitive.Root data-slot="sheet" {...props} />;
7
+ return <DialogPrimitive.Root data-slot="sheet" {...props} />
8
8
  }
9
9
 
10
- function SheetTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>): React.JSX.Element {
11
- return <DialogPrimitive.Trigger data-slot="sheet-trigger" {...props} />;
10
+ function SheetTrigger({
11
+ ...props
12
+ }: React.ComponentProps<typeof DialogPrimitive.Trigger>): React.JSX.Element {
13
+ return <DialogPrimitive.Trigger data-slot="sheet-trigger" {...props} />
12
14
  }
13
15
 
14
- function SheetPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>): React.JSX.Element {
15
- return <DialogPrimitive.Portal data-slot="sheet-portal" {...props} />;
16
+ function SheetPortal({
17
+ ...props
18
+ }: React.ComponentProps<typeof DialogPrimitive.Portal>): React.JSX.Element {
19
+ return <DialogPrimitive.Portal data-slot="sheet-portal" {...props} />
16
20
  }
17
21
 
18
- function SheetClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>): React.JSX.Element {
19
- return <DialogPrimitive.Close data-slot="sheet-close" {...props} />;
22
+ function SheetClose({
23
+ ...props
24
+ }: React.ComponentProps<typeof DialogPrimitive.Close>): React.JSX.Element {
25
+ return <DialogPrimitive.Close data-slot="sheet-close" {...props} />
20
26
  }
21
27
 
22
28
  function SheetOverlay({
23
- className,
24
- ...props
29
+ className,
30
+ ...props
25
31
  }: React.ComponentProps<typeof DialogPrimitive.Overlay>): React.JSX.Element {
26
- return (
27
- <DialogPrimitive.Overlay
28
- data-slot="sheet-overlay"
29
- className={cn(
30
- "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/25 dark:bg-black/70 backdrop-blur-[2px]",
31
- className,
32
- )}
33
- {...props}
34
- />
35
- );
32
+ return (
33
+ <DialogPrimitive.Overlay
34
+ data-slot="sheet-overlay"
35
+ className={cn(
36
+ 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/25 dark:bg-black/70 backdrop-blur-[2px]',
37
+ className,
38
+ )}
39
+ {...props}
40
+ />
41
+ )
36
42
  }
37
43
 
38
- interface SheetContentPropsExternalApi extends React.ComponentProps<typeof DialogPrimitive.Content> {
39
- side?: "left" | "right" | "top" | "bottom";
40
- showCloseButton?: boolean;
44
+ interface SheetContentPropsExternalApi extends React.ComponentProps<
45
+ typeof DialogPrimitive.Content
46
+ > {
47
+ side?: 'left' | 'right' | 'top' | 'bottom'
48
+ showCloseButton?: boolean
41
49
  }
42
50
 
43
51
  function SheetContent({
44
- className,
45
- children,
46
- side = "right",
47
- showCloseButton = true,
48
- ...props
52
+ className,
53
+ children,
54
+ side = 'right',
55
+ showCloseButton = true,
56
+ ...props
49
57
  }: SheetContentPropsExternalApi): React.JSX.Element {
50
- const sideStyles = {
51
- right: "inset-y-0 right-0 h-full w-3/4 sm:max-w-xl data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right",
52
- left: "inset-y-0 left-0 h-full w-3/4 sm:max-w-xl data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left",
53
- top: "inset-x-0 top-0 w-full data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
54
- bottom: "inset-x-0 bottom-0 w-full data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
55
- };
58
+ const sideStyles = {
59
+ right:
60
+ 'inset-y-0 right-0 h-full w-3/4 sm:max-w-xl data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right',
61
+ left: 'inset-y-0 left-0 h-full w-3/4 sm:max-w-xl data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left',
62
+ top: 'inset-x-0 top-0 w-full data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top',
63
+ bottom:
64
+ 'inset-x-0 bottom-0 w-full data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom',
65
+ }
56
66
 
57
- return (
58
- <SheetPortal>
59
- <SheetOverlay />
60
- <DialogPrimitive.Content
61
- data-slot="sheet-content"
62
- className={cn(
63
- "fixed z-50 flex flex-col bg-background border-l border-border shadow-lg duration-300",
64
- sideStyles[side],
65
- className,
66
- )}
67
- {...props}
68
- >
69
- <DialogPrimitive.Title className="hidden sr-only">
70
- {props.title}
71
- </DialogPrimitive.Title>
72
- {children}
73
- {showCloseButton && (
74
- <DialogPrimitive.Close className="absolute top-4 right-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary cursor-pointer">
75
- <XIcon className="h-4 w-4" />
76
- <span className="sr-only">Close</span>
77
- </DialogPrimitive.Close>
78
- )}
79
- </DialogPrimitive.Content>
80
- </SheetPortal>
81
- );
67
+ return (
68
+ <SheetPortal>
69
+ <SheetOverlay />
70
+ <DialogPrimitive.Content
71
+ data-slot="sheet-content"
72
+ className={cn(
73
+ 'fixed z-50 flex flex-col bg-background border-l border-border shadow-lg duration-300',
74
+ sideStyles[side],
75
+ className,
76
+ )}
77
+ {...props}
78
+ >
79
+ <DialogPrimitive.Title className="hidden sr-only">{props.title}</DialogPrimitive.Title>
80
+ {children}
81
+ {showCloseButton && (
82
+ <DialogPrimitive.Close className="absolute top-4 right-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary cursor-pointer">
83
+ <XIcon className="h-4 w-4" />
84
+ <span className="sr-only">Close</span>
85
+ </DialogPrimitive.Close>
86
+ )}
87
+ </DialogPrimitive.Content>
88
+ </SheetPortal>
89
+ )
82
90
  }
83
91
 
84
- function SheetHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element {
85
- return (
86
- <div
87
- data-slot="sheet-header"
88
- className={cn(
89
- "flex flex-col gap-2 px-6 py-4 border-b border-border",
90
- className,
91
- )}
92
- {...props}
93
- />
94
- );
92
+ function SheetHeader({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element {
93
+ return (
94
+ <div
95
+ data-slot="sheet-header"
96
+ className={cn('flex flex-col gap-2 px-6 py-4 border-b border-border', className)}
97
+ {...props}
98
+ />
99
+ )
95
100
  }
96
101
 
97
- function SheetFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element {
98
- return (
99
- <div
100
- data-slot="sheet-footer"
101
- className={cn(
102
- "flex flex-col-reverse gap-2 px-6 py-4 border-t border-border sm:flex-row sm:justify-end",
103
- className,
104
- )}
105
- {...props}
106
- />
107
- );
102
+ function SheetFooter({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element {
103
+ return (
104
+ <div
105
+ data-slot="sheet-footer"
106
+ className={cn(
107
+ 'flex flex-col-reverse gap-2 px-6 py-4 border-t border-border sm:flex-row sm:justify-end',
108
+ className,
109
+ )}
110
+ {...props}
111
+ />
112
+ )
108
113
  }
109
114
 
110
- function SheetTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>): React.JSX.Element {
111
- return (
112
- <DialogPrimitive.Title
113
- data-slot="sheet-title"
114
- className={cn("text-lg font-semibold text-foreground", className)}
115
- {...props}
116
- />
117
- );
115
+ function SheetTitle({
116
+ className,
117
+ ...props
118
+ }: React.ComponentProps<typeof DialogPrimitive.Title>): React.JSX.Element {
119
+ return (
120
+ <DialogPrimitive.Title
121
+ data-slot="sheet-title"
122
+ className={cn('text-lg font-semibold text-foreground', className)}
123
+ {...props}
124
+ />
125
+ )
118
126
  }
119
127
 
120
128
  function SheetDescription({
121
- className,
122
- ...props
129
+ className,
130
+ ...props
123
131
  }: React.ComponentProps<typeof DialogPrimitive.Description>): React.JSX.Element {
124
- return (
125
- <DialogPrimitive.Description
126
- data-slot="sheet-description"
127
- className={cn("text-sm text-muted-foreground", className)}
128
- {...props}
129
- />
130
- );
132
+ return (
133
+ <DialogPrimitive.Description
134
+ data-slot="sheet-description"
135
+ className={cn('text-sm text-muted-foreground', className)}
136
+ {...props}
137
+ />
138
+ )
131
139
  }
132
140
 
133
141
  export {
134
- Sheet,
135
- SheetClose,
136
- SheetContent,
137
- SheetDescription,
138
- SheetFooter,
139
- SheetHeader,
140
- SheetOverlay,
141
- SheetPortal,
142
- SheetTitle,
143
- SheetTrigger,
144
- };
142
+ Sheet,
143
+ SheetClose,
144
+ SheetContent,
145
+ SheetDescription,
146
+ SheetFooter,
147
+ SheetHeader,
148
+ SheetOverlay,
149
+ SheetPortal,
150
+ SheetTitle,
151
+ SheetTrigger,
152
+ }
@@ -1,19 +1,19 @@
1
- import type * as React from "react";
2
- import type { ComponentProps } from "react";
1
+ import type * as React from 'react'
2
+ import type { ComponentProps } from 'react'
3
3
 
4
- import { cn } from "../foundation/cn";
4
+ import { cn } from '../foundation/cn'
5
5
 
6
- function Textarea({ className, ...props }: ComponentProps<"textarea">): React.JSX.Element {
7
- return (
8
- <textarea
9
- data-slot="textarea"
10
- className={cn(
11
- "flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40",
12
- className,
13
- )}
14
- {...props}
15
- />
16
- );
6
+ function Textarea({ className, ...props }: ComponentProps<'textarea'>): React.JSX.Element {
7
+ return (
8
+ <textarea
9
+ data-slot="textarea"
10
+ className={cn(
11
+ 'flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40',
12
+ className,
13
+ )}
14
+ {...props}
15
+ />
16
+ )
17
17
  }
18
18
 
19
- export { Textarea };
19
+ export { Textarea }