@selfdecode/sd-component-library 2.43.8 → 2.43.12

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.
Files changed (26) hide show
  1. package/lib/components/breadcrumbs/breadcrumb/crumb/interfaces.d.ts +1 -0
  2. package/lib/components/buttons/button/interfaces.d.ts +7 -5
  3. package/lib/components/buttons/cta/cta-button/interfaces.d.ts +1 -1
  4. package/lib/components/buttons/cta/secondary-blue-button/interfaces.d.ts +1 -1
  5. package/lib/components/complex/navbar/index.d.ts +1 -1
  6. package/lib/components/complex/navbar/presentational/index.d.ts +1 -0
  7. package/lib/components/inputs/autocomplete-input/interfaces.d.ts +4 -0
  8. package/lib/components/inputs/autocomplete-input/partials/results-box/interfaces.d.ts +4 -0
  9. package/lib/components/progress-bars/progress-bar/interfaces.d.ts +2 -2
  10. package/lib/components/progress-bars/rounded-progress-bar/index.d.ts +1 -0
  11. package/lib/components/progress-bars/rounded-progress-bar/interfaces.d.ts +24 -0
  12. package/lib/components/progress-bars/rounded-progress-bar/rounded-progress-bar.d.ts +3 -0
  13. package/lib/components/selectors/compact-primary-selector/compact-primary-selector.d.ts +1 -1
  14. package/lib/components/selectors/compact-primary-selector/interfaces.d.ts +1 -1
  15. package/lib/components/selectors/primary-selector/interfaces.d.ts +1 -1
  16. package/lib/components/selectors/primary-selector/primary-selector.d.ts +1 -1
  17. package/lib/components/selectors/primary-selector-v2/interfaces.d.ts +1 -1
  18. package/lib/components/selectors/secondary-selector/interfaces.d.ts +1 -1
  19. package/lib/components/selectors/secondary-selector-v2/interfaces.d.ts +1 -1
  20. package/lib/components/selectors/selector/interfaces.d.ts +4 -0
  21. package/lib/components/selectors/tertiary-selector/interfaces.d.ts +1 -1
  22. package/lib/components/selectors/tertiary-selector/tertiary-selector.d.ts +1 -1
  23. package/lib/components/selectors/tertiary-selector-v2/interfaces.d.ts +1 -1
  24. package/lib/index.d.ts +2 -1
  25. package/lib/index.js +1 -1
  26. package/package.json +1 -1
@@ -1,6 +1,7 @@
1
1
  import { CSSProperties } from "react";
2
2
  export declare type CrumbType = {
3
3
  title: string;
4
+ dontTranslate?: boolean;
4
5
  onClick?: () => void;
5
6
  };
6
7
  /**
@@ -14,7 +14,7 @@ export interface ButtonProps extends BaseComponentProps {
14
14
  */
15
15
  link?: string;
16
16
  /**
17
- * Indicates wheter the url provided in the link prop can be
17
+ * Indicates whether the url provided in the link prop can be
18
18
  * handled by React-Router or not.
19
19
  *
20
20
  * Default value: true
@@ -47,7 +47,7 @@ export interface ButtonProps extends BaseComponentProps {
47
47
  /**
48
48
  * padding for the button
49
49
  */
50
- padding?: Array<string>;
50
+ padding?: string | string[];
51
51
  /**
52
52
  * The font-size css property
53
53
  */
@@ -57,9 +57,9 @@ export interface ButtonProps extends BaseComponentProps {
57
57
  */
58
58
  fontWeight?: string;
59
59
  /**
60
- * The leter-spacing css property
60
+ * The letter-spacing css property
61
61
  */
62
- letterSpacing?: Array<string>;
62
+ letterSpacing?: string | string[];
63
63
  /**
64
64
  * The border radius for the button.
65
65
  */
@@ -68,10 +68,12 @@ export interface ButtonProps extends BaseComponentProps {
68
68
  * The button's width
69
69
  */
70
70
  width?: string | string[];
71
+ minWidth?: string | string[];
72
+ maxWidth?: string | string[];
71
73
  /**
72
74
  * The button's height
73
75
  */
74
- height?: Array<string>;
76
+ height?: string | string[];
75
77
  /**
76
78
  * The border style to apply to the button.
77
79
  */
@@ -2,4 +2,4 @@ import { ButtonProps } from "../../button";
2
2
  /**
3
3
  * Additional props we want to add
4
4
  */
5
- export declare type CtaButtonProps = Pick<ButtonProps, "link" | "isInternal" | "scrollTo" | "width" | "height" | "history" | "onClick" | "children" | "disabled" | "color" | "bg" | "borderColor" | "borderWidth" | "borderRadius" | "hoverBorderColor" | "hoverColor" | "hoverBg" | "v1" | "transition" | "m" | "mt" | "mr" | "mb" | "ml" | "padding" | "loading" | "loadingIconProps">;
5
+ export declare type CtaButtonProps = Pick<ButtonProps, "link" | "isInternal" | "scrollTo" | "width" | "height" | "history" | "onClick" | "children" | "disabled" | "color" | "bg" | "borderColor" | "borderWidth" | "borderRadius" | "hoverBorderColor" | "hoverColor" | "hoverBg" | "v1" | "transition" | "m" | "mt" | "mr" | "mb" | "ml" | "padding" | "loading" | "loadingIconProps" | "minWidth" | "maxWidth">;
@@ -1,2 +1,2 @@
1
1
  import { CtaButtonProps } from "../cta-button";
2
- export declare type SecondaryBlueButtonProps = Pick<CtaButtonProps, "children" | "disabled" | "history" | "link" | "isInternal" | "onClick" | "scrollTo" | "width" | "height" | "borderRadius" | "v1" | "m" | "mt" | "mr" | "mb" | "ml" | "loading" | "loadingIconProps">;
2
+ export declare type SecondaryBlueButtonProps = Pick<CtaButtonProps, "children" | "disabled" | "history" | "link" | "isInternal" | "onClick" | "scrollTo" | "width" | "height" | "borderRadius" | "v1" | "m" | "mt" | "mr" | "mb" | "ml" | "loading" | "loadingIconProps" | "minWidth" | "maxWidth">;
@@ -1 +1 @@
1
- export { NavbarPresentational as Navbar } from "./presentational";
1
+ export { NavbarPresentational as Navbar, getLabShopsUrlProps, } from "./presentational";
@@ -1 +1,2 @@
1
1
  export { NavbarPresentational } from "./navbar-presentational";
2
+ export { getLabShopsUrlProps } from "./url-utils";
@@ -21,6 +21,10 @@ export interface AutocompleteInputProps<T> extends Pick<SecondaryTextInputProps,
21
21
  * One possible use case is if you want don't want search/select text on the text field to dissapear, when switching between mobile to desktop layout.
22
22
  */
23
23
  initialValue?: string;
24
+ /**
25
+ * Whether to translate input and options.
26
+ */
27
+ translateContent?: boolean;
24
28
  }
25
29
  export interface AutocompleteOption<T> {
26
30
  /**
@@ -9,4 +9,8 @@ export interface ResultsBoxProps<T> {
9
9
  * Callback to be executed when option is selected.
10
10
  */
11
11
  onSelect: (option: string) => void;
12
+ /**
13
+ * Whether to allow translation of box content.
14
+ */
15
+ translateContent?: boolean;
12
16
  }
@@ -1,8 +1,8 @@
1
1
  import { BaseComponentProps } from "../../interfaces";
2
2
  /**
3
- * Defines the ProgpressBar component's properties.
3
+ * Defines the ProgressBar component's properties.
4
4
  */
5
- interface CommonProgressBarProps extends BaseComponentProps {
5
+ export interface CommonProgressBarProps extends BaseComponentProps {
6
6
  /**
7
7
  * The total amount of steps in our total progress
8
8
  */
@@ -0,0 +1 @@
1
+ export { RoundedProgressBar } from "./rounded-progress-bar";
@@ -0,0 +1,24 @@
1
+ import { SxProps } from "rebass";
2
+ import { CommonProgressBarProps } from "../progress-bar/interfaces";
3
+ export interface RoundedProgressBarProps extends Pick<CommonProgressBarProps, "currentStep" | "totalSteps"> {
4
+ /**
5
+ * Bar height.
6
+ */
7
+ height?: string | string[];
8
+ /**
9
+ * Border radius of the bars.
10
+ */
11
+ borderRadius?: string | string[];
12
+ /**
13
+ * Color of the not active part.
14
+ */
15
+ baseColor?: string;
16
+ /**
17
+ * Color of the active part.
18
+ */
19
+ activeColor?: string;
20
+ /**
21
+ * Sx prop to customize container.
22
+ */
23
+ containerSx?: SxProps["sx"];
24
+ }
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import { RoundedProgressBarProps as Props } from "./interfaces";
3
+ export declare const RoundedProgressBar: React.FC<Props>;
@@ -1,2 +1,2 @@
1
1
  import { CompactPrimarySelectorProps as Props } from "./interfaces";
2
- 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;
2
+ 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" | "translateSelect">) => JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import { SelectorProps } from "../selector";
2
- export declare type CompactPrimarySelectorProps<T extends string = string> = Pick<SelectorProps<T>, "name" | "defaultValue" | "options" | "selectorLabel" | "onChange" | "width" | "m" | "mt" | "mr" | "mb" | "ml" | "disabledTextValue" | "hideDefaultOnSelect" | "labelMargin" | "textTransform">;
2
+ export declare type CompactPrimarySelectorProps<T extends string = string> = Pick<SelectorProps<T>, "name" | "defaultValue" | "options" | "selectorLabel" | "onChange" | "width" | "m" | "mt" | "mr" | "mb" | "ml" | "disabledTextValue" | "hideDefaultOnSelect" | "labelMargin" | "textTransform" | "translateSelect">;
@@ -1,2 +1,2 @@
1
1
  import { SelectorProps } from "../selector";
2
- export declare type PrimarySelectorProps<T extends string = string> = Pick<SelectorProps<T>, "name" | "defaultValue" | "options" | "selectorLabel" | "onChange" | "width" | "m" | "mt" | "mr" | "mb" | "ml" | "disabledTextValue" | "hideDefaultOnSelect" | "selectElementHeight" | "textTransform">;
2
+ export declare type PrimarySelectorProps<T extends string = string> = Pick<SelectorProps<T>, "name" | "defaultValue" | "options" | "selectorLabel" | "onChange" | "width" | "m" | "mt" | "mr" | "mb" | "ml" | "disabledTextValue" | "hideDefaultOnSelect" | "selectElementHeight" | "textTransform" | "translateSelect">;
@@ -2,4 +2,4 @@ import { PrimarySelectorProps as Props } from "./interfaces";
2
2
  /**
3
3
  * The PrimarySelector.
4
4
  */
5
- export declare const PrimarySelector: <T extends string = string>(props: Pick<import("../selector").SelectorProps<T>, "width" | "m" | "mt" | "mr" | "mb" | "ml" | "onChange" | "name" | "defaultValue" | "textTransform" | "selectorLabel" | "options" | "disabledTextValue" | "hideDefaultOnSelect" | "selectElementHeight">) => JSX.Element;
5
+ export declare const PrimarySelector: <T extends string = string>(props: Pick<import("../selector").SelectorProps<T>, "width" | "m" | "mt" | "mr" | "mb" | "ml" | "onChange" | "name" | "defaultValue" | "textTransform" | "selectorLabel" | "options" | "disabledTextValue" | "hideDefaultOnSelect" | "selectElementHeight" | "translateSelect">) => JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import { SelectorV2Props } from "../selector-v2";
2
- export declare type PrimarySelectorV2Props = Omit<SelectorV2Props, "variant">;
2
+ export declare type PrimarySelectorV2Props<T extends string = string> = Omit<SelectorV2Props<T>, "variant">;
@@ -1,5 +1,5 @@
1
1
  import { SelectorProps } from "../selector";
2
- export declare type SecondarySelectorProps<T extends string = string> = Pick<SelectorProps<T>, "name" | "defaultValue" | "options" | "selectorLabel" | "onChange" | "width" | "m" | "mt" | "mr" | "mb" | "ml" | "disabledTextValue" | "hideDefaultOnSelect" | "secondLabel" | "selectElementHeight" | "errorMessage" | "hideErrorText" | "textTransform"> & {
2
+ export declare type SecondarySelectorProps<T extends string = string> = Pick<SelectorProps<T>, "name" | "defaultValue" | "options" | "selectorLabel" | "onChange" | "width" | "m" | "mt" | "mr" | "mb" | "ml" | "disabledTextValue" | "hideDefaultOnSelect" | "secondLabel" | "selectElementHeight" | "errorMessage" | "hideErrorText" | "textTransform" | "translateSelect"> & {
3
3
  /**
4
4
  * Optional amount of spacing between the
5
5
  * selectorLabel and the selectInput. Default value: ["3px"]
@@ -1,2 +1,2 @@
1
1
  import { SelectorV2Props } from "../selector-v2";
2
- export declare type SecondarySelectorV2Props = Omit<SelectorV2Props, "variant" | "labelContainerAlignItems">;
2
+ export declare type SecondarySelectorV2Props<T extends string = string> = Omit<SelectorV2Props<T>, "variant" | "labelContainerAlignItems">;
@@ -89,5 +89,9 @@ export declare type SelectorProps<T extends string = string> = BaseComponentProp
89
89
  * By default Selector checks the title property of the SelectorOption object. With this prop you can change this behaviour to check the value property instead.
90
90
  */
91
91
  useValueInsteadOfTitle?: boolean;
92
+ /**
93
+ * Whether to translate content of selector.
94
+ */
95
+ translateSelect?: boolean;
92
96
  };
93
97
  export declare type CurrentSelection<T extends string = string> = SelectorOption<T> | undefined;
@@ -1,2 +1,2 @@
1
1
  import { SelectorProps } from "../selector";
2
- export declare type TertiarySelectorProps<T extends string = string> = Pick<SelectorProps<T>, "name" | "defaultValue" | "options" | "selectorLabel" | "onChange" | "width" | "m" | "mt" | "mr" | "mb" | "ml" | "gap" | "disabledTextValue" | "hideDefaultOnSelect" | "labelMargin" | "selectElementHeight" | "errorMessage" | "hideErrorText" | "textTransform" | "secondLabel" | "defaultOptionColor" | "selectedOptionColor" | "errorBackground" | "onFocus" | "id">;
2
+ export declare type TertiarySelectorProps<T extends string = string> = Pick<SelectorProps<T>, "name" | "defaultValue" | "options" | "selectorLabel" | "onChange" | "width" | "m" | "mt" | "mr" | "mb" | "ml" | "gap" | "disabledTextValue" | "hideDefaultOnSelect" | "labelMargin" | "selectElementHeight" | "errorMessage" | "hideErrorText" | "textTransform" | "secondLabel" | "defaultOptionColor" | "selectedOptionColor" | "errorBackground" | "onFocus" | "id" | "translateSelect">;
@@ -2,4 +2,4 @@ import { TertiarySelectorProps as Props } from "./interfaces";
2
2
  /**
3
3
  * The TertiarySelector.
4
4
  */
5
- export declare const TertiarySelector: <T extends string = string>(props: Pick<import("../selector").SelectorProps<T>, "width" | "m" | "mt" | "mr" | "mb" | "ml" | "onChange" | "name" | "defaultValue" | "id" | "onFocus" | "textTransform" | "gap" | "errorBackground" | "errorMessage" | "hideErrorText" | "secondLabel" | "selectorLabel" | "options" | "disabledTextValue" | "hideDefaultOnSelect" | "labelMargin" | "selectElementHeight" | "defaultOptionColor" | "selectedOptionColor">) => JSX.Element;
5
+ export declare const TertiarySelector: <T extends string = string>(props: Pick<import("../selector").SelectorProps<T>, "width" | "m" | "mt" | "mr" | "mb" | "ml" | "onChange" | "name" | "defaultValue" | "id" | "onFocus" | "textTransform" | "gap" | "errorBackground" | "errorMessage" | "hideErrorText" | "secondLabel" | "selectorLabel" | "options" | "disabledTextValue" | "hideDefaultOnSelect" | "labelMargin" | "selectElementHeight" | "defaultOptionColor" | "selectedOptionColor" | "translateSelect">) => JSX.Element;
@@ -1,3 +1,3 @@
1
1
  import { SelectorV2Props } from "../selector-v2";
2
- export interface TertiarySelectorV2Props extends Omit<SelectorV2Props, "variant"> {
2
+ export interface TertiarySelectorV2Props<T extends string = string> extends Omit<SelectorV2Props<T>, "variant"> {
3
3
  }
package/lib/index.d.ts CHANGED
@@ -120,6 +120,7 @@ export { ProgressBar } from "./components/progress-bars/progress-bar";
120
120
  export declare type ProgressBarProps = BaseProgressBarProps;
121
121
  export { LineProgressBar } from "./components/progress-bars/line-progress-bar";
122
122
  export { StripedLineProgressBar } from "./components/progress-bars/striped-line-progress-bar";
123
+ export { RoundedProgressBar } from "./components/progress-bars/rounded-progress-bar";
123
124
  export { ProgressSteps } from "./components/progress-steps";
124
125
  export { RadioButton } from "./components/radio-button";
125
126
  export { FiveStarsRating } from "./components/ratings/five-stars-rating";
@@ -182,7 +183,7 @@ export { StarTooltip } from "./components/tooltips/star-tooltip";
182
183
  export { RadioInfoButtonTooltip } from "./components/tooltips/radio-info-button-tooltip";
183
184
  export { ReactElementTooltip } from "./components/tooltips/react-element-tooltip";
184
185
  export { Footer } from "./components/complex/footer";
185
- export { Navbar } from "./components/complex/navbar";
186
+ export { Navbar, getLabShopsUrlProps } from "./components/complex/navbar";
186
187
  export { Anchor } from "./components/utils/anchor";
187
188
  export { PageTracker } from "./components/utils/page-tracker";
188
189
  export { ScrollToTop } from "./components/utils/scroll-to-top";