create-nextjs-cms 0.5.30 → 0.5.32
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/package.json +3 -3
- package/templates/default/app/layout.tsx +2 -2
- package/templates/default/components/form/DateRangeFormInput.tsx +1 -1
- package/templates/default/components/ui/accordion.tsx +33 -37
- package/templates/default/components/ui/alert.tsx +2 -2
- package/templates/default/components/ui/card.tsx +38 -71
- package/templates/default/components/ui/checkbox.tsx +2 -2
- package/templates/default/components/ui/dropdown-menu.tsx +126 -149
- package/templates/default/components/ui/input.tsx +15 -18
- package/templates/default/components/ui/label.tsx +9 -16
- package/templates/default/components/ui/scroll-area.tsx +3 -3
- package/templates/default/components/ui/sheet.tsx +5 -5
- package/templates/default/components/ui/switch.tsx +20 -20
- package/templates/default/components/ui/table.tsx +73 -110
- package/templates/default/components/ui/tabs.tsx +34 -34
- package/templates/default/components/ui/toast.tsx +4 -4
- package/templates/default/components/ui/tooltip.tsx +15 -15
- package/templates/default/lib/cli.mjs +1 -1
- package/templates/default/package.json +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-nextjs-cms",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.32",
|
|
4
4
|
"private": false,
|
|
5
5
|
"bin": {
|
|
6
6
|
"create-nextjs-cms": "./dist/index.js"
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"tsx": "^4.20.6",
|
|
27
27
|
"typescript": "^5.9.2",
|
|
28
28
|
"@lzcms/eslint-config": "0.3.0",
|
|
29
|
-
"@lzcms/
|
|
30
|
-
"@lzcms/
|
|
29
|
+
"@lzcms/prettier-config": "0.1.0",
|
|
30
|
+
"@lzcms/tsconfig": "0.1.0"
|
|
31
31
|
},
|
|
32
32
|
"prettier": "@lzcms/prettier-config",
|
|
33
33
|
"scripts": {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Inter } from 'next/font/google'
|
|
2
2
|
import '@/styles/globals.css'
|
|
3
3
|
import type { Metadata } from 'next'
|
|
4
|
-
import { cn } from '
|
|
4
|
+
import { cn } from '@/lib/utils'
|
|
5
5
|
import { ThemeProvider } from '@/components/ThemeProvider'
|
|
6
6
|
import Providers from '@/app/providers'
|
|
7
7
|
|
|
@@ -18,7 +18,7 @@ const inter = Inter({
|
|
|
18
18
|
export default async function RootLayout({ children }: { children: React.ReactNode }) {
|
|
19
19
|
return (
|
|
20
20
|
<html lang='en' suppressHydrationWarning>
|
|
21
|
-
<body className={cn('min-h-screen
|
|
21
|
+
<body className={cn('bg-background min-h-screen font-sans antialiased', inter.variable)}>
|
|
22
22
|
<ThemeProvider attribute='class' defaultTheme='dark' enableSystem disableTransitionOnChange>
|
|
23
23
|
<Providers>{children}</Providers>
|
|
24
24
|
</ThemeProvider>
|
|
@@ -4,7 +4,7 @@ import * as React from 'react'
|
|
|
4
4
|
import dayjs from 'dayjs'
|
|
5
5
|
import type { DateRange } from 'react-day-picker'
|
|
6
6
|
|
|
7
|
-
import { cn } from '
|
|
7
|
+
import { cn } from '@/lib/utils'
|
|
8
8
|
import { Button } from '@/components/ui/button'
|
|
9
9
|
import { Calendar } from '@/components/ui/calendar'
|
|
10
10
|
import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover'
|
|
@@ -1,56 +1,52 @@
|
|
|
1
|
-
|
|
1
|
+
'use client'
|
|
2
2
|
|
|
3
|
-
import * as React from
|
|
4
|
-
import * as AccordionPrimitive from
|
|
5
|
-
import { ChevronDownIcon } from
|
|
3
|
+
import * as React from 'react'
|
|
4
|
+
import * as AccordionPrimitive from '@radix-ui/react-accordion'
|
|
5
|
+
import { ChevronDownIcon } from '@radix-ui/react-icons'
|
|
6
6
|
|
|
7
|
-
import { cn } from
|
|
7
|
+
import { cn } from '@/lib/utils'
|
|
8
8
|
|
|
9
9
|
const Accordion = AccordionPrimitive.Root
|
|
10
10
|
|
|
11
11
|
const AccordionItem = React.forwardRef<
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
React.ElementRef<typeof AccordionPrimitive.Item>,
|
|
13
|
+
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>
|
|
14
14
|
>(({ className, ...props }, ref) => (
|
|
15
|
-
|
|
16
|
-
ref={ref}
|
|
17
|
-
className={cn("border-b", className)}
|
|
18
|
-
{...props}
|
|
19
|
-
/>
|
|
15
|
+
<AccordionPrimitive.Item ref={ref} className={cn('border-b', className)} {...props} />
|
|
20
16
|
))
|
|
21
|
-
AccordionItem.displayName =
|
|
17
|
+
AccordionItem.displayName = 'AccordionItem'
|
|
22
18
|
|
|
23
19
|
const AccordionTrigger = React.forwardRef<
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
React.ElementRef<typeof AccordionPrimitive.Trigger>,
|
|
21
|
+
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>
|
|
26
22
|
>(({ className, children, ...props }, ref) => (
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
23
|
+
<AccordionPrimitive.Header className='flex'>
|
|
24
|
+
<AccordionPrimitive.Trigger
|
|
25
|
+
ref={ref}
|
|
26
|
+
className={cn(
|
|
27
|
+
'flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180',
|
|
28
|
+
className,
|
|
29
|
+
)}
|
|
30
|
+
{...props}
|
|
31
|
+
>
|
|
32
|
+
{children}
|
|
33
|
+
<ChevronDownIcon className='text-muted-foreground h-4 w-4 shrink-0 transition-transform duration-200' />
|
|
34
|
+
</AccordionPrimitive.Trigger>
|
|
35
|
+
</AccordionPrimitive.Header>
|
|
40
36
|
))
|
|
41
37
|
AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName
|
|
42
38
|
|
|
43
39
|
const AccordionContent = React.forwardRef<
|
|
44
|
-
|
|
45
|
-
|
|
40
|
+
React.ElementRef<typeof AccordionPrimitive.Content>,
|
|
41
|
+
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>
|
|
46
42
|
>(({ className, children, ...props }, ref) => (
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
43
|
+
<AccordionPrimitive.Content
|
|
44
|
+
ref={ref}
|
|
45
|
+
className='data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm'
|
|
46
|
+
{...props}
|
|
47
|
+
>
|
|
48
|
+
<div className={cn('pt-0 pb-4', className)}>{children}</div>
|
|
49
|
+
</AccordionPrimitive.Content>
|
|
54
50
|
))
|
|
55
51
|
AccordionContent.displayName = AccordionPrimitive.Content.displayName
|
|
56
52
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react'
|
|
2
2
|
import { cva, type VariantProps } from 'class-variance-authority'
|
|
3
3
|
|
|
4
|
-
import { cn } from '
|
|
4
|
+
import { cn } from '@/lib/utils'
|
|
5
5
|
|
|
6
6
|
const alertVariants = cva(
|
|
7
7
|
'relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7',
|
|
@@ -31,7 +31,7 @@ Alert.displayName = 'Alert'
|
|
|
31
31
|
|
|
32
32
|
const AlertTitle = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLHeadingElement>>(
|
|
33
33
|
({ className, ...props }, ref) => (
|
|
34
|
-
<h5 ref={ref} className={cn('mb-1 font-medium
|
|
34
|
+
<h5 ref={ref} className={cn('mb-1 leading-none font-medium tracking-tight', className)} {...props} />
|
|
35
35
|
),
|
|
36
36
|
)
|
|
37
37
|
AlertTitle.displayName = 'AlertTitle'
|
|
@@ -1,76 +1,43 @@
|
|
|
1
|
-
import * as React from
|
|
1
|
+
import * as React from 'react'
|
|
2
2
|
|
|
3
|
-
import { cn } from '
|
|
3
|
+
import { cn } from '@/lib/utils'
|
|
4
4
|
|
|
5
|
-
const Card = React.forwardRef<
|
|
6
|
-
|
|
7
|
-
React.HTMLAttributes<HTMLDivElement>
|
|
8
|
-
>(({ className, ...props }, ref) => (
|
|
9
|
-
<div
|
|
10
|
-
ref={ref}
|
|
11
|
-
className={cn(
|
|
12
|
-
"rounded-xl border bg-card text-card-foreground shadow-sm",
|
|
13
|
-
className
|
|
14
|
-
)}
|
|
15
|
-
{...props}
|
|
16
|
-
/>
|
|
5
|
+
const Card = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(({ className, ...props }, ref) => (
|
|
6
|
+
<div ref={ref} className={cn('bg-card text-card-foreground rounded-xl border shadow-sm', className)} {...props} />
|
|
17
7
|
))
|
|
18
|
-
Card.displayName =
|
|
19
|
-
|
|
20
|
-
const CardHeader = React.forwardRef<
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
)
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
/>
|
|
53
|
-
))
|
|
54
|
-
CardDescription.displayName = "CardDescription"
|
|
55
|
-
|
|
56
|
-
const CardContent = React.forwardRef<
|
|
57
|
-
HTMLDivElement,
|
|
58
|
-
React.HTMLAttributes<HTMLDivElement>
|
|
59
|
-
>(({ className, ...props }, ref) => (
|
|
60
|
-
<div ref={ref} className={cn("p-6 pt-0", className)} {...props} />
|
|
61
|
-
))
|
|
62
|
-
CardContent.displayName = "CardContent"
|
|
63
|
-
|
|
64
|
-
const CardFooter = React.forwardRef<
|
|
65
|
-
HTMLDivElement,
|
|
66
|
-
React.HTMLAttributes<HTMLDivElement>
|
|
67
|
-
>(({ className, ...props }, ref) => (
|
|
68
|
-
<div
|
|
69
|
-
ref={ref}
|
|
70
|
-
className={cn("flex items-center p-6 pt-0", className)}
|
|
71
|
-
{...props}
|
|
72
|
-
/>
|
|
73
|
-
))
|
|
74
|
-
CardFooter.displayName = "CardFooter"
|
|
8
|
+
Card.displayName = 'Card'
|
|
9
|
+
|
|
10
|
+
const CardHeader = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
|
|
11
|
+
({ className, ...props }, ref) => (
|
|
12
|
+
<div ref={ref} className={cn('flex flex-col space-y-1.5 p-6', className)} {...props} />
|
|
13
|
+
),
|
|
14
|
+
)
|
|
15
|
+
CardHeader.displayName = 'CardHeader'
|
|
16
|
+
|
|
17
|
+
const CardTitle = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLHeadingElement>>(
|
|
18
|
+
({ className, ...props }, ref) => (
|
|
19
|
+
<h3 ref={ref} className={cn('leading-none font-semibold tracking-tight', className)} {...props} />
|
|
20
|
+
),
|
|
21
|
+
)
|
|
22
|
+
CardTitle.displayName = 'CardTitle'
|
|
23
|
+
|
|
24
|
+
const CardDescription = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLParagraphElement>>(
|
|
25
|
+
({ className, ...props }, ref) => (
|
|
26
|
+
<p ref={ref} className={cn('text-muted-foreground text-sm', className)} {...props} />
|
|
27
|
+
),
|
|
28
|
+
)
|
|
29
|
+
CardDescription.displayName = 'CardDescription'
|
|
30
|
+
|
|
31
|
+
const CardContent = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
|
|
32
|
+
({ className, ...props }, ref) => <div ref={ref} className={cn('p-6 pt-0', className)} {...props} />,
|
|
33
|
+
)
|
|
34
|
+
CardContent.displayName = 'CardContent'
|
|
35
|
+
|
|
36
|
+
const CardFooter = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
|
|
37
|
+
({ className, ...props }, ref) => (
|
|
38
|
+
<div ref={ref} className={cn('flex items-center p-6 pt-0', className)} {...props} />
|
|
39
|
+
),
|
|
40
|
+
)
|
|
41
|
+
CardFooter.displayName = 'CardFooter'
|
|
75
42
|
|
|
76
43
|
export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent }
|
|
@@ -4,7 +4,7 @@ import * as React from 'react'
|
|
|
4
4
|
import * as CheckboxPrimitive from '@radix-ui/react-checkbox'
|
|
5
5
|
import { CheckIcon, DividerHorizontalIcon } from '@radix-ui/react-icons'
|
|
6
6
|
|
|
7
|
-
import { cn } from '
|
|
7
|
+
import { cn } from '@/lib/utils'
|
|
8
8
|
|
|
9
9
|
const Checkbox = React.forwardRef<
|
|
10
10
|
React.ElementRef<typeof CheckboxPrimitive.Root>,
|
|
@@ -13,7 +13,7 @@ const Checkbox = React.forwardRef<
|
|
|
13
13
|
<CheckboxPrimitive.Root
|
|
14
14
|
ref={ref}
|
|
15
15
|
className={cn(
|
|
16
|
-
'peer h-4 w-4 shrink-0 rounded-sm border
|
|
16
|
+
'peer border-primary focus-visible:ring-ring data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground h-4 w-4 shrink-0 rounded-sm border shadow-sm focus-visible:ring-1 focus-visible:outline-hidden disabled:cursor-not-allowed disabled:opacity-50 data-[state="indeterminate"]:bg-gray-300 dark:data-[state="indeterminate"]:bg-gray-500',
|
|
17
17
|
className,
|
|
18
18
|
)}
|
|
19
19
|
{...props}
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
'use client'
|
|
2
2
|
|
|
3
|
-
import * as React from
|
|
4
|
-
import * as DropdownMenuPrimitive from
|
|
5
|
-
import {
|
|
6
|
-
CheckIcon,
|
|
7
|
-
ChevronRightIcon,
|
|
8
|
-
DotFilledIcon,
|
|
9
|
-
} from "@radix-ui/react-icons"
|
|
3
|
+
import * as React from 'react'
|
|
4
|
+
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu'
|
|
5
|
+
import { CheckIcon, ChevronRightIcon, DotFilledIcon } from '@radix-ui/react-icons'
|
|
10
6
|
|
|
11
|
-
import { cn } from '
|
|
7
|
+
import { cn } from '@/lib/utils'
|
|
12
8
|
|
|
13
9
|
const DropdownMenu = DropdownMenuPrimitive.Root
|
|
14
10
|
|
|
@@ -23,183 +19,164 @@ const DropdownMenuSub = DropdownMenuPrimitive.Sub
|
|
|
23
19
|
const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup
|
|
24
20
|
|
|
25
21
|
const DropdownMenuSubTrigger = React.forwardRef<
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
22
|
+
React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,
|
|
23
|
+
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {
|
|
24
|
+
inset?: boolean
|
|
25
|
+
}
|
|
30
26
|
>(({ className, inset, children, ...props }, ref) => (
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
27
|
+
<DropdownMenuPrimitive.SubTrigger
|
|
28
|
+
ref={ref}
|
|
29
|
+
className={cn(
|
|
30
|
+
'focus:bg-accent data-[state=open]:bg-accent flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none',
|
|
31
|
+
inset && 'pl-8',
|
|
32
|
+
className,
|
|
33
|
+
)}
|
|
34
|
+
{...props}
|
|
35
|
+
>
|
|
36
|
+
{children}
|
|
37
|
+
<ChevronRightIcon className='ml-auto h-4 w-4' />
|
|
38
|
+
</DropdownMenuPrimitive.SubTrigger>
|
|
43
39
|
))
|
|
44
|
-
DropdownMenuSubTrigger.displayName =
|
|
45
|
-
DropdownMenuPrimitive.SubTrigger.displayName
|
|
40
|
+
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName
|
|
46
41
|
|
|
47
42
|
const DropdownMenuSubContent = React.forwardRef<
|
|
48
|
-
|
|
49
|
-
|
|
43
|
+
React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,
|
|
44
|
+
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>
|
|
50
45
|
>(({ className, ...props }, ref) => (
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
46
|
+
<DropdownMenuPrimitive.SubContent
|
|
47
|
+
ref={ref}
|
|
48
|
+
className={cn(
|
|
49
|
+
'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-32 overflow-hidden rounded-md border p-1 shadow-lg',
|
|
50
|
+
className,
|
|
51
|
+
)}
|
|
52
|
+
{...props}
|
|
53
|
+
/>
|
|
59
54
|
))
|
|
60
|
-
DropdownMenuSubContent.displayName =
|
|
61
|
-
DropdownMenuPrimitive.SubContent.displayName
|
|
55
|
+
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName
|
|
62
56
|
|
|
63
57
|
const DropdownMenuContent = React.forwardRef<
|
|
64
|
-
|
|
65
|
-
|
|
58
|
+
React.ElementRef<typeof DropdownMenuPrimitive.Content>,
|
|
59
|
+
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>
|
|
66
60
|
>(({ className, sideOffset = 4, ...props }, ref) => (
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
61
|
+
<DropdownMenuPrimitive.Portal>
|
|
62
|
+
<DropdownMenuPrimitive.Content
|
|
63
|
+
ref={ref}
|
|
64
|
+
sideOffset={sideOffset}
|
|
65
|
+
className={cn(
|
|
66
|
+
'bg-popover text-popover-foreground z-50 min-w-32 overflow-hidden rounded-md border p-1 shadow-md',
|
|
67
|
+
'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',
|
|
68
|
+
className,
|
|
69
|
+
)}
|
|
70
|
+
{...props}
|
|
71
|
+
/>
|
|
72
|
+
</DropdownMenuPrimitive.Portal>
|
|
79
73
|
))
|
|
80
74
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName
|
|
81
75
|
|
|
82
76
|
const DropdownMenuItem = React.forwardRef<
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
77
|
+
React.ElementRef<typeof DropdownMenuPrimitive.Item>,
|
|
78
|
+
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {
|
|
79
|
+
inset?: boolean
|
|
80
|
+
}
|
|
87
81
|
>(({ className, inset, ...props }, ref) => (
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
82
|
+
<DropdownMenuPrimitive.Item
|
|
83
|
+
ref={ref}
|
|
84
|
+
className={cn(
|
|
85
|
+
'focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden transition-colors select-none data-disabled:pointer-events-none data-disabled:opacity-50',
|
|
86
|
+
inset && 'pl-8',
|
|
87
|
+
className,
|
|
88
|
+
)}
|
|
89
|
+
{...props}
|
|
90
|
+
/>
|
|
97
91
|
))
|
|
98
92
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName
|
|
99
93
|
|
|
100
94
|
const DropdownMenuCheckboxItem = React.forwardRef<
|
|
101
|
-
|
|
102
|
-
|
|
95
|
+
React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,
|
|
96
|
+
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>
|
|
103
97
|
>(({ className, children, checked, ...props }, ref) => (
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
98
|
+
<DropdownMenuPrimitive.CheckboxItem
|
|
99
|
+
ref={ref}
|
|
100
|
+
className={cn(
|
|
101
|
+
'focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden transition-colors select-none data-disabled:pointer-events-none data-disabled:opacity-50',
|
|
102
|
+
className,
|
|
103
|
+
)}
|
|
104
|
+
checked={checked}
|
|
105
|
+
{...props}
|
|
106
|
+
>
|
|
107
|
+
<span className='absolute left-2 flex h-3.5 w-3.5 items-center justify-center'>
|
|
108
|
+
<DropdownMenuPrimitive.ItemIndicator>
|
|
109
|
+
<CheckIcon className='h-4 w-4' />
|
|
110
|
+
</DropdownMenuPrimitive.ItemIndicator>
|
|
111
|
+
</span>
|
|
112
|
+
{children}
|
|
113
|
+
</DropdownMenuPrimitive.CheckboxItem>
|
|
120
114
|
))
|
|
121
|
-
DropdownMenuCheckboxItem.displayName =
|
|
122
|
-
DropdownMenuPrimitive.CheckboxItem.displayName
|
|
115
|
+
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName
|
|
123
116
|
|
|
124
117
|
const DropdownMenuRadioItem = React.forwardRef<
|
|
125
|
-
|
|
126
|
-
|
|
118
|
+
React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,
|
|
119
|
+
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>
|
|
127
120
|
>(({ className, children, ...props }, ref) => (
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
121
|
+
<DropdownMenuPrimitive.RadioItem
|
|
122
|
+
ref={ref}
|
|
123
|
+
className={cn(
|
|
124
|
+
'focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden transition-colors select-none data-disabled:pointer-events-none data-disabled:opacity-50',
|
|
125
|
+
className,
|
|
126
|
+
)}
|
|
127
|
+
{...props}
|
|
128
|
+
>
|
|
129
|
+
<span className='absolute left-2 flex h-3.5 w-3.5 items-center justify-center'>
|
|
130
|
+
<DropdownMenuPrimitive.ItemIndicator>
|
|
131
|
+
<DotFilledIcon className='h-4 w-4 fill-current' />
|
|
132
|
+
</DropdownMenuPrimitive.ItemIndicator>
|
|
133
|
+
</span>
|
|
134
|
+
{children}
|
|
135
|
+
</DropdownMenuPrimitive.RadioItem>
|
|
143
136
|
))
|
|
144
137
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName
|
|
145
138
|
|
|
146
139
|
const DropdownMenuLabel = React.forwardRef<
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
140
|
+
React.ElementRef<typeof DropdownMenuPrimitive.Label>,
|
|
141
|
+
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {
|
|
142
|
+
inset?: boolean
|
|
143
|
+
}
|
|
151
144
|
>(({ className, inset, ...props }, ref) => (
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
className
|
|
158
|
-
)}
|
|
159
|
-
{...props}
|
|
160
|
-
/>
|
|
145
|
+
<DropdownMenuPrimitive.Label
|
|
146
|
+
ref={ref}
|
|
147
|
+
className={cn('px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className)}
|
|
148
|
+
{...props}
|
|
149
|
+
/>
|
|
161
150
|
))
|
|
162
151
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName
|
|
163
152
|
|
|
164
153
|
const DropdownMenuSeparator = React.forwardRef<
|
|
165
|
-
|
|
166
|
-
|
|
154
|
+
React.ElementRef<typeof DropdownMenuPrimitive.Separator>,
|
|
155
|
+
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>
|
|
167
156
|
>(({ className, ...props }, ref) => (
|
|
168
|
-
|
|
169
|
-
ref={ref}
|
|
170
|
-
className={cn("-mx-1 my-1 h-px bg-muted", className)}
|
|
171
|
-
{...props}
|
|
172
|
-
/>
|
|
157
|
+
<DropdownMenuPrimitive.Separator ref={ref} className={cn('bg-muted -mx-1 my-1 h-px', className)} {...props} />
|
|
173
158
|
))
|
|
174
159
|
DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName
|
|
175
160
|
|
|
176
|
-
const DropdownMenuShortcut = ({
|
|
177
|
-
|
|
178
|
-
...props
|
|
179
|
-
}: React.HTMLAttributes<HTMLSpanElement>) => {
|
|
180
|
-
return (
|
|
181
|
-
<span
|
|
182
|
-
className={cn("ml-auto text-xs tracking-widest opacity-60", className)}
|
|
183
|
-
{...props}
|
|
184
|
-
/>
|
|
185
|
-
)
|
|
161
|
+
const DropdownMenuShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {
|
|
162
|
+
return <span className={cn('ml-auto text-xs tracking-widest opacity-60', className)} {...props} />
|
|
186
163
|
}
|
|
187
|
-
DropdownMenuShortcut.displayName =
|
|
164
|
+
DropdownMenuShortcut.displayName = 'DropdownMenuShortcut'
|
|
188
165
|
|
|
189
166
|
export {
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
167
|
+
DropdownMenu,
|
|
168
|
+
DropdownMenuTrigger,
|
|
169
|
+
DropdownMenuContent,
|
|
170
|
+
DropdownMenuItem,
|
|
171
|
+
DropdownMenuCheckboxItem,
|
|
172
|
+
DropdownMenuRadioItem,
|
|
173
|
+
DropdownMenuLabel,
|
|
174
|
+
DropdownMenuSeparator,
|
|
175
|
+
DropdownMenuShortcut,
|
|
176
|
+
DropdownMenuGroup,
|
|
177
|
+
DropdownMenuPortal,
|
|
178
|
+
DropdownMenuSub,
|
|
179
|
+
DropdownMenuSubContent,
|
|
180
|
+
DropdownMenuSubTrigger,
|
|
181
|
+
DropdownMenuRadioGroup,
|
|
205
182
|
}
|
|
@@ -1,25 +1,22 @@
|
|
|
1
|
-
import * as React from
|
|
1
|
+
import * as React from 'react'
|
|
2
2
|
|
|
3
|
-
import { cn } from '
|
|
3
|
+
import { cn } from '@/lib/utils'
|
|
4
4
|
|
|
5
|
-
export interface InputProps
|
|
6
|
-
extends React.InputHTMLAttributes<HTMLInputElement> {}
|
|
5
|
+
export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {}
|
|
7
6
|
|
|
8
|
-
const Input = React.forwardRef<HTMLInputElement, InputProps>(
|
|
9
|
-
({ className, type, ...props }, ref) => {
|
|
7
|
+
const Input = React.forwardRef<HTMLInputElement, InputProps>(({ className, type, ...props }, ref) => {
|
|
10
8
|
return (
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
9
|
+
<input
|
|
10
|
+
type={type}
|
|
11
|
+
className={cn(
|
|
12
|
+
'border-input placeholder:text-muted-foreground focus-visible:ring-ring flex h-9 w-full rounded-md border bg-transparent px-3 py-1 text-sm shadow-xs transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-1 focus-visible:outline-hidden disabled:cursor-not-allowed disabled:opacity-50',
|
|
13
|
+
className,
|
|
14
|
+
)}
|
|
15
|
+
ref={ref}
|
|
16
|
+
{...props}
|
|
17
|
+
/>
|
|
20
18
|
)
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
Input.displayName = "Input"
|
|
19
|
+
})
|
|
20
|
+
Input.displayName = 'Input'
|
|
24
21
|
|
|
25
22
|
export { Input }
|
|
@@ -1,25 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
'use client'
|
|
2
2
|
|
|
3
|
-
import * as React from
|
|
4
|
-
import * as LabelPrimitive from
|
|
5
|
-
import { cva, type VariantProps } from
|
|
3
|
+
import * as React from 'react'
|
|
4
|
+
import * as LabelPrimitive from '@radix-ui/react-label'
|
|
5
|
+
import { cva, type VariantProps } from 'class-variance-authority'
|
|
6
6
|
|
|
7
|
-
import { cn } from '
|
|
7
|
+
import { cn } from '@/lib/utils'
|
|
8
8
|
|
|
9
|
-
const labelVariants = cva(
|
|
10
|
-
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
11
|
-
)
|
|
9
|
+
const labelVariants = cva('text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70')
|
|
12
10
|
|
|
13
11
|
const Label = React.forwardRef<
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
VariantProps<typeof labelVariants>
|
|
12
|
+
React.ElementRef<typeof LabelPrimitive.Root>,
|
|
13
|
+
React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> & VariantProps<typeof labelVariants>
|
|
17
14
|
>(({ className, ...props }, ref) => (
|
|
18
|
-
|
|
19
|
-
ref={ref}
|
|
20
|
-
className={cn(labelVariants(), className)}
|
|
21
|
-
{...props}
|
|
22
|
-
/>
|
|
15
|
+
<LabelPrimitive.Root ref={ref} className={cn(labelVariants(), className)} {...props} />
|
|
23
16
|
))
|
|
24
17
|
Label.displayName = LabelPrimitive.Root.displayName
|
|
25
18
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import * as React from 'react'
|
|
4
4
|
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area'
|
|
5
5
|
|
|
6
|
-
import { cn } from '
|
|
6
|
+
import { cn } from '@/lib/utils'
|
|
7
7
|
|
|
8
8
|
const ScrollArea = React.forwardRef<
|
|
9
9
|
React.ElementRef<typeof ScrollAreaPrimitive.Root>,
|
|
@@ -27,14 +27,14 @@ const ScrollBar = React.forwardRef<
|
|
|
27
27
|
ref={ref}
|
|
28
28
|
orientation={orientation}
|
|
29
29
|
className={cn(
|
|
30
|
-
'flex touch-none select-none
|
|
30
|
+
'flex touch-none transition-colors select-none',
|
|
31
31
|
orientation === 'vertical' && 'h-full w-2.5 border-l border-l-transparent p-px',
|
|
32
32
|
orientation === 'horizontal' && 'h-2.5 flex-col border-t border-t-transparent p-px',
|
|
33
33
|
className,
|
|
34
34
|
)}
|
|
35
35
|
{...props}
|
|
36
36
|
>
|
|
37
|
-
<ScrollAreaPrimitive.ScrollAreaThumb className='
|
|
37
|
+
<ScrollAreaPrimitive.ScrollAreaThumb className='bg-border dark:bg-primary/40 relative flex-1 rounded-full' />
|
|
38
38
|
</ScrollAreaPrimitive.ScrollAreaScrollbar>
|
|
39
39
|
))
|
|
40
40
|
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName
|
|
@@ -5,7 +5,7 @@ import * as SheetPrimitive from '@radix-ui/react-dialog'
|
|
|
5
5
|
import { Cross2Icon } from '@radix-ui/react-icons'
|
|
6
6
|
import { cva, type VariantProps } from 'class-variance-authority'
|
|
7
7
|
|
|
8
|
-
import { cn } from '
|
|
8
|
+
import { cn } from '@/lib/utils'
|
|
9
9
|
|
|
10
10
|
const Sheet = SheetPrimitive.Root
|
|
11
11
|
|
|
@@ -21,7 +21,7 @@ const SheetOverlay = React.forwardRef<
|
|
|
21
21
|
>(({ className, ...props }, ref) => (
|
|
22
22
|
<SheetPrimitive.Overlay
|
|
23
23
|
className={cn(
|
|
24
|
-
'
|
|
24
|
+
'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80',
|
|
25
25
|
className,
|
|
26
26
|
)}
|
|
27
27
|
{...props}
|
|
@@ -57,7 +57,7 @@ const SheetContent = React.forwardRef<React.ElementRef<typeof SheetPrimitive.Con
|
|
|
57
57
|
<SheetOverlay />
|
|
58
58
|
<SheetPrimitive.Content ref={ref} className={cn(sheetVariants({ side }), className)} {...props}>
|
|
59
59
|
{children}
|
|
60
|
-
<SheetPrimitive.Close className='absolute
|
|
60
|
+
<SheetPrimitive.Close className='ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none'>
|
|
61
61
|
<Cross2Icon className='h-4 w-4' />
|
|
62
62
|
<span className='sr-only'>Close</span>
|
|
63
63
|
</SheetPrimitive.Close>
|
|
@@ -81,7 +81,7 @@ const SheetTitle = React.forwardRef<
|
|
|
81
81
|
React.ElementRef<typeof SheetPrimitive.Title>,
|
|
82
82
|
React.ComponentPropsWithoutRef<typeof SheetPrimitive.Title>
|
|
83
83
|
>(({ className, ...props }, ref) => (
|
|
84
|
-
<SheetPrimitive.Title ref={ref} className={cn('text-lg font-semibold
|
|
84
|
+
<SheetPrimitive.Title ref={ref} className={cn('text-foreground text-lg font-semibold', className)} {...props} />
|
|
85
85
|
))
|
|
86
86
|
SheetTitle.displayName = SheetPrimitive.Title.displayName
|
|
87
87
|
|
|
@@ -89,7 +89,7 @@ const SheetDescription = React.forwardRef<
|
|
|
89
89
|
React.ElementRef<typeof SheetPrimitive.Description>,
|
|
90
90
|
React.ComponentPropsWithoutRef<typeof SheetPrimitive.Description>
|
|
91
91
|
>(({ className, ...props }, ref) => (
|
|
92
|
-
<SheetPrimitive.Description ref={ref} className={cn('text-
|
|
92
|
+
<SheetPrimitive.Description ref={ref} className={cn('text-muted-foreground text-sm', className)} {...props} />
|
|
93
93
|
))
|
|
94
94
|
SheetDescription.displayName = SheetPrimitive.Description.displayName
|
|
95
95
|
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
|
|
1
|
+
'use client'
|
|
2
2
|
|
|
3
|
-
import * as React from
|
|
4
|
-
import * as SwitchPrimitives from
|
|
3
|
+
import * as React from 'react'
|
|
4
|
+
import * as SwitchPrimitives from '@radix-ui/react-switch'
|
|
5
5
|
|
|
6
|
-
import { cn } from '
|
|
6
|
+
import { cn } from '@/lib/utils'
|
|
7
7
|
|
|
8
8
|
const Switch = React.forwardRef<
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
React.ElementRef<typeof SwitchPrimitives.Root>,
|
|
10
|
+
React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root>
|
|
11
11
|
>(({ className, ...props }, ref) => (
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
12
|
+
<SwitchPrimitives.Root
|
|
13
|
+
className={cn(
|
|
14
|
+
'peer focus-visible:ring-ring focus-visible:ring-offset-background data-[state=checked]:bg-primary data-[state=unchecked]:bg-input inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-xs transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-hidden disabled:cursor-not-allowed disabled:opacity-50',
|
|
15
|
+
className,
|
|
16
|
+
)}
|
|
17
|
+
{...props}
|
|
18
|
+
ref={ref}
|
|
19
|
+
>
|
|
20
|
+
<SwitchPrimitives.Thumb
|
|
21
|
+
className={cn(
|
|
22
|
+
'bg-background pointer-events-none block h-4 w-4 rounded-full shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0',
|
|
23
|
+
)}
|
|
24
|
+
/>
|
|
25
|
+
</SwitchPrimitives.Root>
|
|
26
26
|
))
|
|
27
27
|
Switch.displayName = SwitchPrimitives.Root.displayName
|
|
28
28
|
|
|
@@ -1,120 +1,83 @@
|
|
|
1
|
-
import * as React from
|
|
1
|
+
import * as React from 'react'
|
|
2
2
|
|
|
3
|
-
import { cn } from '
|
|
3
|
+
import { cn } from '@/lib/utils'
|
|
4
4
|
|
|
5
|
-
const Table = React.forwardRef<
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
{...props}
|
|
14
|
-
/>
|
|
15
|
-
</div>
|
|
16
|
-
))
|
|
17
|
-
Table.displayName = "Table"
|
|
5
|
+
const Table = React.forwardRef<HTMLTableElement, React.HTMLAttributes<HTMLTableElement>>(
|
|
6
|
+
({ className, ...props }, ref) => (
|
|
7
|
+
<div className='relative w-full overflow-auto'>
|
|
8
|
+
<table ref={ref} className={cn('w-full caption-bottom text-sm', className)} {...props} />
|
|
9
|
+
</div>
|
|
10
|
+
),
|
|
11
|
+
)
|
|
12
|
+
Table.displayName = 'Table'
|
|
18
13
|
|
|
19
|
-
const TableHeader = React.forwardRef<
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
<thead ref={ref} className={cn("[&_tr]:border-b", className)} {...props} />
|
|
24
|
-
))
|
|
25
|
-
TableHeader.displayName = "TableHeader"
|
|
14
|
+
const TableHeader = React.forwardRef<HTMLTableSectionElement, React.HTMLAttributes<HTMLTableSectionElement>>(
|
|
15
|
+
({ className, ...props }, ref) => <thead ref={ref} className={cn('[&_tr]:border-b', className)} {...props} />,
|
|
16
|
+
)
|
|
17
|
+
TableHeader.displayName = 'TableHeader'
|
|
26
18
|
|
|
27
|
-
const TableBody = React.forwardRef<
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
className={cn("[&_tr:last-child]:border-0", className)}
|
|
34
|
-
{...props}
|
|
35
|
-
/>
|
|
36
|
-
))
|
|
37
|
-
TableBody.displayName = "TableBody"
|
|
19
|
+
const TableBody = React.forwardRef<HTMLTableSectionElement, React.HTMLAttributes<HTMLTableSectionElement>>(
|
|
20
|
+
({ className, ...props }, ref) => (
|
|
21
|
+
<tbody ref={ref} className={cn('[&_tr:last-child]:border-0', className)} {...props} />
|
|
22
|
+
),
|
|
23
|
+
)
|
|
24
|
+
TableBody.displayName = 'TableBody'
|
|
38
25
|
|
|
39
|
-
const TableFooter = React.forwardRef<
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
{...props}
|
|
50
|
-
/>
|
|
51
|
-
))
|
|
52
|
-
TableFooter.displayName = "TableFooter"
|
|
26
|
+
const TableFooter = React.forwardRef<HTMLTableSectionElement, React.HTMLAttributes<HTMLTableSectionElement>>(
|
|
27
|
+
({ className, ...props }, ref) => (
|
|
28
|
+
<tfoot
|
|
29
|
+
ref={ref}
|
|
30
|
+
className={cn('bg-muted/50 border-t font-medium last:[&>tr]:border-b-0', className)}
|
|
31
|
+
{...props}
|
|
32
|
+
/>
|
|
33
|
+
),
|
|
34
|
+
)
|
|
35
|
+
TableFooter.displayName = 'TableFooter'
|
|
53
36
|
|
|
54
|
-
const TableRow = React.forwardRef<
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
{...props}
|
|
65
|
-
/>
|
|
66
|
-
))
|
|
67
|
-
TableRow.displayName = "TableRow"
|
|
37
|
+
const TableRow = React.forwardRef<HTMLTableRowElement, React.HTMLAttributes<HTMLTableRowElement>>(
|
|
38
|
+
({ className, ...props }, ref) => (
|
|
39
|
+
<tr
|
|
40
|
+
ref={ref}
|
|
41
|
+
className={cn('hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors', className)}
|
|
42
|
+
{...props}
|
|
43
|
+
/>
|
|
44
|
+
),
|
|
45
|
+
)
|
|
46
|
+
TableRow.displayName = 'TableRow'
|
|
68
47
|
|
|
69
|
-
const TableHead = React.forwardRef<
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
TableHead.displayName = "TableHead"
|
|
48
|
+
const TableHead = React.forwardRef<HTMLTableCellElement, React.ThHTMLAttributes<HTMLTableCellElement>>(
|
|
49
|
+
({ className, ...props }, ref) => (
|
|
50
|
+
<th
|
|
51
|
+
ref={ref}
|
|
52
|
+
className={cn(
|
|
53
|
+
'text-muted-foreground h-10 px-2 text-left align-middle font-medium [&:has([role=checkbox])]:pr-0 *:[[role=checkbox]]:translate-y-[2px]',
|
|
54
|
+
className,
|
|
55
|
+
)}
|
|
56
|
+
{...props}
|
|
57
|
+
/>
|
|
58
|
+
),
|
|
59
|
+
)
|
|
60
|
+
TableHead.displayName = 'TableHead'
|
|
83
61
|
|
|
84
|
-
const TableCell = React.forwardRef<
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
TableCell.displayName = "TableCell"
|
|
62
|
+
const TableCell = React.forwardRef<HTMLTableCellElement, React.TdHTMLAttributes<HTMLTableCellElement>>(
|
|
63
|
+
({ className, ...props }, ref) => (
|
|
64
|
+
<td
|
|
65
|
+
ref={ref}
|
|
66
|
+
className={cn(
|
|
67
|
+
'p-2 align-middle [&:has([role=checkbox])]:pr-0 *:[[role=checkbox]]:translate-y-[2px]',
|
|
68
|
+
className,
|
|
69
|
+
)}
|
|
70
|
+
{...props}
|
|
71
|
+
/>
|
|
72
|
+
),
|
|
73
|
+
)
|
|
74
|
+
TableCell.displayName = 'TableCell'
|
|
98
75
|
|
|
99
|
-
const TableCaption = React.forwardRef<
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
className={cn("mt-4 text-sm text-muted-foreground", className)}
|
|
106
|
-
{...props}
|
|
107
|
-
/>
|
|
108
|
-
))
|
|
109
|
-
TableCaption.displayName = "TableCaption"
|
|
76
|
+
const TableCaption = React.forwardRef<HTMLTableCaptionElement, React.HTMLAttributes<HTMLTableCaptionElement>>(
|
|
77
|
+
({ className, ...props }, ref) => (
|
|
78
|
+
<caption ref={ref} className={cn('text-muted-foreground mt-4 text-sm', className)} {...props} />
|
|
79
|
+
),
|
|
80
|
+
)
|
|
81
|
+
TableCaption.displayName = 'TableCaption'
|
|
110
82
|
|
|
111
|
-
export {
|
|
112
|
-
Table,
|
|
113
|
-
TableHeader,
|
|
114
|
-
TableBody,
|
|
115
|
-
TableFooter,
|
|
116
|
-
TableHead,
|
|
117
|
-
TableRow,
|
|
118
|
-
TableCell,
|
|
119
|
-
TableCaption,
|
|
120
|
-
}
|
|
83
|
+
export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption }
|
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
|
|
1
|
+
'use client'
|
|
2
2
|
|
|
3
|
-
import * as React from
|
|
4
|
-
import * as TabsPrimitive from
|
|
3
|
+
import * as React from 'react'
|
|
4
|
+
import * as TabsPrimitive from '@radix-ui/react-tabs'
|
|
5
5
|
|
|
6
|
-
import { cn } from '
|
|
6
|
+
import { cn } from '@/lib/utils'
|
|
7
7
|
|
|
8
8
|
const Tabs = TabsPrimitive.Root
|
|
9
9
|
|
|
10
10
|
const TabsList = React.forwardRef<
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
React.ElementRef<typeof TabsPrimitive.List>,
|
|
12
|
+
React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>
|
|
13
13
|
>(({ className, ...props }, ref) => (
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
14
|
+
<TabsPrimitive.List
|
|
15
|
+
ref={ref}
|
|
16
|
+
className={cn(
|
|
17
|
+
'bg-muted text-muted-foreground inline-flex h-9 items-center justify-center rounded-lg p-1',
|
|
18
|
+
className,
|
|
19
|
+
)}
|
|
20
|
+
{...props}
|
|
21
|
+
/>
|
|
22
22
|
))
|
|
23
23
|
TabsList.displayName = TabsPrimitive.List.displayName
|
|
24
24
|
|
|
25
25
|
const TabsTrigger = React.forwardRef<
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
React.ElementRef<typeof TabsPrimitive.Trigger>,
|
|
27
|
+
React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>
|
|
28
28
|
>(({ className, ...props }, ref) => (
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
29
|
+
<TabsPrimitive.Trigger
|
|
30
|
+
ref={ref}
|
|
31
|
+
className={cn(
|
|
32
|
+
'ring-offset-background focus-visible:ring-ring data-[state=active]:bg-background data-[state=active]:text-foreground inline-flex items-center justify-center rounded-md px-3 py-1 text-sm font-medium whitespace-nowrap transition-all focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm',
|
|
33
|
+
className,
|
|
34
|
+
)}
|
|
35
|
+
{...props}
|
|
36
|
+
/>
|
|
37
37
|
))
|
|
38
38
|
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName
|
|
39
39
|
|
|
40
40
|
const TabsContent = React.forwardRef<
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
React.ElementRef<typeof TabsPrimitive.Content>,
|
|
42
|
+
React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>
|
|
43
43
|
>(({ className, ...props }, ref) => (
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
44
|
+
<TabsPrimitive.Content
|
|
45
|
+
ref={ref}
|
|
46
|
+
className={cn(
|
|
47
|
+
'ring-offset-background focus-visible:ring-ring mt-2 focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-hidden',
|
|
48
|
+
className,
|
|
49
|
+
)}
|
|
50
|
+
{...props}
|
|
51
|
+
/>
|
|
52
52
|
))
|
|
53
53
|
TabsContent.displayName = TabsPrimitive.Content.displayName
|
|
54
54
|
|
|
@@ -3,7 +3,7 @@ import { Cross2Icon } from '@radix-ui/react-icons'
|
|
|
3
3
|
import * as ToastPrimitives from '@radix-ui/react-toast'
|
|
4
4
|
import { cva, type VariantProps } from 'class-variance-authority'
|
|
5
5
|
|
|
6
|
-
import { cn } from '
|
|
6
|
+
import { cn } from '@/lib/utils'
|
|
7
7
|
|
|
8
8
|
const ToastProvider = ToastPrimitives.Provider
|
|
9
9
|
|
|
@@ -14,7 +14,7 @@ const ToastViewport = React.forwardRef<
|
|
|
14
14
|
<ToastPrimitives.Viewport
|
|
15
15
|
ref={ref}
|
|
16
16
|
className={cn(
|
|
17
|
-
'fixed top-0 z-100 flex max-h-screen w-full flex-col-reverse p-4 sm:
|
|
17
|
+
'fixed top-0 z-100 flex max-h-screen w-full flex-col-reverse p-4 sm:top-auto sm:right-0 sm:bottom-0 sm:flex-col md:max-w-[420px]',
|
|
18
18
|
className,
|
|
19
19
|
)}
|
|
20
20
|
{...props}
|
|
@@ -54,7 +54,7 @@ const ToastAction = React.forwardRef<
|
|
|
54
54
|
<ToastPrimitives.Action
|
|
55
55
|
ref={ref}
|
|
56
56
|
className={cn(
|
|
57
|
-
'
|
|
57
|
+
'hover:bg-secondary focus:ring-ring group-[.destructive]:border-muted/40 hover:group-[.destructive]:border-destructive/30 hover:group-[.destructive]:bg-destructive hover:group-[.destructive]:text-destructive-foreground focus:group-[.destructive]:ring-destructive inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors focus:ring-1 focus:outline-hidden disabled:pointer-events-none disabled:opacity-50',
|
|
58
58
|
className,
|
|
59
59
|
)}
|
|
60
60
|
{...props}
|
|
@@ -69,7 +69,7 @@ const ToastClose = React.forwardRef<
|
|
|
69
69
|
<ToastPrimitives.Close
|
|
70
70
|
ref={ref}
|
|
71
71
|
className={cn(
|
|
72
|
-
'absolute
|
|
72
|
+
'text-foreground/50 hover:text-foreground absolute top-1 right-1 rounded-md p-1 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:group-[.destructive]:text-red-50 focus:opacity-100 focus:ring-1 focus:outline-hidden focus:group-[.destructive]:ring-red-400 focus:group-[.destructive]:ring-offset-red-600',
|
|
73
73
|
className,
|
|
74
74
|
)}
|
|
75
75
|
toast-close=''
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
'use client'
|
|
2
2
|
|
|
3
|
-
import * as React from
|
|
4
|
-
import * as TooltipPrimitive from
|
|
3
|
+
import * as React from 'react'
|
|
4
|
+
import * as TooltipPrimitive from '@radix-ui/react-tooltip'
|
|
5
5
|
|
|
6
|
-
import { cn } from '
|
|
6
|
+
import { cn } from '@/lib/utils'
|
|
7
7
|
|
|
8
8
|
const TooltipProvider = TooltipPrimitive.Provider
|
|
9
9
|
|
|
@@ -12,18 +12,18 @@ const Tooltip = TooltipPrimitive.Root
|
|
|
12
12
|
const TooltipTrigger = TooltipPrimitive.Trigger
|
|
13
13
|
|
|
14
14
|
const TooltipContent = React.forwardRef<
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
React.ElementRef<typeof TooltipPrimitive.Content>,
|
|
16
|
+
React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>
|
|
17
17
|
>(({ className, sideOffset = 4, ...props }, ref) => (
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
18
|
+
<TooltipPrimitive.Content
|
|
19
|
+
ref={ref}
|
|
20
|
+
sideOffset={sideOffset}
|
|
21
|
+
className={cn(
|
|
22
|
+
'bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 overflow-hidden rounded-md px-3 py-1.5 text-xs',
|
|
23
|
+
className,
|
|
24
|
+
)}
|
|
25
|
+
{...props}
|
|
26
|
+
/>
|
|
27
27
|
))
|
|
28
28
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName
|
|
29
29
|
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"nanoid": "^5.1.2",
|
|
71
71
|
"next": "^15.5.5",
|
|
72
72
|
"next-themes": "^0.4.6",
|
|
73
|
-
"nextjs-cms": "0.5.
|
|
73
|
+
"nextjs-cms": "0.5.32",
|
|
74
74
|
"plaiceholder": "^3.0.0",
|
|
75
75
|
"prettier-plugin-tailwindcss": "^0.7.2",
|
|
76
76
|
"qrcode": "^1.5.4",
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"eslint-config-prettier": "^10.0.1",
|
|
104
104
|
"eslint-plugin-prettier": "^5.2.3",
|
|
105
105
|
"fs-extra": "^11.3.3",
|
|
106
|
-
"nextjs-cms-kit": "0.5.
|
|
106
|
+
"nextjs-cms-kit": "0.5.32",
|
|
107
107
|
"postcss": "^8.5.1",
|
|
108
108
|
"prettier": "3.5.0",
|
|
109
109
|
"tailwindcss": "^4.1.18",
|