virtual-ui-lib 1.0.45 → 1.0.47

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
@@ -33,7 +33,9 @@ __export(index_exports, {
33
33
  CustomInputField: () => CustomInputField,
34
34
  LoadingSpinner: () => LoadingSpinner,
35
35
  OtpInput: () => OtpInput,
36
+ ResponsiveNavbar: () => ResponsiveNavbar,
36
37
  SearchBar: () => SearchBar,
38
+ SkeletonLoader: () => SkeletonLoader,
37
39
  SmartButton: () => SmartButton,
38
40
  StatCard: () => StatCard,
39
41
  TextArea: () => TextArea,
@@ -474,13 +476,69 @@ var import_react9 = __toESM(require("react"));
474
476
  var LoadingSpinner = ({ size = "40px", color = "#7c3aed", speed = "1s" }) => {
475
477
  return /* @__PURE__ */ import_react9.default.createElement("div", { style: { border: `4px solid ${color}`, borderTop: `4px solid transparent`, borderRadius: "50%", width: size, height: size, animation: `spin ${speed} linear infinite` } });
476
478
  };
479
+
480
+ // src/components/SkeletonLoader/SkeletonLoader.jsx
481
+ var import_react10 = __toESM(require("react"));
482
+ var SkeletonLoader = ({ width = "100%", height = "20px", bg = "#1e293b", accent = "#7c3aed", radius = "12px", padding = "0" }) => {
483
+ const shimmerStyle = {
484
+ background: `linear-gradient(90deg, ${accent} 25%, ${bg} 50%, ${accent} 75%)`,
485
+ backgroundSize: "200% 100%",
486
+ animation: "shimmer 1.5s infinite",
487
+ borderRadius: radius
488
+ };
489
+ return /* @__PURE__ */ import_react10.default.createElement("div", { style: { padding } }, /* @__PURE__ */ import_react10.default.createElement("div", { style: { ...shimmerStyle, width, height, marginBottom: "10px" } }), /* @__PURE__ */ import_react10.default.createElement("div", { style: { ...shimmerStyle, width, height, marginBottom: "10px" } }), /* @__PURE__ */ import_react10.default.createElement("div", { style: { ...shimmerStyle, width, height } }), /* @__PURE__ */ import_react10.default.createElement("style", null, `@keyframes shimmer {
490
+ 0% {
491
+ background-position: 200% 0;
492
+ }
493
+ 100% {
494
+ background-position: 0 0;
495
+ }
496
+ }`));
497
+ };
498
+
499
+ // src/components/ResponsiveNavbar/ResponsiveNavbar.jsx
500
+ var import_react11 = __toESM(require("react"));
501
+ var ResponsiveNavbar = ({
502
+ logo = "Logo",
503
+ navItems = [],
504
+ bg = "#1e293b",
505
+ textColor = "#f1f5f9",
506
+ accent = "#7c3aed",
507
+ padding = "10px 20px",
508
+ radius = "8px",
509
+ placeholder = "Search...",
510
+ onNavItemClick = () => {
511
+ },
512
+ onSearchChange = () => {
513
+ },
514
+ profileAvatar = "https://via.placeholder.com/40"
515
+ }) => {
516
+ const [menuActive, setMenuActive] = (0, import_react11.useState)(false);
517
+ const [searchValue, setSearchValue] = (0, import_react11.useState)("");
518
+ const handleSearchChange = (e) => {
519
+ setSearchValue(e.target.value);
520
+ onSearchChange(e.target.value);
521
+ };
522
+ return /* @__PURE__ */ import_react11.default.createElement("nav", { style: { background: bg, color: textColor, padding, borderRadius: radius, display: "flex", justifyContent: "space-between", alignItems: "center" } }, /* @__PURE__ */ import_react11.default.createElement("div", { style: { display: "flex", alignItems: "center" } }, /* @__PURE__ */ import_react11.default.createElement("div", { style: { fontSize: "24px", fontWeight: "bold" } }, logo), /* @__PURE__ */ import_react11.default.createElement("div", { style: { display: "flex", marginLeft: "20px" } }, navItems.map((item, index) => /* @__PURE__ */ import_react11.default.createElement("div", { key: index, onClick: () => onNavItemClick(item), style: { margin: "0 10px", cursor: "pointer", color: item.active ? accent : textColor } }, item.label)))), /* @__PURE__ */ import_react11.default.createElement("div", { style: { display: "flex", alignItems: "center" } }, /* @__PURE__ */ import_react11.default.createElement(
523
+ "input",
524
+ {
525
+ type: "text",
526
+ value: searchValue,
527
+ placeholder,
528
+ onChange: handleSearchChange,
529
+ style: { background: "#0f172a", color: textColor, border: "none", borderRadius: radius, padding: "8px", marginRight: "20px" }
530
+ }
531
+ ), /* @__PURE__ */ import_react11.default.createElement("img", { src: profileAvatar, alt: "Profile", style: { borderRadius: "50%", width: "40px", height: "40px" } }), /* @__PURE__ */ import_react11.default.createElement("div", { onClick: () => setMenuActive(!menuActive), style: { cursor: "pointer", marginLeft: "20px" } }, "\u2630")), menuActive && /* @__PURE__ */ import_react11.default.createElement("div", { style: { position: "absolute", top: "60px", right: "20px", background: bg, borderRadius: radius, boxShadow: "0 4px 8px rgba(0,0,0,0.3)", zIndex: 1 } }, navItems.map((item, index) => /* @__PURE__ */ import_react11.default.createElement("div", { key: index, onClick: () => onNavItemClick(item), style: { padding: "10px", color: item.active ? accent : textColor } }, item.label))));
532
+ };
477
533
  // Annotate the CommonJS export names for ESM import in node:
478
534
  0 && (module.exports = {
479
535
  CodeBlock,
480
536
  CustomInputField,
481
537
  LoadingSpinner,
482
538
  OtpInput,
539
+ ResponsiveNavbar,
483
540
  SearchBar,
541
+ SkeletonLoader,
484
542
  SmartButton,
485
543
  StatCard,
486
544
  TextArea,
package/dist/index.mjs CHANGED
@@ -431,12 +431,68 @@ import React9 from "react";
431
431
  var LoadingSpinner = ({ size = "40px", color = "#7c3aed", speed = "1s" }) => {
432
432
  return /* @__PURE__ */ React9.createElement("div", { style: { border: `4px solid ${color}`, borderTop: `4px solid transparent`, borderRadius: "50%", width: size, height: size, animation: `spin ${speed} linear infinite` } });
433
433
  };
434
+
435
+ // src/components/SkeletonLoader/SkeletonLoader.jsx
436
+ import React10 from "react";
437
+ var SkeletonLoader = ({ width = "100%", height = "20px", bg = "#1e293b", accent = "#7c3aed", radius = "12px", padding = "0" }) => {
438
+ const shimmerStyle = {
439
+ background: `linear-gradient(90deg, ${accent} 25%, ${bg} 50%, ${accent} 75%)`,
440
+ backgroundSize: "200% 100%",
441
+ animation: "shimmer 1.5s infinite",
442
+ borderRadius: radius
443
+ };
444
+ return /* @__PURE__ */ React10.createElement("div", { style: { padding } }, /* @__PURE__ */ React10.createElement("div", { style: { ...shimmerStyle, width, height, marginBottom: "10px" } }), /* @__PURE__ */ React10.createElement("div", { style: { ...shimmerStyle, width, height, marginBottom: "10px" } }), /* @__PURE__ */ React10.createElement("div", { style: { ...shimmerStyle, width, height } }), /* @__PURE__ */ React10.createElement("style", null, `@keyframes shimmer {
445
+ 0% {
446
+ background-position: 200% 0;
447
+ }
448
+ 100% {
449
+ background-position: 0 0;
450
+ }
451
+ }`));
452
+ };
453
+
454
+ // src/components/ResponsiveNavbar/ResponsiveNavbar.jsx
455
+ import React11, { useState as useState8 } from "react";
456
+ var ResponsiveNavbar = ({
457
+ logo = "Logo",
458
+ navItems = [],
459
+ bg = "#1e293b",
460
+ textColor = "#f1f5f9",
461
+ accent = "#7c3aed",
462
+ padding = "10px 20px",
463
+ radius = "8px",
464
+ placeholder = "Search...",
465
+ onNavItemClick = () => {
466
+ },
467
+ onSearchChange = () => {
468
+ },
469
+ profileAvatar = "https://via.placeholder.com/40"
470
+ }) => {
471
+ const [menuActive, setMenuActive] = useState8(false);
472
+ const [searchValue, setSearchValue] = useState8("");
473
+ const handleSearchChange = (e) => {
474
+ setSearchValue(e.target.value);
475
+ onSearchChange(e.target.value);
476
+ };
477
+ return /* @__PURE__ */ React11.createElement("nav", { style: { background: bg, color: textColor, padding, borderRadius: radius, display: "flex", justifyContent: "space-between", alignItems: "center" } }, /* @__PURE__ */ React11.createElement("div", { style: { display: "flex", alignItems: "center" } }, /* @__PURE__ */ React11.createElement("div", { style: { fontSize: "24px", fontWeight: "bold" } }, logo), /* @__PURE__ */ React11.createElement("div", { style: { display: "flex", marginLeft: "20px" } }, navItems.map((item, index) => /* @__PURE__ */ React11.createElement("div", { key: index, onClick: () => onNavItemClick(item), style: { margin: "0 10px", cursor: "pointer", color: item.active ? accent : textColor } }, item.label)))), /* @__PURE__ */ React11.createElement("div", { style: { display: "flex", alignItems: "center" } }, /* @__PURE__ */ React11.createElement(
478
+ "input",
479
+ {
480
+ type: "text",
481
+ value: searchValue,
482
+ placeholder,
483
+ onChange: handleSearchChange,
484
+ style: { background: "#0f172a", color: textColor, border: "none", borderRadius: radius, padding: "8px", marginRight: "20px" }
485
+ }
486
+ ), /* @__PURE__ */ React11.createElement("img", { src: profileAvatar, alt: "Profile", style: { borderRadius: "50%", width: "40px", height: "40px" } }), /* @__PURE__ */ React11.createElement("div", { onClick: () => setMenuActive(!menuActive), style: { cursor: "pointer", marginLeft: "20px" } }, "\u2630")), menuActive && /* @__PURE__ */ React11.createElement("div", { style: { position: "absolute", top: "60px", right: "20px", background: bg, borderRadius: radius, boxShadow: "0 4px 8px rgba(0,0,0,0.3)", zIndex: 1 } }, navItems.map((item, index) => /* @__PURE__ */ React11.createElement("div", { key: index, onClick: () => onNavItemClick(item), style: { padding: "10px", color: item.active ? accent : textColor } }, item.label))));
487
+ };
434
488
  export {
435
489
  CodeBlock,
436
490
  CustomInputField,
437
491
  LoadingSpinner,
438
492
  OtpInput,
493
+ ResponsiveNavbar,
439
494
  SearchBar,
495
+ SkeletonLoader,
440
496
  SmartButton,
441
497
  StatCard,
442
498
  TextArea,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "virtual-ui-lib",
3
- "version": "1.0.45",
3
+ "version": "1.0.47",
4
4
  "description": "Virtual UI React Component Library",
5
5
  "author": "Ankush",
6
6
  "license": "ISC",