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