@sebgroup/green-react 1.0.0-beta.1 → 1.0.0-beta.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/README.md +51 -1
  2. package/index.d.ts +5 -0
  3. package/index.esm.js +2740 -0
  4. package/index.umd.js +2771 -0
  5. package/lib/alert/alert.d.ts +3 -2
  6. package/lib/badge/badge.d.ts +10 -0
  7. package/lib/card/card.d.ts +3 -4
  8. package/lib/datepicker/datepicker.d.ts +2 -0
  9. package/lib/datepicker/hook.d.ts +12 -0
  10. package/lib/dropdown/dropdown.d.ts +13 -0
  11. package/lib/dropdown/hooks.d.ts +34 -0
  12. package/lib/form/{button.d.ts → button/button.d.ts} +0 -0
  13. package/lib/form/{buttonGroup.d.ts → buttonGroup/buttonGroup.d.ts} +2 -2
  14. package/lib/form/form.d.ts +5 -4
  15. package/lib/form/formContext.d.ts +13 -0
  16. package/lib/form/formItems.d.ts +9 -0
  17. package/lib/form/group/group.d.ts +9 -0
  18. package/lib/form/index.d.ts +7 -4
  19. package/lib/form/input/input.d.ts +10 -0
  20. package/lib/form/radioButton/radioGroup.d.ts +12 -0
  21. package/lib/form/{text.d.ts → text/text.d.ts} +1 -1
  22. package/lib/form/types.d.ts +19 -16
  23. package/lib/form/useInput.d.ts +2 -3
  24. package/lib/form/validateInput.d.ts +9 -0
  25. package/lib/layout/flexbox/flexbox.d.ts +13 -0
  26. package/lib/layout/flexbox/types.d.ts +5 -0
  27. package/lib/layout/index.d.ts +1 -1
  28. package/lib/link/link.d.ts +7 -0
  29. package/lib/list/list.d.ts +14 -0
  30. package/lib/list/listItem.d.ts +10 -0
  31. package/lib/modal/modal.d.ts +2 -1
  32. package/lib/navbar/navbar.d.ts +12 -0
  33. package/lib/tabs/tabs.d.ts +13 -0
  34. package/package.json +7 -7
  35. package/lib/form/buttonGroup.test.d.ts +0 -1
  36. package/lib/form/input.d.ts +0 -6
  37. package/lib/layout/group.d.ts +0 -6
  38. package/react.esm.js +0 -1718
  39. package/react.umd.js +0 -1670
package/react.esm.js DELETED
@@ -1,1718 +0,0 @@
1
- import { jsx, jsxs } from 'react/jsx-runtime';
2
- import { ModalRole, randomId } from '@sebgroup/extract';
3
- import { useState, useEffect, useMemo, useRef } from 'react';
4
-
5
- var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
6
-
7
- var check = function (it) {
8
- return it && it.Math == Math && it;
9
- };
10
-
11
- // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
12
- var global$p =
13
- // eslint-disable-next-line es/no-global-this -- safe
14
- check(typeof globalThis == 'object' && globalThis) ||
15
- check(typeof window == 'object' && window) ||
16
- // eslint-disable-next-line no-restricted-globals -- safe
17
- check(typeof self == 'object' && self) ||
18
- check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
19
- // eslint-disable-next-line no-new-func -- fallback
20
- (function () { return this; })() || Function('return this')();
21
-
22
- var objectGetOwnPropertyDescriptor = {};
23
-
24
- var fails$a = function (exec) {
25
- try {
26
- return !!exec();
27
- } catch (error) {
28
- return true;
29
- }
30
- };
31
-
32
- var fails$9 = fails$a;
33
-
34
- // Detect IE8's incomplete defineProperty implementation
35
- var descriptors = !fails$9(function () {
36
- // eslint-disable-next-line es/no-object-defineproperty -- required for testing
37
- return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
38
- });
39
-
40
- var call$5 = Function.prototype.call;
41
-
42
- var functionCall = call$5.bind ? call$5.bind(call$5) : function () {
43
- return call$5.apply(call$5, arguments);
44
- };
45
-
46
- var objectPropertyIsEnumerable = {};
47
-
48
- var $propertyIsEnumerable = {}.propertyIsEnumerable;
49
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
50
- var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
51
-
52
- // Nashorn ~ JDK8 bug
53
- var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
54
-
55
- // `Object.prototype.propertyIsEnumerable` method implementation
56
- // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
57
- objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
58
- var descriptor = getOwnPropertyDescriptor$1(this, V);
59
- return !!descriptor && descriptor.enumerable;
60
- } : $propertyIsEnumerable;
61
-
62
- var createPropertyDescriptor$2 = function (bitmap, value) {
63
- return {
64
- enumerable: !(bitmap & 1),
65
- configurable: !(bitmap & 2),
66
- writable: !(bitmap & 4),
67
- value: value
68
- };
69
- };
70
-
71
- var FunctionPrototype$1 = Function.prototype;
72
- var bind$2 = FunctionPrototype$1.bind;
73
- var call$4 = FunctionPrototype$1.call;
74
- var callBind = bind$2 && bind$2.bind(call$4);
75
-
76
- var functionUncurryThis = bind$2 ? function (fn) {
77
- return fn && callBind(call$4, fn);
78
- } : function (fn) {
79
- return fn && function () {
80
- return call$4.apply(fn, arguments);
81
- };
82
- };
83
-
84
- var uncurryThis$f = functionUncurryThis;
85
-
86
- var toString$4 = uncurryThis$f({}.toString);
87
- var stringSlice = uncurryThis$f(''.slice);
88
-
89
- var classofRaw$1 = function (it) {
90
- return stringSlice(toString$4(it), 8, -1);
91
- };
92
-
93
- var global$o = global$p;
94
- var uncurryThis$e = functionUncurryThis;
95
- var fails$8 = fails$a;
96
- var classof$4 = classofRaw$1;
97
-
98
- var Object$4 = global$o.Object;
99
- var split = uncurryThis$e(''.split);
100
-
101
- // fallback for non-array-like ES3 and non-enumerable old V8 strings
102
- var indexedObject = fails$8(function () {
103
- // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
104
- // eslint-disable-next-line no-prototype-builtins -- safe
105
- return !Object$4('z').propertyIsEnumerable(0);
106
- }) ? function (it) {
107
- return classof$4(it) == 'String' ? split(it, '') : Object$4(it);
108
- } : Object$4;
109
-
110
- var global$n = global$p;
111
-
112
- var TypeError$7 = global$n.TypeError;
113
-
114
- // `RequireObjectCoercible` abstract operation
115
- // https://tc39.es/ecma262/#sec-requireobjectcoercible
116
- var requireObjectCoercible$3 = function (it) {
117
- if (it == undefined) throw TypeError$7("Can't call method on " + it);
118
- return it;
119
- };
120
-
121
- // toObject with fallback for non-array-like ES3 strings
122
- var IndexedObject$3 = indexedObject;
123
- var requireObjectCoercible$2 = requireObjectCoercible$3;
124
-
125
- var toIndexedObject$4 = function (it) {
126
- return IndexedObject$3(requireObjectCoercible$2(it));
127
- };
128
-
129
- // `IsCallable` abstract operation
130
- // https://tc39.es/ecma262/#sec-iscallable
131
- var isCallable$b = function (argument) {
132
- return typeof argument == 'function';
133
- };
134
-
135
- var isCallable$a = isCallable$b;
136
-
137
- var isObject$6 = function (it) {
138
- return typeof it == 'object' ? it !== null : isCallable$a(it);
139
- };
140
-
141
- var global$m = global$p;
142
- var isCallable$9 = isCallable$b;
143
-
144
- var aFunction = function (argument) {
145
- return isCallable$9(argument) ? argument : undefined;
146
- };
147
-
148
- var getBuiltIn$4 = function (namespace, method) {
149
- return arguments.length < 2 ? aFunction(global$m[namespace]) : global$m[namespace] && global$m[namespace][method];
150
- };
151
-
152
- var uncurryThis$d = functionUncurryThis;
153
-
154
- var objectIsPrototypeOf = uncurryThis$d({}.isPrototypeOf);
155
-
156
- var getBuiltIn$3 = getBuiltIn$4;
157
-
158
- var engineUserAgent = getBuiltIn$3('navigator', 'userAgent') || '';
159
-
160
- var global$l = global$p;
161
- var userAgent = engineUserAgent;
162
-
163
- var process = global$l.process;
164
- var Deno = global$l.Deno;
165
- var versions = process && process.versions || Deno && Deno.version;
166
- var v8 = versions && versions.v8;
167
- var match, version;
168
-
169
- if (v8) {
170
- match = v8.split('.');
171
- // in old Chrome, versions of V8 isn't V8 = Chrome / 10
172
- // but their correct versions are not interesting for us
173
- version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
174
- }
175
-
176
- // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
177
- // so check `userAgent` even if `.v8` exists, but 0
178
- if (!version && userAgent) {
179
- match = userAgent.match(/Edge\/(\d+)/);
180
- if (!match || match[1] >= 74) {
181
- match = userAgent.match(/Chrome\/(\d+)/);
182
- if (match) version = +match[1];
183
- }
184
- }
185
-
186
- var engineV8Version = version;
187
-
188
- /* eslint-disable es/no-symbol -- required for testing */
189
-
190
- var V8_VERSION$1 = engineV8Version;
191
- var fails$7 = fails$a;
192
-
193
- // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
194
- var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$7(function () {
195
- var symbol = Symbol();
196
- // Chrome 38 Symbol has incorrect toString conversion
197
- // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
198
- return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
199
- // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
200
- !Symbol.sham && V8_VERSION$1 && V8_VERSION$1 < 41;
201
- });
202
-
203
- /* eslint-disable es/no-symbol -- required for testing */
204
-
205
- var NATIVE_SYMBOL$1 = nativeSymbol;
206
-
207
- var useSymbolAsUid = NATIVE_SYMBOL$1
208
- && !Symbol.sham
209
- && typeof Symbol.iterator == 'symbol';
210
-
211
- var global$k = global$p;
212
- var getBuiltIn$2 = getBuiltIn$4;
213
- var isCallable$8 = isCallable$b;
214
- var isPrototypeOf = objectIsPrototypeOf;
215
- var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
216
-
217
- var Object$3 = global$k.Object;
218
-
219
- var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
220
- return typeof it == 'symbol';
221
- } : function (it) {
222
- var $Symbol = getBuiltIn$2('Symbol');
223
- return isCallable$8($Symbol) && isPrototypeOf($Symbol.prototype, Object$3(it));
224
- };
225
-
226
- var global$j = global$p;
227
-
228
- var String$3 = global$j.String;
229
-
230
- var tryToString$1 = function (argument) {
231
- try {
232
- return String$3(argument);
233
- } catch (error) {
234
- return 'Object';
235
- }
236
- };
237
-
238
- var global$i = global$p;
239
- var isCallable$7 = isCallable$b;
240
- var tryToString = tryToString$1;
241
-
242
- var TypeError$6 = global$i.TypeError;
243
-
244
- // `Assert: IsCallable(argument) is true`
245
- var aCallable$2 = function (argument) {
246
- if (isCallable$7(argument)) return argument;
247
- throw TypeError$6(tryToString(argument) + ' is not a function');
248
- };
249
-
250
- var aCallable$1 = aCallable$2;
251
-
252
- // `GetMethod` abstract operation
253
- // https://tc39.es/ecma262/#sec-getmethod
254
- var getMethod$1 = function (V, P) {
255
- var func = V[P];
256
- return func == null ? undefined : aCallable$1(func);
257
- };
258
-
259
- var global$h = global$p;
260
- var call$3 = functionCall;
261
- var isCallable$6 = isCallable$b;
262
- var isObject$5 = isObject$6;
263
-
264
- var TypeError$5 = global$h.TypeError;
265
-
266
- // `OrdinaryToPrimitive` abstract operation
267
- // https://tc39.es/ecma262/#sec-ordinarytoprimitive
268
- var ordinaryToPrimitive$1 = function (input, pref) {
269
- var fn, val;
270
- if (pref === 'string' && isCallable$6(fn = input.toString) && !isObject$5(val = call$3(fn, input))) return val;
271
- if (isCallable$6(fn = input.valueOf) && !isObject$5(val = call$3(fn, input))) return val;
272
- if (pref !== 'string' && isCallable$6(fn = input.toString) && !isObject$5(val = call$3(fn, input))) return val;
273
- throw TypeError$5("Can't convert object to primitive value");
274
- };
275
-
276
- var shared$3 = {exports: {}};
277
-
278
- var global$g = global$p;
279
-
280
- // eslint-disable-next-line es/no-object-defineproperty -- safe
281
- var defineProperty$1 = Object.defineProperty;
282
-
283
- var setGlobal$3 = function (key, value) {
284
- try {
285
- defineProperty$1(global$g, key, { value: value, configurable: true, writable: true });
286
- } catch (error) {
287
- global$g[key] = value;
288
- } return value;
289
- };
290
-
291
- var global$f = global$p;
292
- var setGlobal$2 = setGlobal$3;
293
-
294
- var SHARED = '__core-js_shared__';
295
- var store$3 = global$f[SHARED] || setGlobal$2(SHARED, {});
296
-
297
- var sharedStore = store$3;
298
-
299
- var store$2 = sharedStore;
300
-
301
- (shared$3.exports = function (key, value) {
302
- return store$2[key] || (store$2[key] = value !== undefined ? value : {});
303
- })('versions', []).push({
304
- version: '3.19.0',
305
- mode: 'global',
306
- copyright: '© 2021 Denis Pushkarev (zloirock.ru)'
307
- });
308
-
309
- var global$e = global$p;
310
- var requireObjectCoercible$1 = requireObjectCoercible$3;
311
-
312
- var Object$2 = global$e.Object;
313
-
314
- // `ToObject` abstract operation
315
- // https://tc39.es/ecma262/#sec-toobject
316
- var toObject$3 = function (argument) {
317
- return Object$2(requireObjectCoercible$1(argument));
318
- };
319
-
320
- var uncurryThis$c = functionUncurryThis;
321
- var toObject$2 = toObject$3;
322
-
323
- var hasOwnProperty = uncurryThis$c({}.hasOwnProperty);
324
-
325
- // `HasOwnProperty` abstract operation
326
- // https://tc39.es/ecma262/#sec-hasownproperty
327
- var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
328
- return hasOwnProperty(toObject$2(it), key);
329
- };
330
-
331
- var uncurryThis$b = functionUncurryThis;
332
-
333
- var id = 0;
334
- var postfix = Math.random();
335
- var toString$3 = uncurryThis$b(1.0.toString);
336
-
337
- var uid$2 = function (key) {
338
- return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$3(++id + postfix, 36);
339
- };
340
-
341
- var global$d = global$p;
342
- var shared$2 = shared$3.exports;
343
- var hasOwn$6 = hasOwnProperty_1;
344
- var uid$1 = uid$2;
345
- var NATIVE_SYMBOL = nativeSymbol;
346
- var USE_SYMBOL_AS_UID = useSymbolAsUid;
347
-
348
- var WellKnownSymbolsStore = shared$2('wks');
349
- var Symbol$2 = global$d.Symbol;
350
- var symbolFor = Symbol$2 && Symbol$2['for'];
351
- var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$2 : Symbol$2 && Symbol$2.withoutSetter || uid$1;
352
-
353
- var wellKnownSymbol$5 = function (name) {
354
- if (!hasOwn$6(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
355
- var description = 'Symbol.' + name;
356
- if (NATIVE_SYMBOL && hasOwn$6(Symbol$2, name)) {
357
- WellKnownSymbolsStore[name] = Symbol$2[name];
358
- } else if (USE_SYMBOL_AS_UID && symbolFor) {
359
- WellKnownSymbolsStore[name] = symbolFor(description);
360
- } else {
361
- WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
362
- }
363
- } return WellKnownSymbolsStore[name];
364
- };
365
-
366
- var global$c = global$p;
367
- var call$2 = functionCall;
368
- var isObject$4 = isObject$6;
369
- var isSymbol$1 = isSymbol$2;
370
- var getMethod = getMethod$1;
371
- var ordinaryToPrimitive = ordinaryToPrimitive$1;
372
- var wellKnownSymbol$4 = wellKnownSymbol$5;
373
-
374
- var TypeError$4 = global$c.TypeError;
375
- var TO_PRIMITIVE = wellKnownSymbol$4('toPrimitive');
376
-
377
- // `ToPrimitive` abstract operation
378
- // https://tc39.es/ecma262/#sec-toprimitive
379
- var toPrimitive$1 = function (input, pref) {
380
- if (!isObject$4(input) || isSymbol$1(input)) return input;
381
- var exoticToPrim = getMethod(input, TO_PRIMITIVE);
382
- var result;
383
- if (exoticToPrim) {
384
- if (pref === undefined) pref = 'default';
385
- result = call$2(exoticToPrim, input, pref);
386
- if (!isObject$4(result) || isSymbol$1(result)) return result;
387
- throw TypeError$4("Can't convert object to primitive value");
388
- }
389
- if (pref === undefined) pref = 'number';
390
- return ordinaryToPrimitive(input, pref);
391
- };
392
-
393
- var toPrimitive = toPrimitive$1;
394
- var isSymbol = isSymbol$2;
395
-
396
- // `ToPropertyKey` abstract operation
397
- // https://tc39.es/ecma262/#sec-topropertykey
398
- var toPropertyKey$2 = function (argument) {
399
- var key = toPrimitive(argument, 'string');
400
- return isSymbol(key) ? key : key + '';
401
- };
402
-
403
- var global$b = global$p;
404
- var isObject$3 = isObject$6;
405
-
406
- var document = global$b.document;
407
- // typeof document.createElement is 'object' in old IE
408
- var EXISTS$1 = isObject$3(document) && isObject$3(document.createElement);
409
-
410
- var documentCreateElement = function (it) {
411
- return EXISTS$1 ? document.createElement(it) : {};
412
- };
413
-
414
- var DESCRIPTORS$5 = descriptors;
415
- var fails$6 = fails$a;
416
- var createElement = documentCreateElement;
417
-
418
- // Thank's IE8 for his funny defineProperty
419
- var ie8DomDefine = !DESCRIPTORS$5 && !fails$6(function () {
420
- // eslint-disable-next-line es/no-object-defineproperty -- requied for testing
421
- return Object.defineProperty(createElement('div'), 'a', {
422
- get: function () { return 7; }
423
- }).a != 7;
424
- });
425
-
426
- var DESCRIPTORS$4 = descriptors;
427
- var call$1 = functionCall;
428
- var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
429
- var createPropertyDescriptor$1 = createPropertyDescriptor$2;
430
- var toIndexedObject$3 = toIndexedObject$4;
431
- var toPropertyKey$1 = toPropertyKey$2;
432
- var hasOwn$5 = hasOwnProperty_1;
433
- var IE8_DOM_DEFINE$1 = ie8DomDefine;
434
-
435
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
436
- var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
437
-
438
- // `Object.getOwnPropertyDescriptor` method
439
- // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
440
- objectGetOwnPropertyDescriptor.f = DESCRIPTORS$4 ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
441
- O = toIndexedObject$3(O);
442
- P = toPropertyKey$1(P);
443
- if (IE8_DOM_DEFINE$1) try {
444
- return $getOwnPropertyDescriptor(O, P);
445
- } catch (error) { /* empty */ }
446
- if (hasOwn$5(O, P)) return createPropertyDescriptor$1(!call$1(propertyIsEnumerableModule$1.f, O, P), O[P]);
447
- };
448
-
449
- var objectDefineProperty = {};
450
-
451
- var global$a = global$p;
452
- var isObject$2 = isObject$6;
453
-
454
- var String$2 = global$a.String;
455
- var TypeError$3 = global$a.TypeError;
456
-
457
- // `Assert: Type(argument) is Object`
458
- var anObject$2 = function (argument) {
459
- if (isObject$2(argument)) return argument;
460
- throw TypeError$3(String$2(argument) + ' is not an object');
461
- };
462
-
463
- var global$9 = global$p;
464
- var DESCRIPTORS$3 = descriptors;
465
- var IE8_DOM_DEFINE = ie8DomDefine;
466
- var anObject$1 = anObject$2;
467
- var toPropertyKey = toPropertyKey$2;
468
-
469
- var TypeError$2 = global$9.TypeError;
470
- // eslint-disable-next-line es/no-object-defineproperty -- safe
471
- var $defineProperty = Object.defineProperty;
472
-
473
- // `Object.defineProperty` method
474
- // https://tc39.es/ecma262/#sec-object.defineproperty
475
- objectDefineProperty.f = DESCRIPTORS$3 ? $defineProperty : function defineProperty(O, P, Attributes) {
476
- anObject$1(O);
477
- P = toPropertyKey(P);
478
- anObject$1(Attributes);
479
- if (IE8_DOM_DEFINE) try {
480
- return $defineProperty(O, P, Attributes);
481
- } catch (error) { /* empty */ }
482
- if ('get' in Attributes || 'set' in Attributes) throw TypeError$2('Accessors not supported');
483
- if ('value' in Attributes) O[P] = Attributes.value;
484
- return O;
485
- };
486
-
487
- var DESCRIPTORS$2 = descriptors;
488
- var definePropertyModule$1 = objectDefineProperty;
489
- var createPropertyDescriptor = createPropertyDescriptor$2;
490
-
491
- var createNonEnumerableProperty$3 = DESCRIPTORS$2 ? function (object, key, value) {
492
- return definePropertyModule$1.f(object, key, createPropertyDescriptor(1, value));
493
- } : function (object, key, value) {
494
- object[key] = value;
495
- return object;
496
- };
497
-
498
- var redefine$1 = {exports: {}};
499
-
500
- var uncurryThis$a = functionUncurryThis;
501
- var isCallable$5 = isCallable$b;
502
- var store$1 = sharedStore;
503
-
504
- var functionToString = uncurryThis$a(Function.toString);
505
-
506
- // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
507
- if (!isCallable$5(store$1.inspectSource)) {
508
- store$1.inspectSource = function (it) {
509
- return functionToString(it);
510
- };
511
- }
512
-
513
- var inspectSource$3 = store$1.inspectSource;
514
-
515
- var global$8 = global$p;
516
- var isCallable$4 = isCallable$b;
517
- var inspectSource$2 = inspectSource$3;
518
-
519
- var WeakMap$1 = global$8.WeakMap;
520
-
521
- var nativeWeakMap = isCallable$4(WeakMap$1) && /native code/.test(inspectSource$2(WeakMap$1));
522
-
523
- var shared$1 = shared$3.exports;
524
- var uid = uid$2;
525
-
526
- var keys = shared$1('keys');
527
-
528
- var sharedKey$1 = function (key) {
529
- return keys[key] || (keys[key] = uid(key));
530
- };
531
-
532
- var hiddenKeys$3 = {};
533
-
534
- var NATIVE_WEAK_MAP = nativeWeakMap;
535
- var global$7 = global$p;
536
- var uncurryThis$9 = functionUncurryThis;
537
- var isObject$1 = isObject$6;
538
- var createNonEnumerableProperty$2 = createNonEnumerableProperty$3;
539
- var hasOwn$4 = hasOwnProperty_1;
540
- var shared = sharedStore;
541
- var sharedKey = sharedKey$1;
542
- var hiddenKeys$2 = hiddenKeys$3;
543
-
544
- var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
545
- var TypeError$1 = global$7.TypeError;
546
- var WeakMap = global$7.WeakMap;
547
- var set, get, has;
548
-
549
- var enforce = function (it) {
550
- return has(it) ? get(it) : set(it, {});
551
- };
552
-
553
- var getterFor = function (TYPE) {
554
- return function (it) {
555
- var state;
556
- if (!isObject$1(it) || (state = get(it)).type !== TYPE) {
557
- throw TypeError$1('Incompatible receiver, ' + TYPE + ' required');
558
- } return state;
559
- };
560
- };
561
-
562
- if (NATIVE_WEAK_MAP || shared.state) {
563
- var store = shared.state || (shared.state = new WeakMap());
564
- var wmget = uncurryThis$9(store.get);
565
- var wmhas = uncurryThis$9(store.has);
566
- var wmset = uncurryThis$9(store.set);
567
- set = function (it, metadata) {
568
- if (wmhas(store, it)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
569
- metadata.facade = it;
570
- wmset(store, it, metadata);
571
- return metadata;
572
- };
573
- get = function (it) {
574
- return wmget(store, it) || {};
575
- };
576
- has = function (it) {
577
- return wmhas(store, it);
578
- };
579
- } else {
580
- var STATE = sharedKey('state');
581
- hiddenKeys$2[STATE] = true;
582
- set = function (it, metadata) {
583
- if (hasOwn$4(it, STATE)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
584
- metadata.facade = it;
585
- createNonEnumerableProperty$2(it, STATE, metadata);
586
- return metadata;
587
- };
588
- get = function (it) {
589
- return hasOwn$4(it, STATE) ? it[STATE] : {};
590
- };
591
- has = function (it) {
592
- return hasOwn$4(it, STATE);
593
- };
594
- }
595
-
596
- var internalState = {
597
- set: set,
598
- get: get,
599
- has: has,
600
- enforce: enforce,
601
- getterFor: getterFor
602
- };
603
-
604
- var DESCRIPTORS$1 = descriptors;
605
- var hasOwn$3 = hasOwnProperty_1;
606
-
607
- var FunctionPrototype = Function.prototype;
608
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
609
- var getDescriptor = DESCRIPTORS$1 && Object.getOwnPropertyDescriptor;
610
-
611
- var EXISTS = hasOwn$3(FunctionPrototype, 'name');
612
- // additional protection from minified / mangled / dropped function names
613
- var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
614
- var CONFIGURABLE = EXISTS && (!DESCRIPTORS$1 || (DESCRIPTORS$1 && getDescriptor(FunctionPrototype, 'name').configurable));
615
-
616
- var functionName = {
617
- EXISTS: EXISTS,
618
- PROPER: PROPER,
619
- CONFIGURABLE: CONFIGURABLE
620
- };
621
-
622
- var global$6 = global$p;
623
- var isCallable$3 = isCallable$b;
624
- var hasOwn$2 = hasOwnProperty_1;
625
- var createNonEnumerableProperty$1 = createNonEnumerableProperty$3;
626
- var setGlobal$1 = setGlobal$3;
627
- var inspectSource$1 = inspectSource$3;
628
- var InternalStateModule = internalState;
629
- var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
630
-
631
- var getInternalState = InternalStateModule.get;
632
- var enforceInternalState = InternalStateModule.enforce;
633
- var TEMPLATE = String(String).split('String');
634
-
635
- (redefine$1.exports = function (O, key, value, options) {
636
- var unsafe = options ? !!options.unsafe : false;
637
- var simple = options ? !!options.enumerable : false;
638
- var noTargetGet = options ? !!options.noTargetGet : false;
639
- var name = options && options.name !== undefined ? options.name : key;
640
- var state;
641
- if (isCallable$3(value)) {
642
- if (String(name).slice(0, 7) === 'Symbol(') {
643
- name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
644
- }
645
- if (!hasOwn$2(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
646
- createNonEnumerableProperty$1(value, 'name', name);
647
- }
648
- state = enforceInternalState(value);
649
- if (!state.source) {
650
- state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
651
- }
652
- }
653
- if (O === global$6) {
654
- if (simple) O[key] = value;
655
- else setGlobal$1(key, value);
656
- return;
657
- } else if (!unsafe) {
658
- delete O[key];
659
- } else if (!noTargetGet && O[key]) {
660
- simple = true;
661
- }
662
- if (simple) O[key] = value;
663
- else createNonEnumerableProperty$1(O, key, value);
664
- // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
665
- })(Function.prototype, 'toString', function toString() {
666
- return isCallable$3(this) && getInternalState(this).source || inspectSource$1(this);
667
- });
668
-
669
- var objectGetOwnPropertyNames = {};
670
-
671
- var ceil = Math.ceil;
672
- var floor = Math.floor;
673
-
674
- // `ToIntegerOrInfinity` abstract operation
675
- // https://tc39.es/ecma262/#sec-tointegerorinfinity
676
- var toIntegerOrInfinity$2 = function (argument) {
677
- var number = +argument;
678
- // eslint-disable-next-line no-self-compare -- safe
679
- return number !== number || number === 0 ? 0 : (number > 0 ? floor : ceil)(number);
680
- };
681
-
682
- var toIntegerOrInfinity$1 = toIntegerOrInfinity$2;
683
-
684
- var max = Math.max;
685
- var min$1 = Math.min;
686
-
687
- // Helper for a popular repeating case of the spec:
688
- // Let integer be ? ToInteger(index).
689
- // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
690
- var toAbsoluteIndex$1 = function (index, length) {
691
- var integer = toIntegerOrInfinity$1(index);
692
- return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
693
- };
694
-
695
- var toIntegerOrInfinity = toIntegerOrInfinity$2;
696
-
697
- var min = Math.min;
698
-
699
- // `ToLength` abstract operation
700
- // https://tc39.es/ecma262/#sec-tolength
701
- var toLength$1 = function (argument) {
702
- return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
703
- };
704
-
705
- var toLength = toLength$1;
706
-
707
- // `LengthOfArrayLike` abstract operation
708
- // https://tc39.es/ecma262/#sec-lengthofarraylike
709
- var lengthOfArrayLike$2 = function (obj) {
710
- return toLength(obj.length);
711
- };
712
-
713
- var toIndexedObject$2 = toIndexedObject$4;
714
- var toAbsoluteIndex = toAbsoluteIndex$1;
715
- var lengthOfArrayLike$1 = lengthOfArrayLike$2;
716
-
717
- // `Array.prototype.{ indexOf, includes }` methods implementation
718
- var createMethod$2 = function (IS_INCLUDES) {
719
- return function ($this, el, fromIndex) {
720
- var O = toIndexedObject$2($this);
721
- var length = lengthOfArrayLike$1(O);
722
- var index = toAbsoluteIndex(fromIndex, length);
723
- var value;
724
- // Array#includes uses SameValueZero equality algorithm
725
- // eslint-disable-next-line no-self-compare -- NaN check
726
- if (IS_INCLUDES && el != el) while (length > index) {
727
- value = O[index++];
728
- // eslint-disable-next-line no-self-compare -- NaN check
729
- if (value != value) return true;
730
- // Array#indexOf ignores holes, Array#includes - not
731
- } else for (;length > index; index++) {
732
- if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
733
- } return !IS_INCLUDES && -1;
734
- };
735
- };
736
-
737
- var arrayIncludes = {
738
- // `Array.prototype.includes` method
739
- // https://tc39.es/ecma262/#sec-array.prototype.includes
740
- includes: createMethod$2(true),
741
- // `Array.prototype.indexOf` method
742
- // https://tc39.es/ecma262/#sec-array.prototype.indexof
743
- indexOf: createMethod$2(false)
744
- };
745
-
746
- var uncurryThis$8 = functionUncurryThis;
747
- var hasOwn$1 = hasOwnProperty_1;
748
- var toIndexedObject$1 = toIndexedObject$4;
749
- var indexOf = arrayIncludes.indexOf;
750
- var hiddenKeys$1 = hiddenKeys$3;
751
-
752
- var push$1 = uncurryThis$8([].push);
753
-
754
- var objectKeysInternal = function (object, names) {
755
- var O = toIndexedObject$1(object);
756
- var i = 0;
757
- var result = [];
758
- var key;
759
- for (key in O) !hasOwn$1(hiddenKeys$1, key) && hasOwn$1(O, key) && push$1(result, key);
760
- // Don't enum bug & hidden keys
761
- while (names.length > i) if (hasOwn$1(O, key = names[i++])) {
762
- ~indexOf(result, key) || push$1(result, key);
763
- }
764
- return result;
765
- };
766
-
767
- // IE8- don't enum bug keys
768
- var enumBugKeys$2 = [
769
- 'constructor',
770
- 'hasOwnProperty',
771
- 'isPrototypeOf',
772
- 'propertyIsEnumerable',
773
- 'toLocaleString',
774
- 'toString',
775
- 'valueOf'
776
- ];
777
-
778
- var internalObjectKeys$1 = objectKeysInternal;
779
- var enumBugKeys$1 = enumBugKeys$2;
780
-
781
- var hiddenKeys = enumBugKeys$1.concat('length', 'prototype');
782
-
783
- // `Object.getOwnPropertyNames` method
784
- // https://tc39.es/ecma262/#sec-object.getownpropertynames
785
- // eslint-disable-next-line es/no-object-getownpropertynames -- safe
786
- objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
787
- return internalObjectKeys$1(O, hiddenKeys);
788
- };
789
-
790
- var objectGetOwnPropertySymbols = {};
791
-
792
- // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
793
- objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
794
-
795
- var getBuiltIn$1 = getBuiltIn$4;
796
- var uncurryThis$7 = functionUncurryThis;
797
- var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
798
- var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
799
- var anObject = anObject$2;
800
-
801
- var concat$1 = uncurryThis$7([].concat);
802
-
803
- // all object keys, includes non-enumerable and symbols
804
- var ownKeys$1 = getBuiltIn$1('Reflect', 'ownKeys') || function ownKeys(it) {
805
- var keys = getOwnPropertyNamesModule.f(anObject(it));
806
- var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
807
- return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
808
- };
809
-
810
- var hasOwn = hasOwnProperty_1;
811
- var ownKeys = ownKeys$1;
812
- var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
813
- var definePropertyModule = objectDefineProperty;
814
-
815
- var copyConstructorProperties$1 = function (target, source) {
816
- var keys = ownKeys(source);
817
- var defineProperty = definePropertyModule.f;
818
- var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
819
- for (var i = 0; i < keys.length; i++) {
820
- var key = keys[i];
821
- if (!hasOwn(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
822
- }
823
- };
824
-
825
- var fails$5 = fails$a;
826
- var isCallable$2 = isCallable$b;
827
-
828
- var replacement = /#|\.prototype\./;
829
-
830
- var isForced$1 = function (feature, detection) {
831
- var value = data[normalize(feature)];
832
- return value == POLYFILL ? true
833
- : value == NATIVE ? false
834
- : isCallable$2(detection) ? fails$5(detection)
835
- : !!detection;
836
- };
837
-
838
- var normalize = isForced$1.normalize = function (string) {
839
- return String(string).replace(replacement, '.').toLowerCase();
840
- };
841
-
842
- var data = isForced$1.data = {};
843
- var NATIVE = isForced$1.NATIVE = 'N';
844
- var POLYFILL = isForced$1.POLYFILL = 'P';
845
-
846
- var isForced_1 = isForced$1;
847
-
848
- var global$5 = global$p;
849
- var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
850
- var createNonEnumerableProperty = createNonEnumerableProperty$3;
851
- var redefine = redefine$1.exports;
852
- var setGlobal = setGlobal$3;
853
- var copyConstructorProperties = copyConstructorProperties$1;
854
- var isForced = isForced_1;
855
-
856
- /*
857
- options.target - name of the target object
858
- options.global - target is the global object
859
- options.stat - export as static methods of target
860
- options.proto - export as prototype methods of target
861
- options.real - real prototype method for the `pure` version
862
- options.forced - export even if the native feature is available
863
- options.bind - bind methods to the target, required for the `pure` version
864
- options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
865
- options.unsafe - use the simple assignment of property instead of delete + defineProperty
866
- options.sham - add a flag to not completely full polyfills
867
- options.enumerable - export as enumerable property
868
- options.noTargetGet - prevent calling a getter on target
869
- options.name - the .name of the function if it does not match the key
870
- */
871
- var _export = function (options, source) {
872
- var TARGET = options.target;
873
- var GLOBAL = options.global;
874
- var STATIC = options.stat;
875
- var FORCED, target, key, targetProperty, sourceProperty, descriptor;
876
- if (GLOBAL) {
877
- target = global$5;
878
- } else if (STATIC) {
879
- target = global$5[TARGET] || setGlobal(TARGET, {});
880
- } else {
881
- target = (global$5[TARGET] || {}).prototype;
882
- }
883
- if (target) for (key in source) {
884
- sourceProperty = source[key];
885
- if (options.noTargetGet) {
886
- descriptor = getOwnPropertyDescriptor(target, key);
887
- targetProperty = descriptor && descriptor.value;
888
- } else targetProperty = target[key];
889
- FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
890
- // contained in target
891
- if (!FORCED && targetProperty !== undefined) {
892
- if (typeof sourceProperty == typeof targetProperty) continue;
893
- copyConstructorProperties(sourceProperty, targetProperty);
894
- }
895
- // add a flag to not completely full polyfills
896
- if (options.sham || (targetProperty && targetProperty.sham)) {
897
- createNonEnumerableProperty(sourceProperty, 'sham', true);
898
- }
899
- // extend global
900
- redefine(target, key, sourceProperty, options);
901
- }
902
- };
903
-
904
- var internalObjectKeys = objectKeysInternal;
905
- var enumBugKeys = enumBugKeys$2;
906
-
907
- // `Object.keys` method
908
- // https://tc39.es/ecma262/#sec-object.keys
909
- // eslint-disable-next-line es/no-object-keys -- safe
910
- var objectKeys$1 = Object.keys || function keys(O) {
911
- return internalObjectKeys(O, enumBugKeys);
912
- };
913
-
914
- var DESCRIPTORS = descriptors;
915
- var uncurryThis$6 = functionUncurryThis;
916
- var call = functionCall;
917
- var fails$4 = fails$a;
918
- var objectKeys = objectKeys$1;
919
- var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
920
- var propertyIsEnumerableModule = objectPropertyIsEnumerable;
921
- var toObject$1 = toObject$3;
922
- var IndexedObject$2 = indexedObject;
923
-
924
- // eslint-disable-next-line es/no-object-assign -- safe
925
- var $assign = Object.assign;
926
- // eslint-disable-next-line es/no-object-defineproperty -- required for testing
927
- var defineProperty = Object.defineProperty;
928
- var concat = uncurryThis$6([].concat);
929
-
930
- // `Object.assign` method
931
- // https://tc39.es/ecma262/#sec-object.assign
932
- var objectAssign = !$assign || fails$4(function () {
933
- // should have correct order of operations (Edge bug)
934
- if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
935
- enumerable: true,
936
- get: function () {
937
- defineProperty(this, 'b', {
938
- value: 3,
939
- enumerable: false
940
- });
941
- }
942
- }), { b: 2 })).b !== 1) return true;
943
- // should work with symbols and should have deterministic property order (V8 bug)
944
- var A = {};
945
- var B = {};
946
- // eslint-disable-next-line es/no-symbol -- safe
947
- var symbol = Symbol();
948
- var alphabet = 'abcdefghijklmnopqrst';
949
- A[symbol] = 7;
950
- alphabet.split('').forEach(function (chr) { B[chr] = chr; });
951
- return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet;
952
- }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
953
- var T = toObject$1(target);
954
- var argumentsLength = arguments.length;
955
- var index = 1;
956
- var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
957
- var propertyIsEnumerable = propertyIsEnumerableModule.f;
958
- while (argumentsLength > index) {
959
- var S = IndexedObject$2(arguments[index++]);
960
- var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
961
- var length = keys.length;
962
- var j = 0;
963
- var key;
964
- while (length > j) {
965
- key = keys[j++];
966
- if (!DESCRIPTORS || call(propertyIsEnumerable, S, key)) T[key] = S[key];
967
- }
968
- } return T;
969
- } : $assign;
970
-
971
- var $$4 = _export;
972
- var assign = objectAssign;
973
-
974
- // `Object.assign` method
975
- // https://tc39.es/ecma262/#sec-object.assign
976
- // eslint-disable-next-line es/no-object-assign -- required for testing
977
- $$4({ target: 'Object', stat: true, forced: Object.assign !== assign }, {
978
- assign: assign
979
- });
980
-
981
- /*! *****************************************************************************
982
- Copyright (c) Microsoft Corporation.
983
-
984
- Permission to use, copy, modify, and/or distribute this software for any
985
- purpose with or without fee is hereby granted.
986
-
987
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
988
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
989
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
990
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
991
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
992
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
993
- PERFORMANCE OF THIS SOFTWARE.
994
- ***************************************************************************** */
995
-
996
- function __rest(s, e) {
997
- var t = {};
998
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
999
- t[p] = s[p];
1000
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
1001
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
1002
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
1003
- t[p[i]] = s[p[i]];
1004
- }
1005
- return t;
1006
- }
1007
-
1008
- var fails$3 = fails$a;
1009
-
1010
- var arrayMethodIsStrict$1 = function (METHOD_NAME, argument) {
1011
- var method = [][METHOD_NAME];
1012
- return !!method && fails$3(function () {
1013
- // eslint-disable-next-line no-useless-call,no-throw-literal -- required for testing
1014
- method.call(null, argument || function () { throw 1; }, 1);
1015
- });
1016
- };
1017
-
1018
- var $$3 = _export;
1019
- var uncurryThis$5 = functionUncurryThis;
1020
- var IndexedObject$1 = indexedObject;
1021
- var toIndexedObject = toIndexedObject$4;
1022
- var arrayMethodIsStrict = arrayMethodIsStrict$1;
1023
-
1024
- var un$Join = uncurryThis$5([].join);
1025
-
1026
- var ES3_STRINGS = IndexedObject$1 != Object;
1027
- var STRICT_METHOD = arrayMethodIsStrict('join', ',');
1028
-
1029
- // `Array.prototype.join` method
1030
- // https://tc39.es/ecma262/#sec-array.prototype.join
1031
- $$3({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD }, {
1032
- join: function join(separator) {
1033
- return un$Join(toIndexedObject(this), separator === undefined ? ',' : separator);
1034
- }
1035
- });
1036
-
1037
- function Button(_ref) {
1038
- var children = _ref.children,
1039
- variant = _ref.variant,
1040
- onClick = _ref.onClick,
1041
- _ref$active = _ref.active,
1042
- active = _ref$active === void 0 ? false : _ref$active,
1043
- _ref$type = _ref.type,
1044
- type = _ref$type === void 0 ? 'button' : _ref$type;
1045
- var props = {
1046
- type: type
1047
- };
1048
- var classNames = [];
1049
- if (variant) classNames.push(variant);
1050
- if (active) classNames.push('active');
1051
- if (classNames.length) props.className = classNames.join(' ');
1052
- if (onClick) props.onClick = onClick;
1053
- return jsx("button", Object.assign({}, props, {
1054
- children: children
1055
- }), void 0);
1056
- }
1057
-
1058
- var ModalHeader = function ModalHeader(_ref) {
1059
- var _ref$header = _ref.header,
1060
- header = _ref$header === void 0 ? '' : _ref$header,
1061
- onClose = _ref.onClose;
1062
-
1063
- var handleClose = function handleClose(event) {
1064
- if (onClose) onClose(event);
1065
- };
1066
-
1067
- return jsxs("div", Object.assign({
1068
- className: "header"
1069
- }, {
1070
- children: [jsx("h3", {
1071
- children: header
1072
- }, void 0), jsx("button", Object.assign({
1073
- className: "close",
1074
- onClick: handleClose
1075
- }, {
1076
- children: jsx("span", Object.assign({
1077
- className: "sr-only"
1078
- }, {
1079
- children: "Close"
1080
- }), void 0)
1081
- }), void 0)]
1082
- }), void 0);
1083
- };
1084
-
1085
- var ModalBody = function ModalBody(_ref2) {
1086
- var children = _ref2.children;
1087
- return jsx("div", Object.assign({
1088
- className: "body"
1089
- }, {
1090
- children: children
1091
- }), void 0);
1092
- };
1093
-
1094
- var ModalFooter = function ModalFooter(_ref3) {
1095
- var confirm = _ref3.confirm,
1096
- dismiss = _ref3.dismiss,
1097
- onClose = _ref3.onClose,
1098
- onConfirm = _ref3.onConfirm,
1099
- onDismiss = _ref3.onDismiss;
1100
-
1101
- var handleConfirm = function handleConfirm(event) {
1102
- if (onConfirm) onConfirm(event);
1103
- if (onClose) onClose(event);
1104
- };
1105
-
1106
- var handleDismiss = function handleDismiss(event) {
1107
- if (onDismiss) onDismiss(event);
1108
- if (onClose) onClose(event);
1109
- };
1110
-
1111
- return jsxs("div", Object.assign({
1112
- className: "footer"
1113
- }, {
1114
- children: [dismiss && jsx(Button, Object.assign({
1115
- variant: "secondary",
1116
- onClick: handleDismiss
1117
- }, {
1118
- children: dismiss
1119
- }), void 0), confirm && jsx(Button, Object.assign({
1120
- variant: "primary",
1121
- onClick: handleConfirm
1122
- }, {
1123
- children: confirm
1124
- }), void 0)]
1125
- }), void 0);
1126
- };
1127
-
1128
- var Modal = function Modal(_a) {
1129
- var _a$type = _a.type,
1130
- type = _a$type === void 0 ? 'default' : _a$type,
1131
- props = __rest(_a, ["type"]);
1132
-
1133
- return jsxs("section", Object.assign({
1134
- role: ModalRole[type]
1135
- }, {
1136
- children: [jsx(ModalHeader, Object.assign({}, props), void 0), jsx(ModalBody, Object.assign({}, props), void 0), jsx(ModalFooter, Object.assign({}, props), void 0)]
1137
- }), void 0);
1138
- };
1139
-
1140
- function Group(_ref) {
1141
- var children = _ref.children;
1142
- return jsx("div", Object.assign({
1143
- className: "group"
1144
- }, {
1145
- children: children
1146
- }), void 0);
1147
- }
1148
-
1149
- function Card(_ref) {
1150
- var children = _ref.children,
1151
- headline = _ref.headline,
1152
- buttons = _ref.buttons;
1153
- return jsx("section", Object.assign({
1154
- className: "card"
1155
- }, {
1156
- children: jsxs("div", Object.assign({
1157
- className: "card-body"
1158
- }, {
1159
- children: [headline && jsx("h2", {
1160
- children: headline
1161
- }, void 0), jsx("p", {
1162
- children: children
1163
- }, void 0), buttons && jsx("footer", {
1164
- children: buttons
1165
- }, void 0)]
1166
- }), void 0)
1167
- }), void 0);
1168
- }
1169
-
1170
- function Alert(_ref) {
1171
- var type = _ref.type,
1172
- heading = _ref.heading,
1173
- children = _ref.children,
1174
- closeText = _ref.closeText,
1175
- _ref$isCloseable = _ref.isCloseable,
1176
- isCloseable = _ref$isCloseable === void 0 ? true : _ref$isCloseable;
1177
-
1178
- var _useState = useState(),
1179
- closeButton = _useState[0],
1180
- setCloseButton = _useState[1];
1181
-
1182
- useEffect(function () {
1183
- if (!isCloseable) {
1184
- setCloseButton(null);
1185
- } else {
1186
- if (closeText) setCloseButton(jsx(Button, {
1187
- children: closeText
1188
- }, void 0));else setCloseButton(jsx("button", {
1189
- className: "close"
1190
- }, void 0));
1191
- }
1192
- }, [isCloseable, closeText]);
1193
- return jsxs("div", Object.assign({
1194
- role: "alert",
1195
- className: type
1196
- }, {
1197
- children: [heading && jsx("h3", {
1198
- children: heading
1199
- }, void 0), jsx("p", {
1200
- children: children
1201
- }, void 0), closeButton]
1202
- }), void 0);
1203
- }
1204
-
1205
- var uncurryThis$4 = functionUncurryThis;
1206
- var aCallable = aCallable$2;
1207
-
1208
- var bind$1 = uncurryThis$4(uncurryThis$4.bind);
1209
-
1210
- // optional / simple context binding
1211
- var functionBindContext = function (fn, that) {
1212
- aCallable(fn);
1213
- return that === undefined ? fn : bind$1 ? bind$1(fn, that) : function (/* ...args */) {
1214
- return fn.apply(that, arguments);
1215
- };
1216
- };
1217
-
1218
- var classof$3 = classofRaw$1;
1219
-
1220
- // `IsArray` abstract operation
1221
- // https://tc39.es/ecma262/#sec-isarray
1222
- // eslint-disable-next-line es/no-array-isarray -- safe
1223
- var isArray$1 = Array.isArray || function isArray(argument) {
1224
- return classof$3(argument) == 'Array';
1225
- };
1226
-
1227
- var wellKnownSymbol$3 = wellKnownSymbol$5;
1228
-
1229
- var TO_STRING_TAG$1 = wellKnownSymbol$3('toStringTag');
1230
- var test = {};
1231
-
1232
- test[TO_STRING_TAG$1] = 'z';
1233
-
1234
- var toStringTagSupport = String(test) === '[object z]';
1235
-
1236
- var global$4 = global$p;
1237
- var TO_STRING_TAG_SUPPORT = toStringTagSupport;
1238
- var isCallable$1 = isCallable$b;
1239
- var classofRaw = classofRaw$1;
1240
- var wellKnownSymbol$2 = wellKnownSymbol$5;
1241
-
1242
- var TO_STRING_TAG = wellKnownSymbol$2('toStringTag');
1243
- var Object$1 = global$4.Object;
1244
-
1245
- // ES3 wrong here
1246
- var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
1247
-
1248
- // fallback for IE11 Script Access Denied error
1249
- var tryGet = function (it, key) {
1250
- try {
1251
- return it[key];
1252
- } catch (error) { /* empty */ }
1253
- };
1254
-
1255
- // getting tag from ES6+ `Object.prototype.toString`
1256
- var classof$2 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
1257
- var O, tag, result;
1258
- return it === undefined ? 'Undefined' : it === null ? 'Null'
1259
- // @@toStringTag case
1260
- : typeof (tag = tryGet(O = Object$1(it), TO_STRING_TAG)) == 'string' ? tag
1261
- // builtinTag case
1262
- : CORRECT_ARGUMENTS ? classofRaw(O)
1263
- // ES3 arguments fallback
1264
- : (result = classofRaw(O)) == 'Object' && isCallable$1(O.callee) ? 'Arguments' : result;
1265
- };
1266
-
1267
- var uncurryThis$3 = functionUncurryThis;
1268
- var fails$2 = fails$a;
1269
- var isCallable = isCallable$b;
1270
- var classof$1 = classof$2;
1271
- var getBuiltIn = getBuiltIn$4;
1272
- var inspectSource = inspectSource$3;
1273
-
1274
- var noop = function () { /* empty */ };
1275
- var empty = [];
1276
- var construct = getBuiltIn('Reflect', 'construct');
1277
- var constructorRegExp = /^\s*(?:class|function)\b/;
1278
- var exec$1 = uncurryThis$3(constructorRegExp.exec);
1279
- var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
1280
-
1281
- var isConstructorModern = function (argument) {
1282
- if (!isCallable(argument)) return false;
1283
- try {
1284
- construct(noop, empty, argument);
1285
- return true;
1286
- } catch (error) {
1287
- return false;
1288
- }
1289
- };
1290
-
1291
- var isConstructorLegacy = function (argument) {
1292
- if (!isCallable(argument)) return false;
1293
- switch (classof$1(argument)) {
1294
- case 'AsyncFunction':
1295
- case 'GeneratorFunction':
1296
- case 'AsyncGeneratorFunction': return false;
1297
- // we can't check .prototype since constructors produced by .bind haven't it
1298
- } return INCORRECT_TO_STRING || !!exec$1(constructorRegExp, inspectSource(argument));
1299
- };
1300
-
1301
- // `IsConstructor` abstract operation
1302
- // https://tc39.es/ecma262/#sec-isconstructor
1303
- var isConstructor$1 = !construct || fails$2(function () {
1304
- var called;
1305
- return isConstructorModern(isConstructorModern.call)
1306
- || !isConstructorModern(Object)
1307
- || !isConstructorModern(function () { called = true; })
1308
- || called;
1309
- }) ? isConstructorLegacy : isConstructorModern;
1310
-
1311
- var global$3 = global$p;
1312
- var isArray = isArray$1;
1313
- var isConstructor = isConstructor$1;
1314
- var isObject = isObject$6;
1315
- var wellKnownSymbol$1 = wellKnownSymbol$5;
1316
-
1317
- var SPECIES$1 = wellKnownSymbol$1('species');
1318
- var Array$1 = global$3.Array;
1319
-
1320
- // a part of `ArraySpeciesCreate` abstract operation
1321
- // https://tc39.es/ecma262/#sec-arrayspeciescreate
1322
- var arraySpeciesConstructor$1 = function (originalArray) {
1323
- var C;
1324
- if (isArray(originalArray)) {
1325
- C = originalArray.constructor;
1326
- // cross-realm fallback
1327
- if (isConstructor(C) && (C === Array$1 || isArray(C.prototype))) C = undefined;
1328
- else if (isObject(C)) {
1329
- C = C[SPECIES$1];
1330
- if (C === null) C = undefined;
1331
- }
1332
- } return C === undefined ? Array$1 : C;
1333
- };
1334
-
1335
- var arraySpeciesConstructor = arraySpeciesConstructor$1;
1336
-
1337
- // `ArraySpeciesCreate` abstract operation
1338
- // https://tc39.es/ecma262/#sec-arrayspeciescreate
1339
- var arraySpeciesCreate$1 = function (originalArray, length) {
1340
- return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
1341
- };
1342
-
1343
- var bind = functionBindContext;
1344
- var uncurryThis$2 = functionUncurryThis;
1345
- var IndexedObject = indexedObject;
1346
- var toObject = toObject$3;
1347
- var lengthOfArrayLike = lengthOfArrayLike$2;
1348
- var arraySpeciesCreate = arraySpeciesCreate$1;
1349
-
1350
- var push = uncurryThis$2([].push);
1351
-
1352
- // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation
1353
- var createMethod$1 = function (TYPE) {
1354
- var IS_MAP = TYPE == 1;
1355
- var IS_FILTER = TYPE == 2;
1356
- var IS_SOME = TYPE == 3;
1357
- var IS_EVERY = TYPE == 4;
1358
- var IS_FIND_INDEX = TYPE == 6;
1359
- var IS_FILTER_REJECT = TYPE == 7;
1360
- var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
1361
- return function ($this, callbackfn, that, specificCreate) {
1362
- var O = toObject($this);
1363
- var self = IndexedObject(O);
1364
- var boundFunction = bind(callbackfn, that);
1365
- var length = lengthOfArrayLike(self);
1366
- var index = 0;
1367
- var create = specificCreate || arraySpeciesCreate;
1368
- var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;
1369
- var value, result;
1370
- for (;length > index; index++) if (NO_HOLES || index in self) {
1371
- value = self[index];
1372
- result = boundFunction(value, index, O);
1373
- if (TYPE) {
1374
- if (IS_MAP) target[index] = result; // map
1375
- else if (result) switch (TYPE) {
1376
- case 3: return true; // some
1377
- case 5: return value; // find
1378
- case 6: return index; // findIndex
1379
- case 2: push(target, value); // filter
1380
- } else switch (TYPE) {
1381
- case 4: return false; // every
1382
- case 7: push(target, value); // filterReject
1383
- }
1384
- }
1385
- }
1386
- return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
1387
- };
1388
- };
1389
-
1390
- var arrayIteration = {
1391
- // `Array.prototype.forEach` method
1392
- // https://tc39.es/ecma262/#sec-array.prototype.foreach
1393
- forEach: createMethod$1(0),
1394
- // `Array.prototype.map` method
1395
- // https://tc39.es/ecma262/#sec-array.prototype.map
1396
- map: createMethod$1(1),
1397
- // `Array.prototype.filter` method
1398
- // https://tc39.es/ecma262/#sec-array.prototype.filter
1399
- filter: createMethod$1(2),
1400
- // `Array.prototype.some` method
1401
- // https://tc39.es/ecma262/#sec-array.prototype.some
1402
- some: createMethod$1(3),
1403
- // `Array.prototype.every` method
1404
- // https://tc39.es/ecma262/#sec-array.prototype.every
1405
- every: createMethod$1(4),
1406
- // `Array.prototype.find` method
1407
- // https://tc39.es/ecma262/#sec-array.prototype.find
1408
- find: createMethod$1(5),
1409
- // `Array.prototype.findIndex` method
1410
- // https://tc39.es/ecma262/#sec-array.prototype.findIndex
1411
- findIndex: createMethod$1(6),
1412
- // `Array.prototype.filterReject` method
1413
- // https://github.com/tc39/proposal-array-filtering
1414
- filterReject: createMethod$1(7)
1415
- };
1416
-
1417
- var fails$1 = fails$a;
1418
- var wellKnownSymbol = wellKnownSymbol$5;
1419
- var V8_VERSION = engineV8Version;
1420
-
1421
- var SPECIES = wellKnownSymbol('species');
1422
-
1423
- var arrayMethodHasSpeciesSupport$2 = function (METHOD_NAME) {
1424
- // We can't use this feature detection in V8 since it causes
1425
- // deoptimization and serious performance degradation
1426
- // https://github.com/zloirock/core-js/issues/677
1427
- return V8_VERSION >= 51 || !fails$1(function () {
1428
- var array = [];
1429
- var constructor = array.constructor = {};
1430
- constructor[SPECIES] = function () {
1431
- return { foo: 1 };
1432
- };
1433
- return array[METHOD_NAME](Boolean).foo !== 1;
1434
- });
1435
- };
1436
-
1437
- var $$2 = _export;
1438
- var $map = arrayIteration.map;
1439
- var arrayMethodHasSpeciesSupport$1 = arrayMethodHasSpeciesSupport$2;
1440
-
1441
- var HAS_SPECIES_SUPPORT$1 = arrayMethodHasSpeciesSupport$1('map');
1442
-
1443
- // `Array.prototype.map` method
1444
- // https://tc39.es/ecma262/#sec-array.prototype.map
1445
- // with adding support of @@species
1446
- $$2({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$1 }, {
1447
- map: function map(callbackfn /* , thisArg */) {
1448
- return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
1449
- }
1450
- });
1451
-
1452
- var $$1 = _export;
1453
- var $filter = arrayIteration.filter;
1454
- var arrayMethodHasSpeciesSupport = arrayMethodHasSpeciesSupport$2;
1455
-
1456
- var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');
1457
-
1458
- // `Array.prototype.filter` method
1459
- // https://tc39.es/ecma262/#sec-array.prototype.filter
1460
- // with adding support of @@species
1461
- $$1({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
1462
- filter: function filter(callbackfn /* , thisArg */) {
1463
- return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
1464
- }
1465
- });
1466
-
1467
- var ButtonGroup = function ButtonGroup(_ref) {
1468
- var children = _ref.children,
1469
- selectedIndex = _ref.selectedIndex,
1470
- variant = _ref.variant;
1471
-
1472
- var _useState = useState(selectedIndex),
1473
- selected = _useState[0],
1474
- setSelected = _useState[1];
1475
-
1476
- var _useState2 = useState([]),
1477
- buttons = _useState2[0],
1478
- setButtons = _useState2[1];
1479
-
1480
- useEffect(function () {
1481
- var buttonProps = (children instanceof Array ? children : [children]).filter(function (b) {
1482
- return b && b.props;
1483
- }).map(function (b, ix) {
1484
- var bp = b.props;
1485
- var props = Object.assign(Object.assign({}, bp), {
1486
- variant: variant,
1487
- key: bp.key || "btn_" + ix,
1488
- active: ix === selected,
1489
- onClick: function onClick(e) {
1490
- setSelected(ix);
1491
- if (bp.onClick) bp.onClick(e);
1492
- }
1493
- });
1494
- return props;
1495
- });
1496
- setButtons(buttonProps);
1497
- }, [children, selected, variant]);
1498
- return jsx(Group, {
1499
- children: buttons.map(function (props) {
1500
- return jsx(Button, Object.assign({}, props), props.key);
1501
- })
1502
- }, void 0);
1503
- };
1504
-
1505
- function Form(_ref) {
1506
- var children = _ref.children,
1507
- _ref$direction = _ref.direction,
1508
- direction = _ref$direction === void 0 ? 'vertical' : _ref$direction,
1509
- _ref$size = _ref.size,
1510
- size = _ref$size === void 0 ? 'md' : _ref$size;
1511
- return jsx("form", Object.assign({
1512
- className: [direction, "size-" + size].join(' ')
1513
- }, {
1514
- children: children
1515
- }), void 0);
1516
- }
1517
-
1518
- var global$2 = global$p;
1519
- var classof = classof$2;
1520
-
1521
- var String$1 = global$2.String;
1522
-
1523
- var toString$2 = function (argument) {
1524
- if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
1525
- return String$1(argument);
1526
- };
1527
-
1528
- // a string of all valid unicode whitespaces
1529
- var whitespaces$2 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
1530
- '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
1531
-
1532
- var uncurryThis$1 = functionUncurryThis;
1533
- var requireObjectCoercible = requireObjectCoercible$3;
1534
- var toString$1 = toString$2;
1535
- var whitespaces$1 = whitespaces$2;
1536
-
1537
- var replace = uncurryThis$1(''.replace);
1538
- var whitespace = '[' + whitespaces$1 + ']';
1539
- var ltrim = RegExp('^' + whitespace + whitespace + '*');
1540
- var rtrim = RegExp(whitespace + whitespace + '*$');
1541
-
1542
- // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
1543
- var createMethod = function (TYPE) {
1544
- return function ($this) {
1545
- var string = toString$1(requireObjectCoercible($this));
1546
- if (TYPE & 1) string = replace(string, ltrim, '');
1547
- if (TYPE & 2) string = replace(string, rtrim, '');
1548
- return string;
1549
- };
1550
- };
1551
-
1552
- var stringTrim = {
1553
- // `String.prototype.{ trimLeft, trimStart }` methods
1554
- // https://tc39.es/ecma262/#sec-string.prototype.trimstart
1555
- start: createMethod(1),
1556
- // `String.prototype.{ trimRight, trimEnd }` methods
1557
- // https://tc39.es/ecma262/#sec-string.prototype.trimend
1558
- end: createMethod(2),
1559
- // `String.prototype.trim` method
1560
- // https://tc39.es/ecma262/#sec-string.prototype.trim
1561
- trim: createMethod(3)
1562
- };
1563
-
1564
- var global$1 = global$p;
1565
- var fails = fails$a;
1566
- var uncurryThis = functionUncurryThis;
1567
- var toString = toString$2;
1568
- var trim = stringTrim.trim;
1569
- var whitespaces = whitespaces$2;
1570
-
1571
- var $parseInt$1 = global$1.parseInt;
1572
- var Symbol$1 = global$1.Symbol;
1573
- var ITERATOR = Symbol$1 && Symbol$1.iterator;
1574
- var hex = /^[+-]?0x/i;
1575
- var exec = uncurryThis(hex.exec);
1576
- var FORCED = $parseInt$1(whitespaces + '08') !== 8 || $parseInt$1(whitespaces + '0x16') !== 22
1577
- // MS Edge 18- broken with boxed symbols
1578
- || (ITERATOR && !fails(function () { $parseInt$1(Object(ITERATOR)); }));
1579
-
1580
- // `parseInt` method
1581
- // https://tc39.es/ecma262/#sec-parseint-string-radix
1582
- var numberParseInt = FORCED ? function parseInt(string, radix) {
1583
- var S = trim(toString(string));
1584
- return $parseInt$1(S, (radix >>> 0) || (exec(hex, S) ? 16 : 10));
1585
- } : $parseInt$1;
1586
-
1587
- var $ = _export;
1588
- var $parseInt = numberParseInt;
1589
-
1590
- // `parseInt` method
1591
- // https://tc39.es/ecma262/#sec-parseint-string-radix
1592
- $({ global: true, forced: parseInt != $parseInt }, {
1593
- parseInt: $parseInt
1594
- });
1595
-
1596
- var useInput = function useInput(props, evaluator, notify) {
1597
- var id = useMemo(function () {
1598
- return props.id || randomId();
1599
- }, [props.id]);
1600
- var ref = useRef(null);
1601
-
1602
- var _useState = useState(props.value),
1603
- value = _useState[0],
1604
- setValue = _useState[1];
1605
-
1606
- var _useState2 = useState(props.checked),
1607
- checked = _useState2[0],
1608
- setChecked = _useState2[1];
1609
-
1610
- useEffect(function () {
1611
- if (ref.current && ref.current.form) {
1612
- var resetListener = function resetListener() {
1613
- setValue(props.value);
1614
- setChecked(props.checked);
1615
- };
1616
-
1617
- var form = ref.current.form;
1618
- form.addEventListener('reset', resetListener);
1619
- return function () {
1620
- return form.removeEventListener('reset', resetListener);
1621
- };
1622
- } else {
1623
- // eslint-disable-next-line @typescript-eslint/no-empty-function
1624
- return function () {};
1625
- }
1626
- }, [props]);
1627
-
1628
- var onChange = function onChange(event) {
1629
- setValue(event.target.value);
1630
- setChecked(event.target.checked);
1631
- if (notify) notify(evaluator(event.target));
1632
- };
1633
-
1634
- return Object.assign(Object.assign({}, props), {
1635
- id: id,
1636
- ref: ref,
1637
- value: value,
1638
- checked: checked,
1639
- onChange: onChange
1640
- });
1641
- };
1642
-
1643
- var RenderInput = function RenderInput(type, props, evaluator, label, info, listener) {
1644
- var _a = useInput(props, evaluator, listener),
1645
- value = _a.value,
1646
- inputProps = __rest(_a, ["value"]);
1647
-
1648
- var propsWithDescription = info ? Object.assign(Object.assign({}, inputProps), {
1649
- 'aria-describedby': inputProps.id + "_info"
1650
- }) : inputProps;
1651
- return jsxs("div", Object.assign({
1652
- className: "form-field"
1653
- }, {
1654
- children: [label && jsx("label", Object.assign({
1655
- htmlFor: inputProps.id
1656
- }, {
1657
- children: label
1658
- }), void 0), info && jsx("span", Object.assign({
1659
- className: "form-info",
1660
- id: "{inputProps.id}_info"
1661
- }, {
1662
- children: info
1663
- }), void 0), jsx("input", Object.assign({
1664
- type: type,
1665
- value: value
1666
- }, propsWithDescription), void 0)]
1667
- }), void 0);
1668
- };
1669
-
1670
- var TextInput = function TextInput(_a) {
1671
- var label = _a.label,
1672
- info = _a.info,
1673
- onChangeText = _a.onChangeText,
1674
- props = __rest(_a, ["label", "info", "onChangeText"]);
1675
-
1676
- return RenderInput('text', props, function (e) {
1677
- return e.value;
1678
- }, label, info, onChangeText);
1679
- };
1680
- var EmailInput = function EmailInput(_a) {
1681
- var label = _a.label,
1682
- info = _a.info,
1683
- onChangeText = _a.onChangeText,
1684
- props = __rest(_a, ["label", "info", "onChangeText"]);
1685
-
1686
- return RenderInput('email', props, function (e) {
1687
- return e.value;
1688
- }, label, info, onChangeText);
1689
- };
1690
- var NumberInput = function NumberInput(_a) {
1691
- var label = _a.label,
1692
- info = _a.info,
1693
- onChangeText = _a.onChangeText,
1694
- props = __rest(_a, ["label", "info", "onChangeText"]);
1695
-
1696
- return RenderInput('number', props, function (e) {
1697
- return e.value.length ? parseInt(e.value, 10) : undefined;
1698
- }, label, info, onChangeText);
1699
- };
1700
- var Checkbox = function Checkbox(_a) {
1701
- var label = _a.label,
1702
- onChecked = _a.onChecked,
1703
- props = __rest(_a, ["label", "onChecked"]);
1704
-
1705
- var inputProps = useInput(props, function (e) {
1706
- return e.checked;
1707
- }, onChecked);
1708
- return jsxs("label", Object.assign({
1709
- htmlFor: inputProps.id,
1710
- className: "form-control"
1711
- }, {
1712
- children: [label, jsx("input", Object.assign({
1713
- type: "checkbox"
1714
- }, inputProps), void 0), jsx("span", {}, void 0)]
1715
- }), void 0);
1716
- };
1717
-
1718
- export { Alert, Button, ButtonGroup, Card, Checkbox, EmailInput, Form, Group, Modal, NumberInput, TextInput };