@cronocode/react-box 1.2.5 → 1.2.7

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.
Files changed (34) hide show
  1. package/box.mjs +6 -6
  2. package/components/baseSvg.mjs +22 -2
  3. package/{src/components → components}/buttonCore.d.ts +0 -1
  4. package/components/buttonCore.mjs +11 -8
  5. package/components/checkboxCore.mjs +10 -7
  6. package/{src/components → components}/flex.d.ts +1 -2
  7. package/components/flex.mjs +9 -2
  8. package/{src/components → components}/formAsync.d.ts +1 -2
  9. package/components/formAsync.mjs +15 -4
  10. package/components/radioButtonCore.mjs +9 -6
  11. package/components/textareaCore.mjs +10 -7
  12. package/components/textbox.mjs +10 -7
  13. package/components/textboxCore.mjs +10 -7
  14. package/package.json +13 -13
  15. package/style.css +1 -1
  16. package/{src/theme.d.ts → theme.d.ts} +1 -1
  17. package/theme.mjs +21 -21
  18. package/{src/utils → utils}/object/objectUtils.d.ts +356 -356
  19. package/utils/utils.mjs +57 -45
  20. package/buildHelpers/mixins/boxStyles.d.ts +0 -4
  21. package/buildHelpers/mixins/svgStyles.d.ts +0 -4
  22. package/buildHelpers/plugins/moduleCssPlugin.d.ts +0 -2
  23. package/dev/main.d.ts +0 -0
  24. package/src/index.d.ts +0 -0
  25. /package/{src/box.d.ts → box.d.ts} +0 -0
  26. /package/{src/components → components}/baseSvg.d.ts +0 -0
  27. /package/{src/components → components}/checkboxCore.d.ts +0 -0
  28. /package/{src/components → components}/radioButtonCore.d.ts +0 -0
  29. /package/{src/components → components}/textareaCore.d.ts +0 -0
  30. /package/{src/components → components}/textbox.d.ts +0 -0
  31. /package/{src/components → components}/textboxCore.d.ts +0 -0
  32. /package/{src/types.d.ts → types.d.ts} +0 -0
  33. /package/{src/utils → utils}/className/classNameUtils.d.ts +0 -0
  34. /package/{src/utils → utils}/form/formUtils.d.ts +0 -0
package/utils/utils.mjs CHANGED
@@ -1,4 +1,4 @@
1
- const C = {
1
+ const h = {
2
2
  hover: "_h",
3
3
  focus: "_f",
4
4
  shadow: "shadow_",
@@ -33,75 +33,87 @@ const C = {
33
33
  outlineColorH: "outlineColor_h_",
34
34
  outlineColorF: "outlineColor_f_",
35
35
  outlineColorA: "outlineColor_a_"
36
+ }, C = {
37
+ fill: "fill_",
38
+ fillH: "fill_h_",
39
+ fillF: "fill_f_",
40
+ fillA: "fill_a_",
41
+ stroke: "stroke_",
42
+ strokeH: "stroke_h_",
43
+ strokeF: "stroke_f_",
44
+ strokeA: "stroke_a_"
36
45
  };
37
- var a;
38
- ((c) => {
39
- function s(...i) {
40
- return i.reduce((t, _) => _ ? typeof _ == "string" ? (t.push(_), t) : Array.isArray(_) ? (t.push(...s(..._)), t) : (Object.entries(_).forEach(([r, e]) => {
41
- e && t.push(r);
42
- }), t) : t, []);
46
+ var f;
47
+ ((n) => {
48
+ function c(...i) {
49
+ return i.reduce((l, _) => _ ? typeof _ == "string" ? (l.push(_), l) : Array.isArray(_) ? (l.push(...c(..._)), l) : (Object.entries(_).forEach(([r, e]) => {
50
+ e && l.push(r);
51
+ }), l) : l, []);
43
52
  }
44
- c.classNames = s;
45
- })(a || (a = {}));
46
- const f = a;
47
- var d;
48
- ((c) => {
49
- function s(t, ..._) {
50
- const r = { ...t }, e = {};
53
+ n.classNames = c;
54
+ })(f || (f = {}));
55
+ const p = f;
56
+ var g;
57
+ ((n) => {
58
+ function c(l, ..._) {
59
+ const r = { ...l }, e = {};
51
60
  return _.forEach((o) => {
52
61
  o in r && (e[o] = r[o], delete r[o]);
53
62
  }), [e, r];
54
63
  }
55
- c.moveToTagProps = s;
56
- function i(t, _, r) {
57
- const e = { ...r, ...t }, o = { ...t.props };
58
- return _.forEach((l) => {
59
- l in e && (o[l] = e[l], delete e[l]);
64
+ n.moveToTagProps = c;
65
+ function i(l, _, r) {
66
+ const e = { ...r, ...l }, o = { ...l.props };
67
+ return _.forEach((t) => {
68
+ t in e && (o[t] = e[t], delete e[t]);
60
69
  }), e.props = o, e;
61
70
  }
62
- c.buildProps = i;
63
- })(d || (d = {}));
64
- const p = d;
65
- var h;
66
- ((c) => {
67
- function s(t) {
68
- const _ = Array.from(t.elements).reduce((r, e) => {
71
+ n.buildProps = i;
72
+ })(g || (g = {}));
73
+ const F = g;
74
+ var d;
75
+ ((n) => {
76
+ function c(l) {
77
+ const _ = Array.from(l.elements).reduce((r, e) => {
69
78
  const o = e.name;
70
79
  return o && (r[o] || (r[o] = []), r[o].push(e)), r;
71
80
  }, {});
72
81
  return Object.entries(_).reduce((r, [e, o]) => {
73
82
  if (o.length === 1) {
74
- const l = o[0];
75
- i(r, e, l.type === "checkbox" || l.type === "radio" ? l.checked : l.value);
83
+ const t = o[0];
84
+ i(r, e, t.type === "checkbox" || t.type === "radio" ? t.checked : t.value);
76
85
  } else {
77
- const l = o.reduce((b, n) => (n.type === "checkbox" || n.type === "radio" ? n.checked && b.push(n.value) : b.push(n.value), b), []);
78
- i(r, e, l);
86
+ const t = o.reduce((a, s) => (s.type === "checkbox" || s.type === "radio" ? s.checked && a.push(s.value) : a.push(s.value), a), []);
87
+ i(r, e, t);
79
88
  }
80
89
  return r;
81
90
  }, {});
82
91
  }
83
- c.getFormEntries = s;
84
- function i(t, _, r) {
92
+ n.getFormEntries = c;
93
+ function i(l, _, r) {
85
94
  if (_.includes(".")) {
86
95
  const e = _.split(".");
87
- let o = t;
88
- e.forEach((l, b) => {
89
- if (e.length > b + 1) {
90
- const n = l.match(/^(.+)\[(\d)\]$/);
91
- if (n) {
92
- const [, u, g] = n;
93
- o[u] = o[u] || [], o[u][g] = o[u][g] || {}, o = o[u][g];
96
+ let o = l;
97
+ e.forEach((t, a) => {
98
+ if (e.length > a + 1) {
99
+ const s = t.match(/^(.+)\[(\d)\]$/);
100
+ if (s) {
101
+ const [, b, u] = s;
102
+ o[b] = o[b] || [], o[b][u] = o[b][u] || {}, o = o[b][u];
94
103
  } else
95
- o[l] = o[l] || {}, o = o[l];
104
+ o[t] = o[t] || {}, o = o[t];
96
105
  } else
97
- o[l] = r;
106
+ o[t] = r;
98
107
  });
99
108
  } else
100
- t[_] = r;
109
+ l[_] = r;
101
110
  }
102
- })(h || (h = {}));
111
+ })(d || (d = {}));
112
+ const k = d;
103
113
  export {
104
- f as C,
105
- p as O,
114
+ p as C,
115
+ k as F,
116
+ F as O,
117
+ h as a,
106
118
  C as t
107
119
  };
@@ -1,4 +0,0 @@
1
- declare const _default: {
2
- boxStyles: (_mixin: any) => {};
3
- };
4
- export default _default;
@@ -1,4 +0,0 @@
1
- declare const _default: {
2
- svgStyles: (_mixin: any) => {};
3
- };
4
- export default _default;
@@ -1,2 +0,0 @@
1
- import { PluginOption } from 'vite';
2
- export default function moduleCssPlugin(jsonCache: Record<string, Record<string, string>>): PluginOption;
package/dev/main.d.ts DELETED
File without changes
package/src/index.d.ts DELETED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes