@splunk/react-ui 4.21.0 → 4.22.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.
Files changed (92) hide show
  1. package/Accordion.js +425 -325
  2. package/Anchor.js +147 -117
  3. package/Animation.js +142 -94
  4. package/AnimationToggle.js +197 -193
  5. package/Box.js +145 -118
  6. package/Breadcrumbs.js +288 -206
  7. package/Button.js +488 -465
  8. package/ButtonGroup.js +160 -128
  9. package/ButtonSimple.js +543 -462
  10. package/CHANGELOG.md +24 -3
  11. package/Calendar.js +1111 -1001
  12. package/Card.js +771 -598
  13. package/CardLayout.js +205 -147
  14. package/Chip.js +509 -488
  15. package/Clickable.js +414 -352
  16. package/CloseButton.js +165 -142
  17. package/Code.js +1807 -2084
  18. package/CollapsiblePanel.js +586 -519
  19. package/Color.js +1068 -1068
  20. package/ColumnLayout.js +402 -363
  21. package/ComboBox.js +903 -794
  22. package/Concertina.js +997 -802
  23. package/ControlGroup.js +687 -594
  24. package/Date.js +567 -547
  25. package/DefinitionList.js +308 -234
  26. package/Divider.js +149 -118
  27. package/Dropdown.js +459 -416
  28. package/DualListbox.js +1479 -1541
  29. package/EventListener.js +94 -97
  30. package/File.js +1051 -969
  31. package/FormRows.js +883 -696
  32. package/Heading.js +216 -193
  33. package/Image.js +446 -402
  34. package/JSONTree.js +690 -551
  35. package/Layer.js +437 -410
  36. package/Link.js +336 -255
  37. package/List.js +213 -161
  38. package/Markdown.js +509 -487
  39. package/Menu.js +1104 -1056
  40. package/Message.js +475 -441
  41. package/MessageBar.js +387 -373
  42. package/Modal.js +810 -634
  43. package/ModalLayer.js +326 -243
  44. package/Monogram.js +308 -276
  45. package/Multiselect.js +3564 -3364
  46. package/Number.js +729 -687
  47. package/Paginator.js +510 -449
  48. package/Paragraph.js +145 -112
  49. package/Popover.js +1459 -1432
  50. package/Progress.js +301 -246
  51. package/RadioBar.js +634 -527
  52. package/RadioList.js +483 -444
  53. package/Resize.js +530 -489
  54. package/ResultsMenu.js +479 -455
  55. package/ScreenReaderContent.js +142 -111
  56. package/Scroll.js +595 -456
  57. package/ScrollContainerContext.js +197 -206
  58. package/Search.js +756 -650
  59. package/Select.js +2446 -2345
  60. package/SidePanel.js +390 -284
  61. package/Slider.js +680 -676
  62. package/SlidingPanels.js +639 -503
  63. package/SplitButton.js +464 -367
  64. package/StaticContent.js +161 -133
  65. package/StepBar.js +386 -358
  66. package/Switch.js +710 -640
  67. package/TabBar.js +741 -680
  68. package/TabLayout.js +406 -322
  69. package/Table.js +4974 -4616
  70. package/Text.js +1170 -1138
  71. package/TextArea.js +1102 -1090
  72. package/Tooltip.js +624 -581
  73. package/TransitionOpen.js +489 -422
  74. package/Typography.js +176 -153
  75. package/WaitSpinner.js +230 -206
  76. package/package.json +7 -7
  77. package/types/src/Color/Color.d.ts +0 -1
  78. package/types/src/JSONTree/JSONTreeContext.d.ts +7 -0
  79. package/types/src/JSONTree/TreeNode.d.ts +5 -0
  80. package/types/src/RadioBar/RadioBar.d.ts +1 -0
  81. package/types/src/ResultsMenu/ResultsMenu.d.ts +0 -2
  82. package/types/src/Select/docs/examples/Icons.d.ts +1 -9
  83. package/types/src/Slider/Slider.d.ts +1 -0
  84. package/types/src/TabBar/Tab.d.ts +10 -1
  85. package/types/src/TabBar/TabBar.d.ts +4 -2
  86. package/types/src/Table/Head.d.ts +7 -3
  87. package/types/src/Table/Table.d.ts +3 -2
  88. package/types/src/Table/TableContext.d.ts +2 -0
  89. package/useForceUpdate.js +112 -82
  90. package/useKeyPress.js +74 -71
  91. package/usePrevious.js +65 -65
  92. package/useRovingFocus.js +122 -138
package/Modal.js CHANGED
@@ -1,641 +1,817 @@
1
- /******/ (() => { // webpackBootstrap
2
- /******/ "use strict";
3
- /******/ // The require scope
4
- /******/ var __webpack_require__ = {};
5
- /******/
6
- /************************************************************************/
7
- /******/ /* webpack/runtime/compat get default export */
8
- /******/ (() => {
9
- /******/ // getDefaultExport function for compatibility with non-harmony modules
10
- /******/ __webpack_require__.n = (module) => {
11
- /******/ var getter = module && module.__esModule ?
12
- /******/ () => (module['default']) :
13
- /******/ () => (module);
14
- /******/ __webpack_require__.d(getter, { a: getter });
15
- /******/ return getter;
16
- /******/ };
17
- /******/ })();
18
- /******/
19
- /******/ /* webpack/runtime/define property getters */
20
- /******/ (() => {
21
- /******/ // define getter functions for harmony exports
22
- /******/ __webpack_require__.d = (exports, definition) => {
23
- /******/ for(var key in definition) {
24
- /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
25
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
26
- /******/ }
27
- /******/ }
28
- /******/ };
29
- /******/ })();
30
- /******/
31
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
32
- /******/ (() => {
33
- /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
34
- /******/ })();
35
- /******/
36
- /******/ /* webpack/runtime/make namespace object */
37
- /******/ (() => {
38
- /******/ // define __esModule on exports
39
- /******/ __webpack_require__.r = (exports) => {
40
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
41
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
42
- /******/ }
43
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
44
- /******/ };
45
- /******/ })();
46
- /******/
47
- /************************************************************************/
48
- var __webpack_exports__ = {};
49
- // ESM COMPAT FLAG
50
- __webpack_require__.r(__webpack_exports__);
51
-
52
- // EXPORTS
53
- __webpack_require__.d(__webpack_exports__, {
54
- Body: () => (/* reexport */ Modal_Body),
55
- Footer: () => (/* reexport */ Modal_Footer),
56
- Header: () => (/* reexport */ Modal_Header),
57
- "default": () => (/* reexport */ Modal_Modal)
58
- });
59
-
60
- ;// CONCATENATED MODULE: external "react"
61
- const external_react_namespaceObject = require("react");
62
- var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_namespaceObject);
63
- ;// CONCATENATED MODULE: external "prop-types"
64
- const external_prop_types_namespaceObject = require("prop-types");
65
- var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_namespaceObject);
66
- ;// CONCATENATED MODULE: external "lodash/defer"
67
- const defer_namespaceObject = require("lodash/defer");
68
- var defer_default = /*#__PURE__*/__webpack_require__.n(defer_namespaceObject);
69
- ;// CONCATENATED MODULE: external "lodash/keys"
70
- const keys_namespaceObject = require("lodash/keys");
71
- var keys_default = /*#__PURE__*/__webpack_require__.n(keys_namespaceObject);
72
- ;// CONCATENATED MODULE: external "lodash/omit"
73
- const omit_namespaceObject = require("lodash/omit");
74
- var omit_default = /*#__PURE__*/__webpack_require__.n(omit_namespaceObject);
75
- ;// CONCATENATED MODULE: external "@splunk/react-ui/ModalLayer"
76
- const ModalLayer_namespaceObject = require("@splunk/react-ui/ModalLayer");
77
- var ModalLayer_default = /*#__PURE__*/__webpack_require__.n(ModalLayer_namespaceObject);
78
- ;// CONCATENATED MODULE: external "@splunk/ui-utils/focus"
79
- const focus_namespaceObject = require("@splunk/ui-utils/focus");
80
- ;// CONCATENATED MODULE: external "@splunk/ui-utils/id"
81
- const id_namespaceObject = require("@splunk/ui-utils/id");
82
- ;// CONCATENATED MODULE: external "@splunk/react-ui/ScrollContainerContext"
83
- const ScrollContainerContext_namespaceObject = require("@splunk/react-ui/ScrollContainerContext");
84
- ;// CONCATENATED MODULE: external "styled-components"
85
- const external_styled_components_namespaceObject = require("styled-components");
86
- var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_namespaceObject);
87
- ;// CONCATENATED MODULE: external "@splunk/react-ui/Box"
88
- const Box_namespaceObject = require("@splunk/react-ui/Box");
89
- var Box_default = /*#__PURE__*/__webpack_require__.n(Box_namespaceObject);
90
- ;// CONCATENATED MODULE: external "@splunk/themes"
91
- const themes_namespaceObject = require("@splunk/themes");
92
- ;// CONCATENATED MODULE: ./src/Modal/BodyStyles.ts
93
-
94
-
95
-
96
- var StyledBox = external_styled_components_default()((Box_default())).withConfig({
97
- displayName: "BodyStyles__StyledBox",
98
- componentId: "lv54z7-0"
99
- })(["background-color:", ";", " flex:0 1 auto;overflow:auto;@media all and (-ms-high-contrast:none){*::-ms-backdrop,&{max-height:calc(100vh - 180px);}}"], (0,themes_namespaceObject.pick)({
100
- enterprise: themes_namespaceObject.variables.backgroundColor,
101
- prisma: themes_namespaceObject.variables.backgroundColorDialog
102
- }), (0,themes_namespaceObject.pick)({
103
- enterprise: {
104
- comfortable: (0,external_styled_components_namespaceObject.css)(["padding:28px;"]),
105
- compact: (0,external_styled_components_namespaceObject.css)(["padding:24px;"])
106
- },
107
- prisma: {
108
- comfortable: (0,external_styled_components_namespaceObject.css)(["padding:12px 24px;&:first-child{padding-top:36px;}&:last-child{padding-bottom:36px;}"]),
109
- compact: (0,external_styled_components_namespaceObject.css)(["padding:8px 24px;&:first-child{padding-top:26px;}&:last-child{padding-bottom:26px;}"])
110
- }
111
- }));
112
-
113
- ;// CONCATENATED MODULE: ./src/Modal/Body.tsx
114
- function _extends() { _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 _extends.apply(this, arguments); }
115
-
116
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
117
-
118
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
119
-
120
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _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 _arrayLikeToArray(o, minLen); }
121
-
122
- function _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; }
123
-
124
- function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
125
-
126
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
127
-
128
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
129
-
130
- 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; }
131
-
132
-
133
-
134
-
135
-
136
- var propTypes = {
137
- children: (external_prop_types_default()).node
138
- };
139
-
140
- /**
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
+ /**
141
212
  * A styled container for `Modal` body content.
142
- */
143
- function Body(_ref) {
144
- var children = _ref.children,
145
- otherProps = _objectWithoutProperties(_ref, ["children"]);
146
-
147
- // @docs-props-type BodyPropsBase
148
- var _useState = (0,external_react_namespaceObject.useState)(),
149
- _useState2 = _slicedToArray(_useState, 2),
150
- scrollContainer = _useState2[0],
151
- setScrollContainer = _useState2[1];
152
-
153
- var scrollContainerRef = (0,external_react_namespaceObject.useCallback)(function (el) {
154
- setScrollContainer(el);
155
- }, []);
156
- return /*#__PURE__*/external_react_default().createElement(StyledBox, _extends({
157
- "data-test": "body"
158
- }, otherProps, {
159
- elementRef: scrollContainerRef
160
- }), /*#__PURE__*/external_react_default().createElement(ScrollContainerContext_namespaceObject.ScrollContainerProvider, {
161
- value: scrollContainer
162
- }, children));
163
- }
164
-
165
- Body.propTypes = propTypes;
166
- /* harmony default export */ const Modal_Body = (Body);
167
- ;// CONCATENATED MODULE: external "@splunk/react-ui/Divider"
168
- const Divider_namespaceObject = require("@splunk/react-ui/Divider");
169
- var Divider_default = /*#__PURE__*/__webpack_require__.n(Divider_namespaceObject);
170
- ;// CONCATENATED MODULE: ./src/Modal/FooterStyles.ts
171
-
172
-
173
-
174
- var FooterStyles_StyledBox = external_styled_components_default()((Box_default())).withConfig({
175
- displayName: "FooterStyles__StyledBox",
176
- componentId: "yszcmv-0"
177
- })(["flex:0 0 auto;text-align:right;padding:", ";background-color:", ";& > button{min-width:80px;}"], (0,themes_namespaceObject.pick)({
178
- enterprise: themes_namespaceObject.variables.spacing,
179
- prisma: {
180
- comfortable: '24px',
181
- compact: '18px 24px'
182
- }
183
- }), (0,themes_namespaceObject.pick)({
184
- enterprise: themes_namespaceObject.variables.backgroundColor,
185
- prisma: themes_namespaceObject.variables.backgroundColorDialog
186
- }));
187
-
188
- ;// CONCATENATED MODULE: ./src/Modal/ModalContext.tsx
189
-
190
- var ModalContext = /*#__PURE__*/(0,external_react_namespaceObject.createContext)({});
191
- /* harmony default export */ const Modal_ModalContext = (ModalContext);
192
- ;// CONCATENATED MODULE: ./src/Modal/Footer.tsx
193
- function Footer_extends() { Footer_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 Footer_extends.apply(this, arguments); }
194
-
195
- function Footer_objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = Footer_objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
196
-
197
- function Footer_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; }
198
-
199
-
200
-
201
-
202
-
203
-
204
- var Footer_propTypes = {
205
- children: (external_prop_types_default()).node
206
- };
207
-
208
- /**
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
+ /**
209
298
  * A styled container for `Modal` footer content.
210
- */
211
- function Footer(_ref) {
212
- var children = _ref.children,
213
- otherProps = Footer_objectWithoutProperties(_ref, ["children"]);
214
-
215
- // @docs-props-type FooterPropsBase
216
- var _useContext = (0,external_react_namespaceObject.useContext)(Modal_ModalContext),
217
- dividerContext = _useContext.divider;
218
-
219
- var hasDivider = dividerContext === 'both' || dividerContext === 'footer';
220
- return /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, hasDivider && /*#__PURE__*/external_react_default().createElement((Divider_default()), {
221
- "aria-hidden": true
222
- }), /*#__PURE__*/external_react_default().createElement(FooterStyles_StyledBox, Footer_extends({
223
- "data-test": "footer"
224
- }, otherProps), children));
225
- }
226
-
227
- Footer.propTypes = Footer_propTypes;
228
- /* harmony default export */ const Modal_Footer = (Footer);
229
- ;// CONCATENATED MODULE: external "@splunk/react-ui/CloseButton"
230
- const CloseButton_namespaceObject = require("@splunk/react-ui/CloseButton");
231
- var CloseButton_default = /*#__PURE__*/__webpack_require__.n(CloseButton_namespaceObject);
232
- ;// CONCATENATED MODULE: ./src/Modal/HeaderStyles.ts
233
-
234
-
235
-
236
- var HeaderStyles_StyledBox = external_styled_components_default()((Box_default())).withConfig({
237
- displayName: "HeaderStyles__StyledBox",
238
- componentId: "sc-1y722ut-0"
239
- })(["", ";flex:0 0 auto;position:relative;min-height:", ";background-color:", ";padding:", ";align-items:center;padding-right:", ";"], themes_namespaceObject.mixins.reset('flex'), (0,themes_namespaceObject.pick)({
240
- enterprise: '30px',
241
- prisma: {
242
- comfortable: '60px',
243
- compact: '52px'
244
- }
245
- }), (0,themes_namespaceObject.pick)({
246
- enterprise: themes_namespaceObject.variables.backgroundColor,
247
- prisma: themes_namespaceObject.variables.backgroundColorDialog
248
- }), (0,themes_namespaceObject.pick)({
249
- enterprise: '25px 28px',
250
- prisma: {
251
- comfortable: '18px 24px',
252
- compact: '14px 24px'
253
- }
254
- }), function (_ref) {
255
- var $close = _ref.$close;
256
- return $close && (0,themes_namespaceObject.pick)({
257
- enterprise: '54px',
258
- prisma: {
259
- comfortable: '64px',
260
- compact: '56px'
261
- }
262
- });
263
- });
264
- var StyledTitleWrapper = external_styled_components_default().div.withConfig({
265
- displayName: "HeaderStyles__StyledTitleWrapper",
266
- componentId: "sc-1y722ut-1"
267
- })(["", ";flex-direction:column;"], themes_namespaceObject.mixins.reset('flex'));
268
- var StyledIcon = external_styled_components_default().div.withConfig({
269
- displayName: "HeaderStyles__StyledIcon",
270
- componentId: "sc-1y722ut-2"
271
- })(["", ";align-items:center;justify-content:center;margin-right:", ";", " width:", ";height:", ";flex-shrink:0;"], themes_namespaceObject.mixins.reset('inline-flex'), themes_namespaceObject.variables.spacingLarge, (0,themes_namespaceObject.pick)({
272
- prisma: (0,external_styled_components_namespaceObject.css)(["background-color:", ";"], themes_namespaceObject.variables.transparent)
273
- }), (0,themes_namespaceObject.pick)({
274
- comfortable: '40px',
275
- compact: '32px'
276
- }), (0,themes_namespaceObject.pick)({
277
- comfortable: '40px',
278
- compact: '32px'
279
- }));
280
- var StyledTitle = external_styled_components_default().div.withConfig({
281
- displayName: "HeaderStyles__StyledTitle",
282
- componentId: "sc-1y722ut-3"
283
- })(["", ";font-size:20px;margin:0;overflow-wrap:break-word;font-weight:", ";", ""], themes_namespaceObject.mixins.reset('block'), themes_namespaceObject.variables.fontWeightSemiBold, (0,themes_namespaceObject.pick)({
284
- enterprise: (0,external_styled_components_namespaceObject.css)(["line-height:22px;"]),
285
- prisma: (0,external_styled_components_namespaceObject.css)(["color:", ";line-height:24px;"], themes_namespaceObject.variables.contentColorActive)
286
- }));
287
- var StyledSubtitle = external_styled_components_default().div.withConfig({
288
- displayName: "HeaderStyles__StyledSubtitle",
289
- componentId: "sc-1y722ut-4"
290
- })(["", ";font-size:14px;overflow-wrap:break-word;line-height:", ";"], themes_namespaceObject.mixins.reset('block'), (0,themes_namespaceObject.pick)({
291
- enterprise: themes_namespaceObject.variables.lineHeight,
292
- prisma: '20px'
293
- }));
294
- var StyledButtonsWrapper = external_styled_components_default().div.withConfig({
295
- displayName: "HeaderStyles__StyledButtonsWrapper",
296
- componentId: "sc-1y722ut-5"
297
- })(["", ";position:absolute;top:", ";right:", ";bottom:50%;", " max-height:35px;transform-origin:bottom right;transform:rotate(-90deg) translateX(100%);"], themes_namespaceObject.mixins.reset('block'), (0,themes_namespaceObject.pick)({
298
- enterprise: 0,
299
- prisma: {
300
- comfortable: '-2px',
301
- compact: '-6px'
302
- }
303
- }), (0,themes_namespaceObject.pick)({
304
- enterprise: 0,
305
- prisma: {
306
- comfortable: '-2px',
307
- compact: '-6px'
308
- }
309
- }), (0,themes_namespaceObject.pick)({
310
- prisma: {
311
- comfortable: (0,external_styled_components_namespaceObject.css)(["min-height:35px;"]),
312
- compact: (0,external_styled_components_namespaceObject.css)(["min-height:30px;"])
313
- }
314
- }));
315
- var StyledClose = external_styled_components_default().div.withConfig({
316
- displayName: "HeaderStyles__StyledClose",
317
- componentId: "sc-1y722ut-6"
318
- })(["", ";position:absolute;right:0;top:0;transform:rotate(90deg) translate(-50%,-50%);"], themes_namespaceObject.mixins.reset('block'));
319
-
320
- ;// CONCATENATED MODULE: ./src/Modal/Header.tsx
321
- function Header_extends() { Header_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 Header_extends.apply(this, arguments); }
322
-
323
- function Header_objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = Header_objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
324
-
325
- function Header_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; }
326
-
327
-
328
-
329
-
330
-
331
-
332
-
333
- var Header_propTypes = {
334
- children: (external_prop_types_default()).node,
335
- icon: (external_prop_types_default()).node,
336
- onRequestClose: (external_prop_types_default()).func,
337
- subtitle: (external_prop_types_default()).node,
338
- title: (external_prop_types_default()).string
339
- };
340
-
341
- /**
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
+ /**
342
455
  * A styled container for `Modal` header content.
343
- */
344
- function Header(_ref) {
345
- var children = _ref.children,
346
- icon = _ref.icon,
347
- onRequestClose = _ref.onRequestClose,
348
- subtitle = _ref.subtitle,
349
- title = _ref.title,
350
- otherProps = Header_objectWithoutProperties(_ref, ["children", "icon", "onRequestClose", "subtitle", "title"]);
351
-
352
- // @docs-props-type StepPropsBase
353
- var _useContext = (0,external_react_namespaceObject.useContext)(Modal_ModalContext),
354
- titleIdContext = _useContext.titleId,
355
- dividerContext = _useContext.divider;
356
-
357
- var hasDivider = dividerContext === 'both' || dividerContext === 'header';
358
- return /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, /*#__PURE__*/external_react_default().createElement(HeaderStyles_StyledBox, Header_extends({
359
- $close: !!onRequestClose,
360
- "data-test": "header"
361
- }, otherProps), icon && /*#__PURE__*/external_react_default().createElement(StyledIcon, null, icon), title ? /*#__PURE__*/external_react_default().createElement(StyledTitleWrapper, null, title && /*#__PURE__*/external_react_default().createElement(StyledTitle, {
362
- id: titleIdContext,
363
- "data-test": "title"
364
- }, title), subtitle && /*#__PURE__*/external_react_default().createElement(StyledSubtitle, {
365
- "data-test": "subtitle"
366
- }, subtitle)) : children, onRequestClose && /*#__PURE__*/external_react_default().createElement(StyledButtonsWrapper, null, onRequestClose && /*#__PURE__*/external_react_default().createElement(StyledClose, null, /*#__PURE__*/external_react_default().createElement((CloseButton_default()), {
367
- onClick: onRequestClose,
368
- "data-test": "close"
369
- })))), hasDivider && /*#__PURE__*/external_react_default().createElement((Divider_default()), {
370
- "aria-hidden": true
371
- }));
372
- }
373
-
374
- Header.propTypes = Header_propTypes;
375
- /* harmony default export */ const Modal_Header = (Header);
376
- ;// CONCATENATED MODULE: external "react-spring"
377
- const external_react_spring_namespaceObject = require("react-spring");
378
- ;// CONCATENATED MODULE: ./src/Modal/ModalStyles.ts
379
-
380
-
381
-
382
- var Styled = external_styled_components_default()(external_react_spring_namespaceObject.animated.div).withConfig({
383
- displayName: "ModalStyles__Styled",
384
- componentId: "sc-5fn8ds-0"
385
- })(["", ";flex-direction:column;position:fixed;left:50%;transform:translateX(-50%);z-index:", ";", ""], themes_namespaceObject.mixins.reset('flex'), themes_namespaceObject.variables.zindexModal, (0,themes_namespaceObject.pick)({
386
- enterprise: (0,external_styled_components_namespaceObject.css)(["box-shadow:0 1px 5px ", ";max-height:calc(100vh - ", " * 4);max-width:calc(100vw - ", " * 4);"], themes_namespaceObject.variables.black, themes_namespaceObject.variables.spacing, themes_namespaceObject.variables.spacing),
387
- prisma: (0,external_styled_components_namespaceObject.css)(["box-shadow:", ";max-height:calc(100vh - ", " * 4);max-width:calc(100vw - ", " * 4);border-radius:", ";overflow:hidden;"], themes_namespaceObject.variables.modalShadow, themes_namespaceObject.variables.spacingXLarge, themes_namespaceObject.variables.spacingXLarge, themes_namespaceObject.variables.borderRadius)
388
- }));
389
-
390
- ;// CONCATENATED MODULE: ./src/Modal/Modal.tsx
391
- 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); }
392
-
393
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || Modal_unsupportedIterableToArray(arr) || _nonIterableSpread(); }
394
-
395
- 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."); }
396
-
397
- 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); }
398
-
399
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
400
-
401
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return Modal_arrayLikeToArray(arr); }
402
-
403
- 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; }
404
-
405
- 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; }
406
-
407
- 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; }
408
-
409
- 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); }
410
-
411
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
412
-
413
- 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); } }
414
-
415
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
416
-
417
- 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); }
418
-
419
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
420
-
421
- 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); }; }
422
-
423
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
424
-
425
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
426
-
427
- 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; } }
428
-
429
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
430
-
431
- 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; }
432
-
433
-
434
-
435
-
436
-
437
-
438
-
439
-
440
-
441
-
442
-
443
-
444
-
445
-
446
- /** @public */
447
-
448
- var Modal_propTypes = {
449
- children: (external_prop_types_default()).node,
450
- initialFocus: external_prop_types_default().oneOfType([(external_prop_types_default()).object, external_prop_types_default().oneOf(['first', 'container'])]),
451
- onRequestClose: (external_prop_types_default()).func,
452
- open: (external_prop_types_default()).bool,
453
- divider: external_prop_types_default().oneOf(['header', 'footer', 'both', 'none'])
454
- };
455
- var defaultProps = {
456
- initialFocus: 'first',
457
- open: false,
458
- divider: 'both'
459
- };
460
-
461
- var Modal = /*#__PURE__*/function (_Component) {
462
- _inherits(Modal, _Component);
463
-
464
- var _super = _createSuper(Modal);
465
-
466
- // @docs-props-type ModalPropsBase
467
- // this timeout ensures that the Modal is finished rendering before setting the focus
468
- function Modal(props) {
469
- var _this;
470
-
471
- _classCallCheck(this, Modal);
472
-
473
- _this = _super.call(this, props);
474
-
475
- _defineProperty(_assertThisInitialized(_this), "el", null);
476
-
477
- _defineProperty(_assertThisInitialized(_this), "initialFocusTimeoutId", undefined);
478
-
479
- _defineProperty(_assertThisInitialized(_this), "initialFocus", null);
480
-
481
- _defineProperty(_assertThisInitialized(_this), "headerTitleId", void 0);
482
-
483
- _defineProperty(_assertThisInitialized(_this), "getDefaultMotionStyle", function () {
484
- return {
485
- top: 0
486
- };
487
- });
488
-
489
- _defineProperty(_assertThisInitialized(_this), "getMotionStyle", function () {
490
- if (_this.props.open) {
491
- return {
492
- 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;
493
502
  };
494
- }
495
-
496
- return {
497
- top: 0
498
- };
499
- });
500
-
501
- _defineProperty(_assertThisInitialized(_this), "handleInitialFocus", function () {
502
- var _this$props = _this.props,
503
- initialFocus = _this$props.initialFocus,
504
- open = _this$props.open;
505
-
506
- if (open) {
507
- _this.initialFocusTimeoutId = defer_default()(function () {
508
- var focusTarget; // not using the takeFocus() util here because it
509
- // doesn't work for all values of "initialFocus"
510
- // and it has a nested defer() call, which we want to avoid
511
-
512
- if (_this.initialFocus !== initialFocus) {
513
- if (initialFocus === 'first') {
514
- if (_this.el) {
515
- /* eslint-disable prefer-destructuring */
516
-
517
- /* prefer-desturucting leads to harder-to-read syntax in this case */
518
- focusTarget = (0,focus_namespaceObject.getSortedTabbableElements)(_this.el)[0];
519
- /* eslint-enable prefer-destructuring */
520
- }
521
- } else if (initialFocus === 'container') {
522
- focusTarget = _this.el;
523
- } else if (_typeof(initialFocus) === 'object') {
524
- focusTarget = initialFocus;
525
- } // Typescript isn't happy with optional chaining here
526
-
527
-
528
- if (focusTarget != null && 'focus' in focusTarget) {
529
- focusTarget.focus();
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
530
601
  }
531
-
532
- _this.initialFocus = initialFocus;
533
- }
534
602
  });
535
- } else {
536
- _this.initialFocus = null;
537
- clearTimeout(_this.initialFocusTimeoutId);
538
- }
539
- });
540
-
541
- _defineProperty(_assertThisInitialized(_this), "handleModalMount", function (element) {
542
- _this.el = element;
543
- });
544
-
545
- _defineProperty(_assertThisInitialized(_this), "handleModalKeyDown", function (e) {
546
- if (_this.el !== null) {
547
- (0,focus_namespaceObject.handleTab)(_this.el, e.nativeEvent);
548
- }
549
- });
550
-
551
- _defineProperty(_assertThisInitialized(_this), "handleRequestClose", function (e) {
552
- var _this$props$onRequest, _this$props2;
553
-
554
- _this.initialFocus = null;
555
- (_this$props$onRequest = (_this$props2 = _this.props).onRequestClose) === null || _this$props$onRequest === void 0 ? void 0 : _this$props$onRequest.call(_this$props2, e);
556
- });
557
-
558
- _defineProperty(_assertThisInitialized(_this), "renderModal", function (interpolatedStyle) {
559
- var _this$props3 = _this.props,
560
- style = _this$props3.style,
561
- children = _this$props3.children,
562
- divider = _this$props3.divider;
563
- var top = interpolatedStyle.top,
564
- opacity = interpolatedStyle.opacity;
565
- var clonedChildren = external_react_namespaceObject.Children.toArray(children).filter(external_react_namespaceObject.isValidElement);
566
- return /*#__PURE__*/external_react_default().createElement(Styled // eslint-disable-line jsx-a11y/no-noninteractive-element-interactions
567
- , Modal_extends({
568
- ref: _this.handleModalMount,
569
- "data-test": "modal",
570
- style: _objectSpread(_objectSpread({}, style), {}, {
571
- top: top,
572
- opacity: opacity
573
- }),
574
- tabIndex: -1,
575
- onKeyDown: _this.handleModalKeyDown,
576
- role: "dialog",
577
- "aria-labelledby": _this.headerTitleId
578
- }, omit_default()(_this.props, [].concat(_toConsumableArray(keys_default()(Modal.propTypes)), ['style']))), /*#__PURE__*/external_react_default().createElement(Modal_ModalContext.Provider, {
579
- value: {
580
- titleId: _this.headerTitleId,
581
- 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;
582
628
  }
583
- }, clonedChildren));
584
- });
585
-
586
- _this.headerTitleId = (0,id_namespaceObject.createDOMID)('titleId');
587
- return _this;
588
- }
589
-
590
- _createClass(Modal, [{
591
- key: "componentDidMount",
592
- value: function componentDidMount() {
593
- this.handleInitialFocus();
594
- }
595
- }, {
596
- key: "componentDidUpdate",
597
- value: function componentDidUpdate(prevProps) {
598
- var initialFocus = this.props.initialFocus;
599
-
600
- if (prevProps.initialFocus !== initialFocus) {
601
- // cancel the defer() set up in handleInitialFocus()
602
- // so that focus won't jump around if "initialFocus" changes
603
- clearTimeout(this.initialFocusTimeoutId);
604
- }
605
-
606
- this.handleInitialFocus();
607
- }
608
- }, {
609
- key: "render",
610
- value: function render() {
611
- return /*#__PURE__*/external_react_default().createElement((ModalLayer_default()), {
612
- open: this.props.open,
613
- getDefaultMotionStyle: this.getDefaultMotionStyle,
614
- renderModal: this.renderModal,
615
- getMotionStyle: this.getMotionStyle,
616
- onRequestClose: this.handleRequestClose
617
- });
618
- }
619
- }]);
620
-
621
- return Modal;
622
- }(external_react_namespaceObject.Component);
623
-
624
- _defineProperty(Modal, "propTypes", Modal_propTypes);
625
-
626
- _defineProperty(Modal, "defaultProps", defaultProps);
627
-
628
- _defineProperty(Modal, "Header", Modal_Header);
629
-
630
- _defineProperty(Modal, "Body", Modal_Body);
631
-
632
- _defineProperty(Modal, "Footer", Modal_Footer);
633
-
634
- /* harmony default export */ const Modal_Modal = (Modal);
635
-
636
- ;// CONCATENATED MODULE: ./src/Modal/index.ts
637
-
638
-
639
- module.exports = __webpack_exports__;
640
- /******/ })()
641
- ;
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
+ /******/})();