@create-lft-app/cli 1.0.14 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/dist/bin/cli.js +13 -146
  2. package/dist/bin/cli.js.map +1 -1
  3. package/dist/src/index.js +11 -144
  4. package/dist/src/index.js.map +1 -1
  5. package/package.json +1 -1
  6. package/templates/app/auth/login/page.tsx +0 -153
  7. package/templates/app/dashboard/page.tsx +0 -102
  8. package/templates/app/globals.css +0 -249
  9. package/templates/app/layout.tsx +0 -40
  10. package/templates/app/page.tsx +0 -5
  11. package/templates/components/dashboard/widget.tsx +0 -113
  12. package/templates/components/layout/admin-midday-sidebar.tsx +0 -247
  13. package/templates/components/layout/admin-sidebar.tsx +0 -146
  14. package/templates/components/layout/header.tsx +0 -71
  15. package/templates/components/layout/main-content.tsx +0 -28
  16. package/templates/components/layout/midday-sidebar.tsx +0 -381
  17. package/templates/components/layout/nav-user.tsx +0 -108
  18. package/templates/components/layout/page-header.tsx +0 -95
  19. package/templates/components/layout/sidebar-context.tsx +0 -33
  20. package/templates/components/layout/sidebar.tsx +0 -194
  21. package/templates/components/layout/suspension-banner.tsx +0 -21
  22. package/templates/components/ui/accordion.tsx +0 -58
  23. package/templates/components/ui/alert-dialog.tsx +0 -165
  24. package/templates/components/ui/alert.tsx +0 -66
  25. package/templates/components/ui/avatar.tsx +0 -55
  26. package/templates/components/ui/badge.tsx +0 -50
  27. package/templates/components/ui/button.tsx +0 -89
  28. package/templates/components/ui/calendar.tsx +0 -220
  29. package/templates/components/ui/card.tsx +0 -89
  30. package/templates/components/ui/checkbox.tsx +0 -38
  31. package/templates/components/ui/collapsible.tsx +0 -33
  32. package/templates/components/ui/command.tsx +0 -196
  33. package/templates/components/ui/dialog.tsx +0 -153
  34. package/templates/components/ui/dropdown-menu.tsx +0 -280
  35. package/templates/components/ui/form.tsx +0 -171
  36. package/templates/components/ui/icons.tsx +0 -167
  37. package/templates/components/ui/input.tsx +0 -28
  38. package/templates/components/ui/label.tsx +0 -25
  39. package/templates/components/ui/popover.tsx +0 -59
  40. package/templates/components/ui/progress.tsx +0 -32
  41. package/templates/components/ui/radio-group.tsx +0 -45
  42. package/templates/components/ui/scroll-area.tsx +0 -63
  43. package/templates/components/ui/select.tsx +0 -208
  44. package/templates/components/ui/separator.tsx +0 -28
  45. package/templates/components/ui/sheet.tsx +0 -146
  46. package/templates/components/ui/sidebar.tsx +0 -726
  47. package/templates/components/ui/skeleton.tsx +0 -15
  48. package/templates/components/ui/slider.tsx +0 -58
  49. package/templates/components/ui/sonner.tsx +0 -47
  50. package/templates/components/ui/spinner.tsx +0 -27
  51. package/templates/components/ui/submit-button.tsx +0 -47
  52. package/templates/components/ui/switch.tsx +0 -31
  53. package/templates/components/ui/table.tsx +0 -120
  54. package/templates/components/ui/tabs.tsx +0 -75
  55. package/templates/components/ui/textarea.tsx +0 -26
  56. package/templates/components/ui/tooltip.tsx +0 -70
  57. package/templates/hooks/use-mobile.ts +0 -21
  58. package/templates/lib/supabase/client.ts +0 -8
  59. package/templates/lib/supabase/server.ts +0 -29
  60. package/templates/lib/utils.ts +0 -6
  61. package/templates/modules/auth/actions/auth-actions.ts +0 -12
@@ -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 }
@@ -1,196 +0,0 @@
1
- "use client"
2
-
3
- import * as React from "react"
4
- import { Command as CommandPrimitive } from "cmdk"
5
- import { SearchIcon } from "lucide-react"
6
-
7
- import { cn } from "@/lib/utils"
8
- import {
9
- Dialog,
10
- DialogContent,
11
- DialogDescription,
12
- DialogHeader,
13
- DialogTitle,
14
- } from "@/components/ui/dialog"
15
-
16
- function Command({
17
- className,
18
- ...props
19
- }: React.ComponentProps<typeof CommandPrimitive>) {
20
- return (
21
- <CommandPrimitive
22
- data-slot="command"
23
- className={cn(
24
- "flex h-full w-full flex-col overflow-hidden",
25
- "rounded-md bg-background",
26
- "text-popover-foreground",
27
- className
28
- )}
29
- {...props}
30
- />
31
- )
32
- }
33
-
34
- function CommandDialog({
35
- title = "Command Palette",
36
- description = "Search for a command to run...",
37
- children,
38
- className,
39
- showCloseButton = true,
40
- ...props
41
- }: React.ComponentProps<typeof Dialog> & {
42
- title?: string
43
- description?: string
44
- className?: string
45
- showCloseButton?: boolean
46
- }) {
47
- return (
48
- <Dialog {...props}>
49
- <DialogHeader className="sr-only">
50
- <DialogTitle>{title}</DialogTitle>
51
- <DialogDescription>{description}</DialogDescription>
52
- </DialogHeader>
53
- <DialogContent
54
- className={cn("overflow-hidden p-0", className)}
55
- showCloseButton={showCloseButton}
56
- >
57
- <Command className="[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5">
58
- {children}
59
- </Command>
60
- </DialogContent>
61
- </Dialog>
62
- )
63
- }
64
-
65
- function CommandInput({
66
- className,
67
- ...props
68
- }: React.ComponentProps<typeof CommandPrimitive.Input>) {
69
- return (
70
- <div
71
- data-slot="command-input-wrapper"
72
- className="flex items-center border-b border-border px-3"
73
- >
74
- <SearchIcon className="mr-2 h-4 w-4 shrink-0 text-[#878787]" />
75
- <CommandPrimitive.Input
76
- data-slot="command-input"
77
- className={cn(
78
- "flex h-11 w-full rounded-md bg-transparent py-3",
79
- "text-sm outline-none",
80
- "placeholder:text-muted-foreground",
81
- "disabled:cursor-not-allowed disabled:opacity-50",
82
- className
83
- )}
84
- {...props}
85
- />
86
- </div>
87
- )
88
- }
89
-
90
- function CommandList({
91
- className,
92
- ...props
93
- }: React.ComponentProps<typeof CommandPrimitive.List>) {
94
- return (
95
- <CommandPrimitive.List
96
- data-slot="command-list"
97
- className={cn(
98
- "max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",
99
- className
100
- )}
101
- {...props}
102
- />
103
- )
104
- }
105
-
106
- function CommandEmpty({
107
- ...props
108
- }: React.ComponentProps<typeof CommandPrimitive.Empty>) {
109
- return (
110
- <CommandPrimitive.Empty
111
- data-slot="command-empty"
112
- className="py-6 text-center text-sm"
113
- {...props}
114
- />
115
- )
116
- }
117
-
118
- function CommandGroup({
119
- className,
120
- ...props
121
- }: React.ComponentProps<typeof CommandPrimitive.Group>) {
122
- return (
123
- <CommandPrimitive.Group
124
- data-slot="command-group"
125
- className={cn(
126
- "text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",
127
- className
128
- )}
129
- {...props}
130
- />
131
- )
132
- }
133
-
134
- function CommandSeparator({
135
- className,
136
- ...props
137
- }: React.ComponentProps<typeof CommandPrimitive.Separator>) {
138
- return (
139
- <CommandPrimitive.Separator
140
- data-slot="command-separator"
141
- className={cn("bg-border -mx-1 h-px", className)}
142
- {...props}
143
- />
144
- )
145
- }
146
-
147
- function CommandItem({
148
- className,
149
- ...props
150
- }: React.ComponentProps<typeof CommandPrimitive.Item>) {
151
- return (
152
- <CommandPrimitive.Item
153
- data-slot="command-item"
154
- className={cn(
155
- "relative flex cursor-default select-none items-center",
156
- "rounded-sm px-2 py-1.5",
157
- "text-sm outline-none",
158
- "transition-colors duration-150",
159
- "data-[selected=true]:bg-[#f2f2f2] dark:data-[selected=true]:bg-[#2c2c2c]",
160
- "data-[selected=true]:text-foreground",
161
- "data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50",
162
- "[&_svg]:mr-2 [&_svg]:h-4 [&_svg]:w-4 [&_svg]:text-[#878787]",
163
- className
164
- )}
165
- {...props}
166
- />
167
- )
168
- }
169
-
170
- function CommandShortcut({
171
- className,
172
- ...props
173
- }: React.ComponentProps<"span">) {
174
- return (
175
- <span
176
- data-slot="command-shortcut"
177
- className={cn(
178
- "text-muted-foreground ml-auto text-xs tracking-widest",
179
- className
180
- )}
181
- {...props}
182
- />
183
- )
184
- }
185
-
186
- export {
187
- Command,
188
- CommandDialog,
189
- CommandInput,
190
- CommandList,
191
- CommandEmpty,
192
- CommandGroup,
193
- CommandItem,
194
- CommandShortcut,
195
- CommandSeparator,
196
- }