@mittwald/flow-react-components 0.1.0-alpha.124 → 0.1.0-alpha.126
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-7EQNT1az.js → Action-BLnSsHE1.js} +86 -70
- package/dist/Action.js +1 -1
- package/dist/CopyButton.js +1 -1
- package/dist/Header-uOS96l33.js +11 -0
- package/dist/Header.js +3 -8
- package/dist/Modal.js +3 -3
- package/dist/OffCanvas.js +22 -17
- package/dist/{Overlay-CUZ1KZa8.js → Overlay-BWA78Wvu.js} +1 -1
- package/dist/OverlayTrigger.js +2 -2
- package/dist/Table.js +40 -0
- package/dist/{context-CEG7VfKL.js → context-D3hdrTHO.js} +1 -1
- package/dist/controller.js +1 -1
- package/dist/hooks.js +10 -3
- package/dist/styles.css +1 -1
- package/dist/types/components/Action/lib/execution/ActionExecution.d.ts +2 -0
- package/dist/types/components/OffCanvas/stories/EdgeCases.stories.d.ts +7 -0
- package/dist/types/components/Table/Table.d.ts +7 -0
- package/dist/types/components/Table/components/TableBody/TableBody.d.ts +7 -0
- package/dist/types/components/Table/components/TableBody/index.d.ts +4 -0
- package/dist/types/components/Table/components/TableCell/TableCell.d.ts +7 -0
- package/dist/types/components/Table/components/TableCell/index.d.ts +4 -0
- package/dist/types/components/Table/components/TableColumn/TableColumn.d.ts +7 -0
- package/dist/types/components/Table/components/TableColumn/index.d.ts +4 -0
- package/dist/types/components/Table/components/TableHeader/TableHeader.d.ts +7 -0
- package/dist/types/components/Table/components/TableHeader/index.d.ts +4 -0
- package/dist/types/components/Table/components/TableRow/TableRow.d.ts +7 -0
- package/dist/types/components/Table/components/TableRow/index.d.ts +4 -0
- package/dist/types/components/Table/index.d.ts +9 -0
- package/dist/types/components/Table/stories/Default.stories.d.ts +7 -0
- package/dist/types/lib/hooks/index.d.ts +1 -0
- package/dist/types/lib/hooks/useOnChange.d.ts +3 -0
- package/dist/{index-BlZLqtIV.js → useOverlayController-CGKumeGL.js} +7 -7
- package/package.json +34 -30
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var l = (t, e, n) => (
|
|
6
|
-
import r, { useEffect as
|
|
7
|
-
import { u as
|
|
3
|
+
var $ = Object.defineProperty;
|
|
4
|
+
var N = (t, e, n) => e in t ? $(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
5
|
+
var l = (t, e, n) => (N(t, typeof e != "symbol" ? e + "" : e, n), n);
|
|
6
|
+
import r, { useEffect as W } from "react";
|
|
7
|
+
import { u as h, a as G, A as L } from "./context-D3hdrTHO.js";
|
|
8
8
|
import "./propsContext-CauylOgH.js";
|
|
9
|
-
import { P as
|
|
9
|
+
import { P as M } from "./PropsContextProvider-ChpH8eF2.js";
|
|
10
10
|
import "@react-aria/utils";
|
|
11
11
|
import "remeda";
|
|
12
|
-
import { W as
|
|
13
|
-
const
|
|
14
|
-
},
|
|
12
|
+
import { W as U } from "./Wrap-DGT1h1o3.js";
|
|
13
|
+
const u = () => {
|
|
14
|
+
}, j = (t, e = {}) => {
|
|
15
15
|
const {
|
|
16
|
-
onSync: n =
|
|
17
|
-
onAsync: o =
|
|
18
|
-
then: s =
|
|
19
|
-
catch: i =
|
|
20
|
-
finally: c =
|
|
16
|
+
onSync: n = u,
|
|
17
|
+
onAsync: o = u,
|
|
18
|
+
then: s = u,
|
|
19
|
+
catch: i = u,
|
|
20
|
+
finally: c = u
|
|
21
21
|
} = e;
|
|
22
22
|
try {
|
|
23
23
|
const a = t();
|
|
@@ -25,12 +25,12 @@ const d = () => {
|
|
|
25
25
|
} catch (a) {
|
|
26
26
|
n(), i(a), c();
|
|
27
27
|
}
|
|
28
|
-
}, P = (t) => new Promise((e) => setTimeout(e, t)),
|
|
28
|
+
}, P = (t) => new Promise((e) => setTimeout(e, t)), x = {
|
|
29
29
|
pending: 1e3,
|
|
30
30
|
succeeded: 1500,
|
|
31
31
|
failed: 2e3
|
|
32
32
|
};
|
|
33
|
-
class
|
|
33
|
+
class q {
|
|
34
34
|
constructor(e, n, o = {}) {
|
|
35
35
|
l(this, "options");
|
|
36
36
|
l(this, "state");
|
|
@@ -41,12 +41,18 @@ class j {
|
|
|
41
41
|
resetAfterDone: s = !0,
|
|
42
42
|
onFeedbackDone: i = () => {
|
|
43
43
|
},
|
|
44
|
-
showFeedback: c = !1
|
|
44
|
+
showFeedback: c = !1,
|
|
45
|
+
resetDelayMs: a = 0
|
|
45
46
|
} = o;
|
|
46
|
-
this.state = e, this.args = n, this.options = {
|
|
47
|
+
this.state = e, this.args = n, this.options = {
|
|
48
|
+
resetAfterDone: s,
|
|
49
|
+
onFeedbackDone: i,
|
|
50
|
+
showFeedback: c,
|
|
51
|
+
resetDelayMs: a
|
|
52
|
+
};
|
|
47
53
|
}
|
|
48
54
|
onAsyncStart() {
|
|
49
|
-
this.options.showFeedback = !0, this.state.updateState("isExecuting"), setTimeout(() => this.startPending(),
|
|
55
|
+
this.options.showFeedback = !0, this.state.updateState("isExecuting"), setTimeout(() => this.startPending(), x.pending);
|
|
50
56
|
}
|
|
51
57
|
onSucceeded() {
|
|
52
58
|
return this.onDone();
|
|
@@ -54,14 +60,19 @@ class j {
|
|
|
54
60
|
async onFailed(e) {
|
|
55
61
|
this.error = e ?? new Error("Unknown error"), console.error(e), await this.onDone();
|
|
56
62
|
}
|
|
63
|
+
setResetDelay(e) {
|
|
64
|
+
this.options.resetDelayMs = e;
|
|
65
|
+
}
|
|
57
66
|
async startFailedFeedback() {
|
|
58
|
-
this.state.updateState("isFailed"), await P(
|
|
67
|
+
this.state.updateState("isFailed"), await P(x.failed), this.resetAfterDone();
|
|
59
68
|
}
|
|
60
69
|
async startSucceededFeedback() {
|
|
61
|
-
this.state.updateState("isSucceeded"), await P(
|
|
70
|
+
this.state.updateState("isSucceeded"), await P(x.succeeded), this.resetAfterDone();
|
|
62
71
|
}
|
|
63
72
|
resetAfterDone() {
|
|
64
|
-
|
|
73
|
+
setTimeout(() => {
|
|
74
|
+
this.options.resetAfterDone && this.state.updateState("isIdle"), this.error || this.options.onFeedbackDone(...this.args);
|
|
75
|
+
}, this.options.resetDelayMs);
|
|
65
76
|
}
|
|
66
77
|
async onDone() {
|
|
67
78
|
this.isDone = !0, this.options.showFeedback ? this.error ? await this.startFailedFeedback() : await this.startSucceededFeedback() : this.resetAfterDone();
|
|
@@ -70,20 +81,20 @@ class j {
|
|
|
70
81
|
this.isDone || this.state.updateState("isPending");
|
|
71
82
|
}
|
|
72
83
|
}
|
|
73
|
-
const
|
|
84
|
+
const v = (t) => (...e) => {
|
|
74
85
|
const n = [...t], o = n.shift();
|
|
75
86
|
if (o) {
|
|
76
|
-
const s = o(...e), i = () => n.length === 0 ? s :
|
|
87
|
+
const s = o(...e), i = () => n.length === 0 ? s : v(n)(...e);
|
|
77
88
|
return s instanceof Promise ? s.then(i) : i();
|
|
78
89
|
}
|
|
79
|
-
},
|
|
80
|
-
},
|
|
90
|
+
}, z = () => {
|
|
91
|
+
}, b = () => {
|
|
81
92
|
var n;
|
|
82
|
-
const t =
|
|
93
|
+
const t = h(), e = t.actionProps.confirm || t.actionProps.abort ? ((n = t.parentContext) == null ? void 0 : n.state) ?? t.state : t.state;
|
|
83
94
|
return {
|
|
84
95
|
state: e,
|
|
85
96
|
execute: async (...o) => {
|
|
86
|
-
var
|
|
97
|
+
var D;
|
|
87
98
|
const {
|
|
88
99
|
actionProps: s,
|
|
89
100
|
confirmationModalController: i,
|
|
@@ -91,50 +102,55 @@ const M = (t) => (...e) => {
|
|
|
91
102
|
parentContext: a
|
|
92
103
|
} = t;
|
|
93
104
|
if (s.abort) {
|
|
94
|
-
(
|
|
105
|
+
(D = a == null ? void 0 : a.confirmationModalController) == null || D.close();
|
|
95
106
|
return;
|
|
96
107
|
}
|
|
97
108
|
if (c && !i.isOpen) {
|
|
98
109
|
i.open();
|
|
99
110
|
return;
|
|
100
111
|
}
|
|
101
|
-
const
|
|
102
|
-
let
|
|
103
|
-
for (;
|
|
112
|
+
const f = new q(e, o, s), A = [];
|
|
113
|
+
let d, p, m = t;
|
|
114
|
+
for (; m; ) {
|
|
104
115
|
const {
|
|
105
116
|
actionProps: C,
|
|
106
|
-
overlayController:
|
|
107
|
-
confirmationModalController:
|
|
108
|
-
needsConfirmation:
|
|
109
|
-
} =
|
|
110
|
-
action:
|
|
111
|
-
toggleOverlay:
|
|
112
|
-
openOverlay:
|
|
113
|
-
closeOverlay:
|
|
114
|
-
break:
|
|
117
|
+
overlayController: B,
|
|
118
|
+
confirmationModalController: E,
|
|
119
|
+
needsConfirmation: R
|
|
120
|
+
} = m, {
|
|
121
|
+
action: S,
|
|
122
|
+
toggleOverlay: g,
|
|
123
|
+
openOverlay: F,
|
|
124
|
+
closeOverlay: w,
|
|
125
|
+
break: T
|
|
115
126
|
} = C;
|
|
116
|
-
if (
|
|
127
|
+
if (T)
|
|
117
128
|
break;
|
|
118
|
-
if (
|
|
119
|
-
if (
|
|
120
|
-
p =
|
|
129
|
+
if (R)
|
|
130
|
+
if (d) {
|
|
131
|
+
p = E;
|
|
121
132
|
break;
|
|
122
133
|
} else
|
|
123
|
-
|
|
124
|
-
const
|
|
134
|
+
d = E;
|
|
135
|
+
const y = (k) => typeof k == "boolean" ? B : k;
|
|
125
136
|
A.push(
|
|
126
|
-
|
|
127
|
-
),
|
|
137
|
+
S || (g ? y(g).toggle : F ? y(F).open : w ? y(w).close : z)
|
|
138
|
+
), m = m.parentContext;
|
|
128
139
|
}
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
140
|
+
const O = v(A);
|
|
141
|
+
f.setResetDelay(
|
|
142
|
+
d ? 500 : 0
|
|
143
|
+
), await j(() => O(o), {
|
|
144
|
+
onAsync: () => f.onAsyncStart(),
|
|
145
|
+
then: async () => {
|
|
146
|
+
await f.onSucceeded(), p && p.open(), d && d.close();
|
|
147
|
+
},
|
|
148
|
+
catch: (C) => f.onFailed(C)
|
|
149
|
+
});
|
|
134
150
|
}
|
|
135
151
|
};
|
|
136
152
|
}, I = (t, e) => {
|
|
137
|
-
const { actionProps: n, needsConfirmation: o } =
|
|
153
|
+
const { actionProps: n, needsConfirmation: o } = h(), s = b(), i = s.state.useState();
|
|
138
154
|
return o ? /* @__PURE__ */ r.createElement(t, { ...e, onPress: s.execute }) : n.abort ? /* @__PURE__ */ r.createElement(
|
|
139
155
|
t,
|
|
140
156
|
{
|
|
@@ -153,8 +169,8 @@ const M = (t) => (...e) => {
|
|
|
153
169
|
isFailed: i === "isFailed"
|
|
154
170
|
}
|
|
155
171
|
);
|
|
156
|
-
},
|
|
157
|
-
const { needsConfirmation: n } =
|
|
172
|
+
}, H = (t, e) => {
|
|
173
|
+
const { needsConfirmation: n } = h(), o = b(), s = o.state.useState();
|
|
158
174
|
return n ? /* @__PURE__ */ r.createElement(t, { ...e, onPress: o.execute }) : /* @__PURE__ */ r.createElement(
|
|
159
175
|
t,
|
|
160
176
|
{
|
|
@@ -163,17 +179,17 @@ const M = (t) => (...e) => {
|
|
|
163
179
|
"aria-disabled": s !== "isIdle"
|
|
164
180
|
}
|
|
165
181
|
);
|
|
166
|
-
},
|
|
182
|
+
}, J = (t, e) => {
|
|
167
183
|
const n = e.color === "secondary", o = e.color === "primary" || e.color === "danger" || e.color === "accent";
|
|
168
184
|
if (!o && !n)
|
|
169
185
|
return /* @__PURE__ */ r.createElement(t, { ...e });
|
|
170
186
|
const s = { Button: { render: I } };
|
|
171
|
-
return /* @__PURE__ */ r.createElement(
|
|
172
|
-
},
|
|
187
|
+
return /* @__PURE__ */ r.createElement(M, { props: s }, /* @__PURE__ */ r.createElement(Q, { abort: n, confirm: o }, /* @__PURE__ */ r.createElement(t, { ...e })));
|
|
188
|
+
}, K = (t, e) => {
|
|
173
189
|
if (e.slot !== "actionConfirm")
|
|
174
190
|
return /* @__PURE__ */ r.createElement(t, { ...e });
|
|
175
|
-
const n =
|
|
176
|
-
|
|
191
|
+
const n = h(), o = b().state.useState();
|
|
192
|
+
W(() => (n.needsConfirmation = !0, () => {
|
|
177
193
|
n.needsConfirmation = !1;
|
|
178
194
|
}), [n]);
|
|
179
195
|
const s = o === "isIdle" ? e.isDismissable : !1;
|
|
@@ -185,13 +201,13 @@ const M = (t) => (...e) => {
|
|
|
185
201
|
isDismissable: s
|
|
186
202
|
}
|
|
187
203
|
);
|
|
188
|
-
},
|
|
189
|
-
const { children: e, ...n } = t, o =
|
|
204
|
+
}, Q = (t) => {
|
|
205
|
+
const { children: e, ...n } = t, o = G(n), s = !!o.parentContext && !!o.parentContext.parentContext, i = {
|
|
190
206
|
Modal: {
|
|
191
|
-
render:
|
|
207
|
+
render: K,
|
|
192
208
|
ButtonGroup: {
|
|
193
209
|
Button: {
|
|
194
|
-
render:
|
|
210
|
+
render: J
|
|
195
211
|
}
|
|
196
212
|
}
|
|
197
213
|
},
|
|
@@ -199,11 +215,11 @@ const M = (t) => (...e) => {
|
|
|
199
215
|
render: I
|
|
200
216
|
},
|
|
201
217
|
Link: {
|
|
202
|
-
render:
|
|
218
|
+
render: H
|
|
203
219
|
}
|
|
204
220
|
};
|
|
205
|
-
return /* @__PURE__ */ r.createElement(
|
|
206
|
-
|
|
221
|
+
return /* @__PURE__ */ r.createElement(L, { value: o }, /* @__PURE__ */ r.createElement(U, { if: !s }, /* @__PURE__ */ r.createElement(
|
|
222
|
+
M,
|
|
207
223
|
{
|
|
208
224
|
props: i,
|
|
209
225
|
dependencies: [o],
|
|
@@ -213,5 +229,5 @@ const M = (t) => (...e) => {
|
|
|
213
229
|
)));
|
|
214
230
|
};
|
|
215
231
|
export {
|
|
216
|
-
|
|
232
|
+
Q as A
|
|
217
233
|
};
|
package/dist/Action.js
CHANGED
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 C } from "./flowComponent-Cv_SURLH.js";
|
|
18
|
-
import { A as E } from "./Action-
|
|
18
|
+
import { A as E } from "./Action-BLnSsHE1.js";
|
|
19
19
|
const B = {
|
|
20
20
|
"de-DE": {
|
|
21
21
|
"copyButton.copy": "Kopieren"
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
/* */
|
|
3
|
+
import a from "react";
|
|
4
|
+
import { f as c } from "./flowComponent-Cv_SURLH.js";
|
|
5
|
+
const s = c("Header", (e) => {
|
|
6
|
+
const { children: r, refProp: t, elementType: o = "header", ...n } = e, m = o;
|
|
7
|
+
return /* @__PURE__ */ a.createElement(m, { ...n, ref: t }, r);
|
|
8
|
+
});
|
|
9
|
+
export {
|
|
10
|
+
s as H
|
|
11
|
+
};
|
package/dist/Header.js
CHANGED
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
|
-
import
|
|
4
|
-
import { f } from "./flowComponent-Cv_SURLH.js";
|
|
5
|
-
const p = f("Header", (e) => {
|
|
6
|
-
const { children: r, refProp: t, elementType: o = "header", ...n } = e, a = o;
|
|
7
|
-
return /* @__PURE__ */ m.createElement(a, { ...n, ref: t }, r);
|
|
8
|
-
});
|
|
3
|
+
import { H as e } from "./Header-uOS96l33.js";
|
|
9
4
|
export {
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
e as Header,
|
|
6
|
+
e as default
|
|
12
7
|
};
|
package/dist/Modal.js
CHANGED
|
@@ -8,10 +8,10 @@ import "@react-aria/utils";
|
|
|
8
8
|
import "remeda";
|
|
9
9
|
import { TunnelProvider as p, TunnelExit as c } from "@mittwald/react-tunnel";
|
|
10
10
|
import { f as u } from "./flowComponent-Cv_SURLH.js";
|
|
11
|
-
import { O as w } from "./Overlay-
|
|
11
|
+
import { O as w } from "./Overlay-BWA78Wvu.js";
|
|
12
12
|
import "mobx";
|
|
13
|
-
import "./
|
|
14
|
-
import "./context-
|
|
13
|
+
import "./useOverlayController-CGKumeGL.js";
|
|
14
|
+
import "./context-D3hdrTHO.js";
|
|
15
15
|
const v = "flow--modal", z = "flow--modal--button-group", C = "flow--modal--content", b = "flow--modal--off-canvas", t = {
|
|
16
16
|
modal: v,
|
|
17
17
|
"modal-zoom": "flow--modal--modal-zoom",
|
package/dist/OffCanvas.js
CHANGED
|
@@ -1,42 +1,47 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
|
-
import
|
|
3
|
+
import e from "react";
|
|
4
4
|
import c from "clsx";
|
|
5
5
|
import { B as f } from "./Button-tEtjVHFC.js";
|
|
6
6
|
import "@tabler/icons-react";
|
|
7
7
|
import "./Icon-DXq5lwp4.js";
|
|
8
8
|
import { I as m } from "./IconClose-BuJDcvk1.js";
|
|
9
|
-
import { A as i } from "./Action-
|
|
10
|
-
import { O as p } from "./Overlay-
|
|
9
|
+
import { A as i } from "./Action-BLnSsHE1.js";
|
|
10
|
+
import { O as p } from "./Overlay-BWA78Wvu.js";
|
|
11
11
|
import "mobx";
|
|
12
|
-
import "./
|
|
12
|
+
import "./useOverlayController-CGKumeGL.js";
|
|
13
13
|
import "./propsContext-CauylOgH.js";
|
|
14
14
|
import { P as v } from "./PropsContextProvider-ChpH8eF2.js";
|
|
15
15
|
import "@react-aria/utils";
|
|
16
16
|
import "remeda";
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
import { TunnelProvider as d, TunnelExit as u } from "@mittwald/react-tunnel";
|
|
18
|
+
import { H as E } from "./Header-uOS96l33.js";
|
|
19
|
+
const C = "flow--off-canvas", h = "flow--off-canvas--header", w = "flow--off-canvas--close-button", o = {
|
|
20
|
+
offCanvas: C,
|
|
19
21
|
"off-canvas-slide-in": "flow--off-canvas--off-canvas-slide-in",
|
|
20
22
|
"off-canvas-slide-out": "flow--off-canvas--off-canvas-slide-out",
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
header: h,
|
|
24
|
+
closeButton: w
|
|
25
|
+
}, q = (t) => {
|
|
26
|
+
const { controller: a, children: r, className: n } = t, s = c(o.offCanvas, n), l = {
|
|
24
27
|
Heading: {
|
|
25
|
-
slot: "title"
|
|
28
|
+
slot: "title",
|
|
29
|
+
tunnelId: "heading",
|
|
30
|
+
levelVisual: 4,
|
|
31
|
+
level: 2
|
|
26
32
|
}
|
|
27
33
|
};
|
|
28
|
-
return /* @__PURE__ */
|
|
34
|
+
return /* @__PURE__ */ e.createElement(p, { controller: a, className: s }, /* @__PURE__ */ e.createElement(v, { props: l }, /* @__PURE__ */ e.createElement(d, null, /* @__PURE__ */ e.createElement(E, { className: o.header }, /* @__PURE__ */ e.createElement(u, { id: "heading" }), /* @__PURE__ */ e.createElement(i, { closeOverlay: !0 }, /* @__PURE__ */ e.createElement(
|
|
29
35
|
f,
|
|
30
36
|
{
|
|
31
37
|
variant: "plain",
|
|
32
|
-
size: "s",
|
|
33
38
|
color: "secondary",
|
|
34
|
-
className:
|
|
39
|
+
className: o.closeButton
|
|
35
40
|
},
|
|
36
|
-
/* @__PURE__ */
|
|
37
|
-
)),
|
|
41
|
+
/* @__PURE__ */ e.createElement(m, null)
|
|
42
|
+
))), r)));
|
|
38
43
|
};
|
|
39
44
|
export {
|
|
40
|
-
|
|
41
|
-
|
|
45
|
+
q as OffCanvas,
|
|
46
|
+
q as default
|
|
42
47
|
};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import * as r from "react-aria-components";
|
|
4
4
|
import e from "react";
|
|
5
5
|
import y from "clsx";
|
|
6
|
-
import { u as p, a as u } from "./
|
|
6
|
+
import { u as p, a as u } from "./useOverlayController-CGKumeGL.js";
|
|
7
7
|
import "mobx";
|
|
8
8
|
const O = "flow--overlay", f = {
|
|
9
9
|
overlay: O,
|
package/dist/OverlayTrigger.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
/* */
|
|
3
3
|
import r from "react";
|
|
4
4
|
import "mobx";
|
|
5
|
-
import { u as l, a as m } from "./
|
|
6
|
-
import { A as p } from "./Action-
|
|
5
|
+
import { u as l, a as m } from "./useOverlayController-CGKumeGL.js";
|
|
6
|
+
import { A as p } from "./Action-BLnSsHE1.js";
|
|
7
7
|
import "./propsContext-CauylOgH.js";
|
|
8
8
|
import { P as i } from "./PropsContextProvider-ChpH8eF2.js";
|
|
9
9
|
import "@react-aria/utils";
|
package/dist/Table.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
/* */
|
|
3
|
+
import o from "react";
|
|
4
|
+
import * as n from "react-aria-components";
|
|
5
|
+
import r from "clsx";
|
|
6
|
+
const m = "flow--table--table-container", b = "flow--table", d = "flow--table--header", N = "flow--table--body", i = "flow--table--cell", u = "flow--table--column", c = {
|
|
7
|
+
tableContainer: m,
|
|
8
|
+
table: b,
|
|
9
|
+
header: d,
|
|
10
|
+
body: N,
|
|
11
|
+
cell: i,
|
|
12
|
+
column: u
|
|
13
|
+
}, h = (e) => {
|
|
14
|
+
const { children: a, className: t, ...l } = e, s = r(c.table, t);
|
|
15
|
+
return /* @__PURE__ */ o.createElement("div", { className: c.tableContainer }, /* @__PURE__ */ o.createElement(n.Table, { className: s, ...l }, a));
|
|
16
|
+
}, w = (e) => {
|
|
17
|
+
const { children: a, className: t, ...l } = e, s = r(c.body, t);
|
|
18
|
+
return /* @__PURE__ */ o.createElement(n.TableBody, { className: s, ...l }, a);
|
|
19
|
+
}, T = (e) => {
|
|
20
|
+
const { children: a, className: t, ...l } = e, s = r(c.cell, t);
|
|
21
|
+
return /* @__PURE__ */ o.createElement(n.Cell, { className: s, ...l }, a);
|
|
22
|
+
}, y = (e) => {
|
|
23
|
+
const { children: a, className: t, ...l } = e, s = r(c.column, t);
|
|
24
|
+
return /* @__PURE__ */ o.createElement(n.Column, { isRowHeader: !0, className: s, ...l }, a);
|
|
25
|
+
}, E = (e) => {
|
|
26
|
+
const { children: a, className: t, ...l } = e, s = r(c.header, t);
|
|
27
|
+
return /* @__PURE__ */ o.createElement(n.TableHeader, { className: s, ...l }, a);
|
|
28
|
+
}, p = (e) => {
|
|
29
|
+
const { children: a, className: t, ...l } = e, s = r(c.row, t);
|
|
30
|
+
return /* @__PURE__ */ o.createElement(n.Row, { className: s, ...l }, a);
|
|
31
|
+
};
|
|
32
|
+
export {
|
|
33
|
+
h as Table,
|
|
34
|
+
w as TableBody,
|
|
35
|
+
T as TableCell,
|
|
36
|
+
y as TableColumn,
|
|
37
|
+
E as TableHeader,
|
|
38
|
+
p as TableRow,
|
|
39
|
+
h as default
|
|
40
|
+
};
|
|
@@ -4,7 +4,7 @@ var u = Object.defineProperty;
|
|
|
4
4
|
var m = (e, t, o) => t in e ? u(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o;
|
|
5
5
|
var a = (e, t, o) => (m(e, typeof t != "symbol" ? t + "" : t, o), o);
|
|
6
6
|
import { useRef as C, createContext as f, useMemo as d, useContext as p } from "react";
|
|
7
|
-
import { O as i, u as l } from "./
|
|
7
|
+
import { O as i, u as l } from "./useOverlayController-CGKumeGL.js";
|
|
8
8
|
import { makeObservable as v, observable as x, action as w } from "mobx";
|
|
9
9
|
import { u as b } from "./useSelector-DpU7_HMO.js";
|
|
10
10
|
class r {
|
package/dist/controller.js
CHANGED
package/dist/hooks.js
CHANGED
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
3
|
import "mobx";
|
|
4
|
-
import "react";
|
|
5
|
-
import { u as
|
|
4
|
+
import { useRef as n, useEffect as s } from "react";
|
|
5
|
+
import { u as i } from "./useOverlayController-CGKumeGL.js";
|
|
6
|
+
const m = (r, e, t = []) => {
|
|
7
|
+
const o = n(r);
|
|
8
|
+
s(() => {
|
|
9
|
+
o.current !== r && e(), o.current = r;
|
|
10
|
+
}, [r, e, ...t]);
|
|
11
|
+
};
|
|
6
12
|
export {
|
|
7
|
-
|
|
13
|
+
m as useOnChange,
|
|
14
|
+
i as useOverlayController
|
|
8
15
|
};
|