@mittwald/flow-react-components 0.1.0-alpha.65 → 0.1.0-alpha.66

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.
Files changed (2) hide show
  1. package/dist/NumberField.js +54 -40
  2. package/package.json +2 -2
@@ -3,28 +3,28 @@
3
3
  import e from "react";
4
4
  import * as r from "react-aria-components";
5
5
  import { s as o } from "./FormField.module-DHK6nIcD.js";
6
- import p from "clsx";
7
- import { C as f } from "./ClearPropsContext-CeCMjUK9.js";
8
- import { P as d } from "./PropsContextProvider-BcOGMJkn.js";
6
+ import E from "clsx";
7
+ import { C as N } from "./ClearPropsContext-CeCMjUK9.js";
8
+ import { P as b } from "./PropsContextProvider-BcOGMJkn.js";
9
9
  import "@react-aria/utils";
10
10
  import "./propsContext-CauylOgH.js";
11
11
  import "remeda";
12
- import { F as E } from "./FieldError-CBxCl2nS.js";
13
- import { B as s } from "./Button-CdGfSPx-.js";
12
+ import { F as I } from "./FieldError-CBxCl2nS.js";
13
+ import { B as a } from "./Button-CdGfSPx-.js";
14
14
  import "@tabler/icons-react";
15
15
  import "./Icon-DVRBNZZe.js";
16
- import { I as N } from "./IconChevronDown-D8WRADYa.js";
17
- import { I as b, a as I, b as C } from "./IconPlus-WchYGpT1.js";
18
- import { f as F } from "./flowComponent-CEo3pjEA.js";
19
- const P = "flow--number-field--group", w = "flow--number-field--input", B = "flow--number-field--decrement-button", h = "flow--number-field--increment-button", y = "flow--number-field--coarse-pointer-icon", v = "flow--number-field--touch-icon", t = {
20
- group: P,
21
- input: w,
22
- decrementButton: B,
23
- incrementButton: h,
24
- coarsePointerIcon: y,
25
- touchIcon: v
26
- }, J = F("NumberField", (n) => {
27
- const { children: m, className: c, ref: a, ...l } = n, i = p(o.formField, c), u = {
16
+ import { I as C } from "./IconChevronDown-D8WRADYa.js";
17
+ import { I as h, a as F, b as P } from "./IconPlus-WchYGpT1.js";
18
+ import { f as w } from "./flowComponent-CEo3pjEA.js";
19
+ const B = "flow--number-field--group", g = "flow--number-field--input", y = "flow--number-field--decrement-button", v = "flow--number-field--increment-button", x = "flow--number-field--coarse-pointer-icon", D = "flow--number-field--touch-icon", t = {
20
+ group: B,
21
+ input: g,
22
+ decrementButton: y,
23
+ incrementButton: v,
24
+ coarsePointerIcon: x,
25
+ touchIcon: D
26
+ }, K = w("NumberField", (n) => {
27
+ const { children: m, className: c, ref: l, onChange: s, ...i } = n, u = E(o.formField, c), p = {
28
28
  Label: {
29
29
  className: o.label,
30
30
  optional: !n.isRequired
@@ -35,32 +35,46 @@ const P = "flow--number-field--group", w = "flow--number-field--input", B = "flo
35
35
  FieldError: {
36
36
  className: o.customFieldError
37
37
  }
38
+ }, f = (d) => {
39
+ setTimeout(() => {
40
+ s && s(d);
41
+ }, 150);
38
42
  };
39
- return /* @__PURE__ */ e.createElement(f, null, /* @__PURE__ */ e.createElement(r.NumberField, { ...l, className: i }, /* @__PURE__ */ e.createElement(r.Group, { className: t.group }, /* @__PURE__ */ e.createElement(
40
- s,
43
+ return /* @__PURE__ */ e.createElement(N, null, /* @__PURE__ */ e.createElement(
44
+ r.NumberField,
41
45
  {
42
- slot: "decrement",
43
- className: t.decrementButton,
44
- size: "s",
45
- style: "plain",
46
- variant: "secondary"
46
+ ...i,
47
+ className: u,
48
+ onChange: f
47
49
  },
48
- /* @__PURE__ */ e.createElement(N, null),
49
- /* @__PURE__ */ e.createElement(b, { className: t.coarsePointerIcon })
50
- ), /* @__PURE__ */ e.createElement(r.Input, { className: t.input, ref: a }), /* @__PURE__ */ e.createElement(
51
- s,
52
- {
53
- slot: "increment",
54
- className: t.incrementButton,
55
- size: "s",
56
- style: "plain",
57
- variant: "secondary"
58
- },
59
- /* @__PURE__ */ e.createElement(I, null),
60
- /* @__PURE__ */ e.createElement(C, { className: t.coarsePointerIcon })
61
- )), /* @__PURE__ */ e.createElement(d, { props: u }, m), /* @__PURE__ */ e.createElement(E, { className: o.fieldError })));
50
+ /* @__PURE__ */ e.createElement(r.Group, { className: t.group }, /* @__PURE__ */ e.createElement(
51
+ a,
52
+ {
53
+ slot: "decrement",
54
+ className: t.decrementButton,
55
+ size: "s",
56
+ style: "plain",
57
+ variant: "secondary"
58
+ },
59
+ /* @__PURE__ */ e.createElement(C, null),
60
+ /* @__PURE__ */ e.createElement(h, { className: t.coarsePointerIcon })
61
+ ), /* @__PURE__ */ e.createElement(r.Input, { className: t.input, ref: l }), /* @__PURE__ */ e.createElement(
62
+ a,
63
+ {
64
+ slot: "increment",
65
+ className: t.incrementButton,
66
+ size: "s",
67
+ style: "plain",
68
+ variant: "secondary"
69
+ },
70
+ /* @__PURE__ */ e.createElement(F, null),
71
+ /* @__PURE__ */ e.createElement(P, { className: t.coarsePointerIcon })
72
+ )),
73
+ /* @__PURE__ */ e.createElement(b, { props: p }, m),
74
+ /* @__PURE__ */ e.createElement(I, { className: o.fieldError })
75
+ ));
62
76
  });
63
77
  export {
64
- J as NumberField,
65
- J as default
78
+ K as NumberField,
79
+ K as default
66
80
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mittwald/flow-react-components",
3
- "version": "0.1.0-alpha.65",
3
+ "version": "0.1.0-alpha.66",
4
4
  "type": "module",
5
5
  "description": "A React implementation of Flow, mittwald’s design system",
6
6
  "homepage": "https://mittwald.github.io/flow",
@@ -316,5 +316,5 @@
316
316
  "optional": true
317
317
  }
318
318
  },
319
- "gitHead": "000868d3499fd78147a5a50f1d5e6571c18527b7"
319
+ "gitHead": "9bdbe8df30140d2017e418b1147b13163857e6fc"
320
320
  }