@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.
Files changed (57) hide show
  1. package/dist/esm/components/ActionCard/ActionCard.js +3 -3
  2. package/dist/esm/components/ActionCard/ActionCard.js.map +1 -1
  3. package/dist/esm/components/ActionCard/ActionIcon.js +17 -0
  4. package/dist/esm/components/ActionCard/ActionIcon.js.map +1 -1
  5. package/dist/esm/components/ActionCardDetailed/ActionCardDetailed.js +1 -1
  6. package/dist/esm/components/ActionCardDetailed/ActionCardDetailed.js.map +1 -1
  7. package/dist/esm/components/Dropzone/Dropzone.js +3 -4
  8. package/dist/esm/components/Dropzone/Dropzone.js.map +1 -1
  9. package/dist/esm/components/FileUpload/FileUpload.js +4 -4
  10. package/dist/esm/components/FileUpload/FileUpload.js.map +1 -1
  11. package/dist/esm/components/MediaPicker/MediaPicker.js +7 -6
  12. package/dist/esm/components/MediaPicker/MediaPicker.js.map +1 -1
  13. package/dist/esm/components/NaturalLanguageForm/NaturalLanguageForm.js +3 -4
  14. package/dist/esm/components/NaturalLanguageForm/NaturalLanguageForm.js.map +1 -1
  15. package/dist/esm/components/NaturalLanguageForm/NaturalLanguageFormInput.js +4 -3
  16. package/dist/esm/components/NaturalLanguageForm/NaturalLanguageFormInput.js.map +1 -1
  17. package/dist/esm/components/NaturalLanguageForm/NaturalLanguageFormInputSelect.js +4 -3
  18. package/dist/esm/components/NaturalLanguageForm/NaturalLanguageFormInputSelect.js.map +1 -1
  19. package/dist/esm/components/NaturalLanguageForm/NaturalLanguageFormSelect.js +4 -3
  20. package/dist/esm/components/NaturalLanguageForm/NaturalLanguageFormSelect.js.map +1 -1
  21. package/dist/esm/components/TextEditor/MentionList.js +3 -4
  22. package/dist/esm/components/TextEditor/MentionList.js.map +1 -1
  23. package/dist/index.development.js +40 -25
  24. package/dist/index.development.js.map +1 -1
  25. package/dist/index.js +1 -1
  26. package/dist/index.js.map +1 -1
  27. package/dist/src/components/ActionCard/ActionCard.d.ts +10 -3
  28. package/dist/src/components/ActionCard/ActionIcon.d.ts +9 -3
  29. package/dist/src/components/ActionCardDetailed/ActionCardDetailed.d.ts +2 -2
  30. package/dist/src/components/Dropzone/Dropzone.d.ts +1 -1
  31. package/dist/src/components/FileUpload/FileUpload.d.ts +6 -2
  32. package/dist/src/components/MediaPicker/MediaPicker.d.ts +4 -2
  33. package/dist/src/components/NaturalLanguageForm/NaturalLanguageForm.d.ts +42 -29
  34. package/dist/src/components/NaturalLanguageForm/NaturalLanguageFormInput.d.ts +8 -12
  35. package/dist/src/components/NaturalLanguageForm/NaturalLanguageFormInputSelect.d.ts +12 -6
  36. package/dist/src/components/NaturalLanguageForm/NaturalLanguageFormSelect.d.ts +8 -9
  37. package/dist/src/components/TextEditor/MentionList.d.ts +4 -1
  38. package/dist/src/generated/components/ActionCard/ActionCard.d.ts +10 -3
  39. package/dist/src/generated/components/ActionCard/ActionIcon.d.ts +9 -3
  40. package/dist/src/generated/components/ActionCardDetailed/ActionCardDetailed.d.ts +2 -2
  41. package/dist/src/generated/components/Dropzone/Dropzone.d.ts +1 -1
  42. package/dist/src/generated/components/FileUpload/FileUpload.d.ts +6 -2
  43. package/dist/src/generated/components/MediaPicker/MediaPicker.d.ts +4 -2
  44. package/dist/src/generated/components/NaturalLanguageForm/NaturalLanguageForm.d.ts +42 -29
  45. package/dist/src/generated/components/NaturalLanguageForm/NaturalLanguageFormInput.d.ts +8 -12
  46. package/dist/src/generated/components/NaturalLanguageForm/NaturalLanguageFormInputSelect.d.ts +12 -6
  47. package/dist/src/generated/components/NaturalLanguageForm/NaturalLanguageFormSelect.d.ts +8 -9
  48. package/dist/src/generated/components/TextEditor/MentionList.d.ts +4 -1
  49. package/dist/stories/ActionCard.stories.d.ts +3 -0
  50. package/dist/stories/ActionCardDetailed.stories.d.ts +2 -0
  51. package/dist/stories/Dropzone.stories.d.ts +2 -2
  52. package/dist/stories/FileUpload.stories.d.ts +6 -1
  53. package/dist/stories/MediaPicker.stories.d.ts +3 -1
  54. package/dist/stories/NaturalLanguageForm.stories.d.ts +37 -24
  55. package/dist/stories/TextEditor.stories.d.ts +9 -0
  56. package/dist/web-ui-tailwind.css +3 -0
  57. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import type { ElementType, FC, ReactNode } from "react";
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 the other
19
- * four types, whose icons are fixed.
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
- export type ActionType = "information" | "contact" | "lesson" | "calculation" | "measurement";
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. The other four types have fixed
8
- * icons, so this is ignored for them rather than being theirs to override.
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 the other
28
- * four types, whose icons are fixed.
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: import("react").ForwardRefExoticComponent<Omit<Props, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
6
+ export declare const Dropzone: (props: Props) => import("react").JSX.Element;
7
7
  export default Dropzone;
@@ -1,4 +1,4 @@
1
- import type { FC, ReactNode } from "react";
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: FC<FileUploadProps>;
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: React.ForwardRefExoticComponent<MediaPickerProps & React.RefAttributes<HTMLButtonElement>>;
91
+ export declare const MediaPicker: ({ ref, ...props }: MediaPickerProps & {
92
+ ref?: React.Ref<HTMLButtonElement>;
93
+ }) => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- import React from "react";
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: React.ReactNode;
16
+ children: ReactNode;
17
+ ref?: Ref<HTMLDivElement>;
17
18
  };
18
- declare const NaturalLanguageFormWithSubComponents: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>> & {
19
- Input: React.ForwardRefExoticComponent<Omit<Omit<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "width"> & {
20
- suffix?: string;
21
- prefix?: string;
22
- icon?: React.FC<import("../..").IconProps> | import("../..").IconKey;
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?];
24
- height?: FormHeightNames;
25
- isError?: boolean;
26
- isClearIconVisible?: boolean;
27
- onClickClearField?: () => void;
28
- clearButtonLabel?: string;
29
- } & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
30
- Select: React.ForwardRefExoticComponent<Omit<Omit<Omit<React.DetailedHTMLProps<React.SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, "ref">, "width"> & {
31
- children?: React.ReactNode;
32
- suffix?: string;
33
- prefix?: string;
34
- 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?];
35
- height?: FormHeightNames;
36
- isError?: boolean;
37
- } & React.RefAttributes<HTMLSelectElement>, "ref"> & React.RefAttributes<HTMLSelectElement>>;
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?: React.ElementType | undefined;
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
- }): React.JSX.Element;
60
+ }): import("react").JSX.Element;
51
61
  displayName: string;
52
62
  };
53
- InputSelect: React.ForwardRefExoticComponent<Omit<import("../InputSelect/InputSelect").InputSelectProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>> & {
54
- Input: React.ForwardRefExoticComponent<Omit<Omit<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "width"> & {
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
- } & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
65
- Select: React.ForwardRefExoticComponent<Omit<Omit<Omit<React.DetailedHTMLProps<React.SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, "ref">, "width"> & {
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
- } & React.RefAttributes<HTMLSelectElement>, "ref"> & React.RefAttributes<HTMLSelectElement>>;
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 React from "react";
2
- export declare const NaturalLanguageFormInput: React.ForwardRefExoticComponent<Omit<Omit<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "width"> & {
3
- suffix?: string;
4
- prefix?: string;
5
- icon?: React.FC<import("../..").IconProps> | import("../..").IconKey;
6
- 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?];
7
- height?: import("../../system/Sizes").FormHeightNames;
8
- isError?: boolean;
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 React from "react";
2
- export declare const NaturalLanguageFormInputSelect: React.ForwardRefExoticComponent<Omit<import("../InputSelect/InputSelect").InputSelectProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>> & {
3
- Input: React.ForwardRefExoticComponent<Omit<Omit<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "width"> & {
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
- } & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
14
- Select: React.ForwardRefExoticComponent<Omit<Omit<Omit<React.DetailedHTMLProps<React.SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, "ref">, "width"> & {
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
- } & React.RefAttributes<HTMLSelectElement>, "ref"> & React.RefAttributes<HTMLSelectElement>>;
26
+ } & import("react").RefAttributes<HTMLSelectElement>, "ref"> & import("react").RefAttributes<HTMLSelectElement>>;
22
27
  };
28
+ export {};
@@ -1,9 +1,8 @@
1
- import React from "react";
2
- export declare const NaturalLanguageFormSelect: React.ForwardRefExoticComponent<Omit<Omit<Omit<React.DetailedHTMLProps<React.SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, "ref">, "width"> & {
3
- children?: React.ReactNode;
4
- suffix?: string;
5
- prefix?: string;
6
- 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?];
7
- height?: import("../../system/Sizes").FormHeightNames;
8
- isError?: boolean;
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: import("react").ForwardRefExoticComponent<SuggestionProps<TextEditorTag, MentionNodeAttrs> & import("react").RefAttributes<MentionListRef>>;
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 { ElementType, FC, ReactNode } from "react";
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 the other
19
- * four types, whose icons are fixed.
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
- export type ActionType = "information" | "contact" | "lesson" | "calculation" | "measurement";
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. The other four types have fixed
8
- * icons, so this is ignored for them rather than being theirs to override.
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 the other
28
- * four types, whose icons are fixed.
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: import("react").ForwardRefExoticComponent<Omit<Props, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
6
+ export declare const Dropzone: (props: Props) => import("react").JSX.Element;
7
7
  export default Dropzone;
@@ -1,4 +1,4 @@
1
- import type { FC, ReactNode } from "react";
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: FC<FileUploadProps>;
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: React.ForwardRefExoticComponent<MediaPickerProps & React.RefAttributes<HTMLButtonElement>>;
91
+ export declare const MediaPicker: ({ ref, ...props }: MediaPickerProps & {
92
+ ref?: React.Ref<HTMLButtonElement>;
93
+ }) => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- import React from "react";
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: React.ReactNode;
16
+ children: ReactNode;
17
+ ref?: Ref<HTMLDivElement>;
17
18
  };
18
- declare const NaturalLanguageFormWithSubComponents: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>> & {
19
- Input: React.ForwardRefExoticComponent<Omit<Omit<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "width"> & {
20
- suffix?: string;
21
- prefix?: string;
22
- icon?: React.FC<import("../..").IconProps> | import("../..").IconKey;
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?];
24
- height?: FormHeightNames;
25
- isError?: boolean;
26
- isClearIconVisible?: boolean;
27
- onClickClearField?: () => void;
28
- clearButtonLabel?: string;
29
- } & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
30
- Select: React.ForwardRefExoticComponent<Omit<Omit<Omit<React.DetailedHTMLProps<React.SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, "ref">, "width"> & {
31
- children?: React.ReactNode;
32
- suffix?: string;
33
- prefix?: string;
34
- 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?];
35
- height?: FormHeightNames;
36
- isError?: boolean;
37
- } & React.RefAttributes<HTMLSelectElement>, "ref"> & React.RefAttributes<HTMLSelectElement>>;
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?: React.ElementType | undefined;
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
- }): React.JSX.Element;
60
+ }): import("react").JSX.Element;
51
61
  displayName: string;
52
62
  };
53
- InputSelect: React.ForwardRefExoticComponent<Omit<import("../InputSelect/InputSelect").InputSelectProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>> & {
54
- Input: React.ForwardRefExoticComponent<Omit<Omit<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "width"> & {
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
- } & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
65
- Select: React.ForwardRefExoticComponent<Omit<Omit<Omit<React.DetailedHTMLProps<React.SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, "ref">, "width"> & {
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
- } & React.RefAttributes<HTMLSelectElement>, "ref"> & React.RefAttributes<HTMLSelectElement>>;
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 React from "react";
2
- export declare const NaturalLanguageFormInput: React.ForwardRefExoticComponent<Omit<Omit<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "width"> & {
3
- suffix?: string;
4
- prefix?: string;
5
- icon?: React.FC<import("../..").IconProps> | import("../..").IconKey;
6
- 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?];
7
- height?: import("../../system/Sizes").FormHeightNames;
8
- isError?: boolean;
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 React from "react";
2
- export declare const NaturalLanguageFormInputSelect: React.ForwardRefExoticComponent<Omit<import("../InputSelect/InputSelect").InputSelectProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>> & {
3
- Input: React.ForwardRefExoticComponent<Omit<Omit<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "width"> & {
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
- } & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
14
- Select: React.ForwardRefExoticComponent<Omit<Omit<Omit<React.DetailedHTMLProps<React.SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, "ref">, "width"> & {
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
- } & React.RefAttributes<HTMLSelectElement>, "ref"> & React.RefAttributes<HTMLSelectElement>>;
26
+ } & import("react").RefAttributes<HTMLSelectElement>, "ref"> & import("react").RefAttributes<HTMLSelectElement>>;
22
27
  };
28
+ export {};
@@ -1,9 +1,8 @@
1
- import React from "react";
2
- export declare const NaturalLanguageFormSelect: React.ForwardRefExoticComponent<Omit<Omit<Omit<React.DetailedHTMLProps<React.SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, "ref">, "width"> & {
3
- children?: React.ReactNode;
4
- suffix?: string;
5
- prefix?: string;
6
- 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?];
7
- height?: import("../../system/Sizes").FormHeightNames;
8
- isError?: boolean;
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 {};