@trackunit/react-components 0.0.49 → 0.0.52

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 (76) hide show
  1. package/common/CommonProps.d.ts +0 -2
  2. package/common/useContainerProps.d.ts +8 -0
  3. package/components/NumberField/NumberField.d.ts +0 -1
  4. package/components/NumberInput/NumberInput.d.ts +2 -2
  5. package/components/TextInput/TextInput.d.ts +2 -2
  6. package/components/alert/Alert.d.ts +6 -7
  7. package/components/badge/Badge.d.ts +8 -9
  8. package/components/baseInput/BaseInput.d.ts +0 -8
  9. package/components/buttons/button/Button.d.ts +0 -6
  10. package/components/buttons/icon-button/IconButton.d.ts +0 -3
  11. package/components/buttons/shared/ButtonProps.d.ts +0 -7
  12. package/components/buttons/shared/helpers.d.ts +10 -0
  13. package/components/buttons/star-button/StarButton.d.ts +6 -0
  14. package/components/card/Card.d.ts +7 -3
  15. package/components/card/CardBody.d.ts +5 -4
  16. package/components/card/CardFooter.d.ts +2 -2
  17. package/components/card/CardHeader.d.ts +4 -13
  18. package/components/card/DensityContainer.d.ts +10 -11
  19. package/components/chart/Chart.d.ts +5 -10
  20. package/components/checkbox/CheckIcon.d.ts +11 -3
  21. package/components/checkbox/Checkbox.d.ts +0 -6
  22. package/components/checkbox/IndeterminateIcon.d.ts +6 -0
  23. package/components/collapse/Collapse.d.ts +6 -3
  24. package/components/copyableText/CopyableText.d.ts +6 -3
  25. package/components/dateField/DateField.d.ts +2 -6
  26. package/components/dayPicker/DayPicker.d.ts +18 -0
  27. package/components/dayPicker/DayPickerPopover.d.ts +6 -0
  28. package/components/dayPicker/DayRangePicker.d.ts +6 -0
  29. package/components/dayPicker/useLocale.d.ts +6 -0
  30. package/components/formGroup/FormGroup.d.ts +8 -6
  31. package/components/heading/Heading.d.ts +6 -4
  32. package/components/icon/Icon.d.ts +12 -10
  33. package/components/indicator/Indicator.d.ts +7 -5
  34. package/components/label/Label.d.ts +8 -4
  35. package/components/legendItem/LegendItem.d.ts +6 -0
  36. package/components/menu/MenuButton.d.ts +6 -0
  37. package/components/menu/MenuItem.d.ts +6 -4
  38. package/components/menu/MenuList.d.ts +6 -3
  39. package/components/modal/Modal.d.ts +0 -4
  40. package/components/modal/ModalBackdrop.d.ts +6 -0
  41. package/components/modal/useModal.d.ts +6 -0
  42. package/components/multiRowTableCell/MultiRowTableCell.d.ts +4 -4
  43. package/components/pageHeading/PageHeading.d.ts +6 -3
  44. package/components/popover/PopoverList.d.ts +6 -0
  45. package/components/popover/PopoverListItem.d.ts +6 -0
  46. package/components/popover/PopoverTitle.d.ts +6 -0
  47. package/components/popover/usePopover.d.ts +6 -0
  48. package/components/prompt/Prompt.d.ts +13 -3
  49. package/components/radioGroup/RadioGroup.d.ts +6 -8
  50. package/components/radioGroup/RadioItem.d.ts +6 -2
  51. package/components/select/CreatableSelect.d.ts +6 -0
  52. package/components/select/FieldContainer.d.ts +6 -0
  53. package/components/select/Select.d.ts +6 -0
  54. package/components/select/shared.d.ts +15 -9
  55. package/components/skeletonLines/SkeletonLines.d.ts +0 -5
  56. package/components/spacer/Spacer.d.ts +6 -2
  57. package/components/spinner/Spinner.d.ts +6 -0
  58. package/components/text/Text.d.ts +6 -10
  59. package/components/textArea/TextArea.d.ts +0 -54
  60. package/components/textField/TextField.d.ts +0 -2
  61. package/components/textField/TextLenghtIndicator.d.ts +13 -0
  62. package/components/tip/Tip.d.ts +8 -3
  63. package/components/toggle/Toggle.d.ts +0 -26
  64. package/components/tooltip/Tooltip.d.ts +6 -9
  65. package/hooks/useDebounce.d.ts +7 -0
  66. package/hooks/useLocalStorage.d.ts +7 -0
  67. package/hooks/useTimeout.d.ts +6 -0
  68. package/index.js +457 -64
  69. package/layout/helper/MinTopFullContentLayout.d.ts +6 -0
  70. package/layout/responsive/FilterListMapLayout.d.ts +6 -3
  71. package/layout/responsive/FullWidthRepeatingLayout.d.ts +8 -5
  72. package/layout/responsive/GridArea.d.ts +3 -1
  73. package/layout/responsive/IntrinsicallyResponsiveGrid.d.ts +12 -8
  74. package/layout/responsive/TitleNavContentLayout.d.ts +8 -2
  75. package/layout/responsive/TwoColumnLayout.d.ts +8 -2
  76. package/package.json +1 -1
@@ -13,4 +13,10 @@ export interface PopoverListItemProps extends CommonProps {
13
13
  children: React.ReactNode;
14
14
  renderAs?: keyof JSX.IntrinsicElements | React.ComponentType<any>;
15
15
  }
16
+ /**
17
+ * The PopoverListItem component.
18
+ *
19
+ * @param {PopoverListItemProps} props - The props for the PopoverListItem component
20
+ * @returns {JSX.Element} PopoverListItem component
21
+ */
16
22
  export declare const PopoverListItem: ({ selected, children, disabled, ariaLabel, url, onClick, prefix, suffix, renderAs, dataTestId, }: PopoverListItemProps) => JSX.Element;
@@ -5,4 +5,10 @@ export interface PopoverTitleProps extends CommonProps {
5
5
  divider?: boolean;
6
6
  children?: React.ReactNode;
7
7
  }
8
+ /**
9
+ * The PopoverTitle component.
10
+ *
11
+ * @param {PopoverTitleProps} props - The props for the PopoverTitle component
12
+ * @returns {JSX.Element} PopoverTitle component
13
+ */
8
14
  export declare const PopoverTitle: ({ children, action, divider, className, dataTestId }: PopoverTitleProps) => JSX.Element;
@@ -12,6 +12,12 @@ export declare enum PopoverLifecycle {
12
12
  open = "open",
13
13
  closing = "closing"
14
14
  }
15
+ /**
16
+ * The usePopover Hook.
17
+ *
18
+ * @param {UsePopoverProps} props - The props for the usePopover hook
19
+ * @returns {UsePopoverProps} - UsePopoverProps
20
+ */
15
21
  export declare const usePopover: <T extends HTMLElement, Y extends HTMLElement>({ targetRef, popoverRef, placement, offset, }: UsePopoverProps<T, Y>) => {
16
22
  targetRef: React.RefObject<T>;
17
23
  popoverRef: React.RefObject<Y>;
@@ -1,10 +1,20 @@
1
- import { Blocker } from "history";
2
1
  interface IPromptProps {
3
2
  when: boolean;
4
3
  message: string;
5
4
  }
6
- export declare function useInRouterContext(): boolean;
7
- export declare function useBlocker(blocker: Blocker, when?: boolean): void;
5
+ /**
6
+ * The usePrompt hook.
7
+ *
8
+ * @param {string} message -
9
+ * @param {boolean} when -
10
+ * @returns {void} void
11
+ */
8
12
  export declare function usePrompt(message: string, when?: boolean): void;
13
+ /**
14
+ * The Prompt function.
15
+ *
16
+ * @param {IPromptProps} Props -
17
+ * @returns {void} void
18
+ */
9
19
  export declare const Prompt: ({ when, message }: IPromptProps) => null;
10
20
  export {};
@@ -3,15 +3,12 @@ import { CommonProps } from "../../common/CommonProps";
3
3
  interface RadioGroupProps extends CommonProps {
4
4
  /**
5
5
  *
6
- *
7
- * @type {React.ReactNode}
8
6
  * @memberof RadioGroupProps
9
7
  */
10
8
  children: React.ReactNode;
11
9
  /**
12
10
  * The id of the radio group.
13
11
  *
14
- * @type string
15
12
  * @memberof RadioGroupProps
16
13
  */
17
14
  id: string;
@@ -24,38 +21,39 @@ interface RadioGroupProps extends CommonProps {
24
21
  /**
25
22
  * The value of the radio group.
26
23
  *
27
- * @type string | number
28
24
  * @memberof RadioGroupProps
29
25
  */
30
26
  value: string | number;
31
27
  /**
32
28
  * The name of the radio group.
33
29
  *
34
- * @type string
35
30
  * @memberof RadioGroupProps
36
31
  */
37
32
  name?: string;
38
33
  /**
39
34
  * The label of the radio group.
40
35
  *
41
- * @type string
42
36
  * @memberof RadioGroupProps
43
37
  */
44
38
  label?: string;
45
39
  /**
46
40
  * Whether the radiogroup is inline or not.
47
41
  *
48
- * @type boolean
49
42
  * @memberof RadioGroupProps
50
43
  */
51
44
  inline?: boolean;
52
45
  /**
53
46
  * Whether the radio group is disabled or not.
54
47
  *
55
- * @type boolean
56
48
  * @memberof RadioGroupProps
57
49
  */
58
50
  disabled?: boolean;
59
51
  }
52
+ /**
53
+ * The RadioGroup component.
54
+ *
55
+ * @param {RadioGroupProps} props - The props for the RadioGroup component
56
+ * @returns {JSX.Element} RadioGroup component
57
+ */
60
58
  export declare const RadioGroup: ({ children, id, name, value, disabled, onChange, label, inline, className, dataTestId, }: RadioGroupProps) => JSX.Element;
61
59
  export {};
@@ -4,17 +4,21 @@ interface RadioItemProps extends CommonProps {
4
4
  /**
5
5
  * The label of the radio item.
6
6
  *
7
- * @type {React.ReactNode}
8
7
  * @memberof RadioItemProps
9
8
  */
10
9
  label: React.ReactNode;
11
10
  /**
12
11
  * The value of the radio item.
13
12
  *
14
- * @type {(string | number)}
15
13
  * @memberof RadioItemProps
16
14
  */
17
15
  value: string | number;
18
16
  }
17
+ /**
18
+ * The RadioItem component.
19
+ *
20
+ * @param {RadioItemProps} props - The props for the RadioItem component
21
+ * @returns {JSX.Element} RadioItem component
22
+ */
19
23
  export declare const RadioItem: ({ label, value, dataTestId, className }: RadioItemProps) => JSX.Element;
20
24
  export {};
@@ -1,4 +1,10 @@
1
1
  /// <reference types="react" />
2
2
  import { GroupBase } from "react-select";
3
3
  import { SelectProps } from "./shared";
4
+ /**
5
+ * The CreatableSelect component.
6
+ *
7
+ * @param {SelectProps} props - The props for the CreatableSelect component
8
+ * @returns {JSX.Element} CreatableSelect component
9
+ */
4
10
  export declare const CreatableSelect: <Option, IsAsync extends boolean = false, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>({ dataTestId, size, id, label, hideLabel, description, error, info, isInvalid, maxMenuHeight, styles, components, ...props }: SelectProps<Option, IsAsync, IsMulti, Group>) => JSX.Element;
@@ -10,5 +10,11 @@ interface SelectContainerProps {
10
10
  info?: React.ReactNode;
11
11
  dataTestId?: string;
12
12
  }
13
+ /**
14
+ * The SelectContainer component.
15
+ *
16
+ * @param {SelectContainerProps} props - The props for the SelectContainer component
17
+ * @returns {JSX.Element} SelectContainer component
18
+ */
13
19
  export declare const SelectContainer: ({ children, label, hideLabel, id, hasError, error, description, info, dataTestId, }: SelectContainerProps) => JSX.Element;
14
20
  export {};
@@ -1,4 +1,10 @@
1
1
  /// <reference types="react" />
2
2
  import { GroupBase } from "react-select";
3
3
  import { SelectProps } from "./shared";
4
+ /**
5
+ * The Select component.
6
+ *
7
+ * @param {SelectProps} props - The props for the Select component
8
+ * @returns {JSX.Element} Select component
9
+ */
4
10
  export declare const Select: <Option, IsAsync extends boolean = false, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>({ dataTestId, size, id, label, hideLabel, description, error, info, isInvalid, maxMenuHeight, styles, components, ...props }: SelectProps<Option, IsAsync, IsMulti, Group>) => JSX.Element;
@@ -13,71 +13,77 @@ export interface ISelectProps<Option, IsAsync extends boolean, IsMulti extends b
13
13
  /**
14
14
  * Label to be displayed.
15
15
  *
16
- * @type string
17
16
  * @memberof ISelectProps
18
17
  */
19
18
  label?: string;
20
19
  /**
21
20
  * To hide the label.
22
21
  *
23
- * @type boolean
24
22
  * @memberof ISelectProps
25
23
  */
26
24
  hideLabel?: boolean;
27
25
  /**
28
26
  * Description for the select component.
29
27
  *
30
- * @type string
31
28
  * @memberof ISelectProps
32
29
  */
33
30
  description?: string;
34
31
  /**
35
32
  * Whether the component is invalid.
36
33
  *
37
- * @type boolean
38
34
  * @memberof ISelectProps
39
35
  */
40
36
  isInvalid?: boolean;
41
37
  /**
42
38
  * Whether the component is disabled.
43
39
  *
44
- * @type boolean
45
40
  * @memberof ISelectProps
46
41
  */
47
42
  isDisabled?: boolean;
48
43
  /**
49
44
  * Info of the select component.
50
45
  *
51
- * @type ThemeReactNode
52
46
  * @memberof ISelectProps
53
47
  */
54
48
  info?: React.ReactNode;
55
49
  /**
56
50
  * Error of the select component.
57
51
  *
58
- * @type React.ReactNode
59
52
  * @memberof ISelectProps
60
53
  */
61
54
  error?: React.ReactNode;
62
55
  /**
63
56
  * Size of the component.
64
57
  *
65
- * @type "small" | "default"
66
58
  * @memberof ISelectProps
67
59
  */
68
60
  size?: SelectSize;
69
61
  /**
70
62
  * Whether component is asynchronous or not.
71
63
  *
72
- * @type {IsAsync}
73
64
  * @memberof ISelectProps
74
65
  */
75
66
  isAsync?: IsAsync;
76
67
  }
77
68
  export declare type SelectProps<Option, IsAsync extends boolean, IsMulti extends boolean, GroupType extends GroupBase<Option>> = IsAsync extends true ? AsyncProps<Option, IsMulti, GroupType> & ISelectProps<Option, IsAsync, IsMulti, GroupType> : ISelectProps<Option, IsAsync, IsMulti, GroupType>;
69
+ /**
70
+ * The useCustomStyles hook for getting trackunit specific styling on react-select.
71
+ *
72
+ * @param {StylesConfig} styles -
73
+ * @param {boolean} hasError -
74
+ * @param {boolean} isInvalid -
75
+ * @param {SelectSize} size -
76
+ * @returns {{StylesConfig}} useCustomStyles hook return
77
+ */
78
78
  export declare const useCustomStyles: <Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>(styles: StylesConfig<Option, IsMulti, Group> | undefined, hasError: boolean, isInvalid: boolean | undefined, size: SelectSize) => {
79
79
  customStyles: StylesConfig<Option, IsMulti, Group>;
80
80
  };
81
+ /**
82
+ * The useCustomComponents hook for getting trackunit specific components on react-select.
83
+ *
84
+ * @param {SelectComponents} components -
85
+ * @returns {*}} useCustomComponents hook return
86
+ */
81
87
  export declare const useCustomComponents: <Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>(components: Partial<SelectComponents<Option, IsMulti, Group>> | undefined) => {
82
88
  customComponents: Partial<SelectComponents<Option, IsMulti, Group>>;
83
89
  };
@@ -4,35 +4,30 @@ export interface ISkeletonLinesProps extends CommonProps {
4
4
  /**
5
5
  * The number of lines to display.
6
6
  *
7
- * @type number
8
7
  * @memberof ISkeletonLinesProps
9
8
  */
10
9
  lines?: number;
11
10
  /**
12
11
  * The height of lines. Can be a number or an array of numbers or string.
13
12
  *
14
- * @type number | number[] | string
15
13
  * @memberof ISkeletonLinesProps
16
14
  */
17
15
  height?: number | number[] | string;
18
16
  /**
19
17
  * The width of each lines. Can be a number or an array of numbers or string.
20
18
  *
21
- * @type number | number[] | string
22
19
  * @memberof ISkeletonLinesProps
23
20
  */
24
21
  width?: number | number[] | string;
25
22
  /**
26
23
  * Margin of lines.
27
24
  *
28
- * @type string
29
25
  * @memberof ISkeletonLinesProps
30
26
  */
31
27
  margin?: string;
32
28
  /**
33
29
  * Additional CSS classes.
34
30
  *
35
- * @type string
36
31
  * @memberof ISkeletonLinesProps
37
32
  */
38
33
  className?: string;
@@ -5,17 +5,21 @@ interface SpacerProps extends CommonProps {
5
5
  * The minimum height of the spacer. Defaults to 1px.
6
6
  * Possible values are "normal"(8px), and "large" (32px). Use className prop to use custom min-height values, example: min-h-[100px].
7
7
  *
8
- * @type number | string
9
8
  * @memberof SpacerProps
10
9
  */
11
10
  minHeight?: string;
12
11
  /**
13
12
  * The border of the spacer.
14
13
  *
15
- * @type boolean
16
14
  * @memberof SpacerProps
17
15
  */
18
16
  border?: boolean;
19
17
  }
18
+ /**
19
+ * The Spacer component is used for adding a bit of space.
20
+ *
21
+ * @param {SpacerProps} props - The props for the Spacer component
22
+ * @returns {JSX.Element} Spacer component
23
+ */
20
24
  export declare const Spacer: ({ minHeight, border, dataTestId }: SpacerProps) => JSX.Element;
21
25
  export {};
@@ -21,4 +21,10 @@ export interface SpinnerProps extends CommonProps {
21
21
  */
22
22
  containerClassName?: string;
23
23
  }
24
+ /**
25
+ * The Spinner component should be used st show a loading state.
26
+ *
27
+ * @param {SpinnerProps} props - The props for the Spinner component
28
+ * @returns {JSX.Element} Spinner component
29
+ */
24
30
  export declare const Spinner: ({ mode, size, centered, className, containerClassName, dataTestId, }: SpinnerProps) => JSX.Element;
@@ -8,72 +8,68 @@ export interface TextProps extends CommonProps {
8
8
  /**
9
9
  * Child nodes.
10
10
  *
11
- * @type React.ReactNode
12
11
  * @memberof TextProps
13
12
  */
14
13
  children: React.ReactNode;
15
14
  /**
16
15
  * Type of element. Element can be of types "p", "span", or "div".
17
16
  *
18
- * @type "p" | "span" | "div"
19
17
  * @memberof TextProps
20
18
  */
21
19
  type?: TextType;
22
20
  /**
23
21
  * Size of element. Values can be "default", "small", or "large".
24
22
  *
25
- * @type "small" | "default" | "large"
26
23
  * @memberof TextProps
27
24
  */
28
25
  size?: TextSize;
29
26
  /**
30
27
  * Alignment of the text. Values can be "left", "center", or "right".
31
28
  *
32
- * @type "left" | "center" | "right"
33
29
  * @memberof TextProps
34
30
  */
35
31
  align?: TextAlign;
36
32
  /**
37
33
  * Weight of the text. Values can be "default", "thick", or "bold".
38
34
  *
39
- * @type "default" | "thick" | "bold"
40
35
  * @memberof TextProps
41
36
  */
42
37
  weight?: TextWeight;
43
38
  /**
44
39
  * Whether font styles are inverted.
45
40
  *
46
- * @type boolean
47
41
  * @memberof TextProps
48
42
  */
49
43
  inverted?: boolean;
50
44
  /**
51
45
  * Whether font styles are subtle or not.
52
46
  *
53
- * @type boolean
54
47
  * @memberof TextProps
55
48
  */
56
49
  subtle?: boolean;
57
50
  /**
58
51
  * Whether text is italicized.
59
52
  *
60
- * @type boolean
61
53
  * @memberof TextProps
62
54
  */
63
55
  italicize?: boolean;
64
56
  /**
65
57
  * Whether text is uppercase.
66
58
  *
67
- * @type boolean
68
59
  * @memberof TextProps
69
60
  */
70
61
  uppercase?: boolean;
71
62
  /**
72
63
  * Whether text is underlined or not.
73
64
  *
74
- * @type boolean
75
65
  * @memberof TextProps
76
66
  */
77
67
  underline?: boolean;
78
68
  }
69
+ /**
70
+ * The Text component.
71
+ *
72
+ * @param {TextProps} props - The props for the Text component
73
+ * @returns {JSX.Element} Text component
74
+ */
79
75
  export declare const Text: ({ children, type, size, align, weight, underline, inverted, subtle, italicize, uppercase, className, dataTestId, }: TextProps) => JSX.Element;
@@ -4,132 +4,78 @@ export declare type TextAreaResize = "none" | "vertical" | "horizontal" | "both"
4
4
  export interface TextAreaProps extends CommonProps {
5
5
  /**
6
6
  * ID of the text area.
7
- *
8
- * @type string
9
- * @memberof TextAreaProps
10
7
  */
11
8
  id?: string;
12
9
  /**
13
10
  * Name of the text area.
14
- *
15
- * @type string
16
- * @memberof TextAreaProps
17
11
  */
18
12
  name?: string;
19
13
  /**
20
14
  * Label of the text area.
21
- *
22
- * @type string
23
- * @memberof TextAreaProps
24
15
  */
25
16
  label?: string;
26
17
  /**
27
18
  * Description of the text area.
28
- *
29
- * @type string
30
- * @memberof TextAreaProps
31
19
  */
32
20
  description?: string;
33
21
  /**
34
22
  * Information about the text area.
35
- *
36
- * @type {React.ReactNode}
37
- * @memberof TextAreaProps
38
23
  */
39
24
  info?: React.ReactNode;
40
25
  /**
41
26
  * Error message of the text area.
42
- *
43
- * @type {React.ReactNode}
44
- * @memberof TextAreaProps
45
27
  */
46
28
  error?: React.ReactNode;
47
29
  /**
48
30
  * Value of the text area.
49
- *
50
- * @type {React.ReactText}
51
- * @memberof TextAreaProps
52
31
  */
53
32
  value?: React.ReactText;
54
33
  /**
55
34
  * Tab index specifies the keyboard tab order of the textarea relative to the other controls on the page.
56
- *
57
- * @type number
58
- * @memberof TextAreaProps
59
35
  */
60
36
  tabIndex?: number;
61
37
  /**
62
38
  * Whether the text area is disabled or not.
63
- *
64
- * @type boolean
65
- * @memberof TextAreaProps
66
39
  */
67
40
  disabled?: boolean;
68
41
  /**
69
42
  * Whether the text area is readonly or not.
70
- *
71
- * @type boolean
72
- * @memberof TextAreaProps
73
43
  */
74
44
  readOnly?: boolean;
75
45
  /**
76
46
  * Number of rows in the text area.
77
- *
78
- * @type number
79
- * @memberof TextAreaProps
80
47
  */
81
48
  rows?: number;
82
49
  /**
83
50
  * Placeholder text for the text area.
84
- *
85
- * @type string
86
- * @memberof TextAreaProps
87
51
  */
88
52
  placeholder?: string;
89
53
  /**
90
54
  * onChange handler of the text area.
91
- *
92
- * @memberof TextAreaProps
93
55
  */
94
56
  onChange?: (event: React.SyntheticEvent<HTMLTextAreaElement>) => void;
95
57
  /**
96
58
  * onFocus handler of the text area.
97
- *
98
- * @memberof TextAreaProps
99
59
  */
100
60
  onFocus?: (event: React.SyntheticEvent<HTMLTextAreaElement>) => void;
101
61
  /**
102
62
  * onBlur handler of the text area.
103
- *
104
- * @memberof TextAreaProps
105
63
  */
106
64
  onBlur?: (event: React.SyntheticEvent<HTMLTextAreaElement>) => void;
107
65
  /**
108
66
  * Maximum length of the text area.
109
- *
110
- * @type number
111
- * @memberof TextAreaProps
112
67
  */
113
68
  maxLength?: number;
114
69
  /**
115
70
  * Resize of the text area.
116
- *
117
- * @type "none" | "vertical" | "horizontal" | "both"
118
- * @memberof TextAreaProps
119
71
  */
120
72
  resize?: TextAreaResize;
121
73
  /**
122
74
  * Default value of the textarea.
123
- *
124
- * @type {React.ReactText}
125
- * @memberof TextAreaProps
126
75
  */
127
76
  defaultValue?: React.ReactText;
128
77
  /**
129
78
  * Whether the text area is required or not.
130
- *
131
- * @type boolean
132
- * @memberof TextAreaProps
133
79
  */
134
80
  required?: boolean;
135
81
  }
@@ -7,14 +7,12 @@ export interface TextFieldProps extends TextInputProps, FormGroupExposedProps {
7
7
  * Set the Maximal length of the value for the input.
8
8
  * Adds a TextLenghtIndicator to the right of the helpText.
9
9
  *
10
- * @type number
11
10
  * @memberof TextFieldProps
12
11
  */
13
12
  maxLength?: number;
14
13
  /**
15
14
  * If a value is set, the field is rendered in its invalid state.
16
15
  *
17
- * @type string
18
16
  * @memberof TextFieldProps
19
17
  */
20
18
  errorMessage?: string;
@@ -1,6 +1,19 @@
1
1
  import * as React from "react";
2
2
  export interface TextLengthIndicatorProps {
3
+ /**
4
+ * The current length of the content of the input
5
+ */
3
6
  length: number;
7
+ /**
8
+ * The max number of characters allowed in the input
9
+ */
4
10
  maxLength: number;
5
11
  }
12
+ /**
13
+ * The TextLengthIndicator component shows a `{length}/{maxLength}` label.
14
+ * Used for TextFields to communicate a maximum allowed input length.
15
+ *
16
+ * @param {TextLengthIndicatorProps} props - The props for the TextLengthIndicator component
17
+ * @returns {JSX.Element} TextLengthIndicator component
18
+ */
6
19
  export declare const TextLengthIndicator: React.FC<TextLengthIndicatorProps>;
@@ -1,18 +1,23 @@
1
1
  import * as React from "react";
2
2
  import { CommonProps } from "../../common";
3
- import { IIconProps } from "../icon/Icon";
3
+ import { IconProps } from "../icon/Icon";
4
4
  import { TooltipProps } from "../tooltip";
5
5
  export interface TipProps extends CommonProps {
6
6
  /**
7
7
  * Child nodes to render inside the tip.
8
8
  *
9
- * @type {React.ReactNode}
10
9
  * @memberof TipProps
11
10
  */
12
11
  children: React.ReactNode;
13
- iconProps?: Partial<IIconProps>;
12
+ iconProps?: Partial<IconProps>;
14
13
  tooltipProps?: Partial<TooltipProps>;
15
14
  }
15
+ /**
16
+ * The Tip component is used to show helpful tips for users.
17
+ *
18
+ * @param {TipProps} props - The props for the Tip component
19
+ * @returns {JSX.Element} Tip component
20
+ */
16
21
  export declare const Tip: {
17
22
  ({ children, iconProps, tooltipProps, dataTestId, ...rest }: TipProps): JSX.Element;
18
23
  displayName: string;
@@ -4,64 +4,38 @@ export declare type ToggleSize = "small" | "default";
4
4
  export interface ToggleProps extends CommonProps {
5
5
  /**
6
6
  * ID of the toggle.
7
- *
8
- * @type string
9
- * @memberof ToggleProps
10
7
  */
11
8
  id: string;
12
9
  /**
13
10
  * Whether the toggle is toggled(active) or not.
14
- *
15
- * @type boolean
16
- * @memberof ToggleProps
17
11
  */
18
12
  toggled: boolean;
19
13
  /**
20
14
  * onChange event handler.
21
- *
22
- * @memberof ToggleProps
23
15
  */
24
16
  onChange: (toggled: boolean, event?: React.ChangeEvent<HTMLInputElement>) => void;
25
17
  /**
26
18
  * Whether the toggle is disabled or not.
27
- *
28
- * @type boolean
29
- * @memberof ToggleProps
30
19
  */
31
20
  disabled?: boolean;
32
21
  /**
33
22
  * Size of the toggle.
34
- *
35
- * @type "small" | "default"
36
- * @memberof ToggleProps
37
23
  */
38
24
  size?: ToggleSize;
39
25
  /**
40
26
  * Tab index specifies the keyboard tab order of the toggle relative to the other controls on the page.
41
- *
42
- * @type number
43
- * @memberof ToggleProps
44
27
  */
45
28
  tabIndex?: number;
46
29
  /**
47
30
  * Whether the toggle is required or not.
48
- *
49
- * @type boolean
50
- * @memberof ToggleProps
51
31
  */
52
32
  required?: boolean;
53
33
  /**
54
34
  * Name of the toggle.
55
- *
56
- * @type string
57
- * @memberof ToggleProps
58
35
  */
59
36
  name?: string;
60
37
  /**
61
38
  * onBlur event handler.
62
- *
63
- * @type {React.FocusEventHandler<HTMLInputElement>}
64
- * @memberof ToggleProps
65
39
  */
66
40
  onBlur?: React.FocusEventHandler<HTMLInputElement>;
67
41
  }