@classic-homes/theme-react 0.1.0
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/dist/index.d.mts +69 -0
- package/dist/index.d.ts +69 -0
- package/dist/index.js +357 -0
- package/dist/index.mjs +294 -0
- package/package.json +67 -0
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
5
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
|
+
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
7
|
+
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
8
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
9
|
+
import { ClassValue } from 'clsx';
|
|
10
|
+
|
|
11
|
+
declare const buttonVariants: (props?: ({
|
|
12
|
+
variant?: "default" | "secondary" | "destructive" | "outline" | "ghost" | "link" | null | undefined;
|
|
13
|
+
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
14
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
15
|
+
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
16
|
+
asChild?: boolean;
|
|
17
|
+
}
|
|
18
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
19
|
+
|
|
20
|
+
declare const Card: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
21
|
+
declare const CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
22
|
+
declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
23
|
+
declare const CardDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
24
|
+
declare const CardContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
25
|
+
declare const CardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
26
|
+
|
|
27
|
+
interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
28
|
+
}
|
|
29
|
+
declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
30
|
+
|
|
31
|
+
declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: class_variance_authority_types.ClassProp | undefined) => string> & React.RefAttributes<HTMLLabelElement>>;
|
|
32
|
+
|
|
33
|
+
declare const badgeVariants: (props?: ({
|
|
34
|
+
variant?: "default" | "secondary" | "destructive" | "outline" | null | undefined;
|
|
35
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
36
|
+
interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
37
|
+
}
|
|
38
|
+
declare function Badge({ className, variant, ...props }: BadgeProps): react_jsx_runtime.JSX.Element;
|
|
39
|
+
|
|
40
|
+
declare const Separator: React.ForwardRefExoticComponent<Omit<SeparatorPrimitive.SeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
41
|
+
|
|
42
|
+
declare const Avatar: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
43
|
+
declare const AvatarImage: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarImageProps & React.RefAttributes<HTMLImageElement>, "ref"> & React.RefAttributes<HTMLImageElement>>;
|
|
44
|
+
declare const AvatarFallback: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarFallbackProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
45
|
+
|
|
46
|
+
declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
|
|
47
|
+
declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
48
|
+
declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
|
|
49
|
+
declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
50
|
+
declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
51
|
+
declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
52
|
+
declare const DialogHeader: {
|
|
53
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
54
|
+
displayName: string;
|
|
55
|
+
};
|
|
56
|
+
declare const DialogFooter: {
|
|
57
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
58
|
+
displayName: string;
|
|
59
|
+
};
|
|
60
|
+
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
61
|
+
declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Utility function to merge Tailwind CSS classes
|
|
65
|
+
* Uses clsx for conditional classes and tailwind-merge to handle conflicts
|
|
66
|
+
*/
|
|
67
|
+
declare function cn(...inputs: ClassValue[]): string;
|
|
68
|
+
|
|
69
|
+
export { Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Input, type InputProps, Label, Separator, badgeVariants, buttonVariants, cn };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
5
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
|
+
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
7
|
+
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
8
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
9
|
+
import { ClassValue } from 'clsx';
|
|
10
|
+
|
|
11
|
+
declare const buttonVariants: (props?: ({
|
|
12
|
+
variant?: "default" | "secondary" | "destructive" | "outline" | "ghost" | "link" | null | undefined;
|
|
13
|
+
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
14
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
15
|
+
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
16
|
+
asChild?: boolean;
|
|
17
|
+
}
|
|
18
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
19
|
+
|
|
20
|
+
declare const Card: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
21
|
+
declare const CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
22
|
+
declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
23
|
+
declare const CardDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
24
|
+
declare const CardContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
25
|
+
declare const CardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
26
|
+
|
|
27
|
+
interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
28
|
+
}
|
|
29
|
+
declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
30
|
+
|
|
31
|
+
declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: class_variance_authority_types.ClassProp | undefined) => string> & React.RefAttributes<HTMLLabelElement>>;
|
|
32
|
+
|
|
33
|
+
declare const badgeVariants: (props?: ({
|
|
34
|
+
variant?: "default" | "secondary" | "destructive" | "outline" | null | undefined;
|
|
35
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
36
|
+
interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
37
|
+
}
|
|
38
|
+
declare function Badge({ className, variant, ...props }: BadgeProps): react_jsx_runtime.JSX.Element;
|
|
39
|
+
|
|
40
|
+
declare const Separator: React.ForwardRefExoticComponent<Omit<SeparatorPrimitive.SeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
41
|
+
|
|
42
|
+
declare const Avatar: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
43
|
+
declare const AvatarImage: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarImageProps & React.RefAttributes<HTMLImageElement>, "ref"> & React.RefAttributes<HTMLImageElement>>;
|
|
44
|
+
declare const AvatarFallback: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarFallbackProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
45
|
+
|
|
46
|
+
declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
|
|
47
|
+
declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
48
|
+
declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
|
|
49
|
+
declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
50
|
+
declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
51
|
+
declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
52
|
+
declare const DialogHeader: {
|
|
53
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
54
|
+
displayName: string;
|
|
55
|
+
};
|
|
56
|
+
declare const DialogFooter: {
|
|
57
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
58
|
+
displayName: string;
|
|
59
|
+
};
|
|
60
|
+
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
61
|
+
declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Utility function to merge Tailwind CSS classes
|
|
65
|
+
* Uses clsx for conditional classes and tailwind-merge to handle conflicts
|
|
66
|
+
*/
|
|
67
|
+
declare function cn(...inputs: ClassValue[]): string;
|
|
68
|
+
|
|
69
|
+
export { Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Input, type InputProps, Label, Separator, badgeVariants, buttonVariants, cn };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// src/index.ts
|
|
31
|
+
var index_exports = {};
|
|
32
|
+
__export(index_exports, {
|
|
33
|
+
Avatar: () => Avatar,
|
|
34
|
+
AvatarFallback: () => AvatarFallback,
|
|
35
|
+
AvatarImage: () => AvatarImage,
|
|
36
|
+
Badge: () => Badge,
|
|
37
|
+
Button: () => Button,
|
|
38
|
+
Card: () => Card,
|
|
39
|
+
CardContent: () => CardContent,
|
|
40
|
+
CardDescription: () => CardDescription,
|
|
41
|
+
CardFooter: () => CardFooter,
|
|
42
|
+
CardHeader: () => CardHeader,
|
|
43
|
+
CardTitle: () => CardTitle,
|
|
44
|
+
Dialog: () => Dialog,
|
|
45
|
+
DialogClose: () => DialogClose,
|
|
46
|
+
DialogContent: () => DialogContent,
|
|
47
|
+
DialogDescription: () => DialogDescription,
|
|
48
|
+
DialogFooter: () => DialogFooter,
|
|
49
|
+
DialogHeader: () => DialogHeader,
|
|
50
|
+
DialogOverlay: () => DialogOverlay,
|
|
51
|
+
DialogPortal: () => DialogPortal,
|
|
52
|
+
DialogTitle: () => DialogTitle,
|
|
53
|
+
DialogTrigger: () => DialogTrigger,
|
|
54
|
+
Input: () => Input,
|
|
55
|
+
Label: () => Label,
|
|
56
|
+
Separator: () => Separator,
|
|
57
|
+
badgeVariants: () => badgeVariants,
|
|
58
|
+
buttonVariants: () => buttonVariants,
|
|
59
|
+
cn: () => cn
|
|
60
|
+
});
|
|
61
|
+
module.exports = __toCommonJS(index_exports);
|
|
62
|
+
|
|
63
|
+
// src/components/Button.tsx
|
|
64
|
+
var React = __toESM(require("react"));
|
|
65
|
+
var import_react_slot = require("@radix-ui/react-slot");
|
|
66
|
+
var import_class_variance_authority = require("class-variance-authority");
|
|
67
|
+
|
|
68
|
+
// src/lib/utils.ts
|
|
69
|
+
var import_clsx = require("clsx");
|
|
70
|
+
var import_tailwind_merge = require("tailwind-merge");
|
|
71
|
+
function cn(...inputs) {
|
|
72
|
+
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// src/components/Button.tsx
|
|
76
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
77
|
+
var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
78
|
+
// Base styles - using semantic color system
|
|
79
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium 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",
|
|
80
|
+
{
|
|
81
|
+
variants: {
|
|
82
|
+
variant: {
|
|
83
|
+
default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
|
|
84
|
+
secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
|
|
85
|
+
destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
|
|
86
|
+
outline: "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
|
|
87
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
88
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
89
|
+
},
|
|
90
|
+
size: {
|
|
91
|
+
default: "h-10 px-4 py-2",
|
|
92
|
+
sm: "h-9 rounded-md px-3 text-xs",
|
|
93
|
+
lg: "h-11 rounded-md px-8",
|
|
94
|
+
icon: "h-10 w-10"
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
defaultVariants: {
|
|
98
|
+
variant: "default",
|
|
99
|
+
size: "default"
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
);
|
|
103
|
+
var Button = React.forwardRef(
|
|
104
|
+
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
105
|
+
const Comp = asChild ? import_react_slot.Slot : "button";
|
|
106
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Comp, { className: cn(buttonVariants({ variant, size, className })), ref, ...props });
|
|
107
|
+
}
|
|
108
|
+
);
|
|
109
|
+
Button.displayName = "Button";
|
|
110
|
+
|
|
111
|
+
// src/components/Card.tsx
|
|
112
|
+
var React2 = __toESM(require("react"));
|
|
113
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
114
|
+
var Card = React2.forwardRef(
|
|
115
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
116
|
+
"div",
|
|
117
|
+
{
|
|
118
|
+
ref,
|
|
119
|
+
className: cn(
|
|
120
|
+
"rounded-lg border border-border bg-card text-card-foreground shadow-sm",
|
|
121
|
+
className
|
|
122
|
+
),
|
|
123
|
+
...props
|
|
124
|
+
}
|
|
125
|
+
)
|
|
126
|
+
);
|
|
127
|
+
Card.displayName = "Card";
|
|
128
|
+
var CardHeader = React2.forwardRef(
|
|
129
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { ref, className: cn("flex flex-col space-y-1.5 p-6", className), ...props })
|
|
130
|
+
);
|
|
131
|
+
CardHeader.displayName = "CardHeader";
|
|
132
|
+
var CardTitle = React2.forwardRef(
|
|
133
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
134
|
+
"h3",
|
|
135
|
+
{
|
|
136
|
+
ref,
|
|
137
|
+
className: cn("text-2xl font-semibold leading-none tracking-tight", className),
|
|
138
|
+
...props
|
|
139
|
+
}
|
|
140
|
+
)
|
|
141
|
+
);
|
|
142
|
+
CardTitle.displayName = "CardTitle";
|
|
143
|
+
var CardDescription = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { ref, className: cn("text-sm text-muted-foreground", className), ...props }));
|
|
144
|
+
CardDescription.displayName = "CardDescription";
|
|
145
|
+
var CardContent = React2.forwardRef(
|
|
146
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { ref, className: cn("p-6 pt-0", className), ...props })
|
|
147
|
+
);
|
|
148
|
+
CardContent.displayName = "CardContent";
|
|
149
|
+
var CardFooter = React2.forwardRef(
|
|
150
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { ref, className: cn("flex items-center p-6 pt-0", className), ...props })
|
|
151
|
+
);
|
|
152
|
+
CardFooter.displayName = "CardFooter";
|
|
153
|
+
|
|
154
|
+
// src/components/Input.tsx
|
|
155
|
+
var React3 = __toESM(require("react"));
|
|
156
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
157
|
+
var Input = React3.forwardRef(
|
|
158
|
+
({ className, type, ...props }, ref) => {
|
|
159
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
160
|
+
"input",
|
|
161
|
+
{
|
|
162
|
+
type,
|
|
163
|
+
className: cn(
|
|
164
|
+
"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",
|
|
165
|
+
className
|
|
166
|
+
),
|
|
167
|
+
ref,
|
|
168
|
+
...props
|
|
169
|
+
}
|
|
170
|
+
);
|
|
171
|
+
}
|
|
172
|
+
);
|
|
173
|
+
Input.displayName = "Input";
|
|
174
|
+
|
|
175
|
+
// src/components/Label.tsx
|
|
176
|
+
var React4 = __toESM(require("react"));
|
|
177
|
+
var LabelPrimitive = __toESM(require("@radix-ui/react-label"));
|
|
178
|
+
var import_class_variance_authority2 = require("class-variance-authority");
|
|
179
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
180
|
+
var labelVariants = (0, import_class_variance_authority2.cva)(
|
|
181
|
+
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
182
|
+
);
|
|
183
|
+
var Label = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(LabelPrimitive.Root, { ref, className: cn(labelVariants(), className), ...props }));
|
|
184
|
+
Label.displayName = LabelPrimitive.Root.displayName;
|
|
185
|
+
|
|
186
|
+
// src/components/Badge.tsx
|
|
187
|
+
var import_class_variance_authority3 = require("class-variance-authority");
|
|
188
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
189
|
+
var badgeVariants = (0, import_class_variance_authority3.cva)(
|
|
190
|
+
"inline-flex items-center rounded-full border border-border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
191
|
+
{
|
|
192
|
+
variants: {
|
|
193
|
+
variant: {
|
|
194
|
+
default: "border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
|
|
195
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
196
|
+
destructive: "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
|
|
197
|
+
outline: "text-foreground"
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
defaultVariants: {
|
|
201
|
+
variant: "default"
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
);
|
|
205
|
+
function Badge({ className, variant, ...props }) {
|
|
206
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: cn(badgeVariants({ variant }), className), ...props });
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
// src/components/Separator.tsx
|
|
210
|
+
var React5 = __toESM(require("react"));
|
|
211
|
+
var SeparatorPrimitive = __toESM(require("@radix-ui/react-separator"));
|
|
212
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
213
|
+
var Separator = React5.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
214
|
+
SeparatorPrimitive.Root,
|
|
215
|
+
{
|
|
216
|
+
ref,
|
|
217
|
+
decorative,
|
|
218
|
+
orientation,
|
|
219
|
+
className: cn(
|
|
220
|
+
"shrink-0 bg-border",
|
|
221
|
+
orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
|
|
222
|
+
className
|
|
223
|
+
),
|
|
224
|
+
...props
|
|
225
|
+
}
|
|
226
|
+
));
|
|
227
|
+
Separator.displayName = SeparatorPrimitive.Root.displayName;
|
|
228
|
+
|
|
229
|
+
// src/components/Avatar.tsx
|
|
230
|
+
var React6 = __toESM(require("react"));
|
|
231
|
+
var AvatarPrimitive = __toESM(require("@radix-ui/react-avatar"));
|
|
232
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
233
|
+
var Avatar = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
234
|
+
AvatarPrimitive.Root,
|
|
235
|
+
{
|
|
236
|
+
ref,
|
|
237
|
+
className: cn("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full", className),
|
|
238
|
+
...props
|
|
239
|
+
}
|
|
240
|
+
));
|
|
241
|
+
Avatar.displayName = AvatarPrimitive.Root.displayName;
|
|
242
|
+
var AvatarImage = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
243
|
+
AvatarPrimitive.Image,
|
|
244
|
+
{
|
|
245
|
+
ref,
|
|
246
|
+
className: cn("aspect-square h-full w-full", className),
|
|
247
|
+
...props
|
|
248
|
+
}
|
|
249
|
+
));
|
|
250
|
+
AvatarImage.displayName = AvatarPrimitive.Image.displayName;
|
|
251
|
+
var AvatarFallback = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
252
|
+
AvatarPrimitive.Fallback,
|
|
253
|
+
{
|
|
254
|
+
ref,
|
|
255
|
+
className: cn(
|
|
256
|
+
"flex h-full w-full items-center justify-center rounded-full bg-muted",
|
|
257
|
+
className
|
|
258
|
+
),
|
|
259
|
+
...props
|
|
260
|
+
}
|
|
261
|
+
));
|
|
262
|
+
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
|
|
263
|
+
|
|
264
|
+
// src/components/Dialog.tsx
|
|
265
|
+
var React7 = __toESM(require("react"));
|
|
266
|
+
var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"));
|
|
267
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
268
|
+
var Dialog = DialogPrimitive.Root;
|
|
269
|
+
var DialogTrigger = DialogPrimitive.Trigger;
|
|
270
|
+
var DialogPortal = DialogPrimitive.Portal;
|
|
271
|
+
var DialogClose = DialogPrimitive.Close;
|
|
272
|
+
var DialogOverlay = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
273
|
+
DialogPrimitive.Overlay,
|
|
274
|
+
{
|
|
275
|
+
ref,
|
|
276
|
+
className: cn(
|
|
277
|
+
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
278
|
+
className
|
|
279
|
+
),
|
|
280
|
+
...props
|
|
281
|
+
}
|
|
282
|
+
));
|
|
283
|
+
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
284
|
+
var DialogContent = React7.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(DialogPortal, { children: [
|
|
285
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(DialogOverlay, {}),
|
|
286
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
287
|
+
DialogPrimitive.Content,
|
|
288
|
+
{
|
|
289
|
+
ref,
|
|
290
|
+
className: cn(
|
|
291
|
+
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
|
|
292
|
+
className
|
|
293
|
+
),
|
|
294
|
+
...props,
|
|
295
|
+
children
|
|
296
|
+
}
|
|
297
|
+
)
|
|
298
|
+
] }));
|
|
299
|
+
DialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
300
|
+
var DialogHeader = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className), ...props });
|
|
301
|
+
DialogHeader.displayName = "DialogHeader";
|
|
302
|
+
var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
303
|
+
"div",
|
|
304
|
+
{
|
|
305
|
+
className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className),
|
|
306
|
+
...props
|
|
307
|
+
}
|
|
308
|
+
);
|
|
309
|
+
DialogFooter.displayName = "DialogFooter";
|
|
310
|
+
var DialogTitle = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
311
|
+
DialogPrimitive.Title,
|
|
312
|
+
{
|
|
313
|
+
ref,
|
|
314
|
+
className: cn("text-lg font-semibold leading-none tracking-tight", className),
|
|
315
|
+
...props
|
|
316
|
+
}
|
|
317
|
+
));
|
|
318
|
+
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
319
|
+
var DialogDescription = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
320
|
+
DialogPrimitive.Description,
|
|
321
|
+
{
|
|
322
|
+
ref,
|
|
323
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
324
|
+
...props
|
|
325
|
+
}
|
|
326
|
+
));
|
|
327
|
+
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
328
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
329
|
+
0 && (module.exports = {
|
|
330
|
+
Avatar,
|
|
331
|
+
AvatarFallback,
|
|
332
|
+
AvatarImage,
|
|
333
|
+
Badge,
|
|
334
|
+
Button,
|
|
335
|
+
Card,
|
|
336
|
+
CardContent,
|
|
337
|
+
CardDescription,
|
|
338
|
+
CardFooter,
|
|
339
|
+
CardHeader,
|
|
340
|
+
CardTitle,
|
|
341
|
+
Dialog,
|
|
342
|
+
DialogClose,
|
|
343
|
+
DialogContent,
|
|
344
|
+
DialogDescription,
|
|
345
|
+
DialogFooter,
|
|
346
|
+
DialogHeader,
|
|
347
|
+
DialogOverlay,
|
|
348
|
+
DialogPortal,
|
|
349
|
+
DialogTitle,
|
|
350
|
+
DialogTrigger,
|
|
351
|
+
Input,
|
|
352
|
+
Label,
|
|
353
|
+
Separator,
|
|
354
|
+
badgeVariants,
|
|
355
|
+
buttonVariants,
|
|
356
|
+
cn
|
|
357
|
+
});
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
// src/components/Button.tsx
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
4
|
+
import { cva } from "class-variance-authority";
|
|
5
|
+
|
|
6
|
+
// src/lib/utils.ts
|
|
7
|
+
import { clsx } from "clsx";
|
|
8
|
+
import { twMerge } from "tailwind-merge";
|
|
9
|
+
function cn(...inputs) {
|
|
10
|
+
return twMerge(clsx(inputs));
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// src/components/Button.tsx
|
|
14
|
+
import { jsx } from "react/jsx-runtime";
|
|
15
|
+
var buttonVariants = cva(
|
|
16
|
+
// Base styles - using semantic color system
|
|
17
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium 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",
|
|
18
|
+
{
|
|
19
|
+
variants: {
|
|
20
|
+
variant: {
|
|
21
|
+
default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
|
|
22
|
+
secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
|
|
23
|
+
destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
|
|
24
|
+
outline: "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
|
|
25
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
26
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
27
|
+
},
|
|
28
|
+
size: {
|
|
29
|
+
default: "h-10 px-4 py-2",
|
|
30
|
+
sm: "h-9 rounded-md px-3 text-xs",
|
|
31
|
+
lg: "h-11 rounded-md px-8",
|
|
32
|
+
icon: "h-10 w-10"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
defaultVariants: {
|
|
36
|
+
variant: "default",
|
|
37
|
+
size: "default"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
var Button = React.forwardRef(
|
|
42
|
+
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
43
|
+
const Comp = asChild ? Slot : "button";
|
|
44
|
+
return /* @__PURE__ */ jsx(Comp, { className: cn(buttonVariants({ variant, size, className })), ref, ...props });
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
Button.displayName = "Button";
|
|
48
|
+
|
|
49
|
+
// src/components/Card.tsx
|
|
50
|
+
import * as React2 from "react";
|
|
51
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
52
|
+
var Card = React2.forwardRef(
|
|
53
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx2(
|
|
54
|
+
"div",
|
|
55
|
+
{
|
|
56
|
+
ref,
|
|
57
|
+
className: cn(
|
|
58
|
+
"rounded-lg border border-border bg-card text-card-foreground shadow-sm",
|
|
59
|
+
className
|
|
60
|
+
),
|
|
61
|
+
...props
|
|
62
|
+
}
|
|
63
|
+
)
|
|
64
|
+
);
|
|
65
|
+
Card.displayName = "Card";
|
|
66
|
+
var CardHeader = React2.forwardRef(
|
|
67
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx2("div", { ref, className: cn("flex flex-col space-y-1.5 p-6", className), ...props })
|
|
68
|
+
);
|
|
69
|
+
CardHeader.displayName = "CardHeader";
|
|
70
|
+
var CardTitle = React2.forwardRef(
|
|
71
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx2(
|
|
72
|
+
"h3",
|
|
73
|
+
{
|
|
74
|
+
ref,
|
|
75
|
+
className: cn("text-2xl font-semibold leading-none tracking-tight", className),
|
|
76
|
+
...props
|
|
77
|
+
}
|
|
78
|
+
)
|
|
79
|
+
);
|
|
80
|
+
CardTitle.displayName = "CardTitle";
|
|
81
|
+
var CardDescription = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx2("p", { ref, className: cn("text-sm text-muted-foreground", className), ...props }));
|
|
82
|
+
CardDescription.displayName = "CardDescription";
|
|
83
|
+
var CardContent = React2.forwardRef(
|
|
84
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx2("div", { ref, className: cn("p-6 pt-0", className), ...props })
|
|
85
|
+
);
|
|
86
|
+
CardContent.displayName = "CardContent";
|
|
87
|
+
var CardFooter = React2.forwardRef(
|
|
88
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx2("div", { ref, className: cn("flex items-center p-6 pt-0", className), ...props })
|
|
89
|
+
);
|
|
90
|
+
CardFooter.displayName = "CardFooter";
|
|
91
|
+
|
|
92
|
+
// src/components/Input.tsx
|
|
93
|
+
import * as React3 from "react";
|
|
94
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
95
|
+
var Input = React3.forwardRef(
|
|
96
|
+
({ className, type, ...props }, ref) => {
|
|
97
|
+
return /* @__PURE__ */ jsx3(
|
|
98
|
+
"input",
|
|
99
|
+
{
|
|
100
|
+
type,
|
|
101
|
+
className: cn(
|
|
102
|
+
"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",
|
|
103
|
+
className
|
|
104
|
+
),
|
|
105
|
+
ref,
|
|
106
|
+
...props
|
|
107
|
+
}
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
);
|
|
111
|
+
Input.displayName = "Input";
|
|
112
|
+
|
|
113
|
+
// src/components/Label.tsx
|
|
114
|
+
import * as React4 from "react";
|
|
115
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
116
|
+
import { cva as cva2 } from "class-variance-authority";
|
|
117
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
118
|
+
var labelVariants = cva2(
|
|
119
|
+
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
120
|
+
);
|
|
121
|
+
var Label = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx4(LabelPrimitive.Root, { ref, className: cn(labelVariants(), className), ...props }));
|
|
122
|
+
Label.displayName = LabelPrimitive.Root.displayName;
|
|
123
|
+
|
|
124
|
+
// src/components/Badge.tsx
|
|
125
|
+
import { cva as cva3 } from "class-variance-authority";
|
|
126
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
127
|
+
var badgeVariants = cva3(
|
|
128
|
+
"inline-flex items-center rounded-full border border-border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
129
|
+
{
|
|
130
|
+
variants: {
|
|
131
|
+
variant: {
|
|
132
|
+
default: "border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
|
|
133
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
134
|
+
destructive: "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
|
|
135
|
+
outline: "text-foreground"
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
defaultVariants: {
|
|
139
|
+
variant: "default"
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
);
|
|
143
|
+
function Badge({ className, variant, ...props }) {
|
|
144
|
+
return /* @__PURE__ */ jsx5("div", { className: cn(badgeVariants({ variant }), className), ...props });
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// src/components/Separator.tsx
|
|
148
|
+
import * as React5 from "react";
|
|
149
|
+
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
150
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
151
|
+
var Separator = React5.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx6(
|
|
152
|
+
SeparatorPrimitive.Root,
|
|
153
|
+
{
|
|
154
|
+
ref,
|
|
155
|
+
decorative,
|
|
156
|
+
orientation,
|
|
157
|
+
className: cn(
|
|
158
|
+
"shrink-0 bg-border",
|
|
159
|
+
orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
|
|
160
|
+
className
|
|
161
|
+
),
|
|
162
|
+
...props
|
|
163
|
+
}
|
|
164
|
+
));
|
|
165
|
+
Separator.displayName = SeparatorPrimitive.Root.displayName;
|
|
166
|
+
|
|
167
|
+
// src/components/Avatar.tsx
|
|
168
|
+
import * as React6 from "react";
|
|
169
|
+
import * as AvatarPrimitive from "@radix-ui/react-avatar";
|
|
170
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
171
|
+
var Avatar = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx7(
|
|
172
|
+
AvatarPrimitive.Root,
|
|
173
|
+
{
|
|
174
|
+
ref,
|
|
175
|
+
className: cn("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full", className),
|
|
176
|
+
...props
|
|
177
|
+
}
|
|
178
|
+
));
|
|
179
|
+
Avatar.displayName = AvatarPrimitive.Root.displayName;
|
|
180
|
+
var AvatarImage = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx7(
|
|
181
|
+
AvatarPrimitive.Image,
|
|
182
|
+
{
|
|
183
|
+
ref,
|
|
184
|
+
className: cn("aspect-square h-full w-full", className),
|
|
185
|
+
...props
|
|
186
|
+
}
|
|
187
|
+
));
|
|
188
|
+
AvatarImage.displayName = AvatarPrimitive.Image.displayName;
|
|
189
|
+
var AvatarFallback = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx7(
|
|
190
|
+
AvatarPrimitive.Fallback,
|
|
191
|
+
{
|
|
192
|
+
ref,
|
|
193
|
+
className: cn(
|
|
194
|
+
"flex h-full w-full items-center justify-center rounded-full bg-muted",
|
|
195
|
+
className
|
|
196
|
+
),
|
|
197
|
+
...props
|
|
198
|
+
}
|
|
199
|
+
));
|
|
200
|
+
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
|
|
201
|
+
|
|
202
|
+
// src/components/Dialog.tsx
|
|
203
|
+
import * as React7 from "react";
|
|
204
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
205
|
+
import { jsx as jsx8, jsxs } from "react/jsx-runtime";
|
|
206
|
+
var Dialog = DialogPrimitive.Root;
|
|
207
|
+
var DialogTrigger = DialogPrimitive.Trigger;
|
|
208
|
+
var DialogPortal = DialogPrimitive.Portal;
|
|
209
|
+
var DialogClose = DialogPrimitive.Close;
|
|
210
|
+
var DialogOverlay = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx8(
|
|
211
|
+
DialogPrimitive.Overlay,
|
|
212
|
+
{
|
|
213
|
+
ref,
|
|
214
|
+
className: cn(
|
|
215
|
+
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
216
|
+
className
|
|
217
|
+
),
|
|
218
|
+
...props
|
|
219
|
+
}
|
|
220
|
+
));
|
|
221
|
+
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
222
|
+
var DialogContent = React7.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DialogPortal, { children: [
|
|
223
|
+
/* @__PURE__ */ jsx8(DialogOverlay, {}),
|
|
224
|
+
/* @__PURE__ */ jsx8(
|
|
225
|
+
DialogPrimitive.Content,
|
|
226
|
+
{
|
|
227
|
+
ref,
|
|
228
|
+
className: cn(
|
|
229
|
+
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
|
|
230
|
+
className
|
|
231
|
+
),
|
|
232
|
+
...props,
|
|
233
|
+
children
|
|
234
|
+
}
|
|
235
|
+
)
|
|
236
|
+
] }));
|
|
237
|
+
DialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
238
|
+
var DialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsx8("div", { className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className), ...props });
|
|
239
|
+
DialogHeader.displayName = "DialogHeader";
|
|
240
|
+
var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx8(
|
|
241
|
+
"div",
|
|
242
|
+
{
|
|
243
|
+
className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className),
|
|
244
|
+
...props
|
|
245
|
+
}
|
|
246
|
+
);
|
|
247
|
+
DialogFooter.displayName = "DialogFooter";
|
|
248
|
+
var DialogTitle = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx8(
|
|
249
|
+
DialogPrimitive.Title,
|
|
250
|
+
{
|
|
251
|
+
ref,
|
|
252
|
+
className: cn("text-lg font-semibold leading-none tracking-tight", className),
|
|
253
|
+
...props
|
|
254
|
+
}
|
|
255
|
+
));
|
|
256
|
+
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
257
|
+
var DialogDescription = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx8(
|
|
258
|
+
DialogPrimitive.Description,
|
|
259
|
+
{
|
|
260
|
+
ref,
|
|
261
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
262
|
+
...props
|
|
263
|
+
}
|
|
264
|
+
));
|
|
265
|
+
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
266
|
+
export {
|
|
267
|
+
Avatar,
|
|
268
|
+
AvatarFallback,
|
|
269
|
+
AvatarImage,
|
|
270
|
+
Badge,
|
|
271
|
+
Button,
|
|
272
|
+
Card,
|
|
273
|
+
CardContent,
|
|
274
|
+
CardDescription,
|
|
275
|
+
CardFooter,
|
|
276
|
+
CardHeader,
|
|
277
|
+
CardTitle,
|
|
278
|
+
Dialog,
|
|
279
|
+
DialogClose,
|
|
280
|
+
DialogContent,
|
|
281
|
+
DialogDescription,
|
|
282
|
+
DialogFooter,
|
|
283
|
+
DialogHeader,
|
|
284
|
+
DialogOverlay,
|
|
285
|
+
DialogPortal,
|
|
286
|
+
DialogTitle,
|
|
287
|
+
DialogTrigger,
|
|
288
|
+
Input,
|
|
289
|
+
Label,
|
|
290
|
+
Separator,
|
|
291
|
+
badgeVariants,
|
|
292
|
+
buttonVariants,
|
|
293
|
+
cn
|
|
294
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@classic-homes/theme-react",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "React components for the Classic theme system",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"module": "dist/index.mjs",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.mjs",
|
|
12
|
+
"require": "./dist/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./styles.css": "./dist/styles.css"
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist"
|
|
18
|
+
],
|
|
19
|
+
"scripts": {
|
|
20
|
+
"build": "tsup src/index.ts --format esm,cjs --dts --external react --external react-dom",
|
|
21
|
+
"dev": "tsup src/index.ts --format esm,cjs --dts --external react --external react-dom --watch",
|
|
22
|
+
"clean": "rm -rf dist",
|
|
23
|
+
"typecheck": "tsc --noEmit"
|
|
24
|
+
},
|
|
25
|
+
"keywords": [
|
|
26
|
+
"react",
|
|
27
|
+
"components",
|
|
28
|
+
"design-system"
|
|
29
|
+
],
|
|
30
|
+
"license": "MIT",
|
|
31
|
+
"repository": {
|
|
32
|
+
"type": "git",
|
|
33
|
+
"url": "https://github.com/Classic-Homes/classic-theme.git",
|
|
34
|
+
"directory": "packages/react"
|
|
35
|
+
},
|
|
36
|
+
"publishConfig": {
|
|
37
|
+
"access": "public"
|
|
38
|
+
},
|
|
39
|
+
"peerDependencies": {
|
|
40
|
+
"react": "^18.0.0",
|
|
41
|
+
"react-dom": "^18.0.0"
|
|
42
|
+
},
|
|
43
|
+
"dependencies": {
|
|
44
|
+
"@classic-homes/theme-tokens": "*",
|
|
45
|
+
"@radix-ui/react-accordion": "^1.2.0",
|
|
46
|
+
"@radix-ui/react-alert-dialog": "^1.1.0",
|
|
47
|
+
"@radix-ui/react-avatar": "^1.1.0",
|
|
48
|
+
"@radix-ui/react-dialog": "^1.1.0",
|
|
49
|
+
"@radix-ui/react-dropdown-menu": "^2.1.0",
|
|
50
|
+
"@radix-ui/react-label": "^2.1.0",
|
|
51
|
+
"@radix-ui/react-popover": "^1.1.0",
|
|
52
|
+
"@radix-ui/react-separator": "^1.1.0",
|
|
53
|
+
"@radix-ui/react-slot": "^1.1.0",
|
|
54
|
+
"@radix-ui/react-tabs": "^1.1.0",
|
|
55
|
+
"class-variance-authority": "^0.7.0",
|
|
56
|
+
"clsx": "^2.1.0",
|
|
57
|
+
"tailwind-merge": "^2.2.0"
|
|
58
|
+
},
|
|
59
|
+
"devDependencies": {
|
|
60
|
+
"@types/react": "^18.2.0",
|
|
61
|
+
"@types/react-dom": "^18.2.0",
|
|
62
|
+
"react": "^18.2.0",
|
|
63
|
+
"react-dom": "^18.2.0",
|
|
64
|
+
"tsup": "^8.0.0",
|
|
65
|
+
"typescript": "^5.3.0"
|
|
66
|
+
}
|
|
67
|
+
}
|