@banhosdev/moldsoft-ui 0.1.0 → 0.2.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 +23 -10
- package/dist/index.d.ts +23 -10
- package/dist/index.js +11 -0
- package/dist/index.mjs +10 -0
- package/package.json +1 -1
- package/src/components/app/sidebar.tsx +32 -0
- package/src/index.ts +4 -0
- package/src/styles/globals.css +3 -1
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
|
-
|
|
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
|
-
|
|
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
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
|
|
2
|
+
export interface SidebarProps {
|
|
3
|
+
children?: React.ReactNode;
|
|
4
|
+
className?: string;
|
|
5
|
+
items: SidebarItem[];
|
|
6
|
+
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface SidebarItem {
|
|
10
|
+
label: string;
|
|
11
|
+
href: string;
|
|
12
|
+
icon: React.ReactNode;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function Sidebar({ children, items = [] }: SidebarProps) {
|
|
16
|
+
return (
|
|
17
|
+
<aside className="w-full h-full p-4">
|
|
18
|
+
<main className="bg-primary rounded-3xl h-full">
|
|
19
|
+
<div className="p-4">
|
|
20
|
+
<h1>Sidebar</h1>
|
|
21
|
+
<ul>
|
|
22
|
+
{items?.map((item) => (
|
|
23
|
+
<li key={item.href}>
|
|
24
|
+
<a href={item.href}>{item.label}</a>
|
|
25
|
+
</li>
|
|
26
|
+
))}
|
|
27
|
+
</ul>
|
|
28
|
+
</div>
|
|
29
|
+
</main>
|
|
30
|
+
</aside>
|
|
31
|
+
);
|
|
32
|
+
}
|
package/src/index.ts
CHANGED
package/src/styles/globals.css
CHANGED
|
@@ -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:
|
|
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));
|