@nomad-e/bluma-cli 0.14.1 → 0.16.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.
- package/dist/config/native_tools.json +15 -3
- package/dist/main.js +0 -1
- package/dist/scaffold/.eslintrc.json +3 -0
- package/dist/scaffold/app/globals.css +46 -0
- package/dist/scaffold/app/layout.tsx +19 -0
- package/dist/scaffold/app/page.tsx +124 -0
- package/dist/scaffold/components/ui/README.md +12 -0
- package/dist/scaffold/components/ui/accordion.jsx +42 -0
- package/dist/scaffold/components/ui/alert-dialog.jsx +80 -0
- package/dist/scaffold/components/ui/alert.jsx +33 -0
- package/dist/scaffold/components/ui/aspect-ratio.jsx +5 -0
- package/dist/scaffold/components/ui/avatar.jsx +28 -0
- package/dist/scaffold/components/ui/badge.jsx +24 -0
- package/dist/scaffold/components/ui/breadcrumb.jsx +72 -0
- package/dist/scaffold/components/ui/button.jsx +40 -0
- package/dist/scaffold/components/ui/calendar.jsx +56 -0
- package/dist/scaffold/components/ui/card.jsx +38 -0
- package/dist/scaffold/components/ui/carousel.jsx +168 -0
- package/dist/scaffold/components/ui/chart.jsx +76 -0
- package/dist/scaffold/components/ui/checkbox.jsx +22 -0
- package/dist/scaffold/components/ui/collapsible.jsx +7 -0
- package/dist/scaffold/components/ui/command.jsx +100 -0
- package/dist/scaffold/components/ui/context-menu.jsx +137 -0
- package/dist/scaffold/components/ui/dialog.jsx +72 -0
- package/dist/scaffold/components/ui/drawer.jsx +68 -0
- package/dist/scaffold/components/ui/dropdown-menu.jsx +143 -0
- package/dist/scaffold/components/ui/form.jsx +88 -0
- package/dist/scaffold/components/ui/hover-card.jsx +22 -0
- package/dist/scaffold/components/ui/input-otp.jsx +49 -0
- package/dist/scaffold/components/ui/input.jsx +19 -0
- package/dist/scaffold/components/ui/label.jsx +15 -0
- package/dist/scaffold/components/ui/menubar.jsx +161 -0
- package/dist/scaffold/components/ui/navigation-menu.jsx +95 -0
- package/dist/scaffold/components/ui/pagination.jsx +77 -0
- package/dist/scaffold/components/ui/popover.jsx +25 -0
- package/dist/scaffold/components/ui/progress.jsx +19 -0
- package/dist/scaffold/components/ui/radio-group.jsx +29 -0
- package/dist/scaffold/components/ui/resizable.jsx +27 -0
- package/dist/scaffold/components/ui/scroll-area.jsx +31 -0
- package/dist/scaffold/components/ui/select.jsx +117 -0
- package/dist/scaffold/components/ui/separator.jsx +22 -0
- package/dist/scaffold/components/ui/sheet.jsx +81 -0
- package/dist/scaffold/components/ui/skeleton.jsx +7 -0
- package/dist/scaffold/components/ui/slider.jsx +19 -0
- package/dist/scaffold/components/ui/sonner.jsx +22 -0
- package/dist/scaffold/components/ui/switch.jsx +23 -0
- package/dist/scaffold/components/ui/table.jsx +61 -0
- package/dist/scaffold/components/ui/tabs.jsx +43 -0
- package/dist/scaffold/components/ui/textarea.jsx +18 -0
- package/dist/scaffold/components/ui/toast.jsx +85 -0
- package/dist/scaffold/components/ui/toaster.jsx +33 -0
- package/dist/scaffold/components/ui/toggle-group.jsx +41 -0
- package/dist/scaffold/components/ui/toggle.jsx +30 -0
- package/dist/scaffold/components/ui/tooltip.jsx +22 -0
- package/dist/scaffold/hooks/use-toast.ts +101 -0
- package/dist/scaffold/lib/utils.ts +6 -0
- package/dist/scaffold/next.config.js +5 -0
- package/dist/scaffold/next.config.mjs +15 -0
- package/dist/scaffold/next.config.ts +19 -0
- package/dist/scaffold/package.json +70 -0
- package/dist/scaffold/postcss.config.js +6 -0
- package/dist/scaffold/tailwind.config.ts +57 -0
- package/dist/scaffold/tsconfig.json +20 -0
- package/package.json +1 -1
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
3
|
+
import { cn } from '@/lib/utils';
|
|
4
|
+
|
|
5
|
+
const Popover = PopoverPrimitive.Root;
|
|
6
|
+
const PopoverTrigger = PopoverPrimitive.Trigger;
|
|
7
|
+
const PopoverAnchor = PopoverPrimitive.Anchor;
|
|
8
|
+
|
|
9
|
+
const PopoverContent = React.forwardRef(({ className, align = 'center', sideOffset = 4, ...props }, ref) => (
|
|
10
|
+
<PopoverPrimitive.Portal>
|
|
11
|
+
<PopoverPrimitive.Content
|
|
12
|
+
ref={ref}
|
|
13
|
+
align={align}
|
|
14
|
+
sideOffset={sideOffset}
|
|
15
|
+
className={cn(
|
|
16
|
+
'z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none',
|
|
17
|
+
className
|
|
18
|
+
)}
|
|
19
|
+
{...props}
|
|
20
|
+
/>
|
|
21
|
+
</PopoverPrimitive.Portal>
|
|
22
|
+
));
|
|
23
|
+
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
24
|
+
|
|
25
|
+
export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as ProgressPrimitive from '@radix-ui/react-progress';
|
|
3
|
+
import { cn } from '@/lib/utils';
|
|
4
|
+
|
|
5
|
+
const Progress = React.forwardRef(({ className, value, ...props }, ref) => (
|
|
6
|
+
<ProgressPrimitive.Root
|
|
7
|
+
ref={ref}
|
|
8
|
+
className={cn('relative h-4 w-full overflow-hidden rounded-full bg-secondary', className)}
|
|
9
|
+
{...props}
|
|
10
|
+
>
|
|
11
|
+
<ProgressPrimitive.Indicator
|
|
12
|
+
className="h-full w-full flex-1 bg-primary transition-all"
|
|
13
|
+
style={{ transform: `translateX(-${100 - (value || 0)}%)` }}
|
|
14
|
+
/>
|
|
15
|
+
</ProgressPrimitive.Root>
|
|
16
|
+
));
|
|
17
|
+
Progress.displayName = ProgressPrimitive.Root.displayName;
|
|
18
|
+
|
|
19
|
+
export { Progress };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
3
|
+
import { Circle } from 'lucide-react';
|
|
4
|
+
import { cn } from '@/lib/utils';
|
|
5
|
+
|
|
6
|
+
const RadioGroup = React.forwardRef(({ className, ...props }, ref) => {
|
|
7
|
+
return <RadioGroupPrimitive.Root className={cn('grid gap-2', className)} {...props} ref={ref} />;
|
|
8
|
+
});
|
|
9
|
+
RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
|
|
10
|
+
|
|
11
|
+
const RadioGroupItem = React.forwardRef(({ className, ...props }, ref) => {
|
|
12
|
+
return (
|
|
13
|
+
<RadioGroupPrimitive.Item
|
|
14
|
+
ref={ref}
|
|
15
|
+
className={cn(
|
|
16
|
+
'aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50',
|
|
17
|
+
className
|
|
18
|
+
)}
|
|
19
|
+
{...props}
|
|
20
|
+
>
|
|
21
|
+
<RadioGroupPrimitive.Indicator className="flex items-center justify-center">
|
|
22
|
+
<Circle className="h-2.5 w-2.5 fill-current text-current" />
|
|
23
|
+
</RadioGroupPrimitive.Indicator>
|
|
24
|
+
</RadioGroupPrimitive.Item>
|
|
25
|
+
);
|
|
26
|
+
});
|
|
27
|
+
RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
|
|
28
|
+
|
|
29
|
+
export { RadioGroup, RadioGroupItem };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { GripVertical } from 'lucide-react';
|
|
2
|
+
import { Group, Panel, Separator } from 'react-resizable-panels';
|
|
3
|
+
import { cn } from '@/lib/utils';
|
|
4
|
+
|
|
5
|
+
const ResizablePanelGroup = ({ className, ...props }) => (
|
|
6
|
+
<Group className={cn('h-full w-full', className)} {...props} />
|
|
7
|
+
);
|
|
8
|
+
|
|
9
|
+
const ResizablePanel = Panel;
|
|
10
|
+
|
|
11
|
+
const ResizableHandle = ({ withHandle, className, ...props }) => (
|
|
12
|
+
<Separator
|
|
13
|
+
className={cn(
|
|
14
|
+
'relative flex w-px shrink-0 items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1',
|
|
15
|
+
className
|
|
16
|
+
)}
|
|
17
|
+
{...props}
|
|
18
|
+
>
|
|
19
|
+
{withHandle && (
|
|
20
|
+
<div className="z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border">
|
|
21
|
+
<GripVertical className="h-2.5 w-2.5" />
|
|
22
|
+
</div>
|
|
23
|
+
)}
|
|
24
|
+
</Separator>
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
export { ResizablePanelGroup, ResizablePanel, ResizableHandle };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
3
|
+
import { cn } from '@/lib/utils';
|
|
4
|
+
|
|
5
|
+
const ScrollArea = React.forwardRef(({ className, children, ...props }, ref) => (
|
|
6
|
+
<ScrollAreaPrimitive.Root ref={ref} className={cn('relative overflow-hidden', className)} {...props}>
|
|
7
|
+
<ScrollAreaPrimitive.Viewport className="h-full w-full rounded-[inherit]">{children}</ScrollAreaPrimitive.Viewport>
|
|
8
|
+
<ScrollBar />
|
|
9
|
+
<ScrollAreaPrimitive.Corner />
|
|
10
|
+
</ScrollAreaPrimitive.Root>
|
|
11
|
+
));
|
|
12
|
+
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
|
|
13
|
+
|
|
14
|
+
const ScrollBar = React.forwardRef(({ className, orientation = 'vertical', ...props }, ref) => (
|
|
15
|
+
<ScrollAreaPrimitive.ScrollAreaScrollbar
|
|
16
|
+
ref={ref}
|
|
17
|
+
orientation={orientation}
|
|
18
|
+
className={cn(
|
|
19
|
+
'flex touch-none select-none transition-colors',
|
|
20
|
+
orientation === 'vertical' && 'h-full w-2.5 border-l border-l-transparent p-[1px]',
|
|
21
|
+
orientation === 'horizontal' && 'h-2.5 flex-col border-t border-t-transparent p-[1px]',
|
|
22
|
+
className
|
|
23
|
+
)}
|
|
24
|
+
{...props}
|
|
25
|
+
>
|
|
26
|
+
<ScrollAreaPrimitive.ScrollAreaThumb className="relative flex-1 rounded-full bg-border" />
|
|
27
|
+
</ScrollAreaPrimitive.ScrollAreaScrollbar>
|
|
28
|
+
));
|
|
29
|
+
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
|
30
|
+
|
|
31
|
+
export { ScrollArea, ScrollBar };
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
3
|
+
import { Check, ChevronDown, ChevronUp } from 'lucide-react';
|
|
4
|
+
import { cn } from '@/lib/utils';
|
|
5
|
+
|
|
6
|
+
const Select = SelectPrimitive.Root;
|
|
7
|
+
const SelectGroup = SelectPrimitive.Group;
|
|
8
|
+
const SelectValue = SelectPrimitive.Value;
|
|
9
|
+
|
|
10
|
+
const SelectTrigger = React.forwardRef(({ className, children, ...props }, ref) => (
|
|
11
|
+
<SelectPrimitive.Trigger
|
|
12
|
+
ref={ref}
|
|
13
|
+
className={cn(
|
|
14
|
+
'flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1',
|
|
15
|
+
className
|
|
16
|
+
)}
|
|
17
|
+
{...props}
|
|
18
|
+
>
|
|
19
|
+
{children}
|
|
20
|
+
<SelectPrimitive.Icon asChild>
|
|
21
|
+
<ChevronDown className="h-4 w-4 opacity-50" />
|
|
22
|
+
</SelectPrimitive.Icon>
|
|
23
|
+
</SelectPrimitive.Trigger>
|
|
24
|
+
));
|
|
25
|
+
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
26
|
+
|
|
27
|
+
const SelectScrollUpButton = React.forwardRef(({ className, ...props }, ref) => (
|
|
28
|
+
<SelectPrimitive.ScrollUpButton
|
|
29
|
+
ref={ref}
|
|
30
|
+
className={cn('flex cursor-default items-center justify-center py-1', className)}
|
|
31
|
+
{...props}
|
|
32
|
+
>
|
|
33
|
+
<ChevronUp className="h-4 w-4" />
|
|
34
|
+
</SelectPrimitive.ScrollUpButton>
|
|
35
|
+
));
|
|
36
|
+
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
37
|
+
|
|
38
|
+
const SelectScrollDownButton = React.forwardRef(({ className, ...props }, ref) => (
|
|
39
|
+
<SelectPrimitive.ScrollDownButton
|
|
40
|
+
ref={ref}
|
|
41
|
+
className={cn('flex cursor-default items-center justify-center py-1', className)}
|
|
42
|
+
{...props}
|
|
43
|
+
>
|
|
44
|
+
<ChevronDown className="h-4 w-4" />
|
|
45
|
+
</SelectPrimitive.ScrollDownButton>
|
|
46
|
+
));
|
|
47
|
+
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
48
|
+
|
|
49
|
+
const SelectContent = React.forwardRef(({ className, children, position = 'popper', ...props }, ref) => (
|
|
50
|
+
<SelectPrimitive.Portal>
|
|
51
|
+
<SelectPrimitive.Content
|
|
52
|
+
ref={ref}
|
|
53
|
+
className={cn(
|
|
54
|
+
'relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md',
|
|
55
|
+
position === 'popper' &&
|
|
56
|
+
'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1',
|
|
57
|
+
className
|
|
58
|
+
)}
|
|
59
|
+
position={position}
|
|
60
|
+
{...props}
|
|
61
|
+
>
|
|
62
|
+
<SelectScrollUpButton />
|
|
63
|
+
<SelectPrimitive.Viewport
|
|
64
|
+
className={cn(
|
|
65
|
+
position === 'popper' &&
|
|
66
|
+
'h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] p-1'
|
|
67
|
+
)}
|
|
68
|
+
>
|
|
69
|
+
{children}
|
|
70
|
+
</SelectPrimitive.Viewport>
|
|
71
|
+
<SelectScrollDownButton />
|
|
72
|
+
</SelectPrimitive.Content>
|
|
73
|
+
</SelectPrimitive.Portal>
|
|
74
|
+
));
|
|
75
|
+
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
76
|
+
|
|
77
|
+
const SelectLabel = React.forwardRef(({ className, ...props }, ref) => (
|
|
78
|
+
<SelectPrimitive.Label ref={ref} className={cn('py-1.5 pl-8 pr-2 text-sm font-semibold', className)} {...props} />
|
|
79
|
+
));
|
|
80
|
+
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
81
|
+
|
|
82
|
+
const SelectItem = React.forwardRef(({ className, children, ...props }, ref) => (
|
|
83
|
+
<SelectPrimitive.Item
|
|
84
|
+
ref={ref}
|
|
85
|
+
className={cn(
|
|
86
|
+
'relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
|
|
87
|
+
className
|
|
88
|
+
)}
|
|
89
|
+
{...props}
|
|
90
|
+
>
|
|
91
|
+
<span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
|
|
92
|
+
<SelectPrimitive.ItemIndicator>
|
|
93
|
+
<Check className="h-4 w-4" />
|
|
94
|
+
</SelectPrimitive.ItemIndicator>
|
|
95
|
+
</span>
|
|
96
|
+
<SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
|
|
97
|
+
</SelectPrimitive.Item>
|
|
98
|
+
));
|
|
99
|
+
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
100
|
+
|
|
101
|
+
const SelectSeparator = React.forwardRef(({ className, ...props }, ref) => (
|
|
102
|
+
<SelectPrimitive.Separator ref={ref} className={cn('-mx-1 my-1 h-px bg-muted', className)} {...props} />
|
|
103
|
+
));
|
|
104
|
+
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
105
|
+
|
|
106
|
+
export {
|
|
107
|
+
Select,
|
|
108
|
+
SelectGroup,
|
|
109
|
+
SelectValue,
|
|
110
|
+
SelectTrigger,
|
|
111
|
+
SelectContent,
|
|
112
|
+
SelectLabel,
|
|
113
|
+
SelectItem,
|
|
114
|
+
SelectSeparator,
|
|
115
|
+
SelectScrollUpButton,
|
|
116
|
+
SelectScrollDownButton,
|
|
117
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
3
|
+
import { cn } from '@/lib/utils';
|
|
4
|
+
|
|
5
|
+
const Separator = React.forwardRef(
|
|
6
|
+
({ className, orientation = 'horizontal', decorative = true, ...props }, ref) => (
|
|
7
|
+
<SeparatorPrimitive.Root
|
|
8
|
+
ref={ref}
|
|
9
|
+
decorative={decorative}
|
|
10
|
+
orientation={orientation}
|
|
11
|
+
className={cn(
|
|
12
|
+
'shrink-0 bg-border',
|
|
13
|
+
orientation === 'horizontal' ? 'h-[1px] w-full' : 'h-full w-[1px]',
|
|
14
|
+
className
|
|
15
|
+
)}
|
|
16
|
+
{...props}
|
|
17
|
+
/>
|
|
18
|
+
)
|
|
19
|
+
);
|
|
20
|
+
Separator.displayName = SeparatorPrimitive.Root.displayName;
|
|
21
|
+
|
|
22
|
+
export { Separator };
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as SheetPrimitive from '@radix-ui/react-dialog';
|
|
3
|
+
import { cva } from 'class-variance-authority';
|
|
4
|
+
import { X } from 'lucide-react';
|
|
5
|
+
import { cn } from '@/lib/utils';
|
|
6
|
+
|
|
7
|
+
const Sheet = SheetPrimitive.Root;
|
|
8
|
+
const SheetTrigger = SheetPrimitive.Trigger;
|
|
9
|
+
const SheetClose = SheetPrimitive.Close;
|
|
10
|
+
const SheetPortal = SheetPrimitive.Portal;
|
|
11
|
+
|
|
12
|
+
const SheetOverlay = React.forwardRef(({ className, ...props }, ref) => (
|
|
13
|
+
<SheetPrimitive.Overlay
|
|
14
|
+
className={cn('fixed inset-0 z-50 bg-black/80', className)}
|
|
15
|
+
{...props}
|
|
16
|
+
ref={ref}
|
|
17
|
+
/>
|
|
18
|
+
));
|
|
19
|
+
SheetOverlay.displayName = SheetPrimitive.Overlay.displayName;
|
|
20
|
+
|
|
21
|
+
const sheetVariants = cva(
|
|
22
|
+
'fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:duration-300 data-[state=closed]:duration-200',
|
|
23
|
+
{
|
|
24
|
+
variants: {
|
|
25
|
+
side: {
|
|
26
|
+
top: 'inset-x-0 top-0 border-b data-[state=closed]:-translate-y-full data-[state=open]:translate-y-0',
|
|
27
|
+
bottom: 'inset-x-0 bottom-0 border-t data-[state=closed]:translate-y-full data-[state=open]:translate-y-0',
|
|
28
|
+
left: 'inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:-translate-x-full data-[state=open]:translate-x-0 sm:max-w-sm',
|
|
29
|
+
right: 'inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:translate-x-full data-[state=open]:translate-x-0 sm:max-w-sm',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
defaultVariants: { side: 'right' },
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
const SheetContent = React.forwardRef(({ side = 'right', className, children, ...props }, ref) => (
|
|
37
|
+
<SheetPortal>
|
|
38
|
+
<SheetOverlay />
|
|
39
|
+
<SheetPrimitive.Content ref={ref} className={cn(sheetVariants({ side }), className)} {...props}>
|
|
40
|
+
{children}
|
|
41
|
+
<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">
|
|
42
|
+
<X className="h-4 w-4" />
|
|
43
|
+
<span className="sr-only">Close</span>
|
|
44
|
+
</SheetPrimitive.Close>
|
|
45
|
+
</SheetPrimitive.Content>
|
|
46
|
+
</SheetPortal>
|
|
47
|
+
));
|
|
48
|
+
SheetContent.displayName = SheetPrimitive.Content.displayName;
|
|
49
|
+
|
|
50
|
+
const SheetHeader = ({ className, ...props }) => (
|
|
51
|
+
<div className={cn('flex flex-col space-y-2 text-center sm:text-left', className)} {...props} />
|
|
52
|
+
);
|
|
53
|
+
SheetHeader.displayName = 'SheetHeader';
|
|
54
|
+
|
|
55
|
+
const SheetFooter = ({ className, ...props }) => (
|
|
56
|
+
<div className={cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:gap-2', className)} {...props} />
|
|
57
|
+
);
|
|
58
|
+
SheetFooter.displayName = 'SheetFooter';
|
|
59
|
+
|
|
60
|
+
const SheetTitle = React.forwardRef(({ className, ...props }, ref) => (
|
|
61
|
+
<SheetPrimitive.Title ref={ref} className={cn('text-lg font-semibold text-foreground', className)} {...props} />
|
|
62
|
+
));
|
|
63
|
+
SheetTitle.displayName = SheetPrimitive.Title.displayName;
|
|
64
|
+
|
|
65
|
+
const SheetDescription = React.forwardRef(({ className, ...props }, ref) => (
|
|
66
|
+
<SheetPrimitive.Description ref={ref} className={cn('text-sm text-muted-foreground', className)} {...props} />
|
|
67
|
+
));
|
|
68
|
+
SheetDescription.displayName = SheetPrimitive.Description.displayName;
|
|
69
|
+
|
|
70
|
+
export {
|
|
71
|
+
Sheet,
|
|
72
|
+
SheetPortal,
|
|
73
|
+
SheetOverlay,
|
|
74
|
+
SheetTrigger,
|
|
75
|
+
SheetClose,
|
|
76
|
+
SheetContent,
|
|
77
|
+
SheetHeader,
|
|
78
|
+
SheetFooter,
|
|
79
|
+
SheetTitle,
|
|
80
|
+
SheetDescription,
|
|
81
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as SliderPrimitive from '@radix-ui/react-slider';
|
|
3
|
+
import { cn } from '@/lib/utils';
|
|
4
|
+
|
|
5
|
+
const Slider = React.forwardRef(({ className, ...props }, ref) => (
|
|
6
|
+
<SliderPrimitive.Root
|
|
7
|
+
ref={ref}
|
|
8
|
+
className={cn('relative flex w-full touch-none select-none items-center', className)}
|
|
9
|
+
{...props}
|
|
10
|
+
>
|
|
11
|
+
<SliderPrimitive.Track className="relative h-2 w-full grow overflow-hidden rounded-full bg-secondary">
|
|
12
|
+
<SliderPrimitive.Range className="absolute h-full bg-primary" />
|
|
13
|
+
</SliderPrimitive.Track>
|
|
14
|
+
<SliderPrimitive.Thumb className="block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50" />
|
|
15
|
+
</SliderPrimitive.Root>
|
|
16
|
+
));
|
|
17
|
+
Slider.displayName = SliderPrimitive.Root.displayName;
|
|
18
|
+
|
|
19
|
+
export { Slider };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Toaster as Sonner } from 'sonner';
|
|
3
|
+
|
|
4
|
+
const Toaster = ({ ...props }) => {
|
|
5
|
+
return (
|
|
6
|
+
<Sonner
|
|
7
|
+
className="toaster group"
|
|
8
|
+
toastOptions={{
|
|
9
|
+
classNames: {
|
|
10
|
+
toast:
|
|
11
|
+
'group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg',
|
|
12
|
+
description: 'group-[.toast]:text-muted-foreground',
|
|
13
|
+
actionButton: 'group-[.toast]:bg-primary group-[.toast]:text-primary-foreground',
|
|
14
|
+
cancelButton: 'group-[.toast]:bg-muted group-[.toast]:text-muted-foreground',
|
|
15
|
+
},
|
|
16
|
+
}}
|
|
17
|
+
{...props}
|
|
18
|
+
/>
|
|
19
|
+
);
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export { Toaster };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as SwitchPrimitives from '@radix-ui/react-switch';
|
|
3
|
+
import { cn } from '@/lib/utils';
|
|
4
|
+
|
|
5
|
+
const Switch = React.forwardRef(({ className, ...props }, ref) => (
|
|
6
|
+
<SwitchPrimitives.Root
|
|
7
|
+
className={cn(
|
|
8
|
+
'peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input',
|
|
9
|
+
className
|
|
10
|
+
)}
|
|
11
|
+
{...props}
|
|
12
|
+
ref={ref}
|
|
13
|
+
>
|
|
14
|
+
<SwitchPrimitives.Thumb
|
|
15
|
+
className={cn(
|
|
16
|
+
'pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0'
|
|
17
|
+
)}
|
|
18
|
+
/>
|
|
19
|
+
</SwitchPrimitives.Root>
|
|
20
|
+
));
|
|
21
|
+
Switch.displayName = SwitchPrimitives.Root.displayName;
|
|
22
|
+
|
|
23
|
+
export { Switch };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { cn } from '@/lib/utils';
|
|
3
|
+
|
|
4
|
+
const Table = React.forwardRef(({ className, ...props }, ref) => (
|
|
5
|
+
<div className="relative w-full overflow-auto">
|
|
6
|
+
<table ref={ref} className={cn('w-full caption-bottom text-sm', className)} {...props} />
|
|
7
|
+
</div>
|
|
8
|
+
));
|
|
9
|
+
Table.displayName = 'Table';
|
|
10
|
+
|
|
11
|
+
const TableHeader = React.forwardRef(({ className, ...props }, ref) => (
|
|
12
|
+
<thead ref={ref} className={cn('[&_tr]:border-b', className)} {...props} />
|
|
13
|
+
));
|
|
14
|
+
TableHeader.displayName = 'TableHeader';
|
|
15
|
+
|
|
16
|
+
const TableBody = React.forwardRef(({ className, ...props }, ref) => (
|
|
17
|
+
<tbody ref={ref} className={cn('[&_tr:last-child]:border-0', className)} {...props} />
|
|
18
|
+
));
|
|
19
|
+
TableBody.displayName = 'TableBody';
|
|
20
|
+
|
|
21
|
+
const TableFooter = React.forwardRef(({ className, ...props }, ref) => (
|
|
22
|
+
<tfoot
|
|
23
|
+
ref={ref}
|
|
24
|
+
className={cn('border-t bg-muted/50 font-medium [&>tr]:last:border-b-0', className)}
|
|
25
|
+
{...props}
|
|
26
|
+
/>
|
|
27
|
+
));
|
|
28
|
+
TableFooter.displayName = 'TableFooter';
|
|
29
|
+
|
|
30
|
+
const TableRow = React.forwardRef(({ className, ...props }, ref) => (
|
|
31
|
+
<tr
|
|
32
|
+
ref={ref}
|
|
33
|
+
className={cn('border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted', className)}
|
|
34
|
+
{...props}
|
|
35
|
+
/>
|
|
36
|
+
));
|
|
37
|
+
TableRow.displayName = 'TableRow';
|
|
38
|
+
|
|
39
|
+
const TableHead = React.forwardRef(({ className, ...props }, ref) => (
|
|
40
|
+
<th
|
|
41
|
+
ref={ref}
|
|
42
|
+
className={cn(
|
|
43
|
+
'h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0',
|
|
44
|
+
className
|
|
45
|
+
)}
|
|
46
|
+
{...props}
|
|
47
|
+
/>
|
|
48
|
+
));
|
|
49
|
+
TableHead.displayName = 'TableHead';
|
|
50
|
+
|
|
51
|
+
const TableCell = React.forwardRef(({ className, ...props }, ref) => (
|
|
52
|
+
<td ref={ref} className={cn('p-4 align-middle [&:has([role=checkbox])]:pr-0', className)} {...props} />
|
|
53
|
+
));
|
|
54
|
+
TableCell.displayName = 'TableCell';
|
|
55
|
+
|
|
56
|
+
const TableCaption = React.forwardRef(({ className, ...props }, ref) => (
|
|
57
|
+
<caption ref={ref} className={cn('mt-4 text-sm text-muted-foreground', className)} {...props} />
|
|
58
|
+
));
|
|
59
|
+
TableCaption.displayName = 'TableCaption';
|
|
60
|
+
|
|
61
|
+
export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
3
|
+
import { cn } from '@/lib/utils';
|
|
4
|
+
|
|
5
|
+
const Tabs = TabsPrimitive.Root;
|
|
6
|
+
|
|
7
|
+
const TabsList = React.forwardRef(({ className, ...props }, ref) => (
|
|
8
|
+
<TabsPrimitive.List
|
|
9
|
+
ref={ref}
|
|
10
|
+
className={cn(
|
|
11
|
+
'inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground',
|
|
12
|
+
className
|
|
13
|
+
)}
|
|
14
|
+
{...props}
|
|
15
|
+
/>
|
|
16
|
+
));
|
|
17
|
+
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
18
|
+
|
|
19
|
+
const TabsTrigger = React.forwardRef(({ className, ...props }, ref) => (
|
|
20
|
+
<TabsPrimitive.Trigger
|
|
21
|
+
ref={ref}
|
|
22
|
+
className={cn(
|
|
23
|
+
'inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm',
|
|
24
|
+
className
|
|
25
|
+
)}
|
|
26
|
+
{...props}
|
|
27
|
+
/>
|
|
28
|
+
));
|
|
29
|
+
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
30
|
+
|
|
31
|
+
const TabsContent = React.forwardRef(({ className, ...props }, ref) => (
|
|
32
|
+
<TabsPrimitive.Content
|
|
33
|
+
ref={ref}
|
|
34
|
+
className={cn(
|
|
35
|
+
'mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2',
|
|
36
|
+
className
|
|
37
|
+
)}
|
|
38
|
+
{...props}
|
|
39
|
+
/>
|
|
40
|
+
));
|
|
41
|
+
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
42
|
+
|
|
43
|
+
export { Tabs, TabsList, TabsTrigger, TabsContent };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { cn } from '@/lib/utils';
|
|
3
|
+
|
|
4
|
+
const Textarea = React.forwardRef(({ className, ...props }, ref) => {
|
|
5
|
+
return (
|
|
6
|
+
<textarea
|
|
7
|
+
className={cn(
|
|
8
|
+
'flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',
|
|
9
|
+
className
|
|
10
|
+
)}
|
|
11
|
+
ref={ref}
|
|
12
|
+
{...props}
|
|
13
|
+
/>
|
|
14
|
+
);
|
|
15
|
+
});
|
|
16
|
+
Textarea.displayName = 'Textarea';
|
|
17
|
+
|
|
18
|
+
export { Textarea };
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as ToastPrimitives from '@radix-ui/react-toast';
|
|
3
|
+
import { X } from 'lucide-react';
|
|
4
|
+
import { cva } from 'class-variance-authority';
|
|
5
|
+
import { cn } from '@/lib/utils';
|
|
6
|
+
|
|
7
|
+
const ToastProvider = ToastPrimitives.Provider;
|
|
8
|
+
|
|
9
|
+
const ToastViewport = React.forwardRef(({ className, ...props }, ref) => (
|
|
10
|
+
<ToastPrimitives.Viewport
|
|
11
|
+
ref={ref}
|
|
12
|
+
className={cn(
|
|
13
|
+
'fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]',
|
|
14
|
+
className
|
|
15
|
+
)}
|
|
16
|
+
{...props}
|
|
17
|
+
/>
|
|
18
|
+
));
|
|
19
|
+
ToastViewport.displayName = ToastPrimitives.Viewport.displayName;
|
|
20
|
+
|
|
21
|
+
const toastVariants = cva(
|
|
22
|
+
'group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none',
|
|
23
|
+
{
|
|
24
|
+
variants: {
|
|
25
|
+
variant: {
|
|
26
|
+
default: 'border bg-background text-foreground',
|
|
27
|
+
destructive: 'destructive group border-destructive bg-destructive text-destructive-foreground',
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
defaultVariants: { variant: 'default' },
|
|
31
|
+
}
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
const Toast = React.forwardRef(({ className, variant, ...props }, ref) => {
|
|
35
|
+
return <ToastPrimitives.Root ref={ref} className={cn(toastVariants({ variant }), className)} {...props} />;
|
|
36
|
+
});
|
|
37
|
+
Toast.displayName = ToastPrimitives.Root.displayName;
|
|
38
|
+
|
|
39
|
+
const ToastAction = React.forwardRef(({ className, ...props }, ref) => (
|
|
40
|
+
<ToastPrimitives.Action
|
|
41
|
+
ref={ref}
|
|
42
|
+
className={cn(
|
|
43
|
+
'inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive',
|
|
44
|
+
className
|
|
45
|
+
)}
|
|
46
|
+
{...props}
|
|
47
|
+
/>
|
|
48
|
+
));
|
|
49
|
+
ToastAction.displayName = ToastPrimitives.Action.displayName;
|
|
50
|
+
|
|
51
|
+
const ToastClose = React.forwardRef(({ className, ...props }, ref) => (
|
|
52
|
+
<ToastPrimitives.Close
|
|
53
|
+
ref={ref}
|
|
54
|
+
className={cn(
|
|
55
|
+
'absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600',
|
|
56
|
+
className
|
|
57
|
+
)}
|
|
58
|
+
toast-close=""
|
|
59
|
+
{...props}
|
|
60
|
+
>
|
|
61
|
+
<X className="h-4 w-4" />
|
|
62
|
+
</ToastPrimitives.Close>
|
|
63
|
+
));
|
|
64
|
+
ToastClose.displayName = ToastPrimitives.Close.displayName;
|
|
65
|
+
|
|
66
|
+
const ToastTitle = React.forwardRef(({ className, ...props }, ref) => (
|
|
67
|
+
<ToastPrimitives.Title ref={ref} className={cn('text-sm font-semibold', className)} {...props} />
|
|
68
|
+
));
|
|
69
|
+
ToastTitle.displayName = ToastPrimitives.Title.displayName;
|
|
70
|
+
|
|
71
|
+
const ToastDescription = React.forwardRef(({ className, ...props }, ref) => (
|
|
72
|
+
<ToastPrimitives.Description ref={ref} className={cn('text-sm opacity-90', className)} {...props} />
|
|
73
|
+
));
|
|
74
|
+
ToastDescription.displayName = ToastPrimitives.Description.displayName;
|
|
75
|
+
|
|
76
|
+
export {
|
|
77
|
+
ToastProvider,
|
|
78
|
+
ToastViewport,
|
|
79
|
+
Toast,
|
|
80
|
+
ToastTitle,
|
|
81
|
+
ToastDescription,
|
|
82
|
+
ToastClose,
|
|
83
|
+
ToastAction,
|
|
84
|
+
toastVariants,
|
|
85
|
+
};
|