@banhosdev/moldsoft-ui 0.1.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,21 +1,34 @@
1
1
  import * as class_variance_authority_types from 'class-variance-authority/types';
2
- import * as React from 'react';
2
+ import * as React$1 from 'react';
3
3
  import { VariantProps } from 'class-variance-authority';
4
+ import * as react_jsx_runtime from 'react/jsx-runtime';
4
5
 
5
6
  declare const buttonVariants: (props?: ({
6
7
  variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
7
8
  size?: "default" | "sm" | "lg" | "icon" | null | undefined;
8
9
  } & class_variance_authority_types.ClassProp) | undefined) => string;
9
- interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
10
+ interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
10
11
  asChild?: boolean;
11
12
  }
12
- declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
13
+ declare const Button: React$1.ForwardRefExoticComponent<ButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
13
14
 
14
- declare const Card: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
15
- declare const CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
16
- declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
17
- declare const CardDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
18
- declare const CardContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
19
- declare const CardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
15
+ declare const Card: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
16
+ declare const CardHeader: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
17
+ declare const CardTitle: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
18
+ declare const CardDescription: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
19
+ declare const CardContent: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
20
+ declare const CardFooter: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
20
21
 
21
- export { Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, buttonVariants };
22
+ interface SidebarProps {
23
+ children?: React.ReactNode;
24
+ className?: string;
25
+ items: SidebarItem[];
26
+ }
27
+ interface SidebarItem {
28
+ label: string;
29
+ href: string;
30
+ icon: React.ReactNode;
31
+ }
32
+ declare function Sidebar({ children, items }: SidebarProps): react_jsx_runtime.JSX.Element;
33
+
34
+ export { Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Sidebar, type SidebarItem, type SidebarProps, buttonVariants };
package/dist/index.d.ts CHANGED
@@ -1,21 +1,34 @@
1
1
  import * as class_variance_authority_types from 'class-variance-authority/types';
2
- import * as React from 'react';
2
+ import * as React$1 from 'react';
3
3
  import { VariantProps } from 'class-variance-authority';
4
+ import * as react_jsx_runtime from 'react/jsx-runtime';
4
5
 
5
6
  declare const buttonVariants: (props?: ({
6
7
  variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
7
8
  size?: "default" | "sm" | "lg" | "icon" | null | undefined;
8
9
  } & class_variance_authority_types.ClassProp) | undefined) => string;
9
- interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
10
+ interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
10
11
  asChild?: boolean;
11
12
  }
12
- declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
13
+ declare const Button: React$1.ForwardRefExoticComponent<ButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
13
14
 
14
- declare const Card: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
15
- declare const CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
16
- declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
17
- declare const CardDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
18
- declare const CardContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
19
- declare const CardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
15
+ declare const Card: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
16
+ declare const CardHeader: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
17
+ declare const CardTitle: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
18
+ declare const CardDescription: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
19
+ declare const CardContent: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
20
+ declare const CardFooter: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
20
21
 
21
- export { Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, buttonVariants };
22
+ interface SidebarProps {
23
+ children?: React.ReactNode;
24
+ className?: string;
25
+ items: SidebarItem[];
26
+ }
27
+ interface SidebarItem {
28
+ label: string;
29
+ href: string;
30
+ icon: React.ReactNode;
31
+ }
32
+ declare function Sidebar({ children, items }: SidebarProps): react_jsx_runtime.JSX.Element;
33
+
34
+ export { Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Sidebar, type SidebarItem, type SidebarProps, buttonVariants };
package/dist/index.js CHANGED
@@ -37,6 +37,7 @@ __export(index_exports, {
37
37
  CardFooter: () => CardFooter,
38
38
  CardHeader: () => CardHeader,
39
39
  CardTitle: () => CardTitle,
40
+ Sidebar: () => Sidebar,
40
41
  buttonVariants: () => buttonVariants
41
42
  });
42
43
  module.exports = __toCommonJS(index_exports);
@@ -151,6 +152,15 @@ var CardFooter = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE_
151
152
  }
152
153
  ));
153
154
  CardFooter.displayName = "CardFooter";
155
+
156
+ // src/components/app/sidebar.tsx
157
+ var import_jsx_runtime3 = require("react/jsx-runtime");
158
+ function Sidebar({ children, items = [] }) {
159
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("aside", { className: "w-full h-full p-4", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("main", { className: "bg-primary rounded-3xl h-full", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "p-4", children: [
160
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h1", { children: "Sidebar" }),
161
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("ul", { children: items?.map((item) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("a", { href: item.href, children: item.label }) }, item.href)) })
162
+ ] }) }) });
163
+ }
154
164
  // Annotate the CommonJS export names for ESM import in node:
155
165
  0 && (module.exports = {
156
166
  Button,
@@ -160,5 +170,6 @@ CardFooter.displayName = "CardFooter";
160
170
  CardFooter,
161
171
  CardHeader,
162
172
  CardTitle,
173
+ Sidebar,
163
174
  buttonVariants
164
175
  });
package/dist/index.mjs CHANGED
@@ -108,6 +108,15 @@ var CardFooter = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE_
108
108
  }
109
109
  ));
110
110
  CardFooter.displayName = "CardFooter";
111
+
112
+ // src/components/app/sidebar.tsx
113
+ import { jsx as jsx3, jsxs } from "react/jsx-runtime";
114
+ function Sidebar({ children, items = [] }) {
115
+ return /* @__PURE__ */ jsx3("aside", { className: "w-full h-full p-4", children: /* @__PURE__ */ jsx3("main", { className: "bg-primary rounded-3xl h-full", children: /* @__PURE__ */ jsxs("div", { className: "p-4", children: [
116
+ /* @__PURE__ */ jsx3("h1", { children: "Sidebar" }),
117
+ /* @__PURE__ */ jsx3("ul", { children: items?.map((item) => /* @__PURE__ */ jsx3("li", { children: /* @__PURE__ */ jsx3("a", { href: item.href, children: item.label }) }, item.href)) })
118
+ ] }) }) });
119
+ }
111
120
  export {
112
121
  Button,
113
122
  Card,
@@ -116,5 +125,6 @@ export {
116
125
  CardFooter,
117
126
  CardHeader,
118
127
  CardTitle,
128
+ Sidebar,
119
129
  buttonVariants
120
130
  };
package/package.json CHANGED
@@ -1,9 +1,22 @@
1
1
  {
2
2
  "name": "@banhosdev/moldsoft-ui",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
4
  "private": false,
5
- "main": "./src/index.ts",
6
- "types": "./src/index.ts",
5
+ "main": "./dist/index.js",
6
+ "module": "./dist/index.mjs",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.mjs",
12
+ "require": "./dist/index.js"
13
+ },
14
+ "./styles": "./src/styles/globals.css"
15
+ },
16
+ "files": [
17
+ "dist",
18
+ "src/styles/globals.css"
19
+ ],
7
20
  "scripts": {
8
21
  "build": "tsup src/index.ts --format cjs,esm --dts",
9
22
  "dev": "tsup src/index.ts --format cjs,esm --watch --dts",
@@ -14,10 +27,12 @@
14
27
  "class-variance-authority": "^0.7.0",
15
28
  "clsx": "^2.1.1",
16
29
  "lucide-react": "^0.454.0",
17
- "react": "19.2.3",
18
- "react-dom": "19.2.3",
19
30
  "tailwind-merge": "^2.5.4"
20
31
  },
32
+ "peerDependencies": {
33
+ "react": "^18.0.0 || ^19.0.0",
34
+ "react-dom": "^18.0.0 || ^19.0.0"
35
+ },
21
36
  "devDependencies": {
22
37
  "@tailwindcss/postcss": "4",
23
38
  "@types/react": "^19",
@@ -48,7 +48,7 @@
48
48
  --card-foreground: 0 0% 3.9%;
49
49
  --popover: 0 0% 100%;
50
50
  --popover-foreground: 0 0% 3.9%;
51
- --primary: 0 0% 9%;
51
+ --primary: 221.2 83.2% 53.3%;
52
52
  --primary-foreground: 0 0% 98%;
53
53
  --secondary: 0 0% 96.1%;
54
54
  --secondary-foreground: 0 0% 9%;
@@ -68,6 +68,7 @@
68
68
  --chart-5: 27 87% 67%;
69
69
  --radius: 0.5rem;
70
70
  }
71
+
71
72
  .dark {
72
73
  --background: 0 0% 3.9%;
73
74
  --foreground: 0 0% 98%;
@@ -100,6 +101,7 @@
100
101
  * {
101
102
  @apply border-border outline-ring/50;
102
103
  }
104
+
103
105
  body {
104
106
  background-color: hsl(var(--background));
105
107
  color: hsl(var(--foreground));
package/components.json DELETED
@@ -1,21 +0,0 @@
1
- {
2
- "$schema": "https://ui.shadcn.com/schema.json",
3
- "style": "default",
4
- "rsc": false,
5
- "tsx": true,
6
- "tailwind": {
7
- "config": "",
8
- "css": "src/styles/globals.css",
9
- "baseColor": "slate",
10
- "cssVariables": true,
11
- "prefix": ""
12
- },
13
- "aliases": {
14
- "components": "@/components",
15
- "utils": "@/lib/utils",
16
- "ui": "@/components/ui",
17
- "lib": "@/lib",
18
- "hooks": "@/hooks"
19
- },
20
- "iconLibrary": "lucide"
21
- }
@@ -1,56 +0,0 @@
1
- import * as React from "react"
2
- import { Slot } from "@radix-ui/react-slot"
3
- import { cva, type VariantProps } from "class-variance-authority"
4
-
5
- import { cn } from "../../lib/utils"
6
-
7
- const buttonVariants = cva(
8
- "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
9
- {
10
- variants: {
11
- variant: {
12
- default: "bg-primary text-primary-foreground hover:bg-primary/90",
13
- destructive:
14
- "bg-destructive text-destructive-foreground hover:bg-destructive/90",
15
- outline:
16
- "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
17
- secondary:
18
- "bg-secondary text-secondary-foreground hover:bg-secondary/80",
19
- ghost: "hover:bg-accent hover:text-accent-foreground",
20
- link: "text-primary underline-offset-4 hover:underline",
21
- },
22
- size: {
23
- default: "h-10 px-4 py-2",
24
- sm: "h-9 rounded-md px-3",
25
- lg: "h-11 rounded-md px-8",
26
- icon: "h-10 w-10",
27
- },
28
- },
29
- defaultVariants: {
30
- variant: "default",
31
- size: "default",
32
- },
33
- }
34
- )
35
-
36
- export interface ButtonProps
37
- extends React.ButtonHTMLAttributes<HTMLButtonElement>,
38
- VariantProps<typeof buttonVariants> {
39
- asChild?: boolean
40
- }
41
-
42
- const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
43
- ({ className, variant, size, asChild = false, ...props }, ref) => {
44
- const Comp = asChild ? Slot : "button"
45
- return (
46
- <Comp
47
- className={cn(buttonVariants({ variant, size, className }))}
48
- ref={ref}
49
- {...props}
50
- />
51
- )
52
- }
53
- )
54
- Button.displayName = "Button"
55
-
56
- export { Button, buttonVariants }
@@ -1,79 +0,0 @@
1
- import * as React from "react"
2
-
3
- import { cn } from "../../lib/utils"
4
-
5
- const Card = React.forwardRef<
6
- HTMLDivElement,
7
- React.HTMLAttributes<HTMLDivElement>
8
- >(({ className, ...props }, ref) => (
9
- <div
10
- ref={ref}
11
- className={cn(
12
- "rounded-lg border bg-card text-card-foreground shadow-sm",
13
- className
14
- )}
15
- {...props}
16
- />
17
- ))
18
- Card.displayName = "Card"
19
-
20
- const CardHeader = React.forwardRef<
21
- HTMLDivElement,
22
- React.HTMLAttributes<HTMLDivElement>
23
- >(({ className, ...props }, ref) => (
24
- <div
25
- ref={ref}
26
- className={cn("flex flex-col space-y-1.5 p-6", className)}
27
- {...props}
28
- />
29
- ))
30
- CardHeader.displayName = "CardHeader"
31
-
32
- const CardTitle = React.forwardRef<
33
- HTMLDivElement,
34
- React.HTMLAttributes<HTMLDivElement>
35
- >(({ className, ...props }, ref) => (
36
- <div
37
- ref={ref}
38
- className={cn(
39
- "text-2xl font-semibold leading-none tracking-tight",
40
- className
41
- )}
42
- {...props}
43
- />
44
- ))
45
- CardTitle.displayName = "CardTitle"
46
-
47
- const CardDescription = React.forwardRef<
48
- HTMLDivElement,
49
- React.HTMLAttributes<HTMLDivElement>
50
- >(({ className, ...props }, ref) => (
51
- <div
52
- ref={ref}
53
- className={cn("text-sm text-muted-foreground", className)}
54
- {...props}
55
- />
56
- ))
57
- CardDescription.displayName = "CardDescription"
58
-
59
- const CardContent = React.forwardRef<
60
- HTMLDivElement,
61
- React.HTMLAttributes<HTMLDivElement>
62
- >(({ className, ...props }, ref) => (
63
- <div ref={ref} className={cn("p-6 pt-0", className)} {...props} />
64
- ))
65
- CardContent.displayName = "CardContent"
66
-
67
- const CardFooter = React.forwardRef<
68
- HTMLDivElement,
69
- React.HTMLAttributes<HTMLDivElement>
70
- >(({ className, ...props }, ref) => (
71
- <div
72
- ref={ref}
73
- className={cn("flex items-center p-6 pt-0", className)}
74
- {...props}
75
- />
76
- ))
77
- CardFooter.displayName = "CardFooter"
78
-
79
- export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent }
package/src/index.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from "./components/ui/button"
2
- export * from "./components/ui/card"
package/src/lib/utils.ts DELETED
@@ -1,6 +0,0 @@
1
- import { clsx, type ClassValue } from "clsx"
2
- import { twMerge } from "tailwind-merge"
3
-
4
- export function cn(...inputs: ClassValue[]) {
5
- return twMerge(clsx(inputs))
6
- }
package/tsconfig.json DELETED
@@ -1,25 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ESNext",
4
- "lib": [
5
- "DOM",
6
- "DOM.Iterable",
7
- "ESNext"
8
- ],
9
- "module": "ESNext",
10
- "moduleResolution": "bundler",
11
- "jsx": "react-jsx",
12
- "strict": true,
13
- "declaration": true,
14
- "declarationMap": true,
15
- "sourceMap": true,
16
- "esModuleInterop": true,
17
- "forceConsistentCasingInFileNames": true,
18
- "skipLibCheck": true,
19
- "paths": {
20
- "@/*": [
21
- "./src/*"
22
- ]
23
- },
24
- }
25
- }