@canonical/react-components 1.10.0 → 2.0.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.
- package/dist/components/Accordion/Accordion.d.ts +2 -2
- package/dist/components/Accordion/AccordionSection/AccordionSection.d.ts +2 -1
- package/dist/components/ActionButton/ActionButton.d.ts +2 -1
- package/dist/components/ArticlePagination/ArticlePagination.d.ts +2 -1
- package/dist/components/Badge/Badge.d.ts +2 -2
- package/dist/components/Button/Button.d.ts +2 -1
- package/dist/components/Card/Card.d.ts +2 -1
- package/dist/components/CheckboxInput/CheckableInput/CheckableInput.d.ts +2 -2
- package/dist/components/CheckboxInput/CheckboxInput.d.ts +2 -1
- package/dist/components/Chip/Chip.d.ts +2 -1
- package/dist/components/Code/Code.d.ts +2 -1
- package/dist/components/CodeSnippet/CodeSnippet.d.ts +2 -2
- package/dist/components/CodeSnippet/CodeSnippetBlock.d.ts +2 -1
- package/dist/components/CodeSnippet/CodeSnippetDropdown.d.ts +2 -1
- package/dist/components/Col/Col.d.ts +2 -1
- package/dist/components/ConfirmationButton/ConfirmationButton.d.ts +2 -2
- package/dist/components/ConfirmationModal/ConfirmationModal.d.ts +2 -2
- package/dist/components/ContextualMenu/ContextualMenu.d.ts +1 -1
- package/dist/components/ContextualMenu/ContextualMenuDropdown/ContextualMenuDropdown.d.ts +3 -3
- package/dist/components/CustomSelect/CustomSelect.d.ts +2 -1
- package/dist/components/EmptyState/EmptyState.d.ts +2 -2
- package/dist/components/Field/Field.d.ts +2 -1
- package/dist/components/Form/Form.d.ts +2 -1
- package/dist/components/FormikField/FormikField.d.ts +2 -1
- package/dist/components/Icon/Icon.d.ts +2 -1
- package/dist/components/Input/Input.d.ts +2 -1
- package/dist/components/Label/Label.d.ts +2 -1
- package/dist/components/Link/Link.d.ts +2 -1
- package/dist/components/List/List.d.ts +2 -1
- package/dist/components/Loader/Loader.d.ts +2 -1
- package/dist/components/MainTable/MainTable.d.ts +2 -1
- package/dist/components/Modal/Modal.d.ts +2 -2
- package/dist/components/ModularTable/ModularTable.d.ts +2 -2
- package/dist/components/MultiSelect/MultiSelect.js +1 -1
- package/dist/components/Navigation/Navigation.d.ts +2 -1
- package/dist/components/Navigation/Navigation.js +1 -1
- package/dist/components/Navigation/NavigationLink/NavigationLink.d.ts +2 -1
- package/dist/components/Navigation/NavigationMenu/NavigationMenu.d.ts +2 -1
- package/dist/components/Notification/Notification.d.ts +2 -2
- package/dist/components/Pagination/Pagination.d.ts +2 -1
- package/dist/components/Pagination/PaginationButton/PaginationButton.d.ts +2 -1
- package/dist/components/Pagination/PaginationItem/PaginationItem.d.ts +2 -1
- package/dist/components/RadioInput/RadioInput.d.ts +2 -1
- package/dist/components/Row/Row.d.ts +2 -1
- package/dist/components/SearchAndFilter/FilterPanelSection/FilterPanelSection.d.ts +2 -1
- package/dist/components/SearchAndFilter/SearchAndFilter.d.ts +2 -1
- package/dist/components/SearchAndFilter/SearchAndFilter.js +1 -1
- package/dist/components/SearchBox/SearchBox.d.ts +0 -4
- package/dist/components/SearchBox/SearchBox.js +1 -1
- package/dist/components/Select/Select.d.ts +2 -1
- package/dist/components/SkipLink/SkipLink.d.ts +2 -2
- package/dist/components/Slider/Slider.d.ts +2 -1
- package/dist/components/Spinner/Spinner.d.ts +2 -2
- package/dist/components/StatusLabel/StatusLabel.d.ts +2 -1
- package/dist/components/Stepper/Step/Step.d.ts +2 -1
- package/dist/components/Stepper/Stepper.d.ts +3 -3
- package/dist/components/Strip/Strip.d.ts +2 -1
- package/dist/components/SummaryButton/SummaryButton.d.ts +2 -1
- package/dist/components/Switch/Switch.d.ts +2 -1
- package/dist/components/Table/Table.d.ts +2 -2
- package/dist/components/TableCell/TableCell.d.ts +2 -2
- package/dist/components/TableHeader/TableHeader.d.ts +2 -2
- package/dist/components/TablePagination/TablePaginationControls/TablePaginationControls.d.ts +2 -2
- package/dist/components/TablePagination/utils.d.ts +3 -3
- package/dist/components/TableRow/TableRow.d.ts +2 -1
- package/dist/components/Tabs/Tabs.d.ts +2 -1
- package/dist/components/Textarea/Textarea.d.ts +2 -1
- package/dist/components/Tooltip/Tooltip.d.ts +2 -1
- package/dist/esm/components/Accordion/Accordion.d.ts +2 -2
- package/dist/esm/components/Accordion/AccordionSection/AccordionSection.d.ts +2 -1
- package/dist/esm/components/ActionButton/ActionButton.d.ts +2 -1
- package/dist/esm/components/ArticlePagination/ArticlePagination.d.ts +2 -1
- package/dist/esm/components/Badge/Badge.d.ts +2 -2
- package/dist/esm/components/Button/Button.d.ts +2 -1
- package/dist/esm/components/Card/Card.d.ts +2 -1
- package/dist/esm/components/CheckboxInput/CheckableInput/CheckableInput.d.ts +2 -2
- package/dist/esm/components/CheckboxInput/CheckboxInput.d.ts +2 -1
- package/dist/esm/components/Chip/Chip.d.ts +2 -1
- package/dist/esm/components/Code/Code.d.ts +2 -1
- package/dist/esm/components/CodeSnippet/CodeSnippet.d.ts +2 -2
- package/dist/esm/components/CodeSnippet/CodeSnippetBlock.d.ts +2 -1
- package/dist/esm/components/CodeSnippet/CodeSnippetDropdown.d.ts +2 -1
- package/dist/esm/components/Col/Col.d.ts +2 -1
- package/dist/esm/components/ConfirmationButton/ConfirmationButton.d.ts +2 -2
- package/dist/esm/components/ConfirmationModal/ConfirmationModal.d.ts +2 -2
- package/dist/esm/components/ContextualMenu/ContextualMenu.d.ts +1 -1
- package/dist/esm/components/ContextualMenu/ContextualMenuDropdown/ContextualMenuDropdown.d.ts +3 -3
- package/dist/esm/components/CustomSelect/CustomSelect.d.ts +2 -1
- package/dist/esm/components/EmptyState/EmptyState.d.ts +2 -2
- package/dist/esm/components/Field/Field.d.ts +2 -1
- package/dist/esm/components/Form/Form.d.ts +2 -1
- package/dist/esm/components/FormikField/FormikField.d.ts +2 -1
- package/dist/esm/components/Icon/Icon.d.ts +2 -1
- package/dist/esm/components/Input/Input.d.ts +2 -1
- package/dist/esm/components/Label/Label.d.ts +2 -1
- package/dist/esm/components/Link/Link.d.ts +2 -1
- package/dist/esm/components/List/List.d.ts +2 -1
- package/dist/esm/components/Loader/Loader.d.ts +2 -1
- package/dist/esm/components/MainTable/MainTable.d.ts +2 -1
- package/dist/esm/components/Modal/Modal.d.ts +2 -2
- package/dist/esm/components/ModularTable/ModularTable.d.ts +2 -2
- package/dist/esm/components/MultiSelect/MultiSelect.js +1 -1
- package/dist/esm/components/Navigation/Navigation.d.ts +2 -1
- package/dist/esm/components/Navigation/Navigation.js +1 -1
- package/dist/esm/components/Navigation/NavigationLink/NavigationLink.d.ts +2 -1
- package/dist/esm/components/Navigation/NavigationMenu/NavigationMenu.d.ts +2 -1
- package/dist/esm/components/Notification/Notification.d.ts +2 -2
- package/dist/esm/components/Pagination/Pagination.d.ts +2 -1
- package/dist/esm/components/Pagination/PaginationButton/PaginationButton.d.ts +2 -1
- package/dist/esm/components/Pagination/PaginationItem/PaginationItem.d.ts +2 -1
- package/dist/esm/components/RadioInput/RadioInput.d.ts +2 -1
- package/dist/esm/components/Row/Row.d.ts +2 -1
- package/dist/esm/components/SearchAndFilter/FilterPanelSection/FilterPanelSection.d.ts +2 -1
- package/dist/esm/components/SearchAndFilter/SearchAndFilter.d.ts +2 -1
- package/dist/esm/components/SearchAndFilter/SearchAndFilter.js +1 -1
- package/dist/esm/components/SearchBox/SearchBox.d.ts +0 -4
- package/dist/esm/components/SearchBox/SearchBox.js +1 -1
- package/dist/esm/components/Select/Select.d.ts +2 -1
- package/dist/esm/components/SkipLink/SkipLink.d.ts +2 -2
- package/dist/esm/components/Slider/Slider.d.ts +2 -1
- package/dist/esm/components/Spinner/Spinner.d.ts +2 -2
- package/dist/esm/components/StatusLabel/StatusLabel.d.ts +2 -1
- package/dist/esm/components/Stepper/Step/Step.d.ts +2 -1
- package/dist/esm/components/Stepper/Stepper.d.ts +3 -3
- package/dist/esm/components/Strip/Strip.d.ts +2 -1
- package/dist/esm/components/SummaryButton/SummaryButton.d.ts +2 -1
- package/dist/esm/components/Switch/Switch.d.ts +2 -1
- package/dist/esm/components/Table/Table.d.ts +2 -2
- package/dist/esm/components/TableCell/TableCell.d.ts +2 -2
- package/dist/esm/components/TableHeader/TableHeader.d.ts +2 -2
- package/dist/esm/components/TablePagination/TablePaginationControls/TablePaginationControls.d.ts +2 -2
- package/dist/esm/components/TablePagination/utils.d.ts +3 -3
- package/dist/esm/components/TableRow/TableRow.d.ts +2 -1
- package/dist/esm/components/Tabs/Tabs.d.ts +2 -1
- package/dist/esm/components/Textarea/Textarea.d.ts +2 -1
- package/dist/esm/components/Tooltip/Tooltip.d.ts +2 -1
- package/dist/esm/hooks/useThrottle.js +2 -2
- package/dist/hooks/useThrottle.js +2 -2
- package/package.json +15 -22
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { HTMLProps } from "react";
|
|
2
|
+
import React from "react";
|
|
2
3
|
import type { ClassName, PropsWithSpread, ValueOf } from "../../types";
|
|
3
4
|
export declare const ICONS: {
|
|
4
5
|
readonly anchor: "anchor";
|
|
@@ -55,5 +56,5 @@ export type Props = PropsWithSpread<{
|
|
|
55
56
|
* @param name One of built-in Vanilla icons or a name of a custom icon that follows `p-icon--{name}` convention.
|
|
56
57
|
* @returns Icon
|
|
57
58
|
*/
|
|
58
|
-
declare const Icon: ({ className, light, name, ...props }: Props) => JSX.Element;
|
|
59
|
+
declare const Icon: ({ className, light, name, ...props }: Props) => React.JSX.Element;
|
|
59
60
|
export default Icon;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import type { InputHTMLAttributes, 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
|
* An input field where the user can enter data, which can vary in many ways, depending on the type attribute.
|
|
68
69
|
*/
|
|
69
|
-
declare const Input: ({ caution, className, error, help, helpClassName, id, label, labelClassName, required, stacked, success, takeFocus, takeFocusDelay, type, wrapperClassName, ...inputProps }: Props) => JSX.Element;
|
|
70
|
+
declare const Input: ({ caution, className, error, help, helpClassName, id, label, labelClassName, required, stacked, success, takeFocus, takeFocusDelay, type, wrapperClassName, ...inputProps }: Props) => React.JSX.Element;
|
|
70
71
|
export default Input;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import type { LabelHTMLAttributes, ReactNode } from "react";
|
|
2
3
|
import type { ClassName, PropsWithSpread } from "../../types";
|
|
3
4
|
/**
|
|
@@ -21,5 +22,5 @@ export type Props = PropsWithSpread<{
|
|
|
21
22
|
*/
|
|
22
23
|
required?: boolean;
|
|
23
24
|
}, LabelHTMLAttributes<HTMLLabelElement>>;
|
|
24
|
-
declare const Label: ({ children, className, forId, required, ...props }: Props) => JSX.Element;
|
|
25
|
+
declare const Label: ({ children, className, forId, required, ...props }: Props) => React.JSX.Element;
|
|
25
26
|
export default Label;
|
|
@@ -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<{
|
|
@@ -27,5 +28,5 @@ export type Props = PropsWithSpread<{
|
|
|
27
28
|
*
|
|
28
29
|
* Links are used to embed actions or pathways to more information, allowing users to click their way from page to page.
|
|
29
30
|
*/
|
|
30
|
-
declare const Link: ({ children, className, href, inverted, soft, top, ...props }: Props) => JSX.Element;
|
|
31
|
+
declare const Link: ({ children, className, href, inverted, soft, top, ...props }: Props) => React.JSX.Element;
|
|
31
32
|
export default Link;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import type { HTMLProps, ReactNode } from "react";
|
|
2
3
|
import { ClassName, Headings, PropsWithSpread } from "../../types";
|
|
3
4
|
export type ListItem = ReactNode | PropsWithSpread<{
|
|
@@ -32,5 +33,5 @@ export type Props = {
|
|
|
32
33
|
*
|
|
33
34
|
* If you want to display lists in a way that is more visually distinctive than the standard `<ol>` and `<ul>`, we have 7 list styles at your disposal.
|
|
34
35
|
*/
|
|
35
|
-
declare const List: ({ className, detailed, divided, inline, isDark, items, middot, stretch, split, stepped, ticked, ...props }: Props) => JSX.Element;
|
|
36
|
+
declare const List: ({ className, detailed, divided, inline, isDark, items, middot, stretch, split, stepped, ticked, ...props }: Props) => React.JSX.Element;
|
|
36
37
|
export default List;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import type { SpinnerProps } from "../Spinner";
|
|
2
3
|
/**
|
|
3
4
|
* @deprecated Loader component is deprecated. Use Spinner component instead.
|
|
4
5
|
*/
|
|
5
|
-
declare const Loader: (props: SpinnerProps) => JSX.Element;
|
|
6
|
+
declare const Loader: (props: SpinnerProps) => React.JSX.Element;
|
|
6
7
|
export default Loader;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import type { HTMLProps, ReactNode } from "react";
|
|
2
3
|
import type { ClassName, PropsWithSpread, SortDirection } from "../../types";
|
|
3
4
|
import type { TableProps } from "../Table";
|
|
@@ -98,5 +99,5 @@ export type Props = PropsWithSpread<{
|
|
|
98
99
|
/**
|
|
99
100
|
* This is a [React](https://reactjs.org/) component to support many table use cases.
|
|
100
101
|
*/
|
|
101
|
-
declare const MainTable: ({ defaultSort, defaultSortDirection, emptyStateMsg, expanding, headers, onUpdateSort, paginate, rows, responsive, sortable, sortFunction, hiddenCaption, ...props }: Props) => JSX.Element;
|
|
102
|
+
declare const MainTable: ({ defaultSort, defaultSortDirection, emptyStateMsg, expanding, headers, onUpdateSort, paginate, rows, responsive, sortable, sortFunction, hiddenCaption, ...props }: Props) => React.JSX.Element;
|
|
102
103
|
export default MainTable;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from "react";
|
|
2
2
|
import type { HTMLProps, ReactNode } from "react";
|
|
3
3
|
import { ClassName, PropsWithSpread } from "../../types";
|
|
4
4
|
export type Props = PropsWithSpread<{
|
|
@@ -36,5 +36,5 @@ export type Props = PropsWithSpread<{
|
|
|
36
36
|
*
|
|
37
37
|
* The modal component can be used to overlay an area of the screen which can contain a prompt, dialog or interaction.
|
|
38
38
|
*/
|
|
39
|
-
export declare const Modal: ({ buttonRow, children, className, close, title, shouldPropagateClickEvent, closeOnOutsideClick, ...wrapperProps }: Props) =>
|
|
39
|
+
export declare const Modal: ({ buttonRow, children, className, close, title, shouldPropagateClickEvent, closeOnOutsideClick, ...wrapperProps }: Props) => React.JSX.Element;
|
|
40
40
|
export default Modal;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode, HTMLProps } from "react";
|
|
1
|
+
import React, { 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";
|
|
@@ -101,5 +101,5 @@ columns = {
|
|
|
101
101
|
};
|
|
102
102
|
```
|
|
103
103
|
*/
|
|
104
|
-
declare function ModularTable<D extends Record<string, unknown>>({ data, columns, emptyMsg, footer, sortable, getHeaderProps, getRowProps, getCellProps, getRowId, initialSortColumn, initialSortDirection, autoResetSortBy, ...props }: Props<D>): JSX.Element;
|
|
104
|
+
declare function ModularTable<D extends Record<string, unknown>>({ data, columns, emptyMsg, footer, sortable, getHeaderProps, getRowProps, getCellProps, getRowId, initialSortColumn, initialSortDirection, autoResetSortBy, ...props }: Props<D>): React.JSX.Element;
|
|
105
105
|
export default ModularTable;
|
|
@@ -169,7 +169,7 @@ export var MultiSelect = _ref4 => {
|
|
|
169
169
|
variant = "search",
|
|
170
170
|
scrollOverflow = false
|
|
171
171
|
} = _ref4;
|
|
172
|
-
var buttonRef = useRef();
|
|
172
|
+
var buttonRef = useRef(null);
|
|
173
173
|
var [isDropdownOpen, setIsDropdownOpen] = useState(false);
|
|
174
174
|
var [filter, setFilter] = useState("");
|
|
175
175
|
var [internalSelectedItems, setInternalSelectedItems] = useState([]);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ReactNode, HTMLProps } from "react";
|
|
2
|
+
import React from "react";
|
|
2
3
|
import type { GenerateLink, NavItem, LogoProps } from "./types";
|
|
3
4
|
import { PropsWithSpread, SubComponentProps } from "../../types";
|
|
4
5
|
import { SearchBoxProps } from "../SearchBox";
|
|
@@ -62,5 +63,5 @@ is a simple navigation bar that you can add to the top of your site or app.
|
|
|
62
63
|
The navigation items are collapsed behind a "Menu" link in small screens and
|
|
63
64
|
displayed horizontally on larger screens.
|
|
64
65
|
*/
|
|
65
|
-
declare const Navigation: ({ fullWidth, generateLink, items, itemsRight, leftNavProps, logo, navProps, rightNavProps, searchProps, theme, ...headerProps }: Props) => JSX.Element;
|
|
66
|
+
declare const Navigation: ({ fullWidth, generateLink, items, itemsRight, leftNavProps, logo, navProps, rightNavProps, searchProps, theme, ...headerProps }: Props) => React.JSX.Element;
|
|
66
67
|
export default Navigation;
|
|
@@ -118,7 +118,7 @@ var Navigation = _ref => {
|
|
|
118
118
|
theme
|
|
119
119
|
} = _ref,
|
|
120
120
|
headerProps = _objectWithoutProperties(_ref, _excluded2);
|
|
121
|
-
var searchRef = useRef();
|
|
121
|
+
var searchRef = useRef(null);
|
|
122
122
|
var [mobileMenuOpen, setMobileMenuOpen] = useState(false);
|
|
123
123
|
var [searchOpen, setSearchOpen] = useState(false);
|
|
124
124
|
// Display the search box if the props have been provided.
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import type { GenerateLink, NavLink } from "../types";
|
|
2
3
|
type Props = {
|
|
3
4
|
generateLink?: GenerateLink;
|
|
@@ -6,5 +7,5 @@ type Props = {
|
|
|
6
7
|
/**
|
|
7
8
|
* This component is used internally to display links inside the Navigation component.
|
|
8
9
|
*/
|
|
9
|
-
declare const NavigationLink: ({ generateLink, link }: Props) => JSX.Element | null;
|
|
10
|
+
declare const NavigationLink: ({ generateLink, link, }: Props) => React.JSX.Element | null;
|
|
10
11
|
export default NavigationLink;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { HTMLProps } from "react";
|
|
2
|
+
import React from "react";
|
|
2
3
|
import type { GenerateLink, NavMenu } from "../types";
|
|
3
4
|
import { PropsWithSpread } from "../../../types";
|
|
4
5
|
type Props = PropsWithSpread<NavMenu & {
|
|
@@ -7,5 +8,5 @@ type Props = PropsWithSpread<NavMenu & {
|
|
|
7
8
|
/**
|
|
8
9
|
* This component is used internally to display menus inside the Navigation component.
|
|
9
10
|
*/
|
|
10
|
-
declare const NavigationMenu: ({ alignRight, generateLink, items, label, ...props }: Props) => JSX.Element;
|
|
11
|
+
declare const NavigationMenu: ({ alignRight, generateLink, items, label, ...props }: Props) => React.JSX.Element;
|
|
11
12
|
export default NavigationMenu;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ElementType } from "react";
|
|
1
|
+
import React, { ElementType } from "react";
|
|
2
2
|
import type { HTMLProps, ReactNode } from "react";
|
|
3
3
|
import type { ClassName, PropsWithSpread, ValueOf } from "../../types";
|
|
4
4
|
export declare enum Label {
|
|
@@ -106,5 +106,5 @@ and align with our component prop naming conventions.
|
|
|
106
106
|
The `notificationTypes` const has also been replaced with `NotificationSeverity`
|
|
107
107
|
to reflect the new prop name.
|
|
108
108
|
*/
|
|
109
|
-
declare const Notification: ({ actions, borderless, children, className, close, inline, onDismiss, severity, status, timeout, timestamp, title, titleElement: TitleComponent, type, ...props }: Props) => JSX.Element;
|
|
109
|
+
declare const Notification: ({ actions, borderless, children, className, close, inline, onDismiss, severity, status, timeout, timestamp, title, titleElement: TitleComponent, type, ...props }: Props) => React.JSX.Element;
|
|
110
110
|
export default Notification;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import type { HTMLProps } from "react";
|
|
2
3
|
import type { PropsWithSpread } from "../../types";
|
|
3
4
|
type BaseProps = {
|
|
@@ -98,5 +99,5 @@ The pagination component should be used to navigate between pages of content. Th
|
|
|
98
99
|
* **Buttons-only Pagination:** used when the total number of items is unknown.<br />
|
|
99
100
|
**Required props:** onForward, onBack.
|
|
100
101
|
*/
|
|
101
|
-
declare const Pagination: ({ itemsPerPage, totalItems, paginate, currentPage, scrollToTop, truncateThreshold, centered, showLabels, hideNumbers, onForward, onBack, forwardDisabled, backDisabled, forwardLabel, backLabel, ...navProps }: Props) => JSX.Element;
|
|
102
|
+
declare const Pagination: ({ itemsPerPage, totalItems, paginate, currentPage, scrollToTop, truncateThreshold, centered, showLabels, hideNumbers, onForward, onBack, forwardDisabled, backDisabled, forwardLabel, backLabel, ...navProps }: Props) => React.JSX.Element;
|
|
102
103
|
export default Pagination;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import type { MouseEventHandler } from "react";
|
|
2
3
|
export declare enum Label {
|
|
3
4
|
Next = "Next page",
|
|
@@ -26,5 +27,5 @@ export type Props = {
|
|
|
26
27
|
*/
|
|
27
28
|
label?: string;
|
|
28
29
|
};
|
|
29
|
-
declare const PaginationButton: ({ direction, onClick, disabled, showLabel, label, }: Props) => JSX.Element;
|
|
30
|
+
declare const PaginationButton: ({ direction, onClick, disabled, showLabel, label, }: Props) => React.JSX.Element;
|
|
30
31
|
export default PaginationButton;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import type { MouseEventHandler } from "react";
|
|
2
3
|
export type Props = {
|
|
3
4
|
/**
|
|
@@ -13,5 +14,5 @@ export type Props = {
|
|
|
13
14
|
*/
|
|
14
15
|
onClick: MouseEventHandler<HTMLButtonElement>;
|
|
15
16
|
};
|
|
16
|
-
declare const PaginationItem: ({ number, onClick, isActive, }: Props) => JSX.Element;
|
|
17
|
+
declare const PaginationItem: ({ number, onClick, isActive, }: Props) => React.JSX.Element;
|
|
17
18
|
export default PaginationItem;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import type { CheckableInputProps } from "../CheckboxInput/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 radio buttons to select one of the given set of options.
|
|
7
8
|
*/
|
|
8
|
-
declare const RadioInput: ({ label, ...radioProps }: Props) => JSX.Element;
|
|
9
|
+
declare const RadioInput: ({ label, ...radioProps }: Props) => React.JSX.Element;
|
|
9
10
|
export default RadioInput;
|
|
@@ -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;
|
|
@@ -36,7 +36,7 @@ var SearchAndFilter = _ref => {
|
|
|
36
36
|
var searchAndFilterRef = useRef(null);
|
|
37
37
|
var searchContainerRef = useRef(null);
|
|
38
38
|
var searchBoxRef = useRef(null);
|
|
39
|
-
var panel = useRef();
|
|
39
|
+
var panel = useRef(null);
|
|
40
40
|
|
|
41
41
|
// Call onPanelToggle when the filterPanelHidden state changes
|
|
42
42
|
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
|
*/
|
|
@@ -30,7 +30,7 @@ var SearchBox = /*#__PURE__*/React.forwardRef((_ref, forwardedRef) => {
|
|
|
30
30
|
value
|
|
31
31
|
} = _ref,
|
|
32
32
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
33
|
-
var internalRef = useRef();
|
|
33
|
+
var internalRef = useRef(null);
|
|
34
34
|
var resetInput = () => {
|
|
35
35
|
_onChange === null || _onChange === void 0 || _onChange("");
|
|
36
36
|
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:
|
|
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;
|
package/dist/esm/components/TablePagination/TablePaginationControls/TablePaginationControls.d.ts
CHANGED
|
@@ -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 {
|
|
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[]) =>
|
|
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;
|
|
@@ -10,8 +10,8 @@ export var THROTTLE_DELAY = 1000 / 60;
|
|
|
10
10
|
*/
|
|
11
11
|
export var useThrottle = function useThrottle(callback) {
|
|
12
12
|
var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : THROTTLE_DELAY;
|
|
13
|
-
var timeout = useRef();
|
|
14
|
-
var lastCall = useRef();
|
|
13
|
+
var timeout = useRef(null);
|
|
14
|
+
var lastCall = useRef(null);
|
|
15
15
|
var lastArgs = useRef(null);
|
|
16
16
|
var throttle = useCallback(function () {
|
|
17
17
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
@@ -16,8 +16,8 @@ const THROTTLE_DELAY = exports.THROTTLE_DELAY = 1000 / 60;
|
|
|
16
16
|
*/
|
|
17
17
|
const useThrottle = function (callback) {
|
|
18
18
|
let delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : THROTTLE_DELAY;
|
|
19
|
-
const timeout = (0, _react.useRef)();
|
|
20
|
-
const lastCall = (0, _react.useRef)();
|
|
19
|
+
const timeout = (0, _react.useRef)(null);
|
|
20
|
+
const lastCall = (0, _react.useRef)(null);
|
|
21
21
|
const lastArgs = (0, _react.useRef)(null);
|
|
22
22
|
const throttle = (0, _react.useCallback)(function () {
|
|
23
23
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|