create-nextjs-cms 0.9.15 → 0.9.17
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/components/ItemEditPage.tsx +25 -25
- package/templates/default/components/LocaleSwitcher.tsx +32 -23
- package/templates/default/components/SectionPage.tsx +1 -0
- package/templates/default/components/form/helpers/_section-hot-reload.js +1 -1
- package/templates/default/components/ui/alert-dialog.tsx +84 -128
- package/templates/default/components/ui/alert.tsx +1 -1
- package/templates/default/components/ui/button.tsx +64 -62
- package/templates/default/components/ui/calendar.tsx +220 -166
- package/templates/default/components/ui/checkbox.tsx +29 -29
- package/templates/default/components/ui/command.tsx +1 -1
- package/templates/default/components/ui/custom-alert-dialog.tsx +2 -2
- package/templates/default/components/ui/custom-dialog.tsx +3 -3
- package/templates/default/components/ui/dialog.tsx +3 -3
- package/templates/default/components/ui/dropdown-menu.tsx +9 -9
- package/templates/default/components/ui/input-group.tsx +1 -1
- package/templates/default/components/ui/scroll-area.tsx +1 -1
- package/templates/default/components/ui/select.tsx +3 -3
- package/templates/default/components/ui/sheet.tsx +3 -3
- package/templates/default/components/ui/switch.tsx +1 -1
- package/templates/default/components/ui/table.tsx +2 -2
- package/templates/default/components/ui/toast.tsx +3 -3
- package/templates/default/components/ui/use-toast.ts +0 -1
- package/templates/default/components.json +25 -21
- package/templates/default/dynamic-schemas/schema.ts +1 -1
- package/templates/default/package.json +3 -2
|
@@ -58,7 +58,7 @@ function SelectContent({
|
|
|
58
58
|
className={cn(
|
|
59
59
|
'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 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md',
|
|
60
60
|
position === 'popper' &&
|
|
61
|
-
'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1',
|
|
61
|
+
'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1 rtl:data-[side=left]:translate-x-1 rtl:data-[side=right]:-translate-x-1',
|
|
62
62
|
className,
|
|
63
63
|
)}
|
|
64
64
|
position={position}
|
|
@@ -96,14 +96,14 @@ function SelectItem({ className, children, ...props }: React.ComponentProps<type
|
|
|
96
96
|
<SelectPrimitive.Item
|
|
97
97
|
data-slot='select-item'
|
|
98
98
|
className={cn(
|
|
99
|
-
"focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5
|
|
99
|
+
"focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 ps-2 pe-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
|
|
100
100
|
className,
|
|
101
101
|
)}
|
|
102
102
|
{...props}
|
|
103
103
|
>
|
|
104
104
|
<span
|
|
105
105
|
data-slot='select-item-indicator'
|
|
106
|
-
className='absolute
|
|
106
|
+
className='absolute end-2 flex size-3.5 items-center justify-center'
|
|
107
107
|
>
|
|
108
108
|
<SelectPrimitive.ItemIndicator>
|
|
109
109
|
<CheckIcon className='size-4' />
|
|
@@ -51,9 +51,9 @@ function SheetContent({
|
|
|
51
51
|
className={cn(
|
|
52
52
|
'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500',
|
|
53
53
|
side === 'right' &&
|
|
54
|
-
'data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0
|
|
54
|
+
'data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 end-0 h-full w-3/4 border-s sm:max-w-sm',
|
|
55
55
|
side === 'left' &&
|
|
56
|
-
'data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0
|
|
56
|
+
'data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 start-0 h-full w-3/4 border-e sm:max-w-sm',
|
|
57
57
|
side === 'top' &&
|
|
58
58
|
'data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b',
|
|
59
59
|
side === 'bottom' &&
|
|
@@ -63,7 +63,7 @@ function SheetContent({
|
|
|
63
63
|
{...props}
|
|
64
64
|
>
|
|
65
65
|
{children}
|
|
66
|
-
<SheetPrimitive.Close className='ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute
|
|
66
|
+
<SheetPrimitive.Close className='ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute end-4 top-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none'>
|
|
67
67
|
<XIcon className='size-4' />
|
|
68
68
|
<span className='sr-only'>Close</span>
|
|
69
69
|
</SheetPrimitive.Close>
|
|
@@ -19,7 +19,7 @@ const Switch = React.forwardRef<
|
|
|
19
19
|
>
|
|
20
20
|
<SwitchPrimitives.Thumb
|
|
21
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',
|
|
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 rtl:data-[state=checked]:-translate-x-4 rtl:data-[state=unchecked]:-translate-x-0',
|
|
23
23
|
)}
|
|
24
24
|
/>
|
|
25
25
|
</SwitchPrimitives.Root>
|
|
@@ -50,7 +50,7 @@ const TableHead = React.forwardRef<HTMLTableCellElement, React.ThHTMLAttributes<
|
|
|
50
50
|
<th
|
|
51
51
|
ref={ref}
|
|
52
52
|
className={cn(
|
|
53
|
-
'text-muted-foreground h-10 px-2 text-
|
|
53
|
+
'text-muted-foreground h-10 px-2 text-start align-middle font-medium [&:has([role=checkbox])]:pe-0 *:[[role=checkbox]]:translate-y-[2px]',
|
|
54
54
|
className,
|
|
55
55
|
)}
|
|
56
56
|
{...props}
|
|
@@ -64,7 +64,7 @@ const TableCell = React.forwardRef<HTMLTableCellElement, React.TdHTMLAttributes<
|
|
|
64
64
|
<td
|
|
65
65
|
ref={ref}
|
|
66
66
|
className={cn(
|
|
67
|
-
'p-2 align-middle [&:has([role=checkbox])]:
|
|
67
|
+
'p-2 align-middle [&:has([role=checkbox])]:pe-0 *:[[role=checkbox]]:translate-y-[2px]',
|
|
68
68
|
className,
|
|
69
69
|
)}
|
|
70
70
|
{...props}
|
|
@@ -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:end-0 sm:top-auto sm:bottom-0 sm:flex-col md:max-w-[420px]',
|
|
18
18
|
className,
|
|
19
19
|
)}
|
|
20
20
|
{...props}
|
|
@@ -23,7 +23,7 @@ const ToastViewport = React.forwardRef<
|
|
|
23
23
|
ToastViewport.displayName = ToastPrimitives.Viewport.displayName
|
|
24
24
|
|
|
25
25
|
const toastVariants = cva(
|
|
26
|
-
'group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4
|
|
26
|
+
'group pointer-events-auto relative flex w-full items-center justify-between space-x-2 rtl:space-x-reverse overflow-hidden rounded-md border p-4 pe-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 rtl:data-[swipe=cancel]:-translate-x-0 data-[swipe=end]:translate-x-(--radix-toast-swipe-end-x) rtl:data-[swipe=end]:-translate-x-(--radix-toast-swipe-end-x) data-[swipe=move]:translate-x-(--radix-toast-swipe-move-x) rtl:data-[swipe=move]:-translate-x-(--radix-toast-swipe-move-x) data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full sm:data-[state=open]:slide-in-from-bottom-full',
|
|
27
27
|
{
|
|
28
28
|
variants: {
|
|
29
29
|
variant: {
|
|
@@ -69,7 +69,7 @@ const ToastClose = React.forwardRef<
|
|
|
69
69
|
<ToastPrimitives.Close
|
|
70
70
|
ref={ref}
|
|
71
71
|
className={cn(
|
|
72
|
-
'text-foreground/50 hover:text-foreground absolute
|
|
72
|
+
'text-foreground/50 hover:text-foreground absolute end-1 top-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,21 +1,25 @@
|
|
|
1
|
-
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema.json",
|
|
3
|
+
"style": "new-york",
|
|
4
|
+
"rsc": true,
|
|
5
|
+
"tsx": true,
|
|
6
|
+
"rtl": true,
|
|
7
|
+
"tailwind": {
|
|
8
|
+
"config": "",
|
|
9
|
+
"prefix": "",
|
|
10
|
+
"css": "styles/globals.css",
|
|
11
|
+
"baseColor": "slate",
|
|
12
|
+
"cssVariables": true
|
|
13
|
+
},
|
|
14
|
+
"aliases": {
|
|
15
|
+
"components": "@/components",
|
|
16
|
+
"utils": "@/lib/utils",
|
|
17
|
+
"ui": "@/components/ui",
|
|
18
|
+
"lib": "@/lib",
|
|
19
|
+
"hooks": "@/hooks"
|
|
20
|
+
},
|
|
21
|
+
"menuColor": "default",
|
|
22
|
+
"menuAccent": "subtle",
|
|
23
|
+
"iconLibrary": "lucide",
|
|
24
|
+
"registries": {}
|
|
25
|
+
}
|
|
@@ -47,7 +47,7 @@ export const TestSectionTable = mysqlTable('test_section', {
|
|
|
47
47
|
export const TestTagsTable = mysqlTable('test_tags', {
|
|
48
48
|
testId: varchar('test_id', { length: 255 }).notNull(),
|
|
49
49
|
tagName: varchar('tag_name', { length: 255 }).notNull(),
|
|
50
|
-
locale: varchar('locale', { length: 255 })
|
|
50
|
+
locale: varchar('locale', { length: 255 }).notNull()
|
|
51
51
|
}, (table) => [
|
|
52
52
|
primaryKey({ columns: [table.testId, table.tagName, table.locale] })
|
|
53
53
|
]);
|
|
@@ -57,6 +57,7 @@
|
|
|
57
57
|
"classnames": "^2.5.1",
|
|
58
58
|
"clsx": "^2.1.1",
|
|
59
59
|
"cmdk": "^1.1.1",
|
|
60
|
+
"date-fns": "^4.1.0",
|
|
60
61
|
"dayjs": "^1.11.19",
|
|
61
62
|
"dompurify": "^3.3.3",
|
|
62
63
|
"dotenv": "^17.2.3",
|
|
@@ -69,13 +70,13 @@
|
|
|
69
70
|
"nanoid": "^5.1.2",
|
|
70
71
|
"next": "16.1.1",
|
|
71
72
|
"next-themes": "^0.4.6",
|
|
72
|
-
"nextjs-cms": "0.9.
|
|
73
|
+
"nextjs-cms": "0.9.17",
|
|
73
74
|
"plaiceholder": "^3.0.0",
|
|
74
75
|
"prettier-plugin-tailwindcss": "^0.7.2",
|
|
75
76
|
"qrcode": "^1.5.4",
|
|
76
77
|
"radix-ui": "^1.4.3",
|
|
77
78
|
"react": "19.2.3",
|
|
78
|
-
"react-day-picker": "9.
|
|
79
|
+
"react-day-picker": "9.14.0",
|
|
79
80
|
"react-dom": "19.2.3",
|
|
80
81
|
"react-dropzone": "^14.3.5",
|
|
81
82
|
"react-hook-form": "^7.66.1",
|