@mittwald/flow-react-components 0.1.0-alpha.353 → 0.1.0-alpha.355

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.355](https://github.com/mittwald/flow/compare/0.1.0-alpha.354...0.1.0-alpha.355) (2024-11-26)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **List:** list item without action should not have a hover effect
11
+ ([#999](https://github.com/mittwald/flow/issues/999))
12
+ ([2dc94b8](https://github.com/mittwald/flow/commit/2dc94b8b9da0c207e38186e65c2693c1e31a5bf1))
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.354](https://github.com/mittwald/flow/compare/0.1.0-alpha.353...0.1.0-alpha.354) (2024-11-25)
20
+
21
+ ### Bug Fixes
22
+
23
+ - **Notification:** Add Suspense to NotificationContainer
24
+ ([#1002](https://github.com/mittwald/flow/issues/1002))
25
+ ([843b8ed](https://github.com/mittwald/flow/commit/843b8ed1816bce2a2af3187504b7b108fdae75a0))
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.353](https://github.com/mittwald/flow/compare/0.1.0-alpha.352...0.1.0-alpha.353) (2024-11-25)
7
33
 
8
34
  ### Features
package/dist/js/List.js CHANGED
@@ -1032,9 +1032,9 @@ const Ms = "flow--list--items", xs = "flow--list--items--is-loading", ve = {
1032
1032
  }, [l, c, u.current, m]), !m)
1033
1033
  return {
1034
1034
  gridItemProps: {
1035
- onAction: () => {
1035
+ onAction: o ? () => {
1036
1036
  o == null || o(e);
1037
- }
1037
+ } : void 0
1038
1038
  },
1039
1039
  children: E
1040
1040
  };
@@ -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, createContext as D, useContext as N } from "react";
7
- import { u as E } from "./useSelector-DpU7_HMO.js";
8
- import { makeObservable as g, observable as x, action as u } from "mobx";
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 y from "react-dom";
11
- import b from "clsx";
12
- import { LazyMotion as I, domAnimation as M, AnimatePresence as P, m as k } from "framer-motion";
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
- g(this, {
63
- notificationsData: x.shallow,
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 E(() => Array.from(this.notificationsData.values()));
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 S = "flow--notification-provider--notification-container", B = "flow--notification-provider--notification", d = {
92
- notificationContainer: S,
93
- notification: B
94
- }, O = (o) => {
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
- }, z = (o) => {
115
- const { className: t, ...e } = o, i = F(), a = i.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, a.map((c) => /* @__PURE__ */ s.createElement(
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,24 +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
- O,
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 : y.createPortal(T, document.body);
136
- }, f = D(
135
+ return h ? null : b.createPortal(T, document.body);
136
+ }, f = E(
137
137
  new r()
138
- ), F = () => N(f), W = (o) => {
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(z, { ...e }), t);
140
+ return /* @__PURE__ */ s.createElement(f.Provider, { value: i }, /* @__PURE__ */ s.createElement(F, { ...e }), t);
141
141
  };
142
142
  export {
143
143
  r as NotificationController,
144
- W as NotificationProvider,
145
- W as default,
146
- F as useNotificationController
144
+ X as NotificationProvider,
145
+ X as default,
146
+ j as useNotificationController
147
147
  };
@@ -4,7 +4,7 @@ interface P extends PropsWithChildren {
4
4
  }
5
5
  export declare const useGridItemProps: (props: P) => {
6
6
  gridItemProps: {
7
- onAction: () => void;
7
+ onAction: (() => void) | undefined;
8
8
  ref?: undefined;
9
9
  };
10
10
  children: React.ReactNode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mittwald/flow-react-components",
3
- "version": "0.1.0-alpha.353",
3
+ "version": "0.1.0-alpha.355",
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.353",
423
+ "@mittwald/react-tunnel": "^0.1.0-alpha.355",
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.353",
454
+ "@mittwald/flow-design-tokens": "^0.1.0-alpha.355",
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": "11fe256c041db02c658fb31dd410f710c67da6db"
549
+ "gitHead": "ad53b4048d7af6811c85c6452049c913bd479554"
550
550
  }