@splunk/react-ui 4.17.1 → 4.18.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 (76) hide show
  1. package/Accordion.js +2 -2
  2. package/AnimationToggle.js +5 -5
  3. package/Button.js +2 -2
  4. package/ButtonSimple.js +2 -2
  5. package/CHANGELOG.md +18 -2
  6. package/Calendar.js +2 -2
  7. package/Code.js +4 -4
  8. package/Color.js +202 -175
  9. package/ColumnLayout.js +6 -6
  10. package/Concertina.js +6 -6
  11. package/DefinitionList.js +2 -2
  12. package/Dropdown.js +4 -4
  13. package/DualListbox.js +9 -6
  14. package/File.js +7 -7
  15. package/FormRows.js +4 -4
  16. package/Heading.js +8 -4
  17. package/JSONTree.js +30 -28
  18. package/Layer.js +10 -10
  19. package/Link.js +2 -2
  20. package/List.js +7 -4
  21. package/MIGRATION.mdx +295 -0
  22. package/Markdown.js +12 -7
  23. package/Menu.js +15 -15
  24. package/Message.js +19 -19
  25. package/MessageBar.js +17 -17
  26. package/Modal.js +7 -7
  27. package/Multiselect.js +11 -11
  28. package/Number.js +3 -2
  29. package/Paginator.js +2 -2
  30. package/Popover.js +15 -11
  31. package/RadioBar.js +2 -2
  32. package/RadioList.js +2 -2
  33. package/Resize.js +2 -2
  34. package/Scroll.js +2 -2
  35. package/Select.js +6 -6
  36. package/SidePanel.js +2 -2
  37. package/Slider.js +5 -5
  38. package/StepBar.js +2 -2
  39. package/Switch.js +2 -2
  40. package/TabBar.js +66 -49
  41. package/Table.js +10 -10
  42. package/Text.js +5 -5
  43. package/TextArea.js +4 -4
  44. package/Typography.js +2 -2
  45. package/package.json +6 -11
  46. package/stubs-dependencies.d.ts +0 -9
  47. package/types/src/Button/Button.d.ts +5 -3
  48. package/types/src/Clickable/Clickable.d.ts +2 -1
  49. package/types/src/CollapsiblePanel/CollapsiblePanel.d.ts +1 -0
  50. package/types/src/Color/Color.d.ts +6 -6
  51. package/types/src/Color/Palette.d.ts +46 -0
  52. package/types/src/Concertina/Panel.d.ts +1 -0
  53. package/types/src/FormRows/Row.d.ts +1 -0
  54. package/types/src/Heading/Heading.d.ts +7 -2
  55. package/types/src/JSONTree/JSONTree.d.ts +2 -1
  56. package/types/src/Layer/Layer.d.ts +2 -0
  57. package/types/src/List/List.d.ts +9 -1
  58. package/types/src/List/docs/examples/CustomizedList.d.ts +2 -0
  59. package/types/src/List/docs/examples/OrderedList.d.ts +2 -0
  60. package/types/src/List/docs/examples/UnorderedList.d.ts +2 -0
  61. package/types/src/Markdown/Markdown.d.ts +1 -0
  62. package/types/src/Markdown/renderers/MarkdownList.d.ts +2 -0
  63. package/types/src/Number/Number.d.ts +9 -4
  64. package/types/src/Popover/Popover.d.ts +2 -0
  65. package/types/src/TabBar/Tab.d.ts +2 -0
  66. package/types/src/Table/Head.d.ts +1 -0
  67. package/types/src/Table/HeadCell.d.ts +1 -0
  68. package/types/src/Table/HeadDropdownCell.d.ts +1 -0
  69. package/types/src/Table/Table.d.ts +3 -1
  70. package/types/src/Text/Text.d.ts +3 -1
  71. package/types/src/TextArea/TextArea.d.ts +2 -0
  72. package/MIGRATION.md +0 -49
  73. package/types/src/List/docs/examples/Decimal.d.ts +0 -2
  74. package/types/src/List/docs/examples/Disc.d.ts +0 -2
  75. package/types/src/List/docs/examples/LowerAlpha.d.ts +0 -2
  76. package/types/src/List/docs/examples/UpperAlpha.d.ts +0 -2
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 = 192);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 176);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -108,6 +108,13 @@ module.exports = require("lodash/has");
108
108
 
109
109
  /***/ }),
110
110
 
111
+ /***/ 105:
112
+ /***/ (function(module, exports) {
113
+
114
+ module.exports = require("lodash/slice");
115
+
116
+ /***/ }),
117
+
111
118
  /***/ 115:
112
119
  /***/ (function(module, exports) {
113
120
 
@@ -143,14 +150,14 @@ module.exports = require("@splunk/react-ui/ScreenReaderContent");
143
150
 
144
151
  /***/ }),
145
152
 
146
- /***/ 16:
153
+ /***/ 15:
147
154
  /***/ (function(module, exports) {
148
155
 
149
156
  module.exports = require("lodash/includes");
150
157
 
151
158
  /***/ }),
152
159
 
153
- /***/ 192:
160
+ /***/ 176:
154
161
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
155
162
 
156
163
  "use strict";
@@ -179,7 +186,7 @@ var has_ = __webpack_require__(10);
179
186
  var has_default = /*#__PURE__*/__webpack_require__.n(has_);
180
187
 
181
188
  // EXTERNAL MODULE: external "lodash/includes"
182
- var includes_ = __webpack_require__(16);
189
+ var includes_ = __webpack_require__(15);
183
190
  var includes_default = /*#__PURE__*/__webpack_require__.n(includes_);
184
191
 
185
192
  // EXTERNAL MODULE: external "lodash/keys"
@@ -191,7 +198,7 @@ var omit_ = __webpack_require__(5);
191
198
  var omit_default = /*#__PURE__*/__webpack_require__.n(omit_);
192
199
 
193
200
  // EXTERNAL MODULE: external "lodash/slice"
194
- var slice_ = __webpack_require__(80);
201
+ var slice_ = __webpack_require__(105);
195
202
  var slice_default = /*#__PURE__*/__webpack_require__.n(slice_);
196
203
 
197
204
  // EXTERNAL MODULE: external "lodash/startsWith"
@@ -210,10 +217,6 @@ var memoize_default = /*#__PURE__*/__webpack_require__.n(memoize_);
210
217
  var external_tinycolor2_ = __webpack_require__(67);
211
218
  var external_tinycolor2_default = /*#__PURE__*/__webpack_require__.n(external_tinycolor2_);
212
219
 
213
- // EXTERNAL MODULE: external "@splunk/react-icons/ChevronDown"
214
- var ChevronDown_ = __webpack_require__(126);
215
- var ChevronDown_default = /*#__PURE__*/__webpack_require__.n(ChevronDown_);
216
-
217
220
  // EXTERNAL MODULE: external "@splunk/react-ui/Dropdown"
218
221
  var Dropdown_ = __webpack_require__(22);
219
222
  var Dropdown_default = /*#__PURE__*/__webpack_require__.n(Dropdown_);
@@ -234,10 +237,6 @@ var keyboard_ = __webpack_require__(7);
234
237
  var external_styled_components_ = __webpack_require__(3);
235
238
  var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_);
236
239
 
237
- // EXTERNAL MODULE: external "@splunk/react-ui/Clickable"
238
- var Clickable_ = __webpack_require__(12);
239
- var Clickable_default = /*#__PURE__*/__webpack_require__.n(Clickable_);
240
-
241
240
  // EXTERNAL MODULE: external "@splunk/react-ui/Text"
242
241
  var Text_ = __webpack_require__(30);
243
242
  var Text_default = /*#__PURE__*/__webpack_require__.n(Text_);
@@ -247,9 +246,13 @@ var ScreenReaderContent_ = __webpack_require__(14);
247
246
  var ScreenReaderContent_default = /*#__PURE__*/__webpack_require__.n(ScreenReaderContent_);
248
247
 
249
248
  // EXTERNAL MODULE: external "@splunk/react-icons/Checkmark"
250
- var Checkmark_ = __webpack_require__(86);
249
+ var Checkmark_ = __webpack_require__(75);
251
250
  var Checkmark_default = /*#__PURE__*/__webpack_require__.n(Checkmark_);
252
251
 
252
+ // EXTERNAL MODULE: external "@splunk/react-ui/Clickable"
253
+ var Clickable_ = __webpack_require__(12);
254
+ var Clickable_default = /*#__PURE__*/__webpack_require__.n(Clickable_);
255
+
253
256
  // CONCATENATED MODULE: ./src/Color/SwatchStyles.ts
254
257
 
255
258
 
@@ -393,14 +396,53 @@ Swatch.propTypes = propTypes;
393
396
 
394
397
 
395
398
 
396
-
397
399
  var StyledColor = external_styled_components_default.a.div.withConfig({
398
400
  displayName: "ColorStyles__StyledColor",
399
401
  componentId: "jxrost-0"
400
402
  })(["", ";flex-direction:row;"], themes_["mixins"].reset('flex'));
401
- var StyledPalette = external_styled_components_default.a.div.withConfig({
402
- displayName: "ColorStyles__StyledPalette",
403
+ var StyledInput = external_styled_components_default.a.div.withConfig({
404
+ displayName: "ColorStyles__StyledInput",
403
405
  componentId: "jxrost-1"
406
+ })(["", ";"], Object(themes_["pick"])({
407
+ enterprise: Object(external_styled_components_["css"])(["display:flex;width:100%;"]),
408
+ prisma: Object(external_styled_components_["css"])(["position:relative;", ""], function (_ref) {
409
+ var $inDropdown = _ref.$inDropdown;
410
+ return $inDropdown ? Object(external_styled_components_["css"])(["width:80px;"]) : Object(external_styled_components_["css"])(["flex:0 1 auto;min-width:0;"]);
411
+ })
412
+ }));
413
+ var StyledInputText = external_styled_components_default()(Text_default.a).withConfig({
414
+ displayName: "ColorStyles__StyledInputText",
415
+ componentId: "jxrost-2"
416
+ })(["", ""], function (_ref2) {
417
+ var $inDropdown = _ref2.$inDropdown;
418
+ return $inDropdown && Object(external_styled_components_["css"])(["font-size:12px;"]);
419
+ });
420
+ var StyledToggleSwatch = external_styled_components_default()(Color_Swatch).withConfig({
421
+ displayName: "ColorStyles__StyledToggleSwatch",
422
+ componentId: "jxrost-3"
423
+ })(["", ""], Object(themes_["pick"])({
424
+ prisma: {
425
+ comfortable: Object(external_styled_components_["css"])(["width:40px;height:40px;"]),
426
+ compact: Object(external_styled_components_["css"])(["width:32px;height:32px;"])
427
+ },
428
+ enterprise: {
429
+ comfortable: Object(external_styled_components_["css"])(["width:32px;height:32px;"]),
430
+ compact: Object(external_styled_components_["css"])(["width:28px;height:28px;"])
431
+ }
432
+ }));
433
+
434
+ // EXTERNAL MODULE: external "@splunk/react-icons/ChevronDown"
435
+ var ChevronDown_ = __webpack_require__(126);
436
+ var ChevronDown_default = /*#__PURE__*/__webpack_require__.n(ChevronDown_);
437
+
438
+ // CONCATENATED MODULE: ./src/Color/PaletteStyles.ts
439
+
440
+
441
+
442
+
443
+ var StyledPalette = external_styled_components_default.a.div.withConfig({
444
+ displayName: "PaletteStyles__StyledPalette",
445
+ componentId: "qgv9v9-0"
404
446
  })(["width:", ";padding:", ";", ""], Object(themes_["pick"])({
405
447
  enterprise: '180px',
406
448
  prisma: '224px'
@@ -411,8 +453,8 @@ var StyledPalette = external_styled_components_default.a.div.withConfig({
411
453
  prisma: Object(external_styled_components_["css"])(["display:flex;flex-direction:column;border-radius:2px;"])
412
454
  }));
413
455
  var StyledSwatches = external_styled_components_default.a.ul.withConfig({
414
- displayName: "ColorStyles__StyledSwatches",
415
- componentId: "jxrost-2"
456
+ displayName: "PaletteStyles__StyledSwatches",
457
+ componentId: "qgv9v9-1"
416
458
  })(["", ";margin-bottom:", ";margin-right:", ";", ""], themes_["mixins"].reset('block'), Object(themes_["pick"])({
417
459
  enterprise: '6px'
418
460
  }), Object(themes_["pick"])({
@@ -421,8 +463,8 @@ var StyledSwatches = external_styled_components_default.a.ul.withConfig({
421
463
  prisma: Object(external_styled_components_["css"])(["position:relative;"])
422
464
  }));
423
465
  var StyledSwatch = external_styled_components_default.a.li.withConfig({
424
- displayName: "ColorStyles__StyledSwatch",
425
- componentId: "jxrost-3"
466
+ displayName: "PaletteStyles__StyledSwatch",
467
+ componentId: "qgv9v9-2"
426
468
  })(["", ";margin-right:", ";margin-bottom:", ";", ""], themes_["mixins"].reset('inline-block'), Object(themes_["pick"])({
427
469
  enterprise: themes_["variables"].spacingQuarter,
428
470
  prisma: '4px'
@@ -433,55 +475,126 @@ var StyledSwatch = external_styled_components_default.a.li.withConfig({
433
475
  prisma: Object(external_styled_components_["css"])(["vertical-align:top;&:nth-child(8n){margin-right:0;}"])
434
476
  }));
435
477
  var StyledToolBarPrisma = external_styled_components_default.a.div.withConfig({
436
- displayName: "ColorStyles__StyledToolBarPrisma",
437
- componentId: "jxrost-4"
438
- })(["position:relative;display:flex;align-items:center;padding:0;margin-top:12px;"]);
478
+ displayName: "PaletteStyles__StyledToolBarPrisma",
479
+ componentId: "qgv9v9-3"
480
+ })(["position:relative;display:flex;align-items:center;padding:0;margin-top:12px;gap:4px;"]);
439
481
  var StyledExpandButton = external_styled_components_default()(Clickable_default.a).withConfig({
440
- displayName: "ColorStyles__StyledExpandButton",
441
- componentId: "jxrost-5"
482
+ displayName: "PaletteStyles__StyledExpandButton",
483
+ componentId: "qgv9v9-4"
442
484
  })(["position:absolute;bottom:4px;right:4px;padding:2px 4px;border-radius:2px;&:focus{box-shadow:", ";}", ""], themes_["variables"].focusShadow, function (_ref) {
443
485
  var $expanded = _ref.$expanded;
444
486
  return $expanded && Object(external_styled_components_["css"])(["transform:rotate(180deg);"]);
445
487
  });
446
488
  var StyledSystemColorPickerWrapper = external_styled_components_default.a.div.withConfig({
447
- displayName: "ColorStyles__StyledSystemColorPickerWrapper",
448
- componentId: "jxrost-6"
489
+ displayName: "PaletteStyles__StyledSystemColorPickerWrapper",
490
+ componentId: "qgv9v9-5"
449
491
  })(["position:relative;"]);
450
492
  var StyledSystemColorPicker = external_styled_components_default.a.input.withConfig({
451
- displayName: "ColorStyles__StyledSystemColorPicker",
452
- componentId: "jxrost-7"
493
+ displayName: "PaletteStyles__StyledSystemColorPicker",
494
+ componentId: "qgv9v9-6"
453
495
  })(["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);
454
- var StyledInput = external_styled_components_default.a.div.withConfig({
455
- displayName: "ColorStyles__StyledInput",
456
- componentId: "jxrost-8"
457
- })(["", ";"], Object(themes_["pick"])({
458
- enterprise: Object(external_styled_components_["css"])(["display:flex;width:100%;"]),
459
- prisma: Object(external_styled_components_["css"])(["position:relative;", ""], function (_ref2) {
460
- var $inDropdown = _ref2.$inDropdown;
461
- return $inDropdown ? Object(external_styled_components_["css"])(["width:80px;"]) : Object(external_styled_components_["css"])(["flex:0 1 auto;min-width:0;"]);
462
- })
463
- }));
464
- var StyledInputText = external_styled_components_default()(Text_default.a).withConfig({
465
- displayName: "ColorStyles__StyledInputText",
466
- componentId: "jxrost-9"
467
- })(["", ""], function (_ref3) {
468
- var $inDropdown = _ref3.$inDropdown;
469
- return $inDropdown && Object(external_styled_components_["css"])(["font-size:12px;"]);
470
- });
471
- var StyledToggleSwatch = external_styled_components_default()(Color_Swatch).withConfig({
472
- displayName: "ColorStyles__StyledToggleSwatch",
473
- componentId: "jxrost-10"
474
- })(["", ""], Object(themes_["pick"])({
475
- prisma: {
476
- comfortable: Object(external_styled_components_["css"])(["width:40px;height:40px;"]),
477
- compact: Object(external_styled_components_["css"])(["width:32px;height:32px;"])
478
- },
479
- enterprise: {
480
- comfortable: Object(external_styled_components_["css"])(["width:32px;height:32px;"]),
481
- compact: Object(external_styled_components_["css"])(["width:28px;height:28px;"])
496
+ var PaletteStyles_StyledCheck = external_styled_components_default()(Checkmark_default.a).withConfig({
497
+ displayName: "PaletteStyles__StyledCheck",
498
+ componentId: "qgv9v9-7"
499
+ })(["box-sizing:border-box;color:#d3d3d3;height:100%;width:100%;position:absolute;top:0;left:0;pointer-events:none;"]);
500
+
501
+ // CONCATENATED MODULE: ./src/Color/Palette.tsx
502
+
503
+
504
+
505
+
506
+
507
+
508
+
509
+
510
+
511
+
512
+ function Palette(_ref) {
513
+ var expanded = _ref.expanded,
514
+ palette = _ref.palette,
515
+ value = _ref.value,
516
+ swatchToFocusRef = _ref.swatchToFocusRef,
517
+ onSwatchClick = _ref.onSwatchClick,
518
+ expandButtonRef = _ref.expandButtonRef,
519
+ onPaletteExpand = _ref.onPaletteExpand,
520
+ onSystemColorPickerChange = _ref.onSystemColorPickerChange,
521
+ renderInput = _ref.renderInput;
522
+
523
+ var _useSplunkTheme = Object(themes_["useSplunkTheme"])(),
524
+ isPrisma = _useSplunkTheme.isPrisma,
525
+ isLight = _useSplunkTheme.isLight;
526
+
527
+ var isValueInPalette = includes_default()(palette.map(function (c) {
528
+ return c && toLower_default()(c);
529
+ }), value);
530
+ var swatches = palette.map(function (swatchValue, index) {
531
+ var formattedValue = swatchValue === null ? null : toLower_default()(swatchValue);
532
+ var selected = formattedValue === value;
533
+ var shouldFocus = !isValueInPalette && index === 0 || isValueInPalette && selected;
534
+ return /*#__PURE__*/external_react_default.a.createElement(StyledSwatch, {
535
+ key: formattedValue || 'null'
536
+ }, /*#__PURE__*/external_react_default.a.createElement(Color_Swatch, {
537
+ value: formattedValue,
538
+ ref: shouldFocus ? swatchToFocusRef : null,
539
+ onClick: onSwatchClick,
540
+ noBorder: isPrisma,
541
+ showSelected: isPrisma && selected
542
+ }));
543
+ });
544
+
545
+ if (isPrisma) {
546
+ var isCustomColor = !isValueInPalette && value !== '#ffffff' && value !== '#000000' && value !== null && value !== '';
547
+ var swatchEnd = swatches.length === 8 ? 7 : 15;
548
+ var swatchesDefaultDisplay = slice_default()(swatches, 0, swatchEnd);
549
+ var swatchesExpandDisplay = slice_default()(swatches, swatchEnd);
550
+ return /*#__PURE__*/external_react_default.a.createElement(StyledPalette, null, /*#__PURE__*/external_react_default.a.createElement("div", {
551
+ style: {
552
+ position: 'relative'
553
+ }
554
+ }, /*#__PURE__*/external_react_default.a.createElement(StyledSwatches, null, swatchesDefaultDisplay, expanded && swatchesExpandDisplay), expanded && /*#__PURE__*/external_react_default.a.createElement(StyledToolBarPrisma, {
555
+ "data-test": "tool-bar"
556
+ }, /*#__PURE__*/external_react_default.a.createElement(themes_["SplunkThemeProvider"], {
557
+ density: "compact"
558
+ }, renderInput && renderInput()), /*#__PURE__*/external_react_default.a.createElement(Color_Swatch, {
559
+ value: null,
560
+ ref: value === null ? swatchToFocusRef : null,
561
+ onClick: onSwatchClick,
562
+ noBorder: !isLight,
563
+ showSelected: value === null
564
+ }), /*#__PURE__*/external_react_default.a.createElement(Color_Swatch, {
565
+ value: "#ffffff",
566
+ ref: value === '#ffffff' ? swatchToFocusRef : null,
567
+ onClick: onSwatchClick,
568
+ noBorder: !isLight,
569
+ showSelected: value === '#ffffff'
570
+ }), /*#__PURE__*/external_react_default.a.createElement(Color_Swatch, {
571
+ value: "#000000",
572
+ ref: value === '#000000' ? swatchToFocusRef : null,
573
+ onClick: onSwatchClick,
574
+ noBorder: true,
575
+ showSelected: value === '#000000'
576
+ }), /*#__PURE__*/external_react_default.a.createElement(StyledSystemColorPickerWrapper, null, /*#__PURE__*/external_react_default.a.createElement(StyledSystemColorPicker, {
577
+ type: "color" // TODO: SUI-2806 Remove the warning with Prisma null example
578
+ // Warning only exists in Chrome: https://chromium.googlesource.com/chromium/src/+/011c27ced479c76cffd5093ce107082e4da657f3/third_party/blink/renderer/core/html/forms/color_input_type.cc#190
579
+ ,
580
+ value: value === null ? '' : value,
581
+ onChange: onSystemColorPickerChange,
582
+ ref: isCustomColor ? swatchToFocusRef : null
583
+ }), isCustomColor && /*#__PURE__*/external_react_default.a.createElement(PaletteStyles_StyledCheck, {
584
+ "aria-label": Object(i18n_["_"])('Selected'),
585
+ role: "presentation"
586
+ }))), /*#__PURE__*/external_react_default.a.createElement(StyledExpandButton, {
587
+ ref: expandButtonRef,
588
+ $expanded: expanded,
589
+ onClick: onPaletteExpand,
590
+ "data-test": "expand-button"
591
+ }, /*#__PURE__*/external_react_default.a.createElement(ChevronDown_default.a, null))));
482
592
  }
483
- }));
484
593
 
594
+ return /*#__PURE__*/external_react_default.a.createElement(StyledPalette, null, /*#__PURE__*/external_react_default.a.createElement(StyledSwatches, null, swatches), renderInput && renderInput());
595
+ }
596
+
597
+ /* harmony default export */ var Color_Palette = (Palette);
485
598
  // CONCATENATED MODULE: ./src/Color/Color.tsx
486
599
  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); }
487
600
 
@@ -543,7 +656,6 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
543
656
 
544
657
 
545
658
 
546
-
547
659
 
548
660
 
549
661
  // The default palette in Prisma theme.
@@ -1005,108 +1117,35 @@ var Color_Color = /*#__PURE__*/function (_Component) {
1005
1117
  var _this2 = this;
1006
1118
 
1007
1119
  var _this$props5 = this.props,
1008
- palette = _this$props5.palette,
1009
- splunkTheme = _this$props5.splunkTheme;
1010
- var isPrisma = splunkTheme.isPrisma,
1011
- isLight = splunkTheme.isLight;
1012
- var currentValue = this.getValue();
1013
- var currentPalette = isPrisma && this.state.expanded ? palette : slice_default()(palette, 0, 15);
1014
- var colorInPalette = includes_default()(currentPalette.map(function (c) {
1015
- return c && toLower_default()(c);
1016
- }), currentValue);
1017
- var swatches = palette.map(function (value, index) {
1018
- var formattedValue = value === null ? null : toLower_default()(value);
1019
- var selected = formattedValue === currentValue;
1020
- var shouldFocus = !colorInPalette && index === 0 || colorInPalette && selected;
1021
- return /*#__PURE__*/external_react_default.a.createElement(StyledSwatch, {
1022
- key: formattedValue || 'null'
1023
- }, /*#__PURE__*/external_react_default.a.createElement(Color_Swatch, {
1024
- value: formattedValue,
1025
- ref: shouldFocus ? _this2.focusSwatch : null,
1026
- onClick: _this2.handleSwatchClick,
1027
- noBorder: isPrisma,
1028
- showSelected: isPrisma && selected
1029
- }));
1030
- });
1031
-
1032
- if (isPrisma) {
1033
- var isCustomColor = !colorInPalette && currentValue !== '#ffffff' && currentValue !== '#000000' && currentValue !== null && currentValue !== '';
1034
- var swatchesDefaultDisplay = slice_default()(swatches, 0, 15);
1035
- var swatchesExpandDisplay = slice_default()(swatches, 15);
1036
-
1037
- if (swatches.length === 8) {
1038
- swatchesDefaultDisplay = slice_default()(swatches, 0, 7);
1039
- swatchesExpandDisplay = slice_default()(swatches, 7);
1120
+ splunkTheme = _this$props5.splunkTheme,
1121
+ palette = _this$props5.palette;
1122
+ var expanded = this.state.expanded;
1123
+ var isPrisma = splunkTheme.isPrisma;
1124
+ return /*#__PURE__*/external_react_default.a.createElement(Color_Palette, {
1125
+ palette: palette,
1126
+ value: this.getValue(),
1127
+ swatchToFocusRef: this.focusSwatch,
1128
+ renderInput: function renderInput() {
1129
+ return isPrisma ? _this2.renderInput({
1130
+ textAppend: false,
1131
+ textPrepend: false,
1132
+ textInline: true,
1133
+ inDropdown: true
1134
+ }) : _this2.renderInput({
1135
+ textAppend: true,
1136
+ textPrepend: true,
1137
+ textInline: true,
1138
+ inDropdown: false
1139
+ });
1140
+ },
1141
+ expandButtonRef: this.focusExpandButton,
1142
+ onSwatchClick: this.handleSwatchClick,
1143
+ expanded: expanded,
1144
+ onPaletteExpand: this.handlePaletteExpand,
1145
+ onSystemColorPickerChange: function onSystemColorPickerChange(e) {
1146
+ return _this2.handleSystemColorPickerChange(e.target.value);
1040
1147
  }
1041
-
1042
- return /*#__PURE__*/external_react_default.a.createElement("div", {
1043
- style: {
1044
- position: 'relative'
1045
- }
1046
- }, /*#__PURE__*/external_react_default.a.createElement(StyledSwatches, null, swatchesDefaultDisplay, this.state.expanded && swatchesExpandDisplay), this.state.expanded && /*#__PURE__*/external_react_default.a.createElement(StyledToolBarPrisma, {
1047
- "data-test": "tool-bar"
1048
- }, /*#__PURE__*/external_react_default.a.createElement(themes_["SplunkThemeProvider"], {
1049
- density: "compact"
1050
- }, this.renderInput({
1051
- textAppend: false,
1052
- textPrepend: false,
1053
- textInline: true,
1054
- inDropdown: true
1055
- })), /*#__PURE__*/external_react_default.a.createElement(Color_Swatch, {
1056
- style: {
1057
- marginRight: 4,
1058
- marginLeft: 4
1059
- },
1060
- value: null,
1061
- ref: currentValue === null ? this.focusSwatch : null,
1062
- onClick: this.handleSwatchClick,
1063
- noBorder: !isLight,
1064
- showSelected: currentValue === null
1065
- }), /*#__PURE__*/external_react_default.a.createElement(Color_Swatch, {
1066
- style: {
1067
- marginRight: 4
1068
- },
1069
- value: "#ffffff",
1070
- ref: currentValue === '#ffffff' ? this.focusSwatch : null,
1071
- onClick: this.handleSwatchClick,
1072
- noBorder: !isLight,
1073
- showSelected: currentValue === '#ffffff'
1074
- }), /*#__PURE__*/external_react_default.a.createElement(Color_Swatch, {
1075
- style: {
1076
- marginRight: 4
1077
- },
1078
- value: "#000000",
1079
- ref: currentValue === '#000000' ? this.focusSwatch : null,
1080
- onClick: this.handleSwatchClick,
1081
- noBorder: true,
1082
- showSelected: currentValue === '#000000'
1083
- }), /*#__PURE__*/external_react_default.a.createElement(StyledSystemColorPickerWrapper, null, /*#__PURE__*/external_react_default.a.createElement(StyledSystemColorPicker, {
1084
- type: "color" // TODO: SUI-2806 Remove the warning with Prisma null example
1085
- // Warning only exists in Chrome: https://chromium.googlesource.com/chromium/src/+/011c27ced479c76cffd5093ce107082e4da657f3/third_party/blink/renderer/core/html/forms/color_input_type.cc#190
1086
- ,
1087
- value: currentValue === null ? '' : currentValue,
1088
- onChange: function onChange(e) {
1089
- return _this2.handleSystemColorPickerChange(e.target.value);
1090
- },
1091
- ref: isCustomColor ? this.focusSwatch : null
1092
- }), isCustomColor && /*#__PURE__*/external_react_default.a.createElement(StyledCheck, {
1093
- "aria-label": Object(i18n_["_"])('Selected'),
1094
- role: "presentation",
1095
- style: {
1096
- position: 'absolute',
1097
- top: '0',
1098
- left: '0',
1099
- pointerEvents: 'none'
1100
- }
1101
- }))), /*#__PURE__*/external_react_default.a.createElement(StyledExpandButton, {
1102
- ref: this.focusExpandButton,
1103
- $expanded: this.state.expanded,
1104
- onClick: this.handlePaletteExpand,
1105
- "data-test": "expand-button"
1106
- }, /*#__PURE__*/external_react_default.a.createElement(ChevronDown_default.a, null)));
1107
- }
1108
-
1109
- return /*#__PURE__*/external_react_default.a.createElement(StyledSwatches, null, swatches);
1148
+ });
1110
1149
  }
1111
1150
  }, {
1112
1151
  key: "render",
@@ -1156,12 +1195,7 @@ var Color_Color = /*#__PURE__*/function (_Component) {
1156
1195
  takeFocus: false // Disable the default focus behavior in Dropdown.
1157
1196
  ,
1158
1197
  toggle: toggle
1159
- }, /*#__PURE__*/external_react_default.a.createElement(StyledPalette, null, this.renderPalette(), !isPrisma && this.renderInput({
1160
- textAppend: true,
1161
- textPrepend: true,
1162
- textInline: true,
1163
- inDropdown: false
1164
- }))), isPrisma && !hideInput && this.renderInput({
1198
+ }, this.renderPalette()), isPrisma && !hideInput && this.renderInput({
1165
1199
  textAppend: false,
1166
1200
  textPrepend: true,
1167
1201
  textInline: true,
@@ -1265,14 +1299,7 @@ module.exports = require("@splunk/ui-utils/keyboard");
1265
1299
 
1266
1300
  /***/ }),
1267
1301
 
1268
- /***/ 80:
1269
- /***/ (function(module, exports) {
1270
-
1271
- module.exports = require("lodash/slice");
1272
-
1273
- /***/ }),
1274
-
1275
- /***/ 86:
1302
+ /***/ 75:
1276
1303
  /***/ (function(module, exports) {
1277
1304
 
1278
1305
  module.exports = require("@splunk/react-icons/Checkmark");
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 = 176);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 177);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -101,14 +101,14 @@ module.exports = require("prop-types");
101
101
 
102
102
  /***/ }),
103
103
 
104
- /***/ 108:
104
+ /***/ 109:
105
105
  /***/ (function(module, exports) {
106
106
 
107
107
  module.exports = require("lodash/defaults");
108
108
 
109
109
  /***/ }),
110
110
 
111
- /***/ 176:
111
+ /***/ 177:
112
112
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
113
113
 
114
114
  "use strict";
@@ -133,7 +133,7 @@ var useSplunkTheme_ = __webpack_require__(68);
133
133
  var useSplunkTheme_default = /*#__PURE__*/__webpack_require__.n(useSplunkTheme_);
134
134
 
135
135
  // EXTERNAL MODULE: external "lodash/defaults"
136
- var defaults_ = __webpack_require__(108);
136
+ var defaults_ = __webpack_require__(109);
137
137
  var defaults_default = /*#__PURE__*/__webpack_require__.n(defaults_);
138
138
 
139
139
  // EXTERNAL MODULE: external "styled-components"
@@ -152,7 +152,7 @@ var Styled = external_styled_components_default.a.div.withConfig({
152
152
  })(["", ";"], themes_["mixins"].reset('block'));
153
153
 
154
154
  // EXTERNAL MODULE: ./src/utils/types.ts
155
- var types = __webpack_require__(75);
155
+ var types = __webpack_require__(76);
156
156
 
157
157
  // CONCATENATED MODULE: ./src/ColumnLayout/Column.tsx
158
158
  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); }
@@ -443,7 +443,7 @@ module.exports = require("@splunk/themes/useSplunkTheme");
443
443
 
444
444
  /***/ }),
445
445
 
446
- /***/ 75:
446
+ /***/ 76:
447
447
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
448
448
 
449
449
  "use strict";
package/Concertina.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 = 177);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 178);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -149,14 +149,14 @@ module.exports = require("@splunk/react-ui/Clickable");
149
149
 
150
150
  /***/ }),
151
151
 
152
- /***/ 15:
152
+ /***/ 16:
153
153
  /***/ (function(module, exports) {
154
154
 
155
155
  module.exports = require("@splunk/react-ui/EventListener");
156
156
 
157
157
  /***/ }),
158
158
 
159
- /***/ 177:
159
+ /***/ 178:
160
160
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
161
161
 
162
162
  "use strict";
@@ -188,7 +188,7 @@ var takeRight_ = __webpack_require__(117);
188
188
  var takeRight_default = /*#__PURE__*/__webpack_require__.n(takeRight_);
189
189
 
190
190
  // EXTERNAL MODULE: external "@splunk/react-ui/EventListener"
191
- var EventListener_ = __webpack_require__(15);
191
+ var EventListener_ = __webpack_require__(16);
192
192
  var EventListener_default = /*#__PURE__*/__webpack_require__.n(EventListener_);
193
193
 
194
194
  // EXTERNAL MODULE: external "lodash/keys"
@@ -381,7 +381,7 @@ var Box_ = __webpack_require__(6);
381
381
  var Box_default = /*#__PURE__*/__webpack_require__.n(Box_);
382
382
 
383
383
  // EXTERNAL MODULE: external "@splunk/react-ui/Scroll"
384
- var Scroll_ = __webpack_require__(87);
384
+ var Scroll_ = __webpack_require__(86);
385
385
  var Scroll_default = /*#__PURE__*/__webpack_require__.n(Scroll_);
386
386
 
387
387
  // CONCATENATED MODULE: ./src/Concertina/ConcertinaStyles.ts
@@ -958,7 +958,7 @@ module.exports = require("lodash/debounce");
958
958
 
959
959
  /***/ }),
960
960
 
961
- /***/ 87:
961
+ /***/ 86:
962
962
  /***/ (function(module, exports) {
963
963
 
964
964
  module.exports = require("@splunk/react-ui/Scroll");
package/DefinitionList.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 = 178);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 179);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -101,7 +101,7 @@ module.exports = require("prop-types");
101
101
 
102
102
  /***/ }),
103
103
 
104
- /***/ 178:
104
+ /***/ 179:
105
105
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
106
106
 
107
107
  "use strict";
package/Dropdown.js CHANGED
@@ -128,7 +128,7 @@ function updateReactRef(ref, current) {
128
128
 
129
129
  /***/ }),
130
130
 
131
- /***/ 16:
131
+ /***/ 15:
132
132
  /***/ (function(module, exports) {
133
133
 
134
134
  module.exports = require("lodash/includes");
@@ -173,11 +173,11 @@ var has_ = __webpack_require__(10);
173
173
  var has_default = /*#__PURE__*/__webpack_require__.n(has_);
174
174
 
175
175
  // EXTERNAL MODULE: external "lodash/includes"
176
- var includes_ = __webpack_require__(16);
176
+ var includes_ = __webpack_require__(15);
177
177
  var includes_default = /*#__PURE__*/__webpack_require__.n(includes_);
178
178
 
179
179
  // EXTERNAL MODULE: external "lodash/isEmpty"
180
- var isEmpty_ = __webpack_require__(88);
180
+ var isEmpty_ = __webpack_require__(87);
181
181
 
182
182
  // EXTERNAL MODULE: external "lodash/isFunction"
183
183
  var isFunction_ = __webpack_require__(69);
@@ -558,7 +558,7 @@ module.exports = require("@splunk/ui-utils/id");
558
558
 
559
559
  /***/ }),
560
560
 
561
- /***/ 88:
561
+ /***/ 87:
562
562
  /***/ (function(module, exports) {
563
563
 
564
564
  module.exports = require("lodash/isEmpty");