@mittwald/flow-react-components 0.1.0-alpha.232 → 0.1.0-alpha.234
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/CheckboxGroup.js +1 -1
- package/dist/ColumnLayout-Bvw578tz.js +33 -0
- package/dist/ColumnLayout.js +1 -1
- package/dist/List.js +1 -1
- package/dist/RadioGroup.js +1 -1
- package/dist/{SettingsProvider-CiU-3ZFI.js → SettingsProvider-D2-kWC3S.js} +26 -29
- package/dist/SettingsProvider.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/types/components/ColumnLayout/ColumnLayout.d.ts +4 -0
- package/dist/types/components/ColumnLayout/stories/Default.stories.d.ts +1 -0
- package/package.json +4 -4
- package/dist/ColumnLayout-FMONjI17.js +0 -22
package/dist/CheckboxGroup.js
CHANGED
|
@@ -11,7 +11,7 @@ import { F as E } from "./FieldError-CEquAsls.js";
|
|
|
11
11
|
import { C as k } from "./CheckboxButton-CXdHPBrd.js";
|
|
12
12
|
import { TunnelProvider as C, TunnelExit as r } from "@mittwald/react-tunnel";
|
|
13
13
|
import { s as o } from "./FormField.module-DHK6nIcD.js";
|
|
14
|
-
import { C as N } from "./ColumnLayout-
|
|
14
|
+
import { C as N } from "./ColumnLayout-Bvw578tz.js";
|
|
15
15
|
import { d as F } from "./deepFindOfType-6pG0fH7S.js";
|
|
16
16
|
import { f as G } from "./flowComponent-DT1Ap-ot.js";
|
|
17
17
|
const P = "flow--checkbox-group", s = {
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
/* */
|
|
3
|
+
import e from "react";
|
|
4
|
+
import g from "clsx";
|
|
5
|
+
const d = "flow--column-layout--column-layout-container", v = "flow--column-layout", y = {
|
|
6
|
+
columnLayoutContainer: d,
|
|
7
|
+
columnLayout: v
|
|
8
|
+
}, a = (o) => {
|
|
9
|
+
if (o.length < 1)
|
|
10
|
+
throw new Error("Column layout array is empty");
|
|
11
|
+
return o.map((l) => `${l}fr`).join(" ");
|
|
12
|
+
}, h = (o) => {
|
|
13
|
+
const {
|
|
14
|
+
children: u,
|
|
15
|
+
className: l,
|
|
16
|
+
s: n,
|
|
17
|
+
m: t,
|
|
18
|
+
l: c,
|
|
19
|
+
gap: m = "m",
|
|
20
|
+
rowGap: i = m,
|
|
21
|
+
columnGap: p = m
|
|
22
|
+
} = o, s = n ? a(n) : void 0, r = t ? a(t) : n ? s : void 0, f = c ? a(c) : t || n ? r : void 0, C = {
|
|
23
|
+
"--column-layout--columns-s": s,
|
|
24
|
+
"--column-layout--columns-m": r,
|
|
25
|
+
"--column-layout--columns-l": f,
|
|
26
|
+
"--column-layout--row-gap": `var(--column-layout--gap--${i})`,
|
|
27
|
+
"--column-layout--column-gap": `var(--column-layout--gap--${p})`
|
|
28
|
+
}, L = g(y.columnLayoutContainer, l);
|
|
29
|
+
return /* @__PURE__ */ e.createElement("div", { className: L, style: C }, /* @__PURE__ */ e.createElement("div", { className: y.columnLayout }, u));
|
|
30
|
+
};
|
|
31
|
+
export {
|
|
32
|
+
h as C
|
|
33
|
+
};
|
package/dist/ColumnLayout.js
CHANGED
package/dist/List.js
CHANGED
|
@@ -40,7 +40,7 @@ import { useReactTable as Se, getCoreRowModel as ve, getSortedRowModel as ye, ge
|
|
|
40
40
|
import vt from "invariant";
|
|
41
41
|
import { getAsyncResource as mt } from "@mittwald/react-use-promise";
|
|
42
42
|
import { u as ht } from "./useSelector-DpU7_HMO.js";
|
|
43
|
-
import { u as Te } from "./SettingsProvider-
|
|
43
|
+
import { u as Te } from "./SettingsProvider-D2-kWC3S.js";
|
|
44
44
|
import * as W from "react-aria-components";
|
|
45
45
|
import { S as A } from "./SkeletonText-B5ZghZhO.js";
|
|
46
46
|
import { I as Ce } from "./IllustratedMessage-B3MHD01M.js";
|
package/dist/RadioGroup.js
CHANGED
|
@@ -9,7 +9,7 @@ import "@react-aria/utils";
|
|
|
9
9
|
import "remeda";
|
|
10
10
|
import { d as h } from "./dynamic-ClpUSmEt.js";
|
|
11
11
|
import { F as B } from "./FieldError-CEquAsls.js";
|
|
12
|
-
import { C as I } from "./ColumnLayout-
|
|
12
|
+
import { C as I } from "./ColumnLayout-Bvw578tz.js";
|
|
13
13
|
import { TunnelProvider as P, TunnelExit as m } from "@mittwald/react-tunnel";
|
|
14
14
|
import { s as c } from "./FormField.module-DHK6nIcD.js";
|
|
15
15
|
import { d as y } from "./deepFindOfType-6pG0fH7S.js";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var c = (s, t, e) =>
|
|
6
|
-
import
|
|
7
|
-
import { makeAutoObservable as
|
|
8
|
-
import {
|
|
9
|
-
import { mapValues as
|
|
3
|
+
var d = Object.defineProperty;
|
|
4
|
+
var w = (s, t, e) => t in s ? d(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
|
|
5
|
+
var c = (s, t, e) => w(s, typeof t != "symbol" ? t + "" : t, e);
|
|
6
|
+
import y, { createContext as J, useRef as v, useMemo as O, useEffect as K, useContext as b } from "react";
|
|
7
|
+
import { makeAutoObservable as l, ObservableMap as a, autorun as x } from "mobx";
|
|
8
|
+
import { getAsyncResource as A } from "@mittwald/react-use-promise";
|
|
9
|
+
import { mapValues as E } from "remeda";
|
|
10
10
|
class i {
|
|
11
11
|
constructor(t = new a()) {
|
|
12
12
|
c(this, "settings");
|
|
13
|
-
this.settings = t,
|
|
13
|
+
this.settings = t, l(this);
|
|
14
14
|
}
|
|
15
15
|
set(t, e, n) {
|
|
16
16
|
this.settings.set(t, e.parse(n));
|
|
@@ -31,7 +31,7 @@ class i {
|
|
|
31
31
|
class g {
|
|
32
32
|
constructor(t = new a()) {
|
|
33
33
|
c(this, "componentSettings");
|
|
34
|
-
this.componentSettings = t,
|
|
34
|
+
this.componentSettings = t, l(this);
|
|
35
35
|
}
|
|
36
36
|
set(t, e, n, o) {
|
|
37
37
|
const r = this.componentSettings.get(t) ?? new i();
|
|
@@ -53,11 +53,11 @@ class g {
|
|
|
53
53
|
);
|
|
54
54
|
}
|
|
55
55
|
static fromJson(t) {
|
|
56
|
-
const e =
|
|
56
|
+
const e = E(t, (n) => i.fromJson(n));
|
|
57
57
|
return new g(new a(e));
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
class
|
|
60
|
+
class P {
|
|
61
61
|
constructor(t) {
|
|
62
62
|
c(this, "storageKey");
|
|
63
63
|
this.storageKey = t;
|
|
@@ -70,32 +70,29 @@ class x {
|
|
|
70
70
|
localStorage.setItem(this.storageKey, JSON.stringify(t));
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
const
|
|
73
|
+
const R = (s) => {
|
|
74
74
|
switch (s.type) {
|
|
75
75
|
case "custom":
|
|
76
76
|
return s.store;
|
|
77
77
|
case "localStorage":
|
|
78
|
-
return new
|
|
78
|
+
return new P(s.storageKey);
|
|
79
79
|
}
|
|
80
80
|
throw new Error(`Unsupported setting backend: ${s}`);
|
|
81
|
-
},
|
|
82
|
-
const { children: t, id: e, ...n } = s, o =
|
|
81
|
+
}, S = J(void 0), M = () => b(S), N = (s) => {
|
|
82
|
+
const { children: t, id: e, ...n } = s, o = R(n), r = A(() => o.load(), [], {
|
|
83
83
|
loaderId: e
|
|
84
|
-
}), u =
|
|
85
|
-
() => g.fromJson(
|
|
84
|
+
}), h = r.use(), u = v(Promise.resolve()), m = O(
|
|
85
|
+
() => g.fromJson(h),
|
|
86
86
|
[e]
|
|
87
|
-
)
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
}),
|
|
95
|
-
[e]
|
|
96
|
-
), /* @__PURE__ */ d.createElement(l.Provider, { value: u }, t);
|
|
87
|
+
), p = () => {
|
|
88
|
+
const f = m.asJson;
|
|
89
|
+
u.current = u.current.then(async () => {
|
|
90
|
+
await o.store(f), r.refresh();
|
|
91
|
+
});
|
|
92
|
+
};
|
|
93
|
+
return K(() => x(p), [e]), /* @__PURE__ */ y.createElement(S.Provider, { value: m }, t);
|
|
97
94
|
};
|
|
98
95
|
export {
|
|
99
|
-
|
|
100
|
-
|
|
96
|
+
N as S,
|
|
97
|
+
M as u
|
|
101
98
|
};
|