@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
package/dist/Action-XlqKlkaB.js
DELETED
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
/* */
|
|
3
|
-
var S = Object.defineProperty;
|
|
4
|
-
var A = (e, t, o) => t in e ? S(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o;
|
|
5
|
-
var d = (e, t, o) => (A(e, typeof t != "symbol" ? t + "" : t, o), o);
|
|
6
|
-
import b, { useRef as M } from "react";
|
|
7
|
-
import "./propsContext-CauylOgH.js";
|
|
8
|
-
import { P as y } from "./PropsContextProvider-DZvwqHLP.js";
|
|
9
|
-
import "@react-aria/utils";
|
|
10
|
-
import "remeda";
|
|
11
|
-
import "dot-prop";
|
|
12
|
-
import { u as P } from "./useProps-DfMs_ElR.js";
|
|
13
|
-
import { u as C } from "./index-ViVxK7d1.js";
|
|
14
|
-
import { makeObservable as F, observable as k, runInAction as x } from "mobx";
|
|
15
|
-
import { u as I } from "./useSelector-DpU7_HMO.js";
|
|
16
|
-
const v = () => {
|
|
17
|
-
}, w = (e) => {
|
|
18
|
-
const t = C();
|
|
19
|
-
return (e == null ? void 0 : e.type) === "function" ? e.fn : (e == null ? void 0 : e.type) === "toggleModal" ? t.toggle : (e == null ? void 0 : e.type) === "openModal" ? t.open : (e == null ? void 0 : e.type) === "closeModal" ? t.close : v;
|
|
20
|
-
}, g = (e, t) => {
|
|
21
|
-
const o = [...t];
|
|
22
|
-
let s;
|
|
23
|
-
for (; o.length > 0; )
|
|
24
|
-
if (s = o.shift(), s) {
|
|
25
|
-
const i = s(...e);
|
|
26
|
-
if (i instanceof Promise)
|
|
27
|
-
return i.then(() => g(e, o));
|
|
28
|
-
}
|
|
29
|
-
}, p = {
|
|
30
|
-
pending: 1e3,
|
|
31
|
-
succeeded: 1500,
|
|
32
|
-
failed: 2e3
|
|
33
|
-
};
|
|
34
|
-
class f {
|
|
35
|
-
constructor(t = {}) {
|
|
36
|
-
d(this, "feedback");
|
|
37
|
-
d(this, "executionCount", 0);
|
|
38
|
-
d(this, "state", "isIdle");
|
|
39
|
-
const { feedback: o = !1 } = t;
|
|
40
|
-
this.feedback = o, F(this, {
|
|
41
|
-
state: k
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
static useNew(t) {
|
|
45
|
-
return M(new f(t)).current;
|
|
46
|
-
}
|
|
47
|
-
onAsyncStart() {
|
|
48
|
-
const t = ++this.executionCount;
|
|
49
|
-
this.updateState("isExecuting"), setTimeout(() => this.startPending(t), p.pending);
|
|
50
|
-
}
|
|
51
|
-
onSucceeded() {
|
|
52
|
-
this.onDone(!0);
|
|
53
|
-
}
|
|
54
|
-
onFailed() {
|
|
55
|
-
this.onDone(!1);
|
|
56
|
-
}
|
|
57
|
-
updateState(t) {
|
|
58
|
-
x(() => {
|
|
59
|
-
this.state = t;
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
startFailedFeedback() {
|
|
63
|
-
this.updateState("isFailed"), setTimeout(() => this.updateState("isIdle"), p.failed);
|
|
64
|
-
}
|
|
65
|
-
startSucceededFeedback() {
|
|
66
|
-
this.updateState("isSucceeded"), setTimeout(() => this.updateState("isIdle"), p.succeeded);
|
|
67
|
-
}
|
|
68
|
-
onDone(t) {
|
|
69
|
-
if (!this.feedback) {
|
|
70
|
-
this.updateState("isIdle");
|
|
71
|
-
return;
|
|
72
|
-
}
|
|
73
|
-
t ? this.startSucceededFeedback() : this.startFailedFeedback();
|
|
74
|
-
}
|
|
75
|
-
startPending(t) {
|
|
76
|
-
this.state === "isExecuting" && t === this.executionCount && this.updateState("isPending");
|
|
77
|
-
}
|
|
78
|
-
useState() {
|
|
79
|
-
return I(() => this.state, [this]);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
const W = (e, t) => {
|
|
83
|
-
const { action: o } = P("Action", {}), s = w(e), i = (...c) => g(c, [s, o]), n = f.useNew(t);
|
|
84
|
-
return {
|
|
85
|
-
callAction: i,
|
|
86
|
-
callActionWithStateHandling: (...c) => {
|
|
87
|
-
try {
|
|
88
|
-
const a = i(...c);
|
|
89
|
-
if (a instanceof Promise)
|
|
90
|
-
return n.onAsyncStart(), a.then(() => n.onSucceeded()).catch(() => n.onFailed());
|
|
91
|
-
n.onSucceeded();
|
|
92
|
-
} catch {
|
|
93
|
-
n.onFailed();
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
state: n
|
|
97
|
-
};
|
|
98
|
-
};
|
|
99
|
-
function h(e) {
|
|
100
|
-
return typeof e == "boolean" ? void 0 : e;
|
|
101
|
-
}
|
|
102
|
-
const r = {
|
|
103
|
-
fn: (e) => ({
|
|
104
|
-
type: "function",
|
|
105
|
-
fn: e
|
|
106
|
-
}),
|
|
107
|
-
openModal: (e) => ({
|
|
108
|
-
type: "openModal",
|
|
109
|
-
controller: h(e)
|
|
110
|
-
}),
|
|
111
|
-
closeModal: (e) => ({
|
|
112
|
-
type: "closeModal",
|
|
113
|
-
controller: h(e)
|
|
114
|
-
}),
|
|
115
|
-
toggleModal: (e) => ({
|
|
116
|
-
type: "toggleModal",
|
|
117
|
-
controller: h(e)
|
|
118
|
-
})
|
|
119
|
-
}, G = (e) => {
|
|
120
|
-
const {
|
|
121
|
-
children: t,
|
|
122
|
-
feedback: o,
|
|
123
|
-
action: s,
|
|
124
|
-
toggleModal: i,
|
|
125
|
-
openModal: n,
|
|
126
|
-
closeModal: u
|
|
127
|
-
} = e, c = s ? r.fn(s) : i ? r.toggleModal(i) : n ? r.openModal(n) : u ? r.closeModal(u) : void 0, a = W(c, {
|
|
128
|
-
feedback: o
|
|
129
|
-
}), l = a.state.useState(), m = {
|
|
130
|
-
Button: {
|
|
131
|
-
onPress: a.callActionWithStateHandling,
|
|
132
|
-
isPending: l === "isPending",
|
|
133
|
-
"aria-disabled": l !== "isIdle",
|
|
134
|
-
isSucceeded: l === "isSucceeded",
|
|
135
|
-
isFailed: l === "isFailed"
|
|
136
|
-
},
|
|
137
|
-
Action: {
|
|
138
|
-
action: a.callAction
|
|
139
|
-
}
|
|
140
|
-
};
|
|
141
|
-
return /* @__PURE__ */ b.createElement(
|
|
142
|
-
y,
|
|
143
|
-
{
|
|
144
|
-
mergeInParentContext: !0,
|
|
145
|
-
props: m,
|
|
146
|
-
dependencies: [l]
|
|
147
|
-
},
|
|
148
|
-
t
|
|
149
|
-
);
|
|
150
|
-
};
|
|
151
|
-
export {
|
|
152
|
-
G as A
|
|
153
|
-
};
|
package/dist/Button-CZjBV5AM.js
DELETED
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
/* */
|
|
3
|
-
import o, { useEffect as p } from "react";
|
|
4
|
-
import * as S from "react-aria-components";
|
|
5
|
-
import x from "clsx";
|
|
6
|
-
import { C as F } from "./ClearPropsContext-CeCMjUK9.js";
|
|
7
|
-
import { P as y } 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-DwHDa4pA.js";
|
|
13
|
-
import { I as E, a as C } from "./IconSucceeded-CHjiCCzR.js";
|
|
14
|
-
import { W as I } from "./Wrap-DGT1h1o3.js";
|
|
15
|
-
import { T as N } from "./Text-CKd46eHq.js";
|
|
16
|
-
import { f as h } from "./flowComponent-dvQga3NG.js";
|
|
17
|
-
import { L as A } from "./LoadingSpinner-BOBbSYun.js";
|
|
18
|
-
import { useLocalizedStringFormatter as D } from "react-aria";
|
|
19
|
-
import { useLiveRegion as T } from "@chakra-ui/live-region";
|
|
20
|
-
const z = "flow--button", B = "flow--button--content", L = "flow--button--state-icon", k = "flow--button--avatar", R = "flow--button--icon", K = "flow--button--text", U = "flow--button--is-succeeded", W = "flow--button--is-failed", $ = "flow--button--is-pending", j = "flow--button--plain", q = "flow--button--primary", G = "flow--button--solid", H = "flow--button--aria-disabled", J = "flow--button--accent", M = "flow--button--danger", O = "flow--button--secondary", Q = "flow--button--soft", t = {
|
|
21
|
-
button: z,
|
|
22
|
-
content: B,
|
|
23
|
-
stateIcon: L,
|
|
24
|
-
avatar: k,
|
|
25
|
-
icon: R,
|
|
26
|
-
text: K,
|
|
27
|
-
isSucceeded: U,
|
|
28
|
-
isFailed: W,
|
|
29
|
-
isPending: $,
|
|
30
|
-
plain: j,
|
|
31
|
-
"size-s": "flow--button--size-s",
|
|
32
|
-
primary: q,
|
|
33
|
-
solid: G,
|
|
34
|
-
ariaDisabled: H,
|
|
35
|
-
accent: J,
|
|
36
|
-
danger: M,
|
|
37
|
-
secondary: O,
|
|
38
|
-
soft: Q
|
|
39
|
-
}, V = {
|
|
40
|
-
"de-DE": {
|
|
41
|
-
"action.isFailed": "Fehlgeschlagen",
|
|
42
|
-
"action.isPending": "Ausstehend...",
|
|
43
|
-
"action.isSucceeded": "Erfolgreich"
|
|
44
|
-
},
|
|
45
|
-
"en-EN": {
|
|
46
|
-
"action.isFailed": "Failed",
|
|
47
|
-
"action.isPending": "Pending...",
|
|
48
|
-
"action.isSucceeded": "Succeeded"
|
|
49
|
-
}
|
|
50
|
-
}, X = (e, c = {}) => {
|
|
51
|
-
const i = D(V), {
|
|
52
|
-
isPendingText: a = i.format("action.isPending"),
|
|
53
|
-
isSucceededText: d = i.format("action.isSucceeded"),
|
|
54
|
-
isFailedText: s = i.format("action.isFailed")
|
|
55
|
-
} = c, n = T({
|
|
56
|
-
"aria-live": "polite",
|
|
57
|
-
"aria-atomic": !1,
|
|
58
|
-
"aria-relevant": "text additions",
|
|
59
|
-
role: "status"
|
|
60
|
-
});
|
|
61
|
-
p(() => {
|
|
62
|
-
e === "isPending" ? n.speak(a) : e === "isSucceeded" ? n.speak(d) : e === "isFailed" && n.speak(s);
|
|
63
|
-
}, [e]);
|
|
64
|
-
}, Y = (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), be = h("Button", (e) => {
|
|
65
|
-
e = Y(e);
|
|
66
|
-
const {
|
|
67
|
-
variant: c = "primary",
|
|
68
|
-
style: i = "solid",
|
|
69
|
-
children: a,
|
|
70
|
-
className: d,
|
|
71
|
-
size: s = "m",
|
|
72
|
-
isPending: n,
|
|
73
|
-
isSucceeded: r,
|
|
74
|
-
isFailed: l,
|
|
75
|
-
"aria-disabled": f,
|
|
76
|
-
ref: u,
|
|
77
|
-
...b
|
|
78
|
-
} = e, g = x(
|
|
79
|
-
t.button,
|
|
80
|
-
n && t.isPending,
|
|
81
|
-
r && t.isSucceeded,
|
|
82
|
-
l && t.isFailed,
|
|
83
|
-
t[`size-${s}`],
|
|
84
|
-
t[c],
|
|
85
|
-
t[i],
|
|
86
|
-
d,
|
|
87
|
-
/**
|
|
88
|
-
* Workaround warning: The Aria.Button does not support "aria-disabled" by
|
|
89
|
-
* now, so this Button will be visually disabled via CSS.
|
|
90
|
-
*/
|
|
91
|
-
f && t.ariaDisabled
|
|
92
|
-
);
|
|
93
|
-
X(
|
|
94
|
-
n ? "isPending" : r ? "isSucceeded" : l ? "isFailed" : "isIdle"
|
|
95
|
-
);
|
|
96
|
-
const P = {
|
|
97
|
-
Icon: {
|
|
98
|
-
className: t.icon,
|
|
99
|
-
"aria-hidden": !0,
|
|
100
|
-
size: s
|
|
101
|
-
},
|
|
102
|
-
Text: {
|
|
103
|
-
className: t.text
|
|
104
|
-
},
|
|
105
|
-
Avatar: {
|
|
106
|
-
className: t.avatar
|
|
107
|
-
}
|
|
108
|
-
}, m = r ? E : l ? C : n ? A : void 0, w = m && /* @__PURE__ */ o.createElement(m, { size: s, className: t.stateIcon }), v = typeof a == "string";
|
|
109
|
-
return /* @__PURE__ */ o.createElement(F, null, /* @__PURE__ */ o.createElement(S.Button, { className: g, ref: u, ...b }, /* @__PURE__ */ o.createElement(y, { props: P }, /* @__PURE__ */ o.createElement("span", { className: t.content }, /* @__PURE__ */ o.createElement(I, { if: v }, /* @__PURE__ */ o.createElement(N, null, a)))), w));
|
|
110
|
-
});
|
|
111
|
-
export {
|
|
112
|
-
be as B
|
|
113
|
-
};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
/* */
|
|
3
|
-
import o from "react";
|
|
4
|
-
import "@tabler/icons-react";
|
|
5
|
-
import "./Icon-DwHDa4pA.js";
|
|
6
|
-
import { I as c } from "./IconDanger-MdCt1mDP.js";
|
|
7
|
-
import { I as e, a as i, b as m } from "./IconWarning-Dbq3oj5j.js";
|
|
8
|
-
import { useLocalizedStringFormatter as u } from "react-aria";
|
|
9
|
-
import { C as I } from "./ClearPropsContext-CeCMjUK9.js";
|
|
10
|
-
import "./propsContext-CauylOgH.js";
|
|
11
|
-
import "@react-aria/utils";
|
|
12
|
-
import "remeda";
|
|
13
|
-
import "dot-prop";
|
|
14
|
-
const f = {
|
|
15
|
-
"de-DE": {
|
|
16
|
-
"statusIcon.danger": "Fehler",
|
|
17
|
-
"statusIcon.info": "Information",
|
|
18
|
-
"statusIcon.success": "Erfolgreich",
|
|
19
|
-
"statusIcon.warning": "Warnung"
|
|
20
|
-
},
|
|
21
|
-
"en-EN": {
|
|
22
|
-
"statusIcon.danger": "Error",
|
|
23
|
-
"statusIcon.info": "Information",
|
|
24
|
-
"statusIcon.success": "Successful",
|
|
25
|
-
"statusIcon.warning": "Warning"
|
|
26
|
-
}
|
|
27
|
-
}, g = {
|
|
28
|
-
danger: c,
|
|
29
|
-
info: e,
|
|
30
|
-
success: i,
|
|
31
|
-
warning: m
|
|
32
|
-
}, D = (n) => {
|
|
33
|
-
const { status: t = "info", ...r } = n, s = u(f).format(`statusIcon.${t}`), a = g[t];
|
|
34
|
-
return /* @__PURE__ */ o.createElement(I, null, /* @__PURE__ */ o.createElement(a, { "aria-label": s, ...r }));
|
|
35
|
-
};
|
|
36
|
-
export {
|
|
37
|
-
D as S
|
|
38
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
/* */
|
|
3
|
-
import n, { forwardRef as s } from "react";
|
|
4
|
-
import "./propsContext-CauylOgH.js";
|
|
5
|
-
import "@react-aria/utils";
|
|
6
|
-
import "remeda";
|
|
7
|
-
import "dot-prop";
|
|
8
|
-
import { u as a } from "./useProps-DfMs_ElR.js";
|
|
9
|
-
import { TunnelEntry as c } from "@mittwald/react-tunnel";
|
|
10
|
-
function T(m, i) {
|
|
11
|
-
return s((e, p) => {
|
|
12
|
-
const { tunnelId: r, hoc: o, ...f } = a(
|
|
13
|
-
m,
|
|
14
|
-
e
|
|
15
|
-
), l = f;
|
|
16
|
-
let t = /* @__PURE__ */ n.createElement(i, { ...l, ref: p });
|
|
17
|
-
return o && (t = o(t, e)), r && (t = /* @__PURE__ */ n.createElement(c, { id: r }, t)), t;
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
export {
|
|
21
|
-
T as f
|
|
22
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
interface Options {
|
|
2
|
-
feedback?: boolean;
|
|
3
|
-
}
|
|
4
|
-
export type ActionStateValue = "isIdle" | "isSucceeded" | "isPending" | "isExecuting" | "isFailed";
|
|
5
|
-
export declare class ActionState {
|
|
6
|
-
private readonly feedback;
|
|
7
|
-
private executionCount;
|
|
8
|
-
state: ActionStateValue;
|
|
9
|
-
private constructor();
|
|
10
|
-
static useNew(opts?: Options): ActionState;
|
|
11
|
-
onAsyncStart(): void;
|
|
12
|
-
onSucceeded(): void;
|
|
13
|
-
onFailed(): void;
|
|
14
|
-
private updateState;
|
|
15
|
-
private startFailedFeedback;
|
|
16
|
-
private startSucceededFeedback;
|
|
17
|
-
private onDone;
|
|
18
|
-
private startPending;
|
|
19
|
-
useState(): ActionStateValue;
|
|
20
|
-
}
|
|
21
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { OverlayState } from '../../lib/controller/overlay';
|
|
2
|
-
import { ActionFn, CloseModalAction, FunctionAction, OpenModalAction, ToggleModalAction } from './types';
|
|
3
|
-
|
|
4
|
-
type ModalActionArg = boolean | OverlayState;
|
|
5
|
-
export declare const actions: {
|
|
6
|
-
fn: (fn: ActionFn) => FunctionAction;
|
|
7
|
-
openModal: (arg: ModalActionArg) => OpenModalAction;
|
|
8
|
-
closeModal: (arg: ModalActionArg) => CloseModalAction;
|
|
9
|
-
toggleModal: (arg: ModalActionArg) => ToggleModalAction;
|
|
10
|
-
};
|
|
11
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ActionState } from '../ActionState';
|
|
2
|
-
import { ActionFn, ActionType } from '../types';
|
|
3
|
-
|
|
4
|
-
interface Options {
|
|
5
|
-
feedback?: boolean;
|
|
6
|
-
}
|
|
7
|
-
interface ActionController {
|
|
8
|
-
state: ActionState;
|
|
9
|
-
callAction: ActionFn;
|
|
10
|
-
callActionWithStateHandling: ActionFn;
|
|
11
|
-
}
|
|
12
|
-
export declare const useCallAction: (action?: ActionType, options?: Options) => ActionController;
|
|
13
|
-
export {};
|