@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.
- package/dist/HeaderNavigation.js +19 -14
- package/dist/Navigation.js +33 -27
- package/dist/styles.css +1 -1
- package/dist/types/components/HeaderNavigation/HeaderNavigation.d.ts +1 -0
- package/dist/types/components/HeaderNavigation/stories/Default.stories.d.ts +1 -0
- package/dist/types/components/Navigation/components/NavigationGroup/NavigationGroup.d.ts +1 -1
- package/package.json +4 -4
package/dist/HeaderNavigation.js
CHANGED
|
@@ -1,34 +1,39 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
|
-
import
|
|
3
|
+
import e from "react";
|
|
4
4
|
import "./propsContext-CauylOgH.js";
|
|
5
|
-
import { P as
|
|
5
|
+
import { P as m } from "./PropsContextProvider-DZvwqHLP.js";
|
|
6
6
|
import "@react-aria/utils";
|
|
7
7
|
import "remeda";
|
|
8
|
-
import { d
|
|
9
|
-
import
|
|
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",
|
|
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:
|
|
15
|
-
|
|
16
|
-
|
|
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: (
|
|
23
|
+
hoc: (t) => /* @__PURE__ */ e.createElement("li", null, t),
|
|
19
24
|
className: n.link,
|
|
20
25
|
unstyled: !0,
|
|
21
|
-
children:
|
|
26
|
+
children: d((t) => /* @__PURE__ */ e.createElement(p, null, t.children))
|
|
22
27
|
},
|
|
23
28
|
Button: {
|
|
24
|
-
hoc: (
|
|
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__ */
|
|
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
|
-
|
|
33
|
-
|
|
37
|
+
P as HeaderNavigation,
|
|
38
|
+
P as default
|
|
34
39
|
};
|
package/dist/Navigation.js
CHANGED
|
@@ -1,45 +1,51 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
|
-
import t from "react";
|
|
4
|
-
import
|
|
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
|
|
6
|
+
import { W as d } from "./Wrap-DGT1h1o3.js";
|
|
7
7
|
import "./propsContext-CauylOgH.js";
|
|
8
|
-
import { P as
|
|
8
|
+
import { P as u } from "./PropsContextProvider-DZvwqHLP.js";
|
|
9
9
|
import "@react-aria/utils";
|
|
10
10
|
import "remeda";
|
|
11
|
-
|
|
12
|
-
|
|
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:
|
|
15
|
-
text:
|
|
16
|
-
controlIcon:
|
|
17
|
-
},
|
|
18
|
-
const { className:
|
|
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: (
|
|
24
|
-
className:
|
|
21
|
+
hoc: (c) => /* @__PURE__ */ t.createElement("li", null, c),
|
|
22
|
+
className: a.item,
|
|
25
23
|
unstyled: !0,
|
|
26
24
|
Text: {
|
|
27
|
-
className:
|
|
25
|
+
className: a.text
|
|
28
26
|
},
|
|
29
27
|
Icon: {
|
|
30
|
-
className:
|
|
28
|
+
className: a.icon
|
|
31
29
|
}
|
|
32
30
|
}
|
|
33
31
|
};
|
|
34
|
-
return /* @__PURE__ */ t.createElement("nav", { className:
|
|
35
|
-
},
|
|
36
|
-
navigationGroup:
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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
|
-
|
|
43
|
-
|
|
44
|
-
|
|
48
|
+
R as Navigation,
|
|
49
|
+
h as NavigationGroup,
|
|
50
|
+
R as default
|
|
45
51
|
};
|