virtual-ui-lib 1.0.65 → 1.0.67

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 CHANGED
@@ -31,6 +31,7 @@ var index_exports = {};
31
31
  __export(index_exports, {
32
32
  Avatar: () => Avatar,
33
33
  AvatarCard: () => AvatarCard,
34
+ BackgoundImageSlider: () => BackgoundImageSlider,
34
35
  Charts: () => Charts,
35
36
  CodeBlock: () => CodeBlock,
36
37
  CustomInputField: () => CustomInputField,
@@ -44,6 +45,7 @@ __export(index_exports, {
44
45
  Navbar: () => Navbar,
45
46
  NotificationToast: () => NotificationToast,
46
47
  OtpInput: () => OtpInput,
48
+ PageLoader: () => PageLoader,
47
49
  PricingCard: () => PricingCard,
48
50
  ResponsiveNavbar: () => ResponsiveNavbar,
49
51
  SearchBar: () => SearchBar,
@@ -2265,10 +2267,443 @@ var ImageSlider = ({
2265
2267
  }
2266
2268
  ))));
2267
2269
  };
2270
+
2271
+ // src/components/BackgoundImageSlider/BackgoundImageSlider.jsx
2272
+ var import_react26 = __toESM(require("react"));
2273
+ var BackgoundImageSlider = ({
2274
+ images = [
2275
+ {
2276
+ src: "https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=1400&q=80",
2277
+ tag: "Travel",
2278
+ title: "Hidden Peaks of the Himalayas",
2279
+ description: "A breathtaking journey through untouched landscapes and ancient monasteries."
2280
+ },
2281
+ {
2282
+ src: "https://images.unsplash.com/photo-1477959858617-67f85cf4f1df?w=1400&q=80",
2283
+ tag: "Urban",
2284
+ title: "City Lights at Night",
2285
+ description: "Explore the vibrant energy of the world's most iconic skylines after dark."
2286
+ },
2287
+ {
2288
+ src: "https://images.unsplash.com/photo-1500534314209-a25ddb2bd429?w=1400&q=80",
2289
+ tag: "Nature",
2290
+ title: "Tropical Beach Paradise",
2291
+ description: "Crystal clear waters and white sand beaches that feel like the edge of the world."
2292
+ },
2293
+ {
2294
+ src: "https://images.unsplash.com/photo-1519681393784-d120267933ba?w=1400&q=80",
2295
+ tag: "Adventure",
2296
+ title: "Starry Mountain Night",
2297
+ description: "Where silence meets the cosmos \u2014 a night sky like you've never seen before."
2298
+ }
2299
+ ],
2300
+ width = "100%",
2301
+ height = "520px",
2302
+ accent = "#6366f1",
2303
+ radius = "0px",
2304
+ showDots = true,
2305
+ autoPlay = false,
2306
+ autoPlayInterval = 4e3
2307
+ }) => {
2308
+ const [current, setCurrent] = (0, import_react26.useState)(0);
2309
+ const [animating, setAnimating] = (0, import_react26.useState)(false);
2310
+ const alpha = (hex, op) => {
2311
+ const r = parseInt(hex.slice(1, 3), 16);
2312
+ const g = parseInt(hex.slice(3, 5), 16);
2313
+ const b = parseInt(hex.slice(5, 7), 16);
2314
+ return `rgba(${r},${g},${b},${op})`;
2315
+ };
2316
+ const go = (0, import_react26.useCallback)((index) => {
2317
+ if (animating) return;
2318
+ setAnimating(true);
2319
+ setCurrent((index + images.length) % images.length);
2320
+ setTimeout(() => setAnimating(false), 400);
2321
+ }, [animating, images.length]);
2322
+ const prev = () => go(current - 1);
2323
+ const next = () => go(current + 1);
2324
+ (0, import_react26.useEffect)(() => {
2325
+ if (!autoPlay) return;
2326
+ const t = setInterval(() => go(current + 1), autoPlayInterval);
2327
+ return () => clearInterval(t);
2328
+ }, [autoPlay, autoPlayInterval, current, go]);
2329
+ const img = images[current];
2330
+ return /* @__PURE__ */ import_react26.default.createElement(import_react26.default.Fragment, null, /* @__PURE__ */ import_react26.default.createElement("style", null, `
2331
+ @keyframes hs-fade { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: scale(1); } }
2332
+ @keyframes hs-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
2333
+ .hs-prev:hover, .hs-next:hover { background: rgba(0,0,0,0.65) !important; border-color: rgba(255,255,255,0.35) !important; }
2334
+ `), /* @__PURE__ */ import_react26.default.createElement("div", { style: {
2335
+ position: "relative",
2336
+ width,
2337
+ height,
2338
+ borderRadius: radius,
2339
+ overflow: "hidden",
2340
+ fontFamily: "system-ui, -apple-system, sans-serif",
2341
+ userSelect: "none"
2342
+ } }, /* @__PURE__ */ import_react26.default.createElement(
2343
+ "img",
2344
+ {
2345
+ key: current,
2346
+ src: img.src,
2347
+ alt: img.title,
2348
+ style: {
2349
+ position: "absolute",
2350
+ inset: 0,
2351
+ width: "100%",
2352
+ height: "100%",
2353
+ objectFit: "cover",
2354
+ animation: "hs-fade 0.4s ease"
2355
+ }
2356
+ }
2357
+ ), /* @__PURE__ */ import_react26.default.createElement("div", { style: {
2358
+ position: "absolute",
2359
+ inset: 0,
2360
+ background: "linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.1) 100%)"
2361
+ } }), img.tag && /* @__PURE__ */ import_react26.default.createElement(
2362
+ "div",
2363
+ {
2364
+ key: current + "-tag",
2365
+ style: {
2366
+ position: "absolute",
2367
+ top: "24px",
2368
+ left: "28px",
2369
+ padding: "5px 14px",
2370
+ borderRadius: "20px",
2371
+ background: alpha(accent, 0.85),
2372
+ fontSize: "11px",
2373
+ fontWeight: "700",
2374
+ color: "#fff",
2375
+ letterSpacing: "0.6px",
2376
+ textTransform: "uppercase",
2377
+ animation: "hs-up 0.4s ease"
2378
+ }
2379
+ },
2380
+ img.tag
2381
+ ), /* @__PURE__ */ import_react26.default.createElement("div", { style: {
2382
+ position: "absolute",
2383
+ top: "24px",
2384
+ right: "28px",
2385
+ padding: "5px 12px",
2386
+ borderRadius: "20px",
2387
+ background: "rgba(0,0,0,0.45)",
2388
+ fontSize: "11px",
2389
+ fontWeight: "600",
2390
+ color: "rgba(255,255,255,0.7)"
2391
+ } }, current + 1, " / ", images.length), /* @__PURE__ */ import_react26.default.createElement(
2392
+ "button",
2393
+ {
2394
+ className: "hs-prev",
2395
+ onClick: prev,
2396
+ style: {
2397
+ position: "absolute",
2398
+ left: "20px",
2399
+ top: "50%",
2400
+ transform: "translateY(-50%)",
2401
+ width: "44px",
2402
+ height: "44px",
2403
+ borderRadius: "50%",
2404
+ background: "rgba(0,0,0,0.4)",
2405
+ border: "1px solid rgba(255,255,255,0.2)",
2406
+ color: "#fff",
2407
+ cursor: "pointer",
2408
+ display: "flex",
2409
+ alignItems: "center",
2410
+ justifyContent: "center",
2411
+ transition: "all 0.2s",
2412
+ padding: 0,
2413
+ zIndex: 10
2414
+ }
2415
+ },
2416
+ /* @__PURE__ */ import_react26.default.createElement(
2417
+ "svg",
2418
+ {
2419
+ width: "18",
2420
+ height: "18",
2421
+ viewBox: "0 0 24 24",
2422
+ fill: "none",
2423
+ stroke: "currentColor",
2424
+ strokeWidth: "2.5",
2425
+ strokeLinecap: "round",
2426
+ strokeLinejoin: "round"
2427
+ },
2428
+ /* @__PURE__ */ import_react26.default.createElement("polyline", { points: "15 18 9 12 15 6" })
2429
+ )
2430
+ ), /* @__PURE__ */ import_react26.default.createElement(
2431
+ "button",
2432
+ {
2433
+ className: "hs-next",
2434
+ onClick: next,
2435
+ style: {
2436
+ position: "absolute",
2437
+ right: "20px",
2438
+ top: "50%",
2439
+ transform: "translateY(-50%)",
2440
+ width: "44px",
2441
+ height: "44px",
2442
+ borderRadius: "50%",
2443
+ background: "rgba(0,0,0,0.4)",
2444
+ border: "1px solid rgba(255,255,255,0.2)",
2445
+ color: "#fff",
2446
+ cursor: "pointer",
2447
+ display: "flex",
2448
+ alignItems: "center",
2449
+ justifyContent: "center",
2450
+ transition: "all 0.2s",
2451
+ padding: 0,
2452
+ zIndex: 10
2453
+ }
2454
+ },
2455
+ /* @__PURE__ */ import_react26.default.createElement(
2456
+ "svg",
2457
+ {
2458
+ width: "18",
2459
+ height: "18",
2460
+ viewBox: "0 0 24 24",
2461
+ fill: "none",
2462
+ stroke: "currentColor",
2463
+ strokeWidth: "2.5",
2464
+ strokeLinecap: "round",
2465
+ strokeLinejoin: "round"
2466
+ },
2467
+ /* @__PURE__ */ import_react26.default.createElement("polyline", { points: "9 18 15 12 9 6" })
2468
+ )
2469
+ ), /* @__PURE__ */ import_react26.default.createElement("div", { style: {
2470
+ position: "absolute",
2471
+ bottom: showDots ? "56px" : "28px",
2472
+ left: "28px",
2473
+ right: "28px",
2474
+ zIndex: 5
2475
+ } }, /* @__PURE__ */ import_react26.default.createElement(
2476
+ "h2",
2477
+ {
2478
+ key: current + "-title",
2479
+ style: {
2480
+ fontSize: "clamp(20px, 4vw, 36px)",
2481
+ fontWeight: "800",
2482
+ color: "#fff",
2483
+ margin: "0 0 8px",
2484
+ lineHeight: 1.25,
2485
+ textShadow: "0 2px 12px rgba(0,0,0,0.4)",
2486
+ animation: "hs-up 0.45s ease",
2487
+ maxWidth: "600px"
2488
+ }
2489
+ },
2490
+ img.title
2491
+ ), /* @__PURE__ */ import_react26.default.createElement(
2492
+ "p",
2493
+ {
2494
+ key: current + "-desc",
2495
+ style: {
2496
+ fontSize: "clamp(13px, 2vw, 15px)",
2497
+ color: "rgba(255,255,255,0.7)",
2498
+ margin: 0,
2499
+ lineHeight: 1.6,
2500
+ textShadow: "0 1px 6px rgba(0,0,0,0.5)",
2501
+ animation: "hs-up 0.5s ease",
2502
+ maxWidth: "500px"
2503
+ }
2504
+ },
2505
+ img.description
2506
+ )), showDots && /* @__PURE__ */ import_react26.default.createElement("div", { style: {
2507
+ position: "absolute",
2508
+ bottom: "20px",
2509
+ left: 0,
2510
+ right: 0,
2511
+ display: "flex",
2512
+ justifyContent: "center",
2513
+ gap: "6px",
2514
+ zIndex: 5
2515
+ } }, images.map((_, i) => /* @__PURE__ */ import_react26.default.createElement(
2516
+ "button",
2517
+ {
2518
+ key: i,
2519
+ onClick: () => go(i),
2520
+ style: {
2521
+ width: i === current ? "24px" : "7px",
2522
+ height: "7px",
2523
+ borderRadius: "4px",
2524
+ border: "none",
2525
+ padding: 0,
2526
+ cursor: "pointer",
2527
+ background: i === current ? accent : "rgba(255,255,255,0.4)",
2528
+ transition: "all 0.3s ease"
2529
+ }
2530
+ }
2531
+ )))));
2532
+ };
2533
+
2534
+ // src/components/PageLoader/PageLoader.jsx
2535
+ var import_react27 = __toESM(require("react"));
2536
+ var PageLoader = ({
2537
+ logo = "VirtualAI",
2538
+ accent = "#6366f1",
2539
+ bg = "",
2540
+ type = "spinner",
2541
+ loadingText = "Loading...",
2542
+ subText = "",
2543
+ duration = 6e3,
2544
+ onComplete = () => {
2545
+ }
2546
+ }) => {
2547
+ const [progress, setProgress] = (0, import_react27.useState)(0);
2548
+ const [done, setDone] = (0, import_react27.useState)(false);
2549
+ const alpha = (hex, op) => {
2550
+ const r = parseInt(hex.slice(1, 3), 16);
2551
+ const g = parseInt(hex.slice(3, 5), 16);
2552
+ const b = parseInt(hex.slice(5, 7), 16);
2553
+ return `rgba(${r},${g},${b},${op})`;
2554
+ };
2555
+ (0, import_react27.useEffect)(() => {
2556
+ const steps = 100;
2557
+ const interval = duration / steps;
2558
+ let current = 0;
2559
+ const timer = setInterval(() => {
2560
+ current += 1;
2561
+ setProgress(current);
2562
+ if (current >= 100) {
2563
+ clearInterval(timer);
2564
+ setTimeout(() => {
2565
+ setDone(true);
2566
+ onComplete();
2567
+ }, 300);
2568
+ }
2569
+ }, interval);
2570
+ return () => clearInterval(timer);
2571
+ }, [duration]);
2572
+ if (done) return null;
2573
+ return /* @__PURE__ */ import_react27.default.createElement(import_react27.default.Fragment, null, /* @__PURE__ */ import_react27.default.createElement("style", null, `
2574
+ @keyframes pl-spin { to { transform: rotate(360deg); } }
2575
+ @keyframes pl-pulse { 0%,100%{transform:scale(1);opacity:1} 50%{transform:scale(1.15);opacity:0.7} }
2576
+ @keyframes pl-dot { 0%,80%,100%{transform:scale(0.6);opacity:0.3} 40%{transform:scale(1);opacity:1} }
2577
+ @keyframes pl-fade { from{opacity:0;transform:translateY(10px)} to{opacity:1;transform:translateY(0)} }
2578
+ @keyframes pl-bar { 0%{background-position:0% 50%} 100%{background-position:200% 50%} }
2579
+ `), /* @__PURE__ */ import_react27.default.createElement("div", { style: {
2580
+ width: "100%",
2581
+ height: "100%",
2582
+ background: bg,
2583
+ display: "flex",
2584
+ flexDirection: "column",
2585
+ alignItems: "center",
2586
+ justifyContent: "center",
2587
+ gap: "28px",
2588
+ fontFamily: "system-ui, -apple-system, sans-serif",
2589
+ animation: "pl-fade 0.3s ease"
2590
+ } }, /* @__PURE__ */ import_react27.default.createElement("div", { style: {
2591
+ position: "absolute",
2592
+ top: "-100px",
2593
+ left: "-100px",
2594
+ width: "400px",
2595
+ height: "400px",
2596
+ borderRadius: "50%",
2597
+ background: `radial-gradient(circle, ${alpha(accent, 0.12)}, transparent 70%)`,
2598
+ filter: "blur(60px)",
2599
+ pointerEvents: "none"
2600
+ } }), /* @__PURE__ */ import_react27.default.createElement("div", { style: {
2601
+ position: "absolute",
2602
+ bottom: "-100px",
2603
+ right: "-100px",
2604
+ width: "350px",
2605
+ height: "350px",
2606
+ borderRadius: "50%",
2607
+ background: `radial-gradient(circle, ${alpha(accent, 0.08)}, transparent 70%)`,
2608
+ filter: "blur(60px)",
2609
+ pointerEvents: "none"
2610
+ } }), /* @__PURE__ */ import_react27.default.createElement("div", { style: { display: "flex", alignItems: "center", gap: "10px", animation: "pl-fade 0.4s ease" } }, /* @__PURE__ */ import_react27.default.createElement("div", { style: {
2611
+ width: "36px",
2612
+ height: "36px",
2613
+ borderRadius: "10px",
2614
+ background: `linear-gradient(135deg, ${accent}, ${alpha(accent, 0.6)})`,
2615
+ display: "flex",
2616
+ alignItems: "center",
2617
+ justifyContent: "center",
2618
+ fontSize: "16px",
2619
+ fontWeight: "800",
2620
+ color: "#fff",
2621
+ animation: type === "pulse" ? `pl-pulse 1.5s ease infinite` : "none"
2622
+ } }, logo[0]), /* @__PURE__ */ import_react27.default.createElement("span", { style: { fontSize: "20px", fontWeight: "800", color: "#fff", letterSpacing: "-0.5px" } }, logo)), type === "spinner" && /* @__PURE__ */ import_react27.default.createElement("div", { style: { position: "relative", width: "56px", height: "56px" } }, /* @__PURE__ */ import_react27.default.createElement("svg", { width: "56", height: "56", viewBox: "0 0 56 56" }, /* @__PURE__ */ import_react27.default.createElement(
2623
+ "circle",
2624
+ {
2625
+ cx: "28",
2626
+ cy: "28",
2627
+ r: "22",
2628
+ fill: "none",
2629
+ stroke: alpha(accent, 0.12),
2630
+ strokeWidth: "4"
2631
+ }
2632
+ ), /* @__PURE__ */ import_react27.default.createElement(
2633
+ "circle",
2634
+ {
2635
+ cx: "28",
2636
+ cy: "28",
2637
+ r: "22",
2638
+ fill: "none",
2639
+ stroke: accent,
2640
+ strokeWidth: "4",
2641
+ strokeLinecap: "round",
2642
+ strokeDasharray: "34.8 104.4",
2643
+ style: { transformOrigin: "center", animation: "pl-spin 0.9s linear infinite" }
2644
+ }
2645
+ )), /* @__PURE__ */ import_react27.default.createElement("span", { style: {
2646
+ position: "absolute",
2647
+ inset: 0,
2648
+ display: "flex",
2649
+ alignItems: "center",
2650
+ justifyContent: "center",
2651
+ fontSize: "11px",
2652
+ fontWeight: "700",
2653
+ color: accent
2654
+ } }, Math.round(progress), "%")), type === "dots" && /* @__PURE__ */ import_react27.default.createElement("div", { style: { display: "flex", gap: "10px", alignItems: "center" } }, [0, 1, 2].map((i) => /* @__PURE__ */ import_react27.default.createElement("div", { key: i, style: {
2655
+ width: "12px",
2656
+ height: "12px",
2657
+ borderRadius: "50%",
2658
+ background: accent,
2659
+ animation: `pl-dot 1.2s ease infinite`,
2660
+ animationDelay: `${i * 0.2}s`
2661
+ } }))), type === "pulse" && /* @__PURE__ */ import_react27.default.createElement("div", { style: { position: "relative", width: "56px", height: "56px" } }, [0, 1].map((i) => /* @__PURE__ */ import_react27.default.createElement("div", { key: i, style: {
2662
+ position: "absolute",
2663
+ inset: 0,
2664
+ borderRadius: "50%",
2665
+ background: alpha(accent, 0.3),
2666
+ animation: `pl-pulse 1.5s ease infinite`,
2667
+ animationDelay: `${i * 0.4}s`
2668
+ } })), /* @__PURE__ */ import_react27.default.createElement("div", { style: {
2669
+ position: "absolute",
2670
+ inset: "30%",
2671
+ borderRadius: "50%",
2672
+ background: accent
2673
+ } })), type === "ring" && /* @__PURE__ */ import_react27.default.createElement("div", { style: {
2674
+ width: "52px",
2675
+ height: "52px",
2676
+ borderRadius: "50%",
2677
+ border: `4px solid ${alpha(accent, 0.15)}`,
2678
+ borderTop: `4px solid ${accent}`,
2679
+ borderRight: `4px solid ${accent}`,
2680
+ animation: "pl-spin 0.9s linear infinite"
2681
+ } }), type === "bar" && /* @__PURE__ */ import_react27.default.createElement("div", { style: { width: "200px", display: "flex", flexDirection: "column", gap: "8px" } }, /* @__PURE__ */ import_react27.default.createElement("div", { style: {
2682
+ width: "100%",
2683
+ height: "4px",
2684
+ background: alpha(accent, 0.15),
2685
+ borderRadius: "2px",
2686
+ overflow: "hidden"
2687
+ } }, /* @__PURE__ */ import_react27.default.createElement("div", { style: {
2688
+ height: "100%",
2689
+ width: `${progress}%`,
2690
+ borderRadius: "2px",
2691
+ background: `linear-gradient(90deg, ${accent}, ${alpha(accent, 0.6)}, ${accent})`,
2692
+ backgroundSize: "200% 100%",
2693
+ animation: "pl-bar 1.2s linear infinite",
2694
+ transition: "width 0.03s linear"
2695
+ } })), /* @__PURE__ */ import_react27.default.createElement("div", { style: {
2696
+ display: "flex",
2697
+ justifyContent: "space-between",
2698
+ fontSize: "11px",
2699
+ color: "rgba(255,255,255,0.3)"
2700
+ } }, /* @__PURE__ */ import_react27.default.createElement("span", null, loadingText), /* @__PURE__ */ import_react27.default.createElement("span", null, Math.round(progress), "%")), subText && /* @__PURE__ */ import_react27.default.createElement("p", { style: { fontSize: "12px", color: "rgba(255,255,255,0.18)", margin: "4px 0 0", textAlign: "center" } }, subText)), type !== "bar" && /* @__PURE__ */ import_react27.default.createElement("div", { style: { textAlign: "center" } }, /* @__PURE__ */ import_react27.default.createElement("p", { style: { fontSize: "13px", color: "rgba(255,255,255,0.3)", margin: "0 0 4px" } }, loadingText), subText && /* @__PURE__ */ import_react27.default.createElement("p", { style: { fontSize: "12px", color: "rgba(255,255,255,0.15)", margin: 0 } }, subText))));
2701
+ };
2268
2702
  // Annotate the CommonJS export names for ESM import in node:
2269
2703
  0 && (module.exports = {
2270
2704
  Avatar,
2271
2705
  AvatarCard,
2706
+ BackgoundImageSlider,
2272
2707
  Charts,
2273
2708
  CodeBlock,
2274
2709
  CustomInputField,
@@ -2282,6 +2717,7 @@ var ImageSlider = ({
2282
2717
  Navbar,
2283
2718
  NotificationToast,
2284
2719
  OtpInput,
2720
+ PageLoader,
2285
2721
  PricingCard,
2286
2722
  ResponsiveNavbar,
2287
2723
  SearchBar,
package/dist/index.mjs CHANGED
@@ -2206,9 +2206,442 @@ var ImageSlider = ({
2206
2206
  }
2207
2207
  ))));
2208
2208
  };
2209
+
2210
+ // src/components/BackgoundImageSlider/BackgoundImageSlider.jsx
2211
+ import React26, { useState as useState19, useEffect as useEffect7, useCallback } from "react";
2212
+ var BackgoundImageSlider = ({
2213
+ images = [
2214
+ {
2215
+ src: "https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=1400&q=80",
2216
+ tag: "Travel",
2217
+ title: "Hidden Peaks of the Himalayas",
2218
+ description: "A breathtaking journey through untouched landscapes and ancient monasteries."
2219
+ },
2220
+ {
2221
+ src: "https://images.unsplash.com/photo-1477959858617-67f85cf4f1df?w=1400&q=80",
2222
+ tag: "Urban",
2223
+ title: "City Lights at Night",
2224
+ description: "Explore the vibrant energy of the world's most iconic skylines after dark."
2225
+ },
2226
+ {
2227
+ src: "https://images.unsplash.com/photo-1500534314209-a25ddb2bd429?w=1400&q=80",
2228
+ tag: "Nature",
2229
+ title: "Tropical Beach Paradise",
2230
+ description: "Crystal clear waters and white sand beaches that feel like the edge of the world."
2231
+ },
2232
+ {
2233
+ src: "https://images.unsplash.com/photo-1519681393784-d120267933ba?w=1400&q=80",
2234
+ tag: "Adventure",
2235
+ title: "Starry Mountain Night",
2236
+ description: "Where silence meets the cosmos \u2014 a night sky like you've never seen before."
2237
+ }
2238
+ ],
2239
+ width = "100%",
2240
+ height = "520px",
2241
+ accent = "#6366f1",
2242
+ radius = "0px",
2243
+ showDots = true,
2244
+ autoPlay = false,
2245
+ autoPlayInterval = 4e3
2246
+ }) => {
2247
+ const [current, setCurrent] = useState19(0);
2248
+ const [animating, setAnimating] = useState19(false);
2249
+ const alpha = (hex, op) => {
2250
+ const r = parseInt(hex.slice(1, 3), 16);
2251
+ const g = parseInt(hex.slice(3, 5), 16);
2252
+ const b = parseInt(hex.slice(5, 7), 16);
2253
+ return `rgba(${r},${g},${b},${op})`;
2254
+ };
2255
+ const go = useCallback((index) => {
2256
+ if (animating) return;
2257
+ setAnimating(true);
2258
+ setCurrent((index + images.length) % images.length);
2259
+ setTimeout(() => setAnimating(false), 400);
2260
+ }, [animating, images.length]);
2261
+ const prev = () => go(current - 1);
2262
+ const next = () => go(current + 1);
2263
+ useEffect7(() => {
2264
+ if (!autoPlay) return;
2265
+ const t = setInterval(() => go(current + 1), autoPlayInterval);
2266
+ return () => clearInterval(t);
2267
+ }, [autoPlay, autoPlayInterval, current, go]);
2268
+ const img = images[current];
2269
+ return /* @__PURE__ */ React26.createElement(React26.Fragment, null, /* @__PURE__ */ React26.createElement("style", null, `
2270
+ @keyframes hs-fade { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: scale(1); } }
2271
+ @keyframes hs-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
2272
+ .hs-prev:hover, .hs-next:hover { background: rgba(0,0,0,0.65) !important; border-color: rgba(255,255,255,0.35) !important; }
2273
+ `), /* @__PURE__ */ React26.createElement("div", { style: {
2274
+ position: "relative",
2275
+ width,
2276
+ height,
2277
+ borderRadius: radius,
2278
+ overflow: "hidden",
2279
+ fontFamily: "system-ui, -apple-system, sans-serif",
2280
+ userSelect: "none"
2281
+ } }, /* @__PURE__ */ React26.createElement(
2282
+ "img",
2283
+ {
2284
+ key: current,
2285
+ src: img.src,
2286
+ alt: img.title,
2287
+ style: {
2288
+ position: "absolute",
2289
+ inset: 0,
2290
+ width: "100%",
2291
+ height: "100%",
2292
+ objectFit: "cover",
2293
+ animation: "hs-fade 0.4s ease"
2294
+ }
2295
+ }
2296
+ ), /* @__PURE__ */ React26.createElement("div", { style: {
2297
+ position: "absolute",
2298
+ inset: 0,
2299
+ background: "linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.1) 100%)"
2300
+ } }), img.tag && /* @__PURE__ */ React26.createElement(
2301
+ "div",
2302
+ {
2303
+ key: current + "-tag",
2304
+ style: {
2305
+ position: "absolute",
2306
+ top: "24px",
2307
+ left: "28px",
2308
+ padding: "5px 14px",
2309
+ borderRadius: "20px",
2310
+ background: alpha(accent, 0.85),
2311
+ fontSize: "11px",
2312
+ fontWeight: "700",
2313
+ color: "#fff",
2314
+ letterSpacing: "0.6px",
2315
+ textTransform: "uppercase",
2316
+ animation: "hs-up 0.4s ease"
2317
+ }
2318
+ },
2319
+ img.tag
2320
+ ), /* @__PURE__ */ React26.createElement("div", { style: {
2321
+ position: "absolute",
2322
+ top: "24px",
2323
+ right: "28px",
2324
+ padding: "5px 12px",
2325
+ borderRadius: "20px",
2326
+ background: "rgba(0,0,0,0.45)",
2327
+ fontSize: "11px",
2328
+ fontWeight: "600",
2329
+ color: "rgba(255,255,255,0.7)"
2330
+ } }, current + 1, " / ", images.length), /* @__PURE__ */ React26.createElement(
2331
+ "button",
2332
+ {
2333
+ className: "hs-prev",
2334
+ onClick: prev,
2335
+ style: {
2336
+ position: "absolute",
2337
+ left: "20px",
2338
+ top: "50%",
2339
+ transform: "translateY(-50%)",
2340
+ width: "44px",
2341
+ height: "44px",
2342
+ borderRadius: "50%",
2343
+ background: "rgba(0,0,0,0.4)",
2344
+ border: "1px solid rgba(255,255,255,0.2)",
2345
+ color: "#fff",
2346
+ cursor: "pointer",
2347
+ display: "flex",
2348
+ alignItems: "center",
2349
+ justifyContent: "center",
2350
+ transition: "all 0.2s",
2351
+ padding: 0,
2352
+ zIndex: 10
2353
+ }
2354
+ },
2355
+ /* @__PURE__ */ React26.createElement(
2356
+ "svg",
2357
+ {
2358
+ width: "18",
2359
+ height: "18",
2360
+ viewBox: "0 0 24 24",
2361
+ fill: "none",
2362
+ stroke: "currentColor",
2363
+ strokeWidth: "2.5",
2364
+ strokeLinecap: "round",
2365
+ strokeLinejoin: "round"
2366
+ },
2367
+ /* @__PURE__ */ React26.createElement("polyline", { points: "15 18 9 12 15 6" })
2368
+ )
2369
+ ), /* @__PURE__ */ React26.createElement(
2370
+ "button",
2371
+ {
2372
+ className: "hs-next",
2373
+ onClick: next,
2374
+ style: {
2375
+ position: "absolute",
2376
+ right: "20px",
2377
+ top: "50%",
2378
+ transform: "translateY(-50%)",
2379
+ width: "44px",
2380
+ height: "44px",
2381
+ borderRadius: "50%",
2382
+ background: "rgba(0,0,0,0.4)",
2383
+ border: "1px solid rgba(255,255,255,0.2)",
2384
+ color: "#fff",
2385
+ cursor: "pointer",
2386
+ display: "flex",
2387
+ alignItems: "center",
2388
+ justifyContent: "center",
2389
+ transition: "all 0.2s",
2390
+ padding: 0,
2391
+ zIndex: 10
2392
+ }
2393
+ },
2394
+ /* @__PURE__ */ React26.createElement(
2395
+ "svg",
2396
+ {
2397
+ width: "18",
2398
+ height: "18",
2399
+ viewBox: "0 0 24 24",
2400
+ fill: "none",
2401
+ stroke: "currentColor",
2402
+ strokeWidth: "2.5",
2403
+ strokeLinecap: "round",
2404
+ strokeLinejoin: "round"
2405
+ },
2406
+ /* @__PURE__ */ React26.createElement("polyline", { points: "9 18 15 12 9 6" })
2407
+ )
2408
+ ), /* @__PURE__ */ React26.createElement("div", { style: {
2409
+ position: "absolute",
2410
+ bottom: showDots ? "56px" : "28px",
2411
+ left: "28px",
2412
+ right: "28px",
2413
+ zIndex: 5
2414
+ } }, /* @__PURE__ */ React26.createElement(
2415
+ "h2",
2416
+ {
2417
+ key: current + "-title",
2418
+ style: {
2419
+ fontSize: "clamp(20px, 4vw, 36px)",
2420
+ fontWeight: "800",
2421
+ color: "#fff",
2422
+ margin: "0 0 8px",
2423
+ lineHeight: 1.25,
2424
+ textShadow: "0 2px 12px rgba(0,0,0,0.4)",
2425
+ animation: "hs-up 0.45s ease",
2426
+ maxWidth: "600px"
2427
+ }
2428
+ },
2429
+ img.title
2430
+ ), /* @__PURE__ */ React26.createElement(
2431
+ "p",
2432
+ {
2433
+ key: current + "-desc",
2434
+ style: {
2435
+ fontSize: "clamp(13px, 2vw, 15px)",
2436
+ color: "rgba(255,255,255,0.7)",
2437
+ margin: 0,
2438
+ lineHeight: 1.6,
2439
+ textShadow: "0 1px 6px rgba(0,0,0,0.5)",
2440
+ animation: "hs-up 0.5s ease",
2441
+ maxWidth: "500px"
2442
+ }
2443
+ },
2444
+ img.description
2445
+ )), showDots && /* @__PURE__ */ React26.createElement("div", { style: {
2446
+ position: "absolute",
2447
+ bottom: "20px",
2448
+ left: 0,
2449
+ right: 0,
2450
+ display: "flex",
2451
+ justifyContent: "center",
2452
+ gap: "6px",
2453
+ zIndex: 5
2454
+ } }, images.map((_, i) => /* @__PURE__ */ React26.createElement(
2455
+ "button",
2456
+ {
2457
+ key: i,
2458
+ onClick: () => go(i),
2459
+ style: {
2460
+ width: i === current ? "24px" : "7px",
2461
+ height: "7px",
2462
+ borderRadius: "4px",
2463
+ border: "none",
2464
+ padding: 0,
2465
+ cursor: "pointer",
2466
+ background: i === current ? accent : "rgba(255,255,255,0.4)",
2467
+ transition: "all 0.3s ease"
2468
+ }
2469
+ }
2470
+ )))));
2471
+ };
2472
+
2473
+ // src/components/PageLoader/PageLoader.jsx
2474
+ import React27, { useState as useState20, useEffect as useEffect8 } from "react";
2475
+ var PageLoader = ({
2476
+ logo = "VirtualAI",
2477
+ accent = "#6366f1",
2478
+ bg = "",
2479
+ type = "spinner",
2480
+ loadingText = "Loading...",
2481
+ subText = "",
2482
+ duration = 6e3,
2483
+ onComplete = () => {
2484
+ }
2485
+ }) => {
2486
+ const [progress, setProgress] = useState20(0);
2487
+ const [done, setDone] = useState20(false);
2488
+ const alpha = (hex, op) => {
2489
+ const r = parseInt(hex.slice(1, 3), 16);
2490
+ const g = parseInt(hex.slice(3, 5), 16);
2491
+ const b = parseInt(hex.slice(5, 7), 16);
2492
+ return `rgba(${r},${g},${b},${op})`;
2493
+ };
2494
+ useEffect8(() => {
2495
+ const steps = 100;
2496
+ const interval = duration / steps;
2497
+ let current = 0;
2498
+ const timer = setInterval(() => {
2499
+ current += 1;
2500
+ setProgress(current);
2501
+ if (current >= 100) {
2502
+ clearInterval(timer);
2503
+ setTimeout(() => {
2504
+ setDone(true);
2505
+ onComplete();
2506
+ }, 300);
2507
+ }
2508
+ }, interval);
2509
+ return () => clearInterval(timer);
2510
+ }, [duration]);
2511
+ if (done) return null;
2512
+ return /* @__PURE__ */ React27.createElement(React27.Fragment, null, /* @__PURE__ */ React27.createElement("style", null, `
2513
+ @keyframes pl-spin { to { transform: rotate(360deg); } }
2514
+ @keyframes pl-pulse { 0%,100%{transform:scale(1);opacity:1} 50%{transform:scale(1.15);opacity:0.7} }
2515
+ @keyframes pl-dot { 0%,80%,100%{transform:scale(0.6);opacity:0.3} 40%{transform:scale(1);opacity:1} }
2516
+ @keyframes pl-fade { from{opacity:0;transform:translateY(10px)} to{opacity:1;transform:translateY(0)} }
2517
+ @keyframes pl-bar { 0%{background-position:0% 50%} 100%{background-position:200% 50%} }
2518
+ `), /* @__PURE__ */ React27.createElement("div", { style: {
2519
+ width: "100%",
2520
+ height: "100%",
2521
+ background: bg,
2522
+ display: "flex",
2523
+ flexDirection: "column",
2524
+ alignItems: "center",
2525
+ justifyContent: "center",
2526
+ gap: "28px",
2527
+ fontFamily: "system-ui, -apple-system, sans-serif",
2528
+ animation: "pl-fade 0.3s ease"
2529
+ } }, /* @__PURE__ */ React27.createElement("div", { style: {
2530
+ position: "absolute",
2531
+ top: "-100px",
2532
+ left: "-100px",
2533
+ width: "400px",
2534
+ height: "400px",
2535
+ borderRadius: "50%",
2536
+ background: `radial-gradient(circle, ${alpha(accent, 0.12)}, transparent 70%)`,
2537
+ filter: "blur(60px)",
2538
+ pointerEvents: "none"
2539
+ } }), /* @__PURE__ */ React27.createElement("div", { style: {
2540
+ position: "absolute",
2541
+ bottom: "-100px",
2542
+ right: "-100px",
2543
+ width: "350px",
2544
+ height: "350px",
2545
+ borderRadius: "50%",
2546
+ background: `radial-gradient(circle, ${alpha(accent, 0.08)}, transparent 70%)`,
2547
+ filter: "blur(60px)",
2548
+ pointerEvents: "none"
2549
+ } }), /* @__PURE__ */ React27.createElement("div", { style: { display: "flex", alignItems: "center", gap: "10px", animation: "pl-fade 0.4s ease" } }, /* @__PURE__ */ React27.createElement("div", { style: {
2550
+ width: "36px",
2551
+ height: "36px",
2552
+ borderRadius: "10px",
2553
+ background: `linear-gradient(135deg, ${accent}, ${alpha(accent, 0.6)})`,
2554
+ display: "flex",
2555
+ alignItems: "center",
2556
+ justifyContent: "center",
2557
+ fontSize: "16px",
2558
+ fontWeight: "800",
2559
+ color: "#fff",
2560
+ animation: type === "pulse" ? `pl-pulse 1.5s ease infinite` : "none"
2561
+ } }, logo[0]), /* @__PURE__ */ React27.createElement("span", { style: { fontSize: "20px", fontWeight: "800", color: "#fff", letterSpacing: "-0.5px" } }, logo)), type === "spinner" && /* @__PURE__ */ React27.createElement("div", { style: { position: "relative", width: "56px", height: "56px" } }, /* @__PURE__ */ React27.createElement("svg", { width: "56", height: "56", viewBox: "0 0 56 56" }, /* @__PURE__ */ React27.createElement(
2562
+ "circle",
2563
+ {
2564
+ cx: "28",
2565
+ cy: "28",
2566
+ r: "22",
2567
+ fill: "none",
2568
+ stroke: alpha(accent, 0.12),
2569
+ strokeWidth: "4"
2570
+ }
2571
+ ), /* @__PURE__ */ React27.createElement(
2572
+ "circle",
2573
+ {
2574
+ cx: "28",
2575
+ cy: "28",
2576
+ r: "22",
2577
+ fill: "none",
2578
+ stroke: accent,
2579
+ strokeWidth: "4",
2580
+ strokeLinecap: "round",
2581
+ strokeDasharray: "34.8 104.4",
2582
+ style: { transformOrigin: "center", animation: "pl-spin 0.9s linear infinite" }
2583
+ }
2584
+ )), /* @__PURE__ */ React27.createElement("span", { style: {
2585
+ position: "absolute",
2586
+ inset: 0,
2587
+ display: "flex",
2588
+ alignItems: "center",
2589
+ justifyContent: "center",
2590
+ fontSize: "11px",
2591
+ fontWeight: "700",
2592
+ color: accent
2593
+ } }, Math.round(progress), "%")), type === "dots" && /* @__PURE__ */ React27.createElement("div", { style: { display: "flex", gap: "10px", alignItems: "center" } }, [0, 1, 2].map((i) => /* @__PURE__ */ React27.createElement("div", { key: i, style: {
2594
+ width: "12px",
2595
+ height: "12px",
2596
+ borderRadius: "50%",
2597
+ background: accent,
2598
+ animation: `pl-dot 1.2s ease infinite`,
2599
+ animationDelay: `${i * 0.2}s`
2600
+ } }))), type === "pulse" && /* @__PURE__ */ React27.createElement("div", { style: { position: "relative", width: "56px", height: "56px" } }, [0, 1].map((i) => /* @__PURE__ */ React27.createElement("div", { key: i, style: {
2601
+ position: "absolute",
2602
+ inset: 0,
2603
+ borderRadius: "50%",
2604
+ background: alpha(accent, 0.3),
2605
+ animation: `pl-pulse 1.5s ease infinite`,
2606
+ animationDelay: `${i * 0.4}s`
2607
+ } })), /* @__PURE__ */ React27.createElement("div", { style: {
2608
+ position: "absolute",
2609
+ inset: "30%",
2610
+ borderRadius: "50%",
2611
+ background: accent
2612
+ } })), type === "ring" && /* @__PURE__ */ React27.createElement("div", { style: {
2613
+ width: "52px",
2614
+ height: "52px",
2615
+ borderRadius: "50%",
2616
+ border: `4px solid ${alpha(accent, 0.15)}`,
2617
+ borderTop: `4px solid ${accent}`,
2618
+ borderRight: `4px solid ${accent}`,
2619
+ animation: "pl-spin 0.9s linear infinite"
2620
+ } }), type === "bar" && /* @__PURE__ */ React27.createElement("div", { style: { width: "200px", display: "flex", flexDirection: "column", gap: "8px" } }, /* @__PURE__ */ React27.createElement("div", { style: {
2621
+ width: "100%",
2622
+ height: "4px",
2623
+ background: alpha(accent, 0.15),
2624
+ borderRadius: "2px",
2625
+ overflow: "hidden"
2626
+ } }, /* @__PURE__ */ React27.createElement("div", { style: {
2627
+ height: "100%",
2628
+ width: `${progress}%`,
2629
+ borderRadius: "2px",
2630
+ background: `linear-gradient(90deg, ${accent}, ${alpha(accent, 0.6)}, ${accent})`,
2631
+ backgroundSize: "200% 100%",
2632
+ animation: "pl-bar 1.2s linear infinite",
2633
+ transition: "width 0.03s linear"
2634
+ } })), /* @__PURE__ */ React27.createElement("div", { style: {
2635
+ display: "flex",
2636
+ justifyContent: "space-between",
2637
+ fontSize: "11px",
2638
+ color: "rgba(255,255,255,0.3)"
2639
+ } }, /* @__PURE__ */ React27.createElement("span", null, loadingText), /* @__PURE__ */ React27.createElement("span", null, Math.round(progress), "%")), subText && /* @__PURE__ */ React27.createElement("p", { style: { fontSize: "12px", color: "rgba(255,255,255,0.18)", margin: "4px 0 0", textAlign: "center" } }, subText)), type !== "bar" && /* @__PURE__ */ React27.createElement("div", { style: { textAlign: "center" } }, /* @__PURE__ */ React27.createElement("p", { style: { fontSize: "13px", color: "rgba(255,255,255,0.3)", margin: "0 0 4px" } }, loadingText), subText && /* @__PURE__ */ React27.createElement("p", { style: { fontSize: "12px", color: "rgba(255,255,255,0.15)", margin: 0 } }, subText))));
2640
+ };
2209
2641
  export {
2210
2642
  Avatar,
2211
2643
  AvatarCard,
2644
+ BackgoundImageSlider,
2212
2645
  Charts,
2213
2646
  CodeBlock,
2214
2647
  CustomInputField,
@@ -2222,6 +2655,7 @@ export {
2222
2655
  Navbar,
2223
2656
  NotificationToast,
2224
2657
  OtpInput,
2658
+ PageLoader,
2225
2659
  PricingCard,
2226
2660
  ResponsiveNavbar,
2227
2661
  SearchBar,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "virtual-ui-lib",
3
- "version": "1.0.65",
3
+ "version": "1.0.67",
4
4
  "description": "Virtual UI React Component Library",
5
5
  "author": "Ankush",
6
6
  "license": "ISC",