@splunk/react-ui 4.18.0 → 4.20.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 (110) hide show
  1. package/Accordion.js +6 -6
  2. package/Anchor.js +2 -2
  3. package/Animation.js +4 -4
  4. package/AnimationToggle.js +2 -2
  5. package/Box.js +2 -2
  6. package/Breadcrumbs.d.ts +2 -0
  7. package/Breadcrumbs.js +299 -0
  8. package/Button.js +17 -17
  9. package/ButtonGroup.js +2 -2
  10. package/ButtonSimple.js +2 -2
  11. package/CHANGELOG.md +25 -1
  12. package/Calendar.js +17 -17
  13. package/Card.js +10 -10
  14. package/CardLayout.js +2 -2
  15. package/Chip.js +32 -25
  16. package/Clickable.js +16 -14
  17. package/CloseButton.js +8 -8
  18. package/Code.js +40 -15
  19. package/CollapsiblePanel.js +10 -10
  20. package/Color.js +33 -33
  21. package/ColumnLayout.js +8 -8
  22. package/ComboBox.js +28 -28
  23. package/Concertina.js +18 -18
  24. package/ControlGroup.js +13 -13
  25. package/Date.js +29 -29
  26. package/DefinitionList.js +2 -2
  27. package/Divider.js +2 -2
  28. package/Dropdown.js +21 -21
  29. package/DualListbox.js +24 -24
  30. package/EventListener.js +4 -4
  31. package/File.js +23 -23
  32. package/FormRows.js +266 -105
  33. package/Heading.js +45 -49
  34. package/Image.js +23 -23
  35. package/JSONTree.js +20 -20
  36. package/Layer.js +14 -14
  37. package/Link.js +7 -7
  38. package/List.js +2 -2
  39. package/Markdown.js +19 -20
  40. package/Menu.js +252 -232
  41. package/Message.js +43 -43
  42. package/MessageBar.js +39 -39
  43. package/Modal.js +20 -20
  44. package/ModalLayer.js +6 -6
  45. package/Monogram.js +3 -3
  46. package/Multiselect.js +2987 -2493
  47. package/Number.js +8 -8
  48. package/Paginator.js +16 -16
  49. package/Paragraph.js +2 -2
  50. package/Popover.js +113 -50
  51. package/Progress.js +10 -10
  52. package/RadioBar.js +4 -4
  53. package/RadioList.js +2 -2
  54. package/Resize.js +4 -4
  55. package/ResultsMenu.js +43 -22
  56. package/ScreenReaderContent.js +2 -2
  57. package/Scroll.js +8 -8
  58. package/ScrollContainerContext.js +4 -4
  59. package/Search.js +25 -25
  60. package/Select.js +517 -120
  61. package/SidePanel.js +6 -6
  62. package/Slider.js +8 -8
  63. package/SlidingPanels.js +10 -10
  64. package/SplitButton.js +4 -4
  65. package/StaticContent.js +2 -2
  66. package/StepBar.js +8 -8
  67. package/Switch.js +6 -6
  68. package/TabBar.js +6 -6
  69. package/TabLayout.js +6 -6
  70. package/Table.js +145 -111
  71. package/Text.js +40 -38
  72. package/TextArea.js +42 -40
  73. package/Tooltip.js +15 -15
  74. package/TransitionOpen.js +11 -11
  75. package/Typography.js +4 -4
  76. package/WaitSpinner.js +5 -5
  77. package/cypress/support/component-index.html +12 -0
  78. package/cypress/support/component.ts +27 -0
  79. package/cypress.config.ts +19 -0
  80. package/package.json +17 -17
  81. package/types/src/Breadcrumbs/Breadcrumbs.d.ts +25 -0
  82. package/types/src/Breadcrumbs/Item.d.ts +42 -0
  83. package/types/src/Breadcrumbs/docs/examples/Adornments.d.ts +2 -0
  84. package/types/src/Breadcrumbs/docs/examples/Basic.d.ts +2 -0
  85. package/types/src/Breadcrumbs/index.d.ts +2 -0
  86. package/types/src/Clickable/docs/examples/Basic.d.ts +2 -2
  87. package/types/src/Code/Code.d.ts +1 -1
  88. package/types/src/FormRows/FormRows.d.ts +1 -2
  89. package/types/src/FormRows/Row.d.ts +2 -12
  90. package/types/src/FormRows/RowInternal.d.ts +19 -0
  91. package/types/src/FormRows/SortableList.d.ts +8 -2
  92. package/types/src/FormRows/SortableRow.d.ts +20 -0
  93. package/types/src/Heading/Heading.d.ts +1 -1
  94. package/types/src/Link/Link.d.ts +5 -0
  95. package/types/src/Multiselect/Compact.d.ts +4 -0
  96. package/types/src/Multiselect/Multiselect.d.ts +5 -0
  97. package/types/src/Multiselect/docs/examples/CompactSelectAll.d.ts +2 -0
  98. package/types/src/Select/SelectAllOption.d.ts +14 -0
  99. package/types/src/Select/SelectBase.d.ts +11 -3
  100. package/types/src/Table/Table.d.ts +4 -0
  101. package/types/src/Text/Text.d.ts +3 -3
  102. package/types/src/TextArea/TextArea.d.ts +3 -3
  103. package/useForceUpdate.js +2 -2
  104. package/useKeyPress.js +2 -2
  105. package/usePrevious.js +2 -2
  106. package/useRovingFocus.js +4 -4
  107. package/cypress/plugins/index.ts +0 -15
  108. package/cypress/support/index.ts +0 -10
  109. package/cypress.json +0 -13
  110. package/types/src/Typography/docs/examples/Variants.d.ts +0 -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 = 230);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 233);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -101,24 +101,31 @@ module.exports = require("prop-types");
101
101
 
102
102
  /***/ }),
103
103
 
104
- /***/ 10:
104
+ /***/ 105:
105
105
  /***/ (function(module, exports) {
106
106
 
107
- module.exports = require("lodash/has");
107
+ module.exports = require("lodash/forEachRight");
108
108
 
109
109
  /***/ }),
110
110
 
111
- /***/ 102:
111
+ /***/ 106:
112
112
  /***/ (function(module, exports) {
113
113
 
114
- module.exports = require("lodash/forEachRight");
114
+ module.exports = require("lodash/uniq");
115
115
 
116
116
  /***/ }),
117
117
 
118
- /***/ 103:
118
+ /***/ 11:
119
119
  /***/ (function(module, exports) {
120
120
 
121
- module.exports = require("lodash/uniq");
121
+ module.exports = require("lodash/has");
122
+
123
+ /***/ }),
124
+
125
+ /***/ 12:
126
+ /***/ (function(module, exports) {
127
+
128
+ module.exports = require("@splunk/react-ui/Clickable");
122
129
 
123
130
  /***/ }),
124
131
 
@@ -149,7 +156,7 @@ module.exports = require("@splunk/react-ui/Button");
149
156
  "use strict";
150
157
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getWindow; });
151
158
  /* unused harmony export ssrWindow */
152
- /* harmony import */ var _ssrDocument__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(27);
159
+ /* harmony import */ var _ssrDocument__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(28);
153
160
  /* eslint-disable @typescript-eslint/no-empty-function */
154
161
 
155
162
  var ssrWindow = {
@@ -233,7 +240,7 @@ module.exports = require("@splunk/react-ui/Dropdown");
233
240
 
234
241
  /***/ }),
235
242
 
236
- /***/ 230:
243
+ /***/ 233:
237
244
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
238
245
 
239
246
  "use strict";
@@ -255,17 +262,17 @@ var external_prop_types_ = __webpack_require__(1);
255
262
  var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_);
256
263
 
257
264
  // EXTERNAL MODULE: external "lodash/has"
258
- var has_ = __webpack_require__(10);
265
+ var has_ = __webpack_require__(11);
259
266
  var has_default = /*#__PURE__*/__webpack_require__.n(has_);
260
267
 
261
268
  // EXTERNAL MODULE: external "@splunk/ui-utils/i18n"
262
269
  var i18n_ = __webpack_require__(4);
263
270
 
264
- // EXTERNAL MODULE: ./src/Select/SelectBase.tsx + 3 modules
265
- var SelectBase = __webpack_require__(60);
271
+ // EXTERNAL MODULE: ./src/Select/SelectBase.tsx + 5 modules
272
+ var SelectBase = __webpack_require__(62);
266
273
 
267
274
  // EXTERNAL MODULE: ./src/Select/OptionBase.tsx
268
- var OptionBase = __webpack_require__(36);
275
+ var OptionBase = __webpack_require__(30);
269
276
 
270
277
  // CONCATENATED MODULE: ./src/Select/Option.tsx
271
278
  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); }
@@ -579,7 +586,206 @@ Select_defineProperty(Select_Select, "Divider", SelectBase["a" /* Divider */]);
579
586
 
580
587
  /***/ }),
581
588
 
582
- /***/ 27:
589
+ /***/ 25:
590
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
591
+
592
+ "use strict";
593
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return StyledClickable; });
594
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return StyledInnerWrapper; });
595
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return StyledItemDescriptionBottom; });
596
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return StyledItemDescriptionRight; });
597
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return StyledItemIcon; });
598
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return StyledItemSelectedIcon; });
599
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return StyledLabel; });
600
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return StyledMatch; });
601
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return StyledSubmenu; });
602
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return StyledSwitch; });
603
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return StyledTitleAndDescriptionWrapper; });
604
+ /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
605
+ /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(styled_components__WEBPACK_IMPORTED_MODULE_0__);
606
+ /* harmony import */ var _splunk_react_ui_Clickable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12);
607
+ /* harmony import */ var _splunk_react_ui_Clickable__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_splunk_react_ui_Clickable__WEBPACK_IMPORTED_MODULE_1__);
608
+ /* harmony import */ var _splunk_react_ui_Switch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(39);
609
+ /* harmony import */ var _splunk_react_ui_Switch__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_splunk_react_ui_Switch__WEBPACK_IMPORTED_MODULE_2__);
610
+ /* harmony import */ var _splunk_themes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(0);
611
+ /* harmony import */ var _splunk_themes__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_splunk_themes__WEBPACK_IMPORTED_MODULE_3__);
612
+
613
+
614
+
615
+
616
+ var itemDescription = Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(["color:", ";font-size:", ";line-height:", ";overflow:inherit;white-space:inherit;text-overflow:inherit;"], Object(_splunk_themes__WEBPACK_IMPORTED_MODULE_3__["pick"])({
617
+ prisma: _splunk_themes__WEBPACK_IMPORTED_MODULE_3__["variables"].contentColorDefault,
618
+ enterprise: _splunk_themes__WEBPACK_IMPORTED_MODULE_3__["variables"].textGray
619
+ }), _splunk_themes__WEBPACK_IMPORTED_MODULE_3__["variables"].fontSizeSmall, Object(_splunk_themes__WEBPACK_IMPORTED_MODULE_3__["pick"])({
620
+ prisma: '16px'
621
+ }));
622
+ var StyledItemDescriptionBottom = styled_components__WEBPACK_IMPORTED_MODULE_0___default.a.span.withConfig({
623
+ displayName: "ItemStyles__StyledItemDescriptionBottom",
624
+ componentId: "sc-4kc053-0"
625
+ })(["", ";display:block;"], itemDescription);
626
+ var StyledItemDescriptionRight = styled_components__WEBPACK_IMPORTED_MODULE_0___default.a.span.withConfig({
627
+ displayName: "ItemStyles__StyledItemDescriptionRight",
628
+ componentId: "sc-4kc053-1"
629
+ })(["", ";float:right;padding-left:", ";max-width:50%;text-align:right;box-sizing:border-box;"], itemDescription, _splunk_themes__WEBPACK_IMPORTED_MODULE_3__["variables"].spacing);
630
+ var StyledItemSelectedIcon = styled_components__WEBPACK_IMPORTED_MODULE_0___default.a.div.withConfig({
631
+ displayName: "ItemStyles__StyledItemSelectedIcon",
632
+ componentId: "sc-4kc053-2"
633
+ })(["position:absolute;", " color:", ";"], Object(_splunk_themes__WEBPACK_IMPORTED_MODULE_3__["pick"])({
634
+ prisma: Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(["right:16px;"]),
635
+ enterprise: Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(["top:5px;right:3px;left:8px;"])
636
+ }), Object(_splunk_themes__WEBPACK_IMPORTED_MODULE_3__["pick"])({
637
+ prisma: _splunk_themes__WEBPACK_IMPORTED_MODULE_3__["variables"].contentColorActive,
638
+ enterprise: _splunk_themes__WEBPACK_IMPORTED_MODULE_3__["variables"].accentColorL10
639
+ }));
640
+ var StyledItemIcon = styled_components__WEBPACK_IMPORTED_MODULE_0___default.a.span.withConfig({
641
+ displayName: "ItemStyles__StyledItemIcon",
642
+ componentId: "sc-4kc053-3"
643
+ })(["flex:0 0 auto;padding-right:", ";min-width:10px;display:inline-block;text-align:center;vertical-align:", ";", ""], Object(_splunk_themes__WEBPACK_IMPORTED_MODULE_3__["pick"])({
644
+ prisma: '8px',
645
+ enterprise: '3px'
646
+ }), Object(_splunk_themes__WEBPACK_IMPORTED_MODULE_3__["pick"])({
647
+ prisma: 'initial',
648
+ enterprise: 'middle'
649
+ }), Object(_splunk_themes__WEBPACK_IMPORTED_MODULE_3__["pick"])({
650
+ prisma: Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(["color:", ";display:inline-flex;align-items:center;min-width:20px;min-height:20px;& > svg{width:20px;height:20px;}"], _splunk_themes__WEBPACK_IMPORTED_MODULE_3__["variables"].contentColorMuted),
651
+ enterprise: Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(["transform:translateY(-1px);"])
652
+ }));
653
+ var StyledClickable = styled_components__WEBPACK_IMPORTED_MODULE_0___default()(_splunk_react_ui_Clickable__WEBPACK_IMPORTED_MODULE_1___default.a).withConfig({
654
+ displayName: "ItemStyles__StyledClickable",
655
+ componentId: "sc-4kc053-4"
656
+ })(["display:block;position:relative;cursor:pointer;color:", ";word-wrap:break-word;max-width:100%;width:100%;padding:", ";", " ", " ", " &:not([disabled]){&:hover{background:", ";", "}&:focus{outline:0;box-shadow:", ";", "}", " ", "}&[disabled]{color:", ";cursor:not-allowed;", ",", "{color:inherit;}", "{cursor:not-allowed;color:", ";}", "}", ""], Object(_splunk_themes__WEBPACK_IMPORTED_MODULE_3__["pick"])({
657
+ prisma: _splunk_themes__WEBPACK_IMPORTED_MODULE_3__["variables"].contentColorActive,
658
+ enterprise: {
659
+ dark: _splunk_themes__WEBPACK_IMPORTED_MODULE_3__["variables"].gray96,
660
+ light: _splunk_themes__WEBPACK_IMPORTED_MODULE_3__["variables"].gray22
661
+ }
662
+ }), Object(_splunk_themes__WEBPACK_IMPORTED_MODULE_3__["pick"])({
663
+ prisma: {
664
+ comfortable: '10px 16px',
665
+ compact: '6px 16px'
666
+ },
667
+ enterprise: '6px 10px'
668
+ }), function (_ref) {
669
+ var $isSelectable = _ref.$isSelectable,
670
+ $selectableAppearance = _ref.$selectableAppearance;
671
+ return $isSelectable && Object(_splunk_themes__WEBPACK_IMPORTED_MODULE_3__["pick"])({
672
+ prisma: Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(["padding-right:44px;", ""], function () {
673
+ return $selectableAppearance === 'checkbox' && 'padding-left: 42px;';
674
+ }),
675
+ enterprise: Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(["padding-right:10px;padding-left:", ";"], function () {
676
+ return $selectableAppearance === 'checkbox' ? '32px' : '28px';
677
+ })
678
+ });
679
+ }, function (_ref2) {
680
+ var $active = _ref2.$active,
681
+ $preventFocus = _ref2.$preventFocus;
682
+ return $active && !$preventFocus && Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(["box-shadow:", ";"], _splunk_themes__WEBPACK_IMPORTED_MODULE_3__["variables"].focusShadowInset);
683
+ }, function (_ref3) {
684
+ var $active = _ref3.$active;
685
+ return $active && Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(["background:", ";font-weight:", ";"], Object(_splunk_themes__WEBPACK_IMPORTED_MODULE_3__["pick"])({
686
+ enterprise: {
687
+ light: _splunk_themes__WEBPACK_IMPORTED_MODULE_3__["variables"].gray92,
688
+ dark: _splunk_themes__WEBPACK_IMPORTED_MODULE_3__["variables"].gray22
689
+ },
690
+ prisma: _splunk_themes__WEBPACK_IMPORTED_MODULE_3__["variables"].neutral100
691
+ }), _splunk_themes__WEBPACK_IMPORTED_MODULE_3__["variables"].fontWeightBold);
692
+ }, Object(_splunk_themes__WEBPACK_IMPORTED_MODULE_3__["pick"])({
693
+ prisma: _splunk_themes__WEBPACK_IMPORTED_MODULE_3__["variables"].interactiveColorOverlayHover,
694
+ enterprise: _splunk_themes__WEBPACK_IMPORTED_MODULE_3__["variables"].backgroundColorHover
695
+ }), function (_ref4) {
696
+ var $selected = _ref4.$selected;
697
+ return $selected && Object(_splunk_themes__WEBPACK_IMPORTED_MODULE_3__["pick"])({
698
+ prisma: Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(["background:", ";"], _splunk_themes__WEBPACK_IMPORTED_MODULE_3__["mixins"].overlayColors(_splunk_themes__WEBPACK_IMPORTED_MODULE_3__["variables"].interactiveColorOverlaySelected, _splunk_themes__WEBPACK_IMPORTED_MODULE_3__["variables"].interactiveColorOverlayHover))
699
+ });
700
+ }, _splunk_themes__WEBPACK_IMPORTED_MODULE_3__["variables"].focusShadowInset, Object(_splunk_themes__WEBPACK_IMPORTED_MODULE_3__["pick"])({
701
+ prisma: Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(["background:", ";"], _splunk_themes__WEBPACK_IMPORTED_MODULE_3__["variables"].interactiveColorOverlayHover)
702
+ }), Object(_splunk_themes__WEBPACK_IMPORTED_MODULE_3__["pick"])({
703
+ prisma: Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(["&:active{background:", ";}"], _splunk_themes__WEBPACK_IMPORTED_MODULE_3__["variables"].interactiveColorOverlayActive)
704
+ }), function (_ref5) {
705
+ var $selected = _ref5.$selected;
706
+ return $selected && Object(_splunk_themes__WEBPACK_IMPORTED_MODULE_3__["pick"])({
707
+ prisma: Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(["background:", ";&:active{background:", ";}"], _splunk_themes__WEBPACK_IMPORTED_MODULE_3__["variables"].interactiveColorOverlaySelected, _splunk_themes__WEBPACK_IMPORTED_MODULE_3__["mixins"].overlayColors(_splunk_themes__WEBPACK_IMPORTED_MODULE_3__["variables"].interactiveColorOverlaySelected, _splunk_themes__WEBPACK_IMPORTED_MODULE_3__["variables"].interactiveColorOverlayActive))
708
+ });
709
+ }, Object(_splunk_themes__WEBPACK_IMPORTED_MODULE_3__["pick"])({
710
+ enterprise: {
711
+ light: _splunk_themes__WEBPACK_IMPORTED_MODULE_3__["variables"].gray45,
712
+ dark: _splunk_themes__WEBPACK_IMPORTED_MODULE_3__["variables"].contentColorDisabled
713
+ },
714
+ prisma: _splunk_themes__WEBPACK_IMPORTED_MODULE_3__["variables"].contentColorDisabled
715
+ }),
716
+ /* sc-sel */
717
+ StyledItemDescriptionBottom,
718
+ /* sc-sel */
719
+ StyledItemDescriptionRight,
720
+ /* sc-sel */
721
+ StyledItemSelectedIcon, Object(_splunk_themes__WEBPACK_IMPORTED_MODULE_3__["pick"])({
722
+ prisma: _splunk_themes__WEBPACK_IMPORTED_MODULE_3__["variables"].contentColorDisabled,
723
+ enterprise: _splunk_themes__WEBPACK_IMPORTED_MODULE_3__["variables"].gray80
724
+ }), Object(_splunk_themes__WEBPACK_IMPORTED_MODULE_3__["pick"])({
725
+ prisma: Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(["& > * > ", "{color:", ";}"],
726
+ /* sc-sel */
727
+ StyledItemIcon, _splunk_themes__WEBPACK_IMPORTED_MODULE_3__["variables"].contentColorDisabled)
728
+ }), function (_ref6) {
729
+ var $selected = _ref6.$selected;
730
+ return $selected && Object(_splunk_themes__WEBPACK_IMPORTED_MODULE_3__["pick"])({
731
+ prisma: Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(["", "{color:", ";}"],
732
+ /* sc-sel */
733
+ StyledItemIcon, _splunk_themes__WEBPACK_IMPORTED_MODULE_3__["variables"].contentColorActive)
734
+ });
735
+ });
736
+ var StyledSwitch = styled_components__WEBPACK_IMPORTED_MODULE_0___default()(_splunk_react_ui_Switch__WEBPACK_IMPORTED_MODULE_2___default.a).withConfig({
737
+ displayName: "ItemStyles__StyledSwitch",
738
+ componentId: "sc-4kc053-5"
739
+ })(["position:absolute;left:", ";top:", ";"], Object(_splunk_themes__WEBPACK_IMPORTED_MODULE_3__["pick"])({
740
+ prisma: '16px',
741
+ enterprise: '8px'
742
+ }), Object(_splunk_themes__WEBPACK_IMPORTED_MODULE_3__["pick"])({
743
+ prisma: '0px',
744
+ enterprise: {
745
+ comfortable: '-1px',
746
+ compact: '2px'
747
+ }
748
+ }));
749
+ var StyledInnerWrapper = styled_components__WEBPACK_IMPORTED_MODULE_0___default.a.span.withConfig({
750
+ displayName: "ItemStyles__StyledInnerWrapper",
751
+ componentId: "sc-4kc053-6"
752
+ })(["display:flex;align-items:flex-start;"]);
753
+ var StyledTitleAndDescriptionWrapper = styled_components__WEBPACK_IMPORTED_MODULE_0___default.a.span.withConfig({
754
+ displayName: "ItemStyles__StyledTitleAndDescriptionWrapper",
755
+ componentId: "sc-4kc053-7"
756
+ })(["max-width:100%;width:100%;align-self:center;word-break:break-word;white-space:normal;", ""], function (_ref7) {
757
+ var $truncate = _ref7.$truncate;
758
+ return $truncate && Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(["white-space:nowrap;overflow:hidden;text-overflow:ellipsis;"]);
759
+ });
760
+ var StyledLabel = styled_components__WEBPACK_IMPORTED_MODULE_0___default.a.div.withConfig({
761
+ displayName: "ItemStyles__StyledLabel",
762
+ componentId: "sc-4kc053-8"
763
+ })(["overflow:inherit;white-space:inherit;text-overflow:inherit;max-width:100%;min-height:20px;", ""], function (_ref8) {
764
+ var $truncate = _ref8.$truncate;
765
+ return $truncate && Object(styled_components__WEBPACK_IMPORTED_MODULE_0__["css"])(["display:block;clear:both;"]);
766
+ });
767
+ var StyledMatch = styled_components__WEBPACK_IMPORTED_MODULE_0___default.a.span.withConfig({
768
+ displayName: "ItemStyles__StyledMatch",
769
+ componentId: "sc-4kc053-9"
770
+ })(["border-bottom:1px solid ", ";"], Object(_splunk_themes__WEBPACK_IMPORTED_MODULE_3__["pick"])({
771
+ prisma: _splunk_themes__WEBPACK_IMPORTED_MODULE_3__["variables"].contentColorActive,
772
+ enterprise: {
773
+ dark: _splunk_themes__WEBPACK_IMPORTED_MODULE_3__["variables"].gray96,
774
+ light: _splunk_themes__WEBPACK_IMPORTED_MODULE_3__["variables"].gray45
775
+ }
776
+ }));
777
+ var StyledSubmenu = styled_components__WEBPACK_IMPORTED_MODULE_0___default.a.span.withConfig({
778
+ displayName: "ItemStyles__StyledSubmenu",
779
+ componentId: "sc-4kc053-10"
780
+ })(["float:right;padding-left:", ";color:", ";"], _splunk_themes__WEBPACK_IMPORTED_MODULE_3__["variables"].spacingSmall, Object(_splunk_themes__WEBPACK_IMPORTED_MODULE_3__["pick"])({
781
+ prisma: 'inherit',
782
+ enterprise: _splunk_themes__WEBPACK_IMPORTED_MODULE_3__["variables"].textGray
783
+ }));
784
+
785
+
786
+ /***/ }),
787
+
788
+ /***/ 28:
583
789
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
584
790
 
585
791
  "use strict";
@@ -658,20 +864,6 @@ module.exports = require("styled-components");
658
864
  /***/ }),
659
865
 
660
866
  /***/ 30:
661
- /***/ (function(module, exports) {
662
-
663
- module.exports = require("@splunk/react-ui/Text");
664
-
665
- /***/ }),
666
-
667
- /***/ 33:
668
- /***/ (function(module, exports) {
669
-
670
- module.exports = require("@splunk/ui-utils/filter");
671
-
672
- /***/ }),
673
-
674
- /***/ 36:
675
867
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
676
868
 
677
869
  "use strict";
@@ -849,20 +1041,34 @@ _defineProperty(Option, "type", _splunk_react_ui_Menu__WEBPACK_IMPORTED_MODULE_2
849
1041
 
850
1042
  /***/ }),
851
1043
 
852
- /***/ 38:
1044
+ /***/ 32:
853
1045
  /***/ (function(module, exports) {
854
1046
 
855
- module.exports = require("lodash/isUndefined");
1047
+ module.exports = require("@splunk/react-ui/Text");
856
1048
 
857
1049
  /***/ }),
858
1050
 
859
- /***/ 39:
1051
+ /***/ 35:
1052
+ /***/ (function(module, exports) {
1053
+
1054
+ module.exports = require("@splunk/ui-utils/filter");
1055
+
1056
+ /***/ }),
1057
+
1058
+ /***/ 37:
860
1059
  /***/ (function(module, exports) {
861
1060
 
862
1061
  module.exports = require("@splunk/react-ui/Link");
863
1062
 
864
1063
  /***/ }),
865
1064
 
1065
+ /***/ 39:
1066
+ /***/ (function(module, exports) {
1067
+
1068
+ module.exports = require("@splunk/react-ui/Switch");
1069
+
1070
+ /***/ }),
1071
+
866
1072
  /***/ 4:
867
1073
  /***/ (function(module, exports) {
868
1074
 
@@ -870,21 +1076,35 @@ module.exports = require("@splunk/ui-utils/i18n");
870
1076
 
871
1077
  /***/ }),
872
1078
 
873
- /***/ 41:
1079
+ /***/ 40:
874
1080
  /***/ (function(module, exports) {
875
1081
 
876
- module.exports = require("lodash/pick");
1082
+ module.exports = require("lodash/memoize");
1083
+
1084
+ /***/ }),
1085
+
1086
+ /***/ 42:
1087
+ /***/ (function(module, exports) {
1088
+
1089
+ module.exports = require("lodash/isUndefined");
877
1090
 
878
1091
  /***/ }),
879
1092
 
880
1093
  /***/ 44:
881
1094
  /***/ (function(module, exports) {
882
1095
 
1096
+ module.exports = require("lodash/pick");
1097
+
1098
+ /***/ }),
1099
+
1100
+ /***/ 47:
1101
+ /***/ (function(module, exports) {
1102
+
883
1103
  module.exports = require("@splunk/react-ui/ResultsMenu");
884
1104
 
885
1105
  /***/ }),
886
1106
 
887
- /***/ 46:
1107
+ /***/ 49:
888
1108
  /***/ (function(module, exports) {
889
1109
 
890
1110
  module.exports = require("@splunk/react-icons/Magnifier");
@@ -898,35 +1118,35 @@ module.exports = require("lodash/omit");
898
1118
 
899
1119
  /***/ }),
900
1120
 
901
- /***/ 51:
1121
+ /***/ 54:
902
1122
  /***/ (function(module, exports) {
903
1123
 
904
1124
  module.exports = require("@splunk/react-icons/enterprise/Search");
905
1125
 
906
1126
  /***/ }),
907
1127
 
908
- /***/ 52:
1128
+ /***/ 55:
909
1129
  /***/ (function(module, exports) {
910
1130
 
911
1131
  module.exports = require("lodash/find");
912
1132
 
913
1133
  /***/ }),
914
1134
 
915
- /***/ 53:
1135
+ /***/ 56:
916
1136
  /***/ (function(module, exports) {
917
1137
 
918
1138
  module.exports = require("@splunk/react-icons/CaretSmallDown");
919
1139
 
920
1140
  /***/ }),
921
1141
 
922
- /***/ 54:
1142
+ /***/ 57:
923
1143
  /***/ (function(module, exports) {
924
1144
 
925
1145
  module.exports = require("@splunk/react-icons/enterprise/Caret");
926
1146
 
927
1147
  /***/ }),
928
1148
 
929
- /***/ 56:
1149
+ /***/ 59:
930
1150
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
931
1151
 
932
1152
  "use strict";
@@ -979,14 +1199,14 @@ var fuzzyMatch = function fuzzyMatch(options, matchChar) {
979
1199
 
980
1200
  /***/ }),
981
1201
 
982
- /***/ 59:
1202
+ /***/ 61:
983
1203
  /***/ (function(module, exports) {
984
1204
 
985
1205
  module.exports = require("lodash/without");
986
1206
 
987
1207
  /***/ }),
988
1208
 
989
- /***/ 60:
1209
+ /***/ 62:
990
1210
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
991
1211
 
992
1212
  "use strict";
@@ -1007,19 +1227,19 @@ var external_prop_types_ = __webpack_require__(1);
1007
1227
  var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_);
1008
1228
 
1009
1229
  // EXTERNAL MODULE: external "lodash/castArray"
1010
- var castArray_ = __webpack_require__(65);
1230
+ var castArray_ = __webpack_require__(67);
1011
1231
  var castArray_default = /*#__PURE__*/__webpack_require__.n(castArray_);
1012
1232
 
1013
1233
  // EXTERNAL MODULE: external "lodash/find"
1014
- var find_ = __webpack_require__(52);
1234
+ var find_ = __webpack_require__(55);
1015
1235
  var find_default = /*#__PURE__*/__webpack_require__.n(find_);
1016
1236
 
1017
1237
  // EXTERNAL MODULE: external "lodash/forEachRight"
1018
- var forEachRight_ = __webpack_require__(102);
1238
+ var forEachRight_ = __webpack_require__(105);
1019
1239
  var forEachRight_default = /*#__PURE__*/__webpack_require__.n(forEachRight_);
1020
1240
 
1021
1241
  // EXTERNAL MODULE: external "lodash/has"
1022
- var has_ = __webpack_require__(10);
1242
+ var has_ = __webpack_require__(11);
1023
1243
  var has_default = /*#__PURE__*/__webpack_require__.n(has_);
1024
1244
 
1025
1245
  // EXTERNAL MODULE: external "lodash/includes"
@@ -1027,27 +1247,31 @@ var includes_ = __webpack_require__(15);
1027
1247
  var includes_default = /*#__PURE__*/__webpack_require__.n(includes_);
1028
1248
 
1029
1249
  // EXTERNAL MODULE: external "lodash/isUndefined"
1030
- var isUndefined_ = __webpack_require__(38);
1250
+ var isUndefined_ = __webpack_require__(42);
1031
1251
  var isUndefined_default = /*#__PURE__*/__webpack_require__.n(isUndefined_);
1032
1252
 
1033
1253
  // EXTERNAL MODULE: external "lodash/keys"
1034
1254
  var keys_ = __webpack_require__(9);
1035
1255
  var keys_default = /*#__PURE__*/__webpack_require__.n(keys_);
1036
1256
 
1257
+ // EXTERNAL MODULE: external "lodash/memoize"
1258
+ var memoize_ = __webpack_require__(40);
1259
+ var memoize_default = /*#__PURE__*/__webpack_require__.n(memoize_);
1260
+
1037
1261
  // EXTERNAL MODULE: external "lodash/omit"
1038
1262
  var omit_ = __webpack_require__(5);
1039
1263
  var omit_default = /*#__PURE__*/__webpack_require__.n(omit_);
1040
1264
 
1041
1265
  // EXTERNAL MODULE: external "lodash/pick"
1042
- var pick_ = __webpack_require__(41);
1266
+ var pick_ = __webpack_require__(44);
1043
1267
  var pick_default = /*#__PURE__*/__webpack_require__.n(pick_);
1044
1268
 
1045
1269
  // EXTERNAL MODULE: external "lodash/uniq"
1046
- var uniq_ = __webpack_require__(103);
1270
+ var uniq_ = __webpack_require__(106);
1047
1271
  var uniq_default = /*#__PURE__*/__webpack_require__.n(uniq_);
1048
1272
 
1049
1273
  // EXTERNAL MODULE: external "lodash/without"
1050
- var without_ = __webpack_require__(59);
1274
+ var without_ = __webpack_require__(61);
1051
1275
  var without_default = /*#__PURE__*/__webpack_require__.n(without_);
1052
1276
 
1053
1277
  // EXTERNAL MODULE: external "@splunk/ui-utils/id"
@@ -1064,29 +1288,29 @@ var Dropdown_default = /*#__PURE__*/__webpack_require__.n(Dropdown_);
1064
1288
  var keyboard_ = __webpack_require__(7);
1065
1289
 
1066
1290
  // EXTERNAL MODULE: external "@splunk/ui-utils/filter"
1067
- var filter_ = __webpack_require__(33);
1291
+ var filter_ = __webpack_require__(35);
1068
1292
 
1069
1293
  // EXTERNAL MODULE: external "@splunk/react-ui/Link"
1070
- var Link_ = __webpack_require__(39);
1294
+ var Link_ = __webpack_require__(37);
1071
1295
  var Link_default = /*#__PURE__*/__webpack_require__.n(Link_);
1072
1296
 
1073
1297
  // EXTERNAL MODULE: external "@splunk/react-ui/ResultsMenu"
1074
- var ResultsMenu_ = __webpack_require__(44);
1298
+ var ResultsMenu_ = __webpack_require__(47);
1075
1299
  var ResultsMenu_default = /*#__PURE__*/__webpack_require__.n(ResultsMenu_);
1076
1300
 
1077
1301
  // EXTERNAL MODULE: external "@splunk/react-ui/Text"
1078
- var Text_ = __webpack_require__(30);
1302
+ var Text_ = __webpack_require__(32);
1079
1303
  var Text_default = /*#__PURE__*/__webpack_require__.n(Text_);
1080
1304
 
1081
1305
  // EXTERNAL MODULE: external "@splunk/ui-utils/i18n"
1082
1306
  var i18n_ = __webpack_require__(4);
1083
1307
 
1084
1308
  // EXTERNAL MODULE: external "@splunk/react-icons/CaretSmallDown"
1085
- var CaretSmallDown_ = __webpack_require__(53);
1309
+ var CaretSmallDown_ = __webpack_require__(56);
1086
1310
  var CaretSmallDown_default = /*#__PURE__*/__webpack_require__.n(CaretSmallDown_);
1087
1311
 
1088
1312
  // EXTERNAL MODULE: external "@splunk/react-icons/enterprise/Caret"
1089
- var Caret_ = __webpack_require__(54);
1313
+ var Caret_ = __webpack_require__(57);
1090
1314
  var Caret_default = /*#__PURE__*/__webpack_require__.n(Caret_);
1091
1315
 
1092
1316
  // EXTERNAL MODULE: external "@splunk/themes"
@@ -1111,15 +1335,12 @@ var CaretSmallDown_CaretSmallDownIcon = function CaretSmallDownIcon() {
1111
1335
  };
1112
1336
 
1113
1337
  /* harmony default export */ var CaretSmallDown = (CaretSmallDown_CaretSmallDownIcon);
1114
- // EXTERNAL MODULE: ./src/Select/OptionBase.tsx
1115
- var OptionBase = __webpack_require__(36);
1116
-
1117
1338
  // EXTERNAL MODULE: external "@splunk/react-icons/enterprise/Search"
1118
- var Search_ = __webpack_require__(51);
1339
+ var Search_ = __webpack_require__(54);
1119
1340
  var Search_default = /*#__PURE__*/__webpack_require__.n(Search_);
1120
1341
 
1121
1342
  // EXTERNAL MODULE: external "@splunk/react-icons/Magnifier"
1122
- var Magnifier_ = __webpack_require__(46);
1343
+ var Magnifier_ = __webpack_require__(49);
1123
1344
  var Magnifier_default = /*#__PURE__*/__webpack_require__.n(Magnifier_);
1124
1345
 
1125
1346
  // CONCATENATED MODULE: ./src/Select/icons/Search.tsx
@@ -1152,10 +1373,90 @@ var Search_Search = function Search() {
1152
1373
  };
1153
1374
 
1154
1375
  /* harmony default export */ var icons_Search = (Search_Search);
1376
+ // EXTERNAL MODULE: ./src/Select/OptionBase.tsx
1377
+ var OptionBase = __webpack_require__(30);
1378
+
1155
1379
  // EXTERNAL MODULE: external "styled-components"
1156
1380
  var external_styled_components_ = __webpack_require__(3);
1157
1381
  var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_);
1158
1382
 
1383
+ // EXTERNAL MODULE: ./src/Menu/ItemStyles.ts
1384
+ var ItemStyles = __webpack_require__(25);
1385
+
1386
+ // CONCATENATED MODULE: ./src/Select/SelectAllOptionStyles.ts
1387
+
1388
+
1389
+
1390
+
1391
+ var StyledSelectAllLabel = external_styled_components_default()(ItemStyles["g" /* StyledLabel */]).withConfig({
1392
+ displayName: "SelectAllOptionStyles__StyledSelectAllLabel",
1393
+ componentId: "y6bn08-0"
1394
+ })(["font-weight:", ";"], themes_["variables"].fontWeightBold);
1395
+ var StyledSelectAllOption = external_styled_components_default()(OptionBase["a" /* default */]).withConfig({
1396
+ displayName: "SelectAllOptionStyles__StyledSelectAllOption",
1397
+ componentId: "y6bn08-1"
1398
+ })(["padding-inline-start:", ";box-shadow:none;"], Object(themes_["pick"])({
1399
+ prisma: '42px;',
1400
+ enterprise: '32px;'
1401
+ }));
1402
+
1403
+ // CONCATENATED MODULE: ./src/Select/SelectAllOption.tsx
1404
+
1405
+
1406
+
1407
+
1408
+ var propTypes = {
1409
+ active: external_prop_types_default.a.bool,
1410
+ elementRef: external_prop_types_default.a.oneOfType([external_prop_types_default.a.func, external_prop_types_default.a.object]),
1411
+ id: external_prop_types_default.a.string,
1412
+ onClick: external_prop_types_default.a.func,
1413
+ selectAllLabel: external_prop_types_default.a.string,
1414
+ totalCount: external_prop_types_default.a.number,
1415
+ changedToggle: external_prop_types_default.a.bool,
1416
+ selected: external_prop_types_default.a.oneOf([false, true, 'some'])
1417
+ };
1418
+ var SelectAllOption = /*#__PURE__*/external_react_default.a.forwardRef(function (_ref, ref) {
1419
+ var active = _ref.active,
1420
+ id = _ref.id,
1421
+ onClick = _ref.onClick,
1422
+ selectAllLabel = _ref.selectAllLabel,
1423
+ totalCount = _ref.totalCount,
1424
+ changedToggle = _ref.changedToggle,
1425
+ selected = _ref.selected;
1426
+ // When toggle is changed the total count is not displayed anymore so the count is now shown in the Select All menu item
1427
+ var totalCountDisplay = changedToggle ? " (".concat(totalCount === null || totalCount === void 0 ? void 0 : totalCount.toString(), ")") : '';
1428
+ return /*#__PURE__*/external_react_default.a.createElement(StyledSelectAllOption, {
1429
+ label: selectAllLabel,
1430
+ value: "selectAll",
1431
+ key: "selectAll",
1432
+ onClick: onClick,
1433
+ "data-test": "select-all",
1434
+ "aria-keyshortcuts": "Control+A",
1435
+ id: id,
1436
+ active: active,
1437
+ ref: ref,
1438
+ tabIndex: -1
1439
+ }, /*#__PURE__*/external_react_default.a.createElement(ItemStyles["j" /* StyledSwitch */], {
1440
+ interactive: false,
1441
+ selected: selected === 'some' && 'some' || selected,
1442
+ key: "main-checkbox",
1443
+ value: "main-checkbox",
1444
+ appearance: "checkbox",
1445
+ "aria-label": !selected && Object(i18n_["_"])('No options selected') || selected === 'some' && Object(i18n_["_"])('Some options selected') || Object(i18n_["_"])('All options selected'),
1446
+ "data-test": "select-all-switch",
1447
+ selectedLabel: selected === true ? Object(i18n_["_"])('All options selected') : Object(i18n_["_"])('Option selected'),
1448
+ unselectedLabel: selected === true ? Object(i18n_["_"])('No options selected') : Object(i18n_["_"])('Option unselected'),
1449
+ someSelectedLabel: Object(i18n_["_"])('Some options selected')
1450
+ }), /*#__PURE__*/external_react_default.a.createElement(ItemStyles["d" /* StyledItemDescriptionRight */], {
1451
+ "data-test": "description"
1452
+ }, "".concat(totalCountDisplay, " Ctrl-a")), /*#__PURE__*/external_react_default.a.createElement(ItemStyles["b" /* StyledInnerWrapper */], null, /*#__PURE__*/external_react_default.a.createElement(ItemStyles["k" /* StyledTitleAndDescriptionWrapper */], {
1453
+ $truncate: false
1454
+ }, /*#__PURE__*/external_react_default.a.createElement(StyledSelectAllLabel, {
1455
+ $truncate: false
1456
+ }, selectAllLabel))));
1457
+ });
1458
+ SelectAllOption.propTypes = propTypes;
1459
+ /* harmony default export */ var Select_SelectAllOption = (SelectAllOption);
1159
1460
  // EXTERNAL MODULE: external "@splunk/react-ui/Button"
1160
1461
  var Button_ = __webpack_require__(17);
1161
1462
  var Button_default = /*#__PURE__*/__webpack_require__.n(Button_);
@@ -1213,7 +1514,7 @@ var StyledCount = external_styled_components_default.a.span.withConfig({
1213
1514
  var StyledControlsLink = external_styled_components_default()(Link_default.a).withConfig({
1214
1515
  displayName: "SelectBaseStyles__StyledControlsLink",
1215
1516
  componentId: "sc-16cj7sk-6"
1216
- })(["", ";"], function (_ref3) {
1517
+ })(["margin-right:20px;", ";"], function (_ref3) {
1217
1518
  var $disabled = _ref3.$disabled;
1218
1519
  return $disabled && Object(external_styled_components_["css"])(["color:", ";"], themes_["variables"].contentColorDisabled);
1219
1520
  });
@@ -1235,7 +1536,7 @@ var StyledToggleAllControls = external_styled_components_default.a.div.withConfi
1235
1536
  }));
1236
1537
 
1237
1538
  // EXTERNAL MODULE: ./src/utils/fuzzyMatch.ts
1238
- var fuzzyMatch = __webpack_require__(56);
1539
+ var fuzzyMatch = __webpack_require__(59);
1239
1540
 
1240
1541
  // EXTERNAL MODULE: ./src/utils/ssrWindow.ts
1241
1542
  var ssrWindow = __webpack_require__(18);
@@ -1251,10 +1552,6 @@ function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(
1251
1552
 
1252
1553
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
1253
1554
 
1254
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
1255
-
1256
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
1257
-
1258
1555
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
1259
1556
 
1260
1557
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
@@ -1287,9 +1584,14 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
1287
1584
 
1288
1585
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
1289
1586
 
1587
+ 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); }
1588
+
1589
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
1590
+
1591
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
1592
+
1290
1593
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1291
1594
 
1292
- 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); }
1293
1595
 
1294
1596
 
1295
1597
 
@@ -1319,7 +1621,8 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
1319
1621
 
1320
1622
 
1321
1623
 
1322
- var propTypes = {
1624
+
1625
+ var SelectBase_propTypes = {
1323
1626
  allowKeyMatching: external_prop_types_default.a.bool,
1324
1627
  allowNewValues: external_prop_types_default.a.bool,
1325
1628
  animateLoading: external_prop_types_default.a.bool,
@@ -1358,6 +1661,7 @@ var propTypes = {
1358
1661
  prefixLabel: external_prop_types_default.a.string,
1359
1662
  prepend: external_prop_types_default.a.bool,
1360
1663
  repositionMode: external_prop_types_default.a.oneOf(['none', 'flip']),
1664
+ selectAllAppearance: external_prop_types_default.a.oneOf(['buttongroup', 'checkbox']),
1361
1665
  showSelectedValuesFirst: external_prop_types_default.a.oneOf(['nextOpen', 'immediately', 'never']),
1362
1666
  suffixLabel: external_prop_types_default.a.string,
1363
1667
  tabConfirmsNewValue: external_prop_types_default.a.bool,
@@ -1380,8 +1684,25 @@ var defaultProps = {
1380
1684
  placeholder: Object(i18n_["_"])('Select...'),
1381
1685
  prepend: false,
1382
1686
  repositionMode: 'flip',
1687
+ selectAllAppearance: 'buttongroup',
1383
1688
  tabConfirmsNewValue: false
1384
1689
  };
1690
+ var getLabelFromPlaceholder = memoize_default()(function (placeholder) {
1691
+ return [placeholder];
1692
+ }); // preserve separate widths for single vs. multi mode
1693
+
1694
+ var getInlineMenuStyle = memoize_default()(function (_ref) {
1695
+ var anchorWidth = _ref.anchorWidth,
1696
+ isMultiple = _ref.isMultiple,
1697
+ menuStyle = _ref.menuStyle;
1698
+ return isMultiple ? _objectSpread({
1699
+ width: Math.max(anchorWidth !== null && anchorWidth !== void 0 ? anchorWidth : 0, 200)
1700
+ }, menuStyle) : _objectSpread({
1701
+ minWidth: anchorWidth !== null && anchorWidth !== void 0 ? anchorWidth : undefined,
1702
+ maxWidth: Math.max(anchorWidth !== null && anchorWidth !== void 0 ? anchorWidth : 0, 300)
1703
+ }, menuStyle);
1704
+ });
1705
+ var dropdownCloseReasons = ['clickAway', 'escapeKey', 'offScreen', 'tabKey', 'toggleClick'];
1385
1706
 
1386
1707
  function isOption(child) {
1387
1708
  return child && has_default()(child.props, 'value');
@@ -1443,6 +1764,8 @@ var SelectBase_SelectBase = /*#__PURE__*/function (_Component) {
1443
1764
 
1444
1765
  _defineProperty(_assertThisInitialized(_this), "availableMatchOptions", void 0);
1445
1766
 
1767
+ _defineProperty(_assertThisInitialized(_this), "optionSelection", void 0);
1768
+
1446
1769
  _defineProperty(_assertThisInitialized(_this), "resetMatches", function () {
1447
1770
  _this.matchCharacter = null;
1448
1771
  _this.currentMatchOptions = [];
@@ -1480,7 +1803,8 @@ var SelectBase_SelectBase = /*#__PURE__*/function (_Component) {
1480
1803
 
1481
1804
  (_this$props$onChange = (_this$props2 = _this.props).onChange) === null || _this$props$onChange === void 0 ? void 0 : _this$props$onChange.call(_this$props2, e, {
1482
1805
  values: values,
1483
- name: name
1806
+ name: name,
1807
+ reason: 'selectAll'
1484
1808
  });
1485
1809
  });
1486
1810
 
@@ -1513,7 +1837,8 @@ var SelectBase_SelectBase = /*#__PURE__*/function (_Component) {
1513
1837
 
1514
1838
  (_this$props$onChange2 = (_this$props4 = _this.props).onChange) === null || _this$props$onChange2 === void 0 ? void 0 : _this$props$onChange2.call(_this$props4, e, {
1515
1839
  values: values,
1516
- name: name
1840
+ name: name,
1841
+ reason: 'clearAll'
1517
1842
  });
1518
1843
  });
1519
1844
 
@@ -1533,6 +1858,15 @@ var SelectBase_SelectBase = /*#__PURE__*/function (_Component) {
1533
1858
  }
1534
1859
 
1535
1860
  if (e.shiftKey || e.metaKey || e.ctrlKey) {
1861
+ if (eventKeyCode === 'a' && (e.ctrlKey || e.metaKey)) {
1862
+ // handle control + A
1863
+ if (_this.optionSelection === 'all') {
1864
+ _this.handleClearAll(e);
1865
+ } else {
1866
+ _this.handleSelectAll(e);
1867
+ }
1868
+ }
1869
+
1536
1870
  return;
1537
1871
  }
1538
1872
 
@@ -1541,7 +1875,7 @@ var SelectBase_SelectBase = /*#__PURE__*/function (_Component) {
1541
1875
 
1542
1876
  _this.setState(function (state) {
1543
1877
  return {
1544
- activeIndex: Math.min(state.activeIndex + 1, _this.availableOptionCount - 1)
1878
+ activeIndex: Math.min(state.activeIndex + 1, _this.props.selectAllAppearance === 'checkbox' ? _this.availableOptionCount : _this.availableOptionCount - 1)
1545
1879
  };
1546
1880
  });
1547
1881
 
@@ -1567,14 +1901,22 @@ var SelectBase_SelectBase = /*#__PURE__*/function (_Component) {
1567
1901
  }
1568
1902
 
1569
1903
  if (eventKeyCode === 'enter' && !isUndefined_default()(_this.activeValue) && _this.state.open) {
1570
- e.preventDefault();
1904
+ if (_this.activeValue === 'selectAll') {
1905
+ if (_this.optionSelection === 'all') {
1906
+ _this.handleClearAll(e);
1907
+ } else {
1908
+ _this.handleSelectAll(e);
1909
+ }
1910
+ } else {
1911
+ e.preventDefault();
1571
1912
 
1572
- _this.toggleValue(e, _this.activeValue);
1913
+ _this.toggleValue(e, _this.activeValue);
1914
+ }
1573
1915
  }
1574
1916
  });
1575
1917
 
1576
- _defineProperty(_assertThisInitialized(_this), "handleMenuOptionClick", function (e, _ref) {
1577
- var value = _ref.value;
1918
+ _defineProperty(_assertThisInitialized(_this), "handleMenuOptionClick", function (e, _ref2) {
1919
+ var value = _ref2.value;
1578
1920
  e.preventDefault();
1579
1921
 
1580
1922
  if (!_this.state.open) {
@@ -1642,10 +1984,10 @@ var SelectBase_SelectBase = /*#__PURE__*/function (_Component) {
1642
1984
  }
1643
1985
  });
1644
1986
 
1645
- _defineProperty(_assertThisInitialized(_this), "handleTextChange", function (e, _ref2) {
1987
+ _defineProperty(_assertThisInitialized(_this), "handleTextChange", function (e, _ref3) {
1646
1988
  var _this$props$onFilterC, _this$props6;
1647
1989
 
1648
- var value = _ref2.value;
1990
+ var value = _ref3.value;
1649
1991
 
1650
1992
  _this.setState({
1651
1993
  filterKeyword: value,
@@ -1806,7 +2148,7 @@ var SelectBase_SelectBase = /*#__PURE__*/function (_Component) {
1806
2148
  if (label.length === 0 || !multiple && label.every(function (labelNode) {
1807
2149
  return labelNode === '';
1808
2150
  })) {
1809
- label = [placeholder];
2151
+ label = getLabelFromPlaceholder(placeholder);
1810
2152
  }
1811
2153
 
1812
2154
  var ariaLabel = label; // If there's more than one item selected, read out the selected total
@@ -1879,6 +2221,7 @@ var SelectBase_SelectBase = /*#__PURE__*/function (_Component) {
1879
2221
  allowNewValues = _this$props12.allowNewValues,
1880
2222
  filter = _this$props12.filter,
1881
2223
  multiple = _this$props12.multiple,
2224
+ selectAllAppearance = _this$props12.selectAllAppearance,
1882
2225
  showSelectedValuesFirst = _this$props12.showSelectedValuesFirst,
1883
2226
  isLoadingOptions = _this$props12.isLoadingOptions,
1884
2227
  onScrollBottom = _this$props12.onScrollBottom;
@@ -2028,8 +2371,11 @@ var SelectBase_SelectBase = /*#__PURE__*/function (_Component) {
2028
2371
  multiple: multiple,
2029
2372
  onClick: _this.handleMenuOptionClick
2030
2373
  }));
2031
- } // Highlight the selected Items and remove hidden
2374
+ } // When selectAll is a menu item, add an offset so that activeItem accounts for the extra selectAll option.
2375
+
2032
2376
 
2377
+ var totalOptionCount = selectAllAppearance === 'checkbox' && multiple && children.length > 1 ? 1 : 0;
2378
+ var allOptionsSelected = true; // Highlight the selected Items and remove hidden
2033
2379
 
2034
2380
  children = children.reduce(function (acc, item) {
2035
2381
  // ignore Dividers & Headings
@@ -2047,10 +2393,15 @@ var SelectBase_SelectBase = /*#__PURE__*/function (_Component) {
2047
2393
  _this.firstSelectedOptionIndex = _this.availableOptionCount;
2048
2394
  }
2049
2395
 
2050
- var active = _this.availableOptionCount === _this.state.activeIndex;
2396
+ var active = totalOptionCount === _this.state.activeIndex;
2397
+ totalOptionCount += 1;
2051
2398
  _this.availableOptionCount += 1;
2052
2399
  _this.selectedOptionCount += item.props.selected ? 1 : 0;
2053
2400
 
2401
+ if (item.key !== 'newValue' && !item.props.disabled && !item.props.selected) {
2402
+ allOptionsSelected = false;
2403
+ }
2404
+
2054
2405
  if (!active || !textHasFocus) {
2055
2406
  acc.push(item);
2056
2407
  return acc;
@@ -2068,6 +2419,45 @@ var SelectBase_SelectBase = /*#__PURE__*/function (_Component) {
2068
2419
  acc.push(clonedItem);
2069
2420
  return acc;
2070
2421
  }, []);
2422
+ _this.optionSelection = _this.selectedOptionCount === 0 && 'none' || allOptionsSelected && 'all' || 'some'; // add select all option
2423
+
2424
+ if (selectAllAppearance === 'checkbox' && multiple && _this.availableOptionCount > 0) {
2425
+ var _this$getCurrentValue5;
2426
+
2427
+ var selectAllLabel;
2428
+
2429
+ if (_this.optionSelection === 'all') {
2430
+ if (filterKeyword === '') {
2431
+ selectAllLabel = Object(i18n_["_"])('Clear all');
2432
+ } else {
2433
+ selectAllLabel = Object(i18n_["_"])('Clear all matches');
2434
+ }
2435
+ } else if (filterKeyword === '') {
2436
+ selectAllLabel = Object(i18n_["_"])('Select all');
2437
+ } else {
2438
+ selectAllLabel = Object(i18n_["_"])('Select all matches');
2439
+ }
2440
+
2441
+ if (_this.state.activeIndex === 0 && textHasFocus) {
2442
+ _this.activeValue = 'selectAll';
2443
+ }
2444
+
2445
+ children.unshift( /*#__PURE__*/external_react_default.a.createElement(Select_SelectAllOption, {
2446
+ key: "selectAllOption",
2447
+ selected: _this.optionSelection === 'all' || _this.optionSelection !== 'none' && 'some',
2448
+ selectAllLabel: selectAllLabel,
2449
+ totalCount: (_this$getCurrentValue5 = _this.getCurrentValues()) === null || _this$getCurrentValue5 === void 0 ? void 0 : _this$getCurrentValue5.length,
2450
+ changedToggle: !!_this.props.toggle,
2451
+ onClick: _this.optionSelection === 'all' ? _this.handleClearAll : _this.handleSelectAll,
2452
+ id: _this.state.activeIndex === 0 ? _this.activeItemId : undefined,
2453
+ active: _this.state.activeIndex === 0,
2454
+ ref: _this.handleActiveOptionMount,
2455
+ tabIndex: -1
2456
+ }), /*#__PURE__*/external_react_default.a.createElement(Menu_["Divider"], {
2457
+ key: "selectAllDivider"
2458
+ }));
2459
+ }
2460
+
2071
2461
  _this.displayedValues = children.reduce(function (acc, item) {
2072
2462
  if (isOption(item)) {
2073
2463
  acc.push(item.props.value);
@@ -2078,10 +2468,10 @@ var SelectBase_SelectBase = /*#__PURE__*/function (_Component) {
2078
2468
  return children;
2079
2469
  });
2080
2470
 
2081
- _defineProperty(_assertThisInitialized(_this), "wrapLabel", function (_ref3) {
2082
- var prefixLabel = _ref3.prefixLabel,
2083
- label = _ref3.label,
2084
- suffixLabel = _ref3.suffixLabel;
2471
+ _defineProperty(_assertThisInitialized(_this), "wrapLabel", function (_ref4) {
2472
+ var prefixLabel = _ref4.prefixLabel,
2473
+ label = _ref4.label,
2474
+ suffixLabel = _ref4.suffixLabel;
2085
2475
  var wrappedLabel = label;
2086
2476
 
2087
2477
  if (prefixLabel) {
@@ -2095,6 +2485,10 @@ var SelectBase_SelectBase = /*#__PURE__*/function (_Component) {
2095
2485
  return wrappedLabel;
2096
2486
  });
2097
2487
 
2488
+ _defineProperty(_assertThisInitialized(_this), "handleDropdownMount", function (c) {
2489
+ _this.dropdown = c;
2490
+ });
2491
+
2098
2492
  _this.state = {
2099
2493
  activeIndex: 0,
2100
2494
  filterKeyword: '',
@@ -2113,6 +2507,7 @@ var SelectBase_SelectBase = /*#__PURE__*/function (_Component) {
2113
2507
  _this.currentMatchOptions = [];
2114
2508
  _this.availableMatchOptions = [];
2115
2509
  _this.optionRefsByKey = {};
2510
+ _this.optionSelection = 'none';
2116
2511
 
2117
2512
  if (false) {}
2118
2513
 
@@ -2143,10 +2538,10 @@ var SelectBase_SelectBase = /*#__PURE__*/function (_Component) {
2143
2538
  }, {
2144
2539
  key: "getTopValues",
2145
2540
  value: function getTopValues() {
2146
- var _this$getCurrentValue5;
2541
+ var _this$getCurrentValue6;
2147
2542
 
2148
2543
  // in non-multiple mode, don't move values to the top of the list
2149
- return this.props.multiple && this.props.showSelectedValuesFirst !== 'never' ? (_this$getCurrentValue5 = this.getCurrentValues()) !== null && _this$getCurrentValue5 !== void 0 ? _this$getCurrentValue5 : [] : [];
2544
+ return this.props.multiple && this.props.showSelectedValuesFirst !== 'never' ? (_this$getCurrentValue6 = this.getCurrentValues()) !== null && _this$getCurrentValue6 !== void 0 ? _this$getCurrentValue6 : [] : [];
2150
2545
  }
2151
2546
  }, {
2152
2547
  key: "isControlled",
@@ -2161,9 +2556,9 @@ var SelectBase_SelectBase = /*#__PURE__*/function (_Component) {
2161
2556
  }, {
2162
2557
  key: "toggleValue",
2163
2558
  value: function toggleValue(e, value) {
2164
- var _this$getCurrentValue6, _this$props$onChange3, _this$props14;
2559
+ var _this$getCurrentValue7, _this$props$onChange3, _this$props14;
2165
2560
 
2166
- var values = (_this$getCurrentValue6 = this.getCurrentValues()) !== null && _this$getCurrentValue6 !== void 0 ? _this$getCurrentValue6 : [];
2561
+ var values = (_this$getCurrentValue7 = this.getCurrentValues()) !== null && _this$getCurrentValue7 !== void 0 ? _this$getCurrentValue7 : [];
2167
2562
  var currentIndex = values.indexOf(value);
2168
2563
  var _this$props13 = this.props,
2169
2564
  name = _this$props13.name,
@@ -2207,7 +2602,8 @@ var SelectBase_SelectBase = /*#__PURE__*/function (_Component) {
2207
2602
 
2208
2603
  (_this$props$onChange3 = (_this$props14 = this.props).onChange) === null || _this$props$onChange3 === void 0 ? void 0 : _this$props$onChange3.call(_this$props14, e, {
2209
2604
  values: newValues,
2210
- name: name
2605
+ name: name,
2606
+ reason: 'valueToggle'
2211
2607
  });
2212
2608
  }
2213
2609
  /**
@@ -2223,27 +2619,32 @@ var SelectBase_SelectBase = /*#__PURE__*/function (_Component) {
2223
2619
  }
2224
2620
  }, {
2225
2621
  key: "renderControls",
2226
- value: function renderControls(_ref4) {
2227
- var hasChildren = _ref4.hasChildren,
2228
- placement = _ref4.placement;
2622
+ value: function renderControls(_ref5) {
2623
+ var hasChildren = _ref5.hasChildren,
2624
+ placement = _ref5.placement;
2229
2625
  var filterKeyword = this.state.filterKeyword;
2230
2626
  var _this$props15 = this.props,
2231
2627
  inputId = _this$props15.inputId,
2232
2628
  inputRef = _this$props15.inputRef,
2233
- multiple = _this$props15.multiple; // only visually disable these as opposed to fully disabling to avoid losing keyboard focus - see SUI-2731
2629
+ multiple = _this$props15.multiple,
2630
+ selectAllAppearance = _this$props15.selectAllAppearance;
2631
+
2632
+ var selectAllLabel = Object(i18n_["_"])("Select all options".concat(this.optionSelection === 'all' ? ' disabled' : ''));
2633
+
2634
+ var clearAllLabel = Object(i18n_["_"])("Clear all options".concat(this.optionSelection === 'none' ? ' disabled' : '')); // only visually disable these as opposed to fully disabling to avoid losing keyboard focus - see SUI-2731
2635
+
2234
2636
 
2235
2637
  var selectControls = /*#__PURE__*/external_react_default.a.createElement(StyledToggleAllControls, {
2236
2638
  $placement: placement,
2237
2639
  key: "selectAll"
2238
2640
  }, /*#__PURE__*/external_react_default.a.createElement(StyledControlsLink, {
2239
- $disabled: !(this.availableOptionCount - this.selectedOptionCount),
2641
+ $disabled: this.optionSelection === 'all',
2642
+ "aria-label": selectAllLabel,
2240
2643
  onClick: this.handleSelectAll,
2241
- "data-test": "select-all",
2242
- style: {
2243
- marginRight: 20
2244
- }
2644
+ "data-test": "select-all"
2245
2645
  }, filterKeyword ? Object(i18n_["_"])('Select All Matches') : Object(i18n_["_"])('Select All')), /*#__PURE__*/external_react_default.a.createElement(StyledControlsLink, {
2246
- $disabled: !this.selectedOptionCount,
2646
+ $disabled: this.optionSelection === 'none',
2647
+ "aria-label": clearAllLabel,
2247
2648
  onClick: this.handleClearAll,
2248
2649
  "data-test": "clear-all"
2249
2650
  }, filterKeyword ? Object(i18n_["_"])('Clear All Matches') : Object(i18n_["_"])('Clear All')));
@@ -2271,12 +2672,12 @@ var SelectBase_SelectBase = /*#__PURE__*/function (_Component) {
2271
2672
  inputId: inputId,
2272
2673
  canClear: true,
2273
2674
  startAdornment: /*#__PURE__*/external_react_default.a.createElement(StyledSearchIconWrapper, null, /*#__PURE__*/external_react_default.a.createElement(icons_Search, null))
2274
- })), multiple && hasChildren && selectControls);
2675
+ })), multiple && hasChildren && selectAllAppearance === 'buttongroup' && selectControls);
2275
2676
  }
2276
2677
  }, {
2277
2678
  key: "render",
2278
2679
  value: function render() {
2279
- var _this$getCurrentValue7,
2680
+ var _this$getCurrentValue8,
2280
2681
  _this2 = this;
2281
2682
 
2282
2683
  var _this$props16 = this.props,
@@ -2286,7 +2687,7 @@ var SelectBase_SelectBase = /*#__PURE__*/function (_Component) {
2286
2687
  multiple = _this$props16.multiple,
2287
2688
  repositionMode = _this$props16.repositionMode;
2288
2689
  var filterEnabled = this.hasFilter();
2289
- var currentValues = (_this$getCurrentValue7 = this.getCurrentValues()) !== null && _this$getCurrentValue7 !== void 0 ? _this$getCurrentValue7 : [];
2690
+ var currentValues = (_this$getCurrentValue8 = this.getCurrentValues()) !== null && _this$getCurrentValue8 !== void 0 ? _this$getCurrentValue8 : [];
2290
2691
  var childrenArray = external_react_["Children"].toArray(children);
2291
2692
  var isAnyValueSelected = currentValues.some(function (value) {
2292
2693
  var matchedItem = find_default()(childrenArray, function (item) {
@@ -2297,17 +2698,15 @@ var SelectBase_SelectBase = /*#__PURE__*/function (_Component) {
2297
2698
  var finalChildren = this.createChildren();
2298
2699
  var toggle = this.createToggle();
2299
2700
 
2300
- var createMenu = function createMenu(_ref5) {
2301
- var anchorWidth = _ref5.anchorWidth,
2302
- maxHeight = _ref5.maxHeight,
2303
- placement = _ref5.placement;
2304
- // preserve separate widths for single vs. multi mode
2305
- var internalMenuStyle = _this2.props.multiple ? {
2306
- width: Math.max(anchorWidth !== null && anchorWidth !== void 0 ? anchorWidth : 0, 200)
2307
- } : {
2308
- minWidth: anchorWidth !== null && anchorWidth !== void 0 ? anchorWidth : undefined,
2309
- maxWidth: Math.max(anchorWidth !== null && anchorWidth !== void 0 ? anchorWidth : 0, 300)
2310
- };
2701
+ var createMenu = function createMenu(_ref6) {
2702
+ var anchorWidth = _ref6.anchorWidth,
2703
+ maxHeight = _ref6.maxHeight,
2704
+ placement = _ref6.placement;
2705
+ var internalMenuStyle = getInlineMenuStyle({
2706
+ anchorWidth: anchorWidth,
2707
+ isMultiple: _this2.props.multiple,
2708
+ menuStyle: _this2.props.menuStyle
2709
+ });
2311
2710
  var tabIndex = currentValues.length > 0 && !isAnyValueSelected && !_this2.hasFilter() ? 0 : undefined;
2312
2711
  return /*#__PURE__*/external_react_default.a.createElement(ResultsMenu_default.a, _extends({
2313
2712
  "aria-multiselectable": multiple || undefined,
@@ -2323,13 +2722,13 @@ var SelectBase_SelectBase = /*#__PURE__*/function (_Component) {
2323
2722
  isLoading: _this2.props.isLoadingOptions,
2324
2723
  id: _this2.menuId
2325
2724
  }, pick_default()(_this2.props, 'noOptionsMessage', 'footerMessage', 'animateLoading', 'loadingMessage', 'onScroll'), {
2326
- style: _objectSpread(_objectSpread({}, internalMenuStyle), _this2.props.menuStyle),
2725
+ style: internalMenuStyle,
2327
2726
  tabIndex: tabIndex
2328
2727
  }), finalChildren);
2329
2728
  };
2330
2729
 
2331
2730
  return /*#__PURE__*/external_react_default.a.createElement(Dropdown_default.a, {
2332
- closeReasons: ['clickAway', 'escapeKey', 'offScreen', 'tabKey', 'toggleClick'],
2731
+ closeReasons: dropdownCloseReasons,
2333
2732
  inputId: inputId,
2334
2733
  toggle: toggle,
2335
2734
  onRequestOpen: this.handleRequestOpen,
@@ -2339,9 +2738,7 @@ var SelectBase_SelectBase = /*#__PURE__*/function (_Component) {
2339
2738
  repositionMode: repositionMode,
2340
2739
  defaultPlacement: filterEnabled ? defaultPlacement : undefined,
2341
2740
  canCoverAnchor: Object(ssrWindow["a" /* getWindow */])().innerHeight < 500,
2342
- ref: function ref(c) {
2343
- _this2.dropdown = c;
2344
- },
2741
+ ref: this.handleDropdownMount,
2345
2742
  retainFocus: false,
2346
2743
  takeFocus: currentValues.length === 0 || currentValues.length > 0 && !isAnyValueSelected || !!filterEnabled
2347
2744
  }, createMenu);
@@ -2351,7 +2748,7 @@ var SelectBase_SelectBase = /*#__PURE__*/function (_Component) {
2351
2748
  return SelectBase;
2352
2749
  }(external_react_["Component"]);
2353
2750
 
2354
- _defineProperty(SelectBase_SelectBase, "propTypes", propTypes);
2751
+ _defineProperty(SelectBase_SelectBase, "propTypes", SelectBase_propTypes);
2355
2752
 
2356
2753
  _defineProperty(SelectBase_SelectBase, "defaultProps", defaultProps);
2357
2754
 
@@ -2368,7 +2765,7 @@ _defineProperty(SelectBase_SelectBase, "invalidLinkAppearanceProps", ['append',
2368
2765
 
2369
2766
  /***/ }),
2370
2767
 
2371
- /***/ 65:
2768
+ /***/ 67:
2372
2769
  /***/ (function(module, exports) {
2373
2770
 
2374
2771
  module.exports = require("lodash/castArray");