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