@sebgroup/green-react 1.8.1 → 1.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -22,7 +22,7 @@ var global$d =
22
22
 
23
23
  var objectGetOwnPropertyDescriptor = {};
24
24
 
25
- var fails$c = function (exec) {
25
+ var fails$d = function (exec) {
26
26
  try {
27
27
  return !!exec();
28
28
  } catch (error) {
@@ -30,17 +30,17 @@ var fails$c = function (exec) {
30
30
  }
31
31
  };
32
32
 
33
- var fails$b = fails$c;
33
+ var fails$c = fails$d;
34
34
 
35
35
  // Detect IE8's incomplete defineProperty implementation
36
- var descriptors = !fails$b(function () {
36
+ var descriptors = !fails$c(function () {
37
37
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
38
38
  return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
39
39
  });
40
40
 
41
- var fails$a = fails$c;
41
+ var fails$b = fails$d;
42
42
 
43
- var functionBindNative = !fails$a(function () {
43
+ var functionBindNative = !fails$b(function () {
44
44
  // eslint-disable-next-line es/no-function-prototype-bind -- safe
45
45
  var test = (function () { /* empty */ }).bind();
46
46
  // eslint-disable-next-line no-prototype-builtins -- safe
@@ -49,10 +49,10 @@ var functionBindNative = !fails$a(function () {
49
49
 
50
50
  var NATIVE_BIND$1 = functionBindNative;
51
51
 
52
- var call$6 = Function.prototype.call;
52
+ var call$7 = Function.prototype.call;
53
53
 
54
- var functionCall = NATIVE_BIND$1 ? call$6.bind(call$6) : function () {
55
- return call$6.apply(call$6, arguments);
54
+ var functionCall = NATIVE_BIND$1 ? call$7.bind(call$7) : function () {
55
+ return call$7.apply(call$7, arguments);
56
56
  };
57
57
 
58
58
  var objectPropertyIsEnumerable = {};
@@ -83,12 +83,12 @@ var createPropertyDescriptor$3 = function (bitmap, value) {
83
83
  var NATIVE_BIND = functionBindNative;
84
84
 
85
85
  var FunctionPrototype$1 = Function.prototype;
86
- var call$5 = FunctionPrototype$1.call;
87
- var uncurryThisWithBind = NATIVE_BIND && FunctionPrototype$1.bind.bind(call$5, call$5);
86
+ var call$6 = FunctionPrototype$1.call;
87
+ var uncurryThisWithBind = NATIVE_BIND && FunctionPrototype$1.bind.bind(call$6, call$6);
88
88
 
89
89
  var functionUncurryThis = NATIVE_BIND ? uncurryThisWithBind : function (fn) {
90
90
  return function () {
91
- return call$5.apply(fn, arguments);
91
+ return call$6.apply(fn, arguments);
92
92
  };
93
93
  };
94
94
 
@@ -102,14 +102,14 @@ var classofRaw$1 = function (it) {
102
102
  };
103
103
 
104
104
  var uncurryThis$c = functionUncurryThis;
105
- var fails$9 = fails$c;
105
+ var fails$a = fails$d;
106
106
  var classof$2 = classofRaw$1;
107
107
 
108
108
  var $Object$4 = Object;
109
109
  var split = uncurryThis$c(''.split);
110
110
 
111
111
  // fallback for non-array-like ES3 and non-enumerable old V8 strings
112
- var indexedObject = fails$9(function () {
112
+ var indexedObject = fails$a(function () {
113
113
  // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
114
114
  // eslint-disable-next-line no-prototype-builtins -- safe
115
115
  return !$Object$4('z').propertyIsEnumerable(0);
@@ -224,10 +224,10 @@ var engineV8Version = version;
224
224
  /* eslint-disable es/no-symbol -- required for testing */
225
225
 
226
226
  var V8_VERSION = engineV8Version;
227
- var fails$8 = fails$c;
227
+ var fails$9 = fails$d;
228
228
 
229
229
  // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
230
- var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$8(function () {
230
+ var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$9(function () {
231
231
  var symbol = Symbol();
232
232
  // Chrome 38 Symbol has incorrect toString conversion
233
233
  // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
@@ -246,7 +246,7 @@ var useSymbolAsUid = NATIVE_SYMBOL$2
246
246
 
247
247
  var getBuiltIn$2 = getBuiltIn$3;
248
248
  var isCallable$d = isCallable$g;
249
- var isPrototypeOf$1 = objectIsPrototypeOf;
249
+ var isPrototypeOf$2 = objectIsPrototypeOf;
250
250
  var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
251
251
 
252
252
  var $Object$3 = Object;
@@ -255,7 +255,7 @@ var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
255
255
  return typeof it == 'symbol';
256
256
  } : function (it) {
257
257
  var $Symbol = getBuiltIn$2('Symbol');
258
- return isCallable$d($Symbol) && isPrototypeOf$1($Symbol.prototype, $Object$3(it));
258
+ return isCallable$d($Symbol) && isPrototypeOf$2($Symbol.prototype, $Object$3(it));
259
259
  };
260
260
 
261
261
  var $String$4 = String;
@@ -289,7 +289,7 @@ var getMethod$1 = function (V, P) {
289
289
  return isNullOrUndefined(func) ? undefined : aCallable$1(func);
290
290
  };
291
291
 
292
- var call$4 = functionCall;
292
+ var call$5 = functionCall;
293
293
  var isCallable$b = isCallable$g;
294
294
  var isObject$5 = isObject$6;
295
295
 
@@ -299,9 +299,9 @@ var $TypeError$4 = TypeError;
299
299
  // https://tc39.es/ecma262/#sec-ordinarytoprimitive
300
300
  var ordinaryToPrimitive$1 = function (input, pref) {
301
301
  var fn, val;
302
- if (pref === 'string' && isCallable$b(fn = input.toString) && !isObject$5(val = call$4(fn, input))) return val;
303
- if (isCallable$b(fn = input.valueOf) && !isObject$5(val = call$4(fn, input))) return val;
304
- if (pref !== 'string' && isCallable$b(fn = input.toString) && !isObject$5(val = call$4(fn, input))) return val;
302
+ if (pref === 'string' && isCallable$b(fn = input.toString) && !isObject$5(val = call$5(fn, input))) return val;
303
+ if (isCallable$b(fn = input.valueOf) && !isObject$5(val = call$5(fn, input))) return val;
304
+ if (pref !== 'string' && isCallable$b(fn = input.toString) && !isObject$5(val = call$5(fn, input))) return val;
305
305
  throw $TypeError$4("Can't convert object to primitive value");
306
306
  };
307
307
 
@@ -374,7 +374,7 @@ var uid$2 = function (key) {
374
374
 
375
375
  var global$8 = global$d;
376
376
  var shared$2 = shared$3.exports;
377
- var hasOwn$9 = hasOwnProperty_1;
377
+ var hasOwn$a = hasOwnProperty_1;
378
378
  var uid$1 = uid$2;
379
379
  var NATIVE_SYMBOL$1 = symbolConstructorDetection;
380
380
  var USE_SYMBOL_AS_UID = useSymbolAsUid;
@@ -384,14 +384,14 @@ var WellKnownSymbolsStore = shared$2('wks');
384
384
  var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$2['for'] || Symbol$2 : Symbol$2 && Symbol$2.withoutSetter || uid$1;
385
385
 
386
386
  var wellKnownSymbol$8 = function (name) {
387
- if (!hasOwn$9(WellKnownSymbolsStore, name)) {
388
- WellKnownSymbolsStore[name] = NATIVE_SYMBOL$1 && hasOwn$9(Symbol$2, name)
387
+ if (!hasOwn$a(WellKnownSymbolsStore, name)) {
388
+ WellKnownSymbolsStore[name] = NATIVE_SYMBOL$1 && hasOwn$a(Symbol$2, name)
389
389
  ? Symbol$2[name]
390
390
  : createWellKnownSymbol('Symbol.' + name);
391
391
  } return WellKnownSymbolsStore[name];
392
392
  };
393
393
 
394
- var call$3 = functionCall;
394
+ var call$4 = functionCall;
395
395
  var isObject$4 = isObject$6;
396
396
  var isSymbol$1 = isSymbol$2;
397
397
  var getMethod = getMethod$1;
@@ -409,7 +409,7 @@ var toPrimitive$1 = function (input, pref) {
409
409
  var result;
410
410
  if (exoticToPrim) {
411
411
  if (pref === undefined) pref = 'default';
412
- result = call$3(exoticToPrim, input, pref);
412
+ result = call$4(exoticToPrim, input, pref);
413
413
  if (!isObject$4(result) || isSymbol$1(result)) return result;
414
414
  throw $TypeError$3("Can't convert object to primitive value");
415
415
  }
@@ -439,11 +439,11 @@ var documentCreateElement$2 = function (it) {
439
439
  };
440
440
 
441
441
  var DESCRIPTORS$a = descriptors;
442
- var fails$7 = fails$c;
442
+ var fails$8 = fails$d;
443
443
  var createElement = documentCreateElement$2;
444
444
 
445
445
  // Thanks to IE8 for its funny defineProperty
446
- var ie8DomDefine = !DESCRIPTORS$a && !fails$7(function () {
446
+ var ie8DomDefine = !DESCRIPTORS$a && !fails$8(function () {
447
447
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
448
448
  return Object.defineProperty(createElement('div'), 'a', {
449
449
  get: function () { return 7; }
@@ -451,12 +451,12 @@ var ie8DomDefine = !DESCRIPTORS$a && !fails$7(function () {
451
451
  });
452
452
 
453
453
  var DESCRIPTORS$9 = descriptors;
454
- var call$2 = functionCall;
454
+ var call$3 = functionCall;
455
455
  var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
456
456
  var createPropertyDescriptor$2 = createPropertyDescriptor$3;
457
457
  var toIndexedObject$4 = toIndexedObject$5;
458
458
  var toPropertyKey$1 = toPropertyKey$2;
459
- var hasOwn$8 = hasOwnProperty_1;
459
+ var hasOwn$9 = hasOwnProperty_1;
460
460
  var IE8_DOM_DEFINE$1 = ie8DomDefine;
461
461
 
462
462
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
@@ -470,17 +470,17 @@ objectGetOwnPropertyDescriptor.f = DESCRIPTORS$9 ? $getOwnPropertyDescriptor$1 :
470
470
  if (IE8_DOM_DEFINE$1) try {
471
471
  return $getOwnPropertyDescriptor$1(O, P);
472
472
  } catch (error) { /* empty */ }
473
- if (hasOwn$8(O, P)) return createPropertyDescriptor$2(!call$2(propertyIsEnumerableModule$1.f, O, P), O[P]);
473
+ if (hasOwn$9(O, P)) return createPropertyDescriptor$2(!call$3(propertyIsEnumerableModule$1.f, O, P), O[P]);
474
474
  };
475
475
 
476
476
  var objectDefineProperty = {};
477
477
 
478
478
  var DESCRIPTORS$8 = descriptors;
479
- var fails$6 = fails$c;
479
+ var fails$7 = fails$d;
480
480
 
481
481
  // V8 ~ Chrome 36-
482
482
  // https://bugs.chromium.org/p/v8/issues/detail?id=3334
483
- var v8PrototypeDefineBug = DESCRIPTORS$8 && fails$6(function () {
483
+ var v8PrototypeDefineBug = DESCRIPTORS$8 && fails$7(function () {
484
484
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
485
485
  return Object.defineProperty(function () { /* empty */ }, 'prototype', {
486
486
  value: 42,
@@ -494,7 +494,7 @@ var $String$3 = String;
494
494
  var $TypeError$2 = TypeError;
495
495
 
496
496
  // `Assert: Type(argument) is Object`
497
- var anObject$5 = function (argument) {
497
+ var anObject$7 = function (argument) {
498
498
  if (isObject$2(argument)) return argument;
499
499
  throw $TypeError$2($String$3(argument) + ' is not an object');
500
500
  };
@@ -502,7 +502,7 @@ var anObject$5 = function (argument) {
502
502
  var DESCRIPTORS$7 = descriptors;
503
503
  var IE8_DOM_DEFINE = ie8DomDefine;
504
504
  var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
505
- var anObject$4 = anObject$5;
505
+ var anObject$6 = anObject$7;
506
506
  var toPropertyKey = toPropertyKey$2;
507
507
 
508
508
  var $TypeError$1 = TypeError;
@@ -517,9 +517,9 @@ var WRITABLE = 'writable';
517
517
  // `Object.defineProperty` method
518
518
  // https://tc39.es/ecma262/#sec-object.defineproperty
519
519
  objectDefineProperty.f = DESCRIPTORS$7 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
520
- anObject$4(O);
520
+ anObject$6(O);
521
521
  P = toPropertyKey(P);
522
- anObject$4(Attributes);
522
+ anObject$6(Attributes);
523
523
  if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
524
524
  var current = $getOwnPropertyDescriptor(O, P);
525
525
  if (current && current[WRITABLE]) {
@@ -532,9 +532,9 @@ objectDefineProperty.f = DESCRIPTORS$7 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function de
532
532
  }
533
533
  } return $defineProperty(O, P, Attributes);
534
534
  } : $defineProperty : function defineProperty(O, P, Attributes) {
535
- anObject$4(O);
535
+ anObject$6(O);
536
536
  P = toPropertyKey(P);
537
- anObject$4(Attributes);
537
+ anObject$6(Attributes);
538
538
  if (IE8_DOM_DEFINE) try {
539
539
  return $defineProperty(O, P, Attributes);
540
540
  } catch (error) { /* empty */ }
@@ -557,13 +557,13 @@ var createNonEnumerableProperty$4 = DESCRIPTORS$6 ? function (object, key, value
557
557
  var makeBuiltIn$3 = {exports: {}};
558
558
 
559
559
  var DESCRIPTORS$5 = descriptors;
560
- var hasOwn$7 = hasOwnProperty_1;
560
+ var hasOwn$8 = hasOwnProperty_1;
561
561
 
562
562
  var FunctionPrototype = Function.prototype;
563
563
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
564
564
  var getDescriptor = DESCRIPTORS$5 && Object.getOwnPropertyDescriptor;
565
565
 
566
- var EXISTS = hasOwn$7(FunctionPrototype, 'name');
566
+ var EXISTS = hasOwn$8(FunctionPrototype, 'name');
567
567
  // additional protection from minified / mangled / dropped function names
568
568
  var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
569
569
  var CONFIGURABLE = EXISTS && (!DESCRIPTORS$5 || (DESCRIPTORS$5 && getDescriptor(FunctionPrototype, 'name').configurable));
@@ -611,7 +611,7 @@ var NATIVE_WEAK_MAP = weakMapBasicDetection;
611
611
  var global$5 = global$d;
612
612
  var isObject$1 = isObject$6;
613
613
  var createNonEnumerableProperty$3 = createNonEnumerableProperty$4;
614
- var hasOwn$6 = hasOwnProperty_1;
614
+ var hasOwn$7 = hasOwnProperty_1;
615
615
  var shared = sharedStore;
616
616
  var sharedKey$2 = sharedKey$3;
617
617
  var hiddenKeys$3 = hiddenKeys$4;
@@ -657,16 +657,16 @@ if (NATIVE_WEAK_MAP || shared.state) {
657
657
  var STATE = sharedKey$2('state');
658
658
  hiddenKeys$3[STATE] = true;
659
659
  set = function (it, metadata) {
660
- if (hasOwn$6(it, STATE)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
660
+ if (hasOwn$7(it, STATE)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
661
661
  metadata.facade = it;
662
662
  createNonEnumerableProperty$3(it, STATE, metadata);
663
663
  return metadata;
664
664
  };
665
665
  get = function (it) {
666
- return hasOwn$6(it, STATE) ? it[STATE] : {};
666
+ return hasOwn$7(it, STATE) ? it[STATE] : {};
667
667
  };
668
668
  has = function (it) {
669
- return hasOwn$6(it, STATE);
669
+ return hasOwn$7(it, STATE);
670
670
  };
671
671
  }
672
672
 
@@ -679,9 +679,9 @@ var internalState = {
679
679
  };
680
680
 
681
681
  var uncurryThis$7 = functionUncurryThis;
682
- var fails$5 = fails$c;
682
+ var fails$6 = fails$d;
683
683
  var isCallable$8 = isCallable$g;
684
- var hasOwn$5 = hasOwnProperty_1;
684
+ var hasOwn$6 = hasOwnProperty_1;
685
685
  var DESCRIPTORS$4 = descriptors;
686
686
  var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
687
687
  var inspectSource = inspectSource$1;
@@ -696,7 +696,7 @@ var stringSlice$1 = uncurryThis$7(''.slice);
696
696
  var replace$2 = uncurryThis$7(''.replace);
697
697
  var join = uncurryThis$7([].join);
698
698
 
699
- var CONFIGURABLE_LENGTH = DESCRIPTORS$4 && !fails$5(function () {
699
+ var CONFIGURABLE_LENGTH = DESCRIPTORS$4 && !fails$6(function () {
700
700
  return defineProperty$5(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
701
701
  });
702
702
 
@@ -708,21 +708,21 @@ var makeBuiltIn$2 = makeBuiltIn$3.exports = function (value, name, options) {
708
708
  }
709
709
  if (options && options.getter) name = 'get ' + name;
710
710
  if (options && options.setter) name = 'set ' + name;
711
- if (!hasOwn$5(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
711
+ if (!hasOwn$6(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
712
712
  if (DESCRIPTORS$4) defineProperty$5(value, 'name', { value: name, configurable: true });
713
713
  else value.name = name;
714
714
  }
715
- if (CONFIGURABLE_LENGTH && options && hasOwn$5(options, 'arity') && value.length !== options.arity) {
715
+ if (CONFIGURABLE_LENGTH && options && hasOwn$6(options, 'arity') && value.length !== options.arity) {
716
716
  defineProperty$5(value, 'length', { value: options.arity });
717
717
  }
718
718
  try {
719
- if (options && hasOwn$5(options, 'constructor') && options.constructor) {
719
+ if (options && hasOwn$6(options, 'constructor') && options.constructor) {
720
720
  if (DESCRIPTORS$4) defineProperty$5(value, 'prototype', { writable: false });
721
721
  // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
722
722
  } else if (value.prototype) value.prototype = undefined;
723
723
  } catch (error) { /* empty */ }
724
724
  var state = enforceInternalState(value);
725
- if (!hasOwn$5(state, 'source')) {
725
+ if (!hasOwn$6(state, 'source')) {
726
726
  state.source = join(TEMPLATE, typeof name == 'string' ? name : '');
727
727
  } return value;
728
728
  };
@@ -738,7 +738,7 @@ var definePropertyModule$2 = objectDefineProperty;
738
738
  var makeBuiltIn$1 = makeBuiltIn$3.exports;
739
739
  var defineGlobalProperty$1 = defineGlobalProperty$3;
740
740
 
741
- var defineBuiltIn$3 = function (O, key, value, options) {
741
+ var defineBuiltIn$4 = function (O, key, value, options) {
742
742
  if (!options) options = {};
743
743
  var simple = options.enumerable;
744
744
  var name = options.name !== undefined ? options.name : key;
@@ -849,7 +849,7 @@ var arrayIncludes = {
849
849
  };
850
850
 
851
851
  var uncurryThis$6 = functionUncurryThis;
852
- var hasOwn$4 = hasOwnProperty_1;
852
+ var hasOwn$5 = hasOwnProperty_1;
853
853
  var toIndexedObject$2 = toIndexedObject$5;
854
854
  var indexOf = arrayIncludes.indexOf;
855
855
  var hiddenKeys$2 = hiddenKeys$4;
@@ -861,9 +861,9 @@ var objectKeysInternal = function (object, names) {
861
861
  var i = 0;
862
862
  var result = [];
863
863
  var key;
864
- for (key in O) !hasOwn$4(hiddenKeys$2, key) && hasOwn$4(O, key) && push(result, key);
864
+ for (key in O) !hasOwn$5(hiddenKeys$2, key) && hasOwn$5(O, key) && push(result, key);
865
865
  // Don't enum bug & hidden keys
866
- while (names.length > i) if (hasOwn$4(O, key = names[i++])) {
866
+ while (names.length > i) if (hasOwn$5(O, key = names[i++])) {
867
867
  ~indexOf(result, key) || push(result, key);
868
868
  }
869
869
  return result;
@@ -901,18 +901,18 @@ var getBuiltIn$1 = getBuiltIn$3;
901
901
  var uncurryThis$5 = functionUncurryThis;
902
902
  var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
903
903
  var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
904
- var anObject$3 = anObject$5;
904
+ var anObject$5 = anObject$7;
905
905
 
906
906
  var concat$1 = uncurryThis$5([].concat);
907
907
 
908
908
  // all object keys, includes non-enumerable and symbols
909
909
  var ownKeys$1 = getBuiltIn$1('Reflect', 'ownKeys') || function ownKeys(it) {
910
- var keys = getOwnPropertyNamesModule.f(anObject$3(it));
910
+ var keys = getOwnPropertyNamesModule.f(anObject$5(it));
911
911
  var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
912
912
  return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
913
913
  };
914
914
 
915
- var hasOwn$3 = hasOwnProperty_1;
915
+ var hasOwn$4 = hasOwnProperty_1;
916
916
  var ownKeys = ownKeys$1;
917
917
  var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
918
918
  var definePropertyModule$1 = objectDefineProperty;
@@ -923,13 +923,13 @@ var copyConstructorProperties$2 = function (target, source, exceptions) {
923
923
  var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
924
924
  for (var i = 0; i < keys.length; i++) {
925
925
  var key = keys[i];
926
- if (!hasOwn$3(target, key) && !(exceptions && hasOwn$3(exceptions, key))) {
926
+ if (!hasOwn$4(target, key) && !(exceptions && hasOwn$4(exceptions, key))) {
927
927
  defineProperty(target, key, getOwnPropertyDescriptor(source, key));
928
928
  }
929
929
  }
930
930
  };
931
931
 
932
- var fails$4 = fails$c;
932
+ var fails$5 = fails$d;
933
933
  var isCallable$6 = isCallable$g;
934
934
 
935
935
  var replacement = /#|\.prototype\./;
@@ -938,7 +938,7 @@ var isForced$1 = function (feature, detection) {
938
938
  var value = data[normalize(feature)];
939
939
  return value == POLYFILL ? true
940
940
  : value == NATIVE ? false
941
- : isCallable$6(detection) ? fails$4(detection)
941
+ : isCallable$6(detection) ? fails$5(detection)
942
942
  : !!detection;
943
943
  };
944
944
 
@@ -955,7 +955,7 @@ var isForced_1 = isForced$1;
955
955
  var global$4 = global$d;
956
956
  var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
957
957
  var createNonEnumerableProperty$2 = createNonEnumerableProperty$4;
958
- var defineBuiltIn$2 = defineBuiltIn$3;
958
+ var defineBuiltIn$3 = defineBuiltIn$4;
959
959
  var defineGlobalProperty = defineGlobalProperty$3;
960
960
  var copyConstructorProperties$1 = copyConstructorProperties$2;
961
961
  var isForced = isForced_1;
@@ -1003,7 +1003,7 @@ var _export = function (options, source) {
1003
1003
  if (options.sham || (targetProperty && targetProperty.sham)) {
1004
1004
  createNonEnumerableProperty$2(sourceProperty, 'sham', true);
1005
1005
  }
1006
- defineBuiltIn$2(target, key, sourceProperty, options);
1006
+ defineBuiltIn$3(target, key, sourceProperty, options);
1007
1007
  }
1008
1008
  };
1009
1009
 
@@ -1019,8 +1019,8 @@ var objectKeys$2 = Object.keys || function keys(O) {
1019
1019
 
1020
1020
  var DESCRIPTORS$3 = descriptors;
1021
1021
  var uncurryThis$4 = functionUncurryThis;
1022
- var call$1 = functionCall;
1023
- var fails$3 = fails$c;
1022
+ var call$2 = functionCall;
1023
+ var fails$4 = fails$d;
1024
1024
  var objectKeys$1 = objectKeys$2;
1025
1025
  var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
1026
1026
  var propertyIsEnumerableModule = objectPropertyIsEnumerable;
@@ -1035,7 +1035,7 @@ var concat = uncurryThis$4([].concat);
1035
1035
 
1036
1036
  // `Object.assign` method
1037
1037
  // https://tc39.es/ecma262/#sec-object.assign
1038
- var objectAssign = !$assign || fails$3(function () {
1038
+ var objectAssign = !$assign || fails$4(function () {
1039
1039
  // should have correct order of operations (Edge bug)
1040
1040
  if (DESCRIPTORS$3 && $assign({ b: 1 }, $assign(defineProperty$4({}, 'a', {
1041
1041
  enumerable: true,
@@ -1069,7 +1069,7 @@ var objectAssign = !$assign || fails$3(function () {
1069
1069
  var key;
1070
1070
  while (length > j) {
1071
1071
  key = keys[j++];
1072
- if (!DESCRIPTORS$3 || call$1(propertyIsEnumerable, S, key)) T[key] = S[key];
1072
+ if (!DESCRIPTORS$3 || call$2(propertyIsEnumerable, S, key)) T[key] = S[key];
1073
1073
  }
1074
1074
  } return T;
1075
1075
  } : $assign;
@@ -1089,7 +1089,7 @@ var objectDefineProperties = {};
1089
1089
  var DESCRIPTORS$2 = descriptors;
1090
1090
  var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
1091
1091
  var definePropertyModule = objectDefineProperty;
1092
- var anObject$2 = anObject$5;
1092
+ var anObject$4 = anObject$7;
1093
1093
  var toIndexedObject$1 = toIndexedObject$5;
1094
1094
  var objectKeys = objectKeys$2;
1095
1095
 
@@ -1097,7 +1097,7 @@ var objectKeys = objectKeys$2;
1097
1097
  // https://tc39.es/ecma262/#sec-object.defineproperties
1098
1098
  // eslint-disable-next-line es/no-object-defineproperties -- safe
1099
1099
  objectDefineProperties.f = DESCRIPTORS$2 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
1100
- anObject$2(O);
1100
+ anObject$4(O);
1101
1101
  var props = toIndexedObject$1(Properties);
1102
1102
  var keys = objectKeys(Properties);
1103
1103
  var length = keys.length;
@@ -1113,7 +1113,7 @@ var html$1 = getBuiltIn('document', 'documentElement');
1113
1113
 
1114
1114
  /* global ActiveXObject -- old IE, WSH */
1115
1115
 
1116
- var anObject$1 = anObject$5;
1116
+ var anObject$3 = anObject$7;
1117
1117
  var definePropertiesModule = objectDefineProperties;
1118
1118
  var enumBugKeys = enumBugKeys$3;
1119
1119
  var hiddenKeys = hiddenKeys$4;
@@ -1187,7 +1187,7 @@ hiddenKeys[IE_PROTO$1] = true;
1187
1187
  var objectCreate = Object.create || function create(O, Properties) {
1188
1188
  var result;
1189
1189
  if (O !== null) {
1190
- EmptyConstructor[PROTOTYPE] = anObject$1(O);
1190
+ EmptyConstructor[PROTOTYPE] = anObject$3(O);
1191
1191
  result = new EmptyConstructor();
1192
1192
  EmptyConstructor[PROTOTYPE] = null;
1193
1193
  // add "__proto__" for Object.getPrototypeOf polyfill
@@ -1219,16 +1219,16 @@ var addToUnscopables$1 = function (key) {
1219
1219
 
1220
1220
  var iterators = {};
1221
1221
 
1222
- var fails$2 = fails$c;
1222
+ var fails$3 = fails$d;
1223
1223
 
1224
- var correctPrototypeGetter = !fails$2(function () {
1224
+ var correctPrototypeGetter = !fails$3(function () {
1225
1225
  function F() { /* empty */ }
1226
1226
  F.prototype.constructor = null;
1227
1227
  // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
1228
1228
  return Object.getPrototypeOf(new F()) !== F.prototype;
1229
1229
  });
1230
1230
 
1231
- var hasOwn$2 = hasOwnProperty_1;
1231
+ var hasOwn$3 = hasOwnProperty_1;
1232
1232
  var isCallable$5 = isCallable$g;
1233
1233
  var toObject = toObject$3;
1234
1234
  var sharedKey = sharedKey$3;
@@ -1243,18 +1243,18 @@ var ObjectPrototype = $Object$1.prototype;
1243
1243
  // eslint-disable-next-line es/no-object-getprototypeof -- safe
1244
1244
  var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object$1.getPrototypeOf : function (O) {
1245
1245
  var object = toObject(O);
1246
- if (hasOwn$2(object, IE_PROTO)) return object[IE_PROTO];
1246
+ if (hasOwn$3(object, IE_PROTO)) return object[IE_PROTO];
1247
1247
  var constructor = object.constructor;
1248
1248
  if (isCallable$5(constructor) && object instanceof constructor) {
1249
1249
  return constructor.prototype;
1250
1250
  } return object instanceof $Object$1 ? ObjectPrototype : null;
1251
1251
  };
1252
1252
 
1253
- var fails$1 = fails$c;
1253
+ var fails$2 = fails$d;
1254
1254
  var isCallable$4 = isCallable$g;
1255
1255
  var isObject = isObject$6;
1256
1256
  var getPrototypeOf$1 = objectGetPrototypeOf;
1257
- var defineBuiltIn$1 = defineBuiltIn$3;
1257
+ var defineBuiltIn$2 = defineBuiltIn$4;
1258
1258
  var wellKnownSymbol$5 = wellKnownSymbol$8;
1259
1259
 
1260
1260
  var ITERATOR$3 = wellKnownSymbol$5('iterator');
@@ -1275,7 +1275,7 @@ if ([].keys) {
1275
1275
  }
1276
1276
  }
1277
1277
 
1278
- var NEW_ITERATOR_PROTOTYPE = !isObject(IteratorPrototype$2) || fails$1(function () {
1278
+ var NEW_ITERATOR_PROTOTYPE = !isObject(IteratorPrototype$2) || fails$2(function () {
1279
1279
  var test = {};
1280
1280
  // FF44- legacy iterators case
1281
1281
  return IteratorPrototype$2[ITERATOR$3].call(test) !== test;
@@ -1286,7 +1286,7 @@ if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$2 = {};
1286
1286
  // `%IteratorPrototype%[@@iterator]()` method
1287
1287
  // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
1288
1288
  if (!isCallable$4(IteratorPrototype$2[ITERATOR$3])) {
1289
- defineBuiltIn$1(IteratorPrototype$2, ITERATOR$3, function () {
1289
+ defineBuiltIn$2(IteratorPrototype$2, ITERATOR$3, function () {
1290
1290
  return this;
1291
1291
  });
1292
1292
  }
@@ -1297,14 +1297,14 @@ var iteratorsCore = {
1297
1297
  };
1298
1298
 
1299
1299
  var defineProperty$2 = objectDefineProperty.f;
1300
- var hasOwn$1 = hasOwnProperty_1;
1300
+ var hasOwn$2 = hasOwnProperty_1;
1301
1301
  var wellKnownSymbol$4 = wellKnownSymbol$8;
1302
1302
 
1303
1303
  var TO_STRING_TAG$3 = wellKnownSymbol$4('toStringTag');
1304
1304
 
1305
1305
  var setToStringTag$2 = function (target, TAG, STATIC) {
1306
1306
  if (target && !STATIC) target = target.prototype;
1307
- if (target && !hasOwn$1(target, TO_STRING_TAG$3)) {
1307
+ if (target && !hasOwn$2(target, TO_STRING_TAG$3)) {
1308
1308
  defineProperty$2(target, TO_STRING_TAG$3, { configurable: true, value: TAG });
1309
1309
  }
1310
1310
  };
@@ -1348,7 +1348,7 @@ var aPossiblePrototype$1 = function (argument) {
1348
1348
  /* eslint-disable no-proto -- safe */
1349
1349
 
1350
1350
  var uncurryThisAccessor = functionUncurryThisAccessor;
1351
- var anObject = anObject$5;
1351
+ var anObject$2 = anObject$7;
1352
1352
  var aPossiblePrototype = aPossiblePrototype$1;
1353
1353
 
1354
1354
  // `Object.setPrototypeOf` method
@@ -1365,7 +1365,7 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
1365
1365
  CORRECT_SETTER = test instanceof Array;
1366
1366
  } catch (error) { /* empty */ }
1367
1367
  return function setPrototypeOf(O, proto) {
1368
- anObject(O);
1368
+ anObject$2(O);
1369
1369
  aPossiblePrototype(proto);
1370
1370
  if (CORRECT_SETTER) setter(O, proto);
1371
1371
  else O.__proto__ = proto;
@@ -1374,7 +1374,7 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
1374
1374
  }() : undefined);
1375
1375
 
1376
1376
  var $$2 = _export;
1377
- var call = functionCall;
1377
+ var call$1 = functionCall;
1378
1378
  var FunctionName = functionName;
1379
1379
  var isCallable$2 = isCallable$g;
1380
1380
  var createIteratorConstructor = iteratorCreateConstructor;
@@ -1382,12 +1382,12 @@ var getPrototypeOf = objectGetPrototypeOf;
1382
1382
  var setPrototypeOf = objectSetPrototypeOf;
1383
1383
  var setToStringTag = setToStringTag$2;
1384
1384
  var createNonEnumerableProperty$1 = createNonEnumerableProperty$4;
1385
- var defineBuiltIn = defineBuiltIn$3;
1385
+ var defineBuiltIn$1 = defineBuiltIn$4;
1386
1386
  var wellKnownSymbol$3 = wellKnownSymbol$8;
1387
1387
  var Iterators$1 = iterators;
1388
1388
  var IteratorsCore = iteratorsCore;
1389
1389
 
1390
- var PROPER_FUNCTION_NAME = FunctionName.PROPER;
1390
+ var PROPER_FUNCTION_NAME$1 = FunctionName.PROPER;
1391
1391
  var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
1392
1392
  var IteratorPrototype = IteratorsCore.IteratorPrototype;
1393
1393
  var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
@@ -1429,7 +1429,7 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
1429
1429
  if (setPrototypeOf) {
1430
1430
  setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
1431
1431
  } else if (!isCallable$2(CurrentIteratorPrototype[ITERATOR$2])) {
1432
- defineBuiltIn(CurrentIteratorPrototype, ITERATOR$2, returnThis);
1432
+ defineBuiltIn$1(CurrentIteratorPrototype, ITERATOR$2, returnThis);
1433
1433
  }
1434
1434
  }
1435
1435
  // Set @@toStringTag to native iterators
@@ -1438,12 +1438,12 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
1438
1438
  }
1439
1439
 
1440
1440
  // fix Array.prototype.{ values, @@iterator }.name in V8 / FF
1441
- if (PROPER_FUNCTION_NAME && DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
1441
+ if (PROPER_FUNCTION_NAME$1 && DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
1442
1442
  if (CONFIGURABLE_FUNCTION_NAME) {
1443
1443
  createNonEnumerableProperty$1(IterablePrototype, 'name', VALUES);
1444
1444
  } else {
1445
1445
  INCORRECT_VALUES_NAME = true;
1446
- defaultIterator = function values() { return call(nativeIterator, this); };
1446
+ defaultIterator = function values() { return call$1(nativeIterator, this); };
1447
1447
  }
1448
1448
  }
1449
1449
 
@@ -1456,14 +1456,14 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
1456
1456
  };
1457
1457
  if (FORCED) for (KEY in methods) {
1458
1458
  if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
1459
- defineBuiltIn(IterablePrototype, KEY, methods[KEY]);
1459
+ defineBuiltIn$1(IterablePrototype, KEY, methods[KEY]);
1460
1460
  }
1461
1461
  } else $$2({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
1462
1462
  }
1463
1463
 
1464
1464
  // define iterator
1465
1465
  if (IterablePrototype[ITERATOR$2] !== defaultIterator) {
1466
- defineBuiltIn(IterablePrototype, ITERATOR$2, defaultIterator, { name: DEFAULT });
1466
+ defineBuiltIn$1(IterablePrototype, ITERATOR$2, defaultIterator, { name: DEFAULT });
1467
1467
  }
1468
1468
  Iterators$1[NAME] = defaultIterator;
1469
1469
 
@@ -2975,9 +2975,9 @@ var $$1 = _export;
2975
2975
  var DESCRIPTORS = descriptors;
2976
2976
  var global$2 = global$d;
2977
2977
  var uncurryThis$2 = functionUncurryThis;
2978
- var hasOwn = hasOwnProperty_1;
2978
+ var hasOwn$1 = hasOwnProperty_1;
2979
2979
  var isCallable = isCallable$g;
2980
- var isPrototypeOf = objectIsPrototypeOf;
2980
+ var isPrototypeOf$1 = objectIsPrototypeOf;
2981
2981
  var toString$2 = toString$3;
2982
2982
  var defineBuiltInAccessor = defineBuiltInAccessor$1;
2983
2983
  var copyConstructorProperties = copyConstructorProperties$2;
@@ -2993,7 +2993,7 @@ if (DESCRIPTORS && isCallable(NativeSymbol) && (!('description' in SymbolPrototy
2993
2993
  // wrap Symbol constructor for correct work with undefined description
2994
2994
  var SymbolWrapper = function Symbol() {
2995
2995
  var description = arguments.length < 1 || arguments[0] === undefined ? undefined : toString$2(arguments[0]);
2996
- var result = isPrototypeOf(SymbolPrototype, this)
2996
+ var result = isPrototypeOf$1(SymbolPrototype, this)
2997
2997
  ? new NativeSymbol(description)
2998
2998
  // in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'
2999
2999
  : description === undefined ? NativeSymbol() : NativeSymbol(description);
@@ -3016,7 +3016,7 @@ if (DESCRIPTORS && isCallable(NativeSymbol) && (!('description' in SymbolPrototy
3016
3016
  configurable: true,
3017
3017
  get: function description() {
3018
3018
  var symbol = thisSymbolValue(this);
3019
- if (hasOwn(EmptyStringDescriptionStore, symbol)) return '';
3019
+ if (hasOwn$1(EmptyStringDescriptionStore, symbol)) return '';
3020
3020
  var string = symbolDescriptiveString(symbol);
3021
3021
  var desc = NATIVE_SYMBOL ? stringSlice(string, 7, -1) : replace$1(string, regexp, '$1');
3022
3022
  return desc === '' ? undefined : desc;
@@ -3396,6 +3396,63 @@ const OptionGroup = ({
3396
3396
  }));
3397
3397
  };
3398
3398
 
3399
+ var anObject$1 = anObject$7;
3400
+
3401
+ // `RegExp.prototype.flags` getter implementation
3402
+ // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
3403
+ var regexpFlags = function () {
3404
+ var that = anObject$1(this);
3405
+ var result = '';
3406
+ if (that.hasIndices) result += 'd';
3407
+ if (that.global) result += 'g';
3408
+ if (that.ignoreCase) result += 'i';
3409
+ if (that.multiline) result += 'm';
3410
+ if (that.dotAll) result += 's';
3411
+ if (that.unicode) result += 'u';
3412
+ if (that.unicodeSets) result += 'v';
3413
+ if (that.sticky) result += 'y';
3414
+ return result;
3415
+ };
3416
+
3417
+ var call = functionCall;
3418
+ var hasOwn = hasOwnProperty_1;
3419
+ var isPrototypeOf = objectIsPrototypeOf;
3420
+ var regExpFlags = regexpFlags;
3421
+
3422
+ var RegExpPrototype$1 = RegExp.prototype;
3423
+
3424
+ var regexpGetFlags = function (R) {
3425
+ var flags = R.flags;
3426
+ return flags === undefined && !('flags' in RegExpPrototype$1) && !hasOwn(R, 'flags') && isPrototypeOf(RegExpPrototype$1, R)
3427
+ ? call(regExpFlags, R) : flags;
3428
+ };
3429
+
3430
+ var PROPER_FUNCTION_NAME = functionName.PROPER;
3431
+ var defineBuiltIn = defineBuiltIn$4;
3432
+ var anObject = anObject$7;
3433
+ var $toString = toString$3;
3434
+ var fails$1 = fails$d;
3435
+ var getRegExpFlags = regexpGetFlags;
3436
+
3437
+ var TO_STRING = 'toString';
3438
+ var RegExpPrototype = RegExp.prototype;
3439
+ var nativeToString = RegExpPrototype[TO_STRING];
3440
+
3441
+ var NOT_GENERIC = fails$1(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
3442
+ // FF44- RegExp#toString has a wrong name
3443
+ var INCORRECT_NAME = PROPER_FUNCTION_NAME && nativeToString.name != TO_STRING;
3444
+
3445
+ // `RegExp.prototype.toString` method
3446
+ // https://tc39.es/ecma262/#sec-regexp.prototype.tostring
3447
+ if (NOT_GENERIC || INCORRECT_NAME) {
3448
+ defineBuiltIn(RegExp.prototype, TO_STRING, function toString() {
3449
+ var R = anObject(this);
3450
+ var pattern = $toString(R.source);
3451
+ var flags = $toString(getRegExpFlags(R));
3452
+ return '/' + pattern + '/' + flags;
3453
+ }, { unsafe: true });
3454
+ }
3455
+
3399
3456
  const InputWrapper = ({
3400
3457
  children,
3401
3458
  unitLabel
@@ -3410,12 +3467,18 @@ const InputWrapper = ({
3410
3467
  }))]
3411
3468
  })) : children
3412
3469
  });
3470
+ const minMaxFormatFn = (value, unit) => {
3471
+ if (unit) return `${value} ${unit}`;
3472
+ return value.toString();
3473
+ };
3413
3474
  function Slider({
3414
3475
  name = `${randomId()}-slider`,
3415
3476
  value,
3416
3477
  defaultValue,
3417
3478
  min = 0,
3418
3479
  max = 100,
3480
+ minMaxFormat = minMaxFormatFn,
3481
+ showMinMax = false,
3419
3482
  step = 1,
3420
3483
  label,
3421
3484
  instruction,
@@ -3513,7 +3576,15 @@ function Slider({
3513
3576
  style: {
3514
3577
  background
3515
3578
  }
3516
- }), errorMessage && jsx("p", Object.assign({
3579
+ }), showMinMax && jsxs("div", Object.assign({
3580
+ className: "gds-slider-min-max"
3581
+ }, {
3582
+ children: [jsx("div", {
3583
+ children: minMaxFormat(min, unitLabel)
3584
+ }), jsx("div", {
3585
+ children: minMaxFormat(max, unitLabel)
3586
+ })]
3587
+ })), errorMessage && jsx("p", Object.assign({
3517
3588
  className: "gds-slider-error-info"
3518
3589
  }, {
3519
3590
  children: errorMessage
@@ -3672,7 +3743,7 @@ var stringTrim = {
3672
3743
  };
3673
3744
 
3674
3745
  var global$1 = global$d;
3675
- var fails = fails$c;
3746
+ var fails = fails$d;
3676
3747
  var uncurryThis = functionUncurryThis;
3677
3748
  var toString = toString$3;
3678
3749
  var trim = stringTrim.trim;
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@sebgroup/green-react",
3
- "version": "1.8.1",
3
+ "version": "1.9.0",
4
4
  "peerDependencies": {
5
5
  "react": "^17 || ^18",
6
6
  "react-dom": "^17 || ^18"
7
7
  },
8
8
  "dependencies": {
9
- "@sebgroup/chlorophyll": "^1.9.1",
9
+ "@sebgroup/chlorophyll": "^1.10.0",
10
10
  "@sebgroup/extract": "^1.3.1",
11
11
  "classnames": "^2.3.2"
12
12
  },
@@ -1,3 +1,3 @@
1
1
  import { SliderProps } from '../../types';
2
- export declare function Slider({ name, value, defaultValue, min, max, step, label, instruction, errorMessage, hasTextbox, unitLabel, disabled, onChange, enableClamping, onClamp, }: SliderProps): JSX.Element;
2
+ export declare function Slider({ name, value, defaultValue, min, max, minMaxFormat, showMinMax, step, label, instruction, errorMessage, hasTextbox, unitLabel, disabled, onChange, enableClamping, onClamp, }: SliderProps): JSX.Element;
3
3
  export default Slider;
@@ -18,6 +18,8 @@ export interface SliderProps {
18
18
  value?: number;
19
19
  min?: number;
20
20
  max?: number;
21
+ showMinMax?: boolean;
22
+ minMaxFormat?: (value: number, unit?: string) => string;
21
23
  step?: number;
22
24
  label?: string;
23
25
  instruction?: string;