@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/Popover.js
CHANGED
|
@@ -1,339 +1,117 @@
|
|
|
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
|
+
/******/ }
|
|
18
28
|
/******/ };
|
|
19
|
-
/******/
|
|
20
|
-
/******/
|
|
21
|
-
/******/
|
|
22
|
-
/******/
|
|
23
|
-
/******/
|
|
24
|
-
/******/
|
|
25
|
-
/******/
|
|
26
|
-
/******/
|
|
27
|
-
/******/
|
|
28
|
-
/******/
|
|
29
|
-
/******/
|
|
30
|
-
/******/
|
|
31
|
-
/******/
|
|
32
|
-
/******/
|
|
33
|
-
/******/
|
|
34
|
-
/******/
|
|
35
|
-
/******/
|
|
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 = 186);
|
|
86
|
-
/******/ })
|
|
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
|
+
/******/
|
|
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
|
-
/***/ 10:
|
|
105
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
106
|
-
|
|
107
|
-
"use strict";
|
|
108
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return updateReactRef; });
|
|
109
|
-
/**
|
|
110
|
-
* Updates a React ref. Callback refs and object refs (from `createRef` and `useRef`) are supported.
|
|
111
|
-
*
|
|
112
|
-
* @param ref - The React callback or object ref. Can be `null` or `undefined`.
|
|
113
|
-
* @param current - The new value of the ref.
|
|
114
|
-
*/
|
|
115
|
-
function updateReactRef(ref, current) {
|
|
116
|
-
if (ref) {
|
|
117
|
-
if (typeof ref === 'function') {
|
|
118
|
-
ref(current);
|
|
119
|
-
} else {
|
|
120
|
-
// the public signature of this util uses React.Ref<T> to mirror the way React types refs.
|
|
121
|
-
// the intention here is to signal "we will take care of setting 'current', not you".
|
|
122
|
-
ref.current = current; // eslint-disable-line no-param-reassign
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
/***/ }),
|
|
130
|
-
|
|
131
|
-
/***/ 11:
|
|
132
|
-
/***/ (function(module, exports) {
|
|
133
|
-
|
|
134
|
-
module.exports = require("lodash/has");
|
|
135
|
-
|
|
136
|
-
/***/ }),
|
|
137
|
-
|
|
138
|
-
/***/ 148:
|
|
139
|
-
/***/ (function(module, exports) {
|
|
140
|
-
|
|
141
|
-
module.exports = require("lodash/clamp");
|
|
142
|
-
|
|
143
|
-
/***/ }),
|
|
144
|
-
|
|
145
|
-
/***/ 149:
|
|
146
|
-
/***/ (function(module, exports) {
|
|
147
|
-
|
|
148
|
-
module.exports = require("lodash/every");
|
|
149
|
-
|
|
150
|
-
/***/ }),
|
|
151
|
-
|
|
152
|
-
/***/ 15:
|
|
153
|
-
/***/ (function(module, exports) {
|
|
154
|
-
|
|
155
|
-
module.exports = require("lodash/includes");
|
|
156
|
-
|
|
157
|
-
/***/ }),
|
|
158
|
-
|
|
159
|
-
/***/ 150:
|
|
160
|
-
/***/ (function(module, exports) {
|
|
161
|
-
|
|
162
|
-
module.exports = require("lodash/intersection");
|
|
163
|
-
|
|
164
|
-
/***/ }),
|
|
165
|
-
|
|
166
|
-
/***/ 16:
|
|
167
|
-
/***/ (function(module, exports) {
|
|
168
|
-
|
|
169
|
-
module.exports = require("@splunk/react-ui/EventListener");
|
|
170
|
-
|
|
171
|
-
/***/ }),
|
|
172
|
-
|
|
173
|
-
/***/ 18:
|
|
174
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
175
|
-
|
|
176
|
-
"use strict";
|
|
177
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getWindow; });
|
|
178
|
-
/* unused harmony export ssrWindow */
|
|
179
|
-
/* harmony import */ var _ssrDocument__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(27);
|
|
180
|
-
/* eslint-disable @typescript-eslint/no-empty-function */
|
|
181
|
-
|
|
182
|
-
var ssrWindow = {
|
|
183
|
-
document: _ssrDocument__WEBPACK_IMPORTED_MODULE_0__[/* ssrDocument */ "b"],
|
|
184
|
-
navigator: {
|
|
185
|
-
userAgent: ''
|
|
186
|
-
},
|
|
187
|
-
location: {
|
|
188
|
-
hash: '',
|
|
189
|
-
host: '',
|
|
190
|
-
hostname: '',
|
|
191
|
-
href: '',
|
|
192
|
-
origin: '',
|
|
193
|
-
pathname: '',
|
|
194
|
-
protocol: '',
|
|
195
|
-
search: ''
|
|
196
|
-
},
|
|
197
|
-
history: {
|
|
198
|
-
replaceState: function replaceState() {},
|
|
199
|
-
pushState: function pushState() {},
|
|
200
|
-
go: function go() {},
|
|
201
|
-
back: function back() {}
|
|
202
|
-
},
|
|
203
|
-
CustomEvent: function CustomEvent() {
|
|
204
|
-
return this;
|
|
205
|
-
},
|
|
206
|
-
addEventListener: function addEventListener() {},
|
|
207
|
-
removeEventListener: function removeEventListener() {},
|
|
208
|
-
getComputedStyle: function getComputedStyle() {
|
|
209
|
-
return {
|
|
210
|
-
getPropertyValue: function getPropertyValue() {
|
|
211
|
-
return '';
|
|
212
|
-
}
|
|
213
|
-
};
|
|
214
|
-
},
|
|
215
|
-
Image: function Image() {},
|
|
216
|
-
Date: function Date() {},
|
|
217
|
-
screen: {},
|
|
218
|
-
setTimeout: function setTimeout() {},
|
|
219
|
-
clearTimeout: function clearTimeout() {},
|
|
220
|
-
matchMedia: function matchMedia() {
|
|
221
|
-
return {};
|
|
222
|
-
},
|
|
223
|
-
requestAnimationFrame: function requestAnimationFrame(callback) {
|
|
224
|
-
if (typeof setTimeout === 'undefined') {
|
|
225
|
-
callback();
|
|
226
|
-
return null;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
return setTimeout(callback, 0);
|
|
230
|
-
},
|
|
231
|
-
cancelAnimationFrame: function cancelAnimationFrame(id) {
|
|
232
|
-
if (typeof setTimeout === 'undefined') {
|
|
233
|
-
return;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
clearTimeout(id);
|
|
237
|
-
}
|
|
238
|
-
};
|
|
239
|
-
|
|
240
|
-
function getWindow() {
|
|
241
|
-
var win = typeof window !== 'undefined' ? window : ssrWindow;
|
|
242
|
-
return win;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
/***/ }),
|
|
248
|
-
|
|
249
|
-
/***/ 186:
|
|
250
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
251
|
-
|
|
252
|
-
"use strict";
|
|
48
|
+
var __webpack_exports__ = {};
|
|
253
49
|
// ESM COMPAT FLAG
|
|
254
50
|
__webpack_require__.r(__webpack_exports__);
|
|
255
51
|
|
|
256
52
|
// EXPORTS
|
|
257
|
-
__webpack_require__.d(__webpack_exports__,
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
var external_react_ = __webpack_require__(2);
|
|
262
|
-
var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
|
|
263
|
-
|
|
264
|
-
// EXTERNAL MODULE: external "prop-types"
|
|
265
|
-
var external_prop_types_ = __webpack_require__(1);
|
|
266
|
-
var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_);
|
|
267
|
-
|
|
268
|
-
// EXTERNAL MODULE: external "react-dom"
|
|
269
|
-
var external_react_dom_ = __webpack_require__(91);
|
|
270
|
-
|
|
271
|
-
// EXTERNAL MODULE: external "lodash/clamp"
|
|
272
|
-
var clamp_ = __webpack_require__(148);
|
|
273
|
-
var clamp_default = /*#__PURE__*/__webpack_require__.n(clamp_);
|
|
274
|
-
|
|
275
|
-
// EXTERNAL MODULE: external "lodash/defer"
|
|
276
|
-
var defer_ = __webpack_require__(55);
|
|
277
|
-
var defer_default = /*#__PURE__*/__webpack_require__.n(defer_);
|
|
278
|
-
|
|
279
|
-
// EXTERNAL MODULE: external "lodash/every"
|
|
280
|
-
var every_ = __webpack_require__(149);
|
|
281
|
-
var every_default = /*#__PURE__*/__webpack_require__.n(every_);
|
|
282
|
-
|
|
283
|
-
// EXTERNAL MODULE: external "lodash/has"
|
|
284
|
-
var has_ = __webpack_require__(11);
|
|
285
|
-
var has_default = /*#__PURE__*/__webpack_require__.n(has_);
|
|
286
|
-
|
|
287
|
-
// EXTERNAL MODULE: external "lodash/includes"
|
|
288
|
-
var includes_ = __webpack_require__(15);
|
|
289
|
-
var includes_default = /*#__PURE__*/__webpack_require__.n(includes_);
|
|
290
|
-
|
|
291
|
-
// EXTERNAL MODULE: external "lodash/intersection"
|
|
292
|
-
var intersection_ = __webpack_require__(150);
|
|
293
|
-
var intersection_default = /*#__PURE__*/__webpack_require__.n(intersection_);
|
|
294
|
-
|
|
295
|
-
// EXTERNAL MODULE: external "lodash/isFinite"
|
|
296
|
-
var isFinite_ = __webpack_require__(19);
|
|
297
|
-
var isFinite_default = /*#__PURE__*/__webpack_require__.n(isFinite_);
|
|
298
|
-
|
|
299
|
-
// EXTERNAL MODULE: external "lodash/isFunction"
|
|
300
|
-
var isFunction_ = __webpack_require__(69);
|
|
301
|
-
var isFunction_default = /*#__PURE__*/__webpack_require__.n(isFunction_);
|
|
302
|
-
|
|
303
|
-
// EXTERNAL MODULE: external "lodash/keys"
|
|
304
|
-
var keys_ = __webpack_require__(9);
|
|
305
|
-
var keys_default = /*#__PURE__*/__webpack_require__.n(keys_);
|
|
306
|
-
|
|
307
|
-
// EXTERNAL MODULE: external "lodash/omit"
|
|
308
|
-
var omit_ = __webpack_require__(5);
|
|
309
|
-
var omit_default = /*#__PURE__*/__webpack_require__.n(omit_);
|
|
310
|
-
|
|
311
|
-
// EXTERNAL MODULE: external "lodash/throttle"
|
|
312
|
-
var throttle_ = __webpack_require__(31);
|
|
313
|
-
var throttle_default = /*#__PURE__*/__webpack_require__.n(throttle_);
|
|
314
|
-
|
|
315
|
-
// EXTERNAL MODULE: external "@splunk/themes"
|
|
316
|
-
var themes_ = __webpack_require__(0);
|
|
317
|
-
|
|
318
|
-
// EXTERNAL MODULE: external "@splunk/react-ui/Animation"
|
|
319
|
-
var Animation_ = __webpack_require__(40);
|
|
320
|
-
|
|
321
|
-
// EXTERNAL MODULE: external "@splunk/react-ui/EventListener"
|
|
322
|
-
var EventListener_ = __webpack_require__(16);
|
|
323
|
-
var EventListener_default = /*#__PURE__*/__webpack_require__.n(EventListener_);
|
|
324
|
-
|
|
325
|
-
// EXTERNAL MODULE: external "@splunk/react-ui/Layer"
|
|
326
|
-
var Layer_ = __webpack_require__(83);
|
|
327
|
-
var Layer_default = /*#__PURE__*/__webpack_require__.n(Layer_);
|
|
328
|
-
|
|
329
|
-
// EXTERNAL MODULE: external "@splunk/react-ui/ScrollContainerContext"
|
|
330
|
-
var ScrollContainerContext_ = __webpack_require__(50);
|
|
331
|
-
var ScrollContainerContext_default = /*#__PURE__*/__webpack_require__.n(ScrollContainerContext_);
|
|
332
|
-
|
|
333
|
-
// EXTERNAL MODULE: external "@splunk/ui-utils/focus"
|
|
334
|
-
var focus_ = __webpack_require__(29);
|
|
53
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
54
|
+
PopoverContext: () => (/* reexport */ PopoverContext),
|
|
55
|
+
"default": () => (/* reexport */ Popover_Popover)
|
|
56
|
+
});
|
|
335
57
|
|
|
336
|
-
|
|
58
|
+
;// CONCATENATED MODULE: external "react"
|
|
59
|
+
const external_react_namespaceObject = require("react");
|
|
60
|
+
var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_namespaceObject);
|
|
61
|
+
;// CONCATENATED MODULE: external "prop-types"
|
|
62
|
+
const external_prop_types_namespaceObject = require("prop-types");
|
|
63
|
+
var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_namespaceObject);
|
|
64
|
+
;// CONCATENATED MODULE: external "react-dom"
|
|
65
|
+
const external_react_dom_namespaceObject = require("react-dom");
|
|
66
|
+
;// CONCATENATED MODULE: external "lodash/clamp"
|
|
67
|
+
const clamp_namespaceObject = require("lodash/clamp");
|
|
68
|
+
var clamp_default = /*#__PURE__*/__webpack_require__.n(clamp_namespaceObject);
|
|
69
|
+
;// CONCATENATED MODULE: external "lodash/defer"
|
|
70
|
+
const defer_namespaceObject = require("lodash/defer");
|
|
71
|
+
var defer_default = /*#__PURE__*/__webpack_require__.n(defer_namespaceObject);
|
|
72
|
+
;// CONCATENATED MODULE: external "lodash/every"
|
|
73
|
+
const every_namespaceObject = require("lodash/every");
|
|
74
|
+
var every_default = /*#__PURE__*/__webpack_require__.n(every_namespaceObject);
|
|
75
|
+
;// CONCATENATED MODULE: external "lodash/has"
|
|
76
|
+
const has_namespaceObject = require("lodash/has");
|
|
77
|
+
var has_default = /*#__PURE__*/__webpack_require__.n(has_namespaceObject);
|
|
78
|
+
;// CONCATENATED MODULE: external "lodash/includes"
|
|
79
|
+
const includes_namespaceObject = require("lodash/includes");
|
|
80
|
+
var includes_default = /*#__PURE__*/__webpack_require__.n(includes_namespaceObject);
|
|
81
|
+
;// CONCATENATED MODULE: external "lodash/intersection"
|
|
82
|
+
const intersection_namespaceObject = require("lodash/intersection");
|
|
83
|
+
var intersection_default = /*#__PURE__*/__webpack_require__.n(intersection_namespaceObject);
|
|
84
|
+
;// CONCATENATED MODULE: external "lodash/isFinite"
|
|
85
|
+
const isFinite_namespaceObject = require("lodash/isFinite");
|
|
86
|
+
var isFinite_default = /*#__PURE__*/__webpack_require__.n(isFinite_namespaceObject);
|
|
87
|
+
;// CONCATENATED MODULE: external "lodash/isFunction"
|
|
88
|
+
const isFunction_namespaceObject = require("lodash/isFunction");
|
|
89
|
+
var isFunction_default = /*#__PURE__*/__webpack_require__.n(isFunction_namespaceObject);
|
|
90
|
+
;// CONCATENATED MODULE: external "lodash/keys"
|
|
91
|
+
const keys_namespaceObject = require("lodash/keys");
|
|
92
|
+
var keys_default = /*#__PURE__*/__webpack_require__.n(keys_namespaceObject);
|
|
93
|
+
;// CONCATENATED MODULE: external "lodash/omit"
|
|
94
|
+
const omit_namespaceObject = require("lodash/omit");
|
|
95
|
+
var omit_default = /*#__PURE__*/__webpack_require__.n(omit_namespaceObject);
|
|
96
|
+
;// CONCATENATED MODULE: external "lodash/throttle"
|
|
97
|
+
const throttle_namespaceObject = require("lodash/throttle");
|
|
98
|
+
var throttle_default = /*#__PURE__*/__webpack_require__.n(throttle_namespaceObject);
|
|
99
|
+
;// CONCATENATED MODULE: external "@splunk/themes"
|
|
100
|
+
const themes_namespaceObject = require("@splunk/themes");
|
|
101
|
+
;// CONCATENATED MODULE: external "@splunk/react-ui/Animation"
|
|
102
|
+
const Animation_namespaceObject = require("@splunk/react-ui/Animation");
|
|
103
|
+
;// CONCATENATED MODULE: external "@splunk/react-ui/EventListener"
|
|
104
|
+
const EventListener_namespaceObject = require("@splunk/react-ui/EventListener");
|
|
105
|
+
var EventListener_default = /*#__PURE__*/__webpack_require__.n(EventListener_namespaceObject);
|
|
106
|
+
;// CONCATENATED MODULE: external "@splunk/react-ui/Layer"
|
|
107
|
+
const Layer_namespaceObject = require("@splunk/react-ui/Layer");
|
|
108
|
+
var Layer_default = /*#__PURE__*/__webpack_require__.n(Layer_namespaceObject);
|
|
109
|
+
;// CONCATENATED MODULE: external "@splunk/react-ui/ScrollContainerContext"
|
|
110
|
+
const ScrollContainerContext_namespaceObject = require("@splunk/react-ui/ScrollContainerContext");
|
|
111
|
+
var ScrollContainerContext_default = /*#__PURE__*/__webpack_require__.n(ScrollContainerContext_namespaceObject);
|
|
112
|
+
;// CONCATENATED MODULE: external "@splunk/ui-utils/focus"
|
|
113
|
+
const focus_namespaceObject = require("@splunk/ui-utils/focus");
|
|
114
|
+
;// CONCATENATED MODULE: ./src/Popover/getPlacement.ts
|
|
337
115
|
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; }
|
|
338
116
|
|
|
339
117
|
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; }
|
|
@@ -608,89 +386,87 @@ function getPlacement(args) {
|
|
|
608
386
|
}
|
|
609
387
|
};
|
|
610
388
|
}
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
var PopoverContext = /*#__PURE__*/Object(external_react_["createContext"])({});
|
|
389
|
+
;// CONCATENATED MODULE: ./src/Popover/PopoverContext.tsx
|
|
614
390
|
|
|
615
|
-
|
|
616
|
-
var external_react_spring_ = __webpack_require__(24);
|
|
391
|
+
var PopoverContext = /*#__PURE__*/(0,external_react_namespaceObject.createContext)({});
|
|
617
392
|
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
393
|
+
;// CONCATENATED MODULE: external "react-spring"
|
|
394
|
+
const external_react_spring_namespaceObject = require("react-spring");
|
|
395
|
+
;// CONCATENATED MODULE: external "styled-components"
|
|
396
|
+
const external_styled_components_namespaceObject = require("styled-components");
|
|
397
|
+
var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_namespaceObject);
|
|
398
|
+
;// CONCATENATED MODULE: ./src/Popover/PopoverStyles.ts
|
|
621
399
|
|
|
622
|
-
// CONCATENATED MODULE: ./src/Popover/PopoverStyles.ts
|
|
623
400
|
|
|
624
401
|
|
|
625
|
-
|
|
626
|
-
var PopoverStyles_arrowHeight = Object(themes_["pick"])({
|
|
402
|
+
var arrowHeight = (0,themes_namespaceObject.pick)({
|
|
627
403
|
enterprise: '8px',
|
|
628
404
|
prisma: 0
|
|
629
405
|
});
|
|
630
|
-
var Styled = external_styled_components_default()(
|
|
406
|
+
var Styled = external_styled_components_default()(external_react_spring_namespaceObject.animated.div).withConfig({
|
|
631
407
|
displayName: "PopoverStyles__Styled",
|
|
632
408
|
componentId: "sc-1nahsvw-0"
|
|
633
|
-
})(["position:fixed;z-index:", ";left:-300%;top:-300%;"],
|
|
634
|
-
var StyledBox = external_styled_components_default.
|
|
409
|
+
})(["position:fixed;z-index:", ";left:-300%;top:-300%;"], themes_namespaceObject.variables.zindexPopover);
|
|
410
|
+
var StyledBox = external_styled_components_default().div.withConfig({
|
|
635
411
|
displayName: "PopoverStyles__StyledBox",
|
|
636
412
|
componentId: "sc-1nahsvw-1"
|
|
637
|
-
})(["", ";", ";", ";"],
|
|
413
|
+
})(["", ";", ";", ";"], themes_namespaceObject.mixins.reset('block'), function (_ref) {
|
|
638
414
|
var $open = _ref.$open;
|
|
639
|
-
return !$open &&
|
|
415
|
+
return !$open && (0,external_styled_components_namespaceObject.css)(["pointer-events:none;"]);
|
|
640
416
|
}, function (_ref2) {
|
|
641
417
|
var $appearance = _ref2.$appearance;
|
|
642
|
-
return $appearance !== 'none' &&
|
|
418
|
+
return $appearance !== 'none' && (0,external_styled_components_namespaceObject.css)(["padding:8px;"]);
|
|
643
419
|
});
|
|
644
|
-
var StyledContent = external_styled_components_default.
|
|
420
|
+
var StyledContent = external_styled_components_default().div.withConfig({
|
|
645
421
|
displayName: "PopoverStyles__StyledContent",
|
|
646
422
|
componentId: "sc-1nahsvw-2"
|
|
647
|
-
})(["", ""],
|
|
648
|
-
normal:
|
|
423
|
+
})(["", ""], (0,themes_namespaceObject.pickVariant)('$appearance', {
|
|
424
|
+
normal: (0,external_styled_components_namespaceObject.css)(["background-color:", ";color:", ";border:", ";box-shadow:", ";border-radius:", ";"], themes_namespaceObject.variables.backgroundColorPopup, themes_namespaceObject.variables.contentColorDefault, (0,themes_namespaceObject.pick)({
|
|
649
425
|
enterprise: {
|
|
650
|
-
light:
|
|
651
|
-
dark:
|
|
426
|
+
light: themes_namespaceObject.variables.border,
|
|
427
|
+
dark: themes_namespaceObject.variables.border
|
|
652
428
|
},
|
|
653
429
|
prisma: 'none'
|
|
654
|
-
}),
|
|
430
|
+
}), (0,themes_namespaceObject.pick)({
|
|
655
431
|
enterprise: {
|
|
656
|
-
light:
|
|
432
|
+
light: (0,external_styled_components_namespaceObject.css)(["0 2px 2px ", ""], themes_namespaceObject.mixins.colorWithAlpha(themes_namespaceObject.variables.gray20, 0.1)),
|
|
657
433
|
dark: '0 1px 2px #000'
|
|
658
434
|
},
|
|
659
|
-
prisma:
|
|
660
|
-
}),
|
|
435
|
+
prisma: themes_namespaceObject.variables.overlayShadow
|
|
436
|
+
}), themes_namespaceObject.variables.borderRadius),
|
|
661
437
|
// Enterprise Only
|
|
662
|
-
inverted:
|
|
663
|
-
light:
|
|
664
|
-
dark:
|
|
665
|
-
}),
|
|
666
|
-
light:
|
|
667
|
-
dark:
|
|
438
|
+
inverted: (0,external_styled_components_namespaceObject.css)(["background-color:", ";color:", ";"], (0,themes_namespaceObject.pick)({
|
|
439
|
+
light: themes_namespaceObject.variables.gray20,
|
|
440
|
+
dark: themes_namespaceObject.variables.white
|
|
441
|
+
}), (0,themes_namespaceObject.pick)({
|
|
442
|
+
light: themes_namespaceObject.variables.white,
|
|
443
|
+
dark: themes_namespaceObject.variables.gray30
|
|
668
444
|
}))
|
|
669
445
|
})); // Enterprise Only
|
|
670
446
|
|
|
671
|
-
var StyledArrow = external_styled_components_default.
|
|
447
|
+
var StyledArrow = external_styled_components_default().div.withConfig({
|
|
672
448
|
displayName: "PopoverStyles__StyledArrow",
|
|
673
449
|
componentId: "sc-1nahsvw-3"
|
|
674
|
-
})(["width:0;height:0;border-left:", " solid transparent;border-right:", " solid transparent;position:absolute;border-bottom-width:", ";border-bottom-style:solid;", ""],
|
|
675
|
-
normal:
|
|
676
|
-
light:
|
|
677
|
-
dark:
|
|
678
|
-
}),
|
|
679
|
-
inverted:
|
|
680
|
-
light:
|
|
681
|
-
dark:
|
|
450
|
+
})(["width:0;height:0;border-left:", " solid transparent;border-right:", " solid transparent;position:absolute;border-bottom-width:", ";border-bottom-style:solid;", ""], arrowHeight, arrowHeight, arrowHeight, (0,themes_namespaceObject.pickVariant)('$appearance', {
|
|
451
|
+
normal: (0,external_styled_components_namespaceObject.css)(["border-bottom-color:", ";&::before{content:'';display:block;width:0;height:0;border-left:", " solid transparent;border-right:", " solid transparent;border-bottom:", " solid ", ";position:absolute;top:1px;left:0;margin-left:-", ";}"], (0,themes_namespaceObject.pick)({
|
|
452
|
+
light: themes_namespaceObject.variables.borderColor,
|
|
453
|
+
dark: themes_namespaceObject.variables.black
|
|
454
|
+
}), arrowHeight, arrowHeight, arrowHeight, themes_namespaceObject.variables.backgroundColor, arrowHeight),
|
|
455
|
+
inverted: (0,external_styled_components_namespaceObject.css)(["border-bottom-color:", ";"], (0,themes_namespaceObject.pick)({
|
|
456
|
+
light: themes_namespaceObject.variables.gray20,
|
|
457
|
+
dark: themes_namespaceObject.variables.white
|
|
682
458
|
}))
|
|
683
459
|
}));
|
|
684
|
-
var StyledLowerRightCorner = external_styled_components_default.
|
|
460
|
+
var StyledLowerRightCorner = external_styled_components_default().div.withConfig({
|
|
685
461
|
displayName: "PopoverStyles__StyledLowerRightCorner",
|
|
686
462
|
componentId: "sc-1nahsvw-4"
|
|
687
463
|
})(["position:fixed;right:0;bottom:0;"]);
|
|
688
|
-
var StyledHitArea = external_styled_components_default.
|
|
464
|
+
var StyledHitArea = external_styled_components_default().svg.withConfig({
|
|
689
465
|
displayName: "PopoverStyles__StyledHitArea",
|
|
690
466
|
componentId: "sc-1nahsvw-5"
|
|
691
467
|
})(["position:fixed;pointer-events:none;path{pointer-events:auto;stroke-width:0;stroke:transparent;fill:transparent;}"]);
|
|
692
468
|
|
|
693
|
-
|
|
469
|
+
;// CONCATENATED MODULE: ./src/Popover/PopoverHitArea.tsx
|
|
694
470
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
695
471
|
|
|
696
472
|
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."); }
|
|
@@ -707,9 +483,9 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
707
483
|
|
|
708
484
|
|
|
709
485
|
var propTypes = {
|
|
710
|
-
anchorRect: external_prop_types_default.
|
|
711
|
-
popoverEl: external_prop_types_default.
|
|
712
|
-
popoverPlacement: external_prop_types_default.
|
|
486
|
+
anchorRect: (external_prop_types_default()).object,
|
|
487
|
+
popoverEl: (external_prop_types_default()).object,
|
|
488
|
+
popoverPlacement: external_prop_types_default().oneOf(['above', 'below', 'left', 'right', 'misaligned'])
|
|
713
489
|
};
|
|
714
490
|
|
|
715
491
|
var getHitAreaSettings = function getHitAreaSettings(_ref) {
|
|
@@ -790,22 +566,22 @@ var getHitAreaSettings = function getHitAreaSettings(_ref) {
|
|
|
790
566
|
};
|
|
791
567
|
};
|
|
792
568
|
|
|
793
|
-
var PopoverHitArea = /*#__PURE__*/external_react_default.
|
|
569
|
+
var PopoverHitArea = /*#__PURE__*/external_react_default().forwardRef(function (_ref2, ref) {
|
|
794
570
|
var anchorRect = _ref2.anchorRect,
|
|
795
571
|
popoverEl = _ref2.popoverEl,
|
|
796
572
|
popoverPlacement = _ref2.popoverPlacement;
|
|
797
573
|
|
|
798
|
-
var _useState =
|
|
574
|
+
var _useState = (0,external_react_namespaceObject.useState)(null),
|
|
799
575
|
_useState2 = _slicedToArray(_useState, 2),
|
|
800
576
|
hitAreaPathState = _useState2[0],
|
|
801
577
|
setHitAreaPathState = _useState2[1];
|
|
802
578
|
|
|
803
|
-
var _useState3 =
|
|
579
|
+
var _useState3 = (0,external_react_namespaceObject.useState)({}),
|
|
804
580
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
805
581
|
hitAreaStyleState = _useState4[0],
|
|
806
582
|
setHitAreaStyleState = _useState4[1];
|
|
807
583
|
|
|
808
|
-
|
|
584
|
+
(0,external_react_namespaceObject.useEffect)(function () {
|
|
809
585
|
var _getHitAreaSettings = getHitAreaSettings({
|
|
810
586
|
anchorRect: anchorRect,
|
|
811
587
|
popoverEl: popoverEl,
|
|
@@ -819,10 +595,10 @@ var PopoverHitArea = /*#__PURE__*/external_react_default.a.forwardRef(function (
|
|
|
819
595
|
}, [anchorRect, popoverEl, popoverPlacement]);
|
|
820
596
|
|
|
821
597
|
if (hitAreaPathState != null) {
|
|
822
|
-
return /*#__PURE__*/external_react_default.
|
|
598
|
+
return /*#__PURE__*/external_react_default().createElement(StyledHitArea, {
|
|
823
599
|
"data-test": "popover-hit-area",
|
|
824
600
|
style: hitAreaStyleState
|
|
825
|
-
}, /*#__PURE__*/external_react_default.
|
|
601
|
+
}, /*#__PURE__*/external_react_default().createElement("path", {
|
|
826
602
|
d: hitAreaPathState,
|
|
827
603
|
ref: ref
|
|
828
604
|
}));
|
|
@@ -831,14 +607,214 @@ var PopoverHitArea = /*#__PURE__*/external_react_default.a.forwardRef(function (
|
|
|
831
607
|
return null;
|
|
832
608
|
});
|
|
833
609
|
PopoverHitArea.propTypes = propTypes;
|
|
834
|
-
/* harmony default export */
|
|
835
|
-
|
|
836
|
-
|
|
610
|
+
/* harmony default export */ const Popover_PopoverHitArea = (PopoverHitArea);
|
|
611
|
+
;// CONCATENATED MODULE: ./src/utils/ssrDocument.ts
|
|
612
|
+
/* eslint-disable @typescript-eslint/no-empty-function */
|
|
613
|
+
var ssrDocument = {
|
|
614
|
+
body: {
|
|
615
|
+
appendChild: function appendChild() {
|
|
616
|
+
return [];
|
|
617
|
+
}
|
|
618
|
+
},
|
|
619
|
+
addEventListener: function addEventListener() {},
|
|
620
|
+
removeEventListener: function removeEventListener() {},
|
|
621
|
+
activeElement: {
|
|
622
|
+
blur: function blur() {},
|
|
623
|
+
nodeName: ''
|
|
624
|
+
},
|
|
625
|
+
querySelector: function querySelector() {
|
|
626
|
+
return null;
|
|
627
|
+
},
|
|
628
|
+
querySelectorAll: function querySelectorAll() {
|
|
629
|
+
return [];
|
|
630
|
+
},
|
|
631
|
+
getElementById: function getElementById() {
|
|
632
|
+
return null;
|
|
633
|
+
},
|
|
634
|
+
createEvent: function createEvent() {
|
|
635
|
+
return {
|
|
636
|
+
initEvent: function initEvent() {}
|
|
637
|
+
};
|
|
638
|
+
},
|
|
639
|
+
createElement: function createElement() {
|
|
640
|
+
return {
|
|
641
|
+
children: [],
|
|
642
|
+
childNodes: [],
|
|
643
|
+
style: {},
|
|
644
|
+
setAttribute: function setAttribute() {},
|
|
645
|
+
getElementsByTagName: function getElementsByTagName() {
|
|
646
|
+
return [];
|
|
647
|
+
}
|
|
648
|
+
};
|
|
649
|
+
},
|
|
650
|
+
createElementNS: function createElementNS() {
|
|
651
|
+
return {};
|
|
652
|
+
},
|
|
653
|
+
importNode: function importNode() {
|
|
654
|
+
return null;
|
|
655
|
+
},
|
|
656
|
+
location: {
|
|
657
|
+
hash: '',
|
|
658
|
+
host: '',
|
|
659
|
+
hostname: '',
|
|
660
|
+
href: '',
|
|
661
|
+
origin: '',
|
|
662
|
+
pathname: '',
|
|
663
|
+
protocol: '',
|
|
664
|
+
search: ''
|
|
665
|
+
}
|
|
666
|
+
};
|
|
667
|
+
|
|
668
|
+
function getDocument() {
|
|
669
|
+
var doc = typeof document !== 'undefined' ? document : ssrDocument;
|
|
670
|
+
return doc;
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
|
|
674
|
+
;// CONCATENATED MODULE: ./src/utils/ssrWindow.ts
|
|
675
|
+
/* eslint-disable @typescript-eslint/no-empty-function */
|
|
676
|
+
|
|
677
|
+
var ssrWindow = {
|
|
678
|
+
document: ssrDocument,
|
|
679
|
+
navigator: {
|
|
680
|
+
userAgent: ''
|
|
681
|
+
},
|
|
682
|
+
location: {
|
|
683
|
+
hash: '',
|
|
684
|
+
host: '',
|
|
685
|
+
hostname: '',
|
|
686
|
+
href: '',
|
|
687
|
+
origin: '',
|
|
688
|
+
pathname: '',
|
|
689
|
+
protocol: '',
|
|
690
|
+
search: ''
|
|
691
|
+
},
|
|
692
|
+
history: {
|
|
693
|
+
replaceState: function replaceState() {},
|
|
694
|
+
pushState: function pushState() {},
|
|
695
|
+
go: function go() {},
|
|
696
|
+
back: function back() {}
|
|
697
|
+
},
|
|
698
|
+
CustomEvent: function CustomEvent() {
|
|
699
|
+
return this;
|
|
700
|
+
},
|
|
701
|
+
addEventListener: function addEventListener() {},
|
|
702
|
+
removeEventListener: function removeEventListener() {},
|
|
703
|
+
getComputedStyle: function getComputedStyle() {
|
|
704
|
+
return {
|
|
705
|
+
getPropertyValue: function getPropertyValue() {
|
|
706
|
+
return '';
|
|
707
|
+
}
|
|
708
|
+
};
|
|
709
|
+
},
|
|
710
|
+
Image: function Image() {},
|
|
711
|
+
Date: function Date() {},
|
|
712
|
+
screen: {},
|
|
713
|
+
setTimeout: function setTimeout() {},
|
|
714
|
+
clearTimeout: function clearTimeout() {},
|
|
715
|
+
matchMedia: function matchMedia() {
|
|
716
|
+
return {};
|
|
717
|
+
},
|
|
718
|
+
requestAnimationFrame: function requestAnimationFrame(callback) {
|
|
719
|
+
if (typeof setTimeout === 'undefined') {
|
|
720
|
+
callback();
|
|
721
|
+
return null;
|
|
722
|
+
}
|
|
837
723
|
|
|
838
|
-
|
|
839
|
-
|
|
724
|
+
return setTimeout(callback, 0);
|
|
725
|
+
},
|
|
726
|
+
cancelAnimationFrame: function cancelAnimationFrame(id) {
|
|
727
|
+
if (typeof setTimeout === 'undefined') {
|
|
728
|
+
return;
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
clearTimeout(id);
|
|
732
|
+
}
|
|
733
|
+
};
|
|
840
734
|
|
|
841
|
-
|
|
735
|
+
function getWindow() {
|
|
736
|
+
var win = typeof window !== 'undefined' ? window : ssrWindow;
|
|
737
|
+
return win;
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
|
|
741
|
+
;// CONCATENATED MODULE: ./src/utils/getBoundingClientRect.ts
|
|
742
|
+
function getBoundingClientRect_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; }
|
|
743
|
+
|
|
744
|
+
function getBoundingClientRect_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { getBoundingClientRect_ownKeys(Object(source), true).forEach(function (key) { getBoundingClientRect_defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { getBoundingClientRect_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
745
|
+
|
|
746
|
+
function getBoundingClientRect_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; }
|
|
747
|
+
|
|
748
|
+
// Checks if browser is Safari
|
|
749
|
+
|
|
750
|
+
function isUserAgentSafari() {
|
|
751
|
+
return /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
|
|
752
|
+
} // Formats return value to DOMRect
|
|
753
|
+
|
|
754
|
+
|
|
755
|
+
function rectToClientRect(rect) {
|
|
756
|
+
return getBoundingClientRect_objectSpread(getBoundingClientRect_objectSpread({}, rect), {}, {
|
|
757
|
+
top: rect.y,
|
|
758
|
+
left: rect.x,
|
|
759
|
+
right: rect.x + rect.width,
|
|
760
|
+
bottom: rect.y + rect.height
|
|
761
|
+
});
|
|
762
|
+
}
|
|
763
|
+
/**
|
|
764
|
+
* Provides DOMRect information about the size of an element and its position relative to the viewport.
|
|
765
|
+
* Accounts for Safari's use of visual viewport and adds offsets to set as layout viewport.
|
|
766
|
+
* @param {Element} element - The element to be evaluated
|
|
767
|
+
* @param {boolean} offsets - Use when position of element relative to the layout viewport offsets are needed for Safari.
|
|
768
|
+
* @returns {Omit<DOMRect, 'toJSON'>}
|
|
769
|
+
* @public
|
|
770
|
+
*/
|
|
771
|
+
|
|
772
|
+
|
|
773
|
+
function getBoundingClientRect(element, offsets) {
|
|
774
|
+
var _window$visualViewpor, _window$visualViewpor2;
|
|
775
|
+
|
|
776
|
+
var clientRect = element.getBoundingClientRect();
|
|
777
|
+
var addVisualOffsets = isUserAgentSafari();
|
|
778
|
+
|
|
779
|
+
if (!offsets || !addVisualOffsets) {
|
|
780
|
+
return clientRect;
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
var window = getWindow();
|
|
784
|
+
var x = clientRect.left + (((_window$visualViewpor = window.visualViewport) === null || _window$visualViewpor === void 0 ? void 0 : _window$visualViewpor.offsetLeft) || 0);
|
|
785
|
+
var y = clientRect.top + (((_window$visualViewpor2 = window.visualViewport) === null || _window$visualViewpor2 === void 0 ? void 0 : _window$visualViewpor2.offsetTop) || 0);
|
|
786
|
+
var width = clientRect.width,
|
|
787
|
+
height = clientRect.height;
|
|
788
|
+
return rectToClientRect({
|
|
789
|
+
width: width,
|
|
790
|
+
height: height,
|
|
791
|
+
x: x,
|
|
792
|
+
y: y
|
|
793
|
+
});
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
|
|
797
|
+
;// CONCATENATED MODULE: ./src/utils/updateReactRef.ts
|
|
798
|
+
/**
|
|
799
|
+
* Updates a React ref. Callback refs and object refs (from `createRef` and `useRef`) are supported.
|
|
800
|
+
*
|
|
801
|
+
* @param ref - The React callback or object ref. Can be `null` or `undefined`.
|
|
802
|
+
* @param current - The new value of the ref.
|
|
803
|
+
*/
|
|
804
|
+
function updateReactRef(ref, current) {
|
|
805
|
+
if (ref) {
|
|
806
|
+
if (typeof ref === 'function') {
|
|
807
|
+
ref(current);
|
|
808
|
+
} else {
|
|
809
|
+
// the public signature of this util uses React.Ref<T> to mirror the way React types refs.
|
|
810
|
+
// the intention here is to signal "we will take care of setting 'current', not you".
|
|
811
|
+
ref.current = current; // eslint-disable-line no-param-reassign
|
|
812
|
+
}
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
|
|
817
|
+
;// CONCATENATED MODULE: ./src/Popover/Popover.tsx
|
|
842
818
|
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); }
|
|
843
819
|
|
|
844
820
|
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); }
|
|
@@ -913,36 +889,37 @@ function Popover_defineProperty(obj, key, value) { if (key in obj) { Object.defi
|
|
|
913
889
|
|
|
914
890
|
|
|
915
891
|
|
|
892
|
+
|
|
916
893
|
|
|
917
894
|
|
|
918
895
|
/** @public */
|
|
919
896
|
|
|
920
897
|
var possibleCloseReasons = ['clickAway', 'escapeKey', 'offScreen', 'tabKey'];
|
|
921
898
|
var Popover_propTypes = {
|
|
922
|
-
align: external_prop_types_default.
|
|
923
|
-
anchor: external_prop_types_default.
|
|
924
|
-
animation: external_prop_types_default.
|
|
925
|
-
animationConfig: external_prop_types_default.
|
|
926
|
-
appearance: external_prop_types_default.
|
|
927
|
-
autoCloseWhenOffScreen: external_prop_types_default.
|
|
928
|
-
canCoverAnchor: external_prop_types_default.
|
|
929
|
-
children: external_prop_types_default.
|
|
930
|
-
closeReasons: external_prop_types_default.
|
|
931
|
-
defaultPlacement: external_prop_types_default.
|
|
932
|
-
elementRef: external_prop_types_default.
|
|
933
|
-
id: external_prop_types_default.
|
|
934
|
-
hitAreaRef: external_prop_types_default.
|
|
935
|
-
onRequestClose: external_prop_types_default.
|
|
936
|
-
open: external_prop_types_default.
|
|
937
|
-
outerRef: external_prop_types_default.
|
|
938
|
-
pointTo: external_prop_types_default.
|
|
939
|
-
x: external_prop_types_default.
|
|
940
|
-
y: external_prop_types_default.
|
|
899
|
+
align: external_prop_types_default().oneOf(['center', 'edge', 'theme', 'end']),
|
|
900
|
+
anchor: (external_prop_types_default()).object,
|
|
901
|
+
animation: (external_prop_types_default()).bool,
|
|
902
|
+
animationConfig: (external_prop_types_default()).object,
|
|
903
|
+
appearance: external_prop_types_default().oneOf(['normal', 'inverted', 'none']),
|
|
904
|
+
autoCloseWhenOffScreen: (external_prop_types_default()).bool,
|
|
905
|
+
canCoverAnchor: (external_prop_types_default()).bool,
|
|
906
|
+
children: external_prop_types_default().oneOfType([(external_prop_types_default()).node, (external_prop_types_default()).func]),
|
|
907
|
+
closeReasons: external_prop_types_default().arrayOf(external_prop_types_default().oneOf(possibleCloseReasons)),
|
|
908
|
+
defaultPlacement: external_prop_types_default().oneOf(['above', 'below', 'left', 'right', 'vertical', 'horizontal']),
|
|
909
|
+
elementRef: external_prop_types_default().oneOfType([(external_prop_types_default()).func, (external_prop_types_default()).object]),
|
|
910
|
+
id: (external_prop_types_default()).string,
|
|
911
|
+
hitAreaRef: external_prop_types_default().oneOfType([(external_prop_types_default()).func, (external_prop_types_default()).object]),
|
|
912
|
+
onRequestClose: (external_prop_types_default()).func,
|
|
913
|
+
open: (external_prop_types_default()).bool,
|
|
914
|
+
outerRef: external_prop_types_default().oneOfType([(external_prop_types_default()).func, (external_prop_types_default()).object]),
|
|
915
|
+
pointTo: external_prop_types_default().shape({
|
|
916
|
+
x: (external_prop_types_default()).number,
|
|
917
|
+
y: (external_prop_types_default()).number
|
|
941
918
|
}),
|
|
942
|
-
repositionMode: external_prop_types_default.
|
|
943
|
-
retainFocus: external_prop_types_default.
|
|
944
|
-
takeFocus: external_prop_types_default.
|
|
945
|
-
splunkTheme: external_prop_types_default.
|
|
919
|
+
repositionMode: external_prop_types_default().oneOf(['none', 'flip', 'any']),
|
|
920
|
+
retainFocus: (external_prop_types_default()).bool,
|
|
921
|
+
takeFocus: (external_prop_types_default()).bool,
|
|
922
|
+
splunkTheme: (external_prop_types_default()).object
|
|
946
923
|
};
|
|
947
924
|
var defaultProps = {
|
|
948
925
|
align: 'theme',
|
|
@@ -981,7 +958,7 @@ function isHTMLElement(container) {
|
|
|
981
958
|
*/
|
|
982
959
|
|
|
983
960
|
|
|
984
|
-
var
|
|
961
|
+
var Popover = /*#__PURE__*/function (_Component) {
|
|
985
962
|
_inherits(Popover, _Component);
|
|
986
963
|
|
|
987
964
|
var _super = _createSuper(Popover);
|
|
@@ -1075,7 +1052,8 @@ var Popover_Popover = /*#__PURE__*/function (_Component) {
|
|
|
1075
1052
|
Popover_defineProperty(_assertThisInitialized(_this), "allowAnimationUpdates", true);
|
|
1076
1053
|
|
|
1077
1054
|
Popover_defineProperty(_assertThisInitialized(_this), "getElPosition", function (anchorEl) {
|
|
1078
|
-
var
|
|
1055
|
+
var offsets = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
1056
|
+
var rect = getBoundingClientRect(anchorEl, offsets);
|
|
1079
1057
|
var a = {
|
|
1080
1058
|
width: anchorEl.offsetWidth,
|
|
1081
1059
|
height: anchorEl.offsetHeight
|
|
@@ -1093,7 +1071,7 @@ var Popover_Popover = /*#__PURE__*/function (_Component) {
|
|
|
1093
1071
|
});
|
|
1094
1072
|
|
|
1095
1073
|
Popover_defineProperty(_assertThisInitialized(_this), "setPlacement", function (scrolling) {
|
|
1096
|
-
var window =
|
|
1074
|
+
var window = getWindow();
|
|
1097
1075
|
|
|
1098
1076
|
_this.setState(function (state) {
|
|
1099
1077
|
var _state$arrowStyleTran;
|
|
@@ -1116,12 +1094,14 @@ var Popover_Popover = /*#__PURE__*/function (_Component) {
|
|
|
1116
1094
|
return null;
|
|
1117
1095
|
}
|
|
1118
1096
|
|
|
1119
|
-
var
|
|
1097
|
+
var anchorPosViewport = _this.getElPosition(state.anchorEl);
|
|
1098
|
+
|
|
1099
|
+
var anchorPos = _this.getElPosition(state.anchorEl, true);
|
|
1120
1100
|
|
|
1121
1101
|
var scrollContainerPos = isHTMLElement(scrollContainer) ? _this.getElPosition(scrollContainer) : undefined;
|
|
1122
1102
|
|
|
1123
1103
|
if (scrolling && autoCloseWhenOffScreen) {
|
|
1124
|
-
if (_this.autoCloseWhenOffScreen(
|
|
1104
|
+
if (_this.autoCloseWhenOffScreen(anchorPosViewport, scrollContainerPos)) {
|
|
1125
1105
|
return null;
|
|
1126
1106
|
}
|
|
1127
1107
|
}
|
|
@@ -1184,7 +1164,7 @@ var Popover_Popover = /*#__PURE__*/function (_Component) {
|
|
|
1184
1164
|
if (anchor && !(anchor instanceof HTMLElement)) {
|
|
1185
1165
|
if (false) {}
|
|
1186
1166
|
|
|
1187
|
-
anchorEl =
|
|
1167
|
+
anchorEl = (0,external_react_dom_namespaceObject.findDOMNode)(anchor); // eslint-disable-line react/no-find-dom-node
|
|
1188
1168
|
} else {
|
|
1189
1169
|
anchorEl = anchor !== null && anchor !== void 0 ? anchor : undefined;
|
|
1190
1170
|
}
|
|
@@ -1202,23 +1182,23 @@ var Popover_Popover = /*#__PURE__*/function (_Component) {
|
|
|
1202
1182
|
_this.innerContainerEl = el;
|
|
1203
1183
|
|
|
1204
1184
|
if (el && _this.props.takeFocus) {
|
|
1205
|
-
defer_default()(
|
|
1185
|
+
defer_default()(focus_namespaceObject.takeFocus, el);
|
|
1206
1186
|
}
|
|
1207
1187
|
|
|
1208
|
-
|
|
1188
|
+
updateReactRef(_this.props.elementRef, el);
|
|
1209
1189
|
});
|
|
1210
1190
|
|
|
1211
1191
|
Popover_defineProperty(_assertThisInitialized(_this), "handleOuterContainerMount", function (el) {
|
|
1212
1192
|
_this.outerContainerEl = el;
|
|
1213
|
-
|
|
1193
|
+
updateReactRef(_this.props.outerRef, el);
|
|
1214
1194
|
});
|
|
1215
1195
|
|
|
1216
1196
|
Popover_defineProperty(_assertThisInitialized(_this), "handleTab", function (e) {
|
|
1217
1197
|
if (_this.innerContainerEl) {
|
|
1218
1198
|
if (_this.props.retainFocus) {
|
|
1219
|
-
|
|
1220
|
-
} else if (
|
|
1221
|
-
var tabbableElements =
|
|
1199
|
+
(0,focus_namespaceObject.handleTab)(_this.innerContainerEl, e);
|
|
1200
|
+
} else if ((0,focus_namespaceObject.isTabKey)(e)) {
|
|
1201
|
+
var tabbableElements = (0,focus_namespaceObject.getSortedTabbableElements)(_this.innerContainerEl);
|
|
1222
1202
|
|
|
1223
1203
|
if (tabbableElements.length > 0) {
|
|
1224
1204
|
var finalTabbale = e.shiftKey ? tabbableElements[0] : tabbableElements[tabbableElements.length - 1];
|
|
@@ -1294,7 +1274,7 @@ var Popover_Popover = /*#__PURE__*/function (_Component) {
|
|
|
1294
1274
|
};
|
|
1295
1275
|
/* eslint-disable jsx-a11y/no-static-element-interactions */
|
|
1296
1276
|
|
|
1297
|
-
return /*#__PURE__*/external_react_default.
|
|
1277
|
+
return /*#__PURE__*/external_react_default().createElement(Animation_namespaceObject.Spring, {
|
|
1298
1278
|
from: {
|
|
1299
1279
|
opacity: animation ? 0 : 1
|
|
1300
1280
|
},
|
|
@@ -1305,11 +1285,11 @@ var Popover_Popover = /*#__PURE__*/function (_Component) {
|
|
|
1305
1285
|
}, animationConfig),
|
|
1306
1286
|
onRest: _this.handleAnimationEnd
|
|
1307
1287
|
}, function (interpolatedStyles) {
|
|
1308
|
-
return /*#__PURE__*/external_react_default.
|
|
1288
|
+
return /*#__PURE__*/external_react_default().createElement(Styled, {
|
|
1309
1289
|
"data-test": "outer-popover",
|
|
1310
1290
|
style: Popover_objectSpread(Popover_objectSpread({}, outerContainerStyle), interpolatedStyles),
|
|
1311
1291
|
ref: _this.handleOuterContainerMount
|
|
1312
|
-
}, (open || _this.state.animating) && /*#__PURE__*/external_react_default.
|
|
1292
|
+
}, (open || _this.state.animating) && /*#__PURE__*/external_react_default().createElement(StyledBox, _extends({
|
|
1313
1293
|
$appearance: displayAppearance,
|
|
1314
1294
|
$open: open,
|
|
1315
1295
|
"data-test": "popover",
|
|
@@ -1318,19 +1298,19 @@ var Popover_Popover = /*#__PURE__*/function (_Component) {
|
|
|
1318
1298
|
id: id,
|
|
1319
1299
|
onKeyDown: _this.handleTab // TODO: remove anchor once prop type generation is fixed
|
|
1320
1300
|
|
|
1321
|
-
}, omit_default()(_this.props, ['anchor'].concat(_toConsumableArray(keys_default()(Popover.propTypes))))), /*#__PURE__*/external_react_default.
|
|
1301
|
+
}, omit_default()(_this.props, ['anchor'].concat(_toConsumableArray(keys_default()(Popover.propTypes))))), /*#__PURE__*/external_react_default().createElement(PopoverContext.Provider, {
|
|
1322
1302
|
value: {
|
|
1323
1303
|
retainFocus: retainFocus
|
|
1324
1304
|
}
|
|
1325
|
-
}, /*#__PURE__*/external_react_default.
|
|
1305
|
+
}, /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, appearance === 'none' && children, appearance !== 'none' && !isPrisma && /*#__PURE__*/external_react_default().createElement(StyledArrow, {
|
|
1326
1306
|
$appearance: displayAppearance,
|
|
1327
1307
|
ref: function ref(arrow) {
|
|
1328
1308
|
_this.arrow = arrow;
|
|
1329
1309
|
},
|
|
1330
1310
|
style: arrowStyle
|
|
1331
|
-
}), appearance !== 'none' && /*#__PURE__*/external_react_default.
|
|
1311
|
+
}), appearance !== 'none' && /*#__PURE__*/external_react_default().createElement(StyledContent, {
|
|
1332
1312
|
$appearance: displayAppearance
|
|
1333
|
-
}, isFunction_default()(children) ? children(childData) : children)))), /*#__PURE__*/external_react_default.
|
|
1313
|
+
}, isFunction_default()(children) ? children(childData) : children)))), /*#__PURE__*/external_react_default().createElement(StyledLowerRightCorner, {
|
|
1334
1314
|
ref: function ref(el) {
|
|
1335
1315
|
_this.windowSizeMeasurementEl = el;
|
|
1336
1316
|
}
|
|
@@ -1374,7 +1354,7 @@ var Popover_Popover = /*#__PURE__*/function (_Component) {
|
|
|
1374
1354
|
// causes the popover contents to receive focus even though the popover closing
|
|
1375
1355
|
|
|
1376
1356
|
if (!prevProps.open && this.props.open && this.props.takeFocus) {
|
|
1377
|
-
|
|
1357
|
+
(0,focus_namespaceObject.takeFocus)(this.innerContainerEl);
|
|
1378
1358
|
}
|
|
1379
1359
|
}
|
|
1380
1360
|
}
|
|
@@ -1389,7 +1369,7 @@ var Popover_Popover = /*#__PURE__*/function (_Component) {
|
|
|
1389
1369
|
}, {
|
|
1390
1370
|
key: "autoCloseWhenOffScreen",
|
|
1391
1371
|
value: function autoCloseWhenOffScreen(anchorPosition, scrollContainerPosition) {
|
|
1392
|
-
var window =
|
|
1372
|
+
var window = getWindow();
|
|
1393
1373
|
|
|
1394
1374
|
if (anchorPosition.top < 0 || anchorPosition.top > window.innerHeight || anchorPosition.left < 0 || anchorPosition.left > window.innerWidth) {
|
|
1395
1375
|
this.requestClose({
|
|
@@ -1421,14 +1401,16 @@ var Popover_Popover = /*#__PURE__*/function (_Component) {
|
|
|
1421
1401
|
}, {
|
|
1422
1402
|
key: "render",
|
|
1423
1403
|
value: function render() {
|
|
1424
|
-
var window =
|
|
1404
|
+
var window = getWindow();
|
|
1425
1405
|
var open = this.props.open || this.state.animating;
|
|
1426
1406
|
var scrollContainer = this.context || window;
|
|
1427
1407
|
var hasCustomizedScrollContainer = scrollContainer !== window;
|
|
1428
1408
|
var _this$state3 = this.state,
|
|
1429
1409
|
anchorPos = _this$state3.anchorPos,
|
|
1430
|
-
placement = _this$state3.placement;
|
|
1431
|
-
|
|
1410
|
+
placement = _this$state3.placement; // EventListeners only need to be rendered when open,
|
|
1411
|
+
// otherwise leads to negative performance impacts
|
|
1412
|
+
|
|
1413
|
+
var eventListeners = open ? [hasCustomizedScrollContainer && /*#__PURE__*/external_react_default().createElement((EventListener_default()), {
|
|
1432
1414
|
target: scrollContainer,
|
|
1433
1415
|
eventType: "scroll",
|
|
1434
1416
|
listener: this.handleScroll,
|
|
@@ -1437,12 +1419,12 @@ var Popover_Popover = /*#__PURE__*/function (_Component) {
|
|
|
1437
1419
|
capture: true
|
|
1438
1420
|
},
|
|
1439
1421
|
key: "eventListener"
|
|
1440
|
-
}), /*#__PURE__*/external_react_default.
|
|
1422
|
+
}), /*#__PURE__*/external_react_default().createElement((EventListener_default()), {
|
|
1441
1423
|
target: window,
|
|
1442
1424
|
eventType: "resize",
|
|
1443
1425
|
listener: this.setPlacement,
|
|
1444
1426
|
key: "eventListenerOnWindowResize"
|
|
1445
|
-
}), /*#__PURE__*/external_react_default.
|
|
1427
|
+
}), /*#__PURE__*/external_react_default().createElement((EventListener_default()), {
|
|
1446
1428
|
target: window,
|
|
1447
1429
|
eventType: "scroll",
|
|
1448
1430
|
listener: this.handleWindowScroll,
|
|
@@ -1451,32 +1433,33 @@ var Popover_Popover = /*#__PURE__*/function (_Component) {
|
|
|
1451
1433
|
capture: true
|
|
1452
1434
|
},
|
|
1453
1435
|
key: "eventListenerOnWindowScroll"
|
|
1454
|
-
})
|
|
1436
|
+
})] : [];
|
|
1437
|
+
return [].concat(eventListeners, [/*#__PURE__*/external_react_default().createElement((Layer_default()), {
|
|
1455
1438
|
closeReasons: intersection_default()(this.props.closeReasons.filter(function (reason) {
|
|
1456
1439
|
return reason !== 'offScreen';
|
|
1457
|
-
}), Layer_default.
|
|
1440
|
+
}), (Layer_default()).possibleCloseReasons),
|
|
1458
1441
|
open: open,
|
|
1459
1442
|
onRequestClose: this.handleRequestClose,
|
|
1460
1443
|
key: "Layer"
|
|
1461
|
-
}, open && this.innerContainerEl && this.props.hitAreaRef && /*#__PURE__*/external_react_default.
|
|
1444
|
+
}, open && this.innerContainerEl && this.props.hitAreaRef && /*#__PURE__*/external_react_default().createElement(Popover_PopoverHitArea, {
|
|
1462
1445
|
anchorRect: anchorPos,
|
|
1463
1446
|
popoverEl: this.innerContainerEl,
|
|
1464
1447
|
popoverPlacement: placement,
|
|
1465
1448
|
ref: this.props.hitAreaRef
|
|
1466
|
-
}), open && this.renderLayer())];
|
|
1449
|
+
}), open && this.renderLayer())]);
|
|
1467
1450
|
}
|
|
1468
1451
|
}]);
|
|
1469
1452
|
|
|
1470
1453
|
return Popover;
|
|
1471
|
-
}(
|
|
1454
|
+
}(external_react_namespaceObject.Component);
|
|
1472
1455
|
|
|
1473
|
-
Popover_defineProperty(
|
|
1456
|
+
Popover_defineProperty(Popover, "contextType", (ScrollContainerContext_default()));
|
|
1474
1457
|
|
|
1475
|
-
Popover_defineProperty(
|
|
1458
|
+
Popover_defineProperty(Popover, "defaultProps", defaultProps);
|
|
1476
1459
|
|
|
1477
|
-
Popover_defineProperty(
|
|
1460
|
+
Popover_defineProperty(Popover, "propTypes", Popover_propTypes);
|
|
1478
1461
|
|
|
1479
|
-
Popover_defineProperty(
|
|
1462
|
+
Popover_defineProperty(Popover, "getDerivedStateFromProps", function (props, state) {
|
|
1480
1463
|
if (props.open !== state.prevOpen) {
|
|
1481
1464
|
return {
|
|
1482
1465
|
animating: props.animation,
|
|
@@ -1487,183 +1470,13 @@ Popover_defineProperty(Popover_Popover, "getDerivedStateFromProps", function (pr
|
|
|
1487
1470
|
return null;
|
|
1488
1471
|
});
|
|
1489
1472
|
|
|
1490
|
-
var PopoverWithTheme =
|
|
1491
|
-
PopoverWithTheme.propTypes =
|
|
1492
|
-
/* harmony default export */
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
/***/ }),
|
|
1499
|
-
|
|
1500
|
-
/***/ 19:
|
|
1501
|
-
/***/ (function(module, exports) {
|
|
1502
|
-
|
|
1503
|
-
module.exports = require("lodash/isFinite");
|
|
1504
|
-
|
|
1505
|
-
/***/ }),
|
|
1506
|
-
|
|
1507
|
-
/***/ 2:
|
|
1508
|
-
/***/ (function(module, exports) {
|
|
1509
|
-
|
|
1510
|
-
module.exports = require("react");
|
|
1511
|
-
|
|
1512
|
-
/***/ }),
|
|
1513
|
-
|
|
1514
|
-
/***/ 24:
|
|
1515
|
-
/***/ (function(module, exports) {
|
|
1516
|
-
|
|
1517
|
-
module.exports = require("react-spring");
|
|
1518
|
-
|
|
1519
|
-
/***/ }),
|
|
1520
|
-
|
|
1521
|
-
/***/ 27:
|
|
1522
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1523
|
-
|
|
1524
|
-
"use strict";
|
|
1525
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getDocument; });
|
|
1526
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return ssrDocument; });
|
|
1527
|
-
/* eslint-disable @typescript-eslint/no-empty-function */
|
|
1528
|
-
var ssrDocument = {
|
|
1529
|
-
body: {
|
|
1530
|
-
appendChild: function appendChild() {
|
|
1531
|
-
return [];
|
|
1532
|
-
}
|
|
1533
|
-
},
|
|
1534
|
-
addEventListener: function addEventListener() {},
|
|
1535
|
-
removeEventListener: function removeEventListener() {},
|
|
1536
|
-
activeElement: {
|
|
1537
|
-
blur: function blur() {},
|
|
1538
|
-
nodeName: ''
|
|
1539
|
-
},
|
|
1540
|
-
querySelector: function querySelector() {
|
|
1541
|
-
return null;
|
|
1542
|
-
},
|
|
1543
|
-
querySelectorAll: function querySelectorAll() {
|
|
1544
|
-
return [];
|
|
1545
|
-
},
|
|
1546
|
-
getElementById: function getElementById() {
|
|
1547
|
-
return null;
|
|
1548
|
-
},
|
|
1549
|
-
createEvent: function createEvent() {
|
|
1550
|
-
return {
|
|
1551
|
-
initEvent: function initEvent() {}
|
|
1552
|
-
};
|
|
1553
|
-
},
|
|
1554
|
-
createElement: function createElement() {
|
|
1555
|
-
return {
|
|
1556
|
-
children: [],
|
|
1557
|
-
childNodes: [],
|
|
1558
|
-
style: {},
|
|
1559
|
-
setAttribute: function setAttribute() {},
|
|
1560
|
-
getElementsByTagName: function getElementsByTagName() {
|
|
1561
|
-
return [];
|
|
1562
|
-
}
|
|
1563
|
-
};
|
|
1564
|
-
},
|
|
1565
|
-
createElementNS: function createElementNS() {
|
|
1566
|
-
return {};
|
|
1567
|
-
},
|
|
1568
|
-
importNode: function importNode() {
|
|
1569
|
-
return null;
|
|
1570
|
-
},
|
|
1571
|
-
location: {
|
|
1572
|
-
hash: '',
|
|
1573
|
-
host: '',
|
|
1574
|
-
hostname: '',
|
|
1575
|
-
href: '',
|
|
1576
|
-
origin: '',
|
|
1577
|
-
pathname: '',
|
|
1578
|
-
protocol: '',
|
|
1579
|
-
search: ''
|
|
1580
|
-
}
|
|
1581
|
-
};
|
|
1582
|
-
|
|
1583
|
-
function getDocument() {
|
|
1584
|
-
var doc = typeof document !== 'undefined' ? document : ssrDocument;
|
|
1585
|
-
return doc;
|
|
1586
|
-
}
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
/***/ }),
|
|
1591
|
-
|
|
1592
|
-
/***/ 29:
|
|
1593
|
-
/***/ (function(module, exports) {
|
|
1594
|
-
|
|
1595
|
-
module.exports = require("@splunk/ui-utils/focus");
|
|
1596
|
-
|
|
1597
|
-
/***/ }),
|
|
1598
|
-
|
|
1599
|
-
/***/ 3:
|
|
1600
|
-
/***/ (function(module, exports) {
|
|
1601
|
-
|
|
1602
|
-
module.exports = require("styled-components");
|
|
1603
|
-
|
|
1604
|
-
/***/ }),
|
|
1605
|
-
|
|
1606
|
-
/***/ 31:
|
|
1607
|
-
/***/ (function(module, exports) {
|
|
1608
|
-
|
|
1609
|
-
module.exports = require("lodash/throttle");
|
|
1610
|
-
|
|
1611
|
-
/***/ }),
|
|
1612
|
-
|
|
1613
|
-
/***/ 40:
|
|
1614
|
-
/***/ (function(module, exports) {
|
|
1615
|
-
|
|
1616
|
-
module.exports = require("@splunk/react-ui/Animation");
|
|
1617
|
-
|
|
1618
|
-
/***/ }),
|
|
1619
|
-
|
|
1620
|
-
/***/ 5:
|
|
1621
|
-
/***/ (function(module, exports) {
|
|
1622
|
-
|
|
1623
|
-
module.exports = require("lodash/omit");
|
|
1624
|
-
|
|
1625
|
-
/***/ }),
|
|
1626
|
-
|
|
1627
|
-
/***/ 50:
|
|
1628
|
-
/***/ (function(module, exports) {
|
|
1629
|
-
|
|
1630
|
-
module.exports = require("@splunk/react-ui/ScrollContainerContext");
|
|
1631
|
-
|
|
1632
|
-
/***/ }),
|
|
1633
|
-
|
|
1634
|
-
/***/ 55:
|
|
1635
|
-
/***/ (function(module, exports) {
|
|
1636
|
-
|
|
1637
|
-
module.exports = require("lodash/defer");
|
|
1638
|
-
|
|
1639
|
-
/***/ }),
|
|
1640
|
-
|
|
1641
|
-
/***/ 69:
|
|
1642
|
-
/***/ (function(module, exports) {
|
|
1643
|
-
|
|
1644
|
-
module.exports = require("lodash/isFunction");
|
|
1645
|
-
|
|
1646
|
-
/***/ }),
|
|
1647
|
-
|
|
1648
|
-
/***/ 83:
|
|
1649
|
-
/***/ (function(module, exports) {
|
|
1650
|
-
|
|
1651
|
-
module.exports = require("@splunk/react-ui/Layer");
|
|
1652
|
-
|
|
1653
|
-
/***/ }),
|
|
1654
|
-
|
|
1655
|
-
/***/ 9:
|
|
1656
|
-
/***/ (function(module, exports) {
|
|
1657
|
-
|
|
1658
|
-
module.exports = require("lodash/keys");
|
|
1659
|
-
|
|
1660
|
-
/***/ }),
|
|
1661
|
-
|
|
1662
|
-
/***/ 91:
|
|
1663
|
-
/***/ (function(module, exports) {
|
|
1473
|
+
var PopoverWithTheme = (0,themes_namespaceObject.withSplunkTheme)(Popover);
|
|
1474
|
+
PopoverWithTheme.propTypes = Popover.propTypes;
|
|
1475
|
+
/* harmony default export */ const Popover_Popover = (PopoverWithTheme);
|
|
1476
|
+
;// CONCATENATED MODULE: ./src/Popover/index.ts
|
|
1664
1477
|
|
|
1665
|
-
module.exports = require("react-dom");
|
|
1666
1478
|
|
|
1667
|
-
/***/ })
|
|
1668
1479
|
|
|
1669
|
-
|
|
1480
|
+
module.exports = __webpack_exports__;
|
|
1481
|
+
/******/ })()
|
|
1482
|
+
;
|