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