@crmy/web 0.5.1 → 0.5.6

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 (121) hide show
  1. package/dist/assets/index-CskfWp8E.js +560 -0
  2. package/dist/assets/index-D763l57m.css +1 -0
  3. package/{index.html → dist/index.html} +2 -1
  4. package/package.json +4 -1
  5. package/postcss.config.js +0 -6
  6. package/src/App.tsx +0 -158
  7. package/src/api/client.ts +0 -82
  8. package/src/api/hooks.ts +0 -689
  9. package/src/components/CustomFields.tsx +0 -240
  10. package/src/components/NavLink.tsx +0 -28
  11. package/src/components/crm/AIFab.tsx +0 -37
  12. package/src/components/crm/AccountDrawer.tsx +0 -372
  13. package/src/components/crm/ActivityTimeline.tsx +0 -115
  14. package/src/components/crm/AssignmentDrawer.tsx +0 -396
  15. package/src/components/crm/BriefingPanel.tsx +0 -217
  16. package/src/components/crm/CommandPalette.tsx +0 -254
  17. package/src/components/crm/ContactAvatar.tsx +0 -49
  18. package/src/components/crm/ContactDrawer.tsx +0 -438
  19. package/src/components/crm/ContextPanel.tsx +0 -200
  20. package/src/components/crm/CrmWidgets.tsx +0 -417
  21. package/src/components/crm/DrawerShell.tsx +0 -77
  22. package/src/components/crm/ListToolbar.tsx +0 -252
  23. package/src/components/crm/OpportunityDrawer.tsx +0 -372
  24. package/src/components/crm/PaginationBar.tsx +0 -111
  25. package/src/components/crm/QuickAddDrawer.tsx +0 -652
  26. package/src/components/crm/ShortcutsOverlay.tsx +0 -65
  27. package/src/components/crm/UseCaseDrawer.tsx +0 -454
  28. package/src/components/layout/MobileNav.tsx +0 -49
  29. package/src/components/layout/Sidebar.tsx +0 -157
  30. package/src/components/layout/TopBar.tsx +0 -54
  31. package/src/components/settings/ActorsSettings.tsx +0 -1190
  32. package/src/components/ui/accordion.tsx +0 -52
  33. package/src/components/ui/alert-dialog.tsx +0 -104
  34. package/src/components/ui/alert.tsx +0 -43
  35. package/src/components/ui/aspect-ratio.tsx +0 -5
  36. package/src/components/ui/avatar.tsx +0 -38
  37. package/src/components/ui/badge.tsx +0 -29
  38. package/src/components/ui/breadcrumb.tsx +0 -90
  39. package/src/components/ui/button.tsx +0 -47
  40. package/src/components/ui/calendar.tsx +0 -54
  41. package/src/components/ui/card.tsx +0 -43
  42. package/src/components/ui/carousel.tsx +0 -224
  43. package/src/components/ui/chart.tsx +0 -303
  44. package/src/components/ui/checkbox.tsx +0 -26
  45. package/src/components/ui/collapsible.tsx +0 -9
  46. package/src/components/ui/command.tsx +0 -132
  47. package/src/components/ui/context-menu.tsx +0 -178
  48. package/src/components/ui/date-picker.tsx +0 -313
  49. package/src/components/ui/dialog.tsx +0 -95
  50. package/src/components/ui/drawer.tsx +0 -87
  51. package/src/components/ui/dropdown-menu.tsx +0 -179
  52. package/src/components/ui/form.tsx +0 -129
  53. package/src/components/ui/hover-card.tsx +0 -27
  54. package/src/components/ui/input-otp.tsx +0 -61
  55. package/src/components/ui/input.tsx +0 -22
  56. package/src/components/ui/label.tsx +0 -17
  57. package/src/components/ui/menubar.tsx +0 -207
  58. package/src/components/ui/navigation-menu.tsx +0 -120
  59. package/src/components/ui/pagination.tsx +0 -81
  60. package/src/components/ui/popover.tsx +0 -29
  61. package/src/components/ui/progress.tsx +0 -23
  62. package/src/components/ui/radio-group.tsx +0 -36
  63. package/src/components/ui/resizable.tsx +0 -37
  64. package/src/components/ui/scroll-area.tsx +0 -38
  65. package/src/components/ui/select.tsx +0 -143
  66. package/src/components/ui/separator.tsx +0 -20
  67. package/src/components/ui/sheet.tsx +0 -107
  68. package/src/components/ui/sidebar.tsx +0 -637
  69. package/src/components/ui/skeleton.tsx +0 -7
  70. package/src/components/ui/slider.tsx +0 -23
  71. package/src/components/ui/sonner.tsx +0 -24
  72. package/src/components/ui/switch.tsx +0 -27
  73. package/src/components/ui/table.tsx +0 -72
  74. package/src/components/ui/tabs.tsx +0 -53
  75. package/src/components/ui/textarea.tsx +0 -21
  76. package/src/components/ui/toast.tsx +0 -111
  77. package/src/components/ui/toaster.tsx +0 -24
  78. package/src/components/ui/toggle-group.tsx +0 -49
  79. package/src/components/ui/toggle.tsx +0 -37
  80. package/src/components/ui/tooltip.tsx +0 -28
  81. package/src/components/ui/use-toast.ts +0 -1
  82. package/src/components/ui/utils.ts +0 -9
  83. package/src/contexts/AgentSettingsContext.tsx +0 -24
  84. package/src/hooks/use-mobile.tsx +0 -19
  85. package/src/hooks/use-toast.ts +0 -186
  86. package/src/hooks/useKeyboardShortcuts.ts +0 -95
  87. package/src/hooks/useTheme.ts +0 -24
  88. package/src/index.css +0 -245
  89. package/src/lib/entityColors.ts +0 -18
  90. package/src/lib/stageConfig.ts +0 -32
  91. package/src/lib/utils.ts +0 -6
  92. package/src/main.tsx +0 -25
  93. package/src/pages/Accounts.tsx +0 -205
  94. package/src/pages/Activities.tsx +0 -251
  95. package/src/pages/Agent.tsx +0 -237
  96. package/src/pages/AgentSettings.tsx +0 -544
  97. package/src/pages/Assignments.tsx +0 -750
  98. package/src/pages/Contacts.tsx +0 -200
  99. package/src/pages/Dashboard.tsx +0 -143
  100. package/src/pages/Inbox.tsx +0 -615
  101. package/src/pages/NotFound.tsx +0 -24
  102. package/src/pages/Opportunities.tsx +0 -386
  103. package/src/pages/SearchResults.tsx +0 -49
  104. package/src/pages/Settings.tsx +0 -1884
  105. package/src/pages/UseCases.tsx +0 -396
  106. package/src/pages/auth/Login.tsx +0 -261
  107. package/src/pages/hitl/HITL.tsx +0 -101
  108. package/src/store/appStore.ts +0 -103
  109. package/src/vite-env.d.ts +0 -14
  110. package/tailwind.config.js +0 -121
  111. package/tsconfig.json +0 -24
  112. package/vite.config.ts +0 -27
  113. /package/{public → dist}/android-chrome-192x192.png +0 -0
  114. /package/{public → dist}/android-chrome-512x512.png +0 -0
  115. /package/{public → dist}/apple-touch-icon.png +0 -0
  116. /package/{src/assets/crmy-logo.png → dist/assets/crmy-logo-DWN0xBPW.png} +0 -0
  117. /package/{public → dist}/favicon-16x16.png +0 -0
  118. /package/{public → dist}/favicon-32x32.png +0 -0
  119. /package/{public → dist}/favicon.ico +0 -0
  120. /package/{public → dist}/favicon.svg +0 -0
  121. /package/{public → dist}/site.webmanifest +0 -0
@@ -1,120 +0,0 @@
1
- import * as React from "react";
2
- import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
3
- import { cva } from "class-variance-authority";
4
- import { ChevronDown } from "lucide-react";
5
-
6
- import { cn } from "@/lib/utils";
7
-
8
- const NavigationMenu = React.forwardRef<
9
- React.ElementRef<typeof NavigationMenuPrimitive.Root>,
10
- React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Root>
11
- >(({ className, children, ...props }, ref) => (
12
- <NavigationMenuPrimitive.Root
13
- ref={ref}
14
- className={cn("relative z-10 flex max-w-max flex-1 items-center justify-center", className)}
15
- {...props}
16
- >
17
- {children}
18
- <NavigationMenuViewport />
19
- </NavigationMenuPrimitive.Root>
20
- ));
21
- NavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName;
22
-
23
- const NavigationMenuList = React.forwardRef<
24
- React.ElementRef<typeof NavigationMenuPrimitive.List>,
25
- React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.List>
26
- >(({ className, ...props }, ref) => (
27
- <NavigationMenuPrimitive.List
28
- ref={ref}
29
- className={cn("group flex flex-1 list-none items-center justify-center space-x-1", className)}
30
- {...props}
31
- />
32
- ));
33
- NavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName;
34
-
35
- const NavigationMenuItem = NavigationMenuPrimitive.Item;
36
-
37
- const navigationMenuTriggerStyle = cva(
38
- "group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50",
39
- );
40
-
41
- const NavigationMenuTrigger = React.forwardRef<
42
- React.ElementRef<typeof NavigationMenuPrimitive.Trigger>,
43
- React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Trigger>
44
- >(({ className, children, ...props }, ref) => (
45
- <NavigationMenuPrimitive.Trigger
46
- ref={ref}
47
- className={cn(navigationMenuTriggerStyle(), "group", className)}
48
- {...props}
49
- >
50
- {children}{" "}
51
- <ChevronDown
52
- className="relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180"
53
- aria-hidden="true"
54
- />
55
- </NavigationMenuPrimitive.Trigger>
56
- ));
57
- NavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName;
58
-
59
- const NavigationMenuContent = React.forwardRef<
60
- React.ElementRef<typeof NavigationMenuPrimitive.Content>,
61
- React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Content>
62
- >(({ className, ...props }, ref) => (
63
- <NavigationMenuPrimitive.Content
64
- ref={ref}
65
- className={cn(
66
- "left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto",
67
- className,
68
- )}
69
- {...props}
70
- />
71
- ));
72
- NavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName;
73
-
74
- const NavigationMenuLink = NavigationMenuPrimitive.Link;
75
-
76
- const NavigationMenuViewport = React.forwardRef<
77
- React.ElementRef<typeof NavigationMenuPrimitive.Viewport>,
78
- React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Viewport>
79
- >(({ className, ...props }, ref) => (
80
- <div className={cn("absolute left-0 top-full flex justify-center")}>
81
- <NavigationMenuPrimitive.Viewport
82
- className={cn(
83
- "origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]",
84
- className,
85
- )}
86
- ref={ref}
87
- {...props}
88
- />
89
- </div>
90
- ));
91
- NavigationMenuViewport.displayName = NavigationMenuPrimitive.Viewport.displayName;
92
-
93
- const NavigationMenuIndicator = React.forwardRef<
94
- React.ElementRef<typeof NavigationMenuPrimitive.Indicator>,
95
- React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Indicator>
96
- >(({ className, ...props }, ref) => (
97
- <NavigationMenuPrimitive.Indicator
98
- ref={ref}
99
- className={cn(
100
- "top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in",
101
- className,
102
- )}
103
- {...props}
104
- >
105
- <div className="relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" />
106
- </NavigationMenuPrimitive.Indicator>
107
- ));
108
- NavigationMenuIndicator.displayName = NavigationMenuPrimitive.Indicator.displayName;
109
-
110
- export {
111
- navigationMenuTriggerStyle,
112
- NavigationMenu,
113
- NavigationMenuList,
114
- NavigationMenuItem,
115
- NavigationMenuContent,
116
- NavigationMenuTrigger,
117
- NavigationMenuLink,
118
- NavigationMenuIndicator,
119
- NavigationMenuViewport,
120
- };
@@ -1,81 +0,0 @@
1
- import * as React from "react";
2
- import { ChevronLeft, ChevronRight, MoreHorizontal } from "lucide-react";
3
-
4
- import { cn } from "@/lib/utils";
5
- import { ButtonProps, buttonVariants } from "@/components/ui/button";
6
-
7
- const Pagination = ({ className, ...props }: React.ComponentProps<"nav">) => (
8
- <nav
9
- role="navigation"
10
- aria-label="pagination"
11
- className={cn("mx-auto flex w-full justify-center", className)}
12
- {...props}
13
- />
14
- );
15
- Pagination.displayName = "Pagination";
16
-
17
- const PaginationContent = React.forwardRef<HTMLUListElement, React.ComponentProps<"ul">>(
18
- ({ className, ...props }, ref) => (
19
- <ul ref={ref} className={cn("flex flex-row items-center gap-1", className)} {...props} />
20
- ),
21
- );
22
- PaginationContent.displayName = "PaginationContent";
23
-
24
- const PaginationItem = React.forwardRef<HTMLLIElement, React.ComponentProps<"li">>(({ className, ...props }, ref) => (
25
- <li ref={ref} className={cn("", className)} {...props} />
26
- ));
27
- PaginationItem.displayName = "PaginationItem";
28
-
29
- type PaginationLinkProps = {
30
- isActive?: boolean;
31
- } & Pick<ButtonProps, "size"> &
32
- React.ComponentProps<"a">;
33
-
34
- const PaginationLink = ({ className, isActive, size = "icon", ...props }: PaginationLinkProps) => (
35
- <a
36
- aria-current={isActive ? "page" : undefined}
37
- className={cn(
38
- buttonVariants({
39
- variant: isActive ? "outline" : "ghost",
40
- size,
41
- }),
42
- className,
43
- )}
44
- {...props}
45
- />
46
- );
47
- PaginationLink.displayName = "PaginationLink";
48
-
49
- const PaginationPrevious = ({ className, ...props }: React.ComponentProps<typeof PaginationLink>) => (
50
- <PaginationLink aria-label="Go to previous page" size="default" className={cn("gap-1 pl-2.5", className)} {...props}>
51
- <ChevronLeft className="h-4 w-4" />
52
- <span>Previous</span>
53
- </PaginationLink>
54
- );
55
- PaginationPrevious.displayName = "PaginationPrevious";
56
-
57
- const PaginationNext = ({ className, ...props }: React.ComponentProps<typeof PaginationLink>) => (
58
- <PaginationLink aria-label="Go to next page" size="default" className={cn("gap-1 pr-2.5", className)} {...props}>
59
- <span>Next</span>
60
- <ChevronRight className="h-4 w-4" />
61
- </PaginationLink>
62
- );
63
- PaginationNext.displayName = "PaginationNext";
64
-
65
- const PaginationEllipsis = ({ className, ...props }: React.ComponentProps<"span">) => (
66
- <span aria-hidden className={cn("flex h-9 w-9 items-center justify-center", className)} {...props}>
67
- <MoreHorizontal className="h-4 w-4" />
68
- <span className="sr-only">More pages</span>
69
- </span>
70
- );
71
- PaginationEllipsis.displayName = "PaginationEllipsis";
72
-
73
- export {
74
- Pagination,
75
- PaginationContent,
76
- PaginationEllipsis,
77
- PaginationItem,
78
- PaginationLink,
79
- PaginationNext,
80
- PaginationPrevious,
81
- };
@@ -1,29 +0,0 @@
1
- import * as React from "react";
2
- import * as PopoverPrimitive from "@radix-ui/react-popover";
3
-
4
- import { cn } from "@/lib/utils";
5
-
6
- const Popover = PopoverPrimitive.Root;
7
-
8
- const PopoverTrigger = PopoverPrimitive.Trigger;
9
-
10
- const PopoverContent = React.forwardRef<
11
- React.ElementRef<typeof PopoverPrimitive.Content>,
12
- React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>
13
- >(({ className, align = "center", sideOffset = 4, ...props }, ref) => (
14
- <PopoverPrimitive.Portal>
15
- <PopoverPrimitive.Content
16
- ref={ref}
17
- align={align}
18
- sideOffset={sideOffset}
19
- className={cn(
20
- "z-[200] 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",
21
- className,
22
- )}
23
- {...props}
24
- />
25
- </PopoverPrimitive.Portal>
26
- ));
27
- PopoverContent.displayName = PopoverPrimitive.Content.displayName;
28
-
29
- export { Popover, PopoverTrigger, PopoverContent };
@@ -1,23 +0,0 @@
1
- import * as React from "react";
2
- import * as ProgressPrimitive from "@radix-ui/react-progress";
3
-
4
- import { cn } from "@/lib/utils";
5
-
6
- const Progress = React.forwardRef<
7
- React.ElementRef<typeof ProgressPrimitive.Root>,
8
- React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root>
9
- >(({ className, value, ...props }, ref) => (
10
- <ProgressPrimitive.Root
11
- ref={ref}
12
- className={cn("relative h-4 w-full overflow-hidden rounded-full bg-secondary", className)}
13
- {...props}
14
- >
15
- <ProgressPrimitive.Indicator
16
- className="h-full w-full flex-1 bg-primary transition-all"
17
- style={{ transform: `translateX(-${100 - (value || 0)}%)` }}
18
- />
19
- </ProgressPrimitive.Root>
20
- ));
21
- Progress.displayName = ProgressPrimitive.Root.displayName;
22
-
23
- export { Progress };
@@ -1,36 +0,0 @@
1
- import * as React from "react";
2
- import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
3
- import { Circle } from "lucide-react";
4
-
5
- import { cn } from "@/lib/utils";
6
-
7
- const RadioGroup = React.forwardRef<
8
- React.ElementRef<typeof RadioGroupPrimitive.Root>,
9
- React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>
10
- >(({ className, ...props }, ref) => {
11
- return <RadioGroupPrimitive.Root className={cn("grid gap-2", className)} {...props} ref={ref} />;
12
- });
13
- RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
14
-
15
- const RadioGroupItem = React.forwardRef<
16
- React.ElementRef<typeof RadioGroupPrimitive.Item>,
17
- React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>
18
- >(({ className, ...props }, ref) => {
19
- return (
20
- <RadioGroupPrimitive.Item
21
- ref={ref}
22
- className={cn(
23
- "aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
24
- className,
25
- )}
26
- {...props}
27
- >
28
- <RadioGroupPrimitive.Indicator className="flex items-center justify-center">
29
- <Circle className="h-2.5 w-2.5 fill-current text-current" />
30
- </RadioGroupPrimitive.Indicator>
31
- </RadioGroupPrimitive.Item>
32
- );
33
- });
34
- RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
35
-
36
- export { RadioGroup, RadioGroupItem };
@@ -1,37 +0,0 @@
1
- import { GripVertical } from "lucide-react";
2
- import * as ResizablePrimitive from "react-resizable-panels";
3
-
4
- import { cn } from "@/lib/utils";
5
-
6
- const ResizablePanelGroup = ({ className, ...props }: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) => (
7
- <ResizablePrimitive.PanelGroup
8
- className={cn("flex h-full w-full data-[panel-group-direction=vertical]:flex-col", className)}
9
- {...props}
10
- />
11
- );
12
-
13
- const ResizablePanel = ResizablePrimitive.Panel;
14
-
15
- const ResizableHandle = ({
16
- withHandle,
17
- className,
18
- ...props
19
- }: React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {
20
- withHandle?: boolean;
21
- }) => (
22
- <ResizablePrimitive.PanelResizeHandle
23
- className={cn(
24
- "relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 [&[data-panel-group-direction=vertical]>div]:rotate-90",
25
- className,
26
- )}
27
- {...props}
28
- >
29
- {withHandle && (
30
- <div className="z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border">
31
- <GripVertical className="h-2.5 w-2.5" />
32
- </div>
33
- )}
34
- </ResizablePrimitive.PanelResizeHandle>
35
- );
36
-
37
- export { ResizablePanelGroup, ResizablePanel, ResizableHandle };
@@ -1,38 +0,0 @@
1
- import * as React from "react";
2
- import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
3
-
4
- import { cn } from "@/lib/utils";
5
-
6
- const ScrollArea = React.forwardRef<
7
- React.ElementRef<typeof ScrollAreaPrimitive.Root>,
8
- React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root>
9
- >(({ className, children, ...props }, ref) => (
10
- <ScrollAreaPrimitive.Root ref={ref} className={cn("relative overflow-hidden", className)} {...props}>
11
- <ScrollAreaPrimitive.Viewport className="h-full w-full rounded-[inherit]">{children}</ScrollAreaPrimitive.Viewport>
12
- <ScrollBar />
13
- <ScrollAreaPrimitive.Corner />
14
- </ScrollAreaPrimitive.Root>
15
- ));
16
- ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
17
-
18
- const ScrollBar = React.forwardRef<
19
- React.ElementRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>,
20
- React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>
21
- >(({ className, orientation = "vertical", ...props }, ref) => (
22
- <ScrollAreaPrimitive.ScrollAreaScrollbar
23
- ref={ref}
24
- orientation={orientation}
25
- className={cn(
26
- "flex touch-none select-none transition-colors",
27
- orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]",
28
- orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]",
29
- className,
30
- )}
31
- {...props}
32
- >
33
- <ScrollAreaPrimitive.ScrollAreaThumb className="relative flex-1 rounded-full bg-border" />
34
- </ScrollAreaPrimitive.ScrollAreaScrollbar>
35
- ));
36
- ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
37
-
38
- export { ScrollArea, ScrollBar };
@@ -1,143 +0,0 @@
1
- import * as React from "react";
2
- import * as SelectPrimitive from "@radix-ui/react-select";
3
- import { Check, ChevronDown, ChevronUp } from "lucide-react";
4
-
5
- import { cn } from "@/lib/utils";
6
-
7
- const Select = SelectPrimitive.Root;
8
-
9
- const SelectGroup = SelectPrimitive.Group;
10
-
11
- const SelectValue = SelectPrimitive.Value;
12
-
13
- const SelectTrigger = React.forwardRef<
14
- React.ElementRef<typeof SelectPrimitive.Trigger>,
15
- React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>
16
- >(({ className, children, ...props }, ref) => (
17
- <SelectPrimitive.Trigger
18
- ref={ref}
19
- className={cn(
20
- "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",
21
- className,
22
- )}
23
- {...props}
24
- >
25
- {children}
26
- <SelectPrimitive.Icon asChild>
27
- <ChevronDown className="h-4 w-4 opacity-50" />
28
- </SelectPrimitive.Icon>
29
- </SelectPrimitive.Trigger>
30
- ));
31
- SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
32
-
33
- const SelectScrollUpButton = React.forwardRef<
34
- React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,
35
- React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>
36
- >(({ className, ...props }, ref) => (
37
- <SelectPrimitive.ScrollUpButton
38
- ref={ref}
39
- className={cn("flex cursor-default items-center justify-center py-1", className)}
40
- {...props}
41
- >
42
- <ChevronUp className="h-4 w-4" />
43
- </SelectPrimitive.ScrollUpButton>
44
- ));
45
- SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
46
-
47
- const SelectScrollDownButton = React.forwardRef<
48
- React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,
49
- React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>
50
- >(({ className, ...props }, ref) => (
51
- <SelectPrimitive.ScrollDownButton
52
- ref={ref}
53
- className={cn("flex cursor-default items-center justify-center py-1", className)}
54
- {...props}
55
- >
56
- <ChevronDown className="h-4 w-4" />
57
- </SelectPrimitive.ScrollDownButton>
58
- ));
59
- SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
60
-
61
- const SelectContent = React.forwardRef<
62
- React.ElementRef<typeof SelectPrimitive.Content>,
63
- React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>
64
- >(({ className, children, position = "popper", ...props }, ref) => (
65
- <SelectPrimitive.Portal>
66
- <SelectPrimitive.Content
67
- ref={ref}
68
- className={cn(
69
- "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",
70
- position === "popper" &&
71
- "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
72
- className,
73
- )}
74
- position={position}
75
- {...props}
76
- >
77
- <SelectScrollUpButton />
78
- <SelectPrimitive.Viewport
79
- className={cn(
80
- "p-1",
81
- position === "popper" &&
82
- "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]",
83
- )}
84
- >
85
- {children}
86
- </SelectPrimitive.Viewport>
87
- <SelectScrollDownButton />
88
- </SelectPrimitive.Content>
89
- </SelectPrimitive.Portal>
90
- ));
91
- SelectContent.displayName = SelectPrimitive.Content.displayName;
92
-
93
- const SelectLabel = React.forwardRef<
94
- React.ElementRef<typeof SelectPrimitive.Label>,
95
- React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>
96
- >(({ className, ...props }, ref) => (
97
- <SelectPrimitive.Label ref={ref} className={cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className)} {...props} />
98
- ));
99
- SelectLabel.displayName = SelectPrimitive.Label.displayName;
100
-
101
- const SelectItem = React.forwardRef<
102
- React.ElementRef<typeof SelectPrimitive.Item>,
103
- React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>
104
- >(({ className, children, ...props }, ref) => (
105
- <SelectPrimitive.Item
106
- ref={ref}
107
- className={cn(
108
- "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",
109
- className,
110
- )}
111
- {...props}
112
- >
113
- <span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
114
- <SelectPrimitive.ItemIndicator>
115
- <Check className="h-4 w-4" />
116
- </SelectPrimitive.ItemIndicator>
117
- </span>
118
-
119
- <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
120
- </SelectPrimitive.Item>
121
- ));
122
- SelectItem.displayName = SelectPrimitive.Item.displayName;
123
-
124
- const SelectSeparator = React.forwardRef<
125
- React.ElementRef<typeof SelectPrimitive.Separator>,
126
- React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>
127
- >(({ className, ...props }, ref) => (
128
- <SelectPrimitive.Separator ref={ref} className={cn("-mx-1 my-1 h-px bg-muted", className)} {...props} />
129
- ));
130
- SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
131
-
132
- export {
133
- Select,
134
- SelectGroup,
135
- SelectValue,
136
- SelectTrigger,
137
- SelectContent,
138
- SelectLabel,
139
- SelectItem,
140
- SelectSeparator,
141
- SelectScrollUpButton,
142
- SelectScrollDownButton,
143
- };
@@ -1,20 +0,0 @@
1
- import * as React from "react";
2
- import * as SeparatorPrimitive from "@radix-ui/react-separator";
3
-
4
- import { cn } from "@/lib/utils";
5
-
6
- const Separator = React.forwardRef<
7
- React.ElementRef<typeof SeparatorPrimitive.Root>,
8
- React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>
9
- >(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => (
10
- <SeparatorPrimitive.Root
11
- ref={ref}
12
- decorative={decorative}
13
- orientation={orientation}
14
- className={cn("shrink-0 bg-border", orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]", className)}
15
- {...props}
16
- />
17
- ));
18
- Separator.displayName = SeparatorPrimitive.Root.displayName;
19
-
20
- export { Separator };
@@ -1,107 +0,0 @@
1
- import * as SheetPrimitive from "@radix-ui/react-dialog";
2
- import { cva, type VariantProps } from "class-variance-authority";
3
- import { X } from "lucide-react";
4
- import * as React from "react";
5
-
6
- import { cn } from "@/lib/utils";
7
-
8
- const Sheet = SheetPrimitive.Root;
9
-
10
- const SheetTrigger = SheetPrimitive.Trigger;
11
-
12
- const SheetClose = SheetPrimitive.Close;
13
-
14
- const SheetPortal = SheetPrimitive.Portal;
15
-
16
- const SheetOverlay = React.forwardRef<
17
- React.ElementRef<typeof SheetPrimitive.Overlay>,
18
- React.ComponentPropsWithoutRef<typeof SheetPrimitive.Overlay>
19
- >(({ className, ...props }, ref) => (
20
- <SheetPrimitive.Overlay
21
- className={cn(
22
- "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",
23
- className,
24
- )}
25
- {...props}
26
- ref={ref}
27
- />
28
- ));
29
- SheetOverlay.displayName = SheetPrimitive.Overlay.displayName;
30
-
31
- const sheetVariants = cva(
32
- "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",
33
- {
34
- variants: {
35
- side: {
36
- top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
37
- bottom:
38
- "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
39
- 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",
40
- right:
41
- "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",
42
- },
43
- },
44
- defaultVariants: {
45
- side: "right",
46
- },
47
- },
48
- );
49
-
50
- interface SheetContentProps
51
- extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>,
52
- VariantProps<typeof sheetVariants> {}
53
-
54
- const SheetContent = React.forwardRef<React.ElementRef<typeof SheetPrimitive.Content>, SheetContentProps>(
55
- ({ side = "right", className, children, ...props }, ref) => (
56
- <SheetPortal>
57
- <SheetOverlay />
58
- <SheetPrimitive.Content ref={ref} className={cn(sheetVariants({ side }), className)} {...props}>
59
- {children}
60
- <SheetPrimitive.Close className="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-secondary hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none">
61
- <X className="h-4 w-4" />
62
- <span className="sr-only">Close</span>
63
- </SheetPrimitive.Close>
64
- </SheetPrimitive.Content>
65
- </SheetPortal>
66
- ),
67
- );
68
- SheetContent.displayName = SheetPrimitive.Content.displayName;
69
-
70
- const SheetHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (
71
- <div className={cn("flex flex-col space-y-2 text-center sm:text-left", className)} {...props} />
72
- );
73
- SheetHeader.displayName = "SheetHeader";
74
-
75
- const SheetFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (
76
- <div className={cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className)} {...props} />
77
- );
78
- SheetFooter.displayName = "SheetFooter";
79
-
80
- const SheetTitle = React.forwardRef<
81
- React.ElementRef<typeof SheetPrimitive.Title>,
82
- React.ComponentPropsWithoutRef<typeof SheetPrimitive.Title>
83
- >(({ className, ...props }, ref) => (
84
- <SheetPrimitive.Title ref={ref} className={cn("text-lg font-semibold text-foreground", className)} {...props} />
85
- ));
86
- SheetTitle.displayName = SheetPrimitive.Title.displayName;
87
-
88
- const SheetDescription = React.forwardRef<
89
- React.ElementRef<typeof SheetPrimitive.Description>,
90
- React.ComponentPropsWithoutRef<typeof SheetPrimitive.Description>
91
- >(({ className, ...props }, ref) => (
92
- <SheetPrimitive.Description ref={ref} className={cn("text-sm text-muted-foreground", className)} {...props} />
93
- ));
94
- SheetDescription.displayName = SheetPrimitive.Description.displayName;
95
-
96
- export {
97
- Sheet,
98
- SheetClose,
99
- SheetContent,
100
- SheetDescription,
101
- SheetFooter,
102
- SheetHeader,
103
- SheetOverlay,
104
- SheetPortal,
105
- SheetTitle,
106
- SheetTrigger,
107
- };