@create-lft-app/cli 1.0.14 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/cli.js +150 -171
- package/dist/bin/cli.js.map +1 -1
- package/dist/src/index.js +148 -169
- package/dist/src/index.js.map +1 -1
- package/package.json +1 -1
- package/templates/app/auth/login/page.tsx +0 -153
- package/templates/app/dashboard/page.tsx +0 -102
- package/templates/app/globals.css +0 -249
- package/templates/app/layout.tsx +0 -40
- package/templates/app/page.tsx +0 -5
- package/templates/components/dashboard/widget.tsx +0 -113
- package/templates/components/layout/admin-midday-sidebar.tsx +0 -247
- package/templates/components/layout/admin-sidebar.tsx +0 -146
- package/templates/components/layout/header.tsx +0 -71
- package/templates/components/layout/main-content.tsx +0 -28
- package/templates/components/layout/midday-sidebar.tsx +0 -381
- package/templates/components/layout/nav-user.tsx +0 -108
- package/templates/components/layout/page-header.tsx +0 -95
- package/templates/components/layout/sidebar-context.tsx +0 -33
- package/templates/components/layout/sidebar.tsx +0 -194
- package/templates/components/layout/suspension-banner.tsx +0 -21
- package/templates/components/ui/accordion.tsx +0 -58
- package/templates/components/ui/alert-dialog.tsx +0 -165
- package/templates/components/ui/alert.tsx +0 -66
- package/templates/components/ui/avatar.tsx +0 -55
- package/templates/components/ui/badge.tsx +0 -50
- package/templates/components/ui/button.tsx +0 -89
- package/templates/components/ui/calendar.tsx +0 -220
- package/templates/components/ui/card.tsx +0 -89
- package/templates/components/ui/checkbox.tsx +0 -38
- package/templates/components/ui/collapsible.tsx +0 -33
- package/templates/components/ui/command.tsx +0 -196
- package/templates/components/ui/dialog.tsx +0 -153
- package/templates/components/ui/dropdown-menu.tsx +0 -280
- package/templates/components/ui/form.tsx +0 -171
- package/templates/components/ui/icons.tsx +0 -167
- package/templates/components/ui/input.tsx +0 -28
- package/templates/components/ui/label.tsx +0 -25
- package/templates/components/ui/popover.tsx +0 -59
- package/templates/components/ui/progress.tsx +0 -32
- package/templates/components/ui/radio-group.tsx +0 -45
- package/templates/components/ui/scroll-area.tsx +0 -63
- package/templates/components/ui/select.tsx +0 -208
- package/templates/components/ui/separator.tsx +0 -28
- package/templates/components/ui/sheet.tsx +0 -146
- package/templates/components/ui/sidebar.tsx +0 -726
- package/templates/components/ui/skeleton.tsx +0 -15
- package/templates/components/ui/slider.tsx +0 -58
- package/templates/components/ui/sonner.tsx +0 -47
- package/templates/components/ui/spinner.tsx +0 -27
- package/templates/components/ui/submit-button.tsx +0 -47
- package/templates/components/ui/switch.tsx +0 -31
- package/templates/components/ui/table.tsx +0 -120
- package/templates/components/ui/tabs.tsx +0 -75
- package/templates/components/ui/textarea.tsx +0 -26
- package/templates/components/ui/tooltip.tsx +0 -70
- package/templates/hooks/use-mobile.ts +0 -21
- package/templates/lib/supabase/client.ts +0 -8
- package/templates/lib/supabase/server.ts +0 -29
- package/templates/lib/utils.ts +0 -6
- package/templates/modules/auth/actions/auth-actions.ts +0 -12
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import * as React from "react"
|
|
2
|
-
import { cva, type VariantProps } from "class-variance-authority"
|
|
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,55 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import * as AvatarPrimitive from "@radix-ui/react-avatar"
|
|
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 h-10 w-10 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
|
-
"flex h-full w-full items-center justify-center rounded-full",
|
|
46
|
-
"bg-[#F2F1EF] dark:bg-[#1D1D1D]",
|
|
47
|
-
"text-sm font-medium text-[#606060]",
|
|
48
|
-
className
|
|
49
|
-
)}
|
|
50
|
-
{...props}
|
|
51
|
-
/>
|
|
52
|
-
)
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export { Avatar, AvatarImage, AvatarFallback }
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import * as React from "react"
|
|
2
|
-
import { Slot } from "@radix-ui/react-slot"
|
|
3
|
-
import { cva, type VariantProps } from "class-variance-authority"
|
|
4
|
-
|
|
5
|
-
import { cn } from "@/lib/utils"
|
|
6
|
-
|
|
7
|
-
const badgeVariants = cva(
|
|
8
|
-
"inline-flex items-center justify-center border px-2.5 py-0.5 text-xs font-medium transition-colors",
|
|
9
|
-
{
|
|
10
|
-
variants: {
|
|
11
|
-
variant: {
|
|
12
|
-
default:
|
|
13
|
-
"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
|
|
14
|
-
secondary:
|
|
15
|
-
"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
16
|
-
destructive:
|
|
17
|
-
"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
|
|
18
|
-
outline:
|
|
19
|
-
"text-foreground border-border",
|
|
20
|
-
tag:
|
|
21
|
-
"rounded-none border-0 bg-[#F2F1EF] dark:bg-[#1D1D1D] text-[#878787] text-[10px] px-2 py-1",
|
|
22
|
-
"tag-rounded":
|
|
23
|
-
"rounded-full border-0 bg-[#F2F1EF] dark:bg-[#1D1D1D] text-[#878787] text-[12px] px-3 py-1",
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
defaultVariants: {
|
|
27
|
-
variant: "default",
|
|
28
|
-
},
|
|
29
|
-
}
|
|
30
|
-
)
|
|
31
|
-
|
|
32
|
-
function Badge({
|
|
33
|
-
className,
|
|
34
|
-
variant,
|
|
35
|
-
asChild = false,
|
|
36
|
-
...props
|
|
37
|
-
}: React.ComponentProps<"span"> &
|
|
38
|
-
VariantProps<typeof badgeVariants> & { asChild?: boolean }) {
|
|
39
|
-
const Comp = asChild ? Slot : "span"
|
|
40
|
-
|
|
41
|
-
return (
|
|
42
|
-
<Comp
|
|
43
|
-
data-slot="badge"
|
|
44
|
-
className={cn(badgeVariants({ variant }), className)}
|
|
45
|
-
{...props}
|
|
46
|
-
/>
|
|
47
|
-
)
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export { Badge, badgeVariants }
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import * as React from "react"
|
|
2
|
-
import { Slot } from "@radix-ui/react-slot"
|
|
3
|
-
import { cva, type VariantProps } from "class-variance-authority"
|
|
4
|
-
|
|
5
|
-
import { cn } from "@/lib/utils"
|
|
6
|
-
|
|
7
|
-
const buttonVariants = cva(
|
|
8
|
-
[
|
|
9
|
-
"inline-flex items-center justify-center gap-2",
|
|
10
|
-
"whitespace-nowrap text-sm font-medium",
|
|
11
|
-
"transition-colors duration-150",
|
|
12
|
-
"disabled:pointer-events-none disabled:opacity-50",
|
|
13
|
-
"[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
14
|
-
"outline-none focus-visible:outline-none",
|
|
15
|
-
].join(" "),
|
|
16
|
-
{
|
|
17
|
-
variants: {
|
|
18
|
-
variant: {
|
|
19
|
-
default: [
|
|
20
|
-
"bg-primary text-primary-foreground",
|
|
21
|
-
"hover:bg-primary/90",
|
|
22
|
-
"active:scale-[0.98]",
|
|
23
|
-
].join(" "),
|
|
24
|
-
destructive: [
|
|
25
|
-
"bg-destructive text-destructive-foreground",
|
|
26
|
-
"hover:bg-destructive/90",
|
|
27
|
-
].join(" "),
|
|
28
|
-
outline: [
|
|
29
|
-
"border border-border bg-transparent",
|
|
30
|
-
"hover:bg-accent hover:text-accent-foreground",
|
|
31
|
-
].join(" "),
|
|
32
|
-
secondary: [
|
|
33
|
-
"bg-secondary text-secondary-foreground",
|
|
34
|
-
"hover:bg-secondary/80",
|
|
35
|
-
].join(" "),
|
|
36
|
-
ghost: [
|
|
37
|
-
"hover:bg-accent hover:text-accent-foreground",
|
|
38
|
-
].join(" "),
|
|
39
|
-
link: [
|
|
40
|
-
"text-primary underline-offset-4",
|
|
41
|
-
"hover:underline",
|
|
42
|
-
].join(" "),
|
|
43
|
-
icon: [
|
|
44
|
-
"text-[#878787]",
|
|
45
|
-
"hover:bg-accent hover:text-accent-foreground",
|
|
46
|
-
"rounded-full",
|
|
47
|
-
].join(" "),
|
|
48
|
-
},
|
|
49
|
-
size: {
|
|
50
|
-
default: "h-10 px-4 py-2 rounded-md",
|
|
51
|
-
sm: "h-8 px-3 text-xs rounded-md",
|
|
52
|
-
lg: "h-11 px-8 rounded-md",
|
|
53
|
-
xl: "h-12 px-10 rounded-md",
|
|
54
|
-
icon: "h-8 w-8",
|
|
55
|
-
"icon-sm": "h-6 w-6",
|
|
56
|
-
"icon-lg": "h-10 w-10",
|
|
57
|
-
},
|
|
58
|
-
},
|
|
59
|
-
defaultVariants: {
|
|
60
|
-
variant: "default",
|
|
61
|
-
size: "default",
|
|
62
|
-
},
|
|
63
|
-
}
|
|
64
|
-
)
|
|
65
|
-
|
|
66
|
-
function Button({
|
|
67
|
-
className,
|
|
68
|
-
variant = "default",
|
|
69
|
-
size = "default",
|
|
70
|
-
asChild = false,
|
|
71
|
-
...props
|
|
72
|
-
}: React.ComponentProps<"button"> &
|
|
73
|
-
VariantProps<typeof buttonVariants> & {
|
|
74
|
-
asChild?: boolean
|
|
75
|
-
}) {
|
|
76
|
-
const Comp = asChild ? Slot : "button"
|
|
77
|
-
|
|
78
|
-
return (
|
|
79
|
-
<Comp
|
|
80
|
-
data-slot="button"
|
|
81
|
-
data-variant={variant}
|
|
82
|
-
data-size={size}
|
|
83
|
-
className={cn(buttonVariants({ variant, size, className }))}
|
|
84
|
-
{...props}
|
|
85
|
-
/>
|
|
86
|
-
)
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
export { Button, buttonVariants }
|
|
@@ -1,220 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import {
|
|
5
|
-
ChevronDownIcon,
|
|
6
|
-
ChevronLeftIcon,
|
|
7
|
-
ChevronRightIcon,
|
|
8
|
-
} from "lucide-react"
|
|
9
|
-
import {
|
|
10
|
-
DayPicker,
|
|
11
|
-
getDefaultClassNames,
|
|
12
|
-
type DayButton,
|
|
13
|
-
} from "react-day-picker"
|
|
14
|
-
|
|
15
|
-
import { cn } from "@/lib/utils"
|
|
16
|
-
import { Button, buttonVariants } from "@/components/ui/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 }
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import * as React from "react"
|
|
2
|
-
|
|
3
|
-
import { cn } from "@/lib/utils"
|
|
4
|
-
|
|
5
|
-
function Card({ className, ...props }: React.ComponentProps<"div">) {
|
|
6
|
-
return (
|
|
7
|
-
<div
|
|
8
|
-
data-slot="card"
|
|
9
|
-
className={cn(
|
|
10
|
-
"rounded-lg border border-border bg-card text-card-foreground",
|
|
11
|
-
className
|
|
12
|
-
)}
|
|
13
|
-
{...props}
|
|
14
|
-
/>
|
|
15
|
-
)
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
function CardHeader({ className, ...props }: React.ComponentProps<"div">) {
|
|
19
|
-
return (
|
|
20
|
-
<div
|
|
21
|
-
data-slot="card-header"
|
|
22
|
-
className={cn("flex flex-col space-y-1.5 p-6", className)}
|
|
23
|
-
{...props}
|
|
24
|
-
/>
|
|
25
|
-
)
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
function CardTitle({ className, ...props }: React.ComponentProps<"div">) {
|
|
29
|
-
return (
|
|
30
|
-
<div
|
|
31
|
-
data-slot="card-title"
|
|
32
|
-
className={cn("text-lg font-medium leading-none tracking-tight", className)}
|
|
33
|
-
{...props}
|
|
34
|
-
/>
|
|
35
|
-
)
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
function CardDescription({ className, ...props }: React.ComponentProps<"div">) {
|
|
39
|
-
return (
|
|
40
|
-
<div
|
|
41
|
-
data-slot="card-description"
|
|
42
|
-
className={cn("text-sm text-[#606060]", className)}
|
|
43
|
-
{...props}
|
|
44
|
-
/>
|
|
45
|
-
)
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
function CardAction({ className, ...props }: React.ComponentProps<"div">) {
|
|
49
|
-
return (
|
|
50
|
-
<div
|
|
51
|
-
data-slot="card-action"
|
|
52
|
-
className={cn(
|
|
53
|
-
"col-start-2 row-span-2 row-start-1 self-start justify-self-end",
|
|
54
|
-
className
|
|
55
|
-
)}
|
|
56
|
-
{...props}
|
|
57
|
-
/>
|
|
58
|
-
)
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
function CardContent({ className, ...props }: React.ComponentProps<"div">) {
|
|
62
|
-
return (
|
|
63
|
-
<div
|
|
64
|
-
data-slot="card-content"
|
|
65
|
-
className={cn("p-6 pt-0", className)}
|
|
66
|
-
{...props}
|
|
67
|
-
/>
|
|
68
|
-
)
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
function CardFooter({ className, ...props }: React.ComponentProps<"div">) {
|
|
72
|
-
return (
|
|
73
|
-
<div
|
|
74
|
-
data-slot="card-footer"
|
|
75
|
-
className={cn("flex items-center p-6 pt-0", className)}
|
|
76
|
-
{...props}
|
|
77
|
-
/>
|
|
78
|
-
)
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
export {
|
|
82
|
-
Card,
|
|
83
|
-
CardHeader,
|
|
84
|
-
CardFooter,
|
|
85
|
-
CardTitle,
|
|
86
|
-
CardAction,
|
|
87
|
-
CardDescription,
|
|
88
|
-
CardContent,
|
|
89
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import * as CheckboxPrimitive from "@radix-ui/react-checkbox"
|
|
5
|
-
import { CheckIcon } from "lucide-react"
|
|
6
|
-
|
|
7
|
-
import { cn } from "@/lib/utils"
|
|
8
|
-
|
|
9
|
-
function Checkbox({
|
|
10
|
-
className,
|
|
11
|
-
...props
|
|
12
|
-
}: React.ComponentProps<typeof CheckboxPrimitive.Root>) {
|
|
13
|
-
return (
|
|
14
|
-
<CheckboxPrimitive.Root
|
|
15
|
-
data-slot="checkbox"
|
|
16
|
-
className={cn(
|
|
17
|
-
"peer h-4 w-4 shrink-0",
|
|
18
|
-
"rounded-sm border border-border",
|
|
19
|
-
"transition-colors duration-150",
|
|
20
|
-
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
21
|
-
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
22
|
-
"data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
|
|
23
|
-
"data-[state=checked]:border-primary",
|
|
24
|
-
className
|
|
25
|
-
)}
|
|
26
|
-
{...props}
|
|
27
|
-
>
|
|
28
|
-
<CheckboxPrimitive.Indicator
|
|
29
|
-
data-slot="checkbox-indicator"
|
|
30
|
-
className="flex items-center justify-center text-current"
|
|
31
|
-
>
|
|
32
|
-
<CheckIcon className="h-3.5 w-3.5" strokeWidth={3} />
|
|
33
|
-
</CheckboxPrimitive.Indicator>
|
|
34
|
-
</CheckboxPrimitive.Root>
|
|
35
|
-
)
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export { Checkbox }
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible"
|
|
4
|
-
|
|
5
|
-
function Collapsible({
|
|
6
|
-
...props
|
|
7
|
-
}: React.ComponentProps<typeof CollapsiblePrimitive.Root>) {
|
|
8
|
-
return <CollapsiblePrimitive.Root data-slot="collapsible" {...props} />
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
function CollapsibleTrigger({
|
|
12
|
-
...props
|
|
13
|
-
}: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>) {
|
|
14
|
-
return (
|
|
15
|
-
<CollapsiblePrimitive.CollapsibleTrigger
|
|
16
|
-
data-slot="collapsible-trigger"
|
|
17
|
-
{...props}
|
|
18
|
-
/>
|
|
19
|
-
)
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
function CollapsibleContent({
|
|
23
|
-
...props
|
|
24
|
-
}: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>) {
|
|
25
|
-
return (
|
|
26
|
-
<CollapsiblePrimitive.CollapsibleContent
|
|
27
|
-
data-slot="collapsible-content"
|
|
28
|
-
{...props}
|
|
29
|
-
/>
|
|
30
|
-
)
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export { Collapsible, CollapsibleTrigger, CollapsibleContent }
|