@skedulo/sked-ui 0.0.0-preview-react-18 → 0.0.1-react-18-preview
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 +2 -2
- package/dist/components/avatar/AvatarDetail.d.ts +3 -2
- package/dist/components/badge/Badge.d.ts +2 -2
- 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-dropdown/ButtonDropdown.d.ts +1 -1
- package/dist/components/buttons/icon-button/IconButton.d.ts +1 -1
- package/dist/components/buttons/icon-button-dropdown/IconButtonDropdown.d.ts +1 -1
- package/dist/components/calendar-controls/CalendarControls.d.ts +2 -2
- package/dist/components/calendar-controls/elements/NavigationButtons.d.ts +2 -2
- package/dist/components/datepicker/DateTime.d.ts +11 -7
- package/dist/components/datepicker/Datepicker.d.ts +9 -9
- package/dist/components/datepicker/Time.d.ts +3 -2
- package/dist/components/dynamic-table/DynamicTable-utils.d.ts +7 -7
- package/dist/components/dynamic-table/DynamicTable.d.ts +2 -2
- package/dist/components/dynamic-table/interfaces.d.ts +3 -3
- package/dist/components/emptystate/EmptyState.d.ts +1 -1
- package/dist/components/filter-bar/FilterBar.d.ts +5 -5
- 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 +2 -2
- package/dist/components/forms/ReadOnly.d.ts +1 -1
- package/dist/components/forms/SkedFormValidation.d.ts +3 -3
- 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 +6 -6
- 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 +6 -3
- package/dist/components/forms/elements/select-components.d.ts +3 -3
- package/dist/components/forms/elements/select-hooks.d.ts +1 -1
- package/dist/components/icon/Icon.d.ts +1 -1
- 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/loader/spinner/LoadingSpinner.d.ts +1 -1
- package/dist/components/modals/Modals.d.ts +5 -3
- package/dist/components/pagination/PaginationCount/PaginationCount.d.ts +1 -1
- package/dist/components/pagination/PaginationPages/PaginationPages.d.ts +4 -4
- package/dist/components/popout/PopOut.d.ts +3 -3
- package/dist/components/popups/info-window/InfoWindow.d.ts +1 -1
- package/dist/components/popups/info-window/LegacyInfoWindow.d.ts +3 -1
- package/dist/components/popups/overflow-tooltip/OverflowTooltip.d.ts +3 -2
- package/dist/components/popups/tooltip/Tooltip.d.ts +2 -2
- 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 +1 -1
- package/dist/components/table/Table.d.ts +6 -6
- package/dist/components/tabs/Tabs/Tabs.d.ts +2 -2
- package/dist/components/tabs/Tabs/interfaces.d.ts +1 -0
- package/dist/index.js +2842 -3789
- package/package.json +8 -7
- package/yarn.lock +5 -11
- package/dist/components/popout/useClickAway.d.ts +0 -2
- package/dist/components/popups/info-window/InfoWindow.spec.d.ts +0 -1
- package/dist/components/popups/info-window/InfoWindowOld.d.ts +0 -160
- package/dist/components/popups/info-window/InfoWindowPopOut.d.ts +0 -84
- package/dist/components/popups/info-window/PortalWrapper.d.ts +0 -6
- package/dist/components/popups/info-window/useClickAway.d.ts +0 -25
- package/dist/components/popups/tooltip/LegacyInfoWindow.d.ts +0 -154
- package/dist/components/popups/tooltip/info-window-utils.d.ts +0 -43
- package/dist/components/popups/tooltip/info-window-utils.spec.d.ts +0 -1
|
@@ -35,5 +35,5 @@ interface IIntersectionObserverWrapper {
|
|
|
35
35
|
* function when the element is visible within the specified viewport
|
|
36
36
|
* based on supplied props. Useful for creating infinite scrolling behaviour.
|
|
37
37
|
*/
|
|
38
|
-
export declare const IntersectionObserverWrapper: React.FC<IIntersectionObserverWrapper
|
|
38
|
+
export declare const IntersectionObserverWrapper: React.FC<React.PropsWithChildren<IIntersectionObserverWrapper>>;
|
|
39
39
|
export {};
|
|
@@ -41,6 +41,6 @@ export declare const avatarSizeClassMap: {
|
|
|
41
41
|
*/
|
|
42
42
|
export declare class Avatar extends React.PureComponent<IAvatar, {}> {
|
|
43
43
|
getInitials(name?: string): string;
|
|
44
|
-
renderAvatar(): JSX.Element;
|
|
45
|
-
render(): JSX.Element;
|
|
44
|
+
renderAvatar(): React.JSX.Element;
|
|
45
|
+
render(): React.JSX.Element;
|
|
46
46
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { IAvatar } from './Avatar';
|
|
3
3
|
declare type AvatarDetailGroupSize = 'tiny' | 'small' | 'medium' | 'large';
|
|
4
4
|
declare type AvatarProps = Pick<IAvatar, 'name' | 'imageUrl'>;
|
|
@@ -13,6 +13,7 @@ export interface IAvatarDetailProps extends AvatarProps {
|
|
|
13
13
|
subtitle?: JSX.Element;
|
|
14
14
|
className?: string;
|
|
15
15
|
linkUrl?: string;
|
|
16
|
+
target?: string;
|
|
16
17
|
}
|
|
17
|
-
export declare const AvatarDetail: ({ name, imageUrl, size, subtitle, className, linkUrl }: IAvatarDetailProps) => JSX.Element;
|
|
18
|
+
export declare const AvatarDetail: ({ name, imageUrl, size, subtitle, className, linkUrl, target }: IAvatarDetailProps) => React.JSX.Element;
|
|
18
19
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
export declare type BadgeTypes = 'default' | 'primary' | 'important';
|
|
3
3
|
export declare const DEFAULT_BADGE_CLASSES = "sked-badge-min-w sk-text-xxs sk-font-medium sk-tracking-wide sk-h-5 sk-pb-px sk-rounded-full sk-inline-flex sk-items-center sk-justify-center";
|
|
4
4
|
export interface IBadgeProps {
|
|
@@ -15,4 +15,4 @@ export interface IBadgeProps {
|
|
|
15
15
|
*/
|
|
16
16
|
badgeType?: BadgeTypes;
|
|
17
17
|
}
|
|
18
|
-
export declare const Badge: ({ count, countLimiter, badgeType }: IBadgeProps) => JSX.Element;
|
|
18
|
+
export declare const Badge: ({ count, countLimiter, badgeType }: IBadgeProps) => React.JSX.Element;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { ComponentStory } from '@storybook/react';
|
|
3
3
|
import { IBadgeProps } from './Badge';
|
|
4
4
|
declare const _default: {
|
|
5
5
|
title: string;
|
|
6
|
-
component: (props: IBadgeProps) => JSX.Element;
|
|
6
|
+
component: (props: IBadgeProps) => React.JSX.Element;
|
|
7
7
|
argTypes: {
|
|
8
8
|
badgeType: {
|
|
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<({ count, countLimiter, badgeType }: IBadgeProps) => JSX.Element>;
|
|
17
|
+
export declare const Basic: ComponentStory<({ count, countLimiter, badgeType }: IBadgeProps) => React.JSX.Element>;
|
|
@@ -2,5 +2,5 @@ import * as React from 'react';
|
|
|
2
2
|
interface IButtonGroup extends React.HTMLProps<HTMLDivElement> {
|
|
3
3
|
compact?: boolean;
|
|
4
4
|
}
|
|
5
|
-
export declare const ButtonGroup: React.FC<IButtonGroup
|
|
5
|
+
export declare const ButtonGroup: React.FC<React.PropsWithChildren<IButtonGroup>>;
|
|
6
6
|
export {};
|
|
@@ -10,5 +10,5 @@ interface IButtonDropdownProps extends IButtonDropdownCommon {
|
|
|
10
10
|
* The DropdownButton component displays/hides children as a dropdown when clicked. The Menu and MenuItem
|
|
11
11
|
components are strongly recommended to be used in conjunction with this component to enforce correct styling of the dropdown menu.
|
|
12
12
|
*/
|
|
13
|
-
export declare const ButtonDropdown: React.FC<IButtonDropdownProps
|
|
13
|
+
export declare const ButtonDropdown: React.FC<React.PropsWithChildren<IButtonDropdownProps>>;
|
|
14
14
|
export {};
|
|
@@ -9,5 +9,5 @@ interface IconButtonProps {
|
|
|
9
9
|
disableTooltip?: boolean;
|
|
10
10
|
}
|
|
11
11
|
export declare type IIconButton = IconButtonProps & Partial<IButtonProps>;
|
|
12
|
-
export declare const IconButton: React.FC<IIconButton
|
|
12
|
+
export declare const IconButton: React.FC<React.PropsWithChildren<IIconButton>>;
|
|
13
13
|
export {};
|
|
@@ -2,4 +2,4 @@ import * as React from 'react';
|
|
|
2
2
|
import { IIconButton } from '../icon-button/IconButton';
|
|
3
3
|
import { IButtonDropdownCommon } from '../interfaces';
|
|
4
4
|
export declare type IconButtonDropdown = IIconButton & IButtonDropdownCommon;
|
|
5
|
-
export declare const IconButtonDropdown: React.FC<IconButtonDropdown
|
|
5
|
+
export declare const IconButtonDropdown: React.FC<React.PropsWithChildren<IconButtonDropdown>>;
|
|
@@ -20,10 +20,10 @@ export interface ICalendarControlProps extends React.HTMLAttributes<HTMLDivEleme
|
|
|
20
20
|
onTodayClick?: () => void;
|
|
21
21
|
}
|
|
22
22
|
export declare function useCalendarControlsContext(): ICalendarControlProps;
|
|
23
|
-
declare function CalendarControls(props: ICalendarControlProps): JSX.Element;
|
|
23
|
+
declare function CalendarControls(props: ICalendarControlProps): React.JSX.Element;
|
|
24
24
|
declare namespace CalendarControls {
|
|
25
25
|
var TodayButton: React.FC<import("./elements/TodayButton").ITodayButtonProps>;
|
|
26
|
-
var NavigationButtons: (props: INavigationButtonProps) => JSX.Element;
|
|
26
|
+
var NavigationButtons: (props: INavigationButtonProps) => React.JSX.Element;
|
|
27
27
|
var DateSelector: React.FC<IDateSelectorProps>;
|
|
28
28
|
var RangePicker: React.FC<IRangeProps>;
|
|
29
29
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { IBaseDateSelectorProps } from './DateSelector';
|
|
3
3
|
export interface INavigationButtonProps extends IBaseDateSelectorProps {
|
|
4
4
|
hideTooltipIfDisabled?: boolean;
|
|
5
5
|
}
|
|
6
|
-
export declare const NavigationButtons: (props: INavigationButtonProps) => JSX.Element;
|
|
6
|
+
export declare const NavigationButtons: (props: INavigationButtonProps) => React.JSX.Element;
|
|
@@ -1,10 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
export interface IDateTimeProps {
|
|
3
3
|
dateTime?: Date;
|
|
4
4
|
/**
|
|
5
|
-
* The time as it is selected by the user
|
|
5
|
+
* The date and time as it is selected by the user
|
|
6
6
|
*/
|
|
7
7
|
onChange?: (value: Date) => void;
|
|
8
|
+
/**
|
|
9
|
+
* The date as it is selected by the user
|
|
10
|
+
*/
|
|
11
|
+
onDateChange?: (value: Date) => void;
|
|
12
|
+
/**
|
|
13
|
+
* The time as it is selected by the user
|
|
14
|
+
*/
|
|
15
|
+
onTimeChange?: (value: string) => void;
|
|
8
16
|
/**
|
|
9
17
|
* The incremental time to add for each selectable time window, by minutes
|
|
10
18
|
*/
|
|
@@ -13,10 +21,6 @@ export interface IDateTimeProps {
|
|
|
13
21
|
* Used for setting aria-labelledby
|
|
14
22
|
*/
|
|
15
23
|
id?: string;
|
|
16
|
-
/**
|
|
17
|
-
* Any suffix to add after the time input
|
|
18
|
-
*/
|
|
19
|
-
timeSuffix?: string;
|
|
20
24
|
/**
|
|
21
25
|
* Is this input disabled?
|
|
22
26
|
*/
|
|
@@ -48,4 +52,4 @@ export declare const convertTimeStringTo24Hr: (value: string) => {
|
|
|
48
52
|
hours: number;
|
|
49
53
|
minutes: number;
|
|
50
54
|
};
|
|
51
|
-
export declare const DateTime: ({ timeIncrement, onChange, dateTime, disabled, openToDate, dateFormat, timeValueSelection, timePlaceholder, datePlaceholder, id }: IDateTimeProps) => JSX.Element;
|
|
55
|
+
export declare const DateTime: ({ timeIncrement, onChange, onDateChange, onTimeChange, dateTime, disabled, openToDate, dateFormat, timeValueSelection, timePlaceholder, datePlaceholder, id }: IDateTimeProps) => React.JSX.Element;
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
/// <reference types="@emotion/core" />
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
import { ReactDatePickerProps } from 'react-datepicker';
|
|
4
3
|
import { RangeType } from '../calendar-controls/elements/RangePicker';
|
|
5
4
|
export declare type LocaleType = 'AU' | 'US' | 'UK';
|
|
5
|
+
declare type CustomInputType = React.InputHTMLAttributes<HTMLInputElement> & {
|
|
6
|
+
onBlurCustom: (event?: React.FocusEvent<HTMLInputElement>) => void;
|
|
7
|
+
openCalendar: (open: boolean) => void;
|
|
8
|
+
onBackspace: () => void;
|
|
9
|
+
Component: (props: React.InputHTMLAttributes<HTMLInputElement> & React.RefAttributes<HTMLInputElement>) => JSX.Element;
|
|
10
|
+
};
|
|
6
11
|
export interface DatepickerProps {
|
|
7
12
|
/**
|
|
8
13
|
* The currently selected date.
|
|
@@ -108,18 +113,13 @@ export interface DatepickerProps {
|
|
|
108
113
|
* onCalendarClose fuction
|
|
109
114
|
*/
|
|
110
115
|
onCalendarClose?: () => void;
|
|
116
|
+
inputRef?: React.MutableRefObject<HTMLInputElement>;
|
|
111
117
|
}
|
|
112
|
-
declare type CustomInputType = React.InputHTMLAttributes<HTMLInputElement> & {
|
|
113
|
-
onBlurCustom: () => void;
|
|
114
|
-
openCalendar: (open: boolean) => void;
|
|
115
|
-
onBackspace: () => void;
|
|
116
|
-
Component: (props: React.InputHTMLAttributes<HTMLInputElement> & React.RefAttributes<HTMLInputElement>) => JSX.Element;
|
|
117
|
-
};
|
|
118
118
|
export declare const CustomInput: React.ForwardRefExoticComponent<React.InputHTMLAttributes<HTMLInputElement> & {
|
|
119
|
-
onBlurCustom: () => void;
|
|
119
|
+
onBlurCustom: (event?: React.FocusEvent<HTMLInputElement>) => void;
|
|
120
120
|
openCalendar: (open: boolean) => void;
|
|
121
121
|
onBackspace: () => void;
|
|
122
122
|
Component: (props: React.InputHTMLAttributes<HTMLInputElement> & React.RefAttributes<HTMLInputElement>) => JSX.Element;
|
|
123
123
|
} & React.RefAttributes<HTMLInputElement>>;
|
|
124
|
-
export declare const Datepicker: React.FC<DatepickerProps
|
|
124
|
+
export declare const Datepicker: React.FC<React.PropsWithChildren<DatepickerProps>>;
|
|
125
125
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/** @format */
|
|
2
|
+
import React from 'react';
|
|
2
3
|
export declare const TIME_FORMAT = "h:mma";
|
|
3
4
|
export declare const formatTime: (date: Date | number) => string;
|
|
4
5
|
export declare const readonlyTimeFormat: ({ value, suffix }: {
|
|
@@ -40,4 +41,4 @@ export interface ITimeProps {
|
|
|
40
41
|
*/
|
|
41
42
|
onChange?: (value: string) => void;
|
|
42
43
|
}
|
|
43
|
-
export declare const Time: ({ value, increment, suffix, onChange, placeholder, valueSelection, ...rest }: ITimeProps) => JSX.Element;
|
|
44
|
+
export declare const Time: ({ value, increment, suffix, onChange, placeholder, valueSelection, ...rest }: ITimeProps) => React.JSX.Element;
|
|
@@ -27,13 +27,13 @@ export declare const getSortArgs: (sortByControl: ControlStates) => {
|
|
|
27
27
|
};
|
|
28
28
|
export declare const wrapperProps: ITableWrapper['getWrapperProps'];
|
|
29
29
|
export declare type SortIconProps<T extends object> = Pick<ITableHeaderCell<T>, 'canSort' | 'isSorted' | 'isSortedDesc' | 'getSortByToggleProps' | 'displayType'>;
|
|
30
|
-
export declare const SortIcon: <T extends object>({ canSort, isSorted, isSortedDesc, getSortByToggleProps, displayType }: SortIconProps<T>) => JSX.Element;
|
|
31
|
-
export declare const SelectCell: (props: Partial<TableToggleRowsSelectedProps>) => JSX.Element;
|
|
32
|
-
export declare const TableHeaderCell: <T extends object>(props: ITableHeaderCell<T>) => JSX.Element;
|
|
30
|
+
export declare const SortIcon: <T extends object>({ canSort, isSorted, isSortedDesc, getSortByToggleProps, displayType }: SortIconProps<T>) => React.JSX.Element;
|
|
31
|
+
export declare const SelectCell: (props: Partial<TableToggleRowsSelectedProps>) => React.JSX.Element;
|
|
32
|
+
export declare const TableHeaderCell: <T extends object>(props: ITableHeaderCell<T>) => React.JSX.Element;
|
|
33
33
|
export declare const ExpandedTableCell: <T extends object>(props: UseTableCellProps<T, any> & {
|
|
34
34
|
children?: React.ReactNode;
|
|
35
|
-
}) => JSX.Element;
|
|
36
|
-
export declare const CondensedTableCell: <T extends object>(props: UseTableCellProps<T, any>) => JSX.Element;
|
|
35
|
+
}) => React.JSX.Element;
|
|
36
|
+
export declare const CondensedTableCell: <T extends object>(props: UseTableCellProps<T, any>) => React.JSX.Element;
|
|
37
37
|
export declare const DefaultRenderer: <T extends object>(instance: import("react-table").TableInstance<T> & {
|
|
38
38
|
column: import("react-table").ColumnInstance<T>;
|
|
39
39
|
row: Row<T>;
|
|
@@ -41,5 +41,5 @@ export declare const DefaultRenderer: <T extends object>(instance: import("react
|
|
|
41
41
|
value: any;
|
|
42
42
|
} & {
|
|
43
43
|
column: IDynamicTableColumn<T>;
|
|
44
|
-
}) => JSX.Element;
|
|
45
|
-
export declare const DefaultWrapper: (wrapperClassName?: string) => React.FC<ITableWrapper
|
|
44
|
+
}) => React.JSX.Element;
|
|
45
|
+
export declare const DefaultWrapper: (wrapperClassName?: string) => React.FC<React.PropsWithChildren<ITableWrapper>>;
|
|
@@ -72,8 +72,8 @@ interface IDynamicTableProps<T extends object> {
|
|
|
72
72
|
* </div>
|
|
73
73
|
* )
|
|
74
74
|
*/
|
|
75
|
-
TableWrapper?: React.FC<ITableWrapper
|
|
75
|
+
TableWrapper?: React.FC<React.PropsWithChildren<ITableWrapper>>;
|
|
76
76
|
}
|
|
77
77
|
export declare type IDynamicTable<T extends object> = Pick<TableOptions<T>, 'getRowId' | 'data' | 'initialState' | 'autoResetSortBy' | 'autoResetSelectedRows' | 'manualRowSelectedKey'> & UseRowClickOptions<T> & IDynamicTableProps<T>;
|
|
78
|
-
export declare const DynamicTable: <T extends object>(props: IDynamicTable<T>) => JSX.Element;
|
|
78
|
+
export declare const DynamicTable: <T extends object>(props: IDynamicTable<T>) => React.JSX.Element;
|
|
79
79
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ColumnInterface, ColumnInstance, UseTableCellProps, Row, ColumnInterfaceBasedOnValue } from 'react-table';
|
|
1
|
+
import { ColumnInterface, ColumnInstance, UseTableCellProps, Row, ColumnInterfaceBasedOnValue, HeaderProps, Renderer } from 'react-table';
|
|
2
2
|
export interface UseRowClickOptions<D extends object> {
|
|
3
3
|
/**
|
|
4
4
|
* This will add row click behaviour. Whenever a cell is clicked within a row,
|
|
@@ -20,7 +20,7 @@ declare module 'react-table' {
|
|
|
20
20
|
emptyCellText?: string;
|
|
21
21
|
}
|
|
22
22
|
interface ColumnInstance<D extends object = {}> extends UseSortByColumnProps<D>, UseRowSelectRowProps<D> {
|
|
23
|
-
Header?:
|
|
23
|
+
Header?: Renderer<HeaderProps<D>> | undefined;
|
|
24
24
|
}
|
|
25
25
|
interface Row<D extends object = {}> extends UseRowSelectRowProps<D> {
|
|
26
26
|
}
|
|
@@ -33,7 +33,7 @@ declare module 'react-table' {
|
|
|
33
33
|
* for empty values.
|
|
34
34
|
*/
|
|
35
35
|
export interface IDynamicTableColumn<T extends object> extends Omit<ColumnInterface<T>, 'Header'>, ColumnInterfaceBasedOnValue<T> {
|
|
36
|
-
Header?:
|
|
36
|
+
Header?: Renderer<HeaderProps<T>> | undefined;
|
|
37
37
|
}
|
|
38
38
|
export declare type ControlStates = 'controlled' | 'uncontrolled' | 'disabled';
|
|
39
39
|
export declare type RowControlStates = 'rowOnly' | 'allRows' | 'disabled';
|
|
@@ -35,20 +35,20 @@ export declare class FilterBar<T extends IFilterItem> extends React.PureComponen
|
|
|
35
35
|
applySelectedItemsToFilter: (filter: IFilter<T>, selectedFilterItems: T[]) => IAppliedFilter<T>[];
|
|
36
36
|
applyAndSaveFilters: (filter: IFilter<T>) => (selectedFilterItems: T[]) => void;
|
|
37
37
|
saveFilters: (filters: IAppliedFilter<T>[]) => void;
|
|
38
|
-
renderAddFilterButton: () => JSX.Element;
|
|
38
|
+
renderAddFilterButton: () => React.JSX.Element;
|
|
39
39
|
/**
|
|
40
40
|
* Render the add filter control button.
|
|
41
41
|
*/
|
|
42
|
-
renderAddFilterControl: () => JSX.Element;
|
|
42
|
+
renderAddFilterControl: () => React.JSX.Element;
|
|
43
43
|
clearTemporaryPill: () => void;
|
|
44
44
|
closeTemporaryPill: () => () => void;
|
|
45
|
-
renderFilterItemSearch: (filter: IFilter<T>, preSelectedItems: T[], scrollableContentClasses?: string) => JSX.Element;
|
|
45
|
+
renderFilterItemSearch: (filter: IFilter<T>, preSelectedItems: T[], scrollableContentClasses?: string) => React.JSX.Element;
|
|
46
46
|
/**
|
|
47
47
|
* After we 'add' a filter, we want to render this 'temporary' pill in the filter bar. This temporary pill will be removed once we hit apply or exit out of the dropdown.
|
|
48
48
|
*/
|
|
49
|
-
renderTemporaryPill: (filterName: string, filterId: string, preSelectedItems: T[]) => JSX.Element;
|
|
49
|
+
renderTemporaryPill: (filterName: string, filterId: string, preSelectedItems: T[]) => React.JSX.Element;
|
|
50
50
|
removeFilter: (filterId: string) => void;
|
|
51
51
|
editFilter: (filterId: string) => void;
|
|
52
|
-
render(): JSX.Element;
|
|
52
|
+
render(): React.JSX.Element;
|
|
53
53
|
}
|
|
54
54
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { IFilterItem } from '../interfaces';
|
|
3
3
|
export interface IFilterListProps<T> {
|
|
4
4
|
items: T[];
|
|
@@ -7,4 +7,4 @@ export interface IFilterListProps<T> {
|
|
|
7
7
|
className?: string;
|
|
8
8
|
scrollableContentClasses?: string;
|
|
9
9
|
}
|
|
10
|
-
export declare const FilterList: <T extends IFilterItem>({ items, itemRenderer, loading, className, scrollableContentClasses }: IFilterListProps<T>) => JSX.Element;
|
|
10
|
+
export declare const FilterList: <T extends IFilterItem>({ items, itemRenderer, loading, className, scrollableContentClasses }: IFilterListProps<T>) => React.JSX.Element;
|
|
@@ -17,8 +17,8 @@ export declare class FilterListWithApply<T extends IFilterItem> extends React.Pu
|
|
|
17
17
|
constructor(props: IFilterListWithApplyProps<T>);
|
|
18
18
|
getSelectedItems: (item: T, checked?: boolean) => T[];
|
|
19
19
|
onItemChange: (item: T) => ({ target }: React.ChangeEvent<HTMLInputElement>) => void;
|
|
20
|
-
itemRenderer: (item: T) => JSX.Element;
|
|
20
|
+
itemRenderer: (item: T) => React.JSX.Element;
|
|
21
21
|
applyFilters: () => void;
|
|
22
|
-
render(): JSX.Element;
|
|
22
|
+
render(): React.JSX.Element;
|
|
23
23
|
}
|
|
24
24
|
export {};
|
|
@@ -2,9 +2,9 @@ import * as React from 'react';
|
|
|
2
2
|
import { IFilterItem } from '../interfaces';
|
|
3
3
|
export interface IFilterSearchProps<T> {
|
|
4
4
|
items: T[];
|
|
5
|
-
children: React.
|
|
5
|
+
children: React.FC<React.PropsWithChildren<{
|
|
6
6
|
filteredItems: T[];
|
|
7
|
-
}
|
|
7
|
+
}>>;
|
|
8
8
|
placeholder?: string;
|
|
9
9
|
className?: string;
|
|
10
10
|
}
|
|
@@ -16,6 +16,6 @@ export declare class FilterSearch<T extends IFilterItem> extends React.PureCompo
|
|
|
16
16
|
componentDidUpdate(prevProps: IFilterSearchProps<T>): void;
|
|
17
17
|
updateItemsState: (items: T[]) => void;
|
|
18
18
|
onFilterSearch: (value: string) => void;
|
|
19
|
-
render(): JSX.Element;
|
|
19
|
+
render(): React.JSX.Element;
|
|
20
20
|
}
|
|
21
21
|
export {};
|
|
@@ -2,11 +2,11 @@ import * as React from 'react';
|
|
|
2
2
|
import { IFilterItem } from '../interfaces';
|
|
3
3
|
export interface IRemoteSearchProps<T> {
|
|
4
4
|
useFetch: (searchTerm: string) => Promise<T[]>;
|
|
5
|
-
children: React.
|
|
5
|
+
children: React.FC<React.PropsWithChildren<{
|
|
6
6
|
fetchedItems: T[];
|
|
7
7
|
searchTerm: string;
|
|
8
8
|
isFetching: boolean;
|
|
9
|
-
}
|
|
9
|
+
}>>;
|
|
10
10
|
preSelectedItems: T[];
|
|
11
11
|
placeholder?: string;
|
|
12
12
|
className?: string;
|
|
@@ -21,5 +21,5 @@ export declare class RemoteSearch<T extends IFilterItem> extends React.PureCompo
|
|
|
21
21
|
private _debouncedSearch;
|
|
22
22
|
constructor(props: IRemoteSearchProps<T>);
|
|
23
23
|
onFilterSearch: (value: string) => void;
|
|
24
|
-
render(): JSX.Element;
|
|
24
|
+
render(): React.JSX.Element;
|
|
25
25
|
}
|
|
@@ -17,7 +17,7 @@ export declare class FilterPill<T extends IFilterItem> extends React.PureCompone
|
|
|
17
17
|
renderedSelectedItems: (selected: IFilterItem[]) => string;
|
|
18
18
|
removeFilter: (filterId: string, onRemove: IFilterPillProps['onRemove']) => (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
19
19
|
editFilter: (filterId: string, onEdit: IFilterPillProps['onRemove'], isReadonly: boolean) => () => void;
|
|
20
|
-
renderCloseButton: (name: string, onRemove: IFilterPillProps['onRemove'], selected: IFilterItem[], removable: boolean, isReadonly?: boolean) => JSX.Element;
|
|
21
|
-
render(): JSX.Element;
|
|
20
|
+
renderCloseButton: (name: string, onRemove: IFilterPillProps['onRemove'], selected: IFilterItem[], removable: boolean, isReadonly?: boolean) => React.JSX.Element;
|
|
21
|
+
render(): React.JSX.Element;
|
|
22
22
|
}
|
|
23
23
|
export {};
|
|
@@ -88,11 +88,11 @@ export declare class SkedFormValidation<T extends object> extends React.PureComp
|
|
|
88
88
|
* for instance - input has onchange and will bubble up, needs a way of adding name)
|
|
89
89
|
*/
|
|
90
90
|
customFormFieldUpdate: (setField: SkedFormChildren<T>['setField'], fields: T, setModified?: (name: keyof T) => void) => (fieldName: keyof T, runOnUpdate?: (fields: T) => T) => (value: any) => void;
|
|
91
|
-
wrapInValidatorProvider: (customValidators: SkedFormValidationProps<T>['customValidators']) => JSX.Element;
|
|
91
|
+
wrapInValidatorProvider: (customValidators: SkedFormValidationProps<T>['customValidators']) => React.JSX.Element;
|
|
92
92
|
handleClick: (evt: React.FormEvent<HTMLElement>) => void;
|
|
93
93
|
handleFormSubmit: (formData: FormContext<T>) => Promise<void>;
|
|
94
94
|
setFormReadonly: (event?: React.FormEvent<HTMLElement>) => void;
|
|
95
95
|
resetFieldsToInitialValues: () => void;
|
|
96
|
-
renderFormValidation: () => JSX.Element;
|
|
97
|
-
render(): JSX.Element;
|
|
96
|
+
renderFormValidation: () => React.JSX.Element;
|
|
97
|
+
render(): React.JSX.Element;
|
|
98
98
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { ISelectItem, AsyncMultiSearchSelectBox } from './interfaces';
|
|
3
|
-
export declare const AsyncMultiSearchSelect: <T extends ISelectItem<any>>({ fetchItems, debounceTime, fetchStrategy, useCache, minChars, onSelectedItemsChange, disabled, ...rest }: AsyncMultiSearchSelectBox<T>) => JSX.Element;
|
|
3
|
+
export declare const AsyncMultiSearchSelect: <T extends ISelectItem<any>>({ fetchItems, debounceTime, fetchStrategy, useCache, minChars, onSelectedItemsChange, disabled, ...rest }: AsyncMultiSearchSelectBox<T>) => React.JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { ISelectItem, AsyncSelectBox } from './interfaces';
|
|
3
3
|
/**
|
|
4
4
|
* Asynchronous version of SearchSelect for use with remote fetching
|
|
5
5
|
*/
|
|
6
|
-
export declare const AsyncSearchSelect: <T extends ISelectItem<any>>({ fetchItems, debounceTime, fetchStrategy, useCache, minChars, icon, id, name, placeholder, autoFocus, className, onSelectedItemChange, disabled, itemToString, ItemRenderer, ...rest }: AsyncSelectBox<T>) => JSX.Element;
|
|
6
|
+
export declare const AsyncSearchSelect: <T extends ISelectItem<any>>({ fetchItems, debounceTime, fetchStrategy, useCache, minChars, icon, id, name, placeholder, autoFocus, className, onSelectedItemChange, disabled, itemToString, ItemRenderer, ...rest }: AsyncSelectBox<T>) => React.JSX.Element;
|
|
@@ -30,25 +30,25 @@ declare type FormElementProps = InputFormValidationProps & React.InputHTMLAttrib
|
|
|
30
30
|
export declare class FormInputElement extends React.PureComponent<FormElementProps, {}> {
|
|
31
31
|
private _inputClassNames;
|
|
32
32
|
isOfTextType: () => boolean;
|
|
33
|
-
withInlineLabel: (inputComponent: React.ReactElement, props: FormElementProps) => JSX.Element;
|
|
34
|
-
render(): JSX.Element;
|
|
33
|
+
withInlineLabel: (inputComponent: React.ReactElement, props: FormElementProps) => React.JSX.Element;
|
|
34
|
+
render(): React.JSX.Element;
|
|
35
35
|
}
|
|
36
36
|
declare type LabelStatus = 'required' | 'optional';
|
|
37
37
|
/**
|
|
38
38
|
* Will render a form label and apply ‘required’ styling if required
|
|
39
39
|
*/
|
|
40
|
-
export declare const FormLabel: React.FunctionComponent<{
|
|
40
|
+
export declare const FormLabel: React.FunctionComponent<React.PropsWithChildren<{
|
|
41
41
|
status?: LabelStatus;
|
|
42
42
|
inline?: boolean;
|
|
43
|
-
} & React.LabelHTMLAttributes<HTMLLabelElement
|
|
43
|
+
} & React.LabelHTMLAttributes<HTMLLabelElement>>>;
|
|
44
44
|
/**
|
|
45
45
|
* FormElementWrapper should be used to wrap custom input components (such as Autocomplete). It will ensure that errors
|
|
46
46
|
* are displayed in a consistent fashion. The resulting input will need to have the class form-element__outline applied
|
|
47
47
|
* to it for us to hook into it to apply appropriate styling.
|
|
48
48
|
*/
|
|
49
|
-
export declare const FormElementWrapper: React.
|
|
49
|
+
export declare const FormElementWrapper: React.FC<React.PropsWithChildren<FormElementWrapperProps & ValidationProps & React.HTMLAttributes<HTMLDivElement>>>;
|
|
50
50
|
/**
|
|
51
51
|
* Use when a validation error isn’t tied to a particular field
|
|
52
52
|
*/
|
|
53
|
-
export declare const FormValidationCallout: React.FunctionComponent<ValidationProps & React.HTMLAttributes<HTMLDivElement
|
|
53
|
+
export declare const FormValidationCallout: React.FunctionComponent<React.PropsWithChildren<ValidationProps & React.HTMLAttributes<HTMLDivElement>>>;
|
|
54
54
|
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { ISelectItem, MultiSearchSelectBox } from './interfaces';
|
|
3
|
-
export declare const MultiSearchSelect: <T extends ISelectItem<any>>({ initialSelectedItems, items, id, name, placeholder, autoFocus, className, onSelectedItemsChange, disabled, loading, itemToString, ItemRenderer, MenuItemsRenderer, selectAll, onInputValueChange, onMenuToggle, getKey, ...rest }: MultiSearchSelectBox<T>) => JSX.Element;
|
|
3
|
+
export declare const MultiSearchSelect: <T extends ISelectItem<any>>({ initialSelectedItems, items, id, name, placeholder, autoFocus, className, onSelectedItemsChange, disabled, loading, itemToString, ItemRenderer, MenuItemsRenderer, selectAll, onInputValueChange, onMenuToggle, getKey, ...rest }: MultiSearchSelectBox<T>) => React.JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { ISelectItem, SelectBox } from './interfaces';
|
|
3
3
|
/**
|
|
4
4
|
* A searchable select component. Just like it's native counterpart, only a valid listed option is allowed.
|
|
5
5
|
*/
|
|
6
|
-
export declare const SearchSelect: <T extends ISelectItem<any>>({ id, name, items, placeholder, autoFocus, className, icon, onSelectedItemChange, disabled, onMenuToggle, loading, itemToString, ItemRenderer, filterHandler, itemIsValid, getNewItemData, ...rest }: SelectBox<T>) => JSX.Element;
|
|
6
|
+
export declare const SearchSelect: <T extends ISelectItem<any>>({ id, name, items, placeholder, autoFocus, className, icon, onSelectedItemChange, disabled, onMenuToggle, loading, itemToString, ItemRenderer, filterHandler, itemIsValid, getNewItemData, inputProps, ...rest }: SelectBox<T>) => React.JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
/// <reference types="
|
|
1
|
+
/// <reference types="@emotion/core" />
|
|
2
2
|
import { UseComboboxProps, UseMultipleSelectionProps } from 'downshift';
|
|
3
|
+
import { DOMAttributes } from 'react';
|
|
3
4
|
import { IconNames } from '../../icon/Icon';
|
|
4
5
|
export interface ISelectItem<T = any> {
|
|
5
6
|
value: T;
|
|
@@ -83,16 +84,18 @@ interface ISelectBox<T extends ISelectItem> extends ISearchSelect<T> {
|
|
|
83
84
|
export declare type SelectBox<T extends ISelectItem> = ISelectBox<T> & CommonComboBoxTypes<T> & Pick<UseComboboxProps<T>, 'initialSelectedItem' | 'selectedItem'> & {
|
|
84
85
|
onMenuToggle?: (isOpen: boolean) => void;
|
|
85
86
|
loading?: boolean;
|
|
87
|
+
} & {
|
|
88
|
+
inputProps?: DOMAttributes<HTMLDivElement>;
|
|
86
89
|
};
|
|
87
90
|
export declare type AsyncSelectBox<T extends ISelectItem> = Omit<SelectBox<T>, 'items' | 'itemIsValid' | 'getNewItemData'> & IAsyncSearchSelect<T>;
|
|
88
91
|
export interface IMultiSearchSelect<T extends ISelectItem> extends ISearchSelect<T> {
|
|
89
92
|
selectAll?: 'enabled' | 'disabled';
|
|
90
93
|
onMenuToggle?: (isOpen: boolean) => void;
|
|
91
|
-
MenuItemsRenderer?: React.FC<{
|
|
94
|
+
MenuItemsRenderer?: React.FC<React.PropsWithChildren<{
|
|
92
95
|
items: T[];
|
|
93
96
|
MenuItemRenderer: (item: T, index: number) => JSX.Element;
|
|
94
97
|
inputValue: string;
|
|
95
|
-
}
|
|
98
|
+
}>>;
|
|
96
99
|
onInputValueChange?: UseComboboxProps<T>['onInputValueChange'];
|
|
97
100
|
onSelectedItemsChange: (items: T[]) => void;
|
|
98
101
|
}
|
|
@@ -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;
|
|
@@ -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> {
|
|
@@ -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.
|
|
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>;
|
|
@@ -17,5 +17,5 @@ interface ILoadingSpinnerProps {
|
|
|
17
17
|
* Loading Spinner inherits the color used in the parent element.
|
|
18
18
|
* It accepts a size prop which defines the size of the spinner in px.
|
|
19
19
|
*/
|
|
20
|
-
export declare const LoadingSpinner: React.
|
|
20
|
+
export declare const LoadingSpinner: React.FC<ILoadingSpinnerProps>;
|
|
21
21
|
export {};
|