@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,122 +0,0 @@
1
- /**
2
- * Categories Configuration
3
- * Defines all component categories with metadata
4
- */
5
-
6
- import React from 'react';
7
- import {
8
- Home,
9
- FormInput,
10
- LayoutGrid,
11
- Navigation as NavigationIcon,
12
- Square,
13
- MessageSquare,
14
- Table2,
15
- Puzzle,
16
- Boxes,
17
- Code2,
18
- Palette,
19
- Wrench,
20
- } from 'lucide-react';
21
- import { getComponentCount } from './components';
22
-
23
- export interface ComponentCategory {
24
- id: string;
25
- label: string;
26
- icon: React.ReactNode;
27
- count?: number;
28
- description?: string;
29
- }
30
-
31
- export const CATEGORIES: ComponentCategory[] = [
32
- {
33
- id: 'overview',
34
- label: 'Overview',
35
- icon: <Home className="h-4 w-4" />,
36
- description: 'Welcome to Django CFG UI Library - explore 56+ components, 7 blocks, and 11 hooks',
37
- },
38
- {
39
- id: 'forms',
40
- label: 'Form Components',
41
- icon: <FormInput className="h-4 w-4" />,
42
- count: getComponentCount('forms'),
43
- description: 'Input fields, buttons, checkboxes, selects, and form validation components',
44
- },
45
- {
46
- id: 'layout',
47
- label: 'Layout Components',
48
- icon: <LayoutGrid className="h-4 w-4" />,
49
- count: getComponentCount('layout'),
50
- description: 'Cards, separators, skeletons, and structural layout components',
51
- },
52
- {
53
- id: 'navigation',
54
- label: 'Navigation',
55
- icon: <NavigationIcon className="h-4 w-4" />,
56
- count: getComponentCount('navigation'),
57
- description: 'Menus, breadcrumbs, tabs, and pagination components',
58
- },
59
- {
60
- id: 'overlay',
61
- label: 'Overlay Components',
62
- icon: <Square className="h-4 w-4" />,
63
- count: getComponentCount('overlay'),
64
- description: 'Dialogs, sheets, popovers, tooltips, and dropdown menus',
65
- },
66
- {
67
- id: 'feedback',
68
- label: 'Feedback',
69
- icon: <MessageSquare className="h-4 w-4" />,
70
- count: getComponentCount('feedback'),
71
- description: 'Toasts, alerts, progress bars, badges, and status indicators',
72
- },
73
- {
74
- id: 'data',
75
- label: 'Data Display',
76
- icon: <Table2 className="h-4 w-4" />,
77
- count: getComponentCount('data'),
78
- description: 'Tables, accordions, collapsibles, and data visualization',
79
- },
80
- {
81
- id: 'specialized',
82
- label: 'Specialized',
83
- icon: <Puzzle className="h-4 w-4" />,
84
- count: getComponentCount('specialized'),
85
- description: 'Advanced components like sidebar navigation and image handling',
86
- },
87
- {
88
- id: 'tools',
89
- label: 'Developer Tools',
90
- icon: <Wrench className="h-4 w-4" />,
91
- count: getComponentCount('tools'),
92
- description: 'Developer utilities: JSON viewer, code syntax highlighting, Mermaid diagrams',
93
- },
94
- {
95
- id: 'blocks',
96
- label: 'Blocks',
97
- icon: <Boxes className="h-4 w-4" />,
98
- count: getComponentCount('blocks'),
99
- description: 'Pre-built landing page sections: Hero, SuperHero, Features, CTA, Newsletter, Stats, Testimonials',
100
- },
101
- {
102
- id: 'hooks',
103
- label: 'Hooks',
104
- icon: <Code2 className="h-4 w-4" />,
105
- count: getComponentCount('hooks'),
106
- description: 'Custom React hooks for common functionality and state management',
107
- },
108
- {
109
- id: 'tailwind4',
110
- label: 'Tailwind CSS v4',
111
- icon: <Palette className="h-4 w-4" />,
112
- description: 'Migration guide and best practices for Tailwind CSS v4',
113
- },
114
- ];
115
-
116
- export function getCategoryById(id: string): ComponentCategory | undefined {
117
- return CATEGORIES.find(cat => cat.id === id);
118
- }
119
-
120
- export function getTotalComponentCount(): number {
121
- return CATEGORIES.reduce((sum, cat) => sum + (cat.count || 0), 0);
122
- }
@@ -1,239 +0,0 @@
1
- /**
2
- * Blocks Configuration
3
- */
4
-
5
- import React from 'react';
6
- import {
7
- Hero,
8
- SuperHero,
9
- FeatureSection,
10
- CTASection,
11
- NewsletterSection,
12
- StatsSection,
13
- TestimonialSection,
14
- } from '@djangocfg/ui/blocks';
15
- import { Sparkles, BookOpen, Zap, Shield, Code, Users, Building2, TrendingUp, Headphones } from 'lucide-react';
16
- import type { ComponentConfig } from './types';
17
-
18
- export const BLOCKS: ComponentConfig[] = [
19
- {
20
- name: 'Hero',
21
- category: 'blocks',
22
- description: 'Hero section with title, description, and CTAs',
23
- importPath: "import { Hero } from '@djangocfg/ui/blocks';",
24
- example: `<Hero
25
- title="Build Your Next Project"
26
- description="The best way to create modern web applications with React and TypeScript"
27
- primaryAction={{ label: "Get Started", href: "/docs" }}
28
- secondaryAction={{ label: "View Demo", href: "/demo" }}
29
- />`,
30
- preview: (
31
- <Hero
32
- title="Build Your Next Project"
33
- description="The best way to create modern web applications"
34
- primaryAction={{ label: "Get Started", href: "/docs" }}
35
- secondaryAction={{ label: "View Demo", href: "/demo" }}
36
- />
37
- ),
38
- },
39
- {
40
- name: 'SuperHero',
41
- category: 'blocks',
42
- description: 'Enhanced hero with badge, gradient title, features, and stats',
43
- importPath: "import { SuperHero } from '@djangocfg/ui/blocks';",
44
- example: `<SuperHero
45
- badge={{ icon: <Sparkles />, text: "New in v2.0" }}
46
- title="Next-Generation"
47
- titleGradient="Development Platform"
48
- subtitle="Build faster with our comprehensive UI library"
49
- features={[
50
- { icon: <span>⚛️</span>, text: "React 19" },
51
- { icon: <span>📘</span>, text: "TypeScript" },
52
- { icon: <span>🎨</span>, text: "Tailwind CSS 4" },
53
- { icon: <span>⚡</span>, text: "Lightning Fast" }
54
- ]}
55
- primaryAction={{ label: "Start Building", href: "/start" }}
56
- secondaryAction={{ label: "Learn More", href: "/docs", icon: <BookOpen /> }}
57
- stats={[
58
- { number: "56+", label: "Components" },
59
- { number: "7", label: "Blocks" },
60
- { number: "6", label: "Hooks" },
61
- { number: "100%", label: "Type Safe" }
62
- ]}
63
- backgroundVariant="waves"
64
- backgroundIntensity="medium"
65
- showBackgroundSwitcher={true}
66
- />`,
67
- preview: (
68
- <SuperHero
69
- badge={{ icon: <Sparkles className="w-4 h-4" />, text: "New in v2.0" }}
70
- title="Next-Generation"
71
- titleGradient="Development Platform"
72
- subtitle="Build faster with our comprehensive UI library"
73
- features={[
74
- { icon: <span>⚛️</span>, text: "React 19" },
75
- { icon: <span>📘</span>, text: "TypeScript" },
76
- { icon: <span>🎨</span>, text: "Tailwind CSS 4" },
77
- { icon: <span>⚡</span>, text: "Lightning Fast" },
78
- ]}
79
- primaryAction={{ label: "Start Building", href: "/start" }}
80
- secondaryAction={{ label: "Learn More", href: "/docs", icon: <BookOpen /> }}
81
- stats={[
82
- { number: "56+", label: "Components" },
83
- { number: "7", label: "Blocks" },
84
- { number: "6", label: "Hooks" },
85
- { number: "100%", label: "Type Safe" },
86
- ]}
87
- backgroundVariant="waves"
88
- backgroundIntensity="medium"
89
- showBackgroundSwitcher={true}
90
- />
91
- ),
92
- },
93
- {
94
- name: 'FeatureSection',
95
- category: 'blocks',
96
- description: 'Grid of features with icons and descriptions',
97
- importPath: "import { FeatureSection } from '@djangocfg/ui/blocks';",
98
- example: `<FeatureSection
99
- title="Everything You Need"
100
- subtitle="All the tools to build modern applications"
101
- features={[
102
- {
103
- icon: <Zap className="w-6 h-6" />,
104
- title: "Lightning Fast",
105
- description: "Optimized for performance"
106
- },
107
- {
108
- icon: <Shield className="w-6 h-6" />,
109
- title: "Secure",
110
- description: "Built with security in mind"
111
- }
112
- ]}
113
- />`,
114
- preview: (
115
- <FeatureSection
116
- title="Everything You Need"
117
- subtitle="All the tools to build modern applications"
118
- features={[
119
- {
120
- icon: <Zap className="w-6 h-6" />,
121
- title: "Lightning Fast",
122
- description: "Optimized for performance"
123
- },
124
- {
125
- icon: <Shield className="w-6 h-6" />,
126
- title: "Secure",
127
- description: "Built with security in mind"
128
- },
129
- {
130
- icon: <Code className="w-6 h-6" />,
131
- title: "Developer Friendly",
132
- description: "Great DX with TypeScript"
133
- }
134
- ]}
135
- />
136
- ),
137
- },
138
- {
139
- name: 'CTASection',
140
- category: 'blocks',
141
- description: 'Call-to-action section to drive conversions',
142
- importPath: "import { CTASection } from '@djangocfg/ui/blocks';",
143
- example: `<CTASection
144
- title="Ready to Get Started?"
145
- subtitle="Join thousands of developers building amazing products"
146
- primaryCTA={{ label: "Start Free Trial", href: "/signup" }}
147
- secondaryCTA={{ label: "Contact Sales", href: "/contact" }}
148
- />`,
149
- preview: (
150
- <CTASection
151
- title="Ready to Get Started?"
152
- subtitle="Join thousands of developers"
153
- primaryCTA={{ label: "Start Free Trial", href: "/signup" }}
154
- secondaryCTA={{ label: "Contact Sales", href: "/contact" }}
155
- />
156
- ),
157
- },
158
- {
159
- name: 'NewsletterSection',
160
- category: 'blocks',
161
- description: 'Email capture section for newsletters',
162
- importPath: "import { NewsletterSection } from '@djangocfg/ui/blocks';",
163
- example: `<NewsletterSection
164
- title="Stay Updated"
165
- description="Get the latest news delivered to your inbox"
166
- placeholder="Enter your email"
167
- buttonText="Subscribe"
168
- onSubmit={(email) => console.log(email)}
169
- />`,
170
- preview: (
171
- <NewsletterSection
172
- title="Stay Updated"
173
- description="Get the latest news delivered to your inbox"
174
- placeholder="Enter your email"
175
- buttonText="Subscribe"
176
- onSubmit={(email) => console.log('Subscribed:', email)}
177
- />
178
- ),
179
- },
180
- {
181
- name: 'StatsSection',
182
- category: 'blocks',
183
- description: 'Display key metrics and statistics',
184
- importPath: "import { StatsSection } from '@djangocfg/ui/blocks';",
185
- example: `<StatsSection
186
- title="Our Impact"
187
- stats={[
188
- { icon: <Users className="w-6 h-6" />, number: "10K+", label: "Active Users" },
189
- { icon: <Building2 className="w-6 h-6" />, number: "500+", label: "Companies" },
190
- { icon: <TrendingUp className="w-6 h-6" />, number: "99.9%", label: "Uptime" },
191
- { icon: <Headphones className="w-6 h-6" />, number: "24/7", label: "Support" }
192
- ]}
193
- />`,
194
- preview: (
195
- <StatsSection
196
- title="Our Impact"
197
- stats={[
198
- { icon: <Users className="w-6 h-6" />, number: "10K+", label: "Active Users" },
199
- { icon: <Building2 className="w-6 h-6" />, number: "500+", label: "Companies" },
200
- { icon: <TrendingUp className="w-6 h-6" />, number: "99.9%", label: "Uptime" },
201
- { icon: <Headphones className="w-6 h-6" />, number: "24/7", label: "Support" }
202
- ]}
203
- />
204
- ),
205
- },
206
- {
207
- name: 'TestimonialSection',
208
- category: 'blocks',
209
- description: 'Customer testimonials and reviews',
210
- importPath: "import { TestimonialSection } from '@djangocfg/ui/blocks';",
211
- example: `<TestimonialSection
212
- title="What Our Customers Say"
213
- testimonials={[{
214
- content: "This product changed how we work!",
215
- author: {
216
- name: "John Doe",
217
- title: "CEO",
218
- company: "Company"
219
- }
220
- }]}
221
- />`,
222
- preview: (
223
- <TestimonialSection
224
- title="What Our Customers Say"
225
- testimonials={[
226
- {
227
- content: "This product changed how we work. Highly recommended!",
228
- author: {
229
- name: "John Doe",
230
- title: "CEO",
231
- company: "Company",
232
- avatar: "/avatar.jpg"
233
- }
234
- }
235
- ]}
236
- />
237
- ),
238
- },
239
- ];