@beyondcorp/beyond-ui 1.0.9 → 1.0.10
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/components/Alert/Alert.js +4 -4
- package/dist/components/Alert/Alert.js.map +1 -1
- package/dist/components/Avatar/Avatar.js +4 -4
- package/dist/components/Avatar/Avatar.js.map +1 -1
- package/dist/components/Badge/Badge.js +2 -2
- package/dist/components/Badge/Badge.js.map +1 -1
- package/dist/components/Button/Button.js +2 -2
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/Card/Card.js +7 -7
- package/dist/components/Card/Card.js.map +1 -1
- package/dist/components/Checkbox/Checkbox.js +2 -2
- package/dist/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/ComponentShowcase/ComponentShowcase.js +41 -41
- package/dist/components/ComponentShowcase/ComponentShowcase.js.map +1 -1
- package/dist/components/DashboardGrid/DashboardGrid.js +3 -3
- package/dist/components/DashboardGrid/DashboardGrid.js.map +1 -1
- package/dist/components/DashboardHeader/DashboardHeader.js +2 -2
- package/dist/components/DashboardHeader/DashboardHeader.js.map +1 -1
- package/dist/components/DashboardLayout/DashboardLayout.js +3 -3
- package/dist/components/DashboardLayout/DashboardLayout.js.map +1 -1
- package/dist/components/DataTable/DataTable.js +11 -11
- package/dist/components/DataTable/DataTable.js.map +1 -1
- package/dist/components/DataTable/DataTableShowcase.js +20 -20
- package/dist/components/DataTable/DataTableShowcase.js.map +1 -1
- package/dist/components/Input/Input.js +2 -2
- package/dist/components/Input/Input.js.map +1 -1
- package/dist/components/Modal/Modal.js +7 -7
- package/dist/components/Modal/Modal.js.map +1 -1
- package/dist/components/Navbar/Navbar.js +3 -3
- package/dist/components/Navbar/Navbar.js.map +1 -1
- package/dist/components/Sidebar/Sidebar.js +13 -13
- package/dist/components/Sidebar/Sidebar.js.map +1 -1
- package/dist/components/Skeleton/Skeleton.js +2 -2
- package/dist/components/Skeleton/Skeleton.js.map +1 -1
- package/dist/components/Spinner/Spinner.js +2 -2
- package/dist/components/Spinner/Spinner.js.map +1 -1
- package/dist/components/StatsCard/StatsCard.js +5 -5
- package/dist/components/StatsCard/StatsCard.js.map +1 -1
- package/dist/components/Switch/Switch.js +2 -2
- package/dist/components/Switch/Switch.js.map +1 -1
- package/dist/components/Tabs/Tabs.js +5 -5
- package/dist/components/Tabs/Tabs.js.map +1 -1
- package/dist/components/Textarea/Textarea.js +2 -2
- package/dist/components/Textarea/Textarea.js.map +1 -1
- package/dist/components/Toast/Toast.js +8 -8
- package/dist/components/Toast/Toast.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-slot/dist/index.js +3 -3
- package/dist/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/_virtual/jsx-runtime.js +0 -6
- package/dist/_virtual/jsx-runtime.js.map +0 -1
- package/dist/_virtual/jsx-runtime2.js +0 -4
- package/dist/_virtual/jsx-runtime2.js.map +0 -1
- package/dist/_virtual/react-jsx-runtime.development.js +0 -4
- package/dist/_virtual/react-jsx-runtime.development.js.map +0 -1
- package/dist/_virtual/react-jsx-runtime.production.min.js +0 -4
- package/dist/_virtual/react-jsx-runtime.production.min.js.map +0 -1
- package/dist/node_modules/react/cjs/react-jsx-runtime.development.js +0 -1326
- package/dist/node_modules/react/cjs/react-jsx-runtime.development.js.map +0 -1
- package/dist/node_modules/react/cjs/react-jsx-runtime.production.min.js +0 -25
- package/dist/node_modules/react/cjs/react-jsx-runtime.production.min.js.map +0 -1
- package/dist/node_modules/react/jsx-runtime.js +0 -20
- package/dist/node_modules/react/jsx-runtime.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { cva } from 'class-variance-authority';
|
|
4
4
|
import { cn } from '../../utils/cn.js';
|
|
@@ -17,11 +17,11 @@ const alertVariants = cva("relative w-full rounded-lg border p-4", {
|
|
|
17
17
|
variant: "default",
|
|
18
18
|
},
|
|
19
19
|
});
|
|
20
|
-
const Alert = React.forwardRef(({ className, variant, ...props }, ref) => (
|
|
20
|
+
const Alert = React.forwardRef(({ className, variant, ...props }, ref) => (jsx("div", { ref: ref, role: "alert", className: cn(alertVariants({ variant }), className), ...props })));
|
|
21
21
|
Alert.displayName = "Alert";
|
|
22
|
-
const AlertTitle = React.forwardRef(({ className, ...props }, ref) => (
|
|
22
|
+
const AlertTitle = React.forwardRef(({ className, ...props }, ref) => (jsx("h5", { ref: ref, className: cn("mb-1 font-medium leading-none tracking-tight", className), ...props })));
|
|
23
23
|
AlertTitle.displayName = "AlertTitle";
|
|
24
|
-
const AlertDescription = React.forwardRef(({ className, ...props }, ref) => (
|
|
24
|
+
const AlertDescription = React.forwardRef(({ className, ...props }, ref) => (jsx("div", { ref: ref, className: cn("text-sm [&_p]:leading-relaxed", className), ...props })));
|
|
25
25
|
AlertDescription.displayName = "AlertDescription";
|
|
26
26
|
|
|
27
27
|
export { Alert, AlertDescription, AlertTitle, alertVariants };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alert.js","sources":["../../../src/components/Alert/Alert.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"../../utils/cn\";\n\nconst alertVariants = cva(\n \"relative w-full rounded-lg border p-4\",\n {\n variants: {\n variant: {\n default: \"bg-white text-gray-950 border-gray-200\",\n success: \"bg-success-50 text-success-800 border-success-200\",\n warning: \"bg-warning-50 text-warning-800 border-warning-200\",\n danger: \"bg-danger-50 text-danger-800 border-danger-200\",\n info: \"bg-primary-50 text-primary-800 border-primary-200\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n);\n\nconst Alert = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof alertVariants>\n>(({ className, variant, ...props }, ref) => (\n <div\n ref={ref}\n role=\"alert\"\n className={cn(alertVariants({ variant }), className)}\n {...props}\n />\n));\nAlert.displayName = \"Alert\";\n\nconst AlertTitle = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLHeadingElement>\n>(({ className, ...props }, ref) => (\n <h5\n ref={ref}\n className={cn(\"mb-1 font-medium leading-none tracking-tight\", className)}\n {...props}\n />\n));\nAlertTitle.displayName = \"AlertTitle\";\n\nconst AlertDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"text-sm [&_p]:leading-relaxed\", className)}\n {...props}\n />\n));\nAlertDescription.displayName = \"AlertDescription\";\n\nexport { Alert, AlertTitle, AlertDescription, alertVariants };"],"names":["_jsx"],"mappings":";;;;;AAIA,MAAM,aAAa,GAAG,GAAG,CACvB,uCAAuC,EACvC;AACE,IAAA,QAAQ,EAAE;AACR,QAAA,OAAO,EAAE;AACP,YAAA,OAAO,EAAE,wCAAwC;AACjD,YAAA,OAAO,EAAE,mDAAmD;AAC5D,YAAA,OAAO,EAAE,mDAAmD;AAC5D,YAAA,MAAM,EAAE,gDAAgD;AACxD,YAAA,IAAI,EAAE,mDAAmD;AAC1D,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,OAAO,EAAE,SAAS;AACnB,KAAA;AACF,CAAA;AAGH,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAG5B,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,MACtCA,
|
|
1
|
+
{"version":3,"file":"Alert.js","sources":["../../../src/components/Alert/Alert.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"../../utils/cn\";\n\nconst alertVariants = cva(\n \"relative w-full rounded-lg border p-4\",\n {\n variants: {\n variant: {\n default: \"bg-white text-gray-950 border-gray-200\",\n success: \"bg-success-50 text-success-800 border-success-200\",\n warning: \"bg-warning-50 text-warning-800 border-warning-200\",\n danger: \"bg-danger-50 text-danger-800 border-danger-200\",\n info: \"bg-primary-50 text-primary-800 border-primary-200\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n);\n\nconst Alert = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof alertVariants>\n>(({ className, variant, ...props }, ref) => (\n <div\n ref={ref}\n role=\"alert\"\n className={cn(alertVariants({ variant }), className)}\n {...props}\n />\n));\nAlert.displayName = \"Alert\";\n\nconst AlertTitle = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLHeadingElement>\n>(({ className, ...props }, ref) => (\n <h5\n ref={ref}\n className={cn(\"mb-1 font-medium leading-none tracking-tight\", className)}\n {...props}\n />\n));\nAlertTitle.displayName = \"AlertTitle\";\n\nconst AlertDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"text-sm [&_p]:leading-relaxed\", className)}\n {...props}\n />\n));\nAlertDescription.displayName = \"AlertDescription\";\n\nexport { Alert, AlertTitle, AlertDescription, alertVariants };"],"names":["_jsx"],"mappings":";;;;;AAIA,MAAM,aAAa,GAAG,GAAG,CACvB,uCAAuC,EACvC;AACE,IAAA,QAAQ,EAAE;AACR,QAAA,OAAO,EAAE;AACP,YAAA,OAAO,EAAE,wCAAwC;AACjD,YAAA,OAAO,EAAE,mDAAmD;AAC5D,YAAA,OAAO,EAAE,mDAAmD;AAC5D,YAAA,MAAM,EAAE,gDAAgD;AACxD,YAAA,IAAI,EAAE,mDAAmD;AAC1D,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,OAAO,EAAE,SAAS;AACnB,KAAA;AACF,CAAA;AAGH,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAG5B,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,MACtCA,GAAA,CAAA,KAAA,EAAA,EACE,GAAG,EAAE,GAAG,EACR,IAAI,EAAC,OAAO,EACZ,SAAS,EAAE,EAAE,CAAC,aAAa,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,CAAC,KAChD,KAAK,EAAA,CACT,CACH;AACD,KAAK,CAAC,WAAW,GAAG,OAAO;AAE3B,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,CAGjC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,MAC7BA,GAAA,CAAA,IAAA,EAAA,EACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,8CAA8C,EAAE,SAAS,CAAC,EAAA,GACpE,KAAK,EAAA,CACT,CACH;AACD,UAAU,CAAC,WAAW,GAAG,YAAY;AAErC,MAAM,gBAAgB,GAAG,KAAK,CAAC,UAAU,CAGvC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,MAC7BA,GAAA,CAAA,KAAA,EAAA,EACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,+BAA+B,EAAE,SAAS,CAAC,EAAA,GACrD,KAAK,EAAA,CACT,CACH;AACD,gBAAgB,CAAC,WAAW,GAAG,kBAAkB;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { cva } from 'class-variance-authority';
|
|
4
4
|
import { cn } from '../../utils/cn.js';
|
|
@@ -16,11 +16,11 @@ const avatarVariants = cva("relative flex shrink-0 overflow-hidden rounded-full"
|
|
|
16
16
|
size: "md",
|
|
17
17
|
},
|
|
18
18
|
});
|
|
19
|
-
const Avatar = React.forwardRef(({ className, size, ...props }, ref) => (
|
|
19
|
+
const Avatar = React.forwardRef(({ className, size, ...props }, ref) => (jsx("div", { ref: ref, className: cn(avatarVariants({ size }), className), ...props })));
|
|
20
20
|
Avatar.displayName = "Avatar";
|
|
21
|
-
const AvatarImage = React.forwardRef(({ className, ...props }, ref) => (
|
|
21
|
+
const AvatarImage = React.forwardRef(({ className, ...props }, ref) => (jsx("img", { ref: ref, className: cn("aspect-square h-full w-full object-cover", className), ...props })));
|
|
22
22
|
AvatarImage.displayName = "AvatarImage";
|
|
23
|
-
const AvatarFallback = React.forwardRef(({ className, ...props }, ref) => (
|
|
23
|
+
const AvatarFallback = React.forwardRef(({ className, ...props }, ref) => (jsx("div", { ref: ref, className: cn("flex h-full w-full items-center justify-center rounded-full bg-gray-100 text-gray-600 font-medium", className), ...props })));
|
|
24
24
|
AvatarFallback.displayName = "AvatarFallback";
|
|
25
25
|
|
|
26
26
|
export { Avatar, AvatarFallback, AvatarImage, avatarVariants };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.js","sources":["../../../src/components/Avatar/Avatar.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"../../utils/cn\";\n\nconst avatarVariants = cva(\n \"relative flex shrink-0 overflow-hidden rounded-full\",\n {\n variants: {\n size: {\n sm: \"h-8 w-8\",\n md: \"h-10 w-10\",\n lg: \"h-16 w-16\",\n xl: \"h-20 w-20\",\n },\n },\n defaultVariants: {\n size: \"md\",\n },\n }\n);\n\nconst Avatar = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof avatarVariants>\n>(({ className, size, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(avatarVariants({ size }), className)}\n {...props}\n />\n));\nAvatar.displayName = \"Avatar\";\n\nconst AvatarImage = React.forwardRef<\n HTMLImageElement,\n React.ImgHTMLAttributes<HTMLImageElement>\n>(({ className, ...props }, ref) => (\n <img\n ref={ref}\n className={cn(\"aspect-square h-full w-full object-cover\", className)}\n {...props}\n />\n));\nAvatarImage.displayName = \"AvatarImage\";\n\nconst AvatarFallback = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n \"flex h-full w-full items-center justify-center rounded-full bg-gray-100 text-gray-600 font-medium\",\n className\n )}\n {...props}\n />\n));\nAvatarFallback.displayName = \"AvatarFallback\";\n\nexport { Avatar, AvatarImage, AvatarFallback, avatarVariants };"],"names":["_jsx"],"mappings":";;;;;AAIA,MAAM,cAAc,GAAG,GAAG,CACxB,qDAAqD,EACrD;AACE,IAAA,QAAQ,EAAE;AACR,QAAA,IAAI,EAAE;AACJ,YAAA,EAAE,EAAE,SAAS;AACb,YAAA,EAAE,EAAE,WAAW;AACf,YAAA,EAAE,EAAE,WAAW;AACf,YAAA,EAAE,EAAE,WAAW;AAChB,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,IAAI,EAAE,IAAI;AACX,KAAA;AACF,CAAA;AAGH,MAAM,MAAM,GAAG,KAAK,CAAC,UAAU,CAG7B,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,MACnCA,
|
|
1
|
+
{"version":3,"file":"Avatar.js","sources":["../../../src/components/Avatar/Avatar.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"../../utils/cn\";\n\nconst avatarVariants = cva(\n \"relative flex shrink-0 overflow-hidden rounded-full\",\n {\n variants: {\n size: {\n sm: \"h-8 w-8\",\n md: \"h-10 w-10\",\n lg: \"h-16 w-16\",\n xl: \"h-20 w-20\",\n },\n },\n defaultVariants: {\n size: \"md\",\n },\n }\n);\n\nconst Avatar = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof avatarVariants>\n>(({ className, size, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(avatarVariants({ size }), className)}\n {...props}\n />\n));\nAvatar.displayName = \"Avatar\";\n\nconst AvatarImage = React.forwardRef<\n HTMLImageElement,\n React.ImgHTMLAttributes<HTMLImageElement>\n>(({ className, ...props }, ref) => (\n <img\n ref={ref}\n className={cn(\"aspect-square h-full w-full object-cover\", className)}\n {...props}\n />\n));\nAvatarImage.displayName = \"AvatarImage\";\n\nconst AvatarFallback = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n \"flex h-full w-full items-center justify-center rounded-full bg-gray-100 text-gray-600 font-medium\",\n className\n )}\n {...props}\n />\n));\nAvatarFallback.displayName = \"AvatarFallback\";\n\nexport { Avatar, AvatarImage, AvatarFallback, avatarVariants };"],"names":["_jsx"],"mappings":";;;;;AAIA,MAAM,cAAc,GAAG,GAAG,CACxB,qDAAqD,EACrD;AACE,IAAA,QAAQ,EAAE;AACR,QAAA,IAAI,EAAE;AACJ,YAAA,EAAE,EAAE,SAAS;AACb,YAAA,EAAE,EAAE,WAAW;AACf,YAAA,EAAE,EAAE,WAAW;AACf,YAAA,EAAE,EAAE,WAAW;AAChB,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,IAAI,EAAE,IAAI;AACX,KAAA;AACF,CAAA;AAGH,MAAM,MAAM,GAAG,KAAK,CAAC,UAAU,CAG7B,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,MACnCA,GAAA,CAAA,KAAA,EAAA,EACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,cAAc,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,SAAS,CAAC,EAAA,GAC9C,KAAK,EAAA,CACT,CACH;AACD,MAAM,CAAC,WAAW,GAAG,QAAQ;AAE7B,MAAM,WAAW,GAAG,KAAK,CAAC,UAAU,CAGlC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,MAC7BA,GAAA,CAAA,KAAA,EAAA,EACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,0CAA0C,EAAE,SAAS,CAAC,EAAA,GAChE,KAAK,EAAA,CACT,CACH;AACD,WAAW,CAAC,WAAW,GAAG,aAAa;AAEvC,MAAM,cAAc,GAAG,KAAK,CAAC,UAAU,CAGrC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,MAC7BA,GAAA,CAAA,KAAA,EAAA,EACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACX,mGAAmG,EACnG,SAAS,CACV,EAAA,GACG,KAAK,EAAA,CACT,CACH;AACD,cAAc,CAAC,WAAW,GAAG,gBAAgB;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { cva } from 'class-variance-authority';
|
|
3
3
|
import { cn } from '../../utils/cn.js';
|
|
4
4
|
|
|
@@ -18,7 +18,7 @@ const badgeVariants = cva("inline-flex items-center rounded-full border px-2.5 p
|
|
|
18
18
|
},
|
|
19
19
|
});
|
|
20
20
|
function Badge({ className, variant, ...props }) {
|
|
21
|
-
return (
|
|
21
|
+
return (jsx("div", { className: cn(badgeVariants({ variant }), className), ...props }));
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
export { Badge, badgeVariants };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.js","sources":["../../../src/components/Badge/Badge.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"../../utils/cn\";\n\nconst badgeVariants = cva(\n \"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2\",\n {\n variants: {\n variant: {\n default: \"border-transparent bg-primary-600 text-white hover:bg-primary-700\",\n secondary: \"border-transparent bg-secondary-600 text-white hover:bg-secondary-700\",\n success: \"border-transparent bg-success-600 text-white hover:bg-success-700\",\n danger: \"border-transparent bg-danger-600 text-white hover:bg-danger-700\",\n warning: \"border-transparent bg-warning-600 text-white hover:bg-warning-700\",\n outline: \"text-gray-700 border-gray-300\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n);\n\nexport interface BadgeProps\n extends React.HTMLAttributes<HTMLDivElement>,\n VariantProps<typeof badgeVariants> {}\n\nfunction Badge({ className, variant, ...props }: BadgeProps) {\n return (\n <div className={cn(badgeVariants({ variant }), className)} {...props} />\n );\n}\n\nexport { Badge, badgeVariants };"],"names":["_jsx"],"mappings":";;;;AAIA,MAAM,aAAa,GAAG,GAAG,CACvB,+KAA+K,EAC/K;AACE,IAAA,QAAQ,EAAE;AACR,QAAA,OAAO,EAAE;AACP,YAAA,OAAO,EAAE,mEAAmE;AAC5E,YAAA,SAAS,EAAE,uEAAuE;AAClF,YAAA,OAAO,EAAE,mEAAmE;AAC5E,YAAA,MAAM,EAAE,iEAAiE;AACzE,YAAA,OAAO,EAAE,mEAAmE;AAC5E,YAAA,OAAO,EAAE,+BAA+B;AACzC,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,OAAO,EAAE,SAAS;AACnB,KAAA;AACF,CAAA;AAOH,SAAS,KAAK,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,KAAK,EAAc,EAAA;AACzD,IAAA,QACEA,
|
|
1
|
+
{"version":3,"file":"Badge.js","sources":["../../../src/components/Badge/Badge.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"../../utils/cn\";\n\nconst badgeVariants = cva(\n \"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2\",\n {\n variants: {\n variant: {\n default: \"border-transparent bg-primary-600 text-white hover:bg-primary-700\",\n secondary: \"border-transparent bg-secondary-600 text-white hover:bg-secondary-700\",\n success: \"border-transparent bg-success-600 text-white hover:bg-success-700\",\n danger: \"border-transparent bg-danger-600 text-white hover:bg-danger-700\",\n warning: \"border-transparent bg-warning-600 text-white hover:bg-warning-700\",\n outline: \"text-gray-700 border-gray-300\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n);\n\nexport interface BadgeProps\n extends React.HTMLAttributes<HTMLDivElement>,\n VariantProps<typeof badgeVariants> {}\n\nfunction Badge({ className, variant, ...props }: BadgeProps) {\n return (\n <div className={cn(badgeVariants({ variant }), className)} {...props} />\n );\n}\n\nexport { Badge, badgeVariants };"],"names":["_jsx"],"mappings":";;;;AAIA,MAAM,aAAa,GAAG,GAAG,CACvB,+KAA+K,EAC/K;AACE,IAAA,QAAQ,EAAE;AACR,QAAA,OAAO,EAAE;AACP,YAAA,OAAO,EAAE,mEAAmE;AAC5E,YAAA,SAAS,EAAE,uEAAuE;AAClF,YAAA,OAAO,EAAE,mEAAmE;AAC5E,YAAA,MAAM,EAAE,iEAAiE;AACzE,YAAA,OAAO,EAAE,mEAAmE;AAC5E,YAAA,OAAO,EAAE,+BAA+B;AACzC,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,OAAO,EAAE,SAAS;AACnB,KAAA;AACF,CAAA;AAOH,SAAS,KAAK,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,KAAK,EAAc,EAAA;AACzD,IAAA,QACEA,GAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,EAAE,CAAC,aAAa,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,CAAC,KAAM,KAAK,EAAA,CAAI;AAE5E;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { Root as Slot } from '../../node_modules/@radix-ui/react-slot/dist/index.js';
|
|
4
4
|
import { cva } from 'class-variance-authority';
|
|
@@ -30,7 +30,7 @@ const buttonVariants = cva("inline-flex items-center justify-center whitespace-n
|
|
|
30
30
|
});
|
|
31
31
|
const Button = React.forwardRef(({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
32
32
|
const Comp = asChild ? Slot : "button";
|
|
33
|
-
return (
|
|
33
|
+
return (jsx(Comp, { className: cn(buttonVariants({ variant, size, className })), ref: ref, ...props }));
|
|
34
34
|
});
|
|
35
35
|
Button.displayName = "Button";
|
|
36
36
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"../../utils/cn\";\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-white transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\",\n {\n variants: {\n variant: {\n primary: \"bg-primary-600 text-white hover:bg-primary-700\",\n secondary: \"bg-secondary-600 text-white hover:bg-secondary-700\",\n danger: \"bg-danger-600 text-white hover:bg-danger-700\",\n success: \"bg-success-600 text-white hover:bg-success-700\",\n warning: \"bg-warning-600 text-white hover:bg-warning-700\",\n outline: \"border border-primary-300 bg-white hover:bg-primary-50\",\n ghost: \"bg-transparent hover:bg-primary-50\",\n link: \"text-primary-600 underline-offset-4 hover:underline\",\n },\n size: {\n sm: \"h-8 px-3 text-xs\",\n md: \"h-10 px-4 py-2\",\n lg: \"h-11 px-8\",\n xl: \"h-12 px-10 text-base\",\n },\n },\n defaultVariants: {\n variant: \"primary\",\n size: \"md\",\n },\n }\n);\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\";\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n {...props}\n />\n );\n }\n);\nButton.displayName = \"Button\";\n\nexport { Button, buttonVariants };"],"names":["_jsx"],"mappings":";;;;;;AAKA,MAAM,cAAc,GAAG,GAAG,CACxB,0RAA0R,EAC1R;AACE,IAAA,QAAQ,EAAE;AACR,QAAA,OAAO,EAAE;AACP,YAAA,OAAO,EAAE,gDAAgD;AACzD,YAAA,SAAS,EAAE,oDAAoD;AAC/D,YAAA,MAAM,EAAE,8CAA8C;AACtD,YAAA,OAAO,EAAE,gDAAgD;AACzD,YAAA,OAAO,EAAE,gDAAgD;AACzD,YAAA,OAAO,EAAE,wDAAwD;AACjE,YAAA,KAAK,EAAE,oCAAoC;AAC3C,YAAA,IAAI,EAAE,qDAAqD;AAC5D,SAAA;AACD,QAAA,IAAI,EAAE;AACJ,YAAA,EAAE,EAAE,kBAAkB;AACtB,YAAA,EAAE,EAAE,gBAAgB;AACpB,YAAA,EAAE,EAAE,WAAW;AACf,YAAA,EAAE,EAAE,sBAAsB;AAC3B,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,OAAO,EAAE,SAAS;AAClB,QAAA,IAAI,EAAE,IAAI;AACX,KAAA;AACF,CAAA;AASH,MAAM,MAAM,GAAG,KAAK,CAAC,UAAU,CAC7B,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,GAAG,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,KAAI;IAC/D,MAAM,IAAI,GAAG,OAAO,GAAG,IAAI,GAAG,QAAQ;IACtC,QACEA,
|
|
1
|
+
{"version":3,"file":"Button.js","sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"../../utils/cn\";\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-white transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\",\n {\n variants: {\n variant: {\n primary: \"bg-primary-600 text-white hover:bg-primary-700\",\n secondary: \"bg-secondary-600 text-white hover:bg-secondary-700\",\n danger: \"bg-danger-600 text-white hover:bg-danger-700\",\n success: \"bg-success-600 text-white hover:bg-success-700\",\n warning: \"bg-warning-600 text-white hover:bg-warning-700\",\n outline: \"border border-primary-300 bg-white hover:bg-primary-50\",\n ghost: \"bg-transparent hover:bg-primary-50\",\n link: \"text-primary-600 underline-offset-4 hover:underline\",\n },\n size: {\n sm: \"h-8 px-3 text-xs\",\n md: \"h-10 px-4 py-2\",\n lg: \"h-11 px-8\",\n xl: \"h-12 px-10 text-base\",\n },\n },\n defaultVariants: {\n variant: \"primary\",\n size: \"md\",\n },\n }\n);\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\";\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n {...props}\n />\n );\n }\n);\nButton.displayName = \"Button\";\n\nexport { Button, buttonVariants };"],"names":["_jsx"],"mappings":";;;;;;AAKA,MAAM,cAAc,GAAG,GAAG,CACxB,0RAA0R,EAC1R;AACE,IAAA,QAAQ,EAAE;AACR,QAAA,OAAO,EAAE;AACP,YAAA,OAAO,EAAE,gDAAgD;AACzD,YAAA,SAAS,EAAE,oDAAoD;AAC/D,YAAA,MAAM,EAAE,8CAA8C;AACtD,YAAA,OAAO,EAAE,gDAAgD;AACzD,YAAA,OAAO,EAAE,gDAAgD;AACzD,YAAA,OAAO,EAAE,wDAAwD;AACjE,YAAA,KAAK,EAAE,oCAAoC;AAC3C,YAAA,IAAI,EAAE,qDAAqD;AAC5D,SAAA;AACD,QAAA,IAAI,EAAE;AACJ,YAAA,EAAE,EAAE,kBAAkB;AACtB,YAAA,EAAE,EAAE,gBAAgB;AACpB,YAAA,EAAE,EAAE,WAAW;AACf,YAAA,EAAE,EAAE,sBAAsB;AAC3B,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,OAAO,EAAE,SAAS;AAClB,QAAA,IAAI,EAAE,IAAI;AACX,KAAA;AACF,CAAA;AASH,MAAM,MAAM,GAAG,KAAK,CAAC,UAAU,CAC7B,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,GAAG,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,KAAI;IAC/D,MAAM,IAAI,GAAG,OAAO,GAAG,IAAI,GAAG,QAAQ;IACtC,QACEA,GAAA,CAAC,IAAI,EAAA,EACH,SAAS,EAAE,EAAE,CAAC,cAAc,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC,EAC3D,GAAG,EAAE,GAAG,EAAA,GACJ,KAAK,EAAA,CACT;AAEN,CAAC;AAEH,MAAM,CAAC,WAAW,GAAG,QAAQ;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { cva } from 'class-variance-authority';
|
|
4
4
|
import { cn } from '../../utils/cn.js';
|
|
@@ -22,17 +22,17 @@ const cardVariants = cva("rounded-lg border bg-white text-gray-950 shadow-sm", {
|
|
|
22
22
|
padding: "md",
|
|
23
23
|
},
|
|
24
24
|
});
|
|
25
|
-
const Card = React.forwardRef(({ className, variant, padding, ...props }, ref) => (
|
|
25
|
+
const Card = React.forwardRef(({ className, variant, padding, ...props }, ref) => (jsx("div", { ref: ref, className: cn(cardVariants({ variant, padding, className })), ...props })));
|
|
26
26
|
Card.displayName = "Card";
|
|
27
|
-
const CardHeader = React.forwardRef(({ className, ...props }, ref) => (
|
|
27
|
+
const CardHeader = React.forwardRef(({ className, ...props }, ref) => (jsx("div", { ref: ref, className: cn("flex flex-col space-y-1.5 p-6", className), ...props })));
|
|
28
28
|
CardHeader.displayName = "CardHeader";
|
|
29
|
-
const CardTitle = React.forwardRef(({ className, ...props }, ref) => (
|
|
29
|
+
const CardTitle = React.forwardRef(({ className, ...props }, ref) => (jsx("h3", { ref: ref, className: cn("text-2xl font-semibold leading-none tracking-tight", className), ...props })));
|
|
30
30
|
CardTitle.displayName = "CardTitle";
|
|
31
|
-
const CardDescription = React.forwardRef(({ className, ...props }, ref) => (
|
|
31
|
+
const CardDescription = React.forwardRef(({ className, ...props }, ref) => (jsx("p", { ref: ref, className: cn("text-sm text-gray-500", className), ...props })));
|
|
32
32
|
CardDescription.displayName = "CardDescription";
|
|
33
|
-
const CardContent = React.forwardRef(({ className, ...props }, ref) => (
|
|
33
|
+
const CardContent = React.forwardRef(({ className, ...props }, ref) => (jsx("div", { ref: ref, className: cn("p-6 pt-0", className), ...props })));
|
|
34
34
|
CardContent.displayName = "CardContent";
|
|
35
|
-
const CardFooter = React.forwardRef(({ className, ...props }, ref) => (
|
|
35
|
+
const CardFooter = React.forwardRef(({ className, ...props }, ref) => (jsx("div", { ref: ref, className: cn("flex items-center p-6 pt-0", className), ...props })));
|
|
36
36
|
CardFooter.displayName = "CardFooter";
|
|
37
37
|
|
|
38
38
|
export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, cardVariants };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.js","sources":["../../../src/components/Card/Card.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"../../utils/cn\";\n\nconst cardVariants = cva(\n \"rounded-lg border bg-white text-gray-950 shadow-sm\",\n {\n variants: {\n variant: {\n default: \"border-gray-200\",\n elevated: \"border-gray-200 shadow-md\",\n outlined: \"border-2 border-primary-200\",\n },\n padding: {\n none: \"p-0\",\n sm: \"p-4\",\n md: \"p-6\",\n lg: \"p-8\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n padding: \"md\",\n },\n }\n);\n\nexport interface CardProps\n extends React.HTMLAttributes<HTMLDivElement>,\n VariantProps<typeof cardVariants> {}\n\nconst Card = React.forwardRef<HTMLDivElement, CardProps>(\n ({ className, variant, padding, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(cardVariants({ variant, padding, className }))}\n {...props}\n />\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(\n \"text-2xl font-semibold leading-none tracking-tight\",\n className\n )}\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-gray-500\", 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 {\n Card,\n CardHeader,\n CardFooter,\n CardTitle,\n CardDescription,\n CardContent,\n cardVariants,\n};"],"names":["_jsx"],"mappings":";;;;;AAIA,MAAM,YAAY,GAAG,GAAG,CACtB,oDAAoD,EACpD;AACE,IAAA,QAAQ,EAAE;AACR,QAAA,OAAO,EAAE;AACP,YAAA,OAAO,EAAE,iBAAiB;AAC1B,YAAA,QAAQ,EAAE,2BAA2B;AACrC,YAAA,QAAQ,EAAE,6BAA6B;AACxC,SAAA;AACD,QAAA,OAAO,EAAE;AACP,YAAA,IAAI,EAAE,KAAK;AACX,YAAA,EAAE,EAAE,KAAK;AACT,YAAA,EAAE,EAAE,KAAK;AACT,YAAA,EAAE,EAAE,KAAK;AACV,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,OAAO,EAAE,SAAS;AAClB,QAAA,OAAO,EAAE,IAAI;AACd,KAAA;AACF,CAAA;AAOH,MAAM,IAAI,GAAG,KAAK,CAAC,UAAU,CAC3B,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,MAC7CA,
|
|
1
|
+
{"version":3,"file":"Card.js","sources":["../../../src/components/Card/Card.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"../../utils/cn\";\n\nconst cardVariants = cva(\n \"rounded-lg border bg-white text-gray-950 shadow-sm\",\n {\n variants: {\n variant: {\n default: \"border-gray-200\",\n elevated: \"border-gray-200 shadow-md\",\n outlined: \"border-2 border-primary-200\",\n },\n padding: {\n none: \"p-0\",\n sm: \"p-4\",\n md: \"p-6\",\n lg: \"p-8\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n padding: \"md\",\n },\n }\n);\n\nexport interface CardProps\n extends React.HTMLAttributes<HTMLDivElement>,\n VariantProps<typeof cardVariants> {}\n\nconst Card = React.forwardRef<HTMLDivElement, CardProps>(\n ({ className, variant, padding, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(cardVariants({ variant, padding, className }))}\n {...props}\n />\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(\n \"text-2xl font-semibold leading-none tracking-tight\",\n className\n )}\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-gray-500\", 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 {\n Card,\n CardHeader,\n CardFooter,\n CardTitle,\n CardDescription,\n CardContent,\n cardVariants,\n};"],"names":["_jsx"],"mappings":";;;;;AAIA,MAAM,YAAY,GAAG,GAAG,CACtB,oDAAoD,EACpD;AACE,IAAA,QAAQ,EAAE;AACR,QAAA,OAAO,EAAE;AACP,YAAA,OAAO,EAAE,iBAAiB;AAC1B,YAAA,QAAQ,EAAE,2BAA2B;AACrC,YAAA,QAAQ,EAAE,6BAA6B;AACxC,SAAA;AACD,QAAA,OAAO,EAAE;AACP,YAAA,IAAI,EAAE,KAAK;AACX,YAAA,EAAE,EAAE,KAAK;AACT,YAAA,EAAE,EAAE,KAAK;AACT,YAAA,EAAE,EAAE,KAAK;AACV,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,OAAO,EAAE,SAAS;AAClB,QAAA,OAAO,EAAE,IAAI;AACd,KAAA;AACF,CAAA;AAOH,MAAM,IAAI,GAAG,KAAK,CAAC,UAAU,CAC3B,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,MAC7CA,GAAA,CAAA,KAAA,EAAA,EACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,YAAY,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC,KACxD,KAAK,EAAA,CACT,CACH;AAEH,IAAI,CAAC,WAAW,GAAG,MAAM;AAEzB,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,CAGjC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,MAC7BA,GAAA,CAAA,KAAA,EAAA,EACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,+BAA+B,EAAE,SAAS,CAAC,EAAA,GACrD,KAAK,EAAA,CACT,CACH;AACD,UAAU,CAAC,WAAW,GAAG,YAAY;AAErC,MAAM,SAAS,GAAG,KAAK,CAAC,UAAU,CAGhC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,MAC7BA,GAAA,CAAA,IAAA,EAAA,EACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACX,oDAAoD,EACpD,SAAS,CACV,EAAA,GACG,KAAK,EAAA,CACT,CACH;AACD,SAAS,CAAC,WAAW,GAAG,WAAW;AAEnC,MAAM,eAAe,GAAG,KAAK,CAAC,UAAU,CAGtC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,MAC7BA,GAAA,CAAA,GAAA,EAAA,EACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,uBAAuB,EAAE,SAAS,CAAC,EAAA,GAC7C,KAAK,EAAA,CACT,CACH;AACD,eAAe,CAAC,WAAW,GAAG,iBAAiB;AAE/C,MAAM,WAAW,GAAG,KAAK,CAAC,UAAU,CAGlC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,MAC7BA,GAAA,CAAA,KAAA,EAAA,EAAK,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC,EAAA,GAAM,KAAK,EAAA,CAAI,CACnE;AACD,WAAW,CAAC,WAAW,GAAG,aAAa;AAEvC,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,CAGjC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,MAC7BA,GAAA,CAAA,KAAA,EAAA,EACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,4BAA4B,EAAE,SAAS,CAAC,EAAA,GAClD,KAAK,EAAA,CACT,CACH;AACD,UAAU,CAAC,WAAW,GAAG,YAAY;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { cva } from 'class-variance-authority';
|
|
4
4
|
import { cn } from '../../utils/cn.js';
|
|
@@ -17,7 +17,7 @@ const checkboxVariants = cva("peer h-4 w-4 shrink-0 rounded-sm border border-gra
|
|
|
17
17
|
},
|
|
18
18
|
});
|
|
19
19
|
const Checkbox = React.forwardRef(({ className, size, ...props }, ref) => {
|
|
20
|
-
return (
|
|
20
|
+
return (jsxs("div", { className: "relative inline-flex items-center", children: [jsx("input", { type: "checkbox", className: cn(checkboxVariants({ size }), "appearance-none", className), ref: ref, "data-state": props.checked ? "checked" : "unchecked", ...props }), props.checked && (jsx(Check, { className: cn("absolute pointer-events-none text-current", size === "sm" && "h-2 w-2", size === "md" && "h-3 w-3", size === "lg" && "h-4 w-4") }))] }));
|
|
21
21
|
});
|
|
22
22
|
Checkbox.displayName = "Checkbox";
|
|
23
23
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.js","sources":["../../../src/components/Checkbox/Checkbox.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Check } from \"lucide-react\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"../../utils/cn\";\n\nconst checkboxVariants = cva(\n \"peer h-4 w-4 shrink-0 rounded-sm border border-gray-300 ring-offset-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary-600 data-[state=checked]:text-white data-[state=checked]:border-primary-600\",\n {\n variants: {\n size: {\n sm: \"h-3 w-3\",\n md: \"h-4 w-4\",\n lg: \"h-5 w-5\",\n },\n },\n defaultVariants: {\n size: \"md\",\n },\n }\n);\n\nexport interface CheckboxProps\n extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'>,\n VariantProps<typeof checkboxVariants> {}\n\nconst Checkbox = React.forwardRef<HTMLInputElement, CheckboxProps>(\n ({ className, size, ...props }, ref) => {\n return (\n <div className=\"relative inline-flex items-center\">\n <input\n type=\"checkbox\"\n className={cn(checkboxVariants({ size }), \"appearance-none\", className)}\n ref={ref}\n data-state={props.checked ? \"checked\" : \"unchecked\"}\n {...props}\n />\n {props.checked && (\n <Check\n className={cn(\n \"absolute pointer-events-none text-current\",\n size === \"sm\" && \"h-2 w-2\",\n size === \"md\" && \"h-3 w-3\",\n size === \"lg\" && \"h-4 w-4\"\n )}\n />\n )}\n </div>\n );\n }\n);\nCheckbox.displayName = \"Checkbox\";\n\nexport { Checkbox, checkboxVariants };"],"names":["_jsxs","_jsx"],"mappings":";;;;;;AAKA,MAAM,gBAAgB,GAAG,GAAG,CAC1B,kVAAkV,EAClV;AACE,IAAA,QAAQ,EAAE;AACR,QAAA,IAAI,EAAE;AACJ,YAAA,EAAE,EAAE,SAAS;AACb,YAAA,EAAE,EAAE,SAAS;AACb,YAAA,EAAE,EAAE,SAAS;AACd,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,IAAI,EAAE,IAAI;AACX,KAAA;AACF,CAAA;AAOH,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CAC/B,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,KAAI;AACrC,IAAA,QACEA,
|
|
1
|
+
{"version":3,"file":"Checkbox.js","sources":["../../../src/components/Checkbox/Checkbox.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Check } from \"lucide-react\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"../../utils/cn\";\n\nconst checkboxVariants = cva(\n \"peer h-4 w-4 shrink-0 rounded-sm border border-gray-300 ring-offset-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary-600 data-[state=checked]:text-white data-[state=checked]:border-primary-600\",\n {\n variants: {\n size: {\n sm: \"h-3 w-3\",\n md: \"h-4 w-4\",\n lg: \"h-5 w-5\",\n },\n },\n defaultVariants: {\n size: \"md\",\n },\n }\n);\n\nexport interface CheckboxProps\n extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'>,\n VariantProps<typeof checkboxVariants> {}\n\nconst Checkbox = React.forwardRef<HTMLInputElement, CheckboxProps>(\n ({ className, size, ...props }, ref) => {\n return (\n <div className=\"relative inline-flex items-center\">\n <input\n type=\"checkbox\"\n className={cn(checkboxVariants({ size }), \"appearance-none\", className)}\n ref={ref}\n data-state={props.checked ? \"checked\" : \"unchecked\"}\n {...props}\n />\n {props.checked && (\n <Check\n className={cn(\n \"absolute pointer-events-none text-current\",\n size === \"sm\" && \"h-2 w-2\",\n size === \"md\" && \"h-3 w-3\",\n size === \"lg\" && \"h-4 w-4\"\n )}\n />\n )}\n </div>\n );\n }\n);\nCheckbox.displayName = \"Checkbox\";\n\nexport { Checkbox, checkboxVariants };"],"names":["_jsxs","_jsx"],"mappings":";;;;;;AAKA,MAAM,gBAAgB,GAAG,GAAG,CAC1B,kVAAkV,EAClV;AACE,IAAA,QAAQ,EAAE;AACR,QAAA,IAAI,EAAE;AACJ,YAAA,EAAE,EAAE,SAAS;AACb,YAAA,EAAE,EAAE,SAAS;AACb,YAAA,EAAE,EAAE,SAAS;AACd,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,IAAI,EAAE,IAAI;AACX,KAAA;AACF,CAAA;AAOH,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CAC/B,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,KAAI;AACrC,IAAA,QACEA,IAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,mCAAmC,aAChDC,GAAA,CAAA,OAAA,EAAA,EACE,IAAI,EAAC,UAAU,EACf,SAAS,EAAE,EAAE,CAAC,gBAAgB,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,iBAAiB,EAAE,SAAS,CAAC,EACvE,GAAG,EAAE,GAAG,EAAA,YAAA,EACI,KAAK,CAAC,OAAO,GAAG,SAAS,GAAG,WAAW,EAAA,GAC/C,KAAK,EAAA,CACT,EACD,KAAK,CAAC,OAAO,KACZA,GAAA,CAAC,KAAK,IACJ,SAAS,EAAE,EAAE,CACX,2CAA2C,EAC3C,IAAI,KAAK,IAAI,IAAI,SAAS,EAC1B,IAAI,KAAK,IAAI,IAAI,SAAS,EAC1B,IAAI,KAAK,IAAI,IAAI,SAAS,CAC3B,GACD,CACH,CAAA,EAAA,CACG;AAEV,CAAC;AAEH,QAAQ,CAAC,WAAW,GAAG,UAAU;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { useState } from 'react';
|
|
4
4
|
import { cn } from '../../utils/cn.js';
|
|
@@ -45,42 +45,42 @@ import Book from '../../node_modules/lucide-react/dist/esm/icons/book.js';
|
|
|
45
45
|
|
|
46
46
|
// STORY INSPIRED DEMOS:
|
|
47
47
|
function ShowcaseButtonDemo() {
|
|
48
|
-
return (
|
|
48
|
+
return (jsxs("div", { className: "flex flex-wrap items-center gap-4", children: [jsx(Button, { variant: "primary", children: "Primary" }), jsx(Button, { variant: "secondary", children: "Secondary" }), jsx(Button, { variant: "danger", children: "Danger" }), jsx(Button, { variant: "success", children: "Success" }), jsx(Button, { variant: "warning", children: "Warning" }), jsx(Button, { variant: "outline", children: "Outline" }), jsx(Button, { variant: "ghost", children: "Ghost" }), jsx(Button, { variant: "link", children: "Link" })] }));
|
|
49
49
|
}
|
|
50
50
|
function ShowcaseInputDemo() {
|
|
51
51
|
const [v, setV] = React.useState("");
|
|
52
|
-
return (
|
|
52
|
+
return (jsxs("div", { className: "space-y-4 max-w-md", children: [jsx(Input, { placeholder: "Default input", value: v, onChange: e => setV(e.target.value) }), jsx(Input, { placeholder: "Success state", variant: "success" }), jsx(Input, { placeholder: "Error state", variant: "error" }), jsxs("div", { className: "space-y-2", children: [jsx(Input, { placeholder: "Small", inputSize: "sm" }), jsx(Input, { placeholder: "Medium", inputSize: "md" }), jsx(Input, { placeholder: "Large", inputSize: "lg" })] })] }));
|
|
53
53
|
}
|
|
54
54
|
function ShowcaseTextareaDemo() {
|
|
55
55
|
const [tv, setTv] = React.useState("");
|
|
56
|
-
return (
|
|
56
|
+
return (jsxs("div", { className: "space-y-4 max-w-md", children: [jsx(Textarea, { placeholder: "Default textarea", value: tv, onChange: e => setTv(e.target.value) }), jsx(Textarea, { placeholder: "Success state", variant: "success" }), jsx(Textarea, { placeholder: "Error state", variant: "error" }), jsxs("div", { className: "space-y-2", children: [jsx(Textarea, { placeholder: "Small (default)" }), jsx(Textarea, { placeholder: "Disabled", disabled: true })] })] }));
|
|
57
57
|
}
|
|
58
58
|
function ShowcaseSwitchDemo() {
|
|
59
59
|
const [checked, setChecked] = React.useState(false);
|
|
60
|
-
return (
|
|
60
|
+
return (jsxs("div", { className: "space-y-2", children: [jsxs("label", { className: "flex items-center gap-2", children: [jsx(Switch, { checked: checked, onCheckedChange: setChecked }), jsx("span", { children: "Default" })] }), jsxs("label", { className: "flex items-center gap-2", children: [jsx(Switch, { checked: true }), jsx("span", { children: "Checked" })] }), jsxs("label", { className: "flex items-center gap-2", children: [jsx(Switch, { disabled: true }), jsx("span", { children: "Disabled" })] }), jsxs("label", { className: "flex items-center gap-2", children: [jsx(Switch, { size: "sm" }), jsx("span", { children: "Small" })] }), jsxs("label", { className: "flex items-center gap-2", children: [jsx(Switch, { size: "lg" }), jsx("span", { children: "Large" })] })] }));
|
|
61
61
|
}
|
|
62
62
|
function ShowcaseCheckboxDemo() {
|
|
63
63
|
const [checked, setChecked] = React.useState(false);
|
|
64
|
-
return (
|
|
64
|
+
return (jsxs("div", { className: "space-y-2", children: [jsxs("label", { className: "flex items-center gap-2", children: [jsx(Checkbox, { checked: checked, onChange: () => setChecked(!checked) }), " ", jsx("span", { children: "Default" })] }), jsxs("label", { className: "flex items-center gap-2", children: [jsx(Checkbox, { checked: true }), " ", jsx("span", { children: "Checked" })] }), jsxs("label", { className: "flex items-center gap-2", children: [jsx(Checkbox, { disabled: true }), " ", jsx("span", { children: "Disabled" })] }), jsxs("label", { className: "flex items-center gap-2", children: [jsx(Checkbox, { size: "sm" }), " ", jsx("span", { children: "Small" })] }), jsxs("label", { className: "flex items-center gap-2", children: [jsx(Checkbox, { size: "lg" }), " ", jsx("span", { children: "Large" })] })] }));
|
|
65
65
|
}
|
|
66
66
|
function ShowcaseCardDemo() {
|
|
67
|
-
return (
|
|
67
|
+
return (jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [jsxs(Card, { children: [jsx(CardHeader, { children: jsx(CardTitle, { children: "Default Card" }) }), jsx(CardContent, { children: jsx("p", { className: "text-gray-600", children: "This is a default card with standard styling." }) })] }), jsxs(Card, { variant: "elevated", children: [jsx(CardHeader, { children: jsx(CardTitle, { children: "Elevated Card" }) }), jsx(CardContent, { children: jsx("p", { className: "text-gray-600", children: "This card has elevated shadow styling." }) })] })] }));
|
|
68
68
|
}
|
|
69
69
|
function ShowcaseBadgeDemo() {
|
|
70
|
-
return (
|
|
70
|
+
return (jsxs("div", { className: "flex flex-wrap gap-2", children: [jsx(Badge, { children: "Default" }), jsx(Badge, { variant: "secondary", children: "Secondary" }), jsx(Badge, { variant: "success", children: "Success" }), jsx(Badge, { variant: "danger", children: "Danger" }), jsx(Badge, { variant: "warning", children: "Warning" }), jsx(Badge, { variant: "outline", children: "Outline" })] }));
|
|
71
71
|
}
|
|
72
72
|
function ShowcaseAvatarDemo() {
|
|
73
|
-
return (
|
|
73
|
+
return (jsxs("div", { className: "flex gap-4", children: [jsxs(Avatar, { children: [jsx(AvatarImage, { src: "https://randomuser.me/api/portraits/men/32.jpg" }), jsx(AvatarFallback, { children: "AB" })] }), jsxs(Avatar, { children: [jsx(AvatarImage, { src: "" }), jsx(AvatarFallback, { children: "CD" })] }), jsxs(Avatar, { children: [jsx(AvatarImage, { src: "https://randomuser.me/api/portraits/women/44.jpg" }), jsx(AvatarFallback, { children: "EF" })] })] }));
|
|
74
74
|
}
|
|
75
75
|
function ShowcaseModalDemo() {
|
|
76
76
|
const [open, setOpen] = React.useState(false);
|
|
77
|
-
return (
|
|
77
|
+
return (jsxs("div", { children: [jsx(Button, { onClick: () => setOpen(true), children: "Show Modal" }), jsxs(Modal, { open: open, onOpenChange: setOpen, children: [jsx(ModalHeader, { children: jsx(ModalTitle, { children: "Demo Modal" }) }), jsx(ModalContent, { children: jsx("p", { children: "This is a basic modal dialog." }) }), jsx(ModalFooter, { children: jsx(Button, { variant: "primary", onClick: () => setOpen(false), children: "Close" }) })] })] }));
|
|
78
78
|
}
|
|
79
79
|
function ShowcaseToastDemo() {
|
|
80
|
-
return (
|
|
80
|
+
return (jsxs(Fragment, { children: [jsx(Button, { onClick: () => showToast.success("This is a toast notification!"), children: "Show Toast" }), jsx(Toast, {})] }));
|
|
81
81
|
}
|
|
82
82
|
function ShowcaseSpinnerDemo() {
|
|
83
|
-
return (
|
|
83
|
+
return (jsxs("div", { className: "space-y-4", children: [jsx(Spinner, {}), jsxs("div", { className: "flex gap-2 items-center", children: [jsx(Spinner, {}), " ", jsx("span", { children: "Loading data..." })] }), jsxs(Button, { variant: "primary", disabled: true, children: [jsx(Spinner, { className: "mr-2 h-4 w-4" }), " Processing"] })] }));
|
|
84
84
|
}
|
|
85
85
|
const showcasePreviewMap = {
|
|
86
86
|
button: ShowcaseButtonDemo,
|
|
@@ -98,54 +98,54 @@ const showcasePreviewMap = {
|
|
|
98
98
|
toast: ShowcaseToastDemo,
|
|
99
99
|
spinner: ShowcaseSpinnerDemo,
|
|
100
100
|
skeleton: function ShowcaseSkeletonDemo() {
|
|
101
|
-
return (
|
|
101
|
+
return (jsxs("div", { className: "space-y-4 max-w-md", children: [jsx(Skeleton, { className: "h-8 w-1/2" }), jsx(Skeleton, { className: "h-4 w-3/4" }), jsxs("div", { className: "flex gap-2", children: [jsx(Skeleton, { className: "h-8 w-8 rounded-full" }), jsx(Skeleton, { className: "h-8 w-32" })] }), jsx(Skeleton, { className: "h-24 w-full" })] }));
|
|
102
102
|
},
|
|
103
103
|
navbar: function ShowcaseNavbarDemo() {
|
|
104
|
-
return (
|
|
104
|
+
return (jsx(Navbar, { children: jsxs("div", { className: "flex w-full items-center justify-between px-4", children: [jsx("span", { className: "font-semibold text-lg", children: "Beyond UI" }), jsxs("nav", { className: "flex gap-4 ml-auto", children: [jsx("a", { href: "#", className: "text-blue-500", children: "Home" }), jsx("a", { href: "#", className: "text-blue-500", children: "Features" }), jsx("a", { href: "#", className: "text-blue-500", children: "Pricing" })] }), jsx("div", { className: "ml-6", children: jsx("button", { className: "rounded bg-primary-600 text-white px-3 py-1 text-sm", children: "Profile" }) })] }) }));
|
|
105
105
|
},
|
|
106
106
|
sidebar: function ShowcaseSidebarDemo() {
|
|
107
107
|
const menuItems = [
|
|
108
|
-
{ id: "dashboard", label: "Dashboard", icon:
|
|
109
|
-
{ id: "settings", label: "Settings", icon:
|
|
110
|
-
{ id: "profile", label: "Profile", icon:
|
|
108
|
+
{ id: "dashboard", label: "Dashboard", icon: jsx(BarChart3, { className: "h-5 w-5" }) },
|
|
109
|
+
{ id: "settings", label: "Settings", icon: jsx(Settings, { className: "h-5 w-5" }) },
|
|
110
|
+
{ id: "profile", label: "Profile", icon: jsx(User, { className: "h-5 w-5" }) }
|
|
111
111
|
];
|
|
112
112
|
// Override Sidebar's fixed class for preview
|
|
113
|
-
return (
|
|
113
|
+
return (jsx("div", { className: "w-[260px] h-[480px] bg-white border rounded overflow-auto flex items-stretch", children: jsx(Sidebar, { menuItems: menuItems, className: "static relative w-full h-full border-none shadow-none" }) }));
|
|
114
114
|
},
|
|
115
115
|
"dashboard-grid": function ShowcaseDashboardGridDemo() {
|
|
116
|
-
return (
|
|
116
|
+
return (jsxs(DashboardGrid, { children: [jsx("div", { className: "p-4 bg-white rounded shadow", children: "Widget 1" }), jsx("div", { className: "p-4 bg-white rounded shadow", children: "Widget 2" }), jsx("div", { className: "p-4 bg-white rounded shadow", children: "Widget 3" }), jsx("div", { className: "p-4 bg-white rounded shadow", children: "Widget 4" })] }));
|
|
117
117
|
},
|
|
118
118
|
"dashboard-header": function ShowcaseDashboardHeaderDemo() {
|
|
119
|
-
return (
|
|
119
|
+
return (jsxs("div", { className: "flex justify-between items-center py-4 border-b", children: [jsxs("div", { children: [jsx("h2", { className: "text-xl font-semibold", children: "Dashboard" }), jsx("span", { className: "text-gray-500 text-sm", children: "Insights & analytics" })] }), jsx(Button, { variant: "outline", children: "Settings" })] }));
|
|
120
120
|
},
|
|
121
121
|
"dashboard-layout": function ShowcaseDashboardLayoutDemo() {
|
|
122
122
|
const sidebarMenuItems = [
|
|
123
|
-
{ id: "dashboard", label: "Dashboard", icon:
|
|
124
|
-
{ id: "users", label: "Users", icon:
|
|
125
|
-
{ id: "settings", label: "Settings", icon:
|
|
123
|
+
{ id: "dashboard", label: "Dashboard", icon: jsx(BarChart3, { className: "h-4 w-4" }) },
|
|
124
|
+
{ id: "users", label: "Users", icon: jsx(User, { className: "h-4 w-4" }) },
|
|
125
|
+
{ id: "settings", label: "Settings", icon: jsx(Settings, { className: "h-4 w-4" }) },
|
|
126
126
|
];
|
|
127
127
|
// Contain DashboardLayout for preview: override min-h-screen, sizing
|
|
128
|
-
return (
|
|
128
|
+
return (jsx("div", { className: "w-[600px] h-[480px] bg-white border rounded overflow-auto flex items-stretch", children: jsx(DashboardLayout, { sidebarMenuItems: sidebarMenuItems, className: "relative w-full min-h-0 h-full", sidebarClassName: "static relative w-full h-full border-none shadow-none", disableSidebarMargin: true, children: jsxs("div", { className: "p-6 h-full", children: [jsx("h2", { className: "text-lg font-semibold mb-2", children: "Welcome to DashboardLayout" }), jsx("p", { className: "mb-4 text-gray-600", children: "Main content appears here. The sidebar and header are real reusable components." }), jsx(Button, { variant: "primary", children: "Dashboard Action" })] }) }) }));
|
|
129
129
|
},
|
|
130
130
|
datatable: DataTableShowcase,
|
|
131
131
|
};
|
|
132
132
|
function ShowcaseAlertDemo() {
|
|
133
|
-
return (
|
|
133
|
+
return (jsxs("div", { className: "space-y-4", children: [jsxs(Alert, { variant: "info", children: [jsx(AlertTitle, { children: "Information" }), jsx(AlertDescription, { children: "This is an informational alert message." })] }), jsxs(Alert, { variant: "success", children: [jsx(AlertTitle, { children: "Success" }), jsx(AlertDescription, { children: "Operation completed successfully!" })] }), jsxs(Alert, { variant: "warning", children: [jsx(AlertTitle, { children: "Warning" }), jsx(AlertDescription, { children: "Please review your input before proceeding." })] }), jsxs(Alert, { variant: "danger", children: [jsx(AlertTitle, { children: "Error" }), jsx(AlertDescription, { children: "Something went wrong. Please try again." })] })] }));
|
|
134
134
|
}
|
|
135
135
|
function ShowcaseStatsCardDemo() {
|
|
136
|
-
return (
|
|
136
|
+
return (jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [jsx(StatsCard, { title: "Total Users", value: "2,543", trend: {
|
|
137
137
|
direction: "up",
|
|
138
138
|
value: "+12%",
|
|
139
139
|
label: "from last month"
|
|
140
|
-
}, icon:
|
|
140
|
+
}, icon: jsx(BarChart3, { className: "h-6 w-6 text-primary-600" }) }), jsx(StatsCard, { variant: "gradient", color: "success", title: "Revenue", value: "$45,231", trend: {
|
|
141
141
|
direction: "up",
|
|
142
142
|
value: "+8.2%",
|
|
143
143
|
label: "from last month"
|
|
144
|
-
}, icon:
|
|
144
|
+
}, icon: jsx(BarChart3, { className: "h-6 w-6" }) })] }));
|
|
145
145
|
}
|
|
146
146
|
function ShowcaseTabsDemo() {
|
|
147
147
|
const [activeTab, setActiveTab] = React.useState("tab-1");
|
|
148
|
-
return (
|
|
148
|
+
return (jsxs(Tabs, { value: activeTab, onValueChange: setActiveTab, children: [jsxs(TabsList, { children: [jsx(TabsTrigger, { value: "tab-1", children: "Tab One" }), jsx(TabsTrigger, { value: "tab-2", children: "Tab Two" }), jsx(TabsTrigger, { value: "tab-3", children: "Tab Three" })] }), jsx(TabsContent, { value: "tab-1", children: jsx("span", { className: "block p-4", children: "Content for Tab One" }) }), jsx(TabsContent, { value: "tab-2", children: jsx("span", { className: "block p-4", children: "Content for Tab Two" }) }), jsx(TabsContent, { value: "tab-3", children: jsx("span", { className: "block p-4", children: "Content for Tab Three" }) })] }));
|
|
149
149
|
}
|
|
150
150
|
Object.assign(showcasePreviewMap, {
|
|
151
151
|
alert: ShowcaseAlertDemo,
|
|
@@ -155,7 +155,7 @@ Object.assign(showcasePreviewMap, {
|
|
|
155
155
|
// Component categories and their items
|
|
156
156
|
const componentCategories = {
|
|
157
157
|
"Forms": {
|
|
158
|
-
icon:
|
|
158
|
+
icon: jsx(MousePointer, { className: "h-4 w-4" }),
|
|
159
159
|
components: [
|
|
160
160
|
{ name: "Button", id: "button" },
|
|
161
161
|
{ name: "Input", id: "input" },
|
|
@@ -165,7 +165,7 @@ const componentCategories = {
|
|
|
165
165
|
]
|
|
166
166
|
},
|
|
167
167
|
"Data Display": {
|
|
168
|
-
icon:
|
|
168
|
+
icon: jsx(BarChart3, { className: "h-4 w-4" }),
|
|
169
169
|
components: [
|
|
170
170
|
{ name: "Card", id: "card" },
|
|
171
171
|
{ name: "Badge", id: "badge" },
|
|
@@ -176,7 +176,7 @@ const componentCategories = {
|
|
|
176
176
|
]
|
|
177
177
|
},
|
|
178
178
|
"Feedback": {
|
|
179
|
-
icon:
|
|
179
|
+
icon: jsx(AlertCircle, { className: "h-4 w-4" }),
|
|
180
180
|
components: [
|
|
181
181
|
{ name: "Alert", id: "alert" },
|
|
182
182
|
{ name: "Toast", id: "toast" },
|
|
@@ -186,7 +186,7 @@ const componentCategories = {
|
|
|
186
186
|
]
|
|
187
187
|
},
|
|
188
188
|
"Layout": {
|
|
189
|
-
icon:
|
|
189
|
+
icon: jsx(PanelsTopLeft, { className: "h-4 w-4" }),
|
|
190
190
|
components: [
|
|
191
191
|
{ name: "DashboardLayout", id: "dashboard-layout" },
|
|
192
192
|
{ name: "DashboardGrid", id: "dashboard-grid" },
|
|
@@ -376,7 +376,7 @@ const componentDocs = {
|
|
|
376
376
|
props: [
|
|
377
377
|
{ name: "variant", type: "string", default: "default", description: "Alert type variant" },
|
|
378
378
|
],
|
|
379
|
-
component: (
|
|
379
|
+
component: (jsxs("div", { className: "space-y-4", children: [jsxs(Alert, { variant: "info", children: [jsx(AlertTitle, { children: "Information" }), jsx(AlertDescription, { children: "This is an informational alert message." })] }), jsxs(Alert, { variant: "success", children: [jsx(AlertTitle, { children: "Success" }), jsx(AlertDescription, { children: "Operation completed successfully!" })] }), jsxs(Alert, { variant: "warning", children: [jsx(AlertTitle, { children: "Warning" }), jsx(AlertDescription, { children: "Please review your input before proceeding." })] }), jsxs(Alert, { variant: "danger", children: [jsx(AlertTitle, { children: "Error" }), jsx(AlertDescription, { children: "Something went wrong. Please try again." })] })] }))
|
|
380
380
|
},
|
|
381
381
|
statscard: {
|
|
382
382
|
name: "StatsCard",
|
|
@@ -397,15 +397,15 @@ const componentDocs = {
|
|
|
397
397
|
{ name: "trend", type: "object", description: "Trend information" },
|
|
398
398
|
{ name: "icon", type: "ReactNode", description: "Icon to display" },
|
|
399
399
|
],
|
|
400
|
-
component: (
|
|
400
|
+
component: (jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [jsx(StatsCard, { title: "Total Users", value: "2,543", trend: {
|
|
401
401
|
direction: "up",
|
|
402
402
|
value: "+12%",
|
|
403
403
|
label: "from last month"
|
|
404
|
-
}, icon:
|
|
404
|
+
}, icon: jsx(BarChart3, { className: "h-6 w-6 text-primary-600" }) }), jsx(StatsCard, { variant: "gradient", color: "success", title: "Revenue", value: "$45,231", trend: {
|
|
405
405
|
direction: "up",
|
|
406
406
|
value: "+8.2%",
|
|
407
407
|
label: "from last month"
|
|
408
|
-
}, icon:
|
|
408
|
+
}, icon: jsx(BarChart3, { className: "h-6 w-6" }) })] }))
|
|
409
409
|
},
|
|
410
410
|
"dashboard-layout": {
|
|
411
411
|
name: "DashboardLayout",
|
|
@@ -448,7 +448,7 @@ const componentDocs = {
|
|
|
448
448
|
{ name: "size", type: `"small" | "middle" | "large"`, default: "middle", description: "Table size" },
|
|
449
449
|
{ name: "bordered", type: "boolean", default: "false", description: "Show borders" },
|
|
450
450
|
],
|
|
451
|
-
component:
|
|
451
|
+
component: jsx(DataTableShowcase, {})
|
|
452
452
|
},
|
|
453
453
|
"dashboard-grid": {
|
|
454
454
|
name: "DashboardGrid",
|
|
@@ -529,11 +529,11 @@ const ComponentShowcase = ({ className }) => {
|
|
|
529
529
|
default: return "w-full";
|
|
530
530
|
}
|
|
531
531
|
};
|
|
532
|
-
return (
|
|
532
|
+
return (jsxs("div", { className: cn("flex h-screen bg-gray-50", className), children: [jsx(Toast, {}), jsxs("div", { className: cn("bg-white border-r border-gray-200 transition-all duration-300 flex flex-col", sidebarCollapsed ? "w-16" : "w-80"), children: [jsxs("div", { className: "p-4 border-b border-gray-200", children: [!sidebarCollapsed && (jsxs("div", { className: "flex items-center justify-between mb-4", children: [jsxs("div", { className: "flex items-center space-x-2", children: [jsx("div", { className: "w-8 h-8 bg-primary-600 rounded-lg flex items-center justify-center", children: jsx(Palette, { className: "h-4 w-4 text-white" }) }), jsx("span", { className: "font-bold text-lg text-gray-900", children: "Beyond UI" })] }), jsx(Button, { variant: "ghost", size: "sm", onClick: () => setSidebarCollapsed(true), children: jsx(ChevronRight, { className: "h-4 w-4" }) })] })), sidebarCollapsed && (jsx("div", { className: "flex justify-center", children: jsx(Button, { variant: "ghost", size: "sm", onClick: () => setSidebarCollapsed(false), children: jsx(Palette, { className: "h-4 w-4" }) }) })), !sidebarCollapsed && (jsxs("div", { className: "relative", children: [jsx(Search, { className: "absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-gray-400" }), jsx(Input, { placeholder: "Search components...", value: searchQuery, onChange: (e) => setSearchQuery(e.target.value), className: "pl-10" })] }))] }), jsx("nav", { className: "flex-1 p-4 overflow-y-auto", children: Object.entries(filteredCategories).map(([categoryName, categoryData]) => (jsxs("div", { className: "mb-4", children: [jsxs("button", { onClick: () => !sidebarCollapsed && toggleCategory(categoryName), className: cn("flex items-center w-full p-2 text-sm font-medium rounded-lg transition-colors", "hover:bg-gray-100 text-gray-700", sidebarCollapsed ? "justify-center" : "justify-between"), children: [jsxs("div", { className: "flex items-center space-x-2", children: [categoryData.icon, !sidebarCollapsed && jsx("span", { children: categoryName })] }), !sidebarCollapsed && (jsx(ChevronDown, { className: cn("h-4 w-4 transition-transform", expandedCategories.includes(categoryName) && "rotate-180") }))] }), !sidebarCollapsed && expandedCategories.includes(categoryName) && (jsx("div", { className: "mt-2 ml-6 space-y-1", children: categoryData.components.map((component) => (jsx("button", { onClick: () => setSelectedComponent(component.id), className: cn("flex items-center w-full p-2 text-sm rounded-lg transition-colors", selectedComponent === component.id
|
|
533
533
|
? "bg-primary-50 text-primary-700 border-r-2 border-primary-600"
|
|
534
|
-
: "text-gray-600 hover:bg-gray-50 hover:text-gray-900"), children: component.name }, component.id))) }))] }, categoryName))) })] }),
|
|
534
|
+
: "text-gray-600 hover:bg-gray-50 hover:text-gray-900"), children: component.name }, component.id))) }))] }, categoryName))) })] }), jsxs("div", { className: "flex-1 flex flex-col overflow-hidden", children: [jsx("header", { className: "bg-white border-b border-gray-200 p-4", children: jsxs("div", { className: "flex items-center justify-between", children: [jsxs("div", { className: "flex items-center space-x-4", children: [jsx("h1", { className: "text-2xl font-bold text-gray-900", children: currentDoc?.name || "Component Showcase" }), currentDoc && (jsx(Badge, { variant: "outline", children: currentDoc.name }))] }), jsxs("div", { className: "flex items-center space-x-2", children: [jsxs("div", { className: "flex items-center bg-gray-100 rounded-lg p-1", children: [jsx(Button, { variant: viewMode === "desktop" ? "primary" : "ghost", size: "sm", onClick: () => setViewMode("desktop"), children: jsx(Monitor, { className: "h-4 w-4" }) }), jsx(Button, { variant: viewMode === "tablet" ? "primary" : "ghost", size: "sm", onClick: () => setViewMode("tablet"), children: jsx(Tablet, { className: "h-4 w-4" }) }), jsx(Button, { variant: viewMode === "mobile" ? "primary" : "ghost", size: "sm", onClick: () => setViewMode("mobile"), children: jsx(Smartphone, { className: "h-4 w-4" }) })] }), jsx(Button, { variant: "ghost", size: "sm", onClick: () => setDarkMode(!darkMode), children: darkMode ? jsx(Sun, { className: "h-4 w-4" }) : jsx(Moon, { className: "h-4 w-4" }) })] })] }) }), jsx("main", { className: "flex-1 overflow-auto p-6", children: currentDoc ? (jsxs("div", { className: "max-w-6xl mx-auto space-y-8", children: [jsx("div", { children: jsx("p", { className: "text-lg text-gray-600", children: currentDoc.description }) }), jsxs(Tabs, { value: "preview", onValueChange: () => { }, children: [jsxs(TabsList, { children: [jsxs(TabsTrigger, { value: "preview", children: [jsx(Eye, { className: "h-4 w-4 mr-2" }), "Preview"] }), jsxs(TabsTrigger, { value: "code", children: [jsx(Code, { className: "h-4 w-4 mr-2" }), "Code"] }), jsxs(TabsTrigger, { value: "props", children: [jsx(Settings, { className: "h-4 w-4 mr-2" }), "Props"] })] }), jsx(TabsContent, { value: "preview", className: "mt-6", children: jsx(Card, { children: jsx(CardContent, { className: "p-8", children: jsx("div", { className: cn("mx-auto transition-all duration-300", getViewportClass()), children: jsx("div", { className: cn(darkMode && "dark"), children: showcasePreviewMap[selectedComponent]
|
|
535
535
|
? React.createElement(showcasePreviewMap[selectedComponent])
|
|
536
|
-
: null }) }) }) }) }),
|
|
536
|
+
: null }) }) }) }) }), jsx(TabsContent, { value: "code", className: "mt-6", children: jsxs(Card, { children: [jsxs(CardHeader, { className: "flex flex-row items-center justify-between", children: [jsx(CardTitle, { className: "text-lg", children: "Usage Example" }), jsxs(Button, { variant: "outline", size: "sm", onClick: () => copyToClipboard(currentDoc.example), children: [copiedCode === currentDoc.example ? (jsx(Check, { className: "h-4 w-4 mr-2" })) : (jsx(Copy, { className: "h-4 w-4 mr-2" })), "Copy"] })] }), jsx(CardContent, { children: jsx("pre", { className: "bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto", children: jsx("code", { children: currentDoc.example }) }) })] }) }), jsx(TabsContent, { value: "props", className: "mt-6", children: jsxs(Card, { children: [jsx(CardHeader, { children: jsx(CardTitle, { className: "text-lg", children: "Component Props" }) }), jsx(CardContent, { children: jsx("div", { className: "overflow-x-auto", children: jsxs("table", { className: "w-full border-collapse", children: [jsx("thead", { children: jsxs("tr", { className: "border-b border-gray-200", children: [jsx("th", { className: "text-left p-3 font-medium text-gray-900", children: "Prop" }), jsx("th", { className: "text-left p-3 font-medium text-gray-900", children: "Type" }), jsx("th", { className: "text-left p-3 font-medium text-gray-900", children: "Default" }), jsx("th", { className: "text-left p-3 font-medium text-gray-900", children: "Description" })] }) }), jsx("tbody", { children: currentDoc.props?.map((prop, index) => (jsxs("tr", { className: "border-b border-gray-100", children: [jsxs("td", { className: "p-3", children: [jsx("code", { className: "bg-gray-100 px-2 py-1 rounded text-sm", children: prop.name }), ("required" in prop && prop.required) && (jsx(Badge, { variant: "danger", className: "ml-2 text-xs", children: "Required" }))] }), jsx("td", { className: "p-3 text-gray-600", children: prop.type }), jsx("td", { className: "p-3 text-gray-600", children: ("default" in prop && prop.default) ? (jsx("code", { className: "bg-gray-100 px-2 py-1 rounded text-sm", children: prop.default })) : null }), jsx("td", { className: "p-3 text-gray-600", children: prop.description })] }, index))) })] }) }) })] }) })] })] })) : (jsx("div", { className: "flex items-center justify-center h-full", children: jsxs("div", { className: "text-center", children: [jsx(Book, { className: "h-16 w-16 text-gray-400 mx-auto mb-4" }), jsx("h2", { className: "text-xl font-semibold text-gray-900 mb-2", children: "Select a Component" }), jsx("p", { className: "text-gray-600", children: "Choose a component from the sidebar to view its documentation and examples." })] }) })) })] })] }));
|
|
537
537
|
};
|
|
538
538
|
|
|
539
539
|
export { ComponentShowcase };
|