@humain/ui 2.1.63 → 2.1.65

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.
Files changed (160) hide show
  1. package/dist/components/organisms/ai/AIToolCall/AIToolCall.d.ts +9 -3
  2. package/dist/components/organisms/ai/AIToolRun/index.d.ts +1 -1
  3. package/dist/components/organisms/ai/AIToolRun/validation.d.ts +24 -3
  4. package/dist/components/organisms/ai/_shared/format-ai-duration.d.ts +1 -0
  5. package/dist/components/organisms/ai/_shared/workflow-step-renderer.d.ts +1 -0
  6. package/dist/index.js +52 -52
  7. package/dist/index151.js +1 -1
  8. package/dist/index174.js +7 -339
  9. package/dist/index174.js.map +1 -1
  10. package/dist/index175.js +310 -137
  11. package/dist/index175.js.map +1 -1
  12. package/dist/index176.js +148 -174
  13. package/dist/index176.js.map +1 -1
  14. package/dist/index177.js +186 -78
  15. package/dist/index177.js.map +1 -1
  16. package/dist/index178.js +74 -124
  17. package/dist/index178.js.map +1 -1
  18. package/dist/index179.js +133 -1
  19. package/dist/index179.js.map +1 -0
  20. package/dist/index180.js +2 -201
  21. package/dist/index181.js +201 -0
  22. package/dist/{index180.js.map → index181.js.map} +1 -1
  23. package/dist/index183.js +130 -166
  24. package/dist/index183.js.map +1 -1
  25. package/dist/index184.js +195 -983
  26. package/dist/index184.js.map +1 -1
  27. package/dist/index185.js +1069 -369
  28. package/dist/index185.js.map +1 -1
  29. package/dist/index186.js +395 -197
  30. package/dist/index186.js.map +1 -1
  31. package/dist/index187.js +198 -243
  32. package/dist/index187.js.map +1 -1
  33. package/dist/index188.js +263 -3
  34. package/dist/index188.js.map +1 -1
  35. package/dist/index189.js +3 -209
  36. package/dist/index189.js.map +1 -1
  37. package/dist/index190.js +190 -777
  38. package/dist/index190.js.map +1 -1
  39. package/dist/index191.js +771 -252
  40. package/dist/index191.js.map +1 -1
  41. package/dist/index192.js +250 -65
  42. package/dist/index192.js.map +1 -1
  43. package/dist/index193.js +72 -523
  44. package/dist/index193.js.map +1 -1
  45. package/dist/index194.js +537 -144
  46. package/dist/index194.js.map +1 -1
  47. package/dist/index195.js +139 -720
  48. package/dist/index195.js.map +1 -1
  49. package/dist/index196.js +707 -167
  50. package/dist/index196.js.map +1 -1
  51. package/dist/index197.js +175 -151
  52. package/dist/index197.js.map +1 -1
  53. package/dist/index198.js +152 -487
  54. package/dist/index198.js.map +1 -1
  55. package/dist/index199.js +472 -225
  56. package/dist/index199.js.map +1 -1
  57. package/dist/index200.js +236 -260
  58. package/dist/index200.js.map +1 -1
  59. package/dist/index201.js +265 -215
  60. package/dist/index201.js.map +1 -1
  61. package/dist/index202.js +207 -307
  62. package/dist/index202.js.map +1 -1
  63. package/dist/index203.js +302 -135
  64. package/dist/index203.js.map +1 -1
  65. package/dist/index204.js +140 -271
  66. package/dist/index204.js.map +1 -1
  67. package/dist/index205.js +263 -253
  68. package/dist/index205.js.map +1 -1
  69. package/dist/index206.js +244 -137
  70. package/dist/index206.js.map +1 -1
  71. package/dist/index207.js +100 -238
  72. package/dist/index207.js.map +1 -1
  73. package/dist/index208.js +278 -74
  74. package/dist/index208.js.map +1 -1
  75. package/dist/index209.js +56 -97
  76. package/dist/index209.js.map +1 -1
  77. package/dist/index210.js +142 -47
  78. package/dist/index210.js.map +1 -1
  79. package/dist/index211.js +38 -84
  80. package/dist/index211.js.map +1 -1
  81. package/dist/index212.js +72 -252
  82. package/dist/index212.js.map +1 -1
  83. package/dist/index213.js +274 -26
  84. package/dist/index213.js.map +1 -1
  85. package/dist/index214.js +29 -94
  86. package/dist/index214.js.map +1 -1
  87. package/dist/index215.js +98 -25
  88. package/dist/index215.js.map +1 -1
  89. package/dist/index216.js +20 -565
  90. package/dist/index216.js.map +1 -1
  91. package/dist/index217.js +564 -17
  92. package/dist/index217.js.map +1 -1
  93. package/dist/index218.js +20 -23
  94. package/dist/index218.js.map +1 -1
  95. package/dist/index219.js +20 -95
  96. package/dist/index219.js.map +1 -1
  97. package/dist/index220.js +92 -88
  98. package/dist/index220.js.map +1 -1
  99. package/dist/index221.js +97 -29
  100. package/dist/index221.js.map +1 -1
  101. package/dist/index222.js +24 -470
  102. package/dist/index222.js.map +1 -1
  103. package/dist/index223.js +446 -196
  104. package/dist/index223.js.map +1 -1
  105. package/dist/index224.js +199 -729
  106. package/dist/index224.js.map +1 -1
  107. package/dist/index225.js +750 -61
  108. package/dist/index225.js.map +1 -1
  109. package/dist/index226.js +58 -181
  110. package/dist/index226.js.map +1 -1
  111. package/dist/index227.js +175 -259
  112. package/dist/index227.js.map +1 -1
  113. package/dist/index228.js +246 -172
  114. package/dist/index228.js.map +1 -1
  115. package/dist/index229.js +195 -32
  116. package/dist/index229.js.map +1 -1
  117. package/dist/index230.js +12 -40
  118. package/dist/index230.js.map +1 -1
  119. package/dist/index231.js +23 -26
  120. package/dist/index231.js.map +1 -1
  121. package/dist/index232.js +45 -22
  122. package/dist/index232.js.map +1 -1
  123. package/dist/index233.js +27 -48
  124. package/dist/index233.js.map +1 -1
  125. package/dist/index234.js +52 -26
  126. package/dist/index234.js.map +1 -1
  127. package/dist/index235.js +40 -225
  128. package/dist/index235.js.map +1 -1
  129. package/dist/index236.js +217 -39
  130. package/dist/index236.js.map +1 -1
  131. package/dist/index237.js +50 -0
  132. package/dist/index237.js.map +1 -0
  133. package/dist/styles.css +1 -1
  134. package/dist/wc/AIToolCall.js +218 -0
  135. package/dist/wc/AIToolCall.js.map +1 -0
  136. package/dist/wc/hf-ai-tool-call.js +34 -219
  137. package/dist/wc/hf-ai-tool-call.js.map +1 -1
  138. package/dist/wc/hf-ai-tool-run.js +673 -576
  139. package/dist/wc/hf-ai-tool-run.js.map +1 -1
  140. package/dist/wc/workflow-step-renderer.js +79 -78
  141. package/dist/wc/workflow-step-renderer.js.map +1 -1
  142. package/dist/wc-react/AIToolCall.js +218 -0
  143. package/dist/wc-react/AIToolCall.js.map +1 -0
  144. package/dist/wc-react/hf-ai-tool-call.js +32 -217
  145. package/dist/wc-react/hf-ai-tool-call.js.map +1 -1
  146. package/dist/wc-react/hf-ai-tool-run.js +698 -601
  147. package/dist/wc-react/hf-ai-tool-run.js.map +1 -1
  148. package/dist/wc-react/workflow-step-renderer.js +58 -57
  149. package/dist/wc-react/workflow-step-renderer.js.map +1 -1
  150. package/package.json +1 -1
  151. package/skills/humain-ui/SKILL.md +1 -1
  152. package/skills/humain-ui-wc/SKILL.md +1 -1
  153. package/skills/humain-ui-wc.skill +0 -0
  154. package/skills/humain-ui.skill +0 -0
  155. package/dist/index182.js +0 -143
  156. package/dist/index182.js.map +0 -1
  157. package/dist/wc/wrench.js +0 -10
  158. package/dist/wc/wrench.js.map +0 -1
  159. package/dist/wc-react/wrench.js +0 -10
  160. package/dist/wc-react/wrench.js.map +0 -1
package/dist/index228.js CHANGED
@@ -1,203 +1,277 @@
1
1
  "use client";
2
2
  import { cn } from "./index2.js";
3
- import { Button } from "./index5.js";
4
- import { Input } from "./index33.js";
5
- import { Separator } from "./index51.js";
6
- import { renderActionElement } from "./index226.js";
7
- import { Eye, EyeOff } from "lucide-react";
3
+ import { useControllableState } from "./index12.js";
4
+ import { createSafeContext } from "./index21.js";
5
+ import { Switch } from "./index42.js";
6
+ import { Kbd } from "./index106.js";
7
+ import { PopoverPopup, PopoverRoot, PopoverTrigger } from "./index212.js";
8
+ import { cva } from "class-variance-authority";
9
+ import { ChevronRight, LogOut } from "lucide-react";
8
10
  import * as React from "react";
9
11
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
10
- //#region src/components/pages/_auth/auth-page-utils.tsx
11
- function AuthForm({ children, className, ...props }) {
12
- return /* @__PURE__ */ jsx("form", {
13
- className: cn("flex flex-col gap-4", className),
14
- ...props,
15
- children
12
+ //#region src/components/templates/NavAccountMenu/NavAccountMenu.tsx
13
+ var [NavAccountMenuContext, useNavAccountMenuContext] = createSafeContext("NavAccountMenu");
14
+ function NavAccountMenu({ type = "card", open: controlledOpen, defaultOpen = false, onOpenChange, children }) {
15
+ const [open, handleOpenChange] = useControllableState({
16
+ value: controlledOpen,
17
+ defaultValue: defaultOpen,
18
+ onChange: onOpenChange
16
19
  });
17
- }
18
- function AuthPasswordInput({ endIcon, visibilityLabel = "password", ...props }) {
19
- const [isVisible, setIsVisible] = React.useState(false);
20
- const label = `${isVisible ? "Hide" : "Show"} ${visibilityLabel}`;
21
- const toggle = /* @__PURE__ */ jsx("button", {
22
- type: "button",
23
- "aria-label": label,
24
- "aria-pressed": isVisible,
25
- title: label,
26
- onClick: () => setIsVisible((value) => !value),
27
- className: "pointer-events-auto inline-flex size-5 items-center justify-center rounded-sm text-text-quaternary transition-colors duration-150 ease-smooth hover:text-secondary-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
28
- children: /* @__PURE__ */ jsx(isVisible ? EyeOff : Eye, {
29
- "aria-hidden": true,
30
- className: "size-4"
20
+ const contextValue = React.useMemo(() => ({
21
+ type,
22
+ open,
23
+ onOpenChange: handleOpenChange
24
+ }), [
25
+ type,
26
+ open,
27
+ handleOpenChange
28
+ ]);
29
+ return /* @__PURE__ */ jsx(NavAccountMenuContext.Provider, {
30
+ value: contextValue,
31
+ children: /* @__PURE__ */ jsx(PopoverRoot, {
32
+ open,
33
+ onOpenChange: handleOpenChange,
34
+ children: /* @__PURE__ */ jsx("div", {
35
+ "data-slot": "nav-account-menu",
36
+ children
37
+ })
31
38
  })
32
39
  });
33
- return /* @__PURE__ */ jsx(Input, {
34
- ...props,
35
- type: isVisible ? "text" : "password",
36
- endIcon: endIcon ? /* @__PURE__ */ jsxs("span", {
37
- className: "pointer-events-auto inline-flex items-center gap-2",
38
- children: [endIcon, toggle]
39
- }) : toggle
40
+ }
41
+ var triggerVariants = cva("flex items-center gap-4 w-full text-left cursor-pointer transition-colors duration-200 ease-smooth outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring motion-reduce:transition-none", {
42
+ variants: { type: {
43
+ card: "bg-surface-1 border border-border rounded-xl shadow-xs p-3 hover:bg-surface-2",
44
+ simple: "border border-border px-2 py-3 hover:bg-surface-2 rounded-lg"
45
+ } },
46
+ defaultVariants: { type: "card" }
47
+ });
48
+ function NavAccountMenuTrigger({ avatar, name, email, badge, showLogoutButton, onLogout, compact = false, className }) {
49
+ const { type, open } = useNavAccountMenuContext();
50
+ const handleLogoutClick = (e) => {
51
+ e.stopPropagation();
52
+ onLogout?.();
53
+ };
54
+ const avatarContent = avatar ? /* @__PURE__ */ jsx("div", {
55
+ className: "shrink-0",
56
+ children: avatar
57
+ }) : null;
58
+ const accountDetails = !compact ? /* @__PURE__ */ jsxs("div", {
59
+ className: "flex min-w-0 flex-1 flex-col",
60
+ children: [/* @__PURE__ */ jsxs("div", {
61
+ className: "flex min-w-0 items-center gap-2",
62
+ children: [/* @__PURE__ */ jsx("span", {
63
+ className: "min-w-0 truncate text-sm font-semibold text-foreground",
64
+ children: name
65
+ }), badge && /* @__PURE__ */ jsx("span", {
66
+ className: "shrink-0",
67
+ children: badge
68
+ })]
69
+ }), email && /* @__PURE__ */ jsx("span", {
70
+ className: "truncate text-sm text-muted-foreground",
71
+ children: email
72
+ })]
73
+ }) : null;
74
+ if (type === "simple" && showLogoutButton && !compact) return /* @__PURE__ */ jsxs("div", {
75
+ "data-slot": "nav-account-menu-trigger",
76
+ className: cn(triggerVariants({ type }), "group/trigger", className),
77
+ children: [/* @__PURE__ */ jsxs(PopoverTrigger, {
78
+ render: /* @__PURE__ */ jsx("button", {
79
+ type: "button",
80
+ "aria-haspopup": "true",
81
+ className: "flex min-w-0 flex-1 items-center gap-4 text-left outline-none"
82
+ }),
83
+ children: [avatarContent, accountDetails]
84
+ }), /* @__PURE__ */ jsx("button", {
85
+ type: "button",
86
+ onClick: handleLogoutClick,
87
+ className: "shrink-0 rounded-md p-1.5 text-text-quaternary transition-colors duration-200 ease-smooth hover:bg-muted hover:text-secondary-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring motion-reduce:transition-none",
88
+ "aria-label": "Sign out",
89
+ children: /* @__PURE__ */ jsx(LogOut, { className: "size-5" })
90
+ })]
91
+ });
92
+ return /* @__PURE__ */ jsxs(PopoverTrigger, {
93
+ render: /* @__PURE__ */ jsx("button", {
94
+ type: "button",
95
+ "data-slot": "nav-account-menu-trigger",
96
+ "aria-haspopup": "true",
97
+ "aria-label": compact ? `${name} account menu` : void 0,
98
+ className: cn(triggerVariants({ type }), "group/trigger", compact ? "w-auto justify-center" : "max-w-[280px]", className)
99
+ }),
100
+ children: [avatarContent, !compact && /* @__PURE__ */ jsxs(Fragment, { children: [accountDetails, /* @__PURE__ */ jsx(ChevronRight, { className: cn("size-4 shrink-0 text-muted-foreground transition-transform duration-200 ease-smooth motion-reduce:transition-none", open ? "rotate-180" : "rtl:rotate-180") })] })]
40
101
  });
41
102
  }
42
- function AuthPrimaryButton({ children, loading }) {
43
- return /* @__PURE__ */ jsx(Button, {
44
- appearance: "solid",
45
- loading,
46
- shape: "rounded",
47
- size: "md",
48
- type: "submit",
49
- className: "w-full",
50
- children
103
+ function NavAccountMenuContent({ side = "right", align = "end", sideOffset = 8, children, className }) {
104
+ return /* @__PURE__ */ jsx(PopoverPopup, {
105
+ side,
106
+ align,
107
+ sideOffset,
108
+ "aria-label": "Account menu",
109
+ "data-slot": "nav-account-menu-content",
110
+ className: cn("w-[300px] max-w-[calc(100vw-2rem)] p-0 gap-0 bg-popover border border-border rounded-[14px] overflow-hidden", "shadow-[0px_12px_16px_-4px_color-mix(in_srgb,var(--foreground)_8%,transparent),0px_4px_6px_-2px_color-mix(in_srgb,var(--foreground)_3%,transparent),0px_2px_2px_-1px_color-mix(in_srgb,var(--foreground)_4%,transparent)]", "data-open:animate-in data-closed:animate-out", "data-closed:fade-out-0 data-open:fade-in-0", "data-closed:zoom-out-95 data-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", "duration-200 motion-reduce:animate-none", className),
111
+ children: /* @__PURE__ */ jsx("div", {
112
+ className: "flex flex-col py-2",
113
+ role: "menu",
114
+ "aria-label": "Account menu",
115
+ children
116
+ })
51
117
  });
52
118
  }
53
- function getNonNativeActionProps({ disabled: _disabled, ref: _ref, role: _role, tabIndex: _tabIndex, type: _type, ...props }) {
54
- return props;
119
+ function NavAccountMenuHeader({ title, subtitle, className }) {
120
+ return /* @__PURE__ */ jsxs("div", {
121
+ "data-slot": "nav-account-menu-header",
122
+ className: cn("px-6 pb-3 delight-fade-in", className),
123
+ children: [/* @__PURE__ */ jsx("p", {
124
+ className: "text-base font-semibold text-foreground",
125
+ children: title
126
+ }), subtitle && (typeof subtitle === "string" ? /* @__PURE__ */ jsx("p", {
127
+ className: "mt-2 text-sm text-muted-foreground",
128
+ children: subtitle
129
+ }) : /* @__PURE__ */ jsx("div", {
130
+ className: "mt-2",
131
+ children: subtitle
132
+ }))]
133
+ });
55
134
  }
56
- function renderActionLink(href) {
57
- return function renderLinkAction(props) {
58
- return /* @__PURE__ */ jsx("a", {
59
- ...getNonNativeActionProps(props),
60
- href
61
- });
62
- };
135
+ function NavAccountMenuSection({ label, bordered = false, children, className }) {
136
+ return /* @__PURE__ */ jsxs("section", {
137
+ "data-slot": "nav-account-menu-section",
138
+ "aria-label": label,
139
+ className: cn("flex flex-col gap-1 py-1.5", bordered && "border-t border-border", className),
140
+ children: [label && /* @__PURE__ */ jsx("div", {
141
+ className: "px-3 pt-1.5 pb-1",
142
+ children: /* @__PURE__ */ jsx("span", {
143
+ className: "text-xs font-semibold text-muted-foreground",
144
+ children: label
145
+ })
146
+ }), children]
147
+ });
63
148
  }
64
- function renderCustomActionElement(action) {
65
- return function renderCustomAction(buttonProps) {
66
- const props = getNonNativeActionProps(buttonProps);
67
- if (!action.render) return /* @__PURE__ */ jsx("button", {
68
- type: "button",
69
- ...props
70
- });
71
- return React.cloneElement(action.render, {
72
- ...props,
73
- className: cn(props.className, action.render.props.className),
74
- onClick: action.onClick ?? action.render.props.onClick ?? props.onClick,
75
- children: action.render.props.children ?? props.children ?? action.label
76
- });
149
+ function NavAccountMenuItem({ icon, shortcut, destructive = false, disabled = false, onSelect, render, children, className }) {
150
+ const { onOpenChange } = useNavAccountMenuContext();
151
+ const handleClick = () => {
152
+ if (disabled) return;
153
+ onSelect?.();
154
+ onOpenChange(false);
77
155
  };
78
- }
79
- function renderActionButton(action) {
80
- if (action.render) return renderCustomActionElement(action);
81
- if (action.href) return renderActionLink(action.href);
156
+ const content = /* @__PURE__ */ jsxs("div", {
157
+ className: "flex flex-1 gap-2 items-center overflow-hidden p-2 rounded-md transition-[background-color] duration-200 ease-smooth delight-selection-press motion-reduce:transition-none",
158
+ children: [/* @__PURE__ */ jsxs("div", {
159
+ className: "flex flex-1 gap-2 items-center min-w-0",
160
+ children: [icon && /* @__PURE__ */ jsx("span", {
161
+ className: cn("shrink-0 [&>svg]:size-4 transition-transform duration-200 ease-smooth group-hover/menuitem:translate-x-0.5 motion-reduce:transition-none", destructive ? "text-destructive" : "text-foreground"),
162
+ children: icon
163
+ }), /* @__PURE__ */ jsx("span", {
164
+ className: cn("flex-1 text-sm truncate", destructive ? "text-destructive" : "text-secondary-foreground"),
165
+ children
166
+ })]
167
+ }), shortcut && /* @__PURE__ */ jsx(Kbd, {
168
+ variant: "outline",
169
+ size: "xs",
170
+ className: "shrink-0",
171
+ children: shortcut
172
+ })]
173
+ });
174
+ const baseClassName = cn("group/menuitem flex items-center px-1.5 py-0 w-full text-left cursor-pointer outline-none", "hover:[&>div]:bg-muted focus-visible:[&>div]:bg-muted", "focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-ring", disabled && "pointer-events-none opacity-50", className);
175
+ if (render) return render({
176
+ className: baseClassName,
177
+ onClick: handleClick,
178
+ children: content
179
+ });
82
180
  return /* @__PURE__ */ jsx("button", {
83
181
  type: "button",
84
- children: action.label
182
+ role: "menuitem",
183
+ "data-slot": "nav-account-menu-item",
184
+ className: baseClassName,
185
+ onClick: handleClick,
186
+ disabled,
187
+ "aria-disabled": disabled || void 0,
188
+ children: content
85
189
  });
86
190
  }
87
- function getPrimaryActionButtonType(action, isPolymorphic) {
88
- if (isPolymorphic) return;
89
- if (action.onClick) return "button";
90
- return "submit";
91
- }
92
- function AuthPrimaryActionButton({ action, loading }) {
93
- const isPolymorphic = !!(action.href || action.render);
94
- return /* @__PURE__ */ jsx(Button, {
95
- appearance: "solid",
96
- loading: !isPolymorphic ? loading : void 0,
97
- nativeButton: isPolymorphic ? false : void 0,
98
- render: isPolymorphic ? renderActionButton(action) : void 0,
99
- shape: "rounded",
100
- size: "md",
101
- type: getPrimaryActionButtonType(action, isPolymorphic),
102
- onClick: action.onClick,
103
- className: "w-full",
104
- children: action.label
105
- });
106
- }
107
- function AuthGhostAction({ action }) {
108
- const isPolymorphic = !!(action.href || action.render);
109
- return /* @__PURE__ */ jsx(Button, {
110
- appearance: "ghost",
111
- nativeButton: isPolymorphic ? false : void 0,
112
- render: renderActionButton(action),
113
- shape: "rounded",
114
- size: "md",
115
- type: isPolymorphic ? void 0 : "button",
116
- onClick: action.onClick,
117
- className: "w-full",
118
- children: action.label
191
+ function NavAccountMenuAccount({ avatar, name, email, selected = false, onSelect, className }) {
192
+ return /* @__PURE__ */ jsx("div", {
193
+ "data-slot": "nav-account-menu-account",
194
+ className: cn("flex items-center px-1.5 py-0 w-full", className),
195
+ children: /* @__PURE__ */ jsxs("button", {
196
+ type: "button",
197
+ role: "menuitemradio",
198
+ "aria-checked": selected,
199
+ "aria-label": `Switch to ${name} (${email})`,
200
+ className: cn("relative flex flex-1 gap-2 items-center overflow-hidden px-2 py-1.5 rounded-md cursor-pointer outline-none", "hover:bg-muted focus-visible:bg-muted", "transition-colors duration-200 ease-smooth motion-reduce:transition-none", "focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-ring", "text-left", selected && "bg-surface-2"),
201
+ onClick: onSelect,
202
+ children: [
203
+ avatar && /* @__PURE__ */ jsx("div", {
204
+ className: "shrink-0",
205
+ children: avatar
206
+ }),
207
+ /* @__PURE__ */ jsxs("div", {
208
+ className: "flex flex-col min-w-0 flex-1",
209
+ children: [/* @__PURE__ */ jsx("span", {
210
+ className: "text-sm font-semibold text-foreground truncate",
211
+ children: name
212
+ }), /* @__PURE__ */ jsx("span", {
213
+ className: "text-sm text-muted-foreground truncate",
214
+ children: email
215
+ })]
216
+ }),
217
+ /* @__PURE__ */ jsx("div", {
218
+ "aria-hidden": "true",
219
+ className: cn("size-4 rounded-full border-2 shrink-0 flex items-center justify-center transition-colors duration-200 ease-smooth motion-reduce:transition-none", selected ? "bg-primary border-primary" : "border-border bg-transparent"),
220
+ children: selected && /* @__PURE__ */ jsx("div", { className: "size-1.5 rounded-full bg-primary-foreground delight-check-bounce" })
221
+ })
222
+ ]
223
+ })
119
224
  });
120
225
  }
121
- function AuthInlineAction({ prefix, action }) {
122
- return /* @__PURE__ */ jsxs("p", {
123
- className: "text-center text-md leading-normal text-secondary-foreground",
124
- children: [/* @__PURE__ */ jsxs("span", { children: [prefix, " "] }), renderActionElement(action, "font-medium text-foreground transition-colors duration-150 ease-smooth hover:text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background")]
226
+ function NavAccountMenuSeparator({ className }) {
227
+ return /* @__PURE__ */ jsx("hr", {
228
+ "data-slot": "nav-account-menu-separator",
229
+ className: cn("h-px border-0 bg-border mx-5", className)
125
230
  });
126
231
  }
127
- function AuthSocialDivider({ label }) {
128
- return /* @__PURE__ */ jsxs("div", {
129
- className: "flex items-center gap-4",
130
- children: [
131
- /* @__PURE__ */ jsx(Separator, { className: "flex-1" }),
132
- /* @__PURE__ */ jsx("span", {
133
- className: "shrink-0 text-md text-foreground",
134
- children: label
135
- }),
136
- /* @__PURE__ */ jsx(Separator, { className: "flex-1" })
137
- ]
232
+ function NavAccountMenuFooter({ children, className }) {
233
+ return /* @__PURE__ */ jsx("div", {
234
+ "data-slot": "nav-account-menu-footer",
235
+ className: cn("flex items-center justify-center px-5 pt-4", className),
236
+ children
138
237
  });
139
238
  }
140
- function AuthSsoActions({ actions }) {
141
- if (!actions?.length) return null;
239
+ function NavAccountMenuThemeSwitch({ variant = "theme-gradient", size = "sm", checked, onCheckedChange, label, className }) {
240
+ const switchId = React.useId();
241
+ const labelId = label ? `${switchId}-label` : void 0;
142
242
  return /* @__PURE__ */ jsx("div", {
143
- className: "flex flex-col gap-3",
144
- children: actions.map((action, index) => {
145
- const isPolymorphic = !!(action.href || action.render);
146
- return /* @__PURE__ */ jsx(Button, {
147
- appearance: "outline",
148
- nativeButton: isPolymorphic ? false : void 0,
149
- render: renderActionButton(action),
150
- shape: "rounded",
151
- size: "default",
152
- type: isPolymorphic ? void 0 : "button",
153
- onClick: action.onClick,
154
- className: "w-full",
155
- children: action.label
156
- }, `${String(action.label)}-${index}`);
243
+ "data-slot": "nav-account-menu-theme-switch",
244
+ className: cn("flex items-center px-1.5 py-0", className),
245
+ children: /* @__PURE__ */ jsxs("div", {
246
+ className: "flex items-center gap-2.5 p-2",
247
+ children: [/* @__PURE__ */ jsx(Switch, {
248
+ id: switchId,
249
+ variant,
250
+ size,
251
+ checked,
252
+ onCheckedChange,
253
+ "aria-labelledby": labelId,
254
+ "aria-label": label ? void 0 : "Theme selector"
255
+ }), label && /* @__PURE__ */ jsx("label", {
256
+ htmlFor: switchId,
257
+ id: labelId,
258
+ className: "cursor-pointer text-sm text-secondary-foreground",
259
+ children: label
260
+ })]
157
261
  })
158
262
  });
159
263
  }
160
- var defaultLoginAside = {
161
- title: /* @__PURE__ */ jsxs(Fragment, { children: [
162
- "Welcome back!",
163
- /* @__PURE__ */ jsx("br", {}),
164
- "Please sign in to your Create Studio account"
165
- ] }),
166
- description: "Thank you for registering! Please check your inbox and click the verification link to activate your account.",
167
- cardTitle: "Please enter your login details",
168
- cardDescription: "Stay connected with Shadcn Studio Subscribe now for the latest updates and news."
169
- };
170
- var defaultRegisterAside = {
171
- title: "Create your account to get started.",
172
- description: "Your account will allow you to securely save your progress, customize your preferences, and stay connected across all your devices.",
173
- cardTitle: "We're excited to have you join our community",
174
- cardDescription: "Your account will allow you to securely save your progress, customize your preferences."
175
- };
176
- var defaultForgotPasswordAside = {
177
- title: "Don't worry, it happens! Resetting your password is quick and easy.",
178
- description: "Just enter your registered email address below, and we'll send you a secure link to reset your password. Follow the instructions in the email, and you'll be back in your account in no time!",
179
- cardTitle: "Follow the instructions",
180
- cardDescription: "If you don't see the email in your inbox, be sure to check your spam or junk folder."
181
- };
182
- var defaultResetPasswordAside = {
183
- title: "You're just one step away from regaining access to your account.",
184
- description: "Please create a new password below. Make sure it's strong and secure, combining letters, numbers, and special characters.",
185
- cardTitle: "Reset Your Password",
186
- cardDescription: "You're just one step away from regaining access to your account."
187
- };
188
- var defaultTwoFactorAside = {
189
- title: "Enable Two-Factor Authentication (2FA)",
190
- description: "Enhance the security of your account by enabling Two-Factor Authentication (2FA). With 2FA, you'll add an extra layer of protection.",
191
- cardTitle: "Keeps your information safe",
192
- cardDescription: "To get started, choose your preferred verification method and follow the instructions."
193
- };
194
- var defaultVerifyEmailAside = {
195
- title: "Ensure you entered the correct email address",
196
- description: "Thank you for signing up! To complete your registration and secure your account, we need to verify your email address.",
197
- cardTitle: "Verify Your Email Address",
198
- cardDescription: "Verifying your email helps us keep your account secure and ensures you won't miss important updates."
199
- };
264
+ NavAccountMenu.displayName = "NavAccountMenu";
265
+ NavAccountMenuTrigger.displayName = "NavAccountMenuTrigger";
266
+ NavAccountMenuContent.displayName = "NavAccountMenuContent";
267
+ NavAccountMenuHeader.displayName = "NavAccountMenuHeader";
268
+ NavAccountMenuSection.displayName = "NavAccountMenuSection";
269
+ NavAccountMenuItem.displayName = "NavAccountMenuItem";
270
+ NavAccountMenuAccount.displayName = "NavAccountMenuAccount";
271
+ NavAccountMenuSeparator.displayName = "NavAccountMenuSeparator";
272
+ NavAccountMenuFooter.displayName = "NavAccountMenuFooter";
273
+ NavAccountMenuThemeSwitch.displayName = "NavAccountMenuThemeSwitch";
200
274
  //#endregion
201
- export { AuthForm, AuthGhostAction, AuthInlineAction, AuthPasswordInput, AuthPrimaryActionButton, AuthPrimaryButton, AuthSocialDivider, AuthSsoActions, defaultForgotPasswordAside, defaultLoginAside, defaultRegisterAside, defaultResetPasswordAside, defaultTwoFactorAside, defaultVerifyEmailAside };
275
+ export { NavAccountMenu, NavAccountMenuAccount, NavAccountMenuContent, NavAccountMenuFooter, NavAccountMenuHeader, NavAccountMenuItem, NavAccountMenuSection, NavAccountMenuSeparator, NavAccountMenuThemeSwitch, NavAccountMenuTrigger, triggerVariants as navAccountMenuTriggerVariants };
202
276
 
203
277
  //# sourceMappingURL=index228.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index228.js","names":[],"sources":["../src/components/pages/_auth/auth-page-utils.tsx"],"sourcesContent":["'use client';\n\nimport { Eye, EyeOff } from 'lucide-react';\nimport * as React from 'react';\nimport { Button } from '@/components/atoms/buttons/Button';\nimport { Input, type InputProps } from '@/components/atoms/forms/Input';\nimport { Separator } from '@/components/atoms/layout/Separator';\nimport type {\n AuthPageAction,\n AuthPageAsideConfig,\n} from '@/components/templates/AuthPageLayout';\nimport { renderActionElement } from '@/components/templates/AuthPageLayout';\nimport { cn } from '@/lib/utils';\n\nexport interface AuthFormProps\n extends Omit<React.ComponentProps<'form'>, 'children'> {\n children: React.ReactNode;\n}\n\ntype ActionButtonRenderProps = React.ComponentProps<'button'>;\ntype ActionButtonType = React.ComponentProps<'button'>['type'];\ntype ActionButtonRender = (\n props: ActionButtonRenderProps,\n) => React.ReactElement;\ntype ActionRenderTargetProps = Omit<\n ActionButtonRenderProps,\n 'disabled' | 'ref' | 'role' | 'tabIndex' | 'type'\n>;\ntype ActionAnchorProps = Omit<React.ComponentProps<'a'>, 'href'>;\n\ninterface AuthPrimaryButtonProps {\n children: React.ReactNode;\n loading?: boolean;\n}\n\ninterface AuthActionButtonProps {\n action: AuthPageAction;\n loading?: boolean;\n}\n\ninterface AuthActionProps {\n action: AuthPageAction;\n}\n\ninterface AuthInlineActionProps {\n prefix: React.ReactNode;\n action: AuthPageAction;\n}\n\ninterface AuthSocialDividerProps {\n label: React.ReactNode;\n}\n\ninterface AuthSsoActionsProps {\n actions?: AuthPageAction[];\n}\n\ninterface AuthPasswordInputProps extends InputProps {\n visibilityLabel?: string;\n}\n\nexport function AuthForm({\n children,\n className,\n ...props\n}: AuthFormProps): React.ReactElement {\n return (\n <form className={cn('flex flex-col gap-4', className)} {...props}>\n {children}\n </form>\n );\n}\n\nexport function AuthPasswordInput({\n endIcon,\n visibilityLabel = 'password',\n ...props\n}: AuthPasswordInputProps): React.ReactElement {\n const [isVisible, setIsVisible] = React.useState(false);\n const label = `${isVisible ? 'Hide' : 'Show'} ${visibilityLabel}`;\n const VisibilityIcon = isVisible ? EyeOff : Eye;\n const toggle = (\n <button\n type=\"button\"\n aria-label={label}\n aria-pressed={isVisible}\n title={label}\n onClick={() => setIsVisible((value) => !value)}\n className=\"pointer-events-auto inline-flex size-5 items-center justify-center rounded-sm text-text-quaternary transition-colors duration-150 ease-smooth hover:text-secondary-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background\"\n >\n <VisibilityIcon aria-hidden className=\"size-4\" />\n </button>\n );\n\n return (\n <Input\n {...props}\n type={isVisible ? 'text' : 'password'}\n endIcon={\n endIcon ? (\n <span className=\"pointer-events-auto inline-flex items-center gap-2\">\n {endIcon}\n {toggle}\n </span>\n ) : (\n toggle\n )\n }\n />\n );\n}\n\nexport function AuthPrimaryButton({\n children,\n loading,\n}: AuthPrimaryButtonProps): React.ReactElement {\n return (\n <Button\n appearance=\"solid\"\n loading={loading}\n shape=\"rounded\"\n size=\"md\"\n type=\"submit\"\n className=\"w-full\"\n >\n {children}\n </Button>\n );\n}\n\nfunction getNonNativeActionProps({\n disabled: _disabled,\n ref: _ref,\n role: _role,\n tabIndex: _tabIndex,\n type: _type,\n ...props\n}: ActionButtonRenderProps): ActionRenderTargetProps {\n return props;\n}\n\nfunction renderActionLink(href: string): ActionButtonRender {\n return function renderLinkAction(\n props: ActionButtonRenderProps,\n ): React.ReactElement {\n const anchorProps = getNonNativeActionProps(props) as ActionAnchorProps;\n return <a {...anchorProps} href={href} />;\n };\n}\n\nfunction renderCustomActionElement(action: AuthPageAction): ActionButtonRender {\n return function renderCustomAction(\n buttonProps: ActionButtonRenderProps,\n ): React.ReactElement {\n const props = getNonNativeActionProps(buttonProps);\n if (!action.render) {\n return <button type=\"button\" {...props} />;\n }\n\n return React.cloneElement(action.render, {\n ...props,\n className: cn(props.className, action.render.props.className),\n onClick: action.onClick ?? action.render.props.onClick ?? props.onClick,\n children: action.render.props.children ?? props.children ?? action.label,\n });\n };\n}\n\nfunction renderActionButton(\n action: AuthPageAction,\n): React.ReactElement | ActionButtonRender {\n if (action.render) {\n return renderCustomActionElement(action);\n }\n\n if (action.href) {\n return renderActionLink(action.href);\n }\n\n return <button type=\"button\">{action.label}</button>;\n}\n\nfunction getPrimaryActionButtonType(\n action: AuthPageAction,\n isPolymorphic: boolean,\n): ActionButtonType {\n if (isPolymorphic) {\n return undefined;\n }\n\n if (action.onClick) {\n return 'button';\n }\n\n return 'submit';\n}\n\nexport function AuthPrimaryActionButton({\n action,\n loading,\n}: AuthActionButtonProps): React.ReactElement {\n const isPolymorphic = !!(action.href || action.render);\n const supportsLoading = !isPolymorphic;\n\n return (\n <Button\n appearance=\"solid\"\n loading={supportsLoading ? loading : undefined}\n nativeButton={isPolymorphic ? false : undefined}\n render={isPolymorphic ? renderActionButton(action) : undefined}\n shape=\"rounded\"\n size=\"md\"\n type={getPrimaryActionButtonType(action, isPolymorphic)}\n onClick={action.onClick}\n className=\"w-full\"\n >\n {action.label}\n </Button>\n );\n}\n\nexport function AuthGhostAction({\n action,\n}: AuthActionProps): React.ReactElement {\n const isPolymorphic = !!(action.href || action.render);\n\n return (\n <Button\n appearance=\"ghost\"\n nativeButton={isPolymorphic ? false : undefined}\n render={renderActionButton(action)}\n shape=\"rounded\"\n size=\"md\"\n type={isPolymorphic ? undefined : 'button'}\n onClick={action.onClick}\n className=\"w-full\"\n >\n {action.label}\n </Button>\n );\n}\n\nexport function AuthInlineAction({\n prefix,\n action,\n}: AuthInlineActionProps): React.ReactElement {\n const className =\n 'font-medium text-foreground transition-colors duration-150 ease-smooth hover:text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background';\n\n return (\n <p className=\"text-center text-md leading-normal text-secondary-foreground\">\n <span>{prefix} </span>\n {renderActionElement(action, className)}\n </p>\n );\n}\n\nexport function AuthSocialDivider({\n label,\n}: AuthSocialDividerProps): React.ReactElement {\n return (\n <div className=\"flex items-center gap-4\">\n <Separator className=\"flex-1\" />\n <span className=\"shrink-0 text-md text-foreground\">{label}</span>\n <Separator className=\"flex-1\" />\n </div>\n );\n}\n\nexport function AuthSsoActions({\n actions,\n}: AuthSsoActionsProps): React.ReactElement | null {\n if (!actions?.length) return null;\n\n return (\n <div className=\"flex flex-col gap-3\">\n {actions.map((action, index) => {\n const isPolymorphic = !!(action.href || action.render);\n\n return (\n <Button\n key={`${String(action.label)}-${index}`}\n appearance=\"outline\"\n nativeButton={isPolymorphic ? false : undefined}\n render={renderActionButton(action)}\n shape=\"rounded\"\n size=\"default\"\n type={isPolymorphic ? undefined : 'button'}\n onClick={action.onClick}\n className=\"w-full\"\n >\n {action.label}\n </Button>\n );\n })}\n </div>\n );\n}\n\nexport const defaultLoginAside: AuthPageAsideConfig = {\n title: (\n <>\n Welcome back!\n <br />\n Please sign in to your Create Studio account\n </>\n ),\n description:\n 'Thank you for registering! Please check your inbox and click the verification link to activate your account.',\n cardTitle: 'Please enter your login details',\n cardDescription:\n 'Stay connected with Shadcn Studio Subscribe now for the latest updates and news.',\n};\n\nexport const defaultRegisterAside: AuthPageAsideConfig = {\n title: 'Create your account to get started.',\n description:\n 'Your account will allow you to securely save your progress, customize your preferences, and stay connected across all your devices.',\n cardTitle: \"We're excited to have you join our community\",\n cardDescription:\n 'Your account will allow you to securely save your progress, customize your preferences.',\n};\n\nexport const defaultForgotPasswordAside: AuthPageAsideConfig = {\n title: \"Don't worry, it happens! Resetting your password is quick and easy.\",\n description:\n \"Just enter your registered email address below, and we'll send you a secure link to reset your password. Follow the instructions in the email, and you'll be back in your account in no time!\",\n cardTitle: 'Follow the instructions',\n cardDescription:\n \"If you don't see the email in your inbox, be sure to check your spam or junk folder.\",\n};\n\nexport const defaultResetPasswordAside: AuthPageAsideConfig = {\n title: \"You're just one step away from regaining access to your account.\",\n description:\n \"Please create a new password below. Make sure it's strong and secure, combining letters, numbers, and special characters.\",\n cardTitle: 'Reset Your Password',\n cardDescription:\n \"You're just one step away from regaining access to your account.\",\n};\n\nexport const defaultTwoFactorAside: AuthPageAsideConfig = {\n title: 'Enable Two-Factor Authentication (2FA)',\n description:\n \"Enhance the security of your account by enabling Two-Factor Authentication (2FA). With 2FA, you'll add an extra layer of protection.\",\n cardTitle: 'Keeps your information safe',\n cardDescription:\n 'To get started, choose your preferred verification method and follow the instructions.',\n};\n\nexport const defaultVerifyEmailAside: AuthPageAsideConfig = {\n title: 'Ensure you entered the correct email address',\n description:\n 'Thank you for signing up! To complete your registration and secure your account, we need to verify your email address.',\n cardTitle: 'Verify Your Email Address',\n cardDescription:\n \"Verifying your email helps us keep your account secure and ensures you won't miss important updates.\",\n};\n"],"mappings":";;;;;;;;;;AA6DA,SAAgB,SAAS,EACvB,UACA,WACA,GAAG,SACiC;CACpC,OACE,oBAAC,QAAD;EAAM,WAAW,GAAG,uBAAuB,SAAS;EAAG,GAAI;EACxD;CACG,CAAA;AAEV;AAEA,SAAgB,kBAAkB,EAChC,SACA,kBAAkB,YAClB,GAAG,SAC0C;CAC7C,MAAM,CAAC,WAAW,gBAAgB,MAAM,SAAS,KAAK;CACtD,MAAM,QAAQ,GAAG,YAAY,SAAS,OAAO,GAAG;CA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AChE,oBAAC,WAAD,EAAW,WAAU,SAAU,CAAA;EAC5B;;AAET;AAEA,SAAgB,eAAe,EAC7B,WACiD;CACjD,IAAI,CAAC,SAAS,QAAQ,OAAO;CAE7B,OACE,oBAAC,OAAD;EAAK,WAAU;YACZ,QAAQ,KAAK,QAAQ,UAAU;GAC9B,MAAM,gBAAgB,CAAC,EAAE,OAAO,QAAQ,OAAO;GAE/C,OACE,oBAAC,QAAD;IAEE,YAAW;IACX,cAAc,gBAAgB,QAAQ,KAAA;IACtC,QAAQ,mBAAmB,MAAM;IACjC,OAAM;IACN,MAAK;IACL,MAAM,gBAAgB,KAAA,IAAY;IAClC,SAAS,OAAO;IAChB,WAAU;cAET,OAAO;GACF,GAXD,GAAG,OAAO,OAAO,KAAK,EAAE,GAAG,OAW1B;EAEZ,CAAC;CACE,CAAA;AAET;AAEA,IAAa,oBAAyC;CACpD,OACE,qBAAA,UAAA,EAAA,UAAA;EAAE;EAEA,oBAAC,MAAD,CAAK,CAAA;EAAC;CAEN,EAAA,CAAA;CAEJ,aACE;CACF,WAAW;CACX,iBACE;AACJ;AAEA,IAAa,uBAA4C;CACvD,OAAO;CACP,aACE;CACF,WAAW;CACX,iBACE;AACJ;AAEA,IAAa,6BAAkD;CAC7D,OAAO;CACP,aACE;CACF,WAAW;CACX,iBACE;AACJ;AAEA,IAAa,4BAAiD;CAC5D,OAAO;CACP,aACE;CACF,WAAW;CACX,iBACE;AACJ;AAEA,IAAa,wBAA6C;CACxD,OAAO;CACP,aACE;CACF,WAAW;CACX,iBACE;AACJ;AAEA,IAAa,0BAA+C;CAC1D,OAAO;CACP,aACE;CACF,WAAW;CACX,iBACE;AACJ"}
1
+ {"version":3,"file":"index228.js","names":[],"sources":["../src/components/templates/NavAccountMenu/NavAccountMenu.tsx"],"sourcesContent":["'use client';\n\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { ChevronRight, LogOut } from 'lucide-react';\nimport * as React from 'react';\nimport { Switch } from '@/components/atoms/forms/Switch/Switch';\nimport { Kbd } from '@/components/molecules/data/Kbd';\nimport {\n PopoverRoot as PopoverBase,\n PopoverPopup as PopoverContentBase,\n PopoverTrigger as PopoverTriggerBase,\n} from '@/components/organisms/overlays/Popover';\nimport { useControllableState } from '@/hooks/use-controllable-state';\nimport { createSafeContext } from '@/lib/create-safe-context';\nimport { cn } from '@/lib/utils';\n\n// ============================================\n// Context for NavAccountMenu\n// ============================================\n\ninterface NavAccountMenuContextValue {\n type: 'card' | 'simple';\n open: boolean;\n onOpenChange: (open: boolean) => void;\n}\n\nconst [NavAccountMenuContext, useNavAccountMenuContext] =\n createSafeContext<NavAccountMenuContextValue>('NavAccountMenu');\n\n// ============================================\n// NavAccountMenu (Root)\n// ============================================\n\nexport interface NavAccountMenuProps {\n /** Trigger variant style */\n type?: 'card' | 'simple';\n /** Controlled open state */\n open?: boolean;\n /** Callback when open state changes */\n onOpenChange?: (open: boolean) => void;\n /** Initial open state for uncontrolled mode */\n defaultOpen?: boolean;\n /** Children (trigger + content) */\n children: React.ReactNode;\n}\n\nfunction NavAccountMenu({\n type = 'card',\n open: controlledOpen,\n defaultOpen = false,\n onOpenChange,\n children,\n}: NavAccountMenuProps) {\n const [open, handleOpenChange] = useControllableState({\n value: controlledOpen,\n defaultValue: defaultOpen,\n onChange: onOpenChange,\n });\n\n const contextValue = React.useMemo(\n () => ({\n type,\n open,\n onOpenChange: handleOpenChange,\n }),\n [type, open, handleOpenChange],\n );\n\n return (\n <NavAccountMenuContext.Provider value={contextValue}>\n <PopoverBase open={open} onOpenChange={handleOpenChange}>\n <div data-slot=\"nav-account-menu\">{children}</div>\n </PopoverBase>\n </NavAccountMenuContext.Provider>\n );\n}\n\n// ============================================\n// NavAccountMenuTrigger\n// ============================================\n\nconst triggerVariants = cva(\n 'flex items-center gap-4 w-full text-left cursor-pointer transition-colors duration-200 ease-smooth outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring motion-reduce:transition-none',\n {\n variants: {\n type: {\n card: 'bg-surface-1 border border-border rounded-xl shadow-xs p-3 hover:bg-surface-2',\n simple: 'border border-border px-2 py-3 hover:bg-surface-2 rounded-lg',\n },\n },\n defaultVariants: {\n type: 'card',\n },\n },\n);\n\nexport interface NavAccountMenuTriggerProps\n extends VariantProps<typeof triggerVariants> {\n /** Avatar element (use Avatar component) */\n avatar?: React.ReactNode;\n /** User display name */\n name: string;\n /** User email address */\n email?: string;\n /** Optional badge after name (e.g., \"External\" tag) */\n badge?: React.ReactNode;\n /** Show logout button instead of chevron (for 'simple' type) */\n showLogoutButton?: boolean;\n /** Logout callback for simple variant */\n onLogout?: () => void;\n /** Show only avatar without name/email - useful for collapsed sidebar */\n compact?: boolean;\n /** Additional className */\n className?: string;\n}\n\nfunction NavAccountMenuTrigger({\n avatar,\n name,\n email,\n badge,\n showLogoutButton,\n onLogout,\n compact = false,\n className,\n}: NavAccountMenuTriggerProps) {\n const { type, open } = useNavAccountMenuContext();\n\n const handleLogoutClick = (e: React.MouseEvent) => {\n e.stopPropagation();\n onLogout?.();\n };\n\n const avatarContent = avatar ? (\n <div className=\"shrink-0\">{avatar}</div>\n ) : null;\n const accountDetails = !compact ? (\n <div className=\"flex min-w-0 flex-1 flex-col\">\n <div className=\"flex min-w-0 items-center gap-2\">\n <span className=\"min-w-0 truncate text-sm font-semibold text-foreground\">\n {name}\n </span>\n {badge && <span className=\"shrink-0\">{badge}</span>}\n </div>\n {email && (\n <span className=\"truncate text-sm text-muted-foreground\">{email}</span>\n )}\n </div>\n ) : null;\n\n if (type === 'simple' && showLogoutButton && !compact) {\n return (\n <div\n data-slot=\"nav-account-menu-trigger\"\n className={cn(triggerVariants({ type }), 'group/trigger', className)}\n >\n <PopoverTriggerBase\n render={\n <button\n type=\"button\"\n aria-haspopup=\"true\"\n className=\"flex min-w-0 flex-1 items-center gap-4 text-left outline-none\"\n />\n }\n >\n {avatarContent}\n {accountDetails}\n </PopoverTriggerBase>\n <button\n type=\"button\"\n onClick={handleLogoutClick}\n className=\"shrink-0 rounded-md p-1.5 text-text-quaternary transition-colors duration-200 ease-smooth hover:bg-muted hover:text-secondary-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring motion-reduce:transition-none\"\n aria-label=\"Sign out\"\n >\n <LogOut className=\"size-5\" />\n </button>\n </div>\n );\n }\n\n return (\n <PopoverTriggerBase\n render={\n <button\n type=\"button\"\n data-slot=\"nav-account-menu-trigger\"\n aria-haspopup=\"true\"\n aria-label={compact ? `${name} account menu` : undefined}\n className={cn(\n triggerVariants({ type }),\n 'group/trigger',\n compact ? 'w-auto justify-center' : 'max-w-[280px]',\n className,\n )}\n />\n }\n >\n {avatarContent}\n {!compact && (\n <>\n {accountDetails}\n <ChevronRight\n className={cn(\n 'size-4 shrink-0 text-muted-foreground transition-transform duration-200 ease-smooth motion-reduce:transition-none',\n open ? 'rotate-180' : 'rtl:rotate-180',\n )}\n />\n </>\n )}\n </PopoverTriggerBase>\n );\n}\n\n// ============================================\n// NavAccountMenuContent\n// ============================================\n\nexport interface NavAccountMenuContentProps {\n /** Popover side positioning */\n side?: 'top' | 'right' | 'bottom' | 'left';\n /** Popover alignment */\n align?: 'start' | 'center' | 'end';\n /** Side offset */\n sideOffset?: number;\n /** Children */\n children: React.ReactNode;\n /** Additional className */\n className?: string;\n}\n\nfunction NavAccountMenuContent({\n side = 'right',\n align = 'end',\n sideOffset = 8,\n children,\n className,\n}: NavAccountMenuContentProps) {\n return (\n <PopoverContentBase\n side={side}\n align={align}\n sideOffset={sideOffset}\n aria-label=\"Account menu\"\n data-slot=\"nav-account-menu-content\"\n className={cn(\n 'w-[300px] max-w-[calc(100vw-2rem)] p-0 gap-0 bg-popover border border-border rounded-[14px] overflow-hidden',\n 'shadow-[0px_12px_16px_-4px_color-mix(in_srgb,var(--foreground)_8%,transparent),0px_4px_6px_-2px_color-mix(in_srgb,var(--foreground)_3%,transparent),0px_2px_2px_-1px_color-mix(in_srgb,var(--foreground)_4%,transparent)]',\n 'data-open:animate-in data-closed:animate-out',\n 'data-closed:fade-out-0 data-open:fade-in-0',\n 'data-closed:zoom-out-95 data-open:zoom-in-95',\n 'data-[side=bottom]:slide-in-from-top-2',\n 'data-[side=left]:slide-in-from-right-2',\n 'data-[side=right]:slide-in-from-left-2',\n 'data-[side=top]:slide-in-from-bottom-2',\n 'duration-200 motion-reduce:animate-none',\n className,\n )}\n >\n <div className=\"flex flex-col py-2\" role=\"menu\" aria-label=\"Account menu\">\n {children}\n </div>\n </PopoverContentBase>\n );\n}\n\n// ============================================\n// NavAccountMenuHeader\n// ============================================\n\nexport interface NavAccountMenuHeaderProps {\n /** Header title (e.g. \"Profile\") */\n title: string;\n /** Subtitle text or custom React node (e.g. \"Last login 22 May, 2026 11:30pm\") */\n subtitle?: React.ReactNode;\n /** Additional className */\n className?: string;\n}\n\nfunction NavAccountMenuHeader({\n title,\n subtitle,\n className,\n}: NavAccountMenuHeaderProps) {\n return (\n <div\n data-slot=\"nav-account-menu-header\"\n className={cn('px-6 pb-3 delight-fade-in', className)}\n >\n <p className=\"text-base font-semibold text-foreground\">{title}</p>\n {subtitle &&\n (typeof subtitle === 'string' ? (\n <p className=\"mt-2 text-sm text-muted-foreground\">{subtitle}</p>\n ) : (\n <div className=\"mt-2\">{subtitle}</div>\n ))}\n </div>\n );\n}\n\n// ============================================\n// NavAccountMenuSection\n// ============================================\n\nexport interface NavAccountMenuSectionProps {\n /** Optional section header label */\n label?: string;\n /** Show top border separator between sections */\n bordered?: boolean;\n /** Section content */\n children: React.ReactNode;\n /** Additional className */\n className?: string;\n}\n\nfunction NavAccountMenuSection({\n label,\n bordered = false,\n children,\n className,\n}: NavAccountMenuSectionProps) {\n return (\n <section\n data-slot=\"nav-account-menu-section\"\n aria-label={label}\n className={cn(\n 'flex flex-col gap-1 py-1.5',\n bordered && 'border-t border-border',\n className,\n )}\n >\n {label && (\n <div className=\"px-3 pt-1.5 pb-1\">\n <span className=\"text-xs font-semibold text-muted-foreground\">\n {label}\n </span>\n </div>\n )}\n {children}\n </section>\n );\n}\n\n// ============================================\n// NavAccountMenuItem\n// ============================================\n\n/**\n * Props passed to the render function for custom menu item rendering.\n */\nexport interface NavAccountMenuItemRenderProps {\n /** Combined className for styling */\n className: string;\n /** Click handler that closes menu and triggers onSelect */\n onClick: () => void;\n /** Menu item content (icon, label, shortcut) */\n children: React.ReactNode;\n}\n\n/**\n * Render prop type for polymorphic rendering.\n * Accepts a function that receives props and returns an element.\n */\ntype NavAccountMenuItemRenderFn = (\n props: NavAccountMenuItemRenderProps,\n) => React.ReactElement;\n\nexport interface NavAccountMenuItemProps {\n /** Left icon (20px) */\n icon?: React.ReactNode;\n /** Keyboard shortcut display */\n shortcut?: string;\n /** Destructive styling (red) */\n destructive?: boolean;\n /** Disabled state */\n disabled?: boolean;\n /** Selection callback */\n onSelect?: () => void;\n /**\n * Render prop for polymorphic rendering.\n * Use this to render the menu item as a different element (e.g., link).\n * @example\n * <NavAccountMenuItem\n * icon={<User01 />}\n * render={(props) => <a {...props} href=\"/profile\" />}\n * >\n * View profile\n * </NavAccountMenuItem>\n */\n render?: NavAccountMenuItemRenderFn;\n /** Label text */\n children: React.ReactNode;\n /** Additional className */\n className?: string;\n}\n\nfunction NavAccountMenuItem({\n icon,\n shortcut,\n destructive = false,\n disabled = false,\n onSelect,\n render,\n children,\n className,\n}: NavAccountMenuItemProps) {\n const { onOpenChange } = useNavAccountMenuContext();\n\n const handleClick = () => {\n if (disabled) return;\n onSelect?.();\n onOpenChange(false);\n };\n\n const content = (\n <div className=\"flex flex-1 gap-2 items-center overflow-hidden p-2 rounded-md transition-[background-color] duration-200 ease-smooth delight-selection-press motion-reduce:transition-none\">\n <div className=\"flex flex-1 gap-2 items-center min-w-0\">\n {icon && (\n <span\n className={cn(\n 'shrink-0 [&>svg]:size-4 transition-transform duration-200 ease-smooth group-hover/menuitem:translate-x-0.5 motion-reduce:transition-none',\n destructive ? 'text-destructive' : 'text-foreground',\n )}\n >\n {icon}\n </span>\n )}\n <span\n className={cn(\n 'flex-1 text-sm truncate',\n destructive ? 'text-destructive' : 'text-secondary-foreground',\n )}\n >\n {children}\n </span>\n </div>\n {shortcut && (\n <Kbd variant=\"outline\" size=\"xs\" className=\"shrink-0\">\n {shortcut}\n </Kbd>\n )}\n </div>\n );\n\n const baseClassName = cn(\n 'group/menuitem flex items-center px-1.5 py-0 w-full text-left cursor-pointer outline-none',\n 'hover:[&>div]:bg-muted focus-visible:[&>div]:bg-muted',\n 'focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-ring',\n disabled && 'pointer-events-none opacity-50',\n className,\n );\n\n if (render) {\n return render({\n className: baseClassName,\n onClick: handleClick,\n children: content,\n });\n }\n\n return (\n <button\n type=\"button\"\n role=\"menuitem\"\n data-slot=\"nav-account-menu-item\"\n className={baseClassName}\n onClick={handleClick}\n disabled={disabled}\n aria-disabled={disabled || undefined}\n >\n {content}\n </button>\n );\n}\n\n// ============================================\n// NavAccountMenuAccount\n// ============================================\n\nexport interface NavAccountMenuAccountProps {\n /** Avatar element */\n avatar?: React.ReactNode;\n /** Account display name */\n name: string;\n /** Account email */\n email: string;\n /** Whether this account is currently selected */\n selected?: boolean;\n /** Selection callback */\n onSelect?: () => void;\n /** Additional className */\n className?: string;\n}\n\nfunction NavAccountMenuAccount({\n avatar,\n name,\n email,\n selected = false,\n onSelect,\n className,\n}: NavAccountMenuAccountProps) {\n return (\n <div\n data-slot=\"nav-account-menu-account\"\n className={cn('flex items-center px-1.5 py-0 w-full', className)}\n >\n <button\n type=\"button\"\n role=\"menuitemradio\"\n aria-checked={selected}\n aria-label={`Switch to ${name} (${email})`}\n className={cn(\n 'relative flex flex-1 gap-2 items-center overflow-hidden px-2 py-1.5 rounded-md cursor-pointer outline-none',\n 'hover:bg-muted focus-visible:bg-muted',\n 'transition-colors duration-200 ease-smooth motion-reduce:transition-none',\n 'focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-ring',\n 'text-left',\n selected && 'bg-surface-2',\n )}\n onClick={onSelect}\n >\n {avatar && <div className=\"shrink-0\">{avatar}</div>}\n <div className=\"flex flex-col min-w-0 flex-1\">\n <span className=\"text-sm font-semibold text-foreground truncate\">\n {name}\n </span>\n <span className=\"text-sm text-muted-foreground truncate\">\n {email}\n </span>\n </div>\n {/* Radio indicator */}\n <div\n aria-hidden=\"true\"\n className={cn(\n 'size-4 rounded-full border-2 shrink-0 flex items-center justify-center transition-colors duration-200 ease-smooth motion-reduce:transition-none',\n selected\n ? 'bg-primary border-primary'\n : 'border-border bg-transparent',\n )}\n >\n {selected && (\n <div className=\"size-1.5 rounded-full bg-primary-foreground delight-check-bounce\" />\n )}\n </div>\n </button>\n </div>\n );\n}\n\n// ============================================\n// NavAccountMenuSeparator\n// ============================================\n\nexport interface NavAccountMenuSeparatorProps {\n /** Additional className */\n className?: string;\n}\n\nfunction NavAccountMenuSeparator({ className }: NavAccountMenuSeparatorProps) {\n return (\n <hr\n data-slot=\"nav-account-menu-separator\"\n className={cn('h-px border-0 bg-border mx-5', className)}\n />\n );\n}\n\n// ============================================\n// NavAccountMenuFooter\n// ============================================\n\nexport interface NavAccountMenuFooterProps {\n /** Footer content (typically buttons) */\n children: React.ReactNode;\n /** Additional className */\n className?: string;\n}\n\nfunction NavAccountMenuFooter({\n children,\n className,\n}: NavAccountMenuFooterProps) {\n return (\n <div\n data-slot=\"nav-account-menu-footer\"\n className={cn('flex items-center justify-center px-5 pt-4', className)}\n >\n {children}\n </div>\n );\n}\n\n// ============================================\n// NavAccountMenuThemeSwitch (uses Switch theme variant)\n// ============================================\n\nexport interface NavAccountMenuThemeSwitchProps {\n /** Switch theme variant to render */\n variant?:\n | 'theme-gradient'\n | 'theme-switch'\n | 'theme-pill'\n | 'theme-segmented';\n /** Switch size */\n size?: 'sm' | 'md' | 'lg';\n /** Controlled checked state (dark = checked) */\n checked?: boolean;\n /** Callback when checked state changes */\n onCheckedChange?: (checked: boolean) => void;\n /** Optional label displayed next to the switch (e.g. \"Light Mode\") */\n label?: string;\n /** Additional className */\n className?: string;\n}\n\nfunction NavAccountMenuThemeSwitch({\n variant = 'theme-gradient',\n size = 'sm',\n checked,\n onCheckedChange,\n label,\n className,\n}: NavAccountMenuThemeSwitchProps) {\n const switchId = React.useId();\n const labelId = label ? `${switchId}-label` : undefined;\n\n return (\n <div\n data-slot=\"nav-account-menu-theme-switch\"\n className={cn('flex items-center px-1.5 py-0', className)}\n >\n <div className=\"flex items-center gap-2.5 p-2\">\n <Switch\n id={switchId}\n variant={variant}\n size={size}\n checked={checked}\n onCheckedChange={onCheckedChange}\n aria-labelledby={labelId}\n aria-label={label ? undefined : 'Theme selector'}\n />\n {label && (\n <label\n htmlFor={switchId}\n id={labelId}\n className=\"cursor-pointer text-sm text-secondary-foreground\"\n >\n {label}\n </label>\n )}\n </div>\n </div>\n );\n}\n\n// ============================================\n// Display Names\n// ============================================\n\nNavAccountMenu.displayName = 'NavAccountMenu';\nNavAccountMenuTrigger.displayName = 'NavAccountMenuTrigger';\nNavAccountMenuContent.displayName = 'NavAccountMenuContent';\nNavAccountMenuHeader.displayName = 'NavAccountMenuHeader';\nNavAccountMenuSection.displayName = 'NavAccountMenuSection';\nNavAccountMenuItem.displayName = 'NavAccountMenuItem';\nNavAccountMenuAccount.displayName = 'NavAccountMenuAccount';\nNavAccountMenuSeparator.displayName = 'NavAccountMenuSeparator';\nNavAccountMenuFooter.displayName = 'NavAccountMenuFooter';\nNavAccountMenuThemeSwitch.displayName = 'NavAccountMenuThemeSwitch';\n\n// ============================================\n// Exports\n// ============================================\n\nexport {\n NavAccountMenu,\n NavAccountMenuAccount,\n NavAccountMenuContent,\n NavAccountMenuFooter,\n NavAccountMenuHeader,\n NavAccountMenuItem,\n NavAccountMenuSection,\n NavAccountMenuSeparator,\n NavAccountMenuThemeSwitch,\n NavAccountMenuTrigger,\n triggerVariants as navAccountMenuTriggerVariants,\n};\n"],"mappings":";;;;;;;;;;;;AA0BA,IAAM,CAAC,uBAAuB,4BAC5B,kBAA8C,gBAAgB;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