@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,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
- ];