@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.
- package/dist/NumberField.js +54 -40
- package/package.json +2 -2
package/dist/NumberField.js
CHANGED
|
@@ -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
|
|
7
|
-
import { C as
|
|
8
|
-
import { P as
|
|
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
|
|
13
|
-
import { B as
|
|
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
|
|
17
|
-
import { I as
|
|
18
|
-
import { f as
|
|
19
|
-
const
|
|
20
|
-
group:
|
|
21
|
-
input:
|
|
22
|
-
decrementButton:
|
|
23
|
-
incrementButton:
|
|
24
|
-
coarsePointerIcon:
|
|
25
|
-
touchIcon:
|
|
26
|
-
},
|
|
27
|
-
const { children: m, className: c, ref:
|
|
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(
|
|
40
|
-
|
|
43
|
+
return /* @__PURE__ */ e.createElement(N, null, /* @__PURE__ */ e.createElement(
|
|
44
|
+
r.NumberField,
|
|
41
45
|
{
|
|
42
|
-
|
|
43
|
-
className:
|
|
44
|
-
|
|
45
|
-
style: "plain",
|
|
46
|
-
variant: "secondary"
|
|
46
|
+
...i,
|
|
47
|
+
className: u,
|
|
48
|
+
onChange: f
|
|
47
49
|
},
|
|
48
|
-
/* @__PURE__ */ e.createElement(
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
/* @__PURE__ */ e.createElement(
|
|
60
|
-
|
|
61
|
-
|
|
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
|
-
|
|
65
|
-
|
|
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.
|
|
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": "
|
|
319
|
+
"gitHead": "9bdbe8df30140d2017e418b1147b13163857e6fc"
|
|
320
320
|
}
|