@mittwald/flow-react-components 0.1.0-alpha.135 → 0.1.0-alpha.137

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 (27) 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/CopyButton.js +1 -1
  5. package/dist/{Link-TcBL3IVI.js → Link-CcYCy_KC.js} +17 -17
  6. package/dist/Link.js +1 -1
  7. package/dist/List.js +1 -1
  8. package/dist/Modal.js +12 -12
  9. package/dist/Notification.js +67 -0
  10. package/dist/NotificationProvider.js +140 -0
  11. package/dist/OffCanvas.js +1 -1
  12. package/dist/{getActionGroupSlot-izllH4ID.js → getActionGroupSlot-Do-bk4GU.js} +7 -7
  13. package/dist/nextjs.js +9 -8
  14. package/dist/styles.css +1 -1
  15. package/dist/types/components/Notification/Notification.d.ts +11 -0
  16. package/dist/types/components/Notification/index.d.ts +4 -0
  17. package/dist/types/components/Notification/stories/Default.stories.d.ts +8 -0
  18. package/dist/types/components/Notification/stories/EdgeCases.stories.d.ts +7 -0
  19. package/dist/types/components/Notification/stories/Variants.stories.d.ts +10 -0
  20. package/dist/types/components/NotificationProvider/ControlledNotification.d.ts +9 -0
  21. package/dist/types/components/NotificationProvider/NotificationContainer.d.ts +5 -0
  22. package/dist/types/components/NotificationProvider/NotificationController.d.ts +23 -0
  23. package/dist/types/components/NotificationProvider/NotificationProvider.d.ts +8 -0
  24. package/dist/types/components/NotificationProvider/index.d.ts +4 -0
  25. package/dist/types/components/NotificationProvider/stories/Default.stories.d.ts +11 -0
  26. package/dist/types/lib/timer/Timer.d.ts +18 -0
  27. package/package.json +15 -4
@@ -2,19 +2,19 @@
2
2
  /* */
3
3
  var S = Object.defineProperty;
4
4
  var B = (o, t, e) => t in o ? S(o, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[t] = e;
5
- var c = (o, t, e) => (B(o, typeof t != "symbol" ? t + "" : t, e), e);
6
- import y, { createContext as F, useRef as k, useContext as A } from "react";
7
- import { makeObservable as O, observable as I, action as M, computed as E } from "mobx";
5
+ var a = (o, t, e) => (B(o, typeof t != "symbol" ? t + "" : t, e), e);
6
+ import A, { createContext as F, useRef as k, useContext as y } from "react";
7
+ import { makeObservable as O, observable as M, action as I, computed as E } from "mobx";
8
8
  import { u as w } from "./useOverlayController-CGKumeGL.js";
9
9
  import D from "invariant";
10
10
  import { u as b } from "./useSelector-DpU7_HMO.js";
11
- import { a as T, g as N, u as R } from "./getActionGroupSlot-izllH4ID.js";
11
+ import { a as T, g as N, u as R } from "./getActionGroupSlot-Do-bk4GU.js";
12
12
  import "./propsContext-DzAKlmhS.js";
13
- import { P as $ } from "./PropsContextProvider-C6Z4XGp6.js";
13
+ import { P as V } from "./PropsContextProvider-C6Z4XGp6.js";
14
14
  import "@react-aria/utils";
15
15
  import "remeda";
16
16
  import { d as u } from "./dynamic-ClpUSmEt.js";
17
- import { u as V } from "./slotContext-DoCFkzCA.js";
17
+ import { u as $ } from "./slotContext-DoCFkzCA.js";
18
18
  const m = F(void 0), G = m.Provider, g = (o) => new Promise((t) => setTimeout(t, o)), f = {
19
19
  pending: 1e3,
20
20
  succeeded: 1500,
@@ -22,14 +22,14 @@ const m = F(void 0), G = m.Provider, g = (o) => new Promise((t) => setTimeout(t,
22
22
  };
23
23
  class C {
24
24
  constructor() {
25
- c(this, "showFeedback");
26
- c(this, "state", "isIdle");
27
- c(this, "setPendingTimeout");
28
- c(this, "error");
29
- c(this, "isAsync", !1);
25
+ a(this, "showFeedback");
26
+ a(this, "state", "isIdle");
27
+ a(this, "setPendingTimeout");
28
+ a(this, "error");
29
+ a(this, "isAsync", !1);
30
30
  O(this, {
31
- state: I,
32
- updateState: M,
31
+ state: M,
32
+ updateState: I,
33
33
  isBusy: E
34
34
  });
35
35
  }
@@ -46,7 +46,7 @@ class C {
46
46
  return b(() => this.isBusy, [this]);
47
47
  }
48
48
  get isBusy() {
49
- return this.state === "isExecuting" || this.state === "isPending";
49
+ return this.state !== "isIdle";
50
50
  }
51
51
  onAsyncStart() {
52
52
  this.isAsync = !0, this.updateState("isExecuting"), this.setPendingTimeout = window.setTimeout(
@@ -79,26 +79,26 @@ class C {
79
79
  this.updateState("isPending");
80
80
  }
81
81
  }
82
- const x = (o) => (...t) => {
83
- const e = [...o], s = e.shift();
84
- if (s) {
85
- const i = s(...t), n = () => e.length === 0 ? i : x(e)(...t);
86
- return i instanceof Promise ? i.then(n) : n();
82
+ const P = (o) => (...t) => {
83
+ const e = [...o], n = e.shift();
84
+ if (n) {
85
+ const s = n(...t), i = () => e.length === 0 ? s : P(e)(...t);
86
+ return s instanceof Promise ? s.then(i) : i();
87
87
  }
88
88
  }, d = () => {
89
89
  }, L = (o, t = {}) => {
90
90
  const {
91
91
  onSync: e = d,
92
- onAsync: s = d,
93
- then: i = d,
94
- catch: n = d,
95
- finally: r = d
92
+ onAsync: n = d,
93
+ then: s = d,
94
+ catch: i = d,
95
+ finally: c = d
96
96
  } = t;
97
97
  try {
98
- const a = o();
99
- return a instanceof Promise ? (s(), a.then(i).catch(n).finally(r)) : (e(), i(a), r(), a);
100
- } catch (a) {
101
- e(), n(a), r();
98
+ const r = o();
99
+ return r instanceof Promise ? (n(), r.then(s).catch(i).finally(c)) : (e(), s(r), c(), r);
100
+ } catch (r) {
101
+ e(), i(r), c();
102
102
  }
103
103
  }, U = () => {
104
104
  };
@@ -107,16 +107,16 @@ function j(o) {
107
107
  return o.confirmationModalController.open;
108
108
  const t = o.getOverlayController(), {
109
109
  action: e,
110
- toggleOverlay: s,
111
- closeOverlay: i,
112
- openOverlay: n
110
+ toggleOverlay: n,
111
+ closeOverlay: s,
112
+ openOverlay: i
113
113
  } = o.actionProps;
114
- return e || (n && t ? t.open : i && t || s && t ? t.close : U);
114
+ return e || (i && t ? t.open : s && t || n && t ? t.close : U);
115
115
  }
116
116
  class v {
117
117
  constructor(t) {
118
- c(this, "actions", []);
119
- c(this, "baseAction");
118
+ a(this, "actions", []);
119
+ a(this, "baseAction");
120
120
  this.baseAction = t;
121
121
  }
122
122
  addAction(t) {
@@ -125,94 +125,94 @@ class v {
125
125
  async executeBatch(t) {
126
126
  if (this.actions.length === 0)
127
127
  return;
128
- const e = this.actions[this.actions.length - 1].actionProps.showFeedback, s = this.baseAction.state.withFeedback(
128
+ const e = this.actions[this.actions.length - 1].actionProps.showFeedback, n = this.baseAction.state.withFeedback(
129
129
  this.baseAction.needsConfirmation ? !1 : e
130
- ), i = this.actions.map((a) => j(a)), n = x(i);
131
- let r;
132
- if (await L(() => n(...t), {
133
- onAsync: () => s.onAsyncStart(),
134
- then: () => s.onSucceeded(),
135
- catch: (a) => {
136
- s.onFailed(a), r = a;
130
+ ), s = this.actions.map((r) => j(r)), i = P(s);
131
+ let c;
132
+ if (await L(() => i(...t), {
133
+ onAsync: () => n.onAsyncStart(),
134
+ then: () => n.onSucceeded(),
135
+ catch: (r) => {
136
+ n.onFailed(r), c = r;
137
137
  }
138
- }), r)
139
- throw r;
138
+ }), c)
139
+ throw c;
140
140
  }
141
141
  }
142
142
  class q {
143
143
  constructor(t) {
144
- c(this, "action");
145
- c(this, "execute", (...t) => {
144
+ a(this, "action");
145
+ a(this, "execute", (...t) => {
146
146
  const e = this.getBatchedActions();
147
147
  (async () => {
148
- for (const i of e)
149
- await i.executeBatch(t);
150
- })().catch((i) => console.error(i));
148
+ for (const s of e)
149
+ await s.executeBatch(t);
150
+ })().catch((s) => console.error(s));
151
151
  });
152
- c(this, "getBatchedActions", () => {
152
+ a(this, "getBatchedActions", () => {
153
153
  let t = this.action;
154
154
  const e = [];
155
- let s = new v(
155
+ let n = new v(
156
156
  this.action
157
- ), i = 0;
157
+ ), s = 0;
158
158
  for (; t; ) {
159
- const { action: n, break: r, skip: a } = t.actionProps;
159
+ const { action: i, break: c, skip: r } = t.actionProps;
160
160
  if (t.needsConfirmation) {
161
- s.addAction(t);
161
+ n.addAction(t);
162
162
  break;
163
163
  }
164
- if (a) {
165
- i = a === !0 ? 1 : a, t = t.parentAction;
164
+ if (r) {
165
+ s = r === !0 ? 1 : r, t = t.parentAction;
166
166
  continue;
167
167
  }
168
- if (i > 0) {
169
- t = t.parentAction, i--;
168
+ if (s > 0) {
169
+ t = t.parentAction, s--;
170
170
  continue;
171
171
  }
172
- if (r)
172
+ if (c)
173
173
  break;
174
- n || (e.push(s), s = new v(this.action)), s.addAction(t), t = t.parentAction;
174
+ i || (e.push(n), n = new v(this.action)), n.addAction(t), t = t.parentAction;
175
175
  }
176
- return e.push(s), e;
176
+ return e.push(n), e;
177
177
  });
178
178
  this.action = t;
179
179
  }
180
180
  }
181
181
  class l {
182
182
  constructor(t) {
183
- c(this, "state");
184
- c(this, "needsConfirmation");
185
- c(this, "actionProps");
186
- c(this, "parentAction");
187
- c(this, "confirmationModalController");
188
- c(this, "overlayController");
189
- c(this, "execute", (...t) => {
183
+ a(this, "state");
184
+ a(this, "needsConfirmation");
185
+ a(this, "actionProps");
186
+ a(this, "parentAction");
187
+ a(this, "confirmationModalController");
188
+ a(this, "overlayController");
189
+ a(this, "execute", (...t) => {
190
190
  new q(this).execute(...t);
191
191
  });
192
192
  const {
193
193
  actionProps: e,
194
- needsConfirmation: s,
195
- parentAction: i,
196
- overlayController: n,
197
- confirmationModalController: r,
198
- state: a
194
+ needsConfirmation: n,
195
+ parentAction: s,
196
+ overlayController: i,
197
+ confirmationModalController: c,
198
+ state: r
199
199
  } = t;
200
- this.actionProps = e, this.parentAction = i, this.confirmationModalController = r, this.needsConfirmation = s, this.overlayController = n, this.state = a;
200
+ this.actionProps = e, this.parentAction = s, this.confirmationModalController = c, this.needsConfirmation = n, this.overlayController = i, this.state = r;
201
201
  }
202
202
  static useNew(t, e = {}) {
203
- const s = A(m), i = w(), n = w(), r = C.useNew();
203
+ const n = y(m), s = w(), i = w(), c = C.useNew();
204
204
  return new l({
205
- parentAction: s,
206
- overlayController: i,
207
- confirmationModalController: n,
205
+ parentAction: n,
206
+ overlayController: s,
207
+ confirmationModalController: i,
208
208
  needsConfirmation: !1,
209
209
  actionProps: t,
210
- state: r,
210
+ state: c,
211
211
  ...e
212
212
  });
213
213
  }
214
214
  static use() {
215
- const t = A(m);
215
+ const t = y(m);
216
216
  return D(!!t, "Action context is not defined"), T.useRegisterState(t.state), t;
217
217
  }
218
218
  static useConfirmationAction() {
@@ -238,45 +238,49 @@ class l {
238
238
  return t(this.actionProps.openOverlay) ?? t(this.actionProps.closeOverlay) ?? t(this.actionProps.toggleOverlay);
239
239
  }
240
240
  }
241
- const z = (o) => V()[o], p = (o) => z("Modal") === "actionConfirm" ? N(o) : void 0, h = (o) => {
242
- const t = l.use(), e = t.state.useValue(), s = p(o) === "primary", i = t.confirmationModalController.useIsOpen();
243
- return t.needsConfirmation && i && !s ? "isIdle" : e;
244
- }, it = (o) => {
245
- const { children: t, ...e } = o, s = l.useNew(e), i = {
246
- Button: {
247
- onPress: u((n) => {
248
- const r = l.use(), a = l.useConfirmationAction(), P = p(n) === "primary";
249
- return p(n) === "abort" ? r.confirmationModalController.close : P ? a.execute : r.execute;
250
- }),
251
- isPending: u(
252
- (n) => h(n) === "isPending"
253
- ),
254
- isSucceeded: u(
255
- (n) => h(n) === "isSucceeded"
256
- ),
257
- isFailed: u((n) => h(n) === "isFailed"),
258
- "aria-disabled": u(() => {
259
- const n = h(o), r = R().useIsBusy();
260
- return n === "isExecuting" || r;
261
- })
262
- },
241
+ const z = (o) => $()[o], p = (o) => z("Modal") === "actionConfirm" ? N(o) : void 0, h = (o) => {
242
+ const t = l.use(), e = t.state.useValue(), n = p(o) === "primary", s = t.confirmationModalController.useIsOpen();
243
+ return t.needsConfirmation && s && !n ? "isIdle" : e;
244
+ }, x = {
245
+ onPress: u((o) => {
246
+ const t = l.use(), e = l.useConfirmationAction(), n = p(o) === "primary";
247
+ return p(o) === "abort" ? t.confirmationModalController.close : n ? e.execute : t.execute;
248
+ }),
249
+ isPending: u((o) => h(o) === "isPending"),
250
+ isSucceeded: u(
251
+ (o) => h(o) === "isSucceeded"
252
+ ),
253
+ isFailed: u((o) => h(o) === "isFailed"),
254
+ "aria-disabled": u((o) => {
255
+ const t = h(o), e = R().useIsBusy();
256
+ return t === "isExecuting" || e;
257
+ })
258
+ }, st = (o) => {
259
+ const { children: t, ...e } = o, n = l.useNew(e), s = {
260
+ Button: x,
263
261
  Link: {
264
262
  onPress: u(() => l.use().execute)
265
263
  },
266
264
  Modal: {
267
- slot: u((n) => {
268
- const { slot: r } = n, a = l.use();
269
- return a.needsConfirmation = r === "actionConfirm", r;
265
+ slot: u((i) => {
266
+ const { slot: c } = i, r = l.use();
267
+ return r.needsConfirmation = c === "actionConfirm", c;
268
+ }),
269
+ isDismissable: u((i) => {
270
+ const r = l.use().state.useValue();
271
+ return r === "isExecuting" || r === "isPending" ? !1 : i.isDismissable;
270
272
  }),
271
- isDismissable: u((n) => l.use().state.useIsBusy() ? !1 : n.isDismissable),
272
273
  controller: u(() => {
273
- const n = l.use();
274
- return n.needsConfirmation ? n.confirmationModalController : n.getOverlayController();
275
- })
274
+ const i = l.use();
275
+ return i.needsConfirmation ? i.confirmationModalController : i.getOverlayController();
276
+ }),
277
+ ActionGroup: {
278
+ Button: x
279
+ }
276
280
  }
277
281
  };
278
- return /* @__PURE__ */ y.createElement(G, { value: s }, /* @__PURE__ */ y.createElement($, { props: i, mergeInParentContext: !0 }, t));
282
+ return /* @__PURE__ */ A.createElement(G, { value: n }, /* @__PURE__ */ A.createElement(V, { props: s, mergeInParentContext: !0 }, t));
279
283
  };
280
284
  export {
281
- it as A
285
+ st as A
282
286
  };
package/dist/Action.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use client"
2
2
  /* */
3
- import { A as t } from "./Action-Dp9FyJCZ.js";
3
+ import { A as t } from "./Action-BGsLXvb9.js";
4
4
  export {
5
5
  t as Action,
6
6
  t as default
@@ -9,7 +9,7 @@ import { d as e } from "./dynamic-ClpUSmEt.js";
9
9
  import i from "clsx";
10
10
  import { f as g } from "./flowComponent-CPKCCJEg.js";
11
11
  import { TunnelProvider as E, TunnelExit as n } from "@mittwald/react-tunnel";
12
- import { A as C, g as a } from "./getActionGroupSlot-izllH4ID.js";
12
+ import { A as C, g as a } from "./getActionGroupSlot-Do-bk4GU.js";
13
13
  const G = "flow--action-group--action-group-container", v = "flow--action-group", x = "flow--action-group--primary", N = "flow--action-group--secondary", P = "flow--action-group--abort", r = {
14
14
  actionGroupContainer: G,
15
15
  actionGroup: v,
@@ -15,7 +15,7 @@ import "@react-aria/utils";
15
15
  import "remeda";
16
16
  import "dot-prop";
17
17
  import { f as C } from "./flowComponent-CPKCCJEg.js";
18
- import { A as E } from "./Action-Dp9FyJCZ.js";
18
+ import { A as E } from "./Action-BGsLXvb9.js";
19
19
  const B = {
20
20
  "de-DE": {
21
21
  "copyButton.copy": "Kopieren"
@@ -7,8 +7,8 @@ import { P as L } from "./PropsContextProvider-C6Z4XGp6.js";
7
7
  import "@react-aria/utils";
8
8
  import "./propsContext-DzAKlmhS.js";
9
9
  import "remeda";
10
- import g from "clsx";
11
- import { f as h } from "./flowComponent-CPKCCJEg.js";
10
+ import h from "clsx";
11
+ import { f as g } from "./flowComponent-CPKCCJEg.js";
12
12
  import { l as y } from "./context-BlNV7smK.js";
13
13
  const N = "flow--link", E = "flow--link--inline", F = "flow--link--icon", v = "flow--link--dark", z = "flow--link--light", n = {
14
14
  link: N,
@@ -16,34 +16,34 @@ const N = "flow--link", E = "flow--link--inline", F = "flow--link--icon", v = "f
16
16
  icon: F,
17
17
  dark: v,
18
18
  light: z
19
- }, G = h("Link", (r) => {
19
+ }, G = g("Link", (t) => {
20
20
  const {
21
- children: i,
22
- className: t,
23
- inline: e,
24
- linkComponent: l,
25
- color: s = "primary",
26
- unstyled: m = !1,
27
- "aria-current": a,
28
- refProp: c,
29
- ...p
30
- } = r, { linkComponent: k } = d(y), f = l ?? k ?? P.Link, C = m ? t : g(n.link, e && n.inline, n[s], t), u = {
21
+ children: l,
22
+ className: r,
23
+ inline: s,
24
+ linkComponent: i,
25
+ color: m = "primary",
26
+ unstyled: a = !1,
27
+ "aria-current": c,
28
+ refProp: p,
29
+ ...k
30
+ } = t, { linkComponent: e } = d(y), f = i || (t.href && e ? e : P.Link), C = a ? r : h(n.link, s && n.inline, n[m], r), u = {
31
31
  Icon: {
32
32
  className: n.icon,
33
33
  size: "s"
34
34
  }
35
35
  }, x = {
36
- "aria-current": a
36
+ "aria-current": c
37
37
  };
38
38
  return /* @__PURE__ */ o.createElement(w, null, /* @__PURE__ */ o.createElement(
39
39
  f,
40
40
  {
41
- ...p,
41
+ ...k,
42
42
  ...x,
43
43
  className: C,
44
- ref: c
44
+ ref: p
45
45
  },
46
- /* @__PURE__ */ o.createElement(L, { props: u }, i)
46
+ /* @__PURE__ */ o.createElement(L, { props: u }, l)
47
47
  ));
48
48
  });
49
49
  export {
package/dist/Link.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use client"
2
2
  /* */
3
- import { L as o } from "./Link-TcBL3IVI.js";
3
+ import { L as o } from "./Link-CcYCy_KC.js";
4
4
  export {
5
5
  o as Link,
6
6
  o as default
package/dist/List.js CHANGED
@@ -35,7 +35,7 @@ import { P as Tt } from "./PropsContextProvider-C6Z4XGp6.js";
35
35
  import { d as Lt } from "./dynamic-ClpUSmEt.js";
36
36
  import { I as wt } from "./IconContextMenu-Bmk1_j_0.js";
37
37
  import { TunnelProvider as Bt, TunnelExit as z } from "@mittwald/react-tunnel";
38
- import { L as At } from "./Link-TcBL3IVI.js";
38
+ import { L as At } from "./Link-CcYCy_KC.js";
39
39
  import { d as E, a as O } from "./deepFindOfType-6pG0fH7S.js";
40
40
  import { ListLoaderAsyncResource as kt } from "./List/ListLoaderAsyncResource.js";
41
41
  import { I as Dt } from "./InlineCode-BT-PKxVv.js";
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
  };
@@ -0,0 +1,67 @@
1
+ "use client"
2
+ /* */
3
+ import t from "react";
4
+ import d from "clsx";
5
+ import "./propsContext-DzAKlmhS.js";
6
+ import { P as w } from "./PropsContextProvider-C6Z4XGp6.js";
7
+ import "@react-aria/utils";
8
+ import "remeda";
9
+ import { S as g } from "./StatusIcon-Dj5p-iL1.js";
10
+ import { L as h } from "./Link-CcYCy_KC.js";
11
+ import { B as k } from "./Button-BPAhEOTg.js";
12
+ import "@tabler/icons-react";
13
+ import "./Icon-D4bkU_pz.js";
14
+ import { I as x } from "./IconClose-FTrJdf_N.js";
15
+ const N = "flow--notification", C = "flow--notification--link", E = "flow--notification--status-icon", I = "flow--notification--heading", L = "flow--notification--text", P = "flow--notification--close", v = "flow--notification--info", y = "flow--notification--has-link", B = "flow--notification--warning", S = "flow--notification--danger", z = "flow--notification--success", o = {
16
+ notification: N,
17
+ link: C,
18
+ statusIcon: E,
19
+ heading: I,
20
+ text: L,
21
+ close: P,
22
+ info: v,
23
+ hasLink: y,
24
+ warning: B,
25
+ danger: S,
26
+ success: z
27
+ }, O = (a) => {
28
+ const {
29
+ children: c,
30
+ className: l,
31
+ status: i = "info",
32
+ role: r = "alert",
33
+ href: s,
34
+ onClick: e,
35
+ onClose: n,
36
+ autoClose: A,
37
+ ...f
38
+ } = a, m = d(
39
+ o.notification,
40
+ o[i],
41
+ (e || n || s) && o.hasLink,
42
+ l
43
+ ), p = {
44
+ Heading: {
45
+ className: o.heading,
46
+ level: 4
47
+ },
48
+ Text: {
49
+ className: o.text
50
+ }
51
+ }, u = n && /* @__PURE__ */ t.createElement(
52
+ k,
53
+ {
54
+ size: "s",
55
+ className: o.close,
56
+ variant: "plain",
57
+ color: "secondary",
58
+ onPress: n
59
+ },
60
+ /* @__PURE__ */ t.createElement(x, null)
61
+ );
62
+ return /* @__PURE__ */ t.createElement("div", { ...f, className: m, role: r }, /* @__PURE__ */ t.createElement(h, { unstyled: !0, href: s, className: o.link, onPress: e }, /* @__PURE__ */ t.createElement(g, { className: o.statusIcon, status: i }), /* @__PURE__ */ t.createElement(w, { props: p }, c)), u);
63
+ };
64
+ export {
65
+ O as Notification,
66
+ O as default
67
+ };