@splunk/react-ui 4.20.0 → 4.21.1

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 (101) hide show
  1. package/Accordion.js +425 -441
  2. package/Anchor.js +147 -193
  3. package/Animation.js +142 -166
  4. package/AnimationToggle.js +197 -253
  5. package/Box.js +145 -194
  6. package/Breadcrumbs.js +288 -298
  7. package/Button.js +488 -613
  8. package/ButtonGroup.js +160 -212
  9. package/ButtonSimple.js +543 -562
  10. package/CHANGELOG.md +26 -0
  11. package/Calendar.js +1107 -1195
  12. package/Card.js +771 -746
  13. package/CardLayout.js +205 -223
  14. package/Chip.js +509 -612
  15. package/Clickable.js +416 -472
  16. package/CloseButton.js +165 -250
  17. package/Code.js +1808 -2172
  18. package/Code.js.LICENSE.txt +8 -0
  19. package/CollapsiblePanel.js +586 -675
  20. package/Color.js +1066 -1297
  21. package/ColumnLayout.js +402 -465
  22. package/ComboBox.js +892 -969
  23. package/Concertina.js +998 -963
  24. package/ControlGroup.js +687 -718
  25. package/Date.js +567 -697
  26. package/DefinitionList.js +308 -310
  27. package/Divider.js +149 -194
  28. package/Dropdown.js +459 -558
  29. package/DualListbox.js +1480 -1735
  30. package/EventListener.js +94 -165
  31. package/File.js +1051 -1173
  32. package/FormRows.js +885 -880
  33. package/Heading.js +216 -263
  34. package/Image.js +446 -558
  35. package/JSONTree.js +690 -699
  36. package/Layer.js +442 -582
  37. package/Link.js +336 -361
  38. package/List.js +213 -237
  39. package/Markdown.js +510 -612
  40. package/Menu.js +1109 -1331
  41. package/Message.js +474 -629
  42. package/MessageBar.js +387 -561
  43. package/Modal.js +810 -798
  44. package/ModalLayer.js +326 -343
  45. package/Monogram.js +308 -368
  46. package/Multiselect.js +3558 -3998
  47. package/Number.js +729 -843
  48. package/Paginator.js +510 -615
  49. package/Paragraph.js +145 -188
  50. package/Popover.js +1470 -1693
  51. package/Progress.js +301 -362
  52. package/RadioBar.js +610 -651
  53. package/RadioList.js +483 -544
  54. package/Resize.js +530 -623
  55. package/ResultsMenu.js +494 -597
  56. package/ScreenReaderContent.js +142 -187
  57. package/Scroll.js +595 -598
  58. package/ScrollContainerContext.js +197 -278
  59. package/Search.js +745 -817
  60. package/Select.js +2441 -2746
  61. package/SidePanel.js +390 -392
  62. package/Slider.js +668 -825
  63. package/SlidingPanels.js +639 -645
  64. package/SplitButton.js +464 -499
  65. package/StaticContent.js +161 -217
  66. package/StepBar.js +386 -466
  67. package/Switch.js +710 -764
  68. package/TabBar.js +724 -815
  69. package/TabLayout.js +406 -438
  70. package/Table.js +4842 -5121
  71. package/Text.js +1169 -1351
  72. package/TextArea.js +1097 -1307
  73. package/Tooltip.js +624 -721
  74. package/TransitionOpen.js +489 -546
  75. package/Typography.js +176 -229
  76. package/WaitSpinner.js +230 -298
  77. package/package.json +14 -15
  78. package/stubs-splunkui.d.ts +4 -1
  79. package/types/src/ComboBox/Option.d.ts +1 -1
  80. package/types/src/Concertina/Concertina.d.ts +4 -0
  81. package/types/src/JSONTree/JSONTreeContext.d.ts +7 -0
  82. package/types/src/JSONTree/TreeNode.d.ts +5 -0
  83. package/types/src/Link/Link.d.ts +7 -3
  84. package/types/src/Link/docs/examples/NewWindow.d.ts +2 -0
  85. package/types/src/Markdown/Markdown.d.ts +1 -1
  86. package/types/src/Markdown/renderers/MarkdownHeading.d.ts +1 -1
  87. package/types/src/Menu/Item.d.ts +1 -1
  88. package/types/src/Menu/Menu.d.ts +1 -0
  89. package/types/src/MessageBar/docs/examples/WithActions.d.ts +2 -0
  90. package/types/src/Multiselect/Option.d.ts +1 -1
  91. package/types/src/Search/Option.d.ts +1 -1
  92. package/types/src/Select/Option.d.ts +1 -1
  93. package/types/src/Select/OptionBase.d.ts +1 -1
  94. package/types/src/fixtures/FetchOptions.d.ts +2 -8
  95. package/useForceUpdate.js +112 -146
  96. package/useKeyPress.js +74 -128
  97. package/usePrevious.js +65 -129
  98. package/useRovingFocus.js +122 -218
  99. package/types/src/Link/docs/examples/NewTab.d.ts +0 -2
  100. /package/types/src/Table/docs/examples/{DockedHeader.d.ts → DockedHeaderScrollbar.d.ts} +0 -0
  101. /package/types/src/Table/docs/examples/prisma/{DockedHeader.d.ts → DockedHeaderScrollbar.d.ts} +0 -0
@@ -1,680 +1,591 @@
1
- module.exports =
2
- /******/ (function(modules) { // webpackBootstrap
3
- /******/ // The module cache
4
- /******/ var installedModules = {};
5
- /******/
6
- /******/ // The require function
7
- /******/ function __webpack_require__(moduleId) {
8
- /******/
9
- /******/ // Check if module is in cache
10
- /******/ if(installedModules[moduleId]) {
11
- /******/ return installedModules[moduleId].exports;
12
- /******/ }
13
- /******/ // Create a new module (and put it into the cache)
14
- /******/ var module = installedModules[moduleId] = {
15
- /******/ i: moduleId,
16
- /******/ l: false,
17
- /******/ exports: {}
18
- /******/ };
19
- /******/
20
- /******/ // Execute the module function
21
- /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
22
- /******/
23
- /******/ // Flag the module as loaded
24
- /******/ module.l = true;
25
- /******/
26
- /******/ // Return the exports of the module
27
- /******/ return module.exports;
28
- /******/ }
29
- /******/
30
- /******/
31
- /******/ // expose the modules object (__webpack_modules__)
32
- /******/ __webpack_require__.m = modules;
33
- /******/
34
- /******/ // expose the module cache
35
- /******/ __webpack_require__.c = installedModules;
36
- /******/
37
- /******/ // define getter function for harmony exports
38
- /******/ __webpack_require__.d = function(exports, name, getter) {
39
- /******/ if(!__webpack_require__.o(exports, name)) {
40
- /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
41
- /******/ }
42
- /******/ };
43
- /******/
44
- /******/ // define __esModule on exports
45
- /******/ __webpack_require__.r = function(exports) {
46
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
47
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
48
- /******/ }
49
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
50
- /******/ };
51
- /******/
52
- /******/ // create a fake namespace object
53
- /******/ // mode & 1: value is a module id, require it
54
- /******/ // mode & 2: merge all properties of value into the ns
55
- /******/ // mode & 4: return value when already ns object
56
- /******/ // mode & 8|1: behave like require
57
- /******/ __webpack_require__.t = function(value, mode) {
58
- /******/ if(mode & 1) value = __webpack_require__(value);
59
- /******/ if(mode & 8) return value;
60
- /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
61
- /******/ var ns = Object.create(null);
62
- /******/ __webpack_require__.r(ns);
63
- /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
64
- /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
65
- /******/ return ns;
66
- /******/ };
67
- /******/
68
- /******/ // getDefaultExport function for compatibility with non-harmony modules
69
- /******/ __webpack_require__.n = function(module) {
70
- /******/ var getter = module && module.__esModule ?
71
- /******/ function getDefault() { return module['default']; } :
72
- /******/ function getModuleExports() { return module; };
73
- /******/ __webpack_require__.d(getter, 'a', getter);
74
- /******/ return getter;
75
- /******/ };
76
- /******/
77
- /******/ // Object.prototype.hasOwnProperty.call
78
- /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
79
- /******/
80
- /******/ // __webpack_public_path__
81
- /******/ __webpack_require__.p = "";
82
- /******/
83
- /******/
84
- /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 199);
86
- /******/ })
87
- /************************************************************************/
88
- /******/ ({
89
-
90
- /***/ 0:
91
- /***/ (function(module, exports) {
92
-
93
- module.exports = require("@splunk/themes");
94
-
95
- /***/ }),
96
-
97
- /***/ 1:
98
- /***/ (function(module, exports) {
99
-
100
- module.exports = require("prop-types");
101
-
102
- /***/ }),
103
-
104
- /***/ 11:
105
- /***/ (function(module, exports) {
106
-
107
- module.exports = require("lodash/has");
108
-
109
- /***/ }),
110
-
111
- /***/ 12:
112
- /***/ (function(module, exports) {
113
-
114
- module.exports = require("@splunk/react-ui/Clickable");
115
-
116
- /***/ }),
117
-
118
- /***/ 199:
119
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
120
-
121
- "use strict";
122
- // ESM COMPAT FLAG
123
- __webpack_require__.r(__webpack_exports__);
124
-
125
- // EXPORTS
126
- __webpack_require__.d(__webpack_exports__, "default", function() { return /* reexport */ src_CollapsiblePanel_CollapsiblePanel; });
127
-
128
- // EXTERNAL MODULE: external "react"
129
- var external_react_ = __webpack_require__(2);
130
- var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
131
-
132
- // EXTERNAL MODULE: external "prop-types"
133
- var external_prop_types_ = __webpack_require__(1);
134
- var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_);
135
-
136
- // EXTERNAL MODULE: external "lodash/has"
137
- var has_ = __webpack_require__(11);
138
- var has_default = /*#__PURE__*/__webpack_require__.n(has_);
139
-
140
- // EXTERNAL MODULE: external "lodash/keys"
141
- var keys_ = __webpack_require__(9);
142
- var keys_default = /*#__PURE__*/__webpack_require__.n(keys_);
143
-
144
- // EXTERNAL MODULE: external "lodash/omit"
145
- var omit_ = __webpack_require__(5);
146
- var omit_default = /*#__PURE__*/__webpack_require__.n(omit_);
147
-
148
- // EXTERNAL MODULE: external "@splunk/ui-utils/id"
149
- var id_ = __webpack_require__(8);
150
-
151
- // EXTERNAL MODULE: external "@splunk/react-ui/TransitionOpen"
152
- var TransitionOpen_ = __webpack_require__(74);
153
- var TransitionOpen_default = /*#__PURE__*/__webpack_require__.n(TransitionOpen_);
154
-
155
- // EXTERNAL MODULE: external "styled-components"
156
- var external_styled_components_ = __webpack_require__(3);
157
- var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_);
158
-
159
- // EXTERNAL MODULE: external "@splunk/react-ui/Box"
160
- var Box_ = __webpack_require__(6);
161
- var Box_default = /*#__PURE__*/__webpack_require__.n(Box_);
162
-
163
- // EXTERNAL MODULE: external "@splunk/react-ui/Clickable"
164
- var Clickable_ = __webpack_require__(12);
165
- var Clickable_default = /*#__PURE__*/__webpack_require__.n(Clickable_);
166
-
167
- // EXTERNAL MODULE: external "@splunk/themes"
168
- var themes_ = __webpack_require__(0);
169
-
170
- // CONCATENATED MODULE: ./src/CollapsiblePanel/CollapsiblePanelStyles.ts
171
-
172
-
173
-
174
-
175
- var StyledBox = external_styled_components_default()(Box_default.a).withConfig({
176
- displayName: "CollapsiblePanelStyles__StyledBox",
177
- componentId: "sc-1phikbp-0"
178
- })(["display:flex;flex-direction:column;min-height:", ";", ";& + &{margin-top:", ";}"], Object(themes_["pick"])({
179
- enterprise: Object(external_styled_components_["css"])(["calc(", " + 12px)"], themes_["variables"].lineHeight),
180
- prisma: {
181
- comfortable: '56px',
182
- compact: '48px'
183
- }
184
- }), Object(themes_["pick"])({
185
- prisma: Object(external_styled_components_["css"])(["background-color:", ";"], themes_["variables"].backgroundColorSection)
186
- }), Object(themes_["pick"])({
187
- enterprise: '2px',
188
- prisma: '1px'
189
- }));
190
- var StyledIcon = external_styled_components_default.a.span.withConfig({
191
- displayName: "CollapsiblePanelStyles__StyledIcon",
192
- componentId: "sc-1phikbp-1"
193
- })(["position:absolute;left:", ";transition:transform ", ";", ";"], Object(themes_["pick"])({
194
- enterprise: '12px',
195
- prisma: '20px'
196
- }), Object(themes_["pick"])({
197
- enterprise: '300ms',
198
- prisma: '200ms'
199
- }), Object(themes_["pick"])({
200
- prisma: Object(external_styled_components_["css"])(["color:", ";display:flex;top:", ";[disabled] > &{color:inherit;}"], themes_["variables"].contentColorDefault, Object(themes_["pick"])({
201
- comfortable: '20px',
202
- compact: '16px'
203
- }))
204
- }));
205
- var StyledTitleWithActions = external_styled_components_default.a.div.withConfig({
206
- displayName: "CollapsiblePanelStyles__StyledTitleWithActions",
207
- componentId: "sc-1phikbp-2"
208
- })(["flex-shrink:0;border-bottom:0;position:relative;padding:", ";transition:background-color 0.2s,border 0.2s,box-shadow 0.2s;color:", ";", " ", ""], Object(themes_["pick"])({
209
- enterprise: Object(external_styled_components_["css"])(["", " ", " ", " 30px"], themes_["variables"].spacingXSmall, themes_["variables"].spacingSmall, themes_["variables"].spacingXSmall),
210
- prisma: {
211
- comfortable: '8px 10px 8px 52px',
212
- compact: '8px 10px 8px 52px'
213
- }
214
- }), Object(themes_["pick"])({
215
- enterprise: themes_["variables"].textColor,
216
- prisma: themes_["variables"].contentColorActive
217
- }), Object(themes_["pick"])({
218
- prisma: Object(external_styled_components_["css"])(["background-color:", ";"], themes_["variables"].interactiveColorBackground),
219
- enterprise: {
220
- dark: Object(external_styled_components_["css"])(["background-color:", ";"], themes_["variables"].gray45),
221
- light: Object(external_styled_components_["css"])(["background-color:", ";"], themes_["variables"].gray96)
222
- }
223
- }), function (_ref) {
224
- var $disabled = _ref.$disabled;
225
- return $disabled && Object(external_styled_components_["css"])(["cursor:default;color:", ";"], Object(themes_["pick"])({
226
- enterprise: themes_["variables"].contentColorDefault,
227
- prisma: themes_["variables"].contentColorDisabled
228
- }));
229
- });
230
- var StyledClickableIcon = external_styled_components_default()(Clickable_default.a).withConfig({
231
- displayName: "CollapsiblePanelStyles__StyledClickableIcon",
232
- componentId: "sc-1phikbp-3"
233
- })(["position:absolute;left:", ";padding:", ";top:8px;& > svg{transition:transform ", ";}", ";", " &:focus:not([disabled]),&:active:not([disabled]){color:", ";box-shadow:", ";}&:hover:not([disabled]){color:", ";background-color:", ";}"], Object(themes_["pick"])({
234
- enterprise: '4px',
235
- prisma: '8px'
236
- }), Object(themes_["pick"])({
237
- enterprise: {
238
- comfortable: '2px 8px',
239
- compact: '0px 8px'
240
- },
241
- prisma: {
242
- comfortable: '14px',
243
- compact: '8px'
244
- }
245
- }), Object(themes_["pick"])({
246
- enterprise: '300ms',
247
- prisma: '200ms'
248
- }), Object(themes_["pick"])({
249
- prisma: Object(external_styled_components_["css"])(["color:", ";display:flex;[disabled] > &{color:inherit;}"], themes_["variables"].contentColorDefault)
250
- }), Object(themes_["pickVariant"])('$open', {
251
- "true": Object(external_styled_components_["css"])(["& > svg{transform:rotate(90deg);}"])
252
- }), Object(themes_["pick"])({
253
- enterprise: themes_["variables"].textColor,
254
- prisma: themes_["variables"].contentColorActive
255
- }), themes_["variables"].focusShadowInset, Object(themes_["pick"])({
256
- enterprise: themes_["variables"].textColor,
257
- prisma: themes_["variables"].contentColorActive
258
- }), Object(themes_["pick"])({
259
- enterprise: {
260
- light: themes_["variables"].gray92,
261
- dark: themes_["variables"].gray30
262
- },
263
- prisma: themes_["mixins"].overlayColors(themes_["variables"].interactiveColorBackground, themes_["variables"].interactiveColorOverlayHover)
264
- }));
265
- var StyledTitleClickable = external_styled_components_default()(Clickable_default.a).withConfig({
266
- displayName: "CollapsiblePanelStyles__StyledTitleClickable",
267
- componentId: "sc-1phikbp-4"
268
- })(["width:100%;flex-shrink:0;border-bottom:0;cursor:pointer;position:relative;display:block;transition:background-color 0.2s,border 0.2s,box-shadow 0.2s;padding:", ";color:", ";", " ", " &[disabled]{cursor:default;color:", ";}&:focus:not([disabled]),&:active:not([disabled]){color:", ";box-shadow:", ";}&:hover:not([disabled]){color:", ";background-color:", ";}"], Object(themes_["pick"])({
269
- enterprise: '6px 30px',
270
- prisma: {
271
- comfortable: '18px 20px 18px 52px',
272
- compact: '14px 20px 14px 52px'
273
- }
274
- }), Object(themes_["pick"])({
275
- enterprise: themes_["variables"].textColor,
276
- prisma: themes_["variables"].contentColorActive
277
- }), Object(themes_["pick"])({
278
- prisma: Object(external_styled_components_["css"])(["background-color:", ";"], themes_["variables"].interactiveColorBackground)
279
- }), Object(themes_["pickVariant"])('$open', {
280
- "true": Object(external_styled_components_["css"])(["", "{transform:rotate(90deg);}"],
281
- /* sc-sel */
282
- StyledIcon),
283
- "false": {
284
- enterprise: {
285
- dark: Object(external_styled_components_["css"])(["background-color:", ";"], themes_["variables"].gray45),
286
- light: Object(external_styled_components_["css"])(["background-color:", ";"], themes_["variables"].gray96)
1
+ /******/ (() => {
2
+ // webpackBootstrap
3
+ /******/ "use strict";
4
+ /******/ // The require scope
5
+ /******/ var e = {};
6
+ /******/
7
+ /************************************************************************/
8
+ /******/ /* webpack/runtime/compat get default export */
9
+ /******/ (() => {
10
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
11
+ /******/ e.n = t => {
12
+ /******/ var r = t && t.__esModule ?
13
+ /******/ () => t["default"]
14
+ /******/ : () => t
15
+ /******/;
16
+ e.d(r, {
17
+ a: r
18
+ });
19
+ /******/ return r;
20
+ /******/ };
21
+ /******/ })();
22
+ /******/
23
+ /******/ /* webpack/runtime/define property getters */
24
+ /******/ (() => {
25
+ /******/ // define getter functions for harmony exports
26
+ /******/ e.d = (t, r) => {
27
+ /******/ for (var o in r) {
28
+ /******/ if (e.o(r, o) && !e.o(t, o)) {
29
+ /******/ Object.defineProperty(t, o, {
30
+ enumerable: true,
31
+ get: r[o]
32
+ });
33
+ /******/ }
34
+ /******/ }
35
+ /******/ };
36
+ /******/ })();
37
+ /******/
38
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
39
+ /******/ (() => {
40
+ /******/ e.o = (e, t) => Object.prototype.hasOwnProperty.call(e, t)
41
+ /******/;
42
+ })();
43
+ /******/
44
+ /******/ /* webpack/runtime/make namespace object */
45
+ /******/ (() => {
46
+ /******/ // define __esModule on exports
47
+ /******/ e.r = e => {
48
+ /******/ if (typeof Symbol !== "undefined" && Symbol.toStringTag) {
49
+ /******/ Object.defineProperty(e, Symbol.toStringTag, {
50
+ value: "Module"
51
+ });
52
+ /******/ }
53
+ /******/ Object.defineProperty(e, "__esModule", {
54
+ value: true
55
+ });
56
+ /******/ };
57
+ /******/ })();
58
+ /******/
59
+ /************************************************************************/ var t = {};
60
+ // ESM COMPAT FLAG
61
+ e.r(t);
62
+ // EXPORTS
63
+ e.d(t, {
64
+ default: () => /* reexport */ te
65
+ });
66
+ // CONCATENATED MODULE: external "react"
67
+ const r = require("react");
68
+ var o = e.n(r);
69
+ // CONCATENATED MODULE: external "prop-types"
70
+ const n = require("prop-types");
71
+ var i = e.n(n);
72
+ // CONCATENATED MODULE: external "lodash/has"
73
+ const a = require("lodash/has");
74
+ var l = e.n(a);
75
+ // CONCATENATED MODULE: external "lodash/keys"
76
+ const s = require("lodash/keys");
77
+ var c = e.n(s);
78
+ // CONCATENATED MODULE: external "lodash/omit"
79
+ const p = require("lodash/omit");
80
+ var d = e.n(p);
81
+ // CONCATENATED MODULE: external "@splunk/ui-utils/id"
82
+ const u = require("@splunk/ui-utils/id");
83
+ // CONCATENATED MODULE: external "@splunk/react-ui/TransitionOpen"
84
+ const f = require("@splunk/react-ui/TransitionOpen");
85
+ var b = e.n(f);
86
+ // CONCATENATED MODULE: external "styled-components"
87
+ const v = require("styled-components");
88
+ var m = e.n(v);
89
+ // CONCATENATED MODULE: external "@splunk/react-ui/Box"
90
+ const h = require("@splunk/react-ui/Box");
91
+ var y = e.n(h);
92
+ // CONCATENATED MODULE: external "@splunk/react-ui/Clickable"
93
+ const g = require("@splunk/react-ui/Clickable");
94
+ var k = e.n(g);
95
+ // CONCATENATED MODULE: external "@splunk/themes"
96
+ const C = require("@splunk/themes");
97
+ // CONCATENATED MODULE: ./src/CollapsiblePanel/CollapsiblePanelStyles.ts
98
+ var x = m()(y()).withConfig({
99
+ displayName: "CollapsiblePanelStyles__StyledBox",
100
+ componentId: "sc-1phikbp-0"
101
+ })([ "display:flex;flex-direction:column;min-height:", ";", ";& + &{margin-top:", ";}" ], (0,
102
+ C.pick)({
103
+ enterprise: (0, v.css)([ "calc(", " + 12px)" ], C.variables.lineHeight),
104
+ prisma: {
105
+ comfortable: "56px",
106
+ compact: "48px"
107
+ }
108
+ }), (0, C.pick)({
109
+ prisma: (0, v.css)([ "background-color:", ";" ], C.variables.backgroundColorSection)
110
+ }), (0, C.pick)({
111
+ enterprise: "2px",
112
+ prisma: "1px"
113
+ }));
114
+ var O = m().span.withConfig({
115
+ displayName: "CollapsiblePanelStyles__StyledIcon",
116
+ componentId: "sc-1phikbp-1"
117
+ })([ "position:absolute;left:", ";transition:transform ", ";", ";" ], (0, C.pick)({
118
+ enterprise: "12px",
119
+ prisma: "20px"
120
+ }), (0, C.pick)({
121
+ enterprise: "300ms",
122
+ prisma: "200ms"
123
+ }), (0, C.pick)({
124
+ prisma: (0, v.css)([ "color:", ";display:flex;top:", ";[disabled] > &{color:inherit;}" ], C.variables.contentColorDefault, (0,
125
+ C.pick)({
126
+ comfortable: "20px",
127
+ compact: "16px"
128
+ }))
129
+ }));
130
+ var S = m().div.withConfig({
131
+ displayName: "CollapsiblePanelStyles__StyledTitleWithActions",
132
+ componentId: "sc-1phikbp-2"
133
+ })([ "flex-shrink:0;border-bottom:0;position:relative;padding:", ";transition:background-color 0.2s,border 0.2s,box-shadow 0.2s;color:", ";", " ", "" ], (0,
134
+ C.pick)({
135
+ enterprise: (0, v.css)([ "", " ", " ", " 30px" ], C.variables.spacingXSmall, C.variables.spacingSmall, C.variables.spacingXSmall),
136
+ prisma: {
137
+ comfortable: "8px 10px 8px 52px",
138
+ compact: "8px 10px 8px 52px"
139
+ }
140
+ }), (0, C.pick)({
141
+ enterprise: C.variables.textColor,
142
+ prisma: C.variables.contentColorActive
143
+ }), (0, C.pick)({
144
+ prisma: (0, v.css)([ "background-color:", ";" ], C.variables.interactiveColorBackground),
145
+ enterprise: {
146
+ dark: (0, v.css)([ "background-color:", ";" ], C.variables.gray45),
147
+ light: (0, v.css)([ "background-color:", ";" ], C.variables.gray96)
148
+ }
149
+ }), (function(e) {
150
+ var t = e.$disabled;
151
+ return t && (0, v.css)([ "cursor:default;color:", ";" ], (0, C.pick)({
152
+ enterprise: C.variables.contentColorDefault,
153
+ prisma: C.variables.contentColorDisabled
154
+ }));
155
+ }));
156
+ var w = m()(k()).withConfig({
157
+ displayName: "CollapsiblePanelStyles__StyledClickableIcon",
158
+ componentId: "sc-1phikbp-3"
159
+ })([ "position:absolute;left:", ";padding:", ";top:8px;& > svg{transition:transform ", ";}", ";", " &:focus:not([disabled]),&:active:not([disabled]){color:", ";box-shadow:", ";}&:hover:not([disabled]){color:", ";background-color:", ";}" ], (0,
160
+ C.pick)({
161
+ enterprise: "4px",
162
+ prisma: "8px"
163
+ }), (0, C.pick)({
164
+ enterprise: {
165
+ comfortable: "2px 8px",
166
+ compact: "0px 8px"
167
+ },
168
+ prisma: {
169
+ comfortable: "14px",
170
+ compact: "8px"
171
+ }
172
+ }), (0, C.pick)({
173
+ enterprise: "300ms",
174
+ prisma: "200ms"
175
+ }), (0, C.pick)({
176
+ prisma: (0, v.css)([ "color:", ";display:flex;[disabled] > &{color:inherit;}" ], C.variables.contentColorDefault)
177
+ }), (0, C.pickVariant)("$open", {
178
+ true: (0, v.css)([ "& > svg{transform:rotate(90deg);}" ])
179
+ }), (0, C.pick)({
180
+ enterprise: C.variables.textColor,
181
+ prisma: C.variables.contentColorActive
182
+ }), C.variables.focusShadowInset, (0, C.pick)({
183
+ enterprise: C.variables.textColor,
184
+ prisma: C.variables.contentColorActive
185
+ }), (0, C.pick)({
186
+ enterprise: {
187
+ light: C.variables.gray92,
188
+ dark: C.variables.gray30
189
+ },
190
+ prisma: C.mixins.overlayColors(C.variables.interactiveColorBackground, C.variables.interactiveColorOverlayHover)
191
+ }));
192
+ var P = m()(k()).withConfig({
193
+ displayName: "CollapsiblePanelStyles__StyledTitleClickable",
194
+ componentId: "sc-1phikbp-4"
195
+ })([ "width:100%;flex-shrink:0;border-bottom:0;cursor:pointer;position:relative;display:block;transition:background-color 0.2s,border 0.2s,box-shadow 0.2s;padding:", ";color:", ";", " ", " &[disabled]{cursor:default;color:", ";}&:focus:not([disabled]),&:active:not([disabled]){color:", ";box-shadow:", ";}&:hover:not([disabled]){color:", ";background-color:", ";}" ], (0,
196
+ C.pick)({
197
+ enterprise: "6px 30px",
198
+ prisma: {
199
+ comfortable: "18px 20px 18px 52px",
200
+ compact: "14px 20px 14px 52px"
201
+ }
202
+ }), (0, C.pick)({
203
+ enterprise: C.variables.textColor,
204
+ prisma: C.variables.contentColorActive
205
+ }), (0, C.pick)({
206
+ prisma: (0, v.css)([ "background-color:", ";" ], C.variables.interactiveColorBackground)
207
+ }), (0, C.pickVariant)("$open", {
208
+ true: (0, v.css)([ "", "{transform:rotate(90deg);}" ],
209
+ /* sc-sel */
210
+ O),
211
+ false: {
212
+ enterprise: {
213
+ dark: (0, v.css)([ "background-color:", ";" ], C.variables.gray45),
214
+ light: (0, v.css)([ "background-color:", ";" ], C.variables.gray96)
215
+ }
216
+ }
217
+ }), (0, C.pick)({
218
+ enterprise: C.variables.contentColorDefault,
219
+ prisma: C.variables.contentColorDisabled
220
+ }), (0, C.pick)({
221
+ enterprise: C.variables.textColor,
222
+ prisma: C.variables.contentColorActive
223
+ }), C.variables.focusShadowInset, (0, C.pick)({
224
+ enterprise: C.variables.textColor,
225
+ prisma: C.variables.contentColorActive
226
+ }), (0, C.pick)({
227
+ enterprise: {
228
+ light: C.variables.gray92,
229
+ dark: C.variables.gray30
230
+ },
231
+ prisma: C.mixins.overlayColors(C.variables.interactiveColorBackground, C.variables.interactiveColorOverlayHover)
232
+ }));
233
+ var I = m().span.withConfig({
234
+ displayName: "CollapsiblePanelStyles__StyledHeadingContent",
235
+ componentId: "sc-1phikbp-5"
236
+ })([ "display:flex;justify-content:space-between;", " ", "" ], (0, C.pick)({
237
+ prisma: (0, v.css)([ "font-weight:", ";" ], C.variables.fontWeightSemiBold)
238
+ }), (function(e) {
239
+ var t = e.$titleWithActions;
240
+ return t && (0, v.css)([ "min-height:", ";" ], (0, C.pick)({
241
+ prisma: {
242
+ comfortable: "40px",
243
+ compact: "32px"
244
+ }
245
+ }));
246
+ }));
247
+ var j = m().span.withConfig({
248
+ displayName: "CollapsiblePanelStyles__StyledDescription",
249
+ componentId: "sc-1phikbp-6"
250
+ })([ "font-size:", ";margin-left:", ";" ], C.variables.fontSizeSmall, (0, C.pick)({
251
+ enterprise: C.variables.spacingHalf,
252
+ prisma: C.variables.spacingLarge
253
+ }));
254
+ // CONCATENATED MODULE: external "@splunk/react-icons/ChevronRight"
255
+ const _ = require("@splunk/react-icons/ChevronRight");
256
+ var E = e.n(_);
257
+ // CONCATENATED MODULE: external "@splunk/react-icons/enterprise/ChevronRight"
258
+ const q = require("@splunk/react-icons/enterprise/ChevronRight");
259
+ var R = e.n(q);
260
+ // CONCATENATED MODULE: external "@splunk/ui-utils/i18n"
261
+ const D = require("@splunk/ui-utils/i18n");
262
+ // CONCATENATED MODULE: ./src/CollapsiblePanel/icons/ExpandPanel.tsx
263
+ var A = {
264
+ open: i().bool
265
+ };
266
+ var T = function e(t) {
267
+ var r = t.open;
268
+ var n = (0, C.useSplunkTheme)(), i = n.isEnterprise;
269
+ var a = r ? (0, D._)("Panel is open") : (0, D._)("Panel is closed");
270
+ return i ? o().createElement(R(), {
271
+ hideDefaultTooltip: true,
272
+ screenReaderText: a
273
+ }) : o().createElement(E(), {
274
+ "aria-label": a
275
+ });
276
+ };
277
+ T.propTypes = A;
278
+ /* harmony default export */ const W = T;
279
+ // CONCATENATED MODULE: ./src/CollapsiblePanel/CollapsiblePanel.tsx
280
+ function B(e) {
281
+ "@babel/helpers - typeof";
282
+ if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
283
+ B = function e(t) {
284
+ return typeof t;
285
+ };
286
+ } else {
287
+ B = function e(t) {
288
+ return t && typeof Symbol === "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
289
+ };
290
+ }
291
+ return B(e);
287
292
  }
288
- }
289
- }), Object(themes_["pick"])({
290
- enterprise: themes_["variables"].contentColorDefault,
291
- prisma: themes_["variables"].contentColorDisabled
292
- }), Object(themes_["pick"])({
293
- enterprise: themes_["variables"].textColor,
294
- prisma: themes_["variables"].contentColorActive
295
- }), themes_["variables"].focusShadowInset, Object(themes_["pick"])({
296
- enterprise: themes_["variables"].textColor,
297
- prisma: themes_["variables"].contentColorActive
298
- }), Object(themes_["pick"])({
299
- enterprise: {
300
- light: themes_["variables"].gray92,
301
- dark: themes_["variables"].gray30
302
- },
303
- prisma: themes_["mixins"].overlayColors(themes_["variables"].interactiveColorBackground, themes_["variables"].interactiveColorOverlayHover)
304
- }));
305
- var StyledHeadingContent = external_styled_components_default.a.span.withConfig({
306
- displayName: "CollapsiblePanelStyles__StyledHeadingContent",
307
- componentId: "sc-1phikbp-5"
308
- })(["display:flex;justify-content:space-between;", " ", ""], Object(themes_["pick"])({
309
- prisma: Object(external_styled_components_["css"])(["font-weight:", ";"], themes_["variables"].fontWeightSemiBold)
310
- }), function (_ref2) {
311
- var $titleWithActions = _ref2.$titleWithActions;
312
- return $titleWithActions && Object(external_styled_components_["css"])(["min-height:", ";"], Object(themes_["pick"])({
313
- prisma: {
314
- comfortable: '40px',
315
- compact: '32px'
293
+ function $() {
294
+ $ = Object.assign || function(e) {
295
+ for (var t = 1; t < arguments.length; t++) {
296
+ var r = arguments[t];
297
+ for (var o in r) {
298
+ if (Object.prototype.hasOwnProperty.call(r, o)) {
299
+ e[o] = r[o];
300
+ }
301
+ }
302
+ }
303
+ return e;
304
+ };
305
+ return $.apply(this, arguments);
316
306
  }
317
- }));
318
- });
319
- var StyledDescription = external_styled_components_default.a.span.withConfig({
320
- displayName: "CollapsiblePanelStyles__StyledDescription",
321
- componentId: "sc-1phikbp-6"
322
- })(["font-size:", ";margin-left:", ";"], themes_["variables"].fontSizeSmall, Object(themes_["pick"])({
323
- enterprise: themes_["variables"].spacingHalf,
324
- prisma: themes_["variables"].spacingLarge
325
- }));
326
-
327
- // EXTERNAL MODULE: external "@splunk/react-icons/ChevronRight"
328
- var ChevronRight_ = __webpack_require__(46);
329
- var ChevronRight_default = /*#__PURE__*/__webpack_require__.n(ChevronRight_);
330
-
331
- // EXTERNAL MODULE: external "@splunk/react-icons/enterprise/ChevronRight"
332
- var enterprise_ChevronRight_ = __webpack_require__(38);
333
- var enterprise_ChevronRight_default = /*#__PURE__*/__webpack_require__.n(enterprise_ChevronRight_);
334
-
335
- // EXTERNAL MODULE: external "@splunk/ui-utils/i18n"
336
- var i18n_ = __webpack_require__(4);
337
-
338
- // CONCATENATED MODULE: ./src/CollapsiblePanel/icons/ExpandPanel.tsx
339
-
340
-
341
-
342
-
343
-
344
-
345
- var propTypes = {
346
- open: external_prop_types_default.a.bool
347
- };
348
-
349
- var ExpandPanel_ChevronRight = function ChevronRight(_ref) {
350
- var open = _ref.open;
351
-
352
- var _useSplunkTheme = Object(themes_["useSplunkTheme"])(),
353
- isEnterprise = _useSplunkTheme.isEnterprise;
354
-
355
- var screenReaderText = open ? Object(i18n_["_"])('Panel is open') : Object(i18n_["_"])('Panel is closed');
356
- return isEnterprise ? /*#__PURE__*/external_react_default.a.createElement(enterprise_ChevronRight_default.a, {
357
- hideDefaultTooltip: true,
358
- screenReaderText: screenReaderText
359
- }) : /*#__PURE__*/external_react_default.a.createElement(ChevronRight_default.a, {
360
- "aria-label": screenReaderText
361
- });
362
- };
363
-
364
- ExpandPanel_ChevronRight.propTypes = propTypes;
365
- /* harmony default export */ var ExpandPanel = (ExpandPanel_ChevronRight);
366
- // CONCATENATED MODULE: ./src/CollapsiblePanel/CollapsiblePanel.tsx
367
- 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); }
368
-
369
- 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); }
370
-
371
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
372
-
373
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
374
-
375
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
376
-
377
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
378
-
379
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
380
-
381
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
382
-
383
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
384
-
385
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
386
-
387
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
388
-
389
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
390
-
391
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
392
-
393
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
394
-
395
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
396
-
397
-
398
-
399
-
400
-
401
-
402
-
403
-
404
-
405
-
406
- /** @public */
407
-
408
- var CollapsiblePanel_propTypes = {
409
- innerBodyStyles: external_prop_types_default.a.object,
410
- children: external_prop_types_default.a.node,
411
- defaultOpen: external_prop_types_default.a.bool,
412
- description: external_prop_types_default.a.string,
413
- disabled: external_prop_types_default.a.bool,
414
- elementRef: external_prop_types_default.a.oneOfType([external_prop_types_default.a.func, external_prop_types_default.a.object]),
415
- headingLevel: external_prop_types_default.a.number,
416
- onRequestClose: external_prop_types_default.a.func,
417
- onRequestOpen: external_prop_types_default.a.func,
418
- open: external_prop_types_default.a.bool,
419
- overflow: external_prop_types_default.a.string,
420
- panelId: external_prop_types_default.a.any,
421
- renderChildrenWhenCollapsed: external_prop_types_default.a.bool,
422
- title: external_prop_types_default.a.node.isRequired,
423
- titleWithActions: external_prop_types_default.a.bool
424
- };
425
- var defaultProps = {
426
- disabled: false,
427
- overflow: 'auto',
428
- renderChildrenWhenCollapsed: false,
429
- titleWithActions: false
430
- };
431
-
432
- var CollapsiblePanel_CollapsiblePanel = /*#__PURE__*/function (_Component) {
433
- _inherits(CollapsiblePanel, _Component);
434
-
435
- var _super = _createSuper(CollapsiblePanel);
436
-
437
- // @docs-props-type CollapsiblePanelPropsBase
438
- function CollapsiblePanel(props) {
439
- var _this;
440
-
441
- _classCallCheck(this, CollapsiblePanel);
442
-
443
- _this = _super.call(this, props);
444
-
445
- _defineProperty(_assertThisInitialized(_this), "controlledExternally", void 0);
446
-
447
- _defineProperty(_assertThisInitialized(_this), "containerId", void 0);
448
-
449
- _defineProperty(_assertThisInitialized(_this), "toggleId", void 0);
450
-
451
- _defineProperty(_assertThisInitialized(_this), "handleRequestClose", function (event) {
452
- var _this$props = _this.props,
453
- panelId = _this$props.panelId,
454
- onRequestClose = _this$props.onRequestClose;
455
- onRequestClose === null || onRequestClose === void 0 ? void 0 : onRequestClose({
456
- event: event,
457
- panelId: panelId,
458
- reason: 'toggleClick'
459
- });
460
-
461
- _this.setState(_objectSpread({
462
- animating: true
463
- }, !_this.isControlled() ? {
464
- open: false
465
- } : {}));
466
- });
467
-
468
- _defineProperty(_assertThisInitialized(_this), "handleRequestOpen", function (event) {
469
- var _this$props2 = _this.props,
470
- panelId = _this$props2.panelId,
471
- onRequestOpen = _this$props2.onRequestOpen;
472
- onRequestOpen === null || onRequestOpen === void 0 ? void 0 : onRequestOpen({
473
- event: event,
474
- panelId: panelId,
475
- reason: 'toggleClick'
476
- });
477
-
478
- _this.setState(_objectSpread({
479
- animating: true
480
- }, !_this.isControlled() ? {
481
- open: true
482
- } : {}));
483
- });
484
-
485
- _defineProperty(_assertThisInitialized(_this), "handleAnimationEnd", function () {
486
- _this.setState({
487
- animating: false
488
- });
489
- });
490
-
491
- _this.controlledExternally = has_default()(props, 'open');
492
- _this.state = _objectSpread({
493
- animating: false
494
- }, !_this.isControlled() ? {
495
- open: props.defaultOpen || false
496
- } : undefined);
497
-
498
- if (false) {}
499
-
500
- _this.containerId = "container-".concat(Object(id_["createGUID"])());
501
- _this.toggleId = "toggle-".concat(Object(id_["createGUID"])());
502
- return _this;
503
- }
504
-
505
- _createClass(CollapsiblePanel, [{
506
- key: "componentDidUpdate",
507
- value: function componentDidUpdate(prevProps) {
508
- if (this.props.open !== prevProps.open) {
509
- this.setState({
510
- animating: true
511
- }); // eslint-disable-line react/no-did-update-set-state
512
- }
513
-
514
- if (false) {}
515
-
516
- if (false) {}
307
+ function N(e, t) {
308
+ var r = Object.keys(e);
309
+ if (Object.getOwnPropertySymbols) {
310
+ var o = Object.getOwnPropertySymbols(e);
311
+ if (t) o = o.filter((function(t) {
312
+ return Object.getOwnPropertyDescriptor(e, t).enumerable;
313
+ }));
314
+ r.push.apply(r, o);
315
+ }
316
+ return r;
517
317
  }
518
- }, {
519
- key: "isControlled",
520
- value: function isControlled() {
521
- return this.controlledExternally;
318
+ function H(e) {
319
+ for (var t = 1; t < arguments.length; t++) {
320
+ var r = arguments[t] != null ? arguments[t] : {};
321
+ if (t % 2) {
322
+ N(Object(r), true).forEach((function(t) {
323
+ Q(e, t, r[t]);
324
+ }));
325
+ } else if (Object.getOwnPropertyDescriptors) {
326
+ Object.defineProperties(e, Object.getOwnPropertyDescriptors(r));
327
+ } else {
328
+ N(Object(r)).forEach((function(t) {
329
+ Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(r, t));
330
+ }));
331
+ }
332
+ }
333
+ return e;
522
334
  }
523
- }, {
524
- key: "render",
525
- value: function render() {
526
- var _this$props3 = this.props,
527
- innerBodyStyles = _this$props3.innerBodyStyles,
528
- children = _this$props3.children,
529
- description = _this$props3.description,
530
- disabled = _this$props3.disabled,
531
- elementRef = _this$props3.elementRef,
532
- headingLevel = _this$props3.headingLevel,
533
- overflow = _this$props3.overflow,
534
- renderChildrenWhenCollapsed = _this$props3.renderChildrenWhenCollapsed,
535
- title = _this$props3.title,
536
- titleWithActions = _this$props3.titleWithActions;
537
- var animating = this.state.animating;
538
- var open = this.isControlled() ? this.props.open : this.state.open;
539
- return /*#__PURE__*/external_react_default.a.createElement(StyledBox, _extends({
540
- "data-test": "collapsible-panel",
541
- elementRef: elementRef
542
- }, omit_default()(this.props, keys_default()(CollapsiblePanel.propTypes))), titleWithActions ? /*#__PURE__*/external_react_default.a.createElement(StyledTitleWithActions, {
543
- $disabled: disabled
544
- }, /*#__PURE__*/external_react_default.a.createElement(StyledClickableIcon, {
545
- disabled: disabled,
546
- onClick: open ? this.handleRequestClose : this.handleRequestOpen,
547
- id: this.toggleId,
548
- "aria-controls": this.containerId,
549
- "aria-expanded": open,
550
- $open: !!open,
551
- "data-test": "toggle"
552
- }, /*#__PURE__*/external_react_default.a.createElement(ExpandPanel, {
553
- open: open
554
- })), /*#__PURE__*/external_react_default.a.createElement(StyledHeadingContent, {
555
- $titleWithActions: titleWithActions,
556
- "data-test": "title"
557
- }, title)) :
558
- /*#__PURE__*/
559
-
560
- /* Clickable component is not allowed to have role="heading" so it is wrapped with a span */
561
- external_react_default.a.createElement("span", {
562
- "data-test": "heading",
563
- role: headingLevel ? 'heading' : undefined,
564
- "aria-level": headingLevel
565
- }, /*#__PURE__*/external_react_default.a.createElement(StyledTitleClickable, {
566
- disabled: disabled,
567
- onClick: open ? this.handleRequestClose : this.handleRequestOpen,
568
- id: this.toggleId,
569
- "aria-controls": this.containerId,
570
- "aria-expanded": open,
571
- $open: !!open,
572
- "data-test": "toggle"
573
- }, /*#__PURE__*/external_react_default.a.createElement(StyledIcon, null, /*#__PURE__*/external_react_default.a.createElement(ExpandPanel, {
574
- open: open
575
- })), /*#__PURE__*/external_react_default.a.createElement(StyledHeadingContent, null, /*#__PURE__*/external_react_default.a.createElement("span", {
576
- "data-test": "title"
577
- }, title), description && /*#__PURE__*/external_react_default.a.createElement(StyledDescription, {
578
- "data-test": "description"
579
- }, description)))), /*#__PURE__*/external_react_default.a.createElement(TransitionOpen_default.a, {
580
- outerId: this.containerId,
581
- "aria-labelledby": this.toggleId,
582
- "data-test": "body",
583
- outerStyle: {
584
- overflow: animating ? 'hidden' : overflow
585
- },
586
- innerStyle: _objectSpread({
587
- tableLayout: 'fixed'
588
- }, innerBodyStyles),
589
- open: open,
590
- onAnimationEnd: this.handleAnimationEnd,
591
- renderChildrenWhenCollapsed: renderChildrenWhenCollapsed
592
- }, children));
335
+ function L(e, t) {
336
+ if (!(e instanceof t)) {
337
+ throw new TypeError("Cannot call a class as a function");
338
+ }
339
+ }
340
+ function M(e, t) {
341
+ for (var r = 0; r < t.length; r++) {
342
+ var o = t[r];
343
+ o.enumerable = o.enumerable || false;
344
+ o.configurable = true;
345
+ if ("value" in o) o.writable = true;
346
+ Object.defineProperty(e, o.key, o);
347
+ }
348
+ }
349
+ function U(e, t, r) {
350
+ if (t) M(e.prototype, t);
351
+ if (r) M(e, r);
352
+ return e;
353
+ }
354
+ function z(e, t) {
355
+ if (typeof t !== "function" && t !== null) {
356
+ throw new TypeError("Super expression must either be null or a function");
357
+ }
358
+ e.prototype = Object.create(t && t.prototype, {
359
+ constructor: {
360
+ value: e,
361
+ writable: true,
362
+ configurable: true
363
+ }
364
+ });
365
+ if (t) G(e, t);
366
+ }
367
+ function G(e, t) {
368
+ G = Object.setPrototypeOf || function e(t, r) {
369
+ t.__proto__ = r;
370
+ return t;
371
+ };
372
+ return G(e, t);
373
+ }
374
+ function V(e) {
375
+ var t = J();
376
+ return function r() {
377
+ var o = K(e), n;
378
+ if (t) {
379
+ var i = K(this).constructor;
380
+ n = Reflect.construct(o, arguments, i);
381
+ } else {
382
+ n = o.apply(this, arguments);
383
+ }
384
+ return X(this, n);
385
+ };
386
+ }
387
+ function X(e, t) {
388
+ if (t && (B(t) === "object" || typeof t === "function")) {
389
+ return t;
390
+ }
391
+ return F(e);
392
+ }
393
+ function F(e) {
394
+ if (e === void 0) {
395
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
396
+ }
397
+ return e;
398
+ }
399
+ function J() {
400
+ if (typeof Reflect === "undefined" || !Reflect.construct) return false;
401
+ if (Reflect.construct.sham) return false;
402
+ if (typeof Proxy === "function") return true;
403
+ try {
404
+ Date.prototype.toString.call(Reflect.construct(Date, [], (function() {})));
405
+ return true;
406
+ } catch (e) {
407
+ return false;
408
+ }
409
+ }
410
+ function K(e) {
411
+ K = Object.setPrototypeOf ? Object.getPrototypeOf : function e(t) {
412
+ return t.__proto__ || Object.getPrototypeOf(t);
413
+ };
414
+ return K(e);
415
+ }
416
+ function Q(e, t, r) {
417
+ if (t in e) {
418
+ Object.defineProperty(e, t, {
419
+ value: r,
420
+ enumerable: true,
421
+ configurable: true,
422
+ writable: true
423
+ });
424
+ } else {
425
+ e[t] = r;
426
+ }
427
+ return e;
593
428
  }
594
- }]);
595
-
596
- return CollapsiblePanel;
597
- }(external_react_["Component"]);
598
-
599
- _defineProperty(CollapsiblePanel_CollapsiblePanel, "propTypes", CollapsiblePanel_propTypes);
600
-
601
- _defineProperty(CollapsiblePanel_CollapsiblePanel, "defaultProps", defaultProps);
602
-
603
- /* harmony default export */ var src_CollapsiblePanel_CollapsiblePanel = (CollapsiblePanel_CollapsiblePanel);
604
- // CONCATENATED MODULE: ./src/CollapsiblePanel/index.ts
605
-
606
-
607
-
608
- /***/ }),
609
-
610
- /***/ 2:
611
- /***/ (function(module, exports) {
612
-
613
- module.exports = require("react");
614
-
615
- /***/ }),
616
-
617
- /***/ 3:
618
- /***/ (function(module, exports) {
619
-
620
- module.exports = require("styled-components");
621
-
622
- /***/ }),
623
-
624
- /***/ 38:
625
- /***/ (function(module, exports) {
626
-
627
- module.exports = require("@splunk/react-icons/enterprise/ChevronRight");
628
-
629
- /***/ }),
630
-
631
- /***/ 4:
632
- /***/ (function(module, exports) {
633
-
634
- module.exports = require("@splunk/ui-utils/i18n");
635
-
636
- /***/ }),
637
-
638
- /***/ 46:
639
- /***/ (function(module, exports) {
640
-
641
- module.exports = require("@splunk/react-icons/ChevronRight");
642
-
643
- /***/ }),
644
-
645
- /***/ 5:
646
- /***/ (function(module, exports) {
647
-
648
- module.exports = require("lodash/omit");
649
-
650
- /***/ }),
651
-
652
- /***/ 6:
653
- /***/ (function(module, exports) {
654
-
655
- module.exports = require("@splunk/react-ui/Box");
656
-
657
- /***/ }),
658
-
659
- /***/ 74:
660
- /***/ (function(module, exports) {
661
-
662
- module.exports = require("@splunk/react-ui/TransitionOpen");
663
-
664
- /***/ }),
665
-
666
- /***/ 8:
667
- /***/ (function(module, exports) {
668
-
669
- module.exports = require("@splunk/ui-utils/id");
670
-
671
- /***/ }),
672
-
673
- /***/ 9:
674
- /***/ (function(module, exports) {
675
-
676
- module.exports = require("lodash/keys");
677
-
678
- /***/ })
679
-
680
- /******/ });
429
+ /** @public */ var Y = {
430
+ innerBodyStyles: i().object,
431
+ children: i().node,
432
+ defaultOpen: i().bool,
433
+ description: i().string,
434
+ disabled: i().bool,
435
+ elementRef: i().oneOfType([ i().func, i().object ]),
436
+ headingLevel: i().number,
437
+ onRequestClose: i().func,
438
+ onRequestOpen: i().func,
439
+ open: i().bool,
440
+ overflow: i().string,
441
+ panelId: i().any,
442
+ renderChildrenWhenCollapsed: i().bool,
443
+ title: i().node.isRequired,
444
+ titleWithActions: i().bool
445
+ };
446
+ var Z = {
447
+ disabled: false,
448
+ overflow: "auto",
449
+ renderChildrenWhenCollapsed: false,
450
+ titleWithActions: false
451
+ };
452
+ var ee = function(e) {
453
+ z(r, e);
454
+ var t = V(r);
455
+ // @docs-props-type CollapsiblePanelPropsBase
456
+ function r(e) {
457
+ var o;
458
+ L(this, r);
459
+ o = t.call(this, e);
460
+ Q(F(o), "controlledExternally", void 0);
461
+ Q(F(o), "containerId", void 0);
462
+ Q(F(o), "toggleId", void 0);
463
+ Q(F(o), "handleRequestClose", (function(e) {
464
+ var t = o.props, r = t.panelId, n = t.onRequestClose;
465
+ n === null || n === void 0 ? void 0 : n({
466
+ event: e,
467
+ panelId: r,
468
+ reason: "toggleClick"
469
+ });
470
+ o.setState(H({
471
+ animating: true
472
+ }, !o.isControlled() ? {
473
+ open: false
474
+ } : {}));
475
+ }));
476
+ Q(F(o), "handleRequestOpen", (function(e) {
477
+ var t = o.props, r = t.panelId, n = t.onRequestOpen;
478
+ n === null || n === void 0 ? void 0 : n({
479
+ event: e,
480
+ panelId: r,
481
+ reason: "toggleClick"
482
+ });
483
+ o.setState(H({
484
+ animating: true
485
+ }, !o.isControlled() ? {
486
+ open: true
487
+ } : {}));
488
+ }));
489
+ Q(F(o), "handleAnimationEnd", (function() {
490
+ o.setState({
491
+ animating: false
492
+ });
493
+ }));
494
+ o.controlledExternally = l()(e, "open");
495
+ o.state = H({
496
+ animating: false
497
+ }, !o.isControlled() ? {
498
+ open: e.defaultOpen || false
499
+ } : undefined);
500
+ if (false) {}
501
+ o.containerId = "container-".concat((0, u.createGUID)());
502
+ o.toggleId = "toggle-".concat((0, u.createGUID)());
503
+ return o;
504
+ }
505
+ U(r, [ {
506
+ key: "componentDidUpdate",
507
+ value: function e(t) {
508
+ if (this.props.open !== t.open) {
509
+ this.setState({
510
+ animating: true
511
+ });
512
+ // eslint-disable-line react/no-did-update-set-state
513
+ }
514
+ if (false) {}
515
+ if (false) {}
516
+ }
517
+ }, {
518
+ key: "isControlled",
519
+ value: function e() {
520
+ return this.controlledExternally;
521
+ }
522
+ }, {
523
+ key: "render",
524
+ value: function e() {
525
+ var t = this.props, n = t.innerBodyStyles, i = t.children, a = t.description, l = t.disabled, s = t.elementRef, p = t.headingLevel, u = t.overflow, f = t.renderChildrenWhenCollapsed, v = t.title, m = t.titleWithActions;
526
+ var h = this.state.animating;
527
+ var y = this.isControlled() ? this.props.open : this.state.open;
528
+
529
+ return o().createElement(x, $({
530
+ "data-test": "collapsible-panel",
531
+ elementRef: s
532
+ }, d()(this.props, c()(r.propTypes))), m ? o().createElement(S, {
533
+ $disabled: l
534
+ }, o().createElement(w, {
535
+ disabled: l,
536
+ onClick: y ? this.handleRequestClose : this.handleRequestOpen,
537
+ id: this.toggleId,
538
+ "aria-controls": this.containerId,
539
+ "aria-expanded": y,
540
+ $open: !!y,
541
+ "data-test": "toggle"
542
+ }, o().createElement(W, {
543
+ open: y
544
+ })), o().createElement(I, {
545
+ $titleWithActions: m,
546
+ "data-test": "title"
547
+ }, v)) :
548
+
549
+ /* Clickable component is not allowed to have role="heading" so it is wrapped with a span */
550
+ o().createElement("span", {
551
+ "data-test": "heading",
552
+ role: p ? "heading" : undefined,
553
+ "aria-level": p
554
+ }, o().createElement(P, {
555
+ disabled: l,
556
+ onClick: y ? this.handleRequestClose : this.handleRequestOpen,
557
+ id: this.toggleId,
558
+ "aria-controls": this.containerId,
559
+ "aria-expanded": y,
560
+ $open: !!y,
561
+ "data-test": "toggle"
562
+ }, o().createElement(O, null, o().createElement(W, {
563
+ open: y
564
+ })), o().createElement(I, null, o().createElement("span", {
565
+ "data-test": "title"
566
+ }, v), a && o().createElement(j, {
567
+ "data-test": "description"
568
+ }, a)))), o().createElement(b(), {
569
+ outerId: this.containerId,
570
+ "aria-labelledby": this.toggleId,
571
+ "data-test": "body",
572
+ outerStyle: {
573
+ overflow: h ? "hidden" : u
574
+ },
575
+ innerStyle: H({
576
+ tableLayout: "fixed"
577
+ }, n),
578
+ open: y,
579
+ onAnimationEnd: this.handleAnimationEnd,
580
+ renderChildrenWhenCollapsed: f
581
+ }, i));
582
+ }
583
+ } ]);
584
+ return r;
585
+ }(r.Component);
586
+ Q(ee, "propTypes", Y);
587
+ Q(ee, "defaultProps", Z);
588
+ /* harmony default export */ const te = ee;
589
+ // CONCATENATED MODULE: ./src/CollapsiblePanel/index.ts
590
+ module.exports = t;
591
+ /******/})();