@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.
@@ -1,12 +1,11 @@
1
- import { jsx as s } from "react/jsx-runtime";
2
- import u from "../box.js";
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 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 });
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
- l as default
10
+ f as default
12
11
  };
@@ -1,12 +1,11 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import r from "../box.js";
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 x(i) {
7
- const { inline: o } = i;
8
- return /* @__PURE__ */ t(r, { display: o ? "inline-flex" : "flex", ...i });
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
- x as default
10
+ f as default
12
11
  };
@@ -1,16 +1,15 @@
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";
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 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 });
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
- S as default
14
+ R as default
16
15
  };
@@ -1,27 +1,26 @@
1
- import { jsx as f } from "react/jsx-runtime";
2
- import { forwardRef as h } from "react";
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 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 = {
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: c,
14
- onChange: l,
15
- value: p,
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: e
19
+ ref: o
21
20
  };
22
- return /* @__PURE__ */ f(x, { tag: "input", inline: !0, ...o, props: m });
21
+ return /* @__PURE__ */ f.createElement(C, { tag: "input", inline: !0, ...e, props: m });
23
22
  }
24
- const P = h(C);
23
+ const y = h(x);
25
24
  export {
26
- P as default
25
+ y as default
27
26
  };
@@ -1,27 +1,26 @@
1
- import { jsx as f } from "react/jsx-runtime";
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 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 = {
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: e,
9
+ name: r,
11
10
  disabled: n,
12
11
  placeholder: a,
13
- onInput: i,
14
- onChange: p,
12
+ onInput: u,
13
+ onChange: i,
15
14
  value: d,
16
- autoFocus: u,
17
- readOnly: l,
18
- required: s,
19
- defaultChecked: c,
20
- ref: r
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 P = g(h);
23
+ const y = g(R);
25
24
  export {
26
- P as default
25
+ y as default
27
26
  };
@@ -1,44 +1,43 @@
1
- import { jsx as h } from "react/jsx-runtime";
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(o, e) {
5
+ function T(e, o) {
7
6
  const {
8
7
  props: r,
9
8
  name: t,
10
- disabled: n,
11
- placeholder: a,
9
+ disabled: a,
10
+ placeholder: n,
12
11
  defaultValue: l,
13
- onInput: p,
14
- onChange: s,
15
- rows: i,
16
- cols: m,
17
- autoFocus: u,
18
- maxLength: d,
19
- minLength: c,
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: x
22
- } = o, g = {
20
+ required: g
21
+ } = e, x = {
23
22
  ...r,
24
23
  name: t,
25
- disabled: n,
26
- placeholder: a,
27
- onInput: p,
28
- onChange: s,
24
+ disabled: a,
25
+ placeholder: n,
26
+ onInput: c,
27
+ onChange: p,
29
28
  defaultValue: l,
30
- rows: i,
31
- cols: m,
32
- autoFocus: u,
33
- maxLength: d,
34
- minLength: c,
29
+ rows: s,
30
+ cols: u,
31
+ autoFocus: d,
32
+ maxLength: i,
33
+ minLength: m,
35
34
  readOnly: f,
36
- required: x,
37
- ref: e
35
+ required: g,
36
+ ref: o
38
37
  };
39
- return /* @__PURE__ */ h(C, { tag: "textarea", inline: !0, ...o, props: g });
38
+ return /* @__PURE__ */ h.createElement(C, { tag: "textarea", inline: !0, ...e, props: x });
40
39
  }
41
- const y = w(T);
40
+ const q = w(T);
42
41
  export {
43
- y as default
42
+ q as default
44
43
  };
@@ -1,40 +1,39 @@
1
- import { jsx as x } from "react/jsx-runtime";
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(o, t) {
5
+ function y(e, t) {
7
6
  const {
8
- props: e,
7
+ props: o,
9
8
  name: r,
10
9
  type: n,
11
- disabled: p,
12
- placeholder: a,
10
+ disabled: a,
11
+ placeholder: p,
13
12
  defaultValue: l,
14
13
  onInput: u,
15
- onChange: i,
16
- autoFocus: s,
17
- readOnly: d,
18
- required: m,
19
- step: c
20
- } = o, f = {
21
- ...e,
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: p,
25
- placeholder: a,
23
+ disabled: a,
24
+ placeholder: p,
26
25
  onInput: u,
27
- onChange: i,
26
+ onChange: c,
28
27
  defaultValue: l,
29
- autoFocus: s,
30
- readOnly: d,
31
- required: m,
32
- step: c,
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, ...o, props: f });
34
+ return /* @__PURE__ */ x.createElement(b, { tag: "input", inline: !0, ...e, props: f });
36
35
  }
37
- const j = g(y);
36
+ const P = g(y);
38
37
  export {
39
- j as default
38
+ P as default
40
39
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cronocode/react-box",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "main": "./box.js",
5
5
  "module": "./box.js",
6
6
  "types": "./box.d.ts",