@deriv-web-design/ui 0.0.7 → 0.0.8
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.css +138 -7
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +19 -3
- package/dist/index.d.ts +19 -3
- package/dist/index.js +194 -265
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +182 -253
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -2304,98 +2304,26 @@ var CTABanner = ({
|
|
|
2304
2304
|
|
|
2305
2305
|
// components/Navbar/Navbar.tsx
|
|
2306
2306
|
var import_react12 = require("react");
|
|
2307
|
-
var import_framer_motion2 = require("framer-motion");
|
|
2308
2307
|
|
|
2309
2308
|
// assets/icon-globe.svg
|
|
2310
2309
|
var icon_globe_default = "./icon-globe-S54WYYEK.svg";
|
|
2311
2310
|
|
|
2312
2311
|
// components/Navbar/Navbar.tsx
|
|
2313
2312
|
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
2314
|
-
var
|
|
2315
|
-
var
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
};
|
|
2319
|
-
var
|
|
2320
|
-
hidden: { y: "-100%" },
|
|
2321
|
-
visible: { y: 0 }
|
|
2322
|
-
};
|
|
2323
|
-
var accordionVariants = {
|
|
2324
|
-
hidden: { height: 0, opacity: 0 },
|
|
2325
|
-
visible: { height: "auto", opacity: 1 }
|
|
2326
|
-
};
|
|
2327
|
-
var ChevronDownIcon3 = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2328
|
-
"svg",
|
|
2329
|
-
{
|
|
2330
|
-
className,
|
|
2331
|
-
width: "14",
|
|
2332
|
-
height: "14",
|
|
2333
|
-
viewBox: "0 0 14 14",
|
|
2334
|
-
fill: "none",
|
|
2335
|
-
"aria-hidden": "true",
|
|
2336
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2337
|
-
"path",
|
|
2338
|
-
{
|
|
2339
|
-
d: "M2.625 4.8125L7 9.1875L11.375 4.8125",
|
|
2340
|
-
stroke: "currentColor",
|
|
2341
|
-
strokeWidth: "1.5",
|
|
2342
|
-
strokeLinecap: "round",
|
|
2343
|
-
strokeLinejoin: "round"
|
|
2344
|
-
}
|
|
2345
|
-
)
|
|
2346
|
-
}
|
|
2347
|
-
);
|
|
2348
|
-
var ArrowRightIcon = () => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2349
|
-
"path",
|
|
2350
|
-
{
|
|
2351
|
-
d: "M2.625 7H11.375M11.375 7L7.875 3.5M11.375 7L7.875 10.5",
|
|
2352
|
-
stroke: "currentColor",
|
|
2353
|
-
strokeWidth: "1.5",
|
|
2354
|
-
strokeLinecap: "round",
|
|
2355
|
-
strokeLinejoin: "round"
|
|
2356
|
-
}
|
|
2357
|
-
) });
|
|
2358
|
-
var ArrowUpRightIcon = () => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2359
|
-
"path",
|
|
2360
|
-
{
|
|
2361
|
-
d: "M4.5 11.5L11.5 4.5M11.5 4.5H5.5M11.5 4.5V10.5",
|
|
2362
|
-
stroke: "currentColor",
|
|
2363
|
-
strokeWidth: "1.5",
|
|
2364
|
-
strokeLinecap: "round",
|
|
2365
|
-
strokeLinejoin: "round"
|
|
2366
|
-
}
|
|
2367
|
-
) });
|
|
2368
|
-
var BarsIcon = () => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2369
|
-
"path",
|
|
2370
|
-
{
|
|
2371
|
-
d: "M2.5 5H17.5M2.5 10H17.5M2.5 15H17.5",
|
|
2372
|
-
stroke: "currentColor",
|
|
2373
|
-
strokeWidth: "1.75",
|
|
2374
|
-
strokeLinecap: "round"
|
|
2375
|
-
}
|
|
2376
|
-
) });
|
|
2377
|
-
var XMarkIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2378
|
-
"path",
|
|
2379
|
-
{
|
|
2380
|
-
d: "M15 5L5 15M5 5L15 15",
|
|
2381
|
-
stroke: "currentColor",
|
|
2382
|
-
strokeWidth: "1.75",
|
|
2383
|
-
strokeLinecap: "round"
|
|
2384
|
-
}
|
|
2385
|
-
) });
|
|
2313
|
+
var ChevronDownIcon3 = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("svg", { className, width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("path", { d: "M2.625 4.8125L7 9.1875L11.375 4.8125", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
2314
|
+
var ArrowRightIcon = () => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("path", { d: "M2.625 7H11.375M11.375 7L7.875 3.5M11.375 7L7.875 10.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
2315
|
+
var ArrowRightSmIcon = () => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("svg", { className: "navbar__lang-option-arrow", width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("path", { d: "M2.5 6H9.5M9.5 6L6.5 3M9.5 6L6.5 9", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
2316
|
+
var ArrowUpRightIcon = () => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("path", { d: "M4.5 11.5L11.5 4.5M11.5 4.5H5.5M11.5 4.5V10.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
2317
|
+
var BarsIcon = () => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("path", { d: "M2.5 5H17.5M2.5 10H17.5M2.5 15H17.5", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round" }) });
|
|
2318
|
+
var XMarkIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("path", { d: "M15 5L5 15M5 5L15 15", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round" }) });
|
|
2386
2319
|
var GlobeIcon = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("img", { src: icon_globe_default, alt: "", "aria-hidden": "true", width: "20", height: "20", className });
|
|
2387
|
-
var DropdownPanel = ({ item, onMouseEnter, onMouseLeave }) => {
|
|
2320
|
+
var DropdownPanel = ({ item, isOpen, onMouseEnter, onMouseLeave }) => {
|
|
2388
2321
|
const { dropdown } = item;
|
|
2389
2322
|
if (!dropdown) return null;
|
|
2390
2323
|
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2391
|
-
|
|
2324
|
+
"div",
|
|
2392
2325
|
{
|
|
2393
|
-
className: "navbar__dropdown",
|
|
2394
|
-
variants: dropdownVariants,
|
|
2395
|
-
initial: "hidden",
|
|
2396
|
-
animate: "visible",
|
|
2397
|
-
exit: "hidden",
|
|
2398
|
-
transition: { duration: 0.18, ease: EASE_OUT_EXPO },
|
|
2326
|
+
className: ["navbar__dropdown", isOpen ? "navbar__dropdown--open" : ""].filter(Boolean).join(" "),
|
|
2399
2327
|
onMouseEnter,
|
|
2400
2328
|
onMouseLeave,
|
|
2401
2329
|
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "navbar__dropdown-inner", children: [
|
|
@@ -2427,32 +2355,17 @@ var FeatureCard = ({ feature, mobile }) => /* @__PURE__ */ (0, import_jsx_runtim
|
|
|
2427
2355
|
className: mobile ? "navbar__drawer-feature" : "navbar__dropdown-feature",
|
|
2428
2356
|
style: feature.backgroundImageUrl ? { backgroundImage: `url(${feature.backgroundImageUrl})` } : void 0,
|
|
2429
2357
|
children: [
|
|
2430
|
-
feature.backgroundImageUrl && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2431
|
-
"img",
|
|
2432
|
-
{
|
|
2433
|
-
src: feature.backgroundImageUrl,
|
|
2434
|
-
alt: "",
|
|
2435
|
-
className: mobile ? "navbar__drawer-feature-img" : "navbar__dropdown-feature-img",
|
|
2436
|
-
"aria-hidden": "true"
|
|
2437
|
-
}
|
|
2438
|
-
),
|
|
2358
|
+
feature.backgroundImageUrl && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("img", { src: feature.backgroundImageUrl, alt: "", className: mobile ? "navbar__drawer-feature-img" : "navbar__dropdown-feature-img", "aria-hidden": "true" }),
|
|
2439
2359
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: mobile ? "navbar__drawer-feature-overlay" : "navbar__dropdown-feature-overlay", "aria-hidden": "true" }),
|
|
2440
2360
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: mobile ? "navbar__drawer-feature-content" : "navbar__dropdown-feature-content", children: [
|
|
2441
2361
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { children: [
|
|
2442
2362
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: mobile ? "navbar__drawer-feature-title" : "navbar__dropdown-feature-title", children: feature.title }),
|
|
2443
2363
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: mobile ? "navbar__drawer-feature-desc" : "navbar__dropdown-feature-desc", children: feature.description })
|
|
2444
2364
|
] }),
|
|
2445
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
2446
|
-
|
|
2447
|
-
{
|
|
2448
|
-
|
|
2449
|
-
className: mobile ? "navbar__drawer-feature-cta" : "navbar__dropdown-feature-cta",
|
|
2450
|
-
children: [
|
|
2451
|
-
feature.ctaLabel,
|
|
2452
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ArrowRightIcon, {})
|
|
2453
|
-
]
|
|
2454
|
-
}
|
|
2455
|
-
)
|
|
2365
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("a", { href: feature.ctaHref, className: mobile ? "navbar__drawer-feature-cta" : "navbar__dropdown-feature-cta", children: [
|
|
2366
|
+
feature.ctaLabel,
|
|
2367
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ArrowRightIcon, {})
|
|
2368
|
+
] })
|
|
2456
2369
|
] })
|
|
2457
2370
|
]
|
|
2458
2371
|
}
|
|
@@ -2463,7 +2376,7 @@ var DrawerAccordion = ({ item, isOpen, onToggle }) => {
|
|
|
2463
2376
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
2464
2377
|
"button",
|
|
2465
2378
|
{
|
|
2466
|
-
className:
|
|
2379
|
+
className: ["navbar__drawer-trigger", isOpen ? "navbar__drawer-trigger--open" : ""].filter(Boolean).join(" "),
|
|
2467
2380
|
onClick: onToggle,
|
|
2468
2381
|
"aria-expanded": isOpen,
|
|
2469
2382
|
children: [
|
|
@@ -2472,34 +2385,23 @@ var DrawerAccordion = ({ item, isOpen, onToggle }) => {
|
|
|
2472
2385
|
]
|
|
2473
2386
|
}
|
|
2474
2387
|
),
|
|
2475
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
className: "navbar__drawer-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
target: link.external ? "_blank" : void 0,
|
|
2493
|
-
rel: link.external ? "noopener noreferrer" : void 0,
|
|
2494
|
-
children: link.label
|
|
2495
|
-
},
|
|
2496
|
-
link.href
|
|
2497
|
-
)) })
|
|
2498
|
-
] }, section.title)) }, colIdx)) }),
|
|
2499
|
-
dropdown.feature && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(FeatureCard, { feature: dropdown.feature, mobile: true })
|
|
2500
|
-
] })
|
|
2501
|
-
}
|
|
2502
|
-
) })
|
|
2388
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: ["navbar__drawer-panel", isOpen ? "navbar__drawer-panel--open" : ""].filter(Boolean).join(" "), children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "navbar__drawer-panel-inner", children: [
|
|
2389
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "navbar__drawer-panel-cols", children: dropdown?.columns.map((col, colIdx) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "navbar__drawer-panel-col", children: col.sections.map((section) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "navbar__drawer-col-section", children: [
|
|
2390
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "navbar__drawer-col-title", children: section.title }),
|
|
2391
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "navbar__drawer-col-links", children: section.items.map((link) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2392
|
+
"a",
|
|
2393
|
+
{
|
|
2394
|
+
href: link.href,
|
|
2395
|
+
className: "navbar__drawer-link",
|
|
2396
|
+
target: link.external ? "_blank" : void 0,
|
|
2397
|
+
rel: link.external ? "noopener noreferrer" : void 0,
|
|
2398
|
+
children: link.label
|
|
2399
|
+
},
|
|
2400
|
+
link.href
|
|
2401
|
+
)) })
|
|
2402
|
+
] }, section.title)) }, colIdx)) }),
|
|
2403
|
+
dropdown?.feature && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(FeatureCard, { feature: dropdown.feature, mobile: true })
|
|
2404
|
+
] }) })
|
|
2503
2405
|
] });
|
|
2504
2406
|
};
|
|
2505
2407
|
var Navbar = ({
|
|
@@ -2512,6 +2414,7 @@ var Navbar = ({
|
|
|
2512
2414
|
loginHref,
|
|
2513
2415
|
ctaLabel = "Open account",
|
|
2514
2416
|
ctaHref,
|
|
2417
|
+
languages,
|
|
2515
2418
|
languageLabel,
|
|
2516
2419
|
onLanguageClick,
|
|
2517
2420
|
className,
|
|
@@ -2521,9 +2424,15 @@ var Navbar = ({
|
|
|
2521
2424
|
const [mobileOpen, setMobileOpen] = (0, import_react12.useState)(false);
|
|
2522
2425
|
const [mobileExpanded, setMobileExpanded] = (0, import_react12.useState)(null);
|
|
2523
2426
|
const [scrolled, setScrolled] = (0, import_react12.useState)(false);
|
|
2427
|
+
const [langOpen, setLangOpen] = (0, import_react12.useState)(false);
|
|
2428
|
+
const [mobileLangOpen, setMobileLangOpen] = (0, import_react12.useState)(false);
|
|
2524
2429
|
const hoverTimeoutRef = (0, import_react12.useRef)(null);
|
|
2430
|
+
const langTimeoutRef = (0, import_react12.useRef)(null);
|
|
2525
2431
|
const pillAreaRef = (0, import_react12.useRef)(null);
|
|
2432
|
+
const langWrapperRef = (0, import_react12.useRef)(null);
|
|
2526
2433
|
const resolvedLogo = theme === "light" ? logoSrcDark ?? logoSrc : logoSrc;
|
|
2434
|
+
const activeLanguage = languages?.find((l) => l.active);
|
|
2435
|
+
const displayLabel = activeLanguage?.code ?? languageLabel;
|
|
2527
2436
|
(0, import_react12.useEffect)(() => {
|
|
2528
2437
|
const onScroll = () => setScrolled(window.scrollY > 0);
|
|
2529
2438
|
window.addEventListener("scroll", onScroll, { passive: true });
|
|
@@ -2534,6 +2443,7 @@ var Navbar = ({
|
|
|
2534
2443
|
if (e.key === "Escape") {
|
|
2535
2444
|
setOpenDropdown(null);
|
|
2536
2445
|
setMobileOpen(false);
|
|
2446
|
+
setLangOpen(false);
|
|
2537
2447
|
}
|
|
2538
2448
|
};
|
|
2539
2449
|
document.addEventListener("keydown", onKey);
|
|
@@ -2555,6 +2465,16 @@ var Navbar = ({
|
|
|
2555
2465
|
document.addEventListener("pointerdown", onPointerDown);
|
|
2556
2466
|
return () => document.removeEventListener("pointerdown", onPointerDown);
|
|
2557
2467
|
}, [openDropdown]);
|
|
2468
|
+
(0, import_react12.useEffect)(() => {
|
|
2469
|
+
if (!langOpen) return;
|
|
2470
|
+
const onPointerDown = (e) => {
|
|
2471
|
+
if (langWrapperRef.current && !langWrapperRef.current.contains(e.target)) {
|
|
2472
|
+
setLangOpen(false);
|
|
2473
|
+
}
|
|
2474
|
+
};
|
|
2475
|
+
document.addEventListener("pointerdown", onPointerDown);
|
|
2476
|
+
return () => document.removeEventListener("pointerdown", onPointerDown);
|
|
2477
|
+
}, [langOpen]);
|
|
2558
2478
|
const clearHoverTimeout = (0, import_react12.useCallback)(() => {
|
|
2559
2479
|
if (hoverTimeoutRef.current) {
|
|
2560
2480
|
clearTimeout(hoverTimeoutRef.current);
|
|
@@ -2569,7 +2489,11 @@ var Navbar = ({
|
|
|
2569
2489
|
clearHoverTimeout();
|
|
2570
2490
|
hoverTimeoutRef.current = setTimeout(() => setOpenDropdown(null), 120);
|
|
2571
2491
|
}, [clearHoverTimeout]);
|
|
2572
|
-
const
|
|
2492
|
+
const handleLangSelect = (0, import_react12.useCallback)((lang) => {
|
|
2493
|
+
lang.onClick();
|
|
2494
|
+
setLangOpen(false);
|
|
2495
|
+
setMobileLangOpen(false);
|
|
2496
|
+
}, []);
|
|
2573
2497
|
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
2574
2498
|
"nav",
|
|
2575
2499
|
{
|
|
@@ -2583,29 +2507,16 @@ var Navbar = ({
|
|
|
2583
2507
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "navbar__nav-group", children: [
|
|
2584
2508
|
navItems.map((item) => {
|
|
2585
2509
|
if (item.external) {
|
|
2586
|
-
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
2587
|
-
|
|
2588
|
-
{
|
|
2589
|
-
|
|
2590
|
-
className: "navbar__nav-item",
|
|
2591
|
-
target: "_blank",
|
|
2592
|
-
rel: "noopener noreferrer",
|
|
2593
|
-
children: [
|
|
2594
|
-
item.label,
|
|
2595
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ArrowUpRightIcon, {})
|
|
2596
|
-
]
|
|
2597
|
-
},
|
|
2598
|
-
item.label
|
|
2599
|
-
);
|
|
2510
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("a", { href: item.href, className: "navbar__nav-item", target: "_blank", rel: "noopener noreferrer", children: [
|
|
2511
|
+
item.label,
|
|
2512
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ArrowUpRightIcon, {})
|
|
2513
|
+
] }, item.label);
|
|
2600
2514
|
}
|
|
2601
2515
|
if (item.dropdown) {
|
|
2602
2516
|
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
2603
2517
|
"button",
|
|
2604
2518
|
{
|
|
2605
|
-
className: [
|
|
2606
|
-
"navbar__nav-item",
|
|
2607
|
-
openDropdown === item.label ? "navbar__nav-item--open" : ""
|
|
2608
|
-
].filter(Boolean).join(" "),
|
|
2519
|
+
className: ["navbar__nav-item", openDropdown === item.label ? "navbar__nav-item--open" : ""].filter(Boolean).join(" "),
|
|
2609
2520
|
onMouseEnter: () => handleNavEnter(item.label),
|
|
2610
2521
|
onMouseLeave: handleNavLeave,
|
|
2611
2522
|
"aria-expanded": openDropdown === item.label,
|
|
@@ -2620,45 +2531,74 @@ var Navbar = ({
|
|
|
2620
2531
|
}
|
|
2621
2532
|
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("a", { href: item.href, className: "navbar__nav-item", children: item.label }, item.label);
|
|
2622
2533
|
}),
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2534
|
+
displayLabel && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
2535
|
+
"div",
|
|
2536
|
+
{
|
|
2537
|
+
className: "navbar__lang-wrapper",
|
|
2538
|
+
ref: langWrapperRef,
|
|
2539
|
+
onMouseEnter: () => {
|
|
2540
|
+
if (langTimeoutRef.current) clearTimeout(langTimeoutRef.current);
|
|
2541
|
+
if (languages && languages.length > 0) setLangOpen(true);
|
|
2542
|
+
},
|
|
2543
|
+
onMouseLeave: () => {
|
|
2544
|
+
langTimeoutRef.current = setTimeout(() => setLangOpen(false), 150);
|
|
2545
|
+
},
|
|
2546
|
+
children: [
|
|
2547
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
2548
|
+
"button",
|
|
2549
|
+
{
|
|
2550
|
+
className: ["navbar__nav-item", "navbar__lang-btn", langOpen ? "navbar__nav-item--open" : ""].filter(Boolean).join(" "),
|
|
2551
|
+
onClick: () => {
|
|
2552
|
+
if (!languages || languages.length === 0) onLanguageClick?.();
|
|
2553
|
+
},
|
|
2554
|
+
"aria-expanded": languages ? langOpen : void 0,
|
|
2555
|
+
"aria-haspopup": languages ? "listbox" : void 0,
|
|
2556
|
+
children: [
|
|
2557
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(GlobeIcon, { className: "navbar__lang-globe" }),
|
|
2558
|
+
displayLabel,
|
|
2559
|
+
languages && languages.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ChevronDownIcon3, { className: "navbar__nav-item__chevron" })
|
|
2560
|
+
]
|
|
2561
|
+
}
|
|
2562
|
+
),
|
|
2563
|
+
languages && languages.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: ["navbar__lang-dropdown", langOpen ? "navbar__lang-dropdown--open" : ""].filter(Boolean).join(" "), role: "listbox", children: languages.map((lang) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
2564
|
+
"button",
|
|
2565
|
+
{
|
|
2566
|
+
className: ["navbar__lang-option", lang.active ? "navbar__lang-option--active" : ""].filter(Boolean).join(" "),
|
|
2567
|
+
onClick: () => handleLangSelect(lang),
|
|
2568
|
+
role: "option",
|
|
2569
|
+
"aria-selected": lang.active,
|
|
2570
|
+
children: [
|
|
2571
|
+
lang.label,
|
|
2572
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ArrowRightSmIcon, {})
|
|
2573
|
+
]
|
|
2574
|
+
},
|
|
2575
|
+
lang.code
|
|
2576
|
+
)) })
|
|
2577
|
+
]
|
|
2578
|
+
}
|
|
2579
|
+
)
|
|
2627
2580
|
] }),
|
|
2628
2581
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "navbar__pill-actions", children: [
|
|
2629
2582
|
loginHref && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("a", { href: loginHref, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Button, { colorScheme: "black", variant: "secondary", label: loginLabel }) }),
|
|
2630
2583
|
ctaHref && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("a", { href: ctaHref, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Button, { colorScheme: "coral", variant: "primary", label: ctaLabel }) })
|
|
2631
2584
|
] })
|
|
2632
2585
|
] }) }),
|
|
2633
|
-
|
|
2586
|
+
navItems.map((item) => item.dropdown ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2634
2587
|
DropdownPanel,
|
|
2635
2588
|
{
|
|
2636
|
-
item
|
|
2589
|
+
item,
|
|
2590
|
+
isOpen: openDropdown === item.label,
|
|
2637
2591
|
onMouseEnter: clearHoverTimeout,
|
|
2638
2592
|
onMouseLeave: handleNavLeave
|
|
2639
2593
|
},
|
|
2640
|
-
|
|
2641
|
-
)
|
|
2594
|
+
item.label
|
|
2595
|
+
) : null),
|
|
2642
2596
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "navbar__actions", children: [
|
|
2643
|
-
loginHref && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("a", { href: loginHref, className: "navbar__actions-login", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2644
|
-
Button,
|
|
2645
|
-
{
|
|
2646
|
-
colorScheme: theme === "dark" ? "white" : "black",
|
|
2647
|
-
variant: "secondary",
|
|
2648
|
-
label: loginLabel
|
|
2649
|
-
}
|
|
2650
|
-
) }),
|
|
2597
|
+
loginHref && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("a", { href: loginHref, className: "navbar__actions-login", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Button, { colorScheme: theme === "dark" ? "white" : "black", variant: "secondary", label: loginLabel }) }),
|
|
2651
2598
|
ctaHref && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("a", { href: ctaHref, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Button, { colorScheme: "coral", variant: "primary", label: ctaLabel }) })
|
|
2652
2599
|
] }),
|
|
2653
2600
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "navbar__mobile-actions", children: [
|
|
2654
|
-
loginHref && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("a", { href: loginHref, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2655
|
-
Button,
|
|
2656
|
-
{
|
|
2657
|
-
colorScheme: scrolled || theme === "light" ? "black" : "white",
|
|
2658
|
-
variant: "secondary",
|
|
2659
|
-
label: loginLabel
|
|
2660
|
-
}
|
|
2661
|
-
) }),
|
|
2601
|
+
loginHref && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("a", { href: loginHref, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Button, { colorScheme: scrolled || theme === "light" ? "black" : "white", variant: "secondary", label: loginLabel }) }),
|
|
2662
2602
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2663
2603
|
"button",
|
|
2664
2604
|
{
|
|
@@ -2670,77 +2610,66 @@ var Navbar = ({
|
|
|
2670
2610
|
)
|
|
2671
2611
|
] })
|
|
2672
2612
|
] }),
|
|
2673
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "navbar__drawer-clip", children: /* @__PURE__ */ (0, import_jsx_runtime23.
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
animate: "visible",
|
|
2680
|
-
exit: "hidden",
|
|
2681
|
-
transition: { duration: 0.3, ease: EASE_OUT_EXPO },
|
|
2682
|
-
"aria-modal": "true",
|
|
2683
|
-
role: "dialog",
|
|
2684
|
-
"aria-label": "Navigation menu",
|
|
2685
|
-
children: [
|
|
2686
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("nav", { className: "navbar__drawer-nav", children: [
|
|
2687
|
-
navItems.map((item) => {
|
|
2688
|
-
if (item.dropdown) {
|
|
2689
|
-
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2690
|
-
DrawerAccordion,
|
|
2691
|
-
{
|
|
2692
|
-
item,
|
|
2693
|
-
isOpen: mobileExpanded === item.label,
|
|
2694
|
-
onToggle: () => setMobileExpanded(
|
|
2695
|
-
(prev) => prev === item.label ? null : item.label
|
|
2696
|
-
)
|
|
2697
|
-
},
|
|
2698
|
-
item.label
|
|
2699
|
-
);
|
|
2700
|
-
}
|
|
2701
|
-
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
2702
|
-
"a",
|
|
2703
|
-
{
|
|
2704
|
-
href: item.href,
|
|
2705
|
-
className: "navbar__drawer-single",
|
|
2706
|
-
target: item.external ? "_blank" : void 0,
|
|
2707
|
-
rel: item.external ? "noopener noreferrer" : void 0,
|
|
2708
|
-
children: [
|
|
2709
|
-
item.label,
|
|
2710
|
-
item.external && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ArrowUpRightIcon, {})
|
|
2711
|
-
]
|
|
2712
|
-
},
|
|
2713
|
-
item.label
|
|
2714
|
-
);
|
|
2715
|
-
}),
|
|
2716
|
-
languageLabel && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("button", { className: "navbar__drawer-lang", onClick: onLanguageClick, children: [
|
|
2717
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(GlobeIcon, { className: "navbar__lang-globe" }),
|
|
2718
|
-
languageLabel
|
|
2719
|
-
] })
|
|
2720
|
-
] }),
|
|
2721
|
-
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "navbar__drawer-footer", children: [
|
|
2722
|
-
loginHref && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("a", { href: loginHref, style: { display: "block" }, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2723
|
-
Button,
|
|
2724
|
-
{
|
|
2725
|
-
colorScheme: "black",
|
|
2726
|
-
variant: "secondary",
|
|
2727
|
-
label: loginLabel,
|
|
2728
|
-
fullWidth: true
|
|
2729
|
-
}
|
|
2730
|
-
) }),
|
|
2731
|
-
ctaHref && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("a", { href: ctaHref, style: { display: "block" }, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2732
|
-
Button,
|
|
2613
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "navbar__drawer-clip", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: ["navbar__drawer", mobileOpen ? "navbar__drawer--open" : ""].filter(Boolean).join(" "), "aria-modal": "true", role: "dialog", "aria-label": "Navigation menu", children: [
|
|
2614
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("nav", { className: "navbar__drawer-nav", children: [
|
|
2615
|
+
navItems.map((item) => {
|
|
2616
|
+
if (item.dropdown) {
|
|
2617
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2618
|
+
DrawerAccordion,
|
|
2733
2619
|
{
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
label:
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
)
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2620
|
+
item,
|
|
2621
|
+
isOpen: mobileExpanded === item.label,
|
|
2622
|
+
onToggle: () => setMobileExpanded((prev) => prev === item.label ? null : item.label)
|
|
2623
|
+
},
|
|
2624
|
+
item.label
|
|
2625
|
+
);
|
|
2626
|
+
}
|
|
2627
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("a", { href: item.href, className: "navbar__drawer-single", target: item.external ? "_blank" : void 0, rel: item.external ? "noopener noreferrer" : void 0, children: [
|
|
2628
|
+
item.label,
|
|
2629
|
+
item.external && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ArrowUpRightIcon, {})
|
|
2630
|
+
] }, item.label);
|
|
2631
|
+
}),
|
|
2632
|
+
displayLabel && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "navbar__drawer-item", children: [
|
|
2633
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
2634
|
+
"button",
|
|
2635
|
+
{
|
|
2636
|
+
className: ["navbar__drawer-trigger", mobileLangOpen ? "navbar__drawer-trigger--open" : ""].filter(Boolean).join(" "),
|
|
2637
|
+
onClick: () => {
|
|
2638
|
+
if (languages && languages.length > 0) {
|
|
2639
|
+
setMobileLangOpen((o) => !o);
|
|
2640
|
+
} else {
|
|
2641
|
+
onLanguageClick?.();
|
|
2642
|
+
}
|
|
2643
|
+
},
|
|
2644
|
+
"aria-expanded": languages ? mobileLangOpen : void 0,
|
|
2645
|
+
children: [
|
|
2646
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("span", { className: "navbar__drawer-lang-label", children: [
|
|
2647
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(GlobeIcon, { className: "navbar__lang-globe navbar__lang-globe--dark" }),
|
|
2648
|
+
displayLabel
|
|
2649
|
+
] }),
|
|
2650
|
+
languages && languages.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ChevronDownIcon3, { className: "navbar__drawer-trigger__chevron" })
|
|
2651
|
+
]
|
|
2652
|
+
}
|
|
2653
|
+
),
|
|
2654
|
+
languages && languages.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: ["navbar__drawer-lang-grid", mobileLangOpen ? "navbar__drawer-lang-grid--open" : ""].filter(Boolean).join(" "), children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "navbar__drawer-lang-grid-inner", children: languages.map((lang) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
2655
|
+
"button",
|
|
2656
|
+
{
|
|
2657
|
+
className: ["navbar__drawer-lang-option", lang.active ? "navbar__drawer-lang-option--active" : ""].filter(Boolean).join(" "),
|
|
2658
|
+
onClick: () => handleLangSelect(lang),
|
|
2659
|
+
children: [
|
|
2660
|
+
lang.label,
|
|
2661
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ArrowRightSmIcon, {})
|
|
2662
|
+
]
|
|
2663
|
+
},
|
|
2664
|
+
lang.code
|
|
2665
|
+
)) }) })
|
|
2666
|
+
] })
|
|
2667
|
+
] }),
|
|
2668
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "navbar__drawer-footer", children: [
|
|
2669
|
+
loginHref && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("a", { href: loginHref, style: { display: "block" }, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Button, { colorScheme: "black", variant: "secondary", label: loginLabel, fullWidth: true }) }),
|
|
2670
|
+
ctaHref && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("a", { href: ctaHref, style: { display: "block" }, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Button, { colorScheme: "coral", variant: "primary", label: ctaLabel, fullWidth: true }) })
|
|
2671
|
+
] })
|
|
2672
|
+
] }) })
|
|
2744
2673
|
]
|
|
2745
2674
|
}
|
|
2746
2675
|
);
|
|
@@ -2748,7 +2677,7 @@ var Navbar = ({
|
|
|
2748
2677
|
|
|
2749
2678
|
// templates/DayNightTransition/DayNightTransition.tsx
|
|
2750
2679
|
var import_react13 = require("react");
|
|
2751
|
-
var
|
|
2680
|
+
var import_framer_motion2 = require("framer-motion");
|
|
2752
2681
|
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
2753
2682
|
var SPRING2 = { stiffness: 80, damping: 30, restDelta: 1e-3 };
|
|
2754
2683
|
var FADE_START = 0.35;
|
|
@@ -2770,16 +2699,16 @@ var DayNightTransition = ({
|
|
|
2770
2699
|
...props
|
|
2771
2700
|
}) => {
|
|
2772
2701
|
const wrapperRef = (0, import_react13.useRef)(null);
|
|
2773
|
-
const { scrollYProgress } = (0,
|
|
2702
|
+
const { scrollYProgress } = (0, import_framer_motion2.useScroll)({
|
|
2774
2703
|
target: wrapperRef,
|
|
2775
2704
|
offset: ["start end", "end start"]
|
|
2776
2705
|
});
|
|
2777
|
-
const smooth = (0,
|
|
2778
|
-
const nightOpacity = (0,
|
|
2779
|
-
const channel = (0,
|
|
2780
|
-
const textColor =
|
|
2781
|
-
const dayOpacity = (0,
|
|
2782
|
-
const nightOpacity2 = (0,
|
|
2706
|
+
const smooth = (0, import_framer_motion2.useSpring)(scrollYProgress, SPRING2);
|
|
2707
|
+
const nightOpacity = (0, import_framer_motion2.useTransform)(smooth, [FADE_START, FADE_END], [0, 1]);
|
|
2708
|
+
const channel = (0, import_framer_motion2.useTransform)(smooth, [FADE_START, FADE_END], [TEXT_CHANNEL_DAY, TEXT_CHANNEL_NIGHT]);
|
|
2709
|
+
const textColor = import_framer_motion2.useMotionTemplate`rgb(${channel}, ${channel}, ${channel})`;
|
|
2710
|
+
const dayOpacity = (0, import_framer_motion2.useTransform)(smooth, [WORD_START, WORD_END], [1, 0]);
|
|
2711
|
+
const nightOpacity2 = (0, import_framer_motion2.useTransform)(smooth, [WORD_START, WORD_END], [0, 1]);
|
|
2783
2712
|
const hasDescription = Boolean(dayDescription || nightDescription);
|
|
2784
2713
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2785
2714
|
"div",
|
|
@@ -2799,7 +2728,7 @@ var DayNightTransition = ({
|
|
|
2799
2728
|
}
|
|
2800
2729
|
),
|
|
2801
2730
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2802
|
-
|
|
2731
|
+
import_framer_motion2.motion.img,
|
|
2803
2732
|
{
|
|
2804
2733
|
className: "dnt__bg dnt__bg--night",
|
|
2805
2734
|
src: nightImageUrl,
|
|
@@ -2810,14 +2739,14 @@ var DayNightTransition = ({
|
|
|
2810
2739
|
}
|
|
2811
2740
|
),
|
|
2812
2741
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "dnt__content", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
2813
|
-
|
|
2742
|
+
import_framer_motion2.motion.div,
|
|
2814
2743
|
{
|
|
2815
2744
|
className: "dnt__text-wrap",
|
|
2816
2745
|
style: { color: textColor },
|
|
2817
2746
|
children: [
|
|
2818
2747
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "dnt__crossfade-wrap", children: [
|
|
2819
2748
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2820
|
-
|
|
2749
|
+
import_framer_motion2.motion.h2,
|
|
2821
2750
|
{
|
|
2822
2751
|
className: "dnt__headline",
|
|
2823
2752
|
style: { opacity: dayOpacity },
|
|
@@ -2825,7 +2754,7 @@ var DayNightTransition = ({
|
|
|
2825
2754
|
}
|
|
2826
2755
|
),
|
|
2827
2756
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2828
|
-
|
|
2757
|
+
import_framer_motion2.motion.h2,
|
|
2829
2758
|
{
|
|
2830
2759
|
className: "dnt__headline",
|
|
2831
2760
|
"aria-hidden": "true",
|
|
@@ -2836,7 +2765,7 @@ var DayNightTransition = ({
|
|
|
2836
2765
|
] }),
|
|
2837
2766
|
hasDescription && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "dnt__crossfade-wrap", children: [
|
|
2838
2767
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2839
|
-
|
|
2768
|
+
import_framer_motion2.motion.p,
|
|
2840
2769
|
{
|
|
2841
2770
|
className: "dnt__description",
|
|
2842
2771
|
style: { opacity: dayOpacity },
|
|
@@ -2844,7 +2773,7 @@ var DayNightTransition = ({
|
|
|
2844
2773
|
}
|
|
2845
2774
|
),
|
|
2846
2775
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2847
|
-
|
|
2776
|
+
import_framer_motion2.motion.p,
|
|
2848
2777
|
{
|
|
2849
2778
|
className: "dnt__description",
|
|
2850
2779
|
"aria-hidden": "true",
|
|
@@ -2864,7 +2793,7 @@ var DayNightTransition = ({
|
|
|
2864
2793
|
|
|
2865
2794
|
// templates/PaymentMethods/PaymentMethods.tsx
|
|
2866
2795
|
var import_react14 = require("react");
|
|
2867
|
-
var
|
|
2796
|
+
var import_framer_motion3 = require("framer-motion");
|
|
2868
2797
|
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
2869
2798
|
function modWrap(min, max, v) {
|
|
2870
2799
|
const range = max - min;
|
|
@@ -2918,13 +2847,13 @@ var PaymentMethods = ({
|
|
|
2918
2847
|
className,
|
|
2919
2848
|
...props
|
|
2920
2849
|
}) => {
|
|
2921
|
-
const { scrollY } = (0,
|
|
2922
|
-
const scrollVelocity = (0,
|
|
2923
|
-
const col1Y = (0,
|
|
2924
|
-
const col2Y = (0,
|
|
2850
|
+
const { scrollY } = (0, import_framer_motion3.useScroll)();
|
|
2851
|
+
const scrollVelocity = (0, import_framer_motion3.useVelocity)(scrollY);
|
|
2852
|
+
const col1Y = (0, import_framer_motion3.useMotionValue)(0);
|
|
2853
|
+
const col2Y = (0, import_framer_motion3.useMotionValue)(0);
|
|
2925
2854
|
const col1Ref = (0, import_react14.useRef)(null);
|
|
2926
2855
|
const col2Ref = (0, import_react14.useRef)(null);
|
|
2927
|
-
(0,
|
|
2856
|
+
(0, import_framer_motion3.useAnimationFrame)((_, delta) => {
|
|
2928
2857
|
const raw = scrollVelocity.get();
|
|
2929
2858
|
if (Math.abs(raw) < DEADZONE) return;
|
|
2930
2859
|
const clamped = Math.sign(raw) * Math.min(Math.abs(raw), MAX_SCROLL_V);
|
|
@@ -2945,7 +2874,7 @@ var PaymentMethods = ({
|
|
|
2945
2874
|
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "pm__media", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "pm__carousel", children: [
|
|
2946
2875
|
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "pm__fade pm__fade--top", "aria-hidden": "true" }),
|
|
2947
2876
|
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2948
|
-
|
|
2877
|
+
import_framer_motion3.motion.div,
|
|
2949
2878
|
{
|
|
2950
2879
|
ref: col1Ref,
|
|
2951
2880
|
className: "pm__col",
|
|
@@ -2962,7 +2891,7 @@ var PaymentMethods = ({
|
|
|
2962
2891
|
}
|
|
2963
2892
|
),
|
|
2964
2893
|
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2965
|
-
|
|
2894
|
+
import_framer_motion3.motion.div,
|
|
2966
2895
|
{
|
|
2967
2896
|
ref: col2Ref,
|
|
2968
2897
|
className: "pm__col",
|