@splunk/react-ui 4.3.0 → 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 (138) 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 +57 -0
  10. package/Calendar.js +14 -14
  11. package/Card.js +51 -25
  12. package/CardLayout.js +31 -10
  13. package/Chip.js +77 -53
  14. package/Clickable.js +6 -6
  15. package/CloseButton.js +6 -6
  16. package/Code.js +1279 -1120
  17. package/CollapsiblePanel.js +6 -6
  18. package/Color.js +180 -209
  19. package/ColumnLayout.js +4 -4
  20. package/ComboBox.js +22 -17
  21. package/Concertina.js +56 -51
  22. package/ControlGroup.js +121 -32
  23. package/Date.js +62 -25
  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 +122 -96
  29. package/FormRows.js +66 -58
  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 +8 -8
  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 +70 -16
  40. package/ModalLayer.js +4 -4
  41. package/Monogram.js +12 -11
  42. package/Multiselect.js +124 -80
  43. package/Number.js +44 -34
  44. package/Paginator.js +10 -10
  45. package/Paragraph.js +2 -2
  46. package/Popover.js +54 -40
  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 +6 -6
  52. package/ScreenReaderContent.js +2 -2
  53. package/Scroll.js +25 -23
  54. package/ScrollContainerContext.js +5 -5
  55. package/Search.d.ts +2 -0
  56. package/Search.js +797 -0
  57. package/Select.js +85 -45
  58. package/SidePanel.js +6 -6
  59. package/Slider.js +34 -30
  60. package/SlidingPanels.js +6 -6
  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 +266 -155
  67. package/Text.js +486 -401
  68. package/Tooltip.js +11 -11
  69. package/TransitionOpen.js +11 -11
  70. package/WaitSpinner.js +3 -4
  71. package/package.json +5 -6
  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/Color/Swatch.d.ts +4 -15
  81. package/types/src/ComboBox/ComboBox.d.ts +4 -3
  82. package/types/src/Concertina/ConcertinaContext.d.ts +8 -0
  83. package/types/src/Concertina/Panel.d.ts +2 -4
  84. package/types/src/ControlGroup/ControlGroup.d.ts +11 -1
  85. package/types/src/ControlGroup/ControlGroupContext.d.ts +15 -0
  86. package/types/src/Date/Date.d.ts +6 -4
  87. package/types/src/EventListener/EventListener.d.ts +18 -0
  88. package/types/src/EventListener/index.d.ts +2 -0
  89. package/types/src/File/File.d.ts +6 -4
  90. package/types/src/File/FileContext.d.ts +9 -0
  91. package/types/src/File/Item.d.ts +5 -10
  92. package/types/src/FormRows/FormRows.d.ts +2 -2
  93. package/types/src/FormRows/FormRowsContext.d.ts +10 -0
  94. package/types/src/FormRows/Row.d.ts +5 -16
  95. package/types/src/Markdown/Markdown.d.ts +2 -0
  96. package/types/src/Markdown/renderers/MarkdownBlockquote.d.ts +14 -0
  97. package/types/src/Markdown/renderers/MarkdownCode.d.ts +15 -0
  98. package/types/src/Markdown/renderers/MarkdownCodeBlock.d.ts +16 -0
  99. package/types/src/Markdown/renderers/MarkdownHeading.d.ts +15 -0
  100. package/types/src/Markdown/renderers/MarkdownImage.d.ts +18 -0
  101. package/types/src/Markdown/renderers/MarkdownItem.d.ts +14 -0
  102. package/types/src/Markdown/renderers/MarkdownLink.d.ts +18 -0
  103. package/types/src/Markdown/renderers/MarkdownList.d.ts +26 -0
  104. package/types/src/Markdown/renderers/MarkdownParagraph.d.ts +14 -0
  105. package/types/src/Markdown/renderers/index.d.ts +10 -0
  106. package/types/src/Modal/Modal.d.ts +15 -3
  107. package/types/src/Monogram/Monogram.d.ts +5 -1
  108. package/types/src/Multiselect/Compact.d.ts +12 -4
  109. package/types/src/Multiselect/Multiselect.d.ts +14 -4
  110. package/types/src/Multiselect/Normal.d.ts +7 -2
  111. package/types/src/Number/Number.d.ts +11 -7
  112. package/types/src/Popover/Popover.d.ts +2 -2
  113. package/types/src/RadioBar/Option.d.ts +1 -15
  114. package/types/src/RadioBar/RadioBar.d.ts +2 -2
  115. package/types/src/RadioBar/RadioBarContext.d.ts +9 -0
  116. package/types/src/Scroll/Inner.d.ts +2 -2
  117. package/types/src/ScrollContainerContext/ScrollContainerContext.d.ts +4 -4
  118. package/types/src/Search/Option.d.ts +60 -0
  119. package/types/src/Search/Search.d.ts +97 -0
  120. package/types/src/Search/index.d.ts +2 -0
  121. package/types/src/Select/Select.d.ts +6 -2
  122. package/types/src/Select/SelectBase.d.ts +12 -5
  123. package/types/src/Slider/Slider.d.ts +2 -2
  124. package/types/src/StepBar/Step.d.ts +1 -13
  125. package/types/src/StepBar/StepBarContext.d.ts +8 -0
  126. package/types/src/TabBar/Tab.d.ts +5 -13
  127. package/types/src/TabBar/TabBarContext.d.ts +14 -0
  128. package/types/src/Table/Body.d.ts +1 -1
  129. package/types/src/Table/Head.d.ts +3 -1
  130. package/types/src/Table/HeadCell.d.ts +1 -1
  131. package/types/src/Table/HeadInner.d.ts +3 -3
  132. package/types/src/Table/Row.d.ts +10 -3
  133. package/types/src/Table/Table.d.ts +10 -5
  134. package/types/src/Text/Text.d.ts +33 -12
  135. package/types/src/icons/Sort.d.ts +3 -0
  136. package/types/src/usePrevious/index.d.ts +2 -0
  137. package/types/src/usePrevious/usePrevious.d.ts +12 -0
  138. package/usePrevious.js +137 -0
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 = 122);
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
- /***/ 122:
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"
@@ -145,32 +145,36 @@ var color_ = __webpack_require__(33);
145
145
  var keyboard_ = __webpack_require__(9);
146
146
 
147
147
  // EXTERNAL MODULE: external "@splunk/react-ui/Dropdown"
148
- var Dropdown_ = __webpack_require__(18);
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;"])
@@ -231,37 +238,12 @@ var StyledClickable = external_styled_components_default()(Clickable_default.a).
231
238
  });
232
239
 
233
240
  // CONCATENATED MODULE: ./src/Color/Swatch.tsx
234
- 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); }
235
-
236
241
  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); }
237
242
 
238
243
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
239
244
 
240
245
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
241
246
 
242
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
243
-
244
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
245
-
246
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
247
-
248
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
249
-
250
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
251
-
252
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
253
-
254
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
255
-
256
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
257
-
258
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
259
-
260
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
261
-
262
- 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; }
263
-
264
-
265
247
 
266
248
 
267
249
 
@@ -287,107 +269,57 @@ var propTypes = {
287
269
  /** @private */
288
270
  showSelected: external_prop_types_default.a.bool
289
271
  };
290
- var defaultProps = {
291
- error: false
292
- };
293
-
294
- var Swatch_Swatch = /*#__PURE__*/function (_Component) {
295
- _inherits(Swatch, _Component);
296
-
297
- var _super = _createSuper(Swatch);
298
-
299
- function Swatch() {
300
- var _this;
301
-
302
- _classCallCheck(this, Swatch);
303
-
304
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
305
- args[_key] = arguments[_key];
306
- }
307
-
308
- _this = _super.call.apply(_super, [this].concat(args));
309
-
310
- _defineProperty(_assertThisInitialized(_this), "clickable", null);
311
-
312
- _defineProperty(_assertThisInitialized(_this), "handleMount", function (c) {
313
- _this.clickable = c;
314
- });
315
-
316
- return _this;
272
+ var Swatch = /*#__PURE__*/external_react_default.a.forwardRef(function (_ref, ref) {
273
+ var append = _ref.append,
274
+ _ref$error = _ref.error,
275
+ error = _ref$error === void 0 ? false : _ref$error,
276
+ _onClick = _ref.onClick,
277
+ prepend = _ref.prepend,
278
+ value = _ref.value,
279
+ noBorder = _ref.noBorder,
280
+ showSelected = _ref.showSelected,
281
+ otherProps = _objectWithoutProperties(_ref, ["append", "error", "onClick", "prepend", "value", "noBorder", "showSelected"]);
282
+
283
+ var screenReaderValue = value === null || value === undefined ? Object(i18n_["_"])('No color') : value; // Only valid hexadecimal strings, 'transparent' and `null` are allowed for background colors
284
+ // Invalid values are converted to `undefined`
285
+
286
+ var $value = value;
287
+
288
+ if (!(typeof $value === 'string' && (Object(color_["isValidHexColor"])($value) || $value === 'transparent')) && $value !== null && $value !== undefined) {
289
+ $value = undefined;
317
290
  }
318
291
 
319
- _createClass(Swatch, [{
320
- key: "focus",
321
- value: function focus() {
322
- var _this$clickable;
323
-
324
- (_this$clickable = this.clickable) === null || _this$clickable === void 0 ? void 0 : _this$clickable.focus();
325
- }
326
- }, {
327
- key: "render",
328
- value: function render() {
329
- var _this$props = this.props,
330
- append = _this$props.append,
331
- error = _this$props.error,
332
- onClick = _this$props.onClick,
333
- prepend = _this$props.prepend,
334
- value = _this$props.value,
335
- noBorder = _this$props.noBorder,
336
- showSelected = _this$props.showSelected,
337
- otherProps = _objectWithoutProperties(_this$props, ["append", "error", "onClick", "prepend", "value", "noBorder", "showSelected"]);
338
-
339
- var screenReaderValue = value === null || value === undefined ? Object(i18n_["_"])('No color') : value;
340
-
341
- function handleClick(e) {
342
- onClick === null || onClick === void 0 ? void 0 : onClick(e, {
343
- value: value
344
- });
345
- } // Only valid hexadecimal strings, 'transparent' and `null` are allowed for background colors
346
- // Invalid values are converted to `undefined`
347
-
348
-
349
- var $value = value;
350
-
351
- if (!(typeof $value === 'string' && (Object(color_["isValidHexColor"])($value) || $value === 'transparent')) && $value !== null && $value !== undefined) {
352
- $value = undefined;
353
- }
354
-
355
- return /*#__PURE__*/external_react_default.a.createElement(StyledClickable, _extends({
356
- onClick: handleClick,
357
- ref: this.handleMount,
358
- $value: $value,
359
- $append: append,
360
- $prepend: prepend,
361
- $hasError: error,
362
- $noBorder: noBorder,
363
- $showSelected: showSelected,
364
- "data-test": "swatch",
365
- "data-test-value": value
366
- }, otherProps), showSelected && /*#__PURE__*/external_react_default.a.createElement(Check["a" /* default */], {
367
- role: "presentation",
368
- style: {
369
- color: '#d3d3d3'
370
- },
371
- screenReaderText: Object(i18n_["_"])('Selected')
372
- }), /*#__PURE__*/external_react_default.a.createElement(ScreenReaderContent_default.a, null, screenReaderValue));
373
- }
374
- }]);
375
-
376
- return Swatch;
377
- }(external_react_["Component"]);
378
-
379
- _defineProperty(Swatch_Swatch, "propTypes", propTypes);
380
-
381
- _defineProperty(Swatch_Swatch, "defaultProps", defaultProps);
382
-
383
- _defineProperty(Swatch_Swatch, Dropdown_["legacyRefMode"], true);
384
-
385
- /* harmony default export */ var Color_Swatch = (Swatch_Swatch);
292
+ return /*#__PURE__*/external_react_default.a.createElement(StyledClickable, _extends({
293
+ onClick: function onClick(e) {
294
+ return _onClick === null || _onClick === void 0 ? void 0 : _onClick(e, {
295
+ value: value
296
+ });
297
+ },
298
+ ref: ref,
299
+ $value: $value,
300
+ $append: append,
301
+ $prepend: prepend,
302
+ $hasError: error,
303
+ $noBorder: noBorder,
304
+ $showSelected: showSelected,
305
+ "data-test": "swatch",
306
+ "data-test-value": value
307
+ }, otherProps), showSelected && /*#__PURE__*/external_react_default.a.createElement(Check["a" /* default */], {
308
+ role: "presentation",
309
+ style: {
310
+ color: '#d3d3d3'
311
+ },
312
+ screenReaderText: Object(i18n_["_"])('Selected')
313
+ }), /*#__PURE__*/external_react_default.a.createElement(ScreenReaderContent_default.a, null, screenReaderValue));
314
+ });
315
+ Swatch.propTypes = propTypes;
316
+ /* harmony default export */ var Color_Swatch = (Swatch);
386
317
  // CONCATENATED MODULE: ./src/Color/ColorStyles.ts
387
318
 
388
319
 
389
320
 
390
321
 
322
+
391
323
  var StyledColor = external_styled_components_default.a.div.withConfig({
392
324
  displayName: "ColorStyles__StyledColor",
393
325
  componentId: "jxrost-0"
@@ -444,20 +376,27 @@ var StyledSystemColorPickerWrapper = external_styled_components_default.a.div.wi
444
376
  var StyledSystemColorPicker = external_styled_components_default.a.input.withConfig({
445
377
  displayName: "ColorStyles__StyledSystemColorPicker",
446
378
  componentId: "jxrost-7"
447
- })(["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);
448
380
  var StyledInput = external_styled_components_default.a.div.withConfig({
449
381
  displayName: "ColorStyles__StyledInput",
450
382
  componentId: "jxrost-8"
451
383
  })(["", ";"], Object(themes_["pick"])({
452
384
  enterprise: Object(external_styled_components_["css"])(["display:flex;width:100%;"]),
453
- prisma: Object(external_styled_components_["css"])(["position:relative;width:", ";"], function (_ref2) {
385
+ prisma: Object(external_styled_components_["css"])(["position:relative;", ""], function (_ref2) {
454
386
  var $inDropdown = _ref2.$inDropdown;
455
- 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;"]);
456
388
  })
457
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
+ });
458
397
  var StyledToggleSwatch = external_styled_components_default()(Color_Swatch).withConfig({
459
398
  displayName: "ColorStyles__StyledToggleSwatch",
460
- componentId: "jxrost-9"
399
+ componentId: "jxrost-10"
461
400
  })(["", ""], Object(themes_["pick"])({
462
401
  prisma: {
463
402
  comfortable: Object(external_styled_components_["css"])(["width:40px;height:40px;"]),
@@ -470,7 +409,7 @@ var StyledToggleSwatch = external_styled_components_default()(Color_Swatch).with
470
409
  }));
471
410
 
472
411
  // CONCATENATED MODULE: ./src/Color/Color.tsx
473
- function Color_typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { Color_typeof = function _typeof(obj) { return typeof obj; }; } else { Color_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return Color_typeof(obj); }
412
+ 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); }
474
413
 
475
414
  function Color_extends() { Color_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 Color_extends.apply(this, arguments); }
476
415
 
@@ -490,27 +429,27 @@ function Color_objectWithoutProperties(source, excluded) { if (source == null) r
490
429
 
491
430
  function Color_objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
492
431
 
493
- function Color_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
432
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
494
433
 
495
- function Color_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
434
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
496
435
 
497
- function Color_createClass(Constructor, protoProps, staticProps) { if (protoProps) Color_defineProperties(Constructor.prototype, protoProps); if (staticProps) Color_defineProperties(Constructor, staticProps); return Constructor; }
436
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
498
437
 
499
- function Color_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) Color_setPrototypeOf(subClass, superClass); }
438
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
500
439
 
501
- function Color_setPrototypeOf(o, p) { Color_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return Color_setPrototypeOf(o, p); }
440
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
502
441
 
503
- function Color_createSuper(Derived) { var hasNativeReflectConstruct = Color_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = Color_getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = Color_getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return Color_possibleConstructorReturn(this, result); }; }
442
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
504
443
 
505
- function Color_possibleConstructorReturn(self, call) { if (call && (Color_typeof(call) === "object" || typeof call === "function")) { return call; } return Color_assertThisInitialized(self); }
444
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
506
445
 
507
- function Color_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
446
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
508
447
 
509
- function Color_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
448
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
510
449
 
511
- function Color_getPrototypeOf(o) { Color_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return Color_getPrototypeOf(o); }
450
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
512
451
 
513
- function Color_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; }
452
+ 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; }
514
453
 
515
454
 
516
455
 
@@ -527,7 +466,23 @@ function Color_defineProperty(obj, key, value) { if (key in obj) { Object.define
527
466
 
528
467
 
529
468
  // The default palette in Prisma theme.
530
- 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.
531
486
 
532
487
  var toolPalette = ['#ffffff', '#000000', null];
533
488
  var Color_propTypes = {
@@ -548,12 +503,12 @@ var Color_propTypes = {
548
503
  splunkTheme: external_prop_types_default.a.object,
549
504
  value: external_prop_types_default.a.string
550
505
  };
551
- var Color_defaultProps = {
506
+ var defaultProps = {
552
507
  append: false,
553
508
  disabled: false,
554
509
  error: false,
555
510
  hideInput: false,
556
- palette: defaultPalette,
511
+ palette: generatePalette(defaultPalette),
557
512
  prepend: false
558
513
  };
559
514
 
@@ -571,11 +526,11 @@ var Color_isValidHEX = function isValidHEX(value) {
571
526
 
572
527
 
573
528
  var Color_Color = /*#__PURE__*/function (_Component) {
574
- Color_inherits(Color, _Component);
529
+ _inherits(Color, _Component);
575
530
 
576
- var _super = Color_createSuper(Color);
531
+ var _super = _createSuper(Color);
577
532
 
578
- Color_createClass(Color, null, [{
533
+ _createClass(Color, null, [{
579
534
  key: "hasNull",
580
535
  // @docs-props-type ColorPropsBase
581
536
  value: function hasNull(palette) {
@@ -595,19 +550,19 @@ var Color_Color = /*#__PURE__*/function (_Component) {
595
550
  function Color(props) {
596
551
  var _this;
597
552
 
598
- Color_classCallCheck(this, Color);
553
+ _classCallCheck(this, Color);
599
554
 
600
555
  _this = _super.call(this, props);
601
556
 
602
- Color_defineProperty(Color_assertThisInitialized(_this), "focusSwatch", void 0);
557
+ _defineProperty(_assertThisInitialized(_this), "focusSwatch", void 0);
603
558
 
604
- Color_defineProperty(Color_assertThisInitialized(_this), "focusExpandButton", void 0);
559
+ _defineProperty(_assertThisInitialized(_this), "focusExpandButton", void 0);
605
560
 
606
- Color_defineProperty(Color_assertThisInitialized(_this), "controlledExternally", void 0);
561
+ _defineProperty(_assertThisInitialized(_this), "controlledExternally", void 0);
607
562
 
608
- Color_defineProperty(Color_assertThisInitialized(_this), "dropdown", null);
563
+ _defineProperty(_assertThisInitialized(_this), "dropdown", null);
609
564
 
610
- Color_defineProperty(Color_assertThisInitialized(_this), "handleSwatchClick", function (e, _ref) {
565
+ _defineProperty(_assertThisInitialized(_this), "handleSwatchClick", function (e, _ref) {
611
566
  var value = _ref.value;
612
567
  e.preventDefault();
613
568
  var _this$props = _this.props,
@@ -640,7 +595,7 @@ var Color_Color = /*#__PURE__*/function (_Component) {
640
595
  _this.focus();
641
596
  });
642
597
 
643
- Color_defineProperty(Color_assertThisInitialized(_this), "handlePaletteExpand", function () {
598
+ _defineProperty(_assertThisInitialized(_this), "handlePaletteExpand", function () {
644
599
  _this.setState(function (state) {
645
600
  return {
646
601
  expanded: !state.expanded
@@ -648,7 +603,7 @@ var Color_Color = /*#__PURE__*/function (_Component) {
648
603
  });
649
604
  });
650
605
 
651
- Color_defineProperty(Color_assertThisInitialized(_this), "handleTextChange", function (e, _ref2) {
606
+ _defineProperty(_assertThisInitialized(_this), "handleTextChange", function (e, _ref2) {
652
607
  var value = _ref2.value;
653
608
 
654
609
  _this.setState({
@@ -656,7 +611,7 @@ var Color_Color = /*#__PURE__*/function (_Component) {
656
611
  });
657
612
  });
658
613
 
659
- Color_defineProperty(Color_assertThisInitialized(_this), "handleTextKeyDown", function (e) {
614
+ _defineProperty(_assertThisInitialized(_this), "handleTextKeyDown", function (e) {
660
615
  if (Object(keyboard_["keycode"])(e.nativeEvent) === 'enter') {
661
616
  e.preventDefault();
662
617
 
@@ -668,7 +623,7 @@ var Color_Color = /*#__PURE__*/function (_Component) {
668
623
  }
669
624
  });
670
625
 
671
- Color_defineProperty(Color_assertThisInitialized(_this), "handleButtonClick", function (e) {
626
+ _defineProperty(_assertThisInitialized(_this), "handleButtonClick", function (e) {
672
627
  e.preventDefault();
673
628
 
674
629
  _this.handleRequestClose({
@@ -678,7 +633,7 @@ var Color_Color = /*#__PURE__*/function (_Component) {
678
633
  _this.focus();
679
634
  });
680
635
 
681
- Color_defineProperty(Color_assertThisInitialized(_this), "handleRequestClose", function (_ref3) {
636
+ _defineProperty(_assertThisInitialized(_this), "handleRequestClose", function (_ref3) {
682
637
  var reason = _ref3.reason;
683
638
  var displayValue = _this.state.displayValue;
684
639
  var value = _this.state.value;
@@ -696,17 +651,22 @@ var Color_Color = /*#__PURE__*/function (_Component) {
696
651
  displayValue: displayValue
697
652
  });
698
653
  } // If the user types in the hexadecimal number without # in front,
699
- // we are able to add # automatically.
654
+ // we add # automatically.
700
655
 
701
656
 
702
657
  if (displayValue !== 'N/A' && Object(external_lodash_["toLower"])(displayValue) !== 'transparent' && !Object(external_lodash_["startsWith"])(displayValue, '#')) {
703
658
  displayValue = "#".concat(displayValue);
704
659
 
705
660
  if (reason === 'escapeKey') {
706
- // @ts-expect-error - displayValue can actually be null here, but that's a bug
707
- _this.setState({
708
- displayValue: value
709
- });
661
+ if (value == null) {
662
+ _this.setState({
663
+ displayValue: 'N/A'
664
+ });
665
+ } else {
666
+ _this.setState({
667
+ displayValue: value
668
+ });
669
+ }
710
670
  } else {
711
671
  _this.setState({
712
672
  displayValue: displayValue
@@ -725,11 +685,11 @@ var Color_Color = /*#__PURE__*/function (_Component) {
725
685
  }
726
686
  });
727
687
 
728
- Color_defineProperty(Color_assertThisInitialized(_this), "handleRequestOpen", function () {
688
+ _defineProperty(_assertThisInitialized(_this), "handleRequestOpen", function () {
729
689
  var _this$props2 = _this.props,
730
690
  splunkTheme = _this$props2.splunkTheme,
731
691
  palette = _this$props2.palette;
732
- var isPrisma = splunkTheme.family === 'prisma';
692
+ var isPrisma = splunkTheme.isPrisma;
733
693
 
734
694
  var value = _this.getValue();
735
695
 
@@ -759,7 +719,7 @@ var Color_Color = /*#__PURE__*/function (_Component) {
759
719
  }
760
720
  });
761
721
 
762
- Color_defineProperty(Color_assertThisInitialized(_this), "handleSystemColorPickerChange", Object(external_lodash_["debounce"])(function (value) {
722
+ _defineProperty(_assertThisInitialized(_this), "handleSystemColorPickerChange", Object(external_lodash_["debounce"])(function (value) {
763
723
  var prevValue = _this.getValue();
764
724
 
765
725
  var hasColorChanged = value !== prevValue;
@@ -792,7 +752,7 @@ var Color_Color = /*#__PURE__*/function (_Component) {
792
752
  _this.focusExpandButton = /*#__PURE__*/external_react_default.a.createRef();
793
753
  _this.controlledExternally = Object(external_lodash_["has"])(props, 'value'); // value can be hexadecimal color, 'transparent' or null
794
754
 
795
- 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);
796
756
 
797
757
  if (_value !== null) {
798
758
  _value = Object(external_lodash_["toLower"])(_value);
@@ -813,7 +773,7 @@ var Color_Color = /*#__PURE__*/function (_Component) {
813
773
  return _this;
814
774
  }
815
775
 
816
- Color_createClass(Color, [{
776
+ _createClass(Color, [{
817
777
  key: "componentDidUpdate",
818
778
  value: function componentDidUpdate(prevProps) {
819
779
  if (false) {}
@@ -823,7 +783,7 @@ var Color_Color = /*#__PURE__*/function (_Component) {
823
783
  }, {
824
784
  key: "showNull",
825
785
  value: function showNull() {
826
- var isPrisma = this.props.splunkTheme.family === 'prisma';
786
+ var isPrisma = this.props.splunkTheme.isPrisma;
827
787
  return Color.hasNull(this.props.palette) || isPrisma;
828
788
  }
829
789
  /**
@@ -855,7 +815,7 @@ var Color_Color = /*#__PURE__*/function (_Component) {
855
815
  key: "submitValue",
856
816
  value: function submitValue(displayValue) {
857
817
  var splunkTheme = this.props.splunkTheme;
858
- var isPrisma = (splunkTheme === null || splunkTheme === void 0 ? void 0 : splunkTheme.family) === 'prisma';
818
+ var isPrisma = splunkTheme.isPrisma;
859
819
 
860
820
  if (displayValue && (Color_isValidHEX(displayValue) || Color.hasTransparent(this.props.palette) && displayValue === 'transparent' || (Color.hasNull(this.props.palette) || isPrisma) && displayValue === 'N/A')) {
861
821
  var formattedDisplayValue = Object(color_["expandShortHandHex"])(displayValue);
@@ -908,7 +868,7 @@ var Color_Color = /*#__PURE__*/function (_Component) {
908
868
  inDropdown = _ref4.inDropdown;
909
869
  var splunkTheme = this.props.splunkTheme;
910
870
  var displayValue = this.state.displayValue;
911
- var isPrisma = (splunkTheme === null || splunkTheme === void 0 ? void 0 : splunkTheme.family) === 'prisma';
871
+ var isPrisma = splunkTheme.isPrisma;
912
872
  var showTransparent = Color.hasTransparent(this.props.palette) && Object(external_lodash_["toLower"])(displayValue) === 'transparent';
913
873
  var showNullSwatch = this.showNull() && Object(external_lodash_["toLower"])(displayValue) === 'n/a';
914
874
  var inputSwatchValue = displayValue;
@@ -921,7 +881,8 @@ var Color_Color = /*#__PURE__*/function (_Component) {
921
881
  inputSwatchValue = showNullSwatch ? null : inputSwatchValue;
922
882
  return /*#__PURE__*/external_react_default.a.createElement(StyledInput, {
923
883
  $inDropdown: inDropdown
924
- }, /*#__PURE__*/external_react_default.a.createElement(Text_default.a, {
884
+ }, /*#__PURE__*/external_react_default.a.createElement(StyledInputText, {
885
+ $inDropdown: inDropdown,
925
886
  append: textAppend,
926
887
  autoCapitalize: "off",
927
888
  autoComplete: "off",
@@ -932,15 +893,16 @@ var Color_Color = /*#__PURE__*/function (_Component) {
932
893
  inline: textInline,
933
894
  onKeyDown: this.handleTextKeyDown,
934
895
  onChange: this.handleTextChange,
935
- value: displayValue,
936
- style: inDropdown ? {
937
- fontSize: 12
938
- } : {}
896
+ value: displayValue
939
897
  }), !isPrisma && /*#__PURE__*/external_react_default.a.createElement(Color_Swatch, {
940
898
  "data-test": "textbox-swatch",
941
899
  onClick: this.handleButtonClick,
942
900
  value: inputSwatchValue,
943
- tabIndex: -1
901
+ tabIndex: -1,
902
+ style: {
903
+ marginLeft: '1px'
904
+ } // Used to cancel out the `margin-right: -1px` of Text append style
905
+
944
906
  }));
945
907
  }
946
908
  }, {
@@ -951,8 +913,8 @@ var Color_Color = /*#__PURE__*/function (_Component) {
951
913
  var _this$props5 = this.props,
952
914
  palette = _this$props5.palette,
953
915
  splunkTheme = _this$props5.splunkTheme;
954
- var isPrisma = (splunkTheme === null || splunkTheme === void 0 ? void 0 : splunkTheme.family) === 'prisma';
955
- var isLightTheme = (splunkTheme === null || splunkTheme === void 0 ? void 0 : splunkTheme.colorScheme) === 'light';
916
+ var isPrisma = splunkTheme.isPrisma,
917
+ isLight = splunkTheme.isLight;
956
918
  var currentValue = this.getValue();
957
919
  var currentPalette = isPrisma && this.state.expanded ? palette : Object(external_lodash_["slice"])(palette, 0, 15);
958
920
  var colorInPalette = Object(external_lodash_["includes"])(currentPalette.map(function (c) {
@@ -1004,7 +966,7 @@ var Color_Color = /*#__PURE__*/function (_Component) {
1004
966
  value: null,
1005
967
  ref: currentValue === null ? this.focusSwatch : null,
1006
968
  onClick: this.handleSwatchClick,
1007
- noBorder: !isLightTheme,
969
+ noBorder: !isLight,
1008
970
  showSelected: currentValue === null
1009
971
  }), /*#__PURE__*/external_react_default.a.createElement(Color_Swatch, {
1010
972
  style: {
@@ -1013,7 +975,7 @@ var Color_Color = /*#__PURE__*/function (_Component) {
1013
975
  value: "#ffffff",
1014
976
  ref: currentValue === '#ffffff' ? this.focusSwatch : null,
1015
977
  onClick: this.handleSwatchClick,
1016
- noBorder: !isLightTheme,
978
+ noBorder: !isLight,
1017
979
  showSelected: currentValue === '#ffffff'
1018
980
  }), /*#__PURE__*/external_react_default.a.createElement(Color_Swatch, {
1019
981
  style: {
@@ -1025,8 +987,10 @@ var Color_Color = /*#__PURE__*/function (_Component) {
1025
987
  noBorder: true,
1026
988
  showSelected: currentValue === '#000000'
1027
989
  }), /*#__PURE__*/external_react_default.a.createElement(StyledSystemColorPickerWrapper, null, /*#__PURE__*/external_react_default.a.createElement(StyledSystemColorPicker, {
1028
- type: "color",
1029
- 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,
1030
994
  onChange: function onChange(e) {
1031
995
  return _this2.handleSystemColorPickerChange(e.target.value);
1032
996
  },
@@ -1073,7 +1037,7 @@ var Color_Color = /*#__PURE__*/function (_Component) {
1073
1037
  splunkTheme = _this$props6.splunkTheme,
1074
1038
  otherProps = Color_objectWithoutProperties(_this$props6, ["append", "disabled", "describedBy", "elementRef", "error", "hideInput", "labelledBy", "name", "prepend", "splunkTheme"]);
1075
1039
 
1076
- var isPrisma = (splunkTheme === null || splunkTheme === void 0 ? void 0 : splunkTheme.family) === 'prisma';
1040
+ var isPrisma = splunkTheme.isPrisma;
1077
1041
  var value = this.getValue();
1078
1042
  var displayValue = this.state.displayValue;
1079
1043
  var toggle = /*#__PURE__*/external_react_default.a.createElement(StyledToggleSwatch, Color_extends({
@@ -1120,9 +1084,9 @@ var Color_Color = /*#__PURE__*/function (_Component) {
1120
1084
  return Color;
1121
1085
  }(external_react_["Component"]);
1122
1086
 
1123
- Color_defineProperty(Color_Color, "propTypes", Color_propTypes);
1087
+ _defineProperty(Color_Color, "propTypes", Color_propTypes);
1124
1088
 
1125
- Color_defineProperty(Color_Color, "defaultProps", Color_defaultProps);
1089
+ _defineProperty(Color_Color, "defaultProps", defaultProps);
1126
1090
 
1127
1091
  var ColorWithTheme = Object(themes_["withSplunkTheme"])(Color_Color);
1128
1092
  ColorWithTheme.propTypes = Color_Color.propTypes;
@@ -1135,14 +1099,14 @@ ColorWithTheme.propTypes = Color_Color.propTypes;
1135
1099
 
1136
1100
  /***/ }),
1137
1101
 
1138
- /***/ 14:
1102
+ /***/ 15:
1139
1103
  /***/ (function(module, exports) {
1140
1104
 
1141
1105
  module.exports = require("@splunk/react-ui/ScreenReaderContent");
1142
1106
 
1143
1107
  /***/ }),
1144
1108
 
1145
- /***/ 18:
1109
+ /***/ 19:
1146
1110
  /***/ (function(module, exports) {
1147
1111
 
1148
1112
  module.exports = require("@splunk/react-ui/Dropdown");
@@ -1156,7 +1120,7 @@ module.exports = require("react");
1156
1120
 
1157
1121
  /***/ }),
1158
1122
 
1159
- /***/ 26:
1123
+ /***/ 21:
1160
1124
  /***/ (function(module, exports) {
1161
1125
 
1162
1126
  module.exports = require("@splunk/react-ui/Text");
@@ -1187,18 +1151,25 @@ module.exports = require("lodash");
1187
1151
  /***/ 44:
1188
1152
  /***/ (function(module, exports) {
1189
1153
 
1154
+ module.exports = require("tinycolor2");
1155
+
1156
+ /***/ }),
1157
+
1158
+ /***/ 45:
1159
+ /***/ (function(module, exports) {
1160
+
1190
1161
  module.exports = require("@splunk/react-icons/Check");
1191
1162
 
1192
1163
  /***/ }),
1193
1164
 
1194
- /***/ 47:
1165
+ /***/ 48:
1195
1166
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1196
1167
 
1197
1168
  "use strict";
1198
1169
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Check; });
1199
1170
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
1200
1171
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1201
- /* 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);
1202
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__);
1203
1174
  /* harmony import */ var _ThemedIcon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
1204
1175
  /* harmony import */ var _SVG__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6);
@@ -1248,14 +1219,14 @@ module.exports = require("@splunk/ui-utils/i18n");
1248
1219
 
1249
1220
  /***/ }),
1250
1221
 
1251
- /***/ 56:
1222
+ /***/ 59:
1252
1223
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1253
1224
 
1254
1225
  "use strict";
1255
1226
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ChevronDown; });
1256
1227
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
1257
1228
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1258
- /* 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);
1259
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__);
1260
1231
  /* harmony import */ var _ThemedIcon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
1261
1232
  /* harmony import */ var _SVG__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6);
@@ -1298,13 +1269,6 @@ function ChevronDown(props) {
1298
1269
 
1299
1270
  /***/ }),
1300
1271
 
1301
- /***/ 57:
1302
- /***/ (function(module, exports) {
1303
-
1304
- module.exports = require("@splunk/react-icons/ChevronDown");
1305
-
1306
- /***/ }),
1307
-
1308
1272
  /***/ 6:
1309
1273
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1310
1274
 
@@ -1330,6 +1294,13 @@ function SVG(props) {
1330
1294
 
1331
1295
  /***/ }),
1332
1296
 
1297
+ /***/ 60:
1298
+ /***/ (function(module, exports) {
1299
+
1300
+ module.exports = require("@splunk/react-icons/ChevronDown");
1301
+
1302
+ /***/ }),
1303
+
1333
1304
  /***/ 7:
1334
1305
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1335
1306
 
@@ -1448,7 +1419,7 @@ Icon.defaultProps = defaultProps;
1448
1419
 
1449
1420
  /***/ }),
1450
1421
 
1451
- /***/ 74:
1422
+ /***/ 76:
1452
1423
  /***/ (function(module, exports) {
1453
1424
 
1454
1425
  module.exports = require("@splunk/themes/SplunkThemeProvider");