@mittwald/flow-react-components 0.1.0-alpha.325 → 0.1.0-alpha.326
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 +9 -0
- package/dist/css/Button.css +1 -1
- package/dist/css/MenuItem.css +1 -1
- package/dist/css/Navigation.css +1 -1
- package/dist/css/Select.css +1 -1
- package/dist/css/globals.css +1 -1
- package/dist/js/{Accordion-za0RoF1r.js → Accordion-D7_NvGjy.js} +1 -1
- package/dist/js/Accordion.js +1 -1
- package/dist/js/{Badge-CT8n21Li.js → Badge-C3CBqh8m.js} +1 -1
- package/dist/js/Badge.js +1 -1
- package/dist/js/{Button-DXgQ5lAy.js → Button-tKo9ydZL.js} +18 -18
- package/dist/js/Button.js +1 -1
- package/dist/js/{CalendarHeader-BWiFjVQp.js → CalendarHeader-CdTPgq-8.js} +1 -1
- package/dist/js/CodeBlock.js +1 -1
- package/dist/js/ContextMenu.js +1 -1
- package/dist/js/{CopyButton-Br-KQ5Tt.js → CopyButton-e2EjDU95.js} +1 -1
- package/dist/js/CopyButton.js +1 -1
- package/dist/js/DatePicker.js +2 -2
- package/dist/js/DateRangePicker.js +2 -2
- package/dist/js/FileCard.js +1 -1
- package/dist/js/List.js +4 -4
- package/dist/js/MenuItem-GX6Zh70q.js +59 -0
- package/dist/js/MenuItem.js +1 -1
- package/dist/js/Modal.js +1 -1
- package/dist/js/Navigation.js +21 -20
- package/dist/js/Notification.js +1 -1
- package/dist/js/NumberField.js +1 -1
- package/dist/js/{SearchField-d7pa2xgi.js → SearchField-62cVb6e-.js} +1 -1
- package/dist/js/SearchField.js +1 -1
- package/dist/js/Select.js +25 -24
- package/dist/js/Slider.js +1 -1
- package/dist/js/Tabs.js +2 -2
- package/dist/js/all.css +1 -1
- package/dist/js/types/components/Button/stories/Default.stories.d.ts +1 -0
- package/package.json +4 -4
- package/dist/js/MenuItem-DZ6wEuiI.js +0 -54
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
/* */
|
|
3
|
+
import e from "react";
|
|
4
|
+
import * as E from "react-aria-components";
|
|
5
|
+
import u from "clsx";
|
|
6
|
+
import "./propsContext-DzAKlmhS.js";
|
|
7
|
+
import { PropsContextProvider as i } from "./PropsContextProvider.js";
|
|
8
|
+
import "@react-aria/utils";
|
|
9
|
+
import "remeda";
|
|
10
|
+
import "@tabler/icons-react";
|
|
11
|
+
import "./Icon-DGqvukLZ.js";
|
|
12
|
+
import { I as d, a as v } from "./IconCheckboxEmpty-Nnjs5-Pv.js";
|
|
13
|
+
import { I as C, a as h } from "./IconRadioOn-CR0g7TLz.js";
|
|
14
|
+
import { T as p } from "./Text-_cq3RnbD.js";
|
|
15
|
+
import { d as f } from "./deepHas-KHS5X1F_.js";
|
|
16
|
+
import { W as N } from "./Wrap-DGT1h1o3.js";
|
|
17
|
+
import { A as w } from "./Avatar-DV-ptc3M.js";
|
|
18
|
+
import { f as M } from "./flowComponent-1wOIvUIq.js";
|
|
19
|
+
const A = "flow--menu-item", g = "flow--menu-item--icon", P = "flow--menu-item--text", T = "flow--menu-item--control-icon", k = "flow--menu-item--avatar", o = {
|
|
20
|
+
menuItem: A,
|
|
21
|
+
icon: g,
|
|
22
|
+
text: P,
|
|
23
|
+
controlIcon: T,
|
|
24
|
+
avatar: k
|
|
25
|
+
}, R = (a) => {
|
|
26
|
+
const {
|
|
27
|
+
selectionMode: t,
|
|
28
|
+
isSelected: n,
|
|
29
|
+
selectionVariant: m = "control",
|
|
30
|
+
children: r
|
|
31
|
+
} = a, c = {
|
|
32
|
+
Icon: {
|
|
33
|
+
className: o.icon
|
|
34
|
+
},
|
|
35
|
+
Text: {
|
|
36
|
+
className: o.text
|
|
37
|
+
},
|
|
38
|
+
Avatar: {
|
|
39
|
+
className: o.avatar
|
|
40
|
+
}
|
|
41
|
+
}, s = {
|
|
42
|
+
Icon: {
|
|
43
|
+
className: u(o.controlIcon, o.icon)
|
|
44
|
+
}
|
|
45
|
+
}, l = t === "none" || m === "navigation" ? null : t === "single" && n ? /* @__PURE__ */ e.createElement(C, null) : t === "single" && !n ? /* @__PURE__ */ e.createElement(h, null) : t === "multiple" && n ? /* @__PURE__ */ e.createElement(d, null) : /* @__PURE__ */ e.createElement(v, null), I = f(r, p), x = f(r, w);
|
|
46
|
+
return /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(i, { props: s }, l), /* @__PURE__ */ e.createElement(i, { props: c }, /* @__PURE__ */ e.createElement(N, { if: !I && !x }, /* @__PURE__ */ e.createElement(p, null, r))));
|
|
47
|
+
}, K = M("MenuItem", (a) => {
|
|
48
|
+
const {
|
|
49
|
+
children: t,
|
|
50
|
+
className: n,
|
|
51
|
+
selectionVariant: m,
|
|
52
|
+
refProp: r,
|
|
53
|
+
...c
|
|
54
|
+
} = a, s = u(o.menuItem, n);
|
|
55
|
+
return /* @__PURE__ */ e.createElement(E.MenuItem, { ...c, className: s, ref: r }, (l) => /* @__PURE__ */ e.createElement(R, { ...l, selectionVariant: m }, t));
|
|
56
|
+
});
|
|
57
|
+
export {
|
|
58
|
+
K as M
|
|
59
|
+
};
|
package/dist/js/MenuItem.js
CHANGED
package/dist/js/Modal.js
CHANGED
|
@@ -14,7 +14,7 @@ import { u as w } from "./useOverlayController-D8pgx8nV.js";
|
|
|
14
14
|
import { O as E, a as h } from "./OverlayTrigger-BmB63e4e.js";
|
|
15
15
|
import { H as O } from "./Header-lMGDqbwd.js";
|
|
16
16
|
import { A as M } from "./Action-DsQVttvF.js";
|
|
17
|
-
import { B as N } from "./Button-
|
|
17
|
+
import { B as N } from "./Button-tKo9ydZL.js";
|
|
18
18
|
import "@tabler/icons-react";
|
|
19
19
|
import "./Icon-DGqvukLZ.js";
|
|
20
20
|
import { I as x } from "./IconClose-B9jMC5hC.js";
|
package/dist/js/Navigation.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
|
-
import e, { useId as
|
|
4
|
-
import
|
|
3
|
+
import e, { useId as d } from "react";
|
|
4
|
+
import v from "clsx";
|
|
5
5
|
import { W as f } from "./Wrap-DGT1h1o3.js";
|
|
6
6
|
import "./propsContext-DzAKlmhS.js";
|
|
7
7
|
import { PropsContextProvider as l } from "./PropsContextProvider.js";
|
|
@@ -9,16 +9,17 @@ import "@react-aria/utils";
|
|
|
9
9
|
import "remeda";
|
|
10
10
|
import { d as E } from "./deepHas-KHS5X1F_.js";
|
|
11
11
|
import { TunnelProvider as u, TunnelExit as p } from "@mittwald/react-tunnel";
|
|
12
|
-
import { A as x } from "./Accordion-
|
|
12
|
+
import { A as x } from "./Accordion-D7_NvGjy.js";
|
|
13
13
|
import { C as N } from "./Content-DW8OnKPj.js";
|
|
14
|
-
const C = "flow--navigation", I = "flow--navigation--item", b = "flow--navigation--icon", w = "flow--navigation--text", P = "flow--navigation--control-icon", r = {
|
|
14
|
+
const C = "flow--navigation", I = "flow--navigation--item", b = "flow--navigation--icon", w = "flow--navigation--text", P = "flow--navigation--control-icon", h = "flow--navigation--avatar", r = {
|
|
15
15
|
navigation: C,
|
|
16
16
|
item: I,
|
|
17
17
|
icon: b,
|
|
18
18
|
text: w,
|
|
19
|
-
controlIcon: P
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
controlIcon: P,
|
|
20
|
+
avatar: h
|
|
21
|
+
}, D = (i) => {
|
|
22
|
+
const { className: t, children: n, ...s } = i, c = v(r.navigation, t), a = E(n, y), o = {
|
|
22
23
|
Link: {
|
|
23
24
|
wrapWith: /* @__PURE__ */ e.createElement("li", null),
|
|
24
25
|
className: r.item,
|
|
@@ -31,14 +32,14 @@ const C = "flow--navigation", I = "flow--navigation--item", b = "flow--navigatio
|
|
|
31
32
|
}
|
|
32
33
|
}
|
|
33
34
|
};
|
|
34
|
-
return /* @__PURE__ */ e.createElement("nav", { className: c, role: "navigation", ...s }, /* @__PURE__ */ e.createElement(l, { props:
|
|
35
|
-
},
|
|
36
|
-
navigationGroup:
|
|
37
|
-
label:
|
|
38
|
-
},
|
|
39
|
-
const { children: t, className: n, collapsable: s, ...c } = i,
|
|
35
|
+
return /* @__PURE__ */ e.createElement("nav", { className: c, role: "navigation", ...s }, /* @__PURE__ */ e.createElement(l, { props: o, mergeInParentContext: !0 }, /* @__PURE__ */ e.createElement(f, { if: !a }, /* @__PURE__ */ e.createElement("ul", null, n))));
|
|
36
|
+
}, k = "flow--navigation--navigation-group", G = "flow--navigation--navigation-group--label", g = {
|
|
37
|
+
navigationGroup: k,
|
|
38
|
+
label: G
|
|
39
|
+
}, y = (i) => {
|
|
40
|
+
const { children: t, className: n, collapsable: s, ...c } = i, a = v(g.navigationGroup, n), o = d(), m = {
|
|
40
41
|
Label: {
|
|
41
|
-
id:
|
|
42
|
+
id: o,
|
|
42
43
|
className: g.label,
|
|
43
44
|
"aria-hidden": !0
|
|
44
45
|
},
|
|
@@ -46,18 +47,18 @@ const C = "flow--navigation", I = "flow--navigation--item", b = "flow--navigatio
|
|
|
46
47
|
tunnelId: "links"
|
|
47
48
|
}
|
|
48
49
|
};
|
|
49
|
-
return s ? /* @__PURE__ */ e.createElement(l, { mergeInParentContext: !0, props: m }, /* @__PURE__ */ e.createElement(u, null, /* @__PURE__ */ e.createElement(x, { defaultExpanded: !0, className:
|
|
50
|
+
return s ? /* @__PURE__ */ e.createElement(l, { mergeInParentContext: !0, props: m }, /* @__PURE__ */ e.createElement(u, null, /* @__PURE__ */ e.createElement(x, { defaultExpanded: !0, className: a }, t, /* @__PURE__ */ e.createElement(N, { clearPropsContext: !1 }, /* @__PURE__ */ e.createElement("ul", null, /* @__PURE__ */ e.createElement(p, { id: "links" })))))) : /* @__PURE__ */ e.createElement(l, { mergeInParentContext: !0, props: m }, /* @__PURE__ */ e.createElement(u, null, /* @__PURE__ */ e.createElement(
|
|
50
51
|
"section",
|
|
51
52
|
{
|
|
52
|
-
"aria-labelledby":
|
|
53
|
-
className:
|
|
53
|
+
"aria-labelledby": o,
|
|
54
|
+
className: a,
|
|
54
55
|
...c
|
|
55
56
|
},
|
|
56
57
|
/* @__PURE__ */ e.createElement(l, { mergeInParentContext: !0, props: m }, t, /* @__PURE__ */ e.createElement(p, { id: "Label" }), /* @__PURE__ */ e.createElement("ul", null, /* @__PURE__ */ e.createElement(p, { id: "links" })))
|
|
57
58
|
)));
|
|
58
59
|
};
|
|
59
60
|
export {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
D as Navigation,
|
|
62
|
+
y as NavigationGroup,
|
|
63
|
+
D as default
|
|
63
64
|
};
|
package/dist/js/Notification.js
CHANGED
|
@@ -9,7 +9,7 @@ import "remeda";
|
|
|
9
9
|
import { d as h } from "./dynamic-ClpUSmEt.js";
|
|
10
10
|
import { A as k } from "./AlertIcon-Ca6DaRUI.js";
|
|
11
11
|
import { L as x } from "./Link-Dk1RuBZL.js";
|
|
12
|
-
import { B as C } from "./Button-
|
|
12
|
+
import { B as C } from "./Button-tKo9ydZL.js";
|
|
13
13
|
import "@tabler/icons-react";
|
|
14
14
|
import "./Icon-DGqvukLZ.js";
|
|
15
15
|
import { I as N } from "./IconClose-B9jMC5hC.js";
|
package/dist/js/NumberField.js
CHANGED
|
@@ -10,7 +10,7 @@ import "@react-aria/utils";
|
|
|
10
10
|
import "./propsContext-DzAKlmhS.js";
|
|
11
11
|
import "remeda";
|
|
12
12
|
import { F as E } from "./FieldError-BvH18haz.js";
|
|
13
|
-
import { B as m } from "./Button-
|
|
13
|
+
import { B as m } from "./Button-tKo9ydZL.js";
|
|
14
14
|
import "@tabler/icons-react";
|
|
15
15
|
import "./Icon-DGqvukLZ.js";
|
|
16
16
|
import { I as N } from "./IconChevronDown-BtCeHe7W.js";
|
|
@@ -11,7 +11,7 @@ import "./propsContext-DzAKlmhS.js";
|
|
|
11
11
|
import "remeda";
|
|
12
12
|
import { F as u } from "./FieldError-BvH18haz.js";
|
|
13
13
|
import { f as F } from "./flowComponent-1wOIvUIq.js";
|
|
14
|
-
import { B as E } from "./Button-
|
|
14
|
+
import { B as E } from "./Button-tKo9ydZL.js";
|
|
15
15
|
import "@tabler/icons-react";
|
|
16
16
|
import "./Icon-DGqvukLZ.js";
|
|
17
17
|
import { I as N } from "./IconClose-B9jMC5hC.js";
|
package/dist/js/SearchField.js
CHANGED
package/dist/js/Select.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
3
|
import e from "react";
|
|
4
|
-
import * as
|
|
4
|
+
import * as a from "react-aria-components";
|
|
5
5
|
import "./propsContext-DzAKlmhS.js";
|
|
6
|
-
import { PropsContextProvider as
|
|
6
|
+
import { PropsContextProvider as w } from "./PropsContextProvider.js";
|
|
7
7
|
import "@react-aria/utils";
|
|
8
8
|
import "remeda";
|
|
9
9
|
import { f as c } from "./FormField.module-CqWpTQKP.js";
|
|
10
|
-
import { F as
|
|
10
|
+
import { F as h } from "./FieldError-BvH18haz.js";
|
|
11
11
|
import f from "clsx";
|
|
12
12
|
import "@tabler/icons-react";
|
|
13
13
|
import "./Icon-DGqvukLZ.js";
|
|
@@ -26,8 +26,8 @@ const D = "flow--select", L = "flow--select--toggle", u = {
|
|
|
26
26
|
options: R
|
|
27
27
|
}, T = (o) => {
|
|
28
28
|
const { className: t, children: r, ...n } = o, l = f(d.options, t), s = C("Select");
|
|
29
|
-
return /* @__PURE__ */ e.createElement(P, { className: d.popover, controller: s }, /* @__PURE__ */ e.createElement(
|
|
30
|
-
},
|
|
29
|
+
return /* @__PURE__ */ e.createElement(P, { className: d.popover, controller: s }, /* @__PURE__ */ e.createElement(a.ListBox, { className: l, ...n }, r));
|
|
30
|
+
}, ne = E("Select", (o) => {
|
|
31
31
|
const {
|
|
32
32
|
children: t,
|
|
33
33
|
className: r,
|
|
@@ -37,12 +37,12 @@ const D = "flow--select", L = "flow--select--toggle", u = {
|
|
|
37
37
|
},
|
|
38
38
|
controller: s,
|
|
39
39
|
refProp: m,
|
|
40
|
-
...
|
|
41
|
-
} = o,
|
|
40
|
+
...v
|
|
41
|
+
} = o, N = f(
|
|
42
42
|
u.select,
|
|
43
43
|
c.formField,
|
|
44
44
|
r
|
|
45
|
-
),
|
|
45
|
+
), g = {
|
|
46
46
|
Label: {
|
|
47
47
|
className: c.label,
|
|
48
48
|
optional: !o.isRequired
|
|
@@ -56,34 +56,35 @@ const D = "flow--select", L = "flow--select--toggle", u = {
|
|
|
56
56
|
Option: {
|
|
57
57
|
tunnelId: "options"
|
|
58
58
|
}
|
|
59
|
-
},
|
|
60
|
-
n(String(
|
|
59
|
+
}, x = (i) => {
|
|
60
|
+
n(String(i)), l(i);
|
|
61
61
|
}, O = C("Select", {
|
|
62
62
|
reuseControllerFromContext: !0
|
|
63
63
|
}), p = s ?? O, S = p.useIsOpen();
|
|
64
64
|
return /* @__PURE__ */ e.createElement(
|
|
65
|
-
|
|
65
|
+
a.Select,
|
|
66
66
|
{
|
|
67
|
-
...
|
|
68
|
-
className:
|
|
67
|
+
...v,
|
|
68
|
+
className: N,
|
|
69
69
|
ref: m,
|
|
70
|
-
onSelectionChange:
|
|
71
|
-
onOpenChange: (
|
|
70
|
+
onSelectionChange: x,
|
|
71
|
+
onOpenChange: (i) => p.setOpen(i),
|
|
72
72
|
isOpen: S
|
|
73
73
|
},
|
|
74
|
-
/* @__PURE__ */ e.createElement(B, { type: "Select", controller: p }, /* @__PURE__ */ e.createElement(
|
|
74
|
+
/* @__PURE__ */ e.createElement(B, { type: "Select", controller: p }, /* @__PURE__ */ e.createElement(w, { props: g }, /* @__PURE__ */ e.createElement(y, null, /* @__PURE__ */ e.createElement(a.Button, { className: u.toggle }, /* @__PURE__ */ e.createElement(a.SelectValue, null), /* @__PURE__ */ e.createElement(F, null)), t, /* @__PURE__ */ e.createElement(T, null, /* @__PURE__ */ e.createElement(I, { id: "options" })), /* @__PURE__ */ e.createElement(h, { className: c.fieldError }))))
|
|
75
75
|
);
|
|
76
|
-
}), $ = "flow--select--option", q = "flow--select--option--icon", A = "flow--select--option--text", V = "flow--select--option--control-icon", j = {
|
|
76
|
+
}), $ = "flow--select--option", q = "flow--select--option--icon", A = "flow--select--option--text", V = "flow--select--option--control-icon", j = "flow--select--option--avatar", k = {
|
|
77
77
|
option: $,
|
|
78
78
|
icon: q,
|
|
79
79
|
text: A,
|
|
80
|
-
controlIcon: V
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
80
|
+
controlIcon: V,
|
|
81
|
+
avatar: j
|
|
82
|
+
}, le = E("Option", (o) => {
|
|
83
|
+
const { className: t, children: r, value: n, refProp: l, ...s } = o, m = f(k.option, t);
|
|
84
|
+
return /* @__PURE__ */ e.createElement(a.ListBoxItem, { className: m, ref: l, ...s, id: n }, r);
|
|
84
85
|
});
|
|
85
86
|
export {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
87
|
+
le as Option,
|
|
88
|
+
ne as Select,
|
|
89
|
+
ne as default
|
|
89
90
|
};
|
package/dist/js/Slider.js
CHANGED
|
@@ -8,7 +8,7 @@ import "./propsContext-DzAKlmhS.js";
|
|
|
8
8
|
import { PropsContextProvider as v } from "./PropsContextProvider.js";
|
|
9
9
|
import "@react-aria/utils";
|
|
10
10
|
import "remeda";
|
|
11
|
-
import { B as i } from "./Button-
|
|
11
|
+
import { B as i } from "./Button-tKo9ydZL.js";
|
|
12
12
|
import "@tabler/icons-react";
|
|
13
13
|
import "./Icon-DGqvukLZ.js";
|
|
14
14
|
import { I as w, a as N } from "./IconPlus-CdffT7DS.js";
|
package/dist/js/Tabs.js
CHANGED
|
@@ -7,8 +7,8 @@ import { TunnelExit as E, TunnelProvider as P, TunnelEntry as f } from "@mittwal
|
|
|
7
7
|
import { f as O } from "./flowComponent-1wOIvUIq.js";
|
|
8
8
|
import { useCallbackRef as S } from "use-callback-ref";
|
|
9
9
|
import { a as A, C as B } from "./ContextMenuTrigger-BbYyy0an.js";
|
|
10
|
-
import { M as K } from "./MenuItem-
|
|
11
|
-
import { B as L } from "./Button-
|
|
10
|
+
import { M as K } from "./MenuItem-GX6Zh70q.js";
|
|
11
|
+
import { B as L } from "./Button-tKo9ydZL.js";
|
|
12
12
|
import "@tabler/icons-react";
|
|
13
13
|
import "./Icon-DGqvukLZ.js";
|
|
14
14
|
import { I as W } from "./IconContextMenu-CZgbKH5A.js";
|