@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.
Files changed (77) hide show
  1. package/README.md +12 -30
  2. package/common/CommonProps.d.ts +0 -2
  3. package/common/useContainerProps.d.ts +8 -0
  4. package/components/NumberField/NumberField.d.ts +0 -1
  5. package/components/NumberInput/NumberInput.d.ts +2 -2
  6. package/components/TextInput/TextInput.d.ts +2 -2
  7. package/components/alert/Alert.d.ts +6 -7
  8. package/components/badge/Badge.d.ts +8 -9
  9. package/components/baseInput/BaseInput.d.ts +0 -8
  10. package/components/buttons/button/Button.d.ts +0 -6
  11. package/components/buttons/icon-button/IconButton.d.ts +0 -3
  12. package/components/buttons/shared/ButtonProps.d.ts +0 -7
  13. package/components/buttons/shared/helpers.d.ts +10 -0
  14. package/components/buttons/star-button/StarButton.d.ts +6 -0
  15. package/components/card/Card.d.ts +7 -3
  16. package/components/card/CardBody.d.ts +5 -4
  17. package/components/card/CardFooter.d.ts +2 -2
  18. package/components/card/CardHeader.d.ts +4 -13
  19. package/components/card/DensityContainer.d.ts +10 -11
  20. package/components/chart/Chart.d.ts +5 -10
  21. package/components/checkbox/CheckIcon.d.ts +11 -3
  22. package/components/checkbox/Checkbox.d.ts +0 -6
  23. package/components/checkbox/IndeterminateIcon.d.ts +6 -0
  24. package/components/collapse/Collapse.d.ts +6 -3
  25. package/components/copyableText/CopyableText.d.ts +6 -3
  26. package/components/dateField/DateField.d.ts +2 -6
  27. package/components/dayPicker/DayPicker.d.ts +18 -0
  28. package/components/dayPicker/DayPickerPopover.d.ts +6 -0
  29. package/components/dayPicker/DayRangePicker.d.ts +6 -0
  30. package/components/dayPicker/useLocale.d.ts +6 -0
  31. package/components/formGroup/FormGroup.d.ts +8 -6
  32. package/components/heading/Heading.d.ts +6 -4
  33. package/components/icon/Icon.d.ts +12 -10
  34. package/components/indicator/Indicator.d.ts +7 -5
  35. package/components/label/Label.d.ts +8 -4
  36. package/components/legendItem/LegendItem.d.ts +6 -0
  37. package/components/menu/MenuButton.d.ts +6 -0
  38. package/components/menu/MenuItem.d.ts +6 -4
  39. package/components/menu/MenuList.d.ts +6 -3
  40. package/components/modal/Modal.d.ts +0 -4
  41. package/components/modal/ModalBackdrop.d.ts +6 -0
  42. package/components/modal/useModal.d.ts +6 -0
  43. package/components/multiRowTableCell/MultiRowTableCell.d.ts +4 -4
  44. package/components/pageHeading/PageHeading.d.ts +6 -3
  45. package/components/popover/PopoverList.d.ts +6 -0
  46. package/components/popover/PopoverListItem.d.ts +6 -0
  47. package/components/popover/PopoverTitle.d.ts +6 -0
  48. package/components/popover/usePopover.d.ts +6 -0
  49. package/components/prompt/Prompt.d.ts +13 -3
  50. package/components/radioGroup/RadioGroup.d.ts +6 -8
  51. package/components/radioGroup/RadioItem.d.ts +6 -2
  52. package/components/select/CreatableSelect.d.ts +6 -0
  53. package/components/select/FieldContainer.d.ts +6 -0
  54. package/components/select/Select.d.ts +6 -0
  55. package/components/select/shared.d.ts +15 -9
  56. package/components/skeletonLines/SkeletonLines.d.ts +0 -5
  57. package/components/spacer/Spacer.d.ts +6 -2
  58. package/components/spinner/Spinner.d.ts +6 -0
  59. package/components/text/Text.d.ts +6 -10
  60. package/components/textArea/TextArea.d.ts +0 -54
  61. package/components/textField/TextField.d.ts +0 -2
  62. package/components/textField/TextLenghtIndicator.d.ts +13 -0
  63. package/components/tip/Tip.d.ts +8 -3
  64. package/components/toggle/Toggle.d.ts +0 -26
  65. package/components/tooltip/Tooltip.d.ts +6 -9
  66. package/hooks/useDebounce.d.ts +7 -0
  67. package/hooks/useLocalStorage.d.ts +7 -0
  68. package/hooks/useTimeout.d.ts +6 -0
  69. package/index.js +455 -63
  70. package/layout/helper/MinTopFullContentLayout.d.ts +6 -0
  71. package/layout/responsive/FilterListMapLayout.d.ts +6 -3
  72. package/layout/responsive/FullWidthRepeatingLayout.d.ts +8 -5
  73. package/layout/responsive/GridArea.d.ts +3 -1
  74. package/layout/responsive/IntrinsicallyResponsiveGrid.d.ts +12 -8
  75. package/layout/responsive/TitleNavContentLayout.d.ts +8 -2
  76. package/layout/responsive/TwoColumnLayout.d.ts +8 -2
  77. package/package.json +5 -5
@@ -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
  }
@@ -5,65 +5,62 @@ export interface TooltipProps {
5
5
  /**
6
6
  * The text to be displayed in the tooltip.
7
7
  *
8
- * @type {(string | React.ReactNode)}
9
8
  * @memberof TooltipProps
10
9
  */
11
10
  label: string | React.ReactNode;
12
11
  /**
13
12
  * Where the tooltip should be placed.
14
13
  *
15
- * @type {PopoverPlacement}
16
14
  * @memberof TooltipProps
17
15
  */
18
16
  placement?: PopoverPlacement;
19
17
  /**
20
18
  * Child nodes
21
19
  *
22
- * @type React.ReactNode
23
20
  * @memberof TooltipProps
24
21
  */
25
22
  children?: React.ReactNode;
26
23
  /**
27
24
  * Id of test component.
28
25
  *
29
- * @type string
30
26
  * @memberof TooltipProps
31
27
  */
32
28
  dataTestId?: string;
33
29
  /**
34
30
  * Whether the tooltip is disabled or not.
35
31
  *
36
- * @type boolean
37
32
  * @memberof TooltipProps
38
33
  */
39
34
  disabled?: boolean;
40
35
  /**
41
36
  * To select either "light" or "dark" mode.
42
37
  *
43
- * @type "light" | "dark"
44
38
  * @memberof TooltipProps
45
39
  */
46
40
  mode?: "light" | "dark";
47
41
  /**
48
42
  * Offset value of the tooltip.
49
43
  *
50
- * @type [number, number]
51
44
  * @memberof TooltipProps
52
45
  */
53
46
  offset?: [number, number];
54
47
  /**
55
48
  * Additional classes to the component.
56
49
  *
57
- * @type string
58
50
  * @memberof TooltipProps
59
51
  */
60
52
  className?: string;
61
53
  /**
62
54
  * Type of content.
63
55
  *
64
- * @type "p" | "span" | "div"
65
56
  * @memberof TooltipProps
66
57
  */
67
58
  contentTextType?: TextType;
68
59
  }
60
+ /**
61
+ * The Tooltip component.
62
+ *
63
+ * @param {TooltipProps} props - The props for the Tooltip component
64
+ * @returns {JSX.Element} Tooltip component
65
+ */
69
66
  export declare const Tooltip: ({ label, placement, children, dataTestId, disabled, mode, offset, className, contentTextType, }: TooltipProps) => JSX.Element;
@@ -1 +1,8 @@
1
+ /**
2
+ * The useDebounce hook works like useState, but adds a delay where previous values will be ignored.
3
+ *
4
+ * @param {any} value The value to set
5
+ * @param {number} delay The debounce time
6
+ * @returns {any} value The latest values received
7
+ */
1
8
  export declare const useDebounce: <T>(value: T, delay?: number) => T;
@@ -1,2 +1,9 @@
1
1
  import { Dispatch, SetStateAction } from "react";
2
+ /**
3
+ * The useLocalStorage hook works like useState, but saves to localstorage.
4
+ *
5
+ * @param {string} key - The key the values is saved under.
6
+ * @param {string | null | undefined} initialValue - The initial value for the state/local storage item
7
+ * @returns {string | null | undefined} value
8
+ */
2
9
  export declare const useLocalStorage: <TValue = string | null | undefined>(key: string, initialValue?: TValue | undefined) => [TValue | null, Dispatch<SetStateAction<TValue | null>>, () => void];
@@ -2,6 +2,12 @@ interface UseTimeoutProps {
2
2
  onTimeout: () => void;
3
3
  duration: number;
4
4
  }
5
+ /**
6
+ * The useTimeout hook.
7
+ *
8
+ * @param {UseTimeoutProps} props The props
9
+ * @returns {{ startTimeout: () => void; stopTimeout: () => void; }} return
10
+ */
5
11
  export declare const useTimeout: ({ onTimeout, duration }: UseTimeoutProps) => {
6
12
  startTimeout: () => void;
7
13
  stopTimeout: () => void;