Skip to content

Commit d4ad320

Browse files
committed
feat: update turbo
1 parent aab6777 commit d4ad320

File tree

3 files changed

+37
-23
lines changed

3 files changed

+37
-23
lines changed

packages/ui/@/components/ui/menubar.tsx

Lines changed: 35 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
"use client"
22

33
import * as React from "react"
4-
54
import * as MenubarPrimitive from "@radix-ui/react-menubar"
65
import { Check, ChevronRight, Circle } from "lucide-react"
76

87
import { cn } from "../../lib/utils"
98

10-
const MenubarMenu = MenubarPrimitive.Menu
9+
const MenubarMenu: typeof MenubarPrimitive.Menu = MenubarPrimitive.Menu
1110

12-
const MenubarGroup = MenubarPrimitive.Group
11+
const MenubarGroup: typeof MenubarPrimitive.Group = MenubarPrimitive.Group
1312

1413
const MenubarPortal = MenubarPrimitive.Portal
1514

@@ -86,21 +85,26 @@ MenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName
8685
const MenubarContent = React.forwardRef<
8786
React.ElementRef<typeof MenubarPrimitive.Content>,
8887
React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Content>
89-
>(({ className, align = "start", alignOffset = -4, sideOffset = 8, ...props }, ref) => (
90-
<MenubarPrimitive.Portal>
91-
<MenubarPrimitive.Content
92-
ref={ref}
93-
align={align}
94-
alignOffset={alignOffset}
95-
sideOffset={sideOffset}
96-
className={cn(
97-
"z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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",
98-
className
99-
)}
100-
{...props}
101-
/>
102-
</MenubarPrimitive.Portal>
103-
))
88+
>(
89+
(
90+
{ className, align = "start", alignOffset = -4, sideOffset = 8, ...props },
91+
ref
92+
) => (
93+
<MenubarPrimitive.Portal>
94+
<MenubarPrimitive.Content
95+
ref={ref}
96+
align={align}
97+
alignOffset={alignOffset}
98+
sideOffset={sideOffset}
99+
className={cn(
100+
"z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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",
101+
className
102+
)}
103+
{...props}
104+
/>
105+
</MenubarPrimitive.Portal>
106+
)
107+
)
104108
MenubarContent.displayName = MenubarPrimitive.Content.displayName
105109

106110
const MenubarItem = React.forwardRef<
@@ -174,7 +178,11 @@ const MenubarLabel = React.forwardRef<
174178
>(({ className, inset, ...props }, ref) => (
175179
<MenubarPrimitive.Label
176180
ref={ref}
177-
className={cn("px-2 py-1.5 text-sm font-semibold", inset && "pl-8", className)}
181+
className={cn(
182+
"px-2 py-1.5 text-sm font-semibold",
183+
inset && "pl-8",
184+
className
185+
)}
178186
{...props}
179187
/>
180188
))
@@ -192,10 +200,16 @@ const MenubarSeparator = React.forwardRef<
192200
))
193201
MenubarSeparator.displayName = MenubarPrimitive.Separator.displayName
194202

195-
const MenubarShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {
203+
const MenubarShortcut = ({
204+
className,
205+
...props
206+
}: React.HTMLAttributes<HTMLSpanElement>) => {
196207
return (
197208
<span
198-
className={cn("ml-auto text-xs tracking-widest text-muted-foreground", className)}
209+
className={cn(
210+
"ml-auto text-xs tracking-widest text-muted-foreground",
211+
className
212+
)}
199213
{...props}
200214
/>
201215
)

packages/ui/components.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
},
1313
"aliases": {
1414
"components": "@/components",
15-
"utils": "../../lib/utils"
15+
"utils": "@/lib/utils"
1616
}
1717
}

packages/ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"@radix-ui/react-dropdown-menu": "^2.0.5",
4545
"@radix-ui/react-hover-card": "^1.0.7",
4646
"@radix-ui/react-label": "^2.0.2",
47-
"@radix-ui/react-menubar": "^1.0.4",
47+
"@radix-ui/react-menubar": "^1.1.1",
4848
"@radix-ui/react-navigation-menu": "^1.1.4",
4949
"@radix-ui/react-popover": "^1.0.7",
5050
"@radix-ui/react-progress": "^1.0.3",

0 commit comments

Comments
 (0)