@propknot/shared-ui 1.0.25 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -202,12 +202,70 @@ var require_notificationTypes = __commonJS({
202
202
  // src/index.js
203
203
  var index_exports = {};
204
204
  __export(index_exports, {
205
+ Accordion: () => Accordion,
206
+ AccordionContent: () => AccordionContent,
207
+ AccordionItem: () => AccordionItem,
208
+ AccordionTrigger: () => AccordionTrigger,
209
+ Alert: () => Alert,
210
+ AlertDescription: () => AlertDescription,
211
+ AlertTitle: () => AlertTitle,
205
212
  AuthLayout: () => AuthLayout_default,
206
213
  AuthProvider: () => AuthProvider,
214
+ Avatar: () => Avatar2,
215
+ AvatarFallback: () => AvatarFallback,
216
+ AvatarImage: () => AvatarImage,
217
+ Badge: () => Badge2,
218
+ Blockquote: () => Blockquote,
219
+ BreadcrumbItem: () => BreadcrumbItem,
220
+ BreadcrumbLink: () => BreadcrumbLink,
221
+ Breadcrumbs: () => Breadcrumbs2,
222
+ Button: () => Button2,
223
+ Card: () => Card2,
224
+ CardContent: () => CardContent2,
225
+ CardDescription: () => CardDescription,
226
+ CardFooter: () => CardFooter,
227
+ CardHeader: () => CardHeader,
228
+ CardTitle: () => CardTitle,
229
+ Checkbox: () => Checkbox,
230
+ Container: () => Container2,
207
231
  CustomThemeProvider: () => CustomThemeProvider,
232
+ Dialog: () => Dialog,
233
+ DialogClose: () => DialogClose,
234
+ DialogContent: () => DialogContent,
235
+ DialogDescription: () => DialogDescription,
236
+ DialogFooter: () => DialogFooter,
237
+ DialogHeader: () => DialogHeader,
238
+ DialogOverlay: () => DialogOverlay,
239
+ DialogPortal: () => DialogPortal,
240
+ DialogTitle: () => DialogTitle,
241
+ DialogTrigger: () => DialogTrigger,
208
242
  ErrorBoundary: () => ErrorBoundary_default,
243
+ Grid: () => Grid,
244
+ GridItem: () => GridItem,
245
+ H1: () => H1,
246
+ H2: () => H2,
247
+ H3: () => H3,
248
+ H4: () => H4,
249
+ HStack: () => HStack,
250
+ Header: () => Header2,
251
+ HeaderActions: () => HeaderActions,
252
+ HeaderBrand: () => HeaderBrand,
253
+ HeaderContainer: () => HeaderContainer,
254
+ HeaderLink: () => HeaderLink,
255
+ HeaderNav: () => HeaderNav,
256
+ Heading: () => Heading,
257
+ InlineCode: () => InlineCode,
258
+ Input: () => Input,
259
+ Label: () => Label,
260
+ Large: () => Large,
261
+ Lead: () => Lead,
262
+ List: () => List2,
263
+ ListItem: () => ListItem2,
264
+ ListItemIcon: () => ListItemIcon2,
265
+ ListItemText: () => ListItemText2,
209
266
  LoadingSpinner: () => LoadingSpinner_default,
210
267
  ModernCard: () => ModernCard_default,
268
+ Muted: () => Muted,
211
269
  NOTIFICATION_CHANNELS: () => NOTIFICATION_CHANNELS,
212
270
  NOTIFICATION_TYPES: () => NOTIFICATION_TYPES,
213
271
  Navbar: () => Navbar_default,
@@ -215,13 +273,66 @@ __export(index_exports, {
215
273
  NotificationManager: () => NotificationManager_default,
216
274
  NotificationPatterns: () => NotificationPatterns,
217
275
  NotificationProvider: () => NotificationProvider,
276
+ P: () => P,
218
277
  PageHeader: () => PageHeader_default,
219
278
  PageLayout: () => PageLayout_default,
279
+ Popover: () => Popover,
280
+ PopoverAnchor: () => PopoverAnchor,
281
+ PopoverContent: () => PopoverContent,
282
+ PopoverTrigger: () => PopoverTrigger,
283
+ Progress: () => Progress,
284
+ Select: () => Select,
285
+ SelectContent: () => SelectContent,
286
+ SelectGroup: () => SelectGroup,
287
+ SelectItem: () => SelectItem,
288
+ SelectLabel: () => SelectLabel,
289
+ SelectScrollDownButton: () => SelectScrollDownButton,
290
+ SelectScrollUpButton: () => SelectScrollUpButton,
291
+ SelectSeparator: () => SelectSeparator,
292
+ SelectTrigger: () => SelectTrigger,
293
+ SelectValue: () => SelectValue,
294
+ Separator: () => Separator2,
295
+ Sheet: () => Sheet,
296
+ SheetClose: () => SheetClose,
297
+ SheetContent: () => SheetContent,
298
+ SheetDescription: () => SheetDescription,
299
+ SheetFooter: () => SheetFooter,
300
+ SheetHeader: () => SheetHeader,
301
+ SheetOverlay: () => SheetOverlay,
302
+ SheetPortal: () => SheetPortal,
303
+ SheetTitle: () => SheetTitle,
304
+ SheetTrigger: () => SheetTrigger,
305
+ Skeleton: () => Skeleton,
306
+ Small: () => Small,
220
307
  SocketProvider: () => SocketProvider,
308
+ Stack: () => Stack5,
309
+ Switch: () => Switch,
310
+ Table: () => Table,
311
+ TableBody: () => TableBody,
312
+ TableCaption: () => TableCaption,
313
+ TableCell: () => TableCell,
314
+ TableFooter: () => TableFooter,
315
+ TableHead: () => TableHead,
316
+ TableHeader: () => TableHeader,
317
+ TableRow: () => TableRow,
318
+ Tabs: () => Tabs,
319
+ TabsContent: () => TabsContent,
320
+ TabsList: () => TabsList,
321
+ TabsTrigger: () => TabsTrigger,
221
322
  TenantLayout: () => TenantLayout_default,
222
323
  TenantThemeProvider: () => TenantThemeProvider,
324
+ Textarea: () => Textarea,
325
+ Toaster: () => Toaster,
326
+ Tooltip: () => Tooltip,
327
+ TooltipContent: () => TooltipContent,
328
+ TooltipProvider: () => TooltipProvider,
329
+ TooltipTrigger: () => TooltipTrigger,
330
+ VStack: () => VStack,
223
331
  api: () => api,
224
332
  auditNotifications: () => auditNotifications,
333
+ badgeVariants: () => badgeVariants,
334
+ buttonVariants: () => buttonVariants,
335
+ cn: () => cn,
225
336
  createContrastEnhancedComponents: () => createContrastEnhancedComponents,
226
337
  createNotificationAwareAPI: () => createNotificationAwareAPI,
227
338
  darkenColor: () => darkenColor,
@@ -277,6 +388,13 @@ __export(index_exports, {
277
388
  });
278
389
  module.exports = __toCommonJS(index_exports);
279
390
 
391
+ // src/lib/utils.js
392
+ var import_clsx = require("clsx");
393
+ var import_tailwind_merge = require("tailwind-merge");
394
+ function cn(...inputs) {
395
+ return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
396
+ }
397
+
280
398
  // src/components/Navigation/Navbar.js
281
399
  var import_react4 = __toESM(require("react"));
282
400
  var import_material = require("@mui/material");
@@ -288,8 +406,12 @@ var import_react = __toESM(require("react"));
288
406
 
289
407
  // src/services/api.js
290
408
  var import_axios = __toESM(require("axios"));
409
+ var import_meta = {};
291
410
  var getApiUrl = () => {
292
- if (process.env.REACT_APP_API_URL) {
411
+ if (typeof import_meta !== "undefined" && import_meta.env && import_meta.env.VITE_API_URL) {
412
+ return import_meta.env.VITE_API_URL;
413
+ }
414
+ if (typeof process !== "undefined" && process.env && process.env.REACT_APP_API_URL) {
293
415
  return process.env.REACT_APP_API_URL;
294
416
  }
295
417
  const hostname = window.location.hostname;
@@ -1592,17 +1714,23 @@ var CustomThemeProvider = ({ children }) => {
1592
1714
  if (!isEmbedded) return;
1593
1715
  let isInitialRequest = true;
1594
1716
  const handleMessage = (event) => {
1595
- if (!event.origin.startsWith("http://localhost:")) return;
1717
+ const expectedOriginProtocol = window.location.protocol;
1718
+ const expectedOriginHostname = window.location.hostname;
1719
+ if (!event.origin.startsWith(`${expectedOriginProtocol}//${expectedOriginHostname}`)) {
1720
+ console.warn("[SharedUI Theme] Rejected message from:", event.origin);
1721
+ return;
1722
+ }
1723
+ console.log("[SharedUI Theme] Received message:", event.data);
1596
1724
  const { type, theme } = event.data;
1597
- if (type === "THEME_CHANGE" && theme && ["light", "dark"].includes(theme)) {
1598
- const storedTheme2 = localStorage.getItem("embedded-theme");
1599
- if (isInitialRequest && storedTheme2 && storedTheme2 !== theme) {
1725
+ if (type === "THEME_CHANGE" && theme) {
1726
+ const themeValue = typeof theme === "object" ? theme.mode : theme;
1727
+ if (["light", "dark"].includes(themeValue)) {
1728
+ console.log("[SharedUI Theme] Updating theme to:", themeValue);
1729
+ const storedTheme2 = localStorage.getItem("embedded-theme");
1600
1730
  isInitialRequest = false;
1601
- return;
1731
+ setCurrentTheme(themeValue);
1732
+ localStorage.setItem("embedded-theme", themeValue);
1602
1733
  }
1603
- isInitialRequest = false;
1604
- setCurrentTheme(theme);
1605
- localStorage.setItem("embedded-theme", theme);
1606
1734
  }
1607
1735
  };
1608
1736
  window.addEventListener("message", handleMessage);
@@ -1619,10 +1747,8 @@ var CustomThemeProvider = ({ children }) => {
1619
1747
  if (isEmbedded) return;
1620
1748
  if (user && canModifyTheme) {
1621
1749
  const themeToUse = user.themePreference || "light";
1622
- console.log("[ThemeContext] Loading user theme preference:", themeToUse, "User:", user);
1623
1750
  setCurrentTheme(themeToUse);
1624
1751
  } else {
1625
- console.log("[ThemeContext] No user or cannot modify theme, using light. User:", user, "canModifyTheme:", canModifyTheme);
1626
1752
  setCurrentTheme("light");
1627
1753
  }
1628
1754
  }, [user, canModifyTheme, isEmbedded]);
@@ -1667,6 +1793,15 @@ var CustomThemeProvider = ({ children }) => {
1667
1793
  const themeObject = effectiveTheme === "dark" ? darkTheme : lightTheme;
1668
1794
  const isDarkMode = effectiveTheme === "dark";
1669
1795
  const effectiveBrandingColor = getEffectiveBrandingColor();
1796
+ (0, import_react3.useEffect)(() => {
1797
+ const root = window.document.documentElement;
1798
+ root.classList.remove("light", "dark");
1799
+ if (effectiveTheme === "dark") {
1800
+ root.classList.add("dark");
1801
+ } else {
1802
+ root.classList.add("light");
1803
+ }
1804
+ }, [effectiveTheme]);
1670
1805
  const value = {
1671
1806
  currentThemeKey: effectiveTheme,
1672
1807
  theme: themeObject,
@@ -3233,6 +3368,1399 @@ var ModernCardContent = ({ children, sx = {}, ...props }) => {
3233
3368
  ModernCard.Content = ModernCardContent;
3234
3369
  var ModernCard_default = ModernCard;
3235
3370
 
3371
+ // src/components/UI/accordion.jsx
3372
+ var React13 = __toESM(require("react"));
3373
+ var AccordionPrimitive = __toESM(require("@radix-ui/react-accordion"));
3374
+ var import_lucide_react = require("lucide-react");
3375
+ var Accordion = AccordionPrimitive.Root;
3376
+ var AccordionItem = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React13.createElement(
3377
+ AccordionPrimitive.Item,
3378
+ {
3379
+ ref,
3380
+ className: cn("border-b", className),
3381
+ ...props
3382
+ }
3383
+ ));
3384
+ AccordionItem.displayName = "AccordionItem";
3385
+ var AccordionTrigger = React13.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React13.createElement(AccordionPrimitive.Header, { className: "flex" }, /* @__PURE__ */ React13.createElement(
3386
+ AccordionPrimitive.Trigger,
3387
+ {
3388
+ ref,
3389
+ className: cn(
3390
+ "flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",
3391
+ className
3392
+ ),
3393
+ ...props
3394
+ },
3395
+ children,
3396
+ /* @__PURE__ */ React13.createElement(import_lucide_react.ChevronDown, { className: "h-4 w-4 shrink-0 transition-transform duration-200" })
3397
+ )));
3398
+ AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
3399
+ var AccordionContent = React13.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React13.createElement(
3400
+ AccordionPrimitive.Content,
3401
+ {
3402
+ ref,
3403
+ className: "overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
3404
+ ...props
3405
+ },
3406
+ /* @__PURE__ */ React13.createElement("div", { className: cn("pb-4 pt-0", className) }, children)
3407
+ ));
3408
+ AccordionContent.displayName = AccordionPrimitive.Content.displayName;
3409
+
3410
+ // src/components/UI/alert.jsx
3411
+ var React14 = __toESM(require("react"));
3412
+ var import_class_variance_authority = require("class-variance-authority");
3413
+ var alertVariants = (0, import_class_variance_authority.cva)(
3414
+ "relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",
3415
+ {
3416
+ variants: {
3417
+ variant: {
3418
+ default: "bg-background text-foreground",
3419
+ destructive: "border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"
3420
+ }
3421
+ },
3422
+ defaultVariants: {
3423
+ variant: "default"
3424
+ }
3425
+ }
3426
+ );
3427
+ var Alert = React14.forwardRef(({ className, variant, ...props }, ref) => /* @__PURE__ */ React14.createElement(
3428
+ "div",
3429
+ {
3430
+ ref,
3431
+ role: "alert",
3432
+ className: cn(alertVariants({ variant }), className),
3433
+ ...props
3434
+ }
3435
+ ));
3436
+ Alert.displayName = "Alert";
3437
+ var AlertTitle = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React14.createElement(
3438
+ "h5",
3439
+ {
3440
+ ref,
3441
+ className: cn("mb-1 font-medium leading-none tracking-tight", className),
3442
+ ...props
3443
+ }
3444
+ ));
3445
+ AlertTitle.displayName = "AlertTitle";
3446
+ var AlertDescription = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React14.createElement(
3447
+ "div",
3448
+ {
3449
+ ref,
3450
+ className: cn("text-sm [&_p]:leading-relaxed", className),
3451
+ ...props
3452
+ }
3453
+ ));
3454
+ AlertDescription.displayName = "AlertDescription";
3455
+
3456
+ // src/components/UI/avatar.jsx
3457
+ var React15 = __toESM(require("react"));
3458
+ var AvatarPrimitive = __toESM(require("@radix-ui/react-avatar"));
3459
+ var Avatar2 = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React15.createElement(
3460
+ AvatarPrimitive.Root,
3461
+ {
3462
+ ref,
3463
+ className: cn(
3464
+ "relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
3465
+ className
3466
+ ),
3467
+ ...props
3468
+ }
3469
+ ));
3470
+ Avatar2.displayName = AvatarPrimitive.Root.displayName;
3471
+ var AvatarImage = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React15.createElement(
3472
+ AvatarPrimitive.Image,
3473
+ {
3474
+ ref,
3475
+ className: cn("aspect-square h-full w-full", className),
3476
+ ...props
3477
+ }
3478
+ ));
3479
+ AvatarImage.displayName = AvatarPrimitive.Image.displayName;
3480
+ var AvatarFallback = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React15.createElement(
3481
+ AvatarPrimitive.Fallback,
3482
+ {
3483
+ ref,
3484
+ className: cn(
3485
+ "flex h-full w-full items-center justify-center rounded-full bg-muted",
3486
+ className
3487
+ ),
3488
+ ...props
3489
+ }
3490
+ ));
3491
+ AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
3492
+
3493
+ // src/components/UI/badge.jsx
3494
+ var React16 = __toESM(require("react"));
3495
+ var import_class_variance_authority2 = require("class-variance-authority");
3496
+ var badgeVariants = (0, import_class_variance_authority2.cva)(
3497
+ "inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
3498
+ {
3499
+ variants: {
3500
+ variant: {
3501
+ default: "border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
3502
+ secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
3503
+ destructive: "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
3504
+ outline: "text-foreground"
3505
+ }
3506
+ },
3507
+ defaultVariants: {
3508
+ variant: "default"
3509
+ }
3510
+ }
3511
+ );
3512
+ function Badge2({ className, variant, ...props }) {
3513
+ return /* @__PURE__ */ React16.createElement("div", { className: cn(badgeVariants({ variant }), className), ...props });
3514
+ }
3515
+
3516
+ // src/components/UI/breadcrumbs.jsx
3517
+ var React17 = __toESM(require("react"));
3518
+ var import_lucide_react2 = require("lucide-react");
3519
+ var Breadcrumbs2 = React17.forwardRef(({
3520
+ className,
3521
+ separator,
3522
+ children,
3523
+ ...props
3524
+ }, ref) => {
3525
+ const Separator3 = separator || /* @__PURE__ */ React17.createElement(import_lucide_react2.ChevronRight, { className: "h-4 w-4" });
3526
+ const items = React17.Children.toArray(children);
3527
+ return /* @__PURE__ */ React17.createElement(
3528
+ "nav",
3529
+ {
3530
+ ref,
3531
+ "aria-label": "Breadcrumb",
3532
+ className: cn("flex items-center space-x-1 text-sm text-muted-foreground", className),
3533
+ ...props
3534
+ },
3535
+ /* @__PURE__ */ React17.createElement("ol", { className: "flex items-center space-x-1" }, items.map((child, index) => /* @__PURE__ */ React17.createElement("li", { key: index, className: "flex items-center space-x-1" }, child, index < items.length - 1 && /* @__PURE__ */ React17.createElement("span", { className: "mx-1", "aria-hidden": "true" }, Separator3))))
3536
+ );
3537
+ });
3538
+ Breadcrumbs2.displayName = "Breadcrumbs";
3539
+ var BreadcrumbItem = React17.forwardRef(({
3540
+ className,
3541
+ isCurrentPage,
3542
+ children,
3543
+ ...props
3544
+ }, ref) => /* @__PURE__ */ React17.createElement(
3545
+ "span",
3546
+ {
3547
+ ref,
3548
+ className: cn(
3549
+ "inline-flex items-center",
3550
+ isCurrentPage ? "font-medium text-foreground" : "hover:text-foreground transition-colors",
3551
+ className
3552
+ ),
3553
+ "aria-current": isCurrentPage ? "page" : void 0,
3554
+ ...props
3555
+ },
3556
+ children
3557
+ ));
3558
+ BreadcrumbItem.displayName = "BreadcrumbItem";
3559
+ var BreadcrumbLink = React17.forwardRef(({
3560
+ className,
3561
+ href,
3562
+ children,
3563
+ ...props
3564
+ }, ref) => /* @__PURE__ */ React17.createElement(
3565
+ "a",
3566
+ {
3567
+ ref,
3568
+ href,
3569
+ className: cn(
3570
+ "hover:text-foreground transition-colors hover:underline",
3571
+ className
3572
+ ),
3573
+ ...props
3574
+ },
3575
+ children
3576
+ ));
3577
+ BreadcrumbLink.displayName = "BreadcrumbLink";
3578
+
3579
+ // src/components/UI/button.jsx
3580
+ var React18 = __toESM(require("react"));
3581
+ var import_react_slot = require("@radix-ui/react-slot");
3582
+ var import_class_variance_authority3 = require("class-variance-authority");
3583
+ var buttonVariants = (0, import_class_variance_authority3.cva)(
3584
+ "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
3585
+ {
3586
+ variants: {
3587
+ variant: {
3588
+ default: "bg-primary text-primary-foreground hover:bg-primary/90",
3589
+ destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
3590
+ outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
3591
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
3592
+ ghost: "hover:bg-accent hover:text-accent-foreground",
3593
+ link: "text-primary underline-offset-4 hover:underline"
3594
+ },
3595
+ size: {
3596
+ default: "h-10 px-4 py-2",
3597
+ sm: "h-9 rounded-md px-3",
3598
+ lg: "h-11 rounded-md px-8",
3599
+ icon: "h-10 w-10"
3600
+ }
3601
+ },
3602
+ defaultVariants: {
3603
+ variant: "default",
3604
+ size: "default"
3605
+ }
3606
+ }
3607
+ );
3608
+ var Button2 = React18.forwardRef(({ className, variant, size, asChild = false, ...props }, ref) => {
3609
+ const Comp = asChild ? import_react_slot.Slot : "button";
3610
+ return /* @__PURE__ */ React18.createElement(
3611
+ Comp,
3612
+ {
3613
+ className: cn(buttonVariants({ variant, size }), className),
3614
+ ref,
3615
+ ...props
3616
+ }
3617
+ );
3618
+ });
3619
+ Button2.displayName = "Button";
3620
+
3621
+ // src/components/UI/card.jsx
3622
+ var React19 = __toESM(require("react"));
3623
+ var Card2 = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React19.createElement(
3624
+ "div",
3625
+ {
3626
+ ref,
3627
+ className: cn(
3628
+ "rounded-lg border bg-card text-card-foreground shadow-sm",
3629
+ className
3630
+ ),
3631
+ ...props
3632
+ }
3633
+ ));
3634
+ Card2.displayName = "Card";
3635
+ var CardHeader = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React19.createElement(
3636
+ "div",
3637
+ {
3638
+ ref,
3639
+ className: cn("flex flex-col space-y-1.5 p-6", className),
3640
+ ...props
3641
+ }
3642
+ ));
3643
+ CardHeader.displayName = "CardHeader";
3644
+ var CardTitle = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React19.createElement(
3645
+ "h3",
3646
+ {
3647
+ ref,
3648
+ className: cn(
3649
+ "text-2xl font-semibold leading-none tracking-tight",
3650
+ className
3651
+ ),
3652
+ ...props
3653
+ }
3654
+ ));
3655
+ CardTitle.displayName = "CardTitle";
3656
+ var CardDescription = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React19.createElement(
3657
+ "p",
3658
+ {
3659
+ ref,
3660
+ className: cn("text-sm text-muted-foreground", className),
3661
+ ...props
3662
+ }
3663
+ ));
3664
+ CardDescription.displayName = "CardDescription";
3665
+ var CardContent2 = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React19.createElement("div", { ref, className: cn("p-6 pt-0", className), ...props }));
3666
+ CardContent2.displayName = "CardContent";
3667
+ var CardFooter = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React19.createElement(
3668
+ "div",
3669
+ {
3670
+ ref,
3671
+ className: cn("flex items-center p-6 pt-0", className),
3672
+ ...props
3673
+ }
3674
+ ));
3675
+ CardFooter.displayName = "CardFooter";
3676
+
3677
+ // src/components/UI/checkbox.jsx
3678
+ var React20 = __toESM(require("react"));
3679
+ var CheckboxPrimitive = __toESM(require("@radix-ui/react-checkbox"));
3680
+ var import_lucide_react3 = require("lucide-react");
3681
+ var Checkbox = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React20.createElement(
3682
+ CheckboxPrimitive.Root,
3683
+ {
3684
+ ref,
3685
+ className: cn(
3686
+ "peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
3687
+ className
3688
+ ),
3689
+ ...props
3690
+ },
3691
+ /* @__PURE__ */ React20.createElement(
3692
+ CheckboxPrimitive.Indicator,
3693
+ {
3694
+ className: cn("flex items-center justify-center text-current")
3695
+ },
3696
+ /* @__PURE__ */ React20.createElement(import_lucide_react3.Check, { className: "h-4 w-4" })
3697
+ )
3698
+ ));
3699
+ Checkbox.displayName = CheckboxPrimitive.Root.displayName;
3700
+
3701
+ // src/components/UI/container.jsx
3702
+ var React21 = __toESM(require("react"));
3703
+ var Container2 = React21.forwardRef(({ className, maxWidth = "7xl", centered = true, ...props }, ref) => {
3704
+ const maxWidthClasses = {
3705
+ sm: "max-w-screen-sm",
3706
+ md: "max-w-screen-md",
3707
+ lg: "max-w-screen-lg",
3708
+ xl: "max-w-screen-xl",
3709
+ "2xl": "max-w-screen-2xl",
3710
+ "7xl": "max-w-7xl",
3711
+ full: "max-w-full"
3712
+ };
3713
+ return /* @__PURE__ */ React21.createElement(
3714
+ "div",
3715
+ {
3716
+ ref,
3717
+ className: cn(
3718
+ "w-full px-4 sm:px-6 lg:px-8",
3719
+ centered && "mx-auto",
3720
+ maxWidthClasses[maxWidth] || maxWidthClasses["7xl"],
3721
+ className
3722
+ ),
3723
+ ...props
3724
+ }
3725
+ );
3726
+ });
3727
+ Container2.displayName = "Container";
3728
+
3729
+ // src/components/UI/dialog.jsx
3730
+ var React22 = __toESM(require("react"));
3731
+ var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"));
3732
+ var import_lucide_react4 = require("lucide-react");
3733
+ var Dialog = DialogPrimitive.Root;
3734
+ var DialogTrigger = DialogPrimitive.Trigger;
3735
+ var DialogPortal = DialogPrimitive.Portal;
3736
+ var DialogClose = DialogPrimitive.Close;
3737
+ var DialogOverlay = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React22.createElement(
3738
+ DialogPrimitive.Overlay,
3739
+ {
3740
+ ref,
3741
+ className: cn(
3742
+ "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
3743
+ className
3744
+ ),
3745
+ ...props
3746
+ }
3747
+ ));
3748
+ DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
3749
+ var DialogContent = React22.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React22.createElement(DialogPortal, null, /* @__PURE__ */ React22.createElement(DialogOverlay, null), /* @__PURE__ */ React22.createElement(
3750
+ DialogPrimitive.Content,
3751
+ {
3752
+ ref,
3753
+ className: cn(
3754
+ "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
3755
+ className
3756
+ ),
3757
+ ...props
3758
+ },
3759
+ children,
3760
+ /* @__PURE__ */ React22.createElement(DialogPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground" }, /* @__PURE__ */ React22.createElement(import_lucide_react4.X, { className: "h-4 w-4" }), /* @__PURE__ */ React22.createElement("span", { className: "sr-only" }, "Close"))
3761
+ )));
3762
+ DialogContent.displayName = DialogPrimitive.Content.displayName;
3763
+ var DialogHeader = ({
3764
+ className,
3765
+ ...props
3766
+ }) => /* @__PURE__ */ React22.createElement(
3767
+ "div",
3768
+ {
3769
+ className: cn(
3770
+ "flex flex-col space-y-1.5 text-center sm:text-left",
3771
+ className
3772
+ ),
3773
+ ...props
3774
+ }
3775
+ );
3776
+ DialogHeader.displayName = "DialogHeader";
3777
+ var DialogFooter = ({
3778
+ className,
3779
+ ...props
3780
+ }) => /* @__PURE__ */ React22.createElement(
3781
+ "div",
3782
+ {
3783
+ className: cn(
3784
+ "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
3785
+ className
3786
+ ),
3787
+ ...props
3788
+ }
3789
+ );
3790
+ DialogFooter.displayName = "DialogFooter";
3791
+ var DialogTitle = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React22.createElement(
3792
+ DialogPrimitive.Title,
3793
+ {
3794
+ ref,
3795
+ className: cn(
3796
+ "text-lg font-semibold leading-none tracking-tight",
3797
+ className
3798
+ ),
3799
+ ...props
3800
+ }
3801
+ ));
3802
+ DialogTitle.displayName = DialogPrimitive.Title.displayName;
3803
+ var DialogDescription = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React22.createElement(
3804
+ DialogPrimitive.Description,
3805
+ {
3806
+ ref,
3807
+ className: cn("text-sm text-muted-foreground", className),
3808
+ ...props
3809
+ }
3810
+ ));
3811
+ DialogDescription.displayName = DialogPrimitive.Description.displayName;
3812
+
3813
+ // src/components/UI/grid.jsx
3814
+ var React23 = __toESM(require("react"));
3815
+ var Grid = React23.forwardRef(({
3816
+ className,
3817
+ cols = 1,
3818
+ sm,
3819
+ md,
3820
+ lg,
3821
+ xl,
3822
+ gap = 4,
3823
+ ...props
3824
+ }, ref) => {
3825
+ const colsClasses = {
3826
+ 1: "grid-cols-1",
3827
+ 2: "grid-cols-2",
3828
+ 3: "grid-cols-3",
3829
+ 4: "grid-cols-4",
3830
+ 5: "grid-cols-5",
3831
+ 6: "grid-cols-6",
3832
+ 12: "grid-cols-12"
3833
+ };
3834
+ const responsiveClasses = {
3835
+ sm: sm ? `sm:grid-cols-${sm}` : null,
3836
+ md: md ? `md:grid-cols-${md}` : null,
3837
+ lg: lg ? `lg:grid-cols-${lg}` : null,
3838
+ xl: xl ? `xl:grid-cols-${xl}` : null
3839
+ };
3840
+ const gapClass = `gap-${gap}`;
3841
+ return /* @__PURE__ */ React23.createElement(
3842
+ "div",
3843
+ {
3844
+ ref,
3845
+ className: cn(
3846
+ "grid",
3847
+ colsClasses[cols] || "grid-cols-1",
3848
+ responsiveClasses.sm,
3849
+ responsiveClasses.md,
3850
+ responsiveClasses.lg,
3851
+ responsiveClasses.xl,
3852
+ gapClass,
3853
+ className
3854
+ ),
3855
+ ...props
3856
+ }
3857
+ );
3858
+ });
3859
+ Grid.displayName = "Grid";
3860
+ var GridItem = React23.forwardRef(({
3861
+ className,
3862
+ colSpan = 1,
3863
+ colStart,
3864
+ colEnd,
3865
+ rowSpan = 1,
3866
+ rowStart,
3867
+ rowEnd,
3868
+ ...props
3869
+ }, ref) => {
3870
+ const spanClasses = {
3871
+ 1: "col-span-1",
3872
+ 2: "col-span-2",
3873
+ 3: "col-span-3",
3874
+ 4: "col-span-4",
3875
+ 5: "col-span-5",
3876
+ 6: "col-span-6",
3877
+ 12: "col-span-12",
3878
+ full: "col-span-full"
3879
+ };
3880
+ const rowSpanClasses = {
3881
+ 1: "row-span-1",
3882
+ 2: "row-span-2",
3883
+ 3: "row-span-3",
3884
+ 4: "row-span-4",
3885
+ 5: "row-span-5",
3886
+ 6: "row-span-6"
3887
+ };
3888
+ return /* @__PURE__ */ React23.createElement(
3889
+ "div",
3890
+ {
3891
+ ref,
3892
+ className: cn(
3893
+ spanClasses[colSpan],
3894
+ rowSpanClasses[rowSpan],
3895
+ colStart && `col-start-${colStart}`,
3896
+ colEnd && `col-end-${colEnd}`,
3897
+ rowStart && `row-start-${rowStart}`,
3898
+ rowEnd && `row-end-${rowEnd}`,
3899
+ className
3900
+ ),
3901
+ ...props
3902
+ }
3903
+ );
3904
+ });
3905
+ GridItem.displayName = "GridItem";
3906
+ Grid.Item = GridItem;
3907
+
3908
+ // src/components/UI/header.jsx
3909
+ var React24 = __toESM(require("react"));
3910
+ var Header2 = React24.forwardRef(({
3911
+ className,
3912
+ sticky = false,
3913
+ ...props
3914
+ }, ref) => /* @__PURE__ */ React24.createElement(
3915
+ "header",
3916
+ {
3917
+ ref,
3918
+ className: cn(
3919
+ "w-full border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60",
3920
+ sticky && "sticky top-0 z-50",
3921
+ className
3922
+ ),
3923
+ ...props
3924
+ }
3925
+ ));
3926
+ Header2.displayName = "Header";
3927
+ var HeaderContainer = React24.forwardRef(({
3928
+ className,
3929
+ ...props
3930
+ }, ref) => /* @__PURE__ */ React24.createElement(
3931
+ "div",
3932
+ {
3933
+ ref,
3934
+ className: cn(
3935
+ "container flex h-14 items-center",
3936
+ className
3937
+ ),
3938
+ ...props
3939
+ }
3940
+ ));
3941
+ HeaderContainer.displayName = "HeaderContainer";
3942
+ var HeaderNav = React24.forwardRef(({
3943
+ className,
3944
+ ...props
3945
+ }, ref) => /* @__PURE__ */ React24.createElement(
3946
+ "nav",
3947
+ {
3948
+ ref,
3949
+ className: cn("flex items-center space-x-4 lg:space-x-6", className),
3950
+ ...props
3951
+ }
3952
+ ));
3953
+ HeaderNav.displayName = "HeaderNav";
3954
+ var HeaderActions = React24.forwardRef(({
3955
+ className,
3956
+ ...props
3957
+ }, ref) => /* @__PURE__ */ React24.createElement(
3958
+ "div",
3959
+ {
3960
+ ref,
3961
+ className: cn("ml-auto flex items-center space-x-4", className),
3962
+ ...props
3963
+ }
3964
+ ));
3965
+ HeaderActions.displayName = "HeaderActions";
3966
+ var HeaderBrand = React24.forwardRef(({
3967
+ className,
3968
+ ...props
3969
+ }, ref) => /* @__PURE__ */ React24.createElement(
3970
+ "div",
3971
+ {
3972
+ ref,
3973
+ className: cn("mr-4 flex items-center space-x-2", className),
3974
+ ...props
3975
+ }
3976
+ ));
3977
+ HeaderBrand.displayName = "HeaderBrand";
3978
+ var HeaderLink = React24.forwardRef(({
3979
+ className,
3980
+ active = false,
3981
+ ...props
3982
+ }, ref) => /* @__PURE__ */ React24.createElement(
3983
+ "a",
3984
+ {
3985
+ ref,
3986
+ className: cn(
3987
+ "text-sm font-medium transition-colors hover:text-primary",
3988
+ active ? "text-foreground" : "text-muted-foreground",
3989
+ className
3990
+ ),
3991
+ ...props
3992
+ }
3993
+ ));
3994
+ HeaderLink.displayName = "HeaderLink";
3995
+
3996
+ // src/components/UI/input.jsx
3997
+ var React25 = __toESM(require("react"));
3998
+ var Input = React25.forwardRef(({ className, type, ...props }, ref) => {
3999
+ return /* @__PURE__ */ React25.createElement(
4000
+ "input",
4001
+ {
4002
+ type,
4003
+ className: cn(
4004
+ "flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
4005
+ className
4006
+ ),
4007
+ ref,
4008
+ ...props
4009
+ }
4010
+ );
4011
+ });
4012
+ Input.displayName = "Input";
4013
+
4014
+ // src/components/UI/label.jsx
4015
+ var React26 = __toESM(require("react"));
4016
+ var LabelPrimitive = __toESM(require("@radix-ui/react-label"));
4017
+ var import_class_variance_authority4 = require("class-variance-authority");
4018
+ var labelVariants = (0, import_class_variance_authority4.cva)(
4019
+ "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
4020
+ );
4021
+ var Label = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React26.createElement(
4022
+ LabelPrimitive.Root,
4023
+ {
4024
+ ref,
4025
+ className: cn(labelVariants(), className),
4026
+ ...props
4027
+ }
4028
+ ));
4029
+ Label.displayName = LabelPrimitive.Root.displayName;
4030
+
4031
+ // src/components/UI/list.jsx
4032
+ var React27 = __toESM(require("react"));
4033
+ var List2 = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React27.createElement(
4034
+ "ul",
4035
+ {
4036
+ ref,
4037
+ className: cn("space-y-1", className),
4038
+ ...props
4039
+ }
4040
+ ));
4041
+ List2.displayName = "List";
4042
+ var ListItem2 = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React27.createElement(
4043
+ "li",
4044
+ {
4045
+ ref,
4046
+ className: cn(
4047
+ "flex items-center gap-3 rounded-lg px-3 py-2",
4048
+ className
4049
+ ),
4050
+ ...props
4051
+ }
4052
+ ));
4053
+ ListItem2.displayName = "ListItem";
4054
+ var ListItemText2 = React27.forwardRef(({ primary, secondary, className, ...props }, ref) => /* @__PURE__ */ React27.createElement("div", { ref, className: cn("flex flex-col gap-1", className), ...props }, primary && /* @__PURE__ */ React27.createElement("p", { className: "text-sm font-medium leading-none" }, primary), secondary && /* @__PURE__ */ React27.createElement("p", { className: "text-sm text-muted-foreground" }, secondary)));
4055
+ ListItemText2.displayName = "ListItemText";
4056
+ var ListItemIcon2 = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React27.createElement(
4057
+ "div",
4058
+ {
4059
+ ref,
4060
+ className: cn("flex h-5 w-5 shrink-0 items-center justify-center", className),
4061
+ ...props
4062
+ }
4063
+ ));
4064
+ ListItemIcon2.displayName = "ListItemIcon";
4065
+
4066
+ // src/components/UI/popover.jsx
4067
+ var React28 = __toESM(require("react"));
4068
+ var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"));
4069
+ var Popover = PopoverPrimitive.Root;
4070
+ var PopoverTrigger = PopoverPrimitive.Trigger;
4071
+ var PopoverAnchor = PopoverPrimitive.Anchor;
4072
+ var PopoverContent = React28.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React28.createElement(PopoverPrimitive.Portal, null, /* @__PURE__ */ React28.createElement(
4073
+ PopoverPrimitive.Content,
4074
+ {
4075
+ ref,
4076
+ align,
4077
+ sideOffset,
4078
+ className: cn(
4079
+ "z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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",
4080
+ className
4081
+ ),
4082
+ ...props
4083
+ }
4084
+ )));
4085
+ PopoverContent.displayName = PopoverPrimitive.Content.displayName;
4086
+
4087
+ // src/components/UI/progress.jsx
4088
+ var React29 = __toESM(require("react"));
4089
+ var ProgressPrimitive = __toESM(require("@radix-ui/react-progress"));
4090
+ var Progress = React29.forwardRef(({ className, value, ...props }, ref) => /* @__PURE__ */ React29.createElement(
4091
+ ProgressPrimitive.Root,
4092
+ {
4093
+ ref,
4094
+ className: cn(
4095
+ "relative h-4 w-full overflow-hidden rounded-full bg-secondary",
4096
+ className
4097
+ ),
4098
+ ...props
4099
+ },
4100
+ /* @__PURE__ */ React29.createElement(
4101
+ ProgressPrimitive.Indicator,
4102
+ {
4103
+ className: "h-full w-full flex-1 bg-primary transition-all",
4104
+ style: { transform: `translateX(-${100 - (value || 0)}%)` }
4105
+ }
4106
+ )
4107
+ ));
4108
+ Progress.displayName = ProgressPrimitive.Root.displayName;
4109
+
4110
+ // src/components/UI/select.jsx
4111
+ var React30 = __toESM(require("react"));
4112
+ var SelectPrimitive = __toESM(require("@radix-ui/react-select"));
4113
+ var import_lucide_react5 = require("lucide-react");
4114
+ var Select = SelectPrimitive.Root;
4115
+ var SelectGroup = SelectPrimitive.Group;
4116
+ var SelectValue = SelectPrimitive.Value;
4117
+ var SelectTrigger = React30.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React30.createElement(
4118
+ SelectPrimitive.Trigger,
4119
+ {
4120
+ ref,
4121
+ className: cn(
4122
+ "flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
4123
+ className
4124
+ ),
4125
+ ...props
4126
+ },
4127
+ children,
4128
+ /* @__PURE__ */ React30.createElement(SelectPrimitive.Icon, { asChild: true }, /* @__PURE__ */ React30.createElement(import_lucide_react5.ChevronDown, { className: "h-4 w-4 opacity-50" }))
4129
+ ));
4130
+ SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
4131
+ var SelectScrollUpButton = React30.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React30.createElement(
4132
+ SelectPrimitive.ScrollUpButton,
4133
+ {
4134
+ ref,
4135
+ className: cn(
4136
+ "flex cursor-default items-center justify-center py-1",
4137
+ className
4138
+ ),
4139
+ ...props
4140
+ },
4141
+ /* @__PURE__ */ React30.createElement(import_lucide_react5.ChevronUp, { className: "h-4 w-4" })
4142
+ ));
4143
+ SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
4144
+ var SelectScrollDownButton = React30.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React30.createElement(
4145
+ SelectPrimitive.ScrollDownButton,
4146
+ {
4147
+ ref,
4148
+ className: cn(
4149
+ "flex cursor-default items-center justify-center py-1",
4150
+ className
4151
+ ),
4152
+ ...props
4153
+ },
4154
+ /* @__PURE__ */ React30.createElement(import_lucide_react5.ChevronDown, { className: "h-4 w-4" })
4155
+ ));
4156
+ SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
4157
+ var SelectContent = React30.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ React30.createElement(SelectPrimitive.Portal, null, /* @__PURE__ */ React30.createElement(
4158
+ SelectPrimitive.Content,
4159
+ {
4160
+ ref,
4161
+ className: cn(
4162
+ "relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md 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",
4163
+ position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
4164
+ className
4165
+ ),
4166
+ position,
4167
+ ...props
4168
+ },
4169
+ /* @__PURE__ */ React30.createElement(SelectScrollUpButton, null),
4170
+ /* @__PURE__ */ React30.createElement(
4171
+ SelectPrimitive.Viewport,
4172
+ {
4173
+ className: cn(
4174
+ "p-1",
4175
+ position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
4176
+ )
4177
+ },
4178
+ children
4179
+ ),
4180
+ /* @__PURE__ */ React30.createElement(SelectScrollDownButton, null)
4181
+ )));
4182
+ SelectContent.displayName = SelectPrimitive.Content.displayName;
4183
+ var SelectLabel = React30.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React30.createElement(
4184
+ SelectPrimitive.Label,
4185
+ {
4186
+ ref,
4187
+ className: cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className),
4188
+ ...props
4189
+ }
4190
+ ));
4191
+ SelectLabel.displayName = SelectPrimitive.Label.displayName;
4192
+ var SelectItem = React30.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React30.createElement(
4193
+ SelectPrimitive.Item,
4194
+ {
4195
+ ref,
4196
+ className: cn(
4197
+ "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
4198
+ className
4199
+ ),
4200
+ ...props
4201
+ },
4202
+ /* @__PURE__ */ React30.createElement("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center" }, /* @__PURE__ */ React30.createElement(SelectPrimitive.ItemIndicator, null, /* @__PURE__ */ React30.createElement(import_lucide_react5.Check, { className: "h-4 w-4" }))),
4203
+ /* @__PURE__ */ React30.createElement(SelectPrimitive.ItemText, null, children)
4204
+ ));
4205
+ SelectItem.displayName = SelectPrimitive.Item.displayName;
4206
+ var SelectSeparator = React30.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React30.createElement(
4207
+ SelectPrimitive.Separator,
4208
+ {
4209
+ ref,
4210
+ className: cn("-mx-1 my-1 h-px bg-muted", className),
4211
+ ...props
4212
+ }
4213
+ ));
4214
+ SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
4215
+
4216
+ // src/components/UI/separator.jsx
4217
+ var React31 = __toESM(require("react"));
4218
+ var SeparatorPrimitive = __toESM(require("@radix-ui/react-separator"));
4219
+ var Separator2 = React31.forwardRef(
4220
+ ({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ React31.createElement(
4221
+ SeparatorPrimitive.Root,
4222
+ {
4223
+ ref,
4224
+ decorative,
4225
+ orientation,
4226
+ className: cn(
4227
+ "shrink-0 bg-border",
4228
+ orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
4229
+ className
4230
+ ),
4231
+ ...props
4232
+ }
4233
+ )
4234
+ );
4235
+ Separator2.displayName = SeparatorPrimitive.Root.displayName;
4236
+
4237
+ // src/components/UI/sheet.jsx
4238
+ var React32 = __toESM(require("react"));
4239
+ var DialogPrimitive2 = __toESM(require("@radix-ui/react-dialog"));
4240
+ var import_class_variance_authority5 = require("class-variance-authority");
4241
+ var import_lucide_react6 = require("lucide-react");
4242
+ var Sheet = DialogPrimitive2.Root;
4243
+ var SheetTrigger = DialogPrimitive2.Trigger;
4244
+ var SheetClose = DialogPrimitive2.Close;
4245
+ var SheetPortal = DialogPrimitive2.Portal;
4246
+ var SheetOverlay = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React32.createElement(
4247
+ DialogPrimitive2.Overlay,
4248
+ {
4249
+ className: cn(
4250
+ "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
4251
+ className
4252
+ ),
4253
+ ...props,
4254
+ ref
4255
+ }
4256
+ ));
4257
+ SheetOverlay.displayName = DialogPrimitive2.Overlay.displayName;
4258
+ var sheetVariants = (0, import_class_variance_authority5.cva)(
4259
+ "fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
4260
+ {
4261
+ variants: {
4262
+ side: {
4263
+ top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
4264
+ bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
4265
+ left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
4266
+ right: "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"
4267
+ }
4268
+ },
4269
+ defaultVariants: {
4270
+ side: "right"
4271
+ }
4272
+ }
4273
+ );
4274
+ var SheetContent = React32.forwardRef(({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */ React32.createElement(SheetPortal, null, /* @__PURE__ */ React32.createElement(SheetOverlay, null), /* @__PURE__ */ React32.createElement(
4275
+ DialogPrimitive2.Content,
4276
+ {
4277
+ ref,
4278
+ className: cn(sheetVariants({ side }), className),
4279
+ ...props
4280
+ },
4281
+ children,
4282
+ /* @__PURE__ */ React32.createElement(DialogPrimitive2.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary" }, /* @__PURE__ */ React32.createElement(import_lucide_react6.X, { className: "h-4 w-4" }), /* @__PURE__ */ React32.createElement("span", { className: "sr-only" }, "Close"))
4283
+ )));
4284
+ SheetContent.displayName = DialogPrimitive2.Content.displayName;
4285
+ var SheetHeader = ({
4286
+ className,
4287
+ ...props
4288
+ }) => /* @__PURE__ */ React32.createElement(
4289
+ "div",
4290
+ {
4291
+ className: cn(
4292
+ "flex flex-col space-y-2 text-center sm:text-left",
4293
+ className
4294
+ ),
4295
+ ...props
4296
+ }
4297
+ );
4298
+ SheetHeader.displayName = "SheetHeader";
4299
+ var SheetFooter = ({
4300
+ className,
4301
+ ...props
4302
+ }) => /* @__PURE__ */ React32.createElement(
4303
+ "div",
4304
+ {
4305
+ className: cn(
4306
+ "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
4307
+ className
4308
+ ),
4309
+ ...props
4310
+ }
4311
+ );
4312
+ SheetFooter.displayName = "SheetFooter";
4313
+ var SheetTitle = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React32.createElement(
4314
+ DialogPrimitive2.Title,
4315
+ {
4316
+ ref,
4317
+ className: cn("text-lg font-semibold text-foreground", className),
4318
+ ...props
4319
+ }
4320
+ ));
4321
+ SheetTitle.displayName = DialogPrimitive2.Title.displayName;
4322
+ var SheetDescription = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React32.createElement(
4323
+ DialogPrimitive2.Description,
4324
+ {
4325
+ ref,
4326
+ className: cn("text-sm text-muted-foreground", className),
4327
+ ...props
4328
+ }
4329
+ ));
4330
+ SheetDescription.displayName = DialogPrimitive2.Description.displayName;
4331
+
4332
+ // src/components/UI/skeleton.jsx
4333
+ var React33 = __toESM(require("react"));
4334
+ function Skeleton({
4335
+ className,
4336
+ ...props
4337
+ }) {
4338
+ return /* @__PURE__ */ React33.createElement(
4339
+ "div",
4340
+ {
4341
+ className: cn("animate-pulse rounded-md bg-muted", className),
4342
+ ...props
4343
+ }
4344
+ );
4345
+ }
4346
+
4347
+ // src/components/UI/stack.jsx
4348
+ var React34 = __toESM(require("react"));
4349
+ var Stack5 = React34.forwardRef(({
4350
+ className,
4351
+ direction = "vertical",
4352
+ spacing = 4,
4353
+ align = "stretch",
4354
+ justify = "start",
4355
+ wrap = false,
4356
+ ...props
4357
+ }, ref) => {
4358
+ const directionClasses = {
4359
+ vertical: "flex-col",
4360
+ horizontal: "flex-row"
4361
+ };
4362
+ const spacingClasses = {
4363
+ vertical: {
4364
+ 0: "space-y-0",
4365
+ 1: "space-y-1",
4366
+ 2: "space-y-2",
4367
+ 3: "space-y-3",
4368
+ 4: "space-y-4",
4369
+ 5: "space-y-5",
4370
+ 6: "space-y-6",
4371
+ 8: "space-y-8"
4372
+ },
4373
+ horizontal: {
4374
+ 0: "space-x-0",
4375
+ 1: "space-x-1",
4376
+ 2: "space-x-2",
4377
+ 3: "space-x-3",
4378
+ 4: "space-x-4",
4379
+ 5: "space-x-5",
4380
+ 6: "space-x-6",
4381
+ 8: "space-x-8"
4382
+ }
4383
+ };
4384
+ const alignClasses = {
4385
+ start: "items-start",
4386
+ center: "items-center",
4387
+ end: "items-end",
4388
+ stretch: "items-stretch",
4389
+ baseline: "items-baseline"
4390
+ };
4391
+ const justifyClasses = {
4392
+ start: "justify-start",
4393
+ center: "justify-center",
4394
+ end: "justify-end",
4395
+ between: "justify-between",
4396
+ around: "justify-around",
4397
+ evenly: "justify-evenly"
4398
+ };
4399
+ return /* @__PURE__ */ React34.createElement(
4400
+ "div",
4401
+ {
4402
+ ref,
4403
+ className: cn(
4404
+ "flex",
4405
+ directionClasses[direction] || directionClasses.vertical,
4406
+ spacingClasses[direction][spacing] || spacingClasses.vertical[4],
4407
+ alignClasses[align] || alignClasses.stretch,
4408
+ justifyClasses[justify] || justifyClasses.start,
4409
+ wrap && "flex-wrap",
4410
+ className
4411
+ ),
4412
+ ...props
4413
+ }
4414
+ );
4415
+ });
4416
+ Stack5.displayName = "Stack";
4417
+ var HStack = React34.forwardRef(({ ...props }, ref) => /* @__PURE__ */ React34.createElement(Stack5, { ref, direction: "horizontal", ...props }));
4418
+ HStack.displayName = "HStack";
4419
+ var VStack = React34.forwardRef(({ ...props }, ref) => /* @__PURE__ */ React34.createElement(Stack5, { ref, direction: "vertical", ...props }));
4420
+ VStack.displayName = "VStack";
4421
+
4422
+ // src/components/UI/switch.jsx
4423
+ var React35 = __toESM(require("react"));
4424
+ var SwitchPrimitives = __toESM(require("@radix-ui/react-switch"));
4425
+ var Switch = React35.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React35.createElement(
4426
+ SwitchPrimitives.Root,
4427
+ {
4428
+ className: cn(
4429
+ "peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
4430
+ className
4431
+ ),
4432
+ ...props,
4433
+ ref
4434
+ },
4435
+ /* @__PURE__ */ React35.createElement(
4436
+ SwitchPrimitives.Thumb,
4437
+ {
4438
+ className: cn(
4439
+ "pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"
4440
+ )
4441
+ }
4442
+ )
4443
+ ));
4444
+ Switch.displayName = SwitchPrimitives.Root.displayName;
4445
+
4446
+ // src/components/UI/table.jsx
4447
+ var React36 = __toESM(require("react"));
4448
+ var Table = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React36.createElement("div", { className: "relative w-full overflow-auto" }, /* @__PURE__ */ React36.createElement(
4449
+ "table",
4450
+ {
4451
+ ref,
4452
+ className: cn("w-full caption-bottom text-sm", className),
4453
+ ...props
4454
+ }
4455
+ )));
4456
+ Table.displayName = "Table";
4457
+ var TableHeader = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React36.createElement("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
4458
+ TableHeader.displayName = "TableHeader";
4459
+ var TableBody = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React36.createElement(
4460
+ "tbody",
4461
+ {
4462
+ ref,
4463
+ className: cn("[&_tr:last-child]:border-0", className),
4464
+ ...props
4465
+ }
4466
+ ));
4467
+ TableBody.displayName = "TableBody";
4468
+ var TableFooter = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React36.createElement(
4469
+ "tfoot",
4470
+ {
4471
+ ref,
4472
+ className: cn(
4473
+ "border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",
4474
+ className
4475
+ ),
4476
+ ...props
4477
+ }
4478
+ ));
4479
+ TableFooter.displayName = "TableFooter";
4480
+ var TableRow = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React36.createElement(
4481
+ "tr",
4482
+ {
4483
+ ref,
4484
+ className: cn(
4485
+ "border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",
4486
+ className
4487
+ ),
4488
+ ...props
4489
+ }
4490
+ ));
4491
+ TableRow.displayName = "TableRow";
4492
+ var TableHead = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React36.createElement(
4493
+ "th",
4494
+ {
4495
+ ref,
4496
+ className: cn(
4497
+ "h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",
4498
+ className
4499
+ ),
4500
+ ...props
4501
+ }
4502
+ ));
4503
+ TableHead.displayName = "TableHead";
4504
+ var TableCell = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React36.createElement(
4505
+ "td",
4506
+ {
4507
+ ref,
4508
+ className: cn("p-4 align-middle [&:has([role=checkbox])]:pr-0", className),
4509
+ ...props
4510
+ }
4511
+ ));
4512
+ TableCell.displayName = "TableCell";
4513
+ var TableCaption = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React36.createElement(
4514
+ "caption",
4515
+ {
4516
+ ref,
4517
+ className: cn("mt-4 text-sm text-muted-foreground", className),
4518
+ ...props
4519
+ }
4520
+ ));
4521
+ TableCaption.displayName = "TableCaption";
4522
+
4523
+ // src/components/UI/tabs.jsx
4524
+ var React37 = __toESM(require("react"));
4525
+ var TabsPrimitive = __toESM(require("@radix-ui/react-tabs"));
4526
+ var Tabs = TabsPrimitive.Root;
4527
+ var TabsList = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React37.createElement(
4528
+ TabsPrimitive.List,
4529
+ {
4530
+ ref,
4531
+ className: cn(
4532
+ "inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",
4533
+ className
4534
+ ),
4535
+ ...props
4536
+ }
4537
+ ));
4538
+ TabsList.displayName = TabsPrimitive.List.displayName;
4539
+ var TabsTrigger = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React37.createElement(
4540
+ TabsPrimitive.Trigger,
4541
+ {
4542
+ ref,
4543
+ className: cn(
4544
+ "inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",
4545
+ className
4546
+ ),
4547
+ ...props
4548
+ }
4549
+ ));
4550
+ TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
4551
+ var TabsContent = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React37.createElement(
4552
+ TabsPrimitive.Content,
4553
+ {
4554
+ ref,
4555
+ className: cn(
4556
+ "mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
4557
+ className
4558
+ ),
4559
+ ...props
4560
+ }
4561
+ ));
4562
+ TabsContent.displayName = TabsPrimitive.Content.displayName;
4563
+
4564
+ // src/components/UI/textarea.jsx
4565
+ var React38 = __toESM(require("react"));
4566
+ var Textarea = React38.forwardRef(({ className, ...props }, ref) => {
4567
+ return /* @__PURE__ */ React38.createElement(
4568
+ "textarea",
4569
+ {
4570
+ className: cn(
4571
+ "flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
4572
+ className
4573
+ ),
4574
+ ref,
4575
+ ...props
4576
+ }
4577
+ );
4578
+ });
4579
+ Textarea.displayName = "Textarea";
4580
+
4581
+ // src/components/UI/toast.jsx
4582
+ var React39 = __toESM(require("react"));
4583
+ var import_sonner = require("sonner");
4584
+ var Toaster = ({ ...props }) => {
4585
+ return /* @__PURE__ */ React39.createElement(
4586
+ import_sonner.Toaster,
4587
+ {
4588
+ className: "toaster group",
4589
+ toastOptions: {
4590
+ classNames: {
4591
+ toast: "group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",
4592
+ description: "group-[.toast]:text-muted-foreground",
4593
+ actionButton: "group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",
4594
+ cancelButton: "group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"
4595
+ }
4596
+ },
4597
+ ...props
4598
+ }
4599
+ );
4600
+ };
4601
+
4602
+ // src/components/UI/tooltip.jsx
4603
+ var React40 = __toESM(require("react"));
4604
+ var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"));
4605
+ var TooltipProvider = TooltipPrimitive.Provider;
4606
+ var Tooltip = TooltipPrimitive.Root;
4607
+ var TooltipTrigger = TooltipPrimitive.Trigger;
4608
+ var TooltipContent = React40.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React40.createElement(
4609
+ TooltipPrimitive.Content,
4610
+ {
4611
+ ref,
4612
+ sideOffset,
4613
+ className: cn(
4614
+ "z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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",
4615
+ className
4616
+ ),
4617
+ ...props
4618
+ }
4619
+ ));
4620
+ TooltipContent.displayName = TooltipPrimitive.Content.displayName;
4621
+
4622
+ // src/components/UI/typography.jsx
4623
+ var React41 = __toESM(require("react"));
4624
+ var import_class_variance_authority6 = require("class-variance-authority");
4625
+ var headingVariants = (0, import_class_variance_authority6.cva)("scroll-m-20 tracking-tight", {
4626
+ variants: {
4627
+ level: {
4628
+ h1: "text-4xl font-extrabold lg:text-5xl",
4629
+ h2: "text-3xl font-semibold",
4630
+ h3: "text-2xl font-semibold",
4631
+ h4: "text-xl font-semibold",
4632
+ h5: "text-lg font-semibold",
4633
+ h6: "text-base font-semibold"
4634
+ }
4635
+ },
4636
+ defaultVariants: {
4637
+ level: "h2"
4638
+ }
4639
+ });
4640
+ var Heading = React41.forwardRef(({ className, level = "h2", ...props }, ref) => {
4641
+ const Comp = level;
4642
+ return /* @__PURE__ */ React41.createElement(
4643
+ Comp,
4644
+ {
4645
+ ref,
4646
+ className: cn(headingVariants({ level, className })),
4647
+ ...props
4648
+ }
4649
+ );
4650
+ });
4651
+ Heading.displayName = "Heading";
4652
+ var H1 = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React41.createElement(
4653
+ "h1",
4654
+ {
4655
+ ref,
4656
+ className: cn("scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl", className),
4657
+ ...props
4658
+ }
4659
+ ));
4660
+ H1.displayName = "H1";
4661
+ var H2 = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React41.createElement(
4662
+ "h2",
4663
+ {
4664
+ ref,
4665
+ className: cn("scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight first:mt-0", className),
4666
+ ...props
4667
+ }
4668
+ ));
4669
+ H2.displayName = "H2";
4670
+ var H3 = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React41.createElement(
4671
+ "h3",
4672
+ {
4673
+ ref,
4674
+ className: cn("scroll-m-20 text-2xl font-semibold tracking-tight", className),
4675
+ ...props
4676
+ }
4677
+ ));
4678
+ H3.displayName = "H3";
4679
+ var H4 = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React41.createElement(
4680
+ "h4",
4681
+ {
4682
+ ref,
4683
+ className: cn("scroll-m-20 text-xl font-semibold tracking-tight", className),
4684
+ ...props
4685
+ }
4686
+ ));
4687
+ H4.displayName = "H4";
4688
+ var P = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React41.createElement(
4689
+ "p",
4690
+ {
4691
+ ref,
4692
+ className: cn("leading-7 [&:not(:first-child)]:mt-6", className),
4693
+ ...props
4694
+ }
4695
+ ));
4696
+ P.displayName = "P";
4697
+ var Blockquote = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React41.createElement(
4698
+ "blockquote",
4699
+ {
4700
+ ref,
4701
+ className: cn("mt-6 border-l-2 pl-6 italic", className),
4702
+ ...props
4703
+ }
4704
+ ));
4705
+ Blockquote.displayName = "Blockquote";
4706
+ var List4 = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React41.createElement(
4707
+ "ul",
4708
+ {
4709
+ ref,
4710
+ className: cn("my-6 ml-6 list-disc [&>li]:mt-2", className),
4711
+ ...props
4712
+ }
4713
+ ));
4714
+ List4.displayName = "List";
4715
+ var InlineCode = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React41.createElement(
4716
+ "code",
4717
+ {
4718
+ ref,
4719
+ className: cn(
4720
+ "relative rounded bg-muted px-[0.3rem] py-[0.2rem] font-mono text-sm font-semibold",
4721
+ className
4722
+ ),
4723
+ ...props
4724
+ }
4725
+ ));
4726
+ InlineCode.displayName = "InlineCode";
4727
+ var Lead = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React41.createElement(
4728
+ "p",
4729
+ {
4730
+ ref,
4731
+ className: cn("text-xl text-muted-foreground", className),
4732
+ ...props
4733
+ }
4734
+ ));
4735
+ Lead.displayName = "Lead";
4736
+ var Large = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React41.createElement(
4737
+ "div",
4738
+ {
4739
+ ref,
4740
+ className: cn("text-lg font-semibold", className),
4741
+ ...props
4742
+ }
4743
+ ));
4744
+ Large.displayName = "Large";
4745
+ var Small = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React41.createElement(
4746
+ "small",
4747
+ {
4748
+ ref,
4749
+ className: cn("text-sm font-medium leading-none", className),
4750
+ ...props
4751
+ }
4752
+ ));
4753
+ Small.displayName = "Small";
4754
+ var Muted = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React41.createElement(
4755
+ "p",
4756
+ {
4757
+ ref,
4758
+ className: cn("text-sm text-muted-foreground", className),
4759
+ ...props
4760
+ }
4761
+ ));
4762
+ Muted.displayName = "Muted";
4763
+
3236
4764
  // src/components/Notifications/NotificationManager.js
3237
4765
  var import_react12 = __toESM(require("react"));
3238
4766
  var import_material8 = require("@mui/material");
@@ -3466,7 +4994,7 @@ var NotificationBell = ({ api: api2, useSocket: useSocket2, useAuth: useAuth2 })
3466
4994
  };
3467
4995
  const handleNotificationRead = (notificationId) => {
3468
4996
  setNotifications(
3469
- (prev) => prev.map((n) => n._id === notificationId ? { ...n, read: true } : n)
4997
+ (prev) => prev.map((n) => (n.id || n._id) === notificationId ? { ...n, is_read: true, read: true } : n)
3470
4998
  );
3471
4999
  setUnreadCount((prev) => Math.max(0, prev - 1));
3472
5000
  };
@@ -3491,7 +5019,7 @@ var NotificationBell = ({ api: api2, useSocket: useSocket2, useAuth: useAuth2 })
3491
5019
  try {
3492
5020
  await api2.put(`/notifications/${notificationId}/read`);
3493
5021
  setNotifications(
3494
- (prev) => prev.map((n) => n._id === notificationId ? { ...n, read: true, readAt: /* @__PURE__ */ new Date() } : n)
5022
+ (prev) => prev.map((n) => (n.id || n._id) === notificationId ? { ...n, is_read: true, read: true, read_at: /* @__PURE__ */ new Date(), readAt: /* @__PURE__ */ new Date() } : n)
3495
5023
  );
3496
5024
  setUnreadCount((prev) => Math.max(0, prev - 1));
3497
5025
  } catch (err) {
@@ -3503,7 +5031,7 @@ var NotificationBell = ({ api: api2, useSocket: useSocket2, useAuth: useAuth2 })
3503
5031
  try {
3504
5032
  await api2.put("/notifications/mark-all-read");
3505
5033
  setNotifications(
3506
- (prev) => prev.map((n) => ({ ...n, read: true, readAt: /* @__PURE__ */ new Date() }))
5034
+ (prev) => prev.map((n) => ({ ...n, is_read: true, read: true, read_at: /* @__PURE__ */ new Date(), readAt: /* @__PURE__ */ new Date() }))
3507
5035
  );
3508
5036
  setUnreadCount(0);
3509
5037
  } catch (err) {
@@ -3511,11 +5039,14 @@ var NotificationBell = ({ api: api2, useSocket: useSocket2, useAuth: useAuth2 })
3511
5039
  }
3512
5040
  };
3513
5041
  const handleNotificationClick = async (notification) => {
3514
- if (!notification.read) {
3515
- await handleMarkAsRead(notification._id);
5042
+ const isRead = notification.is_read || notification.read;
5043
+ const notifId = notification.id || notification._id;
5044
+ if (!isRead) {
5045
+ await handleMarkAsRead(notifId);
3516
5046
  }
3517
- if (notification.actionUrl) {
3518
- window.location.href = notification.actionUrl;
5047
+ const actionUrl = notification.action_url || notification.actionUrl;
5048
+ if (actionUrl) {
5049
+ window.location.href = actionUrl;
3519
5050
  }
3520
5051
  handleClose();
3521
5052
  };
@@ -3678,66 +5209,71 @@ var NotificationBell = ({ api: api2, useSocket: useSocket2, useAuth: useAuth2 })
3678
5209
  /* @__PURE__ */ import_react13.default.createElement(import_icons_material3.NotificationsNone, { sx: { fontSize: 64, color: "text.secondary", mb: 2 } }),
3679
5210
  /* @__PURE__ */ import_react13.default.createElement(import_material9.Typography, { variant: "body1", color: "text.secondary", sx: { fontWeight: 500 } }, "No notifications yet"),
3680
5211
  /* @__PURE__ */ import_react13.default.createElement(import_material9.Typography, { variant: "body2", color: "text.secondary" }, "You're all caught up!")
3681
- ) : /* @__PURE__ */ import_react13.default.createElement(import_material9.List, { sx: { p: 0 } }, notifications.map((notification, index) => /* @__PURE__ */ import_react13.default.createElement(import_react13.default.Fragment, { key: notification._id }, /* @__PURE__ */ import_react13.default.createElement(
3682
- import_material9.ListItem,
3683
- {
3684
- button: true,
3685
- onClick: () => handleNotificationClick(notification),
3686
- sx: {
3687
- py: 1.5,
3688
- px: 2,
3689
- bgcolor: notification.read ? "transparent" : "action.hover",
3690
- "&:hover": {
3691
- bgcolor: notification.read ? "action.hover" : "action.selected"
3692
- },
3693
- borderLeft: notification.read ? "none" : "3px solid",
3694
- borderLeftColor: getNotificationColor(notification.type),
3695
- transition: "all 0.2s"
3696
- }
3697
- },
3698
- /* @__PURE__ */ import_react13.default.createElement(import_material9.ListItemAvatar, null, /* @__PURE__ */ import_react13.default.createElement(
3699
- import_material9.Avatar,
5212
+ ) : /* @__PURE__ */ import_react13.default.createElement(import_material9.List, { sx: { p: 0 } }, notifications.map((notification, index) => {
5213
+ const isRead = notification.is_read || notification.read;
5214
+ const notifId = notification.id || notification._id;
5215
+ const createdAt = notification.created_at || notification.createdAt;
5216
+ return /* @__PURE__ */ import_react13.default.createElement(import_react13.default.Fragment, { key: notifId }, /* @__PURE__ */ import_react13.default.createElement(
5217
+ import_material9.ListItem,
3700
5218
  {
5219
+ button: true,
5220
+ onClick: () => handleNotificationClick(notification),
3701
5221
  sx: {
3702
- bgcolor: notification.read ? "grey.300" : getNotificationColor(notification.type),
3703
- width: 40,
3704
- height: 40
5222
+ py: 1.5,
5223
+ px: 2,
5224
+ bgcolor: isRead ? "transparent" : "action.hover",
5225
+ "&:hover": {
5226
+ bgcolor: isRead ? "action.hover" : "action.selected"
5227
+ },
5228
+ borderLeft: isRead ? "none" : "3px solid",
5229
+ borderLeftColor: getNotificationColor(notification.type),
5230
+ transition: "all 0.2s"
3705
5231
  }
3706
5232
  },
3707
- getNotificationIcon(notification.type)
3708
- )),
3709
- /* @__PURE__ */ import_react13.default.createElement(
3710
- import_material9.ListItemText,
3711
- {
3712
- primary: /* @__PURE__ */ import_react13.default.createElement(import_material9.Box, { sx: { display: "flex", alignItems: "center", mb: 0.5 } }, /* @__PURE__ */ import_react13.default.createElement(
3713
- import_material9.Typography,
3714
- {
3715
- variant: "body2",
3716
- sx: {
3717
- fontWeight: notification.read ? 400 : 600,
3718
- flex: 1
3719
- }
3720
- },
3721
- notification.title
3722
- ), getPriorityChip(notification.priority)),
3723
- secondary: /* @__PURE__ */ import_react13.default.createElement(import_react13.default.Fragment, null, /* @__PURE__ */ import_react13.default.createElement(
3724
- import_material9.Typography,
3725
- {
3726
- variant: "body2",
3727
- color: "text.secondary",
3728
- sx: {
3729
- display: "-webkit-box",
3730
- WebkitLineClamp: 2,
3731
- WebkitBoxOrient: "vertical",
3732
- overflow: "hidden",
3733
- mb: 0.5
3734
- }
3735
- },
3736
- notification.message
3737
- ), /* @__PURE__ */ import_react13.default.createElement(import_material9.Typography, { variant: "caption", color: "text.secondary" }, (0, import_date_fns2.formatDistanceToNow)(new Date(notification.createdAt), { addSuffix: true })))
3738
- }
3739
- )
3740
- ), index < notifications.length - 1 && /* @__PURE__ */ import_react13.default.createElement(import_material9.Divider, null)))),
5233
+ /* @__PURE__ */ import_react13.default.createElement(import_material9.ListItemAvatar, null, /* @__PURE__ */ import_react13.default.createElement(
5234
+ import_material9.Avatar,
5235
+ {
5236
+ sx: {
5237
+ bgcolor: isRead ? "grey.300" : getNotificationColor(notification.type),
5238
+ width: 40,
5239
+ height: 40
5240
+ }
5241
+ },
5242
+ getNotificationIcon(notification.type)
5243
+ )),
5244
+ /* @__PURE__ */ import_react13.default.createElement(
5245
+ import_material9.ListItemText,
5246
+ {
5247
+ primary: /* @__PURE__ */ import_react13.default.createElement(import_material9.Box, { sx: { display: "flex", alignItems: "center", mb: 0.5 } }, /* @__PURE__ */ import_react13.default.createElement(
5248
+ import_material9.Typography,
5249
+ {
5250
+ variant: "body2",
5251
+ sx: {
5252
+ fontWeight: isRead ? 400 : 600,
5253
+ flex: 1
5254
+ }
5255
+ },
5256
+ notification.title
5257
+ ), getPriorityChip(notification.priority)),
5258
+ secondary: /* @__PURE__ */ import_react13.default.createElement(import_react13.default.Fragment, null, /* @__PURE__ */ import_react13.default.createElement(
5259
+ import_material9.Typography,
5260
+ {
5261
+ variant: "body2",
5262
+ color: "text.secondary",
5263
+ sx: {
5264
+ display: "-webkit-box",
5265
+ WebkitLineClamp: 2,
5266
+ WebkitBoxOrient: "vertical",
5267
+ overflow: "hidden",
5268
+ mb: 0.5
5269
+ }
5270
+ },
5271
+ notification.message
5272
+ ), /* @__PURE__ */ import_react13.default.createElement(import_material9.Typography, { variant: "caption", color: "text.secondary" }, (0, import_date_fns2.formatDistanceToNow)(new Date(createdAt), { addSuffix: true })))
5273
+ }
5274
+ )
5275
+ ), index < notifications.length - 1 && /* @__PURE__ */ import_react13.default.createElement(import_material9.Divider, null));
5276
+ })),
3741
5277
  hasMore && notifications.length > 0 && /* @__PURE__ */ import_react13.default.createElement(import_material9.Box, { sx: { p: 2, textAlign: "center", borderTop: "1px solid", borderColor: "divider" } }, /* @__PURE__ */ import_react13.default.createElement(
3742
5278
  import_material9.Button,
3743
5279
  {
@@ -3891,7 +5427,7 @@ var SocketProvider = ({ children }) => {
3891
5427
  if (user || tenantToken) {
3892
5428
  const userType = user ? "property_manager" : "tenant";
3893
5429
  const authToken = user ? localStorage.getItem("token") : tenantToken;
3894
- const socketUrl = process.env.REACT_APP_API_URL ? process.env.REACT_APP_API_URL.replace("/api", "") : "http://localhost:5000";
5430
+ const socketUrl = process.env.REACT_APP_API_URL ? process.env.REACT_APP_API_URL.replace("/api", "") : `${window.location.protocol}//${window.location.hostname}:5000`;
3895
5431
  const newSocket = (0, import_socket.io)(socketUrl, {
3896
5432
  auth: {
3897
5433
  token: authToken,
@@ -5383,12 +6919,70 @@ var isTenantAuthenticated = () => {
5383
6919
  };
5384
6920
  // Annotate the CommonJS export names for ESM import in node:
5385
6921
  0 && (module.exports = {
6922
+ Accordion,
6923
+ AccordionContent,
6924
+ AccordionItem,
6925
+ AccordionTrigger,
6926
+ Alert,
6927
+ AlertDescription,
6928
+ AlertTitle,
5386
6929
  AuthLayout,
5387
6930
  AuthProvider,
6931
+ Avatar,
6932
+ AvatarFallback,
6933
+ AvatarImage,
6934
+ Badge,
6935
+ Blockquote,
6936
+ BreadcrumbItem,
6937
+ BreadcrumbLink,
6938
+ Breadcrumbs,
6939
+ Button,
6940
+ Card,
6941
+ CardContent,
6942
+ CardDescription,
6943
+ CardFooter,
6944
+ CardHeader,
6945
+ CardTitle,
6946
+ Checkbox,
6947
+ Container,
5388
6948
  CustomThemeProvider,
6949
+ Dialog,
6950
+ DialogClose,
6951
+ DialogContent,
6952
+ DialogDescription,
6953
+ DialogFooter,
6954
+ DialogHeader,
6955
+ DialogOverlay,
6956
+ DialogPortal,
6957
+ DialogTitle,
6958
+ DialogTrigger,
5389
6959
  ErrorBoundary,
6960
+ Grid,
6961
+ GridItem,
6962
+ H1,
6963
+ H2,
6964
+ H3,
6965
+ H4,
6966
+ HStack,
6967
+ Header,
6968
+ HeaderActions,
6969
+ HeaderBrand,
6970
+ HeaderContainer,
6971
+ HeaderLink,
6972
+ HeaderNav,
6973
+ Heading,
6974
+ InlineCode,
6975
+ Input,
6976
+ Label,
6977
+ Large,
6978
+ Lead,
6979
+ List,
6980
+ ListItem,
6981
+ ListItemIcon,
6982
+ ListItemText,
5390
6983
  LoadingSpinner,
5391
6984
  ModernCard,
6985
+ Muted,
5392
6986
  NOTIFICATION_CHANNELS,
5393
6987
  NOTIFICATION_TYPES,
5394
6988
  Navbar,
@@ -5396,13 +6990,66 @@ var isTenantAuthenticated = () => {
5396
6990
  NotificationManager,
5397
6991
  NotificationPatterns,
5398
6992
  NotificationProvider,
6993
+ P,
5399
6994
  PageHeader,
5400
6995
  PageLayout,
6996
+ Popover,
6997
+ PopoverAnchor,
6998
+ PopoverContent,
6999
+ PopoverTrigger,
7000
+ Progress,
7001
+ Select,
7002
+ SelectContent,
7003
+ SelectGroup,
7004
+ SelectItem,
7005
+ SelectLabel,
7006
+ SelectScrollDownButton,
7007
+ SelectScrollUpButton,
7008
+ SelectSeparator,
7009
+ SelectTrigger,
7010
+ SelectValue,
7011
+ Separator,
7012
+ Sheet,
7013
+ SheetClose,
7014
+ SheetContent,
7015
+ SheetDescription,
7016
+ SheetFooter,
7017
+ SheetHeader,
7018
+ SheetOverlay,
7019
+ SheetPortal,
7020
+ SheetTitle,
7021
+ SheetTrigger,
7022
+ Skeleton,
7023
+ Small,
5401
7024
  SocketProvider,
7025
+ Stack,
7026
+ Switch,
7027
+ Table,
7028
+ TableBody,
7029
+ TableCaption,
7030
+ TableCell,
7031
+ TableFooter,
7032
+ TableHead,
7033
+ TableHeader,
7034
+ TableRow,
7035
+ Tabs,
7036
+ TabsContent,
7037
+ TabsList,
7038
+ TabsTrigger,
5402
7039
  TenantLayout,
5403
7040
  TenantThemeProvider,
7041
+ Textarea,
7042
+ Toaster,
7043
+ Tooltip,
7044
+ TooltipContent,
7045
+ TooltipProvider,
7046
+ TooltipTrigger,
7047
+ VStack,
5404
7048
  api,
5405
7049
  auditNotifications,
7050
+ badgeVariants,
7051
+ buttonVariants,
7052
+ cn,
5406
7053
  createContrastEnhancedComponents,
5407
7054
  createNotificationAwareAPI,
5408
7055
  darkenColor,