@mittwald/flow-react-components 0.1.0-alpha.30 → 0.1.0-alpha.31

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,16 +1,19 @@
1
1
  import * as Aria from 'react-aria-components';
2
2
  import { ComponentProps } from 'react';
3
+ import { ComponentType } from 'react';
3
4
  import { FC } from 'react';
4
5
  import { PropsWithChildren } from 'react';
6
+ import { default as React_2 } from 'react';
5
7
 
6
8
  declare const Navigation: FC<NavigationProps>;
7
9
  export { Navigation }
8
10
  export default Navigation;
9
11
 
10
- export declare const NavigationItem: FC<NavigationItemProps>;
12
+ export declare function NavigationItem(props: NavigationItemProps): React_2.JSX.Element;
11
13
 
12
- export declare interface NavigationItemProps extends PropsWithChildren<Omit<Aria.LinkProps, "children">> {
14
+ export declare interface NavigationItemProps extends PropsWithChildren<Omit<Aria.LinkProps, "children" | "slot">> {
13
15
  isCurrent?: boolean;
16
+ linkComponent?: ComponentType<Omit<ComponentProps<"a">, "ref">>;
14
17
  }
15
18
 
16
19
  export declare interface NavigationProps extends PropsWithChildren<ComponentProps<"nav">> {
@@ -1,22 +1,28 @@
1
1
  "use client"
2
2
  /* */
3
3
  import t from "react";
4
- import { c as r } from "./clsx-DB4S2d7J.js";
4
+ import { c } from "./clsx-DB4S2d7J.js";
5
+ import * as l from "react-aria-components";
5
6
  import "./propsContext-Dx7WKmmM.js";
6
7
  import { P as m } from "./PropsContextProvider-CEoxD8yK.js";
7
8
  import "@react-aria/utils";
8
- import * as v from "react-aria-components";
9
- const g = "flow--navigation", p = {
10
- navigation: g
11
- }, w = (a) => {
12
- const { className: n, children: o, ...e } = a, i = r(p.navigation, n);
9
+ const v = "flow--navigation", g = {
10
+ navigation: v
11
+ }, d = (n) => {
12
+ const { className: a, children: o, ...e } = n, i = c(g.navigation, a);
13
13
  return /* @__PURE__ */ t.createElement("nav", { className: i, role: "navigation", ...e }, /* @__PURE__ */ t.createElement("ul", null, o));
14
- }, f = "flow--navigation--navigation-item", N = "flow--navigation--navigation-item--icon", x = "flow--navigation--navigation-item--text", s = {
15
- navigationItem: f,
16
- icon: N,
17
- text: x
18
- }, P = (a) => {
19
- const { children: n, isCurrent: o, className: e, ...i } = a, c = r(s.navigationItem, e), l = {
14
+ }, p = "flow--navigation--navigation-item", f = "flow--navigation--navigation-item--icon", u = "flow--navigation--navigation-item--text", s = {
15
+ navigationItem: p,
16
+ icon: f,
17
+ text: u
18
+ };
19
+ function k(n) {
20
+ const {
21
+ isCurrent: a,
22
+ children: o,
23
+ linkComponent: e = l.Link,
24
+ ...i
25
+ } = n, r = {
20
26
  Text: {
21
27
  className: s.text
22
28
  },
@@ -25,17 +31,17 @@ const g = "flow--navigation", p = {
25
31
  }
26
32
  };
27
33
  return /* @__PURE__ */ t.createElement("li", null, /* @__PURE__ */ t.createElement(
28
- v.Link,
34
+ e,
29
35
  {
30
- className: c,
31
- "aria-current": o ? "page" : !1,
32
- ...i
36
+ ...i,
37
+ className: s.navigationItem,
38
+ "aria-current": a ? "page" : !1
33
39
  },
34
- /* @__PURE__ */ t.createElement(m, { props: l }, n)
40
+ /* @__PURE__ */ t.createElement(m, { props: r }, o)
35
41
  ));
36
- };
42
+ }
37
43
  export {
38
- w as Navigation,
39
- P as NavigationItem,
40
- w as default
44
+ d as Navigation,
45
+ k as NavigationItem,
46
+ d as default
41
47
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mittwald/flow-react-components",
3
- "version": "0.1.0-alpha.30",
3
+ "version": "0.1.0-alpha.31",
4
4
  "type": "module",
5
5
  "description": "A React implementation of Flow, mittwald’s design system",
6
6
  "homepage": "https://mittwald.github.io/flow",
@@ -127,5 +127,5 @@
127
127
  "react": "18.2.0",
128
128
  "react-dom": "18.2.0"
129
129
  },
130
- "gitHead": "ff8502fbb5a5dc9665688b3addbc8bcee5a8088b"
130
+ "gitHead": "c3e1acb0243fea0f36c948d17cb5f13f27d265de"
131
131
  }