@cronocode/react-box 1.1.0 → 1.1.2
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/components/buttonCore.js +6 -7
- package/components/flex.js +6 -7
- package/components/formAsync.js +11 -12
- package/components/uncontrolledCheckboxCore.js +11 -12
- package/components/uncontrolledRadioButtonCore.js +14 -15
- package/components/uncontrolledTextareaCore.js +27 -28
- package/components/uncontrolledTextboxCore.js +22 -23
- package/package.json +1 -1
package/components/buttonCore.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import "react";
|
|
1
|
+
import a from "react";
|
|
2
|
+
import s from "../box.js";
|
|
4
3
|
import "../box.module.css.js";
|
|
5
4
|
import "../utils/utils.js";
|
|
6
|
-
function
|
|
7
|
-
const { tag: o, type: r, onClick:
|
|
8
|
-
return /* @__PURE__ */ s
|
|
5
|
+
function f(t) {
|
|
6
|
+
const { tag: o, type: r, onClick: e, disabled: n, props: p } = t, i = { ...p, type: r || "button", onClick: e, disabled: n };
|
|
7
|
+
return /* @__PURE__ */ a.createElement(s, { tag: o || "button", cursor: "pointer", inline: !0, ...t, props: i });
|
|
9
8
|
}
|
|
10
9
|
export {
|
|
11
|
-
|
|
10
|
+
f as default
|
|
12
11
|
};
|
package/components/flex.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import "react";
|
|
1
|
+
import i from "react";
|
|
2
|
+
import n from "../box.js";
|
|
4
3
|
import "../box.module.css.js";
|
|
5
4
|
import "../utils/utils.js";
|
|
6
|
-
function
|
|
7
|
-
const { inline:
|
|
8
|
-
return /* @__PURE__ */
|
|
5
|
+
function f(e) {
|
|
6
|
+
const { inline: t } = e;
|
|
7
|
+
return /* @__PURE__ */ i.createElement(n, { display: t ? "inline-flex" : "flex", ...e });
|
|
9
8
|
}
|
|
10
9
|
export {
|
|
11
|
-
|
|
10
|
+
f as default
|
|
12
11
|
};
|
package/components/formAsync.js
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { F as c } from "../utils/utils.js";
|
|
1
|
+
import f, { useRef as c, useCallback as u } from "react";
|
|
2
|
+
import i from "../box.js";
|
|
3
|
+
import { F as p } from "../utils/utils.js";
|
|
5
4
|
import "../box.module.css.js";
|
|
6
|
-
function
|
|
7
|
-
const { onSubmit:
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
}, []),
|
|
12
|
-
return /* @__PURE__ */ i
|
|
5
|
+
function R(o) {
|
|
6
|
+
const { onSubmit: e, props: n } = o, t = c(null), m = u((r) => {
|
|
7
|
+
r.preventDefault();
|
|
8
|
+
const a = p.getFormEntries(t.current);
|
|
9
|
+
e(a, r);
|
|
10
|
+
}, []), s = { ...n, onSubmit: m, ref: t };
|
|
11
|
+
return /* @__PURE__ */ f.createElement(i, { tag: "form", ...o, props: s });
|
|
13
12
|
}
|
|
14
13
|
export {
|
|
15
|
-
|
|
14
|
+
R as default
|
|
16
15
|
};
|
|
@@ -1,27 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import x from "../box.js";
|
|
1
|
+
import f, { forwardRef as h } from "react";
|
|
2
|
+
import C from "../box.js";
|
|
4
3
|
import "../box.module.css.js";
|
|
5
4
|
import "../utils/utils.js";
|
|
6
|
-
function
|
|
7
|
-
const { props: r, name: t, disabled: n, placeholder: a, value:
|
|
5
|
+
function x(e, o) {
|
|
6
|
+
const { props: r, name: t, disabled: n, placeholder: a, value: c, onInput: l, onChange: p, autoFocus: u, readOnly: d, required: i, defaultChecked: s } = e, m = {
|
|
8
7
|
...r,
|
|
9
8
|
type: "checkbox",
|
|
10
9
|
name: t,
|
|
11
10
|
disabled: n,
|
|
12
11
|
placeholder: a,
|
|
13
|
-
onInput:
|
|
14
|
-
onChange:
|
|
15
|
-
value:
|
|
12
|
+
onInput: l,
|
|
13
|
+
onChange: p,
|
|
14
|
+
value: c,
|
|
16
15
|
autoFocus: u,
|
|
17
16
|
readOnly: d,
|
|
18
17
|
required: i,
|
|
19
18
|
defaultChecked: s,
|
|
20
|
-
ref:
|
|
19
|
+
ref: o
|
|
21
20
|
};
|
|
22
|
-
return /* @__PURE__ */ f(
|
|
21
|
+
return /* @__PURE__ */ f.createElement(C, { tag: "input", inline: !0, ...e, props: m });
|
|
23
22
|
}
|
|
24
|
-
const
|
|
23
|
+
const y = h(x);
|
|
25
24
|
export {
|
|
26
|
-
|
|
25
|
+
y as default
|
|
27
26
|
};
|
|
@@ -1,27 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { forwardRef as g } from "react";
|
|
1
|
+
import f, { forwardRef as g } from "react";
|
|
3
2
|
import C from "../box.js";
|
|
4
3
|
import "../box.module.css.js";
|
|
5
4
|
import "../utils/utils.js";
|
|
6
|
-
function
|
|
7
|
-
const { props: t, name:
|
|
5
|
+
function R(o, e) {
|
|
6
|
+
const { props: t, name: r, disabled: n, placeholder: a, value: d, onInput: u, onChange: i, autoFocus: l, readOnly: p, required: c, defaultChecked: s } = o, m = {
|
|
8
7
|
...t,
|
|
9
8
|
type: "radio",
|
|
10
|
-
name:
|
|
9
|
+
name: r,
|
|
11
10
|
disabled: n,
|
|
12
11
|
placeholder: a,
|
|
13
|
-
onInput:
|
|
14
|
-
onChange:
|
|
12
|
+
onInput: u,
|
|
13
|
+
onChange: i,
|
|
15
14
|
value: d,
|
|
16
|
-
autoFocus:
|
|
17
|
-
readOnly:
|
|
18
|
-
required:
|
|
19
|
-
defaultChecked:
|
|
20
|
-
ref:
|
|
15
|
+
autoFocus: l,
|
|
16
|
+
readOnly: p,
|
|
17
|
+
required: c,
|
|
18
|
+
defaultChecked: s,
|
|
19
|
+
ref: e
|
|
21
20
|
};
|
|
22
|
-
return /* @__PURE__ */ f(C, { tag: "input", inline: !0, ...o, props: m });
|
|
21
|
+
return /* @__PURE__ */ f.createElement(C, { tag: "input", inline: !0, ...o, props: m });
|
|
23
22
|
}
|
|
24
|
-
const
|
|
23
|
+
const y = g(R);
|
|
25
24
|
export {
|
|
26
|
-
|
|
25
|
+
y as default
|
|
27
26
|
};
|
|
@@ -1,44 +1,43 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { forwardRef as w } from "react";
|
|
1
|
+
import h, { forwardRef as w } from "react";
|
|
3
2
|
import C from "../box.js";
|
|
4
3
|
import "../box.module.css.js";
|
|
5
4
|
import "../utils/utils.js";
|
|
6
|
-
function T(
|
|
5
|
+
function T(e, o) {
|
|
7
6
|
const {
|
|
8
7
|
props: r,
|
|
9
8
|
name: t,
|
|
10
|
-
disabled:
|
|
11
|
-
placeholder:
|
|
9
|
+
disabled: a,
|
|
10
|
+
placeholder: n,
|
|
12
11
|
defaultValue: l,
|
|
13
|
-
onInput:
|
|
14
|
-
onChange:
|
|
15
|
-
rows:
|
|
16
|
-
cols:
|
|
17
|
-
autoFocus:
|
|
18
|
-
maxLength:
|
|
19
|
-
minLength:
|
|
12
|
+
onInput: c,
|
|
13
|
+
onChange: p,
|
|
14
|
+
rows: s,
|
|
15
|
+
cols: u,
|
|
16
|
+
autoFocus: d,
|
|
17
|
+
maxLength: i,
|
|
18
|
+
minLength: m,
|
|
20
19
|
readOnly: f,
|
|
21
|
-
required:
|
|
22
|
-
} =
|
|
20
|
+
required: g
|
|
21
|
+
} = e, x = {
|
|
23
22
|
...r,
|
|
24
23
|
name: t,
|
|
25
|
-
disabled:
|
|
26
|
-
placeholder:
|
|
27
|
-
onInput:
|
|
28
|
-
onChange:
|
|
24
|
+
disabled: a,
|
|
25
|
+
placeholder: n,
|
|
26
|
+
onInput: c,
|
|
27
|
+
onChange: p,
|
|
29
28
|
defaultValue: l,
|
|
30
|
-
rows:
|
|
31
|
-
cols:
|
|
32
|
-
autoFocus:
|
|
33
|
-
maxLength:
|
|
34
|
-
minLength:
|
|
29
|
+
rows: s,
|
|
30
|
+
cols: u,
|
|
31
|
+
autoFocus: d,
|
|
32
|
+
maxLength: i,
|
|
33
|
+
minLength: m,
|
|
35
34
|
readOnly: f,
|
|
36
|
-
required:
|
|
37
|
-
ref:
|
|
35
|
+
required: g,
|
|
36
|
+
ref: o
|
|
38
37
|
};
|
|
39
|
-
return /* @__PURE__ */ h(C, { tag: "textarea", inline: !0, ...
|
|
38
|
+
return /* @__PURE__ */ h.createElement(C, { tag: "textarea", inline: !0, ...e, props: x });
|
|
40
39
|
}
|
|
41
|
-
const
|
|
40
|
+
const q = w(T);
|
|
42
41
|
export {
|
|
43
|
-
|
|
42
|
+
q as default
|
|
44
43
|
};
|
|
@@ -1,40 +1,39 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { forwardRef as g } from "react";
|
|
1
|
+
import x, { forwardRef as g } from "react";
|
|
3
2
|
import b from "../box.js";
|
|
4
3
|
import "../box.module.css.js";
|
|
5
4
|
import "../utils/utils.js";
|
|
6
|
-
function y(
|
|
5
|
+
function y(e, t) {
|
|
7
6
|
const {
|
|
8
|
-
props:
|
|
7
|
+
props: o,
|
|
9
8
|
name: r,
|
|
10
9
|
type: n,
|
|
11
|
-
disabled:
|
|
12
|
-
placeholder:
|
|
10
|
+
disabled: a,
|
|
11
|
+
placeholder: p,
|
|
13
12
|
defaultValue: l,
|
|
14
13
|
onInput: u,
|
|
15
|
-
onChange:
|
|
16
|
-
autoFocus:
|
|
17
|
-
readOnly:
|
|
18
|
-
required:
|
|
19
|
-
step:
|
|
20
|
-
} =
|
|
21
|
-
...
|
|
14
|
+
onChange: c,
|
|
15
|
+
autoFocus: d,
|
|
16
|
+
readOnly: i,
|
|
17
|
+
required: s,
|
|
18
|
+
step: m
|
|
19
|
+
} = e, f = {
|
|
20
|
+
...o,
|
|
22
21
|
type: n || "text",
|
|
23
22
|
name: r,
|
|
24
|
-
disabled:
|
|
25
|
-
placeholder:
|
|
23
|
+
disabled: a,
|
|
24
|
+
placeholder: p,
|
|
26
25
|
onInput: u,
|
|
27
|
-
onChange:
|
|
26
|
+
onChange: c,
|
|
28
27
|
defaultValue: l,
|
|
29
|
-
autoFocus:
|
|
30
|
-
readOnly:
|
|
31
|
-
required:
|
|
32
|
-
step:
|
|
28
|
+
autoFocus: d,
|
|
29
|
+
readOnly: i,
|
|
30
|
+
required: s,
|
|
31
|
+
step: m,
|
|
33
32
|
ref: t
|
|
34
33
|
};
|
|
35
|
-
return /* @__PURE__ */ x(b, { tag: "input", inline: !0, ...
|
|
34
|
+
return /* @__PURE__ */ x.createElement(b, { tag: "input", inline: !0, ...e, props: f });
|
|
36
35
|
}
|
|
37
|
-
const
|
|
36
|
+
const P = g(y);
|
|
38
37
|
export {
|
|
39
|
-
|
|
38
|
+
P as default
|
|
40
39
|
};
|