@selfdecode/sd-component-library 2.43.16 → 2.43.20
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/components/buttons/button/interfaces.d.ts +5 -0
- package/lib/components/buttons/cta/cta-button/interfaces.d.ts +1 -1
- package/lib/components/buttons/cta/primary-blue-button/interfaces.d.ts +1 -1
- package/lib/components/buttons/cta/primary-text-button/interfaces.d.ts +1 -1
- package/lib/components/buttons/cta/secondary-blue-button/interfaces.d.ts +1 -1
- package/lib/components/custom-scrollbar-box/interfaces.d.ts +17 -4
- package/lib/components/feedback/base-feedback-button/interfaces.d.ts +1 -1
- package/lib/components/feedback/multiple-options-feedback/interfaces.d.ts +1 -0
- package/lib/components/feedback/yes-no-feedback-block/interfaces.d.ts +1 -0
- package/lib/components/inputs/date-inputs/primary-date-range-input/index.d.ts +1 -0
- package/lib/components/inputs/date-inputs/primary-date-range-input/interfaces.d.ts +21 -0
- package/lib/components/inputs/date-inputs/primary-date-range-input/primary-date-range-input.d.ts +3 -0
- package/lib/components/inputs/input/interfaces.d.ts +2 -2
- package/lib/components/inputs/multi-row-secondary-text-input/index.d.ts +1 -0
- package/lib/components/inputs/multi-row-secondary-text-input/interfaces.d.ts +7 -0
- package/lib/components/inputs/multi-row-secondary-text-input/multi-row-secondary-text-input.d.ts +3 -0
- package/lib/components/meters/multi-option-discrete-outline-meter/interfaces.d.ts +1 -0
- package/lib/components/selectors/combined-secondary-selector-v2/combined-secondary-selector-v2.d.ts +3 -0
- package/lib/components/selectors/combined-secondary-selector-v2/index.d.ts +1 -0
- package/lib/components/selectors/combined-secondary-selector-v2/interfaces.d.ts +5 -0
- package/lib/components/selectors/selector-v2/interfaces.d.ts +2 -1
- package/lib/components/selectors/selector-v2/partials/base-selector-v2/interfaces.d.ts +8 -0
- package/lib/components/tabs/tab-bar-v2/partials/tab-v2/interfaces.d.ts +4 -0
- package/lib/components/tooltips/tooltip-with-pointer/index.d.ts +1 -0
- package/lib/components/tooltips/tooltip-with-pointer/interfaces.d.ts +11 -0
- package/lib/components/tooltips/tooltip-with-pointer/tooltip-with-pointer.d.ts +3 -0
- package/lib/core/theme.d.ts +3 -0
- package/lib/index.d.ts +4 -0
- package/lib/index.js +1 -1
- package/package.json +2 -1
|
@@ -2,6 +2,7 @@ import { ReactNode } from "react";
|
|
|
2
2
|
import { History } from "history";
|
|
3
3
|
import { BaseComponentProps } from "../../interfaces";
|
|
4
4
|
import { LoadingSpinnerProps as LoadingIconProps } from "../../animations/loading-spinner/interfaces";
|
|
5
|
+
import { SxProps } from "rebass";
|
|
5
6
|
/**
|
|
6
7
|
* Defines the button component's properties. You cannot pass
|
|
7
8
|
* both onClick and link props at the same time
|
|
@@ -164,4 +165,8 @@ export interface ButtonProps extends BaseComponentProps {
|
|
|
164
165
|
* Style props passed to the loadingIcon when loading is true
|
|
165
166
|
*/
|
|
166
167
|
loadingIconProps?: LoadingIconProps;
|
|
168
|
+
/**
|
|
169
|
+
* Button component sx.
|
|
170
|
+
*/
|
|
171
|
+
sx?: SxProps["sx"];
|
|
167
172
|
}
|
|
@@ -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" | "minWidth" | "maxWidth" | "minHeight" | "maxHeight">;
|
|
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" | "minHeight" | "maxHeight" | "letterSpacing" | "sx">;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { CtaButtonProps } from "../cta-button";
|
|
2
|
-
export declare type PrimaryBlueButtonProps = Pick<CtaButtonProps, "children" | "disabled" | "history" | "link" | "isInternal" | "onClick" | "scrollTo" | "width" | "height" | "borderRadius" | "v1" | "m" | "mt" | "mr" | "mb" | "ml" | "loading" | "loadingIconProps" | "minWidth" | "maxWidth" | "minHeight" | "maxHeight">;
|
|
2
|
+
export declare type PrimaryBlueButtonProps = Pick<CtaButtonProps, "children" | "disabled" | "history" | "link" | "isInternal" | "onClick" | "scrollTo" | "width" | "height" | "borderRadius" | "v1" | "m" | "mt" | "mr" | "mb" | "ml" | "loading" | "loadingIconProps" | "minWidth" | "maxWidth" | "minHeight" | "maxHeight" | "sx">;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { CtaButtonProps } from "../cta-button";
|
|
2
|
-
export declare type PrimaryTextButtonProps = Pick<CtaButtonProps, "children" | "disabled" | "history" | "link" | "isInternal" | "onClick" | "scrollTo" | "width" | "color" | "borderRadius" | "m" | "mt" | "mr" | "mb" | "ml" | "height" | "padding" | "loading" | "loadingIconProps">;
|
|
2
|
+
export declare type PrimaryTextButtonProps = Pick<CtaButtonProps, "children" | "disabled" | "history" | "link" | "isInternal" | "onClick" | "scrollTo" | "width" | "color" | "borderRadius" | "m" | "mt" | "mr" | "mb" | "ml" | "height" | "padding" | "loading" | "loadingIconProps" | "letterSpacing">;
|
|
@@ -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" | "minWidth" | "maxWidth" | "minHeight" | "maxHeight">;
|
|
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" | "minHeight" | "maxHeight" | "sx">;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { CSSProperties } from "react";
|
|
2
|
+
import { SxProps } from "rebass";
|
|
2
3
|
export interface CustomScrollbarBoxProps {
|
|
3
4
|
/**
|
|
4
5
|
* Content inside the scroll box
|
|
@@ -11,11 +12,11 @@ export interface CustomScrollbarBoxProps {
|
|
|
11
12
|
/**
|
|
12
13
|
* Height of the box
|
|
13
14
|
*/
|
|
14
|
-
height:
|
|
15
|
+
height: string | string[];
|
|
15
16
|
/**
|
|
16
17
|
* Width of the box
|
|
17
18
|
*/
|
|
18
|
-
width:
|
|
19
|
+
width: string | string[];
|
|
19
20
|
/**
|
|
20
21
|
* Color of the background of the scrollbar
|
|
21
22
|
*/
|
|
@@ -31,5 +32,17 @@ export interface CustomScrollbarBoxProps {
|
|
|
31
32
|
/**
|
|
32
33
|
* Padding around the content
|
|
33
34
|
*/
|
|
34
|
-
p?:
|
|
35
|
+
p?: string | string[];
|
|
36
|
+
/**
|
|
37
|
+
* Y-overflow of the content
|
|
38
|
+
*/
|
|
39
|
+
overflowY?: CSSProperties["overflowY"];
|
|
40
|
+
/**
|
|
41
|
+
* Max height of the content
|
|
42
|
+
*/
|
|
43
|
+
maxHeight?: string | string[];
|
|
44
|
+
/**
|
|
45
|
+
* Sx prop to customize inner container
|
|
46
|
+
*/
|
|
47
|
+
sx?: SxProps["sx"];
|
|
35
48
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ButtonProps } from "../../buttons/button";
|
|
2
|
-
export interface BaseFeedbackButtonProps extends Pick<ButtonProps, "children" | "onClick"> {
|
|
2
|
+
export interface BaseFeedbackButtonProps extends Pick<ButtonProps, "children" | "onClick" | "disabled"> {
|
|
3
3
|
active?: boolean;
|
|
4
4
|
}
|
|
@@ -2,5 +2,6 @@ import { BaseFeedbackBlockProps } from "../base-feedback-container/interfaces";
|
|
|
2
2
|
export interface YesNoFeedbackBlockProps extends Omit<BaseFeedbackBlockProps, "children"> {
|
|
3
3
|
selectedOption?: YesNoOption;
|
|
4
4
|
onFeedback: (option: YesNoOption) => void;
|
|
5
|
+
disabled?: boolean;
|
|
5
6
|
}
|
|
6
7
|
export declare type YesNoOption = "yes" | "no";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { PrimaryDateRangeInput } from "./primary-date-range-input";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { BaseDateRangeInputProps } from "../base-date-range-input";
|
|
2
|
+
export interface PrimaryDateRangeInputProps extends Omit<BaseDateRangeInputProps, "showCalendar" | "children" | "onClose"> {
|
|
3
|
+
width?: string | string[];
|
|
4
|
+
/**
|
|
5
|
+
* Label props.
|
|
6
|
+
*/
|
|
7
|
+
label?: string;
|
|
8
|
+
labelColor?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Text to be displayed inside of input.
|
|
11
|
+
*/
|
|
12
|
+
text?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Placeholder to be displayed inside of input if text isn't specified.
|
|
15
|
+
*/
|
|
16
|
+
placeholder?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Distance between label and input.
|
|
19
|
+
*/
|
|
20
|
+
gap?: string | string[];
|
|
21
|
+
}
|
|
@@ -16,7 +16,7 @@ export declare type InputProps = BaseComponentProps & {
|
|
|
16
16
|
/**
|
|
17
17
|
* The padding to apply to the input.
|
|
18
18
|
*/
|
|
19
|
-
padding?:
|
|
19
|
+
padding?: string | string[];
|
|
20
20
|
/**
|
|
21
21
|
* The text alignment to use for the input
|
|
22
22
|
*/
|
|
@@ -24,7 +24,7 @@ export declare type InputProps = BaseComponentProps & {
|
|
|
24
24
|
/**
|
|
25
25
|
* The width of the input element
|
|
26
26
|
*/
|
|
27
|
-
width?:
|
|
27
|
+
width?: string | string[];
|
|
28
28
|
/**
|
|
29
29
|
* The input's placeholder
|
|
30
30
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { MultiRowSecondaryTextInput } from "./multi-row-secondary-text-input";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SecondaryTextInputProps } from "../secondary-text-input";
|
|
2
|
+
export interface MultiRowSecondaryTextInputProps extends Omit<SecondaryTextInputProps, "value" | "onChange"> {
|
|
3
|
+
value: string;
|
|
4
|
+
onChange: (value: string) => void;
|
|
5
|
+
rows?: number;
|
|
6
|
+
lineHeight?: number;
|
|
7
|
+
}
|
|
@@ -9,5 +9,6 @@ export interface MultiOptionDiscreteOutlineMeterProps<T> extends Omit<OutlineMet
|
|
|
9
9
|
export interface DiscreteOutlineMeterOption<T> {
|
|
10
10
|
label?: string;
|
|
11
11
|
value: T;
|
|
12
|
+
labelColor?: string;
|
|
12
13
|
}
|
|
13
14
|
export declare type SmallMultiOptionDiscreteOutlineMeterProps<T> = MultiOptionDiscreteOutlineMeterProps<T>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { CombinedSecondarySelectorV2 } from "./combined-secondary-selector-v2";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { SelectorV2Props } from "../selector-v2";
|
|
2
|
+
export interface CombinedSecondarySelectorV2Props extends Omit<SelectorV2Props, "variant" | "selectorLabel" | "labelMargin" | "labelContainerAlignItems" | "secondLabel" | "gap"> {
|
|
3
|
+
selectorLabel: string;
|
|
4
|
+
gap?: number;
|
|
5
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SelectorProps } from "../selector";
|
|
2
|
+
import { BaseSelectorV2Props } from "./partials/base-selector-v2";
|
|
2
3
|
export declare type SelectorOptionV2<T extends string | null = string> = {
|
|
3
4
|
id: string;
|
|
4
5
|
title: string;
|
|
@@ -7,7 +8,7 @@ export declare type SelectorOptionV2<T extends string | null = string> = {
|
|
|
7
8
|
/**
|
|
8
9
|
* Defines the selector component's properties.
|
|
9
10
|
*/
|
|
10
|
-
export interface SelectorV2Props<T extends string = string> extends Omit<SelectorProps, "onChange" | "defaultValue" | "options"> {
|
|
11
|
+
export interface SelectorV2Props<T extends string = string> extends Omit<SelectorProps, "onChange" | "defaultValue" | "options">, Pick<BaseSelectorV2Props, "pl" | "containerVariant" | "labelContainerAlignItems"> {
|
|
11
12
|
/**
|
|
12
13
|
* Default value of the selector.
|
|
13
14
|
*/
|
|
@@ -22,4 +22,12 @@ export interface BaseSelectorV2Props<T extends string = string> extends Omit<Sel
|
|
|
22
22
|
* How to align items in label container.
|
|
23
23
|
*/
|
|
24
24
|
labelContainerAlignItems?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Left padding of the select element.
|
|
27
|
+
*/
|
|
28
|
+
pl?: string | string[];
|
|
29
|
+
/**
|
|
30
|
+
* Variant for the selector container.
|
|
31
|
+
*/
|
|
32
|
+
containerVariant?: string;
|
|
25
33
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TooltipWithPointer } from "./tooltip-with-pointer";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface TooltipWithPointerProps {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
tooltipText: string;
|
|
5
|
+
tooltipWidth?: string | string[];
|
|
6
|
+
placement?: "left" | "right";
|
|
7
|
+
tooltipOffset?: number;
|
|
8
|
+
pointerSize?: number;
|
|
9
|
+
tooltipPx?: string | string[];
|
|
10
|
+
tooltipPy?: string | string[];
|
|
11
|
+
}
|
package/lib/core/theme.d.ts
CHANGED
package/lib/index.d.ts
CHANGED
|
@@ -92,6 +92,8 @@ export { BaseDateRangeInput } from "./components/inputs/date-inputs/base-date-ra
|
|
|
92
92
|
export type { BaseDateRangeInputProps };
|
|
93
93
|
export { OutlinedDateRangeInput } from "./components/inputs/date-inputs/outlined-date-range-input";
|
|
94
94
|
export type { OutlinedDateRangeInputProps };
|
|
95
|
+
export { MultiRowSecondaryTextInput } from "./components/inputs/multi-row-secondary-text-input";
|
|
96
|
+
export { PrimaryDateRangeInput } from "./components/inputs/date-inputs/primary-date-range-input";
|
|
95
97
|
export { Link } from "./components/links/link";
|
|
96
98
|
export declare type LinkProps = BaseLinkProps;
|
|
97
99
|
export { PrimaryLink } from "./components/links/primary-link";
|
|
@@ -140,6 +142,7 @@ export type { SelectorV2Props, SelectorOptionV2, } from "./components/selectors/
|
|
|
140
142
|
export { TertiarySelectorV2 } from "./components/selectors/tertiary-selector-v2";
|
|
141
143
|
export { SecondarySelectorV2 } from "./components/selectors/secondary-selector-v2";
|
|
142
144
|
export { PrimarySelectorV2 } from "./components/selectors/primary-selector-v2";
|
|
145
|
+
export { CombinedSecondarySelectorV2 } from "./components/selectors/combined-secondary-selector-v2";
|
|
143
146
|
export { Slider } from "./components/slider";
|
|
144
147
|
export declare type SlideSettings = SlideSettingsType;
|
|
145
148
|
export { TextSwitch } from "./components/switches/text-switch";
|
|
@@ -185,6 +188,7 @@ export { StarTooltip } from "./components/tooltips/star-tooltip";
|
|
|
185
188
|
export { RadioInfoButtonTooltip } from "./components/tooltips/radio-info-button-tooltip";
|
|
186
189
|
export { ReactElementTooltip } from "./components/tooltips/react-element-tooltip";
|
|
187
190
|
export { ActionsTooltip } from "./components/tooltips/actions-tooltip";
|
|
191
|
+
export { TooltipWithPointer } from "./components/tooltips/tooltip-with-pointer";
|
|
188
192
|
export { Footer } from "./components/complex/footer";
|
|
189
193
|
export { Navbar, getLabShopsUrlProps } from "./components/complex/navbar";
|
|
190
194
|
export { Anchor } from "./components/utils/anchor";
|