@mittwald/flow-react-components 0.1.0-alpha.63 → 0.1.0-alpha.64
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/Label-CnhSifzw.js +27 -0
- package/dist/Label.js +1 -1
- package/dist/ProgressBar.js +46 -0
- package/dist/Switch.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/types/components/ProgressBar/ProgressBar.d.ts +10 -0
- package/dist/types/components/ProgressBar/index.d.ts +4 -0
- package/dist/types/components/ProgressBar/stories/Default.stories.d.ts +9 -0
- package/dist/types/components/ProgressBar/stories/Variants.stories.d.ts +10 -0
- package/package.json +7 -3
- package/dist/Label-BBWAOhU5.js +0 -27
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
/* */
|
|
3
|
+
import t from "react";
|
|
4
|
+
import * as p from "react-aria-components";
|
|
5
|
+
import c from "clsx";
|
|
6
|
+
import { C as f } from "./ClearPropsContext-CeCMjUK9.js";
|
|
7
|
+
import "./propsContext-CauylOgH.js";
|
|
8
|
+
import "@react-aria/utils";
|
|
9
|
+
import "remeda";
|
|
10
|
+
import { useLocalizedStringFormatter as b } from "react-aria";
|
|
11
|
+
import { f as C } from "./flowComponent-Dfn_Z9Yx.js";
|
|
12
|
+
const L = "flow--label", d = {
|
|
13
|
+
label: L
|
|
14
|
+
}, u = {
|
|
15
|
+
"de-DE": {
|
|
16
|
+
"label.optional": "(optional)"
|
|
17
|
+
},
|
|
18
|
+
"en-EN": {
|
|
19
|
+
"label.optional": "(optional)"
|
|
20
|
+
}
|
|
21
|
+
}, k = C("Label", (l) => {
|
|
22
|
+
const { children: e, className: o, optional: a, unstyled: r = !1, ...s } = l, n = b(u), m = r ? o : c(d.label, o), i = " " + n.format("label.optional");
|
|
23
|
+
return /* @__PURE__ */ t.createElement(f, null, /* @__PURE__ */ t.createElement(p.Label, { ...s, className: m }, e, a && i));
|
|
24
|
+
});
|
|
25
|
+
export {
|
|
26
|
+
k as L
|
|
27
|
+
};
|
package/dist/Label.js
CHANGED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
/* */
|
|
3
|
+
import * as u from "react-aria-components";
|
|
4
|
+
import s from "react";
|
|
5
|
+
import w from "clsx";
|
|
6
|
+
import { useNumberFormatter as d } from "react-aria";
|
|
7
|
+
import "./propsContext-CauylOgH.js";
|
|
8
|
+
import { P as x } from "./PropsContextProvider-BcOGMJkn.js";
|
|
9
|
+
import "@react-aria/utils";
|
|
10
|
+
import "remeda";
|
|
11
|
+
const N = "flow--progress-bar", v = "flow--progress-bar--label", B = "flow--progress-bar--value", E = "flow--progress-bar--bar", P = "flow--progress-bar--fill", z = "flow--progress-bar--info", V = "flow--progress-bar--success", h = "flow--progress-bar--danger", y = "flow--progress-bar--warning", r = {
|
|
12
|
+
progressBar: N,
|
|
13
|
+
label: v,
|
|
14
|
+
value: B,
|
|
15
|
+
bar: E,
|
|
16
|
+
"size-s": "flow--progress-bar--size-s",
|
|
17
|
+
fill: P,
|
|
18
|
+
info: z,
|
|
19
|
+
success: V,
|
|
20
|
+
danger: h,
|
|
21
|
+
warning: y
|
|
22
|
+
}, R = (e) => {
|
|
23
|
+
const {
|
|
24
|
+
children: t,
|
|
25
|
+
className: l,
|
|
26
|
+
status: n = "info",
|
|
27
|
+
showMaxValue: c,
|
|
28
|
+
size: m = "m",
|
|
29
|
+
...i
|
|
30
|
+
} = e, f = w(
|
|
31
|
+
l,
|
|
32
|
+
r.progressBar,
|
|
33
|
+
r[`size-${m}`],
|
|
34
|
+
r[n]
|
|
35
|
+
), p = d(e.formatOptions), a = c && e.maxValue ? p.format(e.maxValue) : void 0, g = {
|
|
36
|
+
Label: {
|
|
37
|
+
className: r.label,
|
|
38
|
+
unstyled: !0
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
return /* @__PURE__ */ s.createElement(u.ProgressBar, { className: f, ...i }, ({ percentage: b, valueText: o }) => /* @__PURE__ */ s.createElement(x, { props: g }, t, /* @__PURE__ */ s.createElement("span", { className: r.value }, a ? `${o} of ${a}` : o), /* @__PURE__ */ s.createElement("div", { className: r.bar }, /* @__PURE__ */ s.createElement("div", { className: r.fill, style: { width: b + "%" } }))));
|
|
42
|
+
};
|
|
43
|
+
export {
|
|
44
|
+
R as ProgressBar,
|
|
45
|
+
R as default
|
|
46
|
+
};
|
package/dist/Switch.js
CHANGED
|
@@ -12,7 +12,7 @@ import "remeda";
|
|
|
12
12
|
import { f as h } from "./flowComponent-Dfn_Z9Yx.js";
|
|
13
13
|
import { I as p } from "./IconCheck-VQzoZYpg.js";
|
|
14
14
|
import { I as w } from "./IconClose-BkmXvQ2z.js";
|
|
15
|
-
import { L as d } from "./Label-
|
|
15
|
+
import { L as d } from "./Label-CnhSifzw.js";
|
|
16
16
|
const b = "flow--switch--track", E = "flow--switch--handle", C = "flow--switch--label", t = {
|
|
17
17
|
switch: "flow--switch",
|
|
18
18
|
"label-leading": "flow--switch--label-leading",
|