@luscii-healthtech/web-ui 2.71.6 → 2.71.7
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/AccordionList/AccordionList.d.ts +4 -4
- package/dist/components/Avatar/Avatar.d.ts +2 -1
- package/dist/components/Badge/Badge.d.ts +1 -0
- package/dist/components/BaseList/BaseList.types.d.ts +7 -7
- package/dist/components/BaseList/ListSkeleton/ListItemSkeleton.d.ts +1 -0
- package/dist/components/BaseList/ListSkeleton/ListSkeleton.d.ts +2 -1
- package/dist/components/BaseList/utils.d.ts +1 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.types.d.ts +1 -1
- package/dist/components/Button/Button.d.ts +1 -0
- package/dist/components/Button/Button.types.d.ts +3 -3
- package/dist/components/Button/ButtonIcon.d.ts +1 -0
- package/dist/components/ButtonV2/ButtonProps.type.d.ts +2 -2
- package/dist/components/ButtonV2/ButtonV2.d.ts +1 -1
- package/dist/components/ButtonV2/PrimaryButton.d.ts +1 -0
- package/dist/components/ButtonV2/SecondaryButton.d.ts +1 -1
- package/dist/components/ButtonV2/TertiaryButton.d.ts +1 -0
- package/dist/components/Card/Card.d.ts +1 -1
- package/dist/components/CenteredHero/CenteredHero.d.ts +3 -2
- package/dist/components/CheckBoxListModal/CheckboxListModal.d.ts +2 -1
- package/dist/components/CheckboxList/CheckboxGroup.d.ts +1 -0
- package/dist/components/CheckboxList/CheckboxList.d.ts +1 -0
- package/dist/components/CheckboxList/CheckboxList.types.d.ts +3 -3
- package/dist/components/CheckboxList/CheckboxListItem.d.ts +1 -0
- package/dist/components/Container/types/FlexContainerProps.type.d.ts +4 -4
- package/dist/components/Datepicker/Datepicker.d.ts +1 -1
- package/dist/components/Divider/Divider.d.ts +1 -1
- package/dist/components/DragHandle/DragHandle.types.d.ts +1 -1
- package/dist/components/Dropdown/Dropdown.d.ts +7 -7
- package/dist/components/Dropzone/Dropzone.types.d.ts +2 -2
- package/dist/components/EmptyListMessage/EmptyListMessage.d.ts +1 -0
- package/dist/components/ErrorBlock/ErrorBlock.d.ts +2 -1
- package/dist/components/Form/Form.d.ts +1 -0
- package/dist/components/Form/FormFieldLabeler.d.ts +1 -0
- package/dist/components/Form/form.types.d.ts +5 -5
- package/dist/components/Icons/AddIcon.d.ts +1 -0
- package/dist/components/Icons/AlertsIcon.d.ts +1 -0
- package/dist/components/Icons/BellIcon.d.ts +1 -0
- package/dist/components/Icons/BluetoothIcon.d.ts +1 -0
- package/dist/components/Icons/ChartIcon.d.ts +1 -0
- package/dist/components/Icons/ChartLineColoredIcon.d.ts +1 -0
- package/dist/components/Icons/ChatBoxIcon.d.ts +1 -0
- package/dist/components/Icons/CheckIcon.d.ts +1 -0
- package/dist/components/Icons/ChevronDoubleIcon.d.ts +1 -0
- package/dist/components/Icons/ChevronDownIcon.d.ts +1 -0
- package/dist/components/Icons/ChevronRightIcon.d.ts +1 -0
- package/dist/components/Icons/CrossIcon.d.ts +1 -0
- package/dist/components/Icons/DeleteIcon.d.ts +1 -0
- package/dist/components/Icons/DownArrowIcon.d.ts +1 -0
- package/dist/components/Icons/DragIcon.d.ts +1 -0
- package/dist/components/Icons/EditIcon.d.ts +1 -0
- package/dist/components/Icons/EmptyIcon.d.ts +1 -0
- package/dist/components/Icons/EmptyStateDashboardIcon.d.ts +1 -0
- package/dist/components/Icons/ExclamationMarkIcon.d.ts +1 -0
- package/dist/components/Icons/EyeIcon.d.ts +1 -0
- package/dist/components/Icons/GearColoredIcon.d.ts +1 -0
- package/dist/components/Icons/GearIcon.d.ts +1 -0
- package/dist/components/Icons/GroupColoredIcon.d.ts +1 -0
- package/dist/components/Icons/GroupIcon.d.ts +1 -0
- package/dist/components/Icons/HamburgerIcon.d.ts +1 -0
- package/dist/components/Icons/HeartIcon.d.ts +1 -0
- package/dist/components/Icons/ImageIcon.d.ts +1 -0
- package/dist/components/Icons/InfoIcon.d.ts +1 -0
- package/dist/components/Icons/LeftArrowIcon.d.ts +1 -0
- package/dist/components/Icons/LightBulbIcon.d.ts +1 -0
- package/dist/components/Icons/LinkIcon.d.ts +1 -0
- package/dist/components/Icons/LockIcon.d.ts +1 -0
- package/dist/components/Icons/MessagesIcon.d.ts +1 -0
- package/dist/components/Icons/MouseIcon.d.ts +1 -0
- package/dist/components/Icons/NotesIcon.d.ts +1 -0
- package/dist/components/Icons/PinIcon.d.ts +1 -0
- package/dist/components/Icons/PrintIcon.d.ts +1 -0
- package/dist/components/Icons/RightArrowIcon.d.ts +1 -0
- package/dist/components/Icons/SearchCancelIcon.d.ts +1 -0
- package/dist/components/Icons/SearchIcon.d.ts +1 -0
- package/dist/components/Icons/SmallCircleIcon.d.ts +1 -0
- package/dist/components/Icons/SmallDiamondIcon.d.ts +1 -0
- package/dist/components/Icons/SmallSquareIcon.d.ts +1 -0
- package/dist/components/Icons/SpaceRocketIcon.d.ts +1 -0
- package/dist/components/Icons/StarIcon.d.ts +1 -0
- package/dist/components/Icons/StatusColoredIcon.d.ts +1 -0
- package/dist/components/Icons/WarningIcon.d.ts +1 -0
- package/dist/components/Icons/types/IconProps.type.d.ts +1 -1
- package/dist/components/InfoBlock/InfoBlock.d.ts +2 -1
- package/dist/components/InfoField/InfoField.d.ts +2 -1
- package/dist/components/Input/Input.d.ts +2 -2
- package/dist/components/Input/SearchInput.d.ts +1 -1
- package/dist/components/Line/Line.d.ts +2 -1
- package/dist/components/List/List.types.d.ts +6 -6
- package/dist/components/LoadingIndicator/LoadingIndicator.d.ts +1 -0
- package/dist/components/Menu/Menu.d.ts +2 -2
- package/dist/components/Modal/FullPageModal.d.ts +1 -1
- package/dist/components/Modal/FullPageModalHeader.d.ts +1 -1
- package/dist/components/Modal/Modal.d.ts +1 -1
- package/dist/components/Modal/ModalBase.d.ts +2 -2
- package/dist/components/Modal/ModalFooter.d.ts +2 -2
- package/dist/components/Modal/ModalHeader.d.ts +1 -1
- package/dist/components/MultiSelect/MultiSelect.d.ts +2 -1
- package/dist/components/NavMenu/NavMenu.d.ts +2 -1
- package/dist/components/NavMenu/NavMenuItem.d.ts +1 -0
- package/dist/components/NavMenu/types/NavMenuItemProps.type.d.ts +1 -1
- package/dist/components/NotificationBanner/NotificationBanner.d.ts +2 -2
- package/dist/components/Page/CRUDPage.types.d.ts +5 -5
- package/dist/components/Page/Page.d.ts +8 -7
- package/dist/components/PaginationMenu/PaginationMenu.d.ts +1 -0
- package/dist/components/PaginationMenu/PaginationMenu.types.d.ts +3 -3
- package/dist/components/PaginationMenu/PaginationMenuLarge.d.ts +1 -0
- package/dist/components/PaginationMenu/PaginationMenuSmall.d.ts +1 -0
- package/dist/components/Radio/Radio.d.ts +2 -2
- package/dist/components/RadioGroup/RadioGroup.d.ts +4 -3
- package/dist/components/Section/SectionItemWithContent.d.ts +1 -0
- package/dist/components/Select/SelectDropdownIndicator.d.ts +1 -0
- package/dist/components/Select/SelectLoadingIndicator.d.ts +1 -0
- package/dist/components/Spinner/Spinner.d.ts +1 -0
- package/dist/components/Steps/Step.d.ts +1 -0
- package/dist/components/Steps/Steps.d.ts +1 -0
- package/dist/components/Switcher/Switcher.d.ts +4 -3
- package/dist/components/Switcher/SwitcherItem.d.ts +4 -3
- package/dist/components/TabLinks/TabLinks.d.ts +1 -0
- package/dist/components/Tabbar/Tabbar.d.ts +1 -0
- package/dist/components/Tabbar/TabbarItem.d.ts +1 -0
- package/dist/components/Table/Table.types.d.ts +7 -6
- package/dist/components/Table/TableBody.d.ts +1 -0
- package/dist/components/Table/TableBodyRow.d.ts +1 -0
- package/dist/components/Table/TableBodyRowDataCell.d.ts +1 -0
- package/dist/components/Table/TableFooter.d.ts +1 -0
- package/dist/components/Table/TableHeader.d.ts +1 -0
- package/dist/components/Tag/Tag.d.ts +1 -0
- package/dist/components/Tag/TagGroup.d.ts +1 -0
- package/dist/components/Text/LegacyText.d.ts +2 -1
- package/dist/components/Text/Text.d.ts +4 -3
- package/dist/components/TextEditor/TextEditor.d.ts +2 -1
- package/dist/components/TextEditorV2/TextEditorV2.d.ts +2 -1
- package/dist/components/TextLink/TextLink.d.ts +1 -0
- package/dist/components/Textarea/Textarea.d.ts +1 -1
- package/dist/components/Timeline/Timeline.d.ts +1 -0
- package/dist/components/Timeline/TimelineHeader.d.ts +1 -1
- package/dist/components/Timeline/TimelineStep.d.ts +1 -1
- package/dist/components/Title/Title.d.ts +1 -1
- package/dist/components/Toaster/Toaster.d.ts +1 -1
- package/dist/components/Toaster/toast.d.ts +1 -1
- package/dist/components/ViewItem/ViewItem.d.ts +1 -0
- package/dist/types/general.types.d.ts +1 -1
- package/dist/web-ui.cjs.development.js +945 -1574
- package/dist/web-ui.cjs.development.js.map +1 -1
- package/dist/web-ui.cjs.production.min.js +1 -1
- package/dist/web-ui.cjs.production.min.js.map +1 -1
- package/dist/web-ui.esm.js +945 -1574
- package/dist/web-ui.esm.js.map +1 -1
- package/package.json +15 -12
|
@@ -14,19 +14,19 @@ export interface AccordionListProps extends Omit<AccordionProps, "items"> {
|
|
|
14
14
|
isSearchEnabled?: boolean;
|
|
15
15
|
isLoading?: boolean;
|
|
16
16
|
}
|
|
17
|
-
export
|
|
17
|
+
export type AccordionListItemProps<T = ListItemProps> = Omit<AccordionItemProps, "content"> & {
|
|
18
18
|
listItems: T[];
|
|
19
19
|
draggableListType?: "default";
|
|
20
20
|
};
|
|
21
|
-
export
|
|
21
|
+
export type DraggableAccordionListItemProps = Omit<AccordionItemProps, "content"> & {
|
|
22
22
|
draggableListType: "draggable";
|
|
23
23
|
listItems: DraggableListProps["items"];
|
|
24
24
|
};
|
|
25
|
-
export
|
|
25
|
+
export type SortableAccordionListItemProps = Omit<AccordionItemProps, "content"> & {
|
|
26
26
|
draggableListType: "sortable";
|
|
27
27
|
draggableIdentifier: string;
|
|
28
28
|
listItems: SortableListProps["items"];
|
|
29
29
|
};
|
|
30
|
-
export
|
|
30
|
+
export type AccordionItem = AccordionListItemProps | DraggableAccordionListItemProps | SortableAccordionListItemProps;
|
|
31
31
|
export declare const AccordionList: React.FC<AccordionListProps>;
|
|
32
32
|
export default AccordionList;
|
|
@@ -4,7 +4,7 @@ export function Avatar({ size, src, defaultImage, initials, className }: {
|
|
|
4
4
|
defaultImage: any;
|
|
5
5
|
initials: any;
|
|
6
6
|
className: any;
|
|
7
|
-
}): JSX.Element;
|
|
7
|
+
}): React.JSX.Element;
|
|
8
8
|
export namespace Avatar {
|
|
9
9
|
namespace propTypes {
|
|
10
10
|
const src: PropTypes.Requireable<string>;
|
|
@@ -21,6 +21,7 @@ export namespace Avatar {
|
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
export default Avatar;
|
|
24
|
+
import React from "react";
|
|
24
25
|
import PropTypes from "prop-types";
|
|
25
26
|
declare namespace AVATAR_SIZE_OPTIONS {
|
|
26
27
|
const LARGE: string;
|
|
@@ -3,7 +3,7 @@ import { PrimaryButtonProps } from "../..";
|
|
|
3
3
|
import { ButtonDefinition } from "../ButtonV2/ButtonProps.type";
|
|
4
4
|
import { IconProps } from "../Icons/types/IconProps.type";
|
|
5
5
|
import { TitleProps } from "../Title/Title";
|
|
6
|
-
export
|
|
6
|
+
export type BaseListItemProps = {
|
|
7
7
|
itemId: string | number;
|
|
8
8
|
title: string;
|
|
9
9
|
subtitle?: string;
|
|
@@ -24,7 +24,7 @@ export declare type BaseListItemProps = {
|
|
|
24
24
|
renderDragHandle?: () => ReactNode;
|
|
25
25
|
htmlProps?: React.HTMLProps<HTMLLIElement>;
|
|
26
26
|
};
|
|
27
|
-
export
|
|
27
|
+
export type OnAssetLoadErrorPayload = Pick<BaseListItemProps, "itemId" | "subtitle" | "title" | "icon">;
|
|
28
28
|
export interface BaseListProps<T extends BaseListItemProps = BaseListItemProps> {
|
|
29
29
|
items: T[];
|
|
30
30
|
title?: string | TitleProps;
|
|
@@ -38,18 +38,18 @@ export interface BaseListProps<T extends BaseListItemProps = BaseListItemProps>
|
|
|
38
38
|
withBorder?: boolean;
|
|
39
39
|
ref?: Ref<HTMLUListElement>;
|
|
40
40
|
}
|
|
41
|
-
export
|
|
41
|
+
export type BaseListHeaderProps = {
|
|
42
42
|
title?: string | TitleProps;
|
|
43
43
|
button?: ButtonDefinition<PrimaryButtonProps>;
|
|
44
44
|
transparent?: boolean;
|
|
45
45
|
withBorder?: boolean;
|
|
46
46
|
};
|
|
47
|
-
export
|
|
48
|
-
export
|
|
47
|
+
export type DraggableBaseListProps = Omit<BaseListProps<DraggableBaseListItemProps>, "itemComponent">;
|
|
48
|
+
export type DraggableBaseListItemProps = BaseListItemProps & {
|
|
49
49
|
draggableIdentifier: string;
|
|
50
50
|
draggableData?: Record<string, unknown>;
|
|
51
51
|
};
|
|
52
|
-
export
|
|
52
|
+
export type SortableBaseListProps = DraggableBaseListProps & {
|
|
53
53
|
draggableIdentifier: string;
|
|
54
54
|
};
|
|
55
|
-
export
|
|
55
|
+
export type SortableBaseListItemProps = DraggableBaseListItemProps;
|
|
@@ -3,7 +3,7 @@ import { ListItemProps } from "../List/List";
|
|
|
3
3
|
declare const draggableListItemPropsPointer: {
|
|
4
4
|
readonly symbol: symbol;
|
|
5
5
|
};
|
|
6
|
-
|
|
6
|
+
type DraggableListItemProps = WeakMap<typeof draggableListItemPropsPointer, Pick<ListItemProps, "itemId" | "title" | "subtitle" | "icon" | "isDraggable" | "isSelected">>;
|
|
7
7
|
export declare const createDraggableListProps: ({ itemId, title, subtitle, icon, isDraggable, isSelected, }: ListItemProps) => DraggableListItemProps;
|
|
8
8
|
export declare const draggableListPropsKey: "listItem";
|
|
9
9
|
export declare const getDndListItemProps: (subject: Active | Over) => ListItemProps | null;
|
|
@@ -12,9 +12,9 @@ export declare const BUTTON_ROLES: {
|
|
|
12
12
|
readonly LINK: "link";
|
|
13
13
|
readonly ICON: "icon";
|
|
14
14
|
};
|
|
15
|
-
|
|
16
|
-
export
|
|
17
|
-
export
|
|
15
|
+
type BUTTON_KEYS = keyof typeof BUTTON_ROLES;
|
|
16
|
+
export type BUTTON_TYPE = (typeof BUTTON_ROLES)[BUTTON_KEYS];
|
|
17
|
+
export type ButtonType = "button" | "submit";
|
|
18
18
|
export interface ButtonProps extends RestPropped {
|
|
19
19
|
text?: string;
|
|
20
20
|
role?: BUTTON_TYPE;
|
|
@@ -12,7 +12,7 @@ export interface BaseButtonProps extends React.ComponentPropsWithRef<"button"> {
|
|
|
12
12
|
className?: string;
|
|
13
13
|
dataTestId?: string;
|
|
14
14
|
}
|
|
15
|
-
export
|
|
15
|
+
export type NonPrimaryButtonProps = BaseButtonProps;
|
|
16
16
|
/**
|
|
17
17
|
* Extra properties that can be set when the variant of the button
|
|
18
18
|
* supports the pending state
|
|
@@ -21,7 +21,7 @@ export declare type NonPrimaryButtonProps = BaseButtonProps;
|
|
|
21
21
|
export interface ButtonWithPendingStateProps extends BaseButtonProps {
|
|
22
22
|
isPending?: boolean;
|
|
23
23
|
}
|
|
24
|
-
export
|
|
24
|
+
export type PrimaryButtonProps = ButtonWithPendingStateProps;
|
|
25
25
|
/**
|
|
26
26
|
* All properties of BaseButtonProps and ButtonWithPendingStateProps,
|
|
27
27
|
* plus other properties that are assigned internally by the button variants.
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { ButtonProps } from "./ButtonProps.type";
|
|
3
|
-
export declare const ButtonV2: React.ForwardRefExoticComponent<
|
|
3
|
+
export declare const ButtonV2: React.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { ButtonProps } from "./ButtonProps.type";
|
|
3
|
-
export declare const SecondaryButton: React.ForwardRefExoticComponent<
|
|
3
|
+
export declare const SecondaryButton: React.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { ButtonProps } from "../Button/Button.types";
|
|
2
|
-
export
|
|
3
|
-
export
|
|
3
|
+
export type BackgroundColor = "white" | "slate-50";
|
|
4
|
+
export type ImageSize = "small" | "large";
|
|
4
5
|
export interface CenteredHeroProps {
|
|
5
6
|
title: string;
|
|
6
7
|
text: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { CheckboxGroupItemProps } from "../CheckboxList/CheckboxList.types";
|
|
2
|
-
export
|
|
3
|
+
export type Item = {
|
|
3
4
|
group?: string;
|
|
4
5
|
isPinned?: boolean;
|
|
5
6
|
} & Pick<CheckboxGroupItemProps, "id" | "label" | "isChecked" | "isDisabled">;
|
|
@@ -9,7 +9,7 @@ export interface CheckboxListProps {
|
|
|
9
9
|
hasDividers?: boolean;
|
|
10
10
|
className?: string;
|
|
11
11
|
}
|
|
12
|
-
|
|
12
|
+
type WithCollapsible = {
|
|
13
13
|
/**
|
|
14
14
|
* When `false`, will prevent the checkbox list from being collapsed (also disabling clicking to expand/collapse)
|
|
15
15
|
* in the component and it will be displayed expanded by default.
|
|
@@ -17,7 +17,7 @@ declare type WithCollapsible = {
|
|
|
17
17
|
*/
|
|
18
18
|
collapsible?: boolean;
|
|
19
19
|
};
|
|
20
|
-
export
|
|
20
|
+
export type CheckboxGroupProps = {
|
|
21
21
|
title?: string;
|
|
22
22
|
items: CheckboxListItem[];
|
|
23
23
|
onChange: (event: CheckboxChangeEvent) => void;
|
|
@@ -40,7 +40,7 @@ export interface CheckboxListItem {
|
|
|
40
40
|
isDisabled?: boolean;
|
|
41
41
|
className?: string;
|
|
42
42
|
}
|
|
43
|
-
export
|
|
43
|
+
export type CheckboxGroup = {
|
|
44
44
|
title?: string;
|
|
45
45
|
items: CheckboxListItem[];
|
|
46
46
|
isCollapsed?: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
type Spacing = "tiny" | "none" | "small" | "medium" | "large";
|
|
3
|
+
type FlexContainerBase = {
|
|
4
4
|
alignItems?: "center" | "start" | "end";
|
|
5
5
|
justifyContent?: "center" | "start" | "end" | "between";
|
|
6
6
|
position?: "static" | "fixed" | "absolute" | "relative" | "sticky";
|
|
@@ -17,10 +17,10 @@ declare type FlexContainerBase = {
|
|
|
17
17
|
*/
|
|
18
18
|
stretch?: boolean;
|
|
19
19
|
};
|
|
20
|
-
export
|
|
20
|
+
export type FlexContainerBaseProps = FlexContainerBase & {
|
|
21
21
|
children: React.ReactNode;
|
|
22
22
|
};
|
|
23
|
-
export
|
|
23
|
+
export type FlexContainerProps = Omit<FlexContainerBaseProps, "verticalSpacing" | "horizontalSpacing"> & {
|
|
24
24
|
spacing?: Spacing;
|
|
25
25
|
};
|
|
26
26
|
export {};
|
|
@@ -3,7 +3,7 @@ declare class Datepicker extends React.Component<any, any, any> {
|
|
|
3
3
|
constructor(props: any, context: any);
|
|
4
4
|
handleCloseButtonClick: (event: any) => void;
|
|
5
5
|
getDateFormat: () => "L LT" | "L";
|
|
6
|
-
render(): JSX.Element;
|
|
6
|
+
render(): React.JSX.Element;
|
|
7
7
|
datepickerRef: any;
|
|
8
8
|
}
|
|
9
9
|
declare namespace Datepicker {
|
|
@@ -24,16 +24,16 @@ declare class Dropdown extends React.PureComponent<any, any, any> {
|
|
|
24
24
|
increaseHighlightIndexIfPossible: () => void;
|
|
25
25
|
decreaseHighlightIndexIfPossible: () => void;
|
|
26
26
|
selectItem: (item: any) => void;
|
|
27
|
-
renderIndividualItem: (item: any) => JSX.Element;
|
|
28
|
-
renderGroupedItems: (item: any) => JSX.Element;
|
|
29
|
-
renderItems: () => JSX.Element;
|
|
27
|
+
renderIndividualItem: (item: any) => React.JSX.Element;
|
|
28
|
+
renderGroupedItems: (item: any) => React.JSX.Element;
|
|
29
|
+
renderItems: () => React.JSX.Element;
|
|
30
30
|
dropdownListRef: HTMLDivElement | null | undefined;
|
|
31
|
-
render(): JSX.Element;
|
|
31
|
+
render(): React.JSX.Element;
|
|
32
32
|
rootRef: HTMLDivElement | null | undefined;
|
|
33
33
|
}
|
|
34
34
|
declare namespace Dropdown {
|
|
35
35
|
namespace propTypes {
|
|
36
|
-
const items: PropTypes.Validator<(PropTypes.InferProps<{
|
|
36
|
+
const items: PropTypes.Validator<(NonNullable<PropTypes.InferProps<{
|
|
37
37
|
id: PropTypes.Validator<string>;
|
|
38
38
|
text: PropTypes.Validator<string>;
|
|
39
39
|
key: PropTypes.Validator<string>;
|
|
@@ -45,8 +45,8 @@ declare namespace Dropdown {
|
|
|
45
45
|
}> | null | undefined)[]>;
|
|
46
46
|
title: PropTypes.Requireable<string>;
|
|
47
47
|
groupKey: PropTypes.Validator<string>;
|
|
48
|
-
}> | null | undefined)[]>;
|
|
49
|
-
const initialSelectedItemId: PropTypes.Requireable<string | number
|
|
48
|
+
}> | null | undefined> | null | undefined)[]>;
|
|
49
|
+
const initialSelectedItemId: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
50
50
|
const placeholder: PropTypes.Requireable<string>;
|
|
51
51
|
const className: PropTypes.Requireable<string>;
|
|
52
52
|
const onItemSelect: PropTypes.Validator<(...args: any[]) => any>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode, Ref } from "react";
|
|
2
2
|
import type { IconKey } from "../Icons/types/IconProps.type";
|
|
3
|
-
export
|
|
3
|
+
export type DropzonePresentationProps = {
|
|
4
4
|
/**
|
|
5
5
|
* Message shown to the user hinting how to use the component
|
|
6
6
|
* Usually something like "Click or Drag"
|
|
@@ -24,7 +24,7 @@ export declare type DropzonePresentationProps = {
|
|
|
24
24
|
horizontal?: boolean;
|
|
25
25
|
alignMessage?: "left" | "center";
|
|
26
26
|
};
|
|
27
|
-
export
|
|
27
|
+
export type DropzoneProps = Omit<DropzonePresentationProps, "isHighlighted" | "isClickable"> & {
|
|
28
28
|
draggableIdentifier: string | number;
|
|
29
29
|
disabled?: boolean;
|
|
30
30
|
data?: Record<string, unknown>;
|
|
@@ -3,11 +3,12 @@ declare function ErrorBlock({ message, className, ...otherProps }: {
|
|
|
3
3
|
[x: string]: any;
|
|
4
4
|
message: any;
|
|
5
5
|
className?: string | undefined;
|
|
6
|
-
}): JSX.Element;
|
|
6
|
+
}): React.JSX.Element;
|
|
7
7
|
declare namespace ErrorBlock {
|
|
8
8
|
namespace propTypes {
|
|
9
9
|
const message: PropTypes.Validator<string>;
|
|
10
10
|
const className: PropTypes.Requireable<string>;
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
|
+
import React from "react";
|
|
13
14
|
import PropTypes from "prop-types";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { type FieldValues, type UseFormMethods as UseFormReturn, DeepPartial, SubmitErrorHandler, SubmitHandler, UnpackNestedValue } from "react-hook-form/dist/index.ie11";
|
|
2
3
|
import { FormFieldConfiguration } from "./form.types";
|
|
3
4
|
export interface GenericFormProps<TFieldValues extends FieldValues> {
|
|
@@ -9,8 +9,8 @@ import { CheckboxProps } from "../Checkbox/Checkbox";
|
|
|
9
9
|
import { CheckboxListProps } from "../CheckboxList/CheckboxList.types";
|
|
10
10
|
import { TextareaProps } from "../Textarea/Textarea";
|
|
11
11
|
import { TitleProps } from "../Title/Title";
|
|
12
|
-
export
|
|
13
|
-
export
|
|
12
|
+
export type AllowedTextInputTypes = Extract<HTMLInputTypeAttribute, "email" | "number" | "password" | "text">;
|
|
13
|
+
export type FormFieldWidth = "sm" | "md" | "lg" | "xl" | "full";
|
|
14
14
|
interface FormFieldBaseConfiguration<TFieldType> extends FormFieldLabelerProps {
|
|
15
15
|
name: FieldName<FieldValues>;
|
|
16
16
|
options?: RegisterOptions;
|
|
@@ -33,13 +33,13 @@ export interface FormFieldLabelerProps {
|
|
|
33
33
|
interface FieldVoidConfiguration extends Partial<FormFieldBaseConfiguration<never>> {
|
|
34
34
|
type: "void";
|
|
35
35
|
}
|
|
36
|
-
export
|
|
36
|
+
export type FormFieldConfiguration<TFieldValues> = FieldInputConfiguration | FieldSelectConfiguration | FieldImagePickerConfiguration | FieldRadioGroupConfiguration | FieldRowConfiguration<TFieldValues> | FieldCheckboxConfiguration | FieldCheckboxListConfiguration | FieldTextareaConfiguration | FieldTitleConfiguration | FieldVoidConfiguration;
|
|
37
37
|
/**
|
|
38
38
|
* @backwardscompatibility
|
|
39
39
|
* @deprecated - this is an alias for `FormFieldConfiguration`, for backwards compatibility the name can remain for now, but
|
|
40
40
|
* import `FormFieldConfiguration` whenever you need this type in the future.
|
|
41
41
|
*/
|
|
42
|
-
export
|
|
42
|
+
export type FormFieldProps<TFieldValues> = FormFieldConfiguration<TFieldValues>;
|
|
43
43
|
export interface FieldRowConfiguration<TFieldValues> extends Record<keyof FormFieldBaseConfiguration<never>, never> {
|
|
44
44
|
type: "row";
|
|
45
45
|
key: string;
|
|
@@ -61,7 +61,7 @@ export interface FieldSelectConfiguration extends FormFieldBaseConfiguration<Sel
|
|
|
61
61
|
type: "select";
|
|
62
62
|
fieldProps: SelectProps;
|
|
63
63
|
}
|
|
64
|
-
export
|
|
64
|
+
export type ImagePickerFieldConfiguration = PartialProperties<Omit<ImagePickerProps, "name">, "handleChange">;
|
|
65
65
|
export interface FieldImagePickerConfiguration extends FormFieldBaseConfiguration<ImagePickerFieldConfiguration> {
|
|
66
66
|
type: "imagePicker";
|
|
67
67
|
fieldProps: ImagePickerFieldConfiguration;
|