@mittwald/flow-react-components 0.1.0-alpha.236 → 0.1.0-alpha.238
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.
package/dist/Modal.js
CHANGED
|
@@ -1,71 +1,75 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
3
|
import o from "react";
|
|
4
|
-
import
|
|
4
|
+
import p from "clsx";
|
|
5
5
|
import "./propsContext-DzAKlmhS.js";
|
|
6
|
-
import { P as
|
|
6
|
+
import { P as v } from "./PropsContextProvider-C6Z4XGp6.js";
|
|
7
7
|
import "@react-aria/utils";
|
|
8
8
|
import "remeda";
|
|
9
|
-
import { TunnelProvider as
|
|
9
|
+
import { TunnelProvider as y, TunnelExit as g } from "@mittwald/react-tunnel";
|
|
10
10
|
import { f as C } from "./flowComponent-DT1Ap-ot.js";
|
|
11
11
|
import * as n from "react-aria-components";
|
|
12
12
|
import "mobx";
|
|
13
|
-
import { u as
|
|
14
|
-
import { O as
|
|
13
|
+
import { u as w } from "./useOverlayController-D8pgx8nV.js";
|
|
14
|
+
import { O as E, a as h } from "./OverlayTrigger-bD8_mPel.js";
|
|
15
15
|
import { H as O } from "./Header-BC3V_ugP.js";
|
|
16
|
-
import { A as
|
|
17
|
-
import { B as
|
|
16
|
+
import { A as M } from "./Action-B6lMX6do.js";
|
|
17
|
+
import { B as N } from "./Button-DPF2xiJl.js";
|
|
18
18
|
import "@tabler/icons-react";
|
|
19
19
|
import "./Icon-0QYDidQk.js";
|
|
20
|
-
import { I as
|
|
21
|
-
const
|
|
22
|
-
modal:
|
|
23
|
-
offCanvas:
|
|
24
|
-
header:
|
|
25
|
-
content:
|
|
26
|
-
actionGroup:
|
|
20
|
+
import { I as x } from "./IconClose-gMf32kww.js";
|
|
21
|
+
const z = "flow--modal", P = "flow--modal--off-canvas", T = "flow--modal--header", B = "flow--modal--content", A = "flow--modal--action-group", G = "flow--modal--left", I = "flow--modal--close-button", e = {
|
|
22
|
+
modal: z,
|
|
23
|
+
offCanvas: P,
|
|
24
|
+
header: T,
|
|
25
|
+
content: B,
|
|
26
|
+
actionGroup: A,
|
|
27
27
|
"size-s": "flow--modal--size-s",
|
|
28
28
|
"size-m": "flow--modal--size-m",
|
|
29
29
|
"modal-zoom": "flow--modal--modal-zoom",
|
|
30
|
-
"modal-slide-in": "flow--modal--modal-slide-in",
|
|
30
|
+
"modal-slide-in-from-right": "flow--modal--modal-slide-in-from-right",
|
|
31
|
+
left: G,
|
|
32
|
+
"modal-slide-in-from-left": "flow--modal--modal-slide-in-from-left",
|
|
31
33
|
"modal-slide-up": "flow--modal--modal-slide-up",
|
|
32
|
-
closeButton:
|
|
33
|
-
},
|
|
34
|
-
overlay:
|
|
34
|
+
closeButton: I
|
|
35
|
+
}, D = "flow--modal-overlay--overlay", F = {
|
|
36
|
+
overlay: D,
|
|
35
37
|
"overlay-fade": "flow--modal-overlay--overlay-fade"
|
|
36
|
-
},
|
|
38
|
+
}, H = (t) => {
|
|
37
39
|
const {
|
|
38
|
-
controller:
|
|
40
|
+
controller: r,
|
|
39
41
|
children: l,
|
|
40
42
|
isDismissable: s = !0,
|
|
41
43
|
className: m
|
|
42
|
-
} = t,
|
|
44
|
+
} = t, f = w("Modal", {
|
|
43
45
|
reuseControllerFromContext: !0
|
|
44
|
-
}),
|
|
46
|
+
}), a = r ?? f, c = a.useIsOpen(), i = p(F.overlay, m);
|
|
45
47
|
return /* @__PURE__ */ o.createElement(
|
|
46
48
|
n.ModalOverlay,
|
|
47
49
|
{
|
|
48
50
|
className: i,
|
|
49
51
|
isDismissable: s,
|
|
50
52
|
isOpen: c,
|
|
51
|
-
onOpenChange: (d) =>
|
|
53
|
+
onOpenChange: (d) => a.setOpen(d)
|
|
52
54
|
},
|
|
53
|
-
/* @__PURE__ */ o.createElement(n.Modal, null, /* @__PURE__ */ o.createElement(n.Dialog, null, /* @__PURE__ */ o.createElement(
|
|
55
|
+
/* @__PURE__ */ o.createElement(n.Modal, null, /* @__PURE__ */ o.createElement(n.Dialog, null, /* @__PURE__ */ o.createElement(E, { type: "Modal", controller: a }, l)))
|
|
54
56
|
);
|
|
55
|
-
},
|
|
57
|
+
}, _ = C("Modal", (t) => {
|
|
56
58
|
const {
|
|
57
|
-
size:
|
|
59
|
+
size: r = "s",
|
|
58
60
|
offCanvas: l,
|
|
59
61
|
controller: s,
|
|
60
62
|
children: m,
|
|
61
|
-
refProp:
|
|
62
|
-
className:
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
refProp: f,
|
|
64
|
+
className: a,
|
|
65
|
+
offCanvasOrientation: c = "right",
|
|
66
|
+
...i
|
|
67
|
+
} = t, d = p(
|
|
65
68
|
l ? e.offCanvas : e.modal,
|
|
66
|
-
e[`size-${
|
|
67
|
-
|
|
68
|
-
|
|
69
|
+
e[`size-${r}`],
|
|
70
|
+
e[c],
|
|
71
|
+
a
|
|
72
|
+
), u = {
|
|
69
73
|
Content: {
|
|
70
74
|
className: e.content
|
|
71
75
|
},
|
|
@@ -78,29 +82,29 @@ const x = "flow--modal", z = "flow--modal--off-canvas", P = "flow--modal--header
|
|
|
78
82
|
className: e.actionGroup
|
|
79
83
|
}
|
|
80
84
|
};
|
|
81
|
-
return /* @__PURE__ */ o.createElement(
|
|
82
|
-
|
|
85
|
+
return /* @__PURE__ */ o.createElement(H, { className: d, controller: s, ...i }, /* @__PURE__ */ o.createElement(v, { props: u }, /* @__PURE__ */ o.createElement(y, null, /* @__PURE__ */ o.createElement(O, { className: e.header }, /* @__PURE__ */ o.createElement(g, { id: "heading" }), l && /* @__PURE__ */ o.createElement(M, { closeOverlay: "Modal" }, /* @__PURE__ */ o.createElement(
|
|
86
|
+
N,
|
|
83
87
|
{
|
|
84
88
|
variant: "plain",
|
|
85
89
|
color: "secondary",
|
|
86
90
|
className: e.closeButton
|
|
87
91
|
},
|
|
88
|
-
/* @__PURE__ */ o.createElement(
|
|
92
|
+
/* @__PURE__ */ o.createElement(x, null)
|
|
89
93
|
))), m)));
|
|
90
|
-
}),
|
|
91
|
-
const { children:
|
|
94
|
+
}), oo = (t) => {
|
|
95
|
+
const { children: r, ...l } = t;
|
|
92
96
|
return /* @__PURE__ */ o.createElement(
|
|
93
|
-
|
|
97
|
+
h,
|
|
94
98
|
{
|
|
95
99
|
overlayType: "Modal",
|
|
96
100
|
...l,
|
|
97
101
|
component: n.DialogTrigger
|
|
98
102
|
},
|
|
99
|
-
|
|
103
|
+
r
|
|
100
104
|
);
|
|
101
105
|
};
|
|
102
106
|
export {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
107
|
+
_ as Modal,
|
|
108
|
+
oo as ModalTrigger,
|
|
109
|
+
_ as default
|
|
106
110
|
};
|