@cronocode/react-box 1.2.3 → 1.2.4
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/box.mjs +6 -6
- package/buildHelpers/mixins/boxStyles.d.ts +4 -0
- package/buildHelpers/mixins/svgStyles.d.ts +4 -0
- package/buildHelpers/plugins/moduleCssPlugin.d.ts +2 -0
- package/components/baseSvg.mjs +2 -22
- package/components/buttonCore.mjs +8 -11
- package/components/checkboxCore.mjs +7 -10
- package/components/flex.mjs +2 -9
- package/components/formAsync.mjs +4 -15
- package/components/radioButtonCore.mjs +6 -9
- package/components/textareaCore.mjs +7 -10
- package/components/textboxCore.mjs +7 -10
- package/dev/main.d.ts +0 -0
- package/package.json +18 -13
- package/{components → src/components}/buttonCore.d.ts +1 -0
- package/{components → src/components}/flex.d.ts +2 -1
- package/{components → src/components}/formAsync.d.ts +2 -1
- package/src/components/textbox.d.ts +26 -0
- package/src/index.d.ts +0 -0
- package/src/theme.d.ts +25 -0
- package/src/utils/object/objectUtils.d.ts +445 -0
- package/style.css +1 -1
- package/utils/utils.mjs +51 -56
- package/utils/object/objectUtils.d.ts +0 -4
- /package/{box.d.ts → src/box.d.ts} +0 -0
- /package/{components → src/components}/baseSvg.d.ts +0 -0
- /package/{components → src/components}/checkboxCore.d.ts +0 -0
- /package/{components → src/components}/radioButtonCore.d.ts +0 -0
- /package/{components → src/components}/textareaCore.d.ts +0 -0
- /package/{components → src/components}/textboxCore.d.ts +0 -0
- /package/{types.d.ts → src/types.d.ts} +0 -0
- /package/{utils → src/utils}/className/classNameUtils.d.ts +0 -0
- /package/{utils → src/utils}/form/formUtils.d.ts +0 -0
package/utils/utils.mjs
CHANGED
|
@@ -33,80 +33,75 @@ const C = {
|
|
|
33
33
|
outlineColorH: "outlineColor_h_",
|
|
34
34
|
outlineColorF: "outlineColor_f_",
|
|
35
35
|
outlineColorA: "outlineColor_a_"
|
|
36
|
-
}, d = {
|
|
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_"
|
|
45
36
|
};
|
|
46
|
-
var
|
|
47
|
-
((
|
|
48
|
-
function
|
|
49
|
-
return i.reduce((t,
|
|
50
|
-
|
|
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);
|
|
51
42
|
}), t) : t, []);
|
|
52
43
|
}
|
|
53
|
-
|
|
54
|
-
})(
|
|
55
|
-
const
|
|
56
|
-
var
|
|
57
|
-
((
|
|
58
|
-
function
|
|
59
|
-
const r = { ...
|
|
60
|
-
return
|
|
61
|
-
|
|
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 = {};
|
|
51
|
+
return _.forEach((o) => {
|
|
52
|
+
o in r && (e[o] = r[o], delete r[o]);
|
|
62
53
|
}), [e, r];
|
|
63
54
|
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
const
|
|
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]);
|
|
60
|
+
}), e.props = o, e;
|
|
61
|
+
}
|
|
62
|
+
c.buildProps = i;
|
|
63
|
+
})(d || (d = {}));
|
|
64
|
+
const p = d;
|
|
67
65
|
var h;
|
|
68
|
-
((
|
|
69
|
-
function
|
|
70
|
-
const
|
|
71
|
-
const o =
|
|
72
|
-
return o && (
|
|
66
|
+
((c) => {
|
|
67
|
+
function s(t) {
|
|
68
|
+
const _ = Array.from(t.elements).reduce((r, e) => {
|
|
69
|
+
const o = e.name;
|
|
70
|
+
return o && (r[o] || (r[o] = []), r[o].push(e)), r;
|
|
73
71
|
}, {});
|
|
74
|
-
return Object.entries(
|
|
72
|
+
return Object.entries(_).reduce((r, [e, o]) => {
|
|
75
73
|
if (o.length === 1) {
|
|
76
|
-
const
|
|
77
|
-
i(e, l
|
|
74
|
+
const l = o[0];
|
|
75
|
+
i(r, e, l.type === "checkbox" || l.type === "radio" ? l.checked : l.value);
|
|
78
76
|
} else {
|
|
79
|
-
const
|
|
80
|
-
i(e, l
|
|
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);
|
|
81
79
|
}
|
|
82
|
-
return
|
|
80
|
+
return r;
|
|
83
81
|
}, {});
|
|
84
82
|
}
|
|
85
|
-
|
|
86
|
-
function i(t,
|
|
87
|
-
if (
|
|
88
|
-
const
|
|
83
|
+
c.getFormEntries = s;
|
|
84
|
+
function i(t, _, r) {
|
|
85
|
+
if (_.includes(".")) {
|
|
86
|
+
const e = _.split(".");
|
|
89
87
|
let o = t;
|
|
90
|
-
|
|
91
|
-
if (
|
|
92
|
-
const
|
|
93
|
-
if (
|
|
94
|
-
const [,
|
|
95
|
-
o[
|
|
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
94
|
} else
|
|
97
|
-
o[
|
|
95
|
+
o[l] = o[l] || {}, o = o[l];
|
|
98
96
|
} else
|
|
99
|
-
o[
|
|
97
|
+
o[l] = r;
|
|
100
98
|
});
|
|
101
99
|
} else
|
|
102
|
-
t[
|
|
100
|
+
t[_] = r;
|
|
103
101
|
}
|
|
104
102
|
})(h || (h = {}));
|
|
105
|
-
const F = h;
|
|
106
103
|
export {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
C as a,
|
|
111
|
-
d as t
|
|
104
|
+
f as C,
|
|
105
|
+
p as O,
|
|
106
|
+
C as t
|
|
112
107
|
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|