@luscii-healthtech/web-ui 2.48.0 → 2.48.2
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/README.md +9 -0
- package/dist/components/ButtonV2/ButtonProps.type.d.ts +2 -2
- package/dist/components/ConfirmationDialog/ConfirmationDialogTitle.d.ts +1 -1
- package/dist/components/ConfirmationDialog/types/ConfirmationDialog.types.d.ts +2 -2
- package/dist/components/Icon/Icon.d.ts +7 -0
- package/dist/components/Icons/AddIcon.d.ts +2 -1
- package/dist/components/Icons/AlertsIcon.d.ts +2 -1
- package/dist/components/Icons/BellIcon.d.ts +2 -1
- package/dist/components/Icons/ChartIcon.d.ts +2 -1
- package/dist/components/Icons/ChartLineColoredIcon.d.ts +2 -1
- package/dist/components/Icons/ChatBoxIcon.d.ts +2 -1
- package/dist/components/Icons/CheckIcon.d.ts +2 -1
- package/dist/components/Icons/ChevronDoubleIcon.d.ts +2 -1
- package/dist/components/Icons/ChevronDownIcon.d.ts +2 -1
- package/dist/components/Icons/ChevronRightIcon.d.ts +2 -1
- package/dist/components/Icons/CrossIcon.d.ts +2 -1
- package/dist/components/Icons/DeleteIcon.d.ts +2 -1
- package/dist/components/Icons/DownArrowIcon.d.ts +2 -1
- package/dist/components/Icons/DragIcon.d.ts +2 -1
- package/dist/components/Icons/EditIcon.d.ts +2 -1
- package/dist/components/Icons/EmptyIcon.d.ts +2 -1
- package/dist/components/Icons/EmptyStateDashboardIcon.d.ts +3 -1
- package/dist/components/Icons/ExclamationMarkIcon.d.ts +2 -1
- package/dist/components/Icons/EyeIcon.d.ts +2 -1
- package/dist/components/Icons/GearColoredIcon.d.ts +2 -1
- package/dist/components/Icons/GearIcon.d.ts +2 -1
- package/dist/components/Icons/GroupColoredIcon.d.ts +2 -1
- package/dist/components/Icons/GroupIcon.d.ts +2 -1
- package/dist/components/Icons/HamburgerIcon.d.ts +2 -1
- package/dist/components/Icons/HeartIcon.d.ts +2 -1
- package/dist/components/Icons/ImageIcon.d.ts +2 -2
- package/dist/components/Icons/InfoIcon.d.ts +2 -1
- package/dist/components/Icons/LeftArrowIcon.d.ts +2 -1
- package/dist/components/Icons/LightBulbIcon.d.ts +2 -1
- package/dist/components/Icons/LinkIcon.d.ts +2 -1
- package/dist/components/Icons/LockIcon.d.ts +2 -1
- package/dist/components/Icons/MessagesIcon.d.ts +2 -1
- package/dist/components/Icons/NotesIcon.d.ts +2 -1
- package/dist/components/Icons/PinIcon.d.ts +2 -1
- package/dist/components/Icons/PrintIcon.d.ts +2 -1
- package/dist/components/Icons/RightArrowIcon.d.ts +2 -1
- package/dist/components/Icons/SearchCancelIcon.d.ts +2 -1
- package/dist/components/Icons/SearchIcon.d.ts +2 -1
- package/dist/components/Icons/SmallCircleIcon.d.ts +2 -1
- package/dist/components/Icons/SmallDiamondIcon.d.ts +2 -1
- package/dist/components/Icons/SmallSquareIcon.d.ts +2 -1
- package/dist/components/Icons/SpaceRocketIcon.d.ts +2 -1
- package/dist/components/Icons/StarIcon.d.ts +2 -1
- package/dist/components/Icons/StatusColoredIcon.d.ts +2 -1
- package/dist/components/Icons/WarningIcon.d.ts +2 -2
- package/dist/components/Icons/iconWrapper/iconWrapper.d.ts +4 -0
- package/dist/components/Icons/iconWrapper/index.d.ts +1 -0
- package/dist/components/Icons/index.d.ts +45 -40
- package/dist/components/Icons/templates/component.d.ts +3 -0
- package/dist/components/Icons/templates/index.d.ts +2 -0
- package/dist/components/Input/Input.d.ts +2 -2
- package/dist/components/Toaster/Toaster.d.ts +1 -1
- package/dist/web-ui.cjs.development.js +6503 -6510
- 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 +6499 -6511
- package/dist/web-ui.esm.js.map +1 -1
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -51,6 +51,15 @@ When you create new components, you must add them to storybook as well. Stories
|
|
|
51
51
|
/stories
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
+
### Adding icons
|
|
55
|
+
|
|
56
|
+
Add new icons by:
|
|
57
|
+
|
|
58
|
+
- Add the svg file(s) in `src/components/Icons/icons`
|
|
59
|
+
- Run `yarn icons`
|
|
60
|
+
|
|
61
|
+
The icons are optimized by SVGO and transformed into React components by [SVGR](https://react-svgr.com) which are placed in `src/components/Icons`.
|
|
62
|
+
|
|
54
63
|
## CI setup
|
|
55
64
|
|
|
56
65
|
#### Branching
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { IconProps } from "../Icons/types/IconProps.type";
|
|
2
|
+
import type { IconKey, IconProps } from "../Icons/types/IconProps.type";
|
|
3
3
|
import { TextColor, TextHoverColor } from "../Text/Text";
|
|
4
4
|
/**
|
|
5
5
|
* Properties that are present in all variants of the button
|
|
@@ -8,7 +8,7 @@ import { TextColor, TextHoverColor } from "../Text/Text";
|
|
|
8
8
|
export interface BaseButtonProps extends React.HTMLAttributes<HTMLButtonElement> {
|
|
9
9
|
onClick: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
10
10
|
text?: string;
|
|
11
|
-
icon?: React.FunctionComponent<IconProps
|
|
11
|
+
icon?: React.FunctionComponent<IconProps> | IconKey;
|
|
12
12
|
isDisabled?: boolean;
|
|
13
13
|
className?: string;
|
|
14
14
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { ConfirmationDialogTitleProps } from "./types/ConfirmationDialog.types";
|
|
2
|
+
import type { ConfirmationDialogTitleProps } from "./types/ConfirmationDialog.types";
|
|
3
3
|
export declare const ConfirmationDialogTitle: React.FC<ConfirmationDialogTitleProps>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { IconProps } from "../../Icons/types/IconProps.type";
|
|
2
|
+
import type { IconKey, IconProps } from "../../Icons/types/IconProps.type";
|
|
3
3
|
import type { NotificationBannerColor } from "../../NotificationBanner/NotificationBanner";
|
|
4
4
|
interface ConfirmationDialogTexts {
|
|
5
5
|
message: string | string[];
|
|
@@ -23,7 +23,7 @@ export interface ConfirmationDialogProps {
|
|
|
23
23
|
isProcessing?: boolean;
|
|
24
24
|
withTitle?: {
|
|
25
25
|
title: string;
|
|
26
|
-
icon?: React.FC<IconProps
|
|
26
|
+
icon?: React.FC<IconProps> | IconKey;
|
|
27
27
|
};
|
|
28
28
|
choices?: {
|
|
29
29
|
defaultChoice?: ConfirmationDialogChoice["value"];
|
|
@@ -3,4 +3,11 @@ import { IconProps, IconKey } from "../Icons/types/IconProps.type";
|
|
|
3
3
|
export declare const Icon: React.FC<{
|
|
4
4
|
name: IconKey;
|
|
5
5
|
} & IconProps>;
|
|
6
|
+
/**
|
|
7
|
+
* This is a temporary component to transition the way we pass icons to components.
|
|
8
|
+
* Once all components are passed an IconKey instead of a function component we can replace it with the Icon component.
|
|
9
|
+
*/
|
|
10
|
+
export declare const IconComponentOrKey: React.FC<{
|
|
11
|
+
name: React.FunctionComponent<IconProps> | IconKey;
|
|
12
|
+
} & IconProps>;
|
|
6
13
|
export default Icon;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { HTMLAttributes } from "react";
|
|
2
|
+
import { IconProps } from "../types/IconProps.type";
|
|
3
|
+
declare const iconWrapper: (SVGComponent: (props: IconProps & Pick<HTMLAttributes<SVGElement>, "role">) => JSX.Element) => (props: IconProps) => JSX.Element;
|
|
4
|
+
export default iconWrapper;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./iconWrapper";
|
|
@@ -1,40 +1,45 @@
|
|
|
1
|
-
export { AddIcon } from "./AddIcon";
|
|
2
|
-
export { AlertsIcon } from "./AlertsIcon";
|
|
3
|
-
export { BellIcon } from "./BellIcon";
|
|
4
|
-
export { ChartIcon } from "./ChartIcon";
|
|
5
|
-
export { ChartLineColoredIcon } from "./ChartLineColoredIcon";
|
|
6
|
-
export { ChatBoxIcon } from "./ChatBoxIcon";
|
|
7
|
-
export { CheckIcon } from "./CheckIcon";
|
|
8
|
-
export { ChevronDoubleIcon } from "./ChevronDoubleIcon";
|
|
9
|
-
export {
|
|
10
|
-
export {
|
|
11
|
-
export {
|
|
12
|
-
export {
|
|
13
|
-
export {
|
|
14
|
-
export {
|
|
15
|
-
export {
|
|
16
|
-
export {
|
|
17
|
-
export {
|
|
18
|
-
export {
|
|
19
|
-
export {
|
|
20
|
-
export {
|
|
21
|
-
export {
|
|
22
|
-
export {
|
|
23
|
-
export {
|
|
24
|
-
export {
|
|
25
|
-
export {
|
|
26
|
-
export {
|
|
27
|
-
export {
|
|
28
|
-
export {
|
|
29
|
-
export {
|
|
30
|
-
export {
|
|
31
|
-
export {
|
|
32
|
-
export {
|
|
33
|
-
export {
|
|
34
|
-
export {
|
|
35
|
-
export {
|
|
36
|
-
export {
|
|
37
|
-
export {
|
|
38
|
-
export {
|
|
39
|
-
export {
|
|
40
|
-
export {
|
|
1
|
+
export { default as AddIcon } from "./AddIcon";
|
|
2
|
+
export { default as AlertsIcon } from "./AlertsIcon";
|
|
3
|
+
export { default as BellIcon } from "./BellIcon";
|
|
4
|
+
export { default as ChartIcon } from "./ChartIcon";
|
|
5
|
+
export { default as ChartLineColoredIcon } from "./ChartLineColoredIcon";
|
|
6
|
+
export { default as ChatBoxIcon } from "./ChatBoxIcon";
|
|
7
|
+
export { default as CheckIcon } from "./CheckIcon";
|
|
8
|
+
export { default as ChevronDoubleIcon } from "./ChevronDoubleIcon";
|
|
9
|
+
export { default as ChevronDownIcon } from "./ChevronDownIcon";
|
|
10
|
+
export { default as ChevronRightIcon } from "./ChevronRightIcon";
|
|
11
|
+
export { default as CrossIcon } from "./CrossIcon";
|
|
12
|
+
export { default as DeleteIcon } from "./DeleteIcon";
|
|
13
|
+
export { default as DownArrowIcon } from "./DownArrowIcon";
|
|
14
|
+
export { default as DragIcon } from "./DragIcon";
|
|
15
|
+
export { default as EditIcon } from "./EditIcon";
|
|
16
|
+
export { default as EmptyIcon } from "./EmptyIcon";
|
|
17
|
+
export { default as EmptyStateDashboardIcon } from "./EmptyStateDashboardIcon";
|
|
18
|
+
export { default as ExclamationMarkIcon } from "./ExclamationMarkIcon";
|
|
19
|
+
export { default as EyeIcon } from "./EyeIcon";
|
|
20
|
+
export { default as GearColoredIcon } from "./GearColoredIcon";
|
|
21
|
+
export { default as GearIcon } from "./GearIcon";
|
|
22
|
+
export { default as GroupColoredIcon } from "./GroupColoredIcon";
|
|
23
|
+
export { default as GroupIcon } from "./GroupIcon";
|
|
24
|
+
export { default as HamburgerIcon } from "./HamburgerIcon";
|
|
25
|
+
export { default as HeartIcon } from "./HeartIcon";
|
|
26
|
+
export { default as ImageIcon } from "./ImageIcon";
|
|
27
|
+
export { default as InfoIcon } from "./InfoIcon";
|
|
28
|
+
export { default as LeftArrowIcon } from "./LeftArrowIcon";
|
|
29
|
+
export { default as LightBulbIcon } from "./LightBulbIcon";
|
|
30
|
+
export { default as LinkIcon } from "./LinkIcon";
|
|
31
|
+
export { default as LockIcon } from "./LockIcon";
|
|
32
|
+
export { default as MessagesIcon } from "./MessagesIcon";
|
|
33
|
+
export { default as NotesIcon } from "./NotesIcon";
|
|
34
|
+
export { default as PinIcon } from "./PinIcon";
|
|
35
|
+
export { default as PrintIcon } from "./PrintIcon";
|
|
36
|
+
export { default as RightArrowIcon } from "./RightArrowIcon";
|
|
37
|
+
export { default as SearchCancelIcon } from "./SearchCancelIcon";
|
|
38
|
+
export { default as SearchIcon } from "./SearchIcon";
|
|
39
|
+
export { default as SmallCircleIcon } from "./SmallCircleIcon";
|
|
40
|
+
export { default as SmallDiamondIcon } from "./SmallDiamondIcon";
|
|
41
|
+
export { default as SmallSquareIcon } from "./SmallSquareIcon";
|
|
42
|
+
export { default as SpaceRocketIcon } from "./SpaceRocketIcon";
|
|
43
|
+
export { default as StarIcon } from "./StarIcon";
|
|
44
|
+
export { default as StatusColoredIcon } from "./StatusColoredIcon";
|
|
45
|
+
export { default as WarningIcon } from "./WarningIcon";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { AllowedTextInputTypes } from "../Form/form.types";
|
|
3
|
-
import { IconProps } from "../Icons/types/IconProps.type";
|
|
3
|
+
import type { IconKey, IconProps } from "../Icons/types/IconProps.type";
|
|
4
4
|
import { FormFieldWidth } from "../Form/form.types";
|
|
5
5
|
import "./Input.css";
|
|
6
6
|
export declare const INPUT_TYPES: Record<string, AllowedTextInputTypes>;
|
|
@@ -27,7 +27,7 @@ export interface InputProps extends CustomHTMLInputProps {
|
|
|
27
27
|
isDisabled?: boolean;
|
|
28
28
|
withPrefix?: string;
|
|
29
29
|
withSuffix?: string;
|
|
30
|
-
icon?: React.
|
|
30
|
+
icon?: React.FC<IconProps> | IconKey;
|
|
31
31
|
width?: FormFieldWidth;
|
|
32
32
|
/**
|
|
33
33
|
* Check the `asFormField` prop of this component to understand why this signature.
|
|
@@ -12,6 +12,6 @@ export declare const TOASTER_TYPE_OPTIONS: {
|
|
|
12
12
|
readonly SUCCESS: "success";
|
|
13
13
|
readonly FAILURE: "failure";
|
|
14
14
|
};
|
|
15
|
-
export declare type ToasterType = typeof TOASTER_TYPE_OPTIONS[keyof typeof TOASTER_TYPE_OPTIONS];
|
|
15
|
+
export declare type ToasterType = (typeof TOASTER_TYPE_OPTIONS)[keyof typeof TOASTER_TYPE_OPTIONS];
|
|
16
16
|
declare const Toaster: React.VoidFunctionComponent<ToasterProps>;
|
|
17
17
|
export default Toaster;
|