@mittwald/flow-react-components 0.2.0-alpha.25 → 0.2.0-alpha.26
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 +6 -0
- package/dist/js/ContextMenu.js +3 -3
- package/dist/js/{ContextMenuContent-N8Co_64N.js → ContextMenuContent-D2RjW6il.js} +9 -11
- package/dist/js/List.js +9 -9
- package/dist/js/MenuItem-BGGLM0sj.js +61 -0
- package/dist/js/MenuItem.js +1 -1
- package/dist/js/Tabs.js +40 -42
- package/dist/js/types/components/MenuItem/components/MenuItemContent/MenuItemContent.d.ts.map +1 -0
- package/dist/js/types/components/MenuItem/components/MenuItemContent/index.d.ts +2 -0
- package/dist/js/types/components/MenuItem/components/MenuItemContent/index.d.ts.map +1 -0
- package/package.json +4 -4
- package/dist/js/MenuItem-D0A7OXWd.js +0 -63
- package/dist/js/types/components/MenuItem/components/MenuItemContent.d.ts.map +0 -1
- /package/dist/js/types/components/MenuItem/components/{MenuItemContent.d.ts → MenuItemContent/MenuItemContent.d.ts} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [0.2.0-alpha.26](https://github.com/mittwald/flow/compare/0.2.0-alpha.25...0.2.0-alpha.26) (2025-01-29)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* fix remote context menu display issue ([7d9855e](https://github.com/mittwald/flow/commit/7d9855e5e19b791b7514ff23a95907fb438a06ce))
|
|
11
|
+
|
|
6
12
|
# [0.2.0-alpha.25](https://github.com/mittwald/flow/compare/0.2.0-alpha.24...0.2.0-alpha.25) (2025-01-29)
|
|
7
13
|
|
|
8
14
|
### Bug Fixes
|
package/dist/js/ContextMenu.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
|
-
import { C as t } from "./ContextMenuContent-
|
|
4
|
-
import { b as r, a } from "./ContextMenuContent-
|
|
5
|
-
import { M as C } from "./MenuItem-
|
|
3
|
+
import { C as t } from "./ContextMenuContent-D2RjW6il.js";
|
|
4
|
+
import { b as r, a } from "./ContextMenuContent-D2RjW6il.js";
|
|
5
|
+
import { M as C } from "./MenuItem-BGGLM0sj.js";
|
|
6
6
|
import { C as s } from "./ContextMenuSection-C4JcZt6N.js";
|
|
7
7
|
export {
|
|
8
8
|
t as ContextMenu,
|
|
@@ -11,7 +11,7 @@ import { C as P } from "./ClearPropsContext-CIgOlDjP.js";
|
|
|
11
11
|
import { PropsContextProvider as T } from "./PropsContextProvider.js";
|
|
12
12
|
import { O } from "./OverlayContextProvider-B7EDTT1X.js";
|
|
13
13
|
import * as S from "react-aria-components";
|
|
14
|
-
import { v as
|
|
14
|
+
import { v as a } from "./viewComponentContext-HXEKmx_D.js";
|
|
15
15
|
import "clsx";
|
|
16
16
|
import { P as V } from "./Popover-Ck5nKNR3.js";
|
|
17
17
|
import { A as w } from "./Action-C1Tw5pqL.js";
|
|
@@ -23,20 +23,18 @@ import "./context-BaYmTa0I.js";
|
|
|
23
23
|
import "invariant";
|
|
24
24
|
import "./getActionGroupSlot-CekBnXeM.js";
|
|
25
25
|
import "@tabler/icons-react";
|
|
26
|
-
import "react-children-utilities";
|
|
27
|
-
import "object-code";
|
|
28
26
|
import "react-aria";
|
|
29
27
|
import { O as I } from "./OverlayTrigger-lqEEBZnu.js";
|
|
30
28
|
import { M as b } from "./MenuTrigger-B6S1um5d.js";
|
|
31
29
|
const z = (o) => {
|
|
32
|
-
const t = s(
|
|
30
|
+
const t = s(a).ContextMenuContent ?? K;
|
|
33
31
|
return /* @__PURE__ */ e(t, { ...o });
|
|
34
|
-
},
|
|
32
|
+
}, se = l("ContextMenu", (o) => {
|
|
35
33
|
const {
|
|
36
34
|
children: t,
|
|
37
35
|
onAction: r,
|
|
38
36
|
selectionMode: n,
|
|
39
|
-
selectedKeys:
|
|
37
|
+
selectedKeys: m,
|
|
40
38
|
defaultSelectedKeys: p,
|
|
41
39
|
disabledKeys: c,
|
|
42
40
|
onSelectionChange: C,
|
|
@@ -86,7 +84,7 @@ const z = (o) => {
|
|
|
86
84
|
className: f.contextMenu,
|
|
87
85
|
onAction: r,
|
|
88
86
|
selectionMode: v(n),
|
|
89
|
-
selectedKeys:
|
|
87
|
+
selectedKeys: m,
|
|
90
88
|
defaultSelectedKeys: p,
|
|
91
89
|
disabledKeys: c,
|
|
92
90
|
onSelectionChange: C,
|
|
@@ -99,9 +97,9 @@ const z = (o) => {
|
|
|
99
97
|
}
|
|
100
98
|
) });
|
|
101
99
|
}), F = (o) => {
|
|
102
|
-
const t = s(
|
|
100
|
+
const t = s(a).MenuTrigger ?? b;
|
|
103
101
|
return /* @__PURE__ */ e(t, { ...o });
|
|
104
|
-
},
|
|
102
|
+
}, le = l(
|
|
105
103
|
"ContextMenuTrigger",
|
|
106
104
|
(o) => {
|
|
107
105
|
const { children: t, ...r } = o;
|
|
@@ -117,7 +115,7 @@ const z = (o) => {
|
|
|
117
115
|
}
|
|
118
116
|
), K = (o) => /* @__PURE__ */ e(S.Menu, { ...o });
|
|
119
117
|
export {
|
|
120
|
-
|
|
121
|
-
|
|
118
|
+
se as C,
|
|
119
|
+
le as a,
|
|
122
120
|
K as b
|
|
123
121
|
};
|
package/dist/js/List.js
CHANGED
|
@@ -22,8 +22,6 @@ import { makeObservable as be, observable as bt, computed as St, action as Y } f
|
|
|
22
22
|
import "./context-BaYmTa0I.js";
|
|
23
23
|
import "./Action-C1Tw5pqL.js";
|
|
24
24
|
import "./getActionGroupSlot-CekBnXeM.js";
|
|
25
|
-
import "react-children-utilities";
|
|
26
|
-
import { hash as At } from "object-code";
|
|
27
25
|
import { PropsContextProvider as j } from "./PropsContextProvider.js";
|
|
28
26
|
import { d as _ } from "./dynamic-ClpUSmEt.js";
|
|
29
27
|
import { observer as Se } from "mobx-react-lite";
|
|
@@ -33,20 +31,22 @@ import { b as Te, I as ve, a as Fe, c as Ie, d as Ve } from "./IconView-DwPoNey_
|
|
|
33
31
|
import { B as C } from "./ButtonView-inzXKZFE.js";
|
|
34
32
|
import { D as Ce } from "./Div-kX9yKy8R.js";
|
|
35
33
|
import { B as Le } from "./Badge-CiZ2cJPc.js";
|
|
36
|
-
import { T as
|
|
34
|
+
import { T as At } from "./Text-CW_CzcoD.js";
|
|
35
|
+
import { hash as xt } from "object-code";
|
|
37
36
|
import K from "zod";
|
|
38
37
|
import { useReactTable as Pe, getCoreRowModel as Ae, getSortedRowModel as xe, getFilteredRowModel as Be, getPaginationRowModel as Me, getFacetedUniqueValues as ke } from "@tanstack/react-table";
|
|
39
38
|
import { getAsyncResource as wt } from "@mittwald/react-use-promise";
|
|
40
39
|
import { u as yt } from "./useSelector-DpU7_HMO.js";
|
|
41
40
|
import { u as De } from "./SettingsProvider-DRSFnfXN.js";
|
|
41
|
+
import "react-children-utilities";
|
|
42
42
|
import { F as Ee } from "./Fragment-DLqk6JTD.js";
|
|
43
43
|
import { I as Ne } from "./IconContextMenu-DnwSrGtk.js";
|
|
44
|
-
import { a as W, C as it } from "./ContextMenuContent-
|
|
44
|
+
import { a as W, C as it } from "./ContextMenuContent-D2RjW6il.js";
|
|
45
45
|
import { I as Re } from "./IllustratedMessage-bJ4rZ5O8.js";
|
|
46
46
|
import { I as $e } from "./IconSearch-DEZjce1A.js";
|
|
47
47
|
import { H as Bt } from "./Heading-CAK54nAl.js";
|
|
48
48
|
import { R as Ue } from "./Render-CP9hqaf1.js";
|
|
49
|
-
import { M as Ke } from "./MenuItem-
|
|
49
|
+
import { M as Ke } from "./MenuItem-BGGLM0sj.js";
|
|
50
50
|
import { u as ze } from "./useOnChange-C1Quwyuz.js";
|
|
51
51
|
import { S as Oe } from "./SearchField-ONmuF9P1.js";
|
|
52
52
|
import { S as He } from "./Section-CWfvE5ls.js";
|
|
@@ -207,7 +207,7 @@ const is = "flow--list--list-summary", ns = {
|
|
|
207
207
|
return /* @__PURE__ */ u(Re, { children: [
|
|
208
208
|
/* @__PURE__ */ r($e, {}),
|
|
209
209
|
/* @__PURE__ */ r(Bt, { children: s.format("list.noResult.heading") }),
|
|
210
|
-
/* @__PURE__ */ r(
|
|
210
|
+
/* @__PURE__ */ r(At, { children: s.format("list.noResult.text") })
|
|
211
211
|
] });
|
|
212
212
|
}, ws = (s) => /* @__PURE__ */ r(Lt.GridList, { ...s, renderEmptyState: () => /* @__PURE__ */ r(Dt, {}) }), ys = "flow--list--items--item", Ts = "flow--list--items--item--is-selected", vs = "flow--list--items--item--has-action", z = {
|
|
213
213
|
item: ys,
|
|
@@ -238,7 +238,7 @@ const is = "flow--list--list-summary", ns = {
|
|
|
238
238
|
const { children: t, locales: e, variables: i } = s;
|
|
239
239
|
return P(e).format(t, i);
|
|
240
240
|
}, N = (s) => {
|
|
241
|
-
const t = h(m).Text ??
|
|
241
|
+
const t = h(m).Text ?? At;
|
|
242
242
|
return /* @__PURE__ */ r(t, { ...s });
|
|
243
243
|
}, Cs = () => {
|
|
244
244
|
const s = y(), t = s.visibleSorting.map((n) => /* @__PURE__ */ r(Vs, { sorting: n }, n.id));
|
|
@@ -527,7 +527,7 @@ class L {
|
|
|
527
527
|
o(this, "value");
|
|
528
528
|
o(this, "id");
|
|
529
529
|
var i;
|
|
530
|
-
this.filter = t, typeof e == "string" && e.startsWith("FilterValueId@@") ? (this.value = (i = t.values.find((n) => n.id === e)) == null ? void 0 : i.value, this.id = e) : (this.value = e, this.id = `FilterValueId@@${this.filter.property}@@${
|
|
530
|
+
this.filter = t, typeof e == "string" && e.startsWith("FilterValueId@@") ? (this.value = (i = t.values.find((n) => n.id === e)) == null ? void 0 : i.value, this.id = e) : (this.value = e, this.id = `FilterValueId@@${this.filter.property}@@${xt(this.value)}`);
|
|
531
531
|
}
|
|
532
532
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
533
533
|
static create(t, e) {
|
|
@@ -941,7 +941,7 @@ class at {
|
|
|
941
941
|
[e.staticData]
|
|
942
942
|
);
|
|
943
943
|
if ("asyncLoader" in e) {
|
|
944
|
-
const n = e.asyncLoader, a = e.dependencies, l = a ?
|
|
944
|
+
const n = e.asyncLoader, a = e.dependencies, l = a ? xt(a).toString() : void 0;
|
|
945
945
|
return wt(n, [i], {
|
|
946
946
|
loaderId: l
|
|
947
947
|
});
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
/* */
|
|
3
|
+
import { jsxs as I, Fragment as u, jsx as o } from "react/jsx-runtime";
|
|
4
|
+
import "react";
|
|
5
|
+
import * as h from "react-aria-components";
|
|
6
|
+
import l from "clsx";
|
|
7
|
+
import "./propsContext-DzAKlmhS.js";
|
|
8
|
+
import { PropsContextProvider as p } from "./PropsContextProvider.js";
|
|
9
|
+
import "@tabler/icons-react";
|
|
10
|
+
import "@mittwald/react-tunnel";
|
|
11
|
+
import { f as d } from "./flowComponent-B8dC8eRj.js";
|
|
12
|
+
import "@react-aria/utils";
|
|
13
|
+
import "remeda";
|
|
14
|
+
import "./viewComponentContext-HXEKmx_D.js";
|
|
15
|
+
import { I as x, a as w } from "./IconCheckboxEmpty-CJsL0HKI.js";
|
|
16
|
+
import { I as C, a as N } from "./IconRadioOn-CbW3RjJ2.js";
|
|
17
|
+
import { S as f } from "./Switch-Bg5jHbFG.js";
|
|
18
|
+
import { W as v } from "./Wrap-DGT1h1o3.js";
|
|
19
|
+
import { T as M } from "./Text-CW_CzcoD.js";
|
|
20
|
+
const S = "flow--menu-item", g = "flow--menu-item--icon", y = "flow--menu-item--text", O = "flow--menu-item--control-icon", R = "flow--menu-item--avatar", t = {
|
|
21
|
+
menuItem: S,
|
|
22
|
+
switch: "flow--menu-item--switch",
|
|
23
|
+
icon: g,
|
|
24
|
+
text: y,
|
|
25
|
+
controlIcon: O,
|
|
26
|
+
avatar: R
|
|
27
|
+
}, k = (s) => {
|
|
28
|
+
const {
|
|
29
|
+
selectionMode: n,
|
|
30
|
+
isSelected: e,
|
|
31
|
+
selectionVariant: c = "control",
|
|
32
|
+
children: i
|
|
33
|
+
} = s, m = {
|
|
34
|
+
Icon: {
|
|
35
|
+
className: t.icon
|
|
36
|
+
},
|
|
37
|
+
Text: {
|
|
38
|
+
className: t.text
|
|
39
|
+
},
|
|
40
|
+
Avatar: {
|
|
41
|
+
className: t.avatar
|
|
42
|
+
}
|
|
43
|
+
}, a = {
|
|
44
|
+
Icon: {
|
|
45
|
+
className: l(t.controlIcon, t.icon)
|
|
46
|
+
},
|
|
47
|
+
Switch: {
|
|
48
|
+
className: l(t.controlIcon, t.switch)
|
|
49
|
+
}
|
|
50
|
+
}, r = n === "none" || c === "navigation" ? null : c === "switch" && e ? /* @__PURE__ */ o(f, { isReadOnly: !0, isSelected: !0 }) : c === "switch" && !e ? /* @__PURE__ */ o(f, { isReadOnly: !0 }) : n === "single" && e ? /* @__PURE__ */ o(C, {}) : n === "single" && !e ? /* @__PURE__ */ o(N, {}) : n === "multiple" && e ? /* @__PURE__ */ o(x, {}) : /* @__PURE__ */ o(w, {});
|
|
51
|
+
return /* @__PURE__ */ I(u, { children: [
|
|
52
|
+
/* @__PURE__ */ o(p, { props: a, children: r }),
|
|
53
|
+
/* @__PURE__ */ o(p, { props: m, children: /* @__PURE__ */ o(v, { if: !!r, children: /* @__PURE__ */ o(M, { children: i }) }) })
|
|
54
|
+
] });
|
|
55
|
+
}, K = d("MenuItem", (s) => {
|
|
56
|
+
const { children: n, className: e, selectionVariant: c, ref: i, ...m } = s, a = l(t.menuItem, e);
|
|
57
|
+
return /* @__PURE__ */ o(h.MenuItem, { ...m, className: a, ref: i, children: (r) => /* @__PURE__ */ o(k, { ...r, selectionVariant: c, children: n }) });
|
|
58
|
+
});
|
|
59
|
+
export {
|
|
60
|
+
K as M
|
|
61
|
+
};
|
package/dist/js/MenuItem.js
CHANGED
package/dist/js/Tabs.js
CHANGED
|
@@ -7,7 +7,7 @@ import u from "clsx";
|
|
|
7
7
|
import { TunnelExit as C, TunnelProvider as A, TunnelEntry as f } from "@mittwald/react-tunnel";
|
|
8
8
|
import { f as B } from "./flowComponent-B8dC8eRj.js";
|
|
9
9
|
import { useCallbackRef as E } from "use-callback-ref";
|
|
10
|
-
import { a as K, C as L } from "./ContextMenuContent-
|
|
10
|
+
import { a as K, C as L } from "./ContextMenuContent-D2RjW6il.js";
|
|
11
11
|
import "./propsContext-DzAKlmhS.js";
|
|
12
12
|
import "@react-aria/utils";
|
|
13
13
|
import "remeda";
|
|
@@ -15,17 +15,15 @@ import "dot-prop";
|
|
|
15
15
|
import "@tabler/icons-react";
|
|
16
16
|
import "./viewComponentContext-HXEKmx_D.js";
|
|
17
17
|
import { I as W } from "./IconContextMenu-DnwSrGtk.js";
|
|
18
|
-
import "invariant";
|
|
19
|
-
import "react-children-utilities";
|
|
20
|
-
import "object-code";
|
|
21
18
|
import "react-aria";
|
|
19
|
+
import "invariant";
|
|
22
20
|
import "mobx";
|
|
23
21
|
import "./context-BaYmTa0I.js";
|
|
24
22
|
import "./Action-C1Tw5pqL.js";
|
|
25
23
|
import "./getActionGroupSlot-CekBnXeM.js";
|
|
26
24
|
import { B as F } from "./Button-WawPguWq.js";
|
|
27
25
|
import { T as R } from "./Text-CW_CzcoD.js";
|
|
28
|
-
import { M as $ } from "./MenuItem-
|
|
26
|
+
import { M as $ } from "./MenuItem-BGGLM0sj.js";
|
|
29
27
|
import { PropsContextProvider as j } from "./PropsContextProvider.js";
|
|
30
28
|
import { A as N } from "./Activity-BekrxIf7.js";
|
|
31
29
|
const k = "flow--tabs", q = "flow--tabs--list", z = {
|
|
@@ -37,26 +35,26 @@ const k = "flow--tabs", q = "flow--tabs--list", z = {
|
|
|
37
35
|
titles: H,
|
|
38
36
|
collapsed: J
|
|
39
37
|
}, Q = () => {
|
|
40
|
-
const n = y(null), [s,
|
|
41
|
-
|
|
42
|
-
}),
|
|
38
|
+
const n = y(null), [s, a] = g(!1), o = E(null, (e) => {
|
|
39
|
+
r(), i(e);
|
|
40
|
+
}), l = ([
|
|
43
41
|
e
|
|
44
42
|
]) => {
|
|
45
|
-
e &&
|
|
46
|
-
},
|
|
43
|
+
e && a(!e.isIntersecting);
|
|
44
|
+
}, i = (e = o.current) => {
|
|
47
45
|
if (e && e instanceof Element) {
|
|
48
|
-
const c = new IntersectionObserver(
|
|
46
|
+
const c = new IntersectionObserver(l, {
|
|
49
47
|
root: e.parentElement,
|
|
50
48
|
// 1 = invoke callback when the element is 100% visible within the parent element
|
|
51
49
|
threshold: 1
|
|
52
50
|
});
|
|
53
51
|
n.current = c, c.observe(e);
|
|
54
52
|
}
|
|
55
|
-
},
|
|
53
|
+
}, r = () => {
|
|
56
54
|
var e;
|
|
57
55
|
(e = n.current) == null || e.disconnect();
|
|
58
56
|
};
|
|
59
|
-
return P(() => (
|
|
57
|
+
return P(() => (i(), r), [n.current]), {
|
|
60
58
|
ref: o,
|
|
61
59
|
isOverflowing: s
|
|
62
60
|
};
|
|
@@ -65,26 +63,26 @@ const k = "flow--tabs", q = "flow--tabs--list", z = {
|
|
|
65
63
|
text: V,
|
|
66
64
|
menuItem: X
|
|
67
65
|
}, Y = (n) => {
|
|
68
|
-
const { className: s, ...
|
|
69
|
-
return /* @__PURE__ */ t("div", { ...
|
|
66
|
+
const { className: s, ...a } = n, o = u(s, h.tabTitle);
|
|
67
|
+
return /* @__PURE__ */ t("div", { ...a, className: o, "data-selected": !0, children: /* @__PURE__ */ t(C, { id: "ActiveTitle" }) });
|
|
70
68
|
}, Z = (n) => {
|
|
71
|
-
const { selection: s, disabledKeys:
|
|
69
|
+
const { selection: s, disabledKeys: a, onContextMenuSelectionChange: o } = n, l = M(), i = Q(), r = i.isOverflowing, e = u(p.tabList, r && p.collapsed), c = (x) => {
|
|
72
70
|
o(x);
|
|
73
|
-
}, d = /* @__PURE__ */ t(T.TabList, { className: p.titles, ref:
|
|
71
|
+
}, d = /* @__PURE__ */ t(T.TabList, { className: p.titles, ref: i.ref, children: /* @__PURE__ */ t(C, { id: "Titles" }) }), b = r && /* @__PURE__ */ t(Y, { id: l }), v = r && /* @__PURE__ */ m(K, { children: [
|
|
74
72
|
/* @__PURE__ */ t(
|
|
75
73
|
F,
|
|
76
74
|
{
|
|
77
75
|
variant: "soft",
|
|
78
76
|
className: p.contextMenuButton,
|
|
79
77
|
color: "secondary",
|
|
80
|
-
"aria-labelledby":
|
|
78
|
+
"aria-labelledby": l,
|
|
81
79
|
children: /* @__PURE__ */ t(W, {})
|
|
82
80
|
}
|
|
83
81
|
),
|
|
84
82
|
/* @__PURE__ */ t(
|
|
85
83
|
L,
|
|
86
84
|
{
|
|
87
|
-
disabledKeys:
|
|
85
|
+
disabledKeys: a,
|
|
88
86
|
selectedKeys: s ? [s] : void 0,
|
|
89
87
|
selectionMode: "navigation",
|
|
90
88
|
onAction: (x) => c(x),
|
|
@@ -97,15 +95,15 @@ const k = "flow--tabs", q = "flow--tabs--list", z = {
|
|
|
97
95
|
b,
|
|
98
96
|
v
|
|
99
97
|
] });
|
|
100
|
-
},
|
|
98
|
+
}, Ot = B("Tabs", (n) => {
|
|
101
99
|
const {
|
|
102
100
|
children: s,
|
|
103
|
-
className:
|
|
101
|
+
className: a,
|
|
104
102
|
defaultSelectedKey: o,
|
|
105
|
-
disabledKeys:
|
|
106
|
-
ref:
|
|
107
|
-
...
|
|
108
|
-
} = n, e = u(z.tabs,
|
|
103
|
+
disabledKeys: l,
|
|
104
|
+
ref: i,
|
|
105
|
+
...r
|
|
106
|
+
} = n, e = u(z.tabs, a), [c, d] = g(
|
|
109
107
|
o
|
|
110
108
|
);
|
|
111
109
|
return /* @__PURE__ */ m(A, { children: [
|
|
@@ -115,18 +113,18 @@ const k = "flow--tabs", q = "flow--tabs--list", z = {
|
|
|
115
113
|
{
|
|
116
114
|
slot: null,
|
|
117
115
|
className: e,
|
|
118
|
-
...
|
|
116
|
+
...r,
|
|
119
117
|
selectedKey: c,
|
|
120
118
|
onSelectionChange: d,
|
|
121
|
-
disabledKeys:
|
|
122
|
-
ref:
|
|
119
|
+
disabledKeys: l,
|
|
120
|
+
ref: i,
|
|
123
121
|
children: [
|
|
124
122
|
/* @__PURE__ */ t(
|
|
125
123
|
Z,
|
|
126
124
|
{
|
|
127
125
|
selection: c,
|
|
128
126
|
onContextMenuSelectionChange: d,
|
|
129
|
-
disabledKeys:
|
|
127
|
+
disabledKeys: l
|
|
130
128
|
}
|
|
131
129
|
),
|
|
132
130
|
/* @__PURE__ */ t(C, { id: "Panels" })
|
|
@@ -136,19 +134,19 @@ const k = "flow--tabs", q = "flow--tabs--list", z = {
|
|
|
136
134
|
] });
|
|
137
135
|
}), I = O({
|
|
138
136
|
id: "undefined"
|
|
139
|
-
}), _ = () => S(I), tt = I.Provider,
|
|
140
|
-
const { children: s, className:
|
|
137
|
+
}), _ = () => S(I), tt = I.Provider, St = (n) => {
|
|
138
|
+
const { children: s, className: a, ...o } = n, { id: l } = _(), i = u(h.tabTitle, a);
|
|
141
139
|
return /* @__PURE__ */ m(w, { children: [
|
|
142
|
-
/* @__PURE__ */ t(f, { id: "Titles", children: /* @__PURE__ */ t(T.Tab, { ...o, id:
|
|
140
|
+
/* @__PURE__ */ t(f, { id: "Titles", children: /* @__PURE__ */ t(T.Tab, { ...o, id: l, className: i, children: (r) => /* @__PURE__ */ m(w, { children: [
|
|
143
141
|
/* @__PURE__ */ t(R, { emulateBoldWidth: !0, children: /* @__PURE__ */ t("span", { className: h.text, children: s }) }),
|
|
144
|
-
/* @__PURE__ */ t(f, { id: "ActiveTitle", children:
|
|
142
|
+
/* @__PURE__ */ t(f, { id: "ActiveTitle", children: r.isSelected && s })
|
|
145
143
|
] }) }) }),
|
|
146
|
-
/* @__PURE__ */ t(f, { id: "ContextMenuItems", children: /* @__PURE__ */ t($, { className: h.menuItem, id:
|
|
144
|
+
/* @__PURE__ */ t(f, { id: "ContextMenuItems", children: /* @__PURE__ */ t($, { className: h.menuItem, id: l, children: s }) })
|
|
147
145
|
] });
|
|
148
146
|
}, et = "flow--tabs--tab--tab-panel", st = {
|
|
149
147
|
tabPanel: et
|
|
150
|
-
},
|
|
151
|
-
const { children: s, className:
|
|
148
|
+
}, At = (n) => {
|
|
149
|
+
const { children: s, className: a, id: o, ...l } = n, i = u(st.tabPanel, a), r = M(), e = o ?? r, c = (d) => {
|
|
152
150
|
const b = d.state.selectedKey === e;
|
|
153
151
|
return /* @__PURE__ */ t(
|
|
154
152
|
j,
|
|
@@ -169,17 +167,17 @@ const k = "flow--tabs", q = "flow--tabs--list", z = {
|
|
|
169
167
|
return /* @__PURE__ */ t(f, { id: "Panels", children: /* @__PURE__ */ t(tt, { value: { id: e }, children: /* @__PURE__ */ t(
|
|
170
168
|
T.TabPanel,
|
|
171
169
|
{
|
|
172
|
-
className:
|
|
170
|
+
className: i,
|
|
173
171
|
shouldForceMount: !0,
|
|
174
172
|
id: e,
|
|
175
|
-
...
|
|
173
|
+
...l,
|
|
176
174
|
children: c
|
|
177
175
|
}
|
|
178
176
|
) }) });
|
|
179
177
|
};
|
|
180
178
|
export {
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
179
|
+
At as Tab,
|
|
180
|
+
St as TabTitle,
|
|
181
|
+
Ot as Tabs,
|
|
182
|
+
Ot as default
|
|
185
183
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MenuItemContent.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/MenuItem/components/MenuItemContent/MenuItemContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAEnD,OAAO,KAAK,KAAK,IAAI,MAAM,uBAAuB,CAAC;AAenD,UAAU,KAAM,SAAQ,IAAI,CAAC,mBAAmB,EAAE,iBAAiB;IACjE,gBAAgB,CAAC,EAAE,SAAS,GAAG,YAAY,GAAG,QAAQ,CAAC;CACxD;AAED,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,KAAK,CA0DrC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/MenuItem/components/MenuItemContent/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mittwald/flow-react-components",
|
|
3
|
-
"version": "0.2.0-alpha.
|
|
3
|
+
"version": "0.2.0-alpha.26",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A React implementation of Flow, mittwald’s design system",
|
|
6
6
|
"homepage": "https://mittwald.github.io/flow",
|
|
@@ -383,7 +383,7 @@
|
|
|
383
383
|
"dependencies": {
|
|
384
384
|
"@chakra-ui/live-region": "^2.1.0",
|
|
385
385
|
"@internationalized/string-compiler": "^3.2.6",
|
|
386
|
-
"@mittwald/react-tunnel": "0.2.0-alpha.
|
|
386
|
+
"@mittwald/react-tunnel": "0.2.0-alpha.26",
|
|
387
387
|
"@mittwald/react-use-promise": "^2.6.0",
|
|
388
388
|
"@react-aria/form": "^3.0.12",
|
|
389
389
|
"@react-aria/utils": "^3.27.0",
|
|
@@ -421,7 +421,7 @@
|
|
|
421
421
|
"devDependencies": {
|
|
422
422
|
"@faker-js/faker": "^9.4.0",
|
|
423
423
|
"@internationalized/date": "^3.6.0",
|
|
424
|
-
"@mittwald/flow-design-tokens": "0.2.0-alpha.
|
|
424
|
+
"@mittwald/flow-design-tokens": "0.2.0-alpha.26",
|
|
425
425
|
"@mittwald/react-use-promise": "^2.6.0",
|
|
426
426
|
"@mittwald/typescript-config": "",
|
|
427
427
|
"@nx/storybook": "^20.3.2",
|
|
@@ -501,5 +501,5 @@
|
|
|
501
501
|
"optional": true
|
|
502
502
|
}
|
|
503
503
|
},
|
|
504
|
-
"gitHead": "
|
|
504
|
+
"gitHead": "eb6ffb2ac38409271994cc0dbfbfe9b501588a26"
|
|
505
505
|
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
/* */
|
|
3
|
-
import { jsxs as x, Fragment as w, jsx as o } from "react/jsx-runtime";
|
|
4
|
-
import "react";
|
|
5
|
-
import * as v from "react-aria-components";
|
|
6
|
-
import l from "clsx";
|
|
7
|
-
import "./propsContext-DzAKlmhS.js";
|
|
8
|
-
import { PropsContextProvider as p } from "./PropsContextProvider.js";
|
|
9
|
-
import "@tabler/icons-react";
|
|
10
|
-
import "@mittwald/react-tunnel";
|
|
11
|
-
import { f as C } from "./flowComponent-B8dC8eRj.js";
|
|
12
|
-
import "@react-aria/utils";
|
|
13
|
-
import "remeda";
|
|
14
|
-
import "./viewComponentContext-HXEKmx_D.js";
|
|
15
|
-
import { I as N, a as M } from "./IconCheckboxEmpty-CJsL0HKI.js";
|
|
16
|
-
import { I as A, a as S } from "./IconRadioOn-CbW3RjJ2.js";
|
|
17
|
-
import { T as f } from "./Text-CW_CzcoD.js";
|
|
18
|
-
import { d as I } from "./deepHas-KHS5X1F_.js";
|
|
19
|
-
import { W as g } from "./Wrap-DGT1h1o3.js";
|
|
20
|
-
import { A as y } from "./Avatar-Dvl223o9.js";
|
|
21
|
-
import { S as u } from "./Switch-Bg5jHbFG.js";
|
|
22
|
-
const O = "flow--menu-item", R = "flow--menu-item--icon", T = "flow--menu-item--text", k = "flow--menu-item--control-icon", P = "flow--menu-item--avatar", t = {
|
|
23
|
-
menuItem: O,
|
|
24
|
-
switch: "flow--menu-item--switch",
|
|
25
|
-
icon: R,
|
|
26
|
-
text: T,
|
|
27
|
-
controlIcon: k,
|
|
28
|
-
avatar: P
|
|
29
|
-
}, b = (c) => {
|
|
30
|
-
const {
|
|
31
|
-
selectionMode: n,
|
|
32
|
-
isSelected: e,
|
|
33
|
-
selectionVariant: r = "control",
|
|
34
|
-
children: s
|
|
35
|
-
} = c, i = {
|
|
36
|
-
Icon: {
|
|
37
|
-
className: t.icon
|
|
38
|
-
},
|
|
39
|
-
Text: {
|
|
40
|
-
className: t.text
|
|
41
|
-
},
|
|
42
|
-
Avatar: {
|
|
43
|
-
className: t.avatar
|
|
44
|
-
}
|
|
45
|
-
}, m = {
|
|
46
|
-
Icon: {
|
|
47
|
-
className: l(t.controlIcon, t.icon)
|
|
48
|
-
},
|
|
49
|
-
Switch: {
|
|
50
|
-
className: l(t.controlIcon, t.switch)
|
|
51
|
-
}
|
|
52
|
-
}, a = n === "none" || r === "navigation" ? null : r === "switch" && e ? /* @__PURE__ */ o(u, { isReadOnly: !0, isSelected: !0 }) : r === "switch" && !e ? /* @__PURE__ */ o(u, { isReadOnly: !0 }) : n === "single" && e ? /* @__PURE__ */ o(A, {}) : n === "single" && !e ? /* @__PURE__ */ o(S, {}) : n === "multiple" && e ? /* @__PURE__ */ o(N, {}) : /* @__PURE__ */ o(M, {}), h = I(s, f), d = I(s, y);
|
|
53
|
-
return /* @__PURE__ */ x(w, { children: [
|
|
54
|
-
/* @__PURE__ */ o(p, { props: m, children: a }),
|
|
55
|
-
/* @__PURE__ */ o(p, { props: i, children: /* @__PURE__ */ o(g, { if: !h && !d, children: /* @__PURE__ */ o(f, { children: s }) }) })
|
|
56
|
-
] });
|
|
57
|
-
}, Z = C("MenuItem", (c) => {
|
|
58
|
-
const { children: n, className: e, selectionVariant: r, ref: s, ...i } = c, m = l(t.menuItem, e);
|
|
59
|
-
return /* @__PURE__ */ o(v.MenuItem, { ...i, className: m, ref: s, children: (a) => /* @__PURE__ */ o(b, { ...a, selectionVariant: r, children: n }) });
|
|
60
|
-
});
|
|
61
|
-
export {
|
|
62
|
-
Z as M
|
|
63
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MenuItemContent.d.ts","sourceRoot":"","sources":["../../../../../../src/components/MenuItem/components/MenuItemContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAEnD,OAAO,KAAK,KAAK,IAAI,MAAM,uBAAuB,CAAC;AAiBnD,UAAU,KAAM,SAAQ,IAAI,CAAC,mBAAmB,EAAE,iBAAiB;IACjE,gBAAgB,CAAC,EAAE,SAAS,GAAG,YAAY,GAAG,QAAQ,CAAC;CACxD;AAED,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,KAAK,CA6DrC,CAAC"}
|
|
File without changes
|