@luscii-healthtech/web-ui 64.0.5 → 64.1.0
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/esm/components/ActionCard/ActionCard.js +3 -3
- package/dist/esm/components/ActionCard/ActionCard.js.map +1 -1
- package/dist/esm/components/ActionCard/ActionIcon.js +17 -0
- package/dist/esm/components/ActionCard/ActionIcon.js.map +1 -1
- package/dist/esm/components/ActionCardDetailed/ActionCardDetailed.js +1 -1
- package/dist/esm/components/ActionCardDetailed/ActionCardDetailed.js.map +1 -1
- package/dist/esm/components/Dropzone/Dropzone.js +3 -4
- package/dist/esm/components/Dropzone/Dropzone.js.map +1 -1
- package/dist/esm/components/FileUpload/FileUpload.js +4 -4
- package/dist/esm/components/FileUpload/FileUpload.js.map +1 -1
- package/dist/esm/components/MediaPicker/MediaPicker.js +7 -6
- package/dist/esm/components/MediaPicker/MediaPicker.js.map +1 -1
- package/dist/esm/components/NaturalLanguageForm/NaturalLanguageForm.js +3 -4
- package/dist/esm/components/NaturalLanguageForm/NaturalLanguageForm.js.map +1 -1
- package/dist/esm/components/NaturalLanguageForm/NaturalLanguageFormInput.js +4 -3
- package/dist/esm/components/NaturalLanguageForm/NaturalLanguageFormInput.js.map +1 -1
- package/dist/esm/components/NaturalLanguageForm/NaturalLanguageFormInputSelect.js +4 -3
- package/dist/esm/components/NaturalLanguageForm/NaturalLanguageFormInputSelect.js.map +1 -1
- package/dist/esm/components/NaturalLanguageForm/NaturalLanguageFormSelect.js +4 -3
- package/dist/esm/components/NaturalLanguageForm/NaturalLanguageFormSelect.js.map +1 -1
- package/dist/esm/components/TextEditor/MentionList.js +3 -4
- package/dist/esm/components/TextEditor/MentionList.js.map +1 -1
- package/dist/index.development.js +40 -25
- package/dist/index.development.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/src/components/ActionCard/ActionCard.d.ts +10 -3
- package/dist/src/components/ActionCard/ActionIcon.d.ts +9 -3
- package/dist/src/components/ActionCardDetailed/ActionCardDetailed.d.ts +2 -2
- package/dist/src/components/Dropzone/Dropzone.d.ts +1 -1
- package/dist/src/components/FileUpload/FileUpload.d.ts +6 -2
- package/dist/src/components/MediaPicker/MediaPicker.d.ts +4 -2
- package/dist/src/components/NaturalLanguageForm/NaturalLanguageForm.d.ts +42 -29
- package/dist/src/components/NaturalLanguageForm/NaturalLanguageFormInput.d.ts +8 -12
- package/dist/src/components/NaturalLanguageForm/NaturalLanguageFormInputSelect.d.ts +12 -6
- package/dist/src/components/NaturalLanguageForm/NaturalLanguageFormSelect.d.ts +8 -9
- package/dist/src/components/TextEditor/MentionList.d.ts +4 -1
- package/dist/src/generated/components/ActionCard/ActionCard.d.ts +10 -3
- package/dist/src/generated/components/ActionCard/ActionIcon.d.ts +9 -3
- package/dist/src/generated/components/ActionCardDetailed/ActionCardDetailed.d.ts +2 -2
- package/dist/src/generated/components/Dropzone/Dropzone.d.ts +1 -1
- package/dist/src/generated/components/FileUpload/FileUpload.d.ts +6 -2
- package/dist/src/generated/components/MediaPicker/MediaPicker.d.ts +4 -2
- package/dist/src/generated/components/NaturalLanguageForm/NaturalLanguageForm.d.ts +42 -29
- package/dist/src/generated/components/NaturalLanguageForm/NaturalLanguageFormInput.d.ts +8 -12
- package/dist/src/generated/components/NaturalLanguageForm/NaturalLanguageFormInputSelect.d.ts +12 -6
- package/dist/src/generated/components/NaturalLanguageForm/NaturalLanguageFormSelect.d.ts +8 -9
- package/dist/src/generated/components/TextEditor/MentionList.d.ts +4 -1
- package/dist/stories/ActionCard.stories.d.ts +3 -0
- package/dist/stories/ActionCardDetailed.stories.d.ts +2 -0
- package/dist/stories/Dropzone.stories.d.ts +2 -2
- package/dist/stories/FileUpload.stories.d.ts +6 -1
- package/dist/stories/MediaPicker.stories.d.ts +3 -1
- package/dist/stories/NaturalLanguageForm.stories.d.ts +37 -24
- package/dist/stories/TextEditor.stories.d.ts +9 -0
- package/dist/web-ui-tailwind.css +3 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ElementType, type FC, type ReactElement, type ReactNode } from "react";
|
|
2
2
|
import { type Props as InstrumentCardProps } from "../InstrumentCard/InstrumentCard";
|
|
3
3
|
import { type ActionType } from "./ActionIcon";
|
|
4
4
|
export type { ActionType };
|
|
@@ -11,12 +11,19 @@ export type ActionCardMetadata = {
|
|
|
11
11
|
label: string;
|
|
12
12
|
/** Bordered instead of flat — used for schedule information. */
|
|
13
13
|
bordered?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Leading icon, e.g. `<CogwheelIcon />`, sized to the pill. Decorative: the
|
|
16
|
+
* label carries the meaning, so the card hides it from assistive tech.
|
|
17
|
+
*/
|
|
18
|
+
icon?: ReactElement<{
|
|
19
|
+
"aria-hidden"?: boolean;
|
|
20
|
+
}>;
|
|
14
21
|
};
|
|
15
22
|
export type Props = {
|
|
16
23
|
type: ActionType;
|
|
17
24
|
/**
|
|
18
|
-
* Replaces the icon on **measurement** actions only; ignored for
|
|
19
|
-
*
|
|
25
|
+
* Replaces the icon on **measurement** actions only; ignored for every
|
|
26
|
+
* other type, whose icons are fixed.
|
|
20
27
|
*/
|
|
21
28
|
iconUrl?: string | null;
|
|
22
29
|
title: string;
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import { type FC } from "react";
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Workflow types use cVitals' `WorkflowActionType` strings, so a scheduled
|
|
4
|
+
* workflow's `type` passes straight through. Only workflows that can be
|
|
5
|
+
* scheduled are listed.
|
|
6
|
+
*/
|
|
7
|
+
export type WorkflowActionType = "sendMessage" | "changeProgram" | "changeGroupProgram" | "changeProtocol" | "changePatientStatus";
|
|
8
|
+
export type ActionType = "information" | "contact" | "lesson" | "calculation" | "measurement" | WorkflowActionType;
|
|
3
9
|
export type Props = {
|
|
4
10
|
type: ActionType;
|
|
5
11
|
/**
|
|
6
12
|
* The icon for a **measurement** action, which every measurement carries —
|
|
7
|
-
* it tells the patient what to measure.
|
|
8
|
-
*
|
|
13
|
+
* it tells the patient what to measure. Every other type has a fixed
|
|
14
|
+
* icon, so this is ignored for them rather than being theirs to override.
|
|
9
15
|
* A measurement with no usable icon falls back to a neutral placeholder.
|
|
10
16
|
*/
|
|
11
17
|
iconUrl?: string | null;
|
|
@@ -24,8 +24,8 @@ export type Props = {
|
|
|
24
24
|
/** Selects the coloured action icon shown beside the title. */
|
|
25
25
|
type: ActionType;
|
|
26
26
|
/**
|
|
27
|
-
* Replaces the icon on **measurement** actions only; ignored for
|
|
28
|
-
*
|
|
27
|
+
* Replaces the icon on **measurement** actions only; ignored for every
|
|
28
|
+
* other type, whose icons are fixed.
|
|
29
29
|
*/
|
|
30
30
|
iconUrl?: string | null;
|
|
31
31
|
/** Action name, rendered as the panel heading. */
|
|
@@ -3,5 +3,5 @@ type Props = HTMLProps<HTMLDivElement> & {
|
|
|
3
3
|
isHighlighted?: boolean;
|
|
4
4
|
className?: string;
|
|
5
5
|
};
|
|
6
|
-
export declare const Dropzone:
|
|
6
|
+
export declare const Dropzone: (props: Props) => import("react").JSX.Element;
|
|
7
7
|
export default Dropzone;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ReactNode, Ref } from "react";
|
|
2
2
|
export type FileUploadProps = {
|
|
3
3
|
/**
|
|
4
4
|
* The file types that the input should accept.
|
|
@@ -37,5 +37,9 @@ export type FileUploadProps = {
|
|
|
37
37
|
* @default "Remove"
|
|
38
38
|
*/
|
|
39
39
|
removeButtonLabel?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Ref to the underlying (visually hidden) `<input type="file">` element.
|
|
42
|
+
*/
|
|
43
|
+
ref?: Ref<HTMLInputElement>;
|
|
40
44
|
};
|
|
41
|
-
export declare const FileUpload:
|
|
45
|
+
export declare const FileUpload: (props: FileUploadProps) => import("react").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import type React from "react";
|
|
2
2
|
import { type CategoryProps } from "./ImageCategory";
|
|
3
3
|
export interface TargetProps {
|
|
4
4
|
target: {
|
|
@@ -88,4 +88,6 @@ export interface MediaPickerProps {
|
|
|
88
88
|
isErrorUploading?: boolean;
|
|
89
89
|
localisation: Partial<Record<"openModalButton" | "selectButton" | "error" | "upload" | "clearSelection" | "cancel" | "search" | "unsupportedMediaType" | "modalTitle", string>>;
|
|
90
90
|
}
|
|
91
|
-
export declare const MediaPicker:
|
|
91
|
+
export declare const MediaPicker: ({ ref, ...props }: MediaPickerProps & {
|
|
92
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
93
|
+
}) => React.JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { ReactNode, Ref } from "react";
|
|
2
2
|
import type { FormHeightNames } from "../../system/Sizes.js";
|
|
3
3
|
type Props = {
|
|
4
4
|
/**
|
|
@@ -13,31 +13,41 @@ type Props = {
|
|
|
13
13
|
/**
|
|
14
14
|
* Child components (NaturalLanguageForm.Input, NaturalLanguageForm.Select, NaturalLanguageForm.Text, NaturalLanguageForm.InputSelect).
|
|
15
15
|
*/
|
|
16
|
-
children:
|
|
16
|
+
children: ReactNode;
|
|
17
|
+
ref?: Ref<HTMLDivElement>;
|
|
17
18
|
};
|
|
18
|
-
declare const NaturalLanguageFormWithSubComponents:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
19
|
+
declare const NaturalLanguageFormWithSubComponents: {
|
|
20
|
+
(props: Props): import("react").JSX.Element;
|
|
21
|
+
displayName: string;
|
|
22
|
+
} & {
|
|
23
|
+
Input: {
|
|
24
|
+
({ ref, ...props }: Omit<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "width"> & {
|
|
25
|
+
suffix?: string;
|
|
26
|
+
prefix?: string;
|
|
27
|
+
icon?: React.FC<import("../..").IconProps> | import("../..").IconKey;
|
|
28
|
+
width?: import("../../types/general.types").FormFieldSize | [import("../../types/general.types").FormFieldSize, import("../../types/general.types").FormFieldSize?, import("../../types/general.types").FormFieldSize?, import("../../types/general.types").FormFieldSize?, import("../../types/general.types").FormFieldSize?];
|
|
29
|
+
height?: FormHeightNames;
|
|
30
|
+
isError?: boolean;
|
|
31
|
+
isClearIconVisible?: boolean;
|
|
32
|
+
onClickClearField?: () => void;
|
|
33
|
+
clearButtonLabel?: string;
|
|
34
|
+
} & import("react").RefAttributes<HTMLInputElement>): import("react").JSX.Element;
|
|
35
|
+
displayName: string;
|
|
36
|
+
};
|
|
37
|
+
Select: {
|
|
38
|
+
({ ref, ...props }: Omit<Omit<import("react").DetailedHTMLProps<import("react").SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, "ref">, "width"> & {
|
|
39
|
+
children?: React.ReactNode;
|
|
40
|
+
suffix?: string;
|
|
41
|
+
prefix?: string;
|
|
42
|
+
width?: import("../../types/general.types").FormFieldSize | [import("../../types/general.types").FormFieldSize, import("../../types/general.types").FormFieldSize?, import("../../types/general.types").FormFieldSize?, import("../../types/general.types").FormFieldSize?, import("../../types/general.types").FormFieldSize?];
|
|
43
|
+
height?: FormHeightNames;
|
|
44
|
+
isError?: boolean;
|
|
45
|
+
} & import("react").RefAttributes<HTMLSelectElement>): import("react").JSX.Element;
|
|
46
|
+
displayName: string;
|
|
47
|
+
};
|
|
38
48
|
Text: {
|
|
39
49
|
(props: Omit<any, "ref"> & {
|
|
40
|
-
as?:
|
|
50
|
+
as?: import("react").ElementType | undefined;
|
|
41
51
|
variant?: import("../Text/Text").TextStyle;
|
|
42
52
|
color?: import("../Text/Text").TextColor;
|
|
43
53
|
hoverColor?: import("../Text/Text").TextHoverColor;
|
|
@@ -47,11 +57,14 @@ declare const NaturalLanguageFormWithSubComponents: React.ForwardRefExoticCompon
|
|
|
47
57
|
clampLines?: boolean;
|
|
48
58
|
capitalize?: boolean;
|
|
49
59
|
"data-test-id"?: string;
|
|
50
|
-
}):
|
|
60
|
+
}): import("react").JSX.Element;
|
|
51
61
|
displayName: string;
|
|
52
62
|
};
|
|
53
|
-
InputSelect:
|
|
54
|
-
|
|
63
|
+
InputSelect: {
|
|
64
|
+
({ ref, ...props }: import("../InputSelect/InputSelect").InputSelectProps & import("react").RefAttributes<HTMLDivElement>): import("react").JSX.Element;
|
|
65
|
+
displayName: string;
|
|
66
|
+
} & {
|
|
67
|
+
Input: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "width"> & {
|
|
55
68
|
suffix?: string;
|
|
56
69
|
prefix?: string;
|
|
57
70
|
icon?: React.FC<import("../..").IconProps> | import("../..").IconKey;
|
|
@@ -61,15 +74,15 @@ declare const NaturalLanguageFormWithSubComponents: React.ForwardRefExoticCompon
|
|
|
61
74
|
isClearIconVisible?: boolean;
|
|
62
75
|
onClickClearField?: () => void;
|
|
63
76
|
clearButtonLabel?: string;
|
|
64
|
-
} &
|
|
65
|
-
Select:
|
|
77
|
+
} & import("react").RefAttributes<HTMLInputElement>, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
78
|
+
Select: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<import("react").DetailedHTMLProps<import("react").SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, "ref">, "width"> & {
|
|
66
79
|
children?: React.ReactNode;
|
|
67
80
|
suffix?: string;
|
|
68
81
|
prefix?: string;
|
|
69
82
|
width?: import("../../types/general.types").FormFieldSize | [import("../../types/general.types").FormFieldSize, import("../../types/general.types").FormFieldSize?, import("../../types/general.types").FormFieldSize?, import("../../types/general.types").FormFieldSize?, import("../../types/general.types").FormFieldSize?];
|
|
70
83
|
height?: FormHeightNames;
|
|
71
84
|
isError?: boolean;
|
|
72
|
-
} &
|
|
85
|
+
} & import("react").RefAttributes<HTMLSelectElement>, "ref"> & import("react").RefAttributes<HTMLSelectElement>>;
|
|
73
86
|
};
|
|
74
87
|
};
|
|
75
88
|
export { NaturalLanguageFormWithSubComponents as NaturalLanguageForm };
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
isClearIconVisible?: boolean;
|
|
10
|
-
onClickClearField?: () => void;
|
|
11
|
-
clearButtonLabel?: string;
|
|
12
|
-
} & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
import { StyledInput } from "../Input/StyledInput";
|
|
3
|
+
type Props = ComponentProps<typeof StyledInput>;
|
|
4
|
+
export declare const NaturalLanguageFormInput: {
|
|
5
|
+
({ ref, ...props }: Props): import("react").JSX.Element;
|
|
6
|
+
displayName: string;
|
|
7
|
+
};
|
|
8
|
+
export {};
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
import { InputSelect } from "../InputSelect/InputSelect";
|
|
3
|
+
type Props = ComponentProps<typeof InputSelect>;
|
|
4
|
+
export declare const NaturalLanguageFormInputSelect: {
|
|
5
|
+
({ ref, ...props }: Props): import("react").JSX.Element;
|
|
6
|
+
displayName: string;
|
|
7
|
+
} & {
|
|
8
|
+
Input: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "width"> & {
|
|
4
9
|
suffix?: string;
|
|
5
10
|
prefix?: string;
|
|
6
11
|
icon?: React.FC<import("../..").IconProps> | import("../..").IconKey;
|
|
@@ -10,13 +15,14 @@ export declare const NaturalLanguageFormInputSelect: React.ForwardRefExoticCompo
|
|
|
10
15
|
isClearIconVisible?: boolean;
|
|
11
16
|
onClickClearField?: () => void;
|
|
12
17
|
clearButtonLabel?: string;
|
|
13
|
-
} &
|
|
14
|
-
Select:
|
|
18
|
+
} & import("react").RefAttributes<HTMLInputElement>, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
19
|
+
Select: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<import("react").DetailedHTMLProps<import("react").SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, "ref">, "width"> & {
|
|
15
20
|
children?: React.ReactNode;
|
|
16
21
|
suffix?: string;
|
|
17
22
|
prefix?: string;
|
|
18
23
|
width?: import("../../types/general.types").FormFieldSize | [import("../../types/general.types").FormFieldSize, import("../../types/general.types").FormFieldSize?, import("../../types/general.types").FormFieldSize?, import("../../types/general.types").FormFieldSize?, import("../../types/general.types").FormFieldSize?];
|
|
19
24
|
height?: import("../../system/Sizes").FormHeightNames;
|
|
20
25
|
isError?: boolean;
|
|
21
|
-
} &
|
|
26
|
+
} & import("react").RefAttributes<HTMLSelectElement>, "ref"> & import("react").RefAttributes<HTMLSelectElement>>;
|
|
22
27
|
};
|
|
28
|
+
export {};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
} & React.RefAttributes<HTMLSelectElement>, "ref"> & React.RefAttributes<HTMLSelectElement>>;
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
import { StyledSelect } from "../Select/StyledSelect";
|
|
3
|
+
type Props = ComponentProps<typeof StyledSelect>;
|
|
4
|
+
export declare const NaturalLanguageFormSelect: {
|
|
5
|
+
({ ref, ...props }: Props): import("react").JSX.Element;
|
|
6
|
+
displayName: string;
|
|
7
|
+
};
|
|
8
|
+
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type Ref } from "react";
|
|
1
2
|
import type { MentionNodeAttrs } from "@tiptap/extension-mention";
|
|
2
3
|
import type { SuggestionKeyDownProps, SuggestionProps } from "@tiptap/suggestion";
|
|
3
4
|
/**
|
|
@@ -27,4 +28,6 @@ export type MentionListRef = {
|
|
|
27
28
|
* imperatively by the Tiptap suggestion plugin via `ReactRenderer`, which is
|
|
28
29
|
* why keyboard handling is exposed through a ref instead of DOM focus.
|
|
29
30
|
*/
|
|
30
|
-
export declare const MentionList:
|
|
31
|
+
export declare const MentionList: ({ items, command, ref, }: SuggestionProps<TextEditorTag, MentionNodeAttrs> & {
|
|
32
|
+
ref?: Ref<MentionListRef>;
|
|
33
|
+
}) => import("react").JSX.Element | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ElementType, type FC, type ReactElement, type ReactNode } from "react";
|
|
2
2
|
import { type Props as InstrumentCardProps } from "../InstrumentCard/InstrumentCard";
|
|
3
3
|
import { type ActionType } from "./ActionIcon";
|
|
4
4
|
export type { ActionType };
|
|
@@ -11,12 +11,19 @@ export type ActionCardMetadata = {
|
|
|
11
11
|
label: string;
|
|
12
12
|
/** Bordered instead of flat — used for schedule information. */
|
|
13
13
|
bordered?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Leading icon, e.g. `<CogwheelIcon />`, sized to the pill. Decorative: the
|
|
16
|
+
* label carries the meaning, so the card hides it from assistive tech.
|
|
17
|
+
*/
|
|
18
|
+
icon?: ReactElement<{
|
|
19
|
+
"aria-hidden"?: boolean;
|
|
20
|
+
}>;
|
|
14
21
|
};
|
|
15
22
|
export type Props = {
|
|
16
23
|
type: ActionType;
|
|
17
24
|
/**
|
|
18
|
-
* Replaces the icon on **measurement** actions only; ignored for
|
|
19
|
-
*
|
|
25
|
+
* Replaces the icon on **measurement** actions only; ignored for every
|
|
26
|
+
* other type, whose icons are fixed.
|
|
20
27
|
*/
|
|
21
28
|
iconUrl?: string | null;
|
|
22
29
|
title: string;
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import { type FC } from "react";
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Workflow types use cVitals' `WorkflowActionType` strings, so a scheduled
|
|
4
|
+
* workflow's `type` passes straight through. Only workflows that can be
|
|
5
|
+
* scheduled are listed.
|
|
6
|
+
*/
|
|
7
|
+
export type WorkflowActionType = "sendMessage" | "changeProgram" | "changeGroupProgram" | "changeProtocol" | "changePatientStatus";
|
|
8
|
+
export type ActionType = "information" | "contact" | "lesson" | "calculation" | "measurement" | WorkflowActionType;
|
|
3
9
|
export type Props = {
|
|
4
10
|
type: ActionType;
|
|
5
11
|
/**
|
|
6
12
|
* The icon for a **measurement** action, which every measurement carries —
|
|
7
|
-
* it tells the patient what to measure.
|
|
8
|
-
*
|
|
13
|
+
* it tells the patient what to measure. Every other type has a fixed
|
|
14
|
+
* icon, so this is ignored for them rather than being theirs to override.
|
|
9
15
|
* A measurement with no usable icon falls back to a neutral placeholder.
|
|
10
16
|
*/
|
|
11
17
|
iconUrl?: string | null;
|
|
@@ -24,8 +24,8 @@ export type Props = {
|
|
|
24
24
|
/** Selects the coloured action icon shown beside the title. */
|
|
25
25
|
type: ActionType;
|
|
26
26
|
/**
|
|
27
|
-
* Replaces the icon on **measurement** actions only; ignored for
|
|
28
|
-
*
|
|
27
|
+
* Replaces the icon on **measurement** actions only; ignored for every
|
|
28
|
+
* other type, whose icons are fixed.
|
|
29
29
|
*/
|
|
30
30
|
iconUrl?: string | null;
|
|
31
31
|
/** Action name, rendered as the panel heading. */
|
|
@@ -3,5 +3,5 @@ type Props = HTMLProps<HTMLDivElement> & {
|
|
|
3
3
|
isHighlighted?: boolean;
|
|
4
4
|
className?: string;
|
|
5
5
|
};
|
|
6
|
-
export declare const Dropzone:
|
|
6
|
+
export declare const Dropzone: (props: Props) => import("react").JSX.Element;
|
|
7
7
|
export default Dropzone;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ReactNode, Ref } from "react";
|
|
2
2
|
export type FileUploadProps = {
|
|
3
3
|
/**
|
|
4
4
|
* The file types that the input should accept.
|
|
@@ -37,5 +37,9 @@ export type FileUploadProps = {
|
|
|
37
37
|
* @default "Remove"
|
|
38
38
|
*/
|
|
39
39
|
removeButtonLabel?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Ref to the underlying (visually hidden) `<input type="file">` element.
|
|
42
|
+
*/
|
|
43
|
+
ref?: Ref<HTMLInputElement>;
|
|
40
44
|
};
|
|
41
|
-
export declare const FileUpload:
|
|
45
|
+
export declare const FileUpload: (props: FileUploadProps) => import("react").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import type React from "react";
|
|
2
2
|
import { type CategoryProps } from "./ImageCategory";
|
|
3
3
|
export interface TargetProps {
|
|
4
4
|
target: {
|
|
@@ -88,4 +88,6 @@ export interface MediaPickerProps {
|
|
|
88
88
|
isErrorUploading?: boolean;
|
|
89
89
|
localisation: Partial<Record<"openModalButton" | "selectButton" | "error" | "upload" | "clearSelection" | "cancel" | "search" | "unsupportedMediaType" | "modalTitle", string>>;
|
|
90
90
|
}
|
|
91
|
-
export declare const MediaPicker:
|
|
91
|
+
export declare const MediaPicker: ({ ref, ...props }: MediaPickerProps & {
|
|
92
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
93
|
+
}) => React.JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { ReactNode, Ref } from "react";
|
|
2
2
|
import type { FormHeightNames } from "../../../system/Sizes.js";
|
|
3
3
|
type Props = {
|
|
4
4
|
/**
|
|
@@ -13,31 +13,41 @@ type Props = {
|
|
|
13
13
|
/**
|
|
14
14
|
* Child components (NaturalLanguageForm.Input, NaturalLanguageForm.Select, NaturalLanguageForm.Text, NaturalLanguageForm.InputSelect).
|
|
15
15
|
*/
|
|
16
|
-
children:
|
|
16
|
+
children: ReactNode;
|
|
17
|
+
ref?: Ref<HTMLDivElement>;
|
|
17
18
|
};
|
|
18
|
-
declare const NaturalLanguageFormWithSubComponents:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
19
|
+
declare const NaturalLanguageFormWithSubComponents: {
|
|
20
|
+
(props: Props): import("react").JSX.Element;
|
|
21
|
+
displayName: string;
|
|
22
|
+
} & {
|
|
23
|
+
Input: {
|
|
24
|
+
({ ref, ...props }: Omit<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "width"> & {
|
|
25
|
+
suffix?: string;
|
|
26
|
+
prefix?: string;
|
|
27
|
+
icon?: React.FC<import("../..").IconProps> | import("../..").IconKey;
|
|
28
|
+
width?: import("../../types/general.types").FormFieldSize | [import("../../types/general.types").FormFieldSize, import("../../types/general.types").FormFieldSize?, import("../../types/general.types").FormFieldSize?, import("../../types/general.types").FormFieldSize?, import("../../types/general.types").FormFieldSize?];
|
|
29
|
+
height?: FormHeightNames;
|
|
30
|
+
isError?: boolean;
|
|
31
|
+
isClearIconVisible?: boolean;
|
|
32
|
+
onClickClearField?: () => void;
|
|
33
|
+
clearButtonLabel?: string;
|
|
34
|
+
} & import("react").RefAttributes<HTMLInputElement>): import("react").JSX.Element;
|
|
35
|
+
displayName: string;
|
|
36
|
+
};
|
|
37
|
+
Select: {
|
|
38
|
+
({ ref, ...props }: Omit<Omit<import("react").DetailedHTMLProps<import("react").SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, "ref">, "width"> & {
|
|
39
|
+
children?: React.ReactNode;
|
|
40
|
+
suffix?: string;
|
|
41
|
+
prefix?: string;
|
|
42
|
+
width?: import("../../types/general.types").FormFieldSize | [import("../../types/general.types").FormFieldSize, import("../../types/general.types").FormFieldSize?, import("../../types/general.types").FormFieldSize?, import("../../types/general.types").FormFieldSize?, import("../../types/general.types").FormFieldSize?];
|
|
43
|
+
height?: FormHeightNames;
|
|
44
|
+
isError?: boolean;
|
|
45
|
+
} & import("react").RefAttributes<HTMLSelectElement>): import("react").JSX.Element;
|
|
46
|
+
displayName: string;
|
|
47
|
+
};
|
|
38
48
|
Text: {
|
|
39
49
|
(props: Omit<any, "ref"> & {
|
|
40
|
-
as?:
|
|
50
|
+
as?: import("react").ElementType | undefined;
|
|
41
51
|
variant?: import("../Text/Text").TextStyle;
|
|
42
52
|
color?: import("../Text/Text").TextColor;
|
|
43
53
|
hoverColor?: import("../Text/Text").TextHoverColor;
|
|
@@ -47,11 +57,14 @@ declare const NaturalLanguageFormWithSubComponents: React.ForwardRefExoticCompon
|
|
|
47
57
|
clampLines?: boolean;
|
|
48
58
|
capitalize?: boolean;
|
|
49
59
|
"data-test-id"?: string;
|
|
50
|
-
}):
|
|
60
|
+
}): import("react").JSX.Element;
|
|
51
61
|
displayName: string;
|
|
52
62
|
};
|
|
53
|
-
InputSelect:
|
|
54
|
-
|
|
63
|
+
InputSelect: {
|
|
64
|
+
({ ref, ...props }: import("../InputSelect/InputSelect").InputSelectProps & import("react").RefAttributes<HTMLDivElement>): import("react").JSX.Element;
|
|
65
|
+
displayName: string;
|
|
66
|
+
} & {
|
|
67
|
+
Input: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "width"> & {
|
|
55
68
|
suffix?: string;
|
|
56
69
|
prefix?: string;
|
|
57
70
|
icon?: React.FC<import("../..").IconProps> | import("../..").IconKey;
|
|
@@ -61,15 +74,15 @@ declare const NaturalLanguageFormWithSubComponents: React.ForwardRefExoticCompon
|
|
|
61
74
|
isClearIconVisible?: boolean;
|
|
62
75
|
onClickClearField?: () => void;
|
|
63
76
|
clearButtonLabel?: string;
|
|
64
|
-
} &
|
|
65
|
-
Select:
|
|
77
|
+
} & import("react").RefAttributes<HTMLInputElement>, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
78
|
+
Select: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<import("react").DetailedHTMLProps<import("react").SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, "ref">, "width"> & {
|
|
66
79
|
children?: React.ReactNode;
|
|
67
80
|
suffix?: string;
|
|
68
81
|
prefix?: string;
|
|
69
82
|
width?: import("../../types/general.types").FormFieldSize | [import("../../types/general.types").FormFieldSize, import("../../types/general.types").FormFieldSize?, import("../../types/general.types").FormFieldSize?, import("../../types/general.types").FormFieldSize?, import("../../types/general.types").FormFieldSize?];
|
|
70
83
|
height?: FormHeightNames;
|
|
71
84
|
isError?: boolean;
|
|
72
|
-
} &
|
|
85
|
+
} & import("react").RefAttributes<HTMLSelectElement>, "ref"> & import("react").RefAttributes<HTMLSelectElement>>;
|
|
73
86
|
};
|
|
74
87
|
};
|
|
75
88
|
export { NaturalLanguageFormWithSubComponents as NaturalLanguageForm };
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
isClearIconVisible?: boolean;
|
|
10
|
-
onClickClearField?: () => void;
|
|
11
|
-
clearButtonLabel?: string;
|
|
12
|
-
} & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
import { StyledInput } from "../Input/StyledInput";
|
|
3
|
+
type Props = ComponentProps<typeof StyledInput>;
|
|
4
|
+
export declare const NaturalLanguageFormInput: {
|
|
5
|
+
({ ref, ...props }: Props): import("react").JSX.Element;
|
|
6
|
+
displayName: string;
|
|
7
|
+
};
|
|
8
|
+
export {};
|
package/dist/src/generated/components/NaturalLanguageForm/NaturalLanguageFormInputSelect.d.ts
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
import { InputSelect } from "../InputSelect/InputSelect";
|
|
3
|
+
type Props = ComponentProps<typeof InputSelect>;
|
|
4
|
+
export declare const NaturalLanguageFormInputSelect: {
|
|
5
|
+
({ ref, ...props }: Props): import("react").JSX.Element;
|
|
6
|
+
displayName: string;
|
|
7
|
+
} & {
|
|
8
|
+
Input: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "width"> & {
|
|
4
9
|
suffix?: string;
|
|
5
10
|
prefix?: string;
|
|
6
11
|
icon?: React.FC<import("../..").IconProps> | import("../..").IconKey;
|
|
@@ -10,13 +15,14 @@ export declare const NaturalLanguageFormInputSelect: React.ForwardRefExoticCompo
|
|
|
10
15
|
isClearIconVisible?: boolean;
|
|
11
16
|
onClickClearField?: () => void;
|
|
12
17
|
clearButtonLabel?: string;
|
|
13
|
-
} &
|
|
14
|
-
Select:
|
|
18
|
+
} & import("react").RefAttributes<HTMLInputElement>, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
19
|
+
Select: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<import("react").DetailedHTMLProps<import("react").SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, "ref">, "width"> & {
|
|
15
20
|
children?: React.ReactNode;
|
|
16
21
|
suffix?: string;
|
|
17
22
|
prefix?: string;
|
|
18
23
|
width?: import("../../types/general.types").FormFieldSize | [import("../../types/general.types").FormFieldSize, import("../../types/general.types").FormFieldSize?, import("../../types/general.types").FormFieldSize?, import("../../types/general.types").FormFieldSize?, import("../../types/general.types").FormFieldSize?];
|
|
19
24
|
height?: import("../../system/Sizes").FormHeightNames;
|
|
20
25
|
isError?: boolean;
|
|
21
|
-
} &
|
|
26
|
+
} & import("react").RefAttributes<HTMLSelectElement>, "ref"> & import("react").RefAttributes<HTMLSelectElement>>;
|
|
22
27
|
};
|
|
28
|
+
export {};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
} & React.RefAttributes<HTMLSelectElement>, "ref"> & React.RefAttributes<HTMLSelectElement>>;
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
import { StyledSelect } from "../Select/StyledSelect";
|
|
3
|
+
type Props = ComponentProps<typeof StyledSelect>;
|
|
4
|
+
export declare const NaturalLanguageFormSelect: {
|
|
5
|
+
({ ref, ...props }: Props): import("react").JSX.Element;
|
|
6
|
+
displayName: string;
|
|
7
|
+
};
|
|
8
|
+
export {};
|