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