virtual-ui-lib 1.0.74 → 1.0.75
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 +58 -0
- package/dist/index.mjs +57 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -33,6 +33,7 @@ __export(index_exports, {
|
|
|
33
33
|
BackgoundImageSlider: () => BackgoundImageSlider,
|
|
34
34
|
Charts: () => Charts,
|
|
35
35
|
ColorPicker: () => ColorPicker,
|
|
36
|
+
EcommerceCard: () => EcommerceCard,
|
|
36
37
|
FileUpload: () => FileUpload,
|
|
37
38
|
Footer: () => Footer,
|
|
38
39
|
ImageCard: () => ImageCard,
|
|
@@ -3575,12 +3576,69 @@ var ProgressBar = ({
|
|
|
3575
3576
|
}
|
|
3576
3577
|
return null;
|
|
3577
3578
|
};
|
|
3579
|
+
|
|
3580
|
+
// src/components/EcommerceCard/EcommerceCard.jsx
|
|
3581
|
+
var import_react20 = __toESM(require("react"));
|
|
3582
|
+
var EcommerceCard = ({
|
|
3583
|
+
image = "https://images.unsplash.com/photo-1505740420928-5e560c06d30e?w=600&q=80",
|
|
3584
|
+
title = "Wireless Headphones",
|
|
3585
|
+
description = "Premium noise-cancelling headphones with 40 hours battery life.",
|
|
3586
|
+
price = 199,
|
|
3587
|
+
currency = "$",
|
|
3588
|
+
accent = "#6366f1",
|
|
3589
|
+
bg = "#0f172a",
|
|
3590
|
+
onAddToCart = () => {
|
|
3591
|
+
},
|
|
3592
|
+
onViewDetails = () => {
|
|
3593
|
+
}
|
|
3594
|
+
}) => {
|
|
3595
|
+
const [hovered, setHovered] = (0, import_react20.useState)(false);
|
|
3596
|
+
const alpha = (hex, op) => {
|
|
3597
|
+
const r = parseInt(hex.slice(1, 3), 16), g = parseInt(hex.slice(3, 5), 16), b = parseInt(hex.slice(5, 7), 16);
|
|
3598
|
+
return "rgba(" + r + "," + g + "," + b + "," + op + ")";
|
|
3599
|
+
};
|
|
3600
|
+
return /* @__PURE__ */ import_react20.default.createElement(
|
|
3601
|
+
"div",
|
|
3602
|
+
{
|
|
3603
|
+
onMouseEnter: () => setHovered(true),
|
|
3604
|
+
onMouseLeave: () => setHovered(false),
|
|
3605
|
+
style: {
|
|
3606
|
+
background: bg,
|
|
3607
|
+
borderRadius: "20px",
|
|
3608
|
+
overflow: "hidden",
|
|
3609
|
+
width: "300px",
|
|
3610
|
+
border: "1px solid " + (hovered ? alpha(accent, 0.3) : "rgba(255,255,255,0.07)"),
|
|
3611
|
+
fontFamily: "system-ui,sans-serif",
|
|
3612
|
+
transition: "transform 0.25s, box-shadow 0.25s",
|
|
3613
|
+
transform: hovered ? "translateY(-4px)" : "translateY(0px)",
|
|
3614
|
+
boxShadow: hovered ? "0 16px 40px rgba(0,0,0,0.5)" : "0 4px 20px rgba(0,0,0,0.3)"
|
|
3615
|
+
}
|
|
3616
|
+
},
|
|
3617
|
+
/* @__PURE__ */ import_react20.default.createElement("div", { style: { position: "relative", width: "100%", height: "200px", overflow: "hidden" } }, /* @__PURE__ */ import_react20.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_react20.default.createElement("div", { style: { position: "absolute", inset: 0, background: "linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 60%)" } })),
|
|
3618
|
+
/* @__PURE__ */ import_react20.default.createElement("div", { style: { padding: "18px" } }, /* @__PURE__ */ import_react20.default.createElement("h3", { style: { fontSize: "15px", fontWeight: "700", color: "#fff", margin: "0 0 8px", lineHeight: 1.4 } }, title), /* @__PURE__ */ import_react20.default.createElement("p", { style: { fontSize: "13px", color: "rgba(255,255,255,0.45)", lineHeight: 1.65, margin: "0 0 18px" } }, description), /* @__PURE__ */ import_react20.default.createElement("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", marginBottom: "18px" } }, /* @__PURE__ */ import_react20.default.createElement("span", { style: { fontSize: "24px", fontWeight: "800", color: "#fff" } }, currency, price), /* @__PURE__ */ import_react20.default.createElement(
|
|
3619
|
+
"button",
|
|
3620
|
+
{
|
|
3621
|
+
onClick: onAddToCart,
|
|
3622
|
+
style: { padding: "8px 16px", borderRadius: "12px", border: "none", background: accent, color: "#fff", fontSize: "13px", fontWeight: "700", cursor: "pointer", fontFamily: "inherit" }
|
|
3623
|
+
},
|
|
3624
|
+
"Add to Cart"
|
|
3625
|
+
)), /* @__PURE__ */ import_react20.default.createElement(
|
|
3626
|
+
"button",
|
|
3627
|
+
{
|
|
3628
|
+
onClick: onViewDetails,
|
|
3629
|
+
style: { width: "100%", padding: "11px", borderRadius: "12px", border: "1px solid " + alpha(accent, 0.3), background: "transparent", color: accent, fontSize: "13px", fontWeight: "700", cursor: "pointer", fontFamily: "inherit" }
|
|
3630
|
+
},
|
|
3631
|
+
"View Details"
|
|
3632
|
+
))
|
|
3633
|
+
);
|
|
3634
|
+
};
|
|
3578
3635
|
// Annotate the CommonJS export names for ESM import in node:
|
|
3579
3636
|
0 && (module.exports = {
|
|
3580
3637
|
AvatarCard,
|
|
3581
3638
|
BackgoundImageSlider,
|
|
3582
3639
|
Charts,
|
|
3583
3640
|
ColorPicker,
|
|
3641
|
+
EcommerceCard,
|
|
3584
3642
|
FileUpload,
|
|
3585
3643
|
Footer,
|
|
3586
3644
|
ImageCard,
|
package/dist/index.mjs
CHANGED
|
@@ -3522,11 +3522,68 @@ var ProgressBar = ({
|
|
|
3522
3522
|
}
|
|
3523
3523
|
return null;
|
|
3524
3524
|
};
|
|
3525
|
+
|
|
3526
|
+
// src/components/EcommerceCard/EcommerceCard.jsx
|
|
3527
|
+
import React20, { useState as useState18 } from "react";
|
|
3528
|
+
var EcommerceCard = ({
|
|
3529
|
+
image = "https://images.unsplash.com/photo-1505740420928-5e560c06d30e?w=600&q=80",
|
|
3530
|
+
title = "Wireless Headphones",
|
|
3531
|
+
description = "Premium noise-cancelling headphones with 40 hours battery life.",
|
|
3532
|
+
price = 199,
|
|
3533
|
+
currency = "$",
|
|
3534
|
+
accent = "#6366f1",
|
|
3535
|
+
bg = "#0f172a",
|
|
3536
|
+
onAddToCart = () => {
|
|
3537
|
+
},
|
|
3538
|
+
onViewDetails = () => {
|
|
3539
|
+
}
|
|
3540
|
+
}) => {
|
|
3541
|
+
const [hovered, setHovered] = useState18(false);
|
|
3542
|
+
const alpha = (hex, op) => {
|
|
3543
|
+
const r = parseInt(hex.slice(1, 3), 16), g = parseInt(hex.slice(3, 5), 16), b = parseInt(hex.slice(5, 7), 16);
|
|
3544
|
+
return "rgba(" + r + "," + g + "," + b + "," + op + ")";
|
|
3545
|
+
};
|
|
3546
|
+
return /* @__PURE__ */ React20.createElement(
|
|
3547
|
+
"div",
|
|
3548
|
+
{
|
|
3549
|
+
onMouseEnter: () => setHovered(true),
|
|
3550
|
+
onMouseLeave: () => setHovered(false),
|
|
3551
|
+
style: {
|
|
3552
|
+
background: bg,
|
|
3553
|
+
borderRadius: "20px",
|
|
3554
|
+
overflow: "hidden",
|
|
3555
|
+
width: "300px",
|
|
3556
|
+
border: "1px solid " + (hovered ? alpha(accent, 0.3) : "rgba(255,255,255,0.07)"),
|
|
3557
|
+
fontFamily: "system-ui,sans-serif",
|
|
3558
|
+
transition: "transform 0.25s, box-shadow 0.25s",
|
|
3559
|
+
transform: hovered ? "translateY(-4px)" : "translateY(0px)",
|
|
3560
|
+
boxShadow: hovered ? "0 16px 40px rgba(0,0,0,0.5)" : "0 4px 20px rgba(0,0,0,0.3)"
|
|
3561
|
+
}
|
|
3562
|
+
},
|
|
3563
|
+
/* @__PURE__ */ React20.createElement("div", { style: { position: "relative", width: "100%", height: "200px", overflow: "hidden" } }, /* @__PURE__ */ React20.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__ */ React20.createElement("div", { style: { position: "absolute", inset: 0, background: "linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 60%)" } })),
|
|
3564
|
+
/* @__PURE__ */ React20.createElement("div", { style: { padding: "18px" } }, /* @__PURE__ */ React20.createElement("h3", { style: { fontSize: "15px", fontWeight: "700", color: "#fff", margin: "0 0 8px", lineHeight: 1.4 } }, title), /* @__PURE__ */ React20.createElement("p", { style: { fontSize: "13px", color: "rgba(255,255,255,0.45)", lineHeight: 1.65, margin: "0 0 18px" } }, description), /* @__PURE__ */ React20.createElement("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", marginBottom: "18px" } }, /* @__PURE__ */ React20.createElement("span", { style: { fontSize: "24px", fontWeight: "800", color: "#fff" } }, currency, price), /* @__PURE__ */ React20.createElement(
|
|
3565
|
+
"button",
|
|
3566
|
+
{
|
|
3567
|
+
onClick: onAddToCart,
|
|
3568
|
+
style: { padding: "8px 16px", borderRadius: "12px", border: "none", background: accent, color: "#fff", fontSize: "13px", fontWeight: "700", cursor: "pointer", fontFamily: "inherit" }
|
|
3569
|
+
},
|
|
3570
|
+
"Add to Cart"
|
|
3571
|
+
)), /* @__PURE__ */ React20.createElement(
|
|
3572
|
+
"button",
|
|
3573
|
+
{
|
|
3574
|
+
onClick: onViewDetails,
|
|
3575
|
+
style: { width: "100%", padding: "11px", borderRadius: "12px", border: "1px solid " + alpha(accent, 0.3), background: "transparent", color: accent, fontSize: "13px", fontWeight: "700", cursor: "pointer", fontFamily: "inherit" }
|
|
3576
|
+
},
|
|
3577
|
+
"View Details"
|
|
3578
|
+
))
|
|
3579
|
+
);
|
|
3580
|
+
};
|
|
3525
3581
|
export {
|
|
3526
3582
|
AvatarCard,
|
|
3527
3583
|
BackgoundImageSlider,
|
|
3528
3584
|
Charts,
|
|
3529
3585
|
ColorPicker,
|
|
3586
|
+
EcommerceCard,
|
|
3530
3587
|
FileUpload,
|
|
3531
3588
|
Footer,
|
|
3532
3589
|
ImageCard,
|