@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.
@@ -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 r } from "./FormField.module-CqWpTQKP.js";
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 as b, a as F } from "./IconPlus-C-ZCBY15.js";
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", w = "flow--number-field--input", B = "flow--number-field--decrement-button", h = "flow--number-field--increment-button", v = "flow--number-field--coarse-pointer-icon", x = "flow--number-field--touch-icon", o = {
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: w,
23
- decrementButton: B,
24
- incrementButton: h,
25
- coarsePointerIcon: v,
26
- touchIcon: x
27
- }, K = P("NumberField", (n) => {
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: r.label,
29
+ className: o.label,
31
30
  optional: !n.isRequired
32
31
  },
33
32
  FieldDescription: {
34
- className: r.fieldDescription
33
+ className: o.fieldDescription
35
34
  },
36
35
  FieldError: {
37
- className: r.customFieldError
36
+ className: o.customFieldError
38
37
  }
39
38
  };
40
- return /* @__PURE__ */ e.createElement(f, null, /* @__PURE__ */ e.createElement(t.NumberField, { ...l, className: i }, /* @__PURE__ */ e.createElement(t.Group, { className: o.group }, /* @__PURE__ */ e.createElement(
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: o.decrementButton,
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(b, { className: o.coarsePointerIcon })
51
- ), /* @__PURE__ */ e.createElement(t.Input, { className: o.input, ref: s }), /* @__PURE__ */ e.createElement(
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: o.incrementButton,
54
+ className: r.incrementButton,
56
55
  size: "s",
57
56
  variant: "plain",
58
57
  color: "secondary"
59
58
  },
60
- /* @__PURE__ */ e.createElement(I, null),
61
- /* @__PURE__ */ e.createElement(F, { className: o.coarsePointerIcon })
62
- )), /* @__PURE__ */ e.createElement(d, { props: p }, a), /* @__PURE__ */ e.createElement(E, { className: r.fieldError })));
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
- K as NumberField,
66
- K as default
64
+ J as NumberField,
65
+ J as default
67
66
  };
@@ -1,25 +1,29 @@
1
1
  "use client"
2
2
  /* */
3
- import * as u from "react-aria-components";
3
+ import * as w from "react-aria-components";
4
4
  import s from "react";
5
- import w from "clsx";
6
- import { useNumberFormatter as d } from "react-aria";
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 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
- fill: P,
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: z,
19
- success: V,
20
- danger: h,
21
- warning: y
22
- }, R = (e) => {
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 = w(
34
+ } = e, f = d(
31
35
  l,
32
36
  r.progressBar,
33
37
  r[`size-${m}`],
34
38
  r[n]
35
- ), p = d(e.formatOptions), a = c && e.maxValue ? p.format(e.maxValue) : void 0, g = {
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(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 + "%" } }))));
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
- R as ProgressBar,
45
- R as default
48
+ j as ProgressBar,
49
+ j as default
46
50
  };