nextworks 0.2.0-alpha.2 → 0.2.0-alpha.21
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/README.md +280 -228
- package/dist/cli_manifests/blocks_manifest.json +193 -194
- package/dist/commands/blocks.d.ts +3 -0
- package/dist/commands/blocks.d.ts.map +1 -1
- package/dist/commands/blocks.js +128 -19
- package/dist/commands/blocks.js.map +1 -1
- package/dist/commands/doctor.d.ts +136 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +696 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/remove-blocks.d.ts +4 -1
- package/dist/commands/remove-blocks.d.ts.map +1 -1
- package/dist/commands/remove-blocks.js +24 -6
- package/dist/commands/remove-blocks.js.map +1 -1
- package/dist/index.js +125 -4
- package/dist/index.js.map +1 -1
- package/dist/kits/blocks/.nextworks/docs/BLOCKS_QUICKSTART.md +104 -194
- package/dist/kits/blocks/.nextworks/docs/BLOCKS_README.md +115 -75
- package/dist/kits/blocks/.nextworks/docs/THEME_GUIDE.md +269 -251
- package/dist/kits/blocks/app/templates/digitalagency/PresetThemeVars.tsx +80 -80
- package/dist/kits/blocks/app/templates/digitalagency/README.md +42 -36
- package/dist/kits/blocks/app/templates/digitalagency/components/About.tsx +71 -99
- package/dist/kits/blocks/app/templates/digitalagency/components/CTA.tsx +40 -74
- package/dist/kits/blocks/app/templates/digitalagency/components/Contact.tsx +123 -227
- package/dist/kits/blocks/app/templates/digitalagency/components/Footer.tsx +89 -89
- package/dist/kits/blocks/app/templates/digitalagency/components/Hero.tsx +83 -90
- package/dist/kits/blocks/app/templates/digitalagency/components/Navbar.tsx +121 -168
- package/dist/kits/blocks/app/templates/digitalagency/components/NetworkPattern.tsx +288 -297
- package/dist/kits/blocks/app/templates/digitalagency/components/Portfolio.tsx +157 -157
- package/dist/kits/blocks/app/templates/digitalagency/components/Pricing.tsx +114 -114
- package/dist/kits/blocks/app/templates/digitalagency/components/Process.tsx +59 -59
- package/dist/kits/blocks/app/templates/digitalagency/components/Services.tsx +55 -55
- package/dist/kits/blocks/app/templates/digitalagency/components/Team.tsx +28 -28
- package/dist/kits/blocks/app/templates/digitalagency/components/Testimonials.tsx +65 -65
- package/dist/kits/blocks/app/templates/digitalagency/page.tsx +38 -38
- package/dist/kits/blocks/app/templates/gallery/PresetThemeVars.tsx +130 -85
- package/dist/kits/blocks/app/templates/gallery/page.tsx +357 -303
- package/dist/kits/blocks/app/templates/productlaunch/PresetThemeVars.tsx +75 -74
- package/dist/kits/blocks/app/templates/productlaunch/README.md +62 -55
- package/dist/kits/blocks/app/templates/productlaunch/components/About.tsx +84 -178
- package/dist/kits/blocks/app/templates/productlaunch/components/CTA.tsx +50 -93
- package/dist/kits/blocks/app/templates/productlaunch/components/Contact.tsx +231 -231
- package/dist/kits/blocks/app/templates/productlaunch/components/FAQ.tsx +86 -93
- package/dist/kits/blocks/app/templates/productlaunch/components/Features.tsx +83 -84
- package/dist/kits/blocks/app/templates/productlaunch/components/Footer.tsx +132 -132
- package/dist/kits/blocks/app/templates/productlaunch/components/Hero.tsx +88 -89
- package/dist/kits/blocks/app/templates/productlaunch/components/Navbar.tsx +116 -162
- package/dist/kits/blocks/app/templates/productlaunch/components/Pricing.tsx +106 -106
- package/dist/kits/blocks/app/templates/productlaunch/components/ProcessTimeline.tsx +110 -110
- package/dist/kits/blocks/app/templates/productlaunch/components/ServicesGrid.tsx +68 -68
- package/dist/kits/blocks/app/templates/productlaunch/components/Team.tsx +104 -104
- package/dist/kits/blocks/app/templates/productlaunch/components/Testimonials.tsx +90 -89
- package/dist/kits/blocks/app/templates/productlaunch/components/TrustBadges.tsx +76 -76
- package/dist/kits/blocks/app/templates/productlaunch/page.tsx +43 -43
- package/dist/kits/blocks/app/templates/saasdashboard/PresetThemeVars.tsx +80 -80
- package/dist/kits/blocks/app/templates/saasdashboard/README.md +44 -38
- package/dist/kits/blocks/app/templates/saasdashboard/components/Contact.tsx +129 -176
- package/dist/kits/blocks/app/templates/saasdashboard/components/Dashboard.tsx +293 -293
- package/dist/kits/blocks/app/templates/saasdashboard/components/FAQ.tsx +55 -55
- package/dist/kits/blocks/app/templates/saasdashboard/components/Features.tsx +90 -91
- package/dist/kits/blocks/app/templates/saasdashboard/components/Footer.tsx +77 -77
- package/dist/kits/blocks/app/templates/saasdashboard/components/Hero.tsx +104 -105
- package/dist/kits/blocks/app/templates/saasdashboard/components/Hero_mask.tsx +126 -127
- package/dist/kits/blocks/app/templates/saasdashboard/components/Navbar.tsx +117 -159
- package/dist/kits/blocks/app/templates/saasdashboard/components/Pricing.tsx +90 -90
- package/dist/kits/blocks/app/templates/saasdashboard/components/SmoothScroll.tsx +96 -97
- package/dist/kits/blocks/app/templates/saasdashboard/components/Testimonials.tsx +72 -72
- package/dist/kits/blocks/app/templates/saasdashboard/components/TrustBadges.tsx +53 -53
- package/dist/kits/blocks/app/templates/saasdashboard/page.tsx +39 -39
- package/dist/kits/blocks/components/enhanced-theme-provider.tsx +195 -183
- package/dist/kits/blocks/components/providers/BlocksAppProviders.tsx +27 -27
- package/dist/kits/blocks/components/sections/About.tsx +291 -291
- package/dist/kits/blocks/components/sections/CTA.tsx +257 -258
- package/dist/kits/blocks/components/sections/CommandShowcase.tsx +517 -0
- package/dist/kits/blocks/components/sections/Contact.tsx +267 -267
- package/dist/kits/blocks/components/sections/FAQ.tsx +214 -225
- package/dist/kits/blocks/components/sections/FeaturedProjectShowcase.tsx +687 -0
- package/dist/kits/blocks/components/sections/Features.tsx +268 -270
- package/dist/kits/blocks/components/sections/Footer.tsx +302 -302
- package/dist/kits/blocks/components/sections/HeroMotion.tsx +308 -308
- package/dist/kits/blocks/components/sections/HeroOverlay.tsx +358 -358
- package/dist/kits/blocks/components/sections/HeroProductDemo.tsx +246 -0
- package/dist/kits/blocks/components/sections/HeroSplit.tsx +352 -352
- package/dist/kits/blocks/components/sections/HeroWithVideo.tsx +495 -0
- package/dist/kits/blocks/components/sections/Navbar.tsx +352 -353
- package/dist/kits/blocks/components/sections/PortfolioSimple.tsx +549 -550
- package/dist/kits/blocks/components/sections/Pricing.tsx +264 -264
- package/dist/kits/blocks/components/sections/ProcessTimeline.tsx +325 -325
- package/dist/kits/blocks/components/sections/ProjectDeepDive.tsx +805 -0
- package/dist/kits/blocks/components/sections/SelectedWorkRail.tsx +485 -0
- package/dist/kits/blocks/components/sections/ServicesGrid.tsx +210 -210
- package/dist/kits/blocks/components/sections/Team.tsx +309 -309
- package/dist/kits/blocks/components/sections/Testimonials.tsx +158 -158
- package/dist/kits/blocks/components/sections/TrustBadges.tsx +162 -162
- package/dist/kits/blocks/components/sections/product-demo/ApprovalInboxPanel.tsx +128 -0
- package/dist/kits/blocks/components/sections/product-demo/DemoStage.tsx +519 -0
- package/dist/kits/blocks/components/sections/product-demo/DemoWindow.tsx +140 -0
- package/dist/kits/blocks/components/sections/product-demo/KnowledgePanel.tsx +130 -0
- package/dist/kits/blocks/components/sections/product-demo/RunConsolePanel.tsx +430 -0
- package/dist/kits/blocks/components/sections/product-demo/TaskListPanel.tsx +302 -0
- package/dist/kits/blocks/components/sections/product-demo/WorkflowStudioPanel.tsx +744 -0
- package/dist/kits/blocks/components/sections/product-demo/types.ts +262 -0
- package/dist/kits/blocks/components/theme-provider.tsx +1 -34
- package/dist/kits/blocks/components/ui/alert-dialog.tsx +134 -134
- package/dist/kits/blocks/components/ui/brand-node.tsx +121 -121
- package/dist/kits/blocks/components/ui/button.tsx +122 -122
- package/dist/kits/blocks/components/ui/card.tsx +95 -95
- package/dist/kits/blocks/components/ui/checkbox.tsx +30 -30
- package/dist/kits/blocks/components/ui/cta-button.tsx +125 -125
- package/dist/kits/blocks/components/ui/dropdown-menu.tsx +201 -201
- package/dist/kits/blocks/components/ui/feature-card.tsx +91 -91
- package/dist/kits/blocks/components/ui/input.tsx +27 -27
- package/dist/kits/blocks/components/ui/label.tsx +29 -29
- package/dist/kits/blocks/components/ui/pricing-card.tsx +120 -120
- package/dist/kits/blocks/components/ui/select.tsx +25 -25
- package/dist/kits/blocks/components/ui/skeleton.tsx +13 -13
- package/dist/kits/blocks/components/ui/table.tsx +98 -98
- package/dist/kits/blocks/components/ui/testimonial-card.tsx +108 -108
- package/dist/kits/blocks/components/ui/textarea.tsx +26 -26
- package/dist/kits/blocks/components/ui/theme-selector.tsx +243 -247
- package/dist/kits/blocks/components/ui/theme-toggle.tsx +74 -74
- package/dist/kits/blocks/components/ui/toaster.tsx +7 -7
- package/dist/kits/blocks/lib/themes.ts +400 -400
- package/dist/kits/blocks/lib/utils.ts +6 -9
- package/dist/kits/blocks/package-deps.json +40 -28
- package/dist/kits/blocks/tsconfig.json +11 -0
- package/dist/kits/blocks/tsconfig.tsbuildinfo +1 -0
- package/dist/utils/file-operations.d.ts +3 -1
- package/dist/utils/file-operations.d.ts.map +1 -1
- package/dist/utils/file-operations.js +84 -12
- package/dist/utils/file-operations.js.map +1 -1
- package/dist/utils/installation-tracker.d.ts +2 -2
- package/dist/utils/installation-tracker.d.ts.map +1 -1
- package/dist/utils/installation-tracker.js +11 -11
- package/dist/utils/installation-tracker.js.map +1 -1
- package/dist/utils/package-manager.d.ts +6 -0
- package/dist/utils/package-manager.d.ts.map +1 -0
- package/dist/utils/package-manager.js +58 -0
- package/dist/utils/package-manager.js.map +1 -0
- package/dist/utils/yarn-pnp.d.ts +6 -0
- package/dist/utils/yarn-pnp.d.ts.map +1 -0
- package/dist/utils/yarn-pnp.js +39 -0
- package/dist/utils/yarn-pnp.js.map +1 -0
- package/package.json +5 -2
- package/dist/kits/blocks/notes/THEME_GUIDE.md +0 -29
|
@@ -1,201 +1,201 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
|
|
5
|
-
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
6
|
-
import { Check, ChevronRight, Circle } from "lucide-react";
|
|
7
|
-
|
|
8
|
-
import { cn } from "@/lib/utils";
|
|
9
|
-
|
|
10
|
-
const DropdownMenu = DropdownMenuPrimitive.Root;
|
|
11
|
-
|
|
12
|
-
const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
13
|
-
|
|
14
|
-
const DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
15
|
-
|
|
16
|
-
const DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
17
|
-
|
|
18
|
-
const DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
19
|
-
|
|
20
|
-
const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
21
|
-
|
|
22
|
-
const DropdownMenuSubTrigger = React.forwardRef<
|
|
23
|
-
React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,
|
|
24
|
-
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {
|
|
25
|
-
inset?: boolean;
|
|
26
|
-
}
|
|
27
|
-
>(({ className, inset, children, ...props }, ref) => (
|
|
28
|
-
<DropdownMenuPrimitive.SubTrigger
|
|
29
|
-
ref={ref}
|
|
30
|
-
className={cn(
|
|
31
|
-
"focus:bg-accent data-[state=open]:bg-accent flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none",
|
|
32
|
-
inset && "pl-8",
|
|
33
|
-
className,
|
|
34
|
-
)}
|
|
35
|
-
{...props}
|
|
36
|
-
>
|
|
37
|
-
{children}
|
|
38
|
-
<ChevronRight className="ml-auto h-4 w-4" />
|
|
39
|
-
</DropdownMenuPrimitive.SubTrigger>
|
|
40
|
-
));
|
|
41
|
-
DropdownMenuSubTrigger.displayName =
|
|
42
|
-
DropdownMenuPrimitive.SubTrigger.displayName;
|
|
43
|
-
|
|
44
|
-
const DropdownMenuSubContent = React.forwardRef<
|
|
45
|
-
React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,
|
|
46
|
-
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>
|
|
47
|
-
>(({ className, ...props }, ref) => (
|
|
48
|
-
<DropdownMenuPrimitive.SubContent
|
|
49
|
-
ref={ref}
|
|
50
|
-
className={cn(
|
|
51
|
-
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-lg",
|
|
52
|
-
className,
|
|
53
|
-
)}
|
|
54
|
-
{...props}
|
|
55
|
-
/>
|
|
56
|
-
));
|
|
57
|
-
DropdownMenuSubContent.displayName =
|
|
58
|
-
DropdownMenuPrimitive.SubContent.displayName;
|
|
59
|
-
|
|
60
|
-
const DropdownMenuContent = React.forwardRef<
|
|
61
|
-
React.ElementRef<typeof DropdownMenuPrimitive.Content>,
|
|
62
|
-
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>
|
|
63
|
-
>(({ className, sideOffset = 4, ...props }, ref) => (
|
|
64
|
-
<DropdownMenuPrimitive.Portal>
|
|
65
|
-
<DropdownMenuPrimitive.Content
|
|
66
|
-
ref={ref}
|
|
67
|
-
sideOffset={sideOffset}
|
|
68
|
-
className={cn(
|
|
69
|
-
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-md",
|
|
70
|
-
className,
|
|
71
|
-
)}
|
|
72
|
-
{...props}
|
|
73
|
-
/>
|
|
74
|
-
</DropdownMenuPrimitive.Portal>
|
|
75
|
-
));
|
|
76
|
-
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
77
|
-
|
|
78
|
-
const DropdownMenuItem = React.forwardRef<
|
|
79
|
-
React.ElementRef<typeof DropdownMenuPrimitive.Item>,
|
|
80
|
-
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {
|
|
81
|
-
inset?: boolean;
|
|
82
|
-
}
|
|
83
|
-
>(({ className, inset, ...props }, ref) => (
|
|
84
|
-
<DropdownMenuPrimitive.Item
|
|
85
|
-
ref={ref}
|
|
86
|
-
className={cn(
|
|
87
|
-
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm transition-colors outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
88
|
-
inset && "pl-8",
|
|
89
|
-
className,
|
|
90
|
-
)}
|
|
91
|
-
{...props}
|
|
92
|
-
/>
|
|
93
|
-
));
|
|
94
|
-
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
95
|
-
|
|
96
|
-
const DropdownMenuCheckboxItem = React.forwardRef<
|
|
97
|
-
React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,
|
|
98
|
-
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>
|
|
99
|
-
>(({ className, children, checked, ...props }, ref) => (
|
|
100
|
-
<DropdownMenuPrimitive.CheckboxItem
|
|
101
|
-
ref={ref}
|
|
102
|
-
className={cn(
|
|
103
|
-
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm transition-colors outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
104
|
-
className,
|
|
105
|
-
)}
|
|
106
|
-
checked={checked}
|
|
107
|
-
{...props}
|
|
108
|
-
>
|
|
109
|
-
<span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
|
|
110
|
-
<DropdownMenuPrimitive.ItemIndicator>
|
|
111
|
-
<Check className="h-4 w-4" />
|
|
112
|
-
</DropdownMenuPrimitive.ItemIndicator>
|
|
113
|
-
</span>
|
|
114
|
-
{children}
|
|
115
|
-
</DropdownMenuPrimitive.CheckboxItem>
|
|
116
|
-
));
|
|
117
|
-
DropdownMenuCheckboxItem.displayName =
|
|
118
|
-
DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
119
|
-
|
|
120
|
-
const DropdownMenuRadioItem = React.forwardRef<
|
|
121
|
-
React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,
|
|
122
|
-
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>
|
|
123
|
-
>(({ className, children, ...props }, ref) => (
|
|
124
|
-
<DropdownMenuPrimitive.RadioItem
|
|
125
|
-
ref={ref}
|
|
126
|
-
className={cn(
|
|
127
|
-
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm transition-colors outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
128
|
-
className,
|
|
129
|
-
)}
|
|
130
|
-
{...props}
|
|
131
|
-
>
|
|
132
|
-
<span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
|
|
133
|
-
<DropdownMenuPrimitive.ItemIndicator>
|
|
134
|
-
<Circle className="h-2 w-2 fill-current" />
|
|
135
|
-
</DropdownMenuPrimitive.ItemIndicator>
|
|
136
|
-
</span>
|
|
137
|
-
{children}
|
|
138
|
-
</DropdownMenuPrimitive.RadioItem>
|
|
139
|
-
));
|
|
140
|
-
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
141
|
-
|
|
142
|
-
const DropdownMenuLabel = React.forwardRef<
|
|
143
|
-
React.ElementRef<typeof DropdownMenuPrimitive.Label>,
|
|
144
|
-
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {
|
|
145
|
-
inset?: boolean;
|
|
146
|
-
}
|
|
147
|
-
>(({ className, inset, ...props }, ref) => (
|
|
148
|
-
<DropdownMenuPrimitive.Label
|
|
149
|
-
ref={ref}
|
|
150
|
-
className={cn(
|
|
151
|
-
"px-2 py-1.5 text-sm font-semibold",
|
|
152
|
-
inset && "pl-8",
|
|
153
|
-
className,
|
|
154
|
-
)}
|
|
155
|
-
{...props}
|
|
156
|
-
/>
|
|
157
|
-
));
|
|
158
|
-
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
159
|
-
|
|
160
|
-
const DropdownMenuSeparator = React.forwardRef<
|
|
161
|
-
React.ElementRef<typeof DropdownMenuPrimitive.Separator>,
|
|
162
|
-
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>
|
|
163
|
-
>(({ className, ...props }, ref) => (
|
|
164
|
-
<DropdownMenuPrimitive.Separator
|
|
165
|
-
ref={ref}
|
|
166
|
-
className={cn("bg-muted -mx-1 my-1 h-px", className)}
|
|
167
|
-
{...props}
|
|
168
|
-
/>
|
|
169
|
-
));
|
|
170
|
-
DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
|
|
171
|
-
|
|
172
|
-
const DropdownMenuShortcut = ({
|
|
173
|
-
className,
|
|
174
|
-
...props
|
|
175
|
-
}: React.HTMLAttributes<HTMLSpanElement>) => {
|
|
176
|
-
return (
|
|
177
|
-
<span
|
|
178
|
-
className={cn("ml-auto text-xs tracking-widest opacity-60", className)}
|
|
179
|
-
{...props}
|
|
180
|
-
/>
|
|
181
|
-
);
|
|
182
|
-
};
|
|
183
|
-
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
184
|
-
|
|
185
|
-
export {
|
|
186
|
-
DropdownMenu,
|
|
187
|
-
DropdownMenuTrigger,
|
|
188
|
-
DropdownMenuContent,
|
|
189
|
-
DropdownMenuItem,
|
|
190
|
-
DropdownMenuCheckboxItem,
|
|
191
|
-
DropdownMenuRadioItem,
|
|
192
|
-
DropdownMenuLabel,
|
|
193
|
-
DropdownMenuSeparator,
|
|
194
|
-
DropdownMenuShortcut,
|
|
195
|
-
DropdownMenuGroup,
|
|
196
|
-
DropdownMenuPortal,
|
|
197
|
-
DropdownMenuSub,
|
|
198
|
-
DropdownMenuSubContent,
|
|
199
|
-
DropdownMenuSubTrigger,
|
|
200
|
-
DropdownMenuRadioGroup,
|
|
201
|
-
};
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
|
|
5
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
6
|
+
import { Check, ChevronRight, Circle } from "lucide-react";
|
|
7
|
+
|
|
8
|
+
import { cn } from "@/lib/utils";
|
|
9
|
+
|
|
10
|
+
const DropdownMenu = DropdownMenuPrimitive.Root;
|
|
11
|
+
|
|
12
|
+
const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
13
|
+
|
|
14
|
+
const DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
15
|
+
|
|
16
|
+
const DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
17
|
+
|
|
18
|
+
const DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
19
|
+
|
|
20
|
+
const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
21
|
+
|
|
22
|
+
const DropdownMenuSubTrigger = React.forwardRef<
|
|
23
|
+
React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,
|
|
24
|
+
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {
|
|
25
|
+
inset?: boolean;
|
|
26
|
+
}
|
|
27
|
+
>(({ className, inset, children, ...props }, ref) => (
|
|
28
|
+
<DropdownMenuPrimitive.SubTrigger
|
|
29
|
+
ref={ref}
|
|
30
|
+
className={cn(
|
|
31
|
+
"focus:bg-accent data-[state=open]:bg-accent flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none",
|
|
32
|
+
inset && "pl-8",
|
|
33
|
+
className,
|
|
34
|
+
)}
|
|
35
|
+
{...props}
|
|
36
|
+
>
|
|
37
|
+
{children}
|
|
38
|
+
<ChevronRight className="ml-auto h-4 w-4" />
|
|
39
|
+
</DropdownMenuPrimitive.SubTrigger>
|
|
40
|
+
));
|
|
41
|
+
DropdownMenuSubTrigger.displayName =
|
|
42
|
+
DropdownMenuPrimitive.SubTrigger.displayName;
|
|
43
|
+
|
|
44
|
+
const DropdownMenuSubContent = React.forwardRef<
|
|
45
|
+
React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,
|
|
46
|
+
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>
|
|
47
|
+
>(({ className, ...props }, ref) => (
|
|
48
|
+
<DropdownMenuPrimitive.SubContent
|
|
49
|
+
ref={ref}
|
|
50
|
+
className={cn(
|
|
51
|
+
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-lg",
|
|
52
|
+
className,
|
|
53
|
+
)}
|
|
54
|
+
{...props}
|
|
55
|
+
/>
|
|
56
|
+
));
|
|
57
|
+
DropdownMenuSubContent.displayName =
|
|
58
|
+
DropdownMenuPrimitive.SubContent.displayName;
|
|
59
|
+
|
|
60
|
+
const DropdownMenuContent = React.forwardRef<
|
|
61
|
+
React.ElementRef<typeof DropdownMenuPrimitive.Content>,
|
|
62
|
+
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>
|
|
63
|
+
>(({ className, sideOffset = 4, ...props }, ref) => (
|
|
64
|
+
<DropdownMenuPrimitive.Portal>
|
|
65
|
+
<DropdownMenuPrimitive.Content
|
|
66
|
+
ref={ref}
|
|
67
|
+
sideOffset={sideOffset}
|
|
68
|
+
className={cn(
|
|
69
|
+
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-md",
|
|
70
|
+
className,
|
|
71
|
+
)}
|
|
72
|
+
{...props}
|
|
73
|
+
/>
|
|
74
|
+
</DropdownMenuPrimitive.Portal>
|
|
75
|
+
));
|
|
76
|
+
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
77
|
+
|
|
78
|
+
const DropdownMenuItem = React.forwardRef<
|
|
79
|
+
React.ElementRef<typeof DropdownMenuPrimitive.Item>,
|
|
80
|
+
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {
|
|
81
|
+
inset?: boolean;
|
|
82
|
+
}
|
|
83
|
+
>(({ className, inset, ...props }, ref) => (
|
|
84
|
+
<DropdownMenuPrimitive.Item
|
|
85
|
+
ref={ref}
|
|
86
|
+
className={cn(
|
|
87
|
+
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm transition-colors outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
88
|
+
inset && "pl-8",
|
|
89
|
+
className,
|
|
90
|
+
)}
|
|
91
|
+
{...props}
|
|
92
|
+
/>
|
|
93
|
+
));
|
|
94
|
+
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
95
|
+
|
|
96
|
+
const DropdownMenuCheckboxItem = React.forwardRef<
|
|
97
|
+
React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,
|
|
98
|
+
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>
|
|
99
|
+
>(({ className, children, checked, ...props }, ref) => (
|
|
100
|
+
<DropdownMenuPrimitive.CheckboxItem
|
|
101
|
+
ref={ref}
|
|
102
|
+
className={cn(
|
|
103
|
+
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm transition-colors outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
104
|
+
className,
|
|
105
|
+
)}
|
|
106
|
+
checked={checked}
|
|
107
|
+
{...props}
|
|
108
|
+
>
|
|
109
|
+
<span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
|
|
110
|
+
<DropdownMenuPrimitive.ItemIndicator>
|
|
111
|
+
<Check className="h-4 w-4" />
|
|
112
|
+
</DropdownMenuPrimitive.ItemIndicator>
|
|
113
|
+
</span>
|
|
114
|
+
{children}
|
|
115
|
+
</DropdownMenuPrimitive.CheckboxItem>
|
|
116
|
+
));
|
|
117
|
+
DropdownMenuCheckboxItem.displayName =
|
|
118
|
+
DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
119
|
+
|
|
120
|
+
const DropdownMenuRadioItem = React.forwardRef<
|
|
121
|
+
React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,
|
|
122
|
+
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>
|
|
123
|
+
>(({ className, children, ...props }, ref) => (
|
|
124
|
+
<DropdownMenuPrimitive.RadioItem
|
|
125
|
+
ref={ref}
|
|
126
|
+
className={cn(
|
|
127
|
+
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm transition-colors outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
128
|
+
className,
|
|
129
|
+
)}
|
|
130
|
+
{...props}
|
|
131
|
+
>
|
|
132
|
+
<span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
|
|
133
|
+
<DropdownMenuPrimitive.ItemIndicator>
|
|
134
|
+
<Circle className="h-2 w-2 fill-current" />
|
|
135
|
+
</DropdownMenuPrimitive.ItemIndicator>
|
|
136
|
+
</span>
|
|
137
|
+
{children}
|
|
138
|
+
</DropdownMenuPrimitive.RadioItem>
|
|
139
|
+
));
|
|
140
|
+
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
141
|
+
|
|
142
|
+
const DropdownMenuLabel = React.forwardRef<
|
|
143
|
+
React.ElementRef<typeof DropdownMenuPrimitive.Label>,
|
|
144
|
+
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {
|
|
145
|
+
inset?: boolean;
|
|
146
|
+
}
|
|
147
|
+
>(({ className, inset, ...props }, ref) => (
|
|
148
|
+
<DropdownMenuPrimitive.Label
|
|
149
|
+
ref={ref}
|
|
150
|
+
className={cn(
|
|
151
|
+
"px-2 py-1.5 text-sm font-semibold",
|
|
152
|
+
inset && "pl-8",
|
|
153
|
+
className,
|
|
154
|
+
)}
|
|
155
|
+
{...props}
|
|
156
|
+
/>
|
|
157
|
+
));
|
|
158
|
+
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
159
|
+
|
|
160
|
+
const DropdownMenuSeparator = React.forwardRef<
|
|
161
|
+
React.ElementRef<typeof DropdownMenuPrimitive.Separator>,
|
|
162
|
+
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>
|
|
163
|
+
>(({ className, ...props }, ref) => (
|
|
164
|
+
<DropdownMenuPrimitive.Separator
|
|
165
|
+
ref={ref}
|
|
166
|
+
className={cn("bg-muted -mx-1 my-1 h-px", className)}
|
|
167
|
+
{...props}
|
|
168
|
+
/>
|
|
169
|
+
));
|
|
170
|
+
DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
|
|
171
|
+
|
|
172
|
+
const DropdownMenuShortcut = ({
|
|
173
|
+
className,
|
|
174
|
+
...props
|
|
175
|
+
}: React.HTMLAttributes<HTMLSpanElement>) => {
|
|
176
|
+
return (
|
|
177
|
+
<span
|
|
178
|
+
className={cn("ml-auto text-xs tracking-widest opacity-60", className)}
|
|
179
|
+
{...props}
|
|
180
|
+
/>
|
|
181
|
+
);
|
|
182
|
+
};
|
|
183
|
+
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
184
|
+
|
|
185
|
+
export {
|
|
186
|
+
DropdownMenu,
|
|
187
|
+
DropdownMenuTrigger,
|
|
188
|
+
DropdownMenuContent,
|
|
189
|
+
DropdownMenuItem,
|
|
190
|
+
DropdownMenuCheckboxItem,
|
|
191
|
+
DropdownMenuRadioItem,
|
|
192
|
+
DropdownMenuLabel,
|
|
193
|
+
DropdownMenuSeparator,
|
|
194
|
+
DropdownMenuShortcut,
|
|
195
|
+
DropdownMenuGroup,
|
|
196
|
+
DropdownMenuPortal,
|
|
197
|
+
DropdownMenuSub,
|
|
198
|
+
DropdownMenuSubContent,
|
|
199
|
+
DropdownMenuSubTrigger,
|
|
200
|
+
DropdownMenuRadioGroup,
|
|
201
|
+
};
|
|
@@ -1,91 +1,91 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import React from "react";
|
|
4
|
-
import Image from "next/image";
|
|
5
|
-
import { Card, CardContent } from "@/components/ui/card";
|
|
6
|
-
import { cn } from "@/lib/utils";
|
|
7
|
-
|
|
8
|
-
export interface FeatureCardProps {
|
|
9
|
-
/** Optional id and root className */
|
|
10
|
-
id?: string;
|
|
11
|
-
className?: string;
|
|
12
|
-
|
|
13
|
-
/** Image source URL for the feature card image */
|
|
14
|
-
cardImageSrc: string;
|
|
15
|
-
/** Alt text for the feature card image */
|
|
16
|
-
cardImageAlt: string;
|
|
17
|
-
/** Heading text displayed on the feature card */
|
|
18
|
-
cardHeadingText: string;
|
|
19
|
-
/** Subheading or description text on the feature card */
|
|
20
|
-
cardSubheadingText: string;
|
|
21
|
-
|
|
22
|
-
/** Styling configuration objects */
|
|
23
|
-
card?: { className?: string };
|
|
24
|
-
image?: { className?: string };
|
|
25
|
-
heading?: { className?: string };
|
|
26
|
-
subheading?: { className?: string };
|
|
27
|
-
/** Next/Image quality (1-100) */
|
|
28
|
-
imageQuality?: number;
|
|
29
|
-
/** Next/Image sizes attribute */
|
|
30
|
-
imageSizes?: string;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export function FeatureCard({
|
|
34
|
-
id,
|
|
35
|
-
className,
|
|
36
|
-
cardImageSrc,
|
|
37
|
-
cardImageAlt,
|
|
38
|
-
cardHeadingText,
|
|
39
|
-
cardSubheadingText,
|
|
40
|
-
card = {
|
|
41
|
-
className:
|
|
42
|
-
"h-full transition-all duration-200 hover:shadow-lg bg-card text-card-foreground border rounded-md border-border",
|
|
43
|
-
},
|
|
44
|
-
image = { className: "object-cover" },
|
|
45
|
-
heading = {
|
|
46
|
-
className:
|
|
47
|
-
"mb-2 text-lg font-semibold text-foreground text-[var(--card-title-fg)]",
|
|
48
|
-
},
|
|
49
|
-
subheading = {
|
|
50
|
-
className:
|
|
51
|
-
"text-sm leading-relaxed text-muted-foreground text-[var(--card-muted-fg)]",
|
|
52
|
-
},
|
|
53
|
-
imageQuality = 85,
|
|
54
|
-
imageSizes = "(max-width: 480px) 100vw, (max-width: 768px) 50vw, 33vw",
|
|
55
|
-
}: FeatureCardProps) {
|
|
56
|
-
return (
|
|
57
|
-
<Card id={id} className={cn("group", card.className, className)}>
|
|
58
|
-
<CardContent className="relative flex h-full flex-col p-6">
|
|
59
|
-
{/* Spotlight overlay */}
|
|
60
|
-
<div className="pointer-events-none absolute inset-0 -z-10 opacity-0 transition-opacity duration-500 group-hover:opacity-100">
|
|
61
|
-
<div className="absolute -top-10 -left-10 h-40 w-40 rounded-full bg-white/5 blur-2xl dark:bg-white/10" />
|
|
62
|
-
</div>
|
|
63
|
-
|
|
64
|
-
<div className="relative mb-4 h-48 w-full overflow-hidden rounded-md">
|
|
65
|
-
{cardImageSrc ? (
|
|
66
|
-
<Image
|
|
67
|
-
src={cardImageSrc}
|
|
68
|
-
alt={cardImageAlt || "Feature image"}
|
|
69
|
-
fill
|
|
70
|
-
className={cn(
|
|
71
|
-
"transition-transform duration-500 group-hover:scale-105",
|
|
72
|
-
image.className,
|
|
73
|
-
)}
|
|
74
|
-
quality={imageQuality}
|
|
75
|
-
sizes={imageSizes}
|
|
76
|
-
/>
|
|
77
|
-
) : (
|
|
78
|
-
<div className="bg-muted text-muted-foreground flex h-full w-full items-center justify-center">
|
|
79
|
-
<span className="text-xs">No image</span>
|
|
80
|
-
</div>
|
|
81
|
-
)}
|
|
82
|
-
</div>
|
|
83
|
-
|
|
84
|
-
<div className="flex flex-1 flex-col">
|
|
85
|
-
<h3 className={heading.className}>{cardHeadingText}</h3>
|
|
86
|
-
<p className={subheading.className}>{cardSubheadingText}</p>
|
|
87
|
-
</div>
|
|
88
|
-
</CardContent>
|
|
89
|
-
</Card>
|
|
90
|
-
);
|
|
91
|
-
}
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import React from "react";
|
|
4
|
+
import Image from "next/image";
|
|
5
|
+
import { Card, CardContent } from "@/components/ui/card";
|
|
6
|
+
import { cn } from "@/lib/utils";
|
|
7
|
+
|
|
8
|
+
export interface FeatureCardProps {
|
|
9
|
+
/** Optional id and root className */
|
|
10
|
+
id?: string;
|
|
11
|
+
className?: string;
|
|
12
|
+
|
|
13
|
+
/** Image source URL for the feature card image */
|
|
14
|
+
cardImageSrc: string;
|
|
15
|
+
/** Alt text for the feature card image */
|
|
16
|
+
cardImageAlt: string;
|
|
17
|
+
/** Heading text displayed on the feature card */
|
|
18
|
+
cardHeadingText: string;
|
|
19
|
+
/** Subheading or description text on the feature card */
|
|
20
|
+
cardSubheadingText: string;
|
|
21
|
+
|
|
22
|
+
/** Styling configuration objects */
|
|
23
|
+
card?: { className?: string };
|
|
24
|
+
image?: { className?: string };
|
|
25
|
+
heading?: { className?: string };
|
|
26
|
+
subheading?: { className?: string };
|
|
27
|
+
/** Next/Image quality (1-100) */
|
|
28
|
+
imageQuality?: number;
|
|
29
|
+
/** Next/Image sizes attribute */
|
|
30
|
+
imageSizes?: string;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export function FeatureCard({
|
|
34
|
+
id,
|
|
35
|
+
className,
|
|
36
|
+
cardImageSrc,
|
|
37
|
+
cardImageAlt,
|
|
38
|
+
cardHeadingText,
|
|
39
|
+
cardSubheadingText,
|
|
40
|
+
card = {
|
|
41
|
+
className:
|
|
42
|
+
"h-full transition-all duration-200 hover:shadow-lg bg-card text-card-foreground border rounded-md border-border",
|
|
43
|
+
},
|
|
44
|
+
image = { className: "object-cover" },
|
|
45
|
+
heading = {
|
|
46
|
+
className:
|
|
47
|
+
"mb-2 text-lg font-semibold text-foreground text-[var(--card-title-fg)]",
|
|
48
|
+
},
|
|
49
|
+
subheading = {
|
|
50
|
+
className:
|
|
51
|
+
"text-sm leading-relaxed text-muted-foreground text-[var(--card-muted-fg)]",
|
|
52
|
+
},
|
|
53
|
+
imageQuality = 85,
|
|
54
|
+
imageSizes = "(max-width: 480px) 100vw, (max-width: 768px) 50vw, 33vw",
|
|
55
|
+
}: FeatureCardProps) {
|
|
56
|
+
return (
|
|
57
|
+
<Card id={id} className={cn("group", card.className, className)}>
|
|
58
|
+
<CardContent className="relative flex h-full flex-col p-6">
|
|
59
|
+
{/* Spotlight overlay */}
|
|
60
|
+
<div className="pointer-events-none absolute inset-0 -z-10 opacity-0 transition-opacity duration-500 group-hover:opacity-100">
|
|
61
|
+
<div className="absolute -top-10 -left-10 h-40 w-40 rounded-full bg-white/5 blur-2xl dark:bg-white/10" />
|
|
62
|
+
</div>
|
|
63
|
+
|
|
64
|
+
<div className="relative mb-4 h-48 w-full overflow-hidden rounded-md">
|
|
65
|
+
{cardImageSrc ? (
|
|
66
|
+
<Image
|
|
67
|
+
src={cardImageSrc}
|
|
68
|
+
alt={cardImageAlt || "Feature image"}
|
|
69
|
+
fill
|
|
70
|
+
className={cn(
|
|
71
|
+
"transition-transform duration-500 group-hover:scale-105",
|
|
72
|
+
image.className,
|
|
73
|
+
)}
|
|
74
|
+
quality={imageQuality}
|
|
75
|
+
sizes={imageSizes}
|
|
76
|
+
/>
|
|
77
|
+
) : (
|
|
78
|
+
<div className="bg-muted text-muted-foreground flex h-full w-full items-center justify-center">
|
|
79
|
+
<span className="text-xs">No image</span>
|
|
80
|
+
</div>
|
|
81
|
+
)}
|
|
82
|
+
</div>
|
|
83
|
+
|
|
84
|
+
<div className="flex flex-1 flex-col">
|
|
85
|
+
<h3 className={heading.className}>{cardHeadingText}</h3>
|
|
86
|
+
<p className={subheading.className}>{cardSubheadingText}</p>
|
|
87
|
+
</div>
|
|
88
|
+
</CardContent>
|
|
89
|
+
</Card>
|
|
90
|
+
);
|
|
91
|
+
}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
import { cn } from "@/lib/utils";
|
|
4
|
-
|
|
5
|
-
export type InputProps = React.InputHTMLAttributes<HTMLInputElement>;
|
|
6
|
-
|
|
7
|
-
const Input = React.forwardRef<HTMLInputElement, InputProps>(
|
|
8
|
-
({ className, type, ...props }, ref) => {
|
|
9
|
-
return (
|
|
10
|
-
<input
|
|
11
|
-
type={type}
|
|
12
|
-
className={cn(
|
|
13
|
-
// Base structural + token fallbacks
|
|
14
|
-
"border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:ring-ring aria-invalid:border-destructive aria-invalid:focus-visible:ring-destructive/30 dark:aria-invalid:focus-visible:ring-destructive/40 flex h-10 w-full rounded-md border px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
15
|
-
// CSS variable hooks (preset-first). When vars are unset, these are ignored and tokens above apply.
|
|
16
|
-
"focus-visible:ring-offset-background border-[var(--input-border)] bg-[var(--input-bg)] text-[var(--input-fg)] placeholder:text-[var(--input-placeholder)] focus-visible:ring-[var(--input-focus-ring,var(--ring))] focus-visible:ring-offset-2",
|
|
17
|
-
className,
|
|
18
|
-
)}
|
|
19
|
-
ref={ref}
|
|
20
|
-
{...props}
|
|
21
|
-
/>
|
|
22
|
-
);
|
|
23
|
-
},
|
|
24
|
-
);
|
|
25
|
-
Input.displayName = "Input";
|
|
26
|
-
|
|
27
|
-
export { Input };
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
|
|
3
|
+
import { cn } from "@/lib/utils";
|
|
4
|
+
|
|
5
|
+
export type InputProps = React.InputHTMLAttributes<HTMLInputElement>;
|
|
6
|
+
|
|
7
|
+
const Input = React.forwardRef<HTMLInputElement, InputProps>(
|
|
8
|
+
({ className, type, ...props }, ref) => {
|
|
9
|
+
return (
|
|
10
|
+
<input
|
|
11
|
+
type={type}
|
|
12
|
+
className={cn(
|
|
13
|
+
// Base structural + token fallbacks
|
|
14
|
+
"border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:ring-ring aria-invalid:border-destructive aria-invalid:focus-visible:ring-destructive/30 dark:aria-invalid:focus-visible:ring-destructive/40 flex h-10 w-full rounded-md border px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
15
|
+
// CSS variable hooks (preset-first). When vars are unset, these are ignored and tokens above apply.
|
|
16
|
+
"focus-visible:ring-offset-background border-[var(--input-border)] bg-[var(--input-bg)] text-[var(--input-fg)] placeholder:text-[var(--input-placeholder)] focus-visible:ring-[var(--input-focus-ring,var(--ring))] focus-visible:ring-offset-2",
|
|
17
|
+
className,
|
|
18
|
+
)}
|
|
19
|
+
ref={ref}
|
|
20
|
+
{...props}
|
|
21
|
+
/>
|
|
22
|
+
);
|
|
23
|
+
},
|
|
24
|
+
);
|
|
25
|
+
Input.displayName = "Input";
|
|
26
|
+
|
|
27
|
+
export { Input };
|