@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.mjs CHANGED
@@ -2257,98 +2257,26 @@ 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 EASE_OUT_EXPO = [0.16, 1, 0.3, 1];
2268
- var dropdownVariants = {
2269
- hidden: { opacity: 0, scale: 0.96, y: -8 },
2270
- visible: { opacity: 1, scale: 1, y: 0 }
2271
- };
2272
- var drawerVariants = {
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
- motion2.div,
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: [
@@ -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
- "a",
2400
- {
2401
- href: feature.ctaHref,
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: `navbar__drawer-trigger ${isOpen ? "navbar__drawer-trigger--open" : ""}`,
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,34 +2338,23 @@ var DrawerAccordion = ({ item, isOpen, onToggle }) => {
2425
2338
  ]
2426
2339
  }
2427
2340
  ),
2428
- /* @__PURE__ */ jsx23(AnimatePresence, { initial: false, children: isOpen && dropdown && /* @__PURE__ */ jsx23(
2429
- motion2.div,
2430
- {
2431
- className: "navbar__drawer-panel",
2432
- variants: accordionVariants,
2433
- initial: "hidden",
2434
- animate: "visible",
2435
- exit: "hidden",
2436
- transition: { duration: 0.22, ease: EASE_OUT_EXPO },
2437
- children: /* @__PURE__ */ jsxs22("div", { className: "navbar__drawer-panel-inner", children: [
2438
- /* @__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: [
2439
- /* @__PURE__ */ jsx23("p", { className: "navbar__drawer-col-title", children: section.title }),
2440
- /* @__PURE__ */ jsx23("div", { className: "navbar__drawer-col-links", children: section.items.map((link) => /* @__PURE__ */ jsx23(
2441
- "a",
2442
- {
2443
- href: link.href,
2444
- className: "navbar__drawer-link",
2445
- target: link.external ? "_blank" : void 0,
2446
- rel: link.external ? "noopener noreferrer" : void 0,
2447
- children: link.label
2448
- },
2449
- link.href
2450
- )) })
2451
- ] }, section.title)) }, colIdx)) }),
2452
- dropdown.feature && /* @__PURE__ */ jsx23(FeatureCard, { feature: dropdown.feature, mobile: true })
2453
- ] })
2454
- }
2455
- ) })
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
+ ] }) })
2456
2358
  ] });
2457
2359
  };
2458
2360
  var Navbar = ({
@@ -2465,6 +2367,7 @@ var Navbar = ({
2465
2367
  loginHref,
2466
2368
  ctaLabel = "Open account",
2467
2369
  ctaHref,
2370
+ languages,
2468
2371
  languageLabel,
2469
2372
  onLanguageClick,
2470
2373
  className,
@@ -2474,9 +2377,15 @@ var Navbar = ({
2474
2377
  const [mobileOpen, setMobileOpen] = useState8(false);
2475
2378
  const [mobileExpanded, setMobileExpanded] = useState8(null);
2476
2379
  const [scrolled, setScrolled] = useState8(false);
2380
+ const [langOpen, setLangOpen] = useState8(false);
2381
+ const [mobileLangOpen, setMobileLangOpen] = useState8(false);
2477
2382
  const hoverTimeoutRef = useRef7(null);
2383
+ const langTimeoutRef = useRef7(null);
2478
2384
  const pillAreaRef = useRef7(null);
2385
+ const langWrapperRef = useRef7(null);
2479
2386
  const resolvedLogo = theme === "light" ? logoSrcDark ?? logoSrc : logoSrc;
2387
+ const activeLanguage = languages?.find((l) => l.active);
2388
+ const displayLabel = activeLanguage?.code ?? languageLabel;
2480
2389
  useEffect6(() => {
2481
2390
  const onScroll = () => setScrolled(window.scrollY > 0);
2482
2391
  window.addEventListener("scroll", onScroll, { passive: true });
@@ -2487,6 +2396,7 @@ var Navbar = ({
2487
2396
  if (e.key === "Escape") {
2488
2397
  setOpenDropdown(null);
2489
2398
  setMobileOpen(false);
2399
+ setLangOpen(false);
2490
2400
  }
2491
2401
  };
2492
2402
  document.addEventListener("keydown", onKey);
@@ -2508,6 +2418,16 @@ var Navbar = ({
2508
2418
  document.addEventListener("pointerdown", onPointerDown);
2509
2419
  return () => document.removeEventListener("pointerdown", onPointerDown);
2510
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]);
2511
2431
  const clearHoverTimeout = useCallback2(() => {
2512
2432
  if (hoverTimeoutRef.current) {
2513
2433
  clearTimeout(hoverTimeoutRef.current);
@@ -2522,7 +2442,11 @@ var Navbar = ({
2522
2442
  clearHoverTimeout();
2523
2443
  hoverTimeoutRef.current = setTimeout(() => setOpenDropdown(null), 120);
2524
2444
  }, [clearHoverTimeout]);
2525
- const activeDropdownItem = navItems.find((item) => item.label === openDropdown);
2445
+ const handleLangSelect = useCallback2((lang) => {
2446
+ lang.onClick();
2447
+ setLangOpen(false);
2448
+ setMobileLangOpen(false);
2449
+ }, []);
2526
2450
  return /* @__PURE__ */ jsxs22(
2527
2451
  "nav",
2528
2452
  {
@@ -2536,29 +2460,16 @@ var Navbar = ({
2536
2460
  /* @__PURE__ */ jsxs22("div", { className: "navbar__nav-group", children: [
2537
2461
  navItems.map((item) => {
2538
2462
  if (item.external) {
2539
- return /* @__PURE__ */ jsxs22(
2540
- "a",
2541
- {
2542
- href: item.href,
2543
- className: "navbar__nav-item",
2544
- target: "_blank",
2545
- rel: "noopener noreferrer",
2546
- children: [
2547
- item.label,
2548
- /* @__PURE__ */ jsx23(ArrowUpRightIcon, {})
2549
- ]
2550
- },
2551
- item.label
2552
- );
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);
2553
2467
  }
2554
2468
  if (item.dropdown) {
2555
2469
  return /* @__PURE__ */ jsxs22(
2556
2470
  "button",
2557
2471
  {
2558
- className: [
2559
- "navbar__nav-item",
2560
- openDropdown === item.label ? "navbar__nav-item--open" : ""
2561
- ].filter(Boolean).join(" "),
2472
+ className: ["navbar__nav-item", openDropdown === item.label ? "navbar__nav-item--open" : ""].filter(Boolean).join(" "),
2562
2473
  onMouseEnter: () => handleNavEnter(item.label),
2563
2474
  onMouseLeave: handleNavLeave,
2564
2475
  "aria-expanded": openDropdown === item.label,
@@ -2573,45 +2484,74 @@ var Navbar = ({
2573
2484
  }
2574
2485
  return /* @__PURE__ */ jsx23("a", { href: item.href, className: "navbar__nav-item", children: item.label }, item.label);
2575
2486
  }),
2576
- languageLabel && /* @__PURE__ */ jsxs22("button", { className: "navbar__nav-item navbar__lang-btn", onClick: onLanguageClick, children: [
2577
- /* @__PURE__ */ jsx23(GlobeIcon, { className: "navbar__lang-globe" }),
2578
- languageLabel
2579
- ] })
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
+ )
2580
2533
  ] }),
2581
2534
  /* @__PURE__ */ jsxs22("div", { className: "navbar__pill-actions", children: [
2582
2535
  loginHref && /* @__PURE__ */ jsx23("a", { href: loginHref, children: /* @__PURE__ */ jsx23(Button, { colorScheme: "black", variant: "secondary", label: loginLabel }) }),
2583
2536
  ctaHref && /* @__PURE__ */ jsx23("a", { href: ctaHref, children: /* @__PURE__ */ jsx23(Button, { colorScheme: "coral", variant: "primary", label: ctaLabel }) })
2584
2537
  ] })
2585
2538
  ] }) }),
2586
- /* @__PURE__ */ jsx23(AnimatePresence, { children: openDropdown && activeDropdownItem?.dropdown && /* @__PURE__ */ jsx23(
2539
+ navItems.map((item) => item.dropdown ? /* @__PURE__ */ jsx23(
2587
2540
  DropdownPanel,
2588
2541
  {
2589
- item: activeDropdownItem,
2542
+ item,
2543
+ isOpen: openDropdown === item.label,
2590
2544
  onMouseEnter: clearHoverTimeout,
2591
2545
  onMouseLeave: handleNavLeave
2592
2546
  },
2593
- "dropdown"
2594
- ) }),
2547
+ item.label
2548
+ ) : null),
2595
2549
  /* @__PURE__ */ jsxs22("div", { className: "navbar__actions", children: [
2596
- loginHref && /* @__PURE__ */ jsx23("a", { href: loginHref, className: "navbar__actions-login", children: /* @__PURE__ */ jsx23(
2597
- Button,
2598
- {
2599
- colorScheme: theme === "dark" ? "white" : "black",
2600
- variant: "secondary",
2601
- label: loginLabel
2602
- }
2603
- ) }),
2550
+ loginHref && /* @__PURE__ */ jsx23("a", { href: loginHref, className: "navbar__actions-login", children: /* @__PURE__ */ jsx23(Button, { colorScheme: theme === "dark" ? "white" : "black", variant: "secondary", label: loginLabel }) }),
2604
2551
  ctaHref && /* @__PURE__ */ jsx23("a", { href: ctaHref, children: /* @__PURE__ */ jsx23(Button, { colorScheme: "coral", variant: "primary", label: ctaLabel }) })
2605
2552
  ] }),
2606
2553
  /* @__PURE__ */ jsxs22("div", { className: "navbar__mobile-actions", children: [
2607
- loginHref && /* @__PURE__ */ jsx23("a", { href: loginHref, children: /* @__PURE__ */ jsx23(
2608
- Button,
2609
- {
2610
- colorScheme: scrolled || theme === "light" ? "black" : "white",
2611
- variant: "secondary",
2612
- label: loginLabel
2613
- }
2614
- ) }),
2554
+ loginHref && /* @__PURE__ */ jsx23("a", { href: loginHref, children: /* @__PURE__ */ jsx23(Button, { colorScheme: scrolled || theme === "light" ? "black" : "white", variant: "secondary", label: loginLabel }) }),
2615
2555
  /* @__PURE__ */ jsx23(
2616
2556
  "button",
2617
2557
  {
@@ -2623,77 +2563,66 @@ var Navbar = ({
2623
2563
  )
2624
2564
  ] })
2625
2565
  ] }),
2626
- /* @__PURE__ */ jsx23("div", { className: "navbar__drawer-clip", children: /* @__PURE__ */ jsx23(AnimatePresence, { children: mobileOpen && /* @__PURE__ */ jsxs22(
2627
- motion2.div,
2628
- {
2629
- className: "navbar__drawer",
2630
- variants: drawerVariants,
2631
- initial: "hidden",
2632
- animate: "visible",
2633
- exit: "hidden",
2634
- transition: { duration: 0.3, ease: EASE_OUT_EXPO },
2635
- "aria-modal": "true",
2636
- role: "dialog",
2637
- "aria-label": "Navigation menu",
2638
- children: [
2639
- /* @__PURE__ */ jsxs22("nav", { className: "navbar__drawer-nav", children: [
2640
- navItems.map((item) => {
2641
- if (item.dropdown) {
2642
- return /* @__PURE__ */ jsx23(
2643
- DrawerAccordion,
2644
- {
2645
- item,
2646
- isOpen: mobileExpanded === item.label,
2647
- onToggle: () => setMobileExpanded(
2648
- (prev) => prev === item.label ? null : item.label
2649
- )
2650
- },
2651
- item.label
2652
- );
2653
- }
2654
- return /* @__PURE__ */ jsxs22(
2655
- "a",
2656
- {
2657
- href: item.href,
2658
- className: "navbar__drawer-single",
2659
- target: item.external ? "_blank" : void 0,
2660
- rel: item.external ? "noopener noreferrer" : void 0,
2661
- children: [
2662
- item.label,
2663
- item.external && /* @__PURE__ */ jsx23(ArrowUpRightIcon, {})
2664
- ]
2665
- },
2666
- item.label
2667
- );
2668
- }),
2669
- languageLabel && /* @__PURE__ */ jsxs22("button", { className: "navbar__drawer-lang", onClick: onLanguageClick, children: [
2670
- /* @__PURE__ */ jsx23(GlobeIcon, { className: "navbar__lang-globe" }),
2671
- languageLabel
2672
- ] })
2673
- ] }),
2674
- /* @__PURE__ */ jsxs22("div", { className: "navbar__drawer-footer", children: [
2675
- loginHref && /* @__PURE__ */ jsx23("a", { href: loginHref, style: { display: "block" }, children: /* @__PURE__ */ jsx23(
2676
- Button,
2677
- {
2678
- colorScheme: "black",
2679
- variant: "secondary",
2680
- label: loginLabel,
2681
- fullWidth: true
2682
- }
2683
- ) }),
2684
- ctaHref && /* @__PURE__ */ jsx23("a", { href: ctaHref, style: { display: "block" }, children: /* @__PURE__ */ jsx23(
2685
- 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,
2686
2572
  {
2687
- colorScheme: "coral",
2688
- variant: "primary",
2689
- label: ctaLabel,
2690
- fullWidth: true
2691
- }
2692
- ) })
2693
- ] })
2694
- ]
2695
- }
2696
- ) }) })
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
+ ] }) })
2697
2626
  ]
2698
2627
  }
2699
2628
  );
@@ -2702,7 +2631,7 @@ var Navbar = ({
2702
2631
  // templates/DayNightTransition/DayNightTransition.tsx
2703
2632
  import { useRef as useRef8 } from "react";
2704
2633
  import {
2705
- motion as motion3,
2634
+ motion as motion2,
2706
2635
  useScroll as useScroll2,
2707
2636
  useSpring as useSpring2,
2708
2637
  useTransform as useTransform2,
@@ -2758,7 +2687,7 @@ var DayNightTransition = ({
2758
2687
  }
2759
2688
  ),
2760
2689
  /* @__PURE__ */ jsx24(
2761
- motion3.img,
2690
+ motion2.img,
2762
2691
  {
2763
2692
  className: "dnt__bg dnt__bg--night",
2764
2693
  src: nightImageUrl,
@@ -2769,14 +2698,14 @@ var DayNightTransition = ({
2769
2698
  }
2770
2699
  ),
2771
2700
  /* @__PURE__ */ jsx24("div", { className: "dnt__content", children: /* @__PURE__ */ jsxs23(
2772
- motion3.div,
2701
+ motion2.div,
2773
2702
  {
2774
2703
  className: "dnt__text-wrap",
2775
2704
  style: { color: textColor },
2776
2705
  children: [
2777
2706
  /* @__PURE__ */ jsxs23("div", { className: "dnt__crossfade-wrap", children: [
2778
2707
  /* @__PURE__ */ jsx24(
2779
- motion3.h2,
2708
+ motion2.h2,
2780
2709
  {
2781
2710
  className: "dnt__headline",
2782
2711
  style: { opacity: dayOpacity },
@@ -2784,7 +2713,7 @@ var DayNightTransition = ({
2784
2713
  }
2785
2714
  ),
2786
2715
  /* @__PURE__ */ jsx24(
2787
- motion3.h2,
2716
+ motion2.h2,
2788
2717
  {
2789
2718
  className: "dnt__headline",
2790
2719
  "aria-hidden": "true",
@@ -2795,7 +2724,7 @@ var DayNightTransition = ({
2795
2724
  ] }),
2796
2725
  hasDescription && /* @__PURE__ */ jsxs23("div", { className: "dnt__crossfade-wrap", children: [
2797
2726
  /* @__PURE__ */ jsx24(
2798
- motion3.p,
2727
+ motion2.p,
2799
2728
  {
2800
2729
  className: "dnt__description",
2801
2730
  style: { opacity: dayOpacity },
@@ -2803,7 +2732,7 @@ var DayNightTransition = ({
2803
2732
  }
2804
2733
  ),
2805
2734
  /* @__PURE__ */ jsx24(
2806
- motion3.p,
2735
+ motion2.p,
2807
2736
  {
2808
2737
  className: "dnt__description",
2809
2738
  "aria-hidden": "true",
@@ -2824,7 +2753,7 @@ var DayNightTransition = ({
2824
2753
  // templates/PaymentMethods/PaymentMethods.tsx
2825
2754
  import { useRef as useRef9 } from "react";
2826
2755
  import {
2827
- motion as motion4,
2756
+ motion as motion3,
2828
2757
  useScroll as useScroll3,
2829
2758
  useVelocity,
2830
2759
  useAnimationFrame,
@@ -2910,7 +2839,7 @@ var PaymentMethods = ({
2910
2839
  /* @__PURE__ */ jsx25("div", { className: "pm__media", children: /* @__PURE__ */ jsxs24("div", { className: "pm__carousel", children: [
2911
2840
  /* @__PURE__ */ jsx25("div", { className: "pm__fade pm__fade--top", "aria-hidden": "true" }),
2912
2841
  /* @__PURE__ */ jsx25(
2913
- motion4.div,
2842
+ motion3.div,
2914
2843
  {
2915
2844
  ref: col1Ref,
2916
2845
  className: "pm__col",
@@ -2927,7 +2856,7 @@ var PaymentMethods = ({
2927
2856
  }
2928
2857
  ),
2929
2858
  /* @__PURE__ */ jsx25(
2930
- motion4.div,
2859
+ motion3.div,
2931
2860
  {
2932
2861
  ref: col2Ref,
2933
2862
  className: "pm__col",