@splunk/react-ui 4.4.1 → 4.5.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 (132) hide show
  1. package/Accordion.js +37 -21
  2. package/Anchor.js +2 -2
  3. package/Animation.js +2 -2
  4. package/AnimationToggle.js +2 -2
  5. package/Box.js +2 -2
  6. package/Button.js +36 -12
  7. package/ButtonGroup.js +27 -6
  8. package/ButtonSimple.js +6 -6
  9. package/CHANGELOG.md +41 -1
  10. package/Calendar.js +14 -14
  11. package/Card.js +49 -23
  12. package/CardLayout.js +31 -10
  13. package/Chip.js +75 -51
  14. package/Clickable.js +4 -4
  15. package/CloseButton.js +6 -6
  16. package/Code.js +4 -4
  17. package/CollapsiblePanel.js +6 -6
  18. package/Color.js +103 -56
  19. package/ColumnLayout.js +4 -4
  20. package/ComboBox.js +22 -17
  21. package/Concertina.js +73 -68
  22. package/ControlGroup.js +70 -22
  23. package/Date.js +9 -9
  24. package/DefinitionList.js +2 -2
  25. package/Dropdown.js +12 -12
  26. package/EventListener.js +168 -0
  27. package/FetchOptions.js +8 -8
  28. package/File.js +48 -37
  29. package/FormRows.js +340 -220
  30. package/Heading.js +2 -2
  31. package/Image.js +14 -14
  32. package/JSONTree.js +5 -5
  33. package/Layer.js +32 -20
  34. package/Link.js +6 -6
  35. package/List.js +2 -2
  36. package/Markdown.js +250 -88
  37. package/Menu.js +70 -64
  38. package/Message.js +18 -18
  39. package/Modal.js +68 -14
  40. package/ModalLayer.js +4 -4
  41. package/Monogram.js +12 -11
  42. package/Multiselect.js +122 -78
  43. package/Number.js +19 -16
  44. package/Paginator.js +10 -10
  45. package/Paragraph.js +2 -2
  46. package/Popover.js +52 -38
  47. package/Progress.js +8 -8
  48. package/RadioBar.js +45 -38
  49. package/RadioList.js +2 -2
  50. package/Resize.js +19 -15
  51. package/ResultsMenu.js +8 -8
  52. package/ScreenReaderContent.js +2 -2
  53. package/Scroll.js +16 -14
  54. package/ScrollContainerContext.js +5 -5
  55. package/Search.d.ts +2 -0
  56. package/Search.js +797 -0
  57. package/Select.js +63 -35
  58. package/SidePanel.js +6 -6
  59. package/Slider.js +29 -25
  60. package/SlidingPanels.js +4 -4
  61. package/StaticContent.js +2 -2
  62. package/StepBar.js +56 -52
  63. package/Switch.js +8 -8
  64. package/TabBar.js +126 -85
  65. package/TabLayout.js +4 -5
  66. package/Table.js +190 -139
  67. package/Text.js +69 -63
  68. package/Tooltip.js +11 -11
  69. package/TransitionOpen.js +9 -9
  70. package/WaitSpinner.js +3 -4
  71. package/package.json +4 -5
  72. package/types/src/Accordion/AccordionContext.d.ts +10 -0
  73. package/types/src/Accordion/Panel.d.ts +0 -9
  74. package/types/src/Button/Button.d.ts +4 -2
  75. package/types/src/ButtonGroup/ButtonGroupContext.d.ts +7 -0
  76. package/types/src/ButtonSimple/ButtonSimple.d.ts +5 -5
  77. package/types/src/Card/Card.d.ts +2 -0
  78. package/types/src/CardLayout/CardLayoutContext.d.ts +8 -0
  79. package/types/src/Color/Color.d.ts +2 -2
  80. package/types/src/ComboBox/ComboBox.d.ts +4 -3
  81. package/types/src/Concertina/ConcertinaContext.d.ts +8 -0
  82. package/types/src/Concertina/Panel.d.ts +2 -4
  83. package/types/src/ControlGroup/ControlGroup.d.ts +6 -1
  84. package/types/src/Date/Date.d.ts +3 -3
  85. package/types/src/EventListener/EventListener.d.ts +18 -0
  86. package/types/src/EventListener/index.d.ts +2 -0
  87. package/types/src/File/File.d.ts +6 -4
  88. package/types/src/FormRows/FormRows.d.ts +70 -12
  89. package/types/src/FormRows/FormRowsContext.d.ts +1 -0
  90. package/types/src/FormRows/Row.d.ts +9 -7
  91. package/types/src/Markdown/Markdown.d.ts +2 -0
  92. package/types/src/Markdown/renderers/MarkdownBlockquote.d.ts +14 -0
  93. package/types/src/Markdown/renderers/MarkdownCode.d.ts +15 -0
  94. package/types/src/Markdown/renderers/MarkdownCodeBlock.d.ts +16 -0
  95. package/types/src/Markdown/renderers/MarkdownHeading.d.ts +15 -0
  96. package/types/src/Markdown/renderers/MarkdownImage.d.ts +18 -0
  97. package/types/src/Markdown/renderers/MarkdownItem.d.ts +14 -0
  98. package/types/src/Markdown/renderers/MarkdownLink.d.ts +18 -0
  99. package/types/src/Markdown/renderers/MarkdownList.d.ts +26 -0
  100. package/types/src/Markdown/renderers/MarkdownParagraph.d.ts +14 -0
  101. package/types/src/Markdown/renderers/index.d.ts +10 -0
  102. package/types/src/Modal/Modal.d.ts +15 -3
  103. package/types/src/Monogram/Monogram.d.ts +5 -1
  104. package/types/src/Multiselect/Compact.d.ts +12 -4
  105. package/types/src/Multiselect/Multiselect.d.ts +14 -4
  106. package/types/src/Multiselect/Normal.d.ts +7 -2
  107. package/types/src/Number/Number.d.ts +11 -7
  108. package/types/src/Popover/Popover.d.ts +2 -2
  109. package/types/src/RadioBar/Option.d.ts +1 -15
  110. package/types/src/RadioBar/RadioBar.d.ts +2 -2
  111. package/types/src/RadioBar/RadioBarContext.d.ts +9 -0
  112. package/types/src/Scroll/Inner.d.ts +1 -1
  113. package/types/src/ScrollContainerContext/ScrollContainerContext.d.ts +4 -4
  114. package/types/src/Search/Option.d.ts +60 -0
  115. package/types/src/Search/Search.d.ts +97 -0
  116. package/types/src/Search/index.d.ts +2 -0
  117. package/types/src/Select/Select.d.ts +6 -2
  118. package/types/src/Select/SelectBase.d.ts +12 -5
  119. package/types/src/Slider/Slider.d.ts +2 -2
  120. package/types/src/StepBar/Step.d.ts +1 -13
  121. package/types/src/StepBar/StepBarContext.d.ts +8 -0
  122. package/types/src/TabBar/Tab.d.ts +5 -13
  123. package/types/src/TabBar/TabBarContext.d.ts +14 -0
  124. package/types/src/Table/Body.d.ts +1 -1
  125. package/types/src/Table/Head.d.ts +1 -1
  126. package/types/src/Table/Row.d.ts +10 -3
  127. package/types/src/Table/Table.d.ts +3 -2
  128. package/types/src/Text/Text.d.ts +11 -7
  129. package/types/src/icons/Sort.d.ts +3 -0
  130. package/types/src/usePrevious/index.d.ts +2 -0
  131. package/types/src/usePrevious/usePrevious.d.ts +12 -0
  132. package/usePrevious.js +137 -0
@@ -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 = 143);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 151);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -108,14 +108,14 @@ module.exports = require("@splunk/ui-utils/id");
108
108
 
109
109
  /***/ }),
110
110
 
111
- /***/ 11:
111
+ /***/ 12:
112
112
  /***/ (function(module, exports) {
113
113
 
114
114
  module.exports = require("@splunk/react-ui/Clickable");
115
115
 
116
116
  /***/ }),
117
117
 
118
- /***/ 143:
118
+ /***/ 151:
119
119
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
120
120
 
121
121
  "use strict";
@@ -143,7 +143,7 @@ var i18n_ = __webpack_require__(5);
143
143
  var id_ = __webpack_require__(10);
144
144
 
145
145
  // EXTERNAL MODULE: external "@splunk/react-ui/TransitionOpen"
146
- var TransitionOpen_ = __webpack_require__(46);
146
+ var TransitionOpen_ = __webpack_require__(47);
147
147
  var TransitionOpen_default = /*#__PURE__*/__webpack_require__.n(TransitionOpen_);
148
148
 
149
149
  // EXTERNAL MODULE: ./src/icons/ChevronRight.tsx
@@ -158,7 +158,7 @@ var Box_ = __webpack_require__(8);
158
158
  var Box_default = /*#__PURE__*/__webpack_require__.n(Box_);
159
159
 
160
160
  // EXTERNAL MODULE: external "@splunk/react-ui/Clickable"
161
- var Clickable_ = __webpack_require__(11);
161
+ var Clickable_ = __webpack_require__(12);
162
162
  var Clickable_default = /*#__PURE__*/__webpack_require__.n(Clickable_);
163
163
 
164
164
  // EXTERNAL MODULE: external "@splunk/themes"
@@ -641,7 +641,7 @@ module.exports = require("lodash");
641
641
 
642
642
  /***/ }),
643
643
 
644
- /***/ 46:
644
+ /***/ 47:
645
645
  /***/ (function(module, exports) {
646
646
 
647
647
  module.exports = require("@splunk/react-ui/TransitionOpen");
package/Color.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 = 130);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -101,14 +101,14 @@ module.exports = require("prop-types");
101
101
 
102
102
  /***/ }),
103
103
 
104
- /***/ 11:
104
+ /***/ 12:
105
105
  /***/ (function(module, exports) {
106
106
 
107
107
  module.exports = require("@splunk/react-ui/Clickable");
108
108
 
109
109
  /***/ }),
110
110
 
111
- /***/ 124:
111
+ /***/ 130:
112
112
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
113
113
 
114
114
  "use strict";
@@ -132,7 +132,7 @@ var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_pr
132
132
  var external_lodash_ = __webpack_require__(4);
133
133
 
134
134
  // EXTERNAL MODULE: external "@splunk/themes/SplunkThemeProvider"
135
- var SplunkThemeProvider_ = __webpack_require__(74);
135
+ var SplunkThemeProvider_ = __webpack_require__(76);
136
136
  var SplunkThemeProvider_default = /*#__PURE__*/__webpack_require__.n(SplunkThemeProvider_);
137
137
 
138
138
  // EXTERNAL MODULE: external "@splunk/ui-utils/i18n"
@@ -148,29 +148,33 @@ var keyboard_ = __webpack_require__(9);
148
148
  var Dropdown_ = __webpack_require__(19);
149
149
  var Dropdown_default = /*#__PURE__*/__webpack_require__.n(Dropdown_);
150
150
 
151
- // EXTERNAL MODULE: external "@splunk/react-ui/Text"
152
- var Text_ = __webpack_require__(26);
153
- var Text_default = /*#__PURE__*/__webpack_require__.n(Text_);
154
-
155
151
  // EXTERNAL MODULE: external "@splunk/themes"
156
152
  var themes_ = __webpack_require__(0);
157
153
 
154
+ // EXTERNAL MODULE: external "tinycolor2"
155
+ var external_tinycolor2_ = __webpack_require__(44);
156
+ var external_tinycolor2_default = /*#__PURE__*/__webpack_require__.n(external_tinycolor2_);
157
+
158
158
  // EXTERNAL MODULE: ./src/icons/Check.tsx
159
- var Check = __webpack_require__(47);
159
+ var Check = __webpack_require__(48);
160
160
 
161
161
  // EXTERNAL MODULE: ./src/icons/ChevronDown.tsx
162
- var ChevronDown = __webpack_require__(56);
162
+ var ChevronDown = __webpack_require__(59);
163
163
 
164
164
  // EXTERNAL MODULE: external "styled-components"
165
165
  var external_styled_components_ = __webpack_require__(3);
166
166
  var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_);
167
167
 
168
168
  // EXTERNAL MODULE: external "@splunk/react-ui/Clickable"
169
- var Clickable_ = __webpack_require__(11);
169
+ var Clickable_ = __webpack_require__(12);
170
170
  var Clickable_default = /*#__PURE__*/__webpack_require__.n(Clickable_);
171
171
 
172
+ // EXTERNAL MODULE: external "@splunk/react-ui/Text"
173
+ var Text_ = __webpack_require__(21);
174
+ var Text_default = /*#__PURE__*/__webpack_require__.n(Text_);
175
+
172
176
  // EXTERNAL MODULE: external "@splunk/react-ui/ScreenReaderContent"
173
- var ScreenReaderContent_ = __webpack_require__(14);
177
+ var ScreenReaderContent_ = __webpack_require__(15);
174
178
  var ScreenReaderContent_default = /*#__PURE__*/__webpack_require__.n(ScreenReaderContent_);
175
179
 
176
180
  // CONCATENATED MODULE: ./src/Color/SwatchStyles.ts
@@ -189,7 +193,10 @@ var StyledClickable = external_styled_components_default()(Clickable_default.a).
189
193
  displayName: "SwatchStyles__StyledClickable",
190
194
  componentId: "sc-1wxunhq-0"
191
195
  })(["display:block;flex:0 0 auto;border:", ";", ";", ";", ";", " &:focus{border-color:", ";box-shadow:", ";}", " ", " ", " &[disabled]{background-image:linear-gradient(rgba(255,255,255,0.8),rgba(255,255,255,0.8));}", " ", " "], Object(themes_["pick"])({
192
- enterprise: themes_["variables"].border,
196
+ enterprise: {
197
+ light: Object(external_styled_components_["css"])(["1px solid ", ""], themes_["variables"].gray60),
198
+ dark: themes_["variables"].border
199
+ },
193
200
  prisma: Object(external_styled_components_["css"])(["1px solid ", ""], themes_["variables"].interactiveColorBorder)
194
201
  }), Object(themes_["pick"])({
195
202
  prisma: Object(external_styled_components_["css"])(["border-radius:2px;"])
@@ -312,6 +319,7 @@ Swatch.propTypes = propTypes;
312
319
 
313
320
 
314
321
 
322
+
315
323
  var StyledColor = external_styled_components_default.a.div.withConfig({
316
324
  displayName: "ColorStyles__StyledColor",
317
325
  componentId: "jxrost-0"
@@ -368,20 +376,27 @@ var StyledSystemColorPickerWrapper = external_styled_components_default.a.div.wi
368
376
  var StyledSystemColorPicker = external_styled_components_default.a.input.withConfig({
369
377
  displayName: "ColorStyles__StyledSystemColorPicker",
370
378
  componentId: "jxrost-7"
371
- })(["box-sizing:border-box;height:24px;width:24px;border:none;border-radius:2px;outline:none;appearance:none;-webkit-appearance:none;padding:12px;margin:0;background:conic-gradient( #ef3434,#ef9a34,#deef34,#78ef34,#34ef56,#34efbc,#34bcef,#3456ef,#7834ef,#de34ef,#ef349a,#ef3434 );background-repeat:no-repeat;background-position:-6px -6px;background-size:36px 36px;cursor:pointer;&::-webkit-color-swatch{border:none;border-radius:2px;}&::-moz-color-swatch{opacity:0;}&:focus{box-shadow:", ";}"], themes_["variables"].focusShadow);
379
+ })(["box-sizing:border-box;height:24px;width:24px;border:none;border-radius:2px;outline:none;appearance:none;padding:12px;margin:0;background:conic-gradient( #ef3434,#ef9a34,#deef34,#78ef34,#34ef56,#34efbc,#34bcef,#3456ef,#7834ef,#de34ef,#ef349a,#ef3434 );background-repeat:no-repeat;background-position:-6px -6px;background-size:36px 36px;cursor:pointer;&::-webkit-color-swatch{border:none;border-radius:2px;}&::-moz-color-swatch{opacity:0;}&:focus{box-shadow:", ";}"], themes_["variables"].focusShadow);
372
380
  var StyledInput = external_styled_components_default.a.div.withConfig({
373
381
  displayName: "ColorStyles__StyledInput",
374
382
  componentId: "jxrost-8"
375
383
  })(["", ";"], Object(themes_["pick"])({
376
384
  enterprise: Object(external_styled_components_["css"])(["display:flex;width:100%;"]),
377
- prisma: Object(external_styled_components_["css"])(["position:relative;width:", ";"], function (_ref2) {
385
+ prisma: Object(external_styled_components_["css"])(["position:relative;", ""], function (_ref2) {
378
386
  var $inDropdown = _ref2.$inDropdown;
379
- return $inDropdown ? '80px' : Object(external_styled_components_["css"])(["calc(100% - 2px)"]);
387
+ return $inDropdown ? Object(external_styled_components_["css"])(["width:80px;"]) : Object(external_styled_components_["css"])(["flex:0 1 auto;min-width:0;"]);
380
388
  })
381
389
  }));
390
+ var StyledInputText = external_styled_components_default()(Text_default.a).withConfig({
391
+ displayName: "ColorStyles__StyledInputText",
392
+ componentId: "jxrost-9"
393
+ })(["", ""], function (_ref3) {
394
+ var $inDropdown = _ref3.$inDropdown;
395
+ return $inDropdown && Object(external_styled_components_["css"])(["font-size:12px;"]);
396
+ });
382
397
  var StyledToggleSwatch = external_styled_components_default()(Color_Swatch).withConfig({
383
398
  displayName: "ColorStyles__StyledToggleSwatch",
384
- componentId: "jxrost-9"
399
+ componentId: "jxrost-10"
385
400
  })(["", ""], Object(themes_["pick"])({
386
401
  prisma: {
387
402
  comfortable: Object(external_styled_components_["css"])(["width:40px;height:40px;"]),
@@ -451,7 +466,23 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
451
466
 
452
467
 
453
468
  // The default palette in Prisma theme.
454
- var defaultPalette = ['#F29BAC', '#FDAF93', '#FCCF87', '#A9F5E7', '#9AE6F7', '#9FADF7', '#C093F9', '#F5BBFA', '#E85B79', '#FB865C', '#FFC34E', '#7EEFDA', '#6CD0F0', '#6484F6', '#A870EF', '#F494E5', '#C6335F', '#E9643A', '#ECAE11', '#45D4BA', '#4EB2D2', '#4665D6', '#8747DA', '#E062E3', '#912344', '#D44C20', '#C0891E', '#26AA92', '#2F8AA7', '#2E49AA', '#602CA1', '#BA4ABD']; // The tool palette in Prisma theme.
469
+ var defaultPalette = ['#912344', '#D44C20', '#C0891E', '#26AA92', '#2F8AA7', '#2E49AA', '#602CA1', '#BA4ABD'];
470
+ var generatePalette = Object(external_lodash_["memoize"])(function (initialPalette) {
471
+ var palette = [];
472
+
473
+ for (var i = 1; i <= initialPalette.length * 4; i += 1) {
474
+ var baseColor = initialPalette[(i - 1) % initialPalette.length];
475
+
476
+ if (i > initialPalette.length * 3) {
477
+ palette.push(baseColor);
478
+ } else {
479
+ var lightenBy = 40 - 10 * (i / initialPalette.length);
480
+ palette.push(external_tinycolor2_default()(baseColor).lighten(lightenBy).toString());
481
+ }
482
+ }
483
+
484
+ return palette;
485
+ }); // The tool palette in Prisma theme.
455
486
 
456
487
  var toolPalette = ['#ffffff', '#000000', null];
457
488
  var Color_propTypes = {
@@ -477,7 +508,7 @@ var defaultProps = {
477
508
  disabled: false,
478
509
  error: false,
479
510
  hideInput: false,
480
- palette: defaultPalette,
511
+ palette: generatePalette(defaultPalette),
481
512
  prepend: false
482
513
  };
483
514
 
@@ -620,17 +651,22 @@ var Color_Color = /*#__PURE__*/function (_Component) {
620
651
  displayValue: displayValue
621
652
  });
622
653
  } // If the user types in the hexadecimal number without # in front,
623
- // we are able to add # automatically.
654
+ // we add # automatically.
624
655
 
625
656
 
626
657
  if (displayValue !== 'N/A' && Object(external_lodash_["toLower"])(displayValue) !== 'transparent' && !Object(external_lodash_["startsWith"])(displayValue, '#')) {
627
658
  displayValue = "#".concat(displayValue);
628
659
 
629
660
  if (reason === 'escapeKey') {
630
- // @ts-expect-error - displayValue can actually be null here, but that's a bug
631
- _this.setState({
632
- displayValue: value
633
- });
661
+ if (value == null) {
662
+ _this.setState({
663
+ displayValue: 'N/A'
664
+ });
665
+ } else {
666
+ _this.setState({
667
+ displayValue: value
668
+ });
669
+ }
634
670
  } else {
635
671
  _this.setState({
636
672
  displayValue: displayValue
@@ -653,7 +689,7 @@ var Color_Color = /*#__PURE__*/function (_Component) {
653
689
  var _this$props2 = _this.props,
654
690
  splunkTheme = _this$props2.splunkTheme,
655
691
  palette = _this$props2.palette;
656
- var isPrisma = splunkTheme.family === 'prisma';
692
+ var isPrisma = splunkTheme.isPrisma;
657
693
 
658
694
  var value = _this.getValue();
659
695
 
@@ -716,7 +752,7 @@ var Color_Color = /*#__PURE__*/function (_Component) {
716
752
  _this.focusExpandButton = /*#__PURE__*/external_react_default.a.createRef();
717
753
  _this.controlledExternally = Object(external_lodash_["has"])(props, 'value'); // value can be hexadecimal color, 'transparent' or null
718
754
 
719
- var _value = Object(color_["expandShortHandHex"])(props.defaultValue) || Object(color_["expandShortHandHex"])(props.value);
755
+ var _value = _this.controlledExternally ? Object(color_["expandShortHandHex"])(props.value) : Object(color_["expandShortHandHex"])(props.defaultValue);
720
756
 
721
757
  if (_value !== null) {
722
758
  _value = Object(external_lodash_["toLower"])(_value);
@@ -747,7 +783,7 @@ var Color_Color = /*#__PURE__*/function (_Component) {
747
783
  }, {
748
784
  key: "showNull",
749
785
  value: function showNull() {
750
- var isPrisma = this.props.splunkTheme.family === 'prisma';
786
+ var isPrisma = this.props.splunkTheme.isPrisma;
751
787
  return Color.hasNull(this.props.palette) || isPrisma;
752
788
  }
753
789
  /**
@@ -779,7 +815,7 @@ var Color_Color = /*#__PURE__*/function (_Component) {
779
815
  key: "submitValue",
780
816
  value: function submitValue(displayValue) {
781
817
  var splunkTheme = this.props.splunkTheme;
782
- var isPrisma = (splunkTheme === null || splunkTheme === void 0 ? void 0 : splunkTheme.family) === 'prisma';
818
+ var isPrisma = splunkTheme.isPrisma;
783
819
 
784
820
  if (displayValue && (Color_isValidHEX(displayValue) || Color.hasTransparent(this.props.palette) && displayValue === 'transparent' || (Color.hasNull(this.props.palette) || isPrisma) && displayValue === 'N/A')) {
785
821
  var formattedDisplayValue = Object(color_["expandShortHandHex"])(displayValue);
@@ -832,7 +868,7 @@ var Color_Color = /*#__PURE__*/function (_Component) {
832
868
  inDropdown = _ref4.inDropdown;
833
869
  var splunkTheme = this.props.splunkTheme;
834
870
  var displayValue = this.state.displayValue;
835
- var isPrisma = (splunkTheme === null || splunkTheme === void 0 ? void 0 : splunkTheme.family) === 'prisma';
871
+ var isPrisma = splunkTheme.isPrisma;
836
872
  var showTransparent = Color.hasTransparent(this.props.palette) && Object(external_lodash_["toLower"])(displayValue) === 'transparent';
837
873
  var showNullSwatch = this.showNull() && Object(external_lodash_["toLower"])(displayValue) === 'n/a';
838
874
  var inputSwatchValue = displayValue;
@@ -845,7 +881,8 @@ var Color_Color = /*#__PURE__*/function (_Component) {
845
881
  inputSwatchValue = showNullSwatch ? null : inputSwatchValue;
846
882
  return /*#__PURE__*/external_react_default.a.createElement(StyledInput, {
847
883
  $inDropdown: inDropdown
848
- }, /*#__PURE__*/external_react_default.a.createElement(Text_default.a, {
884
+ }, /*#__PURE__*/external_react_default.a.createElement(StyledInputText, {
885
+ $inDropdown: inDropdown,
849
886
  append: textAppend,
850
887
  autoCapitalize: "off",
851
888
  autoComplete: "off",
@@ -856,15 +893,16 @@ var Color_Color = /*#__PURE__*/function (_Component) {
856
893
  inline: textInline,
857
894
  onKeyDown: this.handleTextKeyDown,
858
895
  onChange: this.handleTextChange,
859
- value: displayValue,
860
- style: inDropdown ? {
861
- fontSize: 12
862
- } : {}
896
+ value: displayValue
863
897
  }), !isPrisma && /*#__PURE__*/external_react_default.a.createElement(Color_Swatch, {
864
898
  "data-test": "textbox-swatch",
865
899
  onClick: this.handleButtonClick,
866
900
  value: inputSwatchValue,
867
- tabIndex: -1
901
+ tabIndex: -1,
902
+ style: {
903
+ marginLeft: '1px'
904
+ } // Used to cancel out the `margin-right: -1px` of Text append style
905
+
868
906
  }));
869
907
  }
870
908
  }, {
@@ -875,8 +913,8 @@ var Color_Color = /*#__PURE__*/function (_Component) {
875
913
  var _this$props5 = this.props,
876
914
  palette = _this$props5.palette,
877
915
  splunkTheme = _this$props5.splunkTheme;
878
- var isPrisma = (splunkTheme === null || splunkTheme === void 0 ? void 0 : splunkTheme.family) === 'prisma';
879
- var isLightTheme = (splunkTheme === null || splunkTheme === void 0 ? void 0 : splunkTheme.colorScheme) === 'light';
916
+ var isPrisma = splunkTheme.isPrisma,
917
+ isLight = splunkTheme.isLight;
880
918
  var currentValue = this.getValue();
881
919
  var currentPalette = isPrisma && this.state.expanded ? palette : Object(external_lodash_["slice"])(palette, 0, 15);
882
920
  var colorInPalette = Object(external_lodash_["includes"])(currentPalette.map(function (c) {
@@ -928,7 +966,7 @@ var Color_Color = /*#__PURE__*/function (_Component) {
928
966
  value: null,
929
967
  ref: currentValue === null ? this.focusSwatch : null,
930
968
  onClick: this.handleSwatchClick,
931
- noBorder: !isLightTheme,
969
+ noBorder: !isLight,
932
970
  showSelected: currentValue === null
933
971
  }), /*#__PURE__*/external_react_default.a.createElement(Color_Swatch, {
934
972
  style: {
@@ -937,7 +975,7 @@ var Color_Color = /*#__PURE__*/function (_Component) {
937
975
  value: "#ffffff",
938
976
  ref: currentValue === '#ffffff' ? this.focusSwatch : null,
939
977
  onClick: this.handleSwatchClick,
940
- noBorder: !isLightTheme,
978
+ noBorder: !isLight,
941
979
  showSelected: currentValue === '#ffffff'
942
980
  }), /*#__PURE__*/external_react_default.a.createElement(Color_Swatch, {
943
981
  style: {
@@ -949,8 +987,10 @@ var Color_Color = /*#__PURE__*/function (_Component) {
949
987
  noBorder: true,
950
988
  showSelected: currentValue === '#000000'
951
989
  }), /*#__PURE__*/external_react_default.a.createElement(StyledSystemColorPickerWrapper, null, /*#__PURE__*/external_react_default.a.createElement(StyledSystemColorPicker, {
952
- type: "color",
953
- value: currentValue === null ? undefined : currentValue,
990
+ type: "color" // TODO: SUI-2806 Remove the warning with Prisma null example
991
+ // Warning only exists in Chrome: https://chromium.googlesource.com/chromium/src/+/011c27ced479c76cffd5093ce107082e4da657f3/third_party/blink/renderer/core/html/forms/color_input_type.cc#190
992
+ ,
993
+ value: currentValue === null ? '' : currentValue,
954
994
  onChange: function onChange(e) {
955
995
  return _this2.handleSystemColorPickerChange(e.target.value);
956
996
  },
@@ -997,7 +1037,7 @@ var Color_Color = /*#__PURE__*/function (_Component) {
997
1037
  splunkTheme = _this$props6.splunkTheme,
998
1038
  otherProps = Color_objectWithoutProperties(_this$props6, ["append", "disabled", "describedBy", "elementRef", "error", "hideInput", "labelledBy", "name", "prepend", "splunkTheme"]);
999
1039
 
1000
- var isPrisma = (splunkTheme === null || splunkTheme === void 0 ? void 0 : splunkTheme.family) === 'prisma';
1040
+ var isPrisma = splunkTheme.isPrisma;
1001
1041
  var value = this.getValue();
1002
1042
  var displayValue = this.state.displayValue;
1003
1043
  var toggle = /*#__PURE__*/external_react_default.a.createElement(StyledToggleSwatch, Color_extends({
@@ -1059,7 +1099,7 @@ ColorWithTheme.propTypes = Color_Color.propTypes;
1059
1099
 
1060
1100
  /***/ }),
1061
1101
 
1062
- /***/ 14:
1102
+ /***/ 15:
1063
1103
  /***/ (function(module, exports) {
1064
1104
 
1065
1105
  module.exports = require("@splunk/react-ui/ScreenReaderContent");
@@ -1080,7 +1120,7 @@ module.exports = require("react");
1080
1120
 
1081
1121
  /***/ }),
1082
1122
 
1083
- /***/ 26:
1123
+ /***/ 21:
1084
1124
  /***/ (function(module, exports) {
1085
1125
 
1086
1126
  module.exports = require("@splunk/react-ui/Text");
@@ -1111,18 +1151,25 @@ module.exports = require("lodash");
1111
1151
  /***/ 44:
1112
1152
  /***/ (function(module, exports) {
1113
1153
 
1154
+ module.exports = require("tinycolor2");
1155
+
1156
+ /***/ }),
1157
+
1158
+ /***/ 45:
1159
+ /***/ (function(module, exports) {
1160
+
1114
1161
  module.exports = require("@splunk/react-icons/Check");
1115
1162
 
1116
1163
  /***/ }),
1117
1164
 
1118
- /***/ 47:
1165
+ /***/ 48:
1119
1166
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1120
1167
 
1121
1168
  "use strict";
1122
1169
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Check; });
1123
1170
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
1124
1171
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1125
- /* harmony import */ var _splunk_react_icons_Check__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(44);
1172
+ /* harmony import */ var _splunk_react_icons_Check__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(45);
1126
1173
  /* harmony import */ var _splunk_react_icons_Check__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_splunk_react_icons_Check__WEBPACK_IMPORTED_MODULE_1__);
1127
1174
  /* harmony import */ var _ThemedIcon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
1128
1175
  /* harmony import */ var _SVG__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6);
@@ -1172,14 +1219,14 @@ module.exports = require("@splunk/ui-utils/i18n");
1172
1219
 
1173
1220
  /***/ }),
1174
1221
 
1175
- /***/ 56:
1222
+ /***/ 59:
1176
1223
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1177
1224
 
1178
1225
  "use strict";
1179
1226
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ChevronDown; });
1180
1227
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
1181
1228
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1182
- /* harmony import */ var _splunk_react_icons_ChevronDown__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(57);
1229
+ /* harmony import */ var _splunk_react_icons_ChevronDown__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(60);
1183
1230
  /* harmony import */ var _splunk_react_icons_ChevronDown__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_splunk_react_icons_ChevronDown__WEBPACK_IMPORTED_MODULE_1__);
1184
1231
  /* harmony import */ var _ThemedIcon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
1185
1232
  /* harmony import */ var _SVG__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6);
@@ -1222,13 +1269,6 @@ function ChevronDown(props) {
1222
1269
 
1223
1270
  /***/ }),
1224
1271
 
1225
- /***/ 57:
1226
- /***/ (function(module, exports) {
1227
-
1228
- module.exports = require("@splunk/react-icons/ChevronDown");
1229
-
1230
- /***/ }),
1231
-
1232
1272
  /***/ 6:
1233
1273
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1234
1274
 
@@ -1254,6 +1294,13 @@ function SVG(props) {
1254
1294
 
1255
1295
  /***/ }),
1256
1296
 
1297
+ /***/ 60:
1298
+ /***/ (function(module, exports) {
1299
+
1300
+ module.exports = require("@splunk/react-icons/ChevronDown");
1301
+
1302
+ /***/ }),
1303
+
1257
1304
  /***/ 7:
1258
1305
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1259
1306
 
@@ -1372,7 +1419,7 @@ Icon.defaultProps = defaultProps;
1372
1419
 
1373
1420
  /***/ }),
1374
1421
 
1375
- /***/ 74:
1422
+ /***/ 76:
1376
1423
  /***/ (function(module, exports) {
1377
1424
 
1378
1425
  module.exports = require("@splunk/themes/SplunkThemeProvider");
package/ColumnLayout.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 = 113);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 118);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -101,7 +101,7 @@ module.exports = require("prop-types");
101
101
 
102
102
  /***/ }),
103
103
 
104
- /***/ 113:
104
+ /***/ 118:
105
105
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
106
106
 
107
107
  "use strict";
@@ -144,7 +144,7 @@ var Styled = external_styled_components_default.a.div.withConfig({
144
144
  })(["", ";"], themes_["mixins"].reset('block'));
145
145
 
146
146
  // EXTERNAL MODULE: ./src/utils/types.ts
147
- var types = __webpack_require__(48);
147
+ var types = __webpack_require__(49);
148
148
 
149
149
  // CONCATENATED MODULE: ./src/ColumnLayout/Column.tsx
150
150
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
@@ -442,7 +442,7 @@ module.exports = require("lodash");
442
442
 
443
443
  /***/ }),
444
444
 
445
- /***/ 48:
445
+ /***/ 49:
446
446
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
447
447
 
448
448
  "use strict";
package/ComboBox.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 = 151);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 152);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -101,7 +101,7 @@ module.exports = require("@splunk/ui-utils/id");
101
101
 
102
102
  /***/ }),
103
103
 
104
- /***/ 12:
104
+ /***/ 11:
105
105
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
106
106
 
107
107
  "use strict";
@@ -135,7 +135,7 @@ module.exports = require("@splunk/react-ui/Menu");
135
135
 
136
136
  /***/ }),
137
137
 
138
- /***/ 151:
138
+ /***/ 152:
139
139
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
140
140
 
141
141
  "use strict";
@@ -160,7 +160,7 @@ var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_pr
160
160
  var external_lodash_ = __webpack_require__(4);
161
161
 
162
162
  // EXTERNAL MODULE: external "@splunk/ui-utils/filter"
163
- var filter_ = __webpack_require__(23);
163
+ var filter_ = __webpack_require__(24);
164
164
 
165
165
  // EXTERNAL MODULE: external "@splunk/ui-utils/id"
166
166
  var id_ = __webpack_require__(10);
@@ -175,15 +175,15 @@ var keyboard_ = __webpack_require__(9);
175
175
  var Menu_ = __webpack_require__(13);
176
176
 
177
177
  // EXTERNAL MODULE: external "@splunk/react-ui/Popover"
178
- var Popover_ = __webpack_require__(17);
178
+ var Popover_ = __webpack_require__(16);
179
179
  var Popover_default = /*#__PURE__*/__webpack_require__.n(Popover_);
180
180
 
181
181
  // EXTERNAL MODULE: external "@splunk/react-ui/ResultsMenu"
182
- var ResultsMenu_ = __webpack_require__(39);
182
+ var ResultsMenu_ = __webpack_require__(32);
183
183
  var ResultsMenu_default = /*#__PURE__*/__webpack_require__.n(ResultsMenu_);
184
184
 
185
185
  // EXTERNAL MODULE: external "@splunk/react-ui/Text"
186
- var Text_ = __webpack_require__(26);
186
+ var Text_ = __webpack_require__(21);
187
187
  var Text_default = /*#__PURE__*/__webpack_require__.n(Text_);
188
188
 
189
189
  // CONCATENATED MODULE: ./src/ComboBox/Option.tsx
@@ -326,7 +326,7 @@ _defineProperty(Option_Option, "defaultProps", defaultProps);
326
326
 
327
327
  /* harmony default export */ var ComboBox_Option = (Option_Option);
328
328
  // EXTERNAL MODULE: ./src/utils/updateReactRef.ts
329
- var updateReactRef = __webpack_require__(12);
329
+ var updateReactRef = __webpack_require__(11);
330
330
 
331
331
  // CONCATENATED MODULE: ./src/ComboBox/ComboBox.tsx
332
332
  function ComboBox_typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { ComboBox_typeof = function _typeof(obj) { return typeof obj; }; } else { ComboBox_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return ComboBox_typeof(obj); }
@@ -461,6 +461,8 @@ var ComboBox_ComboBox = /*#__PURE__*/function (_Component) {
461
461
 
462
462
  ComboBox_defineProperty(ComboBox_assertThisInitialized(_this), "popoverId", void 0);
463
463
 
464
+ ComboBox_defineProperty(ComboBox_assertThisInitialized(_this), "previousActiveIndex", null);
465
+
464
466
  ComboBox_defineProperty(ComboBox_assertThisInitialized(_this), "textInput", null);
465
467
 
466
468
  ComboBox_defineProperty(ComboBox_assertThisInitialized(_this), "handleInputMount", function (el) {
@@ -474,8 +476,8 @@ var ComboBox_ComboBox = /*#__PURE__*/function (_Component) {
474
476
  });
475
477
 
476
478
  ComboBox_defineProperty(ComboBox_assertThisInitialized(_this), "handleActiveOptionMount", function (c) {
477
- if (c) {
478
- c.scrollIntoViewIfNeeded();
479
+ if (_this.previousActiveIndex !== _this.state.activeIndex) {
480
+ c === null || c === void 0 ? void 0 : c.scrollIntoViewIfNeeded();
479
481
  }
480
482
  });
481
483
 
@@ -736,8 +738,10 @@ var ComboBox_ComboBox = /*#__PURE__*/function (_Component) {
736
738
 
737
739
  ComboBox_createClass(ComboBox, [{
738
740
  key: "componentDidUpdate",
739
- value: function componentDidUpdate() {
741
+ value: function componentDidUpdate(prevProps, prevState) {
740
742
  if (false) {}
743
+
744
+ this.previousActiveIndex = prevState.activeIndex;
741
745
  }
742
746
  }, {
743
747
  key: "getValue",
@@ -784,6 +788,7 @@ var ComboBox_ComboBox = /*#__PURE__*/function (_Component) {
784
788
  }, function () {
785
789
  var _this3$props$onClose, _this3$props;
786
790
 
791
+ _this3.previousActiveIndex = null;
787
792
  (_this3$props$onClose = (_this3$props = _this3.props).onClose) === null || _this3$props$onClose === void 0 ? void 0 : _this3$props$onClose.call(_this3$props);
788
793
  });
789
794
  }
@@ -870,7 +875,7 @@ ComboBox_defineProperty(ComboBox_ComboBox, "Heading", Menu_["Heading"]);
870
875
 
871
876
  /***/ }),
872
877
 
873
- /***/ 17:
878
+ /***/ 16:
874
879
  /***/ (function(module, exports) {
875
880
 
876
881
  module.exports = require("@splunk/react-ui/Popover");
@@ -884,21 +889,21 @@ module.exports = require("react");
884
889
 
885
890
  /***/ }),
886
891
 
887
- /***/ 23:
892
+ /***/ 21:
888
893
  /***/ (function(module, exports) {
889
894
 
890
- module.exports = require("@splunk/ui-utils/filter");
895
+ module.exports = require("@splunk/react-ui/Text");
891
896
 
892
897
  /***/ }),
893
898
 
894
- /***/ 26:
899
+ /***/ 24:
895
900
  /***/ (function(module, exports) {
896
901
 
897
- module.exports = require("@splunk/react-ui/Text");
902
+ module.exports = require("@splunk/ui-utils/filter");
898
903
 
899
904
  /***/ }),
900
905
 
901
- /***/ 39:
906
+ /***/ 32:
902
907
  /***/ (function(module, exports) {
903
908
 
904
909
  module.exports = require("@splunk/react-ui/ResultsMenu");