@luscii-healthtech/web-ui 55.2.8 → 55.2.10

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.
@@ -1,9 +1,6 @@
1
1
  import type { FC } from "react";
2
2
  import ReactModal from "react-modal";
3
3
  import { type ModalBaseProps } from "./ModalBase";
4
- /**
5
- * @deprecated Use `ModalDialog` component instead. This component will be removed in a future version.
6
- */
7
4
  export type ModalProps = Omit<ModalBaseProps, "title" | "withExtraMarginTop"> & {
8
5
  title: string;
9
6
  };
@@ -11,8 +8,21 @@ type StaticProperties = {
11
8
  setAppElement: typeof ReactModal.setAppElement;
12
9
  };
13
10
  /**
14
- * @deprecated Use `ModalDialog` component instead. This component will be removed in a future version.
15
- * @see {@link ModalDialog} for the recommended replacement
11
+ * Modal built on `react-modal`, rendered in a `document.body` portal and stacked
12
+ * with `z-index`.
13
+ *
14
+ * Not deprecated, and not interchangeable with `ModalDialog`. Pick by content:
15
+ *
16
+ * - **`Modal`** — forms, and anything containing a popover that portals:
17
+ * `Select` (react-select), `Tooltip`/`HoverCard`/`FlyOutMenu` (Radix),
18
+ * `DatePicker` (react-datepicker), `TextEditor` (TipTap). Ordinary `z-index`
19
+ * stacking applies, so those components work with their default portal
20
+ * targets and need no wiring.
21
+ * - **`ModalDialog`** — messages, confirmations, previews, and other simple
22
+ * content. It calls `showModal()`, so it renders in the browser top layer,
23
+ * where no `z-index` from outside the dialog can reach. Every portalling
24
+ * popover inside it has to be pointed at the dialog element explicitly, via a
25
+ * different API per library.
16
26
  */
17
27
  export declare const Modal: FC<ModalProps> & StaticProperties;
18
28
  export {};
@@ -1,9 +1,6 @@
1
1
  import type { FC } from "react";
2
2
  import ReactModal from "react-modal";
3
3
  import { type ModalBaseProps } from "./ModalBase";
4
- /**
5
- * @deprecated Use `ModalDialog` component instead. This component will be removed in a future version.
6
- */
7
4
  export type ModalProps = Omit<ModalBaseProps, "title" | "withExtraMarginTop"> & {
8
5
  title: string;
9
6
  };
@@ -11,8 +8,21 @@ type StaticProperties = {
11
8
  setAppElement: typeof ReactModal.setAppElement;
12
9
  };
13
10
  /**
14
- * @deprecated Use `ModalDialog` component instead. This component will be removed in a future version.
15
- * @see {@link ModalDialog} for the recommended replacement
11
+ * Modal built on `react-modal`, rendered in a `document.body` portal and stacked
12
+ * with `z-index`.
13
+ *
14
+ * Not deprecated, and not interchangeable with `ModalDialog`. Pick by content:
15
+ *
16
+ * - **`Modal`** — forms, and anything containing a popover that portals:
17
+ * `Select` (react-select), `Tooltip`/`HoverCard`/`FlyOutMenu` (Radix),
18
+ * `DatePicker` (react-datepicker), `TextEditor` (TipTap). Ordinary `z-index`
19
+ * stacking applies, so those components work with their default portal
20
+ * targets and need no wiring.
21
+ * - **`ModalDialog`** — messages, confirmations, previews, and other simple
22
+ * content. It calls `showModal()`, so it renders in the browser top layer,
23
+ * where no `z-index` from outside the dialog can reach. Every portalling
24
+ * popover inside it has to be pointed at the dialog element explicitly, via a
25
+ * different API per library.
16
26
  */
17
27
  export declare const Modal: FC<ModalProps> & StaticProperties;
18
28
  export {};
@@ -3,7 +3,6 @@ declare const _default: {
3
3
  component: import("react").FC<import("../src").ModalProps> & {
4
4
  setAppElement: any;
5
5
  };
6
- tags: string[];
7
6
  parameters: {
8
7
  docs: {
9
8
  description: {
@@ -198,6 +198,16 @@ export declare const MultiSelectWithDefault: {
198
198
  onChange: import("storybook/actions").HandlerFunction;
199
199
  };
200
200
  };
201
+ /**
202
+ * Regression test for MON-1682: the menu must close when you click away, and keep
203
+ * closing after you have picked something.
204
+ *
205
+ * The multi-select keeps the menu open and the input focused on select, so an
206
+ * outside click only closes it by blurring react-select's `<input>`. A parent
207
+ * re-render used to remount that input and drop the focus silently. See
208
+ * `CustomContainer` in `Select.tsx`.
209
+ */
210
+ export declare const MultiSelectClosesOnOutsideClick: Story;
201
211
  export declare const CreatableSelect: Story;
202
212
  /**
203
213
  * The `default` state from the design: nothing selected yet.