viscous-ui 1.0.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +365 -0
- package/dist/index.js +4018 -0
- package/dist/index.mjs +3958 -0
- package/package.json +22 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,4018 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/index.js
|
|
30
|
+
var index_exports = {};
|
|
31
|
+
__export(index_exports, {
|
|
32
|
+
AnimatedButton: () => AnimatedButton,
|
|
33
|
+
AnimatedForm: () => AnimatedForm,
|
|
34
|
+
AvatarCard: () => AvatarCard,
|
|
35
|
+
BackgoundImageSlider: () => BackgoundImageSlider,
|
|
36
|
+
Button: () => Button,
|
|
37
|
+
Card: () => Card,
|
|
38
|
+
Charts: () => Charts,
|
|
39
|
+
ColorPicker: () => ColorPicker,
|
|
40
|
+
EcommerceCard: () => EcommerceCard,
|
|
41
|
+
FileUpload: () => FileUpload,
|
|
42
|
+
Footer: () => Footer,
|
|
43
|
+
ImageCard: () => ImageCard,
|
|
44
|
+
ImageSlider: () => ImageSlider,
|
|
45
|
+
InvoiceCard: () => InvoiceCard,
|
|
46
|
+
Loader: () => Loader,
|
|
47
|
+
Navbar: () => Navbar,
|
|
48
|
+
NotificationToast: () => NotificationToast,
|
|
49
|
+
OTPInput: () => OTPInput,
|
|
50
|
+
PageLoader: () => PageLoader,
|
|
51
|
+
PricingCard: () => PricingCard,
|
|
52
|
+
ProgressBar: () => ProgressBar,
|
|
53
|
+
RatingStars: () => RatingStars,
|
|
54
|
+
ReviewCard: () => ReviewCard,
|
|
55
|
+
Sidebar: () => Sidebar,
|
|
56
|
+
StatCard: () => StatCard
|
|
57
|
+
});
|
|
58
|
+
module.exports = __toCommonJS(index_exports);
|
|
59
|
+
|
|
60
|
+
// src/components/Loader/Loader.jsx
|
|
61
|
+
var import_react = __toESM(require("react"));
|
|
62
|
+
var Loader = ({
|
|
63
|
+
type = "spinner",
|
|
64
|
+
size = 48,
|
|
65
|
+
accent = "#6366f1",
|
|
66
|
+
bg = "transparent",
|
|
67
|
+
label = "",
|
|
68
|
+
speed = 1
|
|
69
|
+
}) => {
|
|
70
|
+
const [dots, setDots] = (0, import_react.useState)(0);
|
|
71
|
+
const [progress, setProgress] = (0, import_react.useState)(0);
|
|
72
|
+
const alpha = (hex, op) => {
|
|
73
|
+
const r = parseInt(hex.slice(1, 3), 16);
|
|
74
|
+
const g = parseInt(hex.slice(3, 5), 16);
|
|
75
|
+
const b = parseInt(hex.slice(5, 7), 16);
|
|
76
|
+
return `rgba(${r},${g},${b},${op})`;
|
|
77
|
+
};
|
|
78
|
+
(0, import_react.useEffect)(() => {
|
|
79
|
+
if (type === "dots") {
|
|
80
|
+
const t = setInterval(() => setDots((d) => (d + 1) % 4), 400 / speed);
|
|
81
|
+
return () => clearInterval(t);
|
|
82
|
+
}
|
|
83
|
+
if (type === "bar") {
|
|
84
|
+
const t = setInterval(() => setProgress((p) => p >= 100 ? 0 : p + 2), 30 / speed);
|
|
85
|
+
return () => clearInterval(t);
|
|
86
|
+
}
|
|
87
|
+
}, [type, speed]);
|
|
88
|
+
const dur = `${1 / speed}s`;
|
|
89
|
+
const wrapStyle = {
|
|
90
|
+
display: "inline-flex",
|
|
91
|
+
flexDirection: "column",
|
|
92
|
+
alignItems: "center",
|
|
93
|
+
justifyContent: "center",
|
|
94
|
+
gap: "12px",
|
|
95
|
+
background: bg,
|
|
96
|
+
padding: bg !== "transparent" ? "24px" : "0",
|
|
97
|
+
borderRadius: "16px",
|
|
98
|
+
fontFamily: "system-ui, sans-serif"
|
|
99
|
+
};
|
|
100
|
+
const labelEl = label ? /* @__PURE__ */ import_react.default.createElement("span", { style: { fontSize: "13px", color: "rgba(255,255,255,0.45)", letterSpacing: "0.3px" } }, label) : null;
|
|
101
|
+
if (type === "spinner") return /* @__PURE__ */ import_react.default.createElement("div", { style: wrapStyle }, /* @__PURE__ */ import_react.default.createElement("svg", { width: size, height: size, viewBox: "0 0 48 48" }, /* @__PURE__ */ import_react.default.createElement(
|
|
102
|
+
"circle",
|
|
103
|
+
{
|
|
104
|
+
cx: "24",
|
|
105
|
+
cy: "24",
|
|
106
|
+
r: "20",
|
|
107
|
+
fill: "none",
|
|
108
|
+
stroke: alpha(accent, 0.15),
|
|
109
|
+
strokeWidth: "4"
|
|
110
|
+
}
|
|
111
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
112
|
+
"circle",
|
|
113
|
+
{
|
|
114
|
+
cx: "24",
|
|
115
|
+
cy: "24",
|
|
116
|
+
r: "20",
|
|
117
|
+
fill: "none",
|
|
118
|
+
stroke: accent,
|
|
119
|
+
strokeWidth: "4",
|
|
120
|
+
strokeLinecap: "round",
|
|
121
|
+
strokeDasharray: "31.4 94.2",
|
|
122
|
+
style: { transformOrigin: "center", animation: `spin ${dur} linear infinite` }
|
|
123
|
+
}
|
|
124
|
+
), /* @__PURE__ */ import_react.default.createElement("style", null, `@keyframes spin { to { transform: rotate(360deg); } }`)), labelEl);
|
|
125
|
+
if (type === "pulse") return /* @__PURE__ */ import_react.default.createElement("div", { style: wrapStyle }, /* @__PURE__ */ import_react.default.createElement("div", { style: { position: "relative", width: size, height: size } }, /* @__PURE__ */ import_react.default.createElement("div", { style: {
|
|
126
|
+
position: "absolute",
|
|
127
|
+
inset: 0,
|
|
128
|
+
borderRadius: "50%",
|
|
129
|
+
background: alpha(accent, 0.2),
|
|
130
|
+
animation: `pulse ${dur} ease-out infinite`
|
|
131
|
+
} }), /* @__PURE__ */ import_react.default.createElement("div", { style: {
|
|
132
|
+
position: "absolute",
|
|
133
|
+
inset: "25%",
|
|
134
|
+
borderRadius: "50%",
|
|
135
|
+
background: accent
|
|
136
|
+
} }), /* @__PURE__ */ import_react.default.createElement("style", null, `@keyframes pulse { 0%{transform:scale(1);opacity:1} 100%{transform:scale(2);opacity:0} }`)), labelEl);
|
|
137
|
+
if (type === "dots") return /* @__PURE__ */ import_react.default.createElement("div", { style: wrapStyle }, /* @__PURE__ */ import_react.default.createElement("div", { style: { display: "flex", gap: "8px", alignItems: "center" } }, [0, 1, 2].map((i) => /* @__PURE__ */ import_react.default.createElement("div", { key: i, style: {
|
|
138
|
+
width: size / 5,
|
|
139
|
+
height: size / 5,
|
|
140
|
+
borderRadius: "50%",
|
|
141
|
+
background: dots === i ? accent : alpha(accent, 0.25),
|
|
142
|
+
transition: "background 0.2s"
|
|
143
|
+
} }))), labelEl);
|
|
144
|
+
if (type === "bar") return /* @__PURE__ */ import_react.default.createElement("div", { style: wrapStyle }, /* @__PURE__ */ import_react.default.createElement("div", { style: {
|
|
145
|
+
width: size * 3,
|
|
146
|
+
height: size / 8,
|
|
147
|
+
background: alpha(accent, 0.15),
|
|
148
|
+
borderRadius: "99px",
|
|
149
|
+
overflow: "hidden"
|
|
150
|
+
} }, /* @__PURE__ */ import_react.default.createElement("div", { style: {
|
|
151
|
+
height: "100%",
|
|
152
|
+
borderRadius: "99px",
|
|
153
|
+
background: accent,
|
|
154
|
+
width: `${progress}%`,
|
|
155
|
+
transition: "width 0.03s linear"
|
|
156
|
+
} })), labelEl);
|
|
157
|
+
if (type === "ring") return /* @__PURE__ */ import_react.default.createElement("div", { style: wrapStyle }, /* @__PURE__ */ import_react.default.createElement("div", { style: {
|
|
158
|
+
width: size,
|
|
159
|
+
height: size,
|
|
160
|
+
borderRadius: "50%",
|
|
161
|
+
border: `4px solid ${alpha(accent, 0.15)}`,
|
|
162
|
+
borderTop: `4px solid ${accent}`,
|
|
163
|
+
borderRight: `4px solid ${accent}`,
|
|
164
|
+
animation: `spin ${dur} linear infinite`
|
|
165
|
+
} }), /* @__PURE__ */ import_react.default.createElement("style", null, `@keyframes spin { to { transform: rotate(360deg); } }`), labelEl);
|
|
166
|
+
return null;
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
// src/components/NotificationToast/NotificationToast.jsx
|
|
170
|
+
var import_react2 = __toESM(require("react"));
|
|
171
|
+
var NotificationToast = ({
|
|
172
|
+
title = "New Message",
|
|
173
|
+
message = "You have a new notification from the team.",
|
|
174
|
+
type = "success",
|
|
175
|
+
duration = 3e3,
|
|
176
|
+
accent = "#6366f1",
|
|
177
|
+
bg = "#0f172a",
|
|
178
|
+
radius = "14px",
|
|
179
|
+
showProgress = true
|
|
180
|
+
}) => {
|
|
181
|
+
const [visible, setVisible] = (0, import_react2.useState)(true);
|
|
182
|
+
const [progress, setProgress] = (0, import_react2.useState)(100);
|
|
183
|
+
const typeColors = {
|
|
184
|
+
success: "#10b981",
|
|
185
|
+
error: "#ef4444",
|
|
186
|
+
warning: "#f59e0b",
|
|
187
|
+
info: "#3b82f6"
|
|
188
|
+
};
|
|
189
|
+
const typeIcons = {
|
|
190
|
+
success: "M5 13l4 4L19 7",
|
|
191
|
+
error: "M6 18L18 6M6 6l12 12",
|
|
192
|
+
warning: "M12 9v4m0 4h.01M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z",
|
|
193
|
+
info: "M13 16h-1v-4h-1m1-4h.01M12 2a10 10 0 100 20A10 10 0 0012 2z"
|
|
194
|
+
};
|
|
195
|
+
const color = typeColors[type] || accent;
|
|
196
|
+
(0, import_react2.useEffect)(() => {
|
|
197
|
+
if (!showProgress) return;
|
|
198
|
+
const step = 100 / (duration / 50);
|
|
199
|
+
const timer = setInterval(() => {
|
|
200
|
+
setProgress((p) => {
|
|
201
|
+
if (p <= 0) {
|
|
202
|
+
clearInterval(timer);
|
|
203
|
+
setVisible(false);
|
|
204
|
+
return 0;
|
|
205
|
+
}
|
|
206
|
+
return p - step;
|
|
207
|
+
});
|
|
208
|
+
}, 50);
|
|
209
|
+
return () => clearInterval(timer);
|
|
210
|
+
}, [duration, showProgress]);
|
|
211
|
+
if (!visible) return null;
|
|
212
|
+
return /* @__PURE__ */ import_react2.default.createElement("div", { style: {
|
|
213
|
+
background: bg,
|
|
214
|
+
borderRadius: radius,
|
|
215
|
+
padding: "16px 18px",
|
|
216
|
+
width: "320px",
|
|
217
|
+
color: "white",
|
|
218
|
+
fontFamily: "system-ui, sans-serif",
|
|
219
|
+
boxShadow: "0 10px 40px rgba(0,0,0,0.5)",
|
|
220
|
+
border: `1px solid rgba(255,255,255,0.08)`,
|
|
221
|
+
position: "relative",
|
|
222
|
+
overflow: "hidden"
|
|
223
|
+
} }, /* @__PURE__ */ import_react2.default.createElement("div", { style: { display: "flex", alignItems: "flex-start", gap: "12px" } }, /* @__PURE__ */ import_react2.default.createElement("div", { style: {
|
|
224
|
+
width: 36,
|
|
225
|
+
height: 36,
|
|
226
|
+
borderRadius: "10px",
|
|
227
|
+
flexShrink: 0,
|
|
228
|
+
background: `${color}22`,
|
|
229
|
+
border: `1px solid ${color}44`,
|
|
230
|
+
display: "flex",
|
|
231
|
+
alignItems: "center",
|
|
232
|
+
justifyContent: "center"
|
|
233
|
+
} }, /* @__PURE__ */ import_react2.default.createElement(
|
|
234
|
+
"svg",
|
|
235
|
+
{
|
|
236
|
+
width: "16",
|
|
237
|
+
height: "16",
|
|
238
|
+
viewBox: "0 0 24 24",
|
|
239
|
+
fill: "none",
|
|
240
|
+
stroke: color,
|
|
241
|
+
strokeWidth: "2.5",
|
|
242
|
+
strokeLinecap: "round",
|
|
243
|
+
strokeLinejoin: "round"
|
|
244
|
+
},
|
|
245
|
+
/* @__PURE__ */ import_react2.default.createElement("path", { d: typeIcons[type] || typeIcons.info })
|
|
246
|
+
)), /* @__PURE__ */ import_react2.default.createElement("div", { style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ import_react2.default.createElement("div", { style: { fontSize: "14px", fontWeight: "700", marginBottom: "3px" } }, title), /* @__PURE__ */ import_react2.default.createElement("div", { style: { fontSize: "12px", color: "rgba(255,255,255,0.5)", lineHeight: 1.5 } }, message)), /* @__PURE__ */ import_react2.default.createElement(
|
|
247
|
+
"button",
|
|
248
|
+
{
|
|
249
|
+
onClick: () => setVisible(false),
|
|
250
|
+
style: {
|
|
251
|
+
background: "transparent",
|
|
252
|
+
border: "none",
|
|
253
|
+
cursor: "pointer",
|
|
254
|
+
color: "rgba(255,255,255,0.3)",
|
|
255
|
+
padding: "2px",
|
|
256
|
+
flexShrink: 0,
|
|
257
|
+
lineHeight: 1
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
261
|
+
"svg",
|
|
262
|
+
{
|
|
263
|
+
width: "14",
|
|
264
|
+
height: "14",
|
|
265
|
+
viewBox: "0 0 24 24",
|
|
266
|
+
fill: "none",
|
|
267
|
+
stroke: "currentColor",
|
|
268
|
+
strokeWidth: "2.5",
|
|
269
|
+
strokeLinecap: "round"
|
|
270
|
+
},
|
|
271
|
+
/* @__PURE__ */ import_react2.default.createElement("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
272
|
+
)
|
|
273
|
+
)), showProgress && /* @__PURE__ */ import_react2.default.createElement("div", { style: {
|
|
274
|
+
position: "absolute",
|
|
275
|
+
bottom: 0,
|
|
276
|
+
left: 0,
|
|
277
|
+
right: 0,
|
|
278
|
+
height: "3px",
|
|
279
|
+
background: "rgba(255,255,255,0.07)"
|
|
280
|
+
} }, /* @__PURE__ */ import_react2.default.createElement("div", { style: {
|
|
281
|
+
height: "100%",
|
|
282
|
+
width: `${progress}%`,
|
|
283
|
+
background: color,
|
|
284
|
+
transition: "width 0.05s linear",
|
|
285
|
+
borderRadius: "0 2px 2px 0"
|
|
286
|
+
} })));
|
|
287
|
+
};
|
|
288
|
+
|
|
289
|
+
// src/components/AvatarCard/AvatarCard.jsx
|
|
290
|
+
var import_react3 = __toESM(require("react"));
|
|
291
|
+
var AvatarCard = ({
|
|
292
|
+
name = "Aryan Sharma",
|
|
293
|
+
role = "Frontend Developer",
|
|
294
|
+
followers = 2400,
|
|
295
|
+
following = 180,
|
|
296
|
+
projects = 34,
|
|
297
|
+
bio = "Building beautiful UIs one component at a time.",
|
|
298
|
+
avatar = "",
|
|
299
|
+
accent = "#6366f1",
|
|
300
|
+
bg = "#0f172a",
|
|
301
|
+
radius = "20px"
|
|
302
|
+
}) => {
|
|
303
|
+
const [followed, setFollowed] = (0, import_react3.useState)(false);
|
|
304
|
+
const alpha = (hex, op) => {
|
|
305
|
+
const r = parseInt(hex.slice(1, 3), 16);
|
|
306
|
+
const g = parseInt(hex.slice(3, 5), 16);
|
|
307
|
+
const b = parseInt(hex.slice(5, 7), 16);
|
|
308
|
+
return `rgba(${r},${g},${b},${op})`;
|
|
309
|
+
};
|
|
310
|
+
const initials = name.split(" ").map((n) => n[0]).join("").slice(0, 2).toUpperCase();
|
|
311
|
+
const stats = [
|
|
312
|
+
{ label: "Followers", value: followed ? followers + 1 : followers },
|
|
313
|
+
{ label: "Following", value: following },
|
|
314
|
+
{ label: "Projects", value: projects }
|
|
315
|
+
];
|
|
316
|
+
return /* @__PURE__ */ import_react3.default.createElement("div", { style: {
|
|
317
|
+
background: bg,
|
|
318
|
+
borderRadius: radius,
|
|
319
|
+
padding: "24px 20px",
|
|
320
|
+
width: "280px",
|
|
321
|
+
color: "#fff",
|
|
322
|
+
fontFamily: "system-ui, sans-serif",
|
|
323
|
+
boxShadow: "0 10px 40px rgba(0,0,0,0.5)",
|
|
324
|
+
border: "1px solid rgba(255,255,255,0.08)",
|
|
325
|
+
position: "relative",
|
|
326
|
+
overflow: "hidden"
|
|
327
|
+
} }, /* @__PURE__ */ import_react3.default.createElement("div", { style: {
|
|
328
|
+
position: "absolute",
|
|
329
|
+
top: 0,
|
|
330
|
+
left: 0,
|
|
331
|
+
right: 0,
|
|
332
|
+
height: "3px",
|
|
333
|
+
background: `linear-gradient(90deg, ${accent}, ${alpha(accent, 0.3)})`
|
|
334
|
+
} }), /* @__PURE__ */ import_react3.default.createElement("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", marginBottom: "16px" } }, /* @__PURE__ */ import_react3.default.createElement("div", { style: {
|
|
335
|
+
width: 72,
|
|
336
|
+
height: 72,
|
|
337
|
+
borderRadius: "50%",
|
|
338
|
+
background: avatar ? `url(${avatar}) center/cover` : `linear-gradient(135deg, ${accent}, ${alpha(accent, 0.5)})`,
|
|
339
|
+
display: "flex",
|
|
340
|
+
alignItems: "center",
|
|
341
|
+
justifyContent: "center",
|
|
342
|
+
fontSize: "24px",
|
|
343
|
+
fontWeight: "800",
|
|
344
|
+
color: "#fff",
|
|
345
|
+
border: `3px solid ${alpha(accent, 0.4)}`,
|
|
346
|
+
marginBottom: "12px"
|
|
347
|
+
} }, !avatar && initials), /* @__PURE__ */ import_react3.default.createElement("div", { style: { fontSize: "16px", fontWeight: "700", marginBottom: "3px" } }, name), /* @__PURE__ */ import_react3.default.createElement("div", { style: {
|
|
348
|
+
fontSize: "12px",
|
|
349
|
+
fontWeight: "600",
|
|
350
|
+
color: accent,
|
|
351
|
+
background: alpha(accent, 0.12),
|
|
352
|
+
padding: "2px 10px",
|
|
353
|
+
borderRadius: "20px",
|
|
354
|
+
border: `1px solid ${alpha(accent, 0.3)}`
|
|
355
|
+
} }, role)), /* @__PURE__ */ import_react3.default.createElement("p", { style: {
|
|
356
|
+
fontSize: "12px",
|
|
357
|
+
color: "rgba(255,255,255,0.45)",
|
|
358
|
+
textAlign: "center",
|
|
359
|
+
lineHeight: 1.6,
|
|
360
|
+
marginBottom: "18px",
|
|
361
|
+
padding: "0 4px"
|
|
362
|
+
} }, bio), /* @__PURE__ */ import_react3.default.createElement("div", { style: {
|
|
363
|
+
display: "flex",
|
|
364
|
+
justifyContent: "space-around",
|
|
365
|
+
background: "rgba(255,255,255,0.04)",
|
|
366
|
+
border: "1px solid rgba(255,255,255,0.07)",
|
|
367
|
+
borderRadius: "12px",
|
|
368
|
+
padding: "12px 8px",
|
|
369
|
+
marginBottom: "16px"
|
|
370
|
+
} }, stats.map((s) => /* @__PURE__ */ import_react3.default.createElement("div", { key: s.label, style: { textAlign: "center" } }, /* @__PURE__ */ import_react3.default.createElement("div", { style: { fontSize: "18px", fontWeight: "800" } }, s.value >= 1e3 ? (s.value / 1e3).toFixed(1) + "k" : s.value), /* @__PURE__ */ import_react3.default.createElement("div", { style: { fontSize: "10px", color: "rgba(255,255,255,0.4)", marginTop: "2px" } }, s.label)))));
|
|
371
|
+
};
|
|
372
|
+
|
|
373
|
+
// src/components/PricingCard/PricingCard.jsx
|
|
374
|
+
var import_react4 = __toESM(require("react"));
|
|
375
|
+
var PricingCard = ({
|
|
376
|
+
planName = "Pro Plan",
|
|
377
|
+
description = "For teams that need more power.",
|
|
378
|
+
price = 29,
|
|
379
|
+
currency = "$",
|
|
380
|
+
period = "per month",
|
|
381
|
+
badgeText = "Most Popular",
|
|
382
|
+
ctaText = "Get Started",
|
|
383
|
+
accent = "#6366f1",
|
|
384
|
+
bg = "#0f172a",
|
|
385
|
+
radius = "20px",
|
|
386
|
+
features = [
|
|
387
|
+
"Unlimited projects",
|
|
388
|
+
"Priority support",
|
|
389
|
+
"Advanced analytics",
|
|
390
|
+
"Custom integrations",
|
|
391
|
+
"Team collaboration"
|
|
392
|
+
],
|
|
393
|
+
onCtaClick = () => {
|
|
394
|
+
}
|
|
395
|
+
}) => {
|
|
396
|
+
const alpha = (hex, op) => {
|
|
397
|
+
const r = parseInt(hex.slice(1, 3), 16);
|
|
398
|
+
const g = parseInt(hex.slice(3, 5), 16);
|
|
399
|
+
const b = parseInt(hex.slice(5, 7), 16);
|
|
400
|
+
return `rgba(${r},${g},${b},${op})`;
|
|
401
|
+
};
|
|
402
|
+
return /* @__PURE__ */ import_react4.default.createElement("div", { style: {
|
|
403
|
+
background: bg,
|
|
404
|
+
borderRadius: radius,
|
|
405
|
+
padding: "28px 24px",
|
|
406
|
+
width: "300px",
|
|
407
|
+
color: "#fff",
|
|
408
|
+
fontFamily: "system-ui, sans-serif",
|
|
409
|
+
boxShadow: "0 10px 40px rgba(0,0,0,0.5)",
|
|
410
|
+
border: `1px solid ${alpha(accent, 0.25)}`,
|
|
411
|
+
position: "relative",
|
|
412
|
+
overflow: "hidden"
|
|
413
|
+
} }, /* @__PURE__ */ import_react4.default.createElement("div", { style: {
|
|
414
|
+
position: "absolute",
|
|
415
|
+
top: 0,
|
|
416
|
+
left: 0,
|
|
417
|
+
right: 0,
|
|
418
|
+
height: "3px",
|
|
419
|
+
background: `linear-gradient(90deg, ${accent}, ${alpha(accent, 0.3)})`
|
|
420
|
+
} }), badgeText && /* @__PURE__ */ import_react4.default.createElement("div", { style: {
|
|
421
|
+
display: "inline-flex",
|
|
422
|
+
alignItems: "center",
|
|
423
|
+
gap: "6px",
|
|
424
|
+
padding: "4px 12px",
|
|
425
|
+
borderRadius: "100px",
|
|
426
|
+
marginBottom: "14px",
|
|
427
|
+
background: alpha(accent, 0.12),
|
|
428
|
+
border: `1px solid ${alpha(accent, 0.3)}`,
|
|
429
|
+
fontSize: "11px",
|
|
430
|
+
fontWeight: "700",
|
|
431
|
+
color: accent,
|
|
432
|
+
letterSpacing: "0.5px",
|
|
433
|
+
textTransform: "uppercase"
|
|
434
|
+
} }, /* @__PURE__ */ import_react4.default.createElement("div", { style: { width: 6, height: 6, borderRadius: "50%", background: accent } }), badgeText), /* @__PURE__ */ import_react4.default.createElement("div", { style: { fontSize: "20px", fontWeight: "800", marginBottom: "4px" } }, planName), /* @__PURE__ */ import_react4.default.createElement("div", { style: { fontSize: "13px", color: "rgba(255,255,255,0.45)", marginBottom: "20px", lineHeight: 1.5 } }, description), /* @__PURE__ */ import_react4.default.createElement("div", { style: { display: "flex", alignItems: "flex-end", gap: "3px", marginBottom: "4px" } }, /* @__PURE__ */ import_react4.default.createElement("span", { style: { fontSize: "18px", fontWeight: "700", color: "rgba(255,255,255,0.5)", lineHeight: 2 } }, currency), /* @__PURE__ */ import_react4.default.createElement("span", { style: { fontSize: "52px", fontWeight: "800", color: "#fff", lineHeight: 1 } }, Math.round(price))), /* @__PURE__ */ import_react4.default.createElement("div", { style: { fontSize: "12px", color: "rgba(255,255,255,0.35)", marginBottom: "20px" } }, period), /* @__PURE__ */ import_react4.default.createElement("div", { style: { height: "1px", background: "rgba(255,255,255,0.07)", marginBottom: "16px" } }), /* @__PURE__ */ import_react4.default.createElement("ul", { style: { listStyle: "none", padding: 0, margin: "0 0 22px", display: "flex", flexDirection: "column", gap: "10px" } }, features.map((f, i) => /* @__PURE__ */ import_react4.default.createElement("li", { key: i, style: { display: "flex", alignItems: "center", gap: "10px", fontSize: "13px", color: "rgba(255,255,255,0.75)" } }, /* @__PURE__ */ import_react4.default.createElement("div", { style: {
|
|
435
|
+
width: "18px",
|
|
436
|
+
height: "18px",
|
|
437
|
+
borderRadius: "50%",
|
|
438
|
+
flexShrink: 0,
|
|
439
|
+
display: "flex",
|
|
440
|
+
alignItems: "center",
|
|
441
|
+
justifyContent: "center",
|
|
442
|
+
background: alpha(accent, 0.18),
|
|
443
|
+
border: `1px solid ${alpha(accent, 0.4)}`
|
|
444
|
+
} }, /* @__PURE__ */ import_react4.default.createElement(
|
|
445
|
+
"svg",
|
|
446
|
+
{
|
|
447
|
+
width: "10",
|
|
448
|
+
height: "10",
|
|
449
|
+
viewBox: "0 0 12 12",
|
|
450
|
+
fill: "none",
|
|
451
|
+
stroke: "#fff",
|
|
452
|
+
strokeWidth: "2",
|
|
453
|
+
strokeLinecap: "round",
|
|
454
|
+
strokeLinejoin: "round"
|
|
455
|
+
},
|
|
456
|
+
/* @__PURE__ */ import_react4.default.createElement("polyline", { points: "1.5,6 4.5,9 10.5,3" })
|
|
457
|
+
)), f))), /* @__PURE__ */ import_react4.default.createElement(
|
|
458
|
+
"button",
|
|
459
|
+
{
|
|
460
|
+
onClick: onCtaClick,
|
|
461
|
+
style: {
|
|
462
|
+
width: "100%",
|
|
463
|
+
padding: "13px",
|
|
464
|
+
borderRadius: "12px",
|
|
465
|
+
border: "none",
|
|
466
|
+
background: `linear-gradient(135deg, ${accent}, ${alpha(accent, 0.7)})`,
|
|
467
|
+
color: "#fff",
|
|
468
|
+
fontSize: "14px",
|
|
469
|
+
fontWeight: "700",
|
|
470
|
+
cursor: "pointer",
|
|
471
|
+
letterSpacing: "0.2px",
|
|
472
|
+
fontFamily: "system-ui, sans-serif"
|
|
473
|
+
},
|
|
474
|
+
onMouseEnter: (e) => e.currentTarget.style.opacity = "0.88",
|
|
475
|
+
onMouseLeave: (e) => e.currentTarget.style.opacity = "1"
|
|
476
|
+
},
|
|
477
|
+
ctaText
|
|
478
|
+
));
|
|
479
|
+
};
|
|
480
|
+
|
|
481
|
+
// src/components/Navbar/Navbar.jsx
|
|
482
|
+
var import_react5 = __toESM(require("react"));
|
|
483
|
+
var Navbar = ({
|
|
484
|
+
logo = "VirtualAI",
|
|
485
|
+
links = ["Home", "Features", "Pricing", "Blog"],
|
|
486
|
+
ctaText = "Get Started",
|
|
487
|
+
accent = "#6366f1",
|
|
488
|
+
bg = "#0f172a",
|
|
489
|
+
onCtaClick = () => {
|
|
490
|
+
},
|
|
491
|
+
onLinkClick = () => {
|
|
492
|
+
}
|
|
493
|
+
}) => {
|
|
494
|
+
const [scrolled, setScrolled] = (0, import_react5.useState)(false);
|
|
495
|
+
const [menuOpen, setMenuOpen] = (0, import_react5.useState)(false);
|
|
496
|
+
const [active, setActive] = (0, import_react5.useState)("Home");
|
|
497
|
+
const [isMobile, setIsMobile] = (0, import_react5.useState)(false);
|
|
498
|
+
const alpha = (hex, op) => {
|
|
499
|
+
const r = parseInt(hex.slice(1, 3), 16);
|
|
500
|
+
const g = parseInt(hex.slice(3, 5), 16);
|
|
501
|
+
const b = parseInt(hex.slice(5, 7), 16);
|
|
502
|
+
return `rgba(${r},${g},${b},${op})`;
|
|
503
|
+
};
|
|
504
|
+
(0, import_react5.useEffect)(() => {
|
|
505
|
+
const checkMobile = () => setIsMobile(window.innerWidth < 768);
|
|
506
|
+
checkMobile();
|
|
507
|
+
window.addEventListener("resize", checkMobile);
|
|
508
|
+
return () => window.removeEventListener("resize", checkMobile);
|
|
509
|
+
}, []);
|
|
510
|
+
(0, import_react5.useEffect)(() => {
|
|
511
|
+
const handler = () => setScrolled(window.scrollY > 10);
|
|
512
|
+
window.addEventListener("scroll", handler);
|
|
513
|
+
return () => window.removeEventListener("scroll", handler);
|
|
514
|
+
}, []);
|
|
515
|
+
(0, import_react5.useEffect)(() => {
|
|
516
|
+
if (!isMobile) setMenuOpen(false);
|
|
517
|
+
}, [isMobile]);
|
|
518
|
+
const handleLink = (link) => {
|
|
519
|
+
setActive(link);
|
|
520
|
+
setMenuOpen(false);
|
|
521
|
+
onLinkClick(link);
|
|
522
|
+
};
|
|
523
|
+
return /* @__PURE__ */ import_react5.default.createElement(import_react5.default.Fragment, null, /* @__PURE__ */ import_react5.default.createElement("style", null, `
|
|
524
|
+
@keyframes nbSlideDown {
|
|
525
|
+
from { opacity: 0; transform: translateY(-8px); }
|
|
526
|
+
to { opacity: 1; transform: translateY(0); }
|
|
527
|
+
}
|
|
528
|
+
.nb-link:hover { color: rgba(255,255,255,0.9) !important; background: rgba(255,255,255,0.05) !important; }
|
|
529
|
+
.nb-cta:hover { opacity: 0.85 !important; }
|
|
530
|
+
.nb-ham:hover { background: rgba(255,255,255,0.1) !important; }
|
|
531
|
+
.nb-mlink:hover { background: rgba(255,255,255,0.06) !important; }
|
|
532
|
+
`), /* @__PURE__ */ import_react5.default.createElement("nav", { style: {
|
|
533
|
+
position: "sticky",
|
|
534
|
+
top: 0,
|
|
535
|
+
left: 0,
|
|
536
|
+
right: 0,
|
|
537
|
+
zIndex: 1e3,
|
|
538
|
+
background: scrolled ? alpha(bg, 0.96) : bg,
|
|
539
|
+
borderBottom: `1px solid ${scrolled ? "rgba(255,255,255,0.09)" : "rgba(255,255,255,0.04)"}`,
|
|
540
|
+
backdropFilter: scrolled ? "blur(12px)" : "none",
|
|
541
|
+
WebkitBackdropFilter: scrolled ? "blur(12px)" : "none",
|
|
542
|
+
transition: "all 0.3s ease",
|
|
543
|
+
fontFamily: "system-ui, -apple-system, sans-serif",
|
|
544
|
+
width: "100%",
|
|
545
|
+
boxSizing: "border-box"
|
|
546
|
+
} }, /* @__PURE__ */ import_react5.default.createElement("div", { style: {
|
|
547
|
+
maxWidth: "1200px",
|
|
548
|
+
margin: "0 auto",
|
|
549
|
+
padding: "0 20px",
|
|
550
|
+
height: isMobile ? "56px" : "64px",
|
|
551
|
+
display: "flex",
|
|
552
|
+
alignItems: "center",
|
|
553
|
+
justifyContent: "space-between",
|
|
554
|
+
gap: "16px",
|
|
555
|
+
boxSizing: "border-box"
|
|
556
|
+
} }, /* @__PURE__ */ import_react5.default.createElement("div", { style: { display: "flex", alignItems: "center", gap: "8px", cursor: "pointer", flexShrink: 0 } }, /* @__PURE__ */ import_react5.default.createElement("div", { style: {
|
|
557
|
+
width: isMobile ? "26px" : "30px",
|
|
558
|
+
height: isMobile ? "26px" : "30px",
|
|
559
|
+
borderRadius: "8px",
|
|
560
|
+
background: `linear-gradient(135deg, ${accent}, ${alpha(accent, 0.6)})`,
|
|
561
|
+
display: "flex",
|
|
562
|
+
alignItems: "center",
|
|
563
|
+
justifyContent: "center",
|
|
564
|
+
fontSize: isMobile ? "12px" : "14px",
|
|
565
|
+
fontWeight: "800",
|
|
566
|
+
color: "#fff",
|
|
567
|
+
flexShrink: 0
|
|
568
|
+
} }, logo[0]), /* @__PURE__ */ import_react5.default.createElement("span", { style: {
|
|
569
|
+
fontSize: isMobile ? "14px" : "16px",
|
|
570
|
+
fontWeight: "800",
|
|
571
|
+
color: "#fff",
|
|
572
|
+
letterSpacing: "-0.3px"
|
|
573
|
+
} }, logo)), !isMobile && /* @__PURE__ */ import_react5.default.createElement("div", { style: { display: "flex", alignItems: "center", gap: "2px", flex: 1, justifyContent: "center" } }, links.map((link) => /* @__PURE__ */ import_react5.default.createElement(
|
|
574
|
+
"button",
|
|
575
|
+
{
|
|
576
|
+
key: link,
|
|
577
|
+
className: "nb-link",
|
|
578
|
+
onClick: () => handleLink(link),
|
|
579
|
+
style: {
|
|
580
|
+
background: active === link ? alpha(accent, 0.12) : "transparent",
|
|
581
|
+
border: "none",
|
|
582
|
+
padding: "7px 16px",
|
|
583
|
+
borderRadius: "9px",
|
|
584
|
+
fontSize: "14px",
|
|
585
|
+
fontWeight: active === link ? "700" : "500",
|
|
586
|
+
color: active === link ? accent : "rgba(255,255,255,0.5)",
|
|
587
|
+
cursor: "pointer",
|
|
588
|
+
transition: "all 0.2s",
|
|
589
|
+
fontFamily: "inherit",
|
|
590
|
+
whiteSpace: "nowrap"
|
|
591
|
+
}
|
|
592
|
+
},
|
|
593
|
+
link
|
|
594
|
+
))), /* @__PURE__ */ import_react5.default.createElement("div", { style: { display: "flex", alignItems: "center", gap: "8px", flexShrink: 0 } }, /* @__PURE__ */ import_react5.default.createElement(
|
|
595
|
+
"button",
|
|
596
|
+
{
|
|
597
|
+
className: "nb-cta",
|
|
598
|
+
onClick: onCtaClick,
|
|
599
|
+
style: {
|
|
600
|
+
padding: isMobile ? "7px 14px" : "9px 20px",
|
|
601
|
+
borderRadius: "10px",
|
|
602
|
+
border: "none",
|
|
603
|
+
background: `linear-gradient(135deg, ${accent}, ${alpha(accent, 0.75)})`,
|
|
604
|
+
color: "#fff",
|
|
605
|
+
fontSize: isMobile ? "12px" : "13px",
|
|
606
|
+
fontWeight: "700",
|
|
607
|
+
cursor: "pointer",
|
|
608
|
+
fontFamily: "inherit",
|
|
609
|
+
transition: "opacity 0.2s",
|
|
610
|
+
whiteSpace: "nowrap"
|
|
611
|
+
}
|
|
612
|
+
},
|
|
613
|
+
ctaText
|
|
614
|
+
), isMobile && /* @__PURE__ */ import_react5.default.createElement(
|
|
615
|
+
"button",
|
|
616
|
+
{
|
|
617
|
+
className: "nb-ham",
|
|
618
|
+
onClick: () => setMenuOpen((o) => !o),
|
|
619
|
+
style: {
|
|
620
|
+
background: "rgba(255,255,255,0.06)",
|
|
621
|
+
border: "1px solid rgba(255,255,255,0.1)",
|
|
622
|
+
borderRadius: "8px",
|
|
623
|
+
width: "34px",
|
|
624
|
+
height: "34px",
|
|
625
|
+
cursor: "pointer",
|
|
626
|
+
display: "flex",
|
|
627
|
+
flexDirection: "column",
|
|
628
|
+
alignItems: "center",
|
|
629
|
+
justifyContent: "center",
|
|
630
|
+
gap: "5px",
|
|
631
|
+
transition: "background 0.2s",
|
|
632
|
+
flexShrink: 0,
|
|
633
|
+
padding: 0
|
|
634
|
+
}
|
|
635
|
+
},
|
|
636
|
+
/* @__PURE__ */ import_react5.default.createElement("div", { style: {
|
|
637
|
+
width: "16px",
|
|
638
|
+
height: "1.5px",
|
|
639
|
+
background: "rgba(255,255,255,0.7)",
|
|
640
|
+
borderRadius: "2px",
|
|
641
|
+
transform: menuOpen ? "rotate(45deg) translate(4px, 4px)" : "none",
|
|
642
|
+
transition: "transform 0.25s"
|
|
643
|
+
} }),
|
|
644
|
+
/* @__PURE__ */ import_react5.default.createElement("div", { style: {
|
|
645
|
+
width: "16px",
|
|
646
|
+
height: "1.5px",
|
|
647
|
+
background: "rgba(255,255,255,0.7)",
|
|
648
|
+
borderRadius: "2px",
|
|
649
|
+
opacity: menuOpen ? 0 : 1,
|
|
650
|
+
transition: "opacity 0.2s"
|
|
651
|
+
} }),
|
|
652
|
+
/* @__PURE__ */ import_react5.default.createElement("div", { style: {
|
|
653
|
+
width: "16px",
|
|
654
|
+
height: "1.5px",
|
|
655
|
+
background: "rgba(255,255,255,0.7)",
|
|
656
|
+
borderRadius: "2px",
|
|
657
|
+
transform: menuOpen ? "rotate(-45deg) translate(4px, -4px)" : "none",
|
|
658
|
+
transition: "transform 0.25s"
|
|
659
|
+
} })
|
|
660
|
+
))), isMobile && menuOpen && /* @__PURE__ */ import_react5.default.createElement("div", { style: {
|
|
661
|
+
animation: "nbSlideDown 0.2s ease",
|
|
662
|
+
borderTop: "1px solid rgba(255,255,255,0.06)",
|
|
663
|
+
padding: "10px 16px 16px",
|
|
664
|
+
display: "flex",
|
|
665
|
+
flexDirection: "column",
|
|
666
|
+
gap: "3px",
|
|
667
|
+
background: alpha(bg, 0.98)
|
|
668
|
+
} }, links.map((link) => /* @__PURE__ */ import_react5.default.createElement(
|
|
669
|
+
"button",
|
|
670
|
+
{
|
|
671
|
+
key: link,
|
|
672
|
+
className: "nb-mlink",
|
|
673
|
+
onClick: () => handleLink(link),
|
|
674
|
+
style: {
|
|
675
|
+
background: active === link ? alpha(accent, 0.1) : "transparent",
|
|
676
|
+
border: "none",
|
|
677
|
+
padding: "11px 14px",
|
|
678
|
+
borderRadius: "10px",
|
|
679
|
+
fontSize: "14px",
|
|
680
|
+
fontWeight: active === link ? "700" : "500",
|
|
681
|
+
color: active === link ? accent : "rgba(255,255,255,0.55)",
|
|
682
|
+
cursor: "pointer",
|
|
683
|
+
textAlign: "left",
|
|
684
|
+
fontFamily: "inherit",
|
|
685
|
+
width: "100%",
|
|
686
|
+
transition: "all 0.15s",
|
|
687
|
+
display: "flex",
|
|
688
|
+
alignItems: "center",
|
|
689
|
+
justifyContent: "space-between"
|
|
690
|
+
}
|
|
691
|
+
},
|
|
692
|
+
link,
|
|
693
|
+
active === link && /* @__PURE__ */ import_react5.default.createElement(
|
|
694
|
+
"svg",
|
|
695
|
+
{
|
|
696
|
+
width: "14",
|
|
697
|
+
height: "14",
|
|
698
|
+
viewBox: "0 0 24 24",
|
|
699
|
+
fill: "none",
|
|
700
|
+
stroke: accent,
|
|
701
|
+
strokeWidth: "2.5",
|
|
702
|
+
strokeLinecap: "round"
|
|
703
|
+
},
|
|
704
|
+
/* @__PURE__ */ import_react5.default.createElement("polyline", { points: "9 18 15 12 9 6" })
|
|
705
|
+
)
|
|
706
|
+
)), /* @__PURE__ */ import_react5.default.createElement("div", { style: { height: "1px", background: "rgba(255,255,255,0.07)", margin: "8px 0" } }), /* @__PURE__ */ import_react5.default.createElement(
|
|
707
|
+
"button",
|
|
708
|
+
{
|
|
709
|
+
onClick: () => {
|
|
710
|
+
setMenuOpen(false);
|
|
711
|
+
onCtaClick();
|
|
712
|
+
},
|
|
713
|
+
style: {
|
|
714
|
+
background: `linear-gradient(135deg, ${accent}, ${alpha(accent, 0.75)})`,
|
|
715
|
+
border: "none",
|
|
716
|
+
padding: "12px",
|
|
717
|
+
borderRadius: "12px",
|
|
718
|
+
fontSize: "14px",
|
|
719
|
+
fontWeight: "700",
|
|
720
|
+
color: "#fff",
|
|
721
|
+
cursor: "pointer",
|
|
722
|
+
fontFamily: "inherit",
|
|
723
|
+
width: "100%"
|
|
724
|
+
}
|
|
725
|
+
},
|
|
726
|
+
ctaText
|
|
727
|
+
))));
|
|
728
|
+
};
|
|
729
|
+
|
|
730
|
+
// src/components/Footer/Footer.jsx
|
|
731
|
+
var import_react6 = __toESM(require("react"));
|
|
732
|
+
var Footer = ({
|
|
733
|
+
logo = "VirtualAI",
|
|
734
|
+
links = ["Home", "Features", "Pricing", "Blog", "Contact"],
|
|
735
|
+
copyright = "VirtualAI",
|
|
736
|
+
accent = "#6366f1",
|
|
737
|
+
bg = "#0f172a"
|
|
738
|
+
}) => {
|
|
739
|
+
return /* @__PURE__ */ import_react6.default.createElement("footer", { style: {
|
|
740
|
+
background: bg,
|
|
741
|
+
borderTop: "1px solid rgba(255,255,255,0.06)",
|
|
742
|
+
fontFamily: "system-ui, sans-serif",
|
|
743
|
+
width: "100%",
|
|
744
|
+
boxSizing: "border-box",
|
|
745
|
+
padding: "28px 24px"
|
|
746
|
+
} }, /* @__PURE__ */ import_react6.default.createElement("div", { style: {
|
|
747
|
+
maxWidth: "900px",
|
|
748
|
+
margin: "0 auto",
|
|
749
|
+
display: "flex",
|
|
750
|
+
flexDirection: "column",
|
|
751
|
+
alignItems: "center",
|
|
752
|
+
gap: "20px"
|
|
753
|
+
} }, /* @__PURE__ */ import_react6.default.createElement("div", { style: { display: "flex", alignItems: "center", gap: "8px" } }, /* @__PURE__ */ import_react6.default.createElement("div", { style: {
|
|
754
|
+
width: "26px",
|
|
755
|
+
height: "26px",
|
|
756
|
+
borderRadius: "7px",
|
|
757
|
+
background: `linear-gradient(135deg, ${accent}, rgba(99,102,241,0.5))`,
|
|
758
|
+
display: "flex",
|
|
759
|
+
alignItems: "center",
|
|
760
|
+
justifyContent: "center",
|
|
761
|
+
fontSize: "12px",
|
|
762
|
+
fontWeight: "800",
|
|
763
|
+
color: "#fff"
|
|
764
|
+
} }, logo[0]), /* @__PURE__ */ import_react6.default.createElement("span", { style: { fontSize: "15px", fontWeight: "800", color: "#fff" } }, logo)), /* @__PURE__ */ import_react6.default.createElement("div", { style: { display: "flex", flexWrap: "wrap", justifyContent: "center", gap: "4px" } }, links.map((link) => /* @__PURE__ */ import_react6.default.createElement(
|
|
765
|
+
"a",
|
|
766
|
+
{
|
|
767
|
+
key: link,
|
|
768
|
+
href: "#",
|
|
769
|
+
style: {
|
|
770
|
+
fontSize: "13px",
|
|
771
|
+
color: "rgba(255,255,255,0.4)",
|
|
772
|
+
textDecoration: "none",
|
|
773
|
+
padding: "4px 12px",
|
|
774
|
+
borderRadius: "8px",
|
|
775
|
+
transition: "color 0.2s"
|
|
776
|
+
},
|
|
777
|
+
onMouseEnter: (e) => e.currentTarget.style.color = "rgba(255,255,255,0.85)",
|
|
778
|
+
onMouseLeave: (e) => e.currentTarget.style.color = "rgba(255,255,255,0.4)"
|
|
779
|
+
},
|
|
780
|
+
link
|
|
781
|
+
))), /* @__PURE__ */ import_react6.default.createElement("div", { style: { width: "100%", height: "1px", background: "rgba(255,255,255,0.06)" } }), /* @__PURE__ */ import_react6.default.createElement("p", { style: { fontSize: "12px", color: "rgba(255,255,255,0.22)", margin: 0 } }, "\xA9 ", (/* @__PURE__ */ new Date()).getFullYear(), " ", copyright, ". All rights reserved.")));
|
|
782
|
+
};
|
|
783
|
+
|
|
784
|
+
// src/components/Sidebar/Sidebar.jsx
|
|
785
|
+
var import_react7 = __toESM(require("react"));
|
|
786
|
+
var Sidebar = ({
|
|
787
|
+
logo = "VirtualAI",
|
|
788
|
+
accent = "#6366f1",
|
|
789
|
+
bg = "#0f172a",
|
|
790
|
+
items = [
|
|
791
|
+
{
|
|
792
|
+
label: "Dashboard",
|
|
793
|
+
icon: "M3 3h7v7H3zM14 3h7v7h-7zM3 14h7v7H3zM14 14h7v7h-7z",
|
|
794
|
+
component: /* @__PURE__ */ import_react7.default.createElement("div", { style: { padding: "24px" } }, /* @__PURE__ */ import_react7.default.createElement("h2", { style: { color: "#fff", fontSize: "20px", fontWeight: "700", marginBottom: "8px" } }, "Dashboard"), /* @__PURE__ */ import_react7.default.createElement("p", { style: { color: "rgba(255,255,255,0.4)", fontSize: "14px" } }, "Welcome to your dashboard overview."))
|
|
795
|
+
},
|
|
796
|
+
{
|
|
797
|
+
label: "Analytics",
|
|
798
|
+
icon: "M18 20V10M12 20V4M6 20v-6",
|
|
799
|
+
component: /* @__PURE__ */ import_react7.default.createElement("div", { style: { padding: "24px" } }, /* @__PURE__ */ import_react7.default.createElement("h2", { style: { color: "#fff", fontSize: "20px", fontWeight: "700", marginBottom: "8px" } }, "Analytics"), /* @__PURE__ */ import_react7.default.createElement("p", { style: { color: "rgba(255,255,255,0.4)", fontSize: "14px" } }, "View your stats and performance here."))
|
|
800
|
+
},
|
|
801
|
+
{
|
|
802
|
+
label: "Users",
|
|
803
|
+
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",
|
|
804
|
+
component: /* @__PURE__ */ import_react7.default.createElement("div", { style: { padding: "24px" } }, /* @__PURE__ */ import_react7.default.createElement("h2", { style: { color: "#fff", fontSize: "20px", fontWeight: "700", marginBottom: "8px" } }, "Users"), /* @__PURE__ */ import_react7.default.createElement("p", { style: { color: "rgba(255,255,255,0.4)", fontSize: "14px" } }, "Manage your users and permissions."))
|
|
805
|
+
},
|
|
806
|
+
{
|
|
807
|
+
label: "Settings",
|
|
808
|
+
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",
|
|
809
|
+
component: /* @__PURE__ */ import_react7.default.createElement("div", { style: { padding: "24px" } }, /* @__PURE__ */ import_react7.default.createElement("h2", { style: { color: "#fff", fontSize: "20px", fontWeight: "700", marginBottom: "8px" } }, "Settings"), /* @__PURE__ */ import_react7.default.createElement("p", { style: { color: "rgba(255,255,255,0.4)", fontSize: "14px" } }, "Configure your preferences here."))
|
|
810
|
+
}
|
|
811
|
+
]
|
|
812
|
+
}) => {
|
|
813
|
+
const [active, setActive] = (0, import_react7.useState)(0);
|
|
814
|
+
const [collapsed, setCollapsed] = (0, import_react7.useState)(false);
|
|
815
|
+
const alpha = (hex, op) => {
|
|
816
|
+
const r = parseInt(hex.slice(1, 3), 16);
|
|
817
|
+
const g = parseInt(hex.slice(3, 5), 16);
|
|
818
|
+
const b = parseInt(hex.slice(5, 7), 16);
|
|
819
|
+
return `rgba(${r},${g},${b},${op})`;
|
|
820
|
+
};
|
|
821
|
+
const activeItem = items[active];
|
|
822
|
+
return /* @__PURE__ */ import_react7.default.createElement("div", { style: {
|
|
823
|
+
display: "flex",
|
|
824
|
+
height: "480px",
|
|
825
|
+
fontFamily: "system-ui, sans-serif",
|
|
826
|
+
borderRadius: "16px",
|
|
827
|
+
overflow: "hidden",
|
|
828
|
+
border: "1px solid rgba(255,255,255,0.07)"
|
|
829
|
+
} }, /* @__PURE__ */ import_react7.default.createElement("div", { style: {
|
|
830
|
+
width: collapsed ? "60px" : "200px",
|
|
831
|
+
background: bg,
|
|
832
|
+
borderRight: "1px solid rgba(255,255,255,0.06)",
|
|
833
|
+
display: "flex",
|
|
834
|
+
flexDirection: "column",
|
|
835
|
+
transition: "width 0.25s ease",
|
|
836
|
+
flexShrink: 0,
|
|
837
|
+
overflow: "hidden"
|
|
838
|
+
} }, /* @__PURE__ */ import_react7.default.createElement("div", { style: {
|
|
839
|
+
height: "56px",
|
|
840
|
+
display: "flex",
|
|
841
|
+
alignItems: "center",
|
|
842
|
+
gap: "10px",
|
|
843
|
+
padding: collapsed ? "0 14px" : "0 16px",
|
|
844
|
+
borderBottom: "1px solid rgba(255,255,255,0.05)",
|
|
845
|
+
overflow: "hidden",
|
|
846
|
+
flexShrink: 0
|
|
847
|
+
} }, /* @__PURE__ */ import_react7.default.createElement("div", { style: {
|
|
848
|
+
width: "28px",
|
|
849
|
+
height: "28px",
|
|
850
|
+
borderRadius: "8px",
|
|
851
|
+
flexShrink: 0,
|
|
852
|
+
background: `linear-gradient(135deg, ${accent}, ${alpha(accent, 0.6)})`,
|
|
853
|
+
display: "flex",
|
|
854
|
+
alignItems: "center",
|
|
855
|
+
justifyContent: "center",
|
|
856
|
+
fontSize: "13px",
|
|
857
|
+
fontWeight: "800",
|
|
858
|
+
color: "#fff"
|
|
859
|
+
} }, logo[0]), !collapsed && /* @__PURE__ */ import_react7.default.createElement("span", { style: { fontSize: "14px", fontWeight: "800", color: "#fff", whiteSpace: "nowrap" } }, logo)), /* @__PURE__ */ import_react7.default.createElement("nav", { style: { flex: 1, padding: "10px 8px", display: "flex", flexDirection: "column", gap: "3px", overflowY: "auto" } }, items.map((item, i) => /* @__PURE__ */ import_react7.default.createElement(
|
|
860
|
+
"button",
|
|
861
|
+
{
|
|
862
|
+
key: i,
|
|
863
|
+
onClick: () => setActive(i),
|
|
864
|
+
title: collapsed ? item.label : "",
|
|
865
|
+
style: {
|
|
866
|
+
display: "flex",
|
|
867
|
+
alignItems: "center",
|
|
868
|
+
gap: "10px",
|
|
869
|
+
padding: collapsed ? "9px 0" : "9px 12px",
|
|
870
|
+
justifyContent: collapsed ? "center" : "flex-start",
|
|
871
|
+
borderRadius: "10px",
|
|
872
|
+
border: "none",
|
|
873
|
+
cursor: "pointer",
|
|
874
|
+
transition: "all 0.2s",
|
|
875
|
+
fontFamily: "inherit",
|
|
876
|
+
width: "100%",
|
|
877
|
+
background: active === i ? alpha(accent, 0.12) : "transparent",
|
|
878
|
+
color: active === i ? accent : "rgba(255,255,255,0.45)",
|
|
879
|
+
borderLeft: active === i ? `2px solid ${accent}` : "2px solid transparent"
|
|
880
|
+
},
|
|
881
|
+
onMouseEnter: (e) => {
|
|
882
|
+
if (active !== i) {
|
|
883
|
+
e.currentTarget.style.background = "rgba(255,255,255,0.04)";
|
|
884
|
+
e.currentTarget.style.color = "rgba(255,255,255,0.8)";
|
|
885
|
+
}
|
|
886
|
+
},
|
|
887
|
+
onMouseLeave: (e) => {
|
|
888
|
+
if (active !== i) {
|
|
889
|
+
e.currentTarget.style.background = "transparent";
|
|
890
|
+
e.currentTarget.style.color = "rgba(255,255,255,0.45)";
|
|
891
|
+
}
|
|
892
|
+
}
|
|
893
|
+
},
|
|
894
|
+
/* @__PURE__ */ import_react7.default.createElement(
|
|
895
|
+
"svg",
|
|
896
|
+
{
|
|
897
|
+
width: "16",
|
|
898
|
+
height: "16",
|
|
899
|
+
viewBox: "0 0 24 24",
|
|
900
|
+
fill: "none",
|
|
901
|
+
stroke: "currentColor",
|
|
902
|
+
strokeWidth: "2",
|
|
903
|
+
strokeLinecap: "round",
|
|
904
|
+
strokeLinejoin: "round",
|
|
905
|
+
style: { flexShrink: 0 }
|
|
906
|
+
},
|
|
907
|
+
/* @__PURE__ */ import_react7.default.createElement("path", { d: item.icon })
|
|
908
|
+
),
|
|
909
|
+
!collapsed && /* @__PURE__ */ import_react7.default.createElement("span", { style: { fontSize: "13px", fontWeight: active === i ? "700" : "500", whiteSpace: "nowrap" } }, item.label)
|
|
910
|
+
))), /* @__PURE__ */ import_react7.default.createElement("div", { style: { padding: "8px", borderTop: "1px solid rgba(255,255,255,0.05)" } }, /* @__PURE__ */ import_react7.default.createElement(
|
|
911
|
+
"button",
|
|
912
|
+
{
|
|
913
|
+
onClick: () => setCollapsed((c) => !c),
|
|
914
|
+
style: {
|
|
915
|
+
width: "100%",
|
|
916
|
+
padding: "8px",
|
|
917
|
+
borderRadius: "9px",
|
|
918
|
+
border: "none",
|
|
919
|
+
background: "rgba(255,255,255,0.04)",
|
|
920
|
+
cursor: "pointer",
|
|
921
|
+
display: "flex",
|
|
922
|
+
alignItems: "center",
|
|
923
|
+
justifyContent: "center",
|
|
924
|
+
color: "rgba(255,255,255,0.3)",
|
|
925
|
+
transition: "all 0.2s"
|
|
926
|
+
},
|
|
927
|
+
onMouseEnter: (e) => e.currentTarget.style.color = "rgba(255,255,255,0.7)",
|
|
928
|
+
onMouseLeave: (e) => e.currentTarget.style.color = "rgba(255,255,255,0.3)"
|
|
929
|
+
},
|
|
930
|
+
/* @__PURE__ */ import_react7.default.createElement(
|
|
931
|
+
"svg",
|
|
932
|
+
{
|
|
933
|
+
width: "15",
|
|
934
|
+
height: "15",
|
|
935
|
+
viewBox: "0 0 24 24",
|
|
936
|
+
fill: "none",
|
|
937
|
+
stroke: "currentColor",
|
|
938
|
+
strokeWidth: "2",
|
|
939
|
+
strokeLinecap: "round"
|
|
940
|
+
},
|
|
941
|
+
/* @__PURE__ */ import_react7.default.createElement("path", { d: collapsed ? "M9 18l6-6-6-6" : "M15 18l-6-6 6-6" })
|
|
942
|
+
)
|
|
943
|
+
))), /* @__PURE__ */ import_react7.default.createElement("div", { style: {
|
|
944
|
+
flex: 1,
|
|
945
|
+
background: "rgba(255,255,255,0.02)",
|
|
946
|
+
overflow: "auto"
|
|
947
|
+
} }, /* @__PURE__ */ import_react7.default.createElement("div", { style: {
|
|
948
|
+
height: "56px",
|
|
949
|
+
display: "flex",
|
|
950
|
+
alignItems: "center",
|
|
951
|
+
padding: "0 20px",
|
|
952
|
+
borderBottom: "1px solid rgba(255,255,255,0.05)",
|
|
953
|
+
gap: "10px"
|
|
954
|
+
} }, /* @__PURE__ */ import_react7.default.createElement("div", { style: {
|
|
955
|
+
width: "6px",
|
|
956
|
+
height: "6px",
|
|
957
|
+
borderRadius: "50%",
|
|
958
|
+
background: accent
|
|
959
|
+
} }), /* @__PURE__ */ import_react7.default.createElement("span", { style: { fontSize: "14px", fontWeight: "700", color: "#fff" } }, activeItem == null ? void 0 : activeItem.label)), /* @__PURE__ */ import_react7.default.createElement("div", { style: { color: "#fff" } }, activeItem == null ? void 0 : activeItem.component)));
|
|
960
|
+
};
|
|
961
|
+
|
|
962
|
+
// src/components/Charts/Charts.jsx
|
|
963
|
+
var import_react8 = __toESM(require("react"));
|
|
964
|
+
var Charts = ({
|
|
965
|
+
type = "bar",
|
|
966
|
+
data = [
|
|
967
|
+
{ label: "Jan", value: 40 },
|
|
968
|
+
{ label: "Feb", value: 70 },
|
|
969
|
+
{ label: "Mar", value: 55 },
|
|
970
|
+
{ label: "Apr", value: 90 },
|
|
971
|
+
{ label: "May", value: 65 },
|
|
972
|
+
{ label: "Jun", value: 80 },
|
|
973
|
+
{ label: "Jul", value: 100 },
|
|
974
|
+
{ label: "Aug", value: 30 }
|
|
975
|
+
],
|
|
976
|
+
title = "Monthly Stats",
|
|
977
|
+
accent = "#6366f1",
|
|
978
|
+
bg = "#0f172a",
|
|
979
|
+
radius = "16px",
|
|
980
|
+
showGrid = true,
|
|
981
|
+
showValues = true
|
|
982
|
+
}) => {
|
|
983
|
+
const [hovered, setHovered] = (0, import_react8.useState)(null);
|
|
984
|
+
const alpha = (hex, op) => {
|
|
985
|
+
const r = parseInt(hex.slice(1, 3), 16);
|
|
986
|
+
const g = parseInt(hex.slice(3, 5), 16);
|
|
987
|
+
const b = parseInt(hex.slice(5, 7), 16);
|
|
988
|
+
return `rgba(${r},${g},${b},${op})`;
|
|
989
|
+
};
|
|
990
|
+
const max = Math.max(...data.map((d) => d.value));
|
|
991
|
+
const min = Math.min(...data.map((d) => d.value));
|
|
992
|
+
const W = 320;
|
|
993
|
+
const H = 160;
|
|
994
|
+
const padL = 28;
|
|
995
|
+
const padR = 12;
|
|
996
|
+
const padT = 16;
|
|
997
|
+
const padB = 28;
|
|
998
|
+
const chartW = W - padL - padR;
|
|
999
|
+
const chartH = H - padT - padB;
|
|
1000
|
+
const getX = (i) => padL + i / (data.length - 1) * chartW;
|
|
1001
|
+
const getY = (v) => padT + chartH - (v - min) / (max - min || 1) * chartH;
|
|
1002
|
+
const points = data.map((d, i) => `${getX(i)},${getY(d.value)}`).join(" ");
|
|
1003
|
+
const areaPoints = `${padL},${padT + chartH} ` + points + ` ${getX(data.length - 1)},${padT + chartH}`;
|
|
1004
|
+
const gridLines = [0, 0.25, 0.5, 0.75, 1].map((t) => ({
|
|
1005
|
+
y: padT + chartH * (1 - t),
|
|
1006
|
+
val: Math.round(min + t * (max - min))
|
|
1007
|
+
}));
|
|
1008
|
+
const BarChart = () => {
|
|
1009
|
+
const barW = Math.min(28, chartW / data.length * 0.55);
|
|
1010
|
+
return /* @__PURE__ */ import_react8.default.createElement("svg", { width: "100%", viewBox: `0 0 ${W} ${H}` }, showGrid && gridLines.map((g, i) => /* @__PURE__ */ import_react8.default.createElement("g", { key: i }, /* @__PURE__ */ import_react8.default.createElement(
|
|
1011
|
+
"line",
|
|
1012
|
+
{
|
|
1013
|
+
x1: padL,
|
|
1014
|
+
y1: g.y,
|
|
1015
|
+
x2: W - padR,
|
|
1016
|
+
y2: g.y,
|
|
1017
|
+
stroke: "rgba(255,255,255,0.05)",
|
|
1018
|
+
strokeWidth: "1"
|
|
1019
|
+
}
|
|
1020
|
+
), /* @__PURE__ */ import_react8.default.createElement(
|
|
1021
|
+
"text",
|
|
1022
|
+
{
|
|
1023
|
+
x: padL - 4,
|
|
1024
|
+
y: g.y + 4,
|
|
1025
|
+
textAnchor: "end",
|
|
1026
|
+
fill: "rgba(255,255,255,0.25)",
|
|
1027
|
+
fontSize: "9"
|
|
1028
|
+
},
|
|
1029
|
+
g.val
|
|
1030
|
+
))), data.map((d, i) => {
|
|
1031
|
+
const x = padL + i / data.length * chartW + (chartW / data.length - barW) / 2;
|
|
1032
|
+
const barH = (d.value - min) / (max - min || 1) * chartH;
|
|
1033
|
+
const y = padT + chartH - barH;
|
|
1034
|
+
const isH = hovered === i;
|
|
1035
|
+
return /* @__PURE__ */ import_react8.default.createElement("g", { key: i, onMouseEnter: () => setHovered(i), onMouseLeave: () => setHovered(null) }, /* @__PURE__ */ import_react8.default.createElement(
|
|
1036
|
+
"rect",
|
|
1037
|
+
{
|
|
1038
|
+
x,
|
|
1039
|
+
y: padT,
|
|
1040
|
+
width: barW,
|
|
1041
|
+
height: chartH,
|
|
1042
|
+
fill: "transparent",
|
|
1043
|
+
rx: "4"
|
|
1044
|
+
}
|
|
1045
|
+
), /* @__PURE__ */ import_react8.default.createElement(
|
|
1046
|
+
"rect",
|
|
1047
|
+
{
|
|
1048
|
+
x,
|
|
1049
|
+
y,
|
|
1050
|
+
width: barW,
|
|
1051
|
+
height: barH,
|
|
1052
|
+
fill: isH ? accent : alpha(accent, 0.55),
|
|
1053
|
+
rx: "4",
|
|
1054
|
+
style: { transition: "fill 0.15s" }
|
|
1055
|
+
}
|
|
1056
|
+
), showValues && isH && /* @__PURE__ */ import_react8.default.createElement(
|
|
1057
|
+
"text",
|
|
1058
|
+
{
|
|
1059
|
+
x: x + barW / 2,
|
|
1060
|
+
y: y - 5,
|
|
1061
|
+
textAnchor: "middle",
|
|
1062
|
+
fill: "#fff",
|
|
1063
|
+
fontSize: "9",
|
|
1064
|
+
fontWeight: "700"
|
|
1065
|
+
},
|
|
1066
|
+
d.value
|
|
1067
|
+
), /* @__PURE__ */ import_react8.default.createElement(
|
|
1068
|
+
"text",
|
|
1069
|
+
{
|
|
1070
|
+
x: x + barW / 2,
|
|
1071
|
+
y: H - 6,
|
|
1072
|
+
textAnchor: "middle",
|
|
1073
|
+
fill: "rgba(255,255,255,0.3)",
|
|
1074
|
+
fontSize: "9"
|
|
1075
|
+
},
|
|
1076
|
+
d.label
|
|
1077
|
+
));
|
|
1078
|
+
}));
|
|
1079
|
+
};
|
|
1080
|
+
const LineChart = () => /* @__PURE__ */ import_react8.default.createElement("svg", { width: "100%", viewBox: `0 0 ${W} ${H}` }, /* @__PURE__ */ import_react8.default.createElement("defs", null, /* @__PURE__ */ import_react8.default.createElement("linearGradient", { id: "lg", x1: "0", y1: "0", x2: "0", y2: "1" }, /* @__PURE__ */ import_react8.default.createElement("stop", { offset: "0%", stopColor: accent, stopOpacity: "0.3" }), /* @__PURE__ */ import_react8.default.createElement("stop", { offset: "100%", stopColor: accent, stopOpacity: "0" }))), showGrid && gridLines.map((g, i) => /* @__PURE__ */ import_react8.default.createElement("g", { key: i }, /* @__PURE__ */ import_react8.default.createElement(
|
|
1081
|
+
"line",
|
|
1082
|
+
{
|
|
1083
|
+
x1: padL,
|
|
1084
|
+
y1: g.y,
|
|
1085
|
+
x2: W - padR,
|
|
1086
|
+
y2: g.y,
|
|
1087
|
+
stroke: "rgba(255,255,255,0.05)",
|
|
1088
|
+
strokeWidth: "1"
|
|
1089
|
+
}
|
|
1090
|
+
), /* @__PURE__ */ import_react8.default.createElement(
|
|
1091
|
+
"text",
|
|
1092
|
+
{
|
|
1093
|
+
x: padL - 4,
|
|
1094
|
+
y: g.y + 4,
|
|
1095
|
+
textAnchor: "end",
|
|
1096
|
+
fill: "rgba(255,255,255,0.25)",
|
|
1097
|
+
fontSize: "9"
|
|
1098
|
+
},
|
|
1099
|
+
g.val
|
|
1100
|
+
))), /* @__PURE__ */ import_react8.default.createElement("polygon", { points: areaPoints, fill: "url(#lg)" }), /* @__PURE__ */ import_react8.default.createElement(
|
|
1101
|
+
"polyline",
|
|
1102
|
+
{
|
|
1103
|
+
points,
|
|
1104
|
+
fill: "none",
|
|
1105
|
+
stroke: accent,
|
|
1106
|
+
strokeWidth: "2",
|
|
1107
|
+
strokeLinejoin: "round",
|
|
1108
|
+
strokeLinecap: "round"
|
|
1109
|
+
}
|
|
1110
|
+
), data.map((d, i) => {
|
|
1111
|
+
const isH = hovered === i;
|
|
1112
|
+
return /* @__PURE__ */ import_react8.default.createElement("g", { key: i, onMouseEnter: () => setHovered(i), onMouseLeave: () => setHovered(null) }, /* @__PURE__ */ import_react8.default.createElement("circle", { cx: getX(i), cy: getY(d.value), r: "10", fill: "transparent" }), /* @__PURE__ */ import_react8.default.createElement(
|
|
1113
|
+
"circle",
|
|
1114
|
+
{
|
|
1115
|
+
cx: getX(i),
|
|
1116
|
+
cy: getY(d.value),
|
|
1117
|
+
r: isH ? 5 : 3,
|
|
1118
|
+
fill: isH ? "#fff" : accent,
|
|
1119
|
+
stroke: accent,
|
|
1120
|
+
strokeWidth: "2",
|
|
1121
|
+
style: { transition: "all 0.15s" }
|
|
1122
|
+
}
|
|
1123
|
+
), showValues && isH && /* @__PURE__ */ import_react8.default.createElement(
|
|
1124
|
+
"text",
|
|
1125
|
+
{
|
|
1126
|
+
x: getX(i),
|
|
1127
|
+
y: getY(d.value) - 10,
|
|
1128
|
+
textAnchor: "middle",
|
|
1129
|
+
fill: "#fff",
|
|
1130
|
+
fontSize: "9",
|
|
1131
|
+
fontWeight: "700"
|
|
1132
|
+
},
|
|
1133
|
+
d.value
|
|
1134
|
+
), /* @__PURE__ */ import_react8.default.createElement(
|
|
1135
|
+
"text",
|
|
1136
|
+
{
|
|
1137
|
+
x: getX(i),
|
|
1138
|
+
y: H - 6,
|
|
1139
|
+
textAnchor: "middle",
|
|
1140
|
+
fill: "rgba(255,255,255,0.3)",
|
|
1141
|
+
fontSize: "9"
|
|
1142
|
+
},
|
|
1143
|
+
d.label
|
|
1144
|
+
));
|
|
1145
|
+
}));
|
|
1146
|
+
const PieChart = () => {
|
|
1147
|
+
var _a, _b;
|
|
1148
|
+
const cx = W / 2, cy = H / 2 - 4, r = Math.min(H, W) / 2 - 24;
|
|
1149
|
+
const total = data.reduce((s, d) => s + d.value, 0);
|
|
1150
|
+
const colors = [
|
|
1151
|
+
accent,
|
|
1152
|
+
alpha(accent, 0.75),
|
|
1153
|
+
alpha(accent, 0.55),
|
|
1154
|
+
alpha(accent, 0.4),
|
|
1155
|
+
alpha(accent, 0.3),
|
|
1156
|
+
alpha(accent, 0.2),
|
|
1157
|
+
alpha(accent, 0.12)
|
|
1158
|
+
];
|
|
1159
|
+
let startAngle = -Math.PI / 2;
|
|
1160
|
+
const slices = data.map((d, i) => {
|
|
1161
|
+
const angle = d.value / total * 2 * Math.PI;
|
|
1162
|
+
const x1 = cx + r * Math.cos(startAngle);
|
|
1163
|
+
const y1 = cy + r * Math.sin(startAngle);
|
|
1164
|
+
const x2 = cx + r * Math.cos(startAngle + angle);
|
|
1165
|
+
const y2 = cy + r * Math.sin(startAngle + angle);
|
|
1166
|
+
const lx = cx + (r + 14) * Math.cos(startAngle + angle / 2);
|
|
1167
|
+
const ly = cy + (r + 14) * Math.sin(startAngle + angle / 2);
|
|
1168
|
+
const large = angle > Math.PI ? 1 : 0;
|
|
1169
|
+
const path = `M ${cx} ${cy} L ${x1} ${y1} A ${r} ${r} 0 ${large} 1 ${x2} ${y2} Z`;
|
|
1170
|
+
const slice = { path, color: colors[i % colors.length], d, angle, lx, ly, i };
|
|
1171
|
+
startAngle += angle;
|
|
1172
|
+
return slice;
|
|
1173
|
+
});
|
|
1174
|
+
return /* @__PURE__ */ import_react8.default.createElement("svg", { width: "100%", viewBox: `0 0 ${W} ${H}` }, slices.map((s) => /* @__PURE__ */ import_react8.default.createElement("g", { key: s.i, onMouseEnter: () => setHovered(s.i), onMouseLeave: () => setHovered(null) }, /* @__PURE__ */ import_react8.default.createElement(
|
|
1175
|
+
"path",
|
|
1176
|
+
{
|
|
1177
|
+
d: s.path,
|
|
1178
|
+
fill: s.color,
|
|
1179
|
+
stroke: bg,
|
|
1180
|
+
strokeWidth: "2",
|
|
1181
|
+
transform: hovered === s.i ? `translate(${Math.cos(s.angle / 2 - Math.PI / 2) * 4}, ${Math.sin(s.angle / 2 - Math.PI / 2) * 4})` : "",
|
|
1182
|
+
style: { transition: "transform 0.15s", cursor: "pointer" }
|
|
1183
|
+
}
|
|
1184
|
+
))), hovered !== null && /* @__PURE__ */ import_react8.default.createElement(import_react8.default.Fragment, null, /* @__PURE__ */ import_react8.default.createElement(
|
|
1185
|
+
"text",
|
|
1186
|
+
{
|
|
1187
|
+
x: cx,
|
|
1188
|
+
y: cy - 8,
|
|
1189
|
+
textAnchor: "middle",
|
|
1190
|
+
fill: "#fff",
|
|
1191
|
+
fontSize: "16",
|
|
1192
|
+
fontWeight: "800"
|
|
1193
|
+
},
|
|
1194
|
+
(_a = data[hovered]) == null ? void 0 : _a.value
|
|
1195
|
+
), /* @__PURE__ */ import_react8.default.createElement(
|
|
1196
|
+
"text",
|
|
1197
|
+
{
|
|
1198
|
+
x: cx,
|
|
1199
|
+
y: cy + 10,
|
|
1200
|
+
textAnchor: "middle",
|
|
1201
|
+
fill: "rgba(255,255,255,0.4)",
|
|
1202
|
+
fontSize: "9"
|
|
1203
|
+
},
|
|
1204
|
+
(_b = data[hovered]) == null ? void 0 : _b.label
|
|
1205
|
+
)), hovered === null && /* @__PURE__ */ import_react8.default.createElement(
|
|
1206
|
+
"text",
|
|
1207
|
+
{
|
|
1208
|
+
x: cx,
|
|
1209
|
+
y: cy + 5,
|
|
1210
|
+
textAnchor: "middle",
|
|
1211
|
+
fill: "rgba(255,255,255,0.2)",
|
|
1212
|
+
fontSize: "9"
|
|
1213
|
+
},
|
|
1214
|
+
"Hover slice"
|
|
1215
|
+
));
|
|
1216
|
+
};
|
|
1217
|
+
const AreaChart = () => /* @__PURE__ */ import_react8.default.createElement("svg", { width: "100%", viewBox: `0 0 ${W} ${H}` }, /* @__PURE__ */ import_react8.default.createElement("defs", null, /* @__PURE__ */ import_react8.default.createElement("linearGradient", { id: "ag", x1: "0", y1: "0", x2: "0", y2: "1" }, /* @__PURE__ */ import_react8.default.createElement("stop", { offset: "0%", stopColor: accent, stopOpacity: "0.5" }), /* @__PURE__ */ import_react8.default.createElement("stop", { offset: "100%", stopColor: accent, stopOpacity: "0.02" }))), showGrid && gridLines.map((g, i) => /* @__PURE__ */ import_react8.default.createElement("g", { key: i }, /* @__PURE__ */ import_react8.default.createElement(
|
|
1218
|
+
"line",
|
|
1219
|
+
{
|
|
1220
|
+
x1: padL,
|
|
1221
|
+
y1: g.y,
|
|
1222
|
+
x2: W - padR,
|
|
1223
|
+
y2: g.y,
|
|
1224
|
+
stroke: "rgba(255,255,255,0.05)",
|
|
1225
|
+
strokeWidth: "1"
|
|
1226
|
+
}
|
|
1227
|
+
), /* @__PURE__ */ import_react8.default.createElement(
|
|
1228
|
+
"text",
|
|
1229
|
+
{
|
|
1230
|
+
x: padL - 4,
|
|
1231
|
+
y: g.y + 4,
|
|
1232
|
+
textAnchor: "end",
|
|
1233
|
+
fill: "rgba(255,255,255,0.25)",
|
|
1234
|
+
fontSize: "9"
|
|
1235
|
+
},
|
|
1236
|
+
g.val
|
|
1237
|
+
))), /* @__PURE__ */ import_react8.default.createElement("polygon", { points: areaPoints, fill: "url(#ag)" }), /* @__PURE__ */ import_react8.default.createElement(
|
|
1238
|
+
"polyline",
|
|
1239
|
+
{
|
|
1240
|
+
points,
|
|
1241
|
+
fill: "none",
|
|
1242
|
+
stroke: accent,
|
|
1243
|
+
strokeWidth: "1.5",
|
|
1244
|
+
strokeLinejoin: "round",
|
|
1245
|
+
strokeLinecap: "round"
|
|
1246
|
+
}
|
|
1247
|
+
), data.map((d, i) => /* @__PURE__ */ import_react8.default.createElement("g", { key: i, onMouseEnter: () => setHovered(i), onMouseLeave: () => setHovered(null) }, /* @__PURE__ */ import_react8.default.createElement("rect", { x: getX(i) - 12, y: padT, width: 24, height: chartH, fill: "transparent" }), hovered === i && /* @__PURE__ */ import_react8.default.createElement(import_react8.default.Fragment, null, /* @__PURE__ */ import_react8.default.createElement(
|
|
1248
|
+
"line",
|
|
1249
|
+
{
|
|
1250
|
+
x1: getX(i),
|
|
1251
|
+
y1: padT,
|
|
1252
|
+
x2: getX(i),
|
|
1253
|
+
y2: padT + chartH,
|
|
1254
|
+
stroke: "rgba(255,255,255,0.1)",
|
|
1255
|
+
strokeWidth: "1",
|
|
1256
|
+
strokeDasharray: "3 3"
|
|
1257
|
+
}
|
|
1258
|
+
), showValues && /* @__PURE__ */ import_react8.default.createElement(
|
|
1259
|
+
"text",
|
|
1260
|
+
{
|
|
1261
|
+
x: getX(i),
|
|
1262
|
+
y: getY(d.value) - 10,
|
|
1263
|
+
textAnchor: "middle",
|
|
1264
|
+
fill: "#fff",
|
|
1265
|
+
fontSize: "9",
|
|
1266
|
+
fontWeight: "700"
|
|
1267
|
+
},
|
|
1268
|
+
d.value
|
|
1269
|
+
)), /* @__PURE__ */ import_react8.default.createElement(
|
|
1270
|
+
"text",
|
|
1271
|
+
{
|
|
1272
|
+
x: getX(i),
|
|
1273
|
+
y: H - 6,
|
|
1274
|
+
textAnchor: "middle",
|
|
1275
|
+
fill: "rgba(255,255,255,0.3)",
|
|
1276
|
+
fontSize: "9"
|
|
1277
|
+
},
|
|
1278
|
+
d.label
|
|
1279
|
+
))));
|
|
1280
|
+
const renderChart = () => {
|
|
1281
|
+
if (type === "line") return /* @__PURE__ */ import_react8.default.createElement(LineChart, null);
|
|
1282
|
+
if (type === "pie") return /* @__PURE__ */ import_react8.default.createElement(PieChart, null);
|
|
1283
|
+
if (type === "area") return /* @__PURE__ */ import_react8.default.createElement(AreaChart, null);
|
|
1284
|
+
return /* @__PURE__ */ import_react8.default.createElement(BarChart, null);
|
|
1285
|
+
};
|
|
1286
|
+
return /* @__PURE__ */ import_react8.default.createElement("div", { style: {
|
|
1287
|
+
background: bg,
|
|
1288
|
+
borderRadius: radius,
|
|
1289
|
+
padding: "20px",
|
|
1290
|
+
fontFamily: "system-ui, sans-serif",
|
|
1291
|
+
border: "1px solid rgba(255,255,255,0.07)",
|
|
1292
|
+
width: "100%",
|
|
1293
|
+
maxWidth: "360px",
|
|
1294
|
+
boxSizing: "border-box"
|
|
1295
|
+
} }, /* @__PURE__ */ import_react8.default.createElement("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", marginBottom: "16px" } }, /* @__PURE__ */ import_react8.default.createElement("p", { style: { fontSize: "14px", fontWeight: "700", color: "#fff", margin: 0 } }, title), /* @__PURE__ */ import_react8.default.createElement("span", { style: {
|
|
1296
|
+
fontSize: "10px",
|
|
1297
|
+
fontWeight: "700",
|
|
1298
|
+
padding: "3px 9px",
|
|
1299
|
+
borderRadius: "6px",
|
|
1300
|
+
background: alpha(accent, 0.12),
|
|
1301
|
+
color: accent,
|
|
1302
|
+
border: `1px solid ${alpha(accent, 0.25)}`,
|
|
1303
|
+
textTransform: "capitalize"
|
|
1304
|
+
} }, type)), renderChart());
|
|
1305
|
+
};
|
|
1306
|
+
|
|
1307
|
+
// src/components/ImageCard/ImageCard.jsx
|
|
1308
|
+
var import_react9 = __toESM(require("react"));
|
|
1309
|
+
var ImageCard = ({
|
|
1310
|
+
image = "https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=600&q=80",
|
|
1311
|
+
tag = "Travel",
|
|
1312
|
+
title = "Discover the Hidden Peaks of the Himalayas",
|
|
1313
|
+
description = "A breathtaking journey through untouched landscapes, ancient monasteries, and snow-capped summits that few have ever seen.",
|
|
1314
|
+
buttonText = "Read More",
|
|
1315
|
+
accent = "#6366f1",
|
|
1316
|
+
bg = "#0f172a",
|
|
1317
|
+
radius = "20px",
|
|
1318
|
+
onButtonClick = () => {
|
|
1319
|
+
}
|
|
1320
|
+
}) => {
|
|
1321
|
+
const [hovered, setHovered] = (0, import_react9.useState)(false);
|
|
1322
|
+
const alpha = (hex, op) => {
|
|
1323
|
+
const r = parseInt(hex.slice(1, 3), 16);
|
|
1324
|
+
const g = parseInt(hex.slice(3, 5), 16);
|
|
1325
|
+
const b = parseInt(hex.slice(5, 7), 16);
|
|
1326
|
+
return `rgba(${r},${g},${b},${op})`;
|
|
1327
|
+
};
|
|
1328
|
+
return /* @__PURE__ */ import_react9.default.createElement(
|
|
1329
|
+
"div",
|
|
1330
|
+
{
|
|
1331
|
+
onMouseEnter: () => setHovered(true),
|
|
1332
|
+
onMouseLeave: () => setHovered(false),
|
|
1333
|
+
style: {
|
|
1334
|
+
background: bg,
|
|
1335
|
+
borderRadius: radius,
|
|
1336
|
+
overflow: "hidden",
|
|
1337
|
+
width: "300px",
|
|
1338
|
+
border: `1px solid ${hovered ? alpha(accent, 0.3) : "rgba(255,255,255,0.07)"}`,
|
|
1339
|
+
fontFamily: "system-ui, sans-serif",
|
|
1340
|
+
transition: "border-color 0.25s, transform 0.25s",
|
|
1341
|
+
transform: hovered ? "translateY(-4px)" : "none",
|
|
1342
|
+
boxShadow: hovered ? `0 16px 40px rgba(0,0,0,0.5)` : "0 4px 20px rgba(0,0,0,0.3)"
|
|
1343
|
+
}
|
|
1344
|
+
},
|
|
1345
|
+
/* @__PURE__ */ import_react9.default.createElement("div", { style: { position: "relative", width: "100%", height: "180px", overflow: "hidden" } }, /* @__PURE__ */ import_react9.default.createElement(
|
|
1346
|
+
"img",
|
|
1347
|
+
{
|
|
1348
|
+
src: image,
|
|
1349
|
+
alt: title,
|
|
1350
|
+
style: {
|
|
1351
|
+
width: "100%",
|
|
1352
|
+
height: "100%",
|
|
1353
|
+
objectFit: "cover",
|
|
1354
|
+
transform: hovered ? "scale(1.05)" : "scale(1)",
|
|
1355
|
+
transition: "transform 0.4s ease"
|
|
1356
|
+
}
|
|
1357
|
+
}
|
|
1358
|
+
), /* @__PURE__ */ import_react9.default.createElement("div", { style: {
|
|
1359
|
+
position: "absolute",
|
|
1360
|
+
inset: 0,
|
|
1361
|
+
background: "linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 60%)"
|
|
1362
|
+
} }), tag && /* @__PURE__ */ import_react9.default.createElement("div", { style: {
|
|
1363
|
+
position: "absolute",
|
|
1364
|
+
top: "12px",
|
|
1365
|
+
left: "12px",
|
|
1366
|
+
padding: "4px 10px",
|
|
1367
|
+
borderRadius: "20px",
|
|
1368
|
+
background: alpha(accent, 0.85),
|
|
1369
|
+
fontSize: "10px",
|
|
1370
|
+
fontWeight: "700",
|
|
1371
|
+
color: "#fff",
|
|
1372
|
+
letterSpacing: "0.5px",
|
|
1373
|
+
textTransform: "uppercase"
|
|
1374
|
+
} }, tag)),
|
|
1375
|
+
/* @__PURE__ */ import_react9.default.createElement("div", { style: { padding: "18px" } }, /* @__PURE__ */ import_react9.default.createElement("h3", { style: {
|
|
1376
|
+
fontSize: "15px",
|
|
1377
|
+
fontWeight: "700",
|
|
1378
|
+
color: "#fff",
|
|
1379
|
+
margin: "0 0 8px",
|
|
1380
|
+
lineHeight: 1.4
|
|
1381
|
+
} }, title), /* @__PURE__ */ import_react9.default.createElement("p", { style: {
|
|
1382
|
+
fontSize: "13px",
|
|
1383
|
+
color: "rgba(255,255,255,0.45)",
|
|
1384
|
+
lineHeight: 1.65,
|
|
1385
|
+
margin: "0 0 18px"
|
|
1386
|
+
} }, description), /* @__PURE__ */ import_react9.default.createElement(
|
|
1387
|
+
"button",
|
|
1388
|
+
{
|
|
1389
|
+
onClick: onButtonClick,
|
|
1390
|
+
style: {
|
|
1391
|
+
width: "100%",
|
|
1392
|
+
padding: "11px",
|
|
1393
|
+
borderRadius: "12px",
|
|
1394
|
+
border: "none",
|
|
1395
|
+
background: `linear-gradient(135deg, ${accent}, ${alpha(accent, 0.7)})`,
|
|
1396
|
+
color: "#fff",
|
|
1397
|
+
fontSize: "13px",
|
|
1398
|
+
fontWeight: "700",
|
|
1399
|
+
cursor: "pointer",
|
|
1400
|
+
fontFamily: "inherit",
|
|
1401
|
+
transition: "opacity 0.2s"
|
|
1402
|
+
},
|
|
1403
|
+
onMouseEnter: (e) => e.currentTarget.style.opacity = "0.85",
|
|
1404
|
+
onMouseLeave: (e) => e.currentTarget.style.opacity = "1"
|
|
1405
|
+
},
|
|
1406
|
+
buttonText
|
|
1407
|
+
))
|
|
1408
|
+
);
|
|
1409
|
+
};
|
|
1410
|
+
|
|
1411
|
+
// src/components/ImageSlider/ImageSlider.jsx
|
|
1412
|
+
var import_react10 = __toESM(require("react"));
|
|
1413
|
+
var ImageSlider = ({
|
|
1414
|
+
images = [
|
|
1415
|
+
{
|
|
1416
|
+
src: "https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=600&q=80",
|
|
1417
|
+
title: "Hidden Peaks of Himalayas",
|
|
1418
|
+
tag: "Travel"
|
|
1419
|
+
},
|
|
1420
|
+
{
|
|
1421
|
+
src: "https://images.unsplash.com/photo-1477959858617-67f85cf4f1df?w=600&q=80",
|
|
1422
|
+
title: "City Lights at Night",
|
|
1423
|
+
tag: "Urban"
|
|
1424
|
+
},
|
|
1425
|
+
{
|
|
1426
|
+
src: "https://images.unsplash.com/photo-1500534314209-a25ddb2bd429?w=600&q=80",
|
|
1427
|
+
title: "Tropical Beach Paradise",
|
|
1428
|
+
tag: "Nature"
|
|
1429
|
+
},
|
|
1430
|
+
{
|
|
1431
|
+
src: "https://images.unsplash.com/photo-1519681393784-d120267933ba?w=600&q=80",
|
|
1432
|
+
title: "Starry Mountain Night",
|
|
1433
|
+
tag: "Adventure"
|
|
1434
|
+
}
|
|
1435
|
+
],
|
|
1436
|
+
accent = "#6366f1",
|
|
1437
|
+
bg = "#0f172a",
|
|
1438
|
+
radius = "20px",
|
|
1439
|
+
showDots = true,
|
|
1440
|
+
showCaption = true,
|
|
1441
|
+
autoPlay = false
|
|
1442
|
+
}) => {
|
|
1443
|
+
const [current, setCurrent] = (0, import_react10.useState)(0);
|
|
1444
|
+
const [dir, setDir] = (0, import_react10.useState)(null);
|
|
1445
|
+
const alpha = (hex, op) => {
|
|
1446
|
+
const r = parseInt(hex.slice(1, 3), 16);
|
|
1447
|
+
const g = parseInt(hex.slice(3, 5), 16);
|
|
1448
|
+
const b = parseInt(hex.slice(5, 7), 16);
|
|
1449
|
+
return `rgba(${r},${g},${b},${op})`;
|
|
1450
|
+
};
|
|
1451
|
+
const prev = () => {
|
|
1452
|
+
setDir("left");
|
|
1453
|
+
setCurrent((c) => (c - 1 + images.length) % images.length);
|
|
1454
|
+
};
|
|
1455
|
+
const next = () => {
|
|
1456
|
+
setDir("right");
|
|
1457
|
+
setCurrent((c) => (c + 1) % images.length);
|
|
1458
|
+
};
|
|
1459
|
+
const goTo = (i) => {
|
|
1460
|
+
setDir(i > current ? "right" : "left");
|
|
1461
|
+
setCurrent(i);
|
|
1462
|
+
};
|
|
1463
|
+
const img = images[current];
|
|
1464
|
+
return /* @__PURE__ */ import_react10.default.createElement("div", { style: {
|
|
1465
|
+
background: bg,
|
|
1466
|
+
borderRadius: radius,
|
|
1467
|
+
overflow: "hidden",
|
|
1468
|
+
width: "300px",
|
|
1469
|
+
border: "1px solid rgba(255,255,255,0.07)",
|
|
1470
|
+
fontFamily: "system-ui, sans-serif",
|
|
1471
|
+
boxShadow: "0 10px 40px rgba(0,0,0,0.4)"
|
|
1472
|
+
} }, /* @__PURE__ */ import_react10.default.createElement("div", { style: { position: "relative", width: "100%", height: "200px", overflow: "hidden", background: "#000" } }, /* @__PURE__ */ import_react10.default.createElement(
|
|
1473
|
+
"img",
|
|
1474
|
+
{
|
|
1475
|
+
key: current,
|
|
1476
|
+
src: img.src,
|
|
1477
|
+
alt: img.title,
|
|
1478
|
+
style: {
|
|
1479
|
+
width: "100%",
|
|
1480
|
+
height: "100%",
|
|
1481
|
+
objectFit: "cover",
|
|
1482
|
+
animation: `sliderFade 0.35s ease`
|
|
1483
|
+
}
|
|
1484
|
+
}
|
|
1485
|
+
), /* @__PURE__ */ import_react10.default.createElement("style", null, `@keyframes sliderFade { from { opacity: 0; transform: scale(1.03); } to { opacity: 1; transform: scale(1); } }`), /* @__PURE__ */ import_react10.default.createElement("div", { style: {
|
|
1486
|
+
position: "absolute",
|
|
1487
|
+
inset: 0,
|
|
1488
|
+
background: "linear-gradient(to top, rgba(0,0,0,0.65) 0%, transparent 55%)"
|
|
1489
|
+
} }), img.tag && /* @__PURE__ */ import_react10.default.createElement("div", { style: {
|
|
1490
|
+
position: "absolute",
|
|
1491
|
+
top: "12px",
|
|
1492
|
+
left: "12px",
|
|
1493
|
+
padding: "4px 10px",
|
|
1494
|
+
borderRadius: "20px",
|
|
1495
|
+
background: alpha(accent, 0.85),
|
|
1496
|
+
fontSize: "10px",
|
|
1497
|
+
fontWeight: "700",
|
|
1498
|
+
color: "#fff",
|
|
1499
|
+
letterSpacing: "0.5px",
|
|
1500
|
+
textTransform: "uppercase"
|
|
1501
|
+
} }, img.tag), /* @__PURE__ */ import_react10.default.createElement("div", { style: {
|
|
1502
|
+
position: "absolute",
|
|
1503
|
+
top: "12px",
|
|
1504
|
+
right: "12px",
|
|
1505
|
+
padding: "4px 10px",
|
|
1506
|
+
borderRadius: "20px",
|
|
1507
|
+
background: "rgba(0,0,0,0.5)",
|
|
1508
|
+
fontSize: "10px",
|
|
1509
|
+
fontWeight: "600",
|
|
1510
|
+
color: "rgba(255,255,255,0.7)"
|
|
1511
|
+
} }, current + 1, " / ", images.length), /* @__PURE__ */ import_react10.default.createElement(
|
|
1512
|
+
"button",
|
|
1513
|
+
{
|
|
1514
|
+
onClick: prev,
|
|
1515
|
+
style: {
|
|
1516
|
+
position: "absolute",
|
|
1517
|
+
left: "10px",
|
|
1518
|
+
top: "50%",
|
|
1519
|
+
transform: "translateY(-50%)",
|
|
1520
|
+
width: "34px",
|
|
1521
|
+
height: "34px",
|
|
1522
|
+
borderRadius: "50%",
|
|
1523
|
+
background: "rgba(0,0,0,0.5)",
|
|
1524
|
+
border: "1px solid rgba(255,255,255,0.15)",
|
|
1525
|
+
color: "#fff",
|
|
1526
|
+
cursor: "pointer",
|
|
1527
|
+
display: "flex",
|
|
1528
|
+
alignItems: "center",
|
|
1529
|
+
justifyContent: "center",
|
|
1530
|
+
transition: "background 0.2s",
|
|
1531
|
+
padding: 0
|
|
1532
|
+
},
|
|
1533
|
+
onMouseEnter: (e) => e.currentTarget.style.background = alpha(accent, 0.8),
|
|
1534
|
+
onMouseLeave: (e) => e.currentTarget.style.background = "rgba(0,0,0,0.5)"
|
|
1535
|
+
},
|
|
1536
|
+
/* @__PURE__ */ import_react10.default.createElement(
|
|
1537
|
+
"svg",
|
|
1538
|
+
{
|
|
1539
|
+
width: "14",
|
|
1540
|
+
height: "14",
|
|
1541
|
+
viewBox: "0 0 24 24",
|
|
1542
|
+
fill: "none",
|
|
1543
|
+
stroke: "currentColor",
|
|
1544
|
+
strokeWidth: "2.5",
|
|
1545
|
+
strokeLinecap: "round"
|
|
1546
|
+
},
|
|
1547
|
+
/* @__PURE__ */ import_react10.default.createElement("polyline", { points: "15 18 9 12 15 6" })
|
|
1548
|
+
)
|
|
1549
|
+
), /* @__PURE__ */ import_react10.default.createElement(
|
|
1550
|
+
"button",
|
|
1551
|
+
{
|
|
1552
|
+
onClick: next,
|
|
1553
|
+
style: {
|
|
1554
|
+
position: "absolute",
|
|
1555
|
+
right: "10px",
|
|
1556
|
+
top: "50%",
|
|
1557
|
+
transform: "translateY(-50%)",
|
|
1558
|
+
width: "34px",
|
|
1559
|
+
height: "34px",
|
|
1560
|
+
borderRadius: "50%",
|
|
1561
|
+
background: "rgba(0,0,0,0.5)",
|
|
1562
|
+
border: "1px solid rgba(255,255,255,0.15)",
|
|
1563
|
+
color: "#fff",
|
|
1564
|
+
cursor: "pointer",
|
|
1565
|
+
display: "flex",
|
|
1566
|
+
alignItems: "center",
|
|
1567
|
+
justifyContent: "center",
|
|
1568
|
+
transition: "background 0.2s",
|
|
1569
|
+
padding: 0
|
|
1570
|
+
},
|
|
1571
|
+
onMouseEnter: (e) => e.currentTarget.style.background = alpha(accent, 0.8),
|
|
1572
|
+
onMouseLeave: (e) => e.currentTarget.style.background = "rgba(0,0,0,0.5)"
|
|
1573
|
+
},
|
|
1574
|
+
/* @__PURE__ */ import_react10.default.createElement(
|
|
1575
|
+
"svg",
|
|
1576
|
+
{
|
|
1577
|
+
width: "14",
|
|
1578
|
+
height: "14",
|
|
1579
|
+
viewBox: "0 0 24 24",
|
|
1580
|
+
fill: "none",
|
|
1581
|
+
stroke: "currentColor",
|
|
1582
|
+
strokeWidth: "2.5",
|
|
1583
|
+
strokeLinecap: "round"
|
|
1584
|
+
},
|
|
1585
|
+
/* @__PURE__ */ import_react10.default.createElement("polyline", { points: "9 18 15 12 9 6" })
|
|
1586
|
+
)
|
|
1587
|
+
)), showCaption && /* @__PURE__ */ import_react10.default.createElement("div", { style: { padding: "14px 16px 4px" } }, /* @__PURE__ */ import_react10.default.createElement(
|
|
1588
|
+
"p",
|
|
1589
|
+
{
|
|
1590
|
+
style: {
|
|
1591
|
+
fontSize: "14px",
|
|
1592
|
+
fontWeight: "700",
|
|
1593
|
+
color: "#fff",
|
|
1594
|
+
margin: 0,
|
|
1595
|
+
lineHeight: 1.4,
|
|
1596
|
+
animation: "sliderFade 0.3s ease"
|
|
1597
|
+
},
|
|
1598
|
+
key: current + "-title"
|
|
1599
|
+
},
|
|
1600
|
+
img.title
|
|
1601
|
+
)), showDots && /* @__PURE__ */ import_react10.default.createElement("div", { style: {
|
|
1602
|
+
display: "flex",
|
|
1603
|
+
justifyContent: "center",
|
|
1604
|
+
gap: "6px",
|
|
1605
|
+
padding: "12px 16px 16px"
|
|
1606
|
+
} }, images.map((_, i) => /* @__PURE__ */ import_react10.default.createElement(
|
|
1607
|
+
"button",
|
|
1608
|
+
{
|
|
1609
|
+
key: i,
|
|
1610
|
+
onClick: () => goTo(i),
|
|
1611
|
+
style: {
|
|
1612
|
+
width: i === current ? "20px" : "6px",
|
|
1613
|
+
height: "6px",
|
|
1614
|
+
borderRadius: "3px",
|
|
1615
|
+
border: "none",
|
|
1616
|
+
cursor: "pointer",
|
|
1617
|
+
padding: 0,
|
|
1618
|
+
background: i === current ? accent : "rgba(255,255,255,0.2)",
|
|
1619
|
+
transition: "all 0.25s ease"
|
|
1620
|
+
}
|
|
1621
|
+
}
|
|
1622
|
+
))));
|
|
1623
|
+
};
|
|
1624
|
+
|
|
1625
|
+
// src/components/BackgoundImageSlider/BackgoundImageSlider.jsx
|
|
1626
|
+
var import_react11 = __toESM(require("react"));
|
|
1627
|
+
var BackgoundImageSlider = ({
|
|
1628
|
+
images = [
|
|
1629
|
+
{
|
|
1630
|
+
src: "https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=1400&q=80",
|
|
1631
|
+
tag: "Travel",
|
|
1632
|
+
title: "Hidden Peaks of the Himalayas",
|
|
1633
|
+
description: "A breathtaking journey through untouched landscapes and ancient monasteries."
|
|
1634
|
+
},
|
|
1635
|
+
{
|
|
1636
|
+
src: "https://images.unsplash.com/photo-1477959858617-67f85cf4f1df?w=1400&q=80",
|
|
1637
|
+
tag: "Urban",
|
|
1638
|
+
title: "City Lights at Night",
|
|
1639
|
+
description: "Explore the vibrant energy of the world's most iconic skylines after dark."
|
|
1640
|
+
},
|
|
1641
|
+
{
|
|
1642
|
+
src: "https://images.unsplash.com/photo-1500534314209-a25ddb2bd429?w=1400&q=80",
|
|
1643
|
+
tag: "Nature",
|
|
1644
|
+
title: "Tropical Beach Paradise",
|
|
1645
|
+
description: "Crystal clear waters and white sand beaches that feel like the edge of the world."
|
|
1646
|
+
},
|
|
1647
|
+
{
|
|
1648
|
+
src: "https://images.unsplash.com/photo-1519681393784-d120267933ba?w=1400&q=80",
|
|
1649
|
+
tag: "Adventure",
|
|
1650
|
+
title: "Starry Mountain Night",
|
|
1651
|
+
description: "Where silence meets the cosmos \u2014 a night sky like you've never seen before."
|
|
1652
|
+
}
|
|
1653
|
+
],
|
|
1654
|
+
width = "100%",
|
|
1655
|
+
height = "520px",
|
|
1656
|
+
accent = "#6366f1",
|
|
1657
|
+
radius = "0px",
|
|
1658
|
+
showDots = true,
|
|
1659
|
+
autoPlay = false,
|
|
1660
|
+
autoPlayInterval = 4e3
|
|
1661
|
+
}) => {
|
|
1662
|
+
const [current, setCurrent] = (0, import_react11.useState)(0);
|
|
1663
|
+
const [animating, setAnimating] = (0, import_react11.useState)(false);
|
|
1664
|
+
const alpha = (hex, op) => {
|
|
1665
|
+
const r = parseInt(hex.slice(1, 3), 16);
|
|
1666
|
+
const g = parseInt(hex.slice(3, 5), 16);
|
|
1667
|
+
const b = parseInt(hex.slice(5, 7), 16);
|
|
1668
|
+
return `rgba(${r},${g},${b},${op})`;
|
|
1669
|
+
};
|
|
1670
|
+
const go = (0, import_react11.useCallback)((index) => {
|
|
1671
|
+
if (animating) return;
|
|
1672
|
+
setAnimating(true);
|
|
1673
|
+
setCurrent((index + images.length) % images.length);
|
|
1674
|
+
setTimeout(() => setAnimating(false), 400);
|
|
1675
|
+
}, [animating, images.length]);
|
|
1676
|
+
const prev = () => go(current - 1);
|
|
1677
|
+
const next = () => go(current + 1);
|
|
1678
|
+
(0, import_react11.useEffect)(() => {
|
|
1679
|
+
if (!autoPlay) return;
|
|
1680
|
+
const t = setInterval(() => go(current + 1), autoPlayInterval);
|
|
1681
|
+
return () => clearInterval(t);
|
|
1682
|
+
}, [autoPlay, autoPlayInterval, current, go]);
|
|
1683
|
+
const img = images[current];
|
|
1684
|
+
return /* @__PURE__ */ import_react11.default.createElement(import_react11.default.Fragment, null, /* @__PURE__ */ import_react11.default.createElement("style", null, `
|
|
1685
|
+
@keyframes hs-fade { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: scale(1); } }
|
|
1686
|
+
@keyframes hs-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
|
|
1687
|
+
.hs-prev:hover, .hs-next:hover { background: rgba(0,0,0,0.65) !important; border-color: rgba(255,255,255,0.35) !important; }
|
|
1688
|
+
`), /* @__PURE__ */ import_react11.default.createElement("div", { style: {
|
|
1689
|
+
position: "relative",
|
|
1690
|
+
width,
|
|
1691
|
+
height,
|
|
1692
|
+
borderRadius: radius,
|
|
1693
|
+
overflow: "hidden",
|
|
1694
|
+
fontFamily: "system-ui, -apple-system, sans-serif",
|
|
1695
|
+
userSelect: "none"
|
|
1696
|
+
} }, /* @__PURE__ */ import_react11.default.createElement(
|
|
1697
|
+
"img",
|
|
1698
|
+
{
|
|
1699
|
+
key: current,
|
|
1700
|
+
src: img.src,
|
|
1701
|
+
alt: img.title,
|
|
1702
|
+
style: {
|
|
1703
|
+
position: "absolute",
|
|
1704
|
+
inset: 0,
|
|
1705
|
+
width: "100%",
|
|
1706
|
+
height: "100%",
|
|
1707
|
+
objectFit: "cover",
|
|
1708
|
+
animation: "hs-fade 0.4s ease"
|
|
1709
|
+
}
|
|
1710
|
+
}
|
|
1711
|
+
), /* @__PURE__ */ import_react11.default.createElement("div", { style: {
|
|
1712
|
+
position: "absolute",
|
|
1713
|
+
inset: 0,
|
|
1714
|
+
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%)"
|
|
1715
|
+
} }), img.tag && /* @__PURE__ */ import_react11.default.createElement(
|
|
1716
|
+
"div",
|
|
1717
|
+
{
|
|
1718
|
+
key: current + "-tag",
|
|
1719
|
+
style: {
|
|
1720
|
+
position: "absolute",
|
|
1721
|
+
top: "24px",
|
|
1722
|
+
left: "28px",
|
|
1723
|
+
padding: "5px 14px",
|
|
1724
|
+
borderRadius: "20px",
|
|
1725
|
+
background: alpha(accent, 0.85),
|
|
1726
|
+
fontSize: "11px",
|
|
1727
|
+
fontWeight: "700",
|
|
1728
|
+
color: "#fff",
|
|
1729
|
+
letterSpacing: "0.6px",
|
|
1730
|
+
textTransform: "uppercase",
|
|
1731
|
+
animation: "hs-up 0.4s ease"
|
|
1732
|
+
}
|
|
1733
|
+
},
|
|
1734
|
+
img.tag
|
|
1735
|
+
), /* @__PURE__ */ import_react11.default.createElement("div", { style: {
|
|
1736
|
+
position: "absolute",
|
|
1737
|
+
top: "24px",
|
|
1738
|
+
right: "28px",
|
|
1739
|
+
padding: "5px 12px",
|
|
1740
|
+
borderRadius: "20px",
|
|
1741
|
+
background: "rgba(0,0,0,0.45)",
|
|
1742
|
+
fontSize: "11px",
|
|
1743
|
+
fontWeight: "600",
|
|
1744
|
+
color: "rgba(255,255,255,0.7)"
|
|
1745
|
+
} }, current + 1, " / ", images.length), /* @__PURE__ */ import_react11.default.createElement(
|
|
1746
|
+
"button",
|
|
1747
|
+
{
|
|
1748
|
+
className: "hs-prev",
|
|
1749
|
+
onClick: prev,
|
|
1750
|
+
style: {
|
|
1751
|
+
position: "absolute",
|
|
1752
|
+
left: "20px",
|
|
1753
|
+
top: "50%",
|
|
1754
|
+
transform: "translateY(-50%)",
|
|
1755
|
+
width: "44px",
|
|
1756
|
+
height: "44px",
|
|
1757
|
+
borderRadius: "50%",
|
|
1758
|
+
background: "rgba(0,0,0,0.4)",
|
|
1759
|
+
border: "1px solid rgba(255,255,255,0.2)",
|
|
1760
|
+
color: "#fff",
|
|
1761
|
+
cursor: "pointer",
|
|
1762
|
+
display: "flex",
|
|
1763
|
+
alignItems: "center",
|
|
1764
|
+
justifyContent: "center",
|
|
1765
|
+
transition: "all 0.2s",
|
|
1766
|
+
padding: 0,
|
|
1767
|
+
zIndex: 10
|
|
1768
|
+
}
|
|
1769
|
+
},
|
|
1770
|
+
/* @__PURE__ */ import_react11.default.createElement(
|
|
1771
|
+
"svg",
|
|
1772
|
+
{
|
|
1773
|
+
width: "18",
|
|
1774
|
+
height: "18",
|
|
1775
|
+
viewBox: "0 0 24 24",
|
|
1776
|
+
fill: "none",
|
|
1777
|
+
stroke: "currentColor",
|
|
1778
|
+
strokeWidth: "2.5",
|
|
1779
|
+
strokeLinecap: "round",
|
|
1780
|
+
strokeLinejoin: "round"
|
|
1781
|
+
},
|
|
1782
|
+
/* @__PURE__ */ import_react11.default.createElement("polyline", { points: "15 18 9 12 15 6" })
|
|
1783
|
+
)
|
|
1784
|
+
), /* @__PURE__ */ import_react11.default.createElement(
|
|
1785
|
+
"button",
|
|
1786
|
+
{
|
|
1787
|
+
className: "hs-next",
|
|
1788
|
+
onClick: next,
|
|
1789
|
+
style: {
|
|
1790
|
+
position: "absolute",
|
|
1791
|
+
right: "20px",
|
|
1792
|
+
top: "50%",
|
|
1793
|
+
transform: "translateY(-50%)",
|
|
1794
|
+
width: "44px",
|
|
1795
|
+
height: "44px",
|
|
1796
|
+
borderRadius: "50%",
|
|
1797
|
+
background: "rgba(0,0,0,0.4)",
|
|
1798
|
+
border: "1px solid rgba(255,255,255,0.2)",
|
|
1799
|
+
color: "#fff",
|
|
1800
|
+
cursor: "pointer",
|
|
1801
|
+
display: "flex",
|
|
1802
|
+
alignItems: "center",
|
|
1803
|
+
justifyContent: "center",
|
|
1804
|
+
transition: "all 0.2s",
|
|
1805
|
+
padding: 0,
|
|
1806
|
+
zIndex: 10
|
|
1807
|
+
}
|
|
1808
|
+
},
|
|
1809
|
+
/* @__PURE__ */ import_react11.default.createElement(
|
|
1810
|
+
"svg",
|
|
1811
|
+
{
|
|
1812
|
+
width: "18",
|
|
1813
|
+
height: "18",
|
|
1814
|
+
viewBox: "0 0 24 24",
|
|
1815
|
+
fill: "none",
|
|
1816
|
+
stroke: "currentColor",
|
|
1817
|
+
strokeWidth: "2.5",
|
|
1818
|
+
strokeLinecap: "round",
|
|
1819
|
+
strokeLinejoin: "round"
|
|
1820
|
+
},
|
|
1821
|
+
/* @__PURE__ */ import_react11.default.createElement("polyline", { points: "9 18 15 12 9 6" })
|
|
1822
|
+
)
|
|
1823
|
+
), /* @__PURE__ */ import_react11.default.createElement("div", { style: {
|
|
1824
|
+
position: "absolute",
|
|
1825
|
+
bottom: showDots ? "56px" : "28px",
|
|
1826
|
+
left: "28px",
|
|
1827
|
+
right: "28px",
|
|
1828
|
+
zIndex: 5
|
|
1829
|
+
} }, /* @__PURE__ */ import_react11.default.createElement(
|
|
1830
|
+
"h2",
|
|
1831
|
+
{
|
|
1832
|
+
key: current + "-title",
|
|
1833
|
+
style: {
|
|
1834
|
+
fontSize: "clamp(20px, 4vw, 36px)",
|
|
1835
|
+
fontWeight: "800",
|
|
1836
|
+
color: "#fff",
|
|
1837
|
+
margin: "0 0 8px",
|
|
1838
|
+
lineHeight: 1.25,
|
|
1839
|
+
textShadow: "0 2px 12px rgba(0,0,0,0.4)",
|
|
1840
|
+
animation: "hs-up 0.45s ease",
|
|
1841
|
+
maxWidth: "600px"
|
|
1842
|
+
}
|
|
1843
|
+
},
|
|
1844
|
+
img.title
|
|
1845
|
+
), /* @__PURE__ */ import_react11.default.createElement(
|
|
1846
|
+
"p",
|
|
1847
|
+
{
|
|
1848
|
+
key: current + "-desc",
|
|
1849
|
+
style: {
|
|
1850
|
+
fontSize: "clamp(13px, 2vw, 15px)",
|
|
1851
|
+
color: "rgba(255,255,255,0.7)",
|
|
1852
|
+
margin: 0,
|
|
1853
|
+
lineHeight: 1.6,
|
|
1854
|
+
textShadow: "0 1px 6px rgba(0,0,0,0.5)",
|
|
1855
|
+
animation: "hs-up 0.5s ease",
|
|
1856
|
+
maxWidth: "500px"
|
|
1857
|
+
}
|
|
1858
|
+
},
|
|
1859
|
+
img.description
|
|
1860
|
+
)), showDots && /* @__PURE__ */ import_react11.default.createElement("div", { style: {
|
|
1861
|
+
position: "absolute",
|
|
1862
|
+
bottom: "20px",
|
|
1863
|
+
left: 0,
|
|
1864
|
+
right: 0,
|
|
1865
|
+
display: "flex",
|
|
1866
|
+
justifyContent: "center",
|
|
1867
|
+
gap: "6px",
|
|
1868
|
+
zIndex: 5
|
|
1869
|
+
} }, images.map((_, i) => /* @__PURE__ */ import_react11.default.createElement(
|
|
1870
|
+
"button",
|
|
1871
|
+
{
|
|
1872
|
+
key: i,
|
|
1873
|
+
onClick: () => go(i),
|
|
1874
|
+
style: {
|
|
1875
|
+
width: i === current ? "24px" : "7px",
|
|
1876
|
+
height: "7px",
|
|
1877
|
+
borderRadius: "4px",
|
|
1878
|
+
border: "none",
|
|
1879
|
+
padding: 0,
|
|
1880
|
+
cursor: "pointer",
|
|
1881
|
+
background: i === current ? accent : "rgba(255,255,255,0.4)",
|
|
1882
|
+
transition: "all 0.3s ease"
|
|
1883
|
+
}
|
|
1884
|
+
}
|
|
1885
|
+
)))));
|
|
1886
|
+
};
|
|
1887
|
+
|
|
1888
|
+
// src/components/PageLoader/PageLoader.jsx
|
|
1889
|
+
var import_react12 = __toESM(require("react"));
|
|
1890
|
+
var PageLoader = ({
|
|
1891
|
+
logo = "VirtualAI",
|
|
1892
|
+
accent = "#6366f1",
|
|
1893
|
+
bg = "",
|
|
1894
|
+
type = "spinner",
|
|
1895
|
+
loadingText = "Loading...",
|
|
1896
|
+
subText = "",
|
|
1897
|
+
duration = 6e3,
|
|
1898
|
+
onComplete = () => {
|
|
1899
|
+
}
|
|
1900
|
+
}) => {
|
|
1901
|
+
const [progress, setProgress] = (0, import_react12.useState)(0);
|
|
1902
|
+
const [done, setDone] = (0, import_react12.useState)(false);
|
|
1903
|
+
const alpha = (hex, op) => {
|
|
1904
|
+
const r = parseInt(hex.slice(1, 3), 16);
|
|
1905
|
+
const g = parseInt(hex.slice(3, 5), 16);
|
|
1906
|
+
const b = parseInt(hex.slice(5, 7), 16);
|
|
1907
|
+
return `rgba(${r},${g},${b},${op})`;
|
|
1908
|
+
};
|
|
1909
|
+
(0, import_react12.useEffect)(() => {
|
|
1910
|
+
const steps = 100;
|
|
1911
|
+
const interval = duration / steps;
|
|
1912
|
+
let current = 0;
|
|
1913
|
+
const timer = setInterval(() => {
|
|
1914
|
+
current += 1;
|
|
1915
|
+
setProgress(current);
|
|
1916
|
+
if (current >= 100) {
|
|
1917
|
+
clearInterval(timer);
|
|
1918
|
+
setTimeout(() => {
|
|
1919
|
+
setDone(true);
|
|
1920
|
+
onComplete();
|
|
1921
|
+
}, 300);
|
|
1922
|
+
}
|
|
1923
|
+
}, interval);
|
|
1924
|
+
return () => clearInterval(timer);
|
|
1925
|
+
}, [duration]);
|
|
1926
|
+
if (done) return null;
|
|
1927
|
+
return /* @__PURE__ */ import_react12.default.createElement(import_react12.default.Fragment, null, /* @__PURE__ */ import_react12.default.createElement("style", null, `
|
|
1928
|
+
@keyframes pl-spin { to { transform: rotate(360deg); } }
|
|
1929
|
+
@keyframes pl-pulse { 0%,100%{transform:scale(1);opacity:1} 50%{transform:scale(1.15);opacity:0.7} }
|
|
1930
|
+
@keyframes pl-dot { 0%,80%,100%{transform:scale(0.6);opacity:0.3} 40%{transform:scale(1);opacity:1} }
|
|
1931
|
+
@keyframes pl-fade { from{opacity:0;transform:translateY(10px)} to{opacity:1;transform:translateY(0)} }
|
|
1932
|
+
@keyframes pl-bar { 0%{background-position:0% 50%} 100%{background-position:200% 50%} }
|
|
1933
|
+
`), /* @__PURE__ */ import_react12.default.createElement("div", { style: {
|
|
1934
|
+
width: "100%",
|
|
1935
|
+
height: "100%",
|
|
1936
|
+
background: bg,
|
|
1937
|
+
display: "flex",
|
|
1938
|
+
flexDirection: "column",
|
|
1939
|
+
alignItems: "center",
|
|
1940
|
+
justifyContent: "center",
|
|
1941
|
+
gap: "28px",
|
|
1942
|
+
fontFamily: "system-ui, -apple-system, sans-serif",
|
|
1943
|
+
animation: "pl-fade 0.3s ease"
|
|
1944
|
+
} }, /* @__PURE__ */ import_react12.default.createElement("div", { style: {
|
|
1945
|
+
position: "absolute",
|
|
1946
|
+
top: "-100px",
|
|
1947
|
+
left: "-100px",
|
|
1948
|
+
width: "400px",
|
|
1949
|
+
height: "400px",
|
|
1950
|
+
borderRadius: "50%",
|
|
1951
|
+
background: `radial-gradient(circle, ${alpha(accent, 0.12)}, transparent 70%)`,
|
|
1952
|
+
filter: "blur(60px)",
|
|
1953
|
+
pointerEvents: "none"
|
|
1954
|
+
} }), /* @__PURE__ */ import_react12.default.createElement("div", { style: {
|
|
1955
|
+
position: "absolute",
|
|
1956
|
+
bottom: "-100px",
|
|
1957
|
+
right: "-100px",
|
|
1958
|
+
width: "350px",
|
|
1959
|
+
height: "350px",
|
|
1960
|
+
borderRadius: "50%",
|
|
1961
|
+
background: `radial-gradient(circle, ${alpha(accent, 0.08)}, transparent 70%)`,
|
|
1962
|
+
filter: "blur(60px)",
|
|
1963
|
+
pointerEvents: "none"
|
|
1964
|
+
} }), /* @__PURE__ */ import_react12.default.createElement("div", { style: { display: "flex", alignItems: "center", gap: "10px", animation: "pl-fade 0.4s ease" } }, /* @__PURE__ */ import_react12.default.createElement("div", { style: {
|
|
1965
|
+
width: "36px",
|
|
1966
|
+
height: "36px",
|
|
1967
|
+
borderRadius: "10px",
|
|
1968
|
+
background: `linear-gradient(135deg, ${accent}, ${alpha(accent, 0.6)})`,
|
|
1969
|
+
display: "flex",
|
|
1970
|
+
alignItems: "center",
|
|
1971
|
+
justifyContent: "center",
|
|
1972
|
+
fontSize: "16px",
|
|
1973
|
+
fontWeight: "800",
|
|
1974
|
+
color: "#fff",
|
|
1975
|
+
animation: type === "pulse" ? `pl-pulse 1.5s ease infinite` : "none"
|
|
1976
|
+
} }, logo[0]), /* @__PURE__ */ import_react12.default.createElement("span", { style: { fontSize: "20px", fontWeight: "800", color: "#fff", letterSpacing: "-0.5px" } }, logo)), type === "spinner" && /* @__PURE__ */ import_react12.default.createElement("div", { style: { position: "relative", width: "56px", height: "56px" } }, /* @__PURE__ */ import_react12.default.createElement("svg", { width: "56", height: "56", viewBox: "0 0 56 56" }, /* @__PURE__ */ import_react12.default.createElement(
|
|
1977
|
+
"circle",
|
|
1978
|
+
{
|
|
1979
|
+
cx: "28",
|
|
1980
|
+
cy: "28",
|
|
1981
|
+
r: "22",
|
|
1982
|
+
fill: "none",
|
|
1983
|
+
stroke: alpha(accent, 0.12),
|
|
1984
|
+
strokeWidth: "4"
|
|
1985
|
+
}
|
|
1986
|
+
), /* @__PURE__ */ import_react12.default.createElement(
|
|
1987
|
+
"circle",
|
|
1988
|
+
{
|
|
1989
|
+
cx: "28",
|
|
1990
|
+
cy: "28",
|
|
1991
|
+
r: "22",
|
|
1992
|
+
fill: "none",
|
|
1993
|
+
stroke: accent,
|
|
1994
|
+
strokeWidth: "4",
|
|
1995
|
+
strokeLinecap: "round",
|
|
1996
|
+
strokeDasharray: "34.8 104.4",
|
|
1997
|
+
style: { transformOrigin: "center", animation: "pl-spin 0.9s linear infinite" }
|
|
1998
|
+
}
|
|
1999
|
+
)), /* @__PURE__ */ import_react12.default.createElement("span", { style: {
|
|
2000
|
+
position: "absolute",
|
|
2001
|
+
inset: 0,
|
|
2002
|
+
display: "flex",
|
|
2003
|
+
alignItems: "center",
|
|
2004
|
+
justifyContent: "center",
|
|
2005
|
+
fontSize: "11px",
|
|
2006
|
+
fontWeight: "700",
|
|
2007
|
+
color: accent
|
|
2008
|
+
} }, Math.round(progress), "%")), type === "dots" && /* @__PURE__ */ import_react12.default.createElement("div", { style: { display: "flex", gap: "10px", alignItems: "center" } }, [0, 1, 2].map((i) => /* @__PURE__ */ import_react12.default.createElement("div", { key: i, style: {
|
|
2009
|
+
width: "12px",
|
|
2010
|
+
height: "12px",
|
|
2011
|
+
borderRadius: "50%",
|
|
2012
|
+
background: accent,
|
|
2013
|
+
animation: `pl-dot 1.2s ease infinite`,
|
|
2014
|
+
animationDelay: `${i * 0.2}s`
|
|
2015
|
+
} }))), type === "pulse" && /* @__PURE__ */ import_react12.default.createElement("div", { style: { position: "relative", width: "56px", height: "56px" } }, [0, 1].map((i) => /* @__PURE__ */ import_react12.default.createElement("div", { key: i, style: {
|
|
2016
|
+
position: "absolute",
|
|
2017
|
+
inset: 0,
|
|
2018
|
+
borderRadius: "50%",
|
|
2019
|
+
background: alpha(accent, 0.3),
|
|
2020
|
+
animation: `pl-pulse 1.5s ease infinite`,
|
|
2021
|
+
animationDelay: `${i * 0.4}s`
|
|
2022
|
+
} })), /* @__PURE__ */ import_react12.default.createElement("div", { style: {
|
|
2023
|
+
position: "absolute",
|
|
2024
|
+
inset: "30%",
|
|
2025
|
+
borderRadius: "50%",
|
|
2026
|
+
background: accent
|
|
2027
|
+
} })), type === "ring" && /* @__PURE__ */ import_react12.default.createElement("div", { style: {
|
|
2028
|
+
width: "52px",
|
|
2029
|
+
height: "52px",
|
|
2030
|
+
borderRadius: "50%",
|
|
2031
|
+
border: `4px solid ${alpha(accent, 0.15)}`,
|
|
2032
|
+
borderTop: `4px solid ${accent}`,
|
|
2033
|
+
borderRight: `4px solid ${accent}`,
|
|
2034
|
+
animation: "pl-spin 0.9s linear infinite"
|
|
2035
|
+
} }), type === "bar" && /* @__PURE__ */ import_react12.default.createElement("div", { style: { width: "200px", display: "flex", flexDirection: "column", gap: "8px" } }, /* @__PURE__ */ import_react12.default.createElement("div", { style: {
|
|
2036
|
+
width: "100%",
|
|
2037
|
+
height: "4px",
|
|
2038
|
+
background: alpha(accent, 0.15),
|
|
2039
|
+
borderRadius: "2px",
|
|
2040
|
+
overflow: "hidden"
|
|
2041
|
+
} }, /* @__PURE__ */ import_react12.default.createElement("div", { style: {
|
|
2042
|
+
height: "100%",
|
|
2043
|
+
width: `${progress}%`,
|
|
2044
|
+
borderRadius: "2px",
|
|
2045
|
+
background: `linear-gradient(90deg, ${accent}, ${alpha(accent, 0.6)}, ${accent})`,
|
|
2046
|
+
backgroundSize: "200% 100%",
|
|
2047
|
+
animation: "pl-bar 1.2s linear infinite",
|
|
2048
|
+
transition: "width 0.03s linear"
|
|
2049
|
+
} })), /* @__PURE__ */ import_react12.default.createElement("div", { style: {
|
|
2050
|
+
display: "flex",
|
|
2051
|
+
justifyContent: "space-between",
|
|
2052
|
+
fontSize: "11px",
|
|
2053
|
+
color: "rgba(255,255,255,0.3)"
|
|
2054
|
+
} }, /* @__PURE__ */ import_react12.default.createElement("span", null, loadingText), /* @__PURE__ */ import_react12.default.createElement("span", null, Math.round(progress), "%")), subText && /* @__PURE__ */ import_react12.default.createElement("p", { style: { fontSize: "12px", color: "rgba(255,255,255,0.18)", margin: "4px 0 0", textAlign: "center" } }, subText)), type !== "bar" && /* @__PURE__ */ import_react12.default.createElement("div", { style: { textAlign: "center" } }, /* @__PURE__ */ import_react12.default.createElement("p", { style: { fontSize: "13px", color: "rgba(255,255,255,0.3)", margin: "0 0 4px" } }, loadingText), subText && /* @__PURE__ */ import_react12.default.createElement("p", { style: { fontSize: "12px", color: "rgba(255,255,255,0.15)", margin: 0 } }, subText))));
|
|
2055
|
+
};
|
|
2056
|
+
|
|
2057
|
+
// src/components/OTPInput/OTPInput.jsx
|
|
2058
|
+
var import_react13 = __toESM(require("react"));
|
|
2059
|
+
var OTPInput = ({
|
|
2060
|
+
length = 6,
|
|
2061
|
+
onComplete = () => {
|
|
2062
|
+
},
|
|
2063
|
+
onCancel = () => {
|
|
2064
|
+
},
|
|
2065
|
+
accent = "#6366f1",
|
|
2066
|
+
bg = "#0f172a",
|
|
2067
|
+
radius = "16px",
|
|
2068
|
+
label = "Enter verification code",
|
|
2069
|
+
subLabel = "We sent a code to your email",
|
|
2070
|
+
errorText = "",
|
|
2071
|
+
resendText = "Resend code",
|
|
2072
|
+
onResend = () => {
|
|
2073
|
+
}
|
|
2074
|
+
}) => {
|
|
2075
|
+
const [otp, setOtp] = (0, import_react13.useState)(Array(length).fill(""));
|
|
2076
|
+
const [focused, setFocused] = (0, import_react13.useState)(0);
|
|
2077
|
+
const [completed, setCompleted] = (0, import_react13.useState)(false);
|
|
2078
|
+
const [resendTimer, setResendTimer] = (0, import_react13.useState)(30);
|
|
2079
|
+
const inputs = (0, import_react13.useRef)([]);
|
|
2080
|
+
const alpha = (hex, op) => {
|
|
2081
|
+
const r = parseInt(hex.slice(1, 3), 16);
|
|
2082
|
+
const g = parseInt(hex.slice(3, 5), 16);
|
|
2083
|
+
const b = parseInt(hex.slice(5, 7), 16);
|
|
2084
|
+
return `rgba(${r},${g},${b},${op})`;
|
|
2085
|
+
};
|
|
2086
|
+
(0, import_react13.useEffect)(() => {
|
|
2087
|
+
var _a;
|
|
2088
|
+
(_a = inputs.current[0]) == null ? void 0 : _a.focus();
|
|
2089
|
+
}, []);
|
|
2090
|
+
(0, import_react13.useEffect)(() => {
|
|
2091
|
+
if (resendTimer <= 0) return;
|
|
2092
|
+
const t = setInterval(() => setResendTimer((s) => s - 1), 1e3);
|
|
2093
|
+
return () => clearInterval(t);
|
|
2094
|
+
}, [resendTimer]);
|
|
2095
|
+
const handleChange = (e, i) => {
|
|
2096
|
+
var _a;
|
|
2097
|
+
const val = e.target.value.replace(/\D/g, "").slice(-1);
|
|
2098
|
+
const newOtp = [...otp];
|
|
2099
|
+
newOtp[i] = val;
|
|
2100
|
+
setOtp(newOtp);
|
|
2101
|
+
if (val && i < length - 1) {
|
|
2102
|
+
(_a = inputs.current[i + 1]) == null ? void 0 : _a.focus();
|
|
2103
|
+
setFocused(i + 1);
|
|
2104
|
+
}
|
|
2105
|
+
if (newOtp.every((v) => v !== "")) {
|
|
2106
|
+
setCompleted(true);
|
|
2107
|
+
onComplete(newOtp.join(""));
|
|
2108
|
+
} else {
|
|
2109
|
+
setCompleted(false);
|
|
2110
|
+
}
|
|
2111
|
+
};
|
|
2112
|
+
const handleKeyDown = (e, i) => {
|
|
2113
|
+
var _a, _b, _c;
|
|
2114
|
+
if (e.key === "Backspace") {
|
|
2115
|
+
const newOtp = [...otp];
|
|
2116
|
+
if (otp[i]) {
|
|
2117
|
+
newOtp[i] = "";
|
|
2118
|
+
setOtp(newOtp);
|
|
2119
|
+
} else if (i > 0) {
|
|
2120
|
+
newOtp[i - 1] = "";
|
|
2121
|
+
setOtp(newOtp);
|
|
2122
|
+
(_a = inputs.current[i - 1]) == null ? void 0 : _a.focus();
|
|
2123
|
+
setFocused(i - 1);
|
|
2124
|
+
}
|
|
2125
|
+
setCompleted(false);
|
|
2126
|
+
}
|
|
2127
|
+
if (e.key === "ArrowLeft" && i > 0) {
|
|
2128
|
+
(_b = inputs.current[i - 1]) == null ? void 0 : _b.focus();
|
|
2129
|
+
setFocused(i - 1);
|
|
2130
|
+
}
|
|
2131
|
+
if (e.key === "ArrowRight" && i < length - 1) {
|
|
2132
|
+
(_c = inputs.current[i + 1]) == null ? void 0 : _c.focus();
|
|
2133
|
+
setFocused(i + 1);
|
|
2134
|
+
}
|
|
2135
|
+
};
|
|
2136
|
+
const handlePaste = (e) => {
|
|
2137
|
+
var _a;
|
|
2138
|
+
e.preventDefault();
|
|
2139
|
+
const pasted = e.clipboardData.getData("text").replace(/\D/g, "").slice(0, length);
|
|
2140
|
+
if (!pasted) return;
|
|
2141
|
+
const newOtp = [...otp];
|
|
2142
|
+
pasted.split("").forEach((ch, i) => {
|
|
2143
|
+
newOtp[i] = ch;
|
|
2144
|
+
});
|
|
2145
|
+
setOtp(newOtp);
|
|
2146
|
+
const nextIndex = Math.min(pasted.length, length - 1);
|
|
2147
|
+
(_a = inputs.current[nextIndex]) == null ? void 0 : _a.focus();
|
|
2148
|
+
setFocused(nextIndex);
|
|
2149
|
+
if (newOtp.every((v) => v !== "")) {
|
|
2150
|
+
setCompleted(true);
|
|
2151
|
+
onComplete(newOtp.join(""));
|
|
2152
|
+
}
|
|
2153
|
+
};
|
|
2154
|
+
const handleResend = () => {
|
|
2155
|
+
var _a;
|
|
2156
|
+
setOtp(Array(length).fill(""));
|
|
2157
|
+
setCompleted(false);
|
|
2158
|
+
setResendTimer(30);
|
|
2159
|
+
(_a = inputs.current[0]) == null ? void 0 : _a.focus();
|
|
2160
|
+
setFocused(0);
|
|
2161
|
+
onResend();
|
|
2162
|
+
};
|
|
2163
|
+
return /* @__PURE__ */ import_react13.default.createElement("div", { style: {
|
|
2164
|
+
background: bg,
|
|
2165
|
+
borderRadius: radius,
|
|
2166
|
+
padding: "28px 24px",
|
|
2167
|
+
width: "fit-content",
|
|
2168
|
+
fontFamily: "system-ui, sans-serif",
|
|
2169
|
+
border: "1px solid rgba(255,255,255,0.07)",
|
|
2170
|
+
boxShadow: "0 10px 40px rgba(0,0,0,0.4)"
|
|
2171
|
+
} }, /* @__PURE__ */ import_react13.default.createElement("div", { style: { textAlign: "center", marginBottom: "24px" } }, /* @__PURE__ */ import_react13.default.createElement("div", { style: {
|
|
2172
|
+
width: "44px",
|
|
2173
|
+
height: "44px",
|
|
2174
|
+
borderRadius: "12px",
|
|
2175
|
+
background: alpha(accent, 0.12),
|
|
2176
|
+
border: `1px solid ${alpha(accent, 0.25)}`,
|
|
2177
|
+
display: "flex",
|
|
2178
|
+
alignItems: "center",
|
|
2179
|
+
justifyContent: "center",
|
|
2180
|
+
margin: "0 auto 14px"
|
|
2181
|
+
} }, /* @__PURE__ */ import_react13.default.createElement(
|
|
2182
|
+
"svg",
|
|
2183
|
+
{
|
|
2184
|
+
width: "20",
|
|
2185
|
+
height: "20",
|
|
2186
|
+
viewBox: "0 0 24 24",
|
|
2187
|
+
fill: "none",
|
|
2188
|
+
stroke: accent,
|
|
2189
|
+
strokeWidth: "2",
|
|
2190
|
+
strokeLinecap: "round",
|
|
2191
|
+
strokeLinejoin: "round"
|
|
2192
|
+
},
|
|
2193
|
+
/* @__PURE__ */ import_react13.default.createElement("rect", { x: "2", y: "7", width: "20", height: "14", rx: "2" }),
|
|
2194
|
+
/* @__PURE__ */ import_react13.default.createElement("path", { d: "M16 3l-4 4-4-4" })
|
|
2195
|
+
)), /* @__PURE__ */ import_react13.default.createElement("p", { style: { fontSize: "15px", fontWeight: "700", color: "#fff", margin: "0 0 5px" } }, label), /* @__PURE__ */ import_react13.default.createElement("p", { style: { fontSize: "12px", color: "rgba(255,255,255,0.35)", margin: 0 } }, subLabel)), /* @__PURE__ */ import_react13.default.createElement("div", { style: { display: "flex", gap: "10px", justifyContent: "center", marginBottom: "8px" } }, otp.map((val, i) => /* @__PURE__ */ import_react13.default.createElement(
|
|
2196
|
+
"input",
|
|
2197
|
+
{
|
|
2198
|
+
key: i,
|
|
2199
|
+
ref: (el) => inputs.current[i] = el,
|
|
2200
|
+
type: "text",
|
|
2201
|
+
inputMode: "numeric",
|
|
2202
|
+
maxLength: 1,
|
|
2203
|
+
value: val,
|
|
2204
|
+
onChange: (e) => handleChange(e, i),
|
|
2205
|
+
onKeyDown: (e) => handleKeyDown(e, i),
|
|
2206
|
+
onPaste: handlePaste,
|
|
2207
|
+
onFocus: () => setFocused(i),
|
|
2208
|
+
style: {
|
|
2209
|
+
width: "44px",
|
|
2210
|
+
height: "52px",
|
|
2211
|
+
textAlign: "center",
|
|
2212
|
+
fontSize: "20px",
|
|
2213
|
+
fontWeight: "700",
|
|
2214
|
+
color: "#fff",
|
|
2215
|
+
background: val ? alpha(accent, 0.1) : "rgba(255,255,255,0.04)",
|
|
2216
|
+
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)"}`,
|
|
2217
|
+
borderRadius: "12px",
|
|
2218
|
+
outline: "none",
|
|
2219
|
+
caretColor: accent,
|
|
2220
|
+
transition: "all 0.2s",
|
|
2221
|
+
fontFamily: "inherit"
|
|
2222
|
+
}
|
|
2223
|
+
}
|
|
2224
|
+
))), length === 6 && /* @__PURE__ */ import_react13.default.createElement("div", { style: { display: "flex", justifyContent: "center", marginBottom: "8px" } }, /* @__PURE__ */ import_react13.default.createElement("div", { style: { display: "flex", gap: "10px" } }, [0, 1, 2].map((i) => /* @__PURE__ */ import_react13.default.createElement("div", { key: i, style: { width: "44px" } })), /* @__PURE__ */ import_react13.default.createElement("div", { style: { width: "10px", display: "flex", alignItems: "center", justifyContent: "center" } }, /* @__PURE__ */ import_react13.default.createElement("div", { style: { width: "6px", height: "1.5px", background: "rgba(255,255,255,0.15)", borderRadius: "1px" } })), [0, 1, 2].map((i) => /* @__PURE__ */ import_react13.default.createElement("div", { key: i, style: { width: "44px" } })))), errorText && /* @__PURE__ */ import_react13.default.createElement("p", { style: {
|
|
2225
|
+
fontSize: "12px",
|
|
2226
|
+
color: "#f87171",
|
|
2227
|
+
textAlign: "center",
|
|
2228
|
+
margin: "6px 0 0",
|
|
2229
|
+
display: "flex",
|
|
2230
|
+
alignItems: "center",
|
|
2231
|
+
justifyContent: "center",
|
|
2232
|
+
gap: "5px"
|
|
2233
|
+
} }, /* @__PURE__ */ import_react13.default.createElement(
|
|
2234
|
+
"svg",
|
|
2235
|
+
{
|
|
2236
|
+
width: "12",
|
|
2237
|
+
height: "12",
|
|
2238
|
+
viewBox: "0 0 24 24",
|
|
2239
|
+
fill: "none",
|
|
2240
|
+
stroke: "currentColor",
|
|
2241
|
+
strokeWidth: "2.5",
|
|
2242
|
+
strokeLinecap: "round"
|
|
2243
|
+
},
|
|
2244
|
+
/* @__PURE__ */ import_react13.default.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
|
2245
|
+
/* @__PURE__ */ import_react13.default.createElement("line", { x1: "12", y1: "8", x2: "12", y2: "12" }),
|
|
2246
|
+
/* @__PURE__ */ import_react13.default.createElement("line", { x1: "12", y1: "16", x2: "12.01", y2: "16" })
|
|
2247
|
+
), errorText), /* @__PURE__ */ import_react13.default.createElement(
|
|
2248
|
+
"button",
|
|
2249
|
+
{
|
|
2250
|
+
onClick: () => completed && onComplete(otp.join("")),
|
|
2251
|
+
disabled: !completed,
|
|
2252
|
+
style: {
|
|
2253
|
+
width: "100%",
|
|
2254
|
+
padding: "12px",
|
|
2255
|
+
borderRadius: "12px",
|
|
2256
|
+
border: "none",
|
|
2257
|
+
marginTop: "20px",
|
|
2258
|
+
background: completed ? `linear-gradient(135deg, ${accent}, ${alpha(accent, 0.7)})` : "rgba(255,255,255,0.06)",
|
|
2259
|
+
color: completed ? "#fff" : "rgba(255,255,255,0.25)",
|
|
2260
|
+
fontSize: "14px",
|
|
2261
|
+
fontWeight: "700",
|
|
2262
|
+
cursor: completed ? "pointer" : "not-allowed",
|
|
2263
|
+
fontFamily: "inherit",
|
|
2264
|
+
transition: "all 0.25s"
|
|
2265
|
+
}
|
|
2266
|
+
},
|
|
2267
|
+
completed ? "Verify Code" : `Enter ${length - otp.filter((v) => v).length} more digit${length - otp.filter((v) => v).length !== 1 ? "s" : ""}`
|
|
2268
|
+
), /* @__PURE__ */ import_react13.default.createElement("p", { style: { textAlign: "center", fontSize: "12px", color: "rgba(255,255,255,0.25)", margin: "14px 0 0" } }, "Didn't receive it?", " ", /* @__PURE__ */ import_react13.default.createElement(
|
|
2269
|
+
"button",
|
|
2270
|
+
{
|
|
2271
|
+
onClick: handleResend,
|
|
2272
|
+
disabled: resendTimer > 0,
|
|
2273
|
+
style: {
|
|
2274
|
+
background: "transparent",
|
|
2275
|
+
border: "none",
|
|
2276
|
+
padding: 0,
|
|
2277
|
+
fontSize: "12px",
|
|
2278
|
+
fontWeight: "700",
|
|
2279
|
+
color: resendTimer > 0 ? "rgba(255,255,255,0.25)" : accent,
|
|
2280
|
+
cursor: resendTimer > 0 ? "default" : "pointer",
|
|
2281
|
+
fontFamily: "inherit"
|
|
2282
|
+
}
|
|
2283
|
+
},
|
|
2284
|
+
resendTimer > 0 ? `${resendText} (${resendTimer}s)` : resendText
|
|
2285
|
+
)));
|
|
2286
|
+
};
|
|
2287
|
+
|
|
2288
|
+
// src/components/InvoiceCard/InvoiceCard.jsx
|
|
2289
|
+
var import_react14 = __toESM(require("react"));
|
|
2290
|
+
var InvoiceCard = ({
|
|
2291
|
+
invoiceNumber = "INV-2024-001",
|
|
2292
|
+
date = "21 March 2024",
|
|
2293
|
+
dueDate = "31 March 2024",
|
|
2294
|
+
from = {
|
|
2295
|
+
name: "VirtualAI Inc.",
|
|
2296
|
+
email: "billing@virtualai.com",
|
|
2297
|
+
address: "123 Tech Street, San Francisco, CA"
|
|
2298
|
+
},
|
|
2299
|
+
to = {
|
|
2300
|
+
name: "Aryan Sharma",
|
|
2301
|
+
email: "aryan@example.com",
|
|
2302
|
+
address: "456 Dev Lane, Mumbai, India"
|
|
2303
|
+
},
|
|
2304
|
+
items = [
|
|
2305
|
+
{ name: "Pro Plan Subscription", qty: 1, price: 29 },
|
|
2306
|
+
{ name: "Extra AI Credits (500)", qty: 2, price: 9 },
|
|
2307
|
+
{ name: "Custom Domain Setup", qty: 1, price: 15 }
|
|
2308
|
+
],
|
|
2309
|
+
taxRate = 18,
|
|
2310
|
+
currency = "$",
|
|
2311
|
+
accent = "#6366f1",
|
|
2312
|
+
bg = "#0f172a",
|
|
2313
|
+
radius = "20px",
|
|
2314
|
+
status = "unpaid",
|
|
2315
|
+
onPayClick = () => {
|
|
2316
|
+
},
|
|
2317
|
+
onDownloadClick = () => {
|
|
2318
|
+
}
|
|
2319
|
+
}) => {
|
|
2320
|
+
const [paid, setPaid] = (0, import_react14.useState)(status === "paid");
|
|
2321
|
+
const alpha = (hex, op) => {
|
|
2322
|
+
const r = parseInt(hex.slice(1, 3), 16);
|
|
2323
|
+
const g = parseInt(hex.slice(3, 5), 16);
|
|
2324
|
+
const b = parseInt(hex.slice(5, 7), 16);
|
|
2325
|
+
return `rgba(${r},${g},${b},${op})`;
|
|
2326
|
+
};
|
|
2327
|
+
const subtotal = items.reduce((s, i) => s + i.qty * i.price, 0);
|
|
2328
|
+
const tax = parseFloat((subtotal * taxRate / 100).toFixed(2));
|
|
2329
|
+
const total = parseFloat((subtotal + tax).toFixed(2));
|
|
2330
|
+
const statusConfig = {
|
|
2331
|
+
paid: { label: "Paid", bg: "rgba(16,185,129,0.15)", color: "#34d399", border: "rgba(16,185,129,0.3)" },
|
|
2332
|
+
unpaid: { label: "Unpaid", bg: "rgba(239,68,68,0.12)", color: "#f87171", border: "rgba(239,68,68,0.3)" },
|
|
2333
|
+
pending: { label: "Pending", bg: "rgba(245,158,11,0.12)", color: "#fbbf24", border: "rgba(245,158,11,0.3)" }
|
|
2334
|
+
};
|
|
2335
|
+
const sc = statusConfig[paid ? "paid" : status] || statusConfig.unpaid;
|
|
2336
|
+
const Row = ({ label, value, bold, large, accentColor }) => /* @__PURE__ */ import_react14.default.createElement("div", { style: {
|
|
2337
|
+
display: "flex",
|
|
2338
|
+
justifyContent: "space-between",
|
|
2339
|
+
alignItems: "center",
|
|
2340
|
+
padding: "5px 0"
|
|
2341
|
+
} }, /* @__PURE__ */ import_react14.default.createElement("span", { style: {
|
|
2342
|
+
fontSize: large ? "14px" : "12px",
|
|
2343
|
+
fontWeight: bold ? "700" : "400",
|
|
2344
|
+
color: large ? "#fff" : "rgba(255,255,255,0.45)"
|
|
2345
|
+
} }, label), /* @__PURE__ */ import_react14.default.createElement("span", { style: {
|
|
2346
|
+
fontSize: large ? "16px" : "13px",
|
|
2347
|
+
fontWeight: bold ? "800" : "600",
|
|
2348
|
+
color: accentColor || (large ? "#fff" : "rgba(255,255,255,0.85)")
|
|
2349
|
+
} }, currency, typeof value === "number" ? value.toFixed(2) : value));
|
|
2350
|
+
return /* @__PURE__ */ import_react14.default.createElement("div", { style: {
|
|
2351
|
+
background: bg,
|
|
2352
|
+
borderRadius: radius,
|
|
2353
|
+
padding: "24px",
|
|
2354
|
+
width: "340px",
|
|
2355
|
+
fontFamily: "system-ui, sans-serif",
|
|
2356
|
+
border: "1px solid rgba(255,255,255,0.07)",
|
|
2357
|
+
boxShadow: "0 10px 40px rgba(0,0,0,0.4)",
|
|
2358
|
+
color: "#fff"
|
|
2359
|
+
} }, /* @__PURE__ */ import_react14.default.createElement("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "flex-start", marginBottom: "20px" } }, /* @__PURE__ */ import_react14.default.createElement("div", null, /* @__PURE__ */ import_react14.default.createElement("div", { style: { display: "flex", alignItems: "center", gap: "7px", marginBottom: "4px" } }, /* @__PURE__ */ import_react14.default.createElement("div", { style: {
|
|
2360
|
+
width: "24px",
|
|
2361
|
+
height: "24px",
|
|
2362
|
+
borderRadius: "6px",
|
|
2363
|
+
background: `linear-gradient(135deg, ${accent}, ${alpha(accent, 0.6)})`,
|
|
2364
|
+
display: "flex",
|
|
2365
|
+
alignItems: "center",
|
|
2366
|
+
justifyContent: "center",
|
|
2367
|
+
fontSize: "11px",
|
|
2368
|
+
fontWeight: "800",
|
|
2369
|
+
color: "#fff"
|
|
2370
|
+
} }, "V"), /* @__PURE__ */ import_react14.default.createElement("span", { style: { fontSize: "14px", fontWeight: "800" } }, from.name)), /* @__PURE__ */ import_react14.default.createElement("p", { style: { fontSize: "11px", color: "rgba(255,255,255,0.3)", margin: 0 } }, invoiceNumber)), /* @__PURE__ */ import_react14.default.createElement("div", { style: {
|
|
2371
|
+
padding: "4px 12px",
|
|
2372
|
+
borderRadius: "20px",
|
|
2373
|
+
fontSize: "11px",
|
|
2374
|
+
fontWeight: "700",
|
|
2375
|
+
background: sc.bg,
|
|
2376
|
+
color: sc.color,
|
|
2377
|
+
border: `1px solid ${sc.border}`,
|
|
2378
|
+
textTransform: "uppercase",
|
|
2379
|
+
letterSpacing: "0.5px"
|
|
2380
|
+
} }, sc.label)), /* @__PURE__ */ import_react14.default.createElement("div", { style: {
|
|
2381
|
+
display: "grid",
|
|
2382
|
+
gridTemplateColumns: "1fr 1fr",
|
|
2383
|
+
gap: "12px",
|
|
2384
|
+
background: "rgba(255,255,255,0.03)",
|
|
2385
|
+
border: "1px solid rgba(255,255,255,0.06)",
|
|
2386
|
+
borderRadius: "12px",
|
|
2387
|
+
padding: "14px",
|
|
2388
|
+
marginBottom: "20px"
|
|
2389
|
+
} }, [{ label: "From", info: from }, { label: "To", info: to }].map(({ label, info }) => /* @__PURE__ */ import_react14.default.createElement("div", { key: label }, /* @__PURE__ */ import_react14.default.createElement("p", { style: { fontSize: "10px", fontWeight: "700", color: "rgba(255,255,255,0.25)", textTransform: "uppercase", letterSpacing: "0.8px", marginBottom: "5px" } }, label), /* @__PURE__ */ import_react14.default.createElement("p", { style: { fontSize: "12px", fontWeight: "700", color: "#fff", margin: "0 0 2px" } }, info.name), /* @__PURE__ */ import_react14.default.createElement("p", { style: { fontSize: "11px", color: "rgba(255,255,255,0.35)", margin: "0 0 2px" } }, info.email), /* @__PURE__ */ import_react14.default.createElement("p", { style: { fontSize: "10px", color: "rgba(255,255,255,0.25)", margin: 0, lineHeight: 1.4 } }, info.address)))), /* @__PURE__ */ import_react14.default.createElement("div", { style: { display: "flex", gap: "10px", marginBottom: "20px" } }, [{ label: "Issue Date", val: date }, { label: "Due Date", val: dueDate }].map(({ label, val }) => /* @__PURE__ */ import_react14.default.createElement("div", { key: label, style: {
|
|
2390
|
+
flex: 1,
|
|
2391
|
+
background: "rgba(255,255,255,0.03)",
|
|
2392
|
+
border: "1px solid rgba(255,255,255,0.06)",
|
|
2393
|
+
borderRadius: "10px",
|
|
2394
|
+
padding: "10px 12px"
|
|
2395
|
+
} }, /* @__PURE__ */ import_react14.default.createElement("p", { style: { fontSize: "10px", color: "rgba(255,255,255,0.25)", textTransform: "uppercase", letterSpacing: "0.8px", margin: "0 0 3px", fontWeight: "700" } }, label), /* @__PURE__ */ import_react14.default.createElement("p", { style: { fontSize: "12px", fontWeight: "700", color: "#fff", margin: 0 } }, val)))), /* @__PURE__ */ import_react14.default.createElement("div", { style: { marginBottom: "16px" } }, /* @__PURE__ */ import_react14.default.createElement("div", { style: {
|
|
2396
|
+
display: "grid",
|
|
2397
|
+
gridTemplateColumns: "1fr auto auto",
|
|
2398
|
+
gap: "8px",
|
|
2399
|
+
padding: "6px 8px",
|
|
2400
|
+
borderBottom: "1px solid rgba(255,255,255,0.06)",
|
|
2401
|
+
marginBottom: "4px"
|
|
2402
|
+
} }, ["Item", "Qty", "Amount"].map((h) => /* @__PURE__ */ import_react14.default.createElement("span", { key: h, style: { fontSize: "10px", fontWeight: "700", color: "rgba(255,255,255,0.25)", textTransform: "uppercase", letterSpacing: "0.8px", textAlign: h !== "Item" ? "right" : "left" } }, h))), items.map((item, i) => /* @__PURE__ */ import_react14.default.createElement("div", { key: i, style: {
|
|
2403
|
+
display: "grid",
|
|
2404
|
+
gridTemplateColumns: "1fr auto auto",
|
|
2405
|
+
gap: "8px",
|
|
2406
|
+
padding: "8px",
|
|
2407
|
+
borderRadius: "8px",
|
|
2408
|
+
background: i % 2 === 0 ? "rgba(255,255,255,0.02)" : "transparent"
|
|
2409
|
+
} }, /* @__PURE__ */ import_react14.default.createElement("span", { style: { fontSize: "12px", color: "rgba(255,255,255,0.75)" } }, item.name), /* @__PURE__ */ import_react14.default.createElement("span", { style: { fontSize: "12px", color: "rgba(255,255,255,0.35)", textAlign: "right" } }, "\xD7", item.qty), /* @__PURE__ */ import_react14.default.createElement("span", { style: { fontSize: "12px", fontWeight: "600", color: "#fff", textAlign: "right" } }, currency, (item.qty * item.price).toFixed(2))))), /* @__PURE__ */ import_react14.default.createElement("div", { style: {
|
|
2410
|
+
background: "rgba(255,255,255,0.03)",
|
|
2411
|
+
border: "1px solid rgba(255,255,255,0.06)",
|
|
2412
|
+
borderRadius: "12px",
|
|
2413
|
+
padding: "12px 14px",
|
|
2414
|
+
marginBottom: "20px"
|
|
2415
|
+
} }, /* @__PURE__ */ import_react14.default.createElement(Row, { label: "Subtotal", value: subtotal }), /* @__PURE__ */ import_react14.default.createElement(Row, { label: `Tax (${taxRate}%)`, value: tax }), /* @__PURE__ */ import_react14.default.createElement("div", { style: { height: "1px", background: "rgba(255,255,255,0.07)", margin: "8px 0" } }), /* @__PURE__ */ import_react14.default.createElement(Row, { label: "Total", value: total, bold: true, large: true, accentColor: accent })), /* @__PURE__ */ import_react14.default.createElement("div", { style: { display: "flex", gap: "8px" } }, !paid && /* @__PURE__ */ import_react14.default.createElement(
|
|
2416
|
+
"button",
|
|
2417
|
+
{
|
|
2418
|
+
onClick: () => {
|
|
2419
|
+
setPaid(true);
|
|
2420
|
+
onPayClick();
|
|
2421
|
+
},
|
|
2422
|
+
style: {
|
|
2423
|
+
flex: 1,
|
|
2424
|
+
padding: "11px",
|
|
2425
|
+
borderRadius: "12px",
|
|
2426
|
+
border: "none",
|
|
2427
|
+
background: `linear-gradient(135deg, ${accent}, ${alpha(accent, 0.7)})`,
|
|
2428
|
+
color: "#fff",
|
|
2429
|
+
fontSize: "13px",
|
|
2430
|
+
fontWeight: "700",
|
|
2431
|
+
cursor: "pointer",
|
|
2432
|
+
fontFamily: "inherit",
|
|
2433
|
+
transition: "opacity 0.2s"
|
|
2434
|
+
},
|
|
2435
|
+
onMouseEnter: (e) => e.currentTarget.style.opacity = "0.85",
|
|
2436
|
+
onMouseLeave: (e) => e.currentTarget.style.opacity = "1"
|
|
2437
|
+
},
|
|
2438
|
+
"Pay ",
|
|
2439
|
+
currency,
|
|
2440
|
+
total.toFixed(2)
|
|
2441
|
+
), paid && /* @__PURE__ */ import_react14.default.createElement("div", { style: {
|
|
2442
|
+
flex: 1,
|
|
2443
|
+
padding: "11px",
|
|
2444
|
+
borderRadius: "12px",
|
|
2445
|
+
background: "rgba(16,185,129,0.1)",
|
|
2446
|
+
border: "1px solid rgba(16,185,129,0.25)",
|
|
2447
|
+
display: "flex",
|
|
2448
|
+
alignItems: "center",
|
|
2449
|
+
justifyContent: "center",
|
|
2450
|
+
gap: "6px",
|
|
2451
|
+
fontSize: "13px",
|
|
2452
|
+
fontWeight: "700",
|
|
2453
|
+
color: "#34d399"
|
|
2454
|
+
} }, /* @__PURE__ */ import_react14.default.createElement(
|
|
2455
|
+
"svg",
|
|
2456
|
+
{
|
|
2457
|
+
width: "14",
|
|
2458
|
+
height: "14",
|
|
2459
|
+
viewBox: "0 0 24 24",
|
|
2460
|
+
fill: "none",
|
|
2461
|
+
stroke: "currentColor",
|
|
2462
|
+
strokeWidth: "2.5",
|
|
2463
|
+
strokeLinecap: "round"
|
|
2464
|
+
},
|
|
2465
|
+
/* @__PURE__ */ import_react14.default.createElement("polyline", { points: "20 6 9 17 4 12" })
|
|
2466
|
+
), "Payment Done"), /* @__PURE__ */ import_react14.default.createElement(
|
|
2467
|
+
"button",
|
|
2468
|
+
{
|
|
2469
|
+
onClick: onDownloadClick,
|
|
2470
|
+
style: {
|
|
2471
|
+
width: "42px",
|
|
2472
|
+
padding: "11px",
|
|
2473
|
+
borderRadius: "12px",
|
|
2474
|
+
background: "rgba(255,255,255,0.05)",
|
|
2475
|
+
border: "1px solid rgba(255,255,255,0.1)",
|
|
2476
|
+
color: "rgba(255,255,255,0.5)",
|
|
2477
|
+
cursor: "pointer",
|
|
2478
|
+
display: "flex",
|
|
2479
|
+
alignItems: "center",
|
|
2480
|
+
justifyContent: "center",
|
|
2481
|
+
transition: "all 0.2s"
|
|
2482
|
+
},
|
|
2483
|
+
onMouseEnter: (e) => {
|
|
2484
|
+
e.currentTarget.style.color = "#fff";
|
|
2485
|
+
e.currentTarget.style.borderColor = "rgba(255,255,255,0.25)";
|
|
2486
|
+
},
|
|
2487
|
+
onMouseLeave: (e) => {
|
|
2488
|
+
e.currentTarget.style.color = "rgba(255,255,255,0.5)";
|
|
2489
|
+
e.currentTarget.style.borderColor = "rgba(255,255,255,0.1)";
|
|
2490
|
+
}
|
|
2491
|
+
},
|
|
2492
|
+
/* @__PURE__ */ import_react14.default.createElement(
|
|
2493
|
+
"svg",
|
|
2494
|
+
{
|
|
2495
|
+
width: "15",
|
|
2496
|
+
height: "15",
|
|
2497
|
+
viewBox: "0 0 24 24",
|
|
2498
|
+
fill: "none",
|
|
2499
|
+
stroke: "currentColor",
|
|
2500
|
+
strokeWidth: "2",
|
|
2501
|
+
strokeLinecap: "round",
|
|
2502
|
+
strokeLinejoin: "round"
|
|
2503
|
+
},
|
|
2504
|
+
/* @__PURE__ */ import_react14.default.createElement("path", { d: "M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4M7 10l5 5 5-5M12 15V3" })
|
|
2505
|
+
)
|
|
2506
|
+
)));
|
|
2507
|
+
};
|
|
2508
|
+
|
|
2509
|
+
// src/components/FileUpload/FileUpload.jsx
|
|
2510
|
+
var import_react15 = __toESM(require("react"));
|
|
2511
|
+
var FileUpload = ({
|
|
2512
|
+
accept = "*",
|
|
2513
|
+
multiple = true,
|
|
2514
|
+
maxSizeMB = 5,
|
|
2515
|
+
accent = "#6366f1",
|
|
2516
|
+
bg = "#0f172a",
|
|
2517
|
+
radius = "16px",
|
|
2518
|
+
label = "Drop files here or click to upload",
|
|
2519
|
+
subLabel = "Supports any file up to",
|
|
2520
|
+
onUpload = () => {
|
|
2521
|
+
}
|
|
2522
|
+
}) => {
|
|
2523
|
+
const [files, setFiles] = (0, import_react15.useState)([]);
|
|
2524
|
+
const [dragging, setDragging] = (0, import_react15.useState)(false);
|
|
2525
|
+
const [error, setError] = (0, import_react15.useState)("");
|
|
2526
|
+
const inputRef = (0, import_react15.useRef)(null);
|
|
2527
|
+
const alpha = (hex, op) => {
|
|
2528
|
+
const r = parseInt(hex.slice(1, 3), 16);
|
|
2529
|
+
const g = parseInt(hex.slice(3, 5), 16);
|
|
2530
|
+
const b = parseInt(hex.slice(5, 7), 16);
|
|
2531
|
+
return `rgba(${r},${g},${b},${op})`;
|
|
2532
|
+
};
|
|
2533
|
+
const formatSize = (bytes) => {
|
|
2534
|
+
if (bytes < 1024) return bytes + " B";
|
|
2535
|
+
if (bytes < 1024 * 1024) return (bytes / 1024).toFixed(1) + " KB";
|
|
2536
|
+
return (bytes / (1024 * 1024)).toFixed(1) + " MB";
|
|
2537
|
+
};
|
|
2538
|
+
const getIcon = (type) => {
|
|
2539
|
+
if (type.startsWith("image/")) return { path: "M21 19V5a2 2 0 00-2-2H5a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2zM8.5 13.5l2.5 3 3.5-4.5 4.5 6H5l3.5-4.5z", color: "#a78bfa" };
|
|
2540
|
+
if (type.includes("pdf")) return { path: "M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8zM14 2v6h6M16 13H8M16 17H8M10 9H8", color: "#f87171" };
|
|
2541
|
+
if (type.includes("video")) return { path: "M23 7l-7 5 7 5V7zM1 5h15a2 2 0 012 2v10a2 2 0 01-2 2H1a2 2 0 01-2-2V7a2 2 0 012-2z", color: "#34d399" };
|
|
2542
|
+
if (type.includes("audio")) return { path: "M9 18V5l12-2v13M9 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm12-2c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2z", color: "#fbbf24" };
|
|
2543
|
+
return { path: "M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8zM14 2v6h6", color: "#94a3b8" };
|
|
2544
|
+
};
|
|
2545
|
+
const processFiles = (incoming) => {
|
|
2546
|
+
setError("");
|
|
2547
|
+
const valid = [];
|
|
2548
|
+
for (const f of incoming) {
|
|
2549
|
+
if (f.size > maxSizeMB * 1024 * 1024) {
|
|
2550
|
+
setError(`"${f.name}" exceeds ${maxSizeMB}MB limit.`);
|
|
2551
|
+
continue;
|
|
2552
|
+
}
|
|
2553
|
+
valid.push({ file: f, id: Math.random().toString(36).slice(2), progress: 0, done: false });
|
|
2554
|
+
}
|
|
2555
|
+
if (!valid.length) return;
|
|
2556
|
+
const newFiles = multiple ? [...files, ...valid] : valid;
|
|
2557
|
+
setFiles(newFiles);
|
|
2558
|
+
valid.forEach(({ id }) => {
|
|
2559
|
+
let p = 0;
|
|
2560
|
+
const t = setInterval(() => {
|
|
2561
|
+
p += Math.floor(Math.random() * 15) + 5;
|
|
2562
|
+
if (p >= 100) {
|
|
2563
|
+
p = 100;
|
|
2564
|
+
clearInterval(t);
|
|
2565
|
+
setFiles((prev) => prev.map((f) => f.id === id ? { ...f, progress: 100, done: true } : f));
|
|
2566
|
+
onUpload(id);
|
|
2567
|
+
} else {
|
|
2568
|
+
setFiles((prev) => prev.map((f) => f.id === id ? { ...f, progress: p } : f));
|
|
2569
|
+
}
|
|
2570
|
+
}, 200);
|
|
2571
|
+
});
|
|
2572
|
+
};
|
|
2573
|
+
const handleDrop = (e) => {
|
|
2574
|
+
e.preventDefault();
|
|
2575
|
+
setDragging(false);
|
|
2576
|
+
processFiles(Array.from(e.dataTransfer.files));
|
|
2577
|
+
};
|
|
2578
|
+
const removeFile = (id) => setFiles((prev) => prev.filter((f) => f.id !== id));
|
|
2579
|
+
return /* @__PURE__ */ import_react15.default.createElement("div", { style: { width: "320px", fontFamily: "system-ui, sans-serif" } }, /* @__PURE__ */ import_react15.default.createElement(
|
|
2580
|
+
"div",
|
|
2581
|
+
{
|
|
2582
|
+
onClick: () => {
|
|
2583
|
+
var _a;
|
|
2584
|
+
return (_a = inputRef.current) == null ? void 0 : _a.click();
|
|
2585
|
+
},
|
|
2586
|
+
onDragOver: (e) => {
|
|
2587
|
+
e.preventDefault();
|
|
2588
|
+
setDragging(true);
|
|
2589
|
+
},
|
|
2590
|
+
onDragLeave: () => setDragging(false),
|
|
2591
|
+
onDrop: handleDrop,
|
|
2592
|
+
style: {
|
|
2593
|
+
background: dragging ? alpha(accent, 0.1) : "rgba(255,255,255,0.03)",
|
|
2594
|
+
border: `2px dashed ${dragging ? accent : "rgba(255,255,255,0.1)"}`,
|
|
2595
|
+
borderRadius: radius,
|
|
2596
|
+
padding: "32px 20px",
|
|
2597
|
+
textAlign: "center",
|
|
2598
|
+
cursor: "pointer",
|
|
2599
|
+
transition: "all 0.2s"
|
|
2600
|
+
}
|
|
2601
|
+
},
|
|
2602
|
+
/* @__PURE__ */ import_react15.default.createElement(
|
|
2603
|
+
"input",
|
|
2604
|
+
{
|
|
2605
|
+
ref: inputRef,
|
|
2606
|
+
type: "file",
|
|
2607
|
+
accept,
|
|
2608
|
+
multiple,
|
|
2609
|
+
style: { display: "none" },
|
|
2610
|
+
onChange: (e) => processFiles(Array.from(e.target.files))
|
|
2611
|
+
}
|
|
2612
|
+
),
|
|
2613
|
+
/* @__PURE__ */ import_react15.default.createElement("div", { style: {
|
|
2614
|
+
width: "48px",
|
|
2615
|
+
height: "48px",
|
|
2616
|
+
borderRadius: "14px",
|
|
2617
|
+
background: alpha(accent, 0.12),
|
|
2618
|
+
border: `1px solid ${alpha(accent, 0.25)}`,
|
|
2619
|
+
display: "flex",
|
|
2620
|
+
alignItems: "center",
|
|
2621
|
+
justifyContent: "center",
|
|
2622
|
+
margin: "0 auto 14px",
|
|
2623
|
+
transition: "all 0.2s",
|
|
2624
|
+
transform: dragging ? "scale(1.1)" : "scale(1)"
|
|
2625
|
+
} }, /* @__PURE__ */ import_react15.default.createElement(
|
|
2626
|
+
"svg",
|
|
2627
|
+
{
|
|
2628
|
+
width: "22",
|
|
2629
|
+
height: "22",
|
|
2630
|
+
viewBox: "0 0 24 24",
|
|
2631
|
+
fill: "none",
|
|
2632
|
+
stroke: accent,
|
|
2633
|
+
strokeWidth: "2",
|
|
2634
|
+
strokeLinecap: "round",
|
|
2635
|
+
strokeLinejoin: "round"
|
|
2636
|
+
},
|
|
2637
|
+
/* @__PURE__ */ import_react15.default.createElement("path", { d: "M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4M17 8l-5-5-5 5M12 3v12" })
|
|
2638
|
+
)),
|
|
2639
|
+
/* @__PURE__ */ import_react15.default.createElement("p", { style: { fontSize: "13px", fontWeight: "600", color: "#fff", margin: "0 0 4px" } }, label),
|
|
2640
|
+
/* @__PURE__ */ import_react15.default.createElement("p", { style: { fontSize: "11px", color: "rgba(255,255,255,0.3)", margin: 0 } }, subLabel, " ", maxSizeMB, "MB")
|
|
2641
|
+
), error && /* @__PURE__ */ import_react15.default.createElement("div", { style: {
|
|
2642
|
+
marginTop: "10px",
|
|
2643
|
+
padding: "9px 12px",
|
|
2644
|
+
borderRadius: "10px",
|
|
2645
|
+
background: "rgba(239,68,68,0.08)",
|
|
2646
|
+
border: "1px solid rgba(239,68,68,0.2)",
|
|
2647
|
+
display: "flex",
|
|
2648
|
+
alignItems: "center",
|
|
2649
|
+
gap: "8px"
|
|
2650
|
+
} }, /* @__PURE__ */ import_react15.default.createElement(
|
|
2651
|
+
"svg",
|
|
2652
|
+
{
|
|
2653
|
+
width: "13",
|
|
2654
|
+
height: "13",
|
|
2655
|
+
viewBox: "0 0 24 24",
|
|
2656
|
+
fill: "none",
|
|
2657
|
+
stroke: "#f87171",
|
|
2658
|
+
strokeWidth: "2.5",
|
|
2659
|
+
strokeLinecap: "round"
|
|
2660
|
+
},
|
|
2661
|
+
/* @__PURE__ */ import_react15.default.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
|
2662
|
+
/* @__PURE__ */ import_react15.default.createElement("line", { x1: "12", y1: "8", x2: "12", y2: "12" }),
|
|
2663
|
+
/* @__PURE__ */ import_react15.default.createElement("line", { x1: "12", y1: "16", x2: "12.01", y2: "16" })
|
|
2664
|
+
), /* @__PURE__ */ import_react15.default.createElement("span", { style: { fontSize: "11px", color: "#f87171" } }, error)), files.length > 0 && /* @__PURE__ */ import_react15.default.createElement("div", { style: { marginTop: "12px", display: "flex", flexDirection: "column", gap: "8px" } }, files.map(({ file, id, progress, done }) => {
|
|
2665
|
+
const icon = getIcon(file.type);
|
|
2666
|
+
const preview = file.type.startsWith("image/") ? URL.createObjectURL(file) : null;
|
|
2667
|
+
return /* @__PURE__ */ import_react15.default.createElement("div", { key: id, style: {
|
|
2668
|
+
background: "rgba(255,255,255,0.03)",
|
|
2669
|
+
border: `1px solid ${done ? alpha(accent, 0.2) : "rgba(255,255,255,0.07)"}`,
|
|
2670
|
+
borderRadius: "12px",
|
|
2671
|
+
padding: "10px 12px",
|
|
2672
|
+
transition: "border-color 0.3s"
|
|
2673
|
+
} }, /* @__PURE__ */ import_react15.default.createElement("div", { style: { display: "flex", alignItems: "center", gap: "10px" } }, /* @__PURE__ */ import_react15.default.createElement("div", { style: {
|
|
2674
|
+
width: "36px",
|
|
2675
|
+
height: "36px",
|
|
2676
|
+
borderRadius: "8px",
|
|
2677
|
+
flexShrink: 0,
|
|
2678
|
+
background: preview ? `url(${preview}) center/cover` : alpha(icon.color, 0.12),
|
|
2679
|
+
border: `1px solid ${alpha(icon.color, 0.2)}`,
|
|
2680
|
+
display: "flex",
|
|
2681
|
+
alignItems: "center",
|
|
2682
|
+
justifyContent: "center",
|
|
2683
|
+
overflow: "hidden"
|
|
2684
|
+
} }, !preview && /* @__PURE__ */ import_react15.default.createElement(
|
|
2685
|
+
"svg",
|
|
2686
|
+
{
|
|
2687
|
+
width: "16",
|
|
2688
|
+
height: "16",
|
|
2689
|
+
viewBox: "0 0 24 24",
|
|
2690
|
+
fill: "none",
|
|
2691
|
+
stroke: icon.color,
|
|
2692
|
+
strokeWidth: "2",
|
|
2693
|
+
strokeLinecap: "round",
|
|
2694
|
+
strokeLinejoin: "round"
|
|
2695
|
+
},
|
|
2696
|
+
/* @__PURE__ */ import_react15.default.createElement("path", { d: icon.path })
|
|
2697
|
+
)), /* @__PURE__ */ import_react15.default.createElement("div", { style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ import_react15.default.createElement("p", { style: {
|
|
2698
|
+
fontSize: "12px",
|
|
2699
|
+
fontWeight: "600",
|
|
2700
|
+
color: "#fff",
|
|
2701
|
+
margin: "0 0 2px",
|
|
2702
|
+
overflow: "hidden",
|
|
2703
|
+
textOverflow: "ellipsis",
|
|
2704
|
+
whiteSpace: "nowrap"
|
|
2705
|
+
} }, file.name), /* @__PURE__ */ import_react15.default.createElement("p", { style: { fontSize: "10px", color: "rgba(255,255,255,0.3)", margin: 0 } }, formatSize(file.size))), done ? /* @__PURE__ */ import_react15.default.createElement("div", { style: {
|
|
2706
|
+
width: "22px",
|
|
2707
|
+
height: "22px",
|
|
2708
|
+
borderRadius: "50%",
|
|
2709
|
+
background: "rgba(16,185,129,0.15)",
|
|
2710
|
+
border: "1px solid rgba(16,185,129,0.3)",
|
|
2711
|
+
display: "flex",
|
|
2712
|
+
alignItems: "center",
|
|
2713
|
+
justifyContent: "center",
|
|
2714
|
+
flexShrink: 0
|
|
2715
|
+
} }, /* @__PURE__ */ import_react15.default.createElement(
|
|
2716
|
+
"svg",
|
|
2717
|
+
{
|
|
2718
|
+
width: "10",
|
|
2719
|
+
height: "10",
|
|
2720
|
+
viewBox: "0 0 24 24",
|
|
2721
|
+
fill: "none",
|
|
2722
|
+
stroke: "#34d399",
|
|
2723
|
+
strokeWidth: "3",
|
|
2724
|
+
strokeLinecap: "round"
|
|
2725
|
+
},
|
|
2726
|
+
/* @__PURE__ */ import_react15.default.createElement("polyline", { points: "20 6 9 17 4 12" })
|
|
2727
|
+
)) : /* @__PURE__ */ import_react15.default.createElement(
|
|
2728
|
+
"button",
|
|
2729
|
+
{
|
|
2730
|
+
onClick: () => removeFile(id),
|
|
2731
|
+
style: {
|
|
2732
|
+
background: "transparent",
|
|
2733
|
+
border: "none",
|
|
2734
|
+
padding: "2px",
|
|
2735
|
+
cursor: "pointer",
|
|
2736
|
+
color: "rgba(255,255,255,0.25)",
|
|
2737
|
+
flexShrink: 0,
|
|
2738
|
+
transition: "color 0.2s"
|
|
2739
|
+
},
|
|
2740
|
+
onMouseEnter: (e) => e.currentTarget.style.color = "#f87171",
|
|
2741
|
+
onMouseLeave: (e) => e.currentTarget.style.color = "rgba(255,255,255,0.25)"
|
|
2742
|
+
},
|
|
2743
|
+
/* @__PURE__ */ import_react15.default.createElement(
|
|
2744
|
+
"svg",
|
|
2745
|
+
{
|
|
2746
|
+
width: "14",
|
|
2747
|
+
height: "14",
|
|
2748
|
+
viewBox: "0 0 24 24",
|
|
2749
|
+
fill: "none",
|
|
2750
|
+
stroke: "currentColor",
|
|
2751
|
+
strokeWidth: "2.5",
|
|
2752
|
+
strokeLinecap: "round"
|
|
2753
|
+
},
|
|
2754
|
+
/* @__PURE__ */ import_react15.default.createElement("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
2755
|
+
)
|
|
2756
|
+
)), !done && /* @__PURE__ */ import_react15.default.createElement("div", { style: {
|
|
2757
|
+
marginTop: "8px",
|
|
2758
|
+
height: "3px",
|
|
2759
|
+
background: "rgba(255,255,255,0.06)",
|
|
2760
|
+
borderRadius: "2px",
|
|
2761
|
+
overflow: "hidden"
|
|
2762
|
+
} }, /* @__PURE__ */ import_react15.default.createElement("div", { style: {
|
|
2763
|
+
height: "100%",
|
|
2764
|
+
borderRadius: "2px",
|
|
2765
|
+
width: `${progress}%`,
|
|
2766
|
+
background: `linear-gradient(90deg, ${accent}, ${alpha(accent, 0.6)})`,
|
|
2767
|
+
transition: "width 0.2s ease"
|
|
2768
|
+
} })));
|
|
2769
|
+
})));
|
|
2770
|
+
};
|
|
2771
|
+
|
|
2772
|
+
// src/components/ColorPicker/ColorPicker.jsx
|
|
2773
|
+
var import_react16 = __toESM(require("react"));
|
|
2774
|
+
var ColorPicker = ({
|
|
2775
|
+
defaultColor = "#6366f1",
|
|
2776
|
+
showOpacity = true,
|
|
2777
|
+
showEyedropper = true,
|
|
2778
|
+
showInput = true,
|
|
2779
|
+
accent = "#6366f1",
|
|
2780
|
+
bg = "#0f172a",
|
|
2781
|
+
radius = "16px",
|
|
2782
|
+
onChange = () => {
|
|
2783
|
+
},
|
|
2784
|
+
swatches = [
|
|
2785
|
+
"#6366f1",
|
|
2786
|
+
"#8b5cf6",
|
|
2787
|
+
"#a855f7",
|
|
2788
|
+
"#ec4899",
|
|
2789
|
+
"#f43f5e",
|
|
2790
|
+
"#ef4444",
|
|
2791
|
+
"#f97316",
|
|
2792
|
+
"#f59e0b",
|
|
2793
|
+
"#eab308",
|
|
2794
|
+
"#84cc16",
|
|
2795
|
+
"#22c55e",
|
|
2796
|
+
"#10b981",
|
|
2797
|
+
"#14b8a6",
|
|
2798
|
+
"#06b6d4",
|
|
2799
|
+
"#3b82f6",
|
|
2800
|
+
"#0ea5e9",
|
|
2801
|
+
"#64748b",
|
|
2802
|
+
"#94a3b8",
|
|
2803
|
+
"#ffffff",
|
|
2804
|
+
"#000000"
|
|
2805
|
+
]
|
|
2806
|
+
}) => {
|
|
2807
|
+
const [color, setColor] = (0, import_react16.useState)(defaultColor);
|
|
2808
|
+
const [hex, setHex] = (0, import_react16.useState)(defaultColor);
|
|
2809
|
+
const [opacity, setOpacity] = (0, import_react16.useState)(100);
|
|
2810
|
+
const [inputErr, setInputErr] = (0, import_react16.useState)(false);
|
|
2811
|
+
const [copied, setCopied] = (0, import_react16.useState)(false);
|
|
2812
|
+
const alpha = (hexVal, op) => {
|
|
2813
|
+
const r = parseInt(hexVal.slice(1, 3), 16);
|
|
2814
|
+
const g = parseInt(hexVal.slice(3, 5), 16);
|
|
2815
|
+
const b = parseInt(hexVal.slice(5, 7), 16);
|
|
2816
|
+
return `rgba(${r},${g},${b},${op})`;
|
|
2817
|
+
};
|
|
2818
|
+
const isValidHex = (v) => /^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$/.test(v);
|
|
2819
|
+
const applyColor = (val) => {
|
|
2820
|
+
if (!isValidHex(val)) {
|
|
2821
|
+
setInputErr(true);
|
|
2822
|
+
return;
|
|
2823
|
+
}
|
|
2824
|
+
setInputErr(false);
|
|
2825
|
+
setColor(val);
|
|
2826
|
+
setHex(val);
|
|
2827
|
+
onChange({ hex: val, opacity, rgba: alpha(val, opacity / 100) });
|
|
2828
|
+
};
|
|
2829
|
+
const pickSwatch = (val) => {
|
|
2830
|
+
setColor(val);
|
|
2831
|
+
setHex(val);
|
|
2832
|
+
setInputErr(false);
|
|
2833
|
+
onChange({ hex: val, opacity, rgba: alpha(val, opacity / 100) });
|
|
2834
|
+
};
|
|
2835
|
+
const handleOpacity = (v) => {
|
|
2836
|
+
setOpacity(v);
|
|
2837
|
+
onChange({ hex: color, opacity: v, rgba: alpha(color, v / 100) });
|
|
2838
|
+
};
|
|
2839
|
+
const copyHex = () => {
|
|
2840
|
+
var _a;
|
|
2841
|
+
(_a = navigator.clipboard) == null ? void 0 : _a.writeText(hex).catch(() => {
|
|
2842
|
+
});
|
|
2843
|
+
setCopied(true);
|
|
2844
|
+
setTimeout(() => setCopied(false), 1500);
|
|
2845
|
+
};
|
|
2846
|
+
const hueGradient = "linear-gradient(90deg,#f00,#ff0,#0f0,#0ff,#00f,#f0f,#f00)";
|
|
2847
|
+
return /* @__PURE__ */ import_react16.default.createElement("div", { style: {
|
|
2848
|
+
background: bg,
|
|
2849
|
+
borderRadius: radius,
|
|
2850
|
+
padding: "20px",
|
|
2851
|
+
width: "260px",
|
|
2852
|
+
fontFamily: "system-ui, sans-serif",
|
|
2853
|
+
border: "1px solid rgba(255,255,255,0.07)",
|
|
2854
|
+
boxShadow: "0 10px 40px rgba(0,0,0,0.4)"
|
|
2855
|
+
} }, /* @__PURE__ */ import_react16.default.createElement("div", { style: {
|
|
2856
|
+
height: "52px",
|
|
2857
|
+
borderRadius: "12px",
|
|
2858
|
+
marginBottom: "16px",
|
|
2859
|
+
background: alpha(color, opacity / 100),
|
|
2860
|
+
border: "1px solid rgba(255,255,255,0.08)",
|
|
2861
|
+
position: "relative",
|
|
2862
|
+
overflow: "hidden"
|
|
2863
|
+
} }, /* @__PURE__ */ import_react16.default.createElement("div", { style: {
|
|
2864
|
+
position: "absolute",
|
|
2865
|
+
inset: 0,
|
|
2866
|
+
zIndex: 0,
|
|
2867
|
+
backgroundImage: "linear-gradient(45deg,#555 25%,transparent 25%),linear-gradient(-45deg,#555 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#555 75%),linear-gradient(-45deg,transparent 75%,#555 75%)",
|
|
2868
|
+
backgroundSize: "10px 10px",
|
|
2869
|
+
backgroundPosition: "0 0,0 5px,5px -5px,-5px 0",
|
|
2870
|
+
opacity: 0.3
|
|
2871
|
+
} }), /* @__PURE__ */ import_react16.default.createElement("div", { style: { position: "absolute", inset: 0, background: alpha(color, opacity / 100) } })), /* @__PURE__ */ import_react16.default.createElement("div", { style: { position: "relative", marginBottom: "12px" } }, /* @__PURE__ */ import_react16.default.createElement(
|
|
2872
|
+
"input",
|
|
2873
|
+
{
|
|
2874
|
+
type: "range",
|
|
2875
|
+
min: "0",
|
|
2876
|
+
max: "360",
|
|
2877
|
+
defaultValue: "240",
|
|
2878
|
+
onChange: (e) => {
|
|
2879
|
+
const h = e.target.value;
|
|
2880
|
+
const c = `hsl(${h},80%,60%)`;
|
|
2881
|
+
const el = document.createElement("div");
|
|
2882
|
+
el.style.color = c;
|
|
2883
|
+
document.body.appendChild(el);
|
|
2884
|
+
const rgb = getComputedStyle(el).color;
|
|
2885
|
+
document.body.removeChild(el);
|
|
2886
|
+
const [r, g, b] = rgb.match(/\d+/g).map(Number);
|
|
2887
|
+
const hex6 = "#" + [r, g, b].map((n) => n.toString(16).padStart(2, "0")).join("");
|
|
2888
|
+
pickSwatch(hex6);
|
|
2889
|
+
},
|
|
2890
|
+
style: {
|
|
2891
|
+
width: "100%",
|
|
2892
|
+
height: "10px",
|
|
2893
|
+
borderRadius: "5px",
|
|
2894
|
+
appearance: "none",
|
|
2895
|
+
WebkitAppearance: "none",
|
|
2896
|
+
background: hueGradient,
|
|
2897
|
+
cursor: "pointer",
|
|
2898
|
+
outline: "none",
|
|
2899
|
+
border: "none"
|
|
2900
|
+
}
|
|
2901
|
+
}
|
|
2902
|
+
)), showOpacity && /* @__PURE__ */ import_react16.default.createElement("div", { style: { marginBottom: "16px" } }, /* @__PURE__ */ import_react16.default.createElement(
|
|
2903
|
+
"input",
|
|
2904
|
+
{
|
|
2905
|
+
type: "range",
|
|
2906
|
+
min: "0",
|
|
2907
|
+
max: "100",
|
|
2908
|
+
value: opacity,
|
|
2909
|
+
onChange: (e) => handleOpacity(Number(e.target.value)),
|
|
2910
|
+
style: {
|
|
2911
|
+
width: "100%",
|
|
2912
|
+
height: "10px",
|
|
2913
|
+
borderRadius: "5px",
|
|
2914
|
+
appearance: "none",
|
|
2915
|
+
WebkitAppearance: "none",
|
|
2916
|
+
background: `linear-gradient(90deg, transparent, ${color})`,
|
|
2917
|
+
cursor: "pointer",
|
|
2918
|
+
outline: "none",
|
|
2919
|
+
border: "none"
|
|
2920
|
+
}
|
|
2921
|
+
}
|
|
2922
|
+
), /* @__PURE__ */ import_react16.default.createElement("div", { style: { display: "flex", justifyContent: "space-between", marginTop: "4px" } }, /* @__PURE__ */ import_react16.default.createElement("span", { style: { fontSize: "10px", color: "rgba(255,255,255,0.25)" } }, "Opacity"), /* @__PURE__ */ import_react16.default.createElement("span", { style: { fontSize: "10px", color: "rgba(255,255,255,0.45)", fontWeight: "600" } }, opacity, "%"))), showInput && /* @__PURE__ */ import_react16.default.createElement("div", { style: { display: "flex", gap: "8px", marginBottom: "16px", alignItems: "center" } }, /* @__PURE__ */ import_react16.default.createElement("div", { style: {
|
|
2923
|
+
width: "32px",
|
|
2924
|
+
height: "32px",
|
|
2925
|
+
borderRadius: "8px",
|
|
2926
|
+
flexShrink: 0,
|
|
2927
|
+
background: color,
|
|
2928
|
+
border: "1px solid rgba(255,255,255,0.1)"
|
|
2929
|
+
} }), /* @__PURE__ */ import_react16.default.createElement(
|
|
2930
|
+
"input",
|
|
2931
|
+
{
|
|
2932
|
+
value: hex,
|
|
2933
|
+
onChange: (e) => {
|
|
2934
|
+
setHex(e.target.value);
|
|
2935
|
+
setInputErr(false);
|
|
2936
|
+
},
|
|
2937
|
+
onBlur: (e) => applyColor(e.target.value),
|
|
2938
|
+
onKeyDown: (e) => e.key === "Enter" && applyColor(hex),
|
|
2939
|
+
placeholder: "#000000",
|
|
2940
|
+
style: {
|
|
2941
|
+
flex: 1,
|
|
2942
|
+
background: "rgba(255,255,255,0.05)",
|
|
2943
|
+
border: `1px solid ${inputErr ? "rgba(239,68,68,0.6)" : "rgba(255,255,255,0.1)"}`,
|
|
2944
|
+
borderRadius: "8px",
|
|
2945
|
+
padding: "7px 10px",
|
|
2946
|
+
fontSize: "12px",
|
|
2947
|
+
fontFamily: "monospace",
|
|
2948
|
+
color: inputErr ? "#f87171" : "#fff",
|
|
2949
|
+
outline: "none"
|
|
2950
|
+
}
|
|
2951
|
+
}
|
|
2952
|
+
), /* @__PURE__ */ import_react16.default.createElement(
|
|
2953
|
+
"button",
|
|
2954
|
+
{
|
|
2955
|
+
onClick: copyHex,
|
|
2956
|
+
title: "Copy hex",
|
|
2957
|
+
style: {
|
|
2958
|
+
width: "32px",
|
|
2959
|
+
height: "32px",
|
|
2960
|
+
borderRadius: "8px",
|
|
2961
|
+
flexShrink: 0,
|
|
2962
|
+
background: copied ? "rgba(16,185,129,0.15)" : "rgba(255,255,255,0.05)",
|
|
2963
|
+
border: `1px solid ${copied ? "rgba(16,185,129,0.3)" : "rgba(255,255,255,0.1)"}`,
|
|
2964
|
+
cursor: "pointer",
|
|
2965
|
+
display: "flex",
|
|
2966
|
+
alignItems: "center",
|
|
2967
|
+
justifyContent: "center",
|
|
2968
|
+
color: copied ? "#34d399" : "rgba(255,255,255,0.4)",
|
|
2969
|
+
transition: "all 0.2s"
|
|
2970
|
+
}
|
|
2971
|
+
},
|
|
2972
|
+
copied ? /* @__PURE__ */ import_react16.default.createElement("svg", { width: "13", height: "13", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round" }, /* @__PURE__ */ import_react16.default.createElement("polyline", { points: "20 6 9 17 4 12" })) : /* @__PURE__ */ import_react16.default.createElement("svg", { width: "13", height: "13", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }, /* @__PURE__ */ import_react16.default.createElement("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2" }), /* @__PURE__ */ import_react16.default.createElement("path", { d: "M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1" }))
|
|
2973
|
+
)), /* @__PURE__ */ import_react16.default.createElement("div", { style: { height: "1px", background: "rgba(255,255,255,0.06)", marginBottom: "14px" } }), /* @__PURE__ */ import_react16.default.createElement("div", { style: { display: "flex", flexWrap: "wrap", gap: "7px" } }, swatches.map((s) => /* @__PURE__ */ import_react16.default.createElement(
|
|
2974
|
+
"button",
|
|
2975
|
+
{
|
|
2976
|
+
key: s,
|
|
2977
|
+
onClick: () => pickSwatch(s),
|
|
2978
|
+
title: s,
|
|
2979
|
+
style: {
|
|
2980
|
+
width: "22px",
|
|
2981
|
+
height: "22px",
|
|
2982
|
+
borderRadius: "6px",
|
|
2983
|
+
background: s,
|
|
2984
|
+
border: `2px solid ${color === s ? "#fff" : "transparent"}`,
|
|
2985
|
+
cursor: "pointer",
|
|
2986
|
+
padding: 0,
|
|
2987
|
+
transition: "transform 0.15s, border-color 0.15s",
|
|
2988
|
+
outline: "none",
|
|
2989
|
+
boxShadow: s === "#ffffff" ? "inset 0 0 0 1px rgba(0,0,0,0.15)" : "none"
|
|
2990
|
+
},
|
|
2991
|
+
onMouseEnter: (e) => e.currentTarget.style.transform = "scale(1.2)",
|
|
2992
|
+
onMouseLeave: (e) => e.currentTarget.style.transform = "scale(1)"
|
|
2993
|
+
}
|
|
2994
|
+
))), /* @__PURE__ */ import_react16.default.createElement("div", { style: {
|
|
2995
|
+
marginTop: "14px",
|
|
2996
|
+
padding: "8px 10px",
|
|
2997
|
+
borderRadius: "8px",
|
|
2998
|
+
background: "rgba(255,255,255,0.03)",
|
|
2999
|
+
border: "1px solid rgba(255,255,255,0.06)",
|
|
3000
|
+
display: "flex",
|
|
3001
|
+
justifyContent: "space-between",
|
|
3002
|
+
alignItems: "center"
|
|
3003
|
+
} }, /* @__PURE__ */ import_react16.default.createElement("span", { style: { fontSize: "10px", color: "rgba(255,255,255,0.25)", fontWeight: "600", textTransform: "uppercase", letterSpacing: "0.5px" } }, "RGBA"), /* @__PURE__ */ import_react16.default.createElement("span", { style: { fontSize: "10px", fontFamily: "monospace", color: "rgba(255,255,255,0.5)" } }, alpha(color, opacity / 100))));
|
|
3004
|
+
};
|
|
3005
|
+
|
|
3006
|
+
// src/components/RatingStars/RatingStars.jsx
|
|
3007
|
+
var import_react17 = __toESM(require("react"));
|
|
3008
|
+
var RatingStars = ({
|
|
3009
|
+
defaultRating = 0,
|
|
3010
|
+
total = 5,
|
|
3011
|
+
size = 32,
|
|
3012
|
+
allowHalf = true,
|
|
3013
|
+
showLabel = true,
|
|
3014
|
+
showCount = true,
|
|
3015
|
+
reviewCount = 0,
|
|
3016
|
+
readOnly = false,
|
|
3017
|
+
accent = "#f59e0b",
|
|
3018
|
+
bg = "#0f172a",
|
|
3019
|
+
radius = "14px",
|
|
3020
|
+
onChange = () => {
|
|
3021
|
+
}
|
|
3022
|
+
}) => {
|
|
3023
|
+
const [rating, setRating] = (0, import_react17.useState)(defaultRating);
|
|
3024
|
+
const [hovered, setHovered] = (0, import_react17.useState)(0);
|
|
3025
|
+
const labels = ["", "Terrible", "Bad", "Okay", "Good", "Excellent"];
|
|
3026
|
+
const halfLabels = { 0.5: "Awful", 1: "Terrible", 1.5: "Very Bad", 2: "Bad", 2.5: "Below Average", 3: "Okay", 3.5: "Above Average", 4: "Good", 4.5: "Great", 5: "Excellent" };
|
|
3027
|
+
const alpha = (hex, op) => {
|
|
3028
|
+
const r = parseInt(hex.slice(1, 3), 16);
|
|
3029
|
+
const g = parseInt(hex.slice(3, 5), 16);
|
|
3030
|
+
const b = parseInt(hex.slice(5, 7), 16);
|
|
3031
|
+
return `rgba(${r},${g},${b},${op})`;
|
|
3032
|
+
};
|
|
3033
|
+
const active = hovered || rating;
|
|
3034
|
+
const handleMouseMove = (e, i) => {
|
|
3035
|
+
if (readOnly) return;
|
|
3036
|
+
if (allowHalf) {
|
|
3037
|
+
const rect = e.currentTarget.getBoundingClientRect();
|
|
3038
|
+
const half = e.clientX - rect.left < rect.width / 2;
|
|
3039
|
+
setHovered(half ? i - 0.5 : i);
|
|
3040
|
+
} else {
|
|
3041
|
+
setHovered(i);
|
|
3042
|
+
}
|
|
3043
|
+
};
|
|
3044
|
+
const handleClick = (e, i) => {
|
|
3045
|
+
if (readOnly) return;
|
|
3046
|
+
let val;
|
|
3047
|
+
if (allowHalf) {
|
|
3048
|
+
const rect = e.currentTarget.getBoundingClientRect();
|
|
3049
|
+
val = e.clientX - rect.left < rect.width / 2 ? i - 0.5 : i;
|
|
3050
|
+
} else {
|
|
3051
|
+
val = i;
|
|
3052
|
+
}
|
|
3053
|
+
setRating(val);
|
|
3054
|
+
onChange(val);
|
|
3055
|
+
};
|
|
3056
|
+
const StarIcon = ({ index }) => {
|
|
3057
|
+
const fill = active >= index ? "full" : active >= index - 0.5 ? "half" : "empty";
|
|
3058
|
+
const id = `half-${index}`;
|
|
3059
|
+
return /* @__PURE__ */ import_react17.default.createElement(
|
|
3060
|
+
"svg",
|
|
3061
|
+
{
|
|
3062
|
+
width: size,
|
|
3063
|
+
height: size,
|
|
3064
|
+
viewBox: "0 0 24 24",
|
|
3065
|
+
style: { cursor: readOnly ? "default" : "pointer", transition: "transform 0.1s", flexShrink: 0 },
|
|
3066
|
+
onMouseMove: (e) => handleMouseMove(e, index),
|
|
3067
|
+
onMouseLeave: () => !readOnly && setHovered(0),
|
|
3068
|
+
onClick: (e) => handleClick(e, index),
|
|
3069
|
+
onMouseEnter: (e) => {
|
|
3070
|
+
if (!readOnly) e.currentTarget.style.transform = "scale(1.15)";
|
|
3071
|
+
}
|
|
3072
|
+
},
|
|
3073
|
+
/* @__PURE__ */ import_react17.default.createElement("defs", null, /* @__PURE__ */ import_react17.default.createElement("linearGradient", { id }, /* @__PURE__ */ import_react17.default.createElement("stop", { offset: "50%", stopColor: accent }), /* @__PURE__ */ import_react17.default.createElement("stop", { offset: "50%", stopColor: "transparent" }))),
|
|
3074
|
+
/* @__PURE__ */ import_react17.default.createElement(
|
|
3075
|
+
"polygon",
|
|
3076
|
+
{
|
|
3077
|
+
points: "12,2 15.09,8.26 22,9.27 17,14.14 18.18,21.02 12,17.77 5.82,21.02 7,14.14 2,9.27 8.91,8.26",
|
|
3078
|
+
fill: fill === "full" ? accent : fill === "half" ? `url(#${id})` : "transparent",
|
|
3079
|
+
stroke: fill === "empty" ? "rgba(255,255,255,0.15)" : accent,
|
|
3080
|
+
strokeWidth: "1.5"
|
|
3081
|
+
}
|
|
3082
|
+
)
|
|
3083
|
+
);
|
|
3084
|
+
};
|
|
3085
|
+
return /* @__PURE__ */ import_react17.default.createElement("div", { style: {
|
|
3086
|
+
background: bg,
|
|
3087
|
+
borderRadius: radius,
|
|
3088
|
+
padding: "20px 22px",
|
|
3089
|
+
display: "inline-flex",
|
|
3090
|
+
flexDirection: "column",
|
|
3091
|
+
alignItems: "center",
|
|
3092
|
+
gap: "12px",
|
|
3093
|
+
fontFamily: "system-ui, sans-serif",
|
|
3094
|
+
border: "1px solid rgba(255,255,255,0.07)",
|
|
3095
|
+
boxShadow: "0 10px 40px rgba(0,0,0,0.4)"
|
|
3096
|
+
} }, /* @__PURE__ */ import_react17.default.createElement("div", { style: { display: "flex", gap: "4px", alignItems: "center" } }, Array.from({ length: total }, (_, i) => /* @__PURE__ */ import_react17.default.createElement(StarIcon, { key: i + 1, index: i + 1 }))), showLabel && /* @__PURE__ */ import_react17.default.createElement("div", { style: {
|
|
3097
|
+
fontSize: "14px",
|
|
3098
|
+
fontWeight: "700",
|
|
3099
|
+
minHeight: "20px",
|
|
3100
|
+
color: active > 0 ? accent : "rgba(255,255,255,0.2)",
|
|
3101
|
+
transition: "color 0.2s"
|
|
3102
|
+
} }, active > 0 ? allowHalf ? halfLabels[active] : labels[Math.round(active)] : readOnly ? "Not rated" : "Rate this"), (rating > 0 || readOnly) && showCount && /* @__PURE__ */ import_react17.default.createElement("div", { style: { display: "flex", alignItems: "center", gap: "8px" } }, /* @__PURE__ */ import_react17.default.createElement("span", { style: {
|
|
3103
|
+
fontSize: "28px",
|
|
3104
|
+
fontWeight: "800",
|
|
3105
|
+
color: "#fff",
|
|
3106
|
+
lineHeight: 1
|
|
3107
|
+
} }, rating.toFixed(1)), /* @__PURE__ */ import_react17.default.createElement("div", null, /* @__PURE__ */ import_react17.default.createElement("div", { style: { display: "flex", gap: "1px", marginBottom: "3px" } }, Array.from({ length: total }, (_, i) => {
|
|
3108
|
+
const fill = rating >= i + 1 ? "full" : rating >= i + 0.5 ? "half" : "empty";
|
|
3109
|
+
const gid = `sm-${i}`;
|
|
3110
|
+
return /* @__PURE__ */ import_react17.default.createElement("svg", { key: i, width: "12", height: "12", viewBox: "0 0 24 24" }, /* @__PURE__ */ import_react17.default.createElement("defs", null, /* @__PURE__ */ import_react17.default.createElement("linearGradient", { id: gid }, /* @__PURE__ */ import_react17.default.createElement("stop", { offset: "50%", stopColor: accent }), /* @__PURE__ */ import_react17.default.createElement("stop", { offset: "50%", stopColor: "transparent" }))), /* @__PURE__ */ import_react17.default.createElement(
|
|
3111
|
+
"polygon",
|
|
3112
|
+
{
|
|
3113
|
+
points: "12,2 15.09,8.26 22,9.27 17,14.14 18.18,21.02 12,17.77 5.82,21.02 7,14.14 2,9.27 8.91,8.26",
|
|
3114
|
+
fill: fill === "full" ? accent : fill === "half" ? `url(#${gid})` : "transparent",
|
|
3115
|
+
stroke: fill === "empty" ? "rgba(255,255,255,0.15)" : accent,
|
|
3116
|
+
strokeWidth: "1.5"
|
|
3117
|
+
}
|
|
3118
|
+
));
|
|
3119
|
+
})), reviewCount > 0 && /* @__PURE__ */ import_react17.default.createElement("span", { style: { fontSize: "11px", color: "rgba(255,255,255,0.3)" } }, reviewCount.toLocaleString(), " reviews"))), !readOnly && rating === 0 && /* @__PURE__ */ import_react17.default.createElement("p", { style: { fontSize: "11px", color: "rgba(255,255,255,0.2)", margin: 0 } }, allowHalf ? "Hover to rate \u2022 Half stars supported" : "Click to rate"));
|
|
3120
|
+
};
|
|
3121
|
+
|
|
3122
|
+
// src/components/StatCard/StatCard.jsx
|
|
3123
|
+
var import_react18 = __toESM(require("react"));
|
|
3124
|
+
var StatCard = ({
|
|
3125
|
+
title = "Active Users",
|
|
3126
|
+
value = "128K",
|
|
3127
|
+
numericValue = 128e3,
|
|
3128
|
+
change = "+12.4%",
|
|
3129
|
+
isPositive = true,
|
|
3130
|
+
icon = "\u{1F465}",
|
|
3131
|
+
bg = "#ffffff",
|
|
3132
|
+
accent = "#3b82f6",
|
|
3133
|
+
radius = "16px",
|
|
3134
|
+
showBadge = true,
|
|
3135
|
+
showIcon = true,
|
|
3136
|
+
barPercent = 68
|
|
3137
|
+
}) => {
|
|
3138
|
+
const [count, setCount] = (0, import_react18.useState)(0);
|
|
3139
|
+
const [barWidth, setBarWidth] = (0, import_react18.useState)(0);
|
|
3140
|
+
const [visible, setVisible] = (0, import_react18.useState)(false);
|
|
3141
|
+
const [entered, setEntered] = (0, import_react18.useState)(false);
|
|
3142
|
+
const ref = (0, import_react18.useRef)(null);
|
|
3143
|
+
(0, import_react18.useEffect)(() => {
|
|
3144
|
+
const observer = new IntersectionObserver(
|
|
3145
|
+
([entry]) => {
|
|
3146
|
+
if (entry.isIntersecting) {
|
|
3147
|
+
setVisible(true);
|
|
3148
|
+
observer.disconnect();
|
|
3149
|
+
}
|
|
3150
|
+
},
|
|
3151
|
+
{ threshold: 0.3 }
|
|
3152
|
+
);
|
|
3153
|
+
if (ref.current) observer.observe(ref.current);
|
|
3154
|
+
return () => observer.disconnect();
|
|
3155
|
+
}, []);
|
|
3156
|
+
(0, import_react18.useEffect)(() => {
|
|
3157
|
+
if (!visible) return;
|
|
3158
|
+
setEntered(true);
|
|
3159
|
+
const duration = 1400;
|
|
3160
|
+
const start = performance.now();
|
|
3161
|
+
const step = (now) => {
|
|
3162
|
+
const p = Math.min((now - start) / duration, 1);
|
|
3163
|
+
const eased = 1 - Math.pow(1 - p, 3);
|
|
3164
|
+
setCount(Math.floor(eased * numericValue));
|
|
3165
|
+
if (p < 1) requestAnimationFrame(step);
|
|
3166
|
+
};
|
|
3167
|
+
requestAnimationFrame(step);
|
|
3168
|
+
}, [visible, numericValue]);
|
|
3169
|
+
(0, import_react18.useEffect)(() => {
|
|
3170
|
+
if (!visible) return;
|
|
3171
|
+
const t = setTimeout(() => setBarWidth(barPercent), 200);
|
|
3172
|
+
return () => clearTimeout(t);
|
|
3173
|
+
}, [visible, barPercent]);
|
|
3174
|
+
const formatCount = (n) => {
|
|
3175
|
+
if (numericValue >= 1e6) return (n / 1e6).toFixed(1) + "M";
|
|
3176
|
+
if (numericValue >= 1e3) return (n / 1e3).toFixed(1) + "K";
|
|
3177
|
+
return n.toLocaleString();
|
|
3178
|
+
};
|
|
3179
|
+
const alpha = (hex, op) => {
|
|
3180
|
+
const r = parseInt(hex.slice(1, 3), 16);
|
|
3181
|
+
const g = parseInt(hex.slice(3, 5), 16);
|
|
3182
|
+
const b = parseInt(hex.slice(5, 7), 16);
|
|
3183
|
+
return `rgba(${r},${g},${b},${op})`;
|
|
3184
|
+
};
|
|
3185
|
+
const uid = accent.replace("#", "sc");
|
|
3186
|
+
return /* @__PURE__ */ import_react18.default.createElement(import_react18.default.Fragment, null, /* @__PURE__ */ import_react18.default.createElement("style", null, `
|
|
3187
|
+
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;600;700;800&display=swap');
|
|
3188
|
+
|
|
3189
|
+
.sc-${uid} {
|
|
3190
|
+
font-family: 'Sora', sans-serif;
|
|
3191
|
+
background: ${bg};
|
|
3192
|
+
border-radius: ${radius};
|
|
3193
|
+
padding: 24px;
|
|
3194
|
+
display: inline-flex;
|
|
3195
|
+
flex-direction: column;
|
|
3196
|
+
gap: 14px;
|
|
3197
|
+
border: 1px solid rgba(0,0,0,0.07);
|
|
3198
|
+
box-shadow: 0 2px 16px rgba(0,0,0,0.06);
|
|
3199
|
+
min-width: 200px;
|
|
3200
|
+
position: relative;
|
|
3201
|
+
overflow: hidden;
|
|
3202
|
+
opacity: 0;
|
|
3203
|
+
transform: translateY(24px);
|
|
3204
|
+
transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.25s ease;
|
|
3205
|
+
}
|
|
3206
|
+
|
|
3207
|
+
.sc-${uid}.entered {
|
|
3208
|
+
opacity: 1;
|
|
3209
|
+
transform: translateY(0);
|
|
3210
|
+
}
|
|
3211
|
+
|
|
3212
|
+
.sc-${uid}:hover {
|
|
3213
|
+
transform: translateY(-5px) !important;
|
|
3214
|
+
box-shadow: 0 16px 40px ${alpha(accent, 0.18)};
|
|
3215
|
+
}
|
|
3216
|
+
|
|
3217
|
+
/* Shimmer sweep on mount */
|
|
3218
|
+
.sc-${uid}::before {
|
|
3219
|
+
content: '';
|
|
3220
|
+
position: absolute;
|
|
3221
|
+
inset: 0;
|
|
3222
|
+
background: linear-gradient(105deg, transparent 40%, ${alpha(accent, 0.08)} 50%, transparent 60%);
|
|
3223
|
+
transform: translateX(-100%);
|
|
3224
|
+
transition: transform 0s;
|
|
3225
|
+
}
|
|
3226
|
+
.sc-${uid}.entered::before {
|
|
3227
|
+
animation: sc-shimmer-${uid} 0.9s ease 0.3s forwards;
|
|
3228
|
+
}
|
|
3229
|
+
@keyframes sc-shimmer-${uid} {
|
|
3230
|
+
to { transform: translateX(200%); }
|
|
3231
|
+
}
|
|
3232
|
+
|
|
3233
|
+
/* Pulse ring on icon */
|
|
3234
|
+
.sc-icon-${uid} {
|
|
3235
|
+
font-size: 1.3rem;
|
|
3236
|
+
background: ${alpha(accent, 0.1)};
|
|
3237
|
+
width: 42px;
|
|
3238
|
+
height: 42px;
|
|
3239
|
+
border-radius: 10px;
|
|
3240
|
+
display: flex;
|
|
3241
|
+
align-items: center;
|
|
3242
|
+
justify-content: center;
|
|
3243
|
+
position: relative;
|
|
3244
|
+
}
|
|
3245
|
+
.sc-icon-${uid}::after {
|
|
3246
|
+
content: '';
|
|
3247
|
+
position: absolute;
|
|
3248
|
+
inset: -4px;
|
|
3249
|
+
border-radius: 14px;
|
|
3250
|
+
border: 2px solid ${alpha(accent, 0.25)};
|
|
3251
|
+
animation: sc-pulse-${uid} 2s ease-in-out infinite;
|
|
3252
|
+
}
|
|
3253
|
+
@keyframes sc-pulse-${uid} {
|
|
3254
|
+
0%, 100% { transform: scale(1); opacity: 0.6; }
|
|
3255
|
+
50% { transform: scale(1.12); opacity: 0; }
|
|
3256
|
+
}
|
|
3257
|
+
|
|
3258
|
+
.sc-top-${uid} {
|
|
3259
|
+
display: flex;
|
|
3260
|
+
justify-content: space-between;
|
|
3261
|
+
align-items: center;
|
|
3262
|
+
}
|
|
3263
|
+
|
|
3264
|
+
.sc-badge-up-${uid} {
|
|
3265
|
+
font-size: 0.72rem;
|
|
3266
|
+
font-weight: 700;
|
|
3267
|
+
color: #16a34a;
|
|
3268
|
+
background: #dcfce7;
|
|
3269
|
+
padding: 3px 10px;
|
|
3270
|
+
border-radius: 999px;
|
|
3271
|
+
letter-spacing: 0.02em;
|
|
3272
|
+
animation: sc-badgepop-${uid} 0.4s cubic-bezier(.34,1.56,.64,1) 0.6s both;
|
|
3273
|
+
}
|
|
3274
|
+
.sc-badge-down-${uid} {
|
|
3275
|
+
font-size: 0.72rem;
|
|
3276
|
+
font-weight: 700;
|
|
3277
|
+
color: #dc2626;
|
|
3278
|
+
background: #fee2e2;
|
|
3279
|
+
padding: 3px 10px;
|
|
3280
|
+
border-radius: 999px;
|
|
3281
|
+
letter-spacing: 0.02em;
|
|
3282
|
+
animation: sc-badgepop-${uid} 0.4s cubic-bezier(.34,1.56,.64,1) 0.6s both;
|
|
3283
|
+
}
|
|
3284
|
+
@keyframes sc-badgepop-${uid} {
|
|
3285
|
+
from { transform: scale(0.5); opacity: 0; }
|
|
3286
|
+
to { transform: scale(1); opacity: 1; }
|
|
3287
|
+
}
|
|
3288
|
+
|
|
3289
|
+
.sc-value-${uid} {
|
|
3290
|
+
font-size: 2rem;
|
|
3291
|
+
font-weight: 800;
|
|
3292
|
+
color: #0f172a;
|
|
3293
|
+
line-height: 1;
|
|
3294
|
+
font-variant-numeric: tabular-nums;
|
|
3295
|
+
}
|
|
3296
|
+
|
|
3297
|
+
.sc-label-${uid} {
|
|
3298
|
+
font-size: 0.78rem;
|
|
3299
|
+
font-weight: 600;
|
|
3300
|
+
color: #94a3b8;
|
|
3301
|
+
text-transform: uppercase;
|
|
3302
|
+
letter-spacing: 0.07em;
|
|
3303
|
+
}
|
|
3304
|
+
|
|
3305
|
+
.sc-track-${uid} {
|
|
3306
|
+
height: 5px;
|
|
3307
|
+
border-radius: 999px;
|
|
3308
|
+
background: rgba(0,0,0,0.06);
|
|
3309
|
+
overflow: hidden;
|
|
3310
|
+
}
|
|
3311
|
+
.sc-fill-${uid} {
|
|
3312
|
+
height: 100%;
|
|
3313
|
+
border-radius: 999px;
|
|
3314
|
+
background: linear-gradient(90deg, ${alpha(accent, 0.5)}, ${accent});
|
|
3315
|
+
width: 0%;
|
|
3316
|
+
transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.4s;
|
|
3317
|
+
box-shadow: 0 0 8px ${alpha(accent, 0.5)};
|
|
3318
|
+
}
|
|
3319
|
+
`), /* @__PURE__ */ import_react18.default.createElement(
|
|
3320
|
+
"div",
|
|
3321
|
+
{
|
|
3322
|
+
ref,
|
|
3323
|
+
className: `sc-${uid}${entered ? " entered" : ""}`
|
|
3324
|
+
},
|
|
3325
|
+
/* @__PURE__ */ import_react18.default.createElement("div", { className: `sc-top-${uid}` }, showIcon && /* @__PURE__ */ import_react18.default.createElement("div", { className: `sc-icon-${uid}` }, icon), showBadge && /* @__PURE__ */ import_react18.default.createElement("span", { className: isPositive ? `sc-badge-up-${uid}` : `sc-badge-down-${uid}` }, isPositive ? "\u25B2" : "\u25BC", " ", change)),
|
|
3326
|
+
/* @__PURE__ */ import_react18.default.createElement("div", { className: `sc-value-${uid}` }, visible ? formatCount(count) : "0"),
|
|
3327
|
+
/* @__PURE__ */ import_react18.default.createElement("div", { className: `sc-label-${uid}` }, title),
|
|
3328
|
+
/* @__PURE__ */ import_react18.default.createElement("div", { className: `sc-track-${uid}` }, /* @__PURE__ */ import_react18.default.createElement(
|
|
3329
|
+
"div",
|
|
3330
|
+
{
|
|
3331
|
+
className: `sc-fill-${uid}`,
|
|
3332
|
+
style: { width: `${barWidth}%` }
|
|
3333
|
+
}
|
|
3334
|
+
))
|
|
3335
|
+
));
|
|
3336
|
+
};
|
|
3337
|
+
|
|
3338
|
+
// src/components/ProgressBar/ProgressBar.jsx
|
|
3339
|
+
var import_react19 = __toESM(require("react"));
|
|
3340
|
+
var ProgressBar = ({
|
|
3341
|
+
label = "Progress",
|
|
3342
|
+
percentage = 75,
|
|
3343
|
+
accent = "#6366f1",
|
|
3344
|
+
bg = "#ffffff",
|
|
3345
|
+
height = 12,
|
|
3346
|
+
showLabel = true,
|
|
3347
|
+
showPercent = true,
|
|
3348
|
+
type = "default",
|
|
3349
|
+
// "default" | "striped" | "circular" | "gradient" | "steps"
|
|
3350
|
+
steps = 5
|
|
3351
|
+
// only for type="steps"
|
|
3352
|
+
}) => {
|
|
3353
|
+
const [filled, setFilled] = (0, import_react19.useState)(0);
|
|
3354
|
+
const [visible, setVisible] = (0, import_react19.useState)(false);
|
|
3355
|
+
const ref = (0, import_react19.useRef)(null);
|
|
3356
|
+
(0, import_react19.useEffect)(() => {
|
|
3357
|
+
const obs = new IntersectionObserver(
|
|
3358
|
+
([e]) => {
|
|
3359
|
+
if (e.isIntersecting) {
|
|
3360
|
+
setVisible(true);
|
|
3361
|
+
obs.disconnect();
|
|
3362
|
+
}
|
|
3363
|
+
},
|
|
3364
|
+
{ threshold: 0.3 }
|
|
3365
|
+
);
|
|
3366
|
+
if (ref.current) obs.observe(ref.current);
|
|
3367
|
+
return () => obs.disconnect();
|
|
3368
|
+
}, []);
|
|
3369
|
+
(0, import_react19.useEffect)(() => {
|
|
3370
|
+
if (!visible) return;
|
|
3371
|
+
const duration = 1200;
|
|
3372
|
+
const start = performance.now();
|
|
3373
|
+
const target = Math.min(100, Math.max(0, percentage));
|
|
3374
|
+
const tick = (now) => {
|
|
3375
|
+
const p = Math.min((now - start) / duration, 1);
|
|
3376
|
+
const eased = 1 - Math.pow(1 - p, 4);
|
|
3377
|
+
setFilled(Math.round(eased * target));
|
|
3378
|
+
if (p < 1) requestAnimationFrame(tick);
|
|
3379
|
+
};
|
|
3380
|
+
requestAnimationFrame(tick);
|
|
3381
|
+
}, [visible, percentage]);
|
|
3382
|
+
const alpha = (hex, op) => {
|
|
3383
|
+
const r = parseInt(hex.slice(1, 3), 16);
|
|
3384
|
+
const g = parseInt(hex.slice(3, 5), 16);
|
|
3385
|
+
const b = parseInt(hex.slice(5, 7), 16);
|
|
3386
|
+
return `rgba(${r},${g},${b},${op})`;
|
|
3387
|
+
};
|
|
3388
|
+
const uid = (accent + label + type).replace(/[^a-z0-9]/gi, "x");
|
|
3389
|
+
const badgeColor = filled >= 80 ? "#16a34a" : filled >= 50 ? "#d97706" : "#dc2626";
|
|
3390
|
+
const badgeBg = filled >= 80 ? "#dcfce7" : filled >= 50 ? "#fef3c7" : "#fee2e2";
|
|
3391
|
+
const wrapStyle = {
|
|
3392
|
+
fontFamily: "'Sora', sans-serif",
|
|
3393
|
+
background: bg,
|
|
3394
|
+
borderRadius: "14px",
|
|
3395
|
+
padding: "20px 22px",
|
|
3396
|
+
display: "flex",
|
|
3397
|
+
flexDirection: "column",
|
|
3398
|
+
gap: "10px",
|
|
3399
|
+
border: "1px solid rgba(0,0,0,0.07)",
|
|
3400
|
+
boxShadow: "0 2px 12px rgba(0,0,0,0.05)",
|
|
3401
|
+
opacity: visible ? 1 : 0,
|
|
3402
|
+
transform: visible ? "translateY(0)" : "translateY(16px)",
|
|
3403
|
+
transition: "opacity 0.45s ease, transform 0.45s ease"
|
|
3404
|
+
};
|
|
3405
|
+
const rowStyle = { display: "flex", justifyContent: "space-between", alignItems: "center" };
|
|
3406
|
+
const labelEl = showLabel && /* @__PURE__ */ import_react19.default.createElement("span", { style: { fontSize: "0.85rem", fontWeight: 600, color: "#334155" } }, label);
|
|
3407
|
+
const badgeEl = showPercent && /* @__PURE__ */ import_react19.default.createElement("span", { style: {
|
|
3408
|
+
fontSize: "0.72rem",
|
|
3409
|
+
fontWeight: 700,
|
|
3410
|
+
color: badgeColor,
|
|
3411
|
+
background: badgeBg,
|
|
3412
|
+
padding: "3px 10px",
|
|
3413
|
+
borderRadius: "999px",
|
|
3414
|
+
transition: "color 0.4s,background 0.4s",
|
|
3415
|
+
fontVariantNumeric: "tabular-nums"
|
|
3416
|
+
} }, filled, "%");
|
|
3417
|
+
if (type === "default") return /* @__PURE__ */ import_react19.default.createElement(import_react19.default.Fragment, null, /* @__PURE__ */ import_react19.default.createElement("style", null, `
|
|
3418
|
+
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;600;700&display=swap');
|
|
3419
|
+
@keyframes pb-pulse-${uid} {
|
|
3420
|
+
0%,100%{opacity:.9;transform:translateY(-50%) scale(1)}
|
|
3421
|
+
50%{opacity:.4;transform:translateY(-50%) scale(1.5)}
|
|
3422
|
+
}
|
|
3423
|
+
`), /* @__PURE__ */ import_react19.default.createElement("div", { ref, style: wrapStyle }, /* @__PURE__ */ import_react19.default.createElement("div", { style: rowStyle }, labelEl, badgeEl), /* @__PURE__ */ import_react19.default.createElement("div", { style: { width: "100%", height, borderRadius: "999px", background: "#f1f5f9", overflow: "hidden", position: "relative" } }, /* @__PURE__ */ import_react19.default.createElement("div", { style: {
|
|
3424
|
+
height: "100%",
|
|
3425
|
+
width: `${filled}%`,
|
|
3426
|
+
borderRadius: "999px",
|
|
3427
|
+
background: `linear-gradient(90deg,${alpha(accent, 0.7)},${accent})`,
|
|
3428
|
+
boxShadow: `0 0 10px ${alpha(accent, 0.35)}`,
|
|
3429
|
+
position: "relative",
|
|
3430
|
+
transition: "width 0.05s linear"
|
|
3431
|
+
} }, /* @__PURE__ */ import_react19.default.createElement("div", { style: {
|
|
3432
|
+
position: "absolute",
|
|
3433
|
+
right: 0,
|
|
3434
|
+
top: "50%",
|
|
3435
|
+
width: height + 4,
|
|
3436
|
+
height: height + 4,
|
|
3437
|
+
borderRadius: "50%",
|
|
3438
|
+
background: accent,
|
|
3439
|
+
boxShadow: `0 0 8px 2px ${alpha(accent, 0.5)}`,
|
|
3440
|
+
animation: `pb-pulse-${uid} 1.5s ease-in-out infinite`
|
|
3441
|
+
} }))), /* @__PURE__ */ import_react19.default.createElement("div", { style: rowStyle }, /* @__PURE__ */ import_react19.default.createElement("span", { style: { fontSize: "0.7rem", color: "#94a3b8" } }, filled < 100 ? `${filled} of 100 completed` : "Completed \u2713"), /* @__PURE__ */ import_react19.default.createElement("span", { style: { fontSize: "0.7rem", color: "#94a3b8" } }, filled >= 80 ? "Almost there!" : filled >= 50 ? "Halfway done" : "Just started"))));
|
|
3442
|
+
if (type === "striped") return /* @__PURE__ */ import_react19.default.createElement(import_react19.default.Fragment, null, /* @__PURE__ */ import_react19.default.createElement("style", null, `
|
|
3443
|
+
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;600;700&display=swap');
|
|
3444
|
+
@keyframes pb-stripe-${uid} { from{background-position:0 0} to{background-position:32px 0} }
|
|
3445
|
+
@keyframes pb-pulse-${uid} {
|
|
3446
|
+
0%,100%{opacity:.9;transform:translateY(-50%) scale(1)}
|
|
3447
|
+
50%{opacity:.4;transform:translateY(-50%) scale(1.5)}
|
|
3448
|
+
}
|
|
3449
|
+
`), /* @__PURE__ */ import_react19.default.createElement("div", { ref, style: wrapStyle }, /* @__PURE__ */ import_react19.default.createElement("div", { style: rowStyle }, labelEl, badgeEl), /* @__PURE__ */ import_react19.default.createElement("div", { style: { width: "100%", height, borderRadius: "999px", background: "#f1f5f9", overflow: "hidden", position: "relative" } }, /* @__PURE__ */ import_react19.default.createElement("div", { style: {
|
|
3450
|
+
height: "100%",
|
|
3451
|
+
width: `${filled}%`,
|
|
3452
|
+
borderRadius: "999px",
|
|
3453
|
+
background: `linear-gradient(90deg,${alpha(accent, 0.7)},${accent})`,
|
|
3454
|
+
boxShadow: `0 0 10px ${alpha(accent, 0.35)}`,
|
|
3455
|
+
position: "relative",
|
|
3456
|
+
transition: "width 0.05s linear"
|
|
3457
|
+
} }, /* @__PURE__ */ import_react19.default.createElement("div", { style: {
|
|
3458
|
+
position: "absolute",
|
|
3459
|
+
inset: 0,
|
|
3460
|
+
borderRadius: "999px",
|
|
3461
|
+
background: "repeating-linear-gradient(45deg,transparent,transparent 8px,rgba(255,255,255,0.18) 8px,rgba(255,255,255,0.18) 16px)",
|
|
3462
|
+
animation: `pb-stripe-${uid} 0.7s linear infinite`
|
|
3463
|
+
} }), /* @__PURE__ */ import_react19.default.createElement("div", { style: {
|
|
3464
|
+
position: "absolute",
|
|
3465
|
+
right: 0,
|
|
3466
|
+
top: "50%",
|
|
3467
|
+
width: height + 4,
|
|
3468
|
+
height: height + 4,
|
|
3469
|
+
borderRadius: "50%",
|
|
3470
|
+
background: accent,
|
|
3471
|
+
boxShadow: `0 0 8px 2px ${alpha(accent, 0.5)}`,
|
|
3472
|
+
animation: `pb-pulse-${uid} 1.5s ease-in-out infinite`
|
|
3473
|
+
} }))), /* @__PURE__ */ import_react19.default.createElement("div", { style: rowStyle }, /* @__PURE__ */ import_react19.default.createElement("span", { style: { fontSize: "0.7rem", color: "#94a3b8" } }, filled < 100 ? `${filled} of 100 completed` : "Completed \u2713"), /* @__PURE__ */ import_react19.default.createElement("span", { style: { fontSize: "0.7rem", color: "#94a3b8" } }, filled >= 80 ? "Almost there!" : filled >= 50 ? "Halfway done" : "Just started"))));
|
|
3474
|
+
if (type === "circular") {
|
|
3475
|
+
const r = 54;
|
|
3476
|
+
const cx = 70;
|
|
3477
|
+
const cy = 70;
|
|
3478
|
+
const circ = 2 * Math.PI * r;
|
|
3479
|
+
const offset = circ - filled / 100 * circ;
|
|
3480
|
+
return /* @__PURE__ */ import_react19.default.createElement(import_react19.default.Fragment, null, /* @__PURE__ */ import_react19.default.createElement("style", null, `
|
|
3481
|
+
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;600;700;800&display=swap');
|
|
3482
|
+
@keyframes pb-spin-${uid} { from{stroke-dashoffset:${circ}} to{stroke-dashoffset:${offset}} }
|
|
3483
|
+
`), /* @__PURE__ */ import_react19.default.createElement("div", { ref, style: { ...wrapStyle, alignItems: "center", gap: 16 } }, /* @__PURE__ */ import_react19.default.createElement("svg", { width: "140", height: "140", viewBox: "0 0 140 140" }, /* @__PURE__ */ import_react19.default.createElement("circle", { cx, cy, r, fill: "none", stroke: "#f1f5f9", strokeWidth: "10" }), /* @__PURE__ */ import_react19.default.createElement(
|
|
3484
|
+
"circle",
|
|
3485
|
+
{
|
|
3486
|
+
cx,
|
|
3487
|
+
cy,
|
|
3488
|
+
r,
|
|
3489
|
+
fill: "none",
|
|
3490
|
+
stroke: accent,
|
|
3491
|
+
strokeWidth: "10",
|
|
3492
|
+
strokeLinecap: "round",
|
|
3493
|
+
strokeDasharray: circ,
|
|
3494
|
+
strokeDashoffset: offset,
|
|
3495
|
+
transform: `rotate(-90 ${cx} ${cy})`,
|
|
3496
|
+
style: { transition: "stroke-dashoffset 0.05s linear", filter: `drop-shadow(0 0 6px ${alpha(accent, 0.5)})` }
|
|
3497
|
+
}
|
|
3498
|
+
), /* @__PURE__ */ import_react19.default.createElement(
|
|
3499
|
+
"text",
|
|
3500
|
+
{
|
|
3501
|
+
x: cx,
|
|
3502
|
+
y: cy - 8,
|
|
3503
|
+
textAnchor: "middle",
|
|
3504
|
+
dominantBaseline: "middle",
|
|
3505
|
+
style: { fontFamily: "'Sora',sans-serif", fontSize: "1.5rem", fontWeight: 800, fill: "#0f172a" }
|
|
3506
|
+
},
|
|
3507
|
+
filled,
|
|
3508
|
+
"%"
|
|
3509
|
+
), /* @__PURE__ */ import_react19.default.createElement(
|
|
3510
|
+
"text",
|
|
3511
|
+
{
|
|
3512
|
+
x: cx,
|
|
3513
|
+
y: cy + 14,
|
|
3514
|
+
textAnchor: "middle",
|
|
3515
|
+
dominantBaseline: "middle",
|
|
3516
|
+
style: { fontFamily: "'Sora',sans-serif", fontSize: "0.68rem", fontWeight: 600, fill: "#94a3b8", letterSpacing: "0.05em" }
|
|
3517
|
+
},
|
|
3518
|
+
filled >= 80 ? "GREAT" : filled >= 50 ? "GOOD" : "LOW"
|
|
3519
|
+
)), showLabel && /* @__PURE__ */ import_react19.default.createElement("span", { style: { fontSize: "0.85rem", fontWeight: 600, color: "#334155" } }, label)));
|
|
3520
|
+
}
|
|
3521
|
+
if (type === "gradient") {
|
|
3522
|
+
const colors = ["#ef4444", "#f97316", "#eab308", "#22c55e", "#6366f1"];
|
|
3523
|
+
const gradStr = colors.map((c, i) => `${c} ${i * 25}%`).join(",");
|
|
3524
|
+
return /* @__PURE__ */ import_react19.default.createElement(import_react19.default.Fragment, null, /* @__PURE__ */ import_react19.default.createElement("style", null, `
|
|
3525
|
+
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;600;700&display=swap');
|
|
3526
|
+
@keyframes pb-pulse-${uid} {
|
|
3527
|
+
0%,100%{opacity:.9;transform:translateY(-50%) scale(1)}
|
|
3528
|
+
50%{opacity:.4;transform:translateY(-50%) scale(1.5)}
|
|
3529
|
+
}
|
|
3530
|
+
`), /* @__PURE__ */ import_react19.default.createElement("div", { ref, style: wrapStyle }, /* @__PURE__ */ import_react19.default.createElement("div", { style: rowStyle }, labelEl, badgeEl), /* @__PURE__ */ import_react19.default.createElement("div", { style: { width: "100%", height, borderRadius: "999px", background: "#f1f5f9", overflow: "hidden", position: "relative" } }, /* @__PURE__ */ import_react19.default.createElement("div", { style: { position: "absolute", inset: 0, background: `linear-gradient(90deg,${gradStr})`, opacity: 0.15 } }), /* @__PURE__ */ import_react19.default.createElement("div", { style: {
|
|
3531
|
+
height: "100%",
|
|
3532
|
+
width: `${filled}%`,
|
|
3533
|
+
borderRadius: "999px",
|
|
3534
|
+
background: `linear-gradient(90deg,${gradStr})`,
|
|
3535
|
+
transition: "width 0.05s linear",
|
|
3536
|
+
position: "relative"
|
|
3537
|
+
} }, /* @__PURE__ */ import_react19.default.createElement("div", { style: {
|
|
3538
|
+
position: "absolute",
|
|
3539
|
+
right: 0,
|
|
3540
|
+
top: "50%",
|
|
3541
|
+
width: height + 4,
|
|
3542
|
+
height: height + 4,
|
|
3543
|
+
borderRadius: "50%",
|
|
3544
|
+
background: "#fff",
|
|
3545
|
+
border: `2px solid ${accent}`,
|
|
3546
|
+
animation: `pb-pulse-${uid} 1.5s ease-in-out infinite`
|
|
3547
|
+
} }))), /* @__PURE__ */ import_react19.default.createElement("div", { style: rowStyle }, /* @__PURE__ */ import_react19.default.createElement("span", { style: { fontSize: "0.7rem", color: "#94a3b8" } }, filled < 100 ? `${filled} of 100` : "Completed \u2713"), /* @__PURE__ */ import_react19.default.createElement("span", { style: { fontSize: "0.7rem", color: "#94a3b8" } }, filled >= 80 ? "Almost there!" : filled >= 50 ? "Halfway done" : "Just started"))));
|
|
3548
|
+
}
|
|
3549
|
+
if (type === "steps") {
|
|
3550
|
+
const completedSteps = Math.round(filled / 100 * steps);
|
|
3551
|
+
return /* @__PURE__ */ import_react19.default.createElement(import_react19.default.Fragment, null, /* @__PURE__ */ import_react19.default.createElement("style", null, `
|
|
3552
|
+
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;600;700&display=swap');
|
|
3553
|
+
@keyframes pb-popin-${uid} {
|
|
3554
|
+
from{transform:scale(0.5);opacity:0}
|
|
3555
|
+
to{transform:scale(1);opacity:1}
|
|
3556
|
+
}
|
|
3557
|
+
`), /* @__PURE__ */ import_react19.default.createElement("div", { ref, style: wrapStyle }, /* @__PURE__ */ import_react19.default.createElement("div", { style: rowStyle }, labelEl, badgeEl), /* @__PURE__ */ import_react19.default.createElement("div", { style: { display: "flex", alignItems: "center", gap: 0 } }, Array.from({ length: steps }, (_, i) => {
|
|
3558
|
+
const done = i < completedSteps;
|
|
3559
|
+
const active = i === completedSteps - 1;
|
|
3560
|
+
return /* @__PURE__ */ import_react19.default.createElement(import_react19.default.Fragment, { key: i }, /* @__PURE__ */ import_react19.default.createElement("div", { style: {
|
|
3561
|
+
width: 32,
|
|
3562
|
+
height: 32,
|
|
3563
|
+
borderRadius: "50%",
|
|
3564
|
+
background: done ? accent : "#f1f5f9",
|
|
3565
|
+
border: active ? `2px solid ${accent}` : done ? "none" : "2px solid #e2e8f0",
|
|
3566
|
+
display: "flex",
|
|
3567
|
+
alignItems: "center",
|
|
3568
|
+
justifyContent: "center",
|
|
3569
|
+
flexShrink: 0,
|
|
3570
|
+
boxShadow: active ? `0 0 12px ${alpha(accent, 0.4)}` : "none",
|
|
3571
|
+
transition: "background 0.3s,box-shadow 0.3s",
|
|
3572
|
+
animation: done ? `pb-popin-${uid} 0.3s ease ${i * 0.08}s both` : "none"
|
|
3573
|
+
} }, done ? /* @__PURE__ */ import_react19.default.createElement("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none" }, /* @__PURE__ */ import_react19.default.createElement("path", { d: "M2.5 7l3.5 3.5 5.5-6", stroke: "#fff", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })) : /* @__PURE__ */ import_react19.default.createElement("span", { style: { fontSize: "0.7rem", fontWeight: 700, color: "#cbd5e1" } }, i + 1)), i < steps - 1 && /* @__PURE__ */ import_react19.default.createElement("div", { style: {
|
|
3574
|
+
flex: 1,
|
|
3575
|
+
height: 3,
|
|
3576
|
+
borderRadius: "999px",
|
|
3577
|
+
background: i < completedSteps - 1 ? accent : "#f1f5f9",
|
|
3578
|
+
transition: "background 0.3s"
|
|
3579
|
+
} }));
|
|
3580
|
+
})), /* @__PURE__ */ import_react19.default.createElement("div", { style: rowStyle }, /* @__PURE__ */ import_react19.default.createElement("span", { style: { fontSize: "0.7rem", color: "#94a3b8" } }, "Step ", completedSteps, " of ", steps), /* @__PURE__ */ import_react19.default.createElement("span", { style: { fontSize: "0.7rem", color: "#94a3b8" } }, filled >= 80 ? "Almost there!" : filled >= 50 ? "Halfway done" : "Just started"))));
|
|
3581
|
+
}
|
|
3582
|
+
return null;
|
|
3583
|
+
};
|
|
3584
|
+
|
|
3585
|
+
// src/components/EcommerceCard/EcommerceCard.jsx
|
|
3586
|
+
var import_react20 = __toESM(require("react"));
|
|
3587
|
+
var EcommerceCard = ({
|
|
3588
|
+
image = "https://images.unsplash.com/photo-1505740420928-5e560c06d30e?w=600&q=80",
|
|
3589
|
+
title = "Wireless Headphones",
|
|
3590
|
+
description = "Premium noise-cancelling headphones with 40 hours battery life.",
|
|
3591
|
+
price = 199,
|
|
3592
|
+
currency = "$",
|
|
3593
|
+
accent = "#6366f1",
|
|
3594
|
+
bg = "#0f172a",
|
|
3595
|
+
onAddToCart = () => {
|
|
3596
|
+
},
|
|
3597
|
+
onViewDetails = () => {
|
|
3598
|
+
}
|
|
3599
|
+
}) => {
|
|
3600
|
+
const [hovered, setHovered] = (0, import_react20.useState)(false);
|
|
3601
|
+
const alpha = (hex, op) => {
|
|
3602
|
+
const r = parseInt(hex.slice(1, 3), 16), g = parseInt(hex.slice(3, 5), 16), b = parseInt(hex.slice(5, 7), 16);
|
|
3603
|
+
return "rgba(" + r + "," + g + "," + b + "," + op + ")";
|
|
3604
|
+
};
|
|
3605
|
+
return /* @__PURE__ */ import_react20.default.createElement(
|
|
3606
|
+
"div",
|
|
3607
|
+
{
|
|
3608
|
+
onMouseEnter: () => setHovered(true),
|
|
3609
|
+
onMouseLeave: () => setHovered(false),
|
|
3610
|
+
style: {
|
|
3611
|
+
background: bg,
|
|
3612
|
+
borderRadius: "20px",
|
|
3613
|
+
overflow: "hidden",
|
|
3614
|
+
width: "300px",
|
|
3615
|
+
border: "1px solid " + (hovered ? alpha(accent, 0.3) : "rgba(255,255,255,0.07)"),
|
|
3616
|
+
fontFamily: "system-ui,sans-serif",
|
|
3617
|
+
transition: "transform 0.25s, box-shadow 0.25s",
|
|
3618
|
+
transform: hovered ? "translateY(-4px)" : "translateY(0px)",
|
|
3619
|
+
boxShadow: hovered ? "0 16px 40px rgba(0,0,0,0.5)" : "0 4px 20px rgba(0,0,0,0.3)"
|
|
3620
|
+
}
|
|
3621
|
+
},
|
|
3622
|
+
/* @__PURE__ */ import_react20.default.createElement("div", { style: { position: "relative", width: "100%", height: "200px", overflow: "hidden" } }, /* @__PURE__ */ import_react20.default.createElement("img", { src: image, alt: title, style: { width: "100%", height: "100%", objectFit: "cover", transform: hovered ? "scale(1.05)" : "scale(1)", transition: "transform 0.4s ease" } }), /* @__PURE__ */ import_react20.default.createElement("div", { style: { position: "absolute", inset: 0, background: "linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 60%)" } })),
|
|
3623
|
+
/* @__PURE__ */ import_react20.default.createElement("div", { style: { padding: "18px" } }, /* @__PURE__ */ import_react20.default.createElement("h3", { style: { fontSize: "15px", fontWeight: "700", color: "#fff", margin: "0 0 8px", lineHeight: 1.4 } }, title), /* @__PURE__ */ import_react20.default.createElement("p", { style: { fontSize: "13px", color: "rgba(255,255,255,0.45)", lineHeight: 1.65, margin: "0 0 18px" } }, description), /* @__PURE__ */ import_react20.default.createElement("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", marginBottom: "18px" } }, /* @__PURE__ */ import_react20.default.createElement("span", { style: { fontSize: "24px", fontWeight: "800", color: "#fff" } }, currency, price), /* @__PURE__ */ import_react20.default.createElement(
|
|
3624
|
+
"button",
|
|
3625
|
+
{
|
|
3626
|
+
onClick: onAddToCart,
|
|
3627
|
+
style: { padding: "8px 16px", borderRadius: "12px", border: "none", background: accent, color: "#fff", fontSize: "13px", fontWeight: "700", cursor: "pointer", fontFamily: "inherit" }
|
|
3628
|
+
},
|
|
3629
|
+
"Add to Cart"
|
|
3630
|
+
)), /* @__PURE__ */ import_react20.default.createElement(
|
|
3631
|
+
"button",
|
|
3632
|
+
{
|
|
3633
|
+
onClick: onViewDetails,
|
|
3634
|
+
style: { width: "100%", padding: "11px", borderRadius: "12px", border: "1px solid " + alpha(accent, 0.3), background: "transparent", color: accent, fontSize: "13px", fontWeight: "700", cursor: "pointer", fontFamily: "inherit" }
|
|
3635
|
+
},
|
|
3636
|
+
"View Details"
|
|
3637
|
+
))
|
|
3638
|
+
);
|
|
3639
|
+
};
|
|
3640
|
+
|
|
3641
|
+
// src/components/AnimatedForm/AnimatedForm.jsx
|
|
3642
|
+
var import_react21 = __toESM(require("react"));
|
|
3643
|
+
var AnimatedForm = ({
|
|
3644
|
+
title = "Contact Us",
|
|
3645
|
+
description = "We'll get back to you shortly",
|
|
3646
|
+
submitText = "Send Message",
|
|
3647
|
+
accent = "#6366f1",
|
|
3648
|
+
bg = "#0f172a",
|
|
3649
|
+
onSubmit = () => {
|
|
3650
|
+
}
|
|
3651
|
+
}) => {
|
|
3652
|
+
const [name, setName] = (0, import_react21.useState)("");
|
|
3653
|
+
const [email, setEmail] = (0, import_react21.useState)("");
|
|
3654
|
+
const [message, setMessage] = (0, import_react21.useState)("");
|
|
3655
|
+
const [hovered, setHovered] = (0, import_react21.useState)(false);
|
|
3656
|
+
const alpha = (hex, op) => {
|
|
3657
|
+
const r = parseInt(hex.slice(1, 3), 16), g = parseInt(hex.slice(3, 5), 16), b = parseInt(hex.slice(5, 7), 16);
|
|
3658
|
+
return "rgba(" + r + "," + g + "," + b + "," + op + ")";
|
|
3659
|
+
};
|
|
3660
|
+
return /* @__PURE__ */ import_react21.default.createElement(
|
|
3661
|
+
"div",
|
|
3662
|
+
{
|
|
3663
|
+
onMouseEnter: () => setHovered(true),
|
|
3664
|
+
onMouseLeave: () => setHovered(false),
|
|
3665
|
+
style: {
|
|
3666
|
+
background: bg,
|
|
3667
|
+
borderRadius: "20px",
|
|
3668
|
+
padding: "28px",
|
|
3669
|
+
width: "400px",
|
|
3670
|
+
border: "1px solid " + (hovered ? alpha(accent, 0.3) : "rgba(255,255,255,0.07)"),
|
|
3671
|
+
fontFamily: "system-ui,sans-serif",
|
|
3672
|
+
transition: "transform 0.25s, box-shadow 0.25s",
|
|
3673
|
+
transform: hovered ? "translateY(-4px)" : "translateY(0px)",
|
|
3674
|
+
boxShadow: hovered ? "0 16px 40px rgba(0,0,0,0.5)" : "0 4px 20px rgba(0,0,0,0.3)"
|
|
3675
|
+
}
|
|
3676
|
+
},
|
|
3677
|
+
/* @__PURE__ */ import_react21.default.createElement("h2", { style: { fontSize: "20px", fontWeight: "700", color: "#fff", margin: "0 0 8px" } }, title),
|
|
3678
|
+
/* @__PURE__ */ import_react21.default.createElement("p", { style: { fontSize: "14px", color: "rgba(255,255,255,0.45)", margin: "0 0 24px" } }, description),
|
|
3679
|
+
/* @__PURE__ */ import_react21.default.createElement(
|
|
3680
|
+
"input",
|
|
3681
|
+
{
|
|
3682
|
+
type: "text",
|
|
3683
|
+
placeholder: "Your Name",
|
|
3684
|
+
value: name,
|
|
3685
|
+
onChange: (e) => setName(e.target.value),
|
|
3686
|
+
style: {
|
|
3687
|
+
width: "100%",
|
|
3688
|
+
padding: "12px",
|
|
3689
|
+
borderRadius: "10px",
|
|
3690
|
+
border: "1px solid rgba(255,255,255,0.1)",
|
|
3691
|
+
background: "#1e293b",
|
|
3692
|
+
color: "#fff",
|
|
3693
|
+
fontSize: "14px",
|
|
3694
|
+
marginBottom: "16px",
|
|
3695
|
+
outline: "none",
|
|
3696
|
+
transition: "border-color 0.2s",
|
|
3697
|
+
fontFamily: "inherit"
|
|
3698
|
+
}
|
|
3699
|
+
}
|
|
3700
|
+
),
|
|
3701
|
+
/* @__PURE__ */ import_react21.default.createElement(
|
|
3702
|
+
"input",
|
|
3703
|
+
{
|
|
3704
|
+
type: "email",
|
|
3705
|
+
placeholder: "Your Email",
|
|
3706
|
+
value: email,
|
|
3707
|
+
onChange: (e) => setEmail(e.target.value),
|
|
3708
|
+
style: {
|
|
3709
|
+
width: "100%",
|
|
3710
|
+
padding: "12px",
|
|
3711
|
+
borderRadius: "10px",
|
|
3712
|
+
border: "1px solid rgba(255,255,255,0.1)",
|
|
3713
|
+
background: "#1e293b",
|
|
3714
|
+
color: "#fff",
|
|
3715
|
+
fontSize: "14px",
|
|
3716
|
+
marginBottom: "16px",
|
|
3717
|
+
outline: "none",
|
|
3718
|
+
transition: "border-color 0.2s",
|
|
3719
|
+
fontFamily: "inherit"
|
|
3720
|
+
}
|
|
3721
|
+
}
|
|
3722
|
+
),
|
|
3723
|
+
/* @__PURE__ */ import_react21.default.createElement(
|
|
3724
|
+
"textarea",
|
|
3725
|
+
{
|
|
3726
|
+
placeholder: "Your Message",
|
|
3727
|
+
value: message,
|
|
3728
|
+
onChange: (e) => setMessage(e.target.value),
|
|
3729
|
+
style: {
|
|
3730
|
+
width: "100%",
|
|
3731
|
+
padding: "12px",
|
|
3732
|
+
borderRadius: "10px",
|
|
3733
|
+
border: "1px solid rgba(255,255,255,0.1)",
|
|
3734
|
+
background: "#1e293b",
|
|
3735
|
+
color: "#fff",
|
|
3736
|
+
fontSize: "14px",
|
|
3737
|
+
marginBottom: "24px",
|
|
3738
|
+
outline: "none",
|
|
3739
|
+
transition: "border-color 0.2s",
|
|
3740
|
+
fontFamily: "inherit",
|
|
3741
|
+
minHeight: "120px",
|
|
3742
|
+
resize: "vertical"
|
|
3743
|
+
}
|
|
3744
|
+
}
|
|
3745
|
+
),
|
|
3746
|
+
/* @__PURE__ */ import_react21.default.createElement(
|
|
3747
|
+
"button",
|
|
3748
|
+
{
|
|
3749
|
+
onClick: () => onSubmit({ name, email, message }),
|
|
3750
|
+
style: {
|
|
3751
|
+
width: "100%",
|
|
3752
|
+
padding: "13px",
|
|
3753
|
+
borderRadius: "12px",
|
|
3754
|
+
border: "none",
|
|
3755
|
+
background: "linear-gradient(135deg, " + accent + ", " + alpha(accent, 0.7) + ")",
|
|
3756
|
+
color: "#fff",
|
|
3757
|
+
fontSize: "14px",
|
|
3758
|
+
fontWeight: "700",
|
|
3759
|
+
cursor: "pointer",
|
|
3760
|
+
fontFamily: "inherit"
|
|
3761
|
+
}
|
|
3762
|
+
},
|
|
3763
|
+
submitText
|
|
3764
|
+
)
|
|
3765
|
+
);
|
|
3766
|
+
};
|
|
3767
|
+
|
|
3768
|
+
// src/components/ReviewCard/ReviewCard.jsx
|
|
3769
|
+
var import_react22 = __toESM(require("react"));
|
|
3770
|
+
var ReviewCard = ({
|
|
3771
|
+
avatar = "https://images.unsplash.com/photo-1633332755192-727a05c4013d?w=800&q=80",
|
|
3772
|
+
name = "John Doe",
|
|
3773
|
+
rating = 4,
|
|
3774
|
+
review = "This product is fantastic! It exceeded my expectations in every way.",
|
|
3775
|
+
date = "2 days ago",
|
|
3776
|
+
accent = "#6366f1",
|
|
3777
|
+
bg = "#0f172a",
|
|
3778
|
+
onProfileClick = () => {
|
|
3779
|
+
}
|
|
3780
|
+
}) => {
|
|
3781
|
+
const alpha = (hex, op) => {
|
|
3782
|
+
const r = parseInt(hex.slice(1, 3), 16), g = parseInt(hex.slice(3, 5), 16), b = parseInt(hex.slice(5, 7), 16);
|
|
3783
|
+
return "rgba(" + r + "," + g + "," + b + "," + op + ")";
|
|
3784
|
+
};
|
|
3785
|
+
return /* @__PURE__ */ import_react22.default.createElement("div", { style: { background: bg, borderRadius: "16px", padding: "16px", width: "320px", fontFamily: "system-ui,sans-serif", border: "1px solid rgba(255,255,255,0.08)", boxShadow: "0 4px 16px rgba(0,0,0,0.3)" } }, /* @__PURE__ */ import_react22.default.createElement("div", { style: { display: "flex", alignItems: "center", gap: "12px", marginBottom: "12px" } }, /* @__PURE__ */ import_react22.default.createElement("img", { src: avatar, alt: name, onClick: onProfileClick, style: { width: "40px", height: "40px", borderRadius: "50%", cursor: "pointer" } }), /* @__PURE__ */ import_react22.default.createElement("div", { style: { display: "flex", flexDirection: "column", gap: "2px" } }, /* @__PURE__ */ import_react22.default.createElement("div", { style: { fontSize: "14px", fontWeight: "700", color: "#fff" } }, name), /* @__PURE__ */ import_react22.default.createElement("div", { style: { display: "flex", alignItems: "center", gap: "4px" } }, Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ import_react22.default.createElement("svg", { key: i, width: "14", height: "14", viewBox: "0 0 24 24", fill: i < rating ? accent : "rgba(255,255,255,0.15)", stroke: "none" }, /* @__PURE__ */ import_react22.default.createElement("path", { d: "M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z" })))))), /* @__PURE__ */ import_react22.default.createElement("div", { style: { fontSize: "13px", color: "rgba(255,255,255,0.7)", lineHeight: 1.5, marginBottom: "12px" } }, review), /* @__PURE__ */ import_react22.default.createElement("div", { style: { fontSize: "11px", color: "rgba(255,255,255,0.4)" } }, date));
|
|
3786
|
+
};
|
|
3787
|
+
|
|
3788
|
+
// src/components/Card/Card.jsx
|
|
3789
|
+
var import_react23 = __toESM(require("react"));
|
|
3790
|
+
var Card = ({
|
|
3791
|
+
title = "Performance",
|
|
3792
|
+
description = "Real-time metrics with live dashboard updates every second.",
|
|
3793
|
+
icon = "\u26A1",
|
|
3794
|
+
tag = "Active",
|
|
3795
|
+
onClick
|
|
3796
|
+
}) => {
|
|
3797
|
+
const [hovered, setHovered] = (0, import_react23.useState)(false);
|
|
3798
|
+
return /* @__PURE__ */ import_react23.default.createElement(
|
|
3799
|
+
"div",
|
|
3800
|
+
{
|
|
3801
|
+
onMouseEnter: () => setHovered(true),
|
|
3802
|
+
onMouseLeave: () => setHovered(false),
|
|
3803
|
+
onClick,
|
|
3804
|
+
style: {
|
|
3805
|
+
background: "#ffffff",
|
|
3806
|
+
border: `0.5px solid ${hovered ? "#00000033" : "#0000001a"}`,
|
|
3807
|
+
borderRadius: "12px",
|
|
3808
|
+
padding: "1.25rem",
|
|
3809
|
+
transition: "border-color 0.2s, transform 0.2s",
|
|
3810
|
+
transform: hovered ? "translateY(-2px)" : "translateY(0)",
|
|
3811
|
+
cursor: onClick ? "pointer" : "default",
|
|
3812
|
+
position: "relative",
|
|
3813
|
+
overflow: "hidden",
|
|
3814
|
+
fontFamily: "sans-serif",
|
|
3815
|
+
width: "260px"
|
|
3816
|
+
}
|
|
3817
|
+
},
|
|
3818
|
+
/* @__PURE__ */ import_react23.default.createElement("div", { style: {
|
|
3819
|
+
position: "absolute",
|
|
3820
|
+
top: 0,
|
|
3821
|
+
left: 0,
|
|
3822
|
+
right: 0,
|
|
3823
|
+
height: "3px",
|
|
3824
|
+
background: "#1D9E75",
|
|
3825
|
+
borderRadius: "12px 12px 0 0"
|
|
3826
|
+
} }),
|
|
3827
|
+
/* @__PURE__ */ import_react23.default.createElement("div", { style: {
|
|
3828
|
+
width: 40,
|
|
3829
|
+
height: 40,
|
|
3830
|
+
borderRadius: 8,
|
|
3831
|
+
background: "#E1F5EE",
|
|
3832
|
+
display: "flex",
|
|
3833
|
+
alignItems: "center",
|
|
3834
|
+
justifyContent: "center",
|
|
3835
|
+
fontSize: 18,
|
|
3836
|
+
marginBottom: 14
|
|
3837
|
+
} }, icon),
|
|
3838
|
+
/* @__PURE__ */ import_react23.default.createElement("p", { style: { fontSize: 15, fontWeight: 700, color: "#111", margin: "0 0 6px" } }, title),
|
|
3839
|
+
/* @__PURE__ */ import_react23.default.createElement("p", { style: { fontSize: 13, color: "#666", lineHeight: 1.6, margin: "0 0 16px" } }, description),
|
|
3840
|
+
/* @__PURE__ */ import_react23.default.createElement("div", { style: {
|
|
3841
|
+
display: "flex",
|
|
3842
|
+
alignItems: "center",
|
|
3843
|
+
justifyContent: "space-between",
|
|
3844
|
+
borderTop: "0.5px solid #0000001a",
|
|
3845
|
+
paddingTop: 12
|
|
3846
|
+
} }, /* @__PURE__ */ import_react23.default.createElement("span", { style: {
|
|
3847
|
+
fontSize: 11,
|
|
3848
|
+
fontWeight: 500,
|
|
3849
|
+
padding: "3px 9px",
|
|
3850
|
+
borderRadius: 20,
|
|
3851
|
+
background: "#E1F5EE",
|
|
3852
|
+
color: "#0F6E56"
|
|
3853
|
+
} }, tag), /* @__PURE__ */ import_react23.default.createElement("span", { style: {
|
|
3854
|
+
fontSize: 14,
|
|
3855
|
+
color: "#999",
|
|
3856
|
+
display: "inline-block",
|
|
3857
|
+
transition: "transform 0.2s",
|
|
3858
|
+
transform: hovered ? "translateX(3px)" : "translateX(0)"
|
|
3859
|
+
} }, "\u2192"))
|
|
3860
|
+
);
|
|
3861
|
+
};
|
|
3862
|
+
|
|
3863
|
+
// src/components/Button/Button.jsx
|
|
3864
|
+
var import_react24 = __toESM(require("react"));
|
|
3865
|
+
var Button = ({
|
|
3866
|
+
text = "Click Me",
|
|
3867
|
+
variant = "gradient",
|
|
3868
|
+
// primary | outline | ghost | gradient
|
|
3869
|
+
size = "md",
|
|
3870
|
+
// sm | md | lg
|
|
3871
|
+
icon,
|
|
3872
|
+
loading = false,
|
|
3873
|
+
disabled = false,
|
|
3874
|
+
onClick
|
|
3875
|
+
}) => {
|
|
3876
|
+
const [hovered, setHovered] = (0, import_react24.useState)(false);
|
|
3877
|
+
const variants = {
|
|
3878
|
+
primary: {
|
|
3879
|
+
background: "#2563eb",
|
|
3880
|
+
color: "#fff",
|
|
3881
|
+
border: "none"
|
|
3882
|
+
},
|
|
3883
|
+
outline: {
|
|
3884
|
+
background: "transparent",
|
|
3885
|
+
color: "#2563eb",
|
|
3886
|
+
border: "1px solid #2563eb"
|
|
3887
|
+
},
|
|
3888
|
+
ghost: {
|
|
3889
|
+
background: "transparent",
|
|
3890
|
+
color: "#111",
|
|
3891
|
+
border: "none"
|
|
3892
|
+
},
|
|
3893
|
+
gradient: {
|
|
3894
|
+
background: "linear-gradient(135deg, #6366f1, #06b6d4)",
|
|
3895
|
+
color: "#fff",
|
|
3896
|
+
border: "none"
|
|
3897
|
+
}
|
|
3898
|
+
};
|
|
3899
|
+
const sizes = {
|
|
3900
|
+
sm: { padding: "6px 12px", fontSize: "12px" },
|
|
3901
|
+
md: { padding: "10px 18px", fontSize: "14px" },
|
|
3902
|
+
lg: { padding: "14px 24px", fontSize: "16px" }
|
|
3903
|
+
};
|
|
3904
|
+
return /* @__PURE__ */ import_react24.default.createElement(
|
|
3905
|
+
"button",
|
|
3906
|
+
{
|
|
3907
|
+
onClick,
|
|
3908
|
+
disabled: disabled || loading,
|
|
3909
|
+
onMouseEnter: () => setHovered(true),
|
|
3910
|
+
onMouseLeave: () => setHovered(false),
|
|
3911
|
+
style: {
|
|
3912
|
+
...variants[variant],
|
|
3913
|
+
...sizes[size],
|
|
3914
|
+
borderRadius: "10px",
|
|
3915
|
+
cursor: disabled ? "not-allowed" : "pointer",
|
|
3916
|
+
display: "flex",
|
|
3917
|
+
alignItems: "center",
|
|
3918
|
+
gap: "8px",
|
|
3919
|
+
fontWeight: 600,
|
|
3920
|
+
fontFamily: "sans-serif",
|
|
3921
|
+
// 🔥 Animation
|
|
3922
|
+
transform: hovered ? "translateY(-2px) scale(1.02)" : "scale(1)",
|
|
3923
|
+
boxShadow: hovered ? "0 10px 20px rgba(0,0,0,0.15)" : "0 2px 6px rgba(0,0,0,0.1)",
|
|
3924
|
+
transition: "all 0.2s ease",
|
|
3925
|
+
opacity: disabled ? 0.6 : 1,
|
|
3926
|
+
position: "relative",
|
|
3927
|
+
overflow: "hidden"
|
|
3928
|
+
}
|
|
3929
|
+
},
|
|
3930
|
+
/* @__PURE__ */ import_react24.default.createElement(
|
|
3931
|
+
"span",
|
|
3932
|
+
{
|
|
3933
|
+
style: {
|
|
3934
|
+
position: "absolute",
|
|
3935
|
+
inset: 0,
|
|
3936
|
+
background: "rgba(255,255,255,0.2)",
|
|
3937
|
+
opacity: hovered ? 1 : 0,
|
|
3938
|
+
transition: "opacity 0.3s"
|
|
3939
|
+
}
|
|
3940
|
+
}
|
|
3941
|
+
),
|
|
3942
|
+
loading ? /* @__PURE__ */ import_react24.default.createElement("span", null, "Loading...") : /* @__PURE__ */ import_react24.default.createElement(import_react24.default.Fragment, null, icon && /* @__PURE__ */ import_react24.default.createElement("span", null, icon), /* @__PURE__ */ import_react24.default.createElement("span", null, text))
|
|
3943
|
+
);
|
|
3944
|
+
};
|
|
3945
|
+
|
|
3946
|
+
// src/components/AnimatedButton/AnimatedButton.jsx
|
|
3947
|
+
var import_react25 = __toESM(require("react"));
|
|
3948
|
+
var AnimatedButton = ({
|
|
3949
|
+
text = "Click Me!",
|
|
3950
|
+
bg = "#7c3aed",
|
|
3951
|
+
color = "white",
|
|
3952
|
+
size = "md",
|
|
3953
|
+
width = "auto",
|
|
3954
|
+
radius = "12px",
|
|
3955
|
+
border = "none",
|
|
3956
|
+
weight = "600",
|
|
3957
|
+
shadow = "0 4px 14px rgba(124,58,237,0.4)",
|
|
3958
|
+
onClick
|
|
3959
|
+
}) => {
|
|
3960
|
+
const sizes = { sm: "8px 16px", md: "12px 24px", lg: "16px 32px" };
|
|
3961
|
+
const [hovered, setHovered] = (0, import_react25.useState)(false);
|
|
3962
|
+
return /* @__PURE__ */ import_react25.default.createElement(
|
|
3963
|
+
"button",
|
|
3964
|
+
{
|
|
3965
|
+
onClick,
|
|
3966
|
+
onMouseEnter: () => setHovered(true),
|
|
3967
|
+
onMouseLeave: () => setHovered(false),
|
|
3968
|
+
style: {
|
|
3969
|
+
background: hovered ? "#6b21a8" : bg,
|
|
3970
|
+
color,
|
|
3971
|
+
padding: sizes[size],
|
|
3972
|
+
width,
|
|
3973
|
+
border,
|
|
3974
|
+
borderRadius: radius,
|
|
3975
|
+
cursor: "pointer",
|
|
3976
|
+
fontWeight: weight,
|
|
3977
|
+
fontSize: "15px",
|
|
3978
|
+
boxShadow: shadow,
|
|
3979
|
+
transform: hovered ? "scale(1.05)" : "scale(1)",
|
|
3980
|
+
transition: "transform 0.2s ease, background 0.2s ease",
|
|
3981
|
+
display: "flex",
|
|
3982
|
+
alignItems: "center",
|
|
3983
|
+
justifyContent: "center",
|
|
3984
|
+
fontFamily: "system-ui, sans-serif",
|
|
3985
|
+
letterSpacing: "0.02em"
|
|
3986
|
+
}
|
|
3987
|
+
},
|
|
3988
|
+
text
|
|
3989
|
+
);
|
|
3990
|
+
};
|
|
3991
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
3992
|
+
0 && (module.exports = {
|
|
3993
|
+
AnimatedButton,
|
|
3994
|
+
AnimatedForm,
|
|
3995
|
+
AvatarCard,
|
|
3996
|
+
BackgoundImageSlider,
|
|
3997
|
+
Button,
|
|
3998
|
+
Card,
|
|
3999
|
+
Charts,
|
|
4000
|
+
ColorPicker,
|
|
4001
|
+
EcommerceCard,
|
|
4002
|
+
FileUpload,
|
|
4003
|
+
Footer,
|
|
4004
|
+
ImageCard,
|
|
4005
|
+
ImageSlider,
|
|
4006
|
+
InvoiceCard,
|
|
4007
|
+
Loader,
|
|
4008
|
+
Navbar,
|
|
4009
|
+
NotificationToast,
|
|
4010
|
+
OTPInput,
|
|
4011
|
+
PageLoader,
|
|
4012
|
+
PricingCard,
|
|
4013
|
+
ProgressBar,
|
|
4014
|
+
RatingStars,
|
|
4015
|
+
ReviewCard,
|
|
4016
|
+
Sidebar,
|
|
4017
|
+
StatCard
|
|
4018
|
+
});
|