@linzjs/lui 17.31.0 → 17.32.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.
package/dist/index.js CHANGED
@@ -7743,12 +7743,12 @@ function findDOMNode(draggable) {
7743
7743
  return node2;
7744
7744
  }
7745
7745
  var DraggableCore$2 = {};
7746
- var log$1 = {};
7747
- Object.defineProperty(log$1, "__esModule", {
7746
+ var log$1$1 = {};
7747
+ Object.defineProperty(log$1$1, "__esModule", {
7748
7748
  value: true
7749
7749
  });
7750
- log$1.default = log;
7751
- function log() {
7750
+ log$1$1.default = log$5;
7751
+ function log$5() {
7752
7752
  }
7753
7753
  function _typeof$2(obj) {
7754
7754
  "@babel/helpers - typeof";
@@ -7773,7 +7773,7 @@ var _reactDom$1 = _interopRequireDefault$5(reactDom.exports);
7773
7773
  var _domFns = domFns;
7774
7774
  var _positionFns = positionFns;
7775
7775
  var _shims = shims;
7776
- var _log = _interopRequireDefault$5(log$1);
7776
+ var _log = _interopRequireDefault$5(log$1$1);
7777
7777
  function _interopRequireDefault$5(obj) {
7778
7778
  return obj && obj.__esModule ? obj : { default: obj };
7779
7779
  }
@@ -7874,7 +7874,7 @@ function _arrayWithHoles$1(arr) {
7874
7874
  if (Array.isArray(arr))
7875
7875
  return arr;
7876
7876
  }
7877
- function _classCallCheck$2(instance, Constructor) {
7877
+ function _classCallCheck$3(instance, Constructor) {
7878
7878
  if (!(instance instanceof Constructor)) {
7879
7879
  throw new TypeError("Cannot call a class as a function");
7880
7880
  }
@@ -7985,7 +7985,7 @@ var DraggableCore$1 = /* @__PURE__ */ function(_React$Component) {
7985
7985
  var _super = _createSuper$1(DraggableCore2);
7986
7986
  function DraggableCore2() {
7987
7987
  var _this;
7988
- _classCallCheck$2(this, DraggableCore2);
7988
+ _classCallCheck$3(this, DraggableCore2);
7989
7989
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
7990
7990
  args[_key] = arguments[_key];
7991
7991
  }
@@ -8231,7 +8231,7 @@ _defineProperty$2(DraggableCore$1, "defaultProps", {
8231
8231
  var _positionFns2 = positionFns;
8232
8232
  var _shims2 = shims;
8233
8233
  var _DraggableCore = _interopRequireDefault2(DraggableCore$2);
8234
- var _log2 = _interopRequireDefault2(log$1);
8234
+ var _log2 = _interopRequireDefault2(log$1$1);
8235
8235
  var _excluded = ["axis", "bounds", "children", "defaultPosition", "defaultClassName", "defaultClassNameDragging", "defaultClassNameDragged", "position", "positionOffset", "scale"];
8236
8236
  function _interopRequireDefault2(obj) {
8237
8237
  return obj && obj.__esModule ? obj : { default: obj };
@@ -18937,7 +18937,7 @@ function _typeof(obj) {
18937
18937
  }, _typeof(obj);
18938
18938
  }
18939
18939
 
18940
- function _classCallCheck$1(instance, Constructor) {
18940
+ function _classCallCheck$2(instance, Constructor) {
18941
18941
  if (!(instance instanceof Constructor)) {
18942
18942
  throw new TypeError("Cannot call a class as a function");
18943
18943
  }
@@ -19566,7 +19566,7 @@ var MenuPlacer = /*#__PURE__*/function (_Component) {
19566
19566
  function MenuPlacer() {
19567
19567
  var _this;
19568
19568
 
19569
- _classCallCheck$1(this, MenuPlacer);
19569
+ _classCallCheck$2(this, MenuPlacer);
19570
19570
 
19571
19571
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
19572
19572
  args[_key] = arguments[_key];
@@ -19754,7 +19754,7 @@ var MenuPortal = /*#__PURE__*/function (_Component2) {
19754
19754
  function MenuPortal() {
19755
19755
  var _this2;
19756
19756
 
19757
- _classCallCheck$1(this, MenuPortal);
19757
+ _classCallCheck$2(this, MenuPortal);
19758
19758
 
19759
19759
  for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
19760
19760
  args[_key2] = arguments[_key2];
@@ -21759,7 +21759,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
21759
21759
  function Select(_props) {
21760
21760
  var _this;
21761
21761
 
21762
- _classCallCheck$1(this, Select);
21762
+ _classCallCheck$2(this, Select);
21763
21763
 
21764
21764
  _this = _super.call(this, _props);
21765
21765
  _this.state = {
@@ -40348,10 +40348,12 @@ var LuiDrawerMenuOptionsV2 = function (_a) {
40348
40348
  return (React__default["default"].createElement("div", { className: "LuiHeaderMenuV2-drawer-options" }, children));
40349
40349
  };
40350
40350
  var LuiDrawerMenuOptionV2 = function (_a) {
40351
- var icon = _a.icon, iconColor = _a.iconColor, label = _a.label, badge = _a.badge, _b = _a.iconSize, iconSize = _b === void 0 ? 'md' : _b, _c = _a.onClick, onClick = _c === void 0 ? function () { } : _c;
40351
+ var icon = _a.icon, iconColor = _a.iconColor, label = _a.label, badge = _a.badge, _b = _a.iconSize, iconSize = _b === void 0 ? 'md' : _b, _c = _a.subMenu, subMenu = _c === void 0 ? false : _c, _d = _a.onClick, onClick = _d === void 0 ? function () { } : _d;
40352
40352
  var menu = React$1.useContext(LuiCloseableHeaderMenuContext);
40353
40353
  return (React__default["default"].createElement("div", { className: "LuiHeaderMenuV2-drawer-option", onClick: function () {
40354
- menu.close();
40354
+ if (!subMenu) {
40355
+ menu.close();
40356
+ }
40355
40357
  onClick();
40356
40358
  }, "data-testid": 'drawer-option' },
40357
40359
  React__default["default"].createElement("div", { className: "LuiHeaderMenuV2-drawer-option-label" },
@@ -40447,7 +40449,16 @@ exports.default = findTabbableDescendants;
40447
40449
  * http://api.jqueryui.com/category/ui-core/
40448
40450
  */
40449
40451
 
40450
- var tabbableNode = /input|select|textarea|button|object/;
40452
+ var DISPLAY_NONE = "none";
40453
+ var DISPLAY_CONTENTS = "contents";
40454
+
40455
+ var tabbableNode = /input|select|textarea|button|object|iframe/;
40456
+
40457
+ function isNotOverflowing(element, style) {
40458
+ return style.getPropertyValue("overflow") !== "visible" ||
40459
+ // if 'overflow: visible' set, check if there is actually any overflow
40460
+ element.scrollWidth <= 0 && element.scrollHeight <= 0;
40461
+ }
40451
40462
 
40452
40463
  function hidesContents(element) {
40453
40464
  var zeroSize = element.offsetWidth <= 0 && element.offsetHeight <= 0;
@@ -40455,17 +40466,27 @@ function hidesContents(element) {
40455
40466
  // If the node is empty, this is good enough
40456
40467
  if (zeroSize && !element.innerHTML) return true;
40457
40468
 
40458
- // Otherwise we need to check some styles
40459
- var style = window.getComputedStyle(element);
40460
- return zeroSize ? style.getPropertyValue("overflow") !== "visible" ||
40461
- // if 'overflow: visible' set, check if there is actually any overflow
40462
- element.scrollWidth <= 0 && element.scrollHeight <= 0 : style.getPropertyValue("display") == "none";
40469
+ try {
40470
+ // Otherwise we need to check some styles
40471
+ var style = window.getComputedStyle(element);
40472
+ var displayValue = style.getPropertyValue("display");
40473
+ return zeroSize ? displayValue !== DISPLAY_CONTENTS && isNotOverflowing(element, style) : displayValue === DISPLAY_NONE;
40474
+ } catch (exception) {
40475
+ // eslint-disable-next-line no-console
40476
+ console.warn("Failed to inspect element style");
40477
+ return false;
40478
+ }
40463
40479
  }
40464
40480
 
40465
40481
  function visible(element) {
40466
40482
  var parentElement = element;
40483
+ var rootNode = element.getRootNode && element.getRootNode();
40467
40484
  while (parentElement) {
40468
40485
  if (parentElement === document.body) break;
40486
+
40487
+ // if we are not hidden yet, skip to checking outside the Web Component
40488
+ if (rootNode && parentElement === rootNode) parentElement = rootNode.host.parentNode;
40489
+
40469
40490
  if (hidesContents(parentElement)) return false;
40470
40491
  parentElement = parentElement.parentNode;
40471
40492
  }
@@ -40486,7 +40507,10 @@ function tabbable(element) {
40486
40507
  }
40487
40508
 
40488
40509
  function findTabbableDescendants(element) {
40489
- return [].slice.call(element.querySelectorAll("*"), 0).filter(tabbable);
40510
+ var descendants = [].slice.call(element.querySelectorAll("*"), 0).reduce(function (finished, el) {
40511
+ return finished.concat(!el.shadowRoot ? [el] : findTabbableDescendants(el.shadowRoot));
40512
+ }, []);
40513
+ return descendants.filter(tabbable);
40490
40514
  }
40491
40515
  module.exports = exports["default"];
40492
40516
  }(tabbable, tabbable.exports));
@@ -40494,6 +40518,8 @@ module.exports = exports["default"];
40494
40518
  Object.defineProperty(focusManager, "__esModule", {
40495
40519
  value: true
40496
40520
  });
40521
+ focusManager.resetState = resetState$4;
40522
+ focusManager.log = log$4;
40497
40523
  focusManager.handleBlur = handleBlur;
40498
40524
  focusManager.handleFocus = handleFocus;
40499
40525
  focusManager.markForFocusLater = markForFocusLater;
@@ -40512,6 +40538,25 @@ var focusLaterElements = [];
40512
40538
  var modalElement = null;
40513
40539
  var needToFocus = false;
40514
40540
 
40541
+ /* eslint-disable no-console */
40542
+ /* istanbul ignore next */
40543
+ function resetState$4() {
40544
+ focusLaterElements = [];
40545
+ }
40546
+
40547
+ /* istanbul ignore next */
40548
+ function log$4() {
40549
+ if (process.env.NODE_ENV !== "production") {
40550
+ console.log("focusManager ----------");
40551
+ focusLaterElements.forEach(function (f) {
40552
+ var check = f || {};
40553
+ console.log(check.nodeName, check.className, check.id);
40554
+ });
40555
+ console.log("end focusManager ----------");
40556
+ }
40557
+ }
40558
+ /* eslint-enable no-console */
40559
+
40515
40560
  function handleBlur() {
40516
40561
  needToFocus = true;
40517
40562
  }
@@ -40543,11 +40588,13 @@ function markForFocusLater() {
40543
40588
 
40544
40589
  /* eslint-disable no-console */
40545
40590
  function returnFocus() {
40591
+ var preventScroll = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
40592
+
40546
40593
  var toFocus = null;
40547
40594
  try {
40548
40595
  if (focusLaterElements.length !== 0) {
40549
40596
  toFocus = focusLaterElements.pop();
40550
- toFocus.focus();
40597
+ toFocus.focus({ preventScroll: preventScroll });
40551
40598
  }
40552
40599
  return;
40553
40600
  } catch (e) {
@@ -40599,6 +40646,12 @@ var _tabbable2 = _interopRequireDefault(_tabbable);
40599
40646
 
40600
40647
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
40601
40648
 
40649
+ function getActiveElement() {
40650
+ var el = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document;
40651
+
40652
+ return el.activeElement.shadowRoot ? getActiveElement(el.activeElement.shadowRoot) : el.activeElement;
40653
+ }
40654
+
40602
40655
  function scopeTab(node, event) {
40603
40656
  var tabbable = (0, _tabbable2.default)(node);
40604
40657
 
@@ -40613,19 +40666,20 @@ function scopeTab(node, event) {
40613
40666
  var shiftKey = event.shiftKey;
40614
40667
  var head = tabbable[0];
40615
40668
  var tail = tabbable[tabbable.length - 1];
40669
+ var activeElement = getActiveElement();
40616
40670
 
40617
40671
  // proceed with default browser behavior on tab.
40618
40672
  // Focus on last element on shift + tab.
40619
- if (node === document.activeElement) {
40673
+ if (node === activeElement) {
40620
40674
  if (!shiftKey) return;
40621
40675
  target = tail;
40622
40676
  }
40623
40677
 
40624
- if (tail === document.activeElement && !shiftKey) {
40678
+ if (tail === activeElement && !shiftKey) {
40625
40679
  target = head;
40626
40680
  }
40627
40681
 
40628
- if (head === document.activeElement && shiftKey) {
40682
+ if (head === activeElement && shiftKey) {
40629
40683
  target = tail;
40630
40684
  }
40631
40685
 
@@ -40653,7 +40707,7 @@ function scopeTab(node, event) {
40653
40707
  // the focus
40654
40708
  if (!isSafariDesktop) return;
40655
40709
 
40656
- var x = tabbable.indexOf(document.activeElement);
40710
+ var x = tabbable.indexOf(activeElement);
40657
40711
 
40658
40712
  if (x > -1) {
40659
40713
  x += shiftKey ? -1 : 1;
@@ -40786,7 +40840,7 @@ var exenv = {exports: {}};
40786
40840
  Object.defineProperty(safeHTMLElement, "__esModule", {
40787
40841
  value: true
40788
40842
  });
40789
- safeHTMLElement.canUseDOM = undefined;
40843
+ safeHTMLElement.canUseDOM = safeHTMLElement.SafeNodeList = safeHTMLElement.SafeHTMLCollection = undefined;
40790
40844
 
40791
40845
  var _exenv = exenv.exports;
40792
40846
 
@@ -40798,6 +40852,10 @@ var EE = _exenv2.default;
40798
40852
 
40799
40853
  var SafeHTMLElement = EE.canUseDOM ? window.HTMLElement : {};
40800
40854
 
40855
+ safeHTMLElement.SafeHTMLCollection = EE.canUseDOM ? window.HTMLCollection : {};
40856
+
40857
+ safeHTMLElement.SafeNodeList = EE.canUseDOM ? window.NodeList : {};
40858
+
40801
40859
  safeHTMLElement.canUseDOM = EE.canUseDOM;
40802
40860
 
40803
40861
  safeHTMLElement.default = SafeHTMLElement;
@@ -40805,13 +40863,14 @@ safeHTMLElement.default = SafeHTMLElement;
40805
40863
  Object.defineProperty(ariaAppHider$1, "__esModule", {
40806
40864
  value: true
40807
40865
  });
40866
+ ariaAppHider$1.resetState = resetState$3;
40867
+ ariaAppHider$1.log = log$3;
40808
40868
  ariaAppHider$1.assertNodeList = assertNodeList;
40809
40869
  ariaAppHider$1.setElement = setElement;
40810
40870
  ariaAppHider$1.validateElement = validateElement;
40811
40871
  ariaAppHider$1.hide = hide$2;
40812
40872
  ariaAppHider$1.show = show;
40813
40873
  ariaAppHider$1.documentNotReadyOrSSRTesting = documentNotReadyOrSSRTesting;
40814
- ariaAppHider$1.resetForTesting = resetForTesting;
40815
40874
 
40816
40875
  var _warning = warning_1;
40817
40876
 
@@ -40823,6 +40882,36 @@ function _interopRequireDefault$2(obj) { return obj && obj.__esModule ? obj : {
40823
40882
 
40824
40883
  var globalElement = null;
40825
40884
 
40885
+ /* eslint-disable no-console */
40886
+ /* istanbul ignore next */
40887
+ function resetState$3() {
40888
+ if (globalElement) {
40889
+ if (globalElement.removeAttribute) {
40890
+ globalElement.removeAttribute("aria-hidden");
40891
+ } else if (globalElement.length != null) {
40892
+ globalElement.forEach(function (element) {
40893
+ return element.removeAttribute("aria-hidden");
40894
+ });
40895
+ } else {
40896
+ document.querySelectorAll(globalElement).forEach(function (element) {
40897
+ return element.removeAttribute("aria-hidden");
40898
+ });
40899
+ }
40900
+ }
40901
+ globalElement = null;
40902
+ }
40903
+
40904
+ /* istanbul ignore next */
40905
+ function log$3() {
40906
+ if (process.env.NODE_ENV !== "production") {
40907
+ var check = globalElement || {};
40908
+ console.log("ariaAppHider ----------");
40909
+ console.log(check.nodeName, check.className, check.id);
40910
+ console.log("end ariaAppHider ----------");
40911
+ }
40912
+ }
40913
+ /* eslint-enable no-console */
40914
+
40826
40915
  function assertNodeList(nodeList, selector) {
40827
40916
  if (!nodeList || !nodeList.length) {
40828
40917
  throw new Error("react-modal: No elements were found for selector " + selector + ".");
@@ -40834,31 +40923,74 @@ function setElement(element) {
40834
40923
  if (typeof useElement === "string" && _safeHTMLElement$1.canUseDOM) {
40835
40924
  var el = document.querySelectorAll(useElement);
40836
40925
  assertNodeList(el, useElement);
40837
- useElement = "length" in el ? el[0] : el;
40926
+ useElement = el;
40838
40927
  }
40839
40928
  globalElement = useElement || globalElement;
40840
40929
  return globalElement;
40841
40930
  }
40842
40931
 
40843
40932
  function validateElement(appElement) {
40844
- if (!appElement && !globalElement) {
40933
+ var el = appElement || globalElement;
40934
+ if (el) {
40935
+ return Array.isArray(el) || el instanceof HTMLCollection || el instanceof NodeList ? el : [el];
40936
+ } else {
40845
40937
  (0, _warning2.default)(false, ["react-modal: App element is not defined.", "Please use `Modal.setAppElement(el)` or set `appElement={el}`.", "This is needed so screen readers don't see main content", "when modal is opened. It is not recommended, but you can opt-out", "by setting `ariaHideApp={false}`."].join(" "));
40846
40938
 
40847
- return false;
40939
+ return [];
40848
40940
  }
40849
-
40850
- return true;
40851
40941
  }
40852
40942
 
40853
40943
  function hide$2(appElement) {
40854
- if (validateElement(appElement)) {
40855
- (appElement || globalElement).setAttribute("aria-hidden", "true");
40944
+ var _iteratorNormalCompletion = true;
40945
+ var _didIteratorError = false;
40946
+ var _iteratorError = undefined;
40947
+
40948
+ try {
40949
+ for (var _iterator = validateElement(appElement)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
40950
+ var el = _step.value;
40951
+
40952
+ el.setAttribute("aria-hidden", "true");
40953
+ }
40954
+ } catch (err) {
40955
+ _didIteratorError = true;
40956
+ _iteratorError = err;
40957
+ } finally {
40958
+ try {
40959
+ if (!_iteratorNormalCompletion && _iterator.return) {
40960
+ _iterator.return();
40961
+ }
40962
+ } finally {
40963
+ if (_didIteratorError) {
40964
+ throw _iteratorError;
40965
+ }
40966
+ }
40856
40967
  }
40857
40968
  }
40858
40969
 
40859
40970
  function show(appElement) {
40860
- if (validateElement(appElement)) {
40861
- (appElement || globalElement).removeAttribute("aria-hidden");
40971
+ var _iteratorNormalCompletion2 = true;
40972
+ var _didIteratorError2 = false;
40973
+ var _iteratorError2 = undefined;
40974
+
40975
+ try {
40976
+ for (var _iterator2 = validateElement(appElement)[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
40977
+ var el = _step2.value;
40978
+
40979
+ el.removeAttribute("aria-hidden");
40980
+ }
40981
+ } catch (err) {
40982
+ _didIteratorError2 = true;
40983
+ _iteratorError2 = err;
40984
+ } finally {
40985
+ try {
40986
+ if (!_iteratorNormalCompletion2 && _iterator2.return) {
40987
+ _iterator2.return();
40988
+ }
40989
+ } finally {
40990
+ if (_didIteratorError2) {
40991
+ throw _iteratorError2;
40992
+ }
40993
+ }
40862
40994
  }
40863
40995
  }
40864
40996
 
@@ -40866,43 +40998,62 @@ function documentNotReadyOrSSRTesting() {
40866
40998
  globalElement = null;
40867
40999
  }
40868
41000
 
40869
- function resetForTesting() {
40870
- globalElement = null;
40871
- }
40872
-
40873
41001
  var classList = {};
40874
41002
 
40875
41003
  Object.defineProperty(classList, "__esModule", {
40876
41004
  value: true
40877
41005
  });
40878
- classList.dumpClassLists = dumpClassLists;
41006
+ classList.resetState = resetState$2;
41007
+ classList.log = log$2;
40879
41008
  var htmlClassList = {};
40880
41009
  var docBodyClassList = {};
40881
41010
 
40882
- function dumpClassLists() {
41011
+ /* eslint-disable no-console */
41012
+ /* istanbul ignore next */
41013
+ function removeClass(at, cls) {
41014
+ at.classList.remove(cls);
41015
+ }
41016
+
41017
+ /* istanbul ignore next */
41018
+ function resetState$2() {
41019
+ var htmlElement = document.getElementsByTagName("html")[0];
41020
+ for (var cls in htmlClassList) {
41021
+ removeClass(htmlElement, htmlClassList[cls]);
41022
+ }
41023
+
41024
+ var body = document.body;
41025
+ for (var _cls in docBodyClassList) {
41026
+ removeClass(body, docBodyClassList[_cls]);
41027
+ }
41028
+
41029
+ htmlClassList = {};
41030
+ docBodyClassList = {};
41031
+ }
41032
+
41033
+ /* istanbul ignore next */
41034
+ function log$2() {
40883
41035
  if (process.env.NODE_ENV !== "production") {
40884
41036
  var classes = document.getElementsByTagName("html")[0].className;
40885
41037
  var buffer = "Show tracked classes:\n\n";
40886
41038
 
40887
- buffer += "<html /> (" + classes + "):\n";
41039
+ buffer += "<html /> (" + classes + "):\n ";
40888
41040
  for (var x in htmlClassList) {
40889
- buffer += " " + x + " " + htmlClassList[x] + "\n";
41041
+ buffer += " " + x + " " + htmlClassList[x] + "\n ";
40890
41042
  }
40891
41043
 
40892
41044
  classes = document.body.className;
40893
41045
 
40894
- // eslint-disable-next-line max-len
40895
- buffer += "\n\ndoc.body (" + classes + "):\n";
41046
+ buffer += "\n\ndoc.body (" + classes + "):\n ";
40896
41047
  for (var _x in docBodyClassList) {
40897
- buffer += " " + _x + " " + docBodyClassList[_x] + "\n";
41048
+ buffer += " " + _x + " " + docBodyClassList[_x] + "\n ";
40898
41049
  }
40899
41050
 
40900
41051
  buffer += "\n";
40901
41052
 
40902
- // eslint-disable-next-line no-console
40903
41053
  console.log(buffer);
40904
41054
  }
40905
41055
  }
41056
+ /* eslint-enable no-console */
40906
41057
 
40907
41058
  /**
40908
41059
  * Track the number of reference of a class.
@@ -40978,22 +41129,22 @@ classList.remove = function remove(element, classString) {
40978
41129
  return untrackClass(element.classList, element.nodeName.toLowerCase() == "html" ? htmlClassList : docBodyClassList, classString.split(" "));
40979
41130
  };
40980
41131
 
40981
- var portalOpenInstances = {exports: {}};
40982
-
40983
- (function (module, exports) {
41132
+ var portalOpenInstances$1 = {};
40984
41133
 
40985
- Object.defineProperty(exports, "__esModule", {
41134
+ Object.defineProperty(portalOpenInstances$1, "__esModule", {
40986
41135
  value: true
40987
41136
  });
41137
+ portalOpenInstances$1.log = log$1;
41138
+ portalOpenInstances$1.resetState = resetState$1;
40988
41139
 
40989
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
41140
+ function _classCallCheck$1(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
40990
41141
 
40991
41142
  // Tracks portals that are open and emits events to subscribers
40992
41143
 
40993
41144
  var PortalOpenInstances = function PortalOpenInstances() {
40994
41145
  var _this = this;
40995
41146
 
40996
- _classCallCheck(this, PortalOpenInstances);
41147
+ _classCallCheck$1(this, PortalOpenInstances);
40997
41148
 
40998
41149
  this.register = function (openInstance) {
40999
41150
  if (_this.openInstances.indexOf(openInstance) !== -1) {
@@ -41038,11 +41189,34 @@ var PortalOpenInstances = function PortalOpenInstances() {
41038
41189
 
41039
41190
  var portalOpenInstances = new PortalOpenInstances();
41040
41191
 
41041
- exports.default = portalOpenInstances;
41042
- module.exports = exports["default"];
41043
- }(portalOpenInstances, portalOpenInstances.exports));
41192
+ /* eslint-disable no-console */
41193
+ /* istanbul ignore next */
41194
+ function log$1() {
41195
+ console.log("portalOpenInstances ----------");
41196
+ console.log(portalOpenInstances.openInstances.length);
41197
+ portalOpenInstances.openInstances.forEach(function (p) {
41198
+ return console.log(p);
41199
+ });
41200
+ console.log("end portalOpenInstances ----------");
41201
+ }
41202
+
41203
+ /* istanbul ignore next */
41204
+ function resetState$1() {
41205
+ portalOpenInstances = new PortalOpenInstances();
41206
+ }
41207
+ /* eslint-enable no-console */
41208
+
41209
+ portalOpenInstances$1.default = portalOpenInstances;
41210
+
41211
+ var bodyTrap$1 = {};
41212
+
41213
+ Object.defineProperty(bodyTrap$1, "__esModule", {
41214
+ value: true
41215
+ });
41216
+ bodyTrap$1.resetState = resetState;
41217
+ bodyTrap$1.log = log;
41044
41218
 
41045
- var _portalOpenInstances = portalOpenInstances.exports;
41219
+ var _portalOpenInstances = portalOpenInstances$1;
41046
41220
 
41047
41221
  var _portalOpenInstances2 = _interopRequireDefault$1(_portalOpenInstances);
41048
41222
 
@@ -41054,6 +41228,34 @@ var before = void 0,
41054
41228
  after = void 0,
41055
41229
  instances = [];
41056
41230
 
41231
+ /* eslint-disable no-console */
41232
+ /* istanbul ignore next */
41233
+ function resetState() {
41234
+ var _arr = [before, after];
41235
+
41236
+ for (var _i = 0; _i < _arr.length; _i++) {
41237
+ var item = _arr[_i];
41238
+ if (!item) continue;
41239
+ item.parentNode && item.parentNode.removeChild(item);
41240
+ }
41241
+ before = after = null;
41242
+ instances = [];
41243
+ }
41244
+
41245
+ /* istanbul ignore next */
41246
+ function log() {
41247
+ console.log("bodyTrap ----------");
41248
+ console.log(instances.length);
41249
+ var _arr2 = [before, after];
41250
+ for (var _i2 = 0; _i2 < _arr2.length; _i2++) {
41251
+ var item = _arr2[_i2];
41252
+ var check = item || {};
41253
+ console.log(check.nodeName, check.className, check.id);
41254
+ }
41255
+ console.log("edn bodyTrap ----------");
41256
+ }
41257
+ /* eslint-enable no-console */
41258
+
41057
41259
  function focusContent() {
41058
41260
  if (instances.length === 0) {
41059
41261
  if (process.env.NODE_ENV !== "production") {
@@ -41066,7 +41268,7 @@ function focusContent() {
41066
41268
  }
41067
41269
 
41068
41270
  function bodyTrap(eventType, openInstances) {
41069
- if (!before || !after) {
41271
+ if (!before && !after) {
41070
41272
  before = document.createElement("div");
41071
41273
  before.setAttribute("data-react-modal-body-trap", "");
41072
41274
  before.style.position = "absolute";
@@ -41114,8 +41316,6 @@ var _createClass = function () { function defineProperties(target, props) { for
41114
41316
 
41115
41317
  var _react = React__default["default"];
41116
41318
 
41117
- var _react2 = _interopRequireDefault(_react);
41118
-
41119
41319
  var _propTypes = propTypes.exports;
41120
41320
 
41121
41321
  var _propTypes2 = _interopRequireDefault(_propTypes);
@@ -41140,7 +41340,7 @@ var _safeHTMLElement = safeHTMLElement;
41140
41340
 
41141
41341
  var _safeHTMLElement2 = _interopRequireDefault(_safeHTMLElement);
41142
41342
 
41143
- var _portalOpenInstances = portalOpenInstances.exports;
41343
+ var _portalOpenInstances = portalOpenInstances$1;
41144
41344
 
41145
41345
  var _portalOpenInstances2 = _interopRequireDefault(_portalOpenInstances);
41146
41346
 
@@ -41162,8 +41362,17 @@ var CLASS_NAMES = {
41162
41362
  content: "ReactModal__Content"
41163
41363
  };
41164
41364
 
41165
- var TAB_KEY = 9;
41166
- var ESC_KEY = 27;
41365
+ /**
41366
+ * We need to support the deprecated `KeyboardEvent.keyCode` in addition to
41367
+ * `KeyboardEvent.code` for apps that still support IE11. Can be removed when
41368
+ * `react-modal` only supports React >18 (which dropped IE support).
41369
+ */
41370
+ var isTabKey = function isTabKey(event) {
41371
+ return event.code === "Tab" || event.keyCode === 9;
41372
+ };
41373
+ var isEscKey = function isEscKey(event) {
41374
+ return event.code === "Escape" || event.keyCode === 27;
41375
+ };
41167
41376
 
41168
41377
  var ariaHiddenInstances = 0;
41169
41378
 
@@ -41190,13 +41399,16 @@ var ModalPortal = function (_Component) {
41190
41399
  appElement = _this$props.appElement,
41191
41400
  ariaHideApp = _this$props.ariaHideApp,
41192
41401
  htmlOpenClassName = _this$props.htmlOpenClassName,
41193
- bodyOpenClassName = _this$props.bodyOpenClassName;
41402
+ bodyOpenClassName = _this$props.bodyOpenClassName,
41403
+ parentSelector = _this$props.parentSelector;
41194
41404
 
41195
- // Remove classes.
41196
41405
 
41197
- bodyOpenClassName && classList$1.remove(document.body, bodyOpenClassName);
41406
+ var parentDocument = parentSelector && parentSelector().ownerDocument || document;
41407
+
41408
+ // Remove classes.
41409
+ bodyOpenClassName && classList$1.remove(parentDocument.body, bodyOpenClassName);
41198
41410
 
41199
- htmlOpenClassName && classList$1.remove(document.getElementsByTagName("html")[0], htmlOpenClassName);
41411
+ htmlOpenClassName && classList$1.remove(parentDocument.getElementsByTagName("html")[0], htmlOpenClassName);
41200
41412
 
41201
41413
  // Reset aria-hidden attribute if all modals have been removed
41202
41414
  if (ariaHideApp && ariaHiddenInstances > 0) {
@@ -41209,7 +41421,7 @@ var ModalPortal = function (_Component) {
41209
41421
 
41210
41422
  if (_this.props.shouldFocusAfterRender) {
41211
41423
  if (_this.props.shouldReturnFocusAfterClose) {
41212
- focusManager$1.returnFocus();
41424
+ focusManager$1.returnFocus(_this.props.preventScroll);
41213
41425
  focusManager$1.teardownScopedFocus();
41214
41426
  } else {
41215
41427
  focusManager$1.popWithoutFocus();
@@ -41235,14 +41447,16 @@ var ModalPortal = function (_Component) {
41235
41447
  }
41236
41448
 
41237
41449
  _this.setState({ isOpen: true }, function () {
41238
- _this.setState({ afterOpen: true });
41239
-
41240
- if (_this.props.isOpen && _this.props.onAfterOpen) {
41241
- _this.props.onAfterOpen({
41242
- overlayEl: _this.overlay,
41243
- contentEl: _this.content
41244
- });
41245
- }
41450
+ _this.openAnimationFrame = requestAnimationFrame(function () {
41451
+ _this.setState({ afterOpen: true });
41452
+
41453
+ if (_this.props.isOpen && _this.props.onAfterOpen) {
41454
+ _this.props.onAfterOpen({
41455
+ overlayEl: _this.overlay,
41456
+ contentEl: _this.content
41457
+ });
41458
+ }
41459
+ });
41246
41460
  });
41247
41461
  }
41248
41462
  };
@@ -41256,7 +41470,7 @@ var ModalPortal = function (_Component) {
41256
41470
  };
41257
41471
 
41258
41472
  _this.focusContent = function () {
41259
- return _this.content && !_this.contentHasFocus() && _this.content.focus();
41473
+ return _this.content && !_this.contentHasFocus() && _this.content.focus({ preventScroll: true });
41260
41474
  };
41261
41475
 
41262
41476
  _this.closeWithTimeout = function () {
@@ -41276,11 +41490,11 @@ var ModalPortal = function (_Component) {
41276
41490
  };
41277
41491
 
41278
41492
  _this.handleKeyDown = function (event) {
41279
- if (event.keyCode === TAB_KEY) {
41493
+ if (isTabKey(event)) {
41280
41494
  (0, _scopeTab2.default)(_this.content, event);
41281
41495
  }
41282
41496
 
41283
- if (_this.props.shouldCloseOnEsc && event.keyCode === ESC_KEY) {
41497
+ if (_this.props.shouldCloseOnEsc && isEscKey(event)) {
41284
41498
  event.stopPropagation();
41285
41499
  _this.requestClose(event);
41286
41500
  }
@@ -41407,6 +41621,7 @@ var ModalPortal = function (_Component) {
41407
41621
  this.afterClose();
41408
41622
  }
41409
41623
  clearTimeout(this.closeTimer);
41624
+ cancelAnimationFrame(this.openAnimationFrame);
41410
41625
  }
41411
41626
  }, {
41412
41627
  key: "beforeOpen",
@@ -41415,13 +41630,16 @@ var ModalPortal = function (_Component) {
41415
41630
  appElement = _props.appElement,
41416
41631
  ariaHideApp = _props.ariaHideApp,
41417
41632
  htmlOpenClassName = _props.htmlOpenClassName,
41418
- bodyOpenClassName = _props.bodyOpenClassName;
41633
+ bodyOpenClassName = _props.bodyOpenClassName,
41634
+ parentSelector = _props.parentSelector;
41419
41635
 
41420
- // Add classes.
41421
41636
 
41422
- bodyOpenClassName && classList$1.add(document.body, bodyOpenClassName);
41637
+ var parentDocument = parentSelector && parentSelector().ownerDocument || document;
41423
41638
 
41424
- htmlOpenClassName && classList$1.add(document.getElementsByTagName("html")[0], htmlOpenClassName);
41639
+ // Add classes.
41640
+ bodyOpenClassName && classList$1.add(parentDocument.body, bodyOpenClassName);
41641
+
41642
+ htmlOpenClassName && classList$1.add(parentDocument.getElementsByTagName("html")[0], htmlOpenClassName);
41425
41643
 
41426
41644
  if (ariaHideApp) {
41427
41645
  ariaHiddenInstances += 1;
@@ -41440,40 +41658,42 @@ var ModalPortal = function (_Component) {
41440
41658
  id = _props2.id,
41441
41659
  className = _props2.className,
41442
41660
  overlayClassName = _props2.overlayClassName,
41443
- defaultStyles = _props2.defaultStyles;
41661
+ defaultStyles = _props2.defaultStyles,
41662
+ children = _props2.children;
41444
41663
 
41445
41664
  var contentStyles = className ? {} : defaultStyles.content;
41446
41665
  var overlayStyles = overlayClassName ? {} : defaultStyles.overlay;
41447
41666
 
41448
- return this.shouldBeClosed() ? null : _react2.default.createElement(
41449
- "div",
41450
- {
41451
- ref: this.setOverlayRef,
41452
- className: this.buildClassName("overlay", overlayClassName),
41453
- style: _extends({}, overlayStyles, this.props.style.overlay),
41454
- onClick: this.handleOverlayOnClick,
41455
- onMouseDown: this.handleOverlayOnMouseDown
41456
- },
41457
- _react2.default.createElement(
41458
- "div",
41459
- _extends({
41460
- id: id,
41461
- ref: this.setContentRef,
41462
- style: _extends({}, contentStyles, this.props.style.content),
41463
- className: this.buildClassName("content", className),
41464
- tabIndex: "-1",
41465
- onKeyDown: this.handleKeyDown,
41466
- onMouseDown: this.handleContentOnMouseDown,
41467
- onMouseUp: this.handleContentOnMouseUp,
41468
- onClick: this.handleContentOnClick,
41469
- role: this.props.role,
41470
- "aria-label": this.props.contentLabel
41471
- }, this.attributesFromObject("aria", this.props.aria || {}), this.attributesFromObject("data", this.props.data || {}), {
41472
- "data-testid": this.props.testId
41473
- }),
41474
- this.props.children
41475
- )
41476
- );
41667
+ if (this.shouldBeClosed()) {
41668
+ return null;
41669
+ }
41670
+
41671
+ var overlayProps = {
41672
+ ref: this.setOverlayRef,
41673
+ className: this.buildClassName("overlay", overlayClassName),
41674
+ style: _extends({}, overlayStyles, this.props.style.overlay),
41675
+ onClick: this.handleOverlayOnClick,
41676
+ onMouseDown: this.handleOverlayOnMouseDown
41677
+ };
41678
+
41679
+ var contentProps = _extends({
41680
+ id: id,
41681
+ ref: this.setContentRef,
41682
+ style: _extends({}, contentStyles, this.props.style.content),
41683
+ className: this.buildClassName("content", className),
41684
+ tabIndex: "-1",
41685
+ onKeyDown: this.handleKeyDown,
41686
+ onMouseDown: this.handleContentOnMouseDown,
41687
+ onMouseUp: this.handleContentOnMouseUp,
41688
+ onClick: this.handleContentOnClick,
41689
+ role: this.props.role,
41690
+ "aria-label": this.props.contentLabel
41691
+ }, this.attributesFromObject("aria", _extends({ modal: true }, this.props.aria)), this.attributesFromObject("data", this.props.data || {}), {
41692
+ "data-testid": this.props.testId
41693
+ });
41694
+
41695
+ var contentElement = this.props.contentElement(contentProps, children);
41696
+ return this.props.overlayElement(overlayProps, contentElement);
41477
41697
  }
41478
41698
  }]);
41479
41699
 
@@ -41499,10 +41719,11 @@ ModalPortal.propTypes = {
41499
41719
  }),
41500
41720
  className: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.object]),
41501
41721
  overlayClassName: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.object]),
41722
+ parentSelector: _propTypes2.default.func,
41502
41723
  bodyOpenClassName: _propTypes2.default.string,
41503
41724
  htmlOpenClassName: _propTypes2.default.string,
41504
41725
  ariaHideApp: _propTypes2.default.bool,
41505
- appElement: _propTypes2.default.instanceOf(_safeHTMLElement2.default),
41726
+ appElement: _propTypes2.default.oneOfType([_propTypes2.default.instanceOf(_safeHTMLElement2.default), _propTypes2.default.instanceOf(_safeHTMLElement.SafeHTMLCollection), _propTypes2.default.instanceOf(_safeHTMLElement.SafeNodeList), _propTypes2.default.arrayOf(_propTypes2.default.instanceOf(_safeHTMLElement2.default))]),
41506
41727
  onAfterOpen: _propTypes2.default.func,
41507
41728
  onAfterClose: _propTypes2.default.func,
41508
41729
  onRequestClose: _propTypes2.default.func,
@@ -41510,6 +41731,7 @@ ModalPortal.propTypes = {
41510
41731
  shouldFocusAfterRender: _propTypes2.default.bool,
41511
41732
  shouldCloseOnOverlayClick: _propTypes2.default.bool,
41512
41733
  shouldReturnFocusAfterClose: _propTypes2.default.bool,
41734
+ preventScroll: _propTypes2.default.bool,
41513
41735
  role: _propTypes2.default.string,
41514
41736
  contentLabel: _propTypes2.default.string,
41515
41737
  aria: _propTypes2.default.object,
@@ -41519,6 +41741,8 @@ ModalPortal.propTypes = {
41519
41741
  overlayRef: _propTypes2.default.func,
41520
41742
  contentRef: _propTypes2.default.func,
41521
41743
  id: _propTypes2.default.string,
41744
+ overlayElement: _propTypes2.default.func,
41745
+ contentElement: _propTypes2.default.func,
41522
41746
  testId: _propTypes2.default.string
41523
41747
  };
41524
41748
  exports.default = ModalPortal;
@@ -41737,7 +41961,11 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
41737
41961
  var portalClassName = Modal$2.portalClassName = "ReactModalPortal";
41738
41962
  var bodyOpenClassName = Modal$2.bodyOpenClassName = "ReactModal__Body--open";
41739
41963
 
41740
- var isReact16 = _reactDom2.default.createPortal !== undefined;
41964
+ var isReact16 = _safeHTMLElement.canUseDOM && _reactDom2.default.createPortal !== undefined;
41965
+
41966
+ var createHTMLElement = function createHTMLElement(name) {
41967
+ return document.createElement(name);
41968
+ };
41741
41969
 
41742
41970
  var getCreatePortal = function getCreatePortal() {
41743
41971
  return isReact16 ? _reactDom2.default.createPortal : _reactDom2.default.unstable_renderSubtreeIntoContainer;
@@ -41764,7 +41992,7 @@ var Modal$1 = function (_Component) {
41764
41992
  return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Modal.__proto__ || Object.getPrototypeOf(Modal)).call.apply(_ref, [this].concat(args))), _this), _this.removePortal = function () {
41765
41993
  !isReact16 && _reactDom2.default.unmountComponentAtNode(_this.node);
41766
41994
  var parent = getParentElement(_this.props.parentSelector);
41767
- if (parent) {
41995
+ if (parent && parent.contains(_this.node)) {
41768
41996
  parent.removeChild(_this.node);
41769
41997
  } else {
41770
41998
  // eslint-disable-next-line no-console
@@ -41785,7 +42013,7 @@ var Modal$1 = function (_Component) {
41785
42013
  if (!_safeHTMLElement.canUseDOM) return;
41786
42014
 
41787
42015
  if (!isReact16) {
41788
- this.node = document.createElement("div");
42016
+ this.node = createHTMLElement("div");
41789
42017
  }
41790
42018
  this.node.className = this.props.portalClassName;
41791
42019
 
@@ -41854,7 +42082,7 @@ var Modal$1 = function (_Component) {
41854
42082
  }
41855
42083
 
41856
42084
  if (!this.node && isReact16) {
41857
- this.node = document.createElement("div");
42085
+ this.node = createHTMLElement("div");
41858
42086
  }
41859
42087
 
41860
42088
  var createPortal = getCreatePortal();
@@ -41897,7 +42125,7 @@ Modal$1.propTypes = {
41897
42125
  afterOpen: _propTypes2.default.string.isRequired,
41898
42126
  beforeClose: _propTypes2.default.string.isRequired
41899
42127
  })]),
41900
- appElement: _propTypes2.default.instanceOf(_safeHTMLElement2.default),
42128
+ appElement: _propTypes2.default.oneOfType([_propTypes2.default.instanceOf(_safeHTMLElement2.default), _propTypes2.default.instanceOf(_safeHTMLElement.SafeHTMLCollection), _propTypes2.default.instanceOf(_safeHTMLElement.SafeNodeList), _propTypes2.default.arrayOf(_propTypes2.default.instanceOf(_safeHTMLElement2.default))]),
41901
42129
  onAfterOpen: _propTypes2.default.func,
41902
42130
  onRequestClose: _propTypes2.default.func,
41903
42131
  closeTimeoutMS: _propTypes2.default.number,
@@ -41905,6 +42133,7 @@ Modal$1.propTypes = {
41905
42133
  shouldFocusAfterRender: _propTypes2.default.bool,
41906
42134
  shouldCloseOnOverlayClick: _propTypes2.default.bool,
41907
42135
  shouldReturnFocusAfterClose: _propTypes2.default.bool,
42136
+ preventScroll: _propTypes2.default.bool,
41908
42137
  parentSelector: _propTypes2.default.func,
41909
42138
  aria: _propTypes2.default.object,
41910
42139
  data: _propTypes2.default.object,
@@ -41912,7 +42141,10 @@ Modal$1.propTypes = {
41912
42141
  contentLabel: _propTypes2.default.string,
41913
42142
  shouldCloseOnEsc: _propTypes2.default.bool,
41914
42143
  overlayRef: _propTypes2.default.func,
41915
- contentRef: _propTypes2.default.func
42144
+ contentRef: _propTypes2.default.func,
42145
+ id: _propTypes2.default.string,
42146
+ overlayElement: _propTypes2.default.func,
42147
+ contentElement: _propTypes2.default.func
41916
42148
  };
41917
42149
  Modal$1.defaultProps = {
41918
42150
  isOpen: false,
@@ -41925,8 +42157,23 @@ Modal$1.defaultProps = {
41925
42157
  shouldCloseOnEsc: true,
41926
42158
  shouldCloseOnOverlayClick: true,
41927
42159
  shouldReturnFocusAfterClose: true,
42160
+ preventScroll: false,
41928
42161
  parentSelector: function parentSelector() {
41929
42162
  return document.body;
42163
+ },
42164
+ overlayElement: function overlayElement(props, contentEl) {
42165
+ return _react2.default.createElement(
42166
+ "div",
42167
+ props,
42168
+ contentEl
42169
+ );
42170
+ },
42171
+ contentElement: function contentElement(props, children) {
42172
+ return _react2.default.createElement(
42173
+ "div",
42174
+ props,
42175
+ children
42176
+ );
41930
42177
  }
41931
42178
  };
41932
42179
  Modal$1.defaultStyles = {
@@ -41957,6 +42204,12 @@ Modal$1.defaultStyles = {
41957
42204
 
41958
42205
  (0, _reactLifecyclesCompat.polyfill)(Modal$1);
41959
42206
 
42207
+ if (process.env.NODE_ENV !== "production") {
42208
+ Modal$1.setCreateHTMLElement = function (fn) {
42209
+ return createHTMLElement = fn;
42210
+ };
42211
+ }
42212
+
41960
42213
  Modal$2.default = Modal$1;
41961
42214
 
41962
42215
  (function (module, exports) {
@@ -41979,36 +42232,25 @@ var Modal = /*@__PURE__*/getDefaultExportFromCjs(lib.exports);
41979
42232
 
41980
42233
  var LuiUpdatesSplashModal = function (props) {
41981
42234
  var _a;
41982
- var node = React$1.useRef(null);
41983
- // We have to do this as the CSS takes over a lot of the page
41984
- // https://medium.com/@pitipatdop/little-neat-trick-to-capture-click-outside-with-react-hook-ba77c37c7e82
41985
- var handleClickOutside = React$1.useCallback(function (e) {
41986
- console.log('clicking anywhere');
41987
- // current DOES have a contains!
41988
- if ((node === null || node === void 0 ? void 0 : node.current) && node.current.contains(e.target)) {
41989
- // inside click
41990
- return;
41991
- }
41992
- // outside click
41993
- props.onClose();
41994
- }, [props]);
41995
- React$1.useEffect(function () {
41996
- document.addEventListener('mousedown', handleClickOutside);
41997
- return function () {
41998
- document.removeEventListener('mousedown', handleClickOutside);
41999
- };
42000
- }, [handleClickOutside]);
42235
+ var _b = React__default["default"].useState(props.enabled), showModal = _b[0], setshowModal = _b[1];
42236
+ var currentVersion = window.localStorage.getItem(props.id);
42237
+ var handleClose = function () {
42238
+ setshowModal(false);
42239
+ window.localStorage.setItem(props.id, props.releaseVersion);
42240
+ };
42001
42241
  // process may be undefined, e.g. webpack 5 does not include a polyfill for it. Assume if process is undefined then
42002
42242
  // this isn't running in a test.
42003
42243
  if (typeof process === 'undefined' || ((_a = process === null || process === void 0 ? void 0 : process.env) === null || _a === void 0 ? void 0 : _a.NODE_ENV) !== 'test') {
42004
42244
  Modal.setAppElement('#root');
42005
42245
  }
42006
- return (React__default["default"].createElement(Modal, { key: props.id, isOpen: true, shouldCloseOnOverlayClick: true, onRequestClose: props.onClose, contentLabel: "Recent updates", className: "lui-scrim", style: { overlay: { backgroundColor: 'transparent' } } },
42007
- React__default["default"].createElement("div", { ref: node, className: clsx$1('lui-large-feature-notification', props.wrapperClass) },
42246
+ return (React__default["default"].createElement(Modal, { isOpen: props.enabled &&
42247
+ showModal &&
42248
+ props.releaseVersion.trim() !== currentVersion, shouldCloseOnEsc: true, onRequestClose: handleClose, shouldCloseOnOverlayClick: true, contentLabel: "Recent updates", className: "lui-splash-content", overlayClassName: "splash_overlay" },
42249
+ React__default["default"].createElement("div", { className: clsx$1('lui-large-feature-notification', props.wrapperClass) },
42008
42250
  React__default["default"].createElement("div", { className: "lui-feature-header" },
42009
42251
  React__default["default"].createElement("h1", null, props.header),
42010
- React__default["default"].createElement("button", { "aria-label": "Close dialog", onClick: props.onClose },
42011
- React__default["default"].createElement("i", { className: "material-icons-round" }, "close"))),
42252
+ React__default["default"].createElement("button", { "aria-label": "Close dialog", onClick: handleClose },
42253
+ React__default["default"].createElement(LuiIcon, { alt: "cross_icon", name: "ic_clear", status: "interactive", size: "md" }))),
42012
42254
  React__default["default"].createElement("div", { className: "lui-feature-img" },
42013
42255
  React__default["default"].createElement("img", { className: "lui-hide-xs lui-hide-sm", alt: "What's new", src: props.bigImage }),
42014
42256
  React__default["default"].createElement("img", { className: "lui-hide-md lui-hide-lg lui-hide-xl", alt: "What's new", src: props.smallImage })),