@splunk/react-ui 4.13.0 → 4.15.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 (144) hide show
  1. package/.dockerignore +2 -0
  2. package/Accordion.js +41 -16
  3. package/Anchor.js +9 -9
  4. package/Animation.js +6 -6
  5. package/AnimationToggle.js +2 -2
  6. package/Box.js +9 -9
  7. package/Button.js +47 -46
  8. package/ButtonGroup.js +9 -9
  9. package/ButtonSimple.js +14 -14
  10. package/CHANGELOG.md +46 -1
  11. package/Calendar.js +460 -147
  12. package/Card.js +85 -83
  13. package/CardLayout.js +9 -9
  14. package/Chip.js +23 -23
  15. package/Clickable.js +39 -15
  16. package/CloseButton.js +23 -23
  17. package/Code.js +484 -436
  18. package/CollapsiblePanel.js +64 -35
  19. package/Color.js +298 -188
  20. package/ColumnLayout.js +18 -17
  21. package/ComboBox.js +81 -32
  22. package/Concertina.js +89 -28
  23. package/ControlGroup.js +85 -27
  24. package/Date.js +134 -58
  25. package/DefinitionList.js +14 -8
  26. package/Divider.d.ts +2 -0
  27. package/Divider.js +194 -0
  28. package/Dockerfile.enterprise.storybook +7 -0
  29. package/Dockerfile.prisma.storybook +7 -0
  30. package/Dockerfile.visual +10 -0
  31. package/Dropdown.js +79 -19
  32. package/EventListener.js +17 -17
  33. package/File.js +96 -43
  34. package/FormRows.js +40 -39
  35. package/Heading.js +83 -55
  36. package/Image.js +67 -42
  37. package/JSONTree.js +106 -21
  38. package/Layer.js +130 -28
  39. package/Link.js +17 -17
  40. package/List.js +3 -3
  41. package/Markdown.js +71 -65
  42. package/Menu.js +155 -121
  43. package/Message.js +135 -135
  44. package/MessageBar.js +136 -136
  45. package/Modal.js +99 -48
  46. package/ModalLayer.js +15 -15
  47. package/Monogram.js +18 -17
  48. package/Multiselect.js +2788 -2310
  49. package/Number.js +76 -37
  50. package/Paginator.js +99 -86
  51. package/Paragraph.js +10 -10
  52. package/Popover.js +343 -48
  53. package/Progress.js +23 -22
  54. package/RadioBar.js +32 -14
  55. package/RadioList.js +17 -11
  56. package/Resize.js +34 -21
  57. package/ResultsMenu.js +44 -31
  58. package/ScreenReaderContent.js +9 -9
  59. package/Scroll.js +52 -27
  60. package/ScrollContainerContext.js +157 -6
  61. package/Search.js +71 -34
  62. package/Select.js +347 -69
  63. package/SidePanel.js +37 -24
  64. package/Slider.js +50 -20
  65. package/SlidingPanels.js +56 -18
  66. package/SplitButton.js +27 -26
  67. package/StaticContent.js +9 -9
  68. package/StepBar.js +22 -22
  69. package/Switch.js +18 -13
  70. package/TabBar.js +28 -28
  71. package/TabLayout.js +43 -18
  72. package/Table.js +549 -158
  73. package/Text.js +93 -50
  74. package/TextArea.d.ts +2 -0
  75. package/TextArea.js +134 -56
  76. package/Tooltip.js +246 -63
  77. package/TransitionOpen.js +63 -26
  78. package/Typography.d.ts +2 -0
  79. package/Typography.js +17 -16
  80. package/WaitSpinner.js +15 -81
  81. package/docker-compose.yml +42 -0
  82. package/package.json +20 -20
  83. package/test-runner-jest.config.js +23 -5
  84. package/types/src/Accordion/AccordionContext.d.ts +1 -0
  85. package/types/src/Button/docs/examples/Selected.d.ts +2 -2
  86. package/types/src/ButtonGroup/ButtonGroupContext.d.ts +1 -0
  87. package/types/src/Calendar/Calendar.d.ts +17 -2
  88. package/types/src/Calendar/DateTable.d.ts +7 -3
  89. package/types/src/Calendar/Day.d.ts +14 -5
  90. package/types/src/CardLayout/CardLayoutContext.d.ts +1 -0
  91. package/types/src/CollapsiblePanel/CollapsiblePanel.d.ts +7 -3
  92. package/types/src/Concertina/ConcertinaContext.d.ts +1 -0
  93. package/types/src/ControlGroup/ControlGroup.d.ts +15 -8
  94. package/types/src/ControlGroup/docs/examples/HelpWithErrorText.d.ts +2 -0
  95. package/types/src/ControlGroup/docs/examples/Required.d.ts +2 -0
  96. package/types/src/Date/Date.d.ts +17 -8
  97. package/types/src/Date/docs/examples/CustomDate.d.ts +2 -2
  98. package/types/src/Date/docs/examples/Disabled.d.ts +2 -2
  99. package/types/src/Date/docs/examples/prisma/WithoutCalendar.d.ts +2 -0
  100. package/types/src/Divider/Divider.d.ts +20 -0
  101. package/types/src/Divider/docs/examples/AriaHidden.d.ts +2 -0
  102. package/types/src/Divider/docs/examples/Basic.d.ts +2 -0
  103. package/types/src/Divider/docs/examples/CustomStyle.d.ts +2 -0
  104. package/types/src/Divider/docs/examples/Vertical.d.ts +2 -0
  105. package/types/src/Divider/index.d.ts +1 -0
  106. package/types/src/File/File.d.ts +4 -2
  107. package/types/src/File/FileContext.d.ts +1 -0
  108. package/types/src/FormRows/FormRowsContext.d.ts +1 -0
  109. package/types/src/Markdown/renderers/MarkdownLink.d.ts +1 -1
  110. package/types/src/Menu/MenuContext.d.ts +1 -0
  111. package/types/src/Modal/Modal.d.ts +7 -3
  112. package/types/src/Modal/ModalContext.d.ts +2 -0
  113. package/types/src/Multiselect/Compact.d.ts +10 -1
  114. package/types/src/Multiselect/Multiselect.d.ts +12 -1
  115. package/types/src/Multiselect/Normal.d.ts +2 -0
  116. package/types/src/Number/Number.d.ts +5 -1
  117. package/types/src/Popover/Popover.d.ts +25 -5
  118. package/types/src/Popover/PopoverContext.d.ts +1 -0
  119. package/types/src/RadioBar/RadioBar.d.ts +5 -3
  120. package/types/src/RadioBar/RadioBarContext.d.ts +1 -0
  121. package/types/src/RadioList/RadioList.d.ts +5 -1
  122. package/types/src/RadioList/RadioListContext.d.ts +1 -0
  123. package/types/src/Select/SelectBase.d.ts +2 -0
  124. package/types/src/Slider/Slider.d.ts +5 -3
  125. package/types/src/SplitButton/docs/examples/Disabled.d.ts +1 -1
  126. package/types/src/SplitButton/docs/examples/prisma/Disabled.d.ts +1 -1
  127. package/types/src/StepBar/StepBarContext.d.ts +1 -0
  128. package/types/src/Switch/Switch.d.ts +2 -0
  129. package/types/src/TabBar/TabBarContext.d.ts +1 -0
  130. package/types/src/Table/Head.d.ts +2 -0
  131. package/types/src/Table/TableContext.d.ts +1 -0
  132. package/types/src/Table/docs/examples/FilterColumnValues.d.ts +14 -0
  133. package/types/src/Text/Text.d.ts +5 -3
  134. package/types/src/TextArea/TextArea.d.ts +5 -3
  135. package/types/src/Tooltip/Tooltip.d.ts +26 -9
  136. package/types/src/TransitionOpen/TransitionOpen.d.ts +7 -3
  137. package/types/src/WaitSpinner/WaitSpinner.d.ts +1 -1
  138. package/types/src/useForceUpdate/useForceUpdate.d.ts +1 -0
  139. package/types/src/useKeyPress/index.d.ts +37 -0
  140. package/useForceUpdate.js +9 -9
  141. package/{useIsSsr.js → useKeyPress.js} +56 -49
  142. package/usePrevious.js +9 -9
  143. package/types/src/useIsSsr/index.d.ts +0 -2
  144. package/types/src/useIsSsr/useIsSsr.d.ts +0 -8
@@ -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 = 157);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 209);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -104,18 +104,39 @@ module.exports = require("prop-types");
104
104
  /***/ 10:
105
105
  /***/ (function(module, exports) {
106
106
 
107
+ module.exports = require("lodash/keys");
108
+
109
+ /***/ }),
110
+
111
+ /***/ 11:
112
+ /***/ (function(module, exports) {
113
+
114
+ module.exports = require("lodash/has");
115
+
116
+ /***/ }),
117
+
118
+ /***/ 13:
119
+ /***/ (function(module, exports) {
120
+
107
121
  module.exports = require("@splunk/ui-utils/id");
108
122
 
109
123
  /***/ }),
110
124
 
111
- /***/ 12:
125
+ /***/ 14:
112
126
  /***/ (function(module, exports) {
113
127
 
114
128
  module.exports = require("@splunk/react-ui/Clickable");
115
129
 
116
130
  /***/ }),
117
131
 
118
- /***/ 157:
132
+ /***/ 2:
133
+ /***/ (function(module, exports) {
134
+
135
+ module.exports = require("react");
136
+
137
+ /***/ }),
138
+
139
+ /***/ 209:
119
140
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
120
141
 
121
142
  "use strict";
@@ -133,21 +154,30 @@ var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_)
133
154
  var external_prop_types_ = __webpack_require__(1);
134
155
  var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_);
135
156
 
136
- // EXTERNAL MODULE: external "lodash"
137
- var external_lodash_ = __webpack_require__(4);
157
+ // EXTERNAL MODULE: external "lodash/has"
158
+ var has_ = __webpack_require__(11);
159
+ var has_default = /*#__PURE__*/__webpack_require__.n(has_);
160
+
161
+ // EXTERNAL MODULE: external "lodash/keys"
162
+ var keys_ = __webpack_require__(10);
163
+ var keys_default = /*#__PURE__*/__webpack_require__.n(keys_);
164
+
165
+ // EXTERNAL MODULE: external "lodash/omit"
166
+ var omit_ = __webpack_require__(5);
167
+ var omit_default = /*#__PURE__*/__webpack_require__.n(omit_);
138
168
 
139
169
  // EXTERNAL MODULE: external "@splunk/ui-utils/i18n"
140
- var i18n_ = __webpack_require__(5);
170
+ var i18n_ = __webpack_require__(4);
141
171
 
142
172
  // EXTERNAL MODULE: external "@splunk/ui-utils/id"
143
- var id_ = __webpack_require__(10);
173
+ var id_ = __webpack_require__(13);
144
174
 
145
175
  // EXTERNAL MODULE: external "@splunk/react-ui/TransitionOpen"
146
- var TransitionOpen_ = __webpack_require__(53);
176
+ var TransitionOpen_ = __webpack_require__(72);
147
177
  var TransitionOpen_default = /*#__PURE__*/__webpack_require__.n(TransitionOpen_);
148
178
 
149
179
  // EXTERNAL MODULE: ./src/icons/ChevronRight.tsx
150
- var ChevronRight = __webpack_require__(27);
180
+ var ChevronRight = __webpack_require__(37);
151
181
 
152
182
  // EXTERNAL MODULE: external "styled-components"
153
183
  var external_styled_components_ = __webpack_require__(3);
@@ -158,7 +188,7 @@ var Box_ = __webpack_require__(8);
158
188
  var Box_default = /*#__PURE__*/__webpack_require__.n(Box_);
159
189
 
160
190
  // EXTERNAL MODULE: external "@splunk/react-ui/Clickable"
161
- var Clickable_ = __webpack_require__(12);
191
+ var Clickable_ = __webpack_require__(14);
162
192
  var Clickable_default = /*#__PURE__*/__webpack_require__.n(Clickable_);
163
193
 
164
194
  // EXTERNAL MODULE: external "@splunk/themes"
@@ -360,6 +390,8 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
360
390
 
361
391
 
362
392
 
393
+
394
+
363
395
  var propTypes = {
364
396
  innerBodyStyles: external_prop_types_default.a.object,
365
397
  children: external_prop_types_default.a.node,
@@ -373,12 +405,14 @@ var propTypes = {
373
405
  open: external_prop_types_default.a.bool,
374
406
  overflow: external_prop_types_default.a.string,
375
407
  panelId: external_prop_types_default.a.any,
408
+ renderChildrenWhenCollapsed: external_prop_types_default.a.bool,
376
409
  title: external_prop_types_default.a.node.isRequired,
377
410
  titleWithActions: external_prop_types_default.a.bool
378
411
  };
379
412
  var defaultProps = {
380
413
  disabled: false,
381
414
  overflow: 'auto',
415
+ renderChildrenWhenCollapsed: false,
382
416
  titleWithActions: false
383
417
  };
384
418
 
@@ -441,7 +475,7 @@ var CollapsiblePanel_CollapsiblePanel = /*#__PURE__*/function (_Component) {
441
475
  });
442
476
  });
443
477
 
444
- _this.controlledExternally = Object(external_lodash_["has"])(props, 'open');
478
+ _this.controlledExternally = has_default()(props, 'open');
445
479
  _this.state = _objectSpread({
446
480
  animating: false
447
481
  }, !_this.isControlled() ? {
@@ -484,6 +518,7 @@ var CollapsiblePanel_CollapsiblePanel = /*#__PURE__*/function (_Component) {
484
518
  elementRef = _this$props3.elementRef,
485
519
  headingLevel = _this$props3.headingLevel,
486
520
  overflow = _this$props3.overflow,
521
+ renderChildrenWhenCollapsed = _this$props3.renderChildrenWhenCollapsed,
487
522
  title = _this$props3.title,
488
523
  titleWithActions = _this$props3.titleWithActions;
489
524
  var animating = this.state.animating;
@@ -491,7 +526,7 @@ var CollapsiblePanel_CollapsiblePanel = /*#__PURE__*/function (_Component) {
491
526
  return /*#__PURE__*/external_react_default.a.createElement(StyledBox, _extends({
492
527
  "data-test": "collapsible-panel",
493
528
  elementRef: elementRef
494
- }, Object(external_lodash_["omit"])(this.props, Object(external_lodash_["keys"])(CollapsiblePanel.propTypes))), titleWithActions ? /*#__PURE__*/external_react_default.a.createElement(StyledTitleWithActions, {
529
+ }, omit_default()(this.props, keys_default()(CollapsiblePanel.propTypes))), titleWithActions ? /*#__PURE__*/external_react_default.a.createElement(StyledTitleWithActions, {
495
530
  $disabled: disabled
496
531
  }, /*#__PURE__*/external_react_default.a.createElement(StyledClickableIcon, {
497
532
  disabled: disabled,
@@ -541,7 +576,8 @@ var CollapsiblePanel_CollapsiblePanel = /*#__PURE__*/function (_Component) {
541
576
  tableLayout: 'fixed'
542
577
  }, innerBodyStyles),
543
578
  open: open,
544
- onAnimationEnd: this.handleAnimationEnd
579
+ onAnimationEnd: this.handleAnimationEnd,
580
+ renderChildrenWhenCollapsed: renderChildrenWhenCollapsed
545
581
  }, children));
546
582
  }
547
583
  }]);
@@ -560,21 +596,21 @@ _defineProperty(CollapsiblePanel_CollapsiblePanel, "defaultProps", defaultProps)
560
596
 
561
597
  /***/ }),
562
598
 
563
- /***/ 2:
599
+ /***/ 3:
564
600
  /***/ (function(module, exports) {
565
601
 
566
- module.exports = require("react");
602
+ module.exports = require("styled-components");
567
603
 
568
604
  /***/ }),
569
605
 
570
- /***/ 27:
606
+ /***/ 37:
571
607
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
572
608
 
573
609
  "use strict";
574
610
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ChevronRight; });
575
611
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
576
612
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
577
- /* harmony import */ var _splunk_react_icons_ChevronRight__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(33);
613
+ /* harmony import */ var _splunk_react_icons_ChevronRight__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(44);
578
614
  /* harmony import */ var _splunk_react_icons_ChevronRight__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_splunk_react_icons_ChevronRight__WEBPACK_IMPORTED_MODULE_1__);
579
615
  /* harmony import */ var _ThemedIcon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
580
616
  /* harmony import */ var _SVG__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6);
@@ -617,38 +653,24 @@ function ChevronRight(props) {
617
653
 
618
654
  /***/ }),
619
655
 
620
- /***/ 3:
656
+ /***/ 4:
621
657
  /***/ (function(module, exports) {
622
658
 
623
- module.exports = require("styled-components");
659
+ module.exports = require("@splunk/ui-utils/i18n");
624
660
 
625
661
  /***/ }),
626
662
 
627
- /***/ 33:
663
+ /***/ 44:
628
664
  /***/ (function(module, exports) {
629
665
 
630
666
  module.exports = require("@splunk/react-icons/ChevronRight");
631
667
 
632
668
  /***/ }),
633
669
 
634
- /***/ 4:
635
- /***/ (function(module, exports) {
636
-
637
- module.exports = require("lodash");
638
-
639
- /***/ }),
640
-
641
670
  /***/ 5:
642
671
  /***/ (function(module, exports) {
643
672
 
644
- module.exports = require("@splunk/ui-utils/i18n");
645
-
646
- /***/ }),
647
-
648
- /***/ 53:
649
- /***/ (function(module, exports) {
650
-
651
- module.exports = require("@splunk/react-ui/TransitionOpen");
673
+ module.exports = require("lodash/omit");
652
674
 
653
675
  /***/ }),
654
676
 
@@ -795,6 +817,13 @@ Icon.defaultProps = defaultProps;
795
817
 
796
818
  /***/ }),
797
819
 
820
+ /***/ 72:
821
+ /***/ (function(module, exports) {
822
+
823
+ module.exports = require("@splunk/react-ui/TransitionOpen");
824
+
825
+ /***/ }),
826
+
798
827
  /***/ 8:
799
828
  /***/ (function(module, exports) {
800
829