@cronocode/react-box 1.1.1 → 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.
package/box.js CHANGED
@@ -1,15 +1,15 @@
1
1
  import x, { useState as N } from "react";
2
2
  import { c as a } from "./box.module.css.js";
3
3
  import { C as b, t as g } from "./utils/utils.js";
4
- function E(n) {
5
- const { tag: m, children: s, props: u, className: r, style: p } = n, e = r ? b.classNames(r, a.box) : [a.box];
6
- Object.entries(n).forEach(([t, l]) => {
7
- const f = a[t + l];
8
- f ? e.push(f) : g.includes(t) && e.push(`${t}${l}`);
4
+ function H(c) {
5
+ const { tag: m, children: s, props: u, className: n, style: p } = c, e = n ? b.classNames(n, a.box) : [a.box];
6
+ Object.entries(c).forEach(([o, i]) => {
7
+ const f = a[o + i];
8
+ f ? e.push(f) : g.includes(o) && e.push(`${o}${i}`);
9
9
  });
10
- const d = m || "div", o = { ...u, style: p, className: e.join(" ") }, [h, c] = N(!1), i = typeof s == "function";
11
- return i && (o.onMouseEnter = () => c(!0), o.onMouseLeave = () => c(!1)), x.createElement(d, o, i ? s({ isHover: h }) : s);
10
+ const d = m || "div", t = { ...u, style: p, className: e.join(" ") }, [h, r] = N(!1), l = typeof s == "function";
11
+ return l && (t.onMouseEnter = () => r(!0), t.onMouseLeave = () => r(!1)), x.createElement(d, t, l ? s({ isHover: h }) : s);
12
12
  }
13
13
  export {
14
- E as default
14
+ H as default
15
15
  };
@@ -1,9 +1,9 @@
1
1
  import g, { useState as w } from "react";
2
2
  import { C as v } from "../utils/utils.js";
3
3
  const s = { base: "cLD", fillnone: "cLE", fillHnone: "cLF", hovertrue: "d", filltransparent: "cLG", fillHtransparent: "cLH", fillblack: "cLI", fillHblack: "cLJ", fillwhite: "cLK", fillHwhite: "cLL", fillblue: "cLM", fillHblue: "cLN", fillred: "cLO", fillHred: "cLP", fillpurple: "cLQ", fillHpurple: "cLR", fillyellow: "cLS", fillHyellow: "cLT", fillpink: "cLU", fillHpink: "cLV", fillgreen: "cLW", fillHgreen: "cLX", fillorange: "cLY", fillHorange: "cLZ", fillnavy: "cL0", fillHnavy: "cL1", fillteal: "cL2", fillHteal: "cL3", fillviolet: "cL4", fillHviolet: "cL5", fillgray: "cL6", fillHgray: "cL7", fillbrown: "cL8", fillHbrown: "cL9", strokenone: "cMa", strokeHnone: "cMb", stroketransparent: "cMc", strokeHtransparent: "cMd", strokeblack: "cMe", strokeHblack: "cMf", strokewhite: "cMg", strokeHwhite: "cMh", strokeblue: "cMi", strokeHblue: "cMj", strokered: "cMk", strokeHred: "cMl", strokepurple: "cMm", strokeHpurple: "cMn", strokeyellow: "cMo", strokeHyellow: "cMp", strokepink: "cMq", strokeHpink: "cMr", strokegreen: "cMs", strokeHgreen: "cMt", strokeorange: "cMu", strokeHorange: "cMv", strokenavy: "cMw", strokeHnavy: "cMx", stroketeal: "cMy", strokeHteal: "cMz", strokeviolet: "cMA", strokeHviolet: "cMB", strokegray: "cMC", strokeHgray: "cMD", strokebrown: "cME", strokeHbrown: "cMF", rotate0: "cMG", rotateH0: "cMH", rotate90: "cMI", rotateH90: "cMJ", rotate180: "cMK", rotateH180: "cML", rotate270: "cMM", rotateH270: "cMN", flipxAxis: "cMO", flipHxAxis: "cMP", flipyAxis: "cMQ", flipHyAxis: "cMR" }, b = ["fill", "fillH", "stroke", "strokeH"];
4
- function m(r) {
5
- const { children: e, props: M, className: o, style: H, viewBox: k, width: L, height: p } = r, l = o ? v.classNames(o, s.base) : [s.base];
6
- Object.entries(r).forEach(([c, n]) => {
4
+ function m(o) {
5
+ const { children: e, props: M, className: r, style: H, viewBox: k, width: L, height: p } = o, l = r ? v.classNames(r, s.base) : [s.base];
6
+ Object.entries(o).forEach(([c, n]) => {
7
7
  const f = s[c + n];
8
8
  f ? l.push(f) : b.includes(c) && l.push(`${c}${n}`);
9
9
  });
@@ -1,11 +1,12 @@
1
- import { j as s } from "../utils/utils.js";
2
- import a from "../box.js";
1
+ import { jsx as s } from "react/jsx-runtime";
2
+ import u from "../box.js";
3
3
  import "react";
4
4
  import "../box.module.css.js";
5
- function g(t) {
5
+ import "../utils/utils.js";
6
+ function l(t) {
6
7
  const { tag: o, type: r, onClick: n, disabled: p, props: e } = t, i = { ...e, type: r || "button", onClick: n, disabled: p };
7
- return /* @__PURE__ */ s(a, { tag: o || "button", cursor: "pointer", inline: !0, ...t, props: i });
8
+ return /* @__PURE__ */ s(u, { tag: o || "button", cursor: "pointer", inline: !0, ...t, props: i });
8
9
  }
9
10
  export {
10
- g as default
11
+ l as default
11
12
  };
@@ -1,11 +1,12 @@
1
- import { j as t } from "../utils/utils.js";
2
- import e from "../box.js";
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import r from "../box.js";
3
3
  import "react";
4
4
  import "../box.module.css.js";
5
- function m(i) {
5
+ import "../utils/utils.js";
6
+ function x(i) {
6
7
  const { inline: o } = i;
7
- return /* @__PURE__ */ t(e, { display: o ? "inline-flex" : "flex", ...i });
8
+ return /* @__PURE__ */ t(r, { display: o ? "inline-flex" : "flex", ...i });
8
9
  }
9
10
  export {
10
- m as default
11
+ x as default
11
12
  };
@@ -1,15 +1,16 @@
1
- import { F as a, j as u } from "../utils/utils.js";
2
- import { useRef as i, useCallback as p } from "react";
3
- import c from "../box.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 j(o) {
6
- const { onSubmit: n, props: s } = o, r = i(null), m = p((t) => {
6
+ function S(o) {
7
+ const { onSubmit: m, props: n } = o, r = p(null), s = u((t) => {
7
8
  t.preventDefault();
8
- const f = a.getFormEntries(r.current);
9
- n(f, t);
10
- }, []), e = { ...s, onSubmit: m, ref: r };
11
- return /* @__PURE__ */ u(c, { tag: "form", ...o, props: e });
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
- j as default
15
+ S as default
15
16
  };
@@ -1,26 +1,27 @@
1
- import { j as m } from "../utils/utils.js";
1
+ import { jsx as f } from "react/jsx-runtime";
2
2
  import { forwardRef as h } from "react";
3
3
  import x from "../box.js";
4
4
  import "../box.module.css.js";
5
+ import "../utils/utils.js";
5
6
  function C(o, e) {
6
- const { props: r, name: t, disabled: n, placeholder: a, value: c, onInput: p, onChange: l, autoFocus: u, readOnly: d, required: s, defaultChecked: i } = o, f = {
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: p,
13
+ onInput: c,
13
14
  onChange: l,
14
- value: c,
15
+ value: p,
15
16
  autoFocus: u,
16
17
  readOnly: d,
17
- required: s,
18
- defaultChecked: i,
18
+ required: i,
19
+ defaultChecked: s,
19
20
  ref: e
20
21
  };
21
- return /* @__PURE__ */ m(x, { tag: "input", inline: !0, ...o, props: f });
22
+ return /* @__PURE__ */ f(x, { tag: "input", inline: !0, ...o, props: m });
22
23
  }
23
- const w = h(C);
24
+ const P = h(C);
24
25
  export {
25
- w as default
26
+ P as default
26
27
  };
@@ -1,26 +1,27 @@
1
- import { j as m } from "../utils/utils.js";
1
+ import { jsx as f } from "react/jsx-runtime";
2
2
  import { forwardRef as g } from "react";
3
3
  import C from "../box.js";
4
4
  import "../box.module.css.js";
5
+ import "../utils/utils.js";
5
6
  function h(o, r) {
6
- const { props: t, name: e, disabled: n, placeholder: a, value: d, onInput: u, onChange: i, autoFocus: p, readOnly: l, required: s, defaultChecked: c } = o, f = {
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
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: p,
16
+ autoFocus: u,
16
17
  readOnly: l,
17
18
  required: s,
18
19
  defaultChecked: c,
19
20
  ref: r
20
21
  };
21
- return /* @__PURE__ */ m(C, { tag: "input", inline: !0, ...o, props: f });
22
+ return /* @__PURE__ */ f(C, { tag: "input", inline: !0, ...o, props: m });
22
23
  }
23
- const w = g(h);
24
+ const P = g(h);
24
25
  export {
25
- w as default
26
+ P as default
26
27
  };
@@ -1,35 +1,36 @@
1
- import { j as h } from "../utils/utils.js";
1
+ import { jsx as h } from "react/jsx-runtime";
2
2
  import { forwardRef as w } from "react";
3
3
  import C from "../box.js";
4
4
  import "../box.module.css.js";
5
+ import "../utils/utils.js";
5
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: s,
13
- onChange: p,
14
- rows: u,
15
- cols: d,
16
- autoFocus: i,
17
- maxLength: m,
13
+ onInput: p,
14
+ onChange: s,
15
+ rows: i,
16
+ cols: m,
17
+ autoFocus: u,
18
+ maxLength: d,
18
19
  minLength: c,
19
20
  readOnly: f,
20
21
  required: x
21
22
  } = o, g = {
22
23
  ...r,
23
24
  name: t,
24
- disabled: a,
25
- placeholder: n,
26
- onInput: s,
27
- onChange: p,
25
+ disabled: n,
26
+ placeholder: a,
27
+ onInput: p,
28
+ onChange: s,
28
29
  defaultValue: l,
29
- rows: u,
30
- cols: d,
31
- autoFocus: i,
32
- maxLength: m,
30
+ rows: i,
31
+ cols: m,
32
+ autoFocus: u,
33
+ maxLength: d,
33
34
  minLength: c,
34
35
  readOnly: f,
35
36
  required: x,
@@ -37,7 +38,7 @@ function T(o, e) {
37
38
  };
38
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 { j as x } from "../utils/utils.js";
1
+ import { jsx as x } from "react/jsx-runtime";
2
2
  import { forwardRef as g } from "react";
3
3
  import b from "../box.js";
4
4
  import "../box.module.css.js";
5
- function y(o, e) {
5
+ import "../utils/utils.js";
6
+ function y(o, t) {
6
7
  const {
7
- props: t,
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
- onInput: s,
14
- onChange: u,
15
- autoFocus: d,
16
- readOnly: i,
17
- required: c,
18
- step: f
19
- } = o, m = {
20
- ...t,
14
+ onInput: u,
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,
25
- onInput: s,
26
- onChange: u,
24
+ disabled: p,
25
+ placeholder: a,
26
+ onInput: u,
27
+ onChange: i,
27
28
  defaultValue: l,
28
- autoFocus: d,
29
- readOnly: i,
30
- required: c,
31
- step: f,
32
- ref: e
29
+ autoFocus: s,
30
+ readOnly: d,
31
+ required: m,
32
+ step: c,
33
+ ref: t
33
34
  };
34
- return /* @__PURE__ */ x(b, { tag: "input", inline: !0, ...o, props: m });
35
+ return /* @__PURE__ */ x(b, { tag: "input", inline: !0, ...o, props: f });
35
36
  }
36
- const w = g(y);
37
+ const j = g(y);
37
38
  export {
38
- w 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.1",
3
+ "version": "1.1.3",
4
4
  "main": "./box.js",
5
5
  "module": "./box.js",
6
6
  "types": "./box.d.ts",
package/utils/utils.js CHANGED
@@ -1,5 +1,4 @@
1
- import wr from "react";
2
- const de = [
1
+ const g = [
3
2
  "shadow",
4
3
  "shadowH",
5
4
  "shadowA",
@@ -25,694 +24,57 @@ const de = [
25
24
  "outlineColorH",
26
25
  "outlineColorA"
27
26
  ];
28
- var K;
29
- ((_) => {
30
- function T(...P) {
31
- return P.reduce((v, g) => g ? typeof g == "string" ? (v.push(g), v) : Array.isArray(g) ? (v.push(...T(...g)), v) : (Object.entries(g).forEach(([p, h]) => {
32
- h && v.push(p);
33
- }), v) : v, []);
27
+ var a;
28
+ ((h) => {
29
+ function l(...d) {
30
+ return d.reduce((e, t) => t ? typeof t == "string" ? (e.push(t), e) : Array.isArray(t) ? (e.push(...l(...t)), e) : (Object.entries(t).forEach(([o, s]) => {
31
+ s && e.push(o);
32
+ }), e) : e, []);
34
33
  }
35
- _.classNames = T;
36
- })(K || (K = {}));
37
- const ve = K;
38
- var X = {}, se = {
39
- get exports() {
40
- return X;
41
- },
42
- set exports(_) {
43
- X = _;
44
- }
45
- }, D = {};
46
- /**
47
- * @license React
48
- * react-jsx-runtime.production.min.js
49
- *
50
- * Copyright (c) Facebook, Inc. and its affiliates.
51
- *
52
- * This source code is licensed under the MIT license found in the
53
- * LICENSE file in the root directory of this source tree.
54
- */
55
- var Tr;
56
- function fe() {
57
- if (Tr)
58
- return D;
59
- Tr = 1;
60
- var _ = wr, T = Symbol.for("react.element"), P = Symbol.for("react.fragment"), v = Object.prototype.hasOwnProperty, g = _.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, p = { key: !0, ref: !0, __self: !0, __source: !0 };
61
- function h(u, s, m) {
62
- var l, b = {}, C = null, $ = null;
63
- m !== void 0 && (C = "" + m), s.key !== void 0 && (C = "" + s.key), s.ref !== void 0 && ($ = s.ref);
64
- for (l in s)
65
- v.call(s, l) && !p.hasOwnProperty(l) && (b[l] = s[l]);
66
- if (u && u.defaultProps)
67
- for (l in s = u.defaultProps, s)
68
- b[l] === void 0 && (b[l] = s[l]);
69
- return { $$typeof: T, type: u, key: C, ref: $, props: b, _owner: g.current };
70
- }
71
- return D.Fragment = P, D.jsx = h, D.jsxs = h, D;
72
- }
73
- var I = {};
74
- /**
75
- * @license React
76
- * react-jsx-runtime.development.js
77
- *
78
- * Copyright (c) Facebook, Inc. and its affiliates.
79
- *
80
- * This source code is licensed under the MIT license found in the
81
- * LICENSE file in the root directory of this source tree.
82
- */
83
- var Or;
84
- function le() {
85
- return Or || (Or = 1, process.env.NODE_ENV !== "production" && function() {
86
- var _ = wr, T = Symbol.for("react.element"), P = Symbol.for("react.portal"), v = Symbol.for("react.fragment"), g = Symbol.for("react.strict_mode"), p = Symbol.for("react.profiler"), h = Symbol.for("react.provider"), u = Symbol.for("react.context"), s = Symbol.for("react.forward_ref"), m = Symbol.for("react.suspense"), l = Symbol.for("react.suspense_list"), b = Symbol.for("react.memo"), C = Symbol.for("react.lazy"), $ = Symbol.for("react.offscreen"), Q = Symbol.iterator, Pr = "@@iterator";
87
- function Sr(r) {
88
- if (r === null || typeof r != "object")
89
- return null;
90
- var e = Q && r[Q] || r[Pr];
91
- return typeof e == "function" ? e : null;
92
- }
93
- var x = _.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
94
- function y(r) {
95
- {
96
- for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), n = 1; n < e; n++)
97
- t[n - 1] = arguments[n];
98
- xr("error", r, t);
99
- }
100
- }
101
- function xr(r, e, t) {
102
- {
103
- var n = x.ReactDebugCurrentFrame, i = n.getStackAddendum();
104
- i !== "" && (e += "%s", t = t.concat([i]));
105
- var f = t.map(function(o) {
106
- return String(o);
107
- });
108
- f.unshift("Warning: " + e), Function.prototype.apply.call(console[r], console, f);
109
- }
110
- }
111
- var jr = !1, kr = !1, Ar = !1, Fr = !1, Dr = !1, rr;
112
- rr = Symbol.for("react.module.reference");
113
- function Ir(r) {
114
- return !!(typeof r == "string" || typeof r == "function" || r === v || r === p || Dr || r === g || r === m || r === l || Fr || r === $ || jr || kr || Ar || typeof r == "object" && r !== null && (r.$$typeof === C || r.$$typeof === b || r.$$typeof === h || r.$$typeof === u || r.$$typeof === s || // This needs to include all possible module reference object
115
- // types supported by any Flight configuration anywhere since
116
- // we don't know which Flight build this will end up being used
117
- // with.
118
- r.$$typeof === rr || r.getModuleId !== void 0));
119
- }
120
- function $r(r, e, t) {
121
- var n = r.displayName;
122
- if (n)
123
- return n;
124
- var i = e.displayName || e.name || "";
125
- return i !== "" ? t + "(" + i + ")" : t;
126
- }
127
- function er(r) {
128
- return r.displayName || "Context";
129
- }
130
- function O(r) {
131
- if (r == null)
132
- return null;
133
- if (typeof r.tag == "number" && y("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof r == "function")
134
- return r.displayName || r.name || null;
135
- if (typeof r == "string")
136
- return r;
137
- switch (r) {
138
- case v:
139
- return "Fragment";
140
- case P:
141
- return "Portal";
142
- case p:
143
- return "Profiler";
144
- case g:
145
- return "StrictMode";
146
- case m:
147
- return "Suspense";
148
- case l:
149
- return "SuspenseList";
150
- }
151
- if (typeof r == "object")
152
- switch (r.$$typeof) {
153
- case u:
154
- var e = r;
155
- return er(e) + ".Consumer";
156
- case h:
157
- var t = r;
158
- return er(t._context) + ".Provider";
159
- case s:
160
- return $r(r, r.render, "ForwardRef");
161
- case b:
162
- var n = r.displayName || null;
163
- return n !== null ? n : O(r.type) || "Memo";
164
- case C: {
165
- var i = r, f = i._payload, o = i._init;
166
- try {
167
- return O(o(f));
168
- } catch {
169
- return null;
170
- }
171
- }
172
- }
173
- return null;
174
- }
175
- var S = Object.assign, A = 0, tr, nr, ar, or, ir, ur, sr;
176
- function fr() {
177
- }
178
- fr.__reactDisabledLog = !0;
179
- function Wr() {
180
- {
181
- if (A === 0) {
182
- tr = console.log, nr = console.info, ar = console.warn, or = console.error, ir = console.group, ur = console.groupCollapsed, sr = console.groupEnd;
183
- var r = {
184
- configurable: !0,
185
- enumerable: !0,
186
- value: fr,
187
- writable: !0
188
- };
189
- Object.defineProperties(console, {
190
- info: r,
191
- log: r,
192
- warn: r,
193
- error: r,
194
- group: r,
195
- groupCollapsed: r,
196
- groupEnd: r
197
- });
198
- }
199
- A++;
200
- }
201
- }
202
- function Yr() {
203
- {
204
- if (A--, A === 0) {
205
- var r = {
206
- configurable: !0,
207
- enumerable: !0,
208
- writable: !0
209
- };
210
- Object.defineProperties(console, {
211
- log: S({}, r, {
212
- value: tr
213
- }),
214
- info: S({}, r, {
215
- value: nr
216
- }),
217
- warn: S({}, r, {
218
- value: ar
219
- }),
220
- error: S({}, r, {
221
- value: or
222
- }),
223
- group: S({}, r, {
224
- value: ir
225
- }),
226
- groupCollapsed: S({}, r, {
227
- value: ur
228
- }),
229
- groupEnd: S({}, r, {
230
- value: sr
231
- })
232
- });
233
- }
234
- A < 0 && y("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
235
- }
236
- }
237
- var V = x.ReactCurrentDispatcher, M;
238
- function W(r, e, t) {
239
- {
240
- if (M === void 0)
241
- try {
242
- throw Error();
243
- } catch (i) {
244
- var n = i.stack.trim().match(/\n( *(at )?)/);
245
- M = n && n[1] || "";
246
- }
247
- return `
248
- ` + M + r;
249
- }
250
- }
251
- var H = !1, Y;
252
- {
253
- var Ur = typeof WeakMap == "function" ? WeakMap : Map;
254
- Y = new Ur();
255
- }
256
- function lr(r, e) {
257
- if (!r || H)
258
- return "";
259
- {
260
- var t = Y.get(r);
261
- if (t !== void 0)
262
- return t;
263
- }
264
- var n;
265
- H = !0;
266
- var i = Error.prepareStackTrace;
267
- Error.prepareStackTrace = void 0;
268
- var f;
269
- f = V.current, V.current = null, Wr();
270
- try {
271
- if (e) {
272
- var o = function() {
273
- throw Error();
274
- };
275
- if (Object.defineProperty(o.prototype, "props", {
276
- set: function() {
277
- throw Error();
278
- }
279
- }), typeof Reflect == "object" && Reflect.construct) {
280
- try {
281
- Reflect.construct(o, []);
282
- } catch (w) {
283
- n = w;
284
- }
285
- Reflect.construct(r, [], o);
286
- } else {
287
- try {
288
- o.call();
289
- } catch (w) {
290
- n = w;
291
- }
292
- r.call(o.prototype);
293
- }
294
- } else {
295
- try {
296
- throw Error();
297
- } catch (w) {
298
- n = w;
299
- }
300
- r();
301
- }
302
- } catch (w) {
303
- if (w && n && typeof w.stack == "string") {
304
- for (var a = w.stack.split(`
305
- `), E = n.stack.split(`
306
- `), c = a.length - 1, d = E.length - 1; c >= 1 && d >= 0 && a[c] !== E[d]; )
307
- d--;
308
- for (; c >= 1 && d >= 0; c--, d--)
309
- if (a[c] !== E[d]) {
310
- if (c !== 1 || d !== 1)
311
- do
312
- if (c--, d--, d < 0 || a[c] !== E[d]) {
313
- var R = `
314
- ` + a[c].replace(" at new ", " at ");
315
- return r.displayName && R.includes("<anonymous>") && (R = R.replace("<anonymous>", r.displayName)), typeof r == "function" && Y.set(r, R), R;
316
- }
317
- while (c >= 1 && d >= 0);
318
- break;
319
- }
320
- }
321
- } finally {
322
- H = !1, V.current = f, Yr(), Error.prepareStackTrace = i;
323
- }
324
- var k = r ? r.displayName || r.name : "", Cr = k ? W(k) : "";
325
- return typeof r == "function" && Y.set(r, Cr), Cr;
326
- }
327
- function Nr(r, e, t) {
328
- return lr(r, !1);
329
- }
330
- function Lr(r) {
331
- var e = r.prototype;
332
- return !!(e && e.isReactComponent);
333
- }
334
- function U(r, e, t) {
335
- if (r == null)
336
- return "";
337
- if (typeof r == "function")
338
- return lr(r, Lr(r));
339
- if (typeof r == "string")
340
- return W(r);
341
- switch (r) {
342
- case m:
343
- return W("Suspense");
344
- case l:
345
- return W("SuspenseList");
346
- }
347
- if (typeof r == "object")
348
- switch (r.$$typeof) {
349
- case s:
350
- return Nr(r.render);
351
- case b:
352
- return U(r.type, e, t);
353
- case C: {
354
- var n = r, i = n._payload, f = n._init;
355
- try {
356
- return U(f(i), e, t);
357
- } catch {
358
- }
359
- }
360
- }
361
- return "";
362
- }
363
- var N = Object.prototype.hasOwnProperty, cr = {}, dr = x.ReactDebugCurrentFrame;
364
- function L(r) {
365
- if (r) {
366
- var e = r._owner, t = U(r.type, r._source, e ? e.type : null);
367
- dr.setExtraStackFrame(t);
368
- } else
369
- dr.setExtraStackFrame(null);
370
- }
371
- function Vr(r, e, t, n, i) {
372
- {
373
- var f = Function.call.bind(N);
374
- for (var o in r)
375
- if (f(r, o)) {
376
- var a = void 0;
377
- try {
378
- if (typeof r[o] != "function") {
379
- var E = Error((n || "React class") + ": " + t + " type `" + o + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof r[o] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
380
- throw E.name = "Invariant Violation", E;
381
- }
382
- a = r[o](e, o, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
383
- } catch (c) {
384
- a = c;
385
- }
386
- a && !(a instanceof Error) && (L(i), y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", n || "React class", t, o, typeof a), L(null)), a instanceof Error && !(a.message in cr) && (cr[a.message] = !0, L(i), y("Failed %s type: %s", t, a.message), L(null));
387
- }
388
- }
389
- }
390
- var Mr = Array.isArray;
391
- function B(r) {
392
- return Mr(r);
393
- }
394
- function Hr(r) {
395
- {
396
- var e = typeof Symbol == "function" && Symbol.toStringTag, t = e && r[Symbol.toStringTag] || r.constructor.name || "Object";
397
- return t;
398
- }
399
- }
400
- function Br(r) {
401
- try {
402
- return vr(r), !1;
403
- } catch {
404
- return !0;
405
- }
406
- }
407
- function vr(r) {
408
- return "" + r;
409
- }
410
- function pr(r) {
411
- if (Br(r))
412
- return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Hr(r)), vr(r);
413
- }
414
- var F = x.ReactCurrentOwner, qr = {
415
- key: !0,
416
- ref: !0,
417
- __self: !0,
418
- __source: !0
419
- }, gr, hr, q;
420
- q = {};
421
- function Gr(r) {
422
- if (N.call(r, "ref")) {
423
- var e = Object.getOwnPropertyDescriptor(r, "ref").get;
424
- if (e && e.isReactWarning)
425
- return !1;
426
- }
427
- return r.ref !== void 0;
428
- }
429
- function Jr(r) {
430
- if (N.call(r, "key")) {
431
- var e = Object.getOwnPropertyDescriptor(r, "key").get;
432
- if (e && e.isReactWarning)
433
- return !1;
434
- }
435
- return r.key !== void 0;
436
- }
437
- function zr(r, e) {
438
- if (typeof r.ref == "string" && F.current && e && F.current.stateNode !== e) {
439
- var t = O(F.current.type);
440
- q[t] || (y('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', O(F.current.type), r.ref), q[t] = !0);
441
- }
442
- }
443
- function Kr(r, e) {
444
- {
445
- var t = function() {
446
- gr || (gr = !0, y("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", e));
447
- };
448
- t.isReactWarning = !0, Object.defineProperty(r, "key", {
449
- get: t,
450
- configurable: !0
451
- });
452
- }
453
- }
454
- function Xr(r, e) {
455
- {
456
- var t = function() {
457
- hr || (hr = !0, y("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", e));
458
- };
459
- t.isReactWarning = !0, Object.defineProperty(r, "ref", {
460
- get: t,
461
- configurable: !0
462
- });
463
- }
464
- }
465
- var Zr = function(r, e, t, n, i, f, o) {
466
- var a = {
467
- // This tag allows us to uniquely identify this as a React Element
468
- $$typeof: T,
469
- // Built-in properties that belong on the element
470
- type: r,
471
- key: e,
472
- ref: t,
473
- props: o,
474
- // Record the component responsible for creating this element.
475
- _owner: f
476
- };
477
- return a._store = {}, Object.defineProperty(a._store, "validated", {
478
- configurable: !1,
479
- enumerable: !1,
480
- writable: !0,
481
- value: !1
482
- }), Object.defineProperty(a, "_self", {
483
- configurable: !1,
484
- enumerable: !1,
485
- writable: !1,
486
- value: n
487
- }), Object.defineProperty(a, "_source", {
488
- configurable: !1,
489
- enumerable: !1,
490
- writable: !1,
491
- value: i
492
- }), Object.freeze && (Object.freeze(a.props), Object.freeze(a)), a;
493
- };
494
- function Qr(r, e, t, n, i) {
495
- {
496
- var f, o = {}, a = null, E = null;
497
- t !== void 0 && (pr(t), a = "" + t), Jr(e) && (pr(e.key), a = "" + e.key), Gr(e) && (E = e.ref, zr(e, i));
498
- for (f in e)
499
- N.call(e, f) && !qr.hasOwnProperty(f) && (o[f] = e[f]);
500
- if (r && r.defaultProps) {
501
- var c = r.defaultProps;
502
- for (f in c)
503
- o[f] === void 0 && (o[f] = c[f]);
504
- }
505
- if (a || E) {
506
- var d = typeof r == "function" ? r.displayName || r.name || "Unknown" : r;
507
- a && Kr(o, d), E && Xr(o, d);
508
- }
509
- return Zr(r, a, E, i, n, F.current, o);
510
- }
511
- }
512
- var G = x.ReactCurrentOwner, br = x.ReactDebugCurrentFrame;
513
- function j(r) {
514
- if (r) {
515
- var e = r._owner, t = U(r.type, r._source, e ? e.type : null);
516
- br.setExtraStackFrame(t);
517
- } else
518
- br.setExtraStackFrame(null);
519
- }
520
- var J;
521
- J = !1;
522
- function z(r) {
523
- return typeof r == "object" && r !== null && r.$$typeof === T;
524
- }
525
- function yr() {
526
- {
527
- if (G.current) {
528
- var r = O(G.current.type);
529
- if (r)
530
- return `
531
-
532
- Check the render method of \`` + r + "`.";
533
- }
534
- return "";
535
- }
536
- }
537
- function re(r) {
538
- {
539
- if (r !== void 0) {
540
- var e = r.fileName.replace(/^.*[\\\/]/, ""), t = r.lineNumber;
541
- return `
542
-
543
- Check your code at ` + e + ":" + t + ".";
544
- }
545
- return "";
546
- }
547
- }
548
- var Er = {};
549
- function ee(r) {
550
- {
551
- var e = yr();
552
- if (!e) {
553
- var t = typeof r == "string" ? r : r.displayName || r.name;
554
- t && (e = `
555
-
556
- Check the top-level render call using <` + t + ">.");
557
- }
558
- return e;
559
- }
560
- }
561
- function _r(r, e) {
562
- {
563
- if (!r._store || r._store.validated || r.key != null)
564
- return;
565
- r._store.validated = !0;
566
- var t = ee(e);
567
- if (Er[t])
568
- return;
569
- Er[t] = !0;
570
- var n = "";
571
- r && r._owner && r._owner !== G.current && (n = " It was passed a child from " + O(r._owner.type) + "."), j(r), y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, n), j(null);
572
- }
573
- }
574
- function mr(r, e) {
575
- {
576
- if (typeof r != "object")
577
- return;
578
- if (B(r))
579
- for (var t = 0; t < r.length; t++) {
580
- var n = r[t];
581
- z(n) && _r(n, e);
582
- }
583
- else if (z(r))
584
- r._store && (r._store.validated = !0);
585
- else if (r) {
586
- var i = Sr(r);
587
- if (typeof i == "function" && i !== r.entries)
588
- for (var f = i.call(r), o; !(o = f.next()).done; )
589
- z(o.value) && _r(o.value, e);
590
- }
591
- }
592
- }
593
- function te(r) {
594
- {
595
- var e = r.type;
596
- if (e == null || typeof e == "string")
597
- return;
598
- var t;
599
- if (typeof e == "function")
600
- t = e.propTypes;
601
- else if (typeof e == "object" && (e.$$typeof === s || // Note: Memo only checks outer props here.
602
- // Inner props are checked in the reconciler.
603
- e.$$typeof === b))
604
- t = e.propTypes;
605
- else
606
- return;
607
- if (t) {
608
- var n = O(e);
609
- Vr(t, r.props, "prop", n, r);
610
- } else if (e.PropTypes !== void 0 && !J) {
611
- J = !0;
612
- var i = O(e);
613
- y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", i || "Unknown");
614
- }
615
- typeof e.getDefaultProps == "function" && !e.getDefaultProps.isReactClassApproved && y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
616
- }
617
- }
618
- function ne(r) {
619
- {
620
- for (var e = Object.keys(r.props), t = 0; t < e.length; t++) {
621
- var n = e[t];
622
- if (n !== "children" && n !== "key") {
623
- j(r), y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), j(null);
624
- break;
625
- }
626
- }
627
- r.ref !== null && (j(r), y("Invalid attribute `ref` supplied to `React.Fragment`."), j(null));
628
- }
629
- }
630
- function Rr(r, e, t, n, i, f) {
631
- {
632
- var o = Ir(r);
633
- if (!o) {
634
- var a = "";
635
- (r === void 0 || typeof r == "object" && r !== null && Object.keys(r).length === 0) && (a += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
636
- var E = re(i);
637
- E ? a += E : a += yr();
638
- var c;
639
- r === null ? c = "null" : B(r) ? c = "array" : r !== void 0 && r.$$typeof === T ? (c = "<" + (O(r.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : c = typeof r, y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", c, a);
640
- }
641
- var d = Qr(r, e, t, i, f);
642
- if (d == null)
643
- return d;
644
- if (o) {
645
- var R = e.children;
646
- if (R !== void 0)
647
- if (n)
648
- if (B(R)) {
649
- for (var k = 0; k < R.length; k++)
650
- mr(R[k], r);
651
- Object.freeze && Object.freeze(R);
652
- } else
653
- y("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
654
- else
655
- mr(R, r);
656
- }
657
- return r === v ? ne(d) : te(d), d;
658
- }
659
- }
660
- function ae(r, e, t) {
661
- return Rr(r, e, t, !0);
662
- }
663
- function oe(r, e, t) {
664
- return Rr(r, e, t, !1);
665
- }
666
- var ie = oe, ue = ae;
667
- I.Fragment = v, I.jsx = ie, I.jsxs = ue;
668
- }()), I;
669
- }
670
- (function(_) {
671
- process.env.NODE_ENV === "production" ? _.exports = fe() : _.exports = le();
672
- })(se);
673
- const pe = X.jsx;
674
- var Z;
675
- ((_) => {
676
- function T(v) {
677
- const g = Array.from(v.elements).reduce((p, h) => {
678
- const u = h.name;
679
- return u && (p[u] || (p[u] = []), p[u].push(h)), p;
34
+ h.classNames = l;
35
+ })(a || (a = {}));
36
+ const C = a;
37
+ var b;
38
+ ((h) => {
39
+ function l(e) {
40
+ const t = Array.from(e.elements).reduce((o, s) => {
41
+ const r = s.name;
42
+ return r && (o[r] || (o[r] = []), o[r].push(s)), o;
680
43
  }, {});
681
- return Object.entries(g).reduce((p, [h, u]) => {
682
- if (u.length === 1) {
683
- const s = u[0];
684
- P(p, h, s.type === "checkbox" || s.type === "radio" ? s.checked : s.value);
44
+ return Object.entries(t).reduce((o, [s, r]) => {
45
+ if (r.length === 1) {
46
+ const c = r[0];
47
+ d(o, s, c.type === "checkbox" || c.type === "radio" ? c.checked : c.value);
685
48
  } else {
686
- const s = u.reduce((m, l) => (l.type === "checkbox" || l.type === "radio" ? l.checked && m.push(l.value) : m.push(l.value), m), []);
687
- P(p, h, s);
49
+ const c = r.reduce((i, n) => (n.type === "checkbox" || n.type === "radio" ? n.checked && i.push(n.value) : i.push(n.value), i), []);
50
+ d(o, s, c);
688
51
  }
689
- return p;
52
+ return o;
690
53
  }, {});
691
54
  }
692
- _.getFormEntries = T;
693
- function P(v, g, p) {
694
- if (g.includes(".")) {
695
- const h = g.split(".");
696
- let u = v;
697
- h.forEach((s, m) => {
698
- if (h.length > m + 1) {
699
- const l = s.match(/^(.+)\[(\d)\]$/);
700
- if (l) {
701
- const [, b, C] = l;
702
- u[b] = u[b] || [], u[b][C] = u[b][C] || {}, u = u[b][C];
55
+ h.getFormEntries = l;
56
+ function d(e, t, o) {
57
+ if (t.includes(".")) {
58
+ const s = t.split(".");
59
+ let r = e;
60
+ s.forEach((c, i) => {
61
+ if (s.length > i + 1) {
62
+ const n = c.match(/^(.+)\[(\d)\]$/);
63
+ if (n) {
64
+ const [, u, f] = n;
65
+ r[u] = r[u] || [], r[u][f] = r[u][f] || {}, r = r[u][f];
703
66
  } else
704
- u[s] = u[s] || {}, u = u[s];
67
+ r[c] = r[c] || {}, r = r[c];
705
68
  } else
706
- u[s] = p;
69
+ r[c] = o;
707
70
  });
708
71
  } else
709
- v[g] = p;
72
+ e[t] = o;
710
73
  }
711
- })(Z || (Z = {}));
712
- const ge = Z;
74
+ })(b || (b = {}));
75
+ const p = b;
713
76
  export {
714
- ve as C,
715
- ge as F,
716
- pe as j,
717
- de as t
77
+ C,
78
+ p as F,
79
+ g as t
718
80
  };