@mittwald/flow-react-components 0.1.0-alpha.23 → 0.1.0-alpha.25
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/InlineAlert.d.ts +4 -4
- package/dist/InlineAlert.js +9 -9
- package/dist/Navigation.d.ts +7 -9
- package/dist/Navigation.js +26 -38
- package/dist/StatusBadge.d.ts +18 -0
- package/dist/StatusBadge.js +21 -0
- package/dist/{StatusIcon-BBNE68gH.js → StatusIcon-BVWjvT3I.js} +2 -2
- package/dist/StatusIcon.d.ts +5 -5
- package/dist/StatusIcon.js +1 -1
- package/dist/styles.css +1 -1
- package/package.json +4 -4
- package/dist/Badge.d.ts +0 -18
- package/dist/Badge.js +0 -34
package/dist/InlineAlert.d.ts
CHANGED
|
@@ -6,13 +6,13 @@ declare const InlineAlert: FC<InlineAlertProps>;
|
|
|
6
6
|
export { InlineAlert }
|
|
7
7
|
export default InlineAlert;
|
|
8
8
|
|
|
9
|
-
export declare interface InlineAlertProps extends PropsWithChildren<ComponentProps<"aside">>,
|
|
9
|
+
export declare interface InlineAlertProps extends PropsWithChildren<ComponentProps<"aside">>, PropsWithStatus {
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
declare type
|
|
13
|
-
|
|
12
|
+
declare type PropsWithStatus<T extends Status = Status, P = unknown> = P & {
|
|
13
|
+
status?: T;
|
|
14
14
|
};
|
|
15
15
|
|
|
16
|
-
declare type
|
|
16
|
+
declare type Status = "info" | "success" | "warning" | "danger";
|
|
17
17
|
|
|
18
18
|
export { }
|
package/dist/InlineAlert.js
CHANGED
|
@@ -5,10 +5,10 @@ import "./propsContext-Dx7WKmmM.js";
|
|
|
5
5
|
import { P as c } from "./PropsContextProvider-CEoxD8yK.js";
|
|
6
6
|
import { u as m } from "./useProps-C7GIMcgB.js";
|
|
7
7
|
import { c as f } from "./clsx-DB4S2d7J.js";
|
|
8
|
-
import { S as p } from "./StatusIcon-
|
|
9
|
-
const
|
|
10
|
-
inlineAlert:
|
|
11
|
-
content:
|
|
8
|
+
import { S as p } from "./StatusIcon-BVWjvT3I.js";
|
|
9
|
+
const u = "flow--inline-alert", d = "flow--inline-alert--content", g = "flow--inline-alert--status-icon", w = "flow--inline-alert--heading", I = "flow--inline-alert--info", N = "flow--inline-alert--warning", h = "flow--inline-alert--danger", A = "flow--inline-alert--success", n = {
|
|
10
|
+
inlineAlert: u,
|
|
11
|
+
content: d,
|
|
12
12
|
statusIcon: g,
|
|
13
13
|
heading: w,
|
|
14
14
|
info: I,
|
|
@@ -18,10 +18,10 @@ const d = "flow--inline-alert", u = "flow--inline-alert--content", g = "flow--in
|
|
|
18
18
|
}, y = (s) => {
|
|
19
19
|
const {
|
|
20
20
|
children: o,
|
|
21
|
-
className:
|
|
22
|
-
|
|
23
|
-
...
|
|
24
|
-
} = m("InlineAlert", s), i = f(n.inlineAlert, n[t],
|
|
21
|
+
className: l,
|
|
22
|
+
status: t = "info",
|
|
23
|
+
...a
|
|
24
|
+
} = m("InlineAlert", s), i = f(n.inlineAlert, n[t], l), r = {
|
|
25
25
|
Heading: {
|
|
26
26
|
className: n.heading,
|
|
27
27
|
level: 3
|
|
@@ -30,7 +30,7 @@ const d = "flow--inline-alert", u = "flow--inline-alert--content", g = "flow--in
|
|
|
30
30
|
className: n.content
|
|
31
31
|
}
|
|
32
32
|
};
|
|
33
|
-
return /* @__PURE__ */ e.createElement("aside", { ...
|
|
33
|
+
return /* @__PURE__ */ e.createElement("aside", { ...a, className: i }, /* @__PURE__ */ e.createElement(p, { className: n.statusIcon, status: t }), /* @__PURE__ */ e.createElement(c, { props: r }, o));
|
|
34
34
|
};
|
|
35
35
|
export {
|
|
36
36
|
y as InlineAlert,
|
package/dist/Navigation.d.ts
CHANGED
|
@@ -1,21 +1,19 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as Aria from 'react-aria-components';
|
|
2
2
|
import { ComponentProps } from 'react';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { default as React_2 } from 'react';
|
|
3
|
+
import { FC } from 'react';
|
|
4
|
+
import { PropsWithChildren } from 'react';
|
|
6
5
|
|
|
7
|
-
declare
|
|
6
|
+
declare const Navigation: FC<NavigationProps>;
|
|
8
7
|
export { Navigation }
|
|
9
8
|
export default Navigation;
|
|
10
9
|
|
|
11
|
-
export declare const NavigationItem:
|
|
10
|
+
export declare const NavigationItem: FC<NavigationItemProps>;
|
|
12
11
|
|
|
13
|
-
export declare interface NavigationItemProps
|
|
12
|
+
export declare interface NavigationItemProps extends PropsWithChildren<Omit<Aria.LinkProps, "children">> {
|
|
14
13
|
isCurrent?: boolean;
|
|
15
|
-
linkComponent?: ComponentType<Omit<ComponentProps<"a">, "ref">>;
|
|
16
14
|
}
|
|
17
15
|
|
|
18
|
-
export declare interface NavigationProps
|
|
16
|
+
export declare interface NavigationProps extends PropsWithChildren<ComponentProps<"nav">> {
|
|
19
17
|
className?: string;
|
|
20
18
|
}
|
|
21
19
|
|
package/dist/Navigation.js
CHANGED
|
@@ -1,53 +1,41 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
3
|
+
import t from "react";
|
|
4
|
+
import { c as r } from "./clsx-DB4S2d7J.js";
|
|
5
5
|
import "./propsContext-Dx7WKmmM.js";
|
|
6
|
-
import { P as
|
|
6
|
+
import { P as m } from "./PropsContextProvider-CEoxD8yK.js";
|
|
7
7
|
import "@react-aria/utils";
|
|
8
|
-
import * as
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
};
|
|
21
|
-
function E(e) {
|
|
22
|
-
const { item: n, state: o } = e, { isCurrent: t, linkComponent: m = "a" } = n.props, i = a.useRef(null), { menuItemProps: s } = C({ key: n.key }, o, i), u = {
|
|
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);
|
|
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 = {
|
|
23
20
|
Text: {
|
|
24
|
-
className:
|
|
21
|
+
className: s.text
|
|
25
22
|
},
|
|
26
23
|
Icon: {
|
|
27
|
-
className:
|
|
24
|
+
className: s.icon
|
|
28
25
|
}
|
|
29
26
|
};
|
|
30
|
-
return /* @__PURE__ */
|
|
31
|
-
|
|
27
|
+
return /* @__PURE__ */ t.createElement("li", null, /* @__PURE__ */ t.createElement(
|
|
28
|
+
v.Link,
|
|
32
29
|
{
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
className: c,
|
|
31
|
+
"aria-current": o ? "page" : !1,
|
|
32
|
+
...i
|
|
36
33
|
},
|
|
37
|
-
/* @__PURE__ */
|
|
34
|
+
/* @__PURE__ */ t.createElement(m, { props: l }, n)
|
|
38
35
|
));
|
|
39
|
-
}
|
|
40
|
-
const d = (e, n, o) => {
|
|
41
|
-
const t = I(e, n, o);
|
|
42
|
-
return t.menuProps = l.omit(t.menuProps, ["role"]), t;
|
|
43
36
|
};
|
|
44
|
-
function $(e) {
|
|
45
|
-
const { className: n } = e, o = p(e), t = a.useRef(null), { menuProps: m } = d(e, o, t), i = N(c.navigation, n);
|
|
46
|
-
return /* @__PURE__ */ a.createElement("nav", { ...m, className: i, ref: t }, /* @__PURE__ */ a.createElement("ul", { className: c.list }, Array.from(o.collection).map((s) => /* @__PURE__ */ a.createElement(E, { state: o, item: s, key: s.key }))));
|
|
47
|
-
}
|
|
48
|
-
const b = v;
|
|
49
37
|
export {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
38
|
+
w as Navigation,
|
|
39
|
+
P as NavigationItem,
|
|
40
|
+
w as default
|
|
53
41
|
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { PropsWithChildren } from 'react';
|
|
3
|
+
|
|
4
|
+
declare type PropsWithStatus<T extends Status = Status, P = unknown> = P & {
|
|
5
|
+
status?: T;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
declare type Status = "info" | "success" | "warning" | "danger";
|
|
9
|
+
|
|
10
|
+
declare const StatusBadge: FC<StatusBadgeProps>;
|
|
11
|
+
export { StatusBadge }
|
|
12
|
+
export default StatusBadge;
|
|
13
|
+
|
|
14
|
+
export declare interface StatusBadgeProps extends PropsWithChildren, PropsWithStatus {
|
|
15
|
+
className?: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export { }
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
/* */
|
|
3
|
+
import t from "react";
|
|
4
|
+
import { c as l } from "./clsx-DB4S2d7J.js";
|
|
5
|
+
import { S as u } from "./StatusIcon-BVWjvT3I.js";
|
|
6
|
+
import { T as d } from "./Text--ofl9X5e.js";
|
|
7
|
+
const g = "flow--status-badge", m = "flow--status-badge--text", f = "flow--status-badge--info", i = "flow--status-badge--success", w = "flow--status-badge--warning", x = "flow--status-badge--danger", s = {
|
|
8
|
+
statusBadge: g,
|
|
9
|
+
text: m,
|
|
10
|
+
info: f,
|
|
11
|
+
success: i,
|
|
12
|
+
warning: w,
|
|
13
|
+
danger: x
|
|
14
|
+
}, E = (e) => {
|
|
15
|
+
const { children: o, className: n, status: a = "info", ...c } = e, r = l(s.statusBadge, s[a], n);
|
|
16
|
+
return /* @__PURE__ */ t.createElement("div", { className: r, ...c }, /* @__PURE__ */ t.createElement(u, { size: "s", className: s.statusIcon, status: a }), /* @__PURE__ */ t.createElement(d, { className: s.text }, o));
|
|
17
|
+
};
|
|
18
|
+
export {
|
|
19
|
+
E as StatusBadge,
|
|
20
|
+
E as default
|
|
21
|
+
};
|
|
@@ -26,8 +26,8 @@ const m = {
|
|
|
26
26
|
info: e,
|
|
27
27
|
success: i,
|
|
28
28
|
warning: u
|
|
29
|
-
}, W = (
|
|
30
|
-
const {
|
|
29
|
+
}, W = (n) => {
|
|
30
|
+
const { status: t = "info", ...o } = n, s = I(m).format(`statusIcon.${t}`), r = g[t];
|
|
31
31
|
return /* @__PURE__ */ a.createElement(r, { "aria-label": s, ...o });
|
|
32
32
|
};
|
|
33
33
|
export {
|
package/dist/StatusIcon.d.ts
CHANGED
|
@@ -7,19 +7,19 @@ declare interface IconProps extends PropsWithChildren<Omit<SvgAttributeProps, "n
|
|
|
7
7
|
size?: "s" | "m" | "l";
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
declare type
|
|
11
|
-
|
|
10
|
+
declare type PropsWithStatus<T extends Status = Status, P = unknown> = P & {
|
|
11
|
+
status?: T;
|
|
12
12
|
};
|
|
13
13
|
|
|
14
|
+
declare type Status = "info" | "success" | "warning" | "danger";
|
|
15
|
+
|
|
14
16
|
declare const StatusIcon: FC<StatusIconProps>;
|
|
15
17
|
export { StatusIcon }
|
|
16
18
|
export default StatusIcon;
|
|
17
19
|
|
|
18
|
-
export declare interface StatusIconProps extends
|
|
20
|
+
export declare interface StatusIconProps extends PropsWithStatus, IconProps {
|
|
19
21
|
}
|
|
20
22
|
|
|
21
23
|
declare type SvgAttributeProps = SVGAttributes<SVGSVGElement>;
|
|
22
24
|
|
|
23
|
-
declare type Variant = "info" | "success" | "warning" | "danger";
|
|
24
|
-
|
|
25
25
|
export { }
|