@splunk/react-ui 4.41.0 → 4.42.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 (41) hide show
  1. package/ButtonGroup.js +1 -3
  2. package/CHANGELOG.md +22 -0
  3. package/Dropdown.js +33 -32
  4. package/Layer.js +115 -97
  5. package/Link.js +19 -21
  6. package/Menu.js +9 -8
  7. package/MessageBar.js +54 -56
  8. package/Multiselect.js +1051 -1035
  9. package/Number.js +51 -48
  10. package/Popover.js +481 -479
  11. package/Resize.js +61 -61
  12. package/ResultsMenu.js +4 -4
  13. package/Scroll.js +482 -475
  14. package/Select.js +532 -513
  15. package/Table.js +1515 -1433
  16. package/Text.js +29 -17
  17. package/TextArea.js +37 -37
  18. package/Tooltip.js +300 -207
  19. package/package.json +4 -4
  20. package/types/src/ButtonGroup/ButtonGroup.d.ts +0 -4
  21. package/types/src/Dropdown/Dropdown.d.ts +2 -1
  22. package/types/src/Layer/Layer.d.ts +2 -1
  23. package/types/src/Link/Link.d.ts +0 -2
  24. package/types/src/Number/Number.d.ts +10 -2
  25. package/types/src/Popover/Popover.d.ts +1 -4
  26. package/types/src/Resize/Resize.d.ts +0 -11
  27. package/types/src/Scroll/Inner.d.ts +17 -19
  28. package/types/src/Select/SelectBase.d.ts +6 -4
  29. package/types/src/Table/ExpandButton.d.ts +8 -0
  30. package/types/src/Table/HeadDropdownCell.d.ts +2 -0
  31. package/types/src/Table/HeadInner.d.ts +5 -1
  32. package/types/src/Table/Row.d.ts +8 -2
  33. package/types/src/Tooltip/Tooltip.d.ts +38 -5
  34. package/types/src/Tooltip/docs/examples/CustomProps.d.ts +2 -0
  35. package/types/src/Tooltip/docs/examples/Toggletip.d.ts +2 -0
  36. package/types/src/useControlled/useControlled.d.ts +5 -4
  37. package/useControlled.js +37 -15
  38. package/usePrevious.js +62 -30
  39. package/useRovingFocus.js +5 -4
  40. package/types/src/Table/icons/ExpansionRow.d.ts +0 -6
  41. package/types/src/Tooltip/docs/examples/CustomContent.d.ts +0 -2
package/Popover.js CHANGED
@@ -61,8 +61,8 @@
61
61
  e.r(t);
62
62
  // EXPORTS
63
63
  e.d(t, {
64
- PopoverContext: () => /* reexport */ U,
65
- default: () => /* reexport */ lt
64
+ PopoverContext: () => /* reexport */ z,
65
+ default: () => /* reexport */ ft
66
66
  });
67
67
  // CONCATENATED MODULE: external "react"
68
68
  const r = require("react");
@@ -76,11 +76,11 @@
76
76
  const l = require("lodash/clamp");
77
77
  var c = e.n(l);
78
78
  // CONCATENATED MODULE: external "lodash/defer"
79
- const s = require("lodash/defer");
80
- var u = e.n(s);
79
+ const u = require("lodash/defer");
80
+ var f = e.n(u);
81
81
  // CONCATENATED MODULE: external "lodash/every"
82
- const f = require("lodash/every");
83
- var p = e.n(f);
82
+ const s = require("lodash/every");
83
+ var p = e.n(s);
84
84
  // CONCATENATED MODULE: external "lodash/has"
85
85
  const h = require("lodash/has");
86
86
  var d = e.n(h);
@@ -106,12 +106,12 @@
106
106
  const k = require("lodash/throttle");
107
107
  var x = e.n(k);
108
108
  // CONCATENATED MODULE: external "@splunk/themes"
109
- const A = require("@splunk/themes");
109
+ const T = require("@splunk/themes");
110
110
  // CONCATENATED MODULE: external "@splunk/react-ui/Animation"
111
- const T = require("@splunk/react-ui/Animation");
111
+ const A = require("@splunk/react-ui/Animation");
112
112
  // CONCATENATED MODULE: external "@splunk/react-ui/EventListener"
113
- const q = require("@splunk/react-ui/EventListener");
114
- var W = e.n(q);
113
+ const W = require("@splunk/react-ui/EventListener");
114
+ var q = e.n(W);
115
115
  // CONCATENATED MODULE: external "@splunk/react-ui/Layer"
116
116
  const M = require("@splunk/react-ui/Layer");
117
117
  var R = e.n(M);
@@ -119,17 +119,17 @@
119
119
  const H = require("@splunk/react-ui/ScrollContainerContext");
120
120
  var _ = e.n(H);
121
121
  // CONCATENATED MODULE: external "@splunk/ui-utils/focus"
122
- const L = require("@splunk/ui-utils/focus");
122
+ const D = require("@splunk/ui-utils/focus");
123
123
  // CONCATENATED MODULE: ./src/Popover/getPlacement.ts
124
- function D(e) {
124
+ function I(e) {
125
125
  "@babel/helpers - typeof";
126
- return D = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
126
+ return I = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
127
127
  return typeof e;
128
128
  } : function(e) {
129
129
  return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
130
- }, D(e);
130
+ }, I(e);
131
131
  }
132
- function I(e, t) {
132
+ function L(e, t) {
133
133
  var r = Object.keys(e);
134
134
  if (Object.getOwnPropertySymbols) {
135
135
  var n = Object.getOwnPropertySymbols(e);
@@ -139,18 +139,18 @@
139
139
  }
140
140
  return r;
141
141
  }
142
- function N(e) {
142
+ function F(e) {
143
143
  for (var t = 1; t < arguments.length; t++) {
144
144
  var r = null != arguments[t] ? arguments[t] : {};
145
- t % 2 ? I(Object(r), !0).forEach((function(t) {
146
- F(e, t, r[t]);
147
- })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : I(Object(r)).forEach((function(t) {
145
+ t % 2 ? L(Object(r), !0).forEach((function(t) {
146
+ N(e, t, r[t]);
147
+ })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : L(Object(r)).forEach((function(t) {
148
148
  Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(r, t));
149
149
  }));
150
150
  }
151
151
  return e;
152
152
  }
153
- function F(e, t, r) {
153
+ function N(e, t, r) {
154
154
  return (t = $(t)) in e ? Object.defineProperty(e, t, {
155
155
  value: r,
156
156
  enumerable: !0,
@@ -159,20 +159,20 @@
159
159
  }) : e[t] = r, e;
160
160
  }
161
161
  function $(e) {
162
- var t = z(e, "string");
163
- return "symbol" == D(t) ? t : t + "";
162
+ var t = V(e, "string");
163
+ return "symbol" == I(t) ? t : t + "";
164
164
  }
165
- function z(e, t) {
166
- if ("object" != D(e) || !e) return e;
165
+ function V(e, t) {
166
+ if ("object" != I(e) || !e) return e;
167
167
  var r = e[Symbol.toPrimitive];
168
168
  if (void 0 !== r) {
169
169
  var n = r.call(e, t || "default");
170
- if ("object" != D(n)) return n;
170
+ if ("object" != I(n)) return n;
171
171
  throw new TypeError("@@toPrimitive must return a primitive value.");
172
172
  }
173
173
  return ("string" === t ? String : Number)(e);
174
174
  }
175
- function V(e) {
175
+ function B(e) {
176
176
  var t = e.align, r = e.anchorPos, n = e.outerContainerEl, o = e.padding, a = e.placement;
177
177
  switch (a) {
178
178
  case "above":
@@ -211,21 +211,21 @@
211
211
  throw new Error("".concat(a, " is not a valid placement value. Valid options are: 'above', 'below', 'left', or 'right'"));
212
212
  }
213
213
  }
214
- function B(e) {
215
- var t = e.align, r = e.anchorPos, n = e.scrollContainerPos, o = e.canCoverAnchor, a = e.defaultPlacement, i = e.outerContainerEl, l = e.padding, c = e.repositionMode, s = e.windowHeight, u = e.windowWidth;
216
- var f = c === "flip";
214
+ function U(e) {
215
+ var t = e.align, r = e.anchorPos, n = e.scrollContainerPos, o = e.canCoverAnchor, a = e.defaultPlacement, i = e.outerContainerEl, l = e.padding, c = e.repositionMode, u = e.windowHeight, f = e.windowWidth;
216
+ var s = c === "flip";
217
217
  var p = c === "any";
218
- var h = f || p;
218
+ var h = s || p;
219
219
  var d = e.placement || a;
220
220
  // Translate vertical/horizontal to above/below/left/right
221
221
  if (a === "vertical") {
222
- d = r.top > s - r.bottom ? "above" : "below";
222
+ d = r.top > u - r.bottom ? "above" : "below";
223
223
  } else if (a === "horizontal") {
224
- d = r.left > u - r.right ? "left" : "right";
224
+ d = r.left > f - r.right ? "left" : "right";
225
225
  }
226
226
  var v = d;
227
227
  // Initialize the result variables. These will be mutated as needed and returned.
228
- var m = V({
228
+ var m = B({
229
229
  align: t,
230
230
  anchorPos: r,
231
231
  outerContainerEl: i,
@@ -233,34 +233,34 @@
233
233
  placement: v
234
234
  }), b = m.top, y = m.left;
235
235
  var g = "auto";
236
- var w = u;
237
- var S = s;
236
+ var w = f;
237
+ var S = u;
238
238
  var O = v;
239
239
  // Boolean convenience variables to simplify positioning logic.
240
240
  var P = r.top - i.offsetHeight > 0;
241
- var E = r.bottom + i.offsetHeight < s;
241
+ var E = r.bottom + i.offsetHeight < u;
242
242
  var C = r.left - i.offsetWidth > 0;
243
- var j = r.right + i.offsetWidth < u;
244
- var k = r.top * .7 > s - r.bottom;
245
- var x = (t === "edge" ? r.left + i.offsetWidth - l : r.middle + i.offsetWidth / 2) > u;
246
- var A = (t === "edge" ? r.left - l : r.middle - i.offsetWidth / 2) < 0;
247
- var T = (t === "edge" ? r.top - l : r.top - i.offsetHeight / 2) < 0;
248
- var q = (t === "edge" ? r.top + i.offsetHeight - l : r.bottom + i.offsetHeight / 2) > s;
243
+ var j = r.right + i.offsetWidth < f;
244
+ var k = r.top * .7 > u - r.bottom;
245
+ var x = (t === "edge" ? r.left + i.offsetWidth - l : r.middle + i.offsetWidth / 2) > f;
246
+ var T = (t === "edge" ? r.left - l : r.middle - i.offsetWidth / 2) < 0;
247
+ var A = (t === "edge" ? r.top - l : r.top - i.offsetHeight / 2) < 0;
248
+ var W = (t === "edge" ? r.top + i.offsetHeight - l : r.bottom + i.offsetHeight / 2) > u;
249
249
  // Handle each of the four placement options individually.
250
250
  if (O === "above") {
251
251
  if (!P && h) {
252
252
  if (E) {
253
- return B(N(N({}, e), {}, {
253
+ return U(F(F({}, e), {}, {
254
254
  placement: "below"
255
255
  }));
256
256
  }
257
257
  if (p && j) {
258
- return B(N(N({}, e), {}, {
258
+ return U(F(F({}, e), {}, {
259
259
  placement: "right"
260
260
  }));
261
261
  }
262
262
  if (p && C) {
263
- return B(N(N({}, e), {}, {
263
+ return U(F(F({}, e), {}, {
264
264
  placement: "left"
265
265
  }));
266
266
  }
@@ -270,15 +270,15 @@
270
270
  }
271
271
  }
272
272
  if (O !== "misaligned") {
273
- g = s - b - i.offsetHeight;
273
+ g = u - b - i.offsetHeight;
274
274
  if (n) {
275
- g = Math.min(g, s - n.top);
275
+ g = Math.min(g, u - n.top);
276
276
  }
277
277
  b = "auto";
278
278
  }
279
279
  if (x) {
280
- y = Math.max(u - i.offsetWidth, 0);
281
- } else if (A) {
280
+ y = Math.max(f - i.offsetWidth, 0);
281
+ } else if (T) {
282
282
  y = 0;
283
283
  }
284
284
  if (!o) {
@@ -288,17 +288,17 @@
288
288
  if (O === "below") {
289
289
  if (!E && h) {
290
290
  if (P && k) {
291
- return B(N(N({}, e), {}, {
291
+ return U(F(F({}, e), {}, {
292
292
  placement: "above"
293
293
  }));
294
294
  }
295
295
  if (p && j) {
296
- return B(N(N({}, e), {}, {
296
+ return U(F(F({}, e), {}, {
297
297
  placement: "right"
298
298
  }));
299
299
  }
300
300
  if (p && C) {
301
- return B(N(N({}, e), {}, {
301
+ return U(F(F({}, e), {}, {
302
302
  placement: "left"
303
303
  }));
304
304
  }
@@ -311,28 +311,28 @@
311
311
  b = Math.min(b, n.bottom);
312
312
  }
313
313
  if (x) {
314
- y = Math.max(u - i.offsetWidth, 0);
315
- } else if (A) {
314
+ y = Math.max(f - i.offsetWidth, 0);
315
+ } else if (T) {
316
316
  y = 0;
317
317
  }
318
318
  if (!o) {
319
- S = s - r.bottom;
319
+ S = u - r.bottom;
320
320
  }
321
321
  }
322
322
  if (O === "left") {
323
323
  if (!C && h) {
324
324
  if (j) {
325
- return B(N(N({}, e), {}, {
325
+ return U(F(F({}, e), {}, {
326
326
  placement: "right"
327
327
  }));
328
328
  }
329
329
  if (p && E) {
330
- return B(N(N({}, e), {}, {
330
+ return U(F(F({}, e), {}, {
331
331
  placement: "below"
332
332
  }));
333
333
  }
334
334
  if (p && P) {
335
- return B(N(N({}, e), {}, {
335
+ return U(F(F({}, e), {}, {
336
336
  placement: "above"
337
337
  }));
338
338
  }
@@ -341,10 +341,10 @@
341
341
  b = 0;
342
342
  }
343
343
  }
344
- if (T) {
344
+ if (A) {
345
345
  b = 0;
346
- } else if (q) {
347
- b = Math.max(s - i.offsetHeight, 0);
346
+ } else if (W) {
347
+ b = Math.max(u - i.offsetHeight, 0);
348
348
  }
349
349
  if (!o) {
350
350
  w = r.left;
@@ -353,17 +353,17 @@
353
353
  if (O === "right") {
354
354
  if (!j && h) {
355
355
  if (C) {
356
- return B(N(N({}, e), {}, {
356
+ return U(F(F({}, e), {}, {
357
357
  placement: "left"
358
358
  }));
359
359
  }
360
360
  if (p && E) {
361
- return B(N(N({}, e), {}, {
361
+ return U(F(F({}, e), {}, {
362
362
  placement: "below"
363
363
  }));
364
364
  }
365
365
  if (p && P) {
366
- return B(N(N({}, e), {}, {
366
+ return U(F(F({}, e), {}, {
367
367
  placement: "above"
368
368
  }));
369
369
  }
@@ -372,13 +372,13 @@
372
372
  b = 0;
373
373
  }
374
374
  }
375
- if (T) {
375
+ if (A) {
376
376
  b = 0;
377
- } else if (q) {
378
- b = Math.max(s - i.offsetHeight, 0);
377
+ } else if (W) {
378
+ b = Math.max(u - i.offsetHeight, 0);
379
379
  }
380
380
  if (!o) {
381
- w = u - r.left;
381
+ w = f - r.left;
382
382
  }
383
383
  }
384
384
  return {
@@ -393,25 +393,25 @@
393
393
  };
394
394
  }
395
395
  // CONCATENATED MODULE: ./src/Popover/PopoverContext.tsx
396
- var U = (0, r.createContext)({});
396
+ var z = (0, r.createContext)({});
397
397
  // CONCATENATED MODULE: external "react-spring"
398
398
  const K = require("react-spring");
399
399
  // CONCATENATED MODULE: external "styled-components"
400
400
  const X = require("styled-components");
401
401
  var Y = e.n(X);
402
402
  // CONCATENATED MODULE: ./src/Popover/PopoverStyles.ts
403
- var G = (0, A.pick)({
403
+ var G = (0, T.pick)({
404
404
  enterprise: "8px",
405
405
  prisma: 0
406
406
  });
407
407
  var J = Y()(K.animated.div).withConfig({
408
408
  displayName: "PopoverStyles__Styled",
409
409
  componentId: "sc-1nahsvw-0"
410
- })([ "position:fixed;z-index:", ";left:-300%;top:-300%;" ], A.variables.zindexPopover);
410
+ })([ "position:fixed;z-index:", ";left:-300%;top:-300%;" ], T.variables.zindexPopover);
411
411
  var Q = Y().div.withConfig({
412
412
  displayName: "PopoverStyles__StyledBox",
413
413
  componentId: "sc-1nahsvw-1"
414
- })([ "", ";", ";", ";" ], A.mixins.reset("block"), (function(e) {
414
+ })([ "", ";", ";", ";" ], T.mixins.reset("block"), (function(e) {
415
415
  var t = e.$open;
416
416
  return !t && (0, X.css)([ "pointer-events:none;" ]);
417
417
  }), (function(e) {
@@ -421,36 +421,36 @@
421
421
  var Z = Y().div.withConfig({
422
422
  displayName: "PopoverStyles__StyledContent",
423
423
  componentId: "sc-1nahsvw-2"
424
- })([ "border-radius:", ";background-color:", ";color:", ";", "" ], A.variables.borderRadius, (0,
425
- A.pickVariant)("$appearance", {
426
- normal: A.variables.backgroundColorPopup,
424
+ })([ "border-radius:", ";background-color:", ";color:", ";", "" ], T.variables.borderRadius, (0,
425
+ T.pickVariant)("$appearance", {
426
+ normal: T.variables.backgroundColorPopup,
427
427
  inverted: {
428
428
  enterprise: {
429
- light: A.variables.gray20,
430
- dark: A.variables.white
429
+ light: T.variables.gray20,
430
+ dark: T.variables.white
431
431
  },
432
432
  // These hex codes are the inverted values of variables.backgroundColorPopup which are not exposed as tokens
433
433
  prisma: {
434
434
  light: "#27292e",
435
- dark: A.variables.white
435
+ dark: T.variables.white
436
436
  }
437
437
  }
438
- }), (0, A.pickVariant)("$appearance", {
439
- normal: A.variables.contentColorDefault,
438
+ }), (0, T.pickVariant)("$appearance", {
439
+ normal: T.variables.contentColorDefault,
440
440
  inverted: {
441
441
  enterprise: {
442
- light: A.variables.white,
443
- dark: A.variables.gray30
442
+ light: T.variables.white,
443
+ dark: T.variables.gray30
444
444
  },
445
- prisma: A.variables.contentColorInverted
445
+ prisma: T.variables.contentColorInverted
446
446
  }
447
- }), (0, A.pickVariant)("$appearance", {
448
- normal: (0, X.css)([ "", ";" ], (0, A.pick)({
447
+ }), (0, T.pickVariant)("$appearance", {
448
+ normal: (0, X.css)([ "", ";" ], (0, T.pick)({
449
449
  enterprise: {
450
- light: (0, X.css)([ "box-shadow:0 2px 2px ", ";border:", ";" ], A.mixins.colorWithAlpha(A.variables.gray20, .1), A.variables.border),
451
- dark: (0, X.css)([ "box-shadow:0 1px 2px #000;border:", ";" ], A.variables.border)
450
+ light: (0, X.css)([ "box-shadow:0 2px 2px ", ";border:", ";" ], T.mixins.colorWithAlpha(T.variables.gray20, .1), T.variables.border),
451
+ dark: (0, X.css)([ "box-shadow:0 1px 2px #000;border:", ";" ], T.variables.border)
452
452
  },
453
- prisma: (0, X.css)([ "box-shadow:", ";" ], A.variables.overlayShadow)
453
+ prisma: (0, X.css)([ "box-shadow:", ";" ], T.variables.overlayShadow)
454
454
  }))
455
455
  }));
456
456
  // Enterprise Only
@@ -458,50 +458,46 @@
458
458
  displayName: "PopoverStyles__StyledArrow",
459
459
  componentId: "sc-1nahsvw-3"
460
460
  })([ "width:0;height:0;border-left:", " solid transparent;border-right:", " solid transparent;position:absolute;border-bottom-width:", ";border-bottom-style:solid;", "" ], G, G, G, (0,
461
- A.pickVariant)("$appearance", {
461
+ T.pickVariant)("$appearance", {
462
462
  normal: (0, X.css)([ "border-bottom-color:", ";&::before{content:'';display:block;width:0;height:0;border-left:", " solid transparent;border-right:", " solid transparent;border-bottom:", " solid ", ";position:absolute;top:1px;left:0;margin-left:-", ";}" ], (0,
463
- A.pick)({
464
- light: A.variables.borderColor,
465
- dark: A.variables.black
466
- }), G, G, G, A.variables.backgroundColor, G),
467
- inverted: (0, X.css)([ "border-bottom-color:", ";" ], (0, A.pick)({
468
- light: A.variables.gray20,
469
- dark: A.variables.white
463
+ T.pick)({
464
+ light: T.variables.borderColor,
465
+ dark: T.variables.black
466
+ }), G, G, G, T.variables.backgroundColor, G),
467
+ inverted: (0, X.css)([ "border-bottom-color:", ";" ], (0, T.pick)({
468
+ light: T.variables.gray20,
469
+ dark: T.variables.white
470
470
  }))
471
471
  }));
472
- var te = Y().div.withConfig({
473
- displayName: "PopoverStyles__StyledLowerRightCorner",
474
- componentId: "sc-1nahsvw-4"
475
- })([ "position:fixed;right:0;bottom:0;" ]);
476
- var re = Y().svg.withConfig({
472
+ var te = Y().svg.withConfig({
477
473
  displayName: "PopoverStyles__StyledHitArea",
478
- componentId: "sc-1nahsvw-5"
474
+ componentId: "sc-1nahsvw-4"
479
475
  })([ "position:fixed;pointer-events:none;path{pointer-events:auto;stroke-width:0;stroke:transparent;fill:transparent;}" ]);
480
476
  // CONCATENATED MODULE: ./src/Popover/PopoverHitArea.tsx
481
- function ne(e, t) {
482
- return ce(e) || le(e, t) || ae(e, t) || oe();
477
+ function re(e, t) {
478
+ return le(e) || ie(e, t) || oe(e, t) || ne();
483
479
  }
484
- function oe() {
480
+ function ne() {
485
481
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
486
482
  }
487
- function ae(e, t) {
483
+ function oe(e, t) {
488
484
  if (e) {
489
- if ("string" == typeof e) return ie(e, t);
485
+ if ("string" == typeof e) return ae(e, t);
490
486
  var r = {}.toString.call(e).slice(8, -1);
491
- 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;
487
+ 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) ? ae(e, t) : void 0;
492
488
  }
493
489
  }
494
- function ie(e, t) {
490
+ function ae(e, t) {
495
491
  (null == t || t > e.length) && (t = e.length);
496
492
  for (var r = 0, n = Array(t); r < t; r++) {
497
493
  n[r] = e[r];
498
494
  }
499
495
  return n;
500
496
  }
501
- function le(e, t) {
497
+ function ie(e, t) {
502
498
  var r = null == e ? null : "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"];
503
499
  if (null != r) {
504
- var n, o, a, i, l = [], c = !0, s = !1;
500
+ var n, o, a, i, l = [], c = !0, u = !1;
505
501
  try {
506
502
  if (a = (r = r.call(e)).next, 0 === t) {
507
503
  if (Object(r) !== r) return;
@@ -509,21 +505,21 @@
509
505
  } else for (;!(c = (n = a.call(r)).done) && (l.push(n.value), l.length !== t); c = !0) {
510
506
  }
511
507
  } catch (e) {
512
- s = !0, o = e;
508
+ u = !0, o = e;
513
509
  } finally {
514
510
  try {
515
511
  if (!c && null != r["return"] && (i = r["return"](), Object(i) !== i)) return;
516
512
  } finally {
517
- if (s) throw o;
513
+ if (u) throw o;
518
514
  }
519
515
  }
520
516
  return l;
521
517
  }
522
518
  }
523
- function ce(e) {
519
+ function le(e) {
524
520
  if (Array.isArray(e)) return e;
525
521
  }
526
- var se = {
522
+ var ce = {
527
523
  anchorRect: a().object,
528
524
  popoverEl: a().object,
529
525
  popoverPlacement: a().oneOf([ "above", "below", "left", "right", "misaligned" ])
@@ -540,13 +536,13 @@
540
536
  l = 0;
541
537
  c = r.height;
542
538
  }
543
- var s = "0 ".concat(l);
544
- var u = "".concat(a.width, " ").concat(l);
545
- var f = "".concat(i, " ").concat(l);
539
+ var u = "0 ".concat(l);
540
+ var f = "".concat(a.width, " ").concat(l);
541
+ var s = "".concat(i, " ").concat(l);
546
542
  var p = "".concat(i, " ").concat(c);
547
543
  var h = "".concat(i + r.width, " ").concat(l);
548
544
  var d = "".concat(i + r.width, " ").concat(c);
549
- var v = "\n M ".concat(s, "\n S ").concat(f, " , ").concat(p, "\n L ").concat(f, "\n L ").concat(h, "\n L ").concat(d, "\n S ").concat(h, " , ").concat(u, "\n ");
545
+ var v = "\n M ".concat(u, "\n S ").concat(s, " , ").concat(p, "\n L ").concat(s, "\n L ").concat(h, "\n L ").concat(d, "\n S ").concat(h, " , ").concat(f, "\n ");
550
546
  return {
551
547
  hitAreaPath: v,
552
548
  hitAreaStyle: {
@@ -590,34 +586,34 @@
590
586
  };
591
587
  var fe = n().forwardRef((function(e, t) {
592
588
  var o = e.anchorRect, a = e.popoverEl, i = e.popoverPlacement;
593
- var l = (0, r.useState)(null), c = ne(l, 2), s = c[0], u = c[1];
594
- var f = (0, r.useState)({}), p = ne(f, 2), h = p[0], d = p[1];
589
+ var l = (0, r.useState)(null), c = re(l, 2), u = c[0], f = c[1];
590
+ var s = (0, r.useState)({}), p = re(s, 2), h = p[0], d = p[1];
595
591
  (0, r.useEffect)((function() {
596
592
  var e = ue({
597
593
  anchorRect: o,
598
594
  popoverEl: a,
599
595
  popoverPlacement: i
600
596
  }), t = e.hitAreaPath, r = e.hitAreaStyle;
601
- u(t);
597
+ f(t);
602
598
  d(r);
603
599
  }), [ o, a, i ]);
604
- if (s != null) {
600
+ if (u != null) {
605
601
 
606
- return n().createElement(re, {
602
+ return n().createElement(te, {
607
603
  "data-test": "popover-hit-area",
608
604
  style: h
609
605
  }, n().createElement("path", {
610
- d: s,
606
+ d: u,
611
607
  ref: t
612
608
  }));
613
609
  }
614
610
  return null;
615
611
  }));
616
- fe.propTypes = se;
617
- /* harmony default export */ const pe = fe;
612
+ fe.propTypes = ce;
613
+ /* harmony default export */ const se = fe;
618
614
  // CONCATENATED MODULE: ./src/utils/ssrDocument.ts
619
615
  /* eslint-disable @typescript-eslint/no-empty-function */
620
- var he = {
616
+ var pe = {
621
617
  body: {
622
618
  appendChild: function e() {
623
619
  return [];
@@ -671,14 +667,14 @@
671
667
  search: ""
672
668
  }
673
669
  };
674
- function de() {
675
- var e = typeof document !== "undefined" ? document : he;
670
+ function he() {
671
+ var e = typeof document !== "undefined" ? document : pe;
676
672
  return e;
677
673
  }
678
674
  // CONCATENATED MODULE: ./src/utils/ssrWindow.ts
679
675
  /* eslint-disable @typescript-eslint/no-empty-function */
680
- var ve = {
681
- document: he,
676
+ var de = {
677
+ document: pe,
682
678
  navigator: {
683
679
  userAgent: ""
684
680
  },
@@ -732,20 +728,20 @@
732
728
  clearTimeout(t);
733
729
  }
734
730
  };
735
- function me() {
736
- var e = typeof window !== "undefined" ? window : ve;
731
+ function ve() {
732
+ var e = typeof window !== "undefined" ? window : de;
737
733
  return e;
738
734
  }
739
735
  // CONCATENATED MODULE: ./src/utils/getBoundingClientRect.ts
740
- function be(e) {
736
+ function me(e) {
741
737
  "@babel/helpers - typeof";
742
- return be = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
738
+ return me = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
743
739
  return typeof e;
744
740
  } : function(e) {
745
741
  return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
746
- }, be(e);
742
+ }, me(e);
747
743
  }
748
- function ye(e, t) {
744
+ function be(e, t) {
749
745
  var r = Object.keys(e);
750
746
  if (Object.getOwnPropertySymbols) {
751
747
  var n = Object.getOwnPropertySymbols(e);
@@ -755,46 +751,46 @@
755
751
  }
756
752
  return r;
757
753
  }
758
- function ge(e) {
754
+ function ye(e) {
759
755
  for (var t = 1; t < arguments.length; t++) {
760
756
  var r = null != arguments[t] ? arguments[t] : {};
761
- t % 2 ? ye(Object(r), !0).forEach((function(t) {
762
- we(e, t, r[t]);
763
- })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : ye(Object(r)).forEach((function(t) {
757
+ t % 2 ? be(Object(r), !0).forEach((function(t) {
758
+ ge(e, t, r[t]);
759
+ })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : be(Object(r)).forEach((function(t) {
764
760
  Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(r, t));
765
761
  }));
766
762
  }
767
763
  return e;
768
764
  }
769
- function we(e, t, r) {
770
- return (t = Se(t)) in e ? Object.defineProperty(e, t, {
765
+ function ge(e, t, r) {
766
+ return (t = we(t)) in e ? Object.defineProperty(e, t, {
771
767
  value: r,
772
768
  enumerable: !0,
773
769
  configurable: !0,
774
770
  writable: !0
775
771
  }) : e[t] = r, e;
776
772
  }
777
- function Se(e) {
778
- var t = Oe(e, "string");
779
- return "symbol" == be(t) ? t : t + "";
773
+ function we(e) {
774
+ var t = Se(e, "string");
775
+ return "symbol" == me(t) ? t : t + "";
780
776
  }
781
- function Oe(e, t) {
782
- if ("object" != be(e) || !e) return e;
777
+ function Se(e, t) {
778
+ if ("object" != me(e) || !e) return e;
783
779
  var r = e[Symbol.toPrimitive];
784
780
  if (void 0 !== r) {
785
781
  var n = r.call(e, t || "default");
786
- if ("object" != be(n)) return n;
782
+ if ("object" != me(n)) return n;
787
783
  throw new TypeError("@@toPrimitive must return a primitive value.");
788
784
  }
789
785
  return ("string" === t ? String : Number)(e);
790
786
  }
791
787
  // Checks if browser is Safari
792
- function Pe() {
788
+ function Oe() {
793
789
  return /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
794
790
  }
795
791
  // Formats return value to DOMRect
796
- function Ee(e) {
797
- return ge(ge({}, e), {}, {
792
+ function Pe(e) {
793
+ return ye(ye({}, e), {}, {
798
794
  top: e.y,
799
795
  left: e.x,
800
796
  right: e.x + e.width,
@@ -808,20 +804,20 @@
808
804
  * @param {boolean} offsets - Use when position of element relative to the layout viewport offsets are needed for Safari.
809
805
  * @returns {Omit<DOMRect, 'toJSON'>}
810
806
  * @public
811
- */ function Ce(e, t) {
807
+ */ function Ee(e, t) {
812
808
  var r, n;
813
809
  var o = e.getBoundingClientRect();
814
- var a = Pe();
810
+ var a = Oe();
815
811
  if (!t || !a) {
816
812
  return o;
817
813
  }
818
- var i = me();
814
+ var i = ve();
819
815
  var l = o.left + (((r = i.visualViewport) === null || r === void 0 ? void 0 : r.offsetLeft) || 0);
820
816
  var c = o.top + (((n = i.visualViewport) === null || n === void 0 ? void 0 : n.offsetTop) || 0);
821
- var s = o.width, u = o.height;
822
- return Ee({
823
- width: s,
824
- height: u,
817
+ var u = o.width, f = o.height;
818
+ return Pe({
819
+ width: u,
820
+ height: f,
825
821
  x: l,
826
822
  y: c
827
823
  });
@@ -833,7 +829,7 @@
833
829
  * @param ref - The React callback or object ref. Can be `null` or `undefined`.
834
830
  * @param current - The new value of the ref.
835
831
  */
836
- function je(e, t) {
832
+ function Ce(e, t) {
837
833
  if (e) {
838
834
  if (typeof e === "function") {
839
835
  e(t);
@@ -846,16 +842,16 @@
846
842
  }
847
843
  }
848
844
  // CONCATENATED MODULE: ./src/Popover/Popover.tsx
849
- function ke(e) {
845
+ function je(e) {
850
846
  "@babel/helpers - typeof";
851
- return ke = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
847
+ return je = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
852
848
  return typeof e;
853
849
  } : function(e) {
854
850
  return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
855
- }, ke(e);
851
+ }, je(e);
856
852
  }
857
- function xe() {
858
- return xe = Object.assign ? Object.assign.bind() : function(e) {
853
+ function ke() {
854
+ return ke = Object.assign ? Object.assign.bind() : function(e) {
859
855
  for (var t = 1; t < arguments.length; t++) {
860
856
  var r = arguments[t];
861
857
  for (var n in r) {
@@ -863,21 +859,21 @@
863
859
  }
864
860
  }
865
861
  return e;
866
- }, xe.apply(null, arguments);
862
+ }, ke.apply(null, arguments);
867
863
  }
868
- function Ae(e) {
869
- return We(e) || qe(e) || Le(e) || Te();
864
+ function xe(e) {
865
+ return We(e) || Ae(e) || _e(e) || Te();
870
866
  }
871
867
  function Te() {
872
868
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
873
869
  }
874
- function qe(e) {
870
+ function Ae(e) {
875
871
  if ("undefined" != typeof Symbol && null != e[Symbol.iterator] || null != e["@@iterator"]) return Array.from(e);
876
872
  }
877
873
  function We(e) {
878
874
  if (Array.isArray(e)) return De(e);
879
875
  }
880
- function Me(e, t) {
876
+ function qe(e, t) {
881
877
  var r = Object.keys(e);
882
878
  if (Object.getOwnPropertySymbols) {
883
879
  var n = Object.getOwnPropertySymbols(e);
@@ -887,24 +883,24 @@
887
883
  }
888
884
  return r;
889
885
  }
890
- function Re(e) {
886
+ function Me(e) {
891
887
  for (var t = 1; t < arguments.length; t++) {
892
888
  var r = null != arguments[t] ? arguments[t] : {};
893
- t % 2 ? Me(Object(r), !0).forEach((function(t) {
894
- Je(e, t, r[t]);
895
- })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : Me(Object(r)).forEach((function(t) {
889
+ t % 2 ? qe(Object(r), !0).forEach((function(t) {
890
+ Ge(e, t, r[t]);
891
+ })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : qe(Object(r)).forEach((function(t) {
896
892
  Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(r, t));
897
893
  }));
898
894
  }
899
895
  return e;
900
896
  }
901
- function He(e, t) {
902
- return Ne(e) || Ie(e, t) || Le(e, t) || _e();
897
+ function Re(e, t) {
898
+ return Le(e) || Ie(e, t) || _e(e, t) || He();
903
899
  }
904
- function _e() {
900
+ function He() {
905
901
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
906
902
  }
907
- function Le(e, t) {
903
+ function _e(e, t) {
908
904
  if (e) {
909
905
  if ("string" == typeof e) return De(e, t);
910
906
  var r = {}.toString.call(e).slice(8, -1);
@@ -921,7 +917,7 @@
921
917
  function Ie(e, t) {
922
918
  var r = null == e ? null : "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"];
923
919
  if (null != r) {
924
- var n, o, a, i, l = [], c = !0, s = !1;
920
+ var n, o, a, i, l = [], c = !0, u = !1;
925
921
  try {
926
922
  if (a = (r = r.call(e)).next, 0 === t) {
927
923
  if (Object(r) !== r) return;
@@ -929,32 +925,32 @@
929
925
  } else for (;!(c = (n = a.call(r)).done) && (l.push(n.value), l.length !== t); c = !0) {
930
926
  }
931
927
  } catch (e) {
932
- s = !0, o = e;
928
+ u = !0, o = e;
933
929
  } finally {
934
930
  try {
935
931
  if (!c && null != r["return"] && (i = r["return"](), Object(i) !== i)) return;
936
932
  } finally {
937
- if (s) throw o;
933
+ if (u) throw o;
938
934
  }
939
935
  }
940
936
  return l;
941
937
  }
942
938
  }
943
- function Ne(e) {
939
+ function Le(e) {
944
940
  if (Array.isArray(e)) return e;
945
941
  }
946
942
  function Fe(e, t) {
947
943
  if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
948
944
  }
949
- function $e(e, t) {
945
+ function Ne(e, t) {
950
946
  for (var r = 0; r < t.length; r++) {
951
947
  var n = t[r];
952
948
  n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0),
953
- Object.defineProperty(e, Qe(n.key), n);
949
+ Object.defineProperty(e, Je(n.key), n);
954
950
  }
955
951
  }
956
- function ze(e, t, r) {
957
- return t && $e(e.prototype, t), r && $e(e, r), Object.defineProperty(e, "prototype", {
952
+ function $e(e, t, r) {
953
+ return t && Ne(e.prototype, t), r && Ne(e, r), Object.defineProperty(e, "prototype", {
958
954
  writable: !1
959
955
  }), e;
960
956
  }
@@ -976,56 +972,56 @@
976
972
  }, Be(e, t);
977
973
  }
978
974
  function Ue(e) {
979
- var t = Ye();
975
+ var t = Xe();
980
976
  return function() {
981
- var r, n = Ge(e);
977
+ var r, n = Ye(e);
982
978
  if (t) {
983
- var o = Ge(this).constructor;
979
+ var o = Ye(this).constructor;
984
980
  r = Reflect.construct(n, arguments, o);
985
981
  } else r = n.apply(this, arguments);
986
- return Ke(this, r);
982
+ return ze(this, r);
987
983
  };
988
984
  }
989
- function Ke(e, t) {
990
- if (t && ("object" == ke(t) || "function" == typeof t)) return t;
985
+ function ze(e, t) {
986
+ if (t && ("object" == je(t) || "function" == typeof t)) return t;
991
987
  if (void 0 !== t) throw new TypeError("Derived constructors may only return object or undefined");
992
- return Xe(e);
988
+ return Ke(e);
993
989
  }
994
- function Xe(e) {
990
+ function Ke(e) {
995
991
  if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
996
992
  return e;
997
993
  }
998
- function Ye() {
994
+ function Xe() {
999
995
  try {
1000
996
  var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {})));
1001
997
  } catch (e) {}
1002
- return (Ye = function t() {
998
+ return (Xe = function t() {
1003
999
  return !!e;
1004
1000
  })();
1005
1001
  }
1006
- function Ge(e) {
1007
- return Ge = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
1002
+ function Ye(e) {
1003
+ return Ye = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
1008
1004
  return e.__proto__ || Object.getPrototypeOf(e);
1009
- }, Ge(e);
1005
+ }, Ye(e);
1010
1006
  }
1011
- function Je(e, t, r) {
1012
- return (t = Qe(t)) in e ? Object.defineProperty(e, t, {
1007
+ function Ge(e, t, r) {
1008
+ return (t = Je(t)) in e ? Object.defineProperty(e, t, {
1013
1009
  value: r,
1014
1010
  enumerable: !0,
1015
1011
  configurable: !0,
1016
1012
  writable: !0
1017
1013
  }) : e[t] = r, e;
1018
1014
  }
1019
- function Qe(e) {
1020
- var t = Ze(e, "string");
1021
- return "symbol" == ke(t) ? t : t + "";
1015
+ function Je(e) {
1016
+ var t = Qe(e, "string");
1017
+ return "symbol" == je(t) ? t : t + "";
1022
1018
  }
1023
- function Ze(e, t) {
1024
- if ("object" != ke(e) || !e) return e;
1019
+ function Qe(e, t) {
1020
+ if ("object" != je(e) || !e) return e;
1025
1021
  var r = e[Symbol.toPrimitive];
1026
1022
  if (void 0 !== r) {
1027
1023
  var n = r.call(e, t || "default");
1028
- if ("object" != ke(n)) return n;
1024
+ if ("object" != je(n)) return n;
1029
1025
  throw new TypeError("@@toPrimitive must return a primitive value.");
1030
1026
  }
1031
1027
  return ("string" === t ? String : Number)(e);
@@ -1034,8 +1030,8 @@
1034
1030
  /** @public */
1035
1031
  /** @public */
1036
1032
  /** @public */
1037
- /** @public */ var et = [ "clickAway", "escapeKey", "offScreen", "tabKey" ];
1038
- var tt = {
1033
+ /** @public */ var Ze = [ "clickAway", "escapeKey", "offScreen", "tabKey" ];
1034
+ var et = {
1039
1035
  align: a().oneOf([ "center", "edge", "theme", "end" ]),
1040
1036
  anchor: a().object,
1041
1037
  animation: a().bool,
@@ -1044,7 +1040,7 @@
1044
1040
  autoCloseWhenOffScreen: a().bool,
1045
1041
  canCoverAnchor: a().bool,
1046
1042
  children: a().oneOfType([ a().node, a().func ]),
1047
- closeReasons: a().arrayOf(a().oneOf(et)),
1043
+ closeReasons: a().arrayOf(a().oneOf(Ze)),
1048
1044
  defaultPlacement: a().oneOf([ "above", "below", "left", "right", "vertical", "horizontal" ]),
1049
1045
  elementRef: a().oneOfType([ a().func, a().object ]),
1050
1046
  id: a().string,
@@ -1061,20 +1057,24 @@
1061
1057
  takeFocus: a().bool,
1062
1058
  splunkTheme: a().object
1063
1059
  };
1064
- var rt = {
1060
+ var tt = {
1065
1061
  align: "theme",
1066
1062
  animation: true,
1067
1063
  animationConfig: {},
1068
1064
  appearance: "normal",
1069
1065
  autoCloseWhenOffScreen: true,
1070
1066
  canCoverAnchor: false,
1071
- closeReasons: et,
1067
+ closeReasons: Ze,
1072
1068
  defaultPlacement: "below",
1073
1069
  open: false,
1074
1070
  repositionMode: "flip",
1075
1071
  retainFocus: true,
1076
1072
  takeFocus: false
1077
1073
  };
1074
+ var rt = {
1075
+ passive: false,
1076
+ capture: true
1077
+ };
1078
1078
  // eslint-disable-next-line @typescript-eslint/ban-types
1079
1079
  function nt(e, t) {
1080
1080
  var r = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
@@ -1086,76 +1086,105 @@
1086
1086
  }));
1087
1087
  }
1088
1088
  function ot(e) {
1089
+ var t = e.anchorPos, r = e.arrowHeight, n = e.placement, o = e.outerContainerStyle, a = e.outerContainerEl;
1090
+ if (n === "misaligned") {
1091
+ return [ {
1092
+ display: "none"
1093
+ } ];
1094
+ }
1095
+ var i = {
1096
+ display: "block"
1097
+ };
1098
+ var l = a.offsetHeight / 2 - 22;
1099
+ var u = -(a.offsetHeight / 2 - 15);
1100
+ var f = t.center - (o.top + a.offsetHeight / 2) - r / 2;
1101
+ var s = c()(f, u, l);
1102
+ var p = t.middle - (o.left + a.offsetWidth / 2) - r;
1103
+ var h = {
1104
+ left: {
1105
+ translateX: r / 2,
1106
+ translateY: s,
1107
+ rotate: 90
1108
+ },
1109
+ right: {
1110
+ translateX: -r / 2,
1111
+ translateY: s,
1112
+ rotate: -90
1113
+ },
1114
+ above: {
1115
+ translateX: p,
1116
+ translateY: 0,
1117
+ rotate: 180
1118
+ },
1119
+ below: {
1120
+ translateX: p,
1121
+ translateY: 0,
1122
+ rotate: 0
1123
+ }
1124
+ };
1125
+ var d = h[n];
1126
+ i.transform = "translate(".concat(d.translateX, "px, ").concat(d.translateY, "px) rotate(").concat(d.rotate, "deg)");
1127
+ // set new positions
1128
+ var v = {
1129
+ left: "right",
1130
+ right: "left",
1131
+ above: "bottom",
1132
+ below: "top"
1133
+ };
1134
+ i[v[n]] = "1px";
1135
+ var m = {
1136
+ left: "top",
1137
+ right: "top",
1138
+ above: "left",
1139
+ below: "left"
1140
+ };
1141
+ i[m[n]] = "50%";
1142
+ return [ i, d ];
1143
+ }
1144
+ function at(e) {
1145
+ var t = e.anchorEl, r = e.offsets, n = r === void 0 ? false : r, o = e.pointTo;
1146
+ var a = Ee(t, n);
1147
+ var i = {
1148
+ // these are rounded to avoid causing visual regressions
1149
+ // they were previously clientWidth and clientHeight which were already rounded
1150
+ width: Math.round(a.width),
1151
+ height: Math.round(a.height)
1152
+ };
1153
+ var l = o && d()(o, "x");
1154
+ var c = o && d()(o, "y");
1155
+ i.left = l ? a.left + ((o === null || o === void 0 ? void 0 : o.x) || 0) : a.left;
1156
+ i.top = c ? a.top + ((o === null || o === void 0 ? void 0 : o.y) || 0) : a.top;
1157
+ i.right = l ? i.left + i.width : a.left + i.width || a.right;
1158
+ i.bottom = c ? i.top + i.height : a.top + i.height || a.bottom;
1159
+ i.middle = l ? i.left : a.left + (i.right - a.left) / 2;
1160
+ i.center = c ? i.top : a.top + (i.bottom - a.top) / 2;
1161
+ return i;
1162
+ }
1163
+ function it(e) {
1089
1164
  return e !== window && e !== window.document;
1090
1165
  }
1166
+ function lt(e, t) {
1167
+ var r = ve();
1168
+ if (e.top < 0 || e.top > r.innerHeight || e.left < 0 || e.left > r.innerWidth) {
1169
+ return true;
1170
+ }
1171
+ if (t) {
1172
+ if (e.height + e.top < t.top || e.top > t.bottom || e.width + e.left < t.left || e.left > t.right) {
1173
+ return true;
1174
+ }
1175
+ }
1176
+ return false;
1177
+ }
1091
1178
  /**
1092
1179
  * `Popover` is used to create layovers such as dropdowns, contextual menus, or tooltips. Use
1093
1180
  * this only when the other components don't provide sufficient functionality or control. A controlled
1094
1181
  * `Dropdown` covers use cases where you might consider using `Popover` directly.
1095
- */ var at = function(e) {
1182
+ */ var ct = function(e) {
1096
1183
  Ve(r, e);
1097
1184
  var t = Ue(r);
1098
- ze(r, null, [ {
1099
- key: "getArrowStyle",
1100
- // @docs-props-type PopoverPropsBase
1101
- value: function e(t) {
1102
- var r = t.anchorPos, n = t.arrowHeight, o = t.placement, a = t.outerContainerStyle, i = t.outerContainerEl;
1103
- if (o === "misaligned") {
1104
- return [ {
1105
- display: "none"
1106
- } ];
1107
- }
1108
- var l = {
1109
- display: "block"
1110
- };
1111
- var s = i.offsetHeight / 2 - 22;
1112
- var u = -(i.offsetHeight / 2 - 15);
1113
- var f = r.center - (a.top + i.offsetHeight / 2) - n / 2;
1114
- var p = c()(f, u, s);
1115
- var h = r.middle - (a.left + i.offsetWidth / 2) - n;
1116
- var d = {
1117
- left: {
1118
- translateX: n / 2,
1119
- translateY: p,
1120
- rotate: 90
1121
- },
1122
- right: {
1123
- translateX: -n / 2,
1124
- translateY: p,
1125
- rotate: -90
1126
- },
1127
- above: {
1128
- translateX: h,
1129
- translateY: 0,
1130
- rotate: 180
1131
- },
1132
- below: {
1133
- translateX: h,
1134
- translateY: 0,
1135
- rotate: 0
1136
- }
1137
- };
1138
- var v = d[o];
1139
- l.transform = "translate(".concat(v.translateX, "px, ").concat(v.translateY, "px) rotate(").concat(v.rotate, "deg)");
1140
- // set new positions
1141
- var m = {
1142
- left: "right",
1143
- right: "left",
1144
- above: "bottom",
1145
- below: "top"
1146
- };
1147
- l[m[o]] = "1px";
1148
- var b = {
1149
- left: "top",
1150
- right: "top",
1151
- above: "left",
1152
- below: "left"
1153
- };
1154
- l[b[o]] = "50%";
1155
- return [ l, v ];
1156
- }
1157
- }, {
1185
+ $e(r, null, [ {
1158
1186
  key: "getDerivedStateFromProps",
1187
+ // @docs-props-type PopoverPropsBase
1159
1188
  value: function e(t, r) {
1160
1189
  if (t.open !== r.prevOpen) {
1161
1190
  return {
@@ -1167,87 +1196,78 @@
1167
1196
  }
1168
1197
  } ]);
1169
1198
  function r(e) {
1170
- var o;
1199
+ var n;
1171
1200
  Fe(this, r);
1172
- o = t.call(this, e);
1173
- Je(Xe(o), "outerContainerEl", null);
1174
- Je(Xe(o), "innerContainerEl", null);
1175
- Je(Xe(o), "arrow", null);
1176
- Je(Xe(o), "windowSizeMeasurementEl", null);
1177
- Je(Xe(o), "handleScroll", void 0);
1178
- Je(Xe(o), "handleWindowScroll", void 0);
1179
- Je(Xe(o), "allowAnimationUpdates", true);
1180
- Je(Xe(o), "getElPosition", (function(e) {
1181
- var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
1182
- var r = Ce(e, t);
1183
- var n = {
1184
- width: e.offsetWidth,
1185
- height: e.offsetHeight
1186
- };
1187
- var a = o.props.pointTo;
1188
- var i = a && d()(a, "x");
1189
- var l = a && d()(a, "y");
1190
- n.left = i ? r.left + ((a === null || a === void 0 ? void 0 : a.x) || 0) : r.left;
1191
- n.top = l ? r.top + ((a === null || a === void 0 ? void 0 : a.y) || 0) : r.top;
1192
- n.right = i ? n.left + n.width : r.left + n.width || r.right;
1193
- n.bottom = l ? n.top + n.height : r.top + n.height || r.bottom;
1194
- n.middle = i ? n.left : r.left + (n.right - r.left) / 2;
1195
- n.center = l ? n.top : r.top + (n.bottom - r.top) / 2;
1196
- return n;
1197
- }));
1198
- Je(Xe(o), "setPlacement", (function(e) {
1199
- var t = me();
1200
- o.setState((function(n) {
1201
- var a;
1202
- var i = o.props, l = i.align, c = i.anchor, s = i.autoCloseWhenOffScreen, u = i.canCoverAnchor, f = i.defaultPlacement, p = i.open, h = i.repositionMode, d = i.splunkTheme;
1203
- var v = o.context || t;
1201
+ n = t.call(this, e);
1202
+ Ge(Ke(n), "outerContainerEl", null);
1203
+ Ge(Ke(n), "innerContainerEl", null);
1204
+ Ge(Ke(n), "arrow", null);
1205
+ Ge(Ke(n), "handleScroll", void 0);
1206
+ Ge(Ke(n), "handleWindowScroll", void 0);
1207
+ Ge(Ke(n), "allowAnimationUpdates", true);
1208
+ Ge(Ke(n), "setPlacement", (function(e) {
1209
+ var t = ve();
1210
+ n.setState((function(r) {
1211
+ var o;
1212
+ var a = n.props, i = a.align, l = a.anchor, c = a.autoCloseWhenOffScreen, u = a.canCoverAnchor, f = a.defaultPlacement, s = a.open, p = a.pointTo, h = a.repositionMode, d = a.splunkTheme;
1213
+ var v = n.context || t;
1204
1214
  var m = d.isPrisma;
1205
1215
  // If these conditions are not met, we cannot set the popover.
1206
- if (!p || !o.outerContainerEl || !c || !n.anchorEl || !o.windowSizeMeasurementEl) {
1216
+ if (!s || !n.outerContainerEl || !l || !r.anchorEl) {
1207
1217
  if (false) {}
1208
1218
  return null;
1209
1219
  }
1210
- var b = o.getElPosition(n.anchorEl);
1211
- var y = o.getElPosition(n.anchorEl, true);
1212
- var g = ot(v) ? o.getElPosition(v) : undefined;
1213
- if (e && s) {
1214
- if (o.autoCloseWhenOffScreen(b, g)) {
1220
+ var b = at({
1221
+ anchorEl: r.anchorEl,
1222
+ pointTo: p
1223
+ });
1224
+ var y = at({
1225
+ anchorEl: r.anchorEl,
1226
+ offsets: true,
1227
+ pointTo: p
1228
+ });
1229
+ var g = it(v) ? at({
1230
+ anchorEl: v,
1231
+ pointTo: p
1232
+ }) : undefined;
1233
+ if (e && c) {
1234
+ if (n.autoCloseWhenOffScreen(b, g)) {
1215
1235
  return null;
1216
1236
  }
1217
1237
  }
1218
1238
  var w = m ? 0 : 8;
1219
1239
  var S = 8;
1220
1240
  var O = m ? "edge" : "center";
1221
- var P = B({
1222
- align: l === "theme" ? O : l,
1241
+ var P = U({
1242
+ align: i === "theme" ? O : i,
1223
1243
  anchorPos: y,
1224
1244
  scrollContainerPos: g,
1225
1245
  canCoverAnchor: u,
1226
1246
  defaultPlacement: f,
1227
1247
  repositionMode: h,
1228
- outerContainerEl: o.outerContainerEl,
1248
+ outerContainerEl: n.outerContainerEl,
1229
1249
  padding: S,
1230
- windowWidth: o.windowSizeMeasurementEl.offsetLeft,
1231
- windowHeight: o.windowSizeMeasurementEl.offsetTop
1250
+ windowWidth: t.innerWidth,
1251
+ windowHeight: t.innerHeight
1232
1252
  }), E = P.placement, C = P.outerContainerStyle, k = P.maxHeight, x = P.maxWidth;
1233
- var A = o.arrow ? r.getArrowStyle({
1253
+ var T = n.arrow ? ot({
1234
1254
  anchorPos: y,
1235
1255
  arrowHeight: w,
1236
1256
  outerContainerStyle: C,
1237
1257
  placement: E,
1238
- outerContainerEl: o.outerContainerEl
1239
- }) : [], T = He(A, 2), q = T[0], W = T[1];
1240
- var M = o.props.appearance !== "none" && !m;
1241
- var R = nt(y, n.anchorPos) && nt(C, n.outerContainerStyle) && E === n.placement && k === n.maxHeight && x === n.maxWidth;
1242
- var H = nt(j()(q, "transform"), j()(n.arrowStyle, "transform")) && nt(W !== null && W !== void 0 ? W : {}, (a = n.arrowStyleTransformMeta) !== null && a !== void 0 ? a : {});
1258
+ outerContainerEl: n.outerContainerEl
1259
+ }) : [], A = Re(T, 2), W = A[0], q = A[1];
1260
+ var M = n.props.appearance !== "none" && !m;
1261
+ var R = nt(y, r.anchorPos) && nt(C, r.outerContainerStyle) && E === r.placement && k === r.maxHeight && x === r.maxWidth;
1262
+ var H = nt(j()(W, "transform"), j()(r.arrowStyle, "transform")) && nt(q !== null && q !== void 0 ? q : {}, (o = r.arrowStyleTransformMeta) !== null && o !== void 0 ? o : {});
1243
1263
  // If none of the position data has changed, do not set state.
1244
1264
  if (R && (!M || M && H)) {
1245
1265
  return null;
1246
1266
  }
1247
1267
  return {
1248
1268
  anchorPos: y,
1249
- arrowStyle: q,
1250
- arrowStyleTransformMeta: W,
1269
+ arrowStyle: W,
1270
+ arrowStyleTransformMeta: q,
1251
1271
  outerContainerStyle: C,
1252
1272
  placement: E,
1253
1273
  maxHeight: k,
@@ -1255,43 +1275,50 @@
1255
1275
  };
1256
1276
  }));
1257
1277
  }));
1258
- Je(Xe(o), "handleNewAnchor", (function(e) {
1259
- var t;
1278
+ Ge(Ke(n), "handleArrowMount", (function(e) {
1279
+ n.arrow = e;
1280
+ }));
1281
+ Ge(Ke(n), "handleNewAnchor", (function(e) {
1282
+ var t = n.props.pointTo;
1283
+ var r;
1260
1284
  if (e && !(e instanceof HTMLElement)) {
1261
1285
  if (false) {}
1262
- t = (0, i.findDOMNode)(e);
1286
+ r = (0, i.findDOMNode)(e);
1263
1287
  // eslint-disable-line react/no-find-dom-node
1264
1288
  } else {
1265
- t = e !== null && e !== void 0 ? e : undefined;
1289
+ r = e !== null && e !== void 0 ? e : undefined;
1266
1290
  }
1267
- var r = t ? o.getElPosition(t) : undefined;
1268
- o.setState({
1269
- anchorEl: t,
1270
- anchorPos: r
1291
+ var o = r ? at({
1292
+ anchorEl: r,
1293
+ pointTo: t
1294
+ }) : undefined;
1295
+ n.setState({
1296
+ anchorEl: r,
1297
+ anchorPos: o
1271
1298
  });
1272
1299
  // eslint-disable-line react/no-unused-state
1273
1300
  }));
1274
- Je(Xe(o), "handleInnerContainerMount", (function(e) {
1275
- o.innerContainerEl = e;
1276
- if (e && o.props.takeFocus) {
1277
- u()(L.takeFocus, e);
1301
+ Ge(Ke(n), "handleInnerContainerMount", (function(e) {
1302
+ n.innerContainerEl = e;
1303
+ if (e && n.props.takeFocus) {
1304
+ f()(D.takeFocus, e);
1278
1305
  }
1279
- je(o.props.elementRef, e);
1306
+ Ce(n.props.elementRef, e);
1280
1307
  }));
1281
- Je(Xe(o), "handleOuterContainerMount", (function(e) {
1282
- o.outerContainerEl = e;
1283
- je(o.props.outerRef, e);
1308
+ Ge(Ke(n), "handleOuterContainerMount", (function(e) {
1309
+ n.outerContainerEl = e;
1310
+ Ce(n.props.outerRef, e);
1284
1311
  }));
1285
- Je(Xe(o), "handleTab", (function(e) {
1286
- if (o.innerContainerEl) {
1287
- if (o.props.retainFocus) {
1288
- (0, L.handleTab)(o.innerContainerEl, e);
1289
- } else if ((0, L.isTabKey)(e)) {
1290
- var t = (0, L.getSortedTabbableElements)(o.innerContainerEl);
1312
+ Ge(Ke(n), "handleTab", (function(e) {
1313
+ if (n.innerContainerEl) {
1314
+ if (n.props.retainFocus) {
1315
+ (0, D.handleTab)(n.innerContainerEl, e);
1316
+ } else if ((0, D.isTabKey)(e)) {
1317
+ var t = (0, D.getSortedTabbableElements)(n.innerContainerEl);
1291
1318
  if (t.length > 0) {
1292
1319
  var r = e.shiftKey ? t[0] : t[t.length - 1];
1293
1320
  if (r === e.target) {
1294
- o.handleRequestClose({
1321
+ n.handleRequestClose({
1295
1322
  event: e,
1296
1323
  reason: "tabKey"
1297
1324
  });
@@ -1300,101 +1327,30 @@
1300
1327
  }
1301
1328
  }
1302
1329
  }));
1303
- Je(Xe(o), "handleRequestClose", (function(e) {
1304
- if (o.props.open) {
1305
- o.requestClose(e);
1330
+ Ge(Ke(n), "handleRequestClose", (function(e) {
1331
+ if (n.props.open) {
1332
+ n.requestClose(e);
1306
1333
  }
1307
1334
  }));
1308
- Je(Xe(o), "handleAnimationEnd", (function() {
1309
- if (o.allowAnimationUpdates) {
1310
- o.setState({
1335
+ Ge(Ke(n), "handleAnimationEnd", (function() {
1336
+ if (n.allowAnimationUpdates) {
1337
+ n.setState({
1311
1338
  animating: false
1312
1339
  });
1313
1340
  }
1314
1341
  }));
1315
- Je(Xe(o), "renderLayer", (function() {
1316
- var e = o.props, t = e.animation, a = e.animationConfig, i = e.appearance, l = e.children, c = e.id, s = e.open, u = e.retainFocus, f = e.splunkTheme;
1317
- var p = o.state, h = p.anchorPos, d = p.arrowStyle, v = p.outerContainerStyle, m = p.placement;
1318
- var b = f.isPrisma;
1319
- var y = o.state, g = y.maxHeight, S = y.maxWidth;
1320
- // eslint-disable-line prefer-const
1321
- // Accommodate the arrow in the maxHeight and maxWidth.
1322
- if (i !== "none") {
1323
- if (w()(g)) {
1324
- g -= 20;
1325
- }
1326
- if (w()(S)) {
1327
- S -= 20;
1328
- }
1329
- }
1330
- var P = {
1331
- anchorHeight: h ? h.height : null,
1332
- anchorWidth: h ? h.width : null,
1333
- placement: m || null,
1334
- maxHeight: g || null,
1335
- maxWidth: S || null
1336
- };
1337
- var C = t ? {
1338
- opacity: s ? 1 : 0
1339
- } : {
1340
- opacity: 1
1341
- };
1342
- /* eslint-disable jsx-a11y/no-static-element-interactions */
1343
- return n().createElement(T.Spring, {
1344
- from: {
1345
- opacity: t ? 0 : 1
1346
- },
1347
- to: C,
1348
- config: Re({
1349
- tension: 300,
1350
- friction: 20,
1351
- clamp: true
1352
- }, a),
1353
- onRest: o.handleAnimationEnd
1354
- }, (function(e) {
1355
-
1356
- return n().createElement(J, {
1357
- "data-test": "outer-popover",
1358
- style: Re(Re({}, v), e),
1359
- ref: o.handleOuterContainerMount
1360
- }, (s || o.state.animating) && n().createElement(Q, xe({
1361
- $appearance: i,
1362
- $open: s,
1363
- "data-test": "popover",
1364
- ref: o.handleInnerContainerMount,
1365
- id: c,
1366
- onKeyDown: o.handleTab
1367
- }, j()(o.props, [ "anchor" ].concat(Ae(E()(r.propTypes))))), n().createElement(U.Provider, {
1368
- value: {
1369
- retainFocus: u
1370
- }
1371
- }, n().createElement(n().Fragment, null, i === "none" && l, i !== "none" && !b && n().createElement(ee, {
1372
- $appearance: i,
1373
- ref: function e(t) {
1374
- o.arrow = t;
1375
- },
1376
- style: d
1377
- }), i !== "none" && n().createElement(Z, {
1378
- $appearance: i
1379
- }, O()(l) ? l(P) : l)))), n().createElement(te, {
1380
- ref: function e(t) {
1381
- o.windowSizeMeasurementEl = t;
1382
- }
1383
- }));
1384
- }));
1385
- /* eslint-enable jsx-a11y/no-static-element-interactions */ }));
1386
- o.handleScroll = x()(o.setPlacement.bind(Xe(o), true), 0);
1387
- o.handleWindowScroll = x()(o.setPlacement.bind(Xe(o), true), 0);
1388
- o.setPlacement = x()(o.setPlacement, 0, {
1342
+ n.handleScroll = x()(n.setPlacement.bind(Ke(n), true), 0);
1343
+ n.handleWindowScroll = x()(n.setPlacement.bind(Ke(n), true), 0);
1344
+ n.setPlacement = x()(n.setPlacement, 0, {
1389
1345
  leading: false
1390
1346
  });
1391
- o.state = {
1347
+ n.state = {
1392
1348
  animating: false,
1393
1349
  prevOpen: e.open
1394
1350
  };
1395
- return o;
1351
+ return n;
1396
1352
  }
1397
- ze(r, [ {
1353
+ $e(r, [ {
1398
1354
  key: "componentDidMount",
1399
1355
  value: function e() {
1400
1356
  this.handleNewAnchor(this.props.anchor);
@@ -1414,7 +1370,7 @@
1414
1370
  // this prevents bugs like #4 in SUI-2054 where popover contents re-rendering due to animation
1415
1371
  // causes the popover contents to receive focus even though the popover closing
1416
1372
  if (!t.open && this.props.open && this.props.takeFocus) {
1417
- (0, L.takeFocus)(this.innerContainerEl);
1373
+ (0, D.takeFocus)(this.innerContainerEl);
1418
1374
  }
1419
1375
  }
1420
1376
  }
@@ -1429,22 +1385,13 @@
1429
1385
  }, {
1430
1386
  key: "autoCloseWhenOffScreen",
1431
1387
  value: function e(t, r) {
1432
- var n = me();
1433
- if (t.top < 0 || t.top > n.innerHeight || t.left < 0 || t.left > n.innerWidth) {
1388
+ var n = lt(t, r);
1389
+ if (n) {
1434
1390
  this.requestClose({
1435
1391
  reason: "offScreen"
1436
1392
  });
1437
- return true;
1438
1393
  }
1439
- if (r) {
1440
- if (t.height + t.top < r.top || t.top > r.bottom || t.width + t.left < r.left || t.left > r.right) {
1441
- this.requestClose({
1442
- reason: "offScreen"
1443
- });
1444
- return true;
1445
- }
1446
- }
1447
- return false;
1394
+ return n;
1448
1395
  }
1449
1396
  }, {
1450
1397
  key: "requestClose",
@@ -1457,60 +1404,115 @@
1457
1404
  }, {
1458
1405
  key: "render",
1459
1406
  value: function e() {
1460
- var t = me();
1461
- var r = this.props.open || this.state.animating;
1462
- var o = this.context || t;
1463
- var a = o !== t;
1464
- var i = this.state, l = i.anchorPos, c = i.placement;
1465
- // EventListeners only need to be rendered when open,
1407
+ var t = this;
1408
+ var o = this.props, a = o.animation, i = o.animationConfig, l = o.appearance, c = o.children, u = o.closeReasons, f = o.hitAreaRef, s = o.id, p = o.open, h = o.retainFocus, d = o.splunkTheme;
1409
+ var v = this.state, m = v.anchorPos, b = v.animating, g = v.arrowStyle, S = v.outerContainerStyle, P = v.placement;
1410
+ var C = d.isPrisma;
1411
+ var k = this.state, x = k.maxHeight, T = k.maxWidth;
1412
+ // eslint-disable-line prefer-const
1413
+ // Accommodate the arrow in the maxHeight and maxWidth.
1414
+ if (l !== "none") {
1415
+ if (w()(x)) {
1416
+ x -= 20;
1417
+ }
1418
+ if (w()(T)) {
1419
+ T -= 20;
1420
+ }
1421
+ }
1422
+ var W = {
1423
+ anchorHeight: m ? m.height : null,
1424
+ anchorWidth: m ? m.width : null,
1425
+ placement: P || null,
1426
+ maxHeight: x || null,
1427
+ maxWidth: T || null
1428
+ };
1429
+ var M = a ? {
1430
+ opacity: p ? 1 : 0
1431
+ } : {
1432
+ opacity: 1
1433
+ };
1434
+ var H = ve();
1435
+ var _ = p || b;
1436
+ var D = this.context || H;
1437
+ var I = D !== H;
1438
+ // EventListeners only need to be rendered when open,
1466
1439
  // otherwise leads to negative performance impacts
1467
- var s = r ? [ a && n().createElement(W(), {
1468
- target: o,
1440
+ var L = _ ? [ I && n().createElement(q(), {
1441
+ target: D,
1469
1442
  eventType: "scroll",
1470
1443
  listener: this.handleScroll,
1471
- options: {
1472
- passive: false,
1473
- capture: true
1474
- },
1444
+ options: rt,
1475
1445
  key: "eventListener"
1476
- }), n().createElement(W(), {
1477
- target: t,
1446
+ }), n().createElement(q(), {
1447
+ target: H,
1478
1448
  eventType: "resize",
1479
1449
  listener: this.setPlacement,
1480
1450
  key: "eventListenerOnWindowResize"
1481
- }), n().createElement(W(), {
1482
- target: t,
1451
+ }), n().createElement(q(), {
1452
+ target: H,
1483
1453
  eventType: "scroll",
1484
1454
  listener: this.handleWindowScroll,
1485
- options: {
1486
- passive: false,
1487
- capture: true
1488
- },
1455
+ options: rt,
1489
1456
  key: "eventListenerOnWindowScroll"
1490
1457
  }) ] : [];
1491
- return [].concat(s, [ n().createElement(R(), {
1492
- closeReasons: y()(this.props.closeReasons.filter((function(e) {
1458
+ return [].concat(L, [ n().createElement(R(), {
1459
+ closeReasons: y()(u.filter((function(e) {
1493
1460
  return e !== "offScreen";
1494
1461
  })), R().possibleCloseReasons),
1495
- open: r,
1462
+ open: _,
1496
1463
  onRequestClose: this.handleRequestClose,
1497
1464
  key: "Layer"
1498
- }, r && this.innerContainerEl && this.props.hitAreaRef && n().createElement(pe, {
1499
- anchorRect: l,
1465
+ }, _ && this.innerContainerEl && f && n().createElement(se, {
1466
+ anchorRect: m,
1500
1467
  popoverEl: this.innerContainerEl,
1501
- popoverPlacement: c,
1502
- ref: this.props.hitAreaRef
1503
- }), r && this.renderLayer()) ]);
1468
+ popoverPlacement: P,
1469
+ ref: f
1470
+ }), _ && n().createElement(A.Spring, {
1471
+ from: {
1472
+ opacity: a ? 0 : 1
1473
+ },
1474
+ to: M,
1475
+ config: Me({
1476
+ tension: 300,
1477
+ friction: 20,
1478
+ clamp: true
1479
+ }, i),
1480
+ onRest: this.handleAnimationEnd
1481
+ }, (function(e) {
1482
+
1483
+ return n().createElement(J, {
1484
+ "data-test": "outer-popover",
1485
+ style: Me(Me({}, S), e),
1486
+ ref: t.handleOuterContainerMount
1487
+ }, n().createElement(Q, ke({
1488
+ $appearance: l,
1489
+ $open: p,
1490
+ "data-test": "popover",
1491
+ ref: t.handleInnerContainerMount,
1492
+ id: s,
1493
+ onKeyDown: t.handleTab
1494
+ }, j()(t.props, [ "anchor" ].concat(xe(E()(r.propTypes))))), n().createElement(z.Provider, {
1495
+ value: {
1496
+ retainFocus: h
1497
+ }
1498
+ }, n().createElement(n().Fragment, null, l === "none" && c, l !== "none" && !C && n().createElement(ee, {
1499
+ $appearance: l,
1500
+ ref: t.handleArrowMount,
1501
+ style: g
1502
+ }), l !== "none" && n().createElement(Z, {
1503
+ $appearance: l
1504
+ }, O()(c) ? c(W) : c)))));
1505
+ }))) ]);
1504
1506
  }
1505
1507
  } ]);
1506
1508
  return r;
1507
1509
  }(r.Component);
1508
- Je(at, "contextType", _());
1509
- Je(at, "defaultProps", rt);
1510
- Je(at, "propTypes", tt);
1511
- var it = (0, A.withSplunkTheme)(at);
1512
- it.propTypes = at.propTypes;
1513
- /* harmony default export */ const lt = it;
1510
+ Ge(ct, "contextType", _());
1511
+ Ge(ct, "defaultProps", tt);
1512
+ Ge(ct, "propTypes", et);
1513
+ var ut = (0, T.withSplunkTheme)(ct);
1514
+ ut.propTypes = ct.propTypes;
1515
+ /* harmony default export */ const ft = ut;
1514
1516
  // CONCATENATED MODULE: ./src/Popover/index.ts
1515
1517
  module.exports = t;
1516
1518
  /******/})();