@arch-cadre/ui 0.0.44 → 0.0.47
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/dist/components/accordion.js +18 -0
- package/dist/components/alert-dialog.js +39 -0
- package/dist/components/alert.js +24 -0
- package/dist/components/aspect-ratio.js +7 -0
- package/dist/components/avatar.js +14 -0
- package/dist/components/badge.js +22 -0
- package/dist/components/breadcrumb.js +30 -0
- package/dist/components/button-group.js +28 -0
- package/dist/components/button.js +33 -0
- package/dist/components/calendar.js +76 -0
- package/dist/components/card.js +24 -0
- package/dist/components/checkbox.js +9 -0
- package/dist/components/collapsible.js +13 -0
- package/dist/components/command.js +34 -0
- package/dist/components/context-menu.js +51 -0
- package/dist/components/dialog.js +36 -0
- package/dist/components/drawer.js +35 -0
- package/dist/components/dropdown-menu.js +51 -0
- package/dist/components/empty.js +33 -0
- package/dist/components/field.js +78 -0
- package/dist/components/form.js +59 -0
- package/dist/components/hover-card.js +14 -0
- package/dist/components/input-group.js +63 -0
- package/dist/components/input-otp.js +21 -0
- package/dist/components/input.js +6 -0
- package/dist/components/item.js +66 -0
- package/dist/components/kbd.js +9 -0
- package/dist/components/label.js +8 -0
- package/dist/components/language-switcher.js +20 -0
- package/dist/components/menubar.js +54 -0
- package/dist/components/navigation-menu.js +31 -0
- package/dist/components/pagination.js +31 -0
- package/dist/components/popover.js +17 -0
- package/dist/components/progress.js +8 -0
- package/dist/components/radio-group.js +12 -0
- package/dist/components/scroll-area.js +13 -0
- package/dist/components/select.js +38 -0
- package/dist/components/separator.js +8 -0
- package/dist/components/sheet.js +40 -0
- package/dist/components/sidebar.js +213 -0
- package/dist/components/skeleton.js +6 -0
- package/dist/components/slider.js +14 -0
- package/dist/components/sonner.js +21 -0
- package/dist/components/spinner.js +7 -0
- package/dist/components/switch.js +8 -0
- package/dist/components/table.js +28 -0
- package/dist/components/tabs.js +17 -0
- package/dist/components/textarea.js +6 -0
- package/dist/components/toggle-group.js +22 -0
- package/dist/components/toggle.js +26 -0
- package/dist/components/tooltip.js +17 -0
- package/dist/hooks/use-mobile.js +15 -0
- package/dist/hooks/use-user.js +25 -0
- package/dist/lib/{utils.mjs → utils.js} +1 -1
- package/dist/logo.js +28 -0
- package/dist/postcss.config.mjs +1 -2
- package/dist/providers/auth-provider.js +27 -0
- package/dist/providers/index.js +23 -0
- package/dist/shared/access-denied.js +6 -0
- package/dist/shared/loader.js +41 -0
- package/dist/shared/page-loader.js +6 -0
- package/dist/shared/scroll-fade-effect.js +5 -0
- package/package.json +17 -20
- package/build.config.ts +0 -23
- package/components.json +0 -20
- package/dist/components/.gitkeep +0 -0
- package/dist/components/accordion.d.ts +0 -7
- package/dist/components/accordion.mjs +0 -58
- package/dist/components/alert-dialog.d.ts +0 -14
- package/dist/components/alert-dialog.mjs +0 -144
- package/dist/components/alert.d.ts +0 -9
- package/dist/components/alert.mjs +0 -62
- package/dist/components/aspect-ratio.d.ts +0 -4
- package/dist/components/aspect-ratio.mjs +0 -9
- package/dist/components/avatar.d.ts +0 -6
- package/dist/components/avatar.mjs +0 -50
- package/dist/components/badge.d.ts +0 -9
- package/dist/components/badge.mjs +0 -37
- package/dist/components/breadcrumb.d.ts +0 -11
- package/dist/components/breadcrumb.mjs +0 -105
- package/dist/components/button-group.d.ts +0 -13
- package/dist/components/button-group.mjs +0 -76
- package/dist/components/button.d.ts +0 -10
- package/dist/components/button.mjs +0 -51
- package/dist/components/calendar.d.ts +0 -8
- package/dist/components/calendar.mjs +0 -191
- package/dist/components/card.d.ts +0 -9
- package/dist/components/card.mjs +0 -90
- package/dist/components/checkbox.d.ts +0 -4
- package/dist/components/checkbox.mjs +0 -30
- package/dist/components/collapsible.d.ts +0 -6
- package/dist/components/collapsible.mjs +0 -31
- package/dist/components/command.d.ts +0 -18
- package/dist/components/command.mjs +0 -169
- package/dist/components/context-menu.d.ts +0 -25
- package/dist/components/context-menu.mjs +0 -218
- package/dist/components/dialog.d.ts +0 -15
- package/dist/components/dialog.mjs +0 -130
- package/dist/components/drawer.d.ts +0 -13
- package/dist/components/drawer.mjs +0 -124
- package/dist/components/dropdown-menu.d.ts +0 -25
- package/dist/components/dropdown-menu.mjs +0 -226
- package/dist/components/empty.d.ts +0 -12
- package/dist/components/empty.mjs +0 -102
- package/dist/components/field.d.ts +0 -25
- package/dist/components/field.mjs +0 -228
- package/dist/components/form.d.ts +0 -23
- package/dist/components/form.mjs +0 -123
- package/dist/components/hover-card.d.ts +0 -6
- package/dist/components/hover-card.mjs +0 -35
- package/dist/components/input-group.d.ts +0 -16
- package/dist/components/input-group.mjs +0 -155
- package/dist/components/input-otp.d.ts +0 -11
- package/dist/components/input-otp.mjs +0 -59
- package/dist/components/input.d.ts +0 -3
- package/dist/components/input.mjs +0 -19
- package/dist/components/item.d.ts +0 -23
- package/dist/components/item.mjs +0 -187
- package/dist/components/kbd.d.ts +0 -4
- package/dist/components/kbd.mjs +0 -28
- package/dist/components/label.d.ts +0 -4
- package/dist/components/label.mjs +0 -21
- package/dist/components/language-switcher.d.ts +0 -2
- package/dist/components/language-switcher.mjs +0 -30
- package/dist/components/menubar.d.ts +0 -26
- package/dist/components/menubar.mjs +0 -246
- package/dist/components/navigation-menu.d.ts +0 -14
- package/dist/components/navigation-menu.mjs +0 -166
- package/dist/components/pagination.d.ts +0 -15
- package/dist/components/pagination.mjs +0 -116
- package/dist/components/popover.d.ts +0 -7
- package/dist/components/popover.mjs +0 -40
- package/dist/components/progress.d.ts +0 -4
- package/dist/components/progress.mjs +0 -30
- package/dist/components/radio-group.d.ts +0 -5
- package/dist/components/radio-group.mjs +0 -43
- package/dist/components/scroll-area.d.ts +0 -7
- package/dist/components/scroll-area.mjs +0 -59
- package/dist/components/select.d.ts +0 -15
- package/dist/components/select.mjs +0 -173
- package/dist/components/separator.d.ts +0 -4
- package/dist/components/separator.mjs +0 -25
- package/dist/components/sheet.d.ts +0 -13
- package/dist/components/sheet.mjs +0 -119
- package/dist/components/sidebar.d.ts +0 -69
- package/dist/components/sidebar.mjs +0 -635
- package/dist/components/skeleton.d.ts +0 -3
- package/dist/components/skeleton.mjs +0 -13
- package/dist/components/slider.d.ts +0 -4
- package/dist/components/slider.mjs +0 -59
- package/dist/components/sonner.d.ts +0 -4
- package/dist/components/sonner.mjs +0 -36
- package/dist/components/spinner.d.ts +0 -3
- package/dist/components/spinner.mjs +0 -15
- package/dist/components/switch.d.ts +0 -4
- package/dist/components/switch.mjs +0 -30
- package/dist/components/table.d.ts +0 -10
- package/dist/components/table.mjs +0 -115
- package/dist/components/tabs.d.ts +0 -7
- package/dist/components/tabs.mjs +0 -63
- package/dist/components/textarea.d.ts +0 -3
- package/dist/components/textarea.mjs +0 -16
- package/dist/components/toggle-group.d.ts +0 -9
- package/dist/components/toggle-group.mjs +0 -65
- package/dist/components/toggle.d.ts +0 -9
- package/dist/components/toggle.mjs +0 -41
- package/dist/components/tooltip.d.ts +0 -7
- package/dist/components/tooltip.mjs +0 -49
- package/dist/hooks/.gitkeep +0 -0
- package/dist/hooks/use-mobile.d.ts +0 -1
- package/dist/hooks/use-mobile.mjs +0 -17
- package/dist/hooks/use-user.d.ts +0 -12
- package/dist/hooks/use-user.mjs +0 -12
- package/dist/index.mjs +0 -15
- package/dist/lib/utils.d.ts +0 -2
- package/dist/logo.d.ts +0 -15
- package/dist/logo.mjs +0 -32
- package/dist/postcss.config.d.mts +0 -3
- package/dist/providers/auth-provider.d.ts +0 -15
- package/dist/providers/auth-provider.mjs +0 -37
- package/dist/providers/index.d.ts +0 -7
- package/dist/providers/index.mjs +0 -33
- package/dist/shared/access-denied.d.ts +0 -2
- package/dist/shared/access-denied.mjs +0 -12
- package/dist/shared/loader.d.ts +0 -11
- package/dist/shared/loader.mjs +0 -98
- package/dist/shared/page-loader.d.ts +0 -7
- package/dist/shared/page-loader.mjs +0 -6
- package/dist/shared/scroll-fade-effect.d.ts +0 -4
- package/dist/shared/scroll-fade-effect.mjs +0 -20
- package/dist/styles/globals.css +0 -1
- package/postcss.config.mjs +0 -6
- package/scripts/switchToDist.js +0 -55
- package/scripts/switchToSrc.js +0 -52
- package/src/components/.gitkeep +0 -0
- package/src/components/accordion.tsx +0 -66
- package/src/components/alert-dialog.tsx +0 -157
- package/src/components/alert.tsx +0 -66
- package/src/components/aspect-ratio.tsx +0 -12
- package/src/components/avatar.tsx +0 -53
- package/src/components/badge.tsx +0 -46
- package/src/components/breadcrumb.tsx +0 -111
- package/src/components/button-group.tsx +0 -86
- package/src/components/button.tsx +0 -62
- package/src/components/calendar.tsx +0 -220
- package/src/components/card.tsx +0 -92
- package/src/components/checkbox.tsx +0 -32
- package/src/components/collapsible.tsx +0 -34
- package/src/components/command.tsx +0 -184
- package/src/components/context-menu.tsx +0 -252
- package/src/components/dialog.tsx +0 -143
- package/src/components/drawer.tsx +0 -135
- package/src/components/dropdown-menu.tsx +0 -257
- package/src/components/empty.tsx +0 -105
- package/src/components/field.tsx +0 -251
- package/src/components/form.tsx +0 -170
- package/src/components/hover-card.tsx +0 -44
- package/src/components/input-group.tsx +0 -170
- package/src/components/input-otp.tsx +0 -77
- package/src/components/input.tsx +0 -21
- package/src/components/item.tsx +0 -193
- package/src/components/kbd.tsx +0 -29
- package/src/components/label.tsx +0 -24
- package/src/components/language-switcher.tsx +0 -49
- package/src/components/menubar.tsx +0 -276
- package/src/components/navigation-menu.tsx +0 -168
- package/src/components/pagination.tsx +0 -130
- package/src/components/popover.tsx +0 -48
- package/src/components/progress.tsx +0 -31
- package/src/components/radio-group.tsx +0 -45
- package/src/components/scroll-area.tsx +0 -67
- package/src/components/select.tsx +0 -190
- package/src/components/separator.tsx +0 -28
- package/src/components/sheet.tsx +0 -139
- package/src/components/sidebar.tsx +0 -726
- package/src/components/skeleton.tsx +0 -14
- package/src/components/slider.tsx +0 -63
- package/src/components/sonner.tsx +0 -41
- package/src/components/spinner.tsx +0 -17
- package/src/components/switch.tsx +0 -31
- package/src/components/table.tsx +0 -116
- package/src/components/tabs.tsx +0 -66
- package/src/components/textarea.tsx +0 -18
- package/src/components/toggle-group.tsx +0 -83
- package/src/components/toggle.tsx +0 -47
- package/src/components/tooltip.tsx +0 -61
- package/src/hooks/.gitkeep +0 -0
- package/src/hooks/use-mobile.ts +0 -21
- package/src/hooks/use-user.ts +0 -27
- package/src/index.ts +0 -15
- package/src/lib/utils.ts +0 -6
- package/src/logo.tsx +0 -49
- package/src/postcss.config.mjs +0 -6
- package/src/providers/auth-provider.tsx +0 -66
- package/src/providers/index.tsx +0 -50
- package/src/shared/access-denied.tsx +0 -31
- package/src/shared/loader.tsx +0 -109
- package/src/shared/page-loader.tsx +0 -24
- package/src/shared/scroll-fade-effect.tsx +0 -23
- package/src/styles/globals.css +0 -314
- package/tsconfig.json +0 -24
- /package/dist/{index.d.ts → index.js} +0 -0
package/src/components/alert.tsx
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { cva, type VariantProps } from "class-variance-authority";
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
|
|
4
|
-
import { cn } from "../lib/utils";
|
|
5
|
-
|
|
6
|
-
const alertVariants = cva(
|
|
7
|
-
"relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",
|
|
8
|
-
{
|
|
9
|
-
variants: {
|
|
10
|
-
variant: {
|
|
11
|
-
default: "bg-card text-card-foreground",
|
|
12
|
-
destructive:
|
|
13
|
-
"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90",
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
defaultVariants: {
|
|
17
|
-
variant: "default",
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
);
|
|
21
|
-
|
|
22
|
-
function Alert({
|
|
23
|
-
className,
|
|
24
|
-
variant,
|
|
25
|
-
...props
|
|
26
|
-
}: React.ComponentProps<"div"> & VariantProps<typeof alertVariants>) {
|
|
27
|
-
return (
|
|
28
|
-
<div
|
|
29
|
-
data-slot="alert"
|
|
30
|
-
role="alert"
|
|
31
|
-
className={cn(alertVariants({ variant }), className)}
|
|
32
|
-
{...props}
|
|
33
|
-
/>
|
|
34
|
-
);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
function AlertTitle({ className, ...props }: React.ComponentProps<"div">) {
|
|
38
|
-
return (
|
|
39
|
-
<div
|
|
40
|
-
data-slot="alert-title"
|
|
41
|
-
className={cn(
|
|
42
|
-
"col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",
|
|
43
|
-
className,
|
|
44
|
-
)}
|
|
45
|
-
{...props}
|
|
46
|
-
/>
|
|
47
|
-
);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
function AlertDescription({
|
|
51
|
-
className,
|
|
52
|
-
...props
|
|
53
|
-
}: React.ComponentProps<"div">) {
|
|
54
|
-
return (
|
|
55
|
-
<div
|
|
56
|
-
data-slot="alert-description"
|
|
57
|
-
className={cn(
|
|
58
|
-
"text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",
|
|
59
|
-
className,
|
|
60
|
-
)}
|
|
61
|
-
{...props}
|
|
62
|
-
/>
|
|
63
|
-
);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export { Alert, AlertTitle, AlertDescription };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { AspectRatio as AspectRatioPrimitive } from "radix-ui";
|
|
4
|
-
import * as React from "react";
|
|
5
|
-
|
|
6
|
-
function AspectRatio({
|
|
7
|
-
...props
|
|
8
|
-
}: React.ComponentProps<typeof AspectRatioPrimitive.Root>) {
|
|
9
|
-
return <AspectRatioPrimitive.Root data-slot="aspect-ratio" {...props} />;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export { AspectRatio };
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { Avatar as AvatarPrimitive } from "radix-ui";
|
|
4
|
-
import * as React from "react";
|
|
5
|
-
|
|
6
|
-
import { cn } from "../lib/utils";
|
|
7
|
-
|
|
8
|
-
function Avatar({
|
|
9
|
-
className,
|
|
10
|
-
...props
|
|
11
|
-
}: React.ComponentProps<typeof AvatarPrimitive.Root>) {
|
|
12
|
-
return (
|
|
13
|
-
<AvatarPrimitive.Root
|
|
14
|
-
data-slot="avatar"
|
|
15
|
-
className={cn(
|
|
16
|
-
"relative flex size-8 shrink-0 overflow-hidden rounded-full",
|
|
17
|
-
className,
|
|
18
|
-
)}
|
|
19
|
-
{...props}
|
|
20
|
-
/>
|
|
21
|
-
);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
function AvatarImage({
|
|
25
|
-
className,
|
|
26
|
-
...props
|
|
27
|
-
}: React.ComponentProps<typeof AvatarPrimitive.Image>) {
|
|
28
|
-
return (
|
|
29
|
-
<AvatarPrimitive.Image
|
|
30
|
-
data-slot="avatar-image"
|
|
31
|
-
className={cn("aspect-square size-full", className)}
|
|
32
|
-
{...props}
|
|
33
|
-
/>
|
|
34
|
-
);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
function AvatarFallback({
|
|
38
|
-
className,
|
|
39
|
-
...props
|
|
40
|
-
}: React.ComponentProps<typeof AvatarPrimitive.Fallback>) {
|
|
41
|
-
return (
|
|
42
|
-
<AvatarPrimitive.Fallback
|
|
43
|
-
data-slot="avatar-fallback"
|
|
44
|
-
className={cn(
|
|
45
|
-
"bg-muted flex size-full items-center justify-center rounded-full",
|
|
46
|
-
className,
|
|
47
|
-
)}
|
|
48
|
-
{...props}
|
|
49
|
-
/>
|
|
50
|
-
);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export { Avatar, AvatarImage, AvatarFallback };
|
package/src/components/badge.tsx
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { cva, type VariantProps } from "class-variance-authority";
|
|
2
|
-
import { Slot as SlotPrimitive } from "radix-ui";
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
|
|
5
|
-
import { cn } from "../lib/utils";
|
|
6
|
-
|
|
7
|
-
const badgeVariants = cva(
|
|
8
|
-
"inline-flex items-center justify-center rounded-full border 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-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
|
|
9
|
-
{
|
|
10
|
-
variants: {
|
|
11
|
-
variant: {
|
|
12
|
-
default:
|
|
13
|
-
"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
|
|
14
|
-
secondary:
|
|
15
|
-
"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
|
|
16
|
-
destructive:
|
|
17
|
-
"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
18
|
-
outline:
|
|
19
|
-
"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
defaultVariants: {
|
|
23
|
-
variant: "default",
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
);
|
|
27
|
-
|
|
28
|
-
function Badge({
|
|
29
|
-
className,
|
|
30
|
-
variant,
|
|
31
|
-
asChild = false,
|
|
32
|
-
...props
|
|
33
|
-
}: React.ComponentProps<"span"> &
|
|
34
|
-
VariantProps<typeof badgeVariants> & { asChild?: boolean }) {
|
|
35
|
-
const Comp = asChild ? SlotPrimitive.Slot : "span";
|
|
36
|
-
|
|
37
|
-
return (
|
|
38
|
-
<Comp
|
|
39
|
-
data-slot="badge"
|
|
40
|
-
className={cn(badgeVariants({ variant }), className)}
|
|
41
|
-
{...props}
|
|
42
|
-
/>
|
|
43
|
-
);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export { Badge, badgeVariants };
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import { ChevronRight, MoreHorizontal } from "lucide-react";
|
|
2
|
-
import { Slot as SlotPrimitive } from "radix-ui";
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
|
|
5
|
-
import { cn } from "../lib/utils";
|
|
6
|
-
|
|
7
|
-
function Breadcrumb({ ...props }: React.ComponentProps<"nav">) {
|
|
8
|
-
return <nav aria-label="breadcrumb" data-slot="breadcrumb" {...props} />;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
function BreadcrumbList({ className, ...props }: React.ComponentProps<"ol">) {
|
|
12
|
-
return (
|
|
13
|
-
<ol
|
|
14
|
-
data-slot="breadcrumb-list"
|
|
15
|
-
className={cn(
|
|
16
|
-
"text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",
|
|
17
|
-
className,
|
|
18
|
-
)}
|
|
19
|
-
{...props}
|
|
20
|
-
/>
|
|
21
|
-
);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
function BreadcrumbItem({ className, ...props }: React.ComponentProps<"li">) {
|
|
25
|
-
return (
|
|
26
|
-
<li
|
|
27
|
-
data-slot="breadcrumb-item"
|
|
28
|
-
className={cn("inline-flex items-center gap-1.5", className)}
|
|
29
|
-
{...props}
|
|
30
|
-
/>
|
|
31
|
-
);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
function BreadcrumbLink({
|
|
35
|
-
asChild,
|
|
36
|
-
className,
|
|
37
|
-
...props
|
|
38
|
-
}: React.ComponentProps<"a"> & {
|
|
39
|
-
asChild?: boolean;
|
|
40
|
-
}) {
|
|
41
|
-
const Comp = asChild ? SlotPrimitive.Slot : "a";
|
|
42
|
-
|
|
43
|
-
return (
|
|
44
|
-
<Comp
|
|
45
|
-
data-slot="breadcrumb-link"
|
|
46
|
-
className={cn("hover:text-foreground transition-colors", className)}
|
|
47
|
-
{...props}
|
|
48
|
-
/>
|
|
49
|
-
);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
function BreadcrumbPage({ className, ...props }: React.ComponentProps<"span">) {
|
|
53
|
-
return (
|
|
54
|
-
// biome-ignore lint/a11y/useSemanticElements: <explanation>
|
|
55
|
-
// biome-ignore lint/a11y/useFocusableInteractive: <explanation>
|
|
56
|
-
<span
|
|
57
|
-
data-slot="breadcrumb-page"
|
|
58
|
-
role="link"
|
|
59
|
-
aria-disabled="true"
|
|
60
|
-
aria-current="page"
|
|
61
|
-
className={cn("text-foreground font-normal", className)}
|
|
62
|
-
{...props}
|
|
63
|
-
/>
|
|
64
|
-
);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
function BreadcrumbSeparator({
|
|
68
|
-
children,
|
|
69
|
-
className,
|
|
70
|
-
...props
|
|
71
|
-
}: React.ComponentProps<"li">) {
|
|
72
|
-
return (
|
|
73
|
-
<li
|
|
74
|
-
data-slot="breadcrumb-separator"
|
|
75
|
-
role="presentation"
|
|
76
|
-
aria-hidden="true"
|
|
77
|
-
className={cn("[&>svg]:size-3.5", className)}
|
|
78
|
-
{...props}
|
|
79
|
-
>
|
|
80
|
-
{children ?? <ChevronRight />}
|
|
81
|
-
</li>
|
|
82
|
-
);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
function BreadcrumbEllipsis({
|
|
86
|
-
className,
|
|
87
|
-
...props
|
|
88
|
-
}: React.ComponentProps<"span">) {
|
|
89
|
-
return (
|
|
90
|
-
<span
|
|
91
|
-
data-slot="breadcrumb-ellipsis"
|
|
92
|
-
role="presentation"
|
|
93
|
-
aria-hidden="true"
|
|
94
|
-
className={cn("flex size-9 items-center justify-center", className)}
|
|
95
|
-
{...props}
|
|
96
|
-
>
|
|
97
|
-
<MoreHorizontal className="size-4" />
|
|
98
|
-
<span className="sr-only">More</span>
|
|
99
|
-
</span>
|
|
100
|
-
);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
export {
|
|
104
|
-
Breadcrumb,
|
|
105
|
-
BreadcrumbList,
|
|
106
|
-
BreadcrumbItem,
|
|
107
|
-
BreadcrumbLink,
|
|
108
|
-
BreadcrumbPage,
|
|
109
|
-
BreadcrumbSeparator,
|
|
110
|
-
BreadcrumbEllipsis,
|
|
111
|
-
};
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
/** biome-ignore-all lint/a11y/useSemanticElements: <explanation> */
|
|
2
|
-
|
|
3
|
-
import { cva, type VariantProps } from "class-variance-authority";
|
|
4
|
-
import { Slot as SlotPrimitive } from "radix-ui";
|
|
5
|
-
import * as React from "react";
|
|
6
|
-
|
|
7
|
-
import { cn } from "../lib/utils";
|
|
8
|
-
import { Separator } from "./separator";
|
|
9
|
-
|
|
10
|
-
const buttonGroupVariants = cva(
|
|
11
|
-
"flex w-fit items-stretch [&>*]:focus-visible:z-10 [&>*]:focus-visible:relative [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md has-[>[data-slot=button-group]]:gap-2",
|
|
12
|
-
{
|
|
13
|
-
variants: {
|
|
14
|
-
orientation: {
|
|
15
|
-
horizontal:
|
|
16
|
-
"[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none",
|
|
17
|
-
vertical:
|
|
18
|
-
"flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none",
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
defaultVariants: {
|
|
22
|
-
orientation: "horizontal",
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
);
|
|
26
|
-
|
|
27
|
-
function ButtonGroup({
|
|
28
|
-
className,
|
|
29
|
-
orientation,
|
|
30
|
-
...props
|
|
31
|
-
}: React.ComponentProps<"div"> & VariantProps<typeof buttonGroupVariants>) {
|
|
32
|
-
return (
|
|
33
|
-
<div
|
|
34
|
-
role="group"
|
|
35
|
-
data-slot="button-group"
|
|
36
|
-
data-orientation={orientation}
|
|
37
|
-
className={cn(buttonGroupVariants({ orientation }), className)}
|
|
38
|
-
{...props}
|
|
39
|
-
/>
|
|
40
|
-
);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
function ButtonGroupText({
|
|
44
|
-
className,
|
|
45
|
-
asChild = false,
|
|
46
|
-
...props
|
|
47
|
-
}: React.ComponentProps<"div"> & {
|
|
48
|
-
asChild?: boolean;
|
|
49
|
-
}) {
|
|
50
|
-
const Comp = asChild ? SlotPrimitive.Slot : "div";
|
|
51
|
-
|
|
52
|
-
return (
|
|
53
|
-
<Comp
|
|
54
|
-
className={cn(
|
|
55
|
-
"bg-muted flex items-center gap-2 rounded-md border px-4 text-sm font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
|
|
56
|
-
className,
|
|
57
|
-
)}
|
|
58
|
-
{...props}
|
|
59
|
-
/>
|
|
60
|
-
);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
function ButtonGroupSeparator({
|
|
64
|
-
className,
|
|
65
|
-
orientation = "vertical",
|
|
66
|
-
...props
|
|
67
|
-
}: React.ComponentProps<typeof Separator>) {
|
|
68
|
-
return (
|
|
69
|
-
<Separator
|
|
70
|
-
data-slot="button-group-separator"
|
|
71
|
-
orientation={orientation}
|
|
72
|
-
className={cn(
|
|
73
|
-
"bg-input relative !m-0 self-stretch data-[orientation=vertical]:h-auto",
|
|
74
|
-
className,
|
|
75
|
-
)}
|
|
76
|
-
{...props}
|
|
77
|
-
/>
|
|
78
|
-
);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
export {
|
|
82
|
-
ButtonGroup,
|
|
83
|
-
ButtonGroupSeparator,
|
|
84
|
-
ButtonGroupText,
|
|
85
|
-
buttonGroupVariants,
|
|
86
|
-
};
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { cva, type VariantProps } from "class-variance-authority";
|
|
2
|
-
import { Slot as SlotPrimitive } from "radix-ui";
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
|
|
5
|
-
import { cn } from "../lib/utils";
|
|
6
|
-
|
|
7
|
-
const buttonVariants = cva(
|
|
8
|
-
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all 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-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
9
|
-
{
|
|
10
|
-
variants: {
|
|
11
|
-
variant: {
|
|
12
|
-
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
13
|
-
destructive:
|
|
14
|
-
"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
15
|
-
outline:
|
|
16
|
-
"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
|
|
17
|
-
secondary:
|
|
18
|
-
"bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
19
|
-
ghost:
|
|
20
|
-
"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
21
|
-
link: "text-primary underline-offset-4 hover:underline",
|
|
22
|
-
},
|
|
23
|
-
size: {
|
|
24
|
-
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
25
|
-
sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
|
|
26
|
-
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
|
27
|
-
icon: "size-9",
|
|
28
|
-
"icon-sm": "size-8",
|
|
29
|
-
"icon-lg": "size-10",
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
defaultVariants: {
|
|
33
|
-
variant: "default",
|
|
34
|
-
size: "default",
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
);
|
|
38
|
-
|
|
39
|
-
function Button({
|
|
40
|
-
className,
|
|
41
|
-
variant = "default",
|
|
42
|
-
size = "default",
|
|
43
|
-
asChild = false,
|
|
44
|
-
...props
|
|
45
|
-
}: React.ComponentProps<"button"> &
|
|
46
|
-
VariantProps<typeof buttonVariants> & {
|
|
47
|
-
asChild?: boolean;
|
|
48
|
-
}) {
|
|
49
|
-
const Comp = asChild ? SlotPrimitive.Slot : "button";
|
|
50
|
-
|
|
51
|
-
return (
|
|
52
|
-
<Comp
|
|
53
|
-
data-slot="button"
|
|
54
|
-
data-variant={variant}
|
|
55
|
-
data-size={size}
|
|
56
|
-
className={cn(buttonVariants({ variant, size, className }))}
|
|
57
|
-
{...props}
|
|
58
|
-
/>
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export { Button, buttonVariants };
|
|
@@ -1,220 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
ChevronDownIcon,
|
|
5
|
-
ChevronLeftIcon,
|
|
6
|
-
ChevronRightIcon,
|
|
7
|
-
} from "lucide-react";
|
|
8
|
-
import * as React from "react";
|
|
9
|
-
import {
|
|
10
|
-
type DayButton,
|
|
11
|
-
DayPicker,
|
|
12
|
-
getDefaultClassNames,
|
|
13
|
-
} from "react-day-picker";
|
|
14
|
-
|
|
15
|
-
import { cn } from "../lib/utils";
|
|
16
|
-
import { Button, buttonVariants } from "./button";
|
|
17
|
-
|
|
18
|
-
function Calendar({
|
|
19
|
-
className,
|
|
20
|
-
classNames,
|
|
21
|
-
showOutsideDays = true,
|
|
22
|
-
captionLayout = "label",
|
|
23
|
-
buttonVariant = "ghost",
|
|
24
|
-
formatters,
|
|
25
|
-
components,
|
|
26
|
-
...props
|
|
27
|
-
}: React.ComponentProps<typeof DayPicker> & {
|
|
28
|
-
buttonVariant?: React.ComponentProps<typeof Button>["variant"];
|
|
29
|
-
}) {
|
|
30
|
-
const defaultClassNames = getDefaultClassNames();
|
|
31
|
-
|
|
32
|
-
return (
|
|
33
|
-
<DayPicker
|
|
34
|
-
showOutsideDays={showOutsideDays}
|
|
35
|
-
className={cn(
|
|
36
|
-
"bg-background group/calendar p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",
|
|
37
|
-
String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
|
|
38
|
-
String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
|
|
39
|
-
className,
|
|
40
|
-
)}
|
|
41
|
-
captionLayout={captionLayout}
|
|
42
|
-
formatters={{
|
|
43
|
-
formatMonthDropdown: (date) =>
|
|
44
|
-
date.toLocaleString("default", { month: "short" }),
|
|
45
|
-
...formatters,
|
|
46
|
-
}}
|
|
47
|
-
classNames={{
|
|
48
|
-
root: cn("w-fit", defaultClassNames.root),
|
|
49
|
-
months: cn(
|
|
50
|
-
"flex gap-4 flex-col md:flex-row relative",
|
|
51
|
-
defaultClassNames.months,
|
|
52
|
-
),
|
|
53
|
-
month: cn("flex flex-col w-full gap-4", defaultClassNames.month),
|
|
54
|
-
nav: cn(
|
|
55
|
-
"flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between",
|
|
56
|
-
defaultClassNames.nav,
|
|
57
|
-
),
|
|
58
|
-
button_previous: cn(
|
|
59
|
-
buttonVariants({ variant: buttonVariant }),
|
|
60
|
-
"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",
|
|
61
|
-
defaultClassNames.button_previous,
|
|
62
|
-
),
|
|
63
|
-
button_next: cn(
|
|
64
|
-
buttonVariants({ variant: buttonVariant }),
|
|
65
|
-
"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",
|
|
66
|
-
defaultClassNames.button_next,
|
|
67
|
-
),
|
|
68
|
-
month_caption: cn(
|
|
69
|
-
"flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)",
|
|
70
|
-
defaultClassNames.month_caption,
|
|
71
|
-
),
|
|
72
|
-
dropdowns: cn(
|
|
73
|
-
"w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5",
|
|
74
|
-
defaultClassNames.dropdowns,
|
|
75
|
-
),
|
|
76
|
-
dropdown_root: cn(
|
|
77
|
-
"relative has-focus:border-ring border border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] rounded-md",
|
|
78
|
-
defaultClassNames.dropdown_root,
|
|
79
|
-
),
|
|
80
|
-
dropdown: cn(
|
|
81
|
-
"absolute bg-popover inset-0 opacity-0",
|
|
82
|
-
defaultClassNames.dropdown,
|
|
83
|
-
),
|
|
84
|
-
caption_label: cn(
|
|
85
|
-
"select-none font-medium",
|
|
86
|
-
captionLayout === "label"
|
|
87
|
-
? "text-sm"
|
|
88
|
-
: "rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-muted-foreground [&>svg]:size-3.5",
|
|
89
|
-
defaultClassNames.caption_label,
|
|
90
|
-
),
|
|
91
|
-
table: "w-full border-collapse",
|
|
92
|
-
weekdays: cn("flex", defaultClassNames.weekdays),
|
|
93
|
-
weekday: cn(
|
|
94
|
-
"text-muted-foreground rounded-md flex-1 font-normal text-[0.8rem] select-none",
|
|
95
|
-
defaultClassNames.weekday,
|
|
96
|
-
),
|
|
97
|
-
week: cn("flex w-full mt-2", defaultClassNames.week),
|
|
98
|
-
week_number_header: cn(
|
|
99
|
-
"select-none w-(--cell-size)",
|
|
100
|
-
defaultClassNames.week_number_header,
|
|
101
|
-
),
|
|
102
|
-
week_number: cn(
|
|
103
|
-
"text-[0.8rem] select-none text-muted-foreground",
|
|
104
|
-
defaultClassNames.week_number,
|
|
105
|
-
),
|
|
106
|
-
day: cn(
|
|
107
|
-
"relative w-full h-full p-0 text-center [&:last-child[data-selected=true]_button]:rounded-r-md group/day aspect-square select-none",
|
|
108
|
-
props.showWeekNumber
|
|
109
|
-
? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-md"
|
|
110
|
-
: "[&:first-child[data-selected=true]_button]:rounded-l-md",
|
|
111
|
-
defaultClassNames.day,
|
|
112
|
-
),
|
|
113
|
-
range_start: cn(
|
|
114
|
-
"rounded-l-md bg-accent",
|
|
115
|
-
defaultClassNames.range_start,
|
|
116
|
-
),
|
|
117
|
-
range_middle: cn("rounded-none", defaultClassNames.range_middle),
|
|
118
|
-
range_end: cn("rounded-r-md bg-accent", defaultClassNames.range_end),
|
|
119
|
-
today: cn(
|
|
120
|
-
"bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",
|
|
121
|
-
defaultClassNames.today,
|
|
122
|
-
),
|
|
123
|
-
outside: cn(
|
|
124
|
-
"text-muted-foreground aria-selected:text-muted-foreground",
|
|
125
|
-
defaultClassNames.outside,
|
|
126
|
-
),
|
|
127
|
-
disabled: cn(
|
|
128
|
-
"text-muted-foreground opacity-50",
|
|
129
|
-
defaultClassNames.disabled,
|
|
130
|
-
),
|
|
131
|
-
hidden: cn("invisible", defaultClassNames.hidden),
|
|
132
|
-
...classNames,
|
|
133
|
-
}}
|
|
134
|
-
components={{
|
|
135
|
-
Root: ({ className, rootRef, ...props }) => {
|
|
136
|
-
return (
|
|
137
|
-
<div
|
|
138
|
-
data-slot="calendar"
|
|
139
|
-
ref={rootRef}
|
|
140
|
-
className={cn(className)}
|
|
141
|
-
{...props}
|
|
142
|
-
/>
|
|
143
|
-
);
|
|
144
|
-
},
|
|
145
|
-
Chevron: ({ className, orientation, ...props }) => {
|
|
146
|
-
if (orientation === "left") {
|
|
147
|
-
return (
|
|
148
|
-
<ChevronLeftIcon className={cn("size-4", className)} {...props} />
|
|
149
|
-
);
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
if (orientation === "right") {
|
|
153
|
-
return (
|
|
154
|
-
<ChevronRightIcon
|
|
155
|
-
className={cn("size-4", className)}
|
|
156
|
-
{...props}
|
|
157
|
-
/>
|
|
158
|
-
);
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
return (
|
|
162
|
-
<ChevronDownIcon className={cn("size-4", className)} {...props} />
|
|
163
|
-
);
|
|
164
|
-
},
|
|
165
|
-
DayButton: CalendarDayButton,
|
|
166
|
-
WeekNumber: ({ children, ...props }) => {
|
|
167
|
-
return (
|
|
168
|
-
<td {...props}>
|
|
169
|
-
<div className="flex size-(--cell-size) items-center justify-center text-center">
|
|
170
|
-
{children}
|
|
171
|
-
</div>
|
|
172
|
-
</td>
|
|
173
|
-
);
|
|
174
|
-
},
|
|
175
|
-
...components,
|
|
176
|
-
}}
|
|
177
|
-
{...props}
|
|
178
|
-
/>
|
|
179
|
-
);
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
function CalendarDayButton({
|
|
183
|
-
className,
|
|
184
|
-
day,
|
|
185
|
-
modifiers,
|
|
186
|
-
...props
|
|
187
|
-
}: React.ComponentProps<typeof DayButton>) {
|
|
188
|
-
const defaultClassNames = getDefaultClassNames();
|
|
189
|
-
|
|
190
|
-
const ref = React.useRef<HTMLButtonElement>(null);
|
|
191
|
-
React.useEffect(() => {
|
|
192
|
-
if (modifiers.focused) ref.current?.focus();
|
|
193
|
-
}, [modifiers.focused]);
|
|
194
|
-
|
|
195
|
-
return (
|
|
196
|
-
<Button
|
|
197
|
-
ref={ref}
|
|
198
|
-
variant="ghost"
|
|
199
|
-
size="icon"
|
|
200
|
-
data-day={day.date.toLocaleDateString()}
|
|
201
|
-
data-selected-single={
|
|
202
|
-
modifiers.selected &&
|
|
203
|
-
!modifiers.range_start &&
|
|
204
|
-
!modifiers.range_end &&
|
|
205
|
-
!modifiers.range_middle
|
|
206
|
-
}
|
|
207
|
-
data-range-start={modifiers.range_start}
|
|
208
|
-
data-range-end={modifiers.range_end}
|
|
209
|
-
data-range-middle={modifiers.range_middle}
|
|
210
|
-
className={cn(
|
|
211
|
-
"data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 dark:hover:text-accent-foreground flex aspect-square size-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]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:text-xs [&>span]:opacity-70",
|
|
212
|
-
defaultClassNames.day,
|
|
213
|
-
className,
|
|
214
|
-
)}
|
|
215
|
-
{...props}
|
|
216
|
-
/>
|
|
217
|
-
);
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
export { Calendar, CalendarDayButton };
|