@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/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 = 114);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 118);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -101,7 +101,7 @@ module.exports = require("prop-types");
101
101
 
102
102
  /***/ }),
103
103
 
104
- /***/ 114:
104
+ /***/ 118:
105
105
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
106
106
 
107
107
  "use strict";
@@ -144,7 +144,7 @@ var Styled = external_styled_components_default.a.div.withConfig({
144
144
  })(["", ";"], themes_["mixins"].reset('block'));
145
145
 
146
146
  // EXTERNAL MODULE: ./src/utils/types.ts
147
- var types = __webpack_require__(48);
147
+ var types = __webpack_require__(49);
148
148
 
149
149
  // CONCATENATED MODULE: ./src/ColumnLayout/Column.tsx
150
150
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
@@ -442,7 +442,7 @@ module.exports = require("lodash");
442
442
 
443
443
  /***/ }),
444
444
 
445
- /***/ 48:
445
+ /***/ 49:
446
446
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
447
447
 
448
448
  "use strict";
package/ComboBox.js CHANGED
@@ -82,7 +82,7 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 147);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 152);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -101,7 +101,7 @@ module.exports = require("@splunk/ui-utils/id");
101
101
 
102
102
  /***/ }),
103
103
 
104
- /***/ 12:
104
+ /***/ 11:
105
105
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
106
106
 
107
107
  "use strict";
@@ -135,7 +135,7 @@ module.exports = require("@splunk/react-ui/Menu");
135
135
 
136
136
  /***/ }),
137
137
 
138
- /***/ 147:
138
+ /***/ 152:
139
139
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
140
140
 
141
141
  "use strict";
@@ -160,7 +160,7 @@ var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_pr
160
160
  var external_lodash_ = __webpack_require__(4);
161
161
 
162
162
  // EXTERNAL MODULE: external "@splunk/ui-utils/filter"
163
- var filter_ = __webpack_require__(23);
163
+ var filter_ = __webpack_require__(24);
164
164
 
165
165
  // EXTERNAL MODULE: external "@splunk/ui-utils/id"
166
166
  var id_ = __webpack_require__(10);
@@ -175,15 +175,15 @@ var keyboard_ = __webpack_require__(9);
175
175
  var Menu_ = __webpack_require__(13);
176
176
 
177
177
  // EXTERNAL MODULE: external "@splunk/react-ui/Popover"
178
- var Popover_ = __webpack_require__(17);
178
+ var Popover_ = __webpack_require__(16);
179
179
  var Popover_default = /*#__PURE__*/__webpack_require__.n(Popover_);
180
180
 
181
181
  // EXTERNAL MODULE: external "@splunk/react-ui/ResultsMenu"
182
- var ResultsMenu_ = __webpack_require__(39);
182
+ var ResultsMenu_ = __webpack_require__(32);
183
183
  var ResultsMenu_default = /*#__PURE__*/__webpack_require__.n(ResultsMenu_);
184
184
 
185
185
  // EXTERNAL MODULE: external "@splunk/react-ui/Text"
186
- var Text_ = __webpack_require__(26);
186
+ var Text_ = __webpack_require__(21);
187
187
  var Text_default = /*#__PURE__*/__webpack_require__.n(Text_);
188
188
 
189
189
  // CONCATENATED MODULE: ./src/ComboBox/Option.tsx
@@ -326,7 +326,7 @@ _defineProperty(Option_Option, "defaultProps", defaultProps);
326
326
 
327
327
  /* harmony default export */ var ComboBox_Option = (Option_Option);
328
328
  // EXTERNAL MODULE: ./src/utils/updateReactRef.ts
329
- var updateReactRef = __webpack_require__(12);
329
+ var updateReactRef = __webpack_require__(11);
330
330
 
331
331
  // CONCATENATED MODULE: ./src/ComboBox/ComboBox.tsx
332
332
  function ComboBox_typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { ComboBox_typeof = function _typeof(obj) { return typeof obj; }; } else { ComboBox_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return ComboBox_typeof(obj); }
@@ -461,6 +461,8 @@ var ComboBox_ComboBox = /*#__PURE__*/function (_Component) {
461
461
 
462
462
  ComboBox_defineProperty(ComboBox_assertThisInitialized(_this), "popoverId", void 0);
463
463
 
464
+ ComboBox_defineProperty(ComboBox_assertThisInitialized(_this), "previousActiveIndex", null);
465
+
464
466
  ComboBox_defineProperty(ComboBox_assertThisInitialized(_this), "textInput", null);
465
467
 
466
468
  ComboBox_defineProperty(ComboBox_assertThisInitialized(_this), "handleInputMount", function (el) {
@@ -474,8 +476,8 @@ var ComboBox_ComboBox = /*#__PURE__*/function (_Component) {
474
476
  });
475
477
 
476
478
  ComboBox_defineProperty(ComboBox_assertThisInitialized(_this), "handleActiveOptionMount", function (c) {
477
- if (c) {
478
- c.scrollIntoViewIfNeeded();
479
+ if (_this.previousActiveIndex !== _this.state.activeIndex) {
480
+ c === null || c === void 0 ? void 0 : c.scrollIntoViewIfNeeded();
479
481
  }
480
482
  });
481
483
 
@@ -736,8 +738,10 @@ var ComboBox_ComboBox = /*#__PURE__*/function (_Component) {
736
738
 
737
739
  ComboBox_createClass(ComboBox, [{
738
740
  key: "componentDidUpdate",
739
- value: function componentDidUpdate() {
741
+ value: function componentDidUpdate(prevProps, prevState) {
740
742
  if (false) {}
743
+
744
+ this.previousActiveIndex = prevState.activeIndex;
741
745
  }
742
746
  }, {
743
747
  key: "getValue",
@@ -784,6 +788,7 @@ var ComboBox_ComboBox = /*#__PURE__*/function (_Component) {
784
788
  }, function () {
785
789
  var _this3$props$onClose, _this3$props;
786
790
 
791
+ _this3.previousActiveIndex = null;
787
792
  (_this3$props$onClose = (_this3$props = _this3.props).onClose) === null || _this3$props$onClose === void 0 ? void 0 : _this3$props$onClose.call(_this3$props);
788
793
  });
789
794
  }
@@ -870,7 +875,7 @@ ComboBox_defineProperty(ComboBox_ComboBox, "Heading", Menu_["Heading"]);
870
875
 
871
876
  /***/ }),
872
877
 
873
- /***/ 17:
878
+ /***/ 16:
874
879
  /***/ (function(module, exports) {
875
880
 
876
881
  module.exports = require("@splunk/react-ui/Popover");
@@ -884,21 +889,21 @@ module.exports = require("react");
884
889
 
885
890
  /***/ }),
886
891
 
887
- /***/ 23:
892
+ /***/ 21:
888
893
  /***/ (function(module, exports) {
889
894
 
890
- module.exports = require("@splunk/ui-utils/filter");
895
+ module.exports = require("@splunk/react-ui/Text");
891
896
 
892
897
  /***/ }),
893
898
 
894
- /***/ 26:
899
+ /***/ 24:
895
900
  /***/ (function(module, exports) {
896
901
 
897
- module.exports = require("@splunk/react-ui/Text");
902
+ module.exports = require("@splunk/ui-utils/filter");
898
903
 
899
904
  /***/ }),
900
905
 
901
- /***/ 39:
906
+ /***/ 32:
902
907
  /***/ (function(module, exports) {
903
908
 
904
909
  module.exports = require("@splunk/react-ui/ResultsMenu");
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 = 120);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 119);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
@@ -102,13 +102,6 @@ module.exports = require("prop-types");
102
102
  /***/ }),
103
103
 
104
104
  /***/ 11:
105
- /***/ (function(module, exports) {
106
-
107
- module.exports = require("@splunk/react-ui/Clickable");
108
-
109
- /***/ }),
110
-
111
- /***/ 12:
112
105
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
113
106
 
114
107
  "use strict";
@@ -135,7 +128,7 @@ function updateReactRef(ref, current) {
135
128
 
136
129
  /***/ }),
137
130
 
138
- /***/ 120:
131
+ /***/ 119:
139
132
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
140
133
 
141
134
  "use strict";
@@ -157,16 +150,16 @@ var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_pr
157
150
  // EXTERNAL MODULE: external "lodash"
158
151
  var external_lodash_ = __webpack_require__(4);
159
152
 
160
- // EXTERNAL MODULE: external "react-event-listener"
161
- var external_react_event_listener_ = __webpack_require__(15);
162
- var external_react_event_listener_default = /*#__PURE__*/__webpack_require__.n(external_react_event_listener_);
153
+ // EXTERNAL MODULE: external "@splunk/react-ui/EventListener"
154
+ var EventListener_ = __webpack_require__(14);
155
+ var EventListener_default = /*#__PURE__*/__webpack_require__.n(EventListener_);
163
156
 
164
157
  // EXTERNAL MODULE: external "styled-components"
165
158
  var external_styled_components_ = __webpack_require__(3);
166
159
  var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_);
167
160
 
168
161
  // EXTERNAL MODULE: external "@splunk/react-ui/Clickable"
169
- var Clickable_ = __webpack_require__(11);
162
+ var Clickable_ = __webpack_require__(12);
170
163
  var Clickable_default = /*#__PURE__*/__webpack_require__.n(Clickable_);
171
164
 
172
165
  // EXTERNAL MODULE: external "@splunk/themes"
@@ -338,7 +331,7 @@ var Box_ = __webpack_require__(8);
338
331
  var Box_default = /*#__PURE__*/__webpack_require__.n(Box_);
339
332
 
340
333
  // EXTERNAL MODULE: external "@splunk/react-ui/Scroll"
341
- var Scroll_ = __webpack_require__(58);
334
+ var Scroll_ = __webpack_require__(61);
342
335
  var Scroll_default = /*#__PURE__*/__webpack_require__.n(Scroll_);
343
336
 
344
337
  // CONCATENATED MODULE: ./src/Concertina/ConcertinaStyles.ts
@@ -378,8 +371,13 @@ var StyledPanelBody = external_styled_components_default.a.div.withConfig({
378
371
  }));
379
372
 
380
373
  // EXTERNAL MODULE: ./src/utils/updateReactRef.ts
381
- var updateReactRef = __webpack_require__(12);
374
+ var updateReactRef = __webpack_require__(11);
375
+
376
+ // CONCATENATED MODULE: ./src/Concertina/ConcertinaContext.tsx
382
377
 
378
+ var ConcertinaContext = /*#__PURE__*/Object(external_react_["createContext"])({});
379
+ ConcertinaContext.displayName = 'Concertina';
380
+ /* harmony default export */ var Concertina_ConcertinaContext = (ConcertinaContext);
383
381
  // CONCATENATED MODULE: ./src/Concertina/Panel.tsx
384
382
  function Panel_typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { Panel_typeof = function _typeof(obj) { return typeof obj; }; } else { Panel_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return Panel_typeof(obj); }
385
383
 
@@ -426,6 +424,7 @@ function Panel_defineProperty(obj, key, value) { if (key in obj) { Object.define
426
424
 
427
425
 
428
426
 
427
+
429
428
  var Panel_propTypes = {
430
429
  children: external_prop_types_default.a.node,
431
430
  description: external_prop_types_default.a.node,
@@ -433,12 +432,6 @@ var Panel_propTypes = {
433
432
 
434
433
  /** @private */
435
434
  index: external_prop_types_default.a.number,
436
-
437
- /** @private */
438
- onHeadingClick: external_prop_types_default.a.func,
439
-
440
- /** @private */
441
- onChange: external_prop_types_default.a.func,
442
435
  panelId: external_prop_types_default.a.string,
443
436
  status: external_prop_types_default.a.oneOf(['normal', 'warning', 'error', 'disabled']),
444
437
  title: external_prop_types_default.a.node.isRequired
@@ -463,7 +456,7 @@ var Panel_Panel = /*#__PURE__*/function (_Component) {
463
456
  Panel_defineProperty(Panel_assertThisInitialized(_this), "lastHeight", void 0);
464
457
 
465
458
  Panel_defineProperty(Panel_assertThisInitialized(_this), "measureHeight", function (e) {
466
- var _this$props$index, _this$props$onChange, _this$props;
459
+ var _this$props$index, _this$context$onChang, _this$context;
467
460
 
468
461
  if (!_this.state.containerEl || !_this.state.bodyEl) {
469
462
  return;
@@ -482,7 +475,7 @@ var Panel_Panel = /*#__PURE__*/function (_Component) {
482
475
  panelId: _this.props.panelId
483
476
  };
484
477
  _this.lastHeight = newHeight;
485
- (_this$props$onChange = (_this$props = _this.props).onChange) === null || _this$props$onChange === void 0 ? void 0 : _this$props$onChange.call(_this$props, e, data);
478
+ (_this$context$onChang = (_this$context = _this.context).onChange) === null || _this$context$onChang === void 0 ? void 0 : _this$context$onChang.call(_this$context, e, data);
486
479
  });
487
480
 
488
481
  Panel_defineProperty(Panel_assertThisInitialized(_this), "handleResize", Object(external_lodash_["throttle"])(_this.measureHeight, 300));
@@ -537,30 +530,31 @@ var Panel_Panel = /*#__PURE__*/function (_Component) {
537
530
  }, {
538
531
  key: "render",
539
532
  value: function render() {
540
- var _this$props2 = this.props,
541
- children = _this$props2.children,
542
- description = _this$props2.description,
543
- index = _this$props2.index,
544
- onHeadingClick = _this$props2.onHeadingClick,
545
- panelId = _this$props2.panelId,
546
- status = _this$props2.status,
547
- style = _this$props2.style,
548
- title = _this$props2.title;
533
+ var _this$props = this.props,
534
+ children = _this$props.children,
535
+ description = _this$props.description,
536
+ index = _this$props.index,
537
+ panelId = _this$props.panelId,
538
+ status = _this$props.status,
539
+ style = _this$props.style,
540
+ title = _this$props.title;
541
+ var onHeadingClickContext = this.context.onHeadingClick;
549
542
  return /*#__PURE__*/external_react_default.a.createElement("div", Panel_extends({
550
543
  ref: this.handleMount,
551
544
  "data-test": "panel",
552
- "data-test-panel-id": panelId
545
+ "data-test-panel-id": panelId || "".concat(index)
553
546
  }, Object(external_lodash_["omit"])(this.props, [].concat(_toConsumableArray(Object(external_lodash_["keys"])(Panel.propTypes)), ['style']))), /*#__PURE__*/external_react_default.a.createElement(Concertina_Heading, {
554
- onClick: onHeadingClick,
547
+ onClick: onHeadingClickContext,
555
548
  ref: this.handleHeadingMount,
556
549
  description: description,
557
550
  index: index !== null && index !== void 0 ? index : 0,
558
- panelId: panelId,
551
+ panelId: panelId || "".concat(index),
559
552
  position: "inner",
560
553
  status: status
561
- }, title), /*#__PURE__*/external_react_default.a.createElement(external_react_event_listener_default.a, {
554
+ }, title), /*#__PURE__*/external_react_default.a.createElement(EventListener_default.a, {
562
555
  target: window,
563
- onResize: this.handleResize
556
+ eventType: "resize",
557
+ listener: this.handleResize
564
558
  }), /*#__PURE__*/external_react_default.a.createElement(StyledPanelBody, {
565
559
  $status: status,
566
560
  "data-test": "body",
@@ -577,6 +571,8 @@ Panel_defineProperty(Panel_Panel, "propTypes", Panel_propTypes);
577
571
 
578
572
  Panel_defineProperty(Panel_Panel, "defaultProps", Panel_defaultProps);
579
573
 
574
+ Panel_defineProperty(Panel_Panel, "contextType", Concertina_ConcertinaContext);
575
+
580
576
  /* harmony default export */ var Concertina_Panel = (Panel_Panel);
581
577
  // CONCATENATED MODULE: ./src/Concertina/Concertina.tsx
582
578
  function Concertina_typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { Concertina_typeof = function _typeof(obj) { return typeof obj; }; } else { Concertina_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return Concertina_typeof(obj); }
@@ -616,6 +612,7 @@ function Concertina_defineProperty(obj, key, value) { if (key in obj) { Object.d
616
612
 
617
613
 
618
614
 
615
+
619
616
  var Concertina_propTypes = {
620
617
  children: external_prop_types_default.a.node,
621
618
  elementRef: external_prop_types_default.a.oneOfType([external_prop_types_default.a.func, external_prop_types_default.a.object])
@@ -804,27 +801,23 @@ var Concertina_Concertina = /*#__PURE__*/function (_Component) {
804
801
  }, {
805
802
  key: "render",
806
803
  value: function render() {
807
- var _this3 = this;
808
-
809
804
  var _this$props = this.props,
810
805
  children = _this$props.children,
811
806
  otherProps = _objectWithoutProperties(_this$props, ["children"]);
812
807
 
813
- var childrenCleaned = external_react_["Children"].toArray(children).filter(external_react_["isValidElement"]).map(function (item, i) {
808
+ var childrenCleaned = external_react_["Children"].toArray(children).filter(external_react_["isValidElement"]).map(function (item, index) {
814
809
  return /*#__PURE__*/Object(external_react_["cloneElement"])(item, {
815
- panelId: item.props.panelId || "".concat(i),
816
- index: i,
817
- onHeadingClick: _this3.handleClick,
818
- onChange: _this3.handleUpdate
810
+ index: index
819
811
  });
820
812
  });
821
813
  var topPanels = Object(external_lodash_["take"])(childrenCleaned, this.state.panelsTopCount);
822
814
  var bottomPanels = Object(external_lodash_["takeRight"])(childrenCleaned, this.state.panelsBottomCount);
823
815
  return /*#__PURE__*/external_react_default.a.createElement(StyledBox, Concertina_extends({
824
816
  "data-test": "concertina"
825
- }, otherProps), /*#__PURE__*/external_react_default.a.createElement(external_react_event_listener_default.a, {
826
- target: "window",
827
- onResize: this.handleResize
817
+ }, otherProps), /*#__PURE__*/external_react_default.a.createElement(EventListener_default.a, {
818
+ target: window,
819
+ eventType: "resize",
820
+ listener: this.handleResize
828
821
  }), this.state.panelsTopCount > 0 && /*#__PURE__*/external_react_default.a.createElement(StyledTop, {
829
822
  style: {
830
823
  width: this.state.innerWidth
@@ -838,7 +831,12 @@ var Concertina_Concertina = /*#__PURE__*/function (_Component) {
838
831
  "data-test": "scroll",
839
832
  top: this.state.targetTop,
840
833
  onScrollComplete: this.handleScrollComplete
841
- }, childrenCleaned), this.state.panelsBottomCount > 0 && /*#__PURE__*/external_react_default.a.createElement(StyledBottom, {
834
+ }, /*#__PURE__*/external_react_default.a.createElement(Concertina_ConcertinaContext.Provider, {
835
+ value: {
836
+ onHeadingClick: this.handleClick,
837
+ onChange: this.handleUpdate
838
+ }
839
+ }, childrenCleaned)), this.state.panelsBottomCount > 0 && /*#__PURE__*/external_react_default.a.createElement(StyledBottom, {
842
840
  style: {
843
841
  width: this.state.innerWidth
844
842
  },
@@ -864,10 +862,17 @@ Concertina_defineProperty(Concertina_Concertina, "Panel", Concertina_Panel);
864
862
 
865
863
  /***/ }),
866
864
 
867
- /***/ 15:
865
+ /***/ 12:
866
+ /***/ (function(module, exports) {
867
+
868
+ module.exports = require("@splunk/react-ui/Clickable");
869
+
870
+ /***/ }),
871
+
872
+ /***/ 14:
868
873
  /***/ (function(module, exports) {
869
874
 
870
- module.exports = require("react-event-listener");
875
+ module.exports = require("@splunk/react-ui/EventListener");
871
876
 
872
877
  /***/ }),
873
878
 
@@ -892,7 +897,7 @@ module.exports = require("lodash");
892
897
 
893
898
  /***/ }),
894
899
 
895
- /***/ 58:
900
+ /***/ 61:
896
901
  /***/ (function(module, exports) {
897
902
 
898
903
  module.exports = require("@splunk/react-ui/Scroll");