@mittwald/flow-react-components 0.1.0-alpha.167 → 0.1.0-alpha.169

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
@@ -17,16 +17,15 @@ import { A as O } from "./Action-DYTtbQCP.js";
17
17
  import { B as h } from "./Button-Dz22EEEz.js";
18
18
  import "@tabler/icons-react";
19
19
  import "./Icon-BTTw8v9z.js";
20
- import { I as z } from "./IconClose-D3xiRQc_.js";
21
- import { O as M } from "./OverlayTrigger-Bdb65OEJ.js";
22
- const N = "flow--modal", x = "flow--modal--off-canvas", P = "flow--modal--content", T = "flow--modal--action-group", B = "flow--modal--header", I = "flow--modal--close-button", l = {
23
- modal: N,
24
- offCanvas: x,
20
+ import { I as M } from "./IconClose-D3xiRQc_.js";
21
+ import { O as N } from "./OverlayTrigger-Bdb65OEJ.js";
22
+ const x = "flow--modal", z = "flow--modal--off-canvas", P = "flow--modal--content", T = "flow--modal--action-group", B = "flow--modal--header", I = "flow--modal--close-button", t = {
23
+ modal: x,
24
+ offCanvas: z,
25
25
  content: P,
26
26
  actionGroup: T,
27
27
  "size-s": "flow--modal--size-s",
28
28
  "size-m": "flow--modal--size-m",
29
- "size-l": "flow--modal--size-l",
30
29
  "modal-zoom": "flow--modal--modal-zoom",
31
30
  header: B,
32
31
  "modal-slide-in": "flow--modal--modal-slide-in",
@@ -35,38 +34,38 @@ const N = "flow--modal", x = "flow--modal--off-canvas", P = "flow--modal--conten
35
34
  }, b = "flow--modal-overlay--overlay", A = {
36
35
  overlay: b,
37
36
  "overlay-fade": "flow--modal-overlay--overlay-fade"
38
- }, F = (t) => {
37
+ }, F = (l) => {
39
38
  const {
40
- controller: a,
39
+ controller: r,
41
40
  children: e,
42
41
  isDismissable: s = !0,
43
42
  className: m
44
- } = t, f = C("Modal", {
43
+ } = l, f = C("Modal", {
45
44
  reuseControllerFromContext: !0
46
- }), r = a ?? f, c = r.useIsOpen(), i = u(A.overlay, m);
45
+ }), a = r ?? f, c = a.useIsOpen(), i = u(A.overlay, m);
47
46
  return /* @__PURE__ */ o.createElement(
48
47
  n.ModalOverlay,
49
48
  {
50
49
  className: i,
51
50
  isDismissable: s,
52
51
  isOpen: c,
53
- onOpenChange: (d) => r.setOpen(d)
52
+ onOpenChange: (d) => a.setOpen(d)
54
53
  },
55
- /* @__PURE__ */ o.createElement(n.Modal, null, /* @__PURE__ */ o.createElement(n.Dialog, null, /* @__PURE__ */ o.createElement(E, { type: "Modal", controller: r }, e)))
54
+ /* @__PURE__ */ o.createElement(n.Modal, null, /* @__PURE__ */ o.createElement(n.Dialog, null, /* @__PURE__ */ o.createElement(E, { type: "Modal", controller: a }, e)))
56
55
  );
57
- }, Z = g("Modal", (t) => {
56
+ }, Z = g("Modal", (l) => {
58
57
  const {
59
- size: a = "s",
58
+ size: r = "s",
60
59
  offCanvas: e,
61
60
  controller: s,
62
61
  children: m,
63
62
  refProp: f,
64
- className: r,
63
+ className: a,
65
64
  ...c
66
- } = t, i = u(
67
- e ? l.offCanvas : l.modal,
68
- l[`size-${a}`],
69
- r
65
+ } = l, i = u(
66
+ e ? t.offCanvas : t.modal,
67
+ t[`size-${r}`],
68
+ a
70
69
  ), d = {
71
70
  Content: {
72
71
  elementType: o.Fragment
@@ -78,29 +77,29 @@ const N = "flow--modal", x = "flow--modal--off-canvas", P = "flow--modal--conten
78
77
  tunnelId: "heading"
79
78
  },
80
79
  ActionGroup: {
81
- className: l.actionGroup,
80
+ className: t.actionGroup,
82
81
  tunnelId: "buttons"
83
82
  }
84
83
  };
85
- return /* @__PURE__ */ o.createElement(F, { className: i, controller: s, ...c }, /* @__PURE__ */ o.createElement(v, { props: d }, /* @__PURE__ */ o.createElement(y, null, e && /* @__PURE__ */ o.createElement(w, { className: l.header }, /* @__PURE__ */ o.createElement(p, { id: "heading" }), /* @__PURE__ */ o.createElement(O, { closeOverlay: "Modal" }, /* @__PURE__ */ o.createElement(
84
+ return /* @__PURE__ */ o.createElement(F, { className: i, controller: s, ...c }, /* @__PURE__ */ o.createElement(v, { props: d }, /* @__PURE__ */ o.createElement(y, null, e && /* @__PURE__ */ o.createElement(w, { className: t.header }, /* @__PURE__ */ o.createElement(p, { id: "heading" }), /* @__PURE__ */ o.createElement(O, { closeOverlay: "Modal" }, /* @__PURE__ */ o.createElement(
86
85
  h,
87
86
  {
88
87
  variant: "plain",
89
88
  color: "secondary",
90
- className: l.closeButton
89
+ className: t.closeButton
91
90
  },
92
- /* @__PURE__ */ o.createElement(z, null)
93
- ))), /* @__PURE__ */ o.createElement("div", { className: l.content }, !e && /* @__PURE__ */ o.createElement(p, { id: "heading" }), m), /* @__PURE__ */ o.createElement(p, { id: "buttons" }))));
94
- }), _ = (t) => {
95
- const { children: a, ...e } = t;
91
+ /* @__PURE__ */ o.createElement(M, null)
92
+ ))), /* @__PURE__ */ o.createElement("div", { className: t.content }, !e && /* @__PURE__ */ o.createElement(p, { id: "heading" }), m), /* @__PURE__ */ o.createElement(p, { id: "buttons" }))));
93
+ }), _ = (l) => {
94
+ const { children: r, ...e } = l;
96
95
  return /* @__PURE__ */ o.createElement(
97
- M,
96
+ N,
98
97
  {
99
98
  overlayType: "Modal",
100
99
  ...e,
101
100
  component: n.DialogTrigger
102
101
  },
103
- a
102
+ r
104
103
  );
105
104
  };
106
105
  export {