@splunk/react-ui 4.32.0 → 4.34.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 (80) hide show
  1. package/Button.js +59 -65
  2. package/ButtonGroup.js +20 -23
  3. package/ButtonSimple.js +374 -339
  4. package/CHANGELOG.md +54 -0
  5. package/Card.js +56 -44
  6. package/Chip.js +2 -6
  7. package/Clickable.js +21 -19
  8. package/CollapsiblePanel.js +281 -264
  9. package/Color.js +88 -86
  10. package/Concertina.js +7 -7
  11. package/ControlGroup.js +18 -18
  12. package/DualListbox.js +8 -11
  13. package/File.js +25 -30
  14. package/FormRows.js +232 -210
  15. package/Image.js +13 -13
  16. package/JSONTree.js +22 -22
  17. package/MIGRATION.mdx +99 -0
  18. package/Markdown.js +12 -12
  19. package/Menu.js +505 -719
  20. package/Message.js +205 -204
  21. package/MessageBar.js +104 -104
  22. package/Modal.js +158 -133
  23. package/Multiselect.js +81 -70
  24. package/Paginator.js +8 -8
  25. package/Popover.js +53 -54
  26. package/Progress.js +45 -46
  27. package/RadioBar.js +117 -115
  28. package/RadioList.js +8 -5
  29. package/ResultsMenu.js +256 -261
  30. package/Search.js +21 -24
  31. package/Select.js +265 -246
  32. package/Slider.js +9 -9
  33. package/SplitButton.js +1 -4
  34. package/StaticContent.js +1 -1
  35. package/StepBar.js +1 -1
  36. package/Switch.js +169 -171
  37. package/TabBar.js +14 -6
  38. package/Table.js +65 -67
  39. package/Text.js +30 -37
  40. package/TextArea.js +162 -163
  41. package/Tooltip.js +1 -1
  42. package/package.json +9 -9
  43. package/stubs-splunkui.d.ts +11 -0
  44. package/types/src/Button/Button.d.ts +4 -4
  45. package/types/src/ButtonSimple/ButtonSimple.d.ts +8 -6
  46. package/types/src/ButtonSimple/mixin.d.ts +2 -2
  47. package/types/src/Card/Card.d.ts +3 -1
  48. package/types/src/Card/Header.d.ts +22 -3
  49. package/types/src/Clickable/Clickable.d.ts +3 -2
  50. package/types/src/CollapsiblePanel/CollapsiblePanel.d.ts +5 -0
  51. package/types/src/CollapsiblePanel/icons/ExpandPanel.d.ts +1 -3
  52. package/types/src/Date/Date.d.ts +2 -2
  53. package/types/src/Menu/Item.d.ts +3 -1
  54. package/types/src/Menu/Menu.d.ts +16 -21
  55. package/types/src/Menu/MenuContext.d.ts +3 -2
  56. package/types/src/Number/Number.d.ts +2 -2
  57. package/types/src/RadioBar/Option.d.ts +4 -1
  58. package/types/src/RadioBar/RadioBar.d.ts +6 -4
  59. package/types/src/RadioBar/docs/examples/MenuBar.d.ts +2 -0
  60. package/types/src/ResultsMenu/ResultsMenu.d.ts +5 -22
  61. package/types/src/Select/Select.d.ts +8 -4
  62. package/types/src/Select/SelectBase.d.ts +8 -4
  63. package/types/src/Slider/Slider.d.ts +2 -2
  64. package/types/src/Table/Body.d.ts +0 -4
  65. package/types/src/Text/docs/examples/Basic.d.ts +1 -9
  66. package/types/src/Text/docs/examples/Error.d.ts +2 -10
  67. package/types/src/Text/docs/examples/Inline.d.ts +1 -9
  68. package/types/src/Text/docs/examples/Multiline.d.ts +1 -9
  69. package/types/src/Text/docs/examples/Password.d.ts +1 -9
  70. package/types/src/Text/docs/examples/Search.d.ts +1 -9
  71. package/useRovingFocus.js +26 -40
  72. package/types/src/Button/docs/examples/prisma/Basic.d.ts +0 -2
  73. package/types/src/Button/docs/examples/prisma/Block.d.ts +0 -2
  74. package/types/src/Button/docs/examples/prisma/Disabled.d.ts +0 -2
  75. package/types/src/Button/docs/examples/prisma/Icons.d.ts +0 -2
  76. package/types/src/Button/docs/examples/prisma/Menus.d.ts +0 -2
  77. package/types/src/Button/docs/examples/prisma/To.d.ts +0 -2
  78. package/types/src/Button/docs/examples/prisma/Truncated.d.ts +0 -2
  79. package/types/src/Select/docs/examples/prisma/Appearance.d.ts +0 -14
  80. /package/types/src/{Button/docs/examples/prisma → Clickable/docs/examples}/Dimmed.d.ts +0 -0
package/ResultsMenu.js CHANGED
@@ -61,8 +61,8 @@
61
61
  e.r(t);
62
62
  // EXPORTS
63
63
  e.d(t, {
64
- VirtualizedResultsMenu: () => /* reexport */ Le,
65
- default: () => /* reexport */ $
64
+ VirtualizedResultsMenu: () => /* reexport */ Ae,
65
+ default: () => /* reexport */ V
66
66
  });
67
67
  // CONCATENATED MODULE: external "react"
68
68
  const r = require("react");
@@ -82,27 +82,27 @@
82
82
  // CONCATENATED MODULE: external "@splunk/ui-utils/i18n"
83
83
  const d = require("@splunk/ui-utils/i18n");
84
84
  // CONCATENATED MODULE: external "@splunk/ui-utils/userAgent"
85
- const p = require("@splunk/ui-utils/userAgent");
85
+ const v = require("@splunk/ui-utils/userAgent");
86
86
  // CONCATENATED MODULE: external "@splunk/react-ui/Menu"
87
- const v = require("@splunk/react-ui/Menu");
88
- var m = e.n(v);
87
+ const p = require("@splunk/react-ui/Menu");
88
+ var m = e.n(p);
89
89
  // CONCATENATED MODULE: external "styled-components"
90
- const y = require("styled-components");
91
- var h = e.n(y);
90
+ const h = require("styled-components");
91
+ var b = e.n(h);
92
92
  // CONCATENATED MODULE: external "@splunk/react-ui/WaitSpinner"
93
- const b = require("@splunk/react-ui/WaitSpinner");
94
- var g = e.n(b);
93
+ const y = require("@splunk/react-ui/WaitSpinner");
94
+ var g = e.n(y);
95
95
  // CONCATENATED MODULE: external "@splunk/themes"
96
96
  const S = require("@splunk/themes");
97
97
  // CONCATENATED MODULE: ./src/ResultsMenu/ResultsMenuStyles.ts
98
- var O = h().div.withConfig({
98
+ var E = b().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
- prisma: (0, y.css)([ "border-radius:", ";background-color:", ";" ], S.variables.borderRadius, S.variables.backgroundColorPopup)
103
+ prisma: (0, h.css)([ "border-radius:", ";background-color:", ";" ], S.variables.borderRadius, S.variables.backgroundColorPopup)
104
104
  }));
105
- var E = h().div.withConfig({
105
+ var O = b().div.withConfig({
106
106
  displayName: "ResultsMenuStyles__StyledFooter",
107
107
  componentId: "avbhl8-1"
108
108
  })([ "padding:", ";color:", ";", "" ], (0, S.pick)({
@@ -117,14 +117,14 @@
117
117
  }), (function(e) {
118
118
  var t = e.$placement;
119
119
  return t === "above" ? (0, S.pick)({
120
- prisma: (0, y.css)([ "border-bottom:1px solid ", ";" ], S.variables.neutral200),
121
- enterprise: (0, y.css)([ "border-bottom:", ";" ], S.variables.border)
120
+ prisma: (0, h.css)([ "border-bottom:1px solid ", ";" ], S.variables.neutral200),
121
+ enterprise: (0, h.css)([ "border-bottom:", ";" ], S.variables.border)
122
122
  }) : (0, S.pick)({
123
- prisma: (0, y.css)([ "border-top:1px solid ", ";" ], S.variables.neutral200),
124
- enterprise: (0, y.css)([ "border-top:", ";" ], S.variables.border)
123
+ prisma: (0, h.css)([ "border-top:1px solid ", ";" ], S.variables.neutral200),
124
+ enterprise: (0, h.css)([ "border-top:", ";" ], S.variables.border)
125
125
  });
126
126
  }));
127
- var M = h().li.withConfig({
127
+ var M = b().li.withConfig({
128
128
  displayName: "ResultsMenuStyles__StyledLoading",
129
129
  componentId: "avbhl8-2"
130
130
  })([ "", ";padding:", ";gap:", ";" ], S.mixins.reset("flex"), (0, S.pick)({
@@ -134,15 +134,18 @@
134
134
  },
135
135
  enterprise: "6px 10px"
136
136
  }), S.variables.spacingXSmall);
137
- var w = h()(m()).withConfig({
137
+ var w = b()(m()).withConfig({
138
138
  displayName: "ResultsMenuStyles__StyledMenu",
139
139
  componentId: "avbhl8-3"
140
- })([ "overflow:auto;flex-direction:column;" ]);
141
- var P = h()(g()).withConfig({
140
+ })([ "overflow:auto;flex-direction:column;", "" ], (function(e) {
141
+ var t = e.$removeBottomRadius;
142
+ return t && (0, h.css)([ "border-bottom-left-radius:0;border-bottom-right-radius:0;" ]);
143
+ }));
144
+ var x = b()(g()).withConfig({
142
145
  displayName: "ResultsMenuStyles__StyledWait",
143
146
  componentId: "avbhl8-4"
144
147
  })([ "flex:0 0 auto;" ]);
145
- var x = h().div.withConfig({
148
+ var k = b().div.withConfig({
146
149
  displayName: "ResultsMenuStyles__StyledLoadingMessage",
147
150
  componentId: "avbhl8-5"
148
151
  })([ "flex:1 0 0;color:", ";" ], (0, S.pick)({
@@ -169,21 +172,21 @@
169
172
  }
170
173
  }
171
174
  // CONCATENATED MODULE: ./src/ResultsMenu/ResultsMenu.tsx
172
- function k(e) {
175
+ function T(e) {
173
176
  "@babel/helpers - typeof";
174
177
  if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
175
- k = function e(t) {
178
+ T = function e(t) {
176
179
  return typeof t;
177
180
  };
178
181
  } else {
179
- k = function e(t) {
182
+ T = function e(t) {
180
183
  return t && typeof Symbol === "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
181
184
  };
182
185
  }
183
- return k(e);
186
+ return T(e);
184
187
  }
185
- function I() {
186
- I = Object.assign || function(e) {
188
+ function C() {
189
+ C = Object.assign || function(e) {
187
190
  for (var t = 1; t < arguments.length; t++) {
188
191
  var r = arguments[t];
189
192
  for (var n in r) {
@@ -194,14 +197,14 @@
194
197
  }
195
198
  return e;
196
199
  };
197
- return I.apply(this, arguments);
200
+ return C.apply(this, arguments);
198
201
  }
199
- function R(e, t) {
202
+ function I(e, t) {
200
203
  if (!(e instanceof t)) {
201
204
  throw new TypeError("Cannot call a class as a function");
202
205
  }
203
206
  }
204
- function T(e, t) {
207
+ function P(e, t) {
205
208
  for (var r = 0; r < t.length; r++) {
206
209
  var n = t[r];
207
210
  n.enumerable = n.enumerable || false;
@@ -210,9 +213,9 @@
210
213
  Object.defineProperty(e, n.key, n);
211
214
  }
212
215
  }
213
- function C(e, t, r) {
214
- if (t) T(e.prototype, t);
215
- if (r) T(e, r);
216
+ function R(e, t, r) {
217
+ if (t) P(e.prototype, t);
218
+ if (r) P(e, r);
216
219
  return e;
217
220
  }
218
221
  function A(e, t) {
@@ -235,32 +238,32 @@
235
238
  };
236
239
  return _(e, t);
237
240
  }
238
- function K(e) {
239
- var t = H();
241
+ function L(e) {
242
+ var t = F();
240
243
  return function r() {
241
- var n = q(e), o;
244
+ var n = H(e), o;
242
245
  if (t) {
243
- var i = q(this).constructor;
246
+ var i = H(this).constructor;
244
247
  o = Reflect.construct(n, arguments, i);
245
248
  } else {
246
249
  o = n.apply(this, arguments);
247
250
  }
248
- return L(this, o);
251
+ return B(this, o);
249
252
  };
250
253
  }
251
- function L(e, t) {
252
- if (t && (k(t) === "object" || typeof t === "function")) {
254
+ function B(e, t) {
255
+ if (t && (T(t) === "object" || typeof t === "function")) {
253
256
  return t;
254
257
  }
255
- return B(e);
258
+ return q(e);
256
259
  }
257
- function B(e) {
260
+ function q(e) {
258
261
  if (e === void 0) {
259
262
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
260
263
  }
261
264
  return e;
262
265
  }
263
- function H() {
266
+ function F() {
264
267
  if (typeof Reflect === "undefined" || !Reflect.construct) return false;
265
268
  if (Reflect.construct.sham) return false;
266
269
  if (typeof Proxy === "function") return true;
@@ -271,11 +274,11 @@
271
274
  return false;
272
275
  }
273
276
  }
274
- function q(e) {
275
- q = Object.setPrototypeOf ? Object.getPrototypeOf : function e(t) {
277
+ function H(e) {
278
+ H = Object.setPrototypeOf ? Object.getPrototypeOf : function e(t) {
276
279
  return t.__proto__ || Object.getPrototypeOf(t);
277
280
  };
278
- return q(e);
281
+ return H(e);
279
282
  }
280
283
  function D(e, t, r) {
281
284
  if (t in e) {
@@ -290,7 +293,7 @@
290
293
  }
291
294
  return e;
292
295
  }
293
- var F = {
296
+ var N = {
294
297
  animateLoading: i().bool,
295
298
  children: i().node,
296
299
  /** @private */
@@ -301,65 +304,55 @@
301
304
  isLoading: i().bool,
302
305
  loadingMessage: i().node,
303
306
  noOptionsMessage: i().node,
304
- /** @private */
305
- onDownKeyPress: i().func,
306
- /** @private */
307
- onEndKeyPress: i().func,
308
- /** @private */
309
- onHomeKeyPress: i().func,
310
307
  onScroll: i().func,
311
308
  onScrollBottom: i().func,
312
- /** @private */
313
- onUpKeyPress: i().func,
314
309
  placement: i().string,
315
- menuId: i().string
310
+ menuId: i().string,
311
+ disableFocusControl: i().bool
316
312
  };
317
- var N = {
313
+ var z = {
318
314
  animateLoading: false,
319
315
  isLoading: false,
320
316
  loadingMessage: (0, d._)("Loading..."),
321
317
  noOptionsMessage: (0, d._)("No matches")
322
318
  };
323
- var U = {
324
- role: "listbox"
325
- };
326
- var z = c()((function(e) {
319
+ var U = c()((function(e) {
327
320
  return {
328
321
  height: e
329
322
  };
330
323
  }));
331
324
  // @docs-props-type ResultsMenuPropsBase
332
- var W = function(e) {
325
+ var $ = function(e) {
333
326
  A(o, e);
334
- var t = K(o);
327
+ var t = L(o);
335
328
  function o(e) {
336
329
  var n;
337
- R(this, o);
330
+ I(this, o);
338
331
  n = t.call(this, e);
339
- D(B(n), "scrollBottomOffset", void 0);
340
- D(B(n), "itemMinHeight", void 0);
341
- D(B(n), "handleMenuMount", (function(e) {
332
+ D(q(n), "scrollBottomOffset", void 0);
333
+ D(q(n), "itemMinHeight", void 0);
334
+ D(q(n), "handleMenuMount", (function(e) {
342
335
  n.setState({
343
336
  menuEl: e
344
337
  });
345
338
  }));
346
- D(B(n), "handleMount", (function(e) {
339
+ D(q(n), "handleMount", (function(e) {
347
340
  n.setState({
348
341
  containerEl: e
349
342
  });
350
343
  j(n.props.elementRef, e);
351
344
  }));
352
- D(B(n), "handleMouseEnter", (function() {
345
+ D(q(n), "handleMouseEnter", (function() {
353
346
  n.setState({
354
347
  windowTop: document.documentElement.scrollTop
355
348
  });
356
349
  }));
357
- D(B(n), "handleMouseLeave", (function() {
350
+ D(q(n), "handleMouseLeave", (function() {
358
351
  n.setState({
359
352
  windowTop: document.documentElement.scrollTop
360
353
  });
361
354
  }));
362
- D(B(n), "handleScroll", (function(e) {
355
+ D(q(n), "handleScroll", (function(e) {
363
356
  var t, r;
364
357
  if (n.props.onScrollBottom != null) {
365
358
  if (e.target && n.state.menuEl) {
@@ -372,12 +365,12 @@
372
365
  }
373
366
  (t = (r = n.props).onScroll) === null || t === void 0 ? void 0 : t.call(r, e);
374
367
  }));
375
- D(B(n), "handleWheelMenu", (function(e) {
368
+ D(q(n), "handleWheelMenu", (function(e) {
376
369
  // Safety net to ensure window doesn't scroll if menu is scrolled pass the numberOfItemsLoaded at high velocity.
377
370
  e.stopPropagation();
378
371
  document.documentElement.scrollTop = n.state.windowTop;
379
372
  }));
380
- D(B(n), "handleScrollBottomOnFullMenu", (function() {
373
+ D(q(n), "handleScrollBottomOnFullMenu", (function() {
381
374
  var e = r.Children.count(n.props.children);
382
375
  var t = n.state.childrenCount;
383
376
  // If menu is full length, load more items.
@@ -399,6 +392,12 @@
399
392
  });
400
393
  }
401
394
  }));
395
+ D(q(n), "createMenuContextValue", (function() {
396
+ return {
397
+ role: "listbox",
398
+ preventFocus: n.props.controlledExternally
399
+ };
400
+ }));
402
401
  n.state = {
403
402
  containerEl: null,
404
403
  menuEl: null,
@@ -411,12 +410,12 @@
411
410
  n.itemMinHeight = 28;
412
411
  return n;
413
412
  }
414
- C(o, [ {
413
+ R(o, [ {
415
414
  key: "componentDidUpdate",
416
415
  value: function e() {
417
416
  var t, r;
418
417
  var n = this.state, o = n.containerEl, i = n.menuEl;
419
- if (!p.isIE11 || !o || !i) {
418
+ if (!v.isIE11 || !o || !i) {
420
419
  return;
421
420
  }
422
421
  // If onScrollBottom is defined, determine if it should be triggered.
@@ -445,7 +444,7 @@
445
444
  }, {
446
445
  key: "renderFooterMessage",
447
446
  value: function e() {
448
- return this.props.footerMessage && !!r.Children.toArray(this.props.children).length && n().createElement(E, {
447
+ return this.props.footerMessage && !!r.Children.toArray(this.props.children).length && n().createElement(O, {
449
448
  $placement: this.props.placement,
450
449
  "data-test": "footer-message",
451
450
  key: "footer"
@@ -454,56 +453,58 @@
454
453
  }, {
455
454
  key: "render",
456
455
  value: function e() {
457
- var t = this.props, i = t.animateLoading, u = t.children, l = t.controlledExternally, c = t.childrenStart, s = t.isLoading, d = t.loadingMessage, p = t.noOptionsMessage, y = t.onDownKeyPress, h = t.onEndKeyPress, b = t.onHomeKeyPress, g = t.onScrollBottom, S = t.onUpKeyPress, E = t.placement, j = t.style, k = t.tabIndex, R = t.menuId, T = t["aria-multiselectable"];
458
- var C = f()(this.props, a()(o.propTypes));
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));
459
458
  // Assumption: that you cannot be filtered if you are a result
460
- var A = r.Children.toArray(u).filter(r.isValidElement).some((function(e) {
459
+ var I = r.Children.toArray(u).filter(r.isValidElement).some((function(e) {
461
460
  var t = e.type;
462
- return !(t === v.Divider && t.filterFirst || (t === v.Divider || t === v.Heading) && (t.filterLast || t.filterConsecutive));
461
+ return !(t === p.Divider && t.filterFirst || (t === p.Divider || t === p.Heading) && (t.filterLast || t.filterConsecutive));
463
462
  }));
464
- var _ = this.checkFullHeight();
465
- var K = z(this.state.scrollBottomTriggered ? this.state.numberOfItemsLoaded * this.itemMinHeight || 0 : 0);
463
+ var P = this.checkFullHeight();
464
+ var R = U(this.state.scrollBottomTriggered ? this.state.numberOfItemsLoaded * this.itemMinHeight || 0 : 0);
466
465
  /* eslint-disable jsx-a11y/aria-role */
467
- return n().createElement(O, I({
466
+ return n().createElement(E, C({
468
467
  key: "wrapper",
469
468
  ref: this.handleMount,
470
- onWheel: g ? this.handleWheelMenu : undefined,
471
- onMouseEnter: g ? this.handleMouseEnter : undefined,
472
- onMouseLeave: g ? this.handleMouseLeave : undefined
473
- }, f()(C, "tabIndex", "aria-multiselectable", "menuId"), {
474
- style: j
475
- }), E !== "above" && c, E === "above" && this.renderFooterMessage(), n().createElement(v.MenuContext.Provider, {
476
- value: U
469
+ onWheel: h ? this.handleWheelMenu : undefined,
470
+ onMouseEnter: h ? this.handleMouseEnter : undefined,
471
+ 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, {
475
+ value: this.createMenuContextValue()
477
476
  }, n().createElement(w, {
478
477
  key: "menu",
479
478
  controlledExternally: l,
480
479
  elementRef: this.handleMenuMount,
481
- onDownKeyPress: y,
482
- onEndKeyPress: h,
483
- onHomeKeyPress: b,
484
480
  onScroll: this.handleScroll,
485
- onUpKeyPress: S,
486
481
  stopScrollPropagation: true,
487
- tabIndex: k,
488
- "aria-multiselectable": T,
489
- id: R
490
- }, !A && p && !s && n().createElement(m().Item, {
482
+ tabIndex: g,
483
+ "aria-multiselectable": j,
484
+ id: S,
485
+ disableFocusControl: O,
486
+ $removeBottomRadius: !!this.props.footerMessage && b !== "above"
487
+ }, !I && v && !s && n().createElement(m().Item, {
491
488
  "data-test": "no-results-message",
492
489
  disabled: true
493
- }, p), u, g && !_ &&
490
+ }, v), u, h && !P &&
494
491
 
495
492
  // Bottom spacer fills in the space of new items being loaded by using the minimum possible height x menuItems.
496
493
  n().createElement("div", {
497
494
  "data-test": "results-menu-bottom-spacer",
498
- style: K
499
- }), s && n().createElement(M, null, i && n().createElement(P, null), n().createElement(x, null, d)))), E !== "above" && this.renderFooterMessage(), E === "above" && c);
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);
500
497
  }
501
498
  } ]);
502
499
  return o;
503
500
  }(r.Component);
504
- D(W, "propTypes", F);
505
- D(W, "defaultProps", N);
506
- /* harmony default export */ const $ = W;
501
+ D($, "propTypes", N);
502
+ D($, "defaultProps", z);
503
+ /* harmony default export */ const V = $;
504
+ // CONCATENATED MODULE: external "@splunk/ui-utils/keyboard"
505
+ const W = require("@splunk/ui-utils/keyboard");
506
+ // CONCATENATED MODULE: external "@splunk/ui-utils/focus"
507
+ const K = require("@splunk/ui-utils/focus");
507
508
  // CONCATENATED MODULE: ./src/ResultsMenu/VirtualizedResultsMenu/groupChildren.ts
508
509
  // Cheap(er than processing potentially thousands of array elements) memoization
509
510
  var G = {
@@ -523,7 +524,7 @@
523
524
  * @param {number} groupSize The size of each group to be created
524
525
  * @returns A 2d array where each inner-array is a group of size `groupSize` of children
525
526
  * and the order of the `children` received equals the order of the flattened result
526
- */ var V = function e(t, n) {
527
+ */ var X = function e(t, n) {
527
528
  if (G.children === t && G.groupSize === n) {
528
529
  return G.result;
529
530
  }
@@ -547,13 +548,13 @@
547
548
  return G.result;
548
549
  };
549
550
  // CONCATENATED MODULE: external "@splunk/ui-utils/id"
550
- const X = require("@splunk/ui-utils/id");
551
+ const J = require("@splunk/ui-utils/id");
551
552
  // CONCATENATED MODULE: ./src/utils/getMenuChildNode.tsx
552
553
  // TODO(SUI-5919): fix the ref handling in the other components so this isn't needed
553
554
  /**
554
555
  * @private Get the HTML <anchor> or <button> node for a received derivative of Menu.Item
555
556
  */
556
- var J = function e(t) {
557
+ var Q = function e(t) {
557
558
  var r, n, o, i;
558
559
  if (t.el) {
559
560
  return t.el;
@@ -574,28 +575,28 @@
574
575
  return null;
575
576
  };
576
577
  // CONCATENATED MODULE: ./src/ResultsMenu/VirtualizedResultsMenu/VirtualizedItem.ts
577
- function Q(e, t) {
578
- return re(e) || te(e, t) || Z(e, t) || Y();
578
+ function Y(e, t) {
579
+ return ne(e) || re(e, t) || ee(e, t) || Z();
579
580
  }
580
- function Y() {
581
+ function Z() {
581
582
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
582
583
  }
583
- function Z(e, t) {
584
+ function ee(e, t) {
584
585
  if (!e) return;
585
- if (typeof e === "string") return ee(e, t);
586
+ if (typeof e === "string") return te(e, t);
586
587
  var r = Object.prototype.toString.call(e).slice(8, -1);
587
588
  if (r === "Object" && e.constructor) r = e.constructor.name;
588
589
  if (r === "Map" || r === "Set") return Array.from(e);
589
- if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return ee(e, t);
590
+ if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return te(e, t);
590
591
  }
591
- function ee(e, t) {
592
+ function te(e, t) {
592
593
  if (t == null || t > e.length) t = e.length;
593
594
  for (var r = 0, n = new Array(t); r < t; r++) {
594
595
  n[r] = e[r];
595
596
  }
596
597
  return n;
597
598
  }
598
- function te(e, t) {
599
+ function re(e, t) {
599
600
  if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(e))) return;
600
601
  var r = [];
601
602
  var n = true;
@@ -618,17 +619,17 @@
618
619
  }
619
620
  return r;
620
621
  }
621
- function re(e) {
622
+ function ne(e) {
622
623
  if (Array.isArray(e)) return e;
623
624
  }
624
- var ne = {
625
+ var oe = {
625
626
  children: i().node,
626
627
  onMount: i().func.isRequired,
627
628
  onUnmount: i().func.isRequired
628
629
  };
629
- /** @private Used by `VirtualizedResultsMenu` */ var oe = n().forwardRef((function(e, t) {
630
+ /** @private Used by `VirtualizedResultsMenu` */ var ie = n().forwardRef((function(e, t) {
630
631
  var n = e.children, o = e.onMount, i = e.onUnmount;
631
- var u = (0, r.useState)(), a = Q(u, 2), l = a[0], c = a[1];
632
+ var u = (0, r.useState)(), a = Y(u, 2), l = a[0], c = a[1];
632
633
  (0, r.useEffect)((function() {
633
634
  if (l) {
634
635
  o(l);
@@ -652,12 +653,12 @@
652
653
  return;
653
654
  }
654
655
  j(t, r);
655
- j(c, J(n));
656
+ j(c, Q(n));
656
657
  }
657
658
  });
658
659
  }));
659
- oe.propTypes = ne;
660
- oe.as = "Item";
660
+ ie.propTypes = oe;
661
+ ie.as = "Item";
661
662
  // CONCATENATED MODULE: ./src/ResultsMenu/VirtualizedResultsMenu/injectVirtualizedItem.tsx
662
663
  /**
663
664
  * Find the index of an array element which is nearest to targetIndex and is a Menu.Item component
@@ -665,7 +666,7 @@
665
666
  * @param {Number} targetIndex The target index. This is the ideal value to return.
666
667
  * @returns The index in the array of the nearest `Menu.Item` component to `targetIndex`, or -1 if no element is a `Menu.Item` component
667
668
  */
668
- var ie = function e(t, r) {
669
+ var ue = function e(t, r) {
669
670
  var n = -1;
670
671
  var o = -1;
671
672
  t.forEach((function(e, t) {
@@ -673,7 +674,7 @@
673
674
  if (n >= 0 && n < i) {
674
675
  return;
675
676
  }
676
- if (e.type !== v.Divider && e.type !== v.Heading) {
677
+ if (e.type !== p.Divider && e.type !== p.Heading) {
677
678
  n = i;
678
679
  o = t;
679
680
  }
@@ -685,19 +686,19 @@
685
686
  * with a VirtualizedItem instance.
686
687
  * - If `trackFirstElement` the **FIRST** non-divider/heading item will also be replaced.
687
688
  * - If `trackLastElement` the **LAST** non-divider/heading item will also be replaced.
688
- */ var ue = function e(t, r, o) {
689
+ */ var ae = function e(t, r, o) {
689
690
  var i = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}, u = i.trackFirstElement, a = i.trackLastElement;
690
691
  if (!Array.isArray(t)) {
691
692
  return [];
692
693
  }
693
- var l = ie(t, Math.floor(t.length / 2));
694
- var c = u && ie(t, 0);
695
- var s = a && ie(t, t.length - 1);
694
+ var l = ue(t, Math.floor(t.length / 2));
695
+ var c = u && ue(t, 0);
696
+ var s = a && ue(t, t.length - 1);
696
697
  return t.map((function(e, t) {
697
698
  if (t === l || t === c || t === s) {
698
699
 
699
- return n().createElement(oe, {
700
- key: (0, X.createGUID)(),
700
+ return n().createElement(ie, {
701
+ key: (0, J.createGUID)(),
701
702
  onMount: r,
702
703
  onUnmount: o
703
704
  }, e);
@@ -705,31 +706,9 @@
705
706
  return e;
706
707
  }));
707
708
  };
708
- // CONCATENATED MODULE: ./src/utils/navigateList.ts
709
- // A utility for keyboard navigation of lists
710
- function ae(e, t, r) {
711
- for (var n = 0; n < e.length; n += 1) {
712
- var o;
713
- var i = (n + r) % e.length;
714
- if (((o = e[i].current) === null || o === void 0 ? void 0 : o.props.disabled) !== true) {
715
- return e[i];
716
- }
717
- }
718
- return e[t];
719
- }
720
- function le(e, t, r) {
721
- for (var n = e.length; n > 0; n -= 1) {
722
- var o;
723
- var i = (n + r) % e.length;
724
- if (((o = e[i].current) === null || o === void 0 ? void 0 : o.props.disabled) !== true) {
725
- return e[i];
726
- }
727
- }
728
- return e[t];
729
- }
730
709
  // CONCATENATED MODULE: ./src/ResultsMenu/VirtualizedResultsMenu/VirtualizedResultsMenu.tsx
731
- function ce() {
732
- ce = Object.assign || function(e) {
710
+ function le() {
711
+ le = Object.assign || function(e) {
733
712
  for (var t = 1; t < arguments.length; t++) {
734
713
  var r = arguments[t];
735
714
  for (var n in r) {
@@ -740,27 +719,27 @@
740
719
  }
741
720
  return e;
742
721
  };
743
- return ce.apply(this, arguments);
722
+ return le.apply(this, arguments);
744
723
  }
745
- function se(e) {
746
- return pe(e) || de(e) || ye(e) || fe();
724
+ function ce(e) {
725
+ return de(e) || fe(e) || me(e) || se();
747
726
  }
748
- function fe() {
727
+ function se() {
749
728
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
750
729
  }
751
- function de(e) {
730
+ function fe(e) {
752
731
  if (typeof Symbol !== "undefined" && Symbol.iterator in Object(e)) return Array.from(e);
753
732
  }
754
- function pe(e) {
733
+ function de(e) {
755
734
  if (Array.isArray(e)) return he(e);
756
735
  }
757
736
  function ve(e, t) {
758
- return ge(e) || be(e, t) || ye(e, t) || me();
737
+ return ye(e) || be(e, t) || me(e, t) || pe();
759
738
  }
760
- function me() {
739
+ function pe() {
761
740
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
762
741
  }
763
- function ye(e, t) {
742
+ function me(e, t) {
764
743
  if (!e) return;
765
744
  if (typeof e === "string") return he(e, t);
766
745
  var r = Object.prototype.toString.call(e).slice(8, -1);
@@ -798,12 +777,12 @@
798
777
  }
799
778
  return r;
800
779
  }
801
- function ge(e) {
780
+ function ye(e) {
802
781
  if (Array.isArray(e)) return e;
803
782
  }
804
- function Se(e, t) {
783
+ function ge(e, t) {
805
784
  if (e == null) return {};
806
- var r = Oe(e, t);
785
+ var r = Se(e, t);
807
786
  var n, o;
808
787
  if (Object.getOwnPropertySymbols) {
809
788
  var i = Object.getOwnPropertySymbols(e);
@@ -816,7 +795,7 @@
816
795
  }
817
796
  return r;
818
797
  }
819
- function Oe(e, t) {
798
+ function Se(e, t) {
820
799
  if (e == null) return {};
821
800
  var r = {};
822
801
  var n = Object.keys(e);
@@ -839,12 +818,12 @@
839
818
  }
840
819
  return r;
841
820
  }
842
- function Me(e) {
821
+ function Oe(e) {
843
822
  for (var t = 1; t < arguments.length; t++) {
844
823
  var r = arguments[t] != null ? arguments[t] : {};
845
824
  if (t % 2) {
846
825
  Ee(Object(r), true).forEach((function(t) {
847
- we(e, t, r[t]);
826
+ Me(e, t, r[t]);
848
827
  }));
849
828
  } else if (Object.getOwnPropertyDescriptors) {
850
829
  Object.defineProperties(e, Object.getOwnPropertyDescriptors(r));
@@ -856,7 +835,7 @@
856
835
  }
857
836
  return e;
858
837
  }
859
- function we(e, t, r) {
838
+ function Me(e, t, r) {
860
839
  if (t in e) {
861
840
  Object.defineProperty(e, t, {
862
841
  value: r,
@@ -869,23 +848,13 @@
869
848
  }
870
849
  return e;
871
850
  }
872
- var Pe = Me(Me({}, f()(F, "onDownKeyPress", "onEndKeyPress", "onHomeKeyPress", "onUpKeyPress")), {}, {
851
+ var we = Oe(Oe({}, f()(N, "onDownKeyPress", "onEndKeyPress", "onHomeKeyPress", "onUpKeyPress")), {}, {
873
852
  virtualization: i().number.isRequired
874
853
  });
875
854
  var xe = {
876
855
  virtualization: 0
877
856
  };
878
- var je = [];
879
- var ke = function e(t, r) {
880
- var n = r.itemRefs, o = r.focusedItemKey;
881
- var i = ae(n, o, o + 1);
882
- return [ n.indexOf(i) < o ? o : i, false ];
883
- };
884
- var Ie = function e(t, r) {
885
- var n = r.itemRefs, o = r.focusedItemKey;
886
- var i = le(n, o, o - 1);
887
- return [ n.indexOf(i) > o ? o : i, false ];
888
- };
857
+ var ke = [];
889
858
  /**
890
859
  * A wrapper for `ResultsMenu` which virtualizes the `children`. The received `children` array will be split into **"panes"** each with `virtualization` entries
891
860
  * and, at any given time, 3 or fewer of these panes will be rendered in the DOM.
@@ -904,8 +873,8 @@
904
873
  * @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)
905
874
  * @throws in `__DEV__` when `virtualization` is less than or equal to 1 (`virtualization` must be ≥ 2)
906
875
  * @throws in `__DEV__` when `virtualization` is changed during the lifecycle of the `VirtualizedResultsMenu` component
907
- */ function Re(e) {
908
- var t = e.virtualization, o = e.elementRef, i = e.children, u = Se(e, [ "virtualization", "elementRef", "children" ]);
876
+ */ function je(e) {
877
+ var t = e.virtualization, o = e.elementRef, i = e.children, u = ge(e, [ "virtualization", "elementRef", "children" ]);
909
878
  // @docs-props-type VirtualizedResultsMenuPropsBase
910
879
  // If a user tries to set virtualization to a value smaller than the number of options
911
880
  // visible at a given moment then the menu will flicker endlessly. This state is set in
@@ -914,21 +883,22 @@
914
883
  // `useRef` will recompute its initial value every render cycle.
915
884
  // To avoid the array processing we can provide an initialization function to useState and init the ref with the result
916
885
  var f = (0, r.useState)((function() {
917
- return V(i, c);
918
- })), d = ve(f, 1), p = d[0];
886
+ return X(i, c);
887
+ })), d = ve(f, 1), v = d[0];
919
888
  // NOSONAR
920
889
  // `windowPanes` is an array of arrays, each of length `virtualization`. Each "pane" is just a subset of
921
890
  // `children` which will be rendered in a chunk, and at most 3 of these panes will render at any given time.
922
- var v = (0, r.useRef)(p);
891
+ var p = (0, r.useRef)(v);
923
892
  var m = (0, r.useRef)(0);
893
+ var h = (0, r.useRef)(null);
924
894
  // An IntersectionObserver is used to detect when pane changes are needed.
925
895
  // When loadPrevPaneRef or loadNextPaneRef entries intersect the menu, the currentPaneId will be updated.
926
- var y = (0, r.useRef)();
927
- var h = (0, r.useRef)(je);
928
- var b = (0, r.useRef)(je);
929
- var g = (0, r.useCallback)((function() {
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() {
930
900
  var e;
931
- var t = v.current, r = t === void 0 ? [] : t;
901
+ var t = p.current, r = t === void 0 ? [] : t;
932
902
  var n = m.current;
933
903
  /**
934
904
  * create onMount for an child of the menu which will be used to trigger pane
@@ -940,7 +910,7 @@
940
910
  return;
941
911
  }
942
912
  t.current.push(e);
943
- (r = y.current) === null || r === void 0 ? void 0 : r.observe(e);
913
+ (r = b.current) === null || r === void 0 ? void 0 : r.observe(e);
944
914
  };
945
915
  };
946
916
  /**
@@ -950,45 +920,46 @@
950
920
  if (!t) {
951
921
  return;
952
922
  }
953
- var n = b.current.indexOf(t);
923
+ var n = g.current.indexOf(t);
954
924
  if (n >= 0) {
955
- b.current.splice(n, 1);
925
+ g.current.splice(n, 1);
956
926
  }
957
- var o = h.current.indexOf(t);
927
+ var o = y.current.indexOf(t);
958
928
  if (o) {
959
- h.current.splice(o, 1);
929
+ y.current.splice(o, 1);
960
930
  }
961
- (r = y.current) === null || r === void 0 ? void 0 : r.unobserve(t);
931
+ (r = b.current) === null || r === void 0 ? void 0 : r.unobserve(t);
962
932
  };
963
- return [].concat(se(ue(r[n - 1], o(b), i, {
933
+ return [].concat(ce(ae(r[n - 1], o(g), i, {
964
934
  trackFirstElement: true
965
- })), se((e = r[n]) !== null && e !== void 0 ? e : []), se(ue(r[n + 1], o(h), i, {
935
+ })), ce((e = r[n]) !== null && e !== void 0 ? e : []), ce(ae(r[n + 1], o(y), i, {
966
936
  trackLastElement: true
967
937
  })));
968
938
  }), []);
969
- var S = (0, r.useState)(g), O = ve(S, 2), E = O[0], M = O[1];
970
- var w = (0, r.useCallback)((function(e) {
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) {
971
941
  var t = m.current;
972
- m.current = Math.max(0, Math.min(e, v.current.length - 1));
942
+ m.current = Math.max(0, Math.min(e, p.current.length - 1));
973
943
  if (t === m.current) {
974
944
  // no change in current pane
975
945
  return;
976
946
  }
977
- M(g);
978
- }), [ g ]);
947
+ w(S);
948
+ }), [ S ]);
979
949
  // Link an IntersectionObserver instance with the menu children to be observed
980
- var P = (0, r.useCallback)((function(e) {
950
+ var k = (0, r.useCallback)((function(e) {
981
951
  var t;
982
952
  j(o, e);
953
+ h.current = e;
983
954
  // This is overly defensive and could probably be removed
984
- (t = y.current) === null || t === void 0 ? void 0 : t.disconnect();
955
+ (t = b.current) === null || t === void 0 ? void 0 : t.disconnect();
985
956
  if (!e) {
986
957
  return;
987
958
  }
988
- b.current = [];
989
- h.current = [];
959
+ g.current = [];
960
+ y.current = [];
990
961
  // Run the observation flow
991
- y.current = new IntersectionObserver((function(t) {
962
+ b.current = new IntersectionObserver((function(t) {
992
963
  var r;
993
964
  var n = m.current;
994
965
  var o = e.firstElementChild;
@@ -997,7 +968,7 @@
997
968
  // If the first element doesn't require a scrollbar then it's likely a filter input
998
969
  o = (i = o) === null || i === void 0 ? void 0 : i.nextElementSibling;
999
970
  }
1000
- if (((r = o) === null || r === void 0 ? void 0 : r.scrollTop) === 0 && n === 0 && v.current.length > 1 && t.some((function(e) {
971
+ if (((r = o) === null || r === void 0 ? void 0 : r.scrollTop) === 0 && n === 0 && p.current.length > 1 && t.some((function(e) {
1001
972
  return e.isIntersecting;
1002
973
  }))) {
1003
974
  // The menu hasn't scrolled, is on pane 0, and already has an intersection, the `virtualization` prop is too small
@@ -1013,46 +984,65 @@
1013
984
  // don't process if the pane changed or the entry isn't intersecting
1014
985
  return;
1015
986
  }
1016
- if (b.current.includes(e.target)) {
987
+ if (g.current.includes(e.target)) {
1017
988
  u = true;
1018
- w(n - 1);
1019
- } else if (h.current.includes(e.target)) {
989
+ x(n - 1);
990
+ } else if (y.current.includes(e.target)) {
1020
991
  u = true;
1021
- w(n + 1);
992
+ x(n + 1);
1022
993
  }
1023
994
  }));
1024
995
  }), {
1025
996
  root: e
1026
997
  });
1027
- }), [ o, w ]);
1028
- var x = (0, r.useCallback)((function(e, t) {
1029
- var r, n;
1030
- var o = t.itemRefs;
1031
- var i = v.current.length - 1;
1032
- if (m.current === i) {
1033
- return [ le(o, o.length - 1, o.length - 1), true ];
998
+ }), [ o, x ]);
999
+ var T = (0, r.useCallback)((function(e) {
1000
+ var t = h.current;
1001
+ if (!t) {
1002
+ return;
1003
+ }
1004
+ e.preventDefault();
1005
+ var r = (0, W.keycode)(e);
1006
+ if (r === "home") {
1007
+ var n;
1008
+ if (m.current !== 0) {
1009
+ x(0);
1010
+ }
1011
+ var o = (0, K.getSortedTabbableElements)(t, {
1012
+ ignoreTabIndex: true
1013
+ });
1014
+ var i = o[0];
1015
+ i === null || i === void 0 ? void 0 : (n = i.focus) === null || n === void 0 ? void 0 : n.call(i);
1016
+ return;
1034
1017
  }
1035
- w(i);
1036
- // When we are rendering the last set of records a buffer will exist containing the next-to-last pane.
1037
- // This means the desired index for focus will be the length of the buffer + the length of the last set
1038
- // of records (less 1 because of array indexing)
1039
- var u = (r = v.current[i - 1].length) !== null && r !== void 0 ? r : 0;
1040
- var a = v.current[i].length;
1041
- // If the last child is non-interactive (Heading or Divider) then `Menu` will focus on the "next" interactive
1042
- // element, which would be at the _start_ of the list. The IntersectionObserver would then change to the
1043
- // `lastPaneId - 1` pane and the focus would be incorrect. Call `findClosestMenuItem` to avoid that.
1044
- var l = Math.max(u + a - 1, 0);
1045
- var c = ie([].concat(se((n = v.current[i - 1]) !== null && n !== void 0 ? n : []), se(v.current[i])), l);
1046
- return [ c, true ];
1047
- }), [ w ]);
1048
- var k = (0, r.useCallback)((function(e, t) {
1049
- var r = t.itemRefs;
1050
- if (m.current === 0) {
1051
- return [ ae(r, 0, 0), true ];
1018
+ var u = p.current.length - 1;
1019
+ if (r === "end") {
1020
+ var a;
1021
+ if (m.current !== u) {
1022
+ x(u);
1023
+ }
1024
+ var l = (0, K.getSortedTabbableElements)(t, {
1025
+ ignoreTabIndex: true
1026
+ });
1027
+ var c = l[l.length - 1];
1028
+ c === null || c === void 0 ? void 0 : (a = c.focus) === null || a === void 0 ? void 0 : a.call(c);
1029
+ return;
1052
1030
  }
1053
- w(0);
1054
- return [ 0, true ];
1055
- }), [ w ]);
1031
+ var s = (0, K.getSortedTabbableElements)(t, {
1032
+ ignoreTabIndex: true
1033
+ });
1034
+ var f = (e === null || e === void 0 ? void 0 : e.target) instanceof Element ? e.target : null;
1035
+ var d = t === null || t === void 0 ? void 0 : t.querySelector(":focus");
1036
+ var v = f || d;
1037
+ var b = v ? s.indexOf(v) : -1;
1038
+ (0, K.handleFocus)(r, s, b, {
1039
+ enableLoop: false,
1040
+ // VirtualizedResultsMenu does not support looping focus
1041
+ orientation: "vertical",
1042
+ enableTab: false,
1043
+ enableHomeEnd: false
1044
+ });
1045
+ }), [ x ]);
1056
1046
  (0, r.useEffect)((function() {
1057
1047
  s((function(e) {
1058
1048
  if (false) {}
@@ -1060,27 +1050,32 @@
1060
1050
  }));
1061
1051
  }), [ t ]);
1062
1052
  (0, r.useEffect)((function() {
1063
- v.current = V(i, c);
1064
- M(g);
1065
- }), [ i, c, g ]);
1053
+ p.current = X(i, c);
1054
+ w(S);
1055
+ }), [ i, c, S ]);
1066
1056
  (0, r.useEffect)((function() {
1067
1057
  return function() {
1068
1058
  var e;
1069
- return (e = y.current) === null || e === void 0 ? void 0 : e.disconnect();
1059
+ return (e = b.current) === null || e === void 0 ? void 0 : e.disconnect();
1070
1060
  };
1071
1061
  }), []);
1062
+ (0, r.useEffect)((function() {
1063
+ var e = h.current;
1064
+ if (e) {
1065
+ e.addEventListener("keydown", T);
1066
+ }
1067
+ return function() {
1068
+ e === null || e === void 0 ? void 0 : e.removeEventListener("keydown", T);
1069
+ };
1070
+ }), [ T ]);
1072
1071
 
1073
- return n().createElement($, ce({
1074
- elementRef: P
1075
- }, u, {
1076
- onEndKeyPress: x,
1077
- onHomeKeyPress: k,
1078
- onUpKeyPress: Ie,
1079
- onDownKeyPress: ke
1080
- }), E);
1072
+ return n().createElement(V, le({
1073
+ elementRef: k,
1074
+ disableFocusControl: true
1075
+ }, u), M);
1081
1076
  }
1082
- Re.propTypes = Pe;
1083
- Re.defaultProps = xe;
1077
+ je.propTypes = we;
1078
+ je.defaultProps = xe;
1084
1079
  // CONCATENATED MODULE: ./src/utils/ssrDocument.ts
1085
1080
  /* eslint-disable @typescript-eslint/no-empty-function */
1086
1081
  var Te = {
@@ -1143,7 +1138,7 @@
1143
1138
  }
1144
1139
  // CONCATENATED MODULE: ./src/utils/ssrWindow.ts
1145
1140
  /* eslint-disable @typescript-eslint/no-empty-function */
1146
- var Ae = {
1141
+ var Ie = {
1147
1142
  document: Te,
1148
1143
  navigator: {
1149
1144
  userAgent: ""
@@ -1198,14 +1193,14 @@
1198
1193
  clearTimeout(t);
1199
1194
  }
1200
1195
  };
1201
- function _e() {
1202
- var e = typeof window !== "undefined" ? window : Ae;
1196
+ function Pe() {
1197
+ var e = typeof window !== "undefined" ? window : Ie;
1203
1198
  return e;
1204
1199
  }
1205
1200
  // CONCATENATED MODULE: ./src/ResultsMenu/VirtualizedResultsMenu/index.ts
1206
1201
  // In environments without IntersectionObserver support this should just export ResultsMenu
1207
- var Ke = "IntersectionObserver" in _e() ? Re : $;
1208
- /* harmony default export */ const Le = Ke;
1202
+ var Re = "IntersectionObserver" in Pe() ? je : V;
1203
+ /* harmony default export */ const Ae = Re;
1209
1204
  // CONCATENATED MODULE: ./src/ResultsMenu/index.ts
1210
1205
  module.exports = t;
1211
1206
  /******/})();