@mittwald/flow-react-components 0.1.0-alpha.275 → 0.1.0-alpha.277

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/List.js CHANGED
@@ -47,7 +47,7 @@ import { I as Vt } from "./IconSearch-CSaVgGtE.js";
47
47
  import { d as S, a as P } from "./deepFindOfType-6pG0fH7S.js";
48
48
  import { ListLoaderAsyncResource as kt, TypedListLoaderAsyncResource as At } from "./List/ListLoaderAsyncResource.js";
49
49
  import { S as Mt } from "./Skeleton-CKLaTmDR.js";
50
- import { T as Ee, d as Fe, c as Te, a as Ce, e as Ie, b as Le } from "./TableRow-BsPgWqkU.js";
50
+ import { a as Ee, e as Fe, d as Te, b as Ce, T as Ie, c as Le } from "./TableRow-DNTJVTkO.js";
51
51
  import { A as Bt } from "./ActionGroup-CPMad0DR.js";
52
52
  const Dt = "flow--list--items--item--view", xt = "flow--list--items--item--view--title", Nt = "flow--list--items--item--view--top-content", Rt = "flow--list--items--item--view--content", $t = "flow--list--items--item--view--action", zt = "flow--list--items--item--view--avatar", Ut = "flow--list--items--item--view--text", Kt = "flow--list--items--item--view--heading", m = {
53
53
  view: Dt,
package/dist/Modal.js CHANGED
@@ -1,75 +1,81 @@
1
1
  "use client"
2
2
  /* */
3
3
  import o from "react";
4
- import p from "clsx";
4
+ import v from "clsx";
5
5
  import "./propsContext-DzAKlmhS.js";
6
- import { P as v } from "./PropsContextProvider-C6Z4XGp6.js";
6
+ import { P as y } from "./PropsContextProvider-C6Z4XGp6.js";
7
7
  import "@react-aria/utils";
8
8
  import "remeda";
9
- import { TunnelProvider as g, TunnelExit as y } from "@mittwald/react-tunnel";
10
- import { f as C } from "./flowComponent-Cnrr91a8.js";
11
- import * as n from "react-aria-components";
9
+ import { TunnelProvider as C, TunnelExit as E } from "@mittwald/react-tunnel";
10
+ import { f as w } from "./flowComponent-Cnrr91a8.js";
11
+ import { createHtmlPortalNode as h, InPortal as N, OutPortal as O } from "react-reverse-portal";
12
+ import * as c from "react-aria-components";
12
13
  import "mobx";
13
- import { u as w } from "./useOverlayController-D8pgx8nV.js";
14
- import { O as E, a as h } from "./OverlayTrigger-bD8_mPel.js";
15
- import { H as O } from "./Header-Dyx52LYx.js";
16
- import { A as M } from "./Action-BkFTzx0k.js";
17
- import { B as N } from "./Button-DtpO7pbw.js";
14
+ import { u as M } from "./useOverlayController-D8pgx8nV.js";
15
+ import { O as P, a as x } from "./OverlayTrigger-bD8_mPel.js";
16
+ import { A as z } from "./Activity-CmfZpgOM.js";
17
+ import { H as A } from "./Header-Dyx52LYx.js";
18
+ import { A as T } from "./Action-BkFTzx0k.js";
19
+ import { B } from "./Button-DtpO7pbw.js";
18
20
  import "@tabler/icons-react";
19
21
  import "./Icon-9pbeBcg1.js";
20
- import { I as x } from "./IconClose-Cv0NnMI0.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,
22
+ import { I } from "./IconClose-Cv0NnMI0.js";
23
+ const F = "flow--modal", G = "flow--modal--off-canvas", H = "flow--modal--header", D = "flow--modal--content", b = "flow--modal--action-group", R = "flow--modal--left", $ = "flow--modal--close-button", e = {
24
+ modal: F,
25
+ offCanvas: G,
26
+ header: H,
27
+ content: D,
28
+ actionGroup: b,
27
29
  "size-s": "flow--modal--size-s",
28
30
  "size-m": "flow--modal--size-m",
29
31
  "modal-zoom": "flow--modal--modal-zoom",
30
32
  "modal-slide-in-from-right": "flow--modal--modal-slide-in-from-right",
31
- left: G,
33
+ left: R,
32
34
  "modal-slide-in-from-left": "flow--modal--modal-slide-in-from-left",
33
35
  "modal-slide-up": "flow--modal--modal-slide-up",
34
- closeButton: I
35
- }, D = "flow--modal-overlay--overlay", F = {
36
- overlay: D,
36
+ closeButton: $
37
+ }, U = "flow--modal-overlay--overlay", _ = {
38
+ overlay: U,
37
39
  "overlay-fade": "flow--modal-overlay--overlay-fade"
38
- }, H = (t) => {
40
+ }, j = (l) => {
39
41
  const {
40
- controller: a,
41
- children: l,
42
- isDismissable: s = !0,
43
- className: m
44
- } = t, f = w("Modal", {
42
+ controller: r,
43
+ children: t,
44
+ isDismissable: i = !0,
45
+ className: d,
46
+ _experimentalNoUnmountContent: u = !1
47
+ } = l, f = M("Modal", {
45
48
  reuseControllerFromContext: !0
46
- }), r = a ?? f, c = r.useIsOpen(), i = p(F.overlay, m);
47
- return /* @__PURE__ */ o.createElement(
48
- n.ModalOverlay,
49
+ }), a = r ?? f, n = a.useIsOpen(), p = v(_.overlay, d), s = /* @__PURE__ */ o.createElement(c.Dialog, null, /* @__PURE__ */ o.createElement(P, { type: "Modal", controller: a }, t)), m = o.useMemo(
50
+ () => u ? h() : null,
51
+ []
52
+ );
53
+ return /* @__PURE__ */ o.createElement(o.Fragment, null, m && /* @__PURE__ */ o.createElement(N, { node: m }, /* @__PURE__ */ o.createElement(z, { isActive: n }, s)), /* @__PURE__ */ o.createElement(
54
+ c.ModalOverlay,
49
55
  {
50
- className: i,
51
- isDismissable: s,
52
- isOpen: c,
53
- onOpenChange: (d) => r.setOpen(d)
56
+ className: p,
57
+ isDismissable: i,
58
+ isOpen: n,
59
+ onOpenChange: (g) => a.setOpen(g)
54
60
  },
55
- /* @__PURE__ */ o.createElement(n.Modal, null, /* @__PURE__ */ o.createElement(n.Dialog, null, /* @__PURE__ */ o.createElement(E, { type: "Modal", controller: r }, l)))
56
- );
57
- }, _ = C("Modal", (t) => {
61
+ /* @__PURE__ */ o.createElement(c.Modal, null, m ? /* @__PURE__ */ o.createElement(O, { node: m }) : s)
62
+ ));
63
+ }, so = w("Modal", (l) => {
58
64
  const {
59
- size: a = "s",
60
- offCanvas: l,
61
- controller: s,
62
- children: m,
63
- refProp: f,
64
- className: r,
65
- offCanvasOrientation: c = "right",
66
- ...i
67
- } = t, d = p(
68
- l ? e.offCanvas : e.modal,
69
- e[`size-${a}`],
70
- e[c],
71
- r
72
- ), u = {
65
+ size: r = "s",
66
+ offCanvas: t,
67
+ controller: i,
68
+ children: d,
69
+ refProp: u,
70
+ className: f,
71
+ offCanvasOrientation: a = "right",
72
+ ...n
73
+ } = l, p = v(
74
+ t ? e.offCanvas : e.modal,
75
+ e[`size-${r}`],
76
+ e[a],
77
+ f
78
+ ), s = {
73
79
  Content: {
74
80
  className: e.content
75
81
  },
@@ -83,29 +89,29 @@ const z = "flow--modal", P = "flow--modal--off-canvas", T = "flow--modal--header
83
89
  spacing: "m"
84
90
  }
85
91
  };
86
- return /* @__PURE__ */ o.createElement(H, { className: d, controller: s, ...i }, /* @__PURE__ */ o.createElement(v, { props: u }, /* @__PURE__ */ o.createElement(g, null, /* @__PURE__ */ o.createElement(O, { className: e.header }, /* @__PURE__ */ o.createElement(y, { id: "heading" }), l && /* @__PURE__ */ o.createElement(M, { closeOverlay: "Modal" }, /* @__PURE__ */ o.createElement(
87
- N,
92
+ return /* @__PURE__ */ o.createElement(j, { className: p, controller: i, ...n }, /* @__PURE__ */ o.createElement(y, { props: s }, /* @__PURE__ */ o.createElement(C, null, /* @__PURE__ */ o.createElement(A, { className: e.header }, /* @__PURE__ */ o.createElement(E, { id: "heading" }), t && /* @__PURE__ */ o.createElement(T, { closeOverlay: "Modal" }, /* @__PURE__ */ o.createElement(
93
+ B,
88
94
  {
89
95
  variant: "plain",
90
96
  color: "secondary",
91
97
  className: e.closeButton
92
98
  },
93
- /* @__PURE__ */ o.createElement(x, null)
94
- ))), m)));
95
- }), oo = (t) => {
96
- const { children: a, ...l } = t;
99
+ /* @__PURE__ */ o.createElement(I, null)
100
+ ))), d)));
101
+ }), mo = (l) => {
102
+ const { children: r, ...t } = l;
97
103
  return /* @__PURE__ */ o.createElement(
98
- h,
104
+ x,
99
105
  {
100
106
  overlayType: "Modal",
101
- ...l,
102
- component: n.DialogTrigger
107
+ ...t,
108
+ component: c.DialogTrigger
103
109
  },
104
- a
110
+ r
105
111
  );
106
112
  };
107
113
  export {
108
- _ as Modal,
109
- oo as ModalTrigger,
110
- _ as default
114
+ so as Modal,
115
+ mo as ModalTrigger,
116
+ so as default
111
117
  };
package/dist/Table.js CHANGED
@@ -1,13 +1,16 @@
1
1
  "use client"
2
2
  /* */
3
- import { T as e } from "./TableRow-BsPgWqkU.js";
4
- import { a as b, b as s, c as T, d as r, e as d } from "./TableRow-BsPgWqkU.js";
3
+ import { T as a, a as t } from "./TableRow-DNTJVTkO.js";
4
+ import { b as m, c as f, d as c, e as d } from "./TableRow-DNTJVTkO.js";
5
+ import o from "react";
6
+ const b = (e) => /* @__PURE__ */ o.createElement(a, { ...e, footer: !0 });
5
7
  export {
6
- e as Table,
7
- b as TableBody,
8
- s as TableCell,
9
- T as TableColumn,
10
- r as TableHeader,
11
- d as TableRow,
12
- e as default
8
+ t as Table,
9
+ m as TableBody,
10
+ f as TableCell,
11
+ c as TableColumn,
12
+ b as TableFooterRow,
13
+ d as TableHeader,
14
+ a as TableRow,
15
+ t as default
13
16
  };
@@ -0,0 +1,52 @@
1
+ "use client"
2
+ /* */
3
+ import s, { Suspense as b } from "react";
4
+ import * as r from "react-aria-components";
5
+ import n from "clsx";
6
+ import { S as d } from "./SkeletonText-B5ZghZhO.js";
7
+ const f = "flow--table--table-container", i = "flow--table", N = "flow--table--header", u = "flow--table--body", w = "flow--table--footer", C = "flow--table--cell", h = "flow--table--column", c = {
8
+ tableContainer: f,
9
+ table: i,
10
+ header: N,
11
+ body: u,
12
+ footer: w,
13
+ cell: C,
14
+ column: h
15
+ }, y = (t) => {
16
+ const { children: a, className: e, ...l } = t, o = n(c.table, e);
17
+ return /* @__PURE__ */ s.createElement("div", { className: c.tableContainer }, /* @__PURE__ */ s.createElement(r.Table, { className: o, ...l }, a));
18
+ }, x = (t) => {
19
+ const { children: a, className: e, ...l } = t, o = n(c.body, e);
20
+ return /* @__PURE__ */ s.createElement(r.TableBody, { className: o, ...l }, a);
21
+ }, R = (t) => {
22
+ const { children: a, className: e, ...l } = t, o = n(c.cell, e);
23
+ return /* @__PURE__ */ s.createElement(r.Cell, { className: o, ...l }, /* @__PURE__ */ s.createElement(b, { fallback: /* @__PURE__ */ s.createElement(d, { width: "100px" }) }, a));
24
+ }, H = (t) => {
25
+ const { children: a, className: e, ...l } = t, o = n(c.column, e);
26
+ return /* @__PURE__ */ s.createElement(r.Column, { isRowHeader: !0, className: o, ...l }, a);
27
+ }, S = (t) => {
28
+ const { children: a, className: e, ...l } = t, o = n(c.header, e);
29
+ return /* @__PURE__ */ s.createElement(r.TableHeader, { className: o, ...l }, a);
30
+ }, k = (t) => {
31
+ const { children: a, className: e, footer: l, ...o } = t;
32
+ return /* @__PURE__ */ s.createElement(
33
+ r.Row,
34
+ {
35
+ className: (m) => n(
36
+ c.row,
37
+ l && c.footer,
38
+ typeof e == "function" ? e(m) : e
39
+ ),
40
+ ...o
41
+ },
42
+ a
43
+ );
44
+ };
45
+ export {
46
+ k as T,
47
+ y as a,
48
+ x as b,
49
+ R as c,
50
+ H as d,
51
+ S as e
52
+ };