@splunk/react-ui 4.17.0 → 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.
- package/Accordion.js +2 -2
- package/AnimationToggle.js +5 -5
- package/Button.js +7 -7
- package/ButtonSimple.js +2 -2
- package/CHANGELOG.md +40 -7
- package/Calendar.js +7 -5
- package/CloseButton.js +5 -5
- package/Code.js +7 -6
- package/Color.js +206 -179
- package/ColumnLayout.js +8 -8
- package/ComboBox.js +2 -0
- package/Concertina.js +10 -10
- package/DefinitionList.js +2 -2
- package/Dropdown.js +7 -7
- package/DualListbox.js +11 -8
- package/File.js +9 -9
- package/FormRows.js +4 -4
- package/Heading.js +8 -4
- package/JSONTree.js +30 -28
- package/Layer.js +10 -10
- package/Link.js +4 -4
- package/List.js +7 -4
- package/MIGRATION.mdx +295 -0
- package/Markdown.js +12 -7
- package/Menu.js +19 -19
- package/Message.js +25 -25
- package/MessageBar.js +21 -21
- package/Modal.js +7 -7
- package/Multiselect.js +46 -36
- package/Number.js +3 -2
- package/Paginator.js +6 -6
- package/Popover.js +17 -13
- package/Progress.js +2 -2
- package/RadioBar.js +2 -2
- package/RadioList.js +2 -2
- package/Resize.js +2 -2
- package/Scroll.js +2 -2
- package/Select.js +14 -13
- package/SidePanel.js +2 -2
- package/Slider.js +7 -7
- package/StepBar.js +8 -8
- package/Switch.js +2 -2
- package/TabBar.js +85 -54
- package/Table.js +13 -13
- package/Text.js +7 -7
- package/TextArea.js +8 -6
- package/Typography.js +2 -2
- package/package.json +10 -15
- package/stubs-dependencies.d.ts +0 -9
- package/stubs-splunkui.d.ts +0 -24
- package/types/src/Button/Button.d.ts +5 -3
- package/types/src/Clickable/Clickable.d.ts +2 -1
- package/types/src/CollapsiblePanel/CollapsiblePanel.d.ts +1 -0
- package/types/src/Color/Color.d.ts +6 -6
- package/types/src/Color/Palette.d.ts +46 -0
- package/types/src/Concertina/Panel.d.ts +1 -0
- package/types/src/FormRows/Row.d.ts +1 -0
- package/types/src/Heading/Heading.d.ts +7 -2
- package/types/src/JSONTree/JSONTree.d.ts +2 -1
- package/types/src/Layer/Layer.d.ts +2 -0
- package/types/src/List/List.d.ts +9 -1
- package/types/src/List/docs/examples/CustomizedList.d.ts +2 -0
- package/types/src/List/docs/examples/OrderedList.d.ts +2 -0
- package/types/src/List/docs/examples/UnorderedList.d.ts +2 -0
- package/types/src/Markdown/Markdown.d.ts +1 -0
- package/types/src/Markdown/renderers/MarkdownList.d.ts +2 -0
- package/types/src/Multiselect/Normal.d.ts +1 -1
- package/types/src/Number/Number.d.ts +9 -4
- package/types/src/Popover/Popover.d.ts +2 -0
- package/types/src/TabBar/Tab.d.ts +5 -1
- package/types/src/Table/Head.d.ts +1 -0
- package/types/src/Table/HeadCell.d.ts +1 -0
- package/types/src/Table/HeadDropdownCell.d.ts +1 -0
- package/types/src/Table/Table.d.ts +3 -1
- package/types/src/Text/Text.d.ts +3 -1
- package/types/src/TextArea/TextArea.d.ts +13 -4
- package/types/src/TextArea/docs/examples/ClearContent.d.ts +2 -0
- package/MIGRATION.md +0 -49
- package/types/src/List/docs/examples/Decimal.d.ts +0 -2
- package/types/src/List/docs/examples/Disc.d.ts +0 -2
- package/types/src/List/docs/examples/LowerAlpha.d.ts +0 -2
- 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 =
|
|
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
|
-
/***/
|
|
153
|
+
/***/ 15:
|
|
147
154
|
/***/ (function(module, exports) {
|
|
148
155
|
|
|
149
156
|
module.exports = require("lodash/includes");
|
|
150
157
|
|
|
151
158
|
/***/ }),
|
|
152
159
|
|
|
153
|
-
/***/
|
|
160
|
+
/***/ 176:
|
|
154
161
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
155
162
|
|
|
156
163
|
"use strict";
|
|
@@ -171,7 +178,7 @@ var external_prop_types_ = __webpack_require__(1);
|
|
|
171
178
|
var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_);
|
|
172
179
|
|
|
173
180
|
// EXTERNAL MODULE: external "lodash/debounce"
|
|
174
|
-
var debounce_ = __webpack_require__(
|
|
181
|
+
var debounce_ = __webpack_require__(66);
|
|
175
182
|
var debounce_default = /*#__PURE__*/__webpack_require__.n(debounce_);
|
|
176
183
|
|
|
177
184
|
// EXTERNAL MODULE: external "lodash/has"
|
|
@@ -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__(
|
|
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__(
|
|
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"
|
|
@@ -207,13 +214,9 @@ var memoize_ = __webpack_require__(125);
|
|
|
207
214
|
var memoize_default = /*#__PURE__*/__webpack_require__.n(memoize_);
|
|
208
215
|
|
|
209
216
|
// EXTERNAL MODULE: external "tinycolor2"
|
|
210
|
-
var external_tinycolor2_ = __webpack_require__(
|
|
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__(
|
|
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
|
|
402
|
-
displayName: "
|
|
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: "
|
|
415
|
-
componentId: "
|
|
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: "
|
|
425
|
-
componentId: "
|
|
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: "
|
|
437
|
-
componentId: "
|
|
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: "
|
|
441
|
-
componentId: "
|
|
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: "
|
|
448
|
-
componentId: "
|
|
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: "
|
|
452
|
-
componentId: "
|
|
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
|
|
455
|
-
displayName: "
|
|
456
|
-
componentId: "
|
|
457
|
-
})(["
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
var
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
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
|
-
|
|
1009
|
-
|
|
1010
|
-
var
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
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
|
-
},
|
|
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,
|
|
@@ -1244,14 +1278,14 @@ module.exports = require("lodash/omit");
|
|
|
1244
1278
|
|
|
1245
1279
|
/***/ }),
|
|
1246
1280
|
|
|
1247
|
-
/***/
|
|
1281
|
+
/***/ 66:
|
|
1248
1282
|
/***/ (function(module, exports) {
|
|
1249
1283
|
|
|
1250
1284
|
module.exports = require("lodash/debounce");
|
|
1251
1285
|
|
|
1252
1286
|
/***/ }),
|
|
1253
1287
|
|
|
1254
|
-
/***/
|
|
1288
|
+
/***/ 67:
|
|
1255
1289
|
/***/ (function(module, exports) {
|
|
1256
1290
|
|
|
1257
1291
|
module.exports = require("tinycolor2");
|
|
@@ -1265,14 +1299,7 @@ module.exports = require("@splunk/ui-utils/keyboard");
|
|
|
1265
1299
|
|
|
1266
1300
|
/***/ }),
|
|
1267
1301
|
|
|
1268
|
-
/***/
|
|
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 =
|
|
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
|
-
/***/
|
|
104
|
+
/***/ 109:
|
|
105
105
|
/***/ (function(module, exports) {
|
|
106
106
|
|
|
107
107
|
module.exports = require("lodash/defaults");
|
|
108
108
|
|
|
109
109
|
/***/ }),
|
|
110
110
|
|
|
111
|
-
/***/
|
|
111
|
+
/***/ 177:
|
|
112
112
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
113
113
|
|
|
114
114
|
"use strict";
|
|
@@ -129,11 +129,11 @@ var external_prop_types_ = __webpack_require__(1);
|
|
|
129
129
|
var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_);
|
|
130
130
|
|
|
131
131
|
// EXTERNAL MODULE: external "@splunk/themes/useSplunkTheme"
|
|
132
|
-
var useSplunkTheme_ = __webpack_require__(
|
|
132
|
+
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__(
|
|
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__(
|
|
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); }
|
|
@@ -436,14 +436,14 @@ module.exports = require("styled-components");
|
|
|
436
436
|
|
|
437
437
|
/***/ }),
|
|
438
438
|
|
|
439
|
-
/***/
|
|
439
|
+
/***/ 68:
|
|
440
440
|
/***/ (function(module, exports) {
|
|
441
441
|
|
|
442
442
|
module.exports = require("@splunk/themes/useSplunkTheme");
|
|
443
443
|
|
|
444
444
|
/***/ }),
|
|
445
445
|
|
|
446
|
-
/***/
|
|
446
|
+
/***/ 76:
|
|
447
447
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
448
448
|
|
|
449
449
|
"use strict";
|
package/ComboBox.js
CHANGED
|
@@ -703,6 +703,8 @@ var ComboBox_ComboBox = /*#__PURE__*/function (_Component) {
|
|
|
703
703
|
|
|
704
704
|
if (!hasExactMatch && value) {
|
|
705
705
|
initialOptions.unshift( /*#__PURE__*/external_react_default.a.createElement(ComboBox_Option, {
|
|
706
|
+
description: Object(i18n_["_"])('(New value)'),
|
|
707
|
+
descriptionPosition: "right",
|
|
706
708
|
key: "currentValueOption",
|
|
707
709
|
value: value,
|
|
708
710
|
"data-test-current-value-option": value
|