virtuo-ui-library 1.0.7 → 1.0.9
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 +75 -0
- package/dist/index.mjs +73 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -30,7 +30,9 @@ 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,
|
|
35
|
+
NavBar: () => NavBar,
|
|
34
36
|
ProfileCard: () => ProfileCard
|
|
35
37
|
});
|
|
36
38
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -310,9 +312,82 @@ var ProfileCard = ({
|
|
|
310
312
|
};
|
|
311
313
|
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
314
|
};
|
|
315
|
+
|
|
316
|
+
// src/components/Card/Card.jsx
|
|
317
|
+
var import_react4 = __toESM(require("react"));
|
|
318
|
+
var Card = ({
|
|
319
|
+
title = "Card Title",
|
|
320
|
+
description = "This is a description of the card content.",
|
|
321
|
+
image = "https://images.unsplash.com/photo-1498050108023-c5249f4df085?w=600&q=80",
|
|
322
|
+
accent = "#6366f1",
|
|
323
|
+
bg = "#0f172a",
|
|
324
|
+
onClick = () => {
|
|
325
|
+
}
|
|
326
|
+
}) => {
|
|
327
|
+
const [hovered, setHovered] = (0, import_react4.useState)(false);
|
|
328
|
+
const alpha = (hex, op) => {
|
|
329
|
+
const r = parseInt(hex.slice(1, 3), 16), g = parseInt(hex.slice(3, 5), 16), b = parseInt(hex.slice(5, 7), 16);
|
|
330
|
+
return "rgba(" + r + "," + g + "," + b + "," + op + ")";
|
|
331
|
+
};
|
|
332
|
+
return /* @__PURE__ */ import_react4.default.createElement(
|
|
333
|
+
"div",
|
|
334
|
+
{
|
|
335
|
+
onMouseEnter: () => setHovered(true),
|
|
336
|
+
onMouseLeave: () => setHovered(false),
|
|
337
|
+
onClick,
|
|
338
|
+
style: {
|
|
339
|
+
background: bg,
|
|
340
|
+
borderRadius: "20px",
|
|
341
|
+
overflow: "hidden",
|
|
342
|
+
width: "300px",
|
|
343
|
+
border: "1px solid " + (hovered ? alpha(accent, 0.3) : "rgba(255,255,255,0.07)"),
|
|
344
|
+
fontFamily: "system-ui,sans-serif",
|
|
345
|
+
transition: "transform 0.25s, box-shadow 0.25s",
|
|
346
|
+
transform: hovered ? "translateY(-4px)" : "translateY(0px)",
|
|
347
|
+
boxShadow: hovered ? "0 16px 40px rgba(0,0,0,0.5)" : "0 4px 20px rgba(0,0,0,0.3)",
|
|
348
|
+
cursor: "pointer"
|
|
349
|
+
}
|
|
350
|
+
},
|
|
351
|
+
/* @__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%)" } })),
|
|
352
|
+
/* @__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))
|
|
353
|
+
);
|
|
354
|
+
};
|
|
355
|
+
|
|
356
|
+
// src/components/NavBar/NavBar.jsx
|
|
357
|
+
var import_react5 = __toESM(require("react"));
|
|
358
|
+
var NavBar = ({
|
|
359
|
+
logo = "VirtualAI",
|
|
360
|
+
links = ["Home", "Features", "Pricing", "Blog"],
|
|
361
|
+
ctaText = "Get Started",
|
|
362
|
+
accent = "#6366f1",
|
|
363
|
+
bg = "#0f172a",
|
|
364
|
+
onCtaClick = () => {
|
|
365
|
+
},
|
|
366
|
+
onLinkClick = () => {
|
|
367
|
+
}
|
|
368
|
+
}) => {
|
|
369
|
+
const [active, setActive] = (0, import_react5.useState)("Home");
|
|
370
|
+
const [isMobile, setIsMobile] = (0, import_react5.useState)(false);
|
|
371
|
+
const alpha = (hex, op) => {
|
|
372
|
+
const r = parseInt(hex.slice(1, 3), 16), g = parseInt(hex.slice(3, 5), 16), b = parseInt(hex.slice(5, 7), 16);
|
|
373
|
+
return "rgba(" + r + "," + g + "," + b + "," + op + ")";
|
|
374
|
+
};
|
|
375
|
+
(0, import_react5.useEffect)(() => {
|
|
376
|
+
const check = () => setIsMobile(window.innerWidth < 768);
|
|
377
|
+
check();
|
|
378
|
+
window.addEventListener("resize", check);
|
|
379
|
+
return () => window.removeEventListener("resize", check);
|
|
380
|
+
}, []);
|
|
381
|
+
return /* @__PURE__ */ import_react5.default.createElement("nav", { style: { background: bg, borderBottom: "1px solid rgba(255,255,255,0.06)", fontFamily: "system-ui,sans-serif", width: "100%", boxSizing: "border-box", borderRadius: "12px" } }, /* @__PURE__ */ import_react5.default.createElement("div", { style: { maxWidth: "1100px", margin: "0 auto", padding: "0 20px", height: "60px", display: "flex", alignItems: "center", justifyContent: "space-between" } }, /* @__PURE__ */ import_react5.default.createElement("div", { style: { display: "flex", alignItems: "center", gap: "8px", cursor: "pointer" } }, /* @__PURE__ */ import_react5.default.createElement("div", { style: { width: "28px", height: "28px", borderRadius: "8px", background: "linear-gradient(135deg, " + accent + ", " + alpha(accent, 0.6) + ")", display: "flex", alignItems: "center", justifyContent: "center", fontSize: "13px", fontWeight: "800", color: "#fff" } }, logo[0]), /* @__PURE__ */ import_react5.default.createElement("span", { style: { fontSize: "15px", fontWeight: "800", color: "#fff" } }, logo)), !isMobile && /* @__PURE__ */ import_react5.default.createElement("div", { style: { display: "flex", gap: "2px" } }, links.map((link) => /* @__PURE__ */ import_react5.default.createElement("button", { key: link, onClick: () => {
|
|
382
|
+
setActive(link);
|
|
383
|
+
onLinkClick(link);
|
|
384
|
+
}, style: { background: active === link ? alpha(accent, 0.12) : "transparent", border: "none", padding: "7px 16px", borderRadius: "9px", fontSize: "14px", fontWeight: active === link ? "700" : "500", color: active === link ? accent : "rgba(255,255,255,0.5)", cursor: "pointer", fontFamily: "inherit" } }, link))), /* @__PURE__ */ import_react5.default.createElement("button", { onClick: onCtaClick, style: { padding: "8px 18px", borderRadius: "10px", border: "none", background: "linear-gradient(135deg, " + accent + ", " + alpha(accent, 0.75) + ")", color: "#fff", fontSize: "13px", fontWeight: "700", cursor: "pointer", fontFamily: "inherit" } }, ctaText)));
|
|
385
|
+
};
|
|
313
386
|
// Annotate the CommonJS export names for ESM import in node:
|
|
314
387
|
0 && (module.exports = {
|
|
315
388
|
Button,
|
|
389
|
+
Card,
|
|
316
390
|
EcommerceCard,
|
|
391
|
+
NavBar,
|
|
317
392
|
ProfileCard
|
|
318
393
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -273,8 +273,81 @@ 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
|
+
};
|
|
316
|
+
|
|
317
|
+
// src/components/NavBar/NavBar.jsx
|
|
318
|
+
import React5, { useState as useState4, useEffect } from "react";
|
|
319
|
+
var NavBar = ({
|
|
320
|
+
logo = "VirtualAI",
|
|
321
|
+
links = ["Home", "Features", "Pricing", "Blog"],
|
|
322
|
+
ctaText = "Get Started",
|
|
323
|
+
accent = "#6366f1",
|
|
324
|
+
bg = "#0f172a",
|
|
325
|
+
onCtaClick = () => {
|
|
326
|
+
},
|
|
327
|
+
onLinkClick = () => {
|
|
328
|
+
}
|
|
329
|
+
}) => {
|
|
330
|
+
const [active, setActive] = useState4("Home");
|
|
331
|
+
const [isMobile, setIsMobile] = useState4(false);
|
|
332
|
+
const alpha = (hex, op) => {
|
|
333
|
+
const r = parseInt(hex.slice(1, 3), 16), g = parseInt(hex.slice(3, 5), 16), b = parseInt(hex.slice(5, 7), 16);
|
|
334
|
+
return "rgba(" + r + "," + g + "," + b + "," + op + ")";
|
|
335
|
+
};
|
|
336
|
+
useEffect(() => {
|
|
337
|
+
const check = () => setIsMobile(window.innerWidth < 768);
|
|
338
|
+
check();
|
|
339
|
+
window.addEventListener("resize", check);
|
|
340
|
+
return () => window.removeEventListener("resize", check);
|
|
341
|
+
}, []);
|
|
342
|
+
return /* @__PURE__ */ React5.createElement("nav", { style: { background: bg, borderBottom: "1px solid rgba(255,255,255,0.06)", fontFamily: "system-ui,sans-serif", width: "100%", boxSizing: "border-box", borderRadius: "12px" } }, /* @__PURE__ */ React5.createElement("div", { style: { maxWidth: "1100px", margin: "0 auto", padding: "0 20px", height: "60px", display: "flex", alignItems: "center", justifyContent: "space-between" } }, /* @__PURE__ */ React5.createElement("div", { style: { display: "flex", alignItems: "center", gap: "8px", cursor: "pointer" } }, /* @__PURE__ */ React5.createElement("div", { style: { width: "28px", height: "28px", borderRadius: "8px", background: "linear-gradient(135deg, " + accent + ", " + alpha(accent, 0.6) + ")", display: "flex", alignItems: "center", justifyContent: "center", fontSize: "13px", fontWeight: "800", color: "#fff" } }, logo[0]), /* @__PURE__ */ React5.createElement("span", { style: { fontSize: "15px", fontWeight: "800", color: "#fff" } }, logo)), !isMobile && /* @__PURE__ */ React5.createElement("div", { style: { display: "flex", gap: "2px" } }, links.map((link) => /* @__PURE__ */ React5.createElement("button", { key: link, onClick: () => {
|
|
343
|
+
setActive(link);
|
|
344
|
+
onLinkClick(link);
|
|
345
|
+
}, style: { background: active === link ? alpha(accent, 0.12) : "transparent", border: "none", padding: "7px 16px", borderRadius: "9px", fontSize: "14px", fontWeight: active === link ? "700" : "500", color: active === link ? accent : "rgba(255,255,255,0.5)", cursor: "pointer", fontFamily: "inherit" } }, link))), /* @__PURE__ */ React5.createElement("button", { onClick: onCtaClick, style: { padding: "8px 18px", borderRadius: "10px", border: "none", background: "linear-gradient(135deg, " + accent + ", " + alpha(accent, 0.75) + ")", color: "#fff", fontSize: "13px", fontWeight: "700", cursor: "pointer", fontFamily: "inherit" } }, ctaText)));
|
|
346
|
+
};
|
|
276
347
|
export {
|
|
277
348
|
Button,
|
|
349
|
+
Card,
|
|
278
350
|
EcommerceCard,
|
|
351
|
+
NavBar,
|
|
279
352
|
ProfileCard
|
|
280
353
|
};
|