@luscii-healthtech/web-ui 2.49.1 → 2.50.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/BaseList/BaseList.d.ts +7 -0
- package/dist/components/BaseList/BaseList.types.d.ts +41 -0
- package/dist/components/BaseList/BaseListEmptyState.d.ts +6 -0
- package/dist/components/BaseList/BaseListHeader.d.ts +4 -0
- package/dist/components/BaseList/BaseListIcon.d.ts +5 -0
- package/dist/components/BaseList/BaseListItem.d.ts +4 -0
- package/dist/components/BaseList/index.d.ts +3 -0
- package/dist/components/BaseList/utils.d.ts +3 -0
- package/dist/components/Dropzone/Dropzone.d.ts +5 -0
- package/dist/components/Dropzone/Dropzone.types.d.ts +17 -0
- package/dist/components/Dropzone/index.d.ts +2 -0
- package/dist/components/Icons/MouseIcon.d.ts +3 -0
- package/dist/components/Icons/index.d.ts +1 -0
- package/dist/components/List/List.d.ts +3 -3
- package/dist/components/List/List.types.d.ts +5 -34
- package/dist/components/List/index.d.ts +3 -0
- package/dist/index.d.ts +2 -1
- package/dist/web-ui-tailwind.css +4 -0
- package/dist/web-ui.cjs.development.js +296 -116
- 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 +296 -118
- package/dist/web-ui.esm.js.map +1 -1
- package/package.json +1 -1
- package/dist/components/List/ListItem.d.ts +0 -3
- /package/dist/components/{List → BaseList/ListSkeleton}/ListItemSkeleton.d.ts +0 -0
- /package/dist/components/{List → BaseList/ListSkeleton}/ListSkeleton.d.ts +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { BaseListItemProps, BaseListProps } from "./BaseList.types";
|
|
3
|
+
declare const BaseListInner: <T extends BaseListItemProps>({ dataTestId, title, headerButton, emptyStateMessage, isLoading, items, headerTransparent, itemComponent, footer, }: BaseListProps<T>, ref: React.ForwardedRef<HTMLUListElement>) => JSX.Element;
|
|
4
|
+
export declare const BaseList: <T extends BaseListItemProps>(props: BaseListProps<T> & {
|
|
5
|
+
ref?: React.ForwardedRef<HTMLUListElement> | undefined;
|
|
6
|
+
}) => ReturnType<typeof BaseListInner>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React, { Ref, ReactNode } from "react";
|
|
2
|
+
import { PrimaryButtonProps } from "../..";
|
|
3
|
+
import { ButtonDefinition } from "../ButtonV2/ButtonProps.type";
|
|
4
|
+
import { IconProps } from "../Icons/types/IconProps.type";
|
|
5
|
+
import { TitleProps } from "../Title/Title";
|
|
6
|
+
export declare type BaseListItemProps = {
|
|
7
|
+
itemId: string | number;
|
|
8
|
+
title: string;
|
|
9
|
+
subtitle?: string;
|
|
10
|
+
icon?: React.FunctionComponent<IconProps> | string;
|
|
11
|
+
accessories?: JSX.Element[];
|
|
12
|
+
onClick?: (e: React.MouseEvent<HTMLLIElement>) => void;
|
|
13
|
+
onAssetLoadError?: (payload: OnAssetLoadErrorPayload) => void;
|
|
14
|
+
tooltipId?: string;
|
|
15
|
+
isSelected?: boolean;
|
|
16
|
+
roundTop?: boolean;
|
|
17
|
+
roundBottom?: boolean;
|
|
18
|
+
isDraggable?: boolean;
|
|
19
|
+
dataTestId?: string;
|
|
20
|
+
ref?: Ref<HTMLLIElement>;
|
|
21
|
+
renderDragHandle?: () => ReactNode;
|
|
22
|
+
htmlProps?: React.HTMLProps<HTMLLIElement>;
|
|
23
|
+
};
|
|
24
|
+
export declare type OnAssetLoadErrorPayload = Pick<BaseListItemProps, "itemId" | "subtitle" | "title" | "icon">;
|
|
25
|
+
export interface BaseListProps<T extends BaseListItemProps = BaseListItemProps> {
|
|
26
|
+
items: T[];
|
|
27
|
+
title?: string | TitleProps;
|
|
28
|
+
headerButton?: ButtonDefinition<PrimaryButtonProps>;
|
|
29
|
+
headerTransparent?: boolean;
|
|
30
|
+
itemComponent?: React.FC<T>;
|
|
31
|
+
emptyStateMessage?: string;
|
|
32
|
+
isLoading?: boolean;
|
|
33
|
+
dataTestId?: string;
|
|
34
|
+
footer?: ReactNode;
|
|
35
|
+
ref?: Ref<HTMLUListElement>;
|
|
36
|
+
}
|
|
37
|
+
export declare type BaseListHeaderProps = {
|
|
38
|
+
title?: string | TitleProps;
|
|
39
|
+
button?: ButtonDefinition<PrimaryButtonProps>;
|
|
40
|
+
transparent?: boolean;
|
|
41
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { DropzoneProps, DropzonePresentationProps } from "./Dropzone.types";
|
|
3
|
+
export declare const DropzonePresentation: React.FC<DropzonePresentationProps>;
|
|
4
|
+
export declare const Dropzone: React.FC<DropzoneProps>;
|
|
5
|
+
export default Dropzone;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ReactNode, Ref } from "react";
|
|
2
|
+
import type { IconKey } from "../Icons/types/IconProps.type";
|
|
3
|
+
export declare type DropzonePresentationProps = {
|
|
4
|
+
message?: string;
|
|
5
|
+
icon?: IconKey;
|
|
6
|
+
isHighlighted?: boolean;
|
|
7
|
+
ref?: Ref<HTMLDivElement>;
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
className?: string;
|
|
10
|
+
dataTestId?: string;
|
|
11
|
+
};
|
|
12
|
+
export declare type DropzoneProps = Omit<DropzonePresentationProps, "isHighlighted"> & {
|
|
13
|
+
draggableIdentifier: string | number;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
data?: Record<string, unknown>;
|
|
16
|
+
dataTestId?: string;
|
|
17
|
+
};
|
|
@@ -30,6 +30,7 @@ export { default as LightBulbIcon } from "./LightBulbIcon";
|
|
|
30
30
|
export { default as LinkIcon } from "./LinkIcon";
|
|
31
31
|
export { default as LockIcon } from "./LockIcon";
|
|
32
32
|
export { default as MessagesIcon } from "./MessagesIcon";
|
|
33
|
+
export { default as MouseIcon } from "./MouseIcon";
|
|
33
34
|
export { default as NotesIcon } from "./NotesIcon";
|
|
34
35
|
export { default as PinIcon } from "./PinIcon";
|
|
35
36
|
export { default as PrintIcon } from "./PrintIcon";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ListItemProps, ListProps
|
|
1
|
+
import { ListItemProps, ListProps } from "./List.types";
|
|
2
2
|
import "./List.scss";
|
|
3
|
-
export { ListProps, ListItemProps
|
|
4
|
-
export declare const List: ({ title, headerButton, headerTransparent, items,
|
|
3
|
+
export { ListProps, ListItemProps };
|
|
4
|
+
export declare const List: ({ title, headerButton, headerTransparent, items, onDragEnd, emptyStateMessage, isLoading, dataTestId, onAssetLoadError, }: ListProps) => JSX.Element;
|
|
5
5
|
export default List;
|
|
@@ -1,37 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { IconProps } from "../Icons/types/IconProps.type";
|
|
4
|
-
import { PrimaryButtonProps } from "../../index";
|
|
5
|
-
import { TitleProps } from "../Title/Title";
|
|
6
|
-
export interface ListItemProps {
|
|
7
|
-
itemId: string | number;
|
|
8
|
-
title: string;
|
|
9
|
-
subtitle?: string;
|
|
10
|
-
icon?: React.FunctionComponent<IconProps> | string;
|
|
11
|
-
accessories?: JSX.Element[];
|
|
1
|
+
import type { BaseListProps, BaseListItemProps, OnAssetLoadErrorPayload } from "../BaseList/BaseList.types";
|
|
2
|
+
export declare type ListItemProps = Omit<BaseListItemProps, "onClick"> & {
|
|
12
3
|
handleItemClick?: () => void;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
isSelected?: boolean;
|
|
16
|
-
/**
|
|
17
|
-
*
|
|
18
|
-
* If the parent list component can have a header,
|
|
19
|
-
* the list items don't need to add a border radius on top of the first item.
|
|
20
|
-
*
|
|
21
|
-
* The header is an optional <li> on top that contains the title and accessories (buttons)
|
|
22
|
-
*/
|
|
23
|
-
roundTop?: boolean;
|
|
24
|
-
isDraggable?: boolean;
|
|
25
|
-
}
|
|
26
|
-
export declare type OnAssetLoadErrorPayload = Pick<ListItemProps, "itemId" | "subtitle" | "title" | "icon">;
|
|
27
|
-
export declare type ListProps = {
|
|
28
|
-
title?: string | TitleProps;
|
|
29
|
-
headerButton?: ButtonDefinition<PrimaryButtonProps>;
|
|
30
|
-
headerTransparent?: boolean;
|
|
31
|
-
items: ListItemProps[];
|
|
32
|
-
onAssetLoadError?: (payload: OnAssetLoadErrorPayload) => void;
|
|
4
|
+
};
|
|
5
|
+
export declare type ListProps = Omit<BaseListProps<ListItemProps>, "renderItem" | "itemComponent"> & {
|
|
33
6
|
onDragEnd?: (itemId: string | number, newIndex: number) => void;
|
|
34
|
-
|
|
35
|
-
isLoading?: boolean;
|
|
36
|
-
dataTestId?: string;
|
|
7
|
+
onAssetLoadError?: (payload: OnAssetLoadErrorPayload) => void;
|
|
37
8
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ export { Table, TableProps } from "./components/Table/Table";
|
|
|
31
31
|
export { TableFieldConfig, TableFieldContent, TableFieldText, TableFieldAction, } from "./components/Table/Table.types";
|
|
32
32
|
export { LoadingIndicator, LoadingIndicatorProps, } from "./components/LoadingIndicator/LoadingIndicator";
|
|
33
33
|
export { default as Menu } from "./components/Menu/Menu";
|
|
34
|
-
export { List, ListProps, ListItemProps, OnAssetLoadErrorPayload, } from "./components/List
|
|
34
|
+
export { List, ListProps, ListItemProps, OnAssetLoadErrorPayload, } from "./components/List";
|
|
35
35
|
export { CheckboxList, CheckboxListProps, } from "./components/CheckboxList/CheckboxList";
|
|
36
36
|
export { CheckboxListModal, CheckboxListModalProps, } from "./components/CheckBoxListModal/CheckboxListModal";
|
|
37
37
|
export { MultiSelect } from "./components/MultiSelect/MultiSelect";
|
|
@@ -78,3 +78,4 @@ export * from "./components/Icons";
|
|
|
78
78
|
export { Divider } from "./components/Divider/Divider";
|
|
79
79
|
export { FullPageModal } from "./components/Modal/FullPageModal";
|
|
80
80
|
export { Card, type CardProps } from "./components/Card/Card";
|
|
81
|
+
export { Dropzone, DropzoneProps } from "./components/Dropzone";
|