@trackunit/react-components 0.1.116 → 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 (128) hide show
  1. package/index.cjs +38907 -2449
  2. package/index.js +38914 -2455
  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 -7
  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
  128. package/src/layout/responsive/TwoColumnLayout.d.ts +0 -12
@@ -1,47 +1,47 @@
1
- import * as React from "react";
2
- import { CommonProps, Density } from "../../common/CommonProps";
3
- import { HeadingVariant } from "../Heading/Heading";
4
- export interface CardHeaderProps extends CommonProps {
5
- /**
6
- * The text to show in the Cards main heading
7
- */
8
- heading?: string;
9
- /**
10
- * The variant/size of the heading.
11
- * Same as the `Heading` component.
12
- *
13
- * @default "primary"
14
- */
15
- headingVariant?: HeadingVariant;
16
- /** Adds an extra heading below the main heading. */
17
- subHeading?: string | React.ReactNode;
18
- /**
19
- * Items to render next to the heading
20
- */
21
- accessories?: React.ReactNode;
22
- /**
23
- * Sets gap, padding and margin.
24
- */
25
- density?: Density;
26
- /**
27
- * Wether or not a seperator line should be rendered
28
- */
29
- hideSeparator?: boolean;
30
- /** Function to call when the close button is clicked */
31
- onClose?: () => void;
32
- /**
33
- * Children to render in the header
34
- */
35
- children?: React.ReactNode | null;
36
- /**
37
- * Extra className for div container
38
- */
39
- extraClassName?: string | undefined;
40
- }
41
- /**
42
- * Header for Cards and Modals.
43
- *
44
- * @param {CardHeaderProps} props - The props for the CardHeader component
45
- * @returns {JSX.Element} CardHeader component
46
- */
47
- export declare const CardHeader: ({ heading, headingVariant, subHeading, onClose, dataTestId, className, children, accessories, density, extraClassName, hideSeparator, }: CardHeaderProps) => JSX.Element;
1
+ import * as React from "react";
2
+ import { CommonProps, Density } from "../../common/CommonProps";
3
+ import { HeadingVariant } from "../Heading/Heading";
4
+ export interface CardHeaderProps extends CommonProps {
5
+ /**
6
+ * The text to show in the Cards main heading
7
+ */
8
+ heading?: string;
9
+ /**
10
+ * The variant/size of the heading.
11
+ * Same as the `Heading` component.
12
+ *
13
+ * @default "primary"
14
+ */
15
+ headingVariant?: HeadingVariant;
16
+ /** Adds an extra heading below the main heading. */
17
+ subHeading?: string | React.ReactNode;
18
+ /**
19
+ * Items to render next to the heading
20
+ */
21
+ accessories?: React.ReactNode;
22
+ /**
23
+ * Sets gap, padding and margin.
24
+ */
25
+ density?: Density;
26
+ /**
27
+ * Wether or not a seperator line should be rendered
28
+ */
29
+ hideSeparator?: boolean;
30
+ /** Function to call when the close button is clicked */
31
+ onClose?: () => void;
32
+ /**
33
+ * Children to render in the header
34
+ */
35
+ children?: React.ReactNode | null;
36
+ /**
37
+ * Extra className for div container
38
+ */
39
+ extraClassName?: string | undefined;
40
+ }
41
+ /**
42
+ * Header for Cards and Modals.
43
+ *
44
+ * @param {CardHeaderProps} props - The props for the CardHeader component
45
+ * @returns {JSX.Element} CardHeader component
46
+ */
47
+ export declare const CardHeader: ({ heading, headingVariant, subHeading, onClose, dataTestId, className, children, accessories, density, extraClassName, hideSeparator, }: CardHeaderProps) => JSX.Element;
@@ -1,30 +1,30 @@
1
- import * as React from "react";
2
- import { CommonProps, Density } from "../../common/CommonProps";
3
- interface ContainerProps extends CommonProps {
4
- /**
5
- * The density of the card components.
6
- * "compact" = 12px gap and padding.
7
- * "comfortable" = 16px gap and padding.
8
- * "spacious" = 16px gap, 26px padding.
9
- */
10
- density?: Density;
11
- /**
12
- * Set gap to be 0px (not preferable)
13
- */
14
- disableGap?: boolean;
15
- /**
16
- * The flex direction of the Card. Defaults to "column".
17
- */
18
- direction?: "row" | "row-reverse" | "column" | "column-reverse";
19
- children?: React.ReactNode;
20
- }
21
- /**
22
- * The DensityContainer component applies gap and padding.
23
- * The padding should live here, and not on the Card itself, as to not inset the scrollbar in case of overflow.
24
- *
25
- * @summary For applying auto padding and gap to a Card or Modal or whatever.
26
- * @param {ContainerProps} props - The props for the DensityContainer component
27
- * @returns {JSX.Element} DensityContainer component
28
- */
29
- export declare const DensityContainer: ({ children, className, dataTestId, density, disableGap, direction, }: ContainerProps) => JSX.Element;
30
- export {};
1
+ import * as React from "react";
2
+ import { CommonProps, Density } from "../../common/CommonProps";
3
+ interface ContainerProps extends CommonProps {
4
+ /**
5
+ * The density of the card components.
6
+ * "compact" = 12px gap and padding.
7
+ * "comfortable" = 16px gap and padding.
8
+ * "spacious" = 16px gap, 26px padding.
9
+ */
10
+ density?: Density;
11
+ /**
12
+ * Set gap to be 0px (not preferable)
13
+ */
14
+ disableGap?: boolean;
15
+ /**
16
+ * The flex direction of the Card. Defaults to "column".
17
+ */
18
+ direction?: "row" | "row-reverse" | "column" | "column-reverse";
19
+ children?: React.ReactNode;
20
+ }
21
+ /**
22
+ * The DensityContainer component applies gap and padding.
23
+ * The padding should live here, and not on the Card itself, as to not inset the scrollbar in case of overflow.
24
+ *
25
+ * @summary For applying auto padding and gap to a Card or Modal or whatever.
26
+ * @param {ContainerProps} props - The props for the DensityContainer component
27
+ * @returns {JSX.Element} DensityContainer component
28
+ */
29
+ export declare const DensityContainer: ({ children, className, dataTestId, density, disableGap, direction, }: ContainerProps) => JSX.Element;
30
+ export {};
@@ -1,5 +1,5 @@
1
- export * from "./Card";
2
- export * from "./CardBody";
3
- export * from "./CardFooter";
4
- export * from "./CardHeader";
5
- export * from "./DensityContainer";
1
+ export * from "./Card";
2
+ export * from "./CardBody";
3
+ export * from "./CardFooter";
4
+ export * from "./CardHeader";
5
+ export * from "./DensityContainer";
@@ -1,3 +1,3 @@
1
- export declare const cvaClickable: (props?: ({
2
- disabled?: boolean | null | undefined;
3
- } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
1
+ export declare const cvaClickable: (props?: ({
2
+ disabled?: boolean | null | undefined;
3
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
@@ -1,28 +1,28 @@
1
- import * as React from "react";
2
- import { CommonProps } from "../../common/CommonProps";
3
- export interface CollapseProps extends CommonProps {
4
- id: string;
5
- /**
6
- * Expands the collapse component during initialization.
7
- */
8
- initialExpanded?: boolean;
9
- /**
10
- * onToggle event.
11
- */
12
- onToggle?: (event: React.MouseEvent<HTMLDivElement>, expanded: boolean) => void;
13
- /**
14
- * Child nodes.
15
- */
16
- children: React.ReactNode;
17
- /**
18
- * Label to be displayed.
19
- */
20
- label: React.ReactNode;
21
- }
22
- /**
23
- * The Collapse component is used to condense non-important information.
24
- *
25
- * @param {CollapseProps} props - The props for the Collapse component
26
- * @returns {JSX.Element} Collapse component
27
- */
28
- export declare const Collapse: ({ id, initialExpanded, onToggle, label, children, className, dataTestId, }: CollapseProps) => JSX.Element;
1
+ import * as React from "react";
2
+ import { CommonProps } from "../../common/CommonProps";
3
+ export interface CollapseProps extends CommonProps {
4
+ id: string;
5
+ /**
6
+ * Expands the collapse component during initialization.
7
+ */
8
+ initialExpanded?: boolean;
9
+ /**
10
+ * onToggle event.
11
+ */
12
+ onToggle?: (event: React.MouseEvent<HTMLDivElement>, expanded: boolean) => void;
13
+ /**
14
+ * Child nodes.
15
+ */
16
+ children: React.ReactNode;
17
+ /**
18
+ * Label to be displayed.
19
+ */
20
+ label: React.ReactNode;
21
+ }
22
+ /**
23
+ * The Collapse component is used to condense non-important information.
24
+ *
25
+ * @param {CollapseProps} props - The props for the Collapse component
26
+ * @returns {JSX.Element} Collapse component
27
+ */
28
+ export declare const Collapse: ({ id, initialExpanded, onToggle, label, children, className, dataTestId, }: CollapseProps) => JSX.Element;
@@ -1,8 +1,8 @@
1
- export declare const cvaCollapse: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
2
- export declare const cvaCollapseLabel: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
3
- export declare const cvaCollapseLabelContainer: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
4
- export declare const cvaCollapsible: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
5
- export declare const cvaCollapseAnimated: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
6
- export declare const cvaCollapseIcon: (props?: ({
7
- expanded?: boolean | null | undefined;
8
- } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
1
+ export declare const cvaCollapse: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
2
+ export declare const cvaCollapseLabel: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
3
+ export declare const cvaCollapseLabelContainer: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
4
+ export declare const cvaCollapsible: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
5
+ export declare const cvaCollapseAnimated: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
6
+ export declare const cvaCollapseIcon: (props?: ({
7
+ expanded?: boolean | null | undefined;
8
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
@@ -1 +1 @@
1
- export * from "./Collapse";
1
+ export * from "./Collapse";
@@ -1,21 +1,21 @@
1
- /// <reference types="react" />
2
- import { CommonProps } from "../../common";
3
- export interface CopyableTextProps extends CommonProps {
4
- /**
5
- * The text shown in the ui.
6
- * By default this is also the text that gets copied when component is clicked.
7
- */
8
- text?: string;
9
- /**
10
- * Alternative text to get copied to on click.
11
- * This text is not visible in the ui.
12
- */
13
- alternativeText?: string;
14
- }
15
- /**
16
- * The CopyableText component is used where the user should have easy access to copy information.
17
- *
18
- * @param {CopyableTextProps} props - The props for the CopyableText component
19
- * @returns {JSX.Element} CopyableText component
20
- */
21
- export declare const CopyableText: ({ text, alternativeText, dataTestId, className }: CopyableTextProps) => JSX.Element;
1
+ /// <reference types="react" />
2
+ import { CommonProps } from "../../common";
3
+ export interface CopyableTextProps extends CommonProps {
4
+ /**
5
+ * The text shown in the ui.
6
+ * By default this is also the text that gets copied when component is clicked.
7
+ */
8
+ text?: string;
9
+ /**
10
+ * Alternative text to get copied to on click.
11
+ * This text is not visible in the ui.
12
+ */
13
+ alternativeText?: string;
14
+ }
15
+ /**
16
+ * The CopyableText component is used where the user should have easy access to copy information.
17
+ *
18
+ * @param {CopyableTextProps} props - The props for the CopyableText component
19
+ * @returns {JSX.Element} CopyableText component
20
+ */
21
+ export declare const CopyableText: ({ text, alternativeText, dataTestId, className }: CopyableTextProps) => JSX.Element;
@@ -1,3 +1,3 @@
1
- export declare const cvaCopyableText: (props?: ({
2
- animating?: boolean | null | undefined;
3
- } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
1
+ export declare const cvaCopyableText: (props?: ({
2
+ animating?: boolean | null | undefined;
3
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
@@ -1 +1 @@
1
- export * from "./CopyableText";
1
+ export * from "./CopyableText";
@@ -1,32 +1,32 @@
1
- /// <reference types="react" />
2
- import { Matcher } from "react-day-picker";
3
- import { CommonProps } from "../../common/CommonProps";
4
- export interface DayPickerProps extends CommonProps {
5
- /**
6
- * A callback function for when a date is selected
7
- */
8
- onDaySelect?: (day: Date) => void;
9
- /**
10
- * Define any days which may not be selected
11
- */
12
- disabledDays?: Matcher | Matcher[];
13
- /**
14
- * Set any days which are selected
15
- */
16
- selectedDays?: Matcher | Matcher[];
17
- /**
18
- * Set the language
19
- */
20
- language: string;
21
- /**
22
- * The maximum amount of days that can be selected
23
- */
24
- max?: number;
25
- }
26
- /**
27
- * The DayPicker component is used when the user needs to select a date.
28
- *
29
- * @param {DayPickerProps} props - The props for the DayPicker component
30
- * @returns {JSX.Element} DayPicker component
31
- */
32
- export declare const DayPicker: ({ onDaySelect, disabledDays, selectedDays, language, className, dataTestId, max, }: DayPickerProps) => JSX.Element;
1
+ /// <reference types="react" />
2
+ import { Matcher } from "react-day-picker";
3
+ import { CommonProps } from "../../common/CommonProps";
4
+ export interface DayPickerProps extends CommonProps {
5
+ /**
6
+ * A callback function for when a date is selected
7
+ */
8
+ onDaySelect?: (day: Date) => void;
9
+ /**
10
+ * Define any days which may not be selected
11
+ */
12
+ disabledDays?: Matcher | Matcher[];
13
+ /**
14
+ * Set any days which are selected
15
+ */
16
+ selectedDays?: Matcher | Matcher[];
17
+ /**
18
+ * Set the language
19
+ */
20
+ language: string;
21
+ /**
22
+ * The maximum amount of days that can be selected
23
+ */
24
+ max?: number;
25
+ }
26
+ /**
27
+ * The DayPicker component is used when the user needs to select a date.
28
+ *
29
+ * @param {DayPickerProps} props - The props for the DayPicker component
30
+ * @returns {JSX.Element} DayPicker component
31
+ */
32
+ export declare const DayPicker: ({ onDaySelect, disabledDays, selectedDays, language, className, dataTestId, max, }: DayPickerProps) => JSX.Element;
@@ -1,22 +1,22 @@
1
- /// <reference types="react" />
2
- import { Matcher } from "react-day-picker";
3
- import { CommonProps, Size } from "../../common/CommonProps";
4
- import { ButtonColor } from "../buttons";
5
- import { PopoverPlacement } from "../Popover";
6
- export interface DayPickerPopoverProps extends CommonProps {
7
- disabledDays?: Matcher | Matcher[] | undefined;
8
- onDaySelect: (day: Date) => void;
9
- selectedDay?: Date;
10
- color?: ButtonColor;
11
- size?: Size;
12
- placement?: PopoverPlacement;
13
- buttonContent: JSX.Element;
14
- language: string;
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
- */
22
- export declare const DayPickerPopover: ({ disabledDays, className, dataTestId, selectedDay, onDaySelect, color, placement, size, buttonContent, language, }: DayPickerPopoverProps) => JSX.Element;
1
+ /// <reference types="react" />
2
+ import { Matcher } from "react-day-picker";
3
+ import { CommonProps, Size } from "../../common/CommonProps";
4
+ import { ButtonColor } from "../buttons";
5
+ import { PopoverPlacement } from "../Popover";
6
+ export interface DayPickerPopoverProps extends CommonProps {
7
+ disabledDays?: Matcher | Matcher[] | undefined;
8
+ onDaySelect: (day: Date) => void;
9
+ selectedDay?: Date;
10
+ color?: ButtonColor;
11
+ size?: Size;
12
+ placement?: PopoverPlacement;
13
+ buttonContent: JSX.Element;
14
+ language: string;
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
+ */
22
+ export declare const DayPickerPopover: ({ disabledDays, className, dataTestId, selectedDay, onDaySelect, color, placement, size, buttonContent, language, }: DayPickerPopoverProps) => JSX.Element;
@@ -1,33 +1,33 @@
1
- /// <reference types="react" />
2
- import { DateRange, Matcher } from "react-day-picker";
3
- import { CommonProps } from "../../common/CommonProps";
4
- export type IDateRange = DateRange;
5
- export interface DayRangePickerProps extends CommonProps {
6
- /**
7
- * A callback function for when a range is selected
8
- */
9
- onRangeSelect?: (range: IDateRange | undefined) => void;
10
- /**
11
- * Define any days which may not be selected
12
- */
13
- disabledDays?: Matcher | Matcher[];
14
- /**
15
- * Set any days which are selected
16
- */
17
- selectedDays: IDateRange;
18
- /**
19
- * Set the language
20
- */
21
- language: string;
22
- /**
23
- * The maximum amount of days that can be selected
24
- */
25
- max?: number;
26
- }
27
- /**
28
- * The DayRangePicker component should be used when the user needs to select a range of dates.
29
- *
30
- * @param {DayRangePickerProps} props - The props for the DayRangePicker component
31
- * @returns {JSX.Element} DayRangePicker component
32
- */
33
- export declare const DayRangePicker: ({ onRangeSelect, selectedDays, disabledDays, dataTestId, language, className, max, }: DayRangePickerProps) => JSX.Element;
1
+ /// <reference types="react" />
2
+ import { DateRange, Matcher } from "react-day-picker";
3
+ import { CommonProps } from "../../common/CommonProps";
4
+ export type IDateRange = DateRange;
5
+ export interface DayRangePickerProps extends CommonProps {
6
+ /**
7
+ * A callback function for when a range is selected
8
+ */
9
+ onRangeSelect?: (range: IDateRange | undefined) => void;
10
+ /**
11
+ * Define any days which may not be selected
12
+ */
13
+ disabledDays?: Matcher | Matcher[];
14
+ /**
15
+ * Set any days which are selected
16
+ */
17
+ selectedDays: IDateRange;
18
+ /**
19
+ * Set the language
20
+ */
21
+ language: string;
22
+ /**
23
+ * The maximum amount of days that can be selected
24
+ */
25
+ max?: number;
26
+ }
27
+ /**
28
+ * The DayRangePicker component should be used when the user needs to select a range of dates.
29
+ *
30
+ * @param {DayRangePickerProps} props - The props for the DayRangePicker component
31
+ * @returns {JSX.Element} DayRangePicker component
32
+ */
33
+ export declare const DayRangePicker: ({ onRangeSelect, selectedDays, disabledDays, dataTestId, language, className, max, }: DayRangePickerProps) => JSX.Element;
@@ -1,21 +1,21 @@
1
- export interface TimeZone {
2
- /**
3
- * The unique id of the timezone
4
- *
5
- * @example "America/Denver"
6
- */
7
- id: string;
8
- /**
9
- * The human-readable name of the timezone. Combines id and offset.
10
- *
11
- * @example "America/Denver (-06:00 MDT)"
12
- */
13
- name: string;
14
- /**
15
- * @example "-06:00 MDT"
16
- */
17
- offset: string;
18
- }
19
- export * from "./DayPicker";
20
- export * from "./DayPickerPopover";
21
- export * from "./DayRangePicker";
1
+ export interface TimeZone {
2
+ /**
3
+ * The unique id of the timezone
4
+ *
5
+ * @example "America/Denver"
6
+ */
7
+ id: string;
8
+ /**
9
+ * The human-readable name of the timezone. Combines id and offset.
10
+ *
11
+ * @example "America/Denver (-06:00 MDT)"
12
+ */
13
+ name: string;
14
+ /**
15
+ * @example "-06:00 MDT"
16
+ */
17
+ offset: string;
18
+ }
19
+ export * from "./DayPicker";
20
+ export * from "./DayPickerPopover";
21
+ export * from "./DayRangePicker";
@@ -1,8 +1,8 @@
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
- */
8
- export declare const useLocale: (language: string) => Locale;
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
+ */
8
+ export declare const useLocale: (language: string) => Locale;
@@ -1,32 +1,32 @@
1
- import * as React from "react";
2
- import { CommonProps } from "../../common";
3
- export type Position = "left" | "right" | "top" | "bottom";
4
- export interface DrawerProps extends CommonProps {
5
- /**
6
- * Specifies whether the drawer is open or not.
7
- */
8
- open: boolean;
9
- /**
10
- * The onClose handler for the drawer.
11
- */
12
- onClose?: () => void;
13
- /**
14
- * The position of the drawer.
15
- */
16
- position?: Position;
17
- /**
18
- * The child node that will be rendered inside the drawer.
19
- */
20
- children?: React.ReactNode;
21
- /**
22
- * Whether the drawer needs an overlay or not. Without the overlay, user will have to handle mechanism for closing the drawer.
23
- */
24
- disableOverlay?: boolean;
25
- }
26
- /**
27
- * The drawer provides a slideover which can be used to provide access to different locations in the application.
28
- *
29
- * @param {DrawerProps} props - The props for the Drawer component
30
- * @returns {JSX.Element} Drawer component
31
- */
32
- export declare const Drawer: ({ open, onClose, children, disableOverlay, position, className, dataTestId, }: DrawerProps) => JSX.Element;
1
+ import * as React from "react";
2
+ import { CommonProps } from "../../common";
3
+ export type Position = "left" | "right" | "top" | "bottom";
4
+ export interface DrawerProps extends CommonProps {
5
+ /**
6
+ * Specifies whether the drawer is open or not.
7
+ */
8
+ open: boolean;
9
+ /**
10
+ * The onClose handler for the drawer.
11
+ */
12
+ onClose?: () => void;
13
+ /**
14
+ * The position of the drawer.
15
+ */
16
+ position?: Position;
17
+ /**
18
+ * The child node that will be rendered inside the drawer.
19
+ */
20
+ children?: React.ReactNode;
21
+ /**
22
+ * Whether the drawer needs an overlay or not. Without the overlay, user will have to handle mechanism for closing the drawer.
23
+ */
24
+ disableOverlay?: boolean;
25
+ }
26
+ /**
27
+ * The drawer provides a slideover which can be used to provide access to different locations in the application.
28
+ *
29
+ * @param {DrawerProps} props - The props for the Drawer component
30
+ * @returns {JSX.Element} Drawer component
31
+ */
32
+ export declare const Drawer: ({ open, onClose, children, disableOverlay, position, className, dataTestId, }: DrawerProps) => JSX.Element;
@@ -1,4 +1,4 @@
1
- export declare const cvaDrawerOverlay: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
2
- export declare const cvaDrawerCard: (props?: ({
3
- position?: "left" | "right" | "bottom" | "top" | null | undefined;
4
- } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
1
+ export declare const cvaDrawerOverlay: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
2
+ export declare const cvaDrawerCard: (props?: ({
3
+ position?: "left" | "right" | "bottom" | "top" | null | undefined;
4
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;