@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,30 +1,30 @@
1
- import * as React from "react";
2
- import { CommonProps } from "../../common/CommonProps";
3
- export interface ModalProps extends CommonProps {
4
- /**
5
- * Whether modal is open or not.
6
- */
7
- isOpen?: boolean;
8
- /**
9
- * Whether modal should be closed when clicked outside of it.
10
- */
11
- onDismissClick?: () => void;
12
- /**
13
- * Child elements to be rendered inside the modal.
14
- */
15
- children: React.ReactNode;
16
- /**
17
- * Test id to be applied to the modal.
18
- */
19
- dataTestId?: string;
20
- /**
21
- * Aria role to be applied to element
22
- */
23
- role?: string;
24
- }
25
- /**
26
- * - Modals are used to present critical information or request user input needed to complete a user's workflow.
27
- * - Modals interrupt a user's workflow by design.
28
- * - The modal component provides a foundation for creating dialogs, lightboxes, etc.
29
- */
30
- export declare const Modal: React.ForwardRefExoticComponent<ModalProps & React.RefAttributes<HTMLDivElement>>;
1
+ import * as React from "react";
2
+ import { CommonProps } from "../../common/CommonProps";
3
+ export interface ModalProps extends CommonProps {
4
+ /**
5
+ * Whether modal is open or not.
6
+ */
7
+ isOpen?: boolean;
8
+ /**
9
+ * Whether modal should be closed when clicked outside of it.
10
+ */
11
+ onDismissClick?: () => void;
12
+ /**
13
+ * Child elements to be rendered inside the modal.
14
+ */
15
+ children: React.ReactNode;
16
+ /**
17
+ * Test id to be applied to the modal.
18
+ */
19
+ dataTestId?: string;
20
+ /**
21
+ * Aria role to be applied to element
22
+ */
23
+ role?: string;
24
+ }
25
+ /**
26
+ * - Modals are used to present critical information or request user input needed to complete a user's workflow.
27
+ * - Modals interrupt a user's workflow by design.
28
+ * - The modal component provides a foundation for creating dialogs, lightboxes, etc.
29
+ */
30
+ export declare const Modal: React.ForwardRefExoticComponent<ModalProps & React.RefAttributes<HTMLDivElement>>;
@@ -1,13 +1,13 @@
1
- import * as React from "react";
2
- export interface ModalBackdropProps {
3
- onClick: () => void;
4
- children: React.ReactNode;
5
- isVisible?: boolean;
6
- }
7
- /**
8
- * The Backdrop for the modal.
9
- *
10
- * @param {ModalBackdropProps} props - The props for the ModalBackdrop component
11
- * @returns {JSX.Element} ModalBackdrop component
12
- */
13
- export declare const ModalBackdrop: ({ children, isVisible, onClick }: ModalBackdropProps) => JSX.Element;
1
+ import * as React from "react";
2
+ export interface ModalBackdropProps {
3
+ onClick: () => void;
4
+ children: React.ReactNode;
5
+ isVisible?: boolean;
6
+ }
7
+ /**
8
+ * The Backdrop for the modal.
9
+ *
10
+ * @param {ModalBackdropProps} props - The props for the ModalBackdrop component
11
+ * @returns {JSX.Element} ModalBackdrop component
12
+ */
13
+ export declare const ModalBackdrop: ({ children, isVisible, onClick }: ModalBackdropProps) => JSX.Element;
@@ -1,3 +1,3 @@
1
- export * from "./Modal";
2
- export * from "./ModalBackdrop";
3
- export * from "./useModal";
1
+ export * from "./Modal";
2
+ export * from "./ModalBackdrop";
3
+ export * from "./useModal";
@@ -1,21 +1,21 @@
1
- /// <reference types="react" />
2
- import { ModalProps } from "./Modal";
3
- export interface UseModalProps {
4
- closeOnOutsideClick?: boolean;
5
- }
6
- /**
7
- * The useModal component should be used to inform the user of important information.
8
- *
9
- * @param {UseModalProps} props - The props for the useModal hook
10
- * @returns {*} useModal return
11
- */
12
- export declare const useModal: ({ closeOnOutsideClick }?: UseModalProps) => {
13
- Modal: {
14
- (props: ModalProps): JSX.Element;
15
- displayName: string;
16
- };
17
- toggleModal: any;
18
- openModal: any;
19
- closeModal: any;
20
- isOpen: any;
21
- };
1
+ /// <reference types="react" />
2
+ import { ModalProps } from "./Modal";
3
+ export interface UseModalProps {
4
+ closeOnOutsideClick?: boolean;
5
+ }
6
+ /**
7
+ * The useModal component should be used to inform the user of important information.
8
+ *
9
+ * @param {UseModalProps} props - The props for the useModal hook
10
+ * @returns {*} useModal return
11
+ */
12
+ export declare const useModal: ({ closeOnOutsideClick }?: UseModalProps) => {
13
+ Modal: {
14
+ (props: ModalProps): JSX.Element;
15
+ displayName: string;
16
+ };
17
+ toggleModal: any;
18
+ openModal: any;
19
+ closeModal: any;
20
+ isOpen: any;
21
+ };
@@ -1,47 +1,47 @@
1
- import React from "react";
2
- import { CommonProps } from "../../common/CommonProps";
3
- export interface PageHeaderProps extends CommonProps {
4
- /**
5
- * Text to be displayed in the header.
6
- */
7
- title: string | React.ReactNode;
8
- /**
9
- * The description to be displayed inside the tip.
10
- */
11
- description?: string | React.ReactNode;
12
- /**
13
- * The link to which user is redirected to if user clicks on the tip.
14
- */
15
- link?: string;
16
- /**
17
- * Additional actions to be rendered along with the header.
18
- */
19
- action?: React.ReactNode;
20
- /**
21
- * A tag that is displayed on the side of the header.
22
- * A RectNode passed into the tag will be rendered as such.
23
- * A string passed into the tag will render it using the tag component.
24
- */
25
- tag?: string;
26
- /**
27
- * Whether spinner should be shown while loading the data.
28
- */
29
- showLoading?: boolean;
30
- /**
31
- * Child nodes to be displayed inside the page header.
32
- */
33
- children?: React.ReactNode;
34
- /**
35
- * The link to the previous page which will be rendered inside an IconButton component to the left of the heading.
36
- */
37
- backTo?: string;
38
- }
39
- /**
40
- * Pageheader component is used to display a page header.
41
- *
42
- * PageHeader can be used to highlight the page topic, display important information about the page, and carry the action items related to the current page.
43
- *
44
- * @param {PageHeaderProps} props - The props for the PageHeader component
45
- * @returns {JSX.Element} PageHeader component
46
- */
47
- export declare const PageHeader: ({ className, dataTestId, action, showLoading, description, link, title, tag, backTo, children, }: PageHeaderProps) => JSX.Element;
1
+ import React from "react";
2
+ import { CommonProps } from "../../common/CommonProps";
3
+ export interface PageHeaderProps extends CommonProps {
4
+ /**
5
+ * Text to be displayed in the header.
6
+ */
7
+ title: string | React.ReactNode;
8
+ /**
9
+ * The description to be displayed inside the tip.
10
+ */
11
+ description?: string | React.ReactNode;
12
+ /**
13
+ * The link to which user is redirected to if user clicks on the tip.
14
+ */
15
+ link?: string;
16
+ /**
17
+ * Additional actions to be rendered along with the header.
18
+ */
19
+ action?: React.ReactNode;
20
+ /**
21
+ * A tag that is displayed on the side of the header.
22
+ * A RectNode passed into the tag will be rendered as such.
23
+ * A string passed into the tag will render it using the tag component.
24
+ */
25
+ tag?: string;
26
+ /**
27
+ * Whether spinner should be shown while loading the data.
28
+ */
29
+ showLoading?: boolean;
30
+ /**
31
+ * Child nodes to be displayed inside the page header.
32
+ */
33
+ children?: React.ReactNode;
34
+ /**
35
+ * The link to the previous page which will be rendered inside an IconButton component to the left of the heading.
36
+ */
37
+ backTo?: string;
38
+ }
39
+ /**
40
+ * Pageheader component is used to display a page header.
41
+ *
42
+ * PageHeader can be used to highlight the page topic, display important information about the page, and carry the action items related to the current page.
43
+ *
44
+ * @param {PageHeaderProps} props - The props for the PageHeader component
45
+ * @returns {JSX.Element} PageHeader component
46
+ */
47
+ export declare const PageHeader: ({ className, dataTestId, action, showLoading, description, link, title, tag, backTo, children, }: PageHeaderProps) => JSX.Element;
@@ -1,5 +1,5 @@
1
- export declare const cvaPageHeader: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
2
- export declare const cvaPageHeaderHeading: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
3
- export declare const cvaPageHeaderHeadingContainer: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
4
- export declare const cvaPageHeaderHeadingAccessoriesContainer: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
5
- export declare const cvaPageHeaderChildContainer: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
1
+ export declare const cvaPageHeader: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
2
+ export declare const cvaPageHeaderHeading: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
3
+ export declare const cvaPageHeaderHeadingContainer: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
4
+ export declare const cvaPageHeaderHeadingAccessoriesContainer: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
5
+ export declare const cvaPageHeaderChildContainer: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
@@ -1 +1 @@
1
- export * from "./PageHeader";
1
+ export * from "./PageHeader";
@@ -1,62 +1,62 @@
1
- /// <reference types="react" />
2
- export interface IPaginationProps {
3
- /**
4
- * A go to previous page handler
5
- */
6
- previousPage: () => void;
7
- /**
8
- * A a go to next page handler
9
- */
10
- nextPage: () => void;
11
- /**
12
- * A current page index
13
- */
14
- pageIndex?: number;
15
- /**
16
- * Amount of pages
17
- */
18
- pageCount?: number | null;
19
- /**
20
- * A flag to enable previous page button
21
- */
22
- canPreviousPage?: boolean;
23
- /**
24
- * A flag to enable next page button
25
- */
26
- canNextPage?: boolean;
27
- /**
28
- * A flag indicating loading state
29
- */
30
- loading?: boolean;
31
- /**
32
- * A custom class to override styles
33
- */
34
- className?: string;
35
- /**
36
- * A data test id
37
- */
38
- dataTestId?: string;
39
- /**
40
- * An helper to get translation for count.
41
- */
42
- getTranslatedCount?: (count: number) => string;
43
- /**
44
- * Callback that fires on page change with details about the action
45
- */
46
- onPageChange?: (change: {
47
- from?: number;
48
- to?: number;
49
- description?: string;
50
- }) => void;
51
- /**
52
- * An flag to disable jumping to particular page by text input, could be used for cursor based pagination
53
- */
54
- cursorBase?: boolean;
55
- }
56
- /**
57
- * Pagination Description. It could be used when you need navigation for your paging feature.
58
- *
59
- * @param {IPaginationProps} props - The props for the Pagination component
60
- * @returns {JSX.Element} Pagination component
61
- */
62
- export declare const Pagination: ({ previousPage, nextPage, canPreviousPage, canNextPage, pageCount, pageIndex, loading, className, dataTestId, getTranslatedCount, onPageChange, cursorBase, }: IPaginationProps) => JSX.Element;
1
+ /// <reference types="react" />
2
+ export interface IPaginationProps {
3
+ /**
4
+ * A go to previous page handler
5
+ */
6
+ previousPage: () => void;
7
+ /**
8
+ * A a go to next page handler
9
+ */
10
+ nextPage: () => void;
11
+ /**
12
+ * A current page index
13
+ */
14
+ pageIndex?: number;
15
+ /**
16
+ * Amount of pages
17
+ */
18
+ pageCount?: number | null;
19
+ /**
20
+ * A flag to enable previous page button
21
+ */
22
+ canPreviousPage?: boolean;
23
+ /**
24
+ * A flag to enable next page button
25
+ */
26
+ canNextPage?: boolean;
27
+ /**
28
+ * A flag indicating loading state
29
+ */
30
+ loading?: boolean;
31
+ /**
32
+ * A custom class to override styles
33
+ */
34
+ className?: string;
35
+ /**
36
+ * A data test id
37
+ */
38
+ dataTestId?: string;
39
+ /**
40
+ * An helper to get translation for count.
41
+ */
42
+ getTranslatedCount?: (count: number) => string;
43
+ /**
44
+ * Callback that fires on page change with details about the action
45
+ */
46
+ onPageChange?: (change: {
47
+ from?: number;
48
+ to?: number;
49
+ description?: string;
50
+ }) => void;
51
+ /**
52
+ * An flag to disable jumping to particular page by text input, could be used for cursor based pagination
53
+ */
54
+ cursorBase?: boolean;
55
+ }
56
+ /**
57
+ * Pagination Description. It could be used when you need navigation for your paging feature.
58
+ *
59
+ * @param {IPaginationProps} props - The props for the Pagination component
60
+ * @returns {JSX.Element} Pagination component
61
+ */
62
+ export declare const Pagination: ({ previousPage, nextPage, canPreviousPage, canNextPage, pageCount, pageIndex, loading, className, dataTestId, getTranslatedCount, onPageChange, cursorBase, }: IPaginationProps) => JSX.Element;
@@ -1,2 +1,2 @@
1
- export declare const cvaPagination: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
2
- export declare const cvaPaginationText: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
1
+ export declare const cvaPagination: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
2
+ export declare const cvaPaginationText: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
@@ -1,72 +1,72 @@
1
- /// <reference types="react" />
2
- import { PopoverProps } from "./PopoverTypes";
3
- /**
4
- * A hook to get the popover context.
5
- * It should only be used by the Popover components.
6
- *
7
- * @returns {ContextType} The popover context
8
- */
9
- export declare const usePopoverContext: () => {
10
- isModal: boolean | undefined;
11
- labelId: string | undefined;
12
- descriptionId: string | undefined;
13
- setLabelId: import("react").Dispatch<import("react").SetStateAction<string | undefined>>;
14
- setDescriptionId: import("react").Dispatch<import("react").SetStateAction<string | undefined>>;
15
- customProps: {
16
- className?: string | undefined;
17
- dataTestId?: string | undefined;
18
- };
19
- placement: import("@floating-ui/core").Placement;
20
- strategy: import("@floating-ui/core").Strategy;
21
- middlewareData: import("@floating-ui/core").MiddlewareData;
22
- x: number | null;
23
- y: number | null;
24
- update: () => void;
25
- reference: (node: import("@floating-ui/react").ReferenceType | null) => void;
26
- floating: (node: HTMLElement | null) => void;
27
- positionReference: (node: import("@floating-ui/react").ReferenceType | null) => void;
28
- context: {
29
- placement: import("@floating-ui/core").Placement;
30
- strategy: import("@floating-ui/core").Strategy;
31
- x: number | null;
32
- y: number | null;
33
- middlewareData: import("@floating-ui/core").MiddlewareData;
34
- update: () => void;
35
- reference: (node: import("@floating-ui/react").ReferenceType | null) => void;
36
- floating: (node: HTMLElement | null) => void;
37
- isPositioned: boolean;
38
- open: boolean;
39
- onOpenChange: (open: boolean) => void;
40
- events: import("@floating-ui/react").FloatingEvents;
41
- dataRef: import("react").MutableRefObject<import("@floating-ui/react").ContextData>;
42
- nodeId: string | undefined;
43
- floatingId: string;
44
- refs: import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
45
- elements: import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
46
- };
47
- refs: import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
48
- elements: import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
49
- isPositioned: boolean;
50
- getReferenceProps: (userProps?: import("react").HTMLProps<Element> | undefined) => Record<string, unknown>;
51
- getFloatingProps: (userProps?: import("react").HTMLProps<HTMLElement> | undefined) => Record<string, unknown>;
52
- getItemProps: (userProps?: import("react").HTMLProps<HTMLElement> | undefined) => Record<string, unknown>;
53
- isOpen: boolean;
54
- setIsOpen: (open: boolean) => void;
55
- };
56
- /**
57
- * The popover component.
58
- * - This component should wrap all the popover components.
59
- * - It returns a context that is used by the popover components.
60
- * - The context is used to share the state of the popover, such as the open state and the reference element.
61
- *
62
- * To open the popover, use the `<PopoverTrigger />` component.
63
- *
64
- * To render the content of the popover, use the `<PopoverContent />` component.
65
- *
66
- *
67
- * @param {PopoverProps} props The props for the popover
68
- * @returns {JSX.Element} A Popover Context Provider containing the children
69
- */
70
- export declare const Popover: ({ children, isModal, ...restOptions }: {
71
- children: React.ReactNode;
72
- } & PopoverProps) => JSX.Element;
1
+ /// <reference types="react" />
2
+ import { PopoverProps } from "./PopoverTypes";
3
+ /**
4
+ * A hook to get the popover context.
5
+ * It should only be used by the Popover components.
6
+ *
7
+ * @returns {ContextType} The popover context
8
+ */
9
+ export declare const usePopoverContext: () => {
10
+ isModal: boolean | undefined;
11
+ labelId: string | undefined;
12
+ descriptionId: string | undefined;
13
+ setLabelId: import("react").Dispatch<import("react").SetStateAction<string | undefined>>;
14
+ setDescriptionId: import("react").Dispatch<import("react").SetStateAction<string | undefined>>;
15
+ customProps: {
16
+ className?: string | undefined;
17
+ dataTestId?: string | undefined;
18
+ };
19
+ placement: import("@floating-ui/core").Placement;
20
+ strategy: import("@floating-ui/core").Strategy;
21
+ middlewareData: import("@floating-ui/core").MiddlewareData;
22
+ x: number | null;
23
+ y: number | null;
24
+ update: () => void;
25
+ reference: (node: import("@floating-ui/react").ReferenceType | null) => void;
26
+ floating: (node: HTMLElement | null) => void;
27
+ positionReference: (node: import("@floating-ui/react").ReferenceType | null) => void;
28
+ context: {
29
+ placement: import("@floating-ui/core").Placement;
30
+ strategy: import("@floating-ui/core").Strategy;
31
+ x: number | null;
32
+ y: number | null;
33
+ middlewareData: import("@floating-ui/core").MiddlewareData;
34
+ update: () => void;
35
+ reference: (node: import("@floating-ui/react").ReferenceType | null) => void;
36
+ floating: (node: HTMLElement | null) => void;
37
+ isPositioned: boolean;
38
+ open: boolean;
39
+ onOpenChange: (open: boolean) => void;
40
+ events: import("@floating-ui/react").FloatingEvents;
41
+ dataRef: import("react").MutableRefObject<import("@floating-ui/react").ContextData>;
42
+ nodeId: string | undefined;
43
+ floatingId: string;
44
+ refs: import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
45
+ elements: import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
46
+ };
47
+ refs: import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
48
+ elements: import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
49
+ isPositioned: boolean;
50
+ getReferenceProps: (userProps?: import("react").HTMLProps<Element> | undefined) => Record<string, unknown>;
51
+ getFloatingProps: (userProps?: import("react").HTMLProps<HTMLElement> | undefined) => Record<string, unknown>;
52
+ getItemProps: (userProps?: import("react").HTMLProps<HTMLElement> | undefined) => Record<string, unknown>;
53
+ isOpen: boolean;
54
+ setIsOpen: (open: boolean) => void;
55
+ };
56
+ /**
57
+ * The popover component.
58
+ * - This component should wrap all the popover components.
59
+ * - It returns a context that is used by the popover components.
60
+ * - The context is used to share the state of the popover, such as the open state and the reference element.
61
+ *
62
+ * To open the popover, use the `<PopoverTrigger />` component.
63
+ *
64
+ * To render the content of the popover, use the `<PopoverContent />` component.
65
+ *
66
+ *
67
+ * @param {PopoverProps} props The props for the popover
68
+ * @returns {JSX.Element} A Popover Context Provider containing the children
69
+ */
70
+ export declare const Popover: ({ children, isModal, ...restOptions }: {
71
+ children: React.ReactNode;
72
+ } & PopoverProps) => JSX.Element;
@@ -1,5 +1,5 @@
1
- export declare const cvaPopoverContainer: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
2
- export declare const cvaPopoverTitleContainer: (props?: ({
3
- divider?: boolean | null | undefined;
4
- } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
5
- export declare const cvaPopoverTitleText: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
1
+ export declare const cvaPopoverContainer: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
2
+ export declare const cvaPopoverTitleContainer: (props?: ({
3
+ divider?: boolean | null | undefined;
4
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
5
+ export declare const cvaPopoverTitleText: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
@@ -1,7 +1,7 @@
1
- import React from "react";
2
- import { CommonProps } from "../../common";
3
- export type PopoverContentChildren = ((close: () => void) => React.ReactNode) | React.ReactNode;
4
- export interface PopoverContentProps extends Omit<React.HTMLProps<HTMLDivElement>, "children">, CommonProps {
5
- children: PopoverContentChildren;
6
- }
7
- export declare const PopoverContent: React.ForwardRefExoticComponent<Pick<PopoverContentProps, "children" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "cite" | "classID" | "cols" | "colSpan" | "content" | "controls" | "coords" | "crossOrigin" | "data" | "dateTime" | "default" | "defer" | "disabled" | "download" | "encType" | "form" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "label" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "name" | "noValidate" | "open" | "optimum" | "pattern" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "size" | "sizes" | "span" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "summary" | "target" | "type" | "useMap" | "value" | "width" | "wmode" | "wrap" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "dataTestId"> & React.RefAttributes<HTMLDivElement>>;
1
+ import React from "react";
2
+ import { CommonProps } from "../../common";
3
+ export type PopoverContentChildren = ((close: () => void) => React.ReactNode) | React.ReactNode;
4
+ export interface PopoverContentProps extends Omit<React.HTMLProps<HTMLDivElement>, "children">, CommonProps {
5
+ children: PopoverContentChildren;
6
+ }
7
+ export declare const PopoverContent: React.ForwardRefExoticComponent<Pick<PopoverContentProps, "children" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "cite" | "classID" | "cols" | "colSpan" | "content" | "controls" | "coords" | "crossOrigin" | "data" | "dateTime" | "default" | "defer" | "disabled" | "download" | "encType" | "form" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "label" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "name" | "noValidate" | "open" | "optimum" | "pattern" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "size" | "sizes" | "span" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "summary" | "target" | "type" | "useMap" | "value" | "width" | "wmode" | "wrap" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "dataTestId"> & React.RefAttributes<HTMLDivElement>>;
@@ -1,20 +1,20 @@
1
- import * as React from "react";
2
- import { CommonProps } from "../../common/CommonProps";
3
- export interface PopoverTitleProps extends CommonProps {
4
- action?: React.ReactNode;
5
- /**
6
- * Whether there should be a divider between the title and the content.
7
- */
8
- divider?: boolean;
9
- /**
10
- * The child nodes.
11
- */
12
- children?: React.ReactNode;
13
- }
14
- /**
15
- * The PopoverTitle component.
16
- *
17
- * @param {PopoverTitleProps} props - The props for the PopoverTitle component
18
- * @returns {JSX.Element} PopoverTitle component
19
- */
20
- export declare const PopoverTitle: ({ children, action, divider, className, dataTestId }: PopoverTitleProps) => JSX.Element;
1
+ import * as React from "react";
2
+ import { CommonProps } from "../../common/CommonProps";
3
+ export interface PopoverTitleProps extends CommonProps {
4
+ action?: React.ReactNode;
5
+ /**
6
+ * Whether there should be a divider between the title and the content.
7
+ */
8
+ divider?: boolean;
9
+ /**
10
+ * The child nodes.
11
+ */
12
+ children?: React.ReactNode;
13
+ }
14
+ /**
15
+ * The PopoverTitle component.
16
+ *
17
+ * @param {PopoverTitleProps} props - The props for the PopoverTitle component
18
+ * @returns {JSX.Element} PopoverTitle component
19
+ */
20
+ export declare const PopoverTitle: ({ children, action, divider, className, dataTestId }: PopoverTitleProps) => JSX.Element;