@luscii-healthtech/web-ui 64.0.6 → 64.2.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.
@@ -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. */
@@ -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. */
@@ -66,3 +66,6 @@ export declare const WithAndWithoutActions: Story;
66
66
  export declare const DraggableAndStatic: Story;
67
67
  export declare const ListVariant: Story;
68
68
  export declare const CompactVariant: Story;
69
+ export declare const MetadataWithIcon: Story;
70
+ /** The scheduled workflow cards from the Figma "workflow" frame. */
71
+ export declare const Workflows: Story;
@@ -82,3 +82,5 @@ export declare const CustomLabels: Story;
82
82
  * header must keep that span at full size when a long title wraps.
83
83
  */
84
84
  export declare const MeasurementWithLongTitle: Story;
85
+ /** The scheduled workflow detail cards from the Figma "workflow" frame. */
86
+ export declare const Workflows: Story;
@@ -1631,6 +1631,9 @@ button, input:where([type='button'], [type='reset'], [type='submit']), ::file-se
1631
1631
  .ui\:h-\[calc\(100vh-\(--spacing\(12\)\)\)\] {
1632
1632
  height: calc(100vh - (calc(var(--ui-spacing) * 12)));
1633
1633
  }
1634
+ .ui\:h-\[var\(--ui-semantic-size-xl\)\] {
1635
+ height: var(--ui-semantic-size-xl);
1636
+ }
1634
1637
  .ui\:h-dvh {
1635
1638
  height: 100dvh;
1636
1639
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luscii-healthtech/web-ui",
3
- "version": "64.0.6",
3
+ "version": "64.2.0",
4
4
  "license": "MIT",
5
5
  "author": {
6
6
  "name": "Joris Janssen"
@@ -177,10 +177,10 @@
177
177
  "@tiptap/suggestion": "3.31.4",
178
178
  "classnames": "^2.3.2",
179
179
  "d3-scale": "^4.0.2",
180
- "date-fns": "^3.3.1",
180
+ "date-fns": "^4.1.0",
181
181
  "dompurify": "^3.4.17",
182
182
  "lodash-es": "^4.18.1",
183
- "react-datepicker": "^7.6.0",
183
+ "react-datepicker": "^8.10.0",
184
184
  "react-lazy-load-image-component": "^1.6.3",
185
185
  "react-modal": "^3.16.3",
186
186
  "react-select": "^5.10.2",