@mittwald/flow-react-components 0.1.0-alpha.103 → 0.1.0-alpha.105
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/Tabs.js
CHANGED
|
@@ -24,25 +24,25 @@ const W = "flow--tabs", $ = "flow--tabs--list", k = {
|
|
|
24
24
|
collapsed: D
|
|
25
25
|
}, G = () => {
|
|
26
26
|
const s = h(), [n, r] = C(!1), o = B(null, (t) => {
|
|
27
|
-
|
|
28
|
-
}),
|
|
27
|
+
a(), c(t);
|
|
28
|
+
}), l = ([
|
|
29
29
|
t
|
|
30
30
|
]) => {
|
|
31
31
|
t && r(!t.isIntersecting);
|
|
32
32
|
}, c = (t = o.current) => {
|
|
33
33
|
if (t && t instanceof Element) {
|
|
34
|
-
const i = new IntersectionObserver(
|
|
34
|
+
const i = new IntersectionObserver(l, {
|
|
35
35
|
root: t.parentElement,
|
|
36
36
|
// 1 = invoke callback when the element is 100% visible within the parent element
|
|
37
37
|
threshold: 1
|
|
38
38
|
});
|
|
39
39
|
s.current = i, i.observe(t);
|
|
40
40
|
}
|
|
41
|
-
},
|
|
41
|
+
}, a = () => {
|
|
42
42
|
var t;
|
|
43
43
|
(t = s.current) == null || t.disconnect();
|
|
44
44
|
};
|
|
45
|
-
return M(() => (c(),
|
|
45
|
+
return M(() => (c(), a), [s.current]), {
|
|
46
46
|
ref: o,
|
|
47
47
|
isOverflowing: n
|
|
48
48
|
};
|
|
@@ -54,16 +54,16 @@ const W = "flow--tabs", $ = "flow--tabs--list", k = {
|
|
|
54
54
|
const { className: n, ...r } = s, o = m(n, d.tabTitle);
|
|
55
55
|
return /* @__PURE__ */ e.createElement("div", { ...r, className: o, "data-selected": !0 }, /* @__PURE__ */ e.createElement(f, { id: "ActiveTitle" }));
|
|
56
56
|
}, V = (s) => {
|
|
57
|
-
const { selection: n, disabledKeys: r, onContextMenuSelectionChange: o } = 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
58
|
const [T] = N;
|
|
59
59
|
T && o(T);
|
|
60
|
-
}, v = /* @__PURE__ */ e.createElement(E.TabList, { className: u.titles, ref: c.ref }, /* @__PURE__ */ e.createElement(f, { id: "Titles" })), g =
|
|
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
61
|
F,
|
|
62
62
|
{
|
|
63
63
|
variant: "soft",
|
|
64
64
|
className: u.contextMenuButton,
|
|
65
65
|
color: "secondary",
|
|
66
|
-
"aria-labelledby":
|
|
66
|
+
"aria-labelledby": l
|
|
67
67
|
},
|
|
68
68
|
/* @__PURE__ */ e.createElement(A, null)
|
|
69
69
|
), /* @__PURE__ */ e.createElement(
|
|
@@ -78,24 +78,25 @@ const W = "flow--tabs", $ = "flow--tabs--list", k = {
|
|
|
78
78
|
));
|
|
79
79
|
return /* @__PURE__ */ e.createElement("div", { className: t }, v, g, w);
|
|
80
80
|
}, de = S("Tabs", (s) => {
|
|
81
|
-
const { children: n, className: r, defaultSelectedKey: o, disabledKeys:
|
|
81
|
+
const { children: n, className: r, defaultSelectedKey: o, disabledKeys: l, ...c } = s, a = m(k.tabs, r), [t, i] = C(
|
|
82
82
|
o
|
|
83
83
|
);
|
|
84
84
|
return /* @__PURE__ */ e.createElement(P, null, n, /* @__PURE__ */ e.createElement(
|
|
85
85
|
E.Tabs,
|
|
86
86
|
{
|
|
87
|
-
|
|
87
|
+
slot: null,
|
|
88
|
+
className: a,
|
|
88
89
|
...c,
|
|
89
90
|
selectedKey: t,
|
|
90
91
|
onSelectionChange: i,
|
|
91
|
-
disabledKeys:
|
|
92
|
+
disabledKeys: l
|
|
92
93
|
},
|
|
93
94
|
/* @__PURE__ */ e.createElement(
|
|
94
95
|
V,
|
|
95
96
|
{
|
|
96
97
|
selection: t,
|
|
97
98
|
onContextMenuSelectionChange: i,
|
|
98
|
-
disabledKeys:
|
|
99
|
+
disabledKeys: l
|
|
99
100
|
}
|
|
100
101
|
),
|
|
101
102
|
/* @__PURE__ */ e.createElement(f, { id: "Panels" })
|
|
@@ -103,8 +104,8 @@ const W = "flow--tabs", $ = "flow--tabs--list", k = {
|
|
|
103
104
|
}), x = I({
|
|
104
105
|
id: "undefined"
|
|
105
106
|
}), X = () => y(x), Y = x.Provider, fe = (s) => {
|
|
106
|
-
const { children: n, className: r, ...o } = s, { id:
|
|
107
|
-
return /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(b, { id: "Titles" }, /* @__PURE__ */ e.createElement(E.Tab, { ...o, id:
|
|
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)));
|
|
108
109
|
}, Z = "flow--tabs--tab--tab-panel", _ = {
|
|
109
110
|
tabPanel: Z
|
|
110
111
|
}, Ee = (s) => {
|
|
@@ -112,13 +113,13 @@ const W = "flow--tabs", $ = "flow--tabs--list", k = {
|
|
|
112
113
|
children: n,
|
|
113
114
|
className: r,
|
|
114
115
|
shouldForceMount: o = !0,
|
|
115
|
-
id:
|
|
116
|
+
id: l,
|
|
116
117
|
...c
|
|
117
|
-
} = s,
|
|
118
|
+
} = s, a = m(_.tabPanel, r), t = p(), i = l ?? t;
|
|
118
119
|
return /* @__PURE__ */ e.createElement(b, { id: "Panels" }, /* @__PURE__ */ e.createElement(
|
|
119
120
|
E.TabPanel,
|
|
120
121
|
{
|
|
121
|
-
className:
|
|
122
|
+
className: a,
|
|
122
123
|
shouldForceMount: o,
|
|
123
124
|
id: i,
|
|
124
125
|
...c
|
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.105",
|
|
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.105",
|
|
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.105",
|
|
279
279
|
"@mittwald/react-use-promise": "^2.3.13",
|
|
280
280
|
"@nx/storybook": "^18.3.4",
|
|
281
281
|
"@storybook/addon-a11y": "^8.0.9",
|
|
@@ -351,5 +351,5 @@
|
|
|
351
351
|
"optional": true
|
|
352
352
|
}
|
|
353
353
|
},
|
|
354
|
-
"gitHead": "
|
|
354
|
+
"gitHead": "cf45b5ec72aeb6ce8bfedf4ec94f86faa8b9b66e"
|
|
355
355
|
}
|