@luscii-healthtech/web-ui 64.5.1 → 64.5.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.
@@ -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 {};
@@ -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,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.5.2",
4
4
  "license": "MIT",
5
5
  "author": {
6
6
  "name": "Joris Janssen"