@apptify-labs/ui 1.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/.storybook/main.ts +27 -0
- package/.storybook/preview.tsx +15 -0
- package/.turbo/turbo-build.log +19 -0
- package/README.md +107 -0
- package/STORYBOOK.md +112 -0
- package/dist/index.d.mts +33 -0
- package/dist/index.d.ts +33 -0
- package/dist/index.js +182 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +136 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +63 -0
- package/postcss.config.js +6 -0
- package/src/components/card/card.stories.tsx +38 -0
- package/src/components/card/card.tsx +75 -0
- package/src/components/card/index.ts +1 -0
- package/src/components/input/index.ts +1 -0
- package/src/components/input/input.stories.tsx +40 -0
- package/src/components/input/input.tsx +24 -0
- package/src/components/label/index.ts +1 -0
- package/src/components/label/label.stories.tsx +22 -0
- package/src/components/label/label.tsx +23 -0
- package/src/components/separator/index.ts +1 -0
- package/src/components/separator/separator.stories.tsx +36 -0
- package/src/components/separator/separator.tsx +28 -0
- package/src/index.ts +5 -0
- package/src/styles.css +69 -0
- package/src/utils/cn.ts +14 -0
- package/src/utils/index.ts +1 -0
- package/storybook-static/assets/Color-YHDXOIA2-kSxZo1Vy.js +1 -0
- package/storybook-static/assets/DocsRenderer-CFRXHY34-DsDoVbDP.js +575 -0
- package/storybook-static/assets/card.stories-1IXkTbkW.js +20 -0
- package/storybook-static/assets/chunk-XP5HYGXS-rhzvizV_.js +1 -0
- package/storybook-static/assets/client-CN6oaCdP.js +33 -0
- package/storybook-static/assets/entry-preview-Ct7_9bu-.js +2 -0
- package/storybook-static/assets/entry-preview-docs-pv-Qwe_M.js +46 -0
- package/storybook-static/assets/iframe-CbRAOl5a.js +211 -0
- package/storybook-static/assets/index-B3ijS-tw.js +11 -0
- package/storybook-static/assets/index-DH-M5T-F.js +240 -0
- package/storybook-static/assets/index-DHO77v_d.js +1 -0
- package/storybook-static/assets/index-DrFu-skq.js +6 -0
- package/storybook-static/assets/index-DzGJhHoF.js +9 -0
- package/storybook-static/assets/jsx-runtime-D_zvdyIk.js +9 -0
- package/storybook-static/assets/preview-B8lJiyuQ.js +34 -0
- package/storybook-static/assets/preview-BBWR9nbA.js +1 -0
- package/storybook-static/assets/preview-BIuR4HGU.js +240 -0
- package/storybook-static/assets/preview-BWzBA1C2.js +396 -0
- package/storybook-static/assets/preview-B_o1KE33.css +1 -0
- package/storybook-static/assets/preview-CM32KvaH.js +1 -0
- package/storybook-static/assets/preview-CvbIS5ZJ.js +1 -0
- package/storybook-static/assets/preview-Cy3uZJAu.js +2 -0
- package/storybook-static/assets/preview-DD_OYowb.js +1 -0
- package/storybook-static/assets/preview-DGUiP6tS.js +7 -0
- package/storybook-static/assets/preview-DHQbi4pV.js +1 -0
- package/storybook-static/assets/react-18-BeIp0fAf.js +1 -0
- package/storybook-static/assets/test-utils-BxnH6twK.js +9 -0
- package/storybook-static/favicon.svg +1 -0
- package/storybook-static/iframe.html +666 -0
- package/storybook-static/index.html +177 -0
- package/storybook-static/index.json +1 -0
- package/storybook-static/nunito-sans-bold-italic.woff2 +0 -0
- package/storybook-static/nunito-sans-bold.woff2 +0 -0
- package/storybook-static/nunito-sans-italic.woff2 +0 -0
- package/storybook-static/nunito-sans-regular.woff2 +0 -0
- package/storybook-static/project.json +1 -0
- package/storybook-static/sb-addons/essentials-actions-3/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/essentials-backgrounds-5/manager-bundle.js +12 -0
- package/storybook-static/sb-addons/essentials-controls-2/manager-bundle.js +405 -0
- package/storybook-static/sb-addons/essentials-docs-4/manager-bundle.js +245 -0
- package/storybook-static/sb-addons/essentials-measure-8/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/essentials-outline-9/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/essentials-toolbars-7/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/essentials-viewport-6/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/interactions-10/manager-bundle.js +222 -0
- package/storybook-static/sb-addons/links-1/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js +3 -0
- package/storybook-static/sb-common-assets/favicon.svg +1 -0
- package/storybook-static/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-bold.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-italic.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-regular.woff2 +0 -0
- package/storybook-static/sb-manager/globals-module-info.js +1052 -0
- package/storybook-static/sb-manager/globals-runtime.js +41775 -0
- package/storybook-static/sb-manager/globals.js +48 -0
- package/storybook-static/sb-manager/runtime.js +12048 -0
- package/tailwind.config.js +103 -0
- package/tsconfig.json +21 -0
- package/tsup.config.ts +12 -0
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
// src/components/card/card.tsx
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
|
|
4
|
+
// src/utils/cn.ts
|
|
5
|
+
import { clsx } from "clsx";
|
|
6
|
+
import { twMerge } from "tailwind-merge";
|
|
7
|
+
function cn(...inputs) {
|
|
8
|
+
return twMerge(clsx(inputs));
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
// src/components/card/card.tsx
|
|
12
|
+
import { jsx } from "react/jsx-runtime";
|
|
13
|
+
var Card = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
14
|
+
"div",
|
|
15
|
+
{
|
|
16
|
+
ref,
|
|
17
|
+
className: cn(
|
|
18
|
+
"rounded-xl border bg-card text-card-foreground shadow",
|
|
19
|
+
className
|
|
20
|
+
),
|
|
21
|
+
...props
|
|
22
|
+
}
|
|
23
|
+
));
|
|
24
|
+
Card.displayName = "Card";
|
|
25
|
+
var CardHeader = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
26
|
+
"div",
|
|
27
|
+
{
|
|
28
|
+
ref,
|
|
29
|
+
className: cn("flex flex-col space-y-1.5 p-6", className),
|
|
30
|
+
...props
|
|
31
|
+
}
|
|
32
|
+
));
|
|
33
|
+
CardHeader.displayName = "CardHeader";
|
|
34
|
+
var CardTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
35
|
+
"h3",
|
|
36
|
+
{
|
|
37
|
+
ref,
|
|
38
|
+
className: cn("font-semibold leading-none tracking-tight", className),
|
|
39
|
+
...props
|
|
40
|
+
}
|
|
41
|
+
));
|
|
42
|
+
CardTitle.displayName = "CardTitle";
|
|
43
|
+
var CardDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
44
|
+
"p",
|
|
45
|
+
{
|
|
46
|
+
ref,
|
|
47
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
48
|
+
...props
|
|
49
|
+
}
|
|
50
|
+
));
|
|
51
|
+
CardDescription.displayName = "CardDescription";
|
|
52
|
+
var CardContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("p-6 pt-0", className), ...props }));
|
|
53
|
+
CardContent.displayName = "CardContent";
|
|
54
|
+
var CardFooter = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
55
|
+
"div",
|
|
56
|
+
{
|
|
57
|
+
ref,
|
|
58
|
+
className: cn("flex items-center p-6 pt-0", className),
|
|
59
|
+
...props
|
|
60
|
+
}
|
|
61
|
+
));
|
|
62
|
+
CardFooter.displayName = "CardFooter";
|
|
63
|
+
|
|
64
|
+
// src/components/input/input.tsx
|
|
65
|
+
import * as React2 from "react";
|
|
66
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
67
|
+
var Input = React2.forwardRef(
|
|
68
|
+
({ className, type, ...props }, ref) => {
|
|
69
|
+
return /* @__PURE__ */ jsx2(
|
|
70
|
+
"input",
|
|
71
|
+
{
|
|
72
|
+
type,
|
|
73
|
+
className: cn(
|
|
74
|
+
"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
|
|
75
|
+
className
|
|
76
|
+
),
|
|
77
|
+
ref,
|
|
78
|
+
...props
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
);
|
|
83
|
+
Input.displayName = "Input";
|
|
84
|
+
|
|
85
|
+
// src/components/label/label.tsx
|
|
86
|
+
import * as React3 from "react";
|
|
87
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
88
|
+
import { cva } from "class-variance-authority";
|
|
89
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
90
|
+
var labelVariants = cva(
|
|
91
|
+
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
92
|
+
);
|
|
93
|
+
var Label = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx3(
|
|
94
|
+
LabelPrimitive.Root,
|
|
95
|
+
{
|
|
96
|
+
ref,
|
|
97
|
+
className: cn(labelVariants(), className),
|
|
98
|
+
...props
|
|
99
|
+
}
|
|
100
|
+
));
|
|
101
|
+
Label.displayName = LabelPrimitive.Root.displayName;
|
|
102
|
+
|
|
103
|
+
// src/components/separator/separator.tsx
|
|
104
|
+
import * as React4 from "react";
|
|
105
|
+
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
106
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
107
|
+
var Separator = React4.forwardRef(
|
|
108
|
+
({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx4(
|
|
109
|
+
SeparatorPrimitive.Root,
|
|
110
|
+
{
|
|
111
|
+
ref,
|
|
112
|
+
decorative,
|
|
113
|
+
orientation,
|
|
114
|
+
className: cn(
|
|
115
|
+
"shrink-0 bg-border",
|
|
116
|
+
orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
|
|
117
|
+
className
|
|
118
|
+
),
|
|
119
|
+
...props
|
|
120
|
+
}
|
|
121
|
+
)
|
|
122
|
+
);
|
|
123
|
+
Separator.displayName = SeparatorPrimitive.Root.displayName;
|
|
124
|
+
export {
|
|
125
|
+
Card,
|
|
126
|
+
CardContent,
|
|
127
|
+
CardDescription,
|
|
128
|
+
CardFooter,
|
|
129
|
+
CardHeader,
|
|
130
|
+
CardTitle,
|
|
131
|
+
Input,
|
|
132
|
+
Label,
|
|
133
|
+
Separator,
|
|
134
|
+
cn
|
|
135
|
+
};
|
|
136
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/card/card.tsx","../src/utils/cn.ts","../src/components/input/input.tsx","../src/components/label/label.tsx","../src/components/separator/separator.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"../../utils/cn\";\n\nconst Card = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n \"rounded-xl border bg-card text-card-foreground shadow\",\n className\n )}\n {...props}\n />\n));\nCard.displayName = \"Card\";\n\nconst CardHeader = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"flex flex-col space-y-1.5 p-6\", className)}\n {...props}\n />\n));\nCardHeader.displayName = \"CardHeader\";\n\nconst CardTitle = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLHeadingElement>\n>(({ className, ...props }, ref) => (\n <h3\n ref={ref}\n className={cn(\"font-semibold leading-none tracking-tight\", className)}\n {...props}\n />\n));\nCardTitle.displayName = \"CardTitle\";\n\nconst CardDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => (\n <p\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n));\nCardDescription.displayName = \"CardDescription\";\n\nconst CardContent = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div ref={ref} className={cn(\"p-6 pt-0\", className)} {...props} />\n));\nCardContent.displayName = \"CardContent\";\n\nconst CardFooter = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"flex items-center p-6 pt-0\", className)}\n {...props}\n />\n));\nCardFooter.displayName = \"CardFooter\";\n\nexport { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent };\n","import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n/**\n * Merges Tailwind CSS classes with proper conflict resolution.\n * Combines clsx for conditional classes and tailwind-merge for deduplication.\n *\n * @example\n * cn(\"px-4 py-2\", \"px-8\") // => \"px-8 py-2\"\n * cn(\"text-red-500\", isActive && \"text-blue-500\")\n */\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","import * as React from \"react\";\nimport { cn } from \"../../utils/cn\";\n\nexport interface InputProps\n extends React.InputHTMLAttributes<HTMLInputElement> {}\n\nconst Input = React.forwardRef<HTMLInputElement, InputProps>(\n ({ className, type, ...props }, ref) => {\n return (\n <input\n type={type}\n className={cn(\n \"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50\",\n className\n )}\n ref={ref}\n {...props}\n />\n );\n }\n);\nInput.displayName = \"Input\";\n\nexport { Input };\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 \"../../utils/cn\";\n\nconst labelVariants = cva(\n \"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\"\n);\n\nconst Label = React.forwardRef<\n React.ElementRef<typeof LabelPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> &\n VariantProps<typeof labelVariants>\n>(({ className, ...props }, ref) => (\n <LabelPrimitive.Root\n ref={ref}\n className={cn(labelVariants(), className)}\n {...props}\n />\n));\nLabel.displayName = LabelPrimitive.Root.displayName;\n\nexport { Label };\n","import * as React from \"react\";\nimport * as SeparatorPrimitive from \"@radix-ui/react-separator\";\nimport { cn } from \"../../utils/cn\";\n\nconst Separator = React.forwardRef<\n React.ElementRef<typeof SeparatorPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>\n>(\n (\n { className, orientation = \"horizontal\", decorative = true, ...props },\n ref\n ) => (\n <SeparatorPrimitive.Root\n ref={ref}\n decorative={decorative}\n orientation={orientation}\n className={cn(\n \"shrink-0 bg-border\",\n orientation === \"horizontal\" ? \"h-[1px] w-full\" : \"h-full w-[1px]\",\n className\n )}\n {...props}\n />\n )\n);\nSeparator.displayName = SeparatorPrimitive.Root.displayName;\n\nexport { Separator };\n"],"mappings":";AAAA,YAAY,WAAW;;;ACAvB,SAA0B,YAAY;AACtC,SAAS,eAAe;AAUjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ADNE;AAJF,IAAM,OAAa,iBAGjB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAC;AAAA;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN,CACD;AACD,KAAK,cAAc;AAEnB,IAAM,aAAmB,iBAGvB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAC;AAAA;AAAA,IACC;AAAA,IACA,WAAW,GAAG,iCAAiC,SAAS;AAAA,IACvD,GAAG;AAAA;AACN,CACD;AACD,WAAW,cAAc;AAEzB,IAAM,YAAkB,iBAGtB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAC;AAAA;AAAA,IACC;AAAA,IACA,WAAW,GAAG,6CAA6C,SAAS;AAAA,IACnE,GAAG;AAAA;AACN,CACD;AACD,UAAU,cAAc;AAExB,IAAM,kBAAwB,iBAG5B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAC;AAAA;AAAA,IACC;AAAA,IACA,WAAW,GAAG,iCAAiC,SAAS;AAAA,IACvD,GAAG;AAAA;AACN,CACD;AACD,gBAAgB,cAAc;AAE9B,IAAM,cAAoB,iBAGxB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B,oBAAC,SAAI,KAAU,WAAW,GAAG,YAAY,SAAS,GAAI,GAAG,OAAO,CACjE;AACD,YAAY,cAAc;AAE1B,IAAM,aAAmB,iBAGvB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAC;AAAA;AAAA,IACC;AAAA,IACA,WAAW,GAAG,8BAA8B,SAAS;AAAA,IACpD,GAAG;AAAA;AACN,CACD;AACD,WAAW,cAAc;;;AExEzB,YAAYA,YAAW;AASjB,gBAAAC,YAAA;AAHN,IAAM,QAAc;AAAA,EAClB,CAAC,EAAE,WAAW,MAAM,GAAG,MAAM,GAAG,QAAQ;AACtC,WACE,gBAAAA;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,WAAW;AAAA,UACT;AAAA,UACA;AAAA,QACF;AAAA,QACA;AAAA,QACC,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;AACA,MAAM,cAAc;;;ACrBpB,YAAYC,YAAW;AACvB,YAAY,oBAAoB;AAChC,SAAS,WAA8B;AAYrC,gBAAAC,YAAA;AATF,IAAM,gBAAgB;AAAA,EACpB;AACF;AAEA,IAAM,QAAc,kBAIlB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B,gBAAAA;AAAA,EAAgB;AAAA,EAAf;AAAA,IACC;AAAA,IACA,WAAW,GAAG,cAAc,GAAG,SAAS;AAAA,IACvC,GAAG;AAAA;AACN,CACD;AACD,MAAM,cAA6B,oBAAK;;;ACpBxC,YAAYC,YAAW;AACvB,YAAY,wBAAwB;AAWhC,gBAAAC,YAAA;AARJ,IAAM,YAAkB;AAAA,EAItB,CACE,EAAE,WAAW,cAAc,cAAc,aAAa,MAAM,GAAG,MAAM,GACrE,QAEA,gBAAAA;AAAA,IAAoB;AAAA,IAAnB;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA,WAAW;AAAA,QACT;AAAA,QACA,gBAAgB,eAAe,mBAAmB;AAAA,QAClD;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;AACA,UAAU,cAAiC,wBAAK;","names":["React","jsx","React","jsx","React","jsx"]}
|
package/package.json
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@apptify-labs/ui",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"main": "./dist/index.js",
|
|
5
|
+
"module": "./dist/index.mjs",
|
|
6
|
+
"types": "./dist/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"import": "./dist/index.mjs",
|
|
11
|
+
"require": "./dist/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./styles.css": "./dist/styles.css"
|
|
14
|
+
},
|
|
15
|
+
"sideEffects": [
|
|
16
|
+
"**/*.css"
|
|
17
|
+
],
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"@radix-ui/react-dialog": "^1.1.4",
|
|
20
|
+
"@radix-ui/react-dropdown-menu": "^2.1.4",
|
|
21
|
+
"@radix-ui/react-label": "^2.1.1",
|
|
22
|
+
"@radix-ui/react-select": "^2.1.4",
|
|
23
|
+
"@radix-ui/react-separator": "^1.1.1",
|
|
24
|
+
"@radix-ui/react-slot": "^1.1.1",
|
|
25
|
+
"class-variance-authority": "^0.7.1",
|
|
26
|
+
"clsx": "^2.1.1",
|
|
27
|
+
"tailwind-merge": "^2.6.0",
|
|
28
|
+
"@apptify-labs/tokens": "1.0.0"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@storybook/addon-essentials": "^8.6.18",
|
|
32
|
+
"@storybook/addon-interactions": "^8.6.18",
|
|
33
|
+
"@storybook/addon-links": "^8.6.18",
|
|
34
|
+
"@storybook/blocks": "^8.6.18",
|
|
35
|
+
"@storybook/react": "^8.6.18",
|
|
36
|
+
"@storybook/react-vite": "^8.6.18",
|
|
37
|
+
"@storybook/test": "^8.6.18",
|
|
38
|
+
"@types/node": "^25.9.0",
|
|
39
|
+
"@types/react": "^19.0.0",
|
|
40
|
+
"@types/react-dom": "^19.0.0",
|
|
41
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
42
|
+
"autoprefixer": "^10.4.20",
|
|
43
|
+
"postcss": "^8.4.49",
|
|
44
|
+
"react": "^19.0.0",
|
|
45
|
+
"react-dom": "^19.0.0",
|
|
46
|
+
"storybook": "^8.6.18",
|
|
47
|
+
"tailwindcss": "^3.4.17",
|
|
48
|
+
"tsup": "^8.0.2",
|
|
49
|
+
"typescript": "^5.3.3",
|
|
50
|
+
"vite": "^6.0.0"
|
|
51
|
+
},
|
|
52
|
+
"peerDependencies": {
|
|
53
|
+
"react": ">=18.0.0",
|
|
54
|
+
"react-dom": ">=18.0.0"
|
|
55
|
+
},
|
|
56
|
+
"scripts": {
|
|
57
|
+
"build": "tsup",
|
|
58
|
+
"dev": "tsup --watch",
|
|
59
|
+
"lint": "tsc --noEmit",
|
|
60
|
+
"storybook": "storybook dev -p 6006",
|
|
61
|
+
"build-storybook": "storybook build"
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent } from './card';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
|
|
5
|
+
const meta = {
|
|
6
|
+
title: 'Components/Card',
|
|
7
|
+
component: Card,
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: 'centered',
|
|
10
|
+
},
|
|
11
|
+
tags: ['autodocs'],
|
|
12
|
+
} satisfies Meta<typeof Card>;
|
|
13
|
+
|
|
14
|
+
export default meta;
|
|
15
|
+
type Story = StoryObj<typeof meta>;
|
|
16
|
+
|
|
17
|
+
export const Default: Story = {
|
|
18
|
+
render: () => (
|
|
19
|
+
<Card className="w-[350px]">
|
|
20
|
+
<CardHeader>
|
|
21
|
+
<CardTitle>Create project</CardTitle>
|
|
22
|
+
<CardDescription>Deploy your new project in one-click.</CardDescription>
|
|
23
|
+
</CardHeader>
|
|
24
|
+
<CardContent>
|
|
25
|
+
<div className="grid w-full items-center gap-4">
|
|
26
|
+
<div className="flex flex-col space-y-1.5">
|
|
27
|
+
<span className="text-sm font-medium">Name</span>
|
|
28
|
+
<div className="h-9 w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm">Framework</div>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
</CardContent>
|
|
32
|
+
<CardFooter className="flex justify-between">
|
|
33
|
+
<button className="inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium border border-input bg-background hover:bg-accent hover:text-accent-foreground h-9 px-4 py-2">Cancel</button>
|
|
34
|
+
<button className="inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium bg-primary text-primary-foreground shadow hover:bg-primary/90 h-9 px-4 py-2">Deploy</button>
|
|
35
|
+
</CardFooter>
|
|
36
|
+
</Card>
|
|
37
|
+
),
|
|
38
|
+
};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { cn } from "../../utils/cn";
|
|
3
|
+
|
|
4
|
+
const Card = React.forwardRef<
|
|
5
|
+
HTMLDivElement,
|
|
6
|
+
React.HTMLAttributes<HTMLDivElement>
|
|
7
|
+
>(({ className, ...props }, ref) => (
|
|
8
|
+
<div
|
|
9
|
+
ref={ref}
|
|
10
|
+
className={cn(
|
|
11
|
+
"rounded-xl border bg-card text-card-foreground shadow",
|
|
12
|
+
className
|
|
13
|
+
)}
|
|
14
|
+
{...props}
|
|
15
|
+
/>
|
|
16
|
+
));
|
|
17
|
+
Card.displayName = "Card";
|
|
18
|
+
|
|
19
|
+
const CardHeader = React.forwardRef<
|
|
20
|
+
HTMLDivElement,
|
|
21
|
+
React.HTMLAttributes<HTMLDivElement>
|
|
22
|
+
>(({ className, ...props }, ref) => (
|
|
23
|
+
<div
|
|
24
|
+
ref={ref}
|
|
25
|
+
className={cn("flex flex-col space-y-1.5 p-6", className)}
|
|
26
|
+
{...props}
|
|
27
|
+
/>
|
|
28
|
+
));
|
|
29
|
+
CardHeader.displayName = "CardHeader";
|
|
30
|
+
|
|
31
|
+
const CardTitle = React.forwardRef<
|
|
32
|
+
HTMLParagraphElement,
|
|
33
|
+
React.HTMLAttributes<HTMLHeadingElement>
|
|
34
|
+
>(({ className, ...props }, ref) => (
|
|
35
|
+
<h3
|
|
36
|
+
ref={ref}
|
|
37
|
+
className={cn("font-semibold leading-none tracking-tight", className)}
|
|
38
|
+
{...props}
|
|
39
|
+
/>
|
|
40
|
+
));
|
|
41
|
+
CardTitle.displayName = "CardTitle";
|
|
42
|
+
|
|
43
|
+
const CardDescription = React.forwardRef<
|
|
44
|
+
HTMLParagraphElement,
|
|
45
|
+
React.HTMLAttributes<HTMLParagraphElement>
|
|
46
|
+
>(({ className, ...props }, ref) => (
|
|
47
|
+
<p
|
|
48
|
+
ref={ref}
|
|
49
|
+
className={cn("text-sm text-muted-foreground", className)}
|
|
50
|
+
{...props}
|
|
51
|
+
/>
|
|
52
|
+
));
|
|
53
|
+
CardDescription.displayName = "CardDescription";
|
|
54
|
+
|
|
55
|
+
const CardContent = React.forwardRef<
|
|
56
|
+
HTMLDivElement,
|
|
57
|
+
React.HTMLAttributes<HTMLDivElement>
|
|
58
|
+
>(({ className, ...props }, ref) => (
|
|
59
|
+
<div ref={ref} className={cn("p-6 pt-0", className)} {...props} />
|
|
60
|
+
));
|
|
61
|
+
CardContent.displayName = "CardContent";
|
|
62
|
+
|
|
63
|
+
const CardFooter = React.forwardRef<
|
|
64
|
+
HTMLDivElement,
|
|
65
|
+
React.HTMLAttributes<HTMLDivElement>
|
|
66
|
+
>(({ className, ...props }, ref) => (
|
|
67
|
+
<div
|
|
68
|
+
ref={ref}
|
|
69
|
+
className={cn("flex items-center p-6 pt-0", className)}
|
|
70
|
+
{...props}
|
|
71
|
+
/>
|
|
72
|
+
));
|
|
73
|
+
CardFooter.displayName = "CardFooter";
|
|
74
|
+
|
|
75
|
+
export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./card";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./input";
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Input } from './input';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
|
|
5
|
+
const meta = {
|
|
6
|
+
title: 'Components/Input',
|
|
7
|
+
component: Input,
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: 'centered',
|
|
10
|
+
},
|
|
11
|
+
tags: ['autodocs'],
|
|
12
|
+
} satisfies Meta<typeof Input>;
|
|
13
|
+
|
|
14
|
+
export default meta;
|
|
15
|
+
type Story = StoryObj<typeof meta>;
|
|
16
|
+
|
|
17
|
+
export const Default: Story = {
|
|
18
|
+
args: {
|
|
19
|
+
type: 'text',
|
|
20
|
+
placeholder: 'Email address',
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export const Disabled: Story = {
|
|
25
|
+
args: {
|
|
26
|
+
disabled: true,
|
|
27
|
+
placeholder: 'Disabled input',
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export const WithLabel: Story = {
|
|
32
|
+
render: () => (
|
|
33
|
+
<div className="grid w-full max-w-sm items-center gap-1.5">
|
|
34
|
+
<label htmlFor="email-input" className="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70">
|
|
35
|
+
Email
|
|
36
|
+
</label>
|
|
37
|
+
<Input type="email" id="email-input" placeholder="Email" />
|
|
38
|
+
</div>
|
|
39
|
+
),
|
|
40
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { cn } from "../../utils/cn";
|
|
3
|
+
|
|
4
|
+
export interface InputProps
|
|
5
|
+
extends React.InputHTMLAttributes<HTMLInputElement> {}
|
|
6
|
+
|
|
7
|
+
const Input = React.forwardRef<HTMLInputElement, InputProps>(
|
|
8
|
+
({ className, type, ...props }, ref) => {
|
|
9
|
+
return (
|
|
10
|
+
<input
|
|
11
|
+
type={type}
|
|
12
|
+
className={cn(
|
|
13
|
+
"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
|
|
14
|
+
className
|
|
15
|
+
)}
|
|
16
|
+
ref={ref}
|
|
17
|
+
{...props}
|
|
18
|
+
/>
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
Input.displayName = "Input";
|
|
23
|
+
|
|
24
|
+
export { Input };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./label";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Label } from './label';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
|
|
5
|
+
const meta = {
|
|
6
|
+
title: 'Components/Label',
|
|
7
|
+
component: Label,
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: 'centered',
|
|
10
|
+
},
|
|
11
|
+
tags: ['autodocs'],
|
|
12
|
+
} satisfies Meta<typeof Label>;
|
|
13
|
+
|
|
14
|
+
export default meta;
|
|
15
|
+
type Story = StoryObj<typeof meta>;
|
|
16
|
+
|
|
17
|
+
export const Default: Story = {
|
|
18
|
+
args: {
|
|
19
|
+
children: 'Email Address',
|
|
20
|
+
htmlFor: 'email',
|
|
21
|
+
},
|
|
22
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
3
|
+
import { cva, type VariantProps } from "class-variance-authority";
|
|
4
|
+
import { cn } from "../../utils/cn";
|
|
5
|
+
|
|
6
|
+
const labelVariants = cva(
|
|
7
|
+
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
8
|
+
);
|
|
9
|
+
|
|
10
|
+
const Label = React.forwardRef<
|
|
11
|
+
React.ElementRef<typeof LabelPrimitive.Root>,
|
|
12
|
+
React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> &
|
|
13
|
+
VariantProps<typeof labelVariants>
|
|
14
|
+
>(({ className, ...props }, ref) => (
|
|
15
|
+
<LabelPrimitive.Root
|
|
16
|
+
ref={ref}
|
|
17
|
+
className={cn(labelVariants(), className)}
|
|
18
|
+
{...props}
|
|
19
|
+
/>
|
|
20
|
+
));
|
|
21
|
+
Label.displayName = LabelPrimitive.Root.displayName;
|
|
22
|
+
|
|
23
|
+
export { Label };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./separator";
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Separator } from './separator';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
|
|
5
|
+
const meta = {
|
|
6
|
+
title: 'Components/Separator',
|
|
7
|
+
component: Separator,
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: 'centered',
|
|
10
|
+
},
|
|
11
|
+
tags: ['autodocs'],
|
|
12
|
+
} satisfies Meta<typeof Separator>;
|
|
13
|
+
|
|
14
|
+
export default meta;
|
|
15
|
+
type Story = StoryObj<typeof meta>;
|
|
16
|
+
|
|
17
|
+
export const Default: Story = {
|
|
18
|
+
render: () => (
|
|
19
|
+
<div>
|
|
20
|
+
<div className="space-y-1">
|
|
21
|
+
<h4 className="text-sm font-medium leading-none">Radix Primitives</h4>
|
|
22
|
+
<p className="text-sm text-muted-foreground">
|
|
23
|
+
An open-source UI component library.
|
|
24
|
+
</p>
|
|
25
|
+
</div>
|
|
26
|
+
<Separator className="my-4" />
|
|
27
|
+
<div className="flex h-5 items-center space-x-4 text-sm">
|
|
28
|
+
<div>Blog</div>
|
|
29
|
+
<Separator orientation="vertical" />
|
|
30
|
+
<div>Docs</div>
|
|
31
|
+
<Separator orientation="vertical" />
|
|
32
|
+
<div>Source</div>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
),
|
|
36
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
3
|
+
import { cn } from "../../utils/cn";
|
|
4
|
+
|
|
5
|
+
const Separator = React.forwardRef<
|
|
6
|
+
React.ElementRef<typeof SeparatorPrimitive.Root>,
|
|
7
|
+
React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>
|
|
8
|
+
>(
|
|
9
|
+
(
|
|
10
|
+
{ className, orientation = "horizontal", decorative = true, ...props },
|
|
11
|
+
ref
|
|
12
|
+
) => (
|
|
13
|
+
<SeparatorPrimitive.Root
|
|
14
|
+
ref={ref}
|
|
15
|
+
decorative={decorative}
|
|
16
|
+
orientation={orientation}
|
|
17
|
+
className={cn(
|
|
18
|
+
"shrink-0 bg-border",
|
|
19
|
+
orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
|
|
20
|
+
className
|
|
21
|
+
)}
|
|
22
|
+
{...props}
|
|
23
|
+
/>
|
|
24
|
+
)
|
|
25
|
+
);
|
|
26
|
+
Separator.displayName = SeparatorPrimitive.Root.displayName;
|
|
27
|
+
|
|
28
|
+
export { Separator };
|
package/src/index.ts
ADDED
package/src/styles.css
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
@tailwind base;
|
|
2
|
+
@tailwind components;
|
|
3
|
+
@tailwind utilities;
|
|
4
|
+
|
|
5
|
+
/*
|
|
6
|
+
* ============================================
|
|
7
|
+
* Apptify UI — Design System Theme Variables
|
|
8
|
+
* Based on shadcn/ui CSS variable approach
|
|
9
|
+
* ============================================
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
@layer base {
|
|
13
|
+
/* ── Light Theme (Default) ── */
|
|
14
|
+
:root {
|
|
15
|
+
--background: 0 0% 100%;
|
|
16
|
+
--foreground: 222.2 84% 4.9%;
|
|
17
|
+
--card: 0 0% 100%;
|
|
18
|
+
--card-foreground: 222.2 84% 4.9%;
|
|
19
|
+
--popover: 0 0% 100%;
|
|
20
|
+
--popover-foreground: 222.2 84% 4.9%;
|
|
21
|
+
--primary: 226 100% 64%;
|
|
22
|
+
--primary-foreground: 0 0% 100%;
|
|
23
|
+
--secondary: 210 40% 96.1%;
|
|
24
|
+
--secondary-foreground: 222.2 47.4% 11.2%;
|
|
25
|
+
--muted: 210 40% 96.1%;
|
|
26
|
+
--muted-foreground: 215.4 16.3% 46.9%;
|
|
27
|
+
--accent: 210 40% 96.1%;
|
|
28
|
+
--accent-foreground: 222.2 47.4% 11.2%;
|
|
29
|
+
--destructive: 0 84.2% 60.2%;
|
|
30
|
+
--destructive-foreground: 0 0% 100%;
|
|
31
|
+
--border: 214.3 31.8% 91.4%;
|
|
32
|
+
--input: 214.3 31.8% 91.4%;
|
|
33
|
+
--ring: 226 100% 64%;
|
|
34
|
+
--radius: 0.75rem;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* ── Dark Theme ── */
|
|
38
|
+
.dark {
|
|
39
|
+
--background: 222.2 84% 4.9%;
|
|
40
|
+
--foreground: 210 40% 98%;
|
|
41
|
+
--card: 222.2 84% 4.9%;
|
|
42
|
+
--card-foreground: 210 40% 98%;
|
|
43
|
+
--popover: 222.2 84% 4.9%;
|
|
44
|
+
--popover-foreground: 210 40% 98%;
|
|
45
|
+
--primary: 226 100% 64%;
|
|
46
|
+
--primary-foreground: 0 0% 100%;
|
|
47
|
+
--secondary: 217.2 32.6% 17.5%;
|
|
48
|
+
--secondary-foreground: 210 40% 98%;
|
|
49
|
+
--muted: 217.2 32.6% 17.5%;
|
|
50
|
+
--muted-foreground: 215 20.2% 65.1%;
|
|
51
|
+
--accent: 217.2 32.6% 17.5%;
|
|
52
|
+
--accent-foreground: 210 40% 98%;
|
|
53
|
+
--destructive: 0 62.8% 30.6%;
|
|
54
|
+
--destructive-foreground: 0 0% 100%;
|
|
55
|
+
--border: 217.2 32.6% 17.5%;
|
|
56
|
+
--input: 217.2 32.6% 17.5%;
|
|
57
|
+
--ring: 224.3 76.3% 48%;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
@layer base {
|
|
62
|
+
* {
|
|
63
|
+
@apply border-border;
|
|
64
|
+
}
|
|
65
|
+
body {
|
|
66
|
+
@apply bg-background text-foreground;
|
|
67
|
+
font-feature-settings: "rlig" 1, "calt" 1;
|
|
68
|
+
}
|
|
69
|
+
}
|
package/src/utils/cn.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type ClassValue, clsx } from "clsx";
|
|
2
|
+
import { twMerge } from "tailwind-merge";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Merges Tailwind CSS classes with proper conflict resolution.
|
|
6
|
+
* Combines clsx for conditional classes and tailwind-merge for deduplication.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* cn("px-4 py-2", "px-8") // => "px-8 py-2"
|
|
10
|
+
* cn("text-red-500", isActive && "text-blue-500")
|
|
11
|
+
*/
|
|
12
|
+
export function cn(...inputs: ClassValue[]) {
|
|
13
|
+
return twMerge(clsx(inputs));
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { cn } from "./cn";
|