@bigbinary/neetoui 5.0.5 → 5.0.6

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/formik.js CHANGED
@@ -17067,7 +17067,7 @@ var hyphenize = function hyphenize(string) {
17067
17067
  var renderFocusOnFocusableElements = function renderFocusOnFocusableElements(ref) {
17068
17068
  var _ref$current, _ref$current2;
17069
17069
  var shouldFocusFirstFocusableElement = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
17070
- var focusableElements = 'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])';
17070
+ var focusableElements = '[href], input, select, textarea, [tabindex]:not([tabindex="-1"])';
17071
17071
  var firstFocusableElement = ref === null || ref === void 0 ? void 0 : (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.querySelectorAll(focusableElements)[0];
17072
17072
  var focusableContent = ref === null || ref === void 0 ? void 0 : (_ref$current2 = ref.current) === null || _ref$current2 === void 0 ? void 0 : _ref$current2.querySelectorAll(focusableElements);
17073
17073
  var lastFocusableElement = focusableContent[(focusableContent === null || focusableContent === void 0 ? void 0 : focusableContent.length) - 1];
@@ -17129,12 +17129,12 @@ var useOverlay = function useOverlay(_ref) {
17129
17129
  var focusRequiredElementInOverlay = function focusRequiredElementInOverlay() {
17130
17130
  if (hasTransitionCompleted) {
17131
17131
  var _initialFocusRef;
17132
- if (!((_initialFocusRef = initialFocusRef) !== null && _initialFocusRef !== void 0 && _initialFocusRef.current)) {
17133
- renderFocusOnFocusableElements(overlayWrapper);
17134
- } else {
17132
+ if ((_initialFocusRef = initialFocusRef) !== null && _initialFocusRef !== void 0 && _initialFocusRef.current) {
17135
17133
  var _initialFocusRef2, _initialFocusRef2$cur;
17136
17134
  (_initialFocusRef2 = initialFocusRef) === null || _initialFocusRef2 === void 0 ? void 0 : (_initialFocusRef2$cur = _initialFocusRef2.current) === null || _initialFocusRef2$cur === void 0 ? void 0 : _initialFocusRef2$cur.focus();
17137
17135
  renderFocusOnFocusableElements(overlayWrapper, false);
17136
+ } else {
17137
+ renderFocusOnFocusableElements(overlayWrapper);
17138
17138
  }
17139
17139
  }
17140
17140
  };