@mw-kit/mw-ui 1.7.96 → 1.7.98

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.
@@ -14645,7 +14645,7 @@ var HiddenInput = styled.input(_templateObject4$a || (_templateObject4$a = _tagg
14645
14645
 
14646
14646
  var isAvailable = function isAvailable(index, option) {
14647
14647
  return !option.disabled && !(option.rules || []).some(function (rule) {
14648
- return rule(index, option) !== true;
14648
+ return rule(index, option.data) !== true;
14649
14649
  });
14650
14650
  };
14651
14651
 
@@ -14701,7 +14701,9 @@ var useNavigation = function useNavigation(props) {
14701
14701
  }, [highlight, options]);
14702
14702
 
14703
14703
  var onFocus = function onFocus() {
14704
- setHighlight(0);
14704
+ setHighlight(options.findIndex(function (e, i) {
14705
+ return isAvailable(i, e);
14706
+ }));
14705
14707
  };
14706
14708
 
14707
14709
  var onBlur = function onBlur() {
@@ -19430,8 +19432,11 @@ var Close$1 = function Close$1(props) {
19430
19432
  newOptions.splice(index, 1);
19431
19433
  onClose(index, options[index], event);
19432
19434
 
19433
- if (index < active || active === index && active > 0) {
19434
- setActive(active - 1);
19435
+ if (index < active) {
19436
+ setActive(active - 1, newOptions[active - 1].data);
19437
+ } else if (active === index) {
19438
+ var newactive = active > 0 ? active - 1 : active;
19439
+ setActive(newactive, newOptions[newactive].data);
19435
19440
  }
19436
19441
 
19437
19442
  setOptions(newOptions);
@@ -19483,7 +19488,7 @@ var Tabs$1 = function Tabs$1(props) {
19483
19488
  $active: true
19484
19489
  } : {
19485
19490
  onClick: function onClick() {
19486
- return setActive(index);
19491
+ return setActive(index, tab.data);
19487
19492
  }
19488
19493
  }, {
19489
19494
  "$internal": props.internal,