@mittwald/flow-react-components 0.1.0-alpha.130 → 0.1.0-alpha.132
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/{Accordion-DCF5pndY.js → Accordion-C0i7OVyG.js} +5 -5
- package/dist/Accordion.js +1 -1
- package/dist/{Action-BEj0DaMW.js → Action-COYULIMl.js} +88 -102
- package/dist/Action.js +1 -1
- package/dist/ActionGroup.js +38 -0
- package/dist/ActionStateContext-C_nPivaA.js +55 -0
- package/dist/Avatar.js +4 -4
- package/dist/Breadcrumb.js +4 -4
- package/dist/{Button-ugpFrd4i.js → Button-DmFXEX6m.js} +24 -24
- package/dist/Button.js +1 -1
- package/dist/{Checkbox-CNXEDjTP.js → Checkbox-D4IUwOOm.js} +6 -6
- package/dist/Checkbox.js +1 -1
- package/dist/{CheckboxButton-DbL1oHMJ.js → CheckboxButton-Cw_cTFPz.js} +5 -5
- package/dist/CheckboxButton.js +1 -1
- package/dist/CheckboxGroup.js +5 -5
- package/dist/{ClearPropsContext-CeCMjUK9.js → ClearPropsContext-mes1t7Bj.js} +1 -1
- package/dist/ComponentRenderContextProvider-C-1_ziLI.js +29 -0
- package/dist/{Content-DLTJiHxq.js → Content-Cq-QSozP.js} +3 -3
- package/dist/Content.js +1 -1
- package/dist/ContextMenu.js +3 -3
- package/dist/{ContextMenuTrigger-XhsauPpO.js → ContextMenuTrigger-ChPmQMpO.js} +17 -16
- package/dist/CopyButton.js +7 -7
- package/dist/CounterBadge.js +18 -0
- package/dist/FieldDescription.js +4 -4
- package/dist/{FieldError-CWapn667.js → FieldError-hYSngYTh.js} +5 -5
- package/dist/FieldError.js +1 -1
- package/dist/{Header-Z2hdgqM8.js → Header-BPe0FNKy.js} +1 -1
- package/dist/Header.js +1 -1
- package/dist/HeaderNavigation.js +2 -2
- package/dist/{Heading-D5RPXOtd.js → Heading-0KJIjlox.js} +4 -4
- package/dist/Heading.js +1 -1
- package/dist/{Icon-Ci5H-KV6.js → Icon-DeN4Y_a0.js} +3 -3
- package/dist/Icon.js +1 -1
- package/dist/{IconCheck-CdIR25HV.js → IconCheck-Dt46vtrJ.js} +1 -1
- package/dist/{IconCheckboxEmpty-DRE2wDH8.js → IconCheckboxEmpty-DdLa3K6h.js} +1 -1
- package/dist/{IconCheckboxIndeterminate-DYTHmZFh.js → IconCheckboxIndeterminate-DZubWEXp.js} +1 -1
- package/dist/{IconChevronDown-BP41wlBT.js → IconChevronDown-DxftprRQ.js} +1 -1
- package/dist/{IconChevronRight-l6sW9wTt.js → IconChevronRight-BmNGIbWG.js} +1 -1
- package/dist/{IconClose-DVP_Qv8m.js → IconClose-CVvBI6H7.js} +1 -1
- package/dist/{IconContextMenu-BUgHqW4W.js → IconContextMenu-BZ6cD-An.js} +1 -1
- package/dist/{IconCopy-ClDyyDhZ.js → IconCopy-DCChJuYP.js} +1 -1
- package/dist/{IconDanger-DQIxRASm.js → IconDanger-l4_b7cTo.js} +1 -1
- package/dist/{IconPending-J_m_dK-r.js → IconPending-VHfFhE2m.js} +1 -1
- package/dist/{IconPlus-Cn3XtbZt.js → IconPlus-jiiIPCCu.js} +1 -1
- package/dist/{IconRadioOn-DbtcS_u-.js → IconRadioOn-BQq4Iu7w.js} +1 -1
- package/dist/{IconSearch-BIeg2srW.js → IconSearch-BxE5ZQFN.js} +1 -1
- package/dist/{IconSucceeded-Bp1dZJsK.js → IconSucceeded-LyvLqe_3.js} +1 -1
- package/dist/{IconWarning-CtOquJNo.js → IconWarning-CbxAYuzB.js} +1 -1
- package/dist/Icons.js +16 -16
- package/dist/{IllustratedMessage-BUg2-svi.js → IllustratedMessage-D07W9uSy.js} +2 -2
- package/dist/IllustratedMessage.js +1 -1
- package/dist/Image.js +3 -3
- package/dist/Initials.js +3 -3
- package/dist/InlineAlert.js +5 -5
- package/dist/{InlineCode-BV2i5uN0.js → InlineCode-Sk5wfXAE.js} +2 -2
- package/dist/InlineCode.js +1 -1
- package/dist/{Label-DK2NrCvH.js → Label-Cy_UxX3Y.js} +3 -3
- package/dist/Label.js +1 -1
- package/dist/LabeledValue.js +3 -3
- package/dist/LayoutCard.js +3 -3
- package/dist/{Link-D3Rqb37I.js → Link-B1BFyDl1.js} +4 -4
- package/dist/Link.js +1 -1
- package/dist/List.js +27 -25
- package/dist/{LoadingSpinner-zDn2j40q.js → LoadingSpinner-DSpuNOHM.js} +2 -2
- package/dist/LoadingSpinner.js +1 -1
- package/dist/{MenuItem-ctUBEtsb.js → MenuItem-BKaeRvx3.js} +7 -7
- package/dist/MenuItem.js +1 -1
- package/dist/Modal.js +19 -19
- package/dist/{ModalOverlay-avQVl0sO.js → ModalOverlay-BSu4UEnW.js} +1 -1
- package/dist/Navigation.js +15 -15
- package/dist/NumberField.js +9 -9
- package/dist/OffCanvas.js +9 -9
- package/dist/{OverlayTrigger-CLH4ywV9.js → OverlayTrigger-Bb8cs_IA.js} +4 -4
- package/dist/{Popover-9mCGBlbH.js → Popover-B-COTLld.js} +1 -1
- package/dist/ProgressBar.js +2 -2
- package/dist/PropsContextProvider-B7e3QrmR.js +64 -0
- package/dist/RadioGroup.js +8 -8
- package/dist/Section.js +3 -3
- package/dist/Select.js +15 -14
- package/dist/StatusBadge.js +5 -5
- package/dist/{StatusIcon-ONng__8h.js → StatusIcon-DKPrtG-X.js} +5 -5
- package/dist/StatusIcon.js +1 -1
- package/dist/Switch.js +7 -7
- package/dist/Tabs.js +9 -9
- package/dist/{Text-XD87outZ.js → Text-DlffGRII.js} +4 -4
- package/dist/Text.js +1 -1
- package/dist/TextArea.js +4 -4
- package/dist/TextField.js +4 -4
- package/dist/{TextFieldBase-CPkNBe7W.js → TextFieldBase-CQ8ddfp_.js} +4 -4
- package/dist/context-D_-mRqs8.js +8 -0
- package/dist/controller.js +1 -1
- package/dist/flowComponent-DahHhlnC.js +125 -0
- package/dist/getActionGroupSlot-B4Vu4Kix.js +9 -0
- package/dist/hooks.js +1 -1
- package/dist/react-hook-form.js +3 -3
- package/dist/styles.css +1 -1
- package/dist/types/components/Action/components/ActionComponentsRenderContext.d.ts +3 -0
- package/dist/types/components/Action/components/{ConfirmationModalButton.d.ts → ModalActionButton.d.ts} +1 -1
- package/dist/types/components/ActionGroup/ActionGroup.d.ts +8 -0
- package/dist/types/components/ActionGroup/index.d.ts +4 -0
- package/dist/types/components/ActionGroup/lib/getActionGroupSlot.d.ts +3 -0
- package/dist/types/components/ActionGroup/stories/Default.stories.d.ts +12 -0
- package/dist/types/components/Button/Button.d.ts +1 -0
- package/dist/types/components/CounterBadge/CounterBadge.d.ts +9 -0
- package/dist/types/components/CounterBadge/index.d.ts +4 -0
- package/dist/types/components/{CounterLabel → CounterBadge}/stories/Default.stories.d.ts +3 -3
- package/dist/types/components/propTypes/index.d.ts +4 -4
- package/dist/types/lib/propsContext/propsContext.d.ts +42 -2
- package/dist/types/lib/propsContext/render/ComponentRenderContextProvider.d.ts +18 -0
- package/dist/types/lib/propsContext/render/useComponentRenderFn.d.ts +8 -0
- package/dist/useOverlayController-CGKumeGL.js +49 -0
- package/dist/useSelector-DpU7_HMO.js +13 -0
- package/package.json +38 -38
- package/dist/ActionStateContext-DgYU9Rnp.js +0 -55
- package/dist/ButtonGroup.js +0 -33
- package/dist/CounterLabel.js +0 -18
- package/dist/PropsContextProvider-ChpH8eF2.js +0 -81
- package/dist/flowComponent-bouya_QZ.js +0 -119
- package/dist/propsContext-CauylOgH.js +0 -8
- package/dist/types/components/Action/components/ActionGroup.d.ts +0 -4
- package/dist/types/components/ButtonGroup/ButtonGroup.d.ts +0 -8
- package/dist/types/components/ButtonGroup/index.d.ts +0 -4
- package/dist/types/components/ButtonGroup/stories/Default.stories.d.ts +0 -11
- package/dist/types/components/CounterLabel/CounterLabel.d.ts +0 -9
- package/dist/types/components/CounterLabel/index.d.ts +0 -4
- package/dist/useOverlayController-CwlTOKoP.js +0 -55
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
/* */
|
|
3
3
|
import e, { useState as E, useId as a } from "react";
|
|
4
4
|
import I from "clsx";
|
|
5
|
-
import "./
|
|
6
|
-
import { P as N } from "./PropsContextProvider-
|
|
5
|
+
import "./ComponentRenderContextProvider-C-1_ziLI.js";
|
|
6
|
+
import { P as N } from "./PropsContextProvider-B7e3QrmR.js";
|
|
7
7
|
import "@react-aria/utils";
|
|
8
8
|
import "remeda";
|
|
9
9
|
import { d } from "./dynamic-ClpUSmEt.js";
|
|
10
|
-
import { B as w } from "./Button-
|
|
10
|
+
import { B as w } from "./Button-DmFXEX6m.js";
|
|
11
11
|
import "@tabler/icons-react";
|
|
12
|
-
import "./Icon-
|
|
13
|
-
import { I as y } from "./IconChevronDown-
|
|
12
|
+
import "./Icon-DeN4Y_a0.js";
|
|
13
|
+
import { I as y } from "./IconChevronDown-DxftprRQ.js";
|
|
14
14
|
import { TunnelProvider as B, TunnelExit as C } from "@mittwald/react-tunnel";
|
|
15
15
|
import { A as P } from "./Activity-CmfZpgOM.js";
|
|
16
16
|
const A = "flow--accordion", b = "flow--accordion--header", g = "flow--accordion--header-button", D = "flow--accordion--content", T = "flow--accordion--content-inner", H = "flow--accordion--chevron", L = "flow--accordion--expanded", n = {
|
package/dist/Accordion.js
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
import
|
|
7
|
-
import { makeObservable as k, observable as
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import "./
|
|
12
|
-
import {
|
|
3
|
+
var P = Object.defineProperty;
|
|
4
|
+
var F = (o, t, e) => t in o ? P(o, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[t] = e;
|
|
5
|
+
var r = (o, t, e) => (F(o, typeof t != "symbol" ? t + "" : t, e), e);
|
|
6
|
+
import a, { useRef as S, useContext as p } from "react";
|
|
7
|
+
import { makeObservable as k, observable as B, action as O, computed as I } from "mobx";
|
|
8
|
+
import { u as A } from "./useOverlayController-CGKumeGL.js";
|
|
9
|
+
import M from "invariant";
|
|
10
|
+
import { a as C, A as x } from "./context-D_-mRqs8.js";
|
|
11
|
+
import { u as y } from "./useSelector-DpU7_HMO.js";
|
|
12
|
+
import { a as D, u as T } from "./ActionStateContext-C_nPivaA.js";
|
|
13
|
+
import "./ComponentRenderContextProvider-C-1_ziLI.js";
|
|
14
|
+
import { P as v } from "./PropsContextProvider-B7e3QrmR.js";
|
|
13
15
|
import "@react-aria/utils";
|
|
14
16
|
import "remeda";
|
|
15
|
-
import {
|
|
17
|
+
import { g as N } from "./getActionGroupSlot-B4Vu4Kix.js";
|
|
16
18
|
const b = (o) => new Promise((t) => setTimeout(t, o)), m = {
|
|
17
19
|
pending: 1e3,
|
|
18
20
|
succeeded: 1500,
|
|
@@ -20,29 +22,28 @@ const b = (o) => new Promise((t) => setTimeout(t, o)), m = {
|
|
|
20
22
|
};
|
|
21
23
|
class f {
|
|
22
24
|
constructor() {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
r(this, "showFeedback");
|
|
26
|
+
r(this, "state", "isIdle");
|
|
27
|
+
r(this, "setPendingTimeout");
|
|
28
|
+
r(this, "error");
|
|
29
|
+
r(this, "isAsync", !1);
|
|
28
30
|
k(this, {
|
|
29
|
-
state:
|
|
30
|
-
updateState:
|
|
31
|
-
isBusy:
|
|
31
|
+
state: B,
|
|
32
|
+
updateState: O,
|
|
33
|
+
isBusy: I
|
|
32
34
|
});
|
|
33
35
|
}
|
|
34
36
|
static useNew() {
|
|
35
|
-
|
|
36
|
-
return T.useRegisterState(t), t;
|
|
37
|
+
return S(new f()).current;
|
|
37
38
|
}
|
|
38
39
|
updateState(t) {
|
|
39
40
|
this.state = t;
|
|
40
41
|
}
|
|
41
42
|
useValue() {
|
|
42
|
-
return
|
|
43
|
+
return y(() => this.state, [this]);
|
|
43
44
|
}
|
|
44
45
|
useIsBusy() {
|
|
45
|
-
return
|
|
46
|
+
return y(() => this.isBusy, [this]);
|
|
46
47
|
}
|
|
47
48
|
get isBusy() {
|
|
48
49
|
return this.state === "isExecuting" || this.state === "isPending";
|
|
@@ -85,7 +86,7 @@ const E = (o) => (...t) => {
|
|
|
85
86
|
return s instanceof Promise ? s.then(i) : i();
|
|
86
87
|
}
|
|
87
88
|
}, d = () => {
|
|
88
|
-
},
|
|
89
|
+
}, R = (o, t = {}) => {
|
|
89
90
|
const {
|
|
90
91
|
onSync: e = d,
|
|
91
92
|
onAsync: n = d,
|
|
@@ -112,10 +113,10 @@ function $(o) {
|
|
|
112
113
|
} = o.actionProps;
|
|
113
114
|
return e || (i && t ? t.open : s && t || n && t ? t.close : V);
|
|
114
115
|
}
|
|
115
|
-
class
|
|
116
|
+
class g {
|
|
116
117
|
constructor(t) {
|
|
117
|
-
|
|
118
|
-
|
|
118
|
+
r(this, "actions", []);
|
|
119
|
+
r(this, "baseAction");
|
|
119
120
|
this.baseAction = t;
|
|
120
121
|
}
|
|
121
122
|
addAction(t) {
|
|
@@ -128,7 +129,7 @@ class x {
|
|
|
128
129
|
this.baseAction.needsConfirmation ? !1 : e
|
|
129
130
|
), s = this.actions.map((c) => $(c)), i = E(s);
|
|
130
131
|
let l;
|
|
131
|
-
if (await
|
|
132
|
+
if (await R(() => i(...t), {
|
|
132
133
|
onAsync: () => n.onAsyncStart(),
|
|
133
134
|
then: () => n.onSucceeded(),
|
|
134
135
|
catch: (c) => {
|
|
@@ -138,20 +139,20 @@ class x {
|
|
|
138
139
|
throw l;
|
|
139
140
|
}
|
|
140
141
|
}
|
|
141
|
-
class
|
|
142
|
+
class G {
|
|
142
143
|
constructor(t) {
|
|
143
|
-
|
|
144
|
-
|
|
144
|
+
r(this, "action");
|
|
145
|
+
r(this, "execute", (...t) => {
|
|
145
146
|
const e = this.getBatchedActions();
|
|
146
147
|
(async () => {
|
|
147
148
|
for (const s of e)
|
|
148
149
|
await s.executeBatch(t);
|
|
149
150
|
})().catch((s) => console.error(s));
|
|
150
151
|
});
|
|
151
|
-
|
|
152
|
+
r(this, "getBatchedActions", () => {
|
|
152
153
|
let t = this.action;
|
|
153
154
|
const e = [];
|
|
154
|
-
let n = new
|
|
155
|
+
let n = new g(
|
|
155
156
|
this.action
|
|
156
157
|
), s = 0;
|
|
157
158
|
for (; t; ) {
|
|
@@ -170,7 +171,7 @@ class W {
|
|
|
170
171
|
}
|
|
171
172
|
if (l)
|
|
172
173
|
break;
|
|
173
|
-
i || (e.push(n), n = new
|
|
174
|
+
i || (e.push(n), n = new g(this.action)), n.addAction(t), t = t.parentAction;
|
|
174
175
|
}
|
|
175
176
|
return e.push(n), e;
|
|
176
177
|
});
|
|
@@ -179,14 +180,14 @@ class W {
|
|
|
179
180
|
}
|
|
180
181
|
class u {
|
|
181
182
|
constructor(t) {
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
new
|
|
183
|
+
r(this, "state");
|
|
184
|
+
r(this, "needsConfirmation");
|
|
185
|
+
r(this, "actionProps");
|
|
186
|
+
r(this, "parentAction");
|
|
187
|
+
r(this, "confirmationModalController");
|
|
188
|
+
r(this, "overlayController");
|
|
189
|
+
r(this, "execute", (...t) => {
|
|
190
|
+
new G(this).execute(...t);
|
|
190
191
|
});
|
|
191
192
|
const {
|
|
192
193
|
actionProps: e,
|
|
@@ -199,7 +200,7 @@ class u {
|
|
|
199
200
|
this.actionProps = e, this.parentAction = s, this.confirmationModalController = l, this.needsConfirmation = n, this.overlayController = i, this.state = c;
|
|
200
201
|
}
|
|
201
202
|
static useNew(t, e = {}) {
|
|
202
|
-
const n = p(
|
|
203
|
+
const n = p(C), s = A(), i = A(), l = f.useNew();
|
|
203
204
|
return new u({
|
|
204
205
|
parentAction: n,
|
|
205
206
|
overlayController: s,
|
|
@@ -211,8 +212,8 @@ class u {
|
|
|
211
212
|
});
|
|
212
213
|
}
|
|
213
214
|
static use() {
|
|
214
|
-
const t = p(
|
|
215
|
-
return
|
|
215
|
+
const t = p(C);
|
|
216
|
+
return M(!!t, "Action context is not defined"), D.useRegisterState(t.state), t;
|
|
216
217
|
}
|
|
217
218
|
static useConfirmationAction() {
|
|
218
219
|
const t = u.use();
|
|
@@ -237,9 +238,22 @@ class u {
|
|
|
237
238
|
return t(this.actionProps.openOverlay) ?? t(this.actionProps.closeOverlay) ?? t(this.actionProps.toggleOverlay);
|
|
238
239
|
}
|
|
239
240
|
}
|
|
240
|
-
const
|
|
241
|
-
const e = u.use()
|
|
242
|
-
|
|
241
|
+
const L = (o, t) => {
|
|
242
|
+
const e = u.use();
|
|
243
|
+
e.needsConfirmation = t.slot === "actionConfirm";
|
|
244
|
+
const n = e.state.useIsBusy(), s = e.needsConfirmation ? e.confirmationModalController : e.getOverlayController(), i = n ? !1 : t.isDismissable;
|
|
245
|
+
return /* @__PURE__ */ a.createElement(
|
|
246
|
+
o,
|
|
247
|
+
{
|
|
248
|
+
...t,
|
|
249
|
+
isDismissable: i,
|
|
250
|
+
controller: s ?? t.controller
|
|
251
|
+
},
|
|
252
|
+
t.children
|
|
253
|
+
);
|
|
254
|
+
}, U = (o, t) => {
|
|
255
|
+
const e = u.use(), n = e.state.useValue(), s = T().useIsBusy();
|
|
256
|
+
return e.confirmationModalController.useIsOpen() && e.needsConfirmation ? /* @__PURE__ */ a.createElement(o, { ...t, onPress: e.execute }) : /* @__PURE__ */ a.createElement(
|
|
243
257
|
o,
|
|
244
258
|
{
|
|
245
259
|
onPress: e.execute,
|
|
@@ -250,9 +264,9 @@ const B = (o, t) => {
|
|
|
250
264
|
...t
|
|
251
265
|
}
|
|
252
266
|
);
|
|
253
|
-
},
|
|
267
|
+
}, j = (o, t) => {
|
|
254
268
|
const e = u.use(), n = e.state.useValue();
|
|
255
|
-
return e.needsConfirmation ? /* @__PURE__ */
|
|
269
|
+
return e.needsConfirmation ? /* @__PURE__ */ a.createElement(o, { ...t, onPress: e.execute }) : /* @__PURE__ */ a.createElement(
|
|
256
270
|
o,
|
|
257
271
|
{
|
|
258
272
|
...t,
|
|
@@ -260,62 +274,34 @@ const B = (o, t) => {
|
|
|
260
274
|
"aria-disabled": n !== "isIdle"
|
|
261
275
|
}
|
|
262
276
|
);
|
|
263
|
-
},
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
e.needsConfirmation = t.slot === "actionConfirm";
|
|
272
|
-
const n = e.state.useIsBusy(), s = e.needsConfirmation ? e.confirmationModalController : e.getOverlayController(), i = n ? !1 : t.isDismissable;
|
|
273
|
-
return /* @__PURE__ */ r.createElement(
|
|
274
|
-
o,
|
|
275
|
-
{
|
|
276
|
-
...t,
|
|
277
|
-
isDismissable: i,
|
|
278
|
-
controller: s ?? t.controller
|
|
277
|
+
}, h = (o) => /* @__PURE__ */ a.createElement(
|
|
278
|
+
v,
|
|
279
|
+
{
|
|
280
|
+
props: {
|
|
281
|
+
Button: { render: U },
|
|
282
|
+
Link: {
|
|
283
|
+
render: j
|
|
284
|
+
}
|
|
279
285
|
},
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
},
|
|
291
|
-
t.children
|
|
292
|
-
))
|
|
293
|
-
);
|
|
294
|
-
}, q = (o, t) => /* @__PURE__ */ r.createElement(o, { ...t }, /* @__PURE__ */ r.createElement(R, null, t.children)), g = (o) => {
|
|
295
|
-
const { children: t, ...e } = o, n = u.useNew(e), s = !n.parentAction, i = {
|
|
286
|
+
mergeInParentContext: !0
|
|
287
|
+
},
|
|
288
|
+
o.children
|
|
289
|
+
), q = (o, t) => {
|
|
290
|
+
const e = u.useConfirmationAction(), n = N(t), s = n === "abort";
|
|
291
|
+
return !(n === "primary") && !s ? /* @__PURE__ */ a.createElement(h, null, /* @__PURE__ */ a.createElement(o, { ...t })) : s ? /* @__PURE__ */ a.createElement(h, null, /* @__PURE__ */ a.createElement(w, { break: !0 }, /* @__PURE__ */ a.createElement(w, { closeOverlay: !0 }, /* @__PURE__ */ a.createElement(o, { ...t, slot: n })))) : /* @__PURE__ */ a.createElement(h, null, /* @__PURE__ */ a.createElement(x, { value: e }, /* @__PURE__ */ a.createElement(o, { ...t, slot: n })));
|
|
292
|
+
}, w = (o) => {
|
|
293
|
+
const { children: t, ...e } = o, n = u.useNew(e), s = {
|
|
296
294
|
Modal: {
|
|
297
|
-
render:
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
render: B
|
|
304
|
-
},
|
|
305
|
-
Link: {
|
|
306
|
-
render: L
|
|
295
|
+
render: L,
|
|
296
|
+
ActionGroup: {
|
|
297
|
+
Button: {
|
|
298
|
+
render: q
|
|
299
|
+
}
|
|
300
|
+
}
|
|
307
301
|
}
|
|
308
302
|
};
|
|
309
|
-
return /* @__PURE__ */
|
|
310
|
-
h,
|
|
311
|
-
{
|
|
312
|
-
props: i,
|
|
313
|
-
dependencies: [n],
|
|
314
|
-
mergeInParentContext: !0
|
|
315
|
-
},
|
|
316
|
-
t
|
|
317
|
-
)));
|
|
303
|
+
return /* @__PURE__ */ a.createElement(x, { value: n }, /* @__PURE__ */ a.createElement(h, null, /* @__PURE__ */ a.createElement(v, { props: s, mergeInParentContext: !0 }, t)));
|
|
318
304
|
};
|
|
319
305
|
export {
|
|
320
|
-
|
|
306
|
+
w as A
|
|
321
307
|
};
|
package/dist/Action.js
CHANGED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
/* */
|
|
3
|
+
import o from "react";
|
|
4
|
+
import "./ComponentRenderContextProvider-C-1_ziLI.js";
|
|
5
|
+
import { P as E } from "./PropsContextProvider-B7e3QrmR.js";
|
|
6
|
+
import "@react-aria/utils";
|
|
7
|
+
import "remeda";
|
|
8
|
+
import { d as g } from "./dynamic-ClpUSmEt.js";
|
|
9
|
+
import c from "clsx";
|
|
10
|
+
import { f as C } from "./flowComponent-DahHhlnC.js";
|
|
11
|
+
import { TunnelProvider as G, TunnelExit as n } from "@mittwald/react-tunnel";
|
|
12
|
+
import { A as N } from "./ActionStateContext-C_nPivaA.js";
|
|
13
|
+
import { g as i } from "./getActionGroupSlot-B4Vu4Kix.js";
|
|
14
|
+
const v = "flow--action-group--action-group-container", x = "flow--action-group", w = "flow--action-group--primary", A = "flow--action-group--secondary", P = "flow--action-group--abort", t = {
|
|
15
|
+
actionGroupContainer: v,
|
|
16
|
+
actionGroup: x,
|
|
17
|
+
primary: w,
|
|
18
|
+
secondary: A,
|
|
19
|
+
abort: P
|
|
20
|
+
}, D = C("ActionGroup", (s) => {
|
|
21
|
+
const { children: m, className: l, refProp: p, ...u } = s, d = c(t.actionGroupContainer, l), f = {
|
|
22
|
+
Button: {
|
|
23
|
+
render: (r, e) => {
|
|
24
|
+
const a = i(e), y = c(
|
|
25
|
+
e.className,
|
|
26
|
+
a !== "secondary" ? t[a] : void 0
|
|
27
|
+
);
|
|
28
|
+
return /* @__PURE__ */ o.createElement(r, { ...e, className: y });
|
|
29
|
+
},
|
|
30
|
+
tunnelId: g((r) => i(r))
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
return /* @__PURE__ */ o.createElement(N, null, /* @__PURE__ */ o.createElement(E, { props: f, mergeInParentContext: !0 }, /* @__PURE__ */ o.createElement(G, null, /* @__PURE__ */ o.createElement("div", { ...u, className: d, ref: p }, /* @__PURE__ */ o.createElement("div", { className: t.actionGroup, role: "group" }, m, /* @__PURE__ */ o.createElement(n, { id: "primary" }), /* @__PURE__ */ o.createElement("div", { className: t.secondary }, /* @__PURE__ */ o.createElement(n, { id: "secondary" })), /* @__PURE__ */ o.createElement(n, { id: "abort" }))))));
|
|
34
|
+
});
|
|
35
|
+
export {
|
|
36
|
+
D as ActionGroup,
|
|
37
|
+
D as default
|
|
38
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
/* */
|
|
3
|
+
var n = Object.defineProperty;
|
|
4
|
+
var i = (s, t, e) => t in s ? n(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
|
|
5
|
+
var a = (s, t, e) => (i(s, typeof t != "symbol" ? t + "" : t, e), e);
|
|
6
|
+
import c, { createContext as d, useRef as m, useEffect as S, useContext as f } from "react";
|
|
7
|
+
import { makeObservable as l, observable as v, action as o, computed as h } from "mobx";
|
|
8
|
+
import { u as w } from "./useSelector-DpU7_HMO.js";
|
|
9
|
+
class r {
|
|
10
|
+
constructor() {
|
|
11
|
+
a(this, "states", /* @__PURE__ */ new Set());
|
|
12
|
+
l(this, {
|
|
13
|
+
states: v,
|
|
14
|
+
addState: o,
|
|
15
|
+
removeState: o,
|
|
16
|
+
isBusy: h
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
static useNew() {
|
|
20
|
+
return m(new r()).current;
|
|
21
|
+
}
|
|
22
|
+
static useRegisterState(t) {
|
|
23
|
+
const e = p();
|
|
24
|
+
S(() => (e == null || e.addState(t), () => {
|
|
25
|
+
e == null || e.removeState(t);
|
|
26
|
+
}), [e, t]);
|
|
27
|
+
}
|
|
28
|
+
addState(t) {
|
|
29
|
+
this.states.add(t);
|
|
30
|
+
}
|
|
31
|
+
removeState(t) {
|
|
32
|
+
this.states.delete(t);
|
|
33
|
+
}
|
|
34
|
+
useIsBusy() {
|
|
35
|
+
return w(() => this.isBusy, [this.states.size]);
|
|
36
|
+
}
|
|
37
|
+
get isBusy() {
|
|
38
|
+
for (const t of this.states)
|
|
39
|
+
if (t.isBusy)
|
|
40
|
+
return !0;
|
|
41
|
+
return !1;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
const u = d(void 0), b = (s) => {
|
|
45
|
+
const { children: t } = s, e = r.useNew();
|
|
46
|
+
return /* @__PURE__ */ c.createElement(u.Provider, { value: e }, t);
|
|
47
|
+
}, p = () => {
|
|
48
|
+
const s = r.useNew();
|
|
49
|
+
return f(u) ?? s;
|
|
50
|
+
};
|
|
51
|
+
export {
|
|
52
|
+
b as A,
|
|
53
|
+
r as a,
|
|
54
|
+
p as u
|
|
55
|
+
};
|
package/dist/Avatar.js
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
/* */
|
|
3
3
|
import i, { isValidElement as p } from "react";
|
|
4
4
|
import v from "clsx";
|
|
5
|
-
import { C as c } from "./ClearPropsContext-
|
|
6
|
-
import { P as f } from "./PropsContextProvider-
|
|
5
|
+
import { C as c } from "./ClearPropsContext-mes1t7Bj.js";
|
|
6
|
+
import { P as f } from "./PropsContextProvider-B7e3QrmR.js";
|
|
7
7
|
import "@react-aria/utils";
|
|
8
|
-
import "./
|
|
8
|
+
import "./ComponentRenderContextProvider-C-1_ziLI.js";
|
|
9
9
|
import "remeda";
|
|
10
10
|
import { hash as w } from "object-code";
|
|
11
11
|
import { deepForEach as z } from "react-children-utilities";
|
|
12
|
-
import { f as d } from "./flowComponent-
|
|
12
|
+
import { f as d } from "./flowComponent-DahHhlnC.js";
|
|
13
13
|
const C = "flow--avatar", h = "flow--avatar--icon", x = "flow--avatar--initials", r = {
|
|
14
14
|
avatar: C,
|
|
15
15
|
icon: h,
|
package/dist/Breadcrumb.js
CHANGED
|
@@ -4,10 +4,10 @@ import r from "react";
|
|
|
4
4
|
import * as m from "react-aria-components";
|
|
5
5
|
import a from "clsx";
|
|
6
6
|
import "@tabler/icons-react";
|
|
7
|
-
import "./Icon-
|
|
8
|
-
import { I as u } from "./IconChevronRight-
|
|
9
|
-
import "./
|
|
10
|
-
import { P as p } from "./PropsContextProvider-
|
|
7
|
+
import "./Icon-DeN4Y_a0.js";
|
|
8
|
+
import { I as u } from "./IconChevronRight-BmNGIbWG.js";
|
|
9
|
+
import "./ComponentRenderContextProvider-C-1_ziLI.js";
|
|
10
|
+
import { P as p } from "./PropsContextProvider-B7e3QrmR.js";
|
|
11
11
|
import "@react-aria/utils";
|
|
12
12
|
import "remeda";
|
|
13
13
|
const f = "flow--breadcrumb", k = "flow--breadcrumb--link", h = "flow--breadcrumb--breadcrumb-item", N = "flow--breadcrumb--icon", w = "flow--breadcrumb--dark", E = "flow--breadcrumb--light", e = {
|
|
@@ -3,28 +3,28 @@
|
|
|
3
3
|
import o, { useEffect as x } from "react";
|
|
4
4
|
import * as F from "react-aria-components";
|
|
5
5
|
import E from "clsx";
|
|
6
|
-
import { C as y } from "./ClearPropsContext-
|
|
7
|
-
import { P as C } from "./PropsContextProvider-
|
|
6
|
+
import { C as y } from "./ClearPropsContext-mes1t7Bj.js";
|
|
7
|
+
import { P as C } from "./PropsContextProvider-B7e3QrmR.js";
|
|
8
8
|
import "@react-aria/utils";
|
|
9
|
-
import "./
|
|
9
|
+
import "./ComponentRenderContextProvider-C-1_ziLI.js";
|
|
10
10
|
import "remeda";
|
|
11
11
|
import "@tabler/icons-react";
|
|
12
|
-
import "./Icon-
|
|
13
|
-
import { I as h, a as I } from "./IconSucceeded-
|
|
12
|
+
import "./Icon-DeN4Y_a0.js";
|
|
13
|
+
import { I as h, a as I } from "./IconSucceeded-LyvLqe_3.js";
|
|
14
14
|
import { W as f } from "./Wrap-DGT1h1o3.js";
|
|
15
|
-
import { T as N } from "./Text-
|
|
16
|
-
import { f as
|
|
17
|
-
import { L as k } from "./LoadingSpinner-
|
|
15
|
+
import { T as N } from "./Text-DlffGRII.js";
|
|
16
|
+
import { f as B } from "./flowComponent-DahHhlnC.js";
|
|
17
|
+
import { L as k } from "./LoadingSpinner-DSpuNOHM.js";
|
|
18
18
|
import { useLocalizedStringFormatter as A } from "react-aria";
|
|
19
19
|
import { useLiveRegion as D } from "@chakra-ui/live-region";
|
|
20
|
-
const T = "flow--button", z = "flow--button--content",
|
|
20
|
+
const T = "flow--button", z = "flow--button--content", L = "flow--button--state-icon", R = "flow--button--avatar", K = "flow--button--icon", U = "flow--button--text", W = "flow--button--counter-badge", $ = "flow--button--is-succeeded", j = "flow--button--is-failed", q = "flow--button--is-pending", G = "flow--button--plain", H = "flow--button--primary", J = "flow--button--solid", M = "flow--button--aria-disabled", O = "flow--button--accent", Q = "flow--button--danger", V = "flow--button--secondary", X = "flow--button--dark", Y = "flow--button--light", Z = "flow--button--soft", t = {
|
|
21
21
|
button: T,
|
|
22
22
|
content: z,
|
|
23
|
-
stateIcon:
|
|
23
|
+
stateIcon: L,
|
|
24
24
|
avatar: R,
|
|
25
25
|
icon: K,
|
|
26
26
|
text: U,
|
|
27
|
-
|
|
27
|
+
counterBadge: W,
|
|
28
28
|
isSucceeded: $,
|
|
29
29
|
isFailed: j,
|
|
30
30
|
isPending: q,
|
|
@@ -64,7 +64,7 @@ const T = "flow--button", z = "flow--button--content", B = "flow--button--state-
|
|
|
64
64
|
x(() => {
|
|
65
65
|
e === "isPending" ? n.speak(s) : e === "isSucceeded" ? n.speak(c) : e === "isFailed" && n.speak(a);
|
|
66
66
|
}, [e]);
|
|
67
|
-
}, te = (e) => ((e.isPending || e.isSucceeded || e.isFailed || e["aria-disabled"]) && (e = { ...e }, e.onPress = void 0, e.onPressStart = void 0, e.onPressEnd = void 0, e.onPressChange = void 0, e.onPressUp = void 0, e.onKeyDown = void 0, e.onKeyUp = void 0), e), ve =
|
|
67
|
+
}, te = (e) => ((e.isPending || e.isSucceeded || e.isFailed || e["aria-disabled"]) && (e = { ...e }, e.onPress = void 0, e.onPressStart = void 0, e.onPressEnd = void 0, e.onPressChange = void 0, e.onPressUp = void 0, e.onKeyDown = void 0, e.onKeyUp = void 0), e), ve = B("Button", (e) => {
|
|
68
68
|
e = te(e);
|
|
69
69
|
const {
|
|
70
70
|
color: r = "primary",
|
|
@@ -73,17 +73,17 @@ const T = "flow--button", z = "flow--button--content", B = "flow--button--state-
|
|
|
73
73
|
className: c,
|
|
74
74
|
size: a = "m",
|
|
75
75
|
isPending: n,
|
|
76
|
-
isSucceeded:
|
|
77
|
-
isFailed:
|
|
78
|
-
"aria-disabled":
|
|
79
|
-
refProp:
|
|
76
|
+
isSucceeded: d,
|
|
77
|
+
isFailed: l,
|
|
78
|
+
"aria-disabled": g,
|
|
79
|
+
refProp: b,
|
|
80
80
|
unstyled: m,
|
|
81
81
|
...P
|
|
82
82
|
} = e, w = m ? c : E(
|
|
83
83
|
t.button,
|
|
84
84
|
n && t.isPending,
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
d && t.isSucceeded,
|
|
86
|
+
l && t.isFailed,
|
|
87
87
|
t[`size-${a}`],
|
|
88
88
|
t[r],
|
|
89
89
|
t[i],
|
|
@@ -92,10 +92,10 @@ const T = "flow--button", z = "flow--button--content", B = "flow--button--state-
|
|
|
92
92
|
* Workaround warning: The Aria.Button does not support "aria-disabled"
|
|
93
93
|
* by now, so this Button will be visually disabled via CSS.
|
|
94
94
|
*/
|
|
95
|
-
|
|
95
|
+
g && t.ariaDisabled
|
|
96
96
|
);
|
|
97
97
|
ee(
|
|
98
|
-
n ? "isPending" :
|
|
98
|
+
n ? "isPending" : d ? "isSucceeded" : l ? "isFailed" : "isIdle"
|
|
99
99
|
);
|
|
100
100
|
const v = {
|
|
101
101
|
Icon: {
|
|
@@ -109,11 +109,11 @@ const T = "flow--button", z = "flow--button--content", B = "flow--button--state-
|
|
|
109
109
|
Avatar: {
|
|
110
110
|
className: t.avatar
|
|
111
111
|
},
|
|
112
|
-
|
|
113
|
-
className: t.
|
|
112
|
+
CounterBadge: {
|
|
113
|
+
className: t.counterBadge
|
|
114
114
|
}
|
|
115
|
-
}, u =
|
|
116
|
-
return /* @__PURE__ */ o.createElement(y, null, /* @__PURE__ */ o.createElement(F.Button, { className: w, ref:
|
|
115
|
+
}, u = d ? h : l ? I : n ? k : void 0, p = u && /* @__PURE__ */ o.createElement(u, { size: a, className: t.stateIcon }), S = typeof s == "string";
|
|
116
|
+
return /* @__PURE__ */ o.createElement(y, null, /* @__PURE__ */ o.createElement(F.Button, { className: w, ref: b, ...P }, /* @__PURE__ */ o.createElement(C, { props: v }, /* @__PURE__ */ o.createElement(f, { if: !m }, /* @__PURE__ */ o.createElement("span", { className: t.content }, /* @__PURE__ */ o.createElement(f, { if: S }, /* @__PURE__ */ o.createElement(N, null, s))))), p));
|
|
117
117
|
});
|
|
118
118
|
export {
|
|
119
119
|
ve as B
|
package/dist/Button.js
CHANGED
|
@@ -4,15 +4,15 @@ import e from "react";
|
|
|
4
4
|
import * as i from "react-aria-components";
|
|
5
5
|
import p from "clsx";
|
|
6
6
|
import "@tabler/icons-react";
|
|
7
|
-
import "./Icon-
|
|
8
|
-
import { I as x, a as f } from "./IconCheckboxEmpty-
|
|
9
|
-
import { I as h } from "./IconCheckboxIndeterminate-
|
|
10
|
-
import { C } from "./ClearPropsContext-
|
|
11
|
-
import "./
|
|
7
|
+
import "./Icon-DeN4Y_a0.js";
|
|
8
|
+
import { I as x, a as f } from "./IconCheckboxEmpty-DdLa3K6h.js";
|
|
9
|
+
import { I as h } from "./IconCheckboxIndeterminate-DZubWEXp.js";
|
|
10
|
+
import { C } from "./ClearPropsContext-mes1t7Bj.js";
|
|
11
|
+
import "./ComponentRenderContextProvider-C-1_ziLI.js";
|
|
12
12
|
import "@react-aria/utils";
|
|
13
13
|
import "remeda";
|
|
14
14
|
import "dot-prop";
|
|
15
|
-
import { f as k } from "./flowComponent-
|
|
15
|
+
import { f as k } from "./flowComponent-DahHhlnC.js";
|
|
16
16
|
const b = "flow--checkbox", E = "flow--checkbox--icon", o = {
|
|
17
17
|
checkbox: b,
|
|
18
18
|
icon: E
|
package/dist/Checkbox.js
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
/* */
|
|
3
3
|
import o from "react";
|
|
4
4
|
import m from "clsx";
|
|
5
|
-
import { C as p } from "./ClearPropsContext-
|
|
6
|
-
import { P as b } from "./PropsContextProvider-
|
|
5
|
+
import { C as p } from "./ClearPropsContext-mes1t7Bj.js";
|
|
6
|
+
import { P as b } from "./PropsContextProvider-B7e3QrmR.js";
|
|
7
7
|
import "@react-aria/utils";
|
|
8
|
-
import "./
|
|
8
|
+
import "./ComponentRenderContextProvider-C-1_ziLI.js";
|
|
9
9
|
import "remeda";
|
|
10
|
-
import { C as x } from "./Checkbox-
|
|
11
|
-
import { f } from "./flowComponent-
|
|
10
|
+
import { C as x } from "./Checkbox-D4IUwOOm.js";
|
|
11
|
+
import { f } from "./flowComponent-DahHhlnC.js";
|
|
12
12
|
const C = "flow--checkbox-button", i = "flow--checkbox-button--label", h = "flow--checkbox-button--content", t = {
|
|
13
13
|
checkboxButton: C,
|
|
14
14
|
label: i,
|