@splunk/react-ui 4.38.0 → 4.40.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/Accordion.js +131 -153
- package/Anchor.js +50 -58
- package/Animation.js +64 -59
- package/AnimationToggle.js +59 -61
- package/Box.js +59 -67
- package/Breadcrumbs.js +113 -127
- package/Button.js +151 -169
- package/ButtonGroup.js +41 -49
- package/ButtonSimple.js +264 -295
- package/CHANGELOG.md +49 -0
- package/Calendar.js +353 -414
- package/Card.js +186 -244
- package/CardLayout.js +86 -83
- package/Chip.js +136 -146
- package/Clickable.js +180 -198
- package/CloseButton.js +52 -60
- package/Code.js +24 -31
- package/CollapsiblePanel.js +172 -202
- package/Color.js +371 -412
- package/ColumnLayout.js +72 -96
- package/ComboBox.js +266 -303
- package/Concertina.js +406 -454
- package/ControlGroup.js +178 -210
- package/Date.js +116 -131
- package/DefinitionList.js +125 -149
- package/Divider.js +81 -79
- package/Dropdown.js +226 -237
- package/DualListbox.js +150 -186
- package/EventListener.js +4 -1
- package/File.js +1032 -955
- package/FormRows.js +281 -334
- package/Heading.js +27 -35
- package/Image.js +101 -116
- package/JSONTree.js +301 -344
- package/Layer.js +118 -126
- package/Link.js +141 -159
- package/List.js +61 -77
- package/MIGRATION.mdx +123 -38
- package/Markdown.js +288 -347
- package/Menu.js +506 -532
- package/Message.js +197 -207
- package/MessageBar.js +58 -66
- package/Modal.js +241 -290
- package/ModalLayer.js +130 -148
- package/Monogram.js +138 -138
- package/Multiselect.js +3137 -3433
- package/Number.js +164 -178
- package/Paginator.js +296 -335
- package/Paragraph.js +24 -32
- package/Popover.js +450 -442
- package/Progress.js +65 -75
- package/RadioBar.js +301 -303
- package/RadioList.js +77 -119
- package/Resize.js +105 -127
- package/ResultsMenu.js +373 -385
- package/ScreenReaderContent.js +50 -58
- package/Scroll.js +209 -244
- package/Search.js +379 -391
- package/Select.js +2085 -2345
- package/SidePanel.js +122 -142
- package/Slider.js +132 -145
- package/SlidingPanels.js +238 -270
- package/SplitButton.d.ts +2 -0
- package/SplitButton.js +222 -245
- package/StaticContent.js +68 -76
- package/StepBar.js +206 -205
- package/Switch.js +176 -205
- package/TabBar.js +235 -268
- package/TabLayout.js +122 -141
- package/Table.js +2103 -2261
- package/Text.js +379 -493
- package/TextArea.js +411 -441
- package/Tooltip.js +116 -132
- package/TransitionOpen.js +160 -178
- package/Tree.js +268 -287
- package/Typography.js +48 -52
- package/WaitSpinner.js +61 -69
- package/cypress/support/commands.ts +9 -0
- package/cypress/support/index.d.ts +6 -0
- package/cypress/tsconfig.cypress.json +1 -0
- package/docker-compose.yml +0 -1
- package/package.json +15 -15
- package/types/src/Button/Button.d.ts +5 -1
- package/types/src/ButtonSimple/ButtonSimple.d.ts +2 -2
- package/types/src/Card/Card.d.ts +1 -0
- package/types/src/Card/Footer.d.ts +1 -0
- package/types/src/Chip/Chip.d.ts +3 -6
- package/types/src/CollapsiblePanel/CollapsiblePanel.d.ts +1 -1
- package/types/src/Color/Color.d.ts +2 -2
- package/types/src/Color/Palette.d.ts +4 -2
- package/types/src/ComboBox/ComboBox.d.ts +1 -1
- package/types/src/ComboBox/Option.d.ts +1 -1
- package/types/src/ControlGroup/ControlGroup.d.ts +1 -2
- package/types/src/Date/Date.d.ts +2 -2
- package/types/src/File/File.d.ts +2 -3
- package/types/src/File/Retry.d.ts +1 -2
- package/types/src/Menu/Item.d.ts +18 -5
- package/types/src/Menu/Menu.d.ts +3 -3
- package/types/src/Menu/docs/examples/Adornments.d.ts +2 -0
- package/types/src/Menu/docs/examples/SelectableWithAdornments.d.ts +2 -0
- package/types/src/ModalLayer/ModalLayer.d.ts +1 -1
- package/types/src/Multiselect/Compact.d.ts +1 -1
- package/types/src/Multiselect/Multiselect.d.ts +1 -1
- package/types/src/Multiselect/Normal.d.ts +1 -1
- package/types/src/Multiselect/Option.d.ts +2 -0
- package/types/src/Number/Number.d.ts +3 -3
- package/types/src/Popover/Popover.d.ts +3 -4
- package/types/src/RadioBar/RadioBar.d.ts +2 -2
- package/types/src/ResultsMenu/VirtualizedResultsMenu/VirtualizedResultsMenu.d.ts +1 -1
- package/types/src/ScrollContainerContext/ScrollContainerContext.d.ts +2 -2
- package/types/src/Search/Option.d.ts +9 -3
- package/types/src/Select/Option.d.ts +3 -1
- package/types/src/Select/OptionBase.d.ts +7 -5
- package/types/src/Select/Select.d.ts +4 -2
- package/types/src/Select/SelectAllOption.d.ts +4 -4
- package/types/src/Select/SelectBase.d.ts +104 -66
- package/types/src/Select/docs/examples/Appearance.d.ts +0 -2
- package/types/src/SidePanel/SidePanel.d.ts +1 -1
- package/types/src/Slider/Slider.d.ts +2 -2
- package/types/src/SlidingPanels/SlidingPanels.d.ts +1 -1
- package/types/src/StepBar/Step.d.ts +1 -2
- package/types/src/Switch/Switch.d.ts +0 -1
- package/types/src/TabBar/Tab.d.ts +1 -1
- package/types/src/TabBar/TabBar.d.ts +3 -1
- package/types/src/TabLayout/TabLayout.d.ts +2 -0
- package/types/src/Table/Cell.d.ts +0 -2
- package/types/src/Table/HeadDropdownCell.d.ts +2 -0
- package/types/src/Table/HeadInner.d.ts +5 -1
- package/types/src/Table/Table.d.ts +0 -1
- package/types/src/Table/docs/examples/StripeRows.d.ts +2 -0
- package/types/src/Text/IconOutlinedHide.d.ts +1 -2
- package/types/src/Text/IconOutlinedView.d.ts +1 -2
- package/types/src/Text/Text.d.ts +2 -2
- package/types/src/TextArea/TextArea.d.ts +2 -2
- package/types/src/Tooltip/Tooltip.d.ts +4 -4
- package/types/src/TransitionOpen/TransitionOpen.d.ts +1 -1
- package/types/src/WaitSpinner/WaitSpinner.d.ts +0 -1
- package/types/src/useControlled/index.d.ts +2 -0
- package/types/src/useControlled/useControlled.d.ts +21 -0
- package/types/src/useResizeObserver/index.d.ts +2 -0
- package/types/src/useResizeObserver/useResizeObserver.d.ts +12 -0
- package/useControlled.js +112 -0
- package/useForceUpdate.js +30 -32
- package/useKeyPress.d.ts +2 -0
- package/useKeyPress.js +1 -1
- package/useResizeObserver.d.ts +2 -0
- package/useResizeObserver.js +137 -0
- package/types/src/ButtonGroup/docs/examples/prisma/Basic.d.ts +0 -1
- package/types/src/Chip/docs/examples/Basic.d.ts +0 -2
- package/types/src/Chip/docs/examples/prisma/Appearance.d.ts +0 -2
- package/types/src/Color/docs/examples/prisma/Controlled.d.ts +0 -2
- package/types/src/Color/docs/examples/prisma/ThemeVariables.d.ts +0 -1
- package/types/src/Color/docs/examples/prisma/Uncontrolled.d.ts +0 -2
- package/types/src/Dropdown/docs/examples/prisma/Basic.d.ts +0 -2
- package/types/src/Dropdown/docs/examples/prisma/BasicMenu.d.ts +0 -2
- package/types/src/Dropdown/docs/examples/prisma/ControlledDropdown.d.ts +0 -2
- package/types/src/Dropdown/docs/examples/prisma/Dialog.d.ts +0 -2
- package/types/src/Dropdown/docs/examples/prisma/OtherToggles.d.ts +0 -2
- package/types/src/Dropdown/docs/examples/prisma/ScrollingMenu.d.ts +0 -2
- package/types/src/File/docs/examples/prisma/Disabled.d.ts +0 -12
- package/types/src/File/docs/examples/prisma/Error.d.ts +0 -1
- package/types/src/Menu/docs/examples/Icons.d.ts +0 -2
- package/types/src/Menu/docs/examples/SelectableWithIcons.d.ts +0 -2
- package/types/src/Message/docs/examples/prisma/Title.d.ts +0 -2
- package/types/src/TabBar/docs/examples/prisma/Context.d.ts +0 -2
- package/types/src/TabLayout/docs/examples/prisma/Context.d.ts +0 -2
- package/types/src/Table/docs/examples/prisma/Basic.d.ts +0 -2
- package/types/src/WaitSpinner/docs/examples/prisma/Basic.d.ts +0 -2
- /package/types/src/Color/docs/examples/{prisma/CustomizedPalette.d.ts → CustomizedPalette.d.ts} +0 -0
- /package/types/src/Color/docs/examples/{prisma/HideInput.d.ts → HideInput.d.ts} +0 -0
- /package/types/src/StepBar/docs/examples/{prisma/Error.d.ts → Error.d.ts} +0 -0
- /package/types/src/TabBar/docs/examples/{prisma/Disabled.d.ts → Disabled.d.ts} +0 -0
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
|
|
12
|
+
/******/ var r = t && t.__esModule ?
|
|
13
13
|
/******/ () => t["default"]
|
|
14
14
|
/******/ : () => t
|
|
15
15
|
/******/;
|
|
16
|
-
e.d(
|
|
17
|
-
a:
|
|
16
|
+
e.d(r, {
|
|
17
|
+
a: r
|
|
18
18
|
});
|
|
19
|
-
/******/ return
|
|
19
|
+
/******/ return r;
|
|
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,
|
|
27
|
-
/******/ for (var
|
|
28
|
-
/******/ if (e.o(
|
|
29
|
-
/******/ Object.defineProperty(t,
|
|
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, {
|
|
30
30
|
enumerable: true,
|
|
31
|
-
get: n
|
|
31
|
+
get: r[n]
|
|
32
32
|
});
|
|
33
33
|
/******/ }
|
|
34
34
|
/******/ }
|
|
@@ -61,11 +61,11 @@
|
|
|
61
61
|
e.r(t);
|
|
62
62
|
// EXPORTS
|
|
63
63
|
e.d(t, {
|
|
64
|
-
default: () => /* reexport */
|
|
64
|
+
default: () => /* reexport */ T
|
|
65
65
|
});
|
|
66
66
|
// CONCATENATED MODULE: external "react"
|
|
67
|
-
const
|
|
68
|
-
var
|
|
67
|
+
const r = require("react");
|
|
68
|
+
var n = e.n(r);
|
|
69
69
|
// CONCATENATED MODULE: external "prop-types"
|
|
70
70
|
const o = require("prop-types");
|
|
71
71
|
var i = e.n(o);
|
|
@@ -76,154 +76,135 @@
|
|
|
76
76
|
var l = e.n(c);
|
|
77
77
|
// CONCATENATED MODULE: external "styled-components"
|
|
78
78
|
const u = require("styled-components");
|
|
79
|
-
var
|
|
79
|
+
var p = e.n(u);
|
|
80
80
|
// CONCATENATED MODULE: external "react-spring"
|
|
81
|
-
const
|
|
81
|
+
const s = require("react-spring");
|
|
82
82
|
// CONCATENATED MODULE: external "@splunk/themes"
|
|
83
|
-
const
|
|
83
|
+
const f = require("@splunk/themes");
|
|
84
84
|
// CONCATENATED MODULE: ./src/ModalLayer/ModalLayerStyles.ts
|
|
85
|
-
var y = (0, u.css)([ "", ";position:fixed;top:0;right:0;bottom:0;left:0;" ],
|
|
86
|
-
var d =
|
|
85
|
+
var y = (0, u.css)([ "", ";position:fixed;top:0;right:0;bottom:0;left:0;" ], f.mixins.reset("block"));
|
|
86
|
+
var d = p()(s.animated.div).withConfig({
|
|
87
87
|
displayName: "ModalLayerStyles__StyledClickAwayOverlay",
|
|
88
88
|
componentId: "sc-1sa3n1j-0"
|
|
89
|
-
})([ "", ";background-color:", ";z-index:", ";" ], y,
|
|
89
|
+
})([ "", ";background-color:", ";z-index:", ";" ], y, f.variables.backgroundColorScrim, f.variables.zindexModalBackdrop);
|
|
90
90
|
// CONCATENATED MODULE: ./src/ModalLayer/ModalLayer.tsx
|
|
91
91
|
function v(e) {
|
|
92
92
|
"@babel/helpers - typeof";
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
}
|
|
98
|
-
v = function e(t) {
|
|
99
|
-
return t && typeof Symbol === "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
return v(e);
|
|
93
|
+
return v = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
|
|
94
|
+
return typeof e;
|
|
95
|
+
} : function(e) {
|
|
96
|
+
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
97
|
+
}, v(e);
|
|
103
98
|
}
|
|
104
99
|
function b(e, t) {
|
|
105
|
-
var
|
|
100
|
+
var r = Object.keys(e);
|
|
106
101
|
if (Object.getOwnPropertySymbols) {
|
|
107
|
-
var
|
|
108
|
-
|
|
102
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
103
|
+
t && (n = n.filter((function(t) {
|
|
109
104
|
return Object.getOwnPropertyDescriptor(e, t).enumerable;
|
|
110
|
-
}));
|
|
111
|
-
n.push.apply(n, r);
|
|
105
|
+
}))), r.push.apply(r, n);
|
|
112
106
|
}
|
|
113
|
-
return
|
|
107
|
+
return r;
|
|
114
108
|
}
|
|
115
109
|
function m(e) {
|
|
116
110
|
for (var t = 1; t < arguments.length; t++) {
|
|
117
|
-
var
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
}
|
|
123
|
-
Object.defineProperties(e, Object.getOwnPropertyDescriptors(n));
|
|
124
|
-
} else {
|
|
125
|
-
b(Object(n)).forEach((function(t) {
|
|
126
|
-
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
127
|
-
}));
|
|
128
|
-
}
|
|
111
|
+
var r = null != arguments[t] ? arguments[t] : {};
|
|
112
|
+
t % 2 ? b(Object(r), !0).forEach((function(t) {
|
|
113
|
+
E(e, t, r[t]);
|
|
114
|
+
})) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : b(Object(r)).forEach((function(t) {
|
|
115
|
+
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(r, t));
|
|
116
|
+
}));
|
|
129
117
|
}
|
|
130
118
|
return e;
|
|
131
119
|
}
|
|
132
120
|
function O(e, t) {
|
|
133
|
-
if (!(e instanceof t))
|
|
134
|
-
throw new TypeError("Cannot call a class as a function");
|
|
135
|
-
}
|
|
121
|
+
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
|
|
136
122
|
}
|
|
137
123
|
function h(e, t) {
|
|
138
|
-
for (var
|
|
139
|
-
var
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
if ("value" in r) r.writable = true;
|
|
143
|
-
Object.defineProperty(e, r.key, r);
|
|
124
|
+
for (var r = 0; r < t.length; r++) {
|
|
125
|
+
var n = t[r];
|
|
126
|
+
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0),
|
|
127
|
+
Object.defineProperty(e, q(n.key), n);
|
|
144
128
|
}
|
|
145
129
|
}
|
|
146
|
-
function g(e, t,
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
130
|
+
function g(e, t, r) {
|
|
131
|
+
return t && h(e.prototype, t), r && h(e, r), Object.defineProperty(e, "prototype", {
|
|
132
|
+
writable: !1
|
|
133
|
+
}), e;
|
|
150
134
|
}
|
|
151
135
|
function w(e, t) {
|
|
152
|
-
if (typeof t !== "
|
|
153
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
154
|
-
}
|
|
136
|
+
if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function");
|
|
155
137
|
e.prototype = Object.create(t && t.prototype, {
|
|
156
138
|
constructor: {
|
|
157
139
|
value: e,
|
|
158
|
-
writable:
|
|
159
|
-
configurable:
|
|
140
|
+
writable: !0,
|
|
141
|
+
configurable: !0
|
|
160
142
|
}
|
|
161
|
-
})
|
|
162
|
-
|
|
143
|
+
}), Object.defineProperty(e, "prototype", {
|
|
144
|
+
writable: !1
|
|
145
|
+
}), t && j(e, t);
|
|
163
146
|
}
|
|
164
147
|
function j(e, t) {
|
|
165
|
-
j = Object.setPrototypeOf
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
};
|
|
169
|
-
return j(e, t);
|
|
148
|
+
return j = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
|
|
149
|
+
return e.__proto__ = t, e;
|
|
150
|
+
}, j(e, t);
|
|
170
151
|
}
|
|
171
|
-
function
|
|
152
|
+
function P(e) {
|
|
172
153
|
var t = A();
|
|
173
|
-
return function
|
|
174
|
-
var r = _(e)
|
|
154
|
+
return function() {
|
|
155
|
+
var r, n = _(e);
|
|
175
156
|
if (t) {
|
|
176
|
-
var
|
|
177
|
-
|
|
178
|
-
} else
|
|
179
|
-
|
|
180
|
-
}
|
|
181
|
-
return P(this, o);
|
|
157
|
+
var o = _(this).constructor;
|
|
158
|
+
r = Reflect.construct(n, arguments, o);
|
|
159
|
+
} else r = n.apply(this, arguments);
|
|
160
|
+
return S(this, r);
|
|
182
161
|
};
|
|
183
162
|
}
|
|
184
|
-
function
|
|
185
|
-
if (t && (v(t)
|
|
186
|
-
|
|
187
|
-
}
|
|
163
|
+
function S(e, t) {
|
|
164
|
+
if (t && ("object" == v(t) || "function" == typeof t)) return t;
|
|
165
|
+
if (void 0 !== t) throw new TypeError("Derived constructors may only return object or undefined");
|
|
188
166
|
return k(e);
|
|
189
167
|
}
|
|
190
168
|
function k(e) {
|
|
191
|
-
if (
|
|
192
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
193
|
-
}
|
|
169
|
+
if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
194
170
|
return e;
|
|
195
171
|
}
|
|
196
172
|
function A() {
|
|
197
|
-
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
198
|
-
if (Reflect.construct.sham) return false;
|
|
199
|
-
if (typeof Proxy === "function") return true;
|
|
200
173
|
try {
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
return
|
|
205
|
-
}
|
|
174
|
+
var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {})));
|
|
175
|
+
} catch (e) {}
|
|
176
|
+
return (A = function t() {
|
|
177
|
+
return !!e;
|
|
178
|
+
})();
|
|
206
179
|
}
|
|
207
180
|
function _(e) {
|
|
208
|
-
_ = Object.setPrototypeOf ? Object.getPrototypeOf : function
|
|
209
|
-
return
|
|
210
|
-
};
|
|
211
|
-
return _(e);
|
|
181
|
+
return _ = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
|
|
182
|
+
return e.__proto__ || Object.getPrototypeOf(e);
|
|
183
|
+
}, _(e);
|
|
212
184
|
}
|
|
213
|
-
function
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
185
|
+
function E(e, t, r) {
|
|
186
|
+
return (t = q(t)) in e ? Object.defineProperty(e, t, {
|
|
187
|
+
value: r,
|
|
188
|
+
enumerable: !0,
|
|
189
|
+
configurable: !0,
|
|
190
|
+
writable: !0
|
|
191
|
+
}) : e[t] = r, e;
|
|
192
|
+
}
|
|
193
|
+
function q(e) {
|
|
194
|
+
var t = M(e, "string");
|
|
195
|
+
return "symbol" == v(t) ? t : t + "";
|
|
196
|
+
}
|
|
197
|
+
function M(e, t) {
|
|
198
|
+
if ("object" != v(e) || !e) return e;
|
|
199
|
+
var r = e[Symbol.toPrimitive];
|
|
200
|
+
if (void 0 !== r) {
|
|
201
|
+
var n = r.call(e, t || "default");
|
|
202
|
+
if ("object" != v(n)) return n;
|
|
203
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
223
204
|
}
|
|
224
|
-
return e;
|
|
205
|
+
return ("string" === t ? String : Number)(e);
|
|
225
206
|
}
|
|
226
|
-
var
|
|
207
|
+
var C = {
|
|
227
208
|
childrenInAnimation: i().bool,
|
|
228
209
|
getDefaultMotionStyle: i().func,
|
|
229
210
|
getMotionStyle: i().func,
|
|
@@ -232,53 +213,64 @@
|
|
|
232
213
|
renderModal: i().func.isRequired,
|
|
233
214
|
scrim: i().oneOf([ "visible", "hidden", "interactive" ])
|
|
234
215
|
};
|
|
235
|
-
var
|
|
216
|
+
var R = {
|
|
236
217
|
childrenInAnimation: false,
|
|
237
218
|
open: false,
|
|
238
219
|
scrim: "interactive"
|
|
239
220
|
};
|
|
240
|
-
var
|
|
241
|
-
w(
|
|
242
|
-
var t =
|
|
243
|
-
|
|
221
|
+
var D = function(e) {
|
|
222
|
+
w(r, e);
|
|
223
|
+
var t = P(r);
|
|
224
|
+
g(r, null, [ {
|
|
225
|
+
key: "getDerivedStateFromProps",
|
|
226
|
+
value: function e(t, r) {
|
|
227
|
+
if (t.open !== r.prevOpen) {
|
|
228
|
+
return {
|
|
229
|
+
animating: true,
|
|
230
|
+
prevOpen: t.open
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
return null;
|
|
234
|
+
}
|
|
235
|
+
} ]);
|
|
236
|
+
function r(e) {
|
|
244
237
|
var o;
|
|
245
|
-
O(this,
|
|
238
|
+
O(this, r);
|
|
246
239
|
o = t.call(this, e);
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
var t,
|
|
250
|
-
(t = (
|
|
240
|
+
E(k(o), "allowAnimationUpdates", true);
|
|
241
|
+
E(k(o), "handleClickAway", (function(e) {
|
|
242
|
+
var t, r;
|
|
243
|
+
(t = (r = o.props).onRequestClose) === null || t === void 0 ? void 0 : t.call(r, {
|
|
251
244
|
reason: "clickAway",
|
|
252
245
|
event: e
|
|
253
246
|
});
|
|
254
247
|
}));
|
|
255
|
-
|
|
248
|
+
E(k(o), "handleAnimationEnd", (function() {
|
|
256
249
|
if (o.allowAnimationUpdates) {
|
|
257
250
|
o.setState({
|
|
258
251
|
animating: false
|
|
259
252
|
});
|
|
260
253
|
}
|
|
261
254
|
}));
|
|
262
|
-
|
|
263
|
-
var e = o.props, t = e.getDefaultMotionStyle,
|
|
255
|
+
E(k(o), "renderLayer", (function() {
|
|
256
|
+
var e = o.props, t = e.getDefaultMotionStyle, r = e.getMotionStyle, i = e.renderModal, c = e.scrim;
|
|
264
257
|
var l = o.props.open || o.state.animating;
|
|
265
258
|
var u = l && c !== "hidden";
|
|
266
259
|
|
|
267
|
-
return
|
|
260
|
+
return n().createElement(a.Spring, {
|
|
268
261
|
from: m(m({}, t === null || t === void 0 ? void 0 : t()), {}, {
|
|
269
262
|
overlayOpacity: 0,
|
|
270
263
|
opacity: 0
|
|
271
264
|
}),
|
|
272
|
-
to: m(m({},
|
|
265
|
+
to: m(m({}, r === null || r === void 0 ? void 0 : r()), {}, {
|
|
273
266
|
overlayOpacity: o.props.open ? 1 : 0,
|
|
274
267
|
opacity: o.props.open ? 1 : 0
|
|
275
268
|
}),
|
|
276
269
|
onRest: o.handleAnimationEnd
|
|
277
270
|
}, (function(e) {
|
|
278
271
|
|
|
279
|
-
return
|
|
280
|
-
|
|
281
|
-
i(e), u && r().createElement(d, {
|
|
272
|
+
return n().createElement("div", null, /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
273
|
+
i(e), u && n().createElement(d, {
|
|
282
274
|
"data-test": "modal-overlay",
|
|
283
275
|
onMouseDown: c === "interactive" ? o.handleClickAway : undefined,
|
|
284
276
|
key: "clickAway",
|
|
@@ -295,38 +287,28 @@
|
|
|
295
287
|
};
|
|
296
288
|
return o;
|
|
297
289
|
}
|
|
298
|
-
g(
|
|
290
|
+
g(r, [ {
|
|
299
291
|
key: "componentWillUnmount",
|
|
300
292
|
value: function e() {
|
|
301
293
|
this.allowAnimationUpdates = false;
|
|
302
294
|
}
|
|
303
|
-
}, {
|
|
295
|
+
/* eslint-disable jsx-a11y/no-static-element-interactions */ }, {
|
|
304
296
|
key: "render",
|
|
305
|
-
/* eslint-enable jsx-a11y/no-static-element-interactions */
|
|
306
|
-
value: function e() {
|
|
297
|
+
/* eslint-enable jsx-a11y/no-static-element-interactions */ value: function e() {
|
|
307
298
|
var t = this.props.open || this.state.animating || this.props.childrenInAnimation;
|
|
308
299
|
|
|
309
|
-
return
|
|
300
|
+
return n().createElement(l(), {
|
|
310
301
|
open: t,
|
|
311
302
|
closeReasons: [ "escapeKey" ],
|
|
312
303
|
onRequestClose: this.props.onRequestClose
|
|
313
304
|
}, t && this.renderLayer());
|
|
314
305
|
}
|
|
315
306
|
} ]);
|
|
316
|
-
return
|
|
317
|
-
}(
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
if (e.open !== t.prevOpen) {
|
|
322
|
-
return {
|
|
323
|
-
animating: true,
|
|
324
|
-
prevOpen: e.open
|
|
325
|
-
};
|
|
326
|
-
}
|
|
327
|
-
return null;
|
|
328
|
-
}));
|
|
329
|
-
/* harmony default export */ const E = C;
|
|
307
|
+
return r;
|
|
308
|
+
}(r.Component);
|
|
309
|
+
E(D, "propTypes", C);
|
|
310
|
+
E(D, "defaultProps", R);
|
|
311
|
+
/* harmony default export */ const T = D;
|
|
330
312
|
// CONCATENATED MODULE: ./src/ModalLayer/index.ts
|
|
331
313
|
module.exports = t;
|
|
332
314
|
/******/})();
|