@canonical/react-components 0.38.0 → 0.39.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 (65) hide show
  1. package/dist/components/Accordion/Accordion.d.ts +2 -2
  2. package/dist/components/Accordion/AccordionSection/AccordionSection.d.ts +2 -2
  3. package/dist/components/ActionButton/ActionButton.d.ts +1 -1
  4. package/dist/components/ArticlePagination/ArticlePagination.d.ts +1 -1
  5. package/dist/components/Badge/Badge.d.ts +1 -1
  6. package/dist/components/Button/Button.d.ts +1 -1
  7. package/dist/components/Card/Card.d.ts +1 -1
  8. package/dist/components/CheckboxInput/CheckableInput/CheckableInput.d.ts +1 -1
  9. package/dist/components/CheckboxInput/CheckboxInput.d.ts +1 -1
  10. package/dist/components/Chip/Chip.d.ts +1 -1
  11. package/dist/components/Code/Code.d.ts +1 -1
  12. package/dist/components/CodeSnippet/CodeSnippet.d.ts +1 -1
  13. package/dist/components/CodeSnippet/CodeSnippetBlock.d.ts +1 -1
  14. package/dist/components/CodeSnippet/CodeSnippetDropdown.d.ts +2 -2
  15. package/dist/components/Col/Col.d.ts +2 -2
  16. package/dist/components/ContextualMenu/ContextualMenu.d.ts +1 -1
  17. package/dist/components/ContextualMenu/ContextualMenuDropdown/ContextualMenuDropdown.d.ts +3 -3
  18. package/dist/components/Field/Field.d.ts +2 -2
  19. package/dist/components/Form/Form.d.ts +1 -1
  20. package/dist/components/Icon/Icon.d.ts +1 -1
  21. package/dist/components/Input/Input.d.ts +1 -1
  22. package/dist/components/Input/Input.js +2 -2
  23. package/dist/components/Label/Label.d.ts +1 -1
  24. package/dist/components/Link/Link.d.ts +1 -1
  25. package/dist/components/List/List.d.ts +4 -4
  26. package/dist/components/List/List.js +1 -1
  27. package/dist/components/MainTable/MainTable.d.ts +4 -4
  28. package/dist/components/Modal/Modal.d.ts +1 -1
  29. package/dist/components/ModularTable/ModularTable.d.ts +1 -1
  30. package/dist/components/Navigation/Navigation.d.ts +1 -1
  31. package/dist/components/Navigation/NavigationLink/NavigationLink.d.ts +1 -1
  32. package/dist/components/Navigation/NavigationMenu/NavigationMenu.d.ts +1 -1
  33. package/dist/components/Navigation/types.d.ts +8 -8
  34. package/dist/components/Notification/Notification.d.ts +2 -2
  35. package/dist/components/Pagination/Pagination.d.ts +1 -1
  36. package/dist/components/Pagination/PaginationButton/PaginationButton.d.ts +2 -2
  37. package/dist/components/Pagination/PaginationItem/PaginationItem.d.ts +1 -1
  38. package/dist/components/PasswordToggle/PasswordToggle.d.ts +1 -1
  39. package/dist/components/RadioInput/RadioInput.d.ts +1 -1
  40. package/dist/components/Row/Row.d.ts +1 -1
  41. package/dist/components/SearchAndFilter/FilterPanelSection/FilterPanelSection.d.ts +1 -1
  42. package/dist/components/SearchAndFilter/SearchAndFilter.d.ts +1 -1
  43. package/dist/components/SearchAndFilter/types.d.ts +2 -2
  44. package/dist/components/SearchBox/SearchBox.d.ts +10 -2
  45. package/dist/components/SearchBox/SearchBox.js +7 -3
  46. package/dist/components/Select/Select.d.ts +2 -2
  47. package/dist/components/Slider/Slider.d.ts +1 -1
  48. package/dist/components/Spinner/Spinner.d.ts +1 -1
  49. package/dist/components/StatusLabel/StatusLabel.d.ts +1 -1
  50. package/dist/components/Strip/Strip.d.ts +1 -1
  51. package/dist/components/SummaryButton/SummaryButton.d.ts +1 -1
  52. package/dist/components/Switch/Switch.d.ts +1 -1
  53. package/dist/components/Table/Table.d.ts +1 -1
  54. package/dist/components/TableCell/TableCell.d.ts +1 -1
  55. package/dist/components/TableHeader/TableHeader.d.ts +1 -1
  56. package/dist/components/TableRow/TableRow.d.ts +1 -1
  57. package/dist/components/Tabs/Tabs.d.ts +2 -2
  58. package/dist/components/Textarea/Textarea.d.ts +1 -1
  59. package/dist/components/Tooltip/Tooltip.d.ts +4 -4
  60. package/dist/components/Tooltip/Tooltip.js +8 -3
  61. package/dist/hooks/useThrottle.d.ts +1 -1
  62. package/dist/hooks/useWindowFitment.d.ts +1 -1
  63. package/dist/testing/mock-scss.js +4 -0
  64. package/dist/types/index.d.ts +7 -7
  65. package/package.json +47 -47
@@ -1,14 +1,14 @@
1
1
  import { HTMLProps } from "react";
2
2
  import type { AccordionHeadings, AccordionSectionProps } from "./AccordionSection";
3
3
  import type { ClassName, PropsWithSpread } from "../../types";
4
- export declare type Section = AccordionSectionProps & {
4
+ export type Section = AccordionSectionProps & {
5
5
  /**
6
6
  * An optional key for the section component. It will also be
7
7
  * used to track which section is selected.
8
8
  */
9
9
  key?: string | number;
10
10
  };
11
- export declare type Props = PropsWithSpread<{
11
+ export type Props = PropsWithSpread<{
12
12
  /**
13
13
  * Optional classes applied to the parent element.
14
14
  */
@@ -1,7 +1,7 @@
1
1
  import type { ReactNode } from "react";
2
2
  import type { Headings } from "../../../types";
3
- export declare type AccordionHeadings = Exclude<Headings, "h1">;
4
- export declare type Props = {
3
+ export type AccordionHeadings = Exclude<Headings, "h1">;
4
+ export type Props = {
5
5
  /**
6
6
  * The content of the section.
7
7
  */
@@ -7,7 +7,7 @@ export declare enum Label {
7
7
  WAITING = "Waiting for action to complete",
8
8
  SUCCESS = "Action completed"
9
9
  }
10
- export declare type Props = PropsWithSpread<{
10
+ export type Props = PropsWithSpread<{
11
11
  /**
12
12
  * The appearance of the button.
13
13
  */
@@ -1,6 +1,6 @@
1
1
  import type { HTMLProps } from "react";
2
2
  import type { ClassName, PropsWithSpread } from "../../types";
3
- export declare type Props = PropsWithSpread<{
3
+ export type Props = PropsWithSpread<{
4
4
  /**
5
5
  * Optional classes to add to the wrapping element.
6
6
  */
@@ -7,7 +7,7 @@ export declare const BadgeType: {
7
7
  /**
8
8
  * The props for the Badge component.
9
9
  */
10
- export declare type Props = PropsWithSpread<{
10
+ export type Props = PropsWithSpread<{
11
11
  /**
12
12
  * Numeric value to be displayed.
13
13
  */
@@ -12,7 +12,7 @@ export declare const ButtonAppearance: {
12
12
  * The type of the Button props.
13
13
  * @template P - The type of the props if providing a component to `element`
14
14
  */
15
- export declare type Props<P = null> = {
15
+ export type Props<P = null> = {
16
16
  /**
17
17
  * The appearance of the button.
18
18
  */
@@ -1,6 +1,6 @@
1
1
  import type { HTMLProps, ReactNode } from "react";
2
2
  import type { ClassName, PropsWithSpread } from "../../types";
3
- export declare type Props = PropsWithSpread<{
3
+ export type Props = PropsWithSpread<{
4
4
  /**
5
5
  * The content of the card.
6
6
  */
@@ -1,7 +1,7 @@
1
1
  import { HTMLProps } from "react";
2
2
  import type { ReactNode } from "react";
3
3
  import type { PropsWithSpread } from "../../../types";
4
- export declare type Props = PropsWithSpread<{
4
+ export type Props = PropsWithSpread<{
5
5
  /**
6
6
  * The type of the input element.
7
7
  */
@@ -1,4 +1,4 @@
1
1
  import type { CheckableInputProps } from "./CheckableInput";
2
- export declare type Props = Omit<CheckableInputProps, "inputType">;
2
+ export type Props = Omit<CheckableInputProps, "inputType">;
3
3
  declare const CheckboxInput: ({ label, indeterminate, ...checkboxProps }: Props) => JSX.Element;
4
4
  export default CheckboxInput;
@@ -9,7 +9,7 @@ export declare const ChipType: {
9
9
  readonly NEGATIVE: "negative";
10
10
  readonly POSITIVE: "positive";
11
11
  };
12
- export declare type Props = PropsWithSpread<{
12
+ export type Props = PropsWithSpread<{
13
13
  /**
14
14
  * The appearance of the chip.
15
15
  */
@@ -1,5 +1,5 @@
1
1
  import type { ClassName } from "../../types";
2
- export declare type Props = {
2
+ export type Props = {
3
3
  children: string;
4
4
  className?: ClassName;
5
5
  inline?: boolean;
@@ -1,7 +1,7 @@
1
1
  import { HTMLProps } from "react";
2
2
  import type { Props as CodeSnippetBlockProps } from "./CodeSnippetBlock";
3
3
  import type { ClassName, PropsWithSpread } from "../../types";
4
- export declare type Props = PropsWithSpread<{
4
+ export type Props = PropsWithSpread<{
5
5
  /**
6
6
  * Optional class(es) to pass to the wrapping div element.
7
7
  */
@@ -7,7 +7,7 @@ export declare const CodeSnippetBlockAppearance: {
7
7
  readonly URL: "url";
8
8
  readonly WINDOWS_PROMPT: "windowsPrompt";
9
9
  };
10
- export declare type Props = {
10
+ export type Props = {
11
11
  /**
12
12
  * The appearance of the code block.
13
13
  */
@@ -1,11 +1,11 @@
1
1
  import type { ChangeEventHandler, HTMLProps } from "react";
2
- export declare type DropdownOptionProps = {
2
+ export type DropdownOptionProps = {
3
3
  /**
4
4
  * The label of the dropdown option.
5
5
  */
6
6
  label: string;
7
7
  } & HTMLProps<HTMLOptionElement>;
8
- export declare type Props = {
8
+ export type Props = {
9
9
  /**
10
10
  * Function for handling the select value changing.
11
11
  */
@@ -1,8 +1,8 @@
1
1
  import type { ElementType, HTMLProps, ReactNode } from "react";
2
2
  import type { ClassName, PropsWithSpread } from "../../types";
3
- export declare type ColSize = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
3
+ export type ColSize = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
4
4
  export declare const colSizes: ColSize[];
5
- export declare type Props = PropsWithSpread<{
5
+ export type Props = PropsWithSpread<{
6
6
  /**
7
7
  * The content of the column.
8
8
  */
@@ -11,7 +11,7 @@ export declare enum Label {
11
11
  * The props for the ContextualMenu component.
12
12
  * @template L - The type of the link props.
13
13
  */
14
- export declare type Props<L> = PropsWithSpread<{
14
+ export type Props<L> = PropsWithSpread<{
15
15
  /**
16
16
  * Whether the menu should adjust to fit in the screen.
17
17
  */
@@ -8,13 +8,13 @@ export declare enum Label {
8
8
  * The type of the menu links.
9
9
  * @template L - The type of the link props.
10
10
  */
11
- export declare type MenuLink<L = null> = string | ButtonProps<L> | ButtonProps<L>[];
12
- export declare type Position = "left" | "center" | "right";
11
+ export type MenuLink<L = null> = string | ButtonProps<L> | ButtonProps<L>[];
12
+ export type Position = "left" | "center" | "right";
13
13
  /**
14
14
  * The props for the ContextualMenuDropdown component.
15
15
  * @template L - The type of the link props.
16
16
  */
17
- export declare type Props<L = null> = {
17
+ export type Props<L = null> = {
18
18
  adjustedPosition?: Position;
19
19
  autoAdjust?: boolean;
20
20
  closePortal?: (evt?: MouseEvent) => void;
@@ -3,7 +3,7 @@ import type { ClassName } from "../../types";
3
3
  /**
4
4
  * The props for the Field component.
5
5
  */
6
- export declare type Props = {
6
+ export type Props = {
7
7
  /**
8
8
  * The content for caution validation.
9
9
  */
@@ -31,7 +31,7 @@ export declare type Props = {
31
31
  /**
32
32
  * Optional class(es) to pass to the help text element.
33
33
  */
34
- helpClassName?: ReactNode;
34
+ helpClassName?: string;
35
35
  /**
36
36
  * An id to give to the help element.
37
37
  */
@@ -1,6 +1,6 @@
1
1
  import type { HTMLProps, ReactNode } from "react";
2
2
  import type { ClassName, PropsWithSpread } from "../../types";
3
- export declare type Props = PropsWithSpread<{
3
+ export type Props = PropsWithSpread<{
4
4
  /**
5
5
  * The content of the form.
6
6
  */
@@ -33,7 +33,7 @@ export declare const ICONS: {
33
33
  readonly rss: "rss";
34
34
  readonly email: "email";
35
35
  };
36
- export declare type Props = PropsWithSpread<{
36
+ export type Props = PropsWithSpread<{
37
37
  /**
38
38
  * Optional classes to add to the icon element.
39
39
  */
@@ -3,7 +3,7 @@ import type { ClassName, PropsWithSpread } from "../../types";
3
3
  /**
4
4
  * The props for the Input component.
5
5
  */
6
- export declare type Props = PropsWithSpread<{
6
+ export type Props = PropsWithSpread<{
7
7
  /**
8
8
  * The content for caution validation.
9
9
  */
@@ -82,7 +82,7 @@ var Input = function Input(_ref) {
82
82
  inputRef.current.focus();
83
83
  }
84
84
  }
85
- }, [takeFocus]);
85
+ }, [takeFocus, takeFocusDelay]);
86
86
  var input;
87
87
 
88
88
  if (type === "checkbox") {
@@ -109,7 +109,7 @@ var Input = function Input(_ref) {
109
109
  error: error,
110
110
  forId: id,
111
111
  help: help,
112
- helpClassName: helpClassName,
112
+ helpClassName: helpClassName + "",
113
113
  helpId: helpId,
114
114
  isTickElement: type === "checkbox" || type === "radio",
115
115
  label: fieldLabel,
@@ -3,7 +3,7 @@ import type { ClassName, PropsWithSpread } from "../../types";
3
3
  /**
4
4
  * The props for the Label component.
5
5
  */
6
- export declare type Props = PropsWithSpread<{
6
+ export type Props = PropsWithSpread<{
7
7
  /**
8
8
  * The label content.
9
9
  */
@@ -1,6 +1,6 @@
1
1
  import type { HTMLProps, ReactNode } from "react";
2
2
  import type { ClassName, PropsWithSpread } from "../../types";
3
- export declare type Props = PropsWithSpread<{
3
+ export type Props = PropsWithSpread<{
4
4
  /**
5
5
  * The content of the link.
6
6
  */
@@ -1,14 +1,14 @@
1
1
  import type { HTMLProps, ReactNode } from "react";
2
2
  import type { ClassName, Headings } from "../../types";
3
- export declare type ListItem = ReactNode | ({
3
+ export type ListItem = ReactNode | ({
4
4
  content: ReactNode;
5
5
  } & HTMLProps<HTMLLIElement>);
6
- export declare type SteppedListItem = {
6
+ export type SteppedListItem = {
7
7
  content: ReactNode;
8
8
  title: ReactNode;
9
9
  titleElement?: Headings;
10
- } & HTMLProps<HTMLLIElement>;
11
- export declare type Props = {
10
+ } & Omit<HTMLProps<HTMLLIElement>, "title" | "content">;
11
+ export type Props = {
12
12
  /**
13
13
  * Optional class(es) to pass to the wrapping element.
14
14
  */
@@ -62,7 +62,7 @@ var generateItems = function generateItems(_ref) {
62
62
  if (stepped) {
63
63
  body = /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(TitleComponent, {
64
64
  className: "p-stepped-list__title"
65
- }, title), /*#__PURE__*/_react.default.createElement("p", {
65
+ }, title), /*#__PURE__*/_react.default.createElement("div", {
66
66
  className: "p-stepped-list__content"
67
67
  }, content));
68
68
  } else {
@@ -2,7 +2,7 @@ import type { HTMLProps, ReactNode } from "react";
2
2
  import type { ClassName, PropsWithSpread, SortDirection } from "../../types";
3
3
  import type { TableProps } from "../Table";
4
4
  import type { TableCellProps } from "../TableCell";
5
- export declare type MainTableHeader = PropsWithSpread<{
5
+ export type MainTableHeader = PropsWithSpread<{
6
6
  /**
7
7
  * The content of the table header.
8
8
  */
@@ -20,13 +20,13 @@ export declare type MainTableHeader = PropsWithSpread<{
20
20
  */
21
21
  heading?: string;
22
22
  }, HTMLProps<HTMLTableHeaderCellElement>>;
23
- export declare type MainTableCell = PropsWithSpread<{
23
+ export type MainTableCell = PropsWithSpread<{
24
24
  /**
25
25
  * The content of the table cell.
26
26
  */
27
27
  content?: ReactNode;
28
28
  }, Omit<TableCellProps, "children">>;
29
- export declare type MainTableRow = PropsWithSpread<{
29
+ export type MainTableRow = PropsWithSpread<{
30
30
  /**
31
31
  * Optional class(es) to apply to the row.
32
32
  */
@@ -53,7 +53,7 @@ export declare type MainTableRow = PropsWithSpread<{
53
53
  */
54
54
  sortData?: Record<string, unknown>;
55
55
  }, HTMLProps<HTMLTableRowElement>>;
56
- export declare type Props = PropsWithSpread<{
56
+ export type Props = PropsWithSpread<{
57
57
  /**
58
58
  * The default key to sort the rows by.
59
59
  */
@@ -1,7 +1,7 @@
1
1
  import { ReactElement } from "react";
2
2
  import type { HTMLProps, ReactNode } from "react";
3
3
  import { ClassName, PropsWithSpread } from "../../types";
4
- export declare type Props = PropsWithSpread<{
4
+ export type Props = PropsWithSpread<{
5
5
  /**
6
6
  * Buttons to display underneath the main modal content.
7
7
  */
@@ -2,7 +2,7 @@ import { ReactNode, HTMLProps } from "react";
2
2
  import { TableCellProps, TableHeaderProps, TableRowProps } from "react-table";
3
3
  import type { Column, UseTableOptions, Cell, Row, HeaderGroup } from "react-table";
4
4
  import { PropsWithSpread } from "../../types";
5
- export declare type Props<D extends Record<string, unknown>> = PropsWithSpread<{
5
+ export type Props<D extends Record<string, unknown>> = PropsWithSpread<{
6
6
  /**
7
7
  * The columns of the table.
8
8
  */
@@ -3,7 +3,7 @@ import type { GenerateLink, NavItem, LogoProps } from "./types";
3
3
  import { PropsWithSpread, SubComponentProps } from "../../types";
4
4
  import { SearchBoxProps } from "../SearchBox";
5
5
  import { Theme } from "../../enums";
6
- export declare type Props = PropsWithSpread<{
6
+ export type Props = PropsWithSpread<{
7
7
  /**
8
8
  * By default the header is constrained to the width of the grid. Use this
9
9
  * option to make the header take the full width of the page.
@@ -1,5 +1,5 @@
1
1
  import type { GenerateLink, NavLink } from "../types";
2
- declare type Props = {
2
+ type Props = {
3
3
  generateLink?: GenerateLink;
4
4
  link: NavLink;
5
5
  };
@@ -1,7 +1,7 @@
1
1
  import type { HTMLProps } from "react";
2
2
  import type { GenerateLink, NavMenu } from "../types";
3
3
  import { PropsWithSpread } from "../../../types";
4
- declare type Props = PropsWithSpread<NavMenu & {
4
+ type Props = PropsWithSpread<NavMenu & {
5
5
  generateLink?: GenerateLink;
6
6
  }, HTMLProps<HTMLLIElement>>;
7
7
  /**
@@ -1,6 +1,6 @@
1
1
  import type { HTMLAttributes, HTMLProps, ReactNode } from "react";
2
2
  import { PropsWithSpread } from "../../types";
3
- export declare type NavLinkBase = {
3
+ export type NavLinkBase = {
4
4
  /**
5
5
  * Whether this nav item is currently selected.
6
6
  */
@@ -14,14 +14,14 @@ export declare type NavLinkBase = {
14
14
  */
15
15
  url?: string;
16
16
  };
17
- export declare type NavLinkAnchor = PropsWithSpread<NavLinkBase & {
17
+ export type NavLinkAnchor = PropsWithSpread<NavLinkBase & {
18
18
  url: string;
19
19
  }, HTMLAttributes<HTMLAnchorElement>>;
20
- export declare type NavLinkButton = PropsWithSpread<NavLinkBase & {
20
+ export type NavLinkButton = PropsWithSpread<NavLinkBase & {
21
21
  url?: never;
22
22
  }, HTMLAttributes<HTMLButtonElement>>;
23
- export declare type NavLink = NavLinkAnchor | NavLinkButton;
24
- export declare type NavMenu = {
23
+ export type NavLink = NavLinkAnchor | NavLinkButton;
24
+ export type NavMenu = {
25
25
  /**
26
26
  * Whether to align the dropdown to the right edge of the navigation item.
27
27
  */
@@ -38,13 +38,13 @@ export declare type NavMenu = {
38
38
  /**
39
39
  * Navigation items which can be either a link or a menu containing links.
40
40
  */
41
- export declare type NavItem = NavLink | NavMenu;
41
+ export type NavItem = NavLink | NavMenu;
42
42
  /**
43
43
  * A function that can be used to generate link elements when you don't want to
44
44
  * use a standard HTML anchor.
45
45
  */
46
- export declare type GenerateLink = (item: NavLink) => ReactNode;
47
- export declare type LogoProps = PropsWithSpread<{
46
+ export type GenerateLink = (item: NavLink) => ReactNode;
47
+ export type LogoProps = PropsWithSpread<{
48
48
  /**
49
49
  * An icon to display in the tag.
50
50
  */
@@ -9,14 +9,14 @@ export declare const NotificationSeverity: {
9
9
  readonly NEGATIVE: "negative";
10
10
  readonly POSITIVE: "positive";
11
11
  };
12
- declare type NotificationAction = {
12
+ type NotificationAction = {
13
13
  label: string;
14
14
  onClick: () => void;
15
15
  };
16
16
  /**
17
17
  * The props for the Notification component.
18
18
  */
19
- export declare type Props = PropsWithSpread<{
19
+ export type Props = PropsWithSpread<{
20
20
  /**
21
21
  * A list of up to two actions that the notification can perform.
22
22
  */
@@ -1,6 +1,6 @@
1
1
  import type { HTMLProps } from "react";
2
2
  import type { PropsWithSpread } from "../../types";
3
- export declare type Props = PropsWithSpread<{
3
+ export type Props = PropsWithSpread<{
4
4
  /**
5
5
  * The current page being viewed.
6
6
  */
@@ -3,8 +3,8 @@ export declare enum Label {
3
3
  Next = "Next page",
4
4
  Previous = "Previous page"
5
5
  }
6
- export declare type PaginationDirection = "forward" | "back";
7
- export declare type Props = {
6
+ export type PaginationDirection = "forward" | "back";
7
+ export type Props = {
8
8
  /**
9
9
  * The direction of the pagination.
10
10
  */
@@ -1,5 +1,5 @@
1
1
  import type { MouseEventHandler } from "react";
2
- export declare type Props = {
2
+ export type Props = {
3
3
  /**
4
4
  * Whether the pagination item is active, i.e. the current page is this page.
5
5
  */
@@ -8,7 +8,7 @@ export declare enum Label {
8
8
  /**
9
9
  * The props for the Password Toggle component.
10
10
  */
11
- export declare type Props = PropsWithSpread<{
11
+ export type Props = PropsWithSpread<{
12
12
  /**
13
13
  * The content for caution validation.
14
14
  */
@@ -1,4 +1,4 @@
1
1
  import type { CheckableInputProps } from "../CheckboxInput/CheckableInput";
2
- export declare type Props = Omit<CheckableInputProps, "inputType">;
2
+ export type Props = Omit<CheckableInputProps, "inputType">;
3
3
  declare const RadioInput: ({ label, ...radioProps }: Props) => JSX.Element;
4
4
  export default RadioInput;
@@ -1,6 +1,6 @@
1
1
  import type { HTMLProps, ReactNode } from "react";
2
2
  import type { ClassName, PropsWithSpread } from "../../types";
3
- export declare type Props = PropsWithSpread<{
3
+ export type Props = PropsWithSpread<{
4
4
  /**
5
5
  * The content of the row.
6
6
  */
@@ -1,5 +1,5 @@
1
1
  import type { SearchAndFilterChip, SearchAndFilterData } from "../types";
2
- export declare type Props = {
2
+ export type Props = {
3
3
  /**
4
4
  * The chip data to display in the panel.
5
5
  */
@@ -4,7 +4,7 @@ export declare enum Label {
4
4
  Clear = "Clear input",
5
5
  SearchAndFilter = "Search and filter"
6
6
  }
7
- export declare type Props = {
7
+ export type Props = {
8
8
  /**
9
9
  * A list of chips to initialise inside the input.
10
10
  */
@@ -1,10 +1,10 @@
1
- export declare type SearchAndFilterChip = {
1
+ export type SearchAndFilterChip = {
2
2
  id?: number;
3
3
  lead?: string;
4
4
  quoteValue?: boolean;
5
5
  value: string;
6
6
  };
7
- export declare type SearchAndFilterData = {
7
+ export type SearchAndFilterData = {
8
8
  id: number;
9
9
  chips?: SearchAndFilterChip[];
10
10
  heading?: string;
@@ -4,7 +4,7 @@ export declare enum Label {
4
4
  Clear = "Clear search field",
5
5
  Search = "Search"
6
6
  }
7
- export declare type Props = PropsWithSpread<{
7
+ export type Props = PropsWithSpread<{
8
8
  /**
9
9
  * Whether autocomplete should be enabled for the search input.
10
10
  */
@@ -29,10 +29,18 @@ export declare type Props = PropsWithSpread<{
29
29
  * A function that is called when the user clicks the search icon
30
30
  */
31
31
  onSearch?: () => void;
32
+ /**
33
+ * A function that is called when the user clicks the reset icon
34
+ */
35
+ onClear?: () => void;
32
36
  /**
33
37
  * A search input placeholder message.
34
38
  */
35
39
  placeholder?: string;
40
+ /**
41
+ * Whether the search input should receive focus after pressing the reset button
42
+ */
43
+ shouldRefocusAfterReset?: boolean;
36
44
  /**
37
45
  * A ref that is passed to the input element.
38
46
  */
@@ -42,5 +50,5 @@ export declare type Props = PropsWithSpread<{
42
50
  */
43
51
  value?: string;
44
52
  }, HTMLProps<HTMLInputElement>>;
45
- declare const SearchBox: React.ForwardRefExoticComponent<Pick<Props, "content" | "title" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "pattern" | "children" | "className" | "key" | "list" | "role" | "id" | "onClick" | "type" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "default" | "defer" | "disabled" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "method" | "min" | "minLength" | "multiple" | "muted" | "name" | "nonce" | "noValidate" | "open" | "optimum" | "placeholder" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "size" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "target" | "useMap" | "value" | "width" | "wmode" | "wrap" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "lang" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "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" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "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" | "externallyControlled" | "autocomplete" | "onSearch"> & React.RefAttributes<HTMLInputElement>>;
53
+ declare const SearchBox: React.ForwardRefExoticComponent<Omit<Props, "ref"> & React.RefAttributes<HTMLInputElement>>;
46
54
  export default SearchBox;
@@ -13,7 +13,7 @@ var _react = _interopRequireWildcard(require("react"));
13
13
 
14
14
  var _Icon = _interopRequireDefault(require("../Icon"));
15
15
 
16
- var _excluded = ["autocomplete", "className", "disabled", "externallyControlled", "onChange", "onSearch", "placeholder", "value"];
16
+ var _excluded = ["autocomplete", "className", "disabled", "externallyControlled", "onChange", "onSearch", "onClear", "placeholder", "shouldRefocusAfterReset", "value"];
17
17
 
18
18
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
19
19
 
@@ -43,18 +43,22 @@ var SearchBox = /*#__PURE__*/_react.default.forwardRef(function (_ref, forwarded
43
43
  externallyControlled = _ref.externallyControlled,
44
44
  _onChange = _ref.onChange,
45
45
  onSearch = _ref.onSearch,
46
+ onClear = _ref.onClear,
46
47
  _ref$placeholder = _ref.placeholder,
47
48
  placeholder = _ref$placeholder === void 0 ? "Search" : _ref$placeholder,
49
+ shouldRefocusAfterReset = _ref.shouldRefocusAfterReset,
48
50
  value = _ref.value,
49
51
  props = _objectWithoutProperties(_ref, _excluded);
50
52
 
51
53
  var internalRef = (0, _react.useRef)();
52
54
 
53
55
  var resetInput = function resetInput() {
54
- _onChange && _onChange("");
56
+ _onChange === null || _onChange === void 0 ? void 0 : _onChange("");
57
+ onClear === null || onClear === void 0 ? void 0 : onClear();
55
58
 
56
59
  if (internalRef.current) {
57
60
  internalRef.current.value = "";
61
+ if (shouldRefocusAfterReset) internalRef.current.focus();
58
62
  }
59
63
  };
60
64
 
@@ -74,7 +78,7 @@ var SearchBox = /*#__PURE__*/_react.default.forwardRef(function (_ref, forwarded
74
78
  id: "search",
75
79
  name: "search",
76
80
  onChange: function onChange(evt) {
77
- return _onChange(evt.target.value);
81
+ return _onChange === null || _onChange === void 0 ? void 0 : _onChange(evt.target.value);
78
82
  },
79
83
  placeholder: placeholder,
80
84
  ref: function ref(input) {
@@ -1,10 +1,10 @@
1
1
  import type { ChangeEventHandler, ReactNode, OptionHTMLAttributes, SelectHTMLAttributes } from "react";
2
2
  import type { ClassName, PropsWithSpread } from "../../types";
3
- declare type Option = OptionHTMLAttributes<HTMLOptionElement>;
3
+ type Option = OptionHTMLAttributes<HTMLOptionElement>;
4
4
  /**
5
5
  * The props for the Select component.
6
6
  */
7
- export declare type Props = PropsWithSpread<{
7
+ export type Props = PropsWithSpread<{
8
8
  /**
9
9
  * The content for caution validation.
10
10
  */
@@ -2,7 +2,7 @@ import type { ChangeEventHandler, HTMLProps, ReactNode } from "react";
2
2
  import type { PropsWithSpread } from "../../types";
3
3
  export declare const FILLED_COLOR = "#0066CC";
4
4
  export declare const EMPTY_COLOR = "#D9D9D9";
5
- export declare type Props = PropsWithSpread<{
5
+ export type Props = PropsWithSpread<{
6
6
  /**
7
7
  * Field caution message.
8
8
  */
@@ -1,6 +1,6 @@
1
1
  import { HTMLProps } from "react";
2
2
  import type { ClassName } from "../../types";
3
- export declare type Props = {
3
+ export type Props = {
4
4
  /**
5
5
  * Optional class(es) to pass to the wrapping span element.
6
6
  */
@@ -10,7 +10,7 @@ export declare const StatusLabelAppearance: {
10
10
  /**
11
11
  * The type of the StatusLabel props.
12
12
  */
13
- export declare type Props = PropsWithSpread<{
13
+ export type Props = PropsWithSpread<{
14
14
  /**
15
15
  * The appearance of the label.
16
16
  */
@@ -1,7 +1,7 @@
1
1
  import type { ElementType, HTMLProps, ReactNode } from "react";
2
2
  import type { ColSize } from "../Col/Col";
3
3
  import type { ClassName, PropsWithSpread } from "../../types";
4
- export declare type Props = PropsWithSpread<{
4
+ export type Props = PropsWithSpread<{
5
5
  /**
6
6
  * The content of the strip.
7
7
  */
@@ -1,6 +1,6 @@
1
1
  import type { MouseEventHandler } from "react";
2
2
  import type { ClassName } from "../../types";
3
- export declare type Props = {
3
+ export type Props = {
4
4
  /**
5
5
  * Optional class(es) to pass to the wrapping element.
6
6
  */
@@ -1,6 +1,6 @@
1
1
  import type { HTMLProps, ReactNode } from "react";
2
2
  import type { PropsWithSpread } from "../../types";
3
- export declare type Props = PropsWithSpread<{
3
+ export type Props = PropsWithSpread<{
4
4
  /**
5
5
  * The label name for the switch
6
6
  */
@@ -1,6 +1,6 @@
1
1
  import { HTMLProps, ReactNode } from "react";
2
2
  import type { ClassName, PropsWithSpread } from "../../types";
3
- export declare type Props = PropsWithSpread<{
3
+ export type Props = PropsWithSpread<{
4
4
  /**
5
5
  * The content of the table.
6
6
  */
@@ -1,6 +1,6 @@
1
1
  import { HTMLProps, ReactNode } from "react";
2
2
  import type { ClassName, PropsWithSpread } from "../../types";
3
- export declare type Props = PropsWithSpread<{
3
+ export type Props = PropsWithSpread<{
4
4
  /**
5
5
  * The content of the table cell.
6
6
  */
@@ -1,6 +1,6 @@
1
1
  import { HTMLProps, ReactNode } from "react";
2
2
  import { PropsWithSpread, SortDirection } from "../../types";
3
- export declare type Props = PropsWithSpread<{
3
+ export type Props = PropsWithSpread<{
4
4
  /**
5
5
  * The content of the table header.
6
6
  */
@@ -1,6 +1,6 @@
1
1
  import type { HTMLProps, ReactNode } from "react";
2
2
  import type { PropsWithSpread } from "../../types";
3
- export declare type Props = PropsWithSpread<{
3
+ export type Props = PropsWithSpread<{
4
4
  /**
5
5
  * The content of the table row.
6
6
  */
@@ -1,6 +1,6 @@
1
1
  import type { HTMLProps, ElementType, ReactNode, ComponentType } from "react";
2
2
  import type { ClassName } from "../../types";
3
- export declare type TabLink<P = null> = {
3
+ export type TabLink<P = null> = {
4
4
  /**
5
5
  * Whether the tab link should have active styling.
6
6
  */
@@ -22,7 +22,7 @@ export declare type TabLink<P = null> = {
22
22
  */
23
23
  listItemClassName?: string;
24
24
  } & (HTMLProps<HTMLElement> | P);
25
- export declare type Props<P = null> = {
25
+ export type Props<P = null> = {
26
26
  /**
27
27
  * Optional classes applied to the parent "nav" element.
28
28
  */
@@ -3,7 +3,7 @@ import type { ClassName, PropsWithSpread } from "../../types";
3
3
  /**
4
4
  * The props for the Textarea component.
5
5
  */
6
- export declare type Props = PropsWithSpread<{
6
+ export type Props = PropsWithSpread<{
7
7
  /**
8
8
  * The content for caution validation.
9
9
  */
@@ -1,8 +1,8 @@
1
1
  import type { ReactNode } from "react";
2
2
  import type { WindowFitment } from "../../hooks";
3
3
  import type { ClassName, ValueOf } from "../../types";
4
- export declare type CSSPosition = "static" | "absolute" | "fixed" | "relative" | "sticky" | "initial" | "inherit";
5
- export declare type PositionStyle = {
4
+ export type CSSPosition = "static" | "absolute" | "fixed" | "relative" | "sticky" | "initial" | "inherit";
5
+ export type PositionStyle = {
6
6
  left: number;
7
7
  pointerEvents?: string;
8
8
  position: CSSPosition;
@@ -18,8 +18,8 @@ export declare const position: {
18
18
  readonly topLeft: "top-left";
19
19
  readonly topRight: "top-right";
20
20
  };
21
- export declare type Position = ValueOf<typeof position>;
22
- export declare type Props = {
21
+ export type Position = ValueOf<typeof position>;
22
+ export type Props = {
23
23
  /**
24
24
  * Whether the tooltip should adjust to fit in the screen.
25
25
  */
@@ -186,8 +186,8 @@ var Tooltip = function Tooltip(_ref) {
186
186
  position: "absolute",
187
187
  // Initially position the tooltip of the screen in case it gets shown
188
188
  // before setting the position.
189
- left: -99999999999999,
190
- top: -99999999999999
189
+ left: -9999999,
190
+ top: -9999999
191
191
  }),
192
192
  _useState4 = _slicedToArray(_useState3, 2),
193
193
  positionStyle = _useState4[0],
@@ -282,7 +282,12 @@ var Tooltip = function Tooltip(_ref) {
282
282
  "u-off-screen": !isOpen
283
283
  }, tooltipClassName),
284
284
  "data-testid": "tooltip-portal",
285
- style: positionStyle
285
+ style: positionStyle // style={
286
+ // isOpen
287
+ // ? (positionStyle as React.CSSProperties)
288
+ // : { left: -9999 }
289
+ // }
290
+
286
291
  }, /*#__PURE__*/_react.default.createElement("span", {
287
292
  role: "tooltip",
288
293
  className: "p-tooltip__message",
@@ -1,5 +1,5 @@
1
1
  export declare const THROTTLE_DELAY: number;
2
- export declare type Callback = (...args: any[]) => any;
2
+ export type Callback = (...args: any[]) => any;
3
3
  /**
4
4
  * A hook to handle throttling calls to a function.
5
5
  * @param callback The function to throttle.
@@ -1,4 +1,4 @@
1
- export declare type WindowFitment = {
1
+ export type WindowFitment = {
2
2
  fromTop: {
3
3
  fitsAbove: boolean;
4
4
  fitsBelow: boolean;
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+
3
+ // A fake module to use in place of required scss files.
4
+ module.exports = {};
@@ -2,36 +2,36 @@
2
2
  * This type should be used for all className props in order to ensure
3
3
  * consistency across components.
4
4
  */
5
- export declare type ClassName = string | null;
5
+ export type ClassName = string | null;
6
6
  /**
7
7
  * The allowable heading levels.
8
8
  */
9
- export declare type Headings = "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
9
+ export type Headings = "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
10
10
  /**
11
11
  * This type can be used when defining props that also spread the props of
12
12
  * something else. It ensures that the defined component props are never
13
13
  * overwritten by the spread props.
14
14
  */
15
- export declare type PropsWithSpread<P, H> = P & Omit<H, keyof P>;
15
+ export type PropsWithSpread<P, H> = P & Omit<H, keyof P>;
16
16
  /**
17
17
  * The allowable sort directions e.g. for a sortable table.
18
18
  */
19
- export declare type SortDirection = "none" | "ascending" | "descending";
19
+ export type SortDirection = "none" | "ascending" | "descending";
20
20
  /**
21
21
  * This type can be used when passing props to a sub component. It makes all
22
22
  * component props optional.
23
23
  */
24
- export declare type SubComponentProps<P> = Partial<P> & {
24
+ export type SubComponentProps<P> = Partial<P> & {
25
25
  [prop: string]: unknown;
26
26
  };
27
27
  /**
28
28
  * This type is simply an alias for the 'any' type and should be used sparingly,
29
29
  * if at all.
30
30
  */
31
- export declare type TSFixMe = any;
31
+ export type TSFixMe = any;
32
32
  /**
33
33
  * This type allows for converting an object const into an enum-like construct,
34
34
  * e.g. value: ValueOf<typeof EnumLike> will only allow value to be a value
35
35
  * defined in EnumLike.
36
36
  */
37
- export declare type ValueOf<T> = T[keyof T];
37
+ export type ValueOf<T> = T[keyof T];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canonical/react-components",
3
- "version": "0.38.0",
3
+ "version": "0.39.0",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "author": "Huw Wilkins <huw.wilkins@canonical.com>",
@@ -22,88 +22,88 @@
22
22
  },
23
23
  "homepage": "https://canonical.github.io/react-components",
24
24
  "devDependencies": {
25
- "@babel/cli": "7.18.9",
26
- "@babel/eslint-parser": "7.18.9",
25
+ "@babel/cli": "7.20.7",
26
+ "@babel/eslint-parser": "7.19.1",
27
27
  "@babel/preset-typescript": "7.18.6",
28
- "@percy/cli": "1.7.2",
29
- "@percy/storybook": "4.3.1",
30
- "@storybook/addon-a11y": "6.5.10",
31
- "@storybook/addon-controls": "6.5.10",
32
- "@storybook/addon-docs": "6.4.22",
33
- "@storybook/addons": "6.5.10",
34
- "@storybook/builder-webpack5": "6.5.10",
35
- "@storybook/manager-webpack5": "6.5.10",
36
- "@storybook/react": "6.5.10",
37
- "@storybook/theming": "6.5.10",
38
- "@testing-library/cypress": "8.0.3",
39
- "@testing-library/dom": "8.16.0",
40
- "@testing-library/jest-dom": "5.16.4",
28
+ "@percy/cli": "1.18.0",
29
+ "@percy/storybook": "4.3.4",
30
+ "@storybook/addon-a11y": "6.5.16",
31
+ "@storybook/addon-controls": "6.5.16",
32
+ "@storybook/addon-docs": "6.5.16",
33
+ "@storybook/addons": "6.5.16",
34
+ "@storybook/builder-webpack5": "6.5.16",
35
+ "@storybook/manager-webpack5": "6.5.16",
36
+ "@storybook/react": "6.5.16",
37
+ "@storybook/theming": "6.5.16",
38
+ "@testing-library/cypress": "8.0.7",
39
+ "@testing-library/dom": "8.20.0",
40
+ "@testing-library/jest-dom": "5.16.5",
41
41
  "@testing-library/react": "12.1.5",
42
42
  "@testing-library/react-hooks": "8.0.1",
43
- "@testing-library/user-event": "14.3.0",
44
- "@typescript-eslint/eslint-plugin": "5.32.0",
45
- "@typescript-eslint/parser": "5.32.0",
43
+ "@testing-library/user-event": "14.4.3",
44
+ "@typescript-eslint/eslint-plugin": "5.51.0",
45
+ "@typescript-eslint/parser": "5.51.0",
46
46
  "babel-jest": "27.5.1",
47
- "babel-loader": "8.2.5",
48
- "babel-plugin-module-resolver": "4.1.0",
47
+ "babel-loader": "9.1.2",
48
+ "babel-plugin-module-resolver": "5.0.0",
49
49
  "babel-plugin-typescript-to-proptypes": "2.0.0",
50
- "concurrently": "7.3.0",
51
- "css-loader": "6.7.1",
50
+ "concurrently": "7.6.0",
51
+ "css-loader": "6.7.3",
52
52
  "cypress": "9.7.0",
53
- "deepmerge": "4.2.2",
54
- "eslint": "8.21.0",
55
- "eslint-config-prettier": "8.5.0",
53
+ "deepmerge": "4.3.0",
54
+ "eslint": "8.33.0",
55
+ "eslint-config-prettier": "8.6.0",
56
56
  "eslint-config-react-app": "7.0.1",
57
57
  "eslint-plugin-cypress": "2.12.1",
58
58
  "eslint-plugin-flowtype": "8.0.3",
59
- "eslint-plugin-import": "2.26.0",
60
- "eslint-plugin-jsx-a11y": "6.6.1",
59
+ "eslint-plugin-import": "2.27.5",
60
+ "eslint-plugin-jsx-a11y": "6.7.1",
61
61
  "eslint-plugin-prettier": "4.2.1",
62
- "eslint-plugin-react": "7.30.1",
62
+ "eslint-plugin-react": "7.32.2",
63
63
  "eslint-plugin-react-hooks": "4.6.0",
64
- "eslint-plugin-testing-library": "5.6.0",
64
+ "eslint-plugin-testing-library": "5.10.0",
65
65
  "jest": "27.5.1",
66
66
  "npm-package-json-lint": "5.4.2",
67
- "prettier": "2.7.1",
67
+ "prettier": "2.8.4",
68
68
  "react": "17.0.2",
69
69
  "react-docgen-typescript-loader": "3.7.2",
70
70
  "react-dom": "17.0.2",
71
- "sass": "1.54.0",
72
- "sass-loader": "10.3.1",
71
+ "sass": "1.58.0",
72
+ "sass-loader": "10.4.1",
73
73
  "style-loader": "3.3.1",
74
- "stylelint": "14.9.1",
75
- "stylelint-config-prettier": "9.0.3",
74
+ "stylelint": "14.16.1",
75
+ "stylelint-config-prettier": "9.0.4",
76
76
  "stylelint-config-recommended-scss": "5.0.2",
77
77
  "stylelint-order": "5.0.0",
78
78
  "stylelint-prettier": "2.0.0",
79
79
  "ts-jest": "27.1.5",
80
- "tsc-alias": "1.7.0",
81
- "typescript": "4.7.4",
82
- "vanilla-framework": "3.11.0",
80
+ "tsc-alias": "1.8.2",
81
+ "typescript": "4.9.5",
82
+ "vanilla-framework": "3.11.1",
83
83
  "wait-on": "5.3.0",
84
- "webpack": "5.74.0"
84
+ "webpack": "5.75.0"
85
85
  },
86
86
  "dependencies": {
87
87
  "@types/jest": "27.5.2",
88
- "@types/node": "16.11.47",
89
- "@types/react": "17.0.48",
90
- "@types/react-dom": "17.0.17",
91
- "@types/react-table": "7.7.12",
92
- "classnames": "2.3.1",
88
+ "@types/node": "16.18.12",
89
+ "@types/react": "18.0.28",
90
+ "@types/react-dom": "17.0.18",
91
+ "@types/react-table": "7.7.14",
92
+ "classnames": "2.3.2",
93
93
  "nanoid": "3.3.4",
94
94
  "prop-types": "15.8.1",
95
95
  "react-table": "7.8.0",
96
96
  "react-useportal": "1.0.17"
97
97
  },
98
98
  "resolutions": {
99
- "@types/react": "17.0.48",
100
- "@types/react-dom": "17.0.17",
99
+ "@types/react": "18.0.28",
100
+ "@types/react-dom": "17.0.18",
101
101
  "postcss": "^8.3.11"
102
102
  },
103
103
  "peerDependencies": {
104
104
  "react": "^17.0.2 || ^18.0.0",
105
105
  "react-dom": "^17.0.2 || ^18.0.0",
106
- "vanilla-framework": "3.11.0"
106
+ "vanilla-framework": "3.11.1"
107
107
  },
108
108
  "scripts": {
109
109
  "build": "rm -rf dist && yarn build-local; yarn build-declaration",