@splunk/react-ui 4.13.0 → 4.15.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/.dockerignore +2 -0
- package/Accordion.js +41 -16
- package/Anchor.js +9 -9
- package/Animation.js +6 -6
- package/AnimationToggle.js +2 -2
- package/Box.js +9 -9
- package/Button.js +47 -46
- package/ButtonGroup.js +9 -9
- package/ButtonSimple.js +14 -14
- package/CHANGELOG.md +46 -1
- package/Calendar.js +460 -147
- package/Card.js +85 -83
- package/CardLayout.js +9 -9
- package/Chip.js +23 -23
- package/Clickable.js +39 -15
- package/CloseButton.js +23 -23
- package/Code.js +484 -436
- package/CollapsiblePanel.js +64 -35
- package/Color.js +298 -188
- package/ColumnLayout.js +18 -17
- package/ComboBox.js +81 -32
- package/Concertina.js +89 -28
- package/ControlGroup.js +85 -27
- package/Date.js +134 -58
- package/DefinitionList.js +14 -8
- package/Divider.d.ts +2 -0
- package/Divider.js +194 -0
- package/Dockerfile.enterprise.storybook +7 -0
- package/Dockerfile.prisma.storybook +7 -0
- package/Dockerfile.visual +10 -0
- package/Dropdown.js +79 -19
- package/EventListener.js +17 -17
- package/File.js +96 -43
- package/FormRows.js +40 -39
- package/Heading.js +83 -55
- package/Image.js +67 -42
- package/JSONTree.js +106 -21
- package/Layer.js +130 -28
- package/Link.js +17 -17
- package/List.js +3 -3
- package/Markdown.js +71 -65
- package/Menu.js +155 -121
- package/Message.js +135 -135
- package/MessageBar.js +136 -136
- package/Modal.js +99 -48
- package/ModalLayer.js +15 -15
- package/Monogram.js +18 -17
- package/Multiselect.js +2788 -2310
- package/Number.js +76 -37
- package/Paginator.js +99 -86
- package/Paragraph.js +10 -10
- package/Popover.js +343 -48
- package/Progress.js +23 -22
- package/RadioBar.js +32 -14
- package/RadioList.js +17 -11
- package/Resize.js +34 -21
- package/ResultsMenu.js +44 -31
- package/ScreenReaderContent.js +9 -9
- package/Scroll.js +52 -27
- package/ScrollContainerContext.js +157 -6
- package/Search.js +71 -34
- package/Select.js +347 -69
- package/SidePanel.js +37 -24
- package/Slider.js +50 -20
- package/SlidingPanels.js +56 -18
- package/SplitButton.js +27 -26
- package/StaticContent.js +9 -9
- package/StepBar.js +22 -22
- package/Switch.js +18 -13
- package/TabBar.js +28 -28
- package/TabLayout.js +43 -18
- package/Table.js +549 -158
- package/Text.js +93 -50
- package/TextArea.d.ts +2 -0
- package/TextArea.js +134 -56
- package/Tooltip.js +246 -63
- package/TransitionOpen.js +63 -26
- package/Typography.d.ts +2 -0
- package/Typography.js +17 -16
- package/WaitSpinner.js +15 -81
- package/docker-compose.yml +42 -0
- package/package.json +20 -20
- package/test-runner-jest.config.js +23 -5
- package/types/src/Accordion/AccordionContext.d.ts +1 -0
- package/types/src/Button/docs/examples/Selected.d.ts +2 -2
- package/types/src/ButtonGroup/ButtonGroupContext.d.ts +1 -0
- package/types/src/Calendar/Calendar.d.ts +17 -2
- package/types/src/Calendar/DateTable.d.ts +7 -3
- package/types/src/Calendar/Day.d.ts +14 -5
- package/types/src/CardLayout/CardLayoutContext.d.ts +1 -0
- package/types/src/CollapsiblePanel/CollapsiblePanel.d.ts +7 -3
- package/types/src/Concertina/ConcertinaContext.d.ts +1 -0
- package/types/src/ControlGroup/ControlGroup.d.ts +15 -8
- package/types/src/ControlGroup/docs/examples/HelpWithErrorText.d.ts +2 -0
- package/types/src/ControlGroup/docs/examples/Required.d.ts +2 -0
- package/types/src/Date/Date.d.ts +17 -8
- package/types/src/Date/docs/examples/CustomDate.d.ts +2 -2
- package/types/src/Date/docs/examples/Disabled.d.ts +2 -2
- package/types/src/Date/docs/examples/prisma/WithoutCalendar.d.ts +2 -0
- package/types/src/Divider/Divider.d.ts +20 -0
- package/types/src/Divider/docs/examples/AriaHidden.d.ts +2 -0
- package/types/src/Divider/docs/examples/Basic.d.ts +2 -0
- package/types/src/Divider/docs/examples/CustomStyle.d.ts +2 -0
- package/types/src/Divider/docs/examples/Vertical.d.ts +2 -0
- package/types/src/Divider/index.d.ts +1 -0
- package/types/src/File/File.d.ts +4 -2
- package/types/src/File/FileContext.d.ts +1 -0
- package/types/src/FormRows/FormRowsContext.d.ts +1 -0
- package/types/src/Markdown/renderers/MarkdownLink.d.ts +1 -1
- package/types/src/Menu/MenuContext.d.ts +1 -0
- package/types/src/Modal/Modal.d.ts +7 -3
- package/types/src/Modal/ModalContext.d.ts +2 -0
- package/types/src/Multiselect/Compact.d.ts +10 -1
- package/types/src/Multiselect/Multiselect.d.ts +12 -1
- package/types/src/Multiselect/Normal.d.ts +2 -0
- package/types/src/Number/Number.d.ts +5 -1
- package/types/src/Popover/Popover.d.ts +25 -5
- package/types/src/Popover/PopoverContext.d.ts +1 -0
- package/types/src/RadioBar/RadioBar.d.ts +5 -3
- package/types/src/RadioBar/RadioBarContext.d.ts +1 -0
- package/types/src/RadioList/RadioList.d.ts +5 -1
- package/types/src/RadioList/RadioListContext.d.ts +1 -0
- package/types/src/Select/SelectBase.d.ts +2 -0
- package/types/src/Slider/Slider.d.ts +5 -3
- package/types/src/SplitButton/docs/examples/Disabled.d.ts +1 -1
- package/types/src/SplitButton/docs/examples/prisma/Disabled.d.ts +1 -1
- package/types/src/StepBar/StepBarContext.d.ts +1 -0
- package/types/src/Switch/Switch.d.ts +2 -0
- package/types/src/TabBar/TabBarContext.d.ts +1 -0
- package/types/src/Table/Head.d.ts +2 -0
- package/types/src/Table/TableContext.d.ts +1 -0
- package/types/src/Table/docs/examples/FilterColumnValues.d.ts +14 -0
- package/types/src/Text/Text.d.ts +5 -3
- package/types/src/TextArea/TextArea.d.ts +5 -3
- package/types/src/Tooltip/Tooltip.d.ts +26 -9
- package/types/src/TransitionOpen/TransitionOpen.d.ts +7 -3
- package/types/src/WaitSpinner/WaitSpinner.d.ts +1 -1
- package/types/src/useForceUpdate/useForceUpdate.d.ts +1 -0
- package/types/src/useKeyPress/index.d.ts +37 -0
- package/useForceUpdate.js +9 -9
- package/{useIsSsr.js → useKeyPress.js} +56 -49
- package/usePrevious.js +9 -9
- package/types/src/useIsSsr/index.d.ts +0 -2
- package/types/src/useIsSsr/useIsSsr.d.ts +0 -8
package/ScreenReaderContent.js
CHANGED
|
@@ -82,7 +82,7 @@ module.exports =
|
|
|
82
82
|
/******/
|
|
83
83
|
/******/
|
|
84
84
|
/******/ // Load entry module and return exports
|
|
85
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
85
|
+
/******/ return __webpack_require__(__webpack_require__.s = 223);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ({
|
|
@@ -101,7 +101,14 @@ module.exports = require("prop-types");
|
|
|
101
101
|
|
|
102
102
|
/***/ }),
|
|
103
103
|
|
|
104
|
-
/***/
|
|
104
|
+
/***/ 2:
|
|
105
|
+
/***/ (function(module, exports) {
|
|
106
|
+
|
|
107
|
+
module.exports = require("react");
|
|
108
|
+
|
|
109
|
+
/***/ }),
|
|
110
|
+
|
|
111
|
+
/***/ 223:
|
|
105
112
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
106
113
|
|
|
107
114
|
"use strict";
|
|
@@ -170,13 +177,6 @@ ScreenReaderContent.propTypes = propTypes;
|
|
|
170
177
|
// CONCATENATED MODULE: ./src/ScreenReaderContent/index.ts
|
|
171
178
|
|
|
172
179
|
|
|
173
|
-
/***/ }),
|
|
174
|
-
|
|
175
|
-
/***/ 2:
|
|
176
|
-
/***/ (function(module, exports) {
|
|
177
|
-
|
|
178
|
-
module.exports = require("react");
|
|
179
|
-
|
|
180
180
|
/***/ }),
|
|
181
181
|
|
|
182
182
|
/***/ 3:
|
package/Scroll.js
CHANGED
|
@@ -82,7 +82,7 @@ module.exports =
|
|
|
82
82
|
/******/
|
|
83
83
|
/******/
|
|
84
84
|
/******/ // Load entry module and return exports
|
|
85
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
85
|
+
/******/ return __webpack_require__(__webpack_require__.s = 195);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ({
|
|
@@ -101,7 +101,14 @@ module.exports = require("prop-types");
|
|
|
101
101
|
|
|
102
102
|
/***/ }),
|
|
103
103
|
|
|
104
|
-
/***/
|
|
104
|
+
/***/ 10:
|
|
105
|
+
/***/ (function(module, exports) {
|
|
106
|
+
|
|
107
|
+
module.exports = require("lodash/keys");
|
|
108
|
+
|
|
109
|
+
/***/ }),
|
|
110
|
+
|
|
111
|
+
/***/ 12:
|
|
105
112
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
106
113
|
|
|
107
114
|
"use strict";
|
|
@@ -128,7 +135,14 @@ function updateReactRef(ref, current) {
|
|
|
128
135
|
|
|
129
136
|
/***/ }),
|
|
130
137
|
|
|
131
|
-
/***/
|
|
138
|
+
/***/ 17:
|
|
139
|
+
/***/ (function(module, exports) {
|
|
140
|
+
|
|
141
|
+
module.exports = require("@splunk/react-ui/EventListener");
|
|
142
|
+
|
|
143
|
+
/***/ }),
|
|
144
|
+
|
|
145
|
+
/***/ 195:
|
|
132
146
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
133
147
|
|
|
134
148
|
"use strict";
|
|
@@ -146,11 +160,12 @@ var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_)
|
|
|
146
160
|
var external_prop_types_ = __webpack_require__(1);
|
|
147
161
|
var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_);
|
|
148
162
|
|
|
149
|
-
// EXTERNAL MODULE: external "lodash"
|
|
150
|
-
var
|
|
163
|
+
// EXTERNAL MODULE: external "lodash/isFinite"
|
|
164
|
+
var isFinite_ = __webpack_require__(21);
|
|
165
|
+
var isFinite_default = /*#__PURE__*/__webpack_require__.n(isFinite_);
|
|
151
166
|
|
|
152
167
|
// EXTERNAL MODULE: external "@splunk/react-ui/Animation"
|
|
153
|
-
var Animation_ = __webpack_require__(
|
|
168
|
+
var Animation_ = __webpack_require__(43);
|
|
154
169
|
|
|
155
170
|
// EXTERNAL MODULE: external "styled-components"
|
|
156
171
|
var external_styled_components_ = __webpack_require__(3);
|
|
@@ -159,18 +174,26 @@ var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(exte
|
|
|
159
174
|
// EXTERNAL MODULE: external "@splunk/themes"
|
|
160
175
|
var themes_ = __webpack_require__(0);
|
|
161
176
|
|
|
177
|
+
// EXTERNAL MODULE: external "lodash/keys"
|
|
178
|
+
var keys_ = __webpack_require__(10);
|
|
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
|
+
|
|
162
185
|
// EXTERNAL MODULE: external "react-spring"
|
|
163
|
-
var external_react_spring_ = __webpack_require__(
|
|
186
|
+
var external_react_spring_ = __webpack_require__(26);
|
|
164
187
|
|
|
165
188
|
// EXTERNAL MODULE: external "@splunk/react-ui/EventListener"
|
|
166
|
-
var EventListener_ = __webpack_require__(
|
|
189
|
+
var EventListener_ = __webpack_require__(17);
|
|
167
190
|
var EventListener_default = /*#__PURE__*/__webpack_require__.n(EventListener_);
|
|
168
191
|
|
|
169
192
|
// EXTERNAL MODULE: external "@splunk/react-ui/ScrollContainerContext"
|
|
170
|
-
var ScrollContainerContext_ = __webpack_require__(
|
|
193
|
+
var ScrollContainerContext_ = __webpack_require__(49);
|
|
171
194
|
|
|
172
195
|
// EXTERNAL MODULE: ./src/utils/updateReactRef.ts
|
|
173
|
-
var updateReactRef = __webpack_require__(
|
|
196
|
+
var updateReactRef = __webpack_require__(12);
|
|
174
197
|
|
|
175
198
|
// CONCATENATED MODULE: ./src/Scroll/Inner.tsx
|
|
176
199
|
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); }
|
|
@@ -206,6 +229,8 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
206
229
|
|
|
207
230
|
|
|
208
231
|
|
|
232
|
+
|
|
233
|
+
|
|
209
234
|
var propTypes = {
|
|
210
235
|
children: external_prop_types_default.a.node,
|
|
211
236
|
defaultLeft: external_prop_types_default.a.number,
|
|
@@ -321,13 +346,13 @@ var Inner_Inner = /*#__PURE__*/function (_Component) {
|
|
|
321
346
|
this.state.containerEl.scrollLeft = this.props.defaultLeft;
|
|
322
347
|
}
|
|
323
348
|
|
|
324
|
-
if (
|
|
349
|
+
if (isFinite_default()(this.props.top)) {
|
|
325
350
|
var _this$props$top;
|
|
326
351
|
|
|
327
352
|
this.state.containerEl.scrollTop = ((_this$props$top = this.props.top) === null || _this$props$top === void 0 ? void 0 : _this$props$top.get()) || 0;
|
|
328
353
|
}
|
|
329
354
|
|
|
330
|
-
if (
|
|
355
|
+
if (isFinite_default()(this.props.left)) {
|
|
331
356
|
var _this$props$left;
|
|
332
357
|
|
|
333
358
|
this.state.containerEl.scrollLeft = ((_this$props$left = this.props.left) === null || _this$props$left === void 0 ? void 0 : _this$props$left.get()) || 0;
|
|
@@ -345,7 +370,7 @@ var Inner_Inner = /*#__PURE__*/function (_Component) {
|
|
|
345
370
|
left = _this$props.left;
|
|
346
371
|
var containerEl = this.state.containerEl;
|
|
347
372
|
var AnimatedTag = external_react_spring_["animated"][this.props.tagName];
|
|
348
|
-
return /*#__PURE__*/external_react_default.a.createElement(external_react_default.a.Fragment, null, /*#__PURE__*/external_react_default.a.createElement(AnimatedTag, _extends({},
|
|
373
|
+
return /*#__PURE__*/external_react_default.a.createElement(external_react_default.a.Fragment, null, /*#__PURE__*/external_react_default.a.createElement(AnimatedTag, _extends({}, omit_default()(this.props, keys_default()(Inner.propTypes)), {
|
|
349
374
|
ref: this.handleMount,
|
|
350
375
|
onMouseEnter: stopScrollPropagation === 'window' ? this.handleMouseEnter : undefined,
|
|
351
376
|
onMouseLeave: stopScrollPropagation === 'window' ? this.handleMouseLeave : undefined,
|
|
@@ -476,8 +501,8 @@ var Scroll_Scroll = /*#__PURE__*/function (_Component) {
|
|
|
476
501
|
"data-test": "scroll"
|
|
477
502
|
}, otherProps, {
|
|
478
503
|
key: "inner",
|
|
479
|
-
top:
|
|
480
|
-
left:
|
|
504
|
+
top: isFinite_default()(top) ? targetScroll.top : undefined,
|
|
505
|
+
left: isFinite_default()(left) ? targetScroll.left : undefined,
|
|
481
506
|
elementRef: elementRef,
|
|
482
507
|
onScroll: _this.handleScroll
|
|
483
508
|
}), children);
|
|
@@ -501,13 +526,13 @@ var Scroll_Scroll = /*#__PURE__*/function (_Component) {
|
|
|
501
526
|
currentTop = _this$state.currentTop;
|
|
502
527
|
var targetScroll = {}; // When isFinite, the prop is defined and therefore animating.
|
|
503
528
|
|
|
504
|
-
if (
|
|
529
|
+
if (isFinite_default()(left)) {
|
|
505
530
|
targetScroll.left = left;
|
|
506
531
|
} else {
|
|
507
532
|
targetScroll.left = currentLeft;
|
|
508
533
|
}
|
|
509
534
|
|
|
510
|
-
if (
|
|
535
|
+
if (isFinite_default()(top)) {
|
|
511
536
|
targetScroll.top = top;
|
|
512
537
|
} else {
|
|
513
538
|
targetScroll.top = currentTop;
|
|
@@ -540,24 +565,24 @@ Scroll_defineProperty(Scroll_Scroll, "defaultProps", Scroll_defaultProps);
|
|
|
540
565
|
|
|
541
566
|
/***/ }),
|
|
542
567
|
|
|
543
|
-
/***/
|
|
568
|
+
/***/ 2:
|
|
544
569
|
/***/ (function(module, exports) {
|
|
545
570
|
|
|
546
|
-
module.exports = require("
|
|
571
|
+
module.exports = require("react");
|
|
547
572
|
|
|
548
573
|
/***/ }),
|
|
549
574
|
|
|
550
|
-
/***/
|
|
575
|
+
/***/ 21:
|
|
551
576
|
/***/ (function(module, exports) {
|
|
552
577
|
|
|
553
|
-
module.exports = require("
|
|
578
|
+
module.exports = require("lodash/isFinite");
|
|
554
579
|
|
|
555
580
|
/***/ }),
|
|
556
581
|
|
|
557
|
-
/***/
|
|
582
|
+
/***/ 26:
|
|
558
583
|
/***/ (function(module, exports) {
|
|
559
584
|
|
|
560
|
-
module.exports = require("react");
|
|
585
|
+
module.exports = require("react-spring");
|
|
561
586
|
|
|
562
587
|
/***/ }),
|
|
563
588
|
|
|
@@ -568,24 +593,24 @@ module.exports = require("styled-components");
|
|
|
568
593
|
|
|
569
594
|
/***/ }),
|
|
570
595
|
|
|
571
|
-
/***/
|
|
596
|
+
/***/ 43:
|
|
572
597
|
/***/ (function(module, exports) {
|
|
573
598
|
|
|
574
599
|
module.exports = require("@splunk/react-ui/Animation");
|
|
575
600
|
|
|
576
601
|
/***/ }),
|
|
577
602
|
|
|
578
|
-
/***/
|
|
603
|
+
/***/ 49:
|
|
579
604
|
/***/ (function(module, exports) {
|
|
580
605
|
|
|
581
606
|
module.exports = require("@splunk/react-ui/ScrollContainerContext");
|
|
582
607
|
|
|
583
608
|
/***/ }),
|
|
584
609
|
|
|
585
|
-
/***/
|
|
610
|
+
/***/ 5:
|
|
586
611
|
/***/ (function(module, exports) {
|
|
587
612
|
|
|
588
|
-
module.exports = require("lodash");
|
|
613
|
+
module.exports = require("lodash/omit");
|
|
589
614
|
|
|
590
615
|
/***/ })
|
|
591
616
|
|
|
@@ -82,12 +82,95 @@ module.exports =
|
|
|
82
82
|
/******/
|
|
83
83
|
/******/
|
|
84
84
|
/******/ // Load entry module and return exports
|
|
85
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
85
|
+
/******/ return __webpack_require__(__webpack_require__.s = 234);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ({
|
|
89
89
|
|
|
90
|
-
/***/
|
|
90
|
+
/***/ 2:
|
|
91
|
+
/***/ (function(module, exports) {
|
|
92
|
+
|
|
93
|
+
module.exports = require("react");
|
|
94
|
+
|
|
95
|
+
/***/ }),
|
|
96
|
+
|
|
97
|
+
/***/ 20:
|
|
98
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
99
|
+
|
|
100
|
+
"use strict";
|
|
101
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getWindow; });
|
|
102
|
+
/* unused harmony export ssrWindow */
|
|
103
|
+
/* harmony import */ var _ssrDocument__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(28);
|
|
104
|
+
/* eslint-disable @typescript-eslint/no-empty-function */
|
|
105
|
+
|
|
106
|
+
var ssrWindow = {
|
|
107
|
+
document: _ssrDocument__WEBPACK_IMPORTED_MODULE_0__[/* ssrDocument */ "b"],
|
|
108
|
+
navigator: {
|
|
109
|
+
userAgent: ''
|
|
110
|
+
},
|
|
111
|
+
location: {
|
|
112
|
+
hash: '',
|
|
113
|
+
host: '',
|
|
114
|
+
hostname: '',
|
|
115
|
+
href: '',
|
|
116
|
+
origin: '',
|
|
117
|
+
pathname: '',
|
|
118
|
+
protocol: '',
|
|
119
|
+
search: ''
|
|
120
|
+
},
|
|
121
|
+
history: {
|
|
122
|
+
replaceState: function replaceState() {},
|
|
123
|
+
pushState: function pushState() {},
|
|
124
|
+
go: function go() {},
|
|
125
|
+
back: function back() {}
|
|
126
|
+
},
|
|
127
|
+
CustomEvent: function CustomEvent() {
|
|
128
|
+
return this;
|
|
129
|
+
},
|
|
130
|
+
addEventListener: function addEventListener() {},
|
|
131
|
+
removeEventListener: function removeEventListener() {},
|
|
132
|
+
getComputedStyle: function getComputedStyle() {
|
|
133
|
+
return {
|
|
134
|
+
getPropertyValue: function getPropertyValue() {
|
|
135
|
+
return '';
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
},
|
|
139
|
+
Image: function Image() {},
|
|
140
|
+
Date: function Date() {},
|
|
141
|
+
screen: {},
|
|
142
|
+
setTimeout: function setTimeout() {},
|
|
143
|
+
clearTimeout: function clearTimeout() {},
|
|
144
|
+
matchMedia: function matchMedia() {
|
|
145
|
+
return {};
|
|
146
|
+
},
|
|
147
|
+
requestAnimationFrame: function requestAnimationFrame(callback) {
|
|
148
|
+
if (typeof setTimeout === 'undefined') {
|
|
149
|
+
callback();
|
|
150
|
+
return null;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
return setTimeout(callback, 0);
|
|
154
|
+
},
|
|
155
|
+
cancelAnimationFrame: function cancelAnimationFrame(id) {
|
|
156
|
+
if (typeof setTimeout === 'undefined') {
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
clearTimeout(id);
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
function getWindow() {
|
|
165
|
+
var win = typeof window !== 'undefined' ? window : ssrWindow;
|
|
166
|
+
return win;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
/***/ }),
|
|
172
|
+
|
|
173
|
+
/***/ 234:
|
|
91
174
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
92
175
|
|
|
93
176
|
"use strict";
|
|
@@ -103,8 +186,12 @@ __webpack_require__.d(__webpack_exports__, "ScrollContainerProvider", function()
|
|
|
103
186
|
var external_react_ = __webpack_require__(2);
|
|
104
187
|
var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
|
|
105
188
|
|
|
189
|
+
// EXTERNAL MODULE: ./src/utils/ssrWindow.ts
|
|
190
|
+
var ssrWindow = __webpack_require__(20);
|
|
191
|
+
|
|
106
192
|
// CONCATENATED MODULE: ./src/ScrollContainerContext/ScrollContainerContext.tsx
|
|
107
193
|
|
|
194
|
+
|
|
108
195
|
/**
|
|
109
196
|
* A React context used to manage a custom scroll container for child elements
|
|
110
197
|
* that need to react to scrolling. The context type is `Window | Document | HTMLElement | null | undefined`.
|
|
@@ -113,7 +200,7 @@ var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_)
|
|
|
113
200
|
* @public
|
|
114
201
|
*/
|
|
115
202
|
|
|
116
|
-
var ScrollContainerContext = /*#__PURE__*/external_react_default.a.createContext(
|
|
203
|
+
var ScrollContainerContext = /*#__PURE__*/external_react_default.a.createContext(Object(ssrWindow["a" /* getWindow */])());
|
|
117
204
|
/**
|
|
118
205
|
* `ScrollContainerProvider` is an alias of `ScrollContainerContext.Provider`.
|
|
119
206
|
* @public
|
|
@@ -128,10 +215,74 @@ var ScrollContainerProvider = ScrollContainerContext.Provider;
|
|
|
128
215
|
|
|
129
216
|
/***/ }),
|
|
130
217
|
|
|
131
|
-
/***/
|
|
132
|
-
/***/ (function(module,
|
|
218
|
+
/***/ 28:
|
|
219
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
220
|
+
|
|
221
|
+
"use strict";
|
|
222
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getDocument; });
|
|
223
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return ssrDocument; });
|
|
224
|
+
/* eslint-disable @typescript-eslint/no-empty-function */
|
|
225
|
+
var ssrDocument = {
|
|
226
|
+
body: {
|
|
227
|
+
appendChild: function appendChild() {
|
|
228
|
+
return [];
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
addEventListener: function addEventListener() {},
|
|
232
|
+
removeEventListener: function removeEventListener() {},
|
|
233
|
+
activeElement: {
|
|
234
|
+
blur: function blur() {},
|
|
235
|
+
nodeName: ''
|
|
236
|
+
},
|
|
237
|
+
querySelector: function querySelector() {
|
|
238
|
+
return null;
|
|
239
|
+
},
|
|
240
|
+
querySelectorAll: function querySelectorAll() {
|
|
241
|
+
return [];
|
|
242
|
+
},
|
|
243
|
+
getElementById: function getElementById() {
|
|
244
|
+
return null;
|
|
245
|
+
},
|
|
246
|
+
createEvent: function createEvent() {
|
|
247
|
+
return {
|
|
248
|
+
initEvent: function initEvent() {}
|
|
249
|
+
};
|
|
250
|
+
},
|
|
251
|
+
createElement: function createElement() {
|
|
252
|
+
return {
|
|
253
|
+
children: [],
|
|
254
|
+
childNodes: [],
|
|
255
|
+
style: {},
|
|
256
|
+
setAttribute: function setAttribute() {},
|
|
257
|
+
getElementsByTagName: function getElementsByTagName() {
|
|
258
|
+
return [];
|
|
259
|
+
}
|
|
260
|
+
};
|
|
261
|
+
},
|
|
262
|
+
createElementNS: function createElementNS() {
|
|
263
|
+
return {};
|
|
264
|
+
},
|
|
265
|
+
importNode: function importNode() {
|
|
266
|
+
return null;
|
|
267
|
+
},
|
|
268
|
+
location: {
|
|
269
|
+
hash: '',
|
|
270
|
+
host: '',
|
|
271
|
+
hostname: '',
|
|
272
|
+
href: '',
|
|
273
|
+
origin: '',
|
|
274
|
+
pathname: '',
|
|
275
|
+
protocol: '',
|
|
276
|
+
search: ''
|
|
277
|
+
}
|
|
278
|
+
};
|
|
279
|
+
|
|
280
|
+
function getDocument() {
|
|
281
|
+
var doc = typeof document !== 'undefined' ? document : ssrDocument;
|
|
282
|
+
return doc;
|
|
283
|
+
}
|
|
284
|
+
|
|
133
285
|
|
|
134
|
-
module.exports = require("react");
|
|
135
286
|
|
|
136
287
|
/***/ })
|
|
137
288
|
|
package/Search.js
CHANGED
|
@@ -82,7 +82,7 @@ module.exports =
|
|
|
82
82
|
/******/
|
|
83
83
|
/******/
|
|
84
84
|
/******/ // Load entry module and return exports
|
|
85
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
85
|
+
/******/ return __webpack_require__(__webpack_require__.s = 224);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ({
|
|
@@ -94,21 +94,14 @@ module.exports = require("prop-types");
|
|
|
94
94
|
|
|
95
95
|
/***/ }),
|
|
96
96
|
|
|
97
|
-
/***/
|
|
97
|
+
/***/ 11:
|
|
98
98
|
/***/ (function(module, exports) {
|
|
99
99
|
|
|
100
|
-
module.exports = require("
|
|
100
|
+
module.exports = require("lodash/has");
|
|
101
101
|
|
|
102
102
|
/***/ }),
|
|
103
103
|
|
|
104
|
-
/***/
|
|
105
|
-
/***/ (function(module, exports) {
|
|
106
|
-
|
|
107
|
-
module.exports = require("@splunk/react-ui/usePrevious");
|
|
108
|
-
|
|
109
|
-
/***/ }),
|
|
110
|
-
|
|
111
|
-
/***/ 11:
|
|
104
|
+
/***/ 12:
|
|
112
105
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
113
106
|
|
|
114
107
|
"use strict";
|
|
@@ -138,18 +131,32 @@ function updateReactRef(ref, current) {
|
|
|
138
131
|
/***/ 13:
|
|
139
132
|
/***/ (function(module, exports) {
|
|
140
133
|
|
|
134
|
+
module.exports = require("@splunk/ui-utils/id");
|
|
135
|
+
|
|
136
|
+
/***/ }),
|
|
137
|
+
|
|
138
|
+
/***/ 149:
|
|
139
|
+
/***/ (function(module, exports) {
|
|
140
|
+
|
|
141
|
+
module.exports = require("@splunk/react-ui/usePrevious");
|
|
142
|
+
|
|
143
|
+
/***/ }),
|
|
144
|
+
|
|
145
|
+
/***/ 15:
|
|
146
|
+
/***/ (function(module, exports) {
|
|
147
|
+
|
|
141
148
|
module.exports = require("@splunk/react-ui/Menu");
|
|
142
149
|
|
|
143
150
|
/***/ }),
|
|
144
151
|
|
|
145
|
-
/***/
|
|
152
|
+
/***/ 2:
|
|
146
153
|
/***/ (function(module, exports) {
|
|
147
154
|
|
|
148
|
-
module.exports = require("
|
|
155
|
+
module.exports = require("react");
|
|
149
156
|
|
|
150
157
|
/***/ }),
|
|
151
158
|
|
|
152
|
-
/***/
|
|
159
|
+
/***/ 224:
|
|
153
160
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
154
161
|
|
|
155
162
|
"use strict";
|
|
@@ -170,35 +177,48 @@ var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_)
|
|
|
170
177
|
var external_prop_types_ = __webpack_require__(1);
|
|
171
178
|
var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_);
|
|
172
179
|
|
|
173
|
-
// EXTERNAL MODULE: external "lodash"
|
|
174
|
-
var
|
|
180
|
+
// EXTERNAL MODULE: external "lodash/extend"
|
|
181
|
+
var extend_ = __webpack_require__(48);
|
|
182
|
+
var extend_default = /*#__PURE__*/__webpack_require__.n(extend_);
|
|
183
|
+
|
|
184
|
+
// EXTERNAL MODULE: external "lodash/has"
|
|
185
|
+
var has_ = __webpack_require__(11);
|
|
186
|
+
var has_default = /*#__PURE__*/__webpack_require__.n(has_);
|
|
187
|
+
|
|
188
|
+
// EXTERNAL MODULE: external "lodash/omit"
|
|
189
|
+
var omit_ = __webpack_require__(5);
|
|
190
|
+
var omit_default = /*#__PURE__*/__webpack_require__.n(omit_);
|
|
191
|
+
|
|
192
|
+
// EXTERNAL MODULE: external "lodash/pick"
|
|
193
|
+
var pick_ = __webpack_require__(34);
|
|
194
|
+
var pick_default = /*#__PURE__*/__webpack_require__.n(pick_);
|
|
175
195
|
|
|
176
196
|
// EXTERNAL MODULE: external "@splunk/ui-utils/id"
|
|
177
|
-
var id_ = __webpack_require__(
|
|
197
|
+
var id_ = __webpack_require__(13);
|
|
178
198
|
|
|
179
199
|
// EXTERNAL MODULE: external "@splunk/ui-utils/i18n"
|
|
180
|
-
var i18n_ = __webpack_require__(
|
|
200
|
+
var i18n_ = __webpack_require__(4);
|
|
181
201
|
|
|
182
202
|
// EXTERNAL MODULE: external "@splunk/ui-utils/keyboard"
|
|
183
203
|
var keyboard_ = __webpack_require__(9);
|
|
184
204
|
|
|
185
205
|
// EXTERNAL MODULE: external "@splunk/react-ui/Menu"
|
|
186
|
-
var Menu_ = __webpack_require__(
|
|
206
|
+
var Menu_ = __webpack_require__(15);
|
|
187
207
|
|
|
188
208
|
// EXTERNAL MODULE: external "@splunk/react-ui/usePrevious"
|
|
189
|
-
var usePrevious_ = __webpack_require__(
|
|
209
|
+
var usePrevious_ = __webpack_require__(149);
|
|
190
210
|
var usePrevious_default = /*#__PURE__*/__webpack_require__.n(usePrevious_);
|
|
191
211
|
|
|
192
212
|
// EXTERNAL MODULE: external "@splunk/react-ui/Popover"
|
|
193
|
-
var Popover_ = __webpack_require__(
|
|
213
|
+
var Popover_ = __webpack_require__(23);
|
|
194
214
|
var Popover_default = /*#__PURE__*/__webpack_require__.n(Popover_);
|
|
195
215
|
|
|
196
216
|
// EXTERNAL MODULE: external "@splunk/react-ui/ResultsMenu"
|
|
197
|
-
var ResultsMenu_ = __webpack_require__(
|
|
217
|
+
var ResultsMenu_ = __webpack_require__(45);
|
|
198
218
|
var ResultsMenu_default = /*#__PURE__*/__webpack_require__.n(ResultsMenu_);
|
|
199
219
|
|
|
200
220
|
// EXTERNAL MODULE: external "@splunk/react-ui/Text"
|
|
201
|
-
var Text_ = __webpack_require__(
|
|
221
|
+
var Text_ = __webpack_require__(30);
|
|
202
222
|
var Text_default = /*#__PURE__*/__webpack_require__.n(Text_);
|
|
203
223
|
|
|
204
224
|
// CONCATENATED MODULE: ./src/Search/Option.tsx
|
|
@@ -337,7 +357,7 @@ _defineProperty(Option_Option, "defaultProps", defaultProps);
|
|
|
337
357
|
|
|
338
358
|
/* harmony default export */ var Search_Option = (Option_Option);
|
|
339
359
|
// EXTERNAL MODULE: ./src/utils/updateReactRef.ts
|
|
340
|
-
var updateReactRef = __webpack_require__(
|
|
360
|
+
var updateReactRef = __webpack_require__(12);
|
|
341
361
|
|
|
342
362
|
// CONCATENATED MODULE: ./src/Search/Search.tsx
|
|
343
363
|
function Search_extends() { Search_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 Search_extends.apply(this, arguments); }
|
|
@@ -377,6 +397,9 @@ function Search_objectWithoutPropertiesLoose(source, excluded) { if (source == n
|
|
|
377
397
|
|
|
378
398
|
|
|
379
399
|
|
|
400
|
+
|
|
401
|
+
|
|
402
|
+
|
|
380
403
|
var Search_propTypes = {
|
|
381
404
|
animateLoading: external_prop_types_default.a.bool,
|
|
382
405
|
children: external_prop_types_default.a.node,
|
|
@@ -650,7 +673,7 @@ function Search(_ref2) {
|
|
|
650
673
|
|
|
651
674
|
if (isMenuValid() && isOpen) {
|
|
652
675
|
options.current = initialOptions.map(function (option, index) {
|
|
653
|
-
if (!
|
|
676
|
+
if (!has_default()(option.props, 'active')) {
|
|
654
677
|
// ignore Headings and Dividers
|
|
655
678
|
return option;
|
|
656
679
|
}
|
|
@@ -672,14 +695,14 @@ function Search(_ref2) {
|
|
|
672
695
|
}
|
|
673
696
|
|
|
674
697
|
return /*#__PURE__*/external_react_default.a.createElement(ResultsMenu_default.a, Search_extends({
|
|
675
|
-
style:
|
|
698
|
+
style: extend_default()({
|
|
676
699
|
overflow: 'auto',
|
|
677
700
|
width: Math.max(anchorWidth !== null && anchorWidth !== void 0 ? anchorWidth : 0, 200)
|
|
678
701
|
}, menuStyle),
|
|
679
702
|
controlledExternally: true,
|
|
680
703
|
maxHeight: maxHeight !== null && maxHeight !== void 0 ? maxHeight : undefined,
|
|
681
704
|
isLoading: isLoadingOptions
|
|
682
|
-
},
|
|
705
|
+
}, pick_default()(otherProps, 'className', 'onScroll'), {
|
|
683
706
|
noOptionsMessage: noOptionsMessage,
|
|
684
707
|
footerMessage: footerMessage,
|
|
685
708
|
animateLoading: animateLoading,
|
|
@@ -703,7 +726,7 @@ function Search(_ref2) {
|
|
|
703
726
|
|
|
704
727
|
return /*#__PURE__*/external_react_default.a.createElement(Text_default.a, Search_extends({
|
|
705
728
|
"data-test": "search"
|
|
706
|
-
},
|
|
729
|
+
}, omit_default()(otherProps, 'className', 'onScroll'), {
|
|
707
730
|
appearance: "search",
|
|
708
731
|
autoCapitalize: "off",
|
|
709
732
|
autoComplete: "off",
|
|
@@ -753,14 +776,14 @@ Search.Heading = Menu_["Heading"];
|
|
|
753
776
|
|
|
754
777
|
/***/ }),
|
|
755
778
|
|
|
756
|
-
/***/
|
|
779
|
+
/***/ 23:
|
|
757
780
|
/***/ (function(module, exports) {
|
|
758
781
|
|
|
759
|
-
module.exports = require("react");
|
|
782
|
+
module.exports = require("@splunk/react-ui/Popover");
|
|
760
783
|
|
|
761
784
|
/***/ }),
|
|
762
785
|
|
|
763
|
-
/***/
|
|
786
|
+
/***/ 30:
|
|
764
787
|
/***/ (function(module, exports) {
|
|
765
788
|
|
|
766
789
|
module.exports = require("@splunk/react-ui/Text");
|
|
@@ -770,21 +793,35 @@ module.exports = require("@splunk/react-ui/Text");
|
|
|
770
793
|
/***/ 34:
|
|
771
794
|
/***/ (function(module, exports) {
|
|
772
795
|
|
|
773
|
-
module.exports = require("
|
|
796
|
+
module.exports = require("lodash/pick");
|
|
774
797
|
|
|
775
798
|
/***/ }),
|
|
776
799
|
|
|
777
800
|
/***/ 4:
|
|
778
801
|
/***/ (function(module, exports) {
|
|
779
802
|
|
|
780
|
-
module.exports = require("
|
|
803
|
+
module.exports = require("@splunk/ui-utils/i18n");
|
|
804
|
+
|
|
805
|
+
/***/ }),
|
|
806
|
+
|
|
807
|
+
/***/ 45:
|
|
808
|
+
/***/ (function(module, exports) {
|
|
809
|
+
|
|
810
|
+
module.exports = require("@splunk/react-ui/ResultsMenu");
|
|
811
|
+
|
|
812
|
+
/***/ }),
|
|
813
|
+
|
|
814
|
+
/***/ 48:
|
|
815
|
+
/***/ (function(module, exports) {
|
|
816
|
+
|
|
817
|
+
module.exports = require("lodash/extend");
|
|
781
818
|
|
|
782
819
|
/***/ }),
|
|
783
820
|
|
|
784
821
|
/***/ 5:
|
|
785
822
|
/***/ (function(module, exports) {
|
|
786
823
|
|
|
787
|
-
module.exports = require("
|
|
824
|
+
module.exports = require("lodash/omit");
|
|
788
825
|
|
|
789
826
|
/***/ }),
|
|
790
827
|
|