admin-panel-ui-components 0.1.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.
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ interface ButtonProps {
3
+ children: React.ReactNode;
4
+ variant?: "primary" | "secondary";
5
+ onClick?: () => void;
6
+ }
7
+ declare const Button: React.FC<ButtonProps>;
8
+ export default Button;
package/dist/Button.js ADDED
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ var Button = function (_a) {
3
+ var children = _a.children, _b = _a.variant, variant = _b === void 0 ? "primary" : _b, onClick = _a.onClick;
4
+ var variants = {
5
+ primary: "bg-blue-600 text-white hover:bg-blue-700",
6
+ secondary: "bg-gray-600 text-white hover:bg-gray-700",
7
+ };
8
+ return _jsx("button", { className: "px-6 py-3 rounded-lg font-semibold transition ".concat(variants[variant]), onClick: onClick, children: children });
9
+ };
10
+ export default Button;
package/dist/Form.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ declare const Form: React.FC<{
3
+ children: React.ReactNode;
4
+ }>;
5
+ export default Form;
package/dist/Form.js ADDED
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ var Form = function (_a) {
3
+ var children = _a.children;
4
+ return _jsx("form", { children: children });
5
+ };
6
+ export default Form;
package/dist/index.css ADDED
@@ -0,0 +1 @@
1
+ @import "tailwindcss";
@@ -0,0 +1,2 @@
1
+ export { default as Button } from "./Button";
2
+ export { default as Form } from "./Form";
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ export { default as Button } from "./Button";
2
+ export { default as Form } from "./Form";
package/package.json ADDED
@@ -0,0 +1,27 @@
1
+ {
2
+ "name": "admin-panel-ui-components",
3
+ "version": "0.1.0",
4
+ "description": "",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "scripts": {
8
+ "build": "tsc && cp src/*.css dist/"
9
+ },
10
+ "peerDependencies": {
11
+ "react": "^18.0.0",
12
+ "react-dom": "^18.0.0"
13
+ },
14
+ "keywords": [],
15
+ "author": "",
16
+ "license": "ISC",
17
+ "devDependencies": {
18
+ "@types/react": "^19.2.7",
19
+ "@types/react-dom": "^19.2.3",
20
+ "react": "^19.2.3",
21
+ "react-dom": "^19.2.3",
22
+ "typescript": "^5.9.3"
23
+ },
24
+ "dependencies": {
25
+ "tailwindcss": "^4.1.18"
26
+ }
27
+ }
package/src/Button.tsx ADDED
@@ -0,0 +1,18 @@
1
+ import React from "react";
2
+
3
+ interface ButtonProps {
4
+ children: React.ReactNode;
5
+ variant?: "primary" | "secondary";
6
+ onClick?: () => void;
7
+ }
8
+
9
+ const Button: React.FC<ButtonProps> = ({ children, variant = "primary", onClick }) => {
10
+ const variants = {
11
+ primary: "bg-blue-600 text-white hover:bg-blue-700",
12
+ secondary: "bg-gray-600 text-white hover:bg-gray-700",
13
+ };
14
+
15
+ return <button className={`px-6 py-3 rounded-lg font-semibold transition ${variants[variant]}`} onClick={onClick}>{children}</button>;
16
+ };
17
+
18
+ export default Button;
package/src/Form.tsx ADDED
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+
3
+ const Form: React.FC<{ children: React.ReactNode }> = ({ children }) => {
4
+ return <form>{children}</form>;
5
+ };
6
+
7
+ export default Form;
package/src/index.css ADDED
@@ -0,0 +1 @@
1
+ @import "tailwindcss";
package/src/index.ts ADDED
@@ -0,0 +1,2 @@
1
+ export { default as Button } from "./Button";
2
+ export { default as Form } from "./Form";
package/tsconfig.json ADDED
@@ -0,0 +1,22 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "es5",
4
+ "lib": ["dom", "dom.iterable", "esnext"],
5
+ "allowJs": true,
6
+ "skipLibCheck": true,
7
+ "esModuleInterop": true,
8
+ "allowSyntheticDefaultImports": true,
9
+ "strict": true,
10
+ "forceConsistentCasingInFileNames": true,
11
+ "module": "esnext",
12
+ "moduleResolution": "node",
13
+ "resolveJsonModule": true,
14
+ "isolatedModules": true,
15
+ "noEmit": false,
16
+ "jsx": "react-jsx",
17
+ "declaration": true,
18
+ "outDir": "dist"
19
+ },
20
+ "include": ["src"],
21
+ "exclude": ["node_modules", "dist"]
22
+ }