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

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/react.umd.js CHANGED
@@ -42,6 +42,227 @@
42
42
  return t;
43
43
  }
44
44
 
45
+ function Button(_a) {
46
+ var children = _a.children,
47
+ variant = _a.variant,
48
+ onClick = _a.onClick,
49
+ _b = _a.active,
50
+ active = _b === void 0 ? false : _b,
51
+ _c = _a.type,
52
+ type = _c === void 0 ? 'button' : _c;
53
+ var props = {
54
+ type: type
55
+ };
56
+ var classNames = [];
57
+ if (variant) classNames.push(variant);
58
+ if (active) classNames.push('active');
59
+ if (classNames.length) props.className = classNames.join(' ');
60
+ if (onClick) props.onClick = onClick;
61
+ return jsxRuntime.jsx("button", __assign({}, props, {
62
+ children: children
63
+ }), void 0);
64
+ }
65
+
66
+ var ModalHeader = function ModalHeader(_a) {
67
+ var _b = _a.header,
68
+ header = _b === void 0 ? '' : _b,
69
+ onClose = _a.onClose;
70
+
71
+ var handleClose = function handleClose(event) {
72
+ if (onClose) onClose(event);
73
+ };
74
+
75
+ return jsxRuntime.jsxs("div", __assign({
76
+ className: "header"
77
+ }, {
78
+ children: [jsxRuntime.jsx("h3", {
79
+ children: header
80
+ }, void 0), jsxRuntime.jsx("button", __assign({
81
+ className: "close",
82
+ onClick: handleClose
83
+ }, {
84
+ children: jsxRuntime.jsx("span", __assign({
85
+ className: "sr-only"
86
+ }, {
87
+ children: "Close"
88
+ }), void 0)
89
+ }), void 0)]
90
+ }), void 0);
91
+ };
92
+
93
+ var ModalBody = function ModalBody(_a) {
94
+ var children = _a.children;
95
+ return jsxRuntime.jsx("div", __assign({
96
+ className: "body"
97
+ }, {
98
+ children: children
99
+ }), void 0);
100
+ };
101
+
102
+ var ModalFooter = function ModalFooter(_a) {
103
+ var confirm = _a.confirm,
104
+ dismiss = _a.dismiss,
105
+ onClose = _a.onClose,
106
+ onConfirm = _a.onConfirm,
107
+ onDismiss = _a.onDismiss;
108
+
109
+ var handleConfirm = function handleConfirm(event) {
110
+ if (onConfirm) onConfirm(event);
111
+ if (onClose) onClose(event);
112
+ };
113
+
114
+ var handleDismiss = function handleDismiss(event) {
115
+ if (onDismiss) onDismiss(event);
116
+ if (onClose) onClose(event);
117
+ };
118
+
119
+ return jsxRuntime.jsxs("div", __assign({
120
+ className: "footer"
121
+ }, {
122
+ children: [dismiss && jsxRuntime.jsx(Button, __assign({
123
+ variant: "secondary",
124
+ onClick: handleDismiss
125
+ }, {
126
+ children: dismiss
127
+ }), void 0), confirm && jsxRuntime.jsx(Button, __assign({
128
+ variant: "primary",
129
+ onClick: handleConfirm
130
+ }, {
131
+ children: confirm
132
+ }), void 0)]
133
+ }), void 0);
134
+ };
135
+
136
+ var Modal = function Modal(_a) {
137
+ var _b = _a.type,
138
+ type = _b === void 0 ? 'default' : _b,
139
+ props = __rest(_a, ["type"]);
140
+
141
+ return jsxRuntime.jsxs("section", __assign({
142
+ role: extract.ModalRole[type]
143
+ }, {
144
+ children: [jsxRuntime.jsx(ModalHeader, __assign({}, props), void 0), jsxRuntime.jsx(ModalBody, __assign({}, props), void 0), jsxRuntime.jsx(ModalFooter, __assign({}, props), void 0)]
145
+ }), void 0);
146
+ };
147
+
148
+ function Group(_a) {
149
+ var children = _a.children;
150
+ return jsxRuntime.jsx("div", __assign({
151
+ className: "group"
152
+ }, {
153
+ children: children
154
+ }), void 0);
155
+ }
156
+
157
+ function Card(_a) {
158
+ var children = _a.children,
159
+ headline = _a.headline,
160
+ buttons = _a.buttons;
161
+ return jsxRuntime.jsx("section", __assign({
162
+ className: "card"
163
+ }, {
164
+ children: jsxRuntime.jsxs("div", __assign({
165
+ className: "card-body"
166
+ }, {
167
+ children: [headline && jsxRuntime.jsx("h2", {
168
+ children: headline
169
+ }, void 0), jsxRuntime.jsx("p", {
170
+ children: children
171
+ }, void 0), buttons && jsxRuntime.jsx("footer", {
172
+ children: buttons
173
+ }, void 0)]
174
+ }), void 0)
175
+ }), void 0);
176
+ }
177
+
178
+ function Alert(_a) {
179
+ var type = _a.type,
180
+ heading = _a.heading,
181
+ children = _a.children,
182
+ closeText = _a.closeText,
183
+ _b = _a.isCloseable,
184
+ isCloseable = _b === void 0 ? true : _b;
185
+
186
+ var _c = react.useState(),
187
+ closeButton = _c[0],
188
+ setCloseButton = _c[1];
189
+
190
+ react.useEffect(function () {
191
+ if (!isCloseable) {
192
+ setCloseButton(null);
193
+ } else {
194
+ if (closeText) setCloseButton(jsxRuntime.jsx(Button, {
195
+ children: closeText
196
+ }, void 0));else setCloseButton(jsxRuntime.jsx("button", {
197
+ className: "close"
198
+ }, void 0));
199
+ }
200
+ }, [isCloseable, closeText]);
201
+ return jsxRuntime.jsxs("div", __assign({
202
+ role: "alert",
203
+ className: type
204
+ }, {
205
+ children: [heading && jsxRuntime.jsx("h3", {
206
+ children: heading
207
+ }, void 0), jsxRuntime.jsx("p", {
208
+ children: children
209
+ }, void 0), closeButton]
210
+ }), void 0);
211
+ }
212
+
213
+ var ButtonGroup = function ButtonGroup(_a) {
214
+ var children = _a.children,
215
+ selectedIndex = _a.selectedIndex,
216
+ variant = _a.variant;
217
+
218
+ var _b = react.useState(selectedIndex),
219
+ selected = _b[0],
220
+ setSelected = _b[1];
221
+
222
+ var _c = react.useState([]),
223
+ buttons = _c[0],
224
+ setButtons = _c[1];
225
+
226
+ react.useEffect(function () {
227
+ var buttonProps = (children instanceof Array ? children : [children]).filter(function (b) {
228
+ return b && b.props;
229
+ }).map(function (b, ix) {
230
+ var bp = b.props;
231
+
232
+ var props = __assign(__assign({}, bp), {
233
+ variant: variant,
234
+ key: bp.key || "btn_" + ix,
235
+ active: ix === selected,
236
+ onClick: function (e) {
237
+ setSelected(ix);
238
+ if (bp.onClick) bp.onClick(e);
239
+ }
240
+ });
241
+
242
+ return props;
243
+ });
244
+ setButtons(buttonProps);
245
+ }, [children, selected, variant]);
246
+ return jsxRuntime.jsx(Group, {
247
+ children: buttons.map(function (props) {
248
+ return jsxRuntime.jsx(Button, __assign({}, props), props.key);
249
+ })
250
+ }, void 0);
251
+ };
252
+
253
+ function Form(_a) {
254
+ var children = _a.children,
255
+ _b = _a.direction,
256
+ direction = _b === void 0 ? 'vertical' : _b,
257
+ _c = _a.size,
258
+ size = _c === void 0 ? 'md' : _c;
259
+ return jsxRuntime.jsx("form", __assign({
260
+ className: [direction, "size-" + size].join(' ')
261
+ }, {
262
+ children: children
263
+ }), void 0);
264
+ }
265
+
45
266
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
46
267
 
47
268
  var check = function (it) {
@@ -49,7 +270,7 @@
49
270
  };
50
271
 
51
272
  // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
52
- var global$p =
273
+ var global$o =
53
274
  // eslint-disable-next-line es/no-global-this -- safe
54
275
  check(typeof globalThis == 'object' && globalThis) ||
55
276
  check(typeof window == 'object' && window) ||
@@ -61,7 +282,7 @@
61
282
 
62
283
  var objectGetOwnPropertyDescriptor = {};
63
284
 
64
- var fails$9 = function (exec) {
285
+ var fails$6 = function (exec) {
65
286
  try {
66
287
  return !!exec();
67
288
  } catch (error) {
@@ -69,10 +290,10 @@
69
290
  }
70
291
  };
71
292
 
72
- var fails$8 = fails$9;
293
+ var fails$5 = fails$6;
73
294
 
74
295
  // Detect IE8's incomplete defineProperty implementation
75
- var descriptors = !fails$8(function () {
296
+ var descriptors = !fails$5(function () {
76
297
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
77
298
  return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
78
299
  });
@@ -109,11 +330,11 @@
109
330
  };
110
331
 
111
332
  var FunctionPrototype$1 = Function.prototype;
112
- var bind$2 = FunctionPrototype$1.bind;
333
+ var bind = FunctionPrototype$1.bind;
113
334
  var call$3 = FunctionPrototype$1.call;
114
- var callBind = bind$2 && bind$2.bind(call$3);
335
+ var callBind = bind && bind.bind(call$3);
115
336
 
116
- var functionUncurryThis = bind$2 ? function (fn) {
337
+ var functionUncurryThis = bind ? function (fn) {
117
338
  return fn && callBind(call$3, fn);
118
339
  } : function (fn) {
119
340
  return fn && function () {
@@ -121,35 +342,35 @@
121
342
  };
122
343
  };
123
344
 
124
- var uncurryThis$e = functionUncurryThis;
345
+ var uncurryThis$a = functionUncurryThis;
125
346
 
126
- var toString$4 = uncurryThis$e({}.toString);
127
- var stringSlice = uncurryThis$e(''.slice);
347
+ var toString$4 = uncurryThis$a({}.toString);
348
+ var stringSlice = uncurryThis$a(''.slice);
128
349
 
129
350
  var classofRaw$1 = function (it) {
130
351
  return stringSlice(toString$4(it), 8, -1);
131
352
  };
132
353
 
133
- var global$o = global$p;
134
- var uncurryThis$d = functionUncurryThis;
135
- var fails$7 = fails$9;
136
- var classof$4 = classofRaw$1;
354
+ var global$n = global$o;
355
+ var uncurryThis$9 = functionUncurryThis;
356
+ var fails$4 = fails$6;
357
+ var classof$2 = classofRaw$1;
137
358
 
138
- var Object$4 = global$o.Object;
139
- var split = uncurryThis$d(''.split);
359
+ var Object$4 = global$n.Object;
360
+ var split = uncurryThis$9(''.split);
140
361
 
141
362
  // fallback for non-array-like ES3 and non-enumerable old V8 strings
142
- var indexedObject = fails$7(function () {
363
+ var indexedObject = fails$4(function () {
143
364
  // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
144
365
  // eslint-disable-next-line no-prototype-builtins -- safe
145
366
  return !Object$4('z').propertyIsEnumerable(0);
146
367
  }) ? function (it) {
147
- return classof$4(it) == 'String' ? split(it, '') : Object$4(it);
368
+ return classof$2(it) == 'String' ? split(it, '') : Object$4(it);
148
369
  } : Object$4;
149
370
 
150
- var global$n = global$p;
371
+ var global$m = global$o;
151
372
 
152
- var TypeError$7 = global$n.TypeError;
373
+ var TypeError$7 = global$m.TypeError;
153
374
 
154
375
  // `RequireObjectCoercible` abstract operation
155
376
  // https://tc39.es/ecma262/#sec-requireobjectcoercible
@@ -159,49 +380,49 @@
159
380
  };
160
381
 
161
382
  // toObject with fallback for non-array-like ES3 strings
162
- var IndexedObject$2 = indexedObject;
383
+ var IndexedObject = indexedObject;
163
384
  var requireObjectCoercible$2 = requireObjectCoercible$3;
164
385
 
165
- var toIndexedObject$4 = function (it) {
166
- return IndexedObject$2(requireObjectCoercible$2(it));
386
+ var toIndexedObject$3 = function (it) {
387
+ return IndexedObject(requireObjectCoercible$2(it));
167
388
  };
168
389
 
169
390
  // `IsCallable` abstract operation
170
391
  // https://tc39.es/ecma262/#sec-iscallable
171
- var isCallable$b = function (argument) {
392
+ var isCallable$a = function (argument) {
172
393
  return typeof argument == 'function';
173
394
  };
174
395
 
175
- var isCallable$a = isCallable$b;
396
+ var isCallable$9 = isCallable$a;
176
397
 
177
- var isObject$6 = function (it) {
178
- return typeof it == 'object' ? it !== null : isCallable$a(it);
398
+ var isObject$5 = function (it) {
399
+ return typeof it == 'object' ? it !== null : isCallable$9(it);
179
400
  };
180
401
 
181
- var global$m = global$p;
182
- var isCallable$9 = isCallable$b;
402
+ var global$l = global$o;
403
+ var isCallable$8 = isCallable$a;
183
404
 
184
405
  var aFunction = function (argument) {
185
- return isCallable$9(argument) ? argument : undefined;
406
+ return isCallable$8(argument) ? argument : undefined;
186
407
  };
187
408
 
188
- var getBuiltIn$4 = function (namespace, method) {
189
- return arguments.length < 2 ? aFunction(global$m[namespace]) : global$m[namespace] && global$m[namespace][method];
409
+ var getBuiltIn$3 = function (namespace, method) {
410
+ return arguments.length < 2 ? aFunction(global$l[namespace]) : global$l[namespace] && global$l[namespace][method];
190
411
  };
191
412
 
192
- var uncurryThis$c = functionUncurryThis;
413
+ var uncurryThis$8 = functionUncurryThis;
193
414
 
194
- var objectIsPrototypeOf = uncurryThis$c({}.isPrototypeOf);
415
+ var objectIsPrototypeOf = uncurryThis$8({}.isPrototypeOf);
195
416
 
196
- var getBuiltIn$3 = getBuiltIn$4;
417
+ var getBuiltIn$2 = getBuiltIn$3;
197
418
 
198
- var engineUserAgent = getBuiltIn$3('navigator', 'userAgent') || '';
419
+ var engineUserAgent = getBuiltIn$2('navigator', 'userAgent') || '';
199
420
 
200
- var global$l = global$p;
421
+ var global$k = global$o;
201
422
  var userAgent = engineUserAgent;
202
423
 
203
- var process = global$l.process;
204
- var Deno = global$l.Deno;
424
+ var process = global$k.process;
425
+ var Deno = global$k.Deno;
205
426
  var versions = process && process.versions || Deno && Deno.version;
206
427
  var v8 = versions && versions.v8;
207
428
  var match, version;
@@ -227,17 +448,17 @@
227
448
 
228
449
  /* eslint-disable es/no-symbol -- required for testing */
229
450
 
230
- var V8_VERSION$1 = engineV8Version;
231
- var fails$6 = fails$9;
451
+ var V8_VERSION = engineV8Version;
452
+ var fails$3 = fails$6;
232
453
 
233
454
  // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
234
- var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$6(function () {
455
+ var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$3(function () {
235
456
  var symbol = Symbol();
236
457
  // Chrome 38 Symbol has incorrect toString conversion
237
458
  // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
238
459
  return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
239
460
  // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
240
- !Symbol.sham && V8_VERSION$1 && V8_VERSION$1 < 41;
461
+ !Symbol.sham && V8_VERSION && V8_VERSION < 41;
241
462
  });
242
463
 
243
464
  /* eslint-disable es/no-symbol -- required for testing */
@@ -248,24 +469,24 @@
248
469
  && !Symbol.sham
249
470
  && typeof Symbol.iterator == 'symbol';
250
471
 
251
- var global$k = global$p;
252
- var getBuiltIn$2 = getBuiltIn$4;
253
- var isCallable$8 = isCallable$b;
472
+ var global$j = global$o;
473
+ var getBuiltIn$1 = getBuiltIn$3;
474
+ var isCallable$7 = isCallable$a;
254
475
  var isPrototypeOf = objectIsPrototypeOf;
255
476
  var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
256
477
 
257
- var Object$3 = global$k.Object;
478
+ var Object$3 = global$j.Object;
258
479
 
259
480
  var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
260
481
  return typeof it == 'symbol';
261
482
  } : function (it) {
262
- var $Symbol = getBuiltIn$2('Symbol');
263
- return isCallable$8($Symbol) && isPrototypeOf($Symbol.prototype, Object$3(it));
483
+ var $Symbol = getBuiltIn$1('Symbol');
484
+ return isCallable$7($Symbol) && isPrototypeOf($Symbol.prototype, Object$3(it));
264
485
  };
265
486
 
266
- var global$j = global$p;
487
+ var global$i = global$o;
267
488
 
268
- var String$3 = global$j.String;
489
+ var String$3 = global$i.String;
269
490
 
270
491
  var tryToString$1 = function (argument) {
271
492
  try {
@@ -275,64 +496,64 @@
275
496
  }
276
497
  };
277
498
 
278
- var global$i = global$p;
279
- var isCallable$7 = isCallable$b;
499
+ var global$h = global$o;
500
+ var isCallable$6 = isCallable$a;
280
501
  var tryToString = tryToString$1;
281
502
 
282
- var TypeError$6 = global$i.TypeError;
503
+ var TypeError$6 = global$h.TypeError;
283
504
 
284
505
  // `Assert: IsCallable(argument) is true`
285
- var aCallable$2 = function (argument) {
286
- if (isCallable$7(argument)) return argument;
506
+ var aCallable$1 = function (argument) {
507
+ if (isCallable$6(argument)) return argument;
287
508
  throw TypeError$6(tryToString(argument) + ' is not a function');
288
509
  };
289
510
 
290
- var aCallable$1 = aCallable$2;
511
+ var aCallable = aCallable$1;
291
512
 
292
513
  // `GetMethod` abstract operation
293
514
  // https://tc39.es/ecma262/#sec-getmethod
294
515
  var getMethod$1 = function (V, P) {
295
516
  var func = V[P];
296
- return func == null ? undefined : aCallable$1(func);
517
+ return func == null ? undefined : aCallable(func);
297
518
  };
298
519
 
299
- var global$h = global$p;
520
+ var global$g = global$o;
300
521
  var call$2 = functionCall;
301
- var isCallable$6 = isCallable$b;
302
- var isObject$5 = isObject$6;
522
+ var isCallable$5 = isCallable$a;
523
+ var isObject$4 = isObject$5;
303
524
 
304
- var TypeError$5 = global$h.TypeError;
525
+ var TypeError$5 = global$g.TypeError;
305
526
 
306
527
  // `OrdinaryToPrimitive` abstract operation
307
528
  // https://tc39.es/ecma262/#sec-ordinarytoprimitive
308
529
  var ordinaryToPrimitive$1 = function (input, pref) {
309
530
  var fn, val;
310
- if (pref === 'string' && isCallable$6(fn = input.toString) && !isObject$5(val = call$2(fn, input))) return val;
311
- if (isCallable$6(fn = input.valueOf) && !isObject$5(val = call$2(fn, input))) return val;
312
- if (pref !== 'string' && isCallable$6(fn = input.toString) && !isObject$5(val = call$2(fn, input))) return val;
531
+ if (pref === 'string' && isCallable$5(fn = input.toString) && !isObject$4(val = call$2(fn, input))) return val;
532
+ if (isCallable$5(fn = input.valueOf) && !isObject$4(val = call$2(fn, input))) return val;
533
+ if (pref !== 'string' && isCallable$5(fn = input.toString) && !isObject$4(val = call$2(fn, input))) return val;
313
534
  throw TypeError$5("Can't convert object to primitive value");
314
535
  };
315
536
 
316
537
  var shared$3 = {exports: {}};
317
538
 
318
- var global$g = global$p;
539
+ var global$f = global$o;
319
540
 
320
541
  // eslint-disable-next-line es/no-object-defineproperty -- safe
321
542
  var defineProperty = Object.defineProperty;
322
543
 
323
544
  var setGlobal$3 = function (key, value) {
324
545
  try {
325
- defineProperty(global$g, key, { value: value, configurable: true, writable: true });
546
+ defineProperty(global$f, key, { value: value, configurable: true, writable: true });
326
547
  } catch (error) {
327
- global$g[key] = value;
548
+ global$f[key] = value;
328
549
  } return value;
329
550
  };
330
551
 
331
- var global$f = global$p;
552
+ var global$e = global$o;
332
553
  var setGlobal$2 = setGlobal$3;
333
554
 
334
555
  var SHARED = '__core-js_shared__';
335
- var store$3 = global$f[SHARED] || setGlobal$2(SHARED, {});
556
+ var store$3 = global$e[SHARED] || setGlobal$2(SHARED, {});
336
557
 
337
558
  var sharedStore = store$3;
338
559
 
@@ -346,39 +567,39 @@
346
567
  copyright: '© 2021 Denis Pushkarev (zloirock.ru)'
347
568
  });
348
569
 
349
- var global$e = global$p;
570
+ var global$d = global$o;
350
571
  var requireObjectCoercible$1 = requireObjectCoercible$3;
351
572
 
352
- var Object$2 = global$e.Object;
573
+ var Object$2 = global$d.Object;
353
574
 
354
575
  // `ToObject` abstract operation
355
576
  // https://tc39.es/ecma262/#sec-toobject
356
- var toObject$2 = function (argument) {
577
+ var toObject$1 = function (argument) {
357
578
  return Object$2(requireObjectCoercible$1(argument));
358
579
  };
359
580
 
360
- var uncurryThis$b = functionUncurryThis;
361
- var toObject$1 = toObject$2;
581
+ var uncurryThis$7 = functionUncurryThis;
582
+ var toObject = toObject$1;
362
583
 
363
- var hasOwnProperty = uncurryThis$b({}.hasOwnProperty);
584
+ var hasOwnProperty = uncurryThis$7({}.hasOwnProperty);
364
585
 
365
586
  // `HasOwnProperty` abstract operation
366
587
  // https://tc39.es/ecma262/#sec-hasownproperty
367
588
  var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
368
- return hasOwnProperty(toObject$1(it), key);
589
+ return hasOwnProperty(toObject(it), key);
369
590
  };
370
591
 
371
- var uncurryThis$a = functionUncurryThis;
592
+ var uncurryThis$6 = functionUncurryThis;
372
593
 
373
594
  var id = 0;
374
595
  var postfix = Math.random();
375
- var toString$3 = uncurryThis$a(1.0.toString);
596
+ var toString$3 = uncurryThis$6(1.0.toString);
376
597
 
377
598
  var uid$2 = function (key) {
378
599
  return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$3(++id + postfix, 36);
379
600
  };
380
601
 
381
- var global$d = global$p;
602
+ var global$c = global$o;
382
603
  var shared$2 = shared$3.exports;
383
604
  var hasOwn$6 = hasOwnProperty_1;
384
605
  var uid$1 = uid$2;
@@ -386,11 +607,11 @@
386
607
  var USE_SYMBOL_AS_UID = useSymbolAsUid;
387
608
 
388
609
  var WellKnownSymbolsStore = shared$2('wks');
389
- var Symbol$2 = global$d.Symbol;
610
+ var Symbol$2 = global$c.Symbol;
390
611
  var symbolFor = Symbol$2 && Symbol$2['for'];
391
612
  var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$2 : Symbol$2 && Symbol$2.withoutSetter || uid$1;
392
613
 
393
- var wellKnownSymbol$5 = function (name) {
614
+ var wellKnownSymbol$3 = function (name) {
394
615
  if (!hasOwn$6(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
395
616
  var description = 'Symbol.' + name;
396
617
  if (NATIVE_SYMBOL && hasOwn$6(Symbol$2, name)) {
@@ -403,27 +624,27 @@
403
624
  } return WellKnownSymbolsStore[name];
404
625
  };
405
626
 
406
- var global$c = global$p;
627
+ var global$b = global$o;
407
628
  var call$1 = functionCall;
408
- var isObject$4 = isObject$6;
629
+ var isObject$3 = isObject$5;
409
630
  var isSymbol$1 = isSymbol$2;
410
631
  var getMethod = getMethod$1;
411
632
  var ordinaryToPrimitive = ordinaryToPrimitive$1;
412
- var wellKnownSymbol$4 = wellKnownSymbol$5;
633
+ var wellKnownSymbol$2 = wellKnownSymbol$3;
413
634
 
414
- var TypeError$4 = global$c.TypeError;
415
- var TO_PRIMITIVE = wellKnownSymbol$4('toPrimitive');
635
+ var TypeError$4 = global$b.TypeError;
636
+ var TO_PRIMITIVE = wellKnownSymbol$2('toPrimitive');
416
637
 
417
638
  // `ToPrimitive` abstract operation
418
639
  // https://tc39.es/ecma262/#sec-toprimitive
419
640
  var toPrimitive$1 = function (input, pref) {
420
- if (!isObject$4(input) || isSymbol$1(input)) return input;
641
+ if (!isObject$3(input) || isSymbol$1(input)) return input;
421
642
  var exoticToPrim = getMethod(input, TO_PRIMITIVE);
422
643
  var result;
423
644
  if (exoticToPrim) {
424
645
  if (pref === undefined) pref = 'default';
425
646
  result = call$1(exoticToPrim, input, pref);
426
- if (!isObject$4(result) || isSymbol$1(result)) return result;
647
+ if (!isObject$3(result) || isSymbol$1(result)) return result;
427
648
  throw TypeError$4("Can't convert object to primitive value");
428
649
  }
429
650
  if (pref === undefined) pref = 'number';
@@ -440,23 +661,23 @@
440
661
  return isSymbol(key) ? key : key + '';
441
662
  };
442
663
 
443
- var global$b = global$p;
444
- var isObject$3 = isObject$6;
664
+ var global$a = global$o;
665
+ var isObject$2 = isObject$5;
445
666
 
446
- var document = global$b.document;
667
+ var document = global$a.document;
447
668
  // typeof document.createElement is 'object' in old IE
448
- var EXISTS$1 = isObject$3(document) && isObject$3(document.createElement);
669
+ var EXISTS$1 = isObject$2(document) && isObject$2(document.createElement);
449
670
 
450
671
  var documentCreateElement = function (it) {
451
672
  return EXISTS$1 ? document.createElement(it) : {};
452
673
  };
453
674
 
454
675
  var DESCRIPTORS$4 = descriptors;
455
- var fails$5 = fails$9;
676
+ var fails$2 = fails$6;
456
677
  var createElement = documentCreateElement;
457
678
 
458
679
  // Thank's IE8 for his funny defineProperty
459
- var ie8DomDefine = !DESCRIPTORS$4 && !fails$5(function () {
680
+ var ie8DomDefine = !DESCRIPTORS$4 && !fails$2(function () {
460
681
  // eslint-disable-next-line es/no-object-defineproperty -- requied for testing
461
682
  return Object.defineProperty(createElement('div'), 'a', {
462
683
  get: function () { return 7; }
@@ -467,7 +688,7 @@
467
688
  var call = functionCall;
468
689
  var propertyIsEnumerableModule = objectPropertyIsEnumerable;
469
690
  var createPropertyDescriptor$1 = createPropertyDescriptor$2;
470
- var toIndexedObject$3 = toIndexedObject$4;
691
+ var toIndexedObject$2 = toIndexedObject$3;
471
692
  var toPropertyKey$1 = toPropertyKey$2;
472
693
  var hasOwn$5 = hasOwnProperty_1;
473
694
  var IE8_DOM_DEFINE$1 = ie8DomDefine;
@@ -478,7 +699,7 @@
478
699
  // `Object.getOwnPropertyDescriptor` method
479
700
  // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
480
701
  objectGetOwnPropertyDescriptor.f = DESCRIPTORS$3 ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
481
- O = toIndexedObject$3(O);
702
+ O = toIndexedObject$2(O);
482
703
  P = toPropertyKey$1(P);
483
704
  if (IE8_DOM_DEFINE$1) try {
484
705
  return $getOwnPropertyDescriptor(O, P);
@@ -488,25 +709,25 @@
488
709
 
489
710
  var objectDefineProperty = {};
490
711
 
491
- var global$a = global$p;
492
- var isObject$2 = isObject$6;
712
+ var global$9 = global$o;
713
+ var isObject$1 = isObject$5;
493
714
 
494
- var String$2 = global$a.String;
495
- var TypeError$3 = global$a.TypeError;
715
+ var String$2 = global$9.String;
716
+ var TypeError$3 = global$9.TypeError;
496
717
 
497
718
  // `Assert: Type(argument) is Object`
498
719
  var anObject$2 = function (argument) {
499
- if (isObject$2(argument)) return argument;
720
+ if (isObject$1(argument)) return argument;
500
721
  throw TypeError$3(String$2(argument) + ' is not an object');
501
722
  };
502
723
 
503
- var global$9 = global$p;
724
+ var global$8 = global$o;
504
725
  var DESCRIPTORS$2 = descriptors;
505
726
  var IE8_DOM_DEFINE = ie8DomDefine;
506
727
  var anObject$1 = anObject$2;
507
728
  var toPropertyKey = toPropertyKey$2;
508
729
 
509
- var TypeError$2 = global$9.TypeError;
730
+ var TypeError$2 = global$8.TypeError;
510
731
  // eslint-disable-next-line es/no-object-defineproperty -- safe
511
732
  var $defineProperty = Object.defineProperty;
512
733
 
@@ -537,28 +758,28 @@
537
758
 
538
759
  var redefine$1 = {exports: {}};
539
760
 
540
- var uncurryThis$9 = functionUncurryThis;
541
- var isCallable$5 = isCallable$b;
761
+ var uncurryThis$5 = functionUncurryThis;
762
+ var isCallable$4 = isCallable$a;
542
763
  var store$1 = sharedStore;
543
764
 
544
- var functionToString = uncurryThis$9(Function.toString);
765
+ var functionToString = uncurryThis$5(Function.toString);
545
766
 
546
767
  // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
547
- if (!isCallable$5(store$1.inspectSource)) {
768
+ if (!isCallable$4(store$1.inspectSource)) {
548
769
  store$1.inspectSource = function (it) {
549
770
  return functionToString(it);
550
771
  };
551
772
  }
552
773
 
553
- var inspectSource$3 = store$1.inspectSource;
774
+ var inspectSource$2 = store$1.inspectSource;
554
775
 
555
- var global$8 = global$p;
556
- var isCallable$4 = isCallable$b;
557
- var inspectSource$2 = inspectSource$3;
776
+ var global$7 = global$o;
777
+ var isCallable$3 = isCallable$a;
778
+ var inspectSource$1 = inspectSource$2;
558
779
 
559
- var WeakMap$1 = global$8.WeakMap;
780
+ var WeakMap$1 = global$7.WeakMap;
560
781
 
561
- var nativeWeakMap = isCallable$4(WeakMap$1) && /native code/.test(inspectSource$2(WeakMap$1));
782
+ var nativeWeakMap = isCallable$3(WeakMap$1) && /native code/.test(inspectSource$1(WeakMap$1));
562
783
 
563
784
  var shared$1 = shared$3.exports;
564
785
  var uid = uid$2;
@@ -572,9 +793,9 @@
572
793
  var hiddenKeys$3 = {};
573
794
 
574
795
  var NATIVE_WEAK_MAP = nativeWeakMap;
575
- var global$7 = global$p;
576
- var uncurryThis$8 = functionUncurryThis;
577
- var isObject$1 = isObject$6;
796
+ var global$6 = global$o;
797
+ var uncurryThis$4 = functionUncurryThis;
798
+ var isObject = isObject$5;
578
799
  var createNonEnumerableProperty$2 = createNonEnumerableProperty$3;
579
800
  var hasOwn$4 = hasOwnProperty_1;
580
801
  var shared = sharedStore;
@@ -582,8 +803,8 @@
582
803
  var hiddenKeys$2 = hiddenKeys$3;
583
804
 
584
805
  var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
585
- var TypeError$1 = global$7.TypeError;
586
- var WeakMap = global$7.WeakMap;
806
+ var TypeError$1 = global$6.TypeError;
807
+ var WeakMap = global$6.WeakMap;
587
808
  var set, get, has;
588
809
 
589
810
  var enforce = function (it) {
@@ -593,7 +814,7 @@
593
814
  var getterFor = function (TYPE) {
594
815
  return function (it) {
595
816
  var state;
596
- if (!isObject$1(it) || (state = get(it)).type !== TYPE) {
817
+ if (!isObject(it) || (state = get(it)).type !== TYPE) {
597
818
  throw TypeError$1('Incompatible receiver, ' + TYPE + ' required');
598
819
  } return state;
599
820
  };
@@ -601,9 +822,9 @@
601
822
 
602
823
  if (NATIVE_WEAK_MAP || shared.state) {
603
824
  var store = shared.state || (shared.state = new WeakMap());
604
- var wmget = uncurryThis$8(store.get);
605
- var wmhas = uncurryThis$8(store.has);
606
- var wmset = uncurryThis$8(store.set);
825
+ var wmget = uncurryThis$4(store.get);
826
+ var wmhas = uncurryThis$4(store.has);
827
+ var wmset = uncurryThis$4(store.set);
607
828
  set = function (it, metadata) {
608
829
  if (wmhas(store, it)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
609
830
  metadata.facade = it;
@@ -659,12 +880,12 @@
659
880
  CONFIGURABLE: CONFIGURABLE
660
881
  };
661
882
 
662
- var global$6 = global$p;
663
- var isCallable$3 = isCallable$b;
883
+ var global$5 = global$o;
884
+ var isCallable$2 = isCallable$a;
664
885
  var hasOwn$2 = hasOwnProperty_1;
665
886
  var createNonEnumerableProperty$1 = createNonEnumerableProperty$3;
666
887
  var setGlobal$1 = setGlobal$3;
667
- var inspectSource$1 = inspectSource$3;
888
+ var inspectSource = inspectSource$2;
668
889
  var InternalStateModule = internalState;
669
890
  var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
670
891
 
@@ -678,7 +899,7 @@
678
899
  var noTargetGet = options ? !!options.noTargetGet : false;
679
900
  var name = options && options.name !== undefined ? options.name : key;
680
901
  var state;
681
- if (isCallable$3(value)) {
902
+ if (isCallable$2(value)) {
682
903
  if (String(name).slice(0, 7) === 'Symbol(') {
683
904
  name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
684
905
  }
@@ -690,7 +911,7 @@
690
911
  state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
691
912
  }
692
913
  }
693
- if (O === global$6) {
914
+ if (O === global$5) {
694
915
  if (simple) O[key] = value;
695
916
  else setGlobal$1(key, value);
696
917
  return;
@@ -703,7 +924,7 @@
703
924
  else createNonEnumerableProperty$1(O, key, value);
704
925
  // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
705
926
  })(Function.prototype, 'toString', function toString() {
706
- return isCallable$3(this) && getInternalState(this).source || inspectSource$1(this);
927
+ return isCallable$2(this) && getInternalState(this).source || inspectSource(this);
707
928
  });
708
929
 
709
930
  var objectGetOwnPropertyNames = {};
@@ -746,19 +967,19 @@
746
967
 
747
968
  // `LengthOfArrayLike` abstract operation
748
969
  // https://tc39.es/ecma262/#sec-lengthofarraylike
749
- var lengthOfArrayLike$2 = function (obj) {
970
+ var lengthOfArrayLike$1 = function (obj) {
750
971
  return toLength(obj.length);
751
972
  };
752
973
 
753
- var toIndexedObject$2 = toIndexedObject$4;
974
+ var toIndexedObject$1 = toIndexedObject$3;
754
975
  var toAbsoluteIndex = toAbsoluteIndex$1;
755
- var lengthOfArrayLike$1 = lengthOfArrayLike$2;
976
+ var lengthOfArrayLike = lengthOfArrayLike$1;
756
977
 
757
978
  // `Array.prototype.{ indexOf, includes }` methods implementation
758
- var createMethod$2 = function (IS_INCLUDES) {
979
+ var createMethod$1 = function (IS_INCLUDES) {
759
980
  return function ($this, el, fromIndex) {
760
- var O = toIndexedObject$2($this);
761
- var length = lengthOfArrayLike$1(O);
981
+ var O = toIndexedObject$1($this);
982
+ var length = lengthOfArrayLike(O);
762
983
  var index = toAbsoluteIndex(fromIndex, length);
763
984
  var value;
764
985
  // Array#includes uses SameValueZero equality algorithm
@@ -777,29 +998,29 @@
777
998
  var arrayIncludes = {
778
999
  // `Array.prototype.includes` method
779
1000
  // https://tc39.es/ecma262/#sec-array.prototype.includes
780
- includes: createMethod$2(true),
1001
+ includes: createMethod$1(true),
781
1002
  // `Array.prototype.indexOf` method
782
1003
  // https://tc39.es/ecma262/#sec-array.prototype.indexof
783
- indexOf: createMethod$2(false)
1004
+ indexOf: createMethod$1(false)
784
1005
  };
785
1006
 
786
- var uncurryThis$7 = functionUncurryThis;
1007
+ var uncurryThis$3 = functionUncurryThis;
787
1008
  var hasOwn$1 = hasOwnProperty_1;
788
- var toIndexedObject$1 = toIndexedObject$4;
1009
+ var toIndexedObject = toIndexedObject$3;
789
1010
  var indexOf = arrayIncludes.indexOf;
790
1011
  var hiddenKeys$1 = hiddenKeys$3;
791
1012
 
792
- var push$1 = uncurryThis$7([].push);
1013
+ var push = uncurryThis$3([].push);
793
1014
 
794
1015
  var objectKeysInternal = function (object, names) {
795
- var O = toIndexedObject$1(object);
1016
+ var O = toIndexedObject(object);
796
1017
  var i = 0;
797
1018
  var result = [];
798
1019
  var key;
799
- for (key in O) !hasOwn$1(hiddenKeys$1, key) && hasOwn$1(O, key) && push$1(result, key);
1020
+ for (key in O) !hasOwn$1(hiddenKeys$1, key) && hasOwn$1(O, key) && push(result, key);
800
1021
  // Don't enum bug & hidden keys
801
1022
  while (names.length > i) if (hasOwn$1(O, key = names[i++])) {
802
- ~indexOf(result, key) || push$1(result, key);
1023
+ ~indexOf(result, key) || push(result, key);
803
1024
  }
804
1025
  return result;
805
1026
  };
@@ -832,16 +1053,16 @@
832
1053
  // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
833
1054
  objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
834
1055
 
835
- var getBuiltIn$1 = getBuiltIn$4;
836
- var uncurryThis$6 = functionUncurryThis;
1056
+ var getBuiltIn = getBuiltIn$3;
1057
+ var uncurryThis$2 = functionUncurryThis;
837
1058
  var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
838
1059
  var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
839
1060
  var anObject = anObject$2;
840
1061
 
841
- var concat = uncurryThis$6([].concat);
1062
+ var concat = uncurryThis$2([].concat);
842
1063
 
843
1064
  // all object keys, includes non-enumerable and symbols
844
- var ownKeys$1 = getBuiltIn$1('Reflect', 'ownKeys') || function ownKeys(it) {
1065
+ var ownKeys$1 = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
845
1066
  var keys = getOwnPropertyNamesModule.f(anObject(it));
846
1067
  var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
847
1068
  return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;
@@ -862,8 +1083,8 @@
862
1083
  }
863
1084
  };
864
1085
 
865
- var fails$4 = fails$9;
866
- var isCallable$2 = isCallable$b;
1086
+ var fails$1 = fails$6;
1087
+ var isCallable$1 = isCallable$a;
867
1088
 
868
1089
  var replacement = /#|\.prototype\./;
869
1090
 
@@ -871,7 +1092,7 @@
871
1092
  var value = data[normalize(feature)];
872
1093
  return value == POLYFILL ? true
873
1094
  : value == NATIVE ? false
874
- : isCallable$2(detection) ? fails$4(detection)
1095
+ : isCallable$1(detection) ? fails$1(detection)
875
1096
  : !!detection;
876
1097
  };
877
1098
 
@@ -885,7 +1106,7 @@
885
1106
 
886
1107
  var isForced_1 = isForced$1;
887
1108
 
888
- var global$5 = global$p;
1109
+ var global$4 = global$o;
889
1110
  var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
890
1111
  var createNonEnumerableProperty = createNonEnumerableProperty$3;
891
1112
  var redefine = redefine$1.exports;
@@ -914,11 +1135,11 @@
914
1135
  var STATIC = options.stat;
915
1136
  var FORCED, target, key, targetProperty, sourceProperty, descriptor;
916
1137
  if (GLOBAL) {
917
- target = global$5;
1138
+ target = global$4;
918
1139
  } else if (STATIC) {
919
- target = global$5[TARGET] || setGlobal(TARGET, {});
1140
+ target = global$4[TARGET] || setGlobal(TARGET, {});
920
1141
  } else {
921
- target = (global$5[TARGET] || {}).prototype;
1142
+ target = (global$4[TARGET] || {}).prototype;
922
1143
  }
923
1144
  if (target) for (key in source) {
924
1145
  sourceProperty = source[key];
@@ -941,242 +1162,23 @@
941
1162
  }
942
1163
  };
943
1164
 
944
- var fails$3 = fails$9;
1165
+ var wellKnownSymbol$1 = wellKnownSymbol$3;
945
1166
 
946
- var arrayMethodIsStrict$1 = function (METHOD_NAME, argument) {
947
- var method = [][METHOD_NAME];
948
- return !!method && fails$3(function () {
949
- // eslint-disable-next-line no-useless-call,no-throw-literal -- required for testing
950
- method.call(null, argument || function () { throw 1; }, 1);
951
- });
952
- };
1167
+ var TO_STRING_TAG$1 = wellKnownSymbol$1('toStringTag');
1168
+ var test = {};
953
1169
 
954
- var $$3 = _export;
955
- var uncurryThis$5 = functionUncurryThis;
956
- var IndexedObject$1 = indexedObject;
957
- var toIndexedObject = toIndexedObject$4;
958
- var arrayMethodIsStrict = arrayMethodIsStrict$1;
1170
+ test[TO_STRING_TAG$1] = 'z';
959
1171
 
960
- var un$Join = uncurryThis$5([].join);
1172
+ var toStringTagSupport = String(test) === '[object z]';
961
1173
 
962
- var ES3_STRINGS = IndexedObject$1 != Object;
963
- var STRICT_METHOD = arrayMethodIsStrict('join', ',');
1174
+ var global$3 = global$o;
1175
+ var TO_STRING_TAG_SUPPORT = toStringTagSupport;
1176
+ var isCallable = isCallable$a;
1177
+ var classofRaw = classofRaw$1;
1178
+ var wellKnownSymbol = wellKnownSymbol$3;
964
1179
 
965
- // `Array.prototype.join` method
966
- // https://tc39.es/ecma262/#sec-array.prototype.join
967
- $$3({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD }, {
968
- join: function join(separator) {
969
- return un$Join(toIndexedObject(this), separator === undefined ? ',' : separator);
970
- }
971
- });
972
-
973
- function Button(_a) {
974
- var children = _a.children,
975
- variant = _a.variant,
976
- onClick = _a.onClick,
977
- _b = _a.active,
978
- active = _b === void 0 ? false : _b,
979
- _c = _a.type,
980
- type = _c === void 0 ? 'button' : _c;
981
- var props = {
982
- type: type
983
- };
984
- var classNames = [];
985
- if (variant) classNames.push(variant);
986
- if (active) classNames.push('active');
987
- if (classNames.length) props.className = classNames.join(' ');
988
- if (onClick) props.onClick = onClick;
989
- return jsxRuntime.jsx("button", __assign({}, props, {
990
- children: children
991
- }), void 0);
992
- }
993
-
994
- var ModalHeader = function ModalHeader(_a) {
995
- var _b = _a.header,
996
- header = _b === void 0 ? '' : _b,
997
- onClose = _a.onClose;
998
-
999
- var handleClose = function handleClose(event) {
1000
- if (onClose) onClose(event);
1001
- };
1002
-
1003
- return jsxRuntime.jsxs("div", __assign({
1004
- className: "header"
1005
- }, {
1006
- children: [jsxRuntime.jsx("h3", {
1007
- children: header
1008
- }, void 0), jsxRuntime.jsx("button", __assign({
1009
- className: "close",
1010
- onClick: handleClose
1011
- }, {
1012
- children: jsxRuntime.jsx("span", __assign({
1013
- className: "sr-only"
1014
- }, {
1015
- children: "Close"
1016
- }), void 0)
1017
- }), void 0)]
1018
- }), void 0);
1019
- };
1020
-
1021
- var ModalBody = function ModalBody(_a) {
1022
- var children = _a.children;
1023
- return jsxRuntime.jsx("div", __assign({
1024
- className: "body"
1025
- }, {
1026
- children: children
1027
- }), void 0);
1028
- };
1029
-
1030
- var ModalFooter = function ModalFooter(_a) {
1031
- var confirm = _a.confirm,
1032
- dismiss = _a.dismiss,
1033
- onClose = _a.onClose,
1034
- onConfirm = _a.onConfirm,
1035
- onDismiss = _a.onDismiss;
1036
-
1037
- var handleConfirm = function handleConfirm(event) {
1038
- if (onConfirm) onConfirm(event);
1039
- if (onClose) onClose(event);
1040
- };
1041
-
1042
- var handleDismiss = function handleDismiss(event) {
1043
- if (onDismiss) onDismiss(event);
1044
- if (onClose) onClose(event);
1045
- };
1046
-
1047
- return jsxRuntime.jsxs("div", __assign({
1048
- className: "footer"
1049
- }, {
1050
- children: [dismiss && jsxRuntime.jsx(Button, __assign({
1051
- variant: "secondary",
1052
- onClick: handleDismiss
1053
- }, {
1054
- children: dismiss
1055
- }), void 0), confirm && jsxRuntime.jsx(Button, __assign({
1056
- variant: "primary",
1057
- onClick: handleConfirm
1058
- }, {
1059
- children: confirm
1060
- }), void 0)]
1061
- }), void 0);
1062
- };
1063
-
1064
- var Modal = function Modal(_a) {
1065
- var _b = _a.type,
1066
- type = _b === void 0 ? 'default' : _b,
1067
- props = __rest(_a, ["type"]);
1068
-
1069
- return jsxRuntime.jsxs("section", __assign({
1070
- role: extract.ModalRole[type]
1071
- }, {
1072
- children: [jsxRuntime.jsx(ModalHeader, __assign({}, props), void 0), jsxRuntime.jsx(ModalBody, __assign({}, props), void 0), jsxRuntime.jsx(ModalFooter, __assign({}, props), void 0)]
1073
- }), void 0);
1074
- };
1075
-
1076
- function Group(_a) {
1077
- var children = _a.children;
1078
- return jsxRuntime.jsx("div", __assign({
1079
- className: "group"
1080
- }, {
1081
- children: children
1082
- }), void 0);
1083
- }
1084
-
1085
- function Card(_a) {
1086
- var children = _a.children,
1087
- headline = _a.headline,
1088
- buttons = _a.buttons;
1089
- return jsxRuntime.jsx("section", __assign({
1090
- className: "card"
1091
- }, {
1092
- children: jsxRuntime.jsxs("div", __assign({
1093
- className: "card-body"
1094
- }, {
1095
- children: [headline && jsxRuntime.jsx("h2", {
1096
- children: headline
1097
- }, void 0), jsxRuntime.jsx("p", {
1098
- children: children
1099
- }, void 0), buttons && jsxRuntime.jsx("footer", {
1100
- children: buttons
1101
- }, void 0)]
1102
- }), void 0)
1103
- }), void 0);
1104
- }
1105
-
1106
- function Alert(_a) {
1107
- var type = _a.type,
1108
- heading = _a.heading,
1109
- children = _a.children,
1110
- closeText = _a.closeText,
1111
- _b = _a.isCloseable,
1112
- isCloseable = _b === void 0 ? true : _b;
1113
-
1114
- var _c = react.useState(),
1115
- closeButton = _c[0],
1116
- setCloseButton = _c[1];
1117
-
1118
- react.useEffect(function () {
1119
- if (!isCloseable) {
1120
- setCloseButton(null);
1121
- } else {
1122
- if (closeText) setCloseButton(jsxRuntime.jsx(Button, {
1123
- children: closeText
1124
- }, void 0));else setCloseButton(jsxRuntime.jsx("button", {
1125
- className: "close"
1126
- }, void 0));
1127
- }
1128
- }, [isCloseable, closeText]);
1129
- return jsxRuntime.jsxs("div", __assign({
1130
- role: "alert",
1131
- className: type
1132
- }, {
1133
- children: [heading && jsxRuntime.jsx("h3", {
1134
- children: heading
1135
- }, void 0), jsxRuntime.jsx("p", {
1136
- children: children
1137
- }, void 0), closeButton]
1138
- }), void 0);
1139
- }
1140
-
1141
- var uncurryThis$4 = functionUncurryThis;
1142
- var aCallable = aCallable$2;
1143
-
1144
- var bind$1 = uncurryThis$4(uncurryThis$4.bind);
1145
-
1146
- // optional / simple context binding
1147
- var functionBindContext = function (fn, that) {
1148
- aCallable(fn);
1149
- return that === undefined ? fn : bind$1 ? bind$1(fn, that) : function (/* ...args */) {
1150
- return fn.apply(that, arguments);
1151
- };
1152
- };
1153
-
1154
- var classof$3 = classofRaw$1;
1155
-
1156
- // `IsArray` abstract operation
1157
- // https://tc39.es/ecma262/#sec-isarray
1158
- // eslint-disable-next-line es/no-array-isarray -- safe
1159
- var isArray$1 = Array.isArray || function isArray(argument) {
1160
- return classof$3(argument) == 'Array';
1161
- };
1162
-
1163
- var wellKnownSymbol$3 = wellKnownSymbol$5;
1164
-
1165
- var TO_STRING_TAG$1 = wellKnownSymbol$3('toStringTag');
1166
- var test = {};
1167
-
1168
- test[TO_STRING_TAG$1] = 'z';
1169
-
1170
- var toStringTagSupport = String(test) === '[object z]';
1171
-
1172
- var global$4 = global$p;
1173
- var TO_STRING_TAG_SUPPORT = toStringTagSupport;
1174
- var isCallable$1 = isCallable$b;
1175
- var classofRaw = classofRaw$1;
1176
- var wellKnownSymbol$2 = wellKnownSymbol$5;
1177
-
1178
- var TO_STRING_TAG = wellKnownSymbol$2('toStringTag');
1179
- var Object$1 = global$4.Object;
1180
+ var TO_STRING_TAG = wellKnownSymbol('toStringTag');
1181
+ var Object$1 = global$3.Object;
1180
1182
 
1181
1183
  // ES3 wrong here
1182
1184
  var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
@@ -1189,7 +1191,7 @@
1189
1191
  };
1190
1192
 
1191
1193
  // getting tag from ES6+ `Object.prototype.toString`
1192
- var classof$2 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
1194
+ var classof$1 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
1193
1195
  var O, tag, result;
1194
1196
  return it === undefined ? 'Undefined' : it === null ? 'Null'
1195
1197
  // @@toStringTag case
@@ -1197,264 +1199,11 @@
1197
1199
  // builtinTag case
1198
1200
  : CORRECT_ARGUMENTS ? classofRaw(O)
1199
1201
  // ES3 arguments fallback
1200
- : (result = classofRaw(O)) == 'Object' && isCallable$1(O.callee) ? 'Arguments' : result;
1201
- };
1202
-
1203
- var uncurryThis$3 = functionUncurryThis;
1204
- var fails$2 = fails$9;
1205
- var isCallable = isCallable$b;
1206
- var classof$1 = classof$2;
1207
- var getBuiltIn = getBuiltIn$4;
1208
- var inspectSource = inspectSource$3;
1209
-
1210
- var noop = function () { /* empty */ };
1211
- var empty = [];
1212
- var construct = getBuiltIn('Reflect', 'construct');
1213
- var constructorRegExp = /^\s*(?:class|function)\b/;
1214
- var exec$1 = uncurryThis$3(constructorRegExp.exec);
1215
- var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
1216
-
1217
- var isConstructorModern = function (argument) {
1218
- if (!isCallable(argument)) return false;
1219
- try {
1220
- construct(noop, empty, argument);
1221
- return true;
1222
- } catch (error) {
1223
- return false;
1224
- }
1225
- };
1226
-
1227
- var isConstructorLegacy = function (argument) {
1228
- if (!isCallable(argument)) return false;
1229
- switch (classof$1(argument)) {
1230
- case 'AsyncFunction':
1231
- case 'GeneratorFunction':
1232
- case 'AsyncGeneratorFunction': return false;
1233
- // we can't check .prototype since constructors produced by .bind haven't it
1234
- } return INCORRECT_TO_STRING || !!exec$1(constructorRegExp, inspectSource(argument));
1235
- };
1236
-
1237
- // `IsConstructor` abstract operation
1238
- // https://tc39.es/ecma262/#sec-isconstructor
1239
- var isConstructor$1 = !construct || fails$2(function () {
1240
- var called;
1241
- return isConstructorModern(isConstructorModern.call)
1242
- || !isConstructorModern(Object)
1243
- || !isConstructorModern(function () { called = true; })
1244
- || called;
1245
- }) ? isConstructorLegacy : isConstructorModern;
1246
-
1247
- var global$3 = global$p;
1248
- var isArray = isArray$1;
1249
- var isConstructor = isConstructor$1;
1250
- var isObject = isObject$6;
1251
- var wellKnownSymbol$1 = wellKnownSymbol$5;
1252
-
1253
- var SPECIES$1 = wellKnownSymbol$1('species');
1254
- var Array$1 = global$3.Array;
1255
-
1256
- // a part of `ArraySpeciesCreate` abstract operation
1257
- // https://tc39.es/ecma262/#sec-arrayspeciescreate
1258
- var arraySpeciesConstructor$1 = function (originalArray) {
1259
- var C;
1260
- if (isArray(originalArray)) {
1261
- C = originalArray.constructor;
1262
- // cross-realm fallback
1263
- if (isConstructor(C) && (C === Array$1 || isArray(C.prototype))) C = undefined;
1264
- else if (isObject(C)) {
1265
- C = C[SPECIES$1];
1266
- if (C === null) C = undefined;
1267
- }
1268
- } return C === undefined ? Array$1 : C;
1269
- };
1270
-
1271
- var arraySpeciesConstructor = arraySpeciesConstructor$1;
1272
-
1273
- // `ArraySpeciesCreate` abstract operation
1274
- // https://tc39.es/ecma262/#sec-arrayspeciescreate
1275
- var arraySpeciesCreate$1 = function (originalArray, length) {
1276
- return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
1277
- };
1278
-
1279
- var bind = functionBindContext;
1280
- var uncurryThis$2 = functionUncurryThis;
1281
- var IndexedObject = indexedObject;
1282
- var toObject = toObject$2;
1283
- var lengthOfArrayLike = lengthOfArrayLike$2;
1284
- var arraySpeciesCreate = arraySpeciesCreate$1;
1285
-
1286
- var push = uncurryThis$2([].push);
1287
-
1288
- // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation
1289
- var createMethod$1 = function (TYPE) {
1290
- var IS_MAP = TYPE == 1;
1291
- var IS_FILTER = TYPE == 2;
1292
- var IS_SOME = TYPE == 3;
1293
- var IS_EVERY = TYPE == 4;
1294
- var IS_FIND_INDEX = TYPE == 6;
1295
- var IS_FILTER_REJECT = TYPE == 7;
1296
- var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
1297
- return function ($this, callbackfn, that, specificCreate) {
1298
- var O = toObject($this);
1299
- var self = IndexedObject(O);
1300
- var boundFunction = bind(callbackfn, that);
1301
- var length = lengthOfArrayLike(self);
1302
- var index = 0;
1303
- var create = specificCreate || arraySpeciesCreate;
1304
- var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;
1305
- var value, result;
1306
- for (;length > index; index++) if (NO_HOLES || index in self) {
1307
- value = self[index];
1308
- result = boundFunction(value, index, O);
1309
- if (TYPE) {
1310
- if (IS_MAP) target[index] = result; // map
1311
- else if (result) switch (TYPE) {
1312
- case 3: return true; // some
1313
- case 5: return value; // find
1314
- case 6: return index; // findIndex
1315
- case 2: push(target, value); // filter
1316
- } else switch (TYPE) {
1317
- case 4: return false; // every
1318
- case 7: push(target, value); // filterReject
1319
- }
1320
- }
1321
- }
1322
- return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
1323
- };
1324
- };
1325
-
1326
- var arrayIteration = {
1327
- // `Array.prototype.forEach` method
1328
- // https://tc39.es/ecma262/#sec-array.prototype.foreach
1329
- forEach: createMethod$1(0),
1330
- // `Array.prototype.map` method
1331
- // https://tc39.es/ecma262/#sec-array.prototype.map
1332
- map: createMethod$1(1),
1333
- // `Array.prototype.filter` method
1334
- // https://tc39.es/ecma262/#sec-array.prototype.filter
1335
- filter: createMethod$1(2),
1336
- // `Array.prototype.some` method
1337
- // https://tc39.es/ecma262/#sec-array.prototype.some
1338
- some: createMethod$1(3),
1339
- // `Array.prototype.every` method
1340
- // https://tc39.es/ecma262/#sec-array.prototype.every
1341
- every: createMethod$1(4),
1342
- // `Array.prototype.find` method
1343
- // https://tc39.es/ecma262/#sec-array.prototype.find
1344
- find: createMethod$1(5),
1345
- // `Array.prototype.findIndex` method
1346
- // https://tc39.es/ecma262/#sec-array.prototype.findIndex
1347
- findIndex: createMethod$1(6),
1348
- // `Array.prototype.filterReject` method
1349
- // https://github.com/tc39/proposal-array-filtering
1350
- filterReject: createMethod$1(7)
1202
+ : (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;
1351
1203
  };
1352
1204
 
1353
- var fails$1 = fails$9;
1354
- var wellKnownSymbol = wellKnownSymbol$5;
1355
- var V8_VERSION = engineV8Version;
1356
-
1357
- var SPECIES = wellKnownSymbol('species');
1358
-
1359
- var arrayMethodHasSpeciesSupport$2 = function (METHOD_NAME) {
1360
- // We can't use this feature detection in V8 since it causes
1361
- // deoptimization and serious performance degradation
1362
- // https://github.com/zloirock/core-js/issues/677
1363
- return V8_VERSION >= 51 || !fails$1(function () {
1364
- var array = [];
1365
- var constructor = array.constructor = {};
1366
- constructor[SPECIES] = function () {
1367
- return { foo: 1 };
1368
- };
1369
- return array[METHOD_NAME](Boolean).foo !== 1;
1370
- });
1371
- };
1372
-
1373
- var $$2 = _export;
1374
- var $map = arrayIteration.map;
1375
- var arrayMethodHasSpeciesSupport$1 = arrayMethodHasSpeciesSupport$2;
1376
-
1377
- var HAS_SPECIES_SUPPORT$1 = arrayMethodHasSpeciesSupport$1('map');
1378
-
1379
- // `Array.prototype.map` method
1380
- // https://tc39.es/ecma262/#sec-array.prototype.map
1381
- // with adding support of @@species
1382
- $$2({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$1 }, {
1383
- map: function map(callbackfn /* , thisArg */) {
1384
- return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
1385
- }
1386
- });
1387
-
1388
- var $$1 = _export;
1389
- var $filter = arrayIteration.filter;
1390
- var arrayMethodHasSpeciesSupport = arrayMethodHasSpeciesSupport$2;
1391
-
1392
- var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');
1393
-
1394
- // `Array.prototype.filter` method
1395
- // https://tc39.es/ecma262/#sec-array.prototype.filter
1396
- // with adding support of @@species
1397
- $$1({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
1398
- filter: function filter(callbackfn /* , thisArg */) {
1399
- return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
1400
- }
1401
- });
1402
-
1403
- var ButtonGroup = function ButtonGroup(_a) {
1404
- var children = _a.children,
1405
- selectedIndex = _a.selectedIndex,
1406
- variant = _a.variant;
1407
-
1408
- var _b = react.useState(selectedIndex),
1409
- selected = _b[0],
1410
- setSelected = _b[1];
1411
-
1412
- var _c = react.useState([]),
1413
- buttons = _c[0],
1414
- setButtons = _c[1];
1415
-
1416
- react.useEffect(function () {
1417
- var buttonProps = (children instanceof Array ? children : [children]).filter(function (b) {
1418
- return b && b.props;
1419
- }).map(function (b, ix) {
1420
- var bp = b.props;
1421
-
1422
- var props = __assign(__assign({}, bp), {
1423
- variant: variant,
1424
- key: bp.key || "btn_" + ix,
1425
- active: ix === selected,
1426
- onClick: function onClick(e) {
1427
- setSelected(ix);
1428
- if (bp.onClick) bp.onClick(e);
1429
- }
1430
- });
1431
-
1432
- return props;
1433
- });
1434
- setButtons(buttonProps);
1435
- }, [children, selected, variant]);
1436
- return jsxRuntime.jsx(Group, {
1437
- children: buttons.map(function (props) {
1438
- return jsxRuntime.jsx(Button, __assign({}, props), props.key);
1439
- })
1440
- }, void 0);
1441
- };
1442
-
1443
- function Form(_a) {
1444
- var children = _a.children,
1445
- _b = _a.direction,
1446
- direction = _b === void 0 ? 'vertical' : _b,
1447
- _c = _a.size,
1448
- size = _c === void 0 ? 'md' : _c;
1449
- return jsxRuntime.jsx("form", __assign({
1450
- className: [direction, "size-" + size].join(' ')
1451
- }, {
1452
- children: children
1453
- }), void 0);
1454
- }
1455
-
1456
- var global$2 = global$p;
1457
- var classof = classof$2;
1205
+ var global$2 = global$o;
1206
+ var classof = classof$1;
1458
1207
 
1459
1208
  var String$1 = global$2.String;
1460
1209
 
@@ -1499,8 +1248,8 @@
1499
1248
  trim: createMethod(3)
1500
1249
  };
1501
1250
 
1502
- var global$1 = global$p;
1503
- var fails = fails$9;
1251
+ var global$1 = global$o;
1252
+ var fails = fails$6;
1504
1253
  var uncurryThis = functionUncurryThis;
1505
1254
  var toString = toString$2;
1506
1255
  var trim = stringTrim.trim;