@luscii-healthtech/web-ui 64.5.1 → 64.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.
@@ -18,4 +18,12 @@ export type Props = {
18
18
  /** @default 20 */
19
19
  size?: number;
20
20
  };
21
+ /**
22
+ * The icon ActionCard and ActionCardDetailed draw for each action type.
23
+ * Exported so other cards can show the same icon.
24
+ *
25
+ * Decorative: it is hidden from assistive technology, so put the action's
26
+ * name or type in visible text next to it. `size` is the outer size,
27
+ * including the tile padding for workflow types.
28
+ */
21
29
  export declare const ActionIcon: FC<Props>;
@@ -12,7 +12,7 @@ declare const FlyOutMenuTrigger: ({ ref, ...props }: React.ComponentProps<typeof
12
12
  declare const FlyOutMenuGroup: React.ForwardRefExoticComponent<FlyOutMenuPrimitive.DropdownMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
13
13
  declare const FlyOutMenuPortal: React.FC<FlyOutMenuPrimitive.DropdownMenuPortalProps>;
14
14
  declare const FlyOutMenuContent: {
15
- ({ ref, className, sideOffset, align, container, ...props }: React.ComponentProps<typeof FlyOutMenuPrimitive.Content> & {
15
+ ({ ref, className, sideOffset, align, container, onCloseAutoFocus, ...props }: React.ComponentProps<typeof FlyOutMenuPrimitive.Content> & {
16
16
  /**
17
17
  * An optional DOM element to render the FlyOutMenu in using a portal.
18
18
  *
@@ -0,0 +1,8 @@
1
+ type ModalFocusHandlers = {
2
+ onAfterOpen: (elements: {
3
+ contentEl: HTMLDivElement;
4
+ }) => void;
5
+ onAfterClose: () => void;
6
+ };
7
+ export declare const useModalFocus: (isOpen: boolean) => ModalFocusHandlers;
8
+ export {};
@@ -18,4 +18,12 @@ export type Props = {
18
18
  /** @default 20 */
19
19
  size?: number;
20
20
  };
21
+ /**
22
+ * The icon ActionCard and ActionCardDetailed draw for each action type.
23
+ * Exported so other cards can show the same icon.
24
+ *
25
+ * Decorative: it is hidden from assistive technology, so put the action's
26
+ * name or type in visible text next to it. `size` is the outer size,
27
+ * including the tile padding for workflow types.
28
+ */
21
29
  export declare const ActionIcon: FC<Props>;
@@ -12,7 +12,7 @@ declare const FlyOutMenuTrigger: ({ ref, ...props }: React.ComponentProps<typeof
12
12
  declare const FlyOutMenuGroup: React.ForwardRefExoticComponent<FlyOutMenuPrimitive.DropdownMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
13
13
  declare const FlyOutMenuPortal: React.FC<FlyOutMenuPrimitive.DropdownMenuPortalProps>;
14
14
  declare const FlyOutMenuContent: {
15
- ({ ref, className, sideOffset, align, container, ...props }: React.ComponentProps<typeof FlyOutMenuPrimitive.Content> & {
15
+ ({ ref, className, sideOffset, align, container, onCloseAutoFocus, ...props }: React.ComponentProps<typeof FlyOutMenuPrimitive.Content> & {
16
16
  /**
17
17
  * An optional DOM element to render the FlyOutMenu in using a portal.
18
18
  *
@@ -0,0 +1,8 @@
1
+ type ModalFocusHandlers = {
2
+ onAfterOpen: (elements: {
3
+ contentEl: HTMLDivElement;
4
+ }) => void;
5
+ onAfterClose: () => void;
6
+ };
7
+ export declare const useModalFocus: (isOpen: boolean) => ModalFocusHandlers;
8
+ export {};
@@ -93,6 +93,7 @@ export { Tag } from "./components/Tag/Tag";
93
93
  export { TagGroup } from "./components/Tag/TagGroup";
94
94
  export { InstrumentCard, type InstrumentType, type Props as InstrumentCardProps, } from "./components/InstrumentCard/InstrumentCard";
95
95
  export { ActionCard, type ActionType, type ActionCardMetadata, type Props as ActionCardProps, } from "./components/ActionCard/ActionCard";
96
+ export { ActionIcon, type Props as ActionIconProps, } from "./components/ActionCard/ActionIcon";
96
97
  export { ActionCardDetailed, type ScheduleRow, type Props as ActionCardDetailedProps, } from "./components/ActionCardDetailed/ActionCardDetailed";
97
98
  export { Textarea, type TextareaProps, type ResizeTypes, } from "./components/Textarea/Textarea";
98
99
  export { TextEditor, type TextEditorTag, } from "./components/TextEditor/TextEditor";
@@ -93,6 +93,7 @@ export { Tag } from "./components/Tag/Tag";
93
93
  export { TagGroup } from "./components/Tag/TagGroup";
94
94
  export { InstrumentCard, type InstrumentType, type Props as InstrumentCardProps, } from "./components/InstrumentCard/InstrumentCard";
95
95
  export { ActionCard, type ActionType, type ActionCardMetadata, type Props as ActionCardProps, } from "./components/ActionCard/ActionCard";
96
+ export { ActionIcon, type Props as ActionIconProps, } from "./components/ActionCard/ActionIcon";
96
97
  export { ActionCardDetailed, type ScheduleRow, type Props as ActionCardDetailedProps, } from "./components/ActionCardDetailed/ActionCardDetailed";
97
98
  export { Textarea, type TextareaProps, type ResizeTypes, } from "./components/Textarea/Textarea";
98
99
  export { TextEditor, type TextEditorTag, } from "./components/TextEditor/TextEditor";
@@ -0,0 +1,40 @@
1
+ import { type StoryObj } from "@storybook/react-vite";
2
+ import { type ActionType } from "../src/components/ActionCard/ActionCard";
3
+ declare const meta: {
4
+ title: string;
5
+ tags: string[];
6
+ component: import("react").FC<import("../src").ActionIconProps>;
7
+ parameters: {
8
+ design: {
9
+ type: string;
10
+ url: string;
11
+ };
12
+ backgrounds: {
13
+ default: string;
14
+ };
15
+ };
16
+ argTypes: {
17
+ type: {
18
+ options: ActionType[];
19
+ control: {
20
+ type: "select";
21
+ };
22
+ };
23
+ iconUrl: {
24
+ control: {
25
+ type: "text";
26
+ };
27
+ };
28
+ size: {
29
+ control: {
30
+ type: "number";
31
+ };
32
+ };
33
+ };
34
+ };
35
+ export default meta;
36
+ type Story = StoryObj<typeof meta>;
37
+ export declare const Base: Story;
38
+ export declare const EveryType: Story;
39
+ /** Measurements use iconUrl or a placeholder; lessons keep their fixed icon. */
40
+ export declare const Measurement: Story;
@@ -18,3 +18,10 @@ export default meta;
18
18
  type Story = StoryObj<typeof meta>;
19
19
  export declare const Base: Story;
20
20
  export declare const InteractionTest: Story;
21
+ /**
22
+ * An item that opens a `Modal`. The menu closes with a short animation; once it has closed, focus
23
+ * must be in the modal, not back on the menu's trigger. Closing the modal returns focus to the
24
+ * trigger.
25
+ */
26
+ export declare const OpeningAModalFromAnItem: Story;
27
+ export declare const ClosingWithoutChoosingAnItem: Story;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luscii-healthtech/web-ui",
3
- "version": "64.5.1",
3
+ "version": "64.6.0",
4
4
  "license": "MIT",
5
5
  "author": {
6
6
  "name": "Joris Janssen"