chop-logic-components 0.1.0 → 0.2.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/index.d.ts +1 -0
- package/dist/components/inputs/select/Select.d.ts +14 -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/index.cjs.js +10 -10
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +573 -418
- 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 +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
var
|
|
1
|
+
import Ue, { useState as de, useEffect as Er, useRef as wr } from "react";
|
|
2
|
+
var ve = { exports: {} }, q = {};
|
|
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
|
|
19
|
-
var
|
|
20
|
-
|
|
21
|
-
for (
|
|
22
|
-
|
|
23
|
-
if (
|
|
24
|
-
for (
|
|
25
|
-
|
|
26
|
-
return { $$typeof:
|
|
12
|
+
var Le;
|
|
13
|
+
function xr() {
|
|
14
|
+
if (Le)
|
|
15
|
+
return q;
|
|
16
|
+
Le = 1;
|
|
17
|
+
var a = Ue, u = Symbol.for("react.element"), o = Symbol.for("react.fragment"), l = Object.prototype.hasOwnProperty, d = a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, m = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
18
|
+
function b(y, v, C) {
|
|
19
|
+
var c, x = {}, R = null, g = null;
|
|
20
|
+
C !== void 0 && (R = "" + C), v.key !== void 0 && (R = "" + v.key), v.ref !== void 0 && (g = v.ref);
|
|
21
|
+
for (c in v)
|
|
22
|
+
l.call(v, c) && !m.hasOwnProperty(c) && (x[c] = v[c]);
|
|
23
|
+
if (y && y.defaultProps)
|
|
24
|
+
for (c in v = y.defaultProps, v)
|
|
25
|
+
x[c] === void 0 && (x[c] = v[c]);
|
|
26
|
+
return { $$typeof: u, type: y, key: R, ref: g, props: x, _owner: d.current };
|
|
27
27
|
}
|
|
28
|
-
return
|
|
28
|
+
return q.Fragment = o, q.jsx = b, q.jsxs = b, q;
|
|
29
29
|
}
|
|
30
|
-
var
|
|
30
|
+
var K = {};
|
|
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 We;
|
|
41
|
+
function Rr() {
|
|
42
|
+
return We || (We = 1, process.env.NODE_ENV !== "production" && function() {
|
|
43
|
+
var a = Ue, u = Symbol.for("react.element"), o = Symbol.for("react.portal"), l = Symbol.for("react.fragment"), d = Symbol.for("react.strict_mode"), m = Symbol.for("react.profiler"), b = Symbol.for("react.provider"), y = Symbol.for("react.context"), v = Symbol.for("react.forward_ref"), C = Symbol.for("react.suspense"), c = Symbol.for("react.suspense_list"), x = Symbol.for("react.memo"), R = Symbol.for("react.lazy"), g = Symbol.for("react.offscreen"), T = Symbol.iterator, V = "@@iterator";
|
|
44
|
+
function N(e) {
|
|
45
45
|
if (e === null || typeof e != "object")
|
|
46
46
|
return null;
|
|
47
|
-
var r =
|
|
47
|
+
var r = T && e[T] || e[V];
|
|
48
48
|
return typeof r == "function" ? r : null;
|
|
49
49
|
}
|
|
50
|
-
var S =
|
|
51
|
-
function
|
|
50
|
+
var S = a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
51
|
+
function E(e) {
|
|
52
52
|
{
|
|
53
|
-
for (var r = arguments.length,
|
|
54
|
-
t
|
|
55
|
-
|
|
53
|
+
for (var r = arguments.length, n = new Array(r > 1 ? r - 1 : 0), t = 1; t < r; t++)
|
|
54
|
+
n[t - 1] = arguments[t];
|
|
55
|
+
Z("error", e, n);
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function Z(e, r, n) {
|
|
59
59
|
{
|
|
60
|
-
var
|
|
61
|
-
|
|
62
|
-
var
|
|
63
|
-
return String(
|
|
60
|
+
var t = S.ReactDebugCurrentFrame, f = t.getStackAddendum();
|
|
61
|
+
f !== "" && (r += "%s", n = n.concat([f]));
|
|
62
|
+
var p = n.map(function(s) {
|
|
63
|
+
return String(s);
|
|
64
64
|
});
|
|
65
|
-
|
|
65
|
+
p.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, p);
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
var
|
|
69
|
-
|
|
70
|
-
function
|
|
71
|
-
return !!(typeof e == "string" || typeof e == "function" || e ===
|
|
68
|
+
var ee = !1, J = !1, re = !1, Be = !1, qe = !1, pe;
|
|
69
|
+
pe = Symbol.for("react.module.reference");
|
|
70
|
+
function Ke(e) {
|
|
71
|
+
return !!(typeof e == "string" || typeof e == "function" || e === l || e === m || qe || e === d || e === C || e === c || Be || e === g || ee || J || re || typeof e == "object" && e !== null && (e.$$typeof === R || e.$$typeof === x || e.$$typeof === b || e.$$typeof === y || e.$$typeof === v || // 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 === pe || e.getModuleId !== void 0));
|
|
76
76
|
}
|
|
77
|
-
function
|
|
78
|
-
var
|
|
79
|
-
if (
|
|
80
|
-
return
|
|
81
|
-
var
|
|
82
|
-
return
|
|
77
|
+
function Je(e, r, n) {
|
|
78
|
+
var t = e.displayName;
|
|
79
|
+
if (t)
|
|
80
|
+
return t;
|
|
81
|
+
var f = r.displayName || r.name || "";
|
|
82
|
+
return f !== "" ? n + "(" + f + ")" : n;
|
|
83
83
|
}
|
|
84
|
-
function
|
|
84
|
+
function be(e) {
|
|
85
85
|
return e.displayName || "Context";
|
|
86
86
|
}
|
|
87
|
-
function
|
|
87
|
+
function P(e) {
|
|
88
88
|
if (e == null)
|
|
89
89
|
return null;
|
|
90
|
-
if (typeof e.tag == "number" &&
|
|
90
|
+
if (typeof e.tag == "number" && E("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 l:
|
|
96
96
|
return "Fragment";
|
|
97
|
-
case
|
|
97
|
+
case o:
|
|
98
98
|
return "Portal";
|
|
99
|
-
case
|
|
99
|
+
case m:
|
|
100
100
|
return "Profiler";
|
|
101
|
-
case
|
|
101
|
+
case d:
|
|
102
102
|
return "StrictMode";
|
|
103
|
-
case
|
|
103
|
+
case C:
|
|
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
|
|
110
|
+
case y:
|
|
111
111
|
var r = e;
|
|
112
|
-
return
|
|
113
|
-
case
|
|
114
|
-
var
|
|
115
|
-
return
|
|
116
|
-
case
|
|
117
|
-
return
|
|
118
|
-
case
|
|
119
|
-
var
|
|
120
|
-
return
|
|
121
|
-
case
|
|
122
|
-
var
|
|
112
|
+
return be(r) + ".Consumer";
|
|
113
|
+
case b:
|
|
114
|
+
var n = e;
|
|
115
|
+
return be(n._context) + ".Provider";
|
|
116
|
+
case v:
|
|
117
|
+
return Je(e, e.render, "ForwardRef");
|
|
118
|
+
case x:
|
|
119
|
+
var t = e.displayName || null;
|
|
120
|
+
return t !== null ? t : P(e.type) || "Memo";
|
|
121
|
+
case R: {
|
|
122
|
+
var f = e, p = f._payload, s = f._init;
|
|
123
123
|
try {
|
|
124
|
-
return
|
|
124
|
+
return P(s(p));
|
|
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 F = Object.assign, U = 0, _e, me, he, ye, ge, Ee, we;
|
|
133
|
+
function xe() {
|
|
134
134
|
}
|
|
135
|
-
|
|
136
|
-
function
|
|
135
|
+
xe.__reactDisabledLog = !0;
|
|
136
|
+
function Ge() {
|
|
137
137
|
{
|
|
138
|
-
if (
|
|
139
|
-
|
|
138
|
+
if (U === 0) {
|
|
139
|
+
_e = console.log, me = console.info, he = console.warn, ye = console.error, ge = console.group, Ee = console.groupCollapsed, we = console.groupEnd;
|
|
140
140
|
var e = {
|
|
141
141
|
configurable: !0,
|
|
142
142
|
enumerable: !0,
|
|
143
|
-
value:
|
|
143
|
+
value: xe,
|
|
144
144
|
writable: !0
|
|
145
145
|
};
|
|
146
146
|
Object.defineProperties(console, {
|
|
@@ -153,336 +153,336 @@ function yr() {
|
|
|
153
153
|
groupEnd: e
|
|
154
154
|
});
|
|
155
155
|
}
|
|
156
|
-
|
|
156
|
+
U++;
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
|
-
function
|
|
159
|
+
function ze() {
|
|
160
160
|
{
|
|
161
|
-
if (
|
|
161
|
+
if (U--, U === 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: F({}, e, {
|
|
169
|
+
value: _e
|
|
170
170
|
}),
|
|
171
|
-
info:
|
|
172
|
-
value:
|
|
171
|
+
info: F({}, e, {
|
|
172
|
+
value: me
|
|
173
173
|
}),
|
|
174
|
-
warn:
|
|
175
|
-
value:
|
|
174
|
+
warn: F({}, e, {
|
|
175
|
+
value: he
|
|
176
176
|
}),
|
|
177
|
-
error:
|
|
178
|
-
value:
|
|
177
|
+
error: F({}, e, {
|
|
178
|
+
value: ye
|
|
179
179
|
}),
|
|
180
|
-
group:
|
|
181
|
-
value:
|
|
180
|
+
group: F({}, e, {
|
|
181
|
+
value: ge
|
|
182
182
|
}),
|
|
183
|
-
groupCollapsed:
|
|
184
|
-
value:
|
|
183
|
+
groupCollapsed: F({}, e, {
|
|
184
|
+
value: Ee
|
|
185
185
|
}),
|
|
186
|
-
groupEnd:
|
|
187
|
-
value:
|
|
186
|
+
groupEnd: F({}, e, {
|
|
187
|
+
value: we
|
|
188
188
|
})
|
|
189
189
|
});
|
|
190
190
|
}
|
|
191
|
-
|
|
191
|
+
U < 0 && E("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
|
-
var
|
|
195
|
-
function
|
|
194
|
+
var ne = S.ReactCurrentDispatcher, te;
|
|
195
|
+
function G(e, r, n) {
|
|
196
196
|
{
|
|
197
|
-
if (
|
|
197
|
+
if (te === void 0)
|
|
198
198
|
try {
|
|
199
199
|
throw Error();
|
|
200
|
-
} catch (
|
|
201
|
-
var
|
|
202
|
-
|
|
200
|
+
} catch (f) {
|
|
201
|
+
var t = f.stack.trim().match(/\n( *(at )?)/);
|
|
202
|
+
te = t && t[1] || "";
|
|
203
203
|
}
|
|
204
204
|
return `
|
|
205
|
-
` +
|
|
205
|
+
` + te + e;
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
|
-
var
|
|
208
|
+
var ae = !1, z;
|
|
209
209
|
{
|
|
210
|
-
var
|
|
211
|
-
|
|
210
|
+
var Xe = typeof WeakMap == "function" ? WeakMap : Map;
|
|
211
|
+
z = new Xe();
|
|
212
212
|
}
|
|
213
|
-
function
|
|
214
|
-
if (!e ||
|
|
213
|
+
function Re(e, r) {
|
|
214
|
+
if (!e || ae)
|
|
215
215
|
return "";
|
|
216
216
|
{
|
|
217
|
-
var
|
|
218
|
-
if (
|
|
219
|
-
return
|
|
217
|
+
var n = z.get(e);
|
|
218
|
+
if (n !== void 0)
|
|
219
|
+
return n;
|
|
220
220
|
}
|
|
221
|
-
var
|
|
222
|
-
|
|
223
|
-
var
|
|
221
|
+
var t;
|
|
222
|
+
ae = !0;
|
|
223
|
+
var f = Error.prepareStackTrace;
|
|
224
224
|
Error.prepareStackTrace = void 0;
|
|
225
|
-
var
|
|
226
|
-
|
|
225
|
+
var p;
|
|
226
|
+
p = ne.current, ne.current = null, Ge();
|
|
227
227
|
try {
|
|
228
228
|
if (r) {
|
|
229
|
-
var
|
|
229
|
+
var s = function() {
|
|
230
230
|
throw Error();
|
|
231
231
|
};
|
|
232
|
-
if (Object.defineProperty(
|
|
232
|
+
if (Object.defineProperty(s.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(s, []);
|
|
239
|
+
} catch (O) {
|
|
240
|
+
t = O;
|
|
241
241
|
}
|
|
242
|
-
Reflect.construct(e, [],
|
|
242
|
+
Reflect.construct(e, [], s);
|
|
243
243
|
} else {
|
|
244
244
|
try {
|
|
245
|
-
|
|
246
|
-
} catch (
|
|
247
|
-
|
|
245
|
+
s.call();
|
|
246
|
+
} catch (O) {
|
|
247
|
+
t = O;
|
|
248
248
|
}
|
|
249
|
-
e.call(
|
|
249
|
+
e.call(s.prototype);
|
|
250
250
|
}
|
|
251
251
|
} else {
|
|
252
252
|
try {
|
|
253
253
|
throw Error();
|
|
254
|
-
} catch (
|
|
255
|
-
|
|
254
|
+
} catch (O) {
|
|
255
|
+
t = O;
|
|
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 (O) {
|
|
260
|
+
if (O && t && typeof O.stack == "string") {
|
|
261
|
+
for (var i = O.stack.split(`
|
|
262
|
+
`), j = t.stack.split(`
|
|
263
|
+
`), h = i.length - 1, w = j.length - 1; h >= 1 && w >= 0 && i[h] !== j[w]; )
|
|
264
|
+
w--;
|
|
265
|
+
for (; h >= 1 && w >= 0; h--, w--)
|
|
266
|
+
if (i[h] !== j[w]) {
|
|
267
|
+
if (h !== 1 || w !== 1)
|
|
268
268
|
do
|
|
269
|
-
if (
|
|
270
|
-
var
|
|
271
|
-
` +
|
|
272
|
-
return e.displayName &&
|
|
269
|
+
if (h--, w--, w < 0 || i[h] !== j[w]) {
|
|
270
|
+
var k = `
|
|
271
|
+
` + i[h].replace(" at new ", " at ");
|
|
272
|
+
return e.displayName && k.includes("<anonymous>") && (k = k.replace("<anonymous>", e.displayName)), typeof e == "function" && z.set(e, k), k;
|
|
273
273
|
}
|
|
274
|
-
while (
|
|
274
|
+
while (h >= 1 && w >= 0);
|
|
275
275
|
break;
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
278
|
} finally {
|
|
279
|
-
|
|
279
|
+
ae = !1, ne.current = p, ze(), Error.prepareStackTrace = f;
|
|
280
280
|
}
|
|
281
|
-
var
|
|
282
|
-
return typeof e == "function" &&
|
|
281
|
+
var W = e ? e.displayName || e.name : "", A = W ? G(W) : "";
|
|
282
|
+
return typeof e == "function" && z.set(e, A), A;
|
|
283
283
|
}
|
|
284
|
-
function
|
|
285
|
-
return
|
|
284
|
+
function He(e, r, n) {
|
|
285
|
+
return Re(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 X(e, r, n) {
|
|
292
292
|
if (e == null)
|
|
293
293
|
return "";
|
|
294
294
|
if (typeof e == "function")
|
|
295
|
-
return
|
|
295
|
+
return Re(e, Qe(e));
|
|
296
296
|
if (typeof e == "string")
|
|
297
|
-
return
|
|
297
|
+
return G(e);
|
|
298
298
|
switch (e) {
|
|
299
|
-
case
|
|
300
|
-
return
|
|
301
|
-
case
|
|
302
|
-
return
|
|
299
|
+
case C:
|
|
300
|
+
return G("Suspense");
|
|
301
|
+
case c:
|
|
302
|
+
return G("SuspenseList");
|
|
303
303
|
}
|
|
304
304
|
if (typeof e == "object")
|
|
305
305
|
switch (e.$$typeof) {
|
|
306
|
-
case
|
|
307
|
-
return
|
|
308
|
-
case
|
|
309
|
-
return
|
|
310
|
-
case
|
|
311
|
-
var
|
|
306
|
+
case v:
|
|
307
|
+
return He(e.render);
|
|
308
|
+
case x:
|
|
309
|
+
return X(e.type, r, n);
|
|
310
|
+
case R: {
|
|
311
|
+
var t = e, f = t._payload, p = t._init;
|
|
312
312
|
try {
|
|
313
|
-
return
|
|
313
|
+
return X(p(f), r, n);
|
|
314
314
|
} catch {
|
|
315
315
|
}
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
318
|
return "";
|
|
319
319
|
}
|
|
320
|
-
var
|
|
321
|
-
function
|
|
320
|
+
var M = Object.prototype.hasOwnProperty, Ce = {}, je = S.ReactDebugCurrentFrame;
|
|
321
|
+
function H(e) {
|
|
322
322
|
if (e) {
|
|
323
|
-
var r = e._owner,
|
|
324
|
-
|
|
323
|
+
var r = e._owner, n = X(e.type, e._source, r ? r.type : null);
|
|
324
|
+
je.setExtraStackFrame(n);
|
|
325
325
|
} else
|
|
326
|
-
|
|
326
|
+
je.setExtraStackFrame(null);
|
|
327
327
|
}
|
|
328
|
-
function
|
|
328
|
+
function Ze(e, r, n, t, f) {
|
|
329
329
|
{
|
|
330
|
-
var
|
|
331
|
-
for (var
|
|
332
|
-
if (
|
|
333
|
-
var
|
|
330
|
+
var p = Function.call.bind(M);
|
|
331
|
+
for (var s in e)
|
|
332
|
+
if (p(e, s)) {
|
|
333
|
+
var i = void 0;
|
|
334
334
|
try {
|
|
335
|
-
if (typeof e[
|
|
336
|
-
var
|
|
337
|
-
throw
|
|
335
|
+
if (typeof e[s] != "function") {
|
|
336
|
+
var j = Error((t || "React class") + ": " + n + " type `" + s + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[s] + "`.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[s](r, s, t, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
340
|
+
} catch (h) {
|
|
341
|
+
i = h;
|
|
342
342
|
}
|
|
343
|
-
|
|
343
|
+
i && !(i instanceof Error) && (H(f), E("%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).", t || "React class", n, s, typeof i), H(null)), i instanceof Error && !(i.message in Ce) && (Ce[i.message] = !0, H(f), E("Failed %s type: %s", n, i.message), H(null));
|
|
344
344
|
}
|
|
345
345
|
}
|
|
346
346
|
}
|
|
347
|
-
var
|
|
348
|
-
function
|
|
349
|
-
return
|
|
347
|
+
var er = Array.isArray;
|
|
348
|
+
function oe(e) {
|
|
349
|
+
return er(e);
|
|
350
350
|
}
|
|
351
|
-
function
|
|
351
|
+
function rr(e) {
|
|
352
352
|
{
|
|
353
|
-
var r = typeof Symbol == "function" && Symbol.toStringTag,
|
|
354
|
-
return
|
|
353
|
+
var r = typeof Symbol == "function" && Symbol.toStringTag, n = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
354
|
+
return n;
|
|
355
355
|
}
|
|
356
356
|
}
|
|
357
|
-
function
|
|
357
|
+
function nr(e) {
|
|
358
358
|
try {
|
|
359
|
-
return
|
|
359
|
+
return Te(e), !1;
|
|
360
360
|
} catch {
|
|
361
361
|
return !0;
|
|
362
362
|
}
|
|
363
363
|
}
|
|
364
|
-
function
|
|
364
|
+
function Te(e) {
|
|
365
365
|
return "" + e;
|
|
366
366
|
}
|
|
367
|
-
function
|
|
368
|
-
if (
|
|
369
|
-
return
|
|
367
|
+
function Oe(e) {
|
|
368
|
+
if (nr(e))
|
|
369
|
+
return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", rr(e)), Te(e);
|
|
370
370
|
}
|
|
371
|
-
var
|
|
371
|
+
var B = S.ReactCurrentOwner, tr = {
|
|
372
372
|
key: !0,
|
|
373
373
|
ref: !0,
|
|
374
374
|
__self: !0,
|
|
375
375
|
__source: !0
|
|
376
|
-
},
|
|
377
|
-
|
|
378
|
-
function
|
|
379
|
-
if (
|
|
376
|
+
}, Se, ke, ie;
|
|
377
|
+
ie = {};
|
|
378
|
+
function ar(e) {
|
|
379
|
+
if (M.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 or(e) {
|
|
387
|
+
if (M.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
|
|
397
|
-
|
|
394
|
+
function ir(e, r) {
|
|
395
|
+
if (typeof e.ref == "string" && B.current && r && B.current.stateNode !== r) {
|
|
396
|
+
var n = P(B.current.type);
|
|
397
|
+
ie[n] || (E('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', P(B.current.type), e.ref), ie[n] = !0);
|
|
398
398
|
}
|
|
399
399
|
}
|
|
400
|
-
function
|
|
400
|
+
function sr(e, r) {
|
|
401
401
|
{
|
|
402
|
-
var
|
|
403
|
-
|
|
402
|
+
var n = function() {
|
|
403
|
+
Se || (Se = !0, E("%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
|
-
|
|
406
|
-
get:
|
|
405
|
+
n.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
406
|
+
get: n,
|
|
407
407
|
configurable: !0
|
|
408
408
|
});
|
|
409
409
|
}
|
|
410
410
|
}
|
|
411
|
-
function
|
|
411
|
+
function cr(e, r) {
|
|
412
412
|
{
|
|
413
|
-
var
|
|
414
|
-
|
|
413
|
+
var n = function() {
|
|
414
|
+
ke || (ke = !0, E("%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
|
-
|
|
417
|
-
get:
|
|
416
|
+
n.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
417
|
+
get: n,
|
|
418
418
|
configurable: !0
|
|
419
419
|
});
|
|
420
420
|
}
|
|
421
421
|
}
|
|
422
|
-
var
|
|
423
|
-
var
|
|
422
|
+
var lr = function(e, r, n, t, f, p, s) {
|
|
423
|
+
var i = {
|
|
424
424
|
// This tag allows us to uniquely identify this as a React Element
|
|
425
|
-
$$typeof:
|
|
425
|
+
$$typeof: u,
|
|
426
426
|
// Built-in properties that belong on the element
|
|
427
427
|
type: e,
|
|
428
428
|
key: r,
|
|
429
|
-
ref:
|
|
430
|
-
props:
|
|
429
|
+
ref: n,
|
|
430
|
+
props: s,
|
|
431
431
|
// Record the component responsible for creating this element.
|
|
432
|
-
_owner:
|
|
432
|
+
_owner: p
|
|
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: t
|
|
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: f
|
|
449
|
+
}), Object.freeze && (Object.freeze(i.props), Object.freeze(i)), i;
|
|
450
450
|
};
|
|
451
|
-
function
|
|
451
|
+
function ur(e, r, n, t, f) {
|
|
452
452
|
{
|
|
453
|
-
var
|
|
454
|
-
|
|
455
|
-
for (
|
|
456
|
-
|
|
453
|
+
var p, s = {}, i = null, j = null;
|
|
454
|
+
n !== void 0 && (Oe(n), i = "" + n), or(r) && (Oe(r.key), i = "" + r.key), ar(r) && (j = r.ref, ir(r, f));
|
|
455
|
+
for (p in r)
|
|
456
|
+
M.call(r, p) && !tr.hasOwnProperty(p) && (s[p] = r[p]);
|
|
457
457
|
if (e && e.defaultProps) {
|
|
458
|
-
var
|
|
459
|
-
for (
|
|
460
|
-
|
|
458
|
+
var h = e.defaultProps;
|
|
459
|
+
for (p in h)
|
|
460
|
+
s[p] === void 0 && (s[p] = h[p]);
|
|
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 && sr(s, w), j && cr(s, w);
|
|
465
465
|
}
|
|
466
|
-
return
|
|
466
|
+
return lr(e, i, j, f, t, B.current, s);
|
|
467
467
|
}
|
|
468
468
|
}
|
|
469
|
-
var
|
|
470
|
-
function
|
|
469
|
+
var se = S.ReactCurrentOwner, Pe = S.ReactDebugCurrentFrame;
|
|
470
|
+
function L(e) {
|
|
471
471
|
if (e) {
|
|
472
|
-
var r = e._owner,
|
|
473
|
-
|
|
472
|
+
var r = e._owner, n = X(e.type, e._source, r ? r.type : null);
|
|
473
|
+
Pe.setExtraStackFrame(n);
|
|
474
474
|
} else
|
|
475
|
-
|
|
475
|
+
Pe.setExtraStackFrame(null);
|
|
476
476
|
}
|
|
477
|
-
var
|
|
478
|
-
|
|
479
|
-
function
|
|
480
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
477
|
+
var ce;
|
|
478
|
+
ce = !1;
|
|
479
|
+
function le(e) {
|
|
480
|
+
return typeof e == "object" && e !== null && e.$$typeof === u;
|
|
481
481
|
}
|
|
482
|
-
function
|
|
482
|
+
function De() {
|
|
483
483
|
{
|
|
484
|
-
if (
|
|
485
|
-
var e =
|
|
484
|
+
if (se.current) {
|
|
485
|
+
var e = P(se.current.type);
|
|
486
486
|
if (e)
|
|
487
487
|
return `
|
|
488
488
|
|
|
@@ -491,169 +491,169 @@ Check the render method of \`` + e + "`.";
|
|
|
491
491
|
return "";
|
|
492
492
|
}
|
|
493
493
|
}
|
|
494
|
-
function
|
|
494
|
+
function fr(e) {
|
|
495
495
|
return "";
|
|
496
496
|
}
|
|
497
|
-
var
|
|
498
|
-
function
|
|
497
|
+
var Ie = {};
|
|
498
|
+
function dr(e) {
|
|
499
499
|
{
|
|
500
|
-
var r =
|
|
500
|
+
var r = De();
|
|
501
501
|
if (!r) {
|
|
502
|
-
var
|
|
503
|
-
|
|
502
|
+
var n = typeof e == "string" ? e : e.displayName || e.name;
|
|
503
|
+
n && (r = `
|
|
504
504
|
|
|
505
|
-
Check the top-level render call using <` +
|
|
505
|
+
Check the top-level render call using <` + n + ">.");
|
|
506
506
|
}
|
|
507
507
|
return r;
|
|
508
508
|
}
|
|
509
509
|
}
|
|
510
|
-
function
|
|
510
|
+
function Fe(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
|
|
516
|
-
if (
|
|
515
|
+
var n = dr(r);
|
|
516
|
+
if (Ie[n])
|
|
517
517
|
return;
|
|
518
|
-
|
|
519
|
-
var
|
|
520
|
-
e && e._owner && e._owner !==
|
|
518
|
+
Ie[n] = !0;
|
|
519
|
+
var t = "";
|
|
520
|
+
e && e._owner && e._owner !== se.current && (t = " It was passed a child from " + P(e._owner.type) + "."), L(e), E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', n, t), L(null);
|
|
521
521
|
}
|
|
522
522
|
}
|
|
523
|
-
function
|
|
523
|
+
function Ae(e, r) {
|
|
524
524
|
{
|
|
525
525
|
if (typeof e != "object")
|
|
526
526
|
return;
|
|
527
|
-
if (
|
|
528
|
-
for (var
|
|
529
|
-
var
|
|
530
|
-
|
|
527
|
+
if (oe(e))
|
|
528
|
+
for (var n = 0; n < e.length; n++) {
|
|
529
|
+
var t = e[n];
|
|
530
|
+
le(t) && Fe(t, r);
|
|
531
531
|
}
|
|
532
|
-
else if (
|
|
532
|
+
else if (le(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 f = N(e);
|
|
536
|
+
if (typeof f == "function" && f !== e.entries)
|
|
537
|
+
for (var p = f.call(e), s; !(s = p.next()).done; )
|
|
538
|
+
le(s.value) && Fe(s.value, r);
|
|
539
539
|
}
|
|
540
540
|
}
|
|
541
541
|
}
|
|
542
|
-
function
|
|
542
|
+
function vr(e) {
|
|
543
543
|
{
|
|
544
544
|
var r = e.type;
|
|
545
545
|
if (r == null || typeof r == "string")
|
|
546
546
|
return;
|
|
547
|
-
var
|
|
547
|
+
var n;
|
|
548
548
|
if (typeof r == "function")
|
|
549
|
-
|
|
550
|
-
else if (typeof r == "object" && (r.$$typeof ===
|
|
549
|
+
n = r.propTypes;
|
|
550
|
+
else if (typeof r == "object" && (r.$$typeof === v || // Note: Memo only checks outer props here.
|
|
551
551
|
// Inner props are checked in the reconciler.
|
|
552
|
-
r.$$typeof ===
|
|
553
|
-
|
|
552
|
+
r.$$typeof === x))
|
|
553
|
+
n = r.propTypes;
|
|
554
554
|
else
|
|
555
555
|
return;
|
|
556
|
-
if (
|
|
557
|
-
var
|
|
558
|
-
|
|
559
|
-
} else if (r.PropTypes !== void 0 && !
|
|
560
|
-
|
|
561
|
-
var
|
|
562
|
-
|
|
556
|
+
if (n) {
|
|
557
|
+
var t = P(r);
|
|
558
|
+
Ze(n, e.props, "prop", t, e);
|
|
559
|
+
} else if (r.PropTypes !== void 0 && !ce) {
|
|
560
|
+
ce = !0;
|
|
561
|
+
var f = P(r);
|
|
562
|
+
E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", f || "Unknown");
|
|
563
563
|
}
|
|
564
|
-
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved &&
|
|
564
|
+
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
565
565
|
}
|
|
566
566
|
}
|
|
567
|
-
function
|
|
567
|
+
function pr(e) {
|
|
568
568
|
{
|
|
569
|
-
for (var r = Object.keys(e.props),
|
|
570
|
-
var
|
|
571
|
-
if (
|
|
572
|
-
|
|
569
|
+
for (var r = Object.keys(e.props), n = 0; n < r.length; n++) {
|
|
570
|
+
var t = r[n];
|
|
571
|
+
if (t !== "children" && t !== "key") {
|
|
572
|
+
L(e), E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", t), L(null);
|
|
573
573
|
break;
|
|
574
574
|
}
|
|
575
575
|
}
|
|
576
|
-
e.ref !== null && (
|
|
576
|
+
e.ref !== null && (L(e), E("Invalid attribute `ref` supplied to `React.Fragment`."), L(null));
|
|
577
577
|
}
|
|
578
578
|
}
|
|
579
|
-
var
|
|
580
|
-
function
|
|
579
|
+
var $e = {};
|
|
580
|
+
function Ne(e, r, n, t, f, p) {
|
|
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 s = Ke(e);
|
|
583
|
+
if (!s) {
|
|
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 = fr();
|
|
587
|
+
j ? i += j : i += De();
|
|
588
|
+
var h;
|
|
589
|
+
e === null ? h = "null" : oe(e) ? h = "array" : e !== void 0 && e.$$typeof === u ? (h = "<" + (P(e.type) || "Unknown") + " />", i = " Did you accidentally export a JSX literal instead of a component?") : h = typeof e, E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", h, 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 = ur(e, r, n, f, p);
|
|
592
|
+
if (w == null)
|
|
593
|
+
return w;
|
|
594
|
+
if (s) {
|
|
595
|
+
var k = r.children;
|
|
596
|
+
if (k !== void 0)
|
|
597
|
+
if (t)
|
|
598
|
+
if (oe(k)) {
|
|
599
|
+
for (var W = 0; W < k.length; W++)
|
|
600
|
+
Ae(k[W], e);
|
|
601
|
+
Object.freeze && Object.freeze(k);
|
|
602
602
|
} else
|
|
603
|
-
|
|
603
|
+
E("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
|
+
Ae(k, e);
|
|
606
606
|
}
|
|
607
|
-
if (
|
|
608
|
-
var
|
|
609
|
-
return
|
|
610
|
-
}),
|
|
611
|
-
if (
|
|
612
|
-
var
|
|
613
|
-
|
|
607
|
+
if (M.call(r, "key")) {
|
|
608
|
+
var A = P(e), O = Object.keys(r).filter(function(gr) {
|
|
609
|
+
return gr !== "key";
|
|
610
|
+
}), ue = O.length > 0 ? "{key: someKey, " + O.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
611
|
+
if (!$e[A + ue]) {
|
|
612
|
+
var yr = O.length > 0 ? "{" + O.join(": ..., ") + ": ...}" : "{}";
|
|
613
|
+
E(`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} />`, ue, A, yr, A), $e[A + ue] = !0;
|
|
619
619
|
}
|
|
620
620
|
}
|
|
621
|
-
return e ===
|
|
621
|
+
return e === l ? pr(w) : vr(w), w;
|
|
622
622
|
}
|
|
623
623
|
}
|
|
624
|
-
function
|
|
625
|
-
return
|
|
624
|
+
function br(e, r, n) {
|
|
625
|
+
return Ne(e, r, n, !0);
|
|
626
626
|
}
|
|
627
|
-
function
|
|
628
|
-
return
|
|
627
|
+
function _r(e, r, n) {
|
|
628
|
+
return Ne(e, r, n, !1);
|
|
629
629
|
}
|
|
630
|
-
var
|
|
631
|
-
|
|
632
|
-
}()),
|
|
630
|
+
var mr = _r, hr = br;
|
|
631
|
+
K.Fragment = l, K.jsx = mr, K.jsxs = hr;
|
|
632
|
+
}()), K;
|
|
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" ? ve.exports = xr() : ve.exports = Rr();
|
|
635
|
+
var _ = ve.exports;
|
|
636
|
+
const Cr = "_button_rrb70_1", jr = "_text_rrb70_21", Tr = "_primary_rrb70_26", Or = "_danger_rrb70_27", Sr = "_secondary_rrb70_50", kr = "_disabled_rrb70_66", Y = {
|
|
637
|
+
button: Cr,
|
|
638
|
+
text: jr,
|
|
639
|
+
primary: Tr,
|
|
640
|
+
danger: Or,
|
|
641
|
+
secondary: Sr,
|
|
642
|
+
disabled: kr
|
|
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 I(a) {
|
|
645
|
+
return a.map((o) => {
|
|
646
|
+
if (typeof o == "string")
|
|
647
|
+
return o.trim();
|
|
648
|
+
if (typeof o == "object") {
|
|
649
|
+
const l = [];
|
|
650
|
+
for (const d in o)
|
|
651
|
+
o[d] && l.push(d.trim());
|
|
652
|
+
return l.join(" ");
|
|
653
|
+
}
|
|
654
|
+
}).filter((o) => !!o).join(" ");
|
|
655
655
|
}
|
|
656
|
-
const
|
|
656
|
+
const Q = {
|
|
657
657
|
CheckMark: "✓",
|
|
658
658
|
Ballot: "✗",
|
|
659
659
|
ClockwiseTop: "↷",
|
|
@@ -670,91 +670,246 @@ const wr = {
|
|
|
670
670
|
Hart: "♥",
|
|
671
671
|
Scissors: "✂",
|
|
672
672
|
Star: "★"
|
|
673
|
-
},
|
|
674
|
-
const
|
|
675
|
-
|
|
676
|
-
|
|
673
|
+
}, rn = ({ disabled: a, onClick: u, text: o = "Ok", type: l = "button", view: d = "primary", icon: m, ...b }) => {
|
|
674
|
+
const y = I([
|
|
675
|
+
Y.button,
|
|
676
|
+
b == null ? void 0 : b.className,
|
|
677
677
|
{
|
|
678
|
-
[
|
|
679
|
-
[
|
|
680
|
-
[
|
|
681
|
-
[
|
|
678
|
+
[Y.primary]: d === "primary",
|
|
679
|
+
[Y.secondary]: d === "secondary",
|
|
680
|
+
[Y.danger]: d === "danger",
|
|
681
|
+
[Y.disabled]: !!a
|
|
682
682
|
}
|
|
683
683
|
]);
|
|
684
|
-
return /* @__PURE__ */
|
|
685
|
-
|
|
686
|
-
/* @__PURE__ */
|
|
684
|
+
return /* @__PURE__ */ _.jsxs("button", { type: l, className: y, onClick: a ? void 0 : u, disabled: a, ...b, children: [
|
|
685
|
+
m && /* @__PURE__ */ _.jsx("span", { children: `${Q[m]}` }),
|
|
686
|
+
/* @__PURE__ */ _.jsx("span", { className: Y.text, children: o })
|
|
687
687
|
] });
|
|
688
|
-
},
|
|
689
|
-
container:
|
|
690
|
-
wrapper:
|
|
691
|
-
input:
|
|
692
|
-
invalid:
|
|
693
|
-
error:
|
|
694
|
-
disabled:
|
|
695
|
-
},
|
|
696
|
-
label:
|
|
697
|
-
required:
|
|
698
|
-
},
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
] }),
|
|
702
|
-
message:
|
|
703
|
-
visible:
|
|
704
|
-
},
|
|
705
|
-
errorId:
|
|
706
|
-
message:
|
|
707
|
-
className:
|
|
708
|
-
visible:
|
|
709
|
-
}) => /* @__PURE__ */
|
|
710
|
-
id:
|
|
711
|
-
name:
|
|
712
|
-
label:
|
|
713
|
-
disabled:
|
|
714
|
-
placeholder:
|
|
715
|
-
valid:
|
|
716
|
-
required:
|
|
717
|
-
errorMessage:
|
|
718
|
-
defaultValue:
|
|
719
|
-
onChange:
|
|
720
|
-
...
|
|
688
|
+
}, Pr = "_container_b5mrn_1", Dr = "_wrapper_b5mrn_7", Ir = "_input_b5mrn_21", Fr = "_invalid_b5mrn_27", Ar = "_error_b5mrn_47", $r = "_disabled_b5mrn_51", $ = {
|
|
689
|
+
container: Pr,
|
|
690
|
+
wrapper: Dr,
|
|
691
|
+
input: Ir,
|
|
692
|
+
invalid: Fr,
|
|
693
|
+
error: Ar,
|
|
694
|
+
disabled: $r
|
|
695
|
+
}, Nr = "_label_195p3_1", Lr = "_required_195p3_10", Ye = {
|
|
696
|
+
label: Nr,
|
|
697
|
+
required: Lr
|
|
698
|
+
}, Me = ({ label: a, required: u, inputId: o, className: l }) => /* @__PURE__ */ _.jsxs("label", { htmlFor: o, className: I([Ye.label, l]), children: [
|
|
699
|
+
a,
|
|
700
|
+
u && /* @__PURE__ */ _.jsx("abbr", { title: "required", className: Ye.required, children: "*" })
|
|
701
|
+
] }), Wr = "_message_1ly5l_1", Yr = "_visible_1ly5l_8", Ve = {
|
|
702
|
+
message: Wr,
|
|
703
|
+
visible: Yr
|
|
704
|
+
}, Vr = ({
|
|
705
|
+
errorId: a,
|
|
706
|
+
message: u = "Invalid input",
|
|
707
|
+
className: o,
|
|
708
|
+
visible: l = !1
|
|
709
|
+
}) => /* @__PURE__ */ _.jsx("span", { id: a, className: I([Ve.message, o, { [Ve.visible]: l }]), children: u }), nn = ({
|
|
710
|
+
id: a,
|
|
711
|
+
name: u,
|
|
712
|
+
label: o,
|
|
713
|
+
disabled: l,
|
|
714
|
+
placeholder: d = "Type here...",
|
|
715
|
+
valid: m = !0,
|
|
716
|
+
required: b = !1,
|
|
717
|
+
errorMessage: y,
|
|
718
|
+
defaultValue: v,
|
|
719
|
+
onChange: C,
|
|
720
|
+
...c
|
|
721
721
|
}) => {
|
|
722
|
-
const [
|
|
723
|
-
|
|
722
|
+
const [x, R] = de(typeof v == "string" ? v : ""), g = `${a}_error`, T = I([$.container, c == null ? void 0 : c.className]), V = I([
|
|
723
|
+
$.wrapper,
|
|
724
724
|
{
|
|
725
|
-
[
|
|
726
|
-
[
|
|
725
|
+
[$.disabled]: !!l,
|
|
726
|
+
[$.invalid]: !m
|
|
727
727
|
}
|
|
728
|
-
]),
|
|
729
|
-
const { value:
|
|
730
|
-
|
|
728
|
+
]), N = (S) => {
|
|
729
|
+
const { value: E = "" } = S.target;
|
|
730
|
+
R(E), C && C(S);
|
|
731
731
|
};
|
|
732
|
-
return /* @__PURE__ */
|
|
733
|
-
/* @__PURE__ */
|
|
734
|
-
/* @__PURE__ */
|
|
735
|
-
/* @__PURE__ */
|
|
732
|
+
return /* @__PURE__ */ _.jsxs("div", { className: T, children: [
|
|
733
|
+
/* @__PURE__ */ _.jsxs("div", { className: V, children: [
|
|
734
|
+
/* @__PURE__ */ _.jsx(Me, { label: o, required: b, inputId: a, className: $.label }),
|
|
735
|
+
/* @__PURE__ */ _.jsx(
|
|
736
736
|
"input",
|
|
737
737
|
{
|
|
738
|
-
id:
|
|
739
|
-
name:
|
|
738
|
+
id: a,
|
|
739
|
+
name: u,
|
|
740
740
|
type: "text",
|
|
741
|
-
className:
|
|
742
|
-
disabled:
|
|
743
|
-
placeholder:
|
|
744
|
-
required:
|
|
745
|
-
"aria-invalid": !
|
|
746
|
-
"aria-errormessage":
|
|
747
|
-
value:
|
|
748
|
-
onChange:
|
|
749
|
-
...
|
|
741
|
+
className: $.input,
|
|
742
|
+
disabled: l,
|
|
743
|
+
placeholder: d,
|
|
744
|
+
required: b,
|
|
745
|
+
"aria-invalid": !m,
|
|
746
|
+
"aria-errormessage": g,
|
|
747
|
+
value: x,
|
|
748
|
+
onChange: N,
|
|
749
|
+
...c
|
|
750
750
|
}
|
|
751
751
|
)
|
|
752
752
|
] }),
|
|
753
|
-
/* @__PURE__ */
|
|
753
|
+
/* @__PURE__ */ _.jsx(Vr, { errorId: g, message: y, className: $.error, visible: !m })
|
|
754
|
+
] });
|
|
755
|
+
}, Ur = "_wrapper_w3i6b_1", Mr = "_combobox_w3i6b_17", Br = "_combobox_label_w3i6b_41", qr = "_dropdown_w3i6b_46", Kr = "_dropdown_opened_w3i6b_67", Jr = "_option_w3i6b_72", Gr = "_active_w3i6b_80", zr = "_disabled_w3i6b_89", D = {
|
|
756
|
+
wrapper: Ur,
|
|
757
|
+
combobox: Mr,
|
|
758
|
+
combobox_label: Br,
|
|
759
|
+
dropdown: qr,
|
|
760
|
+
dropdown_opened: Kr,
|
|
761
|
+
option: Jr,
|
|
762
|
+
active: Gr,
|
|
763
|
+
disabled: zr
|
|
764
|
+
}, Xr = ({ ref: a, onClickOutsideHandler: u, dependentRef: o }) => {
|
|
765
|
+
Er(() => {
|
|
766
|
+
const l = (d) => {
|
|
767
|
+
const m = (a == null ? void 0 : a.current) && !a.current.contains(d.target), b = o != null && o.current ? !o.current.contains(d.target) : !0;
|
|
768
|
+
m && b && u();
|
|
769
|
+
};
|
|
770
|
+
return document.addEventListener("mousedown", l), () => {
|
|
771
|
+
document.removeEventListener("mousedown", l);
|
|
772
|
+
};
|
|
773
|
+
}, [a, o, u]);
|
|
774
|
+
}, Hr = ({
|
|
775
|
+
isOpened: a,
|
|
776
|
+
onClick: u,
|
|
777
|
+
comboboxId: o,
|
|
778
|
+
dropdownId: l,
|
|
779
|
+
selected: d,
|
|
780
|
+
name: m,
|
|
781
|
+
placeholder: b,
|
|
782
|
+
disabled: y,
|
|
783
|
+
required: v
|
|
784
|
+
}) => /* @__PURE__ */ _.jsxs(
|
|
785
|
+
"button",
|
|
786
|
+
{
|
|
787
|
+
type: "button",
|
|
788
|
+
name: m,
|
|
789
|
+
value: d == null ? void 0 : d.id,
|
|
790
|
+
role: "combobox",
|
|
791
|
+
"aria-haspopup": "listbox",
|
|
792
|
+
"aria-label": "Select one of the options",
|
|
793
|
+
"aria-expanded": a,
|
|
794
|
+
"aria-controls": l,
|
|
795
|
+
id: o,
|
|
796
|
+
className: D.combobox,
|
|
797
|
+
onClick: u,
|
|
798
|
+
disabled: y,
|
|
799
|
+
"aria-required": v,
|
|
800
|
+
children: [
|
|
801
|
+
/* @__PURE__ */ _.jsx("span", { className: D.combobox_label, children: (d == null ? void 0 : d.label) ?? b }),
|
|
802
|
+
/* @__PURE__ */ _.jsx("span", { children: a ? Q.Upwards : Q.Downwards })
|
|
803
|
+
]
|
|
804
|
+
}
|
|
805
|
+
);
|
|
806
|
+
function fe(a) {
|
|
807
|
+
const u = document.getElementById(a);
|
|
808
|
+
u && u.focus();
|
|
809
|
+
}
|
|
810
|
+
const Qr = ({ value: a, isSelected: u, onSelect: o }) => {
|
|
811
|
+
const { id: l, label: d } = a, m = I([D.option]), b = (y) => (v) => {
|
|
812
|
+
switch (v.key) {
|
|
813
|
+
case " ":
|
|
814
|
+
case "SpaceBar":
|
|
815
|
+
case "Enter":
|
|
816
|
+
v.preventDefault(), o(y);
|
|
817
|
+
break;
|
|
818
|
+
}
|
|
819
|
+
};
|
|
820
|
+
return /* @__PURE__ */ _.jsxs(
|
|
821
|
+
"li",
|
|
822
|
+
{
|
|
823
|
+
id: l,
|
|
824
|
+
role: "option",
|
|
825
|
+
className: m,
|
|
826
|
+
"aria-selected": u,
|
|
827
|
+
tabIndex: 0,
|
|
828
|
+
onKeyDown: b(l),
|
|
829
|
+
onClick: () => o(l),
|
|
830
|
+
children: [
|
|
831
|
+
/* @__PURE__ */ _.jsx("span", { children: d }),
|
|
832
|
+
u && /* @__PURE__ */ _.jsx("span", { children: Q.CheckMark })
|
|
833
|
+
]
|
|
834
|
+
}
|
|
835
|
+
);
|
|
836
|
+
}, Zr = ({ values: a, isOpened: u, onClose: o, onSelect: l, dropdownId: d, comboboxId: m, selected: b }) => {
|
|
837
|
+
const y = I([D.dropdown, { [D.dropdown_opened]: u }]), v = (c) => {
|
|
838
|
+
l(c), o(), fe(m);
|
|
839
|
+
}, C = (c) => {
|
|
840
|
+
let x = "";
|
|
841
|
+
a.forEach((g) => {
|
|
842
|
+
document.getElementById(g.id) === document.activeElement && (x = g.id);
|
|
843
|
+
});
|
|
844
|
+
const R = a.findIndex((g) => g.id === x);
|
|
845
|
+
switch (c.key) {
|
|
846
|
+
case "Escape":
|
|
847
|
+
c.preventDefault(), o();
|
|
848
|
+
break;
|
|
849
|
+
case "ArrowUp": {
|
|
850
|
+
c.preventDefault();
|
|
851
|
+
const g = R - 1 >= 0 ? R - 1 : a.length - 1, T = a[g];
|
|
852
|
+
T && fe(T.id);
|
|
853
|
+
break;
|
|
854
|
+
}
|
|
855
|
+
case "ArrowDown":
|
|
856
|
+
case "Tab": {
|
|
857
|
+
c.preventDefault();
|
|
858
|
+
const g = R === a.length - 1 ? 0 : R + 1, T = a[g];
|
|
859
|
+
T && fe(T.id);
|
|
860
|
+
break;
|
|
861
|
+
}
|
|
862
|
+
}
|
|
863
|
+
};
|
|
864
|
+
return /* @__PURE__ */ _.jsx("ul", { className: y, role: "listbox", id: d, tabIndex: -1, onKeyDown: C, children: a.map((c) => /* @__PURE__ */ _.jsx(Qr, { value: c, onSelect: () => v(c.id), isSelected: c.id === (b == null ? void 0 : b.id) }, c.id)) });
|
|
865
|
+
}, tn = ({
|
|
866
|
+
id: a,
|
|
867
|
+
values: u,
|
|
868
|
+
onSelect: o,
|
|
869
|
+
name: l,
|
|
870
|
+
label: d,
|
|
871
|
+
required: m = !1,
|
|
872
|
+
placeholder: b = "Not selected",
|
|
873
|
+
disabled: y = !1,
|
|
874
|
+
...v
|
|
875
|
+
}) => {
|
|
876
|
+
const [C, c] = de(!1), [x, R] = de(), g = `${a}_combobox`, T = `${a}_dropdown`, V = I([D.wrapper, v == null ? void 0 : v.className, { [D.disabled]: y }]), N = wr(null), S = () => c(!1), E = () => c(!C), Z = (ee) => {
|
|
877
|
+
const J = u.find((re) => re.id === ee);
|
|
878
|
+
R(J), o == null || o(J);
|
|
879
|
+
};
|
|
880
|
+
return Xr({ ref: N, onClickOutsideHandler: S }), /* @__PURE__ */ _.jsxs("div", { className: V, ref: N, children: [
|
|
881
|
+
/* @__PURE__ */ _.jsx(Me, { label: d, required: m, inputId: g, className: D.label }),
|
|
882
|
+
/* @__PURE__ */ _.jsx(
|
|
883
|
+
Hr,
|
|
884
|
+
{
|
|
885
|
+
name: l,
|
|
886
|
+
isOpened: C,
|
|
887
|
+
comboboxId: g,
|
|
888
|
+
dropdownId: T,
|
|
889
|
+
onClick: E,
|
|
890
|
+
selected: x,
|
|
891
|
+
placeholder: b,
|
|
892
|
+
disabled: y,
|
|
893
|
+
required: m
|
|
894
|
+
}
|
|
895
|
+
),
|
|
896
|
+
/* @__PURE__ */ _.jsx(
|
|
897
|
+
Zr,
|
|
898
|
+
{
|
|
899
|
+
values: u,
|
|
900
|
+
selected: x,
|
|
901
|
+
isOpened: C,
|
|
902
|
+
onClose: S,
|
|
903
|
+
dropdownId: T,
|
|
904
|
+
comboboxId: g,
|
|
905
|
+
onSelect: Z
|
|
906
|
+
}
|
|
907
|
+
)
|
|
754
908
|
] });
|
|
755
909
|
};
|
|
756
910
|
export {
|
|
757
|
-
|
|
758
|
-
|
|
911
|
+
rn as ChopLogicButton,
|
|
912
|
+
tn as ChopLogicSelect,
|
|
913
|
+
nn as ChopLogicTextInput
|
|
759
914
|
};
|
|
760
915
|
//# sourceMappingURL=index.es.js.map
|