@djangocfg/layouts 1.4.27 → 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 (76) 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/ContactPage.tsx +16 -3
  6. package/src/layouts/UILayout/README.md +0 -267
  7. package/src/layouts/UILayout/SUMMARY.md +0 -298
  8. package/src/layouts/UILayout/TOOLS_INTEGRATION.md +0 -216
  9. package/src/layouts/UILayout/components/AutoComponentDemo.tsx +0 -77
  10. package/src/layouts/UILayout/components/CategoryRenderer.tsx +0 -45
  11. package/src/layouts/UILayout/components/TailwindGuideRenderer.tsx +0 -138
  12. package/src/layouts/UILayout/components/index.ts +0 -15
  13. package/src/layouts/UILayout/components/layout/Header/CopyAIButton.tsx +0 -58
  14. package/src/layouts/UILayout/components/layout/Header/Header.tsx +0 -60
  15. package/src/layouts/UILayout/components/layout/Header/HeaderDesktop.tsx +0 -51
  16. package/src/layouts/UILayout/components/layout/Header/HeaderMobile.tsx +0 -71
  17. package/src/layouts/UILayout/components/layout/Header/TestValidationButton.tsx +0 -268
  18. package/src/layouts/UILayout/components/layout/Header/index.ts +0 -11
  19. package/src/layouts/UILayout/components/layout/MobileOverlay/MobileOverlay.tsx +0 -47
  20. package/src/layouts/UILayout/components/layout/MobileOverlay/index.ts +0 -6
  21. package/src/layouts/UILayout/components/layout/Sidebar/Sidebar.tsx +0 -95
  22. package/src/layouts/UILayout/components/layout/Sidebar/SidebarCategory.tsx +0 -54
  23. package/src/layouts/UILayout/components/layout/Sidebar/SidebarContent.tsx +0 -93
  24. package/src/layouts/UILayout/components/layout/Sidebar/SidebarFooter.tsx +0 -49
  25. package/src/layouts/UILayout/components/layout/Sidebar/index.ts +0 -9
  26. package/src/layouts/UILayout/components/layout/index.ts +0 -8
  27. package/src/layouts/UILayout/components/shared/Badge/CountBadge.tsx +0 -38
  28. package/src/layouts/UILayout/components/shared/Badge/index.ts +0 -5
  29. package/src/layouts/UILayout/components/shared/CodeBlock/CodeBlock.tsx +0 -48
  30. package/src/layouts/UILayout/components/shared/CodeBlock/CopyButton.tsx +0 -49
  31. package/src/layouts/UILayout/components/shared/CodeBlock/index.ts +0 -6
  32. package/src/layouts/UILayout/components/shared/Section/Section.tsx +0 -63
  33. package/src/layouts/UILayout/components/shared/Section/index.ts +0 -5
  34. package/src/layouts/UILayout/components/shared/index.ts +0 -8
  35. package/src/layouts/UILayout/config/ai-export.config.ts +0 -89
  36. package/src/layouts/UILayout/config/categories.config.tsx +0 -122
  37. package/src/layouts/UILayout/config/components/blocks.config.tsx +0 -239
  38. package/src/layouts/UILayout/config/components/data.config.tsx +0 -433
  39. package/src/layouts/UILayout/config/components/feedback.config.tsx +0 -290
  40. package/src/layouts/UILayout/config/components/forms.config.tsx +0 -996
  41. package/src/layouts/UILayout/config/components/hooks.config.tsx +0 -168
  42. package/src/layouts/UILayout/config/components/index.ts +0 -72
  43. package/src/layouts/UILayout/config/components/layout.config.tsx +0 -246
  44. package/src/layouts/UILayout/config/components/navigation.config.tsx +0 -352
  45. package/src/layouts/UILayout/config/components/overlay.config.tsx +0 -569
  46. package/src/layouts/UILayout/config/components/specialized.config.tsx +0 -400
  47. package/src/layouts/UILayout/config/components/tools.config.tsx +0 -234
  48. package/src/layouts/UILayout/config/components/types.ts +0 -14
  49. package/src/layouts/UILayout/config/index.ts +0 -42
  50. package/src/layouts/UILayout/config/tailwind.config.ts +0 -131
  51. package/src/layouts/UILayout/constants.ts +0 -23
  52. package/src/layouts/UILayout/context/ShowcaseContext.tsx +0 -81
  53. package/src/layouts/UILayout/context/index.ts +0 -1
  54. package/src/layouts/UILayout/core/UIGuideApp.client.tsx +0 -18
  55. package/src/layouts/UILayout/core/UIGuideApp.tsx +0 -33
  56. package/src/layouts/UILayout/core/UIGuideLanding.tsx +0 -172
  57. package/src/layouts/UILayout/core/UIGuideView.tsx +0 -61
  58. package/src/layouts/UILayout/core/UILayout.tsx +0 -125
  59. package/src/layouts/UILayout/core/UILayoutSidebar.tsx +0 -11
  60. package/src/layouts/UILayout/core/index.ts +0 -10
  61. package/src/layouts/UILayout/hooks/index.ts +0 -9
  62. package/src/layouts/UILayout/hooks/useAIExport.ts +0 -78
  63. package/src/layouts/UILayout/hooks/useCategoryNavigation.ts +0 -92
  64. package/src/layouts/UILayout/hooks/useComponentSearch.ts +0 -81
  65. package/src/layouts/UILayout/hooks/useSidebarState.ts +0 -36
  66. package/src/layouts/UILayout/index.ts +0 -160
  67. package/src/layouts/UILayout/types/component.ts +0 -45
  68. package/src/layouts/UILayout/types/index.ts +0 -23
  69. package/src/layouts/UILayout/types/layout.ts +0 -57
  70. package/src/layouts/UILayout/types/navigation.ts +0 -33
  71. package/src/layouts/UILayout/utils/ai-export/formatters.ts +0 -71
  72. package/src/layouts/UILayout/utils/ai-export/index.ts +0 -5
  73. package/src/layouts/UILayout/utils/component-helpers/filter.ts +0 -109
  74. package/src/layouts/UILayout/utils/component-helpers/index.ts +0 -6
  75. package/src/layouts/UILayout/utils/component-helpers/search.ts +0 -95
  76. package/src/layouts/UILayout/utils/index.ts +0 -6
@@ -1,290 +0,0 @@
1
- /**
2
- * Feedback Components Configuration
3
- */
4
-
5
- import React from 'react';
6
- import {
7
- Alert,
8
- AlertDescription,
9
- AlertTitle,
10
- Progress,
11
- Badge,
12
- Avatar,
13
- AvatarFallback,
14
- AvatarImage,
15
- Button,
16
- useToast,
17
- Toaster,
18
- } from '@djangocfg/ui';
19
- import type { ComponentConfig } from './types';
20
-
21
- // Toast Preview Component
22
- function ToastPreview() {
23
- const { toast } = useToast();
24
-
25
- return (
26
- <div className="p-4 border rounded-md bg-muted/30">
27
- <p className="text-sm text-muted-foreground mb-3">
28
- Toast is a hook-based component. Click buttons to trigger toasts:
29
- </p>
30
- <div className="space-x-2">
31
- <Button
32
- onClick={() => {
33
- toast({
34
- title: "Success!",
35
- description: "Your changes have been saved.",
36
- });
37
- }}
38
- >
39
- Show Toast
40
- </Button>
41
- <Button
42
- variant="destructive"
43
- onClick={() => {
44
- toast({
45
- variant: "destructive",
46
- title: "Error!",
47
- description: "Something went wrong.",
48
- });
49
- }}
50
- >
51
- Show Error Toast
52
- </Button>
53
- </div>
54
- <p className="text-xs text-muted-foreground mt-3">
55
- ✓ Toaster is globally available via AppLayout
56
- </p>
57
- </div>
58
- );
59
- }
60
-
61
- export const FEEDBACK_COMPONENTS: ComponentConfig[] = [
62
- {
63
- name: 'Toast',
64
- category: 'feedback',
65
- description: 'Toast notifications for user feedback',
66
- importPath: `import { useToast, Button } from '@djangocfg/ui';`,
67
- example: `function Component() {
68
- const { toast } = useToast();
69
-
70
- return (
71
- <div className="space-x-2">
72
- <Button
73
- onClick={() => {
74
- toast({
75
- title: "Success!",
76
- description: "Your changes have been saved.",
77
- });
78
- }}
79
- >
80
- Show Toast
81
- </Button>
82
- <Button
83
- variant="destructive"
84
- onClick={() => {
85
- toast({
86
- variant: "destructive",
87
- title: "Error!",
88
- description: "Something went wrong.",
89
- });
90
- }}
91
- >
92
- Show Error Toast
93
- </Button>
94
- </div>
95
- );
96
- }`,
97
- preview: <ToastPreview />,
98
- },
99
- {
100
- name: 'Alert',
101
- category: 'feedback',
102
- description: 'Alert messages for important information',
103
- importPath: `import { Alert, AlertDescription, AlertTitle } from '@djangocfg/ui';`,
104
- example: `<div className="space-y-4">
105
- <Alert>
106
- <AlertTitle>Heads up!</AlertTitle>
107
- <AlertDescription>
108
- You can add components to your app using the cli.
109
- </AlertDescription>
110
- </Alert>
111
-
112
- <Alert variant="destructive">
113
- <AlertTitle>Error</AlertTitle>
114
- <AlertDescription>
115
- Your session has expired. Please log in again.
116
- </AlertDescription>
117
- </Alert>
118
- </div>`,
119
- preview: (
120
- <div className="space-y-4">
121
- <Alert>
122
- <AlertTitle>Heads up!</AlertTitle>
123
- <AlertDescription>
124
- You can add components to your app using the cli.
125
- </AlertDescription>
126
- </Alert>
127
-
128
- <Alert variant="destructive">
129
- <AlertTitle>Error</AlertTitle>
130
- <AlertDescription>
131
- Your session has expired. Please log in again.
132
- </AlertDescription>
133
- </Alert>
134
- </div>
135
- ),
136
- },
137
- {
138
- name: 'Progress',
139
- category: 'feedback',
140
- description: 'Progress bar for showing completion status',
141
- importPath: `import { Progress } from '@djangocfg/ui';`,
142
- example: `<div className="space-y-4 max-w-md">
143
- <div>
144
- <div className="flex justify-between mb-2">
145
- <span className="text-sm">25%</span>
146
- </div>
147
- <Progress value={25} />
148
- </div>
149
-
150
- <div>
151
- <div className="flex justify-between mb-2">
152
- <span className="text-sm">50%</span>
153
- </div>
154
- <Progress value={50} />
155
- </div>
156
-
157
- <div>
158
- <div className="flex justify-between mb-2">
159
- <span className="text-sm">75%</span>
160
- </div>
161
- <Progress value={75} />
162
- </div>
163
- </div>`,
164
- preview: (
165
- <div className="space-y-4 max-w-md">
166
- <div>
167
- <div className="flex justify-between mb-2">
168
- <span className="text-sm">25%</span>
169
- </div>
170
- <Progress value={25} />
171
- </div>
172
-
173
- <div>
174
- <div className="flex justify-between mb-2">
175
- <span className="text-sm">50%</span>
176
- </div>
177
- <Progress value={50} />
178
- </div>
179
-
180
- <div>
181
- <div className="flex justify-between mb-2">
182
- <span className="text-sm">75%</span>
183
- </div>
184
- <Progress value={75} />
185
- </div>
186
- </div>
187
- ),
188
- },
189
- {
190
- name: 'Badge',
191
- category: 'feedback',
192
- description: 'Status badges for labels and categories',
193
- importPath: `import { Badge } from '@djangocfg/ui';`,
194
- example: `<div className="flex gap-2 flex-wrap">
195
- <Badge>Default</Badge>
196
- <Badge variant="secondary">Secondary</Badge>
197
- <Badge variant="destructive">Destructive</Badge>
198
- <Badge variant="outline">Outline</Badge>
199
- </div>`,
200
- preview: (
201
- <div className="flex gap-2 flex-wrap">
202
- <Badge>Default</Badge>
203
- <Badge variant="secondary">Secondary</Badge>
204
- <Badge variant="destructive">Destructive</Badge>
205
- <Badge variant="outline">Outline</Badge>
206
- </div>
207
- ),
208
- },
209
- {
210
- name: 'Avatar',
211
- category: 'feedback',
212
- description: 'User avatar with fallback support',
213
- importPath: `import { Avatar, AvatarFallback, AvatarImage } from '@djangocfg/ui';`,
214
- example: `<div className="flex gap-4">
215
- <Avatar>
216
- <AvatarImage src="https://github.com/shadcn.png" alt="@shadcn" />
217
- <AvatarFallback>CN</AvatarFallback>
218
- </Avatar>
219
-
220
- <Avatar>
221
- <AvatarImage src="/nonexistent.png" alt="@user" />
222
- <AvatarFallback>JD</AvatarFallback>
223
- </Avatar>
224
-
225
- <Avatar>
226
- <AvatarFallback>AB</AvatarFallback>
227
- </Avatar>
228
- </div>`,
229
- preview: (
230
- <div className="flex gap-4">
231
- <Avatar>
232
- <AvatarImage src="https://github.com/shadcn.png" alt="@shadcn" />
233
- <AvatarFallback>CN</AvatarFallback>
234
- </Avatar>
235
-
236
- <Avatar>
237
- <AvatarImage src="/nonexistent.png" alt="@user" />
238
- <AvatarFallback>JD</AvatarFallback>
239
- </Avatar>
240
-
241
- <Avatar>
242
- <AvatarFallback>AB</AvatarFallback>
243
- </Avatar>
244
- </div>
245
- ),
246
- },
247
- {
248
- name: 'Toaster',
249
- category: 'feedback',
250
- description: 'Global toast notification container (works with Toast component)',
251
- importPath: `import { Toaster, useToast } from '@djangocfg/ui';`,
252
- example: `// Add Toaster once in your app layout
253
- <Toaster />
254
-
255
- // Then use the useToast hook anywhere
256
- function MyComponent() {
257
- const { toast } = useToast();
258
-
259
- return (
260
- <Button
261
- onClick={() => {
262
- toast({
263
- title: "Scheduled: Catch up",
264
- description: "Friday, February 10, 2023 at 5:57 PM",
265
- });
266
- }}
267
- >
268
- Show Toast
269
- </Button>
270
- );
271
- }`,
272
- preview: (
273
- <div className="p-6 border rounded-md bg-muted/50">
274
- <p className="text-sm text-muted-foreground mb-4">
275
- Toaster is the global container for Toast notifications:
276
- </p>
277
- <ul className="space-y-2 text-sm text-muted-foreground">
278
- <li>• Add once to your app layout</li>
279
- <li>• Use with useToast hook</li>
280
- <li>• Manages toast queue and positioning</li>
281
- <li>• Accessible and keyboard navigable</li>
282
- <li>• Works with Toast component</li>
283
- </ul>
284
- <p className="text-xs text-muted-foreground mt-4">
285
- ℹ️ Different from Sonner - this is the built-in Toast system
286
- </p>
287
- </div>
288
- ),
289
- },
290
- ];