@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/ResultsMenu.js
CHANGED
|
@@ -1,266 +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
|
+
/******/ }
|
|
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 = 228);
|
|
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
|
-
/***/ 13:
|
|
132
|
-
/***/ (function(module, exports) {
|
|
133
|
-
|
|
134
|
-
module.exports = require("@splunk/react-ui/Menu");
|
|
135
|
-
|
|
136
|
-
/***/ }),
|
|
137
|
-
|
|
138
|
-
/***/ 151:
|
|
139
|
-
/***/ (function(module, exports) {
|
|
140
|
-
|
|
141
|
-
module.exports = require("@splunk/ui-utils/userAgent");
|
|
142
|
-
|
|
143
|
-
/***/ }),
|
|
144
|
-
|
|
145
|
-
/***/ 152:
|
|
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
|
-
/***/ 228:
|
|
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/omit"
|
|
182
|
-
var omit_ = __webpack_require__(5);
|
|
183
|
-
var omit_default = /*#__PURE__*/__webpack_require__.n(omit_);
|
|
184
|
-
|
|
185
|
-
// EXTERNAL MODULE: external "@splunk/ui-utils/i18n"
|
|
186
|
-
var i18n_ = __webpack_require__(4);
|
|
187
|
-
|
|
188
|
-
// EXTERNAL MODULE: external "@splunk/ui-utils/userAgent"
|
|
189
|
-
var userAgent_ = __webpack_require__(151);
|
|
190
|
-
|
|
191
|
-
// EXTERNAL MODULE: external "@splunk/react-ui/Menu"
|
|
192
|
-
var Menu_ = __webpack_require__(13);
|
|
193
|
-
var Menu_default = /*#__PURE__*/__webpack_require__.n(Menu_);
|
|
194
|
-
|
|
195
|
-
// EXTERNAL MODULE: external "styled-components"
|
|
196
|
-
var external_styled_components_ = __webpack_require__(3);
|
|
197
|
-
var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_);
|
|
198
|
-
|
|
199
|
-
// EXTERNAL MODULE: external "@splunk/react-ui/WaitSpinner"
|
|
200
|
-
var WaitSpinner_ = __webpack_require__(152);
|
|
201
|
-
var WaitSpinner_default = /*#__PURE__*/__webpack_require__.n(WaitSpinner_);
|
|
202
|
-
|
|
203
|
-
// EXTERNAL MODULE: external "@splunk/themes"
|
|
204
|
-
var themes_ = __webpack_require__(0);
|
|
205
|
-
|
|
206
|
-
// CONCATENATED MODULE: ./src/ResultsMenu/ResultsMenuStyles.ts
|
|
207
|
-
|
|
208
|
-
|
|
53
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
54
|
+
"default": () => (/* reexport */ ResultsMenu_ResultsMenu)
|
|
55
|
+
});
|
|
209
56
|
|
|
210
|
-
|
|
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({
|
|
211
92
|
displayName: "ResultsMenuStyles__Styled",
|
|
212
93
|
componentId: "avbhl8-0"
|
|
213
|
-
})(["", ";flex-direction:column;max-height:calc(100vh - 20px);", ""],
|
|
214
|
-
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)
|
|
215
96
|
}));
|
|
216
|
-
var StyledFooter = external_styled_components_default.
|
|
97
|
+
var StyledFooter = external_styled_components_default().div.withConfig({
|
|
217
98
|
displayName: "ResultsMenuStyles__StyledFooter",
|
|
218
99
|
componentId: "avbhl8-1"
|
|
219
|
-
})(["padding:", ";color:", ";", ""],
|
|
100
|
+
})(["padding:", ";color:", ";", ""], (0,themes_namespaceObject.pick)({
|
|
220
101
|
prisma: {
|
|
221
102
|
comfortable: '10px 16px',
|
|
222
103
|
compact: '6px 16px'
|
|
223
104
|
},
|
|
224
105
|
enterprise: '6px 10px'
|
|
225
|
-
}),
|
|
226
|
-
prisma:
|
|
227
|
-
enterprise:
|
|
106
|
+
}), (0,themes_namespaceObject.pick)({
|
|
107
|
+
prisma: themes_namespaceObject.variables.contentColorMuted,
|
|
108
|
+
enterprise: themes_namespaceObject.variables.textGray
|
|
228
109
|
}), function (_ref) {
|
|
229
110
|
var $placement = _ref.$placement;
|
|
230
|
-
return $placement === 'above' ?
|
|
231
|
-
prisma:
|
|
232
|
-
enterprise:
|
|
233
|
-
}) :
|
|
234
|
-
prisma:
|
|
235
|
-
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)
|
|
236
117
|
});
|
|
237
118
|
});
|
|
238
|
-
var StyledLoading = external_styled_components_default.
|
|
119
|
+
var StyledLoading = external_styled_components_default().li.withConfig({
|
|
239
120
|
displayName: "ResultsMenuStyles__StyledLoading",
|
|
240
121
|
componentId: "avbhl8-2"
|
|
241
|
-
})(["", ";padding:", ";"
|
|
122
|
+
})(["", ";padding:", ";gap:", ";"], themes_namespaceObject.mixins.reset('flex'), (0,themes_namespaceObject.pick)({
|
|
242
123
|
prisma: {
|
|
243
124
|
comfortable: '10px 16px',
|
|
244
125
|
compact: '6px 16px'
|
|
245
126
|
},
|
|
246
127
|
enterprise: '6px 10px'
|
|
247
|
-
}));
|
|
248
|
-
var StyledWait = external_styled_components_default()(WaitSpinner_default
|
|
128
|
+
}), themes_namespaceObject.variables.spacingXSmall);
|
|
129
|
+
var StyledWait = external_styled_components_default()((WaitSpinner_default())).withConfig({
|
|
249
130
|
displayName: "ResultsMenuStyles__StyledWait",
|
|
250
131
|
componentId: "avbhl8-3"
|
|
251
|
-
})(["
|
|
252
|
-
var StyledLoadingMessage = external_styled_components_default.
|
|
132
|
+
})(["flex:0 0 auto;"]);
|
|
133
|
+
var StyledLoadingMessage = external_styled_components_default().div.withConfig({
|
|
253
134
|
displayName: "ResultsMenuStyles__StyledLoadingMessage",
|
|
254
135
|
componentId: "avbhl8-4"
|
|
255
|
-
})(["flex:1 0 0;color:", ";"],
|
|
256
|
-
prisma:
|
|
257
|
-
enterprise:
|
|
136
|
+
})(["flex:1 0 0;color:", ";"], (0,themes_namespaceObject.pick)({
|
|
137
|
+
prisma: themes_namespaceObject.variables.contentColorMuted,
|
|
138
|
+
enterprise: themes_namespaceObject.variables.textGray
|
|
258
139
|
}));
|
|
259
140
|
|
|
260
|
-
|
|
261
|
-
|
|
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
|
+
}
|
|
262
159
|
|
|
263
|
-
|
|
160
|
+
|
|
161
|
+
;// CONCATENATED MODULE: ./src/ResultsMenu/ResultsMenu.tsx
|
|
264
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); }
|
|
265
163
|
|
|
266
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); }
|
|
@@ -296,32 +194,48 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
296
194
|
|
|
297
195
|
|
|
298
196
|
|
|
197
|
+
|
|
299
198
|
var propTypes = {
|
|
300
|
-
animateLoading: external_prop_types_default.
|
|
301
|
-
children: external_prop_types_default.
|
|
199
|
+
animateLoading: (external_prop_types_default()).bool,
|
|
200
|
+
children: (external_prop_types_default()).node,
|
|
302
201
|
|
|
303
202
|
/** @private */
|
|
304
|
-
controlledExternally: external_prop_types_default.
|
|
305
|
-
childrenStart: external_prop_types_default.
|
|
306
|
-
elementRef: external_prop_types_default.
|
|
307
|
-
footerMessage: external_prop_types_default.
|
|
308
|
-
isLoading: external_prop_types_default.
|
|
309
|
-
loadingMessage: external_prop_types_default.
|
|
310
|
-
maxHeight: external_prop_types_default.
|
|
311
|
-
noOptionsMessage: external_prop_types_default.
|
|
312
|
-
onScroll: external_prop_types_default.
|
|
313
|
-
onScrollBottom: external_prop_types_default.
|
|
314
|
-
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
|
|
315
214
|
};
|
|
316
215
|
var defaultProps = {
|
|
317
216
|
animateLoading: false,
|
|
318
217
|
isLoading: false,
|
|
319
|
-
loadingMessage:
|
|
320
|
-
noOptionsMessage:
|
|
218
|
+
loadingMessage: (0,i18n_namespaceObject._)('Loading...'),
|
|
219
|
+
noOptionsMessage: (0,i18n_namespaceObject._)('No matches')
|
|
220
|
+
};
|
|
221
|
+
var menuContextRole = {
|
|
222
|
+
role: 'listbox'
|
|
321
223
|
};
|
|
224
|
+
var getMenuInlineStyle = memoize_default()(function (menuMaxHeight) {
|
|
225
|
+
return {
|
|
226
|
+
overflow: 'auto',
|
|
227
|
+
maxHeight: menuMaxHeight || 'calc(100vh - 20px)',
|
|
228
|
+
flexDirection: 'column'
|
|
229
|
+
};
|
|
230
|
+
});
|
|
231
|
+
var getMenuBottomInlineStyle = memoize_default()(function (height) {
|
|
232
|
+
return {
|
|
233
|
+
height: height
|
|
234
|
+
};
|
|
235
|
+
});
|
|
322
236
|
|
|
323
237
|
// @docs-props-type ResultsMenuPropsBase
|
|
324
|
-
var
|
|
238
|
+
var ResultsMenu = /*#__PURE__*/function (_Component) {
|
|
325
239
|
_inherits(ResultsMenu, _Component);
|
|
326
240
|
|
|
327
241
|
var _super = _createSuper(ResultsMenu);
|
|
@@ -348,7 +262,7 @@ var ResultsMenu_ResultsMenu = /*#__PURE__*/function (_Component) {
|
|
|
348
262
|
containerEl: el
|
|
349
263
|
});
|
|
350
264
|
|
|
351
|
-
|
|
265
|
+
updateReactRef(_this.props.elementRef, el);
|
|
352
266
|
});
|
|
353
267
|
|
|
354
268
|
_defineProperty(_assertThisInitialized(_this), "handleMouseEnter", function () {
|
|
@@ -386,7 +300,7 @@ var ResultsMenu_ResultsMenu = /*#__PURE__*/function (_Component) {
|
|
|
386
300
|
});
|
|
387
301
|
|
|
388
302
|
_defineProperty(_assertThisInitialized(_this), "handleScrollBottomOnFullMenu", function () {
|
|
389
|
-
var currentChildrenCount =
|
|
303
|
+
var currentChildrenCount = external_react_namespaceObject.Children.count(_this.props.children);
|
|
390
304
|
var _this$state = _this.state,
|
|
391
305
|
childrenCount = _this$state.childrenCount,
|
|
392
306
|
menuMaxHeight = _this$state.menuMaxHeight; // If menu is full length, load more items.
|
|
@@ -434,7 +348,7 @@ var ResultsMenu_ResultsMenu = /*#__PURE__*/function (_Component) {
|
|
|
434
348
|
menuEl = _this$state2.menuEl,
|
|
435
349
|
menuMaxHeight = _this$state2.menuMaxHeight;
|
|
436
350
|
|
|
437
|
-
if (!
|
|
351
|
+
if (!userAgent_namespaceObject.isIE11 || !containerEl || !menuEl) {
|
|
438
352
|
return;
|
|
439
353
|
}
|
|
440
354
|
|
|
@@ -477,7 +391,7 @@ var ResultsMenu_ResultsMenu = /*#__PURE__*/function (_Component) {
|
|
|
477
391
|
}, {
|
|
478
392
|
key: "renderFooterMessage",
|
|
479
393
|
value: function renderFooterMessage() {
|
|
480
|
-
return this.props.footerMessage && !!
|
|
394
|
+
return this.props.footerMessage && !!external_react_namespaceObject.Children.toArray(this.props.children).length && /*#__PURE__*/external_react_default().createElement(StyledFooter, {
|
|
481
395
|
$placement: this.props.placement,
|
|
482
396
|
"data-test": "footer-message",
|
|
483
397
|
key: "footer"
|
|
@@ -500,91 +414,56 @@ var ResultsMenu_ResultsMenu = /*#__PURE__*/function (_Component) {
|
|
|
500
414
|
tabIndex = _this$props3.tabIndex;
|
|
501
415
|
var otherProps = omit_default()(this.props, keys_default()(ResultsMenu.propTypes));
|
|
502
416
|
// Assumption: that you cannot be filtered if you are a result
|
|
503
|
-
var hasResults =
|
|
417
|
+
var hasResults = external_react_namespaceObject.Children.toArray(children).filter(external_react_namespaceObject.isValidElement).some(function (_ref) {
|
|
504
418
|
var type = _ref.type;
|
|
505
|
-
return !(type ===
|
|
419
|
+
return !(type === Menu_namespaceObject.Divider && type.filterFirst || (type === Menu_namespaceObject.Divider || type === Menu_namespaceObject.Heading) && (type.filterLast || type.filterConsecutive));
|
|
506
420
|
});
|
|
507
421
|
var fullHeight = this.checkFullHeight();
|
|
422
|
+
var menuInlineStyle = getMenuInlineStyle(this.state.menuMaxHeight);
|
|
423
|
+
var menuBottomInlineStyle = getMenuBottomInlineStyle(this.state.scrollBottomTriggered ? this.state.numberOfItemsLoaded * this.itemMinHeight || 0 : 0);
|
|
508
424
|
/* eslint-disable jsx-a11y/aria-role */
|
|
509
425
|
|
|
510
|
-
return /*#__PURE__*/external_react_default.
|
|
426
|
+
return /*#__PURE__*/external_react_default().createElement(Styled, _extends({
|
|
511
427
|
key: "wrapper",
|
|
512
428
|
style: style,
|
|
513
429
|
ref: this.handleMount,
|
|
514
430
|
onWheel: onScrollBottom ? this.handleWheelMenu : undefined,
|
|
515
431
|
onMouseEnter: onScrollBottom ? this.handleMouseEnter : undefined,
|
|
516
432
|
onMouseLeave: onScrollBottom ? this.handleMouseLeave : undefined
|
|
517
|
-
}, omit_default()(otherProps, 'tabIndex')), placement !== 'above' && childrenStart, placement === 'above' && this.renderFooterMessage(), /*#__PURE__*/external_react_default.
|
|
518
|
-
value:
|
|
519
|
-
|
|
520
|
-
}
|
|
521
|
-
}, /*#__PURE__*/external_react_default.a.createElement(Menu_default.a, {
|
|
433
|
+
}, omit_default()(otherProps, 'tabIndex')), placement !== 'above' && childrenStart, placement === 'above' && this.renderFooterMessage(), /*#__PURE__*/external_react_default().createElement(Menu_namespaceObject.MenuContext.Provider, {
|
|
434
|
+
value: menuContextRole
|
|
435
|
+
}, /*#__PURE__*/external_react_default().createElement((Menu_default()), {
|
|
522
436
|
key: "menu",
|
|
523
|
-
style:
|
|
524
|
-
overflow: 'auto',
|
|
525
|
-
maxHeight: this.state.menuMaxHeight || 'calc(100vh - 20px)',
|
|
526
|
-
flexDirection: 'column'
|
|
527
|
-
},
|
|
437
|
+
style: menuInlineStyle,
|
|
528
438
|
controlledExternally: controlledExternally,
|
|
529
439
|
elementRef: this.handleMenuMount,
|
|
530
440
|
onScroll: this.handleScroll,
|
|
531
441
|
stopScrollPropagation: true,
|
|
532
442
|
tabIndex: tabIndex
|
|
533
|
-
}, !hasResults && noOptionsMessage && !isLoading && /*#__PURE__*/external_react_default.
|
|
443
|
+
}, !hasResults && noOptionsMessage && !isLoading && /*#__PURE__*/external_react_default().createElement((Menu_default()).Item, {
|
|
534
444
|
"data-test": "no-results-message",
|
|
535
445
|
disabled: true
|
|
536
446
|
}, noOptionsMessage), children, onScrollBottom && !fullHeight &&
|
|
537
447
|
/*#__PURE__*/
|
|
538
448
|
// Bottom spacer fills in the space of new items being loaded by using the minimum possible height x menuItems.
|
|
539
|
-
external_react_default.
|
|
449
|
+
external_react_default().createElement("div", {
|
|
540
450
|
"data-test": "results-menu-bottom-spacer",
|
|
541
|
-
style:
|
|
542
|
-
|
|
543
|
-
}
|
|
544
|
-
}), isLoading && /*#__PURE__*/external_react_default.a.createElement(StyledLoading, null, animateLoading && /*#__PURE__*/external_react_default.a.createElement(StyledWait, null), /*#__PURE__*/external_react_default.a.createElement(StyledLoadingMessage, null, loadingMessage)))), placement !== 'above' && this.renderFooterMessage(), placement === 'above' && childrenStart);
|
|
451
|
+
style: menuBottomInlineStyle
|
|
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);
|
|
545
453
|
}
|
|
546
454
|
}]);
|
|
547
455
|
|
|
548
456
|
return ResultsMenu;
|
|
549
|
-
}(
|
|
550
|
-
|
|
551
|
-
_defineProperty(ResultsMenu_ResultsMenu, "propTypes", propTypes);
|
|
552
|
-
|
|
553
|
-
_defineProperty(ResultsMenu_ResultsMenu, "defaultProps", defaultProps);
|
|
554
|
-
|
|
555
|
-
/* harmony default export */ var src_ResultsMenu_ResultsMenu = (ResultsMenu_ResultsMenu);
|
|
556
|
-
// CONCATENATED MODULE: ./src/ResultsMenu/index.ts
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
/***/ }),
|
|
561
|
-
|
|
562
|
-
/***/ 3:
|
|
563
|
-
/***/ (function(module, exports) {
|
|
564
|
-
|
|
565
|
-
module.exports = require("styled-components");
|
|
566
|
-
|
|
567
|
-
/***/ }),
|
|
568
|
-
|
|
569
|
-
/***/ 4:
|
|
570
|
-
/***/ (function(module, exports) {
|
|
571
|
-
|
|
572
|
-
module.exports = require("@splunk/ui-utils/i18n");
|
|
573
|
-
|
|
574
|
-
/***/ }),
|
|
575
|
-
|
|
576
|
-
/***/ 5:
|
|
577
|
-
/***/ (function(module, exports) {
|
|
578
|
-
|
|
579
|
-
module.exports = require("lodash/omit");
|
|
457
|
+
}(external_react_namespaceObject.Component);
|
|
580
458
|
|
|
581
|
-
|
|
459
|
+
_defineProperty(ResultsMenu, "propTypes", propTypes);
|
|
582
460
|
|
|
583
|
-
|
|
584
|
-
/***/ (function(module, exports) {
|
|
461
|
+
_defineProperty(ResultsMenu, "defaultProps", defaultProps);
|
|
585
462
|
|
|
586
|
-
|
|
463
|
+
/* harmony default export */ const ResultsMenu_ResultsMenu = (ResultsMenu);
|
|
464
|
+
;// CONCATENATED MODULE: ./src/ResultsMenu/index.ts
|
|
587
465
|
|
|
588
|
-
/***/ })
|
|
589
466
|
|
|
590
|
-
|
|
467
|
+
module.exports = __webpack_exports__;
|
|
468
|
+
/******/ })()
|
|
469
|
+
;
|