@loadsmart/loadsmart-ui 8.0.5 → 8.0.6
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 +4 -3
- package/dist/components/Calendar/Calendar.types.d.ts +19 -19
- package/dist/components/DatePicker/DatePicker.types.d.ts +19 -19
- package/dist/components/Dialog/useDialog.d.ts +3 -3
- package/dist/components/DragDropFile/types.d.ts +27 -27
- package/dist/components/Drawer/Drawer.d.ts +13 -10
- package/dist/components/Dropdown/Dropdown.types.d.ts +19 -19
- package/dist/components/Dropdown/useDropdown.d.ts +6 -6
- package/dist/components/EmptyState/EmptyState.types.d.ts +18 -18
- package/dist/components/HighlightMatch/HighlightMatch.d.ts +2 -2
- package/dist/components/Modal/Modal.d.ts +12 -10
- package/dist/components/Pagination/Pagination.types.d.ts +20 -20
- package/dist/components/Popover/Popover.types.d.ts +6 -5
- package/dist/components/Select/Select.types.d.ts +32 -32
- package/dist/components/SideNavigation/Logo/Logo.d.ts +4 -3
- package/dist/components/SideNavigation/Menu/Menu.d.ts +3 -2
- package/dist/components/SideNavigation/Menu/MenuBaseItem.d.ts +2 -2
- package/dist/components/SideNavigation/Menu/MenuExpandable.d.ts +4 -3
- package/dist/components/SideNavigation/Menu/MenuLink.d.ts +2 -2
- package/dist/components/SideNavigation/SideNavigation.d.ts +2 -10
- package/dist/components/SideNavigation/useSideNavigation.d.ts +4 -4
- package/dist/components/Steps/ProgressSteps/ProgressStep.d.ts +2 -2
- package/dist/components/Steps/Steps.d.ts +3 -2
- package/dist/components/Steps/Steps.types.d.ts +3 -3
- package/dist/components/Steps/StepsStep.d.ts +3 -2
- package/dist/components/Steps/useSteps.d.ts +4 -4
- package/dist/components/Table/Selection.d.ts +9 -8
- package/dist/components/Table/Table.types.d.ts +33 -32
- package/dist/components/TablePagination/TablePagination.types.d.ts +17 -17
- package/dist/components/Tabs/Tabs.types.d.ts +2 -2
- package/dist/components/Tooltip/Tooltip.d.ts +3 -2
- package/dist/components/TopNavigation/Logo/Logo.d.ts +4 -3
- package/dist/components/TopNavigation/Menu/Menu.d.ts +7 -5
- package/dist/components/TopNavigation/Menu/MenuItemDropdown.d.ts +6 -5
- package/dist/hooks/useFocusTrap/useFocusTrap.d.ts +3 -3
- package/dist/hooks/useFocusWithin/useFocusWithin.d.ts +2 -2
- package/dist/hooks/useSelectable/useSelectable.types.d.ts +4 -4
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +9 -9
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { default as React,
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
2
|
import { StyledComponent } from 'styled-components';
|
|
3
|
-
export
|
|
3
|
+
export interface LogoProps {
|
|
4
4
|
readonly url: string;
|
|
5
5
|
readonly className?: string;
|
|
6
|
-
|
|
6
|
+
readonly children?: ReactNode;
|
|
7
|
+
}
|
|
7
8
|
declare function Logo({ className, url, children }: LogoProps): React.JSX.Element;
|
|
8
9
|
declare const _default: StyledComponent<typeof Logo, any, LogoProps, never>;
|
|
9
10
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
2
|
import { MenuExpandableProps } from './MenuExpandable';
|
|
3
3
|
import { MenuLinkProps } from './MenuLink';
|
|
4
4
|
import { StyledComponentBase, StyledComponent } from 'styled-components';
|
|
@@ -9,7 +9,8 @@ export interface MenuProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
9
9
|
declare function Menu({ label, children, ...props }: MenuProps): React.JSX.Element;
|
|
10
10
|
type MenuItemProps = {
|
|
11
11
|
readonly active?: boolean;
|
|
12
|
-
|
|
12
|
+
readonly children?: ReactNode;
|
|
13
|
+
} & MenuLinkProps & MenuExpandableProps;
|
|
13
14
|
declare function MenuItem(props: MenuItemProps): React.JSX.Element;
|
|
14
15
|
declare const _default: string & StyledComponentBase<typeof Menu, any, {}, never> & NonReactStatics<typeof Menu, {}> & {
|
|
15
16
|
Item: typeof MenuItem;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { default as React, ReactNode, HTMLAttributes } from 'react';
|
|
2
2
|
import { MenuLinkProps } from './MenuLink';
|
|
3
|
-
export
|
|
3
|
+
export interface MenuBaseItemProps extends HTMLAttributes<HTMLElement> {
|
|
4
4
|
readonly label: string;
|
|
5
5
|
readonly leading?: ReactNode;
|
|
6
6
|
readonly trailing?: ReactNode;
|
|
7
7
|
readonly url?: string;
|
|
8
8
|
readonly subItems?: MenuLinkProps[];
|
|
9
|
-
}
|
|
9
|
+
}
|
|
10
10
|
declare function MenuBaseItem({ label, leading, trailing, ...props }: MenuBaseItemProps): React.JSX.Element;
|
|
11
11
|
export default MenuBaseItem;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { default as React,
|
|
2
|
-
export
|
|
1
|
+
import { default as React, ReactNode, HTMLAttributes } from 'react';
|
|
2
|
+
export interface MenuExpandableProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
3
|
readonly label: string;
|
|
4
|
-
|
|
4
|
+
readonly children?: ReactNode;
|
|
5
|
+
}
|
|
5
6
|
declare function MenuExpandable({ label, children, ...props }: MenuExpandableProps): React.JSX.Element;
|
|
6
7
|
export default MenuExpandable;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { default as React, ReactNode } from 'react';
|
|
2
2
|
import { StyledComponent } from 'styled-components';
|
|
3
|
-
export
|
|
3
|
+
export interface MenuLinkProps extends React.HTMLAttributes<HTMLAnchorElement> {
|
|
4
4
|
readonly label: string;
|
|
5
5
|
readonly leading?: ReactNode;
|
|
6
6
|
readonly trailing?: ReactNode;
|
|
7
7
|
readonly url?: string;
|
|
8
|
-
}
|
|
8
|
+
}
|
|
9
9
|
declare function MenuLink({ url, ...props }: MenuLinkProps): React.JSX.Element;
|
|
10
10
|
declare const _default: StyledComponent<typeof MenuLink, any, {}, never>;
|
|
11
11
|
export default _default;
|
|
@@ -9,16 +9,8 @@ declare namespace SideNavigation {
|
|
|
9
9
|
var Menu: string & import("styled-components").StyledComponentBase<({ label, children, ...props }: import("./Menu/Menu").MenuProps) => React.JSX.Element, any, {}, never> & import("hoist-non-react-statics").NonReactStatics<({ label, children, ...props }: import("./Menu/Menu").MenuProps) => React.JSX.Element, {}> & {
|
|
10
10
|
Item: (props: {
|
|
11
11
|
readonly active?: boolean;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
readonly leading?: ReactNode;
|
|
15
|
-
readonly trailing?: ReactNode;
|
|
16
|
-
readonly url?: string;
|
|
17
|
-
} & React.HTMLAttributes<HTMLDivElement> & {
|
|
18
|
-
readonly label: string;
|
|
19
|
-
} & {
|
|
20
|
-
children?: ReactNode | undefined;
|
|
21
|
-
}) => React.JSX.Element;
|
|
12
|
+
readonly children?: ReactNode;
|
|
13
|
+
} & import("./Menu/MenuLink").MenuLinkProps & import("./Menu/MenuExpandable").MenuExpandableProps) => React.JSX.Element;
|
|
22
14
|
SubItem: import("styled-components").StyledComponent<({ url, ...props }: import("./Menu/MenuLink").MenuLinkProps) => React.JSX.Element, any, {}, never>;
|
|
23
15
|
};
|
|
24
16
|
var Separator: typeof import("./Separator").Separator;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export interface useSideNavigationProps {
|
|
2
|
-
open: boolean;
|
|
3
|
-
show: () => void;
|
|
4
|
-
hide: () => void;
|
|
5
|
-
toggle: () => void;
|
|
2
|
+
readonly open: boolean;
|
|
3
|
+
readonly show: () => void;
|
|
4
|
+
readonly hide: () => void;
|
|
5
|
+
readonly toggle: () => void;
|
|
6
6
|
}
|
|
7
7
|
declare function useSideNavigation(): useSideNavigationProps;
|
|
8
8
|
export default useSideNavigation;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ReactNode, default as React } from 'react';
|
|
2
2
|
import { Step } from '../Steps.types';
|
|
3
3
|
export interface StepsProgressProps {
|
|
4
|
-
steps: Array<Step>;
|
|
5
|
-
current: number | string;
|
|
4
|
+
readonly steps: Array<Step>;
|
|
5
|
+
readonly current: number | string;
|
|
6
6
|
}
|
|
7
7
|
declare function ProgressStep(props: {
|
|
8
8
|
readonly step: Step;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { default as React,
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
2
|
import { default as StepsStep } from './StepsStep';
|
|
3
3
|
import { ColorScheme } from '../../utils/types/ColorScheme';
|
|
4
4
|
import { Step } from './Steps.types';
|
|
@@ -8,8 +8,9 @@ export interface StepsProps {
|
|
|
8
8
|
readonly steps: Array<Step>;
|
|
9
9
|
readonly className?: string;
|
|
10
10
|
readonly scheme?: ColorScheme;
|
|
11
|
+
readonly children?: ReactNode;
|
|
11
12
|
}
|
|
12
|
-
declare function Steps({ id, children, current, steps, ...others }:
|
|
13
|
+
declare function Steps({ id, children, current, steps, ...others }: StepsProps): React.JSX.Element;
|
|
13
14
|
declare namespace Steps {
|
|
14
15
|
var Step: typeof StepsStep;
|
|
15
16
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { default as React,
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
2
|
import { StyledComponent } from 'styled-components';
|
|
3
3
|
export interface StepsStepProps {
|
|
4
4
|
readonly id: number | string;
|
|
5
5
|
readonly className?: string;
|
|
6
|
+
readonly children?: ReactNode;
|
|
6
7
|
}
|
|
7
8
|
export declare const StepWrapper: StyledComponent<"article", any, {}, never>;
|
|
8
|
-
declare function StepsStep({ children, id, ...others }:
|
|
9
|
+
declare function StepsStep({ children, id, ...others }: StepsStepProps): React.JSX.Element;
|
|
9
10
|
export default StepsStep;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Dispatch } from 'react';
|
|
2
2
|
import { Step } from './Steps.types';
|
|
3
3
|
export interface useStepsProps {
|
|
4
|
-
steps: Array<Step>;
|
|
5
|
-
current?: number | string;
|
|
4
|
+
readonly steps: Array<Step>;
|
|
5
|
+
readonly current?: number | string;
|
|
6
6
|
}
|
|
7
7
|
interface State {
|
|
8
|
-
current: number | string;
|
|
9
|
-
steps: Array<Step>;
|
|
8
|
+
readonly current: number | string;
|
|
9
|
+
readonly steps: Array<Step>;
|
|
10
10
|
}
|
|
11
11
|
type Action = {
|
|
12
12
|
type: 'navigate';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { default as React,
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
2
|
import { Selectable, SelectableState } from '../../hooks/useSelectable';
|
|
3
3
|
import { useSelectableProps } from '../../hooks/useSelectable/useSelectable.types';
|
|
4
|
-
export
|
|
4
|
+
export interface TableSelectableRow extends Selectable {
|
|
5
5
|
value?: string | number | boolean;
|
|
6
|
-
}
|
|
7
|
-
export
|
|
6
|
+
}
|
|
7
|
+
export interface TableSelectionSelectable<T extends Selectable = TableSelectableRow> extends Omit<useSelectableProps<T>, 'onChange'> {
|
|
8
8
|
onChange: (selected: T[]) => void;
|
|
9
|
-
}
|
|
9
|
+
}
|
|
10
10
|
export type TableSelectionConfig<T extends Selectable = TableSelectableRow> = boolean | Partial<TableSelectionSelectable<T>>;
|
|
11
11
|
export interface TableSelectionCore<T extends Selectable = TableSelectableRow> {
|
|
12
12
|
selected?: SelectableState<T>;
|
|
@@ -18,10 +18,11 @@ export interface TableSelectionCore<T extends Selectable = TableSelectableRow> {
|
|
|
18
18
|
register: (key?: T) => void;
|
|
19
19
|
}
|
|
20
20
|
export declare function useTableSelectionCore<T extends Selectable>(config?: TableSelectionConfig<T>): TableSelectionCore<T>;
|
|
21
|
-
export declare const TableSelectionContext: React.Context<TableSelectionCore<
|
|
22
|
-
|
|
21
|
+
export declare const TableSelectionContext: React.Context<TableSelectionCore<TableSelectableRow>>;
|
|
22
|
+
interface TableSelectionProviderProps {
|
|
23
23
|
readonly selection?: TableSelectionConfig;
|
|
24
|
-
|
|
24
|
+
readonly children?: ReactNode;
|
|
25
|
+
}
|
|
25
26
|
export declare function TableSelectionProvider({ children, selection }: TableSelectionProviderProps): React.JSX.Element;
|
|
26
27
|
export declare function useTableSelection<T extends Selectable = TableSelectableRow>(): TableSelectionCore<T>;
|
|
27
28
|
interface TableSelectionHook<T extends Selectable = TableSelectableRow> {
|
|
@@ -1,72 +1,73 @@
|
|
|
1
1
|
import { Selectable } from '../../hooks/useSelectable';
|
|
2
|
-
import { ComponentType, HTMLAttributes,
|
|
2
|
+
import { ComponentType, HTMLAttributes, ReactNode } from 'react';
|
|
3
3
|
import { DropdownMenuItemProps, DropdownMenuProps } from '../Dropdown';
|
|
4
4
|
import { DropdownTriggerButtonProps } from '../Dropdown/DropdownTrigger';
|
|
5
5
|
import { TableSelectableRow, TableSelectionConfig } from './Selection';
|
|
6
6
|
type Scale = 'default' | 'small' | 'large';
|
|
7
7
|
export interface TableProps<T extends Selectable = TableSelectableRow> extends HTMLAttributes<HTMLTableElement> {
|
|
8
|
-
scale?: Scale;
|
|
9
|
-
selection?: TableSelectionConfig<T>;
|
|
8
|
+
readonly scale?: Scale;
|
|
9
|
+
readonly selection?: TableSelectionConfig<T>;
|
|
10
10
|
}
|
|
11
11
|
export interface TableCaptionProps extends HTMLAttributes<HTMLTableCaptionElement> {
|
|
12
|
-
position?: 'top' | 'bottom';
|
|
13
|
-
height?: number;
|
|
12
|
+
readonly position?: 'top' | 'bottom';
|
|
13
|
+
readonly height?: number;
|
|
14
14
|
}
|
|
15
15
|
export interface TableSelectionProps extends HTMLAttributes<HTMLDivElement> {
|
|
16
|
-
buttons: ComponentType<{
|
|
16
|
+
readonly buttons: ComponentType<{
|
|
17
17
|
values: TableSelectableRow[];
|
|
18
18
|
}>[];
|
|
19
19
|
}
|
|
20
20
|
export interface SelectionCellProps<T extends TableSelectableRow = TableSelectableRow> extends Omit<HTMLAttributes<HTMLTableCellElement>, 'children'> {
|
|
21
|
-
value?: T;
|
|
22
|
-
children?: (props: {
|
|
21
|
+
readonly value?: T;
|
|
22
|
+
readonly children?: (props: {
|
|
23
23
|
selected: boolean;
|
|
24
24
|
toggle: () => void;
|
|
25
25
|
}) => ReactNode;
|
|
26
26
|
}
|
|
27
27
|
export interface TableSectionProps extends HTMLAttributes<HTMLTableSectionElement> {
|
|
28
|
-
scale?: Scale;
|
|
28
|
+
readonly scale?: Scale;
|
|
29
29
|
}
|
|
30
30
|
export type TableRowProps = HTMLAttributes<HTMLTableRowElement>;
|
|
31
|
-
export
|
|
32
|
-
expandableContent?: ReactNode;
|
|
33
|
-
leading?: ReactNode | ((expanded: boolean) => ReactNode);
|
|
34
|
-
initialExpanded?: boolean;
|
|
35
|
-
expanded?: boolean;
|
|
36
|
-
onExpandedChange?: (expanded: boolean) => void;
|
|
37
|
-
}
|
|
31
|
+
export interface ExpandableTableRowProps extends TableRowProps {
|
|
32
|
+
readonly expandableContent?: ReactNode;
|
|
33
|
+
readonly leading?: ReactNode | ((expanded: boolean) => ReactNode);
|
|
34
|
+
readonly initialExpanded?: boolean;
|
|
35
|
+
readonly expanded?: boolean;
|
|
36
|
+
readonly onExpandedChange?: (expanded: boolean) => void;
|
|
37
|
+
}
|
|
38
38
|
export interface TableCellProps extends HTMLAttributes<HTMLTableCellElement> {
|
|
39
|
-
alignment?: 'left' | 'right';
|
|
40
|
-
format?: 'default' | 'number' | 'currency';
|
|
41
|
-
columnWidth?: string;
|
|
42
|
-
scale?: Scale;
|
|
43
|
-
selected?: boolean;
|
|
39
|
+
readonly alignment?: 'left' | 'right';
|
|
40
|
+
readonly format?: 'default' | 'number' | 'currency';
|
|
41
|
+
readonly columnWidth?: string;
|
|
42
|
+
readonly scale?: Scale;
|
|
43
|
+
readonly selected?: boolean;
|
|
44
44
|
}
|
|
45
45
|
export interface TableColumn<T = Record<string, unknown>> {
|
|
46
46
|
/**
|
|
47
47
|
* The accessor of you entry interface
|
|
48
48
|
*/
|
|
49
|
-
key: Exclude<keyof T, symbol>;
|
|
49
|
+
readonly key: Exclude<keyof T, symbol>;
|
|
50
50
|
/**
|
|
51
51
|
* The label that should go in the Header cell
|
|
52
52
|
*/
|
|
53
|
-
title: ReactNode;
|
|
53
|
+
readonly title: ReactNode;
|
|
54
54
|
/**
|
|
55
55
|
* The text of the Dropdown.Item
|
|
56
56
|
* If omitted, `title` is used
|
|
57
57
|
*/
|
|
58
|
-
option?: string;
|
|
58
|
+
readonly option?: string;
|
|
59
59
|
}
|
|
60
60
|
export type TableColumns<T> = Array<TableColumn<T>>;
|
|
61
61
|
export interface TablePickerItemProps<T> extends DropdownMenuItemProps {
|
|
62
|
-
option?: TableColumn<T>;
|
|
63
|
-
checked?: boolean;
|
|
62
|
+
readonly option?: TableColumn<T>;
|
|
63
|
+
readonly checked?: boolean;
|
|
64
64
|
}
|
|
65
|
-
export interface TablePickerProps<T> extends
|
|
66
|
-
value?: TableColumn<T>;
|
|
67
|
-
onChange?: (value: TableColumn<T>) => void;
|
|
68
|
-
options?: TableColumns<T>;
|
|
69
|
-
trigger?: ReactNode | ((expanded: boolean) => ReactNode);
|
|
70
|
-
align?: DropdownMenuProps['align'];
|
|
65
|
+
export interface TablePickerProps<T> extends Partial<Omit<DropdownTriggerButtonProps, 'onChange' | 'value' | 'children'>> {
|
|
66
|
+
readonly value?: TableColumn<T>;
|
|
67
|
+
readonly onChange?: (value: TableColumn<T>) => void;
|
|
68
|
+
readonly options?: TableColumns<T>;
|
|
69
|
+
readonly trigger?: ReactNode | ((expanded: boolean) => ReactNode);
|
|
70
|
+
readonly align?: DropdownMenuProps['align'];
|
|
71
|
+
readonly children?: ReactNode;
|
|
71
72
|
}
|
|
72
73
|
export {};
|
|
@@ -5,55 +5,55 @@ export interface TablePaginationProps extends GroupProps {
|
|
|
5
5
|
* The pagination variant
|
|
6
6
|
* @default 'default'
|
|
7
7
|
*/
|
|
8
|
-
variant?: 'compact' | 'default';
|
|
8
|
+
readonly variant?: 'compact' | 'default';
|
|
9
9
|
/**
|
|
10
10
|
* The total number of paginated items
|
|
11
11
|
*/
|
|
12
|
-
count: number;
|
|
12
|
+
readonly count: number;
|
|
13
13
|
/**
|
|
14
14
|
* Customize the rows per page label.
|
|
15
15
|
* @default 'Rows per page:'
|
|
16
16
|
*/
|
|
17
|
-
labelRowsPerPage?: string;
|
|
17
|
+
readonly labelRowsPerPage?: string;
|
|
18
18
|
/**
|
|
19
19
|
* Callback fired when the page is changed.
|
|
20
20
|
*/
|
|
21
|
-
onPageChange: (page: number) => void;
|
|
21
|
+
readonly onPageChange: (page: number) => void;
|
|
22
22
|
/**
|
|
23
23
|
* Callback fired when the number of rows per page is changed.
|
|
24
24
|
*
|
|
25
25
|
* Note: Resetting the page to zero after the number of rows per page is changed isn't part of
|
|
26
26
|
* the component and has to be implemented where it's necessary
|
|
27
27
|
*/
|
|
28
|
-
onRowsPerPageChange: (rowsPerPage: number) => void;
|
|
28
|
+
readonly onRowsPerPageChange: (rowsPerPage: number) => void;
|
|
29
29
|
/**
|
|
30
30
|
* The number of rows per page.
|
|
31
31
|
* @default 50
|
|
32
32
|
*/
|
|
33
|
-
rowsPerPage?: number;
|
|
33
|
+
readonly rowsPerPage?: number;
|
|
34
34
|
/**
|
|
35
35
|
* The zero-based index of the current page.
|
|
36
36
|
*/
|
|
37
|
-
page: number;
|
|
37
|
+
readonly page: number;
|
|
38
38
|
/**
|
|
39
39
|
* Customizes the options of the rows per page select field.
|
|
40
40
|
* @default [10, 25, 50, 100]
|
|
41
41
|
*/
|
|
42
|
-
rowsPerPageOptions?: number[];
|
|
42
|
+
readonly rowsPerPageOptions?: number[];
|
|
43
43
|
/**
|
|
44
44
|
* Disable all the pagination actions
|
|
45
45
|
*/
|
|
46
|
-
disabled?: boolean;
|
|
46
|
+
readonly disabled?: boolean;
|
|
47
47
|
/**
|
|
48
48
|
* Customizes the placement of the rows per page select field.
|
|
49
49
|
* @default { position: 'bottom', align: 'start' }
|
|
50
50
|
*/
|
|
51
|
-
rowsPerPagePlacement?: PopoverPlacement;
|
|
51
|
+
readonly rowsPerPagePlacement?: PopoverPlacement;
|
|
52
|
+
}
|
|
53
|
+
export interface TablePaginationActionsProps extends Omit<TablePaginationProps, 'labelRowsPerPage' | 'onRowsPerPageChange' | 'rowsPerPageOptions' | 'rowsPerPage'> {
|
|
54
|
+
readonly rowsPerPage: number;
|
|
55
|
+
}
|
|
56
|
+
export interface RowsPerPageProps extends Omit<TablePaginationProps, 'rowsPerPageOptions' | 'onPageChange' | 'rowsPerPage' | 'align'>, PopoverPlacement {
|
|
57
|
+
readonly rowsPerPageOptions: number[];
|
|
58
|
+
readonly rowsPerPage: number;
|
|
52
59
|
}
|
|
53
|
-
export type TablePaginationActionsProps = Omit<TablePaginationProps, 'labelRowsPerPage' | 'onRowsPerPageChange' | 'rowsPerPageOptions' | 'rowsPerPage'> & {
|
|
54
|
-
rowsPerPage: number;
|
|
55
|
-
};
|
|
56
|
-
export type RowsPerPageProps = Omit<TablePaginationProps, 'rowsPerPageOptions' | 'onPageChange' | 'rowsPerPage' | 'align'> & PopoverPlacement & {
|
|
57
|
-
rowsPerPageOptions: number[];
|
|
58
|
-
rowsPerPage: number;
|
|
59
|
-
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { default as React,
|
|
1
|
+
import { default as React, HTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
import { ColorScheme } from '../../utils/types/ColorScheme';
|
|
3
3
|
import { PopoverAlign, PopoverPosition } from '../Popover';
|
|
4
4
|
export declare enum TooltipPosition {
|
|
@@ -17,6 +17,7 @@ export interface TooltipProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
17
17
|
readonly scheme?: ColorScheme;
|
|
18
18
|
readonly position?: TooltipPosition | PopoverPosition;
|
|
19
19
|
readonly align?: TooltipAlign | PopoverAlign;
|
|
20
|
+
readonly children?: ReactNode;
|
|
20
21
|
}
|
|
21
|
-
declare function Tooltip({ children, message, scheme, position, align, ...rest }:
|
|
22
|
+
declare function Tooltip({ children, message, scheme, position, align, ...rest }: TooltipProps): React.JSX.Element;
|
|
22
23
|
export default Tooltip;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { default as React,
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
2
|
import { StyledComponent } from 'styled-components';
|
|
3
|
-
export
|
|
3
|
+
export interface LogoProps {
|
|
4
4
|
readonly url: string;
|
|
5
5
|
readonly className?: string;
|
|
6
|
-
|
|
6
|
+
readonly children?: ReactNode;
|
|
7
|
+
}
|
|
7
8
|
declare function Logo({ url, className, children }: LogoProps): React.JSX.Element;
|
|
8
9
|
declare const _default: StyledComponent<typeof Logo, any, LogoProps, never>;
|
|
9
10
|
export default _default;
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import { default as React,
|
|
1
|
+
import { default as React, ReactNode, HTMLAttributes } from 'react';
|
|
2
2
|
import { MenuDropdownSubItem } from './MenuItemDropdown';
|
|
3
|
-
|
|
3
|
+
interface MenuItemProps extends HTMLAttributes<HTMLElement> {
|
|
4
4
|
readonly label: string;
|
|
5
5
|
readonly icon?: ReactNode;
|
|
6
6
|
readonly url?: string;
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
readonly children?: ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export interface MenuProps {
|
|
9
10
|
readonly align?: 'left' | 'right';
|
|
10
|
-
|
|
11
|
+
readonly children?: ReactNode;
|
|
12
|
+
}
|
|
11
13
|
declare function MenuItem({ children, ...props }: MenuItemProps): React.JSX.Element;
|
|
12
14
|
declare function Menu({ align, children }: MenuProps): React.JSX.Element;
|
|
13
15
|
declare namespace Menu {
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import { default as React,
|
|
1
|
+
import { default as React, ReactNode, HTMLAttributes } from 'react';
|
|
2
2
|
import { StyledComponent } from 'styled-components';
|
|
3
3
|
export declare const MenuDropdown: StyledComponent<any, any, any, any>;
|
|
4
4
|
export declare const MenuDropdownSeparator: StyledComponent<"hr", any, {}, never>;
|
|
5
5
|
export declare const MenuDropdownLabel: StyledComponent<"label", any, {}, never>;
|
|
6
|
-
|
|
6
|
+
interface MenuDropdownSubItemProps extends HTMLAttributes<HTMLElement> {
|
|
7
7
|
readonly label: string;
|
|
8
8
|
readonly url?: string;
|
|
9
9
|
readonly icon?: ReactNode;
|
|
10
10
|
readonly separator?: boolean;
|
|
11
|
-
}
|
|
11
|
+
}
|
|
12
12
|
export declare function MenuDropdownSubItem({ icon, label, url, ...rest }: MenuDropdownSubItemProps): React.JSX.Element;
|
|
13
|
-
export
|
|
13
|
+
export interface MenuItemDropdownProps {
|
|
14
14
|
readonly label: string;
|
|
15
|
-
|
|
15
|
+
readonly children?: ReactNode;
|
|
16
|
+
}
|
|
16
17
|
declare function MenuItemDropdown(props: MenuItemDropdownProps): React.JSX.Element;
|
|
17
18
|
export { MenuItemDropdown };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { SupportedKey } from '../../utils/toolset/keyboard';
|
|
2
2
|
export interface useFocusTrapProps {
|
|
3
|
-
onActivate?: () => void;
|
|
4
|
-
onDeactivate?: () => void;
|
|
5
|
-
keys?: SupportedKey[];
|
|
3
|
+
readonly onActivate?: () => void;
|
|
4
|
+
readonly onDeactivate?: () => void;
|
|
5
|
+
readonly keys?: readonly SupportedKey[];
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
8
8
|
* Custom hook that limits the focusable elements within a container, when activated.
|
|
@@ -39,8 +39,8 @@ export interface useSelectableReturn<T extends Selectable> {
|
|
|
39
39
|
clear: () => void;
|
|
40
40
|
}
|
|
41
41
|
export interface useSelectableProps<T extends Selectable> {
|
|
42
|
-
selected: T | T[];
|
|
43
|
-
multiple?: boolean;
|
|
44
|
-
onChange?: (selected: SelectableState<T>) => void;
|
|
45
|
-
adapters?: Record<string, SelectableAdapter<T>>;
|
|
42
|
+
readonly selected: T | T[];
|
|
43
|
+
readonly multiple?: boolean;
|
|
44
|
+
readonly onChange?: (selected: SelectableState<T>) => void;
|
|
45
|
+
readonly adapters?: Record<string, SelectableAdapter<T>>;
|
|
46
46
|
}
|
package/dist/index.js
CHANGED
|
@@ -5496,13 +5496,13 @@ function useDropdown({
|
|
|
5496
5496
|
}
|
|
5497
5497
|
setExpanded((isExpanded) => !isExpanded);
|
|
5498
5498
|
}, [disabled, expandDisabled]);
|
|
5499
|
-
const expand = useCallback(function
|
|
5499
|
+
const expand = useCallback(function expand2() {
|
|
5500
5500
|
if (disabled || expandDisabled) {
|
|
5501
5501
|
return;
|
|
5502
5502
|
}
|
|
5503
5503
|
setExpanded(true);
|
|
5504
5504
|
}, [disabled, expandDisabled]);
|
|
5505
|
-
const collapse = useCallback(function
|
|
5505
|
+
const collapse = useCallback(function collapse2() {
|
|
5506
5506
|
if (disabled || expandDisabled) {
|
|
5507
5507
|
return;
|
|
5508
5508
|
}
|