virtual-ui-library01 1.0.1 → 1.0.2

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.js ADDED
@@ -0,0 +1,134 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/index.js
30
+ var index_exports = {};
31
+ __export(index_exports, {
32
+ Button: () => Button,
33
+ Card: () => Card
34
+ });
35
+ module.exports = __toCommonJS(index_exports);
36
+
37
+ // src/components/Button/Button.jsx
38
+ var import_react = __toESM(require("react"));
39
+ var Button = ({
40
+ text = "Click Me",
41
+ bgColor = "#4f46e5",
42
+ hoverColor = "#4338ca",
43
+ textColor = "#ffffff",
44
+ size = "medium",
45
+ onClick = () => {
46
+ }
47
+ }) => {
48
+ const [isHovered, setIsHovered] = (0, import_react.useState)(false);
49
+ const sizeStyles = {
50
+ small: { padding: "6px 12px", fontSize: "12px" },
51
+ medium: { padding: "10px 20px", fontSize: "14px" },
52
+ large: { padding: "14px 28px", fontSize: "16px" }
53
+ };
54
+ const styles = {
55
+ backgroundColor: isHovered ? hoverColor : bgColor,
56
+ color: textColor,
57
+ border: "none",
58
+ borderRadius: "8px",
59
+ cursor: "pointer",
60
+ fontWeight: 600,
61
+ transition: "background-color 0.2s ease, transform 0.15s ease",
62
+ transform: isHovered ? "translateY(-1px)" : "translateY(0)",
63
+ ...sizeStyles[size] || sizeStyles.medium
64
+ };
65
+ return /* @__PURE__ */ import_react.default.createElement(
66
+ "button",
67
+ {
68
+ style: styles,
69
+ onClick,
70
+ onMouseEnter: () => setIsHovered(true),
71
+ onMouseLeave: () => setIsHovered(false)
72
+ },
73
+ text
74
+ );
75
+ };
76
+
77
+ // src/components/Card/Card.jsx
78
+ var import_react2 = __toESM(require("react"));
79
+ var Card = ({
80
+ title = "Card Title",
81
+ description = "This is a short card description.",
82
+ bgColor = "#ffffff",
83
+ hoverBgColor = "#f9fafb",
84
+ borderColor = "#e5e7eb",
85
+ textColor = "#111827",
86
+ size = "medium",
87
+ imageUrl = ""
88
+ }) => {
89
+ const [isHovered, setIsHovered] = (0, import_react2.useState)(false);
90
+ const sizeStyles = {
91
+ small: { width: "220px", padding: "12px" },
92
+ medium: { width: "300px", padding: "18px" },
93
+ large: { width: "380px", padding: "24px" }
94
+ };
95
+ const styles = {
96
+ backgroundColor: isHovered ? hoverBgColor : bgColor,
97
+ border: `1px solid ${borderColor}`,
98
+ borderRadius: "12px",
99
+ boxShadow: isHovered ? "0 8px 20px rgba(0,0,0,0.12)" : "0 2px 6px rgba(0,0,0,0.06)",
100
+ transform: isHovered ? "translateY(-4px)" : "translateY(0)",
101
+ transition: "all 0.2s ease",
102
+ cursor: "pointer",
103
+ ...sizeStyles[size] || sizeStyles.medium
104
+ };
105
+ return /* @__PURE__ */ import_react2.default.createElement(
106
+ "div",
107
+ {
108
+ style: styles,
109
+ onMouseEnter: () => setIsHovered(true),
110
+ onMouseLeave: () => setIsHovered(false)
111
+ },
112
+ imageUrl && /* @__PURE__ */ import_react2.default.createElement(
113
+ "img",
114
+ {
115
+ src: imageUrl,
116
+ alt: title,
117
+ style: {
118
+ width: "100%",
119
+ height: "140px",
120
+ objectFit: "cover",
121
+ borderRadius: "8px",
122
+ marginBottom: "12px"
123
+ }
124
+ }
125
+ ),
126
+ /* @__PURE__ */ import_react2.default.createElement("h3", { style: { margin: "0 0 8px 0", color: textColor, fontSize: "18px" } }, title),
127
+ /* @__PURE__ */ import_react2.default.createElement("p", { style: { margin: 0, color: textColor, opacity: 0.75, fontSize: "14px", lineHeight: 1.5 } }, description)
128
+ );
129
+ };
130
+ // Annotate the CommonJS export names for ESM import in node:
131
+ 0 && (module.exports = {
132
+ Button,
133
+ Card
134
+ });
package/dist/index.mjs ADDED
@@ -0,0 +1,97 @@
1
+ // src/components/Button/Button.jsx
2
+ import React, { useState } from "react";
3
+ var Button = ({
4
+ text = "Click Me",
5
+ bgColor = "#4f46e5",
6
+ hoverColor = "#4338ca",
7
+ textColor = "#ffffff",
8
+ size = "medium",
9
+ onClick = () => {
10
+ }
11
+ }) => {
12
+ const [isHovered, setIsHovered] = useState(false);
13
+ const sizeStyles = {
14
+ small: { padding: "6px 12px", fontSize: "12px" },
15
+ medium: { padding: "10px 20px", fontSize: "14px" },
16
+ large: { padding: "14px 28px", fontSize: "16px" }
17
+ };
18
+ const styles = {
19
+ backgroundColor: isHovered ? hoverColor : bgColor,
20
+ color: textColor,
21
+ border: "none",
22
+ borderRadius: "8px",
23
+ cursor: "pointer",
24
+ fontWeight: 600,
25
+ transition: "background-color 0.2s ease, transform 0.15s ease",
26
+ transform: isHovered ? "translateY(-1px)" : "translateY(0)",
27
+ ...sizeStyles[size] || sizeStyles.medium
28
+ };
29
+ return /* @__PURE__ */ React.createElement(
30
+ "button",
31
+ {
32
+ style: styles,
33
+ onClick,
34
+ onMouseEnter: () => setIsHovered(true),
35
+ onMouseLeave: () => setIsHovered(false)
36
+ },
37
+ text
38
+ );
39
+ };
40
+
41
+ // src/components/Card/Card.jsx
42
+ import React2, { useState as useState2 } from "react";
43
+ var Card = ({
44
+ title = "Card Title",
45
+ description = "This is a short card description.",
46
+ bgColor = "#ffffff",
47
+ hoverBgColor = "#f9fafb",
48
+ borderColor = "#e5e7eb",
49
+ textColor = "#111827",
50
+ size = "medium",
51
+ imageUrl = ""
52
+ }) => {
53
+ const [isHovered, setIsHovered] = useState2(false);
54
+ const sizeStyles = {
55
+ small: { width: "220px", padding: "12px" },
56
+ medium: { width: "300px", padding: "18px" },
57
+ large: { width: "380px", padding: "24px" }
58
+ };
59
+ const styles = {
60
+ backgroundColor: isHovered ? hoverBgColor : bgColor,
61
+ border: `1px solid ${borderColor}`,
62
+ borderRadius: "12px",
63
+ boxShadow: isHovered ? "0 8px 20px rgba(0,0,0,0.12)" : "0 2px 6px rgba(0,0,0,0.06)",
64
+ transform: isHovered ? "translateY(-4px)" : "translateY(0)",
65
+ transition: "all 0.2s ease",
66
+ cursor: "pointer",
67
+ ...sizeStyles[size] || sizeStyles.medium
68
+ };
69
+ return /* @__PURE__ */ React2.createElement(
70
+ "div",
71
+ {
72
+ style: styles,
73
+ onMouseEnter: () => setIsHovered(true),
74
+ onMouseLeave: () => setIsHovered(false)
75
+ },
76
+ imageUrl && /* @__PURE__ */ React2.createElement(
77
+ "img",
78
+ {
79
+ src: imageUrl,
80
+ alt: title,
81
+ style: {
82
+ width: "100%",
83
+ height: "140px",
84
+ objectFit: "cover",
85
+ borderRadius: "8px",
86
+ marginBottom: "12px"
87
+ }
88
+ }
89
+ ),
90
+ /* @__PURE__ */ React2.createElement("h3", { style: { margin: "0 0 8px 0", color: textColor, fontSize: "18px" } }, title),
91
+ /* @__PURE__ */ React2.createElement("p", { style: { margin: 0, color: textColor, opacity: 0.75, fontSize: "14px", lineHeight: 1.5 } }, description)
92
+ );
93
+ };
94
+ export {
95
+ Button,
96
+ Card
97
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "virtual-ui-library01",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",