@mittwald/flow-react-components 0.1.0-alpha.206 → 0.1.0-alpha.208
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/{Action-DrXR84F6.js → Action-Dp_7RavF.js} +1 -1
- package/dist/Action.js +1 -1
- package/dist/ContextMenu.js +2 -2
- package/dist/{ContextMenuTrigger-BdJf5T8A.js → ContextMenuTrigger-DOCNHDwJ.js} +5 -5
- package/dist/ContextualHelp.js +4 -4
- package/dist/CopyButton.js +1 -1
- package/dist/List.js +18 -18
- package/dist/Modal.js +4 -4
- package/dist/{OverlayContextProvider-DJzKzUwy.js → OverlayContextProvider-xvILXWn5.js} +1 -1
- package/dist/{OverlayTrigger-Bdb65OEJ.js → OverlayTrigger-D9ziPSB1.js} +3 -3
- package/dist/{Popover-D_KuyuoO.js → Popover-Cv7qj8sY.js} +9 -9
- package/dist/Popover.js +2 -2
- package/dist/Select.js +4 -4
- package/dist/Tabs.js +1 -1
- package/dist/context-Cf7tqFtF.js +50 -0
- package/dist/controller.js +2 -2
- package/dist/hooks.js +1 -1
- package/dist/react-hook-form.js +1 -1
- package/dist/types/lib/controller/overlay/OverlayController.d.ts +9 -2
- package/dist/types/lib/controller/overlay/useOverlayController.d.ts +2 -3
- package/dist/useOverlayController-D8pgx8nV.js +19 -0
- package/package.json +4 -4
- package/dist/context-BB3_MApL.js +0 -44
- package/dist/useOverlayController-D8N4X2rc.js +0 -10
|
@@ -4,7 +4,7 @@ var k = Object.defineProperty;
|
|
|
4
4
|
var M = (n, t, e) => t in n ? k(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
|
|
5
5
|
var r = (n, t, e) => M(n, typeof t != "symbol" ? t + "" : t, e);
|
|
6
6
|
import g, { createContext as O, useRef as I, useContext as w } from "react";
|
|
7
|
-
import { u as E, O as D } from "./context-
|
|
7
|
+
import { u as E, O as D } from "./context-Cf7tqFtF.js";
|
|
8
8
|
import T from "invariant";
|
|
9
9
|
import { makeObservable as N, observable as R, action as V, computed as $ } from "mobx";
|
|
10
10
|
import { u as b } from "./useSelector-DpU7_HMO.js";
|
package/dist/Action.js
CHANGED
package/dist/ContextMenu.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
|
-
import { C as t } from "./ContextMenuTrigger-
|
|
4
|
-
import { a } from "./ContextMenuTrigger-
|
|
3
|
+
import { C as t } from "./ContextMenuTrigger-DOCNHDwJ.js";
|
|
4
|
+
import { a } from "./ContextMenuTrigger-DOCNHDwJ.js";
|
|
5
5
|
import { M as n } from "./MenuItem-DcfYvfPJ.js";
|
|
6
6
|
export {
|
|
7
7
|
t as ContextMenu,
|
|
@@ -4,17 +4,17 @@ import e from "react";
|
|
|
4
4
|
import * as i from "react-aria-components";
|
|
5
5
|
import { s } from "./ContextMenu.module-BZingr2B.js";
|
|
6
6
|
import { f as m } from "./flowComponent-DHPUcYyM.js";
|
|
7
|
-
import { P } from "./Popover-
|
|
7
|
+
import { P } from "./Popover-Cv7qj8sY.js";
|
|
8
8
|
import "mobx";
|
|
9
|
-
import { u as E } from "./useOverlayController-
|
|
9
|
+
import { u as E } from "./useOverlayController-D8pgx8nV.js";
|
|
10
10
|
import { C as O } from "./ClearPropsContext-CUvsbMn8.js";
|
|
11
11
|
import { P as T } from "./PropsContextProvider-C6Z4XGp6.js";
|
|
12
12
|
import "@react-aria/utils";
|
|
13
13
|
import "./propsContext-DzAKlmhS.js";
|
|
14
14
|
import "remeda";
|
|
15
|
-
import { O as S } from "./OverlayContextProvider-
|
|
16
|
-
import { A } from "./Action-
|
|
17
|
-
import { O as h } from "./OverlayTrigger-
|
|
15
|
+
import { O as S } from "./OverlayContextProvider-xvILXWn5.js";
|
|
16
|
+
import { A } from "./Action-Dp_7RavF.js";
|
|
17
|
+
import { O as h } from "./OverlayTrigger-D9ziPSB1.js";
|
|
18
18
|
const G = m("ContextMenu", (t) => {
|
|
19
19
|
const {
|
|
20
20
|
children: r,
|
package/dist/ContextualHelp.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
3
|
import t from "react";
|
|
4
|
-
import { P as s } from "./Popover-
|
|
4
|
+
import { P as s } from "./Popover-Cv7qj8sY.js";
|
|
5
5
|
import * as c from "react-aria-components";
|
|
6
6
|
import "mobx";
|
|
7
|
-
import { u } from "./useOverlayController-
|
|
7
|
+
import { u } from "./useOverlayController-D8pgx8nV.js";
|
|
8
8
|
import "./propsContext-DzAKlmhS.js";
|
|
9
9
|
import { P as l } from "./PropsContextProvider-C6Z4XGp6.js";
|
|
10
10
|
import "@react-aria/utils";
|
|
11
11
|
import "remeda";
|
|
12
|
-
import "./context-
|
|
12
|
+
import "./context-Cf7tqFtF.js";
|
|
13
13
|
import { f } from "./flowComponent-DHPUcYyM.js";
|
|
14
|
-
import { O as x } from "./OverlayTrigger-
|
|
14
|
+
import { O as x } from "./OverlayTrigger-D9ziPSB1.js";
|
|
15
15
|
import { useLocalizedStringFormatter as g } from "react-aria";
|
|
16
16
|
import "@tabler/icons-react";
|
|
17
17
|
import "./Icon-DPoIVASu.js";
|
package/dist/CopyButton.js
CHANGED
|
@@ -15,7 +15,7 @@ import "@react-aria/utils";
|
|
|
15
15
|
import "remeda";
|
|
16
16
|
import "dot-prop";
|
|
17
17
|
import { f as E } from "./flowComponent-DHPUcYyM.js";
|
|
18
|
-
import { A as B } from "./Action-
|
|
18
|
+
import { A as B } from "./Action-Dp_7RavF.js";
|
|
19
19
|
const g = { "de-DE": {
|
|
20
20
|
"copyButton.copy": "Kopieren"
|
|
21
21
|
}, "en-EN": {
|
package/dist/List.js
CHANGED
|
@@ -13,7 +13,7 @@ import { B as p } from "./Button-DQtavSbo.js";
|
|
|
13
13
|
import "@tabler/icons-react";
|
|
14
14
|
import "./Icon-DPoIVASu.js";
|
|
15
15
|
import { I as Ct } from "./IconContextMenu-jwoVcLvd.js";
|
|
16
|
-
import { a as A, C as Q } from "./ContextMenuTrigger-
|
|
16
|
+
import { a as A, C as Q } from "./ContextMenuTrigger-DOCNHDwJ.js";
|
|
17
17
|
import { M as X } from "./MenuItem-DcfYvfPJ.js";
|
|
18
18
|
import { useLocalizedStringFormatter as v } from "react-aria";
|
|
19
19
|
import { TunnelProvider as Lt, TunnelExit as U } from "@mittwald/react-tunnel";
|
|
@@ -24,9 +24,9 @@ import { R as kt } from "./Render-BdlTa7Qb.js";
|
|
|
24
24
|
import { T as f } from "./Text-Sd5q3Yme.js";
|
|
25
25
|
import { I as Z } from "./IconChevronDown--OxZLX8L.js";
|
|
26
26
|
import { I as At } from "./IconClose-BFwPT_IX.js";
|
|
27
|
-
import { makeObservable as
|
|
28
|
-
import "./context-
|
|
29
|
-
import { u as
|
|
27
|
+
import { makeObservable as Vt, observable as $, computed as O, action as L } from "mobx";
|
|
28
|
+
import "./context-Cf7tqFtF.js";
|
|
29
|
+
import { u as Bt } from "./useOnChange-C1Quwyuz.js";
|
|
30
30
|
import { S as Pt } from "./SearchField-DstUFmq4.js";
|
|
31
31
|
import { getProperty as xt } from "dot-prop";
|
|
32
32
|
import { hash as Dt } from "object-code";
|
|
@@ -34,7 +34,7 @@ import { useReactTable as Nt, getCoreRowModel as Rt, getSortedRowModel as Mt, ge
|
|
|
34
34
|
import tt from "invariant";
|
|
35
35
|
import { getAsyncResource as q } from "@mittwald/react-use-promise";
|
|
36
36
|
import { u as H } from "./useSelector-DpU7_HMO.js";
|
|
37
|
-
import * as
|
|
37
|
+
import * as V from "react-aria-components";
|
|
38
38
|
import { I as Ot } from "./IllustratedMessage-B3MHD01M.js";
|
|
39
39
|
import { I as qt } from "./IconSearch-C7VQTAqK.js";
|
|
40
40
|
import { H as et } from "./Heading-BEC6iPfF.js";
|
|
@@ -211,7 +211,7 @@ const jt = "flow--list--items--item--view", Wt = "flow--list--items--item--view-
|
|
|
211
211
|
));
|
|
212
212
|
}, me = (i) => {
|
|
213
213
|
const { className: t, onChange: e, value: s, ...a } = i, [o, l] = Y(s ?? "");
|
|
214
|
-
|
|
214
|
+
Bt(s, () => {
|
|
215
215
|
l(s ?? "");
|
|
216
216
|
}, [o]);
|
|
217
217
|
const u = () => {
|
|
@@ -398,7 +398,7 @@ class Ce {
|
|
|
398
398
|
}
|
|
399
399
|
deleteUnknownFilterValues() {
|
|
400
400
|
if (this.values !== this.valuesFromTableState)
|
|
401
|
-
for (const t of this.
|
|
401
|
+
for (const t of this.getArrayValue())
|
|
402
402
|
this.checkIfValueIsUnknown(t) && this.deactivateValue(t);
|
|
403
403
|
}
|
|
404
404
|
get values() {
|
|
@@ -469,7 +469,7 @@ class Le {
|
|
|
469
469
|
return `${this.getTableColumn().id}:${this.direction}`;
|
|
470
470
|
}
|
|
471
471
|
}
|
|
472
|
-
class
|
|
472
|
+
class B {
|
|
473
473
|
constructor(t, e, s = {}) {
|
|
474
474
|
n(this, "list");
|
|
475
475
|
n(this, "table");
|
|
@@ -484,7 +484,7 @@ class V {
|
|
|
484
484
|
this.sortingState = o, this.updateSortingState = l, this.table = this.useReactTable(e, s);
|
|
485
485
|
}
|
|
486
486
|
static useNew(t, e, s = {}) {
|
|
487
|
-
return new
|
|
487
|
+
return new B(t, e, s);
|
|
488
488
|
}
|
|
489
489
|
useReactTable(t, e = {}) {
|
|
490
490
|
const s = this.list.loader.useData(), a = Nt({
|
|
@@ -551,7 +551,7 @@ class P {
|
|
|
551
551
|
n(this, "dataBatches", []);
|
|
552
552
|
n(this, "prevDataBatches", []);
|
|
553
553
|
n(this, "batchLoadingStates", ["void"]);
|
|
554
|
-
|
|
554
|
+
Vt(this, {
|
|
555
555
|
prevDataBatches: !1,
|
|
556
556
|
useMergedData: !1,
|
|
557
557
|
useIsLoading: !1,
|
|
@@ -751,7 +751,7 @@ let I = F, ke = class rt {
|
|
|
751
751
|
hasAction: l,
|
|
752
752
|
onChange: u
|
|
753
753
|
} = t;
|
|
754
|
-
this.items = new ve(this), this.filters = s.map((c) => new Ce(this, c)), this.sorting = a.map((c) => new Le(this, c)), this.search = t.search ? new Ie(this, t.search) : void 0, this.itemView = new I(this, e), this.batches = new ye(this, o), this.loader = x.useNew(this, t.loader), this.reactTable =
|
|
754
|
+
this.items = new ve(this), this.filters = s.map((c) => new Ce(this, c)), this.sorting = a.map((c) => new Le(this, c)), this.search = t.search ? new Ie(this, t.search) : void 0, this.itemView = new I(this, e), this.batches = new ye(this, o), this.loader = x.useNew(this, t.loader), this.reactTable = B.useNew(this, u, {
|
|
755
755
|
manualFiltering: this.loader.manualFiltering,
|
|
756
756
|
manualPagination: this.loader.manualPagination,
|
|
757
757
|
manualSorting: this.loader.manualSorting
|
|
@@ -783,16 +783,16 @@ let I = F, ke = class rt {
|
|
|
783
783
|
return !this.loader.useIsLoading() && this.items.entries.length === 0;
|
|
784
784
|
}
|
|
785
785
|
};
|
|
786
|
-
const Ae = "flow--list--items",
|
|
786
|
+
const Ae = "flow--list--items", Ve = "flow--list--items--is-loading", _ = {
|
|
787
787
|
items: Ae,
|
|
788
|
-
isLoading:
|
|
789
|
-
},
|
|
790
|
-
item:
|
|
788
|
+
isLoading: Ve
|
|
789
|
+
}, Be = "flow--list--items--item", Pe = "flow--list--items--item--has-action", k = {
|
|
790
|
+
item: Be,
|
|
791
791
|
hasAction: Pe
|
|
792
792
|
}, xe = (i) => {
|
|
793
793
|
const { data: t, children: e } = i, s = m(), a = s.itemView, o = a.onAction, l = a.textValue ? a.textValue(t) : void 0, u = o ? () => o(t) : void 0, c = a.href ? a.href(t) : void 0, h = s.hasAction || !!u || !!c, b = C(k.item, h && k.hasAction);
|
|
794
794
|
return /* @__PURE__ */ r.createElement(
|
|
795
|
-
|
|
795
|
+
V.GridListItem,
|
|
796
796
|
{
|
|
797
797
|
className: b,
|
|
798
798
|
onAction: u,
|
|
@@ -801,7 +801,7 @@ const Ae = "flow--list--items", Be = "flow--list--items--is-loading", _ = {
|
|
|
801
801
|
},
|
|
802
802
|
e ?? a.render(t)
|
|
803
803
|
);
|
|
804
|
-
}, De = (i) => /* @__PURE__ */ r.createElement(
|
|
804
|
+
}, De = (i) => /* @__PURE__ */ r.createElement(V.GridListItem, { textValue: "-", className: k.item }, i.children), Ne = () => {
|
|
805
805
|
const i = v(g);
|
|
806
806
|
return /* @__PURE__ */ r.createElement(Ot, null, /* @__PURE__ */ r.createElement(qt, null), /* @__PURE__ */ r.createElement(et, null, i.format("list.noResult.heading")), /* @__PURE__ */ r.createElement(f, null, i.format("list.noResult.text")));
|
|
807
807
|
}, Re = () => /* @__PURE__ */ r.createElement(st, null, /* @__PURE__ */ r.createElement(et, null, /* @__PURE__ */ r.createElement(K, { width: "200px" })), /* @__PURE__ */ r.createElement(f, null, /* @__PURE__ */ r.createElement(K, { width: "300px" }))), Me = () => {
|
|
@@ -813,7 +813,7 @@ const Ae = "flow--list--items", Be = "flow--list--items--is-loading", _ = {
|
|
|
813
813
|
t,
|
|
814
814
|
a && _.isLoading
|
|
815
815
|
);
|
|
816
|
-
return l ? /* @__PURE__ */ r.createElement(Ne, null) : /* @__PURE__ */ r.createElement("div", { "aria-hidden": o, "aria-busy": a }, /* @__PURE__ */ r.createElement(
|
|
816
|
+
return l ? /* @__PURE__ */ r.createElement(Ne, null) : /* @__PURE__ */ r.createElement("div", { "aria-hidden": o, "aria-busy": a }, /* @__PURE__ */ r.createElement(V.GridList, { className: c, ...e }, o ? /* @__PURE__ */ r.createElement(Me, null) : u));
|
|
817
817
|
}, nt = (i) => null, Ue = () => nt, ot = (i) => null, $e = () => ot, lt = (i) => null, Oe = () => lt, ct = (i) => null, qe = () => ct, ut = (i) => null, He = () => ut, Ke = "flow--list--footer", Ge = {
|
|
818
818
|
footer: Ke
|
|
819
819
|
}, je = (i) => {
|
package/dist/Modal.js
CHANGED
|
@@ -10,15 +10,15 @@ import { TunnelProvider as v, TunnelExit as y } from "@mittwald/react-tunnel";
|
|
|
10
10
|
import { f as C } from "./flowComponent-DHPUcYyM.js";
|
|
11
11
|
import * as n from "react-aria-components";
|
|
12
12
|
import "mobx";
|
|
13
|
-
import { u as g } from "./useOverlayController-
|
|
14
|
-
import { O as w } from "./OverlayContextProvider-
|
|
13
|
+
import { u as g } from "./useOverlayController-D8pgx8nV.js";
|
|
14
|
+
import { O as w } from "./OverlayContextProvider-xvILXWn5.js";
|
|
15
15
|
import { H as E } from "./Header-DUWPZjAq.js";
|
|
16
|
-
import { A as O } from "./Action-
|
|
16
|
+
import { A as O } from "./Action-Dp_7RavF.js";
|
|
17
17
|
import { B as h } from "./Button-DQtavSbo.js";
|
|
18
18
|
import "@tabler/icons-react";
|
|
19
19
|
import "./Icon-DPoIVASu.js";
|
|
20
20
|
import { I as M } from "./IconClose-BFwPT_IX.js";
|
|
21
|
-
import { O as N } from "./OverlayTrigger-
|
|
21
|
+
import { O as N } from "./OverlayTrigger-D9ziPSB1.js";
|
|
22
22
|
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 = {
|
|
23
23
|
modal: x,
|
|
24
24
|
offCanvas: z,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
3
|
import a from "react";
|
|
4
|
-
import { u as l, o as c } from "./context-
|
|
4
|
+
import { u as l, o as c } from "./context-Cf7tqFtF.js";
|
|
5
5
|
const i = (e) => {
|
|
6
6
|
const { type: t, controller: r, children: o } = e, n = l();
|
|
7
7
|
return /* @__PURE__ */ a.createElement(
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
3
|
import r from "react";
|
|
4
|
-
import { O as m } from "./context-
|
|
4
|
+
import { O as m } from "./context-Cf7tqFtF.js";
|
|
5
5
|
import "./propsContext-DzAKlmhS.js";
|
|
6
6
|
import { P as i } from "./PropsContextProvider-C6Z4XGp6.js";
|
|
7
7
|
import "@react-aria/utils";
|
|
8
8
|
import "remeda";
|
|
9
|
-
import { O as c } from "./OverlayContextProvider-
|
|
9
|
+
import { O as c } from "./OverlayContextProvider-xvILXWn5.js";
|
|
10
10
|
const g = (o) => {
|
|
11
11
|
const {
|
|
12
12
|
overlayType: t,
|
|
13
13
|
isDefaultOpen: n = !1,
|
|
14
14
|
component: p,
|
|
15
15
|
children: s
|
|
16
|
-
} = o, e = m.useNew(n), a = e.useIsOpen(), l = {
|
|
16
|
+
} = o, e = m.useNew({ isDefaultOpen: n }), a = e.useIsOpen(), l = {
|
|
17
17
|
Button: {
|
|
18
18
|
onPress: e.open
|
|
19
19
|
}
|
|
@@ -4,9 +4,9 @@ import o from "react";
|
|
|
4
4
|
import * as t from "react-aria-components";
|
|
5
5
|
import n from "clsx";
|
|
6
6
|
import "mobx";
|
|
7
|
-
import { u } from "./useOverlayController-
|
|
7
|
+
import { u as h } from "./useOverlayController-D8pgx8nV.js";
|
|
8
8
|
import { f as g } from "./flowComponent-DHPUcYyM.js";
|
|
9
|
-
import { O as x } from "./OverlayContextProvider-
|
|
9
|
+
import { O as x } from "./OverlayContextProvider-xvILXWn5.js";
|
|
10
10
|
const E = "flow--popover", N = "flow--popover--content", y = "flow--popover--tip", r = {
|
|
11
11
|
popover: E,
|
|
12
12
|
content: N,
|
|
@@ -23,22 +23,22 @@ const E = "flow--popover", N = "flow--popover--content", y = "flow--popover--tip
|
|
|
23
23
|
refProp: v,
|
|
24
24
|
defaultOpen: f = !1,
|
|
25
25
|
...C
|
|
26
|
-
} = p, d =
|
|
26
|
+
} = p, d = h("Popover", {
|
|
27
27
|
reuseControllerFromContext: !0,
|
|
28
|
-
|
|
29
|
-
}), e = m ?? d,
|
|
28
|
+
isDefaultOpen: f
|
|
29
|
+
}), e = m ?? d, O = e.useIsOpen(), P = n(r.popover, l), w = c ? t.Dialog : "div";
|
|
30
30
|
return /* @__PURE__ */ o.createElement(
|
|
31
31
|
t.Popover,
|
|
32
32
|
{
|
|
33
33
|
...C,
|
|
34
|
-
className:
|
|
34
|
+
className: P,
|
|
35
35
|
containerPadding: 16,
|
|
36
36
|
ref: v,
|
|
37
|
-
isOpen:
|
|
38
|
-
onOpenChange: (
|
|
37
|
+
isOpen: O,
|
|
38
|
+
onOpenChange: (u) => e.setOpen(u)
|
|
39
39
|
},
|
|
40
40
|
i && /* @__PURE__ */ o.createElement(t.OverlayArrow, { className: r.tip }, /* @__PURE__ */ o.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16" }, /* @__PURE__ */ o.createElement("path", { d: "M0 0 L8 8 L16 0" }))),
|
|
41
|
-
/* @__PURE__ */ o.createElement(
|
|
41
|
+
/* @__PURE__ */ o.createElement(w, { className: n(r.content, a) }, /* @__PURE__ */ o.createElement(x, { type: "Popover", controller: e }, s))
|
|
42
42
|
);
|
|
43
43
|
});
|
|
44
44
|
export {
|
package/dist/Popover.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
|
-
import { P as m } from "./Popover-
|
|
3
|
+
import { P as m } from "./Popover-Cv7qj8sY.js";
|
|
4
4
|
import * as t from "react-aria-components";
|
|
5
5
|
import a from "react";
|
|
6
|
-
import { O as i } from "./OverlayTrigger-
|
|
6
|
+
import { O as i } from "./OverlayTrigger-D9ziPSB1.js";
|
|
7
7
|
const s = (r) => {
|
|
8
8
|
const { children: o, ...e } = r;
|
|
9
9
|
return /* @__PURE__ */ a.createElement(
|
package/dist/Select.js
CHANGED
|
@@ -13,13 +13,13 @@ import "@tabler/icons-react";
|
|
|
13
13
|
import "./Icon-DPoIVASu.js";
|
|
14
14
|
import { I as P } from "./IconChevronDown--OxZLX8L.js";
|
|
15
15
|
import { f as E } from "./flowComponent-DHPUcYyM.js";
|
|
16
|
-
import { P as F } from "./Popover-
|
|
16
|
+
import { P as F } from "./Popover-Cv7qj8sY.js";
|
|
17
17
|
import "mobx";
|
|
18
|
-
import { u as C } from "./useOverlayController-
|
|
18
|
+
import { u as C } from "./useOverlayController-D8pgx8nV.js";
|
|
19
19
|
import "dot-prop";
|
|
20
|
-
import "./context-
|
|
20
|
+
import "./context-Cf7tqFtF.js";
|
|
21
21
|
import { TunnelProvider as y, TunnelExit as I } from "@mittwald/react-tunnel";
|
|
22
|
-
import { O as B } from "./OverlayContextProvider-
|
|
22
|
+
import { O as B } from "./OverlayContextProvider-xvILXWn5.js";
|
|
23
23
|
const D = "flow--select", L = "flow--select--toggle", u = {
|
|
24
24
|
select: D,
|
|
25
25
|
toggle: L
|
package/dist/Tabs.js
CHANGED
|
@@ -6,7 +6,7 @@ import u from "clsx";
|
|
|
6
6
|
import { TunnelExit as C, TunnelProvider as P, TunnelEntry as f } from "@mittwald/react-tunnel";
|
|
7
7
|
import { f as y } from "./flowComponent-DHPUcYyM.js";
|
|
8
8
|
import { useCallbackRef as O } from "use-callback-ref";
|
|
9
|
-
import { a as S, C as A } from "./ContextMenuTrigger-
|
|
9
|
+
import { a as S, C as A } from "./ContextMenuTrigger-DOCNHDwJ.js";
|
|
10
10
|
import { M as B } from "./MenuItem-DcfYvfPJ.js";
|
|
11
11
|
import { B as K } from "./Button-DQtavSbo.js";
|
|
12
12
|
import "@tabler/icons-react";
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
/* */
|
|
3
|
+
var l = Object.defineProperty;
|
|
4
|
+
var o = (n, e, s) => e in n ? l(n, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : n[e] = s;
|
|
5
|
+
var t = (n, e, s) => o(n, typeof e != "symbol" ? e + "" : e, s);
|
|
6
|
+
import { makeObservable as u, observable as h, action as O } from "mobx";
|
|
7
|
+
import { u as a } from "./useSelector-DpU7_HMO.js";
|
|
8
|
+
import { useRef as c, createContext as p, useContext as C } from "react";
|
|
9
|
+
class i {
|
|
10
|
+
constructor(e) {
|
|
11
|
+
t(this, "isOpen");
|
|
12
|
+
t(this, "onOpen");
|
|
13
|
+
t(this, "onClose");
|
|
14
|
+
u(this, {
|
|
15
|
+
isOpen: h,
|
|
16
|
+
open: O.bound,
|
|
17
|
+
close: O.bound,
|
|
18
|
+
toggle: O.bound,
|
|
19
|
+
setOpen: O.bound
|
|
20
|
+
}), this.isOpen = (e == null ? void 0 : e.isDefaultOpen) ?? !1, this.onOpen = e == null ? void 0 : e.onOpen, this.onClose = e == null ? void 0 : e.onClose;
|
|
21
|
+
}
|
|
22
|
+
static useNew(e) {
|
|
23
|
+
return c(new i(e)).current;
|
|
24
|
+
}
|
|
25
|
+
open() {
|
|
26
|
+
var e;
|
|
27
|
+
this.isOpen = !0, (e = this.onOpen) == null || e.call(this);
|
|
28
|
+
}
|
|
29
|
+
close() {
|
|
30
|
+
var e;
|
|
31
|
+
this.isOpen = !1, (e = this.onClose) == null || e.call(this);
|
|
32
|
+
}
|
|
33
|
+
toggle() {
|
|
34
|
+
var e, s;
|
|
35
|
+
this.isOpen = !this.isOpen, this.isOpen ? (e = this.onOpen) == null || e.call(this) : (s = this.onClose) == null || s.call(this);
|
|
36
|
+
}
|
|
37
|
+
setOpen(e) {
|
|
38
|
+
var s, r;
|
|
39
|
+
this.isOpen = e, e ? (s = this.onOpen) == null || s.call(this) : (r = this.onClose) == null || r.call(this);
|
|
40
|
+
}
|
|
41
|
+
useIsOpen() {
|
|
42
|
+
return a(() => this.isOpen);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
const f = p({}), g = () => C(f);
|
|
46
|
+
export {
|
|
47
|
+
i as O,
|
|
48
|
+
f as o,
|
|
49
|
+
g as u
|
|
50
|
+
};
|
package/dist/controller.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
|
-
import { O as e } from "./context-
|
|
4
|
-
import { u as a } from "./useOverlayController-
|
|
3
|
+
import { O as e } from "./context-Cf7tqFtF.js";
|
|
4
|
+
import { u as a } from "./useOverlayController-D8pgx8nV.js";
|
|
5
5
|
export {
|
|
6
6
|
e as OverlayController,
|
|
7
7
|
a as useOverlayController
|
package/dist/hooks.js
CHANGED
package/dist/react-hook-form.js
CHANGED
|
@@ -8,7 +8,7 @@ import "@react-aria/utils";
|
|
|
8
8
|
import "remeda";
|
|
9
9
|
import { d as E } from "./dynamic-ClpUSmEt.js";
|
|
10
10
|
import { F as P } from "./FieldError-CHN9uCb_.js";
|
|
11
|
-
import { a as g, A as y } from "./Action-
|
|
11
|
+
import { a as g, A as y } from "./Action-Dp_7RavF.js";
|
|
12
12
|
const x = v({}), V = x.Provider, f = () => F(x);
|
|
13
13
|
function I(e) {
|
|
14
14
|
var i;
|
|
@@ -1,7 +1,14 @@
|
|
|
1
|
+
export interface OverlayControllerOptions {
|
|
2
|
+
isDefaultOpen?: boolean;
|
|
3
|
+
onOpen?: () => void;
|
|
4
|
+
onClose?: () => void;
|
|
5
|
+
}
|
|
1
6
|
export declare class OverlayController {
|
|
2
7
|
isOpen: boolean;
|
|
3
|
-
|
|
4
|
-
|
|
8
|
+
onOpen?: () => void;
|
|
9
|
+
onClose?: () => void;
|
|
10
|
+
constructor(options?: OverlayControllerOptions);
|
|
11
|
+
static useNew(options?: OverlayControllerOptions): OverlayController;
|
|
5
12
|
open(): void;
|
|
6
13
|
close(): void;
|
|
7
14
|
toggle(): void;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { OverlayController } from './OverlayController';
|
|
1
|
+
import { OverlayControllerOptions, OverlayController } from './OverlayController';
|
|
2
2
|
import { FlowComponentName } from '../../../components/propTypes';
|
|
3
3
|
|
|
4
|
-
interface Options {
|
|
4
|
+
interface Options extends OverlayControllerOptions {
|
|
5
5
|
reuseControllerFromContext?: boolean;
|
|
6
|
-
defaultOpen?: boolean;
|
|
7
6
|
}
|
|
8
7
|
export declare const useOverlayController: (overlayType: FlowComponentName, opts?: Options) => OverlayController;
|
|
9
8
|
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
/* */
|
|
3
|
+
import { O as C, u as a } from "./context-Cf7tqFtF.js";
|
|
4
|
+
const c = (o, r = {}) => {
|
|
5
|
+
const {
|
|
6
|
+
reuseControllerFromContext: t = !0,
|
|
7
|
+
isDefaultOpen: n,
|
|
8
|
+
onOpen: l,
|
|
9
|
+
onClose: s
|
|
10
|
+
} = r, u = C.useNew({
|
|
11
|
+
isDefaultOpen: n,
|
|
12
|
+
onOpen: l,
|
|
13
|
+
onClose: s
|
|
14
|
+
}), e = a()[o];
|
|
15
|
+
return t && e ? e : u;
|
|
16
|
+
};
|
|
17
|
+
export {
|
|
18
|
+
c as u
|
|
19
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mittwald/flow-react-components",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.208",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A React implementation of Flow, mittwald’s design system",
|
|
6
6
|
"homepage": "https://mittwald.github.io/flow",
|
|
@@ -292,7 +292,7 @@
|
|
|
292
292
|
"dependencies": {
|
|
293
293
|
"@chakra-ui/live-region": "^2.1.0",
|
|
294
294
|
"@internationalized/string-compiler": "^3.2.4",
|
|
295
|
-
"@mittwald/react-tunnel": "^0.1.0-alpha.
|
|
295
|
+
"@mittwald/react-tunnel": "^0.1.0-alpha.208",
|
|
296
296
|
"@mittwald/react-use-promise": "^2.3.13",
|
|
297
297
|
"@react-aria/utils": "^3.25.1",
|
|
298
298
|
"@react-types/shared": "^3.24.1",
|
|
@@ -318,7 +318,7 @@
|
|
|
318
318
|
},
|
|
319
319
|
"devDependencies": {
|
|
320
320
|
"@faker-js/faker": "^8.4.1",
|
|
321
|
-
"@mittwald/flow-design-tokens": "^0.1.0-alpha.
|
|
321
|
+
"@mittwald/flow-design-tokens": "^0.1.0-alpha.208",
|
|
322
322
|
"@mittwald/react-use-promise": "^2.3.13",
|
|
323
323
|
"@nx/storybook": "^19.5.6",
|
|
324
324
|
"@storybook/addon-a11y": "^8.2.7",
|
|
@@ -396,5 +396,5 @@
|
|
|
396
396
|
"optional": true
|
|
397
397
|
}
|
|
398
398
|
},
|
|
399
|
-
"gitHead": "
|
|
399
|
+
"gitHead": "c6d16b35db73c128625321e2df5fc35a13a373e0"
|
|
400
400
|
}
|
package/dist/context-BB3_MApL.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
/* */
|
|
3
|
-
var r = Object.defineProperty;
|
|
4
|
-
var p = (s, e, t) => e in s ? r(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
|
|
5
|
-
var o = (s, e, t) => p(s, typeof e != "symbol" ? e + "" : e, t);
|
|
6
|
-
import { makeObservable as u, observable as a, action as n } from "mobx";
|
|
7
|
-
import { u as O } from "./useSelector-DpU7_HMO.js";
|
|
8
|
-
import { useRef as c, createContext as l, useContext as b } from "react";
|
|
9
|
-
class i {
|
|
10
|
-
constructor(e = !1) {
|
|
11
|
-
o(this, "isOpen");
|
|
12
|
-
u(this, {
|
|
13
|
-
isOpen: a,
|
|
14
|
-
open: n.bound,
|
|
15
|
-
close: n.bound,
|
|
16
|
-
toggle: n.bound,
|
|
17
|
-
setOpen: n.bound
|
|
18
|
-
}), this.isOpen = e;
|
|
19
|
-
}
|
|
20
|
-
static useNew(e) {
|
|
21
|
-
return c(new i(e)).current;
|
|
22
|
-
}
|
|
23
|
-
open() {
|
|
24
|
-
this.isOpen = !0;
|
|
25
|
-
}
|
|
26
|
-
close() {
|
|
27
|
-
this.isOpen = !1;
|
|
28
|
-
}
|
|
29
|
-
toggle() {
|
|
30
|
-
this.isOpen = !this.isOpen;
|
|
31
|
-
}
|
|
32
|
-
setOpen(e) {
|
|
33
|
-
this.isOpen = e;
|
|
34
|
-
}
|
|
35
|
-
useIsOpen() {
|
|
36
|
-
return O(() => this.isOpen);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
const h = l({}), g = () => b(h);
|
|
40
|
-
export {
|
|
41
|
-
i as O,
|
|
42
|
-
h as o,
|
|
43
|
-
g as u
|
|
44
|
-
};
|