@splunk/react-ui 5.3.0 → 5.5.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 (114) hide show
  1. package/Accordion.js +31 -31
  2. package/Avatar.js +13 -13
  3. package/Badge.js +154 -0
  4. package/Breadcrumbs.js +66 -63
  5. package/ButtonSimple.js +52 -52
  6. package/CHANGELOG.md +43 -0
  7. package/CardLayout.js +39 -36
  8. package/Clickable.js +5 -6
  9. package/Code.js +917 -424
  10. package/CollapsiblePanel.js +1 -1
  11. package/Color.js +904 -1025
  12. package/ComboBox.js +6 -5
  13. package/DefinitionList.js +1 -1
  14. package/FormRows.js +13 -11
  15. package/JSONTree.js +682 -1408
  16. package/Link.js +74 -44
  17. package/MIGRATION.md +32 -1
  18. package/Markdown.js +9 -5
  19. package/Menu.js +100 -97
  20. package/Multiselect.js +1223 -2858
  21. package/Number.js +3 -3
  22. package/PhoneNumber.d.ts +2 -0
  23. package/PhoneNumber.js +769 -0
  24. package/Popover.js +235 -232
  25. package/RadioList.js +166 -151
  26. package/Resize.js +11 -8
  27. package/ResultsMenu.js +911 -1030
  28. package/ScreenReaderContent.js +86 -130
  29. package/Scroll.js +366 -425
  30. package/Select.js +267 -1947
  31. package/SelectBase.d.ts +2 -0
  32. package/SelectBase.js +1681 -0
  33. package/Slider.js +202 -199
  34. package/SlidingPanels.js +170 -175
  35. package/StepBar.js +123 -97
  36. package/Switch.js +137 -118
  37. package/TabBar.js +296 -295
  38. package/TabLayout.js +14 -14
  39. package/Table.js +1562 -1516
  40. package/TextArea.js +596 -684
  41. package/TransitionOpen.js +82 -74
  42. package/Tree.js +638 -682
  43. package/docker-compose.yml +99 -52
  44. package/package.json +16 -12
  45. package/stubs-splunkui.d.ts +0 -86
  46. package/test-runner-jest.config.js +1 -0
  47. package/types/src/Badge/Badge.d.ts +29 -0
  48. package/types/src/Badge/docs/examples/Basic.d.ts +5 -0
  49. package/types/src/Badge/docs/examples/Count.d.ts +6 -0
  50. package/types/src/Badge/docs/examples/CustomColors.d.ts +8 -0
  51. package/types/src/Badge/docs/examples/Icon.d.ts +6 -0
  52. package/types/src/Badge/index.d.ts +2 -0
  53. package/types/src/Breadcrumbs/Breadcrumbs.d.ts +1 -5
  54. package/types/src/Breadcrumbs/BreadcrumbsContext.d.ts +7 -0
  55. package/types/src/Breadcrumbs/Item.d.ts +1 -1
  56. package/types/src/ButtonSimple/mixin.d.ts +1 -1
  57. package/types/src/Code/Code.d.ts +4 -3
  58. package/types/src/Code/index.d.ts +1 -0
  59. package/types/src/JSONTree/JSONTreeItem.d.ts +1 -1
  60. package/types/src/JSONTree/renderTreeItems.d.ts +1 -1
  61. package/types/src/Link/Link.d.ts +4 -0
  62. package/types/src/Link/LinkContext.d.ts +14 -0
  63. package/types/src/Link/docs/examples/Visited.d.ts +7 -0
  64. package/types/src/Link/index.d.ts +1 -0
  65. package/types/src/Modal/ModalContext.d.ts +1 -1
  66. package/types/src/Multiselect/Compact.d.ts +3 -3
  67. package/types/src/Multiselect/Multiselect.d.ts +1 -1
  68. package/types/src/Multiselect/Normal.d.ts +2 -2
  69. package/types/src/Number/utils.d.ts +1 -1
  70. package/types/src/PhoneNumber/PhoneNumber.d.ts +139 -0
  71. package/types/src/PhoneNumber/docs/examples/Controlled.d.ts +7 -0
  72. package/types/src/PhoneNumber/docs/examples/DefaultCountry.d.ts +7 -0
  73. package/types/src/PhoneNumber/docs/examples/Disabled.d.ts +6 -0
  74. package/types/src/PhoneNumber/docs/examples/Error.d.ts +6 -0
  75. package/types/src/PhoneNumber/docs/examples/Inline.d.ts +7 -0
  76. package/types/src/PhoneNumber/docs/examples/Uncontrolled.d.ts +7 -0
  77. package/types/src/PhoneNumber/index.d.ts +2 -0
  78. package/types/src/PhoneNumber/utils.d.ts +47 -0
  79. package/types/src/Popover/getPlacement.d.ts +1 -1
  80. package/types/src/RadioList/Option.d.ts +7 -2
  81. package/types/src/RadioList/RadioListContext.d.ts +1 -1
  82. package/types/src/RadioList/docs/examples/Description.d.ts +6 -0
  83. package/types/src/Select/Option.d.ts +8 -3
  84. package/types/src/Select/Select.d.ts +1 -1
  85. package/types/src/{Select → SelectBase}/OptionBase.d.ts +8 -2
  86. package/types/src/{Select → SelectBase}/SelectBase.d.ts +3 -1
  87. package/types/src/SelectBase/index.d.ts +2 -0
  88. package/types/src/StepBar/StepBar.d.ts +4 -1
  89. package/types/src/StepBar/StepBarContext.d.ts +1 -0
  90. package/types/src/StepBar/docs/examples/Vertical.d.ts +6 -0
  91. package/types/src/Switch/Switch.d.ts +10 -1
  92. package/types/src/TabBar/Tab.d.ts +3 -1
  93. package/types/src/TabBar/docs/examples/Icons.d.ts +4 -0
  94. package/types/src/TabBar/docs/examples/Tooltips.d.ts +3 -0
  95. package/types/src/TabLayout/Panel.d.ts +2 -0
  96. package/types/src/Table/Body.d.ts +6 -1
  97. package/types/src/Table/Cell.d.ts +5 -1
  98. package/types/src/Table/Head.d.ts +6 -2
  99. package/types/src/Table/HeadCell.d.ts +5 -1
  100. package/types/src/Table/Row.d.ts +5 -1
  101. package/types/src/Table/Table.d.ts +21 -1
  102. package/types/src/Table/TableContext.d.ts +1 -0
  103. package/types/src/Table/docs/examples/HorizontalOverflowScroll.d.ts +8 -0
  104. package/types/src/Table/docs/examples/PinActionColumn.d.ts +7 -0
  105. package/types/src/TransitionOpen/TransitionOpen.d.ts +3 -1
  106. package/types/src/Tree/TreeContext.d.ts +1 -1
  107. package/types/src/useResizeObserver/useResizeObserver.d.ts +2 -0
  108. package/types/src/useRovingFocus/useRovingFocus.d.ts +8 -1
  109. package/useControlled.js +61 -97
  110. package/usePrevious.d.ts +2 -0
  111. package/usePrevious.js +30 -62
  112. package/useResizeObserver.js +71 -136
  113. package/useRovingFocus.js +96 -41
  114. /package/types/src/{Select → SelectBase}/SelectAllOption.d.ts +0 -0
package/Popover.js CHANGED
@@ -61,10 +61,10 @@
61
61
  e.r(t);
62
62
  // EXPORTS
63
63
  e.d(t, {
64
- PopoverContext: () => /* reexport */ ve,
65
- PopoverMenuContext: () => /* reexport */ st,
66
- PopoverProvider: () => /* reexport */ he,
67
- default: () => /* reexport */ ft
64
+ PopoverContext: () => /* reexport */ de,
65
+ PopoverMenuContext: () => /* reexport */ pt,
66
+ PopoverProvider: () => /* reexport */ me,
67
+ default: () => /* reexport */ st
68
68
  });
69
69
  // CONCATENATED MODULE: external "react"
70
70
  const r = require("react");
@@ -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) {
@@ -442,16 +442,19 @@
442
442
  const U = require("@splunk/themes");
443
443
  // CONCATENATED MODULE: ./src/Popover/PopoverStyles.ts
444
444
  var G = 8;
445
- var J = Y()(X.animated.div).withConfig({
445
+ // this works around SUI-7977 and SUI-8062 by insetting the arrow into the box
446
+ // such that a 1px gap does not appear between the arrow and the box when the Popover is resized or zoomed
447
+ var J = 1;
448
+ var Q = Y()(X.animated.div).withConfig({
446
449
  displayName: "PopoverStyles__Styled",
447
450
  componentId: "sc-1nahsvw-0"
448
451
  })([ "position:fixed;z-index:", ";left:-300%;top:-300%;" ], U.variables.zindexPopover);
449
452
  // These hex codes are the inverted values of variables.backgroundColorPopup which are not exposed as tokens
450
- var Q = (0, B.css)([ "", "" ], (0, U.pick)({
453
+ var Z = (0, B.css)([ "", "" ], (0, U.pick)({
451
454
  light: "#27292e",
452
455
  dark: U.variables.white
453
456
  }));
454
- var Z = Y().div.withConfig({
457
+ var ee = Y().div.withConfig({
455
458
  displayName: "PopoverStyles__StyledBox",
456
459
  componentId: "sc-1nahsvw-1"
457
460
  })([ "", ";", ";", ";" ], U.mixins.reset("block"), (function(e) {
@@ -461,55 +464,55 @@
461
464
  var t = e.$appearance, r = e.$boxPadding;
462
465
  return t !== "none" && (0, B.css)([ "padding:", "px;" ], r);
463
466
  }));
464
- var ee = Y().div.withConfig({
467
+ var te = Y().div.withConfig({
465
468
  displayName: "PopoverStyles__StyledContent",
466
469
  componentId: "sc-1nahsvw-2"
467
470
  })([ "border-radius:", ";background-color:", ";color:", ";", "" ], U.variables.borderRadius, (0,
468
471
  U.pickVariant)("$appearance", {
469
472
  normal: U.variables.backgroundColorPopup,
470
- inverted: Q
473
+ inverted: Z
471
474
  }), (0, U.pickVariant)("$appearance", {
472
475
  normal: U.variables.contentColorDefault,
473
476
  inverted: U.variables.contentColorInverted
474
477
  }), (0, U.pickVariant)("$appearance", {
475
478
  normal: (0, B.css)([ "box-shadow:", ";" ], U.variables.overlayShadow)
476
479
  }));
477
- var te = Y().div.withConfig({
480
+ var re = Y().div.withConfig({
478
481
  displayName: "PopoverStyles__StyledArrow",
479
482
  componentId: "sc-1nahsvw-3"
480
- })([ "width:0;height:0;border-left:", "px solid transparent;border-right:", "px solid transparent;position:absolute;border-bottom-width:", "px;border-bottom-style:solid;", ";" ], G, G, G, (function(e) {
483
+ })([ "width:0;height:0;border-left:calc(", "px + ", "px) solid transparent;border-right:calc(", "px + ", "px) solid transparent;position:absolute;border-bottom-width:calc(", "px + ", "px);border-bottom-style:solid;", ";" ], G, J, G, J, G, J, (function(e) {
481
484
  var t = e.$appearance;
482
485
  return t !== "none" && (0, B.css)([ "border-bottom-color:", ";" ], (0, U.pickVariant)("$appearance", {
483
486
  normal: U.variables.backgroundColorPopup,
484
- inverted: Q
487
+ inverted: Z
485
488
  }));
486
489
  }));
487
- var re = Y().svg.withConfig({
490
+ var ne = Y().svg.withConfig({
488
491
  displayName: "PopoverStyles__StyledHitArea",
489
492
  componentId: "sc-1nahsvw-4"
490
493
  })([ "position:fixed;pointer-events:none;path{pointer-events:auto;stroke-width:0;stroke:transparent;fill:transparent;}" ]);
491
494
  // CONCATENATED MODULE: ./src/Popover/PopoverHitArea.tsx
492
- function ne(e, t) {
493
- return ce(e) || le(e, t) || ae(e, t) || oe();
495
+ function oe(e, t) {
496
+ return ue(e) || ce(e, t) || ie(e, t) || ae();
494
497
  }
495
- function oe() {
498
+ function ae() {
496
499
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
497
500
  }
498
- function ae(e, t) {
501
+ function ie(e, t) {
499
502
  if (e) {
500
- if ("string" == typeof e) return ie(e, t);
503
+ if ("string" == typeof e) return le(e, t);
501
504
  var r = {}.toString.call(e).slice(8, -1);
502
- return "Object" === r && e.constructor && (r = e.constructor.name), "Map" === r || "Set" === r ? Array.from(e) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? ie(e, t) : void 0;
505
+ return "Object" === r && e.constructor && (r = e.constructor.name), "Map" === r || "Set" === r ? Array.from(e) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? le(e, t) : void 0;
503
506
  }
504
507
  }
505
- function ie(e, t) {
508
+ function le(e, t) {
506
509
  (null == t || t > e.length) && (t = e.length);
507
510
  for (var r = 0, n = Array(t); r < t; r++) {
508
511
  n[r] = e[r];
509
512
  }
510
513
  return n;
511
514
  }
512
- function le(e, t) {
515
+ function ce(e, t) {
513
516
  var r = null == e ? null : "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"];
514
517
  if (null != r) {
515
518
  var n, o, a, i, l = [], c = !0, u = !1;
@@ -531,15 +534,15 @@
531
534
  return l;
532
535
  }
533
536
  }
534
- function ce(e) {
537
+ function ue(e) {
535
538
  if (Array.isArray(e)) return e;
536
539
  }
537
- var ue = {
540
+ var fe = {
538
541
  anchorRect: O().object,
539
542
  popoverEl: O().object,
540
543
  popoverPlacement: O().oneOf([ "above", "below", "left", "right", "misaligned" ])
541
544
  };
542
- var fe = function e(t) {
545
+ var se = function e(t) {
543
546
  var r = t.anchorRect, n = t.popoverEl, o = t.popoverPlacement;
544
547
  if (r != null && n != null && o != null) {
545
548
  var a = n.getBoundingClientRect();
@@ -581,10 +584,10 @@
581
584
  var P = "".concat(b, " ").concat(m);
582
585
  var S = "".concat(g, " ").concat(m);
583
586
  var O = "".concat(b, " ").concat(m + r.height);
584
- var C = "".concat(g, " ").concat(m + r.height);
585
- 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 ");
586
589
  return {
587
- hitAreaPath: E,
590
+ hitAreaPath: C,
588
591
  hitAreaStyle: {
589
592
  left: r.left,
590
593
  top: a.top,
@@ -599,12 +602,12 @@
599
602
  hitAreaStyle: {}
600
603
  };
601
604
  };
602
- var se = n().forwardRef((function(e, t) {
605
+ var pe = n().forwardRef((function(e, t) {
603
606
  var o = e.anchorRect, a = e.popoverEl, i = e.popoverPlacement;
604
- var l = (0, r.useState)(null), c = ne(l, 2), u = c[0], f = c[1];
605
- var s = (0, r.useState)({}), p = ne(s, 2), v = p[0], d = p[1];
607
+ var l = (0, r.useState)(null), c = oe(l, 2), u = c[0], f = c[1];
608
+ var s = (0, r.useState)({}), p = oe(s, 2), v = p[0], d = p[1];
606
609
  (0, r.useEffect)((function() {
607
- var e = fe({
610
+ var e = se({
608
611
  anchorRect: o,
609
612
  popoverEl: a,
610
613
  popoverPlacement: i
@@ -614,7 +617,7 @@
614
617
  }), [ o, a, i ]);
615
618
  if (u != null) {
616
619
 
617
- return n().createElement(re, {
620
+ return n().createElement(ne, {
618
621
  "data-test": "popover-hit-area",
619
622
  style: v
620
623
  }, n().createElement("path", {
@@ -624,11 +627,11 @@
624
627
  }
625
628
  return null;
626
629
  }));
627
- se.propTypes = ue;
628
- /* harmony default export */ const pe = se;
630
+ pe.propTypes = fe;
631
+ /* harmony default export */ const ve = pe;
629
632
  // CONCATENATED MODULE: ./src/Popover/PopoverProvider.tsx
630
- var ve = (0, r.createContext)({});
631
- var de = {
633
+ var de = (0, r.createContext)({});
634
+ var he = {
632
635
  /** @private */
633
636
  allowPropagation: O().bool,
634
637
  children: O().node,
@@ -636,7 +639,7 @@
636
639
  };
637
640
  /**
638
641
  * Provides a method for controlling certain `Popover` props in components that use `Popover`.
639
- */ var he = function e(t) {
642
+ */ var me = function e(t) {
640
643
  var o = t.allowPropagation, a = t.children, i = t.hideArrow;
641
644
  var l = (0, r.useMemo)((function() {
642
645
  return {
@@ -645,14 +648,14 @@
645
648
  };
646
649
  }), [ o, i ]);
647
650
 
648
- return n().createElement(ve.Provider, {
651
+ return n().createElement(de.Provider, {
649
652
  value: l
650
653
  }, a);
651
654
  };
652
- he.propTypes = de;
655
+ me.propTypes = he;
653
656
  // CONCATENATED MODULE: ./src/utils/ssrDocument.ts
654
657
  /* eslint-disable @typescript-eslint/no-empty-function */
655
- var me = {
658
+ var be = {
656
659
  body: {
657
660
  appendChild: function e() {
658
661
  return [];
@@ -706,16 +709,16 @@
706
709
  search: ""
707
710
  }
708
711
  };
709
- function be() {
710
- var e = typeof document !== "undefined" ? document : me;
712
+ function ge() {
713
+ var e = typeof document !== "undefined" ? document : be;
711
714
  return e;
712
715
  }
713
- var ge = be();
714
- /* harmony default export */ const ye = /* unused pure expression or super */ null && ge;
716
+ var ye = ge();
717
+ /* harmony default export */ const we = /* unused pure expression or super */ null && ye;
715
718
  // CONCATENATED MODULE: ./src/utils/ssrWindow.ts
716
719
  /* eslint-disable @typescript-eslint/no-empty-function */
717
- var we = {
718
- document: me,
720
+ var Pe = {
721
+ document: be,
719
722
  navigator: {
720
723
  userAgent: ""
721
724
  },
@@ -769,12 +772,12 @@
769
772
  clearTimeout(t);
770
773
  }
771
774
  };
772
- function Pe() {
773
- var e = typeof window !== "undefined" ? window : we;
775
+ function Se() {
776
+ var e = typeof window !== "undefined" ? window : Pe;
774
777
  return e;
775
778
  }
776
- var Se = Pe();
777
- /* harmony default export */ const Oe = /* unused pure expression or super */ null && Se;
779
+ var Oe = Se();
780
+ /* harmony default export */ const Ee = /* unused pure expression or super */ null && Oe;
778
781
  // CONCATENATED MODULE: ./src/utils/getBoundingClientRect.ts
779
782
  function Ce(e) {
780
783
  "@babel/helpers - typeof";
@@ -784,7 +787,7 @@
784
787
  return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
785
788
  }, Ce(e);
786
789
  }
787
- function Ee(e, t) {
790
+ function je(e, t) {
788
791
  var r = Object.keys(e);
789
792
  if (Object.getOwnPropertySymbols) {
790
793
  var n = Object.getOwnPropertySymbols(e);
@@ -794,30 +797,30 @@
794
797
  }
795
798
  return r;
796
799
  }
797
- function je(e) {
800
+ function xe(e) {
798
801
  for (var t = 1; t < arguments.length; t++) {
799
802
  var r = null != arguments[t] ? arguments[t] : {};
800
- t % 2 ? Ee(Object(r), !0).forEach((function(t) {
801
- xe(e, t, r[t]);
802
- })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : Ee(Object(r)).forEach((function(t) {
803
+ t % 2 ? je(Object(r), !0).forEach((function(t) {
804
+ ke(e, t, r[t]);
805
+ })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : je(Object(r)).forEach((function(t) {
803
806
  Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(r, t));
804
807
  }));
805
808
  }
806
809
  return e;
807
810
  }
808
- function xe(e, t, r) {
809
- return (t = ke(t)) in e ? Object.defineProperty(e, t, {
811
+ function ke(e, t, r) {
812
+ return (t = Ae(t)) in e ? Object.defineProperty(e, t, {
810
813
  value: r,
811
814
  enumerable: !0,
812
815
  configurable: !0,
813
816
  writable: !0
814
817
  }) : e[t] = r, e;
815
818
  }
816
- function ke(e) {
817
- var t = Ae(e, "string");
819
+ function Ae(e) {
820
+ var t = Te(e, "string");
818
821
  return "symbol" == Ce(t) ? t : t + "";
819
822
  }
820
- function Ae(e, t) {
823
+ function Te(e, t) {
821
824
  if ("object" != Ce(e) || !e) return e;
822
825
  var r = e[Symbol.toPrimitive];
823
826
  if (void 0 !== r) {
@@ -828,12 +831,12 @@
828
831
  return ("string" === t ? String : Number)(e);
829
832
  }
830
833
  // Checks if browser is Safari
831
- function Te() {
834
+ function Me() {
832
835
  return /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
833
836
  }
834
837
  // Formats return value to DOMRect
835
838
  function Re(e) {
836
- return je(je({}, e), {}, {
839
+ return xe(xe({}, e), {}, {
837
840
  top: e.y,
838
841
  left: e.x,
839
842
  right: e.x + e.width,
@@ -847,14 +850,14 @@
847
850
  * @param {boolean} offsets - Use when position of element relative to the layout viewport offsets are needed for Safari.
848
851
  * @returns {Omit<DOMRect, 'toJSON'>}
849
852
  * @public
850
- */ function Me(e, t) {
853
+ */ function We(e, t) {
851
854
  var r, n;
852
855
  var o = e.getBoundingClientRect();
853
- var a = Te();
856
+ var a = Me();
854
857
  if (!t || !a) {
855
858
  return o;
856
859
  }
857
- var i = Pe();
860
+ var i = Se();
858
861
  var l = o.left + (((r = i.visualViewport) === null || r === void 0 ? void 0 : r.offsetLeft) || 0);
859
862
  var c = o.top + (((n = i.visualViewport) === null || n === void 0 ? void 0 : n.offsetTop) || 0);
860
863
  var u = o.width, f = o.height;
@@ -872,7 +875,7 @@
872
875
  * @param ref - The React callback or object ref. Can be `null` or `undefined`.
873
876
  * @param current - The new value of the ref.
874
877
  */
875
- function We(e, t) {
878
+ function He(e, t) {
876
879
  if (e) {
877
880
  if (typeof e === "function") {
878
881
  e(t);
@@ -886,35 +889,35 @@
886
889
  }
887
890
  // CONCATENATED MODULE: ./src/utils/useDeprecate.tsx
888
891
  var qe = "is deprecated and will be removed in the next major version.";
889
- var He = function e(t) {
892
+ var Ie = function e(t) {
890
893
  var r = t.additionalMessage, n = r === void 0 ? "" : r, o = t.componentName;
891
894
  useEffect((function() {
892
895
  if (false) {}
893
896
  }), [ n, o ]);
894
897
  };
895
- var Ie = function e(t) {
898
+ var Ne = function e(t) {
896
899
  var r = t.additionalMessage, n = r === void 0 ? "" : r, o = t.componentName, a = t.propName, i = t.propValue;
897
900
  useEffect((function() {
898
901
  if (false) {}
899
902
  }), [ n, o, a, i ]);
900
903
  };
901
- var Ne = function e(t) {
904
+ var Le = function e(t) {
902
905
  var n = t.additionalMessage, o = n === void 0 ? "" : n, a = t.componentName, i = t.deprecatedPropValue, l = t.propName, c = t.propValue;
903
906
  (0, r.useEffect)((function() {
904
907
  if (false) {}
905
908
  }), [ o, a, l, c, i ]);
906
909
  };
907
910
  // CONCATENATED MODULE: ./src/Popover/Popover.tsx
908
- function Le(e) {
911
+ function De(e) {
909
912
  "@babel/helpers - typeof";
910
- return Le = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
913
+ return De = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
911
914
  return typeof e;
912
915
  } : function(e) {
913
916
  return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
914
- }, Le(e);
917
+ }, De(e);
915
918
  }
916
- function De() {
917
- return De = Object.assign ? Object.assign.bind() : function(e) {
919
+ function Fe() {
920
+ return Fe = Object.assign ? Object.assign.bind() : function(e) {
918
921
  for (var t = 1; t < arguments.length; t++) {
919
922
  var r = arguments[t];
920
923
  for (var n in r) {
@@ -922,9 +925,9 @@
922
925
  }
923
926
  }
924
927
  return e;
925
- }, De.apply(null, arguments);
928
+ }, Fe.apply(null, arguments);
926
929
  }
927
- function Fe(e, t) {
930
+ function $e(e, t) {
928
931
  var r = Object.keys(e);
929
932
  if (Object.getOwnPropertySymbols) {
930
933
  var n = Object.getOwnPropertySymbols(e);
@@ -934,60 +937,60 @@
934
937
  }
935
938
  return r;
936
939
  }
937
- function $e(e) {
940
+ function _e(e) {
938
941
  for (var t = 1; t < arguments.length; t++) {
939
942
  var r = null != arguments[t] ? arguments[t] : {};
940
- t % 2 ? Fe(Object(r), !0).forEach((function(t) {
941
- _e(e, t, r[t]);
942
- })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : Fe(Object(r)).forEach((function(t) {
943
+ t % 2 ? $e(Object(r), !0).forEach((function(t) {
944
+ Ve(e, t, r[t]);
945
+ })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : $e(Object(r)).forEach((function(t) {
943
946
  Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(r, t));
944
947
  }));
945
948
  }
946
949
  return e;
947
950
  }
948
- function _e(e, t, r) {
949
- return (t = Ve(t)) in e ? Object.defineProperty(e, t, {
951
+ function Ve(e, t, r) {
952
+ return (t = ze(t)) in e ? Object.defineProperty(e, t, {
950
953
  value: r,
951
954
  enumerable: !0,
952
955
  configurable: !0,
953
956
  writable: !0
954
957
  }) : e[t] = r, e;
955
958
  }
956
- function Ve(e) {
957
- var t = ze(e, "string");
958
- return "symbol" == Le(t) ? t : t + "";
959
+ function ze(e) {
960
+ var t = Ke(e, "string");
961
+ return "symbol" == De(t) ? t : t + "";
959
962
  }
960
- function ze(e, t) {
961
- if ("object" != Le(e) || !e) return e;
963
+ function Ke(e, t) {
964
+ if ("object" != De(e) || !e) return e;
962
965
  var r = e[Symbol.toPrimitive];
963
966
  if (void 0 !== r) {
964
967
  var n = r.call(e, t || "default");
965
- if ("object" != Le(n)) return n;
968
+ if ("object" != De(n)) return n;
966
969
  throw new TypeError("@@toPrimitive must return a primitive value.");
967
970
  }
968
971
  return ("string" === t ? String : Number)(e);
969
972
  }
970
- function Ke(e, t) {
971
- return Ge(e) || Ue(e, t) || Be(e, t) || Xe();
973
+ function Xe(e, t) {
974
+ return Je(e) || Ge(e, t) || Ye(e, t) || Be();
972
975
  }
973
- function Xe() {
976
+ function Be() {
974
977
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
975
978
  }
976
- function Be(e, t) {
979
+ function Ye(e, t) {
977
980
  if (e) {
978
- if ("string" == typeof e) return Ye(e, t);
981
+ if ("string" == typeof e) return Ue(e, t);
979
982
  var r = {}.toString.call(e).slice(8, -1);
980
- return "Object" === r && e.constructor && (r = e.constructor.name), "Map" === r || "Set" === r ? Array.from(e) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? Ye(e, t) : void 0;
983
+ return "Object" === r && e.constructor && (r = e.constructor.name), "Map" === r || "Set" === r ? Array.from(e) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? Ue(e, t) : void 0;
981
984
  }
982
985
  }
983
- function Ye(e, t) {
986
+ function Ue(e, t) {
984
987
  (null == t || t > e.length) && (t = e.length);
985
988
  for (var r = 0, n = Array(t); r < t; r++) {
986
989
  n[r] = e[r];
987
990
  }
988
991
  return n;
989
992
  }
990
- function Ue(e, t) {
993
+ function Ge(e, t) {
991
994
  var r = null == e ? null : "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"];
992
995
  if (null != r) {
993
996
  var n, o, a, i, l = [], c = !0, u = !1;
@@ -1009,12 +1012,12 @@
1009
1012
  return l;
1010
1013
  }
1011
1014
  }
1012
- function Ge(e) {
1015
+ function Je(e) {
1013
1016
  if (Array.isArray(e)) return e;
1014
1017
  }
1015
- function Je(e, t) {
1018
+ function Qe(e, t) {
1016
1019
  if (null == e) return {};
1017
- var r, n, o = Qe(e, t);
1020
+ var r, n, o = Ze(e, t);
1018
1021
  if (Object.getOwnPropertySymbols) {
1019
1022
  var a = Object.getOwnPropertySymbols(e);
1020
1023
  for (n = 0; n < a.length; n++) {
@@ -1023,7 +1026,7 @@
1023
1026
  }
1024
1027
  return o;
1025
1028
  }
1026
- function Qe(e, t) {
1029
+ function Ze(e, t) {
1027
1030
  if (null == e) return {};
1028
1031
  var r = {};
1029
1032
  for (var n in e) {
@@ -1038,8 +1041,8 @@
1038
1041
  /** @public */
1039
1042
  /** @public */
1040
1043
  /** @public */
1041
- /** @public */ var Ze = [ "clickAway", "escapeKey", "offScreen", "tabKey" ];
1042
- var et = {
1044
+ /** @public */ var et = [ "clickAway", "escapeKey", "offScreen", "tabKey" ];
1045
+ var tt = {
1043
1046
  align: O().oneOf([ "center", "edge", "end" ]),
1044
1047
  anchor: O().object,
1045
1048
  animation: O().bool,
@@ -1048,7 +1051,7 @@
1048
1051
  autoCloseWhenOffScreen: O().bool,
1049
1052
  canCoverAnchor: O().bool,
1050
1053
  children: O().oneOfType([ O().node, O().func ]),
1051
- closeReasons: O().arrayOf(O().oneOf(Ze)),
1054
+ closeReasons: O().arrayOf(O().oneOf(et)),
1052
1055
  defaultPlacement: O().oneOf([ "above", "below", "left", "right", "vertical", "horizontal" ]),
1053
1056
  elementRef: O().oneOfType([ O().func, O().object ]),
1054
1057
  id: O().string,
@@ -1066,11 +1069,11 @@
1066
1069
  takeFocus: O().bool,
1067
1070
  splunkTheme: O().object
1068
1071
  };
1069
- var tt = {
1072
+ var rt = {
1070
1073
  passive: false,
1071
1074
  capture: true
1072
1075
  };
1073
- function rt(e, t) {
1076
+ function nt(e, t) {
1074
1077
  var r = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
1075
1078
  return !!e && !!t && u()(e, (function(e, n) {
1076
1079
  if (h()(e)) {
@@ -1079,7 +1082,7 @@
1079
1082
  return t[n] === e;
1080
1083
  }));
1081
1084
  }
1082
- function nt(e) {
1085
+ function ot(e) {
1083
1086
  var t = e.anchorPos, r = e.borderRadius, n = e.placement, o = e.outerContainerStyle, i = e.outerContainerEl;
1084
1087
  if (n === "misaligned") {
1085
1088
  return [ {
@@ -1104,22 +1107,22 @@
1104
1107
  var m = a()(h, d, v);
1105
1108
  var b = {
1106
1109
  left: {
1107
- translateX: G / 2,
1110
+ translateX: (G + J) / 2,
1108
1111
  translateY: p,
1109
1112
  rotate: 90
1110
1113
  },
1111
1114
  right: {
1112
- translateX: -G / 2,
1115
+ translateX: -(G + J) / 2,
1113
1116
  translateY: p,
1114
1117
  rotate: -90
1115
1118
  },
1116
1119
  above: {
1117
- translateX: m,
1120
+ translateX: m - J / 2,
1118
1121
  translateY: 0,
1119
1122
  rotate: 180
1120
1123
  },
1121
1124
  below: {
1122
- translateX: m,
1125
+ translateX: m - J / 2,
1123
1126
  translateY: 0,
1124
1127
  rotate: 0
1125
1128
  }
@@ -1140,12 +1143,12 @@
1140
1143
  above: "left",
1141
1144
  below: "left"
1142
1145
  };
1143
- l[w[n]] = "50%";
1146
+ l[w[n]] = "calc(50% - ".concat(J, "px/2)");
1144
1147
  return [ l, g ];
1145
1148
  }
1146
- function ot(e) {
1149
+ function at(e) {
1147
1150
  var t = e.anchorEl, r = e.offsets, n = r === void 0 ? false : r, o = e.pointTo;
1148
- var a = Me(t, n);
1151
+ var a = We(t, n);
1149
1152
  var i = {
1150
1153
  // these are rounded to avoid causing visual regressions
1151
1154
  // they were previously clientWidth and clientHeight which were already rounded
@@ -1166,11 +1169,11 @@
1166
1169
  i.center = c ? i.top : a.top + (i.bottom - a.top) / 2;
1167
1170
  return i;
1168
1171
  }
1169
- function at(e) {
1172
+ function it(e) {
1170
1173
  return e !== window && e !== window.document;
1171
1174
  }
1172
- function it(e, t) {
1173
- var r = Pe();
1175
+ function lt(e, t) {
1176
+ var r = Se();
1174
1177
  if (e.top < 0 || e.top > r.innerHeight || e.left < 0 || e.left > r.innerWidth) {
1175
1178
  return true;
1176
1179
  }
@@ -1181,29 +1184,29 @@
1181
1184
  }
1182
1185
  return false;
1183
1186
  }
1184
- function lt(e, t) {
1187
+ function ct(e, t) {
1185
1188
  // this accomodates the arrow height
1186
1189
  // and provides some spacing between the end of the Popover and the edge of the window
1187
1190
  var r = G * 2;
1188
1191
  return t !== "none" && e != null && h()(e) ? e - r : e || null;
1189
1192
  }
1190
- var ct = {};
1193
+ var ut = {};
1191
1194
  /**
1192
1195
  * `Popover` is used to create layovers such as dropdowns, contextual menus, or tooltips. Use
1193
1196
  * this only when the other components don't provide sufficient functionality or control. A controlled
1194
1197
  * `Dropdown` covers use cases where you might consider using `Popover` directly.
1195
- */ function ut(e) {
1198
+ */ function ft(e) {
1196
1199
  var t, o;
1197
- 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 ? ct : 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 ? Ze : 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 = Je(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" ]);
1198
1201
  // @docs-props-type PopoverPropsBase
1199
- Ne({
1202
+ Le({
1200
1203
  componentName: "Popover",
1201
1204
  deprecatedPropValue: "inverted",
1202
1205
  propName: "appearance",
1203
1206
  propValue: h
1204
1207
  });
1205
- var U = (0, r.useState)(L), Q = Ke(U, 2), re = Q[0], ne = Q[1];
1206
- var oe = (0, r.useState)(false), ae = Ke(oe, 2), ie = ae[0], le = ae[1];
1208
+ var U = (0, r.useState)(L), J = Xe(U, 2), Z = J[0], ne = J[1];
1209
+ var oe = (0, r.useState)(false), ae = Xe(oe, 2), ie = ae[0], le = ae[1];
1207
1210
  if (L !== ie) {
1208
1211
  // formerly implemented by componentWillReceiveProps
1209
1212
  // we can't use prevOpen here since that's a ref behind the scenes
@@ -1215,8 +1218,8 @@
1215
1218
  }
1216
1219
  // this is a single state object because all these properties
1217
1220
  // are updated at the same time by setPlacement
1218
- var ce = (0, r.useState)({}), ue = Ke(ce, 2), fe = ue[0], se = ue[1];
1219
- var de = (0, r.useRef)(true);
1221
+ var ce = (0, r.useState)({}), ue = Xe(ce, 2), fe = ue[0], se = ue[1];
1222
+ var pe = (0, r.useRef)(true);
1220
1223
  var he = (0, r.useRef)(false);
1221
1224
  var me = (0, r.useRef)(null);
1222
1225
  var be = (0, r.useRef)(null);
@@ -1225,8 +1228,8 @@
1225
1228
  anchorHeight: ((t = fe.anchorPos) === null || t === void 0 ? void 0 : t.height) || null,
1226
1229
  anchorWidth: ((o = fe.anchorPos) === null || o === void 0 ? void 0 : o.width) || null,
1227
1230
  placement: fe.placement || null,
1228
- maxHeight: lt(fe.maxHeight, h),
1229
- maxWidth: lt(fe.maxWidth, h),
1231
+ maxHeight: ct(fe.maxHeight, h),
1232
+ maxWidth: ct(fe.maxWidth, h),
1230
1233
  toggleId: B
1231
1234
  };
1232
1235
  var we = (0, r.useMemo)((function() {
@@ -1236,22 +1239,22 @@
1236
1239
  opacity: 1
1237
1240
  };
1238
1241
  }), [ f, L ]);
1239
- var Se = Pe();
1240
- var Oe = L || re;
1241
- var Ce = (0, r.useContext)(T()) || Se;
1242
- var Ee = Ce !== Se;
1243
- var je = (0, r.useContext)(ve), xe = je.allowPropagation, ke = je.hideArrow;
1244
- var Ae = q !== null && q !== void 0 ? q : ke;
1242
+ var Pe = Se();
1243
+ var Oe = L || Z;
1244
+ var Ee = (0, r.useContext)(T()) || Pe;
1245
+ var Ce = Ee !== Pe;
1246
+ var je = (0, r.useContext)(de), xe = je.allowPropagation, ke = je.hideArrow;
1247
+ var Ae = H !== null && H !== void 0 ? H : ke;
1245
1248
  (0, r.useEffect)((function() {
1246
1249
  if (false) {}
1247
1250
  }), [ c ]);
1248
1251
  var Te = (0, r.useCallback)((function(e) {
1249
- 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))) {
1250
1253
  N === null || N === void 0 ? void 0 : N(e);
1251
1254
  }
1252
- }), [ E, L, N ]);
1253
- var Re = (0, r.useCallback)((function(e, t) {
1254
- var r = it(e, t);
1255
+ }), [ C, L, N ]);
1256
+ var Me = (0, r.useCallback)((function(e, t) {
1257
+ var r = lt(e, t);
1255
1258
  if (r) {
1256
1259
  Te({
1257
1260
  reason: "offScreen"
@@ -1259,13 +1262,13 @@
1259
1262
  }
1260
1263
  return r;
1261
1264
  }), [ Te ]);
1262
- var Me = M()(), qe = Me.borderRadius, He = Me.spacingXSmall;
1263
- var Ie = parseInt(qe, 10);
1264
- var Le = parseInt(He, 10);
1265
+ var Re = R()(), We = Re.borderRadius, qe = Re.spacingXSmall;
1266
+ var Ie = parseInt(We, 10);
1267
+ var Ne = parseInt(qe, 10);
1265
1268
  // this is intentionally smaller when the arrow is hidden to address SUI-5452
1266
- var Fe = Ae ? Le : G;
1269
+ var De = Ae ? Ne : G;
1267
1270
  // do not call this directly - use setPlacement (the throttled version) instead
1268
- var _e = (0, r.useCallback)((function(e) {
1271
+ var $e = (0, r.useCallback)((function(e) {
1269
1272
  se((function(t) {
1270
1273
  var r, n;
1271
1274
  // If these conditions are not met, we cannot set the popover.
@@ -1275,21 +1278,21 @@
1275
1278
  // }
1276
1279
  return t;
1277
1280
  }
1278
- var o = ot({
1281
+ var o = at({
1279
1282
  anchorEl: c,
1280
1283
  pointTo: F
1281
1284
  });
1282
- var a = ot({
1285
+ var a = at({
1283
1286
  anchorEl: c,
1284
1287
  offsets: true,
1285
1288
  pointTo: F
1286
1289
  });
1287
- var l = at(Ce) ? ot({
1288
- anchorEl: Ce,
1290
+ var l = it(Ee) ? at({
1291
+ anchorEl: Ee,
1289
1292
  pointTo: F
1290
1293
  }) : undefined;
1291
1294
  if (e && g) {
1292
- if (Re(o, l)) {
1295
+ if (Me(o, l)) {
1293
1296
  return t;
1294
1297
  }
1295
1298
  }
@@ -1301,27 +1304,27 @@
1301
1304
  defaultPlacement: A,
1302
1305
  repositionMode: _,
1303
1306
  outerContainerEl: ge.current,
1304
- padding: Fe,
1305
- windowWidth: Se.innerWidth,
1306
- windowHeight: Se.innerHeight
1307
+ padding: De,
1308
+ windowWidth: Pe.innerWidth,
1309
+ windowHeight: Pe.innerHeight
1307
1310
  }), f = u.placement, s = u.outerContainerStyle, p = u.maxHeight, v = u.maxWidth;
1308
- var d = rt(a, t.anchorPos) && rt(s, t.outerContainerStyle) && f === t.placement && p === t.maxHeight && v === t.maxWidth;
1311
+ var d = nt(a, t.anchorPos) && nt(s, t.outerContainerStyle) && f === t.placement && p === t.maxHeight && v === t.maxWidth;
1309
1312
  var h = true;
1310
1313
  var m = {};
1311
1314
  var b;
1312
1315
  if (me.current) {
1313
- var P = nt({
1316
+ var P = ot({
1314
1317
  anchorPos: a,
1315
1318
  borderRadius: Ie,
1316
1319
  outerContainerStyle: s,
1317
1320
  placement: f,
1318
1321
  outerContainerEl: ge.current
1319
1322
  });
1320
- var S = Ke(P, 2);
1323
+ var S = Xe(P, 2);
1321
1324
  m = S[0];
1322
1325
  b = S[1];
1323
1326
  }
1324
- h = rt(y()(m, "transform"), y()(t.arrowStyle, "transform")) && rt((r = b) !== null && r !== void 0 ? r : {}, (n = t.arrowStyleTransformMeta) !== null && n !== void 0 ? n : {});
1327
+ h = nt(y()(m, "transform"), y()(t.arrowStyle, "transform")) && nt((r = b) !== null && r !== void 0 ? r : {}, (n = t.arrowStyleTransformMeta) !== null && n !== void 0 ? n : {});
1325
1328
  // If none of the position data has changed, do not set state.
1326
1329
  if (d && h) {
1327
1330
  return t;
@@ -1336,27 +1339,27 @@
1336
1339
  maxWidth: v
1337
1340
  };
1338
1341
  }));
1339
- }), [ i, c, g, Ie, Fe, w, Re, A, L, F, _, Ce, Se.innerHeight, Se.innerWidth ]);
1342
+ }), [ i, c, g, Ie, De, w, Me, A, L, F, _, Ee, Pe.innerHeight, Pe.innerWidth ]);
1340
1343
  // these are useMemo rather than useCallback so that ESLint can correctly analyze the dependencies
1341
1344
  // see https://github.com/facebook/react/issues/19240#issuecomment-652945246
1342
1345
  var Ve = (0, r.useMemo)((function() {
1343
- return P()(_e.bind(null, true), 0);
1344
- }), [ _e ]);
1346
+ return P()($e.bind(null, true), 0);
1347
+ }), [ $e ]);
1345
1348
  var ze = (0, r.useMemo)((function() {
1346
- return P()(_e.bind(null, true), 0);
1347
- }), [ _e ]);
1348
- var Xe = (0, r.useMemo)((function() {
1349
- return P()(_e, 0, {
1349
+ return P()($e.bind(null, true), 0);
1350
+ }), [ $e ]);
1351
+ var Ke = (0, r.useMemo)((function() {
1352
+ return P()($e, 0, {
1350
1353
  leading: false
1351
1354
  });
1352
- }), [ _e ]);
1355
+ }), [ $e ]);
1353
1356
  // this needs to run on every render - equivalent to componentDidUpdate
1354
1357
  (0, r.useEffect)((function() {
1355
1358
  if (!be.current) {
1356
1359
  return;
1357
1360
  }
1358
- if (L || re) {
1359
- Xe();
1361
+ if (L || Z) {
1362
+ Ke();
1360
1363
  }
1361
1364
  }));
1362
1365
  (0, r.useEffect)((function() {
@@ -1368,39 +1371,39 @@
1368
1371
  (0, r.useEffect)((function() {
1369
1372
  // we need to set this to true on every mount because React.StrictMode will call the effect twice
1370
1373
  // and we need to ensure that allowAnimationUpdates is true while the component is mounted
1371
- de.current = true;
1374
+ pe.current = true;
1372
1375
  return function() {
1373
- Xe.cancel();
1376
+ Ke.cancel();
1374
1377
  Ve.cancel();
1375
1378
  ze.cancel();
1376
- de.current = false;
1379
+ pe.current = false;
1377
1380
  };
1378
1381
  // no dependencies here since this is equivalent to componentDidMount and componentWillUnmount
1379
1382
  // eslint-disable-next-line react-hooks/exhaustive-deps
1380
1383
  }), []);
1381
1384
  // EventListeners only need to be rendered when open,
1382
1385
  // otherwise leads to negative performance impacts
1383
- var Be = Oe ? n().createElement(n().Fragment, null, Ee && n().createElement(j(), {
1384
- target: Ce,
1386
+ var Be = Oe ? n().createElement(n().Fragment, null, Ce && n().createElement(j(), {
1387
+ target: Ee,
1385
1388
  eventType: "scroll",
1386
1389
  listener: Ve,
1387
- options: tt,
1390
+ options: rt,
1388
1391
  key: "eventListener"
1389
1392
  }), n().createElement(j(), {
1390
- target: Se,
1393
+ target: Pe,
1391
1394
  eventType: "resize",
1392
- listener: Xe,
1395
+ listener: Ke,
1393
1396
  key: "eventListenerOnWindowResize"
1394
1397
  }), n().createElement(j(), {
1395
- target: Se,
1398
+ target: Pe,
1396
1399
  eventType: "scroll",
1397
1400
  listener: ze,
1398
- options: tt,
1401
+ options: rt,
1399
1402
  key: "eventListenerOnWindowScroll"
1400
1403
  })) : null;
1401
1404
  var Ye = (0, r.useCallback)((function() {
1402
1405
  // checking allowAnimationUpdates avoids trying to update state after the component has been unmounted - see SUI-3666
1403
- if (de.current) {
1406
+ if (pe.current) {
1404
1407
  ne(false);
1405
1408
  }
1406
1409
  }), []);
@@ -1409,23 +1412,23 @@
1409
1412
  if (e && X) {
1410
1413
  l()(W.takeFocus, e);
1411
1414
  }
1412
- We(R, e);
1413
- }), [ R, X ]);
1415
+ He(M, e);
1416
+ }), [ M, X ]);
1414
1417
  var Ge = (0, r.useCallback)((function(e) {
1415
1418
  ge.current = e;
1416
- We(D, e);
1419
+ He(D, e);
1417
1420
  }), [ D ]);
1418
- var Qe = (0, r.useCallback)((function(e) {
1421
+ var Je = (0, r.useCallback)((function(e) {
1419
1422
  if (be.current) {
1420
1423
  if (z) {
1421
- (0, W.handleTab)(be.current, e);
1422
- } else if ((0, W.isTabKey)(e)) {
1424
+ (0, W.handleTab)(be.current, e.nativeEvent);
1425
+ } else if ((0, W.isTabKey)(e.nativeEvent)) {
1423
1426
  var t = (0, W.getSortedTabbableElements)(be.current);
1424
1427
  if (t.length > 0) {
1425
1428
  var r = e.shiftKey ? t[0] : t[t.length - 1];
1426
- if (r === e.target) {
1429
+ if (e.target instanceof HTMLElement && r === e.target) {
1427
1430
  Te({
1428
- event: e,
1431
+ event: e.nativeEvent,
1429
1432
  reason: "tabKey"
1430
1433
  });
1431
1434
  }
@@ -1433,25 +1436,25 @@
1433
1436
  }
1434
1437
  }
1435
1438
  }), [ Te, z ]);
1436
- var et = (0, r.useCallback)((function(e) {
1439
+ var Ze = (0, r.useCallback)((function(e) {
1437
1440
  if (!xe) {
1438
1441
  e.stopPropagation();
1439
1442
  }
1440
1443
  }), [ xe ]);
1441
- var ut = (0, r.useMemo)((function() {
1444
+ var tt = (0, r.useMemo)((function() {
1442
1445
  return {
1443
1446
  opacity: f ? 0 : 1
1444
1447
  };
1445
1448
  }), [ f ]);
1446
1449
  var ft = (0, r.useMemo)((function() {
1447
- return $e({
1450
+ return _e({
1448
1451
  tension: 300,
1449
1452
  friction: 20,
1450
1453
  clamp: true
1451
1454
  }, p);
1452
1455
  }), [ p ]);
1453
- var st = (0, C.useAnimation)({
1454
- from: ut,
1456
+ var st = (0, E.useAnimation)({
1457
+ from: tt,
1455
1458
  to: we,
1456
1459
  // Setting clamp to true will stop animating at the point it hit's it's goal value.
1457
1460
  // This will prevent click through while animating out (SUI-6618).
@@ -1459,13 +1462,13 @@
1459
1462
  onRest: Ye
1460
1463
  });
1461
1464
  var pt = (0, r.useMemo)((function() {
1462
- return $e($e({}, fe.outerContainerStyle), st);
1465
+ return _e(_e({}, fe.outerContainerStyle), st);
1463
1466
  }), [ fe.outerContainerStyle, st ]);
1464
1467
  var vt = (0, r.useMemo)((function() {
1465
- 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) {
1466
1469
  return e !== "offScreen";
1467
1470
  })), k().possibleCloseReasons);
1468
- }), [ E ]);
1471
+ }), [ C ]);
1469
1472
  var dt = b()(S) ? S(ye) : S;
1470
1473
 
1471
1474
  return n().createElement(n().Fragment, null, Be, n().createElement(k(), {
@@ -1473,39 +1476,39 @@
1473
1476
  open: Oe,
1474
1477
  onRequestClose: Te,
1475
1478
  key: "Layer"
1476
- }, Oe && be.current && H && n().createElement(pe, {
1479
+ }, Oe && be.current && q && n().createElement(ve, {
1477
1480
  anchorRect: fe.anchorPos,
1478
1481
  popoverEl: be.current,
1479
1482
  popoverPlacement: fe.placement,
1480
- ref: H
1481
- }), Oe && n().createElement(J, {
1483
+ ref: q
1484
+ }), Oe && n().createElement(Q, {
1482
1485
  "data-test": "outer-popover",
1483
1486
  style: pt,
1484
1487
  ref: Ge
1485
- }, n().createElement(Z, De({
1488
+ }, n().createElement(ee, Fe({
1486
1489
  $appearance: h,
1487
- $boxPadding: Fe,
1490
+ $boxPadding: De,
1488
1491
  $open: L,
1489
1492
  "data-test": "popover",
1490
1493
  ref: Ue,
1491
1494
  id: I,
1492
- onKeyDown: Qe
1493
- }, Y), n().createElement(n().Fragment, null, h === "none" && dt, h !== "none" && !Ae && n().createElement(te, {
1495
+ onKeyDown: Je
1496
+ }, Y), n().createElement(n().Fragment, null, h === "none" && dt, h !== "none" && !Ae && n().createElement(re, {
1494
1497
  "data-test": "popover-arrow",
1495
1498
  $appearance: h,
1496
- onClick: et,
1499
+ onClick: Ze,
1497
1500
  ref: me,
1498
1501
  style: fe.arrowStyle
1499
- }), h !== "none" && n().createElement(ee, {
1502
+ }), h !== "none" && n().createElement(te, {
1500
1503
  $appearance: h,
1501
- onClick: et
1504
+ onClick: Ze
1502
1505
  }, dt))))));
1503
1506
  }
1504
- ut.propTypes = et;
1505
- ut.possibleCloseReasons = Ze;
1506
- /* harmony default export */ const ft = ut;
1507
+ ft.propTypes = tt;
1508
+ ft.possibleCloseReasons = et;
1509
+ /* harmony default export */ const st = ft;
1507
1510
  // CONCATENATED MODULE: ./src/Popover/PopoverMenuContext.tsx
1508
- var st = (0, r.createContext)({});
1511
+ var pt = (0, r.createContext)({});
1509
1512
  // CONCATENATED MODULE: ./src/Popover/index.ts
1510
1513
  module.exports = t;
1511
1514
  /******/})();