@splunk/react-ui 4.20.0 → 4.21.1
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 +425 -441
- package/Anchor.js +147 -193
- package/Animation.js +142 -166
- package/AnimationToggle.js +197 -253
- package/Box.js +145 -194
- package/Breadcrumbs.js +288 -298
- package/Button.js +488 -613
- package/ButtonGroup.js +160 -212
- package/ButtonSimple.js +543 -562
- package/CHANGELOG.md +26 -0
- package/Calendar.js +1107 -1195
- package/Card.js +771 -746
- package/CardLayout.js +205 -223
- package/Chip.js +509 -612
- package/Clickable.js +416 -472
- package/CloseButton.js +165 -250
- package/Code.js +1808 -2172
- package/Code.js.LICENSE.txt +8 -0
- package/CollapsiblePanel.js +586 -675
- package/Color.js +1066 -1297
- package/ColumnLayout.js +402 -465
- package/ComboBox.js +892 -969
- package/Concertina.js +998 -963
- package/ControlGroup.js +687 -718
- package/Date.js +567 -697
- package/DefinitionList.js +308 -310
- package/Divider.js +149 -194
- package/Dropdown.js +459 -558
- package/DualListbox.js +1480 -1735
- package/EventListener.js +94 -165
- package/File.js +1051 -1173
- package/FormRows.js +885 -880
- package/Heading.js +216 -263
- package/Image.js +446 -558
- package/JSONTree.js +690 -699
- package/Layer.js +442 -582
- package/Link.js +336 -361
- package/List.js +213 -237
- package/Markdown.js +510 -612
- package/Menu.js +1109 -1331
- package/Message.js +474 -629
- package/MessageBar.js +387 -561
- package/Modal.js +810 -798
- package/ModalLayer.js +326 -343
- package/Monogram.js +308 -368
- package/Multiselect.js +3558 -3998
- package/Number.js +729 -843
- package/Paginator.js +510 -615
- package/Paragraph.js +145 -188
- package/Popover.js +1470 -1693
- package/Progress.js +301 -362
- package/RadioBar.js +610 -651
- package/RadioList.js +483 -544
- package/Resize.js +530 -623
- package/ResultsMenu.js +494 -597
- package/ScreenReaderContent.js +142 -187
- package/Scroll.js +595 -598
- package/ScrollContainerContext.js +197 -278
- package/Search.js +745 -817
- package/Select.js +2441 -2746
- package/SidePanel.js +390 -392
- package/Slider.js +668 -825
- package/SlidingPanels.js +639 -645
- package/SplitButton.js +464 -499
- package/StaticContent.js +161 -217
- package/StepBar.js +386 -466
- package/Switch.js +710 -764
- package/TabBar.js +724 -815
- package/TabLayout.js +406 -438
- package/Table.js +4842 -5121
- package/Text.js +1169 -1351
- package/TextArea.js +1097 -1307
- package/Tooltip.js +624 -721
- package/TransitionOpen.js +489 -546
- package/Typography.js +176 -229
- package/WaitSpinner.js +230 -298
- package/package.json +14 -15
- package/stubs-splunkui.d.ts +4 -1
- package/types/src/ComboBox/Option.d.ts +1 -1
- package/types/src/Concertina/Concertina.d.ts +4 -0
- package/types/src/JSONTree/JSONTreeContext.d.ts +7 -0
- package/types/src/JSONTree/TreeNode.d.ts +5 -0
- package/types/src/Link/Link.d.ts +7 -3
- package/types/src/Link/docs/examples/NewWindow.d.ts +2 -0
- package/types/src/Markdown/Markdown.d.ts +1 -1
- package/types/src/Markdown/renderers/MarkdownHeading.d.ts +1 -1
- package/types/src/Menu/Item.d.ts +1 -1
- package/types/src/Menu/Menu.d.ts +1 -0
- package/types/src/MessageBar/docs/examples/WithActions.d.ts +2 -0
- package/types/src/Multiselect/Option.d.ts +1 -1
- package/types/src/Search/Option.d.ts +1 -1
- package/types/src/Select/Option.d.ts +1 -1
- package/types/src/Select/OptionBase.d.ts +1 -1
- package/types/src/fixtures/FetchOptions.d.ts +2 -8
- package/useForceUpdate.js +112 -146
- package/useKeyPress.js +74 -128
- package/usePrevious.js +65 -129
- package/useRovingFocus.js +122 -218
- package/types/src/Link/docs/examples/NewTab.d.ts +0 -2
- /package/types/src/Table/docs/examples/{DockedHeader.d.ts → DockedHeaderScrollbar.d.ts} +0 -0
- /package/types/src/Table/docs/examples/prisma/{DockedHeader.d.ts → DockedHeaderScrollbar.d.ts} +0 -0
package/Modal.js
CHANGED
|
@@ -1,805 +1,817 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
/******/
|
|
4
|
-
/******/
|
|
5
|
-
/******/
|
|
6
|
-
/******/
|
|
7
|
-
|
|
8
|
-
/******/
|
|
9
|
-
/******/
|
|
10
|
-
/******/
|
|
11
|
-
/******/
|
|
12
|
-
/******/
|
|
13
|
-
/******/
|
|
14
|
-
/******/
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
/******/
|
|
20
|
-
/******/
|
|
21
|
-
/******/
|
|
22
|
-
/******/
|
|
23
|
-
/******/
|
|
24
|
-
/******/
|
|
25
|
-
/******/
|
|
26
|
-
/******/
|
|
27
|
-
/******/
|
|
28
|
-
/******/
|
|
29
|
-
/******/
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
/******/
|
|
34
|
-
/******/
|
|
35
|
-
/******/
|
|
36
|
-
/******/
|
|
37
|
-
/******/
|
|
38
|
-
/******/
|
|
39
|
-
/******/
|
|
40
|
-
/******/
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
/******/
|
|
44
|
-
/******/
|
|
45
|
-
/******/
|
|
46
|
-
/******/
|
|
47
|
-
/******/
|
|
48
|
-
/******/
|
|
49
|
-
/******/
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
/******/
|
|
53
|
-
/******/
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
/******/
|
|
57
|
-
/******/
|
|
58
|
-
/******/
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
var
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
var
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
var propTypes = {
|
|
220
|
-
children: external_prop_types_default.a.node
|
|
221
|
-
};
|
|
222
|
-
|
|
223
|
-
/**
|
|
1
|
+
/******/ (() => {
|
|
2
|
+
// webpackBootstrap
|
|
3
|
+
/******/ "use strict";
|
|
4
|
+
/******/ // The require scope
|
|
5
|
+
/******/ var e = {};
|
|
6
|
+
/******/
|
|
7
|
+
/************************************************************************/
|
|
8
|
+
/******/ /* webpack/runtime/compat get default export */
|
|
9
|
+
/******/ (() => {
|
|
10
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
11
|
+
/******/ e.n = t => {
|
|
12
|
+
/******/ var r = t && t.__esModule ?
|
|
13
|
+
/******/ () => t["default"]
|
|
14
|
+
/******/ : () => t
|
|
15
|
+
/******/;
|
|
16
|
+
e.d(r, {
|
|
17
|
+
a: r
|
|
18
|
+
});
|
|
19
|
+
/******/ return r;
|
|
20
|
+
/******/ };
|
|
21
|
+
/******/ })();
|
|
22
|
+
/******/
|
|
23
|
+
/******/ /* webpack/runtime/define property getters */
|
|
24
|
+
/******/ (() => {
|
|
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, {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
get: r[n]
|
|
32
|
+
});
|
|
33
|
+
/******/ }
|
|
34
|
+
/******/ }
|
|
35
|
+
/******/ };
|
|
36
|
+
/******/ })();
|
|
37
|
+
/******/
|
|
38
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
39
|
+
/******/ (() => {
|
|
40
|
+
/******/ e.o = (e, t) => Object.prototype.hasOwnProperty.call(e, t)
|
|
41
|
+
/******/;
|
|
42
|
+
})();
|
|
43
|
+
/******/
|
|
44
|
+
/******/ /* webpack/runtime/make namespace object */
|
|
45
|
+
/******/ (() => {
|
|
46
|
+
/******/ // define __esModule on exports
|
|
47
|
+
/******/ e.r = e => {
|
|
48
|
+
/******/ if (typeof Symbol !== "undefined" && Symbol.toStringTag) {
|
|
49
|
+
/******/ Object.defineProperty(e, Symbol.toStringTag, {
|
|
50
|
+
value: "Module"
|
|
51
|
+
});
|
|
52
|
+
/******/ }
|
|
53
|
+
/******/ Object.defineProperty(e, "__esModule", {
|
|
54
|
+
value: true
|
|
55
|
+
});
|
|
56
|
+
/******/ };
|
|
57
|
+
/******/ })();
|
|
58
|
+
/******/
|
|
59
|
+
/************************************************************************/ var t = {};
|
|
60
|
+
// ESM COMPAT FLAG
|
|
61
|
+
e.r(t);
|
|
62
|
+
// EXPORTS
|
|
63
|
+
e.d(t, {
|
|
64
|
+
Body: () => /* reexport */ F,
|
|
65
|
+
Footer: () => /* reexport */ K,
|
|
66
|
+
Header: () => /* reexport */ ae,
|
|
67
|
+
default: () => /* reexport */ qe
|
|
68
|
+
});
|
|
69
|
+
// CONCATENATED MODULE: external "react"
|
|
70
|
+
const r = require("react");
|
|
71
|
+
var n = e.n(r);
|
|
72
|
+
// CONCATENATED MODULE: external "prop-types"
|
|
73
|
+
const o = require("prop-types");
|
|
74
|
+
var i = e.n(o);
|
|
75
|
+
// CONCATENATED MODULE: external "lodash/defer"
|
|
76
|
+
const a = require("lodash/defer");
|
|
77
|
+
var l = e.n(a);
|
|
78
|
+
// CONCATENATED MODULE: external "lodash/keys"
|
|
79
|
+
const c = require("lodash/keys");
|
|
80
|
+
var s = e.n(c);
|
|
81
|
+
// CONCATENATED MODULE: external "lodash/omit"
|
|
82
|
+
const u = require("lodash/omit");
|
|
83
|
+
var p = e.n(u);
|
|
84
|
+
// CONCATENATED MODULE: external "@splunk/react-ui/ModalLayer"
|
|
85
|
+
const f = require("@splunk/react-ui/ModalLayer");
|
|
86
|
+
var d = e.n(f);
|
|
87
|
+
// CONCATENATED MODULE: external "@splunk/ui-utils/focus"
|
|
88
|
+
const y = require("@splunk/ui-utils/focus");
|
|
89
|
+
// CONCATENATED MODULE: external "@splunk/ui-utils/id"
|
|
90
|
+
const b = require("@splunk/ui-utils/id");
|
|
91
|
+
// CONCATENATED MODULE: external "@splunk/react-ui/ScrollContainerContext"
|
|
92
|
+
const m = require("@splunk/react-ui/ScrollContainerContext");
|
|
93
|
+
// CONCATENATED MODULE: external "styled-components"
|
|
94
|
+
const v = require("styled-components");
|
|
95
|
+
var h = e.n(v);
|
|
96
|
+
// CONCATENATED MODULE: external "@splunk/react-ui/Box"
|
|
97
|
+
const g = require("@splunk/react-ui/Box");
|
|
98
|
+
var x = e.n(g);
|
|
99
|
+
// CONCATENATED MODULE: external "@splunk/themes"
|
|
100
|
+
const O = require("@splunk/themes");
|
|
101
|
+
// CONCATENATED MODULE: ./src/Modal/BodyStyles.ts
|
|
102
|
+
var w = h()(x()).withConfig({
|
|
103
|
+
displayName: "BodyStyles__StyledBox",
|
|
104
|
+
componentId: "lv54z7-0"
|
|
105
|
+
})([ "background-color:", ";", " flex:0 1 auto;overflow:auto;@media all and (-ms-high-contrast:none){*::-ms-backdrop,&{max-height:calc(100vh - 180px);}}" ], (0,
|
|
106
|
+
O.pick)({
|
|
107
|
+
enterprise: O.variables.backgroundColor,
|
|
108
|
+
prisma: O.variables.backgroundColorDialog
|
|
109
|
+
}), (0, O.pick)({
|
|
110
|
+
enterprise: {
|
|
111
|
+
comfortable: (0, v.css)([ "padding:28px;" ]),
|
|
112
|
+
compact: (0, v.css)([ "padding:24px;" ])
|
|
113
|
+
},
|
|
114
|
+
prisma: {
|
|
115
|
+
comfortable: (0, v.css)([ "padding:12px 24px;&:first-child{padding-top:36px;}&:last-child{padding-bottom:36px;}" ]),
|
|
116
|
+
compact: (0, v.css)([ "padding:8px 24px;&:first-child{padding-top:26px;}&:last-child{padding-bottom:26px;}" ])
|
|
117
|
+
}
|
|
118
|
+
}));
|
|
119
|
+
// CONCATENATED MODULE: ./src/Modal/Body.tsx
|
|
120
|
+
function S() {
|
|
121
|
+
S = Object.assign || function(e) {
|
|
122
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
123
|
+
var r = arguments[t];
|
|
124
|
+
for (var n in r) {
|
|
125
|
+
if (Object.prototype.hasOwnProperty.call(r, n)) {
|
|
126
|
+
e[n] = r[n];
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
return e;
|
|
131
|
+
};
|
|
132
|
+
return S.apply(this, arguments);
|
|
133
|
+
}
|
|
134
|
+
function k(e, t) {
|
|
135
|
+
return _(e) || P(e, t) || C(e, t) || j();
|
|
136
|
+
}
|
|
137
|
+
function j() {
|
|
138
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
139
|
+
}
|
|
140
|
+
function C(e, t) {
|
|
141
|
+
if (!e) return;
|
|
142
|
+
if (typeof e === "string") return I(e, t);
|
|
143
|
+
var r = Object.prototype.toString.call(e).slice(8, -1);
|
|
144
|
+
if (r === "Object" && e.constructor) r = e.constructor.name;
|
|
145
|
+
if (r === "Map" || r === "Set") return Array.from(e);
|
|
146
|
+
if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return I(e, t);
|
|
147
|
+
}
|
|
148
|
+
function I(e, t) {
|
|
149
|
+
if (t == null || t > e.length) t = e.length;
|
|
150
|
+
for (var r = 0, n = new Array(t); r < t; r++) {
|
|
151
|
+
n[r] = e[r];
|
|
152
|
+
}
|
|
153
|
+
return n;
|
|
154
|
+
}
|
|
155
|
+
function P(e, t) {
|
|
156
|
+
if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(e))) return;
|
|
157
|
+
var r = [];
|
|
158
|
+
var n = true;
|
|
159
|
+
var o = false;
|
|
160
|
+
var i = undefined;
|
|
161
|
+
try {
|
|
162
|
+
for (var a = e[Symbol.iterator](), l; !(n = (l = a.next()).done); n = true) {
|
|
163
|
+
r.push(l.value);
|
|
164
|
+
if (t && r.length === t) break;
|
|
165
|
+
}
|
|
166
|
+
} catch (e) {
|
|
167
|
+
o = true;
|
|
168
|
+
i = e;
|
|
169
|
+
} finally {
|
|
170
|
+
try {
|
|
171
|
+
if (!n && a["return"] != null) a["return"]();
|
|
172
|
+
} finally {
|
|
173
|
+
if (o) throw i;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
return r;
|
|
177
|
+
}
|
|
178
|
+
function _(e) {
|
|
179
|
+
if (Array.isArray(e)) return e;
|
|
180
|
+
}
|
|
181
|
+
function E(e, t) {
|
|
182
|
+
if (e == null) return {};
|
|
183
|
+
var r = T(e, t);
|
|
184
|
+
var n, o;
|
|
185
|
+
if (Object.getOwnPropertySymbols) {
|
|
186
|
+
var i = Object.getOwnPropertySymbols(e);
|
|
187
|
+
for (o = 0; o < i.length; o++) {
|
|
188
|
+
n = i[o];
|
|
189
|
+
if (t.indexOf(n) >= 0) continue;
|
|
190
|
+
if (!Object.prototype.propertyIsEnumerable.call(e, n)) continue;
|
|
191
|
+
r[n] = e[n];
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
return r;
|
|
195
|
+
}
|
|
196
|
+
function T(e, t) {
|
|
197
|
+
if (e == null) return {};
|
|
198
|
+
var r = {};
|
|
199
|
+
var n = Object.keys(e);
|
|
200
|
+
var o, i;
|
|
201
|
+
for (i = 0; i < n.length; i++) {
|
|
202
|
+
o = n[i];
|
|
203
|
+
if (t.indexOf(o) >= 0) continue;
|
|
204
|
+
r[o] = e[o];
|
|
205
|
+
}
|
|
206
|
+
return r;
|
|
207
|
+
}
|
|
208
|
+
var M = {
|
|
209
|
+
children: i().node
|
|
210
|
+
};
|
|
211
|
+
/**
|
|
224
212
|
* A styled container for `Modal` body content.
|
|
225
|
-
*/
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
function
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
|
|
213
|
+
*/ function q(e) {
|
|
214
|
+
var t = e.children, o = E(e, [ "children" ]);
|
|
215
|
+
// @docs-props-type BodyPropsBase
|
|
216
|
+
var i = (0, r.useState)(), a = k(i, 2), l = a[0], c = a[1];
|
|
217
|
+
var s = (0, r.useCallback)((function(e) {
|
|
218
|
+
c(e);
|
|
219
|
+
}), []);
|
|
220
|
+
|
|
221
|
+
return n().createElement(w, S({
|
|
222
|
+
"data-test": "body"
|
|
223
|
+
}, o, {
|
|
224
|
+
elementRef: s
|
|
225
|
+
}), n().createElement(m.ScrollContainerProvider, {
|
|
226
|
+
value: l
|
|
227
|
+
}, t));
|
|
228
|
+
}
|
|
229
|
+
q.propTypes = M;
|
|
230
|
+
/* harmony default export */ const F = q;
|
|
231
|
+
// CONCATENATED MODULE: external "@splunk/react-ui/Divider"
|
|
232
|
+
const D = require("@splunk/react-ui/Divider");
|
|
233
|
+
var R = e.n(D);
|
|
234
|
+
// CONCATENATED MODULE: ./src/Modal/FooterStyles.ts
|
|
235
|
+
var A = h()(x()).withConfig({
|
|
236
|
+
displayName: "FooterStyles__StyledBox",
|
|
237
|
+
componentId: "yszcmv-0"
|
|
238
|
+
})([ "flex:0 0 auto;text-align:right;padding:", ";background-color:", ";& > button{min-width:80px;}" ], (0,
|
|
239
|
+
O.pick)({
|
|
240
|
+
enterprise: O.variables.spacing,
|
|
241
|
+
prisma: {
|
|
242
|
+
comfortable: "24px",
|
|
243
|
+
compact: "18px 24px"
|
|
244
|
+
}
|
|
245
|
+
}), (0, O.pick)({
|
|
246
|
+
enterprise: O.variables.backgroundColor,
|
|
247
|
+
prisma: O.variables.backgroundColorDialog
|
|
248
|
+
}));
|
|
249
|
+
// CONCATENATED MODULE: ./src/Modal/ModalContext.tsx
|
|
250
|
+
var B = (0, r.createContext)({});
|
|
251
|
+
/* harmony default export */ const H = B;
|
|
252
|
+
// CONCATENATED MODULE: ./src/Modal/Footer.tsx
|
|
253
|
+
function N() {
|
|
254
|
+
N = Object.assign || function(e) {
|
|
255
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
256
|
+
var r = arguments[t];
|
|
257
|
+
for (var n in r) {
|
|
258
|
+
if (Object.prototype.hasOwnProperty.call(r, n)) {
|
|
259
|
+
e[n] = r[n];
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
return e;
|
|
264
|
+
};
|
|
265
|
+
return N.apply(this, arguments);
|
|
266
|
+
}
|
|
267
|
+
function z(e, t) {
|
|
268
|
+
if (e == null) return {};
|
|
269
|
+
var r = L(e, t);
|
|
270
|
+
var n, o;
|
|
271
|
+
if (Object.getOwnPropertySymbols) {
|
|
272
|
+
var i = Object.getOwnPropertySymbols(e);
|
|
273
|
+
for (o = 0; o < i.length; o++) {
|
|
274
|
+
n = i[o];
|
|
275
|
+
if (t.indexOf(n) >= 0) continue;
|
|
276
|
+
if (!Object.prototype.propertyIsEnumerable.call(e, n)) continue;
|
|
277
|
+
r[n] = e[n];
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
return r;
|
|
281
|
+
}
|
|
282
|
+
function L(e, t) {
|
|
283
|
+
if (e == null) return {};
|
|
284
|
+
var r = {};
|
|
285
|
+
var n = Object.keys(e);
|
|
286
|
+
var o, i;
|
|
287
|
+
for (i = 0; i < n.length; i++) {
|
|
288
|
+
o = n[i];
|
|
289
|
+
if (t.indexOf(o) >= 0) continue;
|
|
290
|
+
r[o] = e[o];
|
|
291
|
+
}
|
|
292
|
+
return r;
|
|
293
|
+
}
|
|
294
|
+
var X = {
|
|
295
|
+
children: i().node
|
|
296
|
+
};
|
|
297
|
+
/**
|
|
293
298
|
* A styled container for `Modal` footer content.
|
|
294
|
-
*/
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
})
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
});
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
}),
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
}));
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
var
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
299
|
+
*/ function $(e) {
|
|
300
|
+
var t = e.children, o = z(e, [ "children" ]);
|
|
301
|
+
// @docs-props-type FooterPropsBase
|
|
302
|
+
var i = (0, r.useContext)(H), a = i.divider;
|
|
303
|
+
var l = a === "both" || a === "footer";
|
|
304
|
+
|
|
305
|
+
return n().createElement(n().Fragment, null, l && n().createElement(R(), {
|
|
306
|
+
"aria-hidden": true
|
|
307
|
+
}), n().createElement(A, N({
|
|
308
|
+
"data-test": "footer"
|
|
309
|
+
}, o), t));
|
|
310
|
+
}
|
|
311
|
+
$.propTypes = X;
|
|
312
|
+
/* harmony default export */ const K = $;
|
|
313
|
+
// CONCATENATED MODULE: external "@splunk/react-ui/CloseButton"
|
|
314
|
+
const U = require("@splunk/react-ui/CloseButton");
|
|
315
|
+
var W = e.n(U);
|
|
316
|
+
// CONCATENATED MODULE: ./src/Modal/HeaderStyles.ts
|
|
317
|
+
var V = h()(x()).withConfig({
|
|
318
|
+
displayName: "HeaderStyles__StyledBox",
|
|
319
|
+
componentId: "sc-1y722ut-0"
|
|
320
|
+
})([ "", ";flex:0 0 auto;position:relative;min-height:", ";background-color:", ";padding:", ";align-items:center;padding-right:", ";" ], O.mixins.reset("flex"), (0,
|
|
321
|
+
O.pick)({
|
|
322
|
+
enterprise: "30px",
|
|
323
|
+
prisma: {
|
|
324
|
+
comfortable: "60px",
|
|
325
|
+
compact: "52px"
|
|
326
|
+
}
|
|
327
|
+
}), (0, O.pick)({
|
|
328
|
+
enterprise: O.variables.backgroundColor,
|
|
329
|
+
prisma: O.variables.backgroundColorDialog
|
|
330
|
+
}), (0, O.pick)({
|
|
331
|
+
enterprise: "25px 28px",
|
|
332
|
+
prisma: {
|
|
333
|
+
comfortable: "18px 24px",
|
|
334
|
+
compact: "14px 24px"
|
|
335
|
+
}
|
|
336
|
+
}), (function(e) {
|
|
337
|
+
var t = e.$close;
|
|
338
|
+
return t && (0, O.pick)({
|
|
339
|
+
enterprise: "54px",
|
|
340
|
+
prisma: {
|
|
341
|
+
comfortable: "64px",
|
|
342
|
+
compact: "56px"
|
|
343
|
+
}
|
|
344
|
+
});
|
|
345
|
+
}));
|
|
346
|
+
var G = h().div.withConfig({
|
|
347
|
+
displayName: "HeaderStyles__StyledTitleWrapper",
|
|
348
|
+
componentId: "sc-1y722ut-1"
|
|
349
|
+
})([ "", ";flex-direction:column;" ], O.mixins.reset("flex"));
|
|
350
|
+
var J = h().div.withConfig({
|
|
351
|
+
displayName: "HeaderStyles__StyledIcon",
|
|
352
|
+
componentId: "sc-1y722ut-2"
|
|
353
|
+
})([ "", ";align-items:center;justify-content:center;margin-right:", ";", " width:", ";height:", ";flex-shrink:0;" ], O.mixins.reset("inline-flex"), O.variables.spacingLarge, (0,
|
|
354
|
+
O.pick)({
|
|
355
|
+
prisma: (0, v.css)([ "background-color:", ";" ], O.variables.transparent)
|
|
356
|
+
}), (0, O.pick)({
|
|
357
|
+
comfortable: "40px",
|
|
358
|
+
compact: "32px"
|
|
359
|
+
}), (0, O.pick)({
|
|
360
|
+
comfortable: "40px",
|
|
361
|
+
compact: "32px"
|
|
362
|
+
}));
|
|
363
|
+
var Q = h().div.withConfig({
|
|
364
|
+
displayName: "HeaderStyles__StyledTitle",
|
|
365
|
+
componentId: "sc-1y722ut-3"
|
|
366
|
+
})([ "", ";font-size:20px;margin:0;overflow-wrap:break-word;font-weight:", ";", "" ], O.mixins.reset("block"), O.variables.fontWeightSemiBold, (0,
|
|
367
|
+
O.pick)({
|
|
368
|
+
enterprise: (0, v.css)([ "line-height:22px;" ]),
|
|
369
|
+
prisma: (0, v.css)([ "color:", ";line-height:24px;" ], O.variables.contentColorActive)
|
|
370
|
+
}));
|
|
371
|
+
var Y = h().div.withConfig({
|
|
372
|
+
displayName: "HeaderStyles__StyledSubtitle",
|
|
373
|
+
componentId: "sc-1y722ut-4"
|
|
374
|
+
})([ "", ";font-size:14px;overflow-wrap:break-word;line-height:", ";" ], O.mixins.reset("block"), (0,
|
|
375
|
+
O.pick)({
|
|
376
|
+
enterprise: O.variables.lineHeight,
|
|
377
|
+
prisma: "20px"
|
|
378
|
+
}));
|
|
379
|
+
var Z = h().div.withConfig({
|
|
380
|
+
displayName: "HeaderStyles__StyledButtonsWrapper",
|
|
381
|
+
componentId: "sc-1y722ut-5"
|
|
382
|
+
})([ "", ";position:absolute;top:", ";right:", ";bottom:50%;", " max-height:35px;transform-origin:bottom right;transform:rotate(-90deg) translateX(100%);" ], O.mixins.reset("block"), (0,
|
|
383
|
+
O.pick)({
|
|
384
|
+
enterprise: 0,
|
|
385
|
+
prisma: {
|
|
386
|
+
comfortable: "-2px",
|
|
387
|
+
compact: "-6px"
|
|
388
|
+
}
|
|
389
|
+
}), (0, O.pick)({
|
|
390
|
+
enterprise: 0,
|
|
391
|
+
prisma: {
|
|
392
|
+
comfortable: "-2px",
|
|
393
|
+
compact: "-6px"
|
|
394
|
+
}
|
|
395
|
+
}), (0, O.pick)({
|
|
396
|
+
prisma: {
|
|
397
|
+
comfortable: (0, v.css)([ "min-height:35px;" ]),
|
|
398
|
+
compact: (0, v.css)([ "min-height:30px;" ])
|
|
399
|
+
}
|
|
400
|
+
}));
|
|
401
|
+
var ee = h().div.withConfig({
|
|
402
|
+
displayName: "HeaderStyles__StyledClose",
|
|
403
|
+
componentId: "sc-1y722ut-6"
|
|
404
|
+
})([ "", ";position:absolute;right:0;top:0;transform:rotate(90deg) translate(-50%,-50%);" ], O.mixins.reset("block"));
|
|
405
|
+
// CONCATENATED MODULE: ./src/Modal/Header.tsx
|
|
406
|
+
function te() {
|
|
407
|
+
te = Object.assign || function(e) {
|
|
408
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
409
|
+
var r = arguments[t];
|
|
410
|
+
for (var n in r) {
|
|
411
|
+
if (Object.prototype.hasOwnProperty.call(r, n)) {
|
|
412
|
+
e[n] = r[n];
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
return e;
|
|
417
|
+
};
|
|
418
|
+
return te.apply(this, arguments);
|
|
419
|
+
}
|
|
420
|
+
function re(e, t) {
|
|
421
|
+
if (e == null) return {};
|
|
422
|
+
var r = ne(e, t);
|
|
423
|
+
var n, o;
|
|
424
|
+
if (Object.getOwnPropertySymbols) {
|
|
425
|
+
var i = Object.getOwnPropertySymbols(e);
|
|
426
|
+
for (o = 0; o < i.length; o++) {
|
|
427
|
+
n = i[o];
|
|
428
|
+
if (t.indexOf(n) >= 0) continue;
|
|
429
|
+
if (!Object.prototype.propertyIsEnumerable.call(e, n)) continue;
|
|
430
|
+
r[n] = e[n];
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
return r;
|
|
434
|
+
}
|
|
435
|
+
function ne(e, t) {
|
|
436
|
+
if (e == null) return {};
|
|
437
|
+
var r = {};
|
|
438
|
+
var n = Object.keys(e);
|
|
439
|
+
var o, i;
|
|
440
|
+
for (i = 0; i < n.length; i++) {
|
|
441
|
+
o = n[i];
|
|
442
|
+
if (t.indexOf(o) >= 0) continue;
|
|
443
|
+
r[o] = e[o];
|
|
444
|
+
}
|
|
445
|
+
return r;
|
|
446
|
+
}
|
|
447
|
+
var oe = {
|
|
448
|
+
children: i().node,
|
|
449
|
+
icon: i().node,
|
|
450
|
+
onRequestClose: i().func,
|
|
451
|
+
subtitle: i().node,
|
|
452
|
+
title: i().string
|
|
453
|
+
};
|
|
454
|
+
/**
|
|
427
455
|
* A styled container for `Modal` header content.
|
|
428
|
-
*/
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
}
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
}));
|
|
475
|
-
|
|
476
|
-
// CONCATENATED MODULE: ./src/Modal/Modal.tsx
|
|
477
|
-
function Modal_extends() { Modal_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return Modal_extends.apply(this, arguments); }
|
|
478
|
-
|
|
479
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || Modal_unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
480
|
-
|
|
481
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
482
|
-
|
|
483
|
-
function Modal_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return Modal_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Modal_arrayLikeToArray(o, minLen); }
|
|
484
|
-
|
|
485
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
|
|
486
|
-
|
|
487
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return Modal_arrayLikeToArray(arr); }
|
|
488
|
-
|
|
489
|
-
function Modal_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
490
|
-
|
|
491
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
492
|
-
|
|
493
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
494
|
-
|
|
495
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
496
|
-
|
|
497
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
498
|
-
|
|
499
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
500
|
-
|
|
501
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
502
|
-
|
|
503
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
504
|
-
|
|
505
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
506
|
-
|
|
507
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
508
|
-
|
|
509
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
510
|
-
|
|
511
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
512
|
-
|
|
513
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
514
|
-
|
|
515
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
516
|
-
|
|
517
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
/** @public */
|
|
533
|
-
|
|
534
|
-
var Modal_propTypes = {
|
|
535
|
-
children: external_prop_types_default.a.node,
|
|
536
|
-
initialFocus: external_prop_types_default.a.oneOfType([external_prop_types_default.a.object, external_prop_types_default.a.oneOf(['first', 'container'])]),
|
|
537
|
-
onRequestClose: external_prop_types_default.a.func,
|
|
538
|
-
open: external_prop_types_default.a.bool,
|
|
539
|
-
divider: external_prop_types_default.a.oneOf(['header', 'footer', 'both', 'none'])
|
|
540
|
-
};
|
|
541
|
-
var defaultProps = {
|
|
542
|
-
initialFocus: 'first',
|
|
543
|
-
open: false,
|
|
544
|
-
divider: 'both'
|
|
545
|
-
};
|
|
546
|
-
|
|
547
|
-
var Modal_Modal = /*#__PURE__*/function (_Component) {
|
|
548
|
-
_inherits(Modal, _Component);
|
|
549
|
-
|
|
550
|
-
var _super = _createSuper(Modal);
|
|
551
|
-
|
|
552
|
-
// @docs-props-type ModalPropsBase
|
|
553
|
-
// this timeout ensures that the Modal is finished rendering before setting the focus
|
|
554
|
-
function Modal(props) {
|
|
555
|
-
var _this;
|
|
556
|
-
|
|
557
|
-
_classCallCheck(this, Modal);
|
|
558
|
-
|
|
559
|
-
_this = _super.call(this, props);
|
|
560
|
-
|
|
561
|
-
_defineProperty(_assertThisInitialized(_this), "el", null);
|
|
562
|
-
|
|
563
|
-
_defineProperty(_assertThisInitialized(_this), "initialFocusTimeoutId", undefined);
|
|
564
|
-
|
|
565
|
-
_defineProperty(_assertThisInitialized(_this), "initialFocus", null);
|
|
566
|
-
|
|
567
|
-
_defineProperty(_assertThisInitialized(_this), "headerTitleId", void 0);
|
|
568
|
-
|
|
569
|
-
_defineProperty(_assertThisInitialized(_this), "getDefaultMotionStyle", function () {
|
|
570
|
-
return {
|
|
571
|
-
top: 0
|
|
572
|
-
};
|
|
573
|
-
});
|
|
574
|
-
|
|
575
|
-
_defineProperty(_assertThisInitialized(_this), "getMotionStyle", function () {
|
|
576
|
-
if (_this.props.open) {
|
|
577
|
-
return {
|
|
578
|
-
top: 40
|
|
456
|
+
*/ function ie(e) {
|
|
457
|
+
var t = e.children, o = e.icon, i = e.onRequestClose, a = e.subtitle, l = e.title, c = re(e, [ "children", "icon", "onRequestClose", "subtitle", "title" ]);
|
|
458
|
+
// @docs-props-type StepPropsBase
|
|
459
|
+
var s = (0, r.useContext)(H), u = s.titleId, p = s.divider;
|
|
460
|
+
var f = p === "both" || p === "header";
|
|
461
|
+
|
|
462
|
+
return n().createElement(n().Fragment, null, n().createElement(V, te({
|
|
463
|
+
$close: !!i,
|
|
464
|
+
"data-test": "header"
|
|
465
|
+
}, c), o && n().createElement(J, null, o), l ? n().createElement(G, null, l && n().createElement(Q, {
|
|
466
|
+
id: u,
|
|
467
|
+
"data-test": "title"
|
|
468
|
+
}, l), a && n().createElement(Y, {
|
|
469
|
+
"data-test": "subtitle"
|
|
470
|
+
}, a)) : t, i && n().createElement(Z, null, i && n().createElement(ee, null, n().createElement(W(), {
|
|
471
|
+
onClick: i,
|
|
472
|
+
"data-test": "close"
|
|
473
|
+
})))), f && n().createElement(R(), {
|
|
474
|
+
"aria-hidden": true
|
|
475
|
+
}));
|
|
476
|
+
}
|
|
477
|
+
ie.propTypes = oe;
|
|
478
|
+
/* harmony default export */ const ae = ie;
|
|
479
|
+
// CONCATENATED MODULE: external "react-spring"
|
|
480
|
+
const le = require("react-spring");
|
|
481
|
+
// CONCATENATED MODULE: ./src/Modal/ModalStyles.ts
|
|
482
|
+
var ce = h()(le.animated.div).withConfig({
|
|
483
|
+
displayName: "ModalStyles__Styled",
|
|
484
|
+
componentId: "sc-5fn8ds-0"
|
|
485
|
+
})([ "", ";flex-direction:column;position:fixed;left:50%;transform:translateX(-50%);z-index:", ";", "" ], O.mixins.reset("flex"), O.variables.zindexModal, (0,
|
|
486
|
+
O.pick)({
|
|
487
|
+
enterprise: (0, v.css)([ "box-shadow:0 1px 5px ", ";max-height:calc(100vh - ", " * 4);max-width:calc(100vw - ", " * 4);" ], O.variables.black, O.variables.spacing, O.variables.spacing),
|
|
488
|
+
prisma: (0, v.css)([ "box-shadow:", ";max-height:calc(100vh - ", " * 4);max-width:calc(100vw - ", " * 4);border-radius:", ";overflow:hidden;" ], O.variables.modalShadow, O.variables.spacingXLarge, O.variables.spacingXLarge, O.variables.borderRadius)
|
|
489
|
+
}));
|
|
490
|
+
// CONCATENATED MODULE: ./src/Modal/Modal.tsx
|
|
491
|
+
function se() {
|
|
492
|
+
se = Object.assign || function(e) {
|
|
493
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
494
|
+
var r = arguments[t];
|
|
495
|
+
for (var n in r) {
|
|
496
|
+
if (Object.prototype.hasOwnProperty.call(r, n)) {
|
|
497
|
+
e[n] = r[n];
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
return e;
|
|
579
502
|
};
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
503
|
+
return se.apply(this, arguments);
|
|
504
|
+
}
|
|
505
|
+
function ue(e) {
|
|
506
|
+
return ye(e) || de(e) || fe(e) || pe();
|
|
507
|
+
}
|
|
508
|
+
function pe() {
|
|
509
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
510
|
+
}
|
|
511
|
+
function fe(e, t) {
|
|
512
|
+
if (!e) return;
|
|
513
|
+
if (typeof e === "string") return be(e, t);
|
|
514
|
+
var r = Object.prototype.toString.call(e).slice(8, -1);
|
|
515
|
+
if (r === "Object" && e.constructor) r = e.constructor.name;
|
|
516
|
+
if (r === "Map" || r === "Set") return Array.from(e);
|
|
517
|
+
if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return be(e, t);
|
|
518
|
+
}
|
|
519
|
+
function de(e) {
|
|
520
|
+
if (typeof Symbol !== "undefined" && Symbol.iterator in Object(e)) return Array.from(e);
|
|
521
|
+
}
|
|
522
|
+
function ye(e) {
|
|
523
|
+
if (Array.isArray(e)) return be(e);
|
|
524
|
+
}
|
|
525
|
+
function be(e, t) {
|
|
526
|
+
if (t == null || t > e.length) t = e.length;
|
|
527
|
+
for (var r = 0, n = new Array(t); r < t; r++) {
|
|
528
|
+
n[r] = e[r];
|
|
529
|
+
}
|
|
530
|
+
return n;
|
|
531
|
+
}
|
|
532
|
+
function me(e, t) {
|
|
533
|
+
var r = Object.keys(e);
|
|
534
|
+
if (Object.getOwnPropertySymbols) {
|
|
535
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
536
|
+
if (t) n = n.filter((function(t) {
|
|
537
|
+
return Object.getOwnPropertyDescriptor(e, t).enumerable;
|
|
538
|
+
}));
|
|
539
|
+
r.push.apply(r, n);
|
|
540
|
+
}
|
|
541
|
+
return r;
|
|
542
|
+
}
|
|
543
|
+
function ve(e) {
|
|
544
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
545
|
+
var r = arguments[t] != null ? arguments[t] : {};
|
|
546
|
+
if (t % 2) {
|
|
547
|
+
me(Object(r), true).forEach((function(t) {
|
|
548
|
+
_e(e, t, r[t]);
|
|
549
|
+
}));
|
|
550
|
+
} else if (Object.getOwnPropertyDescriptors) {
|
|
551
|
+
Object.defineProperties(e, Object.getOwnPropertyDescriptors(r));
|
|
552
|
+
} else {
|
|
553
|
+
me(Object(r)).forEach((function(t) {
|
|
554
|
+
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(r, t));
|
|
555
|
+
}));
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
return e;
|
|
559
|
+
}
|
|
560
|
+
function he(e) {
|
|
561
|
+
"@babel/helpers - typeof";
|
|
562
|
+
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
563
|
+
he = function e(t) {
|
|
564
|
+
return typeof t;
|
|
565
|
+
};
|
|
566
|
+
} else {
|
|
567
|
+
he = function e(t) {
|
|
568
|
+
return t && typeof Symbol === "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
569
|
+
};
|
|
570
|
+
}
|
|
571
|
+
return he(e);
|
|
572
|
+
}
|
|
573
|
+
function ge(e, t) {
|
|
574
|
+
if (!(e instanceof t)) {
|
|
575
|
+
throw new TypeError("Cannot call a class as a function");
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
function xe(e, t) {
|
|
579
|
+
for (var r = 0; r < t.length; r++) {
|
|
580
|
+
var n = t[r];
|
|
581
|
+
n.enumerable = n.enumerable || false;
|
|
582
|
+
n.configurable = true;
|
|
583
|
+
if ("value" in n) n.writable = true;
|
|
584
|
+
Object.defineProperty(e, n.key, n);
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
function Oe(e, t, r) {
|
|
588
|
+
if (t) xe(e.prototype, t);
|
|
589
|
+
if (r) xe(e, r);
|
|
590
|
+
return e;
|
|
591
|
+
}
|
|
592
|
+
function we(e, t) {
|
|
593
|
+
if (typeof t !== "function" && t !== null) {
|
|
594
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
595
|
+
}
|
|
596
|
+
e.prototype = Object.create(t && t.prototype, {
|
|
597
|
+
constructor: {
|
|
598
|
+
value: e,
|
|
599
|
+
writable: true,
|
|
600
|
+
configurable: true
|
|
616
601
|
}
|
|
617
|
-
|
|
618
|
-
_this.initialFocus = initialFocus;
|
|
619
|
-
}
|
|
620
602
|
});
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
}
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
}
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
style = _this$props3.style,
|
|
647
|
-
children = _this$props3.children,
|
|
648
|
-
divider = _this$props3.divider;
|
|
649
|
-
var top = interpolatedStyle.top,
|
|
650
|
-
opacity = interpolatedStyle.opacity;
|
|
651
|
-
var clonedChildren = external_react_["Children"].toArray(children).filter(external_react_["isValidElement"]);
|
|
652
|
-
return /*#__PURE__*/external_react_default.a.createElement(Styled // eslint-disable-line jsx-a11y/no-noninteractive-element-interactions
|
|
653
|
-
, Modal_extends({
|
|
654
|
-
ref: _this.handleModalMount,
|
|
655
|
-
"data-test": "modal",
|
|
656
|
-
style: _objectSpread(_objectSpread({}, style), {}, {
|
|
657
|
-
top: top,
|
|
658
|
-
opacity: opacity
|
|
659
|
-
}),
|
|
660
|
-
tabIndex: -1,
|
|
661
|
-
onKeyDown: _this.handleModalKeyDown,
|
|
662
|
-
role: "dialog",
|
|
663
|
-
"aria-labelledby": _this.headerTitleId
|
|
664
|
-
}, omit_default()(_this.props, [].concat(_toConsumableArray(keys_default()(Modal.propTypes)), ['style']))), /*#__PURE__*/external_react_default.a.createElement(Modal_ModalContext.Provider, {
|
|
665
|
-
value: {
|
|
666
|
-
titleId: _this.headerTitleId,
|
|
667
|
-
divider: divider
|
|
603
|
+
if (t) Se(e, t);
|
|
604
|
+
}
|
|
605
|
+
function Se(e, t) {
|
|
606
|
+
Se = Object.setPrototypeOf || function e(t, r) {
|
|
607
|
+
t.__proto__ = r;
|
|
608
|
+
return t;
|
|
609
|
+
};
|
|
610
|
+
return Se(e, t);
|
|
611
|
+
}
|
|
612
|
+
function ke(e) {
|
|
613
|
+
var t = Ie();
|
|
614
|
+
return function r() {
|
|
615
|
+
var n = Pe(e), o;
|
|
616
|
+
if (t) {
|
|
617
|
+
var i = Pe(this).constructor;
|
|
618
|
+
o = Reflect.construct(n, arguments, i);
|
|
619
|
+
} else {
|
|
620
|
+
o = n.apply(this, arguments);
|
|
621
|
+
}
|
|
622
|
+
return je(this, o);
|
|
623
|
+
};
|
|
624
|
+
}
|
|
625
|
+
function je(e, t) {
|
|
626
|
+
if (t && (he(t) === "object" || typeof t === "function")) {
|
|
627
|
+
return t;
|
|
668
628
|
}
|
|
669
|
-
|
|
670
|
-
}
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
}
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
//
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
629
|
+
return Ce(e);
|
|
630
|
+
}
|
|
631
|
+
function Ce(e) {
|
|
632
|
+
if (e === void 0) {
|
|
633
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
634
|
+
}
|
|
635
|
+
return e;
|
|
636
|
+
}
|
|
637
|
+
function Ie() {
|
|
638
|
+
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
639
|
+
if (Reflect.construct.sham) return false;
|
|
640
|
+
if (typeof Proxy === "function") return true;
|
|
641
|
+
try {
|
|
642
|
+
Date.prototype.toString.call(Reflect.construct(Date, [], (function() {})));
|
|
643
|
+
return true;
|
|
644
|
+
} catch (e) {
|
|
645
|
+
return false;
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
function Pe(e) {
|
|
649
|
+
Pe = Object.setPrototypeOf ? Object.getPrototypeOf : function e(t) {
|
|
650
|
+
return t.__proto__ || Object.getPrototypeOf(t);
|
|
651
|
+
};
|
|
652
|
+
return Pe(e);
|
|
653
|
+
}
|
|
654
|
+
function _e(e, t, r) {
|
|
655
|
+
if (t in e) {
|
|
656
|
+
Object.defineProperty(e, t, {
|
|
657
|
+
value: r,
|
|
658
|
+
enumerable: true,
|
|
659
|
+
configurable: true,
|
|
660
|
+
writable: true
|
|
661
|
+
});
|
|
662
|
+
} else {
|
|
663
|
+
e[t] = r;
|
|
664
|
+
}
|
|
665
|
+
return e;
|
|
666
|
+
}
|
|
667
|
+
/** @public */ var Ee = {
|
|
668
|
+
children: i().node,
|
|
669
|
+
initialFocus: i().oneOfType([ i().object, i().oneOf([ "first", "container" ]) ]),
|
|
670
|
+
onRequestClose: i().func,
|
|
671
|
+
open: i().bool,
|
|
672
|
+
divider: i().oneOf([ "header", "footer", "both", "none" ])
|
|
673
|
+
};
|
|
674
|
+
var Te = {
|
|
675
|
+
initialFocus: "first",
|
|
676
|
+
open: false,
|
|
677
|
+
divider: "both"
|
|
678
|
+
};
|
|
679
|
+
var Me = function(e) {
|
|
680
|
+
we(o, e);
|
|
681
|
+
var t = ke(o);
|
|
682
|
+
// @docs-props-type ModalPropsBase
|
|
683
|
+
// this timeout ensures that the Modal is finished rendering before setting the focus
|
|
684
|
+
function o(e) {
|
|
685
|
+
var i;
|
|
686
|
+
ge(this, o);
|
|
687
|
+
i = t.call(this, e);
|
|
688
|
+
_e(Ce(i), "el", null);
|
|
689
|
+
_e(Ce(i), "initialFocusTimeoutId", undefined);
|
|
690
|
+
_e(Ce(i), "initialFocus", null);
|
|
691
|
+
_e(Ce(i), "headerTitleId", void 0);
|
|
692
|
+
_e(Ce(i), "getDefaultMotionStyle", (function() {
|
|
693
|
+
return {
|
|
694
|
+
top: 0
|
|
695
|
+
};
|
|
696
|
+
}));
|
|
697
|
+
_e(Ce(i), "getMotionStyle", (function() {
|
|
698
|
+
if (i.props.open) {
|
|
699
|
+
return {
|
|
700
|
+
top: 40
|
|
701
|
+
};
|
|
702
|
+
}
|
|
703
|
+
return {
|
|
704
|
+
top: 0
|
|
705
|
+
};
|
|
706
|
+
}));
|
|
707
|
+
_e(Ce(i), "handleInitialFocus", (function() {
|
|
708
|
+
var e = i.props, t = e.initialFocus, r = e.open;
|
|
709
|
+
if (r) {
|
|
710
|
+
i.initialFocusTimeoutId = l()((function() {
|
|
711
|
+
var e;
|
|
712
|
+
// not using the takeFocus() util here because it
|
|
713
|
+
// doesn't work for all values of "initialFocus"
|
|
714
|
+
// and it has a nested defer() call, which we want to avoid
|
|
715
|
+
if (i.initialFocus !== t) {
|
|
716
|
+
if (t === "first") {
|
|
717
|
+
if (i.el) {
|
|
718
|
+
/* eslint-disable prefer-destructuring */
|
|
719
|
+
/* prefer-desturucting leads to harder-to-read syntax in this case */
|
|
720
|
+
e = (0, y.getSortedTabbableElements)(i.el)[0];
|
|
721
|
+
/* eslint-enable prefer-destructuring */ }
|
|
722
|
+
} else if (t === "container") {
|
|
723
|
+
e = i.el;
|
|
724
|
+
} else if (he(t) === "object") {
|
|
725
|
+
e = t;
|
|
726
|
+
}
|
|
727
|
+
// Typescript isn't happy with optional chaining here
|
|
728
|
+
if (e != null && "focus" in e) {
|
|
729
|
+
e.focus();
|
|
730
|
+
}
|
|
731
|
+
i.initialFocus = t;
|
|
732
|
+
}
|
|
733
|
+
}));
|
|
734
|
+
} else {
|
|
735
|
+
i.initialFocus = null;
|
|
736
|
+
clearTimeout(i.initialFocusTimeoutId);
|
|
737
|
+
}
|
|
738
|
+
}));
|
|
739
|
+
_e(Ce(i), "handleModalMount", (function(e) {
|
|
740
|
+
i.el = e;
|
|
741
|
+
}));
|
|
742
|
+
_e(Ce(i), "handleModalKeyDown", (function(e) {
|
|
743
|
+
if (i.el !== null) {
|
|
744
|
+
(0, y.handleTab)(i.el, e.nativeEvent);
|
|
745
|
+
}
|
|
746
|
+
}));
|
|
747
|
+
_e(Ce(i), "handleRequestClose", (function(e) {
|
|
748
|
+
var t, r;
|
|
749
|
+
i.initialFocus = null;
|
|
750
|
+
(t = (r = i.props).onRequestClose) === null || t === void 0 ? void 0 : t.call(r, e);
|
|
751
|
+
}));
|
|
752
|
+
_e(Ce(i), "renderModal", (function(e) {
|
|
753
|
+
var t = i.props, a = t.style, l = t.children, c = t.divider;
|
|
754
|
+
var u = e.top, f = e.opacity;
|
|
755
|
+
var d = r.Children.toArray(l).filter(r.isValidElement);
|
|
756
|
+
|
|
757
|
+
return n().createElement(ce, se({
|
|
758
|
+
ref: i.handleModalMount,
|
|
759
|
+
"data-test": "modal",
|
|
760
|
+
style: ve(ve({}, a), {}, {
|
|
761
|
+
top: u,
|
|
762
|
+
opacity: f
|
|
763
|
+
}),
|
|
764
|
+
tabIndex: -1,
|
|
765
|
+
onKeyDown: i.handleModalKeyDown,
|
|
766
|
+
role: "dialog",
|
|
767
|
+
"aria-labelledby": i.headerTitleId
|
|
768
|
+
}, p()(i.props, [].concat(ue(s()(o.propTypes)), [ "style" ]))), n().createElement(H.Provider, {
|
|
769
|
+
value: {
|
|
770
|
+
titleId: i.headerTitleId,
|
|
771
|
+
divider: c
|
|
772
|
+
}
|
|
773
|
+
}, d));
|
|
774
|
+
}));
|
|
775
|
+
i.headerTitleId = (0, b.createDOMID)("titleId");
|
|
776
|
+
return i;
|
|
777
|
+
}
|
|
778
|
+
Oe(o, [ {
|
|
779
|
+
key: "componentDidMount",
|
|
780
|
+
value: function e() {
|
|
781
|
+
this.handleInitialFocus();
|
|
782
|
+
}
|
|
783
|
+
}, {
|
|
784
|
+
key: "componentDidUpdate",
|
|
785
|
+
value: function e(t) {
|
|
786
|
+
var r = this.props.initialFocus;
|
|
787
|
+
if (t.initialFocus !== r) {
|
|
788
|
+
// cancel the defer() set up in handleInitialFocus()
|
|
789
|
+
// so that focus won't jump around if "initialFocus" changes
|
|
790
|
+
clearTimeout(this.initialFocusTimeoutId);
|
|
791
|
+
}
|
|
792
|
+
this.handleInitialFocus();
|
|
793
|
+
}
|
|
794
|
+
}, {
|
|
795
|
+
key: "render",
|
|
796
|
+
value: function e() {
|
|
797
|
+
|
|
798
|
+
return n().createElement(d(), {
|
|
799
|
+
open: this.props.open,
|
|
800
|
+
getDefaultMotionStyle: this.getDefaultMotionStyle,
|
|
801
|
+
renderModal: this.renderModal,
|
|
802
|
+
getMotionStyle: this.getMotionStyle,
|
|
803
|
+
onRequestClose: this.handleRequestClose
|
|
804
|
+
});
|
|
805
|
+
}
|
|
806
|
+
} ]);
|
|
807
|
+
return o;
|
|
808
|
+
}(r.Component);
|
|
809
|
+
_e(Me, "propTypes", Ee);
|
|
810
|
+
_e(Me, "defaultProps", Te);
|
|
811
|
+
_e(Me, "Header", ae);
|
|
812
|
+
_e(Me, "Body", F);
|
|
813
|
+
_e(Me, "Footer", K);
|
|
814
|
+
/* harmony default export */ const qe = Me;
|
|
815
|
+
// CONCATENATED MODULE: ./src/Modal/index.ts
|
|
816
|
+
module.exports = t;
|
|
817
|
+
/******/})();
|