@mittwald/flow-react-components 0.1.0-alpha.73 → 0.1.0-alpha.75

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.
@@ -1,34 +1,39 @@
1
1
  "use client"
2
2
  /* */
3
- import t from "react";
3
+ import e from "react";
4
4
  import "./propsContext-CauylOgH.js";
5
- import { P as c } from "./PropsContextProvider-DZvwqHLP.js";
5
+ import { P as m } from "./PropsContextProvider-DZvwqHLP.js";
6
6
  import "@react-aria/utils";
7
7
  import "remeda";
8
- import { d as m } from "./dynamic-ClpUSmEt.js";
9
- import d from "clsx";
8
+ import { d } from "./dynamic-ClpUSmEt.js";
9
+ import v from "clsx";
10
10
  import { E as p } from "./EmulatedBoldText-Dtox8Wd1.js";
11
- const u = "flow--header-navigation", h = "flow--header-navigation--button", v = "flow--header-navigation--link", n = {
11
+ const u = "flow--header-navigation", h = "flow--header-navigation--button", f = "flow--header-navigation--link", g = "flow--header-navigation--inverse", n = {
12
12
  headerNavigation: u,
13
13
  button: h,
14
- link: v
15
- }, w = (o) => {
16
- const { children: a, className: l, ...r } = o, i = d(n.headerNavigation, l), s = {
14
+ link: f,
15
+ inverse: g
16
+ }, P = (o) => {
17
+ const { children: a, className: r, inverse: i, ...l } = o, s = v(
18
+ n.headerNavigation,
19
+ i && n.inverse,
20
+ r
21
+ ), c = {
17
22
  Link: {
18
- hoc: (e) => /* @__PURE__ */ t.createElement("li", null, e),
23
+ hoc: (t) => /* @__PURE__ */ e.createElement("li", null, t),
19
24
  className: n.link,
20
25
  unstyled: !0,
21
- children: m((e) => /* @__PURE__ */ t.createElement(p, null, e.children))
26
+ children: d((t) => /* @__PURE__ */ e.createElement(p, null, t.children))
22
27
  },
23
28
  Button: {
24
- hoc: (e) => /* @__PURE__ */ t.createElement("li", null, e),
29
+ hoc: (t) => /* @__PURE__ */ e.createElement("li", null, t),
25
30
  className: n.button,
26
31
  style: "plain"
27
32
  }
28
33
  };
29
- return /* @__PURE__ */ t.createElement("nav", { className: i, role: "navigation", ...r }, /* @__PURE__ */ t.createElement("ul", null, /* @__PURE__ */ t.createElement(c, { props: s }, a)));
34
+ return /* @__PURE__ */ e.createElement("nav", { className: s, role: "navigation", ...l }, /* @__PURE__ */ e.createElement("ul", null, /* @__PURE__ */ e.createElement(m, { props: c }, a)));
30
35
  };
31
36
  export {
32
- w as HeaderNavigation,
33
- w as default
37
+ P as HeaderNavigation,
38
+ P as default
34
39
  };
@@ -1,45 +1,51 @@
1
1
  "use client"
2
2
  /* */
3
- import t from "react";
4
- import r from "clsx";
3
+ import t, { useId as m } from "react";
4
+ import g from "clsx";
5
5
  import { d as v } from "./deepFindOfType-6pG0fH7S.js";
6
- import { W as g } from "./Wrap-DGT1h1o3.js";
6
+ import { W as d } from "./Wrap-DGT1h1o3.js";
7
7
  import "./propsContext-CauylOgH.js";
8
- import { P as f } from "./PropsContextProvider-DZvwqHLP.js";
8
+ import { P as u } from "./PropsContextProvider-DZvwqHLP.js";
9
9
  import "@react-aria/utils";
10
10
  import "remeda";
11
- const u = "flow--navigation--label", N = "flow--navigation--item", x = "flow--navigation--icon", d = "flow--navigation--text", w = "flow--navigation--control-icon", o = {
12
- label: u,
11
+ import { TunnelExit as f } from "@mittwald/react-tunnel";
12
+ const x = "flow--navigation", N = "flow--navigation--item", E = "flow--navigation--icon", I = "flow--navigation--text", b = "flow--navigation--control-icon", a = {
13
+ navigation: x,
13
14
  item: N,
14
- icon: x,
15
- text: d,
16
- controlIcon: w
17
- }, W = (a) => {
18
- const { className: e, children: n, ...s } = a, i = r(o.navigation, e), c = !!v(n, l), m = {
19
- Label: {
20
- className: o.label
21
- },
15
+ icon: E,
16
+ text: I,
17
+ controlIcon: b
18
+ }, R = (i) => {
19
+ const { className: r, children: e, ...l } = i, s = g(a.navigation, r), n = !!v(e, h), o = {
22
20
  Link: {
23
- hoc: (p) => /* @__PURE__ */ t.createElement("li", null, p),
24
- className: o.item,
21
+ hoc: (c) => /* @__PURE__ */ t.createElement("li", null, c),
22
+ className: a.item,
25
23
  unstyled: !0,
26
24
  Text: {
27
- className: o.text
25
+ className: a.text
28
26
  },
29
27
  Icon: {
30
- className: o.icon
28
+ className: a.icon
31
29
  }
32
30
  }
33
31
  };
34
- return /* @__PURE__ */ t.createElement("nav", { className: i, role: "navigation", ...s }, /* @__PURE__ */ t.createElement(f, { props: m }, /* @__PURE__ */ t.createElement(g, { if: !c }, /* @__PURE__ */ t.createElement(l, null, n))));
35
- }, E = "flow--navigation--navigation-group", b = {
36
- navigationGroup: E
37
- }, l = (a) => {
38
- const { children: e, className: n, ...s } = a, i = r(b.navigationGroup, n);
39
- return /* @__PURE__ */ t.createElement("ul", { ...s, className: i }, e);
32
+ return /* @__PURE__ */ t.createElement("nav", { className: s, role: "navigation", ...l }, /* @__PURE__ */ t.createElement(u, { props: o }, /* @__PURE__ */ t.createElement(d, { if: !n }, /* @__PURE__ */ t.createElement("ul", null, e))));
33
+ }, w = "flow--navigation--navigation-group", C = "flow--navigation--navigation-group--label", p = {
34
+ navigationGroup: w,
35
+ label: C
36
+ }, h = (i) => {
37
+ const { children: r, className: e, ...l } = i, s = g(p.navigationGroup, e), n = m(), o = m(), c = {
38
+ Label: {
39
+ tunnelId: o,
40
+ id: n,
41
+ className: p.label,
42
+ "aria-hidden": !0
43
+ }
44
+ };
45
+ return /* @__PURE__ */ t.createElement("section", { "aria-labelledby": n, className: s, ...l }, /* @__PURE__ */ t.createElement(u, { mergeInParentContext: !0, props: c }, /* @__PURE__ */ t.createElement(f, { id: o }), /* @__PURE__ */ t.createElement("ul", null, r)));
40
46
  };
41
47
  export {
42
- W as Navigation,
43
- l as NavigationGroup,
44
- W as default
48
+ R as Navigation,
49
+ h as NavigationGroup,
50
+ R as default
45
51
  };