@splunk/react-ui 5.4.0 → 5.6.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 (89) hide show
  1. package/AnchorMenu.d.ts +2 -0
  2. package/AnchorMenu.js +286 -0
  3. package/Badge.d.ts +2 -0
  4. package/Badge.js +154 -0
  5. package/CHANGELOG.md +42 -0
  6. package/Code.js +1097 -500
  7. package/Color.js +142 -141
  8. package/ComboBox.js +6 -5
  9. package/Link.js +74 -44
  10. package/MIGRATION.md +32 -1
  11. package/Menu.js +41 -43
  12. package/Multiselect.js +615 -2156
  13. package/Number.js +3 -3
  14. package/PhoneNumber.d.ts +2 -0
  15. package/PhoneNumber.js +769 -0
  16. package/Popover.js +73 -75
  17. package/RadioList.js +166 -151
  18. package/ResultsMenu.js +27 -29
  19. package/Select.js +179 -1768
  20. package/SelectBase.d.ts +2 -0
  21. package/SelectBase.js +1714 -0
  22. package/Slider.js +358 -302
  23. package/SlidingPanels.js +55 -62
  24. package/Switch.js +42 -27
  25. package/TabBar.js +295 -294
  26. package/TabLayout.js +14 -14
  27. package/Table.js +1087 -1040
  28. package/TransitionOpen.js +65 -58
  29. package/cypress/support/commands.ts +40 -0
  30. package/cypress/support/component.ts +1 -1
  31. package/cypress/support/index.d.ts +22 -0
  32. package/docker-compose.yml +99 -52
  33. package/package.json +9 -5
  34. package/stubs-splunkui.d.ts +0 -86
  35. package/test-runner-jest.config.js +1 -0
  36. package/types/src/AnchorMenu/AnchorMenu.d.ts +36 -0
  37. package/types/src/AnchorMenu/AnchorMenuContext.d.ts +6 -0
  38. package/types/src/AnchorMenu/Item.d.ts +35 -0
  39. package/types/src/AnchorMenu/docs/examples/Basic.d.ts +6 -0
  40. package/types/src/AnchorMenu/index.d.ts +3 -0
  41. package/types/src/Badge/Badge.d.ts +29 -0
  42. package/types/src/Badge/docs/examples/Basic.d.ts +5 -0
  43. package/types/src/Badge/docs/examples/Count.d.ts +6 -0
  44. package/types/src/Badge/docs/examples/CustomColors.d.ts +8 -0
  45. package/types/src/Badge/docs/examples/Icon.d.ts +6 -0
  46. package/types/src/Badge/index.d.ts +2 -0
  47. package/types/src/Code/Code.d.ts +4 -3
  48. package/types/src/Code/index.d.ts +1 -0
  49. package/types/src/Link/Link.d.ts +4 -0
  50. package/types/src/Link/LinkContext.d.ts +14 -0
  51. package/types/src/Link/docs/examples/Visited.d.ts +7 -0
  52. package/types/src/Link/index.d.ts +1 -0
  53. package/types/src/Menu/Item.d.ts +1 -1
  54. package/types/src/Multiselect/Compact.d.ts +8 -1
  55. package/types/src/Multiselect/Multiselect.d.ts +8 -1
  56. package/types/src/PhoneNumber/PhoneNumber.d.ts +139 -0
  57. package/types/src/PhoneNumber/docs/examples/Controlled.d.ts +7 -0
  58. package/types/src/PhoneNumber/docs/examples/DefaultCountry.d.ts +7 -0
  59. package/types/src/PhoneNumber/docs/examples/Disabled.d.ts +6 -0
  60. package/types/src/PhoneNumber/docs/examples/Error.d.ts +6 -0
  61. package/types/src/PhoneNumber/docs/examples/Inline.d.ts +7 -0
  62. package/types/src/PhoneNumber/docs/examples/Uncontrolled.d.ts +7 -0
  63. package/types/src/PhoneNumber/index.d.ts +2 -0
  64. package/types/src/PhoneNumber/utils.d.ts +47 -0
  65. package/types/src/RadioList/Option.d.ts +6 -1
  66. package/types/src/RadioList/docs/examples/Description.d.ts +6 -0
  67. package/types/src/Select/Option.d.ts +8 -3
  68. package/types/src/Select/Select.d.ts +1 -1
  69. package/types/src/{Select → SelectBase}/OptionBase.d.ts +8 -2
  70. package/types/src/{Select → SelectBase}/SelectBase.d.ts +11 -2
  71. package/types/src/SelectBase/index.d.ts +2 -0
  72. package/types/src/Slider/Slider.d.ts +7 -1
  73. package/types/src/Switch/Switch.d.ts +4 -1
  74. package/types/src/Table/Body.d.ts +6 -1
  75. package/types/src/Table/Cell.d.ts +5 -1
  76. package/types/src/Table/Head.d.ts +6 -2
  77. package/types/src/Table/HeadCell.d.ts +5 -1
  78. package/types/src/Table/Row.d.ts +5 -1
  79. package/types/src/Table/Table.d.ts +20 -1
  80. package/types/src/Table/TableContext.d.ts +1 -0
  81. package/types/src/Table/docs/examples/HorizontalOverflowScroll.d.ts +8 -0
  82. package/types/src/Table/docs/examples/PinActionColumn.d.ts +7 -0
  83. package/types/src/TransitionOpen/TransitionOpen.d.ts +3 -1
  84. package/types/src/useResizeObserver/useResizeObserver.d.ts +2 -0
  85. package/types/src/useRovingFocus/useRovingFocus.d.ts +8 -1
  86. package/usePrevious.d.ts +2 -0
  87. package/useResizeObserver.js +59 -92
  88. package/useRovingFocus.js +96 -41
  89. /package/types/src/{Select → SelectBase}/SelectAllOption.d.ts +0 -0
package/Popover.js CHANGED
@@ -100,10 +100,10 @@
100
100
  const S = require("prop-types");
101
101
  var O = e.n(S);
102
102
  // CONCATENATED MODULE: external "@splunk/react-ui/Animation"
103
- const C = require("@splunk/react-ui/Animation");
103
+ const E = require("@splunk/react-ui/Animation");
104
104
  // CONCATENATED MODULE: external "@splunk/react-ui/EventListener"
105
- const E = require("@splunk/react-ui/EventListener");
106
- var j = e.n(E);
105
+ const C = require("@splunk/react-ui/EventListener");
106
+ var j = e.n(C);
107
107
  // CONCATENATED MODULE: external "@splunk/react-ui/Layer"
108
108
  const x = require("@splunk/react-ui/Layer");
109
109
  var k = e.n(x);
@@ -111,20 +111,20 @@
111
111
  const A = require("@splunk/react-ui/ScrollContainerContext");
112
112
  var T = e.n(A);
113
113
  // CONCATENATED MODULE: external "@splunk/themes/useSplunkTheme"
114
- const R = require("@splunk/themes/useSplunkTheme");
115
- var M = e.n(R);
114
+ const M = require("@splunk/themes/useSplunkTheme");
115
+ var R = e.n(M);
116
116
  // CONCATENATED MODULE: external "@splunk/ui-utils/focus"
117
117
  const W = require("@splunk/ui-utils/focus");
118
118
  // CONCATENATED MODULE: ./src/Popover/getPlacement.ts
119
- function q(e) {
119
+ function H(e) {
120
120
  "@babel/helpers - typeof";
121
- return q = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
121
+ return H = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
122
122
  return typeof e;
123
123
  } : function(e) {
124
124
  return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
125
- }, q(e);
125
+ }, H(e);
126
126
  }
127
- function H(e, t) {
127
+ function q(e, t) {
128
128
  var r = Object.keys(e);
129
129
  if (Object.getOwnPropertySymbols) {
130
130
  var n = Object.getOwnPropertySymbols(e);
@@ -137,9 +137,9 @@
137
137
  function I(e) {
138
138
  for (var t = 1; t < arguments.length; t++) {
139
139
  var r = null != arguments[t] ? arguments[t] : {};
140
- t % 2 ? H(Object(r), !0).forEach((function(t) {
140
+ t % 2 ? q(Object(r), !0).forEach((function(t) {
141
141
  N(e, t, r[t]);
142
- })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : H(Object(r)).forEach((function(t) {
142
+ })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : q(Object(r)).forEach((function(t) {
143
143
  Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(r, t));
144
144
  }));
145
145
  }
@@ -155,14 +155,14 @@
155
155
  }
156
156
  function L(e) {
157
157
  var t = D(e, "string");
158
- return "symbol" == q(t) ? t : t + "";
158
+ return "symbol" == H(t) ? t : t + "";
159
159
  }
160
160
  function D(e, t) {
161
- if ("object" != q(e) || !e) return e;
161
+ if ("object" != H(e) || !e) return e;
162
162
  var r = e[Symbol.toPrimitive];
163
163
  if (void 0 !== r) {
164
164
  var n = r.call(e, t || "default");
165
- if ("object" != q(n)) return n;
165
+ if ("object" != H(n)) return n;
166
166
  throw new TypeError("@@toPrimitive must return a primitive value.");
167
167
  }
168
168
  return ("string" === t ? String : Number)(e);
@@ -259,8 +259,8 @@
259
259
  var S = h;
260
260
  // Boolean convenience variables to simplify positioning logic.
261
261
  var O = r.top - i.offsetHeight > 0;
262
- var C = r.bottom + i.offsetHeight < u;
263
- var E = r.left - i.offsetWidth > 0;
262
+ var E = r.bottom + i.offsetHeight < u;
263
+ var C = r.left - i.offsetWidth > 0;
264
264
  var j = r.right + i.offsetWidth < f;
265
265
  var x = r.top * .7 > u - r.bottom;
266
266
  var k = $({
@@ -281,7 +281,7 @@
281
281
  outerContainerEl: i,
282
282
  padding: l
283
283
  }) < 0;
284
- var R = z({
284
+ var M = z({
285
285
  align: t,
286
286
  anchorPos: r,
287
287
  outerContainerEl: i,
@@ -290,7 +290,7 @@
290
290
  // Handle each of the four placement options individually.
291
291
  if (S === "above") {
292
292
  if (!O && v) {
293
- if (C) {
293
+ if (E) {
294
294
  return K(I(I({}, e), {}, {
295
295
  placement: "below"
296
296
  }));
@@ -300,7 +300,7 @@
300
300
  placement: "right"
301
301
  }));
302
302
  }
303
- if (p && E) {
303
+ if (p && C) {
304
304
  return K(I(I({}, e), {}, {
305
305
  placement: "left"
306
306
  }));
@@ -327,7 +327,7 @@
327
327
  }
328
328
  }
329
329
  if (S === "below") {
330
- if (!C && v) {
330
+ if (!E && v) {
331
331
  if (O && x) {
332
332
  return K(I(I({}, e), {}, {
333
333
  placement: "above"
@@ -338,7 +338,7 @@
338
338
  placement: "right"
339
339
  }));
340
340
  }
341
- if (p && E) {
341
+ if (p && C) {
342
342
  return K(I(I({}, e), {}, {
343
343
  placement: "left"
344
344
  }));
@@ -361,13 +361,13 @@
361
361
  }
362
362
  }
363
363
  if (S === "left") {
364
- if (!E && v) {
364
+ if (!C && v) {
365
365
  if (j) {
366
366
  return K(I(I({}, e), {}, {
367
367
  placement: "right"
368
368
  }));
369
369
  }
370
- if (p && C) {
370
+ if (p && E) {
371
371
  return K(I(I({}, e), {}, {
372
372
  placement: "below"
373
373
  }));
@@ -384,7 +384,7 @@
384
384
  }
385
385
  if (T) {
386
386
  b = 0;
387
- } else if (R) {
387
+ } else if (M) {
388
388
  b = Math.max(u - i.offsetHeight, 0);
389
389
  }
390
390
  if (!o) {
@@ -393,12 +393,12 @@
393
393
  }
394
394
  if (S === "right") {
395
395
  if (!j && v) {
396
- if (E) {
396
+ if (C) {
397
397
  return K(I(I({}, e), {}, {
398
398
  placement: "left"
399
399
  }));
400
400
  }
401
- if (p && C) {
401
+ if (p && E) {
402
402
  return K(I(I({}, e), {}, {
403
403
  placement: "below"
404
404
  }));
@@ -415,7 +415,7 @@
415
415
  }
416
416
  if (T) {
417
417
  b = 0;
418
- } else if (R) {
418
+ } else if (M) {
419
419
  b = Math.max(u - i.offsetHeight, 0);
420
420
  }
421
421
  if (!o) {
@@ -584,10 +584,10 @@
584
584
  var P = "".concat(b, " ").concat(m);
585
585
  var S = "".concat(g, " ").concat(m);
586
586
  var O = "".concat(b, " ").concat(m + r.height);
587
- var C = "".concat(g, " ").concat(m + r.height);
588
- var E = "\n M ".concat(y, "\n S ").concat(P, " , ").concat(S, "\n L ").concat(P, "\n L ").concat(O, "\n L ").concat(C, "\n S ").concat(O, " , ").concat(w, "\n ");
587
+ var E = "".concat(g, " ").concat(m + r.height);
588
+ var C = "\n M ".concat(y, "\n S ").concat(P, " , ").concat(S, "\n L ").concat(P, "\n L ").concat(O, "\n L ").concat(E, "\n S ").concat(O, " , ").concat(w, "\n ");
589
589
  return {
590
- hitAreaPath: E,
590
+ hitAreaPath: C,
591
591
  hitAreaStyle: {
592
592
  left: r.left,
593
593
  top: a.top,
@@ -777,15 +777,15 @@
777
777
  return e;
778
778
  }
779
779
  var Oe = Se();
780
- /* harmony default export */ const Ce = /* unused pure expression or super */ null && Oe;
780
+ /* harmony default export */ const Ee = /* unused pure expression or super */ null && Oe;
781
781
  // CONCATENATED MODULE: ./src/utils/getBoundingClientRect.ts
782
- function Ee(e) {
782
+ function Ce(e) {
783
783
  "@babel/helpers - typeof";
784
- return Ee = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
784
+ return Ce = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
785
785
  return typeof e;
786
786
  } : function(e) {
787
787
  return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
788
- }, Ee(e);
788
+ }, Ce(e);
789
789
  }
790
790
  function je(e, t) {
791
791
  var r = Object.keys(e);
@@ -818,24 +818,24 @@
818
818
  }
819
819
  function Ae(e) {
820
820
  var t = Te(e, "string");
821
- return "symbol" == Ee(t) ? t : t + "";
821
+ return "symbol" == Ce(t) ? t : t + "";
822
822
  }
823
823
  function Te(e, t) {
824
- if ("object" != Ee(e) || !e) return e;
824
+ if ("object" != Ce(e) || !e) return e;
825
825
  var r = e[Symbol.toPrimitive];
826
826
  if (void 0 !== r) {
827
827
  var n = r.call(e, t || "default");
828
- if ("object" != Ee(n)) return n;
828
+ if ("object" != Ce(n)) return n;
829
829
  throw new TypeError("@@toPrimitive must return a primitive value.");
830
830
  }
831
831
  return ("string" === t ? String : Number)(e);
832
832
  }
833
833
  // Checks if browser is Safari
834
- function Re() {
834
+ function Me() {
835
835
  return /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
836
836
  }
837
837
  // Formats return value to DOMRect
838
- function Me(e) {
838
+ function Re(e) {
839
839
  return xe(xe({}, e), {}, {
840
840
  top: e.y,
841
841
  left: e.x,
@@ -853,7 +853,7 @@
853
853
  */ function We(e, t) {
854
854
  var r, n;
855
855
  var o = e.getBoundingClientRect();
856
- var a = Re();
856
+ var a = Me();
857
857
  if (!t || !a) {
858
858
  return o;
859
859
  }
@@ -861,7 +861,7 @@
861
861
  var l = o.left + (((r = i.visualViewport) === null || r === void 0 ? void 0 : r.offsetLeft) || 0);
862
862
  var c = o.top + (((n = i.visualViewport) === null || n === void 0 ? void 0 : n.offsetTop) || 0);
863
863
  var u = o.width, f = o.height;
864
- return Me({
864
+ return Re({
865
865
  width: u,
866
866
  height: f,
867
867
  x: l,
@@ -875,7 +875,7 @@
875
875
  * @param ref - The React callback or object ref. Can be `null` or `undefined`.
876
876
  * @param current - The new value of the ref.
877
877
  */
878
- function qe(e, t) {
878
+ function He(e, t) {
879
879
  if (e) {
880
880
  if (typeof e === "function") {
881
881
  e(t);
@@ -888,7 +888,7 @@
888
888
  }
889
889
  }
890
890
  // CONCATENATED MODULE: ./src/utils/useDeprecate.tsx
891
- var He = "is deprecated and will be removed in the next major version.";
891
+ var qe = "is deprecated and will be removed in the next major version.";
892
892
  var Ie = function e(t) {
893
893
  var r = t.additionalMessage, n = r === void 0 ? "" : r, o = t.componentName;
894
894
  useEffect((function() {
@@ -1197,7 +1197,7 @@
1197
1197
  * `Dropdown` covers use cases where you might consider using `Popover` directly.
1198
1198
  */ function ft(e) {
1199
1199
  var t, o;
1200
- var a = e.align, i = a === void 0 ? "center" : a, c = e.anchor, u = e.animation, f = u === void 0 ? true : u, s = e.animationConfig, p = s === void 0 ? ut : s, d = e.appearance, h = d === void 0 ? "normal" : d, m = e.autoCloseWhenOffScreen, g = m === void 0 ? true : m, w = e.canCoverAnchor, S = e.children, O = e.closeReasons, E = O === void 0 ? et : O, x = e.defaultPlacement, A = x === void 0 ? "below" : x, R = e.elementRef, q = e.hideArrow, H = e.hitAreaRef, I = e.id, N = e.onRequestClose, L = e.open, D = e.outerRef, F = e.pointTo, $ = e.repositionMode, _ = $ === void 0 ? "flip" : $, V = e.retainFocus, z = V === void 0 ? true : V, X = e.takeFocus, B = e.toggleId, Y = Qe(e, [ "align", "anchor", "animation", "animationConfig", "appearance", "autoCloseWhenOffScreen", "canCoverAnchor", "children", "closeReasons", "defaultPlacement", "elementRef", "hideArrow", "hitAreaRef", "id", "onRequestClose", "open", "outerRef", "pointTo", "repositionMode", "retainFocus", "takeFocus", "toggleId" ]);
1200
+ var a = e.align, i = a === void 0 ? "center" : a, c = e.anchor, u = e.animation, f = u === void 0 ? true : u, s = e.animationConfig, p = s === void 0 ? ut : s, d = e.appearance, h = d === void 0 ? "normal" : d, m = e.autoCloseWhenOffScreen, g = m === void 0 ? true : m, w = e.canCoverAnchor, S = e.children, O = e.closeReasons, C = O === void 0 ? et : O, x = e.defaultPlacement, A = x === void 0 ? "below" : x, M = e.elementRef, H = e.hideArrow, q = e.hitAreaRef, I = e.id, N = e.onRequestClose, L = e.open, D = e.outerRef, F = e.pointTo, $ = e.repositionMode, _ = $ === void 0 ? "flip" : $, V = e.retainFocus, z = V === void 0 ? true : V, X = e.takeFocus, B = e.toggleId, Y = Qe(e, [ "align", "anchor", "animation", "animationConfig", "appearance", "autoCloseWhenOffScreen", "canCoverAnchor", "children", "closeReasons", "defaultPlacement", "elementRef", "hideArrow", "hitAreaRef", "id", "onRequestClose", "open", "outerRef", "pointTo", "repositionMode", "retainFocus", "takeFocus", "toggleId" ]);
1201
1201
  // @docs-props-type PopoverPropsBase
1202
1202
  Le({
1203
1203
  componentName: "Popover",
@@ -1241,19 +1241,19 @@
1241
1241
  }), [ f, L ]);
1242
1242
  var Pe = Se();
1243
1243
  var Oe = L || Z;
1244
- var Ce = (0, r.useContext)(T()) || Pe;
1245
- var Ee = Ce !== Pe;
1244
+ var Ee = (0, r.useContext)(T()) || Pe;
1245
+ var Ce = Ee !== Pe;
1246
1246
  var je = (0, r.useContext)(de), xe = je.allowPropagation, ke = je.hideArrow;
1247
- var Ae = q !== null && q !== void 0 ? q : ke;
1247
+ var Ae = H !== null && H !== void 0 ? H : ke;
1248
1248
  (0, r.useEffect)((function() {
1249
1249
  if (false) {}
1250
1250
  }), [ c ]);
1251
1251
  var Te = (0, r.useCallback)((function(e) {
1252
- if (L && (E === null || E === void 0 ? void 0 : E.includes(e.reason))) {
1252
+ if (L && (C === null || C === void 0 ? void 0 : C.includes(e.reason))) {
1253
1253
  N === null || N === void 0 ? void 0 : N(e);
1254
1254
  }
1255
- }), [ E, L, N ]);
1256
- var Re = (0, r.useCallback)((function(e, t) {
1255
+ }), [ C, L, N ]);
1256
+ var Me = (0, r.useCallback)((function(e, t) {
1257
1257
  var r = lt(e, t);
1258
1258
  if (r) {
1259
1259
  Te({
@@ -1262,12 +1262,12 @@
1262
1262
  }
1263
1263
  return r;
1264
1264
  }), [ Te ]);
1265
- var Me = M()(), We = Me.borderRadius, He = Me.spacingXSmall;
1265
+ var Re = R()(), We = Re.borderRadius, qe = Re.spacingXSmall;
1266
1266
  var Ie = parseInt(We, 10);
1267
- var Ne = parseInt(He, 10);
1267
+ var Ne = parseInt(qe, 10);
1268
1268
  // this is intentionally smaller when the arrow is hidden to address SUI-5452
1269
1269
  var De = Ae ? Ne : G;
1270
- // use caution when calling this directly - prefer setPlacement (the throttled version) instead
1270
+ // do not call this directly - use setPlacement (the throttled version) instead
1271
1271
  var $e = (0, r.useCallback)((function(e) {
1272
1272
  se((function(t) {
1273
1273
  var r, n;
@@ -1287,12 +1287,12 @@
1287
1287
  offsets: true,
1288
1288
  pointTo: F
1289
1289
  });
1290
- var l = it(Ce) ? at({
1291
- anchorEl: Ce,
1290
+ var l = it(Ee) ? at({
1291
+ anchorEl: Ee,
1292
1292
  pointTo: F
1293
1293
  }) : undefined;
1294
1294
  if (e && g) {
1295
- if (Re(o, l)) {
1295
+ if (Me(o, l)) {
1296
1296
  return t;
1297
1297
  }
1298
1298
  }
@@ -1339,7 +1339,7 @@
1339
1339
  maxWidth: v
1340
1340
  };
1341
1341
  }));
1342
- }), [ i, c, g, Ie, De, w, Re, A, L, F, _, Ce, Pe.innerHeight, Pe.innerWidth ]);
1342
+ }), [ i, c, g, Ie, De, w, Me, A, L, F, _, Ee, Pe.innerHeight, Pe.innerWidth ]);
1343
1343
  // these are useMemo rather than useCallback so that ESLint can correctly analyze the dependencies
1344
1344
  // see https://github.com/facebook/react/issues/19240#issuecomment-652945246
1345
1345
  var Ve = (0, r.useMemo)((function() {
@@ -1354,14 +1354,12 @@
1354
1354
  });
1355
1355
  }), [ $e ]);
1356
1356
  // this needs to run on every render - equivalent to componentDidUpdate
1357
- (0, r.useLayoutEffect)((function() {
1357
+ (0, r.useEffect)((function() {
1358
1358
  if (!be.current) {
1359
1359
  return;
1360
1360
  }
1361
1361
  if (L || Z) {
1362
- // SUI-8062: using the unthrottled version of setPlacement() here because to avoid a flash of incorrect placement
1363
- // we're doing this inside useLayoutEffect() so we're depending on React to batch these updates together
1364
- $e();
1362
+ Ke();
1365
1363
  }
1366
1364
  }));
1367
1365
  (0, r.useEffect)((function() {
@@ -1385,8 +1383,8 @@
1385
1383
  }), []);
1386
1384
  // EventListeners only need to be rendered when open,
1387
1385
  // otherwise leads to negative performance impacts
1388
- var Be = Oe ? n().createElement(n().Fragment, null, Ee && n().createElement(j(), {
1389
- target: Ce,
1386
+ var Be = Oe ? n().createElement(n().Fragment, null, Ce && n().createElement(j(), {
1387
+ target: Ee,
1390
1388
  eventType: "scroll",
1391
1389
  listener: Ve,
1392
1390
  options: rt,
@@ -1414,23 +1412,23 @@
1414
1412
  if (e && X) {
1415
1413
  l()(W.takeFocus, e);
1416
1414
  }
1417
- qe(R, e);
1418
- }), [ R, X ]);
1415
+ He(M, e);
1416
+ }), [ M, X ]);
1419
1417
  var Ge = (0, r.useCallback)((function(e) {
1420
1418
  ge.current = e;
1421
- qe(D, e);
1419
+ He(D, e);
1422
1420
  }), [ D ]);
1423
1421
  var Je = (0, r.useCallback)((function(e) {
1424
1422
  if (be.current) {
1425
1423
  if (z) {
1426
- (0, W.handleTab)(be.current, e);
1427
- } else if ((0, W.isTabKey)(e)) {
1424
+ (0, W.handleTab)(be.current, e.nativeEvent);
1425
+ } else if ((0, W.isTabKey)(e.nativeEvent)) {
1428
1426
  var t = (0, W.getSortedTabbableElements)(be.current);
1429
1427
  if (t.length > 0) {
1430
1428
  var r = e.shiftKey ? t[0] : t[t.length - 1];
1431
- if (r === e.target) {
1429
+ if (e.target instanceof HTMLElement && r === e.target) {
1432
1430
  Te({
1433
- event: e,
1431
+ event: e.nativeEvent,
1434
1432
  reason: "tabKey"
1435
1433
  });
1436
1434
  }
@@ -1455,7 +1453,7 @@
1455
1453
  clamp: true
1456
1454
  }, p);
1457
1455
  }), [ p ]);
1458
- var st = (0, C.useAnimation)({
1456
+ var st = (0, E.useAnimation)({
1459
1457
  from: tt,
1460
1458
  to: we,
1461
1459
  // Setting clamp to true will stop animating at the point it hit's it's goal value.
@@ -1467,10 +1465,10 @@
1467
1465
  return _e(_e({}, fe.outerContainerStyle), st);
1468
1466
  }), [ fe.outerContainerStyle, st ]);
1469
1467
  var vt = (0, r.useMemo)((function() {
1470
- return v()(E === null || E === void 0 ? void 0 : E.filter((function(e) {
1468
+ return v()(C === null || C === void 0 ? void 0 : C.filter((function(e) {
1471
1469
  return e !== "offScreen";
1472
1470
  })), k().possibleCloseReasons);
1473
- }), [ E ]);
1471
+ }), [ C ]);
1474
1472
  var dt = b()(S) ? S(ye) : S;
1475
1473
 
1476
1474
  return n().createElement(n().Fragment, null, Be, n().createElement(k(), {
@@ -1478,11 +1476,11 @@
1478
1476
  open: Oe,
1479
1477
  onRequestClose: Te,
1480
1478
  key: "Layer"
1481
- }, Oe && be.current && H && n().createElement(ve, {
1479
+ }, Oe && be.current && q && n().createElement(ve, {
1482
1480
  anchorRect: fe.anchorPos,
1483
1481
  popoverEl: be.current,
1484
1482
  popoverPlacement: fe.placement,
1485
- ref: H
1483
+ ref: q
1486
1484
  }), Oe && n().createElement(Q, {
1487
1485
  "data-test": "outer-popover",
1488
1486
  style: pt,