@skedulo/sked-ui 0.0.2-react-18-upgrade-test → 0.0.2-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/avatar/Avatar.d.ts +1 -1
- package/dist/components/avatar/AvatarDetail.d.ts +2 -2
- package/dist/components/avatar/AvatarGroup.d.ts +2 -2
- package/dist/components/avatar/Slot.d.ts +1 -1
- package/dist/components/badge/Badge.d.ts +1 -1
- package/dist/components/buttons/button/Button.d.ts +2 -2
- 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-utils.d.ts +2 -2
- package/dist/components/calendar-controls/CalendarControls.d.ts +3 -3
- package/dist/components/calendar-controls/elements/DateSelector.d.ts +2 -2
- package/dist/components/calendar-controls/elements/RangePicker.d.ts +2 -2
- package/dist/components/calendar-controls/elements/TodayButton.d.ts +1 -1
- package/dist/components/datepicker/Datepicker.d.ts +2 -2
- package/dist/components/dynamic-table/DynamicTable-utils.d.ts +1 -1
- package/dist/components/dynamic-table/DynamicTable.d.ts +1 -1
- package/dist/components/dynamic-table/interfaces.d.ts +4 -4
- package/dist/components/filter-bar/FilterBar.d.ts +2 -2
- package/dist/components/filter-bar/filter-pill/FilterPill.d.ts +1 -1
- package/dist/components/filter-bar/interfaces.d.ts +1 -1
- package/dist/components/forms/ReadOnly.d.ts +1 -1
- package/dist/components/forms/SkedFormValidation.d.ts +4 -4
- package/dist/components/forms/elements/FormElements.d.ts +3 -3
- package/dist/components/forms/elements/NumberInput.d.ts +1 -1
- package/dist/components/forms/elements/PlainAsyncMultiSearchSelect.d.ts +1 -1
- package/dist/components/forms/elements/PlainMultiSearchSelect.d.ts +1 -1
- package/dist/components/forms/elements/SearchSelect.d.ts +1 -1
- package/dist/components/forms/elements/TextArea.d.ts +1 -1
- package/dist/components/forms/elements/interfaces.d.ts +5 -5
- package/dist/components/forms/elements/select-components.d.ts +2 -2
- package/dist/components/forms/elements/select-hooks.d.ts +2 -2
- package/dist/components/icon/Icon.d.ts +1 -1
- package/dist/components/info-card/InfoCardBody.d.ts +1 -1
- package/dist/components/info-card/InfoCardFooter.d.ts +1 -1
- package/dist/components/info-card/InfoCardHeader.d.ts +1 -1
- package/dist/components/loader/Loading.d.ts +1 -1
- package/dist/components/loader/spinner/LoadingSpinner.d.ts +1 -1
- package/dist/components/lozenge/CustomLozenge.d.ts +2 -2
- package/dist/components/lozenge/Lozenge.d.ts +4 -4
- package/dist/components/menus/actionmenu/ActionMenu.d.ts +1 -1
- package/dist/components/menus/cardactionmenu/CardActionMenu.d.ts +1 -1
- package/dist/components/modals/Modals.d.ts +1 -1
- package/dist/components/pagination/Pagination.d.ts +1 -1
- 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 +1 -1
- package/dist/components/popout/usePopOut.d.ts +1 -1
- package/dist/components/popups/info-window/InfoWindow.d.ts +3 -3
- package/dist/components/popups/info-window/LegacyInfoWindow.d.ts +2 -2
- package/dist/components/popups/info-window/info-window-utils.d.ts +1 -1
- package/dist/components/popups/tooltip/Tooltip.d.ts +3 -3
- package/dist/components/status-icon/StatusIcon.d.ts +1 -1
- package/dist/components/table/Table.d.ts +2 -2
- package/dist/components/tabs/Tabs/Tabs.d.ts +1 -1
- package/dist/components/tabs/Tabs/interfaces.d.ts +1 -1
- package/dist/components/text/MultilineContent.d.ts +1 -1
- package/dist/index.js +46 -29
- package/package.json +6 -5
- package/yarn.lock +213 -107
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
export
|
|
2
|
+
export type AvatarSizes = 'tiny' | 'small' | 'medium' | 'large';
|
|
3
3
|
export interface IAvatar extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
4
|
/** This will be used for the 'letter' display and be the
|
|
5
5
|
* default tooltip text if showTooltip is true
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { IAvatar } from './Avatar';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
type AvatarDetailGroupSize = 'tiny' | 'small' | 'medium' | 'large';
|
|
4
|
+
type AvatarProps = Pick<IAvatar, 'name' | 'imageUrl'>;
|
|
5
5
|
export interface IAvatarDetailProps extends AvatarProps {
|
|
6
6
|
/**
|
|
7
7
|
* 'medium' is the default
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { IAvatar, AvatarSizes } from './Avatar';
|
|
3
|
-
export
|
|
3
|
+
export type IAvatarInfo = Partial<Pick<IAvatar, 'name' | 'imageUrl' | 'tooltipText'> & {
|
|
4
4
|
onClick: () => void;
|
|
5
5
|
}>;
|
|
6
6
|
export interface IAvatarGroupProps {
|
|
@@ -24,4 +24,4 @@ export interface IAvatarGroupProps {
|
|
|
24
24
|
*/
|
|
25
25
|
emptySlotTooltipText?: string;
|
|
26
26
|
}
|
|
27
|
-
export declare const AvatarGroup: React.FC<
|
|
27
|
+
export declare const AvatarGroup: React.FC<IAvatarGroupProps>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
export
|
|
2
|
+
export 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 {
|
|
5
5
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { IconNames } from '../../icon/Icon';
|
|
3
|
-
export
|
|
4
|
-
export
|
|
3
|
+
export type ButtonTypes = 'primary' | 'secondary' | 'transparent';
|
|
4
|
+
export type IButtonProps = {
|
|
5
5
|
/**
|
|
6
6
|
* The type of button to be displayed. Primary | Secondary | Transparent
|
|
7
7
|
*/
|
|
@@ -8,6 +8,6 @@ interface IconButtonProps {
|
|
|
8
8
|
tooltipDelay?: ITooltipProps['delayShow'];
|
|
9
9
|
disableTooltip?: boolean;
|
|
10
10
|
}
|
|
11
|
-
export
|
|
11
|
+
export type IIconButton = IconButtonProps & Partial<IButtonProps>;
|
|
12
12
|
export declare const IconButton: React.FC<React.PropsWithChildren<IIconButton>>;
|
|
13
13
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { IIconButton } from '../icon-button/IconButton';
|
|
3
3
|
import { IButtonDropdownCommon } from '../interfaces';
|
|
4
|
-
export
|
|
4
|
+
export type IconButtonDropdown = IIconButton & IButtonDropdownCommon;
|
|
5
5
|
export declare const IconButtonDropdown: React.FC<React.PropsWithChildren<IconButtonDropdown>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RangeType } from './elements/RangePicker';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
2
|
+
export type DateDirection = 'forward' | 'backward';
|
|
3
|
+
export type DateFormat = 'MonthDayYear' | 'DayMonthYear';
|
|
4
4
|
export declare const moveDate: (selected: Date, days: RangeType, direction: DateDirection) => Date;
|
|
5
5
|
export declare const endOfPeriod: (selected: Date, selectedRange: RangeType) => Date;
|
|
6
6
|
export declare const formatLongDate: (date: Date, dateFormat?: DateFormat) => string;
|
|
@@ -22,9 +22,9 @@ export interface ICalendarControlProps extends React.HTMLAttributes<HTMLDivEleme
|
|
|
22
22
|
export declare function useCalendarControlsContext(): ICalendarControlProps;
|
|
23
23
|
declare function CalendarControls(props: ICalendarControlProps): React.JSX.Element;
|
|
24
24
|
declare namespace CalendarControls {
|
|
25
|
-
var TodayButton: React.FC<
|
|
25
|
+
var TodayButton: React.FC<import("./elements/TodayButton").ITodayButtonProps>;
|
|
26
26
|
var NavigationButtons: (props: INavigationButtonProps) => React.JSX.Element;
|
|
27
|
-
var DateSelector: React.FC<
|
|
28
|
-
var RangePicker: React.FC<
|
|
27
|
+
var DateSelector: React.FC<IDateSelectorProps>;
|
|
28
|
+
var RangePicker: React.FC<IRangeProps>;
|
|
29
29
|
}
|
|
30
30
|
export { CalendarControls, RangePicker, RangeType };
|
|
@@ -3,7 +3,7 @@ import { ReactDatePickerProps } from 'react-datepicker';
|
|
|
3
3
|
import { ButtonTypes } from '../../..';
|
|
4
4
|
import { IBaseCalendarControlProps } from '../CalendarControls';
|
|
5
5
|
import { DateFormat } from '../CalendarControls-utils';
|
|
6
|
-
export
|
|
6
|
+
export type SelectDateHandler = (date: Date) => void;
|
|
7
7
|
export interface IBaseDateSelectorProps extends IBaseCalendarControlProps {
|
|
8
8
|
/**
|
|
9
9
|
* Whenever the date is changed, either through direct select, clicking to or navigating, the new date is provided to this function
|
|
@@ -44,4 +44,4 @@ export interface IDateSelectorProps extends IBaseDateSelectorProps, HTMLAttribut
|
|
|
44
44
|
*/
|
|
45
45
|
dateFormat?: DateFormat;
|
|
46
46
|
}
|
|
47
|
-
export declare const DateSelector: React.FC<
|
|
47
|
+
export declare const DateSelector: React.FC<IDateSelectorProps>;
|
|
@@ -10,7 +10,7 @@ export interface IRangeProps extends IBaseCalendarControlProps {
|
|
|
10
10
|
*/
|
|
11
11
|
rangeOptions?: RangeType[];
|
|
12
12
|
}
|
|
13
|
-
export
|
|
13
|
+
export type RangeType = 'day' | '3-days' | '2-weeks' | 'week' | 'month';
|
|
14
14
|
export declare const dateRangeLabel: {
|
|
15
15
|
day: string;
|
|
16
16
|
'3-days': string;
|
|
@@ -18,4 +18,4 @@ export declare const dateRangeLabel: {
|
|
|
18
18
|
'2-weeks': string;
|
|
19
19
|
month: string;
|
|
20
20
|
};
|
|
21
|
-
export declare const RangePicker: React.FC<
|
|
21
|
+
export declare const RangePicker: React.FC<IRangeProps>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ReactDatePickerProps } from 'react-datepicker';
|
|
3
3
|
import { RangeType } from '../calendar-controls/elements/RangePicker';
|
|
4
|
-
export
|
|
5
|
-
|
|
4
|
+
export type LocaleType = 'AU' | 'US' | 'UK';
|
|
5
|
+
type CustomInputType = React.InputHTMLAttributes<HTMLInputElement> & {
|
|
6
6
|
onBlurCustom: (event?: React.FocusEvent<HTMLInputElement>) => void;
|
|
7
7
|
openCalendar: (open: boolean) => void;
|
|
8
8
|
onBackspace: () => void;
|
|
@@ -26,7 +26,7 @@ export declare const getSortArgs: (sortByControl: ControlStates) => {
|
|
|
26
26
|
manualSortBy: boolean;
|
|
27
27
|
};
|
|
28
28
|
export declare const wrapperProps: ITableWrapper['getWrapperProps'];
|
|
29
|
-
export
|
|
29
|
+
export type SortIconProps<T extends object> = Pick<ITableHeaderCell<T>, 'canSort' | 'isSorted' | 'isSortedDesc' | 'getSortByToggleProps' | 'displayType'>;
|
|
30
30
|
export declare const SortIcon: <T extends object>({ canSort, isSorted, isSortedDesc, getSortByToggleProps, displayType }: SortIconProps<T>) => React.JSX.Element;
|
|
31
31
|
export declare const SelectCell: (props: Partial<TableToggleRowsSelectedProps>) => React.JSX.Element;
|
|
32
32
|
export declare const TableHeaderCell: <T extends object>(props: ITableHeaderCell<T>) => React.JSX.Element;
|
|
@@ -74,6 +74,6 @@ interface IDynamicTableProps<T extends object> {
|
|
|
74
74
|
*/
|
|
75
75
|
TableWrapper?: React.FC<React.PropsWithChildren<ITableWrapper>>;
|
|
76
76
|
}
|
|
77
|
-
export
|
|
77
|
+
export type IDynamicTable<T extends object> = Pick<TableOptions<T>, 'getRowId' | 'data' | 'initialState' | 'autoResetSortBy' | 'autoResetSelectedRows' | 'manualRowSelectedKey'> & UseRowClickOptions<T> & IDynamicTableProps<T>;
|
|
78
78
|
export declare const DynamicTable: <T extends object>(props: IDynamicTable<T>) => React.JSX.Element;
|
|
79
79
|
export {};
|
|
@@ -35,14 +35,14 @@ declare module 'react-table' {
|
|
|
35
35
|
export interface IDynamicTableColumn<T extends object> extends Omit<ColumnInterface<T>, 'Header'>, ColumnInterfaceBasedOnValue<T> {
|
|
36
36
|
Header?: Renderer<HeaderProps<T>> | undefined;
|
|
37
37
|
}
|
|
38
|
-
export
|
|
39
|
-
export
|
|
40
|
-
export
|
|
38
|
+
export type ControlStates = 'controlled' | 'uncontrolled' | 'disabled';
|
|
39
|
+
export type RowControlStates = 'rowOnly' | 'allRows' | 'disabled';
|
|
40
|
+
export type DisplayType = 'expanded' | 'condensed';
|
|
41
41
|
export interface ITableHeaderCell<T extends object> extends ColumnInstance<T> {
|
|
42
42
|
sticky: boolean;
|
|
43
43
|
displayType: DisplayType;
|
|
44
44
|
}
|
|
45
|
-
export
|
|
45
|
+
export type ICellContentRenderer<T extends object> = Pick<IDynamicTableColumn<T>, 'Header' | 'emptyCellText' | 'id'> & Pick<UseTableCellProps<T>, 'value'>;
|
|
46
46
|
interface IGetWrapperProps {
|
|
47
47
|
className: string;
|
|
48
48
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { IFilter, IAppliedFilter as AppliedFilter, IFilterItem as FilterItem, IAddedFilter } from './interfaces';
|
|
3
|
-
export
|
|
4
|
-
export
|
|
3
|
+
export type IAppliedFilter<T extends FilterItem> = AppliedFilter<T>;
|
|
4
|
+
export type IFilterItem = FilterItem;
|
|
5
5
|
export interface IFilterBarProps<T extends IFilterItem> {
|
|
6
6
|
/**
|
|
7
7
|
* An array of filter options. If a filter item is set to 'static' then it is permanently fixed and unable to be edited.
|
|
@@ -7,7 +7,7 @@ interface IFilterPillProps {
|
|
|
7
7
|
removable?: boolean;
|
|
8
8
|
className?: string;
|
|
9
9
|
}
|
|
10
|
-
export
|
|
10
|
+
export type FilterPillProps<T extends IFilterItem> = IFilterPillProps & Omit<IAppliedFilter<T>, 'isReadonly' | 'removable'>;
|
|
11
11
|
export declare class FilterPill<T extends IFilterItem> extends React.PureComponent<FilterPillProps<T>, {}> {
|
|
12
12
|
static defaultProps: {
|
|
13
13
|
onRemove: (...args: any[]) => void;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { FormContext, FormProps, ValidationContext, Transforms, FieldsConfig, CustomValidatorFunction, ValueValidatorConfig } from 'calidation';
|
|
3
3
|
export { Dirty, Errors, Fields, Transform, Transforms, FieldsConfig, Validator, FormContext, CustomValidatorFunction, SimpleValidator, SimpleValidatorConfig, FieldConfig, ValueValidatorConfig, ValueValidator, ValidatorContext } from 'calidation';
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
4
|
+
export type FormSubmission<T extends object> = FormContext<T>;
|
|
5
|
+
export type FormConfig<T extends object> = FieldsConfig<T>;
|
|
6
|
+
export type CustomValueValidatorFunction<T extends object, P = any> = (config: ValueValidatorConfig<P, T>) => (value: P) => string | null;
|
|
7
7
|
interface IBehaviourOptions {
|
|
8
8
|
clickToEdit: boolean;
|
|
9
9
|
}
|
|
10
|
-
export
|
|
10
|
+
export type SkedFormChildren<T extends object> = Omit<ValidationContext<T>, 'dirty'> & {
|
|
11
11
|
isFormReadonly: boolean;
|
|
12
12
|
fieldsModified: Set<keyof T>;
|
|
13
13
|
setFormReadonly: (event?: React.FormEvent<HTMLElement>) => void;
|
|
@@ -6,7 +6,7 @@ interface InputFormValidationProps {
|
|
|
6
6
|
inputAndInlineLabelWrapperClassName?: string;
|
|
7
7
|
inputRef?: React.Ref<HTMLInputElement>;
|
|
8
8
|
}
|
|
9
|
-
|
|
9
|
+
type InputSize = 'x-small' | 'small' | 'medium' | 'large' | 'x-large' | 'full';
|
|
10
10
|
interface FormElementWrapperProps {
|
|
11
11
|
readOnlyValue?: string;
|
|
12
12
|
isReadOnly?: boolean;
|
|
@@ -21,7 +21,7 @@ export interface ValidationProps {
|
|
|
21
21
|
error?: string | null;
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
-
|
|
24
|
+
type FormElementProps = InputFormValidationProps & React.InputHTMLAttributes<HTMLInputElement>;
|
|
25
25
|
/**
|
|
26
26
|
* Standard form inputs should be created using FormElement. It is responsible for creating the type of input you need as well as
|
|
27
27
|
* displaying validation errors. Radio’s and Checkboxes can utilise the inlineLabel prop to show a label inline with the input.
|
|
@@ -33,7 +33,7 @@ export declare class FormInputElement extends React.PureComponent<FormElementPro
|
|
|
33
33
|
withInlineLabel: (inputComponent: React.ReactElement, props: FormElementProps) => React.JSX.Element;
|
|
34
34
|
render(): React.JSX.Element;
|
|
35
35
|
}
|
|
36
|
-
|
|
36
|
+
type LabelStatus = 'required' | 'optional';
|
|
37
37
|
/**
|
|
38
38
|
* Will render a form label and apply ‘required’ styling if required
|
|
39
39
|
*/
|
|
@@ -13,5 +13,5 @@ interface INumberInputProps extends React.InputHTMLAttributes<HTMLInputElement>
|
|
|
13
13
|
maxLength?: number;
|
|
14
14
|
precision?: number;
|
|
15
15
|
}
|
|
16
|
-
export declare const NumberInput: React.FunctionComponent<
|
|
16
|
+
export declare const NumberInput: React.FunctionComponent<INumberInputProps>;
|
|
17
17
|
export {};
|
|
@@ -5,4 +5,4 @@ export interface IPlainAsyncMultiSearchSelectProps {
|
|
|
5
5
|
fetchItems: (searchTerm: string) => Promise<ISelectItem[]>;
|
|
6
6
|
onSelectedItemsChange: (items: ISelectItem[]) => void;
|
|
7
7
|
}
|
|
8
|
-
export declare const PlainAsyncMultiSearchSelect: React.FC<
|
|
8
|
+
export declare const PlainAsyncMultiSearchSelect: React.FC<IPlainAsyncMultiSearchSelectProps>;
|
|
@@ -13,7 +13,7 @@ interface IPlainMultiSelectProps {
|
|
|
13
13
|
itemToString?: (item: ISelectItem) => string;
|
|
14
14
|
loading?: boolean;
|
|
15
15
|
}
|
|
16
|
-
export declare const PlainMultiSearchSelect: React.FC<
|
|
16
|
+
export declare const PlainMultiSearchSelect: React.FC<IPlainMultiSelectProps>;
|
|
17
17
|
export interface IPlainMenuRendererProps extends IMenuProps {
|
|
18
18
|
items: ISelectItem[];
|
|
19
19
|
isItemSelected: (item: ISelectItem) => boolean;
|
|
@@ -3,4 +3,4 @@ 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, inputProps, ...rest }: SelectBox<T>) => React.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: restInputProps, ...rest }: SelectBox<T>) => React.JSX.Element;
|
|
@@ -21,5 +21,5 @@ interface ITextArea extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
|
21
21
|
*/
|
|
22
22
|
onChange?: (event: React.ChangeEvent<HTMLTextAreaElement>) => void;
|
|
23
23
|
}
|
|
24
|
-
export declare const TextArea: React.FunctionComponent<
|
|
24
|
+
export declare const TextArea: React.FunctionComponent<ITextArea>;
|
|
25
25
|
export {};
|
|
@@ -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,13 +81,13 @@ 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;
|
|
@@ -99,10 +99,10 @@ export interface IMultiSearchSelect<T extends ISelectItem> extends ISearchSelect
|
|
|
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 {};
|
|
@@ -16,14 +16,14 @@ interface ISearchSelectTrigger {
|
|
|
16
16
|
className?: string;
|
|
17
17
|
icon?: IconNames;
|
|
18
18
|
}
|
|
19
|
-
export declare const SearchSelectTrigger: React.FC<
|
|
19
|
+
export declare const SearchSelectTrigger: React.FC<ISearchSelectTrigger & React.InputHTMLAttributes<HTMLInputElement>>;
|
|
20
20
|
export declare const SelectMenu: React.ForwardRefExoticComponent<IMenuProps & React.RefAttributes<HTMLUListElement>>;
|
|
21
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;
|
|
25
25
|
}
|
|
26
|
-
export declare const PlainMultiSelectMenuItem: React.FC<
|
|
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
29
|
}) => React.JSX.Element;
|
|
@@ -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
|
}
|
|
@@ -9,5 +9,5 @@ interface IInfoCardBody {
|
|
|
9
9
|
*/
|
|
10
10
|
exception?: React.ReactNode;
|
|
11
11
|
}
|
|
12
|
-
export declare const InfoCardBody: React.FC<
|
|
12
|
+
export declare const InfoCardBody: React.FC<IInfoCardBody & React.HTMLAttributes<HTMLDivElement>>;
|
|
13
13
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
export declare const InfoCardFooter: React.FC<React.
|
|
2
|
+
export declare const InfoCardFooter: React.FC<React.HTMLAttributes<HTMLDivElement>>;
|
|
@@ -7,5 +7,5 @@ interface IInfoCardHeaderProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
7
7
|
onView?: ICardActionMenu['onView'];
|
|
8
8
|
actions?: ICardActionMenu['menuItems'];
|
|
9
9
|
}
|
|
10
|
-
export declare const InfoCardHeader: React.FC<
|
|
10
|
+
export declare const InfoCardHeader: React.FC<IInfoCardHeaderProps>;
|
|
11
11
|
export {};
|
|
@@ -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.FC<
|
|
20
|
+
export declare const LoadingSpinner: React.FC<ILoadingSpinnerProps>;
|
|
21
21
|
export {};
|
|
@@ -16,6 +16,6 @@ interface ICustomLozenge {
|
|
|
16
16
|
icon?: IconNames;
|
|
17
17
|
tooltipPosition?: ITooltipPosition;
|
|
18
18
|
}
|
|
19
|
-
|
|
20
|
-
export declare const CustomLozenge: React.FC<
|
|
19
|
+
type LozengeProps = ICustomLozenge & React.HTMLAttributes<HTMLDivElement>;
|
|
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
|
-
|
|
21
|
-
export declare const Lozenge: React.FC<
|
|
20
|
+
type LozengeProps = ILozenge & React.HTMLAttributes<HTMLDivElement>;
|
|
21
|
+
export declare const Lozenge: React.FC<LozengeProps>;
|
|
22
22
|
export {};
|
|
@@ -10,4 +10,4 @@ export interface IActionMenu extends Omit<IconButtonDropdown, 'icon' | 'tooltipC
|
|
|
10
10
|
/**
|
|
11
11
|
* ActionMenu is a utility component for generating a menu triggered from an ellipse icon
|
|
12
12
|
*/
|
|
13
|
-
export declare const ActionMenu: React.FC<
|
|
13
|
+
export declare const ActionMenu: React.FC<IActionMenu>;
|
|
@@ -7,4 +7,4 @@ export interface ICardActionMenu extends Partial<Pick<IActionMenu, 'menuItems'>>
|
|
|
7
7
|
/**
|
|
8
8
|
* CardActionMenu is used for InfoCards
|
|
9
9
|
*/
|
|
10
|
-
export declare const CardActionMenu: React.FC<
|
|
10
|
+
export declare const CardActionMenu: React.FC<ICardActionMenu>;
|
|
@@ -1,5 +1,5 @@
|
|
|
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;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { IPagination } from '../interfaces';
|
|
3
|
-
export declare const Arrow: React.FC<
|
|
3
|
+
export declare const Arrow: React.FC<{
|
|
4
4
|
direction: 'left' | 'right';
|
|
5
5
|
disable: boolean;
|
|
6
6
|
onClick: (event: React.MouseEvent) => void;
|
|
7
|
-
}
|
|
8
|
-
export declare const Ellipsis: React.
|
|
7
|
+
}>;
|
|
8
|
+
export declare const Ellipsis: () => React.JSX.Element;
|
|
9
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
|
-
export declare const PaginationPages: React.FC<
|
|
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
|
|
@@ -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
|
|
@@ -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
|
|
@@ -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;
|
|
@@ -2,9 +2,9 @@ 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'
|
|
@@ -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)
|