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.
- package/README.md +283 -282
- package/dist/cli_manifests/blocks_manifest.json +198 -175
- package/dist/kits/blocks/.nextworks/docs/BLOCKS_QUICKSTART.md +101 -100
- package/dist/kits/blocks/.nextworks/docs/BLOCKS_README.md +105 -104
- package/dist/kits/blocks/.nextworks/docs/THEME_GUIDE.md +1 -1
- package/dist/kits/blocks/app/templates/aiworkflow/PresetThemeVars.tsx +58 -0
- package/dist/kits/blocks/app/templates/aiworkflow/README.md +46 -0
- package/dist/kits/blocks/app/templates/aiworkflow/components/CTA.tsx +44 -0
- package/dist/kits/blocks/app/templates/aiworkflow/components/Contact.tsx +105 -0
- package/dist/kits/blocks/app/templates/aiworkflow/components/FAQ.tsx +63 -0
- package/dist/kits/blocks/app/templates/aiworkflow/components/Features.tsx +65 -0
- package/dist/kits/blocks/app/templates/aiworkflow/components/Footer.tsx +109 -0
- package/dist/kits/blocks/app/templates/aiworkflow/components/Hero.tsx +636 -0
- package/dist/kits/blocks/app/templates/aiworkflow/components/Navbar.tsx +90 -0
- package/dist/kits/blocks/app/templates/aiworkflow/components/Pricing.tsx +86 -0
- package/dist/kits/blocks/app/templates/aiworkflow/components/ProcessTimeline.tsx +103 -0
- package/dist/kits/blocks/app/templates/aiworkflow/components/Testimonials.tsx +56 -0
- package/dist/kits/blocks/app/templates/aiworkflow/components/TrustBadges.tsx +59 -0
- package/dist/kits/blocks/app/templates/aiworkflow/page.tsx +43 -0
- package/dist/kits/blocks/app/templates/digitalagency/PresetThemeVars.tsx +80 -80
- package/dist/kits/blocks/app/templates/digitalagency/README.md +42 -42
- 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 +84 -84
- package/dist/kits/blocks/app/templates/productlaunch/PresetThemeVars.tsx +75 -75
- package/dist/kits/blocks/app/templates/productlaunch/README.md +62 -62
- package/dist/kits/blocks/app/templates/productlaunch/components/About.tsx +84 -84
- package/dist/kits/blocks/app/templates/productlaunch/components/CTA.tsx +50 -50
- package/dist/kits/blocks/app/templates/productlaunch/components/Contact.tsx +231 -231
- package/dist/kits/blocks/app/templates/productlaunch/components/FAQ.tsx +86 -86
- package/dist/kits/blocks/app/templates/productlaunch/components/Features.tsx +83 -83
- package/dist/kits/blocks/app/templates/productlaunch/components/Footer.tsx +132 -132
- package/dist/kits/blocks/app/templates/productlaunch/components/Hero.tsx +88 -88
- package/dist/kits/blocks/app/templates/productlaunch/components/Navbar.tsx +116 -116
- 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 -90
- 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 -44
- package/dist/kits/blocks/app/templates/saasdashboard/components/Contact.tsx +129 -129
- 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 -90
- package/dist/kits/blocks/app/templates/saasdashboard/components/Footer.tsx +77 -77
- package/dist/kits/blocks/app/templates/saasdashboard/components/Hero.tsx +104 -104
- package/dist/kits/blocks/app/templates/saasdashboard/components/Hero_mask.tsx +126 -126
- package/dist/kits/blocks/app/templates/saasdashboard/components/Navbar.tsx +117 -117
- package/dist/kits/blocks/app/templates/saasdashboard/components/Pricing.tsx +90 -90
- package/dist/kits/blocks/app/templates/saasdashboard/components/SmoothScroll.tsx +96 -96
- 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 -195
- 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 -257
- package/dist/kits/blocks/components/sections/Contact.tsx +267 -267
- package/dist/kits/blocks/components/sections/FAQ.tsx +214 -214
- package/dist/kits/blocks/components/sections/Features.tsx +268 -268
- 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 +236 -0
- package/dist/kits/blocks/components/sections/HeroSplit.tsx +352 -352
- package/dist/kits/blocks/components/sections/Navbar.tsx +350 -350
- package/dist/kits/blocks/components/sections/PortfolioSimple.tsx +549 -549
- 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/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 +125 -0
- package/dist/kits/blocks/components/sections/product-demo/DemoStage.tsx +397 -0
- package/dist/kits/blocks/components/sections/product-demo/DemoWindow.tsx +128 -0
- package/dist/kits/blocks/components/sections/product-demo/KnowledgePanel.tsx +127 -0
- package/dist/kits/blocks/components/sections/product-demo/RunConsolePanel.tsx +150 -0
- package/dist/kits/blocks/components/sections/product-demo/WorkflowStudioPanel.tsx +191 -0
- package/dist/kits/blocks/components/sections/product-demo/types.ts +193 -0
- package/dist/kits/blocks/components/theme-provider.tsx +1 -1
- 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 -243
- 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 -6
- package/dist/kits/blocks/package-deps.json +3 -3
- package/package.json +1 -1
|
@@ -1,122 +1,122 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { Slot } from "@radix-ui/react-slot";
|
|
3
|
-
import { cva, type VariantProps } from "class-variance-authority";
|
|
4
|
-
|
|
5
|
-
import { cn } from "@/lib/utils";
|
|
6
|
-
|
|
7
|
-
const buttonVariants = cva(
|
|
8
|
-
"focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
9
|
-
{
|
|
10
|
-
variants: {
|
|
11
|
-
variant: {
|
|
12
|
-
default:
|
|
13
|
-
"bg-primary text-primary-foreground hover:bg-primary/90 shadow-xs",
|
|
14
|
-
destructive:
|
|
15
|
-
"bg-destructive text-destructive-foreground hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60 shadow-xs",
|
|
16
|
-
outline:
|
|
17
|
-
"bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 border shadow-xs",
|
|
18
|
-
secondary:
|
|
19
|
-
"bg-secondary text-secondary-foreground hover:bg-secondary/80 shadow-xs",
|
|
20
|
-
ghost:
|
|
21
|
-
"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
22
|
-
link: "text-primary underline-offset-4 hover:underline",
|
|
23
|
-
},
|
|
24
|
-
size: {
|
|
25
|
-
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
26
|
-
sm: "h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",
|
|
27
|
-
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
|
28
|
-
icon: "size-9",
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
defaultVariants: {
|
|
32
|
-
variant: "default",
|
|
33
|
-
size: "default",
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
);
|
|
37
|
-
|
|
38
|
-
type ButtonProps = React.ComponentProps<"button"> &
|
|
39
|
-
VariantProps<typeof buttonVariants> & {
|
|
40
|
-
asChild?: boolean;
|
|
41
|
-
/** When true, bypasses tokenized buttonVariants so callers fully control classes */
|
|
42
|
-
unstyled?: boolean;
|
|
43
|
-
/** Opt-in: force inline CSS var styles for color/bg/border/ring */
|
|
44
|
-
forceInlineVars?: boolean;
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
48
|
-
(
|
|
49
|
-
{
|
|
50
|
-
className,
|
|
51
|
-
variant,
|
|
52
|
-
size,
|
|
53
|
-
asChild = false,
|
|
54
|
-
unstyled = false,
|
|
55
|
-
forceInlineVars = false,
|
|
56
|
-
...props
|
|
57
|
-
},
|
|
58
|
-
ref,
|
|
59
|
-
) => {
|
|
60
|
-
const Comp = asChild ? Slot : "button";
|
|
61
|
-
|
|
62
|
-
// Use caller-provided style; only inject inline var-driven colors when explicitly requested
|
|
63
|
-
const incomingStyle =
|
|
64
|
-
(props.style as React.CSSProperties | undefined) ?? undefined;
|
|
65
|
-
const finalStyle =
|
|
66
|
-
forceInlineVars && !unstyled
|
|
67
|
-
? {
|
|
68
|
-
...incomingStyle,
|
|
69
|
-
color: "var(--btn-fg)",
|
|
70
|
-
backgroundColor: "var(--btn-bg)",
|
|
71
|
-
borderColor: "var(--btn-border)",
|
|
72
|
-
"--tw-ring-color": "var(--btn-ring)",
|
|
73
|
-
}
|
|
74
|
-
: incomingStyle;
|
|
75
|
-
|
|
76
|
-
// Only enable CSS variable hooks when explicitly requested via inline vars
|
|
77
|
-
// or when the caller sets any [--btn-*] classes in className.
|
|
78
|
-
const wantsVarHooks =
|
|
79
|
-
!unstyled &&
|
|
80
|
-
(forceInlineVars ||
|
|
81
|
-
(typeof className === "string" && className.includes("[--btn-")));
|
|
82
|
-
|
|
83
|
-
return (
|
|
84
|
-
<Comp
|
|
85
|
-
ref={ref}
|
|
86
|
-
data-slot="button"
|
|
87
|
-
className={
|
|
88
|
-
unstyled
|
|
89
|
-
? cn(
|
|
90
|
-
"inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap disabled:pointer-events-none disabled:opacity-50",
|
|
91
|
-
className,
|
|
92
|
-
)
|
|
93
|
-
: cn(
|
|
94
|
-
buttonVariants({ variant, size }),
|
|
95
|
-
wantsVarHooks && [
|
|
96
|
-
// Color var hooks (apply only when CSS vars are provided)
|
|
97
|
-
"text-[var(--btn-fg)]",
|
|
98
|
-
"bg-[var(--btn-bg)]",
|
|
99
|
-
"hover:bg-[var(--btn-hover-bg)]",
|
|
100
|
-
"hover:text-[var(--btn-hover-fg)]",
|
|
101
|
-
// explicit dark variants to compete with dark: utilities from variants like outline
|
|
102
|
-
"dark:bg-[var(--btn-bg)]",
|
|
103
|
-
"dark:hover:bg-[var(--btn-hover-bg)]",
|
|
104
|
-
"dark:hover:text-[var(--btn-hover-fg)]",
|
|
105
|
-
// Focus ring and border hooks
|
|
106
|
-
"focus-visible:ring-[var(--btn-ring)]",
|
|
107
|
-
"border-[var(--btn-border)]",
|
|
108
|
-
"dark:border-[var(--btn-border)]",
|
|
109
|
-
],
|
|
110
|
-
className,
|
|
111
|
-
)
|
|
112
|
-
}
|
|
113
|
-
style={finalStyle}
|
|
114
|
-
{...props}
|
|
115
|
-
/>
|
|
116
|
-
);
|
|
117
|
-
},
|
|
118
|
-
);
|
|
119
|
-
|
|
120
|
-
Button.displayName = "Button";
|
|
121
|
-
|
|
122
|
-
export { Button, buttonVariants };
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
3
|
+
import { cva, type VariantProps } from "class-variance-authority";
|
|
4
|
+
|
|
5
|
+
import { cn } from "@/lib/utils";
|
|
6
|
+
|
|
7
|
+
const buttonVariants = cva(
|
|
8
|
+
"focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
9
|
+
{
|
|
10
|
+
variants: {
|
|
11
|
+
variant: {
|
|
12
|
+
default:
|
|
13
|
+
"bg-primary text-primary-foreground hover:bg-primary/90 shadow-xs",
|
|
14
|
+
destructive:
|
|
15
|
+
"bg-destructive text-destructive-foreground hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60 shadow-xs",
|
|
16
|
+
outline:
|
|
17
|
+
"bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 border shadow-xs",
|
|
18
|
+
secondary:
|
|
19
|
+
"bg-secondary text-secondary-foreground hover:bg-secondary/80 shadow-xs",
|
|
20
|
+
ghost:
|
|
21
|
+
"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
22
|
+
link: "text-primary underline-offset-4 hover:underline",
|
|
23
|
+
},
|
|
24
|
+
size: {
|
|
25
|
+
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
26
|
+
sm: "h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",
|
|
27
|
+
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
|
28
|
+
icon: "size-9",
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
defaultVariants: {
|
|
32
|
+
variant: "default",
|
|
33
|
+
size: "default",
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
type ButtonProps = React.ComponentProps<"button"> &
|
|
39
|
+
VariantProps<typeof buttonVariants> & {
|
|
40
|
+
asChild?: boolean;
|
|
41
|
+
/** When true, bypasses tokenized buttonVariants so callers fully control classes */
|
|
42
|
+
unstyled?: boolean;
|
|
43
|
+
/** Opt-in: force inline CSS var styles for color/bg/border/ring */
|
|
44
|
+
forceInlineVars?: boolean;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
48
|
+
(
|
|
49
|
+
{
|
|
50
|
+
className,
|
|
51
|
+
variant,
|
|
52
|
+
size,
|
|
53
|
+
asChild = false,
|
|
54
|
+
unstyled = false,
|
|
55
|
+
forceInlineVars = false,
|
|
56
|
+
...props
|
|
57
|
+
},
|
|
58
|
+
ref,
|
|
59
|
+
) => {
|
|
60
|
+
const Comp = asChild ? Slot : "button";
|
|
61
|
+
|
|
62
|
+
// Use caller-provided style; only inject inline var-driven colors when explicitly requested
|
|
63
|
+
const incomingStyle =
|
|
64
|
+
(props.style as React.CSSProperties | undefined) ?? undefined;
|
|
65
|
+
const finalStyle =
|
|
66
|
+
forceInlineVars && !unstyled
|
|
67
|
+
? {
|
|
68
|
+
...incomingStyle,
|
|
69
|
+
color: "var(--btn-fg)",
|
|
70
|
+
backgroundColor: "var(--btn-bg)",
|
|
71
|
+
borderColor: "var(--btn-border)",
|
|
72
|
+
"--tw-ring-color": "var(--btn-ring)",
|
|
73
|
+
}
|
|
74
|
+
: incomingStyle;
|
|
75
|
+
|
|
76
|
+
// Only enable CSS variable hooks when explicitly requested via inline vars
|
|
77
|
+
// or when the caller sets any [--btn-*] classes in className.
|
|
78
|
+
const wantsVarHooks =
|
|
79
|
+
!unstyled &&
|
|
80
|
+
(forceInlineVars ||
|
|
81
|
+
(typeof className === "string" && className.includes("[--btn-")));
|
|
82
|
+
|
|
83
|
+
return (
|
|
84
|
+
<Comp
|
|
85
|
+
ref={ref}
|
|
86
|
+
data-slot="button"
|
|
87
|
+
className={
|
|
88
|
+
unstyled
|
|
89
|
+
? cn(
|
|
90
|
+
"inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap disabled:pointer-events-none disabled:opacity-50",
|
|
91
|
+
className,
|
|
92
|
+
)
|
|
93
|
+
: cn(
|
|
94
|
+
buttonVariants({ variant, size }),
|
|
95
|
+
wantsVarHooks && [
|
|
96
|
+
// Color var hooks (apply only when CSS vars are provided)
|
|
97
|
+
"text-[var(--btn-fg)]",
|
|
98
|
+
"bg-[var(--btn-bg)]",
|
|
99
|
+
"hover:bg-[var(--btn-hover-bg)]",
|
|
100
|
+
"hover:text-[var(--btn-hover-fg)]",
|
|
101
|
+
// explicit dark variants to compete with dark: utilities from variants like outline
|
|
102
|
+
"dark:bg-[var(--btn-bg)]",
|
|
103
|
+
"dark:hover:bg-[var(--btn-hover-bg)]",
|
|
104
|
+
"dark:hover:text-[var(--btn-hover-fg)]",
|
|
105
|
+
// Focus ring and border hooks
|
|
106
|
+
"focus-visible:ring-[var(--btn-ring)]",
|
|
107
|
+
"border-[var(--btn-border)]",
|
|
108
|
+
"dark:border-[var(--btn-border)]",
|
|
109
|
+
],
|
|
110
|
+
className,
|
|
111
|
+
)
|
|
112
|
+
}
|
|
113
|
+
style={finalStyle}
|
|
114
|
+
{...props}
|
|
115
|
+
/>
|
|
116
|
+
);
|
|
117
|
+
},
|
|
118
|
+
);
|
|
119
|
+
|
|
120
|
+
Button.displayName = "Button";
|
|
121
|
+
|
|
122
|
+
export { Button, buttonVariants };
|
|
@@ -1,95 +1,95 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
import { cn } from "@/lib/utils";
|
|
4
|
-
|
|
5
|
-
function Card({ className, ...props }: React.ComponentProps<"div">) {
|
|
6
|
-
return (
|
|
7
|
-
<div
|
|
8
|
-
data-slot="card"
|
|
9
|
-
className={cn(
|
|
10
|
-
// Structural + token fallbacks
|
|
11
|
-
"bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",
|
|
12
|
-
// CSS variable hooks for preset-first overrides
|
|
13
|
-
"border-[var(--card-border)] bg-[var(--card-bg)] text-[var(--card-fg)] shadow-[var(--card-shadow)]",
|
|
14
|
-
className,
|
|
15
|
-
)}
|
|
16
|
-
{...props}
|
|
17
|
-
/>
|
|
18
|
-
);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
function CardHeader({ className, ...props }: React.ComponentProps<"div">) {
|
|
22
|
-
return (
|
|
23
|
-
<div
|
|
24
|
-
data-slot="card-header"
|
|
25
|
-
className={cn(
|
|
26
|
-
"@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",
|
|
27
|
-
className,
|
|
28
|
-
)}
|
|
29
|
-
{...props}
|
|
30
|
-
/>
|
|
31
|
-
);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
function CardTitle({ className, ...props }: React.ComponentProps<"div">) {
|
|
35
|
-
return (
|
|
36
|
-
<div
|
|
37
|
-
data-slot="card-title"
|
|
38
|
-
className={cn("leading-none font-semibold", className)}
|
|
39
|
-
{...props}
|
|
40
|
-
/>
|
|
41
|
-
);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
function CardDescription({ className, ...props }: React.ComponentProps<"div">) {
|
|
45
|
-
return (
|
|
46
|
-
<div
|
|
47
|
-
data-slot="card-description"
|
|
48
|
-
className={cn("text-muted-foreground text-sm", className)}
|
|
49
|
-
{...props}
|
|
50
|
-
/>
|
|
51
|
-
);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
function CardAction({ className, ...props }: React.ComponentProps<"div">) {
|
|
55
|
-
return (
|
|
56
|
-
<div
|
|
57
|
-
data-slot="card-action"
|
|
58
|
-
className={cn(
|
|
59
|
-
"col-start-2 row-span-2 row-start-1 self-start justify-self-end",
|
|
60
|
-
className,
|
|
61
|
-
)}
|
|
62
|
-
{...props}
|
|
63
|
-
/>
|
|
64
|
-
);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
function CardContent({ className, ...props }: React.ComponentProps<"div">) {
|
|
68
|
-
return (
|
|
69
|
-
<div
|
|
70
|
-
data-slot="card-content"
|
|
71
|
-
className={cn("px-6", className)}
|
|
72
|
-
{...props}
|
|
73
|
-
/>
|
|
74
|
-
);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
function CardFooter({ className, ...props }: React.ComponentProps<"div">) {
|
|
78
|
-
return (
|
|
79
|
-
<div
|
|
80
|
-
data-slot="card-footer"
|
|
81
|
-
className={cn("flex items-center px-6 [.border-t]:pt-6", className)}
|
|
82
|
-
{...props}
|
|
83
|
-
/>
|
|
84
|
-
);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
export {
|
|
88
|
-
Card,
|
|
89
|
-
CardHeader,
|
|
90
|
-
CardFooter,
|
|
91
|
-
CardTitle,
|
|
92
|
-
CardAction,
|
|
93
|
-
CardDescription,
|
|
94
|
-
CardContent,
|
|
95
|
-
};
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
|
|
3
|
+
import { cn } from "@/lib/utils";
|
|
4
|
+
|
|
5
|
+
function Card({ className, ...props }: React.ComponentProps<"div">) {
|
|
6
|
+
return (
|
|
7
|
+
<div
|
|
8
|
+
data-slot="card"
|
|
9
|
+
className={cn(
|
|
10
|
+
// Structural + token fallbacks
|
|
11
|
+
"bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",
|
|
12
|
+
// CSS variable hooks for preset-first overrides
|
|
13
|
+
"border-[var(--card-border)] bg-[var(--card-bg)] text-[var(--card-fg)] shadow-[var(--card-shadow)]",
|
|
14
|
+
className,
|
|
15
|
+
)}
|
|
16
|
+
{...props}
|
|
17
|
+
/>
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function CardHeader({ className, ...props }: React.ComponentProps<"div">) {
|
|
22
|
+
return (
|
|
23
|
+
<div
|
|
24
|
+
data-slot="card-header"
|
|
25
|
+
className={cn(
|
|
26
|
+
"@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",
|
|
27
|
+
className,
|
|
28
|
+
)}
|
|
29
|
+
{...props}
|
|
30
|
+
/>
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function CardTitle({ className, ...props }: React.ComponentProps<"div">) {
|
|
35
|
+
return (
|
|
36
|
+
<div
|
|
37
|
+
data-slot="card-title"
|
|
38
|
+
className={cn("leading-none font-semibold", className)}
|
|
39
|
+
{...props}
|
|
40
|
+
/>
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function CardDescription({ className, ...props }: React.ComponentProps<"div">) {
|
|
45
|
+
return (
|
|
46
|
+
<div
|
|
47
|
+
data-slot="card-description"
|
|
48
|
+
className={cn("text-muted-foreground text-sm", className)}
|
|
49
|
+
{...props}
|
|
50
|
+
/>
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function CardAction({ className, ...props }: React.ComponentProps<"div">) {
|
|
55
|
+
return (
|
|
56
|
+
<div
|
|
57
|
+
data-slot="card-action"
|
|
58
|
+
className={cn(
|
|
59
|
+
"col-start-2 row-span-2 row-start-1 self-start justify-self-end",
|
|
60
|
+
className,
|
|
61
|
+
)}
|
|
62
|
+
{...props}
|
|
63
|
+
/>
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function CardContent({ className, ...props }: React.ComponentProps<"div">) {
|
|
68
|
+
return (
|
|
69
|
+
<div
|
|
70
|
+
data-slot="card-content"
|
|
71
|
+
className={cn("px-6", className)}
|
|
72
|
+
{...props}
|
|
73
|
+
/>
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function CardFooter({ className, ...props }: React.ComponentProps<"div">) {
|
|
78
|
+
return (
|
|
79
|
+
<div
|
|
80
|
+
data-slot="card-footer"
|
|
81
|
+
className={cn("flex items-center px-6 [.border-t]:pt-6", className)}
|
|
82
|
+
{...props}
|
|
83
|
+
/>
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export {
|
|
88
|
+
Card,
|
|
89
|
+
CardHeader,
|
|
90
|
+
CardFooter,
|
|
91
|
+
CardTitle,
|
|
92
|
+
CardAction,
|
|
93
|
+
CardDescription,
|
|
94
|
+
CardContent,
|
|
95
|
+
};
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { cn } from "@/lib/utils";
|
|
3
|
-
|
|
4
|
-
export type CheckboxProps = React.InputHTMLAttributes<HTMLInputElement>;
|
|
5
|
-
|
|
6
|
-
const Checkbox = React.forwardRef<HTMLInputElement, CheckboxProps>(
|
|
7
|
-
({ className, ...props }, ref) => {
|
|
8
|
-
// Use the native accent-color where supported for consistent checkbox fill
|
|
9
|
-
const style: React.CSSProperties = { accentColor: "var(--primary)" }; // fallback; modern browsers will use this accent color
|
|
10
|
-
|
|
11
|
-
return (
|
|
12
|
-
<input
|
|
13
|
-
type="checkbox"
|
|
14
|
-
ref={ref}
|
|
15
|
-
style={style}
|
|
16
|
-
className={cn(
|
|
17
|
-
// Keep layout small but add smooth transitions and focus ring
|
|
18
|
-
"h-4 w-4 rounded border-[var(--input-border)] bg-[var(--input-bg)] text-[var(--input-fg)] transition-colors duration-200 ease-in-out",
|
|
19
|
-
"focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2 focus-visible:outline-none",
|
|
20
|
-
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
21
|
-
className,
|
|
22
|
-
)}
|
|
23
|
-
{...props}
|
|
24
|
-
/>
|
|
25
|
-
);
|
|
26
|
-
},
|
|
27
|
-
);
|
|
28
|
-
Checkbox.displayName = "Checkbox";
|
|
29
|
-
|
|
30
|
-
export { Checkbox };
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { cn } from "@/lib/utils";
|
|
3
|
+
|
|
4
|
+
export type CheckboxProps = React.InputHTMLAttributes<HTMLInputElement>;
|
|
5
|
+
|
|
6
|
+
const Checkbox = React.forwardRef<HTMLInputElement, CheckboxProps>(
|
|
7
|
+
({ className, ...props }, ref) => {
|
|
8
|
+
// Use the native accent-color where supported for consistent checkbox fill
|
|
9
|
+
const style: React.CSSProperties = { accentColor: "var(--primary)" }; // fallback; modern browsers will use this accent color
|
|
10
|
+
|
|
11
|
+
return (
|
|
12
|
+
<input
|
|
13
|
+
type="checkbox"
|
|
14
|
+
ref={ref}
|
|
15
|
+
style={style}
|
|
16
|
+
className={cn(
|
|
17
|
+
// Keep layout small but add smooth transitions and focus ring
|
|
18
|
+
"h-4 w-4 rounded border-[var(--input-border)] bg-[var(--input-bg)] text-[var(--input-fg)] transition-colors duration-200 ease-in-out",
|
|
19
|
+
"focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2 focus-visible:outline-none",
|
|
20
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
21
|
+
className,
|
|
22
|
+
)}
|
|
23
|
+
{...props}
|
|
24
|
+
/>
|
|
25
|
+
);
|
|
26
|
+
},
|
|
27
|
+
);
|
|
28
|
+
Checkbox.displayName = "Checkbox";
|
|
29
|
+
|
|
30
|
+
export { Checkbox };
|