@selfdecode/sd-component-library 2.42.30 → 2.42.31
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/lib/269d4dbd2027234c18668478378a32a4.svg +3 -0
- package/lib/components/animations/up-down-arrow/up-down-arrow.d.ts +1 -0
- package/lib/components/bicolor-badge/interfaces.d.ts +1 -0
- package/lib/components/checkboxes/checkbox/checkbox.d.ts +1 -0
- package/lib/components/complex/footer/partials/footer-link/footer-link.d.ts +1 -0
- package/lib/components/complex/footer/partials/footer-section/footer-section.d.ts +1 -0
- package/lib/components/complex/footer/partials/footer-social/footer-social.d.ts +1 -0
- package/lib/components/complex/footer/presentational/footer-presentational.d.ts +1 -0
- package/lib/components/complex/navbar/partials/navbar-v1/partials/navbar-desktop-v1/partials/menu-row/menu-row.d.ts +1 -0
- package/lib/components/complex/navbar/partials/navbar-v1/partials/navbar-desktop-v1/partials/new-apps/new-apps.d.ts +1 -0
- package/lib/components/complex/navbar/partials/navbar-v2/partials/interfaces.d.ts +16 -0
- package/lib/components/complex/navbar/partials/navbar-v2/partials/navbar-desktop-v2/partials/menu-box/menu-box.d.ts +1 -0
- package/lib/components/complex/navbar/partials/navbar-v2/partials/navbar-mobile-v2/partials/navbar-mobile-unfolded-navigation/interfaces.d.ts +1 -1
- package/lib/components/complex/navbar/partials/navbar-v2/presentational/interfaces.d.ts +4 -0
- package/lib/components/complex/navbar/presentational/constants-v3.d.ts +1 -0
- package/lib/components/complex/navbar/presentational/interfaces.d.ts +12 -0
- package/lib/components/complex/navbar/presentational/language-mapping.d.ts +1 -0
- package/lib/components/complex/navbar/presentational/navbar-presentational.d.ts +1 -0
- package/lib/components/containers/max-width-container/max-width-container.d.ts +1 -0
- package/lib/components/containers/section-container/section-container.d.ts +1 -0
- package/lib/components/feature-explanation/feature-explanation.d.ts +1 -0
- package/lib/components/icons/globe-icon/globe.svg +3 -0
- package/lib/components/icons/globe-icon/index.d.ts +1 -0
- package/lib/components/icons/index.d.ts +7 -6
- package/lib/components/inputs/search-input/partials/search-box/search-box.d.ts +1 -0
- package/lib/components/labels/base-label/base-label.d.ts +1 -0
- package/lib/components/radio-button/radio-button.d.ts +1 -0
- package/lib/components/ratings/five-stars-rating/five-stars-rating.d.ts +1 -0
- package/lib/components/selectors/compact-primary-selector/compact-primary-selector.d.ts +1 -0
- package/lib/components/selectors/primary-selector/primary-selector.d.ts +1 -0
- package/lib/components/selectors/secondary-selector/secondary-selector.d.ts +1 -0
- package/lib/components/selectors/selector/selector.d.ts +1 -0
- package/lib/components/selectors/selector-v2/partials/base-selector-v2/base-selector-v2.d.ts +1 -0
- package/lib/components/selectors/selector-v2/selector-v2.d.ts +1 -0
- package/lib/components/selectors/tertiary-selector/tertiary-selector.d.ts +1 -0
- package/lib/components/slider/partials/step-circles/step-circles.d.ts +1 -0
- package/lib/components/slider/slider.d.ts +1 -0
- package/lib/components/tabs/tab-bar/partials/tab/tab.d.ts +1 -0
- package/lib/components/tabs/tab-bar/tab-bar.d.ts +1 -0
- package/lib/components/tabs/tabbed-view/tabbed-view.d.ts +1 -0
- package/lib/components/tabs/tabs-menu/tabs-menu.d.ts +1 -0
- package/lib/components/texts/base-text/base-text.d.ts +1 -0
- package/lib/components/texts/eighteen-bold/eighteen-bold.d.ts +1 -0
- package/lib/components/texts/eighteen-regular/eighteen-regular.d.ts +1 -0
- package/lib/components/texts/fifty-five-sb/fifty-five-sb.d.ts +1 -0
- package/lib/components/texts/fourteen-regular/fourteen-regular.d.ts +1 -0
- package/lib/components/texts/fourteen-sb/fourteen-sb.d.ts +1 -0
- package/lib/components/texts/fourty-bold/fourty-bold.d.ts +1 -0
- package/lib/components/texts/no-translate/index.d.ts +1 -0
- package/lib/components/texts/no-translate/no-translate.d.ts +3 -0
- package/lib/components/texts/sixteen-regular/sixteen-regular.d.ts +1 -0
- package/lib/components/texts/ten-sb/ten-sb.d.ts +1 -0
- package/lib/components/texts/thirteen-bold/thirteen-bold.d.ts +1 -0
- package/lib/components/texts/thirteen-regular/thirteen-regular.d.ts +1 -0
- package/lib/components/texts/thirteen-sb/thirteen-sb.d.ts +1 -0
- package/lib/components/texts/thirty-two-bold/thirty-two-bold.d.ts +1 -0
- package/lib/components/texts/thirty-two-regular/thirty-two-regular.d.ts +1 -0
- package/lib/components/texts/twelve-regular/twelve-regular.d.ts +1 -0
- package/lib/components/texts/twelve-sb/twelve-sb.d.ts +1 -0
- package/lib/components/texts/twenty-four-bold/twenty-four-bold.d.ts +1 -0
- package/lib/components/texts/twenty-four-regular/twenty-four-regular.d.ts +1 -0
- package/lib/components/utils/scroll-to-top/scroll-to-top.d.ts +1 -0
- package/lib/components/utils/scroll-to-top-on-mount/scroll-to-top-on-mount.d.ts +1 -0
- package/lib/index.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
|
|
2
|
+
<path id="Icon_material-language" data-name="Icon material-language" d="M12.99,3A10,10,0,1,0,23,13,10,10,0,0,0,12.99,3Zm6.93,6H16.97a15.649,15.649,0,0,0-1.38-3.56A8.03,8.03,0,0,1,19.92,9ZM13,5.04A14.087,14.087,0,0,1,14.91,9H11.09A14.087,14.087,0,0,1,13,5.04ZM5.26,15a7.822,7.822,0,0,1,0-4H8.64a16.515,16.515,0,0,0-.14,2,16.515,16.515,0,0,0,.14,2Zm.82,2H9.03a15.649,15.649,0,0,0,1.38,3.56A7.987,7.987,0,0,1,6.08,17ZM9.03,9H6.08a7.987,7.987,0,0,1,4.33-3.56A15.649,15.649,0,0,0,9.03,9ZM13,20.96A14.087,14.087,0,0,1,11.09,17h3.82A14.087,14.087,0,0,1,13,20.96ZM15.34,15H10.66a14.713,14.713,0,0,1-.16-2,14.585,14.585,0,0,1,.16-2h4.68a14.585,14.585,0,0,1,.16,2A14.713,14.713,0,0,1,15.34,15Zm.25,5.56A15.649,15.649,0,0,0,16.97,17h2.95a8.03,8.03,0,0,1-4.33,3.56ZM17.36,15a16.515,16.515,0,0,0,.14-2,16.515,16.515,0,0,0-.14-2h3.38a7.822,7.822,0,0,1,0,4Z" transform="translate(-3 -3)" />
|
|
3
|
+
</svg>
|
|
@@ -4,6 +4,10 @@ export declare type NavItem = {
|
|
|
4
4
|
* The text to be shown in the link
|
|
5
5
|
*/
|
|
6
6
|
title: string;
|
|
7
|
+
/**
|
|
8
|
+
* Optional mobile title
|
|
9
|
+
*/
|
|
10
|
+
mobileTitle?: string;
|
|
7
11
|
/**
|
|
8
12
|
* The links that should be displayed when:
|
|
9
13
|
* - in desktop view, the user hovers this NavItem
|
|
@@ -22,6 +26,14 @@ export declare type NavItem = {
|
|
|
22
26
|
* An SVG Component to be placed to the left of the title
|
|
23
27
|
*/
|
|
24
28
|
Icon?: FC<SVGProps<SVGSVGElement>>;
|
|
29
|
+
/**
|
|
30
|
+
* Whether or not to hide arrow
|
|
31
|
+
*/
|
|
32
|
+
hideArrow?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Whether to include icon in mobile navbar menu
|
|
35
|
+
*/
|
|
36
|
+
mobileShowIcon?: boolean;
|
|
25
37
|
};
|
|
26
38
|
export declare type NavMenuItem = {
|
|
27
39
|
/**
|
|
@@ -59,4 +71,8 @@ export declare type NavMenuItem = {
|
|
|
59
71
|
* What to do instead of redirecting to a url.
|
|
60
72
|
*/
|
|
61
73
|
onClick?: () => void;
|
|
74
|
+
/**
|
|
75
|
+
* Whether item is currenly selected (and hence should be highlighted)
|
|
76
|
+
*/
|
|
77
|
+
isSelected?: boolean;
|
|
62
78
|
};
|
|
@@ -2,7 +2,7 @@ import { NavbarMobileV2PresentationalProps } from "../../presentational/interfac
|
|
|
2
2
|
/**
|
|
3
3
|
* Defines the NavigationUnfolded component's properties.
|
|
4
4
|
*/
|
|
5
|
-
export declare type NavbarMobileUnfoldedNavigationProps = Pick<NavbarMobileV2PresentationalProps, "itemsInCart" | "onClickCartIcon" | "unsubscribedUser" | "accountNavItem" | "navItems" | "hideSearch"> & {
|
|
5
|
+
export declare type NavbarMobileUnfoldedNavigationProps = Pick<NavbarMobileV2PresentationalProps, "itemsInCart" | "onClickCartIcon" | "unsubscribedUser" | "accountNavItem" | "navItems" | "hideSearch" | "languageNavItem"> & {
|
|
6
6
|
/**
|
|
7
7
|
* Callback function to be called when the X icon button is clicked
|
|
8
8
|
*/
|
|
@@ -2,3 +2,4 @@ import { NavItem } from "../partials/navbar-v2/partials/interfaces";
|
|
|
2
2
|
export declare const geneticsNavItem: NavItem;
|
|
3
3
|
export declare const labsNavItem: NavItem;
|
|
4
4
|
export declare const getMyAccountNavItem: (isPractitioner: boolean, onLogout?: (() => void) | undefined) => NavItem;
|
|
5
|
+
export declare const getLanguageNavItem: (selectedLangCode: string, langCodes: string[], onLanguageSwitch: (langCode: string) => void) => NavItem;
|
|
@@ -87,4 +87,16 @@ export declare type NavbarProps = {
|
|
|
87
87
|
* }
|
|
88
88
|
*/
|
|
89
89
|
onLogout?: () => void;
|
|
90
|
+
/**
|
|
91
|
+
* User current selected language code
|
|
92
|
+
*/
|
|
93
|
+
selectedLangCode: string;
|
|
94
|
+
/**
|
|
95
|
+
* List of selectable language codes
|
|
96
|
+
*/
|
|
97
|
+
langCodes: string[];
|
|
98
|
+
/**
|
|
99
|
+
* What to do on language switch
|
|
100
|
+
*/
|
|
101
|
+
onLanguageSwitch: (langCode: string) => void;
|
|
90
102
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getNativeLanguageName: (langCode: string) => string | undefined;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
|
|
2
|
+
<path id="Icon_material-language" data-name="Icon material-language" d="M12.99,3A10,10,0,1,0,23,13,10,10,0,0,0,12.99,3Zm6.93,6H16.97a15.649,15.649,0,0,0-1.38-3.56A8.03,8.03,0,0,1,19.92,9ZM13,5.04A14.087,14.087,0,0,1,14.91,9H11.09A14.087,14.087,0,0,1,13,5.04ZM5.26,15a7.822,7.822,0,0,1,0-4H8.64a16.515,16.515,0,0,0-.14,2,16.515,16.515,0,0,0,.14,2Zm.82,2H9.03a15.649,15.649,0,0,0,1.38,3.56A7.987,7.987,0,0,1,6.08,17ZM9.03,9H6.08a7.987,7.987,0,0,1,4.33-3.56A15.649,15.649,0,0,0,9.03,9ZM13,20.96A14.087,14.087,0,0,1,11.09,17h3.82A14.087,14.087,0,0,1,13,20.96ZM15.34,15H10.66a14.713,14.713,0,0,1-.16-2,14.585,14.585,0,0,1,.16-2h4.68a14.585,14.585,0,0,1,.16,2A14.713,14.713,0,0,1,15.34,15Zm.25,5.56A15.649,15.649,0,0,0,16.97,17h2.95a8.03,8.03,0,0,1-4.33,3.56ZM17.36,15a16.515,16.515,0,0,0,.14-2,16.515,16.515,0,0,0-.14-2h3.38a7.822,7.822,0,0,1,0,4Z" transform="translate(-3 -3)" />
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ReactComponent as GlobeIcon } from "./globe.svg";
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
+
export { BorderedPlainWarningCircleIcon } from "./bordered-plain-warning-circle-icon";
|
|
1
2
|
export { CartIcon } from "./cart-icon";
|
|
2
3
|
export { CrossIcon } from "./cross-icon";
|
|
3
4
|
export { GeneticsIcon } from "./genetics-icon";
|
|
5
|
+
export { GlobeIcon } from "./globe-icon";
|
|
4
6
|
export { HamburgerIcon } from "./hamburger-icon";
|
|
7
|
+
export { PlainWarningCircleIcon } from "./plain-warning-circle-icon";
|
|
5
8
|
export { ProfileIcon } from "./profile-icon";
|
|
9
|
+
export { RescanIcon } from "./rescan-icon";
|
|
10
|
+
export { RoundBorderedStar } from "./round-bordered-star";
|
|
6
11
|
export { SDLogoNoTextIcon } from "./sd-logo-no-text-icon";
|
|
7
12
|
export { SDLogoWhiteIcon } from "./sd-logo-white-icon";
|
|
13
|
+
export { SDNavbarIcon } from "./sd-navbar-icon";
|
|
8
14
|
export { SearchIcon } from "./search-icon";
|
|
9
15
|
export { ShortDownArrowIcon } from "./short-dropdown-arrow-icon";
|
|
10
|
-
export { VialIcon } from "./vial-icon";
|
|
11
|
-
export { RescanIcon } from "./rescan-icon";
|
|
12
|
-
export { SDNavbarIcon } from "./sd-navbar-icon";
|
|
13
16
|
export { StarIcon } from "./star-icon";
|
|
17
|
+
export { VialIcon } from "./vial-icon";
|
|
14
18
|
export { WarningCircleIcon } from "./warning-circle-icon";
|
|
15
|
-
export { BorderedPlainWarningCircleIcon } from "./bordered-plain-warning-circle-icon";
|
|
16
|
-
export { PlainWarningCircleIcon } from "./plain-warning-circle-icon";
|
|
17
|
-
export { RoundBorderedStar } from "./round-bordered-star";
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { CompactPrimarySelectorProps as Props } from "./interfaces";
|
|
2
3
|
export declare const CompactPrimarySelector: <T extends string = string>(props: Pick<import("../selector").SelectorProps<T>, "width" | "m" | "mt" | "mr" | "mb" | "ml" | "onChange" | "name" | "defaultValue" | "textTransform" | "selectorLabel" | "options" | "disabledTextValue" | "hideDefaultOnSelect" | "labelMargin">) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { NoTranslate } from "./no-translate";
|