@cronocode/react-box 1.6.9 → 1.7.1

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 (52) hide show
  1. package/box.js +1 -0
  2. package/components/baseSvg.d.ts +19 -2
  3. package/components/baseSvg.js +19 -0
  4. package/components/button.js +13 -0
  5. package/components/{checkbox.mjs → checkbox.js} +8 -6
  6. package/components/dataGrid.js +32 -0
  7. package/components/{dox.mjs → dox.js} +78 -78
  8. package/components/flex.js +11 -0
  9. package/components/form.js +15 -0
  10. package/components/grid.js +11 -0
  11. package/components/{radioButton.mjs → radioButton.js} +7 -5
  12. package/components/textarea.js +28 -0
  13. package/components/textbox.js +26 -0
  14. package/components/tooltip.js +63 -0
  15. package/package.json +9 -14
  16. package/theme.d.ts +12 -0
  17. package/{plugins.mjs → theme.js} +97 -31
  18. package/utils.js +107 -0
  19. package/box.cjs +0 -1
  20. package/box.mjs +0 -7
  21. package/box.module.css.cjs +0 -1
  22. package/components/baseSvg.cjs +0 -1
  23. package/components/baseSvg.mjs +0 -6
  24. package/components/button.cjs +0 -1
  25. package/components/button.mjs +0 -11
  26. package/components/checkbox.cjs +0 -1
  27. package/components/dataGrid.cjs +0 -1
  28. package/components/dataGrid.mjs +0 -5
  29. package/components/dox.cjs +0 -7
  30. package/components/doxSvg.cjs +0 -1
  31. package/components/doxSvg.d.ts +0 -19
  32. package/components/doxSvg.mjs +0 -18
  33. package/components/flex.cjs +0 -1
  34. package/components/flex.mjs +0 -13
  35. package/components/form.cjs +0 -1
  36. package/components/form.mjs +0 -5
  37. package/components/grid.cjs +0 -1
  38. package/components/grid.mjs +0 -10
  39. package/components/radioButton.cjs +0 -1
  40. package/components/textarea.cjs +0 -1
  41. package/components/textarea.mjs +0 -26
  42. package/components/textbox.cjs +0 -1
  43. package/components/textbox.mjs +0 -24
  44. package/components/tooltip.cjs +0 -1
  45. package/components/tooltip.mjs +0 -6
  46. package/plugins.cjs +0 -209
  47. package/plugins.d.ts +0 -13
  48. package/theme.cjs +0 -1
  49. package/theme.mjs +0 -74
  50. package/utils.cjs +0 -1
  51. package/utils.mjs +0 -97
  52. /package/{box.module.css.mjs → box.module.css.js} +0 -0
package/utils.mjs DELETED
@@ -1,97 +0,0 @@
1
- import "react";
2
- var a;
3
- ((u) => {
4
- function i(...c) {
5
- return c.reduce((s, n) => n ? typeof n == "string" ? (s.push(n), s) : Array.isArray(n) ? (s.push(...i(...n)), s) : (Object.entries(n).forEach(([r, e]) => {
6
- e && s.push(r);
7
- }), s) : s, []);
8
- }
9
- u.classNames = i;
10
- })(a || (a = {}));
11
- const y = a;
12
- class I {
13
- constructor() {
14
- this._index = 0, this._cache = {};
15
- }
16
- getIdentity(i) {
17
- return this._cache[i] || (this._cache[i] = this.getByIndex(this._index++)), this._cache[i];
18
- }
19
- getByIndex(i) {
20
- const { first: c, next: s } = x, n = i - c.length;
21
- if (n < 0)
22
- return c[i];
23
- const r = Math.floor(n / s.length), e = n - r * s.length;
24
- return this.getByIndex(r) + s[e];
25
- }
26
- }
27
- const x = {
28
- first: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
29
- next: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
30
- };
31
- var l;
32
- ((u) => {
33
- function i(s, ...n) {
34
- const r = { ...s }, e = {};
35
- return n.forEach((t) => {
36
- t in r && (e[t] = r[t], delete r[t]);
37
- }), [e, r];
38
- }
39
- u.moveToTagProps = i;
40
- function c(s, n, r) {
41
- const e = { ...s }, t = e.props || {};
42
- return n.forEach((o) => {
43
- if (o in e) {
44
- if (t[o] = e[o], o === "disabled")
45
- return;
46
- delete e[o];
47
- }
48
- }), r && Object.entries(r).forEach(([o, f]) => {
49
- t[o] = f;
50
- }), e.props = t, e;
51
- }
52
- u.buildProps = c;
53
- })(l || (l = {}));
54
- const P = l;
55
- var g;
56
- ((u) => {
57
- function i(s) {
58
- const n = Array.from(s.elements).reduce((r, e) => {
59
- const t = e.name;
60
- return t && (r[t] || (r[t] = []), r[t].push(e)), r;
61
- }, {});
62
- return Object.entries(n).reduce((r, [e, t]) => {
63
- if (t.length === 1) {
64
- const o = t[0];
65
- c(r, e, o.type === "checkbox" || o.type === "radio" ? o.checked : o.value);
66
- } else {
67
- const o = t.reduce((f, h) => (h.type === "checkbox" || h.type === "radio" ? h.checked && f.push(h.value) : f.push(h.value), f), []);
68
- c(r, e, o);
69
- }
70
- return r;
71
- }, {});
72
- }
73
- u.getFormEntries = i;
74
- function c(s, n, r) {
75
- if (n.includes(".")) {
76
- const e = n.split(".");
77
- let t = s;
78
- e.forEach((o, f) => {
79
- if (e.length > f + 1) {
80
- const h = o.match(/^(.+)\[(\d)\]$/);
81
- if (h) {
82
- const [, p, d] = h;
83
- t[p] = t[p] || [], t[p][d] = t[p][d] || {}, t = t[p][d];
84
- } else
85
- t[o] = t[o] || {}, t = t[o];
86
- } else
87
- t[o] = r;
88
- });
89
- } else
90
- s[n] = r;
91
- }
92
- })(g || (g = {}));
93
- export {
94
- y as C,
95
- I,
96
- P as O
97
- };
File without changes