virtuo-ui-library 1.0.8 → 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 CHANGED
@@ -32,6 +32,7 @@ __export(index_exports, {
32
32
  Button: () => Button,
33
33
  Card: () => Card,
34
34
  EcommerceCard: () => EcommerceCard,
35
+ NavBar: () => NavBar,
35
36
  ProfileCard: () => ProfileCard
36
37
  });
37
38
  module.exports = __toCommonJS(index_exports);
@@ -351,10 +352,42 @@ var Card = ({
351
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))
352
353
  );
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
+ };
354
386
  // Annotate the CommonJS export names for ESM import in node:
355
387
  0 && (module.exports = {
356
388
  Button,
357
389
  Card,
358
390
  EcommerceCard,
391
+ NavBar,
359
392
  ProfileCard
360
393
  });
package/dist/index.mjs CHANGED
@@ -313,9 +313,41 @@ 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
+ };
316
347
  export {
317
348
  Button,
318
349
  Card,
319
350
  EcommerceCard,
351
+ NavBar,
320
352
  ProfileCard
321
353
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "virtuo-ui-library",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "Virtual UI React Component Library",
5
5
  "license": "ISC",
6
6
  "author": "Ritik Saini",