pre-react-ui-lib 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js ADDED
@@ -0,0 +1,1901 @@
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
+ BackgoundImageSlider: () => BackgoundImageSlider,
35
+ Button: () => Button,
36
+ Card: () => Card,
37
+ Charts: () => Charts,
38
+ ColorPicker: () => ColorPicker,
39
+ FileUpload: () => FileUpload,
40
+ Footer: () => Footer,
41
+ ImageCard: () => ImageCard,
42
+ Navbar: () => Navbar
43
+ });
44
+ module.exports = __toCommonJS(index_exports);
45
+
46
+ // src/components/Navbar/Navbar.jsx
47
+ var import_react = __toESM(require("react"));
48
+ var Navbar = ({
49
+ logo = "VirtualAI",
50
+ links = ["Home", "Features", "Pricing", "Blog"],
51
+ ctaText = "Get Started",
52
+ accent = "#6366f1",
53
+ bg = "#0f172a",
54
+ onCtaClick = () => {
55
+ },
56
+ onLinkClick = () => {
57
+ }
58
+ }) => {
59
+ const [scrolled, setScrolled] = (0, import_react.useState)(false);
60
+ const [menuOpen, setMenuOpen] = (0, import_react.useState)(false);
61
+ const [active, setActive] = (0, import_react.useState)("Home");
62
+ const [isMobile, setIsMobile] = (0, import_react.useState)(false);
63
+ const alpha = (hex, op) => {
64
+ const r = parseInt(hex.slice(1, 3), 16);
65
+ const g = parseInt(hex.slice(3, 5), 16);
66
+ const b = parseInt(hex.slice(5, 7), 16);
67
+ return `rgba(${r},${g},${b},${op})`;
68
+ };
69
+ (0, import_react.useEffect)(() => {
70
+ const checkMobile = () => setIsMobile(window.innerWidth < 768);
71
+ checkMobile();
72
+ window.addEventListener("resize", checkMobile);
73
+ return () => window.removeEventListener("resize", checkMobile);
74
+ }, []);
75
+ (0, import_react.useEffect)(() => {
76
+ const handler = () => setScrolled(window.scrollY > 10);
77
+ window.addEventListener("scroll", handler);
78
+ return () => window.removeEventListener("scroll", handler);
79
+ }, []);
80
+ (0, import_react.useEffect)(() => {
81
+ if (!isMobile) setMenuOpen(false);
82
+ }, [isMobile]);
83
+ const handleLink = (link) => {
84
+ setActive(link);
85
+ setMenuOpen(false);
86
+ onLinkClick(link);
87
+ };
88
+ return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("style", null, `
89
+ @keyframes nbSlideDown {
90
+ from { opacity: 0; transform: translateY(-8px); }
91
+ to { opacity: 1; transform: translateY(0); }
92
+ }
93
+ .nb-link:hover { color: rgba(255,255,255,0.9) !important; background: rgba(255,255,255,0.05) !important; }
94
+ .nb-cta:hover { opacity: 0.85 !important; }
95
+ .nb-ham:hover { background: rgba(255,255,255,0.1) !important; }
96
+ .nb-mlink:hover { background: rgba(255,255,255,0.06) !important; }
97
+ `), /* @__PURE__ */ import_react.default.createElement("nav", { style: {
98
+ position: "sticky",
99
+ top: 0,
100
+ left: 0,
101
+ right: 0,
102
+ zIndex: 1e3,
103
+ background: scrolled ? alpha(bg, 0.96) : bg,
104
+ borderBottom: `1px solid ${scrolled ? "rgba(255,255,255,0.09)" : "rgba(255,255,255,0.04)"}`,
105
+ backdropFilter: scrolled ? "blur(12px)" : "none",
106
+ WebkitBackdropFilter: scrolled ? "blur(12px)" : "none",
107
+ transition: "all 0.3s ease",
108
+ fontFamily: "system-ui, -apple-system, sans-serif",
109
+ width: "100%",
110
+ boxSizing: "border-box"
111
+ } }, /* @__PURE__ */ import_react.default.createElement("div", { style: {
112
+ maxWidth: "1200px",
113
+ margin: "0 auto",
114
+ padding: "0 20px",
115
+ height: isMobile ? "56px" : "64px",
116
+ display: "flex",
117
+ alignItems: "center",
118
+ justifyContent: "space-between",
119
+ gap: "16px",
120
+ boxSizing: "border-box"
121
+ } }, /* @__PURE__ */ import_react.default.createElement("div", { style: { display: "flex", alignItems: "center", gap: "8px", cursor: "pointer", flexShrink: 0 } }, /* @__PURE__ */ import_react.default.createElement("div", { style: {
122
+ width: isMobile ? "26px" : "30px",
123
+ height: isMobile ? "26px" : "30px",
124
+ borderRadius: "8px",
125
+ background: `linear-gradient(135deg, ${accent}, ${alpha(accent, 0.6)})`,
126
+ display: "flex",
127
+ alignItems: "center",
128
+ justifyContent: "center",
129
+ fontSize: isMobile ? "12px" : "14px",
130
+ fontWeight: "800",
131
+ color: "#fff",
132
+ flexShrink: 0
133
+ } }, logo[0]), /* @__PURE__ */ import_react.default.createElement("span", { style: {
134
+ fontSize: isMobile ? "14px" : "16px",
135
+ fontWeight: "800",
136
+ color: "#fff",
137
+ letterSpacing: "-0.3px"
138
+ } }, logo)), !isMobile && /* @__PURE__ */ import_react.default.createElement("div", { style: { display: "flex", alignItems: "center", gap: "2px", flex: 1, justifyContent: "center" } }, links.map((link) => /* @__PURE__ */ import_react.default.createElement(
139
+ "button",
140
+ {
141
+ key: link,
142
+ className: "nb-link",
143
+ onClick: () => handleLink(link),
144
+ style: {
145
+ background: active === link ? alpha(accent, 0.12) : "transparent",
146
+ border: "none",
147
+ padding: "7px 16px",
148
+ borderRadius: "9px",
149
+ fontSize: "14px",
150
+ fontWeight: active === link ? "700" : "500",
151
+ color: active === link ? accent : "rgba(255,255,255,0.5)",
152
+ cursor: "pointer",
153
+ transition: "all 0.2s",
154
+ fontFamily: "inherit",
155
+ whiteSpace: "nowrap"
156
+ }
157
+ },
158
+ link
159
+ ))), /* @__PURE__ */ import_react.default.createElement("div", { style: { display: "flex", alignItems: "center", gap: "8px", flexShrink: 0 } }, /* @__PURE__ */ import_react.default.createElement(
160
+ "button",
161
+ {
162
+ className: "nb-cta",
163
+ onClick: onCtaClick,
164
+ style: {
165
+ padding: isMobile ? "7px 14px" : "9px 20px",
166
+ borderRadius: "10px",
167
+ border: "none",
168
+ background: `linear-gradient(135deg, ${accent}, ${alpha(accent, 0.75)})`,
169
+ color: "#fff",
170
+ fontSize: isMobile ? "12px" : "13px",
171
+ fontWeight: "700",
172
+ cursor: "pointer",
173
+ fontFamily: "inherit",
174
+ transition: "opacity 0.2s",
175
+ whiteSpace: "nowrap"
176
+ }
177
+ },
178
+ ctaText
179
+ ), isMobile && /* @__PURE__ */ import_react.default.createElement(
180
+ "button",
181
+ {
182
+ className: "nb-ham",
183
+ onClick: () => setMenuOpen((o) => !o),
184
+ style: {
185
+ background: "rgba(255,255,255,0.06)",
186
+ border: "1px solid rgba(255,255,255,0.1)",
187
+ borderRadius: "8px",
188
+ width: "34px",
189
+ height: "34px",
190
+ cursor: "pointer",
191
+ display: "flex",
192
+ flexDirection: "column",
193
+ alignItems: "center",
194
+ justifyContent: "center",
195
+ gap: "5px",
196
+ transition: "background 0.2s",
197
+ flexShrink: 0,
198
+ padding: 0
199
+ }
200
+ },
201
+ /* @__PURE__ */ import_react.default.createElement("div", { style: {
202
+ width: "16px",
203
+ height: "1.5px",
204
+ background: "rgba(255,255,255,0.7)",
205
+ borderRadius: "2px",
206
+ transform: menuOpen ? "rotate(45deg) translate(4px, 4px)" : "none",
207
+ transition: "transform 0.25s"
208
+ } }),
209
+ /* @__PURE__ */ import_react.default.createElement("div", { style: {
210
+ width: "16px",
211
+ height: "1.5px",
212
+ background: "rgba(255,255,255,0.7)",
213
+ borderRadius: "2px",
214
+ opacity: menuOpen ? 0 : 1,
215
+ transition: "opacity 0.2s"
216
+ } }),
217
+ /* @__PURE__ */ import_react.default.createElement("div", { style: {
218
+ width: "16px",
219
+ height: "1.5px",
220
+ background: "rgba(255,255,255,0.7)",
221
+ borderRadius: "2px",
222
+ transform: menuOpen ? "rotate(-45deg) translate(4px, -4px)" : "none",
223
+ transition: "transform 0.25s"
224
+ } })
225
+ ))), isMobile && menuOpen && /* @__PURE__ */ import_react.default.createElement("div", { style: {
226
+ animation: "nbSlideDown 0.2s ease",
227
+ borderTop: "1px solid rgba(255,255,255,0.06)",
228
+ padding: "10px 16px 16px",
229
+ display: "flex",
230
+ flexDirection: "column",
231
+ gap: "3px",
232
+ background: alpha(bg, 0.98)
233
+ } }, links.map((link) => /* @__PURE__ */ import_react.default.createElement(
234
+ "button",
235
+ {
236
+ key: link,
237
+ className: "nb-mlink",
238
+ onClick: () => handleLink(link),
239
+ style: {
240
+ background: active === link ? alpha(accent, 0.1) : "transparent",
241
+ border: "none",
242
+ padding: "11px 14px",
243
+ borderRadius: "10px",
244
+ fontSize: "14px",
245
+ fontWeight: active === link ? "700" : "500",
246
+ color: active === link ? accent : "rgba(255,255,255,0.55)",
247
+ cursor: "pointer",
248
+ textAlign: "left",
249
+ fontFamily: "inherit",
250
+ width: "100%",
251
+ transition: "all 0.15s",
252
+ display: "flex",
253
+ alignItems: "center",
254
+ justifyContent: "space-between"
255
+ }
256
+ },
257
+ link,
258
+ active === link && /* @__PURE__ */ import_react.default.createElement(
259
+ "svg",
260
+ {
261
+ width: "14",
262
+ height: "14",
263
+ viewBox: "0 0 24 24",
264
+ fill: "none",
265
+ stroke: accent,
266
+ strokeWidth: "2.5",
267
+ strokeLinecap: "round"
268
+ },
269
+ /* @__PURE__ */ import_react.default.createElement("polyline", { points: "9 18 15 12 9 6" })
270
+ )
271
+ )), /* @__PURE__ */ import_react.default.createElement("div", { style: { height: "1px", background: "rgba(255,255,255,0.07)", margin: "8px 0" } }), /* @__PURE__ */ import_react.default.createElement(
272
+ "button",
273
+ {
274
+ onClick: () => {
275
+ setMenuOpen(false);
276
+ onCtaClick();
277
+ },
278
+ style: {
279
+ background: `linear-gradient(135deg, ${accent}, ${alpha(accent, 0.75)})`,
280
+ border: "none",
281
+ padding: "12px",
282
+ borderRadius: "12px",
283
+ fontSize: "14px",
284
+ fontWeight: "700",
285
+ color: "#fff",
286
+ cursor: "pointer",
287
+ fontFamily: "inherit",
288
+ width: "100%"
289
+ }
290
+ },
291
+ ctaText
292
+ ))));
293
+ };
294
+
295
+ // src/components/Footer/Footer.jsx
296
+ var import_react2 = __toESM(require("react"));
297
+ var Footer = ({
298
+ logo = "VirtualAI",
299
+ links = ["Home", "Features", "Pricing", "Blog", "Contact"],
300
+ copyright = "VirtualAI",
301
+ accent = "#6366f1",
302
+ bg = "#0f172a"
303
+ }) => {
304
+ return /* @__PURE__ */ import_react2.default.createElement("footer", { style: {
305
+ background: bg,
306
+ borderTop: "1px solid rgba(255,255,255,0.06)",
307
+ fontFamily: "system-ui, sans-serif",
308
+ width: "100%",
309
+ boxSizing: "border-box",
310
+ padding: "28px 24px"
311
+ } }, /* @__PURE__ */ import_react2.default.createElement("div", { style: {
312
+ maxWidth: "900px",
313
+ margin: "0 auto",
314
+ display: "flex",
315
+ flexDirection: "column",
316
+ alignItems: "center",
317
+ gap: "20px"
318
+ } }, /* @__PURE__ */ import_react2.default.createElement("div", { style: { display: "flex", alignItems: "center", gap: "8px" } }, /* @__PURE__ */ import_react2.default.createElement("div", { style: {
319
+ width: "26px",
320
+ height: "26px",
321
+ borderRadius: "7px",
322
+ background: `linear-gradient(135deg, ${accent}, rgba(99,102,241,0.5))`,
323
+ display: "flex",
324
+ alignItems: "center",
325
+ justifyContent: "center",
326
+ fontSize: "12px",
327
+ fontWeight: "800",
328
+ color: "#fff"
329
+ } }, logo[0]), /* @__PURE__ */ import_react2.default.createElement("span", { style: { fontSize: "15px", fontWeight: "800", color: "#fff" } }, logo)), /* @__PURE__ */ import_react2.default.createElement("div", { style: { display: "flex", flexWrap: "wrap", justifyContent: "center", gap: "4px" } }, links.map((link) => /* @__PURE__ */ import_react2.default.createElement(
330
+ "a",
331
+ {
332
+ key: link,
333
+ href: "#",
334
+ style: {
335
+ fontSize: "13px",
336
+ color: "rgba(255,255,255,0.4)",
337
+ textDecoration: "none",
338
+ padding: "4px 12px",
339
+ borderRadius: "8px",
340
+ transition: "color 0.2s"
341
+ },
342
+ onMouseEnter: (e) => e.currentTarget.style.color = "rgba(255,255,255,0.85)",
343
+ onMouseLeave: (e) => e.currentTarget.style.color = "rgba(255,255,255,0.4)"
344
+ },
345
+ link
346
+ ))), /* @__PURE__ */ import_react2.default.createElement("div", { style: { width: "100%", height: "1px", background: "rgba(255,255,255,0.06)" } }), /* @__PURE__ */ import_react2.default.createElement("p", { style: { fontSize: "12px", color: "rgba(255,255,255,0.22)", margin: 0 } }, "\xA9 ", (/* @__PURE__ */ new Date()).getFullYear(), " ", copyright, ". All rights reserved.")));
347
+ };
348
+
349
+ // src/components/Charts/Charts.jsx
350
+ var import_react3 = __toESM(require("react"));
351
+ var Charts = ({
352
+ type = "bar",
353
+ data = [
354
+ { label: "Jan", value: 40 },
355
+ { label: "Feb", value: 70 },
356
+ { label: "Mar", value: 55 },
357
+ { label: "Apr", value: 90 },
358
+ { label: "May", value: 65 },
359
+ { label: "Jun", value: 80 },
360
+ { label: "Jul", value: 100 },
361
+ { label: "Aug", value: 30 }
362
+ ],
363
+ title = "Monthly Stats",
364
+ accent = "#6366f1",
365
+ bg = "#0f172a",
366
+ radius = "16px",
367
+ showGrid = true,
368
+ showValues = true
369
+ }) => {
370
+ const [hovered, setHovered] = (0, import_react3.useState)(null);
371
+ const alpha = (hex, op) => {
372
+ const r = parseInt(hex.slice(1, 3), 16);
373
+ const g = parseInt(hex.slice(3, 5), 16);
374
+ const b = parseInt(hex.slice(5, 7), 16);
375
+ return `rgba(${r},${g},${b},${op})`;
376
+ };
377
+ const max = Math.max(...data.map((d) => d.value));
378
+ const min = Math.min(...data.map((d) => d.value));
379
+ const W = 320;
380
+ const H = 160;
381
+ const padL = 28;
382
+ const padR = 12;
383
+ const padT = 16;
384
+ const padB = 28;
385
+ const chartW = W - padL - padR;
386
+ const chartH = H - padT - padB;
387
+ const getX = (i) => padL + i / (data.length - 1) * chartW;
388
+ const getY = (v) => padT + chartH - (v - min) / (max - min || 1) * chartH;
389
+ const points = data.map((d, i) => `${getX(i)},${getY(d.value)}`).join(" ");
390
+ const areaPoints = `${padL},${padT + chartH} ` + points + ` ${getX(data.length - 1)},${padT + chartH}`;
391
+ const gridLines = [0, 0.25, 0.5, 0.75, 1].map((t) => ({
392
+ y: padT + chartH * (1 - t),
393
+ val: Math.round(min + t * (max - min))
394
+ }));
395
+ const BarChart = () => {
396
+ const barW = Math.min(28, chartW / data.length * 0.55);
397
+ return /* @__PURE__ */ import_react3.default.createElement("svg", { width: "100%", viewBox: `0 0 ${W} ${H}` }, showGrid && gridLines.map((g, i) => /* @__PURE__ */ import_react3.default.createElement("g", { key: i }, /* @__PURE__ */ import_react3.default.createElement(
398
+ "line",
399
+ {
400
+ x1: padL,
401
+ y1: g.y,
402
+ x2: W - padR,
403
+ y2: g.y,
404
+ stroke: "rgba(255,255,255,0.05)",
405
+ strokeWidth: "1"
406
+ }
407
+ ), /* @__PURE__ */ import_react3.default.createElement(
408
+ "text",
409
+ {
410
+ x: padL - 4,
411
+ y: g.y + 4,
412
+ textAnchor: "end",
413
+ fill: "rgba(255,255,255,0.25)",
414
+ fontSize: "9"
415
+ },
416
+ g.val
417
+ ))), data.map((d, i) => {
418
+ const x = padL + i / data.length * chartW + (chartW / data.length - barW) / 2;
419
+ const barH = (d.value - min) / (max - min || 1) * chartH;
420
+ const y = padT + chartH - barH;
421
+ const isH = hovered === i;
422
+ return /* @__PURE__ */ import_react3.default.createElement("g", { key: i, onMouseEnter: () => setHovered(i), onMouseLeave: () => setHovered(null) }, /* @__PURE__ */ import_react3.default.createElement(
423
+ "rect",
424
+ {
425
+ x,
426
+ y: padT,
427
+ width: barW,
428
+ height: chartH,
429
+ fill: "transparent",
430
+ rx: "4"
431
+ }
432
+ ), /* @__PURE__ */ import_react3.default.createElement(
433
+ "rect",
434
+ {
435
+ x,
436
+ y,
437
+ width: barW,
438
+ height: barH,
439
+ fill: isH ? accent : alpha(accent, 0.55),
440
+ rx: "4",
441
+ style: { transition: "fill 0.15s" }
442
+ }
443
+ ), showValues && isH && /* @__PURE__ */ import_react3.default.createElement(
444
+ "text",
445
+ {
446
+ x: x + barW / 2,
447
+ y: y - 5,
448
+ textAnchor: "middle",
449
+ fill: "#fff",
450
+ fontSize: "9",
451
+ fontWeight: "700"
452
+ },
453
+ d.value
454
+ ), /* @__PURE__ */ import_react3.default.createElement(
455
+ "text",
456
+ {
457
+ x: x + barW / 2,
458
+ y: H - 6,
459
+ textAnchor: "middle",
460
+ fill: "rgba(255,255,255,0.3)",
461
+ fontSize: "9"
462
+ },
463
+ d.label
464
+ ));
465
+ }));
466
+ };
467
+ const LineChart = () => /* @__PURE__ */ import_react3.default.createElement("svg", { width: "100%", viewBox: `0 0 ${W} ${H}` }, /* @__PURE__ */ import_react3.default.createElement("defs", null, /* @__PURE__ */ import_react3.default.createElement("linearGradient", { id: "lg", x1: "0", y1: "0", x2: "0", y2: "1" }, /* @__PURE__ */ import_react3.default.createElement("stop", { offset: "0%", stopColor: accent, stopOpacity: "0.3" }), /* @__PURE__ */ import_react3.default.createElement("stop", { offset: "100%", stopColor: accent, stopOpacity: "0" }))), showGrid && gridLines.map((g, i) => /* @__PURE__ */ import_react3.default.createElement("g", { key: i }, /* @__PURE__ */ import_react3.default.createElement(
468
+ "line",
469
+ {
470
+ x1: padL,
471
+ y1: g.y,
472
+ x2: W - padR,
473
+ y2: g.y,
474
+ stroke: "rgba(255,255,255,0.05)",
475
+ strokeWidth: "1"
476
+ }
477
+ ), /* @__PURE__ */ import_react3.default.createElement(
478
+ "text",
479
+ {
480
+ x: padL - 4,
481
+ y: g.y + 4,
482
+ textAnchor: "end",
483
+ fill: "rgba(255,255,255,0.25)",
484
+ fontSize: "9"
485
+ },
486
+ g.val
487
+ ))), /* @__PURE__ */ import_react3.default.createElement("polygon", { points: areaPoints, fill: "url(#lg)" }), /* @__PURE__ */ import_react3.default.createElement(
488
+ "polyline",
489
+ {
490
+ points,
491
+ fill: "none",
492
+ stroke: accent,
493
+ strokeWidth: "2",
494
+ strokeLinejoin: "round",
495
+ strokeLinecap: "round"
496
+ }
497
+ ), data.map((d, i) => {
498
+ const isH = hovered === i;
499
+ return /* @__PURE__ */ import_react3.default.createElement("g", { key: i, onMouseEnter: () => setHovered(i), onMouseLeave: () => setHovered(null) }, /* @__PURE__ */ import_react3.default.createElement("circle", { cx: getX(i), cy: getY(d.value), r: "10", fill: "transparent" }), /* @__PURE__ */ import_react3.default.createElement(
500
+ "circle",
501
+ {
502
+ cx: getX(i),
503
+ cy: getY(d.value),
504
+ r: isH ? 5 : 3,
505
+ fill: isH ? "#fff" : accent,
506
+ stroke: accent,
507
+ strokeWidth: "2",
508
+ style: { transition: "all 0.15s" }
509
+ }
510
+ ), showValues && isH && /* @__PURE__ */ import_react3.default.createElement(
511
+ "text",
512
+ {
513
+ x: getX(i),
514
+ y: getY(d.value) - 10,
515
+ textAnchor: "middle",
516
+ fill: "#fff",
517
+ fontSize: "9",
518
+ fontWeight: "700"
519
+ },
520
+ d.value
521
+ ), /* @__PURE__ */ import_react3.default.createElement(
522
+ "text",
523
+ {
524
+ x: getX(i),
525
+ y: H - 6,
526
+ textAnchor: "middle",
527
+ fill: "rgba(255,255,255,0.3)",
528
+ fontSize: "9"
529
+ },
530
+ d.label
531
+ ));
532
+ }));
533
+ const PieChart = () => {
534
+ var _a, _b;
535
+ const cx = W / 2, cy = H / 2 - 4, r = Math.min(H, W) / 2 - 24;
536
+ const total = data.reduce((s, d) => s + d.value, 0);
537
+ const colors = [
538
+ accent,
539
+ alpha(accent, 0.75),
540
+ alpha(accent, 0.55),
541
+ alpha(accent, 0.4),
542
+ alpha(accent, 0.3),
543
+ alpha(accent, 0.2),
544
+ alpha(accent, 0.12)
545
+ ];
546
+ let startAngle = -Math.PI / 2;
547
+ const slices = data.map((d, i) => {
548
+ const angle = d.value / total * 2 * Math.PI;
549
+ const x1 = cx + r * Math.cos(startAngle);
550
+ const y1 = cy + r * Math.sin(startAngle);
551
+ const x2 = cx + r * Math.cos(startAngle + angle);
552
+ const y2 = cy + r * Math.sin(startAngle + angle);
553
+ const lx = cx + (r + 14) * Math.cos(startAngle + angle / 2);
554
+ const ly = cy + (r + 14) * Math.sin(startAngle + angle / 2);
555
+ const large = angle > Math.PI ? 1 : 0;
556
+ const path = `M ${cx} ${cy} L ${x1} ${y1} A ${r} ${r} 0 ${large} 1 ${x2} ${y2} Z`;
557
+ const slice = { path, color: colors[i % colors.length], d, angle, lx, ly, i };
558
+ startAngle += angle;
559
+ return slice;
560
+ });
561
+ return /* @__PURE__ */ import_react3.default.createElement("svg", { width: "100%", viewBox: `0 0 ${W} ${H}` }, slices.map((s) => /* @__PURE__ */ import_react3.default.createElement("g", { key: s.i, onMouseEnter: () => setHovered(s.i), onMouseLeave: () => setHovered(null) }, /* @__PURE__ */ import_react3.default.createElement(
562
+ "path",
563
+ {
564
+ d: s.path,
565
+ fill: s.color,
566
+ stroke: bg,
567
+ strokeWidth: "2",
568
+ transform: hovered === s.i ? `translate(${Math.cos(s.angle / 2 - Math.PI / 2) * 4}, ${Math.sin(s.angle / 2 - Math.PI / 2) * 4})` : "",
569
+ style: { transition: "transform 0.15s", cursor: "pointer" }
570
+ }
571
+ ))), hovered !== null && /* @__PURE__ */ import_react3.default.createElement(import_react3.default.Fragment, null, /* @__PURE__ */ import_react3.default.createElement(
572
+ "text",
573
+ {
574
+ x: cx,
575
+ y: cy - 8,
576
+ textAnchor: "middle",
577
+ fill: "#fff",
578
+ fontSize: "16",
579
+ fontWeight: "800"
580
+ },
581
+ (_a = data[hovered]) == null ? void 0 : _a.value
582
+ ), /* @__PURE__ */ import_react3.default.createElement(
583
+ "text",
584
+ {
585
+ x: cx,
586
+ y: cy + 10,
587
+ textAnchor: "middle",
588
+ fill: "rgba(255,255,255,0.4)",
589
+ fontSize: "9"
590
+ },
591
+ (_b = data[hovered]) == null ? void 0 : _b.label
592
+ )), hovered === null && /* @__PURE__ */ import_react3.default.createElement(
593
+ "text",
594
+ {
595
+ x: cx,
596
+ y: cy + 5,
597
+ textAnchor: "middle",
598
+ fill: "rgba(255,255,255,0.2)",
599
+ fontSize: "9"
600
+ },
601
+ "Hover slice"
602
+ ));
603
+ };
604
+ const AreaChart = () => /* @__PURE__ */ import_react3.default.createElement("svg", { width: "100%", viewBox: `0 0 ${W} ${H}` }, /* @__PURE__ */ import_react3.default.createElement("defs", null, /* @__PURE__ */ import_react3.default.createElement("linearGradient", { id: "ag", x1: "0", y1: "0", x2: "0", y2: "1" }, /* @__PURE__ */ import_react3.default.createElement("stop", { offset: "0%", stopColor: accent, stopOpacity: "0.5" }), /* @__PURE__ */ import_react3.default.createElement("stop", { offset: "100%", stopColor: accent, stopOpacity: "0.02" }))), showGrid && gridLines.map((g, i) => /* @__PURE__ */ import_react3.default.createElement("g", { key: i }, /* @__PURE__ */ import_react3.default.createElement(
605
+ "line",
606
+ {
607
+ x1: padL,
608
+ y1: g.y,
609
+ x2: W - padR,
610
+ y2: g.y,
611
+ stroke: "rgba(255,255,255,0.05)",
612
+ strokeWidth: "1"
613
+ }
614
+ ), /* @__PURE__ */ import_react3.default.createElement(
615
+ "text",
616
+ {
617
+ x: padL - 4,
618
+ y: g.y + 4,
619
+ textAnchor: "end",
620
+ fill: "rgba(255,255,255,0.25)",
621
+ fontSize: "9"
622
+ },
623
+ g.val
624
+ ))), /* @__PURE__ */ import_react3.default.createElement("polygon", { points: areaPoints, fill: "url(#ag)" }), /* @__PURE__ */ import_react3.default.createElement(
625
+ "polyline",
626
+ {
627
+ points,
628
+ fill: "none",
629
+ stroke: accent,
630
+ strokeWidth: "1.5",
631
+ strokeLinejoin: "round",
632
+ strokeLinecap: "round"
633
+ }
634
+ ), data.map((d, i) => /* @__PURE__ */ import_react3.default.createElement("g", { key: i, onMouseEnter: () => setHovered(i), onMouseLeave: () => setHovered(null) }, /* @__PURE__ */ import_react3.default.createElement("rect", { x: getX(i) - 12, y: padT, width: 24, height: chartH, fill: "transparent" }), hovered === i && /* @__PURE__ */ import_react3.default.createElement(import_react3.default.Fragment, null, /* @__PURE__ */ import_react3.default.createElement(
635
+ "line",
636
+ {
637
+ x1: getX(i),
638
+ y1: padT,
639
+ x2: getX(i),
640
+ y2: padT + chartH,
641
+ stroke: "rgba(255,255,255,0.1)",
642
+ strokeWidth: "1",
643
+ strokeDasharray: "3 3"
644
+ }
645
+ ), showValues && /* @__PURE__ */ import_react3.default.createElement(
646
+ "text",
647
+ {
648
+ x: getX(i),
649
+ y: getY(d.value) - 10,
650
+ textAnchor: "middle",
651
+ fill: "#fff",
652
+ fontSize: "9",
653
+ fontWeight: "700"
654
+ },
655
+ d.value
656
+ )), /* @__PURE__ */ import_react3.default.createElement(
657
+ "text",
658
+ {
659
+ x: getX(i),
660
+ y: H - 6,
661
+ textAnchor: "middle",
662
+ fill: "rgba(255,255,255,0.3)",
663
+ fontSize: "9"
664
+ },
665
+ d.label
666
+ ))));
667
+ const renderChart = () => {
668
+ if (type === "line") return /* @__PURE__ */ import_react3.default.createElement(LineChart, null);
669
+ if (type === "pie") return /* @__PURE__ */ import_react3.default.createElement(PieChart, null);
670
+ if (type === "area") return /* @__PURE__ */ import_react3.default.createElement(AreaChart, null);
671
+ return /* @__PURE__ */ import_react3.default.createElement(BarChart, null);
672
+ };
673
+ return /* @__PURE__ */ import_react3.default.createElement("div", { style: {
674
+ background: bg,
675
+ borderRadius: radius,
676
+ padding: "20px",
677
+ fontFamily: "system-ui, sans-serif",
678
+ border: "1px solid rgba(255,255,255,0.07)",
679
+ width: "100%",
680
+ maxWidth: "360px",
681
+ boxSizing: "border-box"
682
+ } }, /* @__PURE__ */ import_react3.default.createElement("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", marginBottom: "16px" } }, /* @__PURE__ */ import_react3.default.createElement("p", { style: { fontSize: "14px", fontWeight: "700", color: "#fff", margin: 0 } }, title), /* @__PURE__ */ import_react3.default.createElement("span", { style: {
683
+ fontSize: "10px",
684
+ fontWeight: "700",
685
+ padding: "3px 9px",
686
+ borderRadius: "6px",
687
+ background: alpha(accent, 0.12),
688
+ color: accent,
689
+ border: `1px solid ${alpha(accent, 0.25)}`,
690
+ textTransform: "capitalize"
691
+ } }, type)), renderChart());
692
+ };
693
+
694
+ // src/components/ImageCard/ImageCard.jsx
695
+ var import_react4 = __toESM(require("react"));
696
+ var ImageCard = ({
697
+ image = "https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=600&q=80",
698
+ tag = "Travel",
699
+ title = "Discover the Hidden Peaks of the Himalayas",
700
+ description = "A breathtaking journey through untouched landscapes, ancient monasteries, and snow-capped summits that few have ever seen.",
701
+ buttonText = "Read More",
702
+ accent = "#6366f1",
703
+ bg = "#0f172a",
704
+ radius = "20px",
705
+ onButtonClick = () => {
706
+ }
707
+ }) => {
708
+ const [hovered, setHovered] = (0, import_react4.useState)(false);
709
+ const alpha = (hex, op) => {
710
+ const r = parseInt(hex.slice(1, 3), 16);
711
+ const g = parseInt(hex.slice(3, 5), 16);
712
+ const b = parseInt(hex.slice(5, 7), 16);
713
+ return `rgba(${r},${g},${b},${op})`;
714
+ };
715
+ return /* @__PURE__ */ import_react4.default.createElement(
716
+ "div",
717
+ {
718
+ onMouseEnter: () => setHovered(true),
719
+ onMouseLeave: () => setHovered(false),
720
+ style: {
721
+ background: bg,
722
+ borderRadius: radius,
723
+ overflow: "hidden",
724
+ width: "300px",
725
+ border: `1px solid ${hovered ? alpha(accent, 0.3) : "rgba(255,255,255,0.07)"}`,
726
+ fontFamily: "system-ui, sans-serif",
727
+ transition: "border-color 0.25s, transform 0.25s",
728
+ transform: hovered ? "translateY(-4px)" : "none",
729
+ boxShadow: hovered ? `0 16px 40px rgba(0,0,0,0.5)` : "0 4px 20px rgba(0,0,0,0.3)"
730
+ }
731
+ },
732
+ /* @__PURE__ */ import_react4.default.createElement("div", { style: { position: "relative", width: "100%", height: "180px", overflow: "hidden" } }, /* @__PURE__ */ import_react4.default.createElement(
733
+ "img",
734
+ {
735
+ src: image,
736
+ alt: title,
737
+ style: {
738
+ width: "100%",
739
+ height: "100%",
740
+ objectFit: "cover",
741
+ transform: hovered ? "scale(1.05)" : "scale(1)",
742
+ transition: "transform 0.4s ease"
743
+ }
744
+ }
745
+ ), /* @__PURE__ */ import_react4.default.createElement("div", { style: {
746
+ position: "absolute",
747
+ inset: 0,
748
+ background: "linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 60%)"
749
+ } }), tag && /* @__PURE__ */ import_react4.default.createElement("div", { style: {
750
+ position: "absolute",
751
+ top: "12px",
752
+ left: "12px",
753
+ padding: "4px 10px",
754
+ borderRadius: "20px",
755
+ background: alpha(accent, 0.85),
756
+ fontSize: "10px",
757
+ fontWeight: "700",
758
+ color: "#fff",
759
+ letterSpacing: "0.5px",
760
+ textTransform: "uppercase"
761
+ } }, tag)),
762
+ /* @__PURE__ */ import_react4.default.createElement("div", { style: { padding: "18px" } }, /* @__PURE__ */ import_react4.default.createElement("h3", { style: {
763
+ fontSize: "15px",
764
+ fontWeight: "700",
765
+ color: "#fff",
766
+ margin: "0 0 8px",
767
+ lineHeight: 1.4
768
+ } }, title), /* @__PURE__ */ import_react4.default.createElement("p", { style: {
769
+ fontSize: "13px",
770
+ color: "rgba(255,255,255,0.45)",
771
+ lineHeight: 1.65,
772
+ margin: "0 0 18px"
773
+ } }, description), /* @__PURE__ */ import_react4.default.createElement(
774
+ "button",
775
+ {
776
+ onClick: onButtonClick,
777
+ style: {
778
+ width: "100%",
779
+ padding: "11px",
780
+ borderRadius: "12px",
781
+ border: "none",
782
+ background: `linear-gradient(135deg, ${accent}, ${alpha(accent, 0.7)})`,
783
+ color: "#fff",
784
+ fontSize: "13px",
785
+ fontWeight: "700",
786
+ cursor: "pointer",
787
+ fontFamily: "inherit",
788
+ transition: "opacity 0.2s"
789
+ },
790
+ onMouseEnter: (e) => e.currentTarget.style.opacity = "0.85",
791
+ onMouseLeave: (e) => e.currentTarget.style.opacity = "1"
792
+ },
793
+ buttonText
794
+ ))
795
+ );
796
+ };
797
+
798
+ // src/components/BackgoundImageSlider/BackgoundImageSlider.jsx
799
+ var import_react5 = __toESM(require("react"));
800
+ var BackgoundImageSlider = ({
801
+ images = [
802
+ {
803
+ src: "https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=1400&q=80",
804
+ tag: "Travel",
805
+ title: "Hidden Peaks of the Himalayas",
806
+ description: "A breathtaking journey through untouched landscapes and ancient monasteries."
807
+ },
808
+ {
809
+ src: "https://images.unsplash.com/photo-1477959858617-67f85cf4f1df?w=1400&q=80",
810
+ tag: "Urban",
811
+ title: "City Lights at Night",
812
+ description: "Explore the vibrant energy of the world's most iconic skylines after dark."
813
+ },
814
+ {
815
+ src: "https://images.unsplash.com/photo-1500534314209-a25ddb2bd429?w=1400&q=80",
816
+ tag: "Nature",
817
+ title: "Tropical Beach Paradise",
818
+ description: "Crystal clear waters and white sand beaches that feel like the edge of the world."
819
+ },
820
+ {
821
+ src: "https://images.unsplash.com/photo-1519681393784-d120267933ba?w=1400&q=80",
822
+ tag: "Adventure",
823
+ title: "Starry Mountain Night",
824
+ description: "Where silence meets the cosmos \u2014 a night sky like you've never seen before."
825
+ }
826
+ ],
827
+ width = "100%",
828
+ height = "520px",
829
+ accent = "#6366f1",
830
+ radius = "0px",
831
+ showDots = true,
832
+ autoPlay = false,
833
+ autoPlayInterval = 4e3
834
+ }) => {
835
+ const [current, setCurrent] = (0, import_react5.useState)(0);
836
+ const [animating, setAnimating] = (0, import_react5.useState)(false);
837
+ const alpha = (hex, op) => {
838
+ const r = parseInt(hex.slice(1, 3), 16);
839
+ const g = parseInt(hex.slice(3, 5), 16);
840
+ const b = parseInt(hex.slice(5, 7), 16);
841
+ return `rgba(${r},${g},${b},${op})`;
842
+ };
843
+ const go = (0, import_react5.useCallback)((index) => {
844
+ if (animating) return;
845
+ setAnimating(true);
846
+ setCurrent((index + images.length) % images.length);
847
+ setTimeout(() => setAnimating(false), 400);
848
+ }, [animating, images.length]);
849
+ const prev = () => go(current - 1);
850
+ const next = () => go(current + 1);
851
+ (0, import_react5.useEffect)(() => {
852
+ if (!autoPlay) return;
853
+ const t = setInterval(() => go(current + 1), autoPlayInterval);
854
+ return () => clearInterval(t);
855
+ }, [autoPlay, autoPlayInterval, current, go]);
856
+ const img = images[current];
857
+ return /* @__PURE__ */ import_react5.default.createElement(import_react5.default.Fragment, null, /* @__PURE__ */ import_react5.default.createElement("style", null, `
858
+ @keyframes hs-fade { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: scale(1); } }
859
+ @keyframes hs-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
860
+ .hs-prev:hover, .hs-next:hover { background: rgba(0,0,0,0.65) !important; border-color: rgba(255,255,255,0.35) !important; }
861
+ `), /* @__PURE__ */ import_react5.default.createElement("div", { style: {
862
+ position: "relative",
863
+ width,
864
+ height,
865
+ borderRadius: radius,
866
+ overflow: "hidden",
867
+ fontFamily: "system-ui, -apple-system, sans-serif",
868
+ userSelect: "none"
869
+ } }, /* @__PURE__ */ import_react5.default.createElement(
870
+ "img",
871
+ {
872
+ key: current,
873
+ src: img.src,
874
+ alt: img.title,
875
+ style: {
876
+ position: "absolute",
877
+ inset: 0,
878
+ width: "100%",
879
+ height: "100%",
880
+ objectFit: "cover",
881
+ animation: "hs-fade 0.4s ease"
882
+ }
883
+ }
884
+ ), /* @__PURE__ */ import_react5.default.createElement("div", { style: {
885
+ position: "absolute",
886
+ inset: 0,
887
+ 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%)"
888
+ } }), img.tag && /* @__PURE__ */ import_react5.default.createElement(
889
+ "div",
890
+ {
891
+ key: current + "-tag",
892
+ style: {
893
+ position: "absolute",
894
+ top: "24px",
895
+ left: "28px",
896
+ padding: "5px 14px",
897
+ borderRadius: "20px",
898
+ background: alpha(accent, 0.85),
899
+ fontSize: "11px",
900
+ fontWeight: "700",
901
+ color: "#fff",
902
+ letterSpacing: "0.6px",
903
+ textTransform: "uppercase",
904
+ animation: "hs-up 0.4s ease"
905
+ }
906
+ },
907
+ img.tag
908
+ ), /* @__PURE__ */ import_react5.default.createElement("div", { style: {
909
+ position: "absolute",
910
+ top: "24px",
911
+ right: "28px",
912
+ padding: "5px 12px",
913
+ borderRadius: "20px",
914
+ background: "rgba(0,0,0,0.45)",
915
+ fontSize: "11px",
916
+ fontWeight: "600",
917
+ color: "rgba(255,255,255,0.7)"
918
+ } }, current + 1, " / ", images.length), /* @__PURE__ */ import_react5.default.createElement(
919
+ "button",
920
+ {
921
+ className: "hs-prev",
922
+ onClick: prev,
923
+ style: {
924
+ position: "absolute",
925
+ left: "20px",
926
+ top: "50%",
927
+ transform: "translateY(-50%)",
928
+ width: "44px",
929
+ height: "44px",
930
+ borderRadius: "50%",
931
+ background: "rgba(0,0,0,0.4)",
932
+ border: "1px solid rgba(255,255,255,0.2)",
933
+ color: "#fff",
934
+ cursor: "pointer",
935
+ display: "flex",
936
+ alignItems: "center",
937
+ justifyContent: "center",
938
+ transition: "all 0.2s",
939
+ padding: 0,
940
+ zIndex: 10
941
+ }
942
+ },
943
+ /* @__PURE__ */ import_react5.default.createElement(
944
+ "svg",
945
+ {
946
+ width: "18",
947
+ height: "18",
948
+ viewBox: "0 0 24 24",
949
+ fill: "none",
950
+ stroke: "currentColor",
951
+ strokeWidth: "2.5",
952
+ strokeLinecap: "round",
953
+ strokeLinejoin: "round"
954
+ },
955
+ /* @__PURE__ */ import_react5.default.createElement("polyline", { points: "15 18 9 12 15 6" })
956
+ )
957
+ ), /* @__PURE__ */ import_react5.default.createElement(
958
+ "button",
959
+ {
960
+ className: "hs-next",
961
+ onClick: next,
962
+ style: {
963
+ position: "absolute",
964
+ right: "20px",
965
+ top: "50%",
966
+ transform: "translateY(-50%)",
967
+ width: "44px",
968
+ height: "44px",
969
+ borderRadius: "50%",
970
+ background: "rgba(0,0,0,0.4)",
971
+ border: "1px solid rgba(255,255,255,0.2)",
972
+ color: "#fff",
973
+ cursor: "pointer",
974
+ display: "flex",
975
+ alignItems: "center",
976
+ justifyContent: "center",
977
+ transition: "all 0.2s",
978
+ padding: 0,
979
+ zIndex: 10
980
+ }
981
+ },
982
+ /* @__PURE__ */ import_react5.default.createElement(
983
+ "svg",
984
+ {
985
+ width: "18",
986
+ height: "18",
987
+ viewBox: "0 0 24 24",
988
+ fill: "none",
989
+ stroke: "currentColor",
990
+ strokeWidth: "2.5",
991
+ strokeLinecap: "round",
992
+ strokeLinejoin: "round"
993
+ },
994
+ /* @__PURE__ */ import_react5.default.createElement("polyline", { points: "9 18 15 12 9 6" })
995
+ )
996
+ ), /* @__PURE__ */ import_react5.default.createElement("div", { style: {
997
+ position: "absolute",
998
+ bottom: showDots ? "56px" : "28px",
999
+ left: "28px",
1000
+ right: "28px",
1001
+ zIndex: 5
1002
+ } }, /* @__PURE__ */ import_react5.default.createElement(
1003
+ "h2",
1004
+ {
1005
+ key: current + "-title",
1006
+ style: {
1007
+ fontSize: "clamp(20px, 4vw, 36px)",
1008
+ fontWeight: "800",
1009
+ color: "#fff",
1010
+ margin: "0 0 8px",
1011
+ lineHeight: 1.25,
1012
+ textShadow: "0 2px 12px rgba(0,0,0,0.4)",
1013
+ animation: "hs-up 0.45s ease",
1014
+ maxWidth: "600px"
1015
+ }
1016
+ },
1017
+ img.title
1018
+ ), /* @__PURE__ */ import_react5.default.createElement(
1019
+ "p",
1020
+ {
1021
+ key: current + "-desc",
1022
+ style: {
1023
+ fontSize: "clamp(13px, 2vw, 15px)",
1024
+ color: "rgba(255,255,255,0.7)",
1025
+ margin: 0,
1026
+ lineHeight: 1.6,
1027
+ textShadow: "0 1px 6px rgba(0,0,0,0.5)",
1028
+ animation: "hs-up 0.5s ease",
1029
+ maxWidth: "500px"
1030
+ }
1031
+ },
1032
+ img.description
1033
+ )), showDots && /* @__PURE__ */ import_react5.default.createElement("div", { style: {
1034
+ position: "absolute",
1035
+ bottom: "20px",
1036
+ left: 0,
1037
+ right: 0,
1038
+ display: "flex",
1039
+ justifyContent: "center",
1040
+ gap: "6px",
1041
+ zIndex: 5
1042
+ } }, images.map((_, i) => /* @__PURE__ */ import_react5.default.createElement(
1043
+ "button",
1044
+ {
1045
+ key: i,
1046
+ onClick: () => go(i),
1047
+ style: {
1048
+ width: i === current ? "24px" : "7px",
1049
+ height: "7px",
1050
+ borderRadius: "4px",
1051
+ border: "none",
1052
+ padding: 0,
1053
+ cursor: "pointer",
1054
+ background: i === current ? accent : "rgba(255,255,255,0.4)",
1055
+ transition: "all 0.3s ease"
1056
+ }
1057
+ }
1058
+ )))));
1059
+ };
1060
+
1061
+ // src/components/FileUpload/FileUpload.jsx
1062
+ var import_react6 = __toESM(require("react"));
1063
+ var FileUpload = ({
1064
+ accept = "*",
1065
+ multiple = true,
1066
+ maxSizeMB = 5,
1067
+ accent = "#6366f1",
1068
+ bg = "#0f172a",
1069
+ radius = "16px",
1070
+ label = "Drop files here or click to upload",
1071
+ subLabel = "Supports any file up to",
1072
+ onUpload = () => {
1073
+ }
1074
+ }) => {
1075
+ const [files, setFiles] = (0, import_react6.useState)([]);
1076
+ const [dragging, setDragging] = (0, import_react6.useState)(false);
1077
+ const [error, setError] = (0, import_react6.useState)("");
1078
+ const inputRef = (0, import_react6.useRef)(null);
1079
+ const alpha = (hex, op) => {
1080
+ const r = parseInt(hex.slice(1, 3), 16);
1081
+ const g = parseInt(hex.slice(3, 5), 16);
1082
+ const b = parseInt(hex.slice(5, 7), 16);
1083
+ return `rgba(${r},${g},${b},${op})`;
1084
+ };
1085
+ const formatSize = (bytes) => {
1086
+ if (bytes < 1024) return bytes + " B";
1087
+ if (bytes < 1024 * 1024) return (bytes / 1024).toFixed(1) + " KB";
1088
+ return (bytes / (1024 * 1024)).toFixed(1) + " MB";
1089
+ };
1090
+ const getIcon = (type) => {
1091
+ 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" };
1092
+ 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" };
1093
+ 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" };
1094
+ 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" };
1095
+ return { path: "M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8zM14 2v6h6", color: "#94a3b8" };
1096
+ };
1097
+ const processFiles = (incoming) => {
1098
+ setError("");
1099
+ const valid = [];
1100
+ for (const f of incoming) {
1101
+ if (f.size > maxSizeMB * 1024 * 1024) {
1102
+ setError(`"${f.name}" exceeds ${maxSizeMB}MB limit.`);
1103
+ continue;
1104
+ }
1105
+ valid.push({ file: f, id: Math.random().toString(36).slice(2), progress: 0, done: false });
1106
+ }
1107
+ if (!valid.length) return;
1108
+ const newFiles = multiple ? [...files, ...valid] : valid;
1109
+ setFiles(newFiles);
1110
+ valid.forEach(({ id }) => {
1111
+ let p = 0;
1112
+ const t = setInterval(() => {
1113
+ p += Math.floor(Math.random() * 15) + 5;
1114
+ if (p >= 100) {
1115
+ p = 100;
1116
+ clearInterval(t);
1117
+ setFiles((prev) => prev.map((f) => f.id === id ? { ...f, progress: 100, done: true } : f));
1118
+ onUpload(id);
1119
+ } else {
1120
+ setFiles((prev) => prev.map((f) => f.id === id ? { ...f, progress: p } : f));
1121
+ }
1122
+ }, 200);
1123
+ });
1124
+ };
1125
+ const handleDrop = (e) => {
1126
+ e.preventDefault();
1127
+ setDragging(false);
1128
+ processFiles(Array.from(e.dataTransfer.files));
1129
+ };
1130
+ const removeFile = (id) => setFiles((prev) => prev.filter((f) => f.id !== id));
1131
+ return /* @__PURE__ */ import_react6.default.createElement("div", { style: { width: "320px", fontFamily: "system-ui, sans-serif" } }, /* @__PURE__ */ import_react6.default.createElement(
1132
+ "div",
1133
+ {
1134
+ onClick: () => {
1135
+ var _a;
1136
+ return (_a = inputRef.current) == null ? void 0 : _a.click();
1137
+ },
1138
+ onDragOver: (e) => {
1139
+ e.preventDefault();
1140
+ setDragging(true);
1141
+ },
1142
+ onDragLeave: () => setDragging(false),
1143
+ onDrop: handleDrop,
1144
+ style: {
1145
+ background: dragging ? alpha(accent, 0.1) : "rgba(255,255,255,0.03)",
1146
+ border: `2px dashed ${dragging ? accent : "rgba(255,255,255,0.1)"}`,
1147
+ borderRadius: radius,
1148
+ padding: "32px 20px",
1149
+ textAlign: "center",
1150
+ cursor: "pointer",
1151
+ transition: "all 0.2s"
1152
+ }
1153
+ },
1154
+ /* @__PURE__ */ import_react6.default.createElement(
1155
+ "input",
1156
+ {
1157
+ ref: inputRef,
1158
+ type: "file",
1159
+ accept,
1160
+ multiple,
1161
+ style: { display: "none" },
1162
+ onChange: (e) => processFiles(Array.from(e.target.files))
1163
+ }
1164
+ ),
1165
+ /* @__PURE__ */ import_react6.default.createElement("div", { style: {
1166
+ width: "48px",
1167
+ height: "48px",
1168
+ borderRadius: "14px",
1169
+ background: alpha(accent, 0.12),
1170
+ border: `1px solid ${alpha(accent, 0.25)}`,
1171
+ display: "flex",
1172
+ alignItems: "center",
1173
+ justifyContent: "center",
1174
+ margin: "0 auto 14px",
1175
+ transition: "all 0.2s",
1176
+ transform: dragging ? "scale(1.1)" : "scale(1)"
1177
+ } }, /* @__PURE__ */ import_react6.default.createElement(
1178
+ "svg",
1179
+ {
1180
+ width: "22",
1181
+ height: "22",
1182
+ viewBox: "0 0 24 24",
1183
+ fill: "none",
1184
+ stroke: accent,
1185
+ strokeWidth: "2",
1186
+ strokeLinecap: "round",
1187
+ strokeLinejoin: "round"
1188
+ },
1189
+ /* @__PURE__ */ import_react6.default.createElement("path", { d: "M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4M17 8l-5-5-5 5M12 3v12" })
1190
+ )),
1191
+ /* @__PURE__ */ import_react6.default.createElement("p", { style: { fontSize: "13px", fontWeight: "600", color: "#fff", margin: "0 0 4px" } }, label),
1192
+ /* @__PURE__ */ import_react6.default.createElement("p", { style: { fontSize: "11px", color: "rgba(255,255,255,0.3)", margin: 0 } }, subLabel, " ", maxSizeMB, "MB")
1193
+ ), error && /* @__PURE__ */ import_react6.default.createElement("div", { style: {
1194
+ marginTop: "10px",
1195
+ padding: "9px 12px",
1196
+ borderRadius: "10px",
1197
+ background: "rgba(239,68,68,0.08)",
1198
+ border: "1px solid rgba(239,68,68,0.2)",
1199
+ display: "flex",
1200
+ alignItems: "center",
1201
+ gap: "8px"
1202
+ } }, /* @__PURE__ */ import_react6.default.createElement(
1203
+ "svg",
1204
+ {
1205
+ width: "13",
1206
+ height: "13",
1207
+ viewBox: "0 0 24 24",
1208
+ fill: "none",
1209
+ stroke: "#f87171",
1210
+ strokeWidth: "2.5",
1211
+ strokeLinecap: "round"
1212
+ },
1213
+ /* @__PURE__ */ import_react6.default.createElement("circle", { cx: "12", cy: "12", r: "10" }),
1214
+ /* @__PURE__ */ import_react6.default.createElement("line", { x1: "12", y1: "8", x2: "12", y2: "12" }),
1215
+ /* @__PURE__ */ import_react6.default.createElement("line", { x1: "12", y1: "16", x2: "12.01", y2: "16" })
1216
+ ), /* @__PURE__ */ import_react6.default.createElement("span", { style: { fontSize: "11px", color: "#f87171" } }, error)), files.length > 0 && /* @__PURE__ */ import_react6.default.createElement("div", { style: { marginTop: "12px", display: "flex", flexDirection: "column", gap: "8px" } }, files.map(({ file, id, progress, done }) => {
1217
+ const icon = getIcon(file.type);
1218
+ const preview = file.type.startsWith("image/") ? URL.createObjectURL(file) : null;
1219
+ return /* @__PURE__ */ import_react6.default.createElement("div", { key: id, style: {
1220
+ background: "rgba(255,255,255,0.03)",
1221
+ border: `1px solid ${done ? alpha(accent, 0.2) : "rgba(255,255,255,0.07)"}`,
1222
+ borderRadius: "12px",
1223
+ padding: "10px 12px",
1224
+ transition: "border-color 0.3s"
1225
+ } }, /* @__PURE__ */ import_react6.default.createElement("div", { style: { display: "flex", alignItems: "center", gap: "10px" } }, /* @__PURE__ */ import_react6.default.createElement("div", { style: {
1226
+ width: "36px",
1227
+ height: "36px",
1228
+ borderRadius: "8px",
1229
+ flexShrink: 0,
1230
+ background: preview ? `url(${preview}) center/cover` : alpha(icon.color, 0.12),
1231
+ border: `1px solid ${alpha(icon.color, 0.2)}`,
1232
+ display: "flex",
1233
+ alignItems: "center",
1234
+ justifyContent: "center",
1235
+ overflow: "hidden"
1236
+ } }, !preview && /* @__PURE__ */ import_react6.default.createElement(
1237
+ "svg",
1238
+ {
1239
+ width: "16",
1240
+ height: "16",
1241
+ viewBox: "0 0 24 24",
1242
+ fill: "none",
1243
+ stroke: icon.color,
1244
+ strokeWidth: "2",
1245
+ strokeLinecap: "round",
1246
+ strokeLinejoin: "round"
1247
+ },
1248
+ /* @__PURE__ */ import_react6.default.createElement("path", { d: icon.path })
1249
+ )), /* @__PURE__ */ import_react6.default.createElement("div", { style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ import_react6.default.createElement("p", { style: {
1250
+ fontSize: "12px",
1251
+ fontWeight: "600",
1252
+ color: "#fff",
1253
+ margin: "0 0 2px",
1254
+ overflow: "hidden",
1255
+ textOverflow: "ellipsis",
1256
+ whiteSpace: "nowrap"
1257
+ } }, file.name), /* @__PURE__ */ import_react6.default.createElement("p", { style: { fontSize: "10px", color: "rgba(255,255,255,0.3)", margin: 0 } }, formatSize(file.size))), done ? /* @__PURE__ */ import_react6.default.createElement("div", { style: {
1258
+ width: "22px",
1259
+ height: "22px",
1260
+ borderRadius: "50%",
1261
+ background: "rgba(16,185,129,0.15)",
1262
+ border: "1px solid rgba(16,185,129,0.3)",
1263
+ display: "flex",
1264
+ alignItems: "center",
1265
+ justifyContent: "center",
1266
+ flexShrink: 0
1267
+ } }, /* @__PURE__ */ import_react6.default.createElement(
1268
+ "svg",
1269
+ {
1270
+ width: "10",
1271
+ height: "10",
1272
+ viewBox: "0 0 24 24",
1273
+ fill: "none",
1274
+ stroke: "#34d399",
1275
+ strokeWidth: "3",
1276
+ strokeLinecap: "round"
1277
+ },
1278
+ /* @__PURE__ */ import_react6.default.createElement("polyline", { points: "20 6 9 17 4 12" })
1279
+ )) : /* @__PURE__ */ import_react6.default.createElement(
1280
+ "button",
1281
+ {
1282
+ onClick: () => removeFile(id),
1283
+ style: {
1284
+ background: "transparent",
1285
+ border: "none",
1286
+ padding: "2px",
1287
+ cursor: "pointer",
1288
+ color: "rgba(255,255,255,0.25)",
1289
+ flexShrink: 0,
1290
+ transition: "color 0.2s"
1291
+ },
1292
+ onMouseEnter: (e) => e.currentTarget.style.color = "#f87171",
1293
+ onMouseLeave: (e) => e.currentTarget.style.color = "rgba(255,255,255,0.25)"
1294
+ },
1295
+ /* @__PURE__ */ import_react6.default.createElement(
1296
+ "svg",
1297
+ {
1298
+ width: "14",
1299
+ height: "14",
1300
+ viewBox: "0 0 24 24",
1301
+ fill: "none",
1302
+ stroke: "currentColor",
1303
+ strokeWidth: "2.5",
1304
+ strokeLinecap: "round"
1305
+ },
1306
+ /* @__PURE__ */ import_react6.default.createElement("path", { d: "M18 6L6 18M6 6l12 12" })
1307
+ )
1308
+ )), !done && /* @__PURE__ */ import_react6.default.createElement("div", { style: {
1309
+ marginTop: "8px",
1310
+ height: "3px",
1311
+ background: "rgba(255,255,255,0.06)",
1312
+ borderRadius: "2px",
1313
+ overflow: "hidden"
1314
+ } }, /* @__PURE__ */ import_react6.default.createElement("div", { style: {
1315
+ height: "100%",
1316
+ borderRadius: "2px",
1317
+ width: `${progress}%`,
1318
+ background: `linear-gradient(90deg, ${accent}, ${alpha(accent, 0.6)})`,
1319
+ transition: "width 0.2s ease"
1320
+ } })));
1321
+ })));
1322
+ };
1323
+
1324
+ // src/components/ColorPicker/ColorPicker.jsx
1325
+ var import_react7 = __toESM(require("react"));
1326
+ var ColorPicker = ({
1327
+ defaultColor = "#6366f1",
1328
+ showOpacity = true,
1329
+ showEyedropper = true,
1330
+ showInput = true,
1331
+ accent = "#6366f1",
1332
+ bg = "#0f172a",
1333
+ radius = "16px",
1334
+ onChange = () => {
1335
+ },
1336
+ swatches = [
1337
+ "#6366f1",
1338
+ "#8b5cf6",
1339
+ "#a855f7",
1340
+ "#ec4899",
1341
+ "#f43f5e",
1342
+ "#ef4444",
1343
+ "#f97316",
1344
+ "#f59e0b",
1345
+ "#eab308",
1346
+ "#84cc16",
1347
+ "#22c55e",
1348
+ "#10b981",
1349
+ "#14b8a6",
1350
+ "#06b6d4",
1351
+ "#3b82f6",
1352
+ "#0ea5e9",
1353
+ "#64748b",
1354
+ "#94a3b8",
1355
+ "#ffffff",
1356
+ "#000000"
1357
+ ]
1358
+ }) => {
1359
+ const [color, setColor] = (0, import_react7.useState)(defaultColor);
1360
+ const [hex, setHex] = (0, import_react7.useState)(defaultColor);
1361
+ const [opacity, setOpacity] = (0, import_react7.useState)(100);
1362
+ const [inputErr, setInputErr] = (0, import_react7.useState)(false);
1363
+ const [copied, setCopied] = (0, import_react7.useState)(false);
1364
+ const alpha = (hexVal, op) => {
1365
+ const r = parseInt(hexVal.slice(1, 3), 16);
1366
+ const g = parseInt(hexVal.slice(3, 5), 16);
1367
+ const b = parseInt(hexVal.slice(5, 7), 16);
1368
+ return `rgba(${r},${g},${b},${op})`;
1369
+ };
1370
+ const isValidHex = (v) => /^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$/.test(v);
1371
+ const applyColor = (val) => {
1372
+ if (!isValidHex(val)) {
1373
+ setInputErr(true);
1374
+ return;
1375
+ }
1376
+ setInputErr(false);
1377
+ setColor(val);
1378
+ setHex(val);
1379
+ onChange({ hex: val, opacity, rgba: alpha(val, opacity / 100) });
1380
+ };
1381
+ const pickSwatch = (val) => {
1382
+ setColor(val);
1383
+ setHex(val);
1384
+ setInputErr(false);
1385
+ onChange({ hex: val, opacity, rgba: alpha(val, opacity / 100) });
1386
+ };
1387
+ const handleOpacity = (v) => {
1388
+ setOpacity(v);
1389
+ onChange({ hex: color, opacity: v, rgba: alpha(color, v / 100) });
1390
+ };
1391
+ const copyHex = () => {
1392
+ var _a;
1393
+ (_a = navigator.clipboard) == null ? void 0 : _a.writeText(hex).catch(() => {
1394
+ });
1395
+ setCopied(true);
1396
+ setTimeout(() => setCopied(false), 1500);
1397
+ };
1398
+ const hueGradient = "linear-gradient(90deg,#f00,#ff0,#0f0,#0ff,#00f,#f0f,#f00)";
1399
+ return /* @__PURE__ */ import_react7.default.createElement("div", { style: {
1400
+ background: bg,
1401
+ borderRadius: radius,
1402
+ padding: "20px",
1403
+ width: "260px",
1404
+ fontFamily: "system-ui, sans-serif",
1405
+ border: "1px solid rgba(255,255,255,0.07)",
1406
+ boxShadow: "0 10px 40px rgba(0,0,0,0.4)"
1407
+ } }, /* @__PURE__ */ import_react7.default.createElement("div", { style: {
1408
+ height: "52px",
1409
+ borderRadius: "12px",
1410
+ marginBottom: "16px",
1411
+ background: alpha(color, opacity / 100),
1412
+ border: "1px solid rgba(255,255,255,0.08)",
1413
+ position: "relative",
1414
+ overflow: "hidden"
1415
+ } }, /* @__PURE__ */ import_react7.default.createElement("div", { style: {
1416
+ position: "absolute",
1417
+ inset: 0,
1418
+ zIndex: 0,
1419
+ 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%)",
1420
+ backgroundSize: "10px 10px",
1421
+ backgroundPosition: "0 0,0 5px,5px -5px,-5px 0",
1422
+ opacity: 0.3
1423
+ } }), /* @__PURE__ */ import_react7.default.createElement("div", { style: { position: "absolute", inset: 0, background: alpha(color, opacity / 100) } })), /* @__PURE__ */ import_react7.default.createElement("div", { style: { position: "relative", marginBottom: "12px" } }, /* @__PURE__ */ import_react7.default.createElement(
1424
+ "input",
1425
+ {
1426
+ type: "range",
1427
+ min: "0",
1428
+ max: "360",
1429
+ defaultValue: "240",
1430
+ onChange: (e) => {
1431
+ const h = e.target.value;
1432
+ const c = `hsl(${h},80%,60%)`;
1433
+ const el = document.createElement("div");
1434
+ el.style.color = c;
1435
+ document.body.appendChild(el);
1436
+ const rgb = getComputedStyle(el).color;
1437
+ document.body.removeChild(el);
1438
+ const [r, g, b] = rgb.match(/\d+/g).map(Number);
1439
+ const hex6 = "#" + [r, g, b].map((n) => n.toString(16).padStart(2, "0")).join("");
1440
+ pickSwatch(hex6);
1441
+ },
1442
+ style: {
1443
+ width: "100%",
1444
+ height: "10px",
1445
+ borderRadius: "5px",
1446
+ appearance: "none",
1447
+ WebkitAppearance: "none",
1448
+ background: hueGradient,
1449
+ cursor: "pointer",
1450
+ outline: "none",
1451
+ border: "none"
1452
+ }
1453
+ }
1454
+ )), showOpacity && /* @__PURE__ */ import_react7.default.createElement("div", { style: { marginBottom: "16px" } }, /* @__PURE__ */ import_react7.default.createElement(
1455
+ "input",
1456
+ {
1457
+ type: "range",
1458
+ min: "0",
1459
+ max: "100",
1460
+ value: opacity,
1461
+ onChange: (e) => handleOpacity(Number(e.target.value)),
1462
+ style: {
1463
+ width: "100%",
1464
+ height: "10px",
1465
+ borderRadius: "5px",
1466
+ appearance: "none",
1467
+ WebkitAppearance: "none",
1468
+ background: `linear-gradient(90deg, transparent, ${color})`,
1469
+ cursor: "pointer",
1470
+ outline: "none",
1471
+ border: "none"
1472
+ }
1473
+ }
1474
+ ), /* @__PURE__ */ import_react7.default.createElement("div", { style: { display: "flex", justifyContent: "space-between", marginTop: "4px" } }, /* @__PURE__ */ import_react7.default.createElement("span", { style: { fontSize: "10px", color: "rgba(255,255,255,0.25)" } }, "Opacity"), /* @__PURE__ */ import_react7.default.createElement("span", { style: { fontSize: "10px", color: "rgba(255,255,255,0.45)", fontWeight: "600" } }, opacity, "%"))), showInput && /* @__PURE__ */ import_react7.default.createElement("div", { style: { display: "flex", gap: "8px", marginBottom: "16px", alignItems: "center" } }, /* @__PURE__ */ import_react7.default.createElement("div", { style: {
1475
+ width: "32px",
1476
+ height: "32px",
1477
+ borderRadius: "8px",
1478
+ flexShrink: 0,
1479
+ background: color,
1480
+ border: "1px solid rgba(255,255,255,0.1)"
1481
+ } }), /* @__PURE__ */ import_react7.default.createElement(
1482
+ "input",
1483
+ {
1484
+ value: hex,
1485
+ onChange: (e) => {
1486
+ setHex(e.target.value);
1487
+ setInputErr(false);
1488
+ },
1489
+ onBlur: (e) => applyColor(e.target.value),
1490
+ onKeyDown: (e) => e.key === "Enter" && applyColor(hex),
1491
+ placeholder: "#000000",
1492
+ style: {
1493
+ flex: 1,
1494
+ background: "rgba(255,255,255,0.05)",
1495
+ border: `1px solid ${inputErr ? "rgba(239,68,68,0.6)" : "rgba(255,255,255,0.1)"}`,
1496
+ borderRadius: "8px",
1497
+ padding: "7px 10px",
1498
+ fontSize: "12px",
1499
+ fontFamily: "monospace",
1500
+ color: inputErr ? "#f87171" : "#fff",
1501
+ outline: "none"
1502
+ }
1503
+ }
1504
+ ), /* @__PURE__ */ import_react7.default.createElement(
1505
+ "button",
1506
+ {
1507
+ onClick: copyHex,
1508
+ title: "Copy hex",
1509
+ style: {
1510
+ width: "32px",
1511
+ height: "32px",
1512
+ borderRadius: "8px",
1513
+ flexShrink: 0,
1514
+ background: copied ? "rgba(16,185,129,0.15)" : "rgba(255,255,255,0.05)",
1515
+ border: `1px solid ${copied ? "rgba(16,185,129,0.3)" : "rgba(255,255,255,0.1)"}`,
1516
+ cursor: "pointer",
1517
+ display: "flex",
1518
+ alignItems: "center",
1519
+ justifyContent: "center",
1520
+ color: copied ? "#34d399" : "rgba(255,255,255,0.4)",
1521
+ transition: "all 0.2s"
1522
+ }
1523
+ },
1524
+ copied ? /* @__PURE__ */ import_react7.default.createElement("svg", { width: "13", height: "13", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round" }, /* @__PURE__ */ import_react7.default.createElement("polyline", { points: "20 6 9 17 4 12" })) : /* @__PURE__ */ import_react7.default.createElement("svg", { width: "13", height: "13", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }, /* @__PURE__ */ import_react7.default.createElement("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2" }), /* @__PURE__ */ import_react7.default.createElement("path", { d: "M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1" }))
1525
+ )), /* @__PURE__ */ import_react7.default.createElement("div", { style: { height: "1px", background: "rgba(255,255,255,0.06)", marginBottom: "14px" } }), /* @__PURE__ */ import_react7.default.createElement("div", { style: { display: "flex", flexWrap: "wrap", gap: "7px" } }, swatches.map((s) => /* @__PURE__ */ import_react7.default.createElement(
1526
+ "button",
1527
+ {
1528
+ key: s,
1529
+ onClick: () => pickSwatch(s),
1530
+ title: s,
1531
+ style: {
1532
+ width: "22px",
1533
+ height: "22px",
1534
+ borderRadius: "6px",
1535
+ background: s,
1536
+ border: `2px solid ${color === s ? "#fff" : "transparent"}`,
1537
+ cursor: "pointer",
1538
+ padding: 0,
1539
+ transition: "transform 0.15s, border-color 0.15s",
1540
+ outline: "none",
1541
+ boxShadow: s === "#ffffff" ? "inset 0 0 0 1px rgba(0,0,0,0.15)" : "none"
1542
+ },
1543
+ onMouseEnter: (e) => e.currentTarget.style.transform = "scale(1.2)",
1544
+ onMouseLeave: (e) => e.currentTarget.style.transform = "scale(1)"
1545
+ }
1546
+ ))), /* @__PURE__ */ import_react7.default.createElement("div", { style: {
1547
+ marginTop: "14px",
1548
+ padding: "8px 10px",
1549
+ borderRadius: "8px",
1550
+ background: "rgba(255,255,255,0.03)",
1551
+ border: "1px solid rgba(255,255,255,0.06)",
1552
+ display: "flex",
1553
+ justifyContent: "space-between",
1554
+ alignItems: "center"
1555
+ } }, /* @__PURE__ */ import_react7.default.createElement("span", { style: { fontSize: "10px", color: "rgba(255,255,255,0.25)", fontWeight: "600", textTransform: "uppercase", letterSpacing: "0.5px" } }, "RGBA"), /* @__PURE__ */ import_react7.default.createElement("span", { style: { fontSize: "10px", fontFamily: "monospace", color: "rgba(255,255,255,0.5)" } }, alpha(color, opacity / 100))));
1556
+ };
1557
+
1558
+ // src/components/AnimatedForm/AnimatedForm.jsx
1559
+ var import_react8 = __toESM(require("react"));
1560
+ var AnimatedForm = ({
1561
+ title = "Contact Us",
1562
+ description = "We'll get back to you shortly",
1563
+ submitText = "Send Message",
1564
+ accent = "#6366f1",
1565
+ bg = "#0f172a",
1566
+ onSubmit = () => {
1567
+ }
1568
+ }) => {
1569
+ const [name, setName] = (0, import_react8.useState)("");
1570
+ const [email, setEmail] = (0, import_react8.useState)("");
1571
+ const [message, setMessage] = (0, import_react8.useState)("");
1572
+ const [hovered, setHovered] = (0, import_react8.useState)(false);
1573
+ const alpha = (hex, op) => {
1574
+ const r = parseInt(hex.slice(1, 3), 16), g = parseInt(hex.slice(3, 5), 16), b = parseInt(hex.slice(5, 7), 16);
1575
+ return "rgba(" + r + "," + g + "," + b + "," + op + ")";
1576
+ };
1577
+ return /* @__PURE__ */ import_react8.default.createElement(
1578
+ "div",
1579
+ {
1580
+ onMouseEnter: () => setHovered(true),
1581
+ onMouseLeave: () => setHovered(false),
1582
+ style: {
1583
+ background: bg,
1584
+ borderRadius: "20px",
1585
+ padding: "28px",
1586
+ width: "400px",
1587
+ border: "1px solid " + (hovered ? alpha(accent, 0.3) : "rgba(255,255,255,0.07)"),
1588
+ fontFamily: "system-ui,sans-serif",
1589
+ transition: "transform 0.25s, box-shadow 0.25s",
1590
+ transform: hovered ? "translateY(-4px)" : "translateY(0px)",
1591
+ boxShadow: hovered ? "0 16px 40px rgba(0,0,0,0.5)" : "0 4px 20px rgba(0,0,0,0.3)"
1592
+ }
1593
+ },
1594
+ /* @__PURE__ */ import_react8.default.createElement("h2", { style: { fontSize: "20px", fontWeight: "700", color: "#fff", margin: "0 0 8px" } }, title),
1595
+ /* @__PURE__ */ import_react8.default.createElement("p", { style: { fontSize: "14px", color: "rgba(255,255,255,0.45)", margin: "0 0 24px" } }, description),
1596
+ /* @__PURE__ */ import_react8.default.createElement(
1597
+ "input",
1598
+ {
1599
+ type: "text",
1600
+ placeholder: "Your Name",
1601
+ value: name,
1602
+ onChange: (e) => setName(e.target.value),
1603
+ style: {
1604
+ width: "100%",
1605
+ padding: "12px",
1606
+ borderRadius: "10px",
1607
+ border: "1px solid rgba(255,255,255,0.1)",
1608
+ background: "#1e293b",
1609
+ color: "#fff",
1610
+ fontSize: "14px",
1611
+ marginBottom: "16px",
1612
+ outline: "none",
1613
+ transition: "border-color 0.2s",
1614
+ fontFamily: "inherit"
1615
+ }
1616
+ }
1617
+ ),
1618
+ /* @__PURE__ */ import_react8.default.createElement(
1619
+ "input",
1620
+ {
1621
+ type: "email",
1622
+ placeholder: "Your Email",
1623
+ value: email,
1624
+ onChange: (e) => setEmail(e.target.value),
1625
+ style: {
1626
+ width: "100%",
1627
+ padding: "12px",
1628
+ borderRadius: "10px",
1629
+ border: "1px solid rgba(255,255,255,0.1)",
1630
+ background: "#1e293b",
1631
+ color: "#fff",
1632
+ fontSize: "14px",
1633
+ marginBottom: "16px",
1634
+ outline: "none",
1635
+ transition: "border-color 0.2s",
1636
+ fontFamily: "inherit"
1637
+ }
1638
+ }
1639
+ ),
1640
+ /* @__PURE__ */ import_react8.default.createElement(
1641
+ "textarea",
1642
+ {
1643
+ placeholder: "Your Message",
1644
+ value: message,
1645
+ onChange: (e) => setMessage(e.target.value),
1646
+ style: {
1647
+ width: "100%",
1648
+ padding: "12px",
1649
+ borderRadius: "10px",
1650
+ border: "1px solid rgba(255,255,255,0.1)",
1651
+ background: "#1e293b",
1652
+ color: "#fff",
1653
+ fontSize: "14px",
1654
+ marginBottom: "24px",
1655
+ outline: "none",
1656
+ transition: "border-color 0.2s",
1657
+ fontFamily: "inherit",
1658
+ minHeight: "120px",
1659
+ resize: "vertical"
1660
+ }
1661
+ }
1662
+ ),
1663
+ /* @__PURE__ */ import_react8.default.createElement(
1664
+ "button",
1665
+ {
1666
+ onClick: () => onSubmit({ name, email, message }),
1667
+ style: {
1668
+ width: "100%",
1669
+ padding: "13px",
1670
+ borderRadius: "12px",
1671
+ border: "none",
1672
+ background: "linear-gradient(135deg, " + accent + ", " + alpha(accent, 0.7) + ")",
1673
+ color: "#fff",
1674
+ fontSize: "14px",
1675
+ fontWeight: "700",
1676
+ cursor: "pointer",
1677
+ fontFamily: "inherit"
1678
+ }
1679
+ },
1680
+ submitText
1681
+ )
1682
+ );
1683
+ };
1684
+
1685
+ // src/components/Card/Card.jsx
1686
+ var import_react9 = __toESM(require("react"));
1687
+ var Card = ({
1688
+ title = "Performance",
1689
+ description = "Real-time metrics with live dashboard updates every second.",
1690
+ icon = "\u26A1",
1691
+ tag = "Active",
1692
+ onClick
1693
+ }) => {
1694
+ const [hovered, setHovered] = (0, import_react9.useState)(false);
1695
+ return /* @__PURE__ */ import_react9.default.createElement(
1696
+ "div",
1697
+ {
1698
+ onMouseEnter: () => setHovered(true),
1699
+ onMouseLeave: () => setHovered(false),
1700
+ onClick,
1701
+ style: {
1702
+ background: "#ffffff",
1703
+ border: `0.5px solid ${hovered ? "#00000033" : "#0000001a"}`,
1704
+ borderRadius: "12px",
1705
+ padding: "1.25rem",
1706
+ transition: "border-color 0.2s, transform 0.2s",
1707
+ transform: hovered ? "translateY(-2px)" : "translateY(0)",
1708
+ cursor: onClick ? "pointer" : "default",
1709
+ position: "relative",
1710
+ overflow: "hidden",
1711
+ fontFamily: "sans-serif",
1712
+ width: "260px"
1713
+ }
1714
+ },
1715
+ /* @__PURE__ */ import_react9.default.createElement("div", { style: {
1716
+ position: "absolute",
1717
+ top: 0,
1718
+ left: 0,
1719
+ right: 0,
1720
+ height: "3px",
1721
+ background: "#1D9E75",
1722
+ borderRadius: "12px 12px 0 0"
1723
+ } }),
1724
+ /* @__PURE__ */ import_react9.default.createElement("div", { style: {
1725
+ width: 40,
1726
+ height: 40,
1727
+ borderRadius: 8,
1728
+ background: "#E1F5EE",
1729
+ display: "flex",
1730
+ alignItems: "center",
1731
+ justifyContent: "center",
1732
+ fontSize: 18,
1733
+ marginBottom: 14
1734
+ } }, icon),
1735
+ /* @__PURE__ */ import_react9.default.createElement("p", { style: { fontSize: 15, fontWeight: 700, color: "#111", margin: "0 0 6px" } }, title),
1736
+ /* @__PURE__ */ import_react9.default.createElement("p", { style: { fontSize: 13, color: "#666", lineHeight: 1.6, margin: "0 0 16px" } }, description),
1737
+ /* @__PURE__ */ import_react9.default.createElement("div", { style: {
1738
+ display: "flex",
1739
+ alignItems: "center",
1740
+ justifyContent: "space-between",
1741
+ borderTop: "0.5px solid #0000001a",
1742
+ paddingTop: 12
1743
+ } }, /* @__PURE__ */ import_react9.default.createElement("span", { style: {
1744
+ fontSize: 11,
1745
+ fontWeight: 500,
1746
+ padding: "3px 9px",
1747
+ borderRadius: 20,
1748
+ background: "#E1F5EE",
1749
+ color: "#0F6E56"
1750
+ } }, tag), /* @__PURE__ */ import_react9.default.createElement("span", { style: {
1751
+ fontSize: 14,
1752
+ color: "#999",
1753
+ display: "inline-block",
1754
+ transition: "transform 0.2s",
1755
+ transform: hovered ? "translateX(3px)" : "translateX(0)"
1756
+ } }, "\u2192"))
1757
+ );
1758
+ };
1759
+
1760
+ // src/components/Button/Button.jsx
1761
+ var import_react10 = __toESM(require("react"));
1762
+ var Button = ({
1763
+ text = "Click Me",
1764
+ variant = "gradient",
1765
+ // primary | outline | ghost | gradient
1766
+ size = "md",
1767
+ // sm | md | lg
1768
+ icon,
1769
+ loading = false,
1770
+ disabled = false,
1771
+ onClick
1772
+ }) => {
1773
+ const [hovered, setHovered] = (0, import_react10.useState)(false);
1774
+ const variants = {
1775
+ primary: {
1776
+ background: "#2563eb",
1777
+ color: "#fff",
1778
+ border: "none"
1779
+ },
1780
+ outline: {
1781
+ background: "transparent",
1782
+ color: "#2563eb",
1783
+ border: "1px solid #2563eb"
1784
+ },
1785
+ ghost: {
1786
+ background: "transparent",
1787
+ color: "#111",
1788
+ border: "none"
1789
+ },
1790
+ gradient: {
1791
+ background: "linear-gradient(135deg, #6366f1, #06b6d4)",
1792
+ color: "#fff",
1793
+ border: "none"
1794
+ }
1795
+ };
1796
+ const sizes = {
1797
+ sm: { padding: "6px 12px", fontSize: "12px" },
1798
+ md: { padding: "10px 18px", fontSize: "14px" },
1799
+ lg: { padding: "14px 24px", fontSize: "16px" }
1800
+ };
1801
+ return /* @__PURE__ */ import_react10.default.createElement(
1802
+ "button",
1803
+ {
1804
+ onClick,
1805
+ disabled: disabled || loading,
1806
+ onMouseEnter: () => setHovered(true),
1807
+ onMouseLeave: () => setHovered(false),
1808
+ style: {
1809
+ ...variants[variant],
1810
+ ...sizes[size],
1811
+ borderRadius: "10px",
1812
+ cursor: disabled ? "not-allowed" : "pointer",
1813
+ display: "flex",
1814
+ alignItems: "center",
1815
+ gap: "8px",
1816
+ fontWeight: 600,
1817
+ fontFamily: "sans-serif",
1818
+ // 🔥 Animation
1819
+ transform: hovered ? "translateY(-2px) scale(1.02)" : "scale(1)",
1820
+ boxShadow: hovered ? "0 10px 20px rgba(0,0,0,0.15)" : "0 2px 6px rgba(0,0,0,0.1)",
1821
+ transition: "all 0.2s ease",
1822
+ opacity: disabled ? 0.6 : 1,
1823
+ position: "relative",
1824
+ overflow: "hidden"
1825
+ }
1826
+ },
1827
+ /* @__PURE__ */ import_react10.default.createElement(
1828
+ "span",
1829
+ {
1830
+ style: {
1831
+ position: "absolute",
1832
+ inset: 0,
1833
+ background: "rgba(255,255,255,0.2)",
1834
+ opacity: hovered ? 1 : 0,
1835
+ transition: "opacity 0.3s"
1836
+ }
1837
+ }
1838
+ ),
1839
+ loading ? /* @__PURE__ */ import_react10.default.createElement("span", null, "Loading...") : /* @__PURE__ */ import_react10.default.createElement(import_react10.default.Fragment, null, icon && /* @__PURE__ */ import_react10.default.createElement("span", null, icon), /* @__PURE__ */ import_react10.default.createElement("span", null, text))
1840
+ );
1841
+ };
1842
+
1843
+ // src/components/AnimatedButton/AnimatedButton.jsx
1844
+ var import_react11 = __toESM(require("react"));
1845
+ var AnimatedButton = ({
1846
+ text = "Click Me!",
1847
+ bg = "#7c3aed",
1848
+ color = "white",
1849
+ size = "md",
1850
+ width = "auto",
1851
+ radius = "12px",
1852
+ border = "none",
1853
+ weight = "600",
1854
+ shadow = "0 4px 14px rgba(124,58,237,0.4)",
1855
+ onClick
1856
+ }) => {
1857
+ const sizes = { sm: "8px 16px", md: "12px 24px", lg: "16px 32px" };
1858
+ const [hovered, setHovered] = (0, import_react11.useState)(false);
1859
+ return /* @__PURE__ */ import_react11.default.createElement(
1860
+ "button",
1861
+ {
1862
+ onClick,
1863
+ onMouseEnter: () => setHovered(true),
1864
+ onMouseLeave: () => setHovered(false),
1865
+ style: {
1866
+ background: hovered ? "#6b21a8" : bg,
1867
+ color,
1868
+ padding: sizes[size],
1869
+ width,
1870
+ border,
1871
+ borderRadius: radius,
1872
+ cursor: "pointer",
1873
+ fontWeight: weight,
1874
+ fontSize: "15px",
1875
+ boxShadow: shadow,
1876
+ transform: hovered ? "scale(1.05)" : "scale(1)",
1877
+ transition: "transform 0.2s ease, background 0.2s ease",
1878
+ display: "flex",
1879
+ alignItems: "center",
1880
+ justifyContent: "center",
1881
+ fontFamily: "system-ui, sans-serif",
1882
+ letterSpacing: "0.02em"
1883
+ }
1884
+ },
1885
+ text
1886
+ );
1887
+ };
1888
+ // Annotate the CommonJS export names for ESM import in node:
1889
+ 0 && (module.exports = {
1890
+ AnimatedButton,
1891
+ AnimatedForm,
1892
+ BackgoundImageSlider,
1893
+ Button,
1894
+ Card,
1895
+ Charts,
1896
+ ColorPicker,
1897
+ FileUpload,
1898
+ Footer,
1899
+ ImageCard,
1900
+ Navbar
1901
+ });