@mittwald/flow-react-components 0.1.0-alpha.136 → 0.1.0-alpha.138

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.
Files changed (33) hide show
  1. package/dist/{Action-Dp9FyJCZ.js → Action-BGsLXvb9.js} +114 -110
  2. package/dist/Action.js +1 -1
  3. package/dist/ActionGroup.js +1 -1
  4. package/dist/ContextMenu.js +2 -2
  5. package/dist/ContextMenuTrigger-DjZx2IST.js +52 -0
  6. package/dist/ContextualHelp.js +50 -0
  7. package/dist/CopyButton.js +1 -1
  8. package/dist/IconInfo-Dzy8qZId.js +9 -0
  9. package/dist/IconWarning-DHYHv9V-.js +10 -0
  10. package/dist/Icons.js +20 -19
  11. package/dist/InlineAlert.js +1 -1
  12. package/dist/List.js +1 -1
  13. package/dist/Modal.js +12 -12
  14. package/dist/Notification.js +1 -1
  15. package/dist/NotificationProvider.js +19 -19
  16. package/dist/OffCanvas.js +1 -1
  17. package/dist/StatusBadge.js +1 -1
  18. package/dist/{StatusIcon-Dj5p-iL1.js → StatusIcon-l795M3JX.js} +6 -5
  19. package/dist/StatusIcon.js +1 -1
  20. package/dist/Tabs.js +1 -1
  21. package/dist/{getActionGroupSlot-izllH4ID.js → getActionGroupSlot-Do-bk4GU.js} +7 -7
  22. package/dist/styles.css +1 -1
  23. package/dist/types/components/ContextualHelp/ContextualHelp.d.ts +6 -0
  24. package/dist/types/components/ContextualHelp/components/ContextualHelpTrigger/ContextualHelpTrigger.d.ts +5 -0
  25. package/dist/types/components/ContextualHelp/components/ContextualHelpTrigger/index.d.ts +4 -0
  26. package/dist/types/components/ContextualHelp/index.d.ts +5 -0
  27. package/dist/types/components/ContextualHelp/stories/Default.stories.d.ts +7 -0
  28. package/dist/types/components/NotificationProvider/NotificationContainer.d.ts +5 -0
  29. package/dist/types/components/NotificationProvider/NotificationProvider.d.ts +2 -1
  30. package/package.json +16 -12
  31. package/dist/ContextMenuTrigger-BwhLrGm5.js +0 -51
  32. package/dist/IconWarning-DFG_1t6M.js +0 -11
  33. package/dist/types/components/NotificationProvider/NotificationsContainer.d.ts +0 -8
package/dist/Modal.js CHANGED
@@ -11,7 +11,7 @@ import { f as u } from "./flowComponent-CPKCCJEg.js";
11
11
  import { M as g } from "./ModalOverlay-BSu4UEnW.js";
12
12
  import * as v from "react-aria-components";
13
13
  import { O as w } from "./OverlayTrigger-DbjMkqKf.js";
14
- const z = "flow--modal", C = "flow--modal--action-group", E = "flow--modal--content", x = "flow--modal--off-canvas", e = {
14
+ const z = "flow--modal", C = "flow--modal--action-group", E = "flow--modal--content", T = "flow--modal--off-canvas", e = {
15
15
  modal: z,
16
16
  "modal-zoom": "flow--modal--modal-zoom",
17
17
  actionGroup: C,
@@ -19,20 +19,20 @@ const z = "flow--modal", C = "flow--modal--action-group", E = "flow--modal--cont
19
19
  "size-s": "flow--modal--size-s",
20
20
  "size-m": "flow--modal--size-m",
21
21
  "size-l": "flow--modal--size-l",
22
- offCanvas: x,
22
+ offCanvas: T,
23
23
  "modal-slide-in": "flow--modal--modal-slide-in",
24
24
  "modal-slide-up": "flow--modal--modal-slide-up"
25
- }, R = u("Modal", (t) => {
25
+ }, D = u("Modal", (l) => {
26
26
  const {
27
- size: l = "s",
27
+ size: t = "s",
28
28
  offCanvas: a,
29
29
  controller: n,
30
30
  children: r,
31
- refProp: P,
31
+ refProp: x,
32
32
  ...m
33
- } = t, s = d(
33
+ } = l, s = d(
34
34
  e.modal,
35
- e[`size-${l}`],
35
+ e[`size-${t}`],
36
36
  a && e.offCanvas
37
37
  ), i = {
38
38
  Content: {
@@ -47,10 +47,10 @@ const z = "flow--modal", C = "flow--modal--action-group", E = "flow--modal--cont
47
47
  tunnelId: "buttons"
48
48
  }
49
49
  };
50
- return /* @__PURE__ */ o.createElement(g, { className: s, controller: n, ...m }, /* @__PURE__ */ o.createElement(c, { props: i, mergeInParentContext: !0 }, /* @__PURE__ */ o.createElement(f, null, /* @__PURE__ */ o.createElement("div", { className: e.content }, r), /* @__PURE__ */ o.createElement(p, { id: "buttons" }))));
51
- }), D = (t) => /* @__PURE__ */ o.createElement(w, null, /* @__PURE__ */ o.createElement(v.DialogTrigger, null, t.children));
50
+ return /* @__PURE__ */ o.createElement(g, { className: s, controller: n, ...m }, /* @__PURE__ */ o.createElement(c, { props: i }, /* @__PURE__ */ o.createElement(f, null, /* @__PURE__ */ o.createElement("div", { className: e.content }, r), /* @__PURE__ */ o.createElement(p, { id: "buttons" }))));
51
+ }), F = (l) => /* @__PURE__ */ o.createElement(w, null, /* @__PURE__ */ o.createElement(v.DialogTrigger, null, l.children));
52
52
  export {
53
- R as Modal,
54
- D as ModalTrigger,
55
- R as default
53
+ D as Modal,
54
+ F as ModalTrigger,
55
+ D as default
56
56
  };
@@ -6,7 +6,7 @@ import "./propsContext-DzAKlmhS.js";
6
6
  import { P as w } from "./PropsContextProvider-C6Z4XGp6.js";
7
7
  import "@react-aria/utils";
8
8
  import "remeda";
9
- import { S as g } from "./StatusIcon-Dj5p-iL1.js";
9
+ import { S as g } from "./StatusIcon-l795M3JX.js";
10
10
  import { L as h } from "./Link-CcYCy_KC.js";
11
11
  import { B as k } from "./Button-BPAhEOTg.js";
12
12
  import "@tabler/icons-react";
@@ -1,8 +1,8 @@
1
1
  "use client"
2
2
  /* */
3
3
  var w = Object.defineProperty;
4
- var A = (i, t, e) => t in i ? w(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
5
- var o = (i, t, e) => (A(i, typeof t != "symbol" ? t + "" : t, e), e);
4
+ var A = (o, t, e) => t in o ? w(o, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[t] = e;
5
+ var i = (o, t, e) => (A(o, typeof t != "symbol" ? t + "" : t, e), e);
6
6
  import s, { useRef as v, cloneElement as D, createContext as C, useContext as N } from "react";
7
7
  import { u as E } from "./useSelector-DpU7_HMO.js";
8
8
  import { makeObservable as g, observable as x, action as c } from "mobx";
@@ -13,11 +13,11 @@ import { LazyMotion as I, domAnimation as M, AnimatePresence as P, m as k } from
13
13
  import { useIsSSR as L } from "react-aria";
14
14
  class R {
15
15
  constructor() {
16
- o(this, "duration", u.fromDurationLike(0));
17
- o(this, "onDone");
18
- o(this, "startedAt");
19
- o(this, "pausedAt");
20
- o(this, "runningTimeoutId");
16
+ i(this, "duration", u.fromDurationLike(0));
17
+ i(this, "onDone");
18
+ i(this, "startedAt");
19
+ i(this, "pausedAt");
20
+ i(this, "runningTimeoutId");
21
21
  }
22
22
  start(t, e) {
23
23
  if (this.startedAt)
@@ -58,8 +58,8 @@ class R {
58
58
  }
59
59
  class a {
60
60
  constructor() {
61
- o(this, "notificationsData", /* @__PURE__ */ new Map());
62
- o(this, "id", 0);
61
+ i(this, "notificationsData", /* @__PURE__ */ new Map());
62
+ i(this, "id", 0);
63
63
  g(this, {
64
64
  notificationsData: x.shallow,
65
65
  add: c.bound,
@@ -92,8 +92,8 @@ class a {
92
92
  const S = "flow--notification-provider--notification-container", O = "flow--notification-provider--notification", d = {
93
93
  notificationContainer: S,
94
94
  notification: O
95
- }, z = (i) => {
96
- const { notification: t, controller: e } = i;
95
+ }, z = (o) => {
96
+ const { notification: t, controller: e } = o;
97
97
  return D(t.element, {
98
98
  onMouseEnter: () => {
99
99
  t.meta.autoCloseTimer.pause();
@@ -105,8 +105,8 @@ const S = "flow--notification-provider--notification-container", O = "flow--noti
105
105
  e.remove(t.meta.id);
106
106
  }
107
107
  });
108
- }, B = (i) => {
109
- const { className: t, controller: e, ...n } = i, f = b(d.notificationContainer, t), h = e.useNotifications(), p = L(), T = /* @__PURE__ */ s.createElement(I, { features: M }, /* @__PURE__ */ s.createElement("div", { className: f, ...n }, /* @__PURE__ */ s.createElement(P, null, h.map((r) => /* @__PURE__ */ s.createElement(
108
+ }, B = (o) => {
109
+ const { className: t, ...e } = o, n = j(), f = n.useNotifications(), h = L(), p = b(d.notificationContainer, t), T = /* @__PURE__ */ s.createElement(I, { features: M }, /* @__PURE__ */ s.createElement("div", { className: p, ...e }, /* @__PURE__ */ s.createElement(P, null, f.map((r) => /* @__PURE__ */ s.createElement(
110
110
  k.div,
111
111
  {
112
112
  className: d.notification,
@@ -122,19 +122,19 @@ const S = "flow--notification-provider--notification-container", O = "flow--noti
122
122
  z,
123
123
  {
124
124
  notification: r,
125
- controller: e
125
+ controller: n
126
126
  }
127
127
  )
128
128
  )))));
129
- return p ? null : y.createPortal(T, document.body);
129
+ return h ? null : y.createPortal(T, document.body);
130
130
  }, l = C(
131
131
  new a()
132
- ), V = () => N(l), W = (i) => {
133
- const { children: t, ...e } = i, n = a.useNew();
134
- return /* @__PURE__ */ s.createElement(l.Provider, { value: n }, /* @__PURE__ */ s.createElement(B, { controller: n, ...e }), t);
132
+ ), j = () => N(l), W = (o) => {
133
+ const { children: t, ...e } = o, n = a.useNew();
134
+ return /* @__PURE__ */ s.createElement(l.Provider, { value: n }, /* @__PURE__ */ s.createElement(B, { ...e }), t);
135
135
  };
136
136
  export {
137
137
  W as NotificationProvider,
138
138
  W as default,
139
- V as useNotificationController
139
+ j as useNotificationController
140
140
  };
package/dist/OffCanvas.js CHANGED
@@ -6,7 +6,7 @@ import { B as f } from "./Button-BPAhEOTg.js";
6
6
  import "@tabler/icons-react";
7
7
  import "./Icon-D4bkU_pz.js";
8
8
  import { I as m } from "./IconClose-FTrJdf_N.js";
9
- import { A as i } from "./Action-Dp9FyJCZ.js";
9
+ import { A as i } from "./Action-BGsLXvb9.js";
10
10
  import { M as p } from "./ModalOverlay-BSu4UEnW.js";
11
11
  import "./propsContext-DzAKlmhS.js";
12
12
  import { P as v } from "./PropsContextProvider-C6Z4XGp6.js";
@@ -2,7 +2,7 @@
2
2
  /* */
3
3
  import t from "react";
4
4
  import l from "clsx";
5
- import { S as f } from "./StatusIcon-Dj5p-iL1.js";
5
+ import { S as f } from "./StatusIcon-l795M3JX.js";
6
6
  import { T as i } from "./Text-D6e-S6em.js";
7
7
  import { C as u } from "./ClearPropsContext-CUvsbMn8.js";
8
8
  import "./propsContext-DzAKlmhS.js";
@@ -4,7 +4,8 @@ import t from "react";
4
4
  import "@tabler/icons-react";
5
5
  import "./Icon-D4bkU_pz.js";
6
6
  import { I as m } from "./IconDanger-PwvUWqzQ.js";
7
- import { I as f, a as l, b as I } from "./IconWarning-DFG_1t6M.js";
7
+ import { I as f } from "./IconInfo-Dzy8qZId.js";
8
+ import { I, a as l } from "./IconWarning-DHYHv9V-.js";
8
9
  import { useLocalizedStringFormatter as g } from "react-aria";
9
10
  import { C as p } from "./ClearPropsContext-CUvsbMn8.js";
10
11
  import "./propsContext-DzAKlmhS.js";
@@ -34,9 +35,9 @@ const S = {
34
35
  }, F = {
35
36
  danger: m,
36
37
  info: f,
37
- success: l,
38
- warning: I
39
- }, q = (n) => {
38
+ success: I,
39
+ warning: l
40
+ }, v = (n) => {
40
41
  const { status: s = "info", className: a, ...c } = n, r = w(o.statusIcon, o[s], a), e = g(S), i = F[s], u = {
41
42
  className: r,
42
43
  "aria-label": e.format(`statusIcon.${s}`),
@@ -45,5 +46,5 @@ const S = {
45
46
  return /* @__PURE__ */ t.createElement(p, null, /* @__PURE__ */ t.createElement(i, { ...u }));
46
47
  };
47
48
  export {
48
- q as S
49
+ v as S
49
50
  };
@@ -1,6 +1,6 @@
1
1
  "use client"
2
2
  /* */
3
- import { S as a } from "./StatusIcon-Dj5p-iL1.js";
3
+ import { S as a } from "./StatusIcon-l795M3JX.js";
4
4
  export {
5
5
  a as StatusIcon,
6
6
  a as default
package/dist/Tabs.js CHANGED
@@ -6,7 +6,7 @@ import u from "clsx";
6
6
  import { TunnelExit as C, TunnelProvider as y, TunnelEntry as f } from "@mittwald/react-tunnel";
7
7
  import { f as S } from "./flowComponent-CPKCCJEg.js";
8
8
  import { useCallbackRef as O } from "use-callback-ref";
9
- import { a as B, C as K } from "./ContextMenuTrigger-BwhLrGm5.js";
9
+ import { a as B, C as K } from "./ContextMenuTrigger-DjZx2IST.js";
10
10
  import { M as A } from "./MenuItem-Dny58Rqq.js";
11
11
  import { B as L } from "./Button-BPAhEOTg.js";
12
12
  import "@tabler/icons-react";
@@ -4,8 +4,8 @@ var u = Object.defineProperty;
4
4
  var i = (s, t, e) => t in s ? u(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
5
5
  var r = (s, t, e) => (i(s, typeof t != "symbol" ? t + "" : t, e), e);
6
6
  import d, { createContext as l, useRef as m, useEffect as S, useContext as f } from "react";
7
- import { makeObservable as p, observable as v, action as a, computed as h } from "mobx";
8
- import { u as y } from "./useSelector-DpU7_HMO.js";
7
+ import { makeObservable as p, observable as v, action as a, computed as y } from "mobx";
8
+ import { u as b } from "./useSelector-DpU7_HMO.js";
9
9
  class o {
10
10
  constructor() {
11
11
  r(this, "states", /* @__PURE__ */ new Set());
@@ -13,14 +13,14 @@ class o {
13
13
  states: v,
14
14
  addState: a,
15
15
  removeState: a,
16
- isBusy: h
16
+ isBusy: y
17
17
  });
18
18
  }
19
19
  static useNew() {
20
20
  return m(new o()).current;
21
21
  }
22
22
  static useRegisterState(t) {
23
- const e = b();
23
+ const e = g();
24
24
  S(() => (e == null || e.addState(t), () => {
25
25
  e == null || e.removeState(t);
26
26
  }), [e, t]);
@@ -32,7 +32,7 @@ class o {
32
32
  this.states.delete(t);
33
33
  }
34
34
  useIsBusy() {
35
- return y(() => this.isBusy, [this.states.size]);
35
+ return b(() => this.isBusy);
36
36
  }
37
37
  get isBusy() {
38
38
  for (const t of this.states)
@@ -44,7 +44,7 @@ class o {
44
44
  const n = l(void 0), C = (s) => {
45
45
  const { children: t } = s, e = o.useNew();
46
46
  return /* @__PURE__ */ d.createElement(n.Provider, { value: e }, t);
47
- }, b = () => {
47
+ }, g = () => {
48
48
  const s = o.useNew();
49
49
  return f(n) ?? s;
50
50
  }, A = (s) => {
@@ -55,5 +55,5 @@ export {
55
55
  C as A,
56
56
  o as a,
57
57
  A as g,
58
- b as u
58
+ g as u
59
59
  };