@djangocfg/layouts 1.4.26 → 1.4.28

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 (79) hide show
  1. package/package.json +5 -5
  2. package/src/auth/middlewares/index.ts +1 -1
  3. package/src/auth/middlewares/proxy.ts +10 -2
  4. package/src/layouts/index.ts +0 -3
  5. package/src/snippets/ContactForm/ContactForm.tsx +59 -12
  6. package/src/snippets/ContactForm/ContactPage.tsx +21 -20
  7. package/src/snippets/ContactForm/dynamic.tsx +55 -0
  8. package/src/snippets/ContactForm/index.ts +6 -3
  9. package/src/layouts/UILayout/README.md +0 -267
  10. package/src/layouts/UILayout/SUMMARY.md +0 -298
  11. package/src/layouts/UILayout/TOOLS_INTEGRATION.md +0 -216
  12. package/src/layouts/UILayout/components/AutoComponentDemo.tsx +0 -77
  13. package/src/layouts/UILayout/components/CategoryRenderer.tsx +0 -45
  14. package/src/layouts/UILayout/components/TailwindGuideRenderer.tsx +0 -138
  15. package/src/layouts/UILayout/components/index.ts +0 -15
  16. package/src/layouts/UILayout/components/layout/Header/CopyAIButton.tsx +0 -58
  17. package/src/layouts/UILayout/components/layout/Header/Header.tsx +0 -60
  18. package/src/layouts/UILayout/components/layout/Header/HeaderDesktop.tsx +0 -51
  19. package/src/layouts/UILayout/components/layout/Header/HeaderMobile.tsx +0 -71
  20. package/src/layouts/UILayout/components/layout/Header/TestValidationButton.tsx +0 -268
  21. package/src/layouts/UILayout/components/layout/Header/index.ts +0 -11
  22. package/src/layouts/UILayout/components/layout/MobileOverlay/MobileOverlay.tsx +0 -47
  23. package/src/layouts/UILayout/components/layout/MobileOverlay/index.ts +0 -6
  24. package/src/layouts/UILayout/components/layout/Sidebar/Sidebar.tsx +0 -95
  25. package/src/layouts/UILayout/components/layout/Sidebar/SidebarCategory.tsx +0 -54
  26. package/src/layouts/UILayout/components/layout/Sidebar/SidebarContent.tsx +0 -93
  27. package/src/layouts/UILayout/components/layout/Sidebar/SidebarFooter.tsx +0 -49
  28. package/src/layouts/UILayout/components/layout/Sidebar/index.ts +0 -9
  29. package/src/layouts/UILayout/components/layout/index.ts +0 -8
  30. package/src/layouts/UILayout/components/shared/Badge/CountBadge.tsx +0 -38
  31. package/src/layouts/UILayout/components/shared/Badge/index.ts +0 -5
  32. package/src/layouts/UILayout/components/shared/CodeBlock/CodeBlock.tsx +0 -48
  33. package/src/layouts/UILayout/components/shared/CodeBlock/CopyButton.tsx +0 -49
  34. package/src/layouts/UILayout/components/shared/CodeBlock/index.ts +0 -6
  35. package/src/layouts/UILayout/components/shared/Section/Section.tsx +0 -63
  36. package/src/layouts/UILayout/components/shared/Section/index.ts +0 -5
  37. package/src/layouts/UILayout/components/shared/index.ts +0 -8
  38. package/src/layouts/UILayout/config/ai-export.config.ts +0 -89
  39. package/src/layouts/UILayout/config/categories.config.tsx +0 -122
  40. package/src/layouts/UILayout/config/components/blocks.config.tsx +0 -239
  41. package/src/layouts/UILayout/config/components/data.config.tsx +0 -433
  42. package/src/layouts/UILayout/config/components/feedback.config.tsx +0 -290
  43. package/src/layouts/UILayout/config/components/forms.config.tsx +0 -996
  44. package/src/layouts/UILayout/config/components/hooks.config.tsx +0 -168
  45. package/src/layouts/UILayout/config/components/index.ts +0 -72
  46. package/src/layouts/UILayout/config/components/layout.config.tsx +0 -246
  47. package/src/layouts/UILayout/config/components/navigation.config.tsx +0 -352
  48. package/src/layouts/UILayout/config/components/overlay.config.tsx +0 -569
  49. package/src/layouts/UILayout/config/components/specialized.config.tsx +0 -400
  50. package/src/layouts/UILayout/config/components/tools.config.tsx +0 -234
  51. package/src/layouts/UILayout/config/components/types.ts +0 -14
  52. package/src/layouts/UILayout/config/index.ts +0 -42
  53. package/src/layouts/UILayout/config/tailwind.config.ts +0 -131
  54. package/src/layouts/UILayout/constants.ts +0 -23
  55. package/src/layouts/UILayout/context/ShowcaseContext.tsx +0 -81
  56. package/src/layouts/UILayout/context/index.ts +0 -1
  57. package/src/layouts/UILayout/core/UIGuideApp.client.tsx +0 -18
  58. package/src/layouts/UILayout/core/UIGuideApp.tsx +0 -33
  59. package/src/layouts/UILayout/core/UIGuideLanding.tsx +0 -172
  60. package/src/layouts/UILayout/core/UIGuideView.tsx +0 -61
  61. package/src/layouts/UILayout/core/UILayout.tsx +0 -125
  62. package/src/layouts/UILayout/core/UILayoutSidebar.tsx +0 -11
  63. package/src/layouts/UILayout/core/index.ts +0 -10
  64. package/src/layouts/UILayout/hooks/index.ts +0 -9
  65. package/src/layouts/UILayout/hooks/useAIExport.ts +0 -78
  66. package/src/layouts/UILayout/hooks/useCategoryNavigation.ts +0 -92
  67. package/src/layouts/UILayout/hooks/useComponentSearch.ts +0 -81
  68. package/src/layouts/UILayout/hooks/useSidebarState.ts +0 -36
  69. package/src/layouts/UILayout/index.ts +0 -160
  70. package/src/layouts/UILayout/types/component.ts +0 -45
  71. package/src/layouts/UILayout/types/index.ts +0 -23
  72. package/src/layouts/UILayout/types/layout.ts +0 -57
  73. package/src/layouts/UILayout/types/navigation.ts +0 -33
  74. package/src/layouts/UILayout/utils/ai-export/formatters.ts +0 -71
  75. package/src/layouts/UILayout/utils/ai-export/index.ts +0 -5
  76. package/src/layouts/UILayout/utils/component-helpers/filter.ts +0 -109
  77. package/src/layouts/UILayout/utils/component-helpers/index.ts +0 -6
  78. package/src/layouts/UILayout/utils/component-helpers/search.ts +0 -95
  79. package/src/layouts/UILayout/utils/index.ts +0 -6
@@ -1,433 +0,0 @@
1
- /**
2
- * Data Display Components Configuration
3
- */
4
-
5
- import React from 'react';
6
- import {
7
- Table,
8
- TableBody,
9
- TableCaption,
10
- TableCell,
11
- TableHead,
12
- TableHeader,
13
- TableRow,
14
- Accordion,
15
- AccordionContent,
16
- AccordionItem,
17
- AccordionTrigger,
18
- Collapsible,
19
- CollapsibleContent,
20
- CollapsibleTrigger,
21
- Toggle,
22
- ToggleGroup,
23
- ToggleGroupItem,
24
- Calendar,
25
- Carousel,
26
- CarouselContent,
27
- CarouselItem,
28
- CarouselNext,
29
- CarouselPrevious,
30
- ChartContainer,
31
- ChartTooltip,
32
- ChartTooltipContent,
33
- ChartLegend,
34
- ChartLegendContent,
35
- } from '@djangocfg/ui';
36
- import type { ComponentConfig } from './types';
37
-
38
- export const DATA_COMPONENTS: ComponentConfig[] = [
39
- {
40
- name: 'Table',
41
- category: 'data',
42
- description: 'Responsive data table component',
43
- importPath: `import {
44
- Table,
45
- TableBody,
46
- TableCaption,
47
- TableCell,
48
- TableHead,
49
- TableHeader,
50
- TableRow,
51
- } from '@djangocfg/ui';`,
52
- example: `<Table>
53
- <TableCaption>A list of your recent invoices.</TableCaption>
54
- <TableHeader>
55
- <TableRow>
56
- <TableHead>Invoice</TableHead>
57
- <TableHead>Status</TableHead>
58
- <TableHead>Method</TableHead>
59
- <TableHead className="text-right">Amount</TableHead>
60
- </TableRow>
61
- </TableHeader>
62
- <TableBody>
63
- <TableRow>
64
- <TableCell className="font-medium">INV001</TableCell>
65
- <TableCell>Paid</TableCell>
66
- <TableCell>Credit Card</TableCell>
67
- <TableCell className="text-right">$250.00</TableCell>
68
- </TableRow>
69
- <TableRow>
70
- <TableCell className="font-medium">INV002</TableCell>
71
- <TableCell>Pending</TableCell>
72
- <TableCell>PayPal</TableCell>
73
- <TableCell className="text-right">$150.00</TableCell>
74
- </TableRow>
75
- </TableBody>
76
- </Table>`,
77
- preview: (
78
- <Table>
79
- <TableCaption>A list of your recent invoices.</TableCaption>
80
- <TableHeader>
81
- <TableRow>
82
- <TableHead>Invoice</TableHead>
83
- <TableHead>Status</TableHead>
84
- <TableHead>Method</TableHead>
85
- <TableHead className="text-right">Amount</TableHead>
86
- </TableRow>
87
- </TableHeader>
88
- <TableBody>
89
- <TableRow>
90
- <TableCell className="font-medium">INV001</TableCell>
91
- <TableCell>Paid</TableCell>
92
- <TableCell>Credit Card</TableCell>
93
- <TableCell className="text-right">$250.00</TableCell>
94
- </TableRow>
95
- <TableRow>
96
- <TableCell className="font-medium">INV002</TableCell>
97
- <TableCell>Pending</TableCell>
98
- <TableCell>PayPal</TableCell>
99
- <TableCell className="text-right">$150.00</TableCell>
100
- </TableRow>
101
- <TableRow>
102
- <TableCell className="font-medium">INV003</TableCell>
103
- <TableCell>Unpaid</TableCell>
104
- <TableCell>Bank Transfer</TableCell>
105
- <TableCell className="text-right">$350.00</TableCell>
106
- </TableRow>
107
- </TableBody>
108
- </Table>
109
- ),
110
- },
111
- {
112
- name: 'Accordion',
113
- category: 'data',
114
- description: 'Vertically stacked set of collapsible sections',
115
- importPath: `import {
116
- Accordion,
117
- AccordionContent,
118
- AccordionItem,
119
- AccordionTrigger,
120
- } from '@djangocfg/ui';`,
121
- example: `<Accordion type="single" collapsible className="w-full">
122
- <AccordionItem value="item-1">
123
- <AccordionTrigger>Is it accessible?</AccordionTrigger>
124
- <AccordionContent>
125
- Yes. It adheres to the WAI-ARIA design pattern.
126
- </AccordionContent>
127
- </AccordionItem>
128
- <AccordionItem value="item-2">
129
- <AccordionTrigger>Is it styled?</AccordionTrigger>
130
- <AccordionContent>
131
- Yes. It comes with default styles that matches the aesthetic.
132
- </AccordionContent>
133
- </AccordionItem>
134
- <AccordionItem value="item-3">
135
- <AccordionTrigger>Is it animated?</AccordionTrigger>
136
- <AccordionContent>
137
- Yes. It's animated by default, but you can disable it if you prefer.
138
- </AccordionContent>
139
- </AccordionItem>
140
- </Accordion>`,
141
- preview: (
142
- <Accordion type="single" collapsible className="w-full">
143
- <AccordionItem value="item-1">
144
- <AccordionTrigger>Is it accessible?</AccordionTrigger>
145
- <AccordionContent>
146
- Yes. It adheres to the WAI-ARIA design pattern.
147
- </AccordionContent>
148
- </AccordionItem>
149
- <AccordionItem value="item-2">
150
- <AccordionTrigger>Is it styled?</AccordionTrigger>
151
- <AccordionContent>
152
- Yes. It comes with default styles that matches the aesthetic.
153
- </AccordionContent>
154
- </AccordionItem>
155
- <AccordionItem value="item-3">
156
- <AccordionTrigger>Is it animated?</AccordionTrigger>
157
- <AccordionContent>
158
- Yes. It's animated by default, but you can disable it if you prefer.
159
- </AccordionContent>
160
- </AccordionItem>
161
- </Accordion>
162
- ),
163
- },
164
- {
165
- name: 'Collapsible',
166
- category: 'data',
167
- description: 'Simple collapsible content panel',
168
- importPath: `import {
169
- Collapsible,
170
- CollapsibleContent,
171
- CollapsibleTrigger,
172
- } from '@djangocfg/ui';`,
173
- example: `<Collapsible className="w-full max-w-md space-y-2">
174
- <CollapsibleTrigger className="flex items-center justify-between w-full p-4 bg-muted rounded-md">
175
- <span className="font-medium">Can I use this in my project?</span>
176
- <ChevronDown className="h-4 w-4" />
177
- </CollapsibleTrigger>
178
- <CollapsibleContent className="p-4 bg-muted/50 rounded-md">
179
- <p className="text-sm text-muted-foreground">
180
- Yes! This component is free to use in your projects.
181
- </p>
182
- </CollapsibleContent>
183
- </Collapsible>`,
184
- preview: (
185
- <Collapsible className="w-full max-w-md space-y-2">
186
- <CollapsibleTrigger className="flex items-center justify-between w-full p-4 bg-muted rounded-md">
187
- <span className="font-medium">Can I use this in my project?</span>
188
- <svg className="h-4 w-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
189
- <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M19 9l-7 7-7-7" />
190
- </svg>
191
- </CollapsibleTrigger>
192
- <CollapsibleContent className="p-4 bg-muted/50 rounded-md">
193
- <p className="text-sm text-muted-foreground">
194
- Yes! This component is free to use in your projects. It's built with
195
- Radix UI primitives and Tailwind CSS.
196
- </p>
197
- </CollapsibleContent>
198
- </Collapsible>
199
- ),
200
- },
201
- {
202
- name: 'Toggle',
203
- category: 'data',
204
- description: 'Two-state button for on/off interactions',
205
- importPath: `import { Toggle } from '@djangocfg/ui';`,
206
- example: `<div className="flex gap-2">
207
- <Toggle aria-label="Toggle bold">
208
- <Bold className="h-4 w-4" />
209
- </Toggle>
210
- <Toggle aria-label="Toggle italic">
211
- <Italic className="h-4 w-4" />
212
- </Toggle>
213
- <Toggle aria-label="Toggle underline">
214
- <Underline className="h-4 w-4" />
215
- </Toggle>
216
- </div>`,
217
- preview: (
218
- <div className="flex gap-2">
219
- <Toggle aria-label="Toggle bold">
220
- <svg className="h-4 w-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
221
- <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M6 12h12M6 6h12M6 18h12" />
222
- </svg>
223
- </Toggle>
224
- <Toggle aria-label="Toggle italic">
225
- <svg className="h-4 w-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
226
- <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4" />
227
- </svg>
228
- </Toggle>
229
- <Toggle aria-label="Toggle underline">
230
- <svg className="h-4 w-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
231
- <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M6 12h.01M12 12h.01M18 12h.01" />
232
- </svg>
233
- </Toggle>
234
- </div>
235
- ),
236
- },
237
- {
238
- name: 'ToggleGroup',
239
- category: 'data',
240
- description: 'Group of toggle buttons with single or multiple selection',
241
- importPath: `import { ToggleGroup, ToggleGroupItem } from '@djangocfg/ui';`,
242
- example: `<div className="space-y-4">
243
- <div>
244
- <p className="text-sm font-medium mb-2">Single Selection</p>
245
- <ToggleGroup type="single">
246
- <ToggleGroupItem value="bold" aria-label="Toggle bold">
247
- <Bold className="h-4 w-4" />
248
- </ToggleGroupItem>
249
- <ToggleGroupItem value="italic" aria-label="Toggle italic">
250
- <Italic className="h-4 w-4" />
251
- </ToggleGroupItem>
252
- <ToggleGroupItem value="underline" aria-label="Toggle underline">
253
- <Underline className="h-4 w-4" />
254
- </ToggleGroupItem>
255
- </ToggleGroup>
256
- </div>
257
-
258
- <div>
259
- <p className="text-sm font-medium mb-2">Multiple Selection</p>
260
- <ToggleGroup type="multiple">
261
- <ToggleGroupItem value="bold" aria-label="Toggle bold">
262
- <Bold className="h-4 w-4" />
263
- </ToggleGroupItem>
264
- <ToggleGroupItem value="italic" aria-label="Toggle italic">
265
- <Italic className="h-4 w-4" />
266
- </ToggleGroupItem>
267
- <ToggleGroupItem value="underline" aria-label="Toggle underline">
268
- <Underline className="h-4 w-4" />
269
- </ToggleGroupItem>
270
- </ToggleGroup>
271
- </div>
272
- </div>`,
273
- preview: (
274
- <div className="space-y-4">
275
- <div>
276
- <p className="text-sm font-medium mb-2">Single Selection</p>
277
- <ToggleGroup type="single">
278
- <ToggleGroupItem value="bold" aria-label="Toggle bold">
279
- <svg className="h-4 w-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
280
- <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M6 12h12" />
281
- </svg>
282
- </ToggleGroupItem>
283
- <ToggleGroupItem value="italic" aria-label="Toggle italic">
284
- <svg className="h-4 w-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
285
- <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M10 20l4-16" />
286
- </svg>
287
- </ToggleGroupItem>
288
- <ToggleGroupItem value="underline" aria-label="Toggle underline">
289
- <svg className="h-4 w-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
290
- <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M6 18h12" />
291
- </svg>
292
- </ToggleGroupItem>
293
- </ToggleGroup>
294
- </div>
295
-
296
- <div>
297
- <p className="text-sm font-medium mb-2">Multiple Selection</p>
298
- <ToggleGroup type="multiple">
299
- <ToggleGroupItem value="bold" aria-label="Toggle bold">
300
- <svg className="h-4 w-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
301
- <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M6 12h12" />
302
- </svg>
303
- </ToggleGroupItem>
304
- <ToggleGroupItem value="italic" aria-label="Toggle italic">
305
- <svg className="h-4 w-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
306
- <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M10 20l4-16" />
307
- </svg>
308
- </ToggleGroupItem>
309
- <ToggleGroupItem value="underline" aria-label="Toggle underline">
310
- <svg className="h-4 w-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
311
- <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M6 18h12" />
312
- </svg>
313
- </ToggleGroupItem>
314
- </ToggleGroup>
315
- </div>
316
- </div>
317
- ),
318
- },
319
- {
320
- name: 'Calendar',
321
- category: 'data',
322
- description: 'Date picker calendar component',
323
- importPath: `import { Calendar } from '@djangocfg/ui';`,
324
- example: `<Calendar
325
- mode="single"
326
- selected={date}
327
- onSelect={setDate}
328
- className="rounded-md border"
329
- />`,
330
- preview: (
331
- <Calendar
332
- mode="single"
333
- className="rounded-md border"
334
- />
335
- ),
336
- },
337
- {
338
- name: 'Carousel',
339
- category: 'data',
340
- description: 'Image and content carousel with navigation',
341
- importPath: `import {
342
- Carousel,
343
- CarouselContent,
344
- CarouselItem,
345
- CarouselNext,
346
- CarouselPrevious,
347
- } from '@djangocfg/ui';`,
348
- example: `<Carousel className="w-full max-w-xs">
349
- <CarouselContent>
350
- <CarouselItem>
351
- <div className="p-6 border rounded-md">
352
- <span className="text-4xl font-semibold">1</span>
353
- </div>
354
- </CarouselItem>
355
- <CarouselItem>
356
- <div className="p-6 border rounded-md">
357
- <span className="text-4xl font-semibold">2</span>
358
- </div>
359
- </CarouselItem>
360
- <CarouselItem>
361
- <div className="p-6 border rounded-md">
362
- <span className="text-4xl font-semibold">3</span>
363
- </div>
364
- </CarouselItem>
365
- </CarouselContent>
366
- <CarouselPrevious />
367
- <CarouselNext />
368
- </Carousel>`,
369
- preview: (
370
- <Carousel className="w-full max-w-xs">
371
- <CarouselContent>
372
- {Array.from({ length: 5 }).map((_, index) => (
373
- <CarouselItem key={index}>
374
- <div className="p-6 border rounded-md bg-muted/50">
375
- <div className="flex aspect-square items-center justify-center">
376
- <span className="text-4xl font-semibold">{index + 1}</span>
377
- </div>
378
- </div>
379
- </CarouselItem>
380
- ))}
381
- </CarouselContent>
382
- <CarouselPrevious />
383
- <CarouselNext />
384
- </Carousel>
385
- ),
386
- },
387
- {
388
- name: 'Chart',
389
- category: 'data',
390
- description: 'Data visualization charts powered by Recharts',
391
- importPath: `import { ChartContainer, ChartTooltip, ChartTooltipContent, ChartLegend, ChartLegendContent } from '@djangocfg/ui';`,
392
- example: `import { Bar, BarChart, XAxis, YAxis } from 'recharts';
393
-
394
- const chartConfig = {
395
- sales: { label: "Sales", color: "hsl(var(--chart-1))" },
396
- profit: { label: "Profit", color: "hsl(var(--chart-2))" },
397
- };
398
-
399
- const chartData = [
400
- { month: "Jan", sales: 400, profit: 240 },
401
- { month: "Feb", sales: 300, profit: 180 },
402
- { month: "Mar", sales: 500, profit: 300 },
403
- ];
404
-
405
- <ChartContainer config={chartConfig} className="min-h-[200px] w-full">
406
- <BarChart data={chartData}>
407
- <XAxis dataKey="month" />
408
- <YAxis />
409
- <ChartTooltip content={<ChartTooltipContent />} />
410
- <ChartLegend content={<ChartLegendContent />} />
411
- <Bar dataKey="sales" fill="var(--color-sales)" />
412
- <Bar dataKey="profit" fill="var(--color-profit)" />
413
- </BarChart>
414
- </ChartContainer>`,
415
- preview: (
416
- <div className="p-6 border rounded-md bg-muted/50">
417
- <p className="text-sm text-muted-foreground mb-4">
418
- Chart components built on Recharts with:
419
- </p>
420
- <ul className="space-y-2 text-sm text-muted-foreground">
421
- <li>• Bar, Line, Area, Pie charts</li>
422
- <li>• Responsive container</li>
423
- <li>• Theme-aware colors</li>
424
- <li>• Tooltips and legends</li>
425
- <li>• Customizable styling</li>
426
- </ul>
427
- <p className="text-xs text-muted-foreground mt-4">
428
- See <strong>Recharts documentation</strong> for all chart types
429
- </p>
430
- </div>
431
- ),
432
- },
433
- ];