@arolariu/components 0.2.0 → 0.3.1
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/changelog.md +15 -0
- package/dist/components/ui/accordion.d.ts +4 -4
- package/dist/components/ui/accordion.d.ts.map +1 -1
- package/dist/components/ui/accordion.js +19 -27
- package/dist/components/ui/accordion.js.map +1 -1
- package/dist/components/ui/alert-dialog.d.ts +17 -11
- package/dist/components/ui/alert-dialog.d.ts.map +1 -1
- package/dist/components/ui/alert-dialog.js +38 -61
- package/dist/components/ui/alert-dialog.js.map +1 -1
- package/dist/components/ui/alert.d.ts +4 -5
- package/dist/components/ui/alert.d.ts.map +1 -1
- package/dist/components/ui/alert.js +17 -20
- package/dist/components/ui/alert.js.map +1 -1
- package/dist/components/ui/aspect-ratio.d.ts +1 -2
- package/dist/components/ui/aspect-ratio.d.ts.map +1 -1
- package/dist/components/ui/aspect-ratio.js +1 -8
- package/dist/components/ui/aspect-ratio.js.map +1 -1
- package/dist/components/ui/avatar.d.ts +3 -3
- package/dist/components/ui/avatar.d.ts.map +1 -1
- package/dist/components/ui/avatar.js +16 -19
- package/dist/components/ui/avatar.js.map +1 -1
- package/dist/components/ui/badge.d.ts +3 -3
- package/dist/components/ui/badge.d.ts.map +1 -1
- package/dist/components/ui/badge.js +7 -10
- package/dist/components/ui/badge.js.map +1 -1
- package/dist/components/ui/breadcrumb.d.ts +16 -8
- package/dist/components/ui/breadcrumb.d.ts.map +1 -1
- package/dist/components/ui/breadcrumb.js +28 -35
- package/dist/components/ui/breadcrumb.js.map +1 -1
- package/dist/components/ui/button-group.d.ts +13 -0
- package/dist/components/ui/button-group.d.ts.map +1 -0
- package/dist/components/ui/button-group.js +47 -0
- package/dist/components/ui/button-group.js.map +1 -0
- package/dist/components/ui/button.d.ts +3 -2
- package/dist/components/ui/button.d.ts.map +1 -1
- package/dist/components/ui/button.js +15 -14
- package/dist/components/ui/button.js.map +1 -1
- package/dist/components/ui/calendar.js +20 -20
- package/dist/components/ui/calendar.js.map +1 -1
- package/dist/components/ui/card.d.ts +7 -8
- package/dist/components/ui/card.d.ts.map +1 -1
- package/dist/components/ui/card.js +31 -44
- package/dist/components/ui/card.js.map +1 -1
- package/dist/components/ui/carousel.d.ts +5 -6
- package/dist/components/ui/carousel.d.ts.map +1 -1
- package/dist/components/ui/carousel.js +29 -20
- package/dist/components/ui/carousel.js.map +1 -1
- package/dist/components/ui/chart.d.ts +35 -27
- package/dist/components/ui/chart.d.ts.map +1 -1
- package/dist/components/ui/chart.js +28 -26
- package/dist/components/ui/chart.js.map +1 -1
- package/dist/components/ui/checkbox.d.ts +1 -1
- package/dist/components/ui/checkbox.d.ts.map +1 -1
- package/dist/components/ui/checkbox.js +10 -12
- package/dist/components/ui/checkbox.js.map +1 -1
- package/dist/components/ui/collapsible.d.ts +2 -4
- package/dist/components/ui/collapsible.d.ts.map +1 -1
- package/dist/components/ui/collapsible.js +31 -20
- package/dist/components/ui/collapsible.js.map +1 -1
- package/dist/components/ui/command.d.ts +78 -16
- package/dist/components/ui/command.d.ts.map +1 -1
- package/dist/components/ui/command.js +47 -72
- package/dist/components/ui/command.js.map +1 -1
- package/dist/components/ui/context-menu.d.ts +21 -19
- package/dist/components/ui/context-menu.d.ts.map +1 -1
- package/dist/components/ui/context-menu.js +57 -101
- package/dist/components/ui/context-menu.js.map +1 -1
- package/dist/components/ui/dialog.d.ts +16 -12
- package/dist/components/ui/dialog.d.ts.map +1 -1
- package/dist/components/ui/dialog.js +36 -64
- package/dist/components/ui/dialog.js.map +1 -1
- package/dist/components/ui/drawer.d.ts +19 -10
- package/dist/components/ui/drawer.d.ts.map +1 -1
- package/dist/components/ui/drawer.js +32 -57
- package/dist/components/ui/drawer.js.map +1 -1
- package/dist/components/ui/dropdown-menu.d.ts +21 -19
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/components/ui/dropdown-menu.js +64 -108
- package/dist/components/ui/dropdown-menu.js.map +1 -1
- package/dist/components/ui/dropdrawer.d.ts +1 -1
- package/dist/components/ui/dropdrawer.d.ts.map +1 -1
- package/dist/components/ui/dropdrawer.js +2 -5
- package/dist/components/ui/dropdrawer.js.map +1 -1
- package/dist/components/ui/empty.d.ts +13 -0
- package/dist/components/ui/empty.d.ts.map +1 -0
- package/dist/components/ui/empty.js +65 -0
- package/dist/components/ui/empty.js.map +1 -0
- package/dist/components/ui/field.d.ts +26 -0
- package/dist/components/ui/field.d.ts.map +1 -0
- package/dist/components/ui/field.js +135 -0
- package/dist/components/ui/field.js.map +1 -0
- package/dist/components/ui/form.d.ts +5 -6
- package/dist/components/ui/form.d.ts.map +1 -1
- package/dist/components/ui/form.js +29 -28
- package/dist/components/ui/form.js.map +1 -1
- package/dist/components/ui/hover-card.d.ts +3 -3
- package/dist/components/ui/hover-card.d.ts.map +1 -1
- package/dist/components/ui/hover-card.js +11 -25
- package/dist/components/ui/hover-card.js.map +1 -1
- package/dist/components/ui/input-group.d.ts +17 -0
- package/dist/components/ui/input-group.d.ts.map +1 -0
- package/dist/components/ui/input-group.js +91 -0
- package/dist/components/ui/input-group.js.map +1 -0
- package/dist/components/ui/input-otp.d.ts +30 -7
- package/dist/components/ui/input-otp.d.ts.map +1 -1
- package/dist/components/ui/input-otp.js +22 -25
- package/dist/components/ui/input-otp.js.map +1 -1
- package/dist/components/ui/input.d.ts +1 -1
- package/dist/components/ui/input.d.ts.map +1 -1
- package/dist/components/ui/input.js +6 -7
- package/dist/components/ui/input.js.map +1 -1
- package/dist/components/ui/item.d.ts +24 -0
- package/dist/components/ui/item.d.ts.map +1 -0
- package/dist/components/ui/item.js +122 -0
- package/dist/components/ui/item.js.map +1 -0
- package/dist/components/ui/kbd.d.ts +5 -0
- package/dist/components/ui/kbd.d.ts.map +1 -0
- package/dist/components/ui/kbd.js +21 -0
- package/dist/components/ui/kbd.js.map +1 -0
- package/dist/components/ui/label.d.ts +2 -1
- package/dist/components/ui/label.d.ts.map +1 -1
- package/dist/components/ui/label.js +8 -7
- package/dist/components/ui/label.js.map +1 -1
- package/dist/components/ui/menubar.d.ts +18 -16
- package/dist/components/ui/menubar.d.ts.map +1 -1
- package/dist/components/ui/menubar.js +73 -93
- package/dist/components/ui/menubar.js.map +1 -1
- package/dist/components/ui/navigation-menu.d.ts +8 -10
- package/dist/components/ui/navigation-menu.d.ts.map +1 -1
- package/dist/components/ui/navigation-menu.js +36 -55
- package/dist/components/ui/navigation-menu.js.map +1 -1
- package/dist/components/ui/pagination.d.ts +24 -9
- package/dist/components/ui/pagination.d.ts.map +1 -1
- package/dist/components/ui/pagination.js +33 -45
- package/dist/components/ui/pagination.js.map +1 -1
- package/dist/components/ui/popover.d.ts +4 -4
- package/dist/components/ui/popover.d.ts.map +1 -1
- package/dist/components/ui/popover.js +9 -25
- package/dist/components/ui/popover.js.map +1 -1
- package/dist/components/ui/progress.d.ts +1 -1
- package/dist/components/ui/progress.d.ts.map +1 -1
- package/dist/components/ui/progress.js +5 -7
- package/dist/components/ui/progress.js.map +1 -1
- package/dist/components/ui/radio-group.d.ts +2 -2
- package/dist/components/ui/radio-group.d.ts.map +1 -1
- package/dist/components/ui/radio-group.js +16 -19
- package/dist/components/ui/radio-group.js.map +1 -1
- package/dist/components/ui/resizable.d.ts +20 -4
- package/dist/components/ui/resizable.d.ts.map +1 -1
- package/dist/components/ui/resizable.js +8 -19
- package/dist/components/ui/resizable.js.map +1 -1
- package/dist/components/ui/scroll-area.d.ts +2 -2
- package/dist/components/ui/scroll-area.d.ts.map +1 -1
- package/dist/components/ui/scroll-area.js +12 -16
- package/dist/components/ui/scroll-area.js.map +1 -1
- package/dist/components/ui/select.d.ts +10 -12
- package/dist/components/ui/select.d.ts.map +1 -1
- package/dist/components/ui/select.js +54 -77
- package/dist/components/ui/select.js.map +1 -1
- package/dist/components/ui/separator.d.ts +1 -1
- package/dist/components/ui/separator.d.ts.map +1 -1
- package/dist/components/ui/separator.js +6 -7
- package/dist/components/ui/separator.js.map +1 -1
- package/dist/components/ui/sheet.d.ts +23 -11
- package/dist/components/ui/sheet.d.ts.map +1 -1
- package/dist/components/ui/sheet.js +54 -66
- package/dist/components/ui/sheet.js.map +1 -1
- package/dist/components/ui/sidebar.d.ts +34 -38
- package/dist/components/ui/sidebar.d.ts.map +1 -1
- package/dist/components/ui/sidebar.js +116 -124
- package/dist/components/ui/sidebar.js.map +1 -1
- package/dist/components/ui/skeleton.d.ts +1 -1
- package/dist/components/ui/skeleton.d.ts.map +1 -1
- package/dist/components/ui/skeleton.js +1 -2
- package/dist/components/ui/skeleton.js.map +1 -1
- package/dist/components/ui/slider.d.ts +1 -1
- package/dist/components/ui/slider.d.ts.map +1 -1
- package/dist/components/ui/slider.js +11 -30
- package/dist/components/ui/slider.js.map +1 -1
- package/dist/components/ui/sonner.d.ts +4 -2
- package/dist/components/ui/sonner.d.ts.map +1 -1
- package/dist/components/ui/sonner.js +7 -4
- package/dist/components/ui/sonner.js.map +1 -1
- package/dist/components/ui/spinner.d.ts +4 -0
- package/dist/components/ui/spinner.d.ts.map +1 -0
- package/dist/components/ui/spinner.js +16 -0
- package/dist/components/ui/spinner.js.map +1 -0
- package/dist/components/ui/switch.d.ts +2 -2
- package/dist/components/ui/switch.d.ts.map +1 -1
- package/dist/components/ui/switch.js +7 -9
- package/dist/components/ui/switch.js.map +1 -1
- package/dist/components/ui/table.d.ts +8 -8
- package/dist/components/ui/table.d.ts.map +1 -1
- package/dist/components/ui/table.js +36 -45
- package/dist/components/ui/table.js.map +1 -1
- package/dist/components/ui/tabs.d.ts +4 -4
- package/dist/components/ui/tabs.d.ts.map +1 -1
- package/dist/components/ui/tabs.js +17 -26
- package/dist/components/ui/tabs.js.map +1 -1
- package/dist/components/ui/textarea.d.ts +1 -1
- package/dist/components/ui/textarea.d.ts.map +1 -1
- package/dist/components/ui/textarea.js +6 -7
- package/dist/components/ui/textarea.js.map +1 -1
- package/dist/components/ui/toggle-group.d.ts +8 -3
- package/dist/components/ui/toggle-group.d.ts.map +1 -1
- package/dist/components/ui/toggle-group.js +11 -15
- package/dist/components/ui/toggle-group.js.map +1 -1
- package/dist/components/ui/toggle.d.ts +4 -1
- package/dist/components/ui/toggle.d.ts.map +1 -1
- package/dist/components/ui/toggle.js +7 -8
- package/dist/components/ui/toggle.js.map +1 -1
- package/dist/components/ui/tooltip.d.ts +4 -4
- package/dist/components/ui/tooltip.d.ts.map +1 -1
- package/dist/components/ui/tooltip.js +13 -38
- package/dist/components/ui/tooltip.js.map +1 -1
- package/dist/components/ui/typewriter.d.ts.map +1 -1
- package/dist/components/ui/typewriter.js +2 -6
- package/dist/components/ui/typewriter.js.map +1 -1
- package/dist/index.css +839 -1126
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +9 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -3
- package/package.json +37 -2
- package/src/components/ui/accordion.tsx +43 -44
- package/src/components/ui/alert-dialog.tsx +88 -99
- package/src/components/ui/alert.tsx +24 -25
- package/src/components/ui/aspect-ratio.tsx +1 -9
- package/src/components/ui/avatar.tsx +33 -27
- package/src/components/ui/badge.tsx +8 -16
- package/src/components/ui/breadcrumb.tsx +70 -73
- package/src/components/ui/button-group.tsx +69 -0
- package/src/components/ui/button.tsx +18 -24
- package/src/components/ui/calendar.tsx +20 -20
- package/src/components/ui/card.tsx +52 -71
- package/src/components/ui/carousel.tsx +145 -133
- package/src/components/ui/chart.tsx +174 -182
- package/src/components/ui/checkbox.tsx +18 -18
- package/src/components/ui/collapsible.tsx +2 -26
- package/src/components/ui/command.tsx +101 -99
- package/src/components/ui/context-menu.tsx +150 -193
- package/src/components/ui/dialog.tsx +75 -110
- package/src/components/ui/drawer.tsx +74 -102
- package/src/components/ui/dropdown-menu.tsx +153 -200
- package/src/components/ui/dropdrawer.tsx +0 -5
- package/src/components/ui/empty.tsx +86 -0
- package/src/components/ui/field.tsx +199 -0
- package/src/components/ui/form.tsx +49 -50
- package/src/components/ui/hover-card.tsx +18 -37
- package/src/components/ui/input-group.tsx +145 -0
- package/src/components/ui/input-otp.tsx +49 -59
- package/src/components/ui/input.tsx +5 -6
- package/src/components/ui/item.tsx +163 -0
- package/src/components/ui/kbd.tsx +31 -0
- package/src/components/ui/label.tsx +14 -12
- package/src/components/ui/menubar.tsx +178 -201
- package/src/components/ui/navigation-menu.tsx +84 -100
- package/src/components/ui/pagination.tsx +75 -85
- package/src/components/ui/popover.tsx +19 -38
- package/src/components/ui/progress.tsx +15 -14
- package/src/components/ui/radio-group.tsx +19 -13
- package/src/components/ui/resizable.tsx +23 -36
- package/src/components/ui/scroll-area.tsx +32 -35
- package/src/components/ui/select.tsx +112 -127
- package/src/components/ui/separator.tsx +17 -19
- package/src/components/ui/sheet.tsx +87 -108
- package/src/components/ui/sidebar.tsx +276 -279
- package/src/components/ui/skeleton.tsx +2 -3
- package/src/components/ui/slider.tsx +15 -40
- package/src/components/ui/sonner.tsx +15 -9
- package/src/components/ui/spinner.tsx +18 -0
- package/src/components/ui/switch.tsx +18 -17
- package/src/components/ui/table.tsx +66 -71
- package/src/components/ui/tabs.tsx +36 -36
- package/src/components/ui/textarea.tsx +5 -4
- package/src/components/ui/toggle-group.tsx +21 -34
- package/src/components/ui/toggle.tsx +14 -16
- package/src/components/ui/tooltip.tsx +19 -43
- package/src/components/ui/typewriter.tsx +3 -4
- package/src/index.css +6 -6
- package/src/index.ts +43 -4
|
@@ -1,103 +1,93 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import {ChevronLeft, ChevronRight, MoreHorizontal} from "lucide-react";
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import {ButtonProps, buttonVariants} from "@/components/ui/button";
|
|
7
7
|
import {cn} from "@/lib/utilities";
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
);
|
|
19
|
-
}
|
|
9
|
+
const Pagination = ({className, ...props}: React.ComponentProps<"nav">) => (
|
|
10
|
+
<nav
|
|
11
|
+
role='navigation'
|
|
12
|
+
aria-label='pagination'
|
|
13
|
+
className={cn("mx-auto flex w-full justify-center", className)}
|
|
14
|
+
{...props}
|
|
15
|
+
/>
|
|
16
|
+
);
|
|
17
|
+
Pagination.displayName = "Pagination";
|
|
20
18
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
19
|
+
const PaginationContent = React.forwardRef<HTMLUListElement, React.ComponentProps<"ul">>(({className, ...props}, ref) => (
|
|
20
|
+
<ul
|
|
21
|
+
ref={ref}
|
|
22
|
+
className={cn("flex flex-row items-center gap-1", className)}
|
|
23
|
+
{...props}
|
|
24
|
+
/>
|
|
25
|
+
));
|
|
26
|
+
PaginationContent.displayName = "PaginationContent";
|
|
30
27
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
28
|
+
const PaginationItem = React.forwardRef<HTMLLIElement, React.ComponentProps<"li">>(({className, ...props}, ref) => (
|
|
29
|
+
<li
|
|
30
|
+
ref={ref}
|
|
31
|
+
className={cn("", className)}
|
|
32
|
+
{...props}
|
|
33
|
+
/>
|
|
34
|
+
));
|
|
35
|
+
PaginationItem.displayName = "PaginationItem";
|
|
39
36
|
|
|
40
37
|
type PaginationLinkProps = {
|
|
41
38
|
isActive?: boolean;
|
|
42
|
-
} & Pick<
|
|
39
|
+
} & Pick<ButtonProps, "size">
|
|
43
40
|
& React.ComponentProps<"a">;
|
|
44
41
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
</a>
|
|
61
|
-
);
|
|
62
|
-
}
|
|
42
|
+
const PaginationLink = ({className, isActive, size = "icon", ...props}: PaginationLinkProps) => (
|
|
43
|
+
// eslint-disable-next-line jsx-a11y/anchor-has-content -- the link will have children.
|
|
44
|
+
<a
|
|
45
|
+
aria-current={isActive ? "page" : undefined}
|
|
46
|
+
className={cn(
|
|
47
|
+
buttonVariants({
|
|
48
|
+
variant: isActive ? "outline" : "ghost",
|
|
49
|
+
size,
|
|
50
|
+
}),
|
|
51
|
+
className,
|
|
52
|
+
)}
|
|
53
|
+
{...props}
|
|
54
|
+
/>
|
|
55
|
+
);
|
|
56
|
+
PaginationLink.displayName = "PaginationLink";
|
|
63
57
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
}
|
|
58
|
+
const PaginationPrevious = ({className, ...props}: React.ComponentProps<typeof PaginationLink>) => (
|
|
59
|
+
<PaginationLink
|
|
60
|
+
aria-label='Go to previous page'
|
|
61
|
+
size='default'
|
|
62
|
+
className={cn("gap-1 pl-2.5", className)}
|
|
63
|
+
{...props}>
|
|
64
|
+
<ChevronLeft className='h-4 w-4' />
|
|
65
|
+
<span>Previous</span>
|
|
66
|
+
</PaginationLink>
|
|
67
|
+
);
|
|
68
|
+
PaginationPrevious.displayName = "PaginationPrevious";
|
|
76
69
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}
|
|
70
|
+
const PaginationNext = ({className, ...props}: React.ComponentProps<typeof PaginationLink>) => (
|
|
71
|
+
<PaginationLink
|
|
72
|
+
aria-label='Go to next page'
|
|
73
|
+
size='default'
|
|
74
|
+
className={cn("gap-1 pr-2.5", className)}
|
|
75
|
+
{...props}>
|
|
76
|
+
<span>Next</span>
|
|
77
|
+
<ChevronRight className='h-4 w-4' />
|
|
78
|
+
</PaginationLink>
|
|
79
|
+
);
|
|
80
|
+
PaginationNext.displayName = "PaginationNext";
|
|
89
81
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
);
|
|
101
|
-
}
|
|
82
|
+
const PaginationEllipsis = ({className, ...props}: React.ComponentProps<"span">) => (
|
|
83
|
+
<span
|
|
84
|
+
aria-hidden
|
|
85
|
+
className={cn("flex h-9 w-9 items-center justify-center", className)}
|
|
86
|
+
{...props}>
|
|
87
|
+
<MoreHorizontal className='h-4 w-4' />
|
|
88
|
+
<span className='sr-only'>More pages</span>
|
|
89
|
+
</span>
|
|
90
|
+
);
|
|
91
|
+
PaginationEllipsis.displayName = "PaginationEllipsis";
|
|
102
92
|
|
|
103
93
|
export {Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious};
|
|
@@ -5,48 +5,29 @@ import * as React from "react";
|
|
|
5
5
|
|
|
6
6
|
import {cn} from "@/lib/utilities";
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
return (
|
|
10
|
-
<PopoverPrimitive.Root
|
|
11
|
-
data-slot='popover'
|
|
12
|
-
{...props}
|
|
13
|
-
/>
|
|
14
|
-
);
|
|
15
|
-
}
|
|
8
|
+
const Popover = PopoverPrimitive.Root;
|
|
16
9
|
|
|
17
|
-
|
|
18
|
-
return (
|
|
19
|
-
<PopoverPrimitive.Trigger
|
|
20
|
-
data-slot='popover-trigger'
|
|
21
|
-
{...props}
|
|
22
|
-
/>
|
|
23
|
-
);
|
|
24
|
-
}
|
|
10
|
+
const PopoverTrigger = PopoverPrimitive.Trigger;
|
|
25
11
|
|
|
26
|
-
|
|
27
|
-
return (
|
|
28
|
-
<PopoverPrimitive.Portal>
|
|
29
|
-
<PopoverPrimitive.Content
|
|
30
|
-
data-slot='popover-content'
|
|
31
|
-
align={align}
|
|
32
|
-
sideOffset={sideOffset}
|
|
33
|
-
className={cn(
|
|
34
|
-
"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 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border border-neutral-200 bg-white p-4 text-neutral-950 shadow-md outline-hidden dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50",
|
|
35
|
-
className,
|
|
36
|
-
)}
|
|
37
|
-
{...props}
|
|
38
|
-
/>
|
|
39
|
-
</PopoverPrimitive.Portal>
|
|
40
|
-
);
|
|
41
|
-
}
|
|
12
|
+
const PopoverAnchor = PopoverPrimitive.Anchor;
|
|
42
13
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
14
|
+
const PopoverContent = React.forwardRef<
|
|
15
|
+
React.ComponentRef<typeof PopoverPrimitive.Content>,
|
|
16
|
+
React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>
|
|
17
|
+
>(({className, align = "center", sideOffset = 4, ...props}, ref) => (
|
|
18
|
+
<PopoverPrimitive.Portal>
|
|
19
|
+
<PopoverPrimitive.Content
|
|
20
|
+
ref={ref}
|
|
21
|
+
align={align}
|
|
22
|
+
sideOffset={sideOffset}
|
|
23
|
+
className={cn(
|
|
24
|
+
"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 z-50 w-72 origin-[--radix-popover-content-transform-origin] rounded-md border border-neutral-200 bg-white p-4 text-neutral-950 shadow-md outline-none dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50",
|
|
25
|
+
className,
|
|
26
|
+
)}
|
|
47
27
|
{...props}
|
|
48
28
|
/>
|
|
49
|
-
|
|
50
|
-
|
|
29
|
+
</PopoverPrimitive.Portal>
|
|
30
|
+
));
|
|
31
|
+
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
51
32
|
|
|
52
33
|
export {Popover, PopoverAnchor, PopoverContent, PopoverTrigger};
|
|
@@ -5,19 +5,20 @@ import * as React from "react";
|
|
|
5
5
|
|
|
6
6
|
import {cn} from "@/lib/utilities";
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
8
|
+
const Progress = React.forwardRef<
|
|
9
|
+
React.ComponentRef<typeof ProgressPrimitive.Root>,
|
|
10
|
+
React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root>
|
|
11
|
+
>(({className, value, ...props}, ref) => (
|
|
12
|
+
<ProgressPrimitive.Root
|
|
13
|
+
ref={ref}
|
|
14
|
+
className={cn("relative h-2 w-full overflow-hidden rounded-full bg-neutral-900/20 dark:bg-neutral-50/20", className)}
|
|
15
|
+
{...props}>
|
|
16
|
+
<ProgressPrimitive.Indicator
|
|
17
|
+
className='h-full w-full flex-1 bg-neutral-900 transition-all dark:bg-neutral-50'
|
|
18
|
+
style={{transform: `translateX(-${100 - (value || 0)}%)`}}
|
|
19
|
+
/>
|
|
20
|
+
</ProgressPrimitive.Root>
|
|
21
|
+
));
|
|
22
|
+
Progress.displayName = ProgressPrimitive.Root.displayName;
|
|
22
23
|
|
|
23
24
|
export {Progress};
|
|
@@ -1,37 +1,43 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
4
|
-
import {
|
|
4
|
+
import {Circle} from "lucide-react";
|
|
5
5
|
import * as React from "react";
|
|
6
6
|
|
|
7
7
|
import {cn} from "@/lib/utilities";
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
const RadioGroup = React.forwardRef<
|
|
10
|
+
React.ComponentRef<typeof RadioGroupPrimitive.Root>,
|
|
11
|
+
React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>
|
|
12
|
+
>(({className, ...props}, ref) => {
|
|
10
13
|
return (
|
|
11
14
|
<RadioGroupPrimitive.Root
|
|
12
|
-
|
|
13
|
-
className={cn("grid gap-3", className)}
|
|
15
|
+
className={cn("grid gap-2", className)}
|
|
14
16
|
{...props}
|
|
17
|
+
ref={ref}
|
|
15
18
|
/>
|
|
16
19
|
);
|
|
17
|
-
}
|
|
20
|
+
});
|
|
21
|
+
RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
|
|
18
22
|
|
|
19
|
-
|
|
23
|
+
const RadioGroupItem = React.forwardRef<
|
|
24
|
+
React.ComponentRef<typeof RadioGroupPrimitive.Item>,
|
|
25
|
+
React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>
|
|
26
|
+
>(({className, ...props}, ref) => {
|
|
20
27
|
return (
|
|
21
28
|
<RadioGroupPrimitive.Item
|
|
22
|
-
|
|
29
|
+
ref={ref}
|
|
23
30
|
className={cn(
|
|
24
|
-
"aspect-square
|
|
31
|
+
"aspect-square h-4 w-4 rounded-full border border-neutral-200 border-neutral-900 text-neutral-900 shadow focus:outline-none focus-visible:ring-1 focus-visible:ring-neutral-950 disabled:cursor-not-allowed disabled:opacity-50 dark:border-neutral-50 dark:border-neutral-800 dark:text-neutral-50 dark:focus-visible:ring-neutral-300",
|
|
25
32
|
className,
|
|
26
33
|
)}
|
|
27
34
|
{...props}>
|
|
28
|
-
<RadioGroupPrimitive.Indicator
|
|
29
|
-
|
|
30
|
-
className='relative flex items-center justify-center'>
|
|
31
|
-
<CircleIcon className='fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2' />
|
|
35
|
+
<RadioGroupPrimitive.Indicator className='flex items-center justify-center'>
|
|
36
|
+
<Circle className='fill-primary h-3.5 w-3.5' />
|
|
32
37
|
</RadioGroupPrimitive.Indicator>
|
|
33
38
|
</RadioGroupPrimitive.Item>
|
|
34
39
|
);
|
|
35
|
-
}
|
|
40
|
+
});
|
|
41
|
+
RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
|
|
36
42
|
|
|
37
43
|
export {RadioGroup, RadioGroupItem};
|
|
@@ -1,52 +1,39 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import {GripVertical} from "lucide-react";
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import * as ResizablePrimitive from "react-resizable-panels";
|
|
6
6
|
|
|
7
7
|
import {cn} from "@/lib/utilities";
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
/>
|
|
16
|
-
);
|
|
17
|
-
}
|
|
9
|
+
const ResizablePanelGroup = ({className, ...props}: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) => (
|
|
10
|
+
<ResizablePrimitive.PanelGroup
|
|
11
|
+
className={cn("flex h-full w-full data-[panel-group-direction=vertical]:flex-col", className)}
|
|
12
|
+
{...props}
|
|
13
|
+
/>
|
|
14
|
+
);
|
|
18
15
|
|
|
19
|
-
|
|
20
|
-
return (
|
|
21
|
-
<ResizablePrimitive.Panel
|
|
22
|
-
data-slot='resizable-panel'
|
|
23
|
-
{...props}
|
|
24
|
-
/>
|
|
25
|
-
);
|
|
26
|
-
}
|
|
16
|
+
const ResizablePanel = ResizablePrimitive.Panel;
|
|
27
17
|
|
|
28
|
-
|
|
18
|
+
const ResizableHandle = ({
|
|
29
19
|
withHandle,
|
|
30
20
|
className,
|
|
31
21
|
...props
|
|
32
22
|
}: React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {
|
|
33
23
|
withHandle?: boolean;
|
|
34
|
-
})
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
data-
|
|
38
|
-
className
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
</ResizablePrimitive.PanelResizeHandle>
|
|
49
|
-
);
|
|
50
|
-
}
|
|
24
|
+
}) => (
|
|
25
|
+
<ResizablePrimitive.PanelResizeHandle
|
|
26
|
+
className={cn(
|
|
27
|
+
"relative flex w-px items-center justify-center bg-neutral-200 after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-neutral-950 focus-visible:ring-offset-1 focus-visible:outline-none 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-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 dark:bg-neutral-800 dark:focus-visible:ring-neutral-300 [&[data-panel-group-direction=vertical]>div]:rotate-90",
|
|
28
|
+
className,
|
|
29
|
+
)}
|
|
30
|
+
{...props}>
|
|
31
|
+
{Boolean(withHandle) && (
|
|
32
|
+
<div className='z-10 flex h-4 w-3 items-center justify-center rounded-sm border border-neutral-200 bg-neutral-200 dark:border-neutral-800 dark:bg-neutral-800'>
|
|
33
|
+
<GripVertical className='h-2.5 w-2.5' />
|
|
34
|
+
</div>
|
|
35
|
+
)}
|
|
36
|
+
</ResizablePrimitive.PanelResizeHandle>
|
|
37
|
+
);
|
|
51
38
|
|
|
52
39
|
export {ResizableHandle, ResizablePanel, ResizablePanelGroup};
|
|
@@ -5,41 +5,38 @@ import * as React from "react";
|
|
|
5
5
|
|
|
6
6
|
import {cn} from "@/lib/utilities";
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
);
|
|
23
|
-
}
|
|
8
|
+
const ScrollArea = React.forwardRef<
|
|
9
|
+
React.ComponentRef<typeof ScrollAreaPrimitive.Root>,
|
|
10
|
+
React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root>
|
|
11
|
+
>(({className, children, ...props}, ref) => (
|
|
12
|
+
<ScrollAreaPrimitive.Root
|
|
13
|
+
ref={ref}
|
|
14
|
+
className={cn("relative overflow-hidden", className)}
|
|
15
|
+
{...props}>
|
|
16
|
+
<ScrollAreaPrimitive.Viewport className='h-full w-full rounded-[inherit]'>{children}</ScrollAreaPrimitive.Viewport>
|
|
17
|
+
<ScrollBar />
|
|
18
|
+
<ScrollAreaPrimitive.Corner />
|
|
19
|
+
</ScrollAreaPrimitive.Root>
|
|
20
|
+
));
|
|
21
|
+
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
|
|
24
22
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
23
|
+
const ScrollBar = React.forwardRef<
|
|
24
|
+
React.ComponentRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>,
|
|
25
|
+
React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>
|
|
26
|
+
>(({className, orientation = "vertical", ...props}, ref) => (
|
|
27
|
+
<ScrollAreaPrimitive.ScrollAreaScrollbar
|
|
28
|
+
ref={ref}
|
|
29
|
+
orientation={orientation}
|
|
30
|
+
className={cn(
|
|
31
|
+
"flex touch-none transition-colors select-none",
|
|
32
|
+
orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]",
|
|
33
|
+
orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]",
|
|
34
|
+
className,
|
|
35
|
+
)}
|
|
36
|
+
{...props}>
|
|
37
|
+
<ScrollAreaPrimitive.ScrollAreaThumb className='relative flex-1 rounded-full bg-neutral-200 dark:bg-neutral-800' />
|
|
38
|
+
</ScrollAreaPrimitive.ScrollAreaScrollbar>
|
|
39
|
+
));
|
|
40
|
+
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
|
44
41
|
|
|
45
42
|
export {ScrollArea, ScrollBar};
|