@sebgroup/green-react 2.2.1 → 2.4.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.esm.js CHANGED
@@ -2230,10 +2230,10 @@ $$8({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }
2230
2230
  * Copyright 2018 Google LLC
2231
2231
  * SPDX-License-Identifier: BSD-3-Clause
2232
2232
  */
2233
- const t=new Set(["children","localName","ref","style","className"]),e=new WeakMap,n=(t,n,s,i,o)=>{const l=null==o?void 0:o[n];void 0===l||s===i?null==s&&n in HTMLElement.prototype?t.removeAttribute(n):t[n]=s:((t,n,s)=>{let i=e.get(t);void 0===i&&e.set(t,i=new Map);let o=i.get(n);void 0!==s?void 0===o?(i.set(n,o={handleEvent:s}),t.addEventListener(n,o)):o.handleEvent=s:void 0!==o&&(i.delete(n),t.removeEventListener(n,o));})(t,l,s);},s=(t,e)=>{"function"==typeof t?t(e):t.current=e;};function i(e=window.React,i,o,l,d){let a,c,r;if(void 0===i){const t=e;(({tagName:c,elementClass:r,events:l,displayName:d}=t)),a=t.react;}else a=e,r=o,c=i;const h=a.Component,u=a.createElement,f=new Set(Object.keys(null!=l?l:{}));class v extends h{constructor(){super(...arguments),this.o=null;}t(t){if(null!==this.o)for(const e in this.i)n(this.o,e,this.props[e],t?t[e]:void 0,l);}componentDidMount(){var t;this.t(),null===(t=this.o)||void 0===t||t.removeAttribute("defer-hydration");}componentDidUpdate(t){this.t(t);}render(){const{_$Gl:e,...n}=this.props;this.h!==e&&(this.u=t=>{null!==e&&s(e,t),this.o=t,this.h=e;}),this.i={};const i={ref:this.u};for(const[e,s]of Object.entries(n))t.has(e)?i["className"===e?"class":e]=s:f.has(e)||e in r.prototype?this.i[e]=s:i[e]=s;return i.suppressHydrationWarning=!0,u(c,i)}}v.displayName=null!=d?d:r.name;const m=a.forwardRef(((t,e)=>u(v,{...t,_$Gl:e},null==t?void 0:t.children)));return m.displayName=v.displayName,m}
2233
+ const e=new Set(["children","localName","ref","style","className"]),n=new WeakMap,t=(e,t,l,o,a)=>{const s=a?.[t];void 0===s||l===o?(e[t]=l,null==l&&t in HTMLElement.prototype&&e.removeAttribute(t)):((e,t,l)=>{let o=n.get(e);void 0===o&&n.set(e,o=new Map);let a=o.get(t);void 0!==l?void 0===a?(o.set(t,a={handleEvent:l}),e.addEventListener(t,a)):a.handleEvent=l:void 0!==a&&(o.delete(t),e.removeEventListener(t,a));})(e,s,l);},l=({react:n,tagName:l,elementClass:o,events:a,displayName:s})=>{const c=new Set(Object.keys(a??{})),i=n.forwardRef(((s,i)=>{const r=n.useRef(null),d=n.useRef(null),f={},u={};for(const[n,t]of Object.entries(s))e.has(n)?f["className"===n?"class":n]=t:c.has(n)||n in o.prototype?u[n]=t:f[n]=t;return n.useLayoutEffect((()=>{if(null!==d.current){for(const e in u)t(d.current,e,s[e],r.current?r.current[e]:void 0,a);r.current=s;}})),n.useLayoutEffect((()=>{d.current?.removeAttribute("defer-hydration");}),[]),f.suppressHydrationWarning=!0,n.createElement(l,{...f,ref:n.useCallback((e=>{d.current=e,"function"==typeof i?i(e):null!==i&&(i.current=e);}),[i])})}));return i.displayName=s??o.name,i};
2234
2234
 
2235
2235
  registerTransitionalStyles();
2236
- const CoreDropdown = i({
2236
+ const CoreDropdown = l({
2237
2237
  tagName: getScopedTagName('gds-dropdown'),
2238
2238
  elementClass: GdsDropdown,
2239
2239
  events: {
@@ -2241,7 +2241,7 @@ const CoreDropdown = i({
2241
2241
  },
2242
2242
  react: React
2243
2243
  });
2244
- const CoreOption = i({
2244
+ const CoreOption = l({
2245
2245
  tagName: getScopedTagName('gds-option'),
2246
2246
  elementClass: GdsOption,
2247
2247
  react: React
@@ -2461,6 +2461,63 @@ const Datepicker = (options = {}) => {
2461
2461
  });
2462
2462
  };
2463
2463
 
2464
+ var anObject$6 = anObject$c;
2465
+
2466
+ // `RegExp.prototype.flags` getter implementation
2467
+ // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
2468
+ var regexpFlags = function () {
2469
+ var that = anObject$6(this);
2470
+ var result = '';
2471
+ if (that.hasIndices) result += 'd';
2472
+ if (that.global) result += 'g';
2473
+ if (that.ignoreCase) result += 'i';
2474
+ if (that.multiline) result += 'm';
2475
+ if (that.dotAll) result += 's';
2476
+ if (that.unicode) result += 'u';
2477
+ if (that.unicodeSets) result += 'v';
2478
+ if (that.sticky) result += 'y';
2479
+ return result;
2480
+ };
2481
+
2482
+ var call$8 = functionCall;
2483
+ var hasOwn$2 = hasOwnProperty_1;
2484
+ var isPrototypeOf$3 = objectIsPrototypeOf;
2485
+ var regExpFlags = regexpFlags;
2486
+
2487
+ var RegExpPrototype$1 = RegExp.prototype;
2488
+
2489
+ var regexpGetFlags = function (R) {
2490
+ var flags = R.flags;
2491
+ return flags === undefined && !('flags' in RegExpPrototype$1) && !hasOwn$2(R, 'flags') && isPrototypeOf$3(RegExpPrototype$1, R)
2492
+ ? call$8(regExpFlags, R) : flags;
2493
+ };
2494
+
2495
+ var PROPER_FUNCTION_NAME = functionName.PROPER;
2496
+ var defineBuiltIn$2 = defineBuiltIn$6;
2497
+ var anObject$5 = anObject$c;
2498
+ var $toString = toString$4;
2499
+ var fails$3 = fails$g;
2500
+ var getRegExpFlags = regexpGetFlags;
2501
+
2502
+ var TO_STRING = 'toString';
2503
+ var RegExpPrototype = RegExp.prototype;
2504
+ var nativeToString = RegExpPrototype[TO_STRING];
2505
+
2506
+ var NOT_GENERIC = fails$3(function () { return nativeToString.call({ source: 'a', flags: 'b' }) !== '/a/b'; });
2507
+ // FF44- RegExp#toString has a wrong name
2508
+ var INCORRECT_NAME = PROPER_FUNCTION_NAME && nativeToString.name !== TO_STRING;
2509
+
2510
+ // `RegExp.prototype.toString` method
2511
+ // https://tc39.es/ecma262/#sec-regexp.prototype.tostring
2512
+ if (NOT_GENERIC || INCORRECT_NAME) {
2513
+ defineBuiltIn$2(RegExp.prototype, TO_STRING, function toString() {
2514
+ var R = anObject$5(this);
2515
+ var pattern = $toString(R.source);
2516
+ var flags = $toString(getRegExpFlags(R));
2517
+ return '/' + pattern + '/' + flags;
2518
+ }, { unsafe: true });
2519
+ }
2520
+
2464
2521
  function Button({
2465
2522
  children,
2466
2523
  variant,
@@ -2468,8 +2525,10 @@ function Button({
2468
2525
  disabled,
2469
2526
  active = false,
2470
2527
  type = 'button',
2471
- size
2528
+ size,
2529
+ testId
2472
2530
  }) {
2531
+ var _a;
2473
2532
  const props = {
2474
2533
  type,
2475
2534
  disabled
@@ -2480,7 +2539,14 @@ function Button({
2480
2539
  if (size) classNames.push(size);
2481
2540
  if (classNames.length) props.className = classNames.join(' ');
2482
2541
  if (onClick) props.onClick = onClick;
2483
- return jsx("button", Object.assign({}, props, {
2542
+ return variant == 'close' ? jsx("button", Object.assign({}, props, {
2543
+ "aria-label": (_a = children === null || children === void 0 ? void 0 : children.toString()) !== null && _a !== void 0 ? _a : 'Close',
2544
+ "data-testid": testId
2545
+ }, {
2546
+ children: jsx("i", {})
2547
+ })) : jsx("button", Object.assign({}, props, {
2548
+ "data-testid": testId
2549
+ }, {
2484
2550
  children: children
2485
2551
  }));
2486
2552
  }
@@ -2725,9 +2791,17 @@ function Group({
2725
2791
  id,
2726
2792
  children,
2727
2793
  error,
2728
- groupBorder = false
2794
+ className,
2795
+ groupBorder = false,
2796
+ groupFocus = false
2729
2797
  }) {
2730
- const groupClassName = `group ${groupBorder ? 'group-border' : ''} ${error ? 'is-invalid' : ''}`;
2798
+ const groupClassName = classNames('group', {
2799
+ 'group-border': groupBorder
2800
+ }, {
2801
+ 'group-focus': groupFocus
2802
+ }, {
2803
+ 'is-invalid': error
2804
+ }, className);
2731
2805
  const errorMessage = error ? error.message || error : '';
2732
2806
  return jsxs("div", Object.assign({
2733
2807
  className: "form-group",
@@ -2777,17 +2851,17 @@ var setSpecies$1 = function (CONSTRUCTOR_NAME) {
2777
2851
  }
2778
2852
  };
2779
2853
 
2780
- var isPrototypeOf$3 = objectIsPrototypeOf;
2854
+ var isPrototypeOf$2 = objectIsPrototypeOf;
2781
2855
 
2782
2856
  var $TypeError$5 = TypeError;
2783
2857
 
2784
2858
  var anInstance$1 = function (it, Prototype) {
2785
- if (isPrototypeOf$3(Prototype, it)) return it;
2859
+ if (isPrototypeOf$2(Prototype, it)) return it;
2786
2860
  throw new $TypeError$5('Incorrect invocation');
2787
2861
  };
2788
2862
 
2789
2863
  var uncurryThis$6 = functionUncurryThis;
2790
- var fails$3 = fails$g;
2864
+ var fails$2 = fails$g;
2791
2865
  var isCallable$5 = isCallable$l;
2792
2866
  var classof$1 = classof$4;
2793
2867
  var getBuiltIn$2 = getBuiltIn$7;
@@ -2831,7 +2905,7 @@ isConstructorLegacy.sham = true;
2831
2905
 
2832
2906
  // `IsConstructor` abstract operation
2833
2907
  // https://tc39.es/ecma262/#sec-isconstructor
2834
- var isConstructor$1 = !construct || fails$3(function () {
2908
+ var isConstructor$1 = !construct || fails$2(function () {
2835
2909
  var called;
2836
2910
  return isConstructorModern(isConstructorModern.call)
2837
2911
  || !isConstructorModern(Object)
@@ -2850,7 +2924,7 @@ var aConstructor$1 = function (argument) {
2850
2924
  throw new $TypeError$4(tryToString$2(argument) + ' is not a constructor');
2851
2925
  };
2852
2926
 
2853
- var anObject$6 = anObject$c;
2927
+ var anObject$4 = anObject$c;
2854
2928
  var aConstructor = aConstructor$1;
2855
2929
  var isNullOrUndefined$1 = isNullOrUndefined$4;
2856
2930
  var wellKnownSymbol$4 = wellKnownSymbol$g;
@@ -2860,20 +2934,20 @@ var SPECIES$1 = wellKnownSymbol$4('species');
2860
2934
  // `SpeciesConstructor` abstract operation
2861
2935
  // https://tc39.es/ecma262/#sec-speciesconstructor
2862
2936
  var speciesConstructor$1 = function (O, defaultConstructor) {
2863
- var C = anObject$6(O).constructor;
2937
+ var C = anObject$4(O).constructor;
2864
2938
  var S;
2865
- return C === undefined || isNullOrUndefined$1(S = anObject$6(C)[SPECIES$1]) ? defaultConstructor : aConstructor(S);
2939
+ return C === undefined || isNullOrUndefined$1(S = anObject$4(C)[SPECIES$1]) ? defaultConstructor : aConstructor(S);
2866
2940
  };
2867
2941
 
2868
2942
  var NATIVE_BIND$1 = functionBindNative;
2869
2943
 
2870
2944
  var FunctionPrototype = Function.prototype;
2871
2945
  var apply$1 = FunctionPrototype.apply;
2872
- var call$8 = FunctionPrototype.call;
2946
+ var call$7 = FunctionPrototype.call;
2873
2947
 
2874
2948
  // eslint-disable-next-line es/no-reflect -- safe
2875
- var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND$1 ? call$8.bind(apply$1) : function () {
2876
- return call$8.apply(apply$1, arguments);
2949
+ var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND$1 ? call$7.bind(apply$1) : function () {
2950
+ return call$7.apply(apply$1, arguments);
2877
2951
  });
2878
2952
 
2879
2953
  var classofRaw = classofRaw$2;
@@ -2920,8 +2994,8 @@ var global$7 = global$k;
2920
2994
  var apply = functionApply;
2921
2995
  var bind$3 = functionBindContext;
2922
2996
  var isCallable$4 = isCallable$l;
2923
- var hasOwn$2 = hasOwnProperty_1;
2924
- var fails$2 = fails$g;
2997
+ var hasOwn$1 = hasOwnProperty_1;
2998
+ var fails$1 = fails$g;
2925
2999
  var html = html$2;
2926
3000
  var arraySlice = arraySlice$1;
2927
3001
  var createElement = documentCreateElement$2;
@@ -2941,13 +3015,13 @@ var queue$2 = {};
2941
3015
  var ONREADYSTATECHANGE = 'onreadystatechange';
2942
3016
  var $location, defer, channel, port;
2943
3017
 
2944
- fails$2(function () {
3018
+ fails$1(function () {
2945
3019
  // Deno throws a ReferenceError on `location` access without `--location` flag
2946
3020
  $location = global$7.location;
2947
3021
  });
2948
3022
 
2949
3023
  var run = function (id) {
2950
- if (hasOwn$2(queue$2, id)) {
3024
+ if (hasOwn$1(queue$2, id)) {
2951
3025
  var fn = queue$2[id];
2952
3026
  delete queue$2[id];
2953
3027
  fn();
@@ -3008,7 +3082,7 @@ if (!set || !clear) {
3008
3082
  isCallable$4(global$7.postMessage) &&
3009
3083
  !global$7.importScripts &&
3010
3084
  $location && $location.protocol !== 'file:' &&
3011
- !fails$2(globalPostMessageDefer)
3085
+ !fails$1(globalPostMessageDefer)
3012
3086
  ) {
3013
3087
  defer = globalPostMessageDefer;
3014
3088
  global$7.addEventListener('message', eventListener, false);
@@ -3247,8 +3321,8 @@ newPromiseCapability$2.f = function (C) {
3247
3321
  var $$7 = _export;
3248
3322
  var IS_NODE = engineIsNode;
3249
3323
  var global$3 = global$k;
3250
- var call$7 = functionCall;
3251
- var defineBuiltIn$2 = defineBuiltIn$6;
3324
+ var call$6 = functionCall;
3325
+ var defineBuiltIn$1 = defineBuiltIn$6;
3252
3326
  var setPrototypeOf = objectSetPrototypeOf;
3253
3327
  var setToStringTag = setToStringTag$3;
3254
3328
  var setSpecies = setSpecies$1;
@@ -3325,7 +3399,7 @@ var callReaction = function (reaction, state) {
3325
3399
  if (result === reaction.promise) {
3326
3400
  reject(new TypeError$1('Promise-chain cycle'));
3327
3401
  } else if (then = isThenable(result)) {
3328
- call$7(then, result, resolve, reject);
3402
+ call$6(then, result, resolve, reject);
3329
3403
  } else resolve(result);
3330
3404
  } else reject(value);
3331
3405
  } catch (error) {
@@ -3362,7 +3436,7 @@ var dispatchEvent = function (name, promise, reason) {
3362
3436
  };
3363
3437
 
3364
3438
  var onUnhandled = function (state) {
3365
- call$7(task, global$3, function () {
3439
+ call$6(task, global$3, function () {
3366
3440
  var promise = state.facade;
3367
3441
  var value = state.value;
3368
3442
  var IS_UNHANDLED = isUnhandled(state);
@@ -3385,7 +3459,7 @@ var isUnhandled = function (state) {
3385
3459
  };
3386
3460
 
3387
3461
  var onHandleUnhandled = function (state) {
3388
- call$7(task, global$3, function () {
3462
+ call$6(task, global$3, function () {
3389
3463
  var promise = state.facade;
3390
3464
  if (IS_NODE) {
3391
3465
  process.emit('rejectionHandled', promise);
@@ -3419,7 +3493,7 @@ var internalResolve = function (state, value, unwrap) {
3419
3493
  microtask(function () {
3420
3494
  var wrapper = { done: false };
3421
3495
  try {
3422
- call$7(then, value,
3496
+ call$6(then, value,
3423
3497
  bind$1(internalResolve, wrapper, state),
3424
3498
  bind$1(internalReject, wrapper, state)
3425
3499
  );
@@ -3443,7 +3517,7 @@ if (FORCED_PROMISE_CONSTRUCTOR$4) {
3443
3517
  PromiseConstructor = function Promise(executor) {
3444
3518
  anInstance(this, PromisePrototype);
3445
3519
  aCallable$3(executor);
3446
- call$7(Internal, this);
3520
+ call$6(Internal, this);
3447
3521
  var state = getInternalPromiseState(this);
3448
3522
  try {
3449
3523
  executor(bind$1(internalResolve, state), bind$1(internalReject, state));
@@ -3470,7 +3544,7 @@ if (FORCED_PROMISE_CONSTRUCTOR$4) {
3470
3544
 
3471
3545
  // `Promise.prototype.then` method
3472
3546
  // https://tc39.es/ecma262/#sec-promise.prototype.then
3473
- Internal.prototype = defineBuiltIn$2(PromisePrototype, 'then', function then(onFulfilled, onRejected) {
3547
+ Internal.prototype = defineBuiltIn$1(PromisePrototype, 'then', function then(onFulfilled, onRejected) {
3474
3548
  var state = getInternalPromiseState(this);
3475
3549
  var reaction = newPromiseCapability$1(speciesConstructor(this, PromiseConstructor));
3476
3550
  state.parent = true;
@@ -3503,10 +3577,10 @@ if (FORCED_PROMISE_CONSTRUCTOR$4) {
3503
3577
 
3504
3578
  if (!NATIVE_PROMISE_SUBCLASSING) {
3505
3579
  // make `Promise#then` return a polyfilled `Promise` for native promise-based APIs
3506
- defineBuiltIn$2(NativePromisePrototype$1, 'then', function then(onFulfilled, onRejected) {
3580
+ defineBuiltIn$1(NativePromisePrototype$1, 'then', function then(onFulfilled, onRejected) {
3507
3581
  var that = this;
3508
3582
  return new PromiseConstructor(function (resolve, reject) {
3509
- call$7(nativeThen, that, resolve, reject);
3583
+ call$6(nativeThen, that, resolve, reject);
3510
3584
  }).then(onFulfilled, onRejected);
3511
3585
  // https://github.com/zloirock/core-js/issues/640
3512
3586
  }, { unsafe: true });
@@ -3556,9 +3630,9 @@ var getIteratorMethod$2 = function (it) {
3556
3630
  || Iterators[classof(it)];
3557
3631
  };
3558
3632
 
3559
- var call$6 = functionCall;
3633
+ var call$5 = functionCall;
3560
3634
  var aCallable$2 = aCallable$8;
3561
- var anObject$5 = anObject$c;
3635
+ var anObject$3 = anObject$c;
3562
3636
  var tryToString$1 = tryToString$4;
3563
3637
  var getIteratorMethod$1 = getIteratorMethod$2;
3564
3638
 
@@ -3566,41 +3640,41 @@ var $TypeError$1 = TypeError;
3566
3640
 
3567
3641
  var getIterator$1 = function (argument, usingIterator) {
3568
3642
  var iteratorMethod = arguments.length < 2 ? getIteratorMethod$1(argument) : usingIterator;
3569
- if (aCallable$2(iteratorMethod)) return anObject$5(call$6(iteratorMethod, argument));
3643
+ if (aCallable$2(iteratorMethod)) return anObject$3(call$5(iteratorMethod, argument));
3570
3644
  throw new $TypeError$1(tryToString$1(argument) + ' is not iterable');
3571
3645
  };
3572
3646
 
3573
- var call$5 = functionCall;
3574
- var anObject$4 = anObject$c;
3647
+ var call$4 = functionCall;
3648
+ var anObject$2 = anObject$c;
3575
3649
  var getMethod = getMethod$3;
3576
3650
 
3577
3651
  var iteratorClose$1 = function (iterator, kind, value) {
3578
3652
  var innerResult, innerError;
3579
- anObject$4(iterator);
3653
+ anObject$2(iterator);
3580
3654
  try {
3581
3655
  innerResult = getMethod(iterator, 'return');
3582
3656
  if (!innerResult) {
3583
3657
  if (kind === 'throw') throw value;
3584
3658
  return value;
3585
3659
  }
3586
- innerResult = call$5(innerResult, iterator);
3660
+ innerResult = call$4(innerResult, iterator);
3587
3661
  } catch (error) {
3588
3662
  innerError = true;
3589
3663
  innerResult = error;
3590
3664
  }
3591
3665
  if (kind === 'throw') throw value;
3592
3666
  if (innerError) throw innerResult;
3593
- anObject$4(innerResult);
3667
+ anObject$2(innerResult);
3594
3668
  return value;
3595
3669
  };
3596
3670
 
3597
3671
  var bind = functionBindContext;
3598
- var call$4 = functionCall;
3599
- var anObject$3 = anObject$c;
3672
+ var call$3 = functionCall;
3673
+ var anObject$1 = anObject$c;
3600
3674
  var tryToString = tryToString$4;
3601
3675
  var isArrayIteratorMethod = isArrayIteratorMethod$1;
3602
3676
  var lengthOfArrayLike = lengthOfArrayLike$2;
3603
- var isPrototypeOf$2 = objectIsPrototypeOf;
3677
+ var isPrototypeOf$1 = objectIsPrototypeOf;
3604
3678
  var getIterator = getIterator$1;
3605
3679
  var getIteratorMethod = getIteratorMethod$2;
3606
3680
  var iteratorClose = iteratorClose$1;
@@ -3630,7 +3704,7 @@ var iterate$2 = function (iterable, unboundFunction, options) {
3630
3704
 
3631
3705
  var callFn = function (value) {
3632
3706
  if (AS_ENTRIES) {
3633
- anObject$3(value);
3707
+ anObject$1(value);
3634
3708
  return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
3635
3709
  } return INTERRUPTED ? fn(value, stop) : fn(value);
3636
3710
  };
@@ -3646,20 +3720,20 @@ var iterate$2 = function (iterable, unboundFunction, options) {
3646
3720
  if (isArrayIteratorMethod(iterFn)) {
3647
3721
  for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
3648
3722
  result = callFn(iterable[index]);
3649
- if (result && isPrototypeOf$2(ResultPrototype, result)) return result;
3723
+ if (result && isPrototypeOf$1(ResultPrototype, result)) return result;
3650
3724
  } return new Result(false);
3651
3725
  }
3652
3726
  iterator = getIterator(iterable, iterFn);
3653
3727
  }
3654
3728
 
3655
3729
  next = IS_RECORD ? iterable.next : iterator.next;
3656
- while (!(step = call$4(next, iterator)).done) {
3730
+ while (!(step = call$3(next, iterator)).done) {
3657
3731
  try {
3658
3732
  result = callFn(step.value);
3659
3733
  } catch (error) {
3660
3734
  iteratorClose(iterator, 'throw', error);
3661
3735
  }
3662
- if (typeof result == 'object' && result && isPrototypeOf$2(ResultPrototype, result)) return result;
3736
+ if (typeof result == 'object' && result && isPrototypeOf$1(ResultPrototype, result)) return result;
3663
3737
  } return new Result(false);
3664
3738
  };
3665
3739
 
@@ -3713,7 +3787,7 @@ var promiseStaticsIncorrectIteration = FORCED_PROMISE_CONSTRUCTOR$3 || !checkCor
3713
3787
  });
3714
3788
 
3715
3789
  var $$6 = _export;
3716
- var call$3 = functionCall;
3790
+ var call$2 = functionCall;
3717
3791
  var aCallable$1 = aCallable$8;
3718
3792
  var newPromiseCapabilityModule$2 = newPromiseCapability$2;
3719
3793
  var perform$1 = perform$3;
@@ -3737,7 +3811,7 @@ $$6({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION
3737
3811
  var index = counter++;
3738
3812
  var alreadyCalled = false;
3739
3813
  remaining++;
3740
- call$3($promiseResolve, C, promise).then(function (value) {
3814
+ call$2($promiseResolve, C, promise).then(function (value) {
3741
3815
  if (alreadyCalled) return;
3742
3816
  alreadyCalled = true;
3743
3817
  values[index] = value;
@@ -3756,7 +3830,7 @@ var FORCED_PROMISE_CONSTRUCTOR$2 = promiseConstructorDetection.CONSTRUCTOR;
3756
3830
  var NativePromiseConstructor = promiseNativeConstructor;
3757
3831
  var getBuiltIn$1 = getBuiltIn$7;
3758
3832
  var isCallable$1 = isCallable$l;
3759
- var defineBuiltIn$1 = defineBuiltIn$6;
3833
+ var defineBuiltIn = defineBuiltIn$6;
3760
3834
 
3761
3835
  var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;
3762
3836
 
@@ -3772,12 +3846,12 @@ $$5({ target: 'Promise', proto: true, forced: FORCED_PROMISE_CONSTRUCTOR$2, real
3772
3846
  if (isCallable$1(NativePromiseConstructor)) {
3773
3847
  var method = getBuiltIn$1('Promise').prototype['catch'];
3774
3848
  if (NativePromisePrototype['catch'] !== method) {
3775
- defineBuiltIn$1(NativePromisePrototype, 'catch', method, { unsafe: true });
3849
+ defineBuiltIn(NativePromisePrototype, 'catch', method, { unsafe: true });
3776
3850
  }
3777
3851
  }
3778
3852
 
3779
3853
  var $$4 = _export;
3780
- var call$2 = functionCall;
3854
+ var call$1 = functionCall;
3781
3855
  var aCallable = aCallable$8;
3782
3856
  var newPromiseCapabilityModule$1 = newPromiseCapability$2;
3783
3857
  var perform = perform$3;
@@ -3794,7 +3868,7 @@ $$4({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION
3794
3868
  var result = perform(function () {
3795
3869
  var $promiseResolve = aCallable(C.resolve);
3796
3870
  iterate(iterable, function (promise) {
3797
- call$2($promiseResolve, C, promise).then(capability.resolve, reject);
3871
+ call$1($promiseResolve, C, promise).then(capability.resolve, reject);
3798
3872
  });
3799
3873
  });
3800
3874
  if (result.error) reject(result.value);
@@ -3803,7 +3877,7 @@ $$4({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION
3803
3877
  });
3804
3878
 
3805
3879
  var $$3 = _export;
3806
- var call$1 = functionCall;
3880
+ var call = functionCall;
3807
3881
  var newPromiseCapabilityModule = newPromiseCapability$2;
3808
3882
  var FORCED_PROMISE_CONSTRUCTOR$1 = promiseConstructorDetection.CONSTRUCTOR;
3809
3883
 
@@ -3812,17 +3886,17 @@ var FORCED_PROMISE_CONSTRUCTOR$1 = promiseConstructorDetection.CONSTRUCTOR;
3812
3886
  $$3({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR$1 }, {
3813
3887
  reject: function reject(r) {
3814
3888
  var capability = newPromiseCapabilityModule.f(this);
3815
- call$1(capability.reject, undefined, r);
3889
+ call(capability.reject, undefined, r);
3816
3890
  return capability.promise;
3817
3891
  }
3818
3892
  });
3819
3893
 
3820
- var anObject$2 = anObject$c;
3894
+ var anObject = anObject$c;
3821
3895
  var isObject = isObject$9;
3822
3896
  var newPromiseCapability = newPromiseCapability$2;
3823
3897
 
3824
3898
  var promiseResolve$1 = function (C, x) {
3825
- anObject$2(C);
3899
+ anObject(C);
3826
3900
  if (isObject(x) && x.constructor === C) return x;
3827
3901
  var promiseCapability = newPromiseCapability.f(C);
3828
3902
  var resolve = promiseCapability.resolve;
@@ -4111,9 +4185,9 @@ var $$1 = _export;
4111
4185
  var DESCRIPTORS = descriptors;
4112
4186
  var global$2 = global$k;
4113
4187
  var uncurryThis$2 = functionUncurryThis;
4114
- var hasOwn$1 = hasOwnProperty_1;
4188
+ var hasOwn = hasOwnProperty_1;
4115
4189
  var isCallable = isCallable$l;
4116
- var isPrototypeOf$1 = objectIsPrototypeOf;
4190
+ var isPrototypeOf = objectIsPrototypeOf;
4117
4191
  var toString$2 = toString$4;
4118
4192
  var defineBuiltInAccessor = defineBuiltInAccessor$2;
4119
4193
  var copyConstructorProperties = copyConstructorProperties$2;
@@ -4129,7 +4203,7 @@ if (DESCRIPTORS && isCallable(NativeSymbol) && (!('description' in SymbolPrototy
4129
4203
  // wrap Symbol constructor for correct work with undefined description
4130
4204
  var SymbolWrapper = function Symbol() {
4131
4205
  var description = arguments.length < 1 || arguments[0] === undefined ? undefined : toString$2(arguments[0]);
4132
- var result = isPrototypeOf$1(SymbolPrototype, this)
4206
+ var result = isPrototypeOf(SymbolPrototype, this)
4133
4207
  ? new NativeSymbol(description)
4134
4208
  // in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'
4135
4209
  : description === undefined ? NativeSymbol() : NativeSymbol(description);
@@ -4152,7 +4226,7 @@ if (DESCRIPTORS && isCallable(NativeSymbol) && (!('description' in SymbolPrototy
4152
4226
  configurable: true,
4153
4227
  get: function description() {
4154
4228
  var symbol = thisSymbolValue(this);
4155
- if (hasOwn$1(EmptyStringDescriptionStore, symbol)) return '';
4229
+ if (hasOwn(EmptyStringDescriptionStore, symbol)) return '';
4156
4230
  var string = symbolDescriptiveString(symbol);
4157
4231
  var desc = NATIVE_SYMBOL ? stringSlice(string, 7, -1) : replace$1(string, regexp, '$1');
4158
4232
  return desc === '' ? undefined : desc;
@@ -4657,63 +4731,6 @@ const OptionGroup = ({
4657
4731
  }));
4658
4732
  };
4659
4733
 
4660
- var anObject$1 = anObject$c;
4661
-
4662
- // `RegExp.prototype.flags` getter implementation
4663
- // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
4664
- var regexpFlags = function () {
4665
- var that = anObject$1(this);
4666
- var result = '';
4667
- if (that.hasIndices) result += 'd';
4668
- if (that.global) result += 'g';
4669
- if (that.ignoreCase) result += 'i';
4670
- if (that.multiline) result += 'm';
4671
- if (that.dotAll) result += 's';
4672
- if (that.unicode) result += 'u';
4673
- if (that.unicodeSets) result += 'v';
4674
- if (that.sticky) result += 'y';
4675
- return result;
4676
- };
4677
-
4678
- var call = functionCall;
4679
- var hasOwn = hasOwnProperty_1;
4680
- var isPrototypeOf = objectIsPrototypeOf;
4681
- var regExpFlags = regexpFlags;
4682
-
4683
- var RegExpPrototype$1 = RegExp.prototype;
4684
-
4685
- var regexpGetFlags = function (R) {
4686
- var flags = R.flags;
4687
- return flags === undefined && !('flags' in RegExpPrototype$1) && !hasOwn(R, 'flags') && isPrototypeOf(RegExpPrototype$1, R)
4688
- ? call(regExpFlags, R) : flags;
4689
- };
4690
-
4691
- var PROPER_FUNCTION_NAME = functionName.PROPER;
4692
- var defineBuiltIn = defineBuiltIn$6;
4693
- var anObject = anObject$c;
4694
- var $toString = toString$4;
4695
- var fails$1 = fails$g;
4696
- var getRegExpFlags = regexpGetFlags;
4697
-
4698
- var TO_STRING = 'toString';
4699
- var RegExpPrototype = RegExp.prototype;
4700
- var nativeToString = RegExpPrototype[TO_STRING];
4701
-
4702
- var NOT_GENERIC = fails$1(function () { return nativeToString.call({ source: 'a', flags: 'b' }) !== '/a/b'; });
4703
- // FF44- RegExp#toString has a wrong name
4704
- var INCORRECT_NAME = PROPER_FUNCTION_NAME && nativeToString.name !== TO_STRING;
4705
-
4706
- // `RegExp.prototype.toString` method
4707
- // https://tc39.es/ecma262/#sec-regexp.prototype.tostring
4708
- if (NOT_GENERIC || INCORRECT_NAME) {
4709
- defineBuiltIn(RegExp.prototype, TO_STRING, function toString() {
4710
- var R = anObject(this);
4711
- var pattern = $toString(R.source);
4712
- var flags = $toString(getRegExpFlags(R));
4713
- return '/' + pattern + '/' + flags;
4714
- }, { unsafe: true });
4715
- }
4716
-
4717
4734
  const InputWrapper = ({
4718
4735
  children,
4719
4736
  unitLabel
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@sebgroup/green-react",
3
- "version": "2.2.1",
3
+ "version": "2.4.0",
4
4
  "peerDependencies": {
5
5
  "react": "^17 || ^18",
6
6
  "react-dom": "^17 || ^18"
7
7
  },
8
8
  "dependencies": {
9
- "@sebgroup/green-core": "^1.0.3",
10
- "@sebgroup/chlorophyll": "^2.2.0",
11
- "@sebgroup/extract": "^2.0.0",
9
+ "@sebgroup/green-core": "^1.1.1",
10
+ "@sebgroup/chlorophyll": "^2.2.1",
11
+ "@sebgroup/extract": "^2.1.0",
12
12
  "classnames": "^2.3.2"
13
13
  },
14
14
  "description": "React components built on top of @sebgroup/chlorophyll.",
@@ -8,6 +8,7 @@ export interface ButtonProps {
8
8
  onClick?: MouseEventHandler<HTMLButtonElement>;
9
9
  disabled?: boolean;
10
10
  size?: ButtonSize;
11
+ testId?: string;
11
12
  }
12
- export declare function Button({ children, variant, onClick, disabled, active, type, size }: ButtonProps): import("react/jsx-runtime").JSX.Element;
13
+ export declare function Button({ children, variant, onClick, disabled, active, type, size, testId }: ButtonProps): import("react/jsx-runtime").JSX.Element;
13
14
  export default Button;
@@ -1,10 +1,13 @@
1
1
  import { ReactNode } from 'react';
2
+ import classNames from 'classnames';
2
3
  export interface GroupProps {
3
4
  children: ReactNode;
4
5
  error?: Error | string;
5
6
  groupBorder?: boolean;
7
+ groupFocus?: boolean;
6
8
  invalid?: boolean;
7
9
  id?: string;
10
+ className?: classNames.Argument;
8
11
  }
9
- export declare function Group({ id, children, error, groupBorder, }: GroupProps): import("react/jsx-runtime").JSX.Element;
12
+ export declare function Group({ id, children, error, className, groupBorder, groupFocus, }: GroupProps): import("react/jsx-runtime").JSX.Element;
10
13
  export default Group;
@@ -2,14 +2,14 @@ import { ReactNode } from 'react';
2
2
  export interface InPageWizardStepCardProps {
3
3
  stepText: string;
4
4
  title: string;
5
- editBtnText: string;
5
+ editBtnText?: string;
6
6
  nextBtnText: string;
7
7
  nextBtnIcon?: ReactNode;
8
8
  stepStatus: WizardStepStatus;
9
9
  hideFooter?: boolean;
10
10
  children: React.ReactNode;
11
11
  onNextClick: () => void;
12
- onEditClick: () => void;
12
+ onEditClick?: () => void;
13
13
  dataTestid?: string;
14
14
  }
15
15
  export declare type WizardStepStatus = 'NotStarted' | 'IsActive' | 'IsComplete';