@nulogy/components 8.1.4 → 8.1.7

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/main.js CHANGED
@@ -23679,7 +23679,7 @@
23679
23679
  * http://api.jqueryui.com/category/ui-core/
23680
23680
  */
23681
23681
 
23682
- var tabbableNode = /input|select|textarea|button|object/;
23682
+ var tabbableNode = /input|select|textarea|button|object|iframe/;
23683
23683
 
23684
23684
  function hidesContents(element) {
23685
23685
  var zeroSize = element.offsetWidth <= 0 && element.offsetHeight <= 0;
@@ -23702,8 +23702,13 @@
23702
23702
 
23703
23703
  function visible(element) {
23704
23704
  var parentElement = element;
23705
+ var rootNode = element.getRootNode && element.getRootNode();
23705
23706
  while (parentElement) {
23706
23707
  if (parentElement === document.body) break;
23708
+
23709
+ // if we are not hidden yet, skip to checking outside the Web Component
23710
+ if (rootNode && parentElement === rootNode) parentElement = rootNode.host.parentNode;
23711
+
23707
23712
  if (hidesContents(parentElement)) return false;
23708
23713
  parentElement = parentElement.parentNode;
23709
23714
  }
@@ -23724,7 +23729,10 @@
23724
23729
  }
23725
23730
 
23726
23731
  function findTabbableDescendants(element) {
23727
- return [].slice.call(element.querySelectorAll("*"), 0).filter(tabbable);
23732
+ var descendants = [].slice.call(element.querySelectorAll("*"), 0).reduce(function (finished, el) {
23733
+ return finished.concat(!el.shadowRoot ? [el] : findTabbableDescendants(el.shadowRoot));
23734
+ }, []);
23735
+ return descendants.filter(tabbable);
23728
23736
  }
23729
23737
  module.exports = exports["default"];
23730
23738
  });
@@ -23764,13 +23772,14 @@
23764
23772
 
23765
23773
  /* istanbul ignore next */
23766
23774
  function log() {
23767
- if (process.env.NODE_ENV === "production") return;
23768
- console.log("focusManager ----------");
23769
- focusLaterElements.forEach(function (f) {
23770
- var check = f || {};
23771
- console.log(check.nodeName, check.className, check.id);
23772
- });
23773
- console.log("end focusManager ----------");
23775
+ if (process.env.NODE_ENV !== "production") {
23776
+ console.log("focusManager ----------");
23777
+ focusLaterElements.forEach(function (f) {
23778
+ var check = f || {};
23779
+ console.log(check.nodeName, check.className, check.id);
23780
+ });
23781
+ console.log("end focusManager ----------");
23782
+ }
23774
23783
  }
23775
23784
  /* eslint-enable no-console */
23776
23785
 
@@ -23873,6 +23882,12 @@
23873
23882
 
23874
23883
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23875
23884
 
23885
+ function getActiveElement() {
23886
+ var el = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document;
23887
+
23888
+ return el.activeElement.shadowRoot ? getActiveElement(el.activeElement.shadowRoot) : el.activeElement;
23889
+ }
23890
+
23876
23891
  function scopeTab(node, event) {
23877
23892
  var tabbable = (0, _tabbable2.default)(node);
23878
23893
 
@@ -23887,19 +23902,20 @@
23887
23902
  var shiftKey = event.shiftKey;
23888
23903
  var head = tabbable[0];
23889
23904
  var tail = tabbable[tabbable.length - 1];
23905
+ var activeElement = getActiveElement();
23890
23906
 
23891
23907
  // proceed with default browser behavior on tab.
23892
23908
  // Focus on last element on shift + tab.
23893
- if (node === document.activeElement) {
23909
+ if (node === activeElement) {
23894
23910
  if (!shiftKey) return;
23895
23911
  target = tail;
23896
23912
  }
23897
23913
 
23898
- if (tail === document.activeElement && !shiftKey) {
23914
+ if (tail === activeElement && !shiftKey) {
23899
23915
  target = head;
23900
23916
  }
23901
23917
 
23902
- if (head === document.activeElement && shiftKey) {
23918
+ if (head === activeElement && shiftKey) {
23903
23919
  target = tail;
23904
23920
  }
23905
23921
 
@@ -23927,7 +23943,7 @@
23927
23943
  // the focus
23928
23944
  if (!isSafariDesktop) return;
23929
23945
 
23930
- var x = tabbable.indexOf(document.activeElement);
23946
+ var x = tabbable.indexOf(activeElement);
23931
23947
 
23932
23948
  if (x > -1) {
23933
23949
  x += shiftKey ? -1 : 1;
@@ -24029,11 +24045,12 @@
24029
24045
 
24030
24046
  /* istanbul ignore next */
24031
24047
  function log() {
24032
- if (process.env.NODE_ENV === "production") return;
24033
- var check = globalElement || {};
24034
- console.log("ariaAppHider ----------");
24035
- console.log(check.nodeName, check.className, check.id);
24036
- console.log("end ariaAppHider ----------");
24048
+ if (process.env.NODE_ENV !== "production") {
24049
+ var check = globalElement || {};
24050
+ console.log("ariaAppHider ----------");
24051
+ console.log(check.nodeName, check.className, check.id);
24052
+ console.log("end ariaAppHider ----------");
24053
+ }
24037
24054
  }
24038
24055
  /* eslint-enable no-console */
24039
24056
 
@@ -24168,26 +24185,26 @@
24168
24185
 
24169
24186
  /* istanbul ignore next */
24170
24187
  function log() {
24171
- if (process.env.NODE_ENV === "production") return;
24172
-
24173
- var classes = document.getElementsByTagName("html")[0].className;
24174
- var buffer = "Show tracked classes:\n\n";
24188
+ if (process.env.NODE_ENV !== "production") {
24189
+ var classes = document.getElementsByTagName("html")[0].className;
24190
+ var buffer = "Show tracked classes:\n\n";
24175
24191
 
24176
- buffer += "<html /> (" + classes + "):\n";
24177
- for (var x in htmlClassList) {
24178
- buffer += " " + x + " " + htmlClassList[x] + "\n";
24179
- }
24192
+ buffer += "<html /> (" + classes + "):\n ";
24193
+ for (var x in htmlClassList) {
24194
+ buffer += " " + x + " " + htmlClassList[x] + "\n ";
24195
+ }
24180
24196
 
24181
- classes = document.body.className;
24197
+ classes = document.body.className;
24182
24198
 
24183
- buffer += "\n\ndoc.body (" + classes + "):\n";
24184
- for (var _x in docBodyClassList) {
24185
- buffer += " " + _x + " " + docBodyClassList[_x] + "\n";
24186
- }
24199
+ buffer += "\n\ndoc.body (" + classes + "):\n ";
24200
+ for (var _x in docBodyClassList) {
24201
+ buffer += " " + _x + " " + docBodyClassList[_x] + "\n ";
24202
+ }
24187
24203
 
24188
- buffer += "\n";
24204
+ buffer += "\n";
24189
24205
 
24190
- console.log(buffer);
24206
+ console.log(buffer);
24207
+ }
24191
24208
  }
24192
24209
  /* eslint-enable no-console */
24193
24210
 
@@ -25529,7 +25546,8 @@
25529
25546
  appElement = _ref4.appElement,
25530
25547
  ariaHideApp = _ref4.ariaHideApp,
25531
25548
  footerContent = _ref4.footerContent,
25532
- closeAriaLabel = _ref4.closeAriaLabel;
25549
+ closeAriaLabel = _ref4.closeAriaLabel,
25550
+ parentSelector = _ref4.parentSelector;
25533
25551
  var modalHasHeader = onRequestClose || title;
25534
25552
  var themeContext = React.useContext(styled.ThemeContext);
25535
25553
  return /*#__PURE__*/React__default['default'].createElement(StyledReactModal, {
@@ -25554,9 +25572,10 @@
25554
25572
  overlay: overlayStyle(themeContext)
25555
25573
  },
25556
25574
  appElement: appElement,
25557
- ariaHideApp: ariaHideApp
25575
+ ariaHideApp: ariaHideApp,
25576
+ parentSelector: parentSelector
25558
25577
  }, /*#__PURE__*/React__default['default'].createElement(PreventBodyElementScrolling, null, modalHasHeader && /*#__PURE__*/React__default['default'].createElement(ModalHeader, {
25559
- hasCloseButton: onRequestClose
25578
+ hasCloseButton: Boolean(onRequestClose)
25560
25579
  }, title ? /*#__PURE__*/React__default['default'].createElement(Heading2, {
25561
25580
  id: "modal-title",
25562
25581
  mb: "none"
@@ -25576,7 +25595,6 @@
25576
25595
  isOpen: true,
25577
25596
  title: undefined,
25578
25597
  ariaLabel: undefined,
25579
- children: undefined,
25580
25598
  onRequestClose: undefined,
25581
25599
  closeAriaLabel: undefined,
25582
25600
  onAfterOpen: undefined,
@@ -25590,7 +25608,8 @@
25590
25608
  id: undefined,
25591
25609
  appElement: undefined,
25592
25610
  ariaHideApp: true,
25593
- footerContent: undefined
25611
+ footerContent: undefined,
25612
+ parentSelector: undefined
25594
25613
  };
25595
25614
  Modal.setAppElement = ReactModal.setAppElement;
25596
25615
 
@@ -42421,41 +42440,6 @@
42421
42440
  var SHOW_DURATION = 2000; // in ms
42422
42441
 
42423
42442
  var ANIMATE_OUT_DURATION = 1000;
42424
- var TOAST_Y_MAX = "0px";
42425
- var TOAST_Y_MIN = "-32px";
42426
- var ACTIVE_Z_INDEX = 2;
42427
- var INACTIVE_Z_INDEX = ACTIVE_Z_INDEX - 1;
42428
- var SLIDE_IN_STYLES = {
42429
- transform: "translateY(" + TOAST_Y_MIN + ")",
42430
- transition: "transform 0.15s ease-out",
42431
- zIndex: ACTIVE_Z_INDEX
42432
- };
42433
- var SLIDE_OUT_STYLES = {
42434
- transform: "translateY(" + TOAST_Y_MAX + ")",
42435
- transition: "transform 0.9s ease-in",
42436
- zIndex: INACTIVE_Z_INDEX,
42437
- pointerEvents: "none"
42438
- };
42439
- var FADE_IN_STYLES = {
42440
- opacity: 1,
42441
- transition: "opacity 0.25s linear"
42442
- };
42443
- var FADE_OUT_STYLES = {
42444
- transition: "opacity 1s linear"
42445
- };
42446
- var AnimatedAlert = styled__default['default'](Alert).withConfig({
42447
- displayName: "Toast__AnimatedAlert",
42448
- componentId: "sc-1cheg2k-0"
42449
- })(function (_ref) {
42450
- var visible = _ref.visible,
42451
- theme = _ref.theme;
42452
- return Object.assign({
42453
- boxShadow: theme.shadows.medium,
42454
- minWidth: "200px",
42455
- maxWidth: "600px",
42456
- opacity: 0
42457
- }, visible ? FADE_IN_STYLES : FADE_OUT_STYLES);
42458
- });
42459
42443
  var Toast = function Toast(_a) {
42460
42444
  var triggered = _a.triggered,
42461
42445
  onHide = _a.onHide,
@@ -42532,8 +42516,9 @@
42532
42516
  hideToast(0);
42533
42517
  };
42534
42518
 
42535
- return /*#__PURE__*/React__default['default'].createElement(Box, Object.assign({
42536
- visible: visible,
42519
+ return /*#__PURE__*/React__default['default'].createElement(AnimatePresence, {
42520
+ initial: false
42521
+ }, visible && /*#__PURE__*/React__default['default'].createElement(AnimatedBox, {
42537
42522
  onMouseEnter: onMouseIn,
42538
42523
  onFocus: onMouseIn,
42539
42524
  onMouseLeave: onMouseOut,
@@ -42545,15 +42530,37 @@
42545
42530
  marginLeft: "auto",
42546
42531
  marginRight: "auto",
42547
42532
  width: "fit-content",
42548
- transform: "translateY(" + TOAST_Y_MIN + ")"
42549
- }, visible ? SLIDE_IN_STYLES : SLIDE_OUT_STYLES, {
42550
- zIndex: zIndex
42551
- }), /*#__PURE__*/React__default['default'].createElement(AnimatedAlert, Object.assign({
42552
- visible: visible,
42533
+ zIndex: zIndex,
42534
+ boxShadow: "medium",
42535
+ layout: true,
42536
+ initial: {
42537
+ opacity: 0,
42538
+ y: 50
42539
+ },
42540
+ animate: {
42541
+ opacity: 1,
42542
+ y: -30,
42543
+ transition: {
42544
+ type: "spring",
42545
+ bounce: 0.4,
42546
+ duration: 0.6
42547
+ }
42548
+ },
42549
+ exit: {
42550
+ y: 50,
42551
+ opacity: 0,
42552
+ transition: {
42553
+ ease: "easeOut",
42554
+ duration: 0.15
42555
+ }
42556
+ }
42557
+ }, /*#__PURE__*/React__default['default'].createElement(Alert, Object.assign({
42558
+ minWidth: "200px",
42559
+ maxWidth: "600px",
42553
42560
  isCloseable: isCloseable,
42554
42561
  onClose: handleCloseButtonClick,
42555
42562
  controlled: true
42556
- }, props), children));
42563
+ }, props), children)));
42557
42564
  };
42558
42565
  Toast.defaultProps = {
42559
42566
  triggered: false,
@@ -23653,7 +23653,7 @@ exports.default = findTabbableDescendants;
23653
23653
  * http://api.jqueryui.com/category/ui-core/
23654
23654
  */
23655
23655
 
23656
- var tabbableNode = /input|select|textarea|button|object/;
23656
+ var tabbableNode = /input|select|textarea|button|object|iframe/;
23657
23657
 
23658
23658
  function hidesContents(element) {
23659
23659
  var zeroSize = element.offsetWidth <= 0 && element.offsetHeight <= 0;
@@ -23676,8 +23676,13 @@ function hidesContents(element) {
23676
23676
 
23677
23677
  function visible(element) {
23678
23678
  var parentElement = element;
23679
+ var rootNode = element.getRootNode && element.getRootNode();
23679
23680
  while (parentElement) {
23680
23681
  if (parentElement === document.body) break;
23682
+
23683
+ // if we are not hidden yet, skip to checking outside the Web Component
23684
+ if (rootNode && parentElement === rootNode) parentElement = rootNode.host.parentNode;
23685
+
23681
23686
  if (hidesContents(parentElement)) return false;
23682
23687
  parentElement = parentElement.parentNode;
23683
23688
  }
@@ -23698,7 +23703,10 @@ function tabbable(element) {
23698
23703
  }
23699
23704
 
23700
23705
  function findTabbableDescendants(element) {
23701
- return [].slice.call(element.querySelectorAll("*"), 0).filter(tabbable);
23706
+ var descendants = [].slice.call(element.querySelectorAll("*"), 0).reduce(function (finished, el) {
23707
+ return finished.concat(!el.shadowRoot ? [el] : findTabbableDescendants(el.shadowRoot));
23708
+ }, []);
23709
+ return descendants.filter(tabbable);
23702
23710
  }
23703
23711
  module.exports = exports["default"];
23704
23712
  });
@@ -23738,13 +23746,14 @@ function resetState() {
23738
23746
 
23739
23747
  /* istanbul ignore next */
23740
23748
  function log() {
23741
- if (process.env.NODE_ENV === "production") return;
23742
- console.log("focusManager ----------");
23743
- focusLaterElements.forEach(function (f) {
23744
- var check = f || {};
23745
- console.log(check.nodeName, check.className, check.id);
23746
- });
23747
- console.log("end focusManager ----------");
23749
+ if (process.env.NODE_ENV !== "production") {
23750
+ console.log("focusManager ----------");
23751
+ focusLaterElements.forEach(function (f) {
23752
+ var check = f || {};
23753
+ console.log(check.nodeName, check.className, check.id);
23754
+ });
23755
+ console.log("end focusManager ----------");
23756
+ }
23748
23757
  }
23749
23758
  /* eslint-enable no-console */
23750
23759
 
@@ -23847,6 +23856,12 @@ var _tabbable2 = _interopRequireDefault(tabbable_1);
23847
23856
 
23848
23857
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23849
23858
 
23859
+ function getActiveElement() {
23860
+ var el = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document;
23861
+
23862
+ return el.activeElement.shadowRoot ? getActiveElement(el.activeElement.shadowRoot) : el.activeElement;
23863
+ }
23864
+
23850
23865
  function scopeTab(node, event) {
23851
23866
  var tabbable = (0, _tabbable2.default)(node);
23852
23867
 
@@ -23861,19 +23876,20 @@ function scopeTab(node, event) {
23861
23876
  var shiftKey = event.shiftKey;
23862
23877
  var head = tabbable[0];
23863
23878
  var tail = tabbable[tabbable.length - 1];
23879
+ var activeElement = getActiveElement();
23864
23880
 
23865
23881
  // proceed with default browser behavior on tab.
23866
23882
  // Focus on last element on shift + tab.
23867
- if (node === document.activeElement) {
23883
+ if (node === activeElement) {
23868
23884
  if (!shiftKey) return;
23869
23885
  target = tail;
23870
23886
  }
23871
23887
 
23872
- if (tail === document.activeElement && !shiftKey) {
23888
+ if (tail === activeElement && !shiftKey) {
23873
23889
  target = head;
23874
23890
  }
23875
23891
 
23876
- if (head === document.activeElement && shiftKey) {
23892
+ if (head === activeElement && shiftKey) {
23877
23893
  target = tail;
23878
23894
  }
23879
23895
 
@@ -23901,7 +23917,7 @@ function scopeTab(node, event) {
23901
23917
  // the focus
23902
23918
  if (!isSafariDesktop) return;
23903
23919
 
23904
- var x = tabbable.indexOf(document.activeElement);
23920
+ var x = tabbable.indexOf(activeElement);
23905
23921
 
23906
23922
  if (x > -1) {
23907
23923
  x += shiftKey ? -1 : 1;
@@ -24003,11 +24019,12 @@ function resetState() {
24003
24019
 
24004
24020
  /* istanbul ignore next */
24005
24021
  function log() {
24006
- if (process.env.NODE_ENV === "production") return;
24007
- var check = globalElement || {};
24008
- console.log("ariaAppHider ----------");
24009
- console.log(check.nodeName, check.className, check.id);
24010
- console.log("end ariaAppHider ----------");
24022
+ if (process.env.NODE_ENV !== "production") {
24023
+ var check = globalElement || {};
24024
+ console.log("ariaAppHider ----------");
24025
+ console.log(check.nodeName, check.className, check.id);
24026
+ console.log("end ariaAppHider ----------");
24027
+ }
24011
24028
  }
24012
24029
  /* eslint-enable no-console */
24013
24030
 
@@ -24142,26 +24159,26 @@ function resetState() {
24142
24159
 
24143
24160
  /* istanbul ignore next */
24144
24161
  function log() {
24145
- if (process.env.NODE_ENV === "production") return;
24146
-
24147
- var classes = document.getElementsByTagName("html")[0].className;
24148
- var buffer = "Show tracked classes:\n\n";
24162
+ if (process.env.NODE_ENV !== "production") {
24163
+ var classes = document.getElementsByTagName("html")[0].className;
24164
+ var buffer = "Show tracked classes:\n\n";
24149
24165
 
24150
- buffer += "<html /> (" + classes + "):\n";
24151
- for (var x in htmlClassList) {
24152
- buffer += " " + x + " " + htmlClassList[x] + "\n";
24153
- }
24166
+ buffer += "<html /> (" + classes + "):\n ";
24167
+ for (var x in htmlClassList) {
24168
+ buffer += " " + x + " " + htmlClassList[x] + "\n ";
24169
+ }
24154
24170
 
24155
- classes = document.body.className;
24171
+ classes = document.body.className;
24156
24172
 
24157
- buffer += "\n\ndoc.body (" + classes + "):\n";
24158
- for (var _x in docBodyClassList) {
24159
- buffer += " " + _x + " " + docBodyClassList[_x] + "\n";
24160
- }
24173
+ buffer += "\n\ndoc.body (" + classes + "):\n ";
24174
+ for (var _x in docBodyClassList) {
24175
+ buffer += " " + _x + " " + docBodyClassList[_x] + "\n ";
24176
+ }
24161
24177
 
24162
- buffer += "\n";
24178
+ buffer += "\n";
24163
24179
 
24164
- console.log(buffer);
24180
+ console.log(buffer);
24181
+ }
24165
24182
  }
24166
24183
  /* eslint-enable no-console */
24167
24184
 
@@ -25503,7 +25520,8 @@ var Modal = function Modal(_ref4) {
25503
25520
  appElement = _ref4.appElement,
25504
25521
  ariaHideApp = _ref4.ariaHideApp,
25505
25522
  footerContent = _ref4.footerContent,
25506
- closeAriaLabel = _ref4.closeAriaLabel;
25523
+ closeAriaLabel = _ref4.closeAriaLabel,
25524
+ parentSelector = _ref4.parentSelector;
25507
25525
  var modalHasHeader = onRequestClose || title;
25508
25526
  var themeContext = useContext(ThemeContext$1);
25509
25527
  return /*#__PURE__*/React__default.createElement(StyledReactModal, {
@@ -25528,9 +25546,10 @@ var Modal = function Modal(_ref4) {
25528
25546
  overlay: overlayStyle(themeContext)
25529
25547
  },
25530
25548
  appElement: appElement,
25531
- ariaHideApp: ariaHideApp
25549
+ ariaHideApp: ariaHideApp,
25550
+ parentSelector: parentSelector
25532
25551
  }, /*#__PURE__*/React__default.createElement(PreventBodyElementScrolling, null, modalHasHeader && /*#__PURE__*/React__default.createElement(ModalHeader, {
25533
- hasCloseButton: onRequestClose
25552
+ hasCloseButton: Boolean(onRequestClose)
25534
25553
  }, title ? /*#__PURE__*/React__default.createElement(Heading2, {
25535
25554
  id: "modal-title",
25536
25555
  mb: "none"
@@ -25550,7 +25569,6 @@ Modal.defaultProps = {
25550
25569
  isOpen: true,
25551
25570
  title: undefined,
25552
25571
  ariaLabel: undefined,
25553
- children: undefined,
25554
25572
  onRequestClose: undefined,
25555
25573
  closeAriaLabel: undefined,
25556
25574
  onAfterOpen: undefined,
@@ -25564,7 +25582,8 @@ Modal.defaultProps = {
25564
25582
  id: undefined,
25565
25583
  appElement: undefined,
25566
25584
  ariaHideApp: true,
25567
- footerContent: undefined
25585
+ footerContent: undefined,
25586
+ parentSelector: undefined
25568
25587
  };
25569
25588
  Modal.setAppElement = ReactModal.setAppElement;
25570
25589
 
@@ -42395,41 +42414,6 @@ TruncatedText.defaultProps = {
42395
42414
  var SHOW_DURATION = 2000; // in ms
42396
42415
 
42397
42416
  var ANIMATE_OUT_DURATION = 1000;
42398
- var TOAST_Y_MAX = "0px";
42399
- var TOAST_Y_MIN = "-32px";
42400
- var ACTIVE_Z_INDEX = 2;
42401
- var INACTIVE_Z_INDEX = ACTIVE_Z_INDEX - 1;
42402
- var SLIDE_IN_STYLES = {
42403
- transform: "translateY(" + TOAST_Y_MIN + ")",
42404
- transition: "transform 0.15s ease-out",
42405
- zIndex: ACTIVE_Z_INDEX
42406
- };
42407
- var SLIDE_OUT_STYLES = {
42408
- transform: "translateY(" + TOAST_Y_MAX + ")",
42409
- transition: "transform 0.9s ease-in",
42410
- zIndex: INACTIVE_Z_INDEX,
42411
- pointerEvents: "none"
42412
- };
42413
- var FADE_IN_STYLES = {
42414
- opacity: 1,
42415
- transition: "opacity 0.25s linear"
42416
- };
42417
- var FADE_OUT_STYLES = {
42418
- transition: "opacity 1s linear"
42419
- };
42420
- var AnimatedAlert = styled(Alert).withConfig({
42421
- displayName: "Toast__AnimatedAlert",
42422
- componentId: "sc-1cheg2k-0"
42423
- })(function (_ref) {
42424
- var visible = _ref.visible,
42425
- theme = _ref.theme;
42426
- return Object.assign({
42427
- boxShadow: theme.shadows.medium,
42428
- minWidth: "200px",
42429
- maxWidth: "600px",
42430
- opacity: 0
42431
- }, visible ? FADE_IN_STYLES : FADE_OUT_STYLES);
42432
- });
42433
42417
  var Toast = function Toast(_a) {
42434
42418
  var triggered = _a.triggered,
42435
42419
  onHide = _a.onHide,
@@ -42506,8 +42490,9 @@ var Toast = function Toast(_a) {
42506
42490
  hideToast(0);
42507
42491
  };
42508
42492
 
42509
- return /*#__PURE__*/React__default.createElement(Box, Object.assign({
42510
- visible: visible,
42493
+ return /*#__PURE__*/React__default.createElement(AnimatePresence, {
42494
+ initial: false
42495
+ }, visible && /*#__PURE__*/React__default.createElement(AnimatedBox, {
42511
42496
  onMouseEnter: onMouseIn,
42512
42497
  onFocus: onMouseIn,
42513
42498
  onMouseLeave: onMouseOut,
@@ -42519,15 +42504,37 @@ var Toast = function Toast(_a) {
42519
42504
  marginLeft: "auto",
42520
42505
  marginRight: "auto",
42521
42506
  width: "fit-content",
42522
- transform: "translateY(" + TOAST_Y_MIN + ")"
42523
- }, visible ? SLIDE_IN_STYLES : SLIDE_OUT_STYLES, {
42524
- zIndex: zIndex
42525
- }), /*#__PURE__*/React__default.createElement(AnimatedAlert, Object.assign({
42526
- visible: visible,
42507
+ zIndex: zIndex,
42508
+ boxShadow: "medium",
42509
+ layout: true,
42510
+ initial: {
42511
+ opacity: 0,
42512
+ y: 50
42513
+ },
42514
+ animate: {
42515
+ opacity: 1,
42516
+ y: -30,
42517
+ transition: {
42518
+ type: "spring",
42519
+ bounce: 0.4,
42520
+ duration: 0.6
42521
+ }
42522
+ },
42523
+ exit: {
42524
+ y: 50,
42525
+ opacity: 0,
42526
+ transition: {
42527
+ ease: "easeOut",
42528
+ duration: 0.15
42529
+ }
42530
+ }
42531
+ }, /*#__PURE__*/React__default.createElement(Alert, Object.assign({
42532
+ minWidth: "200px",
42533
+ maxWidth: "600px",
42527
42534
  isCloseable: isCloseable,
42528
42535
  onClose: handleCloseButtonClick,
42529
42536
  controlled: true
42530
- }, props), children));
42537
+ }, props), children)));
42531
42538
  };
42532
42539
  Toast.defaultProps = {
42533
42540
  triggered: false,
@@ -1,3 +1,25 @@
1
- import ReactModal from "react-modal";
2
- declare const Modal: ReactModal;
1
+ import React from "react";
2
+ declare type ModalProps = {
3
+ isOpen?: boolean;
4
+ title?: string;
5
+ ariaLabel?: string;
6
+ onRequestClose?: (...args: any[]) => any;
7
+ closeAriaLabel?: string;
8
+ onAfterOpen?: (...args: any[]) => any;
9
+ shouldFocusAfterRender?: boolean;
10
+ shouldReturnFocusAfterClose?: boolean;
11
+ ariaDescribedBy?: string;
12
+ maxWidth?: string;
13
+ portalClassName?: string;
14
+ overlayClassName?: string;
15
+ className?: string;
16
+ id?: string;
17
+ appElement?: JSX.Element;
18
+ ariaHideApp?: boolean;
19
+ footerContent?: React.ReactNode;
20
+ parentSelector?: (...args: any) => HTMLElement;
21
+ };
22
+ declare const Modal: React.FC<ModalProps> & {
23
+ setAppElement: (element: string | HTMLElement) => void;
24
+ };
3
25
  export default Modal;
@@ -52,6 +52,12 @@ export declare const WithSelectAndScrollingContent: {
52
52
  name: string;
53
53
  };
54
54
  };
55
+ export declare const WithParentSelector: {
56
+ (): JSX.Element;
57
+ story: {
58
+ name: string;
59
+ };
60
+ };
55
61
  export declare const ExampleControlledModal: {
56
62
  (): JSX.Element;
57
63
  story: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nulogy/components",
3
- "version": "8.1.4",
3
+ "version": "8.1.7",
4
4
  "description": "Component library for the Nulogy Design System - http://nulogy.design",
5
5
  "private": false,
6
6
  "publishConfig": {
@@ -154,9 +154,9 @@
154
154
  "react-fast-compare": "^3.2.0",
155
155
  "react-i18next": "^11.14.2",
156
156
  "react-input-autosize": "^2.2.2",
157
- "react-modal": "^3.10.1",
157
+ "react-modal": "^3.14.4",
158
158
  "react-popper": "1.3.7",
159
- "react-popper-latest": "npm:react-popper@2.2.4",
159
+ "react-popper-2": "npm:react-popper@2.2.4",
160
160
  "react-resize-detector": "^7.1.2",
161
161
  "react-windowed-select": "2.0.2",
162
162
  "smoothscroll-polyfill": "^0.4.4",