Skip to content

Commit 6d90b83

Browse files
committed
update library versions
1 parent be97c09 commit 6d90b83

File tree

13 files changed

+895
-814
lines changed

13 files changed

+895
-814
lines changed

components/ui/badge.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { cva, type VariantProps } from "class-variance-authority"
55
import { cn } from "@/lib/utils"
66

77
const badgeVariants = cva(
8-
"inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
8+
"inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
99
{
1010
variants: {
1111
variant: {

components/ui/button.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,13 @@ const buttonVariants = cva(
99
{
1010
variants: {
1111
variant: {
12-
default:
13-
"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
12+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
1413
destructive:
15-
"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
14+
"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
1615
outline:
1716
"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
1817
secondary:
19-
"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",
18+
"bg-secondary text-secondary-foreground hover:bg-secondary/80",
2019
ghost:
2120
"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
2221
link: "text-primary underline-offset-4 hover:underline",
@@ -26,6 +25,8 @@ const buttonVariants = cva(
2625
sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
2726
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
2827
icon: "size-9",
28+
"icon-sm": "size-8",
29+
"icon-lg": "size-10",
2930
},
3031
},
3132
defaultVariants: {

components/ui/card.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function CardHeader({ className, ...props }: React.ComponentProps<"div">) {
2020
<div
2121
data-slot="card-header"
2222
className={cn(
23-
"@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",
23+
"@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",
2424
className
2525
)}
2626
{...props}

components/ui/dialog.tsx

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,11 @@ function DialogOverlay({
4949
function DialogContent({
5050
className,
5151
children,
52+
showCloseButton = true,
5253
...props
53-
}: React.ComponentProps<typeof DialogPrimitive.Content>) {
54+
}: React.ComponentProps<typeof DialogPrimitive.Content> & {
55+
showCloseButton?: boolean
56+
}) {
5457
return (
5558
<DialogPortal data-slot="dialog-portal">
5659
<DialogOverlay />
@@ -63,10 +66,15 @@ function DialogContent({
6366
{...props}
6467
>
6568
{children}
66-
<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-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4">
67-
<XIcon />
68-
<span className="sr-only">Close</span>
69-
</DialogPrimitive.Close>
69+
{showCloseButton && (
70+
<DialogPrimitive.Close
71+
data-slot="dialog-close"
72+
className="ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"
73+
>
74+
<XIcon />
75+
<span className="sr-only">Close</span>
76+
</DialogPrimitive.Close>
77+
)}
7078
</DialogPrimitive.Content>
7179
</DialogPortal>
7280
)

components/ui/dropdown-menu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ function DropdownMenuSubTrigger({
211211
data-slot="dropdown-menu-sub-trigger"
212212
data-inset={inset}
213213
className={cn(
214-
"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-hidden select-none data-[inset]:pl-8",
214+
"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
215215
className
216216
)}
217217
{...props}

components/ui/input.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ function Input({ className, type, ...props }: React.ComponentProps<"input">) {
88
type={type}
99
data-slot="input"
1010
className={cn(
11-
"file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
11+
"file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
1212
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
1313
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
1414
className

components/ui/select.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ function SelectContent({
5454
className,
5555
children,
5656
position = "popper",
57+
align = "center",
5758
...props
5859
}: React.ComponentProps<typeof SelectPrimitive.Content>) {
5960
return (
@@ -67,6 +68,7 @@ function SelectContent({
6768
className
6869
)}
6970
position={position}
71+
align={align}
7072
{...props}
7173
>
7274
<SelectScrollUpButton />

components/ui/separator.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function Separator({
1313
}: React.ComponentProps<typeof SeparatorPrimitive.Root>) {
1414
return (
1515
<SeparatorPrimitive.Root
16-
data-slot="separator-root"
16+
data-slot="separator"
1717
decorative={decorative}
1818
orientation={orientation}
1919
className={cn(

components/ui/sonner.tsx

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
"use client"
22

3+
import {
4+
CircleCheckIcon,
5+
InfoIcon,
6+
Loader2Icon,
7+
OctagonXIcon,
8+
TriangleAlertIcon,
9+
} from "lucide-react"
310
import { useTheme } from "next-themes"
4-
import { Toaster as Sonner, ToasterProps } from "sonner"
11+
import { Toaster as Sonner, type ToasterProps } from "sonner"
512

613
const Toaster = ({ ...props }: ToasterProps) => {
714
const { theme = "system" } = useTheme()
@@ -10,11 +17,19 @@ const Toaster = ({ ...props }: ToasterProps) => {
1017
<Sonner
1118
theme={theme as ToasterProps["theme"]}
1219
className="toaster group"
20+
icons={{
21+
success: <CircleCheckIcon className="size-4" />,
22+
info: <InfoIcon className="size-4" />,
23+
warning: <TriangleAlertIcon className="size-4" />,
24+
error: <OctagonXIcon className="size-4" />,
25+
loading: <Loader2Icon className="size-4 animate-spin" />,
26+
}}
1327
style={
1428
{
1529
"--normal-bg": "var(--popover)",
1630
"--normal-text": "var(--popover-foreground)",
1731
"--normal-border": "var(--border)",
32+
"--border-radius": "var(--radius)",
1833
} as React.CSSProperties
1934
}
2035
{...props}

components/ui/tooltip.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,13 @@ function TooltipContent({
4646
data-slot="tooltip-content"
4747
sideOffset={sideOffset}
4848
className={cn(
49-
"bg-primary text-primary-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 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",
49+
"bg-foreground text-background 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 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",
5050
className
5151
)}
5252
{...props}
5353
>
5454
{children}
55-
<TooltipPrimitive.Arrow className="bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" />
55+
<TooltipPrimitive.Arrow className="bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" />
5656
</TooltipPrimitive.Content>
5757
</TooltipPrimitive.Portal>
5858
)

0 commit comments

Comments
 (0)