@splunk/react-ui 4.34.0 → 4.35.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.
Files changed (47) hide show
  1. package/Breadcrumbs.js +20 -29
  2. package/Button.js +1 -1
  3. package/CHANGELOG.md +26 -2
  4. package/Card.js +86 -82
  5. package/Chip.js +73 -76
  6. package/CollapsiblePanel.js +1 -1
  7. package/Color.js +23 -15
  8. package/ComboBox.js +3 -2
  9. package/Concertina.js +136 -135
  10. package/ControlGroup.js +27 -23
  11. package/JSONTree.js +66 -64
  12. package/List.js +9 -13
  13. package/MIGRATION.mdx +24 -0
  14. package/Menu.js +352 -345
  15. package/Message.js +16 -19
  16. package/Monogram.js +140 -94
  17. package/Multiselect.js +9 -10
  18. package/ResultsMenu.js +124 -126
  19. package/Search.js +182 -181
  20. package/Select.js +55 -56
  21. package/StepBar.js +91 -87
  22. package/Switch.js +105 -97
  23. package/Table.js +686 -687
  24. package/Text.js +78 -58
  25. package/package.json +6 -6
  26. package/types/src/Breadcrumbs/Breadcrumbs.d.ts +0 -1
  27. package/types/src/Breadcrumbs/Item.d.ts +0 -1
  28. package/types/src/Card/Header.d.ts +0 -2
  29. package/types/src/Chip/Chip.d.ts +2 -4
  30. package/types/src/Color/Color.d.ts +5 -5
  31. package/types/src/ComboBox/Option.d.ts +0 -1
  32. package/types/src/List/List.d.ts +2 -4
  33. package/types/src/Menu/Heading.d.ts +1 -1
  34. package/types/src/Menu/Item.d.ts +7 -5
  35. package/types/src/Menu/Menu.d.ts +13 -16
  36. package/types/src/Menu/docs/examples/Dimmed.d.ts +2 -0
  37. package/types/src/Monogram/Monogram.d.ts +5 -6
  38. package/types/src/Multiselect/Option.d.ts +0 -1
  39. package/types/src/Progress/Progress.d.ts +4 -1
  40. package/types/src/ResultsMenu/ResultsMenu.d.ts +11 -9
  41. package/types/src/ResultsMenu/VirtualizedResultsMenu/VirtualizedResultsMenu.d.ts +3 -5
  42. package/types/src/Search/Option.d.ts +19 -6
  43. package/types/src/Search/docs/examples/OptionsLinks.d.ts +2 -0
  44. package/types/src/Select/Option.d.ts +0 -1
  45. package/types/src/Select/OptionBase.d.ts +2 -3
  46. package/types/src/Table/DragHandle.d.ts +1 -2
  47. package/types/src/Text/Text.d.ts +2 -0
package/ResultsMenu.js CHANGED
@@ -61,7 +61,7 @@
61
61
  e.r(t);
62
62
  // EXPORTS
63
63
  e.d(t, {
64
- VirtualizedResultsMenu: () => /* reexport */ Ae,
64
+ VirtualizedResultsMenu: () => /* reexport */ Re,
65
65
  default: () => /* reexport */ V
66
66
  });
67
67
  // CONCATENATED MODULE: external "react"
@@ -88,21 +88,21 @@
88
88
  var m = e.n(p);
89
89
  // CONCATENATED MODULE: external "styled-components"
90
90
  const h = require("styled-components");
91
- var b = e.n(h);
91
+ var y = e.n(h);
92
92
  // CONCATENATED MODULE: external "@splunk/react-ui/WaitSpinner"
93
- const y = require("@splunk/react-ui/WaitSpinner");
94
- var g = e.n(y);
93
+ const b = require("@splunk/react-ui/WaitSpinner");
94
+ var g = e.n(b);
95
95
  // CONCATENATED MODULE: external "@splunk/themes"
96
96
  const S = require("@splunk/themes");
97
97
  // CONCATENATED MODULE: ./src/ResultsMenu/ResultsMenuStyles.ts
98
- var E = b().div.withConfig({
98
+ var E = y().div.withConfig({
99
99
  displayName: "ResultsMenuStyles__Styled",
100
100
  componentId: "avbhl8-0"
101
101
  })([ "", ";flex-direction:column;max-height:calc(100vh - 20px);", "" ], S.mixins.reset("flex"), (0,
102
102
  S.pick)({
103
103
  prisma: (0, h.css)([ "border-radius:", ";background-color:", ";" ], S.variables.borderRadius, S.variables.backgroundColorPopup)
104
104
  }));
105
- var O = b().div.withConfig({
105
+ var O = y().div.withConfig({
106
106
  displayName: "ResultsMenuStyles__StyledFooter",
107
107
  componentId: "avbhl8-1"
108
108
  })([ "padding:", ";color:", ";", "" ], (0, S.pick)({
@@ -124,7 +124,7 @@
124
124
  enterprise: (0, h.css)([ "border-top:", ";" ], S.variables.border)
125
125
  });
126
126
  }));
127
- var M = b().li.withConfig({
127
+ var M = y().li.withConfig({
128
128
  displayName: "ResultsMenuStyles__StyledLoading",
129
129
  componentId: "avbhl8-2"
130
130
  })([ "", ";padding:", ";gap:", ";" ], S.mixins.reset("flex"), (0, S.pick)({
@@ -134,18 +134,18 @@
134
134
  },
135
135
  enterprise: "6px 10px"
136
136
  }), S.variables.spacingXSmall);
137
- var w = b()(m()).withConfig({
137
+ var w = y()(m()).withConfig({
138
138
  displayName: "ResultsMenuStyles__StyledMenu",
139
139
  componentId: "avbhl8-3"
140
140
  })([ "overflow:auto;flex-direction:column;", "" ], (function(e) {
141
141
  var t = e.$removeBottomRadius;
142
142
  return t && (0, h.css)([ "border-bottom-left-radius:0;border-bottom-right-radius:0;" ]);
143
143
  }));
144
- var x = b()(g()).withConfig({
144
+ var k = y()(g()).withConfig({
145
145
  displayName: "ResultsMenuStyles__StyledWait",
146
146
  componentId: "avbhl8-4"
147
147
  })([ "flex:0 0 auto;" ]);
148
- var k = b().div.withConfig({
148
+ var x = y().div.withConfig({
149
149
  displayName: "ResultsMenuStyles__StyledLoadingMessage",
150
150
  componentId: "avbhl8-5"
151
151
  })([ "flex:1 0 0;color:", ";" ], (0, S.pick)({
@@ -185,8 +185,8 @@
185
185
  }
186
186
  return T(e);
187
187
  }
188
- function C() {
189
- C = Object.assign || function(e) {
188
+ function I() {
189
+ I = Object.assign || function(e) {
190
190
  for (var t = 1; t < arguments.length; t++) {
191
191
  var r = arguments[t];
192
192
  for (var n in r) {
@@ -197,14 +197,14 @@
197
197
  }
198
198
  return e;
199
199
  };
200
- return C.apply(this, arguments);
200
+ return I.apply(this, arguments);
201
201
  }
202
- function I(e, t) {
202
+ function P(e, t) {
203
203
  if (!(e instanceof t)) {
204
204
  throw new TypeError("Cannot call a class as a function");
205
205
  }
206
206
  }
207
- function P(e, t) {
207
+ function C(e, t) {
208
208
  for (var r = 0; r < t.length; r++) {
209
209
  var n = t[r];
210
210
  n.enumerable = n.enumerable || false;
@@ -214,8 +214,8 @@
214
214
  }
215
215
  }
216
216
  function R(e, t, r) {
217
- if (t) P(e.prototype, t);
218
- if (r) P(e, r);
217
+ if (t) C(e.prototype, t);
218
+ if (r) C(e, r);
219
219
  return e;
220
220
  }
221
221
  function A(e, t) {
@@ -296,10 +296,9 @@
296
296
  var N = {
297
297
  animateLoading: i().bool,
298
298
  children: i().node,
299
- /** @private */
300
- controlledExternally: i().bool,
301
299
  childrenStart: i().node,
302
300
  elementRef: i().oneOfType([ i().func, i().object ]),
301
+ focusMode: i().oneOf([ "roving", "normal", "never" ]),
303
302
  footerMessage: i().node,
304
303
  isLoading: i().bool,
305
304
  loadingMessage: i().node,
@@ -307,16 +306,15 @@
307
306
  onScroll: i().func,
308
307
  onScrollBottom: i().func,
309
308
  placement: i().string,
310
- menuId: i().string,
311
- disableFocusControl: i().bool
309
+ menuId: i().string
312
310
  };
313
- var z = {
311
+ var U = {
314
312
  animateLoading: false,
315
313
  isLoading: false,
316
314
  loadingMessage: (0, d._)("Loading..."),
317
315
  noOptionsMessage: (0, d._)("No matches")
318
316
  };
319
- var U = c()((function(e) {
317
+ var z = c()((function(e) {
320
318
  return {
321
319
  height: e
322
320
  };
@@ -327,7 +325,7 @@
327
325
  var t = L(o);
328
326
  function o(e) {
329
327
  var n;
330
- I(this, o);
328
+ P(this, o);
331
329
  n = t.call(this, e);
332
330
  D(q(n), "scrollBottomOffset", void 0);
333
331
  D(q(n), "itemMinHeight", void 0);
@@ -395,7 +393,7 @@
395
393
  D(q(n), "createMenuContextValue", (function() {
396
394
  return {
397
395
  role: "listbox",
398
- preventFocus: n.props.controlledExternally
396
+ preventFocus: n.props.focusMode === "never"
399
397
  };
400
398
  }));
401
399
  n.state = {
@@ -453,38 +451,38 @@
453
451
  }, {
454
452
  key: "render",
455
453
  value: function e() {
456
- var t = this.props, i = t.animateLoading, u = t.children, l = t.controlledExternally, c = t.childrenStart, s = t.isLoading, d = t.loadingMessage, v = t.noOptionsMessage, h = t.onScrollBottom, b = t.placement, y = t.style, g = t.tabIndex, S = t.menuId, O = t.disableFocusControl, j = t["aria-multiselectable"];
457
- var T = f()(this.props, a()(o.propTypes));
454
+ var t = this.props, i = t.animateLoading, u = t.children, l = t.childrenStart, c = t.focusMode, s = t.isLoading, d = t.loadingMessage, v = t.noOptionsMessage, h = t.onScrollBottom, y = t.placement, b = t.style, g = t.tabIndex, S = t.menuId, O = t["aria-multiselectable"];
455
+ var j = f()(this.props, a()(o.propTypes));
458
456
  // Assumption: that you cannot be filtered if you are a result
459
- var I = r.Children.toArray(u).filter(r.isValidElement).some((function(e) {
457
+ var T = r.Children.toArray(u).filter(r.isValidElement).some((function(e) {
460
458
  var t = e.type;
461
459
  return !(t === p.Divider && t.filterFirst || (t === p.Divider || t === p.Heading) && (t.filterLast || t.filterConsecutive));
462
460
  }));
463
461
  var P = this.checkFullHeight();
464
- var R = U(this.state.scrollBottomTriggered ? this.state.numberOfItemsLoaded * this.itemMinHeight || 0 : 0);
462
+ var C = z(this.state.scrollBottomTriggered ? this.state.numberOfItemsLoaded * this.itemMinHeight || 0 : 0);
465
463
  /* eslint-disable jsx-a11y/aria-role */
466
- return n().createElement(E, C({
464
+ return n().createElement(E, I({
465
+ "data-test": "results-menu",
467
466
  key: "wrapper",
468
467
  ref: this.handleMount,
469
468
  onWheel: h ? this.handleWheelMenu : undefined,
470
469
  onMouseEnter: h ? this.handleMouseEnter : undefined,
471
470
  onMouseLeave: h ? this.handleMouseLeave : undefined
472
- }, f()(T, "tabIndex", "aria-multiselectable", "menuId"), {
473
- style: y
474
- }), b !== "above" && c, b === "above" && this.renderFooterMessage(), n().createElement(p.MenuContext.Provider, {
471
+ }, f()(j, "tabIndex", "aria-multiselectable", "menuId"), {
472
+ style: b
473
+ }), y !== "above" && l, y === "above" && this.renderFooterMessage(), n().createElement(p.MenuContext.Provider, {
475
474
  value: this.createMenuContextValue()
476
475
  }, n().createElement(w, {
477
476
  key: "menu",
478
- controlledExternally: l,
479
477
  elementRef: this.handleMenuMount,
480
478
  onScroll: this.handleScroll,
481
479
  stopScrollPropagation: true,
482
480
  tabIndex: g,
483
- "aria-multiselectable": j,
481
+ "aria-multiselectable": O,
484
482
  id: S,
485
- disableFocusControl: O,
486
- $removeBottomRadius: !!this.props.footerMessage && b !== "above"
487
- }, !I && v && !s && n().createElement(m().Item, {
483
+ focusMode: c,
484
+ $removeBottomRadius: !!this.props.footerMessage && y !== "above"
485
+ }, !T && v && !s && n().createElement(m().Item, {
488
486
  "data-test": "no-results-message",
489
487
  disabled: true
490
488
  }, v), u, h && !P &&
@@ -492,14 +490,14 @@
492
490
  // Bottom spacer fills in the space of new items being loaded by using the minimum possible height x menuItems.
493
491
  n().createElement("div", {
494
492
  "data-test": "results-menu-bottom-spacer",
495
- style: R
496
- }), s && n().createElement(M, null, i && n().createElement(x, null), n().createElement(k, null, d)))), b !== "above" && this.renderFooterMessage(), b === "above" && c);
493
+ style: C
494
+ }), s && n().createElement(M, null, i && n().createElement(k, null), n().createElement(x, null, d)))), y !== "above" && this.renderFooterMessage(), y === "above" && l);
497
495
  }
498
496
  } ]);
499
497
  return o;
500
498
  }(r.Component);
501
499
  D($, "propTypes", N);
502
- D($, "defaultProps", z);
500
+ D($, "defaultProps", U);
503
501
  /* harmony default export */ const V = $;
504
502
  // CONCATENATED MODULE: external "@splunk/ui-utils/keyboard"
505
503
  const W = require("@splunk/ui-utils/keyboard");
@@ -734,7 +732,7 @@
734
732
  if (Array.isArray(e)) return he(e);
735
733
  }
736
734
  function ve(e, t) {
737
- return ye(e) || be(e, t) || me(e, t) || pe();
735
+ return be(e) || ye(e, t) || me(e, t) || pe();
738
736
  }
739
737
  function pe() {
740
738
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
@@ -754,7 +752,7 @@
754
752
  }
755
753
  return n;
756
754
  }
757
- function be(e, t) {
755
+ function ye(e, t) {
758
756
  if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(e))) return;
759
757
  var r = [];
760
758
  var n = true;
@@ -777,7 +775,7 @@
777
775
  }
778
776
  return r;
779
777
  }
780
- function ye(e) {
778
+ function be(e) {
781
779
  if (Array.isArray(e)) return e;
782
780
  }
783
781
  function ge(e, t) {
@@ -849,11 +847,8 @@
849
847
  return e;
850
848
  }
851
849
  var we = Oe(Oe({}, f()(N, "onDownKeyPress", "onEndKeyPress", "onHomeKeyPress", "onUpKeyPress")), {}, {
852
- virtualization: i().number.isRequired
850
+ virtualization: i().number
853
851
  });
854
- var xe = {
855
- virtualization: 0
856
- };
857
852
  var ke = [];
858
853
  /**
859
854
  * A wrapper for `ResultsMenu` which virtualizes the `children`. The received `children` array will be split into **"panes"** each with `virtualization` entries
@@ -873,33 +868,37 @@
873
868
  * @throws in `__DEV__` when `virtualization` is too small as compared to the menu height (`virtualization` must be greater than the number of visible items in the rendered menu)
874
869
  * @throws in `__DEV__` when `virtualization` is less than or equal to 1 (`virtualization` must be ≥ 2)
875
870
  * @throws in `__DEV__` when `virtualization` is changed during the lifecycle of the `VirtualizedResultsMenu` component
876
- */ function je(e) {
877
- var t = e.virtualization, o = e.elementRef, i = e.children, u = ge(e, [ "virtualization", "elementRef", "children" ]);
871
+ */ function xe(e) {
872
+ var t = e.virtualization, o = t === void 0 ? 2 : t, i = e.elementRef, u = e.children, a = ge(e, [ "virtualization", "elementRef", "children" ]);
878
873
  // @docs-props-type VirtualizedResultsMenuPropsBase
879
- // If a user tries to set virtualization to a value smaller than the number of options
874
+ var l = (0, r.useRef)(o);
875
+ // If a user tries to set virtualization to a value smaller than the number of options
880
876
  // visible at a given moment then the menu will flicker endlessly. This state is set in
881
877
  // the IntersectionObserver to fix the issue, but in `__DEV__` an error is thrown.
882
- var a = (0, r.useState)(t), l = ve(a, 2), c = l[0], s = l[1];
878
+ var c = (0, r.useState)(o), s = ve(c, 2), f = s[0], d = s[1];
879
+ (0, r.useEffect)((function() {
880
+ if (false) {}
881
+ }), [ o ]);
883
882
  // `useRef` will recompute its initial value every render cycle.
884
883
  // To avoid the array processing we can provide an initialization function to useState and init the ref with the result
885
- var f = (0, r.useState)((function() {
886
- return X(i, c);
887
- })), d = ve(f, 1), v = d[0];
884
+ var v = (0, r.useState)((function() {
885
+ return X(u, f);
886
+ })), p = ve(v, 1), m = p[0];
888
887
  // NOSONAR
889
888
  // `windowPanes` is an array of arrays, each of length `virtualization`. Each "pane" is just a subset of
890
889
  // `children` which will be rendered in a chunk, and at most 3 of these panes will render at any given time.
891
- var p = (0, r.useRef)(v);
892
- var m = (0, r.useRef)(0);
893
- var h = (0, r.useRef)(null);
890
+ var h = (0, r.useRef)(m);
891
+ var y = (0, r.useRef)(0);
892
+ var b = (0, r.useRef)(null);
894
893
  // An IntersectionObserver is used to detect when pane changes are needed.
895
894
  // When loadPrevPaneRef or loadNextPaneRef entries intersect the menu, the currentPaneId will be updated.
896
- var b = (0, r.useRef)();
897
- var y = (0, r.useRef)(ke);
898
- var g = (0, r.useRef)(ke);
899
- var S = (0, r.useCallback)((function() {
895
+ var g = (0, r.useRef)();
896
+ var S = (0, r.useRef)(ke);
897
+ var E = (0, r.useRef)(ke);
898
+ var O = (0, r.useCallback)((function() {
900
899
  var e;
901
- var t = p.current, r = t === void 0 ? [] : t;
902
- var n = m.current;
900
+ var t = h.current, r = t === void 0 ? [] : t;
901
+ var n = y.current;
903
902
  /**
904
903
  * create onMount for an child of the menu which will be used to trigger pane
905
904
  * changes upon intersection with the menu's visible bounds
@@ -910,7 +909,7 @@
910
909
  return;
911
910
  }
912
911
  t.current.push(e);
913
- (r = b.current) === null || r === void 0 ? void 0 : r.observe(e);
912
+ (r = g.current) === null || r === void 0 ? void 0 : r.observe(e);
914
913
  };
915
914
  };
916
915
  /**
@@ -920,59 +919,59 @@
920
919
  if (!t) {
921
920
  return;
922
921
  }
923
- var n = g.current.indexOf(t);
922
+ var n = E.current.indexOf(t);
924
923
  if (n >= 0) {
925
- g.current.splice(n, 1);
924
+ E.current.splice(n, 1);
926
925
  }
927
- var o = y.current.indexOf(t);
926
+ var o = S.current.indexOf(t);
928
927
  if (o) {
929
- y.current.splice(o, 1);
928
+ S.current.splice(o, 1);
930
929
  }
931
- (r = b.current) === null || r === void 0 ? void 0 : r.unobserve(t);
930
+ (r = g.current) === null || r === void 0 ? void 0 : r.unobserve(t);
932
931
  };
933
- return [].concat(ce(ae(r[n - 1], o(g), i, {
932
+ return [].concat(ce(ae(r[n - 1], o(E), i, {
934
933
  trackFirstElement: true
935
- })), ce((e = r[n]) !== null && e !== void 0 ? e : []), ce(ae(r[n + 1], o(y), i, {
934
+ })), ce((e = r[n]) !== null && e !== void 0 ? e : []), ce(ae(r[n + 1], o(S), i, {
936
935
  trackLastElement: true
937
936
  })));
938
937
  }), []);
939
- var E = (0, r.useState)(S), O = ve(E, 2), M = O[0], w = O[1];
940
- var x = (0, r.useCallback)((function(e) {
941
- var t = m.current;
942
- m.current = Math.max(0, Math.min(e, p.current.length - 1));
943
- if (t === m.current) {
938
+ var M = (0, r.useState)(O), w = ve(M, 2), k = w[0], x = w[1];
939
+ var T = (0, r.useCallback)((function(e) {
940
+ var t = y.current;
941
+ y.current = Math.max(0, Math.min(e, h.current.length - 1));
942
+ if (t === y.current) {
944
943
  // no change in current pane
945
944
  return;
946
945
  }
947
- w(S);
948
- }), [ S ]);
946
+ x(O);
947
+ }), [ O ]);
949
948
  // Link an IntersectionObserver instance with the menu children to be observed
950
- var k = (0, r.useCallback)((function(e) {
949
+ var I = (0, r.useCallback)((function(e) {
951
950
  var t;
952
- j(o, e);
953
- h.current = e;
951
+ j(i, e);
952
+ b.current = e;
954
953
  // This is overly defensive and could probably be removed
955
- (t = b.current) === null || t === void 0 ? void 0 : t.disconnect();
954
+ (t = g.current) === null || t === void 0 ? void 0 : t.disconnect();
956
955
  if (!e) {
957
956
  return;
958
957
  }
959
- g.current = [];
960
- y.current = [];
958
+ E.current = [];
959
+ S.current = [];
961
960
  // Run the observation flow
962
- b.current = new IntersectionObserver((function(t) {
961
+ g.current = new IntersectionObserver((function(t) {
963
962
  var r;
964
- var n = m.current;
963
+ var n = y.current;
965
964
  var o = e.firstElementChild;
966
965
  if (!!o && o.scrollHeight < e.clientHeight) {
967
966
  var i;
968
967
  // If the first element doesn't require a scrollbar then it's likely a filter input
969
968
  o = (i = o) === null || i === void 0 ? void 0 : i.nextElementSibling;
970
969
  }
971
- if (((r = o) === null || r === void 0 ? void 0 : r.scrollTop) === 0 && n === 0 && p.current.length > 1 && t.some((function(e) {
970
+ if (((r = o) === null || r === void 0 ? void 0 : r.scrollTop) === 0 && n === 0 && h.current.length > 1 && t.some((function(e) {
972
971
  return e.isIntersecting;
973
972
  }))) {
974
973
  // The menu hasn't scrolled, is on pane 0, and already has an intersection, the `virtualization` prop is too small
975
- s((function(e) {
974
+ d((function(e) {
976
975
  return e + 10;
977
976
  }));
978
977
  if (false) {}
@@ -984,20 +983,20 @@
984
983
  // don't process if the pane changed or the entry isn't intersecting
985
984
  return;
986
985
  }
987
- if (g.current.includes(e.target)) {
986
+ if (E.current.includes(e.target)) {
988
987
  u = true;
989
- x(n - 1);
990
- } else if (y.current.includes(e.target)) {
988
+ T(n - 1);
989
+ } else if (S.current.includes(e.target)) {
991
990
  u = true;
992
- x(n + 1);
991
+ T(n + 1);
993
992
  }
994
993
  }));
995
994
  }), {
996
995
  root: e
997
996
  });
998
- }), [ o, x ]);
999
- var T = (0, r.useCallback)((function(e) {
1000
- var t = h.current;
997
+ }), [ i, T ]);
998
+ var P = (0, r.useCallback)((function(e) {
999
+ var t = b.current;
1001
1000
  if (!t) {
1002
1001
  return;
1003
1002
  }
@@ -1005,8 +1004,8 @@
1005
1004
  var r = (0, W.keycode)(e);
1006
1005
  if (r === "home") {
1007
1006
  var n;
1008
- if (m.current !== 0) {
1009
- x(0);
1007
+ if (y.current !== 0) {
1008
+ T(0);
1010
1009
  }
1011
1010
  var o = (0, K.getSortedTabbableElements)(t, {
1012
1011
  ignoreTabIndex: true
@@ -1015,11 +1014,11 @@
1015
1014
  i === null || i === void 0 ? void 0 : (n = i.focus) === null || n === void 0 ? void 0 : n.call(i);
1016
1015
  return;
1017
1016
  }
1018
- var u = p.current.length - 1;
1017
+ var u = h.current.length - 1;
1019
1018
  if (r === "end") {
1020
1019
  var a;
1021
- if (m.current !== u) {
1022
- x(u);
1020
+ if (y.current !== u) {
1021
+ T(u);
1023
1022
  }
1024
1023
  var l = (0, K.getSortedTabbableElements)(t, {
1025
1024
  ignoreTabIndex: true
@@ -1034,51 +1033,50 @@
1034
1033
  var f = (e === null || e === void 0 ? void 0 : e.target) instanceof Element ? e.target : null;
1035
1034
  var d = t === null || t === void 0 ? void 0 : t.querySelector(":focus");
1036
1035
  var v = f || d;
1037
- var b = v ? s.indexOf(v) : -1;
1038
- (0, K.handleFocus)(r, s, b, {
1036
+ var p = v ? s.indexOf(v) : -1;
1037
+ (0, K.handleFocus)(r, s, p, {
1039
1038
  enableLoop: false,
1040
1039
  // VirtualizedResultsMenu does not support looping focus
1041
1040
  orientation: "vertical",
1042
1041
  enableTab: false,
1043
1042
  enableHomeEnd: false
1044
1043
  });
1045
- }), [ x ]);
1044
+ }), [ T ]);
1046
1045
  (0, r.useEffect)((function() {
1047
- s((function(e) {
1046
+ d((function(e) {
1048
1047
  if (false) {}
1049
- return t;
1048
+ return o;
1050
1049
  }));
1051
- }), [ t ]);
1050
+ }), [ o ]);
1052
1051
  (0, r.useEffect)((function() {
1053
- p.current = X(i, c);
1054
- w(S);
1055
- }), [ i, c, S ]);
1052
+ h.current = X(u, f);
1053
+ x(O);
1054
+ }), [ u, f, O ]);
1056
1055
  (0, r.useEffect)((function() {
1057
1056
  return function() {
1058
1057
  var e;
1059
- return (e = b.current) === null || e === void 0 ? void 0 : e.disconnect();
1058
+ return (e = g.current) === null || e === void 0 ? void 0 : e.disconnect();
1060
1059
  };
1061
1060
  }), []);
1062
1061
  (0, r.useEffect)((function() {
1063
- var e = h.current;
1062
+ var e = b.current;
1064
1063
  if (e) {
1065
- e.addEventListener("keydown", T);
1064
+ e.addEventListener("keydown", P);
1066
1065
  }
1067
1066
  return function() {
1068
- e === null || e === void 0 ? void 0 : e.removeEventListener("keydown", T);
1067
+ e === null || e === void 0 ? void 0 : e.removeEventListener("keydown", P);
1069
1068
  };
1070
- }), [ T ]);
1069
+ }), [ P ]);
1071
1070
 
1072
1071
  return n().createElement(V, le({
1073
- elementRef: k,
1074
- disableFocusControl: true
1075
- }, u), M);
1072
+ elementRef: I,
1073
+ focusMode: "normal"
1074
+ }, a), k);
1076
1075
  }
1077
- je.propTypes = we;
1078
- je.defaultProps = xe;
1076
+ xe.propTypes = we;
1079
1077
  // CONCATENATED MODULE: ./src/utils/ssrDocument.ts
1080
1078
  /* eslint-disable @typescript-eslint/no-empty-function */
1081
- var Te = {
1079
+ var je = {
1082
1080
  body: {
1083
1081
  appendChild: function e() {
1084
1082
  return [];
@@ -1132,14 +1130,14 @@
1132
1130
  search: ""
1133
1131
  }
1134
1132
  };
1135
- function Ce() {
1136
- var e = typeof document !== "undefined" ? document : Te;
1133
+ function Te() {
1134
+ var e = typeof document !== "undefined" ? document : je;
1137
1135
  return e;
1138
1136
  }
1139
1137
  // CONCATENATED MODULE: ./src/utils/ssrWindow.ts
1140
1138
  /* eslint-disable @typescript-eslint/no-empty-function */
1141
1139
  var Ie = {
1142
- document: Te,
1140
+ document: je,
1143
1141
  navigator: {
1144
1142
  userAgent: ""
1145
1143
  },
@@ -1199,8 +1197,8 @@
1199
1197
  }
1200
1198
  // CONCATENATED MODULE: ./src/ResultsMenu/VirtualizedResultsMenu/index.ts
1201
1199
  // In environments without IntersectionObserver support this should just export ResultsMenu
1202
- var Re = "IntersectionObserver" in Pe() ? je : V;
1203
- /* harmony default export */ const Ae = Re;
1200
+ var Ce = "IntersectionObserver" in Pe() ? xe : V;
1201
+ /* harmony default export */ const Re = Ce;
1204
1202
  // CONCATENATED MODULE: ./src/ResultsMenu/index.ts
1205
1203
  module.exports = t;
1206
1204
  /******/})();