@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.
Files changed (36) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/css/Button.css +1 -1
  3. package/dist/css/MenuItem.css +1 -1
  4. package/dist/css/Navigation.css +1 -1
  5. package/dist/css/Select.css +1 -1
  6. package/dist/css/globals.css +1 -1
  7. package/dist/js/{Accordion-za0RoF1r.js → Accordion-D7_NvGjy.js} +1 -1
  8. package/dist/js/Accordion.js +1 -1
  9. package/dist/js/{Badge-CT8n21Li.js → Badge-C3CBqh8m.js} +1 -1
  10. package/dist/js/Badge.js +1 -1
  11. package/dist/js/{Button-DXgQ5lAy.js → Button-tKo9ydZL.js} +18 -18
  12. package/dist/js/Button.js +1 -1
  13. package/dist/js/{CalendarHeader-BWiFjVQp.js → CalendarHeader-CdTPgq-8.js} +1 -1
  14. package/dist/js/CodeBlock.js +1 -1
  15. package/dist/js/ContextMenu.js +1 -1
  16. package/dist/js/{CopyButton-Br-KQ5Tt.js → CopyButton-e2EjDU95.js} +1 -1
  17. package/dist/js/CopyButton.js +1 -1
  18. package/dist/js/DatePicker.js +2 -2
  19. package/dist/js/DateRangePicker.js +2 -2
  20. package/dist/js/FileCard.js +1 -1
  21. package/dist/js/List.js +4 -4
  22. package/dist/js/MenuItem-GX6Zh70q.js +59 -0
  23. package/dist/js/MenuItem.js +1 -1
  24. package/dist/js/Modal.js +1 -1
  25. package/dist/js/Navigation.js +21 -20
  26. package/dist/js/Notification.js +1 -1
  27. package/dist/js/NumberField.js +1 -1
  28. package/dist/js/{SearchField-d7pa2xgi.js → SearchField-62cVb6e-.js} +1 -1
  29. package/dist/js/SearchField.js +1 -1
  30. package/dist/js/Select.js +25 -24
  31. package/dist/js/Slider.js +1 -1
  32. package/dist/js/Tabs.js +2 -2
  33. package/dist/js/all.css +1 -1
  34. package/dist/js/types/components/Button/stories/Default.stories.d.ts +1 -0
  35. package/package.json +4 -4
  36. 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
+ };
@@ -1,6 +1,6 @@
1
1
  "use client"
2
2
  /* */
3
- import { M as t } from "./MenuItem-DZ6wEuiI.js";
3
+ import { M as t } from "./MenuItem-GX6Zh70q.js";
4
4
  export {
5
5
  t as MenuItem,
6
6
  t as default
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-DXgQ5lAy.js";
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";
@@ -1,7 +1,7 @@
1
1
  "use client"
2
2
  /* */
3
- import e, { useId as v } from "react";
4
- import d from "clsx";
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-za0RoF1r.js";
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
- }, B = (i) => {
21
- const { className: t, children: n, ...s } = i, c = d(r.navigation, t), o = E(n, G), a = {
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: a, mergeInParentContext: !0 }, /* @__PURE__ */ e.createElement(f, { if: !o }, /* @__PURE__ */ e.createElement("ul", null, n))));
35
- }, h = "flow--navigation--navigation-group", k = "flow--navigation--navigation-group--label", g = {
36
- navigationGroup: h,
37
- label: k
38
- }, G = (i) => {
39
- const { children: t, className: n, collapsable: s, ...c } = i, o = d(g.navigationGroup, n), a = v(), m = {
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: a,
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: o }, 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
+ 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": a,
53
- className: o,
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
- B as Navigation,
61
- G as NavigationGroup,
62
- B as default
61
+ D as Navigation,
62
+ y as NavigationGroup,
63
+ D as default
63
64
  };
@@ -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-DXgQ5lAy.js";
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";
@@ -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-DXgQ5lAy.js";
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-DXgQ5lAy.js";
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";
@@ -1,6 +1,6 @@
1
1
  "use client"
2
2
  /* */
3
- import { S as e } from "./SearchField-d7pa2xgi.js";
3
+ import { S as e } from "./SearchField-62cVb6e-.js";
4
4
  export {
5
5
  e as SearchField,
6
6
  e as default
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 i from "react-aria-components";
4
+ import * as a from "react-aria-components";
5
5
  import "./propsContext-DzAKlmhS.js";
6
- import { PropsContextProvider as h } from "./PropsContextProvider.js";
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 w } from "./FieldError-BvH18haz.js";
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(i.ListBox, { className: l, ...n }, r));
30
- }, re = E("Select", (o) => {
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
- ...N
41
- } = o, g = f(
40
+ ...v
41
+ } = o, N = f(
42
42
  u.select,
43
43
  c.formField,
44
44
  r
45
- ), x = {
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
- }, v = (a) => {
60
- n(String(a)), l(a);
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
- i.Select,
65
+ a.Select,
66
66
  {
67
- ...N,
68
- className: g,
67
+ ...v,
68
+ className: N,
69
69
  ref: m,
70
- onSelectionChange: v,
71
- onOpenChange: (a) => p.setOpen(a),
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(h, { props: x }, /* @__PURE__ */ e.createElement(y, null, /* @__PURE__ */ e.createElement(i.Button, { className: u.toggle }, /* @__PURE__ */ e.createElement(i.SelectValue, null), /* @__PURE__ */ e.createElement(F, null)), t, /* @__PURE__ */ e.createElement(T, null, /* @__PURE__ */ e.createElement(I, { id: "options" })), /* @__PURE__ */ e.createElement(w, { className: c.fieldError }))))
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
- }, ne = E("Option", (o) => {
82
- const { className: t, children: r, value: n, refProp: l, ...s } = o, m = f(j.option, t);
83
- return /* @__PURE__ */ e.createElement(i.ListBoxItem, { className: m, ref: l, ...s, id: n }, r);
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
- ne as Option,
87
- re as Select,
88
- re as default
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-DXgQ5lAy.js";
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-DZ6wEuiI.js";
11
- import { B as L } from "./Button-DXgQ5lAy.js";
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";