@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/Multiselect.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 = 124);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 129);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -102,13 +102,6 @@ module.exports = require("prop-types");
102
102
  /***/ }),
103
103
 
104
104
  /***/ 10:
105
- /***/ (function(module, exports) {
106
-
107
- module.exports = require("@splunk/ui-utils/id");
108
-
109
- /***/ }),
110
-
111
- /***/ 11:
112
105
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
113
106
 
114
107
  "use strict";
@@ -135,7 +128,21 @@ function updateReactRef(ref, current) {
135
128
 
136
129
  /***/ }),
137
130
 
138
- /***/ 124:
131
+ /***/ 101:
132
+ /***/ (function(module, exports) {
133
+
134
+ module.exports = require("@splunk/react-ui/Chip");
135
+
136
+ /***/ }),
137
+
138
+ /***/ 11:
139
+ /***/ (function(module, exports) {
140
+
141
+ module.exports = require("@splunk/ui-utils/id");
142
+
143
+ /***/ }),
144
+
145
+ /***/ 129:
139
146
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
140
147
 
141
148
  "use strict";
@@ -166,7 +173,7 @@ var i18n_ = __webpack_require__(5);
166
173
  var Menu_ = __webpack_require__(13);
167
174
 
168
175
  // EXTERNAL MODULE: ./src/Select/OptionBase.tsx
169
- var OptionBase = __webpack_require__(28);
176
+ var OptionBase = __webpack_require__(30);
170
177
 
171
178
  // CONCATENATED MODULE: ./src/Multiselect/Option.tsx
172
179
  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); }
@@ -312,7 +319,7 @@ _defineProperty(Option_Option, "defaultProps", defaultProps);
312
319
 
313
320
  /* harmony default export */ var Multiselect_Option = (Option_Option);
314
321
  // EXTERNAL MODULE: ./src/Select/SelectBase.tsx + 2 modules
315
- var SelectBase = __webpack_require__(44);
322
+ var SelectBase = __webpack_require__(46);
316
323
 
317
324
  // CONCATENATED MODULE: ./src/Multiselect/Compact.tsx
318
325
  function Compact_typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { Compact_typeof = function _typeof(obj) { return typeof obj; }; } else { Compact_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return Compact_typeof(obj); }
@@ -463,24 +470,24 @@ Compact_defineProperty(Compact_Compact, "Heading", Menu_["Heading"]);
463
470
 
464
471
  /* harmony default export */ var Multiselect_Compact = (Compact_Compact);
465
472
  // EXTERNAL MODULE: external "@splunk/ui-utils/filter"
466
- var filter_ = __webpack_require__(25);
473
+ var filter_ = __webpack_require__(26);
467
474
 
468
475
  // EXTERNAL MODULE: external "@splunk/ui-utils/id"
469
- var id_ = __webpack_require__(10);
476
+ var id_ = __webpack_require__(11);
470
477
 
471
478
  // EXTERNAL MODULE: external "@splunk/ui-utils/keyboard"
472
479
  var keyboard_ = __webpack_require__(9);
473
480
 
474
481
  // EXTERNAL MODULE: external "@splunk/react-ui/Chip"
475
- var Chip_ = __webpack_require__(97);
482
+ var Chip_ = __webpack_require__(101);
476
483
  var Chip_default = /*#__PURE__*/__webpack_require__.n(Chip_);
477
484
 
478
485
  // EXTERNAL MODULE: external "@splunk/react-ui/ResultsMenu"
479
- var ResultsMenu_ = __webpack_require__(34);
486
+ var ResultsMenu_ = __webpack_require__(36);
480
487
  var ResultsMenu_default = /*#__PURE__*/__webpack_require__.n(ResultsMenu_);
481
488
 
482
489
  // EXTERNAL MODULE: external "@splunk/react-ui/Popover"
483
- var Popover_ = __webpack_require__(17);
490
+ var Popover_ = __webpack_require__(18);
484
491
  var Popover_default = /*#__PURE__*/__webpack_require__.n(Popover_);
485
492
 
486
493
  // EXTERNAL MODULE: external "@splunk/react-ui/ScreenReaderContent"
@@ -574,7 +581,7 @@ var StyledOverlay = external_styled_components_default.a.div.withConfig({
574
581
  });
575
582
 
576
583
  // EXTERNAL MODULE: ./src/utils/updateReactRef.ts
577
- var updateReactRef = __webpack_require__(11);
584
+ var updateReactRef = __webpack_require__(10);
578
585
 
579
586
  // CONCATENATED MODULE: ./src/Multiselect/Normal.tsx
580
587
  function Normal_typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { Normal_typeof = function _typeof(obj) { return typeof obj; }; } else { Normal_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return Normal_typeof(obj); }
@@ -1464,7 +1471,7 @@ module.exports = require("@splunk/react-ui/Button");
1464
1471
 
1465
1472
  /***/ }),
1466
1473
 
1467
- /***/ 17:
1474
+ /***/ 18:
1468
1475
  /***/ (function(module, exports) {
1469
1476
 
1470
1477
  module.exports = require("@splunk/react-ui/Popover");
@@ -1485,21 +1492,28 @@ module.exports = require("@splunk/react-ui/Dropdown");
1485
1492
 
1486
1493
  /***/ }),
1487
1494
 
1488
- /***/ 23:
1495
+ /***/ 24:
1489
1496
  /***/ (function(module, exports) {
1490
1497
 
1491
1498
  module.exports = require("@splunk/react-ui/Text");
1492
1499
 
1493
1500
  /***/ }),
1494
1501
 
1495
- /***/ 25:
1502
+ /***/ 26:
1496
1503
  /***/ (function(module, exports) {
1497
1504
 
1498
1505
  module.exports = require("@splunk/ui-utils/filter");
1499
1506
 
1500
1507
  /***/ }),
1501
1508
 
1502
- /***/ 28:
1509
+ /***/ 3:
1510
+ /***/ (function(module, exports) {
1511
+
1512
+ module.exports = require("styled-components");
1513
+
1514
+ /***/ }),
1515
+
1516
+ /***/ 30:
1503
1517
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1504
1518
 
1505
1519
  "use strict";
@@ -1675,14 +1689,14 @@ _defineProperty(Option, "defaultProps", defaultProps);
1675
1689
 
1676
1690
  /***/ }),
1677
1691
 
1678
- /***/ 29:
1692
+ /***/ 31:
1679
1693
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1680
1694
 
1681
1695
  "use strict";
1682
1696
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Search; });
1683
1697
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
1684
1698
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1685
- /* harmony import */ var _splunk_react_icons_Search__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(41);
1699
+ /* harmony import */ var _splunk_react_icons_Search__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(43);
1686
1700
  /* harmony import */ var _splunk_react_icons_Search__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_splunk_react_icons_Search__WEBPACK_IMPORTED_MODULE_1__);
1687
1701
  /* harmony import */ var _ThemedIcon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
1688
1702
  /* harmony import */ var _SVG__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6);
@@ -1725,35 +1739,35 @@ function Search(props) {
1725
1739
 
1726
1740
  /***/ }),
1727
1741
 
1728
- /***/ 3:
1742
+ /***/ 33:
1729
1743
  /***/ (function(module, exports) {
1730
1744
 
1731
- module.exports = require("styled-components");
1745
+ module.exports = require("@splunk/react-ui/Link");
1732
1746
 
1733
1747
  /***/ }),
1734
1748
 
1735
- /***/ 30:
1749
+ /***/ 36:
1736
1750
  /***/ (function(module, exports) {
1737
1751
 
1738
- module.exports = require("@splunk/react-ui/Link");
1752
+ module.exports = require("@splunk/react-ui/ResultsMenu");
1739
1753
 
1740
1754
  /***/ }),
1741
1755
 
1742
- /***/ 34:
1756
+ /***/ 4:
1743
1757
  /***/ (function(module, exports) {
1744
1758
 
1745
- module.exports = require("@splunk/react-ui/ResultsMenu");
1759
+ module.exports = require("lodash");
1746
1760
 
1747
1761
  /***/ }),
1748
1762
 
1749
- /***/ 38:
1763
+ /***/ 40:
1750
1764
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1751
1765
 
1752
1766
  "use strict";
1753
1767
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return CaretDown; });
1754
1768
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
1755
1769
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1756
- /* harmony import */ var _splunk_react_icons_Caret__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39);
1770
+ /* harmony import */ var _splunk_react_icons_Caret__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(41);
1757
1771
  /* harmony import */ var _splunk_react_icons_Caret__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_splunk_react_icons_Caret__WEBPACK_IMPORTED_MODULE_1__);
1758
1772
  /* harmony import */ var _ThemedIcon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
1759
1773
  /* harmony import */ var _SVG__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6);
@@ -1784,28 +1798,21 @@ function CaretDown(props) {
1784
1798
 
1785
1799
  /***/ }),
1786
1800
 
1787
- /***/ 39:
1801
+ /***/ 41:
1788
1802
  /***/ (function(module, exports) {
1789
1803
 
1790
1804
  module.exports = require("@splunk/react-icons/Caret");
1791
1805
 
1792
1806
  /***/ }),
1793
1807
 
1794
- /***/ 4:
1795
- /***/ (function(module, exports) {
1796
-
1797
- module.exports = require("lodash");
1798
-
1799
- /***/ }),
1800
-
1801
- /***/ 41:
1808
+ /***/ 43:
1802
1809
  /***/ (function(module, exports) {
1803
1810
 
1804
1811
  module.exports = require("@splunk/react-icons/Search");
1805
1812
 
1806
1813
  /***/ }),
1807
1814
 
1808
- /***/ 44:
1815
+ /***/ 46:
1809
1816
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1810
1817
 
1811
1818
  "use strict";
@@ -1829,10 +1836,10 @@ var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_pr
1829
1836
  var external_lodash_ = __webpack_require__(4);
1830
1837
 
1831
1838
  // EXTERNAL MODULE: external "@splunk/ui-utils/filter"
1832
- var filter_ = __webpack_require__(25);
1839
+ var filter_ = __webpack_require__(26);
1833
1840
 
1834
1841
  // EXTERNAL MODULE: external "@splunk/ui-utils/id"
1835
- var id_ = __webpack_require__(10);
1842
+ var id_ = __webpack_require__(11);
1836
1843
 
1837
1844
  // EXTERNAL MODULE: external "@splunk/ui-utils/i18n"
1838
1845
  var i18n_ = __webpack_require__(5);
@@ -1845,28 +1852,28 @@ var Dropdown_ = __webpack_require__(20);
1845
1852
  var Dropdown_default = /*#__PURE__*/__webpack_require__.n(Dropdown_);
1846
1853
 
1847
1854
  // EXTERNAL MODULE: external "@splunk/react-ui/Link"
1848
- var Link_ = __webpack_require__(30);
1855
+ var Link_ = __webpack_require__(33);
1849
1856
  var Link_default = /*#__PURE__*/__webpack_require__.n(Link_);
1850
1857
 
1851
1858
  // EXTERNAL MODULE: external "@splunk/react-ui/Menu"
1852
1859
  var Menu_ = __webpack_require__(13);
1853
1860
 
1854
1861
  // EXTERNAL MODULE: external "@splunk/react-ui/ResultsMenu"
1855
- var ResultsMenu_ = __webpack_require__(34);
1862
+ var ResultsMenu_ = __webpack_require__(36);
1856
1863
  var ResultsMenu_default = /*#__PURE__*/__webpack_require__.n(ResultsMenu_);
1857
1864
 
1858
1865
  // EXTERNAL MODULE: external "@splunk/react-ui/Text"
1859
- var Text_ = __webpack_require__(23);
1866
+ var Text_ = __webpack_require__(24);
1860
1867
  var Text_default = /*#__PURE__*/__webpack_require__.n(Text_);
1861
1868
 
1862
1869
  // EXTERNAL MODULE: ./src/icons/CaretDown.tsx
1863
- var CaretDown = __webpack_require__(38);
1870
+ var CaretDown = __webpack_require__(40);
1864
1871
 
1865
1872
  // EXTERNAL MODULE: ./src/icons/Search.tsx
1866
- var Search = __webpack_require__(29);
1873
+ var Search = __webpack_require__(31);
1867
1874
 
1868
1875
  // EXTERNAL MODULE: ./src/Select/OptionBase.tsx
1869
- var OptionBase = __webpack_require__(28);
1876
+ var OptionBase = __webpack_require__(30);
1870
1877
 
1871
1878
  // EXTERNAL MODULE: external "styled-components"
1872
1879
  var external_styled_components_ = __webpack_require__(3);
@@ -2203,15 +2210,15 @@ var SelectBase_SelectBase = /*#__PURE__*/function (_Component) {
2203
2210
  return;
2204
2211
  }
2205
2212
 
2206
- var values = Object(external_lodash_["uniq"])(((_this$getCurrentValue = _this.getCurrentValues()) !== null && _this$getCurrentValue !== void 0 ? _this$getCurrentValue : []).concat(_this.displayedValues));
2213
+ var currentValues = (_this$getCurrentValue = _this.getCurrentValues()) !== null && _this$getCurrentValue !== void 0 ? _this$getCurrentValue : [];
2214
+ var values = Object(external_lodash_["uniq"])(currentValues.concat(_this.displayedValues));
2215
+ values = external_react_default.a.Children.toArray(children).filter(function (child) {
2216
+ return isOption(child) && Object(external_lodash_["includes"])(values, child.props.value) && (!child.props.disabled || Object(external_lodash_["includes"])(currentValues, child.props.value));
2217
+ }).map(function (child) {
2218
+ return child.props.value;
2219
+ });
2207
2220
 
2208
2221
  if (!_this.isControlled()) {
2209
- values = external_react_default.a.Children.toArray(children).filter(function (child) {
2210
- return isOption(child) && Object(external_lodash_["includes"])(values, child.props.value) && !child.props.disabled;
2211
- }).map(function (child) {
2212
- return child.props.value;
2213
- });
2214
-
2215
2222
  _this.setState({
2216
2223
  values: values
2217
2224
  });
@@ -2224,16 +2231,25 @@ var SelectBase_SelectBase = /*#__PURE__*/function (_Component) {
2224
2231
  });
2225
2232
 
2226
2233
  _defineProperty(_assertThisInitialized(_this), "handleClearAll", function (e) {
2227
- var _this$props$onChange2, _this$props3;
2234
+ var _this$getCurrentValue2, _this$props$onChange2, _this$props4;
2228
2235
 
2229
- // this doesn't make sense if we can't select multiple values
2230
- if (!_this.props.multiple) {
2236
+ var _this$props3 = _this.props,
2237
+ name = _this$props3.name,
2238
+ children = _this$props3.children,
2239
+ multiple = _this$props3.multiple; // this doesn't make sense if we can't select multiple values
2240
+
2241
+ if (!multiple) {
2231
2242
  return;
2232
- } // Clear the filtered items, items when filtering. Else clear all the items.
2243
+ }
2233
2244
 
2245
+ var currentValues = (_this$getCurrentValue2 = _this.getCurrentValues()) !== null && _this$getCurrentValue2 !== void 0 ? _this$getCurrentValue2 : [];
2246
+ 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
2234
2247
 
2235
- var values = _this.state.filterKeyword ? external_lodash_["without"].apply(void 0, [_this.getCurrentValues()].concat(_toConsumableArray(_this.displayedValues))) : [];
2236
- var name = _this.props.name;
2248
+ var values = external_react_default.a.Children.toArray(children).filter(function (child) {
2249
+ return isOption(child) && (Object(external_lodash_["includes"])(currentValues, child.props.value) && child.props.disabled || Object(external_lodash_["includes"])(hiddenCurrentValues, child.props.value));
2250
+ }).map(function (child) {
2251
+ return child.props.value;
2252
+ });
2237
2253
 
2238
2254
  if (!_this.isControlled()) {
2239
2255
  _this.setState({
@@ -2241,17 +2257,17 @@ var SelectBase_SelectBase = /*#__PURE__*/function (_Component) {
2241
2257
  });
2242
2258
  }
2243
2259
 
2244
- (_this$props$onChange2 = (_this$props3 = _this.props).onChange) === null || _this$props$onChange2 === void 0 ? void 0 : _this$props$onChange2.call(_this$props3, e, {
2260
+ (_this$props$onChange2 = (_this$props4 = _this.props).onChange) === null || _this$props$onChange2 === void 0 ? void 0 : _this$props$onChange2.call(_this$props4, e, {
2245
2261
  values: values,
2246
2262
  name: name
2247
2263
  });
2248
2264
  });
2249
2265
 
2250
2266
  _defineProperty(_assertThisInitialized(_this), "handleTextKeyDown", function (e) {
2251
- var _this$props4 = _this.props,
2252
- children = _this$props4.children,
2253
- onScrollBottom = _this$props4.onScrollBottom,
2254
- tabConfirmsNewValue = _this$props4.tabConfirmsNewValue;
2267
+ var _this$props5 = _this.props,
2268
+ children = _this$props5.children,
2269
+ onScrollBottom = _this$props5.onScrollBottom,
2270
+ tabConfirmsNewValue = _this$props5.tabConfirmsNewValue;
2255
2271
  var eventKeyCode = Object(keyboard_["keycode"])(e.nativeEvent);
2256
2272
 
2257
2273
  if (eventKeyCode === 'tab') {
@@ -2276,9 +2292,9 @@ var SelectBase_SelectBase = /*#__PURE__*/function (_Component) {
2276
2292
  });
2277
2293
 
2278
2294
  if (children && onScrollBottom) {
2279
- var _this$getCurrentValue2;
2295
+ var _this$getCurrentValue3;
2280
2296
 
2281
- var beforeLastChild = external_react_["Children"].toArray(children).length - (2 + ((_this$getCurrentValue2 = _this.getCurrentValues()) !== null && _this$getCurrentValue2 !== void 0 ? _this$getCurrentValue2 : []).length);
2297
+ var beforeLastChild = external_react_["Children"].toArray(children).length - (2 + ((_this$getCurrentValue3 = _this.getCurrentValues()) !== null && _this$getCurrentValue3 !== void 0 ? _this$getCurrentValue3 : []).length);
2282
2298
 
2283
2299
  if (_this.state.activeIndex === beforeLastChild) {
2284
2300
  _this.handleScrollBottom(e);
@@ -2371,7 +2387,7 @@ var SelectBase_SelectBase = /*#__PURE__*/function (_Component) {
2371
2387
  });
2372
2388
 
2373
2389
  _defineProperty(_assertThisInitialized(_this), "handleTextChange", function (e, _ref2) {
2374
- var _this$props$onFilterC, _this$props5;
2390
+ var _this$props$onFilterC, _this$props6;
2375
2391
 
2376
2392
  var value = _ref2.value;
2377
2393
 
@@ -2381,7 +2397,7 @@ var SelectBase_SelectBase = /*#__PURE__*/function (_Component) {
2381
2397
  activeIndex: 0
2382
2398
  });
2383
2399
 
2384
- (_this$props$onFilterC = (_this$props5 = _this.props).onFilterChange) === null || _this$props$onFilterC === void 0 ? void 0 : _this$props$onFilterC.call(_this$props5, e, {
2400
+ (_this$props$onFilterC = (_this$props6 = _this.props).onFilterChange) === null || _this$props$onFilterC === void 0 ? void 0 : _this$props$onFilterC.call(_this$props6, e, {
2385
2401
  keyword: value
2386
2402
  });
2387
2403
  });
@@ -2411,9 +2427,9 @@ var SelectBase_SelectBase = /*#__PURE__*/function (_Component) {
2411
2427
  var oldFilterKeyword = _this.state.filterKeyword;
2412
2428
 
2413
2429
  _this.setState(newState, function () {
2414
- var _this$props$onOpen, _this$props6;
2430
+ var _this$props$onOpen, _this$props7;
2415
2431
 
2416
- (_this$props$onOpen = (_this$props6 = _this.props).onOpen) === null || _this$props$onOpen === void 0 ? void 0 : _this$props$onOpen.call(_this$props6);
2432
+ (_this$props$onOpen = (_this$props7 = _this.props).onOpen) === null || _this$props$onOpen === void 0 ? void 0 : _this$props$onOpen.call(_this$props7);
2417
2433
 
2418
2434
  if (_this.firstSelectedEnabledOption && !_this.hasFilter()) {
2419
2435
  _this.firstSelectedEnabledOption.focus();
@@ -2426,9 +2442,9 @@ var SelectBase_SelectBase = /*#__PURE__*/function (_Component) {
2426
2442
  }
2427
2443
 
2428
2444
  if (oldFilterKeyword !== _this.state.filterKeyword) {
2429
- var _this$props$onFilterC2, _this$props7;
2445
+ var _this$props$onFilterC2, _this$props8;
2430
2446
 
2431
- (_this$props$onFilterC2 = (_this$props7 = _this.props).onFilterChange) === null || _this$props$onFilterC2 === void 0 ? void 0 : _this$props$onFilterC2.call(_this$props7, e, {
2447
+ (_this$props$onFilterC2 = (_this$props8 = _this.props).onFilterChange) === null || _this$props$onFilterC2 === void 0 ? void 0 : _this$props$onFilterC2.call(_this$props8, e, {
2432
2448
  keyword: _this.state.filterKeyword
2433
2449
  });
2434
2450
  }
@@ -2440,18 +2456,18 @@ var SelectBase_SelectBase = /*#__PURE__*/function (_Component) {
2440
2456
  open: false,
2441
2457
  activeIndex: 0
2442
2458
  }, function () {
2443
- var _this$props$onClose, _this$props8;
2459
+ var _this$props$onClose, _this$props9;
2444
2460
 
2445
2461
  _this.previousActiveIndex = null;
2446
- (_this$props$onClose = (_this$props8 = _this.props).onClose) === null || _this$props$onClose === void 0 ? void 0 : _this$props$onClose.call(_this$props8);
2462
+ (_this$props$onClose = (_this$props9 = _this.props).onClose) === null || _this$props$onClose === void 0 ? void 0 : _this$props$onClose.call(_this$props9);
2447
2463
  });
2448
2464
  });
2449
2465
 
2450
2466
  _defineProperty(_assertThisInitialized(_this), "handleScrollBottom", function (e) {
2451
2467
  if (_this.state.open && !_this.props.isLoadingOptions) {
2452
- var _this$props$onScrollB, _this$props9;
2468
+ var _this$props$onScrollB, _this$props10;
2453
2469
 
2454
- (_this$props$onScrollB = (_this$props9 = _this.props).onScrollBottom) === null || _this$props$onScrollB === void 0 ? void 0 : _this$props$onScrollB.call(_this$props9, e);
2470
+ (_this$props$onScrollB = (_this$props10 = _this.props).onScrollBottom) === null || _this$props$onScrollB === void 0 ? void 0 : _this$props$onScrollB.call(_this$props10, e);
2455
2471
  }
2456
2472
  });
2457
2473
 
@@ -2478,14 +2494,14 @@ var SelectBase_SelectBase = /*#__PURE__*/function (_Component) {
2478
2494
  filterKeyword = _this$state.filterKeyword,
2479
2495
  textHasFocus = _this$state.textHasFocus,
2480
2496
  topValuesState = _this$state.topValues;
2481
- var _this$props10 = _this.props,
2482
- allowKeyMatching = _this$props10.allowKeyMatching,
2483
- allowNewValues = _this$props10.allowNewValues,
2484
- filter = _this$props10.filter,
2485
- multiple = _this$props10.multiple,
2486
- showSelectedValuesFirst = _this$props10.showSelectedValuesFirst,
2487
- isLoadingOptions = _this$props10.isLoadingOptions,
2488
- onScrollBottom = _this$props10.onScrollBottom;
2497
+ var _this$props11 = _this.props,
2498
+ allowKeyMatching = _this$props11.allowKeyMatching,
2499
+ allowNewValues = _this$props11.allowNewValues,
2500
+ filter = _this$props11.filter,
2501
+ multiple = _this$props11.multiple,
2502
+ showSelectedValuesFirst = _this$props11.showSelectedValuesFirst,
2503
+ isLoadingOptions = _this$props11.isLoadingOptions,
2504
+ onScrollBottom = _this$props11.onScrollBottom;
2489
2505
 
2490
2506
  var currentValues = _this.getCurrentValues();
2491
2507
 
@@ -2748,10 +2764,10 @@ var SelectBase_SelectBase = /*#__PURE__*/function (_Component) {
2748
2764
  }, {
2749
2765
  key: "getTopValues",
2750
2766
  value: function getTopValues() {
2751
- var _this$getCurrentValue3;
2767
+ var _this$getCurrentValue4;
2752
2768
 
2753
2769
  // in non-multiple mode, don't move values to the top of the list
2754
- return this.props.multiple && this.props.showSelectedValuesFirst !== 'never' ? (_this$getCurrentValue3 = this.getCurrentValues()) !== null && _this$getCurrentValue3 !== void 0 ? _this$getCurrentValue3 : [] : [];
2770
+ return this.props.multiple && this.props.showSelectedValuesFirst !== 'never' ? (_this$getCurrentValue4 = this.getCurrentValues()) !== null && _this$getCurrentValue4 !== void 0 ? _this$getCurrentValue4 : [] : [];
2755
2771
  }
2756
2772
  }, {
2757
2773
  key: "isControlled",
@@ -2766,13 +2782,13 @@ var SelectBase_SelectBase = /*#__PURE__*/function (_Component) {
2766
2782
  }, {
2767
2783
  key: "toggleValue",
2768
2784
  value: function toggleValue(e, value) {
2769
- var _this$getCurrentValue4, _this$props$onChange3, _this$props12;
2785
+ var _this$getCurrentValue5, _this$props$onChange3, _this$props13;
2770
2786
 
2771
- var values = (_this$getCurrentValue4 = this.getCurrentValues()) !== null && _this$getCurrentValue4 !== void 0 ? _this$getCurrentValue4 : [];
2787
+ var values = (_this$getCurrentValue5 = this.getCurrentValues()) !== null && _this$getCurrentValue5 !== void 0 ? _this$getCurrentValue5 : [];
2772
2788
  var currentIndex = values.indexOf(value);
2773
- var _this$props11 = this.props,
2774
- name = _this$props11.name,
2775
- multiple = _this$props11.multiple;
2789
+ var _this$props12 = this.props,
2790
+ name = _this$props12.name,
2791
+ multiple = _this$props12.multiple;
2776
2792
  var newValues;
2777
2793
 
2778
2794
  if (multiple) {
@@ -2810,7 +2826,7 @@ var SelectBase_SelectBase = /*#__PURE__*/function (_Component) {
2810
2826
  this.focus();
2811
2827
  }
2812
2828
 
2813
- (_this$props$onChange3 = (_this$props12 = this.props).onChange) === null || _this$props$onChange3 === void 0 ? void 0 : _this$props$onChange3.call(_this$props12, e, {
2829
+ (_this$props$onChange3 = (_this$props13 = this.props).onChange) === null || _this$props$onChange3 === void 0 ? void 0 : _this$props$onChange3.call(_this$props13, e, {
2814
2830
  values: newValues,
2815
2831
  name: name
2816
2832
  });
@@ -2832,10 +2848,10 @@ var SelectBase_SelectBase = /*#__PURE__*/function (_Component) {
2832
2848
  var hasChildren = _ref4.hasChildren,
2833
2849
  placement = _ref4.placement;
2834
2850
  var filterKeyword = this.state.filterKeyword;
2835
- var _this$props13 = this.props,
2836
- inputId = _this$props13.inputId,
2837
- inputRef = _this$props13.inputRef,
2838
- multiple = _this$props13.multiple; // only visually disable these as opposed to fully disabling to avoid losing keyboard focus - see SUI-2731
2851
+ var _this$props14 = this.props,
2852
+ inputId = _this$props14.inputId,
2853
+ inputRef = _this$props14.inputRef,
2854
+ multiple = _this$props14.multiple; // only visually disable these as opposed to fully disabling to avoid losing keyboard focus - see SUI-2731
2839
2855
 
2840
2856
  var selectControls = /*#__PURE__*/external_react_default.a.createElement(StyledToggleAllControls, {
2841
2857
  $placement: placement,
@@ -2887,33 +2903,33 @@ var SelectBase_SelectBase = /*#__PURE__*/function (_Component) {
2887
2903
  }, {
2888
2904
  key: "render",
2889
2905
  value: function render() {
2890
- var _this$getCurrentValue5,
2906
+ var _this$getCurrentValue6,
2891
2907
  _this2 = this;
2892
2908
 
2893
- var _this$props14 = this.props,
2894
- appearance = _this$props14.appearance,
2895
- children = _this$props14.children,
2896
- defaultPlacement = _this$props14.defaultPlacement,
2897
- describedBy = _this$props14.describedBy,
2898
- disabled = _this$props14.disabled,
2899
- elementRef = _this$props14.elementRef,
2900
- error = _this$props14.error,
2901
- inline = _this$props14.inline,
2902
- inputId = _this$props14.inputId,
2903
- labelledBy = _this$props14.labelledBy,
2904
- labelText = _this$props14.labelText,
2905
- multiple = _this$props14.multiple,
2906
- placeholder = _this$props14.placeholder,
2907
- prefixLabel = _this$props14.prefixLabel,
2908
- repositionMode = _this$props14.repositionMode,
2909
- suffixLabel = _this$props14.suffixLabel;
2909
+ var _this$props15 = this.props,
2910
+ appearance = _this$props15.appearance,
2911
+ children = _this$props15.children,
2912
+ defaultPlacement = _this$props15.defaultPlacement,
2913
+ describedBy = _this$props15.describedBy,
2914
+ disabled = _this$props15.disabled,
2915
+ elementRef = _this$props15.elementRef,
2916
+ error = _this$props15.error,
2917
+ inline = _this$props15.inline,
2918
+ inputId = _this$props15.inputId,
2919
+ labelledBy = _this$props15.labelledBy,
2920
+ labelText = _this$props15.labelText,
2921
+ multiple = _this$props15.multiple,
2922
+ placeholder = _this$props15.placeholder,
2923
+ prefixLabel = _this$props15.prefixLabel,
2924
+ repositionMode = _this$props15.repositionMode,
2925
+ suffixLabel = _this$props15.suffixLabel;
2910
2926
  var icon;
2911
2927
  var label;
2912
2928
  var filterEnabled = this.hasFilter();
2913
2929
  var isAnyValueSelected = false; // Generate buttonLabels
2914
2930
 
2915
2931
  var childrenArray = external_react_["Children"].toArray(children);
2916
- var currentValues = (_this$getCurrentValue5 = this.getCurrentValues()) !== null && _this$getCurrentValue5 !== void 0 ? _this$getCurrentValue5 : [];
2932
+ var currentValues = (_this$getCurrentValue6 = this.getCurrentValues()) !== null && _this$getCurrentValue6 !== void 0 ? _this$getCurrentValue6 : [];
2917
2933
  var valuesLabel = currentValues.reduce(function (acc, value, index, orig) {
2918
2934
  var matchedItem = Object(external_lodash_["find"])(childrenArray, function (item) {
2919
2935
  return isOption(item) && item.props.value === value;
@@ -3244,13 +3260,6 @@ module.exports = require("@splunk/react-ui/Box");
3244
3260
 
3245
3261
  module.exports = require("@splunk/ui-utils/keyboard");
3246
3262
 
3247
- /***/ }),
3248
-
3249
- /***/ 97:
3250
- /***/ (function(module, exports) {
3251
-
3252
- module.exports = require("@splunk/react-ui/Chip");
3253
-
3254
3263
  /***/ })
3255
3264
 
3256
3265
  /******/ });
package/Number.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 = 140);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 145);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -108,7 +108,7 @@ module.exports = require("@splunk/react-ui/Clickable");
108
108
 
109
109
  /***/ }),
110
110
 
111
- /***/ 140:
111
+ /***/ 145:
112
112
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
113
113
 
114
114
  "use strict";
@@ -139,7 +139,7 @@ var keyboard_ = __webpack_require__(9);
139
139
  var i18n_ = __webpack_require__(5);
140
140
 
141
141
  // EXTERNAL MODULE: external "@splunk/react-icons/SVG"
142
- var SVG_ = __webpack_require__(24);
142
+ var SVG_ = __webpack_require__(25);
143
143
  var SVG_default = /*#__PURE__*/__webpack_require__.n(SVG_);
144
144
 
145
145
  // CONCATENATED MODULE: ./src/Number/IncrementIcon.tsx
@@ -170,7 +170,7 @@ var Clickable_ = __webpack_require__(12);
170
170
  var Clickable_default = /*#__PURE__*/__webpack_require__.n(Clickable_);
171
171
 
172
172
  // EXTERNAL MODULE: external "@splunk/react-ui/Text"
173
- var Text_ = __webpack_require__(23);
173
+ var Text_ = __webpack_require__(24);
174
174
  var Text_default = /*#__PURE__*/__webpack_require__.n(Text_);
175
175
 
176
176
  // CONCATENATED MODULE: ./src/Number/NumberStyles.ts
@@ -534,6 +534,8 @@ var Number_Number = /*#__PURE__*/function (_Component) {
534
534
  console.warn("The 'Number' prop 'useSyntheticPlaceholder' has been marked for deprecation.");
535
535
  }
536
536
 
537
+ if (false) {}
538
+
537
539
  Number.validatePrependAppend(_this.props.append, _this.props.prepend);
538
540
  return _this;
539
541
  }
@@ -779,14 +781,14 @@ module.exports = require("react");
779
781
 
780
782
  /***/ }),
781
783
 
782
- /***/ 23:
784
+ /***/ 24:
783
785
  /***/ (function(module, exports) {
784
786
 
785
787
  module.exports = require("@splunk/react-ui/Text");
786
788
 
787
789
  /***/ }),
788
790
 
789
- /***/ 24:
791
+ /***/ 25:
790
792
  /***/ (function(module, exports) {
791
793
 
792
794
  module.exports = require("@splunk/react-icons/SVG");