@splunk/react-ui 4.12.1 → 4.14.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.
Files changed (122) hide show
  1. package/.storybook-visual/config/snapshotResolver.js +29 -0
  2. package/.storybook-visual/main.js +22 -0
  3. package/.storybook-visual/preview.jsx +31 -0
  4. package/.storybook-visual/scripts/test.sh +108 -0
  5. package/.storybook-visual/test-runner.js +108 -0
  6. package/Accordion.js +4 -4
  7. package/Anchor.js +2 -2
  8. package/Animation.js +6 -6
  9. package/AnimationToggle.js +2 -2
  10. package/Box.js +2 -2
  11. package/Button.js +23 -23
  12. package/ButtonGroup.js +2 -2
  13. package/ButtonSimple.js +7 -7
  14. package/CHANGELOG.md +33 -0
  15. package/Calendar.js +390 -95
  16. package/Card.js +25 -23
  17. package/CardLayout.js +2 -2
  18. package/Chip.js +17 -17
  19. package/Clickable.js +4 -4
  20. package/CloseButton.js +15 -15
  21. package/Code.js +4 -4
  22. package/CollapsiblePanel.js +15 -11
  23. package/Color.js +26 -26
  24. package/ColumnLayout.js +6 -6
  25. package/ComboBox.js +19 -19
  26. package/Concertina.js +6 -6
  27. package/ControlGroup.js +14 -13
  28. package/Date.js +118 -55
  29. package/DefinitionList.js +2 -2
  30. package/Divider.js +194 -0
  31. package/Dropdown.js +17 -13
  32. package/EventListener.js +4 -4
  33. package/File.js +23 -23
  34. package/FormRows.js +14 -14
  35. package/Heading.js +2 -2
  36. package/Image.js +19 -19
  37. package/JSONTree.js +2 -2
  38. package/Layer.js +85 -8
  39. package/Link.js +4 -4
  40. package/List.js +2 -2
  41. package/Markdown.js +18 -18
  42. package/Menu.js +51 -52
  43. package/Message.js +39 -39
  44. package/MessageBar.js +29 -29
  45. package/Modal.js +63 -37
  46. package/ModalLayer.js +11 -11
  47. package/Monogram.js +2 -2
  48. package/Multiselect.js +134 -125
  49. package/Number.js +8 -6
  50. package/Paginator.js +48 -48
  51. package/Paragraph.js +2 -2
  52. package/Popover.js +186 -19
  53. package/Progress.js +8 -8
  54. package/RadioBar.js +2 -2
  55. package/RadioList.js +4 -4
  56. package/Resize.js +4 -4
  57. package/ResultsMenu.js +20 -20
  58. package/ScreenReaderContent.js +2 -2
  59. package/Scroll.js +13 -13
  60. package/ScrollContainerContext.js +154 -3
  61. package/Search.js +25 -25
  62. package/Select.js +114 -105
  63. package/SidePanel.js +6 -6
  64. package/Slider.js +14 -14
  65. package/SlidingPanels.js +11 -11
  66. package/SplitButton.js +511 -0
  67. package/StaticContent.js +2 -2
  68. package/StepBar.js +10 -10
  69. package/Switch.js +8 -8
  70. package/TabBar.js +15 -15
  71. package/TabLayout.js +6 -6
  72. package/Table.js +275 -76
  73. package/Text.js +51 -42
  74. package/TextArea.js +41 -33
  75. package/Tooltip.js +17 -11
  76. package/TransitionOpen.js +39 -15
  77. package/Typography.js +4 -4
  78. package/WaitSpinner.js +4 -4
  79. package/package.json +12 -14
  80. package/test-runner-jest.config.js +18 -5
  81. package/types/src/Button/Button.d.ts +1 -1
  82. package/types/src/Calendar/Calendar.d.ts +15 -2
  83. package/types/src/Calendar/DateTable.d.ts +7 -3
  84. package/types/src/Calendar/Day.d.ts +14 -5
  85. package/types/src/CollapsiblePanel/CollapsiblePanel.d.ts +7 -3
  86. package/types/src/Date/Date.d.ts +17 -8
  87. package/types/src/Date/docs/examples/CustomDate.d.ts +2 -2
  88. package/types/src/Date/docs/examples/Disabled.d.ts +2 -2
  89. package/types/src/Date/docs/examples/prisma/WithoutCalendar.d.ts +2 -0
  90. package/types/src/Divider/Divider.d.ts +20 -0
  91. package/types/src/Divider/docs/examples/AriaHidden.d.ts +2 -0
  92. package/types/src/Divider/docs/examples/Basic.d.ts +2 -0
  93. package/types/src/Divider/docs/examples/CustomStyle.d.ts +2 -0
  94. package/types/src/Divider/docs/examples/Vertical.d.ts +2 -0
  95. package/types/src/Divider/index.d.ts +1 -0
  96. package/types/src/Dropdown/Dropdown.d.ts +11 -3
  97. package/types/src/Modal/Modal.d.ts +7 -3
  98. package/types/src/Modal/ModalContext.d.ts +1 -0
  99. package/types/src/Number/Number.d.ts +5 -1
  100. package/types/src/Popover/Popover.d.ts +5 -1
  101. package/types/src/Popover/getPlacement.d.ts +1 -1
  102. package/types/src/SplitButton/Item.d.ts +45 -0
  103. package/types/src/SplitButton/SplitButton.d.ts +41 -0
  104. package/types/src/SplitButton/docs/examples/Basic.d.ts +1 -0
  105. package/types/src/SplitButton/docs/examples/ChangeLabel.d.ts +1 -0
  106. package/types/src/SplitButton/docs/examples/Disabled.d.ts +1 -0
  107. package/types/src/SplitButton/docs/examples/prisma/Basic.d.ts +1 -0
  108. package/types/src/SplitButton/docs/examples/prisma/Disabled.d.ts +1 -0
  109. package/types/src/SplitButton/index.d.ts +2 -0
  110. package/types/src/Table/HeadCell.d.ts +4 -1
  111. package/types/src/Table/HeadDropdownCell.d.ts +10 -3
  112. package/types/src/Table/docs/examples/FilterColumnValues.d.ts +14 -0
  113. package/types/src/Text/Text.d.ts +5 -1
  114. package/types/src/TextArea/TextArea.d.ts +5 -1
  115. package/types/src/Tooltip/Tooltip.d.ts +10 -5
  116. package/types/src/TransitionOpen/TransitionOpen.d.ts +7 -3
  117. package/types/src/useForceUpdate/index.d.ts +2 -0
  118. package/types/src/useForceUpdate/useForceUpdate.d.ts +9 -0
  119. package/types/src/useKeyPress/index.d.ts +37 -0
  120. package/useForceUpdate.js +151 -0
  121. package/useKeyPress.js +160 -0
  122. package/usePrevious.js +2 -2
package/Select.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 = 169);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 176);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -101,7 +101,7 @@ module.exports = require("prop-types");
101
101
 
102
102
  /***/ }),
103
103
 
104
- /***/ 10:
104
+ /***/ 11:
105
105
  /***/ (function(module, exports) {
106
106
 
107
107
  module.exports = require("@splunk/ui-utils/id");
@@ -122,7 +122,7 @@ module.exports = require("@splunk/react-ui/Button");
122
122
 
123
123
  /***/ }),
124
124
 
125
- /***/ 169:
125
+ /***/ 176:
126
126
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
127
127
 
128
128
  "use strict";
@@ -150,10 +150,10 @@ var external_lodash_ = __webpack_require__(4);
150
150
  var i18n_ = __webpack_require__(5);
151
151
 
152
152
  // EXTERNAL MODULE: ./src/Select/SelectBase.tsx + 2 modules
153
- var SelectBase = __webpack_require__(44);
153
+ var SelectBase = __webpack_require__(46);
154
154
 
155
155
  // EXTERNAL MODULE: ./src/Select/OptionBase.tsx
156
- var OptionBase = __webpack_require__(28);
156
+ var OptionBase = __webpack_require__(30);
157
157
 
158
158
  // CONCATENATED MODULE: ./src/Select/Option.tsx
159
159
  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); }
@@ -481,21 +481,28 @@ module.exports = require("@splunk/react-ui/Dropdown");
481
481
 
482
482
  /***/ }),
483
483
 
484
- /***/ 23:
484
+ /***/ 24:
485
485
  /***/ (function(module, exports) {
486
486
 
487
487
  module.exports = require("@splunk/react-ui/Text");
488
488
 
489
489
  /***/ }),
490
490
 
491
- /***/ 25:
491
+ /***/ 26:
492
492
  /***/ (function(module, exports) {
493
493
 
494
494
  module.exports = require("@splunk/ui-utils/filter");
495
495
 
496
496
  /***/ }),
497
497
 
498
- /***/ 28:
498
+ /***/ 3:
499
+ /***/ (function(module, exports) {
500
+
501
+ module.exports = require("styled-components");
502
+
503
+ /***/ }),
504
+
505
+ /***/ 30:
499
506
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
500
507
 
501
508
  "use strict";
@@ -671,14 +678,14 @@ _defineProperty(Option, "defaultProps", defaultProps);
671
678
 
672
679
  /***/ }),
673
680
 
674
- /***/ 29:
681
+ /***/ 31:
675
682
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
676
683
 
677
684
  "use strict";
678
685
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Search; });
679
686
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
680
687
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
681
- /* harmony import */ var _splunk_react_icons_Search__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(41);
688
+ /* harmony import */ var _splunk_react_icons_Search__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(43);
682
689
  /* harmony import */ var _splunk_react_icons_Search__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_splunk_react_icons_Search__WEBPACK_IMPORTED_MODULE_1__);
683
690
  /* harmony import */ var _ThemedIcon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
684
691
  /* harmony import */ var _SVG__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6);
@@ -721,35 +728,35 @@ function Search(props) {
721
728
 
722
729
  /***/ }),
723
730
 
724
- /***/ 3:
731
+ /***/ 33:
725
732
  /***/ (function(module, exports) {
726
733
 
727
- module.exports = require("styled-components");
734
+ module.exports = require("@splunk/react-ui/Link");
728
735
 
729
736
  /***/ }),
730
737
 
731
- /***/ 30:
738
+ /***/ 36:
732
739
  /***/ (function(module, exports) {
733
740
 
734
- module.exports = require("@splunk/react-ui/Link");
741
+ module.exports = require("@splunk/react-ui/ResultsMenu");
735
742
 
736
743
  /***/ }),
737
744
 
738
- /***/ 34:
745
+ /***/ 4:
739
746
  /***/ (function(module, exports) {
740
747
 
741
- module.exports = require("@splunk/react-ui/ResultsMenu");
748
+ module.exports = require("lodash");
742
749
 
743
750
  /***/ }),
744
751
 
745
- /***/ 38:
752
+ /***/ 40:
746
753
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
747
754
 
748
755
  "use strict";
749
756
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return CaretDown; });
750
757
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
751
758
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
752
- /* harmony import */ var _splunk_react_icons_Caret__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39);
759
+ /* harmony import */ var _splunk_react_icons_Caret__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(41);
753
760
  /* harmony import */ var _splunk_react_icons_Caret__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_splunk_react_icons_Caret__WEBPACK_IMPORTED_MODULE_1__);
754
761
  /* harmony import */ var _ThemedIcon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
755
762
  /* harmony import */ var _SVG__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6);
@@ -780,28 +787,21 @@ function CaretDown(props) {
780
787
 
781
788
  /***/ }),
782
789
 
783
- /***/ 39:
790
+ /***/ 41:
784
791
  /***/ (function(module, exports) {
785
792
 
786
793
  module.exports = require("@splunk/react-icons/Caret");
787
794
 
788
795
  /***/ }),
789
796
 
790
- /***/ 4:
791
- /***/ (function(module, exports) {
792
-
793
- module.exports = require("lodash");
794
-
795
- /***/ }),
796
-
797
- /***/ 41:
797
+ /***/ 43:
798
798
  /***/ (function(module, exports) {
799
799
 
800
800
  module.exports = require("@splunk/react-icons/Search");
801
801
 
802
802
  /***/ }),
803
803
 
804
- /***/ 44:
804
+ /***/ 46:
805
805
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
806
806
 
807
807
  "use strict";
@@ -825,10 +825,10 @@ var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_pr
825
825
  var external_lodash_ = __webpack_require__(4);
826
826
 
827
827
  // EXTERNAL MODULE: external "@splunk/ui-utils/filter"
828
- var filter_ = __webpack_require__(25);
828
+ var filter_ = __webpack_require__(26);
829
829
 
830
830
  // EXTERNAL MODULE: external "@splunk/ui-utils/id"
831
- var id_ = __webpack_require__(10);
831
+ var id_ = __webpack_require__(11);
832
832
 
833
833
  // EXTERNAL MODULE: external "@splunk/ui-utils/i18n"
834
834
  var i18n_ = __webpack_require__(5);
@@ -841,28 +841,28 @@ var Dropdown_ = __webpack_require__(20);
841
841
  var Dropdown_default = /*#__PURE__*/__webpack_require__.n(Dropdown_);
842
842
 
843
843
  // EXTERNAL MODULE: external "@splunk/react-ui/Link"
844
- var Link_ = __webpack_require__(30);
844
+ var Link_ = __webpack_require__(33);
845
845
  var Link_default = /*#__PURE__*/__webpack_require__.n(Link_);
846
846
 
847
847
  // EXTERNAL MODULE: external "@splunk/react-ui/Menu"
848
848
  var Menu_ = __webpack_require__(13);
849
849
 
850
850
  // EXTERNAL MODULE: external "@splunk/react-ui/ResultsMenu"
851
- var ResultsMenu_ = __webpack_require__(34);
851
+ var ResultsMenu_ = __webpack_require__(36);
852
852
  var ResultsMenu_default = /*#__PURE__*/__webpack_require__.n(ResultsMenu_);
853
853
 
854
854
  // EXTERNAL MODULE: external "@splunk/react-ui/Text"
855
- var Text_ = __webpack_require__(23);
855
+ var Text_ = __webpack_require__(24);
856
856
  var Text_default = /*#__PURE__*/__webpack_require__.n(Text_);
857
857
 
858
858
  // EXTERNAL MODULE: ./src/icons/CaretDown.tsx
859
- var CaretDown = __webpack_require__(38);
859
+ var CaretDown = __webpack_require__(40);
860
860
 
861
861
  // EXTERNAL MODULE: ./src/icons/Search.tsx
862
- var Search = __webpack_require__(29);
862
+ var Search = __webpack_require__(31);
863
863
 
864
864
  // EXTERNAL MODULE: ./src/Select/OptionBase.tsx
865
- var OptionBase = __webpack_require__(28);
865
+ var OptionBase = __webpack_require__(30);
866
866
 
867
867
  // EXTERNAL MODULE: external "styled-components"
868
868
  var external_styled_components_ = __webpack_require__(3);
@@ -1199,15 +1199,15 @@ var SelectBase_SelectBase = /*#__PURE__*/function (_Component) {
1199
1199
  return;
1200
1200
  }
1201
1201
 
1202
- var values = Object(external_lodash_["uniq"])(((_this$getCurrentValue = _this.getCurrentValues()) !== null && _this$getCurrentValue !== void 0 ? _this$getCurrentValue : []).concat(_this.displayedValues));
1202
+ var currentValues = (_this$getCurrentValue = _this.getCurrentValues()) !== null && _this$getCurrentValue !== void 0 ? _this$getCurrentValue : [];
1203
+ var values = Object(external_lodash_["uniq"])(currentValues.concat(_this.displayedValues));
1204
+ values = external_react_default.a.Children.toArray(children).filter(function (child) {
1205
+ return isOption(child) && Object(external_lodash_["includes"])(values, child.props.value) && (!child.props.disabled || Object(external_lodash_["includes"])(currentValues, child.props.value));
1206
+ }).map(function (child) {
1207
+ return child.props.value;
1208
+ });
1203
1209
 
1204
1210
  if (!_this.isControlled()) {
1205
- values = external_react_default.a.Children.toArray(children).filter(function (child) {
1206
- return isOption(child) && Object(external_lodash_["includes"])(values, child.props.value) && !child.props.disabled;
1207
- }).map(function (child) {
1208
- return child.props.value;
1209
- });
1210
-
1211
1211
  _this.setState({
1212
1212
  values: values
1213
1213
  });
@@ -1220,16 +1220,25 @@ var SelectBase_SelectBase = /*#__PURE__*/function (_Component) {
1220
1220
  });
1221
1221
 
1222
1222
  _defineProperty(_assertThisInitialized(_this), "handleClearAll", function (e) {
1223
- var _this$props$onChange2, _this$props3;
1223
+ var _this$getCurrentValue2, _this$props$onChange2, _this$props4;
1224
+
1225
+ var _this$props3 = _this.props,
1226
+ name = _this$props3.name,
1227
+ children = _this$props3.children,
1228
+ multiple = _this$props3.multiple; // this doesn't make sense if we can't select multiple values
1224
1229
 
1225
- // this doesn't make sense if we can't select multiple values
1226
- if (!_this.props.multiple) {
1230
+ if (!multiple) {
1227
1231
  return;
1228
- } // Clear the filtered items, items when filtering. Else clear all the items.
1232
+ }
1229
1233
 
1234
+ var currentValues = (_this$getCurrentValue2 = _this.getCurrentValues()) !== null && _this$getCurrentValue2 !== void 0 ? _this$getCurrentValue2 : [];
1235
+ var hiddenCurrentValues = external_lodash_["without"].apply(void 0, [currentValues].concat(_toConsumableArray(_this.displayedValues))); // this will unselect all selected values unless those values are disabled or hidden by the filter
1230
1236
 
1231
- var values = _this.state.filterKeyword ? external_lodash_["without"].apply(void 0, [_this.getCurrentValues()].concat(_toConsumableArray(_this.displayedValues))) : [];
1232
- var name = _this.props.name;
1237
+ var values = external_react_default.a.Children.toArray(children).filter(function (child) {
1238
+ return isOption(child) && (Object(external_lodash_["includes"])(currentValues, child.props.value) && child.props.disabled || Object(external_lodash_["includes"])(hiddenCurrentValues, child.props.value));
1239
+ }).map(function (child) {
1240
+ return child.props.value;
1241
+ });
1233
1242
 
1234
1243
  if (!_this.isControlled()) {
1235
1244
  _this.setState({
@@ -1237,17 +1246,17 @@ var SelectBase_SelectBase = /*#__PURE__*/function (_Component) {
1237
1246
  });
1238
1247
  }
1239
1248
 
1240
- (_this$props$onChange2 = (_this$props3 = _this.props).onChange) === null || _this$props$onChange2 === void 0 ? void 0 : _this$props$onChange2.call(_this$props3, e, {
1249
+ (_this$props$onChange2 = (_this$props4 = _this.props).onChange) === null || _this$props$onChange2 === void 0 ? void 0 : _this$props$onChange2.call(_this$props4, e, {
1241
1250
  values: values,
1242
1251
  name: name
1243
1252
  });
1244
1253
  });
1245
1254
 
1246
1255
  _defineProperty(_assertThisInitialized(_this), "handleTextKeyDown", function (e) {
1247
- var _this$props4 = _this.props,
1248
- children = _this$props4.children,
1249
- onScrollBottom = _this$props4.onScrollBottom,
1250
- tabConfirmsNewValue = _this$props4.tabConfirmsNewValue;
1256
+ var _this$props5 = _this.props,
1257
+ children = _this$props5.children,
1258
+ onScrollBottom = _this$props5.onScrollBottom,
1259
+ tabConfirmsNewValue = _this$props5.tabConfirmsNewValue;
1251
1260
  var eventKeyCode = Object(keyboard_["keycode"])(e.nativeEvent);
1252
1261
 
1253
1262
  if (eventKeyCode === 'tab') {
@@ -1272,9 +1281,9 @@ var SelectBase_SelectBase = /*#__PURE__*/function (_Component) {
1272
1281
  });
1273
1282
 
1274
1283
  if (children && onScrollBottom) {
1275
- var _this$getCurrentValue2;
1284
+ var _this$getCurrentValue3;
1276
1285
 
1277
- var beforeLastChild = external_react_["Children"].toArray(children).length - (2 + ((_this$getCurrentValue2 = _this.getCurrentValues()) !== null && _this$getCurrentValue2 !== void 0 ? _this$getCurrentValue2 : []).length);
1286
+ var beforeLastChild = external_react_["Children"].toArray(children).length - (2 + ((_this$getCurrentValue3 = _this.getCurrentValues()) !== null && _this$getCurrentValue3 !== void 0 ? _this$getCurrentValue3 : []).length);
1278
1287
 
1279
1288
  if (_this.state.activeIndex === beforeLastChild) {
1280
1289
  _this.handleScrollBottom(e);
@@ -1367,7 +1376,7 @@ var SelectBase_SelectBase = /*#__PURE__*/function (_Component) {
1367
1376
  });
1368
1377
 
1369
1378
  _defineProperty(_assertThisInitialized(_this), "handleTextChange", function (e, _ref2) {
1370
- var _this$props$onFilterC, _this$props5;
1379
+ var _this$props$onFilterC, _this$props6;
1371
1380
 
1372
1381
  var value = _ref2.value;
1373
1382
 
@@ -1377,7 +1386,7 @@ var SelectBase_SelectBase = /*#__PURE__*/function (_Component) {
1377
1386
  activeIndex: 0
1378
1387
  });
1379
1388
 
1380
- (_this$props$onFilterC = (_this$props5 = _this.props).onFilterChange) === null || _this$props$onFilterC === void 0 ? void 0 : _this$props$onFilterC.call(_this$props5, e, {
1389
+ (_this$props$onFilterC = (_this$props6 = _this.props).onFilterChange) === null || _this$props$onFilterC === void 0 ? void 0 : _this$props$onFilterC.call(_this$props6, e, {
1381
1390
  keyword: value
1382
1391
  });
1383
1392
  });
@@ -1407,9 +1416,9 @@ var SelectBase_SelectBase = /*#__PURE__*/function (_Component) {
1407
1416
  var oldFilterKeyword = _this.state.filterKeyword;
1408
1417
 
1409
1418
  _this.setState(newState, function () {
1410
- var _this$props$onOpen, _this$props6;
1419
+ var _this$props$onOpen, _this$props7;
1411
1420
 
1412
- (_this$props$onOpen = (_this$props6 = _this.props).onOpen) === null || _this$props$onOpen === void 0 ? void 0 : _this$props$onOpen.call(_this$props6);
1421
+ (_this$props$onOpen = (_this$props7 = _this.props).onOpen) === null || _this$props$onOpen === void 0 ? void 0 : _this$props$onOpen.call(_this$props7);
1413
1422
 
1414
1423
  if (_this.firstSelectedEnabledOption && !_this.hasFilter()) {
1415
1424
  _this.firstSelectedEnabledOption.focus();
@@ -1422,9 +1431,9 @@ var SelectBase_SelectBase = /*#__PURE__*/function (_Component) {
1422
1431
  }
1423
1432
 
1424
1433
  if (oldFilterKeyword !== _this.state.filterKeyword) {
1425
- var _this$props$onFilterC2, _this$props7;
1434
+ var _this$props$onFilterC2, _this$props8;
1426
1435
 
1427
- (_this$props$onFilterC2 = (_this$props7 = _this.props).onFilterChange) === null || _this$props$onFilterC2 === void 0 ? void 0 : _this$props$onFilterC2.call(_this$props7, e, {
1436
+ (_this$props$onFilterC2 = (_this$props8 = _this.props).onFilterChange) === null || _this$props$onFilterC2 === void 0 ? void 0 : _this$props$onFilterC2.call(_this$props8, e, {
1428
1437
  keyword: _this.state.filterKeyword
1429
1438
  });
1430
1439
  }
@@ -1436,18 +1445,18 @@ var SelectBase_SelectBase = /*#__PURE__*/function (_Component) {
1436
1445
  open: false,
1437
1446
  activeIndex: 0
1438
1447
  }, function () {
1439
- var _this$props$onClose, _this$props8;
1448
+ var _this$props$onClose, _this$props9;
1440
1449
 
1441
1450
  _this.previousActiveIndex = null;
1442
- (_this$props$onClose = (_this$props8 = _this.props).onClose) === null || _this$props$onClose === void 0 ? void 0 : _this$props$onClose.call(_this$props8);
1451
+ (_this$props$onClose = (_this$props9 = _this.props).onClose) === null || _this$props$onClose === void 0 ? void 0 : _this$props$onClose.call(_this$props9);
1443
1452
  });
1444
1453
  });
1445
1454
 
1446
1455
  _defineProperty(_assertThisInitialized(_this), "handleScrollBottom", function (e) {
1447
1456
  if (_this.state.open && !_this.props.isLoadingOptions) {
1448
- var _this$props$onScrollB, _this$props9;
1457
+ var _this$props$onScrollB, _this$props10;
1449
1458
 
1450
- (_this$props$onScrollB = (_this$props9 = _this.props).onScrollBottom) === null || _this$props$onScrollB === void 0 ? void 0 : _this$props$onScrollB.call(_this$props9, e);
1459
+ (_this$props$onScrollB = (_this$props10 = _this.props).onScrollBottom) === null || _this$props$onScrollB === void 0 ? void 0 : _this$props$onScrollB.call(_this$props10, e);
1451
1460
  }
1452
1461
  });
1453
1462
 
@@ -1474,14 +1483,14 @@ var SelectBase_SelectBase = /*#__PURE__*/function (_Component) {
1474
1483
  filterKeyword = _this$state.filterKeyword,
1475
1484
  textHasFocus = _this$state.textHasFocus,
1476
1485
  topValuesState = _this$state.topValues;
1477
- var _this$props10 = _this.props,
1478
- allowKeyMatching = _this$props10.allowKeyMatching,
1479
- allowNewValues = _this$props10.allowNewValues,
1480
- filter = _this$props10.filter,
1481
- multiple = _this$props10.multiple,
1482
- showSelectedValuesFirst = _this$props10.showSelectedValuesFirst,
1483
- isLoadingOptions = _this$props10.isLoadingOptions,
1484
- onScrollBottom = _this$props10.onScrollBottom;
1486
+ var _this$props11 = _this.props,
1487
+ allowKeyMatching = _this$props11.allowKeyMatching,
1488
+ allowNewValues = _this$props11.allowNewValues,
1489
+ filter = _this$props11.filter,
1490
+ multiple = _this$props11.multiple,
1491
+ showSelectedValuesFirst = _this$props11.showSelectedValuesFirst,
1492
+ isLoadingOptions = _this$props11.isLoadingOptions,
1493
+ onScrollBottom = _this$props11.onScrollBottom;
1485
1494
 
1486
1495
  var currentValues = _this.getCurrentValues();
1487
1496
 
@@ -1744,10 +1753,10 @@ var SelectBase_SelectBase = /*#__PURE__*/function (_Component) {
1744
1753
  }, {
1745
1754
  key: "getTopValues",
1746
1755
  value: function getTopValues() {
1747
- var _this$getCurrentValue3;
1756
+ var _this$getCurrentValue4;
1748
1757
 
1749
1758
  // in non-multiple mode, don't move values to the top of the list
1750
- return this.props.multiple && this.props.showSelectedValuesFirst !== 'never' ? (_this$getCurrentValue3 = this.getCurrentValues()) !== null && _this$getCurrentValue3 !== void 0 ? _this$getCurrentValue3 : [] : [];
1759
+ return this.props.multiple && this.props.showSelectedValuesFirst !== 'never' ? (_this$getCurrentValue4 = this.getCurrentValues()) !== null && _this$getCurrentValue4 !== void 0 ? _this$getCurrentValue4 : [] : [];
1751
1760
  }
1752
1761
  }, {
1753
1762
  key: "isControlled",
@@ -1762,13 +1771,13 @@ var SelectBase_SelectBase = /*#__PURE__*/function (_Component) {
1762
1771
  }, {
1763
1772
  key: "toggleValue",
1764
1773
  value: function toggleValue(e, value) {
1765
- var _this$getCurrentValue4, _this$props$onChange3, _this$props12;
1774
+ var _this$getCurrentValue5, _this$props$onChange3, _this$props13;
1766
1775
 
1767
- var values = (_this$getCurrentValue4 = this.getCurrentValues()) !== null && _this$getCurrentValue4 !== void 0 ? _this$getCurrentValue4 : [];
1776
+ var values = (_this$getCurrentValue5 = this.getCurrentValues()) !== null && _this$getCurrentValue5 !== void 0 ? _this$getCurrentValue5 : [];
1768
1777
  var currentIndex = values.indexOf(value);
1769
- var _this$props11 = this.props,
1770
- name = _this$props11.name,
1771
- multiple = _this$props11.multiple;
1778
+ var _this$props12 = this.props,
1779
+ name = _this$props12.name,
1780
+ multiple = _this$props12.multiple;
1772
1781
  var newValues;
1773
1782
 
1774
1783
  if (multiple) {
@@ -1806,7 +1815,7 @@ var SelectBase_SelectBase = /*#__PURE__*/function (_Component) {
1806
1815
  this.focus();
1807
1816
  }
1808
1817
 
1809
- (_this$props$onChange3 = (_this$props12 = this.props).onChange) === null || _this$props$onChange3 === void 0 ? void 0 : _this$props$onChange3.call(_this$props12, e, {
1818
+ (_this$props$onChange3 = (_this$props13 = this.props).onChange) === null || _this$props$onChange3 === void 0 ? void 0 : _this$props$onChange3.call(_this$props13, e, {
1810
1819
  values: newValues,
1811
1820
  name: name
1812
1821
  });
@@ -1828,10 +1837,10 @@ var SelectBase_SelectBase = /*#__PURE__*/function (_Component) {
1828
1837
  var hasChildren = _ref4.hasChildren,
1829
1838
  placement = _ref4.placement;
1830
1839
  var filterKeyword = this.state.filterKeyword;
1831
- var _this$props13 = this.props,
1832
- inputId = _this$props13.inputId,
1833
- inputRef = _this$props13.inputRef,
1834
- multiple = _this$props13.multiple; // only visually disable these as opposed to fully disabling to avoid losing keyboard focus - see SUI-2731
1840
+ var _this$props14 = this.props,
1841
+ inputId = _this$props14.inputId,
1842
+ inputRef = _this$props14.inputRef,
1843
+ multiple = _this$props14.multiple; // only visually disable these as opposed to fully disabling to avoid losing keyboard focus - see SUI-2731
1835
1844
 
1836
1845
  var selectControls = /*#__PURE__*/external_react_default.a.createElement(StyledToggleAllControls, {
1837
1846
  $placement: placement,
@@ -1883,33 +1892,33 @@ var SelectBase_SelectBase = /*#__PURE__*/function (_Component) {
1883
1892
  }, {
1884
1893
  key: "render",
1885
1894
  value: function render() {
1886
- var _this$getCurrentValue5,
1895
+ var _this$getCurrentValue6,
1887
1896
  _this2 = this;
1888
1897
 
1889
- var _this$props14 = this.props,
1890
- appearance = _this$props14.appearance,
1891
- children = _this$props14.children,
1892
- defaultPlacement = _this$props14.defaultPlacement,
1893
- describedBy = _this$props14.describedBy,
1894
- disabled = _this$props14.disabled,
1895
- elementRef = _this$props14.elementRef,
1896
- error = _this$props14.error,
1897
- inline = _this$props14.inline,
1898
- inputId = _this$props14.inputId,
1899
- labelledBy = _this$props14.labelledBy,
1900
- labelText = _this$props14.labelText,
1901
- multiple = _this$props14.multiple,
1902
- placeholder = _this$props14.placeholder,
1903
- prefixLabel = _this$props14.prefixLabel,
1904
- repositionMode = _this$props14.repositionMode,
1905
- suffixLabel = _this$props14.suffixLabel;
1898
+ var _this$props15 = this.props,
1899
+ appearance = _this$props15.appearance,
1900
+ children = _this$props15.children,
1901
+ defaultPlacement = _this$props15.defaultPlacement,
1902
+ describedBy = _this$props15.describedBy,
1903
+ disabled = _this$props15.disabled,
1904
+ elementRef = _this$props15.elementRef,
1905
+ error = _this$props15.error,
1906
+ inline = _this$props15.inline,
1907
+ inputId = _this$props15.inputId,
1908
+ labelledBy = _this$props15.labelledBy,
1909
+ labelText = _this$props15.labelText,
1910
+ multiple = _this$props15.multiple,
1911
+ placeholder = _this$props15.placeholder,
1912
+ prefixLabel = _this$props15.prefixLabel,
1913
+ repositionMode = _this$props15.repositionMode,
1914
+ suffixLabel = _this$props15.suffixLabel;
1906
1915
  var icon;
1907
1916
  var label;
1908
1917
  var filterEnabled = this.hasFilter();
1909
1918
  var isAnyValueSelected = false; // Generate buttonLabels
1910
1919
 
1911
1920
  var childrenArray = external_react_["Children"].toArray(children);
1912
- var currentValues = (_this$getCurrentValue5 = this.getCurrentValues()) !== null && _this$getCurrentValue5 !== void 0 ? _this$getCurrentValue5 : [];
1921
+ var currentValues = (_this$getCurrentValue6 = this.getCurrentValues()) !== null && _this$getCurrentValue6 !== void 0 ? _this$getCurrentValue6 : [];
1913
1922
  var valuesLabel = currentValues.reduce(function (acc, value, index, orig) {
1914
1923
  var matchedItem = Object(external_lodash_["find"])(childrenArray, function (item) {
1915
1924
  return isOption(item) && item.props.value === value;
package/SidePanel.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 = 170);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 177);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -101,7 +101,7 @@ module.exports = require("prop-types");
101
101
 
102
102
  /***/ }),
103
103
 
104
- /***/ 170:
104
+ /***/ 177:
105
105
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
106
106
 
107
107
  "use strict";
@@ -123,7 +123,7 @@ var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_pr
123
123
  var external_lodash_ = __webpack_require__(4);
124
124
 
125
125
  // EXTERNAL MODULE: external "@splunk/react-ui/ModalLayer"
126
- var ModalLayer_ = __webpack_require__(77);
126
+ var ModalLayer_ = __webpack_require__(79);
127
127
  var ModalLayer_default = /*#__PURE__*/__webpack_require__.n(ModalLayer_);
128
128
 
129
129
  // EXTERNAL MODULE: external "styled-components"
@@ -131,7 +131,7 @@ var external_styled_components_ = __webpack_require__(3);
131
131
  var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_);
132
132
 
133
133
  // EXTERNAL MODULE: external "@splunk/react-ui/TransitionOpen"
134
- var TransitionOpen_ = __webpack_require__(52);
134
+ var TransitionOpen_ = __webpack_require__(55);
135
135
  var TransitionOpen_default = /*#__PURE__*/__webpack_require__.n(TransitionOpen_);
136
136
 
137
137
  // EXTERNAL MODULE: external "@splunk/themes"
@@ -365,14 +365,14 @@ module.exports = require("lodash");
365
365
 
366
366
  /***/ }),
367
367
 
368
- /***/ 52:
368
+ /***/ 55:
369
369
  /***/ (function(module, exports) {
370
370
 
371
371
  module.exports = require("@splunk/react-ui/TransitionOpen");
372
372
 
373
373
  /***/ }),
374
374
 
375
- /***/ 77:
375
+ /***/ 79:
376
376
  /***/ (function(module, exports) {
377
377
 
378
378
  module.exports = require("@splunk/react-ui/ModalLayer");
package/Slider.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 = 171);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 178);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -101,7 +101,7 @@ module.exports = require("prop-types");
101
101
 
102
102
  /***/ }),
103
103
 
104
- /***/ 102:
104
+ /***/ 106:
105
105
  /***/ (function(module, exports) {
106
106
 
107
107
  module.exports = require("decimal.js-light");
@@ -115,14 +115,7 @@ module.exports = require("@splunk/react-ui/EventListener");
115
115
 
116
116
  /***/ }),
117
117
 
118
- /***/ 17:
119
- /***/ (function(module, exports) {
120
-
121
- module.exports = require("@splunk/react-ui/Popover");
122
-
123
- /***/ }),
124
-
125
- /***/ 171:
118
+ /***/ 178:
126
119
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
127
120
 
128
121
  "use strict";
@@ -141,7 +134,7 @@ var external_prop_types_ = __webpack_require__(1);
141
134
  var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_);
142
135
 
143
136
  // EXTERNAL MODULE: external "decimal.js-light"
144
- var external_decimal_js_light_ = __webpack_require__(102);
137
+ var external_decimal_js_light_ = __webpack_require__(106);
145
138
  var external_decimal_js_light_default = /*#__PURE__*/__webpack_require__.n(external_decimal_js_light_);
146
139
 
147
140
  // EXTERNAL MODULE: external "lodash"
@@ -158,7 +151,7 @@ var EventListener_ = __webpack_require__(15);
158
151
  var EventListener_default = /*#__PURE__*/__webpack_require__.n(EventListener_);
159
152
 
160
153
  // EXTERNAL MODULE: external "@splunk/react-ui/Popover"
161
- var Popover_ = __webpack_require__(17);
154
+ var Popover_ = __webpack_require__(18);
162
155
  var Popover_default = /*#__PURE__*/__webpack_require__.n(Popover_);
163
156
 
164
157
  // EXTERNAL MODULE: external "styled-components"
@@ -166,7 +159,7 @@ var external_styled_components_ = __webpack_require__(3);
166
159
  var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_);
167
160
 
168
161
  // EXTERNAL MODULE: external "tinycolor2"
169
- var external_tinycolor2_ = __webpack_require__(47);
162
+ var external_tinycolor2_ = __webpack_require__(49);
170
163
  var external_tinycolor2_default = /*#__PURE__*/__webpack_require__.n(external_tinycolor2_);
171
164
 
172
165
  // EXTERNAL MODULE: external "@splunk/react-ui/Box"
@@ -766,6 +759,13 @@ SliderWithTheme.propTypes = Slider_Slider.propTypes;
766
759
 
767
760
 
768
761
 
762
+ /***/ }),
763
+
764
+ /***/ 18:
765
+ /***/ (function(module, exports) {
766
+
767
+ module.exports = require("@splunk/react-ui/Popover");
768
+
769
769
  /***/ }),
770
770
 
771
771
  /***/ 2:
@@ -789,7 +789,7 @@ module.exports = require("lodash");
789
789
 
790
790
  /***/ }),
791
791
 
792
- /***/ 47:
792
+ /***/ 49:
793
793
  /***/ (function(module, exports) {
794
794
 
795
795
  module.exports = require("tinycolor2");