create-deesse-app 0.3.0 → 0.4.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.
Files changed (100) hide show
  1. package/dist/src/copy.d.ts.map +1 -1
  2. package/dist/src/copy.js +41 -66
  3. package/dist/src/copy.js.map +1 -1
  4. package/dist/tsconfig.tsbuildinfo +1 -1
  5. package/package.json +4 -5
  6. package/templates/default/.agents/skills/shadcn/SKILL.md +242 -0
  7. package/templates/default/.agents/skills/shadcn/agents/openai.yml +5 -0
  8. package/templates/default/.agents/skills/shadcn/assets/shadcn-small.png +0 -0
  9. package/templates/default/.agents/skills/shadcn/assets/shadcn.png +0 -0
  10. package/templates/default/.agents/skills/shadcn/cli.md +257 -0
  11. package/templates/default/.agents/skills/shadcn/customization.md +202 -0
  12. package/templates/default/.agents/skills/shadcn/evals/evals.json +47 -0
  13. package/templates/default/.agents/skills/shadcn/mcp.md +94 -0
  14. package/templates/default/.agents/skills/shadcn/rules/base-vs-radix.md +306 -0
  15. package/templates/default/.agents/skills/shadcn/rules/composition.md +195 -0
  16. package/templates/default/.agents/skills/shadcn/rules/forms.md +192 -0
  17. package/templates/default/.agents/skills/shadcn/rules/icons.md +101 -0
  18. package/templates/default/.agents/skills/shadcn/rules/styling.md +162 -0
  19. package/templates/default/AGENTS.md +5 -0
  20. package/templates/default/CLAUDE.md +1 -0
  21. package/templates/default/README.md +28 -0
  22. package/templates/default/components.json +25 -0
  23. package/templates/default/eslint.config.mjs +18 -0
  24. package/templates/default/next.config.ts +7 -0
  25. package/templates/default/package.json +50 -0
  26. package/templates/default/postcss.config.mjs +7 -0
  27. package/templates/default/public/file.svg +1 -0
  28. package/templates/default/public/globe.svg +1 -0
  29. package/templates/default/public/nesalia.svg +50 -0
  30. package/templates/default/public/window.svg +1 -0
  31. package/templates/default/skills-lock.json +10 -0
  32. package/templates/default/src/app/(deesse)/admin/[[...slug]]/page.tsx +20 -0
  33. package/templates/default/src/app/(deesse)/admin/layout.tsx +7 -0
  34. package/templates/default/src/app/(frontend)/page.tsx +50 -0
  35. package/templates/default/src/app/globals.css +130 -0
  36. package/templates/default/src/app/icon.svg +109 -0
  37. package/templates/default/src/app/layout.tsx +33 -0
  38. package/templates/default/src/app/page.tsx +50 -0
  39. package/templates/default/src/components/providers/index.tsx +9 -0
  40. package/templates/default/src/components/providers/theme-provider.tsx +11 -0
  41. package/templates/default/src/components/ui/accordion.tsx +81 -0
  42. package/templates/default/src/components/ui/alert-dialog.tsx +199 -0
  43. package/templates/default/src/components/ui/alert.tsx +76 -0
  44. package/templates/default/src/components/ui/aspect-ratio.tsx +11 -0
  45. package/templates/default/src/components/ui/avatar.tsx +112 -0
  46. package/templates/default/src/components/ui/badge.tsx +49 -0
  47. package/templates/default/src/components/ui/breadcrumb.tsx +122 -0
  48. package/templates/default/src/components/ui/button-group.tsx +83 -0
  49. package/templates/default/src/components/ui/button.tsx +67 -0
  50. package/templates/default/src/components/ui/calendar.tsx +222 -0
  51. package/templates/default/src/components/ui/card.tsx +103 -0
  52. package/templates/default/src/components/ui/carousel.tsx +242 -0
  53. package/templates/default/src/components/ui/chart.tsx +373 -0
  54. package/templates/default/src/components/ui/checkbox.tsx +33 -0
  55. package/templates/default/src/components/ui/collapsible.tsx +33 -0
  56. package/templates/default/src/components/ui/combobox.tsx +299 -0
  57. package/templates/default/src/components/ui/command.tsx +195 -0
  58. package/templates/default/src/components/ui/context-menu.tsx +263 -0
  59. package/templates/default/src/components/ui/dialog.tsx +168 -0
  60. package/templates/default/src/components/ui/direction.tsx +22 -0
  61. package/templates/default/src/components/ui/drawer.tsx +134 -0
  62. package/templates/default/src/components/ui/dropdown-menu.tsx +269 -0
  63. package/templates/default/src/components/ui/empty.tsx +104 -0
  64. package/templates/default/src/components/ui/field.tsx +238 -0
  65. package/templates/default/src/components/ui/hover-card.tsx +44 -0
  66. package/templates/default/src/components/ui/input-group.tsx +156 -0
  67. package/templates/default/src/components/ui/input-otp.tsx +87 -0
  68. package/templates/default/src/components/ui/input.tsx +19 -0
  69. package/templates/default/src/components/ui/item.tsx +196 -0
  70. package/templates/default/src/components/ui/kbd.tsx +26 -0
  71. package/templates/default/src/components/ui/label.tsx +24 -0
  72. package/templates/default/src/components/ui/menubar.tsx +280 -0
  73. package/templates/default/src/components/ui/native-select.tsx +52 -0
  74. package/templates/default/src/components/ui/navigation-menu.tsx +164 -0
  75. package/templates/default/src/components/ui/pagination.tsx +129 -0
  76. package/templates/default/src/components/ui/popover.tsx +89 -0
  77. package/templates/default/src/components/ui/progress.tsx +31 -0
  78. package/templates/default/src/components/ui/radio-group.tsx +44 -0
  79. package/templates/default/src/components/ui/resizable.tsx +50 -0
  80. package/templates/default/src/components/ui/scroll-area.tsx +55 -0
  81. package/templates/default/src/components/ui/select.tsx +192 -0
  82. package/templates/default/src/components/ui/separator.tsx +28 -0
  83. package/templates/default/src/components/ui/sheet.tsx +147 -0
  84. package/templates/default/src/components/ui/sidebar.tsx +702 -0
  85. package/templates/default/src/components/ui/skeleton.tsx +13 -0
  86. package/templates/default/src/components/ui/slider.tsx +59 -0
  87. package/templates/default/src/components/ui/sonner.tsx +49 -0
  88. package/templates/default/src/components/ui/spinner.tsx +10 -0
  89. package/templates/default/src/components/ui/switch.tsx +33 -0
  90. package/templates/default/src/components/ui/table.tsx +116 -0
  91. package/templates/default/src/components/ui/tabs.tsx +90 -0
  92. package/templates/default/src/components/ui/textarea.tsx +18 -0
  93. package/templates/default/src/components/ui/toggle-group.tsx +89 -0
  94. package/templates/default/src/components/ui/toggle.tsx +46 -0
  95. package/templates/default/src/components/ui/tooltip.tsx +57 -0
  96. package/templates/default/src/deesse.config.ts +11 -0
  97. package/templates/default/src/hooks/use-mobile.ts +19 -0
  98. package/templates/default/src/lib/utils.ts +6 -0
  99. package/templates/default/tsconfig.json +35 -0
  100. package/templates/minimal/.gitkeep +0 -0
@@ -0,0 +1,280 @@
1
+ "use client"
2
+
3
+ import * as React from "react"
4
+ import { Menubar as MenubarPrimitive } from "radix-ui"
5
+
6
+ import { cn } from "@/lib/utils"
7
+ import { CheckIcon, ChevronRightIcon } from "lucide-react"
8
+
9
+ function Menubar({
10
+ className,
11
+ ...props
12
+ }: React.ComponentProps<typeof MenubarPrimitive.Root>) {
13
+ return (
14
+ <MenubarPrimitive.Root
15
+ data-slot="menubar"
16
+ className={cn(
17
+ "flex h-8 items-center gap-0.5 rounded-lg border p-[3px]",
18
+ className
19
+ )}
20
+ {...props}
21
+ />
22
+ )
23
+ }
24
+
25
+ function MenubarMenu({
26
+ ...props
27
+ }: React.ComponentProps<typeof MenubarPrimitive.Menu>) {
28
+ return <MenubarPrimitive.Menu data-slot="menubar-menu" {...props} />
29
+ }
30
+
31
+ function MenubarGroup({
32
+ ...props
33
+ }: React.ComponentProps<typeof MenubarPrimitive.Group>) {
34
+ return <MenubarPrimitive.Group data-slot="menubar-group" {...props} />
35
+ }
36
+
37
+ function MenubarPortal({
38
+ ...props
39
+ }: React.ComponentProps<typeof MenubarPrimitive.Portal>) {
40
+ return <MenubarPrimitive.Portal data-slot="menubar-portal" {...props} />
41
+ }
42
+
43
+ function MenubarRadioGroup({
44
+ ...props
45
+ }: React.ComponentProps<typeof MenubarPrimitive.RadioGroup>) {
46
+ return (
47
+ <MenubarPrimitive.RadioGroup data-slot="menubar-radio-group" {...props} />
48
+ )
49
+ }
50
+
51
+ function MenubarTrigger({
52
+ className,
53
+ ...props
54
+ }: React.ComponentProps<typeof MenubarPrimitive.Trigger>) {
55
+ return (
56
+ <MenubarPrimitive.Trigger
57
+ data-slot="menubar-trigger"
58
+ className={cn(
59
+ "flex items-center rounded-sm px-1.5 py-[2px] text-sm font-medium outline-hidden select-none hover:bg-muted aria-expanded:bg-muted",
60
+ className
61
+ )}
62
+ {...props}
63
+ />
64
+ )
65
+ }
66
+
67
+ function MenubarContent({
68
+ className,
69
+ align = "start",
70
+ alignOffset = -4,
71
+ sideOffset = 8,
72
+ ...props
73
+ }: React.ComponentProps<typeof MenubarPrimitive.Content>) {
74
+ return (
75
+ <MenubarPortal>
76
+ <MenubarPrimitive.Content
77
+ data-slot="menubar-content"
78
+ align={align}
79
+ alignOffset={alignOffset}
80
+ sideOffset={sideOffset}
81
+ className={cn("z-50 min-w-36 origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95", className )}
82
+ {...props}
83
+ />
84
+ </MenubarPortal>
85
+ )
86
+ }
87
+
88
+ function MenubarItem({
89
+ className,
90
+ inset,
91
+ variant = "default",
92
+ ...props
93
+ }: React.ComponentProps<typeof MenubarPrimitive.Item> & {
94
+ inset?: boolean
95
+ variant?: "default" | "destructive"
96
+ }) {
97
+ return (
98
+ <MenubarPrimitive.Item
99
+ data-slot="menubar-item"
100
+ data-inset={inset}
101
+ data-variant={variant}
102
+ className={cn(
103
+ "group/menubar-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive!",
104
+ className
105
+ )}
106
+ {...props}
107
+ />
108
+ )
109
+ }
110
+
111
+ function MenubarCheckboxItem({
112
+ className,
113
+ children,
114
+ checked,
115
+ inset,
116
+ ...props
117
+ }: React.ComponentProps<typeof MenubarPrimitive.CheckboxItem> & {
118
+ inset?: boolean
119
+ }) {
120
+ return (
121
+ <MenubarPrimitive.CheckboxItem
122
+ data-slot="menubar-checkbox-item"
123
+ data-inset={inset}
124
+ className={cn(
125
+ "relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-1.5 pl-7 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0",
126
+ className
127
+ )}
128
+ checked={checked}
129
+ {...props}
130
+ >
131
+ <span className="pointer-events-none absolute left-1.5 flex size-4 items-center justify-center [&_svg:not([class*='size-'])]:size-4">
132
+ <MenubarPrimitive.ItemIndicator>
133
+ <CheckIcon
134
+ />
135
+ </MenubarPrimitive.ItemIndicator>
136
+ </span>
137
+ {children}
138
+ </MenubarPrimitive.CheckboxItem>
139
+ )
140
+ }
141
+
142
+ function MenubarRadioItem({
143
+ className,
144
+ children,
145
+ inset,
146
+ ...props
147
+ }: React.ComponentProps<typeof MenubarPrimitive.RadioItem> & {
148
+ inset?: boolean
149
+ }) {
150
+ return (
151
+ <MenubarPrimitive.RadioItem
152
+ data-slot="menubar-radio-item"
153
+ data-inset={inset}
154
+ className={cn(
155
+ "relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-1.5 pl-7 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
156
+ className
157
+ )}
158
+ {...props}
159
+ >
160
+ <span className="pointer-events-none absolute left-1.5 flex size-4 items-center justify-center [&_svg:not([class*='size-'])]:size-4">
161
+ <MenubarPrimitive.ItemIndicator>
162
+ <CheckIcon
163
+ />
164
+ </MenubarPrimitive.ItemIndicator>
165
+ </span>
166
+ {children}
167
+ </MenubarPrimitive.RadioItem>
168
+ )
169
+ }
170
+
171
+ function MenubarLabel({
172
+ className,
173
+ inset,
174
+ ...props
175
+ }: React.ComponentProps<typeof MenubarPrimitive.Label> & {
176
+ inset?: boolean
177
+ }) {
178
+ return (
179
+ <MenubarPrimitive.Label
180
+ data-slot="menubar-label"
181
+ data-inset={inset}
182
+ className={cn(
183
+ "px-1.5 py-1 text-sm font-medium data-inset:pl-7",
184
+ className
185
+ )}
186
+ {...props}
187
+ />
188
+ )
189
+ }
190
+
191
+ function MenubarSeparator({
192
+ className,
193
+ ...props
194
+ }: React.ComponentProps<typeof MenubarPrimitive.Separator>) {
195
+ return (
196
+ <MenubarPrimitive.Separator
197
+ data-slot="menubar-separator"
198
+ className={cn("-mx-1 my-1 h-px bg-border", className)}
199
+ {...props}
200
+ />
201
+ )
202
+ }
203
+
204
+ function MenubarShortcut({
205
+ className,
206
+ ...props
207
+ }: React.ComponentProps<"span">) {
208
+ return (
209
+ <span
210
+ data-slot="menubar-shortcut"
211
+ className={cn(
212
+ "ml-auto text-xs tracking-widest text-muted-foreground group-focus/menubar-item:text-accent-foreground",
213
+ className
214
+ )}
215
+ {...props}
216
+ />
217
+ )
218
+ }
219
+
220
+ function MenubarSub({
221
+ ...props
222
+ }: React.ComponentProps<typeof MenubarPrimitive.Sub>) {
223
+ return <MenubarPrimitive.Sub data-slot="menubar-sub" {...props} />
224
+ }
225
+
226
+ function MenubarSubTrigger({
227
+ className,
228
+ inset,
229
+ children,
230
+ ...props
231
+ }: React.ComponentProps<typeof MenubarPrimitive.SubTrigger> & {
232
+ inset?: boolean
233
+ }) {
234
+ return (
235
+ <MenubarPrimitive.SubTrigger
236
+ data-slot="menubar-sub-trigger"
237
+ data-inset={inset}
238
+ className={cn(
239
+ "flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-none select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground [&_svg:not([class*='size-'])]:size-4",
240
+ className
241
+ )}
242
+ {...props}
243
+ >
244
+ {children}
245
+ <ChevronRightIcon className="ml-auto size-4" />
246
+ </MenubarPrimitive.SubTrigger>
247
+ )
248
+ }
249
+
250
+ function MenubarSubContent({
251
+ className,
252
+ ...props
253
+ }: React.ComponentProps<typeof MenubarPrimitive.SubContent>) {
254
+ return (
255
+ <MenubarPrimitive.SubContent
256
+ data-slot="menubar-sub-content"
257
+ className={cn("z-50 min-w-32 origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className )}
258
+ {...props}
259
+ />
260
+ )
261
+ }
262
+
263
+ export {
264
+ Menubar,
265
+ MenubarPortal,
266
+ MenubarMenu,
267
+ MenubarTrigger,
268
+ MenubarContent,
269
+ MenubarGroup,
270
+ MenubarSeparator,
271
+ MenubarLabel,
272
+ MenubarItem,
273
+ MenubarShortcut,
274
+ MenubarCheckboxItem,
275
+ MenubarRadioGroup,
276
+ MenubarRadioItem,
277
+ MenubarSub,
278
+ MenubarSubTrigger,
279
+ MenubarSubContent,
280
+ }
@@ -0,0 +1,52 @@
1
+ import * as React from "react"
2
+
3
+ import { cn } from "@/lib/utils"
4
+ import { ChevronDownIcon } from "lucide-react"
5
+
6
+ type NativeSelectProps = Omit<React.ComponentProps<"select">, "size"> & {
7
+ size?: "sm" | "default"
8
+ }
9
+
10
+ function NativeSelect({
11
+ className,
12
+ size = "default",
13
+ ...props
14
+ }: NativeSelectProps) {
15
+ return (
16
+ <div
17
+ className={cn(
18
+ "group/native-select relative w-fit has-[select:disabled]:opacity-50",
19
+ className
20
+ )}
21
+ data-slot="native-select-wrapper"
22
+ data-size={size}
23
+ >
24
+ <select
25
+ data-slot="native-select"
26
+ data-size={size}
27
+ className="h-8 w-full min-w-0 appearance-none rounded-lg border border-input bg-transparent py-1 pr-8 pl-2.5 text-sm transition-colors outline-none select-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-[size=sm]:py-0.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40"
28
+ {...props}
29
+ />
30
+ <ChevronDownIcon className="pointer-events-none absolute top-1/2 right-2.5 size-4 -translate-y-1/2 text-muted-foreground select-none" aria-hidden="true" data-slot="native-select-icon" />
31
+ </div>
32
+ )
33
+ }
34
+
35
+ function NativeSelectOption({ ...props }: React.ComponentProps<"option">) {
36
+ return <option data-slot="native-select-option" {...props} />
37
+ }
38
+
39
+ function NativeSelectOptGroup({
40
+ className,
41
+ ...props
42
+ }: React.ComponentProps<"optgroup">) {
43
+ return (
44
+ <optgroup
45
+ data-slot="native-select-optgroup"
46
+ className={cn(className)}
47
+ {...props}
48
+ />
49
+ )
50
+ }
51
+
52
+ export { NativeSelect, NativeSelectOptGroup, NativeSelectOption }
@@ -0,0 +1,164 @@
1
+ import * as React from "react"
2
+ import { cva } from "class-variance-authority"
3
+ import { NavigationMenu as NavigationMenuPrimitive } from "radix-ui"
4
+
5
+ import { cn } from "@/lib/utils"
6
+ import { ChevronDownIcon } from "lucide-react"
7
+
8
+ function NavigationMenu({
9
+ className,
10
+ children,
11
+ viewport = true,
12
+ ...props
13
+ }: React.ComponentProps<typeof NavigationMenuPrimitive.Root> & {
14
+ viewport?: boolean
15
+ }) {
16
+ return (
17
+ <NavigationMenuPrimitive.Root
18
+ data-slot="navigation-menu"
19
+ data-viewport={viewport}
20
+ className={cn(
21
+ "group/navigation-menu relative flex max-w-max flex-1 items-center justify-center",
22
+ className
23
+ )}
24
+ {...props}
25
+ >
26
+ {children}
27
+ {viewport && <NavigationMenuViewport />}
28
+ </NavigationMenuPrimitive.Root>
29
+ )
30
+ }
31
+
32
+ function NavigationMenuList({
33
+ className,
34
+ ...props
35
+ }: React.ComponentProps<typeof NavigationMenuPrimitive.List>) {
36
+ return (
37
+ <NavigationMenuPrimitive.List
38
+ data-slot="navigation-menu-list"
39
+ className={cn(
40
+ "group flex flex-1 list-none items-center justify-center gap-0",
41
+ className
42
+ )}
43
+ {...props}
44
+ />
45
+ )
46
+ }
47
+
48
+ function NavigationMenuItem({
49
+ className,
50
+ ...props
51
+ }: React.ComponentProps<typeof NavigationMenuPrimitive.Item>) {
52
+ return (
53
+ <NavigationMenuPrimitive.Item
54
+ data-slot="navigation-menu-item"
55
+ className={cn("relative", className)}
56
+ {...props}
57
+ />
58
+ )
59
+ }
60
+
61
+ const navigationMenuTriggerStyle = cva(
62
+ "group/navigation-menu-trigger inline-flex h-9 w-max items-center justify-center rounded-lg px-2.5 py-1.5 text-sm font-medium transition-all outline-none hover:bg-muted focus:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-popup-open:bg-muted/50 data-popup-open:hover:bg-muted data-open:bg-muted/50 data-open:hover:bg-muted data-open:focus:bg-muted"
63
+ )
64
+
65
+ function NavigationMenuTrigger({
66
+ className,
67
+ children,
68
+ ...props
69
+ }: React.ComponentProps<typeof NavigationMenuPrimitive.Trigger>) {
70
+ return (
71
+ <NavigationMenuPrimitive.Trigger
72
+ data-slot="navigation-menu-trigger"
73
+ className={cn(navigationMenuTriggerStyle(), "group", className)}
74
+ {...props}
75
+ >
76
+ {children}{" "}
77
+ <ChevronDownIcon className="relative top-px ml-1 size-3 transition duration-300 group-data-popup-open/navigation-menu-trigger:rotate-180 group-data-open/navigation-menu-trigger:rotate-180" aria-hidden="true" />
78
+ </NavigationMenuPrimitive.Trigger>
79
+ )
80
+ }
81
+
82
+ function NavigationMenuContent({
83
+ className,
84
+ ...props
85
+ }: React.ComponentProps<typeof NavigationMenuPrimitive.Content>) {
86
+ return (
87
+ <NavigationMenuPrimitive.Content
88
+ data-slot="navigation-menu-content"
89
+ className={cn(
90
+ "top-0 left-0 w-full p-1 ease-[cubic-bezier(0.22,1,0.36,1)] group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-lg group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:ring-1 group-data-[viewport=false]/navigation-menu:ring-foreground/10 group-data-[viewport=false]/navigation-menu:duration-300 data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none md:absolute md:w-auto group-data-[viewport=false]/navigation-menu:data-open:animate-in group-data-[viewport=false]/navigation-menu:data-open:fade-in-0 group-data-[viewport=false]/navigation-menu:data-open:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-closed:animate-out group-data-[viewport=false]/navigation-menu:data-closed:fade-out-0 group-data-[viewport=false]/navigation-menu:data-closed:zoom-out-95",
91
+ className
92
+ )}
93
+ {...props}
94
+ />
95
+ )
96
+ }
97
+
98
+ function NavigationMenuViewport({
99
+ className,
100
+ ...props
101
+ }: React.ComponentProps<typeof NavigationMenuPrimitive.Viewport>) {
102
+ return (
103
+ <div
104
+ className={cn(
105
+ "absolute top-full left-0 isolate z-50 flex justify-center"
106
+ )}
107
+ >
108
+ <NavigationMenuPrimitive.Viewport
109
+ data-slot="navigation-menu-viewport"
110
+ className={cn(
111
+ "origin-top-center relative mt-1.5 h-(--radix-navigation-menu-viewport-height) w-full overflow-hidden rounded-lg bg-popover text-popover-foreground shadow ring-1 ring-foreground/10 duration-100 md:w-(--radix-navigation-menu-viewport-width) data-open:animate-in data-open:zoom-in-90 data-closed:animate-out data-closed:zoom-out-90",
112
+ className
113
+ )}
114
+ {...props}
115
+ />
116
+ </div>
117
+ )
118
+ }
119
+
120
+ function NavigationMenuLink({
121
+ className,
122
+ ...props
123
+ }: React.ComponentProps<typeof NavigationMenuPrimitive.Link>) {
124
+ return (
125
+ <NavigationMenuPrimitive.Link
126
+ data-slot="navigation-menu-link"
127
+ className={cn(
128
+ "flex items-center gap-2 rounded-lg p-2 text-sm transition-all outline-none hover:bg-muted focus:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 in-data-[slot=navigation-menu-content]:rounded-md data-active:bg-muted/50 data-active:hover:bg-muted data-active:focus:bg-muted [&_svg:not([class*='size-'])]:size-4",
129
+ className
130
+ )}
131
+ {...props}
132
+ />
133
+ )
134
+ }
135
+
136
+ function NavigationMenuIndicator({
137
+ className,
138
+ ...props
139
+ }: React.ComponentProps<typeof NavigationMenuPrimitive.Indicator>) {
140
+ return (
141
+ <NavigationMenuPrimitive.Indicator
142
+ data-slot="navigation-menu-indicator"
143
+ className={cn(
144
+ "top-full z-1 flex h-1.5 items-end justify-center overflow-hidden data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:animate-in data-[state=visible]:fade-in",
145
+ className
146
+ )}
147
+ {...props}
148
+ >
149
+ <div className="relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" />
150
+ </NavigationMenuPrimitive.Indicator>
151
+ )
152
+ }
153
+
154
+ export {
155
+ NavigationMenu,
156
+ NavigationMenuList,
157
+ NavigationMenuItem,
158
+ NavigationMenuContent,
159
+ NavigationMenuTrigger,
160
+ NavigationMenuLink,
161
+ NavigationMenuIndicator,
162
+ NavigationMenuViewport,
163
+ navigationMenuTriggerStyle,
164
+ }
@@ -0,0 +1,129 @@
1
+ import * as React from "react"
2
+
3
+ import { cn } from "@/lib/utils"
4
+ import { Button } from "@/components/ui/button"
5
+ import { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon } from "lucide-react"
6
+
7
+ function Pagination({ className, ...props }: React.ComponentProps<"nav">) {
8
+ return (
9
+ <nav
10
+ role="navigation"
11
+ aria-label="pagination"
12
+ data-slot="pagination"
13
+ className={cn("mx-auto flex w-full justify-center", className)}
14
+ {...props}
15
+ />
16
+ )
17
+ }
18
+
19
+ function PaginationContent({
20
+ className,
21
+ ...props
22
+ }: React.ComponentProps<"ul">) {
23
+ return (
24
+ <ul
25
+ data-slot="pagination-content"
26
+ className={cn("flex items-center gap-0.5", className)}
27
+ {...props}
28
+ />
29
+ )
30
+ }
31
+
32
+ function PaginationItem({ ...props }: React.ComponentProps<"li">) {
33
+ return <li data-slot="pagination-item" {...props} />
34
+ }
35
+
36
+ type PaginationLinkProps = {
37
+ isActive?: boolean
38
+ } & Pick<React.ComponentProps<typeof Button>, "size"> &
39
+ React.ComponentProps<"a">
40
+
41
+ function PaginationLink({
42
+ className,
43
+ isActive,
44
+ size = "icon",
45
+ ...props
46
+ }: PaginationLinkProps) {
47
+ return (
48
+ <Button
49
+ asChild
50
+ variant={isActive ? "outline" : "ghost"}
51
+ size={size}
52
+ className={cn(className)}
53
+ >
54
+ <a
55
+ aria-current={isActive ? "page" : undefined}
56
+ data-slot="pagination-link"
57
+ data-active={isActive}
58
+ {...props}
59
+ />
60
+ </Button>
61
+ )
62
+ }
63
+
64
+ function PaginationPrevious({
65
+ className,
66
+ text = "Previous",
67
+ ...props
68
+ }: React.ComponentProps<typeof PaginationLink> & { text?: string }) {
69
+ return (
70
+ <PaginationLink
71
+ aria-label="Go to previous page"
72
+ size="default"
73
+ className={cn("pl-1.5!", className)}
74
+ {...props}
75
+ >
76
+ <ChevronLeftIcon data-icon="inline-start" />
77
+ <span className="hidden sm:block">{text}</span>
78
+ </PaginationLink>
79
+ )
80
+ }
81
+
82
+ function PaginationNext({
83
+ className,
84
+ text = "Next",
85
+ ...props
86
+ }: React.ComponentProps<typeof PaginationLink> & { text?: string }) {
87
+ return (
88
+ <PaginationLink
89
+ aria-label="Go to next page"
90
+ size="default"
91
+ className={cn("pr-1.5!", className)}
92
+ {...props}
93
+ >
94
+ <span className="hidden sm:block">{text}</span>
95
+ <ChevronRightIcon data-icon="inline-end" />
96
+ </PaginationLink>
97
+ )
98
+ }
99
+
100
+ function PaginationEllipsis({
101
+ className,
102
+ ...props
103
+ }: React.ComponentProps<"span">) {
104
+ return (
105
+ <span
106
+ aria-hidden
107
+ data-slot="pagination-ellipsis"
108
+ className={cn(
109
+ "flex size-8 items-center justify-center [&_svg:not([class*='size-'])]:size-4",
110
+ className
111
+ )}
112
+ {...props}
113
+ >
114
+ <MoreHorizontalIcon
115
+ />
116
+ <span className="sr-only">More pages</span>
117
+ </span>
118
+ )
119
+ }
120
+
121
+ export {
122
+ Pagination,
123
+ PaginationContent,
124
+ PaginationEllipsis,
125
+ PaginationItem,
126
+ PaginationLink,
127
+ PaginationNext,
128
+ PaginationPrevious,
129
+ }