@syscore/ui-library 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/client/components/ui/accordion.tsx +56 -0
  2. package/client/components/ui/alert-dialog.tsx +139 -0
  3. package/client/components/ui/alert.tsx +59 -0
  4. package/client/components/ui/aspect-ratio.tsx +5 -0
  5. package/client/components/ui/avatar.tsx +48 -0
  6. package/client/components/ui/badge.tsx +36 -0
  7. package/client/components/ui/breadcrumb.tsx +115 -0
  8. package/client/components/ui/button.tsx +56 -0
  9. package/client/components/ui/calendar.tsx +68 -0
  10. package/client/components/ui/card.tsx +86 -0
  11. package/client/components/ui/carousel.tsx +260 -0
  12. package/client/components/ui/chart.tsx +363 -0
  13. package/client/components/ui/checkbox.tsx +28 -0
  14. package/client/components/ui/collapsible.tsx +9 -0
  15. package/client/components/ui/command.tsx +153 -0
  16. package/client/components/ui/context-menu.tsx +198 -0
  17. package/client/components/ui/dialog.tsx +120 -0
  18. package/client/components/ui/drawer.tsx +116 -0
  19. package/client/components/ui/dropdown-menu.tsx +198 -0
  20. package/client/components/ui/form.tsx +177 -0
  21. package/client/components/ui/hover-card.tsx +27 -0
  22. package/client/components/ui/input-otp.tsx +69 -0
  23. package/client/components/ui/input.tsx +22 -0
  24. package/client/components/ui/label.tsx +24 -0
  25. package/client/components/ui/menubar.tsx +234 -0
  26. package/client/components/ui/navigation-menu.tsx +128 -0
  27. package/client/components/ui/pagination.tsx +117 -0
  28. package/client/components/ui/popover.tsx +29 -0
  29. package/client/components/ui/progress.tsx +26 -0
  30. package/client/components/ui/radio-group.tsx +42 -0
  31. package/client/components/ui/resizable.tsx +43 -0
  32. package/client/components/ui/scroll-area.tsx +46 -0
  33. package/client/components/ui/select.tsx +158 -0
  34. package/client/components/ui/separator.tsx +29 -0
  35. package/client/components/ui/sheet.tsx +138 -0
  36. package/client/components/ui/sidebar.tsx +769 -0
  37. package/client/components/ui/skeleton.tsx +15 -0
  38. package/client/components/ui/slider.tsx +26 -0
  39. package/client/components/ui/sonner.tsx +29 -0
  40. package/client/components/ui/switch.tsx +27 -0
  41. package/client/components/ui/table.tsx +117 -0
  42. package/client/components/ui/tabs.tsx +53 -0
  43. package/client/components/ui/textarea.tsx +24 -0
  44. package/client/components/ui/toast.tsx +127 -0
  45. package/client/components/ui/toaster.tsx +33 -0
  46. package/client/components/ui/toggle-group.tsx +59 -0
  47. package/client/components/ui/toggle.tsx +43 -0
  48. package/client/components/ui/tooltip.tsx +28 -0
  49. package/client/components/ui/use-toast.ts +3 -0
  50. package/client/lib/utils.spec.ts +32 -0
  51. package/client/lib/utils.ts +6 -0
  52. package/dist/ui/favicon.ico +0 -0
  53. package/dist/ui/index.cjs.js +1 -54
  54. package/dist/ui/index.d.ts +0 -6
  55. package/dist/ui/index.es.js +2790 -35587
  56. package/dist/ui/placeholder.svg +1 -0
  57. package/dist/ui/robots.txt +14 -0
  58. package/package.json +9 -10
@@ -0,0 +1,234 @@
1
+ import * as React from "react";
2
+ import * as MenubarPrimitive from "@radix-ui/react-menubar";
3
+ import { Check, ChevronRight, Circle } from "lucide-react";
4
+
5
+ import { cn } from "@/lib/utils";
6
+
7
+ const MenubarMenu = MenubarPrimitive.Menu;
8
+
9
+ const MenubarGroup = MenubarPrimitive.Group;
10
+
11
+ const MenubarPortal = MenubarPrimitive.Portal;
12
+
13
+ const MenubarSub = MenubarPrimitive.Sub;
14
+
15
+ const MenubarRadioGroup = MenubarPrimitive.RadioGroup;
16
+
17
+ const Menubar = React.forwardRef<
18
+ React.ElementRef<typeof MenubarPrimitive.Root>,
19
+ React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Root>
20
+ >(({ className, ...props }, ref) => (
21
+ <MenubarPrimitive.Root
22
+ ref={ref}
23
+ className={cn(
24
+ "flex h-10 items-center space-x-1 rounded-md border bg-background p-1",
25
+ className,
26
+ )}
27
+ {...props}
28
+ />
29
+ ));
30
+ Menubar.displayName = MenubarPrimitive.Root.displayName;
31
+
32
+ const MenubarTrigger = React.forwardRef<
33
+ React.ElementRef<typeof MenubarPrimitive.Trigger>,
34
+ React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Trigger>
35
+ >(({ className, ...props }, ref) => (
36
+ <MenubarPrimitive.Trigger
37
+ ref={ref}
38
+ className={cn(
39
+ "flex cursor-default select-none items-center rounded-sm px-3 py-1.5 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
40
+ className,
41
+ )}
42
+ {...props}
43
+ />
44
+ ));
45
+ MenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName;
46
+
47
+ const MenubarSubTrigger = React.forwardRef<
48
+ React.ElementRef<typeof MenubarPrimitive.SubTrigger>,
49
+ React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubTrigger> & {
50
+ inset?: boolean;
51
+ }
52
+ >(({ className, inset, children, ...props }, ref) => (
53
+ <MenubarPrimitive.SubTrigger
54
+ ref={ref}
55
+ className={cn(
56
+ "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
57
+ inset && "pl-8",
58
+ className,
59
+ )}
60
+ {...props}
61
+ >
62
+ {children}
63
+ <ChevronRight className="ml-auto h-4 w-4" />
64
+ </MenubarPrimitive.SubTrigger>
65
+ ));
66
+ MenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName;
67
+
68
+ const MenubarSubContent = React.forwardRef<
69
+ React.ElementRef<typeof MenubarPrimitive.SubContent>,
70
+ React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubContent>
71
+ >(({ className, ...props }, ref) => (
72
+ <MenubarPrimitive.SubContent
73
+ ref={ref}
74
+ className={cn(
75
+ "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground 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",
76
+ className,
77
+ )}
78
+ {...props}
79
+ />
80
+ ));
81
+ MenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName;
82
+
83
+ const MenubarContent = React.forwardRef<
84
+ React.ElementRef<typeof MenubarPrimitive.Content>,
85
+ React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Content>
86
+ >(
87
+ (
88
+ { className, align = "start", alignOffset = -4, sideOffset = 8, ...props },
89
+ ref,
90
+ ) => (
91
+ <MenubarPrimitive.Portal>
92
+ <MenubarPrimitive.Content
93
+ ref={ref}
94
+ align={align}
95
+ alignOffset={alignOffset}
96
+ sideOffset={sideOffset}
97
+ className={cn(
98
+ "z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in 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",
99
+ className,
100
+ )}
101
+ {...props}
102
+ />
103
+ </MenubarPrimitive.Portal>
104
+ ),
105
+ );
106
+ MenubarContent.displayName = MenubarPrimitive.Content.displayName;
107
+
108
+ const MenubarItem = React.forwardRef<
109
+ React.ElementRef<typeof MenubarPrimitive.Item>,
110
+ React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Item> & {
111
+ inset?: boolean;
112
+ }
113
+ >(({ className, inset, ...props }, ref) => (
114
+ <MenubarPrimitive.Item
115
+ ref={ref}
116
+ className={cn(
117
+ "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
118
+ inset && "pl-8",
119
+ className,
120
+ )}
121
+ {...props}
122
+ />
123
+ ));
124
+ MenubarItem.displayName = MenubarPrimitive.Item.displayName;
125
+
126
+ const MenubarCheckboxItem = React.forwardRef<
127
+ React.ElementRef<typeof MenubarPrimitive.CheckboxItem>,
128
+ React.ComponentPropsWithoutRef<typeof MenubarPrimitive.CheckboxItem>
129
+ >(({ className, children, checked, ...props }, ref) => (
130
+ <MenubarPrimitive.CheckboxItem
131
+ ref={ref}
132
+ className={cn(
133
+ "relative flex 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",
134
+ className,
135
+ )}
136
+ checked={checked}
137
+ {...props}
138
+ >
139
+ <span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
140
+ <MenubarPrimitive.ItemIndicator>
141
+ <Check className="h-4 w-4" />
142
+ </MenubarPrimitive.ItemIndicator>
143
+ </span>
144
+ {children}
145
+ </MenubarPrimitive.CheckboxItem>
146
+ ));
147
+ MenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName;
148
+
149
+ const MenubarRadioItem = React.forwardRef<
150
+ React.ElementRef<typeof MenubarPrimitive.RadioItem>,
151
+ React.ComponentPropsWithoutRef<typeof MenubarPrimitive.RadioItem>
152
+ >(({ className, children, ...props }, ref) => (
153
+ <MenubarPrimitive.RadioItem
154
+ ref={ref}
155
+ className={cn(
156
+ "relative flex 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",
157
+ className,
158
+ )}
159
+ {...props}
160
+ >
161
+ <span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
162
+ <MenubarPrimitive.ItemIndicator>
163
+ <Circle className="h-2 w-2 fill-current" />
164
+ </MenubarPrimitive.ItemIndicator>
165
+ </span>
166
+ {children}
167
+ </MenubarPrimitive.RadioItem>
168
+ ));
169
+ MenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName;
170
+
171
+ const MenubarLabel = React.forwardRef<
172
+ React.ElementRef<typeof MenubarPrimitive.Label>,
173
+ React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Label> & {
174
+ inset?: boolean;
175
+ }
176
+ >(({ className, inset, ...props }, ref) => (
177
+ <MenubarPrimitive.Label
178
+ ref={ref}
179
+ className={cn(
180
+ "px-2 py-1.5 text-sm font-semibold",
181
+ inset && "pl-8",
182
+ className,
183
+ )}
184
+ {...props}
185
+ />
186
+ ));
187
+ MenubarLabel.displayName = MenubarPrimitive.Label.displayName;
188
+
189
+ const MenubarSeparator = React.forwardRef<
190
+ React.ElementRef<typeof MenubarPrimitive.Separator>,
191
+ React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Separator>
192
+ >(({ className, ...props }, ref) => (
193
+ <MenubarPrimitive.Separator
194
+ ref={ref}
195
+ className={cn("-mx-1 my-1 h-px bg-muted", className)}
196
+ {...props}
197
+ />
198
+ ));
199
+ MenubarSeparator.displayName = MenubarPrimitive.Separator.displayName;
200
+
201
+ const MenubarShortcut = ({
202
+ className,
203
+ ...props
204
+ }: React.HTMLAttributes<HTMLSpanElement>) => {
205
+ return (
206
+ <span
207
+ className={cn(
208
+ "ml-auto text-xs tracking-widest text-muted-foreground",
209
+ className,
210
+ )}
211
+ {...props}
212
+ />
213
+ );
214
+ };
215
+ MenubarShortcut.displayname = "MenubarShortcut";
216
+
217
+ export {
218
+ Menubar,
219
+ MenubarMenu,
220
+ MenubarTrigger,
221
+ MenubarContent,
222
+ MenubarItem,
223
+ MenubarSeparator,
224
+ MenubarLabel,
225
+ MenubarCheckboxItem,
226
+ MenubarRadioGroup,
227
+ MenubarRadioItem,
228
+ MenubarPortal,
229
+ MenubarSubContent,
230
+ MenubarSubTrigger,
231
+ MenubarGroup,
232
+ MenubarSub,
233
+ MenubarShortcut,
234
+ };
@@ -0,0 +1,128 @@
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(
15
+ "relative z-10 flex max-w-max flex-1 items-center justify-center",
16
+ className,
17
+ )}
18
+ {...props}
19
+ >
20
+ {children}
21
+ <NavigationMenuViewport />
22
+ </NavigationMenuPrimitive.Root>
23
+ ));
24
+ NavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName;
25
+
26
+ const NavigationMenuList = React.forwardRef<
27
+ React.ElementRef<typeof NavigationMenuPrimitive.List>,
28
+ React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.List>
29
+ >(({ className, ...props }, ref) => (
30
+ <NavigationMenuPrimitive.List
31
+ ref={ref}
32
+ className={cn(
33
+ "group flex flex-1 list-none items-center justify-center space-x-1",
34
+ className,
35
+ )}
36
+ {...props}
37
+ />
38
+ ));
39
+ NavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName;
40
+
41
+ const NavigationMenuItem = NavigationMenuPrimitive.Item;
42
+
43
+ const navigationMenuTriggerStyle = cva(
44
+ "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",
45
+ );
46
+
47
+ const NavigationMenuTrigger = React.forwardRef<
48
+ React.ElementRef<typeof NavigationMenuPrimitive.Trigger>,
49
+ React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Trigger>
50
+ >(({ className, children, ...props }, ref) => (
51
+ <NavigationMenuPrimitive.Trigger
52
+ ref={ref}
53
+ className={cn(navigationMenuTriggerStyle(), "group", className)}
54
+ {...props}
55
+ >
56
+ {children}{" "}
57
+ <ChevronDown
58
+ className="relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180"
59
+ aria-hidden="true"
60
+ />
61
+ </NavigationMenuPrimitive.Trigger>
62
+ ));
63
+ NavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName;
64
+
65
+ const NavigationMenuContent = React.forwardRef<
66
+ React.ElementRef<typeof NavigationMenuPrimitive.Content>,
67
+ React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Content>
68
+ >(({ className, ...props }, ref) => (
69
+ <NavigationMenuPrimitive.Content
70
+ ref={ref}
71
+ className={cn(
72
+ "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 ",
73
+ className,
74
+ )}
75
+ {...props}
76
+ />
77
+ ));
78
+ NavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName;
79
+
80
+ const NavigationMenuLink = NavigationMenuPrimitive.Link;
81
+
82
+ const NavigationMenuViewport = React.forwardRef<
83
+ React.ElementRef<typeof NavigationMenuPrimitive.Viewport>,
84
+ React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Viewport>
85
+ >(({ className, ...props }, ref) => (
86
+ <div className={cn("absolute left-0 top-full flex justify-center")}>
87
+ <NavigationMenuPrimitive.Viewport
88
+ className={cn(
89
+ "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)]",
90
+ className,
91
+ )}
92
+ ref={ref}
93
+ {...props}
94
+ />
95
+ </div>
96
+ ));
97
+ NavigationMenuViewport.displayName =
98
+ NavigationMenuPrimitive.Viewport.displayName;
99
+
100
+ const NavigationMenuIndicator = React.forwardRef<
101
+ React.ElementRef<typeof NavigationMenuPrimitive.Indicator>,
102
+ React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Indicator>
103
+ >(({ className, ...props }, ref) => (
104
+ <NavigationMenuPrimitive.Indicator
105
+ ref={ref}
106
+ className={cn(
107
+ "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",
108
+ className,
109
+ )}
110
+ {...props}
111
+ >
112
+ <div className="relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" />
113
+ </NavigationMenuPrimitive.Indicator>
114
+ ));
115
+ NavigationMenuIndicator.displayName =
116
+ NavigationMenuPrimitive.Indicator.displayName;
117
+
118
+ export {
119
+ navigationMenuTriggerStyle,
120
+ NavigationMenu,
121
+ NavigationMenuList,
122
+ NavigationMenuItem,
123
+ NavigationMenuContent,
124
+ NavigationMenuTrigger,
125
+ NavigationMenuLink,
126
+ NavigationMenuIndicator,
127
+ NavigationMenuViewport,
128
+ };
@@ -0,0 +1,117 @@
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<
18
+ HTMLUListElement,
19
+ React.ComponentProps<"ul">
20
+ >(({ className, ...props }, ref) => (
21
+ <ul
22
+ ref={ref}
23
+ className={cn("flex flex-row items-center gap-1", className)}
24
+ {...props}
25
+ />
26
+ ));
27
+ PaginationContent.displayName = "PaginationContent";
28
+
29
+ const PaginationItem = React.forwardRef<
30
+ HTMLLIElement,
31
+ React.ComponentProps<"li">
32
+ >(({ className, ...props }, ref) => (
33
+ <li ref={ref} className={cn("", className)} {...props} />
34
+ ));
35
+ PaginationItem.displayName = "PaginationItem";
36
+
37
+ type PaginationLinkProps = {
38
+ isActive?: boolean;
39
+ } & Pick<ButtonProps, "size"> &
40
+ React.ComponentProps<"a">;
41
+
42
+ const PaginationLink = ({
43
+ className,
44
+ isActive,
45
+ size = "icon",
46
+ ...props
47
+ }: PaginationLinkProps) => (
48
+ <a
49
+ aria-current={isActive ? "page" : undefined}
50
+ className={cn(
51
+ buttonVariants({
52
+ variant: isActive ? "outline" : "ghost",
53
+ size,
54
+ }),
55
+ className,
56
+ )}
57
+ {...props}
58
+ />
59
+ );
60
+ PaginationLink.displayName = "PaginationLink";
61
+
62
+ const PaginationPrevious = ({
63
+ className,
64
+ ...props
65
+ }: React.ComponentProps<typeof PaginationLink>) => (
66
+ <PaginationLink
67
+ aria-label="Go to previous page"
68
+ size="default"
69
+ className={cn("gap-1 pl-2.5", className)}
70
+ {...props}
71
+ >
72
+ <ChevronLeft className="h-4 w-4" />
73
+ <span>Previous</span>
74
+ </PaginationLink>
75
+ );
76
+ PaginationPrevious.displayName = "PaginationPrevious";
77
+
78
+ const PaginationNext = ({
79
+ className,
80
+ ...props
81
+ }: React.ComponentProps<typeof PaginationLink>) => (
82
+ <PaginationLink
83
+ aria-label="Go to next page"
84
+ size="default"
85
+ className={cn("gap-1 pr-2.5", className)}
86
+ {...props}
87
+ >
88
+ <span>Next</span>
89
+ <ChevronRight className="h-4 w-4" />
90
+ </PaginationLink>
91
+ );
92
+ PaginationNext.displayName = "PaginationNext";
93
+
94
+ const PaginationEllipsis = ({
95
+ className,
96
+ ...props
97
+ }: React.ComponentProps<"span">) => (
98
+ <span
99
+ aria-hidden
100
+ className={cn("flex h-9 w-9 items-center justify-center", className)}
101
+ {...props}
102
+ >
103
+ <MoreHorizontal className="h-4 w-4" />
104
+ <span className="sr-only">More pages</span>
105
+ </span>
106
+ );
107
+ PaginationEllipsis.displayName = "PaginationEllipsis";
108
+
109
+ export {
110
+ Pagination,
111
+ PaginationContent,
112
+ PaginationEllipsis,
113
+ PaginationItem,
114
+ PaginationLink,
115
+ PaginationNext,
116
+ PaginationPrevious,
117
+ };
@@ -0,0 +1,29 @@
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-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",
21
+ className,
22
+ )}
23
+ {...props}
24
+ />
25
+ </PopoverPrimitive.Portal>
26
+ ));
27
+ PopoverContent.displayName = PopoverPrimitive.Content.displayName;
28
+
29
+ export { Popover, PopoverTrigger, PopoverContent };
@@ -0,0 +1,26 @@
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(
13
+ "relative h-4 w-full overflow-hidden rounded-full bg-secondary",
14
+ className,
15
+ )}
16
+ {...props}
17
+ >
18
+ <ProgressPrimitive.Indicator
19
+ className="h-full w-full flex-1 bg-primary transition-all"
20
+ style={{ transform: `translateX(-${100 - (value || 0)}%)` }}
21
+ />
22
+ </ProgressPrimitive.Root>
23
+ ));
24
+ Progress.displayName = ProgressPrimitive.Root.displayName;
25
+
26
+ export { Progress };
@@ -0,0 +1,42 @@
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 (
12
+ <RadioGroupPrimitive.Root
13
+ className={cn("grid gap-2", className)}
14
+ {...props}
15
+ ref={ref}
16
+ />
17
+ );
18
+ });
19
+ RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
20
+
21
+ const RadioGroupItem = React.forwardRef<
22
+ React.ElementRef<typeof RadioGroupPrimitive.Item>,
23
+ React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>
24
+ >(({ className, ...props }, ref) => {
25
+ return (
26
+ <RadioGroupPrimitive.Item
27
+ ref={ref}
28
+ className={cn(
29
+ "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",
30
+ className,
31
+ )}
32
+ {...props}
33
+ >
34
+ <RadioGroupPrimitive.Indicator className="flex items-center justify-center">
35
+ <Circle className="h-2.5 w-2.5 fill-current text-current" />
36
+ </RadioGroupPrimitive.Indicator>
37
+ </RadioGroupPrimitive.Item>
38
+ );
39
+ });
40
+ RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
41
+
42
+ export { RadioGroup, RadioGroupItem };
@@ -0,0 +1,43 @@
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 = ({
7
+ className,
8
+ ...props
9
+ }: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) => (
10
+ <ResizablePrimitive.PanelGroup
11
+ className={cn(
12
+ "flex h-full w-full data-[panel-group-direction=vertical]:flex-col",
13
+ className,
14
+ )}
15
+ {...props}
16
+ />
17
+ );
18
+
19
+ const ResizablePanel = ResizablePrimitive.Panel;
20
+
21
+ const ResizableHandle = ({
22
+ withHandle,
23
+ className,
24
+ ...props
25
+ }: React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {
26
+ withHandle?: boolean;
27
+ }) => (
28
+ <ResizablePrimitive.PanelResizeHandle
29
+ className={cn(
30
+ "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 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 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 [&[data-panel-group-direction=vertical]>div]:rotate-90",
31
+ className,
32
+ )}
33
+ {...props}
34
+ >
35
+ {withHandle && (
36
+ <div className="z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border">
37
+ <GripVertical className="h-2.5 w-2.5" />
38
+ </div>
39
+ )}
40
+ </ResizablePrimitive.PanelResizeHandle>
41
+ );
42
+
43
+ export { ResizablePanelGroup, ResizablePanel, ResizableHandle };
@@ -0,0 +1,46 @@
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
11
+ ref={ref}
12
+ className={cn("relative overflow-hidden", className)}
13
+ {...props}
14
+ >
15
+ <ScrollAreaPrimitive.Viewport className="h-full w-full rounded-[inherit]">
16
+ {children}
17
+ </ScrollAreaPrimitive.Viewport>
18
+ <ScrollBar />
19
+ <ScrollAreaPrimitive.Corner />
20
+ </ScrollAreaPrimitive.Root>
21
+ ));
22
+ ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
23
+
24
+ const ScrollBar = React.forwardRef<
25
+ React.ElementRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>,
26
+ React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>
27
+ >(({ className, orientation = "vertical", ...props }, ref) => (
28
+ <ScrollAreaPrimitive.ScrollAreaScrollbar
29
+ ref={ref}
30
+ orientation={orientation}
31
+ className={cn(
32
+ "flex touch-none select-none transition-colors",
33
+ orientation === "vertical" &&
34
+ "h-full w-2.5 border-l border-l-transparent p-[1px]",
35
+ orientation === "horizontal" &&
36
+ "h-2.5 flex-col border-t border-t-transparent p-[1px]",
37
+ className,
38
+ )}
39
+ {...props}
40
+ >
41
+ <ScrollAreaPrimitive.ScrollAreaThumb className="relative flex-1 rounded-full bg-border" />
42
+ </ScrollAreaPrimitive.ScrollAreaScrollbar>
43
+ ));
44
+ ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
45
+
46
+ export { ScrollArea, ScrollBar };