@hilum/ui 2.1.0 → 2.1.2
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 +16 -17
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/account-menu.tsx +18 -17
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-
|
|
21
|
-
"ring-1 ring-ground-800",
|
|
20
|
+
"w-72 overflow-hidden rounded-xl 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-
|
|
40
|
+
className={cn("flex flex-col items-center px-5 py-5 text-center", className)}
|
|
42
41
|
{...props}
|
|
43
42
|
>
|
|
44
|
-
<Avatar size="
|
|
43
|
+
<Avatar size="lg" className="mb-3">
|
|
45
44
|
{avatarSrc && <AvatarImage src={avatarSrc} alt={avatarAlt ?? ""} />}
|
|
46
|
-
<AvatarFallback className="bg-brand-primary text-
|
|
45
|
+
<AvatarFallback className="bg-brand-primary text-primary-foreground">
|
|
47
46
|
{fallback}
|
|
48
47
|
</AvatarFallback>
|
|
49
48
|
</Avatar>
|
|
50
|
-
<p className="body
|
|
51
|
-
{email && <p className="
|
|
49
|
+
<p className="body font-medium leading-tight text-foreground">{name}</p>
|
|
50
|
+
{email && <p className="caption text-muted-foreground">{email}</p>}
|
|
52
51
|
</div>
|
|
53
52
|
),
|
|
54
53
|
);
|
|
@@ -56,7 +55,7 @@ AccountMenuHeader.displayName = "AccountMenuHeader";
|
|
|
56
55
|
|
|
57
56
|
const AccountMenuSection = React.forwardRef<HTMLDivElement, React.ComponentProps<"div">>(
|
|
58
57
|
({ className, ...props }, ref) => (
|
|
59
|
-
<div ref={ref} className={cn("p-
|
|
58
|
+
<div ref={ref} className={cn("p-2", className)} {...props} />
|
|
60
59
|
),
|
|
61
60
|
);
|
|
62
61
|
AccountMenuSection.displayName = "AccountMenuSection";
|
|
@@ -71,29 +70,31 @@ 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-
|
|
77
|
+
"min-h-10 rounded-md px-2.5 py-2",
|
|
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
|
-
"[&_svg:not([class*='size-'])]:size-
|
|
83
|
+
"[&_svg:not([class*='size-'])]:size-4",
|
|
83
84
|
className,
|
|
84
85
|
)}
|
|
85
86
|
{...props}
|
|
86
87
|
>
|
|
87
|
-
{icon && <span className="flex size-
|
|
88
|
+
{icon && <span className="flex size-5 shrink-0 items-center justify-center">{icon}</span>}
|
|
88
89
|
<span className="flex min-w-0 flex-1 flex-col">
|
|
89
|
-
<span className="body
|
|
90
|
+
<span className="body truncate font-medium leading-tight">{children}</span>
|
|
90
91
|
{description && (
|
|
91
|
-
<span className="
|
|
92
|
+
<span className="caption 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
|
|