@betterstart/cli 0.1.28 → 0.1.29

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 (65) hide show
  1. package/dist/{chunk-SAPJG4NO.js → chunk-6JCWMKSY.js} +7 -4
  2. package/dist/{chunk-SAPJG4NO.js.map → chunk-6JCWMKSY.js.map} +1 -1
  3. package/dist/cli.js +742 -869
  4. package/dist/cli.js.map +1 -1
  5. package/dist/drizzle-config-EDKOEZ6G.js +7 -0
  6. package/package.json +1 -1
  7. package/templates/ui/accordion.tsx +73 -42
  8. package/templates/ui/alert-dialog.tsx +155 -90
  9. package/templates/ui/alert.tsx +46 -26
  10. package/templates/ui/aspect-ratio.tsx +4 -2
  11. package/templates/ui/avatar.tsx +92 -43
  12. package/templates/ui/badge.tsx +27 -12
  13. package/templates/ui/breadcrumb.tsx +63 -60
  14. package/templates/ui/button-group.tsx +8 -8
  15. package/templates/ui/button.tsx +44 -26
  16. package/templates/ui/calendar.tsx +43 -34
  17. package/templates/ui/card.tsx +71 -34
  18. package/templates/ui/carousel.tsx +111 -115
  19. package/templates/ui/chart.tsx +197 -207
  20. package/templates/ui/checkbox.tsx +21 -20
  21. package/templates/ui/collapsible.tsx +14 -4
  22. package/templates/ui/combobox.tsx +272 -0
  23. package/templates/ui/command.tsx +139 -101
  24. package/templates/ui/context-menu.tsx +214 -156
  25. package/templates/ui/dialog.tsx +118 -77
  26. package/templates/ui/direction.tsx +20 -0
  27. package/templates/ui/drawer.tsx +89 -69
  28. package/templates/ui/dropdown-menu.tsx +228 -164
  29. package/templates/ui/empty.tsx +8 -5
  30. package/templates/ui/field.tsx +25 -32
  31. package/templates/ui/hover-card.tsx +29 -20
  32. package/templates/ui/input-group.tsx +20 -37
  33. package/templates/ui/input-otp.tsx +57 -42
  34. package/templates/ui/input.tsx +14 -17
  35. package/templates/ui/item.tsx +27 -17
  36. package/templates/ui/kbd.tsx +1 -3
  37. package/templates/ui/label.tsx +14 -14
  38. package/templates/ui/markdown-editor.tsx +1 -1
  39. package/templates/ui/menubar.tsx +220 -188
  40. package/templates/ui/native-select.tsx +42 -0
  41. package/templates/ui/navigation-menu.tsx +130 -90
  42. package/templates/ui/pagination.tsx +88 -73
  43. package/templates/ui/popover.tsx +67 -26
  44. package/templates/ui/progress.tsx +24 -18
  45. package/templates/ui/radio-group.tsx +26 -20
  46. package/templates/ui/resizable.tsx +29 -29
  47. package/templates/ui/scroll-area.tsx +47 -38
  48. package/templates/ui/select.tsx +158 -125
  49. package/templates/ui/separator.tsx +21 -19
  50. package/templates/ui/sheet.tsx +104 -95
  51. package/templates/ui/sidebar.tsx +77 -183
  52. package/templates/ui/skeleton.tsx +8 -2
  53. package/templates/ui/slider.tsx +46 -17
  54. package/templates/ui/sonner.tsx +19 -9
  55. package/templates/ui/spinner.tsx +2 -2
  56. package/templates/ui/switch.tsx +24 -20
  57. package/templates/ui/table.tsx +68 -73
  58. package/templates/ui/tabs.tsx +71 -46
  59. package/templates/ui/textarea.tsx +13 -16
  60. package/templates/ui/toggle-group.tsx +57 -28
  61. package/templates/ui/toggle.tsx +21 -20
  62. package/templates/ui/tooltip.tsx +44 -23
  63. package/dist/drizzle-config-KISB26BA.js +0 -7
  64. package/templates/ui/use-mobile.tsx +0 -19
  65. /package/dist/{drizzle-config-KISB26BA.js.map → drizzle-config-EDKOEZ6G.js.map} +0 -0
@@ -1,115 +1,124 @@
1
1
  'use client'
2
2
 
3
+ import { Button } from '@cms/components/ui/button'
3
4
  import { cn } from '@cms/utils/cn'
4
- import * as SheetPrimitive from '@radix-ui/react-dialog'
5
- import { cva, type VariantProps } from 'class-variance-authority'
6
5
  import { X } from 'lucide-react'
7
- import * as React from 'react'
6
+ import { Dialog as SheetPrimitive } from 'radix-ui'
7
+ import type * as React from 'react'
8
8
 
9
- const Sheet = SheetPrimitive.Root
10
-
11
- const SheetTrigger = SheetPrimitive.Trigger
12
-
13
- const SheetClose = SheetPrimitive.Close
9
+ function Sheet({ ...props }: React.ComponentProps<typeof SheetPrimitive.Root>) {
10
+ return <SheetPrimitive.Root data-slot="sheet" {...props} />
11
+ }
14
12
 
15
- const SheetPortal = SheetPrimitive.Portal
13
+ function SheetTrigger({ ...props }: React.ComponentProps<typeof SheetPrimitive.Trigger>) {
14
+ return <SheetPrimitive.Trigger data-slot="sheet-trigger" {...props} />
15
+ }
16
16
 
17
- const SheetOverlay = React.forwardRef<
18
- React.ElementRef<typeof SheetPrimitive.Overlay>,
19
- React.ComponentPropsWithoutRef<typeof SheetPrimitive.Overlay>
20
- >(({ className, ...props }, ref) => (
21
- <SheetPrimitive.Overlay
22
- className={cn(
23
- 'fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',
24
- className
25
- )}
26
- {...props}
27
- ref={ref}
28
- />
29
- ))
30
- SheetOverlay.displayName = SheetPrimitive.Overlay.displayName
17
+ function SheetClose({ ...props }: React.ComponentProps<typeof SheetPrimitive.Close>) {
18
+ return <SheetPrimitive.Close data-slot="sheet-close" {...props} />
19
+ }
31
20
 
32
- const sheetVariants = cva(
33
- 'fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out',
34
- {
35
- variants: {
36
- side: {
37
- top: 'inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top',
38
- bottom:
39
- 'inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom',
40
- left: 'inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm',
41
- right:
42
- 'inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm'
43
- }
44
- },
45
- defaultVariants: {
46
- side: 'right'
47
- }
48
- }
49
- )
21
+ function SheetPortal({ ...props }: React.ComponentProps<typeof SheetPrimitive.Portal>) {
22
+ return <SheetPrimitive.Portal data-slot="sheet-portal" {...props} />
23
+ }
50
24
 
51
- interface SheetContentProps
52
- extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>,
53
- VariantProps<typeof sheetVariants> {}
25
+ function SheetOverlay({
26
+ className,
27
+ ...props
28
+ }: React.ComponentProps<typeof SheetPrimitive.Overlay>) {
29
+ return (
30
+ <SheetPrimitive.Overlay
31
+ data-slot="sheet-overlay"
32
+ className={cn(
33
+ 'data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 fixed inset-0 z-50 bg-black/10 duration-100 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs',
34
+ className
35
+ )}
36
+ {...props}
37
+ />
38
+ )
39
+ }
54
40
 
55
- const SheetContent = React.forwardRef<
56
- React.ElementRef<typeof SheetPrimitive.Content>,
57
- SheetContentProps
58
- >(({ side = 'right', className, children, ...props }, ref) => (
59
- <SheetPortal>
60
- <SheetOverlay />
61
- <SheetPrimitive.Content ref={ref} className={cn(sheetVariants({ side }), className)} {...props}>
62
- <SheetPrimitive.Close className="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary">
63
- <X className="size-4" />
64
- <span className="sr-only">Close</span>
65
- </SheetPrimitive.Close>
66
- {children}
67
- </SheetPrimitive.Content>
68
- </SheetPortal>
69
- ))
70
- SheetContent.displayName = SheetPrimitive.Content.displayName
41
+ function SheetContent({
42
+ className,
43
+ children,
44
+ side = 'right',
45
+ showCloseButton = true,
46
+ ...props
47
+ }: React.ComponentProps<typeof SheetPrimitive.Content> & {
48
+ side?: 'top' | 'right' | 'bottom' | 'left'
49
+ showCloseButton?: boolean
50
+ }) {
51
+ return (
52
+ <SheetPortal>
53
+ <SheetOverlay />
54
+ <SheetPrimitive.Content
55
+ data-slot="sheet-content"
56
+ data-side={side}
57
+ className={cn(
58
+ 'bg-background data-open:animate-in data-closed:animate-out data-[side=right]:data-closed:slide-out-to-right-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=top]:data-closed:slide-out-to-top-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:fade-out-0 data-open:fade-in-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=bottom]:data-open:slide-in-from-bottom-10 fixed z-50 flex flex-col gap-4 bg-clip-padding text-sm shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm',
59
+ className
60
+ )}
61
+ {...props}
62
+ >
63
+ {children}
64
+ {showCloseButton && (
65
+ <SheetPrimitive.Close data-slot="sheet-close" asChild>
66
+ <Button variant="ghost" className="absolute top-3 right-3" size="icon-sm">
67
+ <X />
68
+ <span className="sr-only">Close</span>
69
+ </Button>
70
+ </SheetPrimitive.Close>
71
+ )}
72
+ </SheetPrimitive.Content>
73
+ </SheetPortal>
74
+ )
75
+ }
71
76
 
72
- const SheetHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (
73
- <div className={cn('flex flex-col space-y-2 text-center sm:text-left', className)} {...props} />
74
- )
75
- SheetHeader.displayName = 'SheetHeader'
77
+ function SheetHeader({ className, ...props }: React.ComponentProps<'div'>) {
78
+ return (
79
+ <div
80
+ data-slot="sheet-header"
81
+ className={cn('flex flex-col gap-0.5 p-4', className)}
82
+ {...props}
83
+ />
84
+ )
85
+ }
76
86
 
77
- const SheetFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (
78
- <div
79
- className={cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className)}
80
- {...props}
81
- />
82
- )
83
- SheetFooter.displayName = 'SheetFooter'
87
+ function SheetFooter({ className, ...props }: React.ComponentProps<'div'>) {
88
+ return (
89
+ <div
90
+ data-slot="sheet-footer"
91
+ className={cn('mt-auto flex flex-col gap-2 p-4', className)}
92
+ {...props}
93
+ />
94
+ )
95
+ }
84
96
 
85
- const SheetTitle = React.forwardRef<
86
- React.ElementRef<typeof SheetPrimitive.Title>,
87
- React.ComponentPropsWithoutRef<typeof SheetPrimitive.Title>
88
- >(({ className, ...props }, ref) => (
89
- <SheetPrimitive.Title
90
- ref={ref}
91
- className={cn('text-lg font-semibold text-foreground', className)}
92
- {...props}
93
- />
94
- ))
95
- SheetTitle.displayName = SheetPrimitive.Title.displayName
97
+ function SheetTitle({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Title>) {
98
+ return (
99
+ <SheetPrimitive.Title
100
+ data-slot="sheet-title"
101
+ className={cn('text-foreground text-base font-medium', className)}
102
+ {...props}
103
+ />
104
+ )
105
+ }
96
106
 
97
- const SheetDescription = React.forwardRef<
98
- React.ElementRef<typeof SheetPrimitive.Description>,
99
- React.ComponentPropsWithoutRef<typeof SheetPrimitive.Description>
100
- >(({ className, ...props }, ref) => (
101
- <SheetPrimitive.Description
102
- ref={ref}
103
- className={cn('text-sm text-muted-foreground', className)}
104
- {...props}
105
- />
106
- ))
107
- SheetDescription.displayName = SheetPrimitive.Description.displayName
107
+ function SheetDescription({
108
+ className,
109
+ ...props
110
+ }: React.ComponentProps<typeof SheetPrimitive.Description>) {
111
+ return (
112
+ <SheetPrimitive.Description
113
+ data-slot="sheet-description"
114
+ className={cn('text-muted-foreground text-sm', className)}
115
+ {...props}
116
+ />
117
+ )
118
+ }
108
119
 
109
120
  export {
110
121
  Sheet,
111
- SheetPortal,
112
- SheetOverlay,
113
122
  SheetTrigger,
114
123
  SheetClose,
115
124
  SheetContent,