@canonical/react-components 1.10.0 → 2.1.0

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 (163) hide show
  1. package/dist/components/Accordion/Accordion.d.ts +2 -2
  2. package/dist/components/Accordion/AccordionSection/AccordionSection.d.ts +2 -1
  3. package/dist/components/ActionButton/ActionButton.d.ts +2 -1
  4. package/dist/components/ArticlePagination/ArticlePagination.d.ts +2 -1
  5. package/dist/components/Badge/Badge.d.ts +2 -2
  6. package/dist/components/Button/Button.d.ts +2 -1
  7. package/dist/components/Card/Card.d.ts +2 -1
  8. package/dist/components/CheckboxInput/CheckableInput/CheckableInput.d.ts +2 -2
  9. package/dist/components/CheckboxInput/CheckboxInput.d.ts +2 -1
  10. package/dist/components/Chip/Chip.d.ts +2 -1
  11. package/dist/components/Code/Code.d.ts +2 -1
  12. package/dist/components/CodeSnippet/CodeSnippet.d.ts +2 -2
  13. package/dist/components/CodeSnippet/CodeSnippetBlock.d.ts +2 -1
  14. package/dist/components/CodeSnippet/CodeSnippetDropdown.d.ts +2 -1
  15. package/dist/components/Col/Col.d.ts +2 -1
  16. package/dist/components/ConfirmationButton/ConfirmationButton.d.ts +2 -2
  17. package/dist/components/ConfirmationButton/ConfirmationButton.js +2 -2
  18. package/dist/components/ConfirmationModal/ConfirmationModal.d.ts +2 -2
  19. package/dist/components/ContextualMenu/ContextualMenu.d.ts +1 -1
  20. package/dist/components/ContextualMenu/ContextualMenu.js +2 -2
  21. package/dist/components/ContextualMenu/ContextualMenuDropdown/ContextualMenuDropdown.d.ts +4 -4
  22. package/dist/components/CustomSelect/CustomSelect.d.ts +2 -1
  23. package/dist/components/EmptyState/EmptyState.d.ts +2 -2
  24. package/dist/components/Field/Field.d.ts +2 -1
  25. package/dist/components/Form/Form.d.ts +2 -1
  26. package/dist/components/FormikField/FormikField.d.ts +2 -1
  27. package/dist/components/Icon/Icon.d.ts +2 -1
  28. package/dist/components/Input/Input.d.ts +2 -1
  29. package/dist/components/Label/Label.d.ts +2 -1
  30. package/dist/components/Link/Link.d.ts +2 -1
  31. package/dist/components/List/List.d.ts +2 -1
  32. package/dist/components/Loader/Loader.d.ts +2 -1
  33. package/dist/components/MainTable/MainTable.d.ts +2 -1
  34. package/dist/components/Modal/Modal.d.ts +2 -2
  35. package/dist/components/ModularTable/ModularTable.d.ts +2 -2
  36. package/dist/components/MultiSelect/MultiSelect.js +1 -1
  37. package/dist/components/Navigation/Navigation.d.ts +2 -1
  38. package/dist/components/Navigation/Navigation.js +1 -1
  39. package/dist/components/Navigation/NavigationLink/NavigationLink.d.ts +2 -1
  40. package/dist/components/Navigation/NavigationMenu/NavigationMenu.d.ts +2 -1
  41. package/dist/components/Notification/Notification.d.ts +2 -2
  42. package/dist/components/Pagination/Pagination.d.ts +2 -1
  43. package/dist/components/Pagination/PaginationButton/PaginationButton.d.ts +2 -1
  44. package/dist/components/Pagination/PaginationItem/PaginationItem.d.ts +2 -1
  45. package/dist/components/RadioInput/RadioInput.d.ts +2 -1
  46. package/dist/components/Row/Row.d.ts +2 -1
  47. package/dist/components/SearchAndFilter/FilterPanelSection/FilterPanelSection.d.ts +2 -1
  48. package/dist/components/SearchAndFilter/SearchAndFilter.d.ts +2 -1
  49. package/dist/components/SearchAndFilter/SearchAndFilter.js +1 -1
  50. package/dist/components/SearchBox/SearchBox.d.ts +0 -4
  51. package/dist/components/SearchBox/SearchBox.js +1 -1
  52. package/dist/components/Select/Select.d.ts +2 -1
  53. package/dist/components/SkipLink/SkipLink.d.ts +2 -2
  54. package/dist/components/Slider/Slider.d.ts +2 -1
  55. package/dist/components/Spinner/Spinner.d.ts +2 -2
  56. package/dist/components/StatusLabel/StatusLabel.d.ts +2 -1
  57. package/dist/components/Stepper/Step/Step.d.ts +2 -1
  58. package/dist/components/Stepper/Stepper.d.ts +3 -3
  59. package/dist/components/Strip/Strip.d.ts +2 -1
  60. package/dist/components/SummaryButton/SummaryButton.d.ts +2 -1
  61. package/dist/components/Switch/Switch.d.ts +2 -1
  62. package/dist/components/Table/Table.d.ts +2 -2
  63. package/dist/components/TableCell/TableCell.d.ts +2 -2
  64. package/dist/components/TableHeader/TableHeader.d.ts +2 -2
  65. package/dist/components/TablePagination/TablePaginationControls/TablePaginationControls.d.ts +2 -2
  66. package/dist/components/TablePagination/utils.d.ts +3 -3
  67. package/dist/components/TableRow/TableRow.d.ts +2 -1
  68. package/dist/components/Tabs/Tabs.d.ts +2 -1
  69. package/dist/components/Textarea/Textarea.d.ts +2 -1
  70. package/dist/components/Tooltip/Tooltip.d.ts +2 -1
  71. package/dist/components/Tooltip/Tooltip.js +2 -2
  72. package/dist/esm/components/Accordion/Accordion.d.ts +2 -2
  73. package/dist/esm/components/Accordion/AccordionSection/AccordionSection.d.ts +2 -1
  74. package/dist/esm/components/ActionButton/ActionButton.d.ts +2 -1
  75. package/dist/esm/components/ArticlePagination/ArticlePagination.d.ts +2 -1
  76. package/dist/esm/components/Badge/Badge.d.ts +2 -2
  77. package/dist/esm/components/Button/Button.d.ts +2 -1
  78. package/dist/esm/components/Card/Card.d.ts +2 -1
  79. package/dist/esm/components/CheckboxInput/CheckableInput/CheckableInput.d.ts +2 -2
  80. package/dist/esm/components/CheckboxInput/CheckboxInput.d.ts +2 -1
  81. package/dist/esm/components/Chip/Chip.d.ts +2 -1
  82. package/dist/esm/components/Code/Code.d.ts +2 -1
  83. package/dist/esm/components/CodeSnippet/CodeSnippet.d.ts +2 -2
  84. package/dist/esm/components/CodeSnippet/CodeSnippetBlock.d.ts +2 -1
  85. package/dist/esm/components/CodeSnippet/CodeSnippetDropdown.d.ts +2 -1
  86. package/dist/esm/components/Col/Col.d.ts +2 -1
  87. package/dist/esm/components/ConfirmationButton/ConfirmationButton.d.ts +2 -2
  88. package/dist/esm/components/ConfirmationButton/ConfirmationButton.js +1 -1
  89. package/dist/esm/components/ConfirmationModal/ConfirmationModal.d.ts +2 -2
  90. package/dist/esm/components/ContextualMenu/ContextualMenu.d.ts +1 -1
  91. package/dist/esm/components/ContextualMenu/ContextualMenu.js +1 -1
  92. package/dist/esm/components/ContextualMenu/ContextualMenuDropdown/ContextualMenuDropdown.d.ts +4 -4
  93. package/dist/esm/components/CustomSelect/CustomSelect.d.ts +2 -1
  94. package/dist/esm/components/EmptyState/EmptyState.d.ts +2 -2
  95. package/dist/esm/components/Field/Field.d.ts +2 -1
  96. package/dist/esm/components/Form/Form.d.ts +2 -1
  97. package/dist/esm/components/FormikField/FormikField.d.ts +2 -1
  98. package/dist/esm/components/Icon/Icon.d.ts +2 -1
  99. package/dist/esm/components/Input/Input.d.ts +2 -1
  100. package/dist/esm/components/Label/Label.d.ts +2 -1
  101. package/dist/esm/components/Link/Link.d.ts +2 -1
  102. package/dist/esm/components/List/List.d.ts +2 -1
  103. package/dist/esm/components/Loader/Loader.d.ts +2 -1
  104. package/dist/esm/components/MainTable/MainTable.d.ts +2 -1
  105. package/dist/esm/components/Modal/Modal.d.ts +2 -2
  106. package/dist/esm/components/ModularTable/ModularTable.d.ts +2 -2
  107. package/dist/esm/components/MultiSelect/MultiSelect.js +1 -1
  108. package/dist/esm/components/Navigation/Navigation.d.ts +2 -1
  109. package/dist/esm/components/Navigation/Navigation.js +1 -1
  110. package/dist/esm/components/Navigation/NavigationLink/NavigationLink.d.ts +2 -1
  111. package/dist/esm/components/Navigation/NavigationMenu/NavigationMenu.d.ts +2 -1
  112. package/dist/esm/components/Notification/Notification.d.ts +2 -2
  113. package/dist/esm/components/Pagination/Pagination.d.ts +2 -1
  114. package/dist/esm/components/Pagination/PaginationButton/PaginationButton.d.ts +2 -1
  115. package/dist/esm/components/Pagination/PaginationItem/PaginationItem.d.ts +2 -1
  116. package/dist/esm/components/RadioInput/RadioInput.d.ts +2 -1
  117. package/dist/esm/components/Row/Row.d.ts +2 -1
  118. package/dist/esm/components/SearchAndFilter/FilterPanelSection/FilterPanelSection.d.ts +2 -1
  119. package/dist/esm/components/SearchAndFilter/SearchAndFilter.d.ts +2 -1
  120. package/dist/esm/components/SearchAndFilter/SearchAndFilter.js +1 -1
  121. package/dist/esm/components/SearchBox/SearchBox.d.ts +0 -4
  122. package/dist/esm/components/SearchBox/SearchBox.js +1 -1
  123. package/dist/esm/components/Select/Select.d.ts +2 -1
  124. package/dist/esm/components/SkipLink/SkipLink.d.ts +2 -2
  125. package/dist/esm/components/Slider/Slider.d.ts +2 -1
  126. package/dist/esm/components/Spinner/Spinner.d.ts +2 -2
  127. package/dist/esm/components/StatusLabel/StatusLabel.d.ts +2 -1
  128. package/dist/esm/components/Stepper/Step/Step.d.ts +2 -1
  129. package/dist/esm/components/Stepper/Stepper.d.ts +3 -3
  130. package/dist/esm/components/Strip/Strip.d.ts +2 -1
  131. package/dist/esm/components/SummaryButton/SummaryButton.d.ts +2 -1
  132. package/dist/esm/components/Switch/Switch.d.ts +2 -1
  133. package/dist/esm/components/Table/Table.d.ts +2 -2
  134. package/dist/esm/components/TableCell/TableCell.d.ts +2 -2
  135. package/dist/esm/components/TableHeader/TableHeader.d.ts +2 -2
  136. package/dist/esm/components/TablePagination/TablePaginationControls/TablePaginationControls.d.ts +2 -2
  137. package/dist/esm/components/TablePagination/utils.d.ts +3 -3
  138. package/dist/esm/components/TableRow/TableRow.d.ts +2 -1
  139. package/dist/esm/components/Tabs/Tabs.d.ts +2 -1
  140. package/dist/esm/components/Textarea/Textarea.d.ts +2 -1
  141. package/dist/esm/components/Tooltip/Tooltip.d.ts +2 -1
  142. package/dist/esm/components/Tooltip/Tooltip.js +1 -1
  143. package/dist/esm/external/index.d.ts +2 -0
  144. package/dist/esm/external/index.js +1 -0
  145. package/dist/esm/external/usePortal.d.ts +39 -0
  146. package/dist/esm/external/usePortal.js +125 -0
  147. package/dist/esm/external/usePortal.test.d.ts +5 -0
  148. package/dist/esm/external/useSSR.d.ts +19 -0
  149. package/dist/esm/external/useSSR.js +43 -0
  150. package/dist/esm/hooks/useThrottle.js +2 -2
  151. package/dist/esm/index.d.ts +2 -0
  152. package/dist/esm/index.js +2 -1
  153. package/dist/external/index.d.ts +2 -0
  154. package/dist/external/index.js +12 -0
  155. package/dist/external/usePortal.d.ts +39 -0
  156. package/dist/external/usePortal.js +133 -0
  157. package/dist/external/usePortal.test.d.ts +5 -0
  158. package/dist/external/useSSR.d.ts +19 -0
  159. package/dist/external/useSSR.js +48 -0
  160. package/dist/hooks/useThrottle.js +2 -2
  161. package/dist/index.d.ts +2 -0
  162. package/dist/index.js +9 -1
  163. package/package.json +16 -24
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import type { HTMLProps, ReactNode } from "react";
2
3
  import type { ClassName, PropsWithSpread } from "../../types";
3
4
  export type Props = PropsWithSpread<{
@@ -15,5 +16,5 @@ export type Props = PropsWithSpread<{
15
16
  *
16
17
  * Vanilla has a responsive grid using a combination of rows and columns.
17
18
  */
18
- declare const Row: ({ children, className, ...props }: Props) => JSX.Element;
19
+ declare const Row: ({ children, className, ...props }: Props) => React.JSX.Element;
19
20
  export default Row;
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import type { SearchAndFilterChip, SearchAndFilterData } from "../types";
2
3
  export type Props = {
3
4
  /**
@@ -21,5 +22,5 @@ export type Props = {
21
22
  */
22
23
  toggleSelected: (chip: SearchAndFilterChip) => void;
23
24
  };
24
- declare const FilterPanelSection: ({ data, searchData, searchTerm, sectionHidden, toggleSelected, }: Props) => JSX.Element;
25
+ declare const FilterPanelSection: ({ data, searchData, searchTerm, sectionHidden, toggleSelected, }: Props) => React.JSX.Element;
25
26
  export default FilterPanelSection;
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import type { SearchAndFilterChip, SearchAndFilterData } from "./types";
2
3
  export declare enum Label {
3
4
  AddFilter = "Add filter",
@@ -29,5 +30,5 @@ export type Props = {
29
30
  /**
30
31
  * This component allows searching and filtering of large datasets.
31
32
  */
32
- declare const SearchAndFilter: ({ existingSearchData, filterPanelData, returnSearchData, onPanelToggle, onExpandChange, ...props }: Props) => JSX.Element;
33
+ declare const SearchAndFilter: ({ existingSearchData, filterPanelData, returnSearchData, onPanelToggle, onExpandChange, ...props }: Props) => React.JSX.Element;
33
34
  export default SearchAndFilter;
@@ -42,7 +42,7 @@ const SearchAndFilter = _ref => {
42
42
  const searchAndFilterRef = (0, _react.useRef)(null);
43
43
  const searchContainerRef = (0, _react.useRef)(null);
44
44
  const searchBoxRef = (0, _react.useRef)(null);
45
- const panel = (0, _react.useRef)();
45
+ const panel = (0, _react.useRef)(null);
46
46
 
47
47
  // Call onPanelToggle when the filterPanelHidden state changes
48
48
  (0, _react.useEffect)(onPanelToggle, [onPanelToggle, filterPanelHidden]);
@@ -45,10 +45,6 @@ export type Props = PropsWithSpread<{
45
45
  * Whether the search input should receive focus after pressing the reset button
46
46
  */
47
47
  shouldRefocusAfterReset?: boolean;
48
- /**
49
- * A ref that is passed to the input element.
50
- */
51
- ref?: string;
52
48
  /**
53
49
  * The value of the search input when the state is externally controlled.
54
50
  */
@@ -36,7 +36,7 @@ const SearchBox = /*#__PURE__*/_react.default.forwardRef((_ref, forwardedRef) =>
36
36
  value,
37
37
  ...props
38
38
  } = _ref;
39
- const internalRef = (0, _react.useRef)();
39
+ const internalRef = (0, _react.useRef)(null);
40
40
  const resetInput = () => {
41
41
  onChange === null || onChange === void 0 || onChange("");
42
42
  onClear === null || onClear === void 0 || onClear();
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import type { ChangeEventHandler, ReactNode, OptionHTMLAttributes, SelectHTMLAttributes } from "react";
2
3
  import type { ClassName, PropsWithSpread } from "../../types";
3
4
  type Option = OptionHTMLAttributes<HTMLOptionElement>;
@@ -67,5 +68,5 @@ export type Props = PropsWithSpread<{
67
68
  *
68
69
  * Use the Select component to create a drop-down list.
69
70
  */
70
- declare const Select: ({ caution, className, error, help, id, label, labelClassName, onChange, options, required, stacked, success, takeFocus, wrapperClassName, ...selectProps }: Props) => JSX.Element;
71
+ declare const Select: ({ caution, className, error, help, id, label, labelClassName, onChange, options, required, stacked, success, takeFocus, wrapperClassName, ...selectProps }: Props) => React.JSX.Element;
71
72
  export default Select;
@@ -1,4 +1,4 @@
1
- import { HTMLProps } from "react";
1
+ import React, { HTMLProps } from "react";
2
2
  export type Props = {
3
3
  /**
4
4
  * Id of the main content area to skip to.
@@ -8,5 +8,5 @@ export type Props = {
8
8
  /**
9
9
  * This is a [React](https://reactjs.org/) component for the Vanilla [Skip link](https://vanillaframework.io/docs/patterns/links#skip-link) component.
10
10
  */
11
- export declare const SkipLink: ({ mainId }: Props) => JSX.Element;
11
+ export declare const SkipLink: ({ mainId, }: Props) => React.JSX.Element;
12
12
  export default SkipLink;
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import type { ChangeEventHandler, HTMLProps, ReactNode } from "react";
2
3
  import type { PropsWithSpread } from "../../types";
3
4
  export declare const FILLED_COLOR = "#0066CC";
@@ -58,5 +59,5 @@ export type Props = PropsWithSpread<{
58
59
  * Sliders should be used to let a user specify a numeric value between a defined
59
60
  minimum and maximum value, however the precise value is not especially important.
60
61
  */
61
- export declare const Slider: ({ caution, disabled, error, help, id, inputDisabled, label, max, min, onChange, required, showInput, ...inputProps }: Props) => JSX.Element;
62
+ export declare const Slider: ({ caution, disabled, error, help, id, inputDisabled, label, max, min, onChange, required, showInput, ...inputProps }: Props) => React.JSX.Element;
62
63
  export default Slider;
@@ -1,4 +1,4 @@
1
- import { HTMLProps } from "react";
1
+ import React, { HTMLProps } from "react";
2
2
  import type { ClassName } from "../../types";
3
3
  export type Props = {
4
4
  /**
@@ -25,5 +25,5 @@ export type Props = {
25
25
  /**
26
26
  * This is a [React](https://reactjs.org/) component for the Vanilla [Spin](https://docs.vanillaframework.io/settings/animation-settings/#spin) animation.
27
27
  */
28
- declare const Spinner: ({ className, text, isLight, ariaLive, role, ...props }: Props) => JSX.Element;
28
+ declare const Spinner: ({ className, text, isLight, ariaLive, role, ...props }: Props) => React.JSX.Element;
29
29
  export default Spinner;
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import type { HTMLProps, ReactNode } from "react";
2
3
  import { ClassName, PropsWithSpread, ValueOf } from "../../types";
3
4
  export declare const StatusLabelAppearance: {
@@ -29,5 +30,5 @@ export type Props = PropsWithSpread<{
29
30
  *
30
31
  * Labels are static elements which you can apply to signify status, tags or any other information you find useful.
31
32
  */
32
- declare const StatusLabel: ({ appearance, children, className, ...labelProps }: Props) => JSX.Element;
33
+ declare const StatusLabel: ({ appearance, children, className, ...labelProps }: Props) => React.JSX.Element;
33
34
  export default StatusLabel;
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import { LinkProps } from "../../Link";
2
3
  import { ClassName } from "../../../types";
3
4
  import "./Step.scss";
@@ -43,5 +44,5 @@ export type Props = {
43
44
  */
44
45
  handleClick: () => void;
45
46
  };
46
- declare const Step: ({ hasProgressLine, index, title, label, linkProps, enabled, selected, iconName, iconClassName, handleClick, ...props }: Props) => JSX.Element;
47
+ declare const Step: ({ hasProgressLine, index, title, label, linkProps, enabled, selected, iconName, iconClassName, handleClick, ...props }: Props) => React.JSX.Element;
47
48
  export default Step;
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import React, { ReactElement } from "react";
2
2
  import { StepProps } from "./Step";
3
3
  export type Props = {
4
4
  /**
@@ -8,10 +8,10 @@ export type Props = {
8
8
  /**
9
9
  * A list of steps.
10
10
  */
11
- steps: React.ReactElement<StepProps>[];
11
+ steps: ReactElement<StepProps>[];
12
12
  };
13
13
  /**
14
14
  * This is a stepper component that is used to guide users through a series of sequential steps, providing a clear start and end point. It helps users understand their current position in the process and anticipate upcoming actions. The stepper component should accept a list of Step components for the steps.
15
15
  */
16
- declare const Stepper: ({ variant, steps }: Props) => JSX.Element;
16
+ declare const Stepper: ({ variant, steps }: Props) => React.JSX.Element;
17
17
  export default Stepper;
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import type { ElementType, HTMLProps, ReactNode } from "react";
2
3
  import type { ColSize } from "../Col/Col";
3
4
  import type { ClassName, PropsWithSpread } from "../../types";
@@ -60,5 +61,5 @@ export type Props = PropsWithSpread<{
60
61
  *
61
62
  * The strip pattern provides a full width strip container in which to wrap a row.
62
63
  */
63
- declare const Strip: ({ background, bordered, children, className, colSize, dark, deep, includeCol, element: Component, light, rowClassName, shallow, type, ...props }: Props) => JSX.Element;
64
+ declare const Strip: ({ background, bordered, children, className, colSize, dark, deep, includeCol, element: Component, light, rowClassName, shallow, type, ...props }: Props) => React.JSX.Element;
64
65
  export default Strip;
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import type { MouseEventHandler } from "react";
2
3
  import type { ClassName } from "../../types";
3
4
  export type Props = {
@@ -25,5 +26,5 @@ export type Props = {
25
26
  /**
26
27
  * `SummaryButton` is a component to render a short summary with an action button. It's initial use case is a summary of table contents with action to load more items.
27
28
  */
28
- declare const SummaryButton: ({ className, isLoading, summary, label, onClick, }: Props) => JSX.Element;
29
+ declare const SummaryButton: ({ className, isLoading, summary, label, onClick, }: Props) => React.JSX.Element;
29
30
  export default SummaryButton;
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import type { HTMLProps, ReactNode } from "react";
2
3
  import type { PropsWithSpread } from "../../types";
3
4
  export type Props = PropsWithSpread<{
@@ -13,5 +14,5 @@ export type Props = PropsWithSpread<{
13
14
  /**
14
15
  * This is a [React](https://reactjs.org/) component for the Vanilla [Switch](https://vanillaframework.io/docs/patterns/switch) component.
15
16
  */
16
- export declare const Switch: ({ label, disabled, ...inputProps }: Props) => JSX.Element;
17
+ export declare const Switch: ({ label, disabled, ...inputProps }: Props) => React.JSX.Element;
17
18
  export default Switch;
@@ -1,4 +1,4 @@
1
- import { HTMLProps, ReactNode } from "react";
1
+ import React, { HTMLProps, ReactNode } from "react";
2
2
  import type { ClassName, PropsWithSpread } from "../../types";
3
3
  export type Props = PropsWithSpread<{
4
4
  /**
@@ -18,5 +18,5 @@ export type Props = PropsWithSpread<{
18
18
  */
19
19
  responsive?: boolean;
20
20
  }, HTMLProps<HTMLTableElement>>;
21
- declare const Table: ({ children, className, expanding, responsive, ...props }: Props) => JSX.Element;
21
+ declare const Table: ({ children, className, expanding, responsive, ...props }: Props) => React.JSX.Element;
22
22
  export default Table;
@@ -1,4 +1,4 @@
1
- import { HTMLProps, ReactNode } from "react";
1
+ import React, { HTMLProps, ReactNode } from "react";
2
2
  import type { ClassName, PropsWithSpread } from "../../types";
3
3
  export type Props = PropsWithSpread<{
4
4
  /**
@@ -22,5 +22,5 @@ export type Props = PropsWithSpread<{
22
22
  */
23
23
  hidden?: boolean;
24
24
  }, HTMLProps<HTMLTableCellElement>>;
25
- declare const TableCell: ({ children, className, hasOverflow, expanding, hidden, role, ...props }: Props) => JSX.Element;
25
+ declare const TableCell: ({ children, className, hasOverflow, expanding, hidden, role, ...props }: Props) => React.JSX.Element;
26
26
  export default TableCell;
@@ -1,4 +1,4 @@
1
- import { HTMLProps, ReactNode } from "react";
1
+ import React, { HTMLProps, ReactNode } from "react";
2
2
  import { PropsWithSpread, SortDirection } from "../../types";
3
3
  export type Props = PropsWithSpread<{
4
4
  /**
@@ -10,5 +10,5 @@ export type Props = PropsWithSpread<{
10
10
  */
11
11
  sort?: SortDirection;
12
12
  }, HTMLProps<HTMLTableHeaderCellElement>>;
13
- declare const TableHeader: ({ children, sort, ...props }: Props) => JSX.Element;
13
+ declare const TableHeader: ({ children, sort, ...props }: Props) => React.JSX.Element;
14
14
  export default TableHeader;
@@ -1,5 +1,5 @@
1
1
  import { ButtonProps } from "../../Button";
2
- import { HTMLAttributes } from "react";
2
+ import React, { HTMLAttributes } from "react";
3
3
  import { BasePaginationProps, ExternalControlProps, InternalControlProps } from "../TablePagination";
4
4
  export declare enum Label {
5
5
  NEXT_PAGE = "Next page",
@@ -20,5 +20,5 @@ export type Props = Omit<AllProps, "currentPage" | "data" | "dataForwardProp" |
20
20
  visibleCount?: number;
21
21
  showPageInput?: boolean;
22
22
  } & HTMLAttributes<HTMLDivElement>;
23
- declare const TablePaginationControls: ({ className, currentPage, description, displayDescription, onInputPageChange, itemName, nextButtonProps, onNextPage, onPageChange, onPageSizeChange, onPreviousPage, pageLimits, pageSize, previousButtonProps, showPageInput, totalItems, visibleCount, ...divProps }: Props) => JSX.Element;
23
+ declare const TablePaginationControls: ({ className, currentPage, description, displayDescription, onInputPageChange, itemName, nextButtonProps, onNextPage, onPageChange, onPageSizeChange, onPreviousPage, pageLimits, pageSize, previousButtonProps, showPageInput, totalItems, visibleCount, ...divProps }: Props) => React.JSX.Element;
24
24
  export default TablePaginationControls;
@@ -1,4 +1,4 @@
1
- import { ReactElement, ReactNode } from "react";
1
+ import { ReactNode } from "react";
2
2
  /**
3
3
  * Determine if we are working with a small screen.
4
4
  * 'small screen' in this case is relative to the width of the description div
@@ -11,7 +11,7 @@ export declare const figureSmallScreen: () => boolean;
11
11
  * @param dataForwardProp - the name of the prop from the children components to override
12
12
  * @param data - actual data to be passed to the prop specified by @param dataForwardProp
13
13
  */
14
- export declare const renderChildren: (children: ReactNode, dataForwardProp: string, data: unknown[]) => ReactElement<any, string | import("react").JSXElementConstructor<any>>[];
14
+ export declare const renderChildren: (children: ReactNode, dataForwardProp: string, data: unknown[]) => import("react").FunctionComponentElement<any>[];
15
15
  export declare const DEFAULT_PAGE_LIMITS: number[];
16
16
  export declare const generatePagingOptions: (pageLimits: number[]) => {
17
17
  value: number;
@@ -23,5 +23,5 @@ export declare const getDescription: ({ description, isSmallScreen, totalItems,
23
23
  totalItems: number;
24
24
  itemName: string;
25
25
  visibleCount: number;
26
- }) => string | number | true | ReactElement<any, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode>;
26
+ }) => string | number | bigint | true | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode>>;
27
27
  export declare const useFigureSmallScreen: () => boolean;
@@ -1,4 +1,5 @@
1
1
  import type { HTMLProps, ReactNode } from "react";
2
+ import React from "react";
2
3
  import type { PropsWithSpread } from "../../types";
3
4
  export type Props = PropsWithSpread<{
4
5
  /**
@@ -6,5 +7,5 @@ export type Props = PropsWithSpread<{
6
7
  */
7
8
  children: ReactNode;
8
9
  }, HTMLProps<HTMLTableRowElement>>;
9
- declare const TableRow: ({ children, ...trProps }: Props) => JSX.Element;
10
+ declare const TableRow: ({ children, ...trProps }: Props) => React.JSX.Element;
10
11
  export default TableRow;
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import type { HTMLProps, ElementType, ReactNode, ComponentType } from "react";
2
3
  import type { ClassName } from "../../types";
3
4
  export type TabLink<P = null> = {
@@ -41,5 +42,5 @@ export type Props<P = null> = {
41
42
  Tabs organise and allow navigation between groups of content that are related and at the same level
42
43
  of hierarchy.
43
44
  */
44
- declare const Tabs: <P>({ className, links, listClassName, }: Props<P>) => JSX.Element;
45
+ declare const Tabs: <P>({ className, links, listClassName, }: Props<P>) => React.JSX.Element;
45
46
  export default Tabs;
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import type { TextareaHTMLAttributes, ReactNode } from "react";
2
3
  import type { ClassName, PropsWithSpread } from "../../types";
3
4
  /**
@@ -66,5 +67,5 @@ export type Props = PropsWithSpread<{
66
67
  *
67
68
  * The Textarea component defines a multi-line text input control.
68
69
  */
69
- declare const Textarea: ({ caution, className, error, grow, help, id, label, labelClassName, onKeyUp, onControlEnter, required, stacked, style, success, takeFocus, wrapperClassName, ...props }: Props) => JSX.Element;
70
+ declare const Textarea: ({ caution, className, error, grow, help, id, label, labelClassName, onKeyUp, onControlEnter, required, stacked, style, success, takeFocus, wrapperClassName, ...props }: Props) => React.JSX.Element;
70
71
  export default Textarea;
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import type { ReactNode } from "react";
2
3
  import type { WindowFitment } from "../../hooks";
3
4
  import type { ClassName, ValueOf } from "../../types";
@@ -71,5 +72,5 @@ export declare const adjustForWindow: (position: Position, fitsWindow: WindowFit
71
72
  *
72
73
  * An alternative use of tooltips is to provide information on a disabled actionable element, e.g. for disabled buttons, providing information about why they are disabled.
73
74
  */
74
- declare const Tooltip: ({ autoAdjust, children, className, followMouse, message, position, positionElementClassName, tooltipClassName, zIndex, delay, }: Props) => JSX.Element;
75
+ declare const Tooltip: ({ autoAdjust, children, className, followMouse, message, position, positionElementClassName, tooltipClassName, zIndex, delay, }: Props) => React.JSX.Element;
75
76
  export default Tooltip;
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.position = exports.default = exports.adjustForWindow = void 0;
7
7
  var _classnames = _interopRequireDefault(require("classnames"));
8
8
  var _react = _interopRequireWildcard(require("react"));
9
- var _reactUseportal = _interopRequireDefault(require("react-useportal"));
10
9
  var _hooks = require("../../hooks");
10
+ var _external = require("../../external");
11
11
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
12
12
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
13
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -142,7 +142,7 @@ const Tooltip = _ref => {
142
142
  closePortal,
143
143
  isOpen,
144
144
  Portal
145
- } = (0, _reactUseportal.default)({
145
+ } = (0, _external.usePortal)({
146
146
  programmaticallyOpen: true
147
147
  });
148
148
  const tooltipId = (0, _react.useId)();
@@ -1,4 +1,4 @@
1
- import { HTMLProps } from "react";
1
+ import React, { HTMLProps } from "react";
2
2
  import type { AccordionHeadings, AccordionSectionProps } from "./AccordionSection";
3
3
  import type { ClassName, PropsWithSpread } from "../../types";
4
4
  export type Section = AccordionSectionProps & {
@@ -42,5 +42,5 @@ export type Props = PropsWithSpread<{
42
42
  *
43
43
  * The sidebar accordion, used in listing pages or as navigation, can hold multiple navigation items or to be used as a filter for content.
44
44
  */
45
- declare const Accordion: ({ className, expanded, externallyControlled, onExpandedChange, sections, titleElement, ...asideProps }: Props) => JSX.Element;
45
+ declare const Accordion: ({ className, expanded, externallyControlled, onExpandedChange, sections, titleElement, ...asideProps }: Props) => React.JSX.Element;
46
46
  export default Accordion;
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import type { ReactNode } from "react";
2
3
  import type { Headings } from "../../../types";
3
4
  export type AccordionHeadings = Exclude<Headings, "h1">;
@@ -30,5 +31,5 @@ export type Props = {
30
31
  */
31
32
  titleElement?: AccordionHeadings;
32
33
  };
33
- declare const AccordionSection: ({ content, expanded, onTitleClick, sectionKey, setExpanded, title, titleElement, headingLevel, }: Props) => JSX.Element;
34
+ declare const AccordionSection: ({ content, expanded, onTitleClick, sectionKey, setExpanded, title, titleElement, headingLevel, }: Props) => React.JSX.Element;
34
35
  export default AccordionSection;
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import type { ButtonHTMLAttributes, ReactNode } from "react";
2
3
  import type { ButtonProps } from "../Button";
3
4
  import type { ClassName, PropsWithSpread } from "../../types";
@@ -44,5 +45,5 @@ export type Props = PropsWithSpread<{
44
45
  * [Button](?path=/docs/components-button--docs) in addition to those in the
45
46
  * props table:
46
47
  */
47
- declare const ActionButton: ({ appearance, children, className, disabled, inline, loading, success, ...buttonProps }: Props) => JSX.Element;
48
+ declare const ActionButton: ({ appearance, children, className, disabled, inline, loading, success, ...buttonProps }: Props) => React.JSX.Element;
48
49
  export default ActionButton;
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import type { HTMLProps } from "react";
2
3
  import type { ClassName, PropsWithSpread } from "../../types";
3
4
  export type Props = PropsWithSpread<{
@@ -27,5 +28,5 @@ export type Props = PropsWithSpread<{
27
28
  *
28
29
  * The article pagination component should be used to navigate from one article to the next, or previous, in chronological order.
29
30
  */
30
- declare const ArticlePagination: ({ className, nextURL, nextLabel, previousURL, previousLabel, ...props }: Props) => JSX.Element;
31
+ declare const ArticlePagination: ({ className, nextURL, nextLabel, previousURL, previousLabel, ...props }: Props) => React.JSX.Element;
31
32
  export default ArticlePagination;
@@ -1,4 +1,4 @@
1
- import { HTMLProps } from "react";
1
+ import React, { HTMLProps } from "react";
2
2
  import type { ClassName, PropsWithSpread, ValueOf } from "../../types";
3
3
  export declare const BadgeType: {
4
4
  readonly ROUNDED_LARGE_NUMBER: "ROUNDED_LARGE_NUMBER";
@@ -30,5 +30,5 @@ export type Props = PropsWithSpread<{
30
30
  *
31
31
  * It can be used to display a numeric values.
32
32
  */
33
- declare const Badge: ({ value, badgeType, className, isNegative, ...spanProps }: Props) => JSX.Element;
33
+ declare const Badge: ({ value, badgeType, className, isNegative, ...spanProps }: Props) => React.JSX.Element;
34
34
  export default Badge;
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import type { ButtonHTMLAttributes, ComponentType, ElementType, MouseEventHandler, ReactNode } from "react";
2
3
  import type { ClassName, ValueOf } from "../../types";
3
4
  export declare const ButtonAppearance: {
@@ -60,5 +61,5 @@ export type Props<P = null> = {
60
61
  * Buttons are clickable elements used to perform an action, they can be used for buttons and link elements.
61
62
  * @template P - The type of the props if providing a component to `element`
62
63
  */
63
- declare const Button: <P>({ appearance, children, className, dense, disabled, element: Component, hasIcon, inline, onClick, small, ...buttonProps }: Props<P>) => JSX.Element;
64
+ declare const Button: <P>({ appearance, children, className, dense, disabled, element: Component, hasIcon, inline, onClick, small, ...buttonProps }: Props<P>) => React.JSX.Element;
64
65
  export default Button;
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import type { HTMLProps, ReactNode } from "react";
2
3
  import type { ClassName, PropsWithSpread } from "../../types";
3
4
  export type Props = PropsWithSpread<{
@@ -31,5 +32,5 @@ export type Props = PropsWithSpread<{
31
32
  *
32
33
  * There are four card styles available to use in Vanilla: default, header, highlighted and overlay. Our card component will expand to fill the full width of its parent container.
33
34
  */
34
- declare const Card: ({ children, className, highlighted, overlay, thumbnail, title, ...props }: Props) => JSX.Element;
35
+ declare const Card: ({ children, className, highlighted, overlay, thumbnail, title, ...props }: Props) => React.JSX.Element;
35
36
  export default Card;
@@ -1,4 +1,4 @@
1
- import { HTMLProps } from "react";
1
+ import React, { HTMLProps } from "react";
2
2
  import type { ReactNode } from "react";
3
3
  import type { PropsWithSpread } from "../../../types";
4
4
  export type Props = PropsWithSpread<{
@@ -23,5 +23,5 @@ export type Props = PropsWithSpread<{
23
23
  */
24
24
  inline?: boolean;
25
25
  }, Omit<HTMLProps<HTMLInputElement>, "type">>;
26
- declare const CheckableInput: ({ inputType, label, labelClassName, indeterminate, inline, ...checkboxProps }: Props) => JSX.Element;
26
+ declare const CheckableInput: ({ inputType, label, labelClassName, indeterminate, inline, ...checkboxProps }: Props) => React.JSX.Element;
27
27
  export default CheckableInput;
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import type { CheckableInputProps } from "./CheckableInput";
2
3
  export type Props = Omit<CheckableInputProps, "inputType">;
3
4
  /**
@@ -5,5 +6,5 @@ export type Props = Omit<CheckableInputProps, "inputType">;
5
6
  *
6
7
  * Use the checkbox component to select one or more options.
7
8
  */
8
- declare const CheckboxInput: ({ label, indeterminate, ...checkboxProps }: Props) => JSX.Element;
9
+ declare const CheckboxInput: ({ label, indeterminate, ...checkboxProps }: Props) => React.JSX.Element;
9
10
  export default CheckboxInput;
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import type { MouseEvent, HTMLProps } from "react";
2
3
  import { ValueOf, PropsWithSpread } from "../../types";
3
4
  export declare enum Label {
@@ -52,5 +53,5 @@ export type Props = PropsWithSpread<{
52
53
  *
53
54
  * It can be used to display a small value attached to a component.
54
55
  */
55
- declare const Chip: ({ appearance, lead, onClick, onDismiss, quoteValue, selected, subString, value, ...props }: Props) => JSX.Element;
56
+ declare const Chip: ({ appearance, lead, onClick, onDismiss, quoteValue, selected, subString, value, ...props }: Props) => React.JSX.Element;
56
57
  export default Chip;
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import type { ClassName } from "../../types";
2
3
  export type Props = {
3
4
  children: string;
@@ -9,5 +10,5 @@ export type Props = {
9
10
  /**
10
11
  * @deprecated Code component is deprecated. Use CodeSnippet component or inline `<code>` instead.
11
12
  */
12
- declare const Code: ({ children, className, inline, copyable, numbered, ...props }: Props) => JSX.Element;
13
+ declare const Code: ({ children, className, inline, copyable, numbered, ...props }: Props) => React.JSX.Element;
13
14
  export default Code;
@@ -1,4 +1,4 @@
1
- import { HTMLProps } from "react";
1
+ import React, { HTMLProps } from "react";
2
2
  import type { Props as CodeSnippetBlockProps } from "./CodeSnippetBlock";
3
3
  import type { ClassName, PropsWithSpread } from "../../types";
4
4
  export type Props = PropsWithSpread<{
@@ -18,4 +18,4 @@ export type Props = PropsWithSpread<{
18
18
  *
19
19
  * A single `CodeSnippet` component can render multiple separate code blocks. Blocks are provided as an array via the `blocks` prop. Each block object defines values of props for each code block of the snippet.
20
20
  */
21
- export default function CodeSnippet({ className, blocks, ...props }: Props): JSX.Element;
21
+ export default function CodeSnippet({ className, blocks, ...props }: Props): React.JSX.Element;
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import type { ReactNode } from "react";
2
3
  import type { Props as CodeSnippetDropdownProps } from "./CodeSnippetDropdown";
3
4
  import type { ValueOf } from "../../types";
@@ -37,4 +38,4 @@ export type Props = {
37
38
  */
38
39
  wrapLines?: boolean;
39
40
  };
40
- export default function CodeSnippetBlock({ appearance, code, content, dropdowns, stacked, title, wrapLines, }: Props): JSX.Element;
41
+ export default function CodeSnippetBlock({ appearance, code, content, dropdowns, stacked, title, wrapLines, }: Props): React.JSX.Element;
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import type { ChangeEventHandler, HTMLProps } from "react";
2
3
  export type DropdownOptionProps = {
3
4
  /**
@@ -15,4 +16,4 @@ export type Props = {
15
16
  */
16
17
  options: DropdownOptionProps[];
17
18
  } & HTMLProps<HTMLSelectElement>;
18
- export default function CodeSnippetDropdown({ options, onChange, ...props }: Props): JSX.Element;
19
+ export default function CodeSnippetDropdown({ options, onChange, ...props }: Props): React.JSX.Element;
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import type { ElementType, HTMLProps, ReactNode } from "react";
2
3
  import type { ClassName, PropsWithSpread } from "../../types";
3
4
  export type ColSize = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
@@ -49,5 +50,5 @@ export type Props = PropsWithSpread<{
49
50
  *
50
51
  * Vanilla has a responsive grid using a combination of rows and columns.
51
52
  */
52
- declare const Col: ({ children, className, element: Component, emptyLarge, emptyMedium, emptySmall, large, medium, size, small, ...props }: Props) => JSX.Element;
53
+ declare const Col: ({ children, className, element: Component, emptyLarge, emptyMedium, emptySmall, large, medium, size, small, ...props }: Props) => React.JSX.Element;
53
54
  export default Col;
@@ -1,4 +1,4 @@
1
- import { ReactElement } from "react";
1
+ import React from "react";
2
2
  import { PropsWithSpread, SubComponentProps } from "../../types";
3
3
  import { ActionButtonProps } from "../ActionButton";
4
4
  import { ConfirmationModalProps } from "../ConfirmationModal";
@@ -24,5 +24,5 @@ export type Props = PropsWithSpread<{
24
24
  /**
25
25
  * `ConfirmationButton` is a specialised version of the [ActionButton](?path=/docs/actionbutton--default-story) component that uses a [ConfirmationModal](?path=/docs/confirmationmodal--default-story) to prompt a confirmation from the user before executing an action.
26
26
  */
27
- export declare const ConfirmationButton: ({ confirmationModalProps, onHoverText, shiftClickEnabled, showShiftClickHint, ...actionButtonProps }: Props) => ReactElement;
27
+ export declare const ConfirmationButton: ({ confirmationModalProps, onHoverText, shiftClickEnabled, showShiftClickHint, ...actionButtonProps }: Props) => React.JSX.Element;
28
28
  export default ConfirmationButton;
@@ -5,7 +5,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
5
5
  import React from "react";
6
6
  import ActionButton from "../ActionButton";
7
7
  import ConfirmationModal from "../ConfirmationModal";
8
- import usePortal from "react-useportal";
8
+ import { usePortal } from "../../external";
9
9
  var generateTitle = title => {
10
10
  if (typeof title === "string") {
11
11
  return title;
@@ -1,4 +1,4 @@
1
- import { MouseEvent, ReactElement } from "react";
1
+ import React, { MouseEvent } from "react";
2
2
  import type { ReactNode } from "react";
3
3
  import { PropsWithSpread, ValueOf } from "../../types";
4
4
  import { ButtonAppearance, ButtonProps } from "../Button";
@@ -49,5 +49,5 @@ export type Props = PropsWithSpread<{
49
49
  /**
50
50
  * `ConfirmationModal` is a specialised version of the [Modal](?path=/docs/modal--default-story) component to prompt a confirmation from the user before executing an action.
51
51
  */
52
- export declare const ConfirmationModal: ({ cancelButtonLabel, cancelButtonProps, children, confirmButtonAppearance, confirmButtonLabel, confirmExtra, onConfirm, confirmButtonLoading, confirmButtonDisabled, confirmButtonProps, ...props }: Props) => ReactElement;
52
+ export declare const ConfirmationModal: ({ cancelButtonLabel, cancelButtonProps, children, confirmButtonAppearance, confirmButtonLabel, confirmExtra, onConfirm, confirmButtonLoading, confirmButtonDisabled, confirmButtonProps, ...props }: Props) => React.JSX.Element;
53
53
  export default ConfirmationModal;
@@ -106,5 +106,5 @@ export type Props<L> = BaseProps<L> & ExclusiveProps<{
106
106
  *
107
107
  * A contextual menu can be used in conjunction with any page element to provide a contextual menu.
108
108
  */
109
- declare const ContextualMenu: <L>({ autoAdjust, children, className, closeOnEsc, closeOnOutsideClick, constrainPanelWidth, dropdownClassName, dropdownProps, hasToggleIcon, links, onToggleMenu, position, positionNode, scrollOverflow, toggle, toggleAppearance, toggleClassName, toggleDisabled, toggleLabel, toggleLabelFirst, toggleProps, visible, ...wrapperProps }: Props<L>) => JSX.Element;
109
+ declare const ContextualMenu: <L>({ autoAdjust, children, className, closeOnEsc, closeOnOutsideClick, constrainPanelWidth, dropdownClassName, dropdownProps, hasToggleIcon, links, onToggleMenu, position, positionNode, scrollOverflow, toggle, toggleAppearance, toggleClassName, toggleDisabled, toggleLabel, toggleLabelFirst, toggleProps, visible, ...wrapperProps }: Props<L>) => React.JSX.Element;
110
110
  export default ContextualMenu;
@@ -4,10 +4,10 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
4
4
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
5
5
  import classNames from "classnames";
6
6
  import React, { useCallback, useEffect, useId, useRef, useState } from "react";
7
- import usePortal from "react-useportal";
8
7
  import { useListener, usePrevious } from "../../hooks";
9
8
  import Button from "../Button";
10
9
  import ContextualMenuDropdown from "./ContextualMenuDropdown";
10
+ import { usePortal } from "../../external";
11
11
  export var Label = /*#__PURE__*/function (Label) {
12
12
  Label["Toggle"] = "Toggle menu";
13
13
  return Label;