@hilum/ui 2.1.0 → 2.1.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/dist/index.js +12 -13
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/account-menu.tsx +14 -13
package/package.json
CHANGED
|
@@ -17,8 +17,7 @@ const AccountMenuContent = React.forwardRef<
|
|
|
17
17
|
ref={ref}
|
|
18
18
|
sideOffset={sideOffset}
|
|
19
19
|
className={cn(
|
|
20
|
-
"w-80 overflow-hidden rounded-
|
|
21
|
-
"ring-1 ring-ground-800",
|
|
20
|
+
"w-80 overflow-hidden rounded-2xl border border-border bg-card p-0 text-foreground shadow-elevated",
|
|
22
21
|
className,
|
|
23
22
|
)}
|
|
24
23
|
{...props}
|
|
@@ -38,17 +37,17 @@ const AccountMenuHeader = React.forwardRef<HTMLDivElement, AccountMenuHeaderProp
|
|
|
38
37
|
({ name, email, avatarSrc, avatarAlt, fallback, className, ...props }, ref) => (
|
|
39
38
|
<div
|
|
40
39
|
ref={ref}
|
|
41
|
-
className={cn("flex flex-col items-center px-6 py-
|
|
40
|
+
className={cn("flex flex-col items-center px-6 py-7 text-center", className)}
|
|
42
41
|
{...props}
|
|
43
42
|
>
|
|
44
|
-
<Avatar size="xl" className="mb-4 size-
|
|
43
|
+
<Avatar size="xl" className="mb-4 size-14">
|
|
45
44
|
{avatarSrc && <AvatarImage src={avatarSrc} alt={avatarAlt ?? ""} />}
|
|
46
|
-
<AvatarFallback className="bg-brand-primary text-
|
|
45
|
+
<AvatarFallback className="bg-brand-primary text-xl text-primary-foreground">
|
|
47
46
|
{fallback}
|
|
48
47
|
</AvatarFallback>
|
|
49
48
|
</Avatar>
|
|
50
|
-
<p className="body-lg font-medium leading-tight text-
|
|
51
|
-
{email && <p className="body text-
|
|
49
|
+
<p className="body-lg font-medium leading-tight text-foreground">{name}</p>
|
|
50
|
+
{email && <p className="body text-muted-foreground">{email}</p>}
|
|
52
51
|
</div>
|
|
53
52
|
),
|
|
54
53
|
);
|
|
@@ -71,13 +70,15 @@ interface AccountMenuItemProps
|
|
|
71
70
|
const AccountMenuItem = React.forwardRef<
|
|
72
71
|
React.ComponentRef<typeof DropdownMenuItem>,
|
|
73
72
|
AccountMenuItemProps
|
|
74
|
-
>(({ icon, trailing, description, children, className, ...props }, ref) => (
|
|
73
|
+
>(({ icon, trailing, description, destructive, children, className, ...props }, ref) => (
|
|
75
74
|
<DropdownMenuItem
|
|
76
75
|
ref={ref}
|
|
77
76
|
className={cn(
|
|
78
|
-
"min-h-11 rounded-lg px-3 py-2.5
|
|
77
|
+
"min-h-11 rounded-lg px-3 py-2.5",
|
|
79
78
|
"group",
|
|
80
|
-
|
|
79
|
+
destructive
|
|
80
|
+
? "text-destructive focus:bg-destructive/10 focus:text-destructive"
|
|
81
|
+
: "text-foreground focus:bg-muted focus:text-foreground",
|
|
81
82
|
"data-[disabled]:opacity-40",
|
|
82
83
|
"[&_svg:not([class*='size-'])]:size-5",
|
|
83
84
|
className,
|
|
@@ -88,12 +89,12 @@ const AccountMenuItem = React.forwardRef<
|
|
|
88
89
|
<span className="flex min-w-0 flex-1 flex-col">
|
|
89
90
|
<span className="body-lg truncate font-medium leading-tight">{children}</span>
|
|
90
91
|
{description && (
|
|
91
|
-
<span className="body truncate font-normal text-
|
|
92
|
+
<span className="body truncate font-normal text-muted-foreground group-focus:text-muted-foreground">
|
|
92
93
|
{description}
|
|
93
94
|
</span>
|
|
94
95
|
)}
|
|
95
96
|
</span>
|
|
96
|
-
{trailing && <span className="ml-3 shrink-0 text-
|
|
97
|
+
{trailing && <span className="caption ml-3 shrink-0 text-muted-foreground">{trailing}</span>}
|
|
97
98
|
</DropdownMenuItem>
|
|
98
99
|
));
|
|
99
100
|
AccountMenuItem.displayName = "AccountMenuItem";
|
|
@@ -102,7 +103,7 @@ const AccountMenuSeparator = React.forwardRef<
|
|
|
102
103
|
React.ComponentRef<typeof DropdownMenuSeparator>,
|
|
103
104
|
React.ComponentPropsWithoutRef<typeof DropdownMenuSeparator>
|
|
104
105
|
>(({ className, ...props }, ref) => (
|
|
105
|
-
<DropdownMenuSeparator ref={ref} className={cn("m-0 bg-
|
|
106
|
+
<DropdownMenuSeparator ref={ref} className={cn("m-0 bg-border", className)} {...props} />
|
|
106
107
|
));
|
|
107
108
|
AccountMenuSeparator.displayName = "AccountMenuSeparator";
|
|
108
109
|
|