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