@splunk/react-ui 4.19.0 → 4.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Accordion.js +114 -230
- package/Anchor.js +74 -150
- package/Animation.js +52 -124
- package/AnimationToggle.js +86 -146
- package/Box.js +77 -153
- package/Breadcrumbs.d.ts +2 -0
- package/Breadcrumbs.js +207 -0
- package/Button.js +168 -316
- package/ButtonGroup.js +84 -168
- package/ButtonSimple.js +224 -324
- package/CHANGELOG.md +35 -0
- package/Calendar.js +264 -462
- package/Card.js +223 -371
- package/CardLayout.js +87 -163
- package/Chip.js +199 -323
- package/Clickable.js +132 -248
- package/CloseButton.js +92 -200
- package/Code.js +188 -251
- package/CollapsiblePanel.js +214 -370
- package/Color.js +267 -495
- package/ColumnLayout.js +152 -254
- package/ComboBox.js +197 -371
- package/Concertina.js +214 -374
- package/ControlGroup.js +164 -288
- package/Date.js +154 -304
- package/DefinitionList.js +104 -180
- package/Divider.js +80 -156
- package/Dropdown.js +121 -263
- package/DualListbox.js +408 -601
- package/EventListener.js +70 -138
- package/File.js +343 -547
- package/FormRows.js +232 -414
- package/Heading.js +94 -164
- package/Image.js +167 -323
- package/JSONTree.js +166 -314
- package/Layer.js +221 -388
- package/Link.js +133 -239
- package/List.js +85 -161
- package/Markdown.js +230 -355
- package/Menu.js +396 -647
- package/Message.js +248 -437
- package/MessageBar.js +220 -408
- package/Modal.js +201 -365
- package/ModalLayer.js +96 -196
- package/Monogram.js +112 -204
- package/Multiselect.js +2675 -2807
- package/Number.js +178 -334
- package/Paginator.js +170 -336
- package/Paragraph.js +77 -153
- package/Popover.js +436 -623
- package/Progress.js +139 -255
- package/RadioBar.js +156 -280
- package/RadioList.js +182 -282
- package/Resize.js +173 -307
- package/ResultsMenu.js +183 -304
- package/ScreenReaderContent.js +75 -151
- package/Scroll.js +125 -267
- package/ScrollContainerContext.js +129 -201
- package/Search.js +188 -354
- package/Select.js +1243 -1248
- package/SidePanel.js +106 -214
- package/Slider.js +198 -348
- package/SlidingPanels.js +138 -280
- package/SplitButton.js +141 -273
- package/StaticContent.js +84 -168
- package/StepBar.js +138 -246
- package/Switch.js +261 -385
- package/TabBar.js +261 -398
- package/TabLayout.js +122 -238
- package/Table.js +975 -1447
- package/Text.js +335 -549
- package/TextArea.js +315 -537
- package/Tooltip.js +152 -292
- package/TransitionOpen.js +118 -242
- package/Typography.js +81 -157
- package/WaitSpinner.js +117 -209
- package/package.json +20 -21
- package/stubs-splunkui.d.ts +4 -1
- package/types/src/Breadcrumbs/Breadcrumbs.d.ts +25 -0
- package/types/src/Breadcrumbs/Item.d.ts +42 -0
- package/types/src/Breadcrumbs/docs/examples/Adornments.d.ts +2 -0
- package/types/src/Breadcrumbs/docs/examples/Basic.d.ts +2 -0
- package/types/src/Breadcrumbs/index.d.ts +2 -0
- package/types/src/Code/Code.d.ts +1 -1
- package/types/src/ComboBox/Option.d.ts +1 -1
- package/types/src/Concertina/Concertina.d.ts +4 -0
- package/types/src/Link/Link.d.ts +12 -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/Compact.d.ts +4 -0
- package/types/src/Multiselect/Multiselect.d.ts +5 -0
- package/types/src/Multiselect/Option.d.ts +1 -1
- package/types/src/Multiselect/docs/examples/CompactSelectAll.d.ts +2 -0
- 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/Select/SelectAllOption.d.ts +14 -0
- package/types/src/Select/SelectBase.d.ts +11 -3
- package/types/src/Table/Table.d.ts +4 -0
- package/types/src/Text/Text.d.ts +3 -3
- package/types/src/TextArea/TextArea.d.ts +3 -3
- package/types/src/fixtures/FetchOptions.d.ts +2 -8
- package/useForceUpdate.js +46 -110
- package/useKeyPress.js +50 -107
- package/usePrevious.js +47 -111
- package/useRovingFocus.js +53 -133
- package/types/src/Link/docs/examples/NewTab.d.ts +0 -2
- package/types/src/Typography/docs/examples/Variants.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,199 +1,116 @@
|
|
|
1
|
-
|
|
2
|
-
/******/
|
|
3
|
-
/******/ // The
|
|
4
|
-
/******/ var
|
|
5
|
-
/******/
|
|
6
|
-
|
|
7
|
-
/******/
|
|
8
|
-
/******/
|
|
9
|
-
/******/ //
|
|
10
|
-
/******/
|
|
11
|
-
/******/
|
|
12
|
-
/******/
|
|
13
|
-
/******/
|
|
14
|
-
/******/
|
|
15
|
-
/******/
|
|
16
|
-
/******/
|
|
17
|
-
/******/
|
|
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 });
|
|
18
44
|
/******/ };
|
|
19
|
-
/******/
|
|
20
|
-
/******/
|
|
21
|
-
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
22
|
-
/******/
|
|
23
|
-
/******/ // Flag the module as loaded
|
|
24
|
-
/******/ module.l = true;
|
|
25
|
-
/******/
|
|
26
|
-
/******/ // Return the exports of the module
|
|
27
|
-
/******/ return module.exports;
|
|
28
|
-
/******/ }
|
|
29
|
-
/******/
|
|
30
|
-
/******/
|
|
31
|
-
/******/ // expose the modules object (__webpack_modules__)
|
|
32
|
-
/******/ __webpack_require__.m = modules;
|
|
33
|
-
/******/
|
|
34
|
-
/******/ // expose the module cache
|
|
35
|
-
/******/ __webpack_require__.c = installedModules;
|
|
36
|
-
/******/
|
|
37
|
-
/******/ // define getter function for harmony exports
|
|
38
|
-
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
39
|
-
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
40
|
-
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
41
|
-
/******/ }
|
|
42
|
-
/******/ };
|
|
43
|
-
/******/
|
|
44
|
-
/******/ // define __esModule on exports
|
|
45
|
-
/******/ __webpack_require__.r = function(exports) {
|
|
46
|
-
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
47
|
-
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
48
|
-
/******/ }
|
|
49
|
-
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
50
|
-
/******/ };
|
|
51
|
-
/******/
|
|
52
|
-
/******/ // create a fake namespace object
|
|
53
|
-
/******/ // mode & 1: value is a module id, require it
|
|
54
|
-
/******/ // mode & 2: merge all properties of value into the ns
|
|
55
|
-
/******/ // mode & 4: return value when already ns object
|
|
56
|
-
/******/ // mode & 8|1: behave like require
|
|
57
|
-
/******/ __webpack_require__.t = function(value, mode) {
|
|
58
|
-
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
59
|
-
/******/ if(mode & 8) return value;
|
|
60
|
-
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
61
|
-
/******/ var ns = Object.create(null);
|
|
62
|
-
/******/ __webpack_require__.r(ns);
|
|
63
|
-
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
64
|
-
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
65
|
-
/******/ return ns;
|
|
66
|
-
/******/ };
|
|
67
|
-
/******/
|
|
68
|
-
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
69
|
-
/******/ __webpack_require__.n = function(module) {
|
|
70
|
-
/******/ var getter = module && module.__esModule ?
|
|
71
|
-
/******/ function getDefault() { return module['default']; } :
|
|
72
|
-
/******/ function getModuleExports() { return module; };
|
|
73
|
-
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
74
|
-
/******/ return getter;
|
|
75
|
-
/******/ };
|
|
76
|
-
/******/
|
|
77
|
-
/******/ // Object.prototype.hasOwnProperty.call
|
|
78
|
-
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
79
|
-
/******/
|
|
80
|
-
/******/ // __webpack_public_path__
|
|
81
|
-
/******/ __webpack_require__.p = "";
|
|
82
|
-
/******/
|
|
83
|
-
/******/
|
|
84
|
-
/******/ // Load entry module and return exports
|
|
85
|
-
/******/ return __webpack_require__(__webpack_require__.s = 174);
|
|
86
|
-
/******/ })
|
|
45
|
+
/******/ })();
|
|
46
|
+
/******/
|
|
87
47
|
/************************************************************************/
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
/***/ 0:
|
|
91
|
-
/***/ (function(module, exports) {
|
|
92
|
-
|
|
93
|
-
module.exports = require("@splunk/themes");
|
|
94
|
-
|
|
95
|
-
/***/ }),
|
|
96
|
-
|
|
97
|
-
/***/ 1:
|
|
98
|
-
/***/ (function(module, exports) {
|
|
99
|
-
|
|
100
|
-
module.exports = require("prop-types");
|
|
101
|
-
|
|
102
|
-
/***/ }),
|
|
103
|
-
|
|
104
|
-
/***/ 102:
|
|
105
|
-
/***/ (function(module, exports) {
|
|
106
|
-
|
|
107
|
-
module.exports = require("@splunk/react-ui/ModalLayer");
|
|
108
|
-
|
|
109
|
-
/***/ }),
|
|
110
|
-
|
|
111
|
-
/***/ 111:
|
|
112
|
-
/***/ (function(module, exports) {
|
|
113
|
-
|
|
114
|
-
module.exports = require("@splunk/react-ui/Divider");
|
|
115
|
-
|
|
116
|
-
/***/ }),
|
|
117
|
-
|
|
118
|
-
/***/ 174:
|
|
119
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
120
|
-
|
|
121
|
-
"use strict";
|
|
48
|
+
var __webpack_exports__ = {};
|
|
122
49
|
// ESM COMPAT FLAG
|
|
123
50
|
__webpack_require__.r(__webpack_exports__);
|
|
124
51
|
|
|
125
52
|
// EXPORTS
|
|
126
|
-
__webpack_require__.d(__webpack_exports__,
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
var external_react_ = __webpack_require__(2);
|
|
133
|
-
var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
|
|
134
|
-
|
|
135
|
-
// EXTERNAL MODULE: external "prop-types"
|
|
136
|
-
var external_prop_types_ = __webpack_require__(1);
|
|
137
|
-
var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_);
|
|
138
|
-
|
|
139
|
-
// EXTERNAL MODULE: external "lodash/defer"
|
|
140
|
-
var defer_ = __webpack_require__(55);
|
|
141
|
-
var defer_default = /*#__PURE__*/__webpack_require__.n(defer_);
|
|
142
|
-
|
|
143
|
-
// EXTERNAL MODULE: external "lodash/keys"
|
|
144
|
-
var keys_ = __webpack_require__(9);
|
|
145
|
-
var keys_default = /*#__PURE__*/__webpack_require__.n(keys_);
|
|
146
|
-
|
|
147
|
-
// EXTERNAL MODULE: external "lodash/omit"
|
|
148
|
-
var omit_ = __webpack_require__(5);
|
|
149
|
-
var omit_default = /*#__PURE__*/__webpack_require__.n(omit_);
|
|
150
|
-
|
|
151
|
-
// EXTERNAL MODULE: external "@splunk/react-ui/ModalLayer"
|
|
152
|
-
var ModalLayer_ = __webpack_require__(102);
|
|
153
|
-
var ModalLayer_default = /*#__PURE__*/__webpack_require__.n(ModalLayer_);
|
|
154
|
-
|
|
155
|
-
// EXTERNAL MODULE: external "@splunk/ui-utils/focus"
|
|
156
|
-
var focus_ = __webpack_require__(29);
|
|
157
|
-
|
|
158
|
-
// EXTERNAL MODULE: external "@splunk/ui-utils/id"
|
|
159
|
-
var id_ = __webpack_require__(8);
|
|
160
|
-
|
|
161
|
-
// EXTERNAL MODULE: external "@splunk/react-ui/ScrollContainerContext"
|
|
162
|
-
var ScrollContainerContext_ = __webpack_require__(50);
|
|
163
|
-
|
|
164
|
-
// EXTERNAL MODULE: external "styled-components"
|
|
165
|
-
var external_styled_components_ = __webpack_require__(3);
|
|
166
|
-
var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_);
|
|
167
|
-
|
|
168
|
-
// EXTERNAL MODULE: external "@splunk/react-ui/Box"
|
|
169
|
-
var Box_ = __webpack_require__(6);
|
|
170
|
-
var Box_default = /*#__PURE__*/__webpack_require__.n(Box_);
|
|
171
|
-
|
|
172
|
-
// EXTERNAL MODULE: external "@splunk/themes"
|
|
173
|
-
var themes_ = __webpack_require__(0);
|
|
174
|
-
|
|
175
|
-
// CONCATENATED MODULE: ./src/Modal/BodyStyles.ts
|
|
176
|
-
|
|
177
|
-
|
|
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
|
+
});
|
|
178
59
|
|
|
179
|
-
|
|
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({
|
|
180
97
|
displayName: "BodyStyles__StyledBox",
|
|
181
98
|
componentId: "lv54z7-0"
|
|
182
|
-
})(["background-color:", ";", " flex:0 1 auto;overflow:auto;@media all and (-ms-high-contrast:none){*::-ms-backdrop,&{max-height:calc(100vh - 180px);}}"],
|
|
183
|
-
enterprise:
|
|
184
|
-
prisma:
|
|
185
|
-
}),
|
|
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)({
|
|
186
103
|
enterprise: {
|
|
187
|
-
comfortable:
|
|
188
|
-
compact:
|
|
104
|
+
comfortable: (0,external_styled_components_namespaceObject.css)(["padding:28px;"]),
|
|
105
|
+
compact: (0,external_styled_components_namespaceObject.css)(["padding:24px;"])
|
|
189
106
|
},
|
|
190
107
|
prisma: {
|
|
191
|
-
comfortable:
|
|
192
|
-
compact:
|
|
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;}"])
|
|
193
110
|
}
|
|
194
111
|
}));
|
|
195
112
|
|
|
196
|
-
|
|
113
|
+
;// CONCATENATED MODULE: ./src/Modal/Body.tsx
|
|
197
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); }
|
|
198
115
|
|
|
199
116
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
@@ -217,7 +134,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
217
134
|
|
|
218
135
|
|
|
219
136
|
var propTypes = {
|
|
220
|
-
children: external_prop_types_default.
|
|
137
|
+
children: (external_prop_types_default()).node
|
|
221
138
|
};
|
|
222
139
|
|
|
223
140
|
/**
|
|
@@ -228,52 +145,51 @@ function Body(_ref) {
|
|
|
228
145
|
otherProps = _objectWithoutProperties(_ref, ["children"]);
|
|
229
146
|
|
|
230
147
|
// @docs-props-type BodyPropsBase
|
|
231
|
-
var _useState =
|
|
148
|
+
var _useState = (0,external_react_namespaceObject.useState)(),
|
|
232
149
|
_useState2 = _slicedToArray(_useState, 2),
|
|
233
150
|
scrollContainer = _useState2[0],
|
|
234
151
|
setScrollContainer = _useState2[1];
|
|
235
152
|
|
|
236
|
-
var scrollContainerRef =
|
|
153
|
+
var scrollContainerRef = (0,external_react_namespaceObject.useCallback)(function (el) {
|
|
237
154
|
setScrollContainer(el);
|
|
238
155
|
}, []);
|
|
239
|
-
return /*#__PURE__*/external_react_default.
|
|
156
|
+
return /*#__PURE__*/external_react_default().createElement(StyledBox, _extends({
|
|
240
157
|
"data-test": "body"
|
|
241
158
|
}, otherProps, {
|
|
242
159
|
elementRef: scrollContainerRef
|
|
243
|
-
}), /*#__PURE__*/external_react_default.
|
|
160
|
+
}), /*#__PURE__*/external_react_default().createElement(ScrollContainerContext_namespaceObject.ScrollContainerProvider, {
|
|
244
161
|
value: scrollContainer
|
|
245
162
|
}, children));
|
|
246
163
|
}
|
|
247
164
|
|
|
248
165
|
Body.propTypes = propTypes;
|
|
249
|
-
/* harmony default export */
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
var Divider_default = /*#__PURE__*/__webpack_require__.n(
|
|
253
|
-
|
|
254
|
-
// CONCATENATED MODULE: ./src/Modal/FooterStyles.ts
|
|
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
|
|
255
171
|
|
|
256
172
|
|
|
257
173
|
|
|
258
|
-
var FooterStyles_StyledBox = external_styled_components_default()(Box_default
|
|
174
|
+
var FooterStyles_StyledBox = external_styled_components_default()((Box_default())).withConfig({
|
|
259
175
|
displayName: "FooterStyles__StyledBox",
|
|
260
176
|
componentId: "yszcmv-0"
|
|
261
|
-
})(["flex:0 0 auto;text-align:right;padding:", ";background-color:", ";& > button{min-width:80px;}"],
|
|
262
|
-
enterprise:
|
|
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,
|
|
263
179
|
prisma: {
|
|
264
180
|
comfortable: '24px',
|
|
265
181
|
compact: '18px 24px'
|
|
266
182
|
}
|
|
267
|
-
}),
|
|
268
|
-
enterprise:
|
|
269
|
-
prisma:
|
|
183
|
+
}), (0,themes_namespaceObject.pick)({
|
|
184
|
+
enterprise: themes_namespaceObject.variables.backgroundColor,
|
|
185
|
+
prisma: themes_namespaceObject.variables.backgroundColorDialog
|
|
270
186
|
}));
|
|
271
187
|
|
|
272
|
-
|
|
188
|
+
;// CONCATENATED MODULE: ./src/Modal/ModalContext.tsx
|
|
273
189
|
|
|
274
|
-
var ModalContext = /*#__PURE__*/
|
|
275
|
-
/* harmony default export */
|
|
276
|
-
|
|
190
|
+
var ModalContext = /*#__PURE__*/(0,external_react_namespaceObject.createContext)({});
|
|
191
|
+
/* harmony default export */ const Modal_ModalContext = (ModalContext);
|
|
192
|
+
;// CONCATENATED MODULE: ./src/Modal/Footer.tsx
|
|
277
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); }
|
|
278
194
|
|
|
279
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; }
|
|
@@ -286,7 +202,7 @@ function Footer_objectWithoutPropertiesLoose(source, excluded) { if (source == n
|
|
|
286
202
|
|
|
287
203
|
|
|
288
204
|
var Footer_propTypes = {
|
|
289
|
-
children: external_prop_types_default.
|
|
205
|
+
children: (external_prop_types_default()).node
|
|
290
206
|
};
|
|
291
207
|
|
|
292
208
|
/**
|
|
@@ -297,40 +213,39 @@ function Footer(_ref) {
|
|
|
297
213
|
otherProps = Footer_objectWithoutProperties(_ref, ["children"]);
|
|
298
214
|
|
|
299
215
|
// @docs-props-type FooterPropsBase
|
|
300
|
-
var _useContext =
|
|
216
|
+
var _useContext = (0,external_react_namespaceObject.useContext)(Modal_ModalContext),
|
|
301
217
|
dividerContext = _useContext.divider;
|
|
302
218
|
|
|
303
219
|
var hasDivider = dividerContext === 'both' || dividerContext === 'footer';
|
|
304
|
-
return /*#__PURE__*/external_react_default.
|
|
220
|
+
return /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, hasDivider && /*#__PURE__*/external_react_default().createElement((Divider_default()), {
|
|
305
221
|
"aria-hidden": true
|
|
306
|
-
}), /*#__PURE__*/external_react_default.
|
|
222
|
+
}), /*#__PURE__*/external_react_default().createElement(FooterStyles_StyledBox, Footer_extends({
|
|
307
223
|
"data-test": "footer"
|
|
308
224
|
}, otherProps), children));
|
|
309
225
|
}
|
|
310
226
|
|
|
311
227
|
Footer.propTypes = Footer_propTypes;
|
|
312
|
-
/* harmony default export */
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
var CloseButton_default = /*#__PURE__*/__webpack_require__.n(
|
|
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
|
|
316
233
|
|
|
317
|
-
// CONCATENATED MODULE: ./src/Modal/HeaderStyles.ts
|
|
318
234
|
|
|
319
235
|
|
|
320
|
-
|
|
321
|
-
var HeaderStyles_StyledBox = external_styled_components_default()(Box_default.a).withConfig({
|
|
236
|
+
var HeaderStyles_StyledBox = external_styled_components_default()((Box_default())).withConfig({
|
|
322
237
|
displayName: "HeaderStyles__StyledBox",
|
|
323
238
|
componentId: "sc-1y722ut-0"
|
|
324
|
-
})(["", ";flex:0 0 auto;position:relative;min-height:", ";background-color:", ";padding:", ";align-items:center;padding-right:", ";"],
|
|
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)({
|
|
325
240
|
enterprise: '30px',
|
|
326
241
|
prisma: {
|
|
327
242
|
comfortable: '60px',
|
|
328
243
|
compact: '52px'
|
|
329
244
|
}
|
|
330
|
-
}),
|
|
331
|
-
enterprise:
|
|
332
|
-
prisma:
|
|
333
|
-
}),
|
|
245
|
+
}), (0,themes_namespaceObject.pick)({
|
|
246
|
+
enterprise: themes_namespaceObject.variables.backgroundColor,
|
|
247
|
+
prisma: themes_namespaceObject.variables.backgroundColorDialog
|
|
248
|
+
}), (0,themes_namespaceObject.pick)({
|
|
334
249
|
enterprise: '25px 28px',
|
|
335
250
|
prisma: {
|
|
336
251
|
comfortable: '18px 24px',
|
|
@@ -338,7 +253,7 @@ var HeaderStyles_StyledBox = external_styled_components_default()(Box_default.a)
|
|
|
338
253
|
}
|
|
339
254
|
}), function (_ref) {
|
|
340
255
|
var $close = _ref.$close;
|
|
341
|
-
return $close &&
|
|
256
|
+
return $close && (0,themes_namespaceObject.pick)({
|
|
342
257
|
enterprise: '54px',
|
|
343
258
|
prisma: {
|
|
344
259
|
comfortable: '64px',
|
|
@@ -346,63 +261,63 @@ var HeaderStyles_StyledBox = external_styled_components_default()(Box_default.a)
|
|
|
346
261
|
}
|
|
347
262
|
});
|
|
348
263
|
});
|
|
349
|
-
var StyledTitleWrapper = external_styled_components_default.
|
|
264
|
+
var StyledTitleWrapper = external_styled_components_default().div.withConfig({
|
|
350
265
|
displayName: "HeaderStyles__StyledTitleWrapper",
|
|
351
266
|
componentId: "sc-1y722ut-1"
|
|
352
|
-
})(["", ";flex-direction:column;"],
|
|
353
|
-
var StyledIcon = external_styled_components_default.
|
|
267
|
+
})(["", ";flex-direction:column;"], themes_namespaceObject.mixins.reset('flex'));
|
|
268
|
+
var StyledIcon = external_styled_components_default().div.withConfig({
|
|
354
269
|
displayName: "HeaderStyles__StyledIcon",
|
|
355
270
|
componentId: "sc-1y722ut-2"
|
|
356
|
-
})(["", ";align-items:center;justify-content:center;margin-right:", ";", " width:", ";height:", ";flex-shrink:0;"],
|
|
357
|
-
prisma:
|
|
358
|
-
}),
|
|
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)({
|
|
359
274
|
comfortable: '40px',
|
|
360
275
|
compact: '32px'
|
|
361
|
-
}),
|
|
276
|
+
}), (0,themes_namespaceObject.pick)({
|
|
362
277
|
comfortable: '40px',
|
|
363
278
|
compact: '32px'
|
|
364
279
|
}));
|
|
365
|
-
var StyledTitle = external_styled_components_default.
|
|
280
|
+
var StyledTitle = external_styled_components_default().div.withConfig({
|
|
366
281
|
displayName: "HeaderStyles__StyledTitle",
|
|
367
282
|
componentId: "sc-1y722ut-3"
|
|
368
|
-
})(["", ";font-size:20px;margin:0;overflow-wrap:break-word;font-weight:", ";", ""],
|
|
369
|
-
enterprise:
|
|
370
|
-
prisma:
|
|
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)
|
|
371
286
|
}));
|
|
372
|
-
var StyledSubtitle = external_styled_components_default.
|
|
287
|
+
var StyledSubtitle = external_styled_components_default().div.withConfig({
|
|
373
288
|
displayName: "HeaderStyles__StyledSubtitle",
|
|
374
289
|
componentId: "sc-1y722ut-4"
|
|
375
|
-
})(["", ";font-size:14px;overflow-wrap:break-word;line-height:", ";"],
|
|
376
|
-
enterprise:
|
|
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,
|
|
377
292
|
prisma: '20px'
|
|
378
293
|
}));
|
|
379
|
-
var StyledButtonsWrapper = external_styled_components_default.
|
|
294
|
+
var StyledButtonsWrapper = external_styled_components_default().div.withConfig({
|
|
380
295
|
displayName: "HeaderStyles__StyledButtonsWrapper",
|
|
381
296
|
componentId: "sc-1y722ut-5"
|
|
382
|
-
})(["", ";position:absolute;top:", ";right:", ";bottom:50%;", " max-height:35px;transform-origin:bottom right;transform:rotate(-90deg) translateX(100%);"],
|
|
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)({
|
|
383
298
|
enterprise: 0,
|
|
384
299
|
prisma: {
|
|
385
300
|
comfortable: '-2px',
|
|
386
301
|
compact: '-6px'
|
|
387
302
|
}
|
|
388
|
-
}),
|
|
303
|
+
}), (0,themes_namespaceObject.pick)({
|
|
389
304
|
enterprise: 0,
|
|
390
305
|
prisma: {
|
|
391
306
|
comfortable: '-2px',
|
|
392
307
|
compact: '-6px'
|
|
393
308
|
}
|
|
394
|
-
}),
|
|
309
|
+
}), (0,themes_namespaceObject.pick)({
|
|
395
310
|
prisma: {
|
|
396
|
-
comfortable:
|
|
397
|
-
compact:
|
|
311
|
+
comfortable: (0,external_styled_components_namespaceObject.css)(["min-height:35px;"]),
|
|
312
|
+
compact: (0,external_styled_components_namespaceObject.css)(["min-height:30px;"])
|
|
398
313
|
}
|
|
399
314
|
}));
|
|
400
|
-
var StyledClose = external_styled_components_default.
|
|
315
|
+
var StyledClose = external_styled_components_default().div.withConfig({
|
|
401
316
|
displayName: "HeaderStyles__StyledClose",
|
|
402
317
|
componentId: "sc-1y722ut-6"
|
|
403
|
-
})(["", ";position:absolute;right:0;top:0;transform:rotate(90deg) translate(-50%,-50%);"],
|
|
318
|
+
})(["", ";position:absolute;right:0;top:0;transform:rotate(90deg) translate(-50%,-50%);"], themes_namespaceObject.mixins.reset('block'));
|
|
404
319
|
|
|
405
|
-
|
|
320
|
+
;// CONCATENATED MODULE: ./src/Modal/Header.tsx
|
|
406
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); }
|
|
407
322
|
|
|
408
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; }
|
|
@@ -416,11 +331,11 @@ function Header_objectWithoutPropertiesLoose(source, excluded) { if (source == n
|
|
|
416
331
|
|
|
417
332
|
|
|
418
333
|
var Header_propTypes = {
|
|
419
|
-
children: external_prop_types_default.
|
|
420
|
-
icon: external_prop_types_default.
|
|
421
|
-
onRequestClose: external_prop_types_default.
|
|
422
|
-
subtitle: external_prop_types_default.
|
|
423
|
-
title: external_prop_types_default.
|
|
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
|
|
424
339
|
};
|
|
425
340
|
|
|
426
341
|
/**
|
|
@@ -435,45 +350,44 @@ function Header(_ref) {
|
|
|
435
350
|
otherProps = Header_objectWithoutProperties(_ref, ["children", "icon", "onRequestClose", "subtitle", "title"]);
|
|
436
351
|
|
|
437
352
|
// @docs-props-type StepPropsBase
|
|
438
|
-
var _useContext =
|
|
353
|
+
var _useContext = (0,external_react_namespaceObject.useContext)(Modal_ModalContext),
|
|
439
354
|
titleIdContext = _useContext.titleId,
|
|
440
355
|
dividerContext = _useContext.divider;
|
|
441
356
|
|
|
442
357
|
var hasDivider = dividerContext === 'both' || dividerContext === 'header';
|
|
443
|
-
return /*#__PURE__*/external_react_default.
|
|
358
|
+
return /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, /*#__PURE__*/external_react_default().createElement(HeaderStyles_StyledBox, Header_extends({
|
|
444
359
|
$close: !!onRequestClose,
|
|
445
360
|
"data-test": "header"
|
|
446
|
-
}, otherProps), icon && /*#__PURE__*/external_react_default.
|
|
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, {
|
|
447
362
|
id: titleIdContext,
|
|
448
363
|
"data-test": "title"
|
|
449
|
-
}, title), subtitle && /*#__PURE__*/external_react_default.
|
|
364
|
+
}, title), subtitle && /*#__PURE__*/external_react_default().createElement(StyledSubtitle, {
|
|
450
365
|
"data-test": "subtitle"
|
|
451
|
-
}, subtitle)) : children, onRequestClose && /*#__PURE__*/external_react_default.
|
|
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()), {
|
|
452
367
|
onClick: onRequestClose,
|
|
453
368
|
"data-test": "close"
|
|
454
|
-
})))), hasDivider && /*#__PURE__*/external_react_default.
|
|
369
|
+
})))), hasDivider && /*#__PURE__*/external_react_default().createElement((Divider_default()), {
|
|
455
370
|
"aria-hidden": true
|
|
456
371
|
}));
|
|
457
372
|
}
|
|
458
373
|
|
|
459
374
|
Header.propTypes = Header_propTypes;
|
|
460
|
-
/* harmony default export */
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
// CONCATENATED MODULE: ./src/Modal/ModalStyles.ts
|
|
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
|
|
465
379
|
|
|
466
380
|
|
|
467
381
|
|
|
468
|
-
var Styled = external_styled_components_default()(
|
|
382
|
+
var Styled = external_styled_components_default()(external_react_spring_namespaceObject.animated.div).withConfig({
|
|
469
383
|
displayName: "ModalStyles__Styled",
|
|
470
384
|
componentId: "sc-5fn8ds-0"
|
|
471
|
-
})(["", ";flex-direction:column;position:fixed;left:50%;transform:translateX(-50%);z-index:", ";", ""],
|
|
472
|
-
enterprise:
|
|
473
|
-
prisma:
|
|
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)
|
|
474
388
|
}));
|
|
475
389
|
|
|
476
|
-
|
|
390
|
+
;// CONCATENATED MODULE: ./src/Modal/Modal.tsx
|
|
477
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); }
|
|
478
392
|
|
|
479
393
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || Modal_unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
@@ -532,11 +446,11 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
532
446
|
/** @public */
|
|
533
447
|
|
|
534
448
|
var Modal_propTypes = {
|
|
535
|
-
children: external_prop_types_default.
|
|
536
|
-
initialFocus: external_prop_types_default.
|
|
537
|
-
onRequestClose: external_prop_types_default.
|
|
538
|
-
open: external_prop_types_default.
|
|
539
|
-
divider: external_prop_types_default.
|
|
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'])
|
|
540
454
|
};
|
|
541
455
|
var defaultProps = {
|
|
542
456
|
initialFocus: 'first',
|
|
@@ -544,7 +458,7 @@ var defaultProps = {
|
|
|
544
458
|
divider: 'both'
|
|
545
459
|
};
|
|
546
460
|
|
|
547
|
-
var
|
|
461
|
+
var Modal = /*#__PURE__*/function (_Component) {
|
|
548
462
|
_inherits(Modal, _Component);
|
|
549
463
|
|
|
550
464
|
var _super = _createSuper(Modal);
|
|
@@ -601,7 +515,7 @@ var Modal_Modal = /*#__PURE__*/function (_Component) {
|
|
|
601
515
|
/* eslint-disable prefer-destructuring */
|
|
602
516
|
|
|
603
517
|
/* prefer-desturucting leads to harder-to-read syntax in this case */
|
|
604
|
-
focusTarget =
|
|
518
|
+
focusTarget = (0,focus_namespaceObject.getSortedTabbableElements)(_this.el)[0];
|
|
605
519
|
/* eslint-enable prefer-destructuring */
|
|
606
520
|
}
|
|
607
521
|
} else if (initialFocus === 'container') {
|
|
@@ -630,7 +544,7 @@ var Modal_Modal = /*#__PURE__*/function (_Component) {
|
|
|
630
544
|
|
|
631
545
|
_defineProperty(_assertThisInitialized(_this), "handleModalKeyDown", function (e) {
|
|
632
546
|
if (_this.el !== null) {
|
|
633
|
-
|
|
547
|
+
(0,focus_namespaceObject.handleTab)(_this.el, e.nativeEvent);
|
|
634
548
|
}
|
|
635
549
|
});
|
|
636
550
|
|
|
@@ -648,8 +562,8 @@ var Modal_Modal = /*#__PURE__*/function (_Component) {
|
|
|
648
562
|
divider = _this$props3.divider;
|
|
649
563
|
var top = interpolatedStyle.top,
|
|
650
564
|
opacity = interpolatedStyle.opacity;
|
|
651
|
-
var clonedChildren =
|
|
652
|
-
return /*#__PURE__*/external_react_default.
|
|
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
|
|
653
567
|
, Modal_extends({
|
|
654
568
|
ref: _this.handleModalMount,
|
|
655
569
|
"data-test": "modal",
|
|
@@ -661,7 +575,7 @@ var Modal_Modal = /*#__PURE__*/function (_Component) {
|
|
|
661
575
|
onKeyDown: _this.handleModalKeyDown,
|
|
662
576
|
role: "dialog",
|
|
663
577
|
"aria-labelledby": _this.headerTitleId
|
|
664
|
-
}, omit_default()(_this.props, [].concat(_toConsumableArray(keys_default()(Modal.propTypes)), ['style']))), /*#__PURE__*/external_react_default.
|
|
578
|
+
}, omit_default()(_this.props, [].concat(_toConsumableArray(keys_default()(Modal.propTypes)), ['style']))), /*#__PURE__*/external_react_default().createElement(Modal_ModalContext.Provider, {
|
|
665
579
|
value: {
|
|
666
580
|
titleId: _this.headerTitleId,
|
|
667
581
|
divider: divider
|
|
@@ -669,7 +583,7 @@ var Modal_Modal = /*#__PURE__*/function (_Component) {
|
|
|
669
583
|
}, clonedChildren));
|
|
670
584
|
});
|
|
671
585
|
|
|
672
|
-
_this.headerTitleId =
|
|
586
|
+
_this.headerTitleId = (0,id_namespaceObject.createDOMID)('titleId');
|
|
673
587
|
return _this;
|
|
674
588
|
}
|
|
675
589
|
|
|
@@ -694,7 +608,7 @@ var Modal_Modal = /*#__PURE__*/function (_Component) {
|
|
|
694
608
|
}, {
|
|
695
609
|
key: "render",
|
|
696
610
|
value: function render() {
|
|
697
|
-
return /*#__PURE__*/external_react_default.
|
|
611
|
+
return /*#__PURE__*/external_react_default().createElement((ModalLayer_default()), {
|
|
698
612
|
open: this.props.open,
|
|
699
613
|
getDefaultMotionStyle: this.getDefaultMotionStyle,
|
|
700
614
|
renderModal: this.renderModal,
|
|
@@ -705,101 +619,23 @@ var Modal_Modal = /*#__PURE__*/function (_Component) {
|
|
|
705
619
|
}]);
|
|
706
620
|
|
|
707
621
|
return Modal;
|
|
708
|
-
}(
|
|
709
|
-
|
|
710
|
-
_defineProperty(Modal_Modal, "propTypes", Modal_propTypes);
|
|
711
|
-
|
|
712
|
-
_defineProperty(Modal_Modal, "defaultProps", defaultProps);
|
|
713
|
-
|
|
714
|
-
_defineProperty(Modal_Modal, "Header", Modal_Header);
|
|
715
|
-
|
|
716
|
-
_defineProperty(Modal_Modal, "Body", Modal_Body);
|
|
717
|
-
|
|
718
|
-
_defineProperty(Modal_Modal, "Footer", Modal_Footer);
|
|
719
|
-
|
|
720
|
-
/* harmony default export */ var src_Modal_Modal = (Modal_Modal);
|
|
721
|
-
|
|
722
|
-
// CONCATENATED MODULE: ./src/Modal/index.ts
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
/***/ }),
|
|
727
|
-
|
|
728
|
-
/***/ 2:
|
|
729
|
-
/***/ (function(module, exports) {
|
|
730
|
-
|
|
731
|
-
module.exports = require("react");
|
|
732
|
-
|
|
733
|
-
/***/ }),
|
|
734
|
-
|
|
735
|
-
/***/ 24:
|
|
736
|
-
/***/ (function(module, exports) {
|
|
737
|
-
|
|
738
|
-
module.exports = require("react-spring");
|
|
739
|
-
|
|
740
|
-
/***/ }),
|
|
741
|
-
|
|
742
|
-
/***/ 29:
|
|
743
|
-
/***/ (function(module, exports) {
|
|
744
|
-
|
|
745
|
-
module.exports = require("@splunk/ui-utils/focus");
|
|
746
|
-
|
|
747
|
-
/***/ }),
|
|
748
|
-
|
|
749
|
-
/***/ 3:
|
|
750
|
-
/***/ (function(module, exports) {
|
|
751
|
-
|
|
752
|
-
module.exports = require("styled-components");
|
|
753
|
-
|
|
754
|
-
/***/ }),
|
|
755
|
-
|
|
756
|
-
/***/ 5:
|
|
757
|
-
/***/ (function(module, exports) {
|
|
758
|
-
|
|
759
|
-
module.exports = require("lodash/omit");
|
|
760
|
-
|
|
761
|
-
/***/ }),
|
|
762
|
-
|
|
763
|
-
/***/ 50:
|
|
764
|
-
/***/ (function(module, exports) {
|
|
765
|
-
|
|
766
|
-
module.exports = require("@splunk/react-ui/ScrollContainerContext");
|
|
767
|
-
|
|
768
|
-
/***/ }),
|
|
769
|
-
|
|
770
|
-
/***/ 55:
|
|
771
|
-
/***/ (function(module, exports) {
|
|
772
|
-
|
|
773
|
-
module.exports = require("lodash/defer");
|
|
774
|
-
|
|
775
|
-
/***/ }),
|
|
776
|
-
|
|
777
|
-
/***/ 6:
|
|
778
|
-
/***/ (function(module, exports) {
|
|
779
|
-
|
|
780
|
-
module.exports = require("@splunk/react-ui/Box");
|
|
781
|
-
|
|
782
|
-
/***/ }),
|
|
783
|
-
|
|
784
|
-
/***/ 8:
|
|
785
|
-
/***/ (function(module, exports) {
|
|
622
|
+
}(external_react_namespaceObject.Component);
|
|
786
623
|
|
|
787
|
-
|
|
624
|
+
_defineProperty(Modal, "propTypes", Modal_propTypes);
|
|
788
625
|
|
|
789
|
-
|
|
626
|
+
_defineProperty(Modal, "defaultProps", defaultProps);
|
|
790
627
|
|
|
791
|
-
|
|
792
|
-
/***/ (function(module, exports) {
|
|
628
|
+
_defineProperty(Modal, "Header", Modal_Header);
|
|
793
629
|
|
|
794
|
-
|
|
630
|
+
_defineProperty(Modal, "Body", Modal_Body);
|
|
795
631
|
|
|
796
|
-
|
|
632
|
+
_defineProperty(Modal, "Footer", Modal_Footer);
|
|
797
633
|
|
|
798
|
-
|
|
799
|
-
/***/ (function(module, exports) {
|
|
634
|
+
/* harmony default export */ const Modal_Modal = (Modal);
|
|
800
635
|
|
|
801
|
-
|
|
636
|
+
;// CONCATENATED MODULE: ./src/Modal/index.ts
|
|
802
637
|
|
|
803
|
-
/***/ })
|
|
804
638
|
|
|
805
|
-
|
|
639
|
+
module.exports = __webpack_exports__;
|
|
640
|
+
/******/ })()
|
|
641
|
+
;
|