@frontify/fondue
Version:
Design system of Frontify
61 lines (60 loc) • 1.6 kB
JavaScript
import { jsx as N } from "react/jsx-runtime";
import { Overlay as b } from "../../utilities/dialogs/Overlay.es.js";
import { Z_INDEX_MODAL as y } from "../../utilities/dialogs/constants.es.js";
import { Modality as a } from "../../types/dialog.es.js";
const O = ({
children: e,
open: t,
anchor: i,
placement: r = "bottom-start",
offset: l = [0, 8],
flip: d = !1,
enablePortal: n = !0,
maxHeight: m = "auto",
maxWidth: s = 360,
minHeight: u = 0,
minWidth: f = 360,
modality: o = a.Modal,
handleClose: g,
"data-test-id": p = "fondue-inlineDialog",
autoHeight: D = !1,
roundedCorners: I = !0,
width: M = 360,
/**
* This property is used to override the default zIndex of the overlay.
* This is needed to support the legacy Terrific Modal, which dynamically compounds z-indexes to create a "stacked" modal approach.
* Once the legacy Terrific Modal is removed/refactored to a pre-determined set of z-indexes, this property can be removed as well.
*/
unsafe_zIndex: x = y
}) => /* @__PURE__ */ N(
b,
{
"data-test-id": p,
open: t,
anchor: i,
placement: r,
offset: l,
flip: d,
enablePortal: n,
minWidth: f,
minHeight: u,
maxWidth: s,
maxHeight: m,
modality: o,
handleClose: g,
role: o === a.NonModal ? "region" : "dialog",
autoHeight: D,
roundedCorners: I,
borderRadius: "small",
shadow: "medium",
width: M,
isDialog: !0,
zIndex: x,
children: e
}
);
O.displayName = "FondueInlineDialog";
export {
O as InlineDialog
};
//# sourceMappingURL=InlineDialog.es.js.map