@the21og/a16z 0.0.1
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/components/ui/button.tsx +53 -0
- package/components/ui/card.tsx +73 -0
- package/components/ui/input.tsx +25 -0
- package/index.css +31 -0
- package/index.ts +5 -0
- package/lib/utils.ts +6 -0
- package/package.json +17 -0
|
@@ -0,0 +1,53 @@
|
|
|
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
|
+
"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
|
|
9
|
+
{
|
|
10
|
+
variants: {
|
|
11
|
+
variant: {
|
|
12
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
13
|
+
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
14
|
+
outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
|
15
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
16
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
17
|
+
link: "text-primary underline-offset-4 hover:underline",
|
|
18
|
+
},
|
|
19
|
+
size: {
|
|
20
|
+
default: "h-10 px-4 py-2",
|
|
21
|
+
sm: "h-9 rounded-md px-3",
|
|
22
|
+
lg: "h-11 rounded-md px-8",
|
|
23
|
+
icon: "h-10 w-10",
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
defaultVariants: {
|
|
27
|
+
variant: "default",
|
|
28
|
+
size: "default",
|
|
29
|
+
},
|
|
30
|
+
}
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
export interface ButtonProps
|
|
34
|
+
extends React.ButtonHTMLAttributes<HTMLButtonElement>,
|
|
35
|
+
VariantProps<typeof buttonVariants> {
|
|
36
|
+
asChild?: boolean
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
40
|
+
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
41
|
+
const Comp = asChild ? Slot : "button"
|
|
42
|
+
return (
|
|
43
|
+
<Comp
|
|
44
|
+
className={cn(buttonVariants({ variant, size, className }))}
|
|
45
|
+
ref={ref}
|
|
46
|
+
{...props}
|
|
47
|
+
/>
|
|
48
|
+
)
|
|
49
|
+
}
|
|
50
|
+
)
|
|
51
|
+
Button.displayName = "Button"
|
|
52
|
+
|
|
53
|
+
export { Button, buttonVariants }
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
|
|
3
|
+
import { cn } from "../../lib/utils"
|
|
4
|
+
|
|
5
|
+
const Card = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
|
|
6
|
+
({ className, ...props }, ref) => (
|
|
7
|
+
<div
|
|
8
|
+
ref={ref}
|
|
9
|
+
className={cn(
|
|
10
|
+
"rounded-lg border bg-card text-card-foreground shadow-sm",
|
|
11
|
+
className
|
|
12
|
+
)}
|
|
13
|
+
{...props}
|
|
14
|
+
/>
|
|
15
|
+
)
|
|
16
|
+
)
|
|
17
|
+
Card.displayName = "Card"
|
|
18
|
+
|
|
19
|
+
const CardHeader = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
|
|
20
|
+
({ className, ...props }, ref) => (
|
|
21
|
+
<div
|
|
22
|
+
ref={ref}
|
|
23
|
+
className={cn("flex flex-col space-y-1.5 p-6", className)}
|
|
24
|
+
{...props}
|
|
25
|
+
/>
|
|
26
|
+
)
|
|
27
|
+
)
|
|
28
|
+
CardHeader.displayName = "CardHeader"
|
|
29
|
+
|
|
30
|
+
const CardTitle = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLHeadingElement>>(
|
|
31
|
+
({ className, ...props }, ref) => (
|
|
32
|
+
<h3
|
|
33
|
+
ref={ref}
|
|
34
|
+
className={cn(
|
|
35
|
+
"text-2xl font-semibold leading-none tracking-tight",
|
|
36
|
+
className
|
|
37
|
+
)}
|
|
38
|
+
{...props}
|
|
39
|
+
/>
|
|
40
|
+
)
|
|
41
|
+
)
|
|
42
|
+
CardTitle.displayName = "CardTitle"
|
|
43
|
+
|
|
44
|
+
const CardDescription = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLParagraphElement>>(
|
|
45
|
+
({ className, ...props }, ref) => (
|
|
46
|
+
<p
|
|
47
|
+
ref={ref}
|
|
48
|
+
className={cn("text-sm text-muted-foreground", className)}
|
|
49
|
+
{...props}
|
|
50
|
+
/>
|
|
51
|
+
)
|
|
52
|
+
)
|
|
53
|
+
CardDescription.displayName = "CardDescription"
|
|
54
|
+
|
|
55
|
+
const CardContent = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
|
|
56
|
+
({ className, ...props }, ref) => (
|
|
57
|
+
<div ref={ref} className={cn("p-6 pt-0", className)} {...props} />
|
|
58
|
+
)
|
|
59
|
+
)
|
|
60
|
+
CardContent.displayName = "CardContent"
|
|
61
|
+
|
|
62
|
+
const CardFooter = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
|
|
63
|
+
({ className, ...props }, ref) => (
|
|
64
|
+
<div
|
|
65
|
+
ref={ref}
|
|
66
|
+
className={cn("flex items-center p-6 pt-0", className)}
|
|
67
|
+
{...props}
|
|
68
|
+
/>
|
|
69
|
+
)
|
|
70
|
+
)
|
|
71
|
+
CardFooter.displayName = "CardFooter"
|
|
72
|
+
|
|
73
|
+
export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent }
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
|
|
3
|
+
import { cn } from "../../lib/utils"
|
|
4
|
+
|
|
5
|
+
export interface InputProps
|
|
6
|
+
extends React.InputHTMLAttributes<HTMLInputElement> {}
|
|
7
|
+
|
|
8
|
+
const Input = React.forwardRef<HTMLInputElement, InputProps>(
|
|
9
|
+
({ className, type, ...props }, ref) => {
|
|
10
|
+
return (
|
|
11
|
+
<input
|
|
12
|
+
type={type}
|
|
13
|
+
className={cn(
|
|
14
|
+
"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
15
|
+
className
|
|
16
|
+
)}
|
|
17
|
+
ref={ref}
|
|
18
|
+
{...props}
|
|
19
|
+
/>
|
|
20
|
+
)
|
|
21
|
+
}
|
|
22
|
+
)
|
|
23
|
+
Input.displayName = "Input"
|
|
24
|
+
|
|
25
|
+
export { Input }
|
package/index.css
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
@tailwind base;
|
|
2
|
+
@tailwind components;
|
|
3
|
+
@tailwind utilities;
|
|
4
|
+
|
|
5
|
+
@layer base {
|
|
6
|
+
:root {
|
|
7
|
+
--card: 0 0% 100%;
|
|
8
|
+
--ring: 0 72.2% 50.6%;
|
|
9
|
+
--input: 0 0% 89.8%;
|
|
10
|
+
--muted: 0 0% 96.1%;
|
|
11
|
+
--accent: 0 0% 96.1%;
|
|
12
|
+
--border: 0 0% 89.8%;
|
|
13
|
+
--radius: 0.75rem;
|
|
14
|
+
--popover: 0 0% 100%;
|
|
15
|
+
--primary: 0 72.2% 50.6%;
|
|
16
|
+
--secondary: 0 0% 96.1%;
|
|
17
|
+
--background: 0 0% 100%;
|
|
18
|
+
--foreground: 0 0% 3.9%;
|
|
19
|
+
--destructive: 0 84.2% 60.2%;
|
|
20
|
+
--card-foreground: 0 0% 3.9%;
|
|
21
|
+
--muted-foreground: 0 0% 45.1%;
|
|
22
|
+
--accent-foreground: 0 0% 9%;
|
|
23
|
+
--popover-foreground: 0 0% 3.9%;
|
|
24
|
+
--primary-foreground: 0 85.7% 97.3%;
|
|
25
|
+
--secondary-foreground: 0 0% 9%;
|
|
26
|
+
--destructive-foreground: 0 0% 98%;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.dark {
|
|
30
|
+
}
|
|
31
|
+
}
|
package/index.ts
ADDED
package/lib/utils.ts
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@the21og/a16z",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "a16z is a startup accelerator and venture capital firm",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"style": "index.css",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"peerDependencies": {
|
|
9
|
+
"react": "^18.0.0",
|
|
10
|
+
"react-dom": "^18.0.0",
|
|
11
|
+
"tailwindcss": "^3.0.0",
|
|
12
|
+
"class-variance-authority": "^0.7.0",
|
|
13
|
+
"clsx": "^2.0.0",
|
|
14
|
+
"tailwind-merge": "^2.0.0",
|
|
15
|
+
"lucide-react": "^0.300.0"
|
|
16
|
+
}
|
|
17
|
+
}
|