@djangocfg/layouts 1.4.27 → 1.4.29

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 (118) hide show
  1. package/package.json +8 -8
  2. package/src/auth/context/AuthContext.tsx +4 -1
  3. package/src/auth/hooks/index.ts +2 -0
  4. package/src/auth/hooks/useAuthForm.ts +2 -0
  5. package/src/auth/hooks/useAuthGuard.ts +2 -0
  6. package/src/auth/hooks/useAutoAuth.ts +16 -11
  7. package/src/auth/hooks/useLocalStorage.ts +2 -0
  8. package/src/auth/hooks/useProfileCache.ts +2 -0
  9. package/src/auth/hooks/useSessionStorage.ts +2 -0
  10. package/src/auth/middlewares/index.ts +1 -1
  11. package/src/auth/middlewares/proxy.ts +10 -2
  12. package/src/layouts/AppLayout/AppLayout.tsx +9 -7
  13. package/src/layouts/AppLayout/components/ErrorBoundary.tsx +6 -3
  14. package/src/layouts/AppLayout/components/PageProgress.tsx +2 -0
  15. package/src/layouts/AppLayout/components/Seo.tsx +2 -0
  16. package/src/layouts/AppLayout/components/UpdateNotifier/UpdateNotifier.tsx +3 -2
  17. package/src/layouts/AppLayout/hooks/index.ts +2 -0
  18. package/src/layouts/AppLayout/hooks/useNavigation.ts +3 -1
  19. package/src/layouts/AppLayout/layouts/AdminLayout/AdminLayout.tsx +1 -0
  20. package/src/layouts/AppLayout/layouts/AuthLayout/AuthContext.tsx +2 -0
  21. package/src/layouts/AppLayout/layouts/AuthLayout/IdentifierForm.tsx +2 -0
  22. package/src/layouts/AppLayout/layouts/AuthLayout/OTPForm.tsx +4 -0
  23. package/src/layouts/AppLayout/layouts/AuthLayout/index.ts +2 -0
  24. package/src/layouts/AppLayout/layouts/PrivateLayout/PrivateLayout.tsx +1 -0
  25. package/src/layouts/AppLayout/providers/CoreProviders.tsx +1 -0
  26. package/src/layouts/PaymentsLayout/PaymentsLayout.tsx +1 -0
  27. package/src/layouts/PaymentsLayout/components/CreatePaymentDialog.tsx +1 -0
  28. package/src/layouts/PaymentsLayout/events.ts +2 -0
  29. package/src/layouts/ProfileLayout/ProfileLayout.tsx +1 -0
  30. package/src/layouts/ProfileLayout/components/ProfileForm.tsx +1 -0
  31. package/src/layouts/SimpleLayout/SimpleLayout.tsx +72 -0
  32. package/src/layouts/SimpleLayout/index.ts +3 -0
  33. package/src/layouts/SupportLayout/SupportLayout.tsx +1 -0
  34. package/src/layouts/SupportLayout/components/CreateTicketDialog.tsx +1 -0
  35. package/src/layouts/SupportLayout/components/TicketList.tsx +6 -5
  36. package/src/layouts/SupportLayout/events.ts +2 -0
  37. package/src/layouts/index.ts +1 -3
  38. package/src/snippets/AuthDialog/useAuthDialog.ts +2 -0
  39. package/src/snippets/Chat/components/MessageList.tsx +12 -11
  40. package/src/snippets/Chat/index.tsx +1 -0
  41. package/src/snippets/ContactForm/ContactForm.tsx +7 -2
  42. package/src/snippets/ContactForm/ContactPage.tsx +16 -3
  43. package/src/snippets/VideoPlayer/README.md +35 -0
  44. package/src/snippets/VideoPlayer/VideoControls.tsx +13 -9
  45. package/src/snippets/VideoPlayer/VideoPlayer.tsx +159 -25
  46. package/src/snippets/VideoPlayer/index.ts +1 -1
  47. package/src/validation/utils/curl-generator.ts +5 -1
  48. package/src/layouts/UILayout/README.md +0 -267
  49. package/src/layouts/UILayout/SUMMARY.md +0 -298
  50. package/src/layouts/UILayout/TOOLS_INTEGRATION.md +0 -216
  51. package/src/layouts/UILayout/components/AutoComponentDemo.tsx +0 -77
  52. package/src/layouts/UILayout/components/CategoryRenderer.tsx +0 -45
  53. package/src/layouts/UILayout/components/TailwindGuideRenderer.tsx +0 -138
  54. package/src/layouts/UILayout/components/index.ts +0 -15
  55. package/src/layouts/UILayout/components/layout/Header/CopyAIButton.tsx +0 -58
  56. package/src/layouts/UILayout/components/layout/Header/Header.tsx +0 -60
  57. package/src/layouts/UILayout/components/layout/Header/HeaderDesktop.tsx +0 -51
  58. package/src/layouts/UILayout/components/layout/Header/HeaderMobile.tsx +0 -71
  59. package/src/layouts/UILayout/components/layout/Header/TestValidationButton.tsx +0 -268
  60. package/src/layouts/UILayout/components/layout/Header/index.ts +0 -11
  61. package/src/layouts/UILayout/components/layout/MobileOverlay/MobileOverlay.tsx +0 -47
  62. package/src/layouts/UILayout/components/layout/MobileOverlay/index.ts +0 -6
  63. package/src/layouts/UILayout/components/layout/Sidebar/Sidebar.tsx +0 -95
  64. package/src/layouts/UILayout/components/layout/Sidebar/SidebarCategory.tsx +0 -54
  65. package/src/layouts/UILayout/components/layout/Sidebar/SidebarContent.tsx +0 -93
  66. package/src/layouts/UILayout/components/layout/Sidebar/SidebarFooter.tsx +0 -49
  67. package/src/layouts/UILayout/components/layout/Sidebar/index.ts +0 -9
  68. package/src/layouts/UILayout/components/layout/index.ts +0 -8
  69. package/src/layouts/UILayout/components/shared/Badge/CountBadge.tsx +0 -38
  70. package/src/layouts/UILayout/components/shared/Badge/index.ts +0 -5
  71. package/src/layouts/UILayout/components/shared/CodeBlock/CodeBlock.tsx +0 -48
  72. package/src/layouts/UILayout/components/shared/CodeBlock/CopyButton.tsx +0 -49
  73. package/src/layouts/UILayout/components/shared/CodeBlock/index.ts +0 -6
  74. package/src/layouts/UILayout/components/shared/Section/Section.tsx +0 -63
  75. package/src/layouts/UILayout/components/shared/Section/index.ts +0 -5
  76. package/src/layouts/UILayout/components/shared/index.ts +0 -8
  77. package/src/layouts/UILayout/config/ai-export.config.ts +0 -89
  78. package/src/layouts/UILayout/config/categories.config.tsx +0 -122
  79. package/src/layouts/UILayout/config/components/blocks.config.tsx +0 -239
  80. package/src/layouts/UILayout/config/components/data.config.tsx +0 -433
  81. package/src/layouts/UILayout/config/components/feedback.config.tsx +0 -290
  82. package/src/layouts/UILayout/config/components/forms.config.tsx +0 -996
  83. package/src/layouts/UILayout/config/components/hooks.config.tsx +0 -168
  84. package/src/layouts/UILayout/config/components/index.ts +0 -72
  85. package/src/layouts/UILayout/config/components/layout.config.tsx +0 -246
  86. package/src/layouts/UILayout/config/components/navigation.config.tsx +0 -352
  87. package/src/layouts/UILayout/config/components/overlay.config.tsx +0 -569
  88. package/src/layouts/UILayout/config/components/specialized.config.tsx +0 -400
  89. package/src/layouts/UILayout/config/components/tools.config.tsx +0 -234
  90. package/src/layouts/UILayout/config/components/types.ts +0 -14
  91. package/src/layouts/UILayout/config/index.ts +0 -42
  92. package/src/layouts/UILayout/config/tailwind.config.ts +0 -131
  93. package/src/layouts/UILayout/constants.ts +0 -23
  94. package/src/layouts/UILayout/context/ShowcaseContext.tsx +0 -81
  95. package/src/layouts/UILayout/context/index.ts +0 -1
  96. package/src/layouts/UILayout/core/UIGuideApp.client.tsx +0 -18
  97. package/src/layouts/UILayout/core/UIGuideApp.tsx +0 -33
  98. package/src/layouts/UILayout/core/UIGuideLanding.tsx +0 -172
  99. package/src/layouts/UILayout/core/UIGuideView.tsx +0 -61
  100. package/src/layouts/UILayout/core/UILayout.tsx +0 -125
  101. package/src/layouts/UILayout/core/UILayoutSidebar.tsx +0 -11
  102. package/src/layouts/UILayout/core/index.ts +0 -10
  103. package/src/layouts/UILayout/hooks/index.ts +0 -9
  104. package/src/layouts/UILayout/hooks/useAIExport.ts +0 -78
  105. package/src/layouts/UILayout/hooks/useCategoryNavigation.ts +0 -92
  106. package/src/layouts/UILayout/hooks/useComponentSearch.ts +0 -81
  107. package/src/layouts/UILayout/hooks/useSidebarState.ts +0 -36
  108. package/src/layouts/UILayout/index.ts +0 -160
  109. package/src/layouts/UILayout/types/component.ts +0 -45
  110. package/src/layouts/UILayout/types/index.ts +0 -23
  111. package/src/layouts/UILayout/types/layout.ts +0 -57
  112. package/src/layouts/UILayout/types/navigation.ts +0 -33
  113. package/src/layouts/UILayout/utils/ai-export/formatters.ts +0 -71
  114. package/src/layouts/UILayout/utils/ai-export/index.ts +0 -5
  115. package/src/layouts/UILayout/utils/component-helpers/filter.ts +0 -109
  116. package/src/layouts/UILayout/utils/component-helpers/index.ts +0 -6
  117. package/src/layouts/UILayout/utils/component-helpers/search.ts +0 -95
  118. package/src/layouts/UILayout/utils/index.ts +0 -6
@@ -1,569 +0,0 @@
1
- /**
2
- * Overlay Components Configuration
3
- */
4
-
5
- import React from 'react';
6
- import {
7
- Dialog,
8
- DialogContent,
9
- DialogDescription,
10
- DialogFooter,
11
- DialogHeader,
12
- DialogTitle,
13
- DialogTrigger,
14
- AlertDialog,
15
- AlertDialogAction,
16
- AlertDialogCancel,
17
- AlertDialogContent,
18
- AlertDialogDescription,
19
- AlertDialogFooter,
20
- AlertDialogHeader,
21
- AlertDialogTitle,
22
- AlertDialogTrigger,
23
- Sheet,
24
- SheetClose,
25
- SheetContent,
26
- SheetDescription,
27
- SheetFooter,
28
- SheetHeader,
29
- SheetTitle,
30
- SheetTrigger,
31
- Drawer,
32
- DrawerClose,
33
- DrawerContent,
34
- DrawerDescription,
35
- DrawerFooter,
36
- DrawerHeader,
37
- DrawerTitle,
38
- DrawerTrigger,
39
- Popover,
40
- PopoverContent,
41
- PopoverTrigger,
42
- HoverCard,
43
- HoverCardContent,
44
- HoverCardTrigger,
45
- Tooltip,
46
- TooltipContent,
47
- TooltipProvider,
48
- TooltipTrigger,
49
- Command,
50
- CommandEmpty,
51
- CommandGroup,
52
- CommandInput,
53
- CommandItem,
54
- CommandList,
55
- ContextMenu,
56
- ContextMenuContent,
57
- ContextMenuItem,
58
- ContextMenuTrigger,
59
- DropdownMenu,
60
- DropdownMenuContent,
61
- DropdownMenuItem,
62
- DropdownMenuLabel,
63
- DropdownMenuSeparator,
64
- DropdownMenuTrigger,
65
- Menubar,
66
- MenubarContent,
67
- MenubarItem,
68
- MenubarMenu,
69
- MenubarSeparator,
70
- MenubarTrigger,
71
- Button,
72
- } from '@djangocfg/ui';
73
- import type { ComponentConfig } from './types';
74
-
75
- export const OVERLAY_COMPONENTS: ComponentConfig[] = [
76
- {
77
- name: 'Dialog',
78
- category: 'overlay',
79
- description: 'Modal dialog for important user interactions',
80
- importPath: `import {
81
- Dialog,
82
- DialogContent,
83
- DialogDescription,
84
- DialogFooter,
85
- DialogHeader,
86
- DialogTitle,
87
- DialogTrigger,
88
- Button,
89
- } from '@djangocfg/ui';`,
90
- example: `<Dialog>
91
- <DialogTrigger asChild>
92
- <Button variant="outline">Open Dialog</Button>
93
- </DialogTrigger>
94
- <DialogContent>
95
- <DialogHeader>
96
- <DialogTitle>Are you sure?</DialogTitle>
97
- <DialogDescription>
98
- This action cannot be undone.
99
- </DialogDescription>
100
- </DialogHeader>
101
- <DialogFooter>
102
- <Button type="submit">Confirm</Button>
103
- </DialogFooter>
104
- </DialogContent>
105
- </Dialog>`,
106
- preview: (
107
- <Dialog>
108
- <DialogTrigger asChild>
109
- <Button variant="outline">Open Dialog</Button>
110
- </DialogTrigger>
111
- <DialogContent>
112
- <DialogHeader>
113
- <DialogTitle>Are you sure?</DialogTitle>
114
- <DialogDescription>
115
- This action cannot be undone.
116
- </DialogDescription>
117
- </DialogHeader>
118
- <DialogFooter>
119
- <Button type="submit">Confirm</Button>
120
- </DialogFooter>
121
- </DialogContent>
122
- </Dialog>
123
- ),
124
- },
125
- {
126
- name: 'AlertDialog',
127
- category: 'overlay',
128
- description: 'Confirmation dialog for critical actions',
129
- importPath: `import {
130
- AlertDialog,
131
- AlertDialogAction,
132
- AlertDialogCancel,
133
- AlertDialogContent,
134
- AlertDialogDescription,
135
- AlertDialogFooter,
136
- AlertDialogHeader,
137
- AlertDialogTitle,
138
- AlertDialogTrigger,
139
- Button,
140
- } from '@djangocfg/ui';`,
141
- example: `<AlertDialog>
142
- <AlertDialogTrigger asChild>
143
- <Button variant="destructive">Delete Account</Button>
144
- </AlertDialogTrigger>
145
- <AlertDialogContent>
146
- <AlertDialogHeader>
147
- <AlertDialogTitle>Are you absolutely sure?</AlertDialogTitle>
148
- <AlertDialogDescription>
149
- This action cannot be undone. This will permanently delete your
150
- account and remove your data from our servers.
151
- </AlertDialogDescription>
152
- </AlertDialogHeader>
153
- <AlertDialogFooter>
154
- <AlertDialogCancel>Cancel</AlertDialogCancel>
155
- <AlertDialogAction>Continue</AlertDialogAction>
156
- </AlertDialogFooter>
157
- </AlertDialogContent>
158
- </AlertDialog>`,
159
- preview: (
160
- <AlertDialog>
161
- <AlertDialogTrigger asChild>
162
- <Button variant="destructive">Delete Account</Button>
163
- </AlertDialogTrigger>
164
- <AlertDialogContent>
165
- <AlertDialogHeader>
166
- <AlertDialogTitle>Are you absolutely sure?</AlertDialogTitle>
167
- <AlertDialogDescription>
168
- This action cannot be undone. This will permanently delete your
169
- account and remove your data from our servers.
170
- </AlertDialogDescription>
171
- </AlertDialogHeader>
172
- <AlertDialogFooter>
173
- <AlertDialogCancel>Cancel</AlertDialogCancel>
174
- <AlertDialogAction>Continue</AlertDialogAction>
175
- </AlertDialogFooter>
176
- </AlertDialogContent>
177
- </AlertDialog>
178
- ),
179
- },
180
- {
181
- name: 'Sheet',
182
- category: 'overlay',
183
- description: 'Slide-out panel from the edge of the screen',
184
- importPath: `import {
185
- Sheet,
186
- SheetClose,
187
- SheetContent,
188
- SheetDescription,
189
- SheetFooter,
190
- SheetHeader,
191
- SheetTitle,
192
- SheetTrigger,
193
- Button,
194
- } from '@djangocfg/ui';`,
195
- example: `<Sheet>
196
- <SheetTrigger asChild>
197
- <Button variant="outline">Open Sheet</Button>
198
- </SheetTrigger>
199
- <SheetContent>
200
- <SheetHeader>
201
- <SheetTitle>Edit profile</SheetTitle>
202
- <SheetDescription>
203
- Make changes to your profile here.
204
- </SheetDescription>
205
- </SheetHeader>
206
- <div className="grid gap-4 py-4">
207
- <p>Sheet content goes here.</p>
208
- </div>
209
- <SheetFooter>
210
- <SheetClose asChild>
211
- <Button type="submit">Save changes</Button>
212
- </SheetClose>
213
- </SheetFooter>
214
- </SheetContent>
215
- </Sheet>`,
216
- preview: (
217
- <Sheet>
218
- <SheetTrigger asChild>
219
- <Button variant="outline">Open Sheet</Button>
220
- </SheetTrigger>
221
- <SheetContent>
222
- <SheetHeader>
223
- <SheetTitle>Edit profile</SheetTitle>
224
- <SheetDescription>
225
- Make changes to your profile here.
226
- </SheetDescription>
227
- </SheetHeader>
228
- <div className="grid gap-4 py-4">
229
- <p>Sheet content goes here.</p>
230
- </div>
231
- <SheetFooter>
232
- <SheetClose asChild>
233
- <Button type="submit">Save changes</Button>
234
- </SheetClose>
235
- </SheetFooter>
236
- </SheetContent>
237
- </Sheet>
238
- ),
239
- },
240
- {
241
- name: 'Drawer',
242
- category: 'overlay',
243
- description: 'Mobile-friendly drawer component',
244
- importPath: `import {
245
- Drawer,
246
- DrawerClose,
247
- DrawerContent,
248
- DrawerDescription,
249
- DrawerFooter,
250
- DrawerHeader,
251
- DrawerTitle,
252
- DrawerTrigger,
253
- Button,
254
- } from '@djangocfg/ui';`,
255
- example: `<Drawer>
256
- <DrawerTrigger asChild>
257
- <Button variant="outline">Open Drawer</Button>
258
- </DrawerTrigger>
259
- <DrawerContent>
260
- <DrawerHeader>
261
- <DrawerTitle>Are you sure?</DrawerTitle>
262
- <DrawerDescription>This action cannot be undone.</DrawerDescription>
263
- </DrawerHeader>
264
- <DrawerFooter>
265
- <Button>Submit</Button>
266
- <DrawerClose asChild>
267
- <Button variant="outline">Cancel</Button>
268
- </DrawerClose>
269
- </DrawerFooter>
270
- </DrawerContent>
271
- </Drawer>`,
272
- preview: (
273
- <Drawer>
274
- <DrawerTrigger asChild>
275
- <Button variant="outline">Open Drawer</Button>
276
- </DrawerTrigger>
277
- <DrawerContent>
278
- <DrawerHeader>
279
- <DrawerTitle>Are you sure?</DrawerTitle>
280
- <DrawerDescription>This action cannot be undone.</DrawerDescription>
281
- </DrawerHeader>
282
- <DrawerFooter>
283
- <Button>Submit</Button>
284
- <DrawerClose asChild>
285
- <Button variant="outline">Cancel</Button>
286
- </DrawerClose>
287
- </DrawerFooter>
288
- </DrawerContent>
289
- </Drawer>
290
- ),
291
- },
292
- {
293
- name: 'Popover',
294
- category: 'overlay',
295
- description: 'Floating popover with rich content',
296
- importPath: `import { Popover, PopoverContent, PopoverTrigger, Button } from '@djangocfg/ui';`,
297
- example: `<Popover>
298
- <PopoverTrigger asChild>
299
- <Button variant="outline">Open Popover</Button>
300
- </PopoverTrigger>
301
- <PopoverContent className="w-80">
302
- <div className="grid gap-4">
303
- <div className="space-y-2">
304
- <h4 className="font-medium leading-none">Dimensions</h4>
305
- <p className="text-sm text-muted-foreground">
306
- Set the dimensions for the layer.
307
- </p>
308
- </div>
309
- </div>
310
- </PopoverContent>
311
- </Popover>`,
312
- preview: (
313
- <Popover>
314
- <PopoverTrigger asChild>
315
- <Button variant="outline">Open Popover</Button>
316
- </PopoverTrigger>
317
- <PopoverContent className="w-80">
318
- <div className="grid gap-4">
319
- <div className="space-y-2">
320
- <h4 className="font-medium leading-none">Dimensions</h4>
321
- <p className="text-sm text-muted-foreground">
322
- Set the dimensions for the layer.
323
- </p>
324
- </div>
325
- </div>
326
- </PopoverContent>
327
- </Popover>
328
- ),
329
- },
330
- {
331
- name: 'HoverCard',
332
- category: 'overlay',
333
- description: 'Card that appears on hover with additional information',
334
- importPath: `import { HoverCard, HoverCardContent, HoverCardTrigger, Button } from '@djangocfg/ui';`,
335
- example: `<HoverCard>
336
- <HoverCardTrigger asChild>
337
- <Button variant="link">@nextjs</Button>
338
- </HoverCardTrigger>
339
- <HoverCardContent className="w-80">
340
- <div className="flex justify-between space-x-4">
341
- <div className="space-y-1">
342
- <h4 className="text-sm font-semibold">@nextjs</h4>
343
- <p className="text-sm">
344
- The React Framework – created and maintained by @vercel.
345
- </p>
346
- </div>
347
- </div>
348
- </HoverCardContent>
349
- </HoverCard>`,
350
- preview: (
351
- <HoverCard>
352
- <HoverCardTrigger asChild>
353
- <Button variant="link">@nextjs</Button>
354
- </HoverCardTrigger>
355
- <HoverCardContent className="w-80">
356
- <div className="flex justify-between space-x-4">
357
- <div className="space-y-1">
358
- <h4 className="text-sm font-semibold">@nextjs</h4>
359
- <p className="text-sm">
360
- The React Framework – created and maintained by @vercel.
361
- </p>
362
- </div>
363
- </div>
364
- </HoverCardContent>
365
- </HoverCard>
366
- ),
367
- },
368
- {
369
- name: 'Tooltip',
370
- category: 'overlay',
371
- description: 'Simple tooltip that appears on hover',
372
- importPath: `import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Button } from '@djangocfg/ui';`,
373
- example: `<TooltipProvider>
374
- <Tooltip>
375
- <TooltipTrigger asChild>
376
- <Button variant="outline">Hover me</Button>
377
- </TooltipTrigger>
378
- <TooltipContent>
379
- <p>Add to library</p>
380
- </TooltipContent>
381
- </Tooltip>
382
- </TooltipProvider>`,
383
- preview: (
384
- <TooltipProvider>
385
- <Tooltip>
386
- <TooltipTrigger asChild>
387
- <Button variant="outline">Hover me</Button>
388
- </TooltipTrigger>
389
- <TooltipContent>
390
- <p>Add to library</p>
391
- </TooltipContent>
392
- </Tooltip>
393
- </TooltipProvider>
394
- ),
395
- },
396
- {
397
- name: 'Command',
398
- category: 'overlay',
399
- description: 'Command palette for quick actions and navigation',
400
- importPath: `import {
401
- Command,
402
- CommandEmpty,
403
- CommandGroup,
404
- CommandInput,
405
- CommandItem,
406
- CommandList,
407
- } from '@djangocfg/ui';`,
408
- example: `<Command className="rounded-lg border shadow-md">
409
- <CommandInput placeholder="Type a command or search..." />
410
- <CommandList>
411
- <CommandEmpty>No results found.</CommandEmpty>
412
- <CommandGroup heading="Suggestions">
413
- <CommandItem>Calendar</CommandItem>
414
- <CommandItem>Search Emoji</CommandItem>
415
- <CommandItem>Calculator</CommandItem>
416
- </CommandGroup>
417
- </CommandList>
418
- </Command>`,
419
- preview: (
420
- <Command className="rounded-lg border shadow-md">
421
- <CommandInput placeholder="Type a command or search..." />
422
- <CommandList>
423
- <CommandEmpty>No results found.</CommandEmpty>
424
- <CommandGroup heading="Suggestions">
425
- <CommandItem>Calendar</CommandItem>
426
- <CommandItem>Search Emoji</CommandItem>
427
- <CommandItem>Calculator</CommandItem>
428
- </CommandGroup>
429
- </CommandList>
430
- </Command>
431
- ),
432
- },
433
- {
434
- name: 'ContextMenu',
435
- category: 'overlay',
436
- description: 'Right-click context menu',
437
- importPath: `import {
438
- ContextMenu,
439
- ContextMenuContent,
440
- ContextMenuItem,
441
- ContextMenuTrigger,
442
- } from '@djangocfg/ui';`,
443
- example: `<ContextMenu>
444
- <ContextMenuTrigger className="flex h-[150px] w-[300px] items-center justify-center rounded-md border border-dashed text-sm">
445
- Right click here
446
- </ContextMenuTrigger>
447
- <ContextMenuContent className="w-64">
448
- <ContextMenuItem>Back</ContextMenuItem>
449
- <ContextMenuItem>Forward</ContextMenuItem>
450
- <ContextMenuItem>Reload</ContextMenuItem>
451
- </ContextMenuContent>
452
- </ContextMenu>`,
453
- preview: (
454
- <ContextMenu>
455
- <ContextMenuTrigger className="flex h-[150px] w-[300px] items-center justify-center rounded-md border border-dashed text-sm">
456
- Right click here
457
- </ContextMenuTrigger>
458
- <ContextMenuContent className="w-64">
459
- <ContextMenuItem>Back</ContextMenuItem>
460
- <ContextMenuItem>Forward</ContextMenuItem>
461
- <ContextMenuItem>Reload</ContextMenuItem>
462
- </ContextMenuContent>
463
- </ContextMenu>
464
- ),
465
- },
466
- {
467
- name: 'DropdownMenu',
468
- category: 'overlay',
469
- description: 'Dropdown menu for actions and options with Next.js router support',
470
- importPath: `import {
471
- DropdownMenu,
472
- DropdownMenuContent,
473
- DropdownMenuItem,
474
- DropdownMenuLabel,
475
- DropdownMenuSeparator,
476
- DropdownMenuTrigger,
477
- Button,
478
- } from '@djangocfg/ui';`,
479
- example: `<DropdownMenu>
480
- <DropdownMenuTrigger asChild>
481
- <Button variant="outline">Open Menu</Button>
482
- </DropdownMenuTrigger>
483
- <DropdownMenuContent className="w-56">
484
- <DropdownMenuLabel>My Account</DropdownMenuLabel>
485
- <DropdownMenuSeparator />
486
- {/* DropdownMenuItem with href automatically uses Next.js Link */}
487
- <DropdownMenuItem href="/profile">Profile</DropdownMenuItem>
488
- <DropdownMenuItem href="/billing">Billing</DropdownMenuItem>
489
- <DropdownMenuItem href="/settings">Settings</DropdownMenuItem>
490
- <DropdownMenuSeparator />
491
- {/* Without href - for actions */}
492
- <DropdownMenuItem onClick={() => console.log('Logout')}>
493
- Logout
494
- </DropdownMenuItem>
495
- </DropdownMenuContent>
496
- </DropdownMenu>`,
497
- preview: (
498
- <DropdownMenu>
499
- <DropdownMenuTrigger asChild>
500
- <Button variant="outline">Open Menu</Button>
501
- </DropdownMenuTrigger>
502
- <DropdownMenuContent className="w-56">
503
- <DropdownMenuLabel>My Account</DropdownMenuLabel>
504
- <DropdownMenuSeparator />
505
- <DropdownMenuItem>Profile</DropdownMenuItem>
506
- <DropdownMenuItem>Billing</DropdownMenuItem>
507
- <DropdownMenuItem>Settings</DropdownMenuItem>
508
- </DropdownMenuContent>
509
- </DropdownMenu>
510
- ),
511
- },
512
- {
513
- name: 'Menubar',
514
- category: 'overlay',
515
- description: 'Application menubar with multiple menu groups and Next.js router support',
516
- importPath: `import {
517
- Menubar,
518
- MenubarContent,
519
- MenubarItem,
520
- MenubarMenu,
521
- MenubarSeparator,
522
- MenubarTrigger,
523
- } from '@djangocfg/ui';`,
524
- example: `<Menubar>
525
- <MenubarMenu>
526
- <MenubarTrigger>File</MenubarTrigger>
527
- <MenubarContent>
528
- {/* MenubarItem with href automatically uses Next.js Link */}
529
- <MenubarItem href="/new">New Tab</MenubarItem>
530
- <MenubarItem href="/window">New Window</MenubarItem>
531
- <MenubarSeparator />
532
- <MenubarItem href="/share">Share</MenubarItem>
533
- <MenubarSeparator />
534
- {/* Without href - for actions */}
535
- <MenubarItem onClick={() => window.print()}>Print</MenubarItem>
536
- </MenubarContent>
537
- </MenubarMenu>
538
- <MenubarMenu>
539
- <MenubarTrigger>Edit</MenubarTrigger>
540
- <MenubarContent>
541
- <MenubarItem onClick={() => document.execCommand('undo')}>Undo</MenubarItem>
542
- <MenubarItem onClick={() => document.execCommand('redo')}>Redo</MenubarItem>
543
- </MenubarContent>
544
- </MenubarMenu>
545
- </Menubar>`,
546
- preview: (
547
- <Menubar>
548
- <MenubarMenu>
549
- <MenubarTrigger>File</MenubarTrigger>
550
- <MenubarContent>
551
- <MenubarItem>New Tab</MenubarItem>
552
- <MenubarItem>New Window</MenubarItem>
553
- <MenubarSeparator />
554
- <MenubarItem>Share</MenubarItem>
555
- <MenubarSeparator />
556
- <MenubarItem>Print</MenubarItem>
557
- </MenubarContent>
558
- </MenubarMenu>
559
- <MenubarMenu>
560
- <MenubarTrigger>Edit</MenubarTrigger>
561
- <MenubarContent>
562
- <MenubarItem>Undo</MenubarItem>
563
- <MenubarItem>Redo</MenubarItem>
564
- </MenubarContent>
565
- </MenubarMenu>
566
- </Menubar>
567
- ),
568
- },
569
- ];