@trackunit/react-components 0.0.49 → 0.0.50

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 +445 -39
  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
@@ -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;