@luscii-healthtech/web-ui 64.5.0 → 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.
Files changed (27) hide show
  1. package/dist/esm/components/FlyOutMenu/FlyOutMenu.js +9 -2
  2. package/dist/esm/components/FlyOutMenu/FlyOutMenu.js.map +1 -1
  3. package/dist/esm/components/Modal/FullPageModal.js +3 -1
  4. package/dist/esm/components/Modal/FullPageModal.js.map +1 -1
  5. package/dist/esm/components/Modal/ModalBase.js +3 -1
  6. package/dist/esm/components/Modal/ModalBase.js.map +1 -1
  7. package/dist/esm/components/Modal/use-modal-focus.js +36 -0
  8. package/dist/esm/components/Modal/use-modal-focus.js.map +1 -0
  9. package/dist/esm/components/Toaster/ToasterPanel.js +3 -3
  10. package/dist/esm/components/Toaster/ToasterPanel.js.map +1 -1
  11. package/dist/esm/components/Toaster/toast.js +2 -2
  12. package/dist/esm/components/Toaster/toast.js.map +1 -1
  13. package/dist/index.development.js +50 -9
  14. package/dist/index.development.js.map +1 -1
  15. package/dist/index.js +1 -1
  16. package/dist/index.js.map +1 -1
  17. package/dist/src/components/FlyOutMenu/FlyOutMenu.d.ts +1 -1
  18. package/dist/src/components/Modal/use-modal-focus.d.ts +8 -0
  19. package/dist/src/components/Toaster/ToasterPanel.d.ts +5 -0
  20. package/dist/src/components/Toaster/toast.d.ts +5 -0
  21. package/dist/src/generated/components/FlyOutMenu/FlyOutMenu.d.ts +1 -1
  22. package/dist/src/generated/components/Modal/use-modal-focus.d.ts +8 -0
  23. package/dist/src/generated/components/Toaster/ToasterPanel.d.ts +5 -0
  24. package/dist/src/generated/components/Toaster/toast.d.ts +5 -0
  25. package/dist/stories/FlyOutMenu.stories.d.ts +7 -0
  26. package/dist/web-ui-tailwind.css +0 -3
  27. package/package.json +1 -1
@@ -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 {};
@@ -9,6 +9,11 @@ export interface ToasterPanelProps {
9
9
  * @default "Close"
10
10
  */
11
11
  closeButtonLabel?: string;
12
+ /**
13
+ * How long the progress bar runs before the toast closes, in milliseconds.
14
+ * @default 5000
15
+ */
16
+ duration?: number;
12
17
  onClickClose: () => void;
13
18
  onAnimationEnd?: () => void;
14
19
  }
@@ -8,6 +8,11 @@ type ToastParams = {
8
8
  */
9
9
  closeButtonLabel?: string;
10
10
  type: "success" | "failure";
11
+ /**
12
+ * How long the toast stays open, in milliseconds.
13
+ * @default 5000
14
+ */
15
+ duration?: number;
11
16
  } | string;
12
17
  export declare const toast: {
13
18
  (params: ToastParams): void;
@@ -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 {};
@@ -9,6 +9,11 @@ export interface ToasterPanelProps {
9
9
  * @default "Close"
10
10
  */
11
11
  closeButtonLabel?: string;
12
+ /**
13
+ * How long the progress bar runs before the toast closes, in milliseconds.
14
+ * @default 5000
15
+ */
16
+ duration?: number;
12
17
  onClickClose: () => void;
13
18
  onAnimationEnd?: () => void;
14
19
  }
@@ -8,6 +8,11 @@ type ToastParams = {
8
8
  */
9
9
  closeButtonLabel?: string;
10
10
  type: "success" | "failure";
11
+ /**
12
+ * How long the toast stays open, in milliseconds.
13
+ * @default 5000
14
+ */
15
+ duration?: number;
11
16
  } | string;
12
17
  export declare const toast: {
13
18
  (params: ToastParams): void;
@@ -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;
@@ -1682,9 +1682,6 @@ button, input:where([type='button'], [type='reset'], [type='submit']), ::file-se
1682
1682
  .ui\:h-xxxxs {
1683
1683
  height: var(--ui-spacing-xxxxs);
1684
1684
  }
1685
- .ui\:max-h-19 {
1686
- max-height: 4.75rem;
1687
- }
1688
1685
  .ui\:max-h-36 {
1689
1686
  max-height: 9rem;
1690
1687
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luscii-healthtech/web-ui",
3
- "version": "64.5.0",
3
+ "version": "64.5.2",
4
4
  "license": "MIT",
5
5
  "author": {
6
6
  "name": "Joris Janssen"