virtuo-ui-library 1.0.8 → 1.0.10
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 +142 -2
- package/dist/index.mjs +139 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -32,7 +32,9 @@ __export(index_exports, {
|
|
|
32
32
|
Button: () => Button,
|
|
33
33
|
Card: () => Card,
|
|
34
34
|
EcommerceCard: () => EcommerceCard,
|
|
35
|
-
|
|
35
|
+
NavBar: () => NavBar,
|
|
36
|
+
ProfileCard: () => ProfileCard,
|
|
37
|
+
SideBar: () => SideBar
|
|
36
38
|
});
|
|
37
39
|
module.exports = __toCommonJS(index_exports);
|
|
38
40
|
|
|
@@ -351,10 +353,148 @@ var Card = ({
|
|
|
351
353
|
/* @__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
354
|
);
|
|
353
355
|
};
|
|
356
|
+
|
|
357
|
+
// src/components/NavBar/NavBar.jsx
|
|
358
|
+
var import_react5 = __toESM(require("react"));
|
|
359
|
+
var NavBar = ({
|
|
360
|
+
logo = "VirtualAI",
|
|
361
|
+
links = ["Home", "Features", "Pricing", "Blog"],
|
|
362
|
+
ctaText = "Get Started",
|
|
363
|
+
accent = "#6366f1",
|
|
364
|
+
bg = "#0f172a",
|
|
365
|
+
onCtaClick = () => {
|
|
366
|
+
},
|
|
367
|
+
onLinkClick = () => {
|
|
368
|
+
}
|
|
369
|
+
}) => {
|
|
370
|
+
const [active, setActive] = (0, import_react5.useState)("Home");
|
|
371
|
+
const [isMobile, setIsMobile] = (0, import_react5.useState)(false);
|
|
372
|
+
const alpha = (hex, op) => {
|
|
373
|
+
const r = parseInt(hex.slice(1, 3), 16), g = parseInt(hex.slice(3, 5), 16), b = parseInt(hex.slice(5, 7), 16);
|
|
374
|
+
return "rgba(" + r + "," + g + "," + b + "," + op + ")";
|
|
375
|
+
};
|
|
376
|
+
(0, import_react5.useEffect)(() => {
|
|
377
|
+
const check = () => setIsMobile(window.innerWidth < 768);
|
|
378
|
+
check();
|
|
379
|
+
window.addEventListener("resize", check);
|
|
380
|
+
return () => window.removeEventListener("resize", check);
|
|
381
|
+
}, []);
|
|
382
|
+
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: () => {
|
|
383
|
+
setActive(link);
|
|
384
|
+
onLinkClick(link);
|
|
385
|
+
}, 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)));
|
|
386
|
+
};
|
|
387
|
+
|
|
388
|
+
// src/components/SideBar/SideBar.jsx
|
|
389
|
+
var import_react6 = __toESM(require("react"));
|
|
390
|
+
var SideBar = ({
|
|
391
|
+
items = ["Dashboard", "Projects", "Team", "Calendar", "Messages"],
|
|
392
|
+
activeItem = "Dashboard",
|
|
393
|
+
logo = "Company",
|
|
394
|
+
accent = "#6366f1",
|
|
395
|
+
bg = "#0f172a",
|
|
396
|
+
width = "280px",
|
|
397
|
+
onItemClick = () => {
|
|
398
|
+
}
|
|
399
|
+
}) => {
|
|
400
|
+
const [hoveredItem, setHoveredItem] = (0, import_react6.useState)(null);
|
|
401
|
+
const alpha = (hex, op) => {
|
|
402
|
+
const r = parseInt(hex.slice(1, 3), 16), g = parseInt(hex.slice(3, 5), 16), b = parseInt(hex.slice(5, 7), 16);
|
|
403
|
+
return "rgba(" + r + "," + g + "," + b + "," + op + ")";
|
|
404
|
+
};
|
|
405
|
+
return /* @__PURE__ */ import_react6.default.createElement("div", { style: {
|
|
406
|
+
width,
|
|
407
|
+
background: bg,
|
|
408
|
+
height: "100vh",
|
|
409
|
+
borderRight: "1px solid rgba(255,255,255,0.08)",
|
|
410
|
+
fontFamily: "system-ui,sans-serif",
|
|
411
|
+
display: "flex",
|
|
412
|
+
flexDirection: "column",
|
|
413
|
+
padding: "24px 0"
|
|
414
|
+
} }, /* @__PURE__ */ import_react6.default.createElement("div", { style: {
|
|
415
|
+
display: "flex",
|
|
416
|
+
alignItems: "center",
|
|
417
|
+
gap: "10px",
|
|
418
|
+
padding: "0 24px",
|
|
419
|
+
marginBottom: "32px"
|
|
420
|
+
} }, /* @__PURE__ */ import_react6.default.createElement("div", { style: {
|
|
421
|
+
width: "32px",
|
|
422
|
+
height: "32px",
|
|
423
|
+
borderRadius: "8px",
|
|
424
|
+
background: "linear-gradient(135deg, " + accent + ", " + alpha(accent, 0.7) + ")",
|
|
425
|
+
display: "flex",
|
|
426
|
+
alignItems: "center",
|
|
427
|
+
justifyContent: "center",
|
|
428
|
+
color: "#fff",
|
|
429
|
+
fontWeight: "700",
|
|
430
|
+
fontSize: "14px"
|
|
431
|
+
} }, logo[0]), /* @__PURE__ */ import_react6.default.createElement("div", { style: { color: "#fff", fontWeight: "700", fontSize: "16px" } }, logo)), /* @__PURE__ */ import_react6.default.createElement("div", { style: {
|
|
432
|
+
display: "flex",
|
|
433
|
+
flexDirection: "column",
|
|
434
|
+
gap: "4px",
|
|
435
|
+
padding: "0 16px"
|
|
436
|
+
} }, items.map((item) => /* @__PURE__ */ import_react6.default.createElement(
|
|
437
|
+
"button",
|
|
438
|
+
{
|
|
439
|
+
key: item,
|
|
440
|
+
onClick: () => onItemClick(item),
|
|
441
|
+
onMouseEnter: () => setHoveredItem(item),
|
|
442
|
+
onMouseLeave: () => setHoveredItem(null),
|
|
443
|
+
style: {
|
|
444
|
+
background: activeItem === item ? alpha(accent, 0.15) : hoveredItem === item ? "rgba(255,255,255,0.03)" : "transparent",
|
|
445
|
+
border: "none",
|
|
446
|
+
padding: "10px 16px",
|
|
447
|
+
borderRadius: "8px",
|
|
448
|
+
display: "flex",
|
|
449
|
+
alignItems: "center",
|
|
450
|
+
gap: "10px",
|
|
451
|
+
cursor: "pointer",
|
|
452
|
+
color: activeItem === item ? accent : "rgba(255,255,255,0.7)",
|
|
453
|
+
fontWeight: activeItem === item ? "600" : "500",
|
|
454
|
+
fontSize: "14px",
|
|
455
|
+
transition: "all 0.2s"
|
|
456
|
+
}
|
|
457
|
+
},
|
|
458
|
+
/* @__PURE__ */ import_react6.default.createElement("div", { style: {
|
|
459
|
+
width: "24px",
|
|
460
|
+
height: "24px",
|
|
461
|
+
borderRadius: "6px",
|
|
462
|
+
background: activeItem === item ? alpha(accent, 0.2) : "rgba(255,255,255,0.05)",
|
|
463
|
+
display: "flex",
|
|
464
|
+
alignItems: "center",
|
|
465
|
+
justifyContent: "center"
|
|
466
|
+
} }, /* @__PURE__ */ import_react6.default.createElement("div", { style: {
|
|
467
|
+
width: "4px",
|
|
468
|
+
height: "4px",
|
|
469
|
+
borderRadius: "50%",
|
|
470
|
+
background: activeItem === item ? accent : "rgba(255,255,255,0.3)"
|
|
471
|
+
} })),
|
|
472
|
+
item
|
|
473
|
+
))), /* @__PURE__ */ import_react6.default.createElement("div", { style: {
|
|
474
|
+
marginTop: "auto",
|
|
475
|
+
padding: "16px 24px",
|
|
476
|
+
borderTop: "1px solid rgba(255,255,255,0.08)"
|
|
477
|
+
} }, /* @__PURE__ */ import_react6.default.createElement("div", { style: {
|
|
478
|
+
display: "flex",
|
|
479
|
+
alignItems: "center",
|
|
480
|
+
gap: "10px",
|
|
481
|
+
padding: "8px 12px",
|
|
482
|
+
borderRadius: "8px",
|
|
483
|
+
background: "rgba(255,255,255,0.03)",
|
|
484
|
+
cursor: "pointer"
|
|
485
|
+
} }, /* @__PURE__ */ import_react6.default.createElement("div", { style: {
|
|
486
|
+
width: "32px",
|
|
487
|
+
height: "32px",
|
|
488
|
+
borderRadius: "50%",
|
|
489
|
+
background: "rgba(255,255,255,0.1)"
|
|
490
|
+
} }), /* @__PURE__ */ import_react6.default.createElement("div", null, /* @__PURE__ */ import_react6.default.createElement("div", { style: { color: "#fff", fontSize: "13px", fontWeight: "600" } }, "John Doe"), /* @__PURE__ */ import_react6.default.createElement("div", { style: { color: "rgba(255,255,255,0.4)", fontSize: "11px" } }, "Admin")))));
|
|
491
|
+
};
|
|
354
492
|
// Annotate the CommonJS export names for ESM import in node:
|
|
355
493
|
0 && (module.exports = {
|
|
356
494
|
Button,
|
|
357
495
|
Card,
|
|
358
496
|
EcommerceCard,
|
|
359
|
-
|
|
497
|
+
NavBar,
|
|
498
|
+
ProfileCard,
|
|
499
|
+
SideBar
|
|
360
500
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -313,9 +313,147 @@ var Card = ({
|
|
|
313
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
314
|
);
|
|
315
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
|
+
};
|
|
347
|
+
|
|
348
|
+
// src/components/SideBar/SideBar.jsx
|
|
349
|
+
import React6, { useState as useState5 } from "react";
|
|
350
|
+
var SideBar = ({
|
|
351
|
+
items = ["Dashboard", "Projects", "Team", "Calendar", "Messages"],
|
|
352
|
+
activeItem = "Dashboard",
|
|
353
|
+
logo = "Company",
|
|
354
|
+
accent = "#6366f1",
|
|
355
|
+
bg = "#0f172a",
|
|
356
|
+
width = "280px",
|
|
357
|
+
onItemClick = () => {
|
|
358
|
+
}
|
|
359
|
+
}) => {
|
|
360
|
+
const [hoveredItem, setHoveredItem] = useState5(null);
|
|
361
|
+
const alpha = (hex, op) => {
|
|
362
|
+
const r = parseInt(hex.slice(1, 3), 16), g = parseInt(hex.slice(3, 5), 16), b = parseInt(hex.slice(5, 7), 16);
|
|
363
|
+
return "rgba(" + r + "," + g + "," + b + "," + op + ")";
|
|
364
|
+
};
|
|
365
|
+
return /* @__PURE__ */ React6.createElement("div", { style: {
|
|
366
|
+
width,
|
|
367
|
+
background: bg,
|
|
368
|
+
height: "100vh",
|
|
369
|
+
borderRight: "1px solid rgba(255,255,255,0.08)",
|
|
370
|
+
fontFamily: "system-ui,sans-serif",
|
|
371
|
+
display: "flex",
|
|
372
|
+
flexDirection: "column",
|
|
373
|
+
padding: "24px 0"
|
|
374
|
+
} }, /* @__PURE__ */ React6.createElement("div", { style: {
|
|
375
|
+
display: "flex",
|
|
376
|
+
alignItems: "center",
|
|
377
|
+
gap: "10px",
|
|
378
|
+
padding: "0 24px",
|
|
379
|
+
marginBottom: "32px"
|
|
380
|
+
} }, /* @__PURE__ */ React6.createElement("div", { style: {
|
|
381
|
+
width: "32px",
|
|
382
|
+
height: "32px",
|
|
383
|
+
borderRadius: "8px",
|
|
384
|
+
background: "linear-gradient(135deg, " + accent + ", " + alpha(accent, 0.7) + ")",
|
|
385
|
+
display: "flex",
|
|
386
|
+
alignItems: "center",
|
|
387
|
+
justifyContent: "center",
|
|
388
|
+
color: "#fff",
|
|
389
|
+
fontWeight: "700",
|
|
390
|
+
fontSize: "14px"
|
|
391
|
+
} }, logo[0]), /* @__PURE__ */ React6.createElement("div", { style: { color: "#fff", fontWeight: "700", fontSize: "16px" } }, logo)), /* @__PURE__ */ React6.createElement("div", { style: {
|
|
392
|
+
display: "flex",
|
|
393
|
+
flexDirection: "column",
|
|
394
|
+
gap: "4px",
|
|
395
|
+
padding: "0 16px"
|
|
396
|
+
} }, items.map((item) => /* @__PURE__ */ React6.createElement(
|
|
397
|
+
"button",
|
|
398
|
+
{
|
|
399
|
+
key: item,
|
|
400
|
+
onClick: () => onItemClick(item),
|
|
401
|
+
onMouseEnter: () => setHoveredItem(item),
|
|
402
|
+
onMouseLeave: () => setHoveredItem(null),
|
|
403
|
+
style: {
|
|
404
|
+
background: activeItem === item ? alpha(accent, 0.15) : hoveredItem === item ? "rgba(255,255,255,0.03)" : "transparent",
|
|
405
|
+
border: "none",
|
|
406
|
+
padding: "10px 16px",
|
|
407
|
+
borderRadius: "8px",
|
|
408
|
+
display: "flex",
|
|
409
|
+
alignItems: "center",
|
|
410
|
+
gap: "10px",
|
|
411
|
+
cursor: "pointer",
|
|
412
|
+
color: activeItem === item ? accent : "rgba(255,255,255,0.7)",
|
|
413
|
+
fontWeight: activeItem === item ? "600" : "500",
|
|
414
|
+
fontSize: "14px",
|
|
415
|
+
transition: "all 0.2s"
|
|
416
|
+
}
|
|
417
|
+
},
|
|
418
|
+
/* @__PURE__ */ React6.createElement("div", { style: {
|
|
419
|
+
width: "24px",
|
|
420
|
+
height: "24px",
|
|
421
|
+
borderRadius: "6px",
|
|
422
|
+
background: activeItem === item ? alpha(accent, 0.2) : "rgba(255,255,255,0.05)",
|
|
423
|
+
display: "flex",
|
|
424
|
+
alignItems: "center",
|
|
425
|
+
justifyContent: "center"
|
|
426
|
+
} }, /* @__PURE__ */ React6.createElement("div", { style: {
|
|
427
|
+
width: "4px",
|
|
428
|
+
height: "4px",
|
|
429
|
+
borderRadius: "50%",
|
|
430
|
+
background: activeItem === item ? accent : "rgba(255,255,255,0.3)"
|
|
431
|
+
} })),
|
|
432
|
+
item
|
|
433
|
+
))), /* @__PURE__ */ React6.createElement("div", { style: {
|
|
434
|
+
marginTop: "auto",
|
|
435
|
+
padding: "16px 24px",
|
|
436
|
+
borderTop: "1px solid rgba(255,255,255,0.08)"
|
|
437
|
+
} }, /* @__PURE__ */ React6.createElement("div", { style: {
|
|
438
|
+
display: "flex",
|
|
439
|
+
alignItems: "center",
|
|
440
|
+
gap: "10px",
|
|
441
|
+
padding: "8px 12px",
|
|
442
|
+
borderRadius: "8px",
|
|
443
|
+
background: "rgba(255,255,255,0.03)",
|
|
444
|
+
cursor: "pointer"
|
|
445
|
+
} }, /* @__PURE__ */ React6.createElement("div", { style: {
|
|
446
|
+
width: "32px",
|
|
447
|
+
height: "32px",
|
|
448
|
+
borderRadius: "50%",
|
|
449
|
+
background: "rgba(255,255,255,0.1)"
|
|
450
|
+
} }), /* @__PURE__ */ React6.createElement("div", null, /* @__PURE__ */ React6.createElement("div", { style: { color: "#fff", fontSize: "13px", fontWeight: "600" } }, "John Doe"), /* @__PURE__ */ React6.createElement("div", { style: { color: "rgba(255,255,255,0.4)", fontSize: "11px" } }, "Admin")))));
|
|
451
|
+
};
|
|
316
452
|
export {
|
|
317
453
|
Button,
|
|
318
454
|
Card,
|
|
319
455
|
EcommerceCard,
|
|
320
|
-
|
|
456
|
+
NavBar,
|
|
457
|
+
ProfileCard,
|
|
458
|
+
SideBar
|
|
321
459
|
};
|