virtual-ui-lib 1.0.66 → 1.0.68
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 +582 -852
- package/dist/index.mjs +578 -835
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -29,607 +29,24 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
29
29
|
// src/index.js
|
|
30
30
|
var index_exports = {};
|
|
31
31
|
__export(index_exports, {
|
|
32
|
-
Avatar: () => Avatar,
|
|
33
32
|
AvatarCard: () => AvatarCard,
|
|
34
33
|
BackgoundImageSlider: () => BackgoundImageSlider,
|
|
35
34
|
Charts: () => Charts,
|
|
36
|
-
CodeBlock: () => CodeBlock,
|
|
37
|
-
CustomInputField: () => CustomInputField,
|
|
38
|
-
DividerLine: () => DividerLine,
|
|
39
|
-
FileUpload: () => FileUpload,
|
|
40
35
|
Footer: () => Footer,
|
|
41
36
|
ImageCard: () => ImageCard,
|
|
42
37
|
ImageSlider: () => ImageSlider,
|
|
43
38
|
Loader: () => Loader,
|
|
44
|
-
LoadingSpinner: () => LoadingSpinner,
|
|
45
39
|
Navbar: () => Navbar,
|
|
46
40
|
NotificationToast: () => NotificationToast,
|
|
47
|
-
|
|
41
|
+
OTPInput: () => OTPInput,
|
|
42
|
+
PageLoader: () => PageLoader,
|
|
48
43
|
PricingCard: () => PricingCard,
|
|
49
|
-
|
|
50
|
-
SearchBar: () => SearchBar,
|
|
51
|
-
Sidebar: () => Sidebar,
|
|
52
|
-
SkeletonLoader: () => SkeletonLoader,
|
|
53
|
-
SmartButton: () => SmartButton,
|
|
54
|
-
StatCard: () => StatCard,
|
|
55
|
-
Tabs: () => Tabs,
|
|
56
|
-
TextArea: () => TextArea,
|
|
57
|
-
ToastNotification: () => ToastNotification
|
|
44
|
+
Sidebar: () => Sidebar
|
|
58
45
|
});
|
|
59
46
|
module.exports = __toCommonJS(index_exports);
|
|
60
47
|
|
|
61
|
-
// src/components/ToastNotification/ToastNotification.jsx
|
|
62
|
-
var import_react = __toESM(require("react"));
|
|
63
|
-
var ToastNotification = ({
|
|
64
|
-
type = "success",
|
|
65
|
-
title = "Success",
|
|
66
|
-
message = "Your action was successful!",
|
|
67
|
-
duration = 4e3,
|
|
68
|
-
onClose
|
|
69
|
-
}) => {
|
|
70
|
-
const [visible, setVisible] = (0, import_react.useState)(false);
|
|
71
|
-
const [progress, setProgress] = (0, import_react.useState)(0);
|
|
72
|
-
(0, import_react.useEffect)(() => {
|
|
73
|
-
setVisible(true);
|
|
74
|
-
const interval = setInterval(() => {
|
|
75
|
-
setProgress((prev) => {
|
|
76
|
-
if (prev >= 100) {
|
|
77
|
-
clearInterval(interval);
|
|
78
|
-
onClose();
|
|
79
|
-
return 100;
|
|
80
|
-
}
|
|
81
|
-
return prev + 100 / (duration / 100);
|
|
82
|
-
});
|
|
83
|
-
}, 100);
|
|
84
|
-
return () => clearInterval(interval);
|
|
85
|
-
}, [duration, onClose]);
|
|
86
|
-
const getStyles = () => {
|
|
87
|
-
let bg, icon;
|
|
88
|
-
switch (type) {
|
|
89
|
-
case "success":
|
|
90
|
-
bg = "#059669";
|
|
91
|
-
icon = "\u2713";
|
|
92
|
-
break;
|
|
93
|
-
case "error":
|
|
94
|
-
bg = "#dc2626";
|
|
95
|
-
icon = "\u2716";
|
|
96
|
-
break;
|
|
97
|
-
case "warning":
|
|
98
|
-
bg = "#eab308";
|
|
99
|
-
icon = "\u26A0\uFE0F";
|
|
100
|
-
break;
|
|
101
|
-
case "info":
|
|
102
|
-
bg = "#2563eb";
|
|
103
|
-
icon = "\u2139\uFE0F";
|
|
104
|
-
break;
|
|
105
|
-
default:
|
|
106
|
-
bg = "#059669";
|
|
107
|
-
icon = "\u2713";
|
|
108
|
-
}
|
|
109
|
-
return { background: bg, icon };
|
|
110
|
-
};
|
|
111
|
-
return /* @__PURE__ */ import_react.default.createElement("div", { style: {
|
|
112
|
-
position: "fixed",
|
|
113
|
-
bottom: "20px",
|
|
114
|
-
right: "20px",
|
|
115
|
-
opacity: visible ? 1 : 0,
|
|
116
|
-
transform: visible ? "translateY(0)" : "translateY(20px)",
|
|
117
|
-
transition: "opacity 0.3s, transform 0.3s",
|
|
118
|
-
background: getStyles().background,
|
|
119
|
-
borderRadius: "12px",
|
|
120
|
-
padding: "16px",
|
|
121
|
-
width: "300px",
|
|
122
|
-
boxShadow: "0 4px 20px rgba(0,0,0,0.2)",
|
|
123
|
-
fontFamily: "system-ui, sans-serif",
|
|
124
|
-
zIndex: 9999
|
|
125
|
-
} }, /* @__PURE__ */ import_react.default.createElement("div", { style: { display: "flex", alignItems: "center", marginBottom: "8px" } }, /* @__PURE__ */ import_react.default.createElement("div", { style: {
|
|
126
|
-
width: "24px",
|
|
127
|
-
height: "24px",
|
|
128
|
-
borderRadius: "50%",
|
|
129
|
-
background: "white",
|
|
130
|
-
display: "flex",
|
|
131
|
-
alignItems: "center",
|
|
132
|
-
justifyContent: "center",
|
|
133
|
-
marginRight: "8px"
|
|
134
|
-
} }, /* @__PURE__ */ import_react.default.createElement("span", { style: { color: getStyles().background, fontSize: "16px" } }, getStyles().icon)), /* @__PURE__ */ import_react.default.createElement("h4", { style: { margin: 0, fontSize: "16px", fontWeight: "600", color: "white" } }, title)), /* @__PURE__ */ import_react.default.createElement("p", { style: { margin: "0 0 12px", fontSize: "14px", color: "#f1f5f9" } }, message), /* @__PURE__ */ import_react.default.createElement("button", { onClick: onClose, style: {
|
|
135
|
-
background: "transparent",
|
|
136
|
-
color: "white",
|
|
137
|
-
border: "none",
|
|
138
|
-
cursor: "pointer",
|
|
139
|
-
fontSize: "14px",
|
|
140
|
-
fontWeight: "600"
|
|
141
|
-
} }, "Close"), /* @__PURE__ */ import_react.default.createElement("div", { style: {
|
|
142
|
-
height: "4px",
|
|
143
|
-
background: "rgba(255, 255, 255, 0.3)",
|
|
144
|
-
borderRadius: "8px",
|
|
145
|
-
overflow: "hidden",
|
|
146
|
-
marginTop: "12px"
|
|
147
|
-
} }, /* @__PURE__ */ import_react.default.createElement("div", { style: {
|
|
148
|
-
width: progress + "%",
|
|
149
|
-
height: "100%",
|
|
150
|
-
background: "white",
|
|
151
|
-
transition: "width 0.1s linear"
|
|
152
|
-
} })));
|
|
153
|
-
};
|
|
154
|
-
|
|
155
|
-
// src/components/StatCard/StatCard.jsx
|
|
156
|
-
var import_react2 = __toESM(require("react"));
|
|
157
|
-
var StatCard = ({
|
|
158
|
-
title = "Revenue",
|
|
159
|
-
metric = 1200,
|
|
160
|
-
change = 15,
|
|
161
|
-
bg = "#0f172a",
|
|
162
|
-
accent = "#059669",
|
|
163
|
-
negativeAccent = "#ef4444",
|
|
164
|
-
radius = "16px"
|
|
165
|
-
}) => {
|
|
166
|
-
const [count, setCount] = (0, import_react2.useState)(0);
|
|
167
|
-
(0, import_react2.useEffect)(() => {
|
|
168
|
-
let countUp = 0;
|
|
169
|
-
const interval = setInterval(() => {
|
|
170
|
-
if (countUp < metric) {
|
|
171
|
-
countUp += Math.ceil(metric / 100);
|
|
172
|
-
setCount(countUp);
|
|
173
|
-
} else {
|
|
174
|
-
clearInterval(interval);
|
|
175
|
-
}
|
|
176
|
-
}, 30);
|
|
177
|
-
return () => clearInterval(interval);
|
|
178
|
-
}, [metric]);
|
|
179
|
-
return /* @__PURE__ */ import_react2.default.createElement("div", { style: { background: bg, borderRadius: radius, padding: "24px", width: "300px", color: "white", boxShadow: "0 10px 30px rgba(0,0,0,0.5)", fontFamily: "system-ui, sans-serif", textAlign: "center" } }, /* @__PURE__ */ import_react2.default.createElement("h3", { style: { margin: "0 0 10px", fontSize: "16px", fontWeight: "600" } }, title), /* @__PURE__ */ import_react2.default.createElement("div", { style: { fontSize: "40px", fontWeight: "700" } }, count), /* @__PURE__ */ import_react2.default.createElement("span", { style: {
|
|
180
|
-
display: "inline-block",
|
|
181
|
-
padding: "5px 12px",
|
|
182
|
-
borderRadius: "10px",
|
|
183
|
-
background: change >= 0 ? accent : negativeAccent,
|
|
184
|
-
color: "white",
|
|
185
|
-
fontSize: "14px",
|
|
186
|
-
margin: "10px 0"
|
|
187
|
-
} }, change >= 0 ? "+" + change + "%" : change + "%"), /* @__PURE__ */ import_react2.default.createElement("svg", { style: { marginTop: "12px" }, width: "100%", height: "30", viewBox: "0 0 100 30", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ import_react2.default.createElement("polyline", { fill: "none", stroke: change >= 0 ? accent : negativeAccent, strokeWidth: "2", points: "0,15 10,10 20,20 30,15 40,22 50,8 60,18 70,15 80,18 90,10 100,15" })));
|
|
188
|
-
};
|
|
189
|
-
|
|
190
|
-
// src/components/OtpInput/OtpInput.jsx
|
|
191
|
-
var import_react3 = __toESM(require("react"));
|
|
192
|
-
var OtpInput = ({
|
|
193
|
-
length = 6,
|
|
194
|
-
boxSize = "48px",
|
|
195
|
-
borderColor = "#7c3aed",
|
|
196
|
-
bgColor = "#1e293b",
|
|
197
|
-
textColor = "#f1f5f9",
|
|
198
|
-
radius = "8px",
|
|
199
|
-
onComplete
|
|
200
|
-
}) => {
|
|
201
|
-
const [otp, setOtp] = (0, import_react3.useState)(Array(length).fill(""));
|
|
202
|
-
const inputsRef = (0, import_react3.useRef)([]);
|
|
203
|
-
const handleChange = (index, value) => {
|
|
204
|
-
if (/\d/.test(value) || value === "") {
|
|
205
|
-
const newOtp = [...otp];
|
|
206
|
-
newOtp[index] = value;
|
|
207
|
-
setOtp(newOtp);
|
|
208
|
-
if (value !== "" && index < length - 1) {
|
|
209
|
-
inputsRef.current[index + 1].focus();
|
|
210
|
-
} else if (value === "" && index > 0) {
|
|
211
|
-
inputsRef.current[index - 1].focus();
|
|
212
|
-
}
|
|
213
|
-
if (newOtp.join("").length === length) {
|
|
214
|
-
onComplete(newOtp.join(""));
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
};
|
|
218
|
-
const handlePaste = (e) => {
|
|
219
|
-
const pastedData = e.clipboardData.getData("text").slice(0, length).split("");
|
|
220
|
-
const newOtp = Array(length).fill("").map((_, index) => pastedData[index] || "");
|
|
221
|
-
setOtp(newOtp);
|
|
222
|
-
if (newOtp.join("").length === length) {
|
|
223
|
-
onComplete(newOtp.join(""));
|
|
224
|
-
}
|
|
225
|
-
e.preventDefault();
|
|
226
|
-
};
|
|
227
|
-
(0, import_react3.useEffect)(() => {
|
|
228
|
-
inputsRef.current[0].focus();
|
|
229
|
-
}, []);
|
|
230
|
-
return /* @__PURE__ */ import_react3.default.createElement("div", { style: { display: "flex", gap: "10px", justifyContent: "center", padding: "20px", background: bgColor, borderRadius: radius, border: "1px solid rgba(255,255,255,0.1)", boxShadow: "0 4px 20px rgba(0,0,0,0.6)" }, onPaste: handlePaste }, otp.map((value, index) => /* @__PURE__ */ import_react3.default.createElement(
|
|
231
|
-
"input",
|
|
232
|
-
{
|
|
233
|
-
key: index,
|
|
234
|
-
ref: (el) => inputsRef.current[index] = el,
|
|
235
|
-
type: "text",
|
|
236
|
-
maxLength: "1",
|
|
237
|
-
value,
|
|
238
|
-
onChange: (e) => handleChange(index, e.target.value),
|
|
239
|
-
onFocus: (e) => e.target.select(),
|
|
240
|
-
onKeyDown: (e) => {
|
|
241
|
-
if (e.key === "Backspace" && !value && index > 0) {
|
|
242
|
-
inputsRef.current[index - 1].focus();
|
|
243
|
-
}
|
|
244
|
-
},
|
|
245
|
-
style: {
|
|
246
|
-
width: boxSize,
|
|
247
|
-
height: boxSize,
|
|
248
|
-
fontSize: "24px",
|
|
249
|
-
textAlign: "center",
|
|
250
|
-
borderRadius: radius,
|
|
251
|
-
border: `2px solid ${borderColor}`,
|
|
252
|
-
background: bgColor,
|
|
253
|
-
color: textColor,
|
|
254
|
-
transition: "border-color 0.2s",
|
|
255
|
-
outline: "none"
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
)), otp.join("").length === length && /* @__PURE__ */ import_react3.default.createElement("span", { style: { color: "#4ade80", fontSize: "20px" } }, "\u2705"));
|
|
259
|
-
};
|
|
260
|
-
|
|
261
|
-
// src/components/CodeBlock/CodeBlock.jsx
|
|
262
|
-
var import_react4 = __toESM(require("react"));
|
|
263
|
-
var CodeBlock = ({
|
|
264
|
-
code = "const hello = 'Hello, world!';\nconsole.log(hello);",
|
|
265
|
-
language = "JavaScript",
|
|
266
|
-
filename = "example.js",
|
|
267
|
-
bg = "#0d1117",
|
|
268
|
-
textColor = "#c9d1d9",
|
|
269
|
-
tokenColors = { string: "#a5d6e9", keyword: "#f9bc41", variable: "#a6e22e" },
|
|
270
|
-
showLineNumbers = true,
|
|
271
|
-
wrapWords = false
|
|
272
|
-
}) => {
|
|
273
|
-
const [copied, setCopied] = (0, import_react4.useState)(false);
|
|
274
|
-
const handleCopy = () => {
|
|
275
|
-
navigator.clipboard.writeText(code).then(() => {
|
|
276
|
-
setCopied(true);
|
|
277
|
-
setTimeout(() => setCopied(false), 2e3);
|
|
278
|
-
});
|
|
279
|
-
};
|
|
280
|
-
const formatCode = () => {
|
|
281
|
-
return code.split("\n").map((line, index) => /* @__PURE__ */ import_react4.default.createElement("div", { key: index, style: { display: "flex" } }, showLineNumbers && /* @__PURE__ */ import_react4.default.createElement("span", { style: { marginRight: "10px", color: "#58a6ff" } }, index + 1), /* @__PURE__ */ import_react4.default.createElement("span", { style: { color: tokenColors.string } }, line.replace(/(\'.*?\')/g, (match) => `<span style='color:${tokenColors.string}'>${match}</span>`))));
|
|
282
|
-
};
|
|
283
|
-
return /* @__PURE__ */ import_react4.default.createElement("div", { style: { background: bg, borderRadius: "8px", padding: "16px", fontFamily: "monospace", position: "relative" } }, filename && /* @__PURE__ */ import_react4.default.createElement("div", { style: { color: textColor, fontWeight: "bold", marginBottom: "8px" } }, filename), /* @__PURE__ */ import_react4.default.createElement("div", { style: { overflowX: wrapWords ? "auto" : "hidden", whiteSpace: wrapWords ? "normal" : "pre" } }, formatCode()), /* @__PURE__ */ import_react4.default.createElement("button", { onClick: handleCopy, style: { position: "absolute", top: "10px", right: "10px", background: copied ? "#28a745" : "#58a6ff", color: "white", border: "none", borderRadius: "4px", padding: "8px 12px", cursor: "pointer", fontSize: "14px", marginLeft: "10px" } }, copied ? "\u2713 Copied" : "Copy"), /* @__PURE__ */ import_react4.default.createElement("button", { onClick: () => wrapWords = !wrapWords, style: { position: "absolute", top: "10px", right: "90px", background: "#58a6ff", color: "white", border: "none", borderRadius: "4px", padding: "8px 12px", cursor: "pointer", fontSize: "14px" } }, wrapWords ? "Wrap Off" : "Wrap On"));
|
|
284
|
-
};
|
|
285
|
-
|
|
286
|
-
// src/components/SmartButton/SmartButton.jsx
|
|
287
|
-
var import_react5 = __toESM(require("react"));
|
|
288
|
-
var SmartButton = ({
|
|
289
|
-
buttonText = "Submit",
|
|
290
|
-
isLoading = false,
|
|
291
|
-
isDisabled = false,
|
|
292
|
-
icon = null,
|
|
293
|
-
success = false,
|
|
294
|
-
error = false,
|
|
295
|
-
bg = "#7c3aed",
|
|
296
|
-
textColor = "#fff",
|
|
297
|
-
padding = "12px 20px",
|
|
298
|
-
radius = "8px",
|
|
299
|
-
onClick = () => {
|
|
300
|
-
}
|
|
301
|
-
}) => {
|
|
302
|
-
const bgColor = success ? "#059669" : error ? "#ef4444" : bg;
|
|
303
|
-
const cursorStyle = isDisabled ? "not-allowed" : "pointer";
|
|
304
|
-
return /* @__PURE__ */ import_react5.default.createElement(
|
|
305
|
-
"button",
|
|
306
|
-
{
|
|
307
|
-
onClick: !isDisabled && !isLoading ? onClick : () => {
|
|
308
|
-
},
|
|
309
|
-
disabled: isDisabled,
|
|
310
|
-
style: {
|
|
311
|
-
background: bgColor,
|
|
312
|
-
color: textColor,
|
|
313
|
-
padding,
|
|
314
|
-
borderRadius: radius,
|
|
315
|
-
border: "none",
|
|
316
|
-
cursor: cursorStyle,
|
|
317
|
-
transition: "background 0.3s ease"
|
|
318
|
-
},
|
|
319
|
-
onMouseEnter: (e) => {
|
|
320
|
-
if (!isDisabled && !isLoading) {
|
|
321
|
-
e.currentTarget.style.background = "#6d28d9";
|
|
322
|
-
}
|
|
323
|
-
},
|
|
324
|
-
onMouseLeave: (e) => {
|
|
325
|
-
e.currentTarget.style.background = bgColor;
|
|
326
|
-
}
|
|
327
|
-
},
|
|
328
|
-
isLoading ? /* @__PURE__ */ import_react5.default.createElement("span", null, "Loading...") : /* @__PURE__ */ import_react5.default.createElement(import_react5.default.Fragment, null, icon && /* @__PURE__ */ import_react5.default.createElement("span", { style: { marginRight: "8px" } }, icon), buttonText)
|
|
329
|
-
);
|
|
330
|
-
};
|
|
331
|
-
|
|
332
|
-
// src/components/CustomInputField/CustomInputField.jsx
|
|
333
|
-
var import_react6 = __toESM(require("react"));
|
|
334
|
-
var CustomInputField = ({
|
|
335
|
-
label = "Label",
|
|
336
|
-
placeholder = "Enter text...",
|
|
337
|
-
errorMessage = "",
|
|
338
|
-
helperText = "",
|
|
339
|
-
value = "",
|
|
340
|
-
bg = "#1e293b",
|
|
341
|
-
textColor = "#f1f5f9",
|
|
342
|
-
accent = "#7c3aed",
|
|
343
|
-
padding = "10px",
|
|
344
|
-
radius = "8px",
|
|
345
|
-
onChange = () => {
|
|
346
|
-
}
|
|
347
|
-
}) => {
|
|
348
|
-
const [isFocused, setIsFocused] = (0, import_react6.useState)(false);
|
|
349
|
-
return /* @__PURE__ */ import_react6.default.createElement("div", { style: { margin: "16px 0" } }, /* @__PURE__ */ import_react6.default.createElement("label", { style: { color: textColor, marginBottom: "4px", display: "block" } }, label), /* @__PURE__ */ import_react6.default.createElement(
|
|
350
|
-
"input",
|
|
351
|
-
{
|
|
352
|
-
type: "text",
|
|
353
|
-
value,
|
|
354
|
-
placeholder,
|
|
355
|
-
onFocus: () => setIsFocused(true),
|
|
356
|
-
onBlur: () => setIsFocused(false),
|
|
357
|
-
onChange: (e) => onChange(e.target.value),
|
|
358
|
-
style: {
|
|
359
|
-
background: bg,
|
|
360
|
-
color: textColor,
|
|
361
|
-
padding,
|
|
362
|
-
borderRadius: radius,
|
|
363
|
-
border: isFocused ? `2px solid ${accent}` : "2px solid transparent",
|
|
364
|
-
transition: "border-color 0.3s ease",
|
|
365
|
-
width: "100%"
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
), errorMessage && /* @__PURE__ */ import_react6.default.createElement("p", { style: { color: "red", margin: "4px 0 0 0" } }, errorMessage), helperText && /* @__PURE__ */ import_react6.default.createElement("p", { style: { color: textColor, margin: "4px 0 0 0" } }, helperText));
|
|
369
|
-
};
|
|
370
|
-
|
|
371
|
-
// src/components/TextArea/TextArea.jsx
|
|
372
|
-
var import_react7 = __toESM(require("react"));
|
|
373
|
-
var TextArea = ({
|
|
374
|
-
label = "Label",
|
|
375
|
-
placeholder = "Type here...",
|
|
376
|
-
value = "",
|
|
377
|
-
bg = "#1e293b",
|
|
378
|
-
textColor = "#f1f5f9",
|
|
379
|
-
accent = "#2563eb",
|
|
380
|
-
radius = "8px",
|
|
381
|
-
padding = "12px",
|
|
382
|
-
maxLength = 250,
|
|
383
|
-
onChange = () => {
|
|
384
|
-
}
|
|
385
|
-
}) => {
|
|
386
|
-
const [currentValue, setCurrentValue] = (0, import_react7.useState)(value);
|
|
387
|
-
const handleChange = (e) => {
|
|
388
|
-
setCurrentValue(e.target.value);
|
|
389
|
-
onChange(e.target.value);
|
|
390
|
-
};
|
|
391
|
-
return /* @__PURE__ */ import_react7.default.createElement("div", { style: { margin: "16px 0" } }, /* @__PURE__ */ import_react7.default.createElement("label", { style: { color: textColor, marginBottom: "8px", display: "block" } }, label), /* @__PURE__ */ import_react7.default.createElement(
|
|
392
|
-
"textarea",
|
|
393
|
-
{
|
|
394
|
-
value: currentValue,
|
|
395
|
-
placeholder,
|
|
396
|
-
maxLength,
|
|
397
|
-
onChange: handleChange,
|
|
398
|
-
style: {
|
|
399
|
-
background: bg,
|
|
400
|
-
color: textColor,
|
|
401
|
-
padding,
|
|
402
|
-
borderRadius: radius,
|
|
403
|
-
border: `1px solid ${accent}`,
|
|
404
|
-
width: "100%",
|
|
405
|
-
minHeight: "100px",
|
|
406
|
-
resize: "none",
|
|
407
|
-
transition: "border-color 0.3s"
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
), /* @__PURE__ */ import_react7.default.createElement("div", { style: { color: textColor, marginTop: "8px" } }, currentValue.length, "/", maxLength));
|
|
411
|
-
};
|
|
412
|
-
|
|
413
|
-
// src/components/SearchBar/SearchBar.jsx
|
|
414
|
-
var import_react8 = __toESM(require("react"));
|
|
415
|
-
var SearchBar = ({
|
|
416
|
-
placeholder = "Search...",
|
|
417
|
-
bg = "#1e293b",
|
|
418
|
-
textColor = "#f1f5f9",
|
|
419
|
-
accent = "#7c3aed",
|
|
420
|
-
loading = false,
|
|
421
|
-
suggestions = [],
|
|
422
|
-
onChange = () => {
|
|
423
|
-
},
|
|
424
|
-
onClear = () => {
|
|
425
|
-
}
|
|
426
|
-
}) => {
|
|
427
|
-
const [query, setQuery] = (0, import_react8.useState)("");
|
|
428
|
-
const handleInputChange = (e) => {
|
|
429
|
-
setQuery(e.target.value);
|
|
430
|
-
onChange(e.target.value);
|
|
431
|
-
};
|
|
432
|
-
const handleClear = () => {
|
|
433
|
-
setQuery("");
|
|
434
|
-
onClear();
|
|
435
|
-
};
|
|
436
|
-
return /* @__PURE__ */ import_react8.default.createElement("div", { style: { position: "relative", width: "100%" } }, /* @__PURE__ */ import_react8.default.createElement(
|
|
437
|
-
"input",
|
|
438
|
-
{
|
|
439
|
-
value: query,
|
|
440
|
-
placeholder,
|
|
441
|
-
onChange: handleInputChange,
|
|
442
|
-
style: {
|
|
443
|
-
background: bg,
|
|
444
|
-
color: textColor,
|
|
445
|
-
padding: "10px",
|
|
446
|
-
borderRadius: "8px",
|
|
447
|
-
border: "1px solid #cbd5e1",
|
|
448
|
-
width: "100%",
|
|
449
|
-
transition: "border-color 0.3s",
|
|
450
|
-
outline: "none"
|
|
451
|
-
}
|
|
452
|
-
}
|
|
453
|
-
), query && /* @__PURE__ */ import_react8.default.createElement("button", { onClick: handleClear, style: {
|
|
454
|
-
position: "absolute",
|
|
455
|
-
right: "10px",
|
|
456
|
-
top: "50%",
|
|
457
|
-
transform: "translateY(-50%)",
|
|
458
|
-
background: "transparent",
|
|
459
|
-
color: accent,
|
|
460
|
-
border: "none",
|
|
461
|
-
cursor: "pointer"
|
|
462
|
-
} }, "Clear"), loading && /* @__PURE__ */ import_react8.default.createElement("div", { style: {
|
|
463
|
-
position: "absolute",
|
|
464
|
-
left: "10px",
|
|
465
|
-
top: "50%",
|
|
466
|
-
transform: "translateY(-50%)"
|
|
467
|
-
} }, "Loading..."), suggestions.length > 0 && !loading && /* @__PURE__ */ import_react8.default.createElement("ul", { style: {
|
|
468
|
-
listStyleType: "none",
|
|
469
|
-
margin: 0,
|
|
470
|
-
padding: "10px",
|
|
471
|
-
background: bg,
|
|
472
|
-
borderRadius: "8px",
|
|
473
|
-
position: "absolute",
|
|
474
|
-
zIndex: 1e3,
|
|
475
|
-
width: "100%",
|
|
476
|
-
maxHeight: "200px",
|
|
477
|
-
overflowY: "auto"
|
|
478
|
-
} }, suggestions.map((suggestion, index) => /* @__PURE__ */ import_react8.default.createElement("li", { key: index, style: {
|
|
479
|
-
padding: "8px",
|
|
480
|
-
color: textColor,
|
|
481
|
-
cursor: "pointer",
|
|
482
|
-
transition: "background 0.2s"
|
|
483
|
-
}, onClick: () => {
|
|
484
|
-
setQuery(suggestion);
|
|
485
|
-
onChange(suggestion);
|
|
486
|
-
} }, suggestion))));
|
|
487
|
-
};
|
|
488
|
-
|
|
489
|
-
// src/components/LoadingSpinner/LoadingSpinner.jsx
|
|
490
|
-
var import_react9 = __toESM(require("react"));
|
|
491
|
-
var LoadingSpinner = ({ size = "40px", color = "#7c3aed", speed = "1s" }) => {
|
|
492
|
-
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` } });
|
|
493
|
-
};
|
|
494
|
-
|
|
495
|
-
// src/components/SkeletonLoader/SkeletonLoader.jsx
|
|
496
|
-
var import_react10 = __toESM(require("react"));
|
|
497
|
-
var SkeletonLoader = ({ width = "100%", height = "20px", bg = "#1e293b", accent = "#7c3aed", radius = "12px", padding = "0" }) => {
|
|
498
|
-
const shimmerStyle = {
|
|
499
|
-
background: `linear-gradient(90deg, ${accent} 25%, ${bg} 50%, ${accent} 75%)`,
|
|
500
|
-
backgroundSize: "200% 100%",
|
|
501
|
-
animation: "shimmer 1.5s infinite",
|
|
502
|
-
borderRadius: radius
|
|
503
|
-
};
|
|
504
|
-
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 {
|
|
505
|
-
0% {
|
|
506
|
-
background-position: 200% 0;
|
|
507
|
-
}
|
|
508
|
-
100% {
|
|
509
|
-
background-position: 0 0;
|
|
510
|
-
}
|
|
511
|
-
}`));
|
|
512
|
-
};
|
|
513
|
-
|
|
514
|
-
// src/components/ResponsiveNavbar/ResponsiveNavbar.jsx
|
|
515
|
-
var import_react11 = __toESM(require("react"));
|
|
516
|
-
var ResponsiveNavbar = ({
|
|
517
|
-
logo = "Logo",
|
|
518
|
-
navItems = [],
|
|
519
|
-
bg = "#1e293b",
|
|
520
|
-
textColor = "#f1f5f9",
|
|
521
|
-
accent = "#7c3aed",
|
|
522
|
-
padding = "10px 20px",
|
|
523
|
-
radius = "8px",
|
|
524
|
-
placeholder = "Search...",
|
|
525
|
-
onNavItemClick = () => {
|
|
526
|
-
},
|
|
527
|
-
onSearchChange = () => {
|
|
528
|
-
},
|
|
529
|
-
profileAvatar = "https://via.placeholder.com/40"
|
|
530
|
-
}) => {
|
|
531
|
-
const [menuActive, setMenuActive] = (0, import_react11.useState)(false);
|
|
532
|
-
const [searchValue, setSearchValue] = (0, import_react11.useState)("");
|
|
533
|
-
const handleSearchChange = (e) => {
|
|
534
|
-
setSearchValue(e.target.value);
|
|
535
|
-
onSearchChange(e.target.value);
|
|
536
|
-
};
|
|
537
|
-
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(
|
|
538
|
-
"input",
|
|
539
|
-
{
|
|
540
|
-
type: "text",
|
|
541
|
-
value: searchValue,
|
|
542
|
-
placeholder,
|
|
543
|
-
onChange: handleSearchChange,
|
|
544
|
-
style: { background: "#0f172a", color: textColor, border: "none", borderRadius: radius, padding: "8px", marginRight: "20px" }
|
|
545
|
-
}
|
|
546
|
-
), /* @__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))));
|
|
547
|
-
};
|
|
548
|
-
|
|
549
|
-
// src/components/FileUpload/FileUpload.jsx
|
|
550
|
-
var import_react12 = __toESM(require("react"));
|
|
551
|
-
var FileUpload = ({ bg = "#1e293b", textColor = "#f1f5f9", accent = "#7c3aed", radius = "12px", padding = "20px", placeholder = "Drag and drop files here or click to upload", onChange = () => {
|
|
552
|
-
} }) => {
|
|
553
|
-
const [file, setFile] = (0, import_react12.useState)(null);
|
|
554
|
-
const [progress, setProgress] = (0, import_react12.useState)(0);
|
|
555
|
-
const handleDrop = (event) => {
|
|
556
|
-
event.preventDefault();
|
|
557
|
-
const droppedFile = event.dataTransfer.files[0];
|
|
558
|
-
if (droppedFile) {
|
|
559
|
-
uploadFile(droppedFile);
|
|
560
|
-
}
|
|
561
|
-
};
|
|
562
|
-
const handleClick = () => {
|
|
563
|
-
document.getElementById("fileInput").click();
|
|
564
|
-
};
|
|
565
|
-
const handleFileChange = (event) => {
|
|
566
|
-
const selectedFile = event.target.files[0];
|
|
567
|
-
if (selectedFile) {
|
|
568
|
-
uploadFile(selectedFile);
|
|
569
|
-
}
|
|
570
|
-
};
|
|
571
|
-
const uploadFile = (selectedFile) => {
|
|
572
|
-
setFile(selectedFile);
|
|
573
|
-
const uploadProgress = setInterval(() => {
|
|
574
|
-
setProgress((prev) => {
|
|
575
|
-
if (prev >= 100) {
|
|
576
|
-
clearInterval(uploadProgress);
|
|
577
|
-
return 100;
|
|
578
|
-
}
|
|
579
|
-
return prev + 10;
|
|
580
|
-
});
|
|
581
|
-
}, 100);
|
|
582
|
-
onChange(selectedFile);
|
|
583
|
-
};
|
|
584
|
-
const handleRemove = () => {
|
|
585
|
-
setFile(null);
|
|
586
|
-
setProgress(0);
|
|
587
|
-
};
|
|
588
|
-
return /* @__PURE__ */ import_react12.default.createElement(
|
|
589
|
-
"div",
|
|
590
|
-
{
|
|
591
|
-
onDrop: handleDrop,
|
|
592
|
-
onDragOver: (e) => e.preventDefault(),
|
|
593
|
-
onClick: handleClick,
|
|
594
|
-
style: {
|
|
595
|
-
background: bg,
|
|
596
|
-
color: textColor,
|
|
597
|
-
border: `2px dashed ${accent}`,
|
|
598
|
-
borderRadius: radius,
|
|
599
|
-
padding,
|
|
600
|
-
textAlign: "center",
|
|
601
|
-
cursor: "pointer"
|
|
602
|
-
}
|
|
603
|
-
},
|
|
604
|
-
/* @__PURE__ */ import_react12.default.createElement(
|
|
605
|
-
"input",
|
|
606
|
-
{
|
|
607
|
-
id: "fileInput",
|
|
608
|
-
type: "file",
|
|
609
|
-
style: { display: "none" },
|
|
610
|
-
onChange: handleFileChange
|
|
611
|
-
}
|
|
612
|
-
),
|
|
613
|
-
file ? /* @__PURE__ */ import_react12.default.createElement("div", null, /* @__PURE__ */ import_react12.default.createElement("p", null, file.name), /* @__PURE__ */ import_react12.default.createElement(
|
|
614
|
-
"button",
|
|
615
|
-
{
|
|
616
|
-
onClick: handleRemove,
|
|
617
|
-
style: {
|
|
618
|
-
background: accent,
|
|
619
|
-
color: "#fff",
|
|
620
|
-
border: "none",
|
|
621
|
-
borderRadius: radius,
|
|
622
|
-
padding: "8px 16px",
|
|
623
|
-
cursor: "pointer"
|
|
624
|
-
}
|
|
625
|
-
},
|
|
626
|
-
"Remove"
|
|
627
|
-
), /* @__PURE__ */ import_react12.default.createElement("div", { style: { background: "#e2e8f0", borderRadius: radius, overflow: "hidden", marginTop: "10px" } }, /* @__PURE__ */ import_react12.default.createElement("div", { style: { width: `${progress}%`, background: accent, height: "8px" } }))) : /* @__PURE__ */ import_react12.default.createElement("p", null, placeholder)
|
|
628
|
-
);
|
|
629
|
-
};
|
|
630
|
-
|
|
631
48
|
// src/components/Loader/Loader.jsx
|
|
632
|
-
var
|
|
49
|
+
var import_react = __toESM(require("react"));
|
|
633
50
|
var Loader = ({
|
|
634
51
|
type = "spinner",
|
|
635
52
|
size = 48,
|
|
@@ -638,15 +55,15 @@ var Loader = ({
|
|
|
638
55
|
label = "",
|
|
639
56
|
speed = 1
|
|
640
57
|
}) => {
|
|
641
|
-
const [dots, setDots] = (0,
|
|
642
|
-
const [progress, setProgress] = (0,
|
|
58
|
+
const [dots, setDots] = (0, import_react.useState)(0);
|
|
59
|
+
const [progress, setProgress] = (0, import_react.useState)(0);
|
|
643
60
|
const alpha = (hex, op) => {
|
|
644
61
|
const r = parseInt(hex.slice(1, 3), 16);
|
|
645
62
|
const g = parseInt(hex.slice(3, 5), 16);
|
|
646
63
|
const b = parseInt(hex.slice(5, 7), 16);
|
|
647
64
|
return `rgba(${r},${g},${b},${op})`;
|
|
648
65
|
};
|
|
649
|
-
(0,
|
|
66
|
+
(0, import_react.useEffect)(() => {
|
|
650
67
|
if (type === "dots") {
|
|
651
68
|
const t = setInterval(() => setDots((d) => (d + 1) % 4), 400 / speed);
|
|
652
69
|
return () => clearInterval(t);
|
|
@@ -668,8 +85,8 @@ var Loader = ({
|
|
|
668
85
|
borderRadius: "16px",
|
|
669
86
|
fontFamily: "system-ui, sans-serif"
|
|
670
87
|
};
|
|
671
|
-
const labelEl = label ? /* @__PURE__ */
|
|
672
|
-
if (type === "spinner") return /* @__PURE__ */
|
|
88
|
+
const labelEl = label ? /* @__PURE__ */ import_react.default.createElement("span", { style: { fontSize: "13px", color: "rgba(255,255,255,0.45)", letterSpacing: "0.3px" } }, label) : null;
|
|
89
|
+
if (type === "spinner") return /* @__PURE__ */ import_react.default.createElement("div", { style: wrapStyle }, /* @__PURE__ */ import_react.default.createElement("svg", { width: size, height: size, viewBox: "0 0 48 48" }, /* @__PURE__ */ import_react.default.createElement(
|
|
673
90
|
"circle",
|
|
674
91
|
{
|
|
675
92
|
cx: "24",
|
|
@@ -679,7 +96,7 @@ var Loader = ({
|
|
|
679
96
|
stroke: alpha(accent, 0.15),
|
|
680
97
|
strokeWidth: "4"
|
|
681
98
|
}
|
|
682
|
-
), /* @__PURE__ */
|
|
99
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
683
100
|
"circle",
|
|
684
101
|
{
|
|
685
102
|
cx: "24",
|
|
@@ -692,40 +109,40 @@ var Loader = ({
|
|
|
692
109
|
strokeDasharray: "31.4 94.2",
|
|
693
110
|
style: { transformOrigin: "center", animation: `spin ${dur} linear infinite` }
|
|
694
111
|
}
|
|
695
|
-
), /* @__PURE__ */
|
|
696
|
-
if (type === "pulse") return /* @__PURE__ */
|
|
112
|
+
), /* @__PURE__ */ import_react.default.createElement("style", null, `@keyframes spin { to { transform: rotate(360deg); } }`)), labelEl);
|
|
113
|
+
if (type === "pulse") return /* @__PURE__ */ import_react.default.createElement("div", { style: wrapStyle }, /* @__PURE__ */ import_react.default.createElement("div", { style: { position: "relative", width: size, height: size } }, /* @__PURE__ */ import_react.default.createElement("div", { style: {
|
|
697
114
|
position: "absolute",
|
|
698
115
|
inset: 0,
|
|
699
116
|
borderRadius: "50%",
|
|
700
117
|
background: alpha(accent, 0.2),
|
|
701
118
|
animation: `pulse ${dur} ease-out infinite`
|
|
702
|
-
} }), /* @__PURE__ */
|
|
119
|
+
} }), /* @__PURE__ */ import_react.default.createElement("div", { style: {
|
|
703
120
|
position: "absolute",
|
|
704
121
|
inset: "25%",
|
|
705
122
|
borderRadius: "50%",
|
|
706
123
|
background: accent
|
|
707
|
-
} }), /* @__PURE__ */
|
|
708
|
-
if (type === "dots") return /* @__PURE__ */
|
|
124
|
+
} }), /* @__PURE__ */ import_react.default.createElement("style", null, `@keyframes pulse { 0%{transform:scale(1);opacity:1} 100%{transform:scale(2);opacity:0} }`)), labelEl);
|
|
125
|
+
if (type === "dots") return /* @__PURE__ */ import_react.default.createElement("div", { style: wrapStyle }, /* @__PURE__ */ import_react.default.createElement("div", { style: { display: "flex", gap: "8px", alignItems: "center" } }, [0, 1, 2].map((i) => /* @__PURE__ */ import_react.default.createElement("div", { key: i, style: {
|
|
709
126
|
width: size / 5,
|
|
710
127
|
height: size / 5,
|
|
711
128
|
borderRadius: "50%",
|
|
712
129
|
background: dots === i ? accent : alpha(accent, 0.25),
|
|
713
130
|
transition: "background 0.2s"
|
|
714
131
|
} }))), labelEl);
|
|
715
|
-
if (type === "bar") return /* @__PURE__ */
|
|
132
|
+
if (type === "bar") return /* @__PURE__ */ import_react.default.createElement("div", { style: wrapStyle }, /* @__PURE__ */ import_react.default.createElement("div", { style: {
|
|
716
133
|
width: size * 3,
|
|
717
134
|
height: size / 8,
|
|
718
135
|
background: alpha(accent, 0.15),
|
|
719
136
|
borderRadius: "99px",
|
|
720
137
|
overflow: "hidden"
|
|
721
|
-
} }, /* @__PURE__ */
|
|
138
|
+
} }, /* @__PURE__ */ import_react.default.createElement("div", { style: {
|
|
722
139
|
height: "100%",
|
|
723
140
|
borderRadius: "99px",
|
|
724
141
|
background: accent,
|
|
725
142
|
width: `${progress}%`,
|
|
726
143
|
transition: "width 0.03s linear"
|
|
727
144
|
} })), labelEl);
|
|
728
|
-
if (type === "ring") return /* @__PURE__ */
|
|
145
|
+
if (type === "ring") return /* @__PURE__ */ import_react.default.createElement("div", { style: wrapStyle }, /* @__PURE__ */ import_react.default.createElement("div", { style: {
|
|
729
146
|
width: size,
|
|
730
147
|
height: size,
|
|
731
148
|
borderRadius: "50%",
|
|
@@ -733,86 +150,12 @@ var Loader = ({
|
|
|
733
150
|
borderTop: `4px solid ${accent}`,
|
|
734
151
|
borderRight: `4px solid ${accent}`,
|
|
735
152
|
animation: `spin ${dur} linear infinite`
|
|
736
|
-
} }), /* @__PURE__ */
|
|
153
|
+
} }), /* @__PURE__ */ import_react.default.createElement("style", null, `@keyframes spin { to { transform: rotate(360deg); } }`), labelEl);
|
|
737
154
|
return null;
|
|
738
155
|
};
|
|
739
156
|
|
|
740
|
-
// src/components/Avatar/Avatar.jsx
|
|
741
|
-
var import_react14 = __toESM(require("react"));
|
|
742
|
-
var Avatar = ({
|
|
743
|
-
image = "https://i.pravatar.cc/150?img=32",
|
|
744
|
-
alt = "User Avatar",
|
|
745
|
-
size = "60px",
|
|
746
|
-
borderColor = "#7c3aed",
|
|
747
|
-
borderWidth = "4px",
|
|
748
|
-
radius = "50%"
|
|
749
|
-
}) => {
|
|
750
|
-
return /* @__PURE__ */ import_react14.default.createElement("div", { style: {
|
|
751
|
-
width: size,
|
|
752
|
-
height: size,
|
|
753
|
-
borderRadius: radius,
|
|
754
|
-
border: borderWidth + " solid " + borderColor,
|
|
755
|
-
overflow: "hidden",
|
|
756
|
-
display: "flex",
|
|
757
|
-
alignItems: "center",
|
|
758
|
-
justifyContent: "center",
|
|
759
|
-
background: "#f3f4f6"
|
|
760
|
-
} }, /* @__PURE__ */ import_react14.default.createElement("img", { src: image, alt, style: {
|
|
761
|
-
width: "100%",
|
|
762
|
-
height: "100%",
|
|
763
|
-
objectFit: "cover"
|
|
764
|
-
} }));
|
|
765
|
-
};
|
|
766
|
-
|
|
767
|
-
// src/components/DividerLine/DividerLine.jsx
|
|
768
|
-
var import_react15 = __toESM(require("react"));
|
|
769
|
-
var DividerLine = ({
|
|
770
|
-
text = "Section",
|
|
771
|
-
textColor = "#f1f5f9",
|
|
772
|
-
lineColor = "#334155",
|
|
773
|
-
spacing = "20px",
|
|
774
|
-
thickness = "2px",
|
|
775
|
-
borderRadius = "4px"
|
|
776
|
-
}) => {
|
|
777
|
-
return /* @__PURE__ */ import_react15.default.createElement("div", { style: { display: "flex", alignItems: "center", margin: spacing } }, /* @__PURE__ */ import_react15.default.createElement("div", { style: { flex: 1, height: thickness, background: lineColor, borderRadius } }), /* @__PURE__ */ import_react15.default.createElement("span", { style: { margin: "0 12px", color: textColor, fontSize: "14px", fontWeight: "600" } }, text), /* @__PURE__ */ import_react15.default.createElement("div", { style: { flex: 1, height: thickness, background: lineColor, borderRadius } }));
|
|
778
|
-
};
|
|
779
|
-
|
|
780
|
-
// src/components/Tabs/Tabs.jsx
|
|
781
|
-
var import_react16 = __toESM(require("react"));
|
|
782
|
-
var Tabs = ({
|
|
783
|
-
tabs = [
|
|
784
|
-
{ label: "Tab 1", content: "Content for Tab 1" },
|
|
785
|
-
{ label: "Tab 2", content: "Content for Tab 2" },
|
|
786
|
-
{ label: "Tab 3", content: "Content for Tab 3" }
|
|
787
|
-
],
|
|
788
|
-
bg = "#0f172a",
|
|
789
|
-
accent = "#2563eb",
|
|
790
|
-
textColor = "#f1f5f9",
|
|
791
|
-
radius = "8px"
|
|
792
|
-
}) => {
|
|
793
|
-
const [activeTab, setActiveTab] = (0, import_react16.useState)(0);
|
|
794
|
-
return /* @__PURE__ */ import_react16.default.createElement("div", { style: { background: bg, borderRadius: radius, padding: "16px", boxShadow: "0 4px 20px rgba(0,0,0,0.5)", fontFamily: "system-ui, sans-serif" } }, /* @__PURE__ */ import_react16.default.createElement("div", { style: { display: "flex", borderBottom: `2px solid ${accent}` } }, tabs.map((tab, index) => /* @__PURE__ */ import_react16.default.createElement(
|
|
795
|
-
"button",
|
|
796
|
-
{
|
|
797
|
-
key: index,
|
|
798
|
-
onClick: () => setActiveTab(index),
|
|
799
|
-
style: {
|
|
800
|
-
padding: "10px 20px",
|
|
801
|
-
background: activeTab === index ? accent : "transparent",
|
|
802
|
-
color: activeTab === index ? "white" : textColor,
|
|
803
|
-
border: "none",
|
|
804
|
-
borderRadius: radius,
|
|
805
|
-
cursor: "pointer",
|
|
806
|
-
fontWeight: activeTab === index ? "700" : "400",
|
|
807
|
-
transition: "background 0.3s, color 0.3s"
|
|
808
|
-
}
|
|
809
|
-
},
|
|
810
|
-
tab.label
|
|
811
|
-
))), /* @__PURE__ */ import_react16.default.createElement("div", { style: { padding: "16px", color: textColor } }, /* @__PURE__ */ import_react16.default.createElement("h4", { style: { margin: "0 0 8px", fontSize: "16px", fontWeight: "600" } }, tabs[activeTab].label), /* @__PURE__ */ import_react16.default.createElement("p", { style: { margin: "0", fontSize: "14px" } }, tabs[activeTab].content)));
|
|
812
|
-
};
|
|
813
|
-
|
|
814
157
|
// src/components/NotificationToast/NotificationToast.jsx
|
|
815
|
-
var
|
|
158
|
+
var import_react2 = __toESM(require("react"));
|
|
816
159
|
var NotificationToast = ({
|
|
817
160
|
title = "New Message",
|
|
818
161
|
message = "You have a new notification from the team.",
|
|
@@ -823,8 +166,8 @@ var NotificationToast = ({
|
|
|
823
166
|
radius = "14px",
|
|
824
167
|
showProgress = true
|
|
825
168
|
}) => {
|
|
826
|
-
const [visible, setVisible] = (0,
|
|
827
|
-
const [progress, setProgress] = (0,
|
|
169
|
+
const [visible, setVisible] = (0, import_react2.useState)(true);
|
|
170
|
+
const [progress, setProgress] = (0, import_react2.useState)(100);
|
|
828
171
|
const typeColors = {
|
|
829
172
|
success: "#10b981",
|
|
830
173
|
error: "#ef4444",
|
|
@@ -838,7 +181,7 @@ var NotificationToast = ({
|
|
|
838
181
|
info: "M13 16h-1v-4h-1m1-4h.01M12 2a10 10 0 100 20A10 10 0 0012 2z"
|
|
839
182
|
};
|
|
840
183
|
const color = typeColors[type] || accent;
|
|
841
|
-
(0,
|
|
184
|
+
(0, import_react2.useEffect)(() => {
|
|
842
185
|
if (!showProgress) return;
|
|
843
186
|
const step = 100 / (duration / 50);
|
|
844
187
|
const timer = setInterval(() => {
|
|
@@ -854,7 +197,7 @@ var NotificationToast = ({
|
|
|
854
197
|
return () => clearInterval(timer);
|
|
855
198
|
}, [duration, showProgress]);
|
|
856
199
|
if (!visible) return null;
|
|
857
|
-
return /* @__PURE__ */
|
|
200
|
+
return /* @__PURE__ */ import_react2.default.createElement("div", { style: {
|
|
858
201
|
background: bg,
|
|
859
202
|
borderRadius: radius,
|
|
860
203
|
padding: "16px 18px",
|
|
@@ -865,7 +208,7 @@ var NotificationToast = ({
|
|
|
865
208
|
border: `1px solid rgba(255,255,255,0.08)`,
|
|
866
209
|
position: "relative",
|
|
867
210
|
overflow: "hidden"
|
|
868
|
-
} }, /* @__PURE__ */
|
|
211
|
+
} }, /* @__PURE__ */ import_react2.default.createElement("div", { style: { display: "flex", alignItems: "flex-start", gap: "12px" } }, /* @__PURE__ */ import_react2.default.createElement("div", { style: {
|
|
869
212
|
width: 36,
|
|
870
213
|
height: 36,
|
|
871
214
|
borderRadius: "10px",
|
|
@@ -875,7 +218,7 @@ var NotificationToast = ({
|
|
|
875
218
|
display: "flex",
|
|
876
219
|
alignItems: "center",
|
|
877
220
|
justifyContent: "center"
|
|
878
|
-
} }, /* @__PURE__ */
|
|
221
|
+
} }, /* @__PURE__ */ import_react2.default.createElement(
|
|
879
222
|
"svg",
|
|
880
223
|
{
|
|
881
224
|
width: "16",
|
|
@@ -887,8 +230,8 @@ var NotificationToast = ({
|
|
|
887
230
|
strokeLinecap: "round",
|
|
888
231
|
strokeLinejoin: "round"
|
|
889
232
|
},
|
|
890
|
-
/* @__PURE__ */
|
|
891
|
-
)), /* @__PURE__ */
|
|
233
|
+
/* @__PURE__ */ import_react2.default.createElement("path", { d: typeIcons[type] || typeIcons.info })
|
|
234
|
+
)), /* @__PURE__ */ import_react2.default.createElement("div", { style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ import_react2.default.createElement("div", { style: { fontSize: "14px", fontWeight: "700", marginBottom: "3px" } }, title), /* @__PURE__ */ import_react2.default.createElement("div", { style: { fontSize: "12px", color: "rgba(255,255,255,0.5)", lineHeight: 1.5 } }, message)), /* @__PURE__ */ import_react2.default.createElement(
|
|
892
235
|
"button",
|
|
893
236
|
{
|
|
894
237
|
onClick: () => setVisible(false),
|
|
@@ -902,7 +245,7 @@ var NotificationToast = ({
|
|
|
902
245
|
lineHeight: 1
|
|
903
246
|
}
|
|
904
247
|
},
|
|
905
|
-
/* @__PURE__ */
|
|
248
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
906
249
|
"svg",
|
|
907
250
|
{
|
|
908
251
|
width: "14",
|
|
@@ -913,16 +256,16 @@ var NotificationToast = ({
|
|
|
913
256
|
strokeWidth: "2.5",
|
|
914
257
|
strokeLinecap: "round"
|
|
915
258
|
},
|
|
916
|
-
/* @__PURE__ */
|
|
259
|
+
/* @__PURE__ */ import_react2.default.createElement("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
917
260
|
)
|
|
918
|
-
)), showProgress && /* @__PURE__ */
|
|
261
|
+
)), showProgress && /* @__PURE__ */ import_react2.default.createElement("div", { style: {
|
|
919
262
|
position: "absolute",
|
|
920
263
|
bottom: 0,
|
|
921
264
|
left: 0,
|
|
922
265
|
right: 0,
|
|
923
266
|
height: "3px",
|
|
924
267
|
background: "rgba(255,255,255,0.07)"
|
|
925
|
-
} }, /* @__PURE__ */
|
|
268
|
+
} }, /* @__PURE__ */ import_react2.default.createElement("div", { style: {
|
|
926
269
|
height: "100%",
|
|
927
270
|
width: `${progress}%`,
|
|
928
271
|
background: color,
|
|
@@ -932,7 +275,7 @@ var NotificationToast = ({
|
|
|
932
275
|
};
|
|
933
276
|
|
|
934
277
|
// src/components/AvatarCard/AvatarCard.jsx
|
|
935
|
-
var
|
|
278
|
+
var import_react3 = __toESM(require("react"));
|
|
936
279
|
var AvatarCard = ({
|
|
937
280
|
name = "Aryan Sharma",
|
|
938
281
|
role = "Frontend Developer",
|
|
@@ -945,7 +288,7 @@ var AvatarCard = ({
|
|
|
945
288
|
bg = "#0f172a",
|
|
946
289
|
radius = "20px"
|
|
947
290
|
}) => {
|
|
948
|
-
const [followed, setFollowed] = (0,
|
|
291
|
+
const [followed, setFollowed] = (0, import_react3.useState)(false);
|
|
949
292
|
const alpha = (hex, op) => {
|
|
950
293
|
const r = parseInt(hex.slice(1, 3), 16);
|
|
951
294
|
const g = parseInt(hex.slice(3, 5), 16);
|
|
@@ -958,7 +301,7 @@ var AvatarCard = ({
|
|
|
958
301
|
{ label: "Following", value: following },
|
|
959
302
|
{ label: "Projects", value: projects }
|
|
960
303
|
];
|
|
961
|
-
return /* @__PURE__ */
|
|
304
|
+
return /* @__PURE__ */ import_react3.default.createElement("div", { style: {
|
|
962
305
|
background: bg,
|
|
963
306
|
borderRadius: radius,
|
|
964
307
|
padding: "24px 20px",
|
|
@@ -969,14 +312,14 @@ var AvatarCard = ({
|
|
|
969
312
|
border: "1px solid rgba(255,255,255,0.08)",
|
|
970
313
|
position: "relative",
|
|
971
314
|
overflow: "hidden"
|
|
972
|
-
} }, /* @__PURE__ */
|
|
315
|
+
} }, /* @__PURE__ */ import_react3.default.createElement("div", { style: {
|
|
973
316
|
position: "absolute",
|
|
974
317
|
top: 0,
|
|
975
318
|
left: 0,
|
|
976
319
|
right: 0,
|
|
977
320
|
height: "3px",
|
|
978
321
|
background: `linear-gradient(90deg, ${accent}, ${alpha(accent, 0.3)})`
|
|
979
|
-
} }), /* @__PURE__ */
|
|
322
|
+
} }), /* @__PURE__ */ import_react3.default.createElement("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", marginBottom: "16px" } }, /* @__PURE__ */ import_react3.default.createElement("div", { style: {
|
|
980
323
|
width: 72,
|
|
981
324
|
height: 72,
|
|
982
325
|
borderRadius: "50%",
|
|
@@ -989,7 +332,7 @@ var AvatarCard = ({
|
|
|
989
332
|
color: "#fff",
|
|
990
333
|
border: `3px solid ${alpha(accent, 0.4)}`,
|
|
991
334
|
marginBottom: "12px"
|
|
992
|
-
} }, !avatar && initials), /* @__PURE__ */
|
|
335
|
+
} }, !avatar && initials), /* @__PURE__ */ import_react3.default.createElement("div", { style: { fontSize: "16px", fontWeight: "700", marginBottom: "3px" } }, name), /* @__PURE__ */ import_react3.default.createElement("div", { style: {
|
|
993
336
|
fontSize: "12px",
|
|
994
337
|
fontWeight: "600",
|
|
995
338
|
color: accent,
|
|
@@ -997,14 +340,14 @@ var AvatarCard = ({
|
|
|
997
340
|
padding: "2px 10px",
|
|
998
341
|
borderRadius: "20px",
|
|
999
342
|
border: `1px solid ${alpha(accent, 0.3)}`
|
|
1000
|
-
} }, role)), /* @__PURE__ */
|
|
343
|
+
} }, role)), /* @__PURE__ */ import_react3.default.createElement("p", { style: {
|
|
1001
344
|
fontSize: "12px",
|
|
1002
345
|
color: "rgba(255,255,255,0.45)",
|
|
1003
346
|
textAlign: "center",
|
|
1004
347
|
lineHeight: 1.6,
|
|
1005
348
|
marginBottom: "18px",
|
|
1006
349
|
padding: "0 4px"
|
|
1007
|
-
} }, bio), /* @__PURE__ */
|
|
350
|
+
} }, bio), /* @__PURE__ */ import_react3.default.createElement("div", { style: {
|
|
1008
351
|
display: "flex",
|
|
1009
352
|
justifyContent: "space-around",
|
|
1010
353
|
background: "rgba(255,255,255,0.04)",
|
|
@@ -1012,11 +355,11 @@ var AvatarCard = ({
|
|
|
1012
355
|
borderRadius: "12px",
|
|
1013
356
|
padding: "12px 8px",
|
|
1014
357
|
marginBottom: "16px"
|
|
1015
|
-
} }, stats.map((s) => /* @__PURE__ */
|
|
358
|
+
} }, stats.map((s) => /* @__PURE__ */ import_react3.default.createElement("div", { key: s.label, style: { textAlign: "center" } }, /* @__PURE__ */ import_react3.default.createElement("div", { style: { fontSize: "18px", fontWeight: "800" } }, s.value >= 1e3 ? (s.value / 1e3).toFixed(1) + "k" : s.value), /* @__PURE__ */ import_react3.default.createElement("div", { style: { fontSize: "10px", color: "rgba(255,255,255,0.4)", marginTop: "2px" } }, s.label)))));
|
|
1016
359
|
};
|
|
1017
360
|
|
|
1018
361
|
// src/components/PricingCard/PricingCard.jsx
|
|
1019
|
-
var
|
|
362
|
+
var import_react4 = __toESM(require("react"));
|
|
1020
363
|
var PricingCard = ({
|
|
1021
364
|
planName = "Pro Plan",
|
|
1022
365
|
description = "For teams that need more power.",
|
|
@@ -1044,7 +387,7 @@ var PricingCard = ({
|
|
|
1044
387
|
const b = parseInt(hex.slice(5, 7), 16);
|
|
1045
388
|
return `rgba(${r},${g},${b},${op})`;
|
|
1046
389
|
};
|
|
1047
|
-
return /* @__PURE__ */
|
|
390
|
+
return /* @__PURE__ */ import_react4.default.createElement("div", { style: {
|
|
1048
391
|
background: bg,
|
|
1049
392
|
borderRadius: radius,
|
|
1050
393
|
padding: "28px 24px",
|
|
@@ -1055,14 +398,14 @@ var PricingCard = ({
|
|
|
1055
398
|
border: `1px solid ${alpha(accent, 0.25)}`,
|
|
1056
399
|
position: "relative",
|
|
1057
400
|
overflow: "hidden"
|
|
1058
|
-
} }, /* @__PURE__ */
|
|
401
|
+
} }, /* @__PURE__ */ import_react4.default.createElement("div", { style: {
|
|
1059
402
|
position: "absolute",
|
|
1060
403
|
top: 0,
|
|
1061
404
|
left: 0,
|
|
1062
405
|
right: 0,
|
|
1063
406
|
height: "3px",
|
|
1064
407
|
background: `linear-gradient(90deg, ${accent}, ${alpha(accent, 0.3)})`
|
|
1065
|
-
} }), badgeText && /* @__PURE__ */
|
|
408
|
+
} }), badgeText && /* @__PURE__ */ import_react4.default.createElement("div", { style: {
|
|
1066
409
|
display: "inline-flex",
|
|
1067
410
|
alignItems: "center",
|
|
1068
411
|
gap: "6px",
|
|
@@ -1076,7 +419,7 @@ var PricingCard = ({
|
|
|
1076
419
|
color: accent,
|
|
1077
420
|
letterSpacing: "0.5px",
|
|
1078
421
|
textTransform: "uppercase"
|
|
1079
|
-
} }, /* @__PURE__ */
|
|
422
|
+
} }, /* @__PURE__ */ import_react4.default.createElement("div", { style: { width: 6, height: 6, borderRadius: "50%", background: accent } }), badgeText), /* @__PURE__ */ import_react4.default.createElement("div", { style: { fontSize: "20px", fontWeight: "800", marginBottom: "4px" } }, planName), /* @__PURE__ */ import_react4.default.createElement("div", { style: { fontSize: "13px", color: "rgba(255,255,255,0.45)", marginBottom: "20px", lineHeight: 1.5 } }, description), /* @__PURE__ */ import_react4.default.createElement("div", { style: { display: "flex", alignItems: "flex-end", gap: "3px", marginBottom: "4px" } }, /* @__PURE__ */ import_react4.default.createElement("span", { style: { fontSize: "18px", fontWeight: "700", color: "rgba(255,255,255,0.5)", lineHeight: 2 } }, currency), /* @__PURE__ */ import_react4.default.createElement("span", { style: { fontSize: "52px", fontWeight: "800", color: "#fff", lineHeight: 1 } }, Math.round(price))), /* @__PURE__ */ import_react4.default.createElement("div", { style: { fontSize: "12px", color: "rgba(255,255,255,0.35)", marginBottom: "20px" } }, period), /* @__PURE__ */ import_react4.default.createElement("div", { style: { height: "1px", background: "rgba(255,255,255,0.07)", marginBottom: "16px" } }), /* @__PURE__ */ import_react4.default.createElement("ul", { style: { listStyle: "none", padding: 0, margin: "0 0 22px", display: "flex", flexDirection: "column", gap: "10px" } }, features.map((f, i) => /* @__PURE__ */ import_react4.default.createElement("li", { key: i, style: { display: "flex", alignItems: "center", gap: "10px", fontSize: "13px", color: "rgba(255,255,255,0.75)" } }, /* @__PURE__ */ import_react4.default.createElement("div", { style: {
|
|
1080
423
|
width: "18px",
|
|
1081
424
|
height: "18px",
|
|
1082
425
|
borderRadius: "50%",
|
|
@@ -1086,7 +429,7 @@ var PricingCard = ({
|
|
|
1086
429
|
justifyContent: "center",
|
|
1087
430
|
background: alpha(accent, 0.18),
|
|
1088
431
|
border: `1px solid ${alpha(accent, 0.4)}`
|
|
1089
|
-
} }, /* @__PURE__ */
|
|
432
|
+
} }, /* @__PURE__ */ import_react4.default.createElement(
|
|
1090
433
|
"svg",
|
|
1091
434
|
{
|
|
1092
435
|
width: "10",
|
|
@@ -1098,8 +441,8 @@ var PricingCard = ({
|
|
|
1098
441
|
strokeLinecap: "round",
|
|
1099
442
|
strokeLinejoin: "round"
|
|
1100
443
|
},
|
|
1101
|
-
/* @__PURE__ */
|
|
1102
|
-
)), f))), /* @__PURE__ */
|
|
444
|
+
/* @__PURE__ */ import_react4.default.createElement("polyline", { points: "1.5,6 4.5,9 10.5,3" })
|
|
445
|
+
)), f))), /* @__PURE__ */ import_react4.default.createElement(
|
|
1103
446
|
"button",
|
|
1104
447
|
{
|
|
1105
448
|
onClick: onCtaClick,
|
|
@@ -1124,7 +467,7 @@ var PricingCard = ({
|
|
|
1124
467
|
};
|
|
1125
468
|
|
|
1126
469
|
// src/components/Navbar/Navbar.jsx
|
|
1127
|
-
var
|
|
470
|
+
var import_react5 = __toESM(require("react"));
|
|
1128
471
|
var Navbar = ({
|
|
1129
472
|
logo = "VirtualAI",
|
|
1130
473
|
links = ["Home", "Features", "Pricing", "Blog"],
|
|
@@ -1136,28 +479,28 @@ var Navbar = ({
|
|
|
1136
479
|
onLinkClick = () => {
|
|
1137
480
|
}
|
|
1138
481
|
}) => {
|
|
1139
|
-
const [scrolled, setScrolled] = (0,
|
|
1140
|
-
const [menuOpen, setMenuOpen] = (0,
|
|
1141
|
-
const [active, setActive] = (0,
|
|
1142
|
-
const [isMobile, setIsMobile] = (0,
|
|
482
|
+
const [scrolled, setScrolled] = (0, import_react5.useState)(false);
|
|
483
|
+
const [menuOpen, setMenuOpen] = (0, import_react5.useState)(false);
|
|
484
|
+
const [active, setActive] = (0, import_react5.useState)("Home");
|
|
485
|
+
const [isMobile, setIsMobile] = (0, import_react5.useState)(false);
|
|
1143
486
|
const alpha = (hex, op) => {
|
|
1144
487
|
const r = parseInt(hex.slice(1, 3), 16);
|
|
1145
488
|
const g = parseInt(hex.slice(3, 5), 16);
|
|
1146
489
|
const b = parseInt(hex.slice(5, 7), 16);
|
|
1147
490
|
return `rgba(${r},${g},${b},${op})`;
|
|
1148
491
|
};
|
|
1149
|
-
(0,
|
|
492
|
+
(0, import_react5.useEffect)(() => {
|
|
1150
493
|
const checkMobile = () => setIsMobile(window.innerWidth < 768);
|
|
1151
494
|
checkMobile();
|
|
1152
495
|
window.addEventListener("resize", checkMobile);
|
|
1153
496
|
return () => window.removeEventListener("resize", checkMobile);
|
|
1154
497
|
}, []);
|
|
1155
|
-
(0,
|
|
498
|
+
(0, import_react5.useEffect)(() => {
|
|
1156
499
|
const handler = () => setScrolled(window.scrollY > 10);
|
|
1157
500
|
window.addEventListener("scroll", handler);
|
|
1158
501
|
return () => window.removeEventListener("scroll", handler);
|
|
1159
502
|
}, []);
|
|
1160
|
-
(0,
|
|
503
|
+
(0, import_react5.useEffect)(() => {
|
|
1161
504
|
if (!isMobile) setMenuOpen(false);
|
|
1162
505
|
}, [isMobile]);
|
|
1163
506
|
const handleLink = (link) => {
|
|
@@ -1165,7 +508,7 @@ var Navbar = ({
|
|
|
1165
508
|
setMenuOpen(false);
|
|
1166
509
|
onLinkClick(link);
|
|
1167
510
|
};
|
|
1168
|
-
return /* @__PURE__ */
|
|
511
|
+
return /* @__PURE__ */ import_react5.default.createElement(import_react5.default.Fragment, null, /* @__PURE__ */ import_react5.default.createElement("style", null, `
|
|
1169
512
|
@keyframes nbSlideDown {
|
|
1170
513
|
from { opacity: 0; transform: translateY(-8px); }
|
|
1171
514
|
to { opacity: 1; transform: translateY(0); }
|
|
@@ -1174,7 +517,7 @@ var Navbar = ({
|
|
|
1174
517
|
.nb-cta:hover { opacity: 0.85 !important; }
|
|
1175
518
|
.nb-ham:hover { background: rgba(255,255,255,0.1) !important; }
|
|
1176
519
|
.nb-mlink:hover { background: rgba(255,255,255,0.06) !important; }
|
|
1177
|
-
`), /* @__PURE__ */
|
|
520
|
+
`), /* @__PURE__ */ import_react5.default.createElement("nav", { style: {
|
|
1178
521
|
position: "sticky",
|
|
1179
522
|
top: 0,
|
|
1180
523
|
left: 0,
|
|
@@ -1188,7 +531,7 @@ var Navbar = ({
|
|
|
1188
531
|
fontFamily: "system-ui, -apple-system, sans-serif",
|
|
1189
532
|
width: "100%",
|
|
1190
533
|
boxSizing: "border-box"
|
|
1191
|
-
} }, /* @__PURE__ */
|
|
534
|
+
} }, /* @__PURE__ */ import_react5.default.createElement("div", { style: {
|
|
1192
535
|
maxWidth: "1200px",
|
|
1193
536
|
margin: "0 auto",
|
|
1194
537
|
padding: "0 20px",
|
|
@@ -1198,7 +541,7 @@ var Navbar = ({
|
|
|
1198
541
|
justifyContent: "space-between",
|
|
1199
542
|
gap: "16px",
|
|
1200
543
|
boxSizing: "border-box"
|
|
1201
|
-
} }, /* @__PURE__ */
|
|
544
|
+
} }, /* @__PURE__ */ import_react5.default.createElement("div", { style: { display: "flex", alignItems: "center", gap: "8px", cursor: "pointer", flexShrink: 0 } }, /* @__PURE__ */ import_react5.default.createElement("div", { style: {
|
|
1202
545
|
width: isMobile ? "26px" : "30px",
|
|
1203
546
|
height: isMobile ? "26px" : "30px",
|
|
1204
547
|
borderRadius: "8px",
|
|
@@ -1210,12 +553,12 @@ var Navbar = ({
|
|
|
1210
553
|
fontWeight: "800",
|
|
1211
554
|
color: "#fff",
|
|
1212
555
|
flexShrink: 0
|
|
1213
|
-
} }, logo[0]), /* @__PURE__ */
|
|
556
|
+
} }, logo[0]), /* @__PURE__ */ import_react5.default.createElement("span", { style: {
|
|
1214
557
|
fontSize: isMobile ? "14px" : "16px",
|
|
1215
558
|
fontWeight: "800",
|
|
1216
559
|
color: "#fff",
|
|
1217
560
|
letterSpacing: "-0.3px"
|
|
1218
|
-
} }, logo)), !isMobile && /* @__PURE__ */
|
|
561
|
+
} }, logo)), !isMobile && /* @__PURE__ */ import_react5.default.createElement("div", { style: { display: "flex", alignItems: "center", gap: "2px", flex: 1, justifyContent: "center" } }, links.map((link) => /* @__PURE__ */ import_react5.default.createElement(
|
|
1219
562
|
"button",
|
|
1220
563
|
{
|
|
1221
564
|
key: link,
|
|
@@ -1236,7 +579,7 @@ var Navbar = ({
|
|
|
1236
579
|
}
|
|
1237
580
|
},
|
|
1238
581
|
link
|
|
1239
|
-
))), /* @__PURE__ */
|
|
582
|
+
))), /* @__PURE__ */ import_react5.default.createElement("div", { style: { display: "flex", alignItems: "center", gap: "8px", flexShrink: 0 } }, /* @__PURE__ */ import_react5.default.createElement(
|
|
1240
583
|
"button",
|
|
1241
584
|
{
|
|
1242
585
|
className: "nb-cta",
|
|
@@ -1256,7 +599,7 @@ var Navbar = ({
|
|
|
1256
599
|
}
|
|
1257
600
|
},
|
|
1258
601
|
ctaText
|
|
1259
|
-
), isMobile && /* @__PURE__ */
|
|
602
|
+
), isMobile && /* @__PURE__ */ import_react5.default.createElement(
|
|
1260
603
|
"button",
|
|
1261
604
|
{
|
|
1262
605
|
className: "nb-ham",
|
|
@@ -1278,7 +621,7 @@ var Navbar = ({
|
|
|
1278
621
|
padding: 0
|
|
1279
622
|
}
|
|
1280
623
|
},
|
|
1281
|
-
/* @__PURE__ */
|
|
624
|
+
/* @__PURE__ */ import_react5.default.createElement("div", { style: {
|
|
1282
625
|
width: "16px",
|
|
1283
626
|
height: "1.5px",
|
|
1284
627
|
background: "rgba(255,255,255,0.7)",
|
|
@@ -1286,7 +629,7 @@ var Navbar = ({
|
|
|
1286
629
|
transform: menuOpen ? "rotate(45deg) translate(4px, 4px)" : "none",
|
|
1287
630
|
transition: "transform 0.25s"
|
|
1288
631
|
} }),
|
|
1289
|
-
/* @__PURE__ */
|
|
632
|
+
/* @__PURE__ */ import_react5.default.createElement("div", { style: {
|
|
1290
633
|
width: "16px",
|
|
1291
634
|
height: "1.5px",
|
|
1292
635
|
background: "rgba(255,255,255,0.7)",
|
|
@@ -1294,7 +637,7 @@ var Navbar = ({
|
|
|
1294
637
|
opacity: menuOpen ? 0 : 1,
|
|
1295
638
|
transition: "opacity 0.2s"
|
|
1296
639
|
} }),
|
|
1297
|
-
/* @__PURE__ */
|
|
640
|
+
/* @__PURE__ */ import_react5.default.createElement("div", { style: {
|
|
1298
641
|
width: "16px",
|
|
1299
642
|
height: "1.5px",
|
|
1300
643
|
background: "rgba(255,255,255,0.7)",
|
|
@@ -1302,7 +645,7 @@ var Navbar = ({
|
|
|
1302
645
|
transform: menuOpen ? "rotate(-45deg) translate(4px, -4px)" : "none",
|
|
1303
646
|
transition: "transform 0.25s"
|
|
1304
647
|
} })
|
|
1305
|
-
))), isMobile && menuOpen && /* @__PURE__ */
|
|
648
|
+
))), isMobile && menuOpen && /* @__PURE__ */ import_react5.default.createElement("div", { style: {
|
|
1306
649
|
animation: "nbSlideDown 0.2s ease",
|
|
1307
650
|
borderTop: "1px solid rgba(255,255,255,0.06)",
|
|
1308
651
|
padding: "10px 16px 16px",
|
|
@@ -1310,7 +653,7 @@ var Navbar = ({
|
|
|
1310
653
|
flexDirection: "column",
|
|
1311
654
|
gap: "3px",
|
|
1312
655
|
background: alpha(bg, 0.98)
|
|
1313
|
-
} }, links.map((link) => /* @__PURE__ */
|
|
656
|
+
} }, links.map((link) => /* @__PURE__ */ import_react5.default.createElement(
|
|
1314
657
|
"button",
|
|
1315
658
|
{
|
|
1316
659
|
key: link,
|
|
@@ -1335,7 +678,7 @@ var Navbar = ({
|
|
|
1335
678
|
}
|
|
1336
679
|
},
|
|
1337
680
|
link,
|
|
1338
|
-
active === link && /* @__PURE__ */
|
|
681
|
+
active === link && /* @__PURE__ */ import_react5.default.createElement(
|
|
1339
682
|
"svg",
|
|
1340
683
|
{
|
|
1341
684
|
width: "14",
|
|
@@ -1346,9 +689,9 @@ var Navbar = ({
|
|
|
1346
689
|
strokeWidth: "2.5",
|
|
1347
690
|
strokeLinecap: "round"
|
|
1348
691
|
},
|
|
1349
|
-
/* @__PURE__ */
|
|
692
|
+
/* @__PURE__ */ import_react5.default.createElement("polyline", { points: "9 18 15 12 9 6" })
|
|
1350
693
|
)
|
|
1351
|
-
)), /* @__PURE__ */
|
|
694
|
+
)), /* @__PURE__ */ import_react5.default.createElement("div", { style: { height: "1px", background: "rgba(255,255,255,0.07)", margin: "8px 0" } }), /* @__PURE__ */ import_react5.default.createElement(
|
|
1352
695
|
"button",
|
|
1353
696
|
{
|
|
1354
697
|
onClick: () => {
|
|
@@ -1373,7 +716,7 @@ var Navbar = ({
|
|
|
1373
716
|
};
|
|
1374
717
|
|
|
1375
718
|
// src/components/Footer/Footer.jsx
|
|
1376
|
-
var
|
|
719
|
+
var import_react6 = __toESM(require("react"));
|
|
1377
720
|
var Footer = ({
|
|
1378
721
|
logo = "VirtualAI",
|
|
1379
722
|
links = ["Home", "Features", "Pricing", "Blog", "Contact"],
|
|
@@ -1381,21 +724,21 @@ var Footer = ({
|
|
|
1381
724
|
accent = "#6366f1",
|
|
1382
725
|
bg = "#0f172a"
|
|
1383
726
|
}) => {
|
|
1384
|
-
return /* @__PURE__ */
|
|
727
|
+
return /* @__PURE__ */ import_react6.default.createElement("footer", { style: {
|
|
1385
728
|
background: bg,
|
|
1386
729
|
borderTop: "1px solid rgba(255,255,255,0.06)",
|
|
1387
730
|
fontFamily: "system-ui, sans-serif",
|
|
1388
731
|
width: "100%",
|
|
1389
732
|
boxSizing: "border-box",
|
|
1390
733
|
padding: "28px 24px"
|
|
1391
|
-
} }, /* @__PURE__ */
|
|
734
|
+
} }, /* @__PURE__ */ import_react6.default.createElement("div", { style: {
|
|
1392
735
|
maxWidth: "900px",
|
|
1393
736
|
margin: "0 auto",
|
|
1394
737
|
display: "flex",
|
|
1395
738
|
flexDirection: "column",
|
|
1396
739
|
alignItems: "center",
|
|
1397
740
|
gap: "20px"
|
|
1398
|
-
} }, /* @__PURE__ */
|
|
741
|
+
} }, /* @__PURE__ */ import_react6.default.createElement("div", { style: { display: "flex", alignItems: "center", gap: "8px" } }, /* @__PURE__ */ import_react6.default.createElement("div", { style: {
|
|
1399
742
|
width: "26px",
|
|
1400
743
|
height: "26px",
|
|
1401
744
|
borderRadius: "7px",
|
|
@@ -1406,7 +749,7 @@ var Footer = ({
|
|
|
1406
749
|
fontSize: "12px",
|
|
1407
750
|
fontWeight: "800",
|
|
1408
751
|
color: "#fff"
|
|
1409
|
-
} }, logo[0]), /* @__PURE__ */
|
|
752
|
+
} }, logo[0]), /* @__PURE__ */ import_react6.default.createElement("span", { style: { fontSize: "15px", fontWeight: "800", color: "#fff" } }, logo)), /* @__PURE__ */ import_react6.default.createElement("div", { style: { display: "flex", flexWrap: "wrap", justifyContent: "center", gap: "4px" } }, links.map((link) => /* @__PURE__ */ import_react6.default.createElement(
|
|
1410
753
|
"a",
|
|
1411
754
|
{
|
|
1412
755
|
key: link,
|
|
@@ -1423,11 +766,11 @@ var Footer = ({
|
|
|
1423
766
|
onMouseLeave: (e) => e.currentTarget.style.color = "rgba(255,255,255,0.4)"
|
|
1424
767
|
},
|
|
1425
768
|
link
|
|
1426
|
-
))), /* @__PURE__ */
|
|
769
|
+
))), /* @__PURE__ */ import_react6.default.createElement("div", { style: { width: "100%", height: "1px", background: "rgba(255,255,255,0.06)" } }), /* @__PURE__ */ import_react6.default.createElement("p", { style: { fontSize: "12px", color: "rgba(255,255,255,0.22)", margin: 0 } }, "\xA9 ", (/* @__PURE__ */ new Date()).getFullYear(), " ", copyright, ". All rights reserved.")));
|
|
1427
770
|
};
|
|
1428
771
|
|
|
1429
772
|
// src/components/Sidebar/Sidebar.jsx
|
|
1430
|
-
var
|
|
773
|
+
var import_react7 = __toESM(require("react"));
|
|
1431
774
|
var Sidebar = ({
|
|
1432
775
|
logo = "VirtualAI",
|
|
1433
776
|
accent = "#6366f1",
|
|
@@ -1436,27 +779,27 @@ var Sidebar = ({
|
|
|
1436
779
|
{
|
|
1437
780
|
label: "Dashboard",
|
|
1438
781
|
icon: "M3 3h7v7H3zM14 3h7v7h-7zM3 14h7v7H3zM14 14h7v7h-7z",
|
|
1439
|
-
component: /* @__PURE__ */
|
|
782
|
+
component: /* @__PURE__ */ import_react7.default.createElement("div", { style: { padding: "24px" } }, /* @__PURE__ */ import_react7.default.createElement("h2", { style: { color: "#fff", fontSize: "20px", fontWeight: "700", marginBottom: "8px" } }, "Dashboard"), /* @__PURE__ */ import_react7.default.createElement("p", { style: { color: "rgba(255,255,255,0.4)", fontSize: "14px" } }, "Welcome to your dashboard overview."))
|
|
1440
783
|
},
|
|
1441
784
|
{
|
|
1442
785
|
label: "Analytics",
|
|
1443
786
|
icon: "M18 20V10M12 20V4M6 20v-6",
|
|
1444
|
-
component: /* @__PURE__ */
|
|
787
|
+
component: /* @__PURE__ */ import_react7.default.createElement("div", { style: { padding: "24px" } }, /* @__PURE__ */ import_react7.default.createElement("h2", { style: { color: "#fff", fontSize: "20px", fontWeight: "700", marginBottom: "8px" } }, "Analytics"), /* @__PURE__ */ import_react7.default.createElement("p", { style: { color: "rgba(255,255,255,0.4)", fontSize: "14px" } }, "View your stats and performance here."))
|
|
1445
788
|
},
|
|
1446
789
|
{
|
|
1447
790
|
label: "Users",
|
|
1448
791
|
icon: "M17 21v-2a4 4 0 00-4-4H5a4 4 0 00-4 4v2M9 11a4 4 0 100-8 4 4 0 000 8zM23 21v-2a4 4 0 00-3-3.87M16 3.13a4 4 0 010 7.75",
|
|
1449
|
-
component: /* @__PURE__ */
|
|
792
|
+
component: /* @__PURE__ */ import_react7.default.createElement("div", { style: { padding: "24px" } }, /* @__PURE__ */ import_react7.default.createElement("h2", { style: { color: "#fff", fontSize: "20px", fontWeight: "700", marginBottom: "8px" } }, "Users"), /* @__PURE__ */ import_react7.default.createElement("p", { style: { color: "rgba(255,255,255,0.4)", fontSize: "14px" } }, "Manage your users and permissions."))
|
|
1450
793
|
},
|
|
1451
794
|
{
|
|
1452
795
|
label: "Settings",
|
|
1453
796
|
icon: "M12 15a3 3 0 100-6 3 3 0 000 6zM19.4 15a1.65 1.65 0 00.33 1.82l.06.06a2 2 0 010 2.83 2 2 0 01-2.83 0l-.06-.06a1.65 1.65 0 00-1.82-.33 1.65 1.65 0 00-1 1.51V21a2 2 0 01-4 0v-.09A1.65 1.65 0 009 19.4a1.65 1.65 0 00-1.82.33l-.06.06a2 2 0 01-2.83-2.83l.06-.06A1.65 1.65 0 004.68 15a1.65 1.65 0 00-1.51-1H3a2 2 0 010-4h.09A1.65 1.65 0 004.6 9a1.65 1.65 0 00-.33-1.82l-.06-.06a2 2 0 012.83-2.83l.06.06A1.65 1.65 0 009 4.68a1.65 1.65 0 001-1.51V3a2 2 0 014 0v.09a1.65 1.65 0 001 1.51 1.65 1.65 0 001.82-.33l.06-.06a2 2 0 012.83 2.83l-.06.06A1.65 1.65 0 0019.4 9a1.65 1.65 0 001.51 1H21a2 2 0 010 4h-.09a1.65 1.65 0 00-1.51 1z",
|
|
1454
|
-
component: /* @__PURE__ */
|
|
797
|
+
component: /* @__PURE__ */ import_react7.default.createElement("div", { style: { padding: "24px" } }, /* @__PURE__ */ import_react7.default.createElement("h2", { style: { color: "#fff", fontSize: "20px", fontWeight: "700", marginBottom: "8px" } }, "Settings"), /* @__PURE__ */ import_react7.default.createElement("p", { style: { color: "rgba(255,255,255,0.4)", fontSize: "14px" } }, "Configure your preferences here."))
|
|
1455
798
|
}
|
|
1456
799
|
]
|
|
1457
800
|
}) => {
|
|
1458
|
-
const [active, setActive] = (0,
|
|
1459
|
-
const [collapsed, setCollapsed] = (0,
|
|
801
|
+
const [active, setActive] = (0, import_react7.useState)(0);
|
|
802
|
+
const [collapsed, setCollapsed] = (0, import_react7.useState)(false);
|
|
1460
803
|
const alpha = (hex, op) => {
|
|
1461
804
|
const r = parseInt(hex.slice(1, 3), 16);
|
|
1462
805
|
const g = parseInt(hex.slice(3, 5), 16);
|
|
@@ -1464,14 +807,14 @@ var Sidebar = ({
|
|
|
1464
807
|
return `rgba(${r},${g},${b},${op})`;
|
|
1465
808
|
};
|
|
1466
809
|
const activeItem = items[active];
|
|
1467
|
-
return /* @__PURE__ */
|
|
810
|
+
return /* @__PURE__ */ import_react7.default.createElement("div", { style: {
|
|
1468
811
|
display: "flex",
|
|
1469
812
|
height: "480px",
|
|
1470
813
|
fontFamily: "system-ui, sans-serif",
|
|
1471
814
|
borderRadius: "16px",
|
|
1472
815
|
overflow: "hidden",
|
|
1473
816
|
border: "1px solid rgba(255,255,255,0.07)"
|
|
1474
|
-
} }, /* @__PURE__ */
|
|
817
|
+
} }, /* @__PURE__ */ import_react7.default.createElement("div", { style: {
|
|
1475
818
|
width: collapsed ? "60px" : "200px",
|
|
1476
819
|
background: bg,
|
|
1477
820
|
borderRight: "1px solid rgba(255,255,255,0.06)",
|
|
@@ -1480,7 +823,7 @@ var Sidebar = ({
|
|
|
1480
823
|
transition: "width 0.25s ease",
|
|
1481
824
|
flexShrink: 0,
|
|
1482
825
|
overflow: "hidden"
|
|
1483
|
-
} }, /* @__PURE__ */
|
|
826
|
+
} }, /* @__PURE__ */ import_react7.default.createElement("div", { style: {
|
|
1484
827
|
height: "56px",
|
|
1485
828
|
display: "flex",
|
|
1486
829
|
alignItems: "center",
|
|
@@ -1489,7 +832,7 @@ var Sidebar = ({
|
|
|
1489
832
|
borderBottom: "1px solid rgba(255,255,255,0.05)",
|
|
1490
833
|
overflow: "hidden",
|
|
1491
834
|
flexShrink: 0
|
|
1492
|
-
} }, /* @__PURE__ */
|
|
835
|
+
} }, /* @__PURE__ */ import_react7.default.createElement("div", { style: {
|
|
1493
836
|
width: "28px",
|
|
1494
837
|
height: "28px",
|
|
1495
838
|
borderRadius: "8px",
|
|
@@ -1501,7 +844,7 @@ var Sidebar = ({
|
|
|
1501
844
|
fontSize: "13px",
|
|
1502
845
|
fontWeight: "800",
|
|
1503
846
|
color: "#fff"
|
|
1504
|
-
} }, logo[0]), !collapsed && /* @__PURE__ */
|
|
847
|
+
} }, logo[0]), !collapsed && /* @__PURE__ */ import_react7.default.createElement("span", { style: { fontSize: "14px", fontWeight: "800", color: "#fff", whiteSpace: "nowrap" } }, logo)), /* @__PURE__ */ import_react7.default.createElement("nav", { style: { flex: 1, padding: "10px 8px", display: "flex", flexDirection: "column", gap: "3px", overflowY: "auto" } }, items.map((item, i) => /* @__PURE__ */ import_react7.default.createElement(
|
|
1505
848
|
"button",
|
|
1506
849
|
{
|
|
1507
850
|
key: i,
|
|
@@ -1536,7 +879,7 @@ var Sidebar = ({
|
|
|
1536
879
|
}
|
|
1537
880
|
}
|
|
1538
881
|
},
|
|
1539
|
-
/* @__PURE__ */
|
|
882
|
+
/* @__PURE__ */ import_react7.default.createElement(
|
|
1540
883
|
"svg",
|
|
1541
884
|
{
|
|
1542
885
|
width: "16",
|
|
@@ -1549,10 +892,10 @@ var Sidebar = ({
|
|
|
1549
892
|
strokeLinejoin: "round",
|
|
1550
893
|
style: { flexShrink: 0 }
|
|
1551
894
|
},
|
|
1552
|
-
/* @__PURE__ */
|
|
895
|
+
/* @__PURE__ */ import_react7.default.createElement("path", { d: item.icon })
|
|
1553
896
|
),
|
|
1554
|
-
!collapsed && /* @__PURE__ */
|
|
1555
|
-
))), /* @__PURE__ */
|
|
897
|
+
!collapsed && /* @__PURE__ */ import_react7.default.createElement("span", { style: { fontSize: "13px", fontWeight: active === i ? "700" : "500", whiteSpace: "nowrap" } }, item.label)
|
|
898
|
+
))), /* @__PURE__ */ import_react7.default.createElement("div", { style: { padding: "8px", borderTop: "1px solid rgba(255,255,255,0.05)" } }, /* @__PURE__ */ import_react7.default.createElement(
|
|
1556
899
|
"button",
|
|
1557
900
|
{
|
|
1558
901
|
onClick: () => setCollapsed((c) => !c),
|
|
@@ -1572,7 +915,7 @@ var Sidebar = ({
|
|
|
1572
915
|
onMouseEnter: (e) => e.currentTarget.style.color = "rgba(255,255,255,0.7)",
|
|
1573
916
|
onMouseLeave: (e) => e.currentTarget.style.color = "rgba(255,255,255,0.3)"
|
|
1574
917
|
},
|
|
1575
|
-
/* @__PURE__ */
|
|
918
|
+
/* @__PURE__ */ import_react7.default.createElement(
|
|
1576
919
|
"svg",
|
|
1577
920
|
{
|
|
1578
921
|
width: "15",
|
|
@@ -1583,29 +926,29 @@ var Sidebar = ({
|
|
|
1583
926
|
strokeWidth: "2",
|
|
1584
927
|
strokeLinecap: "round"
|
|
1585
928
|
},
|
|
1586
|
-
/* @__PURE__ */
|
|
929
|
+
/* @__PURE__ */ import_react7.default.createElement("path", { d: collapsed ? "M9 18l6-6-6-6" : "M15 18l-6-6 6-6" })
|
|
1587
930
|
)
|
|
1588
|
-
))), /* @__PURE__ */
|
|
931
|
+
))), /* @__PURE__ */ import_react7.default.createElement("div", { style: {
|
|
1589
932
|
flex: 1,
|
|
1590
933
|
background: "rgba(255,255,255,0.02)",
|
|
1591
934
|
overflow: "auto"
|
|
1592
|
-
} }, /* @__PURE__ */
|
|
935
|
+
} }, /* @__PURE__ */ import_react7.default.createElement("div", { style: {
|
|
1593
936
|
height: "56px",
|
|
1594
937
|
display: "flex",
|
|
1595
938
|
alignItems: "center",
|
|
1596
939
|
padding: "0 20px",
|
|
1597
940
|
borderBottom: "1px solid rgba(255,255,255,0.05)",
|
|
1598
941
|
gap: "10px"
|
|
1599
|
-
} }, /* @__PURE__ */
|
|
942
|
+
} }, /* @__PURE__ */ import_react7.default.createElement("div", { style: {
|
|
1600
943
|
width: "6px",
|
|
1601
944
|
height: "6px",
|
|
1602
945
|
borderRadius: "50%",
|
|
1603
946
|
background: accent
|
|
1604
|
-
} }), /* @__PURE__ */
|
|
947
|
+
} }), /* @__PURE__ */ import_react7.default.createElement("span", { style: { fontSize: "14px", fontWeight: "700", color: "#fff" } }, activeItem == null ? void 0 : activeItem.label)), /* @__PURE__ */ import_react7.default.createElement("div", { style: { color: "#fff" } }, activeItem == null ? void 0 : activeItem.component)));
|
|
1605
948
|
};
|
|
1606
949
|
|
|
1607
950
|
// src/components/Charts/Charts.jsx
|
|
1608
|
-
var
|
|
951
|
+
var import_react8 = __toESM(require("react"));
|
|
1609
952
|
var Charts = ({
|
|
1610
953
|
type = "bar",
|
|
1611
954
|
data = [
|
|
@@ -1625,7 +968,7 @@ var Charts = ({
|
|
|
1625
968
|
showGrid = true,
|
|
1626
969
|
showValues = true
|
|
1627
970
|
}) => {
|
|
1628
|
-
const [hovered, setHovered] = (0,
|
|
971
|
+
const [hovered, setHovered] = (0, import_react8.useState)(null);
|
|
1629
972
|
const alpha = (hex, op) => {
|
|
1630
973
|
const r = parseInt(hex.slice(1, 3), 16);
|
|
1631
974
|
const g = parseInt(hex.slice(3, 5), 16);
|
|
@@ -1652,7 +995,7 @@ var Charts = ({
|
|
|
1652
995
|
}));
|
|
1653
996
|
const BarChart = () => {
|
|
1654
997
|
const barW = Math.min(28, chartW / data.length * 0.55);
|
|
1655
|
-
return /* @__PURE__ */
|
|
998
|
+
return /* @__PURE__ */ import_react8.default.createElement("svg", { width: "100%", viewBox: `0 0 ${W} ${H}` }, showGrid && gridLines.map((g, i) => /* @__PURE__ */ import_react8.default.createElement("g", { key: i }, /* @__PURE__ */ import_react8.default.createElement(
|
|
1656
999
|
"line",
|
|
1657
1000
|
{
|
|
1658
1001
|
x1: padL,
|
|
@@ -1662,7 +1005,7 @@ var Charts = ({
|
|
|
1662
1005
|
stroke: "rgba(255,255,255,0.05)",
|
|
1663
1006
|
strokeWidth: "1"
|
|
1664
1007
|
}
|
|
1665
|
-
), /* @__PURE__ */
|
|
1008
|
+
), /* @__PURE__ */ import_react8.default.createElement(
|
|
1666
1009
|
"text",
|
|
1667
1010
|
{
|
|
1668
1011
|
x: padL - 4,
|
|
@@ -1677,7 +1020,7 @@ var Charts = ({
|
|
|
1677
1020
|
const barH = (d.value - min) / (max - min || 1) * chartH;
|
|
1678
1021
|
const y = padT + chartH - barH;
|
|
1679
1022
|
const isH = hovered === i;
|
|
1680
|
-
return /* @__PURE__ */
|
|
1023
|
+
return /* @__PURE__ */ import_react8.default.createElement("g", { key: i, onMouseEnter: () => setHovered(i), onMouseLeave: () => setHovered(null) }, /* @__PURE__ */ import_react8.default.createElement(
|
|
1681
1024
|
"rect",
|
|
1682
1025
|
{
|
|
1683
1026
|
x,
|
|
@@ -1687,7 +1030,7 @@ var Charts = ({
|
|
|
1687
1030
|
fill: "transparent",
|
|
1688
1031
|
rx: "4"
|
|
1689
1032
|
}
|
|
1690
|
-
), /* @__PURE__ */
|
|
1033
|
+
), /* @__PURE__ */ import_react8.default.createElement(
|
|
1691
1034
|
"rect",
|
|
1692
1035
|
{
|
|
1693
1036
|
x,
|
|
@@ -1698,7 +1041,7 @@ var Charts = ({
|
|
|
1698
1041
|
rx: "4",
|
|
1699
1042
|
style: { transition: "fill 0.15s" }
|
|
1700
1043
|
}
|
|
1701
|
-
), showValues && isH && /* @__PURE__ */
|
|
1044
|
+
), showValues && isH && /* @__PURE__ */ import_react8.default.createElement(
|
|
1702
1045
|
"text",
|
|
1703
1046
|
{
|
|
1704
1047
|
x: x + barW / 2,
|
|
@@ -1709,7 +1052,7 @@ var Charts = ({
|
|
|
1709
1052
|
fontWeight: "700"
|
|
1710
1053
|
},
|
|
1711
1054
|
d.value
|
|
1712
|
-
), /* @__PURE__ */
|
|
1055
|
+
), /* @__PURE__ */ import_react8.default.createElement(
|
|
1713
1056
|
"text",
|
|
1714
1057
|
{
|
|
1715
1058
|
x: x + barW / 2,
|
|
@@ -1722,7 +1065,7 @@ var Charts = ({
|
|
|
1722
1065
|
));
|
|
1723
1066
|
}));
|
|
1724
1067
|
};
|
|
1725
|
-
const LineChart = () => /* @__PURE__ */
|
|
1068
|
+
const LineChart = () => /* @__PURE__ */ import_react8.default.createElement("svg", { width: "100%", viewBox: `0 0 ${W} ${H}` }, /* @__PURE__ */ import_react8.default.createElement("defs", null, /* @__PURE__ */ import_react8.default.createElement("linearGradient", { id: "lg", x1: "0", y1: "0", x2: "0", y2: "1" }, /* @__PURE__ */ import_react8.default.createElement("stop", { offset: "0%", stopColor: accent, stopOpacity: "0.3" }), /* @__PURE__ */ import_react8.default.createElement("stop", { offset: "100%", stopColor: accent, stopOpacity: "0" }))), showGrid && gridLines.map((g, i) => /* @__PURE__ */ import_react8.default.createElement("g", { key: i }, /* @__PURE__ */ import_react8.default.createElement(
|
|
1726
1069
|
"line",
|
|
1727
1070
|
{
|
|
1728
1071
|
x1: padL,
|
|
@@ -1732,7 +1075,7 @@ var Charts = ({
|
|
|
1732
1075
|
stroke: "rgba(255,255,255,0.05)",
|
|
1733
1076
|
strokeWidth: "1"
|
|
1734
1077
|
}
|
|
1735
|
-
), /* @__PURE__ */
|
|
1078
|
+
), /* @__PURE__ */ import_react8.default.createElement(
|
|
1736
1079
|
"text",
|
|
1737
1080
|
{
|
|
1738
1081
|
x: padL - 4,
|
|
@@ -1742,7 +1085,7 @@ var Charts = ({
|
|
|
1742
1085
|
fontSize: "9"
|
|
1743
1086
|
},
|
|
1744
1087
|
g.val
|
|
1745
|
-
))), /* @__PURE__ */
|
|
1088
|
+
))), /* @__PURE__ */ import_react8.default.createElement("polygon", { points: areaPoints, fill: "url(#lg)" }), /* @__PURE__ */ import_react8.default.createElement(
|
|
1746
1089
|
"polyline",
|
|
1747
1090
|
{
|
|
1748
1091
|
points,
|
|
@@ -1754,7 +1097,7 @@ var Charts = ({
|
|
|
1754
1097
|
}
|
|
1755
1098
|
), data.map((d, i) => {
|
|
1756
1099
|
const isH = hovered === i;
|
|
1757
|
-
return /* @__PURE__ */
|
|
1100
|
+
return /* @__PURE__ */ import_react8.default.createElement("g", { key: i, onMouseEnter: () => setHovered(i), onMouseLeave: () => setHovered(null) }, /* @__PURE__ */ import_react8.default.createElement("circle", { cx: getX(i), cy: getY(d.value), r: "10", fill: "transparent" }), /* @__PURE__ */ import_react8.default.createElement(
|
|
1758
1101
|
"circle",
|
|
1759
1102
|
{
|
|
1760
1103
|
cx: getX(i),
|
|
@@ -1765,7 +1108,7 @@ var Charts = ({
|
|
|
1765
1108
|
strokeWidth: "2",
|
|
1766
1109
|
style: { transition: "all 0.15s" }
|
|
1767
1110
|
}
|
|
1768
|
-
), showValues && isH && /* @__PURE__ */
|
|
1111
|
+
), showValues && isH && /* @__PURE__ */ import_react8.default.createElement(
|
|
1769
1112
|
"text",
|
|
1770
1113
|
{
|
|
1771
1114
|
x: getX(i),
|
|
@@ -1776,7 +1119,7 @@ var Charts = ({
|
|
|
1776
1119
|
fontWeight: "700"
|
|
1777
1120
|
},
|
|
1778
1121
|
d.value
|
|
1779
|
-
), /* @__PURE__ */
|
|
1122
|
+
), /* @__PURE__ */ import_react8.default.createElement(
|
|
1780
1123
|
"text",
|
|
1781
1124
|
{
|
|
1782
1125
|
x: getX(i),
|
|
@@ -1816,7 +1159,7 @@ var Charts = ({
|
|
|
1816
1159
|
startAngle += angle;
|
|
1817
1160
|
return slice;
|
|
1818
1161
|
});
|
|
1819
|
-
return /* @__PURE__ */
|
|
1162
|
+
return /* @__PURE__ */ import_react8.default.createElement("svg", { width: "100%", viewBox: `0 0 ${W} ${H}` }, slices.map((s) => /* @__PURE__ */ import_react8.default.createElement("g", { key: s.i, onMouseEnter: () => setHovered(s.i), onMouseLeave: () => setHovered(null) }, /* @__PURE__ */ import_react8.default.createElement(
|
|
1820
1163
|
"path",
|
|
1821
1164
|
{
|
|
1822
1165
|
d: s.path,
|
|
@@ -1826,7 +1169,7 @@ var Charts = ({
|
|
|
1826
1169
|
transform: hovered === s.i ? `translate(${Math.cos(s.angle / 2 - Math.PI / 2) * 4}, ${Math.sin(s.angle / 2 - Math.PI / 2) * 4})` : "",
|
|
1827
1170
|
style: { transition: "transform 0.15s", cursor: "pointer" }
|
|
1828
1171
|
}
|
|
1829
|
-
))), hovered !== null && /* @__PURE__ */
|
|
1172
|
+
))), hovered !== null && /* @__PURE__ */ import_react8.default.createElement(import_react8.default.Fragment, null, /* @__PURE__ */ import_react8.default.createElement(
|
|
1830
1173
|
"text",
|
|
1831
1174
|
{
|
|
1832
1175
|
x: cx,
|
|
@@ -1837,7 +1180,7 @@ var Charts = ({
|
|
|
1837
1180
|
fontWeight: "800"
|
|
1838
1181
|
},
|
|
1839
1182
|
(_a = data[hovered]) == null ? void 0 : _a.value
|
|
1840
|
-
), /* @__PURE__ */
|
|
1183
|
+
), /* @__PURE__ */ import_react8.default.createElement(
|
|
1841
1184
|
"text",
|
|
1842
1185
|
{
|
|
1843
1186
|
x: cx,
|
|
@@ -1847,7 +1190,7 @@ var Charts = ({
|
|
|
1847
1190
|
fontSize: "9"
|
|
1848
1191
|
},
|
|
1849
1192
|
(_b = data[hovered]) == null ? void 0 : _b.label
|
|
1850
|
-
)), hovered === null && /* @__PURE__ */
|
|
1193
|
+
)), hovered === null && /* @__PURE__ */ import_react8.default.createElement(
|
|
1851
1194
|
"text",
|
|
1852
1195
|
{
|
|
1853
1196
|
x: cx,
|
|
@@ -1859,7 +1202,7 @@ var Charts = ({
|
|
|
1859
1202
|
"Hover slice"
|
|
1860
1203
|
));
|
|
1861
1204
|
};
|
|
1862
|
-
const AreaChart = () => /* @__PURE__ */
|
|
1205
|
+
const AreaChart = () => /* @__PURE__ */ import_react8.default.createElement("svg", { width: "100%", viewBox: `0 0 ${W} ${H}` }, /* @__PURE__ */ import_react8.default.createElement("defs", null, /* @__PURE__ */ import_react8.default.createElement("linearGradient", { id: "ag", x1: "0", y1: "0", x2: "0", y2: "1" }, /* @__PURE__ */ import_react8.default.createElement("stop", { offset: "0%", stopColor: accent, stopOpacity: "0.5" }), /* @__PURE__ */ import_react8.default.createElement("stop", { offset: "100%", stopColor: accent, stopOpacity: "0.02" }))), showGrid && gridLines.map((g, i) => /* @__PURE__ */ import_react8.default.createElement("g", { key: i }, /* @__PURE__ */ import_react8.default.createElement(
|
|
1863
1206
|
"line",
|
|
1864
1207
|
{
|
|
1865
1208
|
x1: padL,
|
|
@@ -1869,7 +1212,7 @@ var Charts = ({
|
|
|
1869
1212
|
stroke: "rgba(255,255,255,0.05)",
|
|
1870
1213
|
strokeWidth: "1"
|
|
1871
1214
|
}
|
|
1872
|
-
), /* @__PURE__ */
|
|
1215
|
+
), /* @__PURE__ */ import_react8.default.createElement(
|
|
1873
1216
|
"text",
|
|
1874
1217
|
{
|
|
1875
1218
|
x: padL - 4,
|
|
@@ -1879,7 +1222,7 @@ var Charts = ({
|
|
|
1879
1222
|
fontSize: "9"
|
|
1880
1223
|
},
|
|
1881
1224
|
g.val
|
|
1882
|
-
))), /* @__PURE__ */
|
|
1225
|
+
))), /* @__PURE__ */ import_react8.default.createElement("polygon", { points: areaPoints, fill: "url(#ag)" }), /* @__PURE__ */ import_react8.default.createElement(
|
|
1883
1226
|
"polyline",
|
|
1884
1227
|
{
|
|
1885
1228
|
points,
|
|
@@ -1889,7 +1232,7 @@ var Charts = ({
|
|
|
1889
1232
|
strokeLinejoin: "round",
|
|
1890
1233
|
strokeLinecap: "round"
|
|
1891
1234
|
}
|
|
1892
|
-
), data.map((d, i) => /* @__PURE__ */
|
|
1235
|
+
), data.map((d, i) => /* @__PURE__ */ import_react8.default.createElement("g", { key: i, onMouseEnter: () => setHovered(i), onMouseLeave: () => setHovered(null) }, /* @__PURE__ */ import_react8.default.createElement("rect", { x: getX(i) - 12, y: padT, width: 24, height: chartH, fill: "transparent" }), hovered === i && /* @__PURE__ */ import_react8.default.createElement(import_react8.default.Fragment, null, /* @__PURE__ */ import_react8.default.createElement(
|
|
1893
1236
|
"line",
|
|
1894
1237
|
{
|
|
1895
1238
|
x1: getX(i),
|
|
@@ -1900,7 +1243,7 @@ var Charts = ({
|
|
|
1900
1243
|
strokeWidth: "1",
|
|
1901
1244
|
strokeDasharray: "3 3"
|
|
1902
1245
|
}
|
|
1903
|
-
), showValues && /* @__PURE__ */
|
|
1246
|
+
), showValues && /* @__PURE__ */ import_react8.default.createElement(
|
|
1904
1247
|
"text",
|
|
1905
1248
|
{
|
|
1906
1249
|
x: getX(i),
|
|
@@ -1911,7 +1254,7 @@ var Charts = ({
|
|
|
1911
1254
|
fontWeight: "700"
|
|
1912
1255
|
},
|
|
1913
1256
|
d.value
|
|
1914
|
-
)), /* @__PURE__ */
|
|
1257
|
+
)), /* @__PURE__ */ import_react8.default.createElement(
|
|
1915
1258
|
"text",
|
|
1916
1259
|
{
|
|
1917
1260
|
x: getX(i),
|
|
@@ -1923,12 +1266,12 @@ var Charts = ({
|
|
|
1923
1266
|
d.label
|
|
1924
1267
|
))));
|
|
1925
1268
|
const renderChart = () => {
|
|
1926
|
-
if (type === "line") return /* @__PURE__ */
|
|
1927
|
-
if (type === "pie") return /* @__PURE__ */
|
|
1928
|
-
if (type === "area") return /* @__PURE__ */
|
|
1929
|
-
return /* @__PURE__ */
|
|
1269
|
+
if (type === "line") return /* @__PURE__ */ import_react8.default.createElement(LineChart, null);
|
|
1270
|
+
if (type === "pie") return /* @__PURE__ */ import_react8.default.createElement(PieChart, null);
|
|
1271
|
+
if (type === "area") return /* @__PURE__ */ import_react8.default.createElement(AreaChart, null);
|
|
1272
|
+
return /* @__PURE__ */ import_react8.default.createElement(BarChart, null);
|
|
1930
1273
|
};
|
|
1931
|
-
return /* @__PURE__ */
|
|
1274
|
+
return /* @__PURE__ */ import_react8.default.createElement("div", { style: {
|
|
1932
1275
|
background: bg,
|
|
1933
1276
|
borderRadius: radius,
|
|
1934
1277
|
padding: "20px",
|
|
@@ -1937,7 +1280,7 @@ var Charts = ({
|
|
|
1937
1280
|
width: "100%",
|
|
1938
1281
|
maxWidth: "360px",
|
|
1939
1282
|
boxSizing: "border-box"
|
|
1940
|
-
} }, /* @__PURE__ */
|
|
1283
|
+
} }, /* @__PURE__ */ import_react8.default.createElement("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", marginBottom: "16px" } }, /* @__PURE__ */ import_react8.default.createElement("p", { style: { fontSize: "14px", fontWeight: "700", color: "#fff", margin: 0 } }, title), /* @__PURE__ */ import_react8.default.createElement("span", { style: {
|
|
1941
1284
|
fontSize: "10px",
|
|
1942
1285
|
fontWeight: "700",
|
|
1943
1286
|
padding: "3px 9px",
|
|
@@ -1950,7 +1293,7 @@ var Charts = ({
|
|
|
1950
1293
|
};
|
|
1951
1294
|
|
|
1952
1295
|
// src/components/ImageCard/ImageCard.jsx
|
|
1953
|
-
var
|
|
1296
|
+
var import_react9 = __toESM(require("react"));
|
|
1954
1297
|
var ImageCard = ({
|
|
1955
1298
|
image = "https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=600&q=80",
|
|
1956
1299
|
tag = "Travel",
|
|
@@ -1963,14 +1306,14 @@ var ImageCard = ({
|
|
|
1963
1306
|
onButtonClick = () => {
|
|
1964
1307
|
}
|
|
1965
1308
|
}) => {
|
|
1966
|
-
const [hovered, setHovered] = (0,
|
|
1309
|
+
const [hovered, setHovered] = (0, import_react9.useState)(false);
|
|
1967
1310
|
const alpha = (hex, op) => {
|
|
1968
1311
|
const r = parseInt(hex.slice(1, 3), 16);
|
|
1969
1312
|
const g = parseInt(hex.slice(3, 5), 16);
|
|
1970
1313
|
const b = parseInt(hex.slice(5, 7), 16);
|
|
1971
1314
|
return `rgba(${r},${g},${b},${op})`;
|
|
1972
1315
|
};
|
|
1973
|
-
return /* @__PURE__ */
|
|
1316
|
+
return /* @__PURE__ */ import_react9.default.createElement(
|
|
1974
1317
|
"div",
|
|
1975
1318
|
{
|
|
1976
1319
|
onMouseEnter: () => setHovered(true),
|
|
@@ -1987,7 +1330,7 @@ var ImageCard = ({
|
|
|
1987
1330
|
boxShadow: hovered ? `0 16px 40px rgba(0,0,0,0.5)` : "0 4px 20px rgba(0,0,0,0.3)"
|
|
1988
1331
|
}
|
|
1989
1332
|
},
|
|
1990
|
-
/* @__PURE__ */
|
|
1333
|
+
/* @__PURE__ */ import_react9.default.createElement("div", { style: { position: "relative", width: "100%", height: "180px", overflow: "hidden" } }, /* @__PURE__ */ import_react9.default.createElement(
|
|
1991
1334
|
"img",
|
|
1992
1335
|
{
|
|
1993
1336
|
src: image,
|
|
@@ -2000,11 +1343,11 @@ var ImageCard = ({
|
|
|
2000
1343
|
transition: "transform 0.4s ease"
|
|
2001
1344
|
}
|
|
2002
1345
|
}
|
|
2003
|
-
), /* @__PURE__ */
|
|
1346
|
+
), /* @__PURE__ */ import_react9.default.createElement("div", { style: {
|
|
2004
1347
|
position: "absolute",
|
|
2005
1348
|
inset: 0,
|
|
2006
1349
|
background: "linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 60%)"
|
|
2007
|
-
} }), tag && /* @__PURE__ */
|
|
1350
|
+
} }), tag && /* @__PURE__ */ import_react9.default.createElement("div", { style: {
|
|
2008
1351
|
position: "absolute",
|
|
2009
1352
|
top: "12px",
|
|
2010
1353
|
left: "12px",
|
|
@@ -2017,18 +1360,18 @@ var ImageCard = ({
|
|
|
2017
1360
|
letterSpacing: "0.5px",
|
|
2018
1361
|
textTransform: "uppercase"
|
|
2019
1362
|
} }, tag)),
|
|
2020
|
-
/* @__PURE__ */
|
|
1363
|
+
/* @__PURE__ */ import_react9.default.createElement("div", { style: { padding: "18px" } }, /* @__PURE__ */ import_react9.default.createElement("h3", { style: {
|
|
2021
1364
|
fontSize: "15px",
|
|
2022
1365
|
fontWeight: "700",
|
|
2023
1366
|
color: "#fff",
|
|
2024
1367
|
margin: "0 0 8px",
|
|
2025
1368
|
lineHeight: 1.4
|
|
2026
|
-
} }, title), /* @__PURE__ */
|
|
1369
|
+
} }, title), /* @__PURE__ */ import_react9.default.createElement("p", { style: {
|
|
2027
1370
|
fontSize: "13px",
|
|
2028
1371
|
color: "rgba(255,255,255,0.45)",
|
|
2029
1372
|
lineHeight: 1.65,
|
|
2030
1373
|
margin: "0 0 18px"
|
|
2031
|
-
} }, description), /* @__PURE__ */
|
|
1374
|
+
} }, description), /* @__PURE__ */ import_react9.default.createElement(
|
|
2032
1375
|
"button",
|
|
2033
1376
|
{
|
|
2034
1377
|
onClick: onButtonClick,
|
|
@@ -2054,7 +1397,7 @@ var ImageCard = ({
|
|
|
2054
1397
|
};
|
|
2055
1398
|
|
|
2056
1399
|
// src/components/ImageSlider/ImageSlider.jsx
|
|
2057
|
-
var
|
|
1400
|
+
var import_react10 = __toESM(require("react"));
|
|
2058
1401
|
var ImageSlider = ({
|
|
2059
1402
|
images = [
|
|
2060
1403
|
{
|
|
@@ -2085,8 +1428,8 @@ var ImageSlider = ({
|
|
|
2085
1428
|
showCaption = true,
|
|
2086
1429
|
autoPlay = false
|
|
2087
1430
|
}) => {
|
|
2088
|
-
const [current, setCurrent] = (0,
|
|
2089
|
-
const [dir, setDir] = (0,
|
|
1431
|
+
const [current, setCurrent] = (0, import_react10.useState)(0);
|
|
1432
|
+
const [dir, setDir] = (0, import_react10.useState)(null);
|
|
2090
1433
|
const alpha = (hex, op) => {
|
|
2091
1434
|
const r = parseInt(hex.slice(1, 3), 16);
|
|
2092
1435
|
const g = parseInt(hex.slice(3, 5), 16);
|
|
@@ -2106,7 +1449,7 @@ var ImageSlider = ({
|
|
|
2106
1449
|
setCurrent(i);
|
|
2107
1450
|
};
|
|
2108
1451
|
const img = images[current];
|
|
2109
|
-
return /* @__PURE__ */
|
|
1452
|
+
return /* @__PURE__ */ import_react10.default.createElement("div", { style: {
|
|
2110
1453
|
background: bg,
|
|
2111
1454
|
borderRadius: radius,
|
|
2112
1455
|
overflow: "hidden",
|
|
@@ -2114,7 +1457,7 @@ var ImageSlider = ({
|
|
|
2114
1457
|
border: "1px solid rgba(255,255,255,0.07)",
|
|
2115
1458
|
fontFamily: "system-ui, sans-serif",
|
|
2116
1459
|
boxShadow: "0 10px 40px rgba(0,0,0,0.4)"
|
|
2117
|
-
} }, /* @__PURE__ */
|
|
1460
|
+
} }, /* @__PURE__ */ import_react10.default.createElement("div", { style: { position: "relative", width: "100%", height: "200px", overflow: "hidden", background: "#000" } }, /* @__PURE__ */ import_react10.default.createElement(
|
|
2118
1461
|
"img",
|
|
2119
1462
|
{
|
|
2120
1463
|
key: current,
|
|
@@ -2127,11 +1470,11 @@ var ImageSlider = ({
|
|
|
2127
1470
|
animation: `sliderFade 0.35s ease`
|
|
2128
1471
|
}
|
|
2129
1472
|
}
|
|
2130
|
-
), /* @__PURE__ */
|
|
1473
|
+
), /* @__PURE__ */ import_react10.default.createElement("style", null, `@keyframes sliderFade { from { opacity: 0; transform: scale(1.03); } to { opacity: 1; transform: scale(1); } }`), /* @__PURE__ */ import_react10.default.createElement("div", { style: {
|
|
2131
1474
|
position: "absolute",
|
|
2132
1475
|
inset: 0,
|
|
2133
1476
|
background: "linear-gradient(to top, rgba(0,0,0,0.65) 0%, transparent 55%)"
|
|
2134
|
-
} }), img.tag && /* @__PURE__ */
|
|
1477
|
+
} }), img.tag && /* @__PURE__ */ import_react10.default.createElement("div", { style: {
|
|
2135
1478
|
position: "absolute",
|
|
2136
1479
|
top: "12px",
|
|
2137
1480
|
left: "12px",
|
|
@@ -2143,7 +1486,7 @@ var ImageSlider = ({
|
|
|
2143
1486
|
color: "#fff",
|
|
2144
1487
|
letterSpacing: "0.5px",
|
|
2145
1488
|
textTransform: "uppercase"
|
|
2146
|
-
} }, img.tag), /* @__PURE__ */
|
|
1489
|
+
} }, img.tag), /* @__PURE__ */ import_react10.default.createElement("div", { style: {
|
|
2147
1490
|
position: "absolute",
|
|
2148
1491
|
top: "12px",
|
|
2149
1492
|
right: "12px",
|
|
@@ -2153,7 +1496,7 @@ var ImageSlider = ({
|
|
|
2153
1496
|
fontSize: "10px",
|
|
2154
1497
|
fontWeight: "600",
|
|
2155
1498
|
color: "rgba(255,255,255,0.7)"
|
|
2156
|
-
} }, current + 1, " / ", images.length), /* @__PURE__ */
|
|
1499
|
+
} }, current + 1, " / ", images.length), /* @__PURE__ */ import_react10.default.createElement(
|
|
2157
1500
|
"button",
|
|
2158
1501
|
{
|
|
2159
1502
|
onClick: prev,
|
|
@@ -2178,7 +1521,7 @@ var ImageSlider = ({
|
|
|
2178
1521
|
onMouseEnter: (e) => e.currentTarget.style.background = alpha(accent, 0.8),
|
|
2179
1522
|
onMouseLeave: (e) => e.currentTarget.style.background = "rgba(0,0,0,0.5)"
|
|
2180
1523
|
},
|
|
2181
|
-
/* @__PURE__ */
|
|
1524
|
+
/* @__PURE__ */ import_react10.default.createElement(
|
|
2182
1525
|
"svg",
|
|
2183
1526
|
{
|
|
2184
1527
|
width: "14",
|
|
@@ -2189,9 +1532,9 @@ var ImageSlider = ({
|
|
|
2189
1532
|
strokeWidth: "2.5",
|
|
2190
1533
|
strokeLinecap: "round"
|
|
2191
1534
|
},
|
|
2192
|
-
/* @__PURE__ */
|
|
1535
|
+
/* @__PURE__ */ import_react10.default.createElement("polyline", { points: "15 18 9 12 15 6" })
|
|
2193
1536
|
)
|
|
2194
|
-
), /* @__PURE__ */
|
|
1537
|
+
), /* @__PURE__ */ import_react10.default.createElement(
|
|
2195
1538
|
"button",
|
|
2196
1539
|
{
|
|
2197
1540
|
onClick: next,
|
|
@@ -2216,7 +1559,7 @@ var ImageSlider = ({
|
|
|
2216
1559
|
onMouseEnter: (e) => e.currentTarget.style.background = alpha(accent, 0.8),
|
|
2217
1560
|
onMouseLeave: (e) => e.currentTarget.style.background = "rgba(0,0,0,0.5)"
|
|
2218
1561
|
},
|
|
2219
|
-
/* @__PURE__ */
|
|
1562
|
+
/* @__PURE__ */ import_react10.default.createElement(
|
|
2220
1563
|
"svg",
|
|
2221
1564
|
{
|
|
2222
1565
|
width: "14",
|
|
@@ -2227,9 +1570,9 @@ var ImageSlider = ({
|
|
|
2227
1570
|
strokeWidth: "2.5",
|
|
2228
1571
|
strokeLinecap: "round"
|
|
2229
1572
|
},
|
|
2230
|
-
/* @__PURE__ */
|
|
1573
|
+
/* @__PURE__ */ import_react10.default.createElement("polyline", { points: "9 18 15 12 9 6" })
|
|
2231
1574
|
)
|
|
2232
|
-
)), showCaption && /* @__PURE__ */
|
|
1575
|
+
)), showCaption && /* @__PURE__ */ import_react10.default.createElement("div", { style: { padding: "14px 16px 4px" } }, /* @__PURE__ */ import_react10.default.createElement(
|
|
2233
1576
|
"p",
|
|
2234
1577
|
{
|
|
2235
1578
|
style: {
|
|
@@ -2243,12 +1586,12 @@ var ImageSlider = ({
|
|
|
2243
1586
|
key: current + "-title"
|
|
2244
1587
|
},
|
|
2245
1588
|
img.title
|
|
2246
|
-
)), showDots && /* @__PURE__ */
|
|
1589
|
+
)), showDots && /* @__PURE__ */ import_react10.default.createElement("div", { style: {
|
|
2247
1590
|
display: "flex",
|
|
2248
1591
|
justifyContent: "center",
|
|
2249
1592
|
gap: "6px",
|
|
2250
1593
|
padding: "12px 16px 16px"
|
|
2251
|
-
} }, images.map((_, i) => /* @__PURE__ */
|
|
1594
|
+
} }, images.map((_, i) => /* @__PURE__ */ import_react10.default.createElement(
|
|
2252
1595
|
"button",
|
|
2253
1596
|
{
|
|
2254
1597
|
key: i,
|
|
@@ -2268,7 +1611,7 @@ var ImageSlider = ({
|
|
|
2268
1611
|
};
|
|
2269
1612
|
|
|
2270
1613
|
// src/components/BackgoundImageSlider/BackgoundImageSlider.jsx
|
|
2271
|
-
var
|
|
1614
|
+
var import_react11 = __toESM(require("react"));
|
|
2272
1615
|
var BackgoundImageSlider = ({
|
|
2273
1616
|
images = [
|
|
2274
1617
|
{
|
|
@@ -2304,15 +1647,15 @@ var BackgoundImageSlider = ({
|
|
|
2304
1647
|
autoPlay = false,
|
|
2305
1648
|
autoPlayInterval = 4e3
|
|
2306
1649
|
}) => {
|
|
2307
|
-
const [current, setCurrent] = (0,
|
|
2308
|
-
const [animating, setAnimating] = (0,
|
|
1650
|
+
const [current, setCurrent] = (0, import_react11.useState)(0);
|
|
1651
|
+
const [animating, setAnimating] = (0, import_react11.useState)(false);
|
|
2309
1652
|
const alpha = (hex, op) => {
|
|
2310
1653
|
const r = parseInt(hex.slice(1, 3), 16);
|
|
2311
1654
|
const g = parseInt(hex.slice(3, 5), 16);
|
|
2312
1655
|
const b = parseInt(hex.slice(5, 7), 16);
|
|
2313
1656
|
return `rgba(${r},${g},${b},${op})`;
|
|
2314
1657
|
};
|
|
2315
|
-
const go = (0,
|
|
1658
|
+
const go = (0, import_react11.useCallback)((index) => {
|
|
2316
1659
|
if (animating) return;
|
|
2317
1660
|
setAnimating(true);
|
|
2318
1661
|
setCurrent((index + images.length) % images.length);
|
|
@@ -2320,17 +1663,17 @@ var BackgoundImageSlider = ({
|
|
|
2320
1663
|
}, [animating, images.length]);
|
|
2321
1664
|
const prev = () => go(current - 1);
|
|
2322
1665
|
const next = () => go(current + 1);
|
|
2323
|
-
(0,
|
|
1666
|
+
(0, import_react11.useEffect)(() => {
|
|
2324
1667
|
if (!autoPlay) return;
|
|
2325
1668
|
const t = setInterval(() => go(current + 1), autoPlayInterval);
|
|
2326
1669
|
return () => clearInterval(t);
|
|
2327
1670
|
}, [autoPlay, autoPlayInterval, current, go]);
|
|
2328
1671
|
const img = images[current];
|
|
2329
|
-
return /* @__PURE__ */
|
|
1672
|
+
return /* @__PURE__ */ import_react11.default.createElement(import_react11.default.Fragment, null, /* @__PURE__ */ import_react11.default.createElement("style", null, `
|
|
2330
1673
|
@keyframes hs-fade { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: scale(1); } }
|
|
2331
1674
|
@keyframes hs-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
|
|
2332
1675
|
.hs-prev:hover, .hs-next:hover { background: rgba(0,0,0,0.65) !important; border-color: rgba(255,255,255,0.35) !important; }
|
|
2333
|
-
`), /* @__PURE__ */
|
|
1676
|
+
`), /* @__PURE__ */ import_react11.default.createElement("div", { style: {
|
|
2334
1677
|
position: "relative",
|
|
2335
1678
|
width,
|
|
2336
1679
|
height,
|
|
@@ -2338,7 +1681,7 @@ var BackgoundImageSlider = ({
|
|
|
2338
1681
|
overflow: "hidden",
|
|
2339
1682
|
fontFamily: "system-ui, -apple-system, sans-serif",
|
|
2340
1683
|
userSelect: "none"
|
|
2341
|
-
} }, /* @__PURE__ */
|
|
1684
|
+
} }, /* @__PURE__ */ import_react11.default.createElement(
|
|
2342
1685
|
"img",
|
|
2343
1686
|
{
|
|
2344
1687
|
key: current,
|
|
@@ -2353,11 +1696,11 @@ var BackgoundImageSlider = ({
|
|
|
2353
1696
|
animation: "hs-fade 0.4s ease"
|
|
2354
1697
|
}
|
|
2355
1698
|
}
|
|
2356
|
-
), /* @__PURE__ */
|
|
1699
|
+
), /* @__PURE__ */ import_react11.default.createElement("div", { style: {
|
|
2357
1700
|
position: "absolute",
|
|
2358
1701
|
inset: 0,
|
|
2359
1702
|
background: "linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.1) 100%)"
|
|
2360
|
-
} }), img.tag && /* @__PURE__ */
|
|
1703
|
+
} }), img.tag && /* @__PURE__ */ import_react11.default.createElement(
|
|
2361
1704
|
"div",
|
|
2362
1705
|
{
|
|
2363
1706
|
key: current + "-tag",
|
|
@@ -2377,7 +1720,7 @@ var BackgoundImageSlider = ({
|
|
|
2377
1720
|
}
|
|
2378
1721
|
},
|
|
2379
1722
|
img.tag
|
|
2380
|
-
), /* @__PURE__ */
|
|
1723
|
+
), /* @__PURE__ */ import_react11.default.createElement("div", { style: {
|
|
2381
1724
|
position: "absolute",
|
|
2382
1725
|
top: "24px",
|
|
2383
1726
|
right: "28px",
|
|
@@ -2387,7 +1730,7 @@ var BackgoundImageSlider = ({
|
|
|
2387
1730
|
fontSize: "11px",
|
|
2388
1731
|
fontWeight: "600",
|
|
2389
1732
|
color: "rgba(255,255,255,0.7)"
|
|
2390
|
-
} }, current + 1, " / ", images.length), /* @__PURE__ */
|
|
1733
|
+
} }, current + 1, " / ", images.length), /* @__PURE__ */ import_react11.default.createElement(
|
|
2391
1734
|
"button",
|
|
2392
1735
|
{
|
|
2393
1736
|
className: "hs-prev",
|
|
@@ -2412,7 +1755,7 @@ var BackgoundImageSlider = ({
|
|
|
2412
1755
|
zIndex: 10
|
|
2413
1756
|
}
|
|
2414
1757
|
},
|
|
2415
|
-
/* @__PURE__ */
|
|
1758
|
+
/* @__PURE__ */ import_react11.default.createElement(
|
|
2416
1759
|
"svg",
|
|
2417
1760
|
{
|
|
2418
1761
|
width: "18",
|
|
@@ -2424,9 +1767,9 @@ var BackgoundImageSlider = ({
|
|
|
2424
1767
|
strokeLinecap: "round",
|
|
2425
1768
|
strokeLinejoin: "round"
|
|
2426
1769
|
},
|
|
2427
|
-
/* @__PURE__ */
|
|
1770
|
+
/* @__PURE__ */ import_react11.default.createElement("polyline", { points: "15 18 9 12 15 6" })
|
|
2428
1771
|
)
|
|
2429
|
-
), /* @__PURE__ */
|
|
1772
|
+
), /* @__PURE__ */ import_react11.default.createElement(
|
|
2430
1773
|
"button",
|
|
2431
1774
|
{
|
|
2432
1775
|
className: "hs-next",
|
|
@@ -2451,7 +1794,7 @@ var BackgoundImageSlider = ({
|
|
|
2451
1794
|
zIndex: 10
|
|
2452
1795
|
}
|
|
2453
1796
|
},
|
|
2454
|
-
/* @__PURE__ */
|
|
1797
|
+
/* @__PURE__ */ import_react11.default.createElement(
|
|
2455
1798
|
"svg",
|
|
2456
1799
|
{
|
|
2457
1800
|
width: "18",
|
|
@@ -2463,15 +1806,15 @@ var BackgoundImageSlider = ({
|
|
|
2463
1806
|
strokeLinecap: "round",
|
|
2464
1807
|
strokeLinejoin: "round"
|
|
2465
1808
|
},
|
|
2466
|
-
/* @__PURE__ */
|
|
1809
|
+
/* @__PURE__ */ import_react11.default.createElement("polyline", { points: "9 18 15 12 9 6" })
|
|
2467
1810
|
)
|
|
2468
|
-
), /* @__PURE__ */
|
|
1811
|
+
), /* @__PURE__ */ import_react11.default.createElement("div", { style: {
|
|
2469
1812
|
position: "absolute",
|
|
2470
1813
|
bottom: showDots ? "56px" : "28px",
|
|
2471
1814
|
left: "28px",
|
|
2472
1815
|
right: "28px",
|
|
2473
1816
|
zIndex: 5
|
|
2474
|
-
} }, /* @__PURE__ */
|
|
1817
|
+
} }, /* @__PURE__ */ import_react11.default.createElement(
|
|
2475
1818
|
"h2",
|
|
2476
1819
|
{
|
|
2477
1820
|
key: current + "-title",
|
|
@@ -2487,7 +1830,7 @@ var BackgoundImageSlider = ({
|
|
|
2487
1830
|
}
|
|
2488
1831
|
},
|
|
2489
1832
|
img.title
|
|
2490
|
-
), /* @__PURE__ */
|
|
1833
|
+
), /* @__PURE__ */ import_react11.default.createElement(
|
|
2491
1834
|
"p",
|
|
2492
1835
|
{
|
|
2493
1836
|
key: current + "-desc",
|
|
@@ -2502,7 +1845,7 @@ var BackgoundImageSlider = ({
|
|
|
2502
1845
|
}
|
|
2503
1846
|
},
|
|
2504
1847
|
img.description
|
|
2505
|
-
)), showDots && /* @__PURE__ */
|
|
1848
|
+
)), showDots && /* @__PURE__ */ import_react11.default.createElement("div", { style: {
|
|
2506
1849
|
position: "absolute",
|
|
2507
1850
|
bottom: "20px",
|
|
2508
1851
|
left: 0,
|
|
@@ -2511,7 +1854,7 @@ var BackgoundImageSlider = ({
|
|
|
2511
1854
|
justifyContent: "center",
|
|
2512
1855
|
gap: "6px",
|
|
2513
1856
|
zIndex: 5
|
|
2514
|
-
} }, images.map((_, i) => /* @__PURE__ */
|
|
1857
|
+
} }, images.map((_, i) => /* @__PURE__ */ import_react11.default.createElement(
|
|
2515
1858
|
"button",
|
|
2516
1859
|
{
|
|
2517
1860
|
key: i,
|
|
@@ -2529,32 +1872,419 @@ var BackgoundImageSlider = ({
|
|
|
2529
1872
|
}
|
|
2530
1873
|
)))));
|
|
2531
1874
|
};
|
|
1875
|
+
|
|
1876
|
+
// src/components/PageLoader/PageLoader.jsx
|
|
1877
|
+
var import_react12 = __toESM(require("react"));
|
|
1878
|
+
var PageLoader = ({
|
|
1879
|
+
logo = "VirtualAI",
|
|
1880
|
+
accent = "#6366f1",
|
|
1881
|
+
bg = "",
|
|
1882
|
+
type = "spinner",
|
|
1883
|
+
loadingText = "Loading...",
|
|
1884
|
+
subText = "",
|
|
1885
|
+
duration = 6e3,
|
|
1886
|
+
onComplete = () => {
|
|
1887
|
+
}
|
|
1888
|
+
}) => {
|
|
1889
|
+
const [progress, setProgress] = (0, import_react12.useState)(0);
|
|
1890
|
+
const [done, setDone] = (0, import_react12.useState)(false);
|
|
1891
|
+
const alpha = (hex, op) => {
|
|
1892
|
+
const r = parseInt(hex.slice(1, 3), 16);
|
|
1893
|
+
const g = parseInt(hex.slice(3, 5), 16);
|
|
1894
|
+
const b = parseInt(hex.slice(5, 7), 16);
|
|
1895
|
+
return `rgba(${r},${g},${b},${op})`;
|
|
1896
|
+
};
|
|
1897
|
+
(0, import_react12.useEffect)(() => {
|
|
1898
|
+
const steps = 100;
|
|
1899
|
+
const interval = duration / steps;
|
|
1900
|
+
let current = 0;
|
|
1901
|
+
const timer = setInterval(() => {
|
|
1902
|
+
current += 1;
|
|
1903
|
+
setProgress(current);
|
|
1904
|
+
if (current >= 100) {
|
|
1905
|
+
clearInterval(timer);
|
|
1906
|
+
setTimeout(() => {
|
|
1907
|
+
setDone(true);
|
|
1908
|
+
onComplete();
|
|
1909
|
+
}, 300);
|
|
1910
|
+
}
|
|
1911
|
+
}, interval);
|
|
1912
|
+
return () => clearInterval(timer);
|
|
1913
|
+
}, [duration]);
|
|
1914
|
+
if (done) return null;
|
|
1915
|
+
return /* @__PURE__ */ import_react12.default.createElement(import_react12.default.Fragment, null, /* @__PURE__ */ import_react12.default.createElement("style", null, `
|
|
1916
|
+
@keyframes pl-spin { to { transform: rotate(360deg); } }
|
|
1917
|
+
@keyframes pl-pulse { 0%,100%{transform:scale(1);opacity:1} 50%{transform:scale(1.15);opacity:0.7} }
|
|
1918
|
+
@keyframes pl-dot { 0%,80%,100%{transform:scale(0.6);opacity:0.3} 40%{transform:scale(1);opacity:1} }
|
|
1919
|
+
@keyframes pl-fade { from{opacity:0;transform:translateY(10px)} to{opacity:1;transform:translateY(0)} }
|
|
1920
|
+
@keyframes pl-bar { 0%{background-position:0% 50%} 100%{background-position:200% 50%} }
|
|
1921
|
+
`), /* @__PURE__ */ import_react12.default.createElement("div", { style: {
|
|
1922
|
+
width: "100%",
|
|
1923
|
+
height: "100%",
|
|
1924
|
+
background: bg,
|
|
1925
|
+
display: "flex",
|
|
1926
|
+
flexDirection: "column",
|
|
1927
|
+
alignItems: "center",
|
|
1928
|
+
justifyContent: "center",
|
|
1929
|
+
gap: "28px",
|
|
1930
|
+
fontFamily: "system-ui, -apple-system, sans-serif",
|
|
1931
|
+
animation: "pl-fade 0.3s ease"
|
|
1932
|
+
} }, /* @__PURE__ */ import_react12.default.createElement("div", { style: {
|
|
1933
|
+
position: "absolute",
|
|
1934
|
+
top: "-100px",
|
|
1935
|
+
left: "-100px",
|
|
1936
|
+
width: "400px",
|
|
1937
|
+
height: "400px",
|
|
1938
|
+
borderRadius: "50%",
|
|
1939
|
+
background: `radial-gradient(circle, ${alpha(accent, 0.12)}, transparent 70%)`,
|
|
1940
|
+
filter: "blur(60px)",
|
|
1941
|
+
pointerEvents: "none"
|
|
1942
|
+
} }), /* @__PURE__ */ import_react12.default.createElement("div", { style: {
|
|
1943
|
+
position: "absolute",
|
|
1944
|
+
bottom: "-100px",
|
|
1945
|
+
right: "-100px",
|
|
1946
|
+
width: "350px",
|
|
1947
|
+
height: "350px",
|
|
1948
|
+
borderRadius: "50%",
|
|
1949
|
+
background: `radial-gradient(circle, ${alpha(accent, 0.08)}, transparent 70%)`,
|
|
1950
|
+
filter: "blur(60px)",
|
|
1951
|
+
pointerEvents: "none"
|
|
1952
|
+
} }), /* @__PURE__ */ import_react12.default.createElement("div", { style: { display: "flex", alignItems: "center", gap: "10px", animation: "pl-fade 0.4s ease" } }, /* @__PURE__ */ import_react12.default.createElement("div", { style: {
|
|
1953
|
+
width: "36px",
|
|
1954
|
+
height: "36px",
|
|
1955
|
+
borderRadius: "10px",
|
|
1956
|
+
background: `linear-gradient(135deg, ${accent}, ${alpha(accent, 0.6)})`,
|
|
1957
|
+
display: "flex",
|
|
1958
|
+
alignItems: "center",
|
|
1959
|
+
justifyContent: "center",
|
|
1960
|
+
fontSize: "16px",
|
|
1961
|
+
fontWeight: "800",
|
|
1962
|
+
color: "#fff",
|
|
1963
|
+
animation: type === "pulse" ? `pl-pulse 1.5s ease infinite` : "none"
|
|
1964
|
+
} }, logo[0]), /* @__PURE__ */ import_react12.default.createElement("span", { style: { fontSize: "20px", fontWeight: "800", color: "#fff", letterSpacing: "-0.5px" } }, logo)), type === "spinner" && /* @__PURE__ */ import_react12.default.createElement("div", { style: { position: "relative", width: "56px", height: "56px" } }, /* @__PURE__ */ import_react12.default.createElement("svg", { width: "56", height: "56", viewBox: "0 0 56 56" }, /* @__PURE__ */ import_react12.default.createElement(
|
|
1965
|
+
"circle",
|
|
1966
|
+
{
|
|
1967
|
+
cx: "28",
|
|
1968
|
+
cy: "28",
|
|
1969
|
+
r: "22",
|
|
1970
|
+
fill: "none",
|
|
1971
|
+
stroke: alpha(accent, 0.12),
|
|
1972
|
+
strokeWidth: "4"
|
|
1973
|
+
}
|
|
1974
|
+
), /* @__PURE__ */ import_react12.default.createElement(
|
|
1975
|
+
"circle",
|
|
1976
|
+
{
|
|
1977
|
+
cx: "28",
|
|
1978
|
+
cy: "28",
|
|
1979
|
+
r: "22",
|
|
1980
|
+
fill: "none",
|
|
1981
|
+
stroke: accent,
|
|
1982
|
+
strokeWidth: "4",
|
|
1983
|
+
strokeLinecap: "round",
|
|
1984
|
+
strokeDasharray: "34.8 104.4",
|
|
1985
|
+
style: { transformOrigin: "center", animation: "pl-spin 0.9s linear infinite" }
|
|
1986
|
+
}
|
|
1987
|
+
)), /* @__PURE__ */ import_react12.default.createElement("span", { style: {
|
|
1988
|
+
position: "absolute",
|
|
1989
|
+
inset: 0,
|
|
1990
|
+
display: "flex",
|
|
1991
|
+
alignItems: "center",
|
|
1992
|
+
justifyContent: "center",
|
|
1993
|
+
fontSize: "11px",
|
|
1994
|
+
fontWeight: "700",
|
|
1995
|
+
color: accent
|
|
1996
|
+
} }, Math.round(progress), "%")), type === "dots" && /* @__PURE__ */ import_react12.default.createElement("div", { style: { display: "flex", gap: "10px", alignItems: "center" } }, [0, 1, 2].map((i) => /* @__PURE__ */ import_react12.default.createElement("div", { key: i, style: {
|
|
1997
|
+
width: "12px",
|
|
1998
|
+
height: "12px",
|
|
1999
|
+
borderRadius: "50%",
|
|
2000
|
+
background: accent,
|
|
2001
|
+
animation: `pl-dot 1.2s ease infinite`,
|
|
2002
|
+
animationDelay: `${i * 0.2}s`
|
|
2003
|
+
} }))), type === "pulse" && /* @__PURE__ */ import_react12.default.createElement("div", { style: { position: "relative", width: "56px", height: "56px" } }, [0, 1].map((i) => /* @__PURE__ */ import_react12.default.createElement("div", { key: i, style: {
|
|
2004
|
+
position: "absolute",
|
|
2005
|
+
inset: 0,
|
|
2006
|
+
borderRadius: "50%",
|
|
2007
|
+
background: alpha(accent, 0.3),
|
|
2008
|
+
animation: `pl-pulse 1.5s ease infinite`,
|
|
2009
|
+
animationDelay: `${i * 0.4}s`
|
|
2010
|
+
} })), /* @__PURE__ */ import_react12.default.createElement("div", { style: {
|
|
2011
|
+
position: "absolute",
|
|
2012
|
+
inset: "30%",
|
|
2013
|
+
borderRadius: "50%",
|
|
2014
|
+
background: accent
|
|
2015
|
+
} })), type === "ring" && /* @__PURE__ */ import_react12.default.createElement("div", { style: {
|
|
2016
|
+
width: "52px",
|
|
2017
|
+
height: "52px",
|
|
2018
|
+
borderRadius: "50%",
|
|
2019
|
+
border: `4px solid ${alpha(accent, 0.15)}`,
|
|
2020
|
+
borderTop: `4px solid ${accent}`,
|
|
2021
|
+
borderRight: `4px solid ${accent}`,
|
|
2022
|
+
animation: "pl-spin 0.9s linear infinite"
|
|
2023
|
+
} }), type === "bar" && /* @__PURE__ */ import_react12.default.createElement("div", { style: { width: "200px", display: "flex", flexDirection: "column", gap: "8px" } }, /* @__PURE__ */ import_react12.default.createElement("div", { style: {
|
|
2024
|
+
width: "100%",
|
|
2025
|
+
height: "4px",
|
|
2026
|
+
background: alpha(accent, 0.15),
|
|
2027
|
+
borderRadius: "2px",
|
|
2028
|
+
overflow: "hidden"
|
|
2029
|
+
} }, /* @__PURE__ */ import_react12.default.createElement("div", { style: {
|
|
2030
|
+
height: "100%",
|
|
2031
|
+
width: `${progress}%`,
|
|
2032
|
+
borderRadius: "2px",
|
|
2033
|
+
background: `linear-gradient(90deg, ${accent}, ${alpha(accent, 0.6)}, ${accent})`,
|
|
2034
|
+
backgroundSize: "200% 100%",
|
|
2035
|
+
animation: "pl-bar 1.2s linear infinite",
|
|
2036
|
+
transition: "width 0.03s linear"
|
|
2037
|
+
} })), /* @__PURE__ */ import_react12.default.createElement("div", { style: {
|
|
2038
|
+
display: "flex",
|
|
2039
|
+
justifyContent: "space-between",
|
|
2040
|
+
fontSize: "11px",
|
|
2041
|
+
color: "rgba(255,255,255,0.3)"
|
|
2042
|
+
} }, /* @__PURE__ */ import_react12.default.createElement("span", null, loadingText), /* @__PURE__ */ import_react12.default.createElement("span", null, Math.round(progress), "%")), subText && /* @__PURE__ */ import_react12.default.createElement("p", { style: { fontSize: "12px", color: "rgba(255,255,255,0.18)", margin: "4px 0 0", textAlign: "center" } }, subText)), type !== "bar" && /* @__PURE__ */ import_react12.default.createElement("div", { style: { textAlign: "center" } }, /* @__PURE__ */ import_react12.default.createElement("p", { style: { fontSize: "13px", color: "rgba(255,255,255,0.3)", margin: "0 0 4px" } }, loadingText), subText && /* @__PURE__ */ import_react12.default.createElement("p", { style: { fontSize: "12px", color: "rgba(255,255,255,0.15)", margin: 0 } }, subText))));
|
|
2043
|
+
};
|
|
2044
|
+
|
|
2045
|
+
// src/components/OTPInput/OTPInput.jsx
|
|
2046
|
+
var import_react13 = __toESM(require("react"));
|
|
2047
|
+
var OTPInput = ({
|
|
2048
|
+
length = 6,
|
|
2049
|
+
onComplete = () => {
|
|
2050
|
+
},
|
|
2051
|
+
onCancel = () => {
|
|
2052
|
+
},
|
|
2053
|
+
accent = "#6366f1",
|
|
2054
|
+
bg = "#0f172a",
|
|
2055
|
+
radius = "16px",
|
|
2056
|
+
label = "Enter verification code",
|
|
2057
|
+
subLabel = "We sent a code to your email",
|
|
2058
|
+
errorText = "",
|
|
2059
|
+
resendText = "Resend code",
|
|
2060
|
+
onResend = () => {
|
|
2061
|
+
}
|
|
2062
|
+
}) => {
|
|
2063
|
+
const [otp, setOtp] = (0, import_react13.useState)(Array(length).fill(""));
|
|
2064
|
+
const [focused, setFocused] = (0, import_react13.useState)(0);
|
|
2065
|
+
const [completed, setCompleted] = (0, import_react13.useState)(false);
|
|
2066
|
+
const [resendTimer, setResendTimer] = (0, import_react13.useState)(30);
|
|
2067
|
+
const inputs = (0, import_react13.useRef)([]);
|
|
2068
|
+
const alpha = (hex, op) => {
|
|
2069
|
+
const r = parseInt(hex.slice(1, 3), 16);
|
|
2070
|
+
const g = parseInt(hex.slice(3, 5), 16);
|
|
2071
|
+
const b = parseInt(hex.slice(5, 7), 16);
|
|
2072
|
+
return `rgba(${r},${g},${b},${op})`;
|
|
2073
|
+
};
|
|
2074
|
+
(0, import_react13.useEffect)(() => {
|
|
2075
|
+
var _a;
|
|
2076
|
+
(_a = inputs.current[0]) == null ? void 0 : _a.focus();
|
|
2077
|
+
}, []);
|
|
2078
|
+
(0, import_react13.useEffect)(() => {
|
|
2079
|
+
if (resendTimer <= 0) return;
|
|
2080
|
+
const t = setInterval(() => setResendTimer((s) => s - 1), 1e3);
|
|
2081
|
+
return () => clearInterval(t);
|
|
2082
|
+
}, [resendTimer]);
|
|
2083
|
+
const handleChange = (e, i) => {
|
|
2084
|
+
var _a;
|
|
2085
|
+
const val = e.target.value.replace(/\D/g, "").slice(-1);
|
|
2086
|
+
const newOtp = [...otp];
|
|
2087
|
+
newOtp[i] = val;
|
|
2088
|
+
setOtp(newOtp);
|
|
2089
|
+
if (val && i < length - 1) {
|
|
2090
|
+
(_a = inputs.current[i + 1]) == null ? void 0 : _a.focus();
|
|
2091
|
+
setFocused(i + 1);
|
|
2092
|
+
}
|
|
2093
|
+
if (newOtp.every((v) => v !== "")) {
|
|
2094
|
+
setCompleted(true);
|
|
2095
|
+
onComplete(newOtp.join(""));
|
|
2096
|
+
} else {
|
|
2097
|
+
setCompleted(false);
|
|
2098
|
+
}
|
|
2099
|
+
};
|
|
2100
|
+
const handleKeyDown = (e, i) => {
|
|
2101
|
+
var _a, _b, _c;
|
|
2102
|
+
if (e.key === "Backspace") {
|
|
2103
|
+
const newOtp = [...otp];
|
|
2104
|
+
if (otp[i]) {
|
|
2105
|
+
newOtp[i] = "";
|
|
2106
|
+
setOtp(newOtp);
|
|
2107
|
+
} else if (i > 0) {
|
|
2108
|
+
newOtp[i - 1] = "";
|
|
2109
|
+
setOtp(newOtp);
|
|
2110
|
+
(_a = inputs.current[i - 1]) == null ? void 0 : _a.focus();
|
|
2111
|
+
setFocused(i - 1);
|
|
2112
|
+
}
|
|
2113
|
+
setCompleted(false);
|
|
2114
|
+
}
|
|
2115
|
+
if (e.key === "ArrowLeft" && i > 0) {
|
|
2116
|
+
(_b = inputs.current[i - 1]) == null ? void 0 : _b.focus();
|
|
2117
|
+
setFocused(i - 1);
|
|
2118
|
+
}
|
|
2119
|
+
if (e.key === "ArrowRight" && i < length - 1) {
|
|
2120
|
+
(_c = inputs.current[i + 1]) == null ? void 0 : _c.focus();
|
|
2121
|
+
setFocused(i + 1);
|
|
2122
|
+
}
|
|
2123
|
+
};
|
|
2124
|
+
const handlePaste = (e) => {
|
|
2125
|
+
var _a;
|
|
2126
|
+
e.preventDefault();
|
|
2127
|
+
const pasted = e.clipboardData.getData("text").replace(/\D/g, "").slice(0, length);
|
|
2128
|
+
if (!pasted) return;
|
|
2129
|
+
const newOtp = [...otp];
|
|
2130
|
+
pasted.split("").forEach((ch, i) => {
|
|
2131
|
+
newOtp[i] = ch;
|
|
2132
|
+
});
|
|
2133
|
+
setOtp(newOtp);
|
|
2134
|
+
const nextIndex = Math.min(pasted.length, length - 1);
|
|
2135
|
+
(_a = inputs.current[nextIndex]) == null ? void 0 : _a.focus();
|
|
2136
|
+
setFocused(nextIndex);
|
|
2137
|
+
if (newOtp.every((v) => v !== "")) {
|
|
2138
|
+
setCompleted(true);
|
|
2139
|
+
onComplete(newOtp.join(""));
|
|
2140
|
+
}
|
|
2141
|
+
};
|
|
2142
|
+
const handleResend = () => {
|
|
2143
|
+
var _a;
|
|
2144
|
+
setOtp(Array(length).fill(""));
|
|
2145
|
+
setCompleted(false);
|
|
2146
|
+
setResendTimer(30);
|
|
2147
|
+
(_a = inputs.current[0]) == null ? void 0 : _a.focus();
|
|
2148
|
+
setFocused(0);
|
|
2149
|
+
onResend();
|
|
2150
|
+
};
|
|
2151
|
+
return /* @__PURE__ */ import_react13.default.createElement("div", { style: {
|
|
2152
|
+
background: bg,
|
|
2153
|
+
borderRadius: radius,
|
|
2154
|
+
padding: "28px 24px",
|
|
2155
|
+
width: "fit-content",
|
|
2156
|
+
fontFamily: "system-ui, sans-serif",
|
|
2157
|
+
border: "1px solid rgba(255,255,255,0.07)",
|
|
2158
|
+
boxShadow: "0 10px 40px rgba(0,0,0,0.4)"
|
|
2159
|
+
} }, /* @__PURE__ */ import_react13.default.createElement("div", { style: { textAlign: "center", marginBottom: "24px" } }, /* @__PURE__ */ import_react13.default.createElement("div", { style: {
|
|
2160
|
+
width: "44px",
|
|
2161
|
+
height: "44px",
|
|
2162
|
+
borderRadius: "12px",
|
|
2163
|
+
background: alpha(accent, 0.12),
|
|
2164
|
+
border: `1px solid ${alpha(accent, 0.25)}`,
|
|
2165
|
+
display: "flex",
|
|
2166
|
+
alignItems: "center",
|
|
2167
|
+
justifyContent: "center",
|
|
2168
|
+
margin: "0 auto 14px"
|
|
2169
|
+
} }, /* @__PURE__ */ import_react13.default.createElement(
|
|
2170
|
+
"svg",
|
|
2171
|
+
{
|
|
2172
|
+
width: "20",
|
|
2173
|
+
height: "20",
|
|
2174
|
+
viewBox: "0 0 24 24",
|
|
2175
|
+
fill: "none",
|
|
2176
|
+
stroke: accent,
|
|
2177
|
+
strokeWidth: "2",
|
|
2178
|
+
strokeLinecap: "round",
|
|
2179
|
+
strokeLinejoin: "round"
|
|
2180
|
+
},
|
|
2181
|
+
/* @__PURE__ */ import_react13.default.createElement("rect", { x: "2", y: "7", width: "20", height: "14", rx: "2" }),
|
|
2182
|
+
/* @__PURE__ */ import_react13.default.createElement("path", { d: "M16 3l-4 4-4-4" })
|
|
2183
|
+
)), /* @__PURE__ */ import_react13.default.createElement("p", { style: { fontSize: "15px", fontWeight: "700", color: "#fff", margin: "0 0 5px" } }, label), /* @__PURE__ */ import_react13.default.createElement("p", { style: { fontSize: "12px", color: "rgba(255,255,255,0.35)", margin: 0 } }, subLabel)), /* @__PURE__ */ import_react13.default.createElement("div", { style: { display: "flex", gap: "10px", justifyContent: "center", marginBottom: "8px" } }, otp.map((val, i) => /* @__PURE__ */ import_react13.default.createElement(
|
|
2184
|
+
"input",
|
|
2185
|
+
{
|
|
2186
|
+
key: i,
|
|
2187
|
+
ref: (el) => inputs.current[i] = el,
|
|
2188
|
+
type: "text",
|
|
2189
|
+
inputMode: "numeric",
|
|
2190
|
+
maxLength: 1,
|
|
2191
|
+
value: val,
|
|
2192
|
+
onChange: (e) => handleChange(e, i),
|
|
2193
|
+
onKeyDown: (e) => handleKeyDown(e, i),
|
|
2194
|
+
onPaste: handlePaste,
|
|
2195
|
+
onFocus: () => setFocused(i),
|
|
2196
|
+
style: {
|
|
2197
|
+
width: "44px",
|
|
2198
|
+
height: "52px",
|
|
2199
|
+
textAlign: "center",
|
|
2200
|
+
fontSize: "20px",
|
|
2201
|
+
fontWeight: "700",
|
|
2202
|
+
color: "#fff",
|
|
2203
|
+
background: val ? alpha(accent, 0.1) : "rgba(255,255,255,0.04)",
|
|
2204
|
+
border: `1.5px solid ${errorText ? "rgba(239,68,68,0.6)" : focused === i ? accent : val ? alpha(accent, 0.4) : "rgba(255,255,255,0.1)"}`,
|
|
2205
|
+
borderRadius: "12px",
|
|
2206
|
+
outline: "none",
|
|
2207
|
+
caretColor: accent,
|
|
2208
|
+
transition: "all 0.2s",
|
|
2209
|
+
fontFamily: "inherit"
|
|
2210
|
+
}
|
|
2211
|
+
}
|
|
2212
|
+
))), length === 6 && /* @__PURE__ */ import_react13.default.createElement("div", { style: { display: "flex", justifyContent: "center", marginBottom: "8px" } }, /* @__PURE__ */ import_react13.default.createElement("div", { style: { display: "flex", gap: "10px" } }, [0, 1, 2].map((i) => /* @__PURE__ */ import_react13.default.createElement("div", { key: i, style: { width: "44px" } })), /* @__PURE__ */ import_react13.default.createElement("div", { style: { width: "10px", display: "flex", alignItems: "center", justifyContent: "center" } }, /* @__PURE__ */ import_react13.default.createElement("div", { style: { width: "6px", height: "1.5px", background: "rgba(255,255,255,0.15)", borderRadius: "1px" } })), [0, 1, 2].map((i) => /* @__PURE__ */ import_react13.default.createElement("div", { key: i, style: { width: "44px" } })))), errorText && /* @__PURE__ */ import_react13.default.createElement("p", { style: {
|
|
2213
|
+
fontSize: "12px",
|
|
2214
|
+
color: "#f87171",
|
|
2215
|
+
textAlign: "center",
|
|
2216
|
+
margin: "6px 0 0",
|
|
2217
|
+
display: "flex",
|
|
2218
|
+
alignItems: "center",
|
|
2219
|
+
justifyContent: "center",
|
|
2220
|
+
gap: "5px"
|
|
2221
|
+
} }, /* @__PURE__ */ import_react13.default.createElement(
|
|
2222
|
+
"svg",
|
|
2223
|
+
{
|
|
2224
|
+
width: "12",
|
|
2225
|
+
height: "12",
|
|
2226
|
+
viewBox: "0 0 24 24",
|
|
2227
|
+
fill: "none",
|
|
2228
|
+
stroke: "currentColor",
|
|
2229
|
+
strokeWidth: "2.5",
|
|
2230
|
+
strokeLinecap: "round"
|
|
2231
|
+
},
|
|
2232
|
+
/* @__PURE__ */ import_react13.default.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
|
2233
|
+
/* @__PURE__ */ import_react13.default.createElement("line", { x1: "12", y1: "8", x2: "12", y2: "12" }),
|
|
2234
|
+
/* @__PURE__ */ import_react13.default.createElement("line", { x1: "12", y1: "16", x2: "12.01", y2: "16" })
|
|
2235
|
+
), errorText), /* @__PURE__ */ import_react13.default.createElement(
|
|
2236
|
+
"button",
|
|
2237
|
+
{
|
|
2238
|
+
onClick: () => completed && onComplete(otp.join("")),
|
|
2239
|
+
disabled: !completed,
|
|
2240
|
+
style: {
|
|
2241
|
+
width: "100%",
|
|
2242
|
+
padding: "12px",
|
|
2243
|
+
borderRadius: "12px",
|
|
2244
|
+
border: "none",
|
|
2245
|
+
marginTop: "20px",
|
|
2246
|
+
background: completed ? `linear-gradient(135deg, ${accent}, ${alpha(accent, 0.7)})` : "rgba(255,255,255,0.06)",
|
|
2247
|
+
color: completed ? "#fff" : "rgba(255,255,255,0.25)",
|
|
2248
|
+
fontSize: "14px",
|
|
2249
|
+
fontWeight: "700",
|
|
2250
|
+
cursor: completed ? "pointer" : "not-allowed",
|
|
2251
|
+
fontFamily: "inherit",
|
|
2252
|
+
transition: "all 0.25s"
|
|
2253
|
+
}
|
|
2254
|
+
},
|
|
2255
|
+
completed ? "Verify Code" : `Enter ${length - otp.filter((v) => v).length} more digit${length - otp.filter((v) => v).length !== 1 ? "s" : ""}`
|
|
2256
|
+
), /* @__PURE__ */ import_react13.default.createElement("p", { style: { textAlign: "center", fontSize: "12px", color: "rgba(255,255,255,0.25)", margin: "14px 0 0" } }, "Didn't receive it?", " ", /* @__PURE__ */ import_react13.default.createElement(
|
|
2257
|
+
"button",
|
|
2258
|
+
{
|
|
2259
|
+
onClick: handleResend,
|
|
2260
|
+
disabled: resendTimer > 0,
|
|
2261
|
+
style: {
|
|
2262
|
+
background: "transparent",
|
|
2263
|
+
border: "none",
|
|
2264
|
+
padding: 0,
|
|
2265
|
+
fontSize: "12px",
|
|
2266
|
+
fontWeight: "700",
|
|
2267
|
+
color: resendTimer > 0 ? "rgba(255,255,255,0.25)" : accent,
|
|
2268
|
+
cursor: resendTimer > 0 ? "default" : "pointer",
|
|
2269
|
+
fontFamily: "inherit"
|
|
2270
|
+
}
|
|
2271
|
+
},
|
|
2272
|
+
resendTimer > 0 ? `${resendText} (${resendTimer}s)` : resendText
|
|
2273
|
+
)));
|
|
2274
|
+
};
|
|
2532
2275
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2533
2276
|
0 && (module.exports = {
|
|
2534
|
-
Avatar,
|
|
2535
2277
|
AvatarCard,
|
|
2536
2278
|
BackgoundImageSlider,
|
|
2537
2279
|
Charts,
|
|
2538
|
-
CodeBlock,
|
|
2539
|
-
CustomInputField,
|
|
2540
|
-
DividerLine,
|
|
2541
|
-
FileUpload,
|
|
2542
2280
|
Footer,
|
|
2543
2281
|
ImageCard,
|
|
2544
2282
|
ImageSlider,
|
|
2545
2283
|
Loader,
|
|
2546
|
-
LoadingSpinner,
|
|
2547
2284
|
Navbar,
|
|
2548
2285
|
NotificationToast,
|
|
2549
|
-
|
|
2286
|
+
OTPInput,
|
|
2287
|
+
PageLoader,
|
|
2550
2288
|
PricingCard,
|
|
2551
|
-
|
|
2552
|
-
SearchBar,
|
|
2553
|
-
Sidebar,
|
|
2554
|
-
SkeletonLoader,
|
|
2555
|
-
SmartButton,
|
|
2556
|
-
StatCard,
|
|
2557
|
-
Tabs,
|
|
2558
|
-
TextArea,
|
|
2559
|
-
ToastNotification
|
|
2289
|
+
Sidebar
|
|
2560
2290
|
});
|