virtuo-ui-library 1.0.7 → 1.0.8

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,6 +30,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
30
30
  var index_exports = {};
31
31
  __export(index_exports, {
32
32
  Button: () => Button,
33
+ Card: () => Card,
33
34
  EcommerceCard: () => EcommerceCard,
34
35
  ProfileCard: () => ProfileCard
35
36
  });
@@ -310,9 +311,50 @@ var ProfileCard = ({
310
311
  };
311
312
  return /* @__PURE__ */ import_react3.default.createElement("div", { style: { background: bg, borderRadius: "20px", padding: "24px", width: "280px", color: "#fff", fontFamily: "system-ui,sans-serif", boxShadow: "0 10px 40px rgba(0,0,0,0.5)", border: "1px solid " + alpha(accent, 0.25), position: "relative", overflow: "hidden" } }, /* @__PURE__ */ import_react3.default.createElement("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", gap: "12px" } }, /* @__PURE__ */ import_react3.default.createElement("div", { style: { width: "80px", height: "80px", borderRadius: "50%", overflow: "hidden", border: "3px solid " + alpha(accent, 0.3) } }, /* @__PURE__ */ import_react3.default.createElement("img", { src: avatar, alt: name, style: { width: "100%", height: "100%", objectFit: "cover" } })), /* @__PURE__ */ import_react3.default.createElement("div", { style: { fontSize: "18px", fontWeight: "700", color: "#fff" } }, name), /* @__PURE__ */ import_react3.default.createElement("div", { style: { fontSize: "13px", color: "rgba(255,255,255,0.45)", textAlign: "center" } }, bio), /* @__PURE__ */ import_react3.default.createElement("div", { style: { display: "flex", gap: "12px", marginTop: "12px" } }, /* @__PURE__ */ import_react3.default.createElement("button", { onClick: onFollowClick, style: { padding: "8px 16px", borderRadius: "8px", border: "none", background: "linear-gradient(135deg, " + accent + ", " + alpha(accent, 0.7) + ")", color: "#fff", fontSize: "13px", fontWeight: "700", cursor: "pointer", fontFamily: "inherit" } }, "Follow"), /* @__PURE__ */ import_react3.default.createElement("button", { onClick: onMessageClick, style: { padding: "8px 16px", borderRadius: "8px", border: "1px solid " + alpha(accent, 0.3), background: "transparent", color: accent, fontSize: "13px", fontWeight: "700", cursor: "pointer", fontFamily: "inherit" } }, "Message"))));
312
313
  };
314
+
315
+ // src/components/Card/Card.jsx
316
+ var import_react4 = __toESM(require("react"));
317
+ var Card = ({
318
+ title = "Card Title",
319
+ description = "This is a description of the card content.",
320
+ image = "https://images.unsplash.com/photo-1498050108023-c5249f4df085?w=600&q=80",
321
+ accent = "#6366f1",
322
+ bg = "#0f172a",
323
+ onClick = () => {
324
+ }
325
+ }) => {
326
+ const [hovered, setHovered] = (0, import_react4.useState)(false);
327
+ const alpha = (hex, op) => {
328
+ const r = parseInt(hex.slice(1, 3), 16), g = parseInt(hex.slice(3, 5), 16), b = parseInt(hex.slice(5, 7), 16);
329
+ return "rgba(" + r + "," + g + "," + b + "," + op + ")";
330
+ };
331
+ return /* @__PURE__ */ import_react4.default.createElement(
332
+ "div",
333
+ {
334
+ onMouseEnter: () => setHovered(true),
335
+ onMouseLeave: () => setHovered(false),
336
+ onClick,
337
+ style: {
338
+ background: bg,
339
+ borderRadius: "20px",
340
+ overflow: "hidden",
341
+ width: "300px",
342
+ border: "1px solid " + (hovered ? alpha(accent, 0.3) : "rgba(255,255,255,0.07)"),
343
+ fontFamily: "system-ui,sans-serif",
344
+ transition: "transform 0.25s, box-shadow 0.25s",
345
+ transform: hovered ? "translateY(-4px)" : "translateY(0px)",
346
+ boxShadow: hovered ? "0 16px 40px rgba(0,0,0,0.5)" : "0 4px 20px rgba(0,0,0,0.3)",
347
+ cursor: "pointer"
348
+ }
349
+ },
350
+ /* @__PURE__ */ import_react4.default.createElement("div", { style: { position: "relative", width: "100%", height: "180px", overflow: "hidden" } }, /* @__PURE__ */ import_react4.default.createElement("img", { src: image, alt: title, style: { width: "100%", height: "100%", objectFit: "cover", transform: hovered ? "scale(1.05)" : "scale(1)", transition: "transform 0.4s ease" } }), /* @__PURE__ */ import_react4.default.createElement("div", { style: { position: "absolute", inset: 0, background: "linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 60%)" } })),
351
+ /* @__PURE__ */ import_react4.default.createElement("div", { style: { padding: "18px" } }, /* @__PURE__ */ import_react4.default.createElement("h3", { style: { fontSize: "15px", fontWeight: "700", color: "#fff", margin: "0 0 8px", lineHeight: 1.4 } }, title), /* @__PURE__ */ import_react4.default.createElement("p", { style: { fontSize: "13px", color: "rgba(255,255,255,0.45)", lineHeight: 1.65, margin: "0 0 18px" } }, description))
352
+ );
353
+ };
313
354
  // Annotate the CommonJS export names for ESM import in node:
314
355
  0 && (module.exports = {
315
356
  Button,
357
+ Card,
316
358
  EcommerceCard,
317
359
  ProfileCard
318
360
  });
package/dist/index.mjs CHANGED
@@ -273,8 +273,49 @@ var ProfileCard = ({
273
273
  };
274
274
  return /* @__PURE__ */ React3.createElement("div", { style: { background: bg, borderRadius: "20px", padding: "24px", width: "280px", color: "#fff", fontFamily: "system-ui,sans-serif", boxShadow: "0 10px 40px rgba(0,0,0,0.5)", border: "1px solid " + alpha(accent, 0.25), position: "relative", overflow: "hidden" } }, /* @__PURE__ */ React3.createElement("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", gap: "12px" } }, /* @__PURE__ */ React3.createElement("div", { style: { width: "80px", height: "80px", borderRadius: "50%", overflow: "hidden", border: "3px solid " + alpha(accent, 0.3) } }, /* @__PURE__ */ React3.createElement("img", { src: avatar, alt: name, style: { width: "100%", height: "100%", objectFit: "cover" } })), /* @__PURE__ */ React3.createElement("div", { style: { fontSize: "18px", fontWeight: "700", color: "#fff" } }, name), /* @__PURE__ */ React3.createElement("div", { style: { fontSize: "13px", color: "rgba(255,255,255,0.45)", textAlign: "center" } }, bio), /* @__PURE__ */ React3.createElement("div", { style: { display: "flex", gap: "12px", marginTop: "12px" } }, /* @__PURE__ */ React3.createElement("button", { onClick: onFollowClick, style: { padding: "8px 16px", borderRadius: "8px", border: "none", background: "linear-gradient(135deg, " + accent + ", " + alpha(accent, 0.7) + ")", color: "#fff", fontSize: "13px", fontWeight: "700", cursor: "pointer", fontFamily: "inherit" } }, "Follow"), /* @__PURE__ */ React3.createElement("button", { onClick: onMessageClick, style: { padding: "8px 16px", borderRadius: "8px", border: "1px solid " + alpha(accent, 0.3), background: "transparent", color: accent, fontSize: "13px", fontWeight: "700", cursor: "pointer", fontFamily: "inherit" } }, "Message"))));
275
275
  };
276
+
277
+ // src/components/Card/Card.jsx
278
+ import React4, { useState as useState3 } from "react";
279
+ var Card = ({
280
+ title = "Card Title",
281
+ description = "This is a description of the card content.",
282
+ image = "https://images.unsplash.com/photo-1498050108023-c5249f4df085?w=600&q=80",
283
+ accent = "#6366f1",
284
+ bg = "#0f172a",
285
+ onClick = () => {
286
+ }
287
+ }) => {
288
+ const [hovered, setHovered] = useState3(false);
289
+ const alpha = (hex, op) => {
290
+ const r = parseInt(hex.slice(1, 3), 16), g = parseInt(hex.slice(3, 5), 16), b = parseInt(hex.slice(5, 7), 16);
291
+ return "rgba(" + r + "," + g + "," + b + "," + op + ")";
292
+ };
293
+ return /* @__PURE__ */ React4.createElement(
294
+ "div",
295
+ {
296
+ onMouseEnter: () => setHovered(true),
297
+ onMouseLeave: () => setHovered(false),
298
+ onClick,
299
+ style: {
300
+ background: bg,
301
+ borderRadius: "20px",
302
+ overflow: "hidden",
303
+ width: "300px",
304
+ border: "1px solid " + (hovered ? alpha(accent, 0.3) : "rgba(255,255,255,0.07)"),
305
+ fontFamily: "system-ui,sans-serif",
306
+ transition: "transform 0.25s, box-shadow 0.25s",
307
+ transform: hovered ? "translateY(-4px)" : "translateY(0px)",
308
+ boxShadow: hovered ? "0 16px 40px rgba(0,0,0,0.5)" : "0 4px 20px rgba(0,0,0,0.3)",
309
+ cursor: "pointer"
310
+ }
311
+ },
312
+ /* @__PURE__ */ React4.createElement("div", { style: { position: "relative", width: "100%", height: "180px", overflow: "hidden" } }, /* @__PURE__ */ React4.createElement("img", { src: image, alt: title, style: { width: "100%", height: "100%", objectFit: "cover", transform: hovered ? "scale(1.05)" : "scale(1)", transition: "transform 0.4s ease" } }), /* @__PURE__ */ React4.createElement("div", { style: { position: "absolute", inset: 0, background: "linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 60%)" } })),
313
+ /* @__PURE__ */ React4.createElement("div", { style: { padding: "18px" } }, /* @__PURE__ */ React4.createElement("h3", { style: { fontSize: "15px", fontWeight: "700", color: "#fff", margin: "0 0 8px", lineHeight: 1.4 } }, title), /* @__PURE__ */ React4.createElement("p", { style: { fontSize: "13px", color: "rgba(255,255,255,0.45)", lineHeight: 1.65, margin: "0 0 18px" } }, description))
314
+ );
315
+ };
276
316
  export {
277
317
  Button,
318
+ Card,
278
319
  EcommerceCard,
279
320
  ProfileCard
280
321
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "virtuo-ui-library",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "Virtual UI React Component Library",
5
5
  "license": "ISC",
6
6
  "author": "Ritik Saini",