chop-logic-components 0.1.0 → 0.3.0
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/dist/components/button/Button.d.ts +2 -2
- package/dist/components/index.d.ts +2 -0
- package/dist/components/inputs/checkbox/Checkbox.d.ts +10 -0
- package/dist/components/inputs/checkbox/__docs__/Checkbox.stories.d.ts +7 -0
- package/dist/components/inputs/checkbox/__docs__/Example.d.ts +5 -0
- package/dist/components/inputs/checkbox/__tests__/Checkbox.test.d.ts +1 -0
- package/dist/components/inputs/select/Select.d.ts +15 -0
- package/dist/components/inputs/select/__docs__/Example.d.ts +5 -0
- package/dist/components/inputs/select/__docs__/Select.stories.d.ts +7 -0
- package/dist/components/inputs/select/__tests__/Select.test.d.ts +1 -0
- package/dist/components/inputs/select/elements/Combobox.d.ts +15 -0
- package/dist/components/inputs/select/elements/Dropdown.d.ts +13 -0
- package/dist/components/inputs/select/elements/Option.d.ts +9 -0
- package/dist/components/{inputs → misc}/label/Label.d.ts +1 -0
- package/dist/enums/icon.d.ts +47 -0
- package/dist/enums/index.d.ts +1 -0
- package/dist/index.cjs.js +10 -10
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +601 -409
- package/dist/index.es.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/utils/__tests__/use-click-outside.test.d.ts +1 -0
- package/dist/utils/move-focus-on-element-by-id.d.ts +1 -0
- package/dist/utils/use-click-outside.d.ts +12 -0
- package/package.json +12 -11
- package/dist/assets/icons/utf-icons.d.ts +0 -20
- /package/dist/components/{inputs → misc}/error-message/ErrorMessage.d.ts +0 -0
package/dist/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
var
|
|
1
|
+
import qe, { useState as ee, useEffect as xr, useRef as wr } from "react";
|
|
2
|
+
var _e = { exports: {} }, I = {};
|
|
3
3
|
/**
|
|
4
4
|
* @license React
|
|
5
5
|
* react-jsx-runtime.production.min.js
|
|
@@ -9,25 +9,25 @@ var ie = { exports: {} }, Y = {};
|
|
|
9
9
|
* This source code is licensed under the MIT license found in the
|
|
10
10
|
* LICENSE file in the root directory of this source tree.
|
|
11
11
|
*/
|
|
12
|
-
var
|
|
13
|
-
function
|
|
14
|
-
if (
|
|
15
|
-
return
|
|
16
|
-
|
|
17
|
-
var
|
|
18
|
-
function m
|
|
19
|
-
var
|
|
20
|
-
|
|
21
|
-
for (
|
|
22
|
-
|
|
23
|
-
if (
|
|
24
|
-
for (
|
|
25
|
-
|
|
26
|
-
return { $$typeof:
|
|
12
|
+
var Ye;
|
|
13
|
+
function Rr() {
|
|
14
|
+
if (Ye)
|
|
15
|
+
return I;
|
|
16
|
+
Ye = 1;
|
|
17
|
+
var n = qe, f = Symbol.for("react.element"), o = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, l = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, b = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
18
|
+
function _(m, d, y) {
|
|
19
|
+
var c, R = {}, C = null, g = null;
|
|
20
|
+
y !== void 0 && (C = "" + y), d.key !== void 0 && (C = "" + d.key), d.ref !== void 0 && (g = d.ref);
|
|
21
|
+
for (c in d)
|
|
22
|
+
s.call(d, c) && !b.hasOwnProperty(c) && (R[c] = d[c]);
|
|
23
|
+
if (m && m.defaultProps)
|
|
24
|
+
for (c in d = m.defaultProps, d)
|
|
25
|
+
R[c] === void 0 && (R[c] = d[c]);
|
|
26
|
+
return { $$typeof: f, type: m, key: C, ref: g, props: R, _owner: l.current };
|
|
27
27
|
}
|
|
28
|
-
return
|
|
28
|
+
return I.Fragment = o, I.jsx = _, I.jsxs = _, I;
|
|
29
29
|
}
|
|
30
|
-
var
|
|
30
|
+
var J = {};
|
|
31
31
|
/**
|
|
32
32
|
* @license React
|
|
33
33
|
* react-jsx-runtime.development.js
|
|
@@ -37,91 +37,91 @@ var q = {};
|
|
|
37
37
|
* This source code is licensed under the MIT license found in the
|
|
38
38
|
* LICENSE file in the root directory of this source tree.
|
|
39
39
|
*/
|
|
40
|
-
var
|
|
41
|
-
function
|
|
42
|
-
return
|
|
43
|
-
var
|
|
44
|
-
function
|
|
40
|
+
var Ue;
|
|
41
|
+
function Cr() {
|
|
42
|
+
return Ue || (Ue = 1, process.env.NODE_ENV !== "production" && function() {
|
|
43
|
+
var n = qe, f = Symbol.for("react.element"), o = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), l = Symbol.for("react.strict_mode"), b = Symbol.for("react.profiler"), _ = Symbol.for("react.provider"), m = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), y = Symbol.for("react.suspense"), c = Symbol.for("react.suspense_list"), R = Symbol.for("react.memo"), C = Symbol.for("react.lazy"), g = Symbol.for("react.offscreen"), k = Symbol.iterator, N = "@@iterator";
|
|
44
|
+
function M(e) {
|
|
45
45
|
if (e === null || typeof e != "object")
|
|
46
46
|
return null;
|
|
47
|
-
var r =
|
|
47
|
+
var r = k && e[k] || e[N];
|
|
48
48
|
return typeof r == "function" ? r : null;
|
|
49
49
|
}
|
|
50
|
-
var S =
|
|
51
|
-
function
|
|
50
|
+
var S = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
51
|
+
function x(e) {
|
|
52
52
|
{
|
|
53
|
-
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0),
|
|
54
|
-
t[
|
|
55
|
-
|
|
53
|
+
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), a = 1; a < r; a++)
|
|
54
|
+
t[a - 1] = arguments[a];
|
|
55
|
+
re("error", e, t);
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function re(e, r, t) {
|
|
59
59
|
{
|
|
60
|
-
var
|
|
61
|
-
|
|
62
|
-
var
|
|
63
|
-
return String(
|
|
60
|
+
var a = S.ReactDebugCurrentFrame, p = a.getStackAddendum();
|
|
61
|
+
p !== "" && (r += "%s", t = t.concat([p]));
|
|
62
|
+
var v = t.map(function(u) {
|
|
63
|
+
return String(u);
|
|
64
64
|
});
|
|
65
|
-
|
|
65
|
+
v.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, v);
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
var
|
|
69
|
-
|
|
70
|
-
function
|
|
71
|
-
return !!(typeof e == "string" || typeof e == "function" || e ===
|
|
68
|
+
var ne = !1, G = !1, te = !1, Ke = !1, Ie = !1, he;
|
|
69
|
+
he = Symbol.for("react.module.reference");
|
|
70
|
+
function Je(e) {
|
|
71
|
+
return !!(typeof e == "string" || typeof e == "function" || e === s || e === b || Ie || e === l || e === y || e === c || Ke || e === g || ne || G || te || typeof e == "object" && e !== null && (e.$$typeof === C || e.$$typeof === R || e.$$typeof === _ || e.$$typeof === m || e.$$typeof === d || // This needs to include all possible module reference object
|
|
72
72
|
// types supported by any Flight configuration anywhere since
|
|
73
73
|
// we don't know which Flight build this will end up being used
|
|
74
74
|
// with.
|
|
75
|
-
e.$$typeof ===
|
|
75
|
+
e.$$typeof === he || e.getModuleId !== void 0));
|
|
76
76
|
}
|
|
77
|
-
function
|
|
78
|
-
var
|
|
79
|
-
if (
|
|
80
|
-
return
|
|
81
|
-
var
|
|
82
|
-
return
|
|
77
|
+
function Ge(e, r, t) {
|
|
78
|
+
var a = e.displayName;
|
|
79
|
+
if (a)
|
|
80
|
+
return a;
|
|
81
|
+
var p = r.displayName || r.name || "";
|
|
82
|
+
return p !== "" ? t + "(" + p + ")" : t;
|
|
83
83
|
}
|
|
84
|
-
function
|
|
84
|
+
function be(e) {
|
|
85
85
|
return e.displayName || "Context";
|
|
86
86
|
}
|
|
87
|
-
function
|
|
87
|
+
function D(e) {
|
|
88
88
|
if (e == null)
|
|
89
89
|
return null;
|
|
90
|
-
if (typeof e.tag == "number" &&
|
|
90
|
+
if (typeof e.tag == "number" && x("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
91
91
|
return e.displayName || e.name || null;
|
|
92
92
|
if (typeof e == "string")
|
|
93
93
|
return e;
|
|
94
94
|
switch (e) {
|
|
95
|
-
case
|
|
95
|
+
case s:
|
|
96
96
|
return "Fragment";
|
|
97
|
-
case
|
|
97
|
+
case o:
|
|
98
98
|
return "Portal";
|
|
99
|
-
case
|
|
99
|
+
case b:
|
|
100
100
|
return "Profiler";
|
|
101
|
-
case
|
|
101
|
+
case l:
|
|
102
102
|
return "StrictMode";
|
|
103
|
-
case
|
|
103
|
+
case y:
|
|
104
104
|
return "Suspense";
|
|
105
|
-
case
|
|
105
|
+
case c:
|
|
106
106
|
return "SuspenseList";
|
|
107
107
|
}
|
|
108
108
|
if (typeof e == "object")
|
|
109
109
|
switch (e.$$typeof) {
|
|
110
|
-
case T:
|
|
111
|
-
var r = e;
|
|
112
|
-
return se(r) + ".Consumer";
|
|
113
110
|
case m:
|
|
111
|
+
var r = e;
|
|
112
|
+
return be(r) + ".Consumer";
|
|
113
|
+
case _:
|
|
114
114
|
var t = e;
|
|
115
|
-
return
|
|
115
|
+
return be(t._context) + ".Provider";
|
|
116
116
|
case d:
|
|
117
|
-
return
|
|
118
|
-
case
|
|
119
|
-
var
|
|
120
|
-
return
|
|
121
|
-
case
|
|
122
|
-
var
|
|
117
|
+
return Ge(e, e.render, "ForwardRef");
|
|
118
|
+
case R:
|
|
119
|
+
var a = e.displayName || null;
|
|
120
|
+
return a !== null ? a : D(e.type) || "Memo";
|
|
121
|
+
case C: {
|
|
122
|
+
var p = e, v = p._payload, u = p._init;
|
|
123
123
|
try {
|
|
124
|
-
return
|
|
124
|
+
return D(u(v));
|
|
125
125
|
} catch {
|
|
126
126
|
return null;
|
|
127
127
|
}
|
|
@@ -129,18 +129,18 @@ function yr() {
|
|
|
129
129
|
}
|
|
130
130
|
return null;
|
|
131
131
|
}
|
|
132
|
-
var
|
|
133
|
-
function
|
|
132
|
+
var $ = Object.assign, B = 0, me, ge, ye, Ee, xe, we, Re;
|
|
133
|
+
function Ce() {
|
|
134
134
|
}
|
|
135
|
-
|
|
136
|
-
function
|
|
135
|
+
Ce.__reactDisabledLog = !0;
|
|
136
|
+
function Xe() {
|
|
137
137
|
{
|
|
138
|
-
if (
|
|
139
|
-
|
|
138
|
+
if (B === 0) {
|
|
139
|
+
me = console.log, ge = console.info, ye = console.warn, Ee = console.error, xe = console.group, we = console.groupCollapsed, Re = console.groupEnd;
|
|
140
140
|
var e = {
|
|
141
141
|
configurable: !0,
|
|
142
142
|
enumerable: !0,
|
|
143
|
-
value:
|
|
143
|
+
value: Ce,
|
|
144
144
|
writable: !0
|
|
145
145
|
};
|
|
146
146
|
Object.defineProperties(console, {
|
|
@@ -153,254 +153,254 @@ function yr() {
|
|
|
153
153
|
groupEnd: e
|
|
154
154
|
});
|
|
155
155
|
}
|
|
156
|
-
|
|
156
|
+
B++;
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
|
-
function
|
|
159
|
+
function ze() {
|
|
160
160
|
{
|
|
161
|
-
if (
|
|
161
|
+
if (B--, B === 0) {
|
|
162
162
|
var e = {
|
|
163
163
|
configurable: !0,
|
|
164
164
|
enumerable: !0,
|
|
165
165
|
writable: !0
|
|
166
166
|
};
|
|
167
167
|
Object.defineProperties(console, {
|
|
168
|
-
log:
|
|
169
|
-
value:
|
|
168
|
+
log: $({}, e, {
|
|
169
|
+
value: me
|
|
170
170
|
}),
|
|
171
|
-
info:
|
|
172
|
-
value:
|
|
171
|
+
info: $({}, e, {
|
|
172
|
+
value: ge
|
|
173
173
|
}),
|
|
174
|
-
warn:
|
|
175
|
-
value:
|
|
174
|
+
warn: $({}, e, {
|
|
175
|
+
value: ye
|
|
176
176
|
}),
|
|
177
|
-
error:
|
|
178
|
-
value:
|
|
177
|
+
error: $({}, e, {
|
|
178
|
+
value: Ee
|
|
179
179
|
}),
|
|
180
|
-
group:
|
|
181
|
-
value:
|
|
180
|
+
group: $({}, e, {
|
|
181
|
+
value: xe
|
|
182
182
|
}),
|
|
183
|
-
groupCollapsed:
|
|
184
|
-
value:
|
|
183
|
+
groupCollapsed: $({}, e, {
|
|
184
|
+
value: we
|
|
185
185
|
}),
|
|
186
|
-
groupEnd:
|
|
187
|
-
value:
|
|
186
|
+
groupEnd: $({}, e, {
|
|
187
|
+
value: Re
|
|
188
188
|
})
|
|
189
189
|
});
|
|
190
190
|
}
|
|
191
|
-
|
|
191
|
+
B < 0 && x("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
|
-
var
|
|
195
|
-
function
|
|
194
|
+
var ae = S.ReactCurrentDispatcher, oe;
|
|
195
|
+
function X(e, r, t) {
|
|
196
196
|
{
|
|
197
|
-
if (
|
|
197
|
+
if (oe === void 0)
|
|
198
198
|
try {
|
|
199
199
|
throw Error();
|
|
200
|
-
} catch (
|
|
201
|
-
var
|
|
202
|
-
|
|
200
|
+
} catch (p) {
|
|
201
|
+
var a = p.stack.trim().match(/\n( *(at )?)/);
|
|
202
|
+
oe = a && a[1] || "";
|
|
203
203
|
}
|
|
204
204
|
return `
|
|
205
|
-
` +
|
|
205
|
+
` + oe + e;
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
|
-
var
|
|
208
|
+
var ie = !1, z;
|
|
209
209
|
{
|
|
210
|
-
var
|
|
211
|
-
|
|
210
|
+
var He = typeof WeakMap == "function" ? WeakMap : Map;
|
|
211
|
+
z = new He();
|
|
212
212
|
}
|
|
213
|
-
function
|
|
214
|
-
if (!e ||
|
|
213
|
+
function ke(e, r) {
|
|
214
|
+
if (!e || ie)
|
|
215
215
|
return "";
|
|
216
216
|
{
|
|
217
|
-
var t =
|
|
217
|
+
var t = z.get(e);
|
|
218
218
|
if (t !== void 0)
|
|
219
219
|
return t;
|
|
220
220
|
}
|
|
221
|
-
var
|
|
222
|
-
|
|
223
|
-
var
|
|
221
|
+
var a;
|
|
222
|
+
ie = !0;
|
|
223
|
+
var p = Error.prepareStackTrace;
|
|
224
224
|
Error.prepareStackTrace = void 0;
|
|
225
|
-
var
|
|
226
|
-
|
|
225
|
+
var v;
|
|
226
|
+
v = ae.current, ae.current = null, Xe();
|
|
227
227
|
try {
|
|
228
228
|
if (r) {
|
|
229
|
-
var
|
|
229
|
+
var u = function() {
|
|
230
230
|
throw Error();
|
|
231
231
|
};
|
|
232
|
-
if (Object.defineProperty(
|
|
232
|
+
if (Object.defineProperty(u.prototype, "props", {
|
|
233
233
|
set: function() {
|
|
234
234
|
throw Error();
|
|
235
235
|
}
|
|
236
236
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
237
237
|
try {
|
|
238
|
-
Reflect.construct(
|
|
239
|
-
} catch (
|
|
240
|
-
|
|
238
|
+
Reflect.construct(u, []);
|
|
239
|
+
} catch (T) {
|
|
240
|
+
a = T;
|
|
241
241
|
}
|
|
242
|
-
Reflect.construct(e, [],
|
|
242
|
+
Reflect.construct(e, [], u);
|
|
243
243
|
} else {
|
|
244
244
|
try {
|
|
245
|
-
|
|
246
|
-
} catch (
|
|
247
|
-
|
|
245
|
+
u.call();
|
|
246
|
+
} catch (T) {
|
|
247
|
+
a = T;
|
|
248
248
|
}
|
|
249
|
-
e.call(
|
|
249
|
+
e.call(u.prototype);
|
|
250
250
|
}
|
|
251
251
|
} else {
|
|
252
252
|
try {
|
|
253
253
|
throw Error();
|
|
254
|
-
} catch (
|
|
255
|
-
|
|
254
|
+
} catch (T) {
|
|
255
|
+
a = T;
|
|
256
256
|
}
|
|
257
257
|
e();
|
|
258
258
|
}
|
|
259
|
-
} catch (
|
|
260
|
-
if (
|
|
261
|
-
for (var
|
|
262
|
-
`),
|
|
263
|
-
`),
|
|
264
|
-
|
|
265
|
-
for (;
|
|
266
|
-
if (
|
|
267
|
-
if (
|
|
259
|
+
} catch (T) {
|
|
260
|
+
if (T && a && typeof T.stack == "string") {
|
|
261
|
+
for (var i = T.stack.split(`
|
|
262
|
+
`), j = a.stack.split(`
|
|
263
|
+
`), E = i.length - 1, w = j.length - 1; E >= 1 && w >= 0 && i[E] !== j[w]; )
|
|
264
|
+
w--;
|
|
265
|
+
for (; E >= 1 && w >= 0; E--, w--)
|
|
266
|
+
if (i[E] !== j[w]) {
|
|
267
|
+
if (E !== 1 || w !== 1)
|
|
268
268
|
do
|
|
269
|
-
if (
|
|
270
|
-
var
|
|
271
|
-
` +
|
|
272
|
-
return e.displayName &&
|
|
269
|
+
if (E--, w--, w < 0 || i[E] !== j[w]) {
|
|
270
|
+
var O = `
|
|
271
|
+
` + i[E].replace(" at new ", " at ");
|
|
272
|
+
return e.displayName && O.includes("<anonymous>") && (O = O.replace("<anonymous>", e.displayName)), typeof e == "function" && z.set(e, O), O;
|
|
273
273
|
}
|
|
274
|
-
while (
|
|
274
|
+
while (E >= 1 && w >= 0);
|
|
275
275
|
break;
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
278
|
} finally {
|
|
279
|
-
|
|
279
|
+
ie = !1, ae.current = v, ze(), Error.prepareStackTrace = p;
|
|
280
280
|
}
|
|
281
|
-
var
|
|
282
|
-
return typeof e == "function" &&
|
|
281
|
+
var Y = e ? e.displayName || e.name : "", A = Y ? X(Y) : "";
|
|
282
|
+
return typeof e == "function" && z.set(e, A), A;
|
|
283
283
|
}
|
|
284
|
-
function
|
|
285
|
-
return
|
|
284
|
+
function Ze(e, r, t) {
|
|
285
|
+
return ke(e, !1);
|
|
286
286
|
}
|
|
287
|
-
function
|
|
287
|
+
function Qe(e) {
|
|
288
288
|
var r = e.prototype;
|
|
289
289
|
return !!(r && r.isReactComponent);
|
|
290
290
|
}
|
|
291
|
-
function
|
|
291
|
+
function H(e, r, t) {
|
|
292
292
|
if (e == null)
|
|
293
293
|
return "";
|
|
294
294
|
if (typeof e == "function")
|
|
295
|
-
return
|
|
295
|
+
return ke(e, Qe(e));
|
|
296
296
|
if (typeof e == "string")
|
|
297
|
-
return
|
|
297
|
+
return X(e);
|
|
298
298
|
switch (e) {
|
|
299
|
-
case
|
|
300
|
-
return
|
|
301
|
-
case
|
|
302
|
-
return
|
|
299
|
+
case y:
|
|
300
|
+
return X("Suspense");
|
|
301
|
+
case c:
|
|
302
|
+
return X("SuspenseList");
|
|
303
303
|
}
|
|
304
304
|
if (typeof e == "object")
|
|
305
305
|
switch (e.$$typeof) {
|
|
306
306
|
case d:
|
|
307
|
-
return
|
|
308
|
-
case
|
|
309
|
-
return
|
|
310
|
-
case
|
|
311
|
-
var
|
|
307
|
+
return Ze(e.render);
|
|
308
|
+
case R:
|
|
309
|
+
return H(e.type, r, t);
|
|
310
|
+
case C: {
|
|
311
|
+
var a = e, p = a._payload, v = a._init;
|
|
312
312
|
try {
|
|
313
|
-
return
|
|
313
|
+
return H(v(p), r, t);
|
|
314
314
|
} catch {
|
|
315
315
|
}
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
318
|
return "";
|
|
319
319
|
}
|
|
320
|
-
var
|
|
321
|
-
function
|
|
320
|
+
var q = Object.prototype.hasOwnProperty, je = {}, Te = S.ReactDebugCurrentFrame;
|
|
321
|
+
function Z(e) {
|
|
322
322
|
if (e) {
|
|
323
|
-
var r = e._owner, t =
|
|
324
|
-
|
|
323
|
+
var r = e._owner, t = H(e.type, e._source, r ? r.type : null);
|
|
324
|
+
Te.setExtraStackFrame(t);
|
|
325
325
|
} else
|
|
326
|
-
|
|
326
|
+
Te.setExtraStackFrame(null);
|
|
327
327
|
}
|
|
328
|
-
function
|
|
328
|
+
function er(e, r, t, a, p) {
|
|
329
329
|
{
|
|
330
|
-
var
|
|
331
|
-
for (var
|
|
332
|
-
if (
|
|
333
|
-
var
|
|
330
|
+
var v = Function.call.bind(q);
|
|
331
|
+
for (var u in e)
|
|
332
|
+
if (v(e, u)) {
|
|
333
|
+
var i = void 0;
|
|
334
334
|
try {
|
|
335
|
-
if (typeof e[
|
|
336
|
-
var
|
|
337
|
-
throw
|
|
335
|
+
if (typeof e[u] != "function") {
|
|
336
|
+
var j = Error((a || "React class") + ": " + t + " type `" + u + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[u] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
337
|
+
throw j.name = "Invariant Violation", j;
|
|
338
338
|
}
|
|
339
|
-
|
|
340
|
-
} catch (
|
|
341
|
-
|
|
339
|
+
i = e[u](r, u, a, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
340
|
+
} catch (E) {
|
|
341
|
+
i = E;
|
|
342
342
|
}
|
|
343
|
-
|
|
343
|
+
i && !(i instanceof Error) && (Z(p), x("%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).", a || "React class", t, u, typeof i), Z(null)), i instanceof Error && !(i.message in je) && (je[i.message] = !0, Z(p), x("Failed %s type: %s", t, i.message), Z(null));
|
|
344
344
|
}
|
|
345
345
|
}
|
|
346
346
|
}
|
|
347
|
-
var
|
|
348
|
-
function
|
|
349
|
-
return
|
|
347
|
+
var rr = Array.isArray;
|
|
348
|
+
function se(e) {
|
|
349
|
+
return rr(e);
|
|
350
350
|
}
|
|
351
|
-
function
|
|
351
|
+
function nr(e) {
|
|
352
352
|
{
|
|
353
353
|
var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
354
354
|
return t;
|
|
355
355
|
}
|
|
356
356
|
}
|
|
357
|
-
function
|
|
357
|
+
function tr(e) {
|
|
358
358
|
try {
|
|
359
|
-
return
|
|
359
|
+
return Se(e), !1;
|
|
360
360
|
} catch {
|
|
361
361
|
return !0;
|
|
362
362
|
}
|
|
363
363
|
}
|
|
364
|
-
function
|
|
364
|
+
function Se(e) {
|
|
365
365
|
return "" + e;
|
|
366
366
|
}
|
|
367
|
-
function
|
|
368
|
-
if (
|
|
369
|
-
return
|
|
367
|
+
function Oe(e) {
|
|
368
|
+
if (tr(e))
|
|
369
|
+
return x("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", nr(e)), Se(e);
|
|
370
370
|
}
|
|
371
|
-
var
|
|
371
|
+
var K = S.ReactCurrentOwner, ar = {
|
|
372
372
|
key: !0,
|
|
373
373
|
ref: !0,
|
|
374
374
|
__self: !0,
|
|
375
375
|
__source: !0
|
|
376
|
-
},
|
|
377
|
-
|
|
378
|
-
function
|
|
379
|
-
if (
|
|
376
|
+
}, Pe, De, ce;
|
|
377
|
+
ce = {};
|
|
378
|
+
function or(e) {
|
|
379
|
+
if (q.call(e, "ref")) {
|
|
380
380
|
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
381
381
|
if (r && r.isReactWarning)
|
|
382
382
|
return !1;
|
|
383
383
|
}
|
|
384
384
|
return e.ref !== void 0;
|
|
385
385
|
}
|
|
386
|
-
function
|
|
387
|
-
if (
|
|
386
|
+
function ir(e) {
|
|
387
|
+
if (q.call(e, "key")) {
|
|
388
388
|
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
389
389
|
if (r && r.isReactWarning)
|
|
390
390
|
return !1;
|
|
391
391
|
}
|
|
392
392
|
return e.key !== void 0;
|
|
393
393
|
}
|
|
394
|
-
function
|
|
395
|
-
if (typeof e.ref == "string" &&
|
|
396
|
-
var t =
|
|
397
|
-
|
|
394
|
+
function sr(e, r) {
|
|
395
|
+
if (typeof e.ref == "string" && K.current && r && K.current.stateNode !== r) {
|
|
396
|
+
var t = D(K.current.type);
|
|
397
|
+
ce[t] || (x('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', D(K.current.type), e.ref), ce[t] = !0);
|
|
398
398
|
}
|
|
399
399
|
}
|
|
400
|
-
function
|
|
400
|
+
function cr(e, r) {
|
|
401
401
|
{
|
|
402
402
|
var t = function() {
|
|
403
|
-
|
|
403
|
+
Pe || (Pe = !0, x("%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)", r));
|
|
404
404
|
};
|
|
405
405
|
t.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
406
406
|
get: t,
|
|
@@ -408,10 +408,10 @@ function yr() {
|
|
|
408
408
|
});
|
|
409
409
|
}
|
|
410
410
|
}
|
|
411
|
-
function
|
|
411
|
+
function lr(e, r) {
|
|
412
412
|
{
|
|
413
413
|
var t = function() {
|
|
414
|
-
|
|
414
|
+
De || (De = !0, x("%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)", r));
|
|
415
415
|
};
|
|
416
416
|
t.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
417
417
|
get: t,
|
|
@@ -419,70 +419,70 @@ function yr() {
|
|
|
419
419
|
});
|
|
420
420
|
}
|
|
421
421
|
}
|
|
422
|
-
var
|
|
423
|
-
var
|
|
422
|
+
var ur = function(e, r, t, a, p, v, u) {
|
|
423
|
+
var i = {
|
|
424
424
|
// This tag allows us to uniquely identify this as a React Element
|
|
425
|
-
$$typeof:
|
|
425
|
+
$$typeof: f,
|
|
426
426
|
// Built-in properties that belong on the element
|
|
427
427
|
type: e,
|
|
428
428
|
key: r,
|
|
429
429
|
ref: t,
|
|
430
|
-
props:
|
|
430
|
+
props: u,
|
|
431
431
|
// Record the component responsible for creating this element.
|
|
432
|
-
_owner:
|
|
432
|
+
_owner: v
|
|
433
433
|
};
|
|
434
|
-
return
|
|
434
|
+
return i._store = {}, Object.defineProperty(i._store, "validated", {
|
|
435
435
|
configurable: !1,
|
|
436
436
|
enumerable: !1,
|
|
437
437
|
writable: !0,
|
|
438
438
|
value: !1
|
|
439
|
-
}), Object.defineProperty(
|
|
439
|
+
}), Object.defineProperty(i, "_self", {
|
|
440
440
|
configurable: !1,
|
|
441
441
|
enumerable: !1,
|
|
442
442
|
writable: !1,
|
|
443
|
-
value:
|
|
444
|
-
}), Object.defineProperty(
|
|
443
|
+
value: a
|
|
444
|
+
}), Object.defineProperty(i, "_source", {
|
|
445
445
|
configurable: !1,
|
|
446
446
|
enumerable: !1,
|
|
447
447
|
writable: !1,
|
|
448
|
-
value:
|
|
449
|
-
}), Object.freeze && (Object.freeze(
|
|
448
|
+
value: p
|
|
449
|
+
}), Object.freeze && (Object.freeze(i.props), Object.freeze(i)), i;
|
|
450
450
|
};
|
|
451
|
-
function
|
|
451
|
+
function fr(e, r, t, a, p) {
|
|
452
452
|
{
|
|
453
|
-
var
|
|
454
|
-
t !== void 0 && (
|
|
455
|
-
for (
|
|
456
|
-
|
|
453
|
+
var v, u = {}, i = null, j = null;
|
|
454
|
+
t !== void 0 && (Oe(t), i = "" + t), ir(r) && (Oe(r.key), i = "" + r.key), or(r) && (j = r.ref, sr(r, p));
|
|
455
|
+
for (v in r)
|
|
456
|
+
q.call(r, v) && !ar.hasOwnProperty(v) && (u[v] = r[v]);
|
|
457
457
|
if (e && e.defaultProps) {
|
|
458
|
-
var
|
|
459
|
-
for (
|
|
460
|
-
|
|
458
|
+
var E = e.defaultProps;
|
|
459
|
+
for (v in E)
|
|
460
|
+
u[v] === void 0 && (u[v] = E[v]);
|
|
461
461
|
}
|
|
462
|
-
if (
|
|
463
|
-
var
|
|
464
|
-
|
|
462
|
+
if (i || j) {
|
|
463
|
+
var w = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
464
|
+
i && cr(u, w), j && lr(u, w);
|
|
465
465
|
}
|
|
466
|
-
return
|
|
466
|
+
return ur(e, i, j, p, a, K.current, u);
|
|
467
467
|
}
|
|
468
468
|
}
|
|
469
|
-
var
|
|
470
|
-
function
|
|
469
|
+
var le = S.ReactCurrentOwner, Fe = S.ReactDebugCurrentFrame;
|
|
470
|
+
function W(e) {
|
|
471
471
|
if (e) {
|
|
472
|
-
var r = e._owner, t =
|
|
473
|
-
|
|
472
|
+
var r = e._owner, t = H(e.type, e._source, r ? r.type : null);
|
|
473
|
+
Fe.setExtraStackFrame(t);
|
|
474
474
|
} else
|
|
475
|
-
|
|
475
|
+
Fe.setExtraStackFrame(null);
|
|
476
476
|
}
|
|
477
|
-
var
|
|
478
|
-
|
|
479
|
-
function
|
|
480
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
477
|
+
var ue;
|
|
478
|
+
ue = !1;
|
|
479
|
+
function fe(e) {
|
|
480
|
+
return typeof e == "object" && e !== null && e.$$typeof === f;
|
|
481
481
|
}
|
|
482
|
-
function
|
|
482
|
+
function Ne() {
|
|
483
483
|
{
|
|
484
|
-
if (
|
|
485
|
-
var e =
|
|
484
|
+
if (le.current) {
|
|
485
|
+
var e = D(le.current.type);
|
|
486
486
|
if (e)
|
|
487
487
|
return `
|
|
488
488
|
|
|
@@ -491,13 +491,13 @@ Check the render method of \`` + e + "`.";
|
|
|
491
491
|
return "";
|
|
492
492
|
}
|
|
493
493
|
}
|
|
494
|
-
function
|
|
494
|
+
function dr(e) {
|
|
495
495
|
return "";
|
|
496
496
|
}
|
|
497
|
-
var
|
|
498
|
-
function
|
|
497
|
+
var $e = {};
|
|
498
|
+
function pr(e) {
|
|
499
499
|
{
|
|
500
|
-
var r =
|
|
500
|
+
var r = Ne();
|
|
501
501
|
if (!r) {
|
|
502
502
|
var t = typeof e == "string" ? e : e.displayName || e.name;
|
|
503
503
|
t && (r = `
|
|
@@ -507,39 +507,39 @@ Check the top-level render call using <` + t + ">.");
|
|
|
507
507
|
return r;
|
|
508
508
|
}
|
|
509
509
|
}
|
|
510
|
-
function
|
|
510
|
+
function Ae(e, r) {
|
|
511
511
|
{
|
|
512
512
|
if (!e._store || e._store.validated || e.key != null)
|
|
513
513
|
return;
|
|
514
514
|
e._store.validated = !0;
|
|
515
|
-
var t =
|
|
516
|
-
if (
|
|
515
|
+
var t = pr(r);
|
|
516
|
+
if ($e[t])
|
|
517
517
|
return;
|
|
518
|
-
|
|
519
|
-
var
|
|
520
|
-
e && e._owner && e._owner !==
|
|
518
|
+
$e[t] = !0;
|
|
519
|
+
var a = "";
|
|
520
|
+
e && e._owner && e._owner !== le.current && (a = " It was passed a child from " + D(e._owner.type) + "."), W(e), x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, a), W(null);
|
|
521
521
|
}
|
|
522
522
|
}
|
|
523
|
-
function
|
|
523
|
+
function Le(e, r) {
|
|
524
524
|
{
|
|
525
525
|
if (typeof e != "object")
|
|
526
526
|
return;
|
|
527
|
-
if (
|
|
527
|
+
if (se(e))
|
|
528
528
|
for (var t = 0; t < e.length; t++) {
|
|
529
|
-
var
|
|
530
|
-
|
|
529
|
+
var a = e[t];
|
|
530
|
+
fe(a) && Ae(a, r);
|
|
531
531
|
}
|
|
532
|
-
else if (
|
|
532
|
+
else if (fe(e))
|
|
533
533
|
e._store && (e._store.validated = !0);
|
|
534
534
|
else if (e) {
|
|
535
|
-
var
|
|
536
|
-
if (typeof
|
|
537
|
-
for (var
|
|
538
|
-
|
|
535
|
+
var p = M(e);
|
|
536
|
+
if (typeof p == "function" && p !== e.entries)
|
|
537
|
+
for (var v = p.call(e), u; !(u = v.next()).done; )
|
|
538
|
+
fe(u.value) && Ae(u.value, r);
|
|
539
539
|
}
|
|
540
540
|
}
|
|
541
541
|
}
|
|
542
|
-
function
|
|
542
|
+
function _r(e) {
|
|
543
543
|
{
|
|
544
544
|
var r = e.type;
|
|
545
545
|
if (r == null || typeof r == "string")
|
|
@@ -549,212 +549,404 @@ Check the top-level render call using <` + t + ">.");
|
|
|
549
549
|
t = r.propTypes;
|
|
550
550
|
else if (typeof r == "object" && (r.$$typeof === d || // Note: Memo only checks outer props here.
|
|
551
551
|
// Inner props are checked in the reconciler.
|
|
552
|
-
r.$$typeof ===
|
|
552
|
+
r.$$typeof === R))
|
|
553
553
|
t = r.propTypes;
|
|
554
554
|
else
|
|
555
555
|
return;
|
|
556
556
|
if (t) {
|
|
557
|
-
var
|
|
558
|
-
|
|
559
|
-
} else if (r.PropTypes !== void 0 && !
|
|
560
|
-
|
|
561
|
-
var
|
|
562
|
-
|
|
557
|
+
var a = D(r);
|
|
558
|
+
er(t, e.props, "prop", a, e);
|
|
559
|
+
} else if (r.PropTypes !== void 0 && !ue) {
|
|
560
|
+
ue = !0;
|
|
561
|
+
var p = D(r);
|
|
562
|
+
x("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", p || "Unknown");
|
|
563
563
|
}
|
|
564
|
-
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved &&
|
|
564
|
+
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && x("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
565
565
|
}
|
|
566
566
|
}
|
|
567
|
-
function
|
|
567
|
+
function vr(e) {
|
|
568
568
|
{
|
|
569
569
|
for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
|
|
570
|
-
var
|
|
571
|
-
if (
|
|
572
|
-
|
|
570
|
+
var a = r[t];
|
|
571
|
+
if (a !== "children" && a !== "key") {
|
|
572
|
+
W(e), x("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", a), W(null);
|
|
573
573
|
break;
|
|
574
574
|
}
|
|
575
575
|
}
|
|
576
|
-
e.ref !== null && (
|
|
576
|
+
e.ref !== null && (W(e), x("Invalid attribute `ref` supplied to `React.Fragment`."), W(null));
|
|
577
577
|
}
|
|
578
578
|
}
|
|
579
|
-
var
|
|
580
|
-
function
|
|
579
|
+
var Me = {};
|
|
580
|
+
function We(e, r, t, a, p, v) {
|
|
581
581
|
{
|
|
582
|
-
var
|
|
583
|
-
if (!
|
|
584
|
-
var
|
|
585
|
-
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (
|
|
586
|
-
var
|
|
587
|
-
|
|
588
|
-
var
|
|
589
|
-
e === null ?
|
|
582
|
+
var u = Je(e);
|
|
583
|
+
if (!u) {
|
|
584
|
+
var i = "";
|
|
585
|
+
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (i += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
586
|
+
var j = dr();
|
|
587
|
+
j ? i += j : i += Ne();
|
|
588
|
+
var E;
|
|
589
|
+
e === null ? E = "null" : se(e) ? E = "array" : e !== void 0 && e.$$typeof === f ? (E = "<" + (D(e.type) || "Unknown") + " />", i = " Did you accidentally export a JSX literal instead of a component?") : E = typeof e, x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", E, i);
|
|
590
590
|
}
|
|
591
|
-
var
|
|
592
|
-
if (
|
|
593
|
-
return
|
|
594
|
-
if (
|
|
595
|
-
var
|
|
596
|
-
if (
|
|
597
|
-
if (
|
|
598
|
-
if (
|
|
599
|
-
for (var
|
|
600
|
-
|
|
601
|
-
Object.freeze && Object.freeze(
|
|
591
|
+
var w = fr(e, r, t, p, v);
|
|
592
|
+
if (w == null)
|
|
593
|
+
return w;
|
|
594
|
+
if (u) {
|
|
595
|
+
var O = r.children;
|
|
596
|
+
if (O !== void 0)
|
|
597
|
+
if (a)
|
|
598
|
+
if (se(O)) {
|
|
599
|
+
for (var Y = 0; Y < O.length; Y++)
|
|
600
|
+
Le(O[Y], e);
|
|
601
|
+
Object.freeze && Object.freeze(O);
|
|
602
602
|
} else
|
|
603
|
-
|
|
603
|
+
x("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
604
604
|
else
|
|
605
|
-
|
|
605
|
+
Le(O, e);
|
|
606
606
|
}
|
|
607
|
-
if (
|
|
608
|
-
var
|
|
609
|
-
return
|
|
610
|
-
}),
|
|
611
|
-
if (!
|
|
612
|
-
var
|
|
613
|
-
|
|
607
|
+
if (q.call(r, "key")) {
|
|
608
|
+
var A = D(e), T = Object.keys(r).filter(function(Er) {
|
|
609
|
+
return Er !== "key";
|
|
610
|
+
}), de = T.length > 0 ? "{key: someKey, " + T.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
611
|
+
if (!Me[A + de]) {
|
|
612
|
+
var yr = T.length > 0 ? "{" + T.join(": ..., ") + ": ...}" : "{}";
|
|
613
|
+
x(`A props object containing a "key" prop is being spread into JSX:
|
|
614
614
|
let props = %s;
|
|
615
615
|
<%s {...props} />
|
|
616
616
|
React keys must be passed directly to JSX without using spread:
|
|
617
617
|
let props = %s;
|
|
618
|
-
<%s key={someKey} {...props} />`,
|
|
618
|
+
<%s key={someKey} {...props} />`, de, A, yr, A), Me[A + de] = !0;
|
|
619
619
|
}
|
|
620
620
|
}
|
|
621
|
-
return e ===
|
|
621
|
+
return e === s ? vr(w) : _r(w), w;
|
|
622
622
|
}
|
|
623
623
|
}
|
|
624
|
-
function
|
|
625
|
-
return
|
|
624
|
+
function hr(e, r, t) {
|
|
625
|
+
return We(e, r, t, !0);
|
|
626
626
|
}
|
|
627
|
-
function
|
|
628
|
-
return
|
|
627
|
+
function br(e, r, t) {
|
|
628
|
+
return We(e, r, t, !1);
|
|
629
629
|
}
|
|
630
|
-
var
|
|
631
|
-
|
|
632
|
-
}()),
|
|
630
|
+
var mr = br, gr = hr;
|
|
631
|
+
J.Fragment = s, J.jsx = mr, J.jsxs = gr;
|
|
632
|
+
}()), J;
|
|
633
633
|
}
|
|
634
|
-
process.env.NODE_ENV === "production" ?
|
|
635
|
-
var
|
|
636
|
-
const
|
|
637
|
-
button:
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
disabled:
|
|
634
|
+
process.env.NODE_ENV === "production" ? _e.exports = Rr() : _e.exports = Cr();
|
|
635
|
+
var h = _e.exports;
|
|
636
|
+
const kr = "_button_rrb70_1", jr = "_text_rrb70_21", Tr = "_primary_rrb70_26", Sr = "_danger_rrb70_27", Or = "_secondary_rrb70_50", Pr = "_disabled_rrb70_66", U = {
|
|
637
|
+
button: kr,
|
|
638
|
+
text: jr,
|
|
639
|
+
primary: Tr,
|
|
640
|
+
danger: Sr,
|
|
641
|
+
secondary: Or,
|
|
642
|
+
disabled: Pr
|
|
643
643
|
};
|
|
644
|
-
function
|
|
645
|
-
return
|
|
646
|
-
if (typeof
|
|
647
|
-
return
|
|
648
|
-
if (typeof
|
|
649
|
-
const
|
|
650
|
-
for (const
|
|
651
|
-
|
|
652
|
-
return
|
|
653
|
-
}
|
|
654
|
-
}).filter((
|
|
644
|
+
function P(n) {
|
|
645
|
+
return n.map((o) => {
|
|
646
|
+
if (typeof o == "string")
|
|
647
|
+
return o.trim();
|
|
648
|
+
if (typeof o == "object") {
|
|
649
|
+
const s = [];
|
|
650
|
+
for (const l in o)
|
|
651
|
+
o[l] && s.push(l.trim());
|
|
652
|
+
return s.join(" ");
|
|
653
|
+
}
|
|
654
|
+
}).filter((o) => !!o).join(" ");
|
|
655
655
|
}
|
|
656
|
-
const
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
ClockwiseOpen: "↻",
|
|
661
|
-
Pencil: "✎",
|
|
662
|
-
Rightwards: "⇨",
|
|
663
|
-
Leftwards: "⇦",
|
|
664
|
-
Upwards: "⇧",
|
|
665
|
-
Downwards: "⇩",
|
|
666
|
-
Copyright: "©",
|
|
667
|
-
Warning: "⚠",
|
|
668
|
-
Question: "�",
|
|
669
|
-
Envelope: "✉",
|
|
670
|
-
Hart: "♥",
|
|
671
|
-
Scissors: "✂",
|
|
672
|
-
Star: "★"
|
|
673
|
-
}, Lr = ({ disabled: _, onClick: g, text: c = "Ok", type: f = "button", view: h = "primary", icon: R, ...m }) => {
|
|
674
|
-
const T = M([
|
|
675
|
-
$.button,
|
|
676
|
-
m == null ? void 0 : m.className,
|
|
656
|
+
const cn = ({ disabled: n, onClick: f, text: o = "Ok", type: s = "button", view: l = "primary", icon: b, ..._ }) => {
|
|
657
|
+
const m = P([
|
|
658
|
+
U.button,
|
|
659
|
+
_ == null ? void 0 : _.className,
|
|
677
660
|
{
|
|
678
|
-
[
|
|
679
|
-
[
|
|
680
|
-
[
|
|
681
|
-
[
|
|
661
|
+
[U.primary]: l === "primary",
|
|
662
|
+
[U.secondary]: l === "secondary",
|
|
663
|
+
[U.danger]: l === "danger",
|
|
664
|
+
[U.disabled]: !!n
|
|
682
665
|
}
|
|
683
666
|
]);
|
|
684
|
-
return /* @__PURE__ */
|
|
685
|
-
|
|
686
|
-
/* @__PURE__ */
|
|
667
|
+
return /* @__PURE__ */ h.jsxs("button", { type: s, className: m, onClick: n ? void 0 : f, disabled: n, ..._, children: [
|
|
668
|
+
b && /* @__PURE__ */ h.jsx("span", { className: b, "aria-hidden": "true" }),
|
|
669
|
+
/* @__PURE__ */ h.jsx("span", { className: U.text, children: o })
|
|
687
670
|
] });
|
|
688
|
-
},
|
|
689
|
-
container:
|
|
690
|
-
wrapper:
|
|
691
|
-
input:
|
|
692
|
-
invalid:
|
|
693
|
-
error:
|
|
694
|
-
disabled:
|
|
695
|
-
},
|
|
696
|
-
label:
|
|
697
|
-
required:
|
|
698
|
-
},
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
},
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
671
|
+
}, Dr = "_container_b5mrn_1", Fr = "_wrapper_b5mrn_7", Nr = "_input_b5mrn_21", $r = "_invalid_b5mrn_27", Ar = "_error_b5mrn_47", Lr = "_disabled_b5mrn_51", L = {
|
|
672
|
+
container: Dr,
|
|
673
|
+
wrapper: Fr,
|
|
674
|
+
input: Nr,
|
|
675
|
+
invalid: $r,
|
|
676
|
+
error: Ar,
|
|
677
|
+
disabled: Lr
|
|
678
|
+
}, Mr = "_label_195p3_1", Wr = "_required_195p3_10", Ve = {
|
|
679
|
+
label: Mr,
|
|
680
|
+
required: Wr
|
|
681
|
+
}, ve = ({
|
|
682
|
+
label: n,
|
|
683
|
+
required: f,
|
|
684
|
+
inputId: o,
|
|
685
|
+
className: s,
|
|
686
|
+
isTextHidden: l = !1
|
|
687
|
+
}) => /* @__PURE__ */ h.jsxs("label", { htmlFor: o, className: P([Ve.label, s]), children: [
|
|
688
|
+
!l && /* @__PURE__ */ h.jsx("span", { children: n }),
|
|
689
|
+
f && /* @__PURE__ */ h.jsx("abbr", { title: "required", className: Ve.required, children: "*" })
|
|
690
|
+
] }), Yr = "_message_1ly5l_1", Ur = "_visible_1ly5l_8", Be = {
|
|
691
|
+
message: Yr,
|
|
692
|
+
visible: Ur
|
|
693
|
+
}, Vr = ({
|
|
694
|
+
errorId: n,
|
|
695
|
+
message: f = "Invalid input",
|
|
696
|
+
className: o,
|
|
697
|
+
visible: s = !1
|
|
698
|
+
}) => /* @__PURE__ */ h.jsx("span", { id: n, className: P([Be.message, o, { [Be.visible]: s }]), children: f }), ln = ({
|
|
699
|
+
id: n,
|
|
700
|
+
name: f,
|
|
701
|
+
label: o,
|
|
702
|
+
disabled: s,
|
|
703
|
+
placeholder: l = "Type here...",
|
|
704
|
+
valid: b = !0,
|
|
705
|
+
required: _ = !1,
|
|
706
|
+
errorMessage: m,
|
|
718
707
|
defaultValue: d,
|
|
719
|
-
onChange:
|
|
720
|
-
...
|
|
708
|
+
onChange: y,
|
|
709
|
+
...c
|
|
721
710
|
}) => {
|
|
722
|
-
const [
|
|
723
|
-
|
|
711
|
+
const [R, C] = ee(typeof d == "string" ? d : ""), g = `${n}_error`, k = P([L.container, c == null ? void 0 : c.className]), N = P([
|
|
712
|
+
L.wrapper,
|
|
724
713
|
{
|
|
725
|
-
[
|
|
726
|
-
[
|
|
714
|
+
[L.disabled]: !!s,
|
|
715
|
+
[L.invalid]: !b
|
|
727
716
|
}
|
|
728
|
-
]),
|
|
729
|
-
const { value:
|
|
730
|
-
|
|
717
|
+
]), M = (S) => {
|
|
718
|
+
const { value: x = "" } = S.target;
|
|
719
|
+
C(x), y && y(S);
|
|
731
720
|
};
|
|
732
|
-
return /* @__PURE__ */
|
|
733
|
-
/* @__PURE__ */
|
|
734
|
-
/* @__PURE__ */
|
|
735
|
-
/* @__PURE__ */
|
|
721
|
+
return /* @__PURE__ */ h.jsxs("div", { className: k, children: [
|
|
722
|
+
/* @__PURE__ */ h.jsxs("div", { className: N, children: [
|
|
723
|
+
/* @__PURE__ */ h.jsx(ve, { label: o, required: _, inputId: n, className: L.label }),
|
|
724
|
+
/* @__PURE__ */ h.jsx(
|
|
736
725
|
"input",
|
|
737
726
|
{
|
|
738
|
-
id:
|
|
739
|
-
name:
|
|
727
|
+
id: n,
|
|
728
|
+
name: f,
|
|
740
729
|
type: "text",
|
|
741
|
-
className:
|
|
742
|
-
disabled:
|
|
743
|
-
placeholder:
|
|
744
|
-
required:
|
|
745
|
-
"aria-invalid": !
|
|
746
|
-
"aria-errormessage":
|
|
747
|
-
value:
|
|
748
|
-
onChange:
|
|
749
|
-
...
|
|
730
|
+
className: L.input,
|
|
731
|
+
disabled: s,
|
|
732
|
+
placeholder: l,
|
|
733
|
+
required: _,
|
|
734
|
+
"aria-invalid": !b,
|
|
735
|
+
"aria-errormessage": g,
|
|
736
|
+
value: R,
|
|
737
|
+
onChange: M,
|
|
738
|
+
...c
|
|
750
739
|
}
|
|
751
740
|
)
|
|
752
741
|
] }),
|
|
753
|
-
/* @__PURE__ */
|
|
742
|
+
/* @__PURE__ */ h.jsx(Vr, { errorId: g, message: m, className: L.error, visible: !b })
|
|
743
|
+
] });
|
|
744
|
+
}, Br = "_wrapper_gevmw_1", qr = "_combobox_gevmw_17", Kr = "_combobox_label_gevmw_42", Ir = "_dropdown_gevmw_47", Jr = "_dropdown_opened_gevmw_68", Gr = "_option_gevmw_73", Xr = "_active_gevmw_82", zr = "_disabled_gevmw_91", Hr = "_icon_gevmw_97", F = {
|
|
745
|
+
wrapper: Br,
|
|
746
|
+
combobox: qr,
|
|
747
|
+
combobox_label: Kr,
|
|
748
|
+
dropdown: Ir,
|
|
749
|
+
dropdown_opened: Jr,
|
|
750
|
+
option: Gr,
|
|
751
|
+
active: Xr,
|
|
752
|
+
disabled: zr,
|
|
753
|
+
icon: Hr
|
|
754
|
+
}, Zr = ({ ref: n, onClickOutsideHandler: f, dependentRef: o }) => {
|
|
755
|
+
xr(() => {
|
|
756
|
+
const s = (l) => {
|
|
757
|
+
const b = (n == null ? void 0 : n.current) && !n.current.contains(l.target), _ = o != null && o.current ? !o.current.contains(l.target) : !0;
|
|
758
|
+
b && _ && f();
|
|
759
|
+
};
|
|
760
|
+
return document.addEventListener("mousedown", s), () => {
|
|
761
|
+
document.removeEventListener("mousedown", s);
|
|
762
|
+
};
|
|
763
|
+
}, [n, o, f]);
|
|
764
|
+
};
|
|
765
|
+
var V = /* @__PURE__ */ ((n) => (n.CheckMark = "chop-icon__check", n.Home = "chop-icon__home", n.Menu = "chop-icon__menu", n.Enlarge = "chop-icon__enlarge2", n.Shrink = "chop-icon__shrink2", n.Settings = "chop-icon__cog", n.Delete = "chop-icon__bin2", n.Up = "chop-icon__circle-up", n.Down = "chop-icon__circle-down", n.Right = "chop-icon__circle-right", n.Left = "chop-icon__circle-left", n.Sound = "chop-icon__volume-medium", n.NoSound = "chop-icon__volume-mute2", n.LightMode = "chop-icon__sun", n.DarkMode = "chop-icon__contrast", n.Cancel = "chop-icon__close", n.Sidebar = "chop-icon__magic-wand", n.Telegram = "chop-icon__telegram", n.Github = "chop-icon__github", n.Mail = "chop-icon__mail4", n.Propositions = "chop-icon__cube", n.Resolution = "chop-icon__libreoffice", n.Predicates = "chop-icon__cubes", n.TruthTables = "chop-icon__delicious", n.Syllogisms = "chop-icon__dice", n.English = "chop-icon__english-lang", n.Russian = "chop-icon__russian-lang", n.Required = "chop-icon__fire", n.Checked = "chop-icon__checkbox-checked", n.Unchecked = "chop-icon__checkbox-unchecked", n.Info = "chop-icon__exclamation-triangle", n.LinkedIn = "chop-icon__linkedin-square", n.File = "chop-icon__file-empty", n.Files = "chop-icon__files-empty", n.Facebook = "chop-icon__facebook2", n.CaretUp = "chop-icon__caret-up", n.CaretDown = "chop-icon__caret-down", n.SavePDF = "chop-icon__file-pdf", n.ExportXML = "chop-icon__download", n.ImportXML = "chop-icon__upload", n.Copy = "chop-icon__copy", n.Paste = "chop-icon__paste", n.Cut = "chop-icon__scissors", n.Reset = "chop-icon__trash", n.Clear = "chop-icon__cross", n))(V || {});
|
|
766
|
+
const Qr = ({
|
|
767
|
+
isOpened: n,
|
|
768
|
+
onClick: f,
|
|
769
|
+
comboboxId: o,
|
|
770
|
+
dropdownId: s,
|
|
771
|
+
selected: l,
|
|
772
|
+
name: b,
|
|
773
|
+
placeholder: _,
|
|
774
|
+
disabled: m,
|
|
775
|
+
required: d
|
|
776
|
+
}) => {
|
|
777
|
+
const y = P([F.icon, { [V.CaretUp]: n, [V.CaretDown]: !n }]);
|
|
778
|
+
return /* @__PURE__ */ h.jsxs(
|
|
779
|
+
"button",
|
|
780
|
+
{
|
|
781
|
+
type: "button",
|
|
782
|
+
name: b,
|
|
783
|
+
value: l == null ? void 0 : l.id,
|
|
784
|
+
role: "combobox",
|
|
785
|
+
"aria-haspopup": "listbox",
|
|
786
|
+
"aria-label": "Select one of the options",
|
|
787
|
+
"aria-expanded": n,
|
|
788
|
+
"aria-controls": s,
|
|
789
|
+
id: o,
|
|
790
|
+
className: F.combobox,
|
|
791
|
+
onClick: f,
|
|
792
|
+
disabled: m,
|
|
793
|
+
"aria-required": d,
|
|
794
|
+
children: [
|
|
795
|
+
/* @__PURE__ */ h.jsx("span", { className: F.combobox_label, children: (l == null ? void 0 : l.label) ?? _ }),
|
|
796
|
+
/* @__PURE__ */ h.jsx("span", { className: y, "aria-hidden": "true" })
|
|
797
|
+
]
|
|
798
|
+
}
|
|
799
|
+
);
|
|
800
|
+
};
|
|
801
|
+
function pe(n) {
|
|
802
|
+
const f = document.getElementById(n);
|
|
803
|
+
f && f.focus();
|
|
804
|
+
}
|
|
805
|
+
const en = ({ value: n, isSelected: f, onSelect: o }) => {
|
|
806
|
+
const { id: s, label: l } = n, b = P([F.icon, V.CheckMark]), _ = (m) => (d) => {
|
|
807
|
+
switch (d.key) {
|
|
808
|
+
case " ":
|
|
809
|
+
case "SpaceBar":
|
|
810
|
+
case "Enter":
|
|
811
|
+
d.preventDefault(), o(m);
|
|
812
|
+
break;
|
|
813
|
+
}
|
|
814
|
+
};
|
|
815
|
+
return /* @__PURE__ */ h.jsxs(
|
|
816
|
+
"li",
|
|
817
|
+
{
|
|
818
|
+
id: s,
|
|
819
|
+
role: "option",
|
|
820
|
+
className: F.option,
|
|
821
|
+
"aria-selected": f,
|
|
822
|
+
tabIndex: 0,
|
|
823
|
+
onKeyDown: _(s),
|
|
824
|
+
onClick: () => o(s),
|
|
825
|
+
children: [
|
|
826
|
+
/* @__PURE__ */ h.jsx("span", { children: l }),
|
|
827
|
+
f && /* @__PURE__ */ h.jsx("span", { className: b, "aria-hidden": "true" })
|
|
828
|
+
]
|
|
829
|
+
}
|
|
830
|
+
);
|
|
831
|
+
}, rn = ({ values: n, isOpened: f, onClose: o, onSelect: s, dropdownId: l, comboboxId: b, selected: _ }) => {
|
|
832
|
+
const m = P([F.dropdown, { [F.dropdown_opened]: f }]), d = (c) => {
|
|
833
|
+
s(c), o(), pe(b);
|
|
834
|
+
}, y = (c) => {
|
|
835
|
+
let R = "";
|
|
836
|
+
n.forEach((g) => {
|
|
837
|
+
document.getElementById(g.id) === document.activeElement && (R = g.id);
|
|
838
|
+
});
|
|
839
|
+
const C = n.findIndex((g) => g.id === R);
|
|
840
|
+
switch (c.key) {
|
|
841
|
+
case "Escape":
|
|
842
|
+
c.preventDefault(), o();
|
|
843
|
+
break;
|
|
844
|
+
case "ArrowUp": {
|
|
845
|
+
c.preventDefault();
|
|
846
|
+
const g = C - 1 >= 0 ? C - 1 : n.length - 1, k = n[g];
|
|
847
|
+
k && pe(k.id);
|
|
848
|
+
break;
|
|
849
|
+
}
|
|
850
|
+
case "ArrowDown":
|
|
851
|
+
case "Tab": {
|
|
852
|
+
c.preventDefault();
|
|
853
|
+
const g = C === n.length - 1 ? 0 : C + 1, k = n[g];
|
|
854
|
+
k && pe(k.id);
|
|
855
|
+
break;
|
|
856
|
+
}
|
|
857
|
+
}
|
|
858
|
+
};
|
|
859
|
+
return /* @__PURE__ */ h.jsx("ul", { className: m, role: "listbox", id: l, tabIndex: -1, onKeyDown: y, children: n.map((c) => /* @__PURE__ */ h.jsx(en, { value: c, onSelect: () => d(c.id), isSelected: c.id === (_ == null ? void 0 : _.id) }, c.id)) });
|
|
860
|
+
}, un = ({
|
|
861
|
+
id: n,
|
|
862
|
+
values: f,
|
|
863
|
+
onSelect: o,
|
|
864
|
+
name: s,
|
|
865
|
+
label: l,
|
|
866
|
+
required: b = !1,
|
|
867
|
+
placeholder: _ = "Not selected",
|
|
868
|
+
disabled: m = !1,
|
|
869
|
+
...d
|
|
870
|
+
}) => {
|
|
871
|
+
const [y, c] = ee(!1), [R, C] = ee(), g = `${n}_combobox`, k = `${n}_dropdown`, N = P([F.wrapper, d == null ? void 0 : d.className, { [F.disabled]: m }]), M = wr(null), S = () => c(!1), x = () => c(!y), re = (ne) => {
|
|
872
|
+
const G = f.find((te) => te.id === ne);
|
|
873
|
+
C(G), o == null || o(G);
|
|
874
|
+
};
|
|
875
|
+
return Zr({ ref: M, onClickOutsideHandler: S }), /* @__PURE__ */ h.jsxs("div", { className: N, ref: M, children: [
|
|
876
|
+
/* @__PURE__ */ h.jsx(ve, { label: l, required: b, inputId: g, className: F.label }),
|
|
877
|
+
/* @__PURE__ */ h.jsx(
|
|
878
|
+
Qr,
|
|
879
|
+
{
|
|
880
|
+
name: s,
|
|
881
|
+
isOpened: y,
|
|
882
|
+
comboboxId: g,
|
|
883
|
+
dropdownId: k,
|
|
884
|
+
onClick: x,
|
|
885
|
+
selected: R,
|
|
886
|
+
placeholder: _,
|
|
887
|
+
disabled: m,
|
|
888
|
+
required: b
|
|
889
|
+
}
|
|
890
|
+
),
|
|
891
|
+
/* @__PURE__ */ h.jsx(
|
|
892
|
+
rn,
|
|
893
|
+
{
|
|
894
|
+
values: f,
|
|
895
|
+
selected: R,
|
|
896
|
+
isOpened: y,
|
|
897
|
+
onClose: S,
|
|
898
|
+
dropdownId: k,
|
|
899
|
+
comboboxId: g,
|
|
900
|
+
onSelect: re
|
|
901
|
+
}
|
|
902
|
+
)
|
|
903
|
+
] });
|
|
904
|
+
}, nn = "_wrapper_1ab48_1", tn = "_input_1ab48_9", an = "_label_1ab48_23", on = "_disabled_1ab48_38", Q = {
|
|
905
|
+
wrapper: nn,
|
|
906
|
+
input: tn,
|
|
907
|
+
label: an,
|
|
908
|
+
disabled: on
|
|
909
|
+
}, fn = ({
|
|
910
|
+
id: n,
|
|
911
|
+
name: f,
|
|
912
|
+
label: o,
|
|
913
|
+
disabled: s,
|
|
914
|
+
required: l = !1,
|
|
915
|
+
onChange: b,
|
|
916
|
+
isLabelHidden: _,
|
|
917
|
+
className: m,
|
|
918
|
+
...d
|
|
919
|
+
}) => {
|
|
920
|
+
const [y, c] = ee(!1), R = P([Q.wrapper, m, { [Q.disabled]: !!s }]), C = P([Q.label, { [V.Checked]: y, [V.Unchecked]: !y }]), g = (k) => {
|
|
921
|
+
if (s)
|
|
922
|
+
return;
|
|
923
|
+
const N = k.target.checked;
|
|
924
|
+
c(N), b && b(k);
|
|
925
|
+
};
|
|
926
|
+
return /* @__PURE__ */ h.jsxs("div", { className: R, children: [
|
|
927
|
+
/* @__PURE__ */ h.jsx(
|
|
928
|
+
"input",
|
|
929
|
+
{
|
|
930
|
+
id: n,
|
|
931
|
+
name: f,
|
|
932
|
+
type: "checkbox",
|
|
933
|
+
className: Q.input,
|
|
934
|
+
disabled: s,
|
|
935
|
+
required: l,
|
|
936
|
+
checked: y,
|
|
937
|
+
onChange: g,
|
|
938
|
+
"aria-label": _ ? o : void 0,
|
|
939
|
+
...d
|
|
940
|
+
}
|
|
941
|
+
),
|
|
942
|
+
/* @__PURE__ */ h.jsx(ve, { label: o, required: l, inputId: n, className: C, isTextHidden: _ })
|
|
754
943
|
] });
|
|
755
944
|
};
|
|
756
945
|
export {
|
|
757
|
-
|
|
758
|
-
|
|
946
|
+
V as ChopIcon,
|
|
947
|
+
cn as ChopLogicButton,
|
|
948
|
+
fn as ChopLogicCheckbox,
|
|
949
|
+
un as ChopLogicSelect,
|
|
950
|
+
ln as ChopLogicTextInput
|
|
759
951
|
};
|
|
760
952
|
//# sourceMappingURL=index.es.js.map
|