@splunk/react-ui 4.5.2 → 4.7.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 (145) hide show
  1. package/Accordion.js +10 -9
  2. package/Anchor.js +2 -2
  3. package/Animation.js +2 -2
  4. package/AnimationToggle.js +2 -2
  5. package/Box.js +2 -2
  6. package/Button.js +13 -13
  7. package/ButtonGroup.js +4 -4
  8. package/ButtonSimple.js +6 -6
  9. package/CHANGELOG.md +42 -1
  10. package/Calendar.js +16 -16
  11. package/Card.js +48 -53
  12. package/CardLayout.js +4 -4
  13. package/Chip.js +10 -10
  14. package/Clickable.js +41 -15
  15. package/CloseButton.js +8 -8
  16. package/Code.js +8 -7
  17. package/CollapsiblePanel.js +11 -14
  18. package/Color.js +48 -48
  19. package/ColumnLayout.js +4 -4
  20. package/ComboBox.js +8 -8
  21. package/Concertina.js +15 -15
  22. package/ControlGroup.js +30 -37
  23. package/Date.js +10 -10
  24. package/DefinitionList.js +2 -2
  25. package/Dropdown.js +4 -4
  26. package/EventListener.js +4 -4
  27. package/FetchOptions.js +8 -8
  28. package/File.js +27 -27
  29. package/FormRows.js +21 -23
  30. package/Heading.js +2 -2
  31. package/Image.js +14 -14
  32. package/JSONTree.js +4 -4
  33. package/Layer.js +10 -10
  34. package/Link.js +6 -6
  35. package/List.js +2 -2
  36. package/Markdown.js +28 -16
  37. package/Menu.js +135 -70
  38. package/Message.js +246 -305
  39. package/MessageBar.d.ts +2 -0
  40. package/MessageBar.js +789 -0
  41. package/Modal.js +95 -61
  42. package/ModalLayer.js +5 -4
  43. package/Monogram.js +4 -4
  44. package/Multiselect.js +293 -42
  45. package/Number.js +8 -8
  46. package/Paginator.js +24 -24
  47. package/Paragraph.js +2 -2
  48. package/Popover.js +12 -12
  49. package/Progress.js +6 -6
  50. package/RadioBar.js +4 -4
  51. package/RadioList.js +2 -2
  52. package/Resize.js +8 -8
  53. package/ResultsMenu.js +25 -23
  54. package/ScreenReaderContent.js +2 -2
  55. package/Scroll.js +6 -6
  56. package/ScrollContainerContext.js +2 -2
  57. package/Search.js +14 -14
  58. package/Select.js +286 -36
  59. package/SidePanel.js +6 -6
  60. package/Slider.js +20 -14
  61. package/SlidingPanels.js +4 -4
  62. package/StaticContent.js +2 -2
  63. package/StepBar.js +18 -18
  64. package/Switch.js +17 -31
  65. package/TabBar.js +60 -46
  66. package/TabLayout.js +4 -4
  67. package/Table.js +63 -55
  68. package/Text.js +163 -146
  69. package/Tooltip.js +14 -14
  70. package/TransitionOpen.js +69 -44
  71. package/WaitSpinner.js +2 -2
  72. package/cypress/plugins/index.ts +15 -0
  73. package/cypress/support/commands.ts +1 -0
  74. package/cypress/support/index.ts +10 -0
  75. package/cypress.json +12 -0
  76. package/package.json +18 -5
  77. package/types/src/Animation/Animation.d.ts +0 -1
  78. package/types/src/Calendar/DateTable.d.ts +0 -1
  79. package/types/src/Clickable/Clickable.d.ts +12 -2
  80. package/types/src/Clickable/NavigationProvider.d.ts +12 -2
  81. package/types/src/Color/Color.d.ts +3 -3
  82. package/types/src/Date/Date.d.ts +3 -3
  83. package/types/src/Date/Icon.d.ts +0 -1
  84. package/types/src/File/Icon.d.ts +0 -1
  85. package/types/src/File/IconCloud.d.ts +0 -1
  86. package/types/src/File/PaperClip.d.ts +0 -1
  87. package/types/src/File/Retry.d.ts +0 -1
  88. package/types/src/File/Trash.d.ts +0 -1
  89. package/types/src/Markdown/renderers/MarkdownCode.d.ts +0 -1
  90. package/types/src/Markdown/renderers/MarkdownCodeBlock.d.ts +0 -1
  91. package/types/src/Markdown/renderers/MarkdownImage.d.ts +0 -1
  92. package/types/src/Menu/Divider.d.ts +0 -1
  93. package/types/src/Message/Link.d.ts +2 -0
  94. package/types/src/Message/Message.d.ts +6 -1
  95. package/types/src/MessageBar/MessageBar.d.ts +28 -0
  96. package/types/src/MessageBar/index.d.ts +2 -0
  97. package/types/src/Modal/Modal.d.ts +3 -0
  98. package/types/src/Modal/ModalContext.d.ts +6 -0
  99. package/types/src/Monogram/Monogram.d.ts +2 -2
  100. package/types/src/Multiselect/Multiselect.d.ts +1 -0
  101. package/types/src/Number/IncrementIcon.d.ts +0 -1
  102. package/types/src/Number/Number.d.ts +3 -3
  103. package/types/src/Paginator/PageSeparator.d.ts +0 -1
  104. package/types/src/Popover/Popover.d.ts +1 -2
  105. package/types/src/RadioBar/RadioBar.d.ts +3 -3
  106. package/types/src/Select/Select.d.ts +8 -3
  107. package/types/src/Select/SelectBase.d.ts +17 -5
  108. package/types/src/Select/matchUtils.d.ts +12 -0
  109. package/types/src/Slider/Slider.d.ts +3 -3
  110. package/types/src/Switch/CheckIcon.d.ts +0 -1
  111. package/types/src/Switch/Switch.d.ts +7 -7
  112. package/types/src/Table/DragHandle.d.ts +0 -1
  113. package/types/src/Table/HeadExpandRowsIcon.d.ts +0 -1
  114. package/types/src/Table/Toggle.d.ts +0 -1
  115. package/types/src/Text/IconOutlinedHide.d.ts +0 -1
  116. package/types/src/Text/IconOutlinedView.d.ts +0 -1
  117. package/types/src/Text/Text.d.ts +12 -5
  118. package/types/src/Tooltip/InfoIcon.d.ts +0 -1
  119. package/types/src/TransitionOpen/TransitionOpen.d.ts +1 -0
  120. package/types/src/icons/Alert.d.ts +0 -1
  121. package/types/src/icons/AlertFilled.d.ts +0 -1
  122. package/types/src/icons/CaretDown.d.ts +0 -1
  123. package/types/src/icons/CaretRight.d.ts +0 -1
  124. package/types/src/icons/Check.d.ts +0 -1
  125. package/types/src/icons/ChevronDown.d.ts +0 -1
  126. package/types/src/icons/ChevronLeft.d.ts +0 -1
  127. package/types/src/icons/ChevronRight.d.ts +0 -1
  128. package/types/src/icons/CrossMark.d.ts +0 -1
  129. package/types/src/icons/External.d.ts +0 -1
  130. package/types/src/icons/InfoFilled.d.ts +0 -1
  131. package/types/src/icons/More.d.ts +0 -1
  132. package/types/src/icons/MoreVertical.d.ts +0 -1
  133. package/types/src/icons/Plus.d.ts +0 -1
  134. package/types/src/icons/SVG.d.ts +0 -1
  135. package/types/src/icons/Search.d.ts +0 -1
  136. package/types/src/icons/Sort.d.ts +0 -1
  137. package/types/src/icons/SortedDown.d.ts +0 -1
  138. package/types/src/icons/SortedUp.d.ts +0 -1
  139. package/types/src/icons/Success.d.ts +0 -1
  140. package/types/src/icons/SuccessFilled.d.ts +0 -1
  141. package/types/src/icons/WarningFilled.d.ts +0 -1
  142. package/types/src/utils/types.d.ts +0 -1
  143. package/unit-test-setup-testing-library.ts +9 -0
  144. package/usePrevious.js +2 -2
  145. package/types/src/Message/Banner.d.ts +0 -8
package/Modal.js CHANGED
@@ -82,7 +82,7 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 114);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 118);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -101,7 +101,14 @@ module.exports = require("prop-types");
101
101
 
102
102
  /***/ }),
103
103
 
104
- /***/ 114:
104
+ /***/ 10:
105
+ /***/ (function(module, exports) {
106
+
107
+ module.exports = require("@splunk/ui-utils/id");
108
+
109
+ /***/ }),
110
+
111
+ /***/ 118:
105
112
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
106
113
 
107
114
  "use strict";
@@ -126,11 +133,14 @@ var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_pr
126
133
  var external_lodash_ = __webpack_require__(4);
127
134
 
128
135
  // EXTERNAL MODULE: external "@splunk/react-ui/ModalLayer"
129
- var ModalLayer_ = __webpack_require__(68);
136
+ var ModalLayer_ = __webpack_require__(77);
130
137
  var ModalLayer_default = /*#__PURE__*/__webpack_require__.n(ModalLayer_);
131
138
 
132
139
  // EXTERNAL MODULE: external "@splunk/ui-utils/focus"
133
- var focus_ = __webpack_require__(25);
140
+ var focus_ = __webpack_require__(26);
141
+
142
+ // EXTERNAL MODULE: external "@splunk/ui-utils/id"
143
+ var id_ = __webpack_require__(10);
134
144
 
135
145
  // EXTERNAL MODULE: external "@splunk/react-ui/ScrollContainerContext"
136
146
  var ScrollContainerContext_ = __webpack_require__(35);
@@ -153,7 +163,7 @@ var themes_ = __webpack_require__(0);
153
163
  var StyledBox = external_styled_components_default()(Box_default.a).withConfig({
154
164
  displayName: "BodyStyles__StyledBox",
155
165
  componentId: "lv54z7-0"
156
- })(["background-color:", ";", " ", " flex:0 1 auto;overflow:auto;@media all and (-ms-high-contrast:none){*::-ms-backdrop,&{max-height:calc(100vh - 180px);}}"], Object(themes_["pick"])({
166
+ })(["background-color:", ";", " flex:0 1 auto;overflow:auto;@media all and (-ms-high-contrast:none){*::-ms-backdrop,&{max-height:calc(100vh - 180px);}}"], Object(themes_["pick"])({
157
167
  enterprise: themes_["variables"].backgroundColor,
158
168
  prisma: themes_["variables"].backgroundColorDialog
159
169
  }), Object(themes_["pick"])({
@@ -165,8 +175,6 @@ var StyledBox = external_styled_components_default()(Box_default.a).withConfig({
165
175
  comfortable: Object(external_styled_components_["css"])(["padding:12px 24px;&:first-child{padding-top:36px;}&:last-child{padding-bottom:36px;}"]),
166
176
  compact: Object(external_styled_components_["css"])(["padding:8px 24px;&:first-child{padding-top:26px;}&:last-child{padding-bottom:26px;}"])
167
177
  }
168
- }), Object(themes_["pick"])({
169
- prisma: Object(external_styled_components_["css"])(["color:", ";"], themes_["variables"].contentColorActive)
170
178
  }));
171
179
 
172
180
  // CONCATENATED MODULE: ./src/Modal/Body.tsx
@@ -271,7 +279,7 @@ function Footer(_ref) {
271
279
  Footer.propTypes = Footer_propTypes;
272
280
  /* harmony default export */ var Modal_Footer = (Footer);
273
281
  // EXTERNAL MODULE: external "@splunk/react-ui/CloseButton"
274
- var CloseButton_ = __webpack_require__(62);
282
+ var CloseButton_ = __webpack_require__(67);
275
283
  var CloseButton_default = /*#__PURE__*/__webpack_require__.n(CloseButton_);
276
284
 
277
285
  // CONCATENATED MODULE: ./src/Modal/HeaderStyles.ts
@@ -312,10 +320,10 @@ var StyledTitleWrapper = external_styled_components_default.a.div.withConfig({
312
320
  displayName: "HeaderStyles__StyledTitleWrapper",
313
321
  componentId: "sc-1y722ut-1"
314
322
  })(["", ";flex-direction:column;"], themes_["mixins"].reset('flex'));
315
- var StyledIcon = external_styled_components_default.a.svg.withConfig({
323
+ var StyledIcon = external_styled_components_default.a.div.withConfig({
316
324
  displayName: "HeaderStyles__StyledIcon",
317
325
  componentId: "sc-1y722ut-2"
318
- })(["margin-right:16px;", " width:", ";height:", ";padding:2px;border-radius:4px;flex-shrink:0;"], Object(themes_["pick"])({
326
+ })(["display:inline-flex;align-items:center;justify-content:center;margin-right:", ";", " width:", ";height:", ";flex-shrink:0;"], themes_["variables"].spacingLarge, Object(themes_["pick"])({
319
327
  prisma: Object(external_styled_components_["css"])(["background-color:", ";"], themes_["variables"].transparent)
320
328
  }), Object(themes_["pick"])({
321
329
  comfortable: '40px',
@@ -364,6 +372,10 @@ var StyledClose = external_styled_components_default.a.div.withConfig({
364
372
  componentId: "sc-1y722ut-6"
365
373
  })(["", ";position:absolute;right:0;top:0;transform:rotate(90deg) translate(-50%,-50%);"], themes_["mixins"].reset('block'));
366
374
 
375
+ // CONCATENATED MODULE: ./src/Modal/ModalContext.tsx
376
+
377
+ var ModalContext = /*#__PURE__*/Object(external_react_["createContext"])({});
378
+ /* harmony default export */ var Modal_ModalContext = (ModalContext);
367
379
  // CONCATENATED MODULE: ./src/Modal/Header.tsx
368
380
  function Header_extends() { Header_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return Header_extends.apply(this, arguments); }
369
381
 
@@ -375,6 +387,7 @@ function Header_objectWithoutPropertiesLoose(source, excluded) { if (source == n
375
387
 
376
388
 
377
389
 
390
+
378
391
  var Header_propTypes = {
379
392
  children: external_prop_types_default.a.node,
380
393
  icon: external_prop_types_default.a.node,
@@ -395,10 +408,14 @@ function Header(_ref) {
395
408
  otherProps = Header_objectWithoutProperties(_ref, ["children", "icon", "onRequestClose", "subtitle", "title"]);
396
409
 
397
410
  // @docs-props-type StepPropsBase
411
+ var _useContext = Object(external_react_["useContext"])(Modal_ModalContext),
412
+ titleIdContext = _useContext.titleId;
413
+
398
414
  return /*#__PURE__*/external_react_default.a.createElement(HeaderStyles_StyledBox, Header_extends({
399
415
  $close: !!onRequestClose,
400
416
  "data-test": "header"
401
417
  }, otherProps), icon && /*#__PURE__*/external_react_default.a.createElement(StyledIcon, null, icon), title ? /*#__PURE__*/external_react_default.a.createElement(StyledTitleWrapper, null, title && /*#__PURE__*/external_react_default.a.createElement(StyledTitle, {
418
+ id: titleIdContext,
402
419
  "data-test": "title"
403
420
  }, title), subtitle && /*#__PURE__*/external_react_default.a.createElement(StyledSubtitle, {
404
421
  "data-test": "subtitle"
@@ -422,7 +439,7 @@ var Styled = external_styled_components_default()(external_react_spring_["animat
422
439
  componentId: "sc-5fn8ds-0"
423
440
  })(["", ";flex-direction:column;position:fixed;left:50%;transform:translateX(-50%);z-index:", ";", ""], themes_["mixins"].reset('flex'), themes_["variables"].zindexModal, Object(themes_["pick"])({
424
441
  enterprise: Object(external_styled_components_["css"])(["box-shadow:0 1px 5px ", ";max-height:calc(100vh - ", " * 4);max-width:calc(100vw - ", " * 4);"], themes_["variables"].black, themes_["variables"].spacing, themes_["variables"].spacing),
425
- prisma: Object(external_styled_components_["css"])(["box-shadow:", ";max-height:calc(100vh - ", " * 4);max-width:calc(100vw - ", " * 4);"], themes_["variables"].modalShadow, themes_["variables"].spacingXLarge, themes_["variables"].spacingXLarge)
442
+ prisma: Object(external_styled_components_["css"])(["box-shadow:", ";max-height:calc(100vh - ", " * 4);max-width:calc(100vw - ", " * 4);border-radius:", ";overflow:hidden;"], themes_["variables"].modalShadow, themes_["variables"].spacingXLarge, themes_["variables"].spacingXLarge, themes_["variables"].borderRadius)
426
443
  }));
427
444
 
428
445
  // CONCATENATED MODULE: ./src/Modal/Modal.tsx
@@ -477,6 +494,10 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
477
494
 
478
495
 
479
496
 
497
+
498
+
499
+ /** @public */
500
+
480
501
  var Modal_propTypes = {
481
502
  children: external_prop_types_default.a.node,
482
503
  initialFocus: external_prop_types_default.a.oneOfType([external_prop_types_default.a.object, external_prop_types_default.a.oneOf(['first', 'container'])]),
@@ -493,16 +514,14 @@ var Modal_Modal = /*#__PURE__*/function (_Component) {
493
514
 
494
515
  var _super = _createSuper(Modal);
495
516
 
496
- function Modal() {
517
+ // @docs-props-type ModalPropsBase
518
+ // this timeout ensures that the Modal is finished rendering before setting the focus
519
+ function Modal(props) {
497
520
  var _this;
498
521
 
499
522
  _classCallCheck(this, Modal);
500
523
 
501
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
502
- args[_key] = arguments[_key];
503
- }
504
-
505
- _this = _super.call.apply(_super, [this].concat(args));
524
+ _this = _super.call(this, props);
506
525
 
507
526
  _defineProperty(_assertThisInitialized(_this), "el", null);
508
527
 
@@ -510,6 +529,8 @@ var Modal_Modal = /*#__PURE__*/function (_Component) {
510
529
 
511
530
  _defineProperty(_assertThisInitialized(_this), "initialFocus", null);
512
531
 
532
+ _defineProperty(_assertThisInitialized(_this), "headerTitleId", void 0);
533
+
513
534
  _defineProperty(_assertThisInitialized(_this), "getDefaultMotionStyle", function () {
514
535
  return {
515
536
  top: 0
@@ -529,35 +550,43 @@ var Modal_Modal = /*#__PURE__*/function (_Component) {
529
550
  });
530
551
 
531
552
  _defineProperty(_assertThisInitialized(_this), "handleInitialFocus", function () {
532
- var initialFocus = _this.props.initialFocus;
533
- _this.initialFocusTimeoutId = Object(external_lodash_["defer"])(function () {
534
- var focusTarget; // not using the takeFocus() util here because it
535
- // doesn't work for all values of "initialFocus"
536
- // and it has a nested defer() call, which we want to avoid
537
-
538
- if (_this.initialFocus !== initialFocus) {
539
- if (initialFocus === 'first') {
540
- if (_this.el) {
541
- /* eslint-disable prefer-destructuring */
542
-
543
- /* prefer-desturucting leads to harder-to-read syntax in this case */
544
- focusTarget = Object(focus_["getSortedTabbableElements"])(_this.el)[0];
545
- /* eslint-enable prefer-destructuring */
546
- }
547
- } else if (initialFocus === 'container') {
548
- focusTarget = _this.el;
549
- } else if (_typeof(initialFocus) === 'object') {
550
- focusTarget = initialFocus;
551
- } // Typescript isn't happy with optional chaining here
553
+ var _this$props = _this.props,
554
+ initialFocus = _this$props.initialFocus,
555
+ open = _this$props.open;
552
556
 
557
+ if (open) {
558
+ _this.initialFocusTimeoutId = Object(external_lodash_["defer"])(function () {
559
+ var focusTarget; // not using the takeFocus() util here because it
560
+ // doesn't work for all values of "initialFocus"
561
+ // and it has a nested defer() call, which we want to avoid
562
+
563
+ if (_this.initialFocus !== initialFocus) {
564
+ if (initialFocus === 'first') {
565
+ if (_this.el) {
566
+ /* eslint-disable prefer-destructuring */
567
+
568
+ /* prefer-desturucting leads to harder-to-read syntax in this case */
569
+ focusTarget = Object(focus_["getSortedTabbableElements"])(_this.el)[0];
570
+ /* eslint-enable prefer-destructuring */
571
+ }
572
+ } else if (initialFocus === 'container') {
573
+ focusTarget = _this.el;
574
+ } else if (_typeof(initialFocus) === 'object') {
575
+ focusTarget = initialFocus;
576
+ } // Typescript isn't happy with optional chaining here
577
+
578
+
579
+ if (focusTarget != null && 'focus' in focusTarget) {
580
+ focusTarget.focus();
581
+ }
553
582
 
554
- if (focusTarget != null && 'focus' in focusTarget) {
555
- focusTarget.focus();
583
+ _this.initialFocus = initialFocus;
556
584
  }
557
-
558
- _this.initialFocus = initialFocus;
559
- }
560
- });
585
+ });
586
+ } else {
587
+ _this.initialFocus = null;
588
+ clearTimeout(_this.initialFocusTimeoutId);
589
+ }
561
590
  });
562
591
 
563
592
  _defineProperty(_assertThisInitialized(_this), "handleModalMount", function (element) {
@@ -571,16 +600,16 @@ var Modal_Modal = /*#__PURE__*/function (_Component) {
571
600
  });
572
601
 
573
602
  _defineProperty(_assertThisInitialized(_this), "handleRequestClose", function (e) {
574
- var _this$props$onRequest, _this$props;
603
+ var _this$props$onRequest, _this$props2;
575
604
 
576
605
  _this.initialFocus = null;
577
- (_this$props$onRequest = (_this$props = _this.props).onRequestClose) === null || _this$props$onRequest === void 0 ? void 0 : _this$props$onRequest.call(_this$props, e);
606
+ (_this$props$onRequest = (_this$props2 = _this.props).onRequestClose) === null || _this$props$onRequest === void 0 ? void 0 : _this$props$onRequest.call(_this$props2, e);
578
607
  });
579
608
 
580
609
  _defineProperty(_assertThisInitialized(_this), "renderModal", function (interpolatedStyle) {
581
- var _this$props2 = _this.props,
582
- style = _this$props2.style,
583
- children = _this$props2.children;
610
+ var _this$props3 = _this.props,
611
+ style = _this$props3.style,
612
+ children = _this$props3.children;
584
613
  var top = interpolatedStyle.top,
585
614
  opacity = interpolatedStyle.opacity;
586
615
  var clonedChildren = external_react_["Children"].toArray(children).filter(external_react_["isValidElement"]);
@@ -594,19 +623,28 @@ var Modal_Modal = /*#__PURE__*/function (_Component) {
594
623
  }),
595
624
  tabIndex: -1,
596
625
  onKeyDown: _this.handleModalKeyDown,
597
- role: "dialog"
598
- }, Object(external_lodash_["omit"])(_this.props, [].concat(_toConsumableArray(Object(external_lodash_["keys"])(Modal.propTypes)), ['style']))), clonedChildren);
626
+ role: "dialog",
627
+ "aria-labelledby": _this.headerTitleId
628
+ }, Object(external_lodash_["omit"])(_this.props, [].concat(_toConsumableArray(Object(external_lodash_["keys"])(Modal.propTypes)), ['style']))), /*#__PURE__*/external_react_default.a.createElement(Modal_ModalContext.Provider, {
629
+ value: {
630
+ titleId: _this.headerTitleId
631
+ }
632
+ }, clonedChildren));
599
633
  });
600
634
 
635
+ _this.headerTitleId = Object(id_["createDOMID"])('titleId');
601
636
  return _this;
602
637
  }
603
638
 
604
639
  _createClass(Modal, [{
640
+ key: "componentDidMount",
641
+ value: function componentDidMount() {
642
+ this.handleInitialFocus();
643
+ }
644
+ }, {
605
645
  key: "componentDidUpdate",
606
646
  value: function componentDidUpdate(prevProps) {
607
- var _this$props3 = this.props,
608
- initialFocus = _this$props3.initialFocus,
609
- open = _this$props3.open;
647
+ var initialFocus = this.props.initialFocus;
610
648
 
611
649
  if (prevProps.initialFocus !== initialFocus) {
612
650
  // cancel the defer() set up in handleInitialFocus()
@@ -614,11 +652,7 @@ var Modal_Modal = /*#__PURE__*/function (_Component) {
614
652
  clearTimeout(this.initialFocusTimeoutId);
615
653
  }
616
654
 
617
- if (open) {
618
- this.handleInitialFocus();
619
- } else {
620
- this.initialFocus = null;
621
- }
655
+ this.handleInitialFocus();
622
656
  }
623
657
  }, {
624
658
  key: "render",
@@ -668,7 +702,7 @@ module.exports = require("react");
668
702
 
669
703
  /***/ }),
670
704
 
671
- /***/ 25:
705
+ /***/ 26:
672
706
  /***/ (function(module, exports) {
673
707
 
674
708
  module.exports = require("@splunk/ui-utils/focus");
@@ -696,14 +730,14 @@ module.exports = require("lodash");
696
730
 
697
731
  /***/ }),
698
732
 
699
- /***/ 62:
733
+ /***/ 67:
700
734
  /***/ (function(module, exports) {
701
735
 
702
736
  module.exports = require("@splunk/react-ui/CloseButton");
703
737
 
704
738
  /***/ }),
705
739
 
706
- /***/ 68:
740
+ /***/ 77:
707
741
  /***/ (function(module, exports) {
708
742
 
709
743
  module.exports = require("@splunk/react-ui/ModalLayer");
package/ModalLayer.js CHANGED
@@ -82,7 +82,7 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 155);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 163);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -101,7 +101,7 @@ module.exports = require("prop-types");
101
101
 
102
102
  /***/ }),
103
103
 
104
- /***/ 155:
104
+ /***/ 163:
105
105
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
106
106
 
107
107
  "use strict";
@@ -123,7 +123,7 @@ var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_pr
123
123
  var Animation_ = __webpack_require__(30);
124
124
 
125
125
  // EXTERNAL MODULE: external "@splunk/react-ui/Layer"
126
- var Layer_ = __webpack_require__(50);
126
+ var Layer_ = __webpack_require__(55);
127
127
  var Layer_default = /*#__PURE__*/__webpack_require__.n(Layer_);
128
128
 
129
129
  // EXTERNAL MODULE: external "styled-components"
@@ -243,6 +243,7 @@ var ModalLayer_ModalLayer = /*#__PURE__*/function (_Component) {
243
243
  return /*#__PURE__*/external_react_default.a.createElement("div", null,
244
244
  /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
245
245
  renderModal(interpolatedStyle), open && useLayerForClickAway && /*#__PURE__*/external_react_default.a.createElement(StyledClickAwayOverlay, {
246
+ "data-test": "modal-overlay",
246
247
  onMouseDown: _this.handleClickAway,
247
248
  key: "clickAway",
248
249
  style: {
@@ -328,7 +329,7 @@ module.exports = require("@splunk/react-ui/Animation");
328
329
 
329
330
  /***/ }),
330
331
 
331
- /***/ 50:
332
+ /***/ 55:
332
333
  /***/ (function(module, exports) {
333
334
 
334
335
  module.exports = require("@splunk/react-ui/Layer");
package/Monogram.js CHANGED
@@ -82,7 +82,7 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 156);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 164);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -101,14 +101,14 @@ module.exports = require("prop-types");
101
101
 
102
102
  /***/ }),
103
103
 
104
- /***/ 12:
104
+ /***/ 11:
105
105
  /***/ (function(module, exports) {
106
106
 
107
107
  module.exports = require("@splunk/react-ui/Clickable");
108
108
 
109
109
  /***/ }),
110
110
 
111
- /***/ 156:
111
+ /***/ 164:
112
112
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
113
113
 
114
114
  "use strict";
@@ -135,7 +135,7 @@ var external_styled_components_ = __webpack_require__(3);
135
135
  var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_);
136
136
 
137
137
  // EXTERNAL MODULE: external "@splunk/react-ui/Clickable"
138
- var Clickable_ = __webpack_require__(12);
138
+ var Clickable_ = __webpack_require__(11);
139
139
  var Clickable_default = /*#__PURE__*/__webpack_require__.n(Clickable_);
140
140
 
141
141
  // EXTERNAL MODULE: external "@splunk/themes"