@deriv-web-design/ui 0.0.12 → 0.0.13

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.d.mts CHANGED
@@ -597,6 +597,12 @@ interface CTABannerProps extends HTMLAttributes<HTMLElement> {
597
597
  declare const AVATAR_DATA: AvatarItem[];
598
598
  declare const CTABanner: ({ headline, ctaLabel, ctaHref, avatars, variant, className, ...props }: CTABannerProps) => react_jsx_runtime.JSX.Element;
599
599
 
600
+ interface LanguageItem {
601
+ /** Language code, e.g. "en", "ar", "fr" */
602
+ code: string;
603
+ /** Display label, e.g. "English", "العربية", "Français" */
604
+ label: string;
605
+ }
600
606
  interface NavDropdownItem {
601
607
  /** Link text */
602
608
  label: string;
@@ -667,11 +673,18 @@ interface NavbarProps extends HTMLAttributes<HTMLElement> {
667
673
  ctaHref?: string;
668
674
  /** Language label rendered next to the globe icon, e.g. "EN" */
669
675
  languageLabel?: string;
670
- /** Called when the language button is clicked */
676
+ /** Called when the language button is clicked (used when `languageItems` is NOT provided) */
671
677
  onLanguageClick?: () => void;
678
+ /** Languages for the hover-triggered dropdown grid.
679
+ * When provided, a dropdown is shown instead of calling `onLanguageClick`. */
680
+ languageItems?: LanguageItem[];
681
+ /** Highlights the active language in the dropdown (matched by `LanguageItem.code`) */
682
+ activeLanguageCode?: string;
683
+ /** Called when a language is picked from the dropdown */
684
+ onLanguageSelect?: (code: string) => void;
672
685
  }
673
686
 
674
- declare const Navbar: ({ theme, logoSrc, logoSrcDark, logoHref, navItems, loginLabel, loginHref, ctaLabel, ctaHref, languageLabel, onLanguageClick, className, ...props }: NavbarProps) => react_jsx_runtime.JSX.Element;
687
+ declare const Navbar: ({ theme, logoSrc, logoSrcDark, logoHref, navItems, loginLabel, loginHref, ctaLabel, ctaHref, languageLabel, onLanguageClick, languageItems, activeLanguageCode, onLanguageSelect, className, ...props }: NavbarProps) => react_jsx_runtime.JSX.Element;
675
688
 
676
689
  interface DayNightTransitionProps extends HTMLAttributes<HTMLDivElement> {
677
690
  /** URL for the daytime background image */
@@ -719,4 +732,4 @@ declare const TEXT_CONTENT: {
719
732
  };
720
733
  declare const PaymentMethods: ({ headline, body, disclaimer, ctaLabel, ctaHref, col1Logos, col2Logos, className, ...props }: PaymentMethodsProps) => react_jsx_runtime.JSX.Element;
721
734
 
722
- export { AVATAR_DATA, Accordion, type AccordionProps, type AvatarItem, type AvatarPosition, type AwardItem, BottomSheet, type BottomSheetAction, type BottomSheetProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, type BreadcrumbSize, Button, type ButtonColorScheme, type ButtonIconPosition, type ButtonProps, type ButtonVariant, COL_ONE_LOGOS, COL_TWO_LOGOS, CTABanner, type CTABannerProps, Card, type CardPrimaryStyle, type CardProps, type CardTag, type CardThumbnailType, Chip, ChipDropdown, type ChipDropdownOption, type ChipDropdownProps, type ChipProps, type ChipSize, DayNightTransition, type DayNightTransitionProps, type FeatureCardItem, FeatureCards, type FeatureCardsProps, Footer, type FooterAiSummaryItem, type FooterAiSummaryProps, type FooterAppBadge, type FooterDerivGoProps, type FooterLinkItem, type FooterNavSection, type FooterProps, type FooterSocialLink, Hero, type HeroButtonProps, type HeroProps, type HeroVariant, Link, type LinkColorScheme, type LinkProps, type LogoItem, type NavDropdownColumn, type NavDropdownFeature, type NavDropdownItem, type NavItem, Navbar, type NavbarProps, Pagination, type PaginationProps, PaymentMethods, type PaymentMethodsProps, SCROLLYTELLING_DATA, STEPS_DATA, Scrollytelling, type ScrollytellingItem, type ScrollytellingProps, SearchField, type SearchFieldProps, type SearchFieldStatus, type StatItem, Stats, type StatsProps, type StickyCardItem, type StickyCardTheme, StickyStackedCards, type StickyStackedCardsProps, TEXT_CONTENT, Tag, type TagFontWeight, type TagProps, type TagSize, type TagVariant, TextField, type TextFieldProps, type TextFieldStatus, type TextFieldVariant };
735
+ export { AVATAR_DATA, Accordion, type AccordionProps, type AvatarItem, type AvatarPosition, type AwardItem, BottomSheet, type BottomSheetAction, type BottomSheetProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, type BreadcrumbSize, Button, type ButtonColorScheme, type ButtonIconPosition, type ButtonProps, type ButtonVariant, COL_ONE_LOGOS, COL_TWO_LOGOS, CTABanner, type CTABannerProps, Card, type CardPrimaryStyle, type CardProps, type CardTag, type CardThumbnailType, Chip, ChipDropdown, type ChipDropdownOption, type ChipDropdownProps, type ChipProps, type ChipSize, DayNightTransition, type DayNightTransitionProps, type FeatureCardItem, FeatureCards, type FeatureCardsProps, Footer, type FooterAiSummaryItem, type FooterAiSummaryProps, type FooterAppBadge, type FooterDerivGoProps, type FooterLinkItem, type FooterNavSection, type FooterProps, type FooterSocialLink, Hero, type HeroButtonProps, type HeroProps, type HeroVariant, type LanguageItem, Link, type LinkColorScheme, type LinkProps, type LogoItem, type NavDropdownColumn, type NavDropdownFeature, type NavDropdownItem, type NavItem, Navbar, type NavbarProps, Pagination, type PaginationProps, PaymentMethods, type PaymentMethodsProps, SCROLLYTELLING_DATA, STEPS_DATA, Scrollytelling, type ScrollytellingItem, type ScrollytellingProps, SearchField, type SearchFieldProps, type SearchFieldStatus, type StatItem, Stats, type StatsProps, type StickyCardItem, type StickyCardTheme, StickyStackedCards, type StickyStackedCardsProps, TEXT_CONTENT, Tag, type TagFontWeight, type TagProps, type TagSize, type TagVariant, TextField, type TextFieldProps, type TextFieldStatus, type TextFieldVariant };
package/dist/index.d.ts CHANGED
@@ -597,6 +597,12 @@ interface CTABannerProps extends HTMLAttributes<HTMLElement> {
597
597
  declare const AVATAR_DATA: AvatarItem[];
598
598
  declare const CTABanner: ({ headline, ctaLabel, ctaHref, avatars, variant, className, ...props }: CTABannerProps) => react_jsx_runtime.JSX.Element;
599
599
 
600
+ interface LanguageItem {
601
+ /** Language code, e.g. "en", "ar", "fr" */
602
+ code: string;
603
+ /** Display label, e.g. "English", "العربية", "Français" */
604
+ label: string;
605
+ }
600
606
  interface NavDropdownItem {
601
607
  /** Link text */
602
608
  label: string;
@@ -667,11 +673,18 @@ interface NavbarProps extends HTMLAttributes<HTMLElement> {
667
673
  ctaHref?: string;
668
674
  /** Language label rendered next to the globe icon, e.g. "EN" */
669
675
  languageLabel?: string;
670
- /** Called when the language button is clicked */
676
+ /** Called when the language button is clicked (used when `languageItems` is NOT provided) */
671
677
  onLanguageClick?: () => void;
678
+ /** Languages for the hover-triggered dropdown grid.
679
+ * When provided, a dropdown is shown instead of calling `onLanguageClick`. */
680
+ languageItems?: LanguageItem[];
681
+ /** Highlights the active language in the dropdown (matched by `LanguageItem.code`) */
682
+ activeLanguageCode?: string;
683
+ /** Called when a language is picked from the dropdown */
684
+ onLanguageSelect?: (code: string) => void;
672
685
  }
673
686
 
674
- declare const Navbar: ({ theme, logoSrc, logoSrcDark, logoHref, navItems, loginLabel, loginHref, ctaLabel, ctaHref, languageLabel, onLanguageClick, className, ...props }: NavbarProps) => react_jsx_runtime.JSX.Element;
687
+ declare const Navbar: ({ theme, logoSrc, logoSrcDark, logoHref, navItems, loginLabel, loginHref, ctaLabel, ctaHref, languageLabel, onLanguageClick, languageItems, activeLanguageCode, onLanguageSelect, className, ...props }: NavbarProps) => react_jsx_runtime.JSX.Element;
675
688
 
676
689
  interface DayNightTransitionProps extends HTMLAttributes<HTMLDivElement> {
677
690
  /** URL for the daytime background image */
@@ -719,4 +732,4 @@ declare const TEXT_CONTENT: {
719
732
  };
720
733
  declare const PaymentMethods: ({ headline, body, disclaimer, ctaLabel, ctaHref, col1Logos, col2Logos, className, ...props }: PaymentMethodsProps) => react_jsx_runtime.JSX.Element;
721
734
 
722
- export { AVATAR_DATA, Accordion, type AccordionProps, type AvatarItem, type AvatarPosition, type AwardItem, BottomSheet, type BottomSheetAction, type BottomSheetProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, type BreadcrumbSize, Button, type ButtonColorScheme, type ButtonIconPosition, type ButtonProps, type ButtonVariant, COL_ONE_LOGOS, COL_TWO_LOGOS, CTABanner, type CTABannerProps, Card, type CardPrimaryStyle, type CardProps, type CardTag, type CardThumbnailType, Chip, ChipDropdown, type ChipDropdownOption, type ChipDropdownProps, type ChipProps, type ChipSize, DayNightTransition, type DayNightTransitionProps, type FeatureCardItem, FeatureCards, type FeatureCardsProps, Footer, type FooterAiSummaryItem, type FooterAiSummaryProps, type FooterAppBadge, type FooterDerivGoProps, type FooterLinkItem, type FooterNavSection, type FooterProps, type FooterSocialLink, Hero, type HeroButtonProps, type HeroProps, type HeroVariant, Link, type LinkColorScheme, type LinkProps, type LogoItem, type NavDropdownColumn, type NavDropdownFeature, type NavDropdownItem, type NavItem, Navbar, type NavbarProps, Pagination, type PaginationProps, PaymentMethods, type PaymentMethodsProps, SCROLLYTELLING_DATA, STEPS_DATA, Scrollytelling, type ScrollytellingItem, type ScrollytellingProps, SearchField, type SearchFieldProps, type SearchFieldStatus, type StatItem, Stats, type StatsProps, type StickyCardItem, type StickyCardTheme, StickyStackedCards, type StickyStackedCardsProps, TEXT_CONTENT, Tag, type TagFontWeight, type TagProps, type TagSize, type TagVariant, TextField, type TextFieldProps, type TextFieldStatus, type TextFieldVariant };
735
+ export { AVATAR_DATA, Accordion, type AccordionProps, type AvatarItem, type AvatarPosition, type AwardItem, BottomSheet, type BottomSheetAction, type BottomSheetProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, type BreadcrumbSize, Button, type ButtonColorScheme, type ButtonIconPosition, type ButtonProps, type ButtonVariant, COL_ONE_LOGOS, COL_TWO_LOGOS, CTABanner, type CTABannerProps, Card, type CardPrimaryStyle, type CardProps, type CardTag, type CardThumbnailType, Chip, ChipDropdown, type ChipDropdownOption, type ChipDropdownProps, type ChipProps, type ChipSize, DayNightTransition, type DayNightTransitionProps, type FeatureCardItem, FeatureCards, type FeatureCardsProps, Footer, type FooterAiSummaryItem, type FooterAiSummaryProps, type FooterAppBadge, type FooterDerivGoProps, type FooterLinkItem, type FooterNavSection, type FooterProps, type FooterSocialLink, Hero, type HeroButtonProps, type HeroProps, type HeroVariant, type LanguageItem, Link, type LinkColorScheme, type LinkProps, type LogoItem, type NavDropdownColumn, type NavDropdownFeature, type NavDropdownItem, type NavItem, Navbar, type NavbarProps, Pagination, type PaginationProps, PaymentMethods, type PaymentMethodsProps, SCROLLYTELLING_DATA, STEPS_DATA, Scrollytelling, type ScrollytellingItem, type ScrollytellingProps, SearchField, type SearchFieldProps, type SearchFieldStatus, type StatItem, Stats, type StatsProps, type StickyCardItem, type StickyCardTheme, StickyStackedCards, type StickyStackedCardsProps, TEXT_CONTENT, Tag, type TagFontWeight, type TagProps, type TagSize, type TagVariant, TextField, type TextFieldProps, type TextFieldStatus, type TextFieldVariant };
package/dist/index.js CHANGED
@@ -1425,7 +1425,7 @@ var Hero = ({
1425
1425
  const variantClass = `hero--${variant}`;
1426
1426
  const textBlock = /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "hero__text", children: [
1427
1427
  subtitle && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "hero__subtitle", children: subtitle }),
1428
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "hero__title", children: title }),
1428
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h2", { className: "hero__title", children: title }),
1429
1429
  description && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "hero__description", children: description })
1430
1430
  ] });
1431
1431
  const buttonBlock = (primaryButton || secondaryButton) && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "hero__buttons", children: [
@@ -2385,6 +2385,27 @@ var XMarkIcon2 = () => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("svg", { wi
2385
2385
  strokeLinecap: "round"
2386
2386
  }
2387
2387
  ) });
2388
+ var ChevronLeftIcon = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2389
+ "svg",
2390
+ {
2391
+ className,
2392
+ width: "24",
2393
+ height: "24",
2394
+ viewBox: "0 0 24 24",
2395
+ fill: "none",
2396
+ "aria-hidden": "true",
2397
+ children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2398
+ "path",
2399
+ {
2400
+ d: "M15 18L9 12L15 6",
2401
+ stroke: "currentColor",
2402
+ strokeWidth: "2",
2403
+ strokeLinecap: "round",
2404
+ strokeLinejoin: "round"
2405
+ }
2406
+ )
2407
+ }
2408
+ );
2388
2409
  var GlobeIcon = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("img", { src: icon_globe_default, alt: "", "aria-hidden": "true", width: "20", height: "20", className });
2389
2410
  var DropdownPanel = ({ item, onMouseEnter, onMouseLeave }) => {
2390
2411
  const { dropdown } = item;
@@ -2516,6 +2537,9 @@ var Navbar = ({
2516
2537
  ctaHref,
2517
2538
  languageLabel,
2518
2539
  onLanguageClick,
2540
+ languageItems,
2541
+ activeLanguageCode,
2542
+ onLanguageSelect,
2519
2543
  className,
2520
2544
  ...props
2521
2545
  }) => {
@@ -2523,8 +2547,13 @@ var Navbar = ({
2523
2547
  const [mobileOpen, setMobileOpen] = (0, import_react12.useState)(false);
2524
2548
  const [mobileExpanded, setMobileExpanded] = (0, import_react12.useState)(null);
2525
2549
  const [scrolled, setScrolled] = (0, import_react12.useState)(false);
2550
+ const [langDropdownOpen, setLangDropdownOpen] = (0, import_react12.useState)(false);
2551
+ const [mobileLangOpen, setMobileLangOpen] = (0, import_react12.useState)(false);
2526
2552
  const hoverTimeoutRef = (0, import_react12.useRef)(null);
2553
+ const langHoverTimeoutRef = (0, import_react12.useRef)(null);
2527
2554
  const pillAreaRef = (0, import_react12.useRef)(null);
2555
+ const langBtnRef = (0, import_react12.useRef)(null);
2556
+ const hasLangDropdown = Boolean(languageItems && languageItems.length > 0);
2528
2557
  const resolvedLogo = theme === "light" ? logoSrcDark ?? logoSrc : logoSrc;
2529
2558
  (0, import_react12.useEffect)(() => {
2530
2559
  const onScroll = () => setScrolled(window.scrollY > 0);
@@ -2536,11 +2565,15 @@ var Navbar = ({
2536
2565
  if (e.key === "Escape") {
2537
2566
  setOpenDropdown(null);
2538
2567
  setMobileOpen(false);
2568
+ setMobileLangOpen(false);
2539
2569
  }
2540
2570
  };
2541
2571
  document.addEventListener("keydown", onKey);
2542
2572
  return () => document.removeEventListener("keydown", onKey);
2543
2573
  }, []);
2574
+ (0, import_react12.useEffect)(() => {
2575
+ if (!mobileOpen) setMobileLangOpen(false);
2576
+ }, [mobileOpen]);
2544
2577
  (0, import_react12.useEffect)(() => {
2545
2578
  document.body.style.overflow = mobileOpen ? "hidden" : "";
2546
2579
  return () => {
@@ -2563,6 +2596,25 @@ var Navbar = ({
2563
2596
  hoverTimeoutRef.current = null;
2564
2597
  }
2565
2598
  }, []);
2599
+ const clearLangHoverTimeout = (0, import_react12.useCallback)(() => {
2600
+ if (langHoverTimeoutRef.current) {
2601
+ clearTimeout(langHoverTimeoutRef.current);
2602
+ langHoverTimeoutRef.current = null;
2603
+ }
2604
+ }, []);
2605
+ const handleLangEnter = (0, import_react12.useCallback)(() => {
2606
+ clearLangHoverTimeout();
2607
+ setLangDropdownOpen(true);
2608
+ }, [clearLangHoverTimeout]);
2609
+ const handleLangLeave = (0, import_react12.useCallback)(() => {
2610
+ clearLangHoverTimeout();
2611
+ langHoverTimeoutRef.current = setTimeout(() => setLangDropdownOpen(false), 150);
2612
+ }, [clearLangHoverTimeout]);
2613
+ const handleLangSelect = (0, import_react12.useCallback)((code) => {
2614
+ setLangDropdownOpen(false);
2615
+ setMobileLangOpen(false);
2616
+ onLanguageSelect?.(code);
2617
+ }, [onLanguageSelect]);
2566
2618
  const handleNavEnter = (0, import_react12.useCallback)((label) => {
2567
2619
  clearHoverTimeout();
2568
2620
  setOpenDropdown(label);
@@ -2622,10 +2674,28 @@ var Navbar = ({
2622
2674
  }
2623
2675
  return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("a", { href: item.href, className: "navbar__nav-item", children: item.label }, item.label);
2624
2676
  }),
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
- ] })
2677
+ languageLabel && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2678
+ "div",
2679
+ {
2680
+ className: "navbar__lang-wrapper",
2681
+ onMouseEnter: hasLangDropdown ? handleLangEnter : void 0,
2682
+ onMouseLeave: hasLangDropdown ? handleLangLeave : void 0,
2683
+ children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
2684
+ "button",
2685
+ {
2686
+ ref: langBtnRef,
2687
+ className: "navbar__nav-item navbar__lang-btn",
2688
+ onClick: hasLangDropdown ? () => setLangDropdownOpen((o) => !o) : onLanguageClick,
2689
+ "aria-haspopup": hasLangDropdown ? "true" : void 0,
2690
+ "aria-expanded": hasLangDropdown ? langDropdownOpen : void 0,
2691
+ children: [
2692
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(GlobeIcon, { className: "navbar__lang-globe" }),
2693
+ languageLabel
2694
+ ]
2695
+ }
2696
+ )
2697
+ }
2698
+ )
2629
2699
  ] }),
2630
2700
  /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "navbar__pill-actions", children: [
2631
2701
  loginHref && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("a", { href: loginHref, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Button, { colorScheme: "black", variant: "secondary", label: loginLabel }) }),
@@ -2641,6 +2711,38 @@ var Navbar = ({
2641
2711
  },
2642
2712
  "dropdown"
2643
2713
  ) }),
2714
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_framer_motion2.AnimatePresence, { children: hasLangDropdown && langDropdownOpen && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2715
+ import_framer_motion2.motion.div,
2716
+ {
2717
+ className: "navbar__lang-dropdown",
2718
+ variants: dropdownVariants,
2719
+ initial: "hidden",
2720
+ animate: "visible",
2721
+ exit: "hidden",
2722
+ transition: { duration: 0.18, ease: EASE_OUT_EXPO },
2723
+ onMouseEnter: clearLangHoverTimeout,
2724
+ onMouseLeave: handleLangLeave,
2725
+ children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2726
+ "div",
2727
+ {
2728
+ className: "navbar__lang-dropdown-grid",
2729
+ style: { "--lang-rows": Math.ceil(languageItems.length / 3) },
2730
+ children: languageItems.map((lang) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2731
+ "button",
2732
+ {
2733
+ className: [
2734
+ "navbar__lang-dropdown-item",
2735
+ lang.code === activeLanguageCode ? "navbar__lang-dropdown-item--active" : ""
2736
+ ].filter(Boolean).join(" "),
2737
+ onClick: () => handleLangSelect(lang.code),
2738
+ children: lang.label
2739
+ },
2740
+ lang.code
2741
+ ))
2742
+ }
2743
+ )
2744
+ }
2745
+ ) }),
2644
2746
  /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "navbar__actions", children: [
2645
2747
  loginHref && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("a", { href: loginHref, className: "navbar__actions-login", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2646
2748
  Button,
@@ -2715,12 +2817,23 @@ var Navbar = ({
2715
2817
  item.label
2716
2818
  );
2717
2819
  }),
2718
- languageLabel && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("button", { className: "navbar__drawer-lang", onClick: onLanguageClick, children: [
2820
+ languageLabel && !hasLangDropdown && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("button", { className: "navbar__drawer-lang", onClick: onLanguageClick, children: [
2719
2821
  /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(GlobeIcon, { className: "navbar__lang-globe" }),
2720
2822
  languageLabel
2721
- ] })
2823
+ ] }),
2824
+ languageLabel && hasLangDropdown && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
2825
+ "button",
2826
+ {
2827
+ className: "navbar__drawer-lang",
2828
+ onClick: () => setMobileLangOpen(true),
2829
+ children: [
2830
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(GlobeIcon, { className: "navbar__lang-globe" }),
2831
+ languageLabel
2832
+ ]
2833
+ }
2834
+ )
2722
2835
  ] }),
2723
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "navbar__drawer-footer", children: [
2836
+ !mobileLangOpen && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "navbar__drawer-footer", children: [
2724
2837
  loginHref && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("a", { href: loginHref, style: { display: "block" }, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2725
2838
  Button,
2726
2839
  {
@@ -2739,7 +2852,40 @@ var Navbar = ({
2739
2852
  fullWidth: true
2740
2853
  }
2741
2854
  ) })
2742
- ] })
2855
+ ] }),
2856
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_framer_motion2.AnimatePresence, { children: hasLangDropdown && mobileLangOpen && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
2857
+ import_framer_motion2.motion.div,
2858
+ {
2859
+ className: "navbar__drawer-lang-panel",
2860
+ initial: { y: "100%" },
2861
+ animate: { y: 0 },
2862
+ exit: { y: "100%" },
2863
+ transition: { duration: 0.25, ease: EASE_OUT_EXPO },
2864
+ children: [
2865
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2866
+ "button",
2867
+ {
2868
+ className: "navbar__drawer-lang-back",
2869
+ onClick: () => setMobileLangOpen(false),
2870
+ "aria-label": "Back to menu",
2871
+ children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ChevronLeftIcon, {})
2872
+ }
2873
+ ),
2874
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "navbar__drawer-lang-grid", children: languageItems.map((lang) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2875
+ "button",
2876
+ {
2877
+ className: [
2878
+ "navbar__drawer-lang-item",
2879
+ lang.code === activeLanguageCode ? "navbar__drawer-lang-item--active" : ""
2880
+ ].filter(Boolean).join(" "),
2881
+ onClick: () => handleLangSelect(lang.code),
2882
+ children: lang.label
2883
+ },
2884
+ lang.code
2885
+ )) })
2886
+ ]
2887
+ }
2888
+ ) })
2743
2889
  ]
2744
2890
  }
2745
2891
  ) }) })