@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.css +53 -153
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +6 -19
- package/dist/index.d.ts +6 -19
- package/dist/index.js +267 -194
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +255 -182
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/tokens.css +213 -17
package/dist/index.d.mts
CHANGED
|
@@ -99,8 +99,11 @@ interface TextFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "cl
|
|
|
99
99
|
|
|
100
100
|
declare const TextField: react.ForwardRefExoticComponent<TextFieldProps & react.RefAttributes<HTMLInputElement>>;
|
|
101
101
|
|
|
102
|
+
type SearchFieldVariant = "outline" | "fill";
|
|
102
103
|
type SearchFieldStatus = "neutral" | "success" | "fail";
|
|
103
104
|
interface SearchFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "className"> {
|
|
105
|
+
/** Visual style of the field. Defaults to "outline". */
|
|
106
|
+
variant?: SearchFieldVariant;
|
|
104
107
|
/** Visual validation state. Defaults to "neutral". */
|
|
105
108
|
status?: SearchFieldStatus;
|
|
106
109
|
/** Called when the clear (×) button is clicked.
|
|
@@ -639,16 +642,6 @@ interface NavItem {
|
|
|
639
642
|
feature?: NavDropdownFeature;
|
|
640
643
|
};
|
|
641
644
|
}
|
|
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
|
-
}
|
|
652
645
|
interface NavbarProps extends HTMLAttributes<HTMLElement> {
|
|
653
646
|
/**
|
|
654
647
|
* `dark` — hero beneath has a dark / image background; pill uses white/24 tint, text is white.
|
|
@@ -672,19 +665,13 @@ interface NavbarProps extends HTMLAttributes<HTMLElement> {
|
|
|
672
665
|
ctaLabel?: string;
|
|
673
666
|
/** Destination for the CTA button */
|
|
674
667
|
ctaHref?: string;
|
|
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" */
|
|
668
|
+
/** Language label rendered next to the globe icon, e.g. "EN" */
|
|
682
669
|
languageLabel?: string;
|
|
683
|
-
/** Called when the language button is clicked
|
|
670
|
+
/** Called when the language button is clicked */
|
|
684
671
|
onLanguageClick?: () => void;
|
|
685
672
|
}
|
|
686
673
|
|
|
687
|
-
declare const Navbar: ({ theme, logoSrc, logoSrcDark, logoHref, navItems, loginLabel, loginHref, ctaLabel, ctaHref,
|
|
674
|
+
declare const Navbar: ({ theme, logoSrc, logoSrcDark, logoHref, navItems, loginLabel, loginHref, ctaLabel, ctaHref, languageLabel, onLanguageClick, className, ...props }: NavbarProps) => react_jsx_runtime.JSX.Element;
|
|
688
675
|
|
|
689
676
|
interface DayNightTransitionProps extends HTMLAttributes<HTMLDivElement> {
|
|
690
677
|
/** URL for the daytime background image */
|
package/dist/index.d.ts
CHANGED
|
@@ -99,8 +99,11 @@ interface TextFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "cl
|
|
|
99
99
|
|
|
100
100
|
declare const TextField: react.ForwardRefExoticComponent<TextFieldProps & react.RefAttributes<HTMLInputElement>>;
|
|
101
101
|
|
|
102
|
+
type SearchFieldVariant = "outline" | "fill";
|
|
102
103
|
type SearchFieldStatus = "neutral" | "success" | "fail";
|
|
103
104
|
interface SearchFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "className"> {
|
|
105
|
+
/** Visual style of the field. Defaults to "outline". */
|
|
106
|
+
variant?: SearchFieldVariant;
|
|
104
107
|
/** Visual validation state. Defaults to "neutral". */
|
|
105
108
|
status?: SearchFieldStatus;
|
|
106
109
|
/** Called when the clear (×) button is clicked.
|
|
@@ -639,16 +642,6 @@ interface NavItem {
|
|
|
639
642
|
feature?: NavDropdownFeature;
|
|
640
643
|
};
|
|
641
644
|
}
|
|
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
|
-
}
|
|
652
645
|
interface NavbarProps extends HTMLAttributes<HTMLElement> {
|
|
653
646
|
/**
|
|
654
647
|
* `dark` — hero beneath has a dark / image background; pill uses white/24 tint, text is white.
|
|
@@ -672,19 +665,13 @@ interface NavbarProps extends HTMLAttributes<HTMLElement> {
|
|
|
672
665
|
ctaLabel?: string;
|
|
673
666
|
/** Destination for the CTA button */
|
|
674
667
|
ctaHref?: string;
|
|
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" */
|
|
668
|
+
/** Language label rendered next to the globe icon, e.g. "EN" */
|
|
682
669
|
languageLabel?: string;
|
|
683
|
-
/** Called when the language button is clicked
|
|
670
|
+
/** Called when the language button is clicked */
|
|
684
671
|
onLanguageClick?: () => void;
|
|
685
672
|
}
|
|
686
673
|
|
|
687
|
-
declare const Navbar: ({ theme, logoSrc, logoSrcDark, logoHref, navItems, loginLabel, loginHref, ctaLabel, ctaHref,
|
|
674
|
+
declare const Navbar: ({ theme, logoSrc, logoSrcDark, logoHref, navItems, loginLabel, loginHref, ctaLabel, ctaHref, languageLabel, onLanguageClick, className, ...props }: NavbarProps) => react_jsx_runtime.JSX.Element;
|
|
688
675
|
|
|
689
676
|
interface DayNightTransitionProps extends HTMLAttributes<HTMLDivElement> {
|
|
690
677
|
/** URL for the daytime background image */
|