@caffeinebounce/ui 0.62.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.
Files changed (143) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +39 -0
  3. package/dist/FinancialStatementTable-BNUrdTU4.d.cts +249 -0
  4. package/dist/FinancialStatementTable-BNUrdTU4.d.ts +249 -0
  5. package/dist/NewsletterSignup-BPreFi5W.d.cts +37 -0
  6. package/dist/NewsletterSignup-BPreFi5W.d.ts +37 -0
  7. package/dist/TestimonialsSection-DtPu2OeR.d.ts +736 -0
  8. package/dist/TestimonialsSection-z-yotRfv.d.cts +736 -0
  9. package/dist/UnifiedTableControls-CG299y9h.d.ts +1233 -0
  10. package/dist/UnifiedTableControls-CIjRpNhy.d.cts +1233 -0
  11. package/dist/blog.d.cts +99 -0
  12. package/dist/blog.d.ts +99 -0
  13. package/dist/blog.js +292 -0
  14. package/dist/blog.mjs +279 -0
  15. package/dist/button-BHnoRUkF.d.cts +34 -0
  16. package/dist/button-BHnoRUkF.d.ts +34 -0
  17. package/dist/charts.d.cts +80 -0
  18. package/dist/charts.d.ts +80 -0
  19. package/dist/charts.js +19 -0
  20. package/dist/charts.mjs +2 -0
  21. package/dist/chunk-33JR5SYE.js +44 -0
  22. package/dist/chunk-3NDB4YPC.js +247 -0
  23. package/dist/chunk-5RW4PYZ6.js +1504 -0
  24. package/dist/chunk-5THF4YP6.mjs +155 -0
  25. package/dist/chunk-6BUBNZPG.mjs +164 -0
  26. package/dist/chunk-6DVWMJ3H.mjs +7029 -0
  27. package/dist/chunk-6TGV2DNP.js +120 -0
  28. package/dist/chunk-72JGQ7IJ.mjs +1498 -0
  29. package/dist/chunk-7DHKQODW.mjs +2932 -0
  30. package/dist/chunk-7IKHZKAC.js +160 -0
  31. package/dist/chunk-ADIDI7AJ.js +11 -0
  32. package/dist/chunk-BFWX5GJZ.mjs +940 -0
  33. package/dist/chunk-BMFQG6RA.mjs +5537 -0
  34. package/dist/chunk-C4UT5V3P.js +65 -0
  35. package/dist/chunk-CC4KUIKC.js +2004 -0
  36. package/dist/chunk-D3QXPL47.mjs +1814 -0
  37. package/dist/chunk-DQWHYBV2.js +36 -0
  38. package/dist/chunk-E42B4GSB.js +993 -0
  39. package/dist/chunk-ESZ7CBA2.js +1007 -0
  40. package/dist/chunk-EYJJQVV4.js +111 -0
  41. package/dist/chunk-FRRS2YZH.mjs +129 -0
  42. package/dist/chunk-G5TQWWQA.mjs +37 -0
  43. package/dist/chunk-GAIQJCAZ.js +5612 -0
  44. package/dist/chunk-GMBGWOCR.mjs +48 -0
  45. package/dist/chunk-GUSTCU2W.mjs +105 -0
  46. package/dist/chunk-HBLKVQIQ.mjs +23 -0
  47. package/dist/chunk-HMAMMC72.js +26 -0
  48. package/dist/chunk-IMKLN273.mjs +9 -0
  49. package/dist/chunk-J6OLBSZR.js +250 -0
  50. package/dist/chunk-JAE45W2T.js +28 -0
  51. package/dist/chunk-JORVSG52.js +606 -0
  52. package/dist/chunk-KB7UXIQZ.mjs +984 -0
  53. package/dist/chunk-KGGQ5NZV.js +186 -0
  54. package/dist/chunk-KHCC5UKW.mjs +22 -0
  55. package/dist/chunk-KRRIRS6A.mjs +1945 -0
  56. package/dist/chunk-LQCVRWVF.js +48 -0
  57. package/dist/chunk-MHZXUOGN.mjs +168 -0
  58. package/dist/chunk-MPZFPU4X.js +349 -0
  59. package/dist/chunk-MVYRNJA6.js +74 -0
  60. package/dist/chunk-N6AFNFZR.mjs +565 -0
  61. package/dist/chunk-OFQLWSUR.mjs +214 -0
  62. package/dist/chunk-OLAAXLXY.mjs +219 -0
  63. package/dist/chunk-OZZWDIOY.js +1859 -0
  64. package/dist/chunk-PZRI43EZ.js +111 -0
  65. package/dist/chunk-Q256HRYD.js +176 -0
  66. package/dist/chunk-Q52ZEL62.mjs +223 -0
  67. package/dist/chunk-R26Y7LGJ.js +142 -0
  68. package/dist/chunk-RBUYW6QQ.js +39 -0
  69. package/dist/chunk-RVEFPVZF.mjs +43 -0
  70. package/dist/chunk-SORWLKOK.js +96 -0
  71. package/dist/chunk-STEP6C4C.mjs +33 -0
  72. package/dist/chunk-T5R6HUDG.mjs +22 -0
  73. package/dist/chunk-T6ZBA6VJ.js +7109 -0
  74. package/dist/chunk-UM7WMXIU.js +2995 -0
  75. package/dist/chunk-VBD4Q5LL.mjs +117 -0
  76. package/dist/chunk-WOITB4JL.js +195 -0
  77. package/dist/chunk-YKZEKJMZ.mjs +71 -0
  78. package/dist/chunk-YL7RZRHM.mjs +103 -0
  79. package/dist/chunk-YSLD2HLP.mjs +346 -0
  80. package/dist/chunk-ZFLZA7UP.mjs +140 -0
  81. package/dist/chunk-ZKUIUE7W.mjs +26 -0
  82. package/dist/chunk-ZOA7B32D.js +248 -0
  83. package/dist/data-table.d.cts +46 -0
  84. package/dist/data-table.d.ts +46 -0
  85. package/dist/data-table.js +270 -0
  86. package/dist/data-table.mjs +13 -0
  87. package/dist/editor.d.cts +89 -0
  88. package/dist/editor.d.ts +89 -0
  89. package/dist/editor.js +10 -0
  90. package/dist/editor.mjs +1 -0
  91. package/dist/forms.d.cts +142 -0
  92. package/dist/forms.d.ts +142 -0
  93. package/dist/forms.js +24 -0
  94. package/dist/forms.mjs +11 -0
  95. package/dist/hooks-8ORd7T1A.d.cts +751 -0
  96. package/dist/hooks-B2jU1GVT.d.ts +751 -0
  97. package/dist/hooks.d.cts +6 -0
  98. package/dist/hooks.d.ts +6 -0
  99. package/dist/hooks.js +99 -0
  100. package/dist/hooks.mjs +10 -0
  101. package/dist/index.d.cts +3141 -0
  102. package/dist/index.d.ts +3141 -0
  103. package/dist/index.js +7332 -0
  104. package/dist/index.mjs +5876 -0
  105. package/dist/layouts-DPfDDF53.d.cts +1001 -0
  106. package/dist/layouts-DPfDDF53.d.ts +1001 -0
  107. package/dist/layouts.d.cts +4 -0
  108. package/dist/layouts.d.ts +4 -0
  109. package/dist/layouts.js +100 -0
  110. package/dist/layouts.mjs +11 -0
  111. package/dist/marketing-3d.d.cts +51 -0
  112. package/dist/marketing-3d.d.ts +51 -0
  113. package/dist/marketing-3d.js +553 -0
  114. package/dist/marketing-3d.mjs +526 -0
  115. package/dist/marketing.d.cts +583 -0
  116. package/dist/marketing.d.ts +583 -0
  117. package/dist/marketing.js +299 -0
  118. package/dist/marketing.mjs +10 -0
  119. package/dist/media.d.cts +29 -0
  120. package/dist/media.d.ts +29 -0
  121. package/dist/media.js +189 -0
  122. package/dist/media.mjs +182 -0
  123. package/dist/navigation.d.cts +591 -0
  124. package/dist/navigation.d.ts +591 -0
  125. package/dist/navigation.js +108 -0
  126. package/dist/navigation.mjs +15 -0
  127. package/dist/portal.d.cts +58 -0
  128. package/dist/portal.d.ts +58 -0
  129. package/dist/portal.js +403 -0
  130. package/dist/portal.mjs +395 -0
  131. package/dist/primitives.d.cts +508 -0
  132. package/dist/primitives.d.ts +508 -0
  133. package/dist/primitives.js +295 -0
  134. package/dist/primitives.mjs +14 -0
  135. package/dist/settings.d.cts +216 -0
  136. package/dist/settings.d.ts +216 -0
  137. package/dist/settings.js +34 -0
  138. package/dist/settings.mjs +9 -0
  139. package/dist/shared-Dqn36QHZ.d.cts +4 -0
  140. package/dist/shared-Dqn36QHZ.d.ts +4 -0
  141. package/dist/styles.css +1213 -0
  142. package/package.json +189 -0
  143. package/styles.css +1 -0
@@ -0,0 +1,1859 @@
1
+ 'use strict';
2
+
3
+ var chunkR26Y7LGJ_js = require('./chunk-R26Y7LGJ.js');
4
+ var chunkC4UT5V3P_js = require('./chunk-C4UT5V3P.js');
5
+ var chunkE42B4GSB_js = require('./chunk-E42B4GSB.js');
6
+ var chunkLQCVRWVF_js = require('./chunk-LQCVRWVF.js');
7
+ var chunkHMAMMC72_js = require('./chunk-HMAMMC72.js');
8
+ var chunkRBUYW6QQ_js = require('./chunk-RBUYW6QQ.js');
9
+ var chunk6TGV2DNP_js = require('./chunk-6TGV2DNP.js');
10
+ var chunkJ6OLBSZR_js = require('./chunk-J6OLBSZR.js');
11
+ var chunkSORWLKOK_js = require('./chunk-SORWLKOK.js');
12
+ var chunkDQWHYBV2_js = require('./chunk-DQWHYBV2.js');
13
+ var chunkQ256HRYD_js = require('./chunk-Q256HRYD.js');
14
+ var chunkADIDI7AJ_js = require('./chunk-ADIDI7AJ.js');
15
+ var NavigationMenuPrimitive = require('@radix-ui/react-navigation-menu');
16
+ var jsxRuntime = require('react/jsx-runtime');
17
+ var lucideReact = require('lucide-react');
18
+ var Image = require('next/image');
19
+ var navigation = require('next/navigation');
20
+ var react = require('react');
21
+ var react$1 = require('motion/react');
22
+
23
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
24
+
25
+ function _interopNamespace(e) {
26
+ if (e && e.__esModule) return e;
27
+ var n = Object.create(null);
28
+ if (e) {
29
+ Object.keys(e).forEach(function (k) {
30
+ if (k !== 'default') {
31
+ var d = Object.getOwnPropertyDescriptor(e, k);
32
+ Object.defineProperty(n, k, d.get ? d : {
33
+ enumerable: true,
34
+ get: function () { return e[k]; }
35
+ });
36
+ }
37
+ });
38
+ }
39
+ n.default = e;
40
+ return Object.freeze(n);
41
+ }
42
+
43
+ var NavigationMenuPrimitive__namespace = /*#__PURE__*/_interopNamespace(NavigationMenuPrimitive);
44
+ var Image__default = /*#__PURE__*/_interopDefault(Image);
45
+
46
+ function NavigationMenu({
47
+ className,
48
+ ...props
49
+ }) {
50
+ return /* @__PURE__ */ jsxRuntime.jsx(
51
+ NavigationMenuPrimitive__namespace.Root,
52
+ {
53
+ "data-slot": "navigation-menu",
54
+ className: chunkADIDI7AJ_js.cn(
55
+ "relative z-10 flex max-w-max flex-1 items-center justify-center",
56
+ className
57
+ ),
58
+ ...props
59
+ }
60
+ );
61
+ }
62
+ function NavigationMenuList({
63
+ className,
64
+ ...props
65
+ }) {
66
+ return /* @__PURE__ */ jsxRuntime.jsx(
67
+ NavigationMenuPrimitive__namespace.List,
68
+ {
69
+ "data-slot": "navigation-menu-list",
70
+ className: chunkADIDI7AJ_js.cn(
71
+ "group flex flex-1 list-none items-center justify-center gap-1",
72
+ className
73
+ ),
74
+ ...props
75
+ }
76
+ );
77
+ }
78
+ function NavigationMenuItem({
79
+ className,
80
+ ...props
81
+ }) {
82
+ return /* @__PURE__ */ jsxRuntime.jsx(
83
+ NavigationMenuPrimitive__namespace.Item,
84
+ {
85
+ "data-slot": "navigation-menu-item",
86
+ className: chunkADIDI7AJ_js.cn("relative", className),
87
+ ...props
88
+ }
89
+ );
90
+ }
91
+ function NavigationMenuTrigger({
92
+ className,
93
+ children,
94
+ ...props
95
+ }) {
96
+ return /* @__PURE__ */ jsxRuntime.jsx(
97
+ NavigationMenuPrimitive__namespace.Trigger,
98
+ {
99
+ "data-slot": "navigation-menu-trigger",
100
+ className: chunkADIDI7AJ_js.cn(navigationMenuTriggerStyle(), className),
101
+ ...props,
102
+ children
103
+ }
104
+ );
105
+ }
106
+ function NavigationMenuContent({
107
+ className,
108
+ ...props
109
+ }) {
110
+ return /* @__PURE__ */ jsxRuntime.jsx(
111
+ NavigationMenuPrimitive__namespace.Content,
112
+ {
113
+ "data-slot": "navigation-menu-content",
114
+ className: chunkADIDI7AJ_js.cn(
115
+ "absolute top-full left-0 z-50 w-max min-w-full rounded-md border bg-popover p-2 text-popover-foreground shadow-lg",
116
+ "data-[motion=from-end]:animate-in data-[motion=from-start]:animate-in data-[motion=to-end]:animate-out data-[motion=to-start]:animate-out",
117
+ "data-[motion=from-end]:slide-in-from-right-4 data-[motion=from-start]:slide-in-from-left-4 data-[motion=to-end]:slide-out-to-right-4 data-[motion=to-start]:slide-out-to-left-4",
118
+ className
119
+ ),
120
+ ...props
121
+ }
122
+ );
123
+ }
124
+ function NavigationMenuLink({
125
+ className,
126
+ ...props
127
+ }) {
128
+ return /* @__PURE__ */ jsxRuntime.jsx(
129
+ NavigationMenuPrimitive__namespace.Link,
130
+ {
131
+ "data-slot": "navigation-menu-link",
132
+ className: chunkADIDI7AJ_js.cn(
133
+ "block select-none rounded-sm px-2 py-1.5 text-sm leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground",
134
+ className
135
+ ),
136
+ ...props
137
+ }
138
+ );
139
+ }
140
+ function NavigationMenuIndicator({
141
+ className,
142
+ ...props
143
+ }) {
144
+ return /* @__PURE__ */ jsxRuntime.jsx(
145
+ NavigationMenuPrimitive__namespace.Indicator,
146
+ {
147
+ "data-slot": "navigation-menu-indicator",
148
+ className: chunkADIDI7AJ_js.cn(
149
+ "top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in",
150
+ className
151
+ ),
152
+ ...props,
153
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative top-[60%] size-2 rotate-45 rounded-tl-sm bg-border shadow-md" })
154
+ }
155
+ );
156
+ }
157
+ function NavigationMenuViewport({
158
+ className,
159
+ ...props
160
+ }) {
161
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-full left-0 flex justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
162
+ NavigationMenuPrimitive__namespace.Viewport,
163
+ {
164
+ "data-slot": "navigation-menu-viewport",
165
+ className: chunkADIDI7AJ_js.cn(
166
+ "origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]",
167
+ className
168
+ ),
169
+ ...props
170
+ }
171
+ ) });
172
+ }
173
+ function navigationMenuTriggerStyle() {
174
+ return chunkADIDI7AJ_js.cn(
175
+ "group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-3 py-2 text-sm font-medium transition-colors",
176
+ "hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50"
177
+ );
178
+ }
179
+ var NavigationMenuViewportPrimitive = NavigationMenuPrimitive__namespace.Viewport;
180
+ function AppSwitcher({
181
+ apps,
182
+ brandName = "App",
183
+ brandLogoUrl,
184
+ getActiveAppId,
185
+ ShortcutComponent,
186
+ className
187
+ }) {
188
+ const pathname = navigation.usePathname();
189
+ const router = navigation.useRouter();
190
+ const [open, setOpen] = react.useState(false);
191
+ const Shortcut = ShortcutComponent || chunkE42B4GSB_js.KeyboardShortcut;
192
+ const activeApp = react.useMemo(() => {
193
+ if (getActiveAppId) {
194
+ const activeId = getActiveAppId(pathname);
195
+ return apps.find((app) => app.id === activeId) || apps[0] || null;
196
+ }
197
+ const matchedApp = apps.find((app) => pathname.startsWith(app.route));
198
+ return matchedApp || apps[0] || null;
199
+ }, [apps, pathname, getActiveAppId]);
200
+ const handleSelect = react.useCallback(
201
+ (app) => {
202
+ if (app.id !== activeApp?.id) {
203
+ router.push(app.route);
204
+ }
205
+ setOpen(false);
206
+ },
207
+ [activeApp?.id, router]
208
+ );
209
+ react.useEffect(() => {
210
+ const handleKeyDown = (event) => {
211
+ if (event.ctrlKey && !event.shiftKey && !event.altKey && !event.metaKey) {
212
+ const num = Number.parseInt(event.key, 10);
213
+ if (num >= 1 && num <= 9 && num <= apps.length) {
214
+ event.preventDefault();
215
+ const app = apps[num - 1];
216
+ if (app) {
217
+ handleSelect(app);
218
+ }
219
+ }
220
+ }
221
+ };
222
+ window.addEventListener("keydown", handleKeyDown);
223
+ return () => window.removeEventListener("keydown", handleKeyDown);
224
+ }, [apps, handleSelect]);
225
+ if (!activeApp) {
226
+ return null;
227
+ }
228
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkE42B4GSB_js.SidebarMenu, { className, children: /* @__PURE__ */ jsxRuntime.jsx(chunkE42B4GSB_js.SidebarMenuItem, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunkJ6OLBSZR_js.DropdownMenu, { open, onOpenChange: setOpen, children: [
229
+ /* @__PURE__ */ jsxRuntime.jsx(chunkJ6OLBSZR_js.DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
230
+ chunkE42B4GSB_js.SidebarMenuButton,
231
+ {
232
+ size: "lg",
233
+ className: "data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground",
234
+ children: [
235
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-primary/10", children: brandLogoUrl ? /* @__PURE__ */ jsxRuntime.jsx(
236
+ Image__default.default,
237
+ {
238
+ src: brandLogoUrl,
239
+ alt: brandName,
240
+ width: 32,
241
+ height: 32,
242
+ priority: true,
243
+ loading: "eager",
244
+ fetchPriority: "high",
245
+ sizes: "32px",
246
+ className: "h-8 w-8 rounded-lg object-contain"
247
+ }
248
+ ) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-8 w-8 rounded-lg bg-primary/10" }) }),
249
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid flex-1 text-left text-sm leading-tight", children: [
250
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate font-semibold", children: brandName }),
251
+ /* @__PURE__ */ jsxRuntime.jsx(
252
+ "span",
253
+ {
254
+ className: `truncate text-xs font-medium uppercase tracking-wider ${activeApp.colorClass}`,
255
+ children: activeApp.shortName
256
+ }
257
+ )
258
+ ] }),
259
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronsUpDown, { className: "ml-auto h-4 w-4 opacity-50" })
260
+ ]
261
+ }
262
+ ) }),
263
+ /* @__PURE__ */ jsxRuntime.jsxs(
264
+ chunkJ6OLBSZR_js.DropdownMenuContent,
265
+ {
266
+ className: "w-[calc(var(--sidebar-width)-1rem)] min-w-[220px] rounded-lg p-1",
267
+ align: "start",
268
+ side: "bottom",
269
+ sideOffset: 4,
270
+ children: [
271
+ /* @__PURE__ */ jsxRuntime.jsx(chunkJ6OLBSZR_js.DropdownMenuLabel, { className: "text-xs text-muted-foreground font-normal uppercase tracking-wide px-2 py-1.5", children: "Switch App" }),
272
+ apps.map((app, index) => {
273
+ const isActive = app.id === activeApp.id;
274
+ const shortcutNumber = index < 9 ? index + 1 : null;
275
+ return /* @__PURE__ */ jsxRuntime.jsxs(
276
+ chunkJ6OLBSZR_js.DropdownMenuItem,
277
+ {
278
+ onClick: () => handleSelect(app),
279
+ className: "gap-2 p-2 cursor-pointer rounded-md",
280
+ children: [
281
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-8 w-8 shrink-0 items-center justify-center", children: brandLogoUrl ? /* @__PURE__ */ jsxRuntime.jsx(
282
+ Image__default.default,
283
+ {
284
+ src: brandLogoUrl,
285
+ alt: brandName,
286
+ width: 32,
287
+ height: 32,
288
+ className: "h-8 w-8 rounded-lg"
289
+ }
290
+ ) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-8 w-8 rounded-lg bg-primary/10" }) }),
291
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid flex-1 text-left text-sm leading-tight", children: [
292
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate font-semibold", children: brandName }),
293
+ /* @__PURE__ */ jsxRuntime.jsx(
294
+ "span",
295
+ {
296
+ className: `truncate text-xs font-medium uppercase tracking-wider ${app.colorClass}`,
297
+ children: app.shortName
298
+ }
299
+ )
300
+ ] }),
301
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
302
+ shortcutNumber && /* @__PURE__ */ jsxRuntime.jsxs(Shortcut, { className: "text-xs text-muted-foreground", children: [
303
+ "\u2303",
304
+ shortcutNumber
305
+ ] }),
306
+ isActive && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-4 w-4 text-primary" })
307
+ ] })
308
+ ]
309
+ },
310
+ app.id
311
+ );
312
+ })
313
+ ]
314
+ }
315
+ )
316
+ ] }) }) });
317
+ }
318
+ function ComingSoonButton({
319
+ label,
320
+ icon,
321
+ shortcutKey,
322
+ shortcutsVisible = true,
323
+ tooltip = "Coming Soon",
324
+ className
325
+ }) {
326
+ return /* @__PURE__ */ jsxRuntime.jsxs(chunkSORWLKOK_js.Tooltip, { children: [
327
+ /* @__PURE__ */ jsxRuntime.jsx(chunkSORWLKOK_js.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
328
+ "button",
329
+ {
330
+ type: "button",
331
+ disabled: true,
332
+ className: chunkADIDI7AJ_js.cn(
333
+ "group inline-flex h-8 cursor-not-allowed items-center justify-center gap-1 rounded-lg border border-border bg-muted/50 px-2 text-xs font-normal text-muted-foreground opacity-60 transition-colors",
334
+ className
335
+ ),
336
+ "aria-label": `${label} (${tooltip})`,
337
+ children: [
338
+ icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "h-3.5 w-3.5 transition-transform duration-200 group-hover:scale-110 [&>svg]:h-full [&>svg]:w-full", children: icon }),
339
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: label }),
340
+ shortcutKey && /* @__PURE__ */ jsxRuntime.jsx(
341
+ chunkE42B4GSB_js.KeyboardShortcut,
342
+ {
343
+ visible: shortcutsVisible,
344
+ className: "ml-0.5 hidden uppercase md:inline-flex",
345
+ children: shortcutKey
346
+ }
347
+ )
348
+ ]
349
+ }
350
+ ) }),
351
+ /* @__PURE__ */ jsxRuntime.jsx(chunkSORWLKOK_js.TooltipContent, { side: "bottom", children: tooltip })
352
+ ] });
353
+ }
354
+ function defaultGetInitials(name) {
355
+ return name.split(" ").filter((word) => word.length > 0).map((word) => word[0]).join("").slice(0, 2).toUpperCase();
356
+ }
357
+ function matchesShortcut(event, shortcut) {
358
+ const ctrlMatch = shortcut.ctrl ? event.ctrlKey : !event.ctrlKey;
359
+ const shiftMatch = shortcut.shift ? event.shiftKey : !event.shiftKey;
360
+ const altMatch = shortcut.alt ? event.altKey : !event.altKey;
361
+ const metaMatch = shortcut.meta ? event.metaKey : !event.metaKey;
362
+ const keyMatch = event.key === shortcut.key;
363
+ return ctrlMatch && shiftMatch && altMatch && metaMatch && keyMatch;
364
+ }
365
+ function EntitySwitcher({
366
+ entities,
367
+ activeEntity,
368
+ onSelect,
369
+ onAddNew,
370
+ loading = false,
371
+ userId,
372
+ label = "Items",
373
+ addNewLabel = "Add New",
374
+ emptyTitle = "Add Item",
375
+ emptySubtitle = "Get started",
376
+ getDisplayName = (entity) => entity.name,
377
+ getInitials = (entity) => defaultGetInitials(entity.name),
378
+ enableKeyboardShortcuts = false,
379
+ openShortcut,
380
+ openShortcutDisplay,
381
+ side = "bottom",
382
+ align = "start",
383
+ className,
384
+ ShortcutComponent
385
+ }) {
386
+ const Shortcut = ShortcutComponent || chunkE42B4GSB_js.KeyboardShortcut;
387
+ const [open, setOpen] = react.useState(false);
388
+ const [logoHovered, setLogoHovered] = react.useState(false);
389
+ const { state: sidebarState } = chunkE42B4GSB_js.useSidebar();
390
+ const isCollapsed = sidebarState === "collapsed";
391
+ const handleKeyDown = react.useCallback(
392
+ (event) => {
393
+ if (!enableKeyboardShortcuts) return;
394
+ if (openShortcut && matchesShortcut(event, openShortcut)) {
395
+ event.preventDefault();
396
+ setOpen((prev) => !prev);
397
+ return;
398
+ }
399
+ if (event.ctrlKey && !event.shiftKey && !event.altKey && !event.metaKey) {
400
+ const num = Number.parseInt(event.key, 10);
401
+ if (num >= 1 && num <= 9 && num <= entities.length) {
402
+ event.preventDefault();
403
+ const entity = entities[num - 1];
404
+ if (entity) {
405
+ onSelect(entity);
406
+ setOpen(false);
407
+ }
408
+ }
409
+ }
410
+ },
411
+ [entities, onSelect, enableKeyboardShortcuts, openShortcut]
412
+ );
413
+ react.useEffect(() => {
414
+ if (!enableKeyboardShortcuts) return;
415
+ window.addEventListener("keydown", handleKeyDown);
416
+ return () => window.removeEventListener("keydown", handleKeyDown);
417
+ }, [handleKeyDown, enableKeyboardShortcuts]);
418
+ if (loading) {
419
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkE42B4GSB_js.SidebarMenu, { className, children: /* @__PURE__ */ jsxRuntime.jsx(chunkE42B4GSB_js.SidebarMenuItem, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunkE42B4GSB_js.SidebarMenuButton, { size: "lg", disabled: true, children: [
420
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-8 w-8 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(chunkHMAMMC72_js.Spinner, { size: "sm" }) }),
421
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid min-w-0 flex-1 text-left text-sm leading-tight group-data-[collapsible=icon]:hidden", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-muted-foreground", children: "Loading..." }) })
422
+ ] }) }) });
423
+ }
424
+ if (!activeEntity) {
425
+ const gradientId = userId || "default";
426
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkE42B4GSB_js.SidebarMenu, { className, children: /* @__PURE__ */ jsxRuntime.jsx(chunkE42B4GSB_js.SidebarMenuItem, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunkE42B4GSB_js.SidebarMenuButton, { size: "lg", onClick: onAddNew, disabled: !onAddNew, children: [
427
+ /* @__PURE__ */ jsxRuntime.jsx(
428
+ "div",
429
+ {
430
+ className: "flex h-8 w-8 items-center justify-center rounded-lg text-white",
431
+ style: chunkQ256HRYD_js.getAvatarGradient(gradientId).style,
432
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "h-4 w-4" })
433
+ }
434
+ ),
435
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid min-w-0 flex-1 text-left text-sm leading-tight group-data-[collapsible=icon]:hidden", children: [
436
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate font-semibold", children: emptyTitle }),
437
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-xs text-muted-foreground", children: emptySubtitle })
438
+ ] })
439
+ ] }) }) });
440
+ }
441
+ const displayName = getDisplayName(activeEntity);
442
+ const initials = getInitials(activeEntity);
443
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkE42B4GSB_js.SidebarMenu, { className, children: /* @__PURE__ */ jsxRuntime.jsx(chunkE42B4GSB_js.SidebarMenuItem, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunkJ6OLBSZR_js.DropdownMenu, { open, onOpenChange: setOpen, children: [
444
+ /* @__PURE__ */ jsxRuntime.jsx(chunkJ6OLBSZR_js.DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
445
+ chunkE42B4GSB_js.SidebarMenuButton,
446
+ {
447
+ size: "lg",
448
+ className: "data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground",
449
+ style: isCollapsed ? { background: "transparent" } : void 0,
450
+ onMouseEnter: () => isCollapsed && setLogoHovered(true),
451
+ onMouseLeave: () => setLogoHovered(false),
452
+ children: [
453
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative flex h-8 w-8 shrink-0 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsxs(
454
+ chunkE42B4GSB_js.Avatar,
455
+ {
456
+ className: "h-8 w-8 rounded-lg",
457
+ style: {
458
+ transition: "transform 150ms ease, filter 150ms ease",
459
+ transform: isCollapsed && logoHovered ? "scale(1.1)" : "scale(1)",
460
+ filter: isCollapsed && logoHovered ? "brightness(1.2)" : "none"
461
+ },
462
+ children: [
463
+ activeEntity.logoUrl && /* @__PURE__ */ jsxRuntime.jsx(
464
+ chunkE42B4GSB_js.AvatarImage,
465
+ {
466
+ src: activeEntity.logoUrl,
467
+ alt: displayName,
468
+ className: "object-contain p-1"
469
+ }
470
+ ),
471
+ /* @__PURE__ */ jsxRuntime.jsx(
472
+ chunkE42B4GSB_js.AvatarFallback,
473
+ {
474
+ className: "rounded-lg text-xs font-medium text-white",
475
+ style: chunkQ256HRYD_js.getAvatarGradient(activeEntity.id).style,
476
+ children: initials
477
+ }
478
+ )
479
+ ]
480
+ }
481
+ ) }),
482
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid flex-1 min-w-0 text-left text-sm leading-tight group-data-[collapsible=icon]:hidden", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate font-semibold", children: displayName }) }),
483
+ openShortcutDisplay && /* @__PURE__ */ jsxRuntime.jsx(Shortcut, { className: "ml-auto hidden text-xs text-muted-foreground md:inline-flex group-data-[collapsible=icon]:hidden", children: openShortcutDisplay }),
484
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronsUpDown, { className: "ml-1 group-data-[collapsible=icon]:hidden" })
485
+ ]
486
+ }
487
+ ) }),
488
+ /* @__PURE__ */ jsxRuntime.jsxs(
489
+ chunkJ6OLBSZR_js.DropdownMenuContent,
490
+ {
491
+ className: "w-[calc(var(--sidebar-width)-1rem)] rounded-lg",
492
+ align,
493
+ side,
494
+ sideOffset: 4,
495
+ children: [
496
+ /* @__PURE__ */ jsxRuntime.jsx(chunkJ6OLBSZR_js.DropdownMenuLabel, { className: "text-xs text-muted-foreground font-light uppercase tracking-wide", children: label }),
497
+ entities.map((entity, index) => {
498
+ const name = getDisplayName(entity);
499
+ const entityInitials = getInitials(entity);
500
+ const shortcutNumber = enableKeyboardShortcuts && index < 9 ? index + 1 : null;
501
+ const isActive = entity.id === activeEntity.id;
502
+ return /* @__PURE__ */ jsxRuntime.jsxs(
503
+ chunkJ6OLBSZR_js.DropdownMenuItem,
504
+ {
505
+ onClick: () => onSelect(entity),
506
+ className: "gap-2 p-2",
507
+ children: [
508
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative h-6 w-6", children: /* @__PURE__ */ jsxRuntime.jsxs(chunkE42B4GSB_js.Avatar, { className: "h-6 w-6 rounded-md", children: [
509
+ entity.logoUrl && /* @__PURE__ */ jsxRuntime.jsx(
510
+ chunkE42B4GSB_js.AvatarImage,
511
+ {
512
+ src: entity.logoUrl,
513
+ alt: name,
514
+ className: "object-contain p-0.5"
515
+ }
516
+ ),
517
+ /* @__PURE__ */ jsxRuntime.jsx(
518
+ chunkE42B4GSB_js.AvatarFallback,
519
+ {
520
+ className: "rounded-md text-xs font-medium text-white",
521
+ style: chunkQ256HRYD_js.getAvatarGradient(entity.id).style,
522
+ children: entityInitials
523
+ }
524
+ )
525
+ ] }) }),
526
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1 truncate", children: name }),
527
+ shortcutNumber && /* @__PURE__ */ jsxRuntime.jsxs(Shortcut, { className: "text-xs text-muted-foreground", children: [
528
+ "\u2303",
529
+ shortcutNumber
530
+ ] }),
531
+ isActive && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-4 w-4 text-primary" })
532
+ ]
533
+ },
534
+ entity.id
535
+ );
536
+ }),
537
+ onAddNew && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
538
+ /* @__PURE__ */ jsxRuntime.jsx(chunkJ6OLBSZR_js.DropdownMenuSeparator, {}),
539
+ /* @__PURE__ */ jsxRuntime.jsxs(
540
+ chunkJ6OLBSZR_js.DropdownMenuItem,
541
+ {
542
+ className: "gap-2 p-2 group cursor-pointer",
543
+ onClick: onAddNew,
544
+ children: [
545
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "h-4 w-4 text-muted-foreground group-hover:text-white" }),
546
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: addNewLabel })
547
+ ]
548
+ }
549
+ )
550
+ ] })
551
+ ]
552
+ }
553
+ )
554
+ ] }) }) });
555
+ }
556
+ function Footer({
557
+ logo,
558
+ linkGroups = [],
559
+ socialLinks = [],
560
+ copyright,
561
+ bottomContent,
562
+ className,
563
+ containerClassName,
564
+ variant = "default",
565
+ tagline,
566
+ newsletter
567
+ }) {
568
+ if (variant === "minimal") {
569
+ return /* @__PURE__ */ jsxRuntime.jsx(
570
+ MinimalFooter,
571
+ {
572
+ logo,
573
+ copyright,
574
+ socialLinks,
575
+ linkGroups,
576
+ className,
577
+ containerClassName
578
+ }
579
+ );
580
+ }
581
+ if (variant === "brand") {
582
+ return /* @__PURE__ */ jsxRuntime.jsx(
583
+ BrandFooter,
584
+ {
585
+ logo,
586
+ tagline,
587
+ newsletter: newsletter === void 0 ? {} : newsletter,
588
+ linkGroups,
589
+ socialLinks,
590
+ copyright,
591
+ bottomContent,
592
+ className,
593
+ containerClassName
594
+ }
595
+ );
596
+ }
597
+ return /* @__PURE__ */ jsxRuntime.jsx("footer", { className: chunkADIDI7AJ_js.cn("bg-muted/50 border-t", className), children: /* @__PURE__ */ jsxRuntime.jsxs(
598
+ chunkC4UT5V3P_js.Container,
599
+ {
600
+ "data-slot": "footer-container",
601
+ className: chunkADIDI7AJ_js.cn("py-12 md:py-16", containerClassName),
602
+ children: [
603
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col md:flex-row justify-between gap-8", children: [
604
+ logo && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "shrink-0", children: [
605
+ logo,
606
+ socialLinks.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex gap-4 mt-6", children: socialLinks.map((social) => /* @__PURE__ */ jsxRuntime.jsx(
607
+ "a",
608
+ {
609
+ href: social.href,
610
+ target: "_blank",
611
+ rel: "noopener noreferrer",
612
+ className: "text-muted-foreground hover:text-foreground transition-colors",
613
+ "aria-label": social.label,
614
+ children: social.icon
615
+ },
616
+ social.label
617
+ )) })
618
+ ] }),
619
+ linkGroups.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-12 md:gap-16", children: linkGroups.map((group) => /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
620
+ /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-sm font-semibold text-foreground mb-4", children: group.title }),
621
+ /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "space-y-3", children: group.links.map((link) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(
622
+ "a",
623
+ {
624
+ href: link.href,
625
+ className: "text-sm text-muted-foreground hover:text-foreground transition-colors",
626
+ ...link.external && {
627
+ target: "_blank",
628
+ rel: "noopener noreferrer"
629
+ },
630
+ children: link.label
631
+ }
632
+ ) }, link.label)) })
633
+ ] }, group.title)) })
634
+ ] }),
635
+ (copyright || bottomContent) && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
636
+ /* @__PURE__ */ jsxRuntime.jsx(chunkLQCVRWVF_js.Separator, { className: "my-8" }),
637
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col md:flex-row justify-between items-center gap-4", children: [
638
+ copyright && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: copyright }),
639
+ bottomContent
640
+ ] })
641
+ ] })
642
+ ]
643
+ }
644
+ ) });
645
+ }
646
+ function BrandFooter({
647
+ logo,
648
+ tagline,
649
+ newsletter,
650
+ linkGroups = [],
651
+ socialLinks = [],
652
+ copyright,
653
+ bottomContent,
654
+ className,
655
+ containerClassName
656
+ }) {
657
+ const [isDark, setIsDark] = react.useState(false);
658
+ const newsletterConfig = newsletter === false ? void 0 : newsletter;
659
+ react.useEffect(() => {
660
+ const html = document.documentElement;
661
+ const check = () => setIsDark(html.classList.contains("dark"));
662
+ check();
663
+ const obs = new MutationObserver(check);
664
+ obs.observe(html, { attributes: true, attributeFilter: ["class"] });
665
+ return () => obs.disconnect();
666
+ }, []);
667
+ const footerBg = isDark ? "linear-gradient(to bottom, rgba(0,0,0,0.5), rgba(0,0,0,0.9))" : "linear-gradient(to bottom, color-mix(in oklch, var(--color-primary, #6366f1) 4%, var(--color-background, #fff)), color-mix(in oklch, var(--color-primary, #6366f1) 8%, var(--color-muted, #f5f5f5)))";
668
+ return /* @__PURE__ */ jsxRuntime.jsxs(
669
+ "footer",
670
+ {
671
+ className: chunkADIDI7AJ_js.cn("backdrop-blur-2xl", className),
672
+ style: {
673
+ background: footerBg,
674
+ borderTop: "1px solid var(--color-border, hsl(var(--border)))"
675
+ },
676
+ children: [
677
+ /* @__PURE__ */ jsxRuntime.jsx(
678
+ "div",
679
+ {
680
+ style: {
681
+ height: "1px",
682
+ background: "linear-gradient(to right, transparent, color-mix(in oklch, var(--color-primary, #6366f1) 30%, transparent), transparent)"
683
+ }
684
+ }
685
+ ),
686
+ /* @__PURE__ */ jsxRuntime.jsxs(
687
+ chunkC4UT5V3P_js.Container,
688
+ {
689
+ "data-slot": "footer-container",
690
+ className: chunkADIDI7AJ_js.cn("py-16 md:py-20", containerClassName),
691
+ children: [
692
+ (logo || tagline || newsletterConfig) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col md:flex-row justify-between items-start gap-8 mb-12", children: [
693
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", children: [
694
+ logo,
695
+ tagline && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-base text-muted-foreground max-w-sm", children: tagline })
696
+ ] }),
697
+ newsletterConfig && /* @__PURE__ */ jsxRuntime.jsx(FooterNewsletterForm, { newsletter: newsletterConfig })
698
+ ] }),
699
+ linkGroups.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-8 lg:gap-12 mb-12", children: linkGroups.map((group) => /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
700
+ /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-xs font-semibold uppercase tracking-wider text-muted-foreground mb-4", children: group.title }),
701
+ /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "space-y-3", children: group.links.map((link) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(
702
+ "a",
703
+ {
704
+ href: link.href,
705
+ className: "text-sm text-muted-foreground/80 hover:text-foreground transition-colors",
706
+ ...link.external && {
707
+ target: "_blank",
708
+ rel: "noopener noreferrer"
709
+ },
710
+ children: link.label
711
+ }
712
+ ) }, link.label)) })
713
+ ] }, group.title)) }),
714
+ /* @__PURE__ */ jsxRuntime.jsx(chunkLQCVRWVF_js.Separator, { className: "mb-8" }),
715
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col md:flex-row justify-between items-center gap-4", children: [
716
+ copyright && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: copyright }),
717
+ socialLinks.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex gap-2", children: socialLinks.map((social) => /* @__PURE__ */ jsxRuntime.jsx(
718
+ "a",
719
+ {
720
+ href: social.href,
721
+ target: "_blank",
722
+ rel: "noopener noreferrer",
723
+ className: "inline-flex h-10 w-10 items-center justify-center text-muted-foreground transition-colors hover:text-foreground",
724
+ "data-slot": "footer-social-link",
725
+ "aria-label": social.label,
726
+ children: social.icon
727
+ },
728
+ social.label
729
+ )) }),
730
+ bottomContent
731
+ ] })
732
+ ]
733
+ }
734
+ )
735
+ ]
736
+ }
737
+ );
738
+ }
739
+ function FooterNewsletterForm({
740
+ newsletter
741
+ }) {
742
+ if (newsletter.onSubmit && !newsletter.endpoint) {
743
+ return /* @__PURE__ */ jsxRuntime.jsx(FooterNewsletterCallbackForm, { newsletter });
744
+ }
745
+ return /* @__PURE__ */ jsxRuntime.jsx(
746
+ chunkR26Y7LGJ_js.NewsletterSignup,
747
+ {
748
+ buttonClassName: chunkADIDI7AJ_js.cn("shrink-0", newsletter.buttonClassName),
749
+ buttonLabel: newsletter.buttonText ?? "Subscribe",
750
+ className: "w-full max-w-sm",
751
+ endpoint: newsletter.endpoint,
752
+ errorMessage: newsletter.errorMessage,
753
+ inputClassName: newsletter.inputClassName,
754
+ inputLabel: newsletter.inputLabel,
755
+ placeholder: newsletter.placeholder,
756
+ source: newsletter.source,
757
+ submittingLabel: newsletter.submittingLabel,
758
+ successClassName: newsletter.successClassName,
759
+ successDescription: newsletter.successDescription,
760
+ successTitle: newsletter.successTitle
761
+ }
762
+ );
763
+ }
764
+ function FooterNewsletterCallbackForm({
765
+ newsletter
766
+ }) {
767
+ const [email, setEmail] = react.useState("");
768
+ const handleNewsletterSubmit = (e) => {
769
+ e.preventDefault();
770
+ newsletter.onSubmit?.(email);
771
+ setEmail("");
772
+ };
773
+ return /* @__PURE__ */ jsxRuntime.jsxs(
774
+ "form",
775
+ {
776
+ onSubmit: handleNewsletterSubmit,
777
+ className: "flex gap-2 w-full max-w-sm",
778
+ children: [
779
+ /* @__PURE__ */ jsxRuntime.jsx(
780
+ chunkDQWHYBV2_js.Input,
781
+ {
782
+ "aria-label": newsletter.inputLabel ?? "Email address",
783
+ type: "email",
784
+ placeholder: newsletter.placeholder ?? "Enter your email",
785
+ value: email,
786
+ onChange: (e) => setEmail(e.target.value),
787
+ className: chunkADIDI7AJ_js.cn("flex-1", newsletter.inputClassName),
788
+ required: true
789
+ }
790
+ ),
791
+ /* @__PURE__ */ jsxRuntime.jsx(chunk6TGV2DNP_js.Button, { type: "submit", size: "sm", className: newsletter.buttonClassName, children: newsletter.buttonText ?? "Subscribe" })
792
+ ]
793
+ }
794
+ );
795
+ }
796
+ function MinimalFooter({
797
+ logo,
798
+ copyright,
799
+ socialLinks = [],
800
+ linkGroups = [],
801
+ className,
802
+ containerClassName
803
+ }) {
804
+ const allLinks = linkGroups.flatMap((g) => g.links);
805
+ return /* @__PURE__ */ jsxRuntime.jsx("footer", { className: chunkADIDI7AJ_js.cn("bg-background border-t border-border", className), children: /* @__PURE__ */ jsxRuntime.jsx(
806
+ chunkC4UT5V3P_js.Container,
807
+ {
808
+ "data-slot": "footer-container",
809
+ className: chunkADIDI7AJ_js.cn("py-6", containerClassName),
810
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-4 md:flex-row md:items-start md:justify-between", children: [
811
+ (copyright || logo) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-3", children: [
812
+ copyright && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: copyright }),
813
+ logo && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0", "data-slot": "footer-logo", children: logo })
814
+ ] }),
815
+ socialLinks.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex gap-3", children: socialLinks.map((social) => /* @__PURE__ */ jsxRuntime.jsx(
816
+ "a",
817
+ {
818
+ href: social.href,
819
+ target: "_blank",
820
+ rel: "noopener noreferrer",
821
+ className: "text-muted-foreground hover:text-foreground transition-colors",
822
+ "aria-label": social.label,
823
+ children: social.icon
824
+ },
825
+ social.label
826
+ )) }),
827
+ allLinks.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex gap-4", children: allLinks.map((link) => /* @__PURE__ */ jsxRuntime.jsx(
828
+ "a",
829
+ {
830
+ href: link.href,
831
+ className: "text-sm text-muted-foreground hover:text-foreground transition-colors",
832
+ ...link.external && {
833
+ target: "_blank",
834
+ rel: "noopener noreferrer"
835
+ },
836
+ children: link.label
837
+ },
838
+ link.label
839
+ )) })
840
+ ] })
841
+ }
842
+ ) });
843
+ }
844
+ function DefaultMobileMenuIcon({
845
+ open,
846
+ reducedMotion
847
+ }) {
848
+ const controls = react$1.useAnimation();
849
+ const lineVariants = {
850
+ normal: {
851
+ opacity: 1,
852
+ rotate: 0,
853
+ y: 0
854
+ },
855
+ animate: (line) => ({
856
+ opacity: line === 2 ? 0 : 1,
857
+ rotate: line === 1 ? 45 : line === 3 ? -45 : 0,
858
+ y: line === 1 ? 6 : line === 3 ? -6 : 0,
859
+ transition: reducedMotion ? { duration: 0 } : {
860
+ damping: 20,
861
+ stiffness: 260,
862
+ type: "spring"
863
+ }
864
+ })
865
+ };
866
+ react.useEffect(() => {
867
+ controls.start(
868
+ open ? "animate" : "normal",
869
+ reducedMotion ? { duration: 0 } : void 0
870
+ );
871
+ }, [controls, open, reducedMotion]);
872
+ const handleMouseEnter = () => {
873
+ if (!open) {
874
+ controls.start("animate");
875
+ }
876
+ };
877
+ const handleMouseLeave = () => {
878
+ controls.start(open ? "animate" : "normal");
879
+ };
880
+ return /* @__PURE__ */ jsxRuntime.jsx(
881
+ "span",
882
+ {
883
+ "aria-hidden": "true",
884
+ "data-animation": "lucide-animated-menu",
885
+ "data-slot": "navbar-mobile-menu-icon",
886
+ "data-state": open ? "open" : "closed",
887
+ className: "relative flex h-9 w-9 items-center justify-center",
888
+ onMouseEnter: handleMouseEnter,
889
+ onMouseLeave: handleMouseLeave,
890
+ children: /* @__PURE__ */ jsxRuntime.jsx(
891
+ "svg",
892
+ {
893
+ "aria-hidden": "true",
894
+ fill: "none",
895
+ focusable: "false",
896
+ height: "20",
897
+ stroke: "currentColor",
898
+ strokeLinecap: "round",
899
+ strokeLinejoin: "round",
900
+ strokeWidth: "2",
901
+ viewBox: "0 0 24 24",
902
+ width: "20",
903
+ xmlns: "http://www.w3.org/2000/svg",
904
+ children: [1, 2, 3].map((line) => /* @__PURE__ */ jsxRuntime.jsx(
905
+ react$1.motion.line,
906
+ {
907
+ animate: controls,
908
+ custom: line,
909
+ variants: lineVariants,
910
+ x1: "4",
911
+ x2: "20",
912
+ y1: line === 1 ? "6" : line === 2 ? "12" : "18",
913
+ y2: line === 1 ? "6" : line === 2 ? "12" : "18"
914
+ },
915
+ line
916
+ ))
917
+ }
918
+ )
919
+ }
920
+ );
921
+ }
922
+ function Navbar({
923
+ logo,
924
+ preset = "default",
925
+ links = [],
926
+ menuGroups = [],
927
+ menuClassNames,
928
+ rightContent,
929
+ mobileContent,
930
+ sticky = true,
931
+ hideOnScrollDown = false,
932
+ variant = "blur",
933
+ className,
934
+ LinkComponent,
935
+ showMobileMenu = true,
936
+ mobileMenuOpenIcon,
937
+ mobileMenuClosedIcon,
938
+ mobileMenuHeight = "content",
939
+ containerClassName
940
+ }) {
941
+ const headerRef = react.useRef(null);
942
+ const [mobileMenuOpen, setMobileMenuOpen] = react.useState(false);
943
+ const [mobileMenuTop, setMobileMenuTop] = react.useState(0);
944
+ const reducedMotion = react$1.useReducedMotion() ?? false;
945
+ const { direction, isAtTop } = chunkRBUYW6QQ_js.useScrollDirection({
946
+ threshold: 10,
947
+ topThreshold: 50
948
+ });
949
+ const usesCustomMobileMenuIcons = mobileMenuOpenIcon !== void 0 || mobileMenuClosedIcon !== void 0;
950
+ const isScreenHeightMobileMenu = mobileMenuHeight === "screen";
951
+ const closeMobileMenu = () => setMobileMenuOpen(false);
952
+ const LinkEl = LinkComponent || "a";
953
+ const variantClasses = {
954
+ transparent: isAtTop ? "bg-transparent border-b border-transparent" : "bg-background/80 backdrop-blur-xl backdrop-saturate-150 border-b border-border dark:border-white/10",
955
+ solid: "bg-background border-b border-border",
956
+ blur: "bg-background/60 backdrop-blur-xl backdrop-saturate-150 border-b border-border dark:border-white/10"
957
+ };
958
+ const presetClasses = {
959
+ default: {
960
+ header: "",
961
+ mobileMenuHeader: "bg-background border-b border-border shadow-lg",
962
+ mobileMenu: "bg-background shadow-lg",
963
+ mobileMenuButton: ""
964
+ },
965
+ keenan: {
966
+ header: "border-white/10 bg-black/65 shadow-[0_18px_48px_rgba(0,0,0,0.45)] backdrop-blur-2xl",
967
+ mobileMenuHeader: "border-white/10 bg-black shadow-[0_18px_48px_rgba(0,0,0,0.45)] backdrop-blur-2xl",
968
+ mobileMenu: "border-white/10 bg-black shadow-[0_22px_56px_rgba(0,0,0,0.5)]",
969
+ mobileMenuButton: "text-white hover:bg-white/5 hover:text-white"
970
+ }
971
+ };
972
+ const shouldHide = sticky && hideOnScrollDown && !mobileMenuOpen && !isAtTop && direction === "down";
973
+ react.useLayoutEffect(() => {
974
+ if (!mobileMenuOpen || !isScreenHeightMobileMenu) {
975
+ setMobileMenuTop(0);
976
+ return;
977
+ }
978
+ const updateMobileMenuTop = () => {
979
+ const nextTop = Math.max(
980
+ headerRef.current?.getBoundingClientRect().bottom ?? 0,
981
+ 0
982
+ );
983
+ setMobileMenuTop(nextTop);
984
+ };
985
+ updateMobileMenuTop();
986
+ window.addEventListener("resize", updateMobileMenuTop);
987
+ window.addEventListener("scroll", updateMobileMenuTop, { passive: true });
988
+ return () => {
989
+ window.removeEventListener("resize", updateMobileMenuTop);
990
+ window.removeEventListener("scroll", updateMobileMenuTop);
991
+ };
992
+ }, [mobileMenuOpen, isScreenHeightMobileMenu]);
993
+ react.useEffect(() => {
994
+ if (!mobileMenuOpen || !isScreenHeightMobileMenu) {
995
+ return;
996
+ }
997
+ const previousBodyOverflow = document.body.style.overflow;
998
+ const previousHtmlOverflow = document.documentElement.style.overflow;
999
+ document.body.style.overflow = "hidden";
1000
+ document.documentElement.style.overflow = "hidden";
1001
+ return () => {
1002
+ document.body.style.overflow = previousBodyOverflow;
1003
+ document.documentElement.style.overflow = previousHtmlOverflow;
1004
+ };
1005
+ }, [mobileMenuOpen, isScreenHeightMobileMenu]);
1006
+ const positionClass = sticky && hideOnScrollDown ? "fixed top-0 left-0 right-0" : sticky ? "sticky top-0" : "";
1007
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1008
+ "header",
1009
+ {
1010
+ ref: headerRef,
1011
+ "data-preset": preset,
1012
+ className: chunkADIDI7AJ_js.cn(
1013
+ "z-50 w-full transition-[transform,background-color,border-color,backdrop-filter] duration-300",
1014
+ positionClass,
1015
+ variantClasses[variant],
1016
+ presetClasses[preset].header,
1017
+ mobileMenuOpen && presetClasses[preset].mobileMenuHeader,
1018
+ className
1019
+ ),
1020
+ style: {
1021
+ transform: shouldHide ? "translateY(-100%)" : "translateY(0)"
1022
+ },
1023
+ children: [
1024
+ /* @__PURE__ */ jsxRuntime.jsxs(
1025
+ chunkC4UT5V3P_js.Container,
1026
+ {
1027
+ "data-slot": "navbar-container",
1028
+ className: chunkADIDI7AJ_js.cn(
1029
+ "flex h-14 items-center justify-between gap-4",
1030
+ containerClassName
1031
+ ),
1032
+ children: [
1033
+ logo,
1034
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "hidden md:flex items-center gap-2", children: [
1035
+ /* @__PURE__ */ jsxRuntime.jsxs("nav", { className: "flex items-center gap-6", children: [
1036
+ menuGroups.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(
1037
+ NavigationMenu,
1038
+ {
1039
+ "data-slot": "navbar-menu",
1040
+ className: chunkADIDI7AJ_js.cn("justify-start", menuClassNames?.root),
1041
+ children: /* @__PURE__ */ jsxRuntime.jsx(
1042
+ NavigationMenuList,
1043
+ {
1044
+ "data-slot": "navbar-menu-list",
1045
+ className: chunkADIDI7AJ_js.cn("justify-start gap-1", menuClassNames?.list),
1046
+ children: menuGroups.map((group, groupIndex) => /* @__PURE__ */ jsxRuntime.jsxs(
1047
+ NavigationMenuItem,
1048
+ {
1049
+ "data-slot": "navbar-menu-item",
1050
+ className: menuClassNames?.menuItem,
1051
+ children: [
1052
+ /* @__PURE__ */ jsxRuntime.jsxs(
1053
+ NavigationMenuTrigger,
1054
+ {
1055
+ "data-slot": "navbar-menu-trigger",
1056
+ className: chunkADIDI7AJ_js.cn(
1057
+ "gap-1.5 bg-transparent px-2 text-foreground/70 hover:bg-transparent hover:text-foreground focus:bg-transparent focus:text-foreground",
1058
+ menuClassNames?.trigger
1059
+ ),
1060
+ children: [
1061
+ group.label,
1062
+ /* @__PURE__ */ jsxRuntime.jsx(
1063
+ lucideReact.ChevronDown,
1064
+ {
1065
+ "aria-hidden": "true",
1066
+ className: chunkADIDI7AJ_js.cn(
1067
+ "relative top-px size-3.5 transition-transform duration-300 group-data-[state=open]:rotate-180",
1068
+ menuClassNames?.triggerIcon
1069
+ ),
1070
+ "data-slot": "navbar-menu-trigger-icon"
1071
+ }
1072
+ )
1073
+ ]
1074
+ }
1075
+ ),
1076
+ /* @__PURE__ */ jsxRuntime.jsxs(
1077
+ NavigationMenuContent,
1078
+ {
1079
+ "aria-label": group.ariaLabel ?? `${group.label} navigation`,
1080
+ "data-slot": "navbar-menu-content",
1081
+ className: menuClassNames?.content,
1082
+ children: [
1083
+ group.showHeading === false ? null : /* @__PURE__ */ jsxRuntime.jsx(
1084
+ "p",
1085
+ {
1086
+ className: chunkADIDI7AJ_js.cn(
1087
+ "px-2 py-1.5 text-xs font-semibold uppercase tracking-wide text-muted-foreground",
1088
+ menuClassNames?.heading
1089
+ ),
1090
+ children: group.label
1091
+ }
1092
+ ),
1093
+ group.links.map(
1094
+ (link) => link.external ? /* @__PURE__ */ jsxRuntime.jsx(NavigationMenuLink, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
1095
+ "a",
1096
+ {
1097
+ href: link.href,
1098
+ target: "_blank",
1099
+ rel: "noopener noreferrer",
1100
+ className: chunkADIDI7AJ_js.cn(
1101
+ "group flex min-w-48 items-start gap-2 whitespace-nowrap",
1102
+ menuClassNames?.item
1103
+ ),
1104
+ children: [
1105
+ link.icon,
1106
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex flex-col gap-1", children: [
1107
+ /* @__PURE__ */ jsxRuntime.jsx(
1108
+ "span",
1109
+ {
1110
+ "data-slot": "navbar-menu-item-label",
1111
+ className: menuClassNames?.itemLabel,
1112
+ children: link.label
1113
+ }
1114
+ ),
1115
+ link.description ? /* @__PURE__ */ jsxRuntime.jsx(
1116
+ "span",
1117
+ {
1118
+ "data-slot": "navbar-menu-item-description",
1119
+ className: chunkADIDI7AJ_js.cn(
1120
+ "max-w-72 whitespace-normal text-xs leading-5 text-muted-foreground",
1121
+ menuClassNames?.itemDescription
1122
+ ),
1123
+ children: link.description
1124
+ }
1125
+ ) : null
1126
+ ] })
1127
+ ]
1128
+ }
1129
+ ) }, link.href) : /* @__PURE__ */ jsxRuntime.jsx(NavigationMenuLink, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
1130
+ LinkEl,
1131
+ {
1132
+ href: link.href,
1133
+ className: chunkADIDI7AJ_js.cn(
1134
+ "group flex min-w-48 items-start gap-2 whitespace-nowrap",
1135
+ menuClassNames?.item
1136
+ ),
1137
+ children: [
1138
+ link.icon,
1139
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex flex-col gap-1", children: [
1140
+ /* @__PURE__ */ jsxRuntime.jsx(
1141
+ "span",
1142
+ {
1143
+ "data-slot": "navbar-menu-item-label",
1144
+ className: menuClassNames?.itemLabel,
1145
+ children: link.label
1146
+ }
1147
+ ),
1148
+ link.description ? /* @__PURE__ */ jsxRuntime.jsx(
1149
+ "span",
1150
+ {
1151
+ "data-slot": "navbar-menu-item-description",
1152
+ className: chunkADIDI7AJ_js.cn(
1153
+ "max-w-72 whitespace-normal text-xs leading-5 text-muted-foreground",
1154
+ menuClassNames?.itemDescription
1155
+ ),
1156
+ children: link.description
1157
+ }
1158
+ ) : null
1159
+ ] })
1160
+ ]
1161
+ }
1162
+ ) }, link.href)
1163
+ )
1164
+ ]
1165
+ }
1166
+ )
1167
+ ]
1168
+ },
1169
+ `${group.label}-${groupIndex}`
1170
+ ))
1171
+ }
1172
+ )
1173
+ }
1174
+ ) : null,
1175
+ links.map(
1176
+ (link) => link.external ? /* @__PURE__ */ jsxRuntime.jsxs(
1177
+ "a",
1178
+ {
1179
+ href: link.href,
1180
+ target: "_blank",
1181
+ rel: "noopener noreferrer",
1182
+ className: "flex items-center gap-1.5 text-sm text-foreground/70 hover:text-foreground transition-colors whitespace-nowrap",
1183
+ children: [
1184
+ link.icon,
1185
+ link.label
1186
+ ]
1187
+ },
1188
+ link.href
1189
+ ) : /* @__PURE__ */ jsxRuntime.jsxs(
1190
+ LinkEl,
1191
+ {
1192
+ href: link.href,
1193
+ className: "flex items-center gap-1.5 text-sm text-foreground/70 hover:text-foreground transition-colors whitespace-nowrap",
1194
+ children: [
1195
+ link.icon,
1196
+ link.label
1197
+ ]
1198
+ },
1199
+ link.href
1200
+ )
1201
+ )
1202
+ ] }),
1203
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-3 ml-4", children: rightContent })
1204
+ ] }),
1205
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 md:hidden", children: [
1206
+ rightContent,
1207
+ showMobileMenu && /* @__PURE__ */ jsxRuntime.jsx(
1208
+ "button",
1209
+ {
1210
+ type: "button",
1211
+ onClick: () => setMobileMenuOpen(!mobileMenuOpen),
1212
+ "data-slot": "navbar-mobile-menu-button",
1213
+ "data-state": mobileMenuOpen ? "open" : "closed",
1214
+ className: chunkADIDI7AJ_js.cn(
1215
+ "inline-flex h-9 w-9 items-center justify-center rounded-box text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground",
1216
+ presetClasses[preset].mobileMenuButton
1217
+ ),
1218
+ "aria-label": mobileMenuOpen ? "Close menu" : "Open menu",
1219
+ "aria-expanded": mobileMenuOpen,
1220
+ children: usesCustomMobileMenuIcons ? mobileMenuOpen ? mobileMenuOpenIcon || /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-5 w-5" }) : mobileMenuClosedIcon || /* @__PURE__ */ jsxRuntime.jsx(
1221
+ DefaultMobileMenuIcon,
1222
+ {
1223
+ open: false,
1224
+ reducedMotion
1225
+ }
1226
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
1227
+ DefaultMobileMenuIcon,
1228
+ {
1229
+ open: mobileMenuOpen,
1230
+ reducedMotion
1231
+ }
1232
+ )
1233
+ }
1234
+ )
1235
+ ] })
1236
+ ]
1237
+ }
1238
+ ),
1239
+ showMobileMenu && mobileMenuOpen && /* @__PURE__ */ jsxRuntime.jsx(
1240
+ "div",
1241
+ {
1242
+ "data-slot": "navbar-mobile-menu",
1243
+ "data-height": mobileMenuHeight,
1244
+ "data-preset": preset,
1245
+ className: chunkADIDI7AJ_js.cn(
1246
+ "md:hidden border-t border-border",
1247
+ presetClasses[preset].mobileMenu,
1248
+ isScreenHeightMobileMenu && "fixed inset-x-0 overflow-y-auto overscroll-contain"
1249
+ ),
1250
+ style: isScreenHeightMobileMenu ? {
1251
+ top: mobileMenuTop,
1252
+ height: `calc(100dvh - ${mobileMenuTop}px)`
1253
+ } : void 0,
1254
+ children: /* @__PURE__ */ jsxRuntime.jsx(
1255
+ chunkC4UT5V3P_js.Container,
1256
+ {
1257
+ "data-slot": "navbar-mobile-menu-container",
1258
+ className: chunkADIDI7AJ_js.cn(
1259
+ "py-4",
1260
+ isScreenHeightMobileMenu && "h-full",
1261
+ containerClassName
1262
+ ),
1263
+ children: /* @__PURE__ */ jsxRuntime.jsx(
1264
+ "nav",
1265
+ {
1266
+ "data-slot": "navbar-mobile-menu-content",
1267
+ className: chunkADIDI7AJ_js.cn(
1268
+ "flex flex-col gap-4",
1269
+ isScreenHeightMobileMenu && "min-h-full overflow-y-auto"
1270
+ ),
1271
+ children: mobileContent || /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: links.map(
1272
+ (link) => link.external ? /* @__PURE__ */ jsxRuntime.jsxs(
1273
+ "a",
1274
+ {
1275
+ href: link.href,
1276
+ target: "_blank",
1277
+ rel: "noopener noreferrer",
1278
+ className: "flex items-center gap-1.5 text-sm text-foreground/70 hover:text-foreground transition-colors py-2",
1279
+ onClick: closeMobileMenu,
1280
+ children: [
1281
+ link.icon,
1282
+ link.label
1283
+ ]
1284
+ },
1285
+ link.href
1286
+ ) : /* @__PURE__ */ jsxRuntime.jsxs(
1287
+ LinkEl,
1288
+ {
1289
+ href: link.href,
1290
+ className: "flex items-center gap-1.5 text-sm text-foreground/70 hover:text-foreground transition-colors py-2",
1291
+ onClick: closeMobileMenu,
1292
+ children: [
1293
+ link.icon,
1294
+ link.label
1295
+ ]
1296
+ },
1297
+ link.href
1298
+ )
1299
+ ) })
1300
+ }
1301
+ )
1302
+ }
1303
+ )
1304
+ }
1305
+ )
1306
+ ]
1307
+ }
1308
+ );
1309
+ }
1310
+ function renderCtaLink(cta, LinkComponent) {
1311
+ const linkProps = cta.external ? { href: cta.href, rel: "noreferrer noopener", target: "_blank" } : { href: cta.href };
1312
+ if (LinkComponent && !cta.external) {
1313
+ return /* @__PURE__ */ jsxRuntime.jsx(LinkComponent, { href: cta.href, children: cta.label });
1314
+ }
1315
+ return /* @__PURE__ */ jsxRuntime.jsx("a", { ...linkProps, children: cta.label });
1316
+ }
1317
+ function MarketingHeaderPreset({
1318
+ logo,
1319
+ links = [],
1320
+ primaryCta,
1321
+ secondaryCta,
1322
+ rightContent,
1323
+ mobileContent,
1324
+ className,
1325
+ containerClassName,
1326
+ variant = "blur",
1327
+ preset = "default",
1328
+ sticky = true,
1329
+ hideOnScrollDown = true,
1330
+ showMobileMenu = true,
1331
+ LinkComponent
1332
+ }) {
1333
+ const ctas = [secondaryCta, primaryCta].filter(
1334
+ (cta) => Boolean(cta)
1335
+ );
1336
+ const resolvedRightContent = ctas.length > 0 || rightContent ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "hidden items-center gap-2 md:flex", children: [
1337
+ secondaryCta ? /* @__PURE__ */ jsxRuntime.jsx(chunk6TGV2DNP_js.Button, { asChild: true, variant: secondaryCta.variant ?? "outline", size: "sm", children: renderCtaLink(secondaryCta, LinkComponent) }) : null,
1338
+ primaryCta ? /* @__PURE__ */ jsxRuntime.jsx(chunk6TGV2DNP_js.Button, { asChild: true, variant: primaryCta.variant ?? "default", size: "sm", children: renderCtaLink(primaryCta, LinkComponent) }) : null,
1339
+ rightContent
1340
+ ] }) : void 0;
1341
+ const resolvedMobileContent = mobileContent || ctas.length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2 pt-2", children: [
1342
+ mobileContent,
1343
+ secondaryCta ? /* @__PURE__ */ jsxRuntime.jsx(
1344
+ chunk6TGV2DNP_js.Button,
1345
+ {
1346
+ asChild: true,
1347
+ variant: secondaryCta.variant ?? "outline",
1348
+ size: "sm",
1349
+ className: "justify-start",
1350
+ children: renderCtaLink(secondaryCta, LinkComponent)
1351
+ }
1352
+ ) : null,
1353
+ primaryCta ? /* @__PURE__ */ jsxRuntime.jsx(
1354
+ chunk6TGV2DNP_js.Button,
1355
+ {
1356
+ asChild: true,
1357
+ variant: primaryCta.variant ?? "default",
1358
+ size: "sm",
1359
+ className: "justify-start",
1360
+ children: renderCtaLink(primaryCta, LinkComponent)
1361
+ }
1362
+ ) : null
1363
+ ] }) : void 0;
1364
+ return /* @__PURE__ */ jsxRuntime.jsx(
1365
+ Navbar,
1366
+ {
1367
+ logo,
1368
+ links,
1369
+ rightContent: resolvedRightContent,
1370
+ mobileContent: resolvedMobileContent,
1371
+ className: chunkADIDI7AJ_js.cn(className),
1372
+ containerClassName,
1373
+ variant,
1374
+ preset,
1375
+ sticky,
1376
+ hideOnScrollDown,
1377
+ showMobileMenu,
1378
+ LinkComponent
1379
+ }
1380
+ );
1381
+ }
1382
+ function NavbarLogo({
1383
+ href = "/",
1384
+ imageSrc,
1385
+ imageAlt,
1386
+ text,
1387
+ imageWidth = 32,
1388
+ imageHeight = 32,
1389
+ invertInDarkMode = false,
1390
+ className,
1391
+ imageClassName,
1392
+ textClassName,
1393
+ LinkComponent,
1394
+ ImageComponent
1395
+ }) {
1396
+ const LinkEl = LinkComponent || "a";
1397
+ const content = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1398
+ ImageComponent ? /* @__PURE__ */ jsxRuntime.jsx(
1399
+ ImageComponent,
1400
+ {
1401
+ src: imageSrc,
1402
+ alt: imageAlt,
1403
+ width: imageWidth,
1404
+ height: imageHeight,
1405
+ className: chunkADIDI7AJ_js.cn(
1406
+ "rounded-md",
1407
+ invertInDarkMode && "dark:invert dark:brightness-100",
1408
+ imageClassName
1409
+ )
1410
+ }
1411
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
1412
+ "img",
1413
+ {
1414
+ src: imageSrc,
1415
+ alt: imageAlt,
1416
+ width: imageWidth,
1417
+ height: imageHeight,
1418
+ className: chunkADIDI7AJ_js.cn(
1419
+ "rounded-md",
1420
+ invertInDarkMode && "dark:invert dark:brightness-100",
1421
+ imageClassName
1422
+ )
1423
+ }
1424
+ ),
1425
+ text && /* @__PURE__ */ jsxRuntime.jsx(
1426
+ "span",
1427
+ {
1428
+ className: chunkADIDI7AJ_js.cn(
1429
+ "text-xl font-black text-foreground/80 whitespace-nowrap uppercase tracking-tight",
1430
+ textClassName
1431
+ ),
1432
+ children: text
1433
+ }
1434
+ )
1435
+ ] });
1436
+ return /* @__PURE__ */ jsxRuntime.jsx(
1437
+ LinkEl,
1438
+ {
1439
+ href,
1440
+ className: chunkADIDI7AJ_js.cn(
1441
+ "flex items-center gap-2.5 transition-opacity hover:opacity-80 shrink-0",
1442
+ className
1443
+ ),
1444
+ children: content
1445
+ }
1446
+ );
1447
+ }
1448
+ function NavbarUserMenu({
1449
+ user,
1450
+ profile,
1451
+ loading = false,
1452
+ onSignOut,
1453
+ additionalItems = [],
1454
+ size = "sm",
1455
+ align = "end",
1456
+ LinkComponent
1457
+ }) {
1458
+ const menuItems = react.useMemo(() => {
1459
+ const items = additionalItems.map((item) => ({
1460
+ label: item.label,
1461
+ icon: item.icon,
1462
+ href: item.href,
1463
+ onClick: item.onClick,
1464
+ destructive: item.destructive,
1465
+ separatorBefore: item.separatorBefore
1466
+ }));
1467
+ items.push({
1468
+ label: "Sign Out",
1469
+ onClick: onSignOut,
1470
+ destructive: true,
1471
+ separatorBefore: items.length > 0
1472
+ });
1473
+ return items;
1474
+ }, [additionalItems, onSignOut]);
1475
+ if (loading) {
1476
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "inline-flex h-8 w-8 items-center justify-center rounded-md", children: /* @__PURE__ */ jsxRuntime.jsx(chunkHMAMMC72_js.Spinner, { size: "sm" }) });
1477
+ }
1478
+ const metadata = user.metadata || {};
1479
+ const avatarUrl = profile?.avatarUrl || profile?.avatar_url || metadata.picture || metadata.avatar_url;
1480
+ const fullName = metadata.full_name || metadata.name || "";
1481
+ const firstName = profile?.firstName || profile?.first_name || (typeof fullName === "string" ? fullName.split(" ")[0] : "") || "";
1482
+ const lastName = profile?.lastName || profile?.last_name || (typeof fullName === "string" ? fullName.split(" ").slice(1).join(" ") : "") || "";
1483
+ const displayName = `${firstName} ${lastName}`.trim() || user.email || "User";
1484
+ const initials = `${firstName?.[0] || ""}${lastName?.[0] || ""}`.toUpperCase() || "U";
1485
+ return /* @__PURE__ */ jsxRuntime.jsx(
1486
+ chunkE42B4GSB_js.UserAvatarMenu,
1487
+ {
1488
+ user: {
1489
+ id: user.id,
1490
+ email: user.email || void 0,
1491
+ avatarUrl,
1492
+ name: displayName,
1493
+ initials
1494
+ },
1495
+ items: menuItems,
1496
+ size,
1497
+ align,
1498
+ menuWidth: "w-40",
1499
+ LinkComponent,
1500
+ trigger: /* @__PURE__ */ jsxRuntime.jsxs(
1501
+ "button",
1502
+ {
1503
+ type: "button",
1504
+ className: "inline-flex h-8 w-8 items-center justify-center rounded-full focus:outline-none overflow-hidden *:hover:brightness-110 *:transition-all",
1505
+ children: [
1506
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkE42B4GSB_js.Avatar, { className: "h-7 w-7", children: [
1507
+ avatarUrl && /* @__PURE__ */ jsxRuntime.jsx(chunkE42B4GSB_js.AvatarImage, { src: avatarUrl, alt: displayName }),
1508
+ /* @__PURE__ */ jsxRuntime.jsx(
1509
+ chunkE42B4GSB_js.AvatarFallback,
1510
+ {
1511
+ className: "text-xs font-medium text-white",
1512
+ style: chunkQ256HRYD_js.getAvatarGradient(user.id).style,
1513
+ children: initials
1514
+ }
1515
+ )
1516
+ ] }),
1517
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "User menu" })
1518
+ ]
1519
+ }
1520
+ )
1521
+ }
1522
+ );
1523
+ }
1524
+ function toLinkGroup(title, links) {
1525
+ return {
1526
+ title,
1527
+ links: links.map((link) => ({
1528
+ href: link.href,
1529
+ label: link.label,
1530
+ external: link.external
1531
+ }))
1532
+ };
1533
+ }
1534
+ function NonprofitFooterPreset({
1535
+ logo,
1536
+ tagline,
1537
+ supportTitle = "Support",
1538
+ supportLinks = [],
1539
+ legalTitle = "Legal",
1540
+ legalLinks = [],
1541
+ socialLinks = [],
1542
+ newsletter,
1543
+ copyright,
1544
+ bottomContent,
1545
+ className,
1546
+ containerClassName
1547
+ }) {
1548
+ const linkGroups = [];
1549
+ if (supportLinks.length > 0) {
1550
+ linkGroups.push(toLinkGroup(supportTitle, supportLinks));
1551
+ }
1552
+ if (legalLinks.length > 0) {
1553
+ linkGroups.push(toLinkGroup(legalTitle, legalLinks));
1554
+ }
1555
+ return /* @__PURE__ */ jsxRuntime.jsx(
1556
+ Footer,
1557
+ {
1558
+ variant: "brand",
1559
+ logo,
1560
+ tagline,
1561
+ newsletter,
1562
+ linkGroups,
1563
+ socialLinks,
1564
+ copyright,
1565
+ bottomContent,
1566
+ className,
1567
+ containerClassName
1568
+ }
1569
+ );
1570
+ }
1571
+ var DEFAULT_ARIA_LABEL = "Section switcher";
1572
+ function matchesPath(pathname, href, match = "prefix") {
1573
+ if (match === "exact") {
1574
+ return pathname === href;
1575
+ }
1576
+ if (pathname === href) {
1577
+ return true;
1578
+ }
1579
+ if (href === "/") {
1580
+ return pathname === href;
1581
+ }
1582
+ return pathname.startsWith(`${href}/`);
1583
+ }
1584
+ function getFirstEnabledId(items) {
1585
+ return items.find((item) => !item.disabled)?.id ?? null;
1586
+ }
1587
+ function getLongestRouteMatch(items, pathname) {
1588
+ const matches = items.filter((item) => !item.disabled).filter((item) => matchesPath(pathname, item.href, item.match)).sort((a, b) => b.href.length - a.href.length);
1589
+ return matches[0]?.id ?? null;
1590
+ }
1591
+ function normalizeActiveId(items, id) {
1592
+ if (!id) {
1593
+ return null;
1594
+ }
1595
+ const activeItem = items.find((item) => item.id === id && !item.disabled);
1596
+ return activeItem?.id ?? null;
1597
+ }
1598
+ function getIndicatorTransition(reducedMotion) {
1599
+ if (reducedMotion) {
1600
+ return { duration: 0 };
1601
+ }
1602
+ return {
1603
+ type: "spring",
1604
+ stiffness: 520,
1605
+ damping: 40,
1606
+ mass: 0.6
1607
+ };
1608
+ }
1609
+ function DefaultLinkComponent({
1610
+ href,
1611
+ className,
1612
+ children,
1613
+ onClick,
1614
+ ...props
1615
+ }) {
1616
+ return /* @__PURE__ */ jsxRuntime.jsx("a", { href, className, onClick, ...props, children });
1617
+ }
1618
+ function SegmentedSwitcher({
1619
+ items,
1620
+ value,
1621
+ defaultValue,
1622
+ onValueChange,
1623
+ variant = "investor",
1624
+ showTrackBorder = true,
1625
+ showTrackBackground = true,
1626
+ ariaLabel = DEFAULT_ARIA_LABEL,
1627
+ className
1628
+ }) {
1629
+ const reducedMotion = react$1.useReducedMotion() ?? false;
1630
+ const indicatorLayoutId = `segmented-switcher-indicator-${react.useId().replaceAll(
1631
+ ":",
1632
+ ""
1633
+ )}`;
1634
+ const [uncontrolledValue, setUncontrolledValue] = react.useState(
1635
+ () => {
1636
+ return normalizeActiveId(items, defaultValue) ?? getFirstEnabledId(items);
1637
+ }
1638
+ );
1639
+ const isControlled = value !== void 0;
1640
+ const firstEnabledId = react.useMemo(() => getFirstEnabledId(items), [items]);
1641
+ react.useEffect(() => {
1642
+ if (isControlled) {
1643
+ return;
1644
+ }
1645
+ const nextValue = normalizeActiveId(items, uncontrolledValue) ?? normalizeActiveId(items, defaultValue) ?? firstEnabledId;
1646
+ if (nextValue !== uncontrolledValue) {
1647
+ setUncontrolledValue(nextValue);
1648
+ }
1649
+ }, [defaultValue, firstEnabledId, isControlled, items, uncontrolledValue]);
1650
+ const activeId = normalizeActiveId(items, isControlled ? value : uncontrolledValue) ?? normalizeActiveId(items, defaultValue) ?? firstEnabledId;
1651
+ const transition = getIndicatorTransition(reducedMotion);
1652
+ function handleSelect(item) {
1653
+ if (item.disabled) {
1654
+ return;
1655
+ }
1656
+ if (!isControlled) {
1657
+ setUncontrolledValue(item.id);
1658
+ }
1659
+ if (item.id !== activeId) {
1660
+ onValueChange?.(item.id);
1661
+ }
1662
+ }
1663
+ if (items.length === 0) {
1664
+ return null;
1665
+ }
1666
+ return /* @__PURE__ */ jsxRuntime.jsx(
1667
+ "nav",
1668
+ {
1669
+ "aria-label": ariaLabel,
1670
+ "data-slot": "segmented-switcher",
1671
+ "data-variant": variant,
1672
+ "data-track-border": showTrackBorder ? void 0 : "false",
1673
+ "data-track-background": showTrackBackground ? void 0 : "false",
1674
+ "data-reduced-motion": reducedMotion ? "true" : void 0,
1675
+ className: chunkADIDI7AJ_js.cn(className),
1676
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "segmented-switcher-track", children: items.map((item) => {
1677
+ const isActive = activeId === item.id;
1678
+ const isDisabled = item.disabled === true;
1679
+ if (item.href) {
1680
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1681
+ "a",
1682
+ {
1683
+ href: item.href,
1684
+ "data-slot": "segmented-switcher-item",
1685
+ "data-active": isActive ? "true" : void 0,
1686
+ "data-disabled": isDisabled ? "true" : void 0,
1687
+ "aria-disabled": isDisabled || void 0,
1688
+ tabIndex: isDisabled ? -1 : void 0,
1689
+ onClick: (event) => {
1690
+ if (isDisabled) {
1691
+ event.preventDefault();
1692
+ return;
1693
+ }
1694
+ handleSelect(item);
1695
+ },
1696
+ children: [
1697
+ isActive && /* @__PURE__ */ jsxRuntime.jsx(
1698
+ react$1.motion.span,
1699
+ {
1700
+ layoutId: indicatorLayoutId,
1701
+ transition,
1702
+ "data-slot": "segmented-switcher-indicator",
1703
+ "aria-hidden": "true"
1704
+ }
1705
+ ),
1706
+ /* @__PURE__ */ jsxRuntime.jsx("span", { "data-slot": "segmented-switcher-item-label", children: item.label })
1707
+ ]
1708
+ },
1709
+ item.id
1710
+ );
1711
+ }
1712
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1713
+ "button",
1714
+ {
1715
+ type: "button",
1716
+ "data-slot": "segmented-switcher-item",
1717
+ "data-active": isActive ? "true" : void 0,
1718
+ "data-disabled": isDisabled ? "true" : void 0,
1719
+ disabled: isDisabled,
1720
+ "aria-pressed": isActive,
1721
+ onClick: () => handleSelect(item),
1722
+ children: [
1723
+ isActive && /* @__PURE__ */ jsxRuntime.jsx(
1724
+ react$1.motion.span,
1725
+ {
1726
+ layoutId: indicatorLayoutId,
1727
+ transition,
1728
+ "data-slot": "segmented-switcher-indicator",
1729
+ "aria-hidden": "true"
1730
+ }
1731
+ ),
1732
+ /* @__PURE__ */ jsxRuntime.jsx("span", { "data-slot": "segmented-switcher-item-label", children: item.label })
1733
+ ]
1734
+ },
1735
+ item.id
1736
+ );
1737
+ }) })
1738
+ }
1739
+ );
1740
+ }
1741
+ function RouteSegmentedSwitcherWithPathname(props) {
1742
+ const pathname = navigation.usePathname() ?? "/";
1743
+ return /* @__PURE__ */ jsxRuntime.jsx(RouteSegmentedSwitcherInner, { ...props, pathname });
1744
+ }
1745
+ function RouteSegmentedSwitcherInner({
1746
+ items,
1747
+ pathname,
1748
+ value,
1749
+ onValueChange,
1750
+ LinkComponent,
1751
+ variant = "investor",
1752
+ showTrackBorder = true,
1753
+ showTrackBackground = true,
1754
+ ariaLabel = DEFAULT_ARIA_LABEL,
1755
+ className
1756
+ }) {
1757
+ const reducedMotion = react$1.useReducedMotion() ?? false;
1758
+ const indicatorLayoutId = `segmented-switcher-indicator-${react.useId().replaceAll(
1759
+ ":",
1760
+ ""
1761
+ )}`;
1762
+ const LinkEl = LinkComponent ?? DefaultLinkComponent;
1763
+ const visibleItems = react.useMemo(
1764
+ () => items.filter((item) => item.enabled !== false),
1765
+ [items]
1766
+ );
1767
+ const firstEnabledId = react.useMemo(
1768
+ () => getFirstEnabledId(visibleItems),
1769
+ [visibleItems]
1770
+ );
1771
+ const activeId = normalizeActiveId(visibleItems, value) ?? getLongestRouteMatch(visibleItems, pathname) ?? firstEnabledId;
1772
+ const transition = getIndicatorTransition(reducedMotion);
1773
+ function handleClick(event, item) {
1774
+ if (item.disabled) {
1775
+ event.preventDefault();
1776
+ return;
1777
+ }
1778
+ if (item.id !== activeId) {
1779
+ onValueChange?.(item.id);
1780
+ }
1781
+ }
1782
+ if (visibleItems.length === 0) {
1783
+ return null;
1784
+ }
1785
+ return /* @__PURE__ */ jsxRuntime.jsx(
1786
+ "nav",
1787
+ {
1788
+ "aria-label": ariaLabel,
1789
+ "data-slot": "segmented-switcher",
1790
+ "data-variant": variant,
1791
+ "data-track-border": showTrackBorder ? void 0 : "false",
1792
+ "data-track-background": showTrackBackground ? void 0 : "false",
1793
+ "data-reduced-motion": reducedMotion ? "true" : void 0,
1794
+ className: chunkADIDI7AJ_js.cn(className),
1795
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "segmented-switcher-track", children: visibleItems.map((item) => {
1796
+ const isActive = activeId === item.id;
1797
+ const isDisabled = item.disabled === true;
1798
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1799
+ LinkEl,
1800
+ {
1801
+ href: item.href,
1802
+ "data-slot": "segmented-switcher-item",
1803
+ "data-active": isActive ? "true" : void 0,
1804
+ "data-disabled": isDisabled ? "true" : void 0,
1805
+ "aria-current": isActive ? "page" : void 0,
1806
+ "aria-disabled": isDisabled || void 0,
1807
+ tabIndex: isDisabled ? -1 : void 0,
1808
+ onClick: (event) => handleClick(event, item),
1809
+ children: [
1810
+ isActive && /* @__PURE__ */ jsxRuntime.jsx(
1811
+ react$1.motion.span,
1812
+ {
1813
+ layoutId: indicatorLayoutId,
1814
+ transition,
1815
+ "data-slot": "segmented-switcher-indicator",
1816
+ "aria-hidden": "true"
1817
+ }
1818
+ ),
1819
+ /* @__PURE__ */ jsxRuntime.jsx("span", { "data-slot": "segmented-switcher-item-label", children: item.label })
1820
+ ]
1821
+ },
1822
+ item.id
1823
+ );
1824
+ }) })
1825
+ }
1826
+ );
1827
+ }
1828
+ function RouteSegmentedSwitcher({
1829
+ pathname,
1830
+ ...props
1831
+ }) {
1832
+ if (pathname !== void 0) {
1833
+ return /* @__PURE__ */ jsxRuntime.jsx(RouteSegmentedSwitcherInner, { ...props, pathname });
1834
+ }
1835
+ return /* @__PURE__ */ jsxRuntime.jsx(RouteSegmentedSwitcherWithPathname, { ...props });
1836
+ }
1837
+
1838
+ exports.NavigationMenuPrimitive = NavigationMenuPrimitive__namespace;
1839
+ exports.AppSwitcher = AppSwitcher;
1840
+ exports.ComingSoonButton = ComingSoonButton;
1841
+ exports.EntitySwitcher = EntitySwitcher;
1842
+ exports.Footer = Footer;
1843
+ exports.MarketingHeaderPreset = MarketingHeaderPreset;
1844
+ exports.Navbar = Navbar;
1845
+ exports.NavbarLogo = NavbarLogo;
1846
+ exports.NavbarUserMenu = NavbarUserMenu;
1847
+ exports.NavigationMenu = NavigationMenu;
1848
+ exports.NavigationMenuContent = NavigationMenuContent;
1849
+ exports.NavigationMenuIndicator = NavigationMenuIndicator;
1850
+ exports.NavigationMenuItem = NavigationMenuItem;
1851
+ exports.NavigationMenuLink = NavigationMenuLink;
1852
+ exports.NavigationMenuList = NavigationMenuList;
1853
+ exports.NavigationMenuTrigger = NavigationMenuTrigger;
1854
+ exports.NavigationMenuViewport = NavigationMenuViewport;
1855
+ exports.NavigationMenuViewportPrimitive = NavigationMenuViewportPrimitive;
1856
+ exports.NonprofitFooterPreset = NonprofitFooterPreset;
1857
+ exports.RouteSegmentedSwitcher = RouteSegmentedSwitcher;
1858
+ exports.SegmentedSwitcher = SegmentedSwitcher;
1859
+ exports.navigationMenuTriggerStyle = navigationMenuTriggerStyle;