@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/lui.esm.js CHANGED
@@ -7714,12 +7714,12 @@ function findDOMNode(draggable) {
7714
7714
  return node2;
7715
7715
  }
7716
7716
  var DraggableCore$2 = {};
7717
- var log$1 = {};
7718
- Object.defineProperty(log$1, "__esModule", {
7717
+ var log$1$1 = {};
7718
+ Object.defineProperty(log$1$1, "__esModule", {
7719
7719
  value: true
7720
7720
  });
7721
- log$1.default = log;
7722
- function log() {
7721
+ log$1$1.default = log$5;
7722
+ function log$5() {
7723
7723
  }
7724
7724
  function _typeof$2(obj) {
7725
7725
  "@babel/helpers - typeof";
@@ -7744,7 +7744,7 @@ var _reactDom$1 = _interopRequireDefault$5(reactDom.exports);
7744
7744
  var _domFns = domFns;
7745
7745
  var _positionFns = positionFns;
7746
7746
  var _shims = shims;
7747
- var _log = _interopRequireDefault$5(log$1);
7747
+ var _log = _interopRequireDefault$5(log$1$1);
7748
7748
  function _interopRequireDefault$5(obj) {
7749
7749
  return obj && obj.__esModule ? obj : { default: obj };
7750
7750
  }
@@ -7845,7 +7845,7 @@ function _arrayWithHoles$1(arr) {
7845
7845
  if (Array.isArray(arr))
7846
7846
  return arr;
7847
7847
  }
7848
- function _classCallCheck$2(instance, Constructor) {
7848
+ function _classCallCheck$3(instance, Constructor) {
7849
7849
  if (!(instance instanceof Constructor)) {
7850
7850
  throw new TypeError("Cannot call a class as a function");
7851
7851
  }
@@ -7956,7 +7956,7 @@ var DraggableCore$1 = /* @__PURE__ */ function(_React$Component) {
7956
7956
  var _super = _createSuper$1(DraggableCore2);
7957
7957
  function DraggableCore2() {
7958
7958
  var _this;
7959
- _classCallCheck$2(this, DraggableCore2);
7959
+ _classCallCheck$3(this, DraggableCore2);
7960
7960
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
7961
7961
  args[_key] = arguments[_key];
7962
7962
  }
@@ -8202,7 +8202,7 @@ _defineProperty$2(DraggableCore$1, "defaultProps", {
8202
8202
  var _positionFns2 = positionFns;
8203
8203
  var _shims2 = shims;
8204
8204
  var _DraggableCore = _interopRequireDefault2(DraggableCore$2);
8205
- var _log2 = _interopRequireDefault2(log$1);
8205
+ var _log2 = _interopRequireDefault2(log$1$1);
8206
8206
  var _excluded = ["axis", "bounds", "children", "defaultPosition", "defaultClassName", "defaultClassNameDragging", "defaultClassNameDragged", "position", "positionOffset", "scale"];
8207
8207
  function _interopRequireDefault2(obj) {
8208
8208
  return obj && obj.__esModule ? obj : { default: obj };
@@ -18908,7 +18908,7 @@ function _typeof(obj) {
18908
18908
  }, _typeof(obj);
18909
18909
  }
18910
18910
 
18911
- function _classCallCheck$1(instance, Constructor) {
18911
+ function _classCallCheck$2(instance, Constructor) {
18912
18912
  if (!(instance instanceof Constructor)) {
18913
18913
  throw new TypeError("Cannot call a class as a function");
18914
18914
  }
@@ -19537,7 +19537,7 @@ var MenuPlacer = /*#__PURE__*/function (_Component) {
19537
19537
  function MenuPlacer() {
19538
19538
  var _this;
19539
19539
 
19540
- _classCallCheck$1(this, MenuPlacer);
19540
+ _classCallCheck$2(this, MenuPlacer);
19541
19541
 
19542
19542
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
19543
19543
  args[_key] = arguments[_key];
@@ -19725,7 +19725,7 @@ var MenuPortal = /*#__PURE__*/function (_Component2) {
19725
19725
  function MenuPortal() {
19726
19726
  var _this2;
19727
19727
 
19728
- _classCallCheck$1(this, MenuPortal);
19728
+ _classCallCheck$2(this, MenuPortal);
19729
19729
 
19730
19730
  for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
19731
19731
  args[_key2] = arguments[_key2];
@@ -21730,7 +21730,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
21730
21730
  function Select(_props) {
21731
21731
  var _this;
21732
21732
 
21733
- _classCallCheck$1(this, Select);
21733
+ _classCallCheck$2(this, Select);
21734
21734
 
21735
21735
  _this = _super.call(this, _props);
21736
21736
  _this.state = {
@@ -40319,10 +40319,12 @@ var LuiDrawerMenuOptionsV2 = function (_a) {
40319
40319
  return (React__default.createElement("div", { className: "LuiHeaderMenuV2-drawer-options" }, children));
40320
40320
  };
40321
40321
  var LuiDrawerMenuOptionV2 = function (_a) {
40322
- 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;
40322
+ 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;
40323
40323
  var menu = useContext(LuiCloseableHeaderMenuContext);
40324
40324
  return (React__default.createElement("div", { className: "LuiHeaderMenuV2-drawer-option", onClick: function () {
40325
- menu.close();
40325
+ if (!subMenu) {
40326
+ menu.close();
40327
+ }
40326
40328
  onClick();
40327
40329
  }, "data-testid": 'drawer-option' },
40328
40330
  React__default.createElement("div", { className: "LuiHeaderMenuV2-drawer-option-label" },
@@ -40418,7 +40420,16 @@ exports.default = findTabbableDescendants;
40418
40420
  * http://api.jqueryui.com/category/ui-core/
40419
40421
  */
40420
40422
 
40421
- var tabbableNode = /input|select|textarea|button|object/;
40423
+ var DISPLAY_NONE = "none";
40424
+ var DISPLAY_CONTENTS = "contents";
40425
+
40426
+ var tabbableNode = /input|select|textarea|button|object|iframe/;
40427
+
40428
+ function isNotOverflowing(element, style) {
40429
+ return style.getPropertyValue("overflow") !== "visible" ||
40430
+ // if 'overflow: visible' set, check if there is actually any overflow
40431
+ element.scrollWidth <= 0 && element.scrollHeight <= 0;
40432
+ }
40422
40433
 
40423
40434
  function hidesContents(element) {
40424
40435
  var zeroSize = element.offsetWidth <= 0 && element.offsetHeight <= 0;
@@ -40426,17 +40437,27 @@ function hidesContents(element) {
40426
40437
  // If the node is empty, this is good enough
40427
40438
  if (zeroSize && !element.innerHTML) return true;
40428
40439
 
40429
- // Otherwise we need to check some styles
40430
- var style = window.getComputedStyle(element);
40431
- return zeroSize ? style.getPropertyValue("overflow") !== "visible" ||
40432
- // if 'overflow: visible' set, check if there is actually any overflow
40433
- element.scrollWidth <= 0 && element.scrollHeight <= 0 : style.getPropertyValue("display") == "none";
40440
+ try {
40441
+ // Otherwise we need to check some styles
40442
+ var style = window.getComputedStyle(element);
40443
+ var displayValue = style.getPropertyValue("display");
40444
+ return zeroSize ? displayValue !== DISPLAY_CONTENTS && isNotOverflowing(element, style) : displayValue === DISPLAY_NONE;
40445
+ } catch (exception) {
40446
+ // eslint-disable-next-line no-console
40447
+ console.warn("Failed to inspect element style");
40448
+ return false;
40449
+ }
40434
40450
  }
40435
40451
 
40436
40452
  function visible(element) {
40437
40453
  var parentElement = element;
40454
+ var rootNode = element.getRootNode && element.getRootNode();
40438
40455
  while (parentElement) {
40439
40456
  if (parentElement === document.body) break;
40457
+
40458
+ // if we are not hidden yet, skip to checking outside the Web Component
40459
+ if (rootNode && parentElement === rootNode) parentElement = rootNode.host.parentNode;
40460
+
40440
40461
  if (hidesContents(parentElement)) return false;
40441
40462
  parentElement = parentElement.parentNode;
40442
40463
  }
@@ -40457,7 +40478,10 @@ function tabbable(element) {
40457
40478
  }
40458
40479
 
40459
40480
  function findTabbableDescendants(element) {
40460
- return [].slice.call(element.querySelectorAll("*"), 0).filter(tabbable);
40481
+ var descendants = [].slice.call(element.querySelectorAll("*"), 0).reduce(function (finished, el) {
40482
+ return finished.concat(!el.shadowRoot ? [el] : findTabbableDescendants(el.shadowRoot));
40483
+ }, []);
40484
+ return descendants.filter(tabbable);
40461
40485
  }
40462
40486
  module.exports = exports["default"];
40463
40487
  }(tabbable, tabbable.exports));
@@ -40465,6 +40489,8 @@ module.exports = exports["default"];
40465
40489
  Object.defineProperty(focusManager, "__esModule", {
40466
40490
  value: true
40467
40491
  });
40492
+ focusManager.resetState = resetState$4;
40493
+ focusManager.log = log$4;
40468
40494
  focusManager.handleBlur = handleBlur;
40469
40495
  focusManager.handleFocus = handleFocus;
40470
40496
  focusManager.markForFocusLater = markForFocusLater;
@@ -40483,6 +40509,25 @@ var focusLaterElements = [];
40483
40509
  var modalElement = null;
40484
40510
  var needToFocus = false;
40485
40511
 
40512
+ /* eslint-disable no-console */
40513
+ /* istanbul ignore next */
40514
+ function resetState$4() {
40515
+ focusLaterElements = [];
40516
+ }
40517
+
40518
+ /* istanbul ignore next */
40519
+ function log$4() {
40520
+ if (process.env.NODE_ENV !== "production") {
40521
+ console.log("focusManager ----------");
40522
+ focusLaterElements.forEach(function (f) {
40523
+ var check = f || {};
40524
+ console.log(check.nodeName, check.className, check.id);
40525
+ });
40526
+ console.log("end focusManager ----------");
40527
+ }
40528
+ }
40529
+ /* eslint-enable no-console */
40530
+
40486
40531
  function handleBlur() {
40487
40532
  needToFocus = true;
40488
40533
  }
@@ -40514,11 +40559,13 @@ function markForFocusLater() {
40514
40559
 
40515
40560
  /* eslint-disable no-console */
40516
40561
  function returnFocus() {
40562
+ var preventScroll = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
40563
+
40517
40564
  var toFocus = null;
40518
40565
  try {
40519
40566
  if (focusLaterElements.length !== 0) {
40520
40567
  toFocus = focusLaterElements.pop();
40521
- toFocus.focus();
40568
+ toFocus.focus({ preventScroll: preventScroll });
40522
40569
  }
40523
40570
  return;
40524
40571
  } catch (e) {
@@ -40570,6 +40617,12 @@ var _tabbable2 = _interopRequireDefault(_tabbable);
40570
40617
 
40571
40618
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
40572
40619
 
40620
+ function getActiveElement() {
40621
+ var el = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document;
40622
+
40623
+ return el.activeElement.shadowRoot ? getActiveElement(el.activeElement.shadowRoot) : el.activeElement;
40624
+ }
40625
+
40573
40626
  function scopeTab(node, event) {
40574
40627
  var tabbable = (0, _tabbable2.default)(node);
40575
40628
 
@@ -40584,19 +40637,20 @@ function scopeTab(node, event) {
40584
40637
  var shiftKey = event.shiftKey;
40585
40638
  var head = tabbable[0];
40586
40639
  var tail = tabbable[tabbable.length - 1];
40640
+ var activeElement = getActiveElement();
40587
40641
 
40588
40642
  // proceed with default browser behavior on tab.
40589
40643
  // Focus on last element on shift + tab.
40590
- if (node === document.activeElement) {
40644
+ if (node === activeElement) {
40591
40645
  if (!shiftKey) return;
40592
40646
  target = tail;
40593
40647
  }
40594
40648
 
40595
- if (tail === document.activeElement && !shiftKey) {
40649
+ if (tail === activeElement && !shiftKey) {
40596
40650
  target = head;
40597
40651
  }
40598
40652
 
40599
- if (head === document.activeElement && shiftKey) {
40653
+ if (head === activeElement && shiftKey) {
40600
40654
  target = tail;
40601
40655
  }
40602
40656
 
@@ -40624,7 +40678,7 @@ function scopeTab(node, event) {
40624
40678
  // the focus
40625
40679
  if (!isSafariDesktop) return;
40626
40680
 
40627
- var x = tabbable.indexOf(document.activeElement);
40681
+ var x = tabbable.indexOf(activeElement);
40628
40682
 
40629
40683
  if (x > -1) {
40630
40684
  x += shiftKey ? -1 : 1;
@@ -40757,7 +40811,7 @@ var exenv = {exports: {}};
40757
40811
  Object.defineProperty(safeHTMLElement, "__esModule", {
40758
40812
  value: true
40759
40813
  });
40760
- safeHTMLElement.canUseDOM = undefined;
40814
+ safeHTMLElement.canUseDOM = safeHTMLElement.SafeNodeList = safeHTMLElement.SafeHTMLCollection = undefined;
40761
40815
 
40762
40816
  var _exenv = exenv.exports;
40763
40817
 
@@ -40769,6 +40823,10 @@ var EE = _exenv2.default;
40769
40823
 
40770
40824
  var SafeHTMLElement = EE.canUseDOM ? window.HTMLElement : {};
40771
40825
 
40826
+ safeHTMLElement.SafeHTMLCollection = EE.canUseDOM ? window.HTMLCollection : {};
40827
+
40828
+ safeHTMLElement.SafeNodeList = EE.canUseDOM ? window.NodeList : {};
40829
+
40772
40830
  safeHTMLElement.canUseDOM = EE.canUseDOM;
40773
40831
 
40774
40832
  safeHTMLElement.default = SafeHTMLElement;
@@ -40776,13 +40834,14 @@ safeHTMLElement.default = SafeHTMLElement;
40776
40834
  Object.defineProperty(ariaAppHider$1, "__esModule", {
40777
40835
  value: true
40778
40836
  });
40837
+ ariaAppHider$1.resetState = resetState$3;
40838
+ ariaAppHider$1.log = log$3;
40779
40839
  ariaAppHider$1.assertNodeList = assertNodeList;
40780
40840
  ariaAppHider$1.setElement = setElement;
40781
40841
  ariaAppHider$1.validateElement = validateElement;
40782
40842
  ariaAppHider$1.hide = hide$2;
40783
40843
  ariaAppHider$1.show = show;
40784
40844
  ariaAppHider$1.documentNotReadyOrSSRTesting = documentNotReadyOrSSRTesting;
40785
- ariaAppHider$1.resetForTesting = resetForTesting;
40786
40845
 
40787
40846
  var _warning = warning_1;
40788
40847
 
@@ -40794,6 +40853,36 @@ function _interopRequireDefault$2(obj) { return obj && obj.__esModule ? obj : {
40794
40853
 
40795
40854
  var globalElement = null;
40796
40855
 
40856
+ /* eslint-disable no-console */
40857
+ /* istanbul ignore next */
40858
+ function resetState$3() {
40859
+ if (globalElement) {
40860
+ if (globalElement.removeAttribute) {
40861
+ globalElement.removeAttribute("aria-hidden");
40862
+ } else if (globalElement.length != null) {
40863
+ globalElement.forEach(function (element) {
40864
+ return element.removeAttribute("aria-hidden");
40865
+ });
40866
+ } else {
40867
+ document.querySelectorAll(globalElement).forEach(function (element) {
40868
+ return element.removeAttribute("aria-hidden");
40869
+ });
40870
+ }
40871
+ }
40872
+ globalElement = null;
40873
+ }
40874
+
40875
+ /* istanbul ignore next */
40876
+ function log$3() {
40877
+ if (process.env.NODE_ENV !== "production") {
40878
+ var check = globalElement || {};
40879
+ console.log("ariaAppHider ----------");
40880
+ console.log(check.nodeName, check.className, check.id);
40881
+ console.log("end ariaAppHider ----------");
40882
+ }
40883
+ }
40884
+ /* eslint-enable no-console */
40885
+
40797
40886
  function assertNodeList(nodeList, selector) {
40798
40887
  if (!nodeList || !nodeList.length) {
40799
40888
  throw new Error("react-modal: No elements were found for selector " + selector + ".");
@@ -40805,31 +40894,74 @@ function setElement(element) {
40805
40894
  if (typeof useElement === "string" && _safeHTMLElement$1.canUseDOM) {
40806
40895
  var el = document.querySelectorAll(useElement);
40807
40896
  assertNodeList(el, useElement);
40808
- useElement = "length" in el ? el[0] : el;
40897
+ useElement = el;
40809
40898
  }
40810
40899
  globalElement = useElement || globalElement;
40811
40900
  return globalElement;
40812
40901
  }
40813
40902
 
40814
40903
  function validateElement(appElement) {
40815
- if (!appElement && !globalElement) {
40904
+ var el = appElement || globalElement;
40905
+ if (el) {
40906
+ return Array.isArray(el) || el instanceof HTMLCollection || el instanceof NodeList ? el : [el];
40907
+ } else {
40816
40908
  (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(" "));
40817
40909
 
40818
- return false;
40910
+ return [];
40819
40911
  }
40820
-
40821
- return true;
40822
40912
  }
40823
40913
 
40824
40914
  function hide$2(appElement) {
40825
- if (validateElement(appElement)) {
40826
- (appElement || globalElement).setAttribute("aria-hidden", "true");
40915
+ var _iteratorNormalCompletion = true;
40916
+ var _didIteratorError = false;
40917
+ var _iteratorError = undefined;
40918
+
40919
+ try {
40920
+ for (var _iterator = validateElement(appElement)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
40921
+ var el = _step.value;
40922
+
40923
+ el.setAttribute("aria-hidden", "true");
40924
+ }
40925
+ } catch (err) {
40926
+ _didIteratorError = true;
40927
+ _iteratorError = err;
40928
+ } finally {
40929
+ try {
40930
+ if (!_iteratorNormalCompletion && _iterator.return) {
40931
+ _iterator.return();
40932
+ }
40933
+ } finally {
40934
+ if (_didIteratorError) {
40935
+ throw _iteratorError;
40936
+ }
40937
+ }
40827
40938
  }
40828
40939
  }
40829
40940
 
40830
40941
  function show(appElement) {
40831
- if (validateElement(appElement)) {
40832
- (appElement || globalElement).removeAttribute("aria-hidden");
40942
+ var _iteratorNormalCompletion2 = true;
40943
+ var _didIteratorError2 = false;
40944
+ var _iteratorError2 = undefined;
40945
+
40946
+ try {
40947
+ for (var _iterator2 = validateElement(appElement)[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
40948
+ var el = _step2.value;
40949
+
40950
+ el.removeAttribute("aria-hidden");
40951
+ }
40952
+ } catch (err) {
40953
+ _didIteratorError2 = true;
40954
+ _iteratorError2 = err;
40955
+ } finally {
40956
+ try {
40957
+ if (!_iteratorNormalCompletion2 && _iterator2.return) {
40958
+ _iterator2.return();
40959
+ }
40960
+ } finally {
40961
+ if (_didIteratorError2) {
40962
+ throw _iteratorError2;
40963
+ }
40964
+ }
40833
40965
  }
40834
40966
  }
40835
40967
 
@@ -40837,43 +40969,62 @@ function documentNotReadyOrSSRTesting() {
40837
40969
  globalElement = null;
40838
40970
  }
40839
40971
 
40840
- function resetForTesting() {
40841
- globalElement = null;
40842
- }
40843
-
40844
40972
  var classList = {};
40845
40973
 
40846
40974
  Object.defineProperty(classList, "__esModule", {
40847
40975
  value: true
40848
40976
  });
40849
- classList.dumpClassLists = dumpClassLists;
40977
+ classList.resetState = resetState$2;
40978
+ classList.log = log$2;
40850
40979
  var htmlClassList = {};
40851
40980
  var docBodyClassList = {};
40852
40981
 
40853
- function dumpClassLists() {
40982
+ /* eslint-disable no-console */
40983
+ /* istanbul ignore next */
40984
+ function removeClass(at, cls) {
40985
+ at.classList.remove(cls);
40986
+ }
40987
+
40988
+ /* istanbul ignore next */
40989
+ function resetState$2() {
40990
+ var htmlElement = document.getElementsByTagName("html")[0];
40991
+ for (var cls in htmlClassList) {
40992
+ removeClass(htmlElement, htmlClassList[cls]);
40993
+ }
40994
+
40995
+ var body = document.body;
40996
+ for (var _cls in docBodyClassList) {
40997
+ removeClass(body, docBodyClassList[_cls]);
40998
+ }
40999
+
41000
+ htmlClassList = {};
41001
+ docBodyClassList = {};
41002
+ }
41003
+
41004
+ /* istanbul ignore next */
41005
+ function log$2() {
40854
41006
  if (process.env.NODE_ENV !== "production") {
40855
41007
  var classes = document.getElementsByTagName("html")[0].className;
40856
41008
  var buffer = "Show tracked classes:\n\n";
40857
41009
 
40858
- buffer += "<html /> (" + classes + "):\n";
41010
+ buffer += "<html /> (" + classes + "):\n ";
40859
41011
  for (var x in htmlClassList) {
40860
- buffer += " " + x + " " + htmlClassList[x] + "\n";
41012
+ buffer += " " + x + " " + htmlClassList[x] + "\n ";
40861
41013
  }
40862
41014
 
40863
41015
  classes = document.body.className;
40864
41016
 
40865
- // eslint-disable-next-line max-len
40866
- buffer += "\n\ndoc.body (" + classes + "):\n";
41017
+ buffer += "\n\ndoc.body (" + classes + "):\n ";
40867
41018
  for (var _x in docBodyClassList) {
40868
- buffer += " " + _x + " " + docBodyClassList[_x] + "\n";
41019
+ buffer += " " + _x + " " + docBodyClassList[_x] + "\n ";
40869
41020
  }
40870
41021
 
40871
41022
  buffer += "\n";
40872
41023
 
40873
- // eslint-disable-next-line no-console
40874
41024
  console.log(buffer);
40875
41025
  }
40876
41026
  }
41027
+ /* eslint-enable no-console */
40877
41028
 
40878
41029
  /**
40879
41030
  * Track the number of reference of a class.
@@ -40949,22 +41100,22 @@ classList.remove = function remove(element, classString) {
40949
41100
  return untrackClass(element.classList, element.nodeName.toLowerCase() == "html" ? htmlClassList : docBodyClassList, classString.split(" "));
40950
41101
  };
40951
41102
 
40952
- var portalOpenInstances = {exports: {}};
40953
-
40954
- (function (module, exports) {
41103
+ var portalOpenInstances$1 = {};
40955
41104
 
40956
- Object.defineProperty(exports, "__esModule", {
41105
+ Object.defineProperty(portalOpenInstances$1, "__esModule", {
40957
41106
  value: true
40958
41107
  });
41108
+ portalOpenInstances$1.log = log$1;
41109
+ portalOpenInstances$1.resetState = resetState$1;
40959
41110
 
40960
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
41111
+ function _classCallCheck$1(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
40961
41112
 
40962
41113
  // Tracks portals that are open and emits events to subscribers
40963
41114
 
40964
41115
  var PortalOpenInstances = function PortalOpenInstances() {
40965
41116
  var _this = this;
40966
41117
 
40967
- _classCallCheck(this, PortalOpenInstances);
41118
+ _classCallCheck$1(this, PortalOpenInstances);
40968
41119
 
40969
41120
  this.register = function (openInstance) {
40970
41121
  if (_this.openInstances.indexOf(openInstance) !== -1) {
@@ -41009,11 +41160,34 @@ var PortalOpenInstances = function PortalOpenInstances() {
41009
41160
 
41010
41161
  var portalOpenInstances = new PortalOpenInstances();
41011
41162
 
41012
- exports.default = portalOpenInstances;
41013
- module.exports = exports["default"];
41014
- }(portalOpenInstances, portalOpenInstances.exports));
41163
+ /* eslint-disable no-console */
41164
+ /* istanbul ignore next */
41165
+ function log$1() {
41166
+ console.log("portalOpenInstances ----------");
41167
+ console.log(portalOpenInstances.openInstances.length);
41168
+ portalOpenInstances.openInstances.forEach(function (p) {
41169
+ return console.log(p);
41170
+ });
41171
+ console.log("end portalOpenInstances ----------");
41172
+ }
41173
+
41174
+ /* istanbul ignore next */
41175
+ function resetState$1() {
41176
+ portalOpenInstances = new PortalOpenInstances();
41177
+ }
41178
+ /* eslint-enable no-console */
41179
+
41180
+ portalOpenInstances$1.default = portalOpenInstances;
41181
+
41182
+ var bodyTrap$1 = {};
41183
+
41184
+ Object.defineProperty(bodyTrap$1, "__esModule", {
41185
+ value: true
41186
+ });
41187
+ bodyTrap$1.resetState = resetState;
41188
+ bodyTrap$1.log = log;
41015
41189
 
41016
- var _portalOpenInstances = portalOpenInstances.exports;
41190
+ var _portalOpenInstances = portalOpenInstances$1;
41017
41191
 
41018
41192
  var _portalOpenInstances2 = _interopRequireDefault$1(_portalOpenInstances);
41019
41193
 
@@ -41025,6 +41199,34 @@ var before = void 0,
41025
41199
  after = void 0,
41026
41200
  instances = [];
41027
41201
 
41202
+ /* eslint-disable no-console */
41203
+ /* istanbul ignore next */
41204
+ function resetState() {
41205
+ var _arr = [before, after];
41206
+
41207
+ for (var _i = 0; _i < _arr.length; _i++) {
41208
+ var item = _arr[_i];
41209
+ if (!item) continue;
41210
+ item.parentNode && item.parentNode.removeChild(item);
41211
+ }
41212
+ before = after = null;
41213
+ instances = [];
41214
+ }
41215
+
41216
+ /* istanbul ignore next */
41217
+ function log() {
41218
+ console.log("bodyTrap ----------");
41219
+ console.log(instances.length);
41220
+ var _arr2 = [before, after];
41221
+ for (var _i2 = 0; _i2 < _arr2.length; _i2++) {
41222
+ var item = _arr2[_i2];
41223
+ var check = item || {};
41224
+ console.log(check.nodeName, check.className, check.id);
41225
+ }
41226
+ console.log("edn bodyTrap ----------");
41227
+ }
41228
+ /* eslint-enable no-console */
41229
+
41028
41230
  function focusContent() {
41029
41231
  if (instances.length === 0) {
41030
41232
  if (process.env.NODE_ENV !== "production") {
@@ -41037,7 +41239,7 @@ function focusContent() {
41037
41239
  }
41038
41240
 
41039
41241
  function bodyTrap(eventType, openInstances) {
41040
- if (!before || !after) {
41242
+ if (!before && !after) {
41041
41243
  before = document.createElement("div");
41042
41244
  before.setAttribute("data-react-modal-body-trap", "");
41043
41245
  before.style.position = "absolute";
@@ -41085,8 +41287,6 @@ var _createClass = function () { function defineProperties(target, props) { for
41085
41287
 
41086
41288
  var _react = React__default;
41087
41289
 
41088
- var _react2 = _interopRequireDefault(_react);
41089
-
41090
41290
  var _propTypes = propTypes.exports;
41091
41291
 
41092
41292
  var _propTypes2 = _interopRequireDefault(_propTypes);
@@ -41111,7 +41311,7 @@ var _safeHTMLElement = safeHTMLElement;
41111
41311
 
41112
41312
  var _safeHTMLElement2 = _interopRequireDefault(_safeHTMLElement);
41113
41313
 
41114
- var _portalOpenInstances = portalOpenInstances.exports;
41314
+ var _portalOpenInstances = portalOpenInstances$1;
41115
41315
 
41116
41316
  var _portalOpenInstances2 = _interopRequireDefault(_portalOpenInstances);
41117
41317
 
@@ -41133,8 +41333,17 @@ var CLASS_NAMES = {
41133
41333
  content: "ReactModal__Content"
41134
41334
  };
41135
41335
 
41136
- var TAB_KEY = 9;
41137
- var ESC_KEY = 27;
41336
+ /**
41337
+ * We need to support the deprecated `KeyboardEvent.keyCode` in addition to
41338
+ * `KeyboardEvent.code` for apps that still support IE11. Can be removed when
41339
+ * `react-modal` only supports React >18 (which dropped IE support).
41340
+ */
41341
+ var isTabKey = function isTabKey(event) {
41342
+ return event.code === "Tab" || event.keyCode === 9;
41343
+ };
41344
+ var isEscKey = function isEscKey(event) {
41345
+ return event.code === "Escape" || event.keyCode === 27;
41346
+ };
41138
41347
 
41139
41348
  var ariaHiddenInstances = 0;
41140
41349
 
@@ -41161,13 +41370,16 @@ var ModalPortal = function (_Component) {
41161
41370
  appElement = _this$props.appElement,
41162
41371
  ariaHideApp = _this$props.ariaHideApp,
41163
41372
  htmlOpenClassName = _this$props.htmlOpenClassName,
41164
- bodyOpenClassName = _this$props.bodyOpenClassName;
41373
+ bodyOpenClassName = _this$props.bodyOpenClassName,
41374
+ parentSelector = _this$props.parentSelector;
41165
41375
 
41166
- // Remove classes.
41167
41376
 
41168
- bodyOpenClassName && classList$1.remove(document.body, bodyOpenClassName);
41377
+ var parentDocument = parentSelector && parentSelector().ownerDocument || document;
41378
+
41379
+ // Remove classes.
41380
+ bodyOpenClassName && classList$1.remove(parentDocument.body, bodyOpenClassName);
41169
41381
 
41170
- htmlOpenClassName && classList$1.remove(document.getElementsByTagName("html")[0], htmlOpenClassName);
41382
+ htmlOpenClassName && classList$1.remove(parentDocument.getElementsByTagName("html")[0], htmlOpenClassName);
41171
41383
 
41172
41384
  // Reset aria-hidden attribute if all modals have been removed
41173
41385
  if (ariaHideApp && ariaHiddenInstances > 0) {
@@ -41180,7 +41392,7 @@ var ModalPortal = function (_Component) {
41180
41392
 
41181
41393
  if (_this.props.shouldFocusAfterRender) {
41182
41394
  if (_this.props.shouldReturnFocusAfterClose) {
41183
- focusManager$1.returnFocus();
41395
+ focusManager$1.returnFocus(_this.props.preventScroll);
41184
41396
  focusManager$1.teardownScopedFocus();
41185
41397
  } else {
41186
41398
  focusManager$1.popWithoutFocus();
@@ -41206,14 +41418,16 @@ var ModalPortal = function (_Component) {
41206
41418
  }
41207
41419
 
41208
41420
  _this.setState({ isOpen: true }, function () {
41209
- _this.setState({ afterOpen: true });
41210
-
41211
- if (_this.props.isOpen && _this.props.onAfterOpen) {
41212
- _this.props.onAfterOpen({
41213
- overlayEl: _this.overlay,
41214
- contentEl: _this.content
41215
- });
41216
- }
41421
+ _this.openAnimationFrame = requestAnimationFrame(function () {
41422
+ _this.setState({ afterOpen: true });
41423
+
41424
+ if (_this.props.isOpen && _this.props.onAfterOpen) {
41425
+ _this.props.onAfterOpen({
41426
+ overlayEl: _this.overlay,
41427
+ contentEl: _this.content
41428
+ });
41429
+ }
41430
+ });
41217
41431
  });
41218
41432
  }
41219
41433
  };
@@ -41227,7 +41441,7 @@ var ModalPortal = function (_Component) {
41227
41441
  };
41228
41442
 
41229
41443
  _this.focusContent = function () {
41230
- return _this.content && !_this.contentHasFocus() && _this.content.focus();
41444
+ return _this.content && !_this.contentHasFocus() && _this.content.focus({ preventScroll: true });
41231
41445
  };
41232
41446
 
41233
41447
  _this.closeWithTimeout = function () {
@@ -41247,11 +41461,11 @@ var ModalPortal = function (_Component) {
41247
41461
  };
41248
41462
 
41249
41463
  _this.handleKeyDown = function (event) {
41250
- if (event.keyCode === TAB_KEY) {
41464
+ if (isTabKey(event)) {
41251
41465
  (0, _scopeTab2.default)(_this.content, event);
41252
41466
  }
41253
41467
 
41254
- if (_this.props.shouldCloseOnEsc && event.keyCode === ESC_KEY) {
41468
+ if (_this.props.shouldCloseOnEsc && isEscKey(event)) {
41255
41469
  event.stopPropagation();
41256
41470
  _this.requestClose(event);
41257
41471
  }
@@ -41378,6 +41592,7 @@ var ModalPortal = function (_Component) {
41378
41592
  this.afterClose();
41379
41593
  }
41380
41594
  clearTimeout(this.closeTimer);
41595
+ cancelAnimationFrame(this.openAnimationFrame);
41381
41596
  }
41382
41597
  }, {
41383
41598
  key: "beforeOpen",
@@ -41386,13 +41601,16 @@ var ModalPortal = function (_Component) {
41386
41601
  appElement = _props.appElement,
41387
41602
  ariaHideApp = _props.ariaHideApp,
41388
41603
  htmlOpenClassName = _props.htmlOpenClassName,
41389
- bodyOpenClassName = _props.bodyOpenClassName;
41604
+ bodyOpenClassName = _props.bodyOpenClassName,
41605
+ parentSelector = _props.parentSelector;
41390
41606
 
41391
- // Add classes.
41392
41607
 
41393
- bodyOpenClassName && classList$1.add(document.body, bodyOpenClassName);
41608
+ var parentDocument = parentSelector && parentSelector().ownerDocument || document;
41394
41609
 
41395
- htmlOpenClassName && classList$1.add(document.getElementsByTagName("html")[0], htmlOpenClassName);
41610
+ // Add classes.
41611
+ bodyOpenClassName && classList$1.add(parentDocument.body, bodyOpenClassName);
41612
+
41613
+ htmlOpenClassName && classList$1.add(parentDocument.getElementsByTagName("html")[0], htmlOpenClassName);
41396
41614
 
41397
41615
  if (ariaHideApp) {
41398
41616
  ariaHiddenInstances += 1;
@@ -41411,40 +41629,42 @@ var ModalPortal = function (_Component) {
41411
41629
  id = _props2.id,
41412
41630
  className = _props2.className,
41413
41631
  overlayClassName = _props2.overlayClassName,
41414
- defaultStyles = _props2.defaultStyles;
41632
+ defaultStyles = _props2.defaultStyles,
41633
+ children = _props2.children;
41415
41634
 
41416
41635
  var contentStyles = className ? {} : defaultStyles.content;
41417
41636
  var overlayStyles = overlayClassName ? {} : defaultStyles.overlay;
41418
41637
 
41419
- return this.shouldBeClosed() ? null : _react2.default.createElement(
41420
- "div",
41421
- {
41422
- ref: this.setOverlayRef,
41423
- className: this.buildClassName("overlay", overlayClassName),
41424
- style: _extends({}, overlayStyles, this.props.style.overlay),
41425
- onClick: this.handleOverlayOnClick,
41426
- onMouseDown: this.handleOverlayOnMouseDown
41427
- },
41428
- _react2.default.createElement(
41429
- "div",
41430
- _extends({
41431
- id: id,
41432
- ref: this.setContentRef,
41433
- style: _extends({}, contentStyles, this.props.style.content),
41434
- className: this.buildClassName("content", className),
41435
- tabIndex: "-1",
41436
- onKeyDown: this.handleKeyDown,
41437
- onMouseDown: this.handleContentOnMouseDown,
41438
- onMouseUp: this.handleContentOnMouseUp,
41439
- onClick: this.handleContentOnClick,
41440
- role: this.props.role,
41441
- "aria-label": this.props.contentLabel
41442
- }, this.attributesFromObject("aria", this.props.aria || {}), this.attributesFromObject("data", this.props.data || {}), {
41443
- "data-testid": this.props.testId
41444
- }),
41445
- this.props.children
41446
- )
41447
- );
41638
+ if (this.shouldBeClosed()) {
41639
+ return null;
41640
+ }
41641
+
41642
+ var overlayProps = {
41643
+ ref: this.setOverlayRef,
41644
+ className: this.buildClassName("overlay", overlayClassName),
41645
+ style: _extends({}, overlayStyles, this.props.style.overlay),
41646
+ onClick: this.handleOverlayOnClick,
41647
+ onMouseDown: this.handleOverlayOnMouseDown
41648
+ };
41649
+
41650
+ var contentProps = _extends({
41651
+ id: id,
41652
+ ref: this.setContentRef,
41653
+ style: _extends({}, contentStyles, this.props.style.content),
41654
+ className: this.buildClassName("content", className),
41655
+ tabIndex: "-1",
41656
+ onKeyDown: this.handleKeyDown,
41657
+ onMouseDown: this.handleContentOnMouseDown,
41658
+ onMouseUp: this.handleContentOnMouseUp,
41659
+ onClick: this.handleContentOnClick,
41660
+ role: this.props.role,
41661
+ "aria-label": this.props.contentLabel
41662
+ }, this.attributesFromObject("aria", _extends({ modal: true }, this.props.aria)), this.attributesFromObject("data", this.props.data || {}), {
41663
+ "data-testid": this.props.testId
41664
+ });
41665
+
41666
+ var contentElement = this.props.contentElement(contentProps, children);
41667
+ return this.props.overlayElement(overlayProps, contentElement);
41448
41668
  }
41449
41669
  }]);
41450
41670
 
@@ -41470,10 +41690,11 @@ ModalPortal.propTypes = {
41470
41690
  }),
41471
41691
  className: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.object]),
41472
41692
  overlayClassName: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.object]),
41693
+ parentSelector: _propTypes2.default.func,
41473
41694
  bodyOpenClassName: _propTypes2.default.string,
41474
41695
  htmlOpenClassName: _propTypes2.default.string,
41475
41696
  ariaHideApp: _propTypes2.default.bool,
41476
- appElement: _propTypes2.default.instanceOf(_safeHTMLElement2.default),
41697
+ 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))]),
41477
41698
  onAfterOpen: _propTypes2.default.func,
41478
41699
  onAfterClose: _propTypes2.default.func,
41479
41700
  onRequestClose: _propTypes2.default.func,
@@ -41481,6 +41702,7 @@ ModalPortal.propTypes = {
41481
41702
  shouldFocusAfterRender: _propTypes2.default.bool,
41482
41703
  shouldCloseOnOverlayClick: _propTypes2.default.bool,
41483
41704
  shouldReturnFocusAfterClose: _propTypes2.default.bool,
41705
+ preventScroll: _propTypes2.default.bool,
41484
41706
  role: _propTypes2.default.string,
41485
41707
  contentLabel: _propTypes2.default.string,
41486
41708
  aria: _propTypes2.default.object,
@@ -41490,6 +41712,8 @@ ModalPortal.propTypes = {
41490
41712
  overlayRef: _propTypes2.default.func,
41491
41713
  contentRef: _propTypes2.default.func,
41492
41714
  id: _propTypes2.default.string,
41715
+ overlayElement: _propTypes2.default.func,
41716
+ contentElement: _propTypes2.default.func,
41493
41717
  testId: _propTypes2.default.string
41494
41718
  };
41495
41719
  exports.default = ModalPortal;
@@ -41708,7 +41932,11 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
41708
41932
  var portalClassName = Modal$2.portalClassName = "ReactModalPortal";
41709
41933
  var bodyOpenClassName = Modal$2.bodyOpenClassName = "ReactModal__Body--open";
41710
41934
 
41711
- var isReact16 = _reactDom2.default.createPortal !== undefined;
41935
+ var isReact16 = _safeHTMLElement.canUseDOM && _reactDom2.default.createPortal !== undefined;
41936
+
41937
+ var createHTMLElement = function createHTMLElement(name) {
41938
+ return document.createElement(name);
41939
+ };
41712
41940
 
41713
41941
  var getCreatePortal = function getCreatePortal() {
41714
41942
  return isReact16 ? _reactDom2.default.createPortal : _reactDom2.default.unstable_renderSubtreeIntoContainer;
@@ -41735,7 +41963,7 @@ var Modal$1 = function (_Component) {
41735
41963
  return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Modal.__proto__ || Object.getPrototypeOf(Modal)).call.apply(_ref, [this].concat(args))), _this), _this.removePortal = function () {
41736
41964
  !isReact16 && _reactDom2.default.unmountComponentAtNode(_this.node);
41737
41965
  var parent = getParentElement(_this.props.parentSelector);
41738
- if (parent) {
41966
+ if (parent && parent.contains(_this.node)) {
41739
41967
  parent.removeChild(_this.node);
41740
41968
  } else {
41741
41969
  // eslint-disable-next-line no-console
@@ -41756,7 +41984,7 @@ var Modal$1 = function (_Component) {
41756
41984
  if (!_safeHTMLElement.canUseDOM) return;
41757
41985
 
41758
41986
  if (!isReact16) {
41759
- this.node = document.createElement("div");
41987
+ this.node = createHTMLElement("div");
41760
41988
  }
41761
41989
  this.node.className = this.props.portalClassName;
41762
41990
 
@@ -41825,7 +42053,7 @@ var Modal$1 = function (_Component) {
41825
42053
  }
41826
42054
 
41827
42055
  if (!this.node && isReact16) {
41828
- this.node = document.createElement("div");
42056
+ this.node = createHTMLElement("div");
41829
42057
  }
41830
42058
 
41831
42059
  var createPortal = getCreatePortal();
@@ -41868,7 +42096,7 @@ Modal$1.propTypes = {
41868
42096
  afterOpen: _propTypes2.default.string.isRequired,
41869
42097
  beforeClose: _propTypes2.default.string.isRequired
41870
42098
  })]),
41871
- appElement: _propTypes2.default.instanceOf(_safeHTMLElement2.default),
42099
+ 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))]),
41872
42100
  onAfterOpen: _propTypes2.default.func,
41873
42101
  onRequestClose: _propTypes2.default.func,
41874
42102
  closeTimeoutMS: _propTypes2.default.number,
@@ -41876,6 +42104,7 @@ Modal$1.propTypes = {
41876
42104
  shouldFocusAfterRender: _propTypes2.default.bool,
41877
42105
  shouldCloseOnOverlayClick: _propTypes2.default.bool,
41878
42106
  shouldReturnFocusAfterClose: _propTypes2.default.bool,
42107
+ preventScroll: _propTypes2.default.bool,
41879
42108
  parentSelector: _propTypes2.default.func,
41880
42109
  aria: _propTypes2.default.object,
41881
42110
  data: _propTypes2.default.object,
@@ -41883,7 +42112,10 @@ Modal$1.propTypes = {
41883
42112
  contentLabel: _propTypes2.default.string,
41884
42113
  shouldCloseOnEsc: _propTypes2.default.bool,
41885
42114
  overlayRef: _propTypes2.default.func,
41886
- contentRef: _propTypes2.default.func
42115
+ contentRef: _propTypes2.default.func,
42116
+ id: _propTypes2.default.string,
42117
+ overlayElement: _propTypes2.default.func,
42118
+ contentElement: _propTypes2.default.func
41887
42119
  };
41888
42120
  Modal$1.defaultProps = {
41889
42121
  isOpen: false,
@@ -41896,8 +42128,23 @@ Modal$1.defaultProps = {
41896
42128
  shouldCloseOnEsc: true,
41897
42129
  shouldCloseOnOverlayClick: true,
41898
42130
  shouldReturnFocusAfterClose: true,
42131
+ preventScroll: false,
41899
42132
  parentSelector: function parentSelector() {
41900
42133
  return document.body;
42134
+ },
42135
+ overlayElement: function overlayElement(props, contentEl) {
42136
+ return _react2.default.createElement(
42137
+ "div",
42138
+ props,
42139
+ contentEl
42140
+ );
42141
+ },
42142
+ contentElement: function contentElement(props, children) {
42143
+ return _react2.default.createElement(
42144
+ "div",
42145
+ props,
42146
+ children
42147
+ );
41901
42148
  }
41902
42149
  };
41903
42150
  Modal$1.defaultStyles = {
@@ -41928,6 +42175,12 @@ Modal$1.defaultStyles = {
41928
42175
 
41929
42176
  (0, _reactLifecyclesCompat.polyfill)(Modal$1);
41930
42177
 
42178
+ if (process.env.NODE_ENV !== "production") {
42179
+ Modal$1.setCreateHTMLElement = function (fn) {
42180
+ return createHTMLElement = fn;
42181
+ };
42182
+ }
42183
+
41931
42184
  Modal$2.default = Modal$1;
41932
42185
 
41933
42186
  (function (module, exports) {
@@ -41950,36 +42203,25 @@ var Modal = /*@__PURE__*/getDefaultExportFromCjs(lib.exports);
41950
42203
 
41951
42204
  var LuiUpdatesSplashModal = function (props) {
41952
42205
  var _a;
41953
- var node = useRef(null);
41954
- // We have to do this as the CSS takes over a lot of the page
41955
- // https://medium.com/@pitipatdop/little-neat-trick-to-capture-click-outside-with-react-hook-ba77c37c7e82
41956
- var handleClickOutside = useCallback(function (e) {
41957
- console.log('clicking anywhere');
41958
- // current DOES have a contains!
41959
- if ((node === null || node === void 0 ? void 0 : node.current) && node.current.contains(e.target)) {
41960
- // inside click
41961
- return;
41962
- }
41963
- // outside click
41964
- props.onClose();
41965
- }, [props]);
41966
- useEffect(function () {
41967
- document.addEventListener('mousedown', handleClickOutside);
41968
- return function () {
41969
- document.removeEventListener('mousedown', handleClickOutside);
41970
- };
41971
- }, [handleClickOutside]);
42206
+ var _b = React__default.useState(props.enabled), showModal = _b[0], setshowModal = _b[1];
42207
+ var currentVersion = window.localStorage.getItem(props.id);
42208
+ var handleClose = function () {
42209
+ setshowModal(false);
42210
+ window.localStorage.setItem(props.id, props.releaseVersion);
42211
+ };
41972
42212
  // process may be undefined, e.g. webpack 5 does not include a polyfill for it. Assume if process is undefined then
41973
42213
  // this isn't running in a test.
41974
42214
  if (typeof process === 'undefined' || ((_a = process === null || process === void 0 ? void 0 : process.env) === null || _a === void 0 ? void 0 : _a.NODE_ENV) !== 'test') {
41975
42215
  Modal.setAppElement('#root');
41976
42216
  }
41977
- return (React__default.createElement(Modal, { key: props.id, isOpen: true, shouldCloseOnOverlayClick: true, onRequestClose: props.onClose, contentLabel: "Recent updates", className: "lui-scrim", style: { overlay: { backgroundColor: 'transparent' } } },
41978
- React__default.createElement("div", { ref: node, className: clsx$1('lui-large-feature-notification', props.wrapperClass) },
42217
+ return (React__default.createElement(Modal, { isOpen: props.enabled &&
42218
+ showModal &&
42219
+ props.releaseVersion.trim() !== currentVersion, shouldCloseOnEsc: true, onRequestClose: handleClose, shouldCloseOnOverlayClick: true, contentLabel: "Recent updates", className: "lui-splash-content", overlayClassName: "splash_overlay" },
42220
+ React__default.createElement("div", { className: clsx$1('lui-large-feature-notification', props.wrapperClass) },
41979
42221
  React__default.createElement("div", { className: "lui-feature-header" },
41980
42222
  React__default.createElement("h1", null, props.header),
41981
- React__default.createElement("button", { "aria-label": "Close dialog", onClick: props.onClose },
41982
- React__default.createElement("i", { className: "material-icons-round" }, "close"))),
42223
+ React__default.createElement("button", { "aria-label": "Close dialog", onClick: handleClose },
42224
+ React__default.createElement(LuiIcon, { alt: "cross_icon", name: "ic_clear", status: "interactive", size: "md" }))),
41983
42225
  React__default.createElement("div", { className: "lui-feature-img" },
41984
42226
  React__default.createElement("img", { className: "lui-hide-xs lui-hide-sm", alt: "What's new", src: props.bigImage }),
41985
42227
  React__default.createElement("img", { className: "lui-hide-md lui-hide-lg lui-hide-xl", alt: "What's new", src: props.smallImage })),