@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.
- package/dist/Accordion-BzSb2drj.js +77 -0
- package/dist/Accordion.js +1 -1
- package/dist/Activity-CmfZpgOM.js +28 -0
- package/dist/Avatar.js +1 -1
- package/dist/Breadcrumb.js +2 -2
- package/dist/{Button-D59Yuz6-.js → Button-_8JcP9d1.js} +5 -5
- package/dist/Button.js +1 -1
- package/dist/ButtonGroup.js +1 -1
- package/dist/{Checkbox-1u78lml-.js → Checkbox-CoDeuNsM.js} +4 -4
- package/dist/Checkbox.js +1 -1
- package/dist/{CheckboxButton-D9y427qr.js → CheckboxButton-D_i7P_qt.js} +2 -2
- package/dist/CheckboxButton.js +1 -1
- package/dist/CheckboxGroup.js +3 -3
- package/dist/Content-BK2g3Yro.js +25 -0
- package/dist/Content.js +1 -1
- package/dist/{ContextMenu-BHan4xr7.js → ContextMenu-kfsMEIUy.js} +1 -1
- package/dist/ContextMenu.js +2 -2
- package/dist/CopyButton.js +4 -4
- package/dist/FieldDescription.js +2 -2
- package/dist/{FieldError-T1bvZYZU.js → FieldError-ef2wRBhJ.js} +3 -3
- package/dist/FieldError.js +1 -1
- package/dist/Header.js +1 -1
- package/dist/Heading.js +1 -1
- package/dist/{Icon-CA9DycKJ.js → Icon-DAE3MVF2.js} +1 -1
- package/dist/Icon.js +1 -1
- package/dist/{IconCheck-B834n9e-.js → IconCheck-B_TL6rk7.js} +1 -1
- package/dist/{IconCheckboxEmpty-CikjhqSs.js → IconCheckboxEmpty-9LFcjE0j.js} +1 -1
- package/dist/{IconCheckboxIndeterminate-B-Zm2vJ0.js → IconCheckboxIndeterminate-CVt-Emyf.js} +1 -1
- package/dist/{IconChevronDown-DvDzDLHn.js → IconChevronDown-4x9PZE3A.js} +1 -1
- package/dist/{IconChevronRight-CQ4ThSCR.js → IconChevronRight-BGr3gKMc.js} +1 -1
- package/dist/{IconClose-9_7oZ-l1.js → IconClose-D5y8_cAW.js} +1 -1
- package/dist/{IconContextMenu-CdytNL-c.js → IconContextMenu-CscpZMqu.js} +1 -1
- package/dist/{IconCopy-DFsbS558.js → IconCopy-J5KCFCD0.js} +1 -1
- package/dist/{IconDanger-CGxUl9b1.js → IconDanger-Be-8YO4Z.js} +1 -1
- package/dist/{IconPending-CuhW_8N8.js → IconPending-UvsvM-yo.js} +1 -1
- package/dist/{IconPlus-DEihhQUA.js → IconPlus-BZ0ojVn-.js} +1 -1
- package/dist/{IconRadioOn-B41C-1Km.js → IconRadioOn-DKF0Bkmh.js} +1 -1
- package/dist/{IconSucceeded-DHtj6r9L.js → IconSucceeded-C8ICBiWF.js} +1 -1
- package/dist/{IconWarning-BqRmeHaF.js → IconWarning-D4N03eMl.js} +1 -1
- package/dist/Icons.js +15 -15
- package/dist/Image.js +1 -1
- package/dist/Initials.js +1 -1
- package/dist/InlineAlert.js +2 -2
- package/dist/{Label-4tBbBXkh.js → Label-u7aknIoq.js} +1 -1
- package/dist/Label.js +1 -1
- package/dist/LayoutCard.js +1 -1
- package/dist/{Link-TVG_Y-ZN.js → Link-DGmaq49u.js} +1 -1
- package/dist/Link.js +1 -1
- package/dist/List.js +9 -9
- package/dist/{LoadingSpinner-CQKhFNdn.js → LoadingSpinner-DdxaPznB.js} +2 -2
- package/dist/LoadingSpinner.js +1 -1
- package/dist/{MenuItem-D0wwxHmB.js → MenuItem-D4OlNY0-.js} +5 -5
- package/dist/MenuItem.js +1 -1
- package/dist/Modal.js +1 -1
- package/dist/Navigation.js +13 -11
- package/dist/NumberField.js +6 -6
- package/dist/OffCanvas.js +3 -3
- package/dist/RadioGroup.js +5 -5
- package/dist/Section.js +20 -18
- package/dist/Select.js +4 -4
- package/dist/StatusBadge.js +3 -3
- package/dist/{StatusIcon-4FlAQF3p.js → StatusIcon-bhiGnLh6.js} +3 -3
- package/dist/StatusIcon.js +1 -1
- package/dist/Switch.js +5 -5
- package/dist/Tabs.js +93 -78
- package/dist/{Text-D94bUNze.js → Text-CMf42YK8.js} +1 -1
- package/dist/Text.js +1 -1
- package/dist/TextArea.js +2 -2
- package/dist/TextField.js +2 -2
- package/dist/{TextFieldBase-DLi7NvGk.js → TextFieldBase-DFFlaU7o.js} +1 -1
- package/dist/{flowComponent-MjC63Rjp.js → flowComponent-D-odaa-x.js} +1 -1
- package/dist/react-hook-form.js +1 -1
- package/dist/types/components/Activity/Activity.d.ts +8 -0
- package/dist/types/components/Activity/Activity.test.d.ts +1 -0
- package/dist/types/components/Activity/index.d.ts +4 -0
- package/dist/types/components/Content/Content.d.ts +1 -1
- package/dist/types/components/Section/Section.d.ts +5 -3
- package/dist/types/components/propTypes/index.d.ts +2 -0
- package/dist/types/lib/propsContext/propsContext.d.ts +1 -0
- package/dist/{useProps-CjWcmgf3.js → useProps-L-mDIVx4.js} +1 -0
- package/package.json +4 -4
- package/dist/Accordion-DsX7RI_p.js +0 -76
- 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
|
|
4
|
-
import * as
|
|
5
|
-
import { MenuTrigger as
|
|
6
|
-
import
|
|
7
|
-
import { TunnelExit as
|
|
8
|
-
import { f as
|
|
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-
|
|
11
|
-
import { M as
|
|
12
|
-
import { B as
|
|
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-
|
|
15
|
-
import { I as
|
|
16
|
-
import { T as R } from "./Text-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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(
|
|
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
|
-
},
|
|
45
|
+
}, l = () => {
|
|
42
46
|
var t;
|
|
43
47
|
(t = s.current) == null || t.disconnect();
|
|
44
48
|
};
|
|
45
|
-
return M(() => (c(),
|
|
49
|
+
return M(() => (c(), l), [s.current]), {
|
|
46
50
|
ref: o,
|
|
47
51
|
isOverflowing: n
|
|
48
52
|
};
|
|
49
|
-
},
|
|
50
|
-
tabTitle:
|
|
51
|
-
text:
|
|
52
|
-
menuItem:
|
|
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 {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
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":
|
|
70
|
+
"aria-labelledby": a
|
|
67
71
|
},
|
|
68
|
-
/* @__PURE__ */ e.createElement(
|
|
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(
|
|
81
|
+
/* @__PURE__ */ e.createElement(p, { id: "ContextMenuItems" })
|
|
78
82
|
));
|
|
79
|
-
return /* @__PURE__ */ e.createElement("div", { className: t },
|
|
80
|
-
},
|
|
81
|
-
const { children: n, className: r, defaultSelectedKey: o, disabledKeys:
|
|
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(
|
|
85
|
-
|
|
88
|
+
return /* @__PURE__ */ e.createElement(S, null, n, /* @__PURE__ */ e.createElement(
|
|
89
|
+
C.Tabs,
|
|
86
90
|
{
|
|
87
91
|
slot: null,
|
|
88
|
-
className:
|
|
92
|
+
className: l,
|
|
89
93
|
...c,
|
|
90
94
|
selectedKey: t,
|
|
91
95
|
onSelectionChange: i,
|
|
92
|
-
disabledKeys:
|
|
96
|
+
disabledKeys: a
|
|
93
97
|
},
|
|
94
98
|
/* @__PURE__ */ e.createElement(
|
|
95
|
-
|
|
99
|
+
X,
|
|
96
100
|
{
|
|
97
101
|
selection: t,
|
|
98
102
|
onContextMenuSelectionChange: i,
|
|
99
|
-
disabledKeys:
|
|
103
|
+
disabledKeys: a
|
|
100
104
|
}
|
|
101
105
|
),
|
|
102
|
-
/* @__PURE__ */ e.createElement(
|
|
106
|
+
/* @__PURE__ */ e.createElement(p, { id: "Panels" })
|
|
103
107
|
));
|
|
104
|
-
}),
|
|
108
|
+
}), w = I({
|
|
105
109
|
id: "undefined"
|
|
106
|
-
}),
|
|
107
|
-
const { children: n, className: r, ...o } = s, { id:
|
|
108
|
-
return /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(b, { id: "Titles" }, /* @__PURE__ */ e.createElement(
|
|
109
|
-
},
|
|
110
|
-
tabPanel:
|
|
111
|
-
},
|
|
112
|
-
const {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
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:
|
|
123
|
-
shouldForceMount:
|
|
124
|
-
id:
|
|
125
|
-
...
|
|
137
|
+
className: c,
|
|
138
|
+
shouldForceMount: !0,
|
|
139
|
+
id: t,
|
|
140
|
+
...a
|
|
126
141
|
},
|
|
127
|
-
|
|
128
|
-
));
|
|
142
|
+
i
|
|
143
|
+
)));
|
|
129
144
|
};
|
|
130
145
|
export {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
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-
|
|
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
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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) => {
|
package/dist/react-hook-form.js
CHANGED
|
@@ -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-
|
|
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 @@
|
|
|
1
|
+
export {};
|
|
@@ -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,
|
|
1
|
+
import { ComponentProps, PropsWithChildren, default as React } from 'react';
|
|
2
|
+
import { FlowComponentProps } from '../../lib/componentFactory/flowComponent';
|
|
2
3
|
|
|
3
|
-
export
|
|
4
|
-
|
|
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">;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mittwald/flow-react-components",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
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.
|
|
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.
|
|
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": "
|
|
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
|
-
};
|
package/dist/Content-DT3Soml6.js
DELETED
|
@@ -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
|
-
};
|