@mittwald/flow-react-components 0.1.0-alpha.290 → 0.1.0-alpha.291
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/NumberField.js +23 -24
- package/dist/ProgressBar.js +23 -19
- package/dist/styles.css +1 -1
- package/package.json +4 -4
package/dist/NumberField.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* */
|
|
3
3
|
import e from "react";
|
|
4
4
|
import * as t from "react-aria-components";
|
|
5
|
-
import { f as
|
|
5
|
+
import { f as o } from "./FormField.module-CqWpTQKP.js";
|
|
6
6
|
import u from "clsx";
|
|
7
7
|
import { C as f } from "./ClearPropsContext-CUvsbMn8.js";
|
|
8
8
|
import { P as d } from "./PropsContextProvider-C6Z4XGp6.js";
|
|
@@ -14,54 +14,53 @@ import { B as m } from "./Button-Da1fC2tj.js";
|
|
|
14
14
|
import "@tabler/icons-react";
|
|
15
15
|
import "./Icon-COqUQ8Af.js";
|
|
16
16
|
import { I as N } from "./IconChevronDown-Cs4gzBPk.js";
|
|
17
|
-
import { I } from "./IconChevronUp-ZykxFQAx.js";
|
|
18
|
-
import { I
|
|
17
|
+
import { I as b } from "./IconChevronUp-ZykxFQAx.js";
|
|
18
|
+
import { I, a as F } from "./IconPlus-C-ZCBY15.js";
|
|
19
19
|
import { f as P } from "./flowComponent-uZXy7sF4.js";
|
|
20
|
-
const C = "flow--number-field--group",
|
|
20
|
+
const C = "flow--number-field--group", B = "flow--number-field--input", w = "flow--number-field--decrement-button", v = "flow--number-field--increment-button", x = "flow--number-field--coarse-pointer-icon", r = {
|
|
21
21
|
group: C,
|
|
22
|
-
input:
|
|
23
|
-
decrementButton:
|
|
24
|
-
incrementButton:
|
|
25
|
-
coarsePointerIcon:
|
|
26
|
-
|
|
27
|
-
},
|
|
28
|
-
const { children: a, className: c, refProp: s, ...l } = n, i = u(r.formField, c), p = {
|
|
22
|
+
input: B,
|
|
23
|
+
decrementButton: w,
|
|
24
|
+
incrementButton: v,
|
|
25
|
+
coarsePointerIcon: x
|
|
26
|
+
}, J = P("NumberField", (n) => {
|
|
27
|
+
const { children: a, className: s, refProp: l, ...c } = n, i = u(o.formField, s), p = {
|
|
29
28
|
Label: {
|
|
30
|
-
className:
|
|
29
|
+
className: o.label,
|
|
31
30
|
optional: !n.isRequired
|
|
32
31
|
},
|
|
33
32
|
FieldDescription: {
|
|
34
|
-
className:
|
|
33
|
+
className: o.fieldDescription
|
|
35
34
|
},
|
|
36
35
|
FieldError: {
|
|
37
|
-
className:
|
|
36
|
+
className: o.customFieldError
|
|
38
37
|
}
|
|
39
38
|
};
|
|
40
|
-
return /* @__PURE__ */ e.createElement(f, null, /* @__PURE__ */ e.createElement(t.NumberField, { ...
|
|
39
|
+
return /* @__PURE__ */ e.createElement(f, null, /* @__PURE__ */ e.createElement(t.NumberField, { ...c, className: i }, /* @__PURE__ */ e.createElement(t.Group, { className: r.group }, /* @__PURE__ */ e.createElement(
|
|
41
40
|
m,
|
|
42
41
|
{
|
|
43
42
|
ariaSlot: "decrement",
|
|
44
|
-
className:
|
|
43
|
+
className: r.decrementButton,
|
|
45
44
|
size: "s",
|
|
46
45
|
variant: "plain",
|
|
47
46
|
color: "secondary"
|
|
48
47
|
},
|
|
49
48
|
/* @__PURE__ */ e.createElement(N, null),
|
|
50
|
-
/* @__PURE__ */ e.createElement(
|
|
51
|
-
), /* @__PURE__ */ e.createElement(t.Input, { className:
|
|
49
|
+
/* @__PURE__ */ e.createElement(I, { className: r.coarsePointerIcon })
|
|
50
|
+
), /* @__PURE__ */ e.createElement(t.Input, { className: r.input, ref: l }), /* @__PURE__ */ e.createElement(
|
|
52
51
|
m,
|
|
53
52
|
{
|
|
54
53
|
ariaSlot: "increment",
|
|
55
|
-
className:
|
|
54
|
+
className: r.incrementButton,
|
|
56
55
|
size: "s",
|
|
57
56
|
variant: "plain",
|
|
58
57
|
color: "secondary"
|
|
59
58
|
},
|
|
60
|
-
/* @__PURE__ */ e.createElement(
|
|
61
|
-
/* @__PURE__ */ e.createElement(F, { className:
|
|
62
|
-
)), /* @__PURE__ */ e.createElement(d, { props: p }, a), /* @__PURE__ */ e.createElement(E, { className:
|
|
59
|
+
/* @__PURE__ */ e.createElement(b, null),
|
|
60
|
+
/* @__PURE__ */ e.createElement(F, { className: r.coarsePointerIcon })
|
|
61
|
+
)), /* @__PURE__ */ e.createElement(d, { props: p }, a), /* @__PURE__ */ e.createElement(E, { className: o.fieldError })));
|
|
63
62
|
});
|
|
64
63
|
export {
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
J as NumberField,
|
|
65
|
+
J as default
|
|
67
66
|
};
|
package/dist/ProgressBar.js
CHANGED
|
@@ -1,25 +1,29 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
|
-
import * as
|
|
3
|
+
import * as w from "react-aria-components";
|
|
4
4
|
import s from "react";
|
|
5
|
-
import
|
|
6
|
-
import { useNumberFormatter as
|
|
5
|
+
import d from "clsx";
|
|
6
|
+
import { useLocalizedStringFormatter as N, useNumberFormatter as v } from "react-aria";
|
|
7
7
|
import "./propsContext-DzAKlmhS.js";
|
|
8
8
|
import { P as x } from "./PropsContextProvider-C6Z4XGp6.js";
|
|
9
9
|
import "@react-aria/utils";
|
|
10
10
|
import "remeda";
|
|
11
|
-
const
|
|
12
|
-
progressBar:
|
|
13
|
-
label:
|
|
14
|
-
value:
|
|
15
|
-
bar:
|
|
16
|
-
fill:
|
|
11
|
+
const B = "flow--progress-bar", E = "flow--progress-bar--label", z = "flow--progress-bar--value", P = "flow--progress-bar--bar", V = "flow--progress-bar--fill", $ = "flow--progress-bar--info", h = "flow--progress-bar--success", y = "flow--progress-bar--danger", C = "flow--progress-bar--warning", r = {
|
|
12
|
+
progressBar: B,
|
|
13
|
+
label: E,
|
|
14
|
+
value: z,
|
|
15
|
+
bar: P,
|
|
16
|
+
fill: V,
|
|
17
17
|
"size-s": "flow--progress-bar--size-s",
|
|
18
|
-
info:
|
|
19
|
-
success:
|
|
20
|
-
danger:
|
|
21
|
-
warning:
|
|
22
|
-
},
|
|
18
|
+
info: $,
|
|
19
|
+
success: h,
|
|
20
|
+
danger: y,
|
|
21
|
+
warning: C
|
|
22
|
+
}, F = { "de-DE": {
|
|
23
|
+
"progressBar.of": "von"
|
|
24
|
+
}, "en-EN": {
|
|
25
|
+
"progressBar.of": "of"
|
|
26
|
+
} }, j = (e) => {
|
|
23
27
|
const {
|
|
24
28
|
children: t,
|
|
25
29
|
className: l,
|
|
@@ -27,20 +31,20 @@ const N = "flow--progress-bar", v = "flow--progress-bar--label", B = "flow--prog
|
|
|
27
31
|
showMaxValue: c,
|
|
28
32
|
size: m = "m",
|
|
29
33
|
...i
|
|
30
|
-
} = e, f =
|
|
34
|
+
} = e, f = d(
|
|
31
35
|
l,
|
|
32
36
|
r.progressBar,
|
|
33
37
|
r[`size-${m}`],
|
|
34
38
|
r[n]
|
|
35
|
-
), p =
|
|
39
|
+
), g = N(F), p = v(e.formatOptions), o = c && e.maxValue ? p.format(e.maxValue) : void 0, b = {
|
|
36
40
|
Label: {
|
|
37
41
|
className: r.label,
|
|
38
42
|
unstyled: !0
|
|
39
43
|
}
|
|
40
44
|
};
|
|
41
|
-
return /* @__PURE__ */ s.createElement(
|
|
45
|
+
return /* @__PURE__ */ s.createElement(w.ProgressBar, { className: f, ...i }, ({ percentage: u, valueText: a }) => /* @__PURE__ */ s.createElement(x, { props: b }, t, /* @__PURE__ */ s.createElement("span", { className: r.value }, o ? `${a} ${g.format("progressBar.of")} ${o}` : a), /* @__PURE__ */ s.createElement("div", { className: r.bar }, /* @__PURE__ */ s.createElement("div", { className: r.fill, style: { width: u + "%" } }))));
|
|
42
46
|
};
|
|
43
47
|
export {
|
|
44
|
-
|
|
45
|
-
|
|
48
|
+
j as ProgressBar,
|
|
49
|
+
j as default
|
|
46
50
|
};
|