@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,216 +0,0 @@
1
- # Developer Tools Integration
2
-
3
- ## Overview
4
-
5
- Successfully integrated three developer tool components into the UILayout showcase:
6
-
7
- 1. **JsonTree** - Interactive JSON viewer with expand/collapse functionality
8
- 2. **PrettyCode** - Syntax-highlighted code display
9
- 3. **Mermaid** - Diagram renderer with fullscreen support
10
-
11
- ## Changes Made
12
-
13
- ### 1. Created Tools Configuration
14
-
15
- **File**: `config/components/tools.config.tsx`
16
-
17
- - Defined 3 component configurations with examples and previews
18
- - Added sample data for demonstrations
19
- - Included comprehensive usage examples
20
-
21
- ### 2. Updated Components Index
22
-
23
- **File**: `config/components/index.ts`
24
-
25
- - Added `TOOLS_COMPONENTS` export
26
- - Integrated tools into `COMPONENTS_CONFIG` array
27
- - Tools now available in component registry
28
-
29
- ### 3. Added Developer Tools Category
30
-
31
- **File**: `config/categories.config.tsx`
32
-
33
- - Created new "Developer Tools" category
34
- - Added Wrench icon from lucide-react
35
- - Positioned between "Specialized" and "Blocks" categories
36
- - Description: "Developer utilities: JSON viewer, code syntax highlighting, Mermaid diagrams"
37
-
38
- ### 4. Updated Tools Exports
39
-
40
- **File**: `packages/ui/src/tools/index.ts`
41
-
42
- - Ensured all tools are properly exported as named exports
43
- - Exported TypeScript types (Language, JsonTreeConfig)
44
-
45
- ## Component Features
46
-
47
- ### JsonTree
48
-
49
- **Features:**
50
- - Expand/collapse all functionality
51
- - Smart auto-expansion based on depth and collection size
52
- - Collection info display (array length, object keys count)
53
- - Copy to clipboard
54
- - Download as JSON file
55
- - Theme-aware colors using CSS variables
56
- - String truncation for long values
57
- - Configurable expansion limits
58
-
59
- **Configuration Options:**
60
- - `maxAutoExpandDepth` - Maximum depth to auto-expand (default: 2)
61
- - `maxAutoExpandArrayItems` - Max array items to auto-expand (default: 10)
62
- - `maxAutoExpandObjectKeys` - Max object keys to auto-expand (default: 5)
63
- - `maxStringLength` - String truncation threshold (default: 200)
64
- - `collectionLimit` - Collection size limit for performance (default: 50)
65
- - `showCollectionInfo` - Display collection metadata
66
- - `showExpandControls` - Show expand/collapse buttons
67
- - `showActionButtons` - Show copy/download buttons
68
-
69
- ### PrettyCode
70
-
71
- **Features:**
72
- - Syntax highlighting with Prism
73
- - Automatic language detection
74
- - Theme support (dark/light)
75
- - Inline and block modes
76
- - Language badge display
77
- - Support for 15+ languages
78
- - Custom background colors
79
- - JSON auto-formatting
80
-
81
- **Supported Languages:**
82
- - JavaScript/TypeScript
83
- - Python
84
- - Bash/Shell
85
- - JSON, YAML, XML
86
- - HTML, CSS
87
- - SQL
88
- - Markdown
89
- - And more...
90
-
91
- ### Mermaid
92
-
93
- **Features:**
94
- - Fullscreen modal view
95
- - Click to expand
96
- - ESC key to close
97
- - Theme-aware rendering
98
- - Semantic color variables
99
- - Support for all Mermaid diagram types
100
- - Responsive SVG sizing
101
- - Error handling with user feedback
102
-
103
- **Supported Diagrams:**
104
- - Flowchart / Graph
105
- - Sequence diagram
106
- - Class diagram
107
- - State diagram
108
- - Entity Relationship diagram
109
- - User Journey
110
- - Gantt chart
111
- - Pie chart
112
- - Git graph
113
-
114
- ## Usage in UILayout
115
-
116
- The tools are now accessible through the UILayout navigation:
117
-
118
- 1. Navigate to **Developer Tools** category in sidebar
119
- 2. Click on any tool (JsonTree, PrettyCode, Mermaid)
120
- 3. View live preview and usage examples
121
- 4. Copy code examples for use in your project
122
-
123
- ## Import Examples
124
-
125
- ```tsx
126
- // Individual imports
127
- import { JsonTree } from '@djangocfg/ui';
128
- import { PrettyCode } from '@djangocfg/ui';
129
- import { Mermaid } from '@djangocfg/ui';
130
-
131
- // All at once
132
- import { JsonTree, PrettyCode, Mermaid } from '@djangocfg/ui';
133
- ```
134
-
135
- ## Preview Examples
136
-
137
- ### JsonTree Preview
138
- ```tsx
139
- <JsonTree
140
- title="User Data"
141
- data={{
142
- user: {
143
- id: 1,
144
- name: "John Doe",
145
- profile: { bio: "Software engineer" }
146
- }
147
- }}
148
- config={{
149
- maxAutoExpandDepth: 2,
150
- showCollectionInfo: true,
151
- showExpandControls: true,
152
- }}
153
- />
154
- ```
155
-
156
- ### PrettyCode Preview
157
- ```tsx
158
- <PrettyCode
159
- data={pythonCode}
160
- language="python"
161
- />
162
- ```
163
-
164
- ### Mermaid Preview
165
- ```tsx
166
- <Mermaid
167
- chart={`
168
- graph TD
169
- A[Start] --> B{Decision}
170
- B -->|Yes| C[OK]
171
- B -->|No| D[End]
172
- `}
173
- />
174
- ```
175
-
176
- ## File Structure
177
-
178
- ```
179
- UILayout/
180
- ├── config/
181
- │ ├── components/
182
- │ │ ├── tools.config.tsx # NEW - Tools configurations
183
- │ │ └── index.ts # UPDATED - Added tools export
184
- │ └── categories.config.tsx # UPDATED - Added tools category
185
- └── TOOLS_INTEGRATION.md # THIS FILE
186
- ```
187
-
188
- ## Testing
189
-
190
- To verify the integration:
191
-
192
- 1. Start the development server
193
- 2. Navigate to UILayout showcase
194
- 3. Check sidebar for "Developer Tools" category
195
- 4. Verify all 3 components render correctly
196
- 5. Test interactive features:
197
- - JsonTree: expand/collapse, copy, download
198
- - PrettyCode: syntax highlighting in different themes
199
- - Mermaid: fullscreen view, ESC key close
200
-
201
- ## Next Steps
202
-
203
- Potential enhancements:
204
- - Add search functionality to JsonTree
205
- - Add more code language examples to PrettyCode
206
- - Add more diagram type examples to Mermaid
207
- - Create composite examples combining multiple tools
208
- - Add performance benchmarks section
209
-
210
- ## Notes
211
-
212
- - All components are theme-aware using CSS variables
213
- - All components support both light and dark modes
214
- - All components are fully responsive
215
- - No breaking changes to existing components
216
- - Backward compatible with existing UILayout structure
@@ -1,77 +0,0 @@
1
- /**
2
- * AutoComponentDemo
3
- * Automatically renders component demos from configuration
4
- */
5
-
6
- 'use client';
7
-
8
- import React from 'react';
9
- import { Card, CardContent, CardDescription, CardHeader, CardTitle, Tabs, TabsContent, TabsList, TabsTrigger } from '@djangocfg/ui';
10
- import { PrettyCode } from '@djangocfg/ui/tools';
11
- import type { ComponentConfig } from '../config';
12
-
13
- interface AutoComponentDemoProps {
14
- component: ComponentConfig;
15
- }
16
-
17
- /**
18
- * AutoComponentDemo - Renders a component demo from config
19
- * This is the single component used to display all UI components
20
- */
21
- export function AutoComponentDemo({ component }: AutoComponentDemoProps) {
22
- return (
23
- <Card className="mb-6">
24
- <CardHeader>
25
- <CardTitle className="text-lg">{component.name}</CardTitle>
26
- <CardDescription>{component.description}</CardDescription>
27
- </CardHeader>
28
- <CardContent>
29
- <Tabs defaultValue="preview" className="w-full">
30
- <TabsList className="mb-4">
31
- <TabsTrigger value="preview">Preview</TabsTrigger>
32
- <TabsTrigger value="code">Code</TabsTrigger>
33
- </TabsList>
34
-
35
- <TabsContent value="preview" className="space-y-4">
36
- <div className="p-6 border rounded-md bg-card">
37
- {component.preview}
38
- </div>
39
- </TabsContent>
40
-
41
- <TabsContent value="code">
42
- <PrettyCode
43
- data={`${component.importPath}\n\n${component.example}`}
44
- language="tsx"
45
- className="text-sm"
46
- />
47
- </TabsContent>
48
- </Tabs>
49
- </CardContent>
50
- </Card>
51
- );
52
- }
53
-
54
- /**
55
- * CategorySection - Groups related component demos
56
- */
57
- interface CategorySectionProps {
58
- title: string;
59
- description?: string;
60
- children: React.ReactNode;
61
- }
62
-
63
- export function CategorySection({ title, description, children }: CategorySectionProps) {
64
- return (
65
- <div className="mb-12">
66
- <div className="mb-6">
67
- <h2 className="text-2xl font-bold tracking-tight">{title}</h2>
68
- {description && (
69
- <p className="text-muted-foreground mt-2">{description}</p>
70
- )}
71
- </div>
72
- <div className="space-y-6">
73
- {children}
74
- </div>
75
- </div>
76
- );
77
- }
@@ -1,45 +0,0 @@
1
- /**
2
- * CategoryRenderer
3
- * Universal renderer for any category using config data
4
- */
5
-
6
- 'use client';
7
-
8
- import React from 'react';
9
- import { getComponentsByCategory, getCategoryById } from '../config';
10
- import { AutoComponentDemo, CategorySection } from './AutoComponentDemo';
11
-
12
- interface CategoryRendererProps {
13
- categoryId: string;
14
- }
15
-
16
- /**
17
- * CategoryRenderer - Dynamically renders all components in a category
18
- * No need for separate demo files - everything comes from config
19
- */
20
- export function CategoryRenderer({ categoryId }: CategoryRendererProps) {
21
- const category = getCategoryById(categoryId);
22
- const components = getComponentsByCategory(categoryId);
23
-
24
- if (!category || components.length === 0) {
25
- return (
26
- <div className="p-8 text-center text-muted-foreground">
27
- <p>No components found for this category</p>
28
- </div>
29
- );
30
- }
31
-
32
- return (
33
- <CategorySection
34
- title={category.label}
35
- description={category.description}
36
- >
37
- {components.map((component) => (
38
- <AutoComponentDemo
39
- key={component.name}
40
- component={component}
41
- />
42
- ))}
43
- </CategorySection>
44
- );
45
- }
@@ -1,138 +0,0 @@
1
- /**
2
- * TailwindGuideRenderer
3
- * Renders Tailwind CSS v4 guide from config
4
- */
5
-
6
- 'use client';
7
-
8
- import React from 'react';
9
- import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@djangocfg/ui';
10
- import { PrettyCode } from '@djangocfg/ui/tools';
11
- import { TAILWIND_GUIDE } from '../config';
12
- import { CategorySection } from './AutoComponentDemo';
13
-
14
- /**
15
- * TailwindGuideRenderer - Dynamically renders Tailwind guide from config
16
- */
17
- export function TailwindGuideRenderer() {
18
- return (
19
- <CategorySection
20
- title="Tailwind CSS v4 Guide"
21
- description="Everything you need to know about migrating to and using Tailwind CSS v4"
22
- >
23
- {/* Key Changes */}
24
- <Card>
25
- <CardHeader>
26
- <CardTitle>Key Changes in Tailwind CSS v{TAILWIND_GUIDE.version}</CardTitle>
27
- <CardDescription>
28
- Major improvements and breaking changes you should know about
29
- </CardDescription>
30
- </CardHeader>
31
- <CardContent>
32
- <ul className="list-disc list-inside space-y-2 text-muted-foreground">
33
- {TAILWIND_GUIDE.keyChanges.map((change, index) => (
34
- <li key={index}>{change}</li>
35
- ))}
36
- </ul>
37
- </CardContent>
38
- </Card>
39
-
40
- {/* Best Practices */}
41
- <Card>
42
- <CardHeader>
43
- <CardTitle>Best Practices</CardTitle>
44
- <CardDescription>
45
- Follow these patterns for clean, maintainable code
46
- </CardDescription>
47
- </CardHeader>
48
- <CardContent>
49
- <div className="space-y-4">
50
- <div>
51
- <h3 className="font-semibold mb-2">✅ Recommended Patterns</h3>
52
- <ul className="list-disc list-inside space-y-1 text-muted-foreground ml-4">
53
- {TAILWIND_GUIDE.bestPractices.map((practice, index) => (
54
- <li key={index}>{practice}</li>
55
- ))}
56
- </ul>
57
- </div>
58
- </div>
59
- </CardContent>
60
- </Card>
61
-
62
- {/* Migration Steps */}
63
- <Card>
64
- <CardHeader>
65
- <CardTitle>Migration Steps (v3 → v4)</CardTitle>
66
- <CardDescription>
67
- Step-by-step guide to upgrade your project
68
- </CardDescription>
69
- </CardHeader>
70
- <CardContent>
71
- <ol className="list-decimal list-inside space-y-2 text-muted-foreground">
72
- {TAILWIND_GUIDE.migrationSteps.map((step, index) => (
73
- <li key={index}>{step}</li>
74
- ))}
75
- </ol>
76
- </CardContent>
77
- </Card>
78
-
79
- {/* Examples */}
80
- {TAILWIND_GUIDE.examples.map((example, index) => (
81
- <Card key={index}>
82
- <CardHeader>
83
- <CardTitle>{example.title}</CardTitle>
84
- <CardDescription>{example.description}</CardDescription>
85
- </CardHeader>
86
- <CardContent>
87
- <PrettyCode
88
- data={example.code}
89
- language="css"
90
- className="text-sm"
91
- />
92
- </CardContent>
93
- </Card>
94
- ))}
95
-
96
- {/* Resources */}
97
- <Card>
98
- <CardHeader>
99
- <CardTitle>Official Resources</CardTitle>
100
- </CardHeader>
101
- <CardContent>
102
- <ul className="space-y-2">
103
- <li>
104
- <a
105
- href="https://tailwindcss.com/docs/upgrade-guide"
106
- target="_blank"
107
- rel="noopener noreferrer"
108
- className="text-primary hover:underline"
109
- >
110
- Official Upgrade Guide
111
- </a>
112
- </li>
113
- <li>
114
- <a
115
- href="https://tailwindcss.com/docs/guides/nextjs"
116
- target="_blank"
117
- rel="noopener noreferrer"
118
- className="text-primary hover:underline"
119
- >
120
- Next.js Integration Guide
121
- </a>
122
- </li>
123
- <li>
124
- <a
125
- href="https://tailwindcss.com/blog/tailwindcss-v4"
126
- target="_blank"
127
- rel="noopener noreferrer"
128
- className="text-primary hover:underline"
129
- >
130
- Tailwind CSS v4.0 Release Notes
131
- </a>
132
- </li>
133
- </ul>
134
- </CardContent>
135
- </Card>
136
- </CategorySection>
137
- );
138
- }
@@ -1,15 +0,0 @@
1
- /**
2
- * UILayout Components
3
- * All UI components for UILayout
4
- */
5
-
6
- // Layout components
7
- export * from './layout';
8
-
9
- // Shared components
10
- export * from './shared';
11
-
12
- // Content components (keeping old exports for backward compatibility)
13
- export { AutoComponentDemo, CategorySection } from './AutoComponentDemo';
14
- export { CategoryRenderer } from './CategoryRenderer';
15
- export { TailwindGuideRenderer } from './TailwindGuideRenderer';
@@ -1,58 +0,0 @@
1
- /**
2
- * CopyAIButton Component
3
- * Button for copying AI context to clipboard
4
- */
5
-
6
- 'use client';
7
-
8
- import React from 'react';
9
- import { Button } from '@djangocfg/ui';
10
- import { Sparkles, Check } from 'lucide-react';
11
- import { useAIExport } from '../../../hooks';
12
-
13
- interface CopyAIButtonProps {
14
- /** Function to generate AI context - must return string */
15
- onCopyForAI?: () => string;
16
- /** Button size */
17
- size?: 'sm' | 'default' | 'lg';
18
- /** Show text label */
19
- showLabel?: boolean;
20
- /** Custom class name */
21
- className?: string;
22
- }
23
-
24
- /**
25
- * Copy for AI Button
26
- * Shows "Copied!" feedback after successful copy
27
- */
28
- export function CopyAIButton({
29
- onCopyForAI,
30
- size = 'sm',
31
- showLabel = true,
32
- className,
33
- }: CopyAIButtonProps) {
34
- const { copied, exportForAI } = useAIExport({
35
- generateContext: onCopyForAI,
36
- });
37
-
38
- return (
39
- <Button
40
- variant="outline"
41
- size={size}
42
- onClick={exportForAI}
43
- className={className}
44
- >
45
- {copied ? (
46
- <>
47
- <Check className="h-4 w-4" />
48
- {showLabel && <span className="ml-2">Copied!</span>}
49
- </>
50
- ) : (
51
- <>
52
- <Sparkles className="h-4 w-4" />
53
- {showLabel && <span className="ml-2">Copy for AI</span>}
54
- </>
55
- )}
56
- </Button>
57
- );
58
- }
@@ -1,60 +0,0 @@
1
- /**
2
- * Header Component
3
- * Simple unified header for UI documentation
4
- */
5
-
6
- 'use client';
7
-
8
- import React from 'react';
9
- import { CopyAIButton } from './CopyAIButton';
10
- import { TestValidationButton } from './TestValidationButton';
11
-
12
- export interface HeaderProps {
13
- /** Page title */
14
- title?: string;
15
- /** Project name */
16
- projectName?: string;
17
- /** Logo component */
18
- logo?: React.ReactNode;
19
- /** Copy for AI callback - must return string */
20
- onCopyForAI?: () => string;
21
- }
22
-
23
- /**
24
- * Header Component
25
- * Displays title and Copy for AI button
26
- */
27
- export function Header({
28
- title = 'UI Component Library',
29
- projectName = 'Django CFG',
30
- logo,
31
- onCopyForAI,
32
- }: HeaderProps) {
33
- return (
34
- <header className="w-full border-b bg-background">
35
- <div className="container mx-auto max-w-7xl px-4 sm:px-6 lg:px-8">
36
- <div className="flex items-center justify-between h-16">
37
- {/* Left: Logo and Title */}
38
- <div className="flex items-center gap-3">
39
- {logo && <div className="flex-shrink-0">{logo}</div>}
40
- <div className="flex flex-col">
41
- <h1 className="text-lg font-semibold tracking-tight">{title}</h1>
42
- <p className="text-xs text-muted-foreground hidden sm:block">{projectName}</p>
43
- </div>
44
- </div>
45
-
46
- {/* Right: Developer Tools */}
47
- <div className="flex items-center gap-2">
48
- {/* Test Validation Error Button (dev only) */}
49
- <TestValidationButton size="sm" />
50
-
51
- {/* Copy for AI Button */}
52
- {onCopyForAI && (
53
- <CopyAIButton onCopyForAI={onCopyForAI} />
54
- )}
55
- </div>
56
- </div>
57
- </div>
58
- </header>
59
- );
60
- }
@@ -1,51 +0,0 @@
1
- /**
2
- * HeaderDesktop Component
3
- * Desktop version of the header
4
- */
5
-
6
- 'use client';
7
-
8
- import React from 'react';
9
- import { CopyAIButton } from './CopyAIButton';
10
- import { TestValidationButton } from './TestValidationButton';
11
-
12
- interface HeaderDesktopProps {
13
- /** Page title */
14
- title?: string;
15
- /** Copy for AI callback - must return string */
16
- onCopyForAI?: () => string;
17
- }
18
-
19
- /**
20
- * Desktop Header
21
- * Full-width header for desktop with page title and actions
22
- */
23
- export function HeaderDesktop({
24
- title = 'UI Component Library',
25
- onCopyForAI,
26
- }: HeaderDesktopProps) {
27
- return (
28
- <div className="border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60">
29
- <div className="flex h-14 items-center gap-4 px-6">
30
- {/* Page Title */}
31
- <div className="flex-1">
32
- <h1 className="text-lg font-semibold">{title}</h1>
33
- </div>
34
-
35
- {/* Developer Tools */}
36
- <div className="flex items-center gap-2">
37
- {/* Test Validation Error Button (dev only) */}
38
- <TestValidationButton size="sm" />
39
-
40
- {/* Copy for AI Button */}
41
- <CopyAIButton
42
- onCopyForAI={onCopyForAI}
43
- size="sm"
44
- showLabel={true}
45
- className="gap-2"
46
- />
47
- </div>
48
- </div>
49
- </div>
50
- );
51
- }