@mittwald/flow-react-components 0.1.0-alpha.253 → 0.1.0-alpha.254

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.
@@ -0,0 +1,23 @@
1
+ "use client"
2
+ /* */
3
+ import e from "react";
4
+ import { C as i } from "./ClearPropsContext-CUvsbMn8.js";
5
+ import "./propsContext-DzAKlmhS.js";
6
+ import "@react-aria/utils";
7
+ import "remeda";
8
+ import "dot-prop";
9
+ import { f as l } from "./flowComponent-CY2oW3O9.js";
10
+ import { W as s } from "./Wrap-DGT1h1o3.js";
11
+ const W = l("Content", (t) => {
12
+ const {
13
+ children: r,
14
+ elementType: o = "div",
15
+ refProp: n,
16
+ clearPropsContext: m = !0,
17
+ ...p
18
+ } = t, a = o;
19
+ return /* @__PURE__ */ e.createElement(s, { if: m }, /* @__PURE__ */ e.createElement(i, null, /* @__PURE__ */ e.createElement(a, { ref: n, ...p }, r)));
20
+ });
21
+ export {
22
+ W as C
23
+ };
package/dist/Content.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use client"
2
2
  /* */
3
- import { C as o } from "./Content-CAZPjbt5.js";
3
+ import { C as o } from "./Content-cYnXBHf-.js";
4
4
  export {
5
5
  o as Content,
6
6
  o as default
package/dist/List.js CHANGED
@@ -31,7 +31,7 @@ import "./context-Cf7tqFtF.js";
31
31
  import { u as fe } from "./useOnChange-C1Quwyuz.js";
32
32
  import { S as be } from "./SearchField-CMvYWO_P.js";
33
33
  import { H as W } from "./Heading-FRIQlW19.js";
34
- import { S as Se } from "./Section-QApyOFfC.js";
34
+ import { S as Se } from "./Section-DsyCp0AH.js";
35
35
  import { getProperty as ve } from "dot-prop";
36
36
  import { hash as vt } from "object-code";
37
37
  import O from "zod";
@@ -10,7 +10,7 @@ import "@react-aria/utils";
10
10
  import "remeda";
11
11
  import { TunnelProvider as u, TunnelExit as p } from "@mittwald/react-tunnel";
12
12
  import { A as x } from "./Accordion-CCq563rl.js";
13
- import { C as N } from "./Content-CAZPjbt5.js";
13
+ import { C as N } from "./Content-cYnXBHf-.js";
14
14
  const C = "flow--navigation", I = "flow--navigation--item", b = "flow--navigation--icon", P = "flow--navigation--text", w = "flow--navigation--control-icon", r = {
15
15
  navigation: C,
16
16
  item: I,
@@ -0,0 +1,53 @@
1
+ "use client"
2
+ /* */
3
+ import e, { useId as u } from "react";
4
+ import f from "clsx";
5
+ import "./propsContext-DzAKlmhS.js";
6
+ import { P as c } from "./PropsContextProvider-C6Z4XGp6.js";
7
+ import "@react-aria/utils";
8
+ import "remeda";
9
+ import { f as i } from "./flowComponent-CY2oW3O9.js";
10
+ import * as s from "react-aria-components";
11
+ import { s as x } from "./ContextMenu.module-BZingr2B.js";
12
+ const C = "flow--section", S = {
13
+ section: C
14
+ }, E = i(
15
+ "ContextMenuSection",
16
+ (r) => {
17
+ const { children: t } = r, n = {
18
+ Heading: {
19
+ level: 5,
20
+ wrapWith: /* @__PURE__ */ e.createElement(s.Header, null)
21
+ }
22
+ };
23
+ return /* @__PURE__ */ e.createElement(s.Section, { className: x.section }, /* @__PURE__ */ e.createElement(c, { props: n, mergeInParentContext: !0 }, t));
24
+ }
25
+ ), y = i("Section", (r) => {
26
+ const {
27
+ children: t,
28
+ className: n,
29
+ refProp: a,
30
+ renderContextMenuSection: l,
31
+ ...m
32
+ } = r;
33
+ if (!t)
34
+ return null;
35
+ if (l)
36
+ return /* @__PURE__ */ e.createElement(E, null, t);
37
+ const p = f(S.section, n), o = u(), d = {
38
+ Heading: {
39
+ level: 2,
40
+ id: o
41
+ },
42
+ Header: {
43
+ renderSectionHeader: !0
44
+ },
45
+ List: {
46
+ "aria-labelledby": o
47
+ }
48
+ };
49
+ return /* @__PURE__ */ e.createElement("section", { ...m, className: p, ref: a }, /* @__PURE__ */ e.createElement(c, { props: d, mergeInParentContext: !0 }, t));
50
+ });
51
+ export {
52
+ y as S
53
+ };
package/dist/Section.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use client"
2
2
  /* */
3
- import { S as t } from "./Section-QApyOFfC.js";
3
+ import { S as t } from "./Section-DsyCp0AH.js";
4
4
  export {
5
5
  t as Section,
6
6
  t as default
package/dist/Tabs.js CHANGED
@@ -1,32 +1,33 @@
1
1
  "use client"
2
2
  /* */
3
- import e, { useRef as g, useState as v, useEffect as M, useId as w, createContext as h, useContext as I } from "react";
4
- import * as E from "react-aria-components";
3
+ import e, { useRef as h, useState as w, useEffect as M, useId as N, createContext as I, useContext as P } from "react";
4
+ import * as C from "react-aria-components";
5
5
  import u from "clsx";
6
- import { TunnelExit as C, TunnelProvider as P, TunnelEntry as f } from "@mittwald/react-tunnel";
7
- import { f as y } from "./flowComponent-CY2oW3O9.js";
8
- import { useCallbackRef as O } from "use-callback-ref";
9
- import { a as S, C as A } from "./ContextMenuTrigger-5-EjHDtY.js";
10
- import { M as B } from "./MenuItem-CFE7SA5J.js";
11
- import { B as K } from "./Button-BepCRVIi.js";
6
+ import { TunnelExit as E, TunnelProvider as y, TunnelEntry as f } from "@mittwald/react-tunnel";
7
+ import { f as O } from "./flowComponent-CY2oW3O9.js";
8
+ import { useCallbackRef as S } from "use-callback-ref";
9
+ import { a as A, C as B } from "./ContextMenuTrigger-5-EjHDtY.js";
10
+ import { M as K } from "./MenuItem-CFE7SA5J.js";
11
+ import { B as L } from "./Button-BepCRVIi.js";
12
12
  import "@tabler/icons-react";
13
13
  import "./Icon-cEgH3ZXQ.js";
14
- import { I as L } from "./IconContextMenu-DLHXM1Ph.js";
14
+ import { I as W } from "./IconContextMenu-DLHXM1Ph.js";
15
15
  import { T as F } from "./Text-T_kNKeFe.js";
16
16
  import "./propsContext-DzAKlmhS.js";
17
17
  import { P as R } from "./PropsContextProvider-C6Z4XGp6.js";
18
18
  import "@react-aria/utils";
19
19
  import "remeda";
20
- const W = "flow--tabs", $ = "flow--tabs--list", k = {
21
- tabs: W,
22
- list: $
23
- }, j = "flow--tabs--tab-list", q = "flow--tabs--tab-list--context-menu-button", z = "flow--tabs--tab-list--titles", D = "flow--tabs--tab-list--collapsed", b = {
24
- tabList: j,
25
- contextMenuButton: q,
26
- titles: z,
27
- collapsed: D
28
- }, G = () => {
29
- const s = g(), [n, r] = v(!1), o = O(null, (t) => {
20
+ import { A as x } from "./Activity-CmfZpgOM.js";
21
+ const $ = "flow--tabs", k = "flow--tabs--list", j = {
22
+ tabs: $,
23
+ list: k
24
+ }, q = "flow--tabs--tab-list", z = "flow--tabs--tab-list--context-menu-button", D = "flow--tabs--tab-list--titles", G = "flow--tabs--tab-list--collapsed", b = {
25
+ tabList: q,
26
+ contextMenuButton: z,
27
+ titles: D,
28
+ collapsed: G
29
+ }, H = () => {
30
+ const s = h(), [n, r] = w(!1), o = S(null, (t) => {
30
31
  l(), c(t);
31
32
  }), a = ([
32
33
  t
@@ -49,37 +50,37 @@ const W = "flow--tabs", $ = "flow--tabs--list", k = {
49
50
  ref: o,
50
51
  isOverflowing: n
51
52
  };
52
- }, H = "flow--tabs--tab-title", J = "flow--tabs--tab-title--text", Q = "flow--tabs--tab-title--menu-item", p = {
53
- tabTitle: H,
54
- text: J,
55
- menuItem: Q
56
- }, U = (s) => {
57
- const { className: n, ...r } = s, o = u(n, p.tabTitle);
58
- return /* @__PURE__ */ e.createElement("div", { ...r, className: o, "data-selected": !0 }, /* @__PURE__ */ e.createElement(C, { id: "ActiveTitle" }));
53
+ }, J = "flow--tabs--tab-title", Q = "flow--tabs--tab-title--text", U = "flow--tabs--tab-title--menu-item", p = {
54
+ tabTitle: J,
55
+ text: Q,
56
+ menuItem: U
59
57
  }, V = (s) => {
60
- const { selection: n, disabledKeys: r, onContextMenuSelectionChange: o } = s, a = w(), c = G(), l = c.isOverflowing, t = u(b.tabList, l && b.collapsed), i = (x) => {
61
- o(x);
62
- }, m = /* @__PURE__ */ e.createElement(E.TabList, { className: b.titles, ref: c.ref }, /* @__PURE__ */ e.createElement(C, { id: "Titles" })), d = l && /* @__PURE__ */ e.createElement(U, { id: a }), T = l && /* @__PURE__ */ e.createElement(S, null, /* @__PURE__ */ e.createElement(
63
- K,
58
+ const { className: n, ...r } = s, o = u(n, p.tabTitle);
59
+ return /* @__PURE__ */ e.createElement("div", { ...r, className: o, "data-selected": !0 }, /* @__PURE__ */ e.createElement(E, { id: "ActiveTitle" }));
60
+ }, X = (s) => {
61
+ const { selection: n, disabledKeys: r, onContextMenuSelectionChange: o } = s, a = N(), c = H(), l = c.isOverflowing, t = u(b.tabList, l && b.collapsed), i = (v) => {
62
+ o(v);
63
+ }, m = /* @__PURE__ */ e.createElement(C.TabList, { className: b.titles, ref: c.ref }, /* @__PURE__ */ e.createElement(E, { id: "Titles" })), d = l && /* @__PURE__ */ e.createElement(V, { id: a }), T = l && /* @__PURE__ */ e.createElement(A, null, /* @__PURE__ */ e.createElement(
64
+ L,
64
65
  {
65
66
  variant: "soft",
66
67
  className: b.contextMenuButton,
67
68
  color: "secondary",
68
69
  "aria-labelledby": a
69
70
  },
70
- /* @__PURE__ */ e.createElement(L, null)
71
+ /* @__PURE__ */ e.createElement(W, null)
71
72
  ), /* @__PURE__ */ e.createElement(
72
- A,
73
+ B,
73
74
  {
74
75
  disabledKeys: r,
75
76
  selectedKeys: n ? [n] : void 0,
76
77
  selectionMode: "navigation",
77
- onAction: (x) => i(x)
78
+ onAction: (v) => i(v)
78
79
  },
79
- /* @__PURE__ */ e.createElement(C, { id: "ContextMenuItems" })
80
+ /* @__PURE__ */ e.createElement(E, { id: "ContextMenuItems" })
80
81
  ));
81
82
  return /* @__PURE__ */ e.createElement("div", { className: t }, m, d, T);
82
- }, Ce = y("Tabs", (s) => {
83
+ }, Te = O("Tabs", (s) => {
83
84
  const {
84
85
  children: n,
85
86
  className: r,
@@ -87,11 +88,11 @@ const W = "flow--tabs", $ = "flow--tabs--list", k = {
87
88
  disabledKeys: a,
88
89
  refProp: c,
89
90
  ...l
90
- } = s, t = u(k.tabs, r), [i, m] = v(
91
+ } = s, t = u(j.tabs, r), [i, m] = w(
91
92
  o
92
93
  );
93
- return /* @__PURE__ */ e.createElement(P, null, n, /* @__PURE__ */ e.createElement(
94
- E.Tabs,
94
+ return /* @__PURE__ */ e.createElement(y, null, n, /* @__PURE__ */ e.createElement(
95
+ C.Tabs,
95
96
  {
96
97
  slot: null,
97
98
  className: t,
@@ -102,30 +103,30 @@ const W = "flow--tabs", $ = "flow--tabs--list", k = {
102
103
  ref: c
103
104
  },
104
105
  /* @__PURE__ */ e.createElement(
105
- V,
106
+ X,
106
107
  {
107
108
  selection: i,
108
109
  onContextMenuSelectionChange: m,
109
110
  disabledKeys: a
110
111
  }
111
112
  ),
112
- /* @__PURE__ */ e.createElement(C, { id: "Panels" })
113
+ /* @__PURE__ */ e.createElement(E, { id: "Panels" })
113
114
  ));
114
- }), N = h({
115
+ }), g = I({
115
116
  id: "undefined"
116
- }), X = () => I(N), Y = N.Provider, Ee = (s) => {
117
- const { children: n, className: r, ...o } = s, { id: a } = X(), c = u(p.tabTitle, r);
118
- return /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(f, { id: "Titles" }, /* @__PURE__ */ e.createElement(E.Tab, { ...o, id: a, className: c }, (l) => /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(F, { emulateBoldWidth: !0 }, /* @__PURE__ */ e.createElement("span", { className: p.text }, n)), /* @__PURE__ */ e.createElement(f, { id: "ActiveTitle" }, l.isSelected && n)))), /* @__PURE__ */ e.createElement(f, { id: "ContextMenuItems" }, /* @__PURE__ */ e.createElement(B, { className: p.menuItem, id: a }, n)));
119
- }, Z = "flow--tabs--tab--tab-panel", _ = {
120
- tabPanel: Z
121
- }, Te = (s) => {
122
- const { children: n, className: r, id: o, ...a } = s, c = u(_.tabPanel, r), l = w(), t = o ?? l, i = (m) => {
117
+ }), Y = () => P(g), Z = g.Provider, ve = (s) => {
118
+ const { children: n, className: r, ...o } = s, { id: a } = Y(), c = u(p.tabTitle, r);
119
+ return /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(f, { id: "Titles" }, /* @__PURE__ */ e.createElement(C.Tab, { ...o, id: a, className: c }, (l) => /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(F, { emulateBoldWidth: !0 }, /* @__PURE__ */ e.createElement("span", { className: p.text }, n)), /* @__PURE__ */ e.createElement(f, { id: "ActiveTitle" }, l.isSelected && n)))), /* @__PURE__ */ e.createElement(f, { id: "ContextMenuItems" }, /* @__PURE__ */ e.createElement(K, { className: p.menuItem, id: a }, n)));
120
+ }, _ = "flow--tabs--tab--tab-panel", ee = {
121
+ tabPanel: _
122
+ }, xe = (s) => {
123
+ const { children: n, className: r, id: o, ...a } = s, c = u(ee.tabPanel, r), l = N(), t = o ?? l, i = (m) => {
123
124
  const d = m.state.selectedKey === t, T = {
124
125
  Content: {
125
- isActive: d
126
+ wrapWith: /* @__PURE__ */ e.createElement(x, { isActive: d })
126
127
  },
127
128
  Section: {
128
- isActive: d
129
+ wrapWith: /* @__PURE__ */ e.createElement(x, { isActive: d })
129
130
  }
130
131
  };
131
132
  return /* @__PURE__ */ e.createElement(
@@ -137,8 +138,8 @@ const W = "flow--tabs", $ = "flow--tabs--list", k = {
137
138
  n
138
139
  );
139
140
  };
140
- return /* @__PURE__ */ e.createElement(f, { id: "Panels" }, /* @__PURE__ */ e.createElement(Y, { value: { id: t } }, /* @__PURE__ */ e.createElement(
141
- E.TabPanel,
141
+ return /* @__PURE__ */ e.createElement(f, { id: "Panels" }, /* @__PURE__ */ e.createElement(Z, { value: { id: t } }, /* @__PURE__ */ e.createElement(
142
+ C.TabPanel,
142
143
  {
143
144
  className: c,
144
145
  shouldForceMount: !0,
@@ -149,8 +150,8 @@ const W = "flow--tabs", $ = "flow--tabs--list", k = {
149
150
  )));
150
151
  };
151
152
  export {
152
- Te as Tab,
153
- Ee as TabTitle,
154
- Ce as Tabs,
155
- Ce as default
153
+ xe as Tab,
154
+ ve as TabTitle,
155
+ Te as Tabs,
156
+ Te as default
156
157
  };
@@ -2,7 +2,6 @@ import { PropsWithChildren, default as React } from 'react';
2
2
  import { PropsWithElementType } from '../../lib/types/props';
3
3
  import { FlowComponentProps } from '../../lib/componentFactory/flowComponent';
4
4
  export interface ContentProps extends PropsWithChildren, PropsWithElementType<"div" | "section" | "span">, FlowComponentProps {
5
- slot?: string;
6
5
  }
7
6
  export declare const Content: React.ForwardRefExoticComponent<ContentProps & React.RefAttributes<never>>;
8
7
  export default Content;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mittwald/flow-react-components",
3
- "version": "0.1.0-alpha.253",
3
+ "version": "0.1.0-alpha.254",
4
4
  "type": "module",
5
5
  "description": "A React implementation of Flow, mittwald’s design system",
6
6
  "homepage": "https://mittwald.github.io/flow",
@@ -313,7 +313,7 @@
313
313
  "@chakra-ui/live-region": "^2.1.0",
314
314
  "@internationalized/date": "^3.5.5",
315
315
  "@internationalized/string-compiler": "^3.2.4",
316
- "@mittwald/react-tunnel": "^0.1.0-alpha.253",
316
+ "@mittwald/react-tunnel": "^0.1.0-alpha.254",
317
317
  "@mittwald/react-use-promise": "^2.5.0",
318
318
  "@react-aria/utils": "^3.25.2",
319
319
  "@react-types/shared": "^3.24.1",
@@ -340,7 +340,7 @@
340
340
  },
341
341
  "devDependencies": {
342
342
  "@faker-js/faker": "^9.0.1",
343
- "@mittwald/flow-design-tokens": "^0.1.0-alpha.253",
343
+ "@mittwald/flow-design-tokens": "^0.1.0-alpha.254",
344
344
  "@mittwald/react-use-promise": "^2.5.0",
345
345
  "@nx/storybook": "^19.7.4",
346
346
  "@storybook/addon-a11y": "^8.3.2",
@@ -418,5 +418,5 @@
418
418
  "optional": true
419
419
  }
420
420
  },
421
- "gitHead": "625da382543f6960773d5e8b448677ac8fe75736"
421
+ "gitHead": "a879bdb296ef148c6e08420d6439a304ab529690"
422
422
  }
@@ -1,25 +0,0 @@
1
- "use client"
2
- /* */
3
- import t from "react";
4
- import { C as c } from "./ClearPropsContext-CUvsbMn8.js";
5
- import "./propsContext-DzAKlmhS.js";
6
- import "@react-aria/utils";
7
- import "remeda";
8
- import "dot-prop";
9
- import { f as l } from "./flowComponent-CY2oW3O9.js";
10
- import { W as s } from "./Wrap-DGT1h1o3.js";
11
- import { A as f } from "./Activity-CmfZpgOM.js";
12
- const W = l("Content", (e) => {
13
- const {
14
- children: r,
15
- elementType: o = "div",
16
- refProp: m,
17
- clearPropsContext: n = !0,
18
- isActive: i = !0,
19
- ...p
20
- } = e, a = o;
21
- return /* @__PURE__ */ t.createElement(s, { if: n }, /* @__PURE__ */ t.createElement(c, null, /* @__PURE__ */ t.createElement(f, { isActive: i }, /* @__PURE__ */ t.createElement(a, { ref: m, ...p }, r))));
22
- });
23
- export {
24
- W as C
25
- };
@@ -1,55 +0,0 @@
1
- "use client"
2
- /* */
3
- import e, { useId as f } from "react";
4
- import x from "clsx";
5
- import "./propsContext-DzAKlmhS.js";
6
- import { P as i } from "./PropsContextProvider-C6Z4XGp6.js";
7
- import "@react-aria/utils";
8
- import "remeda";
9
- import { f as c } from "./flowComponent-CY2oW3O9.js";
10
- import { A as C } from "./Activity-CmfZpgOM.js";
11
- import * as s from "react-aria-components";
12
- import { s as S } from "./ContextMenu.module-BZingr2B.js";
13
- const E = "flow--section", P = {
14
- section: E
15
- }, g = c(
16
- "ContextMenuSection",
17
- (r) => {
18
- const { children: t } = r, o = {
19
- Heading: {
20
- level: 5,
21
- wrapWith: /* @__PURE__ */ e.createElement(s.Header, null)
22
- }
23
- };
24
- return /* @__PURE__ */ e.createElement(s.Section, { className: S.section }, /* @__PURE__ */ e.createElement(i, { props: o, mergeInParentContext: !0 }, t));
25
- }
26
- ), b = c("Section", (r) => {
27
- const {
28
- children: t,
29
- className: o,
30
- isActive: a = !0,
31
- refProp: l,
32
- renderContextMenuSection: m,
33
- ...p
34
- } = r;
35
- if (!t)
36
- return null;
37
- if (m)
38
- return /* @__PURE__ */ e.createElement(g, null, t);
39
- const d = x(P.section, o), n = f(), u = {
40
- Heading: {
41
- level: 2,
42
- id: n
43
- },
44
- Header: {
45
- renderSectionHeader: !0
46
- },
47
- List: {
48
- "aria-labelledby": n
49
- }
50
- };
51
- return /* @__PURE__ */ e.createElement(C, { isActive: a }, /* @__PURE__ */ e.createElement("section", { ...p, className: d, ref: l }, /* @__PURE__ */ e.createElement(i, { props: u, mergeInParentContext: !0 }, t)));
52
- });
53
- export {
54
- b as S
55
- };