@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.
- package/package.json +5 -5
- package/src/auth/middlewares/index.ts +1 -1
- package/src/auth/middlewares/proxy.ts +10 -2
- package/src/layouts/index.ts +0 -3
- package/src/snippets/ContactForm/ContactPage.tsx +16 -3
- package/src/layouts/UILayout/README.md +0 -267
- package/src/layouts/UILayout/SUMMARY.md +0 -298
- package/src/layouts/UILayout/TOOLS_INTEGRATION.md +0 -216
- package/src/layouts/UILayout/components/AutoComponentDemo.tsx +0 -77
- package/src/layouts/UILayout/components/CategoryRenderer.tsx +0 -45
- package/src/layouts/UILayout/components/TailwindGuideRenderer.tsx +0 -138
- package/src/layouts/UILayout/components/index.ts +0 -15
- package/src/layouts/UILayout/components/layout/Header/CopyAIButton.tsx +0 -58
- package/src/layouts/UILayout/components/layout/Header/Header.tsx +0 -60
- package/src/layouts/UILayout/components/layout/Header/HeaderDesktop.tsx +0 -51
- package/src/layouts/UILayout/components/layout/Header/HeaderMobile.tsx +0 -71
- package/src/layouts/UILayout/components/layout/Header/TestValidationButton.tsx +0 -268
- package/src/layouts/UILayout/components/layout/Header/index.ts +0 -11
- package/src/layouts/UILayout/components/layout/MobileOverlay/MobileOverlay.tsx +0 -47
- package/src/layouts/UILayout/components/layout/MobileOverlay/index.ts +0 -6
- package/src/layouts/UILayout/components/layout/Sidebar/Sidebar.tsx +0 -95
- package/src/layouts/UILayout/components/layout/Sidebar/SidebarCategory.tsx +0 -54
- package/src/layouts/UILayout/components/layout/Sidebar/SidebarContent.tsx +0 -93
- package/src/layouts/UILayout/components/layout/Sidebar/SidebarFooter.tsx +0 -49
- package/src/layouts/UILayout/components/layout/Sidebar/index.ts +0 -9
- package/src/layouts/UILayout/components/layout/index.ts +0 -8
- package/src/layouts/UILayout/components/shared/Badge/CountBadge.tsx +0 -38
- package/src/layouts/UILayout/components/shared/Badge/index.ts +0 -5
- package/src/layouts/UILayout/components/shared/CodeBlock/CodeBlock.tsx +0 -48
- package/src/layouts/UILayout/components/shared/CodeBlock/CopyButton.tsx +0 -49
- package/src/layouts/UILayout/components/shared/CodeBlock/index.ts +0 -6
- package/src/layouts/UILayout/components/shared/Section/Section.tsx +0 -63
- package/src/layouts/UILayout/components/shared/Section/index.ts +0 -5
- package/src/layouts/UILayout/components/shared/index.ts +0 -8
- package/src/layouts/UILayout/config/ai-export.config.ts +0 -89
- package/src/layouts/UILayout/config/categories.config.tsx +0 -122
- package/src/layouts/UILayout/config/components/blocks.config.tsx +0 -239
- package/src/layouts/UILayout/config/components/data.config.tsx +0 -433
- package/src/layouts/UILayout/config/components/feedback.config.tsx +0 -290
- package/src/layouts/UILayout/config/components/forms.config.tsx +0 -996
- package/src/layouts/UILayout/config/components/hooks.config.tsx +0 -168
- package/src/layouts/UILayout/config/components/index.ts +0 -72
- package/src/layouts/UILayout/config/components/layout.config.tsx +0 -246
- package/src/layouts/UILayout/config/components/navigation.config.tsx +0 -352
- package/src/layouts/UILayout/config/components/overlay.config.tsx +0 -569
- package/src/layouts/UILayout/config/components/specialized.config.tsx +0 -400
- package/src/layouts/UILayout/config/components/tools.config.tsx +0 -234
- package/src/layouts/UILayout/config/components/types.ts +0 -14
- package/src/layouts/UILayout/config/index.ts +0 -42
- package/src/layouts/UILayout/config/tailwind.config.ts +0 -131
- package/src/layouts/UILayout/constants.ts +0 -23
- package/src/layouts/UILayout/context/ShowcaseContext.tsx +0 -81
- package/src/layouts/UILayout/context/index.ts +0 -1
- package/src/layouts/UILayout/core/UIGuideApp.client.tsx +0 -18
- package/src/layouts/UILayout/core/UIGuideApp.tsx +0 -33
- package/src/layouts/UILayout/core/UIGuideLanding.tsx +0 -172
- package/src/layouts/UILayout/core/UIGuideView.tsx +0 -61
- package/src/layouts/UILayout/core/UILayout.tsx +0 -125
- package/src/layouts/UILayout/core/UILayoutSidebar.tsx +0 -11
- package/src/layouts/UILayout/core/index.ts +0 -10
- package/src/layouts/UILayout/hooks/index.ts +0 -9
- package/src/layouts/UILayout/hooks/useAIExport.ts +0 -78
- package/src/layouts/UILayout/hooks/useCategoryNavigation.ts +0 -92
- package/src/layouts/UILayout/hooks/useComponentSearch.ts +0 -81
- package/src/layouts/UILayout/hooks/useSidebarState.ts +0 -36
- package/src/layouts/UILayout/index.ts +0 -160
- package/src/layouts/UILayout/types/component.ts +0 -45
- package/src/layouts/UILayout/types/index.ts +0 -23
- package/src/layouts/UILayout/types/layout.ts +0 -57
- package/src/layouts/UILayout/types/navigation.ts +0 -33
- package/src/layouts/UILayout/utils/ai-export/formatters.ts +0 -71
- package/src/layouts/UILayout/utils/ai-export/index.ts +0 -5
- package/src/layouts/UILayout/utils/component-helpers/filter.ts +0 -109
- package/src/layouts/UILayout/utils/component-helpers/index.ts +0 -6
- package/src/layouts/UILayout/utils/component-helpers/search.ts +0 -95
- package/src/layouts/UILayout/utils/index.ts +0 -6
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Sidebar Components
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
export { Sidebar } from './Sidebar';
|
|
6
|
-
export type { SidebarProps } from './Sidebar';
|
|
7
|
-
export { SidebarContent } from './SidebarContent';
|
|
8
|
-
export { SidebarCategory } from './SidebarCategory';
|
|
9
|
-
export { SidebarFooter } from './SidebarFooter';
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CountBadge Component
|
|
3
|
-
* Badge for displaying count numbers
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
'use client';
|
|
7
|
-
|
|
8
|
-
import React from 'react';
|
|
9
|
-
import { cn } from '@djangocfg/ui/lib';
|
|
10
|
-
|
|
11
|
-
interface CountBadgeProps {
|
|
12
|
-
/** Count to display */
|
|
13
|
-
count: number;
|
|
14
|
-
/** Is active/selected */
|
|
15
|
-
active?: boolean;
|
|
16
|
-
/** Custom class name */
|
|
17
|
-
className?: string;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Count Badge
|
|
22
|
-
* Displays a count number with optional active state
|
|
23
|
-
*/
|
|
24
|
-
export function CountBadge({ count, active = false, className }: CountBadgeProps) {
|
|
25
|
-
return (
|
|
26
|
-
<span
|
|
27
|
-
className={cn(
|
|
28
|
-
'text-xs px-2 py-0.5 rounded-full flex-shrink-0',
|
|
29
|
-
active
|
|
30
|
-
? 'bg-primary-foreground/20 text-primary-foreground'
|
|
31
|
-
: 'bg-muted text-muted-foreground',
|
|
32
|
-
className
|
|
33
|
-
)}
|
|
34
|
-
>
|
|
35
|
-
{count}
|
|
36
|
-
</span>
|
|
37
|
-
);
|
|
38
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CodeBlock Component
|
|
3
|
-
* Displays code with syntax highlighting and copy button
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
'use client';
|
|
7
|
-
|
|
8
|
-
import React from 'react';
|
|
9
|
-
import { cn } from '@djangocfg/ui/lib';
|
|
10
|
-
import { CopyButton } from './CopyButton';
|
|
11
|
-
|
|
12
|
-
interface CodeBlockProps {
|
|
13
|
-
/** Code to display */
|
|
14
|
-
code: string;
|
|
15
|
-
/** Programming language */
|
|
16
|
-
language?: string;
|
|
17
|
-
/** Show copy button */
|
|
18
|
-
showCopy?: boolean;
|
|
19
|
-
/** Custom class name */
|
|
20
|
-
className?: string;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Code Block
|
|
25
|
-
* Displays formatted code with optional copy functionality
|
|
26
|
-
*/
|
|
27
|
-
export function CodeBlock({
|
|
28
|
-
code,
|
|
29
|
-
language = 'tsx',
|
|
30
|
-
showCopy = true,
|
|
31
|
-
className,
|
|
32
|
-
}: CodeBlockProps) {
|
|
33
|
-
return (
|
|
34
|
-
<div className={cn('relative group', className)}>
|
|
35
|
-
{/* Copy Button */}
|
|
36
|
-
{showCopy && (
|
|
37
|
-
<div className="absolute right-2 top-2 opacity-0 group-hover:opacity-100 transition-opacity">
|
|
38
|
-
<CopyButton code={code} />
|
|
39
|
-
</div>
|
|
40
|
-
)}
|
|
41
|
-
|
|
42
|
-
{/* Code Display */}
|
|
43
|
-
<pre className="bg-muted/50 rounded-lg p-4 overflow-x-auto">
|
|
44
|
-
<code className={`language-${language} text-sm`}>{code}</code>
|
|
45
|
-
</pre>
|
|
46
|
-
</div>
|
|
47
|
-
);
|
|
48
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CopyButton Component
|
|
3
|
-
* Button for copying code to clipboard
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
'use client';
|
|
7
|
-
|
|
8
|
-
import React, { useState } from 'react';
|
|
9
|
-
import { Button } from '@djangocfg/ui';
|
|
10
|
-
import { Copy, Check } from 'lucide-react';
|
|
11
|
-
import { useCopy } from '@djangocfg/ui';
|
|
12
|
-
|
|
13
|
-
interface CopyButtonProps {
|
|
14
|
-
/** Code to copy */
|
|
15
|
-
code: string;
|
|
16
|
-
/** Button size */
|
|
17
|
-
size?: 'sm' | 'default' | 'lg';
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Copy Button
|
|
22
|
-
* Shows check icon after successful copy
|
|
23
|
-
*/
|
|
24
|
-
export function CopyButton({ code, size = 'sm' }: CopyButtonProps) {
|
|
25
|
-
const [copied, setCopied] = useState(false);
|
|
26
|
-
const { copyToClipboard } = useCopy();
|
|
27
|
-
|
|
28
|
-
const handleCopy = async () => {
|
|
29
|
-
await copyToClipboard(code);
|
|
30
|
-
setCopied(true);
|
|
31
|
-
setTimeout(() => setCopied(false), 2000);
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
return (
|
|
35
|
-
<Button
|
|
36
|
-
variant="ghost"
|
|
37
|
-
size={size}
|
|
38
|
-
onClick={handleCopy}
|
|
39
|
-
className="h-8 w-8 p-0"
|
|
40
|
-
aria-label="Copy code"
|
|
41
|
-
>
|
|
42
|
-
{copied ? (
|
|
43
|
-
<Check className="h-4 w-4 text-green-500" />
|
|
44
|
-
) : (
|
|
45
|
-
<Copy className="h-4 w-4" />
|
|
46
|
-
)}
|
|
47
|
-
</Button>
|
|
48
|
-
);
|
|
49
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Section Component
|
|
3
|
-
* Reusable section with title and optional description
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
'use client';
|
|
7
|
-
|
|
8
|
-
import React, { ReactNode } from 'react';
|
|
9
|
-
import { cn } from '@djangocfg/ui/lib';
|
|
10
|
-
|
|
11
|
-
interface SectionProps {
|
|
12
|
-
/** Section title */
|
|
13
|
-
title?: string;
|
|
14
|
-
/** Section description */
|
|
15
|
-
description?: string;
|
|
16
|
-
/** Section content */
|
|
17
|
-
children: ReactNode;
|
|
18
|
-
/** Custom class name */
|
|
19
|
-
className?: string;
|
|
20
|
-
/** Title class name */
|
|
21
|
-
titleClassName?: string;
|
|
22
|
-
/** Content class name */
|
|
23
|
-
contentClassName?: string;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Section Component
|
|
28
|
-
* Displays a section with optional title and description
|
|
29
|
-
*/
|
|
30
|
-
export function Section({
|
|
31
|
-
title,
|
|
32
|
-
description,
|
|
33
|
-
children,
|
|
34
|
-
className,
|
|
35
|
-
titleClassName,
|
|
36
|
-
contentClassName,
|
|
37
|
-
}: SectionProps) {
|
|
38
|
-
return (
|
|
39
|
-
<section className={cn('space-y-4', className)}>
|
|
40
|
-
{/* Header */}
|
|
41
|
-
{(title || description) && (
|
|
42
|
-
<div className="space-y-1">
|
|
43
|
-
{title && (
|
|
44
|
-
<h2
|
|
45
|
-
className={cn(
|
|
46
|
-
'text-2xl font-bold tracking-tight',
|
|
47
|
-
titleClassName
|
|
48
|
-
)}
|
|
49
|
-
>
|
|
50
|
-
{title}
|
|
51
|
-
</h2>
|
|
52
|
-
)}
|
|
53
|
-
{description && (
|
|
54
|
-
<p className="text-sm text-muted-foreground">{description}</p>
|
|
55
|
-
)}
|
|
56
|
-
</div>
|
|
57
|
-
)}
|
|
58
|
-
|
|
59
|
-
{/* Content */}
|
|
60
|
-
<div className={contentClassName}>{children}</div>
|
|
61
|
-
</section>
|
|
62
|
-
);
|
|
63
|
-
}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* AI Export Configuration
|
|
3
|
-
* Generates formatted documentation for AI consumption
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import { COMPONENTS_CONFIG, getAllCategories } from './components';
|
|
7
|
-
import { TAILWIND_GUIDE } from './tailwind.config';
|
|
8
|
-
|
|
9
|
-
export interface UILibraryConfig {
|
|
10
|
-
projectName: string;
|
|
11
|
-
version: string;
|
|
12
|
-
description: string;
|
|
13
|
-
totalComponents: number;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export const UI_LIBRARY_CONFIG: UILibraryConfig = {
|
|
17
|
-
projectName: "Django CFG UI",
|
|
18
|
-
version: "1.0.0",
|
|
19
|
-
description: "Comprehensive React UI library with 56+ components, 7 blocks, and 11 hooks built with Radix UI, Tailwind CSS v4, and TypeScript",
|
|
20
|
-
totalComponents: COMPONENTS_CONFIG.length,
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Generate formatted text for AI consumption
|
|
25
|
-
* This is the single source of truth that gets copied to clipboard
|
|
26
|
-
*/
|
|
27
|
-
export function generateAIContext(): string {
|
|
28
|
-
const { projectName, version, description } = UI_LIBRARY_CONFIG;
|
|
29
|
-
|
|
30
|
-
let output = `# ${projectName} v${version}\n\n`;
|
|
31
|
-
output += `${description}\n\n`;
|
|
32
|
-
|
|
33
|
-
// Quick Reference - Available Components
|
|
34
|
-
output += `## 📋 Quick Reference - Available Components\n\n`;
|
|
35
|
-
const categories = getAllCategories();
|
|
36
|
-
categories.forEach(category => {
|
|
37
|
-
const comps = COMPONENTS_CONFIG.filter(comp => comp.category === category);
|
|
38
|
-
const componentNames = comps.map(c => c.name).join(', ');
|
|
39
|
-
output += `### ${category.charAt(0).toUpperCase() + category.slice(1)} (${comps.length})\n`;
|
|
40
|
-
output += `${componentNames}\n\n`;
|
|
41
|
-
});
|
|
42
|
-
output += `---\n\n`;
|
|
43
|
-
|
|
44
|
-
// Tailwind 4 Guide
|
|
45
|
-
output += `## Tailwind CSS v${TAILWIND_GUIDE.version} Guidelines\n\n`;
|
|
46
|
-
|
|
47
|
-
output += `### Key Changes\n`;
|
|
48
|
-
TAILWIND_GUIDE.keyChanges.forEach(change => {
|
|
49
|
-
output += `- ${change}\n`;
|
|
50
|
-
});
|
|
51
|
-
output += `\n`;
|
|
52
|
-
|
|
53
|
-
output += `### Best Practices\n`;
|
|
54
|
-
TAILWIND_GUIDE.bestPractices.forEach(practice => {
|
|
55
|
-
output += `- ${practice}\n`;
|
|
56
|
-
});
|
|
57
|
-
output += `\n`;
|
|
58
|
-
|
|
59
|
-
output += `### Migration Steps\n`;
|
|
60
|
-
TAILWIND_GUIDE.migrationSteps.forEach((step, index) => {
|
|
61
|
-
output += `${index + 1}. ${step}\n`;
|
|
62
|
-
});
|
|
63
|
-
output += `\n`;
|
|
64
|
-
|
|
65
|
-
output += `### Examples\n\n`;
|
|
66
|
-
TAILWIND_GUIDE.examples.forEach(example => {
|
|
67
|
-
output += `#### ${example.title}\n`;
|
|
68
|
-
output += `${example.description}\n\n`;
|
|
69
|
-
output += `\`\`\`css\n${example.code}\n\`\`\`\n\n`;
|
|
70
|
-
});
|
|
71
|
-
|
|
72
|
-
// Components by Category
|
|
73
|
-
categories.forEach(category => {
|
|
74
|
-
const comps = COMPONENTS_CONFIG.filter(comp => comp.category === category);
|
|
75
|
-
|
|
76
|
-
output += `## ${category.charAt(0).toUpperCase() + category.slice(1)} (${comps.length})\n\n`;
|
|
77
|
-
|
|
78
|
-
comps.forEach(comp => {
|
|
79
|
-
output += `### ${comp.name}\n`;
|
|
80
|
-
output += `${comp.description}\n\n`;
|
|
81
|
-
output += `\`\`\`tsx\n`;
|
|
82
|
-
output += `${comp.importPath}\n\n`;
|
|
83
|
-
output += `${comp.example}\n`;
|
|
84
|
-
output += `\`\`\`\n\n`;
|
|
85
|
-
});
|
|
86
|
-
});
|
|
87
|
-
|
|
88
|
-
return output;
|
|
89
|
-
}
|
|
@@ -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
|
-
}
|