@sebgroup/green-react 1.0.0-beta.11 → 1.0.0-beta.14

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/index.esm.js CHANGED
@@ -10,7 +10,7 @@ var check = function (it) {
10
10
 
11
11
  // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
12
12
  var global$r =
13
- // eslint-disable-next-line es/no-global-this -- safe
13
+ // eslint-disable-next-line es-x/no-global-this -- safe
14
14
  check(typeof globalThis == 'object' && globalThis) ||
15
15
  check(typeof window == 'object' && window) ||
16
16
  // eslint-disable-next-line no-restricted-globals -- safe
@@ -33,13 +33,14 @@ var fails$9 = fails$a;
33
33
 
34
34
  // Detect IE8's incomplete defineProperty implementation
35
35
  var descriptors = !fails$9(function () {
36
- // eslint-disable-next-line es/no-object-defineproperty -- required for testing
36
+ // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
37
37
  return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
38
38
  });
39
39
 
40
40
  var fails$8 = fails$a;
41
41
 
42
42
  var functionBindNative = !fails$8(function () {
43
+ // eslint-disable-next-line es-x/no-function-prototype-bind -- safe
43
44
  var test = (function () { /* empty */ }).bind();
44
45
  // eslint-disable-next-line no-prototype-builtins -- safe
45
46
  return typeof test != 'function' || test.hasOwnProperty('prototype');
@@ -56,7 +57,7 @@ var functionCall = NATIVE_BIND$1 ? call$6.bind(call$6) : function () {
56
57
  var objectPropertyIsEnumerable = {};
57
58
 
58
59
  var $propertyIsEnumerable = {}.propertyIsEnumerable;
59
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
60
+ // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
60
61
  var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
61
62
 
62
63
  // Nashorn ~ JDK8 bug
@@ -197,12 +198,12 @@ if (!version && userAgent) {
197
198
 
198
199
  var engineV8Version = version;
199
200
 
200
- /* eslint-disable es/no-symbol -- required for testing */
201
+ /* eslint-disable es-x/no-symbol -- required for testing */
201
202
 
202
203
  var V8_VERSION = engineV8Version;
203
204
  var fails$6 = fails$a;
204
205
 
205
- // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
206
+ // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- required for testing
206
207
  var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$6(function () {
207
208
  var symbol = Symbol();
208
209
  // Chrome 38 Symbol has incorrect toString conversion
@@ -212,7 +213,7 @@ var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$6(function () {
212
213
  !Symbol.sham && V8_VERSION && V8_VERSION < 41;
213
214
  });
214
215
 
215
- /* eslint-disable es/no-symbol -- required for testing */
216
+ /* eslint-disable es-x/no-symbol -- required for testing */
216
217
 
217
218
  var NATIVE_SYMBOL$2 = nativeSymbol;
218
219
 
@@ -289,7 +290,7 @@ var shared$3 = {exports: {}};
289
290
 
290
291
  var global$i = global$r;
291
292
 
292
- // eslint-disable-next-line es/no-object-defineproperty -- safe
293
+ // eslint-disable-next-line es-x/no-object-defineproperty -- safe
293
294
  var defineProperty$4 = Object.defineProperty;
294
295
 
295
296
  var setGlobal$3 = function (key, value) {
@@ -313,10 +314,10 @@ var store$2 = sharedStore;
313
314
  (shared$3.exports = function (key, value) {
314
315
  return store$2[key] || (store$2[key] = value !== undefined ? value : {});
315
316
  })('versions', []).push({
316
- version: '3.21.1',
317
+ version: '3.22.2',
317
318
  mode: 'global',
318
319
  copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
319
- license: 'https://github.com/zloirock/core-js/blob/v3.21.1/LICENSE',
320
+ license: 'https://github.com/zloirock/core-js/blob/v3.22.2/LICENSE',
320
321
  source: 'https://github.com/zloirock/core-js'
321
322
  });
322
323
 
@@ -338,6 +339,7 @@ var hasOwnProperty = uncurryThis$8({}.hasOwnProperty);
338
339
 
339
340
  // `HasOwnProperty` abstract operation
340
341
  // https://tc39.es/ecma262/#sec-hasownproperty
342
+ // eslint-disable-next-line es-x/no-object-hasown -- safe
341
343
  var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
342
344
  return hasOwnProperty(toObject$2(it), key);
343
345
  };
@@ -431,7 +433,7 @@ var createElement = documentCreateElement$2;
431
433
 
432
434
  // Thanks to IE8 for its funny defineProperty
433
435
  var ie8DomDefine = !DESCRIPTORS$9 && !fails$5(function () {
434
- // eslint-disable-next-line es/no-object-defineproperty -- required for testing
436
+ // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
435
437
  return Object.defineProperty(createElement('div'), 'a', {
436
438
  get: function () { return 7; }
437
439
  }).a != 7;
@@ -446,7 +448,7 @@ var toPropertyKey$1 = toPropertyKey$2;
446
448
  var hasOwn$8 = hasOwnProperty_1;
447
449
  var IE8_DOM_DEFINE$1 = ie8DomDefine;
448
450
 
449
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
451
+ // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
450
452
  var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
451
453
 
452
454
  // `Object.getOwnPropertyDescriptor` method
@@ -468,7 +470,7 @@ var fails$4 = fails$a;
468
470
  // V8 ~ Chrome 36-
469
471
  // https://bugs.chromium.org/p/v8/issues/detail?id=3334
470
472
  var v8PrototypeDefineBug = DESCRIPTORS$7 && fails$4(function () {
471
- // eslint-disable-next-line es/no-object-defineproperty -- required for testing
473
+ // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
472
474
  return Object.defineProperty(function () { /* empty */ }, 'prototype', {
473
475
  value: 42,
474
476
  writable: false
@@ -495,9 +497,9 @@ var anObject$4 = anObject$5;
495
497
  var toPropertyKey = toPropertyKey$2;
496
498
 
497
499
  var TypeError$3 = global$b.TypeError;
498
- // eslint-disable-next-line es/no-object-defineproperty -- safe
500
+ // eslint-disable-next-line es-x/no-object-defineproperty -- safe
499
501
  var $defineProperty = Object.defineProperty;
500
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
502
+ // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
501
503
  var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
502
504
  var ENUMERABLE = 'enumerable';
503
505
  var CONFIGURABLE$1 = 'configurable';
@@ -653,7 +655,7 @@ var DESCRIPTORS$4 = descriptors;
653
655
  var hasOwn$6 = hasOwnProperty_1;
654
656
 
655
657
  var FunctionPrototype = Function.prototype;
656
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
658
+ // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
657
659
  var getDescriptor = DESCRIPTORS$4 && Object.getOwnPropertyDescriptor;
658
660
 
659
661
  var EXISTS = hasOwn$6(FunctionPrototype, 'name');
@@ -830,14 +832,14 @@ var hiddenKeys$1 = enumBugKeys$2.concat('length', 'prototype');
830
832
 
831
833
  // `Object.getOwnPropertyNames` method
832
834
  // https://tc39.es/ecma262/#sec-object.getownpropertynames
833
- // eslint-disable-next-line es/no-object-getownpropertynames -- safe
835
+ // eslint-disable-next-line es-x/no-object-getownpropertynames -- safe
834
836
  objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
835
837
  return internalObjectKeys$1(O, hiddenKeys$1);
836
838
  };
837
839
 
838
840
  var objectGetOwnPropertySymbols = {};
839
841
 
840
- // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
842
+ // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- safe
841
843
  objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
842
844
 
843
845
  var getBuiltIn$1 = getBuiltIn$4;
@@ -956,7 +958,7 @@ var enumBugKeys$1 = enumBugKeys$3;
956
958
 
957
959
  // `Object.keys` method
958
960
  // https://tc39.es/ecma262/#sec-object.keys
959
- // eslint-disable-next-line es/no-object-keys -- safe
961
+ // eslint-disable-next-line es-x/no-object-keys -- safe
960
962
  var objectKeys$2 = Object.keys || function keys(O) {
961
963
  return internalObjectKeys(O, enumBugKeys$1);
962
964
  };
@@ -971,9 +973,9 @@ var propertyIsEnumerableModule = objectPropertyIsEnumerable;
971
973
  var toObject$1 = toObject$3;
972
974
  var IndexedObject = indexedObject;
973
975
 
974
- // eslint-disable-next-line es/no-object-assign -- safe
976
+ // eslint-disable-next-line es-x/no-object-assign -- safe
975
977
  var $assign = Object.assign;
976
- // eslint-disable-next-line es/no-object-defineproperty -- required for testing
978
+ // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
977
979
  var defineProperty$3 = Object.defineProperty;
978
980
  var concat = uncurryThis$2([].concat);
979
981
 
@@ -993,7 +995,7 @@ var objectAssign = !$assign || fails$2(function () {
993
995
  // should work with symbols and should have deterministic property order (V8 bug)
994
996
  var A = {};
995
997
  var B = {};
996
- // eslint-disable-next-line es/no-symbol -- safe
998
+ // eslint-disable-next-line es-x/no-symbol -- safe
997
999
  var symbol = Symbol();
998
1000
  var alphabet = 'abcdefghijklmnopqrst';
999
1001
  A[symbol] = 7;
@@ -1023,12 +1025,12 @@ var assign = objectAssign;
1023
1025
 
1024
1026
  // `Object.assign` method
1025
1027
  // https://tc39.es/ecma262/#sec-object.assign
1026
- // eslint-disable-next-line es/no-object-assign -- required for testing
1028
+ // eslint-disable-next-line es-x/no-object-assign -- required for testing
1027
1029
  $$2({ target: 'Object', stat: true, forced: Object.assign !== assign }, {
1028
1030
  assign: assign
1029
1031
  });
1030
1032
 
1031
- /*! *****************************************************************************
1033
+ /******************************************************************************
1032
1034
  Copyright (c) Microsoft Corporation.
1033
1035
 
1034
1036
  Permission to use, copy, modify, and/or distribute this software for any
@@ -1072,7 +1074,7 @@ function Button({
1072
1074
  if (onClick) props.onClick = onClick;
1073
1075
  return jsx("button", Object.assign({}, props, {
1074
1076
  children: children
1075
- }), void 0);
1077
+ }));
1076
1078
  }
1077
1079
 
1078
1080
  const ModalHeader = ({
@@ -1088,7 +1090,7 @@ const ModalHeader = ({
1088
1090
  }, {
1089
1091
  children: [jsx("h3", {
1090
1092
  children: _header
1091
- }, void 0), jsx("button", Object.assign({
1093
+ }), jsx("button", Object.assign({
1092
1094
  className: "close",
1093
1095
  onClick: handleClose
1094
1096
  }, {
@@ -1096,9 +1098,9 @@ const ModalHeader = ({
1096
1098
  className: "sr-only"
1097
1099
  }, {
1098
1100
  children: "Close"
1099
- }), void 0)
1100
- }), void 0)]
1101
- }), void 0);
1101
+ }))
1102
+ }))]
1103
+ }));
1102
1104
  };
1103
1105
 
1104
1106
  const ModalBody = ({
@@ -1108,7 +1110,7 @@ const ModalBody = ({
1108
1110
  className: "body"
1109
1111
  }, {
1110
1112
  children: children
1111
- }), void 0);
1113
+ }));
1112
1114
  };
1113
1115
 
1114
1116
  const ModalFooter = ({
@@ -1136,13 +1138,13 @@ const ModalFooter = ({
1136
1138
  onClick: handleDismiss
1137
1139
  }, {
1138
1140
  children: dismiss
1139
- }), void 0), confirm && jsx(Button, Object.assign({
1141
+ })), confirm && jsx(Button, Object.assign({
1140
1142
  variant: "primary",
1141
1143
  onClick: handleConfirm
1142
1144
  }, {
1143
1145
  children: confirm
1144
- }), void 0)]
1145
- }), void 0);
1146
+ }))]
1147
+ }));
1146
1148
  };
1147
1149
 
1148
1150
  const Modal = _a => {
@@ -1159,8 +1161,8 @@ const Modal = _a => {
1159
1161
  return jsxs("aside", Object.assign({
1160
1162
  role: "dialog"
1161
1163
  }, {
1162
- children: [jsx(ModalHeader, Object.assign({}, props), void 0), jsx(ModalBody, Object.assign({}, props), void 0), jsx(ModalFooter, Object.assign({}, props), void 0)]
1163
- }), void 0);
1164
+ children: [jsx(ModalHeader, Object.assign({}, props)), jsx(ModalBody, Object.assign({}, props)), jsx(ModalFooter, Object.assign({}, props))]
1165
+ }));
1164
1166
  }
1165
1167
 
1166
1168
  case 'takeover':
@@ -1168,8 +1170,8 @@ const Modal = _a => {
1168
1170
  return jsxs("main", Object.assign({
1169
1171
  role: "dialog"
1170
1172
  }, {
1171
- children: [jsx(ModalHeader, Object.assign({}, props), void 0), jsx(ModalBody, Object.assign({}, props), void 0), jsx(ModalFooter, Object.assign({}, props), void 0)]
1172
- }), void 0);
1173
+ children: [jsx(ModalHeader, Object.assign({}, props)), jsx(ModalBody, Object.assign({}, props)), jsx(ModalFooter, Object.assign({}, props))]
1174
+ }));
1173
1175
  }
1174
1176
 
1175
1177
  default:
@@ -1177,8 +1179,8 @@ const Modal = _a => {
1177
1179
  return jsxs("section", Object.assign({
1178
1180
  role: "dialog"
1179
1181
  }, {
1180
- children: [jsx(ModalHeader, Object.assign({}, props), void 0), jsx(ModalBody, Object.assign({}, props), void 0), jsx(ModalFooter, Object.assign({}, props), void 0)]
1181
- }), void 0);
1182
+ children: [jsx(ModalHeader, Object.assign({}, props)), jsx(ModalBody, Object.assign({}, props)), jsx(ModalFooter, Object.assign({}, props))]
1183
+ }));
1182
1184
  }
1183
1185
  }
1184
1186
  };
@@ -1197,7 +1199,7 @@ var objectKeys = objectKeys$2;
1197
1199
 
1198
1200
  // `Object.defineProperties` method
1199
1201
  // https://tc39.es/ecma262/#sec-object.defineproperties
1200
- // eslint-disable-next-line es/no-object-defineproperties -- safe
1202
+ // eslint-disable-next-line es-x/no-object-defineproperties -- safe
1201
1203
  objectDefineProperties.f = DESCRIPTORS$2 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
1202
1204
  anObject$2(O);
1203
1205
  var props = toIndexedObject$1(Properties);
@@ -1285,6 +1287,7 @@ hiddenKeys[IE_PROTO$1] = true;
1285
1287
 
1286
1288
  // `Object.create` method
1287
1289
  // https://tc39.es/ecma262/#sec-object.create
1290
+ // eslint-disable-next-line es-x/no-object-create -- safe
1288
1291
  var objectCreate = Object.create || function create(O, Properties) {
1289
1292
  var result;
1290
1293
  if (O !== null) {
@@ -1325,7 +1328,7 @@ var fails$1 = fails$a;
1325
1328
  var correctPrototypeGetter = !fails$1(function () {
1326
1329
  function F() { /* empty */ }
1327
1330
  F.prototype.constructor = null;
1328
- // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
1331
+ // eslint-disable-next-line es-x/no-object-getprototypeof -- required for testing
1329
1332
  return Object.getPrototypeOf(new F()) !== F.prototype;
1330
1333
  });
1331
1334
 
@@ -1364,7 +1367,7 @@ var BUGGY_SAFARI_ITERATORS$1 = false;
1364
1367
  // https://tc39.es/ecma262/#sec-%iteratorprototype%-object
1365
1368
  var IteratorPrototype$2, PrototypeOfArrayIteratorPrototype, arrayIterator;
1366
1369
 
1367
- /* eslint-disable es/no-array-prototype-keys -- safe */
1370
+ /* eslint-disable es-x/no-array-prototype-keys -- safe */
1368
1371
  if ([].keys) {
1369
1372
  arrayIterator = [].keys();
1370
1373
  // Safari 8 has buggy iterators w/o `next`
@@ -1445,13 +1448,13 @@ var aPossiblePrototype = aPossiblePrototype$1;
1445
1448
  // `Object.setPrototypeOf` method
1446
1449
  // https://tc39.es/ecma262/#sec-object.setprototypeof
1447
1450
  // Works with __proto__ only. Old v8 can't work with null proto objects.
1448
- // eslint-disable-next-line es/no-object-setprototypeof -- safe
1451
+ // eslint-disable-next-line es-x/no-object-setprototypeof -- safe
1449
1452
  var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
1450
1453
  var CORRECT_SETTER = false;
1451
1454
  var test = {};
1452
1455
  var setter;
1453
1456
  try {
1454
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1457
+ // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
1455
1458
  setter = uncurryThis$1(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
1456
1459
  setter(test, []);
1457
1460
  CORRECT_SETTER = test instanceof Array;
@@ -1741,7 +1744,7 @@ const Flexbox = _a => {
1741
1744
  className: flexClassName
1742
1745
  }, props, {
1743
1746
  children: children
1744
- }), void 0);
1747
+ }));
1745
1748
  };
1746
1749
 
1747
1750
  function Card({
@@ -1754,12 +1757,12 @@ function Card({
1754
1757
  }, {
1755
1758
  children: [jsx("header", {
1756
1759
  children: header
1757
- }, void 0), jsx("p", {
1760
+ }), jsx("p", {
1758
1761
  children: children
1759
- }, void 0), jsx("footer", {
1762
+ }), jsx("footer", {
1760
1763
  children: footer
1761
- }, void 0)]
1762
- }), void 0);
1764
+ })]
1765
+ }));
1763
1766
  }
1764
1767
 
1765
1768
  function Alert({
@@ -1782,10 +1785,10 @@ function Alert({
1782
1785
  className: "sr-only"
1783
1786
  }, {
1784
1787
  children: closeText
1785
- }), void 0)
1786
- }), void 0));else setCloseButton(jsx("button", {
1788
+ }))
1789
+ })));else setCloseButton(jsx("button", {
1787
1790
  className: "close"
1788
- }, void 0));
1791
+ }));
1789
1792
  }
1790
1793
  }, [isCloseable, closeText]);
1791
1794
  return jsxs("div", Object.assign({
@@ -1795,13 +1798,13 @@ function Alert({
1795
1798
  children: [header && jsxs("header", {
1796
1799
  children: [/*#__PURE__*/React.isValidElement(header) ? header : jsx("h3", {
1797
1800
  children: header
1798
- }, void 0), closeButton]
1799
- }, void 0), jsx("p", {
1801
+ }), closeButton]
1802
+ }), jsx("p", {
1800
1803
  children: children
1801
- }, void 0), footer && jsx("footer", {
1804
+ }), footer && jsx("footer", {
1802
1805
  children: footer
1803
- }, void 0)]
1804
- }), void 0);
1806
+ })]
1807
+ }));
1805
1808
  }
1806
1809
 
1807
1810
  const ButtonGroup = ({
@@ -1829,7 +1832,7 @@ const ButtonGroup = ({
1829
1832
  }, [children, selected, variant]);
1830
1833
  return jsx(Group, {
1831
1834
  children: buttons.map(props => jsx(Button, Object.assign({}, props), props.key))
1832
- }, void 0);
1835
+ });
1833
1836
  };
1834
1837
 
1835
1838
  const validateInputValue = (target, rules, setError) => {
@@ -1935,12 +1938,12 @@ const FormProvider = _a => {
1935
1938
  onReset: resetForm
1936
1939
  }, {
1937
1940
  children: children
1938
- }), void 0)
1939
- }), void 0);
1941
+ }))
1942
+ }));
1940
1943
  };
1941
1944
 
1942
1945
  const Form = props => {
1943
- return jsx(FormProvider, Object.assign({}, props), void 0);
1946
+ return jsx(FormProvider, Object.assign({}, props));
1944
1947
  };
1945
1948
 
1946
1949
  const FormItems = ({
@@ -2024,12 +2027,12 @@ function Group({
2024
2027
  className: groupClassName
2025
2028
  }, {
2026
2029
  children: children
2027
- }), void 0), error && jsx("span", Object.assign({
2030
+ })), error && jsx("span", Object.assign({
2028
2031
  className: "form-info"
2029
2032
  }, {
2030
2033
  children: errorMessage
2031
- }), void 0)]
2032
- }), void 0);
2034
+ }))]
2035
+ }));
2033
2036
  }
2034
2037
 
2035
2038
  const useInput = (props, onChanges, onChangeInput) => {
@@ -2083,7 +2086,7 @@ const RenderInput = (type, props, onChange, onChangeInput, label, info, validato
2083
2086
  if (!label && !info) return jsx("input", Object.assign({
2084
2087
  type: type,
2085
2088
  value: value
2086
- }, propsWithDescription), void 0);
2089
+ }, propsWithDescription));
2087
2090
  return jsxs("div", Object.assign({
2088
2091
  className: "form-group"
2089
2092
  }, {
@@ -2091,22 +2094,22 @@ const RenderInput = (type, props, onChange, onChangeInput, label, info, validato
2091
2094
  htmlFor: inputProps.id
2092
2095
  }, {
2093
2096
  children: label
2094
- }), void 0), info && jsx("span", Object.assign({
2097
+ })), info && jsx("span", Object.assign({
2095
2098
  className: "form-info",
2096
2099
  id: `${inputProps.id}_info`
2097
2100
  }, {
2098
2101
  children: info
2099
- }), void 0), jsx("input", Object.assign({
2102
+ })), jsx("input", Object.assign({
2100
2103
  type: type,
2101
2104
  value: value
2102
2105
  }, propsWithDescription, {
2103
2106
  className: validator && validateClassName(validator === null || validator === void 0 ? void 0 : validator.indicator)
2104
- }), void 0), validator && jsx("span", Object.assign({
2107
+ })), validator && jsx("span", Object.assign({
2105
2108
  className: "form-info"
2106
2109
  }, {
2107
2110
  children: validator.message
2108
- }), void 0)]
2109
- }), void 0);
2111
+ }))]
2112
+ }));
2110
2113
  };
2111
2114
  const TextInput = _a => {
2112
2115
  var {
@@ -2161,13 +2164,13 @@ const Checkbox = _a => {
2161
2164
  }, {
2162
2165
  children: [label, jsx("input", Object.assign({
2163
2166
  type: "checkbox"
2164
- }, inputProps), void 0), jsx("span", {}, void 0), jsx("i", {}, void 0)]
2165
- }), void 0), validator && jsx("span", Object.assign({
2167
+ }, inputProps)), jsx("span", {}), jsx("i", {})]
2168
+ })), validator && jsx("span", Object.assign({
2166
2169
  className: "form-info"
2167
2170
  }, {
2168
2171
  children: validator.message
2169
- }), void 0)]
2170
- }, void 0);
2172
+ }))]
2173
+ });
2171
2174
  };
2172
2175
  const RadioButton = /*#__PURE__*/React.forwardRef((_a, ref) => {
2173
2176
  var {
@@ -2189,10 +2192,10 @@ const RadioButton = /*#__PURE__*/React.forwardRef((_a, ref) => {
2189
2192
  }, props, {
2190
2193
  className: validator,
2191
2194
  ref: ref
2192
- }), void 0), jsx("span", {
2195
+ })), jsx("span", {
2193
2196
  children: label
2194
- }, void 0), jsx("i", {}, void 0)]
2195
- }), void 0);
2197
+ }), jsx("i", {})]
2198
+ }));
2196
2199
  });
2197
2200
 
2198
2201
  const Text = ({
@@ -2201,7 +2204,7 @@ const Text = ({
2201
2204
  className: "form-text"
2202
2205
  }, {
2203
2206
  children: children
2204
- }), void 0);
2207
+ }));
2205
2208
 
2206
2209
  var wellKnownSymbol$1 = wellKnownSymbol$8;
2207
2210
 
@@ -2354,11 +2357,11 @@ const RadioGroup = ({
2354
2357
  }, {
2355
2358
  children: [jsx("legend", {
2356
2359
  children: title
2357
- }, void 0), jsx("span", Object.assign({
2360
+ }), jsx("span", Object.assign({
2358
2361
  className: "form-info"
2359
2362
  }, {
2360
2363
  children: description
2361
- }), void 0), React.Children.map(children, Child => {
2364
+ })), React.Children.map(children, Child => {
2362
2365
  return /*#__PURE__*/React.isValidElement(Child) ? /*#__PURE__*/React.cloneElement(Child, {
2363
2366
  validator: validatorClassName,
2364
2367
  onChange: onChanges,
@@ -2367,12 +2370,12 @@ const RadioGroup = ({
2367
2370
  ref: radioBtnRef
2368
2371
  }) : Child;
2369
2372
  })]
2370
- }), void 0), (validator === null || validator === void 0 ? void 0 : validator.message) && jsx("span", Object.assign({
2373
+ })), (validator === null || validator === void 0 ? void 0 : validator.message) && jsx("span", Object.assign({
2371
2374
  className: "form-info"
2372
2375
  }, {
2373
2376
  children: validator === null || validator === void 0 ? void 0 : validator.message
2374
- }), void 0)]
2375
- }), void 0);
2377
+ }))]
2378
+ }));
2376
2379
  };
2377
2380
 
2378
2381
  const ListItem = _a => {
@@ -2388,15 +2391,15 @@ const ListItem = _a => {
2388
2391
  children: jsxs("div", {
2389
2392
  children: [jsx("dt", {
2390
2393
  children: tableRowData === null || tableRowData === void 0 ? void 0 : tableRowData.title
2391
- }, void 0), tableRowData === null || tableRowData === void 0 ? void 0 : tableRowData.definition.map((item, index) => jsx("dd", {
2394
+ }), tableRowData === null || tableRowData === void 0 ? void 0 : tableRowData.definition.map((item, index) => jsx("dd", {
2392
2395
  children: item
2393
2396
  }, index))]
2394
- }, void 0)
2395
- }, void 0);
2397
+ })
2398
+ });
2396
2399
  } else {
2397
2400
  return jsx("li", Object.assign({}, props, {
2398
2401
  children: children
2399
- }), void 0);
2402
+ }));
2400
2403
  }
2401
2404
  };
2402
2405
 
@@ -2414,7 +2417,7 @@ const List = _a => {
2414
2417
  children: children === null || children === void 0 ? void 0 : children.map((child, index) => jsx(ListItem, {
2415
2418
  children: child
2416
2419
  }, index))
2417
- }), void 0);
2420
+ }));
2418
2421
  } else if (listType !== 'table') {
2419
2422
  return jsx("ul", Object.assign({}, props, {
2420
2423
  className: listType
@@ -2422,20 +2425,20 @@ const List = _a => {
2422
2425
  children: children === null || children === void 0 ? void 0 : children.map((child, index) => jsx(ListItem, {
2423
2426
  children: child
2424
2427
  }, index))
2425
- }), void 0);
2428
+ }));
2426
2429
  } else {
2427
2430
  return jsxs("figure", {
2428
2431
  children: [jsx("figcaption", Object.assign({
2429
2432
  className: "table-list-caption"
2430
2433
  }, {
2431
2434
  children: tableCaption
2432
- }), void 0), jsx("dl", {
2435
+ })), jsx("dl", {
2433
2436
  children: tableData === null || tableData === void 0 ? void 0 : tableData.map((data, index) => jsx(ListItem, {
2434
2437
  listType: listType,
2435
2438
  tableRowData: data
2436
2439
  }, index))
2437
- }, void 0)]
2438
- }, void 0);
2440
+ })]
2441
+ });
2439
2442
  }
2440
2443
  };
2441
2444
 
@@ -2457,7 +2460,7 @@ const Link = _a => {
2457
2460
  }, [button]);
2458
2461
  return jsx("a", Object.assign({}, anchorProps, {
2459
2462
  children: children
2460
- }), void 0);
2463
+ }));
2461
2464
  };
2462
2465
 
2463
2466
  const Navbar = ({
@@ -2484,7 +2487,7 @@ const Navbar = ({
2484
2487
  href: _brandLink,
2485
2488
  target: "_blank",
2486
2489
  className: "brand"
2487
- }, void 0), jsx("div", Object.assign({
2490
+ }), jsx("div", Object.assign({
2488
2491
  className: "container-fluid"
2489
2492
  }, {
2490
2493
  children: jsxs("div", Object.assign({
@@ -2499,55 +2502,58 @@ const Navbar = ({
2499
2502
  }, {
2500
2503
  children: jsx("h1", {
2501
2504
  children: title
2502
- }, void 0)
2503
- }), void 0) : jsx("h1", {
2505
+ })
2506
+ })) : jsx("h1", {
2504
2507
  children: title
2505
- }, void 0)
2506
- }), void 0), jsx("div", Object.assign({
2508
+ })
2509
+ })), jsx("div", Object.assign({
2507
2510
  className: "col-auto"
2508
2511
  }, {
2509
2512
  children: jsx("div", Object.assign({
2510
2513
  className: "group size-sm"
2511
2514
  }, {
2512
2515
  children: children
2513
- }), void 0)
2514
- }), void 0)]
2515
- }), void 0)
2516
- }), void 0)]
2517
- }), void 0);
2516
+ }))
2517
+ }))]
2518
+ }))
2519
+ }))]
2520
+ }));
2518
2521
  };
2519
2522
 
2520
2523
  function Badge(_a) {
2521
2524
  var {
2522
- title,
2525
+ children,
2523
2526
  badgeType,
2524
2527
  isCloseable,
2525
2528
  closeText
2526
2529
  } = _a,
2527
- props = __rest(_a, ["title", "badgeType", "isCloseable", "closeText"]);
2530
+ props = __rest(_a, ["children", "badgeType", "isCloseable", "closeText"]);
2528
2531
 
2529
- return jsxs("span", Object.assign({}, props, {
2532
+ const [isClosed, setIsClosed] = React.useState(false);
2533
+ return !isClosed ? jsxs("span", Object.assign({}, props, {
2530
2534
  className: `badge ${badgeType}`
2531
2535
  }, {
2532
2536
  children: [jsx("strong", {
2533
- children: title
2534
- }, void 0), isCloseable && jsx("button", Object.assign({
2535
- className: "close"
2537
+ children: children
2538
+ }), isCloseable && jsx("button", Object.assign({
2539
+ type: "button",
2540
+ className: "close",
2541
+ onClick: () => setIsClosed(true)
2536
2542
  }, {
2537
- children: jsx("span", Object.assign({
2538
- className: "sr-only"
2539
- }, {
2540
- children: closeText
2541
- }), void 0)
2542
- }), void 0)]
2543
- }), void 0);
2543
+ children: closeText
2544
+ }))]
2545
+ })) : null;
2544
2546
  }
2545
2547
 
2546
2548
  const useDropdown = ({
2547
2549
  id,
2548
- text,
2550
+ texts,
2549
2551
  options,
2550
2552
  loop,
2553
+ multiSelect,
2554
+ selectValue,
2555
+ useValue,
2556
+ display,
2551
2557
  togglerRef,
2552
2558
  listboxRef
2553
2559
  }) => {
@@ -2555,10 +2561,11 @@ const useDropdown = ({
2555
2561
  const [dropdown, setDropdown] = useState();
2556
2562
  const [togglerProps, setTogglerProps] = useState({});
2557
2563
  const [listboxProps, setListboxProps] = useState({});
2558
- const [listItems, setListItems] = useState([]); // When dropdown data changes
2564
+ const [listItems, setListItems] = useState([]);
2565
+ const [multiSelectProps, setMultiSelectProps] = useState({}); // When dropdown data changes
2559
2566
 
2560
2567
  useEffect(() => {
2561
- var _a, _b;
2568
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
2562
2569
 
2563
2570
  if (!dropdown) return;
2564
2571
  const {
@@ -2569,44 +2576,83 @@ const useDropdown = ({
2569
2576
  } = dropdown;
2570
2577
  const newToggleProps = Object.assign(Object.assign({}, toggler === null || toggler === void 0 ? void 0 : toggler.attributes), {
2571
2578
  className: (_a = toggler === null || toggler === void 0 ? void 0 : toggler.classes) === null || _a === void 0 ? void 0 : _a.join(' '),
2572
- children: dropdown.text,
2579
+ children: ((_b = dropdown === null || dropdown === void 0 ? void 0 : dropdown.texts) === null || _b === void 0 ? void 0 : _b.select) || ((_c = dropdown === null || dropdown === void 0 ? void 0 : dropdown.texts) === null || _c === void 0 ? void 0 : _c.placeholder),
2573
2580
  onClick: () => handler === null || handler === void 0 ? void 0 : handler.toggle()
2574
2581
  });
2575
2582
  setTogglerProps(newToggleProps);
2576
2583
  const newListboxProps = Object.assign(Object.assign({}, listbox === null || listbox === void 0 ? void 0 : listbox.attributes), {
2577
- className: (_b = listbox === null || listbox === void 0 ? void 0 : listbox.classes) === null || _b === void 0 ? void 0 : _b.join(' ')
2584
+ className: (_d = listbox === null || listbox === void 0 ? void 0 : listbox.classes) === null || _d === void 0 ? void 0 : _d.join(' ')
2578
2585
  });
2579
2586
  setListboxProps(newListboxProps);
2580
- const newListItems = dropdown.options.map(o => {
2581
- var _a;
2582
2587
 
2583
- return Object.assign(Object.assign({}, o.attributes), {
2584
- className: (_a = o.classes) === null || _a === void 0 ? void 0 : _a.join(' '),
2585
- children: o.key,
2586
- onClick: () => handler === null || handler === void 0 ? void 0 : handler.select(o)
2588
+ if (!dropdown.isMultiSelect) {
2589
+ const newListItems = dropdown.options.map(o => {
2590
+ var _a;
2591
+
2592
+ return Object.assign(Object.assign({}, o.attributes), {
2593
+ className: (_a = o.classes) === null || _a === void 0 ? void 0 : _a.join(' '),
2594
+ children: o[dropdown.display],
2595
+ selected: o.selected,
2596
+ onClick: () => handler === null || handler === void 0 ? void 0 : handler.select(o)
2597
+ });
2587
2598
  });
2588
- });
2589
- setListItems(newListItems); // eslint-disable-next-line react-hooks/exhaustive-deps
2599
+ setListItems(newListItems);
2600
+ } else {
2601
+ const checkboxes = dropdown.options.map(o => ({
2602
+ labelProps: Object.assign(Object.assign({}, o.attributes), {
2603
+ className: ['form-control', ...o.classes].join(' ')
2604
+ }),
2605
+ inputProps: {
2606
+ defaultChecked: o.selected,
2607
+ type: 'checkbox',
2608
+ onChange: () => handler === null || handler === void 0 ? void 0 : handler.select(o, false)
2609
+ },
2610
+ spanProps: {
2611
+ children: o[dropdown.display]
2612
+ }
2613
+ }));
2614
+ const newMultiselect = {
2615
+ fieldsetProps: {
2616
+ 'aria-describedby': (_g = (_f = (_e = dropdown === null || dropdown === void 0 ? void 0 : dropdown.elements) === null || _e === void 0 ? void 0 : _e.fieldset) === null || _f === void 0 ? void 0 : _f.attributes) === null || _g === void 0 ? void 0 : _g.id,
2617
+ 'aria-multiselectable': true,
2618
+ role: 'listbox',
2619
+ tabIndex: -1
2620
+ },
2621
+ legendProps: {
2622
+ className: 'sr-only',
2623
+ id: (_k = (_j = (_h = dropdown === null || dropdown === void 0 ? void 0 : dropdown.elements) === null || _h === void 0 ? void 0 : _h.fieldset) === null || _j === void 0 ? void 0 : _j.attributes) === null || _k === void 0 ? void 0 : _k.id,
2624
+ children: dropdown.texts.optionsDescription
2625
+ },
2626
+ checkboxes
2627
+ };
2628
+ setMultiSelectProps(newMultiselect);
2629
+ } // eslint-disable-next-line react-hooks/exhaustive-deps
2630
+
2590
2631
  }, [dropdown]); // When dropdown properties change
2591
2632
 
2592
2633
  useEffect(() => {
2593
2634
  if (!dropdown) return;
2594
2635
  handler === null || handler === void 0 ? void 0 : handler.update({
2595
2636
  id,
2596
- text,
2637
+ texts,
2597
2638
  options,
2598
- loop
2639
+ loop,
2640
+ multiSelect
2599
2641
  }); // eslint-disable-next-line react-hooks/exhaustive-deps
2600
- }, [id, text, options, loop]); // Create dropdown handler
2642
+ }, [id, texts, options, loop, multiSelect, selectValue, useValue, display]); // Create dropdown handler
2601
2643
 
2602
2644
  useEffect(() => {
2603
2645
  if (!handler && togglerRef.current && listboxRef.current) {
2604
2646
  setHandler(createDropdown({
2605
2647
  id,
2606
- text,
2648
+ texts,
2607
2649
  options,
2608
- loop
2609
- }, togglerRef.current, listboxRef.current, setDropdown));
2650
+ loop,
2651
+ multiSelect,
2652
+ selectValue,
2653
+ useValue,
2654
+ display
2655
+ }, togglerRef.current, listboxRef.current, listboxRef.current, dd => setDropdown(dd)));
2610
2656
  }
2611
2657
 
2612
2658
  return () => handler === null || handler === void 0 ? void 0 : handler.destroy(); // eslint-disable-next-line react-hooks/exhaustive-deps
@@ -2615,7 +2661,8 @@ const useDropdown = ({
2615
2661
  dropdown: handler,
2616
2662
  togglerProps,
2617
2663
  listboxProps,
2618
- listItems
2664
+ listItems,
2665
+ multiSelectProps
2619
2666
  };
2620
2667
  };
2621
2668
 
@@ -2623,22 +2670,33 @@ const Dropdown = ({
2623
2670
  id,
2624
2671
  options,
2625
2672
  loop,
2626
- children
2673
+ multiSelect,
2674
+ selectValue,
2675
+ useValue,
2676
+ display,
2677
+ texts
2627
2678
  }) => {
2679
+ var _a;
2680
+
2628
2681
  const togglerRef = useRef(null);
2629
2682
  const listboxRef = useRef(null);
2630
2683
  const {
2631
2684
  dropdown,
2632
2685
  listboxProps,
2633
2686
  togglerProps,
2634
- listItems
2687
+ listItems,
2688
+ multiSelectProps
2635
2689
  } = useDropdown({
2636
2690
  id,
2637
2691
  options,
2638
2692
  loop,
2693
+ multiSelect,
2694
+ selectValue,
2695
+ useValue,
2696
+ display,
2639
2697
  togglerRef,
2640
2698
  listboxRef,
2641
- text: children
2699
+ texts
2642
2700
  });
2643
2701
  return jsxs("div", {
2644
2702
  children: [jsx("button", Object.assign({
@@ -2648,8 +2706,8 @@ const Dropdown = ({
2648
2706
  }, {
2649
2707
  children: jsx("span", {
2650
2708
  children: togglerProps.children
2651
- }, void 0)
2652
- }), void 0), jsxs("div", Object.assign({}, listboxProps, {
2709
+ })
2710
+ })), jsxs("div", Object.assign({}, listboxProps, {
2653
2711
  ref: listboxRef
2654
2712
  }, {
2655
2713
  children: [jsx("button", Object.assign({
@@ -2660,15 +2718,23 @@ const Dropdown = ({
2660
2718
  children: jsx("span", Object.assign({
2661
2719
  className: "sr-only"
2662
2720
  }, {
2663
- children: "Close"
2664
- }), void 0)
2665
- }), void 0), jsx("ul", Object.assign({
2721
+ children: dropdown === null || dropdown === void 0 ? void 0 : dropdown.dropdown.texts.close
2722
+ }))
2723
+ })), (dropdown === null || dropdown === void 0 ? void 0 : dropdown.dropdown.isMultiSelect) ? jsx("div", Object.assign({
2724
+ className: "sg-fieldset-container"
2725
+ }, {
2726
+ children: jsxs("fieldset", Object.assign({}, multiSelectProps.fieldsetProps, {
2727
+ children: [jsx("legend", Object.assign({}, multiSelectProps.legendProps)), (_a = multiSelectProps.checkboxes) === null || _a === void 0 ? void 0 : _a.map(checkboxItem => jsxs("label", Object.assign({}, checkboxItem.labelProps, {
2728
+ children: [jsx("input", Object.assign({}, checkboxItem.inputProps)), jsx("span", Object.assign({}, checkboxItem.spanProps)), jsx("i", {})]
2729
+ }), checkboxItem.labelProps.id))]
2730
+ }))
2731
+ })) : jsx("ul", Object.assign({
2666
2732
  role: "listbox"
2667
2733
  }, {
2668
2734
  children: listItems.map(liProps => jsx("li", Object.assign({}, liProps), liProps.id))
2669
- }), void 0)]
2670
- }), void 0)]
2671
- }, void 0);
2735
+ }))]
2736
+ }))]
2737
+ });
2672
2738
  };
2673
2739
 
2674
2740
  export { Alert, Badge, Button, ButtonGroup, Card, Checkbox, Dropdown, EmailInput, Flexbox, Form, FormItems, Group, Link, List, Modal, Navbar, NumberInput, RadioButton, RadioGroup, RenderInput, Text, TextInput };