@mittwald/flow-react-components 0.1.0-alpha.352 → 0.1.0-alpha.354
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/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,32 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See
|
|
4
4
|
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [0.1.0-alpha.354](https://github.com/mittwald/flow/compare/0.1.0-alpha.353...0.1.0-alpha.354) (2024-11-25)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- **Notification:** Add Suspense to NotificationContainer
|
|
11
|
+
([#1002](https://github.com/mittwald/flow/issues/1002))
|
|
12
|
+
([843b8ed](https://github.com/mittwald/flow/commit/843b8ed1816bce2a2af3187504b7b108fdae75a0))
|
|
13
|
+
|
|
14
|
+
# Change Log
|
|
15
|
+
|
|
16
|
+
All notable changes to this project will be documented in this file. See
|
|
17
|
+
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
18
|
+
|
|
19
|
+
# [0.1.0-alpha.353](https://github.com/mittwald/flow/compare/0.1.0-alpha.352...0.1.0-alpha.353) (2024-11-25)
|
|
20
|
+
|
|
21
|
+
### Features
|
|
22
|
+
|
|
23
|
+
- **NotificationProvider:** export NotificationController types
|
|
24
|
+
([#998](https://github.com/mittwald/flow/issues/998))
|
|
25
|
+
([f1618ce](https://github.com/mittwald/flow/commit/f1618ced26fa5fafb73e344fa856651e4fd92f9d))
|
|
26
|
+
|
|
27
|
+
# Change Log
|
|
28
|
+
|
|
29
|
+
All notable changes to this project will be documented in this file. See
|
|
30
|
+
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
31
|
+
|
|
6
32
|
# [0.1.0-alpha.352](https://github.com/mittwald/flow/compare/0.1.0-alpha.351...0.1.0-alpha.352) (2024-11-19)
|
|
7
33
|
|
|
8
34
|
### Features
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
var w = Object.defineProperty;
|
|
4
4
|
var A = (o, t, e) => t in o ? w(o, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[t] = e;
|
|
5
5
|
var n = (o, t, e) => A(o, typeof t != "symbol" ? t + "" : t, e);
|
|
6
|
-
import s, { useRef as v, cloneElement as C,
|
|
7
|
-
import { u as
|
|
8
|
-
import { makeObservable as
|
|
6
|
+
import s, { useRef as v, cloneElement as C, Suspense as D, createContext as E, useContext as N } from "react";
|
|
7
|
+
import { u as g } from "./useSelector-DpU7_HMO.js";
|
|
8
|
+
import { makeObservable as x, observable as y, action as u } from "mobx";
|
|
9
9
|
import { Duration as m, DateTime as l } from "luxon";
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import { LazyMotion as
|
|
10
|
+
import b from "react-dom";
|
|
11
|
+
import I from "clsx";
|
|
12
|
+
import { LazyMotion as M, domAnimation as P, AnimatePresence as S, m as k } from "framer-motion";
|
|
13
13
|
import { useIsSSR as L } from "react-aria";
|
|
14
14
|
class R {
|
|
15
15
|
constructor() {
|
|
@@ -59,8 +59,8 @@ class r {
|
|
|
59
59
|
constructor() {
|
|
60
60
|
n(this, "notificationsData", /* @__PURE__ */ new Map());
|
|
61
61
|
n(this, "id", 0);
|
|
62
|
-
|
|
63
|
-
notificationsData:
|
|
62
|
+
x(this, {
|
|
63
|
+
notificationsData: y.shallow,
|
|
64
64
|
add: u.bound,
|
|
65
65
|
remove: u.bound
|
|
66
66
|
});
|
|
@@ -69,7 +69,7 @@ class r {
|
|
|
69
69
|
return v(new r()).current;
|
|
70
70
|
}
|
|
71
71
|
useNotifications() {
|
|
72
|
-
return
|
|
72
|
+
return g(() => Array.from(this.notificationsData.values()));
|
|
73
73
|
}
|
|
74
74
|
add(t) {
|
|
75
75
|
const e = this.id++, i = {
|
|
@@ -88,10 +88,10 @@ class r {
|
|
|
88
88
|
this.notificationsData.delete(t);
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
|
-
const
|
|
92
|
-
notificationContainer:
|
|
93
|
-
notification:
|
|
94
|
-
},
|
|
91
|
+
const B = "flow--notification-provider--notification-container", O = "flow--notification-provider--notification", d = {
|
|
92
|
+
notificationContainer: B,
|
|
93
|
+
notification: O
|
|
94
|
+
}, z = (o) => {
|
|
95
95
|
const { notification: t, controller: e } = o;
|
|
96
96
|
return C(t.element, {
|
|
97
97
|
onMouseEnter: () => {
|
|
@@ -111,8 +111,8 @@ const S = "flow--notification-provider--notification-container", B = "flow--noti
|
|
|
111
111
|
t.meta.autoCloseTimer.resume();
|
|
112
112
|
}
|
|
113
113
|
});
|
|
114
|
-
},
|
|
115
|
-
const { className: t, ...e } = o, i =
|
|
114
|
+
}, F = (o) => {
|
|
115
|
+
const { className: t, ...e } = o, i = j(), a = i.useNotifications(), h = L(), p = I(d.notificationContainer, t), T = /* @__PURE__ */ s.createElement(M, { features: P }, /* @__PURE__ */ s.createElement("div", { className: p, ...e }, /* @__PURE__ */ s.createElement(S, null, a.map((c) => /* @__PURE__ */ s.createElement(
|
|
116
116
|
k.div,
|
|
117
117
|
{
|
|
118
118
|
className: d.notification,
|
|
@@ -124,23 +124,24 @@ const S = "flow--notification-provider--notification-container", B = "flow--noti
|
|
|
124
124
|
bounce: 0
|
|
125
125
|
}
|
|
126
126
|
},
|
|
127
|
-
/* @__PURE__ */ s.createElement(
|
|
128
|
-
|
|
127
|
+
/* @__PURE__ */ s.createElement(D, null, /* @__PURE__ */ s.createElement(
|
|
128
|
+
z,
|
|
129
129
|
{
|
|
130
130
|
notification: c,
|
|
131
131
|
controller: i
|
|
132
132
|
}
|
|
133
|
-
)
|
|
133
|
+
))
|
|
134
134
|
)))));
|
|
135
|
-
return h ? null :
|
|
136
|
-
}, f =
|
|
135
|
+
return h ? null : b.createPortal(T, document.body);
|
|
136
|
+
}, f = E(
|
|
137
137
|
new r()
|
|
138
|
-
),
|
|
138
|
+
), j = () => N(f), X = (o) => {
|
|
139
139
|
const { children: t, ...e } = o, i = r.useNew();
|
|
140
|
-
return /* @__PURE__ */ s.createElement(f.Provider, { value: i }, /* @__PURE__ */ s.createElement(
|
|
140
|
+
return /* @__PURE__ */ s.createElement(f.Provider, { value: i }, /* @__PURE__ */ s.createElement(F, { ...e }), t);
|
|
141
141
|
};
|
|
142
142
|
export {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
143
|
+
r as NotificationController,
|
|
144
|
+
X as NotificationProvider,
|
|
145
|
+
X as default,
|
|
146
|
+
j as useNotificationController
|
|
146
147
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { default as NotificationProvider } from './NotificationProvider';
|
|
2
2
|
export { useNotificationController, NotificationProvider, } from './NotificationProvider';
|
|
3
|
+
export { NotificationController } from './NotificationController';
|
|
3
4
|
export default NotificationProvider;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mittwald/flow-react-components",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.354",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A React implementation of Flow, mittwald’s design system",
|
|
6
6
|
"homepage": "https://mittwald.github.io/flow",
|
|
@@ -420,7 +420,7 @@
|
|
|
420
420
|
"@chakra-ui/live-region": "^2.1.0",
|
|
421
421
|
"@internationalized/date": "^3.5.6",
|
|
422
422
|
"@internationalized/string-compiler": "^3.2.5",
|
|
423
|
-
"@mittwald/react-tunnel": "^0.1.0-alpha.
|
|
423
|
+
"@mittwald/react-tunnel": "^0.1.0-alpha.354",
|
|
424
424
|
"@mittwald/react-use-promise": "^2.5.0",
|
|
425
425
|
"@react-aria/form": "^3.0.10",
|
|
426
426
|
"@react-aria/utils": "^3.25.3",
|
|
@@ -451,7 +451,7 @@
|
|
|
451
451
|
},
|
|
452
452
|
"devDependencies": {
|
|
453
453
|
"@faker-js/faker": "^9.0.3",
|
|
454
|
-
"@mittwald/flow-design-tokens": "^0.1.0-alpha.
|
|
454
|
+
"@mittwald/flow-design-tokens": "^0.1.0-alpha.354",
|
|
455
455
|
"@mittwald/react-use-promise": "^2.5.0",
|
|
456
456
|
"@nx/storybook": "^20.0.0",
|
|
457
457
|
"@storybook/addon-a11y": "^8.3.5",
|
|
@@ -546,5 +546,5 @@
|
|
|
546
546
|
}
|
|
547
547
|
}
|
|
548
548
|
},
|
|
549
|
-
"gitHead": "
|
|
549
|
+
"gitHead": "5462b4f7a82fbe726dc037ab91316ea451afcfbe"
|
|
550
550
|
}
|