@luscii-healthtech/web-ui 58.4.0 → 58.6.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/index.development.js +85 -37
- 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/ActionCardDetailed/ActionCardDetailed.d.ts +94 -0
- package/dist/src/components/Checkbox/LabeledCheckbox.d.ts +10 -2
- package/dist/src/components/Checkbox/StyledCheckbox.d.ts +5 -3
- package/dist/src/components/CheckboxList/CheckboxGroup.d.ts +1 -1
- package/dist/src/components/CheckboxList/CheckboxList.types.d.ts +14 -0
- package/dist/src/generated/components/ActionCardDetailed/ActionCardDetailed.d.ts +94 -0
- package/dist/src/generated/components/Checkbox/LabeledCheckbox.d.ts +10 -2
- package/dist/src/generated/components/Checkbox/StyledCheckbox.d.ts +5 -3
- package/dist/src/generated/components/CheckboxList/CheckboxGroup.d.ts +1 -1
- package/dist/src/generated/components/CheckboxList/CheckboxList.types.d.ts +14 -0
- package/dist/src/generated/index.d.ts +1 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/stories/ActionCardDetailed.stories.d.ts +72 -0
- package/dist/stories/LabeledCheckbox.stories.d.ts +6 -1
- package/dist/web-ui-tailwind.css +60 -6
- package/dist/web-ui.esm.js +1 -1
- package/dist/web-ui.esm.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import { type ActionType } from "../ActionCard/ActionCard";
|
|
3
|
+
import { type Props as InstrumentCardProps } from "../InstrumentCard/InstrumentCard";
|
|
4
|
+
/**
|
|
5
|
+
* `Omit` distributes over the union so `InstrumentCard`'s discriminated
|
|
6
|
+
* `state`/`errorMessage` pairing survives; a plain `Omit` would collapse it.
|
|
7
|
+
*/
|
|
8
|
+
type DistributiveOmit<T, K extends PropertyKey> = T extends unknown ? Omit<T, K> : never;
|
|
9
|
+
/** One line of the schedule section, e.g. "Starts: 4 day(s) before Patient Activated". */
|
|
10
|
+
export type ScheduleRow = {
|
|
11
|
+
/**
|
|
12
|
+
* Leading 24x24 icon, e.g. `<FlagIcon />`. Decorative — the component hides
|
|
13
|
+
* it from assistive tech, so the label and value carry the meaning.
|
|
14
|
+
*/
|
|
15
|
+
icon: ReactNode;
|
|
16
|
+
/** Light-weight prefix, e.g. `"Starts:"`. */
|
|
17
|
+
label: string;
|
|
18
|
+
/** Regular-weight value shown alongside the label on the same line. */
|
|
19
|
+
value: string;
|
|
20
|
+
/** Optional smaller line beneath, e.g. `"From 12:00 - 13:00"`. */
|
|
21
|
+
detail?: string;
|
|
22
|
+
};
|
|
23
|
+
export type Props = {
|
|
24
|
+
/** Selects the coloured action icon shown beside the title. */
|
|
25
|
+
type: ActionType;
|
|
26
|
+
/** Action name, rendered as the panel heading. */
|
|
27
|
+
title: string;
|
|
28
|
+
/** Subtitle beneath the title, e.g. `"Action category"`. Omitted when absent. */
|
|
29
|
+
category?: string;
|
|
30
|
+
/** Tags beneath the header, e.g. `["2 min reading time", "78% progress"]`. */
|
|
31
|
+
metadata?: string[];
|
|
32
|
+
/**
|
|
33
|
+
* Rows of the schedule section. The whole section — heading included — is
|
|
34
|
+
* omitted when this is absent or empty.
|
|
35
|
+
*/
|
|
36
|
+
schedule?: ScheduleRow[];
|
|
37
|
+
/** @default "Schedule settings" */
|
|
38
|
+
scheduleHeading?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Instruments belonging to the action. The whole section — heading included
|
|
41
|
+
* — is omitted when this is absent or empty. Always rendered in the detailed
|
|
42
|
+
* variant, so `variant` is not accepted.
|
|
43
|
+
*/
|
|
44
|
+
instruments?: DistributiveOmit<InstrumentCardProps, "variant">[];
|
|
45
|
+
/** @default "Instruments in this action" */
|
|
46
|
+
instrumentsHeading?: string;
|
|
47
|
+
/** Renders the pencil button in the header. Omitted when not provided. */
|
|
48
|
+
onEdit?: () => void;
|
|
49
|
+
/** Renders the trash button in the header. Omitted when not provided. */
|
|
50
|
+
onDelete?: () => void;
|
|
51
|
+
/** Renders the close button in the header. Omitted when not provided. */
|
|
52
|
+
onClose?: () => void;
|
|
53
|
+
/** Merged onto the root element. */
|
|
54
|
+
className?: string;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* The expanded detail panel for a single action — the counterpart to the
|
|
58
|
+
* `ActionCard` list row.
|
|
59
|
+
*
|
|
60
|
+
* Four sections stack vertically: header, metadata tags, schedule and
|
|
61
|
+
* instruments. The schedule and instrument sections are omitted entirely when
|
|
62
|
+
* their data is absent or empty, and each header button appears only when its
|
|
63
|
+
* handler is provided, so the Figma variant matrix is expressed by which props
|
|
64
|
+
* are passed rather than by a `variant` prop.
|
|
65
|
+
*
|
|
66
|
+
* The panel is capped at 600px wide to match the design; pass `className` to
|
|
67
|
+
* override that if the surrounding layout needs it.
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* ```tsx
|
|
71
|
+
* <ActionCardDetailed
|
|
72
|
+
* type="information"
|
|
73
|
+
* title="Information action title"
|
|
74
|
+
* category="Action category"
|
|
75
|
+
* metadata={["2 min reading time", "78% progress"]}
|
|
76
|
+
* schedule={[
|
|
77
|
+
* { icon: <FlagIcon />, label: "Starts:", value: "4 day(s) before Patient Activated" },
|
|
78
|
+
* {
|
|
79
|
+
* icon: <CalendarDayIcon />,
|
|
80
|
+
* label: "Timeframe:",
|
|
81
|
+
* value: "Anytime on scheduled day",
|
|
82
|
+
* detail: "From 12:00 - 13:00",
|
|
83
|
+
* },
|
|
84
|
+
* ]}
|
|
85
|
+
* instruments={[
|
|
86
|
+
* { type: "info", title: "How to stop smoking", category: "Lesson", count: 2 },
|
|
87
|
+
* ]}
|
|
88
|
+
* onEdit={openEditor}
|
|
89
|
+
* onClose={closePanel}
|
|
90
|
+
* />
|
|
91
|
+
* ```
|
|
92
|
+
*/
|
|
93
|
+
export declare const ActionCardDetailed: ({ type, title, category, metadata, schedule, scheduleHeading, instruments, instrumentsHeading, onEdit, onDelete, onClose, className, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
94
|
+
export {};
|
|
@@ -11,7 +11,11 @@ import React from "react";
|
|
|
11
11
|
* />
|
|
12
12
|
* ```
|
|
13
13
|
*/
|
|
14
|
-
export declare const LabeledCheckbox: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & {
|
|
14
|
+
export declare const LabeledCheckbox: React.ForwardRefExoticComponent<Omit<Omit<Omit<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & {
|
|
15
|
+
ref?: ((instance: HTMLInputElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React.RefObject<HTMLInputElement> | null | undefined;
|
|
16
|
+
} & {
|
|
17
|
+
indeterminate?: boolean;
|
|
18
|
+
}, "ref"> & React.RefAttributes<HTMLInputElement>, "ref"> & {
|
|
15
19
|
ref?: ((instance: HTMLInputElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React.RefObject<HTMLInputElement> | null | undefined;
|
|
16
20
|
} & {
|
|
17
21
|
/**
|
|
@@ -44,7 +48,11 @@ export declare const LabeledCheckbox: React.ForwardRefExoticComponent<Omit<Omit<
|
|
|
44
48
|
errorText?: React.ReactNode;
|
|
45
49
|
aside?: never;
|
|
46
50
|
}, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
47
|
-
export declare const LabeledCheckboxCard: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & {
|
|
51
|
+
export declare const LabeledCheckboxCard: React.ForwardRefExoticComponent<Omit<Omit<Omit<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & {
|
|
52
|
+
ref?: ((instance: HTMLInputElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React.RefObject<HTMLInputElement> | null | undefined;
|
|
53
|
+
} & {
|
|
54
|
+
indeterminate?: boolean;
|
|
55
|
+
}, "ref"> & React.RefAttributes<HTMLInputElement>, "ref"> & {
|
|
48
56
|
ref?: ((instance: HTMLInputElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React.RefObject<HTMLInputElement> | null | undefined;
|
|
49
57
|
} & {
|
|
50
58
|
/**
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}
|
|
2
|
+
type Props = React.ComponentPropsWithRef<"input"> & {
|
|
3
|
+
indeterminate?: boolean;
|
|
4
|
+
};
|
|
5
|
+
export declare const StyledCheckbox: React.ForwardRefExoticComponent<Omit<Props, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
6
|
+
export {};
|
|
@@ -49,9 +49,23 @@ export interface CheckboxGroupItemProps extends CheckboxListItem {
|
|
|
49
49
|
export interface CheckboxListItem {
|
|
50
50
|
id: string;
|
|
51
51
|
label: string;
|
|
52
|
+
/**
|
|
53
|
+
* Helper text shown underneath the label.
|
|
54
|
+
*/
|
|
55
|
+
explanation?: string;
|
|
52
56
|
isChecked?: boolean;
|
|
53
57
|
isDisabled?: boolean;
|
|
54
58
|
className?: string;
|
|
59
|
+
/**
|
|
60
|
+
* The name that the value of the checkbox will be associated with.
|
|
61
|
+
* Same as `name` on `<input type="checkbox" />`.
|
|
62
|
+
*/
|
|
63
|
+
name?: string;
|
|
64
|
+
/**
|
|
65
|
+
* The value submitted with the form when this checkbox is checked.
|
|
66
|
+
* Same as `value` on `<input type="checkbox" />`.
|
|
67
|
+
*/
|
|
68
|
+
value?: string;
|
|
55
69
|
}
|
|
56
70
|
export type CheckboxGroup = {
|
|
57
71
|
/**
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import { type ActionType } from "../ActionCard/ActionCard";
|
|
3
|
+
import { type Props as InstrumentCardProps } from "../InstrumentCard/InstrumentCard";
|
|
4
|
+
/**
|
|
5
|
+
* `Omit` distributes over the union so `InstrumentCard`'s discriminated
|
|
6
|
+
* `state`/`errorMessage` pairing survives; a plain `Omit` would collapse it.
|
|
7
|
+
*/
|
|
8
|
+
type DistributiveOmit<T, K extends PropertyKey> = T extends unknown ? Omit<T, K> : never;
|
|
9
|
+
/** One line of the schedule section, e.g. "Starts: 4 day(s) before Patient Activated". */
|
|
10
|
+
export type ScheduleRow = {
|
|
11
|
+
/**
|
|
12
|
+
* Leading 24x24 icon, e.g. `<FlagIcon />`. Decorative — the component hides
|
|
13
|
+
* it from assistive tech, so the label and value carry the meaning.
|
|
14
|
+
*/
|
|
15
|
+
icon: ReactNode;
|
|
16
|
+
/** Light-weight prefix, e.g. `"Starts:"`. */
|
|
17
|
+
label: string;
|
|
18
|
+
/** Regular-weight value shown alongside the label on the same line. */
|
|
19
|
+
value: string;
|
|
20
|
+
/** Optional smaller line beneath, e.g. `"From 12:00 - 13:00"`. */
|
|
21
|
+
detail?: string;
|
|
22
|
+
};
|
|
23
|
+
export type Props = {
|
|
24
|
+
/** Selects the coloured action icon shown beside the title. */
|
|
25
|
+
type: ActionType;
|
|
26
|
+
/** Action name, rendered as the panel heading. */
|
|
27
|
+
title: string;
|
|
28
|
+
/** Subtitle beneath the title, e.g. `"Action category"`. Omitted when absent. */
|
|
29
|
+
category?: string;
|
|
30
|
+
/** Tags beneath the header, e.g. `["2 min reading time", "78% progress"]`. */
|
|
31
|
+
metadata?: string[];
|
|
32
|
+
/**
|
|
33
|
+
* Rows of the schedule section. The whole section — heading included — is
|
|
34
|
+
* omitted when this is absent or empty.
|
|
35
|
+
*/
|
|
36
|
+
schedule?: ScheduleRow[];
|
|
37
|
+
/** @default "Schedule settings" */
|
|
38
|
+
scheduleHeading?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Instruments belonging to the action. The whole section — heading included
|
|
41
|
+
* — is omitted when this is absent or empty. Always rendered in the detailed
|
|
42
|
+
* variant, so `variant` is not accepted.
|
|
43
|
+
*/
|
|
44
|
+
instruments?: DistributiveOmit<InstrumentCardProps, "variant">[];
|
|
45
|
+
/** @default "Instruments in this action" */
|
|
46
|
+
instrumentsHeading?: string;
|
|
47
|
+
/** Renders the pencil button in the header. Omitted when not provided. */
|
|
48
|
+
onEdit?: () => void;
|
|
49
|
+
/** Renders the trash button in the header. Omitted when not provided. */
|
|
50
|
+
onDelete?: () => void;
|
|
51
|
+
/** Renders the close button in the header. Omitted when not provided. */
|
|
52
|
+
onClose?: () => void;
|
|
53
|
+
/** Merged onto the root element. */
|
|
54
|
+
className?: string;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* The expanded detail panel for a single action — the counterpart to the
|
|
58
|
+
* `ActionCard` list row.
|
|
59
|
+
*
|
|
60
|
+
* Four sections stack vertically: header, metadata tags, schedule and
|
|
61
|
+
* instruments. The schedule and instrument sections are omitted entirely when
|
|
62
|
+
* their data is absent or empty, and each header button appears only when its
|
|
63
|
+
* handler is provided, so the Figma variant matrix is expressed by which props
|
|
64
|
+
* are passed rather than by a `variant` prop.
|
|
65
|
+
*
|
|
66
|
+
* The panel is capped at 600px wide to match the design; pass `className` to
|
|
67
|
+
* override that if the surrounding layout needs it.
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* ```tsx
|
|
71
|
+
* <ActionCardDetailed
|
|
72
|
+
* type="information"
|
|
73
|
+
* title="Information action title"
|
|
74
|
+
* category="Action category"
|
|
75
|
+
* metadata={["2 min reading time", "78% progress"]}
|
|
76
|
+
* schedule={[
|
|
77
|
+
* { icon: <FlagIcon />, label: "Starts:", value: "4 day(s) before Patient Activated" },
|
|
78
|
+
* {
|
|
79
|
+
* icon: <CalendarDayIcon />,
|
|
80
|
+
* label: "Timeframe:",
|
|
81
|
+
* value: "Anytime on scheduled day",
|
|
82
|
+
* detail: "From 12:00 - 13:00",
|
|
83
|
+
* },
|
|
84
|
+
* ]}
|
|
85
|
+
* instruments={[
|
|
86
|
+
* { type: "info", title: "How to stop smoking", category: "Lesson", count: 2 },
|
|
87
|
+
* ]}
|
|
88
|
+
* onEdit={openEditor}
|
|
89
|
+
* onClose={closePanel}
|
|
90
|
+
* />
|
|
91
|
+
* ```
|
|
92
|
+
*/
|
|
93
|
+
export declare const ActionCardDetailed: ({ type, title, category, metadata, schedule, scheduleHeading, instruments, instrumentsHeading, onEdit, onDelete, onClose, className, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
94
|
+
export {};
|
|
@@ -11,7 +11,11 @@ import React from "react";
|
|
|
11
11
|
* />
|
|
12
12
|
* ```
|
|
13
13
|
*/
|
|
14
|
-
export declare const LabeledCheckbox: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & {
|
|
14
|
+
export declare const LabeledCheckbox: React.ForwardRefExoticComponent<Omit<Omit<Omit<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & {
|
|
15
|
+
ref?: ((instance: HTMLInputElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React.RefObject<HTMLInputElement> | null | undefined;
|
|
16
|
+
} & {
|
|
17
|
+
indeterminate?: boolean;
|
|
18
|
+
}, "ref"> & React.RefAttributes<HTMLInputElement>, "ref"> & {
|
|
15
19
|
ref?: ((instance: HTMLInputElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React.RefObject<HTMLInputElement> | null | undefined;
|
|
16
20
|
} & {
|
|
17
21
|
/**
|
|
@@ -44,7 +48,11 @@ export declare const LabeledCheckbox: React.ForwardRefExoticComponent<Omit<Omit<
|
|
|
44
48
|
errorText?: React.ReactNode;
|
|
45
49
|
aside?: never;
|
|
46
50
|
}, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
47
|
-
export declare const LabeledCheckboxCard: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & {
|
|
51
|
+
export declare const LabeledCheckboxCard: React.ForwardRefExoticComponent<Omit<Omit<Omit<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & {
|
|
52
|
+
ref?: ((instance: HTMLInputElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React.RefObject<HTMLInputElement> | null | undefined;
|
|
53
|
+
} & {
|
|
54
|
+
indeterminate?: boolean;
|
|
55
|
+
}, "ref"> & React.RefAttributes<HTMLInputElement>, "ref"> & {
|
|
48
56
|
ref?: ((instance: HTMLInputElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React.RefObject<HTMLInputElement> | null | undefined;
|
|
49
57
|
} & {
|
|
50
58
|
/**
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}
|
|
2
|
+
type Props = React.ComponentPropsWithRef<"input"> & {
|
|
3
|
+
indeterminate?: boolean;
|
|
4
|
+
};
|
|
5
|
+
export declare const StyledCheckbox: React.ForwardRefExoticComponent<Omit<Props, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
6
|
+
export {};
|
|
@@ -49,9 +49,23 @@ export interface CheckboxGroupItemProps extends CheckboxListItem {
|
|
|
49
49
|
export interface CheckboxListItem {
|
|
50
50
|
id: string;
|
|
51
51
|
label: string;
|
|
52
|
+
/**
|
|
53
|
+
* Helper text shown underneath the label.
|
|
54
|
+
*/
|
|
55
|
+
explanation?: string;
|
|
52
56
|
isChecked?: boolean;
|
|
53
57
|
isDisabled?: boolean;
|
|
54
58
|
className?: string;
|
|
59
|
+
/**
|
|
60
|
+
* The name that the value of the checkbox will be associated with.
|
|
61
|
+
* Same as `name` on `<input type="checkbox" />`.
|
|
62
|
+
*/
|
|
63
|
+
name?: string;
|
|
64
|
+
/**
|
|
65
|
+
* The value submitted with the form when this checkbox is checked.
|
|
66
|
+
* Same as `value` on `<input type="checkbox" />`.
|
|
67
|
+
*/
|
|
68
|
+
value?: string;
|
|
55
69
|
}
|
|
56
70
|
export type CheckboxGroup = {
|
|
57
71
|
/**
|
|
@@ -96,6 +96,7 @@ export { Tag } from "./components/Tag/Tag";
|
|
|
96
96
|
export { TagGroup } from "./components/Tag/TagGroup";
|
|
97
97
|
export { InstrumentCard, type InstrumentType, type Props as InstrumentCardProps, } from "./components/InstrumentCard/InstrumentCard";
|
|
98
98
|
export { ActionCard, type ActionType, type ActionCardMetadata, type Props as ActionCardProps, } from "./components/ActionCard/ActionCard";
|
|
99
|
+
export { ActionCardDetailed, type ScheduleRow, type Props as ActionCardDetailedProps, } from "./components/ActionCardDetailed/ActionCardDetailed";
|
|
99
100
|
export { Textarea, type TextareaProps, type ResizeTypes, } from "./components/Textarea/Textarea";
|
|
100
101
|
export { TextEditor, type TextEditorTag, } from "./components/TextEditor/TextEditor";
|
|
101
102
|
export { type TextEditorTranslations } from "./components/TextEditor/textEditorTranslations";
|
package/dist/src/index.d.ts
CHANGED
|
@@ -96,6 +96,7 @@ export { Tag } from "./components/Tag/Tag";
|
|
|
96
96
|
export { TagGroup } from "./components/Tag/TagGroup";
|
|
97
97
|
export { InstrumentCard, type InstrumentType, type Props as InstrumentCardProps, } from "./components/InstrumentCard/InstrumentCard";
|
|
98
98
|
export { ActionCard, type ActionType, type ActionCardMetadata, type Props as ActionCardProps, } from "./components/ActionCard/ActionCard";
|
|
99
|
+
export { ActionCardDetailed, type ScheduleRow, type Props as ActionCardDetailedProps, } from "./components/ActionCardDetailed/ActionCardDetailed";
|
|
99
100
|
export { Textarea, type TextareaProps, type ResizeTypes, } from "./components/Textarea/Textarea";
|
|
100
101
|
export { TextEditor, type TextEditorTag, } from "./components/TextEditor/TextEditor";
|
|
101
102
|
export { type TextEditorTranslations } from "./components/TextEditor/textEditorTranslations";
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { type StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { type ActionType } from "../src/components/ActionCard/ActionCard";
|
|
3
|
+
import { type Props as ActionCardDetailedProps } from "../src/components/ActionCardDetailed/ActionCardDetailed";
|
|
4
|
+
declare const meta: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: ({ type, title, category, metadata, schedule, scheduleHeading, instruments, instrumentsHeading, onEdit, onDelete, onClose, className, }: ActionCardDetailedProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: string;
|
|
9
|
+
backgrounds: {
|
|
10
|
+
default: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
argTypes: {
|
|
14
|
+
type: {
|
|
15
|
+
options: ActionType[];
|
|
16
|
+
control: {
|
|
17
|
+
type: "select";
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
title: {
|
|
21
|
+
control: {
|
|
22
|
+
type: "text";
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
category: {
|
|
26
|
+
control: {
|
|
27
|
+
type: "text";
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
metadata: {
|
|
31
|
+
control: {
|
|
32
|
+
type: "object";
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
schedule: {
|
|
36
|
+
control: {
|
|
37
|
+
type: "object";
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
scheduleHeading: {
|
|
41
|
+
control: {
|
|
42
|
+
type: "text";
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
instruments: {
|
|
46
|
+
control: {
|
|
47
|
+
type: "object";
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
instrumentsHeading: {
|
|
51
|
+
control: {
|
|
52
|
+
type: "text";
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
onEdit: {
|
|
56
|
+
action: string;
|
|
57
|
+
};
|
|
58
|
+
onDelete: {
|
|
59
|
+
action: string;
|
|
60
|
+
};
|
|
61
|
+
onClose: {
|
|
62
|
+
action: string;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
export default meta;
|
|
67
|
+
type Story = StoryObj<typeof meta>;
|
|
68
|
+
export declare const FullExample: Story;
|
|
69
|
+
export declare const ScheduleAndInstruments: Story;
|
|
70
|
+
export declare const ScheduleOnly: Story;
|
|
71
|
+
export declare const InstrumentsOnly: Story;
|
|
72
|
+
export declare const WithoutScheduleOrInstruments: Story;
|
|
@@ -2,7 +2,11 @@ import React from "react";
|
|
|
2
2
|
import { type StoryObj } from "@storybook/react-vite";
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & {
|
|
5
|
+
component: React.ForwardRefExoticComponent<Omit<Omit<Omit<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & {
|
|
6
|
+
ref?: ((instance: HTMLInputElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React.RefObject<HTMLInputElement> | null | undefined;
|
|
7
|
+
} & {
|
|
8
|
+
indeterminate?: boolean;
|
|
9
|
+
}, "ref"> & React.RefAttributes<HTMLInputElement>, "ref"> & {
|
|
6
10
|
ref?: ((instance: HTMLInputElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React.RefObject<HTMLInputElement> | null | undefined;
|
|
7
11
|
} & {
|
|
8
12
|
children?: React.ReactNode;
|
|
@@ -32,5 +36,6 @@ export declare const Overview: Story;
|
|
|
32
36
|
export declare const OverviewLabeledCheckboxCard: Story;
|
|
33
37
|
export declare const LabeledCheckboxCardGroupLarge: Story;
|
|
34
38
|
export declare const Disabled: Story;
|
|
39
|
+
export declare const Indeterminate: Story;
|
|
35
40
|
export declare const MultipleCheckboxes: Story;
|
|
36
41
|
export declare const WithHelperAndErrorText: Story;
|
package/dist/web-ui-tailwind.css
CHANGED
|
@@ -1567,6 +1567,10 @@ button, input:where([type='button'], [type='reset'], [type='submit']), ::file-se
|
|
|
1567
1567
|
width: calc(var(--ui-spacing) * 2);
|
|
1568
1568
|
height: calc(var(--ui-spacing) * 2);
|
|
1569
1569
|
}
|
|
1570
|
+
.ui\:size-\[var\(--ui-semantic-size-xl\)\] {
|
|
1571
|
+
width: var(--ui-semantic-size-xl);
|
|
1572
|
+
height: var(--ui-semantic-size-xl);
|
|
1573
|
+
}
|
|
1570
1574
|
.ui\:h-1 {
|
|
1571
1575
|
height: calc(var(--ui-spacing) * 1);
|
|
1572
1576
|
}
|
|
@@ -1972,6 +1976,9 @@ button, input:where([type='button'], [type='reset'], [type='submit']), ::file-se
|
|
|
1972
1976
|
.ui\:max-w-\[560px\] {
|
|
1973
1977
|
max-width: 560px;
|
|
1974
1978
|
}
|
|
1979
|
+
.ui\:max-w-\[600px\] {
|
|
1980
|
+
max-width: 600px;
|
|
1981
|
+
}
|
|
1975
1982
|
.ui\:max-w-\[720px\] {
|
|
1976
1983
|
max-width: 720px;
|
|
1977
1984
|
}
|
|
@@ -2520,6 +2527,9 @@ button, input:where([type='button'], [type='reset'], [type='submit']), ::file-se
|
|
|
2520
2527
|
.ui\:\[border-radius\:var\(--ui-semantic-radius-m\)\] {
|
|
2521
2528
|
border-radius: var(--ui-semantic-radius-m);
|
|
2522
2529
|
}
|
|
2530
|
+
.ui\:\[border-radius\:var\(--ui-semantic-radius-s\)\] {
|
|
2531
|
+
border-radius: var(--ui-semantic-radius-s);
|
|
2532
|
+
}
|
|
2523
2533
|
.ui\:radius-l {
|
|
2524
2534
|
border-radius: 24px;
|
|
2525
2535
|
}
|
|
@@ -4664,12 +4674,6 @@ button, input:where([type='button'], [type='reset'], [type='submit']), ::file-se
|
|
|
4664
4674
|
background-color: var(--ui-color-white);
|
|
4665
4675
|
}
|
|
4666
4676
|
}
|
|
4667
|
-
.ui\:before\:bg-\[url\(\'data\:image\/svg\+xml\;utf8\,\%3Csvg\%20width\%3D\%2214\%22\%20height\%3D\%2211\%22\%20viewBox\%3D\%220\%200\%2014\%2011\%22\%20fill\%3D\%22none\%22\%20xmlns\%3D\%22http\%3A\%2F\%2Fwww\.w3\.org\%2F2000\%2Fsvg\%22\%3E\%3Cpath\%20d\%3D\%22M13\.0421\%200\.43918C13\.3233\%200\.720471\%2013\.4812\%201\.10193\%2013\.4812\%201\.49968C13\.4812\%201\.89743\%2013\.3233\%202\.27889\%2013\.0421\%202\.56018L5\.54207\%2010\.0602C5\.26078\%2010\.3414\%204\.87931\%2010\.4994\%204\.48157\%2010\.4994C4\.08382\%2010\.4994\%203\.70236\%2010\.3414\%203\.42107\%2010\.0602L0\.421068\%207\.06018C0\.147831\%206\.77728\%20-0\.00336092\%206\.39837\%205\.6704e-05\%206\.00508C0\.00347433\%205\.61178\%200\.161228\%205\.23556\%200\.43934\%204\.95745C0\.717452\%204\.67934\%201\.09367\%204\.52159\%201\.48697\%204\.51817C1\.88026\%204\.51475\%202\.25916\%204\.66594\%202\.54207\%204\.93918L4\.48157\%206\.87868L10\.9211\%200\.43918C11\.2024\%200\.157973\%2011\.5838\%200\%2011\.9816\%200C12\.3793\%200\%2012\.7608\%200\.157973\%2013\.0421\%200\.43918Z\%22\%20fill\%3D\%22white\%22\%2F\%3E\%3C\%2Fsvg\%3E\'\)\] {
|
|
4668
|
-
&::before {
|
|
4669
|
-
content: var(--tw-content);
|
|
4670
|
-
background-image: url('data:image/svg+xml;utf8,%3Csvg%20width%3D%2214%22%20height%3D%2211%22%20viewBox%3D%220%200%2014%2011%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M13.0421%200.43918C13.3233%200.720471%2013.4812%201.10193%2013.4812%201.49968C13.4812%201.89743%2013.3233%202.27889%2013.0421%202.56018L5.54207%2010.0602C5.26078%2010.3414%204.87931%2010.4994%204.48157%2010.4994C4.08382%2010.4994%203.70236%2010.3414%203.42107%2010.0602L0.421068%207.06018C0.147831%206.77728%20-0.00336092%206.39837%205.6704e-05%206.00508C0.00347433%205.61178%200.161228%205.23556%200.43934%204.95745C0.717452%204.67934%201.09367%204.52159%201.48697%204.51817C1.88026%204.51475%202.25916%204.66594%202.54207%204.93918L4.48157%206.87868L10.9211%200.43918C11.2024%200.157973%2011.5838%200%2011.9816%200C12.3793%200%2012.7608%200.157973%2013.0421%200.43918Z%22%20fill%3D%22white%22%2F%3E%3C%2Fsvg%3E');
|
|
4671
|
-
}
|
|
4672
|
-
}
|
|
4673
4677
|
.ui\:before\:bg-center {
|
|
4674
4678
|
&::before {
|
|
4675
4679
|
content: var(--tw-content);
|
|
@@ -4820,6 +4824,14 @@ button, input:where([type='button'], [type='reset'], [type='submit']), ::file-se
|
|
|
4820
4824
|
animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
4821
4825
|
}
|
|
4822
4826
|
}
|
|
4827
|
+
.ui\:not-indeterminate\:before\:bg-\[url\(\'data\:image\/svg\+xml\;utf8\,\%3Csvg\%20width\%3D\%2214\%22\%20height\%3D\%2211\%22\%20viewBox\%3D\%220\%200\%2014\%2011\%22\%20fill\%3D\%22none\%22\%20xmlns\%3D\%22http\%3A\%2F\%2Fwww\.w3\.org\%2F2000\%2Fsvg\%22\%3E\%3Cpath\%20d\%3D\%22M13\.0421\%200\.43918C13\.3233\%200\.720471\%2013\.4812\%201\.10193\%2013\.4812\%201\.49968C13\.4812\%201\.89743\%2013\.3233\%202\.27889\%2013\.0421\%202\.56018L5\.54207\%2010\.0602C5\.26078\%2010\.3414\%204\.87931\%2010\.4994\%204\.48157\%2010\.4994C4\.08382\%2010\.4994\%203\.70236\%2010\.3414\%203\.42107\%2010\.0602L0\.421068\%207\.06018C0\.147831\%206\.77728\%20-0\.00336092\%206\.39837\%205\.6704e-05\%206\.00508C0\.00347433\%205\.61178\%200\.161228\%205\.23556\%200\.43934\%204\.95745C0\.717452\%204\.67934\%201\.09367\%204\.52159\%201\.48697\%204\.51817C1\.88026\%204\.51475\%202\.25916\%204\.66594\%202\.54207\%204\.93918L4\.48157\%206\.87868L10\.9211\%200\.43918C11\.2024\%200\.157973\%2011\.5838\%200\%2011\.9816\%200C12\.3793\%200\%2012\.7608\%200\.157973\%2013\.0421\%200\.43918Z\%22\%20fill\%3D\%22white\%22\%2F\%3E\%3C\%2Fsvg\%3E\'\)\] {
|
|
4828
|
+
&:not(*:indeterminate) {
|
|
4829
|
+
&::before {
|
|
4830
|
+
content: var(--tw-content);
|
|
4831
|
+
background-image: url('data:image/svg+xml;utf8,%3Csvg%20width%3D%2214%22%20height%3D%2211%22%20viewBox%3D%220%200%2014%2011%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M13.0421%200.43918C13.3233%200.720471%2013.4812%201.10193%2013.4812%201.49968C13.4812%201.89743%2013.3233%202.27889%2013.0421%202.56018L5.54207%2010.0602C5.26078%2010.3414%204.87931%2010.4994%204.48157%2010.4994C4.08382%2010.4994%203.70236%2010.3414%203.42107%2010.0602L0.421068%207.06018C0.147831%206.77728%20-0.00336092%206.39837%205.6704e-05%206.00508C0.00347433%205.61178%200.161228%205.23556%200.43934%204.95745C0.717452%204.67934%201.09367%204.52159%201.48697%204.51817C1.88026%204.51475%202.25916%204.66594%202.54207%204.93918L4.48157%206.87868L10.9211%200.43918C11.2024%200.157973%2011.5838%200%2011.9816%200C12.3793%200%2012.7608%200.157973%2013.0421%200.43918Z%22%20fill%3D%22white%22%2F%3E%3C%2Fsvg%3E');
|
|
4832
|
+
}
|
|
4833
|
+
}
|
|
4834
|
+
}
|
|
4823
4835
|
.ui\:after\:absolute {
|
|
4824
4836
|
&::after {
|
|
4825
4837
|
content: var(--tw-content);
|
|
@@ -5140,6 +5152,32 @@ button, input:where([type='button'], [type='reset'], [type='submit']), ::file-se
|
|
|
5140
5152
|
}
|
|
5141
5153
|
}
|
|
5142
5154
|
}
|
|
5155
|
+
.ui\:indeterminate\:border-border-brand-primary-default {
|
|
5156
|
+
&:indeterminate {
|
|
5157
|
+
border-color: var(--ui-primitive-color-brand-700);
|
|
5158
|
+
}
|
|
5159
|
+
}
|
|
5160
|
+
.ui\:indeterminate\:bg-icon-brand-primary-default {
|
|
5161
|
+
&:indeterminate {
|
|
5162
|
+
background-color: var(--ui-primitive-color-brand-700);
|
|
5163
|
+
}
|
|
5164
|
+
}
|
|
5165
|
+
.ui\:indeterminate\:before\:scale-\[1\] {
|
|
5166
|
+
&:indeterminate {
|
|
5167
|
+
&::before {
|
|
5168
|
+
content: var(--tw-content);
|
|
5169
|
+
scale: 1;
|
|
5170
|
+
}
|
|
5171
|
+
}
|
|
5172
|
+
}
|
|
5173
|
+
.ui\:indeterminate\:before\:bg-\[url\(\'data\:image\/svg\+xml\;utf8\,\%3Csvg\%20width\%3D\%2210\%22\%20height\%3D\%222\%22\%20viewBox\%3D\%220\%200\%2010\%202\%22\%20fill\%3D\%22none\%22\%20xmlns\%3D\%22http\%3A\%2F\%2Fwww\.w3\.org\%2F2000\%2Fsvg\%22\%3E\%3Cpath\%20d\%3D\%22M9\%20-4\.37114e-08C9\.55228\%20-1\.95703e-08\%2010\%200\.447715\%2010\%201C10\%201\.55228\%209\.55228\%202\%209\%202L1\%202C0\.447716\%202\%20-6\.78525e-08\%201\.55228\%20-4\.37114e-08\%201C-1\.95703e-08\%200\.447715\%200\.447715\%20-4\.17544e-07\%201\%20-3\.93402e-07L9\%20-4\.37114e-08Z\%22\%20fill\%3D\%22white\%22\%2F\%3E\%3C\%2Fsvg\%3E\'\)\] {
|
|
5174
|
+
&:indeterminate {
|
|
5175
|
+
&::before {
|
|
5176
|
+
content: var(--tw-content);
|
|
5177
|
+
background-image: url('data:image/svg+xml;utf8,%3Csvg%20width%3D%2210%22%20height%3D%222%22%20viewBox%3D%220%200%2010%202%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M9%20-4.37114e-08C9.55228%20-1.95703e-08%2010%200.447715%2010%201C10%201.55228%209.55228%202%209%202L1%202C0.447716%202%20-6.78525e-08%201.55228%20-4.37114e-08%201C-1.95703e-08%200.447715%200.447715%20-4.17544e-07%201%20-3.93402e-07L9%20-4.37114e-08Z%22%20fill%3D%22white%22%2F%3E%3C%2Fsvg%3E');
|
|
5178
|
+
}
|
|
5179
|
+
}
|
|
5180
|
+
}
|
|
5143
5181
|
.ui\:focus-within\:bg-background-brand-primary-hovered {
|
|
5144
5182
|
&:focus-within {
|
|
5145
5183
|
background-color: var(--ui-primitive-color-brand-500);
|
|
@@ -5565,6 +5603,15 @@ button, input:where([type='button'], [type='reset'], [type='submit']), ::file-se
|
|
|
5565
5603
|
}
|
|
5566
5604
|
}
|
|
5567
5605
|
}
|
|
5606
|
+
.ui\:indeterminate\:hover\:bg-icon-brand-primary-hover {
|
|
5607
|
+
&:indeterminate {
|
|
5608
|
+
&:hover {
|
|
5609
|
+
@media (hover: hover) {
|
|
5610
|
+
background-color: var(--ui-primitive-color-brand-500);
|
|
5611
|
+
}
|
|
5612
|
+
}
|
|
5613
|
+
}
|
|
5614
|
+
}
|
|
5568
5615
|
.ui\:focus\:z-\[4\] {
|
|
5569
5616
|
&:focus {
|
|
5570
5617
|
z-index: 4;
|
|
@@ -5805,6 +5852,13 @@ button, input:where([type='button'], [type='reset'], [type='submit']), ::file-se
|
|
|
5805
5852
|
}
|
|
5806
5853
|
}
|
|
5807
5854
|
}
|
|
5855
|
+
.ui\:disabled\:indeterminate\:bg-icon-brand-primary-disabled {
|
|
5856
|
+
&:disabled {
|
|
5857
|
+
&:indeterminate {
|
|
5858
|
+
background-color: var(--ui-primitive-color-grey-300);
|
|
5859
|
+
}
|
|
5860
|
+
}
|
|
5861
|
+
}
|
|
5808
5862
|
.ui\:has-checked\:ring-border-brand-primary-default {
|
|
5809
5863
|
&:has(*:checked) {
|
|
5810
5864
|
--tw-ring-color: var(--ui-primitive-color-brand-700);
|