@mittwald/flow-react-components 0.1.0-alpha.10
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/LICENSE +21 -0
- package/README.md +5 -0
- package/dist/Avatar.d.ts +14 -0
- package/dist/Avatar.js +25 -0
- package/dist/Badge.d.ts +18 -0
- package/dist/Badge.js +33 -0
- package/dist/Button-DibM-vns.js +41 -0
- package/dist/Button.d.ts +15 -0
- package/dist/Button.js +7 -0
- package/dist/Checkbox.d.ts +12 -0
- package/dist/Checkbox.js +71 -0
- package/dist/Content.d.ts +13 -0
- package/dist/Content.js +20 -0
- package/dist/CopyToClipboardButton.d.ts +20 -0
- package/dist/CopyToClipboardButton.js +135 -0
- package/dist/FieldDescription.d.ts +12 -0
- package/dist/FieldDescription.js +18 -0
- package/dist/FieldError-BAnloBK7.js +17 -0
- package/dist/FieldError.d.ts +12 -0
- package/dist/FieldError.js +7 -0
- package/dist/FormField.module-DHK6nIcD.js +12 -0
- package/dist/Heading.d.ts +13 -0
- package/dist/Heading.js +26 -0
- package/dist/Icon-Dp34FFi3.js +55 -0
- package/dist/Icon.d.ts +18 -0
- package/dist/Icon.js +7 -0
- package/dist/Image.d.ts +11 -0
- package/dist/Image.js +11 -0
- package/dist/Initials.d.ts +14 -0
- package/dist/Initials.js +30 -0
- package/dist/Label.d.ts +13 -0
- package/dist/Label.js +26 -0
- package/dist/LabeledValue.d.ts +12 -0
- package/dist/LabeledValue.js +32 -0
- package/dist/Link.d.ts +14 -0
- package/dist/Link.js +25 -0
- package/dist/Navigation.d.ts +22 -0
- package/dist/Navigation.js +53 -0
- package/dist/Note.d.ts +18 -0
- package/dist/Note.js +42 -0
- package/dist/NumberField.d.ts +12 -0
- package/dist/NumberField.js +121 -0
- package/dist/PropsContextProvider-CEoxD8yK.js +26 -0
- package/dist/RadioGroup.d.ts +17 -0
- package/dist/RadioGroup.js +88 -0
- package/dist/StatusIcon-B3kq3jOT.js +118 -0
- package/dist/StatusIcon.d.ts +17 -0
- package/dist/StatusIcon.js +7 -0
- package/dist/Switch.d.ts +16 -0
- package/dist/Switch.js +30 -0
- package/dist/Text-D-bYVFks.js +19 -0
- package/dist/Text.d.ts +12 -0
- package/dist/Text.js +7 -0
- package/dist/TextArea.d.ts +17 -0
- package/dist/TextArea.js +22 -0
- package/dist/TextField.d.ts +17 -0
- package/dist/TextField.js +15 -0
- package/dist/TextFieldBase-Dk6XBF7h.js +28 -0
- package/dist/Tooltip-BqyZAZgK.js +16 -0
- package/dist/Tooltip.d.ts +17 -0
- package/dist/Tooltip.js +9 -0
- package/dist/TooltipTrigger-7-ynWHZ9.js +11 -0
- package/dist/TooltipTrigger.d.ts +12 -0
- package/dist/TooltipTrigger.js +7 -0
- package/dist/clsx-DB4S2d7J.js +24 -0
- package/dist/propsContext-Dx7WKmmM.js +7 -0
- package/dist/styles.css +1 -0
- package/dist/stylesInit.d.ts +4 -0
- package/dist/stylesInit.js +6 -0
- package/dist/useProps-C7GIMcgB.js +27 -0
- package/package.json +132 -0
package/dist/Icon.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BackwardCompatibleOmit } from '@fortawesome/react-fontawesome';
|
|
2
|
+
import { FC } from 'react';
|
|
3
|
+
import { IconLookup } from '@fortawesome/fontawesome-svg-core';
|
|
4
|
+
import { PropsWithChildren } from 'react';
|
|
5
|
+
import { SVGAttributes } from 'react';
|
|
6
|
+
|
|
7
|
+
declare const Icon: FC<IconProps>;
|
|
8
|
+
export { Icon }
|
|
9
|
+
export default Icon;
|
|
10
|
+
|
|
11
|
+
export declare interface IconProps extends PropsWithChildren<SvgAttributeProps> {
|
|
12
|
+
faIcon?: IconLookup;
|
|
13
|
+
fixedWidth?: boolean;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
declare type SvgAttributeProps = BackwardCompatibleOmit<SVGAttributes<SVGSVGElement>, "children" | "mask" | "transform">;
|
|
17
|
+
|
|
18
|
+
export { }
|
package/dist/Icon.js
ADDED
package/dist/Image.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
import { FC } from 'react';
|
|
3
|
+
|
|
4
|
+
declare const Image_2: FC<ImageProps>;
|
|
5
|
+
export { Image_2 as Image }
|
|
6
|
+
export default Image_2;
|
|
7
|
+
|
|
8
|
+
export declare interface ImageProps extends ComponentProps<"img"> {
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export { }
|
package/dist/Image.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
/* */
|
|
3
|
+
import r from "react";
|
|
4
|
+
import "./propsContext-Dx7WKmmM.js";
|
|
5
|
+
import "@react-aria/utils";
|
|
6
|
+
import { u as t } from "./useProps-C7GIMcgB.js";
|
|
7
|
+
const i = (e) => /* @__PURE__ */ r.createElement("img", { ...t("Image", e) });
|
|
8
|
+
export {
|
|
9
|
+
i as Image,
|
|
10
|
+
i as default
|
|
11
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { PropsWithChildren } from 'react';
|
|
3
|
+
|
|
4
|
+
declare const Initials: FC<InitialsProps>;
|
|
5
|
+
export { Initials }
|
|
6
|
+
export default Initials;
|
|
7
|
+
|
|
8
|
+
export declare interface InitialsProps extends PropsWithChildren<{
|
|
9
|
+
children: string;
|
|
10
|
+
}> {
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export { }
|
package/dist/Initials.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
/* */
|
|
3
|
+
import n from "react";
|
|
4
|
+
import { c as m } from "./clsx-DB4S2d7J.js";
|
|
5
|
+
import "./propsContext-Dx7WKmmM.js";
|
|
6
|
+
import "@react-aria/utils";
|
|
7
|
+
import { u as p } from "./useProps-C7GIMcgB.js";
|
|
8
|
+
const f = (t) => {
|
|
9
|
+
let i = 0;
|
|
10
|
+
for (let a = 0; a < t.length; a++)
|
|
11
|
+
i += t.charCodeAt(a);
|
|
12
|
+
return i % 4 + 1;
|
|
13
|
+
}, v = (t) => t.replace(/[^\p{L}\s]/giu, "").split(" ").map((i) => i.trim()[0]).filter((i) => i !== void 0).map((i) => i.toUpperCase()).slice(0, 2), u = "flow--initials", s = {
|
|
14
|
+
initials: u,
|
|
15
|
+
"variant-1": "flow--initials--variant-1",
|
|
16
|
+
"variant-2": "flow--initials--variant-2",
|
|
17
|
+
"variant-3": "flow--initials--variant-3",
|
|
18
|
+
"variant-4": "flow--initials--variant-4"
|
|
19
|
+
}, E = (t) => {
|
|
20
|
+
const { children: i, className: a } = p("Initials", t), r = v(i), l = m(
|
|
21
|
+
s.initials,
|
|
22
|
+
s[`variant-${f(i)}`],
|
|
23
|
+
a
|
|
24
|
+
), e = r.map((o, c) => /* @__PURE__ */ n.createElement("span", { key: c }, o));
|
|
25
|
+
return /* @__PURE__ */ n.createElement("div", { "aria-label": i, className: l }, e);
|
|
26
|
+
};
|
|
27
|
+
export {
|
|
28
|
+
E as Initials,
|
|
29
|
+
E as default
|
|
30
|
+
};
|
package/dist/Label.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as Aria from 'react-aria-components';
|
|
2
|
+
import { FC } from 'react';
|
|
3
|
+
import { PropsWithChildren } from 'react';
|
|
4
|
+
|
|
5
|
+
declare const Label: FC<LabelProps>;
|
|
6
|
+
export { Label }
|
|
7
|
+
export default Label;
|
|
8
|
+
|
|
9
|
+
export declare interface LabelProps extends PropsWithChildren<Omit<Aria.LabelProps, "children">> {
|
|
10
|
+
optional?: boolean;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export { }
|
package/dist/Label.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
/* */
|
|
3
|
+
import i from "react";
|
|
4
|
+
import * as m from "react-aria-components";
|
|
5
|
+
import { c } from "./clsx-DB4S2d7J.js";
|
|
6
|
+
import "./propsContext-Dx7WKmmM.js";
|
|
7
|
+
import "@react-aria/utils";
|
|
8
|
+
import { u as p } from "./useProps-C7GIMcgB.js";
|
|
9
|
+
import { useLocalizedStringFormatter as b } from "react-aria";
|
|
10
|
+
const f = "flow--label", u = {
|
|
11
|
+
label: f
|
|
12
|
+
}, d = {
|
|
13
|
+
"de-DE": {
|
|
14
|
+
"label.optional": "(optional)"
|
|
15
|
+
},
|
|
16
|
+
"en-EN": {
|
|
17
|
+
"label.optional": "(optional)"
|
|
18
|
+
}
|
|
19
|
+
}, h = (o) => {
|
|
20
|
+
const { children: t, className: a, optional: l, ...e } = p("Label", o), r = b(d), s = c(u.label, a), n = " " + r.format("label.optional");
|
|
21
|
+
return /* @__PURE__ */ i.createElement(m.Label, { ...e, className: s }, t, l && n);
|
|
22
|
+
};
|
|
23
|
+
export {
|
|
24
|
+
h as Label,
|
|
25
|
+
h as default
|
|
26
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { PropsWithChildren } from 'react';
|
|
3
|
+
|
|
4
|
+
declare const LabeledValue: FC<LabeledValueProps>;
|
|
5
|
+
export { LabeledValue }
|
|
6
|
+
export default LabeledValue;
|
|
7
|
+
|
|
8
|
+
export declare interface LabeledValueProps extends PropsWithChildren {
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export { }
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
/* */
|
|
3
|
+
import l from "react";
|
|
4
|
+
import { c } from "./clsx-DB4S2d7J.js";
|
|
5
|
+
import "./propsContext-Dx7WKmmM.js";
|
|
6
|
+
import { P as r } from "./PropsContextProvider-CEoxD8yK.js";
|
|
7
|
+
import "@react-aria/utils";
|
|
8
|
+
const p = "flow--labeled-value", m = "flow--labeled-value--copy-button", b = "flow--labeled-value--label", u = "flow--labeled-value--content", e = {
|
|
9
|
+
labeledValue: p,
|
|
10
|
+
copyButton: m,
|
|
11
|
+
label: b,
|
|
12
|
+
content: u
|
|
13
|
+
}, C = (t) => {
|
|
14
|
+
const { children: o, className: a } = t, n = c(e.labeledValue, a), s = {
|
|
15
|
+
Label: {
|
|
16
|
+
className: e.label
|
|
17
|
+
},
|
|
18
|
+
Content: {
|
|
19
|
+
className: e.content
|
|
20
|
+
},
|
|
21
|
+
CopyToClipboard: {
|
|
22
|
+
className: e.copyButton,
|
|
23
|
+
variant: "plain",
|
|
24
|
+
small: !0
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
return /* @__PURE__ */ l.createElement("div", { className: n }, /* @__PURE__ */ l.createElement(r, { props: s }, o));
|
|
28
|
+
};
|
|
29
|
+
export {
|
|
30
|
+
C as LabeledValue,
|
|
31
|
+
C as default
|
|
32
|
+
};
|
package/dist/Link.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as Aria from 'react-aria-components';
|
|
2
|
+
import { FC } from 'react';
|
|
3
|
+
import { PropsWithChildren } from 'react';
|
|
4
|
+
|
|
5
|
+
declare const Link: FC<LinkProps>;
|
|
6
|
+
export { Link }
|
|
7
|
+
export default Link;
|
|
8
|
+
|
|
9
|
+
export declare interface LinkProps extends PropsWithChildren<Omit<Aria.LinkProps, "children">> {
|
|
10
|
+
/** @default "default" */
|
|
11
|
+
variant?: "default" | "danger";
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export { }
|
package/dist/Link.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
/* */
|
|
3
|
+
import e from "react";
|
|
4
|
+
import * as l from "react-aria-components";
|
|
5
|
+
import "./propsContext-Dx7WKmmM.js";
|
|
6
|
+
import "@react-aria/utils";
|
|
7
|
+
import { u as m } from "./useProps-C7GIMcgB.js";
|
|
8
|
+
import { c } from "./clsx-DB4S2d7J.js";
|
|
9
|
+
const p = "flow--link", f = "flow--link--primary", k = "flow--link--danger", r = {
|
|
10
|
+
link: p,
|
|
11
|
+
primary: f,
|
|
12
|
+
danger: k
|
|
13
|
+
}, L = (o) => {
|
|
14
|
+
const {
|
|
15
|
+
children: t,
|
|
16
|
+
className: a,
|
|
17
|
+
variant: n = "default",
|
|
18
|
+
...s
|
|
19
|
+
} = m("Link", o), i = c(r.link, r[n], a);
|
|
20
|
+
return /* @__PURE__ */ e.createElement(l.Link, { className: i, ...s }, t);
|
|
21
|
+
};
|
|
22
|
+
export {
|
|
23
|
+
L as Link,
|
|
24
|
+
L as default
|
|
25
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { AriaMenuProps } from 'react-aria';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
import { ComponentType } from 'react';
|
|
4
|
+
import { ItemProps } from 'react-stately';
|
|
5
|
+
import { default as React_2 } from 'react';
|
|
6
|
+
|
|
7
|
+
declare function Navigation<T extends object>(props: NavigationProps<T>): React_2.JSX.Element;
|
|
8
|
+
export { Navigation }
|
|
9
|
+
export default Navigation;
|
|
10
|
+
|
|
11
|
+
export declare const NavigationItem: ComponentType<NavigationItemProps<never>>;
|
|
12
|
+
|
|
13
|
+
export declare interface NavigationItemProps<T = never> extends ItemProps<T> {
|
|
14
|
+
isCurrent?: boolean;
|
|
15
|
+
linkComponent?: ComponentType<Omit<ComponentProps<"a">, "ref">>;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export declare interface NavigationProps<T = never> extends AriaMenuProps<T> {
|
|
19
|
+
className?: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { }
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
/* */
|
|
3
|
+
import a from "react";
|
|
4
|
+
import { useTreeState as p, Item as v } from "react-stately";
|
|
5
|
+
import "./propsContext-Dx7WKmmM.js";
|
|
6
|
+
import { P as g } from "./PropsContextProvider-CEoxD8yK.js";
|
|
7
|
+
import "@react-aria/utils";
|
|
8
|
+
import * as l from "remeda";
|
|
9
|
+
import { useMenuItem as f, useMenu as I } from "react-aria";
|
|
10
|
+
import { c as N } from "./clsx-DB4S2d7J.js";
|
|
11
|
+
const x = "flow--navigation", c = {
|
|
12
|
+
navigation: x
|
|
13
|
+
}, P = "flow--navigation--navigation-item", y = "flow--navigation--navigation-item--icon", k = "flow--navigation--navigation-item--text", r = {
|
|
14
|
+
navigationItem: P,
|
|
15
|
+
icon: y,
|
|
16
|
+
text: k
|
|
17
|
+
}, C = (e, n, o) => {
|
|
18
|
+
const t = f(e, n, o);
|
|
19
|
+
return t.menuItemProps = l.omit(t.menuItemProps, ["role"]), t;
|
|
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 = {
|
|
23
|
+
Text: {
|
|
24
|
+
className: r.text
|
|
25
|
+
},
|
|
26
|
+
Icon: {
|
|
27
|
+
className: r.icon
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
return /* @__PURE__ */ a.createElement("li", { className: r.navigationItem }, /* @__PURE__ */ a.createElement(
|
|
31
|
+
m,
|
|
32
|
+
{
|
|
33
|
+
...s,
|
|
34
|
+
ref: i,
|
|
35
|
+
"aria-current": t ? "page" : !1
|
|
36
|
+
},
|
|
37
|
+
/* @__PURE__ */ a.createElement(g, { props: u }, n.rendered)
|
|
38
|
+
));
|
|
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
|
+
};
|
|
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
|
+
export {
|
|
50
|
+
$ as Navigation,
|
|
51
|
+
b as NavigationItem,
|
|
52
|
+
$ as default
|
|
53
|
+
};
|
package/dist/Note.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
import { FC } from 'react';
|
|
3
|
+
import { PropsWithChildren } from 'react';
|
|
4
|
+
|
|
5
|
+
declare const Note: FC<NoteProps>;
|
|
6
|
+
export { Note }
|
|
7
|
+
export default Note;
|
|
8
|
+
|
|
9
|
+
export declare interface NoteProps extends PropsWithChildren<ComponentProps<"aside">>, StatusVariantProps<"success"> {
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
declare interface StatusVariantProps<TOmit extends Variant = never> {
|
|
13
|
+
variant?: Exclude<Variant, TOmit>;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
declare type Variant = "info" | "success" | "warning" | "danger";
|
|
17
|
+
|
|
18
|
+
export { }
|
package/dist/Note.js
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
/* */
|
|
3
|
+
import t from "react";
|
|
4
|
+
import "./propsContext-Dx7WKmmM.js";
|
|
5
|
+
import { P as l } from "./PropsContextProvider-CEoxD8yK.js";
|
|
6
|
+
import { u as m } from "./useProps-C7GIMcgB.js";
|
|
7
|
+
import { c as f } from "./clsx-DB4S2d7J.js";
|
|
8
|
+
import { S as d } from "./StatusIcon-B3kq3jOT.js";
|
|
9
|
+
const p = "flow--note", u = "flow--note--custom-icon", g = "flow--note--status-icon", w = "flow--note--content", N = "flow--note--heading", I = "flow--note--info", h = "flow--note--warning", x = "flow--note--danger", o = {
|
|
10
|
+
note: p,
|
|
11
|
+
customIcon: u,
|
|
12
|
+
statusIcon: g,
|
|
13
|
+
content: w,
|
|
14
|
+
heading: N,
|
|
15
|
+
info: I,
|
|
16
|
+
warning: h,
|
|
17
|
+
danger: x
|
|
18
|
+
}, H = (e) => {
|
|
19
|
+
const {
|
|
20
|
+
children: s,
|
|
21
|
+
className: a,
|
|
22
|
+
variant: n = "info",
|
|
23
|
+
...c
|
|
24
|
+
} = m("Note", e), r = f(o.note, o[n], a), i = {
|
|
25
|
+
Icon: {
|
|
26
|
+
className: o.customIcon,
|
|
27
|
+
"aria-hidden": !1
|
|
28
|
+
},
|
|
29
|
+
Heading: {
|
|
30
|
+
className: o.heading,
|
|
31
|
+
level: 3
|
|
32
|
+
},
|
|
33
|
+
Content: {
|
|
34
|
+
className: o.content
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
return /* @__PURE__ */ t.createElement("aside", { ...c, className: r }, /* @__PURE__ */ t.createElement(d, { className: o.statusIcon, variant: n }), /* @__PURE__ */ t.createElement(l, { props: i }, s));
|
|
38
|
+
};
|
|
39
|
+
export {
|
|
40
|
+
H as Note,
|
|
41
|
+
H as default
|
|
42
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as Aria from 'react-aria-components';
|
|
2
|
+
import { FC } from 'react';
|
|
3
|
+
import { PropsWithChildren } from 'react';
|
|
4
|
+
|
|
5
|
+
declare const NumberField: FC<NumberFieldProps>;
|
|
6
|
+
export { NumberField }
|
|
7
|
+
export default NumberField;
|
|
8
|
+
|
|
9
|
+
export declare interface NumberFieldProps extends PropsWithChildren<Omit<Aria.NumberFieldProps, "children">> {
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export { }
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
/* */
|
|
3
|
+
import o from "react";
|
|
4
|
+
import * as s from "react-aria-components";
|
|
5
|
+
import { s as f } from "./FormField.module-DHK6nIcD.js";
|
|
6
|
+
import { c as P } from "./clsx-DB4S2d7J.js";
|
|
7
|
+
import "./propsContext-Dx7WKmmM.js";
|
|
8
|
+
import { P as b } from "./PropsContextProvider-CEoxD8yK.js";
|
|
9
|
+
import "@react-aria/utils";
|
|
10
|
+
import { F as w } from "./FieldError-BAnloBK7.js";
|
|
11
|
+
import { B as d } from "./Button-DibM-vns.js";
|
|
12
|
+
import { I as u } from "./Icon-Dp34FFi3.js";
|
|
13
|
+
const E = "flow--number-field--group", D = "flow--number-field--input", M = "flow--number-field--decrement-button", C = "flow--number-field--increment-button", m = {
|
|
14
|
+
group: E,
|
|
15
|
+
input: D,
|
|
16
|
+
decrementButton: M,
|
|
17
|
+
incrementButton: C
|
|
18
|
+
};
|
|
19
|
+
var v = {};
|
|
20
|
+
(function(e) {
|
|
21
|
+
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
22
|
+
var i = "fas", n = "chevron-up", t = 512, r = 512, a = [], c = "f077", l = "M233.4 105.4c12.5-12.5 32.8-12.5 45.3 0l192 192c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L256 173.3 86.6 342.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l192-192z";
|
|
23
|
+
e.definition = {
|
|
24
|
+
prefix: i,
|
|
25
|
+
iconName: n,
|
|
26
|
+
icon: [
|
|
27
|
+
t,
|
|
28
|
+
r,
|
|
29
|
+
a,
|
|
30
|
+
c,
|
|
31
|
+
l
|
|
32
|
+
]
|
|
33
|
+
}, e.faChevronUp = e.definition, e.prefix = i, e.iconName = n, e.width = t, e.height = r, e.ligatures = a, e.unicode = c, e.svgPathData = l, e.aliases = a;
|
|
34
|
+
})(v);
|
|
35
|
+
var h = {};
|
|
36
|
+
(function(e) {
|
|
37
|
+
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
38
|
+
var i = "fas", n = "chevron-down", t = 512, r = 512, a = [], c = "f078", l = "M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z";
|
|
39
|
+
e.definition = {
|
|
40
|
+
prefix: i,
|
|
41
|
+
iconName: n,
|
|
42
|
+
icon: [
|
|
43
|
+
t,
|
|
44
|
+
r,
|
|
45
|
+
a,
|
|
46
|
+
c,
|
|
47
|
+
l
|
|
48
|
+
]
|
|
49
|
+
}, e.faChevronDown = e.definition, e.prefix = i, e.iconName = n, e.width = t, e.height = r, e.ligatures = a, e.unicode = c, e.svgPathData = l, e.aliases = a;
|
|
50
|
+
})(h);
|
|
51
|
+
var N = {};
|
|
52
|
+
(function(e) {
|
|
53
|
+
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
54
|
+
var i = "fas", n = "plus", t = 448, r = 512, a = [10133, 61543, "add"], c = "2b", l = "M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32V224H48c-17.7 0-32 14.3-32 32s14.3 32 32 32H192V432c0 17.7 14.3 32 32 32s32-14.3 32-32V288H400c17.7 0 32-14.3 32-32s-14.3-32-32-32H256V80z";
|
|
55
|
+
e.definition = {
|
|
56
|
+
prefix: i,
|
|
57
|
+
iconName: n,
|
|
58
|
+
icon: [
|
|
59
|
+
t,
|
|
60
|
+
r,
|
|
61
|
+
a,
|
|
62
|
+
c,
|
|
63
|
+
l
|
|
64
|
+
]
|
|
65
|
+
}, e.faPlus = e.definition, e.prefix = i, e.iconName = n, e.width = t, e.height = r, e.ligatures = a, e.unicode = c, e.svgPathData = l, e.aliases = a;
|
|
66
|
+
})(N);
|
|
67
|
+
var g = {};
|
|
68
|
+
(function(e) {
|
|
69
|
+
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
70
|
+
var i = "fas", n = "minus", t = 448, r = 512, a = [8211, 8722, 10134, "subtract"], c = "f068", l = "M432 256c0 17.7-14.3 32-32 32L48 288c-17.7 0-32-14.3-32-32s14.3-32 32-32l352 0c17.7 0 32 14.3 32 32z";
|
|
71
|
+
e.definition = {
|
|
72
|
+
prefix: i,
|
|
73
|
+
iconName: n,
|
|
74
|
+
icon: [
|
|
75
|
+
t,
|
|
76
|
+
r,
|
|
77
|
+
a,
|
|
78
|
+
c,
|
|
79
|
+
l
|
|
80
|
+
]
|
|
81
|
+
}, e.faMinus = e.definition, e.prefix = i, e.iconName = n, e.width = t, e.height = r, e.ligatures = a, e.unicode = c, e.svgPathData = l, e.aliases = a;
|
|
82
|
+
})(g);
|
|
83
|
+
const L = (e) => {
|
|
84
|
+
const { children: i, className: n, ...t } = e, r = P(f.formField, n), a = {
|
|
85
|
+
Label: {
|
|
86
|
+
className: f.label,
|
|
87
|
+
optional: !e.isRequired
|
|
88
|
+
},
|
|
89
|
+
FieldDescription: {
|
|
90
|
+
className: f.fieldDescription
|
|
91
|
+
},
|
|
92
|
+
FieldError: {
|
|
93
|
+
className: f.customFieldError
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
return /* @__PURE__ */ o.createElement(s.NumberField, { ...t, className: r }, /* @__PURE__ */ o.createElement(s.Group, { className: m.group }, /* @__PURE__ */ o.createElement(
|
|
97
|
+
d,
|
|
98
|
+
{
|
|
99
|
+
slot: "decrement",
|
|
100
|
+
className: m.decrementButton,
|
|
101
|
+
small: !0,
|
|
102
|
+
variant: "plain"
|
|
103
|
+
},
|
|
104
|
+
/* @__PURE__ */ o.createElement(u, { faIcon: h.faChevronDown }),
|
|
105
|
+
/* @__PURE__ */ o.createElement(u, { faIcon: g.faMinus })
|
|
106
|
+
), /* @__PURE__ */ o.createElement(s.Input, { className: m.input }), /* @__PURE__ */ o.createElement(
|
|
107
|
+
d,
|
|
108
|
+
{
|
|
109
|
+
slot: "increment",
|
|
110
|
+
className: m.incrementButton,
|
|
111
|
+
small: !0,
|
|
112
|
+
variant: "plain"
|
|
113
|
+
},
|
|
114
|
+
/* @__PURE__ */ o.createElement(u, { faIcon: v.faChevronUp }),
|
|
115
|
+
/* @__PURE__ */ o.createElement(u, { faIcon: N.faPlus })
|
|
116
|
+
)), /* @__PURE__ */ o.createElement(b, { props: a }, i), /* @__PURE__ */ o.createElement(w, { className: m.fieldError }));
|
|
117
|
+
};
|
|
118
|
+
export {
|
|
119
|
+
L as NumberField,
|
|
120
|
+
L as default
|
|
121
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
/* */
|
|
3
|
+
import m, { useContext as c, useMemo as i } from "react";
|
|
4
|
+
import { p } from "./propsContext-Dx7WKmmM.js";
|
|
5
|
+
import { mergeProps as P } from "@react-aria/utils";
|
|
6
|
+
const d = (r, o) => {
|
|
7
|
+
const t = Object.keys({
|
|
8
|
+
...r,
|
|
9
|
+
...o
|
|
10
|
+
});
|
|
11
|
+
return Object.fromEntries(
|
|
12
|
+
t.map((e) => [
|
|
13
|
+
e,
|
|
14
|
+
P(r[e], o[e])
|
|
15
|
+
])
|
|
16
|
+
);
|
|
17
|
+
}, C = (r) => {
|
|
18
|
+
const { props: o, dependencies: t = [], children: e } = r, s = c(p), n = i(
|
|
19
|
+
() => d(s, o),
|
|
20
|
+
[s, ...t]
|
|
21
|
+
);
|
|
22
|
+
return /* @__PURE__ */ m.createElement(p.Provider, { value: n }, e);
|
|
23
|
+
};
|
|
24
|
+
export {
|
|
25
|
+
C as P
|
|
26
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as Aria from 'react-aria-components';
|
|
2
|
+
import { FC } from 'react';
|
|
3
|
+
import { PropsWithChildren } from 'react';
|
|
4
|
+
|
|
5
|
+
export declare const Radio: FC<RadioProps>;
|
|
6
|
+
|
|
7
|
+
declare const RadioGroup: FC<RadioGroupProps>;
|
|
8
|
+
export { RadioGroup }
|
|
9
|
+
export default RadioGroup;
|
|
10
|
+
|
|
11
|
+
export declare interface RadioGroupProps extends PropsWithChildren<Omit<Aria.RadioGroupProps, "children">> {
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export declare interface RadioProps extends PropsWithChildren<Omit<Aria.RadioProps, "children">> {
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export { }
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
/* */
|
|
3
|
+
import t from "react";
|
|
4
|
+
import * as f from "react-aria-components";
|
|
5
|
+
import { c as m } from "./clsx-DB4S2d7J.js";
|
|
6
|
+
import "./propsContext-Dx7WKmmM.js";
|
|
7
|
+
import { P as u } from "./PropsContextProvider-CEoxD8yK.js";
|
|
8
|
+
import "@react-aria/utils";
|
|
9
|
+
import { F as g } from "./FieldError-BAnloBK7.js";
|
|
10
|
+
import { I as N } from "./Icon-Dp34FFi3.js";
|
|
11
|
+
const v = "flow--radio-group", w = "flow--radio-group--content", C = "flow--radio-group--icon", k = "flow--radio-group--label", E = "flow--radio-group--field-error", b = "flow--radio-group--custom-field-error", P = "flow--radio-group--field-description", n = {
|
|
12
|
+
radioGroup: v,
|
|
13
|
+
content: w,
|
|
14
|
+
icon: C,
|
|
15
|
+
label: k,
|
|
16
|
+
fieldError: E,
|
|
17
|
+
customFieldError: b,
|
|
18
|
+
fieldDescription: P
|
|
19
|
+
}, L = (o) => {
|
|
20
|
+
const { children: e, className: i, ...r } = o, c = m(n.radioGroup, i), a = {
|
|
21
|
+
Label: {
|
|
22
|
+
className: n.label
|
|
23
|
+
},
|
|
24
|
+
FieldDescription: {
|
|
25
|
+
className: n.fieldDescription
|
|
26
|
+
},
|
|
27
|
+
FieldError: {
|
|
28
|
+
className: n.customFieldError
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
return /* @__PURE__ */ t.createElement(f.RadioGroup, { ...r, className: c }, /* @__PURE__ */ t.createElement(u, { props: a }, e), /* @__PURE__ */ t.createElement(g, { className: n.fieldError }));
|
|
32
|
+
}, D = "flow--radio-group--radio", F = "flow--radio-group--radio--content", G = "flow--radio-group--radio--icon", R = "flow--radio-group--radio--checkmark", y = "flow--radio-group--radio--label", l = {
|
|
33
|
+
radio: D,
|
|
34
|
+
content: F,
|
|
35
|
+
icon: G,
|
|
36
|
+
checkmark: R,
|
|
37
|
+
label: y
|
|
38
|
+
};
|
|
39
|
+
var h = {}, p = {};
|
|
40
|
+
(function(o) {
|
|
41
|
+
Object.defineProperty(o, "__esModule", { value: !0 });
|
|
42
|
+
var e = "far", i = "circle-check", r = 512, c = 512, a = [61533, "check-circle"], s = "f058", d = "M256 48a208 208 0 1 1 0 416 208 208 0 1 1 0-416zm0 464A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-111 111-47-47c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l64 64c9.4 9.4 24.6 9.4 33.9 0L369 209z";
|
|
43
|
+
o.definition = {
|
|
44
|
+
prefix: e,
|
|
45
|
+
iconName: i,
|
|
46
|
+
icon: [
|
|
47
|
+
r,
|
|
48
|
+
c,
|
|
49
|
+
a,
|
|
50
|
+
s,
|
|
51
|
+
d
|
|
52
|
+
]
|
|
53
|
+
}, o.faCircleCheck = o.definition, o.prefix = e, o.iconName = i, o.width = r, o.height = c, o.ligatures = a, o.unicode = s, o.svgPathData = d, o.aliases = a;
|
|
54
|
+
})(p);
|
|
55
|
+
(function(o) {
|
|
56
|
+
Object.defineProperty(o, "__esModule", { value: !0 });
|
|
57
|
+
var e = p;
|
|
58
|
+
o.definition = {
|
|
59
|
+
prefix: e.prefix,
|
|
60
|
+
iconName: e.iconName,
|
|
61
|
+
icon: [
|
|
62
|
+
e.width,
|
|
63
|
+
e.height,
|
|
64
|
+
e.aliases,
|
|
65
|
+
e.unicode,
|
|
66
|
+
e.svgPathData
|
|
67
|
+
]
|
|
68
|
+
}, o.faCheckCircle = o.definition, o.prefix = e.prefix, o.iconName = e.iconName, o.width = e.width, o.height = e.height, o.ligatures = e.aliases, o.unicode = e.unicode, o.svgPathData = e.svgPathData, o.aliases = e.aliases;
|
|
69
|
+
})(h);
|
|
70
|
+
const O = (o) => {
|
|
71
|
+
const { children: e, className: i, ...r } = o, c = m(l.radio, i), a = {
|
|
72
|
+
Icon: {
|
|
73
|
+
className: l.icon
|
|
74
|
+
},
|
|
75
|
+
Text: {
|
|
76
|
+
className: l.label
|
|
77
|
+
},
|
|
78
|
+
Content: {
|
|
79
|
+
className: l.content
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
return /* @__PURE__ */ t.createElement(f.Radio, { ...r, className: c }, /* @__PURE__ */ t.createElement(u, { props: a }, e), /* @__PURE__ */ t.createElement(N, { className: l.checkmark, faIcon: h.faCheckCircle }));
|
|
83
|
+
};
|
|
84
|
+
export {
|
|
85
|
+
O as Radio,
|
|
86
|
+
L as RadioGroup,
|
|
87
|
+
L as default
|
|
88
|
+
};
|