@mittwald/flow-react-components 0.1.0-alpha.115 → 0.1.0-alpha.116

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.
Files changed (83) hide show
  1. package/dist/Accordion-BzSb2drj.js +77 -0
  2. package/dist/Accordion.js +1 -1
  3. package/dist/Activity-CmfZpgOM.js +28 -0
  4. package/dist/Avatar.js +1 -1
  5. package/dist/Breadcrumb.js +2 -2
  6. package/dist/{Button-D59Yuz6-.js → Button-_8JcP9d1.js} +5 -5
  7. package/dist/Button.js +1 -1
  8. package/dist/ButtonGroup.js +1 -1
  9. package/dist/{Checkbox-1u78lml-.js → Checkbox-CoDeuNsM.js} +4 -4
  10. package/dist/Checkbox.js +1 -1
  11. package/dist/{CheckboxButton-D9y427qr.js → CheckboxButton-D_i7P_qt.js} +2 -2
  12. package/dist/CheckboxButton.js +1 -1
  13. package/dist/CheckboxGroup.js +3 -3
  14. package/dist/Content-BK2g3Yro.js +25 -0
  15. package/dist/Content.js +1 -1
  16. package/dist/{ContextMenu-BHan4xr7.js → ContextMenu-kfsMEIUy.js} +1 -1
  17. package/dist/ContextMenu.js +2 -2
  18. package/dist/CopyButton.js +4 -4
  19. package/dist/FieldDescription.js +2 -2
  20. package/dist/{FieldError-T1bvZYZU.js → FieldError-ef2wRBhJ.js} +3 -3
  21. package/dist/FieldError.js +1 -1
  22. package/dist/Header.js +1 -1
  23. package/dist/Heading.js +1 -1
  24. package/dist/{Icon-CA9DycKJ.js → Icon-DAE3MVF2.js} +1 -1
  25. package/dist/Icon.js +1 -1
  26. package/dist/{IconCheck-B834n9e-.js → IconCheck-B_TL6rk7.js} +1 -1
  27. package/dist/{IconCheckboxEmpty-CikjhqSs.js → IconCheckboxEmpty-9LFcjE0j.js} +1 -1
  28. package/dist/{IconCheckboxIndeterminate-B-Zm2vJ0.js → IconCheckboxIndeterminate-CVt-Emyf.js} +1 -1
  29. package/dist/{IconChevronDown-DvDzDLHn.js → IconChevronDown-4x9PZE3A.js} +1 -1
  30. package/dist/{IconChevronRight-CQ4ThSCR.js → IconChevronRight-BGr3gKMc.js} +1 -1
  31. package/dist/{IconClose-9_7oZ-l1.js → IconClose-D5y8_cAW.js} +1 -1
  32. package/dist/{IconContextMenu-CdytNL-c.js → IconContextMenu-CscpZMqu.js} +1 -1
  33. package/dist/{IconCopy-DFsbS558.js → IconCopy-J5KCFCD0.js} +1 -1
  34. package/dist/{IconDanger-CGxUl9b1.js → IconDanger-Be-8YO4Z.js} +1 -1
  35. package/dist/{IconPending-CuhW_8N8.js → IconPending-UvsvM-yo.js} +1 -1
  36. package/dist/{IconPlus-DEihhQUA.js → IconPlus-BZ0ojVn-.js} +1 -1
  37. package/dist/{IconRadioOn-B41C-1Km.js → IconRadioOn-DKF0Bkmh.js} +1 -1
  38. package/dist/{IconSucceeded-DHtj6r9L.js → IconSucceeded-C8ICBiWF.js} +1 -1
  39. package/dist/{IconWarning-BqRmeHaF.js → IconWarning-D4N03eMl.js} +1 -1
  40. package/dist/Icons.js +15 -15
  41. package/dist/Image.js +1 -1
  42. package/dist/Initials.js +1 -1
  43. package/dist/InlineAlert.js +2 -2
  44. package/dist/{Label-4tBbBXkh.js → Label-u7aknIoq.js} +1 -1
  45. package/dist/Label.js +1 -1
  46. package/dist/LayoutCard.js +1 -1
  47. package/dist/{Link-TVG_Y-ZN.js → Link-DGmaq49u.js} +1 -1
  48. package/dist/Link.js +1 -1
  49. package/dist/List.js +9 -9
  50. package/dist/{LoadingSpinner-CQKhFNdn.js → LoadingSpinner-DdxaPznB.js} +2 -2
  51. package/dist/LoadingSpinner.js +1 -1
  52. package/dist/{MenuItem-D0wwxHmB.js → MenuItem-D4OlNY0-.js} +5 -5
  53. package/dist/MenuItem.js +1 -1
  54. package/dist/Modal.js +1 -1
  55. package/dist/Navigation.js +13 -11
  56. package/dist/NumberField.js +6 -6
  57. package/dist/OffCanvas.js +3 -3
  58. package/dist/RadioGroup.js +5 -5
  59. package/dist/Section.js +20 -18
  60. package/dist/Select.js +4 -4
  61. package/dist/StatusBadge.js +3 -3
  62. package/dist/{StatusIcon-4FlAQF3p.js → StatusIcon-bhiGnLh6.js} +3 -3
  63. package/dist/StatusIcon.js +1 -1
  64. package/dist/Switch.js +5 -5
  65. package/dist/Tabs.js +93 -78
  66. package/dist/{Text-D94bUNze.js → Text-CMf42YK8.js} +1 -1
  67. package/dist/Text.js +1 -1
  68. package/dist/TextArea.js +2 -2
  69. package/dist/TextField.js +2 -2
  70. package/dist/{TextFieldBase-DLi7NvGk.js → TextFieldBase-DFFlaU7o.js} +1 -1
  71. package/dist/{flowComponent-MjC63Rjp.js → flowComponent-D-odaa-x.js} +1 -1
  72. package/dist/react-hook-form.js +1 -1
  73. package/dist/types/components/Activity/Activity.d.ts +8 -0
  74. package/dist/types/components/Activity/Activity.test.d.ts +1 -0
  75. package/dist/types/components/Activity/index.d.ts +4 -0
  76. package/dist/types/components/Content/Content.d.ts +1 -1
  77. package/dist/types/components/Section/Section.d.ts +5 -3
  78. package/dist/types/components/propTypes/index.d.ts +2 -0
  79. package/dist/types/lib/propsContext/propsContext.d.ts +1 -0
  80. package/dist/{useProps-CjWcmgf3.js → useProps-L-mDIVx4.js} +1 -0
  81. package/package.json +4 -4
  82. package/dist/Accordion-DsX7RI_p.js +0 -76
  83. package/dist/Content-DT3Soml6.js +0 -23
package/dist/Tabs.js CHANGED
@@ -1,71 +1,75 @@
1
1
  "use client"
2
2
  /* */
3
- import e, { useRef as h, useState as C, useEffect as M, useId as p, createContext as I, useContext as y } from "react";
4
- import * as E from "react-aria-components";
5
- import { MenuTrigger as O } from "react-aria-components";
6
- import m from "clsx";
7
- import { TunnelExit as f, TunnelProvider as P, TunnelEntry as b } from "@mittwald/react-tunnel";
8
- import { f as S } from "./flowComponent-MjC63Rjp.js";
3
+ import e, { useRef as h, useState as x, useEffect as M, useId as g, createContext as I, useContext as P } from "react";
4
+ import * as C from "react-aria-components";
5
+ import { MenuTrigger as y } from "react-aria-components";
6
+ import d from "clsx";
7
+ import { TunnelExit as p, TunnelProvider as S, TunnelEntry as b } from "@mittwald/react-tunnel";
8
+ import { f as O } from "./flowComponent-D-odaa-x.js";
9
9
  import { useCallbackRef as B } from "use-callback-ref";
10
- import { C as K } from "./ContextMenu-BHan4xr7.js";
11
- import { M as L } from "./MenuItem-D0wwxHmB.js";
12
- import { B as F } from "./Button-D59Yuz6-.js";
10
+ import { C as K } from "./ContextMenu-kfsMEIUy.js";
11
+ import { M as A } from "./MenuItem-D4OlNY0-.js";
12
+ import { B as L } from "./Button-_8JcP9d1.js";
13
13
  import "@tabler/icons-react";
14
- import "./Icon-CA9DycKJ.js";
15
- import { I as A } from "./IconContextMenu-CdytNL-c.js";
16
- import { T as R } from "./Text-D94bUNze.js";
17
- const W = "flow--tabs", $ = "flow--tabs--list", k = {
18
- tabs: W,
19
- list: $
20
- }, 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", u = {
21
- tabList: j,
22
- contextMenuButton: q,
23
- titles: z,
24
- collapsed: D
25
- }, G = () => {
26
- const s = h(), [n, r] = C(!1), o = B(null, (t) => {
27
- a(), c(t);
28
- }), l = ([
14
+ import "./Icon-DAE3MVF2.js";
15
+ import { I as F } from "./IconContextMenu-CscpZMqu.js";
16
+ import { T as R } from "./Text-CMf42YK8.js";
17
+ import "./propsContext-CauylOgH.js";
18
+ import { P as W } from "./PropsContextProvider-DZvwqHLP.js";
19
+ import "@react-aria/utils";
20
+ import "remeda";
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", u = {
25
+ tabList: q,
26
+ contextMenuButton: z,
27
+ titles: D,
28
+ collapsed: G
29
+ }, H = () => {
30
+ const s = h(), [n, r] = x(!1), o = B(null, (t) => {
31
+ l(), c(t);
32
+ }), a = ([
29
33
  t
30
34
  ]) => {
31
35
  t && r(!t.isIntersecting);
32
36
  }, c = (t = o.current) => {
33
37
  if (t && t instanceof Element) {
34
- const i = new IntersectionObserver(l, {
38
+ const i = new IntersectionObserver(a, {
35
39
  root: t.parentElement,
36
40
  // 1 = invoke callback when the element is 100% visible within the parent element
37
41
  threshold: 1
38
42
  });
39
43
  s.current = i, i.observe(t);
40
44
  }
41
- }, a = () => {
45
+ }, l = () => {
42
46
  var t;
43
47
  (t = s.current) == null || t.disconnect();
44
48
  };
45
- return M(() => (c(), a), [s.current]), {
49
+ return M(() => (c(), l), [s.current]), {
46
50
  ref: o,
47
51
  isOverflowing: n
48
52
  };
49
- }, H = "flow--tabs--tab-title", J = "flow--tabs--tab-title--text", Q = "flow--tabs--tab-title--menu-item", d = {
50
- tabTitle: H,
51
- text: J,
52
- menuItem: Q
53
- }, U = (s) => {
54
- const { className: n, ...r } = s, o = m(n, d.tabTitle);
55
- return /* @__PURE__ */ e.createElement("div", { ...r, className: o, "data-selected": !0 }, /* @__PURE__ */ e.createElement(f, { id: "ActiveTitle" }));
53
+ }, J = "flow--tabs--tab-title", Q = "flow--tabs--tab-title--text", U = "flow--tabs--tab-title--menu-item", f = {
54
+ tabTitle: J,
55
+ text: Q,
56
+ menuItem: U
56
57
  }, V = (s) => {
57
- const { selection: n, disabledKeys: r, onContextMenuSelectionChange: o } = s, l = p(), c = G(), a = c.isOverflowing, t = m(u.tabList, a && u.collapsed), i = (N) => {
58
- const [T] = N;
59
- T && o(T);
60
- }, v = /* @__PURE__ */ e.createElement(E.TabList, { className: u.titles, ref: c.ref }, /* @__PURE__ */ e.createElement(f, { id: "Titles" })), g = a && /* @__PURE__ */ e.createElement(U, { id: l }), w = a && /* @__PURE__ */ e.createElement(O, null, /* @__PURE__ */ e.createElement(
61
- F,
58
+ const { className: n, ...r } = s, o = d(n, f.tabTitle);
59
+ return /* @__PURE__ */ e.createElement("div", { ...r, className: o, "data-selected": !0 }, /* @__PURE__ */ e.createElement(p, { id: "ActiveTitle" }));
60
+ }, X = (s) => {
61
+ const { selection: n, disabledKeys: r, onContextMenuSelectionChange: o } = s, a = g(), c = H(), l = c.isOverflowing, t = d(u.tabList, l && u.collapsed), i = (N) => {
62
+ const [v] = N;
63
+ v && o(v);
64
+ }, E = /* @__PURE__ */ e.createElement(C.TabList, { className: u.titles, ref: c.ref }, /* @__PURE__ */ e.createElement(p, { id: "Titles" })), m = l && /* @__PURE__ */ e.createElement(V, { id: a }), T = l && /* @__PURE__ */ e.createElement(y, null, /* @__PURE__ */ e.createElement(
65
+ L,
62
66
  {
63
67
  variant: "soft",
64
68
  className: u.contextMenuButton,
65
69
  color: "secondary",
66
- "aria-labelledby": l
70
+ "aria-labelledby": a
67
71
  },
68
- /* @__PURE__ */ e.createElement(A, null)
72
+ /* @__PURE__ */ e.createElement(F, null)
69
73
  ), /* @__PURE__ */ e.createElement(
70
74
  K,
71
75
  {
@@ -74,62 +78,73 @@ const W = "flow--tabs", $ = "flow--tabs--list", k = {
74
78
  selectionMode: "navigation",
75
79
  onSelectionChange: i
76
80
  },
77
- /* @__PURE__ */ e.createElement(f, { id: "ContextMenuItems" })
81
+ /* @__PURE__ */ e.createElement(p, { id: "ContextMenuItems" })
78
82
  ));
79
- return /* @__PURE__ */ e.createElement("div", { className: t }, v, g, w);
80
- }, de = S("Tabs", (s) => {
81
- const { children: n, className: r, defaultSelectedKey: o, disabledKeys: l, ...c } = s, a = m(k.tabs, r), [t, i] = C(
83
+ return /* @__PURE__ */ e.createElement("div", { className: t }, E, m, T);
84
+ }, Te = O("Tabs", (s) => {
85
+ const { children: n, className: r, defaultSelectedKey: o, disabledKeys: a, ...c } = s, l = d(j.tabs, r), [t, i] = x(
82
86
  o
83
87
  );
84
- return /* @__PURE__ */ e.createElement(P, null, n, /* @__PURE__ */ e.createElement(
85
- E.Tabs,
88
+ return /* @__PURE__ */ e.createElement(S, null, n, /* @__PURE__ */ e.createElement(
89
+ C.Tabs,
86
90
  {
87
91
  slot: null,
88
- className: a,
92
+ className: l,
89
93
  ...c,
90
94
  selectedKey: t,
91
95
  onSelectionChange: i,
92
- disabledKeys: l
96
+ disabledKeys: a
93
97
  },
94
98
  /* @__PURE__ */ e.createElement(
95
- V,
99
+ X,
96
100
  {
97
101
  selection: t,
98
102
  onContextMenuSelectionChange: i,
99
- disabledKeys: l
103
+ disabledKeys: a
100
104
  }
101
105
  ),
102
- /* @__PURE__ */ e.createElement(f, { id: "Panels" })
106
+ /* @__PURE__ */ e.createElement(p, { id: "Panels" })
103
107
  ));
104
- }), x = I({
108
+ }), w = I({
105
109
  id: "undefined"
106
- }), X = () => y(x), Y = x.Provider, fe = (s) => {
107
- const { children: n, className: r, ...o } = s, { id: l } = X(), c = m(d.tabTitle, r);
108
- return /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(b, { id: "Titles" }, /* @__PURE__ */ e.createElement(E.Tab, { ...o, id: l, className: c }, (a) => /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(R, { emulateBoldWidth: !0 }, /* @__PURE__ */ e.createElement("span", { className: d.text }, n)), /* @__PURE__ */ e.createElement(b, { id: "ActiveTitle" }, a.isSelected && n)))), /* @__PURE__ */ e.createElement(b, { id: "ContextMenuItems" }, /* @__PURE__ */ e.createElement(L, { className: d.menuItem, id: l }, n)));
109
- }, Z = "flow--tabs--tab--tab-panel", _ = {
110
- tabPanel: Z
111
- }, Ee = (s) => {
112
- const {
113
- children: n,
114
- className: r,
115
- shouldForceMount: o = !0,
116
- id: l,
117
- ...c
118
- } = s, a = m(_.tabPanel, r), t = p(), i = l ?? t;
119
- return /* @__PURE__ */ e.createElement(b, { id: "Panels" }, /* @__PURE__ */ e.createElement(
120
- E.TabPanel,
110
+ }), Y = () => P(w), Z = w.Provider, ve = (s) => {
111
+ const { children: n, className: r, ...o } = s, { id: a } = Y(), c = d(f.tabTitle, r);
112
+ return /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(b, { id: "Titles" }, /* @__PURE__ */ e.createElement(C.Tab, { ...o, id: a, className: c }, (l) => /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(R, { emulateBoldWidth: !0 }, /* @__PURE__ */ e.createElement("span", { className: f.text }, n)), /* @__PURE__ */ e.createElement(b, { id: "ActiveTitle" }, l.isSelected && n)))), /* @__PURE__ */ e.createElement(b, { id: "ContextMenuItems" }, /* @__PURE__ */ e.createElement(A, { className: f.menuItem, id: a }, n)));
113
+ }, _ = "flow--tabs--tab--tab-panel", ee = {
114
+ tabPanel: _
115
+ }, xe = (s) => {
116
+ const { children: n, className: r, id: o, ...a } = s, c = d(ee.tabPanel, r), l = g(), t = o ?? l, i = (E) => {
117
+ const m = E.state.selectedKey === t, T = {
118
+ Content: {
119
+ isActive: m
120
+ },
121
+ Section: {
122
+ isActive: m
123
+ }
124
+ };
125
+ return /* @__PURE__ */ e.createElement(
126
+ W,
127
+ {
128
+ props: T,
129
+ dependencies: [m, n]
130
+ },
131
+ n
132
+ );
133
+ };
134
+ return /* @__PURE__ */ e.createElement(b, { id: "Panels" }, /* @__PURE__ */ e.createElement(Z, { value: { id: t } }, /* @__PURE__ */ e.createElement(
135
+ C.TabPanel,
121
136
  {
122
- className: a,
123
- shouldForceMount: o,
124
- id: i,
125
- ...c
137
+ className: c,
138
+ shouldForceMount: !0,
139
+ id: t,
140
+ ...a
126
141
  },
127
- /* @__PURE__ */ e.createElement(Y, { value: { id: i } }, n)
128
- ));
142
+ i
143
+ )));
129
144
  };
130
145
  export {
131
- Ee as Tab,
132
- fe as TabTitle,
133
- de as Tabs,
134
- de as default
146
+ xe as Tab,
147
+ ve as TabTitle,
148
+ Te as Tabs,
149
+ Te as default
135
150
  };
@@ -8,7 +8,7 @@ import "@react-aria/utils";
8
8
  import "./propsContext-CauylOgH.js";
9
9
  import "remeda";
10
10
  import u from "invariant";
11
- import { f as T } from "./flowComponent-MjC63Rjp.js";
11
+ import { f as T } from "./flowComponent-D-odaa-x.js";
12
12
  import { E as d } from "./EmulatedBoldText-Dtox8Wd1.js";
13
13
  import { W as C } from "./Wrap-DGT1h1o3.js";
14
14
  const A = T("Text", (r) => {
package/dist/Text.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use client"
2
2
  /* */
3
- import { T as a } from "./Text-D94bUNze.js";
3
+ import { T as a } from "./Text-CMf42YK8.js";
4
4
  export {
5
5
  a as Text,
6
6
  a as default
package/dist/TextArea.js CHANGED
@@ -2,13 +2,13 @@
2
2
  /* */
3
3
  import e from "react";
4
4
  import * as n from "react-aria-components";
5
- import { T as p } from "./TextFieldBase-DLi7NvGk.js";
5
+ import { T as p } from "./TextFieldBase-DFFlaU7o.js";
6
6
  import { C as i } from "./ClearPropsContext-CeCMjUK9.js";
7
7
  import "./propsContext-CauylOgH.js";
8
8
  import "@react-aria/utils";
9
9
  import "remeda";
10
10
  import "dot-prop";
11
- import { f as c } from "./flowComponent-MjC63Rjp.js";
11
+ import { f as c } from "./flowComponent-D-odaa-x.js";
12
12
  const f = "flow--text-area", x = {
13
13
  textArea: f
14
14
  }, y = c("TextArea", (t) => {
package/dist/TextField.js CHANGED
@@ -2,13 +2,13 @@
2
2
  /* */
3
3
  import t from "react";
4
4
  import * as s from "react-aria-components";
5
- import { T as a } from "./TextFieldBase-DLi7NvGk.js";
5
+ import { T as a } from "./TextFieldBase-DFFlaU7o.js";
6
6
  import { C as n } from "./ClearPropsContext-CeCMjUK9.js";
7
7
  import "./propsContext-CauylOgH.js";
8
8
  import "@react-aria/utils";
9
9
  import "remeda";
10
10
  import "dot-prop";
11
- import { f as p } from "./flowComponent-MjC63Rjp.js";
11
+ import { f as p } from "./flowComponent-D-odaa-x.js";
12
12
  const c = "flow--text-field", f = {
13
13
  textField: c
14
14
  }, w = p("TextField", (e) => {
@@ -9,7 +9,7 @@ import { P as f } from "./PropsContextProvider-DZvwqHLP.js";
9
9
  import "@react-aria/utils";
10
10
  import "./propsContext-CauylOgH.js";
11
11
  import "remeda";
12
- import { F as E } from "./FieldError-T1bvZYZU.js";
12
+ import { F as E } from "./FieldError-ef2wRBhJ.js";
13
13
  const g = c(
14
14
  (o, F) => {
15
15
  const { children: t, className: s, input: a, ...i } = o, l = p(e.formField, s), m = {
@@ -6,7 +6,7 @@ import "./propsContext-CauylOgH.js";
6
6
  import "@react-aria/utils";
7
7
  import "remeda";
8
8
  import "dot-prop";
9
- import { u } from "./useProps-CjWcmgf3.js";
9
+ import { u } from "./useProps-L-mDIVx4.js";
10
10
  import { TunnelEntry as C } from "@mittwald/react-tunnel";
11
11
  function d(e, o) {
12
12
  return a((i, s) => {
@@ -7,7 +7,7 @@ import { P as v } from "./PropsContextProvider-DZvwqHLP.js";
7
7
  import "@react-aria/utils";
8
8
  import "remeda";
9
9
  import { d as E } from "./dynamic-ClpUSmEt.js";
10
- import { F as P } from "./FieldError-T1bvZYZU.js";
10
+ import { F as P } from "./FieldError-ef2wRBhJ.js";
11
11
  const d = x({}), b = d.Provider, g = () => F(d);
12
12
  function k(o) {
13
13
  var l;
@@ -0,0 +1,8 @@
1
+ import { FC, PropsWithChildren } from 'react';
2
+
3
+ interface Props extends PropsWithChildren {
4
+ isActive?: boolean;
5
+ inactiveDelay?: number;
6
+ }
7
+ export declare const Activity: FC<Props>;
8
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ import { Activity } from './Activity';
2
+
3
+ export * from './Activity';
4
+ export default Activity;
@@ -2,7 +2,7 @@ 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
 
5
- export interface ContentProps extends PropsWithChildren, PropsWithElementType<"div" | "section" | "span">, FlowComponentProps {
5
+ export interface ContentProps extends PropsWithChildren, PropsWithElementType<"div" | "section" | "span">, FlowComponentProps<"Content"> {
6
6
  }
7
7
  export declare const Content: React.ForwardRefExoticComponent<ContentProps & React.RefAttributes<never>>;
8
8
  export default Content;
@@ -1,5 +1,7 @@
1
- import { ComponentProps, FC, PropsWithChildren } from 'react';
1
+ import { ComponentProps, PropsWithChildren, default as React } from 'react';
2
+ import { FlowComponentProps } from '../../lib/componentFactory/flowComponent';
2
3
 
3
- export type SectionProps = PropsWithChildren<ComponentProps<"section">>;
4
- export declare const Section: FC<SectionProps>;
4
+ export interface SectionProps extends PropsWithChildren<ComponentProps<"section">>, FlowComponentProps<"Section"> {
5
+ }
6
+ export declare const Section: React.ForwardRefExoticComponent<Omit<SectionProps, "ref"> & React.RefAttributes<never>>;
5
7
  export default Section;
@@ -29,6 +29,7 @@ import { CheckboxProps } from '../Checkbox';
29
29
  import { CheckboxButtonProps } from '../CheckboxButton';
30
30
  import { TabsProps } from '../Tabs';
31
31
  import { ModalProps } from '../Modal';
32
+ import { SectionProps } from '../Section';
32
33
 
33
34
  export * from './types';
34
35
  export interface FlowComponentPropsTypes {
@@ -60,6 +61,7 @@ export interface FlowComponentPropsTypes {
60
61
  Radio: RadioProps;
61
62
  RadioButton: RadioButtonProps;
62
63
  RadioGroup: RadioGroupProps;
64
+ Section: SectionProps;
63
65
  Select: SelectProps;
64
66
  StatusBadge: StatusBadgeProps;
65
67
  Switch: SwitchProps;
@@ -29,6 +29,7 @@ export declare const propsContext: import('react').Context<Partial<{
29
29
  Radio: import('./types').ComponentPropsContext<"Radio">;
30
30
  RadioButton: import('./types').ComponentPropsContext<"RadioButton">;
31
31
  RadioGroup: import('./types').ComponentPropsContext<"RadioGroup">;
32
+ Section: import('./types').ComponentPropsContext<"Section">;
32
33
  Select: import('./types').ComponentPropsContext<"Select">;
33
34
  StatusBadge: import('./types').ComponentPropsContext<"StatusBadge">;
34
35
  Switch: import('./types').ComponentPropsContext<"Switch">;
@@ -34,6 +34,7 @@ const l = {
34
34
  Option: !0,
35
35
  RadioButton: !0,
36
36
  RadioGroup: !0,
37
+ Section: !0,
37
38
  Select: !0,
38
39
  StatusBadge: !0,
39
40
  Switch: !0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mittwald/flow-react-components",
3
- "version": "0.1.0-alpha.115",
3
+ "version": "0.1.0-alpha.116",
4
4
  "type": "module",
5
5
  "description": "A React implementation of Flow, mittwald’s design system",
6
6
  "homepage": "https://mittwald.github.io/flow",
@@ -251,7 +251,7 @@
251
251
  },
252
252
  "dependencies": {
253
253
  "@chakra-ui/live-region": "^2.1.0",
254
- "@mittwald/react-tunnel": "^0.1.0-alpha.115",
254
+ "@mittwald/react-tunnel": "^0.1.0-alpha.116",
255
255
  "@mittwald/react-use-promise": "^2.3.13",
256
256
  "@react-aria/utils": "^3.24.0",
257
257
  "@react-types/shared": "^3.23.0",
@@ -275,7 +275,7 @@
275
275
  },
276
276
  "devDependencies": {
277
277
  "@faker-js/faker": "^8.4.1",
278
- "@mittwald/flow-design-tokens": "^0.1.0-alpha.115",
278
+ "@mittwald/flow-design-tokens": "^0.1.0-alpha.116",
279
279
  "@mittwald/react-use-promise": "^2.3.13",
280
280
  "@nx/storybook": "^19.0.3",
281
281
  "@storybook/addon-a11y": "^8.1.0",
@@ -351,5 +351,5 @@
351
351
  "optional": true
352
352
  }
353
353
  },
354
- "gitHead": "df23f3e3496ffaf3881a32e1e82209f5be473c6b"
354
+ "gitHead": "aa76f67de660988456e4db3f8cb9a5dbc469327d"
355
355
  }
@@ -1,76 +0,0 @@
1
- "use client"
2
- /* */
3
- import n, { useState as E, useId as a } from "react";
4
- import I from "clsx";
5
- import "./propsContext-CauylOgH.js";
6
- import { P as N } from "./PropsContextProvider-DZvwqHLP.js";
7
- import "@react-aria/utils";
8
- import "remeda";
9
- import { d } from "./dynamic-ClpUSmEt.js";
10
- import { B as w } from "./Button-D59Yuz6-.js";
11
- import "@tabler/icons-react";
12
- import "./Icon-CA9DycKJ.js";
13
- import { I as B } from "./IconChevronDown-DvDzDLHn.js";
14
- import { TunnelProvider as C, TunnelExit as P } from "@mittwald/react-tunnel";
15
- const b = "flow--accordion", y = "flow--accordion--header", g = "flow--accordion--header-button", A = "flow--accordion--content", T = "flow--accordion--content-inner", D = "flow--accordion--chevron", H = "flow--accordion--expanded", e = {
16
- accordion: b,
17
- header: y,
18
- headerButton: g,
19
- content: A,
20
- contentInner: T,
21
- chevron: D,
22
- expanded: H
23
- }, O = (s) => {
24
- const { children: l, className: i, defaultExpanded: m = !1, ...p } = s, [t, h] = E(m), u = I(
25
- e.accordion,
26
- t && e.expanded,
27
- i
28
- ), f = a(), r = a(), c = (o) => /* @__PURE__ */ n.createElement(
29
- w,
30
- {
31
- unstyled: !0,
32
- "aria-expanded": t,
33
- className: e.headerButton,
34
- onPress: () => h((v) => !v),
35
- "aria-controls": r
36
- },
37
- o,
38
- /* @__PURE__ */ n.createElement(B, { className: e.chevron })
39
- ), x = {
40
- Content: {
41
- className: e.contentInner,
42
- tunnelId: "content"
43
- },
44
- Heading: {
45
- className: e.header,
46
- level: 4,
47
- children: d((o) => c(o.children))
48
- },
49
- Label: {
50
- className: e.header,
51
- children: d((o) => c(o.children))
52
- }
53
- };
54
- return /* @__PURE__ */ n.createElement("div", { ...p, className: u }, /* @__PURE__ */ n.createElement(
55
- N,
56
- {
57
- mergeInParentContext: !0,
58
- props: x,
59
- dependencies: [t]
60
- },
61
- /* @__PURE__ */ n.createElement(C, null, l, /* @__PURE__ */ n.createElement(
62
- "div",
63
- {
64
- "aria-labelledby": f,
65
- id: r,
66
- role: "region",
67
- hidden: !t,
68
- className: e.content
69
- },
70
- /* @__PURE__ */ n.createElement(P, { id: "content" })
71
- ))
72
- ));
73
- };
74
- export {
75
- O as A
76
- };
@@ -1,23 +0,0 @@
1
- "use client"
2
- /* */
3
- import t from "react";
4
- import { C as i } from "./ClearPropsContext-CeCMjUK9.js";
5
- import "./propsContext-CauylOgH.js";
6
- import "@react-aria/utils";
7
- import "remeda";
8
- import "dot-prop";
9
- import { f as l } from "./flowComponent-MjC63Rjp.js";
10
- import { W as s } from "./Wrap-DGT1h1o3.js";
11
- const W = l("Content", (e) => {
12
- const {
13
- children: r,
14
- elementType: o = "div",
15
- ref: n,
16
- clearPropsContext: m = !0,
17
- ...p
18
- } = e, a = o;
19
- return /* @__PURE__ */ t.createElement(s, { if: m }, /* @__PURE__ */ t.createElement(i, null, /* @__PURE__ */ t.createElement(a, { ref: n, ...p }, r)));
20
- });
21
- export {
22
- W as C
23
- };