@liamkeene/ui 0.0.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.cjs ADDED
@@ -0,0 +1,183 @@
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
+ Button: () => Button,
34
+ Dialog: () => Dialog,
35
+ DialogClose: () => DialogClose,
36
+ DialogContent: () => DialogContent,
37
+ DialogDescription: () => DialogDescription,
38
+ DialogFooter: () => DialogFooter,
39
+ DialogHeader: () => DialogHeader,
40
+ DialogOverlay: () => DialogOverlay,
41
+ DialogPortal: () => DialogPortal,
42
+ DialogTitle: () => DialogTitle,
43
+ DialogTrigger: () => DialogTrigger,
44
+ Label: () => Label,
45
+ cn: () => cn
46
+ });
47
+ module.exports = __toCommonJS(index_exports);
48
+
49
+ // src/lib/cn.ts
50
+ var import_clsx = require("clsx");
51
+ var import_tailwind_merge = require("tailwind-merge");
52
+ function cn(...inputs) {
53
+ return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
54
+ }
55
+
56
+ // src/components/button.tsx
57
+ var React = __toESM(require("react"), 1);
58
+ var import_react_slot = require("@radix-ui/react-slot");
59
+ var import_class_variance_authority = require("class-variance-authority");
60
+ var import_jsx_runtime = require("react/jsx-runtime");
61
+ var buttonVariants = (0, import_class_variance_authority.cva)(
62
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
63
+ {
64
+ variants: {
65
+ variant: {
66
+ default: "bg-primary text-primary-foreground hover:opacity-90",
67
+ destructive: "bg-destructive text-destructive-foreground hover:opacity-90",
68
+ outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
69
+ secondary: "bg-secondary text-secondary-foreground hover:opacity-90",
70
+ ghost: "hover:bg-accent hover:text-accent-foreground",
71
+ link: "text-primary underline-offset-4 hover:underline"
72
+ },
73
+ size: {
74
+ default: "h-10 px-4 py-2",
75
+ sm: "h-9 rounded-md px-3",
76
+ lg: "h-11 rounded-md px-8",
77
+ icon: "h-10 w-10"
78
+ }
79
+ },
80
+ defaultVariants: {
81
+ variant: "default",
82
+ size: "default"
83
+ }
84
+ }
85
+ );
86
+ var Button = React.forwardRef(
87
+ ({ className, variant, size, asChild = false, ...props }, ref) => {
88
+ const Comp = asChild ? import_react_slot.Slot : "button";
89
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Comp, { className: cn(buttonVariants({ variant, size, className })), ref, ...props });
90
+ }
91
+ );
92
+ Button.displayName = "Button";
93
+
94
+ // src/components/label.tsx
95
+ var React2 = __toESM(require("react"), 1);
96
+ var LabelPrimitive = __toESM(require("@radix-ui/react-label"), 1);
97
+ var import_class_variance_authority2 = require("class-variance-authority");
98
+ var import_jsx_runtime2 = require("react/jsx-runtime");
99
+ var labelVariants = (0, import_class_variance_authority2.cva)(
100
+ "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
101
+ );
102
+ var Label = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(LabelPrimitive.Root, { ref, className: cn(labelVariants(), className), ...props }));
103
+ Label.displayName = LabelPrimitive.Root.displayName;
104
+
105
+ // src/components/dialog.tsx
106
+ var React3 = __toESM(require("react"), 1);
107
+ var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"), 1);
108
+ var import_lucide_react = require("lucide-react");
109
+ var import_jsx_runtime3 = require("react/jsx-runtime");
110
+ var Dialog = DialogPrimitive.Root;
111
+ var DialogTrigger = DialogPrimitive.Trigger;
112
+ var DialogPortal = DialogPrimitive.Portal;
113
+ var DialogClose = DialogPrimitive.Close;
114
+ var DialogOverlay = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
115
+ DialogPrimitive.Overlay,
116
+ {
117
+ ref,
118
+ className: cn(
119
+ "fixed inset-0 z-50 bg-black/50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
120
+ className
121
+ ),
122
+ ...props
123
+ }
124
+ ));
125
+ DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
126
+ var DialogContent = React3.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(DialogPortal, { children: [
127
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(DialogOverlay, {}),
128
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
129
+ DialogPrimitive.Content,
130
+ {
131
+ ref,
132
+ className: cn(
133
+ "fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border border-border bg-background p-6 shadow-lg rounded-lg",
134
+ className
135
+ ),
136
+ ...props,
137
+ children: [
138
+ children,
139
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(DialogPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring", children: [
140
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react.X, { className: "h-4 w-4" }),
141
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "sr-only", children: "Close" })
142
+ ] })
143
+ ]
144
+ }
145
+ )
146
+ ] }));
147
+ DialogContent.displayName = DialogPrimitive.Content.displayName;
148
+ var DialogHeader = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className), ...props });
149
+ var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
150
+ "div",
151
+ {
152
+ className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className),
153
+ ...props
154
+ }
155
+ );
156
+ var DialogTitle = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
157
+ DialogPrimitive.Title,
158
+ {
159
+ ref,
160
+ className: cn("text-lg font-semibold leading-none tracking-tight", className),
161
+ ...props
162
+ }
163
+ ));
164
+ DialogTitle.displayName = DialogPrimitive.Title.displayName;
165
+ var DialogDescription = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(DialogPrimitive.Description, { ref, className: cn("text-sm text-muted-foreground", className), ...props }));
166
+ DialogDescription.displayName = DialogPrimitive.Description.displayName;
167
+ // Annotate the CommonJS export names for ESM import in node:
168
+ 0 && (module.exports = {
169
+ Button,
170
+ Dialog,
171
+ DialogClose,
172
+ DialogContent,
173
+ DialogDescription,
174
+ DialogFooter,
175
+ DialogHeader,
176
+ DialogOverlay,
177
+ DialogPortal,
178
+ DialogTitle,
179
+ DialogTrigger,
180
+ Label,
181
+ cn
182
+ });
183
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts","../src/lib/cn.ts","../src/components/button.tsx","../src/components/label.tsx","../src/components/dialog.tsx"],"sourcesContent":["export * from \"./lib/cn\";\nexport * from \"./components/button\";\nexport * from \"./components/label\";\nexport * from \"./components/dialog\";\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","import * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"../lib/cn\";\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground hover:opacity-90\",\n destructive: \"bg-destructive text-destructive-foreground hover:opacity-90\",\n outline: \"border border-input bg-background hover:bg-accent hover:text-accent-foreground\",\n secondary: \"bg-secondary text-secondary-foreground hover:opacity-90\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default: \"h-10 px-4 py-2\",\n sm: \"h-9 rounded-md px-3\",\n lg: \"h-11 rounded-md px-8\",\n icon: \"h-10 w-10\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n },\n);\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n}\n\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\";\n return (\n <Comp className={cn(buttonVariants({ variant, size, className }))} ref={ref} {...props} />\n );\n },\n);\nButton.displayName = \"Button\";\n","import * as React from \"react\";\nimport * as LabelPrimitive from \"@radix-ui/react-label\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"../lib/cn\";\n\nconst labelVariants = cva(\n \"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\",\n);\n\nexport const Label = React.forwardRef<\n React.ElementRef<typeof LabelPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> & VariantProps<typeof labelVariants>\n>(({ className, ...props }, ref) => (\n <LabelPrimitive.Root ref={ref} className={cn(labelVariants(), className)} {...props} />\n));\nLabel.displayName = LabelPrimitive.Root.displayName;\n","import * as React from \"react\";\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport { X } from \"lucide-react\";\nimport { cn } from \"../lib/cn\";\n\nexport const Dialog = DialogPrimitive.Root;\nexport const DialogTrigger = DialogPrimitive.Trigger;\nexport const DialogPortal = DialogPrimitive.Portal;\nexport const DialogClose = DialogPrimitive.Close;\n\nexport const DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n \"fixed inset-0 z-50 bg-black/50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n className,\n )}\n {...props}\n />\n));\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName;\n\nexport const DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n \"fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border border-border bg-background p-6 shadow-lg rounded-lg\",\n className,\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close className=\"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring\">\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPortal>\n));\nDialogContent.displayName = DialogPrimitive.Content.displayName;\n\nexport const DialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn(\"flex flex-col space-y-1.5 text-center sm:text-left\", className)} {...props} />\n);\n\nexport const DialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\", className)}\n {...props}\n />\n);\n\nexport const DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn(\"text-lg font-semibold leading-none tracking-tight\", className)}\n {...props}\n />\n));\nDialogTitle.displayName = DialogPrimitive.Title.displayName;\n\nexport const DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description ref={ref} className={cn(\"text-sm text-muted-foreground\", className)} {...props} />\n));\nDialogDescription.displayName = DialogPrimitive.Description.displayName;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA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C,IAAM,oBAA0B,kBAGrC,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B,6CAAiB,6BAAhB,EAA4B,KAAU,WAAW,GAAG,iCAAiC,SAAS,GAAI,GAAG,OAAO,CAC9G;AACD,kBAAkB,cAA8B,4BAAY;","names":["React","import_class_variance_authority","import_jsx_runtime","React","import_jsx_runtime"]}
@@ -0,0 +1,32 @@
1
+ import { ClassValue } from 'clsx';
2
+ import * as class_variance_authority_types from 'class-variance-authority/types';
3
+ import * as React from 'react';
4
+ import { VariantProps } from 'class-variance-authority';
5
+ import * as LabelPrimitive from '@radix-ui/react-label';
6
+ import * as DialogPrimitive from '@radix-ui/react-dialog';
7
+
8
+ declare function cn(...inputs: ClassValue[]): string;
9
+
10
+ declare const buttonVariants: (props?: ({
11
+ variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
12
+ size?: "default" | "sm" | "lg" | "icon" | null | undefined;
13
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
14
+ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
15
+ asChild?: boolean;
16
+ }
17
+ declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
18
+
19
+ declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: class_variance_authority_types.ClassProp | undefined) => string> & React.RefAttributes<HTMLLabelElement>>;
20
+
21
+ declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
22
+ declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
23
+ declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
24
+ declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
25
+ declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
26
+ declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
27
+ declare const DialogHeader: ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => React.JSX.Element;
28
+ declare const DialogFooter: ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => React.JSX.Element;
29
+ declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
30
+ declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
31
+
32
+ export { Button, type ButtonProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Label, cn };
@@ -0,0 +1,32 @@
1
+ import { ClassValue } from 'clsx';
2
+ import * as class_variance_authority_types from 'class-variance-authority/types';
3
+ import * as React from 'react';
4
+ import { VariantProps } from 'class-variance-authority';
5
+ import * as LabelPrimitive from '@radix-ui/react-label';
6
+ import * as DialogPrimitive from '@radix-ui/react-dialog';
7
+
8
+ declare function cn(...inputs: ClassValue[]): string;
9
+
10
+ declare const buttonVariants: (props?: ({
11
+ variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
12
+ size?: "default" | "sm" | "lg" | "icon" | null | undefined;
13
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
14
+ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
15
+ asChild?: boolean;
16
+ }
17
+ declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
18
+
19
+ declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: class_variance_authority_types.ClassProp | undefined) => string> & React.RefAttributes<HTMLLabelElement>>;
20
+
21
+ declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
22
+ declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
23
+ declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
24
+ declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
25
+ declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
26
+ declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
27
+ declare const DialogHeader: ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => React.JSX.Element;
28
+ declare const DialogFooter: ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => React.JSX.Element;
29
+ declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
30
+ declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
31
+
32
+ export { Button, type ButtonProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Label, cn };
package/dist/index.js ADDED
@@ -0,0 +1,134 @@
1
+ // src/lib/cn.ts
2
+ import { clsx } from "clsx";
3
+ import { twMerge } from "tailwind-merge";
4
+ function cn(...inputs) {
5
+ return twMerge(clsx(inputs));
6
+ }
7
+
8
+ // src/components/button.tsx
9
+ import * as React from "react";
10
+ import { Slot } from "@radix-ui/react-slot";
11
+ import { cva } from "class-variance-authority";
12
+ import { jsx } from "react/jsx-runtime";
13
+ var buttonVariants = cva(
14
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
15
+ {
16
+ variants: {
17
+ variant: {
18
+ default: "bg-primary text-primary-foreground hover:opacity-90",
19
+ destructive: "bg-destructive text-destructive-foreground hover:opacity-90",
20
+ outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
21
+ secondary: "bg-secondary text-secondary-foreground hover:opacity-90",
22
+ ghost: "hover:bg-accent hover:text-accent-foreground",
23
+ link: "text-primary underline-offset-4 hover:underline"
24
+ },
25
+ size: {
26
+ default: "h-10 px-4 py-2",
27
+ sm: "h-9 rounded-md px-3",
28
+ lg: "h-11 rounded-md px-8",
29
+ icon: "h-10 w-10"
30
+ }
31
+ },
32
+ defaultVariants: {
33
+ variant: "default",
34
+ size: "default"
35
+ }
36
+ }
37
+ );
38
+ var Button = React.forwardRef(
39
+ ({ className, variant, size, asChild = false, ...props }, ref) => {
40
+ const Comp = asChild ? Slot : "button";
41
+ return /* @__PURE__ */ jsx(Comp, { className: cn(buttonVariants({ variant, size, className })), ref, ...props });
42
+ }
43
+ );
44
+ Button.displayName = "Button";
45
+
46
+ // src/components/label.tsx
47
+ import * as React2 from "react";
48
+ import * as LabelPrimitive from "@radix-ui/react-label";
49
+ import { cva as cva2 } from "class-variance-authority";
50
+ import { jsx as jsx2 } from "react/jsx-runtime";
51
+ var labelVariants = cva2(
52
+ "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
53
+ );
54
+ var Label = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx2(LabelPrimitive.Root, { ref, className: cn(labelVariants(), className), ...props }));
55
+ Label.displayName = LabelPrimitive.Root.displayName;
56
+
57
+ // src/components/dialog.tsx
58
+ import * as React3 from "react";
59
+ import * as DialogPrimitive from "@radix-ui/react-dialog";
60
+ import { X } from "lucide-react";
61
+ import { jsx as jsx3, jsxs } from "react/jsx-runtime";
62
+ var Dialog = DialogPrimitive.Root;
63
+ var DialogTrigger = DialogPrimitive.Trigger;
64
+ var DialogPortal = DialogPrimitive.Portal;
65
+ var DialogClose = DialogPrimitive.Close;
66
+ var DialogOverlay = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx3(
67
+ DialogPrimitive.Overlay,
68
+ {
69
+ ref,
70
+ className: cn(
71
+ "fixed inset-0 z-50 bg-black/50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
72
+ className
73
+ ),
74
+ ...props
75
+ }
76
+ ));
77
+ DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
78
+ var DialogContent = React3.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DialogPortal, { children: [
79
+ /* @__PURE__ */ jsx3(DialogOverlay, {}),
80
+ /* @__PURE__ */ jsxs(
81
+ DialogPrimitive.Content,
82
+ {
83
+ ref,
84
+ className: cn(
85
+ "fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border border-border bg-background p-6 shadow-lg rounded-lg",
86
+ className
87
+ ),
88
+ ...props,
89
+ children: [
90
+ children,
91
+ /* @__PURE__ */ jsxs(DialogPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring", children: [
92
+ /* @__PURE__ */ jsx3(X, { className: "h-4 w-4" }),
93
+ /* @__PURE__ */ jsx3("span", { className: "sr-only", children: "Close" })
94
+ ] })
95
+ ]
96
+ }
97
+ )
98
+ ] }));
99
+ DialogContent.displayName = DialogPrimitive.Content.displayName;
100
+ var DialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsx3("div", { className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className), ...props });
101
+ var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx3(
102
+ "div",
103
+ {
104
+ className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className),
105
+ ...props
106
+ }
107
+ );
108
+ var DialogTitle = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx3(
109
+ DialogPrimitive.Title,
110
+ {
111
+ ref,
112
+ className: cn("text-lg font-semibold leading-none tracking-tight", className),
113
+ ...props
114
+ }
115
+ ));
116
+ DialogTitle.displayName = DialogPrimitive.Title.displayName;
117
+ var DialogDescription = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx3(DialogPrimitive.Description, { ref, className: cn("text-sm text-muted-foreground", className), ...props }));
118
+ DialogDescription.displayName = DialogPrimitive.Description.displayName;
119
+ export {
120
+ Button,
121
+ Dialog,
122
+ DialogClose,
123
+ DialogContent,
124
+ DialogDescription,
125
+ DialogFooter,
126
+ DialogHeader,
127
+ DialogOverlay,
128
+ DialogPortal,
129
+ DialogTitle,
130
+ DialogTrigger,
131
+ Label,
132
+ cn
133
+ };
134
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/lib/cn.ts","../src/components/button.tsx","../src/components/label.tsx","../src/components/dialog.tsx"],"sourcesContent":["import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","import * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"../lib/cn\";\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground hover:opacity-90\",\n destructive: \"bg-destructive text-destructive-foreground hover:opacity-90\",\n outline: \"border border-input bg-background hover:bg-accent hover:text-accent-foreground\",\n secondary: \"bg-secondary text-secondary-foreground hover:opacity-90\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default: \"h-10 px-4 py-2\",\n sm: \"h-9 rounded-md px-3\",\n lg: \"h-11 rounded-md px-8\",\n icon: \"h-10 w-10\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n },\n);\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n}\n\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\";\n return (\n <Comp className={cn(buttonVariants({ variant, size, className }))} ref={ref} {...props} />\n );\n },\n);\nButton.displayName = \"Button\";\n","import * as React from \"react\";\nimport * as LabelPrimitive from \"@radix-ui/react-label\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"../lib/cn\";\n\nconst labelVariants = cva(\n \"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\",\n);\n\nexport const Label = React.forwardRef<\n React.ElementRef<typeof LabelPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> & VariantProps<typeof labelVariants>\n>(({ className, ...props }, ref) => (\n <LabelPrimitive.Root ref={ref} className={cn(labelVariants(), className)} {...props} />\n));\nLabel.displayName = LabelPrimitive.Root.displayName;\n","import * as React from \"react\";\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport { X } from \"lucide-react\";\nimport { cn } from \"../lib/cn\";\n\nexport const Dialog = DialogPrimitive.Root;\nexport const DialogTrigger = DialogPrimitive.Trigger;\nexport const DialogPortal = DialogPrimitive.Portal;\nexport const DialogClose = DialogPrimitive.Close;\n\nexport const DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n \"fixed inset-0 z-50 bg-black/50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n className,\n )}\n {...props}\n />\n));\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName;\n\nexport const DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n \"fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border border-border bg-background p-6 shadow-lg rounded-lg\",\n className,\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close className=\"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring\">\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPortal>\n));\nDialogContent.displayName = DialogPrimitive.Content.displayName;\n\nexport const DialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn(\"flex flex-col space-y-1.5 text-center sm:text-left\", className)} {...props} />\n);\n\nexport const DialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\", className)}\n {...props}\n />\n);\n\nexport const DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn(\"text-lg font-semibold leading-none tracking-tight\", className)}\n {...props}\n />\n));\nDialogTitle.displayName = DialogPrimitive.Title.displayName;\n\nexport const DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description ref={ref} className={cn(\"text-sm text-muted-foreground\", className)} {...props} />\n));\nDialogDescription.displayName = DialogPrimitive.Description.displayName;\n"],"mappings":";AAAA,SAAS,YAA6B;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ACLA,YAAY,WAAW;AACvB,SAAS,YAAY;AACrB,SAAS,WAA8B;AAuCjC;AApCN,IAAM,iBAAiB;AAAA,EACrB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SAAS;AAAA,QACT,aAAa;AAAA,QACb,SAAS;AAAA,QACT,WAAW;AAAA,QACX,OAAO;AAAA,QACP,MAAM;AAAA,MACR;AAAA,MACA,MAAM;AAAA,QACJ,SAAS;AAAA,QACT,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,MAAM;AAAA,MACR;AAAA,IACF;AAAA,IACA,iBAAiB;AAAA,MACf,SAAS;AAAA,MACT,MAAM;AAAA,IACR;AAAA,EACF;AACF;AAQO,IAAM,SAAe;AAAA,EAC1B,CAAC,EAAE,WAAW,SAAS,MAAM,UAAU,OAAO,GAAG,MAAM,GAAG,QAAQ;AAChE,UAAM,OAAO,UAAU,OAAO;AAC9B,WACE,oBAAC,QAAK,WAAW,GAAG,e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A,EACF;AAAA,GACF,CACD;AACD,cAAc,cAA8B,wBAAQ;AAE7C,IAAM,eAAe,CAAC,EAAE,WAAW,GAAG,MAAM,MACjD,gBAAAA,KAAC,SAAI,WAAW,GAAG,sDAAsD,SAAS,GAAI,GAAG,OAAO;AAG3F,IAAM,eAAe,CAAC,EAAE,WAAW,GAAG,MAAM,MACjD,gBAAAA;AAAA,EAAC;AAAA;AAAA,IACC,WAAW,GAAG,iEAAiE,SAAS;AAAA,IACvF,GAAG;AAAA;AACN;AAGK,IAAM,cAAoB,kBAG/B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B,gBAAAA;AAAA,EAAiB;AAAA,EAAhB;AAAA,IACC;AAAA,IACA,WAAW,GAAG,qDAAqD,SAAS;AAAA,IAC3E,GAAG;AAAA;AACN,CACD;AACD,YAAY,cAA8B,sBAAM;AAEzC,IAAM,oBAA0B,kBAGrC,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B,gBAAAA,KAAiB,6BAAhB,EAA4B,KAAU,WAAW,GAAG,iCAAiC,SAAS,GAAI,GAAG,OAAO,CAC9G;AACD,kBAAkB,cAA8B,4BAAY;","names":["React","cva","jsx","cva","React","jsx"]}
@@ -0,0 +1,117 @@
1
+ /* Re-exported from @liamkeene/tokens. Edit tokens there, not here. */
2
+
3
+ /**
4
+ * Do not edit directly, this file was auto-generated.
5
+ */
6
+
7
+ :root {
8
+ --color-gray-50: #fafafa;
9
+ --color-gray-100: #f4f4f5;
10
+ --color-gray-200: #e4e4e7;
11
+ --color-gray-300: #d4d4d8;
12
+ --color-gray-400: #a1a1aa;
13
+ --color-gray-500: #71717a;
14
+ --color-gray-600: #52525b;
15
+ --color-gray-700: #3f3f46;
16
+ --color-gray-800: #27272a;
17
+ --color-gray-900: #18181b;
18
+ --color-gray-950: #09090b;
19
+ --color-brand-50: #eff6ff;
20
+ --color-brand-100: #dbeafe;
21
+ --color-brand-200: #bfdbfe;
22
+ --color-brand-300: #93c5fd;
23
+ --color-brand-400: #60a5fa;
24
+ --color-brand-500: #3b82f6;
25
+ --color-brand-600: #2563eb;
26
+ --color-brand-700: #1d4ed8;
27
+ --color-brand-800: #1e40af;
28
+ --color-brand-900: #1e3a8a;
29
+ --color-brand-950: #172554;
30
+ --color-red-50: #fef2f2;
31
+ --color-red-500: #ef4444;
32
+ --color-red-600: #dc2626;
33
+ --color-red-900: #7f1d1d;
34
+ --color-base-white: #ffffff;
35
+ --color-base-black: #000000;
36
+ --background: #ffffff;
37
+ --foreground: #09090b;
38
+ --card: #ffffff;
39
+ --card-foreground: #09090b;
40
+ --popover: #ffffff;
41
+ --popover-foreground: #09090b;
42
+ --primary: #2563eb;
43
+ --primary-foreground: #ffffff;
44
+ --secondary: #f4f4f5;
45
+ --secondary-foreground: #18181b;
46
+ --muted: #f4f4f5;
47
+ --muted-foreground: #71717a;
48
+ --accent: #f4f4f5;
49
+ --accent-foreground: #18181b;
50
+ --destructive: #dc2626;
51
+ --destructive-foreground: #ffffff;
52
+ --border: #e4e4e7;
53
+ --input: #e4e4e7;
54
+ --ring: #2563eb;
55
+ --spacing-0: 0px;
56
+ --spacing-1: 4px;
57
+ --spacing-2: 8px;
58
+ --spacing-3: 12px;
59
+ --spacing-4: 16px;
60
+ --spacing-5: 20px;
61
+ --spacing-6: 24px;
62
+ --spacing-8: 32px;
63
+ --spacing-10: 40px;
64
+ --spacing-12: 48px;
65
+ --spacing-16: 64px;
66
+ --spacing-20: 80px;
67
+ --spacing-24: 96px;
68
+ --radius-none: 0px;
69
+ --radius-sm: 4px;
70
+ --radius-md: 8px;
71
+ --radius-lg: 12px;
72
+ --radius-xl: 16px;
73
+ --radius-full: 9999px;
74
+ --font-family-sans: Inter, ui-sans-serif, system-ui, sans-serif;
75
+ --font-family-mono: 'JetBrains Mono', ui-monospace, monospace;
76
+ --font-size-xs: 12px;
77
+ --font-size-sm: 14px;
78
+ --font-size-base: 16px;
79
+ --font-size-lg: 18px;
80
+ --font-size-xl: 20px;
81
+ --font-size-2xl: 24px;
82
+ --font-size-3xl: 30px;
83
+ --font-size-4xl: 36px;
84
+ --font-weight-normal: 400;
85
+ --font-weight-medium: 500;
86
+ --font-weight-semibold: 600;
87
+ --font-weight-bold: 700;
88
+ --font-lineHeight-tight: 1.2;
89
+ --font-lineHeight-normal: 1.5;
90
+ --font-lineHeight-relaxed: 1.7;
91
+ }
92
+
93
+ /**
94
+ * Do not edit directly, this file was auto-generated.
95
+ */
96
+
97
+ [data-theme="dark"] {
98
+ --background: #09090b;
99
+ --foreground: #fafafa;
100
+ --card: #18181b;
101
+ --card-foreground: #fafafa;
102
+ --popover: #18181b;
103
+ --popover-foreground: #fafafa;
104
+ --primary: #3b82f6;
105
+ --primary-foreground: #09090b;
106
+ --secondary: #27272a;
107
+ --secondary-foreground: #fafafa;
108
+ --muted: #27272a;
109
+ --muted-foreground: #a1a1aa;
110
+ --accent: #27272a;
111
+ --accent-foreground: #fafafa;
112
+ --destructive: #ef4444;
113
+ --destructive-foreground: #fafafa;
114
+ --border: #27272a;
115
+ --input: #27272a;
116
+ --ring: #3b82f6;
117
+ }
package/package.json ADDED
@@ -0,0 +1,54 @@
1
+ {
2
+ "name": "@liamkeene/ui",
3
+ "version": "0.0.0",
4
+ "description": "React component library (shadcn/ui + Radix primitives) styled from @liamkeene/tokens via a Tailwind preset.",
5
+ "license": "MIT",
6
+ "publishConfig": {
7
+ "access": "public"
8
+ },
9
+ "type": "module",
10
+ "main": "./dist/index.cjs",
11
+ "module": "./dist/index.js",
12
+ "types": "./dist/index.d.ts",
13
+ "exports": {
14
+ ".": {
15
+ "types": "./dist/index.d.ts",
16
+ "import": "./dist/index.js",
17
+ "require": "./dist/index.cjs"
18
+ },
19
+ "./tailwind-preset": "./tailwind-preset.cjs",
20
+ "./styles.css": "./dist/styles.css"
21
+ },
22
+ "files": [
23
+ "dist",
24
+ "tailwind-preset.cjs"
25
+ ],
26
+ "scripts": {
27
+ "build": "tsup && node scripts/build-css.js",
28
+ "dev": "tsup --watch",
29
+ "typecheck": "tsc --noEmit -p tsconfig.json"
30
+ },
31
+ "peerDependencies": {
32
+ "react": ">=18",
33
+ "react-dom": ">=18"
34
+ },
35
+ "dependencies": {
36
+ "@liamkeene/tokens": "workspace:*",
37
+ "@radix-ui/react-slot": "^1.1.0",
38
+ "@radix-ui/react-dialog": "^1.1.2",
39
+ "@radix-ui/react-label": "^2.1.0",
40
+ "class-variance-authority": "^0.7.0",
41
+ "clsx": "^2.1.1",
42
+ "lucide-react": "^0.454.0",
43
+ "tailwind-merge": "^2.5.4"
44
+ },
45
+ "devDependencies": {
46
+ "@types/react": "^18.3.0",
47
+ "@types/react-dom": "^18.3.0",
48
+ "react": "^18.3.0",
49
+ "react-dom": "^18.3.0",
50
+ "tailwindcss": "^3.4.14",
51
+ "tsup": "^8.3.0",
52
+ "typescript": "^5.6.0"
53
+ }
54
+ }
@@ -0,0 +1,67 @@
1
+ /**
2
+ * Tailwind preset mapping utility classes to @liamkeene/tokens CSS variables.
3
+ * Consumers extend this in their own tailwind.config:
4
+ *
5
+ * module.exports = {
6
+ * presets: [require("@liamkeene/ui/tailwind-preset")],
7
+ * content: [..., "./node_modules/@liamkeene/ui/dist/**\/*.js"],
8
+ * };
9
+ *
10
+ * Note: colors resolve to plain hex/CSS-var values (not the hsl() + <alpha-value>
11
+ * trick), because @liamkeene/tokens is deliberately framework-free. Tailwind
12
+ * opacity modifiers (e.g. bg-primary/50) are therefore not supported on these
13
+ * colors; use CSS color-mix() directly if you need that.
14
+ */
15
+ module.exports = {
16
+ darkMode: ["selector", '[data-theme="dark"]'],
17
+ theme: {
18
+ extend: {
19
+ colors: {
20
+ background: "var(--background)",
21
+ foreground: "var(--foreground)",
22
+ card: {
23
+ DEFAULT: "var(--card)",
24
+ foreground: "var(--card-foreground)",
25
+ },
26
+ popover: {
27
+ DEFAULT: "var(--popover)",
28
+ foreground: "var(--popover-foreground)",
29
+ },
30
+ primary: {
31
+ DEFAULT: "var(--primary)",
32
+ foreground: "var(--primary-foreground)",
33
+ },
34
+ secondary: {
35
+ DEFAULT: "var(--secondary)",
36
+ foreground: "var(--secondary-foreground)",
37
+ },
38
+ muted: {
39
+ DEFAULT: "var(--muted)",
40
+ foreground: "var(--muted-foreground)",
41
+ },
42
+ accent: {
43
+ DEFAULT: "var(--accent)",
44
+ foreground: "var(--accent-foreground)",
45
+ },
46
+ destructive: {
47
+ DEFAULT: "var(--destructive)",
48
+ foreground: "var(--destructive-foreground)",
49
+ },
50
+ border: "var(--border)",
51
+ input: "var(--input)",
52
+ ring: "var(--ring)",
53
+ },
54
+ borderRadius: {
55
+ sm: "var(--radius-sm)",
56
+ md: "var(--radius-md)",
57
+ lg: "var(--radius-lg)",
58
+ xl: "var(--radius-xl)",
59
+ },
60
+ fontFamily: {
61
+ sans: ["var(--font-family-sans)"],
62
+ mono: ["var(--font-family-mono)"],
63
+ },
64
+ },
65
+ },
66
+ plugins: [],
67
+ };