virtual-ui-lib 1.0.66 → 1.0.68
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +582 -852
- package/dist/index.mjs +578 -835
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,575 +1,5 @@
|
|
|
1
|
-
// src/components/ToastNotification/ToastNotification.jsx
|
|
2
|
-
import React, { useEffect, useState } from "react";
|
|
3
|
-
var ToastNotification = ({
|
|
4
|
-
type = "success",
|
|
5
|
-
title = "Success",
|
|
6
|
-
message = "Your action was successful!",
|
|
7
|
-
duration = 4e3,
|
|
8
|
-
onClose
|
|
9
|
-
}) => {
|
|
10
|
-
const [visible, setVisible] = useState(false);
|
|
11
|
-
const [progress, setProgress] = useState(0);
|
|
12
|
-
useEffect(() => {
|
|
13
|
-
setVisible(true);
|
|
14
|
-
const interval = setInterval(() => {
|
|
15
|
-
setProgress((prev) => {
|
|
16
|
-
if (prev >= 100) {
|
|
17
|
-
clearInterval(interval);
|
|
18
|
-
onClose();
|
|
19
|
-
return 100;
|
|
20
|
-
}
|
|
21
|
-
return prev + 100 / (duration / 100);
|
|
22
|
-
});
|
|
23
|
-
}, 100);
|
|
24
|
-
return () => clearInterval(interval);
|
|
25
|
-
}, [duration, onClose]);
|
|
26
|
-
const getStyles = () => {
|
|
27
|
-
let bg, icon;
|
|
28
|
-
switch (type) {
|
|
29
|
-
case "success":
|
|
30
|
-
bg = "#059669";
|
|
31
|
-
icon = "\u2713";
|
|
32
|
-
break;
|
|
33
|
-
case "error":
|
|
34
|
-
bg = "#dc2626";
|
|
35
|
-
icon = "\u2716";
|
|
36
|
-
break;
|
|
37
|
-
case "warning":
|
|
38
|
-
bg = "#eab308";
|
|
39
|
-
icon = "\u26A0\uFE0F";
|
|
40
|
-
break;
|
|
41
|
-
case "info":
|
|
42
|
-
bg = "#2563eb";
|
|
43
|
-
icon = "\u2139\uFE0F";
|
|
44
|
-
break;
|
|
45
|
-
default:
|
|
46
|
-
bg = "#059669";
|
|
47
|
-
icon = "\u2713";
|
|
48
|
-
}
|
|
49
|
-
return { background: bg, icon };
|
|
50
|
-
};
|
|
51
|
-
return /* @__PURE__ */ React.createElement("div", { style: {
|
|
52
|
-
position: "fixed",
|
|
53
|
-
bottom: "20px",
|
|
54
|
-
right: "20px",
|
|
55
|
-
opacity: visible ? 1 : 0,
|
|
56
|
-
transform: visible ? "translateY(0)" : "translateY(20px)",
|
|
57
|
-
transition: "opacity 0.3s, transform 0.3s",
|
|
58
|
-
background: getStyles().background,
|
|
59
|
-
borderRadius: "12px",
|
|
60
|
-
padding: "16px",
|
|
61
|
-
width: "300px",
|
|
62
|
-
boxShadow: "0 4px 20px rgba(0,0,0,0.2)",
|
|
63
|
-
fontFamily: "system-ui, sans-serif",
|
|
64
|
-
zIndex: 9999
|
|
65
|
-
} }, /* @__PURE__ */ React.createElement("div", { style: { display: "flex", alignItems: "center", marginBottom: "8px" } }, /* @__PURE__ */ React.createElement("div", { style: {
|
|
66
|
-
width: "24px",
|
|
67
|
-
height: "24px",
|
|
68
|
-
borderRadius: "50%",
|
|
69
|
-
background: "white",
|
|
70
|
-
display: "flex",
|
|
71
|
-
alignItems: "center",
|
|
72
|
-
justifyContent: "center",
|
|
73
|
-
marginRight: "8px"
|
|
74
|
-
} }, /* @__PURE__ */ React.createElement("span", { style: { color: getStyles().background, fontSize: "16px" } }, getStyles().icon)), /* @__PURE__ */ React.createElement("h4", { style: { margin: 0, fontSize: "16px", fontWeight: "600", color: "white" } }, title)), /* @__PURE__ */ React.createElement("p", { style: { margin: "0 0 12px", fontSize: "14px", color: "#f1f5f9" } }, message), /* @__PURE__ */ React.createElement("button", { onClick: onClose, style: {
|
|
75
|
-
background: "transparent",
|
|
76
|
-
color: "white",
|
|
77
|
-
border: "none",
|
|
78
|
-
cursor: "pointer",
|
|
79
|
-
fontSize: "14px",
|
|
80
|
-
fontWeight: "600"
|
|
81
|
-
} }, "Close"), /* @__PURE__ */ React.createElement("div", { style: {
|
|
82
|
-
height: "4px",
|
|
83
|
-
background: "rgba(255, 255, 255, 0.3)",
|
|
84
|
-
borderRadius: "8px",
|
|
85
|
-
overflow: "hidden",
|
|
86
|
-
marginTop: "12px"
|
|
87
|
-
} }, /* @__PURE__ */ React.createElement("div", { style: {
|
|
88
|
-
width: progress + "%",
|
|
89
|
-
height: "100%",
|
|
90
|
-
background: "white",
|
|
91
|
-
transition: "width 0.1s linear"
|
|
92
|
-
} })));
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
// src/components/StatCard/StatCard.jsx
|
|
96
|
-
import React2, { useEffect as useEffect2, useState as useState2 } from "react";
|
|
97
|
-
var StatCard = ({
|
|
98
|
-
title = "Revenue",
|
|
99
|
-
metric = 1200,
|
|
100
|
-
change = 15,
|
|
101
|
-
bg = "#0f172a",
|
|
102
|
-
accent = "#059669",
|
|
103
|
-
negativeAccent = "#ef4444",
|
|
104
|
-
radius = "16px"
|
|
105
|
-
}) => {
|
|
106
|
-
const [count, setCount] = useState2(0);
|
|
107
|
-
useEffect2(() => {
|
|
108
|
-
let countUp = 0;
|
|
109
|
-
const interval = setInterval(() => {
|
|
110
|
-
if (countUp < metric) {
|
|
111
|
-
countUp += Math.ceil(metric / 100);
|
|
112
|
-
setCount(countUp);
|
|
113
|
-
} else {
|
|
114
|
-
clearInterval(interval);
|
|
115
|
-
}
|
|
116
|
-
}, 30);
|
|
117
|
-
return () => clearInterval(interval);
|
|
118
|
-
}, [metric]);
|
|
119
|
-
return /* @__PURE__ */ React2.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__ */ React2.createElement("h3", { style: { margin: "0 0 10px", fontSize: "16px", fontWeight: "600" } }, title), /* @__PURE__ */ React2.createElement("div", { style: { fontSize: "40px", fontWeight: "700" } }, count), /* @__PURE__ */ React2.createElement("span", { style: {
|
|
120
|
-
display: "inline-block",
|
|
121
|
-
padding: "5px 12px",
|
|
122
|
-
borderRadius: "10px",
|
|
123
|
-
background: change >= 0 ? accent : negativeAccent,
|
|
124
|
-
color: "white",
|
|
125
|
-
fontSize: "14px",
|
|
126
|
-
margin: "10px 0"
|
|
127
|
-
} }, change >= 0 ? "+" + change + "%" : change + "%"), /* @__PURE__ */ React2.createElement("svg", { style: { marginTop: "12px" }, width: "100%", height: "30", viewBox: "0 0 100 30", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React2.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" })));
|
|
128
|
-
};
|
|
129
|
-
|
|
130
|
-
// src/components/OtpInput/OtpInput.jsx
|
|
131
|
-
import React3, { useEffect as useEffect3, useRef, useState as useState3 } from "react";
|
|
132
|
-
var OtpInput = ({
|
|
133
|
-
length = 6,
|
|
134
|
-
boxSize = "48px",
|
|
135
|
-
borderColor = "#7c3aed",
|
|
136
|
-
bgColor = "#1e293b",
|
|
137
|
-
textColor = "#f1f5f9",
|
|
138
|
-
radius = "8px",
|
|
139
|
-
onComplete
|
|
140
|
-
}) => {
|
|
141
|
-
const [otp, setOtp] = useState3(Array(length).fill(""));
|
|
142
|
-
const inputsRef = useRef([]);
|
|
143
|
-
const handleChange = (index, value) => {
|
|
144
|
-
if (/\d/.test(value) || value === "") {
|
|
145
|
-
const newOtp = [...otp];
|
|
146
|
-
newOtp[index] = value;
|
|
147
|
-
setOtp(newOtp);
|
|
148
|
-
if (value !== "" && index < length - 1) {
|
|
149
|
-
inputsRef.current[index + 1].focus();
|
|
150
|
-
} else if (value === "" && index > 0) {
|
|
151
|
-
inputsRef.current[index - 1].focus();
|
|
152
|
-
}
|
|
153
|
-
if (newOtp.join("").length === length) {
|
|
154
|
-
onComplete(newOtp.join(""));
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
};
|
|
158
|
-
const handlePaste = (e) => {
|
|
159
|
-
const pastedData = e.clipboardData.getData("text").slice(0, length).split("");
|
|
160
|
-
const newOtp = Array(length).fill("").map((_, index) => pastedData[index] || "");
|
|
161
|
-
setOtp(newOtp);
|
|
162
|
-
if (newOtp.join("").length === length) {
|
|
163
|
-
onComplete(newOtp.join(""));
|
|
164
|
-
}
|
|
165
|
-
e.preventDefault();
|
|
166
|
-
};
|
|
167
|
-
useEffect3(() => {
|
|
168
|
-
inputsRef.current[0].focus();
|
|
169
|
-
}, []);
|
|
170
|
-
return /* @__PURE__ */ React3.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__ */ React3.createElement(
|
|
171
|
-
"input",
|
|
172
|
-
{
|
|
173
|
-
key: index,
|
|
174
|
-
ref: (el) => inputsRef.current[index] = el,
|
|
175
|
-
type: "text",
|
|
176
|
-
maxLength: "1",
|
|
177
|
-
value,
|
|
178
|
-
onChange: (e) => handleChange(index, e.target.value),
|
|
179
|
-
onFocus: (e) => e.target.select(),
|
|
180
|
-
onKeyDown: (e) => {
|
|
181
|
-
if (e.key === "Backspace" && !value && index > 0) {
|
|
182
|
-
inputsRef.current[index - 1].focus();
|
|
183
|
-
}
|
|
184
|
-
},
|
|
185
|
-
style: {
|
|
186
|
-
width: boxSize,
|
|
187
|
-
height: boxSize,
|
|
188
|
-
fontSize: "24px",
|
|
189
|
-
textAlign: "center",
|
|
190
|
-
borderRadius: radius,
|
|
191
|
-
border: `2px solid ${borderColor}`,
|
|
192
|
-
background: bgColor,
|
|
193
|
-
color: textColor,
|
|
194
|
-
transition: "border-color 0.2s",
|
|
195
|
-
outline: "none"
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
)), otp.join("").length === length && /* @__PURE__ */ React3.createElement("span", { style: { color: "#4ade80", fontSize: "20px" } }, "\u2705"));
|
|
199
|
-
};
|
|
200
|
-
|
|
201
|
-
// src/components/CodeBlock/CodeBlock.jsx
|
|
202
|
-
import React4, { useState as useState4 } from "react";
|
|
203
|
-
var CodeBlock = ({
|
|
204
|
-
code = "const hello = 'Hello, world!';\nconsole.log(hello);",
|
|
205
|
-
language = "JavaScript",
|
|
206
|
-
filename = "example.js",
|
|
207
|
-
bg = "#0d1117",
|
|
208
|
-
textColor = "#c9d1d9",
|
|
209
|
-
tokenColors = { string: "#a5d6e9", keyword: "#f9bc41", variable: "#a6e22e" },
|
|
210
|
-
showLineNumbers = true,
|
|
211
|
-
wrapWords = false
|
|
212
|
-
}) => {
|
|
213
|
-
const [copied, setCopied] = useState4(false);
|
|
214
|
-
const handleCopy = () => {
|
|
215
|
-
navigator.clipboard.writeText(code).then(() => {
|
|
216
|
-
setCopied(true);
|
|
217
|
-
setTimeout(() => setCopied(false), 2e3);
|
|
218
|
-
});
|
|
219
|
-
};
|
|
220
|
-
const formatCode = () => {
|
|
221
|
-
return code.split("\n").map((line, index) => /* @__PURE__ */ React4.createElement("div", { key: index, style: { display: "flex" } }, showLineNumbers && /* @__PURE__ */ React4.createElement("span", { style: { marginRight: "10px", color: "#58a6ff" } }, index + 1), /* @__PURE__ */ React4.createElement("span", { style: { color: tokenColors.string } }, line.replace(/(\'.*?\')/g, (match) => `<span style='color:${tokenColors.string}'>${match}</span>`))));
|
|
222
|
-
};
|
|
223
|
-
return /* @__PURE__ */ React4.createElement("div", { style: { background: bg, borderRadius: "8px", padding: "16px", fontFamily: "monospace", position: "relative" } }, filename && /* @__PURE__ */ React4.createElement("div", { style: { color: textColor, fontWeight: "bold", marginBottom: "8px" } }, filename), /* @__PURE__ */ React4.createElement("div", { style: { overflowX: wrapWords ? "auto" : "hidden", whiteSpace: wrapWords ? "normal" : "pre" } }, formatCode()), /* @__PURE__ */ React4.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__ */ React4.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"));
|
|
224
|
-
};
|
|
225
|
-
|
|
226
|
-
// src/components/SmartButton/SmartButton.jsx
|
|
227
|
-
import React5 from "react";
|
|
228
|
-
var SmartButton = ({
|
|
229
|
-
buttonText = "Submit",
|
|
230
|
-
isLoading = false,
|
|
231
|
-
isDisabled = false,
|
|
232
|
-
icon = null,
|
|
233
|
-
success = false,
|
|
234
|
-
error = false,
|
|
235
|
-
bg = "#7c3aed",
|
|
236
|
-
textColor = "#fff",
|
|
237
|
-
padding = "12px 20px",
|
|
238
|
-
radius = "8px",
|
|
239
|
-
onClick = () => {
|
|
240
|
-
}
|
|
241
|
-
}) => {
|
|
242
|
-
const bgColor = success ? "#059669" : error ? "#ef4444" : bg;
|
|
243
|
-
const cursorStyle = isDisabled ? "not-allowed" : "pointer";
|
|
244
|
-
return /* @__PURE__ */ React5.createElement(
|
|
245
|
-
"button",
|
|
246
|
-
{
|
|
247
|
-
onClick: !isDisabled && !isLoading ? onClick : () => {
|
|
248
|
-
},
|
|
249
|
-
disabled: isDisabled,
|
|
250
|
-
style: {
|
|
251
|
-
background: bgColor,
|
|
252
|
-
color: textColor,
|
|
253
|
-
padding,
|
|
254
|
-
borderRadius: radius,
|
|
255
|
-
border: "none",
|
|
256
|
-
cursor: cursorStyle,
|
|
257
|
-
transition: "background 0.3s ease"
|
|
258
|
-
},
|
|
259
|
-
onMouseEnter: (e) => {
|
|
260
|
-
if (!isDisabled && !isLoading) {
|
|
261
|
-
e.currentTarget.style.background = "#6d28d9";
|
|
262
|
-
}
|
|
263
|
-
},
|
|
264
|
-
onMouseLeave: (e) => {
|
|
265
|
-
e.currentTarget.style.background = bgColor;
|
|
266
|
-
}
|
|
267
|
-
},
|
|
268
|
-
isLoading ? /* @__PURE__ */ React5.createElement("span", null, "Loading...") : /* @__PURE__ */ React5.createElement(React5.Fragment, null, icon && /* @__PURE__ */ React5.createElement("span", { style: { marginRight: "8px" } }, icon), buttonText)
|
|
269
|
-
);
|
|
270
|
-
};
|
|
271
|
-
|
|
272
|
-
// src/components/CustomInputField/CustomInputField.jsx
|
|
273
|
-
import React6, { useState as useState5 } from "react";
|
|
274
|
-
var CustomInputField = ({
|
|
275
|
-
label = "Label",
|
|
276
|
-
placeholder = "Enter text...",
|
|
277
|
-
errorMessage = "",
|
|
278
|
-
helperText = "",
|
|
279
|
-
value = "",
|
|
280
|
-
bg = "#1e293b",
|
|
281
|
-
textColor = "#f1f5f9",
|
|
282
|
-
accent = "#7c3aed",
|
|
283
|
-
padding = "10px",
|
|
284
|
-
radius = "8px",
|
|
285
|
-
onChange = () => {
|
|
286
|
-
}
|
|
287
|
-
}) => {
|
|
288
|
-
const [isFocused, setIsFocused] = useState5(false);
|
|
289
|
-
return /* @__PURE__ */ React6.createElement("div", { style: { margin: "16px 0" } }, /* @__PURE__ */ React6.createElement("label", { style: { color: textColor, marginBottom: "4px", display: "block" } }, label), /* @__PURE__ */ React6.createElement(
|
|
290
|
-
"input",
|
|
291
|
-
{
|
|
292
|
-
type: "text",
|
|
293
|
-
value,
|
|
294
|
-
placeholder,
|
|
295
|
-
onFocus: () => setIsFocused(true),
|
|
296
|
-
onBlur: () => setIsFocused(false),
|
|
297
|
-
onChange: (e) => onChange(e.target.value),
|
|
298
|
-
style: {
|
|
299
|
-
background: bg,
|
|
300
|
-
color: textColor,
|
|
301
|
-
padding,
|
|
302
|
-
borderRadius: radius,
|
|
303
|
-
border: isFocused ? `2px solid ${accent}` : "2px solid transparent",
|
|
304
|
-
transition: "border-color 0.3s ease",
|
|
305
|
-
width: "100%"
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
), errorMessage && /* @__PURE__ */ React6.createElement("p", { style: { color: "red", margin: "4px 0 0 0" } }, errorMessage), helperText && /* @__PURE__ */ React6.createElement("p", { style: { color: textColor, margin: "4px 0 0 0" } }, helperText));
|
|
309
|
-
};
|
|
310
|
-
|
|
311
|
-
// src/components/TextArea/TextArea.jsx
|
|
312
|
-
import React7, { useState as useState6 } from "react";
|
|
313
|
-
var TextArea = ({
|
|
314
|
-
label = "Label",
|
|
315
|
-
placeholder = "Type here...",
|
|
316
|
-
value = "",
|
|
317
|
-
bg = "#1e293b",
|
|
318
|
-
textColor = "#f1f5f9",
|
|
319
|
-
accent = "#2563eb",
|
|
320
|
-
radius = "8px",
|
|
321
|
-
padding = "12px",
|
|
322
|
-
maxLength = 250,
|
|
323
|
-
onChange = () => {
|
|
324
|
-
}
|
|
325
|
-
}) => {
|
|
326
|
-
const [currentValue, setCurrentValue] = useState6(value);
|
|
327
|
-
const handleChange = (e) => {
|
|
328
|
-
setCurrentValue(e.target.value);
|
|
329
|
-
onChange(e.target.value);
|
|
330
|
-
};
|
|
331
|
-
return /* @__PURE__ */ React7.createElement("div", { style: { margin: "16px 0" } }, /* @__PURE__ */ React7.createElement("label", { style: { color: textColor, marginBottom: "8px", display: "block" } }, label), /* @__PURE__ */ React7.createElement(
|
|
332
|
-
"textarea",
|
|
333
|
-
{
|
|
334
|
-
value: currentValue,
|
|
335
|
-
placeholder,
|
|
336
|
-
maxLength,
|
|
337
|
-
onChange: handleChange,
|
|
338
|
-
style: {
|
|
339
|
-
background: bg,
|
|
340
|
-
color: textColor,
|
|
341
|
-
padding,
|
|
342
|
-
borderRadius: radius,
|
|
343
|
-
border: `1px solid ${accent}`,
|
|
344
|
-
width: "100%",
|
|
345
|
-
minHeight: "100px",
|
|
346
|
-
resize: "none",
|
|
347
|
-
transition: "border-color 0.3s"
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
), /* @__PURE__ */ React7.createElement("div", { style: { color: textColor, marginTop: "8px" } }, currentValue.length, "/", maxLength));
|
|
351
|
-
};
|
|
352
|
-
|
|
353
|
-
// src/components/SearchBar/SearchBar.jsx
|
|
354
|
-
import React8, { useState as useState7 } from "react";
|
|
355
|
-
var SearchBar = ({
|
|
356
|
-
placeholder = "Search...",
|
|
357
|
-
bg = "#1e293b",
|
|
358
|
-
textColor = "#f1f5f9",
|
|
359
|
-
accent = "#7c3aed",
|
|
360
|
-
loading = false,
|
|
361
|
-
suggestions = [],
|
|
362
|
-
onChange = () => {
|
|
363
|
-
},
|
|
364
|
-
onClear = () => {
|
|
365
|
-
}
|
|
366
|
-
}) => {
|
|
367
|
-
const [query, setQuery] = useState7("");
|
|
368
|
-
const handleInputChange = (e) => {
|
|
369
|
-
setQuery(e.target.value);
|
|
370
|
-
onChange(e.target.value);
|
|
371
|
-
};
|
|
372
|
-
const handleClear = () => {
|
|
373
|
-
setQuery("");
|
|
374
|
-
onClear();
|
|
375
|
-
};
|
|
376
|
-
return /* @__PURE__ */ React8.createElement("div", { style: { position: "relative", width: "100%" } }, /* @__PURE__ */ React8.createElement(
|
|
377
|
-
"input",
|
|
378
|
-
{
|
|
379
|
-
value: query,
|
|
380
|
-
placeholder,
|
|
381
|
-
onChange: handleInputChange,
|
|
382
|
-
style: {
|
|
383
|
-
background: bg,
|
|
384
|
-
color: textColor,
|
|
385
|
-
padding: "10px",
|
|
386
|
-
borderRadius: "8px",
|
|
387
|
-
border: "1px solid #cbd5e1",
|
|
388
|
-
width: "100%",
|
|
389
|
-
transition: "border-color 0.3s",
|
|
390
|
-
outline: "none"
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
), query && /* @__PURE__ */ React8.createElement("button", { onClick: handleClear, style: {
|
|
394
|
-
position: "absolute",
|
|
395
|
-
right: "10px",
|
|
396
|
-
top: "50%",
|
|
397
|
-
transform: "translateY(-50%)",
|
|
398
|
-
background: "transparent",
|
|
399
|
-
color: accent,
|
|
400
|
-
border: "none",
|
|
401
|
-
cursor: "pointer"
|
|
402
|
-
} }, "Clear"), loading && /* @__PURE__ */ React8.createElement("div", { style: {
|
|
403
|
-
position: "absolute",
|
|
404
|
-
left: "10px",
|
|
405
|
-
top: "50%",
|
|
406
|
-
transform: "translateY(-50%)"
|
|
407
|
-
} }, "Loading..."), suggestions.length > 0 && !loading && /* @__PURE__ */ React8.createElement("ul", { style: {
|
|
408
|
-
listStyleType: "none",
|
|
409
|
-
margin: 0,
|
|
410
|
-
padding: "10px",
|
|
411
|
-
background: bg,
|
|
412
|
-
borderRadius: "8px",
|
|
413
|
-
position: "absolute",
|
|
414
|
-
zIndex: 1e3,
|
|
415
|
-
width: "100%",
|
|
416
|
-
maxHeight: "200px",
|
|
417
|
-
overflowY: "auto"
|
|
418
|
-
} }, suggestions.map((suggestion, index) => /* @__PURE__ */ React8.createElement("li", { key: index, style: {
|
|
419
|
-
padding: "8px",
|
|
420
|
-
color: textColor,
|
|
421
|
-
cursor: "pointer",
|
|
422
|
-
transition: "background 0.2s"
|
|
423
|
-
}, onClick: () => {
|
|
424
|
-
setQuery(suggestion);
|
|
425
|
-
onChange(suggestion);
|
|
426
|
-
} }, suggestion))));
|
|
427
|
-
};
|
|
428
|
-
|
|
429
|
-
// src/components/LoadingSpinner/LoadingSpinner.jsx
|
|
430
|
-
import React9 from "react";
|
|
431
|
-
var LoadingSpinner = ({ size = "40px", color = "#7c3aed", speed = "1s" }) => {
|
|
432
|
-
return /* @__PURE__ */ React9.createElement("div", { style: { border: `4px solid ${color}`, borderTop: `4px solid transparent`, borderRadius: "50%", width: size, height: size, animation: `spin ${speed} linear infinite` } });
|
|
433
|
-
};
|
|
434
|
-
|
|
435
|
-
// src/components/SkeletonLoader/SkeletonLoader.jsx
|
|
436
|
-
import React10 from "react";
|
|
437
|
-
var SkeletonLoader = ({ width = "100%", height = "20px", bg = "#1e293b", accent = "#7c3aed", radius = "12px", padding = "0" }) => {
|
|
438
|
-
const shimmerStyle = {
|
|
439
|
-
background: `linear-gradient(90deg, ${accent} 25%, ${bg} 50%, ${accent} 75%)`,
|
|
440
|
-
backgroundSize: "200% 100%",
|
|
441
|
-
animation: "shimmer 1.5s infinite",
|
|
442
|
-
borderRadius: radius
|
|
443
|
-
};
|
|
444
|
-
return /* @__PURE__ */ React10.createElement("div", { style: { padding } }, /* @__PURE__ */ React10.createElement("div", { style: { ...shimmerStyle, width, height, marginBottom: "10px" } }), /* @__PURE__ */ React10.createElement("div", { style: { ...shimmerStyle, width, height, marginBottom: "10px" } }), /* @__PURE__ */ React10.createElement("div", { style: { ...shimmerStyle, width, height } }), /* @__PURE__ */ React10.createElement("style", null, `@keyframes shimmer {
|
|
445
|
-
0% {
|
|
446
|
-
background-position: 200% 0;
|
|
447
|
-
}
|
|
448
|
-
100% {
|
|
449
|
-
background-position: 0 0;
|
|
450
|
-
}
|
|
451
|
-
}`));
|
|
452
|
-
};
|
|
453
|
-
|
|
454
|
-
// src/components/ResponsiveNavbar/ResponsiveNavbar.jsx
|
|
455
|
-
import React11, { useState as useState8 } from "react";
|
|
456
|
-
var ResponsiveNavbar = ({
|
|
457
|
-
logo = "Logo",
|
|
458
|
-
navItems = [],
|
|
459
|
-
bg = "#1e293b",
|
|
460
|
-
textColor = "#f1f5f9",
|
|
461
|
-
accent = "#7c3aed",
|
|
462
|
-
padding = "10px 20px",
|
|
463
|
-
radius = "8px",
|
|
464
|
-
placeholder = "Search...",
|
|
465
|
-
onNavItemClick = () => {
|
|
466
|
-
},
|
|
467
|
-
onSearchChange = () => {
|
|
468
|
-
},
|
|
469
|
-
profileAvatar = "https://via.placeholder.com/40"
|
|
470
|
-
}) => {
|
|
471
|
-
const [menuActive, setMenuActive] = useState8(false);
|
|
472
|
-
const [searchValue, setSearchValue] = useState8("");
|
|
473
|
-
const handleSearchChange = (e) => {
|
|
474
|
-
setSearchValue(e.target.value);
|
|
475
|
-
onSearchChange(e.target.value);
|
|
476
|
-
};
|
|
477
|
-
return /* @__PURE__ */ React11.createElement("nav", { style: { background: bg, color: textColor, padding, borderRadius: radius, display: "flex", justifyContent: "space-between", alignItems: "center" } }, /* @__PURE__ */ React11.createElement("div", { style: { display: "flex", alignItems: "center" } }, /* @__PURE__ */ React11.createElement("div", { style: { fontSize: "24px", fontWeight: "bold" } }, logo), /* @__PURE__ */ React11.createElement("div", { style: { display: "flex", marginLeft: "20px" } }, navItems.map((item, index) => /* @__PURE__ */ React11.createElement("div", { key: index, onClick: () => onNavItemClick(item), style: { margin: "0 10px", cursor: "pointer", color: item.active ? accent : textColor } }, item.label)))), /* @__PURE__ */ React11.createElement("div", { style: { display: "flex", alignItems: "center" } }, /* @__PURE__ */ React11.createElement(
|
|
478
|
-
"input",
|
|
479
|
-
{
|
|
480
|
-
type: "text",
|
|
481
|
-
value: searchValue,
|
|
482
|
-
placeholder,
|
|
483
|
-
onChange: handleSearchChange,
|
|
484
|
-
style: { background: "#0f172a", color: textColor, border: "none", borderRadius: radius, padding: "8px", marginRight: "20px" }
|
|
485
|
-
}
|
|
486
|
-
), /* @__PURE__ */ React11.createElement("img", { src: profileAvatar, alt: "Profile", style: { borderRadius: "50%", width: "40px", height: "40px" } }), /* @__PURE__ */ React11.createElement("div", { onClick: () => setMenuActive(!menuActive), style: { cursor: "pointer", marginLeft: "20px" } }, "\u2630")), menuActive && /* @__PURE__ */ React11.createElement("div", { style: { position: "absolute", top: "60px", right: "20px", background: bg, borderRadius: radius, boxShadow: "0 4px 8px rgba(0,0,0,0.3)", zIndex: 1 } }, navItems.map((item, index) => /* @__PURE__ */ React11.createElement("div", { key: index, onClick: () => onNavItemClick(item), style: { padding: "10px", color: item.active ? accent : textColor } }, item.label))));
|
|
487
|
-
};
|
|
488
|
-
|
|
489
|
-
// src/components/FileUpload/FileUpload.jsx
|
|
490
|
-
import React12, { useState as useState9 } from "react";
|
|
491
|
-
var FileUpload = ({ bg = "#1e293b", textColor = "#f1f5f9", accent = "#7c3aed", radius = "12px", padding = "20px", placeholder = "Drag and drop files here or click to upload", onChange = () => {
|
|
492
|
-
} }) => {
|
|
493
|
-
const [file, setFile] = useState9(null);
|
|
494
|
-
const [progress, setProgress] = useState9(0);
|
|
495
|
-
const handleDrop = (event) => {
|
|
496
|
-
event.preventDefault();
|
|
497
|
-
const droppedFile = event.dataTransfer.files[0];
|
|
498
|
-
if (droppedFile) {
|
|
499
|
-
uploadFile(droppedFile);
|
|
500
|
-
}
|
|
501
|
-
};
|
|
502
|
-
const handleClick = () => {
|
|
503
|
-
document.getElementById("fileInput").click();
|
|
504
|
-
};
|
|
505
|
-
const handleFileChange = (event) => {
|
|
506
|
-
const selectedFile = event.target.files[0];
|
|
507
|
-
if (selectedFile) {
|
|
508
|
-
uploadFile(selectedFile);
|
|
509
|
-
}
|
|
510
|
-
};
|
|
511
|
-
const uploadFile = (selectedFile) => {
|
|
512
|
-
setFile(selectedFile);
|
|
513
|
-
const uploadProgress = setInterval(() => {
|
|
514
|
-
setProgress((prev) => {
|
|
515
|
-
if (prev >= 100) {
|
|
516
|
-
clearInterval(uploadProgress);
|
|
517
|
-
return 100;
|
|
518
|
-
}
|
|
519
|
-
return prev + 10;
|
|
520
|
-
});
|
|
521
|
-
}, 100);
|
|
522
|
-
onChange(selectedFile);
|
|
523
|
-
};
|
|
524
|
-
const handleRemove = () => {
|
|
525
|
-
setFile(null);
|
|
526
|
-
setProgress(0);
|
|
527
|
-
};
|
|
528
|
-
return /* @__PURE__ */ React12.createElement(
|
|
529
|
-
"div",
|
|
530
|
-
{
|
|
531
|
-
onDrop: handleDrop,
|
|
532
|
-
onDragOver: (e) => e.preventDefault(),
|
|
533
|
-
onClick: handleClick,
|
|
534
|
-
style: {
|
|
535
|
-
background: bg,
|
|
536
|
-
color: textColor,
|
|
537
|
-
border: `2px dashed ${accent}`,
|
|
538
|
-
borderRadius: radius,
|
|
539
|
-
padding,
|
|
540
|
-
textAlign: "center",
|
|
541
|
-
cursor: "pointer"
|
|
542
|
-
}
|
|
543
|
-
},
|
|
544
|
-
/* @__PURE__ */ React12.createElement(
|
|
545
|
-
"input",
|
|
546
|
-
{
|
|
547
|
-
id: "fileInput",
|
|
548
|
-
type: "file",
|
|
549
|
-
style: { display: "none" },
|
|
550
|
-
onChange: handleFileChange
|
|
551
|
-
}
|
|
552
|
-
),
|
|
553
|
-
file ? /* @__PURE__ */ React12.createElement("div", null, /* @__PURE__ */ React12.createElement("p", null, file.name), /* @__PURE__ */ React12.createElement(
|
|
554
|
-
"button",
|
|
555
|
-
{
|
|
556
|
-
onClick: handleRemove,
|
|
557
|
-
style: {
|
|
558
|
-
background: accent,
|
|
559
|
-
color: "#fff",
|
|
560
|
-
border: "none",
|
|
561
|
-
borderRadius: radius,
|
|
562
|
-
padding: "8px 16px",
|
|
563
|
-
cursor: "pointer"
|
|
564
|
-
}
|
|
565
|
-
},
|
|
566
|
-
"Remove"
|
|
567
|
-
), /* @__PURE__ */ React12.createElement("div", { style: { background: "#e2e8f0", borderRadius: radius, overflow: "hidden", marginTop: "10px" } }, /* @__PURE__ */ React12.createElement("div", { style: { width: `${progress}%`, background: accent, height: "8px" } }))) : /* @__PURE__ */ React12.createElement("p", null, placeholder)
|
|
568
|
-
);
|
|
569
|
-
};
|
|
570
|
-
|
|
571
1
|
// src/components/Loader/Loader.jsx
|
|
572
|
-
import
|
|
2
|
+
import React, { useEffect, useState } from "react";
|
|
573
3
|
var Loader = ({
|
|
574
4
|
type = "spinner",
|
|
575
5
|
size = 48,
|
|
@@ -578,15 +8,15 @@ var Loader = ({
|
|
|
578
8
|
label = "",
|
|
579
9
|
speed = 1
|
|
580
10
|
}) => {
|
|
581
|
-
const [dots, setDots] =
|
|
582
|
-
const [progress, setProgress] =
|
|
11
|
+
const [dots, setDots] = useState(0);
|
|
12
|
+
const [progress, setProgress] = useState(0);
|
|
583
13
|
const alpha = (hex, op) => {
|
|
584
14
|
const r = parseInt(hex.slice(1, 3), 16);
|
|
585
15
|
const g = parseInt(hex.slice(3, 5), 16);
|
|
586
16
|
const b = parseInt(hex.slice(5, 7), 16);
|
|
587
17
|
return `rgba(${r},${g},${b},${op})`;
|
|
588
18
|
};
|
|
589
|
-
|
|
19
|
+
useEffect(() => {
|
|
590
20
|
if (type === "dots") {
|
|
591
21
|
const t = setInterval(() => setDots((d) => (d + 1) % 4), 400 / speed);
|
|
592
22
|
return () => clearInterval(t);
|
|
@@ -608,8 +38,8 @@ var Loader = ({
|
|
|
608
38
|
borderRadius: "16px",
|
|
609
39
|
fontFamily: "system-ui, sans-serif"
|
|
610
40
|
};
|
|
611
|
-
const labelEl = label ? /* @__PURE__ */
|
|
612
|
-
if (type === "spinner") return /* @__PURE__ */
|
|
41
|
+
const labelEl = label ? /* @__PURE__ */ React.createElement("span", { style: { fontSize: "13px", color: "rgba(255,255,255,0.45)", letterSpacing: "0.3px" } }, label) : null;
|
|
42
|
+
if (type === "spinner") return /* @__PURE__ */ React.createElement("div", { style: wrapStyle }, /* @__PURE__ */ React.createElement("svg", { width: size, height: size, viewBox: "0 0 48 48" }, /* @__PURE__ */ React.createElement(
|
|
613
43
|
"circle",
|
|
614
44
|
{
|
|
615
45
|
cx: "24",
|
|
@@ -619,7 +49,7 @@ var Loader = ({
|
|
|
619
49
|
stroke: alpha(accent, 0.15),
|
|
620
50
|
strokeWidth: "4"
|
|
621
51
|
}
|
|
622
|
-
), /* @__PURE__ */
|
|
52
|
+
), /* @__PURE__ */ React.createElement(
|
|
623
53
|
"circle",
|
|
624
54
|
{
|
|
625
55
|
cx: "24",
|
|
@@ -632,40 +62,40 @@ var Loader = ({
|
|
|
632
62
|
strokeDasharray: "31.4 94.2",
|
|
633
63
|
style: { transformOrigin: "center", animation: `spin ${dur} linear infinite` }
|
|
634
64
|
}
|
|
635
|
-
), /* @__PURE__ */
|
|
636
|
-
if (type === "pulse") return /* @__PURE__ */
|
|
65
|
+
), /* @__PURE__ */ React.createElement("style", null, `@keyframes spin { to { transform: rotate(360deg); } }`)), labelEl);
|
|
66
|
+
if (type === "pulse") return /* @__PURE__ */ React.createElement("div", { style: wrapStyle }, /* @__PURE__ */ React.createElement("div", { style: { position: "relative", width: size, height: size } }, /* @__PURE__ */ React.createElement("div", { style: {
|
|
637
67
|
position: "absolute",
|
|
638
68
|
inset: 0,
|
|
639
69
|
borderRadius: "50%",
|
|
640
70
|
background: alpha(accent, 0.2),
|
|
641
71
|
animation: `pulse ${dur} ease-out infinite`
|
|
642
|
-
} }), /* @__PURE__ */
|
|
72
|
+
} }), /* @__PURE__ */ React.createElement("div", { style: {
|
|
643
73
|
position: "absolute",
|
|
644
74
|
inset: "25%",
|
|
645
75
|
borderRadius: "50%",
|
|
646
76
|
background: accent
|
|
647
|
-
} }), /* @__PURE__ */
|
|
648
|
-
if (type === "dots") return /* @__PURE__ */
|
|
77
|
+
} }), /* @__PURE__ */ React.createElement("style", null, `@keyframes pulse { 0%{transform:scale(1);opacity:1} 100%{transform:scale(2);opacity:0} }`)), labelEl);
|
|
78
|
+
if (type === "dots") return /* @__PURE__ */ React.createElement("div", { style: wrapStyle }, /* @__PURE__ */ React.createElement("div", { style: { display: "flex", gap: "8px", alignItems: "center" } }, [0, 1, 2].map((i) => /* @__PURE__ */ React.createElement("div", { key: i, style: {
|
|
649
79
|
width: size / 5,
|
|
650
80
|
height: size / 5,
|
|
651
81
|
borderRadius: "50%",
|
|
652
82
|
background: dots === i ? accent : alpha(accent, 0.25),
|
|
653
83
|
transition: "background 0.2s"
|
|
654
84
|
} }))), labelEl);
|
|
655
|
-
if (type === "bar") return /* @__PURE__ */
|
|
85
|
+
if (type === "bar") return /* @__PURE__ */ React.createElement("div", { style: wrapStyle }, /* @__PURE__ */ React.createElement("div", { style: {
|
|
656
86
|
width: size * 3,
|
|
657
87
|
height: size / 8,
|
|
658
88
|
background: alpha(accent, 0.15),
|
|
659
89
|
borderRadius: "99px",
|
|
660
90
|
overflow: "hidden"
|
|
661
|
-
} }, /* @__PURE__ */
|
|
91
|
+
} }, /* @__PURE__ */ React.createElement("div", { style: {
|
|
662
92
|
height: "100%",
|
|
663
93
|
borderRadius: "99px",
|
|
664
94
|
background: accent,
|
|
665
95
|
width: `${progress}%`,
|
|
666
96
|
transition: "width 0.03s linear"
|
|
667
97
|
} })), labelEl);
|
|
668
|
-
if (type === "ring") return /* @__PURE__ */
|
|
98
|
+
if (type === "ring") return /* @__PURE__ */ React.createElement("div", { style: wrapStyle }, /* @__PURE__ */ React.createElement("div", { style: {
|
|
669
99
|
width: size,
|
|
670
100
|
height: size,
|
|
671
101
|
borderRadius: "50%",
|
|
@@ -673,86 +103,12 @@ var Loader = ({
|
|
|
673
103
|
borderTop: `4px solid ${accent}`,
|
|
674
104
|
borderRight: `4px solid ${accent}`,
|
|
675
105
|
animation: `spin ${dur} linear infinite`
|
|
676
|
-
} }), /* @__PURE__ */
|
|
106
|
+
} }), /* @__PURE__ */ React.createElement("style", null, `@keyframes spin { to { transform: rotate(360deg); } }`), labelEl);
|
|
677
107
|
return null;
|
|
678
108
|
};
|
|
679
109
|
|
|
680
|
-
// src/components/Avatar/Avatar.jsx
|
|
681
|
-
import React14 from "react";
|
|
682
|
-
var Avatar = ({
|
|
683
|
-
image = "https://i.pravatar.cc/150?img=32",
|
|
684
|
-
alt = "User Avatar",
|
|
685
|
-
size = "60px",
|
|
686
|
-
borderColor = "#7c3aed",
|
|
687
|
-
borderWidth = "4px",
|
|
688
|
-
radius = "50%"
|
|
689
|
-
}) => {
|
|
690
|
-
return /* @__PURE__ */ React14.createElement("div", { style: {
|
|
691
|
-
width: size,
|
|
692
|
-
height: size,
|
|
693
|
-
borderRadius: radius,
|
|
694
|
-
border: borderWidth + " solid " + borderColor,
|
|
695
|
-
overflow: "hidden",
|
|
696
|
-
display: "flex",
|
|
697
|
-
alignItems: "center",
|
|
698
|
-
justifyContent: "center",
|
|
699
|
-
background: "#f3f4f6"
|
|
700
|
-
} }, /* @__PURE__ */ React14.createElement("img", { src: image, alt, style: {
|
|
701
|
-
width: "100%",
|
|
702
|
-
height: "100%",
|
|
703
|
-
objectFit: "cover"
|
|
704
|
-
} }));
|
|
705
|
-
};
|
|
706
|
-
|
|
707
|
-
// src/components/DividerLine/DividerLine.jsx
|
|
708
|
-
import React15 from "react";
|
|
709
|
-
var DividerLine = ({
|
|
710
|
-
text = "Section",
|
|
711
|
-
textColor = "#f1f5f9",
|
|
712
|
-
lineColor = "#334155",
|
|
713
|
-
spacing = "20px",
|
|
714
|
-
thickness = "2px",
|
|
715
|
-
borderRadius = "4px"
|
|
716
|
-
}) => {
|
|
717
|
-
return /* @__PURE__ */ React15.createElement("div", { style: { display: "flex", alignItems: "center", margin: spacing } }, /* @__PURE__ */ React15.createElement("div", { style: { flex: 1, height: thickness, background: lineColor, borderRadius } }), /* @__PURE__ */ React15.createElement("span", { style: { margin: "0 12px", color: textColor, fontSize: "14px", fontWeight: "600" } }, text), /* @__PURE__ */ React15.createElement("div", { style: { flex: 1, height: thickness, background: lineColor, borderRadius } }));
|
|
718
|
-
};
|
|
719
|
-
|
|
720
|
-
// src/components/Tabs/Tabs.jsx
|
|
721
|
-
import React16, { useState as useState11 } from "react";
|
|
722
|
-
var Tabs = ({
|
|
723
|
-
tabs = [
|
|
724
|
-
{ label: "Tab 1", content: "Content for Tab 1" },
|
|
725
|
-
{ label: "Tab 2", content: "Content for Tab 2" },
|
|
726
|
-
{ label: "Tab 3", content: "Content for Tab 3" }
|
|
727
|
-
],
|
|
728
|
-
bg = "#0f172a",
|
|
729
|
-
accent = "#2563eb",
|
|
730
|
-
textColor = "#f1f5f9",
|
|
731
|
-
radius = "8px"
|
|
732
|
-
}) => {
|
|
733
|
-
const [activeTab, setActiveTab] = useState11(0);
|
|
734
|
-
return /* @__PURE__ */ React16.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__ */ React16.createElement("div", { style: { display: "flex", borderBottom: `2px solid ${accent}` } }, tabs.map((tab, index) => /* @__PURE__ */ React16.createElement(
|
|
735
|
-
"button",
|
|
736
|
-
{
|
|
737
|
-
key: index,
|
|
738
|
-
onClick: () => setActiveTab(index),
|
|
739
|
-
style: {
|
|
740
|
-
padding: "10px 20px",
|
|
741
|
-
background: activeTab === index ? accent : "transparent",
|
|
742
|
-
color: activeTab === index ? "white" : textColor,
|
|
743
|
-
border: "none",
|
|
744
|
-
borderRadius: radius,
|
|
745
|
-
cursor: "pointer",
|
|
746
|
-
fontWeight: activeTab === index ? "700" : "400",
|
|
747
|
-
transition: "background 0.3s, color 0.3s"
|
|
748
|
-
}
|
|
749
|
-
},
|
|
750
|
-
tab.label
|
|
751
|
-
))), /* @__PURE__ */ React16.createElement("div", { style: { padding: "16px", color: textColor } }, /* @__PURE__ */ React16.createElement("h4", { style: { margin: "0 0 8px", fontSize: "16px", fontWeight: "600" } }, tabs[activeTab].label), /* @__PURE__ */ React16.createElement("p", { style: { margin: "0", fontSize: "14px" } }, tabs[activeTab].content)));
|
|
752
|
-
};
|
|
753
|
-
|
|
754
110
|
// src/components/NotificationToast/NotificationToast.jsx
|
|
755
|
-
import
|
|
111
|
+
import React2, { useState as useState2, useEffect as useEffect2 } from "react";
|
|
756
112
|
var NotificationToast = ({
|
|
757
113
|
title = "New Message",
|
|
758
114
|
message = "You have a new notification from the team.",
|
|
@@ -763,8 +119,8 @@ var NotificationToast = ({
|
|
|
763
119
|
radius = "14px",
|
|
764
120
|
showProgress = true
|
|
765
121
|
}) => {
|
|
766
|
-
const [visible, setVisible] =
|
|
767
|
-
const [progress, setProgress] =
|
|
122
|
+
const [visible, setVisible] = useState2(true);
|
|
123
|
+
const [progress, setProgress] = useState2(100);
|
|
768
124
|
const typeColors = {
|
|
769
125
|
success: "#10b981",
|
|
770
126
|
error: "#ef4444",
|
|
@@ -778,7 +134,7 @@ var NotificationToast = ({
|
|
|
778
134
|
info: "M13 16h-1v-4h-1m1-4h.01M12 2a10 10 0 100 20A10 10 0 0012 2z"
|
|
779
135
|
};
|
|
780
136
|
const color = typeColors[type] || accent;
|
|
781
|
-
|
|
137
|
+
useEffect2(() => {
|
|
782
138
|
if (!showProgress) return;
|
|
783
139
|
const step = 100 / (duration / 50);
|
|
784
140
|
const timer = setInterval(() => {
|
|
@@ -794,7 +150,7 @@ var NotificationToast = ({
|
|
|
794
150
|
return () => clearInterval(timer);
|
|
795
151
|
}, [duration, showProgress]);
|
|
796
152
|
if (!visible) return null;
|
|
797
|
-
return /* @__PURE__ */
|
|
153
|
+
return /* @__PURE__ */ React2.createElement("div", { style: {
|
|
798
154
|
background: bg,
|
|
799
155
|
borderRadius: radius,
|
|
800
156
|
padding: "16px 18px",
|
|
@@ -805,7 +161,7 @@ var NotificationToast = ({
|
|
|
805
161
|
border: `1px solid rgba(255,255,255,0.08)`,
|
|
806
162
|
position: "relative",
|
|
807
163
|
overflow: "hidden"
|
|
808
|
-
} }, /* @__PURE__ */
|
|
164
|
+
} }, /* @__PURE__ */ React2.createElement("div", { style: { display: "flex", alignItems: "flex-start", gap: "12px" } }, /* @__PURE__ */ React2.createElement("div", { style: {
|
|
809
165
|
width: 36,
|
|
810
166
|
height: 36,
|
|
811
167
|
borderRadius: "10px",
|
|
@@ -815,7 +171,7 @@ var NotificationToast = ({
|
|
|
815
171
|
display: "flex",
|
|
816
172
|
alignItems: "center",
|
|
817
173
|
justifyContent: "center"
|
|
818
|
-
} }, /* @__PURE__ */
|
|
174
|
+
} }, /* @__PURE__ */ React2.createElement(
|
|
819
175
|
"svg",
|
|
820
176
|
{
|
|
821
177
|
width: "16",
|
|
@@ -827,8 +183,8 @@ var NotificationToast = ({
|
|
|
827
183
|
strokeLinecap: "round",
|
|
828
184
|
strokeLinejoin: "round"
|
|
829
185
|
},
|
|
830
|
-
/* @__PURE__ */
|
|
831
|
-
)), /* @__PURE__ */
|
|
186
|
+
/* @__PURE__ */ React2.createElement("path", { d: typeIcons[type] || typeIcons.info })
|
|
187
|
+
)), /* @__PURE__ */ React2.createElement("div", { style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React2.createElement("div", { style: { fontSize: "14px", fontWeight: "700", marginBottom: "3px" } }, title), /* @__PURE__ */ React2.createElement("div", { style: { fontSize: "12px", color: "rgba(255,255,255,0.5)", lineHeight: 1.5 } }, message)), /* @__PURE__ */ React2.createElement(
|
|
832
188
|
"button",
|
|
833
189
|
{
|
|
834
190
|
onClick: () => setVisible(false),
|
|
@@ -842,7 +198,7 @@ var NotificationToast = ({
|
|
|
842
198
|
lineHeight: 1
|
|
843
199
|
}
|
|
844
200
|
},
|
|
845
|
-
/* @__PURE__ */
|
|
201
|
+
/* @__PURE__ */ React2.createElement(
|
|
846
202
|
"svg",
|
|
847
203
|
{
|
|
848
204
|
width: "14",
|
|
@@ -853,16 +209,16 @@ var NotificationToast = ({
|
|
|
853
209
|
strokeWidth: "2.5",
|
|
854
210
|
strokeLinecap: "round"
|
|
855
211
|
},
|
|
856
|
-
/* @__PURE__ */
|
|
212
|
+
/* @__PURE__ */ React2.createElement("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
857
213
|
)
|
|
858
|
-
)), showProgress && /* @__PURE__ */
|
|
214
|
+
)), showProgress && /* @__PURE__ */ React2.createElement("div", { style: {
|
|
859
215
|
position: "absolute",
|
|
860
216
|
bottom: 0,
|
|
861
217
|
left: 0,
|
|
862
218
|
right: 0,
|
|
863
219
|
height: "3px",
|
|
864
220
|
background: "rgba(255,255,255,0.07)"
|
|
865
|
-
} }, /* @__PURE__ */
|
|
221
|
+
} }, /* @__PURE__ */ React2.createElement("div", { style: {
|
|
866
222
|
height: "100%",
|
|
867
223
|
width: `${progress}%`,
|
|
868
224
|
background: color,
|
|
@@ -872,7 +228,7 @@ var NotificationToast = ({
|
|
|
872
228
|
};
|
|
873
229
|
|
|
874
230
|
// src/components/AvatarCard/AvatarCard.jsx
|
|
875
|
-
import
|
|
231
|
+
import React3, { useState as useState3 } from "react";
|
|
876
232
|
var AvatarCard = ({
|
|
877
233
|
name = "Aryan Sharma",
|
|
878
234
|
role = "Frontend Developer",
|
|
@@ -885,7 +241,7 @@ var AvatarCard = ({
|
|
|
885
241
|
bg = "#0f172a",
|
|
886
242
|
radius = "20px"
|
|
887
243
|
}) => {
|
|
888
|
-
const [followed, setFollowed] =
|
|
244
|
+
const [followed, setFollowed] = useState3(false);
|
|
889
245
|
const alpha = (hex, op) => {
|
|
890
246
|
const r = parseInt(hex.slice(1, 3), 16);
|
|
891
247
|
const g = parseInt(hex.slice(3, 5), 16);
|
|
@@ -898,7 +254,7 @@ var AvatarCard = ({
|
|
|
898
254
|
{ label: "Following", value: following },
|
|
899
255
|
{ label: "Projects", value: projects }
|
|
900
256
|
];
|
|
901
|
-
return /* @__PURE__ */
|
|
257
|
+
return /* @__PURE__ */ React3.createElement("div", { style: {
|
|
902
258
|
background: bg,
|
|
903
259
|
borderRadius: radius,
|
|
904
260
|
padding: "24px 20px",
|
|
@@ -909,14 +265,14 @@ var AvatarCard = ({
|
|
|
909
265
|
border: "1px solid rgba(255,255,255,0.08)",
|
|
910
266
|
position: "relative",
|
|
911
267
|
overflow: "hidden"
|
|
912
|
-
} }, /* @__PURE__ */
|
|
268
|
+
} }, /* @__PURE__ */ React3.createElement("div", { style: {
|
|
913
269
|
position: "absolute",
|
|
914
270
|
top: 0,
|
|
915
271
|
left: 0,
|
|
916
272
|
right: 0,
|
|
917
273
|
height: "3px",
|
|
918
274
|
background: `linear-gradient(90deg, ${accent}, ${alpha(accent, 0.3)})`
|
|
919
|
-
} }), /* @__PURE__ */
|
|
275
|
+
} }), /* @__PURE__ */ React3.createElement("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", marginBottom: "16px" } }, /* @__PURE__ */ React3.createElement("div", { style: {
|
|
920
276
|
width: 72,
|
|
921
277
|
height: 72,
|
|
922
278
|
borderRadius: "50%",
|
|
@@ -929,7 +285,7 @@ var AvatarCard = ({
|
|
|
929
285
|
color: "#fff",
|
|
930
286
|
border: `3px solid ${alpha(accent, 0.4)}`,
|
|
931
287
|
marginBottom: "12px"
|
|
932
|
-
} }, !avatar && initials), /* @__PURE__ */
|
|
288
|
+
} }, !avatar && initials), /* @__PURE__ */ React3.createElement("div", { style: { fontSize: "16px", fontWeight: "700", marginBottom: "3px" } }, name), /* @__PURE__ */ React3.createElement("div", { style: {
|
|
933
289
|
fontSize: "12px",
|
|
934
290
|
fontWeight: "600",
|
|
935
291
|
color: accent,
|
|
@@ -937,14 +293,14 @@ var AvatarCard = ({
|
|
|
937
293
|
padding: "2px 10px",
|
|
938
294
|
borderRadius: "20px",
|
|
939
295
|
border: `1px solid ${alpha(accent, 0.3)}`
|
|
940
|
-
} }, role)), /* @__PURE__ */
|
|
296
|
+
} }, role)), /* @__PURE__ */ React3.createElement("p", { style: {
|
|
941
297
|
fontSize: "12px",
|
|
942
298
|
color: "rgba(255,255,255,0.45)",
|
|
943
299
|
textAlign: "center",
|
|
944
300
|
lineHeight: 1.6,
|
|
945
301
|
marginBottom: "18px",
|
|
946
302
|
padding: "0 4px"
|
|
947
|
-
} }, bio), /* @__PURE__ */
|
|
303
|
+
} }, bio), /* @__PURE__ */ React3.createElement("div", { style: {
|
|
948
304
|
display: "flex",
|
|
949
305
|
justifyContent: "space-around",
|
|
950
306
|
background: "rgba(255,255,255,0.04)",
|
|
@@ -952,11 +308,11 @@ var AvatarCard = ({
|
|
|
952
308
|
borderRadius: "12px",
|
|
953
309
|
padding: "12px 8px",
|
|
954
310
|
marginBottom: "16px"
|
|
955
|
-
} }, stats.map((s) => /* @__PURE__ */
|
|
311
|
+
} }, stats.map((s) => /* @__PURE__ */ React3.createElement("div", { key: s.label, style: { textAlign: "center" } }, /* @__PURE__ */ React3.createElement("div", { style: { fontSize: "18px", fontWeight: "800" } }, s.value >= 1e3 ? (s.value / 1e3).toFixed(1) + "k" : s.value), /* @__PURE__ */ React3.createElement("div", { style: { fontSize: "10px", color: "rgba(255,255,255,0.4)", marginTop: "2px" } }, s.label)))));
|
|
956
312
|
};
|
|
957
313
|
|
|
958
314
|
// src/components/PricingCard/PricingCard.jsx
|
|
959
|
-
import
|
|
315
|
+
import React4 from "react";
|
|
960
316
|
var PricingCard = ({
|
|
961
317
|
planName = "Pro Plan",
|
|
962
318
|
description = "For teams that need more power.",
|
|
@@ -984,7 +340,7 @@ var PricingCard = ({
|
|
|
984
340
|
const b = parseInt(hex.slice(5, 7), 16);
|
|
985
341
|
return `rgba(${r},${g},${b},${op})`;
|
|
986
342
|
};
|
|
987
|
-
return /* @__PURE__ */
|
|
343
|
+
return /* @__PURE__ */ React4.createElement("div", { style: {
|
|
988
344
|
background: bg,
|
|
989
345
|
borderRadius: radius,
|
|
990
346
|
padding: "28px 24px",
|
|
@@ -995,14 +351,14 @@ var PricingCard = ({
|
|
|
995
351
|
border: `1px solid ${alpha(accent, 0.25)}`,
|
|
996
352
|
position: "relative",
|
|
997
353
|
overflow: "hidden"
|
|
998
|
-
} }, /* @__PURE__ */
|
|
354
|
+
} }, /* @__PURE__ */ React4.createElement("div", { style: {
|
|
999
355
|
position: "absolute",
|
|
1000
356
|
top: 0,
|
|
1001
357
|
left: 0,
|
|
1002
358
|
right: 0,
|
|
1003
359
|
height: "3px",
|
|
1004
360
|
background: `linear-gradient(90deg, ${accent}, ${alpha(accent, 0.3)})`
|
|
1005
|
-
} }), badgeText && /* @__PURE__ */
|
|
361
|
+
} }), badgeText && /* @__PURE__ */ React4.createElement("div", { style: {
|
|
1006
362
|
display: "inline-flex",
|
|
1007
363
|
alignItems: "center",
|
|
1008
364
|
gap: "6px",
|
|
@@ -1016,7 +372,7 @@ var PricingCard = ({
|
|
|
1016
372
|
color: accent,
|
|
1017
373
|
letterSpacing: "0.5px",
|
|
1018
374
|
textTransform: "uppercase"
|
|
1019
|
-
} }, /* @__PURE__ */
|
|
375
|
+
} }, /* @__PURE__ */ React4.createElement("div", { style: { width: 6, height: 6, borderRadius: "50%", background: accent } }), badgeText), /* @__PURE__ */ React4.createElement("div", { style: { fontSize: "20px", fontWeight: "800", marginBottom: "4px" } }, planName), /* @__PURE__ */ React4.createElement("div", { style: { fontSize: "13px", color: "rgba(255,255,255,0.45)", marginBottom: "20px", lineHeight: 1.5 } }, description), /* @__PURE__ */ React4.createElement("div", { style: { display: "flex", alignItems: "flex-end", gap: "3px", marginBottom: "4px" } }, /* @__PURE__ */ React4.createElement("span", { style: { fontSize: "18px", fontWeight: "700", color: "rgba(255,255,255,0.5)", lineHeight: 2 } }, currency), /* @__PURE__ */ React4.createElement("span", { style: { fontSize: "52px", fontWeight: "800", color: "#fff", lineHeight: 1 } }, Math.round(price))), /* @__PURE__ */ React4.createElement("div", { style: { fontSize: "12px", color: "rgba(255,255,255,0.35)", marginBottom: "20px" } }, period), /* @__PURE__ */ React4.createElement("div", { style: { height: "1px", background: "rgba(255,255,255,0.07)", marginBottom: "16px" } }), /* @__PURE__ */ React4.createElement("ul", { style: { listStyle: "none", padding: 0, margin: "0 0 22px", display: "flex", flexDirection: "column", gap: "10px" } }, features.map((f, i) => /* @__PURE__ */ React4.createElement("li", { key: i, style: { display: "flex", alignItems: "center", gap: "10px", fontSize: "13px", color: "rgba(255,255,255,0.75)" } }, /* @__PURE__ */ React4.createElement("div", { style: {
|
|
1020
376
|
width: "18px",
|
|
1021
377
|
height: "18px",
|
|
1022
378
|
borderRadius: "50%",
|
|
@@ -1026,7 +382,7 @@ var PricingCard = ({
|
|
|
1026
382
|
justifyContent: "center",
|
|
1027
383
|
background: alpha(accent, 0.18),
|
|
1028
384
|
border: `1px solid ${alpha(accent, 0.4)}`
|
|
1029
|
-
} }, /* @__PURE__ */
|
|
385
|
+
} }, /* @__PURE__ */ React4.createElement(
|
|
1030
386
|
"svg",
|
|
1031
387
|
{
|
|
1032
388
|
width: "10",
|
|
@@ -1038,8 +394,8 @@ var PricingCard = ({
|
|
|
1038
394
|
strokeLinecap: "round",
|
|
1039
395
|
strokeLinejoin: "round"
|
|
1040
396
|
},
|
|
1041
|
-
/* @__PURE__ */
|
|
1042
|
-
)), f))), /* @__PURE__ */
|
|
397
|
+
/* @__PURE__ */ React4.createElement("polyline", { points: "1.5,6 4.5,9 10.5,3" })
|
|
398
|
+
)), f))), /* @__PURE__ */ React4.createElement(
|
|
1043
399
|
"button",
|
|
1044
400
|
{
|
|
1045
401
|
onClick: onCtaClick,
|
|
@@ -1064,7 +420,7 @@ var PricingCard = ({
|
|
|
1064
420
|
};
|
|
1065
421
|
|
|
1066
422
|
// src/components/Navbar/Navbar.jsx
|
|
1067
|
-
import
|
|
423
|
+
import React5, { useState as useState4, useEffect as useEffect3 } from "react";
|
|
1068
424
|
var Navbar = ({
|
|
1069
425
|
logo = "VirtualAI",
|
|
1070
426
|
links = ["Home", "Features", "Pricing", "Blog"],
|
|
@@ -1076,28 +432,28 @@ var Navbar = ({
|
|
|
1076
432
|
onLinkClick = () => {
|
|
1077
433
|
}
|
|
1078
434
|
}) => {
|
|
1079
|
-
const [scrolled, setScrolled] =
|
|
1080
|
-
const [menuOpen, setMenuOpen] =
|
|
1081
|
-
const [active, setActive] =
|
|
1082
|
-
const [isMobile, setIsMobile] =
|
|
435
|
+
const [scrolled, setScrolled] = useState4(false);
|
|
436
|
+
const [menuOpen, setMenuOpen] = useState4(false);
|
|
437
|
+
const [active, setActive] = useState4("Home");
|
|
438
|
+
const [isMobile, setIsMobile] = useState4(false);
|
|
1083
439
|
const alpha = (hex, op) => {
|
|
1084
440
|
const r = parseInt(hex.slice(1, 3), 16);
|
|
1085
441
|
const g = parseInt(hex.slice(3, 5), 16);
|
|
1086
442
|
const b = parseInt(hex.slice(5, 7), 16);
|
|
1087
443
|
return `rgba(${r},${g},${b},${op})`;
|
|
1088
444
|
};
|
|
1089
|
-
|
|
445
|
+
useEffect3(() => {
|
|
1090
446
|
const checkMobile = () => setIsMobile(window.innerWidth < 768);
|
|
1091
447
|
checkMobile();
|
|
1092
448
|
window.addEventListener("resize", checkMobile);
|
|
1093
449
|
return () => window.removeEventListener("resize", checkMobile);
|
|
1094
450
|
}, []);
|
|
1095
|
-
|
|
451
|
+
useEffect3(() => {
|
|
1096
452
|
const handler = () => setScrolled(window.scrollY > 10);
|
|
1097
453
|
window.addEventListener("scroll", handler);
|
|
1098
454
|
return () => window.removeEventListener("scroll", handler);
|
|
1099
455
|
}, []);
|
|
1100
|
-
|
|
456
|
+
useEffect3(() => {
|
|
1101
457
|
if (!isMobile) setMenuOpen(false);
|
|
1102
458
|
}, [isMobile]);
|
|
1103
459
|
const handleLink = (link) => {
|
|
@@ -1105,7 +461,7 @@ var Navbar = ({
|
|
|
1105
461
|
setMenuOpen(false);
|
|
1106
462
|
onLinkClick(link);
|
|
1107
463
|
};
|
|
1108
|
-
return /* @__PURE__ */
|
|
464
|
+
return /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement("style", null, `
|
|
1109
465
|
@keyframes nbSlideDown {
|
|
1110
466
|
from { opacity: 0; transform: translateY(-8px); }
|
|
1111
467
|
to { opacity: 1; transform: translateY(0); }
|
|
@@ -1114,7 +470,7 @@ var Navbar = ({
|
|
|
1114
470
|
.nb-cta:hover { opacity: 0.85 !important; }
|
|
1115
471
|
.nb-ham:hover { background: rgba(255,255,255,0.1) !important; }
|
|
1116
472
|
.nb-mlink:hover { background: rgba(255,255,255,0.06) !important; }
|
|
1117
|
-
`), /* @__PURE__ */
|
|
473
|
+
`), /* @__PURE__ */ React5.createElement("nav", { style: {
|
|
1118
474
|
position: "sticky",
|
|
1119
475
|
top: 0,
|
|
1120
476
|
left: 0,
|
|
@@ -1128,7 +484,7 @@ var Navbar = ({
|
|
|
1128
484
|
fontFamily: "system-ui, -apple-system, sans-serif",
|
|
1129
485
|
width: "100%",
|
|
1130
486
|
boxSizing: "border-box"
|
|
1131
|
-
} }, /* @__PURE__ */
|
|
487
|
+
} }, /* @__PURE__ */ React5.createElement("div", { style: {
|
|
1132
488
|
maxWidth: "1200px",
|
|
1133
489
|
margin: "0 auto",
|
|
1134
490
|
padding: "0 20px",
|
|
@@ -1138,7 +494,7 @@ var Navbar = ({
|
|
|
1138
494
|
justifyContent: "space-between",
|
|
1139
495
|
gap: "16px",
|
|
1140
496
|
boxSizing: "border-box"
|
|
1141
|
-
} }, /* @__PURE__ */
|
|
497
|
+
} }, /* @__PURE__ */ React5.createElement("div", { style: { display: "flex", alignItems: "center", gap: "8px", cursor: "pointer", flexShrink: 0 } }, /* @__PURE__ */ React5.createElement("div", { style: {
|
|
1142
498
|
width: isMobile ? "26px" : "30px",
|
|
1143
499
|
height: isMobile ? "26px" : "30px",
|
|
1144
500
|
borderRadius: "8px",
|
|
@@ -1150,12 +506,12 @@ var Navbar = ({
|
|
|
1150
506
|
fontWeight: "800",
|
|
1151
507
|
color: "#fff",
|
|
1152
508
|
flexShrink: 0
|
|
1153
|
-
} }, logo[0]), /* @__PURE__ */
|
|
509
|
+
} }, logo[0]), /* @__PURE__ */ React5.createElement("span", { style: {
|
|
1154
510
|
fontSize: isMobile ? "14px" : "16px",
|
|
1155
511
|
fontWeight: "800",
|
|
1156
512
|
color: "#fff",
|
|
1157
513
|
letterSpacing: "-0.3px"
|
|
1158
|
-
} }, logo)), !isMobile && /* @__PURE__ */
|
|
514
|
+
} }, logo)), !isMobile && /* @__PURE__ */ React5.createElement("div", { style: { display: "flex", alignItems: "center", gap: "2px", flex: 1, justifyContent: "center" } }, links.map((link) => /* @__PURE__ */ React5.createElement(
|
|
1159
515
|
"button",
|
|
1160
516
|
{
|
|
1161
517
|
key: link,
|
|
@@ -1176,7 +532,7 @@ var Navbar = ({
|
|
|
1176
532
|
}
|
|
1177
533
|
},
|
|
1178
534
|
link
|
|
1179
|
-
))), /* @__PURE__ */
|
|
535
|
+
))), /* @__PURE__ */ React5.createElement("div", { style: { display: "flex", alignItems: "center", gap: "8px", flexShrink: 0 } }, /* @__PURE__ */ React5.createElement(
|
|
1180
536
|
"button",
|
|
1181
537
|
{
|
|
1182
538
|
className: "nb-cta",
|
|
@@ -1196,7 +552,7 @@ var Navbar = ({
|
|
|
1196
552
|
}
|
|
1197
553
|
},
|
|
1198
554
|
ctaText
|
|
1199
|
-
), isMobile && /* @__PURE__ */
|
|
555
|
+
), isMobile && /* @__PURE__ */ React5.createElement(
|
|
1200
556
|
"button",
|
|
1201
557
|
{
|
|
1202
558
|
className: "nb-ham",
|
|
@@ -1218,7 +574,7 @@ var Navbar = ({
|
|
|
1218
574
|
padding: 0
|
|
1219
575
|
}
|
|
1220
576
|
},
|
|
1221
|
-
/* @__PURE__ */
|
|
577
|
+
/* @__PURE__ */ React5.createElement("div", { style: {
|
|
1222
578
|
width: "16px",
|
|
1223
579
|
height: "1.5px",
|
|
1224
580
|
background: "rgba(255,255,255,0.7)",
|
|
@@ -1226,7 +582,7 @@ var Navbar = ({
|
|
|
1226
582
|
transform: menuOpen ? "rotate(45deg) translate(4px, 4px)" : "none",
|
|
1227
583
|
transition: "transform 0.25s"
|
|
1228
584
|
} }),
|
|
1229
|
-
/* @__PURE__ */
|
|
585
|
+
/* @__PURE__ */ React5.createElement("div", { style: {
|
|
1230
586
|
width: "16px",
|
|
1231
587
|
height: "1.5px",
|
|
1232
588
|
background: "rgba(255,255,255,0.7)",
|
|
@@ -1234,7 +590,7 @@ var Navbar = ({
|
|
|
1234
590
|
opacity: menuOpen ? 0 : 1,
|
|
1235
591
|
transition: "opacity 0.2s"
|
|
1236
592
|
} }),
|
|
1237
|
-
/* @__PURE__ */
|
|
593
|
+
/* @__PURE__ */ React5.createElement("div", { style: {
|
|
1238
594
|
width: "16px",
|
|
1239
595
|
height: "1.5px",
|
|
1240
596
|
background: "rgba(255,255,255,0.7)",
|
|
@@ -1242,7 +598,7 @@ var Navbar = ({
|
|
|
1242
598
|
transform: menuOpen ? "rotate(-45deg) translate(4px, -4px)" : "none",
|
|
1243
599
|
transition: "transform 0.25s"
|
|
1244
600
|
} })
|
|
1245
|
-
))), isMobile && menuOpen && /* @__PURE__ */
|
|
601
|
+
))), isMobile && menuOpen && /* @__PURE__ */ React5.createElement("div", { style: {
|
|
1246
602
|
animation: "nbSlideDown 0.2s ease",
|
|
1247
603
|
borderTop: "1px solid rgba(255,255,255,0.06)",
|
|
1248
604
|
padding: "10px 16px 16px",
|
|
@@ -1250,7 +606,7 @@ var Navbar = ({
|
|
|
1250
606
|
flexDirection: "column",
|
|
1251
607
|
gap: "3px",
|
|
1252
608
|
background: alpha(bg, 0.98)
|
|
1253
|
-
} }, links.map((link) => /* @__PURE__ */
|
|
609
|
+
} }, links.map((link) => /* @__PURE__ */ React5.createElement(
|
|
1254
610
|
"button",
|
|
1255
611
|
{
|
|
1256
612
|
key: link,
|
|
@@ -1275,7 +631,7 @@ var Navbar = ({
|
|
|
1275
631
|
}
|
|
1276
632
|
},
|
|
1277
633
|
link,
|
|
1278
|
-
active === link && /* @__PURE__ */
|
|
634
|
+
active === link && /* @__PURE__ */ React5.createElement(
|
|
1279
635
|
"svg",
|
|
1280
636
|
{
|
|
1281
637
|
width: "14",
|
|
@@ -1286,9 +642,9 @@ var Navbar = ({
|
|
|
1286
642
|
strokeWidth: "2.5",
|
|
1287
643
|
strokeLinecap: "round"
|
|
1288
644
|
},
|
|
1289
|
-
/* @__PURE__ */
|
|
645
|
+
/* @__PURE__ */ React5.createElement("polyline", { points: "9 18 15 12 9 6" })
|
|
1290
646
|
)
|
|
1291
|
-
)), /* @__PURE__ */
|
|
647
|
+
)), /* @__PURE__ */ React5.createElement("div", { style: { height: "1px", background: "rgba(255,255,255,0.07)", margin: "8px 0" } }), /* @__PURE__ */ React5.createElement(
|
|
1292
648
|
"button",
|
|
1293
649
|
{
|
|
1294
650
|
onClick: () => {
|
|
@@ -1313,7 +669,7 @@ var Navbar = ({
|
|
|
1313
669
|
};
|
|
1314
670
|
|
|
1315
671
|
// src/components/Footer/Footer.jsx
|
|
1316
|
-
import
|
|
672
|
+
import React6 from "react";
|
|
1317
673
|
var Footer = ({
|
|
1318
674
|
logo = "VirtualAI",
|
|
1319
675
|
links = ["Home", "Features", "Pricing", "Blog", "Contact"],
|
|
@@ -1321,21 +677,21 @@ var Footer = ({
|
|
|
1321
677
|
accent = "#6366f1",
|
|
1322
678
|
bg = "#0f172a"
|
|
1323
679
|
}) => {
|
|
1324
|
-
return /* @__PURE__ */
|
|
680
|
+
return /* @__PURE__ */ React6.createElement("footer", { style: {
|
|
1325
681
|
background: bg,
|
|
1326
682
|
borderTop: "1px solid rgba(255,255,255,0.06)",
|
|
1327
683
|
fontFamily: "system-ui, sans-serif",
|
|
1328
684
|
width: "100%",
|
|
1329
685
|
boxSizing: "border-box",
|
|
1330
686
|
padding: "28px 24px"
|
|
1331
|
-
} }, /* @__PURE__ */
|
|
687
|
+
} }, /* @__PURE__ */ React6.createElement("div", { style: {
|
|
1332
688
|
maxWidth: "900px",
|
|
1333
689
|
margin: "0 auto",
|
|
1334
690
|
display: "flex",
|
|
1335
691
|
flexDirection: "column",
|
|
1336
692
|
alignItems: "center",
|
|
1337
693
|
gap: "20px"
|
|
1338
|
-
} }, /* @__PURE__ */
|
|
694
|
+
} }, /* @__PURE__ */ React6.createElement("div", { style: { display: "flex", alignItems: "center", gap: "8px" } }, /* @__PURE__ */ React6.createElement("div", { style: {
|
|
1339
695
|
width: "26px",
|
|
1340
696
|
height: "26px",
|
|
1341
697
|
borderRadius: "7px",
|
|
@@ -1346,7 +702,7 @@ var Footer = ({
|
|
|
1346
702
|
fontSize: "12px",
|
|
1347
703
|
fontWeight: "800",
|
|
1348
704
|
color: "#fff"
|
|
1349
|
-
} }, logo[0]), /* @__PURE__ */
|
|
705
|
+
} }, logo[0]), /* @__PURE__ */ React6.createElement("span", { style: { fontSize: "15px", fontWeight: "800", color: "#fff" } }, logo)), /* @__PURE__ */ React6.createElement("div", { style: { display: "flex", flexWrap: "wrap", justifyContent: "center", gap: "4px" } }, links.map((link) => /* @__PURE__ */ React6.createElement(
|
|
1350
706
|
"a",
|
|
1351
707
|
{
|
|
1352
708
|
key: link,
|
|
@@ -1363,11 +719,11 @@ var Footer = ({
|
|
|
1363
719
|
onMouseLeave: (e) => e.currentTarget.style.color = "rgba(255,255,255,0.4)"
|
|
1364
720
|
},
|
|
1365
721
|
link
|
|
1366
|
-
))), /* @__PURE__ */
|
|
722
|
+
))), /* @__PURE__ */ React6.createElement("div", { style: { width: "100%", height: "1px", background: "rgba(255,255,255,0.06)" } }), /* @__PURE__ */ React6.createElement("p", { style: { fontSize: "12px", color: "rgba(255,255,255,0.22)", margin: 0 } }, "\xA9 ", (/* @__PURE__ */ new Date()).getFullYear(), " ", copyright, ". All rights reserved.")));
|
|
1367
723
|
};
|
|
1368
724
|
|
|
1369
725
|
// src/components/Sidebar/Sidebar.jsx
|
|
1370
|
-
import
|
|
726
|
+
import React7, { useState as useState5 } from "react";
|
|
1371
727
|
var Sidebar = ({
|
|
1372
728
|
logo = "VirtualAI",
|
|
1373
729
|
accent = "#6366f1",
|
|
@@ -1376,27 +732,27 @@ var Sidebar = ({
|
|
|
1376
732
|
{
|
|
1377
733
|
label: "Dashboard",
|
|
1378
734
|
icon: "M3 3h7v7H3zM14 3h7v7h-7zM3 14h7v7H3zM14 14h7v7h-7z",
|
|
1379
|
-
component: /* @__PURE__ */
|
|
735
|
+
component: /* @__PURE__ */ React7.createElement("div", { style: { padding: "24px" } }, /* @__PURE__ */ React7.createElement("h2", { style: { color: "#fff", fontSize: "20px", fontWeight: "700", marginBottom: "8px" } }, "Dashboard"), /* @__PURE__ */ React7.createElement("p", { style: { color: "rgba(255,255,255,0.4)", fontSize: "14px" } }, "Welcome to your dashboard overview."))
|
|
1380
736
|
},
|
|
1381
737
|
{
|
|
1382
738
|
label: "Analytics",
|
|
1383
739
|
icon: "M18 20V10M12 20V4M6 20v-6",
|
|
1384
|
-
component: /* @__PURE__ */
|
|
740
|
+
component: /* @__PURE__ */ React7.createElement("div", { style: { padding: "24px" } }, /* @__PURE__ */ React7.createElement("h2", { style: { color: "#fff", fontSize: "20px", fontWeight: "700", marginBottom: "8px" } }, "Analytics"), /* @__PURE__ */ React7.createElement("p", { style: { color: "rgba(255,255,255,0.4)", fontSize: "14px" } }, "View your stats and performance here."))
|
|
1385
741
|
},
|
|
1386
742
|
{
|
|
1387
743
|
label: "Users",
|
|
1388
744
|
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",
|
|
1389
|
-
component: /* @__PURE__ */
|
|
745
|
+
component: /* @__PURE__ */ React7.createElement("div", { style: { padding: "24px" } }, /* @__PURE__ */ React7.createElement("h2", { style: { color: "#fff", fontSize: "20px", fontWeight: "700", marginBottom: "8px" } }, "Users"), /* @__PURE__ */ React7.createElement("p", { style: { color: "rgba(255,255,255,0.4)", fontSize: "14px" } }, "Manage your users and permissions."))
|
|
1390
746
|
},
|
|
1391
747
|
{
|
|
1392
748
|
label: "Settings",
|
|
1393
749
|
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",
|
|
1394
|
-
component: /* @__PURE__ */
|
|
750
|
+
component: /* @__PURE__ */ React7.createElement("div", { style: { padding: "24px" } }, /* @__PURE__ */ React7.createElement("h2", { style: { color: "#fff", fontSize: "20px", fontWeight: "700", marginBottom: "8px" } }, "Settings"), /* @__PURE__ */ React7.createElement("p", { style: { color: "rgba(255,255,255,0.4)", fontSize: "14px" } }, "Configure your preferences here."))
|
|
1395
751
|
}
|
|
1396
752
|
]
|
|
1397
753
|
}) => {
|
|
1398
|
-
const [active, setActive] =
|
|
1399
|
-
const [collapsed, setCollapsed] =
|
|
754
|
+
const [active, setActive] = useState5(0);
|
|
755
|
+
const [collapsed, setCollapsed] = useState5(false);
|
|
1400
756
|
const alpha = (hex, op) => {
|
|
1401
757
|
const r = parseInt(hex.slice(1, 3), 16);
|
|
1402
758
|
const g = parseInt(hex.slice(3, 5), 16);
|
|
@@ -1404,14 +760,14 @@ var Sidebar = ({
|
|
|
1404
760
|
return `rgba(${r},${g},${b},${op})`;
|
|
1405
761
|
};
|
|
1406
762
|
const activeItem = items[active];
|
|
1407
|
-
return /* @__PURE__ */
|
|
763
|
+
return /* @__PURE__ */ React7.createElement("div", { style: {
|
|
1408
764
|
display: "flex",
|
|
1409
765
|
height: "480px",
|
|
1410
766
|
fontFamily: "system-ui, sans-serif",
|
|
1411
767
|
borderRadius: "16px",
|
|
1412
768
|
overflow: "hidden",
|
|
1413
769
|
border: "1px solid rgba(255,255,255,0.07)"
|
|
1414
|
-
} }, /* @__PURE__ */
|
|
770
|
+
} }, /* @__PURE__ */ React7.createElement("div", { style: {
|
|
1415
771
|
width: collapsed ? "60px" : "200px",
|
|
1416
772
|
background: bg,
|
|
1417
773
|
borderRight: "1px solid rgba(255,255,255,0.06)",
|
|
@@ -1420,7 +776,7 @@ var Sidebar = ({
|
|
|
1420
776
|
transition: "width 0.25s ease",
|
|
1421
777
|
flexShrink: 0,
|
|
1422
778
|
overflow: "hidden"
|
|
1423
|
-
} }, /* @__PURE__ */
|
|
779
|
+
} }, /* @__PURE__ */ React7.createElement("div", { style: {
|
|
1424
780
|
height: "56px",
|
|
1425
781
|
display: "flex",
|
|
1426
782
|
alignItems: "center",
|
|
@@ -1429,7 +785,7 @@ var Sidebar = ({
|
|
|
1429
785
|
borderBottom: "1px solid rgba(255,255,255,0.05)",
|
|
1430
786
|
overflow: "hidden",
|
|
1431
787
|
flexShrink: 0
|
|
1432
|
-
} }, /* @__PURE__ */
|
|
788
|
+
} }, /* @__PURE__ */ React7.createElement("div", { style: {
|
|
1433
789
|
width: "28px",
|
|
1434
790
|
height: "28px",
|
|
1435
791
|
borderRadius: "8px",
|
|
@@ -1441,7 +797,7 @@ var Sidebar = ({
|
|
|
1441
797
|
fontSize: "13px",
|
|
1442
798
|
fontWeight: "800",
|
|
1443
799
|
color: "#fff"
|
|
1444
|
-
} }, logo[0]), !collapsed && /* @__PURE__ */
|
|
800
|
+
} }, logo[0]), !collapsed && /* @__PURE__ */ React7.createElement("span", { style: { fontSize: "14px", fontWeight: "800", color: "#fff", whiteSpace: "nowrap" } }, logo)), /* @__PURE__ */ React7.createElement("nav", { style: { flex: 1, padding: "10px 8px", display: "flex", flexDirection: "column", gap: "3px", overflowY: "auto" } }, items.map((item, i) => /* @__PURE__ */ React7.createElement(
|
|
1445
801
|
"button",
|
|
1446
802
|
{
|
|
1447
803
|
key: i,
|
|
@@ -1476,7 +832,7 @@ var Sidebar = ({
|
|
|
1476
832
|
}
|
|
1477
833
|
}
|
|
1478
834
|
},
|
|
1479
|
-
/* @__PURE__ */
|
|
835
|
+
/* @__PURE__ */ React7.createElement(
|
|
1480
836
|
"svg",
|
|
1481
837
|
{
|
|
1482
838
|
width: "16",
|
|
@@ -1489,10 +845,10 @@ var Sidebar = ({
|
|
|
1489
845
|
strokeLinejoin: "round",
|
|
1490
846
|
style: { flexShrink: 0 }
|
|
1491
847
|
},
|
|
1492
|
-
/* @__PURE__ */
|
|
848
|
+
/* @__PURE__ */ React7.createElement("path", { d: item.icon })
|
|
1493
849
|
),
|
|
1494
|
-
!collapsed && /* @__PURE__ */
|
|
1495
|
-
))), /* @__PURE__ */
|
|
850
|
+
!collapsed && /* @__PURE__ */ React7.createElement("span", { style: { fontSize: "13px", fontWeight: active === i ? "700" : "500", whiteSpace: "nowrap" } }, item.label)
|
|
851
|
+
))), /* @__PURE__ */ React7.createElement("div", { style: { padding: "8px", borderTop: "1px solid rgba(255,255,255,0.05)" } }, /* @__PURE__ */ React7.createElement(
|
|
1496
852
|
"button",
|
|
1497
853
|
{
|
|
1498
854
|
onClick: () => setCollapsed((c) => !c),
|
|
@@ -1512,7 +868,7 @@ var Sidebar = ({
|
|
|
1512
868
|
onMouseEnter: (e) => e.currentTarget.style.color = "rgba(255,255,255,0.7)",
|
|
1513
869
|
onMouseLeave: (e) => e.currentTarget.style.color = "rgba(255,255,255,0.3)"
|
|
1514
870
|
},
|
|
1515
|
-
/* @__PURE__ */
|
|
871
|
+
/* @__PURE__ */ React7.createElement(
|
|
1516
872
|
"svg",
|
|
1517
873
|
{
|
|
1518
874
|
width: "15",
|
|
@@ -1523,29 +879,29 @@ var Sidebar = ({
|
|
|
1523
879
|
strokeWidth: "2",
|
|
1524
880
|
strokeLinecap: "round"
|
|
1525
881
|
},
|
|
1526
|
-
/* @__PURE__ */
|
|
882
|
+
/* @__PURE__ */ React7.createElement("path", { d: collapsed ? "M9 18l6-6-6-6" : "M15 18l-6-6 6-6" })
|
|
1527
883
|
)
|
|
1528
|
-
))), /* @__PURE__ */
|
|
884
|
+
))), /* @__PURE__ */ React7.createElement("div", { style: {
|
|
1529
885
|
flex: 1,
|
|
1530
886
|
background: "rgba(255,255,255,0.02)",
|
|
1531
887
|
overflow: "auto"
|
|
1532
|
-
} }, /* @__PURE__ */
|
|
888
|
+
} }, /* @__PURE__ */ React7.createElement("div", { style: {
|
|
1533
889
|
height: "56px",
|
|
1534
890
|
display: "flex",
|
|
1535
891
|
alignItems: "center",
|
|
1536
892
|
padding: "0 20px",
|
|
1537
893
|
borderBottom: "1px solid rgba(255,255,255,0.05)",
|
|
1538
894
|
gap: "10px"
|
|
1539
|
-
} }, /* @__PURE__ */
|
|
895
|
+
} }, /* @__PURE__ */ React7.createElement("div", { style: {
|
|
1540
896
|
width: "6px",
|
|
1541
897
|
height: "6px",
|
|
1542
898
|
borderRadius: "50%",
|
|
1543
899
|
background: accent
|
|
1544
|
-
} }), /* @__PURE__ */
|
|
900
|
+
} }), /* @__PURE__ */ React7.createElement("span", { style: { fontSize: "14px", fontWeight: "700", color: "#fff" } }, activeItem == null ? void 0 : activeItem.label)), /* @__PURE__ */ React7.createElement("div", { style: { color: "#fff" } }, activeItem == null ? void 0 : activeItem.component)));
|
|
1545
901
|
};
|
|
1546
902
|
|
|
1547
903
|
// src/components/Charts/Charts.jsx
|
|
1548
|
-
import
|
|
904
|
+
import React8, { useState as useState6 } from "react";
|
|
1549
905
|
var Charts = ({
|
|
1550
906
|
type = "bar",
|
|
1551
907
|
data = [
|
|
@@ -1565,7 +921,7 @@ var Charts = ({
|
|
|
1565
921
|
showGrid = true,
|
|
1566
922
|
showValues = true
|
|
1567
923
|
}) => {
|
|
1568
|
-
const [hovered, setHovered] =
|
|
924
|
+
const [hovered, setHovered] = useState6(null);
|
|
1569
925
|
const alpha = (hex, op) => {
|
|
1570
926
|
const r = parseInt(hex.slice(1, 3), 16);
|
|
1571
927
|
const g = parseInt(hex.slice(3, 5), 16);
|
|
@@ -1592,7 +948,7 @@ var Charts = ({
|
|
|
1592
948
|
}));
|
|
1593
949
|
const BarChart = () => {
|
|
1594
950
|
const barW = Math.min(28, chartW / data.length * 0.55);
|
|
1595
|
-
return /* @__PURE__ */
|
|
951
|
+
return /* @__PURE__ */ React8.createElement("svg", { width: "100%", viewBox: `0 0 ${W} ${H}` }, showGrid && gridLines.map((g, i) => /* @__PURE__ */ React8.createElement("g", { key: i }, /* @__PURE__ */ React8.createElement(
|
|
1596
952
|
"line",
|
|
1597
953
|
{
|
|
1598
954
|
x1: padL,
|
|
@@ -1602,7 +958,7 @@ var Charts = ({
|
|
|
1602
958
|
stroke: "rgba(255,255,255,0.05)",
|
|
1603
959
|
strokeWidth: "1"
|
|
1604
960
|
}
|
|
1605
|
-
), /* @__PURE__ */
|
|
961
|
+
), /* @__PURE__ */ React8.createElement(
|
|
1606
962
|
"text",
|
|
1607
963
|
{
|
|
1608
964
|
x: padL - 4,
|
|
@@ -1617,7 +973,7 @@ var Charts = ({
|
|
|
1617
973
|
const barH = (d.value - min) / (max - min || 1) * chartH;
|
|
1618
974
|
const y = padT + chartH - barH;
|
|
1619
975
|
const isH = hovered === i;
|
|
1620
|
-
return /* @__PURE__ */
|
|
976
|
+
return /* @__PURE__ */ React8.createElement("g", { key: i, onMouseEnter: () => setHovered(i), onMouseLeave: () => setHovered(null) }, /* @__PURE__ */ React8.createElement(
|
|
1621
977
|
"rect",
|
|
1622
978
|
{
|
|
1623
979
|
x,
|
|
@@ -1627,7 +983,7 @@ var Charts = ({
|
|
|
1627
983
|
fill: "transparent",
|
|
1628
984
|
rx: "4"
|
|
1629
985
|
}
|
|
1630
|
-
), /* @__PURE__ */
|
|
986
|
+
), /* @__PURE__ */ React8.createElement(
|
|
1631
987
|
"rect",
|
|
1632
988
|
{
|
|
1633
989
|
x,
|
|
@@ -1638,7 +994,7 @@ var Charts = ({
|
|
|
1638
994
|
rx: "4",
|
|
1639
995
|
style: { transition: "fill 0.15s" }
|
|
1640
996
|
}
|
|
1641
|
-
), showValues && isH && /* @__PURE__ */
|
|
997
|
+
), showValues && isH && /* @__PURE__ */ React8.createElement(
|
|
1642
998
|
"text",
|
|
1643
999
|
{
|
|
1644
1000
|
x: x + barW / 2,
|
|
@@ -1649,7 +1005,7 @@ var Charts = ({
|
|
|
1649
1005
|
fontWeight: "700"
|
|
1650
1006
|
},
|
|
1651
1007
|
d.value
|
|
1652
|
-
), /* @__PURE__ */
|
|
1008
|
+
), /* @__PURE__ */ React8.createElement(
|
|
1653
1009
|
"text",
|
|
1654
1010
|
{
|
|
1655
1011
|
x: x + barW / 2,
|
|
@@ -1662,7 +1018,7 @@ var Charts = ({
|
|
|
1662
1018
|
));
|
|
1663
1019
|
}));
|
|
1664
1020
|
};
|
|
1665
|
-
const LineChart = () => /* @__PURE__ */
|
|
1021
|
+
const LineChart = () => /* @__PURE__ */ React8.createElement("svg", { width: "100%", viewBox: `0 0 ${W} ${H}` }, /* @__PURE__ */ React8.createElement("defs", null, /* @__PURE__ */ React8.createElement("linearGradient", { id: "lg", x1: "0", y1: "0", x2: "0", y2: "1" }, /* @__PURE__ */ React8.createElement("stop", { offset: "0%", stopColor: accent, stopOpacity: "0.3" }), /* @__PURE__ */ React8.createElement("stop", { offset: "100%", stopColor: accent, stopOpacity: "0" }))), showGrid && gridLines.map((g, i) => /* @__PURE__ */ React8.createElement("g", { key: i }, /* @__PURE__ */ React8.createElement(
|
|
1666
1022
|
"line",
|
|
1667
1023
|
{
|
|
1668
1024
|
x1: padL,
|
|
@@ -1672,7 +1028,7 @@ var Charts = ({
|
|
|
1672
1028
|
stroke: "rgba(255,255,255,0.05)",
|
|
1673
1029
|
strokeWidth: "1"
|
|
1674
1030
|
}
|
|
1675
|
-
), /* @__PURE__ */
|
|
1031
|
+
), /* @__PURE__ */ React8.createElement(
|
|
1676
1032
|
"text",
|
|
1677
1033
|
{
|
|
1678
1034
|
x: padL - 4,
|
|
@@ -1682,7 +1038,7 @@ var Charts = ({
|
|
|
1682
1038
|
fontSize: "9"
|
|
1683
1039
|
},
|
|
1684
1040
|
g.val
|
|
1685
|
-
))), /* @__PURE__ */
|
|
1041
|
+
))), /* @__PURE__ */ React8.createElement("polygon", { points: areaPoints, fill: "url(#lg)" }), /* @__PURE__ */ React8.createElement(
|
|
1686
1042
|
"polyline",
|
|
1687
1043
|
{
|
|
1688
1044
|
points,
|
|
@@ -1694,7 +1050,7 @@ var Charts = ({
|
|
|
1694
1050
|
}
|
|
1695
1051
|
), data.map((d, i) => {
|
|
1696
1052
|
const isH = hovered === i;
|
|
1697
|
-
return /* @__PURE__ */
|
|
1053
|
+
return /* @__PURE__ */ React8.createElement("g", { key: i, onMouseEnter: () => setHovered(i), onMouseLeave: () => setHovered(null) }, /* @__PURE__ */ React8.createElement("circle", { cx: getX(i), cy: getY(d.value), r: "10", fill: "transparent" }), /* @__PURE__ */ React8.createElement(
|
|
1698
1054
|
"circle",
|
|
1699
1055
|
{
|
|
1700
1056
|
cx: getX(i),
|
|
@@ -1705,7 +1061,7 @@ var Charts = ({
|
|
|
1705
1061
|
strokeWidth: "2",
|
|
1706
1062
|
style: { transition: "all 0.15s" }
|
|
1707
1063
|
}
|
|
1708
|
-
), showValues && isH && /* @__PURE__ */
|
|
1064
|
+
), showValues && isH && /* @__PURE__ */ React8.createElement(
|
|
1709
1065
|
"text",
|
|
1710
1066
|
{
|
|
1711
1067
|
x: getX(i),
|
|
@@ -1716,7 +1072,7 @@ var Charts = ({
|
|
|
1716
1072
|
fontWeight: "700"
|
|
1717
1073
|
},
|
|
1718
1074
|
d.value
|
|
1719
|
-
), /* @__PURE__ */
|
|
1075
|
+
), /* @__PURE__ */ React8.createElement(
|
|
1720
1076
|
"text",
|
|
1721
1077
|
{
|
|
1722
1078
|
x: getX(i),
|
|
@@ -1756,7 +1112,7 @@ var Charts = ({
|
|
|
1756
1112
|
startAngle += angle;
|
|
1757
1113
|
return slice;
|
|
1758
1114
|
});
|
|
1759
|
-
return /* @__PURE__ */
|
|
1115
|
+
return /* @__PURE__ */ React8.createElement("svg", { width: "100%", viewBox: `0 0 ${W} ${H}` }, slices.map((s) => /* @__PURE__ */ React8.createElement("g", { key: s.i, onMouseEnter: () => setHovered(s.i), onMouseLeave: () => setHovered(null) }, /* @__PURE__ */ React8.createElement(
|
|
1760
1116
|
"path",
|
|
1761
1117
|
{
|
|
1762
1118
|
d: s.path,
|
|
@@ -1766,7 +1122,7 @@ var Charts = ({
|
|
|
1766
1122
|
transform: hovered === s.i ? `translate(${Math.cos(s.angle / 2 - Math.PI / 2) * 4}, ${Math.sin(s.angle / 2 - Math.PI / 2) * 4})` : "",
|
|
1767
1123
|
style: { transition: "transform 0.15s", cursor: "pointer" }
|
|
1768
1124
|
}
|
|
1769
|
-
))), hovered !== null && /* @__PURE__ */
|
|
1125
|
+
))), hovered !== null && /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(
|
|
1770
1126
|
"text",
|
|
1771
1127
|
{
|
|
1772
1128
|
x: cx,
|
|
@@ -1777,7 +1133,7 @@ var Charts = ({
|
|
|
1777
1133
|
fontWeight: "800"
|
|
1778
1134
|
},
|
|
1779
1135
|
(_a = data[hovered]) == null ? void 0 : _a.value
|
|
1780
|
-
), /* @__PURE__ */
|
|
1136
|
+
), /* @__PURE__ */ React8.createElement(
|
|
1781
1137
|
"text",
|
|
1782
1138
|
{
|
|
1783
1139
|
x: cx,
|
|
@@ -1787,7 +1143,7 @@ var Charts = ({
|
|
|
1787
1143
|
fontSize: "9"
|
|
1788
1144
|
},
|
|
1789
1145
|
(_b = data[hovered]) == null ? void 0 : _b.label
|
|
1790
|
-
)), hovered === null && /* @__PURE__ */
|
|
1146
|
+
)), hovered === null && /* @__PURE__ */ React8.createElement(
|
|
1791
1147
|
"text",
|
|
1792
1148
|
{
|
|
1793
1149
|
x: cx,
|
|
@@ -1799,7 +1155,7 @@ var Charts = ({
|
|
|
1799
1155
|
"Hover slice"
|
|
1800
1156
|
));
|
|
1801
1157
|
};
|
|
1802
|
-
const AreaChart = () => /* @__PURE__ */
|
|
1158
|
+
const AreaChart = () => /* @__PURE__ */ React8.createElement("svg", { width: "100%", viewBox: `0 0 ${W} ${H}` }, /* @__PURE__ */ React8.createElement("defs", null, /* @__PURE__ */ React8.createElement("linearGradient", { id: "ag", x1: "0", y1: "0", x2: "0", y2: "1" }, /* @__PURE__ */ React8.createElement("stop", { offset: "0%", stopColor: accent, stopOpacity: "0.5" }), /* @__PURE__ */ React8.createElement("stop", { offset: "100%", stopColor: accent, stopOpacity: "0.02" }))), showGrid && gridLines.map((g, i) => /* @__PURE__ */ React8.createElement("g", { key: i }, /* @__PURE__ */ React8.createElement(
|
|
1803
1159
|
"line",
|
|
1804
1160
|
{
|
|
1805
1161
|
x1: padL,
|
|
@@ -1809,7 +1165,7 @@ var Charts = ({
|
|
|
1809
1165
|
stroke: "rgba(255,255,255,0.05)",
|
|
1810
1166
|
strokeWidth: "1"
|
|
1811
1167
|
}
|
|
1812
|
-
), /* @__PURE__ */
|
|
1168
|
+
), /* @__PURE__ */ React8.createElement(
|
|
1813
1169
|
"text",
|
|
1814
1170
|
{
|
|
1815
1171
|
x: padL - 4,
|
|
@@ -1819,7 +1175,7 @@ var Charts = ({
|
|
|
1819
1175
|
fontSize: "9"
|
|
1820
1176
|
},
|
|
1821
1177
|
g.val
|
|
1822
|
-
))), /* @__PURE__ */
|
|
1178
|
+
))), /* @__PURE__ */ React8.createElement("polygon", { points: areaPoints, fill: "url(#ag)" }), /* @__PURE__ */ React8.createElement(
|
|
1823
1179
|
"polyline",
|
|
1824
1180
|
{
|
|
1825
1181
|
points,
|
|
@@ -1829,7 +1185,7 @@ var Charts = ({
|
|
|
1829
1185
|
strokeLinejoin: "round",
|
|
1830
1186
|
strokeLinecap: "round"
|
|
1831
1187
|
}
|
|
1832
|
-
), data.map((d, i) => /* @__PURE__ */
|
|
1188
|
+
), data.map((d, i) => /* @__PURE__ */ React8.createElement("g", { key: i, onMouseEnter: () => setHovered(i), onMouseLeave: () => setHovered(null) }, /* @__PURE__ */ React8.createElement("rect", { x: getX(i) - 12, y: padT, width: 24, height: chartH, fill: "transparent" }), hovered === i && /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(
|
|
1833
1189
|
"line",
|
|
1834
1190
|
{
|
|
1835
1191
|
x1: getX(i),
|
|
@@ -1840,7 +1196,7 @@ var Charts = ({
|
|
|
1840
1196
|
strokeWidth: "1",
|
|
1841
1197
|
strokeDasharray: "3 3"
|
|
1842
1198
|
}
|
|
1843
|
-
), showValues && /* @__PURE__ */
|
|
1199
|
+
), showValues && /* @__PURE__ */ React8.createElement(
|
|
1844
1200
|
"text",
|
|
1845
1201
|
{
|
|
1846
1202
|
x: getX(i),
|
|
@@ -1851,7 +1207,7 @@ var Charts = ({
|
|
|
1851
1207
|
fontWeight: "700"
|
|
1852
1208
|
},
|
|
1853
1209
|
d.value
|
|
1854
|
-
)), /* @__PURE__ */
|
|
1210
|
+
)), /* @__PURE__ */ React8.createElement(
|
|
1855
1211
|
"text",
|
|
1856
1212
|
{
|
|
1857
1213
|
x: getX(i),
|
|
@@ -1863,12 +1219,12 @@ var Charts = ({
|
|
|
1863
1219
|
d.label
|
|
1864
1220
|
))));
|
|
1865
1221
|
const renderChart = () => {
|
|
1866
|
-
if (type === "line") return /* @__PURE__ */
|
|
1867
|
-
if (type === "pie") return /* @__PURE__ */
|
|
1868
|
-
if (type === "area") return /* @__PURE__ */
|
|
1869
|
-
return /* @__PURE__ */
|
|
1222
|
+
if (type === "line") return /* @__PURE__ */ React8.createElement(LineChart, null);
|
|
1223
|
+
if (type === "pie") return /* @__PURE__ */ React8.createElement(PieChart, null);
|
|
1224
|
+
if (type === "area") return /* @__PURE__ */ React8.createElement(AreaChart, null);
|
|
1225
|
+
return /* @__PURE__ */ React8.createElement(BarChart, null);
|
|
1870
1226
|
};
|
|
1871
|
-
return /* @__PURE__ */
|
|
1227
|
+
return /* @__PURE__ */ React8.createElement("div", { style: {
|
|
1872
1228
|
background: bg,
|
|
1873
1229
|
borderRadius: radius,
|
|
1874
1230
|
padding: "20px",
|
|
@@ -1877,7 +1233,7 @@ var Charts = ({
|
|
|
1877
1233
|
width: "100%",
|
|
1878
1234
|
maxWidth: "360px",
|
|
1879
1235
|
boxSizing: "border-box"
|
|
1880
|
-
} }, /* @__PURE__ */
|
|
1236
|
+
} }, /* @__PURE__ */ React8.createElement("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", marginBottom: "16px" } }, /* @__PURE__ */ React8.createElement("p", { style: { fontSize: "14px", fontWeight: "700", color: "#fff", margin: 0 } }, title), /* @__PURE__ */ React8.createElement("span", { style: {
|
|
1881
1237
|
fontSize: "10px",
|
|
1882
1238
|
fontWeight: "700",
|
|
1883
1239
|
padding: "3px 9px",
|
|
@@ -1890,7 +1246,7 @@ var Charts = ({
|
|
|
1890
1246
|
};
|
|
1891
1247
|
|
|
1892
1248
|
// src/components/ImageCard/ImageCard.jsx
|
|
1893
|
-
import
|
|
1249
|
+
import React9, { useState as useState7 } from "react";
|
|
1894
1250
|
var ImageCard = ({
|
|
1895
1251
|
image = "https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=600&q=80",
|
|
1896
1252
|
tag = "Travel",
|
|
@@ -1903,14 +1259,14 @@ var ImageCard = ({
|
|
|
1903
1259
|
onButtonClick = () => {
|
|
1904
1260
|
}
|
|
1905
1261
|
}) => {
|
|
1906
|
-
const [hovered, setHovered] =
|
|
1262
|
+
const [hovered, setHovered] = useState7(false);
|
|
1907
1263
|
const alpha = (hex, op) => {
|
|
1908
1264
|
const r = parseInt(hex.slice(1, 3), 16);
|
|
1909
1265
|
const g = parseInt(hex.slice(3, 5), 16);
|
|
1910
1266
|
const b = parseInt(hex.slice(5, 7), 16);
|
|
1911
1267
|
return `rgba(${r},${g},${b},${op})`;
|
|
1912
1268
|
};
|
|
1913
|
-
return /* @__PURE__ */
|
|
1269
|
+
return /* @__PURE__ */ React9.createElement(
|
|
1914
1270
|
"div",
|
|
1915
1271
|
{
|
|
1916
1272
|
onMouseEnter: () => setHovered(true),
|
|
@@ -1927,7 +1283,7 @@ var ImageCard = ({
|
|
|
1927
1283
|
boxShadow: hovered ? `0 16px 40px rgba(0,0,0,0.5)` : "0 4px 20px rgba(0,0,0,0.3)"
|
|
1928
1284
|
}
|
|
1929
1285
|
},
|
|
1930
|
-
/* @__PURE__ */
|
|
1286
|
+
/* @__PURE__ */ React9.createElement("div", { style: { position: "relative", width: "100%", height: "180px", overflow: "hidden" } }, /* @__PURE__ */ React9.createElement(
|
|
1931
1287
|
"img",
|
|
1932
1288
|
{
|
|
1933
1289
|
src: image,
|
|
@@ -1940,11 +1296,11 @@ var ImageCard = ({
|
|
|
1940
1296
|
transition: "transform 0.4s ease"
|
|
1941
1297
|
}
|
|
1942
1298
|
}
|
|
1943
|
-
), /* @__PURE__ */
|
|
1299
|
+
), /* @__PURE__ */ React9.createElement("div", { style: {
|
|
1944
1300
|
position: "absolute",
|
|
1945
1301
|
inset: 0,
|
|
1946
1302
|
background: "linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 60%)"
|
|
1947
|
-
} }), tag && /* @__PURE__ */
|
|
1303
|
+
} }), tag && /* @__PURE__ */ React9.createElement("div", { style: {
|
|
1948
1304
|
position: "absolute",
|
|
1949
1305
|
top: "12px",
|
|
1950
1306
|
left: "12px",
|
|
@@ -1957,18 +1313,18 @@ var ImageCard = ({
|
|
|
1957
1313
|
letterSpacing: "0.5px",
|
|
1958
1314
|
textTransform: "uppercase"
|
|
1959
1315
|
} }, tag)),
|
|
1960
|
-
/* @__PURE__ */
|
|
1316
|
+
/* @__PURE__ */ React9.createElement("div", { style: { padding: "18px" } }, /* @__PURE__ */ React9.createElement("h3", { style: {
|
|
1961
1317
|
fontSize: "15px",
|
|
1962
1318
|
fontWeight: "700",
|
|
1963
1319
|
color: "#fff",
|
|
1964
1320
|
margin: "0 0 8px",
|
|
1965
1321
|
lineHeight: 1.4
|
|
1966
|
-
} }, title), /* @__PURE__ */
|
|
1322
|
+
} }, title), /* @__PURE__ */ React9.createElement("p", { style: {
|
|
1967
1323
|
fontSize: "13px",
|
|
1968
1324
|
color: "rgba(255,255,255,0.45)",
|
|
1969
1325
|
lineHeight: 1.65,
|
|
1970
1326
|
margin: "0 0 18px"
|
|
1971
|
-
} }, description), /* @__PURE__ */
|
|
1327
|
+
} }, description), /* @__PURE__ */ React9.createElement(
|
|
1972
1328
|
"button",
|
|
1973
1329
|
{
|
|
1974
1330
|
onClick: onButtonClick,
|
|
@@ -1994,7 +1350,7 @@ var ImageCard = ({
|
|
|
1994
1350
|
};
|
|
1995
1351
|
|
|
1996
1352
|
// src/components/ImageSlider/ImageSlider.jsx
|
|
1997
|
-
import
|
|
1353
|
+
import React10, { useState as useState8 } from "react";
|
|
1998
1354
|
var ImageSlider = ({
|
|
1999
1355
|
images = [
|
|
2000
1356
|
{
|
|
@@ -2025,8 +1381,8 @@ var ImageSlider = ({
|
|
|
2025
1381
|
showCaption = true,
|
|
2026
1382
|
autoPlay = false
|
|
2027
1383
|
}) => {
|
|
2028
|
-
const [current, setCurrent] =
|
|
2029
|
-
const [dir, setDir] =
|
|
1384
|
+
const [current, setCurrent] = useState8(0);
|
|
1385
|
+
const [dir, setDir] = useState8(null);
|
|
2030
1386
|
const alpha = (hex, op) => {
|
|
2031
1387
|
const r = parseInt(hex.slice(1, 3), 16);
|
|
2032
1388
|
const g = parseInt(hex.slice(3, 5), 16);
|
|
@@ -2046,7 +1402,7 @@ var ImageSlider = ({
|
|
|
2046
1402
|
setCurrent(i);
|
|
2047
1403
|
};
|
|
2048
1404
|
const img = images[current];
|
|
2049
|
-
return /* @__PURE__ */
|
|
1405
|
+
return /* @__PURE__ */ React10.createElement("div", { style: {
|
|
2050
1406
|
background: bg,
|
|
2051
1407
|
borderRadius: radius,
|
|
2052
1408
|
overflow: "hidden",
|
|
@@ -2054,7 +1410,7 @@ var ImageSlider = ({
|
|
|
2054
1410
|
border: "1px solid rgba(255,255,255,0.07)",
|
|
2055
1411
|
fontFamily: "system-ui, sans-serif",
|
|
2056
1412
|
boxShadow: "0 10px 40px rgba(0,0,0,0.4)"
|
|
2057
|
-
} }, /* @__PURE__ */
|
|
1413
|
+
} }, /* @__PURE__ */ React10.createElement("div", { style: { position: "relative", width: "100%", height: "200px", overflow: "hidden", background: "#000" } }, /* @__PURE__ */ React10.createElement(
|
|
2058
1414
|
"img",
|
|
2059
1415
|
{
|
|
2060
1416
|
key: current,
|
|
@@ -2067,11 +1423,11 @@ var ImageSlider = ({
|
|
|
2067
1423
|
animation: `sliderFade 0.35s ease`
|
|
2068
1424
|
}
|
|
2069
1425
|
}
|
|
2070
|
-
), /* @__PURE__ */
|
|
1426
|
+
), /* @__PURE__ */ React10.createElement("style", null, `@keyframes sliderFade { from { opacity: 0; transform: scale(1.03); } to { opacity: 1; transform: scale(1); } }`), /* @__PURE__ */ React10.createElement("div", { style: {
|
|
2071
1427
|
position: "absolute",
|
|
2072
1428
|
inset: 0,
|
|
2073
1429
|
background: "linear-gradient(to top, rgba(0,0,0,0.65) 0%, transparent 55%)"
|
|
2074
|
-
} }), img.tag && /* @__PURE__ */
|
|
1430
|
+
} }), img.tag && /* @__PURE__ */ React10.createElement("div", { style: {
|
|
2075
1431
|
position: "absolute",
|
|
2076
1432
|
top: "12px",
|
|
2077
1433
|
left: "12px",
|
|
@@ -2083,7 +1439,7 @@ var ImageSlider = ({
|
|
|
2083
1439
|
color: "#fff",
|
|
2084
1440
|
letterSpacing: "0.5px",
|
|
2085
1441
|
textTransform: "uppercase"
|
|
2086
|
-
} }, img.tag), /* @__PURE__ */
|
|
1442
|
+
} }, img.tag), /* @__PURE__ */ React10.createElement("div", { style: {
|
|
2087
1443
|
position: "absolute",
|
|
2088
1444
|
top: "12px",
|
|
2089
1445
|
right: "12px",
|
|
@@ -2093,7 +1449,7 @@ var ImageSlider = ({
|
|
|
2093
1449
|
fontSize: "10px",
|
|
2094
1450
|
fontWeight: "600",
|
|
2095
1451
|
color: "rgba(255,255,255,0.7)"
|
|
2096
|
-
} }, current + 1, " / ", images.length), /* @__PURE__ */
|
|
1452
|
+
} }, current + 1, " / ", images.length), /* @__PURE__ */ React10.createElement(
|
|
2097
1453
|
"button",
|
|
2098
1454
|
{
|
|
2099
1455
|
onClick: prev,
|
|
@@ -2118,7 +1474,7 @@ var ImageSlider = ({
|
|
|
2118
1474
|
onMouseEnter: (e) => e.currentTarget.style.background = alpha(accent, 0.8),
|
|
2119
1475
|
onMouseLeave: (e) => e.currentTarget.style.background = "rgba(0,0,0,0.5)"
|
|
2120
1476
|
},
|
|
2121
|
-
/* @__PURE__ */
|
|
1477
|
+
/* @__PURE__ */ React10.createElement(
|
|
2122
1478
|
"svg",
|
|
2123
1479
|
{
|
|
2124
1480
|
width: "14",
|
|
@@ -2129,9 +1485,9 @@ var ImageSlider = ({
|
|
|
2129
1485
|
strokeWidth: "2.5",
|
|
2130
1486
|
strokeLinecap: "round"
|
|
2131
1487
|
},
|
|
2132
|
-
/* @__PURE__ */
|
|
1488
|
+
/* @__PURE__ */ React10.createElement("polyline", { points: "15 18 9 12 15 6" })
|
|
2133
1489
|
)
|
|
2134
|
-
), /* @__PURE__ */
|
|
1490
|
+
), /* @__PURE__ */ React10.createElement(
|
|
2135
1491
|
"button",
|
|
2136
1492
|
{
|
|
2137
1493
|
onClick: next,
|
|
@@ -2156,7 +1512,7 @@ var ImageSlider = ({
|
|
|
2156
1512
|
onMouseEnter: (e) => e.currentTarget.style.background = alpha(accent, 0.8),
|
|
2157
1513
|
onMouseLeave: (e) => e.currentTarget.style.background = "rgba(0,0,0,0.5)"
|
|
2158
1514
|
},
|
|
2159
|
-
/* @__PURE__ */
|
|
1515
|
+
/* @__PURE__ */ React10.createElement(
|
|
2160
1516
|
"svg",
|
|
2161
1517
|
{
|
|
2162
1518
|
width: "14",
|
|
@@ -2167,9 +1523,9 @@ var ImageSlider = ({
|
|
|
2167
1523
|
strokeWidth: "2.5",
|
|
2168
1524
|
strokeLinecap: "round"
|
|
2169
1525
|
},
|
|
2170
|
-
/* @__PURE__ */
|
|
1526
|
+
/* @__PURE__ */ React10.createElement("polyline", { points: "9 18 15 12 9 6" })
|
|
2171
1527
|
)
|
|
2172
|
-
)), showCaption && /* @__PURE__ */
|
|
1528
|
+
)), showCaption && /* @__PURE__ */ React10.createElement("div", { style: { padding: "14px 16px 4px" } }, /* @__PURE__ */ React10.createElement(
|
|
2173
1529
|
"p",
|
|
2174
1530
|
{
|
|
2175
1531
|
style: {
|
|
@@ -2183,12 +1539,12 @@ var ImageSlider = ({
|
|
|
2183
1539
|
key: current + "-title"
|
|
2184
1540
|
},
|
|
2185
1541
|
img.title
|
|
2186
|
-
)), showDots && /* @__PURE__ */
|
|
1542
|
+
)), showDots && /* @__PURE__ */ React10.createElement("div", { style: {
|
|
2187
1543
|
display: "flex",
|
|
2188
1544
|
justifyContent: "center",
|
|
2189
1545
|
gap: "6px",
|
|
2190
1546
|
padding: "12px 16px 16px"
|
|
2191
|
-
} }, images.map((_, i) => /* @__PURE__ */
|
|
1547
|
+
} }, images.map((_, i) => /* @__PURE__ */ React10.createElement(
|
|
2192
1548
|
"button",
|
|
2193
1549
|
{
|
|
2194
1550
|
key: i,
|
|
@@ -2208,7 +1564,7 @@ var ImageSlider = ({
|
|
|
2208
1564
|
};
|
|
2209
1565
|
|
|
2210
1566
|
// src/components/BackgoundImageSlider/BackgoundImageSlider.jsx
|
|
2211
|
-
import
|
|
1567
|
+
import React11, { useState as useState9, useEffect as useEffect4, useCallback } from "react";
|
|
2212
1568
|
var BackgoundImageSlider = ({
|
|
2213
1569
|
images = [
|
|
2214
1570
|
{
|
|
@@ -2244,8 +1600,8 @@ var BackgoundImageSlider = ({
|
|
|
2244
1600
|
autoPlay = false,
|
|
2245
1601
|
autoPlayInterval = 4e3
|
|
2246
1602
|
}) => {
|
|
2247
|
-
const [current, setCurrent] =
|
|
2248
|
-
const [animating, setAnimating] =
|
|
1603
|
+
const [current, setCurrent] = useState9(0);
|
|
1604
|
+
const [animating, setAnimating] = useState9(false);
|
|
2249
1605
|
const alpha = (hex, op) => {
|
|
2250
1606
|
const r = parseInt(hex.slice(1, 3), 16);
|
|
2251
1607
|
const g = parseInt(hex.slice(3, 5), 16);
|
|
@@ -2260,17 +1616,17 @@ var BackgoundImageSlider = ({
|
|
|
2260
1616
|
}, [animating, images.length]);
|
|
2261
1617
|
const prev = () => go(current - 1);
|
|
2262
1618
|
const next = () => go(current + 1);
|
|
2263
|
-
|
|
1619
|
+
useEffect4(() => {
|
|
2264
1620
|
if (!autoPlay) return;
|
|
2265
1621
|
const t = setInterval(() => go(current + 1), autoPlayInterval);
|
|
2266
1622
|
return () => clearInterval(t);
|
|
2267
1623
|
}, [autoPlay, autoPlayInterval, current, go]);
|
|
2268
1624
|
const img = images[current];
|
|
2269
|
-
return /* @__PURE__ */
|
|
1625
|
+
return /* @__PURE__ */ React11.createElement(React11.Fragment, null, /* @__PURE__ */ React11.createElement("style", null, `
|
|
2270
1626
|
@keyframes hs-fade { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: scale(1); } }
|
|
2271
1627
|
@keyframes hs-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
|
|
2272
1628
|
.hs-prev:hover, .hs-next:hover { background: rgba(0,0,0,0.65) !important; border-color: rgba(255,255,255,0.35) !important; }
|
|
2273
|
-
`), /* @__PURE__ */
|
|
1629
|
+
`), /* @__PURE__ */ React11.createElement("div", { style: {
|
|
2274
1630
|
position: "relative",
|
|
2275
1631
|
width,
|
|
2276
1632
|
height,
|
|
@@ -2278,7 +1634,7 @@ var BackgoundImageSlider = ({
|
|
|
2278
1634
|
overflow: "hidden",
|
|
2279
1635
|
fontFamily: "system-ui, -apple-system, sans-serif",
|
|
2280
1636
|
userSelect: "none"
|
|
2281
|
-
} }, /* @__PURE__ */
|
|
1637
|
+
} }, /* @__PURE__ */ React11.createElement(
|
|
2282
1638
|
"img",
|
|
2283
1639
|
{
|
|
2284
1640
|
key: current,
|
|
@@ -2293,11 +1649,11 @@ var BackgoundImageSlider = ({
|
|
|
2293
1649
|
animation: "hs-fade 0.4s ease"
|
|
2294
1650
|
}
|
|
2295
1651
|
}
|
|
2296
|
-
), /* @__PURE__ */
|
|
1652
|
+
), /* @__PURE__ */ React11.createElement("div", { style: {
|
|
2297
1653
|
position: "absolute",
|
|
2298
1654
|
inset: 0,
|
|
2299
1655
|
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%)"
|
|
2300
|
-
} }), img.tag && /* @__PURE__ */
|
|
1656
|
+
} }), img.tag && /* @__PURE__ */ React11.createElement(
|
|
2301
1657
|
"div",
|
|
2302
1658
|
{
|
|
2303
1659
|
key: current + "-tag",
|
|
@@ -2317,7 +1673,7 @@ var BackgoundImageSlider = ({
|
|
|
2317
1673
|
}
|
|
2318
1674
|
},
|
|
2319
1675
|
img.tag
|
|
2320
|
-
), /* @__PURE__ */
|
|
1676
|
+
), /* @__PURE__ */ React11.createElement("div", { style: {
|
|
2321
1677
|
position: "absolute",
|
|
2322
1678
|
top: "24px",
|
|
2323
1679
|
right: "28px",
|
|
@@ -2327,7 +1683,7 @@ var BackgoundImageSlider = ({
|
|
|
2327
1683
|
fontSize: "11px",
|
|
2328
1684
|
fontWeight: "600",
|
|
2329
1685
|
color: "rgba(255,255,255,0.7)"
|
|
2330
|
-
} }, current + 1, " / ", images.length), /* @__PURE__ */
|
|
1686
|
+
} }, current + 1, " / ", images.length), /* @__PURE__ */ React11.createElement(
|
|
2331
1687
|
"button",
|
|
2332
1688
|
{
|
|
2333
1689
|
className: "hs-prev",
|
|
@@ -2352,7 +1708,7 @@ var BackgoundImageSlider = ({
|
|
|
2352
1708
|
zIndex: 10
|
|
2353
1709
|
}
|
|
2354
1710
|
},
|
|
2355
|
-
/* @__PURE__ */
|
|
1711
|
+
/* @__PURE__ */ React11.createElement(
|
|
2356
1712
|
"svg",
|
|
2357
1713
|
{
|
|
2358
1714
|
width: "18",
|
|
@@ -2364,9 +1720,9 @@ var BackgoundImageSlider = ({
|
|
|
2364
1720
|
strokeLinecap: "round",
|
|
2365
1721
|
strokeLinejoin: "round"
|
|
2366
1722
|
},
|
|
2367
|
-
/* @__PURE__ */
|
|
1723
|
+
/* @__PURE__ */ React11.createElement("polyline", { points: "15 18 9 12 15 6" })
|
|
2368
1724
|
)
|
|
2369
|
-
), /* @__PURE__ */
|
|
1725
|
+
), /* @__PURE__ */ React11.createElement(
|
|
2370
1726
|
"button",
|
|
2371
1727
|
{
|
|
2372
1728
|
className: "hs-next",
|
|
@@ -2391,7 +1747,7 @@ var BackgoundImageSlider = ({
|
|
|
2391
1747
|
zIndex: 10
|
|
2392
1748
|
}
|
|
2393
1749
|
},
|
|
2394
|
-
/* @__PURE__ */
|
|
1750
|
+
/* @__PURE__ */ React11.createElement(
|
|
2395
1751
|
"svg",
|
|
2396
1752
|
{
|
|
2397
1753
|
width: "18",
|
|
@@ -2403,15 +1759,15 @@ var BackgoundImageSlider = ({
|
|
|
2403
1759
|
strokeLinecap: "round",
|
|
2404
1760
|
strokeLinejoin: "round"
|
|
2405
1761
|
},
|
|
2406
|
-
/* @__PURE__ */
|
|
1762
|
+
/* @__PURE__ */ React11.createElement("polyline", { points: "9 18 15 12 9 6" })
|
|
2407
1763
|
)
|
|
2408
|
-
), /* @__PURE__ */
|
|
1764
|
+
), /* @__PURE__ */ React11.createElement("div", { style: {
|
|
2409
1765
|
position: "absolute",
|
|
2410
1766
|
bottom: showDots ? "56px" : "28px",
|
|
2411
1767
|
left: "28px",
|
|
2412
1768
|
right: "28px",
|
|
2413
1769
|
zIndex: 5
|
|
2414
|
-
} }, /* @__PURE__ */
|
|
1770
|
+
} }, /* @__PURE__ */ React11.createElement(
|
|
2415
1771
|
"h2",
|
|
2416
1772
|
{
|
|
2417
1773
|
key: current + "-title",
|
|
@@ -2427,7 +1783,7 @@ var BackgoundImageSlider = ({
|
|
|
2427
1783
|
}
|
|
2428
1784
|
},
|
|
2429
1785
|
img.title
|
|
2430
|
-
), /* @__PURE__ */
|
|
1786
|
+
), /* @__PURE__ */ React11.createElement(
|
|
2431
1787
|
"p",
|
|
2432
1788
|
{
|
|
2433
1789
|
key: current + "-desc",
|
|
@@ -2442,7 +1798,7 @@ var BackgoundImageSlider = ({
|
|
|
2442
1798
|
}
|
|
2443
1799
|
},
|
|
2444
1800
|
img.description
|
|
2445
|
-
)), showDots && /* @__PURE__ */
|
|
1801
|
+
)), showDots && /* @__PURE__ */ React11.createElement("div", { style: {
|
|
2446
1802
|
position: "absolute",
|
|
2447
1803
|
bottom: "20px",
|
|
2448
1804
|
left: 0,
|
|
@@ -2451,7 +1807,7 @@ var BackgoundImageSlider = ({
|
|
|
2451
1807
|
justifyContent: "center",
|
|
2452
1808
|
gap: "6px",
|
|
2453
1809
|
zIndex: 5
|
|
2454
|
-
} }, images.map((_, i) => /* @__PURE__ */
|
|
1810
|
+
} }, images.map((_, i) => /* @__PURE__ */ React11.createElement(
|
|
2455
1811
|
"button",
|
|
2456
1812
|
{
|
|
2457
1813
|
key: i,
|
|
@@ -2469,31 +1825,418 @@ var BackgoundImageSlider = ({
|
|
|
2469
1825
|
}
|
|
2470
1826
|
)))));
|
|
2471
1827
|
};
|
|
1828
|
+
|
|
1829
|
+
// src/components/PageLoader/PageLoader.jsx
|
|
1830
|
+
import React12, { useState as useState10, useEffect as useEffect5 } from "react";
|
|
1831
|
+
var PageLoader = ({
|
|
1832
|
+
logo = "VirtualAI",
|
|
1833
|
+
accent = "#6366f1",
|
|
1834
|
+
bg = "",
|
|
1835
|
+
type = "spinner",
|
|
1836
|
+
loadingText = "Loading...",
|
|
1837
|
+
subText = "",
|
|
1838
|
+
duration = 6e3,
|
|
1839
|
+
onComplete = () => {
|
|
1840
|
+
}
|
|
1841
|
+
}) => {
|
|
1842
|
+
const [progress, setProgress] = useState10(0);
|
|
1843
|
+
const [done, setDone] = useState10(false);
|
|
1844
|
+
const alpha = (hex, op) => {
|
|
1845
|
+
const r = parseInt(hex.slice(1, 3), 16);
|
|
1846
|
+
const g = parseInt(hex.slice(3, 5), 16);
|
|
1847
|
+
const b = parseInt(hex.slice(5, 7), 16);
|
|
1848
|
+
return `rgba(${r},${g},${b},${op})`;
|
|
1849
|
+
};
|
|
1850
|
+
useEffect5(() => {
|
|
1851
|
+
const steps = 100;
|
|
1852
|
+
const interval = duration / steps;
|
|
1853
|
+
let current = 0;
|
|
1854
|
+
const timer = setInterval(() => {
|
|
1855
|
+
current += 1;
|
|
1856
|
+
setProgress(current);
|
|
1857
|
+
if (current >= 100) {
|
|
1858
|
+
clearInterval(timer);
|
|
1859
|
+
setTimeout(() => {
|
|
1860
|
+
setDone(true);
|
|
1861
|
+
onComplete();
|
|
1862
|
+
}, 300);
|
|
1863
|
+
}
|
|
1864
|
+
}, interval);
|
|
1865
|
+
return () => clearInterval(timer);
|
|
1866
|
+
}, [duration]);
|
|
1867
|
+
if (done) return null;
|
|
1868
|
+
return /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement("style", null, `
|
|
1869
|
+
@keyframes pl-spin { to { transform: rotate(360deg); } }
|
|
1870
|
+
@keyframes pl-pulse { 0%,100%{transform:scale(1);opacity:1} 50%{transform:scale(1.15);opacity:0.7} }
|
|
1871
|
+
@keyframes pl-dot { 0%,80%,100%{transform:scale(0.6);opacity:0.3} 40%{transform:scale(1);opacity:1} }
|
|
1872
|
+
@keyframes pl-fade { from{opacity:0;transform:translateY(10px)} to{opacity:1;transform:translateY(0)} }
|
|
1873
|
+
@keyframes pl-bar { 0%{background-position:0% 50%} 100%{background-position:200% 50%} }
|
|
1874
|
+
`), /* @__PURE__ */ React12.createElement("div", { style: {
|
|
1875
|
+
width: "100%",
|
|
1876
|
+
height: "100%",
|
|
1877
|
+
background: bg,
|
|
1878
|
+
display: "flex",
|
|
1879
|
+
flexDirection: "column",
|
|
1880
|
+
alignItems: "center",
|
|
1881
|
+
justifyContent: "center",
|
|
1882
|
+
gap: "28px",
|
|
1883
|
+
fontFamily: "system-ui, -apple-system, sans-serif",
|
|
1884
|
+
animation: "pl-fade 0.3s ease"
|
|
1885
|
+
} }, /* @__PURE__ */ React12.createElement("div", { style: {
|
|
1886
|
+
position: "absolute",
|
|
1887
|
+
top: "-100px",
|
|
1888
|
+
left: "-100px",
|
|
1889
|
+
width: "400px",
|
|
1890
|
+
height: "400px",
|
|
1891
|
+
borderRadius: "50%",
|
|
1892
|
+
background: `radial-gradient(circle, ${alpha(accent, 0.12)}, transparent 70%)`,
|
|
1893
|
+
filter: "blur(60px)",
|
|
1894
|
+
pointerEvents: "none"
|
|
1895
|
+
} }), /* @__PURE__ */ React12.createElement("div", { style: {
|
|
1896
|
+
position: "absolute",
|
|
1897
|
+
bottom: "-100px",
|
|
1898
|
+
right: "-100px",
|
|
1899
|
+
width: "350px",
|
|
1900
|
+
height: "350px",
|
|
1901
|
+
borderRadius: "50%",
|
|
1902
|
+
background: `radial-gradient(circle, ${alpha(accent, 0.08)}, transparent 70%)`,
|
|
1903
|
+
filter: "blur(60px)",
|
|
1904
|
+
pointerEvents: "none"
|
|
1905
|
+
} }), /* @__PURE__ */ React12.createElement("div", { style: { display: "flex", alignItems: "center", gap: "10px", animation: "pl-fade 0.4s ease" } }, /* @__PURE__ */ React12.createElement("div", { style: {
|
|
1906
|
+
width: "36px",
|
|
1907
|
+
height: "36px",
|
|
1908
|
+
borderRadius: "10px",
|
|
1909
|
+
background: `linear-gradient(135deg, ${accent}, ${alpha(accent, 0.6)})`,
|
|
1910
|
+
display: "flex",
|
|
1911
|
+
alignItems: "center",
|
|
1912
|
+
justifyContent: "center",
|
|
1913
|
+
fontSize: "16px",
|
|
1914
|
+
fontWeight: "800",
|
|
1915
|
+
color: "#fff",
|
|
1916
|
+
animation: type === "pulse" ? `pl-pulse 1.5s ease infinite` : "none"
|
|
1917
|
+
} }, logo[0]), /* @__PURE__ */ React12.createElement("span", { style: { fontSize: "20px", fontWeight: "800", color: "#fff", letterSpacing: "-0.5px" } }, logo)), type === "spinner" && /* @__PURE__ */ React12.createElement("div", { style: { position: "relative", width: "56px", height: "56px" } }, /* @__PURE__ */ React12.createElement("svg", { width: "56", height: "56", viewBox: "0 0 56 56" }, /* @__PURE__ */ React12.createElement(
|
|
1918
|
+
"circle",
|
|
1919
|
+
{
|
|
1920
|
+
cx: "28",
|
|
1921
|
+
cy: "28",
|
|
1922
|
+
r: "22",
|
|
1923
|
+
fill: "none",
|
|
1924
|
+
stroke: alpha(accent, 0.12),
|
|
1925
|
+
strokeWidth: "4"
|
|
1926
|
+
}
|
|
1927
|
+
), /* @__PURE__ */ React12.createElement(
|
|
1928
|
+
"circle",
|
|
1929
|
+
{
|
|
1930
|
+
cx: "28",
|
|
1931
|
+
cy: "28",
|
|
1932
|
+
r: "22",
|
|
1933
|
+
fill: "none",
|
|
1934
|
+
stroke: accent,
|
|
1935
|
+
strokeWidth: "4",
|
|
1936
|
+
strokeLinecap: "round",
|
|
1937
|
+
strokeDasharray: "34.8 104.4",
|
|
1938
|
+
style: { transformOrigin: "center", animation: "pl-spin 0.9s linear infinite" }
|
|
1939
|
+
}
|
|
1940
|
+
)), /* @__PURE__ */ React12.createElement("span", { style: {
|
|
1941
|
+
position: "absolute",
|
|
1942
|
+
inset: 0,
|
|
1943
|
+
display: "flex",
|
|
1944
|
+
alignItems: "center",
|
|
1945
|
+
justifyContent: "center",
|
|
1946
|
+
fontSize: "11px",
|
|
1947
|
+
fontWeight: "700",
|
|
1948
|
+
color: accent
|
|
1949
|
+
} }, Math.round(progress), "%")), type === "dots" && /* @__PURE__ */ React12.createElement("div", { style: { display: "flex", gap: "10px", alignItems: "center" } }, [0, 1, 2].map((i) => /* @__PURE__ */ React12.createElement("div", { key: i, style: {
|
|
1950
|
+
width: "12px",
|
|
1951
|
+
height: "12px",
|
|
1952
|
+
borderRadius: "50%",
|
|
1953
|
+
background: accent,
|
|
1954
|
+
animation: `pl-dot 1.2s ease infinite`,
|
|
1955
|
+
animationDelay: `${i * 0.2}s`
|
|
1956
|
+
} }))), type === "pulse" && /* @__PURE__ */ React12.createElement("div", { style: { position: "relative", width: "56px", height: "56px" } }, [0, 1].map((i) => /* @__PURE__ */ React12.createElement("div", { key: i, style: {
|
|
1957
|
+
position: "absolute",
|
|
1958
|
+
inset: 0,
|
|
1959
|
+
borderRadius: "50%",
|
|
1960
|
+
background: alpha(accent, 0.3),
|
|
1961
|
+
animation: `pl-pulse 1.5s ease infinite`,
|
|
1962
|
+
animationDelay: `${i * 0.4}s`
|
|
1963
|
+
} })), /* @__PURE__ */ React12.createElement("div", { style: {
|
|
1964
|
+
position: "absolute",
|
|
1965
|
+
inset: "30%",
|
|
1966
|
+
borderRadius: "50%",
|
|
1967
|
+
background: accent
|
|
1968
|
+
} })), type === "ring" && /* @__PURE__ */ React12.createElement("div", { style: {
|
|
1969
|
+
width: "52px",
|
|
1970
|
+
height: "52px",
|
|
1971
|
+
borderRadius: "50%",
|
|
1972
|
+
border: `4px solid ${alpha(accent, 0.15)}`,
|
|
1973
|
+
borderTop: `4px solid ${accent}`,
|
|
1974
|
+
borderRight: `4px solid ${accent}`,
|
|
1975
|
+
animation: "pl-spin 0.9s linear infinite"
|
|
1976
|
+
} }), type === "bar" && /* @__PURE__ */ React12.createElement("div", { style: { width: "200px", display: "flex", flexDirection: "column", gap: "8px" } }, /* @__PURE__ */ React12.createElement("div", { style: {
|
|
1977
|
+
width: "100%",
|
|
1978
|
+
height: "4px",
|
|
1979
|
+
background: alpha(accent, 0.15),
|
|
1980
|
+
borderRadius: "2px",
|
|
1981
|
+
overflow: "hidden"
|
|
1982
|
+
} }, /* @__PURE__ */ React12.createElement("div", { style: {
|
|
1983
|
+
height: "100%",
|
|
1984
|
+
width: `${progress}%`,
|
|
1985
|
+
borderRadius: "2px",
|
|
1986
|
+
background: `linear-gradient(90deg, ${accent}, ${alpha(accent, 0.6)}, ${accent})`,
|
|
1987
|
+
backgroundSize: "200% 100%",
|
|
1988
|
+
animation: "pl-bar 1.2s linear infinite",
|
|
1989
|
+
transition: "width 0.03s linear"
|
|
1990
|
+
} })), /* @__PURE__ */ React12.createElement("div", { style: {
|
|
1991
|
+
display: "flex",
|
|
1992
|
+
justifyContent: "space-between",
|
|
1993
|
+
fontSize: "11px",
|
|
1994
|
+
color: "rgba(255,255,255,0.3)"
|
|
1995
|
+
} }, /* @__PURE__ */ React12.createElement("span", null, loadingText), /* @__PURE__ */ React12.createElement("span", null, Math.round(progress), "%")), subText && /* @__PURE__ */ React12.createElement("p", { style: { fontSize: "12px", color: "rgba(255,255,255,0.18)", margin: "4px 0 0", textAlign: "center" } }, subText)), type !== "bar" && /* @__PURE__ */ React12.createElement("div", { style: { textAlign: "center" } }, /* @__PURE__ */ React12.createElement("p", { style: { fontSize: "13px", color: "rgba(255,255,255,0.3)", margin: "0 0 4px" } }, loadingText), subText && /* @__PURE__ */ React12.createElement("p", { style: { fontSize: "12px", color: "rgba(255,255,255,0.15)", margin: 0 } }, subText))));
|
|
1996
|
+
};
|
|
1997
|
+
|
|
1998
|
+
// src/components/OTPInput/OTPInput.jsx
|
|
1999
|
+
import React13, { useState as useState11, useRef, useEffect as useEffect6 } from "react";
|
|
2000
|
+
var OTPInput = ({
|
|
2001
|
+
length = 6,
|
|
2002
|
+
onComplete = () => {
|
|
2003
|
+
},
|
|
2004
|
+
onCancel = () => {
|
|
2005
|
+
},
|
|
2006
|
+
accent = "#6366f1",
|
|
2007
|
+
bg = "#0f172a",
|
|
2008
|
+
radius = "16px",
|
|
2009
|
+
label = "Enter verification code",
|
|
2010
|
+
subLabel = "We sent a code to your email",
|
|
2011
|
+
errorText = "",
|
|
2012
|
+
resendText = "Resend code",
|
|
2013
|
+
onResend = () => {
|
|
2014
|
+
}
|
|
2015
|
+
}) => {
|
|
2016
|
+
const [otp, setOtp] = useState11(Array(length).fill(""));
|
|
2017
|
+
const [focused, setFocused] = useState11(0);
|
|
2018
|
+
const [completed, setCompleted] = useState11(false);
|
|
2019
|
+
const [resendTimer, setResendTimer] = useState11(30);
|
|
2020
|
+
const inputs = useRef([]);
|
|
2021
|
+
const alpha = (hex, op) => {
|
|
2022
|
+
const r = parseInt(hex.slice(1, 3), 16);
|
|
2023
|
+
const g = parseInt(hex.slice(3, 5), 16);
|
|
2024
|
+
const b = parseInt(hex.slice(5, 7), 16);
|
|
2025
|
+
return `rgba(${r},${g},${b},${op})`;
|
|
2026
|
+
};
|
|
2027
|
+
useEffect6(() => {
|
|
2028
|
+
var _a;
|
|
2029
|
+
(_a = inputs.current[0]) == null ? void 0 : _a.focus();
|
|
2030
|
+
}, []);
|
|
2031
|
+
useEffect6(() => {
|
|
2032
|
+
if (resendTimer <= 0) return;
|
|
2033
|
+
const t = setInterval(() => setResendTimer((s) => s - 1), 1e3);
|
|
2034
|
+
return () => clearInterval(t);
|
|
2035
|
+
}, [resendTimer]);
|
|
2036
|
+
const handleChange = (e, i) => {
|
|
2037
|
+
var _a;
|
|
2038
|
+
const val = e.target.value.replace(/\D/g, "").slice(-1);
|
|
2039
|
+
const newOtp = [...otp];
|
|
2040
|
+
newOtp[i] = val;
|
|
2041
|
+
setOtp(newOtp);
|
|
2042
|
+
if (val && i < length - 1) {
|
|
2043
|
+
(_a = inputs.current[i + 1]) == null ? void 0 : _a.focus();
|
|
2044
|
+
setFocused(i + 1);
|
|
2045
|
+
}
|
|
2046
|
+
if (newOtp.every((v) => v !== "")) {
|
|
2047
|
+
setCompleted(true);
|
|
2048
|
+
onComplete(newOtp.join(""));
|
|
2049
|
+
} else {
|
|
2050
|
+
setCompleted(false);
|
|
2051
|
+
}
|
|
2052
|
+
};
|
|
2053
|
+
const handleKeyDown = (e, i) => {
|
|
2054
|
+
var _a, _b, _c;
|
|
2055
|
+
if (e.key === "Backspace") {
|
|
2056
|
+
const newOtp = [...otp];
|
|
2057
|
+
if (otp[i]) {
|
|
2058
|
+
newOtp[i] = "";
|
|
2059
|
+
setOtp(newOtp);
|
|
2060
|
+
} else if (i > 0) {
|
|
2061
|
+
newOtp[i - 1] = "";
|
|
2062
|
+
setOtp(newOtp);
|
|
2063
|
+
(_a = inputs.current[i - 1]) == null ? void 0 : _a.focus();
|
|
2064
|
+
setFocused(i - 1);
|
|
2065
|
+
}
|
|
2066
|
+
setCompleted(false);
|
|
2067
|
+
}
|
|
2068
|
+
if (e.key === "ArrowLeft" && i > 0) {
|
|
2069
|
+
(_b = inputs.current[i - 1]) == null ? void 0 : _b.focus();
|
|
2070
|
+
setFocused(i - 1);
|
|
2071
|
+
}
|
|
2072
|
+
if (e.key === "ArrowRight" && i < length - 1) {
|
|
2073
|
+
(_c = inputs.current[i + 1]) == null ? void 0 : _c.focus();
|
|
2074
|
+
setFocused(i + 1);
|
|
2075
|
+
}
|
|
2076
|
+
};
|
|
2077
|
+
const handlePaste = (e) => {
|
|
2078
|
+
var _a;
|
|
2079
|
+
e.preventDefault();
|
|
2080
|
+
const pasted = e.clipboardData.getData("text").replace(/\D/g, "").slice(0, length);
|
|
2081
|
+
if (!pasted) return;
|
|
2082
|
+
const newOtp = [...otp];
|
|
2083
|
+
pasted.split("").forEach((ch, i) => {
|
|
2084
|
+
newOtp[i] = ch;
|
|
2085
|
+
});
|
|
2086
|
+
setOtp(newOtp);
|
|
2087
|
+
const nextIndex = Math.min(pasted.length, length - 1);
|
|
2088
|
+
(_a = inputs.current[nextIndex]) == null ? void 0 : _a.focus();
|
|
2089
|
+
setFocused(nextIndex);
|
|
2090
|
+
if (newOtp.every((v) => v !== "")) {
|
|
2091
|
+
setCompleted(true);
|
|
2092
|
+
onComplete(newOtp.join(""));
|
|
2093
|
+
}
|
|
2094
|
+
};
|
|
2095
|
+
const handleResend = () => {
|
|
2096
|
+
var _a;
|
|
2097
|
+
setOtp(Array(length).fill(""));
|
|
2098
|
+
setCompleted(false);
|
|
2099
|
+
setResendTimer(30);
|
|
2100
|
+
(_a = inputs.current[0]) == null ? void 0 : _a.focus();
|
|
2101
|
+
setFocused(0);
|
|
2102
|
+
onResend();
|
|
2103
|
+
};
|
|
2104
|
+
return /* @__PURE__ */ React13.createElement("div", { style: {
|
|
2105
|
+
background: bg,
|
|
2106
|
+
borderRadius: radius,
|
|
2107
|
+
padding: "28px 24px",
|
|
2108
|
+
width: "fit-content",
|
|
2109
|
+
fontFamily: "system-ui, sans-serif",
|
|
2110
|
+
border: "1px solid rgba(255,255,255,0.07)",
|
|
2111
|
+
boxShadow: "0 10px 40px rgba(0,0,0,0.4)"
|
|
2112
|
+
} }, /* @__PURE__ */ React13.createElement("div", { style: { textAlign: "center", marginBottom: "24px" } }, /* @__PURE__ */ React13.createElement("div", { style: {
|
|
2113
|
+
width: "44px",
|
|
2114
|
+
height: "44px",
|
|
2115
|
+
borderRadius: "12px",
|
|
2116
|
+
background: alpha(accent, 0.12),
|
|
2117
|
+
border: `1px solid ${alpha(accent, 0.25)}`,
|
|
2118
|
+
display: "flex",
|
|
2119
|
+
alignItems: "center",
|
|
2120
|
+
justifyContent: "center",
|
|
2121
|
+
margin: "0 auto 14px"
|
|
2122
|
+
} }, /* @__PURE__ */ React13.createElement(
|
|
2123
|
+
"svg",
|
|
2124
|
+
{
|
|
2125
|
+
width: "20",
|
|
2126
|
+
height: "20",
|
|
2127
|
+
viewBox: "0 0 24 24",
|
|
2128
|
+
fill: "none",
|
|
2129
|
+
stroke: accent,
|
|
2130
|
+
strokeWidth: "2",
|
|
2131
|
+
strokeLinecap: "round",
|
|
2132
|
+
strokeLinejoin: "round"
|
|
2133
|
+
},
|
|
2134
|
+
/* @__PURE__ */ React13.createElement("rect", { x: "2", y: "7", width: "20", height: "14", rx: "2" }),
|
|
2135
|
+
/* @__PURE__ */ React13.createElement("path", { d: "M16 3l-4 4-4-4" })
|
|
2136
|
+
)), /* @__PURE__ */ React13.createElement("p", { style: { fontSize: "15px", fontWeight: "700", color: "#fff", margin: "0 0 5px" } }, label), /* @__PURE__ */ React13.createElement("p", { style: { fontSize: "12px", color: "rgba(255,255,255,0.35)", margin: 0 } }, subLabel)), /* @__PURE__ */ React13.createElement("div", { style: { display: "flex", gap: "10px", justifyContent: "center", marginBottom: "8px" } }, otp.map((val, i) => /* @__PURE__ */ React13.createElement(
|
|
2137
|
+
"input",
|
|
2138
|
+
{
|
|
2139
|
+
key: i,
|
|
2140
|
+
ref: (el) => inputs.current[i] = el,
|
|
2141
|
+
type: "text",
|
|
2142
|
+
inputMode: "numeric",
|
|
2143
|
+
maxLength: 1,
|
|
2144
|
+
value: val,
|
|
2145
|
+
onChange: (e) => handleChange(e, i),
|
|
2146
|
+
onKeyDown: (e) => handleKeyDown(e, i),
|
|
2147
|
+
onPaste: handlePaste,
|
|
2148
|
+
onFocus: () => setFocused(i),
|
|
2149
|
+
style: {
|
|
2150
|
+
width: "44px",
|
|
2151
|
+
height: "52px",
|
|
2152
|
+
textAlign: "center",
|
|
2153
|
+
fontSize: "20px",
|
|
2154
|
+
fontWeight: "700",
|
|
2155
|
+
color: "#fff",
|
|
2156
|
+
background: val ? alpha(accent, 0.1) : "rgba(255,255,255,0.04)",
|
|
2157
|
+
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)"}`,
|
|
2158
|
+
borderRadius: "12px",
|
|
2159
|
+
outline: "none",
|
|
2160
|
+
caretColor: accent,
|
|
2161
|
+
transition: "all 0.2s",
|
|
2162
|
+
fontFamily: "inherit"
|
|
2163
|
+
}
|
|
2164
|
+
}
|
|
2165
|
+
))), length === 6 && /* @__PURE__ */ React13.createElement("div", { style: { display: "flex", justifyContent: "center", marginBottom: "8px" } }, /* @__PURE__ */ React13.createElement("div", { style: { display: "flex", gap: "10px" } }, [0, 1, 2].map((i) => /* @__PURE__ */ React13.createElement("div", { key: i, style: { width: "44px" } })), /* @__PURE__ */ React13.createElement("div", { style: { width: "10px", display: "flex", alignItems: "center", justifyContent: "center" } }, /* @__PURE__ */ React13.createElement("div", { style: { width: "6px", height: "1.5px", background: "rgba(255,255,255,0.15)", borderRadius: "1px" } })), [0, 1, 2].map((i) => /* @__PURE__ */ React13.createElement("div", { key: i, style: { width: "44px" } })))), errorText && /* @__PURE__ */ React13.createElement("p", { style: {
|
|
2166
|
+
fontSize: "12px",
|
|
2167
|
+
color: "#f87171",
|
|
2168
|
+
textAlign: "center",
|
|
2169
|
+
margin: "6px 0 0",
|
|
2170
|
+
display: "flex",
|
|
2171
|
+
alignItems: "center",
|
|
2172
|
+
justifyContent: "center",
|
|
2173
|
+
gap: "5px"
|
|
2174
|
+
} }, /* @__PURE__ */ React13.createElement(
|
|
2175
|
+
"svg",
|
|
2176
|
+
{
|
|
2177
|
+
width: "12",
|
|
2178
|
+
height: "12",
|
|
2179
|
+
viewBox: "0 0 24 24",
|
|
2180
|
+
fill: "none",
|
|
2181
|
+
stroke: "currentColor",
|
|
2182
|
+
strokeWidth: "2.5",
|
|
2183
|
+
strokeLinecap: "round"
|
|
2184
|
+
},
|
|
2185
|
+
/* @__PURE__ */ React13.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
|
2186
|
+
/* @__PURE__ */ React13.createElement("line", { x1: "12", y1: "8", x2: "12", y2: "12" }),
|
|
2187
|
+
/* @__PURE__ */ React13.createElement("line", { x1: "12", y1: "16", x2: "12.01", y2: "16" })
|
|
2188
|
+
), errorText), /* @__PURE__ */ React13.createElement(
|
|
2189
|
+
"button",
|
|
2190
|
+
{
|
|
2191
|
+
onClick: () => completed && onComplete(otp.join("")),
|
|
2192
|
+
disabled: !completed,
|
|
2193
|
+
style: {
|
|
2194
|
+
width: "100%",
|
|
2195
|
+
padding: "12px",
|
|
2196
|
+
borderRadius: "12px",
|
|
2197
|
+
border: "none",
|
|
2198
|
+
marginTop: "20px",
|
|
2199
|
+
background: completed ? `linear-gradient(135deg, ${accent}, ${alpha(accent, 0.7)})` : "rgba(255,255,255,0.06)",
|
|
2200
|
+
color: completed ? "#fff" : "rgba(255,255,255,0.25)",
|
|
2201
|
+
fontSize: "14px",
|
|
2202
|
+
fontWeight: "700",
|
|
2203
|
+
cursor: completed ? "pointer" : "not-allowed",
|
|
2204
|
+
fontFamily: "inherit",
|
|
2205
|
+
transition: "all 0.25s"
|
|
2206
|
+
}
|
|
2207
|
+
},
|
|
2208
|
+
completed ? "Verify Code" : `Enter ${length - otp.filter((v) => v).length} more digit${length - otp.filter((v) => v).length !== 1 ? "s" : ""}`
|
|
2209
|
+
), /* @__PURE__ */ React13.createElement("p", { style: { textAlign: "center", fontSize: "12px", color: "rgba(255,255,255,0.25)", margin: "14px 0 0" } }, "Didn't receive it?", " ", /* @__PURE__ */ React13.createElement(
|
|
2210
|
+
"button",
|
|
2211
|
+
{
|
|
2212
|
+
onClick: handleResend,
|
|
2213
|
+
disabled: resendTimer > 0,
|
|
2214
|
+
style: {
|
|
2215
|
+
background: "transparent",
|
|
2216
|
+
border: "none",
|
|
2217
|
+
padding: 0,
|
|
2218
|
+
fontSize: "12px",
|
|
2219
|
+
fontWeight: "700",
|
|
2220
|
+
color: resendTimer > 0 ? "rgba(255,255,255,0.25)" : accent,
|
|
2221
|
+
cursor: resendTimer > 0 ? "default" : "pointer",
|
|
2222
|
+
fontFamily: "inherit"
|
|
2223
|
+
}
|
|
2224
|
+
},
|
|
2225
|
+
resendTimer > 0 ? `${resendText} (${resendTimer}s)` : resendText
|
|
2226
|
+
)));
|
|
2227
|
+
};
|
|
2472
2228
|
export {
|
|
2473
|
-
Avatar,
|
|
2474
2229
|
AvatarCard,
|
|
2475
2230
|
BackgoundImageSlider,
|
|
2476
2231
|
Charts,
|
|
2477
|
-
CodeBlock,
|
|
2478
|
-
CustomInputField,
|
|
2479
|
-
DividerLine,
|
|
2480
|
-
FileUpload,
|
|
2481
2232
|
Footer,
|
|
2482
2233
|
ImageCard,
|
|
2483
2234
|
ImageSlider,
|
|
2484
2235
|
Loader,
|
|
2485
|
-
LoadingSpinner,
|
|
2486
2236
|
Navbar,
|
|
2487
2237
|
NotificationToast,
|
|
2488
|
-
|
|
2238
|
+
OTPInput,
|
|
2239
|
+
PageLoader,
|
|
2489
2240
|
PricingCard,
|
|
2490
|
-
|
|
2491
|
-
SearchBar,
|
|
2492
|
-
Sidebar,
|
|
2493
|
-
SkeletonLoader,
|
|
2494
|
-
SmartButton,
|
|
2495
|
-
StatCard,
|
|
2496
|
-
Tabs,
|
|
2497
|
-
TextArea,
|
|
2498
|
-
ToastNotification
|
|
2241
|
+
Sidebar
|
|
2499
2242
|
};
|