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.
Files changed (145) hide show
  1. package/README.md +280 -228
  2. package/dist/cli_manifests/blocks_manifest.json +193 -194
  3. package/dist/commands/blocks.d.ts +3 -0
  4. package/dist/commands/blocks.d.ts.map +1 -1
  5. package/dist/commands/blocks.js +128 -19
  6. package/dist/commands/blocks.js.map +1 -1
  7. package/dist/commands/doctor.d.ts +136 -0
  8. package/dist/commands/doctor.d.ts.map +1 -0
  9. package/dist/commands/doctor.js +696 -0
  10. package/dist/commands/doctor.js.map +1 -0
  11. package/dist/commands/remove-blocks.d.ts +4 -1
  12. package/dist/commands/remove-blocks.d.ts.map +1 -1
  13. package/dist/commands/remove-blocks.js +24 -6
  14. package/dist/commands/remove-blocks.js.map +1 -1
  15. package/dist/index.js +125 -4
  16. package/dist/index.js.map +1 -1
  17. package/dist/kits/blocks/.nextworks/docs/BLOCKS_QUICKSTART.md +104 -194
  18. package/dist/kits/blocks/.nextworks/docs/BLOCKS_README.md +115 -75
  19. package/dist/kits/blocks/.nextworks/docs/THEME_GUIDE.md +269 -251
  20. package/dist/kits/blocks/app/templates/digitalagency/PresetThemeVars.tsx +80 -80
  21. package/dist/kits/blocks/app/templates/digitalagency/README.md +42 -36
  22. package/dist/kits/blocks/app/templates/digitalagency/components/About.tsx +71 -99
  23. package/dist/kits/blocks/app/templates/digitalagency/components/CTA.tsx +40 -74
  24. package/dist/kits/blocks/app/templates/digitalagency/components/Contact.tsx +123 -227
  25. package/dist/kits/blocks/app/templates/digitalagency/components/Footer.tsx +89 -89
  26. package/dist/kits/blocks/app/templates/digitalagency/components/Hero.tsx +83 -90
  27. package/dist/kits/blocks/app/templates/digitalagency/components/Navbar.tsx +121 -168
  28. package/dist/kits/blocks/app/templates/digitalagency/components/NetworkPattern.tsx +288 -297
  29. package/dist/kits/blocks/app/templates/digitalagency/components/Portfolio.tsx +157 -157
  30. package/dist/kits/blocks/app/templates/digitalagency/components/Pricing.tsx +114 -114
  31. package/dist/kits/blocks/app/templates/digitalagency/components/Process.tsx +59 -59
  32. package/dist/kits/blocks/app/templates/digitalagency/components/Services.tsx +55 -55
  33. package/dist/kits/blocks/app/templates/digitalagency/components/Team.tsx +28 -28
  34. package/dist/kits/blocks/app/templates/digitalagency/components/Testimonials.tsx +65 -65
  35. package/dist/kits/blocks/app/templates/digitalagency/page.tsx +38 -38
  36. package/dist/kits/blocks/app/templates/gallery/PresetThemeVars.tsx +130 -85
  37. package/dist/kits/blocks/app/templates/gallery/page.tsx +357 -303
  38. package/dist/kits/blocks/app/templates/productlaunch/PresetThemeVars.tsx +75 -74
  39. package/dist/kits/blocks/app/templates/productlaunch/README.md +62 -55
  40. package/dist/kits/blocks/app/templates/productlaunch/components/About.tsx +84 -178
  41. package/dist/kits/blocks/app/templates/productlaunch/components/CTA.tsx +50 -93
  42. package/dist/kits/blocks/app/templates/productlaunch/components/Contact.tsx +231 -231
  43. package/dist/kits/blocks/app/templates/productlaunch/components/FAQ.tsx +86 -93
  44. package/dist/kits/blocks/app/templates/productlaunch/components/Features.tsx +83 -84
  45. package/dist/kits/blocks/app/templates/productlaunch/components/Footer.tsx +132 -132
  46. package/dist/kits/blocks/app/templates/productlaunch/components/Hero.tsx +88 -89
  47. package/dist/kits/blocks/app/templates/productlaunch/components/Navbar.tsx +116 -162
  48. package/dist/kits/blocks/app/templates/productlaunch/components/Pricing.tsx +106 -106
  49. package/dist/kits/blocks/app/templates/productlaunch/components/ProcessTimeline.tsx +110 -110
  50. package/dist/kits/blocks/app/templates/productlaunch/components/ServicesGrid.tsx +68 -68
  51. package/dist/kits/blocks/app/templates/productlaunch/components/Team.tsx +104 -104
  52. package/dist/kits/blocks/app/templates/productlaunch/components/Testimonials.tsx +90 -89
  53. package/dist/kits/blocks/app/templates/productlaunch/components/TrustBadges.tsx +76 -76
  54. package/dist/kits/blocks/app/templates/productlaunch/page.tsx +43 -43
  55. package/dist/kits/blocks/app/templates/saasdashboard/PresetThemeVars.tsx +80 -80
  56. package/dist/kits/blocks/app/templates/saasdashboard/README.md +44 -38
  57. package/dist/kits/blocks/app/templates/saasdashboard/components/Contact.tsx +129 -176
  58. package/dist/kits/blocks/app/templates/saasdashboard/components/Dashboard.tsx +293 -293
  59. package/dist/kits/blocks/app/templates/saasdashboard/components/FAQ.tsx +55 -55
  60. package/dist/kits/blocks/app/templates/saasdashboard/components/Features.tsx +90 -91
  61. package/dist/kits/blocks/app/templates/saasdashboard/components/Footer.tsx +77 -77
  62. package/dist/kits/blocks/app/templates/saasdashboard/components/Hero.tsx +104 -105
  63. package/dist/kits/blocks/app/templates/saasdashboard/components/Hero_mask.tsx +126 -127
  64. package/dist/kits/blocks/app/templates/saasdashboard/components/Navbar.tsx +117 -159
  65. package/dist/kits/blocks/app/templates/saasdashboard/components/Pricing.tsx +90 -90
  66. package/dist/kits/blocks/app/templates/saasdashboard/components/SmoothScroll.tsx +96 -97
  67. package/dist/kits/blocks/app/templates/saasdashboard/components/Testimonials.tsx +72 -72
  68. package/dist/kits/blocks/app/templates/saasdashboard/components/TrustBadges.tsx +53 -53
  69. package/dist/kits/blocks/app/templates/saasdashboard/page.tsx +39 -39
  70. package/dist/kits/blocks/components/enhanced-theme-provider.tsx +195 -183
  71. package/dist/kits/blocks/components/providers/BlocksAppProviders.tsx +27 -27
  72. package/dist/kits/blocks/components/sections/About.tsx +291 -291
  73. package/dist/kits/blocks/components/sections/CTA.tsx +257 -258
  74. package/dist/kits/blocks/components/sections/CommandShowcase.tsx +517 -0
  75. package/dist/kits/blocks/components/sections/Contact.tsx +267 -267
  76. package/dist/kits/blocks/components/sections/FAQ.tsx +214 -225
  77. package/dist/kits/blocks/components/sections/FeaturedProjectShowcase.tsx +687 -0
  78. package/dist/kits/blocks/components/sections/Features.tsx +268 -270
  79. package/dist/kits/blocks/components/sections/Footer.tsx +302 -302
  80. package/dist/kits/blocks/components/sections/HeroMotion.tsx +308 -308
  81. package/dist/kits/blocks/components/sections/HeroOverlay.tsx +358 -358
  82. package/dist/kits/blocks/components/sections/HeroProductDemo.tsx +246 -0
  83. package/dist/kits/blocks/components/sections/HeroSplit.tsx +352 -352
  84. package/dist/kits/blocks/components/sections/HeroWithVideo.tsx +495 -0
  85. package/dist/kits/blocks/components/sections/Navbar.tsx +352 -353
  86. package/dist/kits/blocks/components/sections/PortfolioSimple.tsx +549 -550
  87. package/dist/kits/blocks/components/sections/Pricing.tsx +264 -264
  88. package/dist/kits/blocks/components/sections/ProcessTimeline.tsx +325 -325
  89. package/dist/kits/blocks/components/sections/ProjectDeepDive.tsx +805 -0
  90. package/dist/kits/blocks/components/sections/SelectedWorkRail.tsx +485 -0
  91. package/dist/kits/blocks/components/sections/ServicesGrid.tsx +210 -210
  92. package/dist/kits/blocks/components/sections/Team.tsx +309 -309
  93. package/dist/kits/blocks/components/sections/Testimonials.tsx +158 -158
  94. package/dist/kits/blocks/components/sections/TrustBadges.tsx +162 -162
  95. package/dist/kits/blocks/components/sections/product-demo/ApprovalInboxPanel.tsx +128 -0
  96. package/dist/kits/blocks/components/sections/product-demo/DemoStage.tsx +519 -0
  97. package/dist/kits/blocks/components/sections/product-demo/DemoWindow.tsx +140 -0
  98. package/dist/kits/blocks/components/sections/product-demo/KnowledgePanel.tsx +130 -0
  99. package/dist/kits/blocks/components/sections/product-demo/RunConsolePanel.tsx +430 -0
  100. package/dist/kits/blocks/components/sections/product-demo/TaskListPanel.tsx +302 -0
  101. package/dist/kits/blocks/components/sections/product-demo/WorkflowStudioPanel.tsx +744 -0
  102. package/dist/kits/blocks/components/sections/product-demo/types.ts +262 -0
  103. package/dist/kits/blocks/components/theme-provider.tsx +1 -34
  104. package/dist/kits/blocks/components/ui/alert-dialog.tsx +134 -134
  105. package/dist/kits/blocks/components/ui/brand-node.tsx +121 -121
  106. package/dist/kits/blocks/components/ui/button.tsx +122 -122
  107. package/dist/kits/blocks/components/ui/card.tsx +95 -95
  108. package/dist/kits/blocks/components/ui/checkbox.tsx +30 -30
  109. package/dist/kits/blocks/components/ui/cta-button.tsx +125 -125
  110. package/dist/kits/blocks/components/ui/dropdown-menu.tsx +201 -201
  111. package/dist/kits/blocks/components/ui/feature-card.tsx +91 -91
  112. package/dist/kits/blocks/components/ui/input.tsx +27 -27
  113. package/dist/kits/blocks/components/ui/label.tsx +29 -29
  114. package/dist/kits/blocks/components/ui/pricing-card.tsx +120 -120
  115. package/dist/kits/blocks/components/ui/select.tsx +25 -25
  116. package/dist/kits/blocks/components/ui/skeleton.tsx +13 -13
  117. package/dist/kits/blocks/components/ui/table.tsx +98 -98
  118. package/dist/kits/blocks/components/ui/testimonial-card.tsx +108 -108
  119. package/dist/kits/blocks/components/ui/textarea.tsx +26 -26
  120. package/dist/kits/blocks/components/ui/theme-selector.tsx +243 -247
  121. package/dist/kits/blocks/components/ui/theme-toggle.tsx +74 -74
  122. package/dist/kits/blocks/components/ui/toaster.tsx +7 -7
  123. package/dist/kits/blocks/lib/themes.ts +400 -400
  124. package/dist/kits/blocks/lib/utils.ts +6 -9
  125. package/dist/kits/blocks/package-deps.json +40 -28
  126. package/dist/kits/blocks/tsconfig.json +11 -0
  127. package/dist/kits/blocks/tsconfig.tsbuildinfo +1 -0
  128. package/dist/utils/file-operations.d.ts +3 -1
  129. package/dist/utils/file-operations.d.ts.map +1 -1
  130. package/dist/utils/file-operations.js +84 -12
  131. package/dist/utils/file-operations.js.map +1 -1
  132. package/dist/utils/installation-tracker.d.ts +2 -2
  133. package/dist/utils/installation-tracker.d.ts.map +1 -1
  134. package/dist/utils/installation-tracker.js +11 -11
  135. package/dist/utils/installation-tracker.js.map +1 -1
  136. package/dist/utils/package-manager.d.ts +6 -0
  137. package/dist/utils/package-manager.d.ts.map +1 -0
  138. package/dist/utils/package-manager.js +58 -0
  139. package/dist/utils/package-manager.js.map +1 -0
  140. package/dist/utils/yarn-pnp.d.ts +6 -0
  141. package/dist/utils/yarn-pnp.d.ts.map +1 -0
  142. package/dist/utils/yarn-pnp.js +39 -0
  143. package/dist/utils/yarn-pnp.js.map +1 -0
  144. package/package.json +5 -2
  145. package/dist/kits/blocks/notes/THEME_GUIDE.md +0 -29
@@ -1,29 +1,29 @@
1
- import * as React from "react";
2
- import * as LabelPrimitive from "@radix-ui/react-label";
3
- import { cva, type VariantProps } from "class-variance-authority";
4
-
5
- import { cn } from "@/lib/utils";
6
-
7
- const labelVariants = cva(
8
- "text-sm leading-none font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
9
- );
10
-
11
- const Label = React.forwardRef<
12
- React.ElementRef<typeof LabelPrimitive.Root>,
13
- React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> &
14
- VariantProps<typeof labelVariants>
15
- >(({ className, ...props }, ref) => (
16
- <LabelPrimitive.Root
17
- ref={ref}
18
- className={cn(
19
- labelVariants(),
20
- // Optional color override via var; falls back to inherited color when unset
21
- "text-[var(--label-fg)]",
22
- className,
23
- )}
24
- {...props}
25
- />
26
- ));
27
- Label.displayName = LabelPrimitive.Root.displayName;
28
-
29
- export { Label };
1
+ import * as React from "react";
2
+ import * as LabelPrimitive from "@radix-ui/react-label";
3
+ import { cva, type VariantProps } from "class-variance-authority";
4
+
5
+ import { cn } from "@/lib/utils";
6
+
7
+ const labelVariants = cva(
8
+ "text-sm leading-none font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
9
+ );
10
+
11
+ const Label = React.forwardRef<
12
+ React.ElementRef<typeof LabelPrimitive.Root>,
13
+ React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> &
14
+ VariantProps<typeof labelVariants>
15
+ >(({ className, ...props }, ref) => (
16
+ <LabelPrimitive.Root
17
+ ref={ref}
18
+ className={cn(
19
+ labelVariants(),
20
+ // Optional color override via var; falls back to inherited color when unset
21
+ "text-[var(--label-fg)]",
22
+ className,
23
+ )}
24
+ {...props}
25
+ />
26
+ ));
27
+ Label.displayName = LabelPrimitive.Root.displayName;
28
+
29
+ export { Label };
@@ -1,120 +1,120 @@
1
- "use client";
2
-
3
- import React from "react";
4
- import Link from "next/link";
5
- import { Button } from "@/components/ui/button";
6
- import { Card } from "@/components/ui/card";
7
- import { cn } from "@/lib/utils";
8
- import { Check } from "lucide-react";
9
-
10
- export interface PricingCardProps {
11
- /** Optional id and root className */
12
- id?: string;
13
- className?: string;
14
-
15
- /** Header text/title of the pricing plan */
16
- pricingCardTitle?: string;
17
- /** Price text for the pricing plan */
18
- pricingCardPrice?: string;
19
- /** Array of features included in the pricing plan */
20
- pricingCardFeatures?: string[];
21
- /** Label text for the pricing call-to-action button */
22
- pricingCardCTALabel?: string;
23
- /** URL/href for the pricing call-to-action button */
24
- pricingCardCTAHref?: string;
25
- /** Whether this is the featured/popular plan */
26
- isPopular?: boolean;
27
-
28
- /** Styling configuration objects */
29
- card?: { className?: string };
30
- header?: { className?: string };
31
- title?: { className?: string };
32
- price?: { className?: string };
33
- features?: { className?: string };
34
- featureItem?: { className?: string };
35
- cta?: {
36
- variant?:
37
- | "default"
38
- | "destructive"
39
- | "outline"
40
- | "secondary"
41
- | "ghost"
42
- | "link";
43
- size?: "default" | "sm" | "lg" | "icon";
44
- className?: string;
45
- /** Forward-through escape hatch matching Button */
46
- unstyled?: boolean;
47
- style?: React.CSSProperties;
48
- };
49
- popularBadge?: { className?: string };
50
- }
51
-
52
- export function PricingCard({
53
- id,
54
- className,
55
- pricingCardTitle = "Basic Plan",
56
- pricingCardPrice = "$9.99",
57
- pricingCardFeatures = ["Feature 1", "Feature 2", "Feature 3"],
58
- pricingCardCTALabel = "Select Plan",
59
- pricingCardCTAHref = "#contact",
60
- isPopular = false,
61
- card = {
62
- className:
63
- "relative bg-card text-card-foreground border border-border rounded-lg shadow-md hover:shadow-lg transition-shadow duration-200",
64
- },
65
- header = { className: "p-6 text-center border-b border-border" },
66
- title = { className: "text-xl font-bold text-foreground mb-2" },
67
- price = { className: "text-3xl font-bold text-foreground mb-4" },
68
- features = { className: "p-6 space-y-3" },
69
- featureItem = {
70
- className: "flex items-center text-muted-foreground text-sm",
71
- },
72
- cta = {
73
- variant: "default",
74
- size: "lg",
75
- className:
76
- "w-full bg-primary text-primary-foreground hover:bg-primary/90 font-medium shadow-md hover:shadow-lg transition-all duration-200 hover:-translate-y-0.5",
77
- },
78
- popularBadge = {
79
- className:
80
- "absolute -top-3 left-1/2 transform -translate-x-1/2 bg-primary text-primary-foreground px-4 py-1 rounded-full text-sm font-medium",
81
- },
82
- }: PricingCardProps) {
83
- return (
84
- <Card id={id} className={cn(card.className, className, "rounded-lg")}>
85
- {isPopular && <div className={popularBadge.className}>Most Popular</div>}
86
-
87
- <div className={header.className}>
88
- <h3 className={title.className}>{pricingCardTitle}</h3>
89
- <div className={price.className}>{pricingCardPrice}</div>
90
- </div>
91
-
92
- <div className={features.className}>
93
- {pricingCardFeatures?.map((feature, index) => (
94
- <div key={index} className={featureItem.className}>
95
- <Check className="mr-3 h-4 w-4 flex-shrink-0 text-green-500" />
96
- <span>{feature}</span>
97
- </div>
98
- ))}
99
- </div>
100
-
101
- <div className="p-6 pt-0">
102
- <Button
103
- asChild
104
- variant={cta.variant}
105
- size={cta.size}
106
- className={cn(
107
- // Allow presets to take over with var hooks from Button
108
- "border-[var(--btn-border)] focus-visible:ring-[var(--btn-ring)]",
109
- cta.className,
110
- "hover:animate-none motion-safe:animate-none",
111
- )}
112
- {...(cta.unstyled ? { unstyled: true } : {})}
113
- style={cta.style}
114
- >
115
- <Link href={pricingCardCTAHref || "#"}>{pricingCardCTALabel}</Link>
116
- </Button>
117
- </div>
118
- </Card>
119
- );
120
- }
1
+ "use client";
2
+
3
+ import React from "react";
4
+ import Link from "next/link";
5
+ import { Button } from "@/components/ui/button";
6
+ import { Card } from "@/components/ui/card";
7
+ import { cn } from "@/lib/utils";
8
+ import { Check } from "lucide-react";
9
+
10
+ export interface PricingCardProps {
11
+ /** Optional id and root className */
12
+ id?: string;
13
+ className?: string;
14
+
15
+ /** Header text/title of the pricing plan */
16
+ pricingCardTitle?: string;
17
+ /** Price text for the pricing plan */
18
+ pricingCardPrice?: string;
19
+ /** Array of features included in the pricing plan */
20
+ pricingCardFeatures?: string[];
21
+ /** Label text for the pricing call-to-action button */
22
+ pricingCardCTALabel?: string;
23
+ /** URL/href for the pricing call-to-action button */
24
+ pricingCardCTAHref?: string;
25
+ /** Whether this is the featured/popular plan */
26
+ isPopular?: boolean;
27
+
28
+ /** Styling configuration objects */
29
+ card?: { className?: string };
30
+ header?: { className?: string };
31
+ title?: { className?: string };
32
+ price?: { className?: string };
33
+ features?: { className?: string };
34
+ featureItem?: { className?: string };
35
+ cta?: {
36
+ variant?:
37
+ | "default"
38
+ | "destructive"
39
+ | "outline"
40
+ | "secondary"
41
+ | "ghost"
42
+ | "link";
43
+ size?: "default" | "sm" | "lg" | "icon";
44
+ className?: string;
45
+ /** Forward-through escape hatch matching Button */
46
+ unstyled?: boolean;
47
+ style?: React.CSSProperties;
48
+ };
49
+ popularBadge?: { className?: string };
50
+ }
51
+
52
+ export function PricingCard({
53
+ id,
54
+ className,
55
+ pricingCardTitle = "Basic Plan",
56
+ pricingCardPrice = "$9.99",
57
+ pricingCardFeatures = ["Feature 1", "Feature 2", "Feature 3"],
58
+ pricingCardCTALabel = "Select Plan",
59
+ pricingCardCTAHref = "#contact",
60
+ isPopular = false,
61
+ card = {
62
+ className:
63
+ "relative bg-card text-card-foreground border border-border rounded-lg shadow-md hover:shadow-lg transition-shadow duration-200",
64
+ },
65
+ header = { className: "p-6 text-center border-b border-border" },
66
+ title = { className: "text-xl font-bold text-foreground mb-2" },
67
+ price = { className: "text-3xl font-bold text-foreground mb-4" },
68
+ features = { className: "p-6 space-y-3" },
69
+ featureItem = {
70
+ className: "flex items-center text-muted-foreground text-sm",
71
+ },
72
+ cta = {
73
+ variant: "default",
74
+ size: "lg",
75
+ className:
76
+ "w-full bg-primary text-primary-foreground hover:bg-primary/90 font-medium shadow-md hover:shadow-lg transition-all duration-200 hover:-translate-y-0.5",
77
+ },
78
+ popularBadge = {
79
+ className:
80
+ "absolute -top-3 left-1/2 transform -translate-x-1/2 bg-primary text-primary-foreground px-4 py-1 rounded-full text-sm font-medium",
81
+ },
82
+ }: PricingCardProps) {
83
+ return (
84
+ <Card id={id} className={cn(card.className, className, "rounded-lg")}>
85
+ {isPopular && <div className={popularBadge.className}>Most Popular</div>}
86
+
87
+ <div className={header.className}>
88
+ <h3 className={title.className}>{pricingCardTitle}</h3>
89
+ <div className={price.className}>{pricingCardPrice}</div>
90
+ </div>
91
+
92
+ <div className={features.className}>
93
+ {pricingCardFeatures?.map((feature, index) => (
94
+ <div key={index} className={featureItem.className}>
95
+ <Check className="mr-3 h-4 w-4 flex-shrink-0 text-green-500" />
96
+ <span>{feature}</span>
97
+ </div>
98
+ ))}
99
+ </div>
100
+
101
+ <div className="p-6 pt-0">
102
+ <Button
103
+ asChild
104
+ variant={cta.variant}
105
+ size={cta.size}
106
+ className={cn(
107
+ // Allow presets to take over with var hooks from Button
108
+ "border-[var(--btn-border)] focus-visible:ring-[var(--btn-ring)]",
109
+ cta.className,
110
+ "hover:animate-none motion-safe:animate-none",
111
+ )}
112
+ {...(cta.unstyled ? { unstyled: true } : {})}
113
+ style={cta.style}
114
+ >
115
+ <Link href={pricingCardCTAHref || "#"}>{pricingCardCTALabel}</Link>
116
+ </Button>
117
+ </div>
118
+ </Card>
119
+ );
120
+ }
@@ -1,25 +1,25 @@
1
- import * as React from "react";
2
- import { cn } from "@/lib/utils";
3
-
4
- export type SelectProps = React.SelectHTMLAttributes<HTMLSelectElement>;
5
-
6
- const Select = React.forwardRef<HTMLSelectElement, SelectProps>(
7
- ({ className, children, ...props }, ref) => {
8
- return (
9
- <select
10
- ref={ref}
11
- className={cn(
12
- "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 focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",
13
- "bg-[var(--input-bg)] text-[var(--input-fg)]",
14
- className,
15
- )}
16
- {...props}
17
- >
18
- {children}
19
- </select>
20
- );
21
- },
22
- );
23
- Select.displayName = "Select";
24
-
25
- export { Select };
1
+ import * as React from "react";
2
+ import { cn } from "@/lib/utils";
3
+
4
+ export type SelectProps = React.SelectHTMLAttributes<HTMLSelectElement>;
5
+
6
+ const Select = React.forwardRef<HTMLSelectElement, SelectProps>(
7
+ ({ className, children, ...props }, ref) => {
8
+ return (
9
+ <select
10
+ ref={ref}
11
+ className={cn(
12
+ "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 focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",
13
+ "bg-[var(--input-bg)] text-[var(--input-fg)]",
14
+ className,
15
+ )}
16
+ {...props}
17
+ >
18
+ {children}
19
+ </select>
20
+ );
21
+ },
22
+ );
23
+ Select.displayName = "Select";
24
+
25
+ export { Select };
@@ -1,13 +1,13 @@
1
- import { cn } from "@/lib/utils";
2
-
3
- export function Skeleton({
4
- className,
5
- ...props
6
- }: React.HTMLAttributes<HTMLDivElement>) {
7
- return (
8
- <div
9
- className={cn("bg-muted animate-pulse rounded-md", className)}
10
- {...props}
11
- />
12
- );
13
- }
1
+ import { cn } from "@/lib/utils";
2
+
3
+ export function Skeleton({
4
+ className,
5
+ ...props
6
+ }: React.HTMLAttributes<HTMLDivElement>) {
7
+ return (
8
+ <div
9
+ className={cn("bg-muted animate-pulse rounded-md", className)}
10
+ {...props}
11
+ />
12
+ );
13
+ }
@@ -1,98 +1,98 @@
1
- import * as React from "react";
2
- import { cn } from "@/lib/utils";
3
-
4
- export function Table({
5
- className,
6
- ...props
7
- }: React.HTMLAttributes<HTMLTableElement>) {
8
- return (
9
- <div className="relative w-full overflow-auto">
10
- <table
11
- className={cn(
12
- "w-full caption-bottom text-sm",
13
- // Optional fg override
14
- "text-[var(--table-fg)]",
15
- className,
16
- )}
17
- {...props}
18
- />
19
- </div>
20
- );
21
- }
22
-
23
- export function TableHeader(
24
- props: React.HTMLAttributes<HTMLTableSectionElement>,
25
- ) {
26
- return (
27
- <thead
28
- className={cn(
29
- "[&_tr]:border-b",
30
- // Variable hooks for border color and head text
31
- "text-[var(--table-head-fg)] [&_tr]:border-[var(--table-border)]",
32
- )}
33
- {...props}
34
- />
35
- );
36
- }
37
-
38
- export function TableBody(
39
- props: React.HTMLAttributes<HTMLTableSectionElement>,
40
- ) {
41
- return (
42
- <tbody
43
- className={cn(
44
- "[&_tr:last-child]:border-0",
45
- "[&_tr]:border-[var(--table-border)]",
46
- )}
47
- {...props}
48
- />
49
- );
50
- }
51
-
52
- export function TableRow(props: React.HTMLAttributes<HTMLTableRowElement>) {
53
- return (
54
- <tr
55
- className={cn(
56
- "hover:bg-muted/50 border-b transition-colors",
57
- "border-[var(--table-border)] hover:bg-[var(--table-row-hover-bg)]",
58
- )}
59
- {...props}
60
- />
61
- );
62
- }
63
-
64
- export function TableHead(props: React.ThHTMLAttributes<HTMLTableCellElement>) {
65
- return (
66
- <th
67
- className={cn(
68
- "text-muted-foreground h-10 px-4 text-left align-middle font-medium [&:has([role=checkbox])]:pr-0",
69
- "text-[var(--table-head-fg)]",
70
- )}
71
- {...props}
72
- />
73
- );
74
- }
75
-
76
- export function TableCell(props: React.TdHTMLAttributes<HTMLTableCellElement>) {
77
- return (
78
- <td
79
- className={cn(
80
- "p-4 align-middle [&:has([role=checkbox])]:pr-0",
81
- "text-[var(--table-fg)]",
82
- )}
83
- {...props}
84
- />
85
- );
86
- }
87
-
88
- export function TableCaption(props: React.HTMLAttributes<HTMLElement>) {
89
- return (
90
- <caption
91
- className={cn(
92
- "text-muted-foreground mt-4 text-sm",
93
- "text-[var(--table-muted-fg)]",
94
- )}
95
- {...props}
96
- />
97
- );
98
- }
1
+ import * as React from "react";
2
+ import { cn } from "@/lib/utils";
3
+
4
+ export function Table({
5
+ className,
6
+ ...props
7
+ }: React.HTMLAttributes<HTMLTableElement>) {
8
+ return (
9
+ <div className="relative w-full overflow-auto">
10
+ <table
11
+ className={cn(
12
+ "w-full caption-bottom text-sm",
13
+ // Optional fg override
14
+ "text-[var(--table-fg)]",
15
+ className,
16
+ )}
17
+ {...props}
18
+ />
19
+ </div>
20
+ );
21
+ }
22
+
23
+ export function TableHeader(
24
+ props: React.HTMLAttributes<HTMLTableSectionElement>,
25
+ ) {
26
+ return (
27
+ <thead
28
+ className={cn(
29
+ "[&_tr]:border-b",
30
+ // Variable hooks for border color and head text
31
+ "text-[var(--table-head-fg)] [&_tr]:border-[var(--table-border)]",
32
+ )}
33
+ {...props}
34
+ />
35
+ );
36
+ }
37
+
38
+ export function TableBody(
39
+ props: React.HTMLAttributes<HTMLTableSectionElement>,
40
+ ) {
41
+ return (
42
+ <tbody
43
+ className={cn(
44
+ "[&_tr:last-child]:border-0",
45
+ "[&_tr]:border-[var(--table-border)]",
46
+ )}
47
+ {...props}
48
+ />
49
+ );
50
+ }
51
+
52
+ export function TableRow(props: React.HTMLAttributes<HTMLTableRowElement>) {
53
+ return (
54
+ <tr
55
+ className={cn(
56
+ "hover:bg-muted/50 border-b transition-colors",
57
+ "border-[var(--table-border)] hover:bg-[var(--table-row-hover-bg)]",
58
+ )}
59
+ {...props}
60
+ />
61
+ );
62
+ }
63
+
64
+ export function TableHead(props: React.ThHTMLAttributes<HTMLTableCellElement>) {
65
+ return (
66
+ <th
67
+ className={cn(
68
+ "text-muted-foreground h-10 px-4 text-left align-middle font-medium [&:has([role=checkbox])]:pr-0",
69
+ "text-[var(--table-head-fg)]",
70
+ )}
71
+ {...props}
72
+ />
73
+ );
74
+ }
75
+
76
+ export function TableCell(props: React.TdHTMLAttributes<HTMLTableCellElement>) {
77
+ return (
78
+ <td
79
+ className={cn(
80
+ "p-4 align-middle [&:has([role=checkbox])]:pr-0",
81
+ "text-[var(--table-fg)]",
82
+ )}
83
+ {...props}
84
+ />
85
+ );
86
+ }
87
+
88
+ export function TableCaption(props: React.HTMLAttributes<HTMLElement>) {
89
+ return (
90
+ <caption
91
+ className={cn(
92
+ "text-muted-foreground mt-4 text-sm",
93
+ "text-[var(--table-muted-fg)]",
94
+ )}
95
+ {...props}
96
+ />
97
+ );
98
+ }