@skedulo/sked-ui 21.8.3 → 21.9.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/IntersectionObserverWrapper/IntersectionObserverWrapper.d.ts +1 -1
- package/dist/components/avatar/Avatar.d.ts +3 -3
- package/dist/components/avatar/AvatarDetail.d.ts +4 -4
- package/dist/components/avatar/AvatarGroup.d.ts +1 -1
- package/dist/components/badge/Badge.d.ts +3 -3
- package/dist/components/badge/Badge.stories.d.ts +3 -3
- package/dist/components/button-group/ButtonGroup.d.ts +1 -1
- package/dist/components/buttons/button/Button.d.ts +2 -2
- package/dist/components/buttons/button-dropdown/ButtonDropdown.d.ts +1 -1
- package/dist/components/buttons/icon-button/IconButton.d.ts +2 -2
- package/dist/components/buttons/icon-button-dropdown/IconButtonDropdown.d.ts +2 -2
- package/dist/components/calendar-controls/CalendarControls-utils.d.ts +2 -2
- package/dist/components/calendar-controls/CalendarControls.d.ts +2 -2
- package/dist/components/calendar-controls/elements/DateSelector.d.ts +1 -1
- package/dist/components/calendar-controls/elements/NavigationButtons.d.ts +2 -2
- package/dist/components/calendar-controls/elements/RangePicker.d.ts +1 -1
- package/dist/components/datepicker/DateTime.d.ts +2 -2
- package/dist/components/datepicker/Datepicker.d.ts +8 -9
- package/dist/components/datepicker/Time.d.ts +3 -2
- package/dist/components/dynamic-table/DynamicTable-utils.d.ts +8 -8
- package/dist/components/dynamic-table/DynamicTable.d.ts +3 -3
- package/dist/components/dynamic-table/interfaces.d.ts +4 -4
- package/dist/components/emptystate/EmptyState.d.ts +1 -1
- package/dist/components/filter-bar/FilterBar.d.ts +7 -7
- package/dist/components/filter-bar/filter-list/FilterList.d.ts +2 -2
- package/dist/components/filter-bar/filter-list/FilterListWithApply.d.ts +2 -2
- package/dist/components/filter-bar/filter-list/FilterSearch.d.ts +3 -3
- package/dist/components/filter-bar/filter-list/RemoteSearch.d.ts +3 -3
- package/dist/components/filter-bar/filter-pill/FilterPill.d.ts +3 -3
- package/dist/components/filter-bar/interfaces.d.ts +1 -1
- package/dist/components/forms/SkedFormValidation.d.ts +7 -7
- package/dist/components/forms/elements/AsyncMultiSearchSelect.d.ts +2 -2
- package/dist/components/forms/elements/AsyncSearchSelect.d.ts +2 -2
- package/dist/components/forms/elements/FormElements.d.ts +9 -9
- package/dist/components/forms/elements/MultiSearchSelect.d.ts +2 -2
- package/dist/components/forms/elements/SearchSelect.d.ts +2 -2
- package/dist/components/forms/elements/interfaces.d.ts +7 -7
- package/dist/components/forms/elements/select-components.d.ts +3 -3
- package/dist/components/forms/elements/select-hooks.d.ts +3 -3
- package/dist/components/icon/Icon.d.ts +2 -2
- package/dist/components/info-card/InfoCard.d.ts +1 -1
- package/dist/components/inline-banner/InlineBanner.d.ts +1 -1
- package/dist/components/link/Link.d.ts +1 -1
- package/dist/components/link/Link.stories.d.ts +3 -3
- package/dist/components/lozenge/CustomLozenge.d.ts +1 -1
- package/dist/components/lozenge/Lozenge.d.ts +3 -3
- package/dist/components/modals/Modals.d.ts +5 -4
- package/dist/components/pagination/PaginationPages/PaginationPages.d.ts +3 -3
- package/dist/components/popout/PopOut.d.ts +3 -3
- package/dist/components/popout/usePopOut.d.ts +1 -1
- package/dist/components/popups/info-window/InfoWindow.d.ts +4 -4
- package/dist/components/popups/info-window/LegacyInfoWindow.d.ts +5 -3
- package/dist/components/popups/info-window/info-window-utils.d.ts +1 -1
- package/dist/components/popups/overflow-tooltip/OverflowTooltip.d.ts +3 -2
- package/dist/components/popups/tooltip/Tooltip.d.ts +5 -5
- package/dist/components/portal/Portal.d.ts +1 -1
- package/dist/components/search-box/SearchBox.d.ts +1 -1
- package/dist/components/status-icon/StatusIcon.d.ts +2 -2
- package/dist/components/table/Table.d.ts +5 -5
- package/dist/components/tabs/Tabs/Tabs.d.ts +3 -3
- package/dist/components/tabs/Tabs/interfaces.d.ts +2 -1
- package/dist/index.js +2929 -3926
- package/package.json +13 -12
- package/yarn.lock +178 -177
- package/dist/components/avatar/__tests__/Avatar.spec.d.ts +0 -1
- package/dist/components/avatar/__tests__/AvatarDetail.spec.d.ts +0 -1
- package/dist/components/badge/__tests__/Badge.spec.d.ts +0 -1
- package/dist/components/button-group/__tests__/ButtonGroup.spec.d.ts +0 -1
- package/dist/components/buttons/button/__tests__/Button.spec.d.ts +0 -1
- package/dist/components/filter-bar/filter-list/__tests__/FilterList.spec.d.ts +0 -1
- package/dist/components/forms/elements/TextArea.spec.d.ts +0 -1
- package/dist/components/forms/elements/__tests__/AsyncMultiSearchSelect.spec.d.ts +0 -1
|
@@ -59,7 +59,7 @@ interface IAsyncSearchSelect<T extends ISelectItem> {
|
|
|
59
59
|
*/
|
|
60
60
|
useCache?: boolean;
|
|
61
61
|
}
|
|
62
|
-
export
|
|
62
|
+
export type CommonComboBoxTypes<T extends ISelectItem> = Pick<UseComboboxProps<T>, 'initialIsOpen' | 'isOpen' | 'initialHighlightedIndex' | 'highlightedIndex'>;
|
|
63
63
|
interface ISelectBox<T extends ISelectItem> extends ISearchSelect<T> {
|
|
64
64
|
onSelectedItemChange: (item: T) => void;
|
|
65
65
|
/**
|
|
@@ -81,28 +81,28 @@ interface ISelectBox<T extends ISelectItem> extends ISearchSelect<T> {
|
|
|
81
81
|
*/
|
|
82
82
|
getNewItemData?: (inputValue: string) => T[];
|
|
83
83
|
}
|
|
84
|
-
export
|
|
84
|
+
export type SelectBox<T extends ISelectItem> = ISelectBox<T> & CommonComboBoxTypes<T> & Pick<UseComboboxProps<T>, 'initialSelectedItem' | 'selectedItem'> & {
|
|
85
85
|
onMenuToggle?: (isOpen: boolean) => void;
|
|
86
86
|
loading?: boolean;
|
|
87
87
|
} & {
|
|
88
88
|
inputProps?: DOMAttributes<HTMLDivElement>;
|
|
89
89
|
};
|
|
90
|
-
export
|
|
90
|
+
export type AsyncSelectBox<T extends ISelectItem> = Omit<SelectBox<T>, 'items' | 'itemIsValid' | 'getNewItemData'> & IAsyncSearchSelect<T>;
|
|
91
91
|
export interface IMultiSearchSelect<T extends ISelectItem> extends ISearchSelect<T> {
|
|
92
92
|
selectAll?: 'enabled' | 'disabled';
|
|
93
93
|
onMenuToggle?: (isOpen: boolean) => void;
|
|
94
|
-
MenuItemsRenderer?: React.FC<{
|
|
94
|
+
MenuItemsRenderer?: React.FC<React.PropsWithChildren<{
|
|
95
95
|
items: T[];
|
|
96
96
|
MenuItemRenderer: (item: T, index: number) => JSX.Element;
|
|
97
97
|
inputValue: string;
|
|
98
|
-
}
|
|
98
|
+
}>>;
|
|
99
99
|
onInputValueChange?: UseComboboxProps<T>['onInputValueChange'];
|
|
100
100
|
onSelectedItemsChange: (items: T[]) => void;
|
|
101
101
|
}
|
|
102
|
-
export
|
|
102
|
+
export type MultiSearchSelectBox<T extends ISelectItem> = IMultiSearchSelect<T> & CommonComboBoxTypes<T> & Pick<UseMultipleSelectionProps<T>, 'initialSelectedItems' | 'selectedItems'> & {
|
|
103
103
|
loading?: boolean;
|
|
104
104
|
} & {
|
|
105
105
|
getKey?: (item: T) => string;
|
|
106
106
|
};
|
|
107
|
-
export
|
|
107
|
+
export type AsyncMultiSearchSelectBox<T extends ISelectItem> = Omit<MultiSearchSelectBox<T>, 'items'> & IAsyncSearchSelect<T>;
|
|
108
108
|
export {};
|
|
@@ -18,7 +18,7 @@ interface ISearchSelectTrigger {
|
|
|
18
18
|
}
|
|
19
19
|
export declare const SearchSelectTrigger: React.FC<ISearchSelectTrigger & React.InputHTMLAttributes<HTMLInputElement>>;
|
|
20
20
|
export declare const SelectMenu: React.ForwardRefExoticComponent<IMenuProps & React.RefAttributes<HTMLUListElement>>;
|
|
21
|
-
export declare const SelectMenuItem: <T extends ISelectItem<any>>({ item, ItemRenderer, index, highlightedIndex, getItemProps }: ISelectMenuItem<T>) => JSX.Element;
|
|
21
|
+
export declare const SelectMenuItem: <T extends ISelectItem<any>>({ item, ItemRenderer, index, highlightedIndex, getItemProps }: ISelectMenuItem<T>) => React.JSX.Element;
|
|
22
22
|
export interface IPlainMultiSelectMenuItemProps extends React.HTMLAttributes<HTMLLIElement> {
|
|
23
23
|
item: ISelectItem;
|
|
24
24
|
isSelected: boolean;
|
|
@@ -26,8 +26,8 @@ export interface IPlainMultiSelectMenuItemProps extends React.HTMLAttributes<HTM
|
|
|
26
26
|
export declare const PlainMultiSelectMenuItem: React.FC<IPlainMultiSelectMenuItemProps>;
|
|
27
27
|
export declare const MultiSelectMenuItem: <T extends ISelectItem<any>>({ item, ItemRenderer, isSelected, index, highlightedIndex, getItemProps }: ISelectMenuItem<T> & {
|
|
28
28
|
isSelected: boolean;
|
|
29
|
-
}) => JSX.Element;
|
|
30
|
-
export declare const SelectEmptyState: React.FC
|
|
29
|
+
}) => React.JSX.Element;
|
|
30
|
+
export declare const SelectEmptyState: React.FC<React.PropsWithChildren<unknown>>;
|
|
31
31
|
interface IMultiSearchSelectTriggerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
32
32
|
hasItems: boolean;
|
|
33
33
|
disabled: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Modifier, StrictModifier } from 'react-popper';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
type MatchTriggerWidthModifer = Modifier<'matchTriggerWidth', {}>;
|
|
4
|
+
type CustomModifiers = MatchTriggerWidthModifer;
|
|
5
5
|
interface IUseSelectPopperConfigReturnType {
|
|
6
6
|
selectPopperModifiers: (StrictModifier | CustomModifiers)[];
|
|
7
7
|
}
|
|
@@ -23,7 +23,7 @@ export declare const useAutoExpandingInput: ({ defaultInputWidth, inputProps, cl
|
|
|
23
23
|
inputValueWidth: number;
|
|
24
24
|
updateInputWidth: () => void;
|
|
25
25
|
setInputValueWidth: React.Dispatch<React.SetStateAction<number>>;
|
|
26
|
-
AutoExpandingInput: JSX.Element;
|
|
26
|
+
AutoExpandingInput: React.JSX.Element;
|
|
27
27
|
};
|
|
28
28
|
export declare function useOnClickOutside(refs: React.RefObject<HTMLElement>[], handler: (event: MouseEvent) => void): void;
|
|
29
29
|
export interface UseRunPromiseState<D> {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import icons from './iconPaths';
|
|
3
|
-
export
|
|
3
|
+
export type IconNames = keyof typeof icons;
|
|
4
4
|
interface IProps extends React.SVGAttributes<SVGElement> {
|
|
5
5
|
/**
|
|
6
6
|
* Name of the icon
|
|
@@ -22,5 +22,5 @@ interface IProps extends React.SVGAttributes<SVGElement> {
|
|
|
22
22
|
/**
|
|
23
23
|
* The Icon component should be used whenever an icon needs to be displayed. It will naturally inherit any text colour but this can be changed by supplied a class directly. Default size of 18px/18px.
|
|
24
24
|
*/
|
|
25
|
-
export declare const Icon: ({ name, className, size, onClick, ...otherProps }: IProps) => JSX.Element;
|
|
25
|
+
export declare const Icon: ({ name, className, size, onClick, ...otherProps }: IProps) => React.JSX.Element;
|
|
26
26
|
export {};
|
|
@@ -2,4 +2,4 @@ import * as React from 'react';
|
|
|
2
2
|
/**
|
|
3
3
|
* This is a wrapper for the other InfoCard components to sit in
|
|
4
4
|
*/
|
|
5
|
-
export declare const InfoCard: React.FC<React.HTMLAttributes<HTMLDivElement
|
|
5
|
+
export declare const InfoCard: React.FC<React.PropsWithChildren<React.HTMLAttributes<HTMLDivElement>>>;
|
|
@@ -6,4 +6,4 @@ export interface IInlineBannerProps extends React.HTMLAttributes<HTMLDivElement>
|
|
|
6
6
|
/**
|
|
7
7
|
* Displays a inline banner with various styling depending on the type.
|
|
8
8
|
*/
|
|
9
|
-
export declare const InlineBanner: React.FC<IInlineBannerProps & React.HTMLAttributes<HTMLDivElement
|
|
9
|
+
export declare const InlineBanner: React.FC<React.PropsWithChildren<IInlineBannerProps & React.HTMLAttributes<HTMLDivElement>>>;
|
|
@@ -2,4 +2,4 @@ import * as React from 'react';
|
|
|
2
2
|
export interface ILinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
3
3
|
type?: 'primary' | 'secondary';
|
|
4
4
|
}
|
|
5
|
-
export declare const Link: ({ type, className, children, ...otherProps }: ILinkProps) => JSX.Element;
|
|
5
|
+
export declare const Link: ({ type, className, children, ...otherProps }: ILinkProps) => React.JSX.Element;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { ComponentStory } from '@storybook/react';
|
|
3
3
|
import { ILinkProps } from './Link';
|
|
4
4
|
declare const _default: {
|
|
5
5
|
title: string;
|
|
6
|
-
component: ({ type, className, children, ...otherProps }: ILinkProps) => JSX.Element;
|
|
6
|
+
component: ({ type, className, children, ...otherProps }: ILinkProps) => React.JSX.Element;
|
|
7
7
|
argTypes: {
|
|
8
8
|
type: {
|
|
9
9
|
options: string[];
|
|
@@ -14,4 +14,4 @@ declare const _default: {
|
|
|
14
14
|
};
|
|
15
15
|
};
|
|
16
16
|
export default _default;
|
|
17
|
-
export declare const Basic: ComponentStory<({ type, className, children, ...otherProps }: ILinkProps) => JSX.Element>;
|
|
17
|
+
export declare const Basic: ComponentStory<({ type, className, children, ...otherProps }: ILinkProps) => React.JSX.Element>;
|
|
@@ -16,6 +16,6 @@ interface ICustomLozenge {
|
|
|
16
16
|
icon?: IconNames;
|
|
17
17
|
tooltipPosition?: ITooltipPosition;
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
type LozengeProps = ICustomLozenge & React.HTMLAttributes<HTMLDivElement>;
|
|
20
20
|
export declare const CustomLozenge: React.FC<LozengeProps>;
|
|
21
21
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { IconNames } from '../icon/Icon';
|
|
3
3
|
import { ITooltipPosition } from '../popups/tooltip/Tooltip';
|
|
4
|
-
export
|
|
5
|
-
export
|
|
4
|
+
export type LozengeColors = 'neutral-light' | 'neutral' | 'orange' | 'green' | 'cyan' | 'red' | 'sapphire' | 'purple' | 'purple-dark' | 'purple-darker';
|
|
5
|
+
export type LozengeTheme = 'transparent' | 'pale' | 'solid';
|
|
6
6
|
interface ILozenge {
|
|
7
7
|
label: string;
|
|
8
8
|
color: LozengeColors;
|
|
@@ -17,6 +17,6 @@ interface ILozenge {
|
|
|
17
17
|
icon?: IconNames;
|
|
18
18
|
tooltipPosition?: ITooltipPosition;
|
|
19
19
|
}
|
|
20
|
-
|
|
20
|
+
type LozengeProps = ILozenge & React.HTMLAttributes<HTMLDivElement>;
|
|
21
21
|
export declare const Lozenge: React.FC<LozengeProps>;
|
|
22
22
|
export {};
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
2
|
+
type ModalContentProps = Pick<React.HTMLAttributes<HTMLDivElement>, 'className' | 'datatype'>;
|
|
3
3
|
interface IDynamicModal {
|
|
4
4
|
header?: JSX.Element;
|
|
5
5
|
footer?: JSX.Element;
|
|
6
6
|
loading?: boolean;
|
|
7
7
|
scrollableContentClassNames?: string;
|
|
8
8
|
}
|
|
9
|
-
export declare const BaseModal: React.FC<Omit<ModalContentProps, 'className'
|
|
9
|
+
export declare const BaseModal: React.FC<React.PropsWithChildren<Omit<ModalContentProps, 'className'>>>;
|
|
10
10
|
/**
|
|
11
11
|
* Use DynamicModal when you have long content in your modal and you want it restricted to the viewport.
|
|
12
12
|
* It accepts a header and footer which will remain static with the child content being placed in the
|
|
13
13
|
* scrollable section.
|
|
14
14
|
*/
|
|
15
|
-
export declare const DynamicModal: React.FC<IDynamicModal & ModalContentProps
|
|
15
|
+
export declare const DynamicModal: React.FC<React.PropsWithChildren<IDynamicModal & ModalContentProps>>;
|
|
16
16
|
export interface IConfirmationModalProps {
|
|
17
|
+
children: React.ReactNode;
|
|
17
18
|
onConfirm: (event?: React.MouseEvent<HTMLButtonElement>) => void;
|
|
18
19
|
onCancel: (event?: React.MouseEvent<HTMLButtonElement>) => void;
|
|
19
20
|
cancelButtonText?: string;
|
|
@@ -29,6 +30,6 @@ export interface IConfirmationModalState {
|
|
|
29
30
|
export declare class ConfirmationModal extends React.PureComponent<IConfirmationModalProps, IConfirmationModalState> {
|
|
30
31
|
constructor(props: IConfirmationModalProps);
|
|
31
32
|
handleConfirmButtonClick: () => void;
|
|
32
|
-
render(): JSX.Element;
|
|
33
|
+
render(): React.JSX.Element;
|
|
33
34
|
}
|
|
34
35
|
export {};
|
|
@@ -5,10 +5,10 @@ export declare const Arrow: React.FC<{
|
|
|
5
5
|
disable: boolean;
|
|
6
6
|
onClick: (event: React.MouseEvent) => void;
|
|
7
7
|
}>;
|
|
8
|
-
export declare const Ellipsis: React.
|
|
9
|
-
export declare const Page: React.FC<{
|
|
8
|
+
export declare const Ellipsis: () => React.JSX.Element;
|
|
9
|
+
export declare const Page: React.FC<React.PropsWithChildren<{
|
|
10
10
|
pageNo: number;
|
|
11
11
|
isCurrent: boolean;
|
|
12
12
|
onClick?: (event: React.MouseEvent) => void;
|
|
13
|
-
}
|
|
13
|
+
}>>;
|
|
14
14
|
export declare const PaginationPages: React.FC<IPagination>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { IPopOutBase } from './PopOutBase';
|
|
3
|
-
|
|
3
|
+
type IPopOutBaseSubset = Omit<IPopOutBase, 'visible' | 'trigger' | 'children'>;
|
|
4
4
|
export interface IPopOutProps extends IPopOutBaseSubset {
|
|
5
5
|
/**
|
|
6
6
|
* The element you are rendering the content from
|
|
@@ -9,7 +9,7 @@ export interface IPopOutProps extends IPopOutBaseSubset {
|
|
|
9
9
|
/**
|
|
10
10
|
* The content to pop out
|
|
11
11
|
*/
|
|
12
|
-
children: (closePopOut: () => void) =>
|
|
12
|
+
children: (closePopOut: () => void) => React.ReactNode;
|
|
13
13
|
/**
|
|
14
14
|
* Close on clicking in the content area. Defaults to false
|
|
15
15
|
*/
|
|
@@ -57,5 +57,5 @@ export interface IPopOutState {
|
|
|
57
57
|
*
|
|
58
58
|
* @requires PopOutBase
|
|
59
59
|
*/
|
|
60
|
-
export declare const PopOut: (props: IPopOutProps) => JSX.Element;
|
|
60
|
+
export declare const PopOut: (props: IPopOutProps) => React.JSX.Element;
|
|
61
61
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IPopOutProps } from './PopOut';
|
|
2
|
-
|
|
2
|
+
type UsePopOutProps = Pick<IPopOutProps, 'delayShow' | 'preventShow' | 'onClose' | 'openOnMount'>;
|
|
3
3
|
export declare const usePopOut: ({ delayShow, preventShow, onClose, openOnMount }: UsePopOutProps) => {
|
|
4
4
|
visible: boolean;
|
|
5
5
|
openPopOut: () => void;
|
|
@@ -11,9 +11,9 @@ export interface IRequiredProps {
|
|
|
11
11
|
*/
|
|
12
12
|
position: IPopOutProps['placement'];
|
|
13
13
|
}
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export
|
|
14
|
+
export type IPopOutPropsSubset = IRequiredProps & Omit<IPopOutProps, 'children' | 'trigger' | 'showArrow'>;
|
|
15
|
+
export type IInfoWindowEvent = 'click' | 'mount';
|
|
16
|
+
export type IInfoWindowProps = IPopOutPropsSubset & {
|
|
17
17
|
children: React.ReactNode;
|
|
18
18
|
/**
|
|
19
19
|
* Event type used to trigger the info window, 'hover' is now deprecated
|
|
@@ -42,4 +42,4 @@ export declare type IInfoWindowProps = IPopOutPropsSubset & {
|
|
|
42
42
|
*/
|
|
43
43
|
style?: React.CSSProperties;
|
|
44
44
|
};
|
|
45
|
-
export declare const InfoWindow: (props: IInfoWindowProps) => JSX.Element;
|
|
45
|
+
export declare const InfoWindow: (props: IInfoWindowProps) => React.JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { IAnchorScores, ICursorOptions, ICursorPoints, Position } from './info-window-utils';
|
|
3
|
-
|
|
3
|
+
type ILegacyInfoWindowEvent = 'click' | 'hover' | 'mount';
|
|
4
4
|
interface IInfoWindowStyles<T> {
|
|
5
5
|
triangleStyles: {
|
|
6
6
|
top: T;
|
|
@@ -21,7 +21,7 @@ export interface ILegacyInfoWindowRequiredProps {
|
|
|
21
21
|
*/
|
|
22
22
|
position: Position;
|
|
23
23
|
}
|
|
24
|
-
export
|
|
24
|
+
export type ILegacyInfoWindowProps = ILegacyInfoWindowRequiredProps & {
|
|
25
25
|
children?: React.ReactNode;
|
|
26
26
|
/**
|
|
27
27
|
* ILegacyInfoWindowEvent type used to trigger the info window
|
|
@@ -99,6 +99,7 @@ export declare class LegacyInfoWindow extends React.PureComponent<ILegacyInfoWin
|
|
|
99
99
|
private _triangleRef;
|
|
100
100
|
private _cursorPosition;
|
|
101
101
|
private _triggerRect;
|
|
102
|
+
private _root;
|
|
102
103
|
constructor(props: ILegacyInfoWindowProps);
|
|
103
104
|
componentDidMount(): void;
|
|
104
105
|
componentDidUpdate(oldProps: ILegacyInfoWindowProps): void;
|
|
@@ -144,12 +145,13 @@ export declare class LegacyInfoWindow extends React.PureComponent<ILegacyInfoWin
|
|
|
144
145
|
};
|
|
145
146
|
removeRenderingContainer(): void;
|
|
146
147
|
createRenderContainer(): HTMLDivElement;
|
|
148
|
+
createRenderRoot(): void;
|
|
147
149
|
/**
|
|
148
150
|
* The first render wont be positioned properly since we don't have the width/height to calculate the position.
|
|
149
151
|
* `runStyleRender` runs a second render when we have the contentContainer rendered to calculate the position.
|
|
150
152
|
*/
|
|
151
153
|
renderContent(runStyleRender?: boolean): void;
|
|
152
|
-
render(): JSX.Element;
|
|
154
|
+
render(): React.JSX.Element;
|
|
153
155
|
}
|
|
154
156
|
export declare const InfoWindowContext: React.Context<InfoWindowState>;
|
|
155
157
|
interface InfoWindowState {
|
|
@@ -6,7 +6,7 @@ export interface ICursorOptions {
|
|
|
6
6
|
rule: 'follow' | 'follow-x' | 'follow-y';
|
|
7
7
|
keepOnMouseMove?: boolean;
|
|
8
8
|
}
|
|
9
|
-
export
|
|
9
|
+
export type Position = 'top' | 'right' | 'bottom' | 'left';
|
|
10
10
|
export declare const getPositionEvalOrder: (position: Position) => Position[];
|
|
11
11
|
interface IAnchorPoint {
|
|
12
12
|
position: Position;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ITooltipPosition, ITooltipProps } from '../tooltip/Tooltip';
|
|
3
3
|
export interface IOverflowTooltipProps extends Pick<ITooltipProps, 'dataAttributes'> {
|
|
4
|
+
children: React.ReactNode;
|
|
4
5
|
/** Maximum width the element expands to before being cut off */
|
|
5
6
|
maxWidth?: number;
|
|
6
7
|
className?: string;
|
|
@@ -17,14 +18,14 @@ export interface IOverflowTooltipState {
|
|
|
17
18
|
* @requires Tooltip
|
|
18
19
|
*/
|
|
19
20
|
export declare class OverflowTooltip extends React.PureComponent<IOverflowTooltipProps, IOverflowTooltipState> {
|
|
21
|
+
_element: HTMLDivElement;
|
|
20
22
|
static defaultProps: {
|
|
21
23
|
position: string;
|
|
22
24
|
};
|
|
23
|
-
_element: HTMLDivElement;
|
|
24
25
|
constructor(props: IOverflowTooltipProps);
|
|
25
26
|
componentDidMount(): void;
|
|
26
27
|
refElement: (element: HTMLDivElement) => void;
|
|
27
28
|
checkOverflow: () => void;
|
|
28
29
|
isTextOverflow(): boolean;
|
|
29
|
-
render(): JSX.Element;
|
|
30
|
+
render(): React.JSX.Element;
|
|
30
31
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { ILegacyInfoWindowProps } from '../info-window/LegacyInfoWindow';
|
|
3
3
|
import { Position } from '../info-window/info-window-utils';
|
|
4
4
|
import './tooltip.scss';
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
export type ITooltipPosition = Position;
|
|
6
|
+
type IColorScheme = 'dark' | 'light';
|
|
7
|
+
type IAlignStyle = 'center' | 'left' | 'right';
|
|
8
8
|
export interface ITooltipProps extends ILegacyInfoWindowProps {
|
|
9
9
|
/**
|
|
10
10
|
* Colour scheme for the tooltip content. Available options are 'dark' and 'light'
|
|
@@ -17,5 +17,5 @@ export interface ITooltipProps extends ILegacyInfoWindowProps {
|
|
|
17
17
|
/**
|
|
18
18
|
* Tooltips are an extended version of the info window that triggers on hover by default, delayed slightly and is styled with tooltip styles
|
|
19
19
|
*/
|
|
20
|
-
export declare const Tooltip: (props: ITooltipProps) => JSX.Element;
|
|
20
|
+
export declare const Tooltip: (props: ITooltipProps) => React.JSX.Element;
|
|
21
21
|
export {};
|
|
@@ -17,6 +17,6 @@ export declare class Portal extends React.PureComponent<IProps, {}> {
|
|
|
17
17
|
componentDidUpdate(prevProps: IProps): void;
|
|
18
18
|
componentWillUnmount(): void;
|
|
19
19
|
setRootContainerPosition: () => void;
|
|
20
|
-
render(): JSX.Element;
|
|
20
|
+
render(): React.JSX.Element;
|
|
21
21
|
}
|
|
22
22
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
2
|
+
type StatusType = 'general' | 'success' | 'warning' | 'error';
|
|
3
3
|
export interface IStatusIconProps {
|
|
4
4
|
/**
|
|
5
5
|
* The type of status. (general, success, warning or error)
|
|
@@ -7,5 +7,5 @@ export interface IStatusIconProps {
|
|
|
7
7
|
status: StatusType;
|
|
8
8
|
className?: string;
|
|
9
9
|
}
|
|
10
|
-
export declare const StatusIcon: React.FC<IStatusIconProps
|
|
10
|
+
export declare const StatusIcon: React.FC<React.PropsWithChildren<IStatusIconProps>>;
|
|
11
11
|
export {};
|
|
@@ -4,13 +4,13 @@ export interface IHeaderCell {
|
|
|
4
4
|
width?: string;
|
|
5
5
|
className?: string;
|
|
6
6
|
}
|
|
7
|
-
export declare const Table: React.FC<React.HTMLAttributes<HTMLTableElement
|
|
8
|
-
export declare const TableHeadRow: React.FC<React.HTMLAttributes<HTMLTableRowElement
|
|
7
|
+
export declare const Table: React.FC<React.PropsWithChildren<React.HTMLAttributes<HTMLTableElement>>>;
|
|
8
|
+
export declare const TableHeadRow: React.FC<React.PropsWithChildren<React.HTMLAttributes<HTMLTableRowElement>>>;
|
|
9
9
|
export declare const TableHead: React.FC<{
|
|
10
10
|
cells: IHeaderCell[];
|
|
11
11
|
sticky?: boolean;
|
|
12
12
|
className?: string;
|
|
13
13
|
}>;
|
|
14
|
-
export declare const TableBody: React.
|
|
15
|
-
export declare const TableRow: React.FC<React.HTMLAttributes<HTMLTableRowElement
|
|
16
|
-
export declare const TableCell: React.FC<React.TdHTMLAttributes<HTMLTableDataCellElement
|
|
14
|
+
export declare const TableBody: React.FC<React.PropsWithChildren<unknown>>;
|
|
15
|
+
export declare const TableRow: React.FC<React.PropsWithChildren<React.HTMLAttributes<HTMLTableRowElement>>>;
|
|
16
|
+
export declare const TableCell: React.FC<React.PropsWithChildren<React.TdHTMLAttributes<HTMLTableDataCellElement>>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="lodash" />
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { ITab as Tab, ITabsProps, ITabsState, Theme } from './interfaces';
|
|
4
|
-
export
|
|
4
|
+
export type ITab = Tab;
|
|
5
5
|
export declare const getClassNamesByTheme: (theme: string, isActive: boolean, isFocused?: boolean, className?: string) => {
|
|
6
6
|
menuItem: string;
|
|
7
7
|
subMenuItem: string;
|
|
@@ -31,6 +31,6 @@ export declare class Tabs extends React.PureComponent<ITabsProps, ITabsState> {
|
|
|
31
31
|
onSelect: () => void;
|
|
32
32
|
hasSubMenus: (tab: ITab) => boolean;
|
|
33
33
|
isTabActive: (tab: ITab) => boolean;
|
|
34
|
-
renderSubMenus: () => JSX.Element[];
|
|
35
|
-
render(): JSX.Element;
|
|
34
|
+
renderSubMenus: () => React.JSX.Element[];
|
|
35
|
+
render(): React.JSX.Element;
|
|
36
36
|
}
|
|
@@ -3,7 +3,7 @@ export declare enum Theme {
|
|
|
3
3
|
SUB = "sub",
|
|
4
4
|
GLOBAL = "global"
|
|
5
5
|
}
|
|
6
|
-
export
|
|
6
|
+
export type AsMenuType = 'a' | 'span';
|
|
7
7
|
export interface ITab {
|
|
8
8
|
title: string;
|
|
9
9
|
route: string;
|
|
@@ -56,6 +56,7 @@ interface IBaseItemProps {
|
|
|
56
56
|
as?: AsMenuType;
|
|
57
57
|
}
|
|
58
58
|
export interface IMenuItemProps extends Omit<IBaseItemProps, 'theme'> {
|
|
59
|
+
children: React.ReactNode;
|
|
59
60
|
focusRoute: IFocusRouteItem[];
|
|
60
61
|
classes?: string;
|
|
61
62
|
nesting?: number;
|