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

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.395](https://github.com/mittwald/flow/compare/0.1.0-alpha.394...0.1.0-alpha.395) (2025-01-20)
7
+
8
+ ### Features
9
+
10
+ - **ActionGroup:** support switch
11
+ ([#1105](https://github.com/mittwald/flow/issues/1105))
12
+ ([5415c9d](https://github.com/mittwald/flow/commit/5415c9dc01fc2cef7a701ba547625f6eb2f0a9d5))
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.394](https://github.com/mittwald/flow/compare/0.1.0-alpha.393...0.1.0-alpha.394) (2025-01-15)
20
+
21
+ ### Bug Fixes
22
+
23
+ - **Notification:** Fix "Timer not started" error for notifications that should
24
+ not auto close ([#1101](https://github.com/mittwald/flow/issues/1101))
25
+ ([f9b5975](https://github.com/mittwald/flow/commit/f9b59756da9c4aeebc08c5eb62c0efef98fa9c9a))
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.393](https://github.com/mittwald/flow/compare/0.1.0-alpha.392...0.1.0-alpha.393) (2025-01-10)
7
33
 
8
34
  **Note:** Version bump only for package @mittwald/flow-react-components
@@ -1 +1 @@
1
- .flow--action-group{display:flex}.flow--action-group .flow--action-group--primary{order:3}.flow--action-group .flow--action-group--primary:only-child{margin-left:auto}.flow--action-group .flow--action-group--secondary{margin-left:auto;order:2}.flow--action-group .flow--action-group--secondary~.flow--action-group--secondary{margin-left:unset}.flow--action-group .flow--action-group--abort{order:1;margin-right:auto}.flow--action-group--action-group-container.flow--action-group--ignore-breakpoint .flow--action-group{flex-wrap:wrap}.flow--action-group--action-group-container:not(.flow--action-group--ignore-breakpoint){container-type:inline-size}@container (max-width: 550px){.flow--action-group--action-group-container:not(.flow--action-group--ignore-breakpoint) .flow--action-group{display:flex;flex-direction:column-reverse}.flow--action-group--action-group-container:not(.flow--action-group--ignore-breakpoint) .flow--action-group .flow--action-group--primary,.flow--action-group--action-group-container:not(.flow--action-group--ignore-breakpoint) .flow--action-group .flow--action-group--secondary,.flow--action-group--action-group-container:not(.flow--action-group--ignore-breakpoint) .flow--action-group .flow--action-group--abort{width:100%}.flow--action-group--action-group-container:not(.flow--action-group--ignore-breakpoint) .flow--action-group .flow--action-group--secondary{flex-direction:column-reverse}.flow--action-group--action-group-container:not(.flow--action-group--ignore-breakpoint) .flow--action-group .flow--action-group--secondary>*{width:100%}}.flow--action-group--action-group-container.flow--action-group--s .flow--action-group,.flow--action-group--action-group-container .flow--action-group{gap:var(--action-group--spacing--s)}.flow--action-group--action-group-container.flow--action-group--m .flow--action-group{gap:var(--action-group--spacing--m)}
1
+ .flow--action-group{display:flex;align-items:center}.flow--action-group .flow--action-group--primary{order:3}.flow--action-group .flow--action-group--primary:only-child{margin-left:auto}.flow--action-group .flow--action-group--secondary{margin-left:auto;order:2}.flow--action-group .flow--action-group--secondary~.flow--action-group--secondary{margin-left:unset}.flow--action-group .flow--action-group--abort{order:1;margin-right:auto}.flow--action-group--action-group-container.flow--action-group--ignore-breakpoint .flow--action-group{flex-wrap:wrap}.flow--action-group--action-group-container:not(.flow--action-group--ignore-breakpoint){container-type:inline-size}@container (max-width: 550px){.flow--action-group--action-group-container:not(.flow--action-group--ignore-breakpoint) .flow--action-group{display:flex;flex-direction:column-reverse}.flow--action-group--action-group-container:not(.flow--action-group--ignore-breakpoint) .flow--action-group .flow--action-group--primary,.flow--action-group--action-group-container:not(.flow--action-group--ignore-breakpoint) .flow--action-group .flow--action-group--secondary,.flow--action-group--action-group-container:not(.flow--action-group--ignore-breakpoint) .flow--action-group .flow--action-group--abort{width:100%}.flow--action-group--action-group-container:not(.flow--action-group--ignore-breakpoint) .flow--action-group .flow--action-group--secondary{flex-direction:column-reverse}.flow--action-group--action-group-container:not(.flow--action-group--ignore-breakpoint) .flow--action-group .flow--action-group--secondary>*{width:100%}}.flow--action-group--action-group-container.flow--action-group--s .flow--action-group,.flow--action-group--action-group-container .flow--action-group{gap:var(--action-group--spacing--s)}.flow--action-group--action-group-container.flow--action-group--m .flow--action-group{gap:var(--action-group--spacing--m)}
@@ -0,0 +1,52 @@
1
+ "use client"
2
+ /* */
3
+ import r from "react";
4
+ import "./propsContext-DzAKlmhS.js";
5
+ import { PropsContextProvider as w } from "./PropsContextProvider.js";
6
+ import "@react-aria/utils";
7
+ import "remeda";
8
+ import { d as n } from "./dynamic-ClpUSmEt.js";
9
+ import e from "clsx";
10
+ import { f as C } from "./flowComponent-BQs9wMX_.js";
11
+ import { TunnelProvider as G } from "@mittwald/react-tunnel";
12
+ import { A as y, g as a } from "./getActionGroupSlot-BHzMGEA7.js";
13
+ const N = "flow--action-group", P = "flow--action-group--primary", x = "flow--action-group--secondary", A = "flow--action-group--abort", b = "flow--action-group--action-group-container", k = "flow--action-group--ignore-breakpoint", v = "flow--action-group--s", B = "flow--action-group--m", t = {
14
+ actionGroup: N,
15
+ primary: P,
16
+ secondary: x,
17
+ abort: A,
18
+ actionGroupContainer: b,
19
+ ignoreBreakpoint: k,
20
+ s: v,
21
+ m: B
22
+ }, F = C("ActionGroup", (i) => {
23
+ const {
24
+ children: c,
25
+ className: s,
26
+ refProp: p,
27
+ ignoreBreakpoint: l,
28
+ spacing: m = "s",
29
+ ...u
30
+ } = i, g = e(
31
+ t.actionGroupContainer,
32
+ s,
33
+ l && t.ignoreBreakpoint,
34
+ t[m]
35
+ ), f = {
36
+ Button: {
37
+ slot: n((o) => a(o)),
38
+ className: n((o) => {
39
+ const d = a(o);
40
+ return e(o.className, t[d]);
41
+ })
42
+ },
43
+ Switch: {
44
+ labelPosition: "leading",
45
+ className: n((o) => e(o.className, o.slot && t[o.slot]))
46
+ }
47
+ };
48
+ return /* @__PURE__ */ r.createElement(y, null, /* @__PURE__ */ r.createElement(w, { props: f, mergeInParentContext: !0 }, /* @__PURE__ */ r.createElement(G, null, /* @__PURE__ */ r.createElement("div", { ...u, className: g, ref: p }, /* @__PURE__ */ r.createElement("div", { className: t.actionGroup, role: "group" }, c)))));
49
+ });
50
+ export {
51
+ F as A
52
+ };
@@ -1,6 +1,6 @@
1
1
  "use client"
2
2
  /* */
3
- import { A as r } from "./ActionGroup-Bd0aZvbX.js";
3
+ import { A as r } from "./ActionGroup-cpOWMaBi.js";
4
4
  export {
5
5
  r as ActionGroup,
6
6
  r as default
package/dist/js/List.js CHANGED
@@ -50,7 +50,7 @@ import { a as v, b as D, d as xe } from "./deepHas-KHS5X1F_.js";
50
50
  import { ListLoaderAsyncResource as De, TypedListLoaderAsyncResource as Ne } from "./List/ListLoaderAsyncResource.js";
51
51
  import { S as Re } from "./Skeleton-CKLaTmDR.js";
52
52
  import { a as Lt, e as Pt, d as At, b as Vt, T as kt, c as Bt } from "./Table-Cgwv_qa_.js";
53
- import { A as $e } from "./ActionGroup-Bd0aZvbX.js";
53
+ import { A as $e } from "./ActionGroup-cpOWMaBi.js";
54
54
  const Ue = "flow--list--items--item--view", ze = "flow--list--items--item--view--content", Ke = "flow--list--items--item--view--title", Oe = "flow--list--items--item--view--avatar", He = "flow--list--items--item--view--sub-title", qe = "flow--list--items--item--view--heading", Ge = "flow--list--items--item--view--text", je = "flow--list--items--item--view--top-content", We = "flow--list--items--item--view--action", Je = "flow--list--items--item--view--bottom-content", p = {
55
55
  view: Ue,
56
56
  content: ze,
@@ -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) => {