@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.d.mts CHANGED
@@ -639,6 +639,16 @@ interface NavItem {
639
639
  feature?: NavDropdownFeature;
640
640
  };
641
641
  }
642
+ interface NavLanguage {
643
+ /** ISO code shown in the trigger button, e.g. "EN" */
644
+ code: string;
645
+ /** Native language name shown in the dropdown grid, e.g. "English" */
646
+ label: string;
647
+ /** Mark as currently selected — highlights in coral */
648
+ active?: boolean;
649
+ /** Called when this language is selected */
650
+ onClick: () => void;
651
+ }
642
652
  interface NavbarProps extends HTMLAttributes<HTMLElement> {
643
653
  /**
644
654
  * `dark` — hero beneath has a dark / image background; pill uses white/24 tint, text is white.
@@ -662,13 +672,19 @@ interface NavbarProps extends HTMLAttributes<HTMLElement> {
662
672
  ctaLabel?: string;
663
673
  /** Destination for the CTA button */
664
674
  ctaHref?: string;
665
- /** Language label rendered next to the globe icon, e.g. "EN" */
675
+ /**
676
+ * Language options for the switcher dropdown.
677
+ * When provided, the globe button opens a 3-column language picker grid.
678
+ * Mark the active language with `active: true` — its code is shown in the button.
679
+ */
680
+ languages?: NavLanguage[];
681
+ /** Fallback label next to the globe icon when no `languages` array is supplied, e.g. "EN" */
666
682
  languageLabel?: string;
667
- /** Called when the language button is clicked */
683
+ /** Called when the language button is clicked and no `languages` array is supplied */
668
684
  onLanguageClick?: () => void;
669
685
  }
670
686
 
671
- 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, languages, languageLabel, onLanguageClick, className, ...props }: NavbarProps) => react_jsx_runtime.JSX.Element;
672
688
 
673
689
  interface DayNightTransitionProps extends HTMLAttributes<HTMLDivElement> {
674
690
  /** URL for the daytime background image */
package/dist/index.d.ts CHANGED
@@ -639,6 +639,16 @@ interface NavItem {
639
639
  feature?: NavDropdownFeature;
640
640
  };
641
641
  }
642
+ interface NavLanguage {
643
+ /** ISO code shown in the trigger button, e.g. "EN" */
644
+ code: string;
645
+ /** Native language name shown in the dropdown grid, e.g. "English" */
646
+ label: string;
647
+ /** Mark as currently selected — highlights in coral */
648
+ active?: boolean;
649
+ /** Called when this language is selected */
650
+ onClick: () => void;
651
+ }
642
652
  interface NavbarProps extends HTMLAttributes<HTMLElement> {
643
653
  /**
644
654
  * `dark` — hero beneath has a dark / image background; pill uses white/24 tint, text is white.
@@ -662,13 +672,19 @@ interface NavbarProps extends HTMLAttributes<HTMLElement> {
662
672
  ctaLabel?: string;
663
673
  /** Destination for the CTA button */
664
674
  ctaHref?: string;
665
- /** Language label rendered next to the globe icon, e.g. "EN" */
675
+ /**
676
+ * Language options for the switcher dropdown.
677
+ * When provided, the globe button opens a 3-column language picker grid.
678
+ * Mark the active language with `active: true` — its code is shown in the button.
679
+ */
680
+ languages?: NavLanguage[];
681
+ /** Fallback label next to the globe icon when no `languages` array is supplied, e.g. "EN" */
666
682
  languageLabel?: string;
667
- /** Called when the language button is clicked */
683
+ /** Called when the language button is clicked and no `languages` array is supplied */
668
684
  onLanguageClick?: () => void;
669
685
  }
670
686
 
671
- 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, languages, languageLabel, onLanguageClick, className, ...props }: NavbarProps) => react_jsx_runtime.JSX.Element;
672
688
 
673
689
  interface DayNightTransitionProps extends HTMLAttributes<HTMLDivElement> {
674
690
  /** URL for the daytime background image */