@mittwald/flow-react-components 0.1.0-alpha.85 → 0.1.0-alpha.87
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-Bu-hapYW.js +176 -0
- package/dist/Action.js +1 -1
- package/dist/Avatar.js +1 -1
- package/dist/Breadcrumb.js +16 -18
- package/dist/Button-DJcL25jy.js +116 -0
- package/dist/Button.js +1 -1
- package/dist/ButtonGroup.js +14 -12
- package/dist/{Checkbox-PPWtxoYH.js → Checkbox-C8yHXTDv.js} +4 -4
- package/dist/Checkbox.js +1 -1
- package/dist/{CheckboxButton-B5OAcIK5.js → CheckboxButton-DaoWw8LD.js} +2 -2
- package/dist/CheckboxButton.js +1 -1
- package/dist/CheckboxGroup.js +3 -3
- package/dist/Content.js +1 -1
- package/dist/{ContextMenu-BeySGa4K.js → ContextMenu-B3m9vxOe.js} +1 -1
- package/dist/ContextMenu.js +2 -2
- package/dist/CopyButton.js +12 -12
- package/dist/FieldDescription.js +2 -2
- package/dist/{FieldError-b6CAH0ya.js → FieldError-CDPZJvma.js} +3 -3
- package/dist/FieldError.js +1 -1
- package/dist/Header.js +1 -1
- package/dist/HeaderNavigation.js +23 -21
- package/dist/Heading.js +1 -1
- package/dist/{Icon-DwHDa4pA.js → Icon-DpcNiaNb.js} +1 -1
- package/dist/Icon.js +1 -1
- package/dist/{IconCheck-CubzEVji.js → IconCheck-DDbrMURX.js} +1 -1
- package/dist/{IconCheckboxEmpty-BlU9hQOh.js → IconCheckboxEmpty-0Lz4T3u4.js} +1 -1
- package/dist/{IconCheckboxIndeterminate-B-p8FuLS.js → IconCheckboxIndeterminate-p6GmeDnv.js} +1 -1
- package/dist/{IconChevronDown-C205topB.js → IconChevronDown-CbK0gKMB.js} +1 -1
- package/dist/{IconChevronRight-CFcrQPos.js → IconChevronRight-CJv9kuRZ.js} +1 -1
- package/dist/{IconClose-7gyfEXz1.js → IconClose-CwV3QUi2.js} +1 -1
- package/dist/{IconContextMenu-DYOFg7qU.js → IconContextMenu-DD5RGOEW.js} +1 -1
- package/dist/{IconCopy-CHksIqDs.js → IconCopy-BOSbNCO3.js} +1 -1
- package/dist/{IconDanger-MdCt1mDP.js → IconDanger-BCQl3s0h.js} +1 -1
- package/dist/{IconPending-CyQhZCfI.js → IconPending-i0n-9-8z.js} +1 -1
- package/dist/{IconPlus-Bz-UoRuD.js → IconPlus-DS099is1.js} +1 -1
- package/dist/{IconRadioOn-ghpksMxd.js → IconRadioOn-D5xbBFYA.js} +1 -1
- package/dist/{IconSucceeded-CHjiCCzR.js → IconSucceeded-Cje6NH8R.js} +1 -1
- package/dist/{IconWarning-Dbq3oj5j.js → IconWarning-3thkYnBz.js} +1 -1
- package/dist/Icons.js +15 -15
- package/dist/Image.js +1 -1
- package/dist/Initials.js +1 -1
- package/dist/InlineAlert.js +2 -2
- package/dist/{Label-DlBFElQ_.js → Label-Dq1cgQyP.js} +1 -1
- package/dist/Label.js +1 -1
- package/dist/LayoutCard.js +1 -1
- package/dist/{Link-D3oOwbIe.js → Link-0b3GsopL.js} +1 -1
- package/dist/Link.js +1 -1
- package/dist/List.js +18 -19
- package/dist/{LoadingSpinner-BOBbSYun.js → LoadingSpinner-BoW4g33T.js} +2 -2
- package/dist/LoadingSpinner.js +1 -1
- package/dist/{MenuItem-Bi8sYht4.js → MenuItem-B5kgO_0u.js} +5 -5
- package/dist/MenuItem.js +1 -1
- package/dist/Modal.js +42 -40
- package/dist/Navigation.js +20 -22
- package/dist/NumberField.js +6 -6
- package/dist/RadioGroup.js +5 -5
- package/dist/Select.js +4 -4
- package/dist/StatusBadge.js +3 -3
- package/dist/StatusIcon-BRm5TIe9.js +49 -0
- package/dist/StatusIcon.js +1 -1
- package/dist/Switch.js +5 -5
- package/dist/Tabs.js +55 -53
- package/dist/{Text-CKd46eHq.js → Text-DlBpZns-.js} +1 -1
- package/dist/Text.js +1 -1
- package/dist/TextArea.js +2 -2
- package/dist/TextField.js +2 -2
- package/dist/{TextFieldBase-BGZpjGL8.js → TextFieldBase-Dk8UVEZz.js} +1 -1
- package/dist/controller.js +3 -3
- package/dist/flowComponent-C4FfRbD8.js +36 -0
- package/dist/hooks.js +2 -2
- package/dist/{index-ViVxK7d1.js → index-Cb88QILt.js} +9 -7
- package/dist/react-hook-form.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/types/components/Action/Action.d.ts +6 -5
- package/dist/types/components/Action/{ariaLive.d.ts → lib/ariaLive.d.ts} +1 -1
- package/dist/types/components/Action/lib/execution/ActionExecution.d.ts +24 -0
- package/dist/types/components/Action/lib/execution/ActionExecution.test.d.ts +1 -0
- package/dist/types/components/Action/lib/execution/ActionState.d.ts +8 -0
- package/dist/types/components/Action/lib/execution/breakAction.d.ts +2 -0
- package/dist/types/components/Action/lib/execution/context.d.ts +4 -0
- package/dist/types/components/Action/lib/execution/useActionController.d.ts +10 -0
- package/dist/types/components/Action/lib/execution/useActionController.test.d.ts +1 -0
- package/dist/types/components/Action/lib/execution/useActionFunction.d.ts +4 -0
- package/dist/types/components/Action/stories/Default.stories.d.ts +1 -0
- package/dist/types/components/Action/types.d.ts +0 -21
- package/dist/types/components/Avatar/Avatar.d.ts +2 -2
- package/dist/types/components/Button/Button.d.ts +2 -1
- package/dist/types/components/Button/stories/Default.stories.d.ts +1 -0
- package/dist/types/components/ButtonGroup/ButtonGroup.d.ts +4 -3
- package/dist/types/components/ContextMenu/ContextMenu.d.ts +2 -2
- package/dist/types/components/CopyButton/CopyButton.d.ts +1 -1
- package/dist/types/components/Modal/Modal.d.ts +7 -5
- package/dist/types/components/Modal/hooks/useSyncTriggerState.d.ts +2 -2
- package/dist/types/components/propTypes/index.d.ts +2 -0
- package/dist/types/lib/childProps/ChildPropsStore.d.ts +3 -1
- package/dist/types/lib/componentFactory/flowComponent.d.ts +5 -4
- package/dist/types/lib/controller/overlay/{OverlayState.d.ts → OverlayController.d.ts} +2 -2
- package/dist/types/lib/controller/overlay/context.d.ts +3 -3
- package/dist/types/lib/controller/overlay/index.d.ts +2 -2
- package/dist/types/lib/controller/overlay/useOverlayController.d.ts +8 -0
- package/dist/types/lib/hooks/index.d.ts +1 -1
- package/dist/types/lib/promises/callAndReact.d.ts +9 -0
- package/dist/types/lib/promises/callAndReact.test.d.ts +1 -0
- package/dist/types/lib/promises/callFunctionsInOrder.d.ts +3 -0
- package/dist/types/lib/promises/callFunctionsInOrder.test.d.ts +1 -0
- package/dist/types/lib/propsContext/propsContext.d.ts +1 -0
- package/dist/types/lib/types/props.d.ts +3 -2
- package/dist/{useProps-DfMs_ElR.js → useProps-CIrrudrV.js} +1 -0
- package/package.json +39 -39
- package/dist/Action-XlqKlkaB.js +0 -153
- package/dist/Button-CZjBV5AM.js +0 -113
- package/dist/StatusIcon-DYuGj4gU.js +0 -38
- package/dist/flowComponent-dvQga3NG.js +0 -22
- package/dist/types/components/Action/ActionState.d.ts +0 -21
- package/dist/types/components/Action/actionFactory.d.ts +0 -11
- package/dist/types/components/Action/hooks/useCallAction.d.ts +0 -13
- package/dist/types/components/Action/hooks/useMakeCallableAction.d.ts +0 -3
- package/dist/types/components/Action/lib/callActionsInOrder.d.ts +0 -3
- package/dist/types/lib/controller/overlay/useOverlayState.d.ts +0 -8
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
/* */
|
|
3
|
+
var v = Object.defineProperty;
|
|
4
|
+
var E = (t, e, n) => e in t ? v(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
5
|
+
var d = (t, e, n) => (E(t, typeof e != "symbol" ? e + "" : e, n), n);
|
|
6
|
+
import c, { createContext as D, useContext as g, useRef as M, useState as P, useEffect as w } from "react";
|
|
7
|
+
import "./propsContext-CauylOgH.js";
|
|
8
|
+
import { P as x } from "./PropsContextProvider-DZvwqHLP.js";
|
|
9
|
+
import "@react-aria/utils";
|
|
10
|
+
import "remeda";
|
|
11
|
+
import { u as y, O as R } from "./index-Cb88QILt.js";
|
|
12
|
+
import { TunnelProvider as B, TunnelExit as I } from "@mittwald/react-tunnel";
|
|
13
|
+
import { makeObservable as O, observable as T, action as N } from "mobx";
|
|
14
|
+
import { u as $ } from "./useSelector-DpU7_HMO.js";
|
|
15
|
+
const b = D(void 0), G = () => g(b), H = b.Provider, S = (t) => (...e) => {
|
|
16
|
+
const n = [...t], i = n.shift();
|
|
17
|
+
if (i) {
|
|
18
|
+
const r = i(...e), s = () => n.length === 0 ? r : S(n)(...e);
|
|
19
|
+
return r instanceof Promise ? r.then(s) : s();
|
|
20
|
+
}
|
|
21
|
+
}, C = "flowBreakActionMarker";
|
|
22
|
+
function U(t) {
|
|
23
|
+
return !!t && t instanceof Error && t.message === C;
|
|
24
|
+
}
|
|
25
|
+
const j = () => {
|
|
26
|
+
throw new Error(C);
|
|
27
|
+
}, A = {
|
|
28
|
+
pending: 1e3,
|
|
29
|
+
succeeded: 1500,
|
|
30
|
+
failed: 2e3
|
|
31
|
+
};
|
|
32
|
+
class q {
|
|
33
|
+
constructor(e, n, i = {}) {
|
|
34
|
+
d(this, "options");
|
|
35
|
+
d(this, "state");
|
|
36
|
+
d(this, "args");
|
|
37
|
+
d(this, "isDone", !1);
|
|
38
|
+
d(this, "error");
|
|
39
|
+
const {
|
|
40
|
+
resetAfterDone: r = !0,
|
|
41
|
+
onFeedbackDone: s = () => {
|
|
42
|
+
},
|
|
43
|
+
showFeedback: o = !1
|
|
44
|
+
} = i;
|
|
45
|
+
this.state = e, this.args = n, this.options = { resetAfterDone: r, onFeedbackDone: s, showFeedback: o };
|
|
46
|
+
}
|
|
47
|
+
onAsyncStart() {
|
|
48
|
+
this.options.showFeedback = !0, this.state.updateState("isExecuting"), setTimeout(() => this.startPending(), A.pending);
|
|
49
|
+
}
|
|
50
|
+
onSucceeded() {
|
|
51
|
+
this.onDone();
|
|
52
|
+
}
|
|
53
|
+
onFailed(e) {
|
|
54
|
+
this.error = e ?? new Error("Unknown error"), console.error(e), this.onDone();
|
|
55
|
+
}
|
|
56
|
+
startFailedFeedback() {
|
|
57
|
+
U(this.error) ? this.resetAfterDone() : (this.state.updateState("isFailed"), setTimeout(() => this.resetAfterDone(), A.failed));
|
|
58
|
+
}
|
|
59
|
+
startSucceededFeedback() {
|
|
60
|
+
this.state.updateState("isSucceeded"), setTimeout(() => this.resetAfterDone(), A.succeeded);
|
|
61
|
+
}
|
|
62
|
+
resetAfterDone() {
|
|
63
|
+
this.options.resetAfterDone && this.state.updateState("isIdle"), this.error || this.options.onFeedbackDone(...this.args);
|
|
64
|
+
}
|
|
65
|
+
onDone() {
|
|
66
|
+
this.isDone = !0, this.options.showFeedback ? this.error ? this.startFailedFeedback() : this.startSucceededFeedback() : this.resetAfterDone();
|
|
67
|
+
}
|
|
68
|
+
startPending() {
|
|
69
|
+
this.isDone || this.state.updateState("isPending");
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
class p {
|
|
73
|
+
constructor() {
|
|
74
|
+
d(this, "state", "isIdle");
|
|
75
|
+
O(this, {
|
|
76
|
+
state: T,
|
|
77
|
+
updateState: N
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
static useNew() {
|
|
81
|
+
return M(new p()).current;
|
|
82
|
+
}
|
|
83
|
+
updateState(e) {
|
|
84
|
+
this.state = e;
|
|
85
|
+
}
|
|
86
|
+
useState() {
|
|
87
|
+
return $(() => this.state, [this]);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
const z = () => {
|
|
91
|
+
}, J = (t) => {
|
|
92
|
+
const {
|
|
93
|
+
action: e,
|
|
94
|
+
toggleModal: n,
|
|
95
|
+
openModal: i,
|
|
96
|
+
closeModal: r,
|
|
97
|
+
break: s
|
|
98
|
+
} = t, o = y();
|
|
99
|
+
return e || (n ? o.toggle : i ? o.open : r ? o.close : s ? j : z);
|
|
100
|
+
}, K = (t, e = {}) => {
|
|
101
|
+
const {
|
|
102
|
+
onSync: n = () => {
|
|
103
|
+
},
|
|
104
|
+
onAsync: i = () => {
|
|
105
|
+
},
|
|
106
|
+
then: r = () => {
|
|
107
|
+
},
|
|
108
|
+
catch: s = () => {
|
|
109
|
+
},
|
|
110
|
+
finally: o = () => {
|
|
111
|
+
}
|
|
112
|
+
} = e;
|
|
113
|
+
try {
|
|
114
|
+
const a = t();
|
|
115
|
+
return a instanceof Promise ? (i(), a.then(r).catch(s).finally(o)) : (n(), r(a), o(), a);
|
|
116
|
+
} catch (a) {
|
|
117
|
+
n(), s(a), o();
|
|
118
|
+
}
|
|
119
|
+
}, L = (t) => {
|
|
120
|
+
const { isConfirmationAction: e, showFeedback: n } = t, i = J(t), r = G(), s = p.useNew(), o = !e, a = e ? void 0 : r, k = e ? r : void 0, m = S([i, a]);
|
|
121
|
+
return {
|
|
122
|
+
callAction: (...l) => {
|
|
123
|
+
const f = new q(s, l, {
|
|
124
|
+
onFeedbackDone: k,
|
|
125
|
+
resetAfterDone: o,
|
|
126
|
+
showFeedback: n
|
|
127
|
+
});
|
|
128
|
+
return K(m, {
|
|
129
|
+
onAsync: () => f.onAsyncStart(),
|
|
130
|
+
then: () => f.onSucceeded(),
|
|
131
|
+
catch: (F) => f.onFailed(F)
|
|
132
|
+
});
|
|
133
|
+
},
|
|
134
|
+
state: s
|
|
135
|
+
};
|
|
136
|
+
}, h = (t) => {
|
|
137
|
+
const [e, n] = P(!1), i = R.useNew(), r = L(t), s = e ? i.open : r.callAction, o = r.state.useState(), m = {
|
|
138
|
+
Button: {
|
|
139
|
+
onPress: s,
|
|
140
|
+
isPending: o === "isPending" ? !0 : void 0,
|
|
141
|
+
"aria-disabled": o !== "isIdle" ? !0 : void 0,
|
|
142
|
+
isSucceeded: o === "isSucceeded" ? !0 : void 0,
|
|
143
|
+
isFailed: o === "isFailed" ? !0 : void 0
|
|
144
|
+
},
|
|
145
|
+
Modal: {
|
|
146
|
+
tunnelId: "outsideActionProvider",
|
|
147
|
+
render: (u, l) => (w(() => {
|
|
148
|
+
if (l.slot === "actionConfirm")
|
|
149
|
+
return n(!0), () => {
|
|
150
|
+
n(!1);
|
|
151
|
+
};
|
|
152
|
+
}, []), /* @__PURE__ */ c.createElement(u, { controller: i, ...l })),
|
|
153
|
+
ButtonGroup: {
|
|
154
|
+
Button: {
|
|
155
|
+
render: (u, l) => {
|
|
156
|
+
const { variant: f } = l;
|
|
157
|
+
return f === "secondary" ? /* @__PURE__ */ c.createElement(h, { break: !0 }, /* @__PURE__ */ c.createElement(h, { closeModal: !0 }, /* @__PURE__ */ c.createElement(u, { ...l }))) : /* @__PURE__ */ c.createElement(h, { closeModal: !0 }, /* @__PURE__ */ c.createElement(h, { ...t, isConfirmationAction: !0 }, /* @__PURE__ */ c.createElement(u, { ...l })));
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
return /* @__PURE__ */ c.createElement(B, null, /* @__PURE__ */ c.createElement(
|
|
164
|
+
x,
|
|
165
|
+
{
|
|
166
|
+
props: m,
|
|
167
|
+
dependencies: [e, o],
|
|
168
|
+
mergeInParentContext: !0
|
|
169
|
+
},
|
|
170
|
+
/* @__PURE__ */ c.createElement(H, { value: s }, t.children),
|
|
171
|
+
/* @__PURE__ */ c.createElement(I, { id: "outsideActionProvider" })
|
|
172
|
+
));
|
|
173
|
+
};
|
|
174
|
+
export {
|
|
175
|
+
h as A
|
|
176
|
+
};
|
package/dist/Action.js
CHANGED
package/dist/Avatar.js
CHANGED
|
@@ -4,7 +4,7 @@ import i, { isValidElement as v } from "react";
|
|
|
4
4
|
import m from "clsx";
|
|
5
5
|
import { C as p } from "./ClearPropsContext-CeCMjUK9.js";
|
|
6
6
|
import { P as c } from "./PropsContextProvider-DZvwqHLP.js";
|
|
7
|
-
import { u as f } from "./useProps-
|
|
7
|
+
import { u as f } from "./useProps-CIrrudrV.js";
|
|
8
8
|
import { hash as w } from "object-code";
|
|
9
9
|
import { deepForEach as z } from "react-children-utilities";
|
|
10
10
|
const d = "flow--avatar", h = "flow--avatar--icon", u = "flow--avatar--initials", r = {
|
package/dist/Breadcrumb.js
CHANGED
|
@@ -1,34 +1,32 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
3
|
import r from "react";
|
|
4
|
-
import * as
|
|
4
|
+
import * as c from "react-aria-components";
|
|
5
5
|
import a from "clsx";
|
|
6
6
|
import "@tabler/icons-react";
|
|
7
|
-
import "./Icon-
|
|
8
|
-
import { I as
|
|
7
|
+
import "./Icon-DpcNiaNb.js";
|
|
8
|
+
import { I as d } from "./IconChevronRight-CJv9kuRZ.js";
|
|
9
9
|
import "./propsContext-CauylOgH.js";
|
|
10
10
|
import { P as u } from "./PropsContextProvider-DZvwqHLP.js";
|
|
11
11
|
import "@react-aria/utils";
|
|
12
12
|
import "remeda";
|
|
13
|
-
const
|
|
14
|
-
breadcrumb:
|
|
15
|
-
link:
|
|
16
|
-
breadcrumbItem:
|
|
17
|
-
icon:
|
|
13
|
+
const p = "flow--breadcrumb", f = "flow--breadcrumb--link", N = "flow--breadcrumb--breadcrumb-item", E = "flow--breadcrumb--icon", e = {
|
|
14
|
+
breadcrumb: p,
|
|
15
|
+
link: f,
|
|
16
|
+
breadcrumbItem: N,
|
|
17
|
+
icon: E
|
|
18
18
|
}, I = (t) => {
|
|
19
|
-
const { children:
|
|
20
|
-
return /* @__PURE__ */ r.createElement(
|
|
21
|
-
},
|
|
22
|
-
const { children:
|
|
19
|
+
const { children: m } = t, o = a(e.breadcrumbItem);
|
|
20
|
+
return /* @__PURE__ */ r.createElement(c.Breadcrumb, { className: o }, m, /* @__PURE__ */ r.createElement(d, { size: "s", className: e.icon }));
|
|
21
|
+
}, R = (t) => {
|
|
22
|
+
const { children: m, className: o, ...s } = t, n = a(e.breadcrumb, o), l = {
|
|
23
23
|
Link: {
|
|
24
|
-
unstyled: !0,
|
|
25
|
-
className: e.link,
|
|
26
|
-
hoc: (b) => /* @__PURE__ */ r.createElement(I, null, b)
|
|
24
|
+
render: (b, i) => /* @__PURE__ */ r.createElement(I, null, /* @__PURE__ */ r.createElement(b, { ...i, unstyled: !0, className: e.link }))
|
|
27
25
|
}
|
|
28
26
|
};
|
|
29
|
-
return /* @__PURE__ */ r.createElement(
|
|
27
|
+
return /* @__PURE__ */ r.createElement(c.Breadcrumbs, { ...s, className: n }, /* @__PURE__ */ r.createElement(u, { props: l }, m));
|
|
30
28
|
};
|
|
31
29
|
export {
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
R as Breadcrumb,
|
|
31
|
+
R as default
|
|
34
32
|
};
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
/* */
|
|
3
|
+
import o, { useEffect as S } from "react";
|
|
4
|
+
import * as x from "react-aria-components";
|
|
5
|
+
import F from "clsx";
|
|
6
|
+
import { C as y } from "./ClearPropsContext-CeCMjUK9.js";
|
|
7
|
+
import { P as E } from "./PropsContextProvider-DZvwqHLP.js";
|
|
8
|
+
import "@react-aria/utils";
|
|
9
|
+
import "./propsContext-CauylOgH.js";
|
|
10
|
+
import "remeda";
|
|
11
|
+
import "@tabler/icons-react";
|
|
12
|
+
import "./Icon-DpcNiaNb.js";
|
|
13
|
+
import { I as C, a as I } from "./IconSucceeded-Cje6NH8R.js";
|
|
14
|
+
import { W as N } from "./Wrap-DGT1h1o3.js";
|
|
15
|
+
import { T as h } from "./Text-DlBpZns-.js";
|
|
16
|
+
import { f as A } from "./flowComponent-C4FfRbD8.js";
|
|
17
|
+
import { L as D } from "./LoadingSpinner-BoW4g33T.js";
|
|
18
|
+
import { useLocalizedStringFormatter as T } from "react-aria";
|
|
19
|
+
import { useLiveRegion as z } from "@chakra-ui/live-region";
|
|
20
|
+
const B = "flow--button", L = "flow--button--content", k = "flow--button--state-icon", R = "flow--button--avatar", K = "flow--button--icon", U = "flow--button--text", W = "flow--button--is-succeeded", $ = "flow--button--is-failed", j = "flow--button--is-pending", q = "flow--button--plain", G = "flow--button--primary", H = "flow--button--solid", J = "flow--button--aria-disabled", M = "flow--button--accent", O = "flow--button--danger", Q = "flow--button--secondary", V = "flow--button--soft", X = "flow--button--inverse", t = {
|
|
21
|
+
button: B,
|
|
22
|
+
content: L,
|
|
23
|
+
stateIcon: k,
|
|
24
|
+
avatar: R,
|
|
25
|
+
icon: K,
|
|
26
|
+
text: U,
|
|
27
|
+
isSucceeded: W,
|
|
28
|
+
isFailed: $,
|
|
29
|
+
isPending: j,
|
|
30
|
+
plain: q,
|
|
31
|
+
"size-s": "flow--button--size-s",
|
|
32
|
+
primary: G,
|
|
33
|
+
solid: H,
|
|
34
|
+
ariaDisabled: J,
|
|
35
|
+
accent: M,
|
|
36
|
+
danger: O,
|
|
37
|
+
secondary: Q,
|
|
38
|
+
soft: V,
|
|
39
|
+
inverse: X
|
|
40
|
+
}, Y = {
|
|
41
|
+
"de-DE": {
|
|
42
|
+
"action.isFailed": "Fehlgeschlagen",
|
|
43
|
+
"action.isPending": "Ausstehend...",
|
|
44
|
+
"action.isSucceeded": "Erfolgreich"
|
|
45
|
+
},
|
|
46
|
+
"en-EN": {
|
|
47
|
+
"action.isFailed": "Failed",
|
|
48
|
+
"action.isPending": "Pending...",
|
|
49
|
+
"action.isSucceeded": "Succeeded"
|
|
50
|
+
}
|
|
51
|
+
}, Z = (e, c = {}) => {
|
|
52
|
+
const i = T(Y), {
|
|
53
|
+
isPendingText: a = i.format("action.isPending"),
|
|
54
|
+
isSucceededText: r = i.format("action.isSucceeded"),
|
|
55
|
+
isFailedText: s = i.format("action.isFailed")
|
|
56
|
+
} = c, n = z({
|
|
57
|
+
"aria-live": "polite",
|
|
58
|
+
"aria-atomic": !1,
|
|
59
|
+
"aria-relevant": "text additions",
|
|
60
|
+
role: "status"
|
|
61
|
+
});
|
|
62
|
+
S(() => {
|
|
63
|
+
e === "isPending" ? n.speak(a) : e === "isSucceeded" ? n.speak(r) : e === "isFailed" && n.speak(s);
|
|
64
|
+
}, [e]);
|
|
65
|
+
}, _ = (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 = A("Button", (e) => {
|
|
66
|
+
e = _(e);
|
|
67
|
+
const {
|
|
68
|
+
variant: c = "primary",
|
|
69
|
+
style: i = "solid",
|
|
70
|
+
children: a,
|
|
71
|
+
className: r,
|
|
72
|
+
size: s = "m",
|
|
73
|
+
isPending: n,
|
|
74
|
+
isSucceeded: d,
|
|
75
|
+
isFailed: l,
|
|
76
|
+
"aria-disabled": f,
|
|
77
|
+
ref: u,
|
|
78
|
+
inverse: b,
|
|
79
|
+
...g
|
|
80
|
+
} = e, v = F(
|
|
81
|
+
t.button,
|
|
82
|
+
n && t.isPending,
|
|
83
|
+
d && t.isSucceeded,
|
|
84
|
+
l && t.isFailed,
|
|
85
|
+
b && t.inverse,
|
|
86
|
+
t[`size-${s}`],
|
|
87
|
+
t[c],
|
|
88
|
+
t[i],
|
|
89
|
+
r,
|
|
90
|
+
/**
|
|
91
|
+
* Workaround warning: The Aria.Button does not support "aria-disabled" by
|
|
92
|
+
* now, so this Button will be visually disabled via CSS.
|
|
93
|
+
*/
|
|
94
|
+
f && t.ariaDisabled
|
|
95
|
+
);
|
|
96
|
+
Z(
|
|
97
|
+
n ? "isPending" : d ? "isSucceeded" : l ? "isFailed" : "isIdle"
|
|
98
|
+
);
|
|
99
|
+
const P = {
|
|
100
|
+
Icon: {
|
|
101
|
+
className: t.icon,
|
|
102
|
+
"aria-hidden": !0,
|
|
103
|
+
size: s
|
|
104
|
+
},
|
|
105
|
+
Text: {
|
|
106
|
+
className: t.text
|
|
107
|
+
},
|
|
108
|
+
Avatar: {
|
|
109
|
+
className: t.avatar
|
|
110
|
+
}
|
|
111
|
+
}, m = d ? C : l ? I : n ? D : void 0, w = m && /* @__PURE__ */ o.createElement(m, { size: s, className: t.stateIcon }), p = typeof a == "string";
|
|
112
|
+
return /* @__PURE__ */ o.createElement(y, null, /* @__PURE__ */ o.createElement(x.Button, { className: v, ref: u, ...g }, /* @__PURE__ */ o.createElement(E, { props: P }, /* @__PURE__ */ o.createElement("span", { className: t.content }, /* @__PURE__ */ o.createElement(N, { if: p }, /* @__PURE__ */ o.createElement(h, null, a)))), w));
|
|
113
|
+
});
|
|
114
|
+
export {
|
|
115
|
+
ve as B
|
|
116
|
+
};
|
package/dist/Button.js
CHANGED
package/dist/ButtonGroup.js
CHANGED
|
@@ -3,19 +3,21 @@
|
|
|
3
3
|
import o from "react";
|
|
4
4
|
import { C as m } from "./ClearPropsContext-CeCMjUK9.js";
|
|
5
5
|
import { P as l } from "./PropsContextProvider-DZvwqHLP.js";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
6
|
+
import "@react-aria/utils";
|
|
7
|
+
import "./propsContext-CauylOgH.js";
|
|
8
|
+
import "remeda";
|
|
9
|
+
import { d as i } from "./dynamic-ClpUSmEt.js";
|
|
8
10
|
import r from "clsx";
|
|
9
|
-
import { f } from "./flowComponent-
|
|
10
|
-
const d = "flow--button-group--button-group-container",
|
|
11
|
+
import { f as b } from "./flowComponent-C4FfRbD8.js";
|
|
12
|
+
const d = "flow--button-group--button-group-container", f = "flow--button-group", C = "flow--button-group--button", G = "flow--button-group--secondary", t = {
|
|
11
13
|
buttonGroupContainer: d,
|
|
12
|
-
buttonGroup:
|
|
13
|
-
button:
|
|
14
|
-
secondary:
|
|
15
|
-
},
|
|
16
|
-
const { children: e, className: s, ...u } =
|
|
14
|
+
buttonGroup: f,
|
|
15
|
+
button: C,
|
|
16
|
+
secondary: G
|
|
17
|
+
}, h = b("ButtonGroup", (n) => {
|
|
18
|
+
const { children: e, className: s, ...u } = n, a = r(t.buttonGroupContainer, s), p = {
|
|
17
19
|
Button: {
|
|
18
|
-
className:
|
|
20
|
+
className: i(
|
|
19
21
|
(c) => r(
|
|
20
22
|
t.button,
|
|
21
23
|
c.variant === "secondary" ? t.secondary : void 0
|
|
@@ -26,6 +28,6 @@ const d = "flow--button-group--button-group-container", C = "flow--button-group"
|
|
|
26
28
|
return /* @__PURE__ */ o.createElement(m, null, /* @__PURE__ */ o.createElement("div", { ...u, className: a }, /* @__PURE__ */ o.createElement("div", { className: t.buttonGroup, role: "group" }, /* @__PURE__ */ o.createElement(l, { props: p }, e))));
|
|
27
29
|
});
|
|
28
30
|
export {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
+
h as ButtonGroup,
|
|
32
|
+
h as default
|
|
31
33
|
};
|
|
@@ -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 h } from "./IconCheckboxEmpty-
|
|
9
|
-
import { I as C } from "./IconCheckboxIndeterminate-
|
|
7
|
+
import "./Icon-DpcNiaNb.js";
|
|
8
|
+
import { I as x, a as h } from "./IconCheckboxEmpty-0Lz4T3u4.js";
|
|
9
|
+
import { I as C } from "./IconCheckboxIndeterminate-p6GmeDnv.js";
|
|
10
10
|
import { C as f } from "./ClearPropsContext-CeCMjUK9.js";
|
|
11
11
|
import "./propsContext-CauylOgH.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-C4FfRbD8.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
|
@@ -7,8 +7,8 @@ import { P as p } from "./PropsContextProvider-DZvwqHLP.js";
|
|
|
7
7
|
import "@react-aria/utils";
|
|
8
8
|
import "./propsContext-CauylOgH.js";
|
|
9
9
|
import "remeda";
|
|
10
|
-
import { C as b } from "./Checkbox-
|
|
11
|
-
import { f as x } from "./flowComponent-
|
|
10
|
+
import { C as b } from "./Checkbox-C8yHXTDv.js";
|
|
11
|
+
import { f as x } from "./flowComponent-C4FfRbD8.js";
|
|
12
12
|
const C = "flow--checkbox-button", f = "flow--checkbox-button--label", i = "flow--checkbox-button--content", o = {
|
|
13
13
|
checkboxButton: C,
|
|
14
14
|
label: f,
|
package/dist/CheckboxButton.js
CHANGED
package/dist/CheckboxGroup.js
CHANGED
|
@@ -7,13 +7,13 @@ import "./propsContext-CauylOgH.js";
|
|
|
7
7
|
import { P as b } from "./PropsContextProvider-DZvwqHLP.js";
|
|
8
8
|
import "@react-aria/utils";
|
|
9
9
|
import "remeda";
|
|
10
|
-
import { F as h } from "./FieldError-
|
|
11
|
-
import { C as E } from "./CheckboxButton-
|
|
10
|
+
import { F as h } from "./FieldError-CDPZJvma.js";
|
|
11
|
+
import { C as E } from "./CheckboxButton-DaoWw8LD.js";
|
|
12
12
|
import { TunnelProvider as k, TunnelExit as r } from "@mittwald/react-tunnel";
|
|
13
13
|
import { s as o } from "./FormField.module-DHK6nIcD.js";
|
|
14
14
|
import { C } from "./ColumnLayout-FMONjI17.js";
|
|
15
15
|
import { d as N } from "./deepFindOfType-6pG0fH7S.js";
|
|
16
|
-
import { f as F } from "./flowComponent-
|
|
16
|
+
import { f as F } from "./flowComponent-C4FfRbD8.js";
|
|
17
17
|
const G = "flow--checkbox-group", s = {
|
|
18
18
|
checkboxGroup: G
|
|
19
19
|
}, j = F("CheckboxGroup", (l) => {
|
package/dist/Content.js
CHANGED
|
@@ -6,7 +6,7 @@ import "./propsContext-CauylOgH.js";
|
|
|
6
6
|
import "@react-aria/utils";
|
|
7
7
|
import "remeda";
|
|
8
8
|
import "dot-prop";
|
|
9
|
-
import { f as i } from "./flowComponent-
|
|
9
|
+
import { f as i } from "./flowComponent-C4FfRbD8.js";
|
|
10
10
|
const E = i("Content", (e) => {
|
|
11
11
|
const { children: o, elementType: r = "div", ref: n, ...m } = e, p = r;
|
|
12
12
|
return /* @__PURE__ */ t.createElement(l, null, /* @__PURE__ */ t.createElement(p, { ref: n, ...m }, o));
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* */
|
|
3
3
|
import e from "react";
|
|
4
4
|
import * as u from "react-aria-components";
|
|
5
|
-
import { f as d } from "./flowComponent-
|
|
5
|
+
import { f as d } from "./flowComponent-C4FfRbD8.js";
|
|
6
6
|
import { P as x } from "./Popover-MmxZkKu3.js";
|
|
7
7
|
import { C } from "./ClearPropsContext-CeCMjUK9.js";
|
|
8
8
|
import { P as M } from "./PropsContextProvider-DZvwqHLP.js";
|
package/dist/ContextMenu.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
|
-
import { C as r } from "./ContextMenu-
|
|
4
|
-
import { M as n } from "./MenuItem-
|
|
3
|
+
import { C as r } from "./ContextMenu-B3m9vxOe.js";
|
|
4
|
+
import { M as n } from "./MenuItem-B5kgO_0u.js";
|
|
5
5
|
import { MenuTrigger as m } from "react-aria-components";
|
|
6
6
|
export {
|
|
7
7
|
r as ContextMenu,
|
package/dist/CopyButton.js
CHANGED
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
/* */
|
|
3
3
|
import o from "react";
|
|
4
4
|
import a from "copy-to-clipboard";
|
|
5
|
-
import { B as i } from "./Button-
|
|
5
|
+
import { B as i } from "./Button-DJcL25jy.js";
|
|
6
6
|
import "@tabler/icons-react";
|
|
7
|
-
import "./Icon-
|
|
8
|
-
import { I as c } from "./IconCopy-
|
|
7
|
+
import "./Icon-DpcNiaNb.js";
|
|
8
|
+
import { I as c } from "./IconCopy-BOSbNCO3.js";
|
|
9
9
|
import { useLocalizedStringFormatter as l } from "react-aria";
|
|
10
|
-
import { a as s, T as
|
|
11
|
-
import { onlyText as
|
|
10
|
+
import { a as s, T as u } from "./TooltipTrigger-TslkLN5s.js";
|
|
11
|
+
import { onlyText as f } from "react-children-utilities";
|
|
12
12
|
import { C as y } from "./ClearPropsContext-CeCMjUK9.js";
|
|
13
13
|
import "./propsContext-CauylOgH.js";
|
|
14
14
|
import "@react-aria/utils";
|
|
15
15
|
import "remeda";
|
|
16
16
|
import "dot-prop";
|
|
17
|
-
import { f as C } from "./flowComponent-
|
|
18
|
-
import { A as E } from "./Action-
|
|
17
|
+
import { f as C } from "./flowComponent-C4FfRbD8.js";
|
|
18
|
+
import { A as E } from "./Action-Bu-hapYW.js";
|
|
19
19
|
const B = {
|
|
20
20
|
"de-DE": {
|
|
21
21
|
"copyButton.copy": "Kopieren"
|
|
@@ -23,13 +23,13 @@ const B = {
|
|
|
23
23
|
"en-EN": {
|
|
24
24
|
"copyButton.copy": "Copy"
|
|
25
25
|
}
|
|
26
|
-
},
|
|
26
|
+
}, R = C("CopyButton", (r) => {
|
|
27
27
|
const { text: e, ref: m, ...n } = r, t = l(B).format("copyButton.copy"), p = () => {
|
|
28
|
-
a(
|
|
28
|
+
a(f(e));
|
|
29
29
|
};
|
|
30
|
-
return /* @__PURE__ */ o.createElement(y, null, /* @__PURE__ */ o.createElement(s, null, /* @__PURE__ */ o.createElement(E, { action: p,
|
|
30
|
+
return /* @__PURE__ */ o.createElement(y, null, /* @__PURE__ */ o.createElement(s, null, /* @__PURE__ */ o.createElement(E, { action: p, showFeedback: !0 }, /* @__PURE__ */ o.createElement(i, { "aria-label": t, ...n, ref: m }, /* @__PURE__ */ o.createElement(c, null))), /* @__PURE__ */ o.createElement(u, null, t)));
|
|
31
31
|
});
|
|
32
32
|
export {
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
R as CopyButton,
|
|
34
|
+
R as default
|
|
35
35
|
};
|
package/dist/FieldDescription.js
CHANGED
|
@@ -7,8 +7,8 @@ import "./propsContext-CauylOgH.js";
|
|
|
7
7
|
import "@react-aria/utils";
|
|
8
8
|
import "remeda";
|
|
9
9
|
import "dot-prop";
|
|
10
|
-
import { T as c } from "./Text-
|
|
11
|
-
import { f as p } from "./flowComponent-
|
|
10
|
+
import { T as c } from "./Text-DlBpZns-.js";
|
|
11
|
+
import { f as p } from "./flowComponent-C4FfRbD8.js";
|
|
12
12
|
const a = "flow--field-description", f = {
|
|
13
13
|
fieldDescription: a
|
|
14
14
|
}, T = p("FieldDescription", (e) => {
|
|
@@ -9,9 +9,9 @@ import "@react-aria/utils";
|
|
|
9
9
|
import "remeda";
|
|
10
10
|
import "dot-prop";
|
|
11
11
|
import "@tabler/icons-react";
|
|
12
|
-
import "./Icon-
|
|
13
|
-
import { I as p } from "./IconDanger-
|
|
14
|
-
import { f } from "./flowComponent-
|
|
12
|
+
import "./Icon-DpcNiaNb.js";
|
|
13
|
+
import { I as p } from "./IconDanger-BCQl3s0h.js";
|
|
14
|
+
import { f } from "./flowComponent-C4FfRbD8.js";
|
|
15
15
|
const E = "flow--field-error", d = {
|
|
16
16
|
fieldError: E
|
|
17
17
|
}, z = f("FieldError", (o) => {
|
package/dist/FieldError.js
CHANGED
package/dist/Header.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
3
|
import m from "react";
|
|
4
|
-
import { f as c } from "./flowComponent-
|
|
4
|
+
import { f as c } from "./flowComponent-C4FfRbD8.js";
|
|
5
5
|
const s = c("Header", (e) => {
|
|
6
6
|
const { children: t, ref: r, elementType: o = "header", ...n } = e, a = o;
|
|
7
7
|
return /* @__PURE__ */ m.createElement(a, { ...n, ref: r }, t);
|