@mittwald/flow-react-components 0.1.0-alpha.393 → 0.1.0-alpha.394

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,19 @@
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.394](https://github.com/mittwald/flow/compare/0.1.0-alpha.393...0.1.0-alpha.394) (2025-01-15)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **Notification:** Fix "Timer not started" error for notifications that should
11
+ not auto close ([#1101](https://github.com/mittwald/flow/issues/1101))
12
+ ([f9b5975](https://github.com/mittwald/flow/commit/f9b59756da9c4aeebc08c5eb62c0efef98fa9c9a))
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
+
6
19
  # [0.1.0-alpha.393](https://github.com/mittwald/flow/compare/0.1.0-alpha.392...0.1.0-alpha.393) (2025-01-10)
7
20
 
8
21
  **Note:** Version bump only for package @mittwald/flow-react-components
@@ -1,9 +1,9 @@
1
1
  "use client"
2
2
  /* */
3
- var w = Object.defineProperty;
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 n = (o, t, e) => A(o, typeof t != "symbol" ? t + "" : t, e);
6
- import s, { useRef as v, cloneElement as C, Suspense as D, createContext as E, useContext as N } from "react";
3
+ var C = Object.defineProperty;
4
+ var w = (o, t, e) => t in o ? C(o, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[t] = e;
5
+ var n = (o, t, e) => w(o, typeof t != "symbol" ? t + "" : t, e);
6
+ import s, { useRef as A, cloneElement as v, Suspense as D, createContext as E, useContext as N } from "react";
7
7
  import { u as g } from "./useSelector-DpU7_HMO.js";
8
8
  import { makeObservable as x, observable as y, action as u } from "mobx";
9
9
  import { Duration as m, DateTime as l } from "luxon";
@@ -66,7 +66,7 @@ class r {
66
66
  });
67
67
  }
68
68
  static useNew() {
69
- return v(new r()).current;
69
+ return A(new r()).current;
70
70
  }
71
71
  useNotifications() {
72
72
  return g(() => Array.from(this.notificationsData.values()));
@@ -93,26 +93,26 @@ const B = "flow--notification-provider--notification-container", O = "flow--noti
93
93
  notification: O
94
94
  }, z = (o) => {
95
95
  const { notification: t, controller: e } = o;
96
- return C(t.element, {
96
+ return v(t.element, {
97
97
  onMouseEnter: () => {
98
- t.meta.autoCloseTimer.pause();
98
+ t.element.props.autoClose && t.meta.autoCloseTimer.pause();
99
99
  },
100
100
  onMouseLeave: () => {
101
- t.meta.autoCloseTimer.resume();
101
+ t.element.props.autoClose && t.meta.autoCloseTimer.resume();
102
102
  },
103
103
  onClose: () => {
104
104
  var i, a;
105
105
  e.remove(t.meta.id), (a = (i = t.element.props).onClose) == null || a.call(i);
106
106
  },
107
107
  onFocus: () => {
108
- t.meta.autoCloseTimer.pause();
108
+ t.element.props.autoClose && t.meta.autoCloseTimer.pause();
109
109
  },
110
110
  onBlur: () => {
111
- t.meta.autoCloseTimer.resume();
111
+ t.element.props.autoClose && t.meta.autoCloseTimer.resume();
112
112
  }
113
113
  });
114
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(
115
+ const { className: t, ...e } = o, i = j(), a = i.useNotifications(), p = L(), h = I(d.notificationContainer, t), T = /* @__PURE__ */ s.createElement(M, { features: P }, /* @__PURE__ */ s.createElement("div", { className: h, ...e }, /* @__PURE__ */ s.createElement(S, null, a.map((c) => /* @__PURE__ */ s.createElement(
116
116
  k.div,
117
117
  {
118
118
  className: d.notification,
@@ -132,7 +132,7 @@ const B = "flow--notification-provider--notification-container", O = "flow--noti
132
132
  }
133
133
  ))
134
134
  )))));
135
- return h ? null : b.createPortal(T, document.body);
135
+ return p ? null : b.createPortal(T, document.body);
136
136
  }, f = E(
137
137
  new r()
138
138
  ), j = () => N(f), X = (o) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mittwald/flow-react-components",
3
- "version": "0.1.0-alpha.393",
3
+ "version": "0.1.0-alpha.394",
4
4
  "type": "module",
5
5
  "description": "A React implementation of Flow, mittwald’s design system",
6
6
  "homepage": "https://mittwald.github.io/flow",
@@ -425,7 +425,7 @@
425
425
  "@chakra-ui/live-region": "^2.1.0",
426
426
  "@internationalized/date": "^3.6.0",
427
427
  "@internationalized/string-compiler": "^3.2.6",
428
- "@mittwald/react-tunnel": "^0.1.0-alpha.393",
428
+ "@mittwald/react-tunnel": "^0.1.0-alpha.394",
429
429
  "@mittwald/react-use-promise": "^2.6.0",
430
430
  "@react-aria/form": "^3.0.11",
431
431
  "@react-aria/utils": "^3.26.0",
@@ -456,7 +456,7 @@
456
456
  },
457
457
  "devDependencies": {
458
458
  "@faker-js/faker": "^9.2.0",
459
- "@mittwald/flow-design-tokens": "^0.1.0-alpha.393",
459
+ "@mittwald/flow-design-tokens": "^0.1.0-alpha.394",
460
460
  "@mittwald/react-use-promise": "^2.6.0",
461
461
  "@nx/storybook": "^20.1.3",
462
462
  "@storybook/addon-a11y": "^8.4.5",
@@ -551,5 +551,5 @@
551
551
  }
552
552
  }
553
553
  },
554
- "gitHead": "6725be5ecd22bf0cd7f30f5065e47d0b874259ae"
554
+ "gitHead": "4f7fd927f50675e1eaa0155f761971779627e010"
555
555
  }