create-nextjs-cms 0.5.70 → 0.5.71

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 (47) hide show
  1. package/package.json +3 -3
  2. package/templates/default/app/(rootLayout)/(plugins)/[...slug]/plugin-server-registry.ts +3 -2
  3. package/templates/default/app/(rootLayout)/browse/[section]/[page]/page.tsx +1 -0
  4. package/templates/default/app/(rootLayout)/layout.tsx +3 -1
  5. package/templates/default/app/layout.tsx +12 -6
  6. package/templates/default/cms.config.ts +1 -2
  7. package/templates/default/components/AdminsPage.tsx +6 -7
  8. package/templates/default/components/BarChartBox.tsx +1 -2
  9. package/templates/default/components/BrowsePage.tsx +10 -24
  10. package/templates/default/components/CategorizedSectionPage.tsx +5 -10
  11. package/templates/default/components/EmailsPage.tsx +1 -1
  12. package/templates/default/components/ErrorComponent.tsx +17 -0
  13. package/templates/default/components/GalleryPhoto.tsx +1 -2
  14. package/templates/default/components/InfoCard.tsx +0 -1
  15. package/templates/default/components/ItemEditPage.tsx +26 -30
  16. package/templates/default/components/Layout.tsx +3 -2
  17. package/templates/default/components/LogPage.tsx +0 -1
  18. package/templates/default/components/Modal.tsx +64 -7
  19. package/templates/default/components/Navbar.tsx +170 -17
  20. package/templates/default/components/NewPage.tsx +9 -11
  21. package/templates/default/components/PhotoGallery.tsx +0 -1
  22. package/templates/default/components/SectionItemCard.tsx +1 -1
  23. package/templates/default/components/SectionPage.tsx +8 -8
  24. package/templates/default/components/SelectBox.tsx +62 -77
  25. package/templates/default/components/SettingsPage.tsx +2 -9
  26. package/templates/default/components/Sidebar.tsx +5 -22
  27. package/templates/default/components/SidebarDropdownItem.tsx +2 -2
  28. package/templates/default/components/form/helpers/_section-hot-reload.js +1 -1
  29. package/templates/default/components/ui/alert-dialog.tsx +157 -0
  30. package/templates/default/components/ui/command.tsx +137 -184
  31. package/templates/default/components/ui/custom-alert-dialog.tsx +113 -0
  32. package/templates/default/components/ui/custom-dialog.tsx +123 -0
  33. package/templates/default/components/ui/dialog.tsx +123 -143
  34. package/templates/default/components/ui/popover.tsx +28 -34
  35. package/templates/default/components/ui/sheet.tsx +103 -107
  36. package/templates/default/package.json +4 -10
  37. package/templates/default/public/favicon.ico +0 -0
  38. package/templates/default/public/nextjscms.webp +0 -0
  39. package/templates/default/styles/globals.css +2 -1
  40. package/templates/default/app/(rootLayout)/(plugins)/[...slug]/.plugin-registry.mjs +0 -7
  41. package/templates/default/app/(rootLayout)/advanced/page.tsx +0 -11
  42. package/templates/default/components/AdvancedSettingsPage.tsx +0 -167
  43. package/templates/default/components/NavbarAlt.tsx +0 -182
  44. package/templates/default/components/TempPage.tsx +0 -12
  45. package/templates/default/public/lazemni_logo.png +0 -0
  46. package/templates/default/public/next.svg +0 -1
  47. package/templates/default/public/vercel.svg +0 -1
@@ -0,0 +1,123 @@
1
+ 'use client'
2
+
3
+ import * as React from 'react'
4
+ import * as DialogPrimitive from '@radix-ui/react-dialog'
5
+ import { XIcon } from 'lucide-react'
6
+
7
+ import { cn } from '@/lib/utils'
8
+
9
+ function Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>) {
10
+ return <DialogPrimitive.Root data-slot='dialog' {...props} />
11
+ }
12
+
13
+ function DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>) {
14
+ return <DialogPrimitive.Trigger data-slot='dialog-trigger' {...props} />
15
+ }
16
+
17
+ function DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>) {
18
+ return <DialogPrimitive.Portal data-slot='dialog-portal' {...props} />
19
+ }
20
+
21
+ function DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>) {
22
+ return <DialogPrimitive.Close data-slot='dialog-close' {...props} />
23
+ }
24
+
25
+ function DialogOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>) {
26
+ return (
27
+ <DialogPrimitive.Overlay
28
+ data-slot='dialog-overlay'
29
+ className={cn(
30
+ '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/50',
31
+ className,
32
+ )}
33
+ {...props}
34
+ />
35
+ )
36
+ }
37
+
38
+ function DialogContent({
39
+ className,
40
+ children,
41
+ showCloseButton = true,
42
+ ...props
43
+ }: React.ComponentProps<typeof DialogPrimitive.Content> & {
44
+ showCloseButton?: boolean
45
+ }) {
46
+ return (
47
+ <DialogPortal data-slot='dialog-portal'>
48
+ <DialogOverlay className='bg-gray-500/50 backdrop-blur-md transition-opacity' />
49
+ <DialogPrimitive.Content
50
+ data-slot='dialog-content'
51
+ className={cn(
52
+ 'bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] border p-6 shadow-lg duration-200 outline-none',
53
+ className,
54
+ )}
55
+ {...props}
56
+ >
57
+ {children}
58
+ {showCloseButton && (
59
+ <DialogPrimitive.Close
60
+ data-slot='dialog-close'
61
+ className="ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"
62
+ >
63
+ <XIcon />
64
+ <span className='sr-only'>Close</span>
65
+ </DialogPrimitive.Close>
66
+ )}
67
+ </DialogPrimitive.Content>
68
+ </DialogPortal>
69
+ )
70
+ }
71
+
72
+ function DialogHeader({ className, ...props }: React.ComponentProps<'div'>) {
73
+ return (
74
+ <div
75
+ data-slot='dialog-header'
76
+ className={cn('flex flex-col gap-2 text-center sm:text-left', className)}
77
+ {...props}
78
+ />
79
+ )
80
+ }
81
+
82
+ function DialogFooter({ className, ...props }: React.ComponentProps<'div'>) {
83
+ return (
84
+ <div
85
+ data-slot='dialog-footer'
86
+ className={cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', className)}
87
+ {...props}
88
+ />
89
+ )
90
+ }
91
+
92
+ function DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>) {
93
+ return (
94
+ <DialogPrimitive.Title
95
+ data-slot='dialog-title'
96
+ className={cn('text-lg leading-none font-semibold', className)}
97
+ {...props}
98
+ />
99
+ )
100
+ }
101
+
102
+ function DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>) {
103
+ return (
104
+ <DialogPrimitive.Description
105
+ data-slot='dialog-description'
106
+ className={cn('text-muted-foreground text-sm', className)}
107
+ {...props}
108
+ />
109
+ )
110
+ }
111
+
112
+ export {
113
+ Dialog,
114
+ DialogClose,
115
+ DialogContent,
116
+ DialogDescription,
117
+ DialogFooter,
118
+ DialogHeader,
119
+ DialogOverlay,
120
+ DialogPortal,
121
+ DialogTitle,
122
+ DialogTrigger,
123
+ }
@@ -1,143 +1,123 @@
1
- "use client"
2
-
3
- import * as React from "react"
4
- import * as DialogPrimitive from "@radix-ui/react-dialog"
5
- import { XIcon } from "lucide-react"
6
-
7
- import { cn } from "@/lib/utils"
8
-
9
- function Dialog({
10
- ...props
11
- }: React.ComponentProps<typeof DialogPrimitive.Root>) {
12
- return <DialogPrimitive.Root data-slot="dialog" {...props} />
13
- }
14
-
15
- function DialogTrigger({
16
- ...props
17
- }: React.ComponentProps<typeof DialogPrimitive.Trigger>) {
18
- return <DialogPrimitive.Trigger data-slot="dialog-trigger" {...props} />
19
- }
20
-
21
- function DialogPortal({
22
- ...props
23
- }: React.ComponentProps<typeof DialogPrimitive.Portal>) {
24
- return <DialogPrimitive.Portal data-slot="dialog-portal" {...props} />
25
- }
26
-
27
- function DialogClose({
28
- ...props
29
- }: React.ComponentProps<typeof DialogPrimitive.Close>) {
30
- return <DialogPrimitive.Close data-slot="dialog-close" {...props} />
31
- }
32
-
33
- function DialogOverlay({
34
- className,
35
- ...props
36
- }: React.ComponentProps<typeof DialogPrimitive.Overlay>) {
37
- return (
38
- <DialogPrimitive.Overlay
39
- data-slot="dialog-overlay"
40
- className={cn(
41
- "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/50",
42
- className
43
- )}
44
- {...props}
45
- />
46
- )
47
- }
48
-
49
- function DialogContent({
50
- className,
51
- children,
52
- showCloseButton = true,
53
- ...props
54
- }: React.ComponentProps<typeof DialogPrimitive.Content> & {
55
- showCloseButton?: boolean
56
- }) {
57
- return (
58
- <DialogPortal data-slot="dialog-portal">
59
- <DialogOverlay />
60
- <DialogPrimitive.Content
61
- data-slot="dialog-content"
62
- className={cn(
63
- "bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 outline-none sm:max-w-lg",
64
- className
65
- )}
66
- {...props}
67
- >
68
- {children}
69
- {showCloseButton && (
70
- <DialogPrimitive.Close
71
- data-slot="dialog-close"
72
- className="ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"
73
- >
74
- <XIcon />
75
- <span className="sr-only">Close</span>
76
- </DialogPrimitive.Close>
77
- )}
78
- </DialogPrimitive.Content>
79
- </DialogPortal>
80
- )
81
- }
82
-
83
- function DialogHeader({ className, ...props }: React.ComponentProps<"div">) {
84
- return (
85
- <div
86
- data-slot="dialog-header"
87
- className={cn("flex flex-col gap-2 text-center sm:text-left", className)}
88
- {...props}
89
- />
90
- )
91
- }
92
-
93
- function DialogFooter({ className, ...props }: React.ComponentProps<"div">) {
94
- return (
95
- <div
96
- data-slot="dialog-footer"
97
- className={cn(
98
- "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
99
- className
100
- )}
101
- {...props}
102
- />
103
- )
104
- }
105
-
106
- function DialogTitle({
107
- className,
108
- ...props
109
- }: React.ComponentProps<typeof DialogPrimitive.Title>) {
110
- return (
111
- <DialogPrimitive.Title
112
- data-slot="dialog-title"
113
- className={cn("text-lg leading-none font-semibold", className)}
114
- {...props}
115
- />
116
- )
117
- }
118
-
119
- function DialogDescription({
120
- className,
121
- ...props
122
- }: React.ComponentProps<typeof DialogPrimitive.Description>) {
123
- return (
124
- <DialogPrimitive.Description
125
- data-slot="dialog-description"
126
- className={cn("text-muted-foreground text-sm", className)}
127
- {...props}
128
- />
129
- )
130
- }
131
-
132
- export {
133
- Dialog,
134
- DialogClose,
135
- DialogContent,
136
- DialogDescription,
137
- DialogFooter,
138
- DialogHeader,
139
- DialogOverlay,
140
- DialogPortal,
141
- DialogTitle,
142
- DialogTrigger,
143
- }
1
+ 'use client'
2
+
3
+ import * as React from 'react'
4
+ import * as DialogPrimitive from '@radix-ui/react-dialog'
5
+ import { XIcon } from 'lucide-react'
6
+
7
+ import { cn } from '@/lib/utils'
8
+
9
+ function Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>) {
10
+ return <DialogPrimitive.Root data-slot='dialog' {...props} />
11
+ }
12
+
13
+ function DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>) {
14
+ return <DialogPrimitive.Trigger data-slot='dialog-trigger' {...props} />
15
+ }
16
+
17
+ function DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>) {
18
+ return <DialogPrimitive.Portal data-slot='dialog-portal' {...props} />
19
+ }
20
+
21
+ function DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>) {
22
+ return <DialogPrimitive.Close data-slot='dialog-close' {...props} />
23
+ }
24
+
25
+ function DialogOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>) {
26
+ return (
27
+ <DialogPrimitive.Overlay
28
+ data-slot='dialog-overlay'
29
+ className={cn(
30
+ '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/50',
31
+ className,
32
+ )}
33
+ {...props}
34
+ />
35
+ )
36
+ }
37
+
38
+ function DialogContent({
39
+ className,
40
+ children,
41
+ showCloseButton = true,
42
+ ...props
43
+ }: React.ComponentProps<typeof DialogPrimitive.Content> & {
44
+ showCloseButton?: boolean
45
+ }) {
46
+ return (
47
+ <DialogPortal data-slot='dialog-portal'>
48
+ <DialogOverlay />
49
+ <DialogPrimitive.Content
50
+ data-slot='dialog-content'
51
+ className={cn(
52
+ 'bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 outline-none sm:max-w-lg',
53
+ className,
54
+ )}
55
+ {...props}
56
+ >
57
+ {children}
58
+ {showCloseButton && (
59
+ <DialogPrimitive.Close
60
+ data-slot='dialog-close'
61
+ className="ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"
62
+ >
63
+ <XIcon />
64
+ <span className='sr-only'>Close</span>
65
+ </DialogPrimitive.Close>
66
+ )}
67
+ </DialogPrimitive.Content>
68
+ </DialogPortal>
69
+ )
70
+ }
71
+
72
+ function DialogHeader({ className, ...props }: React.ComponentProps<'div'>) {
73
+ return (
74
+ <div
75
+ data-slot='dialog-header'
76
+ className={cn('flex flex-col gap-2 text-center sm:text-left', className)}
77
+ {...props}
78
+ />
79
+ )
80
+ }
81
+
82
+ function DialogFooter({ className, ...props }: React.ComponentProps<'div'>) {
83
+ return (
84
+ <div
85
+ data-slot='dialog-footer'
86
+ className={cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', className)}
87
+ {...props}
88
+ />
89
+ )
90
+ }
91
+
92
+ function DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>) {
93
+ return (
94
+ <DialogPrimitive.Title
95
+ data-slot='dialog-title'
96
+ className={cn('text-lg leading-none font-semibold', className)}
97
+ {...props}
98
+ />
99
+ )
100
+ }
101
+
102
+ function DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>) {
103
+ return (
104
+ <DialogPrimitive.Description
105
+ data-slot='dialog-description'
106
+ className={cn('text-muted-foreground text-sm', className)}
107
+ {...props}
108
+ />
109
+ )
110
+ }
111
+
112
+ export {
113
+ Dialog,
114
+ DialogClose,
115
+ DialogContent,
116
+ DialogDescription,
117
+ DialogFooter,
118
+ DialogHeader,
119
+ DialogOverlay,
120
+ DialogPortal,
121
+ DialogTitle,
122
+ DialogTrigger,
123
+ }
@@ -1,48 +1,42 @@
1
- "use client"
1
+ 'use client'
2
2
 
3
- import * as React from "react"
4
- import * as PopoverPrimitive from "@radix-ui/react-popover"
3
+ import * as React from 'react'
4
+ import * as PopoverPrimitive from '@radix-ui/react-popover'
5
5
 
6
- import { cn } from "@/lib/utils"
6
+ import { cn } from '@/lib/utils'
7
7
 
8
- function Popover({
9
- ...props
10
- }: React.ComponentProps<typeof PopoverPrimitive.Root>) {
11
- return <PopoverPrimitive.Root data-slot="popover" {...props} />
8
+ function Popover({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>) {
9
+ return <PopoverPrimitive.Root data-slot='popover' {...props} />
12
10
  }
13
11
 
14
- function PopoverTrigger({
15
- ...props
16
- }: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {
17
- return <PopoverPrimitive.Trigger data-slot="popover-trigger" {...props} />
12
+ function PopoverTrigger({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {
13
+ return <PopoverPrimitive.Trigger data-slot='popover-trigger' {...props} />
18
14
  }
19
15
 
20
16
  function PopoverContent({
21
- className,
22
- align = "center",
23
- sideOffset = 4,
24
- ...props
17
+ className,
18
+ align = 'center',
19
+ sideOffset = 4,
20
+ ...props
25
21
  }: React.ComponentProps<typeof PopoverPrimitive.Content>) {
26
- return (
27
- <PopoverPrimitive.Portal>
28
- <PopoverPrimitive.Content
29
- data-slot="popover-content"
30
- align={align}
31
- sideOffset={sideOffset}
32
- className={cn(
33
- "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 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",
34
- className
35
- )}
36
- {...props}
37
- />
38
- </PopoverPrimitive.Portal>
39
- )
22
+ return (
23
+ <PopoverPrimitive.Portal>
24
+ <PopoverPrimitive.Content
25
+ data-slot='popover-content'
26
+ align={align}
27
+ sideOffset={sideOffset}
28
+ className={cn(
29
+ '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 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden',
30
+ className,
31
+ )}
32
+ {...props}
33
+ />
34
+ </PopoverPrimitive.Portal>
35
+ )
40
36
  }
41
37
 
42
- function PopoverAnchor({
43
- ...props
44
- }: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {
45
- return <PopoverPrimitive.Anchor data-slot="popover-anchor" {...props} />
38
+ function PopoverAnchor({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {
39
+ return <PopoverPrimitive.Anchor data-slot='popover-anchor' {...props} />
46
40
  }
47
41
 
48
42
  export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor }