@arolariu/components 0.2.0 → 0.3.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/changelog.md +11 -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.d.ts.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 +30 -21
- 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 +3 -4
- package/dist/components/ui/collapsible.d.ts.map +1 -1
- package/dist/components/ui/collapsible.js +3 -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 +25 -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 +28 -27
- 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 +23 -26
- 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 +37 -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 -5
- package/dist/components/ui/resizable.d.ts.map +1 -1
- package/dist/components/ui/resizable.js +9 -21
- 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 +113 -122
- 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 +23 -25
- package/src/components/ui/aspect-ratio.tsx +1 -9
- package/src/components/ui/avatar.tsx +29 -24
- 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 -22
- package/src/components/ui/card.tsx +52 -71
- package/src/components/ui/carousel.tsx +145 -133
- package/src/components/ui/chart.tsx +173 -183
- package/src/components/ui/checkbox.tsx +18 -18
- package/src/components/ui/collapsible.tsx +3 -25
- package/src/components/ui/command.tsx +100 -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 +198 -0
- package/src/components/ui/form.tsx +47 -48
- 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 +85 -100
- package/src/components/ui/pagination.tsx +74 -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 -37
- 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 +262 -271
- package/src/components/ui/skeleton.tsx +2 -3
- package/src/components/ui/slider.tsx +10 -36
- 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
|
@@ -5,34 +5,39 @@ import * as React from "react";
|
|
|
5
5
|
|
|
6
6
|
import {cn} from "@/lib/utilities";
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
const Avatar = React.forwardRef<React.ElementRef<typeof AvatarPrimitive.Root>, React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>>(
|
|
9
|
+
({className, ...props}, ref) => (
|
|
10
10
|
<AvatarPrimitive.Root
|
|
11
|
-
|
|
12
|
-
className={cn("relative flex
|
|
11
|
+
ref={ref}
|
|
12
|
+
className={cn("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full", className)}
|
|
13
13
|
{...props}
|
|
14
14
|
/>
|
|
15
|
-
)
|
|
16
|
-
|
|
15
|
+
),
|
|
16
|
+
);
|
|
17
|
+
Avatar.displayName = AvatarPrimitive.Root.displayName;
|
|
17
18
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
19
|
+
const AvatarImage = React.forwardRef<
|
|
20
|
+
React.ElementRef<typeof AvatarPrimitive.Image>,
|
|
21
|
+
React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image>
|
|
22
|
+
>(({className, ...props}, ref) => (
|
|
23
|
+
<AvatarPrimitive.Image
|
|
24
|
+
ref={ref}
|
|
25
|
+
className={cn("aspect-square h-full w-full", className)}
|
|
26
|
+
{...props}
|
|
27
|
+
/>
|
|
28
|
+
));
|
|
29
|
+
AvatarImage.displayName = AvatarPrimitive.Image.displayName;
|
|
27
30
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
31
|
+
const AvatarFallback = React.forwardRef<
|
|
32
|
+
React.ElementRef<typeof AvatarPrimitive.Fallback>,
|
|
33
|
+
React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>
|
|
34
|
+
>(({className, ...props}, ref) => (
|
|
35
|
+
<AvatarPrimitive.Fallback
|
|
36
|
+
ref={ref}
|
|
37
|
+
className={cn("flex h-full w-full items-center justify-center rounded-full bg-neutral-100 dark:bg-neutral-800", className)}
|
|
38
|
+
{...props}
|
|
39
|
+
/>
|
|
40
|
+
));
|
|
41
|
+
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
|
|
37
42
|
|
|
38
43
|
export {Avatar, AvatarFallback, AvatarImage};
|
|
@@ -1,24 +1,22 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import {Slot} from "@radix-ui/react-slot";
|
|
4
3
|
import {cva, type VariantProps} from "class-variance-authority";
|
|
5
4
|
import * as React from "react";
|
|
6
5
|
|
|
7
6
|
import {cn} from "@/lib/utilities";
|
|
8
7
|
|
|
9
8
|
const badgeVariants = cva(
|
|
10
|
-
"inline-flex items-center
|
|
9
|
+
"inline-flex items-center rounded-md border border-neutral-200 px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-neutral-950 focus:ring-offset-2 dark:border-neutral-800 dark:focus:ring-neutral-300",
|
|
11
10
|
{
|
|
12
11
|
variants: {
|
|
13
12
|
variant: {
|
|
14
13
|
default:
|
|
15
|
-
"border-transparent bg-neutral-900 text-neutral-50
|
|
14
|
+
"border-transparent bg-neutral-900 text-neutral-50 shadow hover:bg-neutral-900/80 dark:bg-neutral-50 dark:text-neutral-900 dark:hover:bg-neutral-50/80",
|
|
16
15
|
secondary:
|
|
17
|
-
"border-transparent bg-neutral-100 text-neutral-900
|
|
16
|
+
"border-transparent bg-neutral-100 text-neutral-900 hover:bg-neutral-100/80 dark:bg-neutral-800 dark:text-neutral-50 dark:hover:bg-neutral-800/80",
|
|
18
17
|
destructive:
|
|
19
|
-
"border-transparent bg-red-500 text-
|
|
20
|
-
outline:
|
|
21
|
-
"text-neutral-950 [a&]:hover:bg-neutral-100 [a&]:hover:text-neutral-900 dark:text-neutral-50 dark:[a&]:hover:bg-neutral-800 dark:[a&]:hover:text-neutral-50",
|
|
18
|
+
"border-transparent bg-red-500 text-neutral-50 shadow hover:bg-red-500/80 dark:bg-red-900 dark:text-neutral-50 dark:hover:bg-red-900/80",
|
|
19
|
+
outline: "text-neutral-950 dark:text-neutral-50",
|
|
22
20
|
},
|
|
23
21
|
},
|
|
24
22
|
defaultVariants: {
|
|
@@ -27,17 +25,11 @@ const badgeVariants = cva(
|
|
|
27
25
|
},
|
|
28
26
|
);
|
|
29
27
|
|
|
30
|
-
|
|
31
|
-
className,
|
|
32
|
-
variant,
|
|
33
|
-
asChild = false,
|
|
34
|
-
...props
|
|
35
|
-
}: React.ComponentProps<"span"> & VariantProps<typeof badgeVariants> & {asChild?: boolean}) {
|
|
36
|
-
const Comp = asChild ? Slot : "span";
|
|
28
|
+
export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {}
|
|
37
29
|
|
|
30
|
+
function Badge({className, variant, ...props}: BadgeProps) {
|
|
38
31
|
return (
|
|
39
|
-
<
|
|
40
|
-
data-slot='badge'
|
|
32
|
+
<div
|
|
41
33
|
className={cn(badgeVariants({variant}), className)}
|
|
42
34
|
{...props}
|
|
43
35
|
/>
|
|
@@ -6,92 +6,89 @@ import * as React from "react";
|
|
|
6
6
|
|
|
7
7
|
import {cn} from "@/lib/utilities";
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
9
|
+
const Breadcrumb = React.forwardRef<
|
|
10
|
+
HTMLElement,
|
|
11
|
+
React.ComponentPropsWithoutRef<"nav"> & {
|
|
12
|
+
separator?: React.ReactNode;
|
|
13
|
+
}
|
|
14
|
+
>(({...props}, ref) => (
|
|
15
|
+
<nav
|
|
16
|
+
ref={ref}
|
|
17
|
+
aria-label='breadcrumb'
|
|
18
|
+
{...props}
|
|
19
|
+
/>
|
|
20
|
+
));
|
|
21
|
+
Breadcrumb.displayName = "Breadcrumb";
|
|
18
22
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
23
|
+
const BreadcrumbList = React.forwardRef<HTMLOListElement, React.ComponentPropsWithoutRef<"ol">>(({className, ...props}, ref) => (
|
|
24
|
+
<ol
|
|
25
|
+
ref={ref}
|
|
26
|
+
className={cn("flex flex-wrap items-center gap-1.5 text-sm break-words text-neutral-500 sm:gap-2.5 dark:text-neutral-400", className)}
|
|
27
|
+
{...props}
|
|
28
|
+
/>
|
|
29
|
+
));
|
|
30
|
+
BreadcrumbList.displayName = "BreadcrumbList";
|
|
28
31
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
32
|
+
const BreadcrumbItem = React.forwardRef<HTMLLIElement, React.ComponentPropsWithoutRef<"li">>(({className, ...props}, ref) => (
|
|
33
|
+
<li
|
|
34
|
+
ref={ref}
|
|
35
|
+
className={cn("inline-flex items-center gap-1.5", className)}
|
|
36
|
+
{...props}
|
|
37
|
+
/>
|
|
38
|
+
));
|
|
39
|
+
BreadcrumbItem.displayName = "BreadcrumbItem";
|
|
38
40
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
}) {
|
|
41
|
+
const BreadcrumbLink = React.forwardRef<
|
|
42
|
+
HTMLAnchorElement,
|
|
43
|
+
React.ComponentPropsWithoutRef<"a"> & {
|
|
44
|
+
asChild?: boolean;
|
|
45
|
+
}
|
|
46
|
+
>(({asChild, className, ...props}, ref) => {
|
|
46
47
|
const Comp = asChild ? Slot : "a";
|
|
47
48
|
|
|
48
49
|
return (
|
|
49
50
|
<Comp
|
|
50
|
-
|
|
51
|
+
ref={ref}
|
|
51
52
|
className={cn("transition-colors hover:text-neutral-950 dark:hover:text-neutral-50", className)}
|
|
52
53
|
{...props}
|
|
53
54
|
/>
|
|
54
55
|
);
|
|
55
|
-
}
|
|
56
|
+
});
|
|
57
|
+
BreadcrumbLink.displayName = "BreadcrumbLink";
|
|
56
58
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
59
|
+
const BreadcrumbPage = React.forwardRef<HTMLSpanElement, React.ComponentPropsWithoutRef<"span">>(({className, ...props}, ref) => (
|
|
60
|
+
<span
|
|
61
|
+
ref={ref}
|
|
62
|
+
role='link'
|
|
63
|
+
aria-disabled='true'
|
|
64
|
+
aria-current='page'
|
|
65
|
+
className={cn("font-normal text-neutral-950 dark:text-neutral-50", className)}
|
|
66
|
+
{...props}
|
|
67
|
+
/>
|
|
68
|
+
));
|
|
69
|
+
BreadcrumbPage.displayName = "BreadcrumbPage";
|
|
69
70
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
);
|
|
81
|
-
}
|
|
71
|
+
const BreadcrumbSeparator = ({children, className, ...props}: React.ComponentProps<"li">) => (
|
|
72
|
+
<li
|
|
73
|
+
role='presentation'
|
|
74
|
+
aria-hidden='true'
|
|
75
|
+
className={cn("[&>svg]:h-3.5 [&>svg]:w-3.5", className)}
|
|
76
|
+
{...props}>
|
|
77
|
+
{children ?? <ChevronRight />}
|
|
78
|
+
</li>
|
|
79
|
+
);
|
|
80
|
+
BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
|
|
82
81
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
);
|
|
95
|
-
}
|
|
82
|
+
const BreadcrumbEllipsis = ({className, ...props}: React.ComponentProps<"span">) => (
|
|
83
|
+
<span
|
|
84
|
+
role='presentation'
|
|
85
|
+
aria-hidden='true'
|
|
86
|
+
className={cn("flex h-9 w-9 items-center justify-center", className)}
|
|
87
|
+
{...props}>
|
|
88
|
+
<MoreHorizontal className='h-4 w-4' />
|
|
89
|
+
<span className='sr-only'>More</span>
|
|
90
|
+
</span>
|
|
91
|
+
);
|
|
92
|
+
BreadcrumbEllipsis.displayName = "BreadcrumbElipssis";
|
|
96
93
|
|
|
97
94
|
export {Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import {Slot} from "@radix-ui/react-slot";
|
|
4
|
+
import {cva, type VariantProps} from "class-variance-authority";
|
|
5
|
+
import * as React from "react";
|
|
6
|
+
|
|
7
|
+
import {Separator} from "@/components/ui/separator";
|
|
8
|
+
import {cn} from "@/lib/utilities";
|
|
9
|
+
|
|
10
|
+
const buttonGroupVariants = cva(
|
|
11
|
+
"flex w-fit items-stretch has-[>[data-slot=button-group]]:gap-2 [&>*]:focus-visible:relative [&>*]:focus-visible:z-10 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1",
|
|
12
|
+
{
|
|
13
|
+
variants: {
|
|
14
|
+
orientation: {
|
|
15
|
+
horizontal: "[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none",
|
|
16
|
+
vertical:
|
|
17
|
+
"flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none",
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
defaultVariants: {
|
|
21
|
+
orientation: "horizontal",
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
function ButtonGroup({className, orientation, ...props}: React.ComponentProps<"div"> & VariantProps<typeof buttonGroupVariants>) {
|
|
27
|
+
return (
|
|
28
|
+
<div
|
|
29
|
+
role='group'
|
|
30
|
+
data-slot='button-group'
|
|
31
|
+
data-orientation={orientation}
|
|
32
|
+
className={cn(buttonGroupVariants({orientation}), className)}
|
|
33
|
+
{...props}
|
|
34
|
+
/>
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function ButtonGroupText({
|
|
39
|
+
className,
|
|
40
|
+
asChild = false,
|
|
41
|
+
...props
|
|
42
|
+
}: React.ComponentProps<"div"> & {
|
|
43
|
+
asChild?: boolean;
|
|
44
|
+
}) {
|
|
45
|
+
const Comp = asChild ? Slot : "div";
|
|
46
|
+
|
|
47
|
+
return (
|
|
48
|
+
<Comp
|
|
49
|
+
className={cn(
|
|
50
|
+
"flex items-center gap-2 rounded-md border border-neutral-200 bg-neutral-100 px-4 text-sm font-medium shadow-xs dark:border-neutral-800 dark:bg-neutral-800 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
|
|
51
|
+
className,
|
|
52
|
+
)}
|
|
53
|
+
{...props}
|
|
54
|
+
/>
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function ButtonGroupSeparator({className, orientation = "vertical", ...props}: React.ComponentProps<typeof Separator>) {
|
|
59
|
+
return (
|
|
60
|
+
<Separator
|
|
61
|
+
data-slot='button-group-separator'
|
|
62
|
+
orientation={orientation}
|
|
63
|
+
className={cn("relative !m-0 self-stretch bg-neutral-200 data-[orientation=vertical]:h-auto dark:bg-neutral-800", className)}
|
|
64
|
+
{...props}
|
|
65
|
+
/>
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export {ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants};
|
|
@@ -7,27 +7,26 @@ import * as React from "react";
|
|
|
7
7
|
import {cn} from "@/lib/utilities";
|
|
8
8
|
|
|
9
9
|
const buttonVariants = cva(
|
|
10
|
-
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-
|
|
10
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-neutral-950 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 dark:focus-visible:ring-neutral-300",
|
|
11
11
|
{
|
|
12
12
|
variants: {
|
|
13
13
|
variant: {
|
|
14
14
|
default:
|
|
15
|
-
"bg-neutral-900 text-neutral-50 shadow
|
|
15
|
+
"bg-neutral-900 text-neutral-50 shadow hover:bg-neutral-900/90 dark:bg-neutral-50 dark:text-neutral-900 dark:hover:bg-neutral-50/90",
|
|
16
16
|
destructive:
|
|
17
|
-
"bg-red-500 text-
|
|
17
|
+
"bg-red-500 text-neutral-50 shadow-sm hover:bg-red-500/90 dark:bg-red-900 dark:text-neutral-50 dark:hover:bg-red-900/90",
|
|
18
18
|
outline:
|
|
19
|
-
"border bg-white shadow-
|
|
19
|
+
"border border-neutral-200 bg-white shadow-sm hover:bg-neutral-100 hover:text-neutral-900 dark:border-neutral-800 dark:bg-neutral-950 dark:hover:bg-neutral-800 dark:hover:text-neutral-50",
|
|
20
20
|
secondary:
|
|
21
|
-
"bg-neutral-100 text-neutral-900 shadow-
|
|
22
|
-
ghost:
|
|
23
|
-
"hover:bg-neutral-100 hover:text-neutral-900 dark:hover:bg-neutral-100/50 dark:hover:bg-neutral-800 dark:hover:text-neutral-50 dark:dark:hover:bg-neutral-800/50",
|
|
21
|
+
"bg-neutral-100 text-neutral-900 shadow-sm hover:bg-neutral-100/80 dark:bg-neutral-800 dark:text-neutral-50 dark:hover:bg-neutral-800/80",
|
|
22
|
+
ghost: "hover:bg-neutral-100 hover:text-neutral-900 dark:hover:bg-neutral-800 dark:hover:text-neutral-50",
|
|
24
23
|
link: "text-neutral-900 underline-offset-4 hover:underline dark:text-neutral-50",
|
|
25
24
|
},
|
|
26
25
|
size: {
|
|
27
|
-
default: "h-9 px-4 py-2
|
|
28
|
-
sm: "h-8 rounded-md
|
|
29
|
-
lg: "h-10 rounded-md px-
|
|
30
|
-
icon: "
|
|
26
|
+
default: "h-9 px-4 py-2",
|
|
27
|
+
sm: "h-8 rounded-md px-3 text-xs",
|
|
28
|
+
lg: "h-10 rounded-md px-8",
|
|
29
|
+
icon: "h-9 w-9",
|
|
31
30
|
},
|
|
32
31
|
},
|
|
33
32
|
defaultVariants: {
|
|
@@ -37,25 +36,20 @@ const buttonVariants = cva(
|
|
|
37
36
|
},
|
|
38
37
|
);
|
|
39
38
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
size,
|
|
44
|
-
asChild = false,
|
|
45
|
-
...props
|
|
46
|
-
}: React.ComponentProps<"button">
|
|
47
|
-
& VariantProps<typeof buttonVariants> & {
|
|
48
|
-
asChild?: boolean;
|
|
49
|
-
}) {
|
|
50
|
-
const Comp = asChild ? Slot : "button";
|
|
39
|
+
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
40
|
+
asChild?: boolean;
|
|
41
|
+
}
|
|
51
42
|
|
|
43
|
+
const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(({className, variant, size, asChild = false, ...props}, ref) => {
|
|
44
|
+
const Comp = asChild ? Slot : "button";
|
|
52
45
|
return (
|
|
53
46
|
<Comp
|
|
54
|
-
data-slot='button'
|
|
55
47
|
className={cn(buttonVariants({variant, size, className}))}
|
|
48
|
+
ref={ref}
|
|
56
49
|
{...props}
|
|
57
50
|
/>
|
|
58
51
|
);
|
|
59
|
-
}
|
|
52
|
+
});
|
|
53
|
+
Button.displayName = "Button";
|
|
60
54
|
|
|
61
55
|
export {Button, buttonVariants};
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
/* eslint-disable */
|
|
4
|
-
|
|
5
3
|
import {ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon} from "lucide-react";
|
|
6
4
|
import * as React from "react";
|
|
7
5
|
import {DayButton, DayPicker, getDefaultClassNames} from "react-day-picker";
|
|
@@ -27,7 +25,7 @@ function Calendar({
|
|
|
27
25
|
<DayPicker
|
|
28
26
|
showOutsideDays={showOutsideDays}
|
|
29
27
|
className={cn(
|
|
30
|
-
"group/calendar bg-white p-3 [--cell-size
|
|
28
|
+
"group/calendar bg-white p-3 [--cell-size:2rem] dark:bg-neutral-950 [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",
|
|
31
29
|
String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
|
|
32
30
|
String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
|
|
33
31
|
className,
|
|
@@ -39,49 +37,49 @@ function Calendar({
|
|
|
39
37
|
}}
|
|
40
38
|
classNames={{
|
|
41
39
|
root: cn("w-fit", defaultClassNames.root),
|
|
42
|
-
months: cn("flex gap-4
|
|
43
|
-
month: cn("flex flex-col
|
|
44
|
-
nav: cn("
|
|
40
|
+
months: cn("relative flex flex-col gap-4 md:flex-row", defaultClassNames.months),
|
|
41
|
+
month: cn("flex w-full flex-col gap-4", defaultClassNames.month),
|
|
42
|
+
nav: cn("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1", defaultClassNames.nav),
|
|
45
43
|
button_previous: cn(
|
|
46
44
|
buttonVariants({variant: buttonVariant}),
|
|
47
|
-
"size-
|
|
45
|
+
"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",
|
|
48
46
|
defaultClassNames.button_previous,
|
|
49
47
|
),
|
|
50
48
|
button_next: cn(
|
|
51
49
|
buttonVariants({variant: buttonVariant}),
|
|
52
|
-
"size-
|
|
50
|
+
"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",
|
|
53
51
|
defaultClassNames.button_next,
|
|
54
52
|
),
|
|
55
|
-
month_caption: cn("flex
|
|
56
|
-
dropdowns: cn("w-full
|
|
53
|
+
month_caption: cn("flex h-[--cell-size] w-full items-center justify-center px-[--cell-size]", defaultClassNames.month_caption),
|
|
54
|
+
dropdowns: cn("flex h-[--cell-size] w-full items-center justify-center gap-1.5 text-sm font-medium", defaultClassNames.dropdowns),
|
|
57
55
|
dropdown_root: cn(
|
|
58
|
-
"
|
|
56
|
+
"has-focus:border-neutral-950 border-neutral-200 shadow-xs has-focus:ring-neutral-950/50 has-focus:ring-[3px] relative rounded-md border dark:has-focus:border-neutral-300 dark:border-neutral-800 dark:has-focus:ring-neutral-300/50",
|
|
59
57
|
defaultClassNames.dropdown_root,
|
|
60
58
|
),
|
|
61
|
-
dropdown: cn("
|
|
59
|
+
dropdown: cn("bg-white absolute inset-0 opacity-0 dark:bg-neutral-950", defaultClassNames.dropdown),
|
|
62
60
|
caption_label: cn(
|
|
63
61
|
"select-none font-medium",
|
|
64
62
|
captionLayout === "label"
|
|
65
63
|
? "text-sm"
|
|
66
|
-
: "
|
|
64
|
+
: "[&>svg]:text-neutral-500 flex h-8 items-center gap-1 rounded-md pl-2 pr-1 text-sm [&>svg]:size-3.5 dark:[&>svg]:text-neutral-400",
|
|
67
65
|
defaultClassNames.caption_label,
|
|
68
66
|
),
|
|
69
67
|
table: "w-full border-collapse",
|
|
70
68
|
weekdays: cn("flex", defaultClassNames.weekdays),
|
|
71
69
|
weekday: cn(
|
|
72
|
-
"text-neutral-500
|
|
70
|
+
"text-neutral-500 flex-1 select-none rounded-md text-[0.8rem] font-normal dark:text-neutral-400",
|
|
73
71
|
defaultClassNames.weekday,
|
|
74
72
|
),
|
|
75
|
-
week: cn("flex w-full
|
|
76
|
-
week_number_header: cn("
|
|
77
|
-
week_number: cn("text-
|
|
73
|
+
week: cn("mt-2 flex w-full", defaultClassNames.week),
|
|
74
|
+
week_number_header: cn("w-[--cell-size] select-none", defaultClassNames.week_number_header),
|
|
75
|
+
week_number: cn("text-neutral-500 select-none text-[0.8rem] dark:text-neutral-400", defaultClassNames.week_number),
|
|
78
76
|
day: cn(
|
|
79
|
-
"relative
|
|
77
|
+
"group/day relative aspect-square h-full w-full select-none p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md",
|
|
80
78
|
defaultClassNames.day,
|
|
81
79
|
),
|
|
82
|
-
range_start: cn("rounded-l-md
|
|
80
|
+
range_start: cn("bg-neutral-100 rounded-l-md dark:bg-neutral-800", defaultClassNames.range_start),
|
|
83
81
|
range_middle: cn("rounded-none", defaultClassNames.range_middle),
|
|
84
|
-
range_end: cn("rounded-r-md
|
|
82
|
+
range_end: cn("bg-neutral-100 rounded-r-md dark:bg-neutral-800", defaultClassNames.range_end),
|
|
85
83
|
today: cn(
|
|
86
84
|
"bg-neutral-100 text-neutral-900 rounded-md data-[selected=true]:rounded-none dark:bg-neutral-800 dark:text-neutral-50",
|
|
87
85
|
defaultClassNames.today,
|
|
@@ -135,7 +133,7 @@ function Calendar({
|
|
|
135
133
|
WeekNumber: ({children, ...props}) => {
|
|
136
134
|
return (
|
|
137
135
|
<td {...props}>
|
|
138
|
-
<div className='flex size-
|
|
136
|
+
<div className='flex size-[--cell-size] items-center justify-center text-center'>{children}</div>
|
|
139
137
|
</td>
|
|
140
138
|
);
|
|
141
139
|
},
|
|
@@ -165,7 +163,7 @@ function CalendarDayButton({className, day, modifiers, ...props}: React.Componen
|
|
|
165
163
|
data-range-end={modifiers["range_end"]}
|
|
166
164
|
data-range-middle={modifiers["range_middle"]}
|
|
167
165
|
className={cn(
|
|
168
|
-
"group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 flex aspect-square
|
|
166
|
+
"group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 flex aspect-square h-auto w-full min-w-[--cell-size] flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-md data-[range-end=true]:bg-neutral-900 data-[range-end=true]:text-neutral-50 data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-neutral-100 data-[range-middle=true]:text-neutral-900 data-[range-start=true]:rounded-md data-[range-start=true]:bg-neutral-900 data-[range-start=true]:text-neutral-50 data-[selected-single=true]:bg-neutral-900 data-[selected-single=true]:text-neutral-50 dark:data-[range-end=true]:bg-neutral-50 dark:data-[range-end=true]:text-neutral-900 dark:data-[range-middle=true]:bg-neutral-800 dark:data-[range-middle=true]:text-neutral-50 dark:data-[range-start=true]:bg-neutral-50 dark:data-[range-start=true]:text-neutral-900 dark:data-[selected-single=true]:bg-neutral-50 dark:data-[selected-single=true]:text-neutral-900 [&>span]:text-xs [&>span]:opacity-70",
|
|
169
167
|
defaultClassNames.day,
|
|
170
168
|
className,
|
|
171
169
|
)}
|