@trackunit/react-components 0.0.48 → 0.0.51
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/README.md +12 -30
- package/common/CommonProps.d.ts +0 -2
- package/common/useContainerProps.d.ts +8 -0
- package/components/NumberField/NumberField.d.ts +0 -1
- package/components/NumberInput/NumberInput.d.ts +2 -2
- package/components/TextInput/TextInput.d.ts +2 -2
- package/components/alert/Alert.d.ts +6 -7
- package/components/badge/Badge.d.ts +8 -9
- package/components/baseInput/BaseInput.d.ts +0 -8
- package/components/buttons/button/Button.d.ts +0 -6
- package/components/buttons/icon-button/IconButton.d.ts +0 -3
- package/components/buttons/shared/ButtonProps.d.ts +0 -7
- package/components/buttons/shared/helpers.d.ts +10 -0
- package/components/buttons/star-button/StarButton.d.ts +6 -0
- package/components/card/Card.d.ts +7 -3
- package/components/card/CardBody.d.ts +5 -4
- package/components/card/CardFooter.d.ts +2 -2
- package/components/card/CardHeader.d.ts +4 -13
- package/components/card/DensityContainer.d.ts +10 -11
- package/components/chart/Chart.d.ts +5 -10
- package/components/checkbox/CheckIcon.d.ts +11 -3
- package/components/checkbox/Checkbox.d.ts +0 -6
- package/components/checkbox/IndeterminateIcon.d.ts +6 -0
- package/components/collapse/Collapse.d.ts +6 -3
- package/components/copyableText/CopyableText.d.ts +6 -3
- package/components/dateField/DateField.d.ts +2 -6
- package/components/dayPicker/DayPicker.d.ts +18 -0
- package/components/dayPicker/DayPickerPopover.d.ts +6 -0
- package/components/dayPicker/DayRangePicker.d.ts +6 -0
- package/components/dayPicker/useLocale.d.ts +6 -0
- package/components/formGroup/FormGroup.d.ts +8 -6
- package/components/heading/Heading.d.ts +6 -4
- package/components/icon/Icon.d.ts +12 -10
- package/components/indicator/Indicator.d.ts +7 -5
- package/components/label/Label.d.ts +8 -4
- package/components/legendItem/LegendItem.d.ts +6 -0
- package/components/menu/MenuButton.d.ts +6 -0
- package/components/menu/MenuItem.d.ts +6 -4
- package/components/menu/MenuList.d.ts +6 -3
- package/components/modal/Modal.d.ts +0 -4
- package/components/modal/ModalBackdrop.d.ts +6 -0
- package/components/modal/useModal.d.ts +6 -0
- package/components/multiRowTableCell/MultiRowTableCell.d.ts +4 -4
- package/components/pageHeading/PageHeading.d.ts +6 -3
- package/components/popover/PopoverList.d.ts +6 -0
- package/components/popover/PopoverListItem.d.ts +6 -0
- package/components/popover/PopoverTitle.d.ts +6 -0
- package/components/popover/usePopover.d.ts +6 -0
- package/components/prompt/Prompt.d.ts +13 -3
- package/components/radioGroup/RadioGroup.d.ts +6 -8
- package/components/radioGroup/RadioItem.d.ts +6 -2
- package/components/select/CreatableSelect.d.ts +6 -0
- package/components/select/FieldContainer.d.ts +6 -0
- package/components/select/Select.d.ts +6 -0
- package/components/select/shared.d.ts +15 -9
- package/components/skeletonLines/SkeletonLines.d.ts +0 -5
- package/components/spacer/Spacer.d.ts +6 -2
- package/components/spinner/Spinner.d.ts +6 -0
- package/components/text/Text.d.ts +6 -10
- package/components/textArea/TextArea.d.ts +0 -54
- package/components/textField/TextField.d.ts +0 -2
- package/components/textField/TextLenghtIndicator.d.ts +13 -0
- package/components/tip/Tip.d.ts +8 -3
- package/components/toggle/Toggle.d.ts +0 -26
- package/components/tooltip/Tooltip.d.ts +6 -9
- package/hooks/useDebounce.d.ts +7 -0
- package/hooks/useLocalStorage.d.ts +7 -0
- package/hooks/useTimeout.d.ts +6 -0
- package/index.js +455 -63
- package/layout/helper/MinTopFullContentLayout.d.ts +6 -0
- package/layout/responsive/FilterListMapLayout.d.ts +6 -3
- package/layout/responsive/FullWidthRepeatingLayout.d.ts +8 -5
- package/layout/responsive/GridArea.d.ts +3 -1
- package/layout/responsive/IntrinsicallyResponsiveGrid.d.ts +12 -8
- package/layout/responsive/TitleNavContentLayout.d.ts +8 -2
- package/layout/responsive/TwoColumnLayout.d.ts +8 -2
- package/package.json +5 -5
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}
|
|
2
|
+
import { CommonProps } from "../../common";
|
|
3
|
+
interface CheckIconProps extends CommonProps {
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* The CheckIcon component is used by the checkbox to display the checked state.
|
|
7
|
+
*
|
|
8
|
+
* @param {CheckIconProps} props - The props for the CheckIcon component
|
|
9
|
+
* @returns {JSX.Element} CheckIcon component
|
|
10
|
+
*/
|
|
11
|
+
export declare const CheckIcon: ({ className, dataTestId }: CheckIconProps) => JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -4,14 +4,12 @@ export interface CheckboxProps extends CommonProps, React.InputHTMLAttributes<HT
|
|
|
4
4
|
/**
|
|
5
5
|
* A string element to be displayed as a label
|
|
6
6
|
*
|
|
7
|
-
* @type string
|
|
8
7
|
* @memberof CheckboxProps
|
|
9
8
|
*/
|
|
10
9
|
label?: React.ReactNode;
|
|
11
10
|
/**
|
|
12
11
|
* An boolean flag to set checkbox to disabled state
|
|
13
12
|
*
|
|
14
|
-
* @type boolean
|
|
15
13
|
* @memberof CheckboxProps
|
|
16
14
|
*/
|
|
17
15
|
disabled?: boolean;
|
|
@@ -19,28 +17,24 @@ export interface CheckboxProps extends CommonProps, React.InputHTMLAttributes<HT
|
|
|
19
17
|
* An boolean flag to set invalid mode
|
|
20
18
|
* can be used for handling errors
|
|
21
19
|
*
|
|
22
|
-
* @type boolean
|
|
23
20
|
* @memberof CheckboxProps
|
|
24
21
|
*/
|
|
25
22
|
isInvalid?: boolean;
|
|
26
23
|
/**
|
|
27
24
|
* An boolean flag to set checkbox to readonly mode
|
|
28
25
|
*
|
|
29
|
-
* @type boolean
|
|
30
26
|
* @memberof CheckboxProps
|
|
31
27
|
*/
|
|
32
28
|
readOnly?: boolean;
|
|
33
29
|
/**
|
|
34
30
|
* An string element to be used as input name
|
|
35
31
|
*
|
|
36
|
-
* @type React.ReactNode
|
|
37
32
|
* @memberof CheckboxProps
|
|
38
33
|
*/
|
|
39
34
|
name?: string;
|
|
40
35
|
/**
|
|
41
36
|
* An boolean flag to set checkbox to intermediate state
|
|
42
37
|
*
|
|
43
|
-
* @type boolean
|
|
44
38
|
* @memberof CheckboxProps
|
|
45
39
|
*/
|
|
46
40
|
indeterminate?: boolean;
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
/**
|
|
3
|
+
* The IndeterminateIcon component is used by the checkbox to display the Indeterminate state.
|
|
4
|
+
*
|
|
5
|
+
* @param {IndeterminateIconProps} props - The props for the IndeterminateIcon component
|
|
6
|
+
* @returns {JSX.Element} IndeterminateIcon component
|
|
7
|
+
*/
|
|
2
8
|
export declare const IndeterminateIcon: ({ className }: {
|
|
3
9
|
className?: string | undefined;
|
|
4
10
|
}) => JSX.Element;
|
|
@@ -5,7 +5,6 @@ export interface CollapseProps extends CommonProps {
|
|
|
5
5
|
/**
|
|
6
6
|
* Expands the collapse component during initialization.
|
|
7
7
|
*
|
|
8
|
-
* @type boolean
|
|
9
8
|
* @memberof CollapseProps
|
|
10
9
|
*/
|
|
11
10
|
initialExpanded?: boolean;
|
|
@@ -18,16 +17,20 @@ export interface CollapseProps extends CommonProps {
|
|
|
18
17
|
/**
|
|
19
18
|
* Child nodes.
|
|
20
19
|
*
|
|
21
|
-
* @type React.ReactNode
|
|
22
20
|
* @memberof CollapseProps
|
|
23
21
|
*/
|
|
24
22
|
children: React.ReactNode;
|
|
25
23
|
/**
|
|
26
24
|
* Label to be displayed.
|
|
27
25
|
*
|
|
28
|
-
* @type React.ReactNode
|
|
29
26
|
* @memberof CollapseProps
|
|
30
27
|
*/
|
|
31
28
|
label: React.ReactNode;
|
|
32
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* The Collapse component is ued to condense non-important information.
|
|
32
|
+
*
|
|
33
|
+
* @param {CollapseProps} props - The props for the Collapse component
|
|
34
|
+
* @returns {JSX.Element} Collapse component
|
|
35
|
+
*/
|
|
33
36
|
export declare const Collapse: ({ id, initialExpanded, onToggle, label, children, className, dataTestId, }: CollapseProps) => JSX.Element;
|
|
@@ -3,24 +3,27 @@ interface CopyableTextProps {
|
|
|
3
3
|
/**
|
|
4
4
|
* The text to be displayed.
|
|
5
5
|
*
|
|
6
|
-
* @type string
|
|
7
6
|
* @memberof CopyableTextProps
|
|
8
7
|
*/
|
|
9
8
|
text?: string;
|
|
10
9
|
/**
|
|
11
10
|
* Alternative text to be displayed.
|
|
12
11
|
*
|
|
13
|
-
* @type string
|
|
14
12
|
* @memberof CopyableTextProps
|
|
15
13
|
*/
|
|
16
14
|
alternativeText?: string;
|
|
17
15
|
/**
|
|
18
16
|
* ID of the component to be used while testing.
|
|
19
17
|
*
|
|
20
|
-
* @type string
|
|
21
18
|
* @memberof CopyableTextProps
|
|
22
19
|
*/
|
|
23
20
|
dataTestId?: string;
|
|
24
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* The CopyableText component is used where the user should have easy access to copy some information.
|
|
24
|
+
*
|
|
25
|
+
* @param {CopyableTextProps} props - The props for the CopyableText component
|
|
26
|
+
* @returns {JSX.Element} CopyableText component
|
|
27
|
+
*/
|
|
25
28
|
export declare const CopyableText: ({ text, alternativeText, dataTestId }: CopyableTextProps) => JSX.Element;
|
|
26
29
|
export {};
|
|
@@ -5,40 +5,36 @@ export interface DateFieldProps extends Pick<BaseInputProps, "placeholder" | "id
|
|
|
5
5
|
/**
|
|
6
6
|
* A text label to be displayed next to the indicator
|
|
7
7
|
*
|
|
8
|
-
* @type string
|
|
9
8
|
* @memberof DateFieldProps
|
|
10
9
|
*/
|
|
11
10
|
label?: string;
|
|
12
11
|
/**
|
|
13
12
|
* A text to be displayed under the input with a short description of field purpose
|
|
14
13
|
*
|
|
15
|
-
* @type string
|
|
16
14
|
* @memberof DateFieldProps
|
|
17
15
|
*/
|
|
18
16
|
description?: string;
|
|
19
17
|
/**
|
|
20
18
|
* A default value to be displayed by a input field
|
|
21
19
|
*
|
|
22
|
-
* @type string
|
|
23
20
|
* @memberof DateFieldProps
|
|
24
21
|
*/
|
|
25
22
|
defaultValue?: string;
|
|
26
23
|
/**
|
|
27
24
|
* A flag that can be used to disable the input, default value is false
|
|
28
25
|
*
|
|
29
|
-
* @type boolean
|
|
30
26
|
* @memberof DateFieldProps
|
|
31
27
|
*/
|
|
32
28
|
disabled?: boolean;
|
|
33
29
|
/**
|
|
34
30
|
* Specification of dates not allowed to be selected - i the form of react-day-picker matcher
|
|
35
|
-
*
|
|
31
|
+
*
|
|
36
32
|
* @memberof DateFieldProps
|
|
37
33
|
*/
|
|
38
34
|
disabledDays?: Matcher | Matcher[] | undefined;
|
|
39
35
|
/**
|
|
40
36
|
* A flag that can be set to true to disallow the user to deselect a date. (if false the user can click the selected date to deselect)
|
|
41
|
-
*
|
|
37
|
+
*
|
|
42
38
|
* @memberof DateFieldProps
|
|
43
39
|
*/
|
|
44
40
|
preventDeselect?: boolean;
|
|
@@ -1,9 +1,27 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { Matcher } from "react-day-picker";
|
|
3
3
|
export interface DayPickerProps {
|
|
4
|
+
/**
|
|
5
|
+
* A callback function for when a date is selected
|
|
6
|
+
*/
|
|
4
7
|
onDaySelect?: (day: Date) => void;
|
|
8
|
+
/**
|
|
9
|
+
* Define any days which may not be selected
|
|
10
|
+
*/
|
|
5
11
|
disabledDays: Matcher | Matcher[] | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* Set any days which are selected
|
|
14
|
+
*/
|
|
6
15
|
selectedDays: Matcher | Matcher[] | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Set the language
|
|
18
|
+
*/
|
|
7
19
|
language: string;
|
|
8
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* The DayPicker component is used when the user needs to select a date.
|
|
23
|
+
*
|
|
24
|
+
* @param {DayPickerProps} props - The props for the DayPicker component
|
|
25
|
+
* @returns {JSX.Element} DayPicker component
|
|
26
|
+
*/
|
|
9
27
|
export declare const DayPicker: ({ onDaySelect, disabledDays, selectedDays, language, ...rest }: DayPickerProps) => JSX.Element;
|
|
@@ -13,4 +13,10 @@ export interface DayPickerPopoverProps {
|
|
|
13
13
|
buttonContent: JSX.Element;
|
|
14
14
|
language: string;
|
|
15
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* The DayPickerPopover component returns a button which when clicked shows the daypicker.
|
|
18
|
+
*
|
|
19
|
+
* @param {DayPickerPopoverProps} props - The props for the DayPickerPopover component
|
|
20
|
+
* @returns {JSX.Element} DayPickerPopover component
|
|
21
|
+
*/
|
|
16
22
|
export declare const DayPickerPopover: ({ disabledDays, className, selectedDay, onDaySelect, intent, placement, size, buttonContent, language, }: DayPickerPopoverProps) => JSX.Element;
|
|
@@ -8,4 +8,10 @@ export interface DayRangePickerProps {
|
|
|
8
8
|
disabledDays?: Matcher | Matcher[];
|
|
9
9
|
language: string;
|
|
10
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* The DayRangePicker component should be used when the user needs to select a range of dates.
|
|
13
|
+
*
|
|
14
|
+
* @param {DayRangePickerProps} props - The props for the DayRangePicker component
|
|
15
|
+
* @returns {JSX.Element} DayRangePicker component
|
|
16
|
+
*/
|
|
11
17
|
export declare const DayRangePicker: ({ onRangeSelect, selectedDays, disabledDays, dataTestId, language, }: DayRangePickerProps) => JSX.Element;
|
|
@@ -1,2 +1,8 @@
|
|
|
1
1
|
import { Locale } from "date-fns";
|
|
2
|
+
/**
|
|
3
|
+
* A helper function to get the matching Locale object for a given language.
|
|
4
|
+
*
|
|
5
|
+
* @param {string} language The language to match
|
|
6
|
+
* @returns {Locale} The corresponding Locale object
|
|
7
|
+
*/
|
|
2
8
|
export declare const useLocale: (language: string) => Locale;
|
|
@@ -4,39 +4,41 @@ export interface FormGroupProps extends CommonProps {
|
|
|
4
4
|
/**
|
|
5
5
|
* The label for the form group.
|
|
6
6
|
*
|
|
7
|
-
* @type string | React.ReactNode
|
|
8
7
|
* @memberof FormGroupProps
|
|
9
8
|
*/
|
|
10
9
|
label: string | React.ReactNode;
|
|
11
10
|
/**
|
|
12
11
|
* Content to display in the tooltip when hovering the ? icon next to the label.
|
|
13
12
|
*
|
|
14
|
-
* @type string | React.ReactNode
|
|
15
13
|
* @memberof FormGroupProps
|
|
16
14
|
*/
|
|
17
15
|
tip?: string | React.ReactNode;
|
|
18
16
|
/**
|
|
19
17
|
* A string to display under the input element to help the user understand the input.
|
|
20
18
|
*
|
|
21
|
-
* @type string
|
|
22
19
|
* @memberof FormGroupProps
|
|
23
20
|
*/
|
|
24
21
|
helpText?: string;
|
|
25
22
|
/**
|
|
26
23
|
* An addon element to render to the right under the input element.
|
|
27
|
-
* Used for
|
|
24
|
+
* Used for displaying maxLength etc.
|
|
28
25
|
*
|
|
29
|
-
* @type string | React.ReactNode
|
|
30
26
|
* @memberof FormGroupProps
|
|
31
27
|
*/
|
|
32
28
|
helpAddon?: string | React.ReactNode;
|
|
33
29
|
/**
|
|
34
30
|
* If true the input is rendered in its invalid state.
|
|
35
31
|
*
|
|
36
|
-
* @type boolean
|
|
37
32
|
* @memberof FormGroupProps
|
|
38
33
|
*/
|
|
39
34
|
isInvalid?: boolean;
|
|
40
35
|
children?: React.ReactNode;
|
|
41
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* The FormGroup component should be used to wrap any Input element that needs a label.
|
|
39
|
+
* Besides a label the component supplyes optional Tip, HelpText and HelpAddon support.
|
|
40
|
+
*
|
|
41
|
+
* @param {FormGroupProps} props - The props for the FormGroup component
|
|
42
|
+
* @returns {JSX.Element} FormGroup component
|
|
43
|
+
*/
|
|
42
44
|
export declare const FormGroup: ({ isInvalid, helpText, helpAddon, tip, className, dataTestId, label, children, }: FormGroupProps) => JSX.Element;
|
|
@@ -5,30 +5,32 @@ export interface HeadingProps extends CommonProps {
|
|
|
5
5
|
/**
|
|
6
6
|
* Child Nodes.
|
|
7
7
|
*
|
|
8
|
-
* @type React.ReactNode
|
|
9
8
|
* @memberof HeadingProps
|
|
10
9
|
*/
|
|
11
10
|
children: React.ReactNode;
|
|
12
11
|
/**
|
|
13
12
|
* Size of heading.
|
|
14
13
|
*
|
|
15
|
-
* @type "primary" | "secondary" | "tertiary" | "subtitle"
|
|
16
14
|
* @memberof HeadingProps
|
|
17
15
|
*/
|
|
18
16
|
variant: HeadingVariant;
|
|
19
17
|
/**
|
|
20
18
|
* Whether the heading uses inverted styles or not.
|
|
21
19
|
*
|
|
22
|
-
* @type boolean
|
|
23
20
|
* @memberof HeadingProps
|
|
24
21
|
*/
|
|
25
22
|
inverted?: boolean;
|
|
26
23
|
/**
|
|
27
24
|
* Whether the heading is a subtitle or not.
|
|
28
25
|
*
|
|
29
|
-
* @type boolean
|
|
30
26
|
* @memberof HeadingProps
|
|
31
27
|
*/
|
|
32
28
|
subtle?: boolean;
|
|
33
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* The Heading component should be used for Headings.
|
|
32
|
+
*
|
|
33
|
+
* @param {HeadingProps} props - The props for the Heading component
|
|
34
|
+
* @returns {JSX.Element} Heading component
|
|
35
|
+
*/
|
|
34
36
|
export declare const Heading: ({ children, variant, inverted, subtle, className, dataTestId, }: HeadingProps) => JSX.Element;
|
|
@@ -2,13 +2,12 @@ import { HeroIconName, TrackunitIconName } from "@trackunit/ui-icons";
|
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { CommonProps } from "../../common/CommonProps";
|
|
4
4
|
import { Colors } from "../../constants/colors";
|
|
5
|
-
export interface
|
|
5
|
+
export interface IconProps extends CommonProps {
|
|
6
6
|
/**
|
|
7
7
|
* The name of the icon to be rendered.
|
|
8
8
|
* HeroIconName and TrackunitIconName are supported.
|
|
9
9
|
*
|
|
10
|
-
* @
|
|
11
|
-
* @memberof IIconProps
|
|
10
|
+
* @memberof IconProps
|
|
12
11
|
*/
|
|
13
12
|
name: TrackunitIconName | HeroIconName;
|
|
14
13
|
/**
|
|
@@ -16,8 +15,7 @@ export interface IIconProps extends CommonProps {
|
|
|
16
15
|
* Supports any colors from the theme.
|
|
17
16
|
* Custom colors can be used by setting a text color in the className.
|
|
18
17
|
*
|
|
19
|
-
* @
|
|
20
|
-
* @memberof IIconProps
|
|
18
|
+
* @memberof IconProps
|
|
21
19
|
*/
|
|
22
20
|
color?: Colors;
|
|
23
21
|
/**
|
|
@@ -26,8 +24,7 @@ export interface IIconProps extends CommonProps {
|
|
|
26
24
|
* Default value is Large.
|
|
27
25
|
* If a custom size is needed, set it in the className.
|
|
28
26
|
*
|
|
29
|
-
* @
|
|
30
|
-
* @memberof IIconProps
|
|
27
|
+
* @memberof IconProps
|
|
31
28
|
*/
|
|
32
29
|
size?: "small" | "normal" | "large";
|
|
33
30
|
/**
|
|
@@ -35,8 +32,7 @@ export interface IIconProps extends CommonProps {
|
|
|
35
32
|
* Default value depends on the Size prop, small == solid, normal == solid, large == outline.
|
|
36
33
|
* Trackunit icons might not support both outline and Solid.
|
|
37
34
|
*
|
|
38
|
-
* @
|
|
39
|
-
* @memberof IIconProps
|
|
35
|
+
* @memberof IconProps
|
|
40
36
|
*/
|
|
41
37
|
type?: "solid" | "outline";
|
|
42
38
|
onClick?: (event: React.MouseEvent<HTMLSpanElement>) => void;
|
|
@@ -46,4 +42,10 @@ export interface IIconProps extends CommonProps {
|
|
|
46
42
|
fillColor?: string;
|
|
47
43
|
forwardedRef?: React.RefObject<HTMLSpanElement>;
|
|
48
44
|
}
|
|
49
|
-
|
|
45
|
+
/**
|
|
46
|
+
* The Icon component is ued to display an Icon.
|
|
47
|
+
*
|
|
48
|
+
* @param {IconProps} props - The props for the Icon component
|
|
49
|
+
* @returns {JSX.Element} Icon component
|
|
50
|
+
*/
|
|
51
|
+
export declare const Icon: ({ name, size, className, dataTestId, color, onClick, fillColor, type, forwardedRef, }: IconProps) => JSX.Element | null;
|
|
@@ -3,32 +3,34 @@ import { CommonProps } from "../../common/CommonProps";
|
|
|
3
3
|
import { Colors } from "../../constants/colors";
|
|
4
4
|
export interface IndicatorProps extends CommonProps {
|
|
5
5
|
/**
|
|
6
|
-
* The icon to be rendered inside the indicator
|
|
6
|
+
* The icon to be rendered inside the indicator component
|
|
7
7
|
*
|
|
8
|
-
* @type {JSX.Element}
|
|
9
8
|
* @memberof IndicatorProps
|
|
10
9
|
*/
|
|
11
10
|
icon: JSX.Element;
|
|
12
11
|
/**
|
|
13
12
|
* A color token used to style the icon and the icon background
|
|
14
13
|
*
|
|
15
|
-
* @type {Colors}
|
|
16
14
|
* @memberof IndicatorProps
|
|
17
15
|
*/
|
|
18
16
|
color?: Colors;
|
|
19
17
|
/**
|
|
20
18
|
* A text label to be displayed next to the indicator
|
|
21
19
|
*
|
|
22
|
-
* @type string
|
|
23
20
|
* @memberof IndicatorProps
|
|
24
21
|
*/
|
|
25
22
|
label?: string;
|
|
26
23
|
/**
|
|
27
24
|
* A boolean parameter to display or hide icon background, default value is true
|
|
28
25
|
*
|
|
29
|
-
* @type boolean
|
|
30
26
|
* @memberof IndicatorProps
|
|
31
27
|
*/
|
|
32
28
|
withBackground?: boolean;
|
|
33
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* The Indicator components are non-interactive elements that communicate essential aspects of the state of an asset.
|
|
32
|
+
*
|
|
33
|
+
* @param {IndicatorProps} props - The props for the Indicator component
|
|
34
|
+
* @returns {JSX.Element} Indicator component
|
|
35
|
+
*/
|
|
34
36
|
export declare const Indicator: ({ dataTestId, icon, label, color, withBackground, ...rest }: IndicatorProps) => JSX.Element;
|
|
@@ -4,30 +4,34 @@ export interface LabelProps extends CommonProps {
|
|
|
4
4
|
/**
|
|
5
5
|
* ID of the label.
|
|
6
6
|
*
|
|
7
|
-
* @type string
|
|
8
7
|
* @memberof LabelProps
|
|
9
8
|
*/
|
|
10
9
|
id?: string;
|
|
11
10
|
/**
|
|
12
11
|
* Specifies the element to which the label belongs to.
|
|
13
12
|
*
|
|
14
|
-
* @type {(string | false)}
|
|
15
13
|
* @memberof LabelProps
|
|
16
14
|
*/
|
|
17
15
|
htmlFor: string | false;
|
|
18
16
|
/**
|
|
19
17
|
* The label value.
|
|
20
18
|
*
|
|
21
|
-
* @type React.ReactNode
|
|
22
19
|
* @memberof LabelProps
|
|
23
20
|
*/
|
|
24
21
|
label?: React.ReactNode;
|
|
25
22
|
/**
|
|
26
23
|
* Description for the label.
|
|
27
24
|
*
|
|
28
|
-
* @type React.ReactNode
|
|
29
25
|
* @memberof LabelProps
|
|
30
26
|
*/
|
|
31
27
|
description?: React.ReactNode;
|
|
32
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* The Label component is used for labels for input fields.
|
|
31
|
+
*
|
|
32
|
+
* **Have a look at the FormGroup first**
|
|
33
|
+
*
|
|
34
|
+
* @param {LabelProps} props - The props for the Label component
|
|
35
|
+
* @returns {JSX.Element} Label component
|
|
36
|
+
*/
|
|
33
37
|
export declare const Label: ({ id, htmlFor, label, description, className, dataTestId }: LabelProps) => JSX.Element;
|
|
@@ -8,4 +8,10 @@ export interface ILegendItem {
|
|
|
8
8
|
className?: string;
|
|
9
9
|
dataTestId?: string;
|
|
10
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* The LegendItem component is used to show form legends.
|
|
13
|
+
*
|
|
14
|
+
* @param {ILegendItem} props - The props for the LegendItem component
|
|
15
|
+
* @returns {JSX.Element} LegendItem component
|
|
16
|
+
*/
|
|
11
17
|
export declare const LegendItem: ({ className, label, disabled, selected, onClick, color, dataTestId }: ILegendItem) => JSX.Element;
|
|
@@ -3,5 +3,11 @@ interface IMobileButton {
|
|
|
3
3
|
onClick: () => void;
|
|
4
4
|
className?: string;
|
|
5
5
|
}
|
|
6
|
+
/**
|
|
7
|
+
* The MenuButton component.
|
|
8
|
+
*
|
|
9
|
+
* @param {IMobileButton} props - The props for the MenuButton component
|
|
10
|
+
* @returns {JSX.Element} MenuButton component
|
|
11
|
+
*/
|
|
6
12
|
export declare const MenuButton: ({ onClick, className }: IMobileButton) => JSX.Element;
|
|
7
13
|
export {};
|
|
@@ -3,28 +3,24 @@ export interface IMenuItemProps {
|
|
|
3
3
|
/**
|
|
4
4
|
* The icon to be rendered in the menu item.
|
|
5
5
|
*
|
|
6
|
-
* @type {(JSX.Element)}
|
|
7
6
|
* @memberof IMenuItemProps
|
|
8
7
|
*/
|
|
9
8
|
icon?: JSX.Element;
|
|
10
9
|
/**
|
|
11
10
|
* Label of the menu item
|
|
12
11
|
*
|
|
13
|
-
* @type string
|
|
14
12
|
* @memberof IMenuItemProps
|
|
15
13
|
*/
|
|
16
14
|
label?: string;
|
|
17
15
|
/**
|
|
18
16
|
* Additional tailwind classes to be applied to the component.
|
|
19
17
|
*
|
|
20
|
-
* @type string
|
|
21
18
|
* @memberof IMenuItemProps
|
|
22
19
|
*/
|
|
23
20
|
className?: string;
|
|
24
21
|
/**
|
|
25
22
|
* Test id to be used for the component.
|
|
26
23
|
*
|
|
27
|
-
* @type string
|
|
28
24
|
* @memberof IMenuItemProps
|
|
29
25
|
*/
|
|
30
26
|
dataTestId?: string;
|
|
@@ -35,4 +31,10 @@ export interface IMenuItemProps {
|
|
|
35
31
|
*/
|
|
36
32
|
onClick: () => void;
|
|
37
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* The MenuItem component should be used to inform the user of important information.
|
|
36
|
+
*
|
|
37
|
+
* @param {IMenuItemProps} props - The props for the MenuItem component
|
|
38
|
+
* @returns {JSX.Element} MenuItem component
|
|
39
|
+
*/
|
|
38
40
|
export declare const MenuItem: ({ className, dataTestId, label, icon, onClick }: IMenuItemProps) => JSX.Element;
|
|
@@ -7,23 +7,26 @@ export interface IMenuListProps {
|
|
|
7
7
|
/**
|
|
8
8
|
* Additional tailwind classes to be applied to the component.
|
|
9
9
|
*
|
|
10
|
-
* @type string
|
|
11
10
|
* @memberof IMenuListProps
|
|
12
11
|
*/
|
|
13
12
|
className?: string;
|
|
14
13
|
/**
|
|
15
14
|
* Test id to be used for the component.
|
|
16
15
|
*
|
|
17
|
-
* @type string
|
|
18
16
|
* @memberof IMenuListProps
|
|
19
17
|
*/
|
|
20
18
|
dataTestId?: string;
|
|
21
19
|
/**
|
|
22
20
|
* List of menu items to be rendered.
|
|
23
21
|
*
|
|
24
|
-
* @type {IMenuListItemProps[]}
|
|
25
22
|
* @memberof IMenuListProps
|
|
26
23
|
*/
|
|
27
24
|
menuItems: IMenuListItemProps[];
|
|
28
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* The MenuList component is used for menus and selects.
|
|
28
|
+
*
|
|
29
|
+
* @param {IMenuListProps} props - The props for the MenuList component
|
|
30
|
+
* @returns {JSX.Element} MenuList component
|
|
31
|
+
*/
|
|
29
32
|
export declare const MenuList: ({ dataTestId, className, menuItems, ...args }: IMenuListProps) => JSX.Element;
|
|
@@ -5,7 +5,6 @@ export interface ModalProps extends CommonProps {
|
|
|
5
5
|
/**
|
|
6
6
|
* Whether modal is open or not.
|
|
7
7
|
*
|
|
8
|
-
* @type boolean
|
|
9
8
|
* @memberof ModalProps
|
|
10
9
|
*/
|
|
11
10
|
isOpen?: boolean;
|
|
@@ -18,21 +17,18 @@ export interface ModalProps extends CommonProps {
|
|
|
18
17
|
/**
|
|
19
18
|
* Child elements to be rendered inside the modal.
|
|
20
19
|
*
|
|
21
|
-
* @type React.ReactNode
|
|
22
20
|
* @memberof ModalProps
|
|
23
21
|
*/
|
|
24
22
|
children: React.ReactNode;
|
|
25
23
|
/**
|
|
26
24
|
* Test id to be applied to the modal.
|
|
27
25
|
*
|
|
28
|
-
* @type string
|
|
29
26
|
* @memberof ModalProps
|
|
30
27
|
*/
|
|
31
28
|
dataTestId?: string;
|
|
32
29
|
/**
|
|
33
30
|
* Maximum width of the modal.
|
|
34
31
|
*
|
|
35
|
-
* @type {ModalWidth}
|
|
36
32
|
* @memberof ModalProps
|
|
37
33
|
*/
|
|
38
34
|
maxWidth?: ModalWidth;
|
|
@@ -4,4 +4,10 @@ export interface ModalBackdropProps {
|
|
|
4
4
|
children: React.ReactNode;
|
|
5
5
|
isVisible?: boolean;
|
|
6
6
|
}
|
|
7
|
+
/**
|
|
8
|
+
* The Backdrop for the modal.
|
|
9
|
+
*
|
|
10
|
+
* @param {ModalBackdropProps} props - The props for the ModalBackdrop component
|
|
11
|
+
* @returns {JSX.Element} ModalBackdrop component
|
|
12
|
+
*/
|
|
7
13
|
export declare const ModalBackdrop: ({ children, isVisible, onClick }: ModalBackdropProps) => JSX.Element;
|
|
@@ -3,6 +3,12 @@ import { ModalProps } from "./Modal";
|
|
|
3
3
|
export interface UseModalProps {
|
|
4
4
|
closeOnOutsideClick?: boolean;
|
|
5
5
|
}
|
|
6
|
+
/**
|
|
7
|
+
* The useModal component should be used to inform the user of important information.
|
|
8
|
+
*
|
|
9
|
+
* @param {UseModalProps} props - The props for the useModal hook
|
|
10
|
+
* @returns {*} useModal return
|
|
11
|
+
*/
|
|
6
12
|
export declare const useModal: ({ closeOnOutsideClick }?: UseModalProps) => {
|
|
7
13
|
Modal: {
|
|
8
14
|
(props: ModalProps): JSX.Element;
|
|
@@ -4,27 +4,27 @@ interface IMultiRowTableCellProps extends CommonProps {
|
|
|
4
4
|
/**
|
|
5
5
|
* Main header.
|
|
6
6
|
*
|
|
7
|
-
* @type string
|
|
8
7
|
* @memberof IMultiRowTableCellProps
|
|
9
8
|
*/
|
|
10
9
|
main: string;
|
|
11
10
|
/**
|
|
12
11
|
* Secondary string.
|
|
13
12
|
*
|
|
14
|
-
* @type string
|
|
15
13
|
* @memberof IMultiRowTableCellProps
|
|
16
14
|
*/
|
|
17
15
|
secondary?: string;
|
|
18
16
|
/**
|
|
19
17
|
* Grid area.
|
|
20
18
|
*
|
|
21
|
-
* @type string
|
|
22
19
|
* @memberof IMultiRowTableCellProps
|
|
23
20
|
*/
|
|
24
21
|
area?: string;
|
|
25
22
|
}
|
|
26
23
|
/**
|
|
27
|
-
*
|
|
24
|
+
* The MultiRowTableCell component extendins Table Cell component and formats your content supporting 2 rows.
|
|
25
|
+
*
|
|
26
|
+
* @param {IMultiRowTableCellProps} props - The props for the MultiRowTableCell component
|
|
27
|
+
* @returns {JSX.Element} MultiRowTableCell component
|
|
28
28
|
*/
|
|
29
29
|
export declare const MultiRowTableCell: ({ main, secondary, area, dataTestId }: IMultiRowTableCellProps) => JSX.Element;
|
|
30
30
|
export {};
|