@arolariu/components 0.0.31 → 0.0.33
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/LICENSE +21 -0
- package/changelog.md +14 -0
- package/dist/cjs/components/ui/alert-dialog.cjs.map +1 -1
- package/dist/cjs/components/ui/alert.cjs +1 -1
- package/dist/cjs/components/ui/alert.cjs.map +1 -1
- package/dist/cjs/components/ui/aspect-ratio.cjs.map +1 -1
- package/dist/cjs/components/ui/avatar.cjs.map +1 -1
- package/dist/cjs/components/ui/badge.cjs.map +1 -1
- package/dist/cjs/components/ui/breadcrumb.cjs.map +1 -1
- package/dist/cjs/components/ui/button.cjs.map +1 -1
- package/dist/cjs/components/ui/calendar.cjs.map +1 -1
- package/dist/cjs/components/ui/card.cjs.map +1 -1
- package/dist/cjs/components/ui/carousel.cjs.map +1 -1
- package/dist/cjs/components/ui/chart.cjs.map +1 -1
- package/dist/cjs/components/ui/checkbox.cjs.map +1 -1
- package/dist/cjs/components/ui/collapsible.cjs.map +1 -1
- package/dist/cjs/components/ui/command.cjs.map +1 -1
- package/dist/cjs/components/ui/context-menu.cjs.map +1 -1
- package/dist/cjs/components/ui/drawer.cjs.map +1 -1
- package/dist/cjs/components/ui/dropdown-menu.cjs.map +1 -1
- package/dist/cjs/components/ui/form.cjs.map +1 -1
- package/dist/cjs/components/ui/hover-card.cjs.map +1 -1
- package/dist/cjs/components/ui/input-otp.cjs.map +1 -1
- package/dist/cjs/components/ui/input.cjs.map +1 -1
- package/dist/cjs/components/ui/label.cjs.map +1 -1
- package/dist/cjs/components/ui/menubar.cjs.map +1 -1
- package/dist/cjs/components/ui/navigation-menu.cjs.map +1 -1
- package/dist/cjs/components/ui/pagination.cjs.map +1 -1
- package/dist/cjs/components/ui/popover.cjs.map +1 -1
- package/dist/cjs/components/ui/progress.cjs.map +1 -1
- package/dist/cjs/components/ui/radio-group.cjs.map +1 -1
- package/dist/cjs/components/ui/resizable.cjs.map +1 -1
- package/dist/cjs/components/ui/scroll-area.cjs.map +1 -1
- package/dist/cjs/components/ui/select.cjs.map +1 -1
- package/dist/cjs/components/ui/separator.cjs.map +1 -1
- package/dist/cjs/components/ui/sheet.cjs.map +1 -1
- package/dist/cjs/components/ui/sidebar.cjs.map +1 -1
- package/dist/cjs/components/ui/skeleton.cjs.map +1 -1
- package/dist/cjs/components/ui/slider.cjs.map +1 -1
- package/dist/cjs/components/ui/sonner.cjs +1 -1
- package/dist/cjs/components/ui/sonner.cjs.map +1 -1
- package/dist/cjs/components/ui/switch.cjs.map +1 -1
- package/dist/cjs/components/ui/table.cjs.map +1 -1
- package/dist/cjs/components/ui/tabs.cjs.map +1 -1
- package/dist/cjs/components/ui/textarea.cjs.map +1 -1
- package/dist/cjs/components/ui/toggle-group.cjs.map +1 -1
- package/dist/cjs/components/ui/toggle.cjs.map +1 -1
- package/dist/cjs/components/ui/tooltip.cjs.map +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/index.css +1 -0
- package/dist/cjs/node_modules/sonner/dist/index.cjs +1 -1
- package/dist/cjs/node_modules/sonner/dist/index.cjs.map +1 -1
- package/dist/esm/components/ui/alert-dialog.js.map +1 -1
- package/dist/esm/components/ui/alert.js +8 -8
- package/dist/esm/components/ui/alert.js.map +1 -1
- package/dist/esm/components/ui/aspect-ratio.js.map +1 -1
- package/dist/esm/components/ui/avatar.js.map +1 -1
- package/dist/esm/components/ui/badge.js.map +1 -1
- package/dist/esm/components/ui/breadcrumb.js.map +1 -1
- package/dist/esm/components/ui/button.js.map +1 -1
- package/dist/esm/components/ui/calendar.js.map +1 -1
- package/dist/esm/components/ui/card.js.map +1 -1
- package/dist/esm/components/ui/carousel.js.map +1 -1
- package/dist/esm/components/ui/chart.js.map +1 -1
- package/dist/esm/components/ui/checkbox.js.map +1 -1
- package/dist/esm/components/ui/collapsible.js.map +1 -1
- package/dist/esm/components/ui/command.js.map +1 -1
- package/dist/esm/components/ui/context-menu.js.map +1 -1
- package/dist/esm/components/ui/drawer.js.map +1 -1
- package/dist/esm/components/ui/dropdown-menu.js.map +1 -1
- package/dist/esm/components/ui/form.js.map +1 -1
- package/dist/esm/components/ui/hover-card.js.map +1 -1
- package/dist/esm/components/ui/input-otp.js.map +1 -1
- package/dist/esm/components/ui/input.js.map +1 -1
- package/dist/esm/components/ui/label.js.map +1 -1
- package/dist/esm/components/ui/menubar.js.map +1 -1
- package/dist/esm/components/ui/navigation-menu.js.map +1 -1
- package/dist/esm/components/ui/pagination.js.map +1 -1
- package/dist/esm/components/ui/popover.js.map +1 -1
- package/dist/esm/components/ui/progress.js.map +1 -1
- package/dist/esm/components/ui/radio-group.js.map +1 -1
- package/dist/esm/components/ui/resizable.js.map +1 -1
- package/dist/esm/components/ui/scroll-area.js.map +1 -1
- package/dist/esm/components/ui/select.js.map +1 -1
- package/dist/esm/components/ui/separator.js.map +1 -1
- package/dist/esm/components/ui/sheet.js.map +1 -1
- package/dist/esm/components/ui/sidebar.js.map +1 -1
- package/dist/esm/components/ui/skeleton.js.map +1 -1
- package/dist/esm/components/ui/slider.js.map +1 -1
- package/dist/esm/components/ui/sonner.js +3 -1
- package/dist/esm/components/ui/sonner.js.map +1 -1
- package/dist/esm/components/ui/switch.js.map +1 -1
- package/dist/esm/components/ui/table.js.map +1 -1
- package/dist/esm/components/ui/tabs.js.map +1 -1
- package/dist/esm/components/ui/textarea.js.map +1 -1
- package/dist/esm/components/ui/toggle-group.js.map +1 -1
- package/dist/esm/components/ui/toggle.js.map +1 -1
- package/dist/esm/components/ui/tooltip.js.map +1 -1
- package/dist/esm/index.css +1 -0
- package/dist/esm/index.js +296 -293
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/node_modules/sonner/dist/index.js +4 -4
- package/dist/esm/node_modules/sonner/dist/index.js.map +1 -1
- package/dist/index.css +1 -0
- package/dist/index.js +300 -0
- package/dist/types/components/ui/alert.d.ts.map +1 -1
- package/dist/types/components/ui/form.d.ts.map +1 -1
- package/dist/types/components/ui/sonner.d.ts +2 -2
- package/dist/types/components/ui/sonner.d.ts.map +1 -1
- package/dist/types/index.d.ts +3 -0
- package/package.json +77 -45
- package/src/components/ui/alert-dialog.tsx +160 -160
- package/src/components/ui/alert.tsx +2 -0
- package/src/components/ui/aspect-ratio.tsx +12 -12
- package/src/components/ui/avatar.tsx +52 -52
- package/src/components/ui/badge.tsx +47 -47
- package/src/components/ui/breadcrumb.tsx +116 -116
- package/src/components/ui/button.tsx +60 -60
- package/src/components/ui/calendar.tsx +75 -75
- package/src/components/ui/card.tsx +79 -79
- package/src/components/ui/carousel.tsx +240 -240
- package/src/components/ui/chart.tsx +352 -352
- package/src/components/ui/checkbox.tsx +31 -31
- package/src/components/ui/collapsible.tsx +34 -34
- package/src/components/ui/command.tsx +176 -176
- package/src/components/ui/context-menu.tsx +254 -254
- package/src/components/ui/drawer.tsx +137 -137
- package/src/components/ui/dropdown-menu.tsx +259 -259
- package/src/components/ui/form.tsx +173 -173
- package/src/components/ui/hover-card.tsx +41 -41
- package/src/components/ui/input-otp.tsx +77 -77
- package/src/components/ui/input.tsx +22 -22
- package/src/components/ui/label.tsx +23 -23
- package/src/components/ui/menubar.tsx +278 -278
- package/src/components/ui/navigation-menu.tsx +170 -170
- package/src/components/ui/pagination.tsx +128 -128
- package/src/components/ui/popover.tsx +47 -47
- package/src/components/ui/progress.tsx +30 -30
- package/src/components/ui/radio-group.tsx +44 -44
- package/src/components/ui/resizable.tsx +55 -55
- package/src/components/ui/scroll-area.tsx +57 -57
- package/src/components/ui/select.tsx +183 -183
- package/src/components/ui/separator.tsx +27 -27
- package/src/components/ui/sheet.tsx +144 -144
- package/src/components/ui/sidebar.tsx +725 -725
- package/src/components/ui/skeleton.tsx +17 -17
- package/src/components/ui/slider.tsx +62 -62
- package/src/components/ui/sonner.tsx +2 -2
- package/src/components/ui/switch.tsx +30 -30
- package/src/components/ui/table.tsx +118 -118
- package/src/components/ui/tabs.tsx +65 -65
- package/src/components/ui/textarea.tsx +19 -19
- package/src/components/ui/toggle-group.tsx +72 -72
- package/src/components/ui/toggle.tsx +46 -46
- package/src/components/ui/tooltip.tsx +60 -60
- package/src/index.css +3 -107
- package/src/index.ts +3 -1
- package/tailwind.config.mjs +67 -0
- package/tsconfig.json +4 -1
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import { Slot } from "@radix-ui/react-slot";
|
|
5
|
-
import { cva, type VariantProps } from "class-variance-authority";
|
|
6
|
-
import { cn } from "./../../lib/utils";
|
|
7
|
-
|
|
8
|
-
const badgeVariants = cva(
|
|
9
|
-
"inline-flex items-center justify-center rounded-md border border-neutral-200 px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-neutral-950 focus-visible:ring-neutral-950/50 focus-visible:ring-[3px] aria-invalid:ring-red-500/20 dark:aria-invalid:ring-red-500/40 aria-invalid:border-red-500 transition-[color,box-shadow] overflow-hidden dark:border-neutral-800 dark:focus-visible:border-neutral-300 dark:focus-visible:ring-neutral-300/50 dark:aria-invalid:ring-red-900/20 dark:dark:aria-invalid:ring-red-900/40 dark:aria-invalid:border-red-900",
|
|
10
|
-
{
|
|
11
|
-
variants: {
|
|
12
|
-
variant: {
|
|
13
|
-
default:
|
|
14
|
-
"border-transparent bg-neutral-900 text-neutral-50 [a&]:hover:bg-neutral-900/90 dark:bg-neutral-50 dark:text-neutral-900 dark:[a&]:hover:bg-neutral-50/90",
|
|
15
|
-
secondary:
|
|
16
|
-
"border-transparent bg-neutral-100 text-neutral-900 [a&]:hover:bg-neutral-100/90 dark:bg-neutral-800 dark:text-neutral-50 dark:[a&]:hover:bg-neutral-800/90",
|
|
17
|
-
destructive:
|
|
18
|
-
"border-transparent bg-red-500 text-white [a&]:hover:bg-red-500/90 focus-visible:ring-red-500/20 dark:focus-visible:ring-red-500/40 dark:bg-red-900 dark:[a&]:hover:bg-red-900/90 dark:focus-visible:ring-red-900/20 dark:dark:focus-visible:ring-red-900/40",
|
|
19
|
-
outline:
|
|
20
|
-
"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",
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
defaultVariants: {
|
|
24
|
-
variant: "default",
|
|
25
|
-
},
|
|
26
|
-
}
|
|
27
|
-
);
|
|
28
|
-
|
|
29
|
-
function Badge({
|
|
30
|
-
className,
|
|
31
|
-
variant,
|
|
32
|
-
asChild = false,
|
|
33
|
-
...props
|
|
34
|
-
}: React.ComponentProps<"span"> &
|
|
35
|
-
VariantProps<typeof badgeVariants> & { asChild?: boolean }) {
|
|
36
|
-
const Comp = asChild ? Slot : "span";
|
|
37
|
-
|
|
38
|
-
return (
|
|
39
|
-
<Comp
|
|
40
|
-
data-slot="badge"
|
|
41
|
-
className={cn(badgeVariants({ variant }), className)}
|
|
42
|
-
{...props}
|
|
43
|
-
/>
|
|
44
|
-
);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export { Badge, badgeVariants };
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
5
|
+
import { cva, type VariantProps } from "class-variance-authority";
|
|
6
|
+
import { cn } from "./../../lib/utils";
|
|
7
|
+
|
|
8
|
+
const badgeVariants = cva(
|
|
9
|
+
"inline-flex items-center justify-center rounded-md border border-neutral-200 px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-neutral-950 focus-visible:ring-neutral-950/50 focus-visible:ring-[3px] aria-invalid:ring-red-500/20 dark:aria-invalid:ring-red-500/40 aria-invalid:border-red-500 transition-[color,box-shadow] overflow-hidden dark:border-neutral-800 dark:focus-visible:border-neutral-300 dark:focus-visible:ring-neutral-300/50 dark:aria-invalid:ring-red-900/20 dark:dark:aria-invalid:ring-red-900/40 dark:aria-invalid:border-red-900",
|
|
10
|
+
{
|
|
11
|
+
variants: {
|
|
12
|
+
variant: {
|
|
13
|
+
default:
|
|
14
|
+
"border-transparent bg-neutral-900 text-neutral-50 [a&]:hover:bg-neutral-900/90 dark:bg-neutral-50 dark:text-neutral-900 dark:[a&]:hover:bg-neutral-50/90",
|
|
15
|
+
secondary:
|
|
16
|
+
"border-transparent bg-neutral-100 text-neutral-900 [a&]:hover:bg-neutral-100/90 dark:bg-neutral-800 dark:text-neutral-50 dark:[a&]:hover:bg-neutral-800/90",
|
|
17
|
+
destructive:
|
|
18
|
+
"border-transparent bg-red-500 text-white [a&]:hover:bg-red-500/90 focus-visible:ring-red-500/20 dark:focus-visible:ring-red-500/40 dark:bg-red-900 dark:[a&]:hover:bg-red-900/90 dark:focus-visible:ring-red-900/20 dark:dark:focus-visible:ring-red-900/40",
|
|
19
|
+
outline:
|
|
20
|
+
"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",
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
defaultVariants: {
|
|
24
|
+
variant: "default",
|
|
25
|
+
},
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
function Badge({
|
|
30
|
+
className,
|
|
31
|
+
variant,
|
|
32
|
+
asChild = false,
|
|
33
|
+
...props
|
|
34
|
+
}: React.ComponentProps<"span"> &
|
|
35
|
+
VariantProps<typeof badgeVariants> & { asChild?: boolean }) {
|
|
36
|
+
const Comp = asChild ? Slot : "span";
|
|
37
|
+
|
|
38
|
+
return (
|
|
39
|
+
<Comp
|
|
40
|
+
data-slot="badge"
|
|
41
|
+
className={cn(badgeVariants({ variant }), className)}
|
|
42
|
+
{...props}
|
|
43
|
+
/>
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export { Badge, badgeVariants };
|
|
@@ -1,116 +1,116 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import { Slot } from "@radix-ui/react-slot";
|
|
5
|
-
import { ChevronRight, MoreHorizontal } from "lucide-react";
|
|
6
|
-
import { cn } from "./../../lib/utils";
|
|
7
|
-
|
|
8
|
-
function Breadcrumb({ ...props }: React.ComponentProps<"nav">) {
|
|
9
|
-
return <nav aria-label="breadcrumb" data-slot="breadcrumb" {...props} />;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
function BreadcrumbList({ className, ...props }: React.ComponentProps<"ol">) {
|
|
13
|
-
return (
|
|
14
|
-
<ol
|
|
15
|
-
data-slot="breadcrumb-list"
|
|
16
|
-
className={cn(
|
|
17
|
-
"text-neutral-500 flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5 dark:text-neutral-400",
|
|
18
|
-
className
|
|
19
|
-
)}
|
|
20
|
-
{...props}
|
|
21
|
-
/>
|
|
22
|
-
);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
function BreadcrumbItem({ className, ...props }: React.ComponentProps<"li">) {
|
|
26
|
-
return (
|
|
27
|
-
<li
|
|
28
|
-
data-slot="breadcrumb-item"
|
|
29
|
-
className={cn("inline-flex items-center gap-1.5", className)}
|
|
30
|
-
{...props}
|
|
31
|
-
/>
|
|
32
|
-
);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
function BreadcrumbLink({
|
|
36
|
-
asChild,
|
|
37
|
-
className,
|
|
38
|
-
...props
|
|
39
|
-
}: React.ComponentProps<"a"> & {
|
|
40
|
-
asChild?: boolean;
|
|
41
|
-
}) {
|
|
42
|
-
const Comp = asChild ? Slot : "a";
|
|
43
|
-
|
|
44
|
-
return (
|
|
45
|
-
<Comp
|
|
46
|
-
data-slot="breadcrumb-link"
|
|
47
|
-
className={cn(
|
|
48
|
-
"hover:text-neutral-950 transition-colors dark:hover:text-neutral-50",
|
|
49
|
-
className
|
|
50
|
-
)}
|
|
51
|
-
{...props}
|
|
52
|
-
/>
|
|
53
|
-
);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
function BreadcrumbPage({ className, ...props }: React.ComponentProps<"span">) {
|
|
57
|
-
return (
|
|
58
|
-
<span
|
|
59
|
-
data-slot="breadcrumb-page"
|
|
60
|
-
role="link"
|
|
61
|
-
aria-disabled="true"
|
|
62
|
-
aria-current="page"
|
|
63
|
-
className={cn(
|
|
64
|
-
"text-neutral-950 font-normal dark:text-neutral-50",
|
|
65
|
-
className
|
|
66
|
-
)}
|
|
67
|
-
{...props}
|
|
68
|
-
/>
|
|
69
|
-
);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
function BreadcrumbSeparator({
|
|
73
|
-
children,
|
|
74
|
-
className,
|
|
75
|
-
...props
|
|
76
|
-
}: React.ComponentProps<"li">) {
|
|
77
|
-
return (
|
|
78
|
-
<li
|
|
79
|
-
data-slot="breadcrumb-separator"
|
|
80
|
-
role="presentation"
|
|
81
|
-
aria-hidden="true"
|
|
82
|
-
className={cn("[&>svg]:size-3.5", className)}
|
|
83
|
-
{...props}
|
|
84
|
-
>
|
|
85
|
-
{children ?? <ChevronRight />}
|
|
86
|
-
</li>
|
|
87
|
-
);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
function BreadcrumbEllipsis({
|
|
91
|
-
className,
|
|
92
|
-
...props
|
|
93
|
-
}: React.ComponentProps<"span">) {
|
|
94
|
-
return (
|
|
95
|
-
<span
|
|
96
|
-
data-slot="breadcrumb-ellipsis"
|
|
97
|
-
role="presentation"
|
|
98
|
-
aria-hidden="true"
|
|
99
|
-
className={cn("flex size-9 items-center justify-center", className)}
|
|
100
|
-
{...props}
|
|
101
|
-
>
|
|
102
|
-
<MoreHorizontal className="size-4" />
|
|
103
|
-
<span className="sr-only">More</span>
|
|
104
|
-
</span>
|
|
105
|
-
);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
export {
|
|
109
|
-
Breadcrumb,
|
|
110
|
-
BreadcrumbList,
|
|
111
|
-
BreadcrumbItem,
|
|
112
|
-
BreadcrumbLink,
|
|
113
|
-
BreadcrumbPage,
|
|
114
|
-
BreadcrumbSeparator,
|
|
115
|
-
BreadcrumbEllipsis,
|
|
116
|
-
};
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
5
|
+
import { ChevronRight, MoreHorizontal } from "lucide-react";
|
|
6
|
+
import { cn } from "./../../lib/utils";
|
|
7
|
+
|
|
8
|
+
function Breadcrumb({ ...props }: React.ComponentProps<"nav">) {
|
|
9
|
+
return <nav aria-label="breadcrumb" data-slot="breadcrumb" {...props} />;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function BreadcrumbList({ className, ...props }: React.ComponentProps<"ol">) {
|
|
13
|
+
return (
|
|
14
|
+
<ol
|
|
15
|
+
data-slot="breadcrumb-list"
|
|
16
|
+
className={cn(
|
|
17
|
+
"text-neutral-500 flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5 dark:text-neutral-400",
|
|
18
|
+
className
|
|
19
|
+
)}
|
|
20
|
+
{...props}
|
|
21
|
+
/>
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function BreadcrumbItem({ className, ...props }: React.ComponentProps<"li">) {
|
|
26
|
+
return (
|
|
27
|
+
<li
|
|
28
|
+
data-slot="breadcrumb-item"
|
|
29
|
+
className={cn("inline-flex items-center gap-1.5", className)}
|
|
30
|
+
{...props}
|
|
31
|
+
/>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function BreadcrumbLink({
|
|
36
|
+
asChild,
|
|
37
|
+
className,
|
|
38
|
+
...props
|
|
39
|
+
}: React.ComponentProps<"a"> & {
|
|
40
|
+
asChild?: boolean;
|
|
41
|
+
}) {
|
|
42
|
+
const Comp = asChild ? Slot : "a";
|
|
43
|
+
|
|
44
|
+
return (
|
|
45
|
+
<Comp
|
|
46
|
+
data-slot="breadcrumb-link"
|
|
47
|
+
className={cn(
|
|
48
|
+
"hover:text-neutral-950 transition-colors dark:hover:text-neutral-50",
|
|
49
|
+
className
|
|
50
|
+
)}
|
|
51
|
+
{...props}
|
|
52
|
+
/>
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function BreadcrumbPage({ className, ...props }: React.ComponentProps<"span">) {
|
|
57
|
+
return (
|
|
58
|
+
<span
|
|
59
|
+
data-slot="breadcrumb-page"
|
|
60
|
+
role="link"
|
|
61
|
+
aria-disabled="true"
|
|
62
|
+
aria-current="page"
|
|
63
|
+
className={cn(
|
|
64
|
+
"text-neutral-950 font-normal dark:text-neutral-50",
|
|
65
|
+
className
|
|
66
|
+
)}
|
|
67
|
+
{...props}
|
|
68
|
+
/>
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
function BreadcrumbSeparator({
|
|
73
|
+
children,
|
|
74
|
+
className,
|
|
75
|
+
...props
|
|
76
|
+
}: React.ComponentProps<"li">) {
|
|
77
|
+
return (
|
|
78
|
+
<li
|
|
79
|
+
data-slot="breadcrumb-separator"
|
|
80
|
+
role="presentation"
|
|
81
|
+
aria-hidden="true"
|
|
82
|
+
className={cn("[&>svg]:size-3.5", className)}
|
|
83
|
+
{...props}
|
|
84
|
+
>
|
|
85
|
+
{children ?? <ChevronRight />}
|
|
86
|
+
</li>
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
function BreadcrumbEllipsis({
|
|
91
|
+
className,
|
|
92
|
+
...props
|
|
93
|
+
}: React.ComponentProps<"span">) {
|
|
94
|
+
return (
|
|
95
|
+
<span
|
|
96
|
+
data-slot="breadcrumb-ellipsis"
|
|
97
|
+
role="presentation"
|
|
98
|
+
aria-hidden="true"
|
|
99
|
+
className={cn("flex size-9 items-center justify-center", className)}
|
|
100
|
+
{...props}
|
|
101
|
+
>
|
|
102
|
+
<MoreHorizontal className="size-4" />
|
|
103
|
+
<span className="sr-only">More</span>
|
|
104
|
+
</span>
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export {
|
|
109
|
+
Breadcrumb,
|
|
110
|
+
BreadcrumbList,
|
|
111
|
+
BreadcrumbItem,
|
|
112
|
+
BreadcrumbLink,
|
|
113
|
+
BreadcrumbPage,
|
|
114
|
+
BreadcrumbSeparator,
|
|
115
|
+
BreadcrumbEllipsis,
|
|
116
|
+
};
|
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import { Slot } from "@radix-ui/react-slot";
|
|
5
|
-
import { cva, type VariantProps } from "class-variance-authority";
|
|
6
|
-
import { cn } from "./../../lib/utils";
|
|
7
|
-
|
|
8
|
-
const buttonVariants = cva(
|
|
9
|
-
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-[color,box-shadow] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-neutral-950 focus-visible:ring-neutral-950/50 focus-visible:ring-[3px] aria-invalid:ring-red-500/20 dark:aria-invalid:ring-red-500/40 aria-invalid:border-red-500 dark:focus-visible:border-neutral-300 dark:focus-visible:ring-neutral-300/50 dark:aria-invalid:ring-red-900/20 dark:dark:aria-invalid:ring-red-900/40 dark:aria-invalid:border-red-900",
|
|
10
|
-
{
|
|
11
|
-
variants: {
|
|
12
|
-
variant: {
|
|
13
|
-
default:
|
|
14
|
-
"bg-neutral-900 text-neutral-50 shadow-xs hover:bg-neutral-900/90 dark:bg-neutral-50 dark:text-neutral-900 dark:hover:bg-neutral-50/90",
|
|
15
|
-
destructive:
|
|
16
|
-
"bg-red-500 text-white shadow-xs hover:bg-red-500/90 focus-visible:ring-red-500/20 dark:focus-visible:ring-red-500/40 dark:bg-red-900 dark:hover:bg-red-900/90 dark:focus-visible:ring-red-900/20 dark:dark:focus-visible:ring-red-900/40",
|
|
17
|
-
outline:
|
|
18
|
-
"border border-neutral-200 bg-white shadow-xs 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",
|
|
19
|
-
secondary:
|
|
20
|
-
"bg-neutral-100 text-neutral-900 shadow-xs hover:bg-neutral-100/80 dark:bg-neutral-800 dark:text-neutral-50 dark:hover:bg-neutral-800/80",
|
|
21
|
-
ghost:
|
|
22
|
-
"hover:bg-neutral-100 hover:text-neutral-900 dark:hover:bg-neutral-800 dark:hover:text-neutral-50",
|
|
23
|
-
link: "text-neutral-900 underline-offset-4 hover:underline dark:text-neutral-50",
|
|
24
|
-
},
|
|
25
|
-
size: {
|
|
26
|
-
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
27
|
-
sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
|
|
28
|
-
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
|
29
|
-
icon: "size-9",
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
defaultVariants: {
|
|
33
|
-
variant: "default",
|
|
34
|
-
size: "default",
|
|
35
|
-
},
|
|
36
|
-
}
|
|
37
|
-
);
|
|
38
|
-
|
|
39
|
-
function Button({
|
|
40
|
-
className,
|
|
41
|
-
variant,
|
|
42
|
-
size,
|
|
43
|
-
asChild = false,
|
|
44
|
-
...props
|
|
45
|
-
}: React.ComponentProps<"button"> &
|
|
46
|
-
VariantProps<typeof buttonVariants> & {
|
|
47
|
-
asChild?: boolean;
|
|
48
|
-
}) {
|
|
49
|
-
const Comp = asChild ? Slot : "button";
|
|
50
|
-
|
|
51
|
-
return (
|
|
52
|
-
<Comp
|
|
53
|
-
data-slot="button"
|
|
54
|
-
className={cn(buttonVariants({ variant, size, className }))}
|
|
55
|
-
{...props}
|
|
56
|
-
/>
|
|
57
|
-
);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export { Button, buttonVariants };
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
5
|
+
import { cva, type VariantProps } from "class-variance-authority";
|
|
6
|
+
import { cn } from "./../../lib/utils";
|
|
7
|
+
|
|
8
|
+
const buttonVariants = cva(
|
|
9
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-[color,box-shadow] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-neutral-950 focus-visible:ring-neutral-950/50 focus-visible:ring-[3px] aria-invalid:ring-red-500/20 dark:aria-invalid:ring-red-500/40 aria-invalid:border-red-500 dark:focus-visible:border-neutral-300 dark:focus-visible:ring-neutral-300/50 dark:aria-invalid:ring-red-900/20 dark:dark:aria-invalid:ring-red-900/40 dark:aria-invalid:border-red-900",
|
|
10
|
+
{
|
|
11
|
+
variants: {
|
|
12
|
+
variant: {
|
|
13
|
+
default:
|
|
14
|
+
"bg-neutral-900 text-neutral-50 shadow-xs hover:bg-neutral-900/90 dark:bg-neutral-50 dark:text-neutral-900 dark:hover:bg-neutral-50/90",
|
|
15
|
+
destructive:
|
|
16
|
+
"bg-red-500 text-white shadow-xs hover:bg-red-500/90 focus-visible:ring-red-500/20 dark:focus-visible:ring-red-500/40 dark:bg-red-900 dark:hover:bg-red-900/90 dark:focus-visible:ring-red-900/20 dark:dark:focus-visible:ring-red-900/40",
|
|
17
|
+
outline:
|
|
18
|
+
"border border-neutral-200 bg-white shadow-xs 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",
|
|
19
|
+
secondary:
|
|
20
|
+
"bg-neutral-100 text-neutral-900 shadow-xs hover:bg-neutral-100/80 dark:bg-neutral-800 dark:text-neutral-50 dark:hover:bg-neutral-800/80",
|
|
21
|
+
ghost:
|
|
22
|
+
"hover:bg-neutral-100 hover:text-neutral-900 dark:hover:bg-neutral-800 dark:hover:text-neutral-50",
|
|
23
|
+
link: "text-neutral-900 underline-offset-4 hover:underline dark:text-neutral-50",
|
|
24
|
+
},
|
|
25
|
+
size: {
|
|
26
|
+
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
27
|
+
sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
|
|
28
|
+
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
|
29
|
+
icon: "size-9",
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
defaultVariants: {
|
|
33
|
+
variant: "default",
|
|
34
|
+
size: "default",
|
|
35
|
+
},
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
function Button({
|
|
40
|
+
className,
|
|
41
|
+
variant,
|
|
42
|
+
size,
|
|
43
|
+
asChild = false,
|
|
44
|
+
...props
|
|
45
|
+
}: React.ComponentProps<"button"> &
|
|
46
|
+
VariantProps<typeof buttonVariants> & {
|
|
47
|
+
asChild?: boolean;
|
|
48
|
+
}) {
|
|
49
|
+
const Comp = asChild ? Slot : "button";
|
|
50
|
+
|
|
51
|
+
return (
|
|
52
|
+
<Comp
|
|
53
|
+
data-slot="button"
|
|
54
|
+
className={cn(buttonVariants({ variant, size, className }))}
|
|
55
|
+
{...props}
|
|
56
|
+
/>
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export { Button, buttonVariants };
|
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import { ChevronLeft, ChevronRight } from "lucide-react";
|
|
5
|
-
import { DayPicker } from "react-day-picker";
|
|
6
|
-
import { cn } from "./../../lib/utils";
|
|
7
|
-
import { buttonVariants } from "./button";
|
|
8
|
-
|
|
9
|
-
function Calendar({
|
|
10
|
-
className,
|
|
11
|
-
classNames,
|
|
12
|
-
showOutsideDays = true,
|
|
13
|
-
...props
|
|
14
|
-
}: React.ComponentProps<typeof DayPicker>) {
|
|
15
|
-
return (
|
|
16
|
-
<DayPicker
|
|
17
|
-
showOutsideDays={showOutsideDays}
|
|
18
|
-
className={cn("p-3", className)}
|
|
19
|
-
classNames={{
|
|
20
|
-
months: "flex flex-col sm:flex-row gap-2",
|
|
21
|
-
month: "flex flex-col gap-4",
|
|
22
|
-
caption: "flex justify-center pt-1 relative items-center w-full",
|
|
23
|
-
caption_label: "text-sm font-medium",
|
|
24
|
-
nav: "flex items-center gap-1",
|
|
25
|
-
nav_button: cn(
|
|
26
|
-
buttonVariants({ variant: "outline" }),
|
|
27
|
-
"size-7 bg-transparent p-0 opacity-50 hover:opacity-100"
|
|
28
|
-
),
|
|
29
|
-
nav_button_previous: "absolute left-1",
|
|
30
|
-
nav_button_next: "absolute right-1",
|
|
31
|
-
table: "w-full border-collapse space-x-1",
|
|
32
|
-
head_row: "flex",
|
|
33
|
-
head_cell:
|
|
34
|
-
"text-neutral-500 rounded-md w-8 font-normal text-[0.8rem] dark:text-neutral-400",
|
|
35
|
-
row: "flex w-full mt-2",
|
|
36
|
-
cell: cn(
|
|
37
|
-
"relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-neutral-100 [&:has([aria-selected].day-range-end)]:rounded-r-md dark:[&:has([aria-selected])]:bg-neutral-800",
|
|
38
|
-
props.mode === "range"
|
|
39
|
-
? "[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md"
|
|
40
|
-
: "[&:has([aria-selected])]:rounded-md"
|
|
41
|
-
),
|
|
42
|
-
day: cn(
|
|
43
|
-
buttonVariants({ variant: "ghost" }),
|
|
44
|
-
"size-8 p-0 font-normal aria-selected:opacity-100"
|
|
45
|
-
),
|
|
46
|
-
day_range_start:
|
|
47
|
-
"day-range-start aria-selected:bg-neutral-900 aria-selected:text-neutral-50 dark:aria-selected:bg-neutral-50 dark:aria-selected:text-neutral-900",
|
|
48
|
-
day_range_end:
|
|
49
|
-
"day-range-end aria-selected:bg-neutral-900 aria-selected:text-neutral-50 dark:aria-selected:bg-neutral-50 dark:aria-selected:text-neutral-900",
|
|
50
|
-
day_selected:
|
|
51
|
-
"bg-neutral-900 text-neutral-50 hover:bg-neutral-900 hover:text-neutral-50 focus:bg-neutral-900 focus:text-neutral-50 dark:bg-neutral-50 dark:text-neutral-900 dark:hover:bg-neutral-50 dark:hover:text-neutral-900 dark:focus:bg-neutral-50 dark:focus:text-neutral-900",
|
|
52
|
-
day_today:
|
|
53
|
-
"bg-neutral-100 text-neutral-900 dark:bg-neutral-800 dark:text-neutral-50",
|
|
54
|
-
day_outside:
|
|
55
|
-
"day-outside text-neutral-500 aria-selected:text-neutral-500 dark:text-neutral-400 dark:aria-selected:text-neutral-400",
|
|
56
|
-
day_disabled: "text-neutral-500 opacity-50 dark:text-neutral-400",
|
|
57
|
-
day_range_middle:
|
|
58
|
-
"aria-selected:bg-neutral-100 aria-selected:text-neutral-900 dark:aria-selected:bg-neutral-800 dark:aria-selected:text-neutral-50",
|
|
59
|
-
day_hidden: "invisible",
|
|
60
|
-
...classNames,
|
|
61
|
-
}}
|
|
62
|
-
components={{
|
|
63
|
-
IconLeft: ({ className, ...props }) => (
|
|
64
|
-
<ChevronLeft className={cn("size-4", className)} {...props} />
|
|
65
|
-
),
|
|
66
|
-
IconRight: ({ className, ...props }) => (
|
|
67
|
-
<ChevronRight className={cn("size-4", className)} {...props} />
|
|
68
|
-
),
|
|
69
|
-
}}
|
|
70
|
-
{...props}
|
|
71
|
-
/>
|
|
72
|
-
);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
export { Calendar };
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { ChevronLeft, ChevronRight } from "lucide-react";
|
|
5
|
+
import { DayPicker } from "react-day-picker";
|
|
6
|
+
import { cn } from "./../../lib/utils";
|
|
7
|
+
import { buttonVariants } from "./button";
|
|
8
|
+
|
|
9
|
+
function Calendar({
|
|
10
|
+
className,
|
|
11
|
+
classNames,
|
|
12
|
+
showOutsideDays = true,
|
|
13
|
+
...props
|
|
14
|
+
}: React.ComponentProps<typeof DayPicker>) {
|
|
15
|
+
return (
|
|
16
|
+
<DayPicker
|
|
17
|
+
showOutsideDays={showOutsideDays}
|
|
18
|
+
className={cn("p-3", className)}
|
|
19
|
+
classNames={{
|
|
20
|
+
months: "flex flex-col sm:flex-row gap-2",
|
|
21
|
+
month: "flex flex-col gap-4",
|
|
22
|
+
caption: "flex justify-center pt-1 relative items-center w-full",
|
|
23
|
+
caption_label: "text-sm font-medium",
|
|
24
|
+
nav: "flex items-center gap-1",
|
|
25
|
+
nav_button: cn(
|
|
26
|
+
buttonVariants({ variant: "outline" }),
|
|
27
|
+
"size-7 bg-transparent p-0 opacity-50 hover:opacity-100"
|
|
28
|
+
),
|
|
29
|
+
nav_button_previous: "absolute left-1",
|
|
30
|
+
nav_button_next: "absolute right-1",
|
|
31
|
+
table: "w-full border-collapse space-x-1",
|
|
32
|
+
head_row: "flex",
|
|
33
|
+
head_cell:
|
|
34
|
+
"text-neutral-500 rounded-md w-8 font-normal text-[0.8rem] dark:text-neutral-400",
|
|
35
|
+
row: "flex w-full mt-2",
|
|
36
|
+
cell: cn(
|
|
37
|
+
"relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-neutral-100 [&:has([aria-selected].day-range-end)]:rounded-r-md dark:[&:has([aria-selected])]:bg-neutral-800",
|
|
38
|
+
props.mode === "range"
|
|
39
|
+
? "[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md"
|
|
40
|
+
: "[&:has([aria-selected])]:rounded-md"
|
|
41
|
+
),
|
|
42
|
+
day: cn(
|
|
43
|
+
buttonVariants({ variant: "ghost" }),
|
|
44
|
+
"size-8 p-0 font-normal aria-selected:opacity-100"
|
|
45
|
+
),
|
|
46
|
+
day_range_start:
|
|
47
|
+
"day-range-start aria-selected:bg-neutral-900 aria-selected:text-neutral-50 dark:aria-selected:bg-neutral-50 dark:aria-selected:text-neutral-900",
|
|
48
|
+
day_range_end:
|
|
49
|
+
"day-range-end aria-selected:bg-neutral-900 aria-selected:text-neutral-50 dark:aria-selected:bg-neutral-50 dark:aria-selected:text-neutral-900",
|
|
50
|
+
day_selected:
|
|
51
|
+
"bg-neutral-900 text-neutral-50 hover:bg-neutral-900 hover:text-neutral-50 focus:bg-neutral-900 focus:text-neutral-50 dark:bg-neutral-50 dark:text-neutral-900 dark:hover:bg-neutral-50 dark:hover:text-neutral-900 dark:focus:bg-neutral-50 dark:focus:text-neutral-900",
|
|
52
|
+
day_today:
|
|
53
|
+
"bg-neutral-100 text-neutral-900 dark:bg-neutral-800 dark:text-neutral-50",
|
|
54
|
+
day_outside:
|
|
55
|
+
"day-outside text-neutral-500 aria-selected:text-neutral-500 dark:text-neutral-400 dark:aria-selected:text-neutral-400",
|
|
56
|
+
day_disabled: "text-neutral-500 opacity-50 dark:text-neutral-400",
|
|
57
|
+
day_range_middle:
|
|
58
|
+
"aria-selected:bg-neutral-100 aria-selected:text-neutral-900 dark:aria-selected:bg-neutral-800 dark:aria-selected:text-neutral-50",
|
|
59
|
+
day_hidden: "invisible",
|
|
60
|
+
...classNames,
|
|
61
|
+
}}
|
|
62
|
+
components={{
|
|
63
|
+
IconLeft: ({ className, ...props }) => (
|
|
64
|
+
<ChevronLeft className={cn("size-4", className)} {...props} />
|
|
65
|
+
),
|
|
66
|
+
IconRight: ({ className, ...props }) => (
|
|
67
|
+
<ChevronRight className={cn("size-4", className)} {...props} />
|
|
68
|
+
),
|
|
69
|
+
}}
|
|
70
|
+
{...props}
|
|
71
|
+
/>
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export { Calendar };
|