@splunk/react-ui 4.20.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.js +105 -197
- package/Button.js +168 -316
- package/ButtonGroup.js +84 -168
- package/ButtonSimple.js +224 -324
- package/CHANGELOG.md +21 -0
- package/Calendar.js +264 -462
- package/Card.js +223 -371
- package/CardLayout.js +87 -163
- package/Chip.js +199 -323
- package/Clickable.js +128 -246
- package/CloseButton.js +92 -200
- package/Code.js +162 -250
- 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 -354
- package/Menu.js +489 -760
- 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 +1135 -1761
- package/Number.js +178 -334
- package/Paginator.js +170 -336
- package/Paragraph.js +77 -153
- package/Popover.js +370 -620
- package/Progress.js +139 -255
- package/RadioBar.js +156 -280
- package/RadioList.js +182 -282
- package/Resize.js +173 -307
- package/ResultsMenu.js +161 -303
- package/ScreenReaderContent.js +75 -151
- package/Scroll.js +125 -267
- package/ScrollContainerContext.js +129 -201
- package/Search.js +188 -354
- package/Select.js +1028 -1430
- 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 +943 -1448
- 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 +14 -15
- package/stubs-splunkui.d.ts +4 -1
- package/types/src/ComboBox/Option.d.ts +1 -1
- package/types/src/Concertina/Concertina.d.ts +4 -0
- package/types/src/Link/Link.d.ts +7 -3
- package/types/src/Link/docs/examples/NewWindow.d.ts +2 -0
- package/types/src/Markdown/Markdown.d.ts +1 -1
- package/types/src/Markdown/renderers/MarkdownHeading.d.ts +1 -1
- package/types/src/Menu/Item.d.ts +1 -1
- package/types/src/Menu/Menu.d.ts +1 -0
- package/types/src/MessageBar/docs/examples/WithActions.d.ts +2 -0
- package/types/src/Multiselect/Option.d.ts +1 -1
- package/types/src/Search/Option.d.ts +1 -1
- package/types/src/Select/Option.d.ts +1 -1
- package/types/src/Select/OptionBase.d.ts +1 -1
- package/types/src/fixtures/FetchOptions.d.ts +2 -8
- package/useForceUpdate.js +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/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/ResultsMenu.js
CHANGED
|
@@ -1,270 +1,164 @@
|
|
|
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 = 230);
|
|
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
|
-
/***/ 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
|
-
/***/ 13:
|
|
132
|
-
/***/ (function(module, exports) {
|
|
133
|
-
|
|
134
|
-
module.exports = require("@splunk/react-ui/Menu");
|
|
135
|
-
|
|
136
|
-
/***/ }),
|
|
137
|
-
|
|
138
|
-
/***/ 153:
|
|
139
|
-
/***/ (function(module, exports) {
|
|
140
|
-
|
|
141
|
-
module.exports = require("@splunk/ui-utils/userAgent");
|
|
142
|
-
|
|
143
|
-
/***/ }),
|
|
144
|
-
|
|
145
|
-
/***/ 154:
|
|
146
|
-
/***/ (function(module, exports) {
|
|
147
|
-
|
|
148
|
-
module.exports = require("@splunk/react-ui/WaitSpinner");
|
|
149
|
-
|
|
150
|
-
/***/ }),
|
|
151
|
-
|
|
152
|
-
/***/ 2:
|
|
153
|
-
/***/ (function(module, exports) {
|
|
154
|
-
|
|
155
|
-
module.exports = require("react");
|
|
156
|
-
|
|
157
|
-
/***/ }),
|
|
158
|
-
|
|
159
|
-
/***/ 230:
|
|
160
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
161
|
-
|
|
162
|
-
"use strict";
|
|
48
|
+
var __webpack_exports__ = {};
|
|
163
49
|
// ESM COMPAT FLAG
|
|
164
50
|
__webpack_require__.r(__webpack_exports__);
|
|
165
51
|
|
|
166
52
|
// EXPORTS
|
|
167
|
-
__webpack_require__.d(__webpack_exports__,
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
var external_react_ = __webpack_require__(2);
|
|
171
|
-
var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
|
|
172
|
-
|
|
173
|
-
// EXTERNAL MODULE: external "prop-types"
|
|
174
|
-
var external_prop_types_ = __webpack_require__(1);
|
|
175
|
-
var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_);
|
|
176
|
-
|
|
177
|
-
// EXTERNAL MODULE: external "lodash/keys"
|
|
178
|
-
var keys_ = __webpack_require__(9);
|
|
179
|
-
var keys_default = /*#__PURE__*/__webpack_require__.n(keys_);
|
|
180
|
-
|
|
181
|
-
// EXTERNAL MODULE: external "lodash/memoize"
|
|
182
|
-
var memoize_ = __webpack_require__(40);
|
|
183
|
-
var memoize_default = /*#__PURE__*/__webpack_require__.n(memoize_);
|
|
184
|
-
|
|
185
|
-
// EXTERNAL MODULE: external "lodash/omit"
|
|
186
|
-
var omit_ = __webpack_require__(5);
|
|
187
|
-
var omit_default = /*#__PURE__*/__webpack_require__.n(omit_);
|
|
188
|
-
|
|
189
|
-
// EXTERNAL MODULE: external "@splunk/ui-utils/i18n"
|
|
190
|
-
var i18n_ = __webpack_require__(4);
|
|
191
|
-
|
|
192
|
-
// EXTERNAL MODULE: external "@splunk/ui-utils/userAgent"
|
|
193
|
-
var userAgent_ = __webpack_require__(153);
|
|
194
|
-
|
|
195
|
-
// EXTERNAL MODULE: external "@splunk/react-ui/Menu"
|
|
196
|
-
var Menu_ = __webpack_require__(13);
|
|
197
|
-
var Menu_default = /*#__PURE__*/__webpack_require__.n(Menu_);
|
|
198
|
-
|
|
199
|
-
// EXTERNAL MODULE: external "styled-components"
|
|
200
|
-
var external_styled_components_ = __webpack_require__(3);
|
|
201
|
-
var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_);
|
|
202
|
-
|
|
203
|
-
// EXTERNAL MODULE: external "@splunk/react-ui/WaitSpinner"
|
|
204
|
-
var WaitSpinner_ = __webpack_require__(154);
|
|
205
|
-
var WaitSpinner_default = /*#__PURE__*/__webpack_require__.n(WaitSpinner_);
|
|
206
|
-
|
|
207
|
-
// EXTERNAL MODULE: external "@splunk/themes"
|
|
208
|
-
var themes_ = __webpack_require__(0);
|
|
209
|
-
|
|
210
|
-
// CONCATENATED MODULE: ./src/ResultsMenu/ResultsMenuStyles.ts
|
|
211
|
-
|
|
212
|
-
|
|
53
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
54
|
+
"default": () => (/* reexport */ ResultsMenu_ResultsMenu)
|
|
55
|
+
});
|
|
213
56
|
|
|
214
|
-
|
|
57
|
+
;// CONCATENATED MODULE: external "react"
|
|
58
|
+
const external_react_namespaceObject = require("react");
|
|
59
|
+
var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_namespaceObject);
|
|
60
|
+
;// CONCATENATED MODULE: external "prop-types"
|
|
61
|
+
const external_prop_types_namespaceObject = require("prop-types");
|
|
62
|
+
var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_namespaceObject);
|
|
63
|
+
;// CONCATENATED MODULE: external "lodash/keys"
|
|
64
|
+
const keys_namespaceObject = require("lodash/keys");
|
|
65
|
+
var keys_default = /*#__PURE__*/__webpack_require__.n(keys_namespaceObject);
|
|
66
|
+
;// CONCATENATED MODULE: external "lodash/memoize"
|
|
67
|
+
const memoize_namespaceObject = require("lodash/memoize");
|
|
68
|
+
var memoize_default = /*#__PURE__*/__webpack_require__.n(memoize_namespaceObject);
|
|
69
|
+
;// CONCATENATED MODULE: external "lodash/omit"
|
|
70
|
+
const omit_namespaceObject = require("lodash/omit");
|
|
71
|
+
var omit_default = /*#__PURE__*/__webpack_require__.n(omit_namespaceObject);
|
|
72
|
+
;// CONCATENATED MODULE: external "@splunk/ui-utils/i18n"
|
|
73
|
+
const i18n_namespaceObject = require("@splunk/ui-utils/i18n");
|
|
74
|
+
;// CONCATENATED MODULE: external "@splunk/ui-utils/userAgent"
|
|
75
|
+
const userAgent_namespaceObject = require("@splunk/ui-utils/userAgent");
|
|
76
|
+
;// CONCATENATED MODULE: external "@splunk/react-ui/Menu"
|
|
77
|
+
const Menu_namespaceObject = require("@splunk/react-ui/Menu");
|
|
78
|
+
var Menu_default = /*#__PURE__*/__webpack_require__.n(Menu_namespaceObject);
|
|
79
|
+
;// CONCATENATED MODULE: external "styled-components"
|
|
80
|
+
const external_styled_components_namespaceObject = require("styled-components");
|
|
81
|
+
var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_namespaceObject);
|
|
82
|
+
;// CONCATENATED MODULE: external "@splunk/react-ui/WaitSpinner"
|
|
83
|
+
const WaitSpinner_namespaceObject = require("@splunk/react-ui/WaitSpinner");
|
|
84
|
+
var WaitSpinner_default = /*#__PURE__*/__webpack_require__.n(WaitSpinner_namespaceObject);
|
|
85
|
+
;// CONCATENATED MODULE: external "@splunk/themes"
|
|
86
|
+
const themes_namespaceObject = require("@splunk/themes");
|
|
87
|
+
;// CONCATENATED MODULE: ./src/ResultsMenu/ResultsMenuStyles.ts
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
var Styled = external_styled_components_default().div.withConfig({
|
|
215
92
|
displayName: "ResultsMenuStyles__Styled",
|
|
216
93
|
componentId: "avbhl8-0"
|
|
217
|
-
})(["", ";flex-direction:column;max-height:calc(100vh - 20px);", ""],
|
|
218
|
-
prisma:
|
|
94
|
+
})(["", ";flex-direction:column;max-height:calc(100vh - 20px);", ""], themes_namespaceObject.mixins.reset('flex'), (0,themes_namespaceObject.pick)({
|
|
95
|
+
prisma: (0,external_styled_components_namespaceObject.css)(["border-radius:", ";background-color:", ";"], themes_namespaceObject.variables.borderRadius, themes_namespaceObject.variables.backgroundColorPopup)
|
|
219
96
|
}));
|
|
220
|
-
var StyledFooter = external_styled_components_default.
|
|
97
|
+
var StyledFooter = external_styled_components_default().div.withConfig({
|
|
221
98
|
displayName: "ResultsMenuStyles__StyledFooter",
|
|
222
99
|
componentId: "avbhl8-1"
|
|
223
|
-
})(["padding:", ";color:", ";", ""],
|
|
100
|
+
})(["padding:", ";color:", ";", ""], (0,themes_namespaceObject.pick)({
|
|
224
101
|
prisma: {
|
|
225
102
|
comfortable: '10px 16px',
|
|
226
103
|
compact: '6px 16px'
|
|
227
104
|
},
|
|
228
105
|
enterprise: '6px 10px'
|
|
229
|
-
}),
|
|
230
|
-
prisma:
|
|
231
|
-
enterprise:
|
|
106
|
+
}), (0,themes_namespaceObject.pick)({
|
|
107
|
+
prisma: themes_namespaceObject.variables.contentColorMuted,
|
|
108
|
+
enterprise: themes_namespaceObject.variables.textGray
|
|
232
109
|
}), function (_ref) {
|
|
233
110
|
var $placement = _ref.$placement;
|
|
234
|
-
return $placement === 'above' ?
|
|
235
|
-
prisma:
|
|
236
|
-
enterprise:
|
|
237
|
-
}) :
|
|
238
|
-
prisma:
|
|
239
|
-
enterprise:
|
|
111
|
+
return $placement === 'above' ? (0,themes_namespaceObject.pick)({
|
|
112
|
+
prisma: (0,external_styled_components_namespaceObject.css)(["border-bottom:1px solid ", ";"], themes_namespaceObject.variables.neutral200),
|
|
113
|
+
enterprise: (0,external_styled_components_namespaceObject.css)(["border-bottom:", ";"], themes_namespaceObject.variables.border)
|
|
114
|
+
}) : (0,themes_namespaceObject.pick)({
|
|
115
|
+
prisma: (0,external_styled_components_namespaceObject.css)(["border-top:1px solid ", ";"], themes_namespaceObject.variables.neutral200),
|
|
116
|
+
enterprise: (0,external_styled_components_namespaceObject.css)(["border-top:", ";"], themes_namespaceObject.variables.border)
|
|
240
117
|
});
|
|
241
118
|
});
|
|
242
|
-
var StyledLoading = external_styled_components_default.
|
|
119
|
+
var StyledLoading = external_styled_components_default().li.withConfig({
|
|
243
120
|
displayName: "ResultsMenuStyles__StyledLoading",
|
|
244
121
|
componentId: "avbhl8-2"
|
|
245
|
-
})(["", ";padding:", ";gap:", ";"],
|
|
122
|
+
})(["", ";padding:", ";gap:", ";"], themes_namespaceObject.mixins.reset('flex'), (0,themes_namespaceObject.pick)({
|
|
246
123
|
prisma: {
|
|
247
124
|
comfortable: '10px 16px',
|
|
248
125
|
compact: '6px 16px'
|
|
249
126
|
},
|
|
250
127
|
enterprise: '6px 10px'
|
|
251
|
-
}),
|
|
252
|
-
var StyledWait = external_styled_components_default()(WaitSpinner_default
|
|
128
|
+
}), themes_namespaceObject.variables.spacingXSmall);
|
|
129
|
+
var StyledWait = external_styled_components_default()((WaitSpinner_default())).withConfig({
|
|
253
130
|
displayName: "ResultsMenuStyles__StyledWait",
|
|
254
131
|
componentId: "avbhl8-3"
|
|
255
132
|
})(["flex:0 0 auto;"]);
|
|
256
|
-
var StyledLoadingMessage = external_styled_components_default.
|
|
133
|
+
var StyledLoadingMessage = external_styled_components_default().div.withConfig({
|
|
257
134
|
displayName: "ResultsMenuStyles__StyledLoadingMessage",
|
|
258
135
|
componentId: "avbhl8-4"
|
|
259
|
-
})(["flex:1 0 0;color:", ";"],
|
|
260
|
-
prisma:
|
|
261
|
-
enterprise:
|
|
136
|
+
})(["flex:1 0 0;color:", ";"], (0,themes_namespaceObject.pick)({
|
|
137
|
+
prisma: themes_namespaceObject.variables.contentColorMuted,
|
|
138
|
+
enterprise: themes_namespaceObject.variables.textGray
|
|
262
139
|
}));
|
|
263
140
|
|
|
264
|
-
|
|
265
|
-
|
|
141
|
+
;// CONCATENATED MODULE: ./src/utils/updateReactRef.ts
|
|
142
|
+
/**
|
|
143
|
+
* Updates a React ref. Callback refs and object refs (from `createRef` and `useRef`) are supported.
|
|
144
|
+
*
|
|
145
|
+
* @param ref - The React callback or object ref. Can be `null` or `undefined`.
|
|
146
|
+
* @param current - The new value of the ref.
|
|
147
|
+
*/
|
|
148
|
+
function updateReactRef(ref, current) {
|
|
149
|
+
if (ref) {
|
|
150
|
+
if (typeof ref === 'function') {
|
|
151
|
+
ref(current);
|
|
152
|
+
} else {
|
|
153
|
+
// the public signature of this util uses React.Ref<T> to mirror the way React types refs.
|
|
154
|
+
// the intention here is to signal "we will take care of setting 'current', not you".
|
|
155
|
+
ref.current = current; // eslint-disable-line no-param-reassign
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
266
160
|
|
|
267
|
-
|
|
161
|
+
;// CONCATENATED MODULE: ./src/ResultsMenu/ResultsMenu.tsx
|
|
268
162
|
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); }
|
|
269
163
|
|
|
270
164
|
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); }
|
|
@@ -302,27 +196,27 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
302
196
|
|
|
303
197
|
|
|
304
198
|
var propTypes = {
|
|
305
|
-
animateLoading: external_prop_types_default.
|
|
306
|
-
children: external_prop_types_default.
|
|
199
|
+
animateLoading: (external_prop_types_default()).bool,
|
|
200
|
+
children: (external_prop_types_default()).node,
|
|
307
201
|
|
|
308
202
|
/** @private */
|
|
309
|
-
controlledExternally: external_prop_types_default.
|
|
310
|
-
childrenStart: external_prop_types_default.
|
|
311
|
-
elementRef: external_prop_types_default.
|
|
312
|
-
footerMessage: external_prop_types_default.
|
|
313
|
-
isLoading: external_prop_types_default.
|
|
314
|
-
loadingMessage: external_prop_types_default.
|
|
315
|
-
maxHeight: external_prop_types_default.
|
|
316
|
-
noOptionsMessage: external_prop_types_default.
|
|
317
|
-
onScroll: external_prop_types_default.
|
|
318
|
-
onScrollBottom: external_prop_types_default.
|
|
319
|
-
placement: external_prop_types_default.
|
|
203
|
+
controlledExternally: (external_prop_types_default()).bool,
|
|
204
|
+
childrenStart: (external_prop_types_default()).node,
|
|
205
|
+
elementRef: external_prop_types_default().oneOfType([(external_prop_types_default()).func, (external_prop_types_default()).object]),
|
|
206
|
+
footerMessage: (external_prop_types_default()).node,
|
|
207
|
+
isLoading: (external_prop_types_default()).bool,
|
|
208
|
+
loadingMessage: (external_prop_types_default()).node,
|
|
209
|
+
maxHeight: (external_prop_types_default()).number,
|
|
210
|
+
noOptionsMessage: (external_prop_types_default()).node,
|
|
211
|
+
onScroll: (external_prop_types_default()).func,
|
|
212
|
+
onScrollBottom: (external_prop_types_default()).func,
|
|
213
|
+
placement: (external_prop_types_default()).string
|
|
320
214
|
};
|
|
321
215
|
var defaultProps = {
|
|
322
216
|
animateLoading: false,
|
|
323
217
|
isLoading: false,
|
|
324
|
-
loadingMessage:
|
|
325
|
-
noOptionsMessage:
|
|
218
|
+
loadingMessage: (0,i18n_namespaceObject._)('Loading...'),
|
|
219
|
+
noOptionsMessage: (0,i18n_namespaceObject._)('No matches')
|
|
326
220
|
};
|
|
327
221
|
var menuContextRole = {
|
|
328
222
|
role: 'listbox'
|
|
@@ -341,7 +235,7 @@ var getMenuBottomInlineStyle = memoize_default()(function (height) {
|
|
|
341
235
|
});
|
|
342
236
|
|
|
343
237
|
// @docs-props-type ResultsMenuPropsBase
|
|
344
|
-
var
|
|
238
|
+
var ResultsMenu = /*#__PURE__*/function (_Component) {
|
|
345
239
|
_inherits(ResultsMenu, _Component);
|
|
346
240
|
|
|
347
241
|
var _super = _createSuper(ResultsMenu);
|
|
@@ -368,7 +262,7 @@ var ResultsMenu_ResultsMenu = /*#__PURE__*/function (_Component) {
|
|
|
368
262
|
containerEl: el
|
|
369
263
|
});
|
|
370
264
|
|
|
371
|
-
|
|
265
|
+
updateReactRef(_this.props.elementRef, el);
|
|
372
266
|
});
|
|
373
267
|
|
|
374
268
|
_defineProperty(_assertThisInitialized(_this), "handleMouseEnter", function () {
|
|
@@ -406,7 +300,7 @@ var ResultsMenu_ResultsMenu = /*#__PURE__*/function (_Component) {
|
|
|
406
300
|
});
|
|
407
301
|
|
|
408
302
|
_defineProperty(_assertThisInitialized(_this), "handleScrollBottomOnFullMenu", function () {
|
|
409
|
-
var currentChildrenCount =
|
|
303
|
+
var currentChildrenCount = external_react_namespaceObject.Children.count(_this.props.children);
|
|
410
304
|
var _this$state = _this.state,
|
|
411
305
|
childrenCount = _this$state.childrenCount,
|
|
412
306
|
menuMaxHeight = _this$state.menuMaxHeight; // If menu is full length, load more items.
|
|
@@ -454,7 +348,7 @@ var ResultsMenu_ResultsMenu = /*#__PURE__*/function (_Component) {
|
|
|
454
348
|
menuEl = _this$state2.menuEl,
|
|
455
349
|
menuMaxHeight = _this$state2.menuMaxHeight;
|
|
456
350
|
|
|
457
|
-
if (!
|
|
351
|
+
if (!userAgent_namespaceObject.isIE11 || !containerEl || !menuEl) {
|
|
458
352
|
return;
|
|
459
353
|
}
|
|
460
354
|
|
|
@@ -497,7 +391,7 @@ var ResultsMenu_ResultsMenu = /*#__PURE__*/function (_Component) {
|
|
|
497
391
|
}, {
|
|
498
392
|
key: "renderFooterMessage",
|
|
499
393
|
value: function renderFooterMessage() {
|
|
500
|
-
return this.props.footerMessage && !!
|
|
394
|
+
return this.props.footerMessage && !!external_react_namespaceObject.Children.toArray(this.props.children).length && /*#__PURE__*/external_react_default().createElement(StyledFooter, {
|
|
501
395
|
$placement: this.props.placement,
|
|
502
396
|
"data-test": "footer-message",
|
|
503
397
|
key: "footer"
|
|
@@ -520,25 +414,25 @@ var ResultsMenu_ResultsMenu = /*#__PURE__*/function (_Component) {
|
|
|
520
414
|
tabIndex = _this$props3.tabIndex;
|
|
521
415
|
var otherProps = omit_default()(this.props, keys_default()(ResultsMenu.propTypes));
|
|
522
416
|
// Assumption: that you cannot be filtered if you are a result
|
|
523
|
-
var hasResults =
|
|
417
|
+
var hasResults = external_react_namespaceObject.Children.toArray(children).filter(external_react_namespaceObject.isValidElement).some(function (_ref) {
|
|
524
418
|
var type = _ref.type;
|
|
525
|
-
return !(type ===
|
|
419
|
+
return !(type === Menu_namespaceObject.Divider && type.filterFirst || (type === Menu_namespaceObject.Divider || type === Menu_namespaceObject.Heading) && (type.filterLast || type.filterConsecutive));
|
|
526
420
|
});
|
|
527
421
|
var fullHeight = this.checkFullHeight();
|
|
528
422
|
var menuInlineStyle = getMenuInlineStyle(this.state.menuMaxHeight);
|
|
529
423
|
var menuBottomInlineStyle = getMenuBottomInlineStyle(this.state.scrollBottomTriggered ? this.state.numberOfItemsLoaded * this.itemMinHeight || 0 : 0);
|
|
530
424
|
/* eslint-disable jsx-a11y/aria-role */
|
|
531
425
|
|
|
532
|
-
return /*#__PURE__*/external_react_default.
|
|
426
|
+
return /*#__PURE__*/external_react_default().createElement(Styled, _extends({
|
|
533
427
|
key: "wrapper",
|
|
534
428
|
style: style,
|
|
535
429
|
ref: this.handleMount,
|
|
536
430
|
onWheel: onScrollBottom ? this.handleWheelMenu : undefined,
|
|
537
431
|
onMouseEnter: onScrollBottom ? this.handleMouseEnter : undefined,
|
|
538
432
|
onMouseLeave: onScrollBottom ? this.handleMouseLeave : undefined
|
|
539
|
-
}, omit_default()(otherProps, 'tabIndex')), placement !== 'above' && childrenStart, placement === 'above' && this.renderFooterMessage(), /*#__PURE__*/external_react_default.
|
|
433
|
+
}, omit_default()(otherProps, 'tabIndex')), placement !== 'above' && childrenStart, placement === 'above' && this.renderFooterMessage(), /*#__PURE__*/external_react_default().createElement(Menu_namespaceObject.MenuContext.Provider, {
|
|
540
434
|
value: menuContextRole
|
|
541
|
-
}, /*#__PURE__*/external_react_default.
|
|
435
|
+
}, /*#__PURE__*/external_react_default().createElement((Menu_default()), {
|
|
542
436
|
key: "menu",
|
|
543
437
|
style: menuInlineStyle,
|
|
544
438
|
controlledExternally: controlledExternally,
|
|
@@ -546,66 +440,30 @@ var ResultsMenu_ResultsMenu = /*#__PURE__*/function (_Component) {
|
|
|
546
440
|
onScroll: this.handleScroll,
|
|
547
441
|
stopScrollPropagation: true,
|
|
548
442
|
tabIndex: tabIndex
|
|
549
|
-
}, !hasResults && noOptionsMessage && !isLoading && /*#__PURE__*/external_react_default.
|
|
443
|
+
}, !hasResults && noOptionsMessage && !isLoading && /*#__PURE__*/external_react_default().createElement((Menu_default()).Item, {
|
|
550
444
|
"data-test": "no-results-message",
|
|
551
445
|
disabled: true
|
|
552
446
|
}, noOptionsMessage), children, onScrollBottom && !fullHeight &&
|
|
553
447
|
/*#__PURE__*/
|
|
554
448
|
// Bottom spacer fills in the space of new items being loaded by using the minimum possible height x menuItems.
|
|
555
|
-
external_react_default.
|
|
449
|
+
external_react_default().createElement("div", {
|
|
556
450
|
"data-test": "results-menu-bottom-spacer",
|
|
557
451
|
style: menuBottomInlineStyle
|
|
558
|
-
}), isLoading && /*#__PURE__*/external_react_default.
|
|
452
|
+
}), isLoading && /*#__PURE__*/external_react_default().createElement(StyledLoading, null, animateLoading && /*#__PURE__*/external_react_default().createElement(StyledWait, null), /*#__PURE__*/external_react_default().createElement(StyledLoadingMessage, null, loadingMessage)))), placement !== 'above' && this.renderFooterMessage(), placement === 'above' && childrenStart);
|
|
559
453
|
}
|
|
560
454
|
}]);
|
|
561
455
|
|
|
562
456
|
return ResultsMenu;
|
|
563
|
-
}(
|
|
564
|
-
|
|
565
|
-
_defineProperty(ResultsMenu_ResultsMenu, "propTypes", propTypes);
|
|
566
|
-
|
|
567
|
-
_defineProperty(ResultsMenu_ResultsMenu, "defaultProps", defaultProps);
|
|
568
|
-
|
|
569
|
-
/* harmony default export */ var src_ResultsMenu_ResultsMenu = (ResultsMenu_ResultsMenu);
|
|
570
|
-
// CONCATENATED MODULE: ./src/ResultsMenu/index.ts
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
/***/ }),
|
|
575
|
-
|
|
576
|
-
/***/ 3:
|
|
577
|
-
/***/ (function(module, exports) {
|
|
578
|
-
|
|
579
|
-
module.exports = require("styled-components");
|
|
580
|
-
|
|
581
|
-
/***/ }),
|
|
582
|
-
|
|
583
|
-
/***/ 4:
|
|
584
|
-
/***/ (function(module, exports) {
|
|
585
|
-
|
|
586
|
-
module.exports = require("@splunk/ui-utils/i18n");
|
|
587
|
-
|
|
588
|
-
/***/ }),
|
|
589
|
-
|
|
590
|
-
/***/ 40:
|
|
591
|
-
/***/ (function(module, exports) {
|
|
592
|
-
|
|
593
|
-
module.exports = require("lodash/memoize");
|
|
594
|
-
|
|
595
|
-
/***/ }),
|
|
596
|
-
|
|
597
|
-
/***/ 5:
|
|
598
|
-
/***/ (function(module, exports) {
|
|
599
|
-
|
|
600
|
-
module.exports = require("lodash/omit");
|
|
457
|
+
}(external_react_namespaceObject.Component);
|
|
601
458
|
|
|
602
|
-
|
|
459
|
+
_defineProperty(ResultsMenu, "propTypes", propTypes);
|
|
603
460
|
|
|
604
|
-
|
|
605
|
-
/***/ (function(module, exports) {
|
|
461
|
+
_defineProperty(ResultsMenu, "defaultProps", defaultProps);
|
|
606
462
|
|
|
607
|
-
|
|
463
|
+
/* harmony default export */ const ResultsMenu_ResultsMenu = (ResultsMenu);
|
|
464
|
+
;// CONCATENATED MODULE: ./src/ResultsMenu/index.ts
|
|
608
465
|
|
|
609
|
-
/***/ })
|
|
610
466
|
|
|
611
|
-
|
|
467
|
+
module.exports = __webpack_exports__;
|
|
468
|
+
/******/ })()
|
|
469
|
+
;
|