@gv-tech/ui-web 2.6.0 → 2.9.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.
- package/README.md +19 -0
- package/package.json +10 -7
- package/src/accordion.tsx +4 -4
- package/src/alert-dialog.tsx +3 -3
- package/src/alert.tsx +1 -1
- package/src/avatar.tsx +1 -1
- package/src/breadcrumb.tsx +4 -4
- package/src/calendar.tsx +4 -2
- package/src/card.tsx +3 -3
- package/src/carousel.tsx +3 -3
- package/src/chart.tsx +5 -5
- package/src/checkbox.tsx +1 -1
- package/src/command.tsx +8 -8
- package/src/context-menu.tsx +9 -9
- package/src/dialog.tsx +5 -5
- package/src/drawer.tsx +4 -4
- package/src/dropdown-menu.tsx +7 -7
- package/src/form.tsx +2 -2
- package/src/hooks/use-toast.ts +3 -1
- package/src/hover-card.tsx +1 -1
- package/src/index.ts +1 -0
- package/src/input.tsx +1 -1
- package/src/menubar.tsx +10 -10
- package/src/navigation-menu.tsx +5 -5
- package/src/popover.tsx +1 -1
- package/src/progress.tsx +2 -2
- package/src/radio-group.tsx +2 -2
- package/src/resizable.tsx +2 -2
- package/src/scroll-area.tsx +2 -2
- package/src/search.tsx +2 -2
- package/src/select.tsx +4 -4
- package/src/separator.tsx +1 -1
- package/src/setupTests.ts +1 -1
- package/src/sheet.tsx +4 -4
- package/src/skeleton.tsx +1 -1
- package/src/slider.tsx +4 -4
- package/src/switch.tsx +2 -2
- package/src/table.tsx +4 -4
- package/src/tabs.tsx +3 -3
- package/src/textarea.tsx +1 -1
- package/src/theme-toggle.tsx +3 -3
- package/src/toast.tsx +3 -3
- package/src/tooltip.tsx +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# @gv-tech/ui-web
|
|
2
|
+
|
|
3
|
+
Web-based implementations of the GV Tech design system components, built on top of Radix UI and Tailwind CSS.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
yarn add @gv-tech/ui-web
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Features
|
|
12
|
+
|
|
13
|
+
- **Accessible**: Powered by Radix UI primitives for world-class accessibility (WAI-ARIA).
|
|
14
|
+
- **Responsive**: Mobile-friendly components that look great on all screen sizes.
|
|
15
|
+
- **Themable**: Full support for light and dark modes via `@gv-tech/design-tokens`.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
This is a sub-package of the [GV Tech Design System](https://github.com/Garcia-Ventures/gvtech-design).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gv-tech/ui-web",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.9.1",
|
|
4
4
|
"description": "Web (DOM/Radix) implementations of the GV Tech design system components",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -19,22 +19,24 @@
|
|
|
19
19
|
"default": "./src/*/index.ts"
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
|
-
"main": "
|
|
23
|
-
"
|
|
22
|
+
"main": "./dist/index.cjs.js",
|
|
23
|
+
"module": "./dist/index.es.js",
|
|
24
|
+
"types": "./dist/index.d.ts",
|
|
24
25
|
"files": [
|
|
26
|
+
"dist",
|
|
25
27
|
"src",
|
|
26
28
|
"!src/**/*.test.*",
|
|
27
29
|
"!src/**/*.spec.*"
|
|
28
30
|
],
|
|
29
31
|
"scripts": {
|
|
30
|
-
"build": "
|
|
32
|
+
"build": "vite build",
|
|
31
33
|
"lint": "echo 'Linted from workspace root'",
|
|
32
34
|
"test": "vitest run",
|
|
33
35
|
"typecheck": "npx tsc --noEmit"
|
|
34
36
|
},
|
|
35
37
|
"dependencies": {
|
|
36
|
-
"@gv-tech/design-tokens": "
|
|
37
|
-
"@gv-tech/ui-core": "
|
|
38
|
+
"@gv-tech/design-tokens": "workspace:*",
|
|
39
|
+
"@gv-tech/ui-core": "workspace:*",
|
|
38
40
|
"@hookform/resolvers": "^5.2.2",
|
|
39
41
|
"@radix-ui/react-accordion": "^1.2.12",
|
|
40
42
|
"@radix-ui/react-alert-dialog": "^1.1.15",
|
|
@@ -83,6 +85,7 @@
|
|
|
83
85
|
"react-dom": ">=18"
|
|
84
86
|
},
|
|
85
87
|
"publishConfig": {
|
|
86
|
-
"access": "public"
|
|
88
|
+
"access": "public",
|
|
89
|
+
"provenance": true
|
|
87
90
|
}
|
|
88
91
|
}
|
package/src/accordion.tsx
CHANGED
|
@@ -28,13 +28,13 @@ const AccordionTrigger = React.forwardRef<
|
|
|
28
28
|
<AccordionPrimitive.Trigger
|
|
29
29
|
ref={ref}
|
|
30
30
|
className={cn(
|
|
31
|
-
'flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline
|
|
31
|
+
'flex flex-1 items-center justify-between py-4 text-left text-sm font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180',
|
|
32
32
|
className,
|
|
33
33
|
)}
|
|
34
34
|
{...props}
|
|
35
35
|
>
|
|
36
36
|
{children}
|
|
37
|
-
<ChevronDown className="h-4 w-4 shrink-0
|
|
37
|
+
<ChevronDown className="text-muted-foreground h-4 w-4 shrink-0 transition-transform duration-200" />
|
|
38
38
|
</AccordionPrimitive.Trigger>
|
|
39
39
|
</AccordionPrimitive.Header>
|
|
40
40
|
));
|
|
@@ -46,10 +46,10 @@ const AccordionContent = React.forwardRef<
|
|
|
46
46
|
>(({ className, children, ...props }, ref) => (
|
|
47
47
|
<AccordionPrimitive.Content
|
|
48
48
|
ref={ref}
|
|
49
|
-
className="
|
|
49
|
+
className="data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm"
|
|
50
50
|
{...props}
|
|
51
51
|
>
|
|
52
|
-
<div className={cn('pb-4
|
|
52
|
+
<div className={cn('pt-0 pb-4', className)}>{children}</div>
|
|
53
53
|
</AccordionPrimitive.Content>
|
|
54
54
|
));
|
|
55
55
|
AccordionContent.displayName = AccordionPrimitive.Content.displayName;
|
package/src/alert-dialog.tsx
CHANGED
|
@@ -26,7 +26,7 @@ const AlertDialogOverlay = React.forwardRef<
|
|
|
26
26
|
>(({ className, ...props }, ref) => (
|
|
27
27
|
<AlertDialogPrimitive.Overlay
|
|
28
28
|
className={cn(
|
|
29
|
-
'
|
|
29
|
+
'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/80',
|
|
30
30
|
className,
|
|
31
31
|
)}
|
|
32
32
|
{...props}
|
|
@@ -44,7 +44,7 @@ const AlertDialogContent = React.forwardRef<
|
|
|
44
44
|
<AlertDialogPrimitive.Content
|
|
45
45
|
ref={ref}
|
|
46
46
|
className={cn(
|
|
47
|
-
'
|
|
47
|
+
'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-200 sm:rounded-lg',
|
|
48
48
|
className,
|
|
49
49
|
)}
|
|
50
50
|
{...props}
|
|
@@ -81,7 +81,7 @@ const AlertDialogDescription = React.forwardRef<
|
|
|
81
81
|
React.ElementRef<typeof AlertDialogPrimitive.Description>,
|
|
82
82
|
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Description> & AlertDialogDescriptionBaseProps
|
|
83
83
|
>(({ className, ...props }, ref) => (
|
|
84
|
-
<AlertDialogPrimitive.Description ref={ref} className={cn('text-
|
|
84
|
+
<AlertDialogPrimitive.Description ref={ref} className={cn('text-muted-foreground text-sm', className)} {...props} />
|
|
85
85
|
));
|
|
86
86
|
AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
|
|
87
87
|
|
package/src/alert.tsx
CHANGED
|
@@ -32,7 +32,7 @@ Alert.displayName = 'Alert';
|
|
|
32
32
|
|
|
33
33
|
const AlertTitle = React.forwardRef<HTMLHeadingElement, React.HTMLAttributes<HTMLHeadingElement> & AlertTitleBaseProps>(
|
|
34
34
|
({ className, ...props }, ref) => (
|
|
35
|
-
<h5 ref={ref} className={cn('mb-1 font-medium
|
|
35
|
+
<h5 ref={ref} className={cn('mb-1 leading-none font-medium tracking-tight', className)} {...props} />
|
|
36
36
|
),
|
|
37
37
|
);
|
|
38
38
|
AlertTitle.displayName = 'AlertTitle';
|
package/src/avatar.tsx
CHANGED
|
@@ -30,7 +30,7 @@ const AvatarFallback = React.forwardRef<
|
|
|
30
30
|
>(({ className, ...props }, ref) => (
|
|
31
31
|
<AvatarPrimitive.Fallback
|
|
32
32
|
ref={ref}
|
|
33
|
-
className={cn('flex h-full w-full items-center justify-center rounded-full
|
|
33
|
+
className={cn('bg-muted flex h-full w-full items-center justify-center rounded-full', className)}
|
|
34
34
|
{...props}
|
|
35
35
|
/>
|
|
36
36
|
));
|
package/src/breadcrumb.tsx
CHANGED
|
@@ -29,7 +29,7 @@ const BreadcrumbList = React.forwardRef<
|
|
|
29
29
|
<ol
|
|
30
30
|
ref={ref}
|
|
31
31
|
className={cn(
|
|
32
|
-
'flex flex-wrap items-center gap-1.5
|
|
32
|
+
'text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5',
|
|
33
33
|
className,
|
|
34
34
|
)}
|
|
35
35
|
{...props}
|
|
@@ -50,7 +50,7 @@ const BreadcrumbLink = React.forwardRef<
|
|
|
50
50
|
>(({ asChild, className, ...props }, ref) => {
|
|
51
51
|
const Comp = asChild ? Slot : 'a';
|
|
52
52
|
|
|
53
|
-
return <Comp ref={ref} className={cn('
|
|
53
|
+
return <Comp ref={ref} className={cn('hover:text-foreground transition-colors', className)} {...props} />;
|
|
54
54
|
});
|
|
55
55
|
BreadcrumbLink.displayName = 'BreadcrumbLink';
|
|
56
56
|
|
|
@@ -63,7 +63,7 @@ const BreadcrumbPage = React.forwardRef<
|
|
|
63
63
|
role="link"
|
|
64
64
|
aria-disabled="true"
|
|
65
65
|
aria-current="page"
|
|
66
|
-
className={cn('font-normal
|
|
66
|
+
className={cn('text-foreground font-normal', className)}
|
|
67
67
|
{...props}
|
|
68
68
|
/>
|
|
69
69
|
));
|
|
@@ -74,7 +74,7 @@ const BreadcrumbSeparator = ({
|
|
|
74
74
|
className,
|
|
75
75
|
...props
|
|
76
76
|
}: React.ComponentProps<'li'> & BreadcrumbSeparatorBaseProps) => (
|
|
77
|
-
<li role="presentation" aria-hidden="true" className={cn('[&>svg]:
|
|
77
|
+
<li role="presentation" aria-hidden="true" className={cn('[&>svg]:h-3.5 [&>svg]:w-3.5', className)} {...props}>
|
|
78
78
|
{children ?? <ChevronRight />}
|
|
79
79
|
</li>
|
|
80
80
|
);
|
package/src/calendar.tsx
CHANGED
|
@@ -134,7 +134,9 @@ function CalendarDayButton({ className, day, modifiers, ...props }: React.Compon
|
|
|
134
134
|
|
|
135
135
|
const ref = React.useRef<HTMLButtonElement>(null);
|
|
136
136
|
React.useEffect(() => {
|
|
137
|
-
if (modifiers.focused)
|
|
137
|
+
if (modifiers.focused) {
|
|
138
|
+
ref.current?.focus();
|
|
139
|
+
}
|
|
138
140
|
}, [modifiers.focused]);
|
|
139
141
|
|
|
140
142
|
return (
|
|
@@ -150,7 +152,7 @@ function CalendarDayButton({ className, day, modifiers, ...props }: React.Compon
|
|
|
150
152
|
data-range-end={modifiers.range_end}
|
|
151
153
|
data-range-middle={modifiers.range_middle}
|
|
152
154
|
className={cn(
|
|
153
|
-
'data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 flex aspect-square h-full w-full min-w-[--cell-size] items-center justify-center font-normal
|
|
155
|
+
'data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 flex aspect-square h-full w-full min-w-[--cell-size] items-center justify-center leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md [&>span]:text-xs [&>span]:opacity-70',
|
|
154
156
|
defaultClassNames.day,
|
|
155
157
|
className,
|
|
156
158
|
)}
|
package/src/card.tsx
CHANGED
|
@@ -6,7 +6,7 @@ import { cn } from './lib/utils';
|
|
|
6
6
|
export interface CardProps extends React.HTMLAttributes<HTMLDivElement>, CardBaseProps {}
|
|
7
7
|
|
|
8
8
|
const Card = React.forwardRef<HTMLDivElement, CardProps>(({ className, ...props }, ref) => (
|
|
9
|
-
<div ref={ref} className={cn('
|
|
9
|
+
<div ref={ref} className={cn('bg-card text-card-foreground rounded-xl border shadow', className)} {...props} />
|
|
10
10
|
));
|
|
11
11
|
Card.displayName = 'Card';
|
|
12
12
|
|
|
@@ -19,14 +19,14 @@ CardHeader.displayName = 'CardHeader';
|
|
|
19
19
|
|
|
20
20
|
const CardTitle = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
|
|
21
21
|
({ className, ...props }, ref) => (
|
|
22
|
-
<div ref={ref} className={cn('font-semibold
|
|
22
|
+
<div ref={ref} className={cn('leading-none font-semibold tracking-tight', className)} {...props} />
|
|
23
23
|
),
|
|
24
24
|
);
|
|
25
25
|
CardTitle.displayName = 'CardTitle';
|
|
26
26
|
|
|
27
27
|
const CardDescription = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
|
|
28
28
|
({ className, ...props }, ref) => (
|
|
29
|
-
<div ref={ref} className={cn('text-
|
|
29
|
+
<div ref={ref} className={cn('text-muted-foreground text-sm', className)} {...props} />
|
|
30
30
|
),
|
|
31
31
|
);
|
|
32
32
|
CardDescription.displayName = 'CardDescription';
|
package/src/carousel.tsx
CHANGED
|
@@ -185,9 +185,9 @@ const CarouselPrevious = React.forwardRef<
|
|
|
185
185
|
variant={variant}
|
|
186
186
|
size={size}
|
|
187
187
|
className={cn(
|
|
188
|
-
'absolute
|
|
188
|
+
'absolute h-8 w-8 rounded-full',
|
|
189
189
|
orientation === 'horizontal'
|
|
190
|
-
? '
|
|
190
|
+
? 'top-1/2 -left-12 -translate-y-1/2'
|
|
191
191
|
: '-top-12 left-1/2 -translate-x-1/2 rotate-90',
|
|
192
192
|
className,
|
|
193
193
|
)}
|
|
@@ -214,7 +214,7 @@ const CarouselNext = React.forwardRef<HTMLButtonElement, React.ComponentProps<ty
|
|
|
214
214
|
className={cn(
|
|
215
215
|
'absolute h-8 w-8 rounded-full',
|
|
216
216
|
orientation === 'horizontal'
|
|
217
|
-
? '
|
|
217
|
+
? 'top-1/2 -right-12 -translate-y-1/2'
|
|
218
218
|
: '-bottom-12 left-1/2 -translate-x-1/2 rotate-90',
|
|
219
219
|
className,
|
|
220
220
|
)}
|
package/src/chart.tsx
CHANGED
|
@@ -44,7 +44,7 @@ const ChartContainer = React.forwardRef<
|
|
|
44
44
|
data-chart={chartId}
|
|
45
45
|
ref={ref}
|
|
46
46
|
className={cn(
|
|
47
|
-
"
|
|
47
|
+
"[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border flex aspect-video justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-sector]:outline-none [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-none",
|
|
48
48
|
className,
|
|
49
49
|
)}
|
|
50
50
|
{...props}
|
|
@@ -146,7 +146,7 @@ const ChartTooltipContent = React.forwardRef<
|
|
|
146
146
|
<div
|
|
147
147
|
ref={ref}
|
|
148
148
|
className={cn(
|
|
149
|
-
'grid min-w-[8rem] items-start gap-1.5 rounded-lg border
|
|
149
|
+
'border-border/50 bg-background grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl',
|
|
150
150
|
className,
|
|
151
151
|
)}
|
|
152
152
|
>
|
|
@@ -163,7 +163,7 @@ const ChartTooltipContent = React.forwardRef<
|
|
|
163
163
|
<div
|
|
164
164
|
key={item.dataKey}
|
|
165
165
|
className={cn(
|
|
166
|
-
'flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5
|
|
166
|
+
'[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5',
|
|
167
167
|
indicator === 'dot' && 'items-center',
|
|
168
168
|
)}
|
|
169
169
|
>
|
|
@@ -202,7 +202,7 @@ const ChartTooltipContent = React.forwardRef<
|
|
|
202
202
|
<span className="text-muted-foreground">{itemConfig?.label || item.name}</span>
|
|
203
203
|
</div>
|
|
204
204
|
{item.value && (
|
|
205
|
-
<span className="font-mono font-medium tabular-nums
|
|
205
|
+
<span className="text-foreground font-mono font-medium tabular-nums">
|
|
206
206
|
{item.value.toLocaleString()}
|
|
207
207
|
</span>
|
|
208
208
|
)}
|
|
@@ -247,7 +247,7 @@ const ChartLegendContent = React.forwardRef<
|
|
|
247
247
|
return (
|
|
248
248
|
<div
|
|
249
249
|
key={item.value}
|
|
250
|
-
className={cn('flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3
|
|
250
|
+
className={cn('[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3')}
|
|
251
251
|
>
|
|
252
252
|
{itemConfig?.icon && !hideIcon ? (
|
|
253
253
|
<itemConfig.icon />
|
package/src/checkbox.tsx
CHANGED
|
@@ -15,7 +15,7 @@ const Checkbox = React.forwardRef<React.ElementRef<typeof CheckboxPrimitive.Root
|
|
|
15
15
|
<CheckboxPrimitive.Root
|
|
16
16
|
ref={ref}
|
|
17
17
|
className={cn(
|
|
18
|
-
'
|
|
18
|
+
'peer border-primary focus-visible:ring-ring data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground grid h-4 w-4 shrink-0 place-content-center rounded-sm border shadow focus-visible:ring-1 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50',
|
|
19
19
|
className,
|
|
20
20
|
)}
|
|
21
21
|
{...props}
|
package/src/command.tsx
CHANGED
|
@@ -25,7 +25,7 @@ const Command = React.forwardRef<
|
|
|
25
25
|
<CommandPrimitive
|
|
26
26
|
ref={ref}
|
|
27
27
|
className={cn(
|
|
28
|
-
'flex h-full w-full flex-col overflow-hidden rounded-md
|
|
28
|
+
'bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md',
|
|
29
29
|
className,
|
|
30
30
|
)}
|
|
31
31
|
{...props}
|
|
@@ -39,7 +39,7 @@ const CommandDialog = ({ children, ...props }: DialogProps) => {
|
|
|
39
39
|
<DialogContent className="overflow-hidden p-0">
|
|
40
40
|
<DialogTitle className="sr-only">Search</DialogTitle>
|
|
41
41
|
<DialogDescription className="sr-only">Search for documentation and components.</DialogDescription>
|
|
42
|
-
<Command className="[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group
|
|
42
|
+
<Command className="[&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5">
|
|
43
43
|
{children}
|
|
44
44
|
</Command>
|
|
45
45
|
</DialogContent>
|
|
@@ -56,7 +56,7 @@ const CommandInput = React.forwardRef<
|
|
|
56
56
|
<CommandPrimitive.Input
|
|
57
57
|
ref={ref}
|
|
58
58
|
className={cn(
|
|
59
|
-
'flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none
|
|
59
|
+
'placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50',
|
|
60
60
|
className,
|
|
61
61
|
)}
|
|
62
62
|
{...props}
|
|
@@ -72,7 +72,7 @@ const CommandList = React.forwardRef<
|
|
|
72
72
|
>(({ className, ...props }, ref) => (
|
|
73
73
|
<CommandPrimitive.List
|
|
74
74
|
ref={ref}
|
|
75
|
-
className={cn('max-h-[300px] overflow-
|
|
75
|
+
className={cn('max-h-[300px] overflow-x-hidden overflow-y-auto', className)}
|
|
76
76
|
{...props}
|
|
77
77
|
/>
|
|
78
78
|
));
|
|
@@ -93,7 +93,7 @@ const CommandGroup = React.forwardRef<
|
|
|
93
93
|
<CommandPrimitive.Group
|
|
94
94
|
ref={ref}
|
|
95
95
|
className={cn(
|
|
96
|
-
'overflow-hidden p-1
|
|
96
|
+
'text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium',
|
|
97
97
|
className,
|
|
98
98
|
)}
|
|
99
99
|
{...props}
|
|
@@ -106,7 +106,7 @@ const CommandSeparator = React.forwardRef<
|
|
|
106
106
|
React.ElementRef<typeof CommandPrimitive.Separator>,
|
|
107
107
|
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator> & CommandSeparatorBaseProps
|
|
108
108
|
>(({ className, ...props }, ref) => (
|
|
109
|
-
<CommandPrimitive.Separator ref={ref} className={cn('-mx-1 h-px
|
|
109
|
+
<CommandPrimitive.Separator ref={ref} className={cn('bg-border -mx-1 h-px', className)} {...props} />
|
|
110
110
|
));
|
|
111
111
|
CommandSeparator.displayName = CommandPrimitive.Separator.displayName;
|
|
112
112
|
|
|
@@ -117,7 +117,7 @@ const CommandItem = React.forwardRef<
|
|
|
117
117
|
<CommandPrimitive.Item
|
|
118
118
|
ref={ref}
|
|
119
119
|
className={cn(
|
|
120
|
-
'relative flex cursor-default gap-2
|
|
120
|
+
'data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',
|
|
121
121
|
className,
|
|
122
122
|
)}
|
|
123
123
|
{...props}
|
|
@@ -127,7 +127,7 @@ const CommandItem = React.forwardRef<
|
|
|
127
127
|
CommandItem.displayName = CommandPrimitive.Item.displayName;
|
|
128
128
|
|
|
129
129
|
const CommandShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement> & CommandShortcutBaseProps) => {
|
|
130
|
-
return <span className={cn('ml-auto text-xs tracking-widest
|
|
130
|
+
return <span className={cn('text-muted-foreground ml-auto text-xs tracking-widest', className)} {...props} />;
|
|
131
131
|
};
|
|
132
132
|
CommandShortcut.displayName = 'CommandShortcut';
|
|
133
133
|
|
package/src/context-menu.tsx
CHANGED
|
@@ -39,7 +39,7 @@ const ContextMenuSubTrigger = React.forwardRef<
|
|
|
39
39
|
<ContextMenuPrimitive.SubTrigger
|
|
40
40
|
ref={ref}
|
|
41
41
|
className={cn(
|
|
42
|
-
'
|
|
42
|
+
'focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none',
|
|
43
43
|
inset && 'pl-8',
|
|
44
44
|
className,
|
|
45
45
|
)}
|
|
@@ -58,7 +58,7 @@ const ContextMenuSubContent = React.forwardRef<
|
|
|
58
58
|
<ContextMenuPrimitive.SubContent
|
|
59
59
|
ref={ref}
|
|
60
60
|
className={cn(
|
|
61
|
-
'
|
|
61
|
+
'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-[--radix-context-menu-content-transform-origin] overflow-hidden rounded-md border p-1 shadow-lg',
|
|
62
62
|
className,
|
|
63
63
|
)}
|
|
64
64
|
{...props}
|
|
@@ -74,7 +74,7 @@ const ContextMenuContent = React.forwardRef<
|
|
|
74
74
|
<ContextMenuPrimitive.Content
|
|
75
75
|
ref={ref}
|
|
76
76
|
className={cn(
|
|
77
|
-
'
|
|
77
|
+
'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-[--radix-context-menu-content-available-height] min-w-[8rem] origin-[--radix-context-menu-content-transform-origin] overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md',
|
|
78
78
|
className,
|
|
79
79
|
)}
|
|
80
80
|
{...props}
|
|
@@ -90,7 +90,7 @@ const ContextMenuItem = React.forwardRef<
|
|
|
90
90
|
<ContextMenuPrimitive.Item
|
|
91
91
|
ref={ref}
|
|
92
92
|
className={cn(
|
|
93
|
-
'relative flex cursor-default
|
|
93
|
+
'focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
|
|
94
94
|
inset && 'pl-8',
|
|
95
95
|
className,
|
|
96
96
|
)}
|
|
@@ -106,7 +106,7 @@ const ContextMenuCheckboxItem = React.forwardRef<
|
|
|
106
106
|
<ContextMenuPrimitive.CheckboxItem
|
|
107
107
|
ref={ref}
|
|
108
108
|
className={cn(
|
|
109
|
-
'relative flex cursor-default
|
|
109
|
+
'focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
|
|
110
110
|
className,
|
|
111
111
|
)}
|
|
112
112
|
checked={checked}
|
|
@@ -129,7 +129,7 @@ const ContextMenuRadioItem = React.forwardRef<
|
|
|
129
129
|
<ContextMenuPrimitive.RadioItem
|
|
130
130
|
ref={ref}
|
|
131
131
|
className={cn(
|
|
132
|
-
'relative flex cursor-default
|
|
132
|
+
'focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
|
|
133
133
|
className,
|
|
134
134
|
)}
|
|
135
135
|
{...props}
|
|
@@ -150,7 +150,7 @@ const ContextMenuLabel = React.forwardRef<
|
|
|
150
150
|
>(({ className, inset, ...props }, ref) => (
|
|
151
151
|
<ContextMenuPrimitive.Label
|
|
152
152
|
ref={ref}
|
|
153
|
-
className={cn('px-2 py-1.5 text-sm font-semibold
|
|
153
|
+
className={cn('text-foreground px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className)}
|
|
154
154
|
{...props}
|
|
155
155
|
/>
|
|
156
156
|
));
|
|
@@ -160,7 +160,7 @@ const ContextMenuSeparator = React.forwardRef<
|
|
|
160
160
|
React.ElementRef<typeof ContextMenuPrimitive.Separator>,
|
|
161
161
|
React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Separator> & ContextMenuSeparatorBaseProps
|
|
162
162
|
>(({ className, ...props }, ref) => (
|
|
163
|
-
<ContextMenuPrimitive.Separator ref={ref} className={cn('-mx-1 my-1 h-px
|
|
163
|
+
<ContextMenuPrimitive.Separator ref={ref} className={cn('bg-border -mx-1 my-1 h-px', className)} {...props} />
|
|
164
164
|
));
|
|
165
165
|
ContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;
|
|
166
166
|
|
|
@@ -168,7 +168,7 @@ const ContextMenuShortcut = ({
|
|
|
168
168
|
className,
|
|
169
169
|
...props
|
|
170
170
|
}: React.HTMLAttributes<HTMLSpanElement> & ContextMenuShortcutBaseProps) => {
|
|
171
|
-
return <span className={cn('ml-auto text-xs tracking-widest
|
|
171
|
+
return <span className={cn('text-muted-foreground ml-auto text-xs tracking-widest', className)} {...props} />;
|
|
172
172
|
};
|
|
173
173
|
ContextMenuShortcut.displayName = 'ContextMenuShortcut';
|
|
174
174
|
|
package/src/dialog.tsx
CHANGED
|
@@ -19,7 +19,7 @@ const DialogOverlay = React.forwardRef<
|
|
|
19
19
|
<DialogPrimitive.Overlay
|
|
20
20
|
ref={ref}
|
|
21
21
|
className={cn(
|
|
22
|
-
'
|
|
22
|
+
'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/80',
|
|
23
23
|
className,
|
|
24
24
|
)}
|
|
25
25
|
{...props}
|
|
@@ -36,13 +36,13 @@ const DialogContent = React.forwardRef<
|
|
|
36
36
|
<DialogPrimitive.Content
|
|
37
37
|
ref={ref}
|
|
38
38
|
className={cn(
|
|
39
|
-
'
|
|
39
|
+
'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-200 sm:rounded-lg',
|
|
40
40
|
className,
|
|
41
41
|
)}
|
|
42
42
|
{...props}
|
|
43
43
|
>
|
|
44
44
|
{children}
|
|
45
|
-
<DialogPrimitive.Close className="absolute
|
|
45
|
+
<DialogPrimitive.Close className="ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none">
|
|
46
46
|
<X className="h-4 w-4" />
|
|
47
47
|
<span className="sr-only">Close</span>
|
|
48
48
|
</DialogPrimitive.Close>
|
|
@@ -67,7 +67,7 @@ const DialogTitle = React.forwardRef<
|
|
|
67
67
|
>(({ className, ...props }, ref) => (
|
|
68
68
|
<DialogPrimitive.Title
|
|
69
69
|
ref={ref}
|
|
70
|
-
className={cn('text-lg font-semibold
|
|
70
|
+
className={cn('text-lg leading-none font-semibold tracking-tight', className)}
|
|
71
71
|
{...props}
|
|
72
72
|
/>
|
|
73
73
|
));
|
|
@@ -77,7 +77,7 @@ const DialogDescription = React.forwardRef<
|
|
|
77
77
|
React.ElementRef<typeof DialogPrimitive.Description>,
|
|
78
78
|
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>
|
|
79
79
|
>(({ className, ...props }, ref) => (
|
|
80
|
-
<DialogPrimitive.Description ref={ref} className={cn('text-
|
|
80
|
+
<DialogPrimitive.Description ref={ref} className={cn('text-muted-foreground text-sm', className)} {...props} />
|
|
81
81
|
));
|
|
82
82
|
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
83
83
|
|
package/src/drawer.tsx
CHANGED
|
@@ -43,12 +43,12 @@ const DrawerContent = React.forwardRef<
|
|
|
43
43
|
<DrawerPrimitive.Content
|
|
44
44
|
ref={ref}
|
|
45
45
|
className={cn(
|
|
46
|
-
'fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border
|
|
46
|
+
'bg-background fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border',
|
|
47
47
|
className,
|
|
48
48
|
)}
|
|
49
49
|
{...props}
|
|
50
50
|
>
|
|
51
|
-
<div className="mx-auto mt-4 h-2 w-[100px] rounded-full
|
|
51
|
+
<div className="bg-muted mx-auto mt-4 h-2 w-[100px] rounded-full" />
|
|
52
52
|
{children}
|
|
53
53
|
</DrawerPrimitive.Content>
|
|
54
54
|
</DrawerPortal>
|
|
@@ -71,7 +71,7 @@ const DrawerTitle = React.forwardRef<
|
|
|
71
71
|
>(({ className, ...props }, ref) => (
|
|
72
72
|
<DrawerPrimitive.Title
|
|
73
73
|
ref={ref}
|
|
74
|
-
className={cn('text-lg font-semibold
|
|
74
|
+
className={cn('text-lg leading-none font-semibold tracking-tight', className)}
|
|
75
75
|
{...props}
|
|
76
76
|
/>
|
|
77
77
|
));
|
|
@@ -81,7 +81,7 @@ const DrawerDescription = React.forwardRef<
|
|
|
81
81
|
React.ElementRef<typeof DrawerPrimitive.Description>,
|
|
82
82
|
React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Description> & DrawerDescriptionBaseProps
|
|
83
83
|
>(({ className, ...props }, ref) => (
|
|
84
|
-
<DrawerPrimitive.Description ref={ref} className={cn('text-
|
|
84
|
+
<DrawerPrimitive.Description ref={ref} className={cn('text-muted-foreground text-sm', className)} {...props} />
|
|
85
85
|
));
|
|
86
86
|
DrawerDescription.displayName = DrawerPrimitive.Description.displayName;
|
|
87
87
|
|
package/src/dropdown-menu.tsx
CHANGED
|
@@ -41,7 +41,7 @@ const DropdownMenuSubTrigger = React.forwardRef<
|
|
|
41
41
|
<DropdownMenuPrimitive.SubTrigger
|
|
42
42
|
ref={ref}
|
|
43
43
|
className={cn(
|
|
44
|
-
'flex cursor-default
|
|
44
|
+
'focus:bg-accent data-[state=open]:bg-accent flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',
|
|
45
45
|
inset && 'pl-8',
|
|
46
46
|
className,
|
|
47
47
|
)}
|
|
@@ -60,7 +60,7 @@ const DropdownMenuSubContent = React.forwardRef<
|
|
|
60
60
|
<DropdownMenuPrimitive.SubContent
|
|
61
61
|
ref={ref}
|
|
62
62
|
className={cn(
|
|
63
|
-
'
|
|
63
|
+
'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-[--radix-dropdown-menu-content-transform-origin] overflow-hidden rounded-md border p-1 shadow-lg',
|
|
64
64
|
className,
|
|
65
65
|
)}
|
|
66
66
|
{...props}
|
|
@@ -77,7 +77,7 @@ const DropdownMenuContent = React.forwardRef<
|
|
|
77
77
|
ref={ref}
|
|
78
78
|
sideOffset={sideOffset}
|
|
79
79
|
className={cn(
|
|
80
|
-
'z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-
|
|
80
|
+
'bg-popover text-popover-foreground z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md',
|
|
81
81
|
'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]',
|
|
82
82
|
className,
|
|
83
83
|
)}
|
|
@@ -94,7 +94,7 @@ const DropdownMenuItem = React.forwardRef<
|
|
|
94
94
|
<DropdownMenuPrimitive.Item
|
|
95
95
|
ref={ref}
|
|
96
96
|
className={cn(
|
|
97
|
-
'relative flex cursor-default
|
|
97
|
+
'focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm transition-colors outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0',
|
|
98
98
|
inset && 'pl-8',
|
|
99
99
|
className,
|
|
100
100
|
)}
|
|
@@ -110,7 +110,7 @@ const DropdownMenuCheckboxItem = React.forwardRef<
|
|
|
110
110
|
<DropdownMenuPrimitive.CheckboxItem
|
|
111
111
|
ref={ref}
|
|
112
112
|
className={cn(
|
|
113
|
-
'relative flex cursor-default
|
|
113
|
+
'focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm transition-colors outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
|
|
114
114
|
className,
|
|
115
115
|
)}
|
|
116
116
|
checked={checked}
|
|
@@ -133,7 +133,7 @@ const DropdownMenuRadioItem = React.forwardRef<
|
|
|
133
133
|
<DropdownMenuPrimitive.RadioItem
|
|
134
134
|
ref={ref}
|
|
135
135
|
className={cn(
|
|
136
|
-
'relative flex cursor-default
|
|
136
|
+
'focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm transition-colors outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
|
|
137
137
|
className,
|
|
138
138
|
)}
|
|
139
139
|
{...props}
|
|
@@ -164,7 +164,7 @@ const DropdownMenuSeparator = React.forwardRef<
|
|
|
164
164
|
React.ElementRef<typeof DropdownMenuPrimitive.Separator>,
|
|
165
165
|
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator> & DropdownMenuSeparatorBaseProps
|
|
166
166
|
>(({ className, ...props }, ref) => (
|
|
167
|
-
<DropdownMenuPrimitive.Separator ref={ref} className={cn('-mx-1 my-1 h-px
|
|
167
|
+
<DropdownMenuPrimitive.Separator ref={ref} className={cn('bg-muted -mx-1 my-1 h-px', className)} {...props} />
|
|
168
168
|
));
|
|
169
169
|
DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
|
|
170
170
|
|
package/src/form.tsx
CHANGED
|
@@ -126,7 +126,7 @@ const FormDescription = React.forwardRef<
|
|
|
126
126
|
const { formDescriptionId } = useFormField();
|
|
127
127
|
|
|
128
128
|
return (
|
|
129
|
-
<p ref={ref} id={formDescriptionId} className={cn('text-[0.8rem]
|
|
129
|
+
<p ref={ref} id={formDescriptionId} className={cn('text-muted-foreground text-[0.8rem]', className)} {...props} />
|
|
130
130
|
);
|
|
131
131
|
});
|
|
132
132
|
FormDescription.displayName = 'FormDescription';
|
|
@@ -143,7 +143,7 @@ const FormMessage = React.forwardRef<
|
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
return (
|
|
146
|
-
<p ref={ref} id={formMessageId} className={cn('text-[0.8rem] font-medium
|
|
146
|
+
<p ref={ref} id={formMessageId} className={cn('text-destructive text-[0.8rem] font-medium', className)} {...props}>
|
|
147
147
|
{body}
|
|
148
148
|
</p>
|
|
149
149
|
);
|
package/src/hooks/use-toast.ts
CHANGED
package/src/hover-card.tsx
CHANGED
|
@@ -19,7 +19,7 @@ const HoverCardContent = React.forwardRef<
|
|
|
19
19
|
align={align}
|
|
20
20
|
sideOffset={sideOffset}
|
|
21
21
|
className={cn(
|
|
22
|
-
'
|
|
22
|
+
'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 origin-[--radix-hover-card-content-transform-origin] rounded-md border p-4 shadow-md outline-none',
|
|
23
23
|
className,
|
|
24
24
|
)}
|
|
25
25
|
{...props}
|
package/src/index.ts
CHANGED
package/src/input.tsx
CHANGED
|
@@ -10,7 +10,7 @@ const Input = React.forwardRef<HTMLInputElement, InputProps>(({ className, type,
|
|
|
10
10
|
<input
|
|
11
11
|
type={type}
|
|
12
12
|
className={cn(
|
|
13
|
-
'flex h-9 w-full rounded-md border
|
|
13
|
+
'border-input file:text-foreground placeholder:text-muted-foreground focus-visible:ring-ring flex h-9 w-full rounded-md border bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-1 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',
|
|
14
14
|
className,
|
|
15
15
|
)}
|
|
16
16
|
ref={ref}
|
package/src/menubar.tsx
CHANGED
|
@@ -47,7 +47,7 @@ const Menubar = React.forwardRef<
|
|
|
47
47
|
>(({ className, ...props }, ref) => (
|
|
48
48
|
<MenubarPrimitive.Root
|
|
49
49
|
ref={ref}
|
|
50
|
-
className={cn('flex h-9 items-center space-x-1 rounded-md border
|
|
50
|
+
className={cn('bg-background flex h-9 items-center space-x-1 rounded-md border p-1 shadow-sm', className)}
|
|
51
51
|
{...props}
|
|
52
52
|
/>
|
|
53
53
|
));
|
|
@@ -60,7 +60,7 @@ const MenubarTrigger = React.forwardRef<
|
|
|
60
60
|
<MenubarPrimitive.Trigger
|
|
61
61
|
ref={ref}
|
|
62
62
|
className={cn(
|
|
63
|
-
'
|
|
63
|
+
'focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-3 py-1 text-sm font-medium outline-none select-none',
|
|
64
64
|
className,
|
|
65
65
|
)}
|
|
66
66
|
{...props}
|
|
@@ -75,7 +75,7 @@ const MenubarSubTrigger = React.forwardRef<
|
|
|
75
75
|
<MenubarPrimitive.SubTrigger
|
|
76
76
|
ref={ref}
|
|
77
77
|
className={cn(
|
|
78
|
-
'
|
|
78
|
+
'focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none',
|
|
79
79
|
inset && 'pl-8',
|
|
80
80
|
className,
|
|
81
81
|
)}
|
|
@@ -94,7 +94,7 @@ const MenubarSubContent = React.forwardRef<
|
|
|
94
94
|
<MenubarPrimitive.SubContent
|
|
95
95
|
ref={ref}
|
|
96
96
|
className={cn(
|
|
97
|
-
'
|
|
97
|
+
'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-[--radix-menubar-content-transform-origin] overflow-hidden rounded-md border p-1 shadow-lg',
|
|
98
98
|
className,
|
|
99
99
|
)}
|
|
100
100
|
{...props}
|
|
@@ -113,7 +113,7 @@ const MenubarContent = React.forwardRef<
|
|
|
113
113
|
alignOffset={alignOffset}
|
|
114
114
|
sideOffset={sideOffset}
|
|
115
115
|
className={cn(
|
|
116
|
-
'
|
|
116
|
+
'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[12rem] origin-[--radix-menubar-content-transform-origin] overflow-hidden rounded-md border p-1 shadow-md',
|
|
117
117
|
className,
|
|
118
118
|
)}
|
|
119
119
|
{...props}
|
|
@@ -129,7 +129,7 @@ const MenubarItem = React.forwardRef<
|
|
|
129
129
|
<MenubarPrimitive.Item
|
|
130
130
|
ref={ref}
|
|
131
131
|
className={cn(
|
|
132
|
-
'relative flex cursor-default
|
|
132
|
+
'focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
|
|
133
133
|
inset && 'pl-8',
|
|
134
134
|
className,
|
|
135
135
|
)}
|
|
@@ -145,7 +145,7 @@ const MenubarCheckboxItem = React.forwardRef<
|
|
|
145
145
|
<MenubarPrimitive.CheckboxItem
|
|
146
146
|
ref={ref}
|
|
147
147
|
className={cn(
|
|
148
|
-
'relative flex cursor-default
|
|
148
|
+
'focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
|
|
149
149
|
className,
|
|
150
150
|
)}
|
|
151
151
|
checked={checked}
|
|
@@ -168,7 +168,7 @@ const MenubarRadioItem = React.forwardRef<
|
|
|
168
168
|
<MenubarPrimitive.RadioItem
|
|
169
169
|
ref={ref}
|
|
170
170
|
className={cn(
|
|
171
|
-
'relative flex cursor-default
|
|
171
|
+
'focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
|
|
172
172
|
className,
|
|
173
173
|
)}
|
|
174
174
|
{...props}
|
|
@@ -199,12 +199,12 @@ const MenubarSeparator = React.forwardRef<
|
|
|
199
199
|
React.ElementRef<typeof MenubarPrimitive.Separator>,
|
|
200
200
|
React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Separator> & MenubarSeparatorBaseProps
|
|
201
201
|
>(({ className, ...props }, ref) => (
|
|
202
|
-
<MenubarPrimitive.Separator ref={ref} className={cn('-mx-1 my-1 h-px
|
|
202
|
+
<MenubarPrimitive.Separator ref={ref} className={cn('bg-muted -mx-1 my-1 h-px', className)} {...props} />
|
|
203
203
|
));
|
|
204
204
|
MenubarSeparator.displayName = MenubarPrimitive.Separator.displayName;
|
|
205
205
|
|
|
206
206
|
const MenubarShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement> & MenubarShortcutBaseProps) => {
|
|
207
|
-
return <span className={cn('ml-auto text-xs tracking-widest
|
|
207
|
+
return <span className={cn('text-muted-foreground ml-auto text-xs tracking-widest', className)} {...props} />;
|
|
208
208
|
};
|
|
209
209
|
MenubarShortcut.displayname = 'MenubarShortcut';
|
|
210
210
|
|
package/src/navigation-menu.tsx
CHANGED
|
@@ -75,7 +75,7 @@ const NavigationMenuContent = React.forwardRef<
|
|
|
75
75
|
<NavigationMenuPrimitive.Content
|
|
76
76
|
ref={ref}
|
|
77
77
|
className={cn(
|
|
78
|
-
'
|
|
78
|
+
'data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 top-0 left-0 w-full md:absolute md:w-auto',
|
|
79
79
|
className,
|
|
80
80
|
)}
|
|
81
81
|
{...props}
|
|
@@ -89,10 +89,10 @@ const NavigationMenuViewport = React.forwardRef<
|
|
|
89
89
|
React.ElementRef<typeof NavigationMenuPrimitive.Viewport>,
|
|
90
90
|
React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Viewport> & NavigationMenuViewportBaseProps
|
|
91
91
|
>(({ className, ...props }, ref) => (
|
|
92
|
-
<div className={cn('absolute left-0
|
|
92
|
+
<div className={cn('absolute top-full left-0 flex justify-center')}>
|
|
93
93
|
<NavigationMenuPrimitive.Viewport
|
|
94
94
|
className={cn(
|
|
95
|
-
'origin-top-center
|
|
95
|
+
'origin-top-center bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border shadow md:w-[var(--radix-navigation-menu-viewport-width)]',
|
|
96
96
|
className,
|
|
97
97
|
)}
|
|
98
98
|
ref={ref}
|
|
@@ -109,12 +109,12 @@ const NavigationMenuIndicator = React.forwardRef<
|
|
|
109
109
|
<NavigationMenuPrimitive.Indicator
|
|
110
110
|
ref={ref}
|
|
111
111
|
className={cn(
|
|
112
|
-
'
|
|
112
|
+
'data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden',
|
|
113
113
|
className,
|
|
114
114
|
)}
|
|
115
115
|
{...props}
|
|
116
116
|
>
|
|
117
|
-
<div className="relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm
|
|
117
|
+
<div className="bg-border relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm shadow-md" />
|
|
118
118
|
</NavigationMenuPrimitive.Indicator>
|
|
119
119
|
));
|
|
120
120
|
NavigationMenuIndicator.displayName = NavigationMenuPrimitive.Indicator.displayName;
|
package/src/popover.tsx
CHANGED
|
@@ -27,7 +27,7 @@ const PopoverContent = React.forwardRef<
|
|
|
27
27
|
align={align}
|
|
28
28
|
sideOffset={sideOffset}
|
|
29
29
|
className={cn(
|
|
30
|
-
'
|
|
30
|
+
'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-[--radix-popover-content-transform-origin] rounded-md border p-4 shadow-md outline-none',
|
|
31
31
|
className,
|
|
32
32
|
)}
|
|
33
33
|
{...props}
|
package/src/progress.tsx
CHANGED
|
@@ -12,12 +12,12 @@ const Progress = React.forwardRef<
|
|
|
12
12
|
>(({ className, value, ...props }, ref) => (
|
|
13
13
|
<ProgressPrimitive.Root
|
|
14
14
|
ref={ref}
|
|
15
|
-
className={cn('relative h-2 w-full overflow-hidden rounded-full
|
|
15
|
+
className={cn('bg-primary/20 relative h-2 w-full overflow-hidden rounded-full', className)}
|
|
16
16
|
value={value}
|
|
17
17
|
{...props}
|
|
18
18
|
>
|
|
19
19
|
<ProgressPrimitive.Indicator
|
|
20
|
-
className="h-full w-full flex-1
|
|
20
|
+
className="bg-primary h-full w-full flex-1 transition-all"
|
|
21
21
|
style={{ transform: `translateX(-${100 - (value || 0)}%)` }}
|
|
22
22
|
/>
|
|
23
23
|
</ProgressPrimitive.Root>
|
package/src/radio-group.tsx
CHANGED
|
@@ -24,13 +24,13 @@ const RadioGroupItem = React.forwardRef<React.ElementRef<typeof RadioGroupPrimit
|
|
|
24
24
|
<RadioGroupPrimitive.Item
|
|
25
25
|
ref={ref}
|
|
26
26
|
className={cn(
|
|
27
|
-
'aspect-square h-4 w-4 rounded-full border
|
|
27
|
+
'border-primary text-primary focus-visible:ring-ring aspect-square h-4 w-4 rounded-full border shadow focus:outline-none focus-visible:ring-1 disabled:cursor-not-allowed disabled:opacity-50',
|
|
28
28
|
className,
|
|
29
29
|
)}
|
|
30
30
|
{...props}
|
|
31
31
|
>
|
|
32
32
|
<RadioGroupPrimitive.Indicator className="flex items-center justify-center">
|
|
33
|
-
<Circle className="h-3.5 w-3.5
|
|
33
|
+
<Circle className="fill-primary h-3.5 w-3.5" />
|
|
34
34
|
</RadioGroupPrimitive.Indicator>
|
|
35
35
|
</RadioGroupPrimitive.Item>
|
|
36
36
|
);
|
package/src/resizable.tsx
CHANGED
|
@@ -38,13 +38,13 @@ const ResizableHandle = ({
|
|
|
38
38
|
}: React.ComponentProps<typeof Separator> & ResizableHandleBaseProps) => (
|
|
39
39
|
<Separator
|
|
40
40
|
className={cn(
|
|
41
|
-
'relative flex w-px items-center justify-center
|
|
41
|
+
'bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-none data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90',
|
|
42
42
|
className,
|
|
43
43
|
)}
|
|
44
44
|
{...props}
|
|
45
45
|
>
|
|
46
46
|
{withHandle && (
|
|
47
|
-
<div className="z-10 flex h-4 w-3 items-center justify-center rounded-sm border
|
|
47
|
+
<div className="bg-border z-10 flex h-4 w-3 items-center justify-center rounded-sm border">
|
|
48
48
|
<GripVertical className="h-2.5 w-2.5" />
|
|
49
49
|
</div>
|
|
50
50
|
)}
|
package/src/scroll-area.tsx
CHANGED
|
@@ -26,14 +26,14 @@ const ScrollBar = React.forwardRef<
|
|
|
26
26
|
ref={ref}
|
|
27
27
|
orientation={orientation}
|
|
28
28
|
className={cn(
|
|
29
|
-
'flex touch-none select-none
|
|
29
|
+
'flex touch-none transition-colors select-none',
|
|
30
30
|
orientation === 'vertical' && 'h-full w-2.5 border-l border-l-transparent p-[1px]',
|
|
31
31
|
orientation === 'horizontal' && 'h-2.5 flex-col border-t border-t-transparent p-[1px]',
|
|
32
32
|
className,
|
|
33
33
|
)}
|
|
34
34
|
{...props}
|
|
35
35
|
>
|
|
36
|
-
<ScrollAreaPrimitive.ScrollAreaThumb className="relative flex-1 rounded-full
|
|
36
|
+
<ScrollAreaPrimitive.ScrollAreaThumb className="bg-border relative flex-1 rounded-full" />
|
|
37
37
|
</ScrollAreaPrimitive.ScrollAreaScrollbar>
|
|
38
38
|
));
|
|
39
39
|
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
package/src/search.tsx
CHANGED
|
@@ -64,7 +64,7 @@ export const SearchTrigger = React.forwardRef<HTMLButtonElement, SearchTriggerPr
|
|
|
64
64
|
<Button
|
|
65
65
|
variant="outline"
|
|
66
66
|
className={cn(
|
|
67
|
-
'relative h-9 text-sm
|
|
67
|
+
'text-muted-foreground relative h-9 text-sm transition-all transition-colors',
|
|
68
68
|
variant === 'default'
|
|
69
69
|
? 'w-full justify-start pr-12'
|
|
70
70
|
: 'w-9 justify-center px-0 md:w-40 md:justify-start md:px-3 md:pr-12 lg:w-64',
|
|
@@ -77,7 +77,7 @@ export const SearchTrigger = React.forwardRef<HTMLButtonElement, SearchTriggerPr
|
|
|
77
77
|
<SearchIcon className="h-4 w-4 shrink-0" />
|
|
78
78
|
<span className={cn('truncate', variant === 'compact' && 'hidden md:inline')}>{placeholder}</span>
|
|
79
79
|
</span>
|
|
80
|
-
<kbd className="pointer-events-none absolute
|
|
80
|
+
<kbd className="bg-muted pointer-events-none absolute top-1.5 right-1.5 hidden h-6 items-center gap-1 rounded border px-1.5 font-mono text-[10px] font-medium opacity-100 select-none sm:flex">
|
|
81
81
|
<span className="text-xs">⌘</span>K
|
|
82
82
|
</kbd>
|
|
83
83
|
</Button>
|
package/src/select.tsx
CHANGED
|
@@ -31,7 +31,7 @@ const SelectTrigger = React.forwardRef<
|
|
|
31
31
|
<SelectPrimitive.Trigger
|
|
32
32
|
ref={ref}
|
|
33
33
|
className={cn(
|
|
34
|
-
'flex h-9 w-full items-center justify-between
|
|
34
|
+
'border-input ring-offset-background data-[placeholder]:text-muted-foreground focus:ring-ring flex h-9 w-full items-center justify-between rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-sm focus:ring-1 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1',
|
|
35
35
|
className,
|
|
36
36
|
)}
|
|
37
37
|
{...props}
|
|
@@ -80,7 +80,7 @@ const SelectContent = React.forwardRef<
|
|
|
80
80
|
<SelectPrimitive.Content
|
|
81
81
|
ref={ref}
|
|
82
82
|
className={cn(
|
|
83
|
-
'
|
|
83
|
+
'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] origin-[--radix-select-content-transform-origin] overflow-x-hidden overflow-y-auto rounded-md border shadow-md',
|
|
84
84
|
position === 'popper' &&
|
|
85
85
|
'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1',
|
|
86
86
|
className,
|
|
@@ -119,7 +119,7 @@ const SelectItem = React.forwardRef<
|
|
|
119
119
|
<SelectPrimitive.Item
|
|
120
120
|
ref={ref}
|
|
121
121
|
className={cn(
|
|
122
|
-
'relative flex w-full cursor-default
|
|
122
|
+
'focus:bg-accent focus:text-accent-foreground relative flex w-full cursor-default items-center rounded-sm py-1.5 pr-8 pl-2 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
|
|
123
123
|
className,
|
|
124
124
|
)}
|
|
125
125
|
{...props}
|
|
@@ -138,7 +138,7 @@ const SelectSeparator = React.forwardRef<
|
|
|
138
138
|
React.ElementRef<typeof SelectPrimitive.Separator>,
|
|
139
139
|
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator> & SelectSeparatorBaseProps
|
|
140
140
|
>(({ className, ...props }, ref) => (
|
|
141
|
-
<SelectPrimitive.Separator ref={ref} className={cn('-mx-1 my-1 h-px
|
|
141
|
+
<SelectPrimitive.Separator ref={ref} className={cn('bg-muted -mx-1 my-1 h-px', className)} {...props} />
|
|
142
142
|
));
|
|
143
143
|
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
144
144
|
|
package/src/separator.tsx
CHANGED
|
@@ -14,7 +14,7 @@ const Separator = React.forwardRef<
|
|
|
14
14
|
ref={ref}
|
|
15
15
|
decorative={decorative}
|
|
16
16
|
orientation={orientation}
|
|
17
|
-
className={cn('shrink-0
|
|
17
|
+
className={cn('bg-border shrink-0', orientation === 'horizontal' ? 'h-[1px] w-full' : 'h-full w-[1px]', className)}
|
|
18
18
|
{...props}
|
|
19
19
|
/>
|
|
20
20
|
));
|
package/src/setupTests.ts
CHANGED
|
@@ -15,7 +15,7 @@ global.IntersectionObserver = class IntersectionObserver {
|
|
|
15
15
|
readonly rootMargin: string = '';
|
|
16
16
|
readonly thresholds: ReadonlyArray<number> = [];
|
|
17
17
|
|
|
18
|
-
constructor(
|
|
18
|
+
constructor(_callback: IntersectionObserverCallback, options?: IntersectionObserverInit) {
|
|
19
19
|
this.root = options?.root ?? null;
|
|
20
20
|
this.rootMargin = options?.rootMargin ?? '';
|
|
21
21
|
this.thresholds = options?.threshold
|
package/src/sheet.tsx
CHANGED
|
@@ -33,7 +33,7 @@ const SheetOverlay = React.forwardRef<
|
|
|
33
33
|
>(({ className, ...props }, ref) => (
|
|
34
34
|
<SheetPrimitive.Overlay
|
|
35
35
|
className={cn(
|
|
36
|
-
'
|
|
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/80',
|
|
37
37
|
className,
|
|
38
38
|
)}
|
|
39
39
|
{...props}
|
|
@@ -72,7 +72,7 @@ const SheetContent = React.forwardRef<React.ElementRef<typeof SheetPrimitive.Con
|
|
|
72
72
|
<SheetPortal>
|
|
73
73
|
<SheetOverlay />
|
|
74
74
|
<SheetPrimitive.Content ref={ref} className={cn(sheetVariants({ side }), className)} {...props}>
|
|
75
|
-
<SheetPrimitive.Close className="absolute
|
|
75
|
+
<SheetPrimitive.Close className="ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none">
|
|
76
76
|
<X className="h-4 w-4" />
|
|
77
77
|
<span className="sr-only">Close</span>
|
|
78
78
|
</SheetPrimitive.Close>
|
|
@@ -97,7 +97,7 @@ const SheetTitle = React.forwardRef<
|
|
|
97
97
|
React.ElementRef<typeof SheetPrimitive.Title>,
|
|
98
98
|
React.ComponentPropsWithoutRef<typeof SheetPrimitive.Title> & SheetTitleBaseProps
|
|
99
99
|
>(({ className, ...props }, ref) => (
|
|
100
|
-
<SheetPrimitive.Title ref={ref} className={cn('text-lg font-semibold
|
|
100
|
+
<SheetPrimitive.Title ref={ref} className={cn('text-foreground text-lg font-semibold', className)} {...props} />
|
|
101
101
|
));
|
|
102
102
|
SheetTitle.displayName = SheetPrimitive.Title.displayName;
|
|
103
103
|
|
|
@@ -105,7 +105,7 @@ const SheetDescription = React.forwardRef<
|
|
|
105
105
|
React.ElementRef<typeof SheetPrimitive.Description>,
|
|
106
106
|
React.ComponentPropsWithoutRef<typeof SheetPrimitive.Description> & SheetDescriptionBaseProps
|
|
107
107
|
>(({ className, ...props }, ref) => (
|
|
108
|
-
<SheetPrimitive.Description ref={ref} className={cn('text-
|
|
108
|
+
<SheetPrimitive.Description ref={ref} className={cn('text-muted-foreground text-sm', className)} {...props} />
|
|
109
109
|
));
|
|
110
110
|
SheetDescription.displayName = SheetPrimitive.Description.displayName;
|
|
111
111
|
|
package/src/skeleton.tsx
CHANGED
|
@@ -3,7 +3,7 @@ import * as React from 'react';
|
|
|
3
3
|
import { cn } from './lib/utils';
|
|
4
4
|
|
|
5
5
|
function Skeleton({ className, ...props }: React.HTMLAttributes<HTMLDivElement> & SkeletonBaseProps) {
|
|
6
|
-
return <div className={cn('animate-pulse rounded-md
|
|
6
|
+
return <div className={cn('bg-primary/10 animate-pulse rounded-md', className)} {...props} />;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
export { Skeleton };
|
package/src/slider.tsx
CHANGED
|
@@ -12,13 +12,13 @@ const Slider = React.forwardRef<
|
|
|
12
12
|
>(({ className, ...props }, ref) => (
|
|
13
13
|
<SliderPrimitive.Root
|
|
14
14
|
ref={ref}
|
|
15
|
-
className={cn('relative flex w-full touch-none select-none
|
|
15
|
+
className={cn('relative flex w-full touch-none items-center select-none', className)}
|
|
16
16
|
{...props}
|
|
17
17
|
>
|
|
18
|
-
<SliderPrimitive.Track className="relative h-1.5 w-full grow overflow-hidden rounded-full
|
|
19
|
-
<SliderPrimitive.Range className="absolute h-full
|
|
18
|
+
<SliderPrimitive.Track className="bg-primary/20 relative h-1.5 w-full grow overflow-hidden rounded-full">
|
|
19
|
+
<SliderPrimitive.Range className="bg-primary absolute h-full" />
|
|
20
20
|
</SliderPrimitive.Track>
|
|
21
|
-
<SliderPrimitive.Thumb className="block h-4 w-4 rounded-full border
|
|
21
|
+
<SliderPrimitive.Thumb className="border-primary/50 bg-background focus-visible:ring-ring block h-4 w-4 rounded-full border shadow transition-colors focus-visible:ring-1 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50" />
|
|
22
22
|
</SliderPrimitive.Root>
|
|
23
23
|
));
|
|
24
24
|
Slider.displayName = SliderPrimitive.Root.displayName;
|
package/src/switch.tsx
CHANGED
|
@@ -12,7 +12,7 @@ const Switch = React.forwardRef<
|
|
|
12
12
|
>(({ className, ...props }, ref) => (
|
|
13
13
|
<SwitchPrimitives.Root
|
|
14
14
|
className={cn(
|
|
15
|
-
'peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:
|
|
15
|
+
'peer focus-visible:ring-ring focus-visible:ring-offset-background data-[state=checked]:bg-primary data-[state=unchecked]:bg-input inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50',
|
|
16
16
|
className,
|
|
17
17
|
)}
|
|
18
18
|
{...props}
|
|
@@ -20,7 +20,7 @@ const Switch = React.forwardRef<
|
|
|
20
20
|
>
|
|
21
21
|
<SwitchPrimitives.Thumb
|
|
22
22
|
className={cn(
|
|
23
|
-
'pointer-events-none block h-4 w-4 rounded-full
|
|
23
|
+
'bg-background pointer-events-none block h-4 w-4 rounded-full shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0',
|
|
24
24
|
)}
|
|
25
25
|
/>
|
|
26
26
|
</SwitchPrimitives.Root>
|
package/src/table.tsx
CHANGED
|
@@ -41,7 +41,7 @@ const TableFooter = React.forwardRef<
|
|
|
41
41
|
HTMLTableSectionElement,
|
|
42
42
|
React.HTMLAttributes<HTMLTableSectionElement> & TableFooterBaseProps
|
|
43
43
|
>(({ className, ...props }, ref) => (
|
|
44
|
-
<tfoot ref={ref} className={cn('
|
|
44
|
+
<tfoot ref={ref} className={cn('bg-muted/50 border-t font-medium [&>tr]:last:border-b-0', className)} {...props} />
|
|
45
45
|
));
|
|
46
46
|
TableFooter.displayName = 'TableFooter';
|
|
47
47
|
|
|
@@ -49,7 +49,7 @@ const TableRow = React.forwardRef<HTMLTableRowElement, React.HTMLAttributes<HTML
|
|
|
49
49
|
({ className, ...props }, ref) => (
|
|
50
50
|
<tr
|
|
51
51
|
ref={ref}
|
|
52
|
-
className={cn('
|
|
52
|
+
className={cn('hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors', className)}
|
|
53
53
|
{...props}
|
|
54
54
|
/>
|
|
55
55
|
),
|
|
@@ -63,7 +63,7 @@ const TableHead = React.forwardRef<
|
|
|
63
63
|
<th
|
|
64
64
|
ref={ref}
|
|
65
65
|
className={cn(
|
|
66
|
-
'h-10 px-2 text-left align-middle font-medium
|
|
66
|
+
'text-muted-foreground h-10 px-2 text-left align-middle font-medium [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]',
|
|
67
67
|
className,
|
|
68
68
|
)}
|
|
69
69
|
{...props}
|
|
@@ -87,7 +87,7 @@ const TableCaption = React.forwardRef<
|
|
|
87
87
|
HTMLTableCaptionElement,
|
|
88
88
|
React.HTMLAttributes<HTMLTableCaptionElement> & TableCaptionBaseProps
|
|
89
89
|
>(({ className, ...props }, ref) => (
|
|
90
|
-
<caption ref={ref} className={cn('mt-4 text-sm
|
|
90
|
+
<caption ref={ref} className={cn('text-muted-foreground mt-4 text-sm', className)} {...props} />
|
|
91
91
|
));
|
|
92
92
|
TableCaption.displayName = 'TableCaption';
|
|
93
93
|
|
package/src/tabs.tsx
CHANGED
|
@@ -15,7 +15,7 @@ const TabsList = React.forwardRef<
|
|
|
15
15
|
<TabsPrimitive.List
|
|
16
16
|
ref={ref}
|
|
17
17
|
className={cn(
|
|
18
|
-
'inline-flex h-9 items-center justify-center rounded-lg
|
|
18
|
+
'bg-muted text-muted-foreground inline-flex h-9 items-center justify-center rounded-lg p-1',
|
|
19
19
|
className,
|
|
20
20
|
)}
|
|
21
21
|
{...props}
|
|
@@ -30,7 +30,7 @@ const TabsTrigger = React.forwardRef<
|
|
|
30
30
|
<TabsPrimitive.Trigger
|
|
31
31
|
ref={ref}
|
|
32
32
|
className={cn(
|
|
33
|
-
'inline-flex items-center justify-center
|
|
33
|
+
'ring-offset-background focus-visible:ring-ring data-[state=active]:bg-background data-[state=active]:text-foreground inline-flex items-center justify-center rounded-md px-3 py-1 text-sm font-medium whitespace-nowrap transition-all focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow',
|
|
34
34
|
className,
|
|
35
35
|
)}
|
|
36
36
|
{...props}
|
|
@@ -45,7 +45,7 @@ const TabsContent = React.forwardRef<
|
|
|
45
45
|
<TabsPrimitive.Content
|
|
46
46
|
ref={ref}
|
|
47
47
|
className={cn(
|
|
48
|
-
'
|
|
48
|
+
'ring-offset-background focus-visible:ring-ring mt-2 focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none',
|
|
49
49
|
className,
|
|
50
50
|
)}
|
|
51
51
|
{...props}
|
package/src/textarea.tsx
CHANGED
|
@@ -12,7 +12,7 @@ const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(({ classNa
|
|
|
12
12
|
return (
|
|
13
13
|
<textarea
|
|
14
14
|
className={cn(
|
|
15
|
-
'flex min-h-[60px] w-full rounded-md border
|
|
15
|
+
'border-input placeholder:text-muted-foreground focus-visible:ring-ring flex min-h-[60px] w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-sm focus-visible:ring-1 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',
|
|
16
16
|
className,
|
|
17
17
|
)}
|
|
18
18
|
ref={ref}
|
package/src/theme-toggle.tsx
CHANGED
|
@@ -33,19 +33,19 @@ export function ThemeToggle({ variant = 'binary', onThemeChange, customTheme, cl
|
|
|
33
33
|
<Sun
|
|
34
34
|
className={cn(
|
|
35
35
|
'h-[1.2rem] w-[1.2rem] transition-all',
|
|
36
|
-
!isSystem && !isDark ? 'rotate-0
|
|
36
|
+
!isSystem && !isDark ? 'scale-100 rotate-0' : 'scale-0 -rotate-90',
|
|
37
37
|
)}
|
|
38
38
|
/>
|
|
39
39
|
<Moon
|
|
40
40
|
className={cn(
|
|
41
41
|
'absolute h-[1.2rem] w-[1.2rem] transition-all',
|
|
42
|
-
!isSystem && isDark ? 'rotate-0
|
|
42
|
+
!isSystem && isDark ? 'scale-100 rotate-0' : 'scale-0 rotate-90',
|
|
43
43
|
)}
|
|
44
44
|
/>
|
|
45
45
|
<SunMoon
|
|
46
46
|
className={cn(
|
|
47
47
|
'absolute h-[1.2rem] w-[1.2rem] transition-all',
|
|
48
|
-
isSystem ? 'rotate-0
|
|
48
|
+
isSystem ? 'scale-100 rotate-0' : 'scale-0 rotate-90',
|
|
49
49
|
)}
|
|
50
50
|
/>
|
|
51
51
|
<span className="sr-only">Toggle theme</span>
|
package/src/toast.tsx
CHANGED
|
@@ -14,7 +14,7 @@ const ToastViewport = React.forwardRef<
|
|
|
14
14
|
<ToastPrimitives.Viewport
|
|
15
15
|
ref={ref}
|
|
16
16
|
className={cn(
|
|
17
|
-
'fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:
|
|
17
|
+
'fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:top-auto sm:right-0 sm:bottom-0 sm:flex-col md:max-w-[420px]',
|
|
18
18
|
className,
|
|
19
19
|
)}
|
|
20
20
|
{...props}
|
|
@@ -52,7 +52,7 @@ const ToastAction = React.forwardRef<
|
|
|
52
52
|
<ToastPrimitives.Action
|
|
53
53
|
ref={ref}
|
|
54
54
|
className={cn(
|
|
55
|
-
'
|
|
55
|
+
'hover:bg-secondary focus:ring-ring group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors focus:ring-1 focus:outline-none disabled:pointer-events-none disabled:opacity-50',
|
|
56
56
|
className,
|
|
57
57
|
)}
|
|
58
58
|
{...props}
|
|
@@ -67,7 +67,7 @@ const ToastClose = React.forwardRef<
|
|
|
67
67
|
<ToastPrimitives.Close
|
|
68
68
|
ref={ref}
|
|
69
69
|
className={cn(
|
|
70
|
-
'absolute
|
|
70
|
+
'text-foreground/50 hover:text-foreground absolute top-1 right-1 rounded-md p-1 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:ring-1 focus:outline-none group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600',
|
|
71
71
|
className,
|
|
72
72
|
)}
|
|
73
73
|
toast-close=""
|
package/src/tooltip.tsx
CHANGED
|
@@ -39,7 +39,7 @@ const TooltipContent = React.forwardRef<React.ElementRef<typeof TooltipPrimitive
|
|
|
39
39
|
ref={ref}
|
|
40
40
|
sideOffset={sideOffset}
|
|
41
41
|
className={cn(
|
|
42
|
-
'
|
|
42
|
+
'bg-popover text-popover-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 overflow-hidden rounded-md border px-3 py-1.5 text-sm shadow-md',
|
|
43
43
|
className,
|
|
44
44
|
)}
|
|
45
45
|
{...props}
|