@luscii-healthtech/web-ui 58.9.0 → 58.9.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.
@@ -49,6 +49,17 @@ export type Props = {
49
49
  instruments?: DistributiveOmit<InstrumentCardProps, "variant">[];
50
50
  /** @default "Instruments in this action" */
51
51
  instrumentsHeading?: string;
52
+ /**
53
+ * Page-specific content rendered at the foot of the panel, e.g. which
54
+ * protocols include the action or its Self Care visibility.
55
+ */
56
+ children?: ReactNode;
57
+ /** @default "Edit action" */
58
+ editLabel?: string;
59
+ /** @default "Delete action" */
60
+ deleteLabel?: string;
61
+ /** @default "Close action details" */
62
+ closeLabel?: string;
52
63
  /** Renders the pencil button in the header. Omitted when not provided. */
53
64
  onEdit?: () => void;
54
65
  /** Renders the trash button in the header. Omitted when not provided. */
@@ -63,10 +74,10 @@ export type Props = {
63
74
  * `ActionCard` list row.
64
75
  *
65
76
  * Four sections stack vertically: header, metadata tags, schedule and
66
- * instruments. The schedule and instrument sections are omitted entirely when
67
- * their data is absent or empty, and each header button appears only when its
68
- * handler is provided, so the Figma variant matrix is expressed by which props
69
- * are passed rather than by a `variant` prop.
77
+ * instruments, followed by optional footer content. The schedule and instrument
78
+ * sections are omitted entirely when their data is absent or empty, and each
79
+ * header button appears only when its handler is provided, so the Figma variant
80
+ * matrix is expressed by which props are passed rather than by a `variant` prop.
70
81
  *
71
82
  * The panel is capped at 600px wide to match the design; pass `className` to
72
83
  * override that if the surrounding layout needs it.
@@ -95,5 +106,5 @@ export type Props = {
95
106
  * />
96
107
  * ```
97
108
  */
98
- export declare const ActionCardDetailed: ({ type, iconUrl, title, category, metadata, schedule, scheduleHeading, instruments, instrumentsHeading, onEdit, onDelete, onClose, className, }: Props) => import("react").JSX.Element;
109
+ export declare const ActionCardDetailed: ({ type, iconUrl, title, category, metadata, schedule, scheduleHeading, instruments, instrumentsHeading, children, editLabel, deleteLabel, closeLabel, onEdit, onDelete, onClose, className, }: Props) => import("react").JSX.Element;
99
110
  export {};
@@ -43,6 +43,12 @@ type BaseProps = {
43
43
  * @default "compact"
44
44
  */
45
45
  variant?: "compact" | "detailed";
46
+ /**
47
+ * Makes the detailed card clickable. Ignored in the compact variant because
48
+ * ActionCard's title button stretches an overlay over the whole card, so a
49
+ * nested click target would conflict.
50
+ */
51
+ onClick?: () => void;
46
52
  /** Merged onto the root element. */
47
53
  className?: string;
48
54
  };
@@ -49,6 +49,17 @@ export type Props = {
49
49
  instruments?: DistributiveOmit<InstrumentCardProps, "variant">[];
50
50
  /** @default "Instruments in this action" */
51
51
  instrumentsHeading?: string;
52
+ /**
53
+ * Page-specific content rendered at the foot of the panel, e.g. which
54
+ * protocols include the action or its Self Care visibility.
55
+ */
56
+ children?: ReactNode;
57
+ /** @default "Edit action" */
58
+ editLabel?: string;
59
+ /** @default "Delete action" */
60
+ deleteLabel?: string;
61
+ /** @default "Close action details" */
62
+ closeLabel?: string;
52
63
  /** Renders the pencil button in the header. Omitted when not provided. */
53
64
  onEdit?: () => void;
54
65
  /** Renders the trash button in the header. Omitted when not provided. */
@@ -63,10 +74,10 @@ export type Props = {
63
74
  * `ActionCard` list row.
64
75
  *
65
76
  * Four sections stack vertically: header, metadata tags, schedule and
66
- * instruments. The schedule and instrument sections are omitted entirely when
67
- * their data is absent or empty, and each header button appears only when its
68
- * handler is provided, so the Figma variant matrix is expressed by which props
69
- * are passed rather than by a `variant` prop.
77
+ * instruments, followed by optional footer content. The schedule and instrument
78
+ * sections are omitted entirely when their data is absent or empty, and each
79
+ * header button appears only when its handler is provided, so the Figma variant
80
+ * matrix is expressed by which props are passed rather than by a `variant` prop.
70
81
  *
71
82
  * The panel is capped at 600px wide to match the design; pass `className` to
72
83
  * override that if the surrounding layout needs it.
@@ -95,5 +106,5 @@ export type Props = {
95
106
  * />
96
107
  * ```
97
108
  */
98
- export declare const ActionCardDetailed: ({ type, iconUrl, title, category, metadata, schedule, scheduleHeading, instruments, instrumentsHeading, onEdit, onDelete, onClose, className, }: Props) => import("react").JSX.Element;
109
+ export declare const ActionCardDetailed: ({ type, iconUrl, title, category, metadata, schedule, scheduleHeading, instruments, instrumentsHeading, children, editLabel, deleteLabel, closeLabel, onEdit, onDelete, onClose, className, }: Props) => import("react").JSX.Element;
99
110
  export {};
@@ -43,6 +43,12 @@ type BaseProps = {
43
43
  * @default "compact"
44
44
  */
45
45
  variant?: "compact" | "detailed";
46
+ /**
47
+ * Makes the detailed card clickable. Ignored in the compact variant because
48
+ * ActionCard's title button stretches an overlay over the whole card, so a
49
+ * nested click target would conflict.
50
+ */
51
+ onClick?: () => void;
46
52
  /** Merged onto the root element. */
47
53
  className?: string;
48
54
  };
@@ -3,7 +3,7 @@ import { type ActionType } from "../src/components/ActionCard/ActionCard";
3
3
  import { type Props as ActionCardDetailedProps } from "../src/components/ActionCardDetailed/ActionCardDetailed";
4
4
  declare const meta: {
5
5
  title: string;
6
- component: ({ type, iconUrl, title, category, metadata, schedule, scheduleHeading, instruments, instrumentsHeading, onEdit, onDelete, onClose, className, }: ActionCardDetailedProps) => import("react").JSX.Element;
6
+ component: ({ type, iconUrl, title, category, metadata, schedule, scheduleHeading, instruments, instrumentsHeading, children, editLabel, deleteLabel, closeLabel, onEdit, onDelete, onClose, className, }: ActionCardDetailedProps) => import("react").JSX.Element;
7
7
  parameters: {
8
8
  layout: string;
9
9
  backgrounds: {
@@ -70,3 +70,5 @@ export declare const ScheduleAndInstruments: Story;
70
70
  export declare const ScheduleOnly: Story;
71
71
  export declare const InstrumentsOnly: Story;
72
72
  export declare const WithoutScheduleOrInstruments: Story;
73
+ export declare const WithFooterContent: Story;
74
+ export declare const CustomLabels: Story;
@@ -41,3 +41,4 @@ export declare const EveryTypeCompact: Story;
41
41
  export declare const EveryTypeDetailed: Story;
42
42
  export declare const DetailedOptionalFields: Story;
43
43
  export declare const ErrorStates: Story;
44
+ export declare const Clickable: Story;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luscii-healthtech/web-ui",
3
- "version": "58.9.0",
3
+ "version": "58.9.2",
4
4
  "license": "MIT",
5
5
  "author": {
6
6
  "name": "Joris Janssen"