@loadsmart/loadsmart-ui 8.0.0 → 8.0.1
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/DragDropFile.context-oKnUu6d3.js.map +1 -1
- package/dist/common/BackButton/BackButton.d.ts +2 -1
- package/dist/common/CloseButton/CloseButton.d.ts +3 -2
- package/dist/common/SelectionWrapper.d.ts +8 -8
- package/dist/components/Accordion/Accordion.context.d.ts +6 -6
- package/dist/components/Accordion/Accordion.d.ts +11 -11
- package/dist/components/Accordion/Accordion.stories.d.ts +5 -4
- package/dist/components/Banner/Banner.d.ts +14 -14
- package/dist/components/Banner/Banner.stories.d.ts +11 -11
- package/dist/components/Breadcrumbs/Breadcrumb.d.ts +5 -5
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +6 -6
- package/dist/components/Button/Button.d.ts +8 -8
- package/dist/components/Button/Button.stories.d.ts +7 -7
- package/dist/components/Calendar/Calendar.d.ts +3 -2
- package/dist/components/Calendar/Calendar.stories.d.ts +3 -2
- package/dist/components/Calendar/Calendar.types.d.ts +4 -4
- package/dist/components/Calendar/Date.helper.d.ts +27 -54
- package/dist/components/Calendar/DateFormat.helper.d.ts +1 -3
- package/dist/components/Calendar/Month.helper.d.ts +5 -5
- package/dist/components/Calendar/PickerModeToggle.d.ts +2 -1
- package/dist/components/Calendar/Pickers/DayPicker.d.ts +2 -1
- package/dist/components/Calendar/Pickers/MonthPicker.d.ts +2 -1
- package/dist/components/Calendar/Pickers/YearPicker.d.ts +2 -1
- package/dist/components/Calendar/useCalendar.d.ts +4 -9
- package/dist/components/Card/Card.d.ts +5 -5
- package/dist/components/Card/CardTitle.d.ts +3 -3
- package/dist/components/Checkbox/Checkbox.d.ts +6 -6
- package/dist/components/Checkbox/Checkbox.stories.d.ts +2 -1
- package/dist/components/DatePicker/DatePicker.d.ts +2 -2
- package/dist/components/DatePicker/DatePicker.stories.d.ts +2 -1
- package/dist/components/DatePicker/DateRangePicker.d.ts +2 -1
- package/dist/components/DatePicker/DateRangePicker.stories.d.ts +2 -1
- package/dist/components/Dialog/Dialog.d.ts +13 -13
- package/dist/components/Dialog/Dialog.stories.d.ts +10 -9
- package/dist/components/DragDropFile/DragDropFile.context.d.ts +1 -1
- package/dist/components/DragDropFile/DragDropFile.d.ts +2 -2
- package/dist/components/DragDropFile/DragDropFile.stories.d.ts +5 -4
- package/dist/components/DragDropFile/components/DropZone.d.ts +2 -1
- package/dist/components/DragDropFile/components/FileItem.d.ts +2 -1
- package/dist/components/DragDropFile/components/FileList.d.ts +2 -1
- package/dist/components/DragDropFile/types.d.ts +4 -4
- package/dist/components/Drawer/Drawer.d.ts +7 -7
- package/dist/components/Dropdown/Dropdown.d.ts +2 -5
- package/dist/components/Dropdown/Dropdown.types.d.ts +1 -1
- package/dist/components/Dropdown/DropdownMenu.d.ts +2 -2
- package/dist/components/Dropdown/DropdownTrigger.d.ts +9 -9
- package/dist/components/EmptyState/EmptyState.d.ts +1 -1
- package/dist/components/EmptyState/EmptyState.stories.d.ts +8 -7
- package/dist/components/EmptyState/EmptyState.types.d.ts +2 -2
- package/dist/components/EmptyState/index.d.ts +1 -1
- package/dist/components/ErrorMessage/ErrorMessage.stories.d.ts +3 -2
- package/dist/components/HighlightMatch/HighlightMatch.d.ts +4 -4
- package/dist/components/IconFactory/IconFactory.d.ts +8 -8
- package/dist/components/IconFactory/IconFactory.fixtures.d.ts +6 -6
- package/dist/components/Label/Label.d.ts +9 -9
- package/dist/components/Label/Label.stories.d.ts +2 -1
- package/dist/components/Layout/Box.d.ts +8 -9
- package/dist/components/Layout/Grid.d.ts +4 -5
- package/dist/components/Layout/Group.d.ts +5 -6
- package/dist/components/Layout/Layout.stories.d.ts +8 -7
- package/dist/components/Layout/Sidebar.d.ts +6 -7
- package/dist/components/Layout/Stack.d.ts +5 -6
- package/dist/components/Layout/Switcher.d.ts +5 -6
- package/dist/components/Link/Link.d.ts +3 -3
- package/dist/components/Link/Link.stories.d.ts +2 -1
- package/dist/components/Loaders/LoadingBar.d.ts +6 -6
- package/dist/components/Loaders/LoadingDots.d.ts +4 -3
- package/dist/components/Loaders/Spinner.d.ts +4 -3
- package/dist/components/Modal/Modal.d.ts +3 -3
- package/dist/components/Modal/Modal.stories.d.ts +4 -3
- package/dist/components/Pagination/Pagination.d.ts +2 -1
- package/dist/components/Pagination/Pagination.types.d.ts +4 -4
- package/dist/components/Pagination/PaginationItem.d.ts +2 -1
- package/dist/components/Popover/Popover.d.ts +4 -3
- package/dist/components/ProgressBar/ProgressBar.d.ts +6 -6
- package/dist/components/ProgressBar/ProgressBar.stories.d.ts +2 -1
- package/dist/components/Radio/Radio.d.ts +6 -6
- package/dist/components/Radio/Radio.stories.d.ts +2 -1
- package/dist/components/Section/Section.d.ts +4 -4
- package/dist/components/Section/Sections.stories.d.ts +2 -1
- package/dist/components/Select/Select.d.ts +1 -1
- package/dist/components/Select/Select.fixtures.d.ts +4 -4
- package/dist/components/Select/Select.types.d.ts +14 -14
- package/dist/components/Select/SelectCreatableOption.d.ts +2 -1
- package/dist/components/Select/SelectEmpty.d.ts +2 -1
- package/dist/components/Select/SelectOption.d.ts +2 -1
- package/dist/components/Select/useSelect.d.ts +0 -2
- package/dist/components/SideNavigation/Logo/Logo.d.ts +4 -4
- package/dist/components/SideNavigation/Menu/Menu.d.ts +5 -5
- package/dist/components/SideNavigation/Menu/MenuBaseItem.d.ts +7 -7
- package/dist/components/SideNavigation/Menu/MenuExpandable.d.ts +3 -3
- package/dist/components/SideNavigation/Menu/MenuLink.d.ts +5 -5
- package/dist/components/SideNavigation/Separator/Separator.d.ts +3 -2
- package/dist/components/SideNavigation/SideNavigation.d.ts +13 -13
- package/dist/components/SideNavigation/SideNavigation.stories.d.ts +2 -1
- package/dist/components/Steps/ProgressSteps/ProgressStep.d.ts +5 -5
- package/dist/components/Steps/ProgressSteps/ProgressSteps.d.ts +4 -3
- package/dist/components/Steps/Steps.d.ts +7 -7
- package/dist/components/Steps/Steps.types.d.ts +2 -2
- package/dist/components/Steps/StepsStep.d.ts +4 -4
- package/dist/components/Steps/useSteps.d.ts +2 -2
- package/dist/components/Switch/Switch.d.ts +6 -6
- package/dist/components/Table/Selection.d.ts +5 -5
- package/dist/components/Table/Table.d.ts +14 -13
- package/dist/components/Table/Table.stories.d.ts +7 -6
- package/dist/components/Table/Table.types.d.ts +5 -5
- package/dist/components/Table/TableSortHandle.d.ts +3 -2
- package/dist/components/Table/useSortBy.d.ts +3 -3
- package/dist/components/TablePagination/RowsPerPage.d.ts +2 -1
- package/dist/components/TablePagination/TablePagination.d.ts +2 -1
- package/dist/components/TablePagination/TablePaginationActions.d.ts +1 -1
- package/dist/components/Tabs/Tabs.d.ts +10 -10
- package/dist/components/Tabs/Tabs.stories.d.ts +3 -2
- package/dist/components/Tag/Tag.d.ts +11 -11
- package/dist/components/Tag/Tag.stories.d.ts +5 -5
- package/dist/components/TextField/TextField.d.ts +7 -7
- package/dist/components/TextField/TextField.stories.d.ts +2 -1
- package/dist/components/Textarea/Textarea.d.ts +7 -7
- package/dist/components/Textarea/Textarea.stories.d.ts +2 -1
- package/dist/components/Toast/Toast.d.ts +7 -7
- package/dist/components/Toast/Toast.stories.d.ts +2 -1
- package/dist/components/ToggleGroup/Toggle.d.ts +2 -1
- package/dist/components/ToggleGroup/ToggleGroup.d.ts +3 -2
- package/dist/components/Tooltip/Tooltip.d.ts +6 -6
- package/dist/components/Tooltip/Tooltip.stories.d.ts +4 -3
- package/dist/components/TopNavigation/Logo/Logo.d.ts +4 -4
- package/dist/components/TopNavigation/Menu/Menu.d.ts +7 -7
- package/dist/components/TopNavigation/Menu/MenuItemDropdown.d.ts +8 -8
- package/dist/components/TopNavigation/Menu/MenuItemIcon.d.ts +7 -7
- package/dist/components/TopNavigation/OpenSideNavButton/OpenSideNavButton.d.ts +6 -5
- package/dist/components/TopNavigation/TopNavigation.d.ts +5 -5
- package/dist/components/TopNavigation/TopNavigation.stories.d.ts +2 -1
- package/dist/components/VisuallyHidden/VisuallyHidden.stories.d.ts +2 -1
- package/dist/hooks/useDidMount/useDidMount.d.ts +1 -1
- package/dist/hooks/useFingerprint/useFingerprint.d.ts +0 -1
- package/dist/hooks/useFocusTrap/useFocusTrap.d.ts +7 -8
- package/dist/hooks/useFocusWithin/useFocusWithin.d.ts +1 -1
- package/dist/hooks/useHeightExpansionToggler/useHeightExpansionToggler.d.ts +3 -3
- package/dist/hooks/useSelectable/SelectableStrategy.d.ts +4 -4
- package/dist/hooks/useSelectable/useSelectable.types.d.ts +2 -2
- package/dist/index.js +316 -257
- package/dist/index.js.map +1 -1
- package/dist/{miranda-compatibility.theme-kYNEZ7mW.js → miranda-compatibility.theme-CIu9fa89.js} +2 -2
- package/dist/miranda-compatibility.theme-CIu9fa89.js.map +1 -0
- package/dist/{prop-K2Z3EsyG.js → prop-Fs2axl9W.js} +12 -18
- package/dist/prop-Fs2axl9W.js.map +1 -0
- package/dist/styles/activatable.d.ts +2 -3
- package/dist/styles/disableable.d.ts +3 -3
- package/dist/styles/ellipsizable.d.ts +1 -2
- package/dist/styles/focusable.d.ts +3 -3
- package/dist/styles/font.d.ts +0 -1
- package/dist/styles/hidden.d.ts +1 -2
- package/dist/styles/hoverable.d.ts +3 -3
- package/dist/styles/transition.d.ts +0 -1
- package/dist/styles/typography.d.ts +6 -7
- package/dist/testing/DatePickerEvent/DatePickerEvent.d.ts +7 -12
- package/dist/testing/DatePickerEvent/DateRangePickerEvent.d.ts +7 -12
- package/dist/testing/SelectEvent/SelectEvent.d.ts +11 -19
- package/dist/testing/getInterpolatedStyles/getInterpolatedStyles.d.ts +2 -2
- package/dist/testing/index.js +7 -9
- package/dist/testing/index.js.map +1 -1
- package/dist/tests/generator.d.ts +2 -2
- package/dist/tests/renderer.d.ts +5 -4
- package/dist/theming/index.d.ts +3 -3
- package/dist/theming/index.js +2 -2
- package/dist/theming/index.js.map +1 -1
- package/dist/theming/theming.helpers.d.ts +2 -2
- package/dist/toArray-BJJzFRD1.js +13 -0
- package/dist/toArray-BJJzFRD1.js.map +1 -0
- package/dist/tools/conditional.d.ts +3 -3
- package/dist/tools/index.js +1 -1
- package/dist/tools/prop.d.ts +1 -1
- package/dist/utils/toolset/getID.d.ts +0 -6
- package/dist/utils/toolset/highlightMatch.d.ts +5 -6
- package/dist/utils/toolset/keyboard.d.ts +3 -4
- package/dist/utils/toolset/toArray.d.ts +7 -1
- package/package.json +53 -56
- package/dist/miranda-compatibility.theme-kYNEZ7mW.js.map +0 -1
- package/dist/prop-K2Z3EsyG.js.map +0 -1
- package/dist/toArray-Dxb1kUxx.js +0 -14
- package/dist/toArray-Dxb1kUxx.js.map +0 -1
- package/dist/utils/toolset/flatten.d.ts +0 -2
- package/dist/utils/toolset/isThenable.d.ts +0 -5
- package/dist/utils/toolset/isThenable.test.d.ts +0 -1
|
@@ -2,15 +2,15 @@ import { default as React, InputHTMLAttributes, ReactNode } from 'react';
|
|
|
2
2
|
import { default as ColorScheme } from '../../utils/types/ColorScheme';
|
|
3
3
|
import { default as Status } from '../../utils/types/Status';
|
|
4
4
|
interface WithAdditionalProps {
|
|
5
|
-
scale?: 'small' | 'default' | 'large';
|
|
6
|
-
status?: Status;
|
|
7
|
-
scheme?: ColorScheme;
|
|
8
|
-
leading?: ReactNode;
|
|
9
|
-
trailing?: ReactNode;
|
|
5
|
+
readonly scale?: 'small' | 'default' | 'large';
|
|
6
|
+
readonly status?: Status;
|
|
7
|
+
readonly scheme?: ColorScheme;
|
|
8
|
+
readonly leading?: ReactNode;
|
|
9
|
+
readonly trailing?: ReactNode;
|
|
10
10
|
}
|
|
11
11
|
export interface TextFieldProps extends InputHTMLAttributes<HTMLInputElement>, WithAdditionalProps {
|
|
12
|
-
className?: string;
|
|
13
|
-
children?: ReactNode;
|
|
12
|
+
readonly className?: string;
|
|
13
|
+
readonly children?: ReactNode;
|
|
14
14
|
}
|
|
15
15
|
export declare const Leading: import('styled-components').StyledComponent<"span", any, WithAdditionalProps, never>;
|
|
16
16
|
export declare const Trailing: import('styled-components').StyledComponent<"span", any, WithAdditionalProps, never>;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
1
2
|
import { TextFieldProps } from './TextField';
|
|
2
3
|
import { Meta } from '@storybook/react';
|
|
3
4
|
declare const _default: Meta;
|
|
4
5
|
export default _default;
|
|
5
|
-
export declare function Playground(args: TextFieldProps): JSX.Element;
|
|
6
|
+
export declare function Playground(args: TextFieldProps): React.JSX.Element;
|
|
6
7
|
export declare namespace Playground {
|
|
7
8
|
var args: {
|
|
8
9
|
scale: string;
|
|
@@ -2,15 +2,15 @@ import { default as React, TextareaHTMLAttributes, ReactNode } from 'react';
|
|
|
2
2
|
import { default as ColorScheme } from '../../utils/types/ColorScheme';
|
|
3
3
|
import { default as Status } from '../../utils/types/Status';
|
|
4
4
|
interface WithAdditionalProps {
|
|
5
|
-
scale?: 'small' | 'default' | 'large';
|
|
6
|
-
status?: Status;
|
|
7
|
-
scheme?: ColorScheme;
|
|
8
|
-
leading?: ReactNode;
|
|
9
|
-
trailing?: ReactNode;
|
|
5
|
+
readonly scale?: 'small' | 'default' | 'large';
|
|
6
|
+
readonly status?: Status;
|
|
7
|
+
readonly scheme?: ColorScheme;
|
|
8
|
+
readonly leading?: ReactNode;
|
|
9
|
+
readonly trailing?: ReactNode;
|
|
10
10
|
}
|
|
11
11
|
export interface TextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement>, WithAdditionalProps {
|
|
12
|
-
className?: string;
|
|
13
|
-
children?: ReactNode;
|
|
12
|
+
readonly className?: string;
|
|
13
|
+
readonly children?: ReactNode;
|
|
14
14
|
}
|
|
15
15
|
declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
16
16
|
export default Textarea;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
1
2
|
import { TextareaProps } from './Textarea';
|
|
2
3
|
import { Meta } from '@storybook/react';
|
|
3
4
|
declare const _default: Meta;
|
|
4
5
|
export default _default;
|
|
5
|
-
export declare function Playground(args: TextareaProps): JSX.Element;
|
|
6
|
+
export declare function Playground(args: TextareaProps): React.JSX.Element;
|
|
6
7
|
export declare namespace Playground {
|
|
7
8
|
var args: {
|
|
8
9
|
scale: string;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { BaseHTMLAttributes } from 'react';
|
|
1
|
+
import { BaseHTMLAttributes, default as React } from 'react';
|
|
2
2
|
import { default as Status } from '../../utils/types/Status';
|
|
3
3
|
export interface ToastProps extends BaseHTMLAttributes<HTMLDivElement> {
|
|
4
|
-
message: string;
|
|
5
|
-
status?: Status;
|
|
6
|
-
timeout?: number;
|
|
7
|
-
showIcon?: boolean;
|
|
8
|
-
onClose: () => void;
|
|
4
|
+
readonly message: string;
|
|
5
|
+
readonly status?: Status;
|
|
6
|
+
readonly timeout?: number;
|
|
7
|
+
readonly showIcon?: boolean;
|
|
8
|
+
readonly onClose: () => void;
|
|
9
9
|
}
|
|
10
|
-
declare function Toast({ message, onClose, timeout, showIcon, status, }: ToastProps): JSX.Element;
|
|
10
|
+
declare function Toast({ message, onClose, timeout, showIcon, status, }: ToastProps): React.JSX.Element;
|
|
11
11
|
export default Toast;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
1
2
|
import { ToastProps } from './Toast';
|
|
2
3
|
import { Meta } from '@storybook/react';
|
|
3
4
|
import { default as Status } from '../../utils/types/Status';
|
|
4
5
|
declare const _default: Meta;
|
|
5
6
|
export default _default;
|
|
6
|
-
export declare function Playground(args: ToastProps): JSX.Element;
|
|
7
|
+
export declare function Playground(args: ToastProps): React.JSX.Element;
|
|
7
8
|
export declare namespace Playground {
|
|
8
9
|
var args: {
|
|
9
10
|
message: string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
1
2
|
import { ToggleGroupOptionProps } from './ToggleGroup.types';
|
|
2
|
-
declare function Toggle({ value, children, disabled, ...others }: ToggleGroupOptionProps): JSX.Element;
|
|
3
|
+
declare function Toggle({ value, children, disabled, ...others }: ToggleGroupOptionProps): React.JSX.Element;
|
|
3
4
|
declare const _default: import('styled-components').StyledComponent<typeof Toggle, any, {}, never>;
|
|
4
5
|
export default _default;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
1
2
|
import { ToggleGroupOptionProps, ToggleGroupProps } from './ToggleGroup.types';
|
|
2
|
-
declare function ToggleGroup(props: ToggleGroupProps): JSX.Element;
|
|
3
|
+
declare function ToggleGroup(props: ToggleGroupProps): React.JSX.Element;
|
|
3
4
|
declare namespace ToggleGroup {
|
|
4
|
-
var Option: import("styled-components").StyledComponent<({ value, children, disabled, ...others }: ToggleGroupOptionProps) => JSX.Element, any, {}, never>;
|
|
5
|
+
var Option: import("styled-components").StyledComponent<({ value, children, disabled, ...others }: ToggleGroupOptionProps) => React.JSX.Element, any, {}, never>;
|
|
5
6
|
}
|
|
6
7
|
export default ToggleGroup;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HTMLAttributes, ReactNode
|
|
1
|
+
import { default as React, PropsWithChildren, HTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
import { default as ColorScheme } from '../../utils/types/ColorScheme';
|
|
3
3
|
import { PopoverAlign, PopoverPosition } from '../Popover';
|
|
4
4
|
export declare enum TooltipPosition {
|
|
@@ -13,10 +13,10 @@ export declare enum TooltipAlign {
|
|
|
13
13
|
End = "end"
|
|
14
14
|
}
|
|
15
15
|
export interface TooltipProps extends HTMLAttributes<HTMLDivElement> {
|
|
16
|
-
message: ReactNode;
|
|
17
|
-
scheme?: ColorScheme;
|
|
18
|
-
position?: TooltipPosition | PopoverPosition;
|
|
19
|
-
align?: TooltipAlign | PopoverAlign;
|
|
16
|
+
readonly message: ReactNode;
|
|
17
|
+
readonly scheme?: ColorScheme;
|
|
18
|
+
readonly position?: TooltipPosition | PopoverPosition;
|
|
19
|
+
readonly align?: TooltipAlign | PopoverAlign;
|
|
20
20
|
}
|
|
21
|
-
declare function Tooltip({ children, message, scheme, position, align, ...rest }: PropsWithChildren<TooltipProps>): JSX.Element;
|
|
21
|
+
declare function Tooltip({ children, message, scheme, position, align, ...rest }: PropsWithChildren<TooltipProps>): React.JSX.Element;
|
|
22
22
|
export default Tooltip;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TooltipProps, TooltipAlign, TooltipPosition } from './Tooltip';
|
|
2
3
|
import { Meta } from '@storybook/react';
|
|
3
4
|
declare const _default: Meta;
|
|
4
5
|
export default _default;
|
|
5
|
-
export declare function Playground(args: TooltipProps): JSX.Element;
|
|
6
|
+
export declare function Playground(args: TooltipProps): React.JSX.Element;
|
|
6
7
|
export declare namespace Playground {
|
|
7
8
|
var args: {
|
|
8
9
|
message: string;
|
|
@@ -10,4 +11,4 @@ export declare namespace Playground {
|
|
|
10
11
|
align: TooltipAlign;
|
|
11
12
|
};
|
|
12
13
|
}
|
|
13
|
-
export declare function WithReactNodeAsMessage(): JSX.Element;
|
|
14
|
+
export declare function WithReactNodeAsMessage(): React.JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { PropsWithChildren } from 'react';
|
|
1
|
+
import { default as React, PropsWithChildren } from 'react';
|
|
2
2
|
export type LogoProps = PropsWithChildren<{
|
|
3
|
-
url: string;
|
|
4
|
-
className?: string;
|
|
3
|
+
readonly url: string;
|
|
4
|
+
readonly className?: string;
|
|
5
5
|
}>;
|
|
6
|
-
declare function Logo({ url, className, children }: LogoProps): JSX.Element;
|
|
6
|
+
declare function Logo({ url, className, children }: LogoProps): React.JSX.Element;
|
|
7
7
|
declare const _default: import('styled-components').StyledComponent<typeof Logo, any, LogoProps, never>;
|
|
8
8
|
export default _default;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { PropsWithChildren, ReactNode, HTMLAttributes } from 'react';
|
|
1
|
+
import { default as React, PropsWithChildren, ReactNode, HTMLAttributes } from 'react';
|
|
2
2
|
import { MenuDropdownSubItem } from './MenuItemDropdown';
|
|
3
3
|
type MenuItemProps = HTMLAttributes<HTMLElement> & PropsWithChildren<{
|
|
4
|
-
label: string;
|
|
5
|
-
icon?: ReactNode;
|
|
6
|
-
url?: string;
|
|
4
|
+
readonly label: string;
|
|
5
|
+
readonly icon?: ReactNode;
|
|
6
|
+
readonly url?: string;
|
|
7
7
|
}>;
|
|
8
8
|
export type MenuProps = PropsWithChildren<{
|
|
9
|
-
align?: 'left' | 'right';
|
|
9
|
+
readonly align?: 'left' | 'right';
|
|
10
10
|
}>;
|
|
11
|
-
declare function MenuItem(props: MenuItemProps): JSX.Element;
|
|
12
|
-
declare function Menu(
|
|
11
|
+
declare function MenuItem({ children, ...props }: MenuItemProps): React.JSX.Element;
|
|
12
|
+
declare function Menu({ align, children }: MenuProps): React.JSX.Element;
|
|
13
13
|
declare namespace Menu {
|
|
14
14
|
var Item: typeof MenuItem;
|
|
15
15
|
var SubItem: typeof MenuDropdownSubItem;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { PropsWithChildren, ReactNode, HTMLAttributes } from 'react';
|
|
1
|
+
import { default as React, PropsWithChildren, ReactNode, HTMLAttributes } from 'react';
|
|
2
2
|
import { Dropdown } from '../../Dropdown';
|
|
3
3
|
export declare const MenuDropdown: import('styled-components').StyledComponent<typeof Dropdown, any, {}, never>;
|
|
4
4
|
export declare const MenuDropdownSeparator: import('styled-components').StyledComponent<"hr", any, {}, never>;
|
|
5
5
|
export declare const MenuDropdownLabel: import('styled-components').StyledComponent<"label", any, import('../../../theming').ThemedProps, never>;
|
|
6
6
|
type MenuDropdownSubItemProps = HTMLAttributes<HTMLElement> & {
|
|
7
|
-
label: string;
|
|
8
|
-
url?: string;
|
|
9
|
-
icon?: ReactNode;
|
|
10
|
-
separator?: boolean;
|
|
7
|
+
readonly label: string;
|
|
8
|
+
readonly url?: string;
|
|
9
|
+
readonly icon?: ReactNode;
|
|
10
|
+
readonly separator?: boolean;
|
|
11
11
|
};
|
|
12
|
-
export declare function MenuDropdownSubItem({ icon, label, url, ...rest }: MenuDropdownSubItemProps): JSX.Element;
|
|
12
|
+
export declare function MenuDropdownSubItem({ icon, label, url, ...rest }: MenuDropdownSubItemProps): React.JSX.Element;
|
|
13
13
|
export type MenuItemDropdownProps = PropsWithChildren<{
|
|
14
|
-
label: string;
|
|
14
|
+
readonly label: string;
|
|
15
15
|
}>;
|
|
16
|
-
declare function MenuItemDropdown(props: MenuItemDropdownProps): JSX.Element;
|
|
16
|
+
declare function MenuItemDropdown(props: MenuItemDropdownProps): React.JSX.Element;
|
|
17
17
|
export { MenuItemDropdown };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
|
|
3
|
-
label: string;
|
|
4
|
-
icon?: ReactNode;
|
|
5
|
-
url?: string;
|
|
6
|
-
}
|
|
7
|
-
export declare function MenuItemIcon({ url, icon, label, ...rest }: MenuItemIconProps): JSX.Element;
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
|
+
interface MenuItemIconProps {
|
|
3
|
+
readonly label: string;
|
|
4
|
+
readonly icon?: ReactNode;
|
|
5
|
+
readonly url?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function MenuItemIcon({ url, icon, label, ...rest }: MenuItemIconProps): React.JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface OpenSideNavButtonProps {
|
|
3
|
+
readonly className?: string;
|
|
4
|
+
readonly onClick: () => void;
|
|
5
|
+
}
|
|
6
|
+
declare function OpenSideNavButton({ className, onClick }: OpenSideNavButtonProps): React.JSX.Element;
|
|
6
7
|
declare const _default: import('styled-components').StyledComponent<typeof OpenSideNavButton, any, OpenSideNavButtonProps, never>;
|
|
7
8
|
export default _default;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
2
|
export interface TopNavigationProps {
|
|
3
|
-
children?: ReactNode;
|
|
3
|
+
readonly children?: ReactNode;
|
|
4
4
|
}
|
|
5
|
-
declare function TopNavigation({ children }: TopNavigationProps): JSX.Element;
|
|
5
|
+
declare function TopNavigation({ children }: TopNavigationProps): React.JSX.Element;
|
|
6
6
|
declare namespace TopNavigation {
|
|
7
|
-
var Logo: import("styled-components").StyledComponent<({ url, className, children }: import("./Logo/Logo").LogoProps) => JSX.Element, any, import("./Logo/Logo").LogoProps, never>;
|
|
7
|
+
var Logo: import("styled-components").StyledComponent<({ url, className, children }: import("./Logo/Logo").LogoProps) => React.JSX.Element, any, import("./Logo/Logo").LogoProps, never>;
|
|
8
8
|
var Menu: typeof import("./Menu").Menu;
|
|
9
|
-
var OpenSideNavButton: import("styled-components").StyledComponent<({ className, onClick }: import("./OpenSideNavButton/OpenSideNavButton").OpenSideNavButtonProps) => JSX.Element, any, import("./OpenSideNavButton/OpenSideNavButton").OpenSideNavButtonProps, never>;
|
|
9
|
+
var OpenSideNavButton: import("styled-components").StyledComponent<({ className, onClick }: import("./OpenSideNavButton/OpenSideNavButton").OpenSideNavButtonProps) => React.JSX.Element, any, import("./OpenSideNavButton/OpenSideNavButton").OpenSideNavButtonProps, never>;
|
|
10
10
|
}
|
|
11
11
|
export default TopNavigation;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
1
2
|
declare const _default: {
|
|
2
3
|
title: string;
|
|
3
4
|
component: import('styled-components').StyledComponent<"span", any, {}, never>;
|
|
@@ -8,4 +9,4 @@ declare const _default: {
|
|
|
8
9
|
};
|
|
9
10
|
};
|
|
10
11
|
export default _default;
|
|
11
|
-
export declare function Playground(): JSX.Element;
|
|
12
|
+
export declare function Playground(): React.JSX.Element;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* on if the component is mounted.
|
|
4
4
|
* Be aware that your effect, callback, memo, etc cannot list is
|
|
5
5
|
* as a dependency, otherwise it will be triggered at the wrong moment.
|
|
6
|
-
* @returns
|
|
6
|
+
* @returns Whether the component is mounted or not.
|
|
7
7
|
*/
|
|
8
8
|
declare function useDidMount(): boolean;
|
|
9
9
|
export default useDidMount;
|
|
@@ -7,7 +7,6 @@ type FingerprintAdapter<T> = (item: T) => string;
|
|
|
7
7
|
*
|
|
8
8
|
* @param adapter - adapter function that gets a unique identifier for each item in the `items` prop
|
|
9
9
|
* @param items - list of items whose fingerprint should be checked.
|
|
10
|
-
* @returns
|
|
11
10
|
*/
|
|
12
11
|
declare function useFingerprint<T>(adapter: FingerprintAdapter<T>, items: T[]): {
|
|
13
12
|
fingerprint: string;
|
|
@@ -9,17 +9,16 @@ export interface useFocusTrapProps {
|
|
|
9
9
|
*
|
|
10
10
|
* Based on https://developer.mozilla.org/en-US/docs/Web/Accessibility/Keyboard-navigable_JavaScript_widgets.
|
|
11
11
|
*
|
|
12
|
-
* @param
|
|
13
|
-
* @param
|
|
14
|
-
* @param
|
|
15
|
-
* @param
|
|
16
|
-
* @param
|
|
12
|
+
* @param props
|
|
13
|
+
* @param props.containerRef - Ref to the container that will be the boundary for the focus trap.
|
|
14
|
+
* @param props.onActivate - Called when the focus trap is activated.
|
|
15
|
+
* @param props.onDeactivate - Called when the focus trap is deactivated.
|
|
16
|
+
* @param props.keys - Keys that will move the focus inside
|
|
17
17
|
* the container (The current implementation only track focus for button elements). We current
|
|
18
18
|
* support `Tab`, `ArrowUp`, and `ArrowDown` keys. If not provided, only the `Tab` key will be used.
|
|
19
|
-
* @returns {Object}
|
|
20
19
|
*/
|
|
21
|
-
declare function useFocusTrap
|
|
22
|
-
containerRef: (container:
|
|
20
|
+
declare function useFocusTrap(props: useFocusTrapProps): {
|
|
21
|
+
containerRef: (container: HTMLElement | null) => void;
|
|
23
22
|
active: boolean;
|
|
24
23
|
activate: () => void;
|
|
25
24
|
deactivate: () => void;
|
|
@@ -6,7 +6,7 @@ export interface useFocusWithinProps {
|
|
|
6
6
|
/**
|
|
7
7
|
* As CSS's focus-within is not fully supported, this hook
|
|
8
8
|
* helps with identifying focus within elements.
|
|
9
|
-
* @param
|
|
9
|
+
* @param props - Hook props
|
|
10
10
|
*/
|
|
11
11
|
declare function useFocusWithin<T>(props?: useFocusWithinProps): {
|
|
12
12
|
ref: RefObject<T>;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { RefObject } from 'react';
|
|
2
2
|
import { CSSProperties } from 'styled-components';
|
|
3
|
-
export
|
|
3
|
+
export interface HeightExpansionToggler {
|
|
4
4
|
expanded: boolean;
|
|
5
5
|
toggle: () => void;
|
|
6
6
|
height: CSSProperties['height'];
|
|
7
|
-
}
|
|
7
|
+
}
|
|
8
8
|
/**
|
|
9
9
|
* A React Hook to help you expand or collapse an element by
|
|
10
10
|
* checking its total height and controlling a boolean flag
|
|
11
|
-
* @param
|
|
11
|
+
* @param targetElRef - Ref of the wrapper element
|
|
12
12
|
*/
|
|
13
13
|
declare function useHeightExpansionToggler(targetElRef: RefObject<HTMLElement>): HeightExpansionToggler;
|
|
14
14
|
export default useHeightExpansionToggler;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Selectable, SelectableAdapter, SelectableStrategy } from './useSelectable.types';
|
|
2
|
-
export
|
|
2
|
+
export interface SelectableStrategyContext<T extends Selectable> {
|
|
3
3
|
getAdapter: (type?: string) => SelectableAdapter<T>;
|
|
4
|
-
}
|
|
4
|
+
}
|
|
5
|
+
export declare function SingleSelectionStrategy<T extends Selectable>(context: SelectableStrategyContext<T>): SelectableStrategy<T>;
|
|
6
|
+
export declare function MultipleSelectionStrategy<T extends Selectable>(context: SelectableStrategyContext<T>): SelectableStrategy<T>;
|
|
5
7
|
declare function createSelectionStrategy<T extends Selectable>(props: {
|
|
6
8
|
multiple?: boolean;
|
|
7
9
|
adapters: Record<string, SelectableAdapter<T>>;
|
|
8
10
|
}): SelectableStrategy<T>;
|
|
9
|
-
export declare function SingleSelectionStrategy<T extends Selectable>(context: SelectableStrategyContext<T>): SelectableStrategy<T>;
|
|
10
|
-
export declare function MultipleSelectionStrategy<T extends Selectable>(context: SelectableStrategyContext<T>): SelectableStrategy<T>;
|
|
11
11
|
export default createSelectionStrategy;
|
|
@@ -7,14 +7,14 @@ export interface SelectableAdapter<T> {
|
|
|
7
7
|
}
|
|
8
8
|
export type SelectableState<T extends Selectable> = Map<SelectableKeyType, T>;
|
|
9
9
|
export type SelectableType = 'single' | 'multiple';
|
|
10
|
-
export
|
|
10
|
+
export interface SelectableStrategy<T extends Selectable> {
|
|
11
11
|
type: () => SelectableType;
|
|
12
12
|
init: (items: T[]) => SelectableState<T>;
|
|
13
13
|
select: (items: T[], selection: SelectableState<T>) => SelectableState<T>;
|
|
14
14
|
unselect: (keys: SelectableKeyType[], selection: SelectableState<T>) => SelectableState<T>;
|
|
15
15
|
toggle: (items: T[], selection: SelectableState<T>) => SelectableState<T>;
|
|
16
16
|
clear: (selection: SelectableState<T>) => SelectableState<T>;
|
|
17
|
-
}
|
|
17
|
+
}
|
|
18
18
|
export type SelectableAction<T extends Selectable> = {
|
|
19
19
|
type: 'select';
|
|
20
20
|
payload: T[];
|