@djangocfg/ui-nextjs 2.1.103 → 2.1.104

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 (44) hide show
  1. package/package.json +26 -30
  2. package/src/components/index.ts +2 -0
  3. package/src/components/ssr-pagination.tsx +2 -1
  4. package/src/hooks/index.ts +1 -6
  5. package/src/index.ts +2 -0
  6. package/src/theme/index.ts +2 -0
  7. package/dist/animations.cjs +0 -880
  8. package/dist/animations.cjs.map +0 -1
  9. package/dist/animations.d.mts +0 -36
  10. package/dist/animations.d.ts +0 -36
  11. package/dist/animations.mjs +0 -877
  12. package/dist/animations.mjs.map +0 -1
  13. package/dist/blocks.cjs +0 -1609
  14. package/dist/blocks.cjs.map +0 -1
  15. package/dist/blocks.d.mts +0 -278
  16. package/dist/blocks.d.ts +0 -278
  17. package/dist/blocks.mjs +0 -1589
  18. package/dist/blocks.mjs.map +0 -1
  19. package/dist/components.cjs +0 -1946
  20. package/dist/components.cjs.map +0 -1
  21. package/dist/components.d.mts +0 -322
  22. package/dist/components.d.ts +0 -322
  23. package/dist/components.mjs +0 -1860
  24. package/dist/components.mjs.map +0 -1
  25. package/dist/hooks.cjs +0 -530
  26. package/dist/hooks.cjs.map +0 -1
  27. package/dist/hooks.d.mts +0 -364
  28. package/dist/hooks.d.ts +0 -364
  29. package/dist/hooks.mjs +0 -506
  30. package/dist/hooks.mjs.map +0 -1
  31. package/dist/index.cjs +0 -4080
  32. package/dist/index.cjs.map +0 -1
  33. package/dist/index.d.mts +0 -1044
  34. package/dist/index.d.ts +0 -1044
  35. package/dist/index.mjs +0 -3962
  36. package/dist/index.mjs.map +0 -1
  37. package/dist/theme.cjs +0 -189
  38. package/dist/theme.cjs.map +0 -1
  39. package/dist/theme.d.mts +0 -60
  40. package/dist/theme.d.ts +0 -60
  41. package/dist/theme.mjs +0 -184
  42. package/dist/theme.mjs.map +0 -1
  43. package/src/hooks/useCfgRouter.ts +0 -153
  44. package/src/hooks/useQueryParams.ts +0 -73
package/dist/index.mjs DELETED
@@ -1,3962 +0,0 @@
1
- import * as components_star from '@djangocfg/ui-core/components';
2
- import { TooltipProvider, Sheet, SheetContent, SheetHeader, SheetTitle, SheetDescription, Button, Input, Separator, Tooltip, TooltipTrigger, TooltipContent, Skeleton, buttonVariants, Card, CardHeader, Badge, CardTitle, CardDescription, CardContent, ButtonLink, CopyButton, Sticky } from '@djangocfg/ui-core/components';
3
- import { ChevronRight, Check, Circle, PanelLeft, MoreHorizontal, ChevronLeft, Mail, Sparkles, ArrowRight, Sun, Moon, Wand2 } from 'lucide-react';
4
- import Link5 from 'next/link';
5
- import * as React6 from 'react';
6
- import React6__default, { useState, useRef, useEffect, useMemo, useCallback } from 'react';
7
- import { cn } from '@djangocfg/ui-core/lib';
8
- import { Slot } from '@radix-ui/react-slot';
9
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
10
- import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
11
- import { usePathname, useRouter } from 'next/navigation';
12
- import * as hooks_star from '@djangocfg/ui-core/hooks';
13
- import { useIsMobile } from '@djangocfg/ui-core/hooks';
14
- import { useHotkeysContext, isHotkeyPressed, HotkeysProvider, useHotkeys } from 'react-hotkeys-hook';
15
- export { HotkeysProvider, isHotkeyPressed, useHotkeysContext } from 'react-hotkeys-hook';
16
- import { cva } from 'class-variance-authority';
17
- import moment2 from 'moment';
18
- import Image from 'next/image';
19
- import { VideoPlayer } from '@djangocfg/ui-tools';
20
- import { ThemeProvider as ThemeProvider$1, useTheme } from 'next-themes';
21
-
22
- var __defProp = Object.defineProperty;
23
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
24
- var __getOwnPropNames = Object.getOwnPropertyNames;
25
- var __hasOwnProp = Object.prototype.hasOwnProperty;
26
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
27
- var __export = (target, all) => {
28
- for (var name in all)
29
- __defProp(target, name, { get: all[name], enumerable: true });
30
- };
31
- var __copyProps = (to, from, except, desc) => {
32
- if (from && typeof from === "object" || typeof from === "function") {
33
- for (let key of __getOwnPropNames(from))
34
- if (!__hasOwnProp.call(to, key) && key !== except)
35
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
36
- }
37
- return to;
38
- };
39
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget);
40
-
41
- // src/index.ts
42
- var index_exports = {};
43
- __export(index_exports, {
44
- AnimatedBackground: () => AnimatedBackground,
45
- ArticleCard: () => ArticleCard,
46
- ArticleList: () => ArticleList,
47
- Breadcrumb: () => Breadcrumb,
48
- BreadcrumbEllipsis: () => BreadcrumbEllipsis,
49
- BreadcrumbItem: () => BreadcrumbItem,
50
- BreadcrumbLink: () => BreadcrumbLink,
51
- BreadcrumbList: () => BreadcrumbList,
52
- BreadcrumbNavigation: () => BreadcrumbNavigation,
53
- BreadcrumbPage: () => BreadcrumbPage,
54
- BreadcrumbSeparator: () => BreadcrumbSeparator,
55
- CTASection: () => CTASection,
56
- DropdownMenu: () => DropdownMenu,
57
- DropdownMenuCheckboxItem: () => DropdownMenuCheckboxItem,
58
- DropdownMenuContent: () => DropdownMenuContent,
59
- DropdownMenuGroup: () => DropdownMenuGroup,
60
- DropdownMenuItem: () => DropdownMenuItem,
61
- DropdownMenuLabel: () => DropdownMenuLabel,
62
- DropdownMenuRadioGroup: () => DropdownMenuRadioGroup,
63
- DropdownMenuRadioItem: () => DropdownMenuRadioItem,
64
- DropdownMenuSeparator: () => DropdownMenuSeparator,
65
- DropdownMenuShortcut: () => DropdownMenuShortcut,
66
- DropdownMenuSub: () => DropdownMenuSub,
67
- DropdownMenuSubContent: () => DropdownMenuSubContent,
68
- DropdownMenuSubTrigger: () => DropdownMenuSubTrigger,
69
- DropdownMenuTrigger: () => DropdownMenuTrigger,
70
- FeatureSection: () => FeatureSection,
71
- ForceTheme: () => ForceTheme,
72
- Hero: () => Hero,
73
- HotkeysProvider: () => HotkeysProvider,
74
- MouseFollower: () => MouseFollower,
75
- NewsletterSection: () => NewsletterSection,
76
- Pagination: () => Pagination,
77
- PaginationContent: () => PaginationContent,
78
- PaginationEllipsis: () => PaginationEllipsis,
79
- PaginationItem: () => PaginationItem,
80
- PaginationLink: () => PaginationLink,
81
- PaginationNext: () => PaginationNext,
82
- PaginationPrevious: () => PaginationPrevious,
83
- SSRPagination: () => SSRPagination,
84
- Sidebar: () => Sidebar,
85
- SidebarContent: () => SidebarContent,
86
- SidebarFooter: () => SidebarFooter,
87
- SidebarGroup: () => SidebarGroup,
88
- SidebarGroupAction: () => SidebarGroupAction,
89
- SidebarGroupContent: () => SidebarGroupContent,
90
- SidebarGroupLabel: () => SidebarGroupLabel,
91
- SidebarHeader: () => SidebarHeader,
92
- SidebarInput: () => SidebarInput,
93
- SidebarInset: () => SidebarInset,
94
- SidebarMenu: () => SidebarMenu,
95
- SidebarMenuAction: () => SidebarMenuAction,
96
- SidebarMenuBadge: () => SidebarMenuBadge,
97
- SidebarMenuButton: () => SidebarMenuButton,
98
- SidebarMenuItem: () => SidebarMenuItem,
99
- SidebarMenuSkeleton: () => SidebarMenuSkeleton,
100
- SidebarMenuSub: () => SidebarMenuSub,
101
- SidebarMenuSubButton: () => SidebarMenuSubButton,
102
- SidebarMenuSubItem: () => SidebarMenuSubItem,
103
- SidebarProvider: () => SidebarProvider,
104
- SidebarRail: () => SidebarRail,
105
- SidebarSeparator: () => SidebarSeparator,
106
- SidebarTrigger: () => SidebarTrigger,
107
- SplitHero: () => SplitHero,
108
- SplitHeroContent: () => SplitHeroContent,
109
- SplitHeroMedia: () => SplitHeroMedia,
110
- StaticPagination: () => StaticPagination,
111
- StatsSection: () => StatsSection,
112
- SuperHero: () => SuperHero,
113
- TestimonialSection: () => TestimonialSection,
114
- ThemeProvider: () => ThemeProvider,
115
- ThemeToggle: () => ThemeToggle,
116
- isHotkeyPressed: () => isHotkeyPressed,
117
- useBrowserDetect: () => useBrowserDetect,
118
- useCfgRouter: () => useCfgRouter,
119
- useDRFPagination: () => useDRFPagination,
120
- useDRFPaginationInfo: () => useDRFPaginationInfo,
121
- useDeviceDetect: () => useDeviceDetect,
122
- useHotkey: () => useHotkey,
123
- useHotkeysContext: () => useHotkeysContext,
124
- useQueryParams: () => useQueryParams,
125
- useResolvedTheme: () => useResolvedTheme,
126
- useSidebar: () => useSidebar,
127
- useThemeContext: () => useThemeContext
128
- });
129
-
130
- // src/components/index.ts
131
- var components_exports = {};
132
- __export(components_exports, {
133
- Breadcrumb: () => Breadcrumb,
134
- BreadcrumbEllipsis: () => BreadcrumbEllipsis,
135
- BreadcrumbItem: () => BreadcrumbItem,
136
- BreadcrumbLink: () => BreadcrumbLink,
137
- BreadcrumbList: () => BreadcrumbList,
138
- BreadcrumbNavigation: () => BreadcrumbNavigation,
139
- BreadcrumbPage: () => BreadcrumbPage,
140
- BreadcrumbSeparator: () => BreadcrumbSeparator,
141
- DropdownMenu: () => DropdownMenu,
142
- DropdownMenuCheckboxItem: () => DropdownMenuCheckboxItem,
143
- DropdownMenuContent: () => DropdownMenuContent,
144
- DropdownMenuGroup: () => DropdownMenuGroup,
145
- DropdownMenuItem: () => DropdownMenuItem,
146
- DropdownMenuLabel: () => DropdownMenuLabel,
147
- DropdownMenuRadioGroup: () => DropdownMenuRadioGroup,
148
- DropdownMenuRadioItem: () => DropdownMenuRadioItem,
149
- DropdownMenuSeparator: () => DropdownMenuSeparator,
150
- DropdownMenuShortcut: () => DropdownMenuShortcut,
151
- DropdownMenuSub: () => DropdownMenuSub,
152
- DropdownMenuSubContent: () => DropdownMenuSubContent,
153
- DropdownMenuSubTrigger: () => DropdownMenuSubTrigger,
154
- DropdownMenuTrigger: () => DropdownMenuTrigger,
155
- Pagination: () => Pagination,
156
- PaginationContent: () => PaginationContent,
157
- PaginationEllipsis: () => PaginationEllipsis,
158
- PaginationItem: () => PaginationItem,
159
- PaginationLink: () => PaginationLink,
160
- PaginationNext: () => PaginationNext,
161
- PaginationPrevious: () => PaginationPrevious,
162
- SSRPagination: () => SSRPagination,
163
- Sidebar: () => Sidebar,
164
- SidebarContent: () => SidebarContent,
165
- SidebarFooter: () => SidebarFooter,
166
- SidebarGroup: () => SidebarGroup,
167
- SidebarGroupAction: () => SidebarGroupAction,
168
- SidebarGroupContent: () => SidebarGroupContent,
169
- SidebarGroupLabel: () => SidebarGroupLabel,
170
- SidebarHeader: () => SidebarHeader,
171
- SidebarInput: () => SidebarInput,
172
- SidebarInset: () => SidebarInset,
173
- SidebarMenu: () => SidebarMenu,
174
- SidebarMenuAction: () => SidebarMenuAction,
175
- SidebarMenuBadge: () => SidebarMenuBadge,
176
- SidebarMenuButton: () => SidebarMenuButton,
177
- SidebarMenuItem: () => SidebarMenuItem,
178
- SidebarMenuSkeleton: () => SidebarMenuSkeleton,
179
- SidebarMenuSub: () => SidebarMenuSub,
180
- SidebarMenuSubButton: () => SidebarMenuSubButton,
181
- SidebarMenuSubItem: () => SidebarMenuSubItem,
182
- SidebarProvider: () => SidebarProvider,
183
- SidebarRail: () => SidebarRail,
184
- SidebarSeparator: () => SidebarSeparator,
185
- SidebarTrigger: () => SidebarTrigger,
186
- StaticPagination: () => StaticPagination,
187
- useDRFPagination: () => useDRFPagination,
188
- useDRFPaginationInfo: () => useDRFPaginationInfo,
189
- useSidebar: () => useSidebar
190
- });
191
- __reExport(components_exports, components_star);
192
- var Breadcrumb = React6.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx("nav", { ref, "aria-label": "breadcrumb", ...props }));
193
- Breadcrumb.displayName = "Breadcrumb";
194
- var BreadcrumbList = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
195
- "ol",
196
- {
197
- ref,
198
- className: cn(
199
- "flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",
200
- className
201
- ),
202
- ...props
203
- }
204
- ));
205
- BreadcrumbList.displayName = "BreadcrumbList";
206
- var BreadcrumbItem = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
207
- "li",
208
- {
209
- ref,
210
- className: cn("inline-flex items-center gap-1.5", className),
211
- ...props
212
- }
213
- ));
214
- BreadcrumbItem.displayName = "BreadcrumbItem";
215
- var BreadcrumbLink = React6.forwardRef(({ asChild, className, href, children, ...props }, ref) => {
216
- const Comp = asChild ? Slot : "a";
217
- if (href) {
218
- return /* @__PURE__ */ jsx(
219
- Link5,
220
- {
221
- href,
222
- className: cn("transition-colors hover:text-foreground", className),
223
- ref,
224
- children
225
- }
226
- );
227
- }
228
- return /* @__PURE__ */ jsx(
229
- Comp,
230
- {
231
- ref,
232
- className: cn("transition-colors hover:text-foreground", className),
233
- ...props,
234
- children
235
- }
236
- );
237
- });
238
- BreadcrumbLink.displayName = "BreadcrumbLink";
239
- var BreadcrumbPage = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
240
- "span",
241
- {
242
- ref,
243
- role: "link",
244
- "aria-disabled": "true",
245
- "aria-current": "page",
246
- className: cn("font-normal text-foreground", className),
247
- ...props
248
- }
249
- ));
250
- BreadcrumbPage.displayName = "BreadcrumbPage";
251
- var BreadcrumbSeparator = /* @__PURE__ */ __name(({
252
- children,
253
- className,
254
- ...props
255
- }) => /* @__PURE__ */ jsx(
256
- "li",
257
- {
258
- role: "presentation",
259
- "aria-hidden": "true",
260
- className: cn("[&>svg]:w-3.5 [&>svg]:h-3.5", className),
261
- ...props,
262
- children: children ?? /* @__PURE__ */ jsx(ChevronRight, {})
263
- }
264
- ), "BreadcrumbSeparator");
265
- BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
266
- var BreadcrumbEllipsis = /* @__PURE__ */ __name(({
267
- className,
268
- ...props
269
- }) => /* @__PURE__ */ jsxs(
270
- "span",
271
- {
272
- role: "presentation",
273
- "aria-hidden": "true",
274
- className: cn("flex h-9 w-9 items-center justify-center", className),
275
- ...props,
276
- children: [
277
- /* @__PURE__ */ jsx(MoreHorizontal, { className: "h-4 w-4" }),
278
- /* @__PURE__ */ jsx("span", { className: "sr-only", children: "More" })
279
- ]
280
- }
281
- ), "BreadcrumbEllipsis");
282
- BreadcrumbEllipsis.displayName = "BreadcrumbElipssis";
283
- var BreadcrumbNavigation = /* @__PURE__ */ __name(({
284
- items,
285
- separator,
286
- maxItems = 5,
287
- className,
288
- useNextLink = true
289
- }) => {
290
- if (!items || items.length === 0) {
291
- return null;
292
- }
293
- const shouldCollapse = items.length > maxItems;
294
- let displayItems = items;
295
- if (shouldCollapse && items.length > 0) {
296
- if (items.length > 0) {
297
- const firstItem = items[0];
298
- const lastItems = items.slice(-(maxItems - 2)).filter(Boolean);
299
- displayItems = [firstItem, ...lastItems];
300
- }
301
- }
302
- const renderBreadcrumbItem = /* @__PURE__ */ __name((item, index, isLast) => {
303
- const isCurrentPage = item.isCurrentPage || isLast || !item.href;
304
- const content = /* @__PURE__ */ jsxs(Fragment, { children: [
305
- item.icon && /* @__PURE__ */ jsx("span", { className: "mr-1", children: item.icon }),
306
- item.label
307
- ] });
308
- if (isCurrentPage) {
309
- return /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbPage, { children: content }) }, `${item.label}-${index}`);
310
- }
311
- return /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbLink, { asChild: useNextLink, children: useNextLink ? /* @__PURE__ */ jsx(Link5, { href: item.href, children: content }) : /* @__PURE__ */ jsx("a", { href: item.href, children: content }) }) }, `${item.label}-${index}`);
312
- }, "renderBreadcrumbItem");
313
- return /* @__PURE__ */ jsx(Breadcrumb, { className, children: /* @__PURE__ */ jsx(BreadcrumbList, { children: displayItems.map((item, index) => {
314
- const isLast = index === displayItems.length - 1;
315
- const isFirst = index === 0;
316
- if (shouldCollapse && isFirst && displayItems.length > 2) {
317
- return /* @__PURE__ */ jsxs(React6__default.Fragment, { children: [
318
- renderBreadcrumbItem(item, index, isLast),
319
- /* @__PURE__ */ jsx(BreadcrumbSeparator, { children: separator }),
320
- /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbEllipsis, {}) }),
321
- !isLast && /* @__PURE__ */ jsx(BreadcrumbSeparator, { children: separator })
322
- ] }, `fragment-${index}`);
323
- }
324
- return /* @__PURE__ */ jsxs(React6__default.Fragment, { children: [
325
- renderBreadcrumbItem(item, index, isLast),
326
- !isLast && /* @__PURE__ */ jsx(BreadcrumbSeparator, { children: separator })
327
- ] }, `fragment-${index}`);
328
- }) }) });
329
- }, "BreadcrumbNavigation");
330
- BreadcrumbNavigation.displayName = "BreadcrumbNavigation";
331
- var DropdownMenu = DropdownMenuPrimitive.Root;
332
- var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
333
- var DropdownMenuGroup = DropdownMenuPrimitive.Group;
334
- var DropdownMenuSub = DropdownMenuPrimitive.Sub;
335
- var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
336
- var DropdownMenuSubTrigger = React6.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(
337
- DropdownMenuPrimitive.SubTrigger,
338
- {
339
- ref,
340
- className: cn(
341
- "flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
342
- inset && "pl-8",
343
- className
344
- ),
345
- ...props,
346
- children: [
347
- children,
348
- /* @__PURE__ */ jsx(ChevronRight, { className: "ml-auto" })
349
- ]
350
- }
351
- ));
352
- DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
353
- var DropdownMenuSubContent = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
354
- DropdownMenuPrimitive.SubContent,
355
- {
356
- ref,
357
- className: cn(
358
- "z-600 min-w-32 overflow-hidden rounded-sm border bg-popover backdrop-blur-xl p-1 text-popover-foreground shadow-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
359
- className
360
- ),
361
- ...props
362
- }
363
- ));
364
- DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
365
- var DropdownMenuContent = React6.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
366
- DropdownMenuPrimitive.Content,
367
- {
368
- ref,
369
- sideOffset,
370
- className: cn(
371
- "z-600 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-32 overflow-y-auto overflow-x-hidden rounded-sm border bg-popover backdrop-blur-xl p-1 text-popover-foreground shadow-sm",
372
- "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
373
- className
374
- ),
375
- ...props
376
- }
377
- ) }));
378
- DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
379
- var DropdownMenuItem = React6.forwardRef(({ className, inset, href, children, ...props }, ref) => {
380
- const classes = cn(
381
- "relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",
382
- inset && "pl-8",
383
- className
384
- );
385
- if (href) {
386
- return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Item, { asChild: true, ref, ...props, children: /* @__PURE__ */ jsx(Link5, { href, className: classes, children }) });
387
- }
388
- return /* @__PURE__ */ jsx(
389
- DropdownMenuPrimitive.Item,
390
- {
391
- ref,
392
- className: classes,
393
- ...props,
394
- children
395
- }
396
- );
397
- });
398
- DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
399
- var DropdownMenuCheckboxItem = React6.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(
400
- DropdownMenuPrimitive.CheckboxItem,
401
- {
402
- ref,
403
- className: cn(
404
- "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
405
- className
406
- ),
407
- checked,
408
- ...props,
409
- children: [
410
- /* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" }) }) }),
411
- children
412
- ]
413
- }
414
- ));
415
- DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
416
- var DropdownMenuRadioItem = React6.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
417
- DropdownMenuPrimitive.RadioItem,
418
- {
419
- ref,
420
- className: cn(
421
- "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
422
- className
423
- ),
424
- ...props,
425
- children: [
426
- /* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Circle, { className: "h-2 w-2 fill-current" }) }) }),
427
- children
428
- ]
429
- }
430
- ));
431
- DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
432
- var DropdownMenuLabel = React6.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
433
- DropdownMenuPrimitive.Label,
434
- {
435
- ref,
436
- className: cn(
437
- "px-2 py-1.5 text-sm font-semibold",
438
- inset && "pl-8",
439
- className
440
- ),
441
- ...props
442
- }
443
- ));
444
- DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
445
- var DropdownMenuSeparator = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
446
- DropdownMenuPrimitive.Separator,
447
- {
448
- ref,
449
- className: cn("-mx-1 my-1 h-px bg-muted", className),
450
- ...props
451
- }
452
- ));
453
- DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
454
- var DropdownMenuShortcut = /* @__PURE__ */ __name(({
455
- className,
456
- ...props
457
- }) => {
458
- return /* @__PURE__ */ jsx(
459
- "span",
460
- {
461
- className: cn("ml-auto text-xs tracking-widest opacity-60", className),
462
- ...props
463
- }
464
- );
465
- }, "DropdownMenuShortcut");
466
- DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
467
- var Pagination = /* @__PURE__ */ __name(({ className, ...props }) => /* @__PURE__ */ jsx(
468
- "nav",
469
- {
470
- role: "navigation",
471
- "aria-label": "pagination",
472
- className: cn("mx-auto flex w-full justify-center", className),
473
- ...props
474
- }
475
- ), "Pagination");
476
- Pagination.displayName = "Pagination";
477
- var PaginationContent = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
478
- "ul",
479
- {
480
- ref,
481
- className: cn("flex flex-row items-center gap-1", className),
482
- ...props
483
- }
484
- ));
485
- PaginationContent.displayName = "PaginationContent";
486
- var PaginationItem = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("li", { ref, className: cn("", className), ...props }));
487
- PaginationItem.displayName = "PaginationItem";
488
- var PaginationLink = /* @__PURE__ */ __name(({
489
- className,
490
- isActive,
491
- size = "icon",
492
- href,
493
- children,
494
- ...props
495
- }) => {
496
- const classes = cn(
497
- buttonVariants({
498
- variant: isActive ? "outline" : "ghost",
499
- size
500
- }),
501
- className
502
- );
503
- if (href) {
504
- return /* @__PURE__ */ jsx(
505
- Link5,
506
- {
507
- href,
508
- "aria-current": isActive ? "page" : void 0,
509
- className: classes,
510
- children
511
- }
512
- );
513
- }
514
- return /* @__PURE__ */ jsx(
515
- "a",
516
- {
517
- "aria-current": isActive ? "page" : void 0,
518
- className: classes,
519
- ...props,
520
- children
521
- }
522
- );
523
- }, "PaginationLink");
524
- PaginationLink.displayName = "PaginationLink";
525
- var PaginationPrevious = /* @__PURE__ */ __name(({
526
- className,
527
- ...props
528
- }) => /* @__PURE__ */ jsxs(
529
- PaginationLink,
530
- {
531
- "aria-label": "Go to previous page",
532
- size: "default",
533
- className: cn("gap-1 pl-2.5", className),
534
- ...props,
535
- children: [
536
- /* @__PURE__ */ jsx(ChevronLeft, { className: "h-4 w-4" }),
537
- /* @__PURE__ */ jsx("span", { children: "Previous" })
538
- ]
539
- }
540
- ), "PaginationPrevious");
541
- PaginationPrevious.displayName = "PaginationPrevious";
542
- var PaginationNext = /* @__PURE__ */ __name(({
543
- className,
544
- ...props
545
- }) => /* @__PURE__ */ jsxs(
546
- PaginationLink,
547
- {
548
- "aria-label": "Go to next page",
549
- size: "default",
550
- className: cn("gap-1 pr-2.5", className),
551
- ...props,
552
- children: [
553
- /* @__PURE__ */ jsx("span", { children: "Next" }),
554
- /* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4" })
555
- ]
556
- }
557
- ), "PaginationNext");
558
- PaginationNext.displayName = "PaginationNext";
559
- var PaginationEllipsis = /* @__PURE__ */ __name(({
560
- className,
561
- ...props
562
- }) => /* @__PURE__ */ jsxs(
563
- "span",
564
- {
565
- "aria-hidden": true,
566
- className: cn("flex h-9 w-9 items-center justify-center", className),
567
- ...props,
568
- children: [
569
- /* @__PURE__ */ jsx(MoreHorizontal, { className: "h-4 w-4" }),
570
- /* @__PURE__ */ jsx("span", { className: "sr-only", children: "More pages" })
571
- ]
572
- }
573
- ), "PaginationEllipsis");
574
- PaginationEllipsis.displayName = "PaginationEllipsis";
575
-
576
- // src/hooks/index.ts
577
- var hooks_exports = {};
578
- __export(hooks_exports, {
579
- HotkeysProvider: () => HotkeysProvider,
580
- isHotkeyPressed: () => isHotkeyPressed,
581
- useBrowserDetect: () => useBrowserDetect,
582
- useCfgRouter: () => useCfgRouter,
583
- useDeviceDetect: () => useDeviceDetect,
584
- useHotkey: () => useHotkey,
585
- useHotkeysContext: () => useHotkeysContext,
586
- useQueryParams: () => useQueryParams,
587
- useResolvedTheme: () => useResolvedTheme
588
- });
589
- __reExport(hooks_exports, hooks_star);
590
- var useResolvedTheme = /* @__PURE__ */ __name(() => {
591
- const [theme, setTheme] = useState("light");
592
- useEffect(() => {
593
- const checkTheme = /* @__PURE__ */ __name(() => {
594
- if (document.documentElement.classList.contains("dark")) {
595
- return "dark";
596
- }
597
- if (window.matchMedia("(prefers-color-scheme: dark)").matches) {
598
- return "dark";
599
- }
600
- return "light";
601
- }, "checkTheme");
602
- setTheme(checkTheme());
603
- const observer = new MutationObserver(() => {
604
- setTheme(checkTheme());
605
- });
606
- observer.observe(document.documentElement, {
607
- attributes: true,
608
- attributeFilter: ["class"]
609
- });
610
- const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
611
- const handleMediaChange = /* @__PURE__ */ __name(() => {
612
- setTheme(checkTheme());
613
- }, "handleMediaChange");
614
- mediaQuery.addEventListener("change", handleMediaChange);
615
- return () => {
616
- observer.disconnect();
617
- mediaQuery.removeEventListener("change", handleMediaChange);
618
- };
619
- }, []);
620
- return theme;
621
- }, "useResolvedTheme");
622
- function useQueryParams() {
623
- const pathname = usePathname();
624
- const [queryParams, setQueryParams] = useState(() => {
625
- if (typeof window === "undefined") {
626
- return new URLSearchParams();
627
- }
628
- return new URLSearchParams(window.location.search);
629
- });
630
- const lastSearchRef = useRef("");
631
- useEffect(() => {
632
- if (typeof window === "undefined") return;
633
- const updateQueryParams = /* @__PURE__ */ __name(() => {
634
- const currentSearch = window.location.search;
635
- if (currentSearch !== lastSearchRef.current) {
636
- lastSearchRef.current = currentSearch;
637
- setQueryParams(new URLSearchParams(currentSearch));
638
- }
639
- }, "updateQueryParams");
640
- updateQueryParams();
641
- window.addEventListener("popstate", updateQueryParams);
642
- const intervalId = setInterval(updateQueryParams, 100);
643
- return () => {
644
- window.removeEventListener("popstate", updateQueryParams);
645
- clearInterval(intervalId);
646
- };
647
- }, [pathname]);
648
- return queryParams;
649
- }
650
- __name(useQueryParams, "useQueryParams");
651
- function getBasePath() {
652
- if (typeof process === "undefined") {
653
- return "";
654
- }
655
- return process.env.NEXT_PUBLIC_BASE_PATH || "";
656
- }
657
- __name(getBasePath, "getBasePath");
658
- function withBasePath(path, basePath) {
659
- if (!basePath) {
660
- return path;
661
- }
662
- const normalizedPath = path.startsWith("/") ? path : `/${path}`;
663
- const normalizedBasePath = basePath.replace(/\/$/, "");
664
- return `${normalizedBasePath}${normalizedPath}`;
665
- }
666
- __name(withBasePath, "withBasePath");
667
- function useCfgRouter() {
668
- const router = useRouter();
669
- const basePath = useMemo(() => getBasePath(), []);
670
- useMemo(() => {
671
- return typeof process !== "undefined" && process.env.NEXT_PUBLIC_STATIC_BUILD === "true";
672
- }, []);
673
- const push = useCallback((href, options) => {
674
- if (basePath) {
675
- window.location.href = withBasePath(href, basePath);
676
- } else {
677
- router.push(href, options);
678
- }
679
- }, [router, basePath]);
680
- const replace = useCallback((href, options) => {
681
- if (basePath) {
682
- window.location.replace(withBasePath(href, basePath));
683
- } else {
684
- router.replace(href, options);
685
- }
686
- }, [router, basePath]);
687
- const hardPush = useCallback((href) => {
688
- window.location.href = withBasePath(href, basePath);
689
- }, [basePath]);
690
- const hardReplace = useCallback((href) => {
691
- window.location.replace(withBasePath(href, basePath));
692
- }, [basePath]);
693
- const prefetch = useCallback((href) => {
694
- router.prefetch(href);
695
- }, [router]);
696
- const back = useCallback(() => {
697
- router.back();
698
- }, [router]);
699
- const forward = useCallback(() => {
700
- router.forward();
701
- }, [router]);
702
- const refresh = useCallback(() => {
703
- router.refresh();
704
- }, [router]);
705
- return {
706
- push,
707
- replace,
708
- hardPush,
709
- hardReplace,
710
- prefetch,
711
- back,
712
- forward,
713
- refresh
714
- };
715
- }
716
- __name(useCfgRouter, "useCfgRouter");
717
- function useHotkey(keys, callback, options = {}) {
718
- const {
719
- enabled = true,
720
- preventDefault = false,
721
- enableOnFormTags = false,
722
- enableOnContentEditable = false,
723
- description: _description,
724
- ...restOptions
725
- } = options;
726
- return useHotkeys(
727
- keys,
728
- (event, handler) => {
729
- if (preventDefault) {
730
- event.preventDefault();
731
- }
732
- callback(event, handler);
733
- },
734
- {
735
- enabled,
736
- enableOnFormTags,
737
- enableOnContentEditable,
738
- ...restOptions
739
- }
740
- );
741
- }
742
- __name(useHotkey, "useHotkey");
743
- var defaultSelectors = {
744
- isMobile: false,
745
- isTablet: false,
746
- isDesktop: false,
747
- isBrowser: false,
748
- isMobileOnly: false,
749
- isSmartTV: false,
750
- isConsole: false,
751
- isWearable: false,
752
- isEmbedded: false,
753
- isAndroid: false,
754
- isIOS: false,
755
- isWindows: false,
756
- isMacOs: false,
757
- isWinPhone: false,
758
- isChrome: false,
759
- isFirefox: false,
760
- isSafari: false,
761
- isOpera: false,
762
- isIE: false,
763
- isEdge: false,
764
- isEdgeChromium: false,
765
- isLegacyEdge: false,
766
- isChromium: false,
767
- isMobileSafari: false,
768
- isYandex: false,
769
- isMIUI: false,
770
- isSamsungBrowser: false,
771
- isElectron: false,
772
- osVersion: "unknown",
773
- osName: "unknown",
774
- fullBrowserVersion: "unknown",
775
- browserVersion: "unknown",
776
- browserName: "unknown",
777
- mobileVendor: "unknown",
778
- mobileModel: "unknown",
779
- engineName: "unknown",
780
- engineVersion: "unknown",
781
- getUA: "",
782
- deviceType: "unknown",
783
- isIOS13: false,
784
- isIPad13: false,
785
- isIPhone13: false,
786
- isIPod13: false
787
- };
788
- var defaultDeviceData = {
789
- deviceType: "unknown",
790
- osName: "unknown",
791
- osVersion: "unknown",
792
- browserName: "unknown",
793
- browserVersion: "unknown",
794
- fullBrowserVersion: "unknown",
795
- mobileVendor: "unknown",
796
- mobileModel: "unknown",
797
- engineName: "unknown",
798
- engineVersion: "unknown",
799
- getUA: ""
800
- };
801
- var defaultOrientation = {
802
- isPortrait: false,
803
- isLandscape: false,
804
- orientation: "portrait"
805
- };
806
- function useDeviceDetect(userAgent) {
807
- const [deviceInfo, setDeviceInfo] = useState({
808
- selectors: defaultSelectors,
809
- deviceData: defaultDeviceData,
810
- orientation: defaultOrientation
811
- });
812
- useEffect(() => {
813
- if (typeof window === "undefined") return;
814
- import('react-device-detect').then((deviceDetect) => {
815
- const ua = userAgent || (typeof window !== "undefined" ? window.navigator.userAgent : "");
816
- if (!ua) {
817
- console.warn("No user agent available");
818
- return;
819
- }
820
- const parsed = deviceDetect.parseUserAgent(ua);
821
- if (!parsed) {
822
- console.warn("Failed to parse user agent");
823
- return;
824
- }
825
- const selectors2 = deviceDetect.getSelectorsByUserAgent(ua) || defaultSelectors;
826
- const deviceData2 = {
827
- deviceType: parsed.device?.type || "unknown",
828
- osName: parsed.os?.name || "unknown",
829
- osVersion: parsed.os?.version || "unknown",
830
- browserName: parsed.browser?.name || "unknown",
831
- browserVersion: parsed.browser?.version || "unknown",
832
- fullBrowserVersion: parsed.browser?.version || "unknown",
833
- mobileVendor: parsed.device?.vendor || "unknown",
834
- mobileModel: parsed.device?.model || "unknown",
835
- engineName: parsed.engine?.name || "unknown",
836
- engineVersion: parsed.engine?.version || "unknown",
837
- getUA: parsed.ua || ua
838
- };
839
- let orientation2 = defaultOrientation;
840
- try {
841
- if (typeof window !== "undefined") {
842
- const isPortrait = window.innerHeight > window.innerWidth;
843
- orientation2 = {
844
- isPortrait,
845
- isLandscape: !isPortrait,
846
- orientation: isPortrait ? "portrait" : "landscape"
847
- };
848
- }
849
- } catch (error) {
850
- console.warn("Failed to get orientation:", error);
851
- }
852
- setDeviceInfo({ selectors: selectors2, deviceData: deviceData2, orientation: orientation2 });
853
- }).catch((error) => {
854
- console.warn("Failed to load device detection:", error);
855
- });
856
- }, [userAgent]);
857
- useEffect(() => {
858
- if (typeof window === "undefined") return;
859
- const handleResize = /* @__PURE__ */ __name(() => {
860
- const isPortrait = window.innerHeight > window.innerWidth;
861
- setDeviceInfo((prev) => ({
862
- ...prev,
863
- orientation: {
864
- isPortrait,
865
- isLandscape: !isPortrait,
866
- orientation: isPortrait ? "portrait" : "landscape"
867
- }
868
- }));
869
- }, "handleResize");
870
- window.addEventListener("resize", handleResize);
871
- window.addEventListener("orientationchange", handleResize);
872
- return () => {
873
- window.removeEventListener("resize", handleResize);
874
- window.removeEventListener("orientationchange", handleResize);
875
- };
876
- }, []);
877
- const { selectors, deviceData, orientation } = deviceInfo;
878
- return useMemo(() => {
879
- return {
880
- // Device type selectors
881
- isMobile: selectors.isMobile ?? false,
882
- isTablet: selectors.isTablet ?? false,
883
- isDesktop: selectors.isDesktop ?? false,
884
- isBrowser: selectors.isBrowser ?? false,
885
- isMobileOnly: selectors.isMobileOnly ?? false,
886
- isSmartTV: selectors.isSmartTV ?? false,
887
- isConsole: selectors.isConsole ?? false,
888
- isWearable: selectors.isWearable ?? false,
889
- isEmbedded: selectors.isEmbedded ?? false,
890
- // OS selectors
891
- isAndroid: selectors.isAndroid ?? false,
892
- isIOS: selectors.isIOS ?? false,
893
- isWindows: selectors.isWindows ?? false,
894
- isMacOs: selectors.isMacOs ?? false,
895
- isWinPhone: selectors.isWinPhone ?? false,
896
- // Browser selectors
897
- isChrome: selectors.isChrome ?? false,
898
- isFirefox: selectors.isFirefox ?? false,
899
- isSafari: selectors.isSafari ?? false,
900
- isOpera: selectors.isOpera ?? false,
901
- isIE: selectors.isIE ?? false,
902
- isEdge: selectors.isEdge ?? false,
903
- isEdgeChromium: selectors.isEdgeChromium ?? false,
904
- isLegacyEdge: selectors.isLegacyEdge ?? false,
905
- isChromium: selectors.isChromium ?? false,
906
- isMobileSafari: selectors.isMobileSafari ?? false,
907
- isYandex: selectors.isYandex ?? false,
908
- isMIUI: selectors.isMIUI ?? false,
909
- isSamsungBrowser: selectors.isSamsungBrowser ?? false,
910
- isElectron: selectors.isElectron ?? false,
911
- // iOS version selectors
912
- isIOS13: selectors.isIOS13 ?? false,
913
- isIPad13: selectors.isIPad13 ?? false,
914
- isIPhone13: selectors.isIPhone13 ?? false,
915
- isIPod13: selectors.isIPod13 ?? false,
916
- // Device information
917
- deviceType: deviceData.deviceType ?? "unknown",
918
- osName: deviceData.osName ?? "unknown",
919
- osVersion: deviceData.osVersion ?? "unknown",
920
- browserName: deviceData.browserName ?? "unknown",
921
- browserVersion: deviceData.browserVersion ?? "unknown",
922
- fullBrowserVersion: deviceData.fullBrowserVersion ?? "unknown",
923
- mobileVendor: deviceData.mobileVendor ?? "unknown",
924
- mobileModel: deviceData.mobileModel ?? "unknown",
925
- engineName: deviceData.engineName ?? "unknown",
926
- engineVersion: deviceData.engineVersion ?? "unknown",
927
- getUA: deviceData.getUA ?? "",
928
- // Orientation
929
- isPortrait: orientation.isPortrait,
930
- isLandscape: orientation.isLandscape,
931
- orientation: orientation.orientation,
932
- // Raw data (for advanced usage)
933
- selectors,
934
- deviceData
935
- };
936
- }, [selectors, deviceData, orientation]);
937
- }
938
- __name(useDeviceDetect, "useDeviceDetect");
939
- function useBrowserDetect() {
940
- return useMemo(() => {
941
- if (typeof window === "undefined") {
942
- return {
943
- isChrome: false,
944
- isChromium: false,
945
- isSafari: false,
946
- isFirefox: false,
947
- isEdge: false,
948
- isOpera: false,
949
- isBrave: false,
950
- isArc: false,
951
- isVivaldi: false,
952
- isYandex: false,
953
- isSamsungBrowser: false,
954
- isUCBrowser: false,
955
- isComet: false,
956
- isOperaMini: false,
957
- isIE: false,
958
- isFacebookInApp: false,
959
- isInstagramInApp: false,
960
- isTikTokInApp: false,
961
- isSnapchatInApp: false,
962
- isWeChatInApp: false,
963
- isThreadsInApp: false,
964
- isLinkedInInApp: false,
965
- isTwitterInApp: false,
966
- isInAppBrowser: false,
967
- isWebView: false,
968
- browserName: "unknown",
969
- isWebKit: false,
970
- isBlink: false,
971
- isGecko: false,
972
- supportsPushNotifications: false,
973
- isIOSBrowser: false,
974
- userAgent: ""
975
- };
976
- }
977
- const ua = window.navigator.userAgent.toLowerCase();
978
- const isEdge = ua.includes("edg/") || ua.includes("edge/");
979
- const isBrave = !!window.navigator.brave;
980
- const isArc = ua.includes("arc/");
981
- const isVivaldi = ua.includes("vivaldi");
982
- const isYandex = ua.includes("yabrowser");
983
- const isSamsungBrowser = ua.includes("samsungbrowser");
984
- const isUCBrowser = ua.includes("ucbrowser") || ua.includes("uc browser");
985
- const isComet = ua.includes("comet") || ua.includes("perplexity");
986
- const isOperaMini = ua.includes("opera mini") || ua.includes("opios");
987
- const isIE = ua.includes("msie") || ua.includes("trident/");
988
- const isFacebookInApp = ua.includes("fban") || ua.includes("fbav") || ua.includes("fb_iab");
989
- const isInstagramInApp = ua.includes("instagram");
990
- const isTikTokInApp = ua.includes("tiktok") || ua.includes("bytedancewebview") || ua.includes("bytelocale");
991
- const isSnapchatInApp = ua.includes("snapchat");
992
- const isWeChatInApp = ua.includes("micromessenger");
993
- const isThreadsInApp = ua.includes("barcelona");
994
- const isLinkedInInApp = ua.includes("linkedinapp");
995
- const isTwitterInApp = ua.includes("twitter");
996
- const isPinterestInApp = ua.includes("pinterest");
997
- const isTelegramInApp = ua.includes("telegram");
998
- const isLineInApp = ua.includes("line/");
999
- const isKakaoInApp = ua.includes("kakaotalk");
1000
- const isWebView = ua.includes("wv)") || // Android WebView marker
1001
- ua.includes("webview") || ua.includes("; wv") || ua.includes("iphone") && !ua.includes("safari") || // iOS WebView (no Safari)
1002
- ua.includes("ipad") && !ua.includes("safari");
1003
- const isInAppBrowser = isFacebookInApp || isInstagramInApp || isTikTokInApp || isSnapchatInApp || isWeChatInApp || isThreadsInApp || isLinkedInInApp || isTwitterInApp || isPinterestInApp || isTelegramInApp || isLineInApp || isKakaoInApp;
1004
- const isIOSBrowser = ua.includes("iphone") || ua.includes("ipad") || ua.includes("ipod");
1005
- const isOpera = (ua.includes("opr/") || ua.includes("opera")) && !isOperaMini;
1006
- const isChrome = ua.includes("chrome") && !isEdge && !isOpera && !isYandex && !isSamsungBrowser && !isVivaldi && !isArc && !isBrave && !isComet;
1007
- const isFirefox = ua.includes("firefox") && !ua.includes("seamonkey");
1008
- const hasSafariUA = ua.includes("safari");
1009
- const hasChrome = ua.includes("chrome") || ua.includes("crios");
1010
- const hasVersion = ua.includes("version/");
1011
- const isSafari = hasSafariUA && !hasChrome && hasVersion;
1012
- const isChromium = hasChrome || isEdge || isOpera || isYandex || isSamsungBrowser || isVivaldi || isArc || isBrave || isUCBrowser || isComet;
1013
- const isWebKit = !isChromium && isSafari;
1014
- const isBlink = isChromium;
1015
- const isGecko = isFirefox;
1016
- let browserName = "unknown";
1017
- if (isFacebookInApp) browserName = "Facebook In-App";
1018
- else if (isInstagramInApp) browserName = "Instagram In-App";
1019
- else if (isTikTokInApp) browserName = "TikTok In-App";
1020
- else if (isSnapchatInApp) browserName = "Snapchat In-App";
1021
- else if (isWeChatInApp) browserName = "WeChat In-App";
1022
- else if (isThreadsInApp) browserName = "Threads In-App";
1023
- else if (isLinkedInInApp) browserName = "LinkedIn In-App";
1024
- else if (isTwitterInApp) browserName = "Twitter In-App";
1025
- else if (isPinterestInApp) browserName = "Pinterest In-App";
1026
- else if (isTelegramInApp) browserName = "Telegram In-App";
1027
- else if (isLineInApp) browserName = "Line In-App";
1028
- else if (isKakaoInApp) browserName = "KakaoTalk In-App";
1029
- else if (isComet) browserName = "Comet";
1030
- else if (isOperaMini) browserName = "Opera Mini";
1031
- else if (isIE) browserName = "Internet Explorer";
1032
- else if (isBrave) browserName = "Brave";
1033
- else if (isArc) browserName = "Arc";
1034
- else if (isVivaldi) browserName = "Vivaldi";
1035
- else if (isYandex) browserName = "Yandex";
1036
- else if (isSamsungBrowser) browserName = "Samsung Internet";
1037
- else if (isUCBrowser) browserName = "UC Browser";
1038
- else if (isEdge) browserName = "Edge";
1039
- else if (isOpera) browserName = "Opera";
1040
- else if (isChrome) browserName = "Chrome";
1041
- else if (isSafari) browserName = "Safari";
1042
- else if (isFirefox) browserName = "Firefox";
1043
- else if (isWebView) browserName = "WebView";
1044
- const browserBlocksPush = isOperaMini || isIE || isUCBrowser || isFacebookInApp || isInstagramInApp || isTikTokInApp || isSnapchatInApp || isWeChatInApp || isThreadsInApp || isPinterestInApp || isTelegramInApp || isLineInApp || isKakaoInApp || isWebView;
1045
- const twitterLinkedInAndroid = (isTwitterInApp || isLinkedInInApp) && !isIOSBrowser;
1046
- const supportsPushNotifications = !browserBlocksPush || twitterLinkedInAndroid;
1047
- return {
1048
- isChrome,
1049
- isChromium,
1050
- isSafari,
1051
- isFirefox,
1052
- isEdge,
1053
- isOpera,
1054
- isBrave,
1055
- isArc,
1056
- isVivaldi,
1057
- isYandex,
1058
- isSamsungBrowser,
1059
- isUCBrowser,
1060
- isComet,
1061
- isOperaMini,
1062
- isIE,
1063
- isFacebookInApp,
1064
- isInstagramInApp,
1065
- isTikTokInApp,
1066
- isSnapchatInApp,
1067
- isWeChatInApp,
1068
- isThreadsInApp,
1069
- isLinkedInInApp,
1070
- isTwitterInApp,
1071
- isInAppBrowser,
1072
- isWebView,
1073
- browserName,
1074
- isWebKit,
1075
- isBlink,
1076
- isGecko,
1077
- supportsPushNotifications,
1078
- isIOSBrowser,
1079
- userAgent: window.navigator.userAgent
1080
- };
1081
- }, []);
1082
- }
1083
- __name(useBrowserDetect, "useBrowserDetect");
1084
- var SSRPagination = /* @__PURE__ */ __name(({
1085
- currentPage,
1086
- totalPages,
1087
- totalItems,
1088
- itemsPerPage,
1089
- hasNextPage,
1090
- hasPreviousPage,
1091
- className,
1092
- showInfo = true,
1093
- maxVisiblePages = 7,
1094
- baseUrl,
1095
- pathname: propPathname,
1096
- preserveQuery = true
1097
- }) => {
1098
- const queryParams = useQueryParams();
1099
- const pathname = usePathname();
1100
- const isMobile = useIsMobile();
1101
- const getCurrentPageFromUrl = /* @__PURE__ */ __name(() => {
1102
- const pageParam = queryParams.get("page");
1103
- if (pageParam) {
1104
- const pageNum = parseInt(pageParam, 10);
1105
- return isNaN(pageNum) ? 1 : pageNum;
1106
- }
1107
- return 1;
1108
- }, "getCurrentPageFromUrl");
1109
- const actualCurrentPage = getCurrentPageFromUrl() || currentPage;
1110
- const actualHasPreviousPage = actualCurrentPage > 1;
1111
- const smartTotalPages = Math.max(
1112
- totalPages,
1113
- actualCurrentPage + (hasNextPage ? 5 : 0)
1114
- );
1115
- const getPageUrl = /* @__PURE__ */ __name((page) => {
1116
- if (baseUrl) {
1117
- return `${baseUrl}?page=${page}`;
1118
- }
1119
- const newSearchParams = preserveQuery ? new URLSearchParams(queryParams.toString()) : new URLSearchParams();
1120
- newSearchParams.set("page", page.toString());
1121
- if (page === 1) {
1122
- newSearchParams.delete("page");
1123
- }
1124
- const queryString = newSearchParams.toString();
1125
- const basePath = propPathname || pathname || "";
1126
- return queryString ? `${basePath}?${queryString}` : basePath;
1127
- }, "getPageUrl");
1128
- const getVisiblePages = /* @__PURE__ */ __name(() => {
1129
- const mobileMaxVisible = 3;
1130
- const effectiveMaxVisible = isMobile ? mobileMaxVisible : maxVisiblePages;
1131
- if (smartTotalPages <= effectiveMaxVisible) {
1132
- return Array.from({ length: smartTotalPages }, (_, i) => i + 1);
1133
- }
1134
- const pages = [];
1135
- const halfVisible = Math.floor(effectiveMaxVisible / 2);
1136
- if (isMobile) {
1137
- if (actualCurrentPage > 1) {
1138
- pages.push(actualCurrentPage - 1);
1139
- }
1140
- pages.push(actualCurrentPage);
1141
- if (actualCurrentPage < smartTotalPages) {
1142
- pages.push(actualCurrentPage + 1);
1143
- }
1144
- } else {
1145
- pages.push(1);
1146
- let start = Math.max(2, actualCurrentPage - halfVisible);
1147
- let end = Math.min(smartTotalPages - 1, actualCurrentPage + halfVisible);
1148
- if (actualCurrentPage <= halfVisible + 1) {
1149
- end = Math.min(smartTotalPages - 1, effectiveMaxVisible - 1);
1150
- } else if (actualCurrentPage >= smartTotalPages - halfVisible) {
1151
- start = Math.max(2, smartTotalPages - effectiveMaxVisible + 2);
1152
- }
1153
- if (start > 2) {
1154
- pages.push("ellipsis");
1155
- }
1156
- for (let i = start; i <= end; i++) {
1157
- pages.push(i);
1158
- }
1159
- if (end < smartTotalPages - 1) {
1160
- pages.push("ellipsis");
1161
- }
1162
- if (smartTotalPages > 1) {
1163
- pages.push(smartTotalPages);
1164
- }
1165
- }
1166
- return pages;
1167
- }, "getVisiblePages");
1168
- if (smartTotalPages <= 1) {
1169
- return null;
1170
- }
1171
- const visiblePages = getVisiblePages();
1172
- const startItem = (actualCurrentPage - 1) * itemsPerPage + 1;
1173
- const endItem = Math.min(actualCurrentPage * itemsPerPage, totalItems);
1174
- return /* @__PURE__ */ jsxs("div", { className: cn("space-y-4", className), children: [
1175
- showInfo && /* @__PURE__ */ jsx("div", { className: "text-sm text-muted-foreground text-center", children: isMobile ? `Page ${actualCurrentPage} of ${smartTotalPages}` : `Showing ${startItem.toLocaleString()} to ${endItem.toLocaleString()} of ${totalItems.toLocaleString()} results` }),
1176
- /* @__PURE__ */ jsx(Pagination, { children: /* @__PURE__ */ jsxs(PaginationContent, { children: [
1177
- /* @__PURE__ */ jsx(PaginationItem, { children: /* @__PURE__ */ jsx(
1178
- PaginationPrevious,
1179
- {
1180
- href: actualHasPreviousPage ? getPageUrl(actualCurrentPage - 1) : void 0,
1181
- className: !actualHasPreviousPage ? "pointer-events-none opacity-50" : void 0
1182
- }
1183
- ) }),
1184
- visiblePages.map((page, index) => /* @__PURE__ */ jsx(PaginationItem, { children: page === "ellipsis" ? /* @__PURE__ */ jsx(PaginationEllipsis, {}) : /* @__PURE__ */ jsx(
1185
- PaginationLink,
1186
- {
1187
- href: getPageUrl(page),
1188
- isActive: page === actualCurrentPage,
1189
- children: page
1190
- }
1191
- ) }, index)),
1192
- /* @__PURE__ */ jsx(PaginationItem, { children: /* @__PURE__ */ jsx(
1193
- PaginationNext,
1194
- {
1195
- href: hasNextPage ? getPageUrl(actualCurrentPage + 1) : void 0,
1196
- className: !hasNextPage ? "pointer-events-none opacity-50" : void 0
1197
- }
1198
- ) })
1199
- ] }) })
1200
- ] });
1201
- }, "SSRPagination");
1202
- SSRPagination.displayName = "SSRPagination";
1203
- var StaticPagination = /* @__PURE__ */ __name(({
1204
- data,
1205
- onPageChange,
1206
- className,
1207
- showInfo = true,
1208
- maxVisiblePages = 7
1209
- }) => {
1210
- const isMobile = useIsMobile();
1211
- if (!data || !("count" in data) || !("page" in data) || !("pages" in data)) {
1212
- return null;
1213
- }
1214
- const {
1215
- count: totalItems,
1216
- page: currentPage,
1217
- pages: totalPages,
1218
- page_size: itemsPerPage,
1219
- has_next: hasNextPage,
1220
- has_previous: hasPreviousPage
1221
- } = data;
1222
- if (totalPages <= 1) {
1223
- return null;
1224
- }
1225
- const getVisiblePages = /* @__PURE__ */ __name(() => {
1226
- const mobileMaxVisible = 3;
1227
- const effectiveMaxVisible = isMobile ? mobileMaxVisible : maxVisiblePages;
1228
- if (totalPages <= effectiveMaxVisible) {
1229
- return Array.from({ length: totalPages }, (_, i) => i + 1);
1230
- }
1231
- const pages = [];
1232
- const halfVisible = Math.floor(effectiveMaxVisible / 2);
1233
- if (isMobile) {
1234
- if (currentPage > 1) {
1235
- pages.push(currentPage - 1);
1236
- }
1237
- pages.push(currentPage);
1238
- if (currentPage < totalPages) {
1239
- pages.push(currentPage + 1);
1240
- }
1241
- } else {
1242
- pages.push(1);
1243
- let start = Math.max(2, currentPage - halfVisible);
1244
- let end = Math.min(totalPages - 1, currentPage + halfVisible);
1245
- if (currentPage <= halfVisible + 1) {
1246
- end = Math.min(totalPages - 1, effectiveMaxVisible - 1);
1247
- } else if (currentPage >= totalPages - halfVisible) {
1248
- start = Math.max(2, totalPages - effectiveMaxVisible + 2);
1249
- }
1250
- if (start > 2) {
1251
- pages.push("ellipsis");
1252
- }
1253
- for (let i = start; i <= end; i++) {
1254
- pages.push(i);
1255
- }
1256
- if (end < totalPages - 1) {
1257
- pages.push("ellipsis");
1258
- }
1259
- if (totalPages > 1) {
1260
- pages.push(totalPages);
1261
- }
1262
- }
1263
- return pages;
1264
- }, "getVisiblePages");
1265
- const visiblePages = getVisiblePages();
1266
- const startItem = (currentPage - 1) * itemsPerPage + 1;
1267
- const endItem = Math.min(currentPage * itemsPerPage, totalItems);
1268
- const handlePageClick = /* @__PURE__ */ __name((page) => {
1269
- if (page !== currentPage && page >= 1 && page <= totalPages) {
1270
- onPageChange(page);
1271
- }
1272
- }, "handlePageClick");
1273
- return /* @__PURE__ */ jsxs("div", { className: cn("space-y-4", className), children: [
1274
- showInfo && /* @__PURE__ */ jsx("div", { className: "text-sm text-muted-foreground text-center", children: isMobile ? `Page ${currentPage} of ${totalPages}` : `Showing ${startItem.toLocaleString()} to ${endItem.toLocaleString()} of ${totalItems.toLocaleString()} results` }),
1275
- /* @__PURE__ */ jsx(Pagination, { children: /* @__PURE__ */ jsxs(PaginationContent, { children: [
1276
- /* @__PURE__ */ jsx(PaginationItem, { children: /* @__PURE__ */ jsxs(
1277
- Button,
1278
- {
1279
- variant: "ghost",
1280
- size: "default",
1281
- onClick: () => handlePageClick(currentPage - 1),
1282
- disabled: !hasPreviousPage,
1283
- className: cn(
1284
- "gap-1 pl-2.5",
1285
- !hasPreviousPage && "pointer-events-none opacity-50"
1286
- ),
1287
- "aria-label": "Go to previous page",
1288
- children: [
1289
- /* @__PURE__ */ jsx(ChevronLeft, { className: "h-4 w-4" }),
1290
- /* @__PURE__ */ jsx("span", { children: "Previous" })
1291
- ]
1292
- }
1293
- ) }),
1294
- visiblePages.map((page, index) => /* @__PURE__ */ jsx(PaginationItem, { children: page === "ellipsis" ? /* @__PURE__ */ jsx(PaginationEllipsis, {}) : /* @__PURE__ */ jsx(
1295
- Button,
1296
- {
1297
- variant: page === currentPage ? "outline" : "ghost",
1298
- size: "icon",
1299
- onClick: () => handlePageClick(page),
1300
- "aria-current": page === currentPage ? "page" : void 0,
1301
- className: cn(
1302
- page === currentPage && "pointer-events-none"
1303
- ),
1304
- children: page
1305
- }
1306
- ) }, index)),
1307
- /* @__PURE__ */ jsx(PaginationItem, { children: /* @__PURE__ */ jsxs(
1308
- Button,
1309
- {
1310
- variant: "ghost",
1311
- size: "default",
1312
- onClick: () => handlePageClick(currentPage + 1),
1313
- disabled: !hasNextPage,
1314
- className: cn(
1315
- "gap-1 pr-2.5",
1316
- !hasNextPage && "pointer-events-none opacity-50"
1317
- ),
1318
- "aria-label": "Go to next page",
1319
- children: [
1320
- /* @__PURE__ */ jsx("span", { children: "Next" }),
1321
- /* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4" })
1322
- ]
1323
- }
1324
- ) })
1325
- ] }) })
1326
- ] });
1327
- }, "StaticPagination");
1328
- StaticPagination.displayName = "StaticPagination";
1329
- function useDRFPagination(initialPage = 1, initialPageSize = 10) {
1330
- const [page, setPage] = React6__default.useState(initialPage);
1331
- const [pageSize, setPageSize] = React6__default.useState(initialPageSize);
1332
- const handlePageSizeChange = React6__default.useCallback((newPageSize) => {
1333
- setPageSize(newPageSize);
1334
- setPage(1);
1335
- }, []);
1336
- const params = React6__default.useMemo(() => ({
1337
- page,
1338
- page_size: pageSize
1339
- }), [page, pageSize]);
1340
- return {
1341
- page,
1342
- pageSize,
1343
- setPage,
1344
- setPageSize: handlePageSizeChange,
1345
- params,
1346
- reset: /* @__PURE__ */ __name(() => {
1347
- setPage(initialPage);
1348
- setPageSize(initialPageSize);
1349
- }, "reset")
1350
- };
1351
- }
1352
- __name(useDRFPagination, "useDRFPagination");
1353
- function useDRFPaginationInfo(data) {
1354
- return React6__default.useMemo(() => {
1355
- if (!data || !("count" in data) || !("page" in data)) {
1356
- return null;
1357
- }
1358
- return {
1359
- totalItems: data.count,
1360
- currentPage: data.page,
1361
- totalPages: data.pages,
1362
- itemsPerPage: data.page_size,
1363
- hasNext: data.has_next,
1364
- hasPrevious: data.has_previous,
1365
- nextPage: data.next_page,
1366
- previousPage: data.previous_page,
1367
- results: data.results || [],
1368
- resultsCount: data.results?.length || 0
1369
- };
1370
- }, [data]);
1371
- }
1372
- __name(useDRFPaginationInfo, "useDRFPaginationInfo");
1373
- var SIDEBAR_COOKIE_NAME = "sidebar_state";
1374
- var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
1375
- var SIDEBAR_WIDTH = "16rem";
1376
- var SIDEBAR_WIDTH_MOBILE = "min(80vw, 320px)";
1377
- var SIDEBAR_WIDTH_ICON = "3rem";
1378
- var SIDEBAR_KEYBOARD_SHORTCUT = "b";
1379
- var SidebarContext = React6.createContext(null);
1380
- function useSidebar() {
1381
- const context = React6.useContext(SidebarContext);
1382
- if (!context) {
1383
- throw new Error("useSidebar must be used within a SidebarProvider.");
1384
- }
1385
- return context;
1386
- }
1387
- __name(useSidebar, "useSidebar");
1388
- var SidebarProvider = React6.forwardRef(
1389
- ({
1390
- defaultOpen = true,
1391
- open: openProp,
1392
- onOpenChange: setOpenProp,
1393
- className,
1394
- style,
1395
- children,
1396
- ...props
1397
- }, ref) => {
1398
- const isMobile = useIsMobile();
1399
- const [openMobile, setOpenMobile] = React6.useState(false);
1400
- const [_open, _setOpen] = React6.useState(defaultOpen);
1401
- const open = openProp ?? _open;
1402
- const setOpen = React6.useCallback(
1403
- (value) => {
1404
- const openState = typeof value === "function" ? value(open) : value;
1405
- if (setOpenProp) {
1406
- setOpenProp(openState);
1407
- } else {
1408
- _setOpen(openState);
1409
- }
1410
- document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
1411
- },
1412
- [setOpenProp, open]
1413
- );
1414
- const toggleSidebar = React6.useCallback(() => {
1415
- return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
1416
- }, [isMobile, setOpen, setOpenMobile]);
1417
- React6.useEffect(() => {
1418
- const handleKeyDown = /* @__PURE__ */ __name((event) => {
1419
- if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
1420
- event.preventDefault();
1421
- toggleSidebar();
1422
- }
1423
- }, "handleKeyDown");
1424
- window.addEventListener("keydown", handleKeyDown);
1425
- return () => window.removeEventListener("keydown", handleKeyDown);
1426
- }, [toggleSidebar]);
1427
- const state = open ? "expanded" : "collapsed";
1428
- const contextValue = React6.useMemo(
1429
- () => ({
1430
- state,
1431
- open,
1432
- setOpen,
1433
- isMobile,
1434
- openMobile,
1435
- setOpenMobile,
1436
- toggleSidebar
1437
- }),
1438
- [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]
1439
- );
1440
- return /* @__PURE__ */ jsx(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ jsx(
1441
- "div",
1442
- {
1443
- style: {
1444
- "--sidebar-width": SIDEBAR_WIDTH,
1445
- "--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
1446
- ...style
1447
- },
1448
- className: cn(
1449
- "group/sidebar-wrapper flex min-h-svh w-full has-[&_[data-variant=inset]]:bg-sidebar",
1450
- className
1451
- ),
1452
- ref,
1453
- ...props,
1454
- children
1455
- }
1456
- ) }) });
1457
- }
1458
- );
1459
- SidebarProvider.displayName = "SidebarProvider";
1460
- var Sidebar = React6.forwardRef(
1461
- ({
1462
- side = "left",
1463
- variant = "sidebar",
1464
- collapsible = "offcanvas",
1465
- className,
1466
- children,
1467
- ...props
1468
- }, ref) => {
1469
- const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
1470
- if (collapsible === "none") {
1471
- return /* @__PURE__ */ jsx(
1472
- "div",
1473
- {
1474
- className: cn(
1475
- "flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",
1476
- className
1477
- ),
1478
- ref,
1479
- ...props,
1480
- children
1481
- }
1482
- );
1483
- }
1484
- if (isMobile) {
1485
- return /* @__PURE__ */ jsx(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ jsxs(
1486
- SheetContent,
1487
- {
1488
- "data-sidebar": "sidebar",
1489
- "data-mobile": "true",
1490
- className: "!w-[--sidebar-width] p-0 text-sidebar-foreground [&>button]:hidden",
1491
- style: {
1492
- "--sidebar-width": SIDEBAR_WIDTH_MOBILE,
1493
- backgroundColor: "hsl(var(--sidebar-background))"
1494
- },
1495
- side,
1496
- children: [
1497
- /* @__PURE__ */ jsxs(SheetHeader, { className: "sr-only", children: [
1498
- /* @__PURE__ */ jsx(SheetTitle, { children: "Sidebar" }),
1499
- /* @__PURE__ */ jsx(SheetDescription, { children: "Displays the mobile sidebar." })
1500
- ] }),
1501
- /* @__PURE__ */ jsx("div", { className: "flex h-full w-full flex-col", style: { backgroundColor: "hsl(var(--sidebar-background))" }, children })
1502
- ]
1503
- }
1504
- ) });
1505
- }
1506
- const getGapWidth = /* @__PURE__ */ __name(() => {
1507
- if (state === "collapsed") {
1508
- if (collapsible === "offcanvas") return "0";
1509
- if (collapsible === "icon") {
1510
- return variant === "floating" || variant === "inset" ? "calc(var(--sidebar-width-icon) + 1rem)" : "var(--sidebar-width-icon)";
1511
- }
1512
- }
1513
- return "var(--sidebar-width)";
1514
- }, "getGapWidth");
1515
- const getFixedWidth = /* @__PURE__ */ __name(() => {
1516
- if (state === "collapsed" && collapsible === "icon") {
1517
- return variant === "floating" || variant === "inset" ? "calc(var(--sidebar-width-icon) + 1rem + 2px)" : "var(--sidebar-width-icon)";
1518
- }
1519
- return "var(--sidebar-width)";
1520
- }, "getFixedWidth");
1521
- return /* @__PURE__ */ jsxs(
1522
- "div",
1523
- {
1524
- ref,
1525
- className: "group peer hidden text-sidebar-foreground md:block",
1526
- "data-state": state,
1527
- "data-collapsible": collapsible,
1528
- "data-variant": variant,
1529
- "data-side": side,
1530
- children: [
1531
- /* @__PURE__ */ jsx(
1532
- "div",
1533
- {
1534
- className: cn(
1535
- "relative h-full bg-transparent transition-[width] duration-200 ease-linear",
1536
- side === "right" && "rotate-180"
1537
- ),
1538
- style: {
1539
- width: getGapWidth()
1540
- }
1541
- }
1542
- ),
1543
- /* @__PURE__ */ jsx(
1544
- "div",
1545
- {
1546
- className: cn(
1547
- "fixed inset-y-0 z-10 hidden h-svh transition-[left,right,width] duration-200 ease-linear md:flex",
1548
- side === "left" ? state === "collapsed" && collapsible === "offcanvas" ? "left-[calc(var(--sidebar-width)*-1)]" : "left-0" : state === "collapsed" && collapsible === "offcanvas" ? "right-[calc(var(--sidebar-width)*-1)]" : "right-0",
1549
- // Adjust the padding for floating and inset variants.
1550
- variant === "floating" || variant === "inset" ? "p-2" : cn(
1551
- side === "left" && "border-r",
1552
- side === "right" && "border-l"
1553
- ),
1554
- className
1555
- ),
1556
- style: {
1557
- width: getFixedWidth()
1558
- },
1559
- ...props,
1560
- children: /* @__PURE__ */ jsx(
1561
- "div",
1562
- {
1563
- "data-sidebar": "sidebar",
1564
- className: cn(
1565
- "flex h-full w-full flex-col bg-sidebar",
1566
- variant === "floating" && "rounded-lg border border-sidebar-border shadow"
1567
- ),
1568
- children
1569
- }
1570
- )
1571
- }
1572
- )
1573
- ]
1574
- }
1575
- );
1576
- }
1577
- );
1578
- Sidebar.displayName = "Sidebar";
1579
- var SidebarTrigger = React6.forwardRef(({ className, onClick, ...props }, ref) => {
1580
- const { toggleSidebar } = useSidebar();
1581
- return /* @__PURE__ */ jsxs(
1582
- Button,
1583
- {
1584
- ref,
1585
- "data-sidebar": "trigger",
1586
- variant: "ghost",
1587
- size: "icon",
1588
- className: cn("h-7 w-7", className),
1589
- onClick: (event) => {
1590
- onClick?.(event);
1591
- toggleSidebar();
1592
- },
1593
- ...props,
1594
- children: [
1595
- /* @__PURE__ */ jsx(PanelLeft, {}),
1596
- /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Toggle Sidebar" })
1597
- ]
1598
- }
1599
- );
1600
- });
1601
- SidebarTrigger.displayName = "SidebarTrigger";
1602
- var SidebarRail = React6.forwardRef(({ className, ...props }, ref) => {
1603
- const { toggleSidebar } = useSidebar();
1604
- return /* @__PURE__ */ jsx(
1605
- "button",
1606
- {
1607
- ref,
1608
- "data-sidebar": "rail",
1609
- "aria-label": "Toggle Sidebar",
1610
- tabIndex: -1,
1611
- onClick: toggleSidebar,
1612
- title: "Toggle Sidebar",
1613
- className: cn(
1614
- "absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex",
1615
- "group-data-[side=left]:cursor-w-resize group-data-[side=right]:cursor-e-resize",
1616
- "group-data-[side=left]:group-data-[state=collapsed]:cursor-e-resize group-data-[side=right]:group-data-[state=collapsed]:cursor-w-resize",
1617
- "group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar",
1618
- "group-data-[side=left]:group-data-[collapsible=offcanvas]:-right-2",
1619
- "group-data-[side=right]:group-data-[collapsible=offcanvas]:-left-2",
1620
- className
1621
- ),
1622
- ...props
1623
- }
1624
- );
1625
- });
1626
- SidebarRail.displayName = "SidebarRail";
1627
- var SidebarInset = React6.forwardRef(({ className, ...props }, ref) => {
1628
- return /* @__PURE__ */ jsx(
1629
- "main",
1630
- {
1631
- ref,
1632
- className: cn(
1633
- "relative flex w-full flex-1 flex-col bg-background",
1634
- "md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",
1635
- className
1636
- ),
1637
- ...props
1638
- }
1639
- );
1640
- });
1641
- SidebarInset.displayName = "SidebarInset";
1642
- var SidebarInput = React6.forwardRef(({ className, ...props }, ref) => {
1643
- return /* @__PURE__ */ jsx(
1644
- Input,
1645
- {
1646
- ref,
1647
- "data-sidebar": "input",
1648
- className: cn(
1649
- "h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",
1650
- className
1651
- ),
1652
- ...props
1653
- }
1654
- );
1655
- });
1656
- SidebarInput.displayName = "SidebarInput";
1657
- var SidebarHeader = React6.forwardRef(({ className, style, ...props }, ref) => {
1658
- const { state } = useSidebar();
1659
- const headerStyle = state === "collapsed" ? {
1660
- paddingLeft: "0",
1661
- paddingRight: "0",
1662
- paddingTop: "0.5rem",
1663
- paddingBottom: "0.5rem",
1664
- transition: "padding 200ms ease-in-out",
1665
- ...style
1666
- } : {
1667
- transition: "padding 200ms ease-in-out",
1668
- ...style
1669
- };
1670
- return /* @__PURE__ */ jsx(
1671
- "div",
1672
- {
1673
- ref,
1674
- "data-sidebar": "header",
1675
- className: cn("flex flex-col gap-2 p-2", className),
1676
- style: headerStyle,
1677
- ...props
1678
- }
1679
- );
1680
- });
1681
- SidebarHeader.displayName = "SidebarHeader";
1682
- var SidebarFooter = React6.forwardRef(({ className, ...props }, ref) => {
1683
- return /* @__PURE__ */ jsx(
1684
- "div",
1685
- {
1686
- ref,
1687
- "data-sidebar": "footer",
1688
- className: cn("flex flex-col gap-2 p-2", className),
1689
- ...props
1690
- }
1691
- );
1692
- });
1693
- SidebarFooter.displayName = "SidebarFooter";
1694
- var SidebarSeparator = React6.forwardRef(({ className, ...props }, ref) => {
1695
- return /* @__PURE__ */ jsx(
1696
- Separator,
1697
- {
1698
- ref,
1699
- "data-sidebar": "separator",
1700
- className: cn("mx-2 w-auto bg-sidebar-border", className),
1701
- ...props
1702
- }
1703
- );
1704
- });
1705
- SidebarSeparator.displayName = "SidebarSeparator";
1706
- var SidebarContent = React6.forwardRef(({ className, ...props }, ref) => {
1707
- return /* @__PURE__ */ jsx(
1708
- "div",
1709
- {
1710
- ref,
1711
- "data-sidebar": "content",
1712
- className: cn(
1713
- "flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[state=collapsed]:group-data-[collapsible=icon]:overflow-hidden",
1714
- className
1715
- ),
1716
- ...props
1717
- }
1718
- );
1719
- });
1720
- SidebarContent.displayName = "SidebarContent";
1721
- var SidebarGroup = React6.forwardRef(({ className, ...props }, ref) => {
1722
- return /* @__PURE__ */ jsx(
1723
- "div",
1724
- {
1725
- ref,
1726
- "data-sidebar": "group",
1727
- className: cn("relative flex w-full min-w-0 flex-col p-2", className),
1728
- ...props
1729
- }
1730
- );
1731
- });
1732
- SidebarGroup.displayName = "SidebarGroup";
1733
- var SidebarGroupLabel = React6.forwardRef(({ className, asChild = false, ...props }, ref) => {
1734
- const Comp = asChild ? Slot : "div";
1735
- return /* @__PURE__ */ jsx(
1736
- Comp,
1737
- {
1738
- ref,
1739
- "data-sidebar": "group-label",
1740
- className: cn(
1741
- "flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-semibold text-muted-foreground uppercase tracking-wider outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
1742
- "group-data-[state=collapsed]:group-data-[collapsible=icon]:-mt-8 group-data-[state=collapsed]:group-data-[collapsible=icon]:opacity-0",
1743
- className
1744
- ),
1745
- ...props
1746
- }
1747
- );
1748
- });
1749
- SidebarGroupLabel.displayName = "SidebarGroupLabel";
1750
- var SidebarGroupAction = React6.forwardRef(({ className, asChild = false, ...props }, ref) => {
1751
- const Comp = asChild ? Slot : "button";
1752
- return /* @__PURE__ */ jsx(
1753
- Comp,
1754
- {
1755
- ref,
1756
- "data-sidebar": "group-action",
1757
- className: cn(
1758
- "absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
1759
- // Increases the hit area of the button on mobile.
1760
- "after:absolute after:-inset-2 after:md:hidden",
1761
- "group-data-[state=collapsed]:group-data-[collapsible=icon]:hidden",
1762
- className
1763
- ),
1764
- ...props
1765
- }
1766
- );
1767
- });
1768
- SidebarGroupAction.displayName = "SidebarGroupAction";
1769
- var SidebarGroupContent = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1770
- "div",
1771
- {
1772
- ref,
1773
- "data-sidebar": "group-content",
1774
- className: cn("w-full text-sm", className),
1775
- ...props
1776
- }
1777
- ));
1778
- SidebarGroupContent.displayName = "SidebarGroupContent";
1779
- var SidebarMenu = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1780
- "ul",
1781
- {
1782
- ref,
1783
- "data-sidebar": "menu",
1784
- className: cn("flex w-full min-w-0 flex-col gap-1", className),
1785
- ...props
1786
- }
1787
- ));
1788
- SidebarMenu.displayName = "SidebarMenu";
1789
- var SidebarMenuItem = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1790
- "li",
1791
- {
1792
- ref,
1793
- "data-sidebar": "menu-item",
1794
- className: cn("group/menu-item relative", className),
1795
- ...props
1796
- }
1797
- ));
1798
- SidebarMenuItem.displayName = "SidebarMenuItem";
1799
- var sidebarMenuButtonVariants = cva(
1800
- "peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[&_[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-muted-foreground [&>svg]:opacity-70 data-[active=true]:[&>svg]:text-sidebar-accent-foreground data-[active=true]:[&>svg]:opacity-100 hover:[&>svg]:text-sidebar-accent-foreground hover:[&>svg]:opacity-100",
1801
- {
1802
- variants: {
1803
- variant: {
1804
- default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
1805
- outline: "bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"
1806
- },
1807
- size: {
1808
- default: "h-8 text-sm",
1809
- sm: "h-7 text-xs",
1810
- lg: "h-12 text-sm group-data-[state=collapsed]:group-data-[collapsible=icon]:!p-0"
1811
- }
1812
- },
1813
- defaultVariants: {
1814
- variant: "default",
1815
- size: "default"
1816
- }
1817
- }
1818
- );
1819
- var SidebarMenuButton = React6.forwardRef(
1820
- ({
1821
- asChild = false,
1822
- isActive = false,
1823
- variant = "default",
1824
- size = "default",
1825
- tooltip,
1826
- className,
1827
- style,
1828
- href,
1829
- children,
1830
- ...props
1831
- }, ref) => {
1832
- const { isMobile, state } = useSidebar();
1833
- const buttonContent = React6.useMemo(() => {
1834
- if (href) {
1835
- return /* @__PURE__ */ jsx(
1836
- Link5,
1837
- {
1838
- href,
1839
- className: cn(sidebarMenuButtonVariants({ variant, size }), className),
1840
- style,
1841
- "data-sidebar": "menu-button",
1842
- "data-size": size,
1843
- "data-active": isActive,
1844
- children
1845
- }
1846
- );
1847
- }
1848
- const Comp = asChild ? Slot : "button";
1849
- return /* @__PURE__ */ jsx(
1850
- Comp,
1851
- {
1852
- ref,
1853
- "data-sidebar": "menu-button",
1854
- "data-size": size,
1855
- "data-active": isActive,
1856
- className: cn(sidebarMenuButtonVariants({ variant, size }), className),
1857
- style,
1858
- ...props,
1859
- children
1860
- }
1861
- );
1862
- }, [href, asChild, ref, variant, size, className, style, isActive, children, props]);
1863
- if (!tooltip) {
1864
- return buttonContent;
1865
- }
1866
- if (typeof tooltip === "string") {
1867
- tooltip = {
1868
- children: tooltip
1869
- };
1870
- }
1871
- return /* @__PURE__ */ jsxs(Tooltip, { children: [
1872
- /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: buttonContent }),
1873
- /* @__PURE__ */ jsx(
1874
- TooltipContent,
1875
- {
1876
- side: "right",
1877
- align: "center",
1878
- hidden: state !== "collapsed" || isMobile,
1879
- ...tooltip
1880
- }
1881
- )
1882
- ] });
1883
- }
1884
- );
1885
- SidebarMenuButton.displayName = "SidebarMenuButton";
1886
- var SidebarMenuAction = React6.forwardRef(({ className, asChild = false, showOnHover = false, ...props }, ref) => {
1887
- const Comp = asChild ? Slot : "button";
1888
- return /* @__PURE__ */ jsx(
1889
- Comp,
1890
- {
1891
- ref,
1892
- "data-sidebar": "menu-action",
1893
- className: cn(
1894
- "absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0",
1895
- // Increases the hit area of the button on mobile.
1896
- "after:absolute after:-inset-2 after:md:hidden",
1897
- "peer-data-[size=sm]/menu-button:top-1",
1898
- "peer-data-[size=default]/menu-button:top-1.5",
1899
- "peer-data-[size=lg]/menu-button:top-2.5",
1900
- "group-data-[state=collapsed]:group-data-[collapsible=icon]:hidden",
1901
- showOnHover && "group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",
1902
- className
1903
- ),
1904
- ...props
1905
- }
1906
- );
1907
- });
1908
- SidebarMenuAction.displayName = "SidebarMenuAction";
1909
- var SidebarMenuBadge = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1910
- "div",
1911
- {
1912
- ref,
1913
- "data-sidebar": "menu-badge",
1914
- className: cn(
1915
- "pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground",
1916
- "peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground",
1917
- "peer-data-[size=sm]/menu-button:top-1",
1918
- "peer-data-[size=default]/menu-button:top-1.5",
1919
- "peer-data-[size=lg]/menu-button:top-2.5",
1920
- "group-data-[state=collapsed]:group-data-[collapsible=icon]:hidden",
1921
- className
1922
- ),
1923
- ...props
1924
- }
1925
- ));
1926
- SidebarMenuBadge.displayName = "SidebarMenuBadge";
1927
- var SidebarMenuSkeleton = React6.forwardRef(({ className, showIcon = false, ...props }, ref) => {
1928
- const width = React6.useMemo(() => {
1929
- return `${Math.floor(Math.random() * 40) + 50}%`;
1930
- }, []);
1931
- return /* @__PURE__ */ jsxs(
1932
- "div",
1933
- {
1934
- ref,
1935
- "data-sidebar": "menu-skeleton",
1936
- className: cn("flex h-8 items-center gap-2 rounded-md px-2", className),
1937
- ...props,
1938
- children: [
1939
- showIcon && /* @__PURE__ */ jsx(
1940
- Skeleton,
1941
- {
1942
- className: "size-4 rounded-md",
1943
- "data-sidebar": "menu-skeleton-icon"
1944
- }
1945
- ),
1946
- /* @__PURE__ */ jsx(
1947
- Skeleton,
1948
- {
1949
- className: "h-4 max-w-[--skeleton-width] flex-1",
1950
- "data-sidebar": "menu-skeleton-text",
1951
- style: {
1952
- "--skeleton-width": width
1953
- }
1954
- }
1955
- )
1956
- ]
1957
- }
1958
- );
1959
- });
1960
- SidebarMenuSkeleton.displayName = "SidebarMenuSkeleton";
1961
- var SidebarMenuSub = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1962
- "ul",
1963
- {
1964
- ref,
1965
- "data-sidebar": "menu-sub",
1966
- className: cn(
1967
- "mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5",
1968
- "group-data-[state=collapsed]:group-data-[collapsible=icon]:hidden",
1969
- className
1970
- ),
1971
- ...props
1972
- }
1973
- ));
1974
- SidebarMenuSub.displayName = "SidebarMenuSub";
1975
- var SidebarMenuSubItem = React6.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx("li", { ref, ...props }));
1976
- SidebarMenuSubItem.displayName = "SidebarMenuSubItem";
1977
- var SidebarMenuSubButton = React6.forwardRef(({ asChild = false, size = "md", isActive, className, href, children, ...props }, ref) => {
1978
- const Comp = asChild ? Slot : "a";
1979
- const buttonClasses = cn(
1980
- "flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-muted-foreground [&>svg]:opacity-70 data-[active=true]:[&>svg]:text-sidebar-accent-foreground data-[active=true]:[&>svg]:opacity-100 hover:[&>svg]:text-sidebar-accent-foreground hover:[&>svg]:opacity-100",
1981
- "data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",
1982
- size === "sm" && "text-xs",
1983
- size === "md" && "text-sm",
1984
- "group-data-[state=collapsed]:group-data-[collapsible=icon]:hidden",
1985
- className
1986
- );
1987
- if (href) {
1988
- return /* @__PURE__ */ jsx(
1989
- Link5,
1990
- {
1991
- href,
1992
- className: buttonClasses,
1993
- "data-sidebar": "menu-sub-button",
1994
- "data-size": size,
1995
- "data-active": isActive,
1996
- children
1997
- }
1998
- );
1999
- }
2000
- return /* @__PURE__ */ jsx(
2001
- Comp,
2002
- {
2003
- ref,
2004
- "data-sidebar": "menu-sub-button",
2005
- "data-size": size,
2006
- "data-active": isActive,
2007
- className: buttonClasses,
2008
- ...props,
2009
- children
2010
- }
2011
- );
2012
- });
2013
- SidebarMenuSubButton.displayName = "SidebarMenuSubButton";
2014
-
2015
- // src/index.ts
2016
- __reExport(index_exports, components_exports);
2017
- __reExport(index_exports, hooks_exports);
2018
- var typeConfig = {
2019
- security: { label: "Security", variant: "destructive", icon: "\u{1F6E1}\uFE0F" },
2020
- release: { label: "Release", variant: "default", icon: "\u{1F4E6}" },
2021
- announcement: { label: "Announcement", variant: "secondary", icon: "\u{1F4E2}" },
2022
- feature: { label: "Feature", variant: "outline", icon: "\u2728" }
2023
- };
2024
- var ArticleCard = /* @__PURE__ */ __name(({
2025
- title,
2026
- description,
2027
- date,
2028
- type,
2029
- href,
2030
- author,
2031
- tags,
2032
- featured = false,
2033
- className
2034
- }) => {
2035
- const config = typeConfig[type];
2036
- const formattedDate = moment2(date).format("MMMM D, YYYY");
2037
- return /* @__PURE__ */ jsxs(Card, { className: cn(
2038
- "group relative overflow-hidden transition-all duration-200 hover:shadow-lg",
2039
- featured && "border-primary/50 bg-primary/5",
2040
- className
2041
- ), children: [
2042
- /* @__PURE__ */ jsxs(CardHeader, { className: "pb-3", children: [
2043
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2 mb-2", children: [
2044
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
2045
- /* @__PURE__ */ jsx("span", { className: "text-lg", children: config.icon }),
2046
- /* @__PURE__ */ jsx(Badge, { variant: config.variant, children: config.label })
2047
- ] }),
2048
- /* @__PURE__ */ jsx("time", { className: "text-sm text-muted-foreground", children: formattedDate })
2049
- ] }),
2050
- /* @__PURE__ */ jsx(CardTitle, { className: "text-xl group-hover:text-primary transition-colors line-clamp-2", children: /* @__PURE__ */ jsx("a", { href, className: "hover:underline", children: title }) }),
2051
- description && /* @__PURE__ */ jsx(CardDescription, { className: "line-clamp-2 mt-2", children: description })
2052
- ] }),
2053
- /* @__PURE__ */ jsx(CardContent, { className: "pt-0", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
2054
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
2055
- author && /* @__PURE__ */ jsxs("span", { className: "text-sm text-muted-foreground", children: [
2056
- "by ",
2057
- author
2058
- ] }),
2059
- tags && tags.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex gap-1", children: tags.slice(0, 2).map((tag) => /* @__PURE__ */ jsx(Badge, { variant: "outline", className: "text-xs", children: tag }, tag)) })
2060
- ] }),
2061
- /* @__PURE__ */ jsx(ButtonLink, { href, variant: "ghost", size: "sm", children: "Read more \u2192" })
2062
- ] }) })
2063
- ] });
2064
- }, "ArticleCard");
2065
- var ArticleList = /* @__PURE__ */ __name(({
2066
- articles,
2067
- title,
2068
- description,
2069
- showFeatured = true,
2070
- columns = 2,
2071
- className
2072
- }) => {
2073
- const { featuredArticles, regularArticles } = useMemo(() => {
2074
- const sorted = [...articles].sort(
2075
- (a, b) => moment2(b.date).valueOf() - moment2(a.date).valueOf()
2076
- );
2077
- return {
2078
- featuredArticles: showFeatured ? sorted.filter((a) => a.featured) : [],
2079
- regularArticles: showFeatured ? sorted.filter((a) => !a.featured) : sorted
2080
- };
2081
- }, [articles, showFeatured]);
2082
- const gridCols = {
2083
- 1: "grid-cols-1",
2084
- 2: "grid-cols-1 md:grid-cols-2",
2085
- 3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3"
2086
- };
2087
- return /* @__PURE__ */ jsxs("section", { className: cn("py-8", className), children: [
2088
- (title || description) && /* @__PURE__ */ jsxs("div", { className: "mb-8", children: [
2089
- title && /* @__PURE__ */ jsx("h2", { className: "text-3xl font-bold tracking-tight", children: title }),
2090
- description && /* @__PURE__ */ jsx("p", { className: "mt-2 text-lg text-muted-foreground", children: description })
2091
- ] }),
2092
- featuredArticles.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mb-8", children: [
2093
- /* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold uppercase tracking-wider text-muted-foreground mb-4", children: "Featured" }),
2094
- /* @__PURE__ */ jsx("div", { className: "grid gap-4", children: featuredArticles.map((article, index) => /* @__PURE__ */ jsx(ArticleCard, { ...article, featured: true }, index)) })
2095
- ] }),
2096
- regularArticles.length > 0 && /* @__PURE__ */ jsx("div", { className: cn("grid gap-4", gridCols[columns]), children: regularArticles.map((article, index) => /* @__PURE__ */ jsx(ArticleCard, { ...article }, index)) }),
2097
- articles.length === 0 && /* @__PURE__ */ jsx("div", { className: "text-center py-12 text-muted-foreground", children: "No articles yet. Check back soon!" })
2098
- ] });
2099
- }, "ArticleList");
2100
- var CTASection = /* @__PURE__ */ __name(({
2101
- title,
2102
- subtitle,
2103
- primaryCTA,
2104
- secondaryCTA,
2105
- background = "default",
2106
- className,
2107
- children
2108
- }) => {
2109
- const backgroundClasses = {
2110
- default: "bg-background",
2111
- muted: "bg-muted/30",
2112
- primary: "bg-primary/5",
2113
- gradient: "bg-gradient-to-b from-background via-primary/5 to-background"
2114
- };
2115
- return /* @__PURE__ */ jsxs(
2116
- "section",
2117
- {
2118
- className: cn(
2119
- "relative py-16 sm:py-20 md:py-24 lg:py-32",
2120
- backgroundClasses[background],
2121
- className
2122
- ),
2123
- children: [
2124
- background === "gradient" && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 -z-10 overflow-hidden pointer-events-none", "aria-hidden": "true", children: /* @__PURE__ */ jsx("div", { className: "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-full max-w-4xl aspect-square bg-primary/10 rounded-full blur-3xl" }) }),
2125
- /* @__PURE__ */ jsx("div", { className: "container max-w-4xl mx-auto px-4 sm:px-6 lg:px-8", children: /* @__PURE__ */ jsxs("div", { className: "text-center space-y-6 sm:space-y-8", children: [
2126
- /* @__PURE__ */ jsx("h2", { className: "text-3xl sm:text-4xl md:text-5xl lg:text-6xl font-bold tracking-tight", children: title }),
2127
- subtitle && /* @__PURE__ */ jsx("p", { className: "text-base sm:text-lg md:text-xl text-muted-foreground max-w-2xl mx-auto leading-relaxed", children: subtitle }),
2128
- (primaryCTA || secondaryCTA) && /* @__PURE__ */ jsxs("div", { className: "flex flex-col sm:flex-row gap-3 sm:gap-4 justify-center items-center pt-4", children: [
2129
- primaryCTA && (primaryCTA.onClick ? /* @__PURE__ */ jsx(
2130
- Button,
2131
- {
2132
- onClick: primaryCTA.onClick,
2133
- variant: primaryCTA.variant || "default",
2134
- size: primaryCTA.size || "lg",
2135
- className: "w-full sm:w-auto",
2136
- children: primaryCTA.label
2137
- }
2138
- ) : /* @__PURE__ */ jsx(
2139
- Button,
2140
- {
2141
- asChild: true,
2142
- variant: primaryCTA.variant || "default",
2143
- size: primaryCTA.size || "lg",
2144
- className: "w-full sm:w-auto",
2145
- children: /* @__PURE__ */ jsx(Link5, { href: primaryCTA.href || "#", children: primaryCTA.label })
2146
- }
2147
- )),
2148
- secondaryCTA && (secondaryCTA.onClick ? /* @__PURE__ */ jsx(
2149
- Button,
2150
- {
2151
- onClick: secondaryCTA.onClick,
2152
- variant: secondaryCTA.variant || "outline",
2153
- size: secondaryCTA.size || "lg",
2154
- className: "w-full sm:w-auto",
2155
- children: secondaryCTA.label
2156
- }
2157
- ) : /* @__PURE__ */ jsx(
2158
- Button,
2159
- {
2160
- asChild: true,
2161
- variant: secondaryCTA.variant || "outline",
2162
- size: secondaryCTA.size || "lg",
2163
- className: "w-full sm:w-auto",
2164
- children: /* @__PURE__ */ jsx(Link5, { href: secondaryCTA.href || "#", children: secondaryCTA.label })
2165
- }
2166
- ))
2167
- ] }),
2168
- children && /* @__PURE__ */ jsx("div", { className: "pt-8 sm:pt-12", children })
2169
- ] }) })
2170
- ]
2171
- }
2172
- );
2173
- }, "CTASection");
2174
- var FeatureSection = /* @__PURE__ */ __name(({
2175
- title,
2176
- subtitle,
2177
- features,
2178
- columns = 3,
2179
- className,
2180
- background = "dark",
2181
- variant = "default"
2182
- }) => {
2183
- const getGridClasses = /* @__PURE__ */ __name(() => {
2184
- if (variant === "compact") {
2185
- switch (columns) {
2186
- case 2:
2187
- return "grid-cols-2";
2188
- case 3:
2189
- return "grid-cols-2 md:grid-cols-3";
2190
- case 4:
2191
- return "grid-cols-2 md:grid-cols-4";
2192
- case 6:
2193
- return "grid-cols-2 md:grid-cols-3 lg:grid-cols-6";
2194
- default:
2195
- return "grid-cols-2 md:grid-cols-3";
2196
- }
2197
- }
2198
- switch (columns) {
2199
- case 1:
2200
- return "grid-cols-1 max-w-2xl mx-auto";
2201
- case 2:
2202
- return "grid-cols-1 sm:grid-cols-2";
2203
- case 3:
2204
- return "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3";
2205
- case 4:
2206
- return "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4";
2207
- case 6:
2208
- return "grid-cols-2 sm:grid-cols-3 lg:grid-cols-6";
2209
- default:
2210
- return "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3";
2211
- }
2212
- }, "getGridClasses");
2213
- const getBackgroundClasses = /* @__PURE__ */ __name(() => {
2214
- switch (background) {
2215
- case "dark":
2216
- return "bg-muted/30";
2217
- case "card":
2218
- return "bg-card";
2219
- case "gradient":
2220
- return "bg-gradient-to-b from-background to-muted/20";
2221
- case "none":
2222
- return "";
2223
- default:
2224
- return "bg-background";
2225
- }
2226
- }, "getBackgroundClasses");
2227
- if (variant === "compact") {
2228
- return /* @__PURE__ */ jsx("section", { className: cn("py-12 md:py-16", getBackgroundClasses(), className), children: /* @__PURE__ */ jsxs("div", { className: "container max-w-5xl mx-auto px-4", children: [
2229
- (title || subtitle) && /* @__PURE__ */ jsxs("div", { className: "text-center mb-8", children: [
2230
- title && /* @__PURE__ */ jsx("h2", { className: "text-xl sm:text-2xl font-bold text-foreground mb-2", children: title }),
2231
- subtitle && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground max-w-2xl mx-auto", children: subtitle })
2232
- ] }),
2233
- /* @__PURE__ */ jsx("div", { className: cn("grid gap-4", getGridClasses()), children: features.map((feature, index) => /* @__PURE__ */ jsxs("div", { className: "text-center p-4", children: [
2234
- feature.icon && /* @__PURE__ */ jsx(
2235
- "div",
2236
- {
2237
- className: cn(
2238
- "w-10 h-10 mx-auto mb-3 rounded-lg flex items-center justify-center",
2239
- feature.gradient || "bg-primary/10 text-primary"
2240
- ),
2241
- children: /* @__PURE__ */ jsx("div", { className: "[&>svg]:w-5 [&>svg]:h-5", children: feature.icon })
2242
- }
2243
- ),
2244
- /* @__PURE__ */ jsx("h3", { className: "font-medium text-sm mb-1", children: feature.title }),
2245
- /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: feature.description })
2246
- ] }, index)) })
2247
- ] }) });
2248
- }
2249
- return /* @__PURE__ */ jsx("section", { className: cn("py-12 sm:py-16 lg:py-24", getBackgroundClasses(), className), children: /* @__PURE__ */ jsxs("div", { className: "w-full px-4 sm:px-6 lg:px-8", children: [
2250
- (title || subtitle) && /* @__PURE__ */ jsxs("div", { className: "text-center mb-12 sm:mb-16", children: [
2251
- title && /* @__PURE__ */ jsx("h2", { className: "text-2xl sm:text-3xl md:text-4xl lg:text-5xl font-bold text-foreground mb-4 sm:mb-6", children: title }),
2252
- subtitle && /* @__PURE__ */ jsx("p", { className: "text-base sm:text-lg md:text-xl text-muted-foreground max-w-3xl mx-auto px-2", children: subtitle })
2253
- ] }),
2254
- /* @__PURE__ */ jsx("div", { className: cn("grid gap-6 sm:gap-8", getGridClasses()), children: features.map((feature, index) => /* @__PURE__ */ jsxs(
2255
- Card,
2256
- {
2257
- className: "h-full hover:shadow-lg transition-all duration-300 backdrop-blur-sm border-border/50 hover:border-primary/30 group",
2258
- children: [
2259
- /* @__PURE__ */ jsxs(CardHeader, { className: "pb-4", children: [
2260
- feature.icon && /* @__PURE__ */ jsx("div", { className: cn(
2261
- "w-12 h-12 sm:w-16 sm:h-16 rounded-lg flex items-center justify-center mb-4 sm:mb-6 group-hover:scale-110 transition-all duration-300",
2262
- feature.gradient || "bg-primary/10 text-primary group-hover:bg-primary/20"
2263
- ), children: /* @__PURE__ */ jsx("div", { className: "text-xl sm:text-2xl", children: feature.icon }) }),
2264
- /* @__PURE__ */ jsx(CardTitle, { className: "text-lg sm:text-xl text-foreground group-hover:text-primary transition-colors duration-300", children: feature.title })
2265
- ] }),
2266
- /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(CardDescription, { className: "text-sm sm:text-base text-muted-foreground leading-relaxed", children: feature.description }) })
2267
- ]
2268
- },
2269
- index
2270
- )) })
2271
- ] }) });
2272
- }, "FeatureSection");
2273
- var Hero = /* @__PURE__ */ __name(({
2274
- title,
2275
- subtitle,
2276
- description,
2277
- primaryAction,
2278
- secondaryAction,
2279
- background = "dark",
2280
- className,
2281
- children
2282
- }) => {
2283
- const backgroundClasses = {
2284
- gradient: "bg-gradient-to-b from-primary/10 to-background",
2285
- solid: "bg-primary text-primary-foreground",
2286
- image: "bg-cover bg-center bg-no-repeat text-white",
2287
- dark: "bg-background text-foreground"
2288
- };
2289
- return /* @__PURE__ */ jsx("section", { className: cn(
2290
- "relative py-16 sm:py-20 md:py-24 lg:py-32",
2291
- backgroundClasses[background],
2292
- className
2293
- ), children: /* @__PURE__ */ jsx("div", { className: "container max-w-7xl mx-auto px-4 sm:px-6 lg:px-8", children: /* @__PURE__ */ jsxs("div", { className: "text-center max-w-4xl mx-auto", children: [
2294
- subtitle && /* @__PURE__ */ jsx("p", { className: "text-base sm:text-lg md:text-xl mb-4 sm:mb-6 text-muted-foreground font-medium", children: subtitle }),
2295
- /* @__PURE__ */ jsx("h1", { className: "text-4xl sm:text-5xl md:text-6xl lg:text-7xl font-bold mb-6 sm:mb-8 leading-tight", children: title }),
2296
- description && /* @__PURE__ */ jsx("p", { className: "text-lg sm:text-xl md:text-2xl mb-8 sm:mb-10 md:mb-12 text-muted-foreground leading-relaxed max-w-3xl mx-auto", children: description }),
2297
- (primaryAction || secondaryAction) && /* @__PURE__ */ jsxs("div", { className: "flex flex-col sm:flex-row gap-3 sm:gap-4 justify-center", children: [
2298
- primaryAction && /* @__PURE__ */ jsx(
2299
- ButtonLink,
2300
- {
2301
- href: primaryAction.href,
2302
- variant: primaryAction.variant || "default",
2303
- size: "huge",
2304
- className: "w-full sm:w-auto",
2305
- children: primaryAction.label
2306
- }
2307
- ),
2308
- secondaryAction && /* @__PURE__ */ jsx(
2309
- ButtonLink,
2310
- {
2311
- href: secondaryAction.href,
2312
- variant: secondaryAction.variant || "outline",
2313
- size: "huge",
2314
- className: "w-full sm:w-auto",
2315
- children: secondaryAction.label
2316
- }
2317
- )
2318
- ] }),
2319
- children && /* @__PURE__ */ jsx("div", { className: "mt-12 sm:mt-14 md:mt-16 flex justify-center", children })
2320
- ] }) }) });
2321
- }, "Hero");
2322
- var NewsletterSection = /* @__PURE__ */ __name(({
2323
- title = "Stay Updated with Our Newsletter",
2324
- description = "Get the latest insights on AI, technology, and software development delivered to your inbox.",
2325
- placeholder = "Enter your email address",
2326
- buttonText = "Subscribe",
2327
- disclaimer = "No spam, unsubscribe at any time",
2328
- background = "muted",
2329
- className,
2330
- onSubmit
2331
- }) => {
2332
- const [email, setEmail] = React6__default.useState("");
2333
- const handleSubmit = /* @__PURE__ */ __name((e) => {
2334
- e.preventDefault();
2335
- if (email && onSubmit) {
2336
- onSubmit(email);
2337
- setEmail("");
2338
- }
2339
- }, "handleSubmit");
2340
- const backgroundClasses = {
2341
- default: "bg-background",
2342
- muted: "bg-muted/50",
2343
- primary: "bg-primary/5",
2344
- gradient: "bg-gradient-to-b from-background via-primary/5 to-background"
2345
- };
2346
- return /* @__PURE__ */ jsxs("section", { className: cn(
2347
- "relative py-16 sm:py-20 md:py-24 lg:py-32",
2348
- backgroundClasses[background],
2349
- className
2350
- ), children: [
2351
- background === "gradient" && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 -z-10 overflow-hidden pointer-events-none", "aria-hidden": "true", children: /* @__PURE__ */ jsx("div", { className: "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-full max-w-4xl aspect-square bg-primary/10 rounded-full blur-3xl" }) }),
2352
- /* @__PURE__ */ jsx("div", { className: "container max-w-7xl mx-auto px-4 sm:px-6 lg:px-8", children: /* @__PURE__ */ jsxs("div", { className: "text-center max-w-3xl mx-auto", children: [
2353
- /* @__PURE__ */ jsx("h2", { className: "text-3xl sm:text-4xl md:text-5xl lg:text-6xl font-bold tracking-tight mb-4 sm:mb-6", children: title }),
2354
- description && /* @__PURE__ */ jsx("p", { className: "text-base sm:text-lg md:text-xl text-muted-foreground leading-relaxed mb-8 sm:mb-10 md:mb-12", children: description }),
2355
- /* @__PURE__ */ jsxs("form", { onSubmit: handleSubmit, className: "max-w-md mx-auto", children: [
2356
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col sm:flex-row gap-3 sm:gap-4", children: [
2357
- /* @__PURE__ */ jsxs("div", { className: "relative flex-1", children: [
2358
- /* @__PURE__ */ jsx(Mail, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground pointer-events-none" }),
2359
- /* @__PURE__ */ jsx(
2360
- Input,
2361
- {
2362
- type: "email",
2363
- placeholder,
2364
- value: email,
2365
- onChange: (e) => setEmail(e.target.value),
2366
- className: "pl-10 h-12 w-full",
2367
- required: true,
2368
- "aria-label": "Email address"
2369
- }
2370
- )
2371
- ] }),
2372
- /* @__PURE__ */ jsx(
2373
- Button,
2374
- {
2375
- type: "submit",
2376
- size: "lg",
2377
- className: "h-12 w-full sm:w-auto sm:min-w-[120px]",
2378
- children: buttonText
2379
- }
2380
- )
2381
- ] }),
2382
- disclaimer && /* @__PURE__ */ jsx("p", { className: "text-xs sm:text-sm text-muted-foreground mt-3 text-center", children: disclaimer })
2383
- ] })
2384
- ] }) })
2385
- ] });
2386
- }, "NewsletterSection");
2387
- var SplitHeroContent = /* @__PURE__ */ __name(({
2388
- badge,
2389
- title,
2390
- titleGradient,
2391
- subtitle,
2392
- features = [],
2393
- primaryAction,
2394
- secondaryAction,
2395
- align = "center",
2396
- className
2397
- }) => {
2398
- const alignClasses = {
2399
- top: "justify-start",
2400
- center: "justify-center",
2401
- bottom: "justify-end"
2402
- };
2403
- return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col", alignClasses[align], className), children: [
2404
- badge && /* @__PURE__ */ jsxs("div", { className: "inline-flex items-center gap-2 px-3 py-1.5 bg-primary/10 text-primary rounded-full text-sm font-medium mb-4 w-fit border border-primary/20", children: [
2405
- badge.icon || /* @__PURE__ */ jsx(Sparkles, { className: "w-3.5 h-3.5" }),
2406
- badge.text
2407
- ] }),
2408
- /* @__PURE__ */ jsxs("h1", { className: "text-3xl sm:text-4xl lg:text-5xl font-bold text-foreground mb-4 leading-tight", children: [
2409
- title,
2410
- titleGradient && /* @__PURE__ */ jsxs(Fragment, { children: [
2411
- " ",
2412
- /* @__PURE__ */ jsx("span", { className: "bg-gradient-to-r from-primary to-secondary bg-clip-text text-transparent", children: titleGradient })
2413
- ] })
2414
- ] }),
2415
- subtitle && /* @__PURE__ */ jsx("p", { className: "text-lg text-muted-foreground mb-6 leading-relaxed", children: subtitle }),
2416
- features.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-3 mb-6", children: features.map((feature, index) => /* @__PURE__ */ jsxs(
2417
- "div",
2418
- {
2419
- className: "flex items-center gap-2 text-sm text-muted-foreground",
2420
- children: [
2421
- feature.icon && /* @__PURE__ */ jsx("span", { className: "text-primary", children: feature.icon }),
2422
- /* @__PURE__ */ jsx("span", { children: feature.text })
2423
- ]
2424
- },
2425
- index
2426
- )) }),
2427
- (primaryAction || secondaryAction) && /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-3", children: [
2428
- primaryAction && /* @__PURE__ */ jsxs(
2429
- ButtonLink,
2430
- {
2431
- href: primaryAction.href || "#",
2432
- onClick: primaryAction.onClick,
2433
- variant: primaryAction.variant || "default",
2434
- size: "lg",
2435
- className: "group",
2436
- children: [
2437
- primaryAction.label,
2438
- primaryAction.icon || /* @__PURE__ */ jsx(ArrowRight, { className: "w-4 h-4 group-hover:translate-x-1 transition-transform" })
2439
- ]
2440
- }
2441
- ),
2442
- secondaryAction && /* @__PURE__ */ jsxs(
2443
- ButtonLink,
2444
- {
2445
- href: secondaryAction.href || "#",
2446
- onClick: secondaryAction.onClick,
2447
- variant: secondaryAction.variant || "outline",
2448
- size: "lg",
2449
- children: [
2450
- secondaryAction.label,
2451
- secondaryAction.icon
2452
- ]
2453
- }
2454
- )
2455
- ] })
2456
- ] });
2457
- }, "SplitHeroContent");
2458
- var SplitHeroMedia = /* @__PURE__ */ __name(({
2459
- media,
2460
- className
2461
- }) => {
2462
- const containerClass = cn(
2463
- "relative w-full rounded-xl overflow-hidden",
2464
- className
2465
- );
2466
- switch (media.type) {
2467
- case "image":
2468
- return /* @__PURE__ */ jsx("div", { className: containerClass, children: /* @__PURE__ */ jsx("div", { className: "relative aspect-[4/3] w-full", children: /* @__PURE__ */ jsx(
2469
- Image,
2470
- {
2471
- src: media.src,
2472
- alt: media.alt || "",
2473
- fill: true,
2474
- className: "object-cover",
2475
- sizes: "(max-width: 768px) 100vw, 50vw"
2476
- }
2477
- ) }) });
2478
- case "video":
2479
- return /* @__PURE__ */ jsx("div", { className: containerClass, children: /* @__PURE__ */ jsx(
2480
- VideoPlayer,
2481
- {
2482
- source: {
2483
- type: "url",
2484
- url: media.url,
2485
- title: media.title,
2486
- poster: media.poster
2487
- },
2488
- theme: "modern",
2489
- aspectRatio: 16 / 9,
2490
- autoPlay: media.autoplay,
2491
- muted: media.muted ?? media.autoplay
2492
- }
2493
- ) });
2494
- case "custom":
2495
- return /* @__PURE__ */ jsx("div", { className: containerClass, children: media.content });
2496
- default:
2497
- return null;
2498
- }
2499
- }, "SplitHeroMedia");
2500
- var MAX_WIDTH_CLASSES = {
2501
- sm: "max-w-3xl",
2502
- md: "max-w-4xl",
2503
- lg: "max-w-5xl",
2504
- xl: "max-w-6xl",
2505
- full: "max-w-7xl"
2506
- };
2507
- var BACKGROUND_CLASSES = {
2508
- none: "",
2509
- muted: "bg-muted/30",
2510
- gradient: "bg-gradient-to-br from-primary/5 via-background to-secondary/5"
2511
- };
2512
- var SplitHero = /* @__PURE__ */ __name(({
2513
- badge,
2514
- title,
2515
- titleGradient,
2516
- subtitle,
2517
- features,
2518
- primaryAction,
2519
- secondaryAction,
2520
- media,
2521
- layout = "text-left",
2522
- mobileOrder = "text-first",
2523
- align = "center",
2524
- maxWidth = "xl",
2525
- background = "none",
2526
- className
2527
- }) => {
2528
- const isTextLeft = layout === "text-left";
2529
- const isMediaFirst = mobileOrder === "media-first";
2530
- return /* @__PURE__ */ jsx(
2531
- "section",
2532
- {
2533
- className: cn(
2534
- "py-12 md:py-16 lg:py-20",
2535
- BACKGROUND_CLASSES[background],
2536
- className
2537
- ),
2538
- children: /* @__PURE__ */ jsx("div", { className: cn("mx-auto px-4", MAX_WIDTH_CLASSES[maxWidth]), children: /* @__PURE__ */ jsxs(
2539
- "div",
2540
- {
2541
- className: cn(
2542
- "grid gap-8 lg:gap-12 items-center",
2543
- media ? "lg:grid-cols-2" : "lg:grid-cols-1 max-w-3xl mx-auto"
2544
- ),
2545
- children: [
2546
- /* @__PURE__ */ jsx(
2547
- "div",
2548
- {
2549
- className: cn(
2550
- // Desktop order based on layout
2551
- isTextLeft ? "lg:order-1" : "lg:order-2",
2552
- // Mobile order based on mobileOrder
2553
- isMediaFirst ? "order-2" : "order-1"
2554
- ),
2555
- children: /* @__PURE__ */ jsx(
2556
- SplitHeroContent,
2557
- {
2558
- badge,
2559
- title,
2560
- titleGradient,
2561
- subtitle,
2562
- features,
2563
- primaryAction,
2564
- secondaryAction,
2565
- align
2566
- }
2567
- )
2568
- }
2569
- ),
2570
- media && /* @__PURE__ */ jsx(
2571
- "div",
2572
- {
2573
- className: cn(
2574
- // Desktop order based on layout
2575
- isTextLeft ? "lg:order-2" : "lg:order-1",
2576
- // Mobile order based on mobileOrder
2577
- isMediaFirst ? "order-1" : "order-2"
2578
- ),
2579
- children: /* @__PURE__ */ jsx(SplitHeroMedia, { media })
2580
- }
2581
- )
2582
- ]
2583
- }
2584
- ) })
2585
- }
2586
- );
2587
- }, "SplitHero");
2588
- var StatsSection = /* @__PURE__ */ __name(({
2589
- title,
2590
- subtitle,
2591
- stats,
2592
- columns = 4,
2593
- className,
2594
- background = "dark"
2595
- }) => {
2596
- const getGridClasses = /* @__PURE__ */ __name(() => {
2597
- switch (columns) {
2598
- case 2:
2599
- return "grid-cols-1 sm:grid-cols-2";
2600
- case 3:
2601
- return "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3";
2602
- case 4:
2603
- return "grid-cols-2 sm:grid-cols-2 lg:grid-cols-4";
2604
- default:
2605
- return "grid-cols-2 sm:grid-cols-2 lg:grid-cols-4";
2606
- }
2607
- }, "getGridClasses");
2608
- const getBackgroundClasses = /* @__PURE__ */ __name(() => {
2609
- switch (background) {
2610
- case "dark":
2611
- return "bg-background";
2612
- case "card":
2613
- return "gradient-card";
2614
- case "gradient":
2615
- return "gradient-subtle";
2616
- default:
2617
- return "bg-background";
2618
- }
2619
- }, "getBackgroundClasses");
2620
- return /* @__PURE__ */ jsx("section", { className: cn("py-12 sm:py-16 lg:py-24", getBackgroundClasses(), className), children: /* @__PURE__ */ jsxs("div", { className: "w-full px-4 sm:px-6 lg:px-8", children: [
2621
- /* @__PURE__ */ jsxs("div", { className: "text-center mb-12 sm:mb-16 animate-fade-in", children: [
2622
- /* @__PURE__ */ jsx("h2", { className: "text-2xl sm:text-3xl md:text-4xl lg:text-5xl font-bold text-foreground mb-4 sm:mb-6", children: title }),
2623
- subtitle && /* @__PURE__ */ jsx("p", { className: "text-base sm:text-lg md:text-xl text-muted-foreground max-w-3xl mx-auto px-2", children: subtitle })
2624
- ] }),
2625
- /* @__PURE__ */ jsx("div", { className: cn("grid gap-6 sm:gap-8", getGridClasses()), children: stats.map((stat, index) => /* @__PURE__ */ jsx(
2626
- Card,
2627
- {
2628
- className: "text-center hover:shadow-large transition-all duration-300 animate-scale-in backdrop-blur-sm border-border/50 hover:border-primary/30 group",
2629
- style: { animationDelay: `${index * 0.1}s` },
2630
- children: /* @__PURE__ */ jsxs(CardContent, { className: "p-6 sm:p-8", children: [
2631
- stat.icon && /* @__PURE__ */ jsx("div", { className: "w-12 h-12 sm:w-16 sm:h-16 bg-primary/10 text-primary rounded-lg flex items-center justify-center mx-auto mb-4 sm:mb-6 group-hover:scale-110 group-hover:bg-primary/20 transition-all duration-300", children: /* @__PURE__ */ jsx("div", { className: "text-xl sm:text-2xl", children: stat.icon }) }),
2632
- /* @__PURE__ */ jsx("div", { className: "text-3xl sm:text-4xl lg:text-5xl font-bold text-foreground mb-2 sm:mb-3 group-hover:text-primary transition-colors duration-300", children: stat.number }),
2633
- /* @__PURE__ */ jsx("div", { className: "text-sm sm:text-base text-muted-foreground font-medium", children: stat.label }),
2634
- stat.description && /* @__PURE__ */ jsx("p", { className: "text-xs sm:text-sm text-muted-foreground mt-2", children: stat.description })
2635
- ] })
2636
- },
2637
- index
2638
- )) })
2639
- ] }) });
2640
- }, "StatsSection");
2641
- var variantMap = {
2642
- "gradient-mesh": "mesh-gradient",
2643
- "dot-matrix": "geometric-flow",
2644
- "grid-lines": "geometric-flow",
2645
- "aurora": "aurora-borealis",
2646
- "particles": "floating-orbs",
2647
- "waves": "liquid-gradient"
2648
- };
2649
- var AnimatedBackground = /* @__PURE__ */ __name(({
2650
- variant = "mesh-gradient",
2651
- className,
2652
- intensity = "medium",
2653
- colorScheme = "vibrant"
2654
- }) => {
2655
- const resolvedVariant = variantMap[variant] || variant;
2656
- const intensityConfig = useMemo(() => ({
2657
- subtle: { opacity: 0.15, blur: "blur-3xl", scale: 0.8 },
2658
- medium: { opacity: 0.25, blur: "blur-2xl", scale: 1 },
2659
- strong: { opacity: 0.4, blur: "blur-xl", scale: 1.2 }
2660
- })[intensity], [intensity]);
2661
- const colors = useMemo(() => {
2662
- const palettes = {
2663
- vibrant: [
2664
- "hsl(var(--chart-1))",
2665
- // Blue
2666
- "hsl(var(--chart-2))",
2667
- // Green
2668
- "hsl(var(--chart-3))",
2669
- // Purple
2670
- "hsl(var(--chart-4))",
2671
- // Orange
2672
- "hsl(var(--chart-5))"
2673
- // Red
2674
- ],
2675
- monochrome: [
2676
- "hsl(var(--primary))",
2677
- "hsl(var(--primary) / 0.8)",
2678
- "hsl(var(--primary) / 0.6)"
2679
- ],
2680
- cool: [
2681
- "hsl(var(--chart-1))",
2682
- // Blue
2683
- "hsl(var(--chart-3))",
2684
- // Purple
2685
- "hsl(210 100% 50%)",
2686
- // Bright blue
2687
- "hsl(260 100% 60%)"
2688
- // Violet
2689
- ],
2690
- warm: [
2691
- "hsl(var(--chart-4))",
2692
- // Orange
2693
- "hsl(var(--chart-5))",
2694
- // Red
2695
- "hsl(35 100% 55%)",
2696
- // Gold
2697
- "hsl(350 100% 60%)"
2698
- // Rose
2699
- ]
2700
- };
2701
- return palettes[colorScheme];
2702
- }, [colorScheme]);
2703
- if (resolvedVariant === "none") {
2704
- return null;
2705
- }
2706
- return /* @__PURE__ */ jsxs(
2707
- "div",
2708
- {
2709
- className: cn("absolute overflow-hidden pointer-events-none", className),
2710
- style: { inset: 0, width: "100%", height: "100%" },
2711
- children: [
2712
- resolvedVariant === "aurora-borealis" && /* @__PURE__ */ jsx(AuroraBorealis, { colors, intensity: intensityConfig }),
2713
- resolvedVariant === "mesh-gradient" && /* @__PURE__ */ jsx(MeshGradient, { colors, intensity: intensityConfig }),
2714
- resolvedVariant === "floating-orbs" && /* @__PURE__ */ jsx(FloatingOrbs, { colors, intensity: intensityConfig }),
2715
- resolvedVariant === "geometric-flow" && /* @__PURE__ */ jsx(GeometricFlow, { colors, intensity: intensityConfig }),
2716
- resolvedVariant === "liquid-gradient" && /* @__PURE__ */ jsx(LiquidGradient, { colors, intensity: intensityConfig }),
2717
- resolvedVariant === "spotlight" && /* @__PURE__ */ jsx(Spotlight, { colors, intensity: intensityConfig }),
2718
- /* @__PURE__ */ jsx(AnimationStyles, {})
2719
- ]
2720
- }
2721
- );
2722
- }, "AnimatedBackground");
2723
- var AuroraBorealis = /* @__PURE__ */ __name(({ colors, intensity }) => /* @__PURE__ */ jsxs(Fragment, { children: [
2724
- /* @__PURE__ */ jsx(
2725
- "div",
2726
- {
2727
- className: "absolute inset-0",
2728
- style: {
2729
- background: `linear-gradient(135deg, ${colors[0]} 0%, transparent 50%, ${colors[1]} 100%)`,
2730
- opacity: intensity.opacity * 0.3
2731
- }
2732
- }
2733
- ),
2734
- /* @__PURE__ */ jsx(
2735
- "div",
2736
- {
2737
- className: cn("absolute inset-0", intensity.blur),
2738
- style: {
2739
- background: `linear-gradient(110deg,
2740
- transparent 0%,
2741
- ${colors[0]} 20%,
2742
- ${colors[2] || colors[0]} 35%,
2743
- ${colors[1]} 50%,
2744
- ${colors[3] || colors[1]} 65%,
2745
- ${colors[0]} 80%,
2746
- transparent 100%
2747
- )`,
2748
- opacity: intensity.opacity,
2749
- animation: "aurora-shift 15s ease-in-out infinite",
2750
- transform: `translateY(-30%) scaleY(${intensity.scale})`
2751
- }
2752
- }
2753
- ),
2754
- /* @__PURE__ */ jsx(
2755
- "div",
2756
- {
2757
- className: cn("absolute inset-0", intensity.blur),
2758
- style: {
2759
- background: `linear-gradient(70deg,
2760
- transparent 0%,
2761
- ${colors[1]} 25%,
2762
- ${colors[2] || colors[0]} 50%,
2763
- ${colors[0]} 75%,
2764
- transparent 100%
2765
- )`,
2766
- opacity: intensity.opacity * 0.7,
2767
- animation: "aurora-shift 20s ease-in-out infinite reverse",
2768
- animationDelay: "-5s",
2769
- transform: `translateY(-20%) scaleY(${intensity.scale * 0.8})`
2770
- }
2771
- }
2772
- ),
2773
- /* @__PURE__ */ jsx(
2774
- "div",
2775
- {
2776
- className: "absolute inset-0",
2777
- style: {
2778
- background: `radial-gradient(ellipse 100% 50% at 50% 0%,
2779
- ${colors[2] || colors[0]} 0%,
2780
- transparent 70%
2781
- )`,
2782
- opacity: intensity.opacity * 0.4,
2783
- animation: "aurora-shimmer 8s ease-in-out infinite"
2784
- }
2785
- }
2786
- )
2787
- ] }), "AuroraBorealis");
2788
- var MeshGradient = /* @__PURE__ */ __name(({ colors, intensity }) => /* @__PURE__ */ jsxs(Fragment, { children: [
2789
- /* @__PURE__ */ jsx(
2790
- "div",
2791
- {
2792
- className: cn("absolute rounded-full", intensity.blur),
2793
- style: {
2794
- width: "60%",
2795
- height: "60%",
2796
- top: "-10%",
2797
- right: "-10%",
2798
- background: `radial-gradient(circle, ${colors[0]} 0%, transparent 70%)`,
2799
- opacity: intensity.opacity,
2800
- animation: "mesh-float-1 25s ease-in-out infinite",
2801
- transform: `scale(${intensity.scale})`
2802
- }
2803
- }
2804
- ),
2805
- /* @__PURE__ */ jsx(
2806
- "div",
2807
- {
2808
- className: cn("absolute rounded-full", intensity.blur),
2809
- style: {
2810
- width: "50%",
2811
- height: "50%",
2812
- bottom: "-5%",
2813
- left: "-5%",
2814
- background: `radial-gradient(circle, ${colors[1]} 0%, transparent 70%)`,
2815
- opacity: intensity.opacity,
2816
- animation: "mesh-float-2 30s ease-in-out infinite",
2817
- transform: `scale(${intensity.scale})`
2818
- }
2819
- }
2820
- ),
2821
- /* @__PURE__ */ jsx(
2822
- "div",
2823
- {
2824
- className: cn("absolute rounded-full", intensity.blur),
2825
- style: {
2826
- width: "40%",
2827
- height: "40%",
2828
- top: "30%",
2829
- left: "25%",
2830
- background: `radial-gradient(circle, ${colors[2] || colors[0]} 0%, transparent 70%)`,
2831
- opacity: intensity.opacity * 0.8,
2832
- animation: "mesh-float-3 20s ease-in-out infinite",
2833
- transform: `scale(${intensity.scale})`
2834
- }
2835
- }
2836
- ),
2837
- colors[3] && /* @__PURE__ */ jsx(
2838
- "div",
2839
- {
2840
- className: cn("absolute rounded-full", intensity.blur),
2841
- style: {
2842
- width: "35%",
2843
- height: "35%",
2844
- bottom: "20%",
2845
- right: "15%",
2846
- background: `radial-gradient(circle, ${colors[3]} 0%, transparent 70%)`,
2847
- opacity: intensity.opacity * 0.6,
2848
- animation: "mesh-float-4 22s ease-in-out infinite",
2849
- transform: `scale(${intensity.scale})`
2850
- }
2851
- }
2852
- )
2853
- ] }), "MeshGradient");
2854
- var FloatingOrbs = /* @__PURE__ */ __name(({ colors, intensity }) => {
2855
- const orbs = useMemo(() => {
2856
- return Array.from({ length: 12 }).map((_, i) => ({
2857
- id: i,
2858
- size: 60 + i % 4 * 40,
2859
- x: i * 23 % 100,
2860
- y: i * 31 % 100,
2861
- color: colors[i % colors.length],
2862
- duration: 15 + i % 5 * 5,
2863
- delay: i * 1.5
2864
- }));
2865
- }, [colors]);
2866
- return /* @__PURE__ */ jsx(Fragment, { children: orbs.map((orb) => /* @__PURE__ */ jsx(
2867
- "div",
2868
- {
2869
- className: cn("absolute rounded-full", intensity.blur),
2870
- style: {
2871
- width: `${orb.size * intensity.scale}px`,
2872
- height: `${orb.size * intensity.scale}px`,
2873
- left: `${orb.x}%`,
2874
- top: `${orb.y}%`,
2875
- background: `radial-gradient(circle at 30% 30%, ${orb.color}, transparent 70%)`,
2876
- opacity: intensity.opacity * (0.5 + orb.id % 3 * 0.2),
2877
- animation: `orb-float-${orb.id % 4 + 1} ${orb.duration}s ease-in-out infinite`,
2878
- animationDelay: `${orb.delay}s`
2879
- }
2880
- },
2881
- orb.id
2882
- )) });
2883
- }, "FloatingOrbs");
2884
- var GeometricFlow = /* @__PURE__ */ __name(({ colors, intensity }) => /* @__PURE__ */ jsxs(Fragment, { children: [
2885
- /* @__PURE__ */ jsx(
2886
- "div",
2887
- {
2888
- className: "absolute inset-0",
2889
- style: {
2890
- background: `linear-gradient(135deg,
2891
- ${colors[0]} 0%,
2892
- transparent 30%,
2893
- transparent 70%,
2894
- ${colors[1]} 100%
2895
- )`,
2896
- opacity: intensity.opacity * 0.3
2897
- }
2898
- }
2899
- ),
2900
- /* @__PURE__ */ jsx(
2901
- "div",
2902
- {
2903
- className: "absolute inset-0",
2904
- style: {
2905
- backgroundImage: `
2906
- linear-gradient(${colors[0]}20 1px, transparent 1px),
2907
- linear-gradient(90deg, ${colors[0]}20 1px, transparent 1px)
2908
- `,
2909
- backgroundSize: "60px 60px",
2910
- animation: "grid-drift 30s linear infinite",
2911
- opacity: intensity.opacity
2912
- }
2913
- }
2914
- ),
2915
- /* @__PURE__ */ jsx(
2916
- "div",
2917
- {
2918
- className: "absolute inset-0",
2919
- style: {
2920
- backgroundImage: `repeating-linear-gradient(
2921
- 45deg,
2922
- transparent,
2923
- transparent 80px,
2924
- ${colors[2] || colors[0]}10 80px,
2925
- ${colors[2] || colors[0]}10 82px
2926
- )`,
2927
- animation: "diagonal-shift 20s linear infinite",
2928
- opacity: intensity.opacity
2929
- }
2930
- }
2931
- ),
2932
- /* @__PURE__ */ jsx(
2933
- "div",
2934
- {
2935
- className: cn("absolute rounded-full", intensity.blur),
2936
- style: {
2937
- width: "40%",
2938
- height: "40%",
2939
- top: "20%",
2940
- left: "50%",
2941
- transform: "translateX(-50%)",
2942
- background: `radial-gradient(circle, ${colors[0]} 0%, transparent 70%)`,
2943
- opacity: intensity.opacity * 0.5,
2944
- animation: "pulse-glow 8s ease-in-out infinite"
2945
- }
2946
- }
2947
- )
2948
- ] }), "GeometricFlow");
2949
- var LiquidGradient = /* @__PURE__ */ __name(({ colors, intensity }) => /* @__PURE__ */ jsxs(Fragment, { children: [
2950
- /* @__PURE__ */ jsx(
2951
- "div",
2952
- {
2953
- className: "absolute inset-0",
2954
- style: {
2955
- background: `linear-gradient(180deg,
2956
- transparent 0%,
2957
- ${colors[0]}15 30%,
2958
- ${colors[1]}20 50%,
2959
- ${colors[2] || colors[0]}15 70%,
2960
- transparent 100%
2961
- )`,
2962
- opacity: intensity.opacity
2963
- }
2964
- }
2965
- ),
2966
- /* @__PURE__ */ jsx(
2967
- "div",
2968
- {
2969
- className: cn("absolute", intensity.blur),
2970
- style: {
2971
- width: "120%",
2972
- height: "50%",
2973
- bottom: "-10%",
2974
- left: "-10%",
2975
- background: `linear-gradient(90deg,
2976
- ${colors[0]} 0%,
2977
- ${colors[1]} 33%,
2978
- ${colors[2] || colors[0]} 66%,
2979
- ${colors[0]} 100%
2980
- )`,
2981
- opacity: intensity.opacity,
2982
- borderRadius: "50% 50% 0 0",
2983
- animation: "liquid-flow-1 12s ease-in-out infinite",
2984
- transform: `scaleY(${intensity.scale})`
2985
- }
2986
- }
2987
- ),
2988
- /* @__PURE__ */ jsx(
2989
- "div",
2990
- {
2991
- className: cn("absolute", intensity.blur),
2992
- style: {
2993
- width: "100%",
2994
- height: "40%",
2995
- bottom: "-5%",
2996
- left: "0",
2997
- background: `linear-gradient(90deg,
2998
- ${colors[1]} 0%,
2999
- ${colors[2] || colors[0]} 50%,
3000
- ${colors[3] || colors[1]} 100%
3001
- )`,
3002
- opacity: intensity.opacity * 0.8,
3003
- borderRadius: "60% 40% 0 0",
3004
- animation: "liquid-flow-2 15s ease-in-out infinite",
3005
- transform: `scaleY(${intensity.scale * 0.9})`
3006
- }
3007
- }
3008
- ),
3009
- Array.from({ length: 6 }).map((_, i) => /* @__PURE__ */ jsx(
3010
- "div",
3011
- {
3012
- className: "absolute rounded-full",
3013
- style: {
3014
- width: `${12 + i * 4}px`,
3015
- height: `${12 + i * 4}px`,
3016
- left: `${15 + i * 15}%`,
3017
- bottom: "10%",
3018
- background: `radial-gradient(circle at 30% 30%,
3019
- ${colors[i % colors.length]}80,
3020
- ${colors[i % colors.length]}20
3021
- )`,
3022
- border: `1px solid ${colors[i % colors.length]}40`,
3023
- opacity: intensity.opacity,
3024
- animation: `bubble-float ${8 + i * 2}s ease-in-out infinite`,
3025
- animationDelay: `${i * 2}s`
3026
- }
3027
- },
3028
- i
3029
- ))
3030
- ] }), "LiquidGradient");
3031
- var Spotlight = /* @__PURE__ */ __name(({ colors, intensity }) => /* @__PURE__ */ jsxs(Fragment, { children: [
3032
- /* @__PURE__ */ jsx(
3033
- "div",
3034
- {
3035
- className: cn("absolute", intensity.blur),
3036
- style: {
3037
- width: "80%",
3038
- height: "80%",
3039
- top: "-20%",
3040
- left: "50%",
3041
- transform: "translateX(-50%)",
3042
- background: `conic-gradient(from 180deg at 50% 50%,
3043
- ${colors[0]} 0deg,
3044
- ${colors[1]} 60deg,
3045
- ${colors[2] || colors[0]} 120deg,
3046
- ${colors[3] || colors[1]} 180deg,
3047
- ${colors[0]} 240deg,
3048
- ${colors[1]} 300deg,
3049
- ${colors[0]} 360deg
3050
- )`,
3051
- opacity: intensity.opacity,
3052
- animation: "spotlight-rotate 30s linear infinite"
3053
- }
3054
- }
3055
- ),
3056
- /* @__PURE__ */ jsx(
3057
- "div",
3058
- {
3059
- className: "absolute inset-0",
3060
- style: {
3061
- background: `radial-gradient(circle at 50% 30%,
3062
- transparent 0%,
3063
- hsl(var(--background)) 70%
3064
- )`
3065
- }
3066
- }
3067
- ),
3068
- /* @__PURE__ */ jsx(
3069
- "div",
3070
- {
3071
- className: cn("absolute rounded-full", intensity.blur),
3072
- style: {
3073
- width: "50%",
3074
- height: "50%",
3075
- top: "10%",
3076
- left: "25%",
3077
- background: `radial-gradient(circle, ${colors[0]} 0%, transparent 70%)`,
3078
- opacity: intensity.opacity * 0.5,
3079
- animation: "pulse-glow 6s ease-in-out infinite"
3080
- }
3081
- }
3082
- )
3083
- ] }), "Spotlight");
3084
- var AnimationStyles = /* @__PURE__ */ __name(() => /* @__PURE__ */ jsx("style", { children: `
3085
- @keyframes aurora-shift {
3086
- 0%, 100% {
3087
- transform: translateX(-10%) translateY(-30%) scaleX(1.1);
3088
- }
3089
- 50% {
3090
- transform: translateX(10%) translateY(-25%) scaleX(0.9);
3091
- }
3092
- }
3093
-
3094
- @keyframes aurora-shimmer {
3095
- 0%, 100% {
3096
- opacity: 0.2;
3097
- transform: scale(1);
3098
- }
3099
- 50% {
3100
- opacity: 0.4;
3101
- transform: scale(1.05);
3102
- }
3103
- }
3104
-
3105
- @keyframes mesh-float-1 {
3106
- 0%, 100% { transform: translate(0, 0) scale(1); }
3107
- 25% { transform: translate(-5%, 10%) scale(1.05); }
3108
- 50% { transform: translate(5%, 5%) scale(0.95); }
3109
- 75% { transform: translate(-3%, -5%) scale(1.02); }
3110
- }
3111
-
3112
- @keyframes mesh-float-2 {
3113
- 0%, 100% { transform: translate(0, 0) scale(1); }
3114
- 33% { transform: translate(8%, -8%) scale(1.08); }
3115
- 66% { transform: translate(-6%, 6%) scale(0.92); }
3116
- }
3117
-
3118
- @keyframes mesh-float-3 {
3119
- 0%, 100% { transform: translate(0, 0) scale(1); }
3120
- 50% { transform: translate(10%, 10%) scale(1.1); }
3121
- }
3122
-
3123
- @keyframes mesh-float-4 {
3124
- 0%, 100% { transform: translate(0, 0) scale(1); }
3125
- 25% { transform: translate(5%, -10%) scale(0.95); }
3126
- 75% { transform: translate(-8%, 5%) scale(1.05); }
3127
- }
3128
-
3129
- @keyframes orb-float-1 {
3130
- 0%, 100% { transform: translate(0, 0); }
3131
- 50% { transform: translate(30px, -40px); }
3132
- }
3133
-
3134
- @keyframes orb-float-2 {
3135
- 0%, 100% { transform: translate(0, 0); }
3136
- 50% { transform: translate(-25px, 35px); }
3137
- }
3138
-
3139
- @keyframes orb-float-3 {
3140
- 0%, 100% { transform: translate(0, 0); }
3141
- 33% { transform: translate(40px, 20px); }
3142
- 66% { transform: translate(-20px, -30px); }
3143
- }
3144
-
3145
- @keyframes orb-float-4 {
3146
- 0%, 100% { transform: translate(0, 0); }
3147
- 25% { transform: translate(-35px, -25px); }
3148
- 75% { transform: translate(25px, 40px); }
3149
- }
3150
-
3151
- @keyframes grid-drift {
3152
- 0% { transform: translate(0, 0); }
3153
- 100% { transform: translate(60px, 60px); }
3154
- }
3155
-
3156
- @keyframes diagonal-shift {
3157
- 0% { transform: translateX(0); }
3158
- 100% { transform: translateX(160px); }
3159
- }
3160
-
3161
- @keyframes pulse-glow {
3162
- 0%, 100% { opacity: 0.3; transform: translateX(-50%) scale(1); }
3163
- 50% { opacity: 0.6; transform: translateX(-50%) scale(1.1); }
3164
- }
3165
-
3166
- @keyframes liquid-flow-1 {
3167
- 0%, 100% {
3168
- transform: translateY(0) scaleX(1);
3169
- border-radius: 50% 50% 0 0;
3170
- }
3171
- 25% {
3172
- transform: translateY(-30px) scaleX(1.05);
3173
- border-radius: 45% 55% 0 0;
3174
- }
3175
- 50% {
3176
- transform: translateY(-50px) scaleX(0.95);
3177
- border-radius: 55% 45% 0 0;
3178
- }
3179
- 75% {
3180
- transform: translateY(-25px) scaleX(1.02);
3181
- border-radius: 48% 52% 0 0;
3182
- }
3183
- }
3184
-
3185
- @keyframes liquid-flow-2 {
3186
- 0%, 100% {
3187
- transform: translateY(0) scaleX(1);
3188
- border-radius: 60% 40% 0 0;
3189
- }
3190
- 33% {
3191
- transform: translateY(-40px) scaleX(1.08);
3192
- border-radius: 40% 60% 0 0;
3193
- }
3194
- 66% {
3195
- transform: translateY(-60px) scaleX(0.92);
3196
- border-radius: 55% 45% 0 0;
3197
- }
3198
- }
3199
-
3200
- @keyframes bubble-float {
3201
- 0%, 100% {
3202
- transform: translateY(0) scale(1);
3203
- opacity: 0.6;
3204
- }
3205
- 50% {
3206
- transform: translateY(-100px) scale(1.2);
3207
- opacity: 0.3;
3208
- }
3209
- }
3210
-
3211
- @keyframes spotlight-rotate {
3212
- 0% { transform: translateX(-50%) rotate(0deg); }
3213
- 100% { transform: translateX(-50%) rotate(360deg); }
3214
- }
3215
- ` }), "AnimationStyles");
3216
- var blurMap = {
3217
- sm: "blur-sm",
3218
- md: "blur-md",
3219
- lg: "blur-lg",
3220
- xl: "blur-xl",
3221
- "2xl": "blur-2xl",
3222
- "3xl": "blur-3xl"
3223
- };
3224
- var MouseFollower = /* @__PURE__ */ __name(({
3225
- variant = "glow",
3226
- size = 300,
3227
- color = "primary",
3228
- smoothness = 0.1,
3229
- opacity = 0.3,
3230
- blur = "2xl",
3231
- className,
3232
- showOnMobile = false,
3233
- disabled = false
3234
- }) => {
3235
- const [mounted, setMounted] = useState(false);
3236
- const [isVisible, setIsVisible] = useState(false);
3237
- const [isMobile, setIsMobile] = useState(false);
3238
- const positionRef = useRef({ x: 0, y: 0 });
3239
- const targetRef = useRef({ x: 0, y: 0 });
3240
- const elementRef = useRef(null);
3241
- const rafRef = useRef(0);
3242
- const resolvedColor = useMemo(() => {
3243
- if (color === "primary") return "hsl(var(--primary))";
3244
- if (color === "secondary") return "hsl(var(--secondary))";
3245
- if (color === "accent") return "hsl(var(--accent))";
3246
- return color;
3247
- }, [color]);
3248
- useEffect(() => {
3249
- setMounted(true);
3250
- const checkMobile = /* @__PURE__ */ __name(() => {
3251
- setIsMobile("ontouchstart" in window || navigator.maxTouchPoints > 0);
3252
- }, "checkMobile");
3253
- checkMobile();
3254
- window.addEventListener("resize", checkMobile);
3255
- return () => window.removeEventListener("resize", checkMobile);
3256
- }, []);
3257
- const animate = useCallback(() => {
3258
- const dx = targetRef.current.x - positionRef.current.x;
3259
- const dy = targetRef.current.y - positionRef.current.y;
3260
- positionRef.current.x += dx * smoothness;
3261
- positionRef.current.y += dy * smoothness;
3262
- if (elementRef.current) {
3263
- elementRef.current.style.transform = `translate(${positionRef.current.x - size / 2}px, ${positionRef.current.y - size / 2}px)`;
3264
- }
3265
- rafRef.current = requestAnimationFrame(animate);
3266
- }, [smoothness, size]);
3267
- useEffect(() => {
3268
- if (disabled || !mounted) return;
3269
- if (isMobile && !showOnMobile) return;
3270
- const handleMouseMove = /* @__PURE__ */ __name((e) => {
3271
- targetRef.current = { x: e.clientX, y: e.clientY };
3272
- if (!isVisible) setIsVisible(true);
3273
- }, "handleMouseMove");
3274
- const handleMouseLeave = /* @__PURE__ */ __name(() => {
3275
- setIsVisible(false);
3276
- }, "handleMouseLeave");
3277
- const handleMouseEnter = /* @__PURE__ */ __name(() => {
3278
- setIsVisible(true);
3279
- }, "handleMouseEnter");
3280
- document.addEventListener("mousemove", handleMouseMove);
3281
- document.addEventListener("mouseleave", handleMouseLeave);
3282
- document.addEventListener("mouseenter", handleMouseEnter);
3283
- rafRef.current = requestAnimationFrame(animate);
3284
- return () => {
3285
- document.removeEventListener("mousemove", handleMouseMove);
3286
- document.removeEventListener("mouseleave", handleMouseLeave);
3287
- document.removeEventListener("mouseenter", handleMouseEnter);
3288
- cancelAnimationFrame(rafRef.current);
3289
- };
3290
- }, [disabled, mounted, isMobile, showOnMobile, animate, isVisible]);
3291
- if (!mounted || disabled) return null;
3292
- if (isMobile && !showOnMobile) return null;
3293
- return /* @__PURE__ */ jsx(
3294
- "div",
3295
- {
3296
- className: cn(
3297
- "fixed inset-0 pointer-events-none overflow-hidden z-0",
3298
- className
3299
- ),
3300
- children: /* @__PURE__ */ jsxs(
3301
- "div",
3302
- {
3303
- ref: elementRef,
3304
- className: cn(
3305
- "absolute top-0 left-0 transition-opacity duration-300",
3306
- isVisible ? "opacity-100" : "opacity-0"
3307
- ),
3308
- style: { width: size, height: size },
3309
- children: [
3310
- variant === "glow" && /* @__PURE__ */ jsx(
3311
- GlowEffect,
3312
- {
3313
- size,
3314
- color: resolvedColor,
3315
- opacity,
3316
- blur: blurMap[blur]
3317
- }
3318
- ),
3319
- variant === "spotlight" && /* @__PURE__ */ jsx(
3320
- SpotlightEffect,
3321
- {
3322
- size,
3323
- color: resolvedColor,
3324
- opacity,
3325
- blur: blurMap[blur]
3326
- }
3327
- ),
3328
- variant === "gradient-blob" && /* @__PURE__ */ jsx(
3329
- GradientBlobEffect,
3330
- {
3331
- size,
3332
- color: resolvedColor,
3333
- opacity,
3334
- blur: blurMap[blur]
3335
- }
3336
- ),
3337
- variant === "ring" && /* @__PURE__ */ jsx(
3338
- RingEffect,
3339
- {
3340
- size,
3341
- color: resolvedColor,
3342
- opacity
3343
- }
3344
- ),
3345
- variant === "trail" && /* @__PURE__ */ jsx(
3346
- TrailEffect,
3347
- {
3348
- size,
3349
- color: resolvedColor,
3350
- opacity,
3351
- blur: blurMap[blur]
3352
- }
3353
- )
3354
- ]
3355
- }
3356
- )
3357
- }
3358
- );
3359
- }, "MouseFollower");
3360
- var GlowEffect = /* @__PURE__ */ __name(({ size, color, opacity, blur }) => /* @__PURE__ */ jsx(
3361
- "div",
3362
- {
3363
- className: cn("w-full h-full rounded-full", blur),
3364
- style: {
3365
- background: `radial-gradient(circle, ${color} 0%, transparent 70%)`,
3366
- opacity
3367
- }
3368
- }
3369
- ), "GlowEffect");
3370
- var SpotlightEffect = /* @__PURE__ */ __name(({ size, color, opacity, blur }) => /* @__PURE__ */ jsxs(Fragment, { children: [
3371
- /* @__PURE__ */ jsx(
3372
- "div",
3373
- {
3374
- className: cn("absolute inset-0", blur),
3375
- style: {
3376
- background: `conic-gradient(from 180deg at 50% 50%,
3377
- transparent 0deg,
3378
- ${color} 150deg,
3379
- ${color} 210deg,
3380
- transparent 360deg
3381
- )`,
3382
- opacity: opacity * 0.6
3383
- }
3384
- }
3385
- ),
3386
- /* @__PURE__ */ jsx(
3387
- "div",
3388
- {
3389
- className: cn("absolute rounded-full", blur),
3390
- style: {
3391
- width: "40%",
3392
- height: "40%",
3393
- top: "30%",
3394
- left: "30%",
3395
- background: `radial-gradient(circle, ${color} 0%, transparent 70%)`,
3396
- opacity
3397
- }
3398
- }
3399
- )
3400
- ] }), "SpotlightEffect");
3401
- var GradientBlobEffect = /* @__PURE__ */ __name(({ size, color, opacity, blur }) => /* @__PURE__ */ jsxs(Fragment, { children: [
3402
- /* @__PURE__ */ jsx(
3403
- "div",
3404
- {
3405
- className: cn("w-full h-full", blur),
3406
- style: {
3407
- background: `radial-gradient(ellipse 60% 40% at 50% 50%, ${color} 0%, transparent 70%)`,
3408
- opacity,
3409
- animation: "blob-morph 8s ease-in-out infinite"
3410
- }
3411
- }
3412
- ),
3413
- /* @__PURE__ */ jsx(
3414
- "div",
3415
- {
3416
- className: cn("absolute inset-0", blur),
3417
- style: {
3418
- background: `radial-gradient(ellipse 40% 60% at 50% 50%, ${color} 0%, transparent 60%)`,
3419
- opacity: opacity * 0.5,
3420
- animation: "blob-morph 8s ease-in-out infinite reverse",
3421
- animationDelay: "-4s"
3422
- }
3423
- }
3424
- ),
3425
- /* @__PURE__ */ jsx("style", { children: `
3426
- @keyframes blob-morph {
3427
- 0%, 100% { transform: scale(1) rotate(0deg); border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
3428
- 25% { transform: scale(1.1) rotate(90deg); border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
3429
- 50% { transform: scale(0.9) rotate(180deg); border-radius: 50% 60% 30% 60% / 30% 60% 70% 40%; }
3430
- 75% { transform: scale(1.05) rotate(270deg); border-radius: 60% 40% 50% 40% / 70% 30% 50% 60%; }
3431
- }
3432
- ` })
3433
- ] }), "GradientBlobEffect");
3434
- var RingEffect = /* @__PURE__ */ __name(({ size, color, opacity }) => /* @__PURE__ */ jsxs(Fragment, { children: [
3435
- /* @__PURE__ */ jsx(
3436
- "div",
3437
- {
3438
- className: "absolute inset-0 rounded-full",
3439
- style: {
3440
- border: `2px solid ${color}`,
3441
- opacity: opacity * 0.3
3442
- }
3443
- }
3444
- ),
3445
- /* @__PURE__ */ jsx(
3446
- "div",
3447
- {
3448
- className: "absolute rounded-full",
3449
- style: {
3450
- inset: "15%",
3451
- border: `2px solid ${color}`,
3452
- opacity: opacity * 0.5,
3453
- animation: "ring-pulse 2s ease-in-out infinite"
3454
- }
3455
- }
3456
- ),
3457
- /* @__PURE__ */ jsx(
3458
- "div",
3459
- {
3460
- className: "absolute rounded-full",
3461
- style: {
3462
- inset: "30%",
3463
- border: `2px solid ${color}`,
3464
- opacity: opacity * 0.7,
3465
- animation: "ring-pulse 2s ease-in-out infinite",
3466
- animationDelay: "-1s"
3467
- }
3468
- }
3469
- ),
3470
- /* @__PURE__ */ jsx(
3471
- "div",
3472
- {
3473
- className: "absolute rounded-full",
3474
- style: {
3475
- width: "8px",
3476
- height: "8px",
3477
- top: "50%",
3478
- left: "50%",
3479
- transform: "translate(-50%, -50%)",
3480
- background: color,
3481
- opacity
3482
- }
3483
- }
3484
- ),
3485
- /* @__PURE__ */ jsx("style", { children: `
3486
- @keyframes ring-pulse {
3487
- 0%, 100% { opacity: 0.3; transform: scale(1); }
3488
- 50% { opacity: 0.7; transform: scale(1.05); }
3489
- }
3490
- ` })
3491
- ] }), "RingEffect");
3492
- var TrailEffect = /* @__PURE__ */ __name(({ size, color, opacity, blur }) => /* @__PURE__ */ jsx(Fragment, { children: Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ jsx(
3493
- "div",
3494
- {
3495
- className: cn("absolute rounded-full", blur),
3496
- style: {
3497
- width: `${100 - i * 15}%`,
3498
- height: `${100 - i * 15}%`,
3499
- top: `${i * 7.5}%`,
3500
- left: `${i * 7.5}%`,
3501
- background: `radial-gradient(circle, ${color} 0%, transparent 70%)`,
3502
- opacity: opacity * (1 - i * 0.15),
3503
- transition: `transform ${0.1 + i * 0.05}s ease-out`
3504
- }
3505
- },
3506
- i
3507
- )) }), "TrailEffect");
3508
- function ThemeProvider({
3509
- children,
3510
- attribute = "class",
3511
- defaultTheme = "system",
3512
- enableSystem = true,
3513
- disableTransitionOnChange = true,
3514
- ...props
3515
- }) {
3516
- return /* @__PURE__ */ jsx(
3517
- ThemeProvider$1,
3518
- {
3519
- attribute,
3520
- defaultTheme,
3521
- enableSystem,
3522
- disableTransitionOnChange,
3523
- ...props,
3524
- children
3525
- }
3526
- );
3527
- }
3528
- __name(ThemeProvider, "ThemeProvider");
3529
- function useThemeContext() {
3530
- const { theme, setTheme, resolvedTheme, systemTheme, themes } = useTheme();
3531
- const toggleTheme = /* @__PURE__ */ __name(() => {
3532
- const currentResolved = resolvedTheme || "light";
3533
- setTheme(currentResolved === "light" ? "dark" : "light");
3534
- }, "toggleTheme");
3535
- return {
3536
- theme,
3537
- setTheme,
3538
- resolvedTheme,
3539
- systemTheme,
3540
- themes,
3541
- toggleTheme
3542
- };
3543
- }
3544
- __name(useThemeContext, "useThemeContext");
3545
- function ThemeToggle({ className, size = "auto" }) {
3546
- const { resolvedTheme, toggleTheme } = useThemeContext();
3547
- const [mounted, setMounted] = useState(false);
3548
- const isMobile = useIsMobile();
3549
- useEffect(() => {
3550
- setMounted(true);
3551
- }, []);
3552
- const actualSize = size === "auto" ? isMobile ? "compact" : "default" : size;
3553
- const buttonSize = actualSize === "compact" ? "h-8 w-8" : "h-9 w-9";
3554
- const iconSize = actualSize === "compact" ? "h-3.5 w-3.5" : "h-4 w-4";
3555
- if (!mounted) {
3556
- return /* @__PURE__ */ jsxs(
3557
- Button,
3558
- {
3559
- variant: "ghost",
3560
- size: "icon",
3561
- className: cn(buttonSize, className),
3562
- disabled: true,
3563
- children: [
3564
- /* @__PURE__ */ jsx(Sun, { className: iconSize }),
3565
- /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Toggle theme" })
3566
- ]
3567
- }
3568
- );
3569
- }
3570
- return /* @__PURE__ */ jsxs(
3571
- Button,
3572
- {
3573
- variant: "ghost",
3574
- size: "icon",
3575
- onClick: toggleTheme,
3576
- className: cn(buttonSize, className),
3577
- title: `Switch to ${resolvedTheme === "light" ? "dark" : "light"} theme`,
3578
- children: [
3579
- resolvedTheme === "light" ? /* @__PURE__ */ jsx(Sun, { className: iconSize }) : /* @__PURE__ */ jsx(Moon, { className: iconSize }),
3580
- /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Toggle theme" })
3581
- ]
3582
- }
3583
- );
3584
- }
3585
- __name(ThemeToggle, "ThemeToggle");
3586
- var darkThemeVars = {
3587
- // Base HSL values
3588
- "--background": "0 0% 4%",
3589
- "--foreground": "0 0% 98%",
3590
- "--card": "0 0% 8%",
3591
- "--card-foreground": "0 0% 98%",
3592
- "--popover": "0 0% 12%",
3593
- "--popover-foreground": "0 0% 98%",
3594
- "--primary": "217 91% 60%",
3595
- "--primary-foreground": "0 0% 100%",
3596
- "--secondary": "0 0% 98%",
3597
- "--secondary-foreground": "0 0% 9%",
3598
- "--muted": "0 0% 10%",
3599
- "--muted-foreground": "0 0% 60%",
3600
- "--accent": "0 0% 15%",
3601
- "--accent-foreground": "0 0% 98%",
3602
- "--destructive": "0 84% 60%",
3603
- "--destructive-foreground": "0 0% 98%",
3604
- "--border": "0 0% 15%",
3605
- "--input": "0 0% 15%",
3606
- "--ring": "217 91% 60%",
3607
- // Tailwind color tokens (used by bg-*, text-*, etc)
3608
- "--color-background": "hsl(0 0% 4%)",
3609
- "--color-foreground": "hsl(0 0% 98%)",
3610
- "--color-card": "hsl(0 0% 8%)",
3611
- "--color-card-foreground": "hsl(0 0% 98%)",
3612
- "--color-primary": "hsl(217 91% 60%)",
3613
- "--color-primary-foreground": "hsl(0 0% 100%)",
3614
- "--color-secondary": "hsl(0 0% 98%)",
3615
- "--color-secondary-foreground": "hsl(0 0% 9%)",
3616
- "--color-muted": "hsl(0 0% 10%)",
3617
- "--color-muted-foreground": "hsl(0 0% 60%)",
3618
- "--color-accent": "hsl(0 0% 15%)",
3619
- "--color-accent-foreground": "hsl(0 0% 98%)",
3620
- "--color-destructive": "hsl(0 84% 60%)",
3621
- "--color-destructive-foreground": "hsl(0 0% 98%)",
3622
- "--color-border": "hsl(0 0% 15%)",
3623
- "--color-input": "hsl(0 0% 15%)",
3624
- "--color-ring": "hsl(217 91% 60%)"
3625
- };
3626
- var lightThemeVars = {
3627
- // Base HSL values
3628
- "--background": "0 0% 96%",
3629
- "--foreground": "0 0% 9%",
3630
- "--card": "0 0% 100%",
3631
- "--card-foreground": "0 0% 9%",
3632
- "--popover": "0 0% 100%",
3633
- "--popover-foreground": "0 0% 9%",
3634
- "--primary": "217 91% 60%",
3635
- "--primary-foreground": "0 0% 100%",
3636
- "--secondary": "0 0% 9%",
3637
- "--secondary-foreground": "0 0% 98%",
3638
- "--muted": "0 0% 96%",
3639
- "--muted-foreground": "0 0% 40%",
3640
- "--accent": "0 0% 92%",
3641
- "--accent-foreground": "0 0% 9%",
3642
- "--destructive": "0 84% 60%",
3643
- "--destructive-foreground": "0 0% 98%",
3644
- "--border": "0 0% 90%",
3645
- "--input": "0 0% 90%",
3646
- "--ring": "217 91% 60%",
3647
- // Tailwind color tokens (used by bg-*, text-*, etc)
3648
- "--color-background": "hsl(0 0% 96%)",
3649
- "--color-foreground": "hsl(0 0% 9%)",
3650
- "--color-card": "hsl(0 0% 100%)",
3651
- "--color-card-foreground": "hsl(0 0% 9%)",
3652
- "--color-primary": "hsl(217 91% 60%)",
3653
- "--color-primary-foreground": "hsl(0 0% 100%)",
3654
- "--color-secondary": "hsl(0 0% 9%)",
3655
- "--color-secondary-foreground": "hsl(0 0% 98%)",
3656
- "--color-muted": "hsl(0 0% 96%)",
3657
- "--color-muted-foreground": "hsl(0 0% 40%)",
3658
- "--color-accent": "hsl(0 0% 92%)",
3659
- "--color-accent-foreground": "hsl(0 0% 9%)",
3660
- "--color-destructive": "hsl(0 84% 60%)",
3661
- "--color-destructive-foreground": "hsl(0 0% 98%)",
3662
- "--color-border": "hsl(0 0% 90%)",
3663
- "--color-input": "hsl(0 0% 90%)",
3664
- "--color-ring": "hsl(217 91% 60%)"
3665
- };
3666
- function ForceTheme({ theme, children, className }) {
3667
- const themeVars = theme === "dark" ? darkThemeVars : lightThemeVars;
3668
- return /* @__PURE__ */ jsx(
3669
- "div",
3670
- {
3671
- className: cn(theme, className),
3672
- style: themeVars,
3673
- children
3674
- }
3675
- );
3676
- }
3677
- __name(ForceTheme, "ForceTheme");
3678
- var BACKGROUND_VARIANTS = [
3679
- "aurora-borealis",
3680
- "mesh-gradient",
3681
- "floating-orbs",
3682
- "geometric-flow",
3683
- "liquid-gradient",
3684
- "spotlight",
3685
- "none"
3686
- ];
3687
- var VARIANT_LABELS = {
3688
- "aurora-borealis": "Aurora Borealis",
3689
- "mesh-gradient": "Mesh Gradient",
3690
- "floating-orbs": "Floating Orbs",
3691
- "geometric-flow": "Geometric Flow",
3692
- "liquid-gradient": "Liquid Gradient",
3693
- "spotlight": "Spotlight",
3694
- "none": "None",
3695
- // Legacy labels for backwards compatibility
3696
- "gradient-mesh": "Gradient Mesh",
3697
- "dot-matrix": "Dot Matrix",
3698
- "grid-lines": "Grid Lines",
3699
- "aurora": "Aurora",
3700
- "particles": "Particles",
3701
- "waves": "Waves"
3702
- };
3703
- var SuperHero = /* @__PURE__ */ __name(({
3704
- badge,
3705
- title,
3706
- titleGradient,
3707
- subtitle,
3708
- features = [],
3709
- primaryAction,
3710
- secondaryAction,
3711
- stats = [],
3712
- floatingElements,
3713
- backgroundVariant = "mesh-gradient",
3714
- backgroundIntensity = "medium",
3715
- showBackgroundSwitcher = false,
3716
- codeCommand,
3717
- codeCommands,
3718
- className
3719
- }) => {
3720
- const [currentVariant, setCurrentVariant] = React6__default.useState(backgroundVariant);
3721
- const [isMenuOpen, setIsMenuOpen] = React6__default.useState(false);
3722
- const [heroTheme, setHeroTheme] = React6__default.useState("dark");
3723
- const commands = React6__default.useMemo(() => {
3724
- if (codeCommands && codeCommands.length > 0) return codeCommands;
3725
- if (codeCommand) return [codeCommand];
3726
- return [];
3727
- }, [codeCommand, codeCommands]);
3728
- const titleLines = React6__default.useMemo(() => title.split("\n"), [title]);
3729
- const cycleBackground = /* @__PURE__ */ __name(() => {
3730
- const currentIndex = BACKGROUND_VARIANTS.indexOf(currentVariant);
3731
- const nextIndex = (currentIndex + 1) % BACKGROUND_VARIANTS.length;
3732
- setCurrentVariant(BACKGROUND_VARIANTS[nextIndex]);
3733
- }, "cycleBackground");
3734
- return /* @__PURE__ */ jsx(ForceTheme, { theme: heroTheme, children: /* @__PURE__ */ jsxs(
3735
- "section",
3736
- {
3737
- className: cn(
3738
- "relative overflow-hidden bg-background text-foreground z-0 isolate",
3739
- className
3740
- ),
3741
- children: [
3742
- /* @__PURE__ */ jsx("div", { className: "absolute inset-0 -z-10", children: /* @__PURE__ */ jsx(AnimatedBackground, { variant: currentVariant, intensity: backgroundIntensity }) }),
3743
- /* @__PURE__ */ jsx("div", { className: "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-20 sm:py-24 lg:py-32 relative z-10", children: /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
3744
- badge && /* @__PURE__ */ jsxs("div", { className: "inline-flex items-center gap-2 px-4 py-2 bg-primary/10 text-primary rounded-full text-sm font-medium mb-6 border border-primary/20 hover:bg-primary/20 transition-all duration-300", children: [
3745
- badge.icon || /* @__PURE__ */ jsx(Sparkles, { className: "w-4 h-4" }),
3746
- badge.text
3747
- ] }),
3748
- /* @__PURE__ */ jsxs("h1", { className: "text-4xl sm:text-5xl lg:text-6xl xl:text-7xl font-bold text-foreground mb-6 leading-tight", children: [
3749
- titleLines.map((line, index) => /* @__PURE__ */ jsxs(React6__default.Fragment, { children: [
3750
- line,
3751
- index < titleLines.length - 1 && /* @__PURE__ */ jsx("br", {})
3752
- ] }, index)),
3753
- titleGradient && /* @__PURE__ */ jsxs(Fragment, { children: [
3754
- /* @__PURE__ */ jsx("br", {}),
3755
- /* @__PURE__ */ jsx("span", { className: "bg-gradient-to-r from-primary via-primary/80 to-secondary bg-clip-text text-transparent animate-pulse", children: titleGradient })
3756
- ] })
3757
- ] }),
3758
- /* @__PURE__ */ jsx("p", { className: "text-xl sm:text-2xl lg:text-3xl text-muted-foreground mb-8 max-w-4xl mx-auto leading-relaxed", children: subtitle }),
3759
- commands.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex flex-col items-center gap-2 mb-8", children: commands.map((cmd, index) => /* @__PURE__ */ jsxs(
3760
- "div",
3761
- {
3762
- className: "inline-flex items-center gap-3 px-6 py-3 bg-background/50 backdrop-blur-md border border-primary/20 rounded-xl shadow-lg hover:border-primary/40 transition-colors group",
3763
- children: [
3764
- /* @__PURE__ */ jsx("span", { className: "text-muted-foreground font-mono text-sm select-none", children: "$" }),
3765
- /* @__PURE__ */ jsx("code", { className: "font-mono text-lg text-primary font-semibold", children: cmd }),
3766
- /* @__PURE__ */ jsx(
3767
- CopyButton,
3768
- {
3769
- value: cmd,
3770
- variant: "ghost",
3771
- className: "p-1.5 h-auto rounded-md bg-primary/10 text-primary hover:bg-primary hover:text-primary-foreground transition-colors",
3772
- iconClassName: "w-4 h-4"
3773
- }
3774
- )
3775
- ]
3776
- },
3777
- index
3778
- )) }),
3779
- features.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap justify-center gap-6 mb-8", children: features.map((feature, index) => /* @__PURE__ */ jsxs(
3780
- "div",
3781
- {
3782
- className: "flex items-center gap-2 text-sm text-muted-foreground bg-card/50 px-4 py-2 rounded-full border border-border/50 hover:border-primary/30 hover:bg-card transition-all duration-300",
3783
- children: [
3784
- feature.icon,
3785
- /* @__PURE__ */ jsx("span", { children: feature.text })
3786
- ]
3787
- },
3788
- index
3789
- )) }),
3790
- (primaryAction || secondaryAction) && /* @__PURE__ */ jsxs("div", { className: "flex flex-col sm:flex-row gap-4 justify-center mb-12", children: [
3791
- primaryAction && /* @__PURE__ */ jsxs(
3792
- ButtonLink,
3793
- {
3794
- href: primaryAction.href || "#",
3795
- onClick: primaryAction.onClick,
3796
- size: "huge",
3797
- className: "group",
3798
- children: [
3799
- primaryAction.label,
3800
- /* @__PURE__ */ jsx(ArrowRight, { className: "group-hover:translate-x-1 transition-transform duration-300" })
3801
- ]
3802
- }
3803
- ),
3804
- secondaryAction && /* @__PURE__ */ jsxs(
3805
- ButtonLink,
3806
- {
3807
- href: secondaryAction.href || "#",
3808
- onClick: secondaryAction.onClick,
3809
- variant: "outline",
3810
- size: "huge",
3811
- className: "group",
3812
- children: [
3813
- secondaryAction.label,
3814
- secondaryAction.icon && /* @__PURE__ */ jsx("span", { className: "group-hover:rotate-12 transition-transform duration-300", children: secondaryAction.icon })
3815
- ]
3816
- }
3817
- )
3818
- ] }),
3819
- stats.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap justify-center gap-x-6 gap-y-3 md:gap-x-8 md:gap-y-4 max-w-3xl mx-auto", children: stats.map((stat, index) => /* @__PURE__ */ jsxs(
3820
- "div",
3821
- {
3822
- className: "text-center min-w-[80px] md:min-w-[100px] px-4 py-2 md:px-5 md:py-3 rounded-lg border border-foreground/8 bg-background/10 backdrop-blur-sm",
3823
- children: [
3824
- /* @__PURE__ */ jsx("div", { className: "text-lg md:text-xl font-bold text-foreground mb-0.5 md:mb-1", children: stat.number }),
3825
- /* @__PURE__ */ jsx("div", { className: "text-[10px] md:text-xs text-foreground/50 uppercase tracking-wide", children: stat.label })
3826
- ]
3827
- },
3828
- index
3829
- )) })
3830
- ] }) }),
3831
- floatingElements,
3832
- /* @__PURE__ */ jsx(
3833
- Sticky,
3834
- {
3835
- bottom: true,
3836
- offsetBottom: 32,
3837
- className: "w-full flex justify-center pointer-events-none",
3838
- zIndex: 50,
3839
- children: /* @__PURE__ */ jsxs("div", { className: "inline-flex items-center gap-2 px-4 py-2 bg-background/90 backdrop-blur-md border border-border rounded-full shadow-lg pointer-events-auto", children: [
3840
- /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground font-medium", children: VARIANT_LABELS[currentVariant] || currentVariant }),
3841
- /* @__PURE__ */ jsx("div", { className: "w-px h-4 bg-border" }),
3842
- /* @__PURE__ */ jsxs(Tooltip, { children: [
3843
- /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
3844
- Button,
3845
- {
3846
- size: "sm",
3847
- variant: "ghost",
3848
- onClick: cycleBackground,
3849
- className: "h-7 w-7 p-0",
3850
- children: /* @__PURE__ */ jsx(Wand2, { className: "w-3.5 h-3.5" })
3851
- }
3852
- ) }),
3853
- /* @__PURE__ */ jsx(TooltipContent, { children: /* @__PURE__ */ jsx("p", { children: "Cycle background" }) })
3854
- ] }),
3855
- /* @__PURE__ */ jsxs("div", { className: "relative", children: [
3856
- isMenuOpen && /* @__PURE__ */ jsxs("div", { className: "absolute bottom-full left-1/2 -translate-x-1/2 mb-2 bg-card border border-border rounded-lg shadow-xl p-2 min-w-[180px]", children: [
3857
- /* @__PURE__ */ jsx("div", { className: "text-xs font-semibold text-muted-foreground mb-2 px-2", children: "Background Style" }),
3858
- /* @__PURE__ */ jsx("div", { className: "space-y-1", children: BACKGROUND_VARIANTS.map((variant) => /* @__PURE__ */ jsx(
3859
- "button",
3860
- {
3861
- onClick: () => {
3862
- setCurrentVariant(variant);
3863
- setIsMenuOpen(false);
3864
- },
3865
- className: cn(
3866
- "w-full text-left px-3 py-2 rounded-md text-sm transition-colors",
3867
- currentVariant === variant ? "bg-primary text-primary-foreground" : "hover:bg-accent hover:text-accent-foreground"
3868
- ),
3869
- children: VARIANT_LABELS[variant] || variant
3870
- },
3871
- variant
3872
- )) })
3873
- ] }),
3874
- /* @__PURE__ */ jsxs(Tooltip, { children: [
3875
- /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
3876
- Button,
3877
- {
3878
- size: "sm",
3879
- variant: "ghost",
3880
- onClick: () => setIsMenuOpen(!isMenuOpen),
3881
- className: "h-7 w-7 p-0",
3882
- children: /* @__PURE__ */ jsx(Sparkles, { className: "w-3.5 h-3.5" })
3883
- }
3884
- ) }),
3885
- /* @__PURE__ */ jsx(TooltipContent, { children: /* @__PURE__ */ jsx("p", { children: "Choose background" }) })
3886
- ] })
3887
- ] })
3888
- ] })
3889
- }
3890
- )
3891
- ]
3892
- }
3893
- ) });
3894
- }, "SuperHero");
3895
- var TestimonialSection = /* @__PURE__ */ __name(({
3896
- title,
3897
- subtitle,
3898
- testimonials,
3899
- columns = 3,
3900
- className,
3901
- background = "dark"
3902
- }) => {
3903
- const gridClasses = {
3904
- 1: "grid-cols-1 max-w-4xl mx-auto",
3905
- 2: "grid-cols-1 md:grid-cols-2",
3906
- 3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3"
3907
- };
3908
- const backgroundClasses = {
3909
- dark: "bg-background",
3910
- card: "bg-muted/30",
3911
- gradient: "bg-gradient-to-b from-background via-muted/10 to-background"
3912
- };
3913
- const renderStars = /* @__PURE__ */ __name((rating) => {
3914
- return Array.from({ length: 5 }, (_, i) => /* @__PURE__ */ jsx("span", { className: i < rating ? "text-yellow-400" : "text-neutral-400", children: "\u2605" }, i));
3915
- }, "renderStars");
3916
- return /* @__PURE__ */ jsx("section", { className: cn(
3917
- "relative py-16 sm:py-20 md:py-24 lg:py-32",
3918
- backgroundClasses[background],
3919
- className
3920
- ), children: /* @__PURE__ */ jsxs("div", { className: "container max-w-7xl mx-auto px-4 sm:px-6 lg:px-8", children: [
3921
- (title || subtitle) && /* @__PURE__ */ jsxs("div", { className: "text-center mb-12 sm:mb-14 md:mb-16", children: [
3922
- title && /* @__PURE__ */ jsx("h2", { className: "text-3xl sm:text-4xl md:text-5xl lg:text-6xl font-bold text-foreground mb-4 sm:mb-6", children: title }),
3923
- subtitle && /* @__PURE__ */ jsx("p", { className: "text-lg sm:text-xl text-muted-foreground max-w-3xl mx-auto", children: subtitle })
3924
- ] }),
3925
- /* @__PURE__ */ jsx("div", { className: cn("grid gap-6 sm:gap-8", gridClasses[columns]), children: testimonials.map((testimonial, index) => /* @__PURE__ */ jsx(
3926
- Card,
3927
- {
3928
- className: "h-full hover:shadow-lg transition-all duration-300 backdrop-blur-sm border-border/50 hover:border-primary/30 group",
3929
- children: /* @__PURE__ */ jsxs(CardContent, { className: "p-8", children: [
3930
- testimonial.rating && /* @__PURE__ */ jsx("div", { className: "flex mb-6 text-lg", children: renderStars(testimonial.rating) }),
3931
- /* @__PURE__ */ jsxs("blockquote", { className: "text-foreground mb-8 italic text-lg leading-relaxed group-hover:text-primary transition-colors duration-300", children: [
3932
- '"',
3933
- testimonial.content,
3934
- '"'
3935
- ] }),
3936
- /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
3937
- testimonial.author.avatar && /* @__PURE__ */ jsx(
3938
- "img",
3939
- {
3940
- src: testimonial.author.avatar,
3941
- alt: testimonial.author.name,
3942
- className: "w-14 h-14 rounded-full mr-4 ring-2 ring-primary/20 group-hover:ring-primary/40 transition-all duration-300"
3943
- }
3944
- ),
3945
- /* @__PURE__ */ jsxs("div", { children: [
3946
- /* @__PURE__ */ jsx("div", { className: "font-semibold text-foreground group-hover:text-primary transition-colors duration-300", children: testimonial.author.name }),
3947
- testimonial.author.title && /* @__PURE__ */ jsxs("div", { className: "text-sm text-muted-foreground", children: [
3948
- testimonial.author.title,
3949
- testimonial.author.company && ` at ${testimonial.author.company}`
3950
- ] })
3951
- ] })
3952
- ] })
3953
- ] })
3954
- },
3955
- index
3956
- )) })
3957
- ] }) });
3958
- }, "TestimonialSection");
3959
-
3960
- export { AnimatedBackground, ArticleCard, ArticleList, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbNavigation, BreadcrumbPage, BreadcrumbSeparator, CTASection, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, FeatureSection, ForceTheme, Hero, MouseFollower, NewsletterSection, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, SSRPagination, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, SplitHero, SplitHeroContent, SplitHeroMedia, StaticPagination, StatsSection, SuperHero, TestimonialSection, ThemeProvider, ThemeToggle, useBrowserDetect, useCfgRouter, useDRFPagination, useDRFPaginationInfo, useDeviceDetect, useHotkey, useQueryParams, useResolvedTheme, useSidebar, useThemeContext };
3961
- //# sourceMappingURL=index.mjs.map
3962
- //# sourceMappingURL=index.mjs.map