@deriv-web-design/ui 0.0.6 → 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 +150 -17
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +24 -4
- package/dist/index.d.ts +24 -4
- package/dist/index.js +198 -273
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +186 -261
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -2257,104 +2257,32 @@ var CTABanner = ({
|
|
|
2257
2257
|
|
|
2258
2258
|
// components/Navbar/Navbar.tsx
|
|
2259
2259
|
import { useRef as useRef7, useState as useState8, useEffect as useEffect6, useCallback as useCallback2 } from "react";
|
|
2260
|
-
import { motion as motion2, AnimatePresence } from "framer-motion";
|
|
2261
2260
|
|
|
2262
2261
|
// assets/icon-globe.svg
|
|
2263
2262
|
var icon_globe_default = "./icon-globe-S54WYYEK.svg";
|
|
2264
2263
|
|
|
2265
2264
|
// components/Navbar/Navbar.tsx
|
|
2266
2265
|
import { jsx as jsx23, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2267
|
-
var
|
|
2268
|
-
var
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
};
|
|
2272
|
-
var
|
|
2273
|
-
hidden: { y: "-100%" },
|
|
2274
|
-
visible: { y: 0 }
|
|
2275
|
-
};
|
|
2276
|
-
var accordionVariants = {
|
|
2277
|
-
hidden: { height: 0, opacity: 0 },
|
|
2278
|
-
visible: { height: "auto", opacity: 1 }
|
|
2279
|
-
};
|
|
2280
|
-
var ChevronDownIcon3 = ({ className }) => /* @__PURE__ */ jsx23(
|
|
2281
|
-
"svg",
|
|
2282
|
-
{
|
|
2283
|
-
className,
|
|
2284
|
-
width: "14",
|
|
2285
|
-
height: "14",
|
|
2286
|
-
viewBox: "0 0 14 14",
|
|
2287
|
-
fill: "none",
|
|
2288
|
-
"aria-hidden": "true",
|
|
2289
|
-
children: /* @__PURE__ */ jsx23(
|
|
2290
|
-
"path",
|
|
2291
|
-
{
|
|
2292
|
-
d: "M2.625 4.8125L7 9.1875L11.375 4.8125",
|
|
2293
|
-
stroke: "currentColor",
|
|
2294
|
-
strokeWidth: "1.5",
|
|
2295
|
-
strokeLinecap: "round",
|
|
2296
|
-
strokeLinejoin: "round"
|
|
2297
|
-
}
|
|
2298
|
-
)
|
|
2299
|
-
}
|
|
2300
|
-
);
|
|
2301
|
-
var ArrowRightIcon = () => /* @__PURE__ */ jsx23("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx23(
|
|
2302
|
-
"path",
|
|
2303
|
-
{
|
|
2304
|
-
d: "M2.625 7H11.375M11.375 7L7.875 3.5M11.375 7L7.875 10.5",
|
|
2305
|
-
stroke: "currentColor",
|
|
2306
|
-
strokeWidth: "1.5",
|
|
2307
|
-
strokeLinecap: "round",
|
|
2308
|
-
strokeLinejoin: "round"
|
|
2309
|
-
}
|
|
2310
|
-
) });
|
|
2311
|
-
var ArrowUpRightIcon = () => /* @__PURE__ */ jsx23("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx23(
|
|
2312
|
-
"path",
|
|
2313
|
-
{
|
|
2314
|
-
d: "M4.5 11.5L11.5 4.5M11.5 4.5H5.5M11.5 4.5V10.5",
|
|
2315
|
-
stroke: "currentColor",
|
|
2316
|
-
strokeWidth: "1.5",
|
|
2317
|
-
strokeLinecap: "round",
|
|
2318
|
-
strokeLinejoin: "round"
|
|
2319
|
-
}
|
|
2320
|
-
) });
|
|
2321
|
-
var BarsIcon = () => /* @__PURE__ */ jsx23("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx23(
|
|
2322
|
-
"path",
|
|
2323
|
-
{
|
|
2324
|
-
d: "M2.5 5H17.5M2.5 10H17.5M2.5 15H17.5",
|
|
2325
|
-
stroke: "currentColor",
|
|
2326
|
-
strokeWidth: "1.75",
|
|
2327
|
-
strokeLinecap: "round"
|
|
2328
|
-
}
|
|
2329
|
-
) });
|
|
2330
|
-
var XMarkIcon2 = () => /* @__PURE__ */ jsx23("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx23(
|
|
2331
|
-
"path",
|
|
2332
|
-
{
|
|
2333
|
-
d: "M15 5L5 15M5 5L15 15",
|
|
2334
|
-
stroke: "currentColor",
|
|
2335
|
-
strokeWidth: "1.75",
|
|
2336
|
-
strokeLinecap: "round"
|
|
2337
|
-
}
|
|
2338
|
-
) });
|
|
2266
|
+
var ChevronDownIcon3 = ({ className }) => /* @__PURE__ */ jsx23("svg", { className, width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx23("path", { d: "M2.625 4.8125L7 9.1875L11.375 4.8125", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
2267
|
+
var ArrowRightIcon = () => /* @__PURE__ */ jsx23("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx23("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" }) });
|
|
2268
|
+
var ArrowRightSmIcon = () => /* @__PURE__ */ jsx23("svg", { className: "navbar__lang-option-arrow", width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx23("path", { d: "M2.5 6H9.5M9.5 6L6.5 3M9.5 6L6.5 9", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
2269
|
+
var ArrowUpRightIcon = () => /* @__PURE__ */ jsx23("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx23("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" }) });
|
|
2270
|
+
var BarsIcon = () => /* @__PURE__ */ jsx23("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx23("path", { d: "M2.5 5H17.5M2.5 10H17.5M2.5 15H17.5", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round" }) });
|
|
2271
|
+
var XMarkIcon2 = () => /* @__PURE__ */ jsx23("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx23("path", { d: "M15 5L5 15M5 5L15 15", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round" }) });
|
|
2339
2272
|
var GlobeIcon = ({ className }) => /* @__PURE__ */ jsx23("img", { src: icon_globe_default, alt: "", "aria-hidden": "true", width: "20", height: "20", className });
|
|
2340
|
-
var DropdownPanel = ({ item, onMouseEnter, onMouseLeave }) => {
|
|
2273
|
+
var DropdownPanel = ({ item, isOpen, onMouseEnter, onMouseLeave }) => {
|
|
2341
2274
|
const { dropdown } = item;
|
|
2342
2275
|
if (!dropdown) return null;
|
|
2343
2276
|
return /* @__PURE__ */ jsx23(
|
|
2344
|
-
|
|
2277
|
+
"div",
|
|
2345
2278
|
{
|
|
2346
|
-
className: "navbar__dropdown",
|
|
2347
|
-
variants: dropdownVariants,
|
|
2348
|
-
initial: "hidden",
|
|
2349
|
-
animate: "visible",
|
|
2350
|
-
exit: "hidden",
|
|
2351
|
-
transition: { duration: 0.18, ease: EASE_OUT_EXPO },
|
|
2279
|
+
className: ["navbar__dropdown", isOpen ? "navbar__dropdown--open" : ""].filter(Boolean).join(" "),
|
|
2352
2280
|
onMouseEnter,
|
|
2353
2281
|
onMouseLeave,
|
|
2354
2282
|
children: /* @__PURE__ */ jsxs22("div", { className: "navbar__dropdown-inner", children: [
|
|
2355
|
-
/* @__PURE__ */ jsx23("div", { className: "navbar__dropdown-left", children: dropdown.columns.map((col) => /* @__PURE__ */ jsx23("div", { className: "navbar__dropdown-col", children: /* @__PURE__ */ jsxs22("div", { className: "navbar__dropdown-col-list", children: [
|
|
2356
|
-
/* @__PURE__ */ jsx23("p", { className: "navbar__dropdown-col-title", children:
|
|
2357
|
-
|
|
2283
|
+
/* @__PURE__ */ jsx23("div", { className: "navbar__dropdown-left", children: dropdown.columns.map((col, colIdx) => /* @__PURE__ */ jsx23("div", { className: "navbar__dropdown-col", children: col.sections.map((section) => /* @__PURE__ */ jsxs22("div", { className: "navbar__dropdown-col-list", children: [
|
|
2284
|
+
/* @__PURE__ */ jsx23("p", { className: "navbar__dropdown-col-title", children: section.title }),
|
|
2285
|
+
section.items.map((link) => /* @__PURE__ */ jsxs22(
|
|
2358
2286
|
"a",
|
|
2359
2287
|
{
|
|
2360
2288
|
href: link.href,
|
|
@@ -2368,7 +2296,7 @@ var DropdownPanel = ({ item, onMouseEnter, onMouseLeave }) => {
|
|
|
2368
2296
|
},
|
|
2369
2297
|
link.href
|
|
2370
2298
|
))
|
|
2371
|
-
] }) },
|
|
2299
|
+
] }, section.title)) }, colIdx)) }),
|
|
2372
2300
|
dropdown.feature && /* @__PURE__ */ jsx23("div", { className: "navbar__dropdown-right", children: /* @__PURE__ */ jsx23(FeatureCard, { feature: dropdown.feature }) })
|
|
2373
2301
|
] })
|
|
2374
2302
|
}
|
|
@@ -2380,32 +2308,17 @@ var FeatureCard = ({ feature, mobile }) => /* @__PURE__ */ jsxs22(
|
|
|
2380
2308
|
className: mobile ? "navbar__drawer-feature" : "navbar__dropdown-feature",
|
|
2381
2309
|
style: feature.backgroundImageUrl ? { backgroundImage: `url(${feature.backgroundImageUrl})` } : void 0,
|
|
2382
2310
|
children: [
|
|
2383
|
-
feature.backgroundImageUrl && /* @__PURE__ */ jsx23(
|
|
2384
|
-
"img",
|
|
2385
|
-
{
|
|
2386
|
-
src: feature.backgroundImageUrl,
|
|
2387
|
-
alt: "",
|
|
2388
|
-
className: mobile ? "navbar__drawer-feature-img" : "navbar__dropdown-feature-img",
|
|
2389
|
-
"aria-hidden": "true"
|
|
2390
|
-
}
|
|
2391
|
-
),
|
|
2311
|
+
feature.backgroundImageUrl && /* @__PURE__ */ jsx23("img", { src: feature.backgroundImageUrl, alt: "", className: mobile ? "navbar__drawer-feature-img" : "navbar__dropdown-feature-img", "aria-hidden": "true" }),
|
|
2392
2312
|
/* @__PURE__ */ jsx23("div", { className: mobile ? "navbar__drawer-feature-overlay" : "navbar__dropdown-feature-overlay", "aria-hidden": "true" }),
|
|
2393
2313
|
/* @__PURE__ */ jsxs22("div", { className: mobile ? "navbar__drawer-feature-content" : "navbar__dropdown-feature-content", children: [
|
|
2394
2314
|
/* @__PURE__ */ jsxs22("div", { children: [
|
|
2395
2315
|
/* @__PURE__ */ jsx23("p", { className: mobile ? "navbar__drawer-feature-title" : "navbar__dropdown-feature-title", children: feature.title }),
|
|
2396
2316
|
/* @__PURE__ */ jsx23("p", { className: mobile ? "navbar__drawer-feature-desc" : "navbar__dropdown-feature-desc", children: feature.description })
|
|
2397
2317
|
] }),
|
|
2398
|
-
/* @__PURE__ */ jsxs22(
|
|
2399
|
-
|
|
2400
|
-
{
|
|
2401
|
-
|
|
2402
|
-
className: mobile ? "navbar__drawer-feature-cta" : "navbar__dropdown-feature-cta",
|
|
2403
|
-
children: [
|
|
2404
|
-
feature.ctaLabel,
|
|
2405
|
-
/* @__PURE__ */ jsx23(ArrowRightIcon, {})
|
|
2406
|
-
]
|
|
2407
|
-
}
|
|
2408
|
-
)
|
|
2318
|
+
/* @__PURE__ */ jsxs22("a", { href: feature.ctaHref, className: mobile ? "navbar__drawer-feature-cta" : "navbar__dropdown-feature-cta", children: [
|
|
2319
|
+
feature.ctaLabel,
|
|
2320
|
+
/* @__PURE__ */ jsx23(ArrowRightIcon, {})
|
|
2321
|
+
] })
|
|
2409
2322
|
] })
|
|
2410
2323
|
]
|
|
2411
2324
|
}
|
|
@@ -2416,7 +2329,7 @@ var DrawerAccordion = ({ item, isOpen, onToggle }) => {
|
|
|
2416
2329
|
/* @__PURE__ */ jsxs22(
|
|
2417
2330
|
"button",
|
|
2418
2331
|
{
|
|
2419
|
-
className:
|
|
2332
|
+
className: ["navbar__drawer-trigger", isOpen ? "navbar__drawer-trigger--open" : ""].filter(Boolean).join(" "),
|
|
2420
2333
|
onClick: onToggle,
|
|
2421
2334
|
"aria-expanded": isOpen,
|
|
2422
2335
|
children: [
|
|
@@ -2425,38 +2338,23 @@ var DrawerAccordion = ({ item, isOpen, onToggle }) => {
|
|
|
2425
2338
|
]
|
|
2426
2339
|
}
|
|
2427
2340
|
),
|
|
2428
|
-
/* @__PURE__ */ jsx23(
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
className: "navbar__drawer-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
{
|
|
2446
|
-
href: link.href,
|
|
2447
|
-
className: "navbar__drawer-link",
|
|
2448
|
-
target: link.external ? "_blank" : void 0,
|
|
2449
|
-
rel: link.external ? "noopener noreferrer" : void 0,
|
|
2450
|
-
children: link.label
|
|
2451
|
-
},
|
|
2452
|
-
link.href
|
|
2453
|
-
)) })
|
|
2454
|
-
] }, col.title)) }, colIdx);
|
|
2455
|
-
}) }),
|
|
2456
|
-
dropdown.feature && /* @__PURE__ */ jsx23(FeatureCard, { feature: dropdown.feature, mobile: true })
|
|
2457
|
-
] })
|
|
2458
|
-
}
|
|
2459
|
-
) })
|
|
2341
|
+
/* @__PURE__ */ jsx23("div", { className: ["navbar__drawer-panel", isOpen ? "navbar__drawer-panel--open" : ""].filter(Boolean).join(" "), children: /* @__PURE__ */ jsxs22("div", { className: "navbar__drawer-panel-inner", children: [
|
|
2342
|
+
/* @__PURE__ */ jsx23("div", { className: "navbar__drawer-panel-cols", children: dropdown?.columns.map((col, colIdx) => /* @__PURE__ */ jsx23("div", { className: "navbar__drawer-panel-col", children: col.sections.map((section) => /* @__PURE__ */ jsxs22("div", { className: "navbar__drawer-col-section", children: [
|
|
2343
|
+
/* @__PURE__ */ jsx23("p", { className: "navbar__drawer-col-title", children: section.title }),
|
|
2344
|
+
/* @__PURE__ */ jsx23("div", { className: "navbar__drawer-col-links", children: section.items.map((link) => /* @__PURE__ */ jsx23(
|
|
2345
|
+
"a",
|
|
2346
|
+
{
|
|
2347
|
+
href: link.href,
|
|
2348
|
+
className: "navbar__drawer-link",
|
|
2349
|
+
target: link.external ? "_blank" : void 0,
|
|
2350
|
+
rel: link.external ? "noopener noreferrer" : void 0,
|
|
2351
|
+
children: link.label
|
|
2352
|
+
},
|
|
2353
|
+
link.href
|
|
2354
|
+
)) })
|
|
2355
|
+
] }, section.title)) }, colIdx)) }),
|
|
2356
|
+
dropdown?.feature && /* @__PURE__ */ jsx23(FeatureCard, { feature: dropdown.feature, mobile: true })
|
|
2357
|
+
] }) })
|
|
2460
2358
|
] });
|
|
2461
2359
|
};
|
|
2462
2360
|
var Navbar = ({
|
|
@@ -2469,6 +2367,7 @@ var Navbar = ({
|
|
|
2469
2367
|
loginHref,
|
|
2470
2368
|
ctaLabel = "Open account",
|
|
2471
2369
|
ctaHref,
|
|
2370
|
+
languages,
|
|
2472
2371
|
languageLabel,
|
|
2473
2372
|
onLanguageClick,
|
|
2474
2373
|
className,
|
|
@@ -2478,9 +2377,15 @@ var Navbar = ({
|
|
|
2478
2377
|
const [mobileOpen, setMobileOpen] = useState8(false);
|
|
2479
2378
|
const [mobileExpanded, setMobileExpanded] = useState8(null);
|
|
2480
2379
|
const [scrolled, setScrolled] = useState8(false);
|
|
2380
|
+
const [langOpen, setLangOpen] = useState8(false);
|
|
2381
|
+
const [mobileLangOpen, setMobileLangOpen] = useState8(false);
|
|
2481
2382
|
const hoverTimeoutRef = useRef7(null);
|
|
2383
|
+
const langTimeoutRef = useRef7(null);
|
|
2482
2384
|
const pillAreaRef = useRef7(null);
|
|
2385
|
+
const langWrapperRef = useRef7(null);
|
|
2483
2386
|
const resolvedLogo = theme === "light" ? logoSrcDark ?? logoSrc : logoSrc;
|
|
2387
|
+
const activeLanguage = languages?.find((l) => l.active);
|
|
2388
|
+
const displayLabel = activeLanguage?.code ?? languageLabel;
|
|
2484
2389
|
useEffect6(() => {
|
|
2485
2390
|
const onScroll = () => setScrolled(window.scrollY > 0);
|
|
2486
2391
|
window.addEventListener("scroll", onScroll, { passive: true });
|
|
@@ -2491,6 +2396,7 @@ var Navbar = ({
|
|
|
2491
2396
|
if (e.key === "Escape") {
|
|
2492
2397
|
setOpenDropdown(null);
|
|
2493
2398
|
setMobileOpen(false);
|
|
2399
|
+
setLangOpen(false);
|
|
2494
2400
|
}
|
|
2495
2401
|
};
|
|
2496
2402
|
document.addEventListener("keydown", onKey);
|
|
@@ -2512,6 +2418,16 @@ var Navbar = ({
|
|
|
2512
2418
|
document.addEventListener("pointerdown", onPointerDown);
|
|
2513
2419
|
return () => document.removeEventListener("pointerdown", onPointerDown);
|
|
2514
2420
|
}, [openDropdown]);
|
|
2421
|
+
useEffect6(() => {
|
|
2422
|
+
if (!langOpen) return;
|
|
2423
|
+
const onPointerDown = (e) => {
|
|
2424
|
+
if (langWrapperRef.current && !langWrapperRef.current.contains(e.target)) {
|
|
2425
|
+
setLangOpen(false);
|
|
2426
|
+
}
|
|
2427
|
+
};
|
|
2428
|
+
document.addEventListener("pointerdown", onPointerDown);
|
|
2429
|
+
return () => document.removeEventListener("pointerdown", onPointerDown);
|
|
2430
|
+
}, [langOpen]);
|
|
2515
2431
|
const clearHoverTimeout = useCallback2(() => {
|
|
2516
2432
|
if (hoverTimeoutRef.current) {
|
|
2517
2433
|
clearTimeout(hoverTimeoutRef.current);
|
|
@@ -2526,7 +2442,11 @@ var Navbar = ({
|
|
|
2526
2442
|
clearHoverTimeout();
|
|
2527
2443
|
hoverTimeoutRef.current = setTimeout(() => setOpenDropdown(null), 120);
|
|
2528
2444
|
}, [clearHoverTimeout]);
|
|
2529
|
-
const
|
|
2445
|
+
const handleLangSelect = useCallback2((lang) => {
|
|
2446
|
+
lang.onClick();
|
|
2447
|
+
setLangOpen(false);
|
|
2448
|
+
setMobileLangOpen(false);
|
|
2449
|
+
}, []);
|
|
2530
2450
|
return /* @__PURE__ */ jsxs22(
|
|
2531
2451
|
"nav",
|
|
2532
2452
|
{
|
|
@@ -2540,29 +2460,16 @@ var Navbar = ({
|
|
|
2540
2460
|
/* @__PURE__ */ jsxs22("div", { className: "navbar__nav-group", children: [
|
|
2541
2461
|
navItems.map((item) => {
|
|
2542
2462
|
if (item.external) {
|
|
2543
|
-
return /* @__PURE__ */ jsxs22(
|
|
2544
|
-
|
|
2545
|
-
{
|
|
2546
|
-
|
|
2547
|
-
className: "navbar__nav-item",
|
|
2548
|
-
target: "_blank",
|
|
2549
|
-
rel: "noopener noreferrer",
|
|
2550
|
-
children: [
|
|
2551
|
-
item.label,
|
|
2552
|
-
/* @__PURE__ */ jsx23(ArrowUpRightIcon, {})
|
|
2553
|
-
]
|
|
2554
|
-
},
|
|
2555
|
-
item.label
|
|
2556
|
-
);
|
|
2463
|
+
return /* @__PURE__ */ jsxs22("a", { href: item.href, className: "navbar__nav-item", target: "_blank", rel: "noopener noreferrer", children: [
|
|
2464
|
+
item.label,
|
|
2465
|
+
/* @__PURE__ */ jsx23(ArrowUpRightIcon, {})
|
|
2466
|
+
] }, item.label);
|
|
2557
2467
|
}
|
|
2558
2468
|
if (item.dropdown) {
|
|
2559
2469
|
return /* @__PURE__ */ jsxs22(
|
|
2560
2470
|
"button",
|
|
2561
2471
|
{
|
|
2562
|
-
className: [
|
|
2563
|
-
"navbar__nav-item",
|
|
2564
|
-
openDropdown === item.label ? "navbar__nav-item--open" : ""
|
|
2565
|
-
].filter(Boolean).join(" "),
|
|
2472
|
+
className: ["navbar__nav-item", openDropdown === item.label ? "navbar__nav-item--open" : ""].filter(Boolean).join(" "),
|
|
2566
2473
|
onMouseEnter: () => handleNavEnter(item.label),
|
|
2567
2474
|
onMouseLeave: handleNavLeave,
|
|
2568
2475
|
"aria-expanded": openDropdown === item.label,
|
|
@@ -2577,45 +2484,74 @@ var Navbar = ({
|
|
|
2577
2484
|
}
|
|
2578
2485
|
return /* @__PURE__ */ jsx23("a", { href: item.href, className: "navbar__nav-item", children: item.label }, item.label);
|
|
2579
2486
|
}),
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2487
|
+
displayLabel && /* @__PURE__ */ jsxs22(
|
|
2488
|
+
"div",
|
|
2489
|
+
{
|
|
2490
|
+
className: "navbar__lang-wrapper",
|
|
2491
|
+
ref: langWrapperRef,
|
|
2492
|
+
onMouseEnter: () => {
|
|
2493
|
+
if (langTimeoutRef.current) clearTimeout(langTimeoutRef.current);
|
|
2494
|
+
if (languages && languages.length > 0) setLangOpen(true);
|
|
2495
|
+
},
|
|
2496
|
+
onMouseLeave: () => {
|
|
2497
|
+
langTimeoutRef.current = setTimeout(() => setLangOpen(false), 150);
|
|
2498
|
+
},
|
|
2499
|
+
children: [
|
|
2500
|
+
/* @__PURE__ */ jsxs22(
|
|
2501
|
+
"button",
|
|
2502
|
+
{
|
|
2503
|
+
className: ["navbar__nav-item", "navbar__lang-btn", langOpen ? "navbar__nav-item--open" : ""].filter(Boolean).join(" "),
|
|
2504
|
+
onClick: () => {
|
|
2505
|
+
if (!languages || languages.length === 0) onLanguageClick?.();
|
|
2506
|
+
},
|
|
2507
|
+
"aria-expanded": languages ? langOpen : void 0,
|
|
2508
|
+
"aria-haspopup": languages ? "listbox" : void 0,
|
|
2509
|
+
children: [
|
|
2510
|
+
/* @__PURE__ */ jsx23(GlobeIcon, { className: "navbar__lang-globe" }),
|
|
2511
|
+
displayLabel,
|
|
2512
|
+
languages && languages.length > 0 && /* @__PURE__ */ jsx23(ChevronDownIcon3, { className: "navbar__nav-item__chevron" })
|
|
2513
|
+
]
|
|
2514
|
+
}
|
|
2515
|
+
),
|
|
2516
|
+
languages && languages.length > 0 && /* @__PURE__ */ jsx23("div", { className: ["navbar__lang-dropdown", langOpen ? "navbar__lang-dropdown--open" : ""].filter(Boolean).join(" "), role: "listbox", children: languages.map((lang) => /* @__PURE__ */ jsxs22(
|
|
2517
|
+
"button",
|
|
2518
|
+
{
|
|
2519
|
+
className: ["navbar__lang-option", lang.active ? "navbar__lang-option--active" : ""].filter(Boolean).join(" "),
|
|
2520
|
+
onClick: () => handleLangSelect(lang),
|
|
2521
|
+
role: "option",
|
|
2522
|
+
"aria-selected": lang.active,
|
|
2523
|
+
children: [
|
|
2524
|
+
lang.label,
|
|
2525
|
+
/* @__PURE__ */ jsx23(ArrowRightSmIcon, {})
|
|
2526
|
+
]
|
|
2527
|
+
},
|
|
2528
|
+
lang.code
|
|
2529
|
+
)) })
|
|
2530
|
+
]
|
|
2531
|
+
}
|
|
2532
|
+
)
|
|
2584
2533
|
] }),
|
|
2585
2534
|
/* @__PURE__ */ jsxs22("div", { className: "navbar__pill-actions", children: [
|
|
2586
2535
|
loginHref && /* @__PURE__ */ jsx23("a", { href: loginHref, children: /* @__PURE__ */ jsx23(Button, { colorScheme: "black", variant: "secondary", label: loginLabel }) }),
|
|
2587
2536
|
ctaHref && /* @__PURE__ */ jsx23("a", { href: ctaHref, children: /* @__PURE__ */ jsx23(Button, { colorScheme: "coral", variant: "primary", label: ctaLabel }) })
|
|
2588
2537
|
] })
|
|
2589
2538
|
] }) }),
|
|
2590
|
-
|
|
2539
|
+
navItems.map((item) => item.dropdown ? /* @__PURE__ */ jsx23(
|
|
2591
2540
|
DropdownPanel,
|
|
2592
2541
|
{
|
|
2593
|
-
item
|
|
2542
|
+
item,
|
|
2543
|
+
isOpen: openDropdown === item.label,
|
|
2594
2544
|
onMouseEnter: clearHoverTimeout,
|
|
2595
2545
|
onMouseLeave: handleNavLeave
|
|
2596
2546
|
},
|
|
2597
|
-
|
|
2598
|
-
)
|
|
2547
|
+
item.label
|
|
2548
|
+
) : null),
|
|
2599
2549
|
/* @__PURE__ */ jsxs22("div", { className: "navbar__actions", children: [
|
|
2600
|
-
loginHref && /* @__PURE__ */ jsx23("a", { href: loginHref, className: "navbar__actions-login", children: /* @__PURE__ */ jsx23(
|
|
2601
|
-
Button,
|
|
2602
|
-
{
|
|
2603
|
-
colorScheme: theme === "dark" ? "white" : "black",
|
|
2604
|
-
variant: "secondary",
|
|
2605
|
-
label: loginLabel
|
|
2606
|
-
}
|
|
2607
|
-
) }),
|
|
2550
|
+
loginHref && /* @__PURE__ */ jsx23("a", { href: loginHref, className: "navbar__actions-login", children: /* @__PURE__ */ jsx23(Button, { colorScheme: theme === "dark" ? "white" : "black", variant: "secondary", label: loginLabel }) }),
|
|
2608
2551
|
ctaHref && /* @__PURE__ */ jsx23("a", { href: ctaHref, children: /* @__PURE__ */ jsx23(Button, { colorScheme: "coral", variant: "primary", label: ctaLabel }) })
|
|
2609
2552
|
] }),
|
|
2610
2553
|
/* @__PURE__ */ jsxs22("div", { className: "navbar__mobile-actions", children: [
|
|
2611
|
-
loginHref && /* @__PURE__ */ jsx23("a", { href: loginHref, children: /* @__PURE__ */ jsx23(
|
|
2612
|
-
Button,
|
|
2613
|
-
{
|
|
2614
|
-
colorScheme: scrolled || theme === "light" ? "black" : "white",
|
|
2615
|
-
variant: "secondary",
|
|
2616
|
-
label: loginLabel
|
|
2617
|
-
}
|
|
2618
|
-
) }),
|
|
2554
|
+
loginHref && /* @__PURE__ */ jsx23("a", { href: loginHref, children: /* @__PURE__ */ jsx23(Button, { colorScheme: scrolled || theme === "light" ? "black" : "white", variant: "secondary", label: loginLabel }) }),
|
|
2619
2555
|
/* @__PURE__ */ jsx23(
|
|
2620
2556
|
"button",
|
|
2621
2557
|
{
|
|
@@ -2627,77 +2563,66 @@ var Navbar = ({
|
|
|
2627
2563
|
)
|
|
2628
2564
|
] })
|
|
2629
2565
|
] }),
|
|
2630
|
-
/* @__PURE__ */ jsx23("div", { className: "navbar__drawer-clip", children: /* @__PURE__ */
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
animate: "visible",
|
|
2637
|
-
exit: "hidden",
|
|
2638
|
-
transition: { duration: 0.3, ease: EASE_OUT_EXPO },
|
|
2639
|
-
"aria-modal": "true",
|
|
2640
|
-
role: "dialog",
|
|
2641
|
-
"aria-label": "Navigation menu",
|
|
2642
|
-
children: [
|
|
2643
|
-
/* @__PURE__ */ jsxs22("nav", { className: "navbar__drawer-nav", children: [
|
|
2644
|
-
navItems.map((item) => {
|
|
2645
|
-
if (item.dropdown) {
|
|
2646
|
-
return /* @__PURE__ */ jsx23(
|
|
2647
|
-
DrawerAccordion,
|
|
2648
|
-
{
|
|
2649
|
-
item,
|
|
2650
|
-
isOpen: mobileExpanded === item.label,
|
|
2651
|
-
onToggle: () => setMobileExpanded(
|
|
2652
|
-
(prev) => prev === item.label ? null : item.label
|
|
2653
|
-
)
|
|
2654
|
-
},
|
|
2655
|
-
item.label
|
|
2656
|
-
);
|
|
2657
|
-
}
|
|
2658
|
-
return /* @__PURE__ */ jsxs22(
|
|
2659
|
-
"a",
|
|
2660
|
-
{
|
|
2661
|
-
href: item.href,
|
|
2662
|
-
className: "navbar__drawer-single",
|
|
2663
|
-
target: item.external ? "_blank" : void 0,
|
|
2664
|
-
rel: item.external ? "noopener noreferrer" : void 0,
|
|
2665
|
-
children: [
|
|
2666
|
-
item.label,
|
|
2667
|
-
item.external && /* @__PURE__ */ jsx23(ArrowUpRightIcon, {})
|
|
2668
|
-
]
|
|
2669
|
-
},
|
|
2670
|
-
item.label
|
|
2671
|
-
);
|
|
2672
|
-
}),
|
|
2673
|
-
languageLabel && /* @__PURE__ */ jsxs22("button", { className: "navbar__drawer-lang", onClick: onLanguageClick, children: [
|
|
2674
|
-
/* @__PURE__ */ jsx23(GlobeIcon, { className: "navbar__lang-globe" }),
|
|
2675
|
-
languageLabel
|
|
2676
|
-
] })
|
|
2677
|
-
] }),
|
|
2678
|
-
/* @__PURE__ */ jsxs22("div", { className: "navbar__drawer-footer", children: [
|
|
2679
|
-
loginHref && /* @__PURE__ */ jsx23("a", { href: loginHref, style: { display: "block" }, children: /* @__PURE__ */ jsx23(
|
|
2680
|
-
Button,
|
|
2681
|
-
{
|
|
2682
|
-
colorScheme: "black",
|
|
2683
|
-
variant: "secondary",
|
|
2684
|
-
label: loginLabel,
|
|
2685
|
-
fullWidth: true
|
|
2686
|
-
}
|
|
2687
|
-
) }),
|
|
2688
|
-
ctaHref && /* @__PURE__ */ jsx23("a", { href: ctaHref, style: { display: "block" }, children: /* @__PURE__ */ jsx23(
|
|
2689
|
-
Button,
|
|
2566
|
+
/* @__PURE__ */ jsx23("div", { className: "navbar__drawer-clip", children: /* @__PURE__ */ jsxs22("div", { className: ["navbar__drawer", mobileOpen ? "navbar__drawer--open" : ""].filter(Boolean).join(" "), "aria-modal": "true", role: "dialog", "aria-label": "Navigation menu", children: [
|
|
2567
|
+
/* @__PURE__ */ jsxs22("nav", { className: "navbar__drawer-nav", children: [
|
|
2568
|
+
navItems.map((item) => {
|
|
2569
|
+
if (item.dropdown) {
|
|
2570
|
+
return /* @__PURE__ */ jsx23(
|
|
2571
|
+
DrawerAccordion,
|
|
2690
2572
|
{
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
label:
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
)
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2573
|
+
item,
|
|
2574
|
+
isOpen: mobileExpanded === item.label,
|
|
2575
|
+
onToggle: () => setMobileExpanded((prev) => prev === item.label ? null : item.label)
|
|
2576
|
+
},
|
|
2577
|
+
item.label
|
|
2578
|
+
);
|
|
2579
|
+
}
|
|
2580
|
+
return /* @__PURE__ */ jsxs22("a", { href: item.href, className: "navbar__drawer-single", target: item.external ? "_blank" : void 0, rel: item.external ? "noopener noreferrer" : void 0, children: [
|
|
2581
|
+
item.label,
|
|
2582
|
+
item.external && /* @__PURE__ */ jsx23(ArrowUpRightIcon, {})
|
|
2583
|
+
] }, item.label);
|
|
2584
|
+
}),
|
|
2585
|
+
displayLabel && /* @__PURE__ */ jsxs22("div", { className: "navbar__drawer-item", children: [
|
|
2586
|
+
/* @__PURE__ */ jsxs22(
|
|
2587
|
+
"button",
|
|
2588
|
+
{
|
|
2589
|
+
className: ["navbar__drawer-trigger", mobileLangOpen ? "navbar__drawer-trigger--open" : ""].filter(Boolean).join(" "),
|
|
2590
|
+
onClick: () => {
|
|
2591
|
+
if (languages && languages.length > 0) {
|
|
2592
|
+
setMobileLangOpen((o) => !o);
|
|
2593
|
+
} else {
|
|
2594
|
+
onLanguageClick?.();
|
|
2595
|
+
}
|
|
2596
|
+
},
|
|
2597
|
+
"aria-expanded": languages ? mobileLangOpen : void 0,
|
|
2598
|
+
children: [
|
|
2599
|
+
/* @__PURE__ */ jsxs22("span", { className: "navbar__drawer-lang-label", children: [
|
|
2600
|
+
/* @__PURE__ */ jsx23(GlobeIcon, { className: "navbar__lang-globe navbar__lang-globe--dark" }),
|
|
2601
|
+
displayLabel
|
|
2602
|
+
] }),
|
|
2603
|
+
languages && languages.length > 0 && /* @__PURE__ */ jsx23(ChevronDownIcon3, { className: "navbar__drawer-trigger__chevron" })
|
|
2604
|
+
]
|
|
2605
|
+
}
|
|
2606
|
+
),
|
|
2607
|
+
languages && languages.length > 0 && /* @__PURE__ */ jsx23("div", { className: ["navbar__drawer-lang-grid", mobileLangOpen ? "navbar__drawer-lang-grid--open" : ""].filter(Boolean).join(" "), children: /* @__PURE__ */ jsx23("div", { className: "navbar__drawer-lang-grid-inner", children: languages.map((lang) => /* @__PURE__ */ jsxs22(
|
|
2608
|
+
"button",
|
|
2609
|
+
{
|
|
2610
|
+
className: ["navbar__drawer-lang-option", lang.active ? "navbar__drawer-lang-option--active" : ""].filter(Boolean).join(" "),
|
|
2611
|
+
onClick: () => handleLangSelect(lang),
|
|
2612
|
+
children: [
|
|
2613
|
+
lang.label,
|
|
2614
|
+
/* @__PURE__ */ jsx23(ArrowRightSmIcon, {})
|
|
2615
|
+
]
|
|
2616
|
+
},
|
|
2617
|
+
lang.code
|
|
2618
|
+
)) }) })
|
|
2619
|
+
] })
|
|
2620
|
+
] }),
|
|
2621
|
+
/* @__PURE__ */ jsxs22("div", { className: "navbar__drawer-footer", children: [
|
|
2622
|
+
loginHref && /* @__PURE__ */ jsx23("a", { href: loginHref, style: { display: "block" }, children: /* @__PURE__ */ jsx23(Button, { colorScheme: "black", variant: "secondary", label: loginLabel, fullWidth: true }) }),
|
|
2623
|
+
ctaHref && /* @__PURE__ */ jsx23("a", { href: ctaHref, style: { display: "block" }, children: /* @__PURE__ */ jsx23(Button, { colorScheme: "coral", variant: "primary", label: ctaLabel, fullWidth: true }) })
|
|
2624
|
+
] })
|
|
2625
|
+
] }) })
|
|
2701
2626
|
]
|
|
2702
2627
|
}
|
|
2703
2628
|
);
|
|
@@ -2706,7 +2631,7 @@ var Navbar = ({
|
|
|
2706
2631
|
// templates/DayNightTransition/DayNightTransition.tsx
|
|
2707
2632
|
import { useRef as useRef8 } from "react";
|
|
2708
2633
|
import {
|
|
2709
|
-
motion as
|
|
2634
|
+
motion as motion2,
|
|
2710
2635
|
useScroll as useScroll2,
|
|
2711
2636
|
useSpring as useSpring2,
|
|
2712
2637
|
useTransform as useTransform2,
|
|
@@ -2762,7 +2687,7 @@ var DayNightTransition = ({
|
|
|
2762
2687
|
}
|
|
2763
2688
|
),
|
|
2764
2689
|
/* @__PURE__ */ jsx24(
|
|
2765
|
-
|
|
2690
|
+
motion2.img,
|
|
2766
2691
|
{
|
|
2767
2692
|
className: "dnt__bg dnt__bg--night",
|
|
2768
2693
|
src: nightImageUrl,
|
|
@@ -2773,14 +2698,14 @@ var DayNightTransition = ({
|
|
|
2773
2698
|
}
|
|
2774
2699
|
),
|
|
2775
2700
|
/* @__PURE__ */ jsx24("div", { className: "dnt__content", children: /* @__PURE__ */ jsxs23(
|
|
2776
|
-
|
|
2701
|
+
motion2.div,
|
|
2777
2702
|
{
|
|
2778
2703
|
className: "dnt__text-wrap",
|
|
2779
2704
|
style: { color: textColor },
|
|
2780
2705
|
children: [
|
|
2781
2706
|
/* @__PURE__ */ jsxs23("div", { className: "dnt__crossfade-wrap", children: [
|
|
2782
2707
|
/* @__PURE__ */ jsx24(
|
|
2783
|
-
|
|
2708
|
+
motion2.h2,
|
|
2784
2709
|
{
|
|
2785
2710
|
className: "dnt__headline",
|
|
2786
2711
|
style: { opacity: dayOpacity },
|
|
@@ -2788,7 +2713,7 @@ var DayNightTransition = ({
|
|
|
2788
2713
|
}
|
|
2789
2714
|
),
|
|
2790
2715
|
/* @__PURE__ */ jsx24(
|
|
2791
|
-
|
|
2716
|
+
motion2.h2,
|
|
2792
2717
|
{
|
|
2793
2718
|
className: "dnt__headline",
|
|
2794
2719
|
"aria-hidden": "true",
|
|
@@ -2799,7 +2724,7 @@ var DayNightTransition = ({
|
|
|
2799
2724
|
] }),
|
|
2800
2725
|
hasDescription && /* @__PURE__ */ jsxs23("div", { className: "dnt__crossfade-wrap", children: [
|
|
2801
2726
|
/* @__PURE__ */ jsx24(
|
|
2802
|
-
|
|
2727
|
+
motion2.p,
|
|
2803
2728
|
{
|
|
2804
2729
|
className: "dnt__description",
|
|
2805
2730
|
style: { opacity: dayOpacity },
|
|
@@ -2807,7 +2732,7 @@ var DayNightTransition = ({
|
|
|
2807
2732
|
}
|
|
2808
2733
|
),
|
|
2809
2734
|
/* @__PURE__ */ jsx24(
|
|
2810
|
-
|
|
2735
|
+
motion2.p,
|
|
2811
2736
|
{
|
|
2812
2737
|
className: "dnt__description",
|
|
2813
2738
|
"aria-hidden": "true",
|
|
@@ -2828,7 +2753,7 @@ var DayNightTransition = ({
|
|
|
2828
2753
|
// templates/PaymentMethods/PaymentMethods.tsx
|
|
2829
2754
|
import { useRef as useRef9 } from "react";
|
|
2830
2755
|
import {
|
|
2831
|
-
motion as
|
|
2756
|
+
motion as motion3,
|
|
2832
2757
|
useScroll as useScroll3,
|
|
2833
2758
|
useVelocity,
|
|
2834
2759
|
useAnimationFrame,
|
|
@@ -2914,7 +2839,7 @@ var PaymentMethods = ({
|
|
|
2914
2839
|
/* @__PURE__ */ jsx25("div", { className: "pm__media", children: /* @__PURE__ */ jsxs24("div", { className: "pm__carousel", children: [
|
|
2915
2840
|
/* @__PURE__ */ jsx25("div", { className: "pm__fade pm__fade--top", "aria-hidden": "true" }),
|
|
2916
2841
|
/* @__PURE__ */ jsx25(
|
|
2917
|
-
|
|
2842
|
+
motion3.div,
|
|
2918
2843
|
{
|
|
2919
2844
|
ref: col1Ref,
|
|
2920
2845
|
className: "pm__col",
|
|
@@ -2931,7 +2856,7 @@ var PaymentMethods = ({
|
|
|
2931
2856
|
}
|
|
2932
2857
|
),
|
|
2933
2858
|
/* @__PURE__ */ jsx25(
|
|
2934
|
-
|
|
2859
|
+
motion3.div,
|
|
2935
2860
|
{
|
|
2936
2861
|
ref: col2Ref,
|
|
2937
2862
|
className: "pm__col",
|