@frontify/fondue 12.0.0-beta.406 → 12.0.0-beta.407
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,50 +1,52 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { Overlay as
|
|
3
|
-
import { Z_INDEX_MODAL as
|
|
1
|
+
import { jsx as x } from "react/jsx-runtime";
|
|
2
|
+
import { Overlay as N } from "../../utilities/dialogs/Overlay.es.js";
|
|
3
|
+
import { Z_INDEX_MODAL as c } from "../../utilities/dialogs/constants.es.js";
|
|
4
4
|
import { Modality as o } from "../../types/dialog.es.js";
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
5
|
+
const b = ({
|
|
6
|
+
id: r,
|
|
7
|
+
children: a,
|
|
8
|
+
open: t,
|
|
9
|
+
anchor: d,
|
|
10
|
+
enablePortal: i = !0,
|
|
11
|
+
maxHeight: l = "auto",
|
|
12
|
+
maxWidth: s,
|
|
13
|
+
minHeight: n = 200,
|
|
14
|
+
minWidth: u = 600,
|
|
14
15
|
modality: e = o.Modal,
|
|
15
|
-
handleClose:
|
|
16
|
-
"data-test-id":
|
|
17
|
-
darkUnderlay:
|
|
18
|
-
autoHeight:
|
|
19
|
-
verticalAlignment:
|
|
20
|
-
roundedCorners:
|
|
21
|
-
}) => /* @__PURE__ */
|
|
22
|
-
|
|
16
|
+
handleClose: f,
|
|
17
|
+
"data-test-id": g = "fondue-dialog",
|
|
18
|
+
darkUnderlay: m = !1,
|
|
19
|
+
autoHeight: p = !1,
|
|
20
|
+
verticalAlignment: D = "centered",
|
|
21
|
+
roundedCorners: M = !0
|
|
22
|
+
}) => /* @__PURE__ */ x(
|
|
23
|
+
N,
|
|
23
24
|
{
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
id: r,
|
|
26
|
+
"data-test-id": g,
|
|
27
|
+
open: t,
|
|
28
|
+
anchor: d,
|
|
29
|
+
enablePortal: i,
|
|
30
|
+
minWidth: u,
|
|
31
|
+
minHeight: n,
|
|
32
|
+
maxWidth: s,
|
|
33
|
+
maxHeight: l,
|
|
32
34
|
modality: e,
|
|
33
|
-
handleClose:
|
|
35
|
+
handleClose: f,
|
|
34
36
|
role: e === o.NonModal ? "region" : "dialog",
|
|
35
|
-
darkUnderlay:
|
|
36
|
-
autoHeight:
|
|
37
|
-
zIndex:
|
|
37
|
+
darkUnderlay: m,
|
|
38
|
+
autoHeight: p,
|
|
39
|
+
zIndex: c,
|
|
38
40
|
isDetached: !0,
|
|
39
|
-
verticalAlignment:
|
|
41
|
+
verticalAlignment: D,
|
|
40
42
|
strategy: e === o.NonModal ? "absolute" : "fixed",
|
|
41
|
-
roundedCorners:
|
|
43
|
+
roundedCorners: M,
|
|
42
44
|
borderRadius: "large",
|
|
43
|
-
children:
|
|
45
|
+
children: a
|
|
44
46
|
}
|
|
45
47
|
);
|
|
46
|
-
|
|
48
|
+
b.displayName = "FondueDialog";
|
|
47
49
|
export {
|
|
48
|
-
|
|
50
|
+
b as Dialog
|
|
49
51
|
};
|
|
50
52
|
//# sourceMappingURL=Dialog.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.es.js","sources":["../../../src/components/Dialog/Dialog.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { BaseDialogProps, Modality, OverlayProps } from '../../types';\nimport { Overlay } from '@utilities/dialogs/Overlay';\nimport { Z_INDEX_MODAL } from '@utilities/dialogs/constants';\nimport { WithRequired } from 'src/types/withRequired';\n\nexport type DialogProps = Omit<\n OverlayProps,\n 'placement' | 'flip' | 'offset' | 'theme' | 'withArrow' | 'arrowCustomColors' | 'shadow' | 'isDialog'\n> &\n Omit<BaseDialogProps, 'width'>;\n\nexport const Dialog = ({\n children,\n open,\n anchor,\n enablePortal = true,\n maxHeight = 'auto',\n maxWidth,\n minHeight = 200,\n minWidth = 600,\n modality = Modality.Modal,\n handleClose,\n 'data-test-id': dataTestId = 'fondue-dialog',\n darkUnderlay = false,\n autoHeight = false,\n verticalAlignment = 'centered',\n roundedCorners = true,\n}: WithRequired<DialogProps, 'handleClose'>) => {\n return (\n <Overlay\n data-test-id={dataTestId}\n open={open}\n anchor={anchor}\n enablePortal={enablePortal}\n minWidth={minWidth}\n minHeight={minHeight}\n maxWidth={maxWidth}\n maxHeight={maxHeight}\n modality={modality}\n handleClose={handleClose}\n role={modality === Modality.NonModal ? 'region' : 'dialog'}\n darkUnderlay={darkUnderlay}\n autoHeight={autoHeight}\n zIndex={Z_INDEX_MODAL}\n isDetached={true}\n verticalAlignment={verticalAlignment}\n strategy={modality === Modality.NonModal ? 'absolute' : 'fixed'}\n roundedCorners={roundedCorners}\n borderRadius=\"large\"\n >\n {children}\n </Overlay>\n );\n};\nDialog.displayName = 'FondueDialog';\n"],"names":["Dialog","children","open","anchor","enablePortal","maxHeight","maxWidth","minHeight","minWidth","modality","Modality","handleClose","dataTestId","darkUnderlay","autoHeight","verticalAlignment","roundedCorners","jsx","Overlay","Z_INDEX_MODAL"],"mappings":";;;;AAaO,MAAMA,IAAS,CAAC;AAAA,EACnB,UAAAC;AAAA,EACA,MAAAC;AAAA,EACA,QAAAC;AAAA,EACA,cAAAC,IAAe;AAAA,EACf,WAAAC,IAAY;AAAA,EACZ,UAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,UAAAC,IAAW;AAAA,EACX,UAAAC,IAAWC,EAAS;AAAA,EACpB,aAAAC;AAAA,EACA,gBAAgBC,IAAa;AAAA,EAC7B,cAAAC,IAAe;AAAA,EACf,YAAAC,IAAa;AAAA,EACb,mBAAAC,IAAoB;AAAA,EACpB,gBAAAC,IAAiB;AACrB,MAEQ,gBAAAC;AAAA,EAACC;AAAA,EAAA;AAAA,IACG,
|
|
1
|
+
{"version":3,"file":"Dialog.es.js","sources":["../../../src/components/Dialog/Dialog.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { BaseDialogProps, Modality, OverlayProps } from '../../types';\nimport { Overlay } from '@utilities/dialogs/Overlay';\nimport { Z_INDEX_MODAL } from '@utilities/dialogs/constants';\nimport { WithRequired } from 'src/types/withRequired';\n\nexport type DialogProps = Omit<\n OverlayProps,\n 'placement' | 'flip' | 'offset' | 'theme' | 'withArrow' | 'arrowCustomColors' | 'shadow' | 'isDialog'\n> &\n Omit<BaseDialogProps, 'width'>;\n\nexport const Dialog = ({\n id,\n children,\n open,\n anchor,\n enablePortal = true,\n maxHeight = 'auto',\n maxWidth,\n minHeight = 200,\n minWidth = 600,\n modality = Modality.Modal,\n handleClose,\n 'data-test-id': dataTestId = 'fondue-dialog',\n darkUnderlay = false,\n autoHeight = false,\n verticalAlignment = 'centered',\n roundedCorners = true,\n}: WithRequired<DialogProps, 'handleClose'>) => {\n return (\n <Overlay\n id={id}\n data-test-id={dataTestId}\n open={open}\n anchor={anchor}\n enablePortal={enablePortal}\n minWidth={minWidth}\n minHeight={minHeight}\n maxWidth={maxWidth}\n maxHeight={maxHeight}\n modality={modality}\n handleClose={handleClose}\n role={modality === Modality.NonModal ? 'region' : 'dialog'}\n darkUnderlay={darkUnderlay}\n autoHeight={autoHeight}\n zIndex={Z_INDEX_MODAL}\n isDetached={true}\n verticalAlignment={verticalAlignment}\n strategy={modality === Modality.NonModal ? 'absolute' : 'fixed'}\n roundedCorners={roundedCorners}\n borderRadius=\"large\"\n >\n {children}\n </Overlay>\n );\n};\nDialog.displayName = 'FondueDialog';\n"],"names":["Dialog","id","children","open","anchor","enablePortal","maxHeight","maxWidth","minHeight","minWidth","modality","Modality","handleClose","dataTestId","darkUnderlay","autoHeight","verticalAlignment","roundedCorners","jsx","Overlay","Z_INDEX_MODAL"],"mappings":";;;;AAaO,MAAMA,IAAS,CAAC;AAAA,EACnB,IAAAC;AAAA,EACA,UAAAC;AAAA,EACA,MAAAC;AAAA,EACA,QAAAC;AAAA,EACA,cAAAC,IAAe;AAAA,EACf,WAAAC,IAAY;AAAA,EACZ,UAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,UAAAC,IAAW;AAAA,EACX,UAAAC,IAAWC,EAAS;AAAA,EACpB,aAAAC;AAAA,EACA,gBAAgBC,IAAa;AAAA,EAC7B,cAAAC,IAAe;AAAA,EACf,YAAAC,IAAa;AAAA,EACb,mBAAAC,IAAoB;AAAA,EACpB,gBAAAC,IAAiB;AACrB,MAEQ,gBAAAC;AAAA,EAACC;AAAA,EAAA;AAAA,IACG,IAAAlB;AAAA,IACA,gBAAcY;AAAA,IACd,MAAAV;AAAA,IACA,QAAAC;AAAA,IACA,cAAAC;AAAA,IACA,UAAAI;AAAA,IACA,WAAAD;AAAA,IACA,UAAAD;AAAA,IACA,WAAAD;AAAA,IACA,UAAAI;AAAA,IACA,aAAAE;AAAA,IACA,MAAMF,MAAaC,EAAS,WAAW,WAAW;AAAA,IAClD,cAAAG;AAAA,IACA,YAAAC;AAAA,IACA,QAAQK;AAAA,IACR,YAAY;AAAA,IACZ,mBAAAJ;AAAA,IACA,UAAUN,MAAaC,EAAS,WAAW,aAAa;AAAA,IACxD,gBAAAM;AAAA,IACA,cAAa;AAAA,IAEZ,UAAAf;AAAA,EAAA;AAAA;AAIbF,EAAO,cAAc;"}
|