pre-react-ui-lib 1.0.0 → 1.0.1
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/README.md +1 -12
- package/dist/index.js +5 -233
- package/dist/index.mjs +8 -236
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,19 +1,8 @@
|
|
|
1
|
-
# 🌐 Live Demo
|
|
2
|
-
|
|
3
|
-
👉 https://virtual-ui-client.onrender.com
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Virtual UI
|
|
8
|
-
|
|
9
|
-
A modern and customizable **React UI Component Library** designed for fast development and clean design systems.
|
|
10
|
-
|
|
11
|
-
---
|
|
12
1
|
|
|
13
2
|
## 📦 Install
|
|
14
3
|
|
|
15
4
|
```bash
|
|
16
|
-
npm
|
|
5
|
+
npm i pre-react-ui-lib
|
|
17
6
|
```
|
|
18
7
|
|
|
19
8
|
---
|
package/dist/index.js
CHANGED
|
@@ -47,249 +47,21 @@ module.exports = __toCommonJS(index_exports);
|
|
|
47
47
|
var import_react = __toESM(require("react"));
|
|
48
48
|
var Navbar = ({
|
|
49
49
|
logo = "VirtualAI",
|
|
50
|
-
links = ["Home", "
|
|
51
|
-
ctaText = "Get Started",
|
|
50
|
+
links = ["Home", "About", "Contact"],
|
|
52
51
|
accent = "#6366f1",
|
|
53
52
|
bg = "#0f172a",
|
|
54
|
-
onCtaClick = () => {
|
|
55
|
-
},
|
|
56
53
|
onLinkClick = () => {
|
|
57
54
|
}
|
|
58
55
|
}) => {
|
|
59
|
-
const [scrolled, setScrolled] = (0, import_react.useState)(false);
|
|
60
|
-
const [menuOpen, setMenuOpen] = (0, import_react.useState)(false);
|
|
61
56
|
const [active, setActive] = (0, import_react.useState)("Home");
|
|
62
|
-
const [isMobile, setIsMobile] = (0, import_react.useState)(false);
|
|
63
57
|
const alpha = (hex, op) => {
|
|
64
|
-
const r = parseInt(hex.slice(1, 3), 16);
|
|
65
|
-
|
|
66
|
-
const b = parseInt(hex.slice(5, 7), 16);
|
|
67
|
-
return `rgba(${r},${g},${b},${op})`;
|
|
58
|
+
const r = parseInt(hex.slice(1, 3), 16), g = parseInt(hex.slice(3, 5), 16), b = parseInt(hex.slice(5, 7), 16);
|
|
59
|
+
return "rgba(" + r + "," + g + "," + b + "," + op + ")";
|
|
68
60
|
};
|
|
69
|
-
(0, import_react.
|
|
70
|
-
const checkMobile = () => setIsMobile(window.innerWidth < 768);
|
|
71
|
-
checkMobile();
|
|
72
|
-
window.addEventListener("resize", checkMobile);
|
|
73
|
-
return () => window.removeEventListener("resize", checkMobile);
|
|
74
|
-
}, []);
|
|
75
|
-
(0, import_react.useEffect)(() => {
|
|
76
|
-
const handler = () => setScrolled(window.scrollY > 10);
|
|
77
|
-
window.addEventListener("scroll", handler);
|
|
78
|
-
return () => window.removeEventListener("scroll", handler);
|
|
79
|
-
}, []);
|
|
80
|
-
(0, import_react.useEffect)(() => {
|
|
81
|
-
if (!isMobile) setMenuOpen(false);
|
|
82
|
-
}, [isMobile]);
|
|
83
|
-
const handleLink = (link) => {
|
|
61
|
+
return /* @__PURE__ */ import_react.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_react.default.createElement("div", { style: { maxWidth: "1100px", margin: "0 auto", padding: "0 20px", height: "60px", display: "flex", alignItems: "center", justifyContent: "space-between" } }, /* @__PURE__ */ import_react.default.createElement("div", { style: { display: "flex", alignItems: "center", gap: "8px", cursor: "pointer" } }, /* @__PURE__ */ import_react.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_react.default.createElement("span", { style: { fontSize: "15px", fontWeight: "800", color: "#fff" } }, logo)), /* @__PURE__ */ import_react.default.createElement("div", { style: { display: "flex", gap: "2px" } }, links.map((link) => /* @__PURE__ */ import_react.default.createElement("button", { key: link, onClick: () => {
|
|
84
62
|
setActive(link);
|
|
85
|
-
setMenuOpen(false);
|
|
86
63
|
onLinkClick(link);
|
|
87
|
-
};
|
|
88
|
-
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("style", null, `
|
|
89
|
-
@keyframes nbSlideDown {
|
|
90
|
-
from { opacity: 0; transform: translateY(-8px); }
|
|
91
|
-
to { opacity: 1; transform: translateY(0); }
|
|
92
|
-
}
|
|
93
|
-
.nb-link:hover { color: rgba(255,255,255,0.9) !important; background: rgba(255,255,255,0.05) !important; }
|
|
94
|
-
.nb-cta:hover { opacity: 0.85 !important; }
|
|
95
|
-
.nb-ham:hover { background: rgba(255,255,255,0.1) !important; }
|
|
96
|
-
.nb-mlink:hover { background: rgba(255,255,255,0.06) !important; }
|
|
97
|
-
`), /* @__PURE__ */ import_react.default.createElement("nav", { style: {
|
|
98
|
-
position: "sticky",
|
|
99
|
-
top: 0,
|
|
100
|
-
left: 0,
|
|
101
|
-
right: 0,
|
|
102
|
-
zIndex: 1e3,
|
|
103
|
-
background: scrolled ? alpha(bg, 0.96) : bg,
|
|
104
|
-
borderBottom: `1px solid ${scrolled ? "rgba(255,255,255,0.09)" : "rgba(255,255,255,0.04)"}`,
|
|
105
|
-
backdropFilter: scrolled ? "blur(12px)" : "none",
|
|
106
|
-
WebkitBackdropFilter: scrolled ? "blur(12px)" : "none",
|
|
107
|
-
transition: "all 0.3s ease",
|
|
108
|
-
fontFamily: "system-ui, -apple-system, sans-serif",
|
|
109
|
-
width: "100%",
|
|
110
|
-
boxSizing: "border-box"
|
|
111
|
-
} }, /* @__PURE__ */ import_react.default.createElement("div", { style: {
|
|
112
|
-
maxWidth: "1200px",
|
|
113
|
-
margin: "0 auto",
|
|
114
|
-
padding: "0 20px",
|
|
115
|
-
height: isMobile ? "56px" : "64px",
|
|
116
|
-
display: "flex",
|
|
117
|
-
alignItems: "center",
|
|
118
|
-
justifyContent: "space-between",
|
|
119
|
-
gap: "16px",
|
|
120
|
-
boxSizing: "border-box"
|
|
121
|
-
} }, /* @__PURE__ */ import_react.default.createElement("div", { style: { display: "flex", alignItems: "center", gap: "8px", cursor: "pointer", flexShrink: 0 } }, /* @__PURE__ */ import_react.default.createElement("div", { style: {
|
|
122
|
-
width: isMobile ? "26px" : "30px",
|
|
123
|
-
height: isMobile ? "26px" : "30px",
|
|
124
|
-
borderRadius: "8px",
|
|
125
|
-
background: `linear-gradient(135deg, ${accent}, ${alpha(accent, 0.6)})`,
|
|
126
|
-
display: "flex",
|
|
127
|
-
alignItems: "center",
|
|
128
|
-
justifyContent: "center",
|
|
129
|
-
fontSize: isMobile ? "12px" : "14px",
|
|
130
|
-
fontWeight: "800",
|
|
131
|
-
color: "#fff",
|
|
132
|
-
flexShrink: 0
|
|
133
|
-
} }, logo[0]), /* @__PURE__ */ import_react.default.createElement("span", { style: {
|
|
134
|
-
fontSize: isMobile ? "14px" : "16px",
|
|
135
|
-
fontWeight: "800",
|
|
136
|
-
color: "#fff",
|
|
137
|
-
letterSpacing: "-0.3px"
|
|
138
|
-
} }, logo)), !isMobile && /* @__PURE__ */ import_react.default.createElement("div", { style: { display: "flex", alignItems: "center", gap: "2px", flex: 1, justifyContent: "center" } }, links.map((link) => /* @__PURE__ */ import_react.default.createElement(
|
|
139
|
-
"button",
|
|
140
|
-
{
|
|
141
|
-
key: link,
|
|
142
|
-
className: "nb-link",
|
|
143
|
-
onClick: () => handleLink(link),
|
|
144
|
-
style: {
|
|
145
|
-
background: active === link ? alpha(accent, 0.12) : "transparent",
|
|
146
|
-
border: "none",
|
|
147
|
-
padding: "7px 16px",
|
|
148
|
-
borderRadius: "9px",
|
|
149
|
-
fontSize: "14px",
|
|
150
|
-
fontWeight: active === link ? "700" : "500",
|
|
151
|
-
color: active === link ? accent : "rgba(255,255,255,0.5)",
|
|
152
|
-
cursor: "pointer",
|
|
153
|
-
transition: "all 0.2s",
|
|
154
|
-
fontFamily: "inherit",
|
|
155
|
-
whiteSpace: "nowrap"
|
|
156
|
-
}
|
|
157
|
-
},
|
|
158
|
-
link
|
|
159
|
-
))), /* @__PURE__ */ import_react.default.createElement("div", { style: { display: "flex", alignItems: "center", gap: "8px", flexShrink: 0 } }, /* @__PURE__ */ import_react.default.createElement(
|
|
160
|
-
"button",
|
|
161
|
-
{
|
|
162
|
-
className: "nb-cta",
|
|
163
|
-
onClick: onCtaClick,
|
|
164
|
-
style: {
|
|
165
|
-
padding: isMobile ? "7px 14px" : "9px 20px",
|
|
166
|
-
borderRadius: "10px",
|
|
167
|
-
border: "none",
|
|
168
|
-
background: `linear-gradient(135deg, ${accent}, ${alpha(accent, 0.75)})`,
|
|
169
|
-
color: "#fff",
|
|
170
|
-
fontSize: isMobile ? "12px" : "13px",
|
|
171
|
-
fontWeight: "700",
|
|
172
|
-
cursor: "pointer",
|
|
173
|
-
fontFamily: "inherit",
|
|
174
|
-
transition: "opacity 0.2s",
|
|
175
|
-
whiteSpace: "nowrap"
|
|
176
|
-
}
|
|
177
|
-
},
|
|
178
|
-
ctaText
|
|
179
|
-
), isMobile && /* @__PURE__ */ import_react.default.createElement(
|
|
180
|
-
"button",
|
|
181
|
-
{
|
|
182
|
-
className: "nb-ham",
|
|
183
|
-
onClick: () => setMenuOpen((o) => !o),
|
|
184
|
-
style: {
|
|
185
|
-
background: "rgba(255,255,255,0.06)",
|
|
186
|
-
border: "1px solid rgba(255,255,255,0.1)",
|
|
187
|
-
borderRadius: "8px",
|
|
188
|
-
width: "34px",
|
|
189
|
-
height: "34px",
|
|
190
|
-
cursor: "pointer",
|
|
191
|
-
display: "flex",
|
|
192
|
-
flexDirection: "column",
|
|
193
|
-
alignItems: "center",
|
|
194
|
-
justifyContent: "center",
|
|
195
|
-
gap: "5px",
|
|
196
|
-
transition: "background 0.2s",
|
|
197
|
-
flexShrink: 0,
|
|
198
|
-
padding: 0
|
|
199
|
-
}
|
|
200
|
-
},
|
|
201
|
-
/* @__PURE__ */ import_react.default.createElement("div", { style: {
|
|
202
|
-
width: "16px",
|
|
203
|
-
height: "1.5px",
|
|
204
|
-
background: "rgba(255,255,255,0.7)",
|
|
205
|
-
borderRadius: "2px",
|
|
206
|
-
transform: menuOpen ? "rotate(45deg) translate(4px, 4px)" : "none",
|
|
207
|
-
transition: "transform 0.25s"
|
|
208
|
-
} }),
|
|
209
|
-
/* @__PURE__ */ import_react.default.createElement("div", { style: {
|
|
210
|
-
width: "16px",
|
|
211
|
-
height: "1.5px",
|
|
212
|
-
background: "rgba(255,255,255,0.7)",
|
|
213
|
-
borderRadius: "2px",
|
|
214
|
-
opacity: menuOpen ? 0 : 1,
|
|
215
|
-
transition: "opacity 0.2s"
|
|
216
|
-
} }),
|
|
217
|
-
/* @__PURE__ */ import_react.default.createElement("div", { style: {
|
|
218
|
-
width: "16px",
|
|
219
|
-
height: "1.5px",
|
|
220
|
-
background: "rgba(255,255,255,0.7)",
|
|
221
|
-
borderRadius: "2px",
|
|
222
|
-
transform: menuOpen ? "rotate(-45deg) translate(4px, -4px)" : "none",
|
|
223
|
-
transition: "transform 0.25s"
|
|
224
|
-
} })
|
|
225
|
-
))), isMobile && menuOpen && /* @__PURE__ */ import_react.default.createElement("div", { style: {
|
|
226
|
-
animation: "nbSlideDown 0.2s ease",
|
|
227
|
-
borderTop: "1px solid rgba(255,255,255,0.06)",
|
|
228
|
-
padding: "10px 16px 16px",
|
|
229
|
-
display: "flex",
|
|
230
|
-
flexDirection: "column",
|
|
231
|
-
gap: "3px",
|
|
232
|
-
background: alpha(bg, 0.98)
|
|
233
|
-
} }, links.map((link) => /* @__PURE__ */ import_react.default.createElement(
|
|
234
|
-
"button",
|
|
235
|
-
{
|
|
236
|
-
key: link,
|
|
237
|
-
className: "nb-mlink",
|
|
238
|
-
onClick: () => handleLink(link),
|
|
239
|
-
style: {
|
|
240
|
-
background: active === link ? alpha(accent, 0.1) : "transparent",
|
|
241
|
-
border: "none",
|
|
242
|
-
padding: "11px 14px",
|
|
243
|
-
borderRadius: "10px",
|
|
244
|
-
fontSize: "14px",
|
|
245
|
-
fontWeight: active === link ? "700" : "500",
|
|
246
|
-
color: active === link ? accent : "rgba(255,255,255,0.55)",
|
|
247
|
-
cursor: "pointer",
|
|
248
|
-
textAlign: "left",
|
|
249
|
-
fontFamily: "inherit",
|
|
250
|
-
width: "100%",
|
|
251
|
-
transition: "all 0.15s",
|
|
252
|
-
display: "flex",
|
|
253
|
-
alignItems: "center",
|
|
254
|
-
justifyContent: "space-between"
|
|
255
|
-
}
|
|
256
|
-
},
|
|
257
|
-
link,
|
|
258
|
-
active === link && /* @__PURE__ */ import_react.default.createElement(
|
|
259
|
-
"svg",
|
|
260
|
-
{
|
|
261
|
-
width: "14",
|
|
262
|
-
height: "14",
|
|
263
|
-
viewBox: "0 0 24 24",
|
|
264
|
-
fill: "none",
|
|
265
|
-
stroke: accent,
|
|
266
|
-
strokeWidth: "2.5",
|
|
267
|
-
strokeLinecap: "round"
|
|
268
|
-
},
|
|
269
|
-
/* @__PURE__ */ import_react.default.createElement("polyline", { points: "9 18 15 12 9 6" })
|
|
270
|
-
)
|
|
271
|
-
)), /* @__PURE__ */ import_react.default.createElement("div", { style: { height: "1px", background: "rgba(255,255,255,0.07)", margin: "8px 0" } }), /* @__PURE__ */ import_react.default.createElement(
|
|
272
|
-
"button",
|
|
273
|
-
{
|
|
274
|
-
onClick: () => {
|
|
275
|
-
setMenuOpen(false);
|
|
276
|
-
onCtaClick();
|
|
277
|
-
},
|
|
278
|
-
style: {
|
|
279
|
-
background: `linear-gradient(135deg, ${accent}, ${alpha(accent, 0.75)})`,
|
|
280
|
-
border: "none",
|
|
281
|
-
padding: "12px",
|
|
282
|
-
borderRadius: "12px",
|
|
283
|
-
fontSize: "14px",
|
|
284
|
-
fontWeight: "700",
|
|
285
|
-
color: "#fff",
|
|
286
|
-
cursor: "pointer",
|
|
287
|
-
fontFamily: "inherit",
|
|
288
|
-
width: "100%"
|
|
289
|
-
}
|
|
290
|
-
},
|
|
291
|
-
ctaText
|
|
292
|
-
))));
|
|
64
|
+
}, 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)))));
|
|
293
65
|
};
|
|
294
66
|
|
|
295
67
|
// src/components/Footer/Footer.jsx
|
package/dist/index.mjs
CHANGED
|
@@ -1,250 +1,22 @@
|
|
|
1
1
|
// src/components/Navbar/Navbar.jsx
|
|
2
|
-
import React, { useState
|
|
2
|
+
import React, { useState } from "react";
|
|
3
3
|
var Navbar = ({
|
|
4
4
|
logo = "VirtualAI",
|
|
5
|
-
links = ["Home", "
|
|
6
|
-
ctaText = "Get Started",
|
|
5
|
+
links = ["Home", "About", "Contact"],
|
|
7
6
|
accent = "#6366f1",
|
|
8
7
|
bg = "#0f172a",
|
|
9
|
-
onCtaClick = () => {
|
|
10
|
-
},
|
|
11
8
|
onLinkClick = () => {
|
|
12
9
|
}
|
|
13
10
|
}) => {
|
|
14
|
-
const [scrolled, setScrolled] = useState(false);
|
|
15
|
-
const [menuOpen, setMenuOpen] = useState(false);
|
|
16
11
|
const [active, setActive] = useState("Home");
|
|
17
|
-
const [isMobile, setIsMobile] = useState(false);
|
|
18
12
|
const alpha = (hex, op) => {
|
|
19
|
-
const r = parseInt(hex.slice(1, 3), 16);
|
|
20
|
-
|
|
21
|
-
const b = parseInt(hex.slice(5, 7), 16);
|
|
22
|
-
return `rgba(${r},${g},${b},${op})`;
|
|
13
|
+
const r = parseInt(hex.slice(1, 3), 16), g = parseInt(hex.slice(3, 5), 16), b = parseInt(hex.slice(5, 7), 16);
|
|
14
|
+
return "rgba(" + r + "," + g + "," + b + "," + op + ")";
|
|
23
15
|
};
|
|
24
|
-
|
|
25
|
-
const checkMobile = () => setIsMobile(window.innerWidth < 768);
|
|
26
|
-
checkMobile();
|
|
27
|
-
window.addEventListener("resize", checkMobile);
|
|
28
|
-
return () => window.removeEventListener("resize", checkMobile);
|
|
29
|
-
}, []);
|
|
30
|
-
useEffect(() => {
|
|
31
|
-
const handler = () => setScrolled(window.scrollY > 10);
|
|
32
|
-
window.addEventListener("scroll", handler);
|
|
33
|
-
return () => window.removeEventListener("scroll", handler);
|
|
34
|
-
}, []);
|
|
35
|
-
useEffect(() => {
|
|
36
|
-
if (!isMobile) setMenuOpen(false);
|
|
37
|
-
}, [isMobile]);
|
|
38
|
-
const handleLink = (link) => {
|
|
16
|
+
return /* @__PURE__ */ React.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__ */ React.createElement("div", { style: { maxWidth: "1100px", margin: "0 auto", padding: "0 20px", height: "60px", display: "flex", alignItems: "center", justifyContent: "space-between" } }, /* @__PURE__ */ React.createElement("div", { style: { display: "flex", alignItems: "center", gap: "8px", cursor: "pointer" } }, /* @__PURE__ */ React.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__ */ React.createElement("span", { style: { fontSize: "15px", fontWeight: "800", color: "#fff" } }, logo)), /* @__PURE__ */ React.createElement("div", { style: { display: "flex", gap: "2px" } }, links.map((link) => /* @__PURE__ */ React.createElement("button", { key: link, onClick: () => {
|
|
39
17
|
setActive(link);
|
|
40
|
-
setMenuOpen(false);
|
|
41
18
|
onLinkClick(link);
|
|
42
|
-
};
|
|
43
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("style", null, `
|
|
44
|
-
@keyframes nbSlideDown {
|
|
45
|
-
from { opacity: 0; transform: translateY(-8px); }
|
|
46
|
-
to { opacity: 1; transform: translateY(0); }
|
|
47
|
-
}
|
|
48
|
-
.nb-link:hover { color: rgba(255,255,255,0.9) !important; background: rgba(255,255,255,0.05) !important; }
|
|
49
|
-
.nb-cta:hover { opacity: 0.85 !important; }
|
|
50
|
-
.nb-ham:hover { background: rgba(255,255,255,0.1) !important; }
|
|
51
|
-
.nb-mlink:hover { background: rgba(255,255,255,0.06) !important; }
|
|
52
|
-
`), /* @__PURE__ */ React.createElement("nav", { style: {
|
|
53
|
-
position: "sticky",
|
|
54
|
-
top: 0,
|
|
55
|
-
left: 0,
|
|
56
|
-
right: 0,
|
|
57
|
-
zIndex: 1e3,
|
|
58
|
-
background: scrolled ? alpha(bg, 0.96) : bg,
|
|
59
|
-
borderBottom: `1px solid ${scrolled ? "rgba(255,255,255,0.09)" : "rgba(255,255,255,0.04)"}`,
|
|
60
|
-
backdropFilter: scrolled ? "blur(12px)" : "none",
|
|
61
|
-
WebkitBackdropFilter: scrolled ? "blur(12px)" : "none",
|
|
62
|
-
transition: "all 0.3s ease",
|
|
63
|
-
fontFamily: "system-ui, -apple-system, sans-serif",
|
|
64
|
-
width: "100%",
|
|
65
|
-
boxSizing: "border-box"
|
|
66
|
-
} }, /* @__PURE__ */ React.createElement("div", { style: {
|
|
67
|
-
maxWidth: "1200px",
|
|
68
|
-
margin: "0 auto",
|
|
69
|
-
padding: "0 20px",
|
|
70
|
-
height: isMobile ? "56px" : "64px",
|
|
71
|
-
display: "flex",
|
|
72
|
-
alignItems: "center",
|
|
73
|
-
justifyContent: "space-between",
|
|
74
|
-
gap: "16px",
|
|
75
|
-
boxSizing: "border-box"
|
|
76
|
-
} }, /* @__PURE__ */ React.createElement("div", { style: { display: "flex", alignItems: "center", gap: "8px", cursor: "pointer", flexShrink: 0 } }, /* @__PURE__ */ React.createElement("div", { style: {
|
|
77
|
-
width: isMobile ? "26px" : "30px",
|
|
78
|
-
height: isMobile ? "26px" : "30px",
|
|
79
|
-
borderRadius: "8px",
|
|
80
|
-
background: `linear-gradient(135deg, ${accent}, ${alpha(accent, 0.6)})`,
|
|
81
|
-
display: "flex",
|
|
82
|
-
alignItems: "center",
|
|
83
|
-
justifyContent: "center",
|
|
84
|
-
fontSize: isMobile ? "12px" : "14px",
|
|
85
|
-
fontWeight: "800",
|
|
86
|
-
color: "#fff",
|
|
87
|
-
flexShrink: 0
|
|
88
|
-
} }, logo[0]), /* @__PURE__ */ React.createElement("span", { style: {
|
|
89
|
-
fontSize: isMobile ? "14px" : "16px",
|
|
90
|
-
fontWeight: "800",
|
|
91
|
-
color: "#fff",
|
|
92
|
-
letterSpacing: "-0.3px"
|
|
93
|
-
} }, logo)), !isMobile && /* @__PURE__ */ React.createElement("div", { style: { display: "flex", alignItems: "center", gap: "2px", flex: 1, justifyContent: "center" } }, links.map((link) => /* @__PURE__ */ React.createElement(
|
|
94
|
-
"button",
|
|
95
|
-
{
|
|
96
|
-
key: link,
|
|
97
|
-
className: "nb-link",
|
|
98
|
-
onClick: () => handleLink(link),
|
|
99
|
-
style: {
|
|
100
|
-
background: active === link ? alpha(accent, 0.12) : "transparent",
|
|
101
|
-
border: "none",
|
|
102
|
-
padding: "7px 16px",
|
|
103
|
-
borderRadius: "9px",
|
|
104
|
-
fontSize: "14px",
|
|
105
|
-
fontWeight: active === link ? "700" : "500",
|
|
106
|
-
color: active === link ? accent : "rgba(255,255,255,0.5)",
|
|
107
|
-
cursor: "pointer",
|
|
108
|
-
transition: "all 0.2s",
|
|
109
|
-
fontFamily: "inherit",
|
|
110
|
-
whiteSpace: "nowrap"
|
|
111
|
-
}
|
|
112
|
-
},
|
|
113
|
-
link
|
|
114
|
-
))), /* @__PURE__ */ React.createElement("div", { style: { display: "flex", alignItems: "center", gap: "8px", flexShrink: 0 } }, /* @__PURE__ */ React.createElement(
|
|
115
|
-
"button",
|
|
116
|
-
{
|
|
117
|
-
className: "nb-cta",
|
|
118
|
-
onClick: onCtaClick,
|
|
119
|
-
style: {
|
|
120
|
-
padding: isMobile ? "7px 14px" : "9px 20px",
|
|
121
|
-
borderRadius: "10px",
|
|
122
|
-
border: "none",
|
|
123
|
-
background: `linear-gradient(135deg, ${accent}, ${alpha(accent, 0.75)})`,
|
|
124
|
-
color: "#fff",
|
|
125
|
-
fontSize: isMobile ? "12px" : "13px",
|
|
126
|
-
fontWeight: "700",
|
|
127
|
-
cursor: "pointer",
|
|
128
|
-
fontFamily: "inherit",
|
|
129
|
-
transition: "opacity 0.2s",
|
|
130
|
-
whiteSpace: "nowrap"
|
|
131
|
-
}
|
|
132
|
-
},
|
|
133
|
-
ctaText
|
|
134
|
-
), isMobile && /* @__PURE__ */ React.createElement(
|
|
135
|
-
"button",
|
|
136
|
-
{
|
|
137
|
-
className: "nb-ham",
|
|
138
|
-
onClick: () => setMenuOpen((o) => !o),
|
|
139
|
-
style: {
|
|
140
|
-
background: "rgba(255,255,255,0.06)",
|
|
141
|
-
border: "1px solid rgba(255,255,255,0.1)",
|
|
142
|
-
borderRadius: "8px",
|
|
143
|
-
width: "34px",
|
|
144
|
-
height: "34px",
|
|
145
|
-
cursor: "pointer",
|
|
146
|
-
display: "flex",
|
|
147
|
-
flexDirection: "column",
|
|
148
|
-
alignItems: "center",
|
|
149
|
-
justifyContent: "center",
|
|
150
|
-
gap: "5px",
|
|
151
|
-
transition: "background 0.2s",
|
|
152
|
-
flexShrink: 0,
|
|
153
|
-
padding: 0
|
|
154
|
-
}
|
|
155
|
-
},
|
|
156
|
-
/* @__PURE__ */ React.createElement("div", { style: {
|
|
157
|
-
width: "16px",
|
|
158
|
-
height: "1.5px",
|
|
159
|
-
background: "rgba(255,255,255,0.7)",
|
|
160
|
-
borderRadius: "2px",
|
|
161
|
-
transform: menuOpen ? "rotate(45deg) translate(4px, 4px)" : "none",
|
|
162
|
-
transition: "transform 0.25s"
|
|
163
|
-
} }),
|
|
164
|
-
/* @__PURE__ */ React.createElement("div", { style: {
|
|
165
|
-
width: "16px",
|
|
166
|
-
height: "1.5px",
|
|
167
|
-
background: "rgba(255,255,255,0.7)",
|
|
168
|
-
borderRadius: "2px",
|
|
169
|
-
opacity: menuOpen ? 0 : 1,
|
|
170
|
-
transition: "opacity 0.2s"
|
|
171
|
-
} }),
|
|
172
|
-
/* @__PURE__ */ React.createElement("div", { style: {
|
|
173
|
-
width: "16px",
|
|
174
|
-
height: "1.5px",
|
|
175
|
-
background: "rgba(255,255,255,0.7)",
|
|
176
|
-
borderRadius: "2px",
|
|
177
|
-
transform: menuOpen ? "rotate(-45deg) translate(4px, -4px)" : "none",
|
|
178
|
-
transition: "transform 0.25s"
|
|
179
|
-
} })
|
|
180
|
-
))), isMobile && menuOpen && /* @__PURE__ */ React.createElement("div", { style: {
|
|
181
|
-
animation: "nbSlideDown 0.2s ease",
|
|
182
|
-
borderTop: "1px solid rgba(255,255,255,0.06)",
|
|
183
|
-
padding: "10px 16px 16px",
|
|
184
|
-
display: "flex",
|
|
185
|
-
flexDirection: "column",
|
|
186
|
-
gap: "3px",
|
|
187
|
-
background: alpha(bg, 0.98)
|
|
188
|
-
} }, links.map((link) => /* @__PURE__ */ React.createElement(
|
|
189
|
-
"button",
|
|
190
|
-
{
|
|
191
|
-
key: link,
|
|
192
|
-
className: "nb-mlink",
|
|
193
|
-
onClick: () => handleLink(link),
|
|
194
|
-
style: {
|
|
195
|
-
background: active === link ? alpha(accent, 0.1) : "transparent",
|
|
196
|
-
border: "none",
|
|
197
|
-
padding: "11px 14px",
|
|
198
|
-
borderRadius: "10px",
|
|
199
|
-
fontSize: "14px",
|
|
200
|
-
fontWeight: active === link ? "700" : "500",
|
|
201
|
-
color: active === link ? accent : "rgba(255,255,255,0.55)",
|
|
202
|
-
cursor: "pointer",
|
|
203
|
-
textAlign: "left",
|
|
204
|
-
fontFamily: "inherit",
|
|
205
|
-
width: "100%",
|
|
206
|
-
transition: "all 0.15s",
|
|
207
|
-
display: "flex",
|
|
208
|
-
alignItems: "center",
|
|
209
|
-
justifyContent: "space-between"
|
|
210
|
-
}
|
|
211
|
-
},
|
|
212
|
-
link,
|
|
213
|
-
active === link && /* @__PURE__ */ React.createElement(
|
|
214
|
-
"svg",
|
|
215
|
-
{
|
|
216
|
-
width: "14",
|
|
217
|
-
height: "14",
|
|
218
|
-
viewBox: "0 0 24 24",
|
|
219
|
-
fill: "none",
|
|
220
|
-
stroke: accent,
|
|
221
|
-
strokeWidth: "2.5",
|
|
222
|
-
strokeLinecap: "round"
|
|
223
|
-
},
|
|
224
|
-
/* @__PURE__ */ React.createElement("polyline", { points: "9 18 15 12 9 6" })
|
|
225
|
-
)
|
|
226
|
-
)), /* @__PURE__ */ React.createElement("div", { style: { height: "1px", background: "rgba(255,255,255,0.07)", margin: "8px 0" } }), /* @__PURE__ */ React.createElement(
|
|
227
|
-
"button",
|
|
228
|
-
{
|
|
229
|
-
onClick: () => {
|
|
230
|
-
setMenuOpen(false);
|
|
231
|
-
onCtaClick();
|
|
232
|
-
},
|
|
233
|
-
style: {
|
|
234
|
-
background: `linear-gradient(135deg, ${accent}, ${alpha(accent, 0.75)})`,
|
|
235
|
-
border: "none",
|
|
236
|
-
padding: "12px",
|
|
237
|
-
borderRadius: "12px",
|
|
238
|
-
fontSize: "14px",
|
|
239
|
-
fontWeight: "700",
|
|
240
|
-
color: "#fff",
|
|
241
|
-
cursor: "pointer",
|
|
242
|
-
fontFamily: "inherit",
|
|
243
|
-
width: "100%"
|
|
244
|
-
}
|
|
245
|
-
},
|
|
246
|
-
ctaText
|
|
247
|
-
))));
|
|
19
|
+
}, 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)))));
|
|
248
20
|
};
|
|
249
21
|
|
|
250
22
|
// src/components/Footer/Footer.jsx
|
|
@@ -751,7 +523,7 @@ var ImageCard = ({
|
|
|
751
523
|
};
|
|
752
524
|
|
|
753
525
|
// src/components/BackgoundImageSlider/BackgoundImageSlider.jsx
|
|
754
|
-
import React5, { useState as useState4, useEffect
|
|
526
|
+
import React5, { useState as useState4, useEffect, useCallback } from "react";
|
|
755
527
|
var BackgoundImageSlider = ({
|
|
756
528
|
images = [
|
|
757
529
|
{
|
|
@@ -803,7 +575,7 @@ var BackgoundImageSlider = ({
|
|
|
803
575
|
}, [animating, images.length]);
|
|
804
576
|
const prev = () => go(current - 1);
|
|
805
577
|
const next = () => go(current + 1);
|
|
806
|
-
|
|
578
|
+
useEffect(() => {
|
|
807
579
|
if (!autoPlay) return;
|
|
808
580
|
const t = setInterval(() => go(current + 1), autoPlayInterval);
|
|
809
581
|
return () => clearInterval(t);
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pre-react-ui-lib",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Virtual UI React Component Library",
|
|
5
5
|
"author": "vikas",
|
|
6
6
|
"license": "ISC",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
8
|
"module": "dist/index.mjs",
|
|
9
|
-
"files": [
|
|
9
|
+
"files": [
|
|
10
10
|
"dist"
|
|
11
11
|
],
|
|
12
12
|
"scripts": {
|