@trackunit/react-components 0.1.117 → 0.1.119

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 (127) hide show
  1. package/index.cjs +38905 -2435
  2. package/index.js +38914 -2444
  3. package/package.json +7 -7
  4. package/src/common/CommonProps.d.ts +12 -12
  5. package/src/common/StorybookProps.d.ts +6 -6
  6. package/src/common/index.d.ts +3 -3
  7. package/src/common/useContainerProps.d.ts +16 -16
  8. package/src/components/Alert/Alert.d.ts +53 -53
  9. package/src/components/Alert/Alert.variants.d.ts +18 -18
  10. package/src/components/Alert/index.d.ts +1 -1
  11. package/src/components/Badge/Badge.d.ts +38 -38
  12. package/src/components/Badge/Badge.variants.d.ts +3 -3
  13. package/src/components/Badge/index.d.ts +1 -1
  14. package/src/components/Card/Card.d.ts +39 -39
  15. package/src/components/Card/Card.variants.d.ts +13 -13
  16. package/src/components/Card/CardBody.d.ts +25 -25
  17. package/src/components/Card/CardFooter.d.ts +25 -25
  18. package/src/components/Card/CardHeader.d.ts +47 -47
  19. package/src/components/Card/DensityContainer.d.ts +30 -30
  20. package/src/components/Card/index.d.ts +5 -5
  21. package/src/components/Clickable/Clickable.variants.d.ts +3 -3
  22. package/src/components/Collapse/Collapse.d.ts +28 -28
  23. package/src/components/Collapse/Collapse.variants.d.ts +8 -8
  24. package/src/components/Collapse/index.d.ts +1 -1
  25. package/src/components/CopyableText/CopyableText.d.ts +21 -21
  26. package/src/components/CopyableText/CopyableText.variants.d.ts +3 -3
  27. package/src/components/CopyableText/index.d.ts +1 -1
  28. package/src/components/DayPicker/DayPicker.d.ts +32 -32
  29. package/src/components/DayPicker/DayPickerPopover.d.ts +22 -22
  30. package/src/components/DayPicker/DayRangePicker.d.ts +33 -33
  31. package/src/components/DayPicker/index.d.ts +21 -21
  32. package/src/components/DayPicker/useLocale.d.ts +8 -8
  33. package/src/components/Drawer/Drawer.d.ts +32 -32
  34. package/src/components/Drawer/Drawer.variants.d.ts +4 -4
  35. package/src/components/ExternalLink/ExternalLink.d.ts +31 -31
  36. package/src/components/Heading/Heading.d.ts +28 -28
  37. package/src/components/Heading/Heading.variants.d.ts +5 -5
  38. package/src/components/Heading/index.d.ts +1 -1
  39. package/src/components/Icon/Icon.d.ts +52 -52
  40. package/src/components/Icon/Icon.variants.d.ts +8 -8
  41. package/src/components/Indicator/Indicator.d.ts +42 -42
  42. package/src/components/Indicator/Indicator.variants.d.ts +10 -10
  43. package/src/components/Indicator/index.d.ts +1 -1
  44. package/src/components/Menu/MenuItem/MenuItem.d.ts +65 -65
  45. package/src/components/Menu/MenuList/MenuList.d.ts +36 -36
  46. package/src/components/Menu/MoreMenu/MoreMenu.d.ts +24 -24
  47. package/src/components/Menu/index.d.ts +3 -3
  48. package/src/components/Modal/Modal.d.ts +30 -30
  49. package/src/components/Modal/ModalBackdrop.d.ts +13 -13
  50. package/src/components/Modal/index.d.ts +3 -3
  51. package/src/components/Modal/useModal.d.ts +21 -21
  52. package/src/components/PageHeader/PageHeader.d.ts +47 -47
  53. package/src/components/PageHeader/PageHeader.variants.d.ts +5 -5
  54. package/src/components/PageHeader/index.d.ts +1 -1
  55. package/src/components/Pagination/Pagination.d.ts +62 -62
  56. package/src/components/Pagination/Pagination.variants.d.ts +2 -2
  57. package/src/components/Popover/Popover.d.ts +72 -72
  58. package/src/components/Popover/Popover.variants.d.ts +5 -5
  59. package/src/components/Popover/PopoverContent.d.ts +7 -7
  60. package/src/components/Popover/PopoverTitle.d.ts +20 -20
  61. package/src/components/Popover/PopoverTrigger.d.ts +12 -12
  62. package/src/components/Popover/PopoverTypes.d.ts +33 -33
  63. package/src/components/Popover/index.d.ts +5 -5
  64. package/src/components/Popover/usePopover.d.ts +56 -56
  65. package/src/components/Prompt/Prompt.d.ts +20 -20
  66. package/src/components/Prompt/index.d.ts +1 -1
  67. package/src/components/SectionHeader/SectionHeader.d.ts +23 -23
  68. package/src/components/SectionHeader/index.d.ts +1 -1
  69. package/src/components/Sidebar/Sidebar.d.ts +57 -57
  70. package/src/components/Sidebar/Sidebar.variants.d.ts +4 -4
  71. package/src/components/Sidebar/useOverflowItems.d.ts +39 -39
  72. package/src/components/SkeletonLines/SkeletonLines.d.ts +25 -25
  73. package/src/components/SkeletonLines/SkeletonLines.variants.d.ts +1 -1
  74. package/src/components/SkeletonLines/index.d.ts +1 -1
  75. package/src/components/Spacer/Spacer.d.ts +20 -20
  76. package/src/components/Spacer/Spacer.variants.d.ts +4 -4
  77. package/src/components/Spacer/index.d.ts +1 -1
  78. package/src/components/Spinner/Spinner.d.ts +39 -39
  79. package/src/components/Spinner/Spinner.variants.d.ts +7 -7
  80. package/src/components/Spinner/index.d.ts +1 -1
  81. package/src/components/Tag/Tag.d.ts +40 -40
  82. package/src/components/Tag/Tag.variants.d.ts +7 -7
  83. package/src/components/Tag/index.d.ts +1 -1
  84. package/src/components/Text/Text.d.ts +58 -58
  85. package/src/components/Text/index.d.ts +1 -1
  86. package/src/components/Timeline/Timeline.d.ts +33 -33
  87. package/src/components/Timeline/Timeline.variants.d.ts +3 -3
  88. package/src/components/Tip/Tip.d.ts +26 -26
  89. package/src/components/Tip/Tip.variants.d.ts +4 -4
  90. package/src/components/Tip/index.d.ts +1 -1
  91. package/src/components/Tooltip/Tooltip.d.ts +37 -37
  92. package/src/components/Tooltip/Tooltip.variants.d.ts +6 -6
  93. package/src/components/Tooltip/index.d.ts +1 -1
  94. package/src/components/ValueBar/ValueBar.d.ts +44 -44
  95. package/src/components/ValueBar/ValueBar.variants.d.ts +9 -9
  96. package/src/components/ValueBar/ValueBarHelper.d.ts +35 -35
  97. package/src/components/ValueBar/ValueBarTypes.d.ts +9 -9
  98. package/src/components/ValueBar/index.d.ts +3 -3
  99. package/src/components/buttons/BackToTopButton/BackToTopButton.d.ts +14 -14
  100. package/src/components/buttons/BackToTopButton/BackToTopButton.variants.d.ts +3 -3
  101. package/src/components/buttons/Button/Button.d.ts +44 -44
  102. package/src/components/buttons/IconButton/IconButton.d.ts +20 -20
  103. package/src/components/buttons/StarButton/StarButton.d.ts +13 -13
  104. package/src/components/buttons/index.d.ts +4 -4
  105. package/src/components/buttons/shared/Button.variants.d.ts +13 -13
  106. package/src/components/buttons/shared/ButtonProps.d.ts +48 -48
  107. package/src/components/index.d.ts +30 -30
  108. package/src/hooks/index.d.ts +9 -9
  109. package/src/hooks/useClickOutside.d.ts +12 -12
  110. package/src/hooks/useDebounce.d.ts +13 -13
  111. package/src/hooks/useDevicePixelRatio.d.ts +37 -37
  112. package/src/hooks/useHover.d.ts +24 -24
  113. package/src/hooks/useIsFirstRender.d.ts +6 -6
  114. package/src/hooks/useLocalStorage.d.ts +9 -9
  115. package/src/hooks/useLocalStorageReducer.d.ts +7 -7
  116. package/src/hooks/useResize.d.ts +10 -10
  117. package/src/hooks/useTimeout.d.ts +11 -11
  118. package/src/index.d.ts +7 -7
  119. package/src/layout/helper/MinTopFullContentLayout.d.ts +18 -18
  120. package/src/layout/index.d.ts +6 -6
  121. package/src/layout/responsive/FilterListMapLayout.d.ts +15 -22
  122. package/src/layout/responsive/FullWidthRepeatingLayout.d.ts +19 -19
  123. package/src/layout/responsive/GridArea.d.ts +13 -13
  124. package/src/layout/responsive/IntrinsicallyResponsiveGrid.d.ts +32 -32
  125. package/src/layout/responsive/TitleNavContentLayout.d.ts +28 -28
  126. package/src/test-utils/hooks.d.ts +4 -4
  127. package/src/test-utils/test-utils.d.ts +5 -5
@@ -1,44 +1,44 @@
1
- /// <reference types="react" />
2
- import { CommonProps } from "../../common";
3
- import { LevelColors } from "./ValueBarTypes";
4
- export interface ValueBarProps extends CommonProps {
5
- /**
6
- * Value to display.
7
- */
8
- value: number;
9
- /**
10
- * Minimum value visible on the bar.
11
- */
12
- min?: number;
13
- /**
14
- * Maximum value visible on the bar.
15
- */
16
- max?: number;
17
- /**
18
- * Value unit. Visible only together with value if showValue parameter is set to true.
19
- */
20
- unit?: string;
21
- /**
22
- * Size of the tooltip
23
- */
24
- size?: "small" | "large";
25
- /**
26
- * Custom level colors. If this param is not provided then default values are used.
27
- */
28
- levelColors?: LevelColors;
29
- /**
30
- * Custom value color. If this param is not provided then default value is used.
31
- */
32
- valueColor?: string;
33
- /**
34
- * Show value with unit (if provided) on the bar in large version or after the bar in the small version.
35
- */
36
- showValue?: boolean;
37
- }
38
- /**
39
- * ValueBar component is used to display value on a colorful bar within provided range.
40
- *
41
- * @param {ValueBarProps} props - The props for the ValueBar component
42
- * @returns {JSX.Element} ValueBar component
43
- */
44
- export declare const ValueBar: ({ value, min, max, unit, size, levelColors, valueColor, showValue, className, dataTestId, }: ValueBarProps) => JSX.Element;
1
+ /// <reference types="react" />
2
+ import { CommonProps } from "../../common";
3
+ import { LevelColors } from "./ValueBarTypes";
4
+ export interface ValueBarProps extends CommonProps {
5
+ /**
6
+ * Value to display.
7
+ */
8
+ value: number;
9
+ /**
10
+ * Minimum value visible on the bar.
11
+ */
12
+ min?: number;
13
+ /**
14
+ * Maximum value visible on the bar.
15
+ */
16
+ max?: number;
17
+ /**
18
+ * Value unit. Visible only together with value if showValue parameter is set to true.
19
+ */
20
+ unit?: string;
21
+ /**
22
+ * Size of the tooltip
23
+ */
24
+ size?: "small" | "large";
25
+ /**
26
+ * Custom level colors. If this param is not provided then default values are used.
27
+ */
28
+ levelColors?: LevelColors;
29
+ /**
30
+ * Custom value color. If this param is not provided then default value is used.
31
+ */
32
+ valueColor?: string;
33
+ /**
34
+ * Show value with unit (if provided) on the bar in large version or after the bar in the small version.
35
+ */
36
+ showValue?: boolean;
37
+ }
38
+ /**
39
+ * ValueBar component is used to display value on a colorful bar within provided range.
40
+ *
41
+ * @param {ValueBarProps} props - The props for the ValueBar component
42
+ * @returns {JSX.Element} ValueBar component
43
+ */
44
+ export declare const ValueBar: ({ value, min, max, unit, size, levelColors, valueColor, showValue, className, dataTestId, }: ValueBarProps) => JSX.Element;
@@ -1,9 +1,9 @@
1
- export declare const cvaValueBar: (props?: ({
2
- size?: "small" | "large" | null | undefined;
3
- } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
4
- export declare const cvaValueBarProgress: (props?: ({
5
- fill?: "default" | "background" | null | undefined;
6
- } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
7
- export declare const cvaValueBarText: (props?: ({
8
- size?: "small" | "large" | null | undefined;
9
- } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
1
+ export declare const cvaValueBar: (props?: ({
2
+ size?: "small" | "large" | null | undefined;
3
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
4
+ export declare const cvaValueBarProgress: (props?: ({
5
+ fill?: "default" | "background" | null | undefined;
6
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
7
+ export declare const cvaValueBarText: (props?: ({
8
+ size?: "small" | "large" | null | undefined;
9
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
@@ -1,35 +1,35 @@
1
- import { LevelColors } from "./ValueBarTypes";
2
- /**
3
- * Helper function to get normalized score in range 0-1 used by the ValueBar
4
- *
5
- * @param {number} value - value for which score should be returned
6
- * @param {number} min - min range value
7
- * @param {number} max - max range value
8
- * @returns {number} normalized score
9
- */
10
- export declare const getScore: (value: number, min: number, max: number) => number;
11
- /**
12
- * Helper function to get default color used by the ValueBar
13
- *
14
- * @param {number} score - score number for which color should be returned
15
- * @returns {string} color value
16
- */
17
- export declare const getDefaultFillColor: (score: number) => string;
18
- /**
19
- * Helper function to get custom color used by the ValueBar
20
- *
21
- * @param {number} score - score number for which color should be returned
22
- * @param {LevelColors} levelColors - custom colors and levels definitions
23
- * @returns {string} color value
24
- */
25
- export declare const getFillColor: (score: number, levelColors: LevelColors) => string;
26
- /**
27
- * Helper function to get color used by the ValueBar
28
- *
29
- * @param {number} value - value for which color should be returned
30
- * @param {number} min - min range value
31
- * @param {number} max - max range value
32
- * @param {LevelColors} levelColors - level colors used to coloring the bar
33
- * @returns {JSX.Element} ValueBar component
34
- */
35
- export declare const getValueBarColorByValue: (value: number, min: number, max: number, levelColors: LevelColors) => string;
1
+ import { LevelColors } from "./ValueBarTypes";
2
+ /**
3
+ * Helper function to get normalized score in range 0-1 used by the ValueBar
4
+ *
5
+ * @param {number} value - value for which score should be returned
6
+ * @param {number} min - min range value
7
+ * @param {number} max - max range value
8
+ * @returns {number} normalized score
9
+ */
10
+ export declare const getScore: (value: number, min: number, max: number) => number;
11
+ /**
12
+ * Helper function to get default color used by the ValueBar
13
+ *
14
+ * @param {number} score - score number for which color should be returned
15
+ * @returns {string} color value
16
+ */
17
+ export declare const getDefaultFillColor: (score: number) => string;
18
+ /**
19
+ * Helper function to get custom color used by the ValueBar
20
+ *
21
+ * @param {number} score - score number for which color should be returned
22
+ * @param {LevelColors} levelColors - custom colors and levels definitions
23
+ * @returns {string} color value
24
+ */
25
+ export declare const getFillColor: (score: number, levelColors: LevelColors) => string;
26
+ /**
27
+ * Helper function to get color used by the ValueBar
28
+ *
29
+ * @param {number} value - value for which color should be returned
30
+ * @param {number} min - min range value
31
+ * @param {number} max - max range value
32
+ * @param {LevelColors} levelColors - level colors used to coloring the bar
33
+ * @returns {JSX.Element} ValueBar component
34
+ */
35
+ export declare const getValueBarColorByValue: (value: number, min: number, max: number, levelColors: LevelColors) => string;
@@ -1,9 +1,9 @@
1
- export interface LevelColor {
2
- level?: number;
3
- color: string;
4
- }
5
- export interface LevelColors {
6
- low?: LevelColor;
7
- medium?: LevelColor;
8
- high?: LevelColor;
9
- }
1
+ export interface LevelColor {
2
+ level?: number;
3
+ color: string;
4
+ }
5
+ export interface LevelColors {
6
+ low?: LevelColor;
7
+ medium?: LevelColor;
8
+ high?: LevelColor;
9
+ }
@@ -1,3 +1,3 @@
1
- export * from "./ValueBar";
2
- export * from "./ValueBarTypes";
3
- export { getValueBarColorByValue } from "./ValueBarHelper";
1
+ export * from "./ValueBar";
2
+ export * from "./ValueBarTypes";
3
+ export { getValueBarColorByValue } from "./ValueBarHelper";
@@ -1,14 +1,14 @@
1
- import { CommonProps, Size } from "../../../common";
2
- export type BackToTopColor = "primary" | "secondary";
3
- export interface StyledBackToTopProps {
4
- $color?: BackToTopColor;
5
- }
6
- export interface BackToTopProps extends CommonProps {
7
- color?: BackToTopColor;
8
- size?: Size;
9
- }
10
- /**
11
- * BackToTopButton appears at the bottom-right corner of the screen when the user scrolls down the page. When clicked, the page scrolls smoothly to the top.
12
- *
13
- */
14
- export declare const BackToTopButton: ({ color, size, dataTestId, className }: BackToTopProps) => JSX.Element;
1
+ import { CommonProps, Size } from "../../../common";
2
+ export type BackToTopColor = "primary" | "secondary";
3
+ export interface StyledBackToTopProps {
4
+ $color?: BackToTopColor;
5
+ }
6
+ export interface BackToTopProps extends CommonProps {
7
+ color?: BackToTopColor;
8
+ size?: Size;
9
+ }
10
+ /**
11
+ * BackToTopButton appears at the bottom-right corner of the screen when the user scrolls down the page. When clicked, the page scrolls smoothly to the top.
12
+ *
13
+ */
14
+ export declare const BackToTopButton: ({ color, size, dataTestId, className }: BackToTopProps) => JSX.Element;
@@ -1,3 +1,3 @@
1
- export declare const cvaBackToTopButton: (props?: ({
2
- color?: "primary" | "secondary" | null | undefined;
3
- } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
1
+ export declare const cvaBackToTopButton: (props?: ({
2
+ color?: "primary" | "secondary" | null | undefined;
3
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
@@ -1,44 +1,44 @@
1
- import * as React from "react";
2
- import { ButtonCommonProps, ButtonType } from "../shared/ButtonProps";
3
- export interface ButtonProps extends ButtonCommonProps {
4
- onClick?: (event: React.MouseEvent<HTMLElement>) => void;
5
- /**
6
- * Child nodes. Can be used to pass in text to be displayed on the button.
7
- */
8
- children?: React.ReactNode;
9
- /**
10
- * Whether button is fullWidth or not.
11
- */
12
- fullWidth?: boolean;
13
- /**
14
- * The button prefix.
15
- */
16
- prefix?: React.ReactNode;
17
- /**
18
- * The button suffix.
19
- */
20
- suffix?: React.ReactNode;
21
- /**
22
- * The type of the button. Values can be "submit" or "button".
23
- */
24
- type?: ButtonType;
25
- /**
26
- * The element type the button will be rendered as.
27
- */
28
- renderAs?: keyof JSX.IntrinsicElements | React.ComponentType<any>;
29
- /**
30
- * The Id of the form to submit, for button type submit
31
- */
32
- form?: string;
33
- /**
34
- * The name of the button
35
- */
36
- name?: string;
37
- }
38
- /**
39
- * Buttons allow users to perform an action when triggered.
40
- *
41
- * @param {ButtonProps} props - The props for the Button component
42
- * @returns {JSX.Element} Button component
43
- */
44
- export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
1
+ import * as React from "react";
2
+ import { ButtonCommonProps, ButtonType } from "../shared/ButtonProps";
3
+ export interface ButtonProps extends ButtonCommonProps {
4
+ onClick?: (event: React.MouseEvent<HTMLElement>) => void;
5
+ /**
6
+ * Child nodes. Can be used to pass in text to be displayed on the button.
7
+ */
8
+ children?: React.ReactNode;
9
+ /**
10
+ * Whether button is fullWidth or not.
11
+ */
12
+ fullWidth?: boolean;
13
+ /**
14
+ * The button prefix.
15
+ */
16
+ prefix?: React.ReactNode;
17
+ /**
18
+ * The button suffix.
19
+ */
20
+ suffix?: React.ReactNode;
21
+ /**
22
+ * The type of the button. Values can be "submit" or "button".
23
+ */
24
+ type?: ButtonType;
25
+ /**
26
+ * The element type the button will be rendered as.
27
+ */
28
+ renderAs?: keyof JSX.IntrinsicElements | React.ComponentType<any>;
29
+ /**
30
+ * The Id of the form to submit, for button type submit
31
+ */
32
+ form?: string;
33
+ /**
34
+ * The name of the button
35
+ */
36
+ name?: string;
37
+ }
38
+ /**
39
+ * Buttons allow users to perform an action when triggered.
40
+ *
41
+ * @param {ButtonProps} props - The props for the Button component
42
+ * @returns {JSX.Element} Button component
43
+ */
44
+ export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
@@ -1,20 +1,20 @@
1
- import * as React from "react";
2
- import { Size } from "../../../common";
3
- import { ButtonCommonProps } from "../shared/ButtonProps";
4
- export interface IconButtonProps extends ButtonCommonProps {
5
- /**
6
- * The icon to display.
7
- */
8
- icon: React.ReactNode;
9
- /**
10
- * The element type the button will be rendered as.
11
- *
12
- * @memberof IconButtonProps
13
- */
14
- renderAs?: keyof JSX.IntrinsicElements | React.ComponentType<any>;
15
- /**
16
- * The size of the button. Defaults to "small".
17
- */
18
- size?: Size;
19
- }
20
- export declare const IconButton: React.ForwardRefExoticComponent<IconButtonProps & React.RefAttributes<HTMLButtonElement>>;
1
+ import * as React from "react";
2
+ import { Size } from "../../../common";
3
+ import { ButtonCommonProps } from "../shared/ButtonProps";
4
+ export interface IconButtonProps extends ButtonCommonProps {
5
+ /**
6
+ * The icon to display.
7
+ */
8
+ icon: React.ReactNode;
9
+ /**
10
+ * The element type the button will be rendered as.
11
+ *
12
+ * @memberof IconButtonProps
13
+ */
14
+ renderAs?: keyof JSX.IntrinsicElements | React.ComponentType<any>;
15
+ /**
16
+ * The size of the button. Defaults to "small".
17
+ */
18
+ size?: Size;
19
+ }
20
+ export declare const IconButton: React.ForwardRefExoticComponent<IconButtonProps & React.RefAttributes<HTMLButtonElement>>;
@@ -1,13 +1,13 @@
1
- import * as React from "react";
2
- interface StarButtonProps {
3
- starred: boolean;
4
- onClick: (e: React.MouseEvent) => void;
5
- }
6
- /**
7
- * The StarButton component is used for favorite actions or similar.
8
- *
9
- * @param {StarButtonProps} props - The props for the StarButton component
10
- * @returns {JSX.Element} StarButton component
11
- */
12
- export declare const StarButton: ({ starred, onClick }: StarButtonProps) => JSX.Element;
13
- export {};
1
+ import * as React from "react";
2
+ interface StarButtonProps {
3
+ starred: boolean;
4
+ onClick: (e: React.MouseEvent) => void;
5
+ }
6
+ /**
7
+ * The StarButton component is used for favorite actions or similar.
8
+ *
9
+ * @param {StarButtonProps} props - The props for the StarButton component
10
+ * @returns {JSX.Element} StarButton component
11
+ */
12
+ export declare const StarButton: ({ starred, onClick }: StarButtonProps) => JSX.Element;
13
+ export {};
@@ -1,4 +1,4 @@
1
- export * from "./Button/Button";
2
- export * from "./IconButton/IconButton";
3
- export * from "./shared/ButtonProps";
4
- export * from "./StarButton/StarButton";
1
+ export * from "./Button/Button";
2
+ export * from "./IconButton/IconButton";
3
+ export * from "./shared/ButtonProps";
4
+ export * from "./StarButton/StarButton";
@@ -1,13 +1,13 @@
1
- export declare const cvaButton: (props?: ({
2
- color?: "primary" | "secondary" | "danger" | "warning" | "tertiary" | null | undefined;
3
- size?: "small" | "medium" | "large" | null | undefined;
4
- rounded?: boolean | null | undefined;
5
- fullWidth?: boolean | null | undefined;
6
- square?: boolean | null | undefined;
7
- disabled?: boolean | null | undefined;
8
- variant?: "transparent" | "filled" | null | undefined;
9
- } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
10
- export declare const cvaButtonSpinner: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
11
- export declare const cvaIconButtonContainer: (props?: ({
12
- size?: "small" | "medium" | "large" | null | undefined;
13
- } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
1
+ export declare const cvaButton: (props?: ({
2
+ color?: "primary" | "secondary" | "danger" | "warning" | "tertiary" | null | undefined;
3
+ size?: "small" | "medium" | "large" | null | undefined;
4
+ rounded?: boolean | null | undefined;
5
+ fullWidth?: boolean | null | undefined;
6
+ square?: boolean | null | undefined;
7
+ disabled?: boolean | null | undefined;
8
+ variant?: "transparent" | "filled" | null | undefined;
9
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
10
+ export declare const cvaButtonSpinner: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
11
+ export declare const cvaIconButtonContainer: (props?: ({
12
+ size?: "small" | "medium" | "large" | null | undefined;
13
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
@@ -1,48 +1,48 @@
1
- /// <reference types="react" />
2
- import { GeneralColors, IntentColors } from "@trackunit/ui-design-tokens";
3
- import { CommonProps, Size } from "../../../common/CommonProps";
4
- export type ButtonVariant = "filled" | "transparent";
5
- export type ButtonColor = Extract<GeneralColors, "primary" | "secondary"> | Extract<IntentColors, "warning" | "danger"> | "tertiary";
6
- export type ButtonType = "button" | "submit";
7
- export interface ButtonCommonProps extends CommonProps {
8
- onClick?: (event: React.MouseEvent<HTMLElement>) => void;
9
- /**
10
- * Whether the button is loading.
11
- */
12
- loading?: boolean;
13
- /**
14
- * Whether the button is disabled.
15
- */
16
- disabled?: boolean;
17
- /**
18
- * Button with square aspect ratio.
19
- */
20
- square?: boolean;
21
- /**
22
- * The button's variant. Values are filled, transparent, plain.
23
- */
24
- color?: ButtonColor;
25
- /**
26
- * The variant of the button.
27
- */
28
- variant?: ButtonVariant;
29
- /**
30
- * The size of the button.
31
- */
32
- size?: Size;
33
- /**
34
- * The link to be used for the button.
35
- */
36
- to?: string;
37
- /**
38
- * The id of the button.
39
- */
40
- id?: string;
41
- /**
42
- * Whether the button is circular or not.
43
- */
44
- circular?: boolean;
45
- title?: string;
46
- tabIndex?: number;
47
- role?: string;
48
- }
1
+ /// <reference types="react" />
2
+ import { GeneralColors, IntentColors } from "@trackunit/ui-design-tokens";
3
+ import { CommonProps, Size } from "../../../common/CommonProps";
4
+ export type ButtonVariant = "filled" | "transparent";
5
+ export type ButtonColor = Extract<GeneralColors, "primary" | "secondary"> | Extract<IntentColors, "warning" | "danger"> | "tertiary";
6
+ export type ButtonType = "button" | "submit";
7
+ export interface ButtonCommonProps extends CommonProps {
8
+ onClick?: (event: React.MouseEvent<HTMLElement>) => void;
9
+ /**
10
+ * Whether the button is loading.
11
+ */
12
+ loading?: boolean;
13
+ /**
14
+ * Whether the button is disabled.
15
+ */
16
+ disabled?: boolean;
17
+ /**
18
+ * Button with square aspect ratio.
19
+ */
20
+ square?: boolean;
21
+ /**
22
+ * The button's variant. Values are filled, transparent, plain.
23
+ */
24
+ color?: ButtonColor;
25
+ /**
26
+ * The variant of the button.
27
+ */
28
+ variant?: ButtonVariant;
29
+ /**
30
+ * The size of the button.
31
+ */
32
+ size?: Size;
33
+ /**
34
+ * The link to be used for the button.
35
+ */
36
+ to?: string;
37
+ /**
38
+ * The id of the button.
39
+ */
40
+ id?: string;
41
+ /**
42
+ * Whether the button is circular or not.
43
+ */
44
+ circular?: boolean;
45
+ title?: string;
46
+ tabIndex?: number;
47
+ role?: string;
48
+ }
@@ -1,30 +1,30 @@
1
- export * from "./Alert";
2
- export * from "./Badge";
3
- export * from "./buttons";
4
- export * from "./Card";
5
- export * from "./Collapse";
6
- export * from "./CopyableText";
7
- export * from "./DayPicker";
8
- export * from "./Drawer/Drawer";
9
- export * from "./ExternalLink/ExternalLink";
10
- export * from "./Heading";
11
- export * from "./Icon/Icon";
12
- export * from "./Indicator";
13
- export * from "./Menu";
14
- export * from "./Modal";
15
- export * from "./PageHeader";
16
- export * from "./Pagination/Pagination";
17
- export * from "./Popover";
18
- export * from "./Popover/Popover";
19
- export * from "./Prompt";
20
- export * from "./SectionHeader";
21
- export * from "./Sidebar/Sidebar";
22
- export * from "./SkeletonLines";
23
- export * from "./Spacer";
24
- export * from "./Spinner";
25
- export * from "./Tag";
26
- export * from "./Text";
27
- export * from "./Timeline/Timeline";
28
- export * from "./Tip";
29
- export * from "./Tooltip";
30
- export * from "./ValueBar";
1
+ export * from "./Alert";
2
+ export * from "./Badge";
3
+ export * from "./buttons";
4
+ export * from "./Card";
5
+ export * from "./Collapse";
6
+ export * from "./CopyableText";
7
+ export * from "./DayPicker";
8
+ export * from "./Drawer/Drawer";
9
+ export * from "./ExternalLink/ExternalLink";
10
+ export * from "./Heading";
11
+ export * from "./Icon/Icon";
12
+ export * from "./Indicator";
13
+ export * from "./Menu";
14
+ export * from "./Modal";
15
+ export * from "./PageHeader";
16
+ export * from "./Pagination/Pagination";
17
+ export * from "./Popover";
18
+ export * from "./Popover/Popover";
19
+ export * from "./Prompt";
20
+ export * from "./SectionHeader";
21
+ export * from "./Sidebar/Sidebar";
22
+ export * from "./SkeletonLines";
23
+ export * from "./Spacer";
24
+ export * from "./Spinner";
25
+ export * from "./Tag";
26
+ export * from "./Text";
27
+ export * from "./Timeline/Timeline";
28
+ export * from "./Tip";
29
+ export * from "./Tooltip";
30
+ export * from "./ValueBar";
@@ -1,9 +1,9 @@
1
- export * from "./useClickOutside";
2
- export * from "./useDebounce";
3
- export * from "./useDevicePixelRatio";
4
- export * from "./useHover";
5
- export * from "./useIsFirstRender";
6
- export * from "./useLocalStorage";
7
- export * from "./useLocalStorageReducer";
8
- export * from "./useResize";
9
- export * from "./useTimeout";
1
+ export * from "./useClickOutside";
2
+ export * from "./useDebounce";
3
+ export * from "./useDevicePixelRatio";
4
+ export * from "./useHover";
5
+ export * from "./useIsFirstRender";
6
+ export * from "./useLocalStorage";
7
+ export * from "./useLocalStorageReducer";
8
+ export * from "./useResize";
9
+ export * from "./useTimeout";
@@ -1,12 +1,12 @@
1
- import { RefObject } from "react";
2
- /**
3
- * Custom hook to handle click outside events.
4
- *
5
- * @param {RefObject<HTMLElement> | Array<RefObject<HTMLElement>>} el - The reference(s) to the element(s) to watch for click outside events.
6
- * @param {Object | Function} [options={}] - Configuration options or the click event handler if options are not provided.
7
- * @param {boolean} [options.active=true] - Whether the click outside event listener should be active.
8
- * @param {Function} [onClick] - The event handler for the click outside event.
9
- */
10
- export declare const useClickOutside: (el: RefObject<HTMLElement> | RefObject<HTMLElement>[], options?: {
11
- active?: boolean | undefined;
12
- } | ((ev: MouseEvent) => void), onClick?: ((ev: MouseEvent) => void) | undefined) => void;
1
+ import { RefObject } from "react";
2
+ /**
3
+ * Custom hook to handle click outside events.
4
+ *
5
+ * @param {RefObject<HTMLElement> | Array<RefObject<HTMLElement>>} el - The reference(s) to the element(s) to watch for click outside events.
6
+ * @param {Object | Function} [options={}] - Configuration options or the click event handler if options are not provided.
7
+ * @param {boolean} [options.active=true] - Whether the click outside event listener should be active.
8
+ * @param {Function} [onClick] - The event handler for the click outside event.
9
+ */
10
+ export declare const useClickOutside: (el: RefObject<HTMLElement> | RefObject<HTMLElement>[], options?: {
11
+ active?: boolean | undefined;
12
+ } | ((ev: MouseEvent) => void), onClick?: ((ev: MouseEvent) => void) | undefined) => void;