virtual-ui-lib 1.0.14 → 1.0.15

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 CHANGED
@@ -30,7 +30,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
30
30
  var index_exports = {};
31
31
  __export(index_exports, {
32
32
  AlertBanner: () => AlertBanner,
33
- Button: () => Button
33
+ Button: () => Button,
34
+ Card: () => Card
34
35
  });
35
36
  module.exports = __toCommonJS(index_exports);
36
37
 
@@ -130,8 +131,79 @@ var Button = ({
130
131
  loading ? "Loading..." : /* @__PURE__ */ import_react2.default.createElement(import_react2.default.Fragment, null, /* @__PURE__ */ import_react2.default.createElement(import_react2.default.Fragment, null, iconLeft, text, iconRight))
131
132
  );
132
133
  };
134
+
135
+ // src/components/Card/Card.jsx
136
+ var import_react3 = __toESM(require("react"));
137
+ var Card = ({
138
+ image = "https://via.placeholder.com/300x200",
139
+ title = "Card Title",
140
+ description = "This is a description of the card content. It should be concise and informative.",
141
+ onClick,
142
+ loading = false,
143
+ disabled = false,
144
+ bg = "#f9fafb",
145
+ textColor = "#0f172a",
146
+ hoverBg = "#e5e7eb",
147
+ radius = "12px",
148
+ shadow = "0 4px 14px rgba(0,0,0,0.1)",
149
+ hoverShadow = "0 8px 28px rgba(0,0,0,0.2)",
150
+ transition = "transform 0.3s, box-shadow 0.3s"
151
+ }) => {
152
+ return /* @__PURE__ */ import_react3.default.createElement(
153
+ "div",
154
+ {
155
+ style: {
156
+ background: bg,
157
+ borderRadius: radius,
158
+ boxShadow: shadow,
159
+ padding: "16px",
160
+ transition,
161
+ cursor: disabled ? "not-allowed" : "pointer",
162
+ opacity: disabled ? 0.6 : 1,
163
+ position: "relative",
164
+ overflow: "hidden"
165
+ },
166
+ onClick: disabled ? null : onClick,
167
+ onMouseEnter: (e) => {
168
+ e.currentTarget.style.boxShadow = hoverShadow;
169
+ e.currentTarget.style.transform = "translateY(-4px)";
170
+ },
171
+ onMouseLeave: (e) => {
172
+ e.currentTarget.style.boxShadow = shadow;
173
+ e.currentTarget.style.transform = "translateY(0)";
174
+ }
175
+ },
176
+ loading ? /* @__PURE__ */ import_react3.default.createElement("div", { style: {
177
+ background: "#e0e0e0",
178
+ height: "200px",
179
+ borderRadius: radius,
180
+ marginBottom: "12px"
181
+ } }) : /* @__PURE__ */ import_react3.default.createElement("img", { src: image, alt: title, style: { width: "100%", borderRadius: radius } }),
182
+ /* @__PURE__ */ import_react3.default.createElement("h3", { style: { margin: "12px 0 4px", fontSize: "16px", color: textColor } }, title),
183
+ /* @__PURE__ */ import_react3.default.createElement("p", { style: { margin: "0 0 12px", fontSize: "14px", color: "#374151" } }, description),
184
+ /* @__PURE__ */ import_react3.default.createElement(
185
+ "button",
186
+ {
187
+ style: {
188
+ padding: "10px 16px",
189
+ background: "#2563eb",
190
+ color: "white",
191
+ border: "none",
192
+ borderRadius: "8px",
193
+ cursor: "pointer",
194
+ fontWeight: "600",
195
+ transition: "background 0.3s"
196
+ },
197
+ onClick,
198
+ disabled
199
+ },
200
+ "Action"
201
+ )
202
+ );
203
+ };
133
204
  // Annotate the CommonJS export names for ESM import in node:
134
205
  0 && (module.exports = {
135
206
  AlertBanner,
136
- Button
207
+ Button,
208
+ Card
137
209
  });
package/dist/index.mjs CHANGED
@@ -94,7 +94,78 @@ var Button = ({
94
94
  loading ? "Loading..." : /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(React2.Fragment, null, iconLeft, text, iconRight))
95
95
  );
96
96
  };
97
+
98
+ // src/components/Card/Card.jsx
99
+ import React3 from "react";
100
+ var Card = ({
101
+ image = "https://via.placeholder.com/300x200",
102
+ title = "Card Title",
103
+ description = "This is a description of the card content. It should be concise and informative.",
104
+ onClick,
105
+ loading = false,
106
+ disabled = false,
107
+ bg = "#f9fafb",
108
+ textColor = "#0f172a",
109
+ hoverBg = "#e5e7eb",
110
+ radius = "12px",
111
+ shadow = "0 4px 14px rgba(0,0,0,0.1)",
112
+ hoverShadow = "0 8px 28px rgba(0,0,0,0.2)",
113
+ transition = "transform 0.3s, box-shadow 0.3s"
114
+ }) => {
115
+ return /* @__PURE__ */ React3.createElement(
116
+ "div",
117
+ {
118
+ style: {
119
+ background: bg,
120
+ borderRadius: radius,
121
+ boxShadow: shadow,
122
+ padding: "16px",
123
+ transition,
124
+ cursor: disabled ? "not-allowed" : "pointer",
125
+ opacity: disabled ? 0.6 : 1,
126
+ position: "relative",
127
+ overflow: "hidden"
128
+ },
129
+ onClick: disabled ? null : onClick,
130
+ onMouseEnter: (e) => {
131
+ e.currentTarget.style.boxShadow = hoverShadow;
132
+ e.currentTarget.style.transform = "translateY(-4px)";
133
+ },
134
+ onMouseLeave: (e) => {
135
+ e.currentTarget.style.boxShadow = shadow;
136
+ e.currentTarget.style.transform = "translateY(0)";
137
+ }
138
+ },
139
+ loading ? /* @__PURE__ */ React3.createElement("div", { style: {
140
+ background: "#e0e0e0",
141
+ height: "200px",
142
+ borderRadius: radius,
143
+ marginBottom: "12px"
144
+ } }) : /* @__PURE__ */ React3.createElement("img", { src: image, alt: title, style: { width: "100%", borderRadius: radius } }),
145
+ /* @__PURE__ */ React3.createElement("h3", { style: { margin: "12px 0 4px", fontSize: "16px", color: textColor } }, title),
146
+ /* @__PURE__ */ React3.createElement("p", { style: { margin: "0 0 12px", fontSize: "14px", color: "#374151" } }, description),
147
+ /* @__PURE__ */ React3.createElement(
148
+ "button",
149
+ {
150
+ style: {
151
+ padding: "10px 16px",
152
+ background: "#2563eb",
153
+ color: "white",
154
+ border: "none",
155
+ borderRadius: "8px",
156
+ cursor: "pointer",
157
+ fontWeight: "600",
158
+ transition: "background 0.3s"
159
+ },
160
+ onClick,
161
+ disabled
162
+ },
163
+ "Action"
164
+ )
165
+ );
166
+ };
97
167
  export {
98
168
  AlertBanner,
99
- Button
169
+ Button,
170
+ Card
100
171
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "virtual-ui-lib",
3
- "version": "1.0.14",
3
+ "version": "1.0.15",
4
4
  "description": "Virtual UI React Component Library",
5
5
  "author": "Ankush",
6
6
  "license": "ISC",