@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 f from "clsx";
4
+ import p from "clsx";
5
5
  import "./propsContext-DzAKlmhS.js";
6
- import { P as u } from "./PropsContextProvider-C6Z4XGp6.js";
6
+ import { P as v } from "./PropsContextProvider-C6Z4XGp6.js";
7
7
  import "@react-aria/utils";
8
8
  import "remeda";
9
- import { TunnelProvider as v, TunnelExit as y } from "@mittwald/react-tunnel";
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 g } from "./useOverlayController-D8pgx8nV.js";
14
- import { O as w, a as E } from "./OverlayTrigger-bD8_mPel.js";
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 h } from "./Action-B6lMX6do.js";
17
- import { B as M } from "./Button-DPF2xiJl.js";
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 N } from "./IconClose-gMf32kww.js";
21
- const x = "flow--modal", z = "flow--modal--off-canvas", P = "flow--modal--header", T = "flow--modal--content", B = "flow--modal--action-group", A = "flow--modal--close-button", e = {
22
- modal: x,
23
- offCanvas: z,
24
- header: P,
25
- content: T,
26
- actionGroup: B,
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: A
33
- }, G = "flow--modal-overlay--overlay", I = {
34
- overlay: G,
34
+ closeButton: I
35
+ }, D = "flow--modal-overlay--overlay", F = {
36
+ overlay: D,
35
37
  "overlay-fade": "flow--modal-overlay--overlay-fade"
36
- }, D = (t) => {
38
+ }, H = (t) => {
37
39
  const {
38
- controller: a,
40
+ controller: r,
39
41
  children: l,
40
42
  isDismissable: s = !0,
41
43
  className: m
42
- } = t, p = g("Modal", {
44
+ } = t, f = w("Modal", {
43
45
  reuseControllerFromContext: !0
44
- }), r = a ?? p, c = r.useIsOpen(), i = f(I.overlay, m);
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) => r.setOpen(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(w, { type: "Modal", controller: r }, l)))
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
- }, Y = C("Modal", (t) => {
57
+ }, _ = C("Modal", (t) => {
56
58
  const {
57
- size: a = "s",
59
+ size: r = "s",
58
60
  offCanvas: l,
59
61
  controller: s,
60
62
  children: m,
61
- refProp: p,
62
- className: r,
63
- ...c
64
- } = t, i = f(
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-${a}`],
67
- r
68
- ), d = {
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(D, { className: i, controller: s, ...c }, /* @__PURE__ */ o.createElement(u, { props: d }, /* @__PURE__ */ o.createElement(v, null, /* @__PURE__ */ o.createElement(O, { className: e.header }, /* @__PURE__ */ o.createElement(y, { id: "heading" }), l && /* @__PURE__ */ o.createElement(h, { closeOverlay: "Modal" }, /* @__PURE__ */ o.createElement(
82
- M,
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(N, null)
92
+ /* @__PURE__ */ o.createElement(x, null)
89
93
  ))), m)));
90
- }), Z = (t) => {
91
- const { children: a, ...l } = t;
94
+ }), oo = (t) => {
95
+ const { children: r, ...l } = t;
92
96
  return /* @__PURE__ */ o.createElement(
93
- E,
97
+ h,
94
98
  {
95
99
  overlayType: "Modal",
96
100
  ...l,
97
101
  component: n.DialogTrigger
98
102
  },
99
- a
103
+ r
100
104
  );
101
105
  };
102
106
  export {
103
- Y as Modal,
104
- Z as ModalTrigger,
105
- Y as default
107
+ _ as Modal,
108
+ oo as ModalTrigger,
109
+ _ as default
106
110
  };