@splunk/react-ui 4.28.0 → 4.28.2

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/CHANGELOG.md CHANGED
@@ -1,6 +1,22 @@
1
1
  Change Log
2
2
  ============
3
3
 
4
+ 4.28.2 - March 22, 2024
5
+ ----------
6
+ Bug Fixes:
7
+ * `Table.Row` no longer ignores provided `style` properties (SUI-6156).
8
+
9
+ Typescript:
10
+ * `WaitSpinner`'s `screenReaderText` type includes `null` now (SUI-6081).
11
+
12
+ 4.28.1 - March 21, 2024
13
+ ----------
14
+ Bug Fixes:
15
+ * Fixed `CollapsiblePanel` not calling its `onRequestOpen` and `onRequestClose` callbacks (SUI-6146).
16
+ * Fixed documentation issues and discrepancies between the `onChange` callbacks of `CollapsiblePanel` and `SingleOpenPanelGroup` (SUI-6145).
17
+ * `CollapsiblePanel` and `SingleOpenPanelGroup` will both always provide the `panelId` to their `onChange` callback.
18
+ * `CollapsiblePanel` and `SingleOpenPanelGroup` will both provide an `action="open"|"closed"` value to the `onChange` callback.
19
+
4
20
  4.28.0 - March 20, 2024
5
21
  ----------
6
22
  New Features:
@@ -97,8 +97,8 @@
97
97
  const C = require("@splunk/react-ui/ButtonSimple");
98
98
  var x = e.n(C);
99
99
  // CONCATENATED MODULE: external "@splunk/react-ui/Clickable"
100
- const S = require("@splunk/react-ui/Clickable");
101
- var O = e.n(S);
100
+ const O = require("@splunk/react-ui/Clickable");
101
+ var S = e.n(O);
102
102
  // CONCATENATED MODULE: external "@splunk/themes"
103
103
  const I = require("@splunk/themes");
104
104
  // CONCATENATED MODULE: external "@splunk/react-icons/ChevronRight"
@@ -196,7 +196,7 @@
196
196
  displayName: "CollapsiblePanelStyles__StyledToggleButton",
197
197
  componentId: "sc-1phikbp-4"
198
198
  })([ "flex:0 auto;padding:0;", "" ], N);
199
- var M = h()(O()).withConfig({
199
+ var M = h()(S()).withConfig({
200
200
  displayName: "CollapsiblePanelStyles__StyledTitleClickable",
201
201
  componentId: "sc-1phikbp-5"
202
202
  })([ "width:100%;flex-shrink:0;border-bottom:0;cursor:pointer;position:relative;display:flex;transition:background-color 0.2s,border 0.2s,box-shadow 0.2s;padding:", ";color:", ";", " ", " &[disabled]{cursor:default;color:", ";}&:focus:not([disabled]),&:active:not([disabled]){color:", ";box-shadow:", ";}&:hover:not([disabled]){color:", ";background-color:", ";}" ], (0,
@@ -415,16 +415,13 @@
415
415
  return t;
416
416
  };
417
417
  var x = (0, n.useCallback)((function(e, t) {
418
- var n = t.panelId, r = t.reason;
419
- var o = C();
420
- var a = o === n ? null : n;
418
+ var n = t.panelId;
419
+ var r = C();
420
+ var o = r === n ? null : n;
421
421
  if (!d) {
422
- k(a);
422
+ k(o);
423
423
  }
424
- p === null || p === void 0 ? void 0 : p(e, {
425
- openPanelId: a,
426
- reason: r
427
- });
424
+ p === null || p === void 0 ? void 0 : p(e, t);
428
425
  }), [ u, d, g, C, p ]);
429
426
  (0, n.useEffect)((function() {
430
427
  if (false) {}
@@ -438,9 +435,9 @@
438
435
  (0, n.useEffect)((function() {
439
436
  if (false) {}
440
437
  }), [ b, o ]);
441
- var S = n.Children.toArray(t).filter(n.isValidElement);
438
+ var O = n.Children.toArray(t).filter(n.isValidElement);
442
439
  // remove false, null, 0, etc
443
- var O = (0, n.useMemo)((function() {
440
+ var S = (0, n.useMemo)((function() {
444
441
  return {
445
442
  onChange: x,
446
443
  openPanelId: d ? u : g,
@@ -453,8 +450,8 @@
453
450
  "data-test-open-panel-id": u,
454
451
  elementRef: i
455
452
  }, c().apply(void 0, [ f ].concat(Q(Object.keys(ie))))), r().createElement(V.Provider, {
456
- value: O
457
- }, S));
453
+ value: S
454
+ }, O));
458
455
  }
459
456
  le.propTypes = ie;
460
457
  /* harmony default export */ const se = le;
@@ -502,7 +499,7 @@
502
499
  var n = arguments[t] != null ? arguments[t] : {};
503
500
  if (t % 2) {
504
501
  ue(Object(n), true).forEach((function(t) {
505
- Se(e, t, n[t]);
502
+ Oe(e, t, n[t]);
506
503
  }));
507
504
  } else if (Object.getOwnPropertyDescriptors) {
508
505
  Object.defineProperties(e, Object.getOwnPropertyDescriptors(n));
@@ -595,7 +592,7 @@
595
592
  };
596
593
  return xe(e);
597
594
  }
598
- function Se(e, t, n) {
595
+ function Oe(e, t, n) {
599
596
  if (t in e) {
600
597
  Object.defineProperty(e, t, {
601
598
  value: n,
@@ -608,7 +605,7 @@
608
605
  }
609
606
  return e;
610
607
  }
611
- var Oe = {
608
+ var Se = {
612
609
  innerBodyStyles: u().object,
613
610
  children: u().node,
614
611
  defaultOpen: u().bool,
@@ -642,60 +639,54 @@
642
639
  var r;
643
640
  de(this, n);
644
641
  r = t.call(this, e);
645
- Se(ke(r), "controlledExternally", void 0);
646
- Se(ke(r), "containerId", void 0);
647
- Se(ke(r), "toggleId", void 0);
648
- Se(ke(r), "handleRequestClose", (function(e) {
642
+ Oe(ke(r), "controlledExternally", void 0);
643
+ Oe(ke(r), "containerId", void 0);
644
+ Oe(ke(r), "toggleId", void 0);
645
+ Oe(ke(r), "handleRequestClose", (function(e) {
649
646
  var t = r.props, n = t.panelId, o = t.onRequestClose;
650
647
  o === null || o === void 0 ? void 0 : o({
651
648
  event: e,
652
649
  panelId: n,
653
650
  reason: "toggleClick"
654
651
  });
655
- r.setState(fe({
656
- animating: true
657
- }, !r.isControlled() ? {
658
- open: false
659
- } : {}));
660
652
  }));
661
- Se(ke(r), "handleRequestOpen", (function(e) {
653
+ Oe(ke(r), "handleRequestOpen", (function(e) {
662
654
  var t = r.props, n = t.panelId, o = t.onRequestOpen;
663
655
  o === null || o === void 0 ? void 0 : o({
664
656
  event: e,
665
657
  panelId: n,
666
658
  reason: "toggleClick"
667
659
  });
668
- r.setState(fe({
669
- animating: true
670
- }, !r.isControlled() ? {
671
- open: true
672
- } : {}));
673
660
  }));
674
- Se(ke(r), "handleChange", (function(e) {
675
- var t = r.props, n = t.panelId, o = t.open, a = t.onChange;
676
- var i = r.isControlled() ? o : !r.state.open;
677
- a === null || a === void 0 ? void 0 : a(e, {
678
- panelId: n,
679
- reason: "toggleClick"
680
- });
661
+ Oe(ke(r), "handleChange", (function(e) {
662
+ var t, n;
663
+ var o = r.props, a = o.panelId, i = o.onChange;
664
+ var l = r.isOpen();
681
665
  if (!r.isControlled()) {
682
666
  r.setState({
683
667
  animating: true,
684
- open: i
685
- });
686
- }
687
- if (r.context.onChange) {
688
- r.context.onChange(e, {
689
- panelId: n,
690
- reason: "toggleClick"
668
+ open: !l
691
669
  });
692
670
  }
671
+ var s = l ? "close" : "open";
672
+ i === null || i === void 0 ? void 0 : i(e, {
673
+ panelId: a,
674
+ reason: "toggleClick",
675
+ action: s
676
+ });
677
+ (t = (n = r.context).onChange) === null || t === void 0 ? void 0 : t.call(n, e, {
678
+ panelId: a,
679
+ reason: "toggleClick",
680
+ action: s
681
+ });
693
682
  // Maintains backwards compatibility until the `handleRequestClose` and `handleRequestOpen` handlers are removed in SUI-5
694
- var l = r.props.open ? r.handleRequestClose : r.handleRequestOpen;
695
- // eslint-disable-next-line @typescript-eslint/no-unused-expressions
696
- l;
683
+ if (l) {
684
+ r.handleRequestClose(e);
685
+ } else {
686
+ r.handleRequestOpen(e);
687
+ }
697
688
  }));
698
- Se(ke(r), "handleAnimationEnd", (function() {
689
+ Oe(ke(r), "handleAnimationEnd", (function() {
699
690
  r.setState({
700
691
  animating: false
701
692
  });
@@ -730,6 +721,11 @@
730
721
  if (false) {}
731
722
  if (false) {}
732
723
  }
724
+ }, {
725
+ key: "isOpen",
726
+ value: function e() {
727
+ return this.isControlled() ? this.props.open : this.state.open;
728
+ }
733
729
  // Using all three handlers: `handleRequestClose` and `handleRequestOpen` and `handleChange` to test interoperability and maintain backwards compatibility until the open/close handlers are removed in SUI-5
734
730
  }, {
735
731
  key: "isControlled",
@@ -741,23 +737,13 @@
741
737
  value: function e() {
742
738
  var t = this.props, o = t.innerBodyStyles, a = t.children, i = t.description, s = t.disabled, p = t.elementRef, u = t.headingLevel, f = t.overflow, b = t.renderChildrenWhenCollapsed, v = t.title, m = t.titleWithActions, y = t.inset;
743
739
  var h = this.state.animating;
744
- var g;
745
- if (this.context.openPanelId !== undefined) {
746
- // SingleOpenPanelGroup controlled & uncontrolled
747
- /**
748
- * SingleOpenPanelGroup already takes into account if it is controlled or not in determining openPanelId
749
- * so this.context.openPanelId is used for both the controlled and uncontrolled case.
750
- */
751
- var k = this.context.openPanelId === this.props.panelId;
752
- g = k;
753
- } else if (this.isControlled()) {
754
- // CollapsiblePanel controlled
755
- g = this.props.open;
756
- } else {
757
- // CollapsiblePanel uncontrolled
758
- g = this.state.open;
759
- }
760
- var C = {
740
+ var g = this.context.openPanelId !== undefined ?
741
+ /**
742
+ * SingleOpenPanelGroup already takes into account if it is controlled or not in determining openPanelId
743
+ * so this.context.openPanelId is used for both the controlled and uncontrolled case.
744
+ */
745
+ this.context.openPanelId === this.props.panelId : this.isOpen();
746
+ var k = {
761
747
  disabled: s,
762
748
  onClick: this.handleChange,
763
749
  id: this.toggleId,
@@ -772,7 +758,7 @@
772
758
  elementRef: p
773
759
  }, c()(this.props, l()(n.propTypes))), m ? r().createElement(B, {
774
760
  $disabled: s
775
- }, r().createElement($, pe({}, C, {
761
+ }, r().createElement($, pe({}, k, {
776
762
  appearance: "pill"
777
763
  }), r().createElement(U, {
778
764
  open: !!g
@@ -786,7 +772,7 @@
786
772
  "data-test": "heading",
787
773
  role: u ? "heading" : undefined,
788
774
  "aria-level": u
789
- }, r().createElement(M, C, r().createElement(W, null, r().createElement(U, {
775
+ }, r().createElement(M, k, r().createElement(W, null, r().createElement(U, {
790
776
  open: !!g
791
777
  })), r().createElement(H, null, r().createElement("span", {
792
778
  "data-test": "title"
@@ -812,9 +798,9 @@
812
798
  } ]);
813
799
  return n;
814
800
  }(n.Component);
815
- Se(Pe, "propTypes", Oe);
816
- Se(Pe, "defaultProps", Ie);
817
- Se(Pe, "contextType", V);
801
+ Oe(Pe, "propTypes", Se);
802
+ Oe(Pe, "defaultProps", Ie);
803
+ Oe(Pe, "contextType", V);
818
804
  /* harmony default export */ const we = Pe;
819
805
  // CONCATENATED MODULE: ./src/CollapsiblePanel/index.ts
820
806
  module.exports = t;
package/Modal.js CHANGED
@@ -692,6 +692,7 @@
692
692
  }
693
693
  var qe = {
694
694
  children: i().node,
695
+ closeOnClickAway: i().bool,
695
696
  divider: i().oneOf([ "header", "footer", "both", "none" ]),
696
697
  elementRef: i().oneOfType([ i().func, i().object ]),
697
698
  initialFocus: i().oneOfType([ i().object, i().oneOf([ "first", "container" ]) ]),
@@ -700,6 +701,8 @@
700
701
  returnFocus: i().oneOfType([ i().func, i().object ])
701
702
  };
702
703
  var Fe = {
704
+ // TODO: Set to `false` in next major version
705
+ closeOnClickAway: true,
703
706
  divider: "both",
704
707
  initialFocus: "first",
705
708
  open: false
@@ -860,13 +863,16 @@
860
863
  }, {
861
864
  key: "render",
862
865
  value: function e() {
866
+ var t = this.props.closeOnClickAway;
867
+ var r = t ? "interactive" : "visible";
863
868
 
864
869
  return n().createElement(b(), {
865
- open: this.props.open,
866
870
  getDefaultMotionStyle: this.getDefaultMotionStyle,
867
- renderModal: this.renderModal,
868
871
  getMotionStyle: this.getMotionStyle,
869
- onRequestClose: this.handleRequestClose
872
+ onRequestClose: this.handleRequestClose,
873
+ open: this.props.open,
874
+ renderModal: this.renderModal,
875
+ scrim: r
870
876
  });
871
877
  }
872
878
  } ]);
package/ModalLayer.js CHANGED
@@ -9,26 +9,26 @@
9
9
  /******/ (() => {
10
10
  /******/ // getDefaultExport function for compatibility with non-harmony modules
11
11
  /******/ e.n = t => {
12
- /******/ var r = t && t.__esModule ?
12
+ /******/ var n = t && t.__esModule ?
13
13
  /******/ () => t["default"]
14
14
  /******/ : () => t
15
15
  /******/;
16
- e.d(r, {
17
- a: r
16
+ e.d(n, {
17
+ a: n
18
18
  });
19
- /******/ return r;
19
+ /******/ return n;
20
20
  /******/ };
21
21
  /******/ })();
22
22
  /******/
23
23
  /******/ /* webpack/runtime/define property getters */
24
24
  /******/ (() => {
25
25
  /******/ // define getter functions for harmony exports
26
- /******/ e.d = (t, r) => {
27
- /******/ for (var n in r) {
28
- /******/ if (e.o(r, n) && !e.o(t, n)) {
29
- /******/ Object.defineProperty(t, n, {
26
+ /******/ e.d = (t, n) => {
27
+ /******/ for (var r in n) {
28
+ /******/ if (e.o(n, r) && !e.o(t, r)) {
29
+ /******/ Object.defineProperty(t, r, {
30
30
  enumerable: true,
31
- get: r[n]
31
+ get: n[r]
32
32
  });
33
33
  /******/ }
34
34
  /******/ }
@@ -64,66 +64,66 @@
64
64
  default: () => /* reexport */ E
65
65
  });
66
66
  // CONCATENATED MODULE: external "react"
67
- const r = require("react");
68
- var n = e.n(r);
67
+ const n = require("react");
68
+ var r = e.n(n);
69
69
  // CONCATENATED MODULE: external "prop-types"
70
70
  const o = require("prop-types");
71
71
  var i = e.n(o);
72
72
  // CONCATENATED MODULE: external "@splunk/react-ui/Animation"
73
73
  const a = require("@splunk/react-ui/Animation");
74
74
  // CONCATENATED MODULE: external "@splunk/react-ui/Layer"
75
- const l = require("@splunk/react-ui/Layer");
76
- var u = e.n(l);
75
+ const c = require("@splunk/react-ui/Layer");
76
+ var l = e.n(c);
77
77
  // CONCATENATED MODULE: external "styled-components"
78
- const c = require("styled-components");
79
- var s = e.n(c);
78
+ const u = require("styled-components");
79
+ var s = e.n(u);
80
80
  // CONCATENATED MODULE: external "react-spring"
81
81
  const f = require("react-spring");
82
82
  // CONCATENATED MODULE: external "@splunk/themes"
83
83
  const p = require("@splunk/themes");
84
84
  // CONCATENATED MODULE: ./src/ModalLayer/ModalLayerStyles.ts
85
- var y = (0, c.css)([ "", ";position:fixed;top:0;right:0;bottom:0;left:0;" ], p.mixins.reset("block"));
85
+ var y = (0, u.css)([ "", ";position:fixed;top:0;right:0;bottom:0;left:0;" ], p.mixins.reset("block"));
86
86
  var d = s()(f.animated.div).withConfig({
87
87
  displayName: "ModalLayerStyles__StyledClickAwayOverlay",
88
88
  componentId: "sc-1sa3n1j-0"
89
89
  })([ "", ";background-color:", ";z-index:", ";" ], y, p.variables.backgroundColorScrim, p.variables.zindexModalBackdrop);
90
90
  // CONCATENATED MODULE: ./src/ModalLayer/ModalLayer.tsx
91
- function b(e) {
91
+ function v(e) {
92
92
  "@babel/helpers - typeof";
93
93
  if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
94
- b = function e(t) {
94
+ v = function e(t) {
95
95
  return typeof t;
96
96
  };
97
97
  } else {
98
- b = function e(t) {
98
+ v = function e(t) {
99
99
  return t && typeof Symbol === "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
100
100
  };
101
101
  }
102
- return b(e);
102
+ return v(e);
103
103
  }
104
- function v(e, t) {
105
- var r = Object.keys(e);
104
+ function b(e, t) {
105
+ var n = Object.keys(e);
106
106
  if (Object.getOwnPropertySymbols) {
107
- var n = Object.getOwnPropertySymbols(e);
108
- if (t) n = n.filter((function(t) {
107
+ var r = Object.getOwnPropertySymbols(e);
108
+ if (t) r = r.filter((function(t) {
109
109
  return Object.getOwnPropertyDescriptor(e, t).enumerable;
110
110
  }));
111
- r.push.apply(r, n);
111
+ n.push.apply(n, r);
112
112
  }
113
- return r;
113
+ return n;
114
114
  }
115
115
  function m(e) {
116
116
  for (var t = 1; t < arguments.length; t++) {
117
- var r = arguments[t] != null ? arguments[t] : {};
117
+ var n = arguments[t] != null ? arguments[t] : {};
118
118
  if (t % 2) {
119
- v(Object(r), true).forEach((function(t) {
120
- _(e, t, r[t]);
119
+ b(Object(n), true).forEach((function(t) {
120
+ R(e, t, n[t]);
121
121
  }));
122
122
  } else if (Object.getOwnPropertyDescriptors) {
123
- Object.defineProperties(e, Object.getOwnPropertyDescriptors(r));
123
+ Object.defineProperties(e, Object.getOwnPropertyDescriptors(n));
124
124
  } else {
125
- v(Object(r)).forEach((function(t) {
126
- Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(r, t));
125
+ b(Object(n)).forEach((function(t) {
126
+ Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
127
127
  }));
128
128
  }
129
129
  }
@@ -135,17 +135,17 @@
135
135
  }
136
136
  }
137
137
  function h(e, t) {
138
- for (var r = 0; r < t.length; r++) {
139
- var n = t[r];
140
- n.enumerable = n.enumerable || false;
141
- n.configurable = true;
142
- if ("value" in n) n.writable = true;
143
- Object.defineProperty(e, n.key, n);
138
+ for (var n = 0; n < t.length; n++) {
139
+ var r = t[n];
140
+ r.enumerable = r.enumerable || false;
141
+ r.configurable = true;
142
+ if ("value" in r) r.writable = true;
143
+ Object.defineProperty(e, r.key, r);
144
144
  }
145
145
  }
146
- function g(e, t, r) {
146
+ function g(e, t, n) {
147
147
  if (t) h(e.prototype, t);
148
- if (r) h(e, r);
148
+ if (n) h(e, n);
149
149
  return e;
150
150
  }
151
151
  function w(e, t) {
@@ -162,27 +162,27 @@
162
162
  if (t) j(e, t);
163
163
  }
164
164
  function j(e, t) {
165
- j = Object.setPrototypeOf || function e(t, r) {
166
- t.__proto__ = r;
165
+ j = Object.setPrototypeOf || function e(t, n) {
166
+ t.__proto__ = n;
167
167
  return t;
168
168
  };
169
169
  return j(e, t);
170
170
  }
171
171
  function S(e) {
172
172
  var t = A();
173
- return function r() {
174
- var n = C(e), o;
173
+ return function n() {
174
+ var r = _(e), o;
175
175
  if (t) {
176
- var i = C(this).constructor;
177
- o = Reflect.construct(n, arguments, i);
176
+ var i = _(this).constructor;
177
+ o = Reflect.construct(r, arguments, i);
178
178
  } else {
179
- o = n.apply(this, arguments);
179
+ o = r.apply(this, arguments);
180
180
  }
181
181
  return P(this, o);
182
182
  };
183
183
  }
184
184
  function P(e, t) {
185
- if (t && (b(t) === "object" || typeof t === "function")) {
185
+ if (t && (v(t) === "object" || typeof t === "function")) {
186
186
  return t;
187
187
  }
188
188
  return k(e);
@@ -204,82 +204,82 @@
204
204
  return false;
205
205
  }
206
206
  }
207
- function C(e) {
208
- C = Object.setPrototypeOf ? Object.getPrototypeOf : function e(t) {
207
+ function _(e) {
208
+ _ = Object.setPrototypeOf ? Object.getPrototypeOf : function e(t) {
209
209
  return t.__proto__ || Object.getPrototypeOf(t);
210
210
  };
211
- return C(e);
211
+ return _(e);
212
212
  }
213
- function _(e, t, r) {
213
+ function R(e, t, n) {
214
214
  if (t in e) {
215
215
  Object.defineProperty(e, t, {
216
- value: r,
216
+ value: n,
217
217
  enumerable: true,
218
218
  configurable: true,
219
219
  writable: true
220
220
  });
221
221
  } else {
222
- e[t] = r;
222
+ e[t] = n;
223
223
  }
224
224
  return e;
225
225
  }
226
- var R = {
226
+ var q = {
227
227
  childrenInAnimation: i().bool,
228
228
  getDefaultMotionStyle: i().func,
229
229
  getMotionStyle: i().func,
230
230
  onRequestClose: i().func,
231
231
  open: i().bool,
232
232
  renderModal: i().func.isRequired,
233
- useLayerForClickAway: i().bool
233
+ scrim: i().oneOf([ "visible", "hidden", "interactive" ])
234
234
  };
235
- var q = {
235
+ var M = {
236
236
  childrenInAnimation: false,
237
237
  open: false,
238
- useLayerForClickAway: true
238
+ scrim: "interactive"
239
239
  };
240
- var M = function(e) {
241
- w(r, e);
242
- var t = S(r);
243
- function r(e) {
240
+ var C = function(e) {
241
+ w(n, e);
242
+ var t = S(n);
243
+ function n(e) {
244
244
  var o;
245
- O(this, r);
245
+ O(this, n);
246
246
  o = t.call(this, e);
247
- _(k(o), "allowAnimationUpdates", true);
248
- _(k(o), "handleClickAway", (function(e) {
249
- var t, r;
250
- (t = (r = o.props).onRequestClose) === null || t === void 0 ? void 0 : t.call(r, {
247
+ R(k(o), "allowAnimationUpdates", true);
248
+ R(k(o), "handleClickAway", (function(e) {
249
+ var t, n;
250
+ (t = (n = o.props).onRequestClose) === null || t === void 0 ? void 0 : t.call(n, {
251
251
  reason: "clickAway",
252
252
  event: e
253
253
  });
254
254
  }));
255
- _(k(o), "handleAnimationEnd", (function() {
255
+ R(k(o), "handleAnimationEnd", (function() {
256
256
  if (o.allowAnimationUpdates) {
257
257
  o.setState({
258
258
  animating: false
259
259
  });
260
260
  }
261
261
  }));
262
- _(k(o), "renderLayer", (function() {
263
- var e = o.props, t = e.getDefaultMotionStyle, r = e.getMotionStyle, i = e.renderModal, l = e.useLayerForClickAway;
264
- var u = o.props.open || o.state.animating;
262
+ R(k(o), "renderLayer", (function() {
263
+ var e = o.props, t = e.getDefaultMotionStyle, n = e.getMotionStyle, i = e.renderModal, c = e.scrim;
264
+ var l = o.props.open || o.state.animating;
265
265
 
266
- return n().createElement(a.Spring, {
266
+ return r().createElement(a.Spring, {
267
267
  from: m(m({}, t === null || t === void 0 ? void 0 : t()), {}, {
268
268
  overlayOpacity: 0,
269
269
  opacity: 0
270
270
  }),
271
- to: m(m({}, r === null || r === void 0 ? void 0 : r()), {}, {
271
+ to: m(m({}, n === null || n === void 0 ? void 0 : n()), {}, {
272
272
  overlayOpacity: o.props.open ? 1 : 0,
273
273
  opacity: o.props.open ? 1 : 0
274
274
  }),
275
275
  onRest: o.handleAnimationEnd
276
276
  }, (function(e) {
277
277
 
278
- return n().createElement("div", null,
278
+ return r().createElement("div", null,
279
279
  /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
280
- i(e), u && l && n().createElement(d, {
280
+ i(e), l && (c === "visible" || "interactive") && r().createElement(d, {
281
281
  "data-test": "modal-overlay",
282
- onMouseDown: o.handleClickAway,
282
+ onMouseDown: c === "interactive" ? o.handleClickAway : undefined,
283
283
  key: "clickAway",
284
284
  style: {
285
285
  /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
@@ -294,7 +294,7 @@
294
294
  };
295
295
  return o;
296
296
  }
297
- g(r, [ {
297
+ g(n, [ {
298
298
  key: "componentWillUnmount",
299
299
  value: function e() {
300
300
  this.allowAnimationUpdates = false;
@@ -305,18 +305,18 @@
305
305
  value: function e() {
306
306
  var t = this.props.open || this.state.animating || this.props.childrenInAnimation;
307
307
 
308
- return n().createElement(u(), {
308
+ return r().createElement(l(), {
309
309
  open: t,
310
310
  closeReasons: [ "escapeKey" ],
311
311
  onRequestClose: this.props.onRequestClose
312
312
  }, t && this.renderLayer());
313
313
  }
314
314
  } ]);
315
- return r;
316
- }(r.Component);
317
- _(M, "propTypes", R);
318
- _(M, "defaultProps", q);
319
- _(M, "getDerivedStateFromProps", (function(e, t) {
315
+ return n;
316
+ }(n.Component);
317
+ R(C, "propTypes", q);
318
+ R(C, "defaultProps", M);
319
+ R(C, "getDerivedStateFromProps", (function(e, t) {
320
320
  if (e.open !== t.prevOpen) {
321
321
  return {
322
322
  animating: true,
@@ -325,7 +325,7 @@
325
325
  }
326
326
  return null;
327
327
  }));
328
- /* harmony default export */ const E = M;
328
+ /* harmony default export */ const E = C;
329
329
  // CONCATENATED MODULE: ./src/ModalLayer/index.ts
330
330
  module.exports = t;
331
331
  /******/})();