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