nextworks 0.2.0-alpha.11 → 0.2.0-alpha.13

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 (111) hide show
  1. package/README.md +283 -282
  2. package/dist/cli_manifests/blocks_manifest.json +198 -175
  3. package/dist/kits/blocks/.nextworks/docs/BLOCKS_QUICKSTART.md +101 -100
  4. package/dist/kits/blocks/.nextworks/docs/BLOCKS_README.md +105 -104
  5. package/dist/kits/blocks/.nextworks/docs/THEME_GUIDE.md +1 -1
  6. package/dist/kits/blocks/app/templates/aiworkflow/PresetThemeVars.tsx +58 -0
  7. package/dist/kits/blocks/app/templates/aiworkflow/README.md +46 -0
  8. package/dist/kits/blocks/app/templates/aiworkflow/components/CTA.tsx +44 -0
  9. package/dist/kits/blocks/app/templates/aiworkflow/components/Contact.tsx +105 -0
  10. package/dist/kits/blocks/app/templates/aiworkflow/components/FAQ.tsx +63 -0
  11. package/dist/kits/blocks/app/templates/aiworkflow/components/Features.tsx +65 -0
  12. package/dist/kits/blocks/app/templates/aiworkflow/components/Footer.tsx +109 -0
  13. package/dist/kits/blocks/app/templates/aiworkflow/components/Hero.tsx +636 -0
  14. package/dist/kits/blocks/app/templates/aiworkflow/components/Navbar.tsx +90 -0
  15. package/dist/kits/blocks/app/templates/aiworkflow/components/Pricing.tsx +86 -0
  16. package/dist/kits/blocks/app/templates/aiworkflow/components/ProcessTimeline.tsx +103 -0
  17. package/dist/kits/blocks/app/templates/aiworkflow/components/Testimonials.tsx +56 -0
  18. package/dist/kits/blocks/app/templates/aiworkflow/components/TrustBadges.tsx +59 -0
  19. package/dist/kits/blocks/app/templates/aiworkflow/page.tsx +43 -0
  20. package/dist/kits/blocks/app/templates/digitalagency/PresetThemeVars.tsx +80 -80
  21. package/dist/kits/blocks/app/templates/digitalagency/README.md +42 -42
  22. package/dist/kits/blocks/app/templates/digitalagency/components/Pricing.tsx +114 -114
  23. package/dist/kits/blocks/app/templates/digitalagency/components/Process.tsx +59 -59
  24. package/dist/kits/blocks/app/templates/digitalagency/components/Services.tsx +55 -55
  25. package/dist/kits/blocks/app/templates/digitalagency/components/Team.tsx +28 -28
  26. package/dist/kits/blocks/app/templates/digitalagency/components/Testimonials.tsx +65 -65
  27. package/dist/kits/blocks/app/templates/digitalagency/page.tsx +38 -38
  28. package/dist/kits/blocks/app/templates/gallery/PresetThemeVars.tsx +84 -84
  29. package/dist/kits/blocks/app/templates/productlaunch/PresetThemeVars.tsx +75 -75
  30. package/dist/kits/blocks/app/templates/productlaunch/README.md +62 -62
  31. package/dist/kits/blocks/app/templates/productlaunch/components/About.tsx +84 -84
  32. package/dist/kits/blocks/app/templates/productlaunch/components/CTA.tsx +50 -50
  33. package/dist/kits/blocks/app/templates/productlaunch/components/Contact.tsx +231 -231
  34. package/dist/kits/blocks/app/templates/productlaunch/components/FAQ.tsx +86 -86
  35. package/dist/kits/blocks/app/templates/productlaunch/components/Features.tsx +83 -83
  36. package/dist/kits/blocks/app/templates/productlaunch/components/Footer.tsx +132 -132
  37. package/dist/kits/blocks/app/templates/productlaunch/components/Hero.tsx +88 -88
  38. package/dist/kits/blocks/app/templates/productlaunch/components/Navbar.tsx +116 -116
  39. package/dist/kits/blocks/app/templates/productlaunch/components/Pricing.tsx +106 -106
  40. package/dist/kits/blocks/app/templates/productlaunch/components/ProcessTimeline.tsx +110 -110
  41. package/dist/kits/blocks/app/templates/productlaunch/components/ServicesGrid.tsx +68 -68
  42. package/dist/kits/blocks/app/templates/productlaunch/components/Team.tsx +104 -104
  43. package/dist/kits/blocks/app/templates/productlaunch/components/Testimonials.tsx +90 -90
  44. package/dist/kits/blocks/app/templates/productlaunch/components/TrustBadges.tsx +76 -76
  45. package/dist/kits/blocks/app/templates/productlaunch/page.tsx +43 -43
  46. package/dist/kits/blocks/app/templates/saasdashboard/PresetThemeVars.tsx +80 -80
  47. package/dist/kits/blocks/app/templates/saasdashboard/README.md +44 -44
  48. package/dist/kits/blocks/app/templates/saasdashboard/components/Contact.tsx +129 -129
  49. package/dist/kits/blocks/app/templates/saasdashboard/components/Dashboard.tsx +293 -293
  50. package/dist/kits/blocks/app/templates/saasdashboard/components/FAQ.tsx +55 -55
  51. package/dist/kits/blocks/app/templates/saasdashboard/components/Features.tsx +90 -90
  52. package/dist/kits/blocks/app/templates/saasdashboard/components/Footer.tsx +77 -77
  53. package/dist/kits/blocks/app/templates/saasdashboard/components/Hero.tsx +104 -104
  54. package/dist/kits/blocks/app/templates/saasdashboard/components/Hero_mask.tsx +126 -126
  55. package/dist/kits/blocks/app/templates/saasdashboard/components/Navbar.tsx +117 -117
  56. package/dist/kits/blocks/app/templates/saasdashboard/components/Pricing.tsx +90 -90
  57. package/dist/kits/blocks/app/templates/saasdashboard/components/SmoothScroll.tsx +96 -96
  58. package/dist/kits/blocks/app/templates/saasdashboard/components/Testimonials.tsx +72 -72
  59. package/dist/kits/blocks/app/templates/saasdashboard/components/TrustBadges.tsx +53 -53
  60. package/dist/kits/blocks/app/templates/saasdashboard/page.tsx +39 -39
  61. package/dist/kits/blocks/components/enhanced-theme-provider.tsx +195 -195
  62. package/dist/kits/blocks/components/providers/BlocksAppProviders.tsx +27 -27
  63. package/dist/kits/blocks/components/sections/About.tsx +291 -291
  64. package/dist/kits/blocks/components/sections/CTA.tsx +257 -257
  65. package/dist/kits/blocks/components/sections/Contact.tsx +267 -267
  66. package/dist/kits/blocks/components/sections/FAQ.tsx +214 -214
  67. package/dist/kits/blocks/components/sections/Features.tsx +268 -268
  68. package/dist/kits/blocks/components/sections/Footer.tsx +302 -302
  69. package/dist/kits/blocks/components/sections/HeroMotion.tsx +308 -308
  70. package/dist/kits/blocks/components/sections/HeroOverlay.tsx +358 -358
  71. package/dist/kits/blocks/components/sections/HeroProductDemo.tsx +236 -0
  72. package/dist/kits/blocks/components/sections/HeroSplit.tsx +352 -352
  73. package/dist/kits/blocks/components/sections/Navbar.tsx +350 -350
  74. package/dist/kits/blocks/components/sections/PortfolioSimple.tsx +549 -549
  75. package/dist/kits/blocks/components/sections/Pricing.tsx +264 -264
  76. package/dist/kits/blocks/components/sections/ProcessTimeline.tsx +325 -325
  77. package/dist/kits/blocks/components/sections/ServicesGrid.tsx +210 -210
  78. package/dist/kits/blocks/components/sections/Team.tsx +309 -309
  79. package/dist/kits/blocks/components/sections/Testimonials.tsx +158 -158
  80. package/dist/kits/blocks/components/sections/TrustBadges.tsx +162 -162
  81. package/dist/kits/blocks/components/sections/product-demo/ApprovalInboxPanel.tsx +125 -0
  82. package/dist/kits/blocks/components/sections/product-demo/DemoStage.tsx +397 -0
  83. package/dist/kits/blocks/components/sections/product-demo/DemoWindow.tsx +128 -0
  84. package/dist/kits/blocks/components/sections/product-demo/KnowledgePanel.tsx +127 -0
  85. package/dist/kits/blocks/components/sections/product-demo/RunConsolePanel.tsx +150 -0
  86. package/dist/kits/blocks/components/sections/product-demo/WorkflowStudioPanel.tsx +191 -0
  87. package/dist/kits/blocks/components/sections/product-demo/types.ts +193 -0
  88. package/dist/kits/blocks/components/theme-provider.tsx +1 -1
  89. package/dist/kits/blocks/components/ui/alert-dialog.tsx +134 -134
  90. package/dist/kits/blocks/components/ui/brand-node.tsx +121 -121
  91. package/dist/kits/blocks/components/ui/button.tsx +122 -122
  92. package/dist/kits/blocks/components/ui/card.tsx +95 -95
  93. package/dist/kits/blocks/components/ui/checkbox.tsx +30 -30
  94. package/dist/kits/blocks/components/ui/cta-button.tsx +125 -125
  95. package/dist/kits/blocks/components/ui/dropdown-menu.tsx +201 -201
  96. package/dist/kits/blocks/components/ui/feature-card.tsx +91 -91
  97. package/dist/kits/blocks/components/ui/input.tsx +27 -27
  98. package/dist/kits/blocks/components/ui/label.tsx +29 -29
  99. package/dist/kits/blocks/components/ui/pricing-card.tsx +120 -120
  100. package/dist/kits/blocks/components/ui/select.tsx +25 -25
  101. package/dist/kits/blocks/components/ui/skeleton.tsx +13 -13
  102. package/dist/kits/blocks/components/ui/table.tsx +98 -98
  103. package/dist/kits/blocks/components/ui/testimonial-card.tsx +108 -108
  104. package/dist/kits/blocks/components/ui/textarea.tsx +26 -26
  105. package/dist/kits/blocks/components/ui/theme-selector.tsx +243 -243
  106. package/dist/kits/blocks/components/ui/theme-toggle.tsx +74 -74
  107. package/dist/kits/blocks/components/ui/toaster.tsx +7 -7
  108. package/dist/kits/blocks/lib/themes.ts +400 -400
  109. package/dist/kits/blocks/lib/utils.ts +6 -6
  110. package/dist/kits/blocks/package-deps.json +3 -3
  111. package/package.json +1 -1
@@ -1,134 +1,134 @@
1
- "use client";
2
-
3
- import * as React from "react";
4
- import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
5
- import { cn } from "@/lib/utils";
6
-
7
- const AlertDialog = AlertDialogPrimitive.Root;
8
- const AlertDialogTrigger = AlertDialogPrimitive.Trigger;
9
- const AlertDialogPortal = AlertDialogPrimitive.Portal;
10
- const AlertDialogOverlay = React.forwardRef<
11
- React.ElementRef<typeof AlertDialogPrimitive.Overlay>,
12
- React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay>
13
- >(({ className, ...props }, ref) => (
14
- <AlertDialogPrimitive.Overlay
15
- ref={ref}
16
- className={cn("fixed inset-0 z-50 bg-black/50 backdrop-blur-sm", className)}
17
- {...props}
18
- />
19
- ));
20
- AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
21
-
22
- const AlertDialogContent = React.forwardRef<
23
- React.ElementRef<typeof AlertDialogPrimitive.Content>,
24
- React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content>
25
- >(({ className, ...props }, ref) => (
26
- <AlertDialogPortal>
27
- <AlertDialogOverlay />
28
- <AlertDialogPrimitive.Content
29
- ref={ref}
30
- className={cn(
31
- "bg-background fixed top-1/2 left-1/2 z-50 grid w-full max-w-md -translate-x-1/2 -translate-y-1/2 gap-4 rounded-lg border p-6 shadow-lg",
32
- className,
33
- )}
34
- {...props}
35
- />
36
- </AlertDialogPortal>
37
- ));
38
- AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;
39
-
40
- function AlertDialogHeader({
41
- className,
42
- ...props
43
- }: React.HTMLAttributes<HTMLDivElement>) {
44
- return (
45
- <div
46
- className={cn("flex flex-col space-y-1 text-center", className)}
47
- {...props}
48
- />
49
- );
50
- }
51
-
52
- function AlertDialogFooter({
53
- className,
54
- ...props
55
- }: React.HTMLAttributes<HTMLDivElement>) {
56
- return (
57
- <div
58
- className={cn(
59
- "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
60
- className,
61
- )}
62
- {...props}
63
- />
64
- );
65
- }
66
-
67
- const AlertDialogTitle = React.forwardRef<
68
- React.ElementRef<typeof AlertDialogPrimitive.Title>,
69
- React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title>
70
- >(({ className, ...props }, ref) => (
71
- <AlertDialogPrimitive.Title
72
- ref={ref}
73
- className={cn("text-lg font-semibold", className)}
74
- {...props}
75
- />
76
- ));
77
- AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
78
-
79
- const AlertDialogDescription = React.forwardRef<
80
- React.ElementRef<typeof AlertDialogPrimitive.Description>,
81
- React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Description>
82
- >(({ className, ...props }, ref) => (
83
- <AlertDialogPrimitive.Description
84
- ref={ref}
85
- className={cn("text-muted-foreground text-sm", className)}
86
- {...props}
87
- />
88
- ));
89
- AlertDialogDescription.displayName =
90
- AlertDialogPrimitive.Description.displayName;
91
-
92
- const AlertDialogAction = React.forwardRef<
93
- React.ElementRef<typeof AlertDialogPrimitive.Action>,
94
- React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action>
95
- >(({ className, ...props }, ref) => (
96
- <AlertDialogPrimitive.Action
97
- ref={ref}
98
- className={cn(
99
- "bg-destructive text-destructive-foreground inline-flex h-9 items-center justify-center rounded-md px-4 text-sm font-medium shadow transition-colors hover:opacity-90 focus:outline-none",
100
- className,
101
- )}
102
- {...props}
103
- />
104
- ));
105
- AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
106
-
107
- const AlertDialogCancel = React.forwardRef<
108
- React.ElementRef<typeof AlertDialogPrimitive.Cancel>,
109
- React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Cancel>
110
- >(({ className, ...props }, ref) => (
111
- <AlertDialogPrimitive.Cancel
112
- ref={ref}
113
- className={cn(
114
- "bg-background hover:bg-muted inline-flex h-9 items-center justify-center rounded-md border px-4 text-sm font-medium shadow focus:outline-none",
115
- className,
116
- )}
117
- {...props}
118
- />
119
- ));
120
- AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
121
-
122
- export {
123
- AlertDialog,
124
- AlertDialogAction,
125
- AlertDialogCancel,
126
- AlertDialogContent,
127
- AlertDialogDescription,
128
- AlertDialogFooter,
129
- AlertDialogHeader,
130
- AlertDialogOverlay,
131
- AlertDialogPortal,
132
- AlertDialogTitle,
133
- AlertDialogTrigger,
134
- };
1
+ "use client";
2
+
3
+ import * as React from "react";
4
+ import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
5
+ import { cn } from "@/lib/utils";
6
+
7
+ const AlertDialog = AlertDialogPrimitive.Root;
8
+ const AlertDialogTrigger = AlertDialogPrimitive.Trigger;
9
+ const AlertDialogPortal = AlertDialogPrimitive.Portal;
10
+ const AlertDialogOverlay = React.forwardRef<
11
+ React.ElementRef<typeof AlertDialogPrimitive.Overlay>,
12
+ React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay>
13
+ >(({ className, ...props }, ref) => (
14
+ <AlertDialogPrimitive.Overlay
15
+ ref={ref}
16
+ className={cn("fixed inset-0 z-50 bg-black/50 backdrop-blur-sm", className)}
17
+ {...props}
18
+ />
19
+ ));
20
+ AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
21
+
22
+ const AlertDialogContent = React.forwardRef<
23
+ React.ElementRef<typeof AlertDialogPrimitive.Content>,
24
+ React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content>
25
+ >(({ className, ...props }, ref) => (
26
+ <AlertDialogPortal>
27
+ <AlertDialogOverlay />
28
+ <AlertDialogPrimitive.Content
29
+ ref={ref}
30
+ className={cn(
31
+ "bg-background fixed top-1/2 left-1/2 z-50 grid w-full max-w-md -translate-x-1/2 -translate-y-1/2 gap-4 rounded-lg border p-6 shadow-lg",
32
+ className,
33
+ )}
34
+ {...props}
35
+ />
36
+ </AlertDialogPortal>
37
+ ));
38
+ AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;
39
+
40
+ function AlertDialogHeader({
41
+ className,
42
+ ...props
43
+ }: React.HTMLAttributes<HTMLDivElement>) {
44
+ return (
45
+ <div
46
+ className={cn("flex flex-col space-y-1 text-center", className)}
47
+ {...props}
48
+ />
49
+ );
50
+ }
51
+
52
+ function AlertDialogFooter({
53
+ className,
54
+ ...props
55
+ }: React.HTMLAttributes<HTMLDivElement>) {
56
+ return (
57
+ <div
58
+ className={cn(
59
+ "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
60
+ className,
61
+ )}
62
+ {...props}
63
+ />
64
+ );
65
+ }
66
+
67
+ const AlertDialogTitle = React.forwardRef<
68
+ React.ElementRef<typeof AlertDialogPrimitive.Title>,
69
+ React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title>
70
+ >(({ className, ...props }, ref) => (
71
+ <AlertDialogPrimitive.Title
72
+ ref={ref}
73
+ className={cn("text-lg font-semibold", className)}
74
+ {...props}
75
+ />
76
+ ));
77
+ AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
78
+
79
+ const AlertDialogDescription = React.forwardRef<
80
+ React.ElementRef<typeof AlertDialogPrimitive.Description>,
81
+ React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Description>
82
+ >(({ className, ...props }, ref) => (
83
+ <AlertDialogPrimitive.Description
84
+ ref={ref}
85
+ className={cn("text-muted-foreground text-sm", className)}
86
+ {...props}
87
+ />
88
+ ));
89
+ AlertDialogDescription.displayName =
90
+ AlertDialogPrimitive.Description.displayName;
91
+
92
+ const AlertDialogAction = React.forwardRef<
93
+ React.ElementRef<typeof AlertDialogPrimitive.Action>,
94
+ React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action>
95
+ >(({ className, ...props }, ref) => (
96
+ <AlertDialogPrimitive.Action
97
+ ref={ref}
98
+ className={cn(
99
+ "bg-destructive text-destructive-foreground inline-flex h-9 items-center justify-center rounded-md px-4 text-sm font-medium shadow transition-colors hover:opacity-90 focus:outline-none",
100
+ className,
101
+ )}
102
+ {...props}
103
+ />
104
+ ));
105
+ AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
106
+
107
+ const AlertDialogCancel = React.forwardRef<
108
+ React.ElementRef<typeof AlertDialogPrimitive.Cancel>,
109
+ React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Cancel>
110
+ >(({ className, ...props }, ref) => (
111
+ <AlertDialogPrimitive.Cancel
112
+ ref={ref}
113
+ className={cn(
114
+ "bg-background hover:bg-muted inline-flex h-9 items-center justify-center rounded-md border px-4 text-sm font-medium shadow focus:outline-none",
115
+ className,
116
+ )}
117
+ {...props}
118
+ />
119
+ ));
120
+ AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
121
+
122
+ export {
123
+ AlertDialog,
124
+ AlertDialogAction,
125
+ AlertDialogCancel,
126
+ AlertDialogContent,
127
+ AlertDialogDescription,
128
+ AlertDialogFooter,
129
+ AlertDialogHeader,
130
+ AlertDialogOverlay,
131
+ AlertDialogPortal,
132
+ AlertDialogTitle,
133
+ AlertDialogTrigger,
134
+ };
@@ -1,121 +1,121 @@
1
- "use client";
2
-
3
- import React from "react";
4
- import type { ComponentType } from "react";
5
- import { Sparkles } from "lucide-react";
6
- import { cn } from "@/lib/utils";
7
-
8
- export interface BrandNodeProps {
9
- /** Optional wrapper className to override size/colors (merged with defaults) */
10
- className?: string;
11
- }
12
-
13
- export interface BrandNodeIconBadgeProps extends BrandNodeProps {
14
- /** Icon component to render inside the badge */
15
- icon?: ComponentType<{ className?: string }>;
16
- /** Tailwind classes to control icon size; default `h-4 w-4` */
17
- iconClassName?: string;
18
- }
19
-
20
- export function BrandNodeIconBadge({
21
- className,
22
- icon: Icon = Sparkles,
23
- iconClassName = "h-4 w-4",
24
- }: BrandNodeIconBadgeProps) {
25
- const base = "grid h-8 w-8 place-items-center rounded-md bg-primary/10 ring-1 ring-primary/30 text-primary";
26
- return (
27
- <div className={cn(base, className)} aria-label="Brand icon badge">
28
- <Icon className={iconClassName} />
29
- </div>
30
- );
31
- }
32
-
33
- export interface BrandNodeGradientRingProps extends BrandNodeProps {
34
- /** CSS conic-gradient string; provide two or more colors */
35
- gradient?: string;
36
- /** Inner fill background (center disc) */
37
- innerBgClassName?: string;
38
- }
39
-
40
- export function BrandNodeGradientRing({
41
- className,
42
- gradient = "conic-gradient(hsl(var(--primary)), hsl(var(--accent)), hsl(var(--primary)))",
43
- innerBgClassName = "h-full w-full rounded-full bg-background",
44
- }: BrandNodeGradientRingProps) {
45
- const base = "relative h-8 w-8";
46
- return (
47
- <div className={cn(base, className)} aria-label="Brand gradient ring">
48
- <div className="absolute inset-0 rounded-full p-[2px]" style={{ background: gradient }}>
49
- <div className={innerBgClassName} />
50
- </div>
51
- </div>
52
- );
53
- }
54
-
55
- export function BrandNodeGeometricMark({ className }: BrandNodeProps) {
56
- const base = "grid h-8 w-8 place-items-center rounded-md bg-gradient-to-br from-primary/10 to-accent/10 ring-1 ring-border";
57
- return (
58
- <div className={cn(base, className)} aria-label="Brand geometric mark">
59
- <svg viewBox="0 0 24 24" className="fill-primary h-4 w-4">
60
- <path d="M12 4l8 14H4l8-14z" />
61
- </svg>
62
- </div>
63
- );
64
- }
65
-
66
- export interface BrandNodeEmojiBadgeProps extends BrandNodeProps {
67
- emoji?: string;
68
- }
69
-
70
- export function BrandNodeEmojiBadge({ className, emoji = "⚡" }: BrandNodeEmojiBadgeProps) {
71
- const base = "grid h-8 w-8 place-items-center rounded-md bg-card/60 backdrop-blur ring-1 ring-border";
72
- return (
73
- <div className={cn(base, className)} aria-label="Brand emoji badge">
74
- <span className="text-base" aria-hidden>
75
- {emoji}
76
- </span>
77
- </div>
78
- );
79
- }
80
-
81
- export interface BrandNodeDiagonalAppIconProps extends BrandNodeProps {
82
- /** Base and overlay colors */
83
- baseColorClass?: string;
84
- overlayColorClass?: string;
85
- }
86
-
87
- export function BrandNodeDiagonalAppIcon({
88
- className,
89
- baseColorClass = "bg-primary",
90
- overlayColorClass = "bg-accent",
91
- }: BrandNodeDiagonalAppIconProps) {
92
- const base = "relative h-8 w-8 overflow-hidden rounded-md ring-1 ring-black/5 dark:ring-white/10";
93
- return (
94
- <div className={cn(base, className)} aria-label="Brand diagonal app icon">
95
- <div className={cn("absolute inset-0", baseColorClass)} />
96
- <div className={cn("absolute inset-0 translate-y-1/3 -skew-y-12", overlayColorClass)} />
97
- </div>
98
- );
99
- }
100
-
101
- export function BrandNodeCubeOutline({ className }: BrandNodeProps) {
102
- const base = "grid h-8 w-8 place-items-center rounded-md bg-foreground text-background ring-1 ring-border";
103
- return (
104
- <div className={cn(base, className)} aria-label="Brand cube outline">
105
- <svg viewBox="0 0 24 24" className="h-4 w-4">
106
- <path d="M12 2l8 4.5v9L12 20 4 15.5v-9L12 2z" fill="none" stroke="currentColor" strokeWidth="1.6" />
107
- <path d="M12 20v-9M4 6l8 5 8-5" fill="none" stroke="currentColor" strokeWidth="1.6" />
108
- </svg>
109
- </div>
110
- );
111
- }
112
-
113
- /** Registry for quick swapping by name */
114
- export const BrandNodes = {
115
- IconBadge: BrandNodeIconBadge,
116
- GradientRing: BrandNodeGradientRing,
117
- GeometricMark: BrandNodeGeometricMark,
118
- EmojiBadge: BrandNodeEmojiBadge,
119
- DiagonalAppIcon: BrandNodeDiagonalAppIcon,
120
- CubeOutline: BrandNodeCubeOutline,
121
- };
1
+ "use client";
2
+
3
+ import React from "react";
4
+ import type { ComponentType } from "react";
5
+ import { Sparkles } from "lucide-react";
6
+ import { cn } from "@/lib/utils";
7
+
8
+ export interface BrandNodeProps {
9
+ /** Optional wrapper className to override size/colors (merged with defaults) */
10
+ className?: string;
11
+ }
12
+
13
+ export interface BrandNodeIconBadgeProps extends BrandNodeProps {
14
+ /** Icon component to render inside the badge */
15
+ icon?: ComponentType<{ className?: string }>;
16
+ /** Tailwind classes to control icon size; default `h-4 w-4` */
17
+ iconClassName?: string;
18
+ }
19
+
20
+ export function BrandNodeIconBadge({
21
+ className,
22
+ icon: Icon = Sparkles,
23
+ iconClassName = "h-4 w-4",
24
+ }: BrandNodeIconBadgeProps) {
25
+ const base = "grid h-8 w-8 place-items-center rounded-md bg-primary/10 ring-1 ring-primary/30 text-primary";
26
+ return (
27
+ <div className={cn(base, className)} aria-label="Brand icon badge">
28
+ <Icon className={iconClassName} />
29
+ </div>
30
+ );
31
+ }
32
+
33
+ export interface BrandNodeGradientRingProps extends BrandNodeProps {
34
+ /** CSS conic-gradient string; provide two or more colors */
35
+ gradient?: string;
36
+ /** Inner fill background (center disc) */
37
+ innerBgClassName?: string;
38
+ }
39
+
40
+ export function BrandNodeGradientRing({
41
+ className,
42
+ gradient = "conic-gradient(hsl(var(--primary)), hsl(var(--accent)), hsl(var(--primary)))",
43
+ innerBgClassName = "h-full w-full rounded-full bg-background",
44
+ }: BrandNodeGradientRingProps) {
45
+ const base = "relative h-8 w-8";
46
+ return (
47
+ <div className={cn(base, className)} aria-label="Brand gradient ring">
48
+ <div className="absolute inset-0 rounded-full p-[2px]" style={{ background: gradient }}>
49
+ <div className={innerBgClassName} />
50
+ </div>
51
+ </div>
52
+ );
53
+ }
54
+
55
+ export function BrandNodeGeometricMark({ className }: BrandNodeProps) {
56
+ const base = "grid h-8 w-8 place-items-center rounded-md bg-gradient-to-br from-primary/10 to-accent/10 ring-1 ring-border";
57
+ return (
58
+ <div className={cn(base, className)} aria-label="Brand geometric mark">
59
+ <svg viewBox="0 0 24 24" className="fill-primary h-4 w-4">
60
+ <path d="M12 4l8 14H4l8-14z" />
61
+ </svg>
62
+ </div>
63
+ );
64
+ }
65
+
66
+ export interface BrandNodeEmojiBadgeProps extends BrandNodeProps {
67
+ emoji?: string;
68
+ }
69
+
70
+ export function BrandNodeEmojiBadge({ className, emoji = "⚡" }: BrandNodeEmojiBadgeProps) {
71
+ const base = "grid h-8 w-8 place-items-center rounded-md bg-card/60 backdrop-blur ring-1 ring-border";
72
+ return (
73
+ <div className={cn(base, className)} aria-label="Brand emoji badge">
74
+ <span className="text-base" aria-hidden>
75
+ {emoji}
76
+ </span>
77
+ </div>
78
+ );
79
+ }
80
+
81
+ export interface BrandNodeDiagonalAppIconProps extends BrandNodeProps {
82
+ /** Base and overlay colors */
83
+ baseColorClass?: string;
84
+ overlayColorClass?: string;
85
+ }
86
+
87
+ export function BrandNodeDiagonalAppIcon({
88
+ className,
89
+ baseColorClass = "bg-primary",
90
+ overlayColorClass = "bg-accent",
91
+ }: BrandNodeDiagonalAppIconProps) {
92
+ const base = "relative h-8 w-8 overflow-hidden rounded-md ring-1 ring-black/5 dark:ring-white/10";
93
+ return (
94
+ <div className={cn(base, className)} aria-label="Brand diagonal app icon">
95
+ <div className={cn("absolute inset-0", baseColorClass)} />
96
+ <div className={cn("absolute inset-0 translate-y-1/3 -skew-y-12", overlayColorClass)} />
97
+ </div>
98
+ );
99
+ }
100
+
101
+ export function BrandNodeCubeOutline({ className }: BrandNodeProps) {
102
+ const base = "grid h-8 w-8 place-items-center rounded-md bg-foreground text-background ring-1 ring-border";
103
+ return (
104
+ <div className={cn(base, className)} aria-label="Brand cube outline">
105
+ <svg viewBox="0 0 24 24" className="h-4 w-4">
106
+ <path d="M12 2l8 4.5v9L12 20 4 15.5v-9L12 2z" fill="none" stroke="currentColor" strokeWidth="1.6" />
107
+ <path d="M12 20v-9M4 6l8 5 8-5" fill="none" stroke="currentColor" strokeWidth="1.6" />
108
+ </svg>
109
+ </div>
110
+ );
111
+ }
112
+
113
+ /** Registry for quick swapping by name */
114
+ export const BrandNodes = {
115
+ IconBadge: BrandNodeIconBadge,
116
+ GradientRing: BrandNodeGradientRing,
117
+ GeometricMark: BrandNodeGeometricMark,
118
+ EmojiBadge: BrandNodeEmojiBadge,
119
+ DiagonalAppIcon: BrandNodeDiagonalAppIcon,
120
+ CubeOutline: BrandNodeCubeOutline,
121
+ };