virtual-ui-lib 1.0.34 → 1.0.35
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 +52 -0
- package/dist/index.mjs +51 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -30,6 +30,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
30
|
var index_exports = {};
|
|
31
31
|
__export(index_exports, {
|
|
32
32
|
AlertBanner: () => AlertBanner,
|
|
33
|
+
AnimatedNavbar: () => AnimatedNavbar,
|
|
33
34
|
AnimatedProgressBar: () => AnimatedProgressBar,
|
|
34
35
|
Button: () => Button,
|
|
35
36
|
Card: () => Card,
|
|
@@ -1076,9 +1077,60 @@ var Rating = ({
|
|
|
1076
1077
|
);
|
|
1077
1078
|
}));
|
|
1078
1079
|
};
|
|
1080
|
+
|
|
1081
|
+
// src/components/AnimatedNavbar/AnimatedNavbar.jsx
|
|
1082
|
+
var import_react22 = __toESM(require("react"));
|
|
1083
|
+
var AnimatedNavbar = ({
|
|
1084
|
+
logo = "https://via.placeholder.com/100",
|
|
1085
|
+
links = [{ text: "Home", href: "#" }, { text: "About", href: "#" }, { text: "Services", href: "#" }, { text: "Contact", href: "#" }],
|
|
1086
|
+
bgColor = "#0f172a",
|
|
1087
|
+
textColor = "#f1f5f9",
|
|
1088
|
+
accentColor = "#7c3aed",
|
|
1089
|
+
radius = "8px"
|
|
1090
|
+
}) => {
|
|
1091
|
+
const [isOpen, setIsOpen] = import_react22.default.useState(false);
|
|
1092
|
+
return /* @__PURE__ */ import_react22.default.createElement("nav", { style: {
|
|
1093
|
+
background: bgColor,
|
|
1094
|
+
display: "flex",
|
|
1095
|
+
justifyContent: "space-between",
|
|
1096
|
+
alignItems: "center",
|
|
1097
|
+
padding: "10px 20px",
|
|
1098
|
+
borderRadius: radius,
|
|
1099
|
+
position: "relative",
|
|
1100
|
+
boxShadow: "0 4px 10px rgba(0,0,0,0.2)",
|
|
1101
|
+
transition: "background 0.3s"
|
|
1102
|
+
} }, /* @__PURE__ */ import_react22.default.createElement("img", { src: logo, alt: "Logo", style: { width: "100px" } }), /* @__PURE__ */ import_react22.default.createElement("div", { style: { display: "flex", alignItems: "center", gap: "15px" } }, /* @__PURE__ */ import_react22.default.createElement("button", { onClick: () => setIsOpen(!isOpen), style: {
|
|
1103
|
+
background: accentColor,
|
|
1104
|
+
color: textColor,
|
|
1105
|
+
border: "none",
|
|
1106
|
+
borderRadius: radius,
|
|
1107
|
+
padding: "8px 16px",
|
|
1108
|
+
fontWeight: "600",
|
|
1109
|
+
transition: "background 0.3s"
|
|
1110
|
+
} }, "Menu")), isOpen && /* @__PURE__ */ import_react22.default.createElement("div", { style: {
|
|
1111
|
+
position: "absolute",
|
|
1112
|
+
top: "100%",
|
|
1113
|
+
right: "0",
|
|
1114
|
+
background: bgColor,
|
|
1115
|
+
borderRadius: radius,
|
|
1116
|
+
boxShadow: "0 4px 10px rgba(0,0,0,0.2)",
|
|
1117
|
+
zIndex: 10,
|
|
1118
|
+
display: "flex",
|
|
1119
|
+
flexDirection: "column",
|
|
1120
|
+
gap: "10px",
|
|
1121
|
+
padding: "10px"
|
|
1122
|
+
} }, links.map((link) => /* @__PURE__ */ import_react22.default.createElement("a", { key: link.text, href: link.href, style: {
|
|
1123
|
+
color: textColor,
|
|
1124
|
+
textDecoration: "none",
|
|
1125
|
+
padding: "8px 12px",
|
|
1126
|
+
borderRadius: radius,
|
|
1127
|
+
transition: "background 0.3s"
|
|
1128
|
+
}, onMouseEnter: (e) => e.currentTarget.style.background = accentColor, onMouseLeave: (e) => e.currentTarget.style.background = "transparent" }, link.text))));
|
|
1129
|
+
};
|
|
1079
1130
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1080
1131
|
0 && (module.exports = {
|
|
1081
1132
|
AlertBanner,
|
|
1133
|
+
AnimatedNavbar,
|
|
1082
1134
|
AnimatedProgressBar,
|
|
1083
1135
|
Button,
|
|
1084
1136
|
Card,
|
package/dist/index.mjs
CHANGED
|
@@ -1021,8 +1021,59 @@ var Rating = ({
|
|
|
1021
1021
|
);
|
|
1022
1022
|
}));
|
|
1023
1023
|
};
|
|
1024
|
+
|
|
1025
|
+
// src/components/AnimatedNavbar/AnimatedNavbar.jsx
|
|
1026
|
+
import React22 from "react";
|
|
1027
|
+
var AnimatedNavbar = ({
|
|
1028
|
+
logo = "https://via.placeholder.com/100",
|
|
1029
|
+
links = [{ text: "Home", href: "#" }, { text: "About", href: "#" }, { text: "Services", href: "#" }, { text: "Contact", href: "#" }],
|
|
1030
|
+
bgColor = "#0f172a",
|
|
1031
|
+
textColor = "#f1f5f9",
|
|
1032
|
+
accentColor = "#7c3aed",
|
|
1033
|
+
radius = "8px"
|
|
1034
|
+
}) => {
|
|
1035
|
+
const [isOpen, setIsOpen] = React22.useState(false);
|
|
1036
|
+
return /* @__PURE__ */ React22.createElement("nav", { style: {
|
|
1037
|
+
background: bgColor,
|
|
1038
|
+
display: "flex",
|
|
1039
|
+
justifyContent: "space-between",
|
|
1040
|
+
alignItems: "center",
|
|
1041
|
+
padding: "10px 20px",
|
|
1042
|
+
borderRadius: radius,
|
|
1043
|
+
position: "relative",
|
|
1044
|
+
boxShadow: "0 4px 10px rgba(0,0,0,0.2)",
|
|
1045
|
+
transition: "background 0.3s"
|
|
1046
|
+
} }, /* @__PURE__ */ React22.createElement("img", { src: logo, alt: "Logo", style: { width: "100px" } }), /* @__PURE__ */ React22.createElement("div", { style: { display: "flex", alignItems: "center", gap: "15px" } }, /* @__PURE__ */ React22.createElement("button", { onClick: () => setIsOpen(!isOpen), style: {
|
|
1047
|
+
background: accentColor,
|
|
1048
|
+
color: textColor,
|
|
1049
|
+
border: "none",
|
|
1050
|
+
borderRadius: radius,
|
|
1051
|
+
padding: "8px 16px",
|
|
1052
|
+
fontWeight: "600",
|
|
1053
|
+
transition: "background 0.3s"
|
|
1054
|
+
} }, "Menu")), isOpen && /* @__PURE__ */ React22.createElement("div", { style: {
|
|
1055
|
+
position: "absolute",
|
|
1056
|
+
top: "100%",
|
|
1057
|
+
right: "0",
|
|
1058
|
+
background: bgColor,
|
|
1059
|
+
borderRadius: radius,
|
|
1060
|
+
boxShadow: "0 4px 10px rgba(0,0,0,0.2)",
|
|
1061
|
+
zIndex: 10,
|
|
1062
|
+
display: "flex",
|
|
1063
|
+
flexDirection: "column",
|
|
1064
|
+
gap: "10px",
|
|
1065
|
+
padding: "10px"
|
|
1066
|
+
} }, links.map((link) => /* @__PURE__ */ React22.createElement("a", { key: link.text, href: link.href, style: {
|
|
1067
|
+
color: textColor,
|
|
1068
|
+
textDecoration: "none",
|
|
1069
|
+
padding: "8px 12px",
|
|
1070
|
+
borderRadius: radius,
|
|
1071
|
+
transition: "background 0.3s"
|
|
1072
|
+
}, onMouseEnter: (e) => e.currentTarget.style.background = accentColor, onMouseLeave: (e) => e.currentTarget.style.background = "transparent" }, link.text))));
|
|
1073
|
+
};
|
|
1024
1074
|
export {
|
|
1025
1075
|
AlertBanner,
|
|
1076
|
+
AnimatedNavbar,
|
|
1026
1077
|
AnimatedProgressBar,
|
|
1027
1078
|
Button,
|
|
1028
1079
|
Card,
|