@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.d.mts
CHANGED
|
@@ -602,11 +602,15 @@ interface NavDropdownItem {
|
|
|
602
602
|
/** Opens in a new tab with ↗ indicator */
|
|
603
603
|
external?: boolean;
|
|
604
604
|
}
|
|
605
|
-
interface
|
|
605
|
+
interface NavDropdownSection {
|
|
606
606
|
/** Section heading rendered above the link list */
|
|
607
607
|
title: string;
|
|
608
608
|
items: NavDropdownItem[];
|
|
609
609
|
}
|
|
610
|
+
interface NavDropdownColumn {
|
|
611
|
+
/** One or more titled groups stacked within this column */
|
|
612
|
+
sections: NavDropdownSection[];
|
|
613
|
+
}
|
|
610
614
|
interface NavDropdownFeature {
|
|
611
615
|
/** Bold heading inside the dark feature card */
|
|
612
616
|
title: string;
|
|
@@ -635,6 +639,16 @@ interface NavItem {
|
|
|
635
639
|
feature?: NavDropdownFeature;
|
|
636
640
|
};
|
|
637
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
|
+
}
|
|
638
652
|
interface NavbarProps extends HTMLAttributes<HTMLElement> {
|
|
639
653
|
/**
|
|
640
654
|
* `dark` — hero beneath has a dark / image background; pill uses white/24 tint, text is white.
|
|
@@ -658,13 +672,19 @@ interface NavbarProps extends HTMLAttributes<HTMLElement> {
|
|
|
658
672
|
ctaLabel?: string;
|
|
659
673
|
/** Destination for the CTA button */
|
|
660
674
|
ctaHref?: string;
|
|
661
|
-
/**
|
|
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" */
|
|
662
682
|
languageLabel?: string;
|
|
663
|
-
/** Called when the language button is clicked */
|
|
683
|
+
/** Called when the language button is clicked and no `languages` array is supplied */
|
|
664
684
|
onLanguageClick?: () => void;
|
|
665
685
|
}
|
|
666
686
|
|
|
667
|
-
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;
|
|
668
688
|
|
|
669
689
|
interface DayNightTransitionProps extends HTMLAttributes<HTMLDivElement> {
|
|
670
690
|
/** URL for the daytime background image */
|
package/dist/index.d.ts
CHANGED
|
@@ -602,11 +602,15 @@ interface NavDropdownItem {
|
|
|
602
602
|
/** Opens in a new tab with ↗ indicator */
|
|
603
603
|
external?: boolean;
|
|
604
604
|
}
|
|
605
|
-
interface
|
|
605
|
+
interface NavDropdownSection {
|
|
606
606
|
/** Section heading rendered above the link list */
|
|
607
607
|
title: string;
|
|
608
608
|
items: NavDropdownItem[];
|
|
609
609
|
}
|
|
610
|
+
interface NavDropdownColumn {
|
|
611
|
+
/** One or more titled groups stacked within this column */
|
|
612
|
+
sections: NavDropdownSection[];
|
|
613
|
+
}
|
|
610
614
|
interface NavDropdownFeature {
|
|
611
615
|
/** Bold heading inside the dark feature card */
|
|
612
616
|
title: string;
|
|
@@ -635,6 +639,16 @@ interface NavItem {
|
|
|
635
639
|
feature?: NavDropdownFeature;
|
|
636
640
|
};
|
|
637
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
|
+
}
|
|
638
652
|
interface NavbarProps extends HTMLAttributes<HTMLElement> {
|
|
639
653
|
/**
|
|
640
654
|
* `dark` — hero beneath has a dark / image background; pill uses white/24 tint, text is white.
|
|
@@ -658,13 +672,19 @@ interface NavbarProps extends HTMLAttributes<HTMLElement> {
|
|
|
658
672
|
ctaLabel?: string;
|
|
659
673
|
/** Destination for the CTA button */
|
|
660
674
|
ctaHref?: string;
|
|
661
|
-
/**
|
|
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" */
|
|
662
682
|
languageLabel?: string;
|
|
663
|
-
/** Called when the language button is clicked */
|
|
683
|
+
/** Called when the language button is clicked and no `languages` array is supplied */
|
|
664
684
|
onLanguageClick?: () => void;
|
|
665
685
|
}
|
|
666
686
|
|
|
667
|
-
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;
|
|
668
688
|
|
|
669
689
|
interface DayNightTransitionProps extends HTMLAttributes<HTMLDivElement> {
|
|
670
690
|
/** URL for the daytime background image */
|